template-min/app.js in jsduck-3.10.1 vs template-min/app.js in jsduck-3.10.2
- old
+ new
@@ -1 +1 @@
-var CodeMirror=(function(){function u(aM,aJ){var b1={},bj=u.defaults;for(var az in bj){if(bj.hasOwnProperty(az)){b1[az]=(aJ&&aJ.hasOwnProperty(az)?aJ:bj)[az]}}var aD=document.createElement("div");aD.className="CodeMirror"+(b1.lineWrapping?" CodeMirror-wrap":"");aD.innerHTML='<div style="overflow: hidden; position: relative; width: 3px; height: 0px;"><textarea style="position: absolute; padding: 0; width: 1px; height: 1em" wrap="off" autocorrect="off" autocapitalize="off"></textarea></div><div class="CodeMirror-scroll" tabindex="-1"><div style="position: relative"><div style="position: relative"><div class="CodeMirror-gutter"><div class="CodeMirror-gutter-text"></div></div><div class="CodeMirror-lines"><div style="position: relative; z-index: 0"><div style="position: absolute; width: 100%; height: 0; overflow: hidden; visibility: hidden;"></div><pre class="CodeMirror-cursor"> </pre><div style="position: relative; z-index: -1"></div><div></div></div></div></div></div></div>';if(aM.appendChild){aM.appendChild(aD)}else{aM(aD)}var bX=aD.firstChild,bm=bX.firstChild,bk=aD.lastChild,bM=bk.firstChild,cg=bM.firstChild,aH=cg.firstChild,aY=aH.firstChild,bu=aH.nextSibling.firstChild,av=bu.firstChild,bc=av.nextSibling,bg=bc.nextSibling,aq=bg.nextSibling;cD();if(s){bm.style.width="0px"}if(!f){bu.draggable=true}bu.style.outline="none";if(b1.tabindex!=null){bm.tabIndex=b1.tabindex}if(b1.autofocus){bz()}if(!b1.gutter&&!b1.lineNumbers){aH.style.display="none"}if(m){bX.style.height="1px",bX.style.position="absolute"}try{ct("x")}catch(b8){if(b8.message.match(/runtime/i)){b8=new Error("A CodeMirror inside a P-style element does not work in Internet Explorer. (innerHTML bug)")}throw b8}var b7=new z(),aw=new z(),cP;var cb,cy=new i([new ah([new e("")])]),ch,cj;bT();var cW={from:{line:0,ch:0},to:{line:0,ch:0},inverted:false};var ci,bq,aZ,bF=0,bb,cn=false,cs=false;var cp,b6,aB,cN,aP,bf,aS,cA;var bd=0,cQ=0,bL=0,bN=0;var b4;var bD="",aF;var ap={};ar(function(){aW(b1.value||"");cp=false})();var a8=new k();r(bk,"mousedown",ar(ck));r(bk,"dblclick",ar(bW));r(bu,"selectstart",T);if(!N){r(bk,"contextmenu",a1)}r(bk,"scroll",function(){bF=bk.scrollTop;cd([]);if(b1.fixedGutter){aH.style.left=bk.scrollLeft+"px"}if(b1.onScroll){b1.onScroll(b9)}});r(window,"resize",function(){cd(true)});r(bm,"keyup",ar(cl));r(bm,"input",aQ);r(bm,"keydown",ar(cc));r(bm,"keypress",ar(bn));r(bm,"focus",cU);r(bm,"blur",aE);if(b1.dragDrop){r(bu,"dragstart",aI);function bC(cZ){if(b1.onDragEvent&&b1.onDragEvent(b9,O(cZ))){return}w(cZ)}r(bk,"dragenter",bC);r(bk,"dragover",bC);r(bk,"drop",ar(an))}r(bk,"paste",function(){bz();aQ()});r(bm,"paste",aQ);r(bm,"cut",ar(function(){if(!b1.readOnly){bs("")}}));if(m){r(bM,"mouseup",function(){if(document.activeElement==bm){bm.blur()}bz()})}var cw;try{cw=(document.activeElement==bm)}catch(b8){}if(cw||b1.autofocus){setTimeout(cU,20)}else{aE()}function br(cZ){return cZ>=0&&cZ<cy.size}var b9=aD.CodeMirror={getValue:b2,setValue:ar(aW),getSelection:b3,replaceSelection:ar(bs),focus:function(){window.focus();bz();cU();aQ()},setOption:function(c0,c1){var cZ=b1[c0];b1[c0]=c1;if(c0=="mode"||c0=="indentUnit"){bT()}else{if(c0=="readOnly"&&c1=="nocursor"){aE();bm.blur()}else{if(c0=="readOnly"&&!c1){cC(true)}else{if(c0=="theme"){cD()}else{if(c0=="lineWrapping"&&cZ!=c1){ar(cG)()}else{if(c0=="tabSize"){cd(true)}}}}}}if(c0=="lineNumbers"||c0=="gutter"||c0=="firstLineNumber"||c0=="theme"){be();cd(true)}},getOption:function(cZ){return b1[cZ]},undo:ar(cT),redo:ar(cJ),indentLine:ar(function(c0,cZ){if(typeof cZ!="string"){if(cZ==null){cZ=b1.smartIndent?"smart":"prev"}else{cZ=cZ?"add":"subtract"}}if(br(c0)){by(c0,cZ)}}),indentSelection:ar(cB),historySize:function(){return{undo:a8.done.length,redo:a8.undone.length}},clearHistory:function(){a8=new k()},matchBrackets:ar(function(){ce(true)}),getTokenAt:ar(function(cZ){cZ=aT(cZ);return cF(cZ.line).getTokenAt(cb,cu(cZ.line),cZ.ch)}),getStateAfter:function(cZ){cZ=bZ(cZ==null?cy.size-1:cZ);return cu(cZ+1)},cursorCoords:function(c0,cZ){if(c0==null){c0=cW.inverted}return this.charCoords(c0?cW.from:cW.to,cZ)},charCoords:function(c0,cZ){c0=aT(c0);if(cZ=="local"){return cR(c0,false)}if(cZ=="div"){return cR(c0,true)}return ao(c0)},coordsChar:function(cZ){var c0=ak(bu);return bH(cZ.x-c0.left,cZ.y-c0.top)},markText:ar(bE),setBookmark:aU,findMarksAt:bo,setMarker:ar(bV),clearMarker:ar(au),setLineClass:ar(bl),hideLine:ar(function(cZ){return cK(cZ,true)}),showLine:ar(function(cZ){return cK(cZ,false)}),onDeleteLine:function(cZ,c0){if(typeof cZ=="number"){if(!br(cZ)){return null}cZ=cF(cZ)}(cZ.handlers||(cZ.handlers=[])).push(c0);return cZ},lineInfo:aV,addWidget:function(c3,c1,c5,c2,c7){c3=cR(aT(c3));var c4=c3.yBot,c0=c3.x;c1.style.position="absolute";bM.appendChild(c1);if(c2=="over"){c4=c3.y}else{if(c2=="near"){var cZ=Math.max(bk.offsetHeight,cy.height*bP()),c6=Math.max(bM.clientWidth,bu.clientWidth)-a5();if(c3.yBot+c1.offsetHeight>cZ&&c3.y>c1.offsetHeight){c4=c3.y-c1.offsetHeight}if(c0+c1.offsetWidth>c6){c0=c6-c1.offsetWidth}}}c1.style.top=(c4+cr())+"px";c1.style.left=c1.style.right="";if(c7=="right"){c0=bM.clientWidth-c1.offsetWidth;c1.style.right="0px"}else{if(c7=="left"){c0=0}else{if(c7=="middle"){c0=(bM.clientWidth-c1.offsetWidth)/2}}c1.style.left=(c0+a5())+"px"}if(c5){aA(c0,c4,c0+c1.offsetWidth,c4+c1.offsetHeight)}},lineCount:function(){return cy.size},clipPos:aT,getCursor:function(cZ){if(cZ==null){cZ=cW.inverted}return aa(cZ?cW.from:cW.to)},somethingSelected:function(){return !ad(cW.from,cW.to)},setCursor:ar(function(cZ,c1,c0){if(c1==null&&typeof cZ.line=="number"){a6(cZ.line,cZ.ch,c0)}else{a6(cZ,c1,c0)}}),setSelection:ar(function(c1,c0,cZ){(cZ?bx:bw)(aT(c1),aT(c0||c1))}),getLine:function(cZ){if(br(cZ)){return cF(cZ).text}},getLineHandle:function(cZ){if(br(cZ)){return cF(cZ)}},setLine:ar(function(cZ,c0){if(br(cZ)){bQ(c0,{line:cZ,ch:0},{line:cZ,ch:cF(cZ).text.length})}}),removeLine:ar(function(cZ){if(br(cZ)){bQ("",{line:cZ,ch:0},aT({line:cZ+1,ch:0}))}}),replaceRange:ar(bQ),getRange:function(c0,cZ){return cO(aT(c0),aT(cZ))},triggerOnKeyDown:ar(cc),execCommand:function(cZ){return L[cZ](b9)},moveH:ar(cE),deleteH:ar(cm),moveV:ar(cx),toggleOverwrite:function(){if(cn){cn=false;bc.className=bc.className.replace(" CodeMirror-overwrite","")}else{cn=true;bc.className+=" CodeMirror-overwrite"}},posFromIndex:function(c0){var c1=0,cZ;cy.iter(0,cy.size,function(c2){var c3=c2.text.length+1;if(c3>c0){cZ=c0;return true}c0-=c3;++c1});return aT({line:c1,ch:cZ})},indexFromPos:function(c0){if(c0.line<0||c0.ch<0){return 0}var cZ=c0.ch;cy.iter(0,c0.line,function(c1){cZ+=c1.text.length+1});return cZ},scrollTo:function(cZ,c0){if(cZ!=null){bk.scrollLeft=cZ}if(c0!=null){bk.scrollTop=c0}cd([])},operation:function(cZ){return ar(cZ)()},compoundChange:function(cZ){return bO(cZ)},refresh:function(){cd(true);if(bk.scrollHeight>bF){bk.scrollTop=bF}},getInputField:function(){return bm},getWrapperElement:function(){return aD},getScrollerElement:function(){return bk},getGutterElement:function(){return aH}};function cF(cZ){return C(cy,cZ)}function a3(c0,cZ){aS=true;var c1=cZ-c0.height;for(var c2=c0;c2;c2=c2.parent){c2.height+=c1}}function aW(cZ){var c0={line:0,ch:0};aO(c0,{line:cy.size-1,ch:cF(cy.size-1).text.length},A(cZ),c0,c0);cp=true}function b2(){var cZ=[];cy.iter(0,cy.size,function(c0){cZ.push(c0.text)});return cZ.join("\n")}function ck(c8){a4(y(c8,"shiftKey"));for(var c3=j(c8);c3!=aD;c3=c3.parentNode){if(c3.parentNode==bM&&c3!=cg){return}}for(var c3=j(c8);c3!=aD;c3=c3.parentNode){if(c3.parentNode==aY){if(b1.onGutterClick){b1.onGutterClick(b9,q(aY.childNodes,c3)+cQ,c8)}return T(c8)}}var cZ=a2(c8);switch(x(c8)){case 3:if(N&&!M){a1(c8)}return;case 2:if(cZ){a6(cZ.line,cZ.ch,true)}return}if(!cZ){if(j(c8)==bk){T(c8)}return}if(!cj){cU()}var c0=+new Date;if(aZ&&aZ.time>c0-400&&ad(aZ.pos,cZ)){T(c8);setTimeout(bz,20);return aK(cZ.line)}else{if(bq&&bq.time>c0-400&&ad(bq.pos,cZ)){aZ={time:c0,pos:cZ};T(c8);return bI(cZ)}else{bq={time:c0,pos:cZ}}}var da=cZ,c1;if(b1.dragDrop&&F&&!b1.readOnly&&!ad(cW.from,cW.to)&&!Z(cZ,cW.from)&&!Z(cW.to,cZ)){if(f){bu.draggable=true}function c4(db){if(f){bu.draggable=false}bb=false;c7();c2();if(Math.abs(c8.clientX-db.clientX)+Math.abs(c8.clientY-db.clientY)<10){T(db);a6(cZ.line,cZ.ch,true);bz()}}var c7=r(document,"mouseup",ar(c4),true);var c2=r(bk,"drop",ar(c4),true);bb=true;if(bu.dragDrop){bu.dragDrop()}return}T(c8);a6(cZ.line,cZ.ch,true);function c9(db){var dd=a2(db,true);if(dd&&!ad(dd,da)){if(!cj){cU()}da=dd;bx(cZ,dd);cp=false;var dc=bA();if(dd.line>=dc.to||dd.line<dc.from){c1=setTimeout(ar(function(){c9(db)}),150)}}}function c6(db){clearTimeout(c1);var dc=a2(db);if(dc){bx(cZ,dc)}T(db);bz();cp=true;c5();c7()}var c5=r(document,"mousemove",ar(function(db){clearTimeout(c1);T(db);if(!I&&!x(db)){c6(db)}else{c9(db)}}),true);var c7=r(document,"mouseup",ar(c6),true)}function bW(cZ){for(var c1=j(cZ);c1!=aD;c1=c1.parentNode){if(c1.parentNode==aY){return T(cZ)}}var c0=a2(cZ);if(!c0){return}aZ={time:+new Date,pos:c0};T(cZ);bI(c0)}function an(c3){if(b1.onDragEvent&&b1.onDragEvent(b9,O(c3))){return}c3.preventDefault();var c6=a2(c3,true),c0=c3.dataTransfer.files;if(!c6||b1.readOnly){return}if(c0&&c0.length&&window.FileReader&&window.File){function c2(c9,c8){var c7=new FileReader;c7.onload=function(){c4[c8]=c7.result;if(++c1==c5){c6=aT(c6);ar(function(){var da=bQ(c4.join(""),c6,c6);bx(c6,da)})()}};c7.readAsText(c9)}var c5=c0.length,c4=Array(c5),c1=0;for(var cZ=0;cZ<c5;++cZ){c2(c0[cZ],cZ)}}else{try{var c4=c3.dataTransfer.getData("Text");if(c4){bO(function(){var c8=cW.from,c7=cW.to;bx(c6,c6);if(bb){bQ("",c8,c7)}bs(c4);bz()})}}catch(c3){}}}function aI(c1){var cZ=b3();c1.dataTransfer.setData("Text",cZ);if(N||af){var c0=document.createElement("img");c0.scr="data:image/gif;base64,R0lGODdhAgACAIAAAAAAAP///ywAAAAAAgACAAACAoRRADs=";c1.dataTransfer.setDragImage(c0,0,0)}}function bi(c1,cZ){if(typeof c1=="string"){c1=L[c1];if(!c1){return false}}var c0=ci;try{if(b1.readOnly){cs=true}if(cZ){ci=null}c1(b9)}catch(c2){if(c2!=ab){throw c2}return false}finally{ci=c0;cs=false}return true}function cL(c5){var cZ=c(b1.keyMap),c2=cZ.auto;clearTimeout(bB);if(c2&&!Q(c5)){bB=setTimeout(function(){if(c(b1.keyMap)==cZ){b1.keyMap=(c2.call?c2.call(null,b9):c2)}},50)}var c0=R[y(c5,"keyCode")],c4=false;if(c0==null||c5.altGraphKey){return false}if(y(c5,"altKey")){c0="Alt-"+c0}if(y(c5,"ctrlKey")){c0="Ctrl-"+c0}if(y(c5,"metaKey")){c0="Cmd-"+c0}var c3=false;function c1(){c3=true}if(y(c5,"shiftKey")){c4=l("Shift-"+c0,b1.extraKeys,b1.keyMap,function(c6){return bi(c6,true)},c1)||l(c0,b1.extraKeys,b1.keyMap,function(c6){if(typeof c6=="string"&&/^go[A-Z]/.test(c6)){return bi(c6)}},c1)}else{c4=l(c0,b1.extraKeys,b1.keyMap,bi,c1)}if(c3){c4=false}if(c4){T(c5);if(I){c5.oldKeyCode=c5.keyCode;c5.keyCode=0}}return c4}function bY(c1,cZ){var c0=l("'"+cZ+"'",b1.extraKeys,b1.keyMap,function(c2){return bi(c2,true)});if(c0){T(c1)}return c0}var cI=null,bB;function cc(c1){if(!cj){cU()}if(I&&c1.keyCode==27){c1.returnValue=false}if(bt){if(bK()){bt=false}}if(b1.onKeyEvent&&b1.onKeyEvent(b9,O(c1))){return}var cZ=y(c1,"keyCode");a4(cZ==16||y(c1,"shiftKey"));var c0=cL(c1);if(window.opera){cI=c0?cZ:null;if(!c0&&cZ==88&&y(c1,M?"metaKey":"ctrlKey")){bs("")}}}function bn(c2){if(bt){bK()}if(b1.onKeyEvent&&b1.onKeyEvent(b9,O(c2))){return}var c1=y(c2,"keyCode"),cZ=y(c2,"charCode");if(window.opera&&c1==cI){cI=null;T(c2);return}if(((window.opera&&!c2.which)||m)&&cL(c2)){return}var c0=String.fromCharCode(cZ==null?c1:cZ);if(b1.electricChars&&cb.electricChars&&b1.smartIndent&&!b1.readOnly){if(cb.electricChars.indexOf(c0)>-1){setTimeout(ar(function(){by(cW.to.line,"smart")}),75)}}if(bY(c2,c0)){return}aQ()}function cl(cZ){if(b1.onKeyEvent&&b1.onKeyEvent(b9,O(cZ))){return}if(y(cZ,"keyCode")==16){ci=null}}function cU(){if(b1.readOnly=="nocursor"){return}if(!cj){if(b1.onFocus){b1.onFocus(b9)}cj=true;if(aD.className.search(/\bCodeMirror-focused\b/)==-1){aD.className+=" CodeMirror-focused"}if(!bf){cC(true)}}am();cM()}function aE(){if(cj){if(b1.onBlur){b1.onBlur(b9)}cj=false;if(b4){ar(function(){if(b4){b4();b4=null}})()}aD.className=aD.className.replace(" CodeMirror-focused","")}clearInterval(cP);setTimeout(function(){if(!cj){ci=null}},150)}function aO(c4,c3,c2,c0,cZ){if(cs){return}if(a8){var c1=[];cy.iter(c4.line,c3.line+1,function(c5){c1.push(c5.text)});a8.addChange(c4.line,c2.length,c1);while(a8.done.length>b1.undoDepth){a8.done.shift()}}at(c4,c3,c2,c0,cZ)}function ca(c4,c5){if(!c4.length){return}var c6=c4.pop(),c0=[];for(var c1=c6.length-1;c1>=0;c1-=1){var c3=c6[c1];var c7=[],cZ=c3.start+c3.added;cy.iter(c3.start,cZ,function(c8){c7.push(c8.text)});c0.push({start:c3.start,added:c3.old.length,old:c7});var c2=aT({line:c3.start+c3.old.length-1,ch:W(c7[c7.length-1],c3.old[c3.old.length-1])});at({line:c3.start,ch:0},{line:cZ-1,ch:cF(cZ-1).text.length},c3.old,c2,c2)}cp=true;c5.push(c0)}function cT(){ca(a8.done,a8.undone)}function cJ(){ca(a8.undone,a8.done)}function at(de,c3,dk,cZ,dl){if(cs){return}var dj=false,c2=bD.length;if(!b1.lineWrapping){cy.iter(de.line,c3.line+1,function(dm){if(dm.text.length==c2){dj=true;return true}})}if(de.line!=c3.line||dk.length>1){aS=true}var db=c3.line-de.line,da=cF(de.line),c0=cF(c3.line);if(de.ch==0&&c3.ch==0&&dk[dk.length-1]==""){var c8=[],c9=null;if(de.line){c9=cF(de.line-1);c9.fixMarkEnds(c0)}else{c0.fixMarkStarts()}for(var dg=0,di=dk.length-1;dg<di;++dg){c8.push(e.inheritMarks(dk[dg],c9))}if(db){cy.remove(de.line,db,cA)}if(c8.length){cy.insert(de.line,c8)}}else{if(da==c0){if(dk.length==1){da.replace(de.ch,c3.ch,dk[0])}else{c0=da.split(c3.ch,dk[dk.length-1]);da.replace(de.ch,null,dk[0]);da.fixMarkEnds(c0);var c8=[];for(var dg=1,di=dk.length-1;dg<di;++dg){c8.push(e.inheritMarks(dk[dg],da))}c8.push(c0);cy.insert(de.line+1,c8)}}else{if(dk.length==1){da.replace(de.ch,null,dk[0]);c0.replace(null,c3.ch,"");da.append(c0);cy.remove(de.line+1,db,cA)}else{var c8=[];da.replace(de.ch,null,dk[0]);c0.replace(null,c3.ch,dk[dk.length-1]);da.fixMarkEnds(c0);for(var dg=1,di=dk.length-1;dg<di;++dg){c8.push(e.inheritMarks(dk[dg],da))}if(db>1){cy.remove(de.line+1,db-1,cA)}cy.insert(de.line+1,c8)}}}if(b1.lineWrapping){var c5=Math.max(5,bk.clientWidth/bh()-3);cy.iter(de.line,de.line+dk.length,function(dm){if(dm.hidden){return}var dn=Math.ceil(dm.text.length/c5)||1;if(dn!=dm.height){a3(dm,dn)}})}else{cy.iter(de.line,de.line+dk.length,function(dn){var dm=dn.text;if(dm.length>c2){bD=dm;c2=dm.length;aF=null;dj=false}});if(dj){c2=0;bD="";aF=null;cy.iter(0,cy.size,function(dn){var dm=dn.text;if(dm.length>c2){c2=dm.length;bD=dm}})}}var c1=[],c7=dk.length-db-1;for(var dg=0,dd=ch.length;dg<dd;++dg){var dh=ch[dg];if(dh<de.line){c1.push(dh)}else{if(dh>c3.line){c1.push(dh+c7)}}}var df=de.line+Math.min(dk.length,500);cH(de.line,df);c1.push(df);ch=c1;bG(100);aB.push({from:de.line,to:c3.line+1,diff:c7});var c6={from:de,to:c3,text:dk};if(cN){for(var c4=cN;c4.next;c4=c4.next){}c4.next=c6}else{cN=c6}function dc(dm){return dm<=Math.min(c3.line,c3.line+c7)?dm:dm+c7}bw(cZ,dl,dc(cW.from.line),dc(cW.to.line));if(bk.clientHeight){bM.style.height=(cy.height*bP()+2*cr())+"px"}}function bQ(c0,c3,c2){c3=aT(c3);if(!c2){c2=c3}else{c2=aT(c2)}c0=A(c0);function c1(c6){if(Z(c6,c3)){return c6}if(!Z(c2,c6)){return cZ}var c4=c6.line+c0.length-(c2.line-c3.line)-1;var c5=c6.ch;if(c6.line==c2.line){c5+=c0[c0.length-1].length-(c2.ch-(c2.line==c3.line?c3.ch:0))}return{line:c4,ch:c5}}var cZ;aC(c0,c3,c2,function(c4){cZ=c4;return{from:c1(cW.from),to:c1(cW.to)}});return cZ}function bs(cZ,c0){aC(A(cZ),cW.from,cW.to,function(c1){if(c0=="end"){return{from:c1,to:c1}}else{if(c0=="start"){return{from:cW.from,to:cW.from}}else{return{from:cW.from,to:c1}}}})}function aC(c2,c4,c3,cZ){var c1=c2.length==1?c2[0].length+c4.ch:c2[c2.length-1].length;var c0=cZ({line:c4.line+c2.length-1,ch:c1});aO(c4,c3,c2,c0.from,c0.to)}function cO(c3,c2){var c0=c3.line,cZ=c2.line;if(c0==cZ){return cF(c0).text.slice(c3.ch,c2.ch)}var c1=[cF(c0).text.slice(c3.ch)];cy.iter(c0+1,cZ,function(c4){c1.push(c4.text)});c1.push(cF(cZ).text.slice(0,c2.ch));return c1.join("\n")}function b3(){return cO(cW.from,cW.to)}var bt=false;function am(){if(bt){return}b7.set(b1.pollInterval,function(){aN();bK();if(cj){am()}ay()})}function aQ(){var cZ=false;bt=true;function c0(){aN();var c1=bK();if(!c1&&!cZ){cZ=true;b7.set(60,c0)}else{bt=false;am()}ay()}b7.set(20,c0)}var ba="";function bK(){if(bf||!cj||ae(bm)||b1.readOnly){return false}var c0=bm.value;if(c0==ba){return false}ci=null;var c1=0,cZ=Math.min(ba.length,c0.length);while(c1<cZ&&ba[c1]==c0[c1]){++c1}if(c1<ba.length){cW.from={line:cW.from.line,ch:cW.from.ch-(ba.length-c1)}}else{if(cn&&ad(cW.from,cW.to)){cW.to={line:cW.to.line,ch:Math.min(cF(cW.to.line).text.length,cW.to.ch+(c0.length-c1))}}}bs(c0.slice(c1),"end");ba=c0;return true}function cC(cZ){if(!ad(cW.from,cW.to)){ba="";bm.value=b3();a(bm)}else{if(cZ){ba=bm.value=""}}}function bz(){if(b1.readOnly!="nocursor"){bm.focus()}}function cY(){if(!bc.getBoundingClientRect){return}var cZ=bc.getBoundingClientRect();if(I&&cZ.top==cZ.bottom){return}var c0=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);if(cZ.top<0||cZ.bottom>c0){bc.scrollIntoView()}}function cf(){var c0=cR(cW.inverted?cW.from:cW.to);var cZ=b1.lineWrapping?Math.min(c0.x,bu.offsetWidth):c0.x;return aA(cZ,c0.y,cZ,c0.yBot)}function aA(c1,c7,cZ,c6){var c4=a5(),dc=cr();c7+=dc;c6+=dc;c1+=c4;cZ+=c4;var c9=bk.clientHeight,c2=bk.scrollTop,c0=false,db=true;if(c7<c2){bk.scrollTop=Math.max(0,c7);c0=true}else{if(c6>c2+c9){bk.scrollTop=c6-c9;c0=true}}var c8=bk.clientWidth,da=bk.scrollLeft;var c5=b1.fixedGutter?aH.clientWidth:0;var c3=c1<c5+c4+10;if(c1<da+c5||c3){if(c3){c1=0}bk.scrollLeft=Math.max(0,c1-10-c5);c0=true}else{if(cZ>c8+da-3){bk.scrollLeft=cZ+10-c8;c0=true;if(cZ>bM.clientWidth){db=false}}}if(c0&&b1.onScroll){b1.onScroll(b9)}return db}function bA(){var cZ=bP(),c2=bk.scrollTop-cr();var c1=Math.max(0,Math.floor(c2/cZ));var c0=Math.ceil((c2+bk.clientHeight)/cZ);return{from:X(cy,c1),to:X(cy,c0)}}function cd(c7,c3){if(!bk.clientWidth){cQ=bL=bd=0;return}var c2=bA();if(c7!==true&&c7.length==0&&c2.from>cQ&&c2.to<bL){return}var c8=Math.max(c2.from-100,0),c9=Math.min(cy.size,c2.to+100);if(cQ<c8&&c8-cQ<20){c8=cQ}if(bL>c9&&bL-c9<20){c9=Math.min(cy.size,bL)}var db=c7===true?[]:b0([{from:cQ,to:bL,domStart:0}],c7);var c6=0;for(var c4=0;c4<db.length;++c4){var c5=db[c4];if(c5.from<c8){c5.domStart+=(c8-c5.from);c5.from=c8}if(c5.to>c9){c5.to=c9}if(c5.from>=c5.to){db.splice(c4--,1)}else{c6+=c5.to-c5.from}}if(c6==c9-c8&&c8==cQ&&c9==bL){return}db.sort(function(dd,dc){return dd.domStart-dc.domStart});var c1=bP(),cZ=aH.style.display;aq.style.display="none";aR(c8,c9,db);aq.style.display=aH.style.display="";var c0=c8!=cQ||c9!=bL||bN!=bk.clientHeight+c1;if(c0){bN=bk.clientHeight+c1}cQ=c8;bL=c9;bd=g(cy,c8);cg.style.top=(bd*c1)+"px";if(bk.clientHeight){bM.style.height=(cy.height*c1+2*cr())+"px"}if(aq.childNodes.length!=bL-cQ){throw new Error("BAD PATCH! "+JSON.stringify(db)+" size="+(bL-cQ)+" nodes="+aq.childNodes.length)}function da(){aF=bk.clientWidth;var dd=aq.firstChild,dc=false;cy.iter(cQ,bL,function(df){if(!df.hidden){var de=Math.round(dd.offsetHeight/c1)||1;if(df.height!=de){a3(df,de);aS=dc=true}}dd=dd.nextSibling});if(dc){bM.style.height=(cy.height*c1+2*cr())+"px"}return dc}if(b1.lineWrapping){da()}else{if(aF==null){aF=ct(bD)}if(aF>bk.clientWidth){bu.style.width=aF+"px";bM.style.width="";bM.style.width=bk.scrollWidth+"px"}else{bu.style.width=bM.style.width=""}}aH.style.display=cZ;if(c0||aS){aL()&&b1.lineWrapping&&da()&&aL()}cV();if(!c3&&b1.onUpdate){b1.onUpdate(b9)}return true}function b0(c8,c6){for(var c3=0,c1=c6.length||0;c3<c1;++c3){var c5=c6[c3],cZ=[],c7=c5.diff||0;for(var c2=0,c0=c8.length;c2<c0;++c2){var c4=c8[c2];if(c5.to<=c4.from&&c5.diff){cZ.push({from:c4.from+c7,to:c4.to+c7,domStart:c4.domStart})}else{if(c5.to<=c4.from||c5.from>=c4.to){cZ.push(c4)}else{if(c5.from>c4.from){cZ.push({from:c4.from,to:c5.from,domStart:c4.domStart})}if(c5.to<c4.to){cZ.push({from:c5.to+c7,to:c4.to+c7,domStart:c4.domStart+(c5.to-c4.from)})}}}}c8=cZ}return c8}function aR(c8,c9,db){if(!db.length){aq.innerHTML=""}else{function cZ(dd){var dc=dd.nextSibling;dd.parentNode.removeChild(dd);return dc}var c3=0,c1=aq.firstChild,c0;for(var c4=0;c4<db.length;++c4){var da=db[c4];while(da.domStart>c3){c1=cZ(c1);c3++}for(var c2=0,c6=da.to-da.from;c2<c6;++c2){c1=c1.nextSibling;c3++}}while(c1){c1=cZ(c1)}}var c5=db.shift(),c1=aq.firstChild,c2=c8;var c7=document.createElement("div");cy.iter(c8,c9,function(dc){if(c5&&c5.to==c2){c5=db.shift()}if(!c5||c5.from>c2){if(dc.hidden){var dd=c7.innerHTML="<pre></pre>"}else{var dd="<pre"+(dc.className?' class="'+dc.className+'"':"")+">"+dc.getHTML(a9)+"</pre>";if(dc.bgClassName){dd='<div style="position: relative"><pre class="'+dc.bgClassName+'" style="position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: -2"> </pre>'+dd+"</div>"}}c7.innerHTML=dd;aq.insertBefore(c7.firstChild,c1)}else{c1=c1.nextSibling}++c2})}function aL(){if(!b1.gutter&&!b1.lineNumbers){return}var c0=cg.offsetHeight,c8=bk.clientHeight;aH.style.height=(c0-c8<2?c8:c0)+"px";var c6=[],c4=cQ,c7;cy.iter(cQ,Math.max(bL,cQ+1),function(da){if(da.hidden){c6.push("<pre></pre>")}else{var c9=da.gutterMarker;var dc=b1.lineNumbers?c4+b1.firstLineNumber:null;if(c9&&c9.text){dc=c9.text.replace("%N%",dc!=null?dc:"")}else{if(dc==null){dc="\u00a0"}}c6.push((c9&&c9.style?'<pre class="'+c9.style+'">':"<pre>"),dc);for(var db=1;db<da.height;++db){c6.push("<br/> ")}c6.push("</pre>");if(!c9){c7=c4}}++c4});aH.style.display="none";aY.innerHTML=c6.join("");if(c7!=null){var c2=aY.childNodes[c7-cQ];var c3=String(cy.size).length,cZ=H(c2),c1="";while(cZ.length+c1.length<c3){c1+="\u00a0"}if(c1){c2.insertBefore(document.createTextNode(c1),c2.firstChild)}}aH.style.display="";var c5=Math.abs((parseInt(bu.style.marginLeft)||0)-aH.offsetWidth)>2;bu.style.marginLeft=aH.offsetWidth+"px";aS=false;return c5}function cV(){var c2=ad(cW.from,cW.to);var dd=cR(cW.from,true);var c8=c2?dd:cR(cW.to,true);var c6=cW.inverted?dd:c8,c0=bP();var cZ=ak(aD),c1=ak(aq);bX.style.top=Math.max(0,Math.min(bk.offsetHeight,c6.y+c1.top-cZ.top))+"px";bX.style.left=Math.max(0,Math.min(bk.offsetWidth,c6.x+c1.left-cZ.left))+"px";if(c2){bc.style.top=c6.y+"px";bc.style.left=(b1.lineWrapping?Math.min(c6.x,bu.offsetWidth):c6.x)+"px";bc.style.display="";bg.style.display="none"}else{var db=dd.y==c8.y,c4="";var c9=bu.clientWidth||bu.offsetWidth;var c5=bu.clientHeight||bu.offsetHeight;function dc(di,dh,dg,de){var df=E?"width: "+(!dg?c9:c9-dg-di)+"px":"right: "+dg+"px";c4+='<div class="CodeMirror-selected" style="position: absolute; left: '+di+"px; top: "+dh+"px; "+df+"; height: "+de+'px"></div>'}if(cW.from.ch&&dd.y>=0){var da=db?c9-c8.x:0;dc(dd.x,dd.y,da,c0)}var c3=Math.max(0,dd.y+(cW.from.ch?c0:0));var c7=Math.min(c8.y,c5)-c3;if(c7>0.2*c0){dc(0,c3,0,c7)}if((!db||!cW.from.ch)&&c8.y<c5-0.5*c0){dc(0,c8.y,c9-c8.x,c0)}bg.innerHTML=c4;bc.style.display="none";bg.style.display=""}}function a4(cZ){if(cZ){ci=ci||(cW.inverted?cW.to:cW.from)}else{ci=null}}function bx(c1,c0){var cZ=ci&&aT(ci);if(cZ){if(Z(cZ,c1)){c1=cZ}else{if(Z(c0,cZ)){c0=cZ}}}bw(c1,c0);b6=true}function bw(c6,c5,cZ,c4){cv=null;if(cZ==null){cZ=cW.from.line;c4=cW.to.line}if(ad(cW.from,c6)&&ad(cW.to,c5)){return}if(Z(c5,c6)){var c2=c5;c5=c6;c6=c2}if(c6.line!=cZ){var c3=bR(c6,cZ,cW.from.ch);if(!c3){cK(c6.line,false)}else{c6=c3}}if(c5.line!=c4){c5=bR(c5,c4,cW.to.ch)}if(ad(c6,c5)){cW.inverted=false}else{if(ad(c6,cW.to)){cW.inverted=false}else{if(ad(c5,cW.from)){cW.inverted=true}}}if(b1.autoClearEmptyLines&&ad(cW.from,cW.to)){var c1=cW.inverted?c6:c5;if(c1.line!=cW.from.line&&cW.from.line<cy.size){var c0=cF(cW.from.line);if(/^\s+$/.test(c0.text)){setTimeout(ar(function(){if(c0.parent&&/^\s+$/.test(c0.text)){var c7=Y(c0);bQ("",{line:c7,ch:0},{line:c7,ch:c0.text.length})}},10))}}}cW.from=c6;cW.to=c5;aP=true}function bR(c4,c0,c1){function c3(c7){var c9=c4.line+c7,c6=c7==1?cy.size:-1;while(c9!=c6){var c5=cF(c9);if(!c5.hidden){var c8=c4.ch;if(c2||c8>c1||c8>c5.text.length){c8=c5.text.length}return{line:c9,ch:c8}}c9+=c7}}var cZ=cF(c4.line);var c2=c4.ch==cZ.text.length&&c4.ch!=c1;if(!cZ.hidden){return c4}if(c4.line>=c0){return c3(1)||c3(-1)}else{return c3(-1)||c3(1)}}function a6(cZ,c1,c0){var c2=aT({line:cZ,ch:c1||0});(c0?bx:bw)(c2,c2)}function bZ(cZ){return Math.max(0,Math.min(cZ,cy.size-1))}function aT(c1){if(c1.line<0){return{line:0,ch:0}}if(c1.line>=cy.size){return{line:cy.size-1,ch:cF(cy.size-1).text.length}}var cZ=c1.ch,c0=cF(c1.line).text.length;if(cZ==null||cZ>c0){return{line:c1.line,ch:c0}}else{if(cZ<0){return{line:c1.line,ch:0}}else{return c1}}}function co(c2,c6){var c3=cW.inverted?cW.from:cW.to,c7=c3.line,cZ=c3.ch;var c5=cF(c7);function c0(){for(var c8=c7+c2,da=c2<0?-1:cy.size;c8!=da;c8+=c2){var c9=cF(c8);if(!c9.hidden){c7=c8;c5=c9;return true}}}function c4(c8){if(cZ==(c2<0?0:c5.text.length)){if(!c8&&c0()){cZ=c2<0?c5.text.length:0}else{return false}}else{cZ+=c2}return true}if(c6=="char"){c4()}else{if(c6=="column"){c4(true)}else{if(c6=="word"){var c1=false;for(;;){if(c2<0){if(!c4()){break}}if(ag(c5.text.charAt(cZ))){c1=true}else{if(c1){if(c2<0){c2=1;c4()}break}}if(c2>0){if(!c4()){break}}}}}}return{line:c7,ch:cZ}}function cE(cZ,c0){var c1=cZ<0?cW.from:cW.to;if(ci||ad(cW.from,cW.to)){c1=co(cZ,c0)}a6(c1.line,c1.ch,true)}function cm(cZ,c0){if(!ad(cW.from,cW.to)){bQ("",cW.from,cW.to)}else{if(cZ<0){bQ("",co(cZ,c0),cW.to)}else{bQ("",cW.from,co(cZ,c0))}}b6=true}var cv=null;function cx(cZ,c0){var c2=0,c3=cR(cW.inverted?cW.from:cW.to,true);if(cv!=null){c3.x=cv}if(c0=="page"){c2=Math.min(bk.clientHeight,window.innerHeight||document.documentElement.clientHeight)}else{if(c0=="line"){c2=bP()}}var c1=bH(c3.x,c3.y+c2*cZ+2);if(c0=="page"){bk.scrollTop+=cR(c1,true).y-c3.y}a6(c1.line,c1.ch,true);cv=c3.x}function bI(c2){var c0=cF(c2.line).text;var c1=c2.ch,cZ=c2.ch;while(c1>0&&ag(c0.charAt(c1-1))){--c1}while(cZ<c0.length&&ag(c0.charAt(cZ))){++cZ}bx({line:c2.line,ch:c1},{line:c2.line,ch:cZ})}function aK(cZ){bx({line:cZ,ch:0},aT({line:cZ+1,ch:0}))}function cB(c1){if(ad(cW.from,cW.to)){return by(cW.from.line,c1)}var c0=cW.to.line-(cW.to.ch?0:1);for(var cZ=cW.from.line;cZ<=c0;++cZ){by(cZ,c1)}}function by(c1,c8){if(!c8){c8="add"}if(c8=="smart"){if(!cb.indent){c8="prev"}else{var cZ=cu(c1)}}var c9=cF(c1),c3=c9.indentation(b1.tabSize),c0=c9.text.match(/^\s*/)[0],c5;if(c8=="prev"){if(c1){c5=cF(c1-1).indentation(b1.tabSize)}else{c5=0}}else{if(c8=="smart"){c5=cb.indent(cZ,c9.text.slice(c0.length),c9.text)}else{if(c8=="add"){c5=c3+b1.indentUnit}else{if(c8=="subtract"){c5=c3-b1.indentUnit}}}}c5=Math.max(0,c5);var c7=c5-c3;if(!c7){if(cW.from.line!=c1&&cW.to.line!=c1){return}var c6=c0}else{var c6="",c4=0;if(b1.indentWithTabs){for(var c2=Math.floor(c5/b1.tabSize);c2;--c2){c4+=b1.tabSize;c6+="\t"}}while(c4<c5){++c4;c6+=" "}}bQ(c6,{line:c1,ch:0},{line:c1,ch:c0.length})}function bT(){cb=u.getMode(b1,b1.mode);cy.iter(0,cy.size,function(cZ){cZ.stateAfter=null});ch=[0];bG()}function be(){var cZ=b1.gutter||b1.lineNumbers;aH.style.display=cZ?"":"none";if(cZ){aS=true}else{aq.parentNode.style.marginLeft=0}}function cG(c1,c0){if(b1.lineWrapping){aD.className+=" CodeMirror-wrap";var cZ=bk.clientWidth/bh()-3;cy.iter(0,cy.size,function(c2){if(c2.hidden){return}var c3=Math.ceil(c2.text.length/cZ)||1;if(c3!=1){a3(c2,c3)}});bu.style.width=bM.style.width=""}else{aD.className=aD.className.replace(" CodeMirror-wrap","");aF=null;bD="";cy.iter(0,cy.size,function(c2){if(c2.height!=1&&!c2.hidden){a3(c2,1)}if(c2.text.length>bD.length){bD=c2.text}})}aB.push({from:0,to:cy.size})}function a9(c0){var cZ=b1.tabSize-c0%b1.tabSize,c2=ap[cZ];if(c2){return c2}for(var c3='<span class="cm-tab">',c1=0;c1<cZ;++c1){c3+=" "}return(ap[cZ]={html:c3+"</span>",width:cZ})}function cD(){bk.className=bk.className.replace(/\s*cm-s-\S+/g,"")+b1.theme.replace(/(^|\s)\s*/g," cm-s-")}function cX(){this.set=[]}cX.prototype.clear=ar(function(){var c4=Infinity,c0=-Infinity;for(var c3=0,c6=this.set.length;c3<c6;++c3){var c1=this.set[c3],cZ=c1.marked;if(!cZ||!c1.parent){continue}var c5=Y(c1);c4=Math.min(c4,c5);c0=Math.max(c0,c5);for(var c2=0;c2<cZ.length;++c2){if(cZ[c2].marker==this){cZ.splice(c2--,1)}}}if(c4!=Infinity){aB.push({from:c4,to:c0+1})}});cX.prototype.find=function(){var c4,c5;for(var c1=0,c3=this.set.length;c1<c3;++c1){var c7=this.set[c1],c2=c7.marked;for(var c0=0;c0<c2.length;++c0){var cZ=c2[c0];if(cZ.marker==this){if(cZ.from!=null||cZ.to!=null){var c6=Y(c7);if(c6!=null){if(cZ.from!=null){c4={line:c6,ch:cZ.from}}if(cZ.to!=null){c5={line:c6,ch:cZ.to}}}}}}}return{from:c4,to:c5}};function bE(c5,c4,c1){c5=aT(c5);c4=aT(c4);var cZ=new cX();if(!Z(c5,c4)){return cZ}function c3(c6,c9,c8,c7){cF(c6).addMark(new K(c9,c8,c7,cZ))}if(c5.line==c4.line){c3(c5.line,c5.ch,c4.ch,c1)}else{c3(c5.line,c5.ch,null,c1);for(var c0=c5.line+1,c2=c4.line;c0<c2;++c0){c3(c0,null,null,c1)}c3(c4.line,null,c4.ch,c1)}aB.push({from:c5.line,to:c4.line+1});return cZ}function aU(c0){c0=aT(c0);var cZ=new G(c0.ch);cF(c0.line).addMark(cZ);return cZ}function bo(c4){c4=aT(c4);var c3=[],c1=cF(c4.line).marked;if(!c1){return c3}for(var c0=0,c2=c1.length;c0<c2;++c0){var cZ=c1[c0];if((cZ.from==null||cZ.from<=c4.ch)&&(cZ.to==null||cZ.to>=c4.ch)){c3.push(cZ.marker||cZ)}}return c3}function bV(cZ,c1,c0){if(typeof cZ=="number"){cZ=cF(bZ(cZ))}cZ.gutterMarker={text:c1,style:c0};aS=true;return cZ}function au(cZ){if(typeof cZ=="number"){cZ=cF(bZ(cZ))}cZ.gutterMarker=null;aS=true}function aX(c0,c2){var c1=c0,cZ=c0;if(typeof c0=="number"){cZ=cF(bZ(c0))}else{c1=Y(c0)}if(c1==null){return null}if(c2(cZ,c1)){aB.push({from:c1,to:c1+1})}else{return null}return cZ}function bl(c0,cZ,c1){return aX(c0,function(c2){if(c2.className!=cZ||c2.bgClassName!=c1){c2.className=cZ;c2.bgClassName=c1;return true}})}function cK(c0,cZ){return aX(c0,function(c1,c4){if(c1.hidden!=cZ){c1.hidden=cZ;a3(c1,cZ?0:1);var c3=cW.from.line,c2=cW.to.line;if(cZ&&(c3==c4||c2==c4)){var c6=c3==c4?bR({line:c3,ch:0},c3,0):cW.from;var c5=c2==c4?bR({line:c2,ch:0},c2,0):cW.to;if(!c5){return}bw(c6,c5)}return(aS=true)}})}function aV(c0){if(typeof c0=="number"){if(!br(c0)){return null}var c1=c0;c0=cF(c0);if(!c0){return null}}else{var c1=Y(c0);if(c1==null){return null}}var cZ=c0.gutterMarker;return{line:c1,handle:c0,text:c0.text,markerText:cZ&&cZ.text,markerClass:cZ&&cZ.style,lineClass:c0.className,bgClass:c0.bgClassName}}function ct(cZ){av.innerHTML="<pre><span>x</span></pre>";av.firstChild.firstChild.firstChild.nodeValue=cZ;return av.firstChild.firstChild.offsetWidth||10}function aG(db,c5){if(c5<=0){return 0}var c2=cF(db),c8=c2.text;function c9(dc){return b5(c2,dc).left}var c6=0,c4=0,c7=c8.length,c3;var c0=Math.min(c7,Math.ceil(c5/bh()));for(;;){var c1=c9(c0);if(c1<=c5&&c0<c7){c0=Math.min(c7,Math.ceil(c0*1.2))}else{c3=c1;c7=c0;break}}if(c5>c3){return c7}c0=Math.floor(c7*0.8);c1=c9(c0);if(c1<c5){c6=c0;c4=c1}for(;;){if(c7-c6<=1){return(c3-c5>c5-c4)?c6:c7}var da=Math.ceil((c6+c7)/2),cZ=c9(da);if(cZ>c5){c7=da;c3=cZ}else{c6=da;c4=cZ}}}var cz="CodeMirror-temp-"+Math.floor(Math.random()*16777215).toString(16);function b5(c0,c3){if(c3==0){return{top:0,left:0}}var cZ=b1.lineWrapping&&c3<c0.text.length&&o.test(c0.text.slice(c3-1,c3+1));av.innerHTML="<pre>"+c0.getHTML(a9,c3,cz,cZ)+"</pre>";var c2=document.getElementById(cz);var c5=c2.offsetTop,c4=c2.offsetLeft;if(I&&c5==0&&c4==0){var c1=document.createElement("span");c1.innerHTML="x";c2.parentNode.insertBefore(c1,c2.nextSibling);c5=c1.offsetTop}return{top:c5,left:c4}}function cR(c4,c2){var cZ,c0=bP(),c3=c0*(g(cy,c4.line)-(c2?bd:0));if(c4.ch==0){cZ=0}else{var c1=b5(cF(c4.line),c4.ch);cZ=c1.left;if(b1.lineWrapping){c3+=Math.max(0,c1.top)}}return{x:cZ,y:c3,yBot:c3+c0}}function bH(c8,c7){if(c7<0){c7=0}var c5=bP(),c3=bh(),de=bd+Math.floor(c7/c5);var c9=X(cy,de);if(c9>=cy.size){return{line:cy.size-1,ch:cF(cy.size-1).text.length}}var c0=cF(c9),db=c0.text;var dg=b1.lineWrapping,c6=dg?de-g(cy,c9):0;if(c8<=0&&c6==0){return{line:c9,ch:0}}function df(di){var dj=b5(c0,di);if(dg){var dk=Math.round(dj.top/c5);return Math.max(0,dj.left+(dk-c6)*bk.clientWidth)}return dj.left}var dd=0,dc=0,c1=db.length,cZ;var da=Math.min(c1,Math.ceil((c8+c6*bk.clientWidth*0.9)/c3));for(;;){var c4=df(da);if(c4<=c8&&da<c1){da=Math.min(c1,Math.ceil(da*1.2))}else{cZ=c4;c1=da;break}}if(c8>cZ){return{line:c9,ch:c1}}da=Math.floor(c1*0.8);c4=df(da);if(c4<c8){dd=da;dc=c4}for(;;){if(c1-dd<=1){return{line:c9,ch:(cZ-c8>c8-dc)?dd:c1}}var dh=Math.ceil((dd+c1)/2),c2=df(dh);if(c2>c8){c1=dh;cZ=c2}else{dd=dh;dc=c2}}}function ao(c1){var cZ=cR(c1,true),c0=ak(bu);return{x:c0.left+cZ.x,y:c0.top+cZ.y,yBot:c0.top+cZ.yBot}}var a0,ax,bU;function bP(){if(bU==null){bU="<pre>";for(var c0=0;c0<49;++c0){bU+="x<br/>"}bU+="x</pre>"}var cZ=aq.clientHeight;if(cZ==ax){return a0}ax=cZ;av.innerHTML=bU;a0=av.firstChild.offsetHeight/50||1;av.innerHTML="";return a0}var cS,bv=0;function bh(){if(bk.clientWidth==bv){return cS}bv=bk.clientWidth;return(cS=ct("x"))}function cr(){return bu.offsetTop}function a5(){return bu.offsetLeft}function a2(c3,c2){var c1=ak(bk,true),cZ,c4;try{cZ=c3.clientX;c4=c3.clientY}catch(c3){return null}if(!c2&&(cZ-c1.left>bk.clientWidth||c4-c1.top>bk.clientHeight)){return null}var c0=ak(bu,true);return bH(cZ-c0.left,c4-c0.top)}function a1(c0){var c5=a2(c0),c4=bk.scrollTop;if(!c5||window.opera){return}if(ad(cW.from,cW.to)||Z(c5,cW.from)||!Z(c5,cW.to)){ar(a6)(c5.line,c5.ch)}var c3=bm.style.cssText;bX.style.position="absolute";bm.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(c0.clientY-5)+"px; left: "+(c0.clientX-5)+"px; z-index: 1000; background: white; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";bf=true;var c2=bm.value=b3();bz();a(bm);function cZ(){var c6=A(bm.value).join("\n");if(c6!=c2){ar(bs)(c6,"end")}bX.style.position="relative";bm.style.cssText=c3;if(B){bk.scrollTop=c4}bf=false;cC(true);am()}if(N){w(c0);var c1=r(window,"mouseup",function(){c1();setTimeout(cZ,20)},true)}else{setTimeout(cZ,50)}}function cM(){clearInterval(cP);var cZ=true;bc.style.visibility="";cP=setInterval(function(){bc.style.visibility=(cZ=!cZ)?"":"hidden"},650)}var bp={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};function ce(c5){var cZ=cW.inverted?cW.from:cW.to,c7=cF(cZ.line),c0=cZ.ch-1;var c4=(c0>=0&&bp[c7.text.charAt(c0)])||bp[c7.text.charAt(++c0)];if(!c4){return}var c8=c4.charAt(0),c6=c4.charAt(1)==">",di=c6?1:-1,dd=c7.styles;for(var dj=c0+1,df=0,dh=dd.length;df<dh;df+=2){if((dj-=dd[df].length)<=0){var dg=dd[df+1];break}}var c2=[c7.text.charAt(c0)],dc=/[(){}[\]]/;function da(dw,dr,ds){if(!dw.text){return}var dv=dw.styles,dq=c6?0:dw.text.length-1,dt;for(var dm=c6?0:dv.length-2,dp=c6?dv.length:-2;dm!=dp;dm+=2*di){var du=dv[dm];if(dv[dm+1]!=null&&dv[dm+1]!=dg){dq+=di*du.length;continue}for(var dl=c6?0:du.length-1,dk=c6?du.length:-1;dl!=dk;dl+=di,dq+=di){if(dq>=dr&&dq<ds&&dc.test(dt=du.charAt(dl))){var dn=bp[dt];if(dn.charAt(1)==">"==c6){c2.push(dt)}else{if(c2.pop()!=dn.charAt(0)){return{pos:dq,match:false}}else{if(!c2.length){return{pos:dq,match:true}}}}}}}}for(var df=cZ.line,dh=c6?Math.min(df+100,cy.size):Math.max(-1,df-100);df!=dh;df+=di){var c7=cF(df),c3=df==cZ.line;var c9=da(c7,c3&&c6?c0+1:0,c3&&!c6?c0:c7.text.length);if(c9){break}}if(!c9){c9={pos:null,match:false}}var dg=c9.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";var de=bE({line:cZ.line,ch:c0},{line:cZ.line,ch:c0+1},dg),c1=c9.pos!=null&&bE({line:df,ch:c9.pos},{line:df,ch:c9.pos+1},dg);var db=ar(function(){de.clear();c1&&c1.clear()});if(c5){setTimeout(db,800)}else{b4=db}}function a7(c5){var c4,c1;for(var c0=c5,c2=c5-40;c0>c2;--c0){if(c0==0){return 0}var cZ=cF(c0-1);if(cZ.stateAfter){return c0}var c3=cZ.indentation(b1.tabSize);if(c1==null||c4>c3){c1=c0-1;c4=c3}}return c1}function cu(c1){var c0=a7(c1),cZ=c0&&cF(c0-1).stateAfter;if(!cZ){cZ=V(cb)}else{cZ=p(cb,cZ)}cy.iter(c0,c1,function(c2){c2.highlight(cb,cZ,b1.tabSize);c2.stateAfter=p(cb,cZ)});if(c0<c1){aB.push({from:c0,to:c1})}if(c1<cy.size&&!cF(c1).stateAfter){ch.push(c1)}return cZ}function cH(c1,cZ){var c0=cu(c1);cy.iter(c1,cZ,function(c2){c2.highlight(cb,c0,b1.tabSize);c2.stateAfter=p(cb,c0)})}function bS(){var c5=+new Date+b1.workTime;var c8=ch.length;while(ch.length){if(!cF(cQ).stateAfter){var c2=cQ}else{var c2=ch.pop()}if(c2>=cy.size){continue}var c0=a7(c2),cZ=c0&&cF(c0-1).stateAfter;if(cZ){cZ=p(cb,cZ)}else{cZ=V(cb)}var c4=0,c1=cb.compareStates,c7=false,c6=c0,c3=false;cy.iter(c6,cy.size,function(da){var db=da.stateAfter;if(+new Date>c5){ch.push(c6);bG(b1.workDelay);if(c7){aB.push({from:c2,to:c6+1})}return(c3=true)}var dc=da.highlight(cb,cZ,b1.tabSize);if(dc){c7=true}da.stateAfter=p(cb,cZ);var c9=null;if(c1){var dd=db&&c1(db,cZ);if(dd!=ab){c9=!!dd}}if(c9==null){if(dc!==false||!db){c4=0}else{if(++c4>3&&(!cb.indent||cb.indent(db,"")==cb.indent(cZ,""))){c9=true}}}if(c9){return true}++c6});if(c3){return}if(c7){aB.push({from:c2,to:c6+1})}}if(c8&&b1.onHighlightComplete){b1.onHighlightComplete(b9)}}function bG(cZ){if(!ch.length){return}aw.set(cZ,ar(bS))}function aN(){cp=b6=cN=null;aB=[];aP=false;cA=[]}function ay(){var c3=false,c0;if(aP){c3=!cf()}if(aB.length){c0=cd(aB,true)}else{if(aP){cV()}if(aS){aL()}}if(c3){cf()}if(aP){cY();cM()}if(cj&&!bf&&(cp===true||(cp!==false&&aP))){cC(b6)}if(aP&&b1.matchBrackets){setTimeout(ar(function(){if(b4){b4();b4=null}if(ad(cW.from,cW.to)){ce(false)}}),20)}var cZ=cN,c1=cA;if(aP&&b1.onCursorActivity){b1.onCursorActivity(b9)}if(cZ&&b1.onChange&&b9){b1.onChange(b9,cZ)}for(var c2=0;c2<c1.length;++c2){c1[c2](b9)}if(c0&&b1.onUpdate){b1.onUpdate(b9)}}var cq=0;function ar(cZ){return function(){if(!cq++){aN()}try{var c0=cZ.apply(this,arguments)}finally{if(!--cq){ay()}}return c0}}function bO(cZ){a8.startCompound();try{return cZ()}finally{a8.endCompound()}}for(var bJ in ac){if(ac.propertyIsEnumerable(bJ)&&!b9.propertyIsEnumerable(bJ)){b9[bJ]=ac[bJ]}}return b9}u.defaults={value:"",mode:null,theme:"default",indentUnit:2,indentWithTabs:false,smartIndent:true,tabSize:4,keyMap:"default",extraKeys:null,electricChars:true,autoClearEmptyLines:false,onKeyEvent:null,onDragEvent:null,lineWrapping:false,lineNumbers:false,gutter:false,fixedGutter:false,firstLineNumber:1,readOnly:false,dragDrop:true,onChange:null,onCursorActivity:null,onGutterClick:null,onHighlightComplete:null,onUpdate:null,onFocus:null,onBlur:null,onScroll:null,matchBrackets:false,workTime:100,workDelay:200,pollInterval:100,undoDepth:40,tabindex:null,autofocus:null};var s=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent);var M=s||/Mac/.test(navigator.platform);var U=/Win/.test(navigator.platform);var aj=u.modes={},S=u.mimeModes={};u.defineMode=function(am,ao){if(!u.defaults.mode&&am!="null"){u.defaults.mode=am}if(arguments.length>2){ao.dependencies=[];for(var an=2;an<arguments.length;++an){ao.dependencies.push(arguments[an])}}aj[am]=ao};u.defineMIME=function(an,am){S[an]=am};u.resolveMode=function(am){if(typeof am=="string"&&S.hasOwnProperty(am)){am=S[am]}else{if(typeof am=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(am)){return u.resolveMode("application/xml")}}if(typeof am=="string"){return{name:am}}else{return am||{name:"null"}}};u.getMode=function(an,am){var am=u.resolveMode(am);var ao=aj[am.name];if(!ao){return u.getMode(an,"text/plain")}return ao(an,am)};u.listModes=function(){var an=[];for(var am in aj){if(aj.propertyIsEnumerable(am)){an.push(am)}}return an};u.listMIMEs=function(){var an=[];for(var am in S){if(S.propertyIsEnumerable(am)){an.push({mime:am,mode:S[am]})}}return an};var ac=u.extensions={};u.defineExtension=function(am,an){ac[am]=an};var L=u.commands={selectAll:function(am){am.setSelection({line:0,ch:0},{line:am.lineCount()-1})},killLine:function(am){var ap=am.getCursor(true),ao=am.getCursor(false),an=!ad(ap,ao);if(!an&&am.getLine(ap.line).length==ap.ch){am.replaceRange("",ap,{line:ap.line+1,ch:0})}else{am.replaceRange("",ap,an?ao:{line:ap.line})}},deleteLine:function(am){var an=am.getCursor().line;am.replaceRange("",{line:an,ch:0},{line:an})},undo:function(am){am.undo()},redo:function(am){am.redo()},goDocStart:function(am){am.setCursor(0,0,true)},goDocEnd:function(am){am.setSelection({line:am.lineCount()-1},null,true)},goLineStart:function(am){am.setCursor(am.getCursor().line,0,true)},goLineStartSmart:function(am){var ap=am.getCursor();var ao=am.getLine(ap.line),an=Math.max(0,ao.search(/\S/));am.setCursor(ap.line,ap.ch<=an&&ap.ch?0:an,true)},goLineEnd:function(am){am.setSelection({line:am.getCursor().line},null,true)},goLineUp:function(am){am.moveV(-1,"line")},goLineDown:function(am){am.moveV(1,"line")},goPageUp:function(am){am.moveV(-1,"page")},goPageDown:function(am){am.moveV(1,"page")},goCharLeft:function(am){am.moveH(-1,"char")},goCharRight:function(am){am.moveH(1,"char")},goColumnLeft:function(am){am.moveH(-1,"column")},goColumnRight:function(am){am.moveH(1,"column")},goWordLeft:function(am){am.moveH(-1,"word")},goWordRight:function(am){am.moveH(1,"word")},delCharLeft:function(am){am.deleteH(-1,"char")},delCharRight:function(am){am.deleteH(1,"char")},delWordLeft:function(am){am.deleteH(-1,"word")},delWordRight:function(am){am.deleteH(1,"word")},indentAuto:function(am){am.indentSelection("smart")},indentMore:function(am){am.indentSelection("add")},indentLess:function(am){am.indentSelection("subtract")},insertTab:function(am){am.replaceSelection("\t","end")},transposeChars:function(am){var ao=am.getCursor(),an=am.getLine(ao.line);if(ao.ch>0&&ao.ch<an.length-1){am.replaceRange(an.charAt(ao.ch)+an.charAt(ao.ch-1),{line:ao.line,ch:ao.ch-1},{line:ao.line,ch:ao.ch+1})}},newlineAndIndent:function(am){am.replaceSelection("\n","end");am.indentLine(am.getCursor().line)},toggleOverwrite:function(am){am.toggleOverwrite()}};var v=u.keyMap={};v.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharRight",Backspace:"delCharLeft",Tab:"insertTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite"};v.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Alt-Up":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Down":"goDocEnd","Ctrl-Left":"goWordLeft","Ctrl-Right":"goWordRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delWordLeft","Ctrl-Delete":"delWordRight","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore",fallthrough:"basic"};v.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goWordLeft","Alt-Right":"goWordRight","Cmd-Left":"goLineStart","Cmd-Right":"goLineEnd","Alt-Backspace":"delWordLeft","Ctrl-Alt-Backspace":"delWordRight","Alt-Delete":"delWordRight","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore",fallthrough:["basic","emacsy"]};v["default"]=M?v.macDefault:v.pcDefault;v.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageUp","Shift-Ctrl-V":"goPageDown","Ctrl-D":"delCharRight","Ctrl-H":"delCharLeft","Alt-D":"delWordRight","Alt-Backspace":"delWordLeft","Ctrl-K":"killLine","Ctrl-T":"transposeChars"};function c(am){if(typeof am=="string"){return v[am]}else{return am}}function l(an,am,ar,ap,ao){function aq(ax){ax=c(ax);var av=ax[an];if(av!=null&&ap(av)){return true}if(ax.nofallthrough){if(ao){ao()}return true}var au=ax.fallthrough;if(au==null){return false}if(Object.prototype.toString.call(au)!="[object Array]"){return aq(au)}for(var at=0,aw=au.length;at<aw;++at){if(aq(au[at])){return true}}return false}if(am&&aq(am)){return true}return aq(ar)}function Q(an){var am=R[y(an,"keyCode")];return am=="Ctrl"||am=="Alt"||am=="Shift"||am=="Mod"}u.fromTextArea=function(an,ap){if(!ap){ap={}}ap.value=an.value;if(!ap.tabindex&&an.tabindex){ap.tabindex=an.tabindex}if(ap.autofocus==null&&an.getAttribute("autofocus")!=null){ap.autofocus=true}function ar(){an.value=am.getValue()}if(an.form){var aq=r(an.form,"submit",ar,true);if(typeof an.form.submit=="function"){var ao=an.form.submit;function at(){ar();an.form.submit=ao;an.form.submit();an.form.submit=at}an.form.submit=at}}an.style.display="none";var am=u(function(au){an.parentNode.insertBefore(au,an.nextSibling)},ap);am.save=ar;am.getTextArea=function(){return an};am.toTextArea=function(){ar();an.parentNode.removeChild(am.getWrapperElement());an.style.display="";if(an.form){aq();if(typeof an.form.submit=="function"){an.form.submit=ao}}};return am};function p(ap,am){if(am===true){return am}if(ap.copyState){return ap.copyState(am)}var ao={};for(var aq in am){var an=am[aq];if(an instanceof Array){an=an.concat([])}ao[aq]=an}return ao}u.copyState=p;function V(ao,an,am){return ao.startState?ao.startState(an,am):true}u.startState=V;function b(am,an){this.pos=this.start=0;this.string=am;this.tabSize=an||8}b.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==0},peek:function(){return this.string.charAt(this.pos)},next:function(){if(this.pos<this.string.length){return this.string.charAt(this.pos++)}},eat:function(am){var ao=this.string.charAt(this.pos);if(typeof am=="string"){var an=ao==am}else{var an=ao&&(am.test?am.test(ao):am(ao))}if(an){++this.pos;return ao}},eatWhile:function(am){var an=this.pos;while(this.eat(am)){}return this.pos>an},eatSpace:function(){var am=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++this.pos}return this.pos>am},skipToEnd:function(){this.pos=this.string.length},skipTo:function(am){var an=this.string.indexOf(am,this.pos);if(an>-1){this.pos=an;return true}},backUp:function(am){this.pos-=am},column:function(){return n(this.string,this.start,this.tabSize)},indentation:function(){return n(this.string,null,this.tabSize)},match:function(ap,an,am){if(typeof ap=="string"){function aq(ar){return am?ar.toLowerCase():ar}if(aq(this.string).indexOf(aq(ap),this.pos)==this.pos){if(an!==false){this.pos+=ap.length}return true}}else{var ao=this.string.slice(this.pos).match(ap);if(ao&&an!==false){this.pos+=ao[0].length}return ao}},current:function(){return this.string.slice(this.start,this.pos)}};u.StringStream=b;function K(ap,ao,an,am){this.from=ap;this.to=ao;this.style=an;this.marker=am}K.prototype={attach:function(am){this.marker.set.push(am)},detach:function(an){var am=q(this.marker.set,an);if(am>-1){this.marker.set.splice(am,1)}},split:function(ap,am){if(this.to<=ap&&this.to!=null){return null}var ao=this.from<ap||this.from==null?null:this.from-ap+am;var an=this.to==null?null:this.to-ap+am;return new K(ao,an,this.style,this.marker)},dup:function(){return new K(null,null,this.style,this.marker)},clipTo:function(an,aq,am,ap,ao){if(an&&ap>this.from&&(ap<this.to||this.to==null)){this.from=null}else{if(this.from!=null&&this.from>=aq){this.from=Math.max(ap,this.from)+ao}}if(am&&(aq<this.to||this.to==null)&&(aq>this.from||this.from==null)){this.to=null}else{if(this.to!=null&&this.to>aq){this.to=ap<this.to?this.to+ao:aq}}},isDead:function(){return this.from!=null&&this.to!=null&&this.from>=this.to},sameSet:function(am){return this.marker==am.marker}};function G(am){this.from=am;this.to=am;this.line=null}G.prototype={attach:function(am){this.line=am},detach:function(am){if(this.line==am){this.line=null}},split:function(an,am){if(an<this.from){this.from=this.to=(this.from-an)+am;return this}},isDead:function(){return this.from>this.to},clipTo:function(an,aq,am,ap,ao){if((an||aq<this.from)&&(am||ap>this.to)){this.from=0;this.to=-1}else{if(this.from>aq){this.from=this.to=Math.max(ap,this.from)+ao}}},sameSet:function(am){return false},find:function(){if(!this.line||!this.line.parent){return null}return{line:Y(this.line),ch:this.from}},clear:function(){if(this.line){var am=q(this.line.marked,this);if(am!=-1){this.line.marked.splice(am,1)}this.line=null}}};function e(an,am){this.styles=am||[an,null];this.text=an;this.height=1;this.marked=this.gutterMarker=this.className=this.bgClassName=this.handlers=null;this.stateAfter=this.parent=this.hidden=null}e.inheritMarks=function(aq,au){var ap=new e(aq),am=au&&au.marked;if(am){for(var ao=0;ao<am.length;++ao){if(am[ao].to==null&&am[ao].style){var an=ap.marked||(ap.marked=[]),at=am[ao];var ar=at.dup();an.push(ar);ar.attach(ap)}}}return ap};e.prototype={replace:function(aq,ap,au){var av=[],ao=this.marked,ar=ap==null?this.text.length:ap;al(0,aq,this.styles,av);if(au){av.push(au,null)}al(ar,this.text.length,this.styles,av);this.styles=av;this.text=this.text.slice(0,aq)+au+this.text.slice(ar);this.stateAfter=null;if(ao){var at=au.length-(ar-aq);for(var an=0;an<ao.length;++an){var am=ao[an];am.clipTo(aq==null,aq||0,ap==null,ar,at);if(am.isDead()){am.detach(this);ao.splice(an--,1)}}}},split:function(au,ar){var ap=[ar,null],an=this.marked;al(au,this.text.length,this.styles,ap);var ao=new e(ar+this.text.slice(au),ap);if(an){for(var aq=0;aq<an.length;++aq){var at=an[aq];var am=at.split(au,ar.length);if(am){if(!ao.marked){ao.marked=[]}ao.marked.push(am);am.attach(ao);if(am==at){an.splice(aq--,1)}}}}return ao},append:function(an){var at=this.text.length,am=an.marked,aq=this.marked;this.text+=an.text;al(0,an.text.length,an.styles,this.styles);if(aq){for(var ar=0;ar<aq.length;++ar){if(aq[ar].to==null){aq[ar].to=at}}}if(am&&am.length){if(!aq){this.marked=aq=[]}outer:for(var ar=0;ar<am.length;++ar){var au=am[ar];if(!au.from){for(var ap=0;ap<aq.length;++ap){var ao=aq[ap];if(ao.to==at&&ao.sameSet(au)){ao.to=au.to==null?null:au.to+at;if(ao.isDead()){ao.detach(this);am.splice(ar--,1)}continue outer}}}aq.push(au);au.attach(this);au.from+=at;if(au.to!=null){au.to+=at}}}},fixMarkEnds:function(an){var am=this.marked,aq=an.marked;if(!am){return}for(var ap=0;ap<am.length;++ap){var at=am[ap],ar=at.to==null;if(ar&&aq){for(var ao=0;ao<aq.length;++ao){if(aq[ao].sameSet(at)){ar=false;break}}}if(ar){at.to=this.text.length}}},fixMarkStarts:function(){var am=this.marked;if(!am){return}for(var an=0;an<am.length;++an){if(am[an].from==null){am[an].from=0}}},addMark:function(am){am.attach(this);if(this.marked==null){this.marked=[]}this.marked.push(am);this.marked.sort(function(ao,an){return(ao.from||0)-(an.from||0)})},highlight:function(ar,an,at){var aw=new b(this.text,at),ax=this.styles,au=0;var aq=false,ao=ax[0],av;if(this.text==""&&ar.blankLine){ar.blankLine(an)}while(!aw.eol()){var am=ar.token(aw,an);var ap=this.text.slice(aw.start,aw.pos);aw.start=aw.pos;if(au&&ax[au-1]==am){ax[au-2]+=ap}else{if(ap){if(!aq&&(ax[au+1]!=am||(au&&ax[au-2]!=av))){aq=true}ax[au++]=ap;ax[au++]=am;av=ao;ao=ax[au]}}if(aw.pos>5000){ax[au++]=this.text.slice(aw.pos);ax[au++]=null;break}}if(ax.length!=au){ax.length=au;aq=true}if(au&&ax[au-2]!=av){aq=true}return aq||(ax.length<5&&this.text.length<10?null:false)},getTokenAt:function(ar,ap,ao){var am=this.text,aq=new b(am);while(aq.pos<ao&&!aq.eol()){aq.start=aq.pos;var an=ar.token(aq,ap)}return{start:aq.start,end:aq.pos,string:aq.current(),className:an||null,state:ap}},indentation:function(am){return n(this.text,null,am)},getHTML:function(aM,am,ao,aq){var ax=[],av=true,at=0;function aI(aY,aW){if(!aY){return}if(av&&I&&aY.charAt(0)==" "){aY="\u00a0"+aY.slice(1)}av=false;if(aY.indexOf("\t")==-1){at+=aY.length;var aX=P(aY)}else{var aX="";for(var aZ=0;;){var aU=aY.indexOf("\t",aZ);if(aU==-1){aX+=P(aY.slice(aZ));at+=aY.length-aZ;break}else{at+=aU-aZ;var aV=aM(at);aX+=P(aY.slice(aZ,aU))+aV.html;at+=aV.width;aZ=aU+1}}}if(aW){ax.push('<span class="',aW,'">',aX,"</span>")}else{ax.push(aX)}}var aL=aI;if(am!=null){var aG=0,aB='<span id="'+ao+'">';aL=function(aW,aV){var aU=aW.length;if(am>=aG&&am<aG+aU){if(am>aG){aI(aW.slice(0,am-aG),aV);if(aq){ax.push("<wbr>")}}ax.push(aB);aI(aW.slice(am-aG),aV);ax.push("</span>");am--;aG+=aU}else{aG+=aU;aI(aW,aV);if(aG==am&&aG==aQ){ax.push(aB+"</span>")}else{if(aG>am+10&&/\s/.test(aW)){aL=function(){}}}}}}var aF=this.styles,aw=this.text,aC=this.marked;var aQ=aw.length;function ar(aU){if(!aU){return null}return"cm-"+aU.replace(/ +/g," cm-")}if(!aw&&am==null){aL(" ")}else{if(!aC||!aC.length){for(var aN=0,ay=0;ay<aQ;aN+=2){var aE=aF[aN],aP=aF[aN+1],aH=aE.length;if(ay+aH>aQ){aE=aE.slice(0,aQ-ay)}ay+=aH;aL(aE,ar(aP))}}else{var au=0,aN=0,aA="",aP,aT=0;var aS=aC[0].from||0,aK=[],aR=0;function aO(){var aU;while(aR<aC.length&&((aU=aC[aR]).from==au||aU.from==null)){if(aU.style!=null){aK.push(aU)}++aR}aS=aR<aC.length?aC[aR].from:Infinity;for(var aV=0;aV<aK.length;++aV){var aW=aK[aV].to||Infinity;if(aW==au){aK.splice(aV--,1)}else{aS=Math.min(aW,aS)}}}var aD=0;while(au<aQ){if(aS==au){aO()}var az=Math.min(aQ,aS);while(true){if(aA){var ap=au+aA.length;var an=aP;for(var aJ=0;aJ<aK.length;++aJ){an=(an?an+" ":"")+aK[aJ].style}aL(ap>az?aA.slice(0,az-au):aA,an);if(ap>=az){aA=aA.slice(az-au);au=az;break}au=ap}aA=aF[aN++];aP=ar(aF[aN++])}}}}return ax.join("")},cleanUp:function(){this.parent=null;if(this.marked){for(var am=0,an=this.marked.length;am<an;++am){this.marked[am].detach(this)}}}};function al(at,au,am,av){for(var aq=0,ar=0,an=0;ar<au;aq+=2){var ao=am[aq],ap=ar+ao.length;if(an==0){if(ap>at){av.push(ao.slice(at-ar,Math.min(ao.length,au-ar)),am[aq+1])}if(ap>=at){an=1}}else{if(an==1){if(ap>au){av.push(ao.slice(0,au-ar),am[aq+1])}else{av.push(ao,am[aq+1])}}}ar=ap}}function ah(an){this.lines=an;this.parent=null;for(var ao=0,ap=an.length,am=0;ao<ap;++ao){an[ao].parent=this;am+=an[ao].height}this.height=am}ah.prototype={chunkSize:function(){return this.lines.length},remove:function(am,au,aq){for(var ap=am,ar=am+au;ap<ar;++ap){var an=this.lines[ap];this.height-=an.height;an.cleanUp();if(an.handlers){for(var ao=0;ao<an.handlers.length;++ao){aq.push(an.handlers[ao])}}}this.lines.splice(am,au)},collapse:function(am){am.splice.apply(am,[am.length,0].concat(this.lines))},insertHeight:function(an,ao,am){this.height+=am;if(I){this.lines=this.lines.slice(0,an).concat(ao).concat(this.lines.slice(an))}else{this.lines.splice.apply(this.lines,[an,0].concat(ao))}for(var ap=0,aq=ao.length;ap<aq;++ap){ao[ap].parent=this}},iterN:function(am,ap,ao){for(var an=am+ap;am<an;++am){if(ao(this.lines[am])){return true}}}};function i(ap){this.children=ap;var ao=0,am=0;for(var an=0,ar=ap.length;an<ar;++an){var aq=ap[an];ao+=aq.chunkSize();am+=aq.height;aq.parent=this}this.size=ao;this.height=am;this.parent=null}i.prototype={chunkSize:function(){return this.size},remove:function(ao,an,ar){this.size-=an;for(var ap=0;ap<this.children.length;++ap){var am=this.children[ap],au=am.chunkSize();if(ao<au){var aq=Math.min(an,au-ao),av=am.height;am.remove(ao,aq,ar);this.height-=av-am.height;if(au==aq){this.children.splice(ap--,1);am.parent=null}if((an-=aq)==0){break}ao=0}else{ao-=au}}if(this.size-an<25){var aw=[];this.collapse(aw);this.children=[new ah(aw)];this.children[0].parent=this}},collapse:function(am){for(var an=0,ao=this.children.length;an<ao;++an){this.children[an].collapse(am)}},insert:function(an,ao){var am=0;for(var ap=0,aq=ao.length;ap<aq;++ap){am+=ao[ap].height}this.insertHeight(an,ao,am)},insertHeight:function(an,aw,av){this.size+=aw.length;this.height+=av;for(var ao=0,aq=this.children.length;ao<aq;++ao){var am=this.children[ao],ar=am.chunkSize();if(an<=ar){am.insertHeight(an,aw,av);if(am.lines&&am.lines.length>50){while(am.lines.length>50){var ap=am.lines.splice(am.lines.length-25,25);var au=new ah(ap);am.height-=au.height;this.children.splice(ao+1,0,au);au.parent=this}this.maybeSpill()}break}an-=ar}},maybeSpill:function(){if(this.children.length<=10){return}var ap=this;do{var an=ap.children.splice(ap.children.length-5,5);var ao=new i(an);if(!ap.parent){var aq=new i(ap.children);aq.parent=ap;ap.children=[aq,ao];ap=aq}else{ap.size-=ao.size;ap.height-=ao.height;var am=q(ap.parent.children,ap);ap.parent.children.splice(am+1,0,ao)}ao.parent=ap.parent}while(ap.children.length>10);ap.parent.maybeSpill()},iter:function(ao,an,am){this.iterN(ao,an-ao,am)},iterN:function(am,av,au){for(var an=0,aq=this.children.length;an<aq;++an){var ar=this.children[an],ap=ar.chunkSize();if(am<ap){var ao=Math.min(av,ap-am);if(ar.iterN(am,ao,au)){return true}if((av-=ao)==0){break}am=0}else{am-=ap}}}};function C(am,aq){while(!am.lines){for(var an=0;;++an){var ap=am.children[an],ao=ap.chunkSize();if(aq<ao){am=ap;break}aq-=ao}}return am.lines[aq]}function Y(am){if(am.parent==null){return null}var ar=am.parent,aq=q(ar.lines,am);for(var an=ar.parent;an;ar=an,an=an.parent){for(var ao=0,ap=an.children.length;;++ao){if(an.children[ao]==ar){break}aq+=an.children[ao].chunkSize()}}return aq}function X(at,aq){var ao=0;outer:do{for(var ap=0,ar=at.children.length;ap<ar;++ap){var an=at.children[ap],am=an.height;if(aq<am){at=an;continue outer}aq-=am;ao+=an.chunkSize()}return ao}while(!at.lines);for(var ap=0,ar=at.lines.length;ap<ar;++ap){var av=at.lines[ap],au=av.height;if(aq<au){break}aq-=au}return ao+ap}function g(am,at){var ao=0;outer:do{for(var an=0,aq=am.children.length;an<aq;++an){var ar=am.children[an],ap=ar.chunkSize();if(at<ap){am=ar;continue outer}at-=ap;ao+=ar.height}return ao}while(!am.lines);for(var an=0;an<at;++an){ao+=am.lines[an].height}return ao}function k(){this.time=0;this.done=[];this.undone=[];this.compound=0;this.closed=false}k.prototype={addChange:function(am,ar,an){this.undone.length=0;var ao=+new Date,au=this.done[this.done.length-1],av=au&&au[au.length-1];var aq=ao-this.time;if(this.compound&&au&&!this.closed){au.push({start:am,added:ar,old:an})}else{if(aq>400||!av||this.closed||av.start>am+an.length||av.start+av.added<am){this.done.push([{start:am,added:ar,old:an}]);this.closed=false}else{var at=Math.max(0,av.start-am),aw=Math.max(0,(am+an.length)-(av.start+av.added));for(var ap=at;ap>0;--ap){av.old.unshift(an[ap-1])}for(var ap=aw;ap>0;--ap){av.old.push(an[an.length-ap])}if(at){av.start=am}av.added+=ar-(an.length-at-aw)}}this.time=ao},startCompound:function(){if(!this.compound++){this.closed=true}},endCompound:function(){if(!--this.compound){this.closed=true}}};function J(){w(this)}function O(am){if(!am.stop){am.stop=J}return am}function T(am){if(am.preventDefault){am.preventDefault()}else{am.returnValue=false}}function D(am){if(am.stopPropagation){am.stopPropagation()}else{am.cancelBubble=true}}function w(am){T(am);D(am)}u.e_stop=w;u.e_preventDefault=T;u.e_stopPropagation=D;function j(am){return am.target||am.srcElement}function x(am){if(am.which){return am.which}else{if(am.button&1){return 1}else{if(am.button&2){return 3}else{if(am.button&4){return 2}}}}}function y(an,ao){var am=an.override&&an.override.hasOwnProperty(ao);return am?an.override[ao]:an[ao]}function r(ap,ao,an,am){if(typeof ap.addEventListener=="function"){ap.addEventListener(ao,an,false);if(am){return function(){ap.removeEventListener(ao,an,false)}}}else{var aq=function(ar){an(ar||window.event)};ap.attachEvent("on"+ao,aq);if(am){return function(){ap.detachEvent("on"+ao,aq)}}}}u.connect=r;function z(){this.id=null}z.prototype={set:function(am,an){clearTimeout(this.id);this.id=setTimeout(an,am)}};var ab=u.Pass={toString:function(){return"CodeMirror.Pass"}};var N=/gecko\/\d{7}/i.test(navigator.userAgent);var I=/MSIE \d/.test(navigator.userAgent);var B=/MSIE [1-8]\b/.test(navigator.userAgent);var E=I&&document.documentMode==5;var f=/WebKit\//.test(navigator.userAgent);var af=/Chrome\//.test(navigator.userAgent);var h=/Apple Computer/.test(navigator.vendor);var m=/KHTML\//.test(navigator.userAgent);var F=function(){if(B){return false}var am=document.createElement("div");return"draggable" in am||"dragDrop" in am}();var d=function(){var am=document.createElement("textarea");am.value="foo\nbar";if(am.value.indexOf("\r")>-1){return"\r\n"}return"\n"}();var o=/^$/;if(N){o=/$'/}else{if(h){o=/\-[^ \-?]|\?[^ !'\"\),.\-\/:;\?\]\}]/}else{if(af){o=/\-[^ \-\.?]|\?[^ \-\.?\]\}:;!'\"\),\/]|[\.!\"#&%\)*+,:;=>\]|\}~][\(\{\[<]|\$'/}}}function n(an,am,ap){if(am==null){am=an.search(/[^\s\u00a0]/);if(am==-1){am=an.length}}for(var ao=0,aq=0;ao<am;++ao){if(an.charAt(ao)=="\t"){aq+=ap-(aq%ap)}else{++aq}}return aq}function t(am){if(am.currentStyle){return am.currentStyle}return window.getComputedStyle(am,null)}function ak(an,aw){var ap=an.ownerDocument.body;var av=0,au=0,ar=false;for(var am=an;am;am=am.offsetParent){var at=am.offsetLeft,ao=am.offsetTop;if(am==ap){av+=Math.abs(at);au+=Math.abs(ao)}else{av+=at,au+=ao}if(aw&&t(am).position=="fixed"){ar=true}}var aq=aw&&!ar?null:ap;for(var am=an.parentNode;am!=aq;am=am.parentNode){if(am.scrollLeft!=null){av-=am.scrollLeft;au-=am.scrollTop}}return{left:av,top:au}}if(document.documentElement.getBoundingClientRect!=null){ak=function(ap,am){try{var ao=ap.getBoundingClientRect();ao={top:ao.top,left:ao.left}}catch(aq){ao={top:0,left:0}}if(!am){if(window.pageYOffset==null){var an=document.documentElement||document.body.parentNode;if(an.scrollTop==null){an=document.body}ao.top+=an.scrollTop;ao.left+=an.scrollLeft}else{ao.top+=window.pageYOffset;ao.left+=window.pageXOffset}}return ao}}function H(am){return am.textContent||am.innerText||am.nodeValue||""}function a(am){if(s){am.selectionStart=0;am.selectionEnd=am.value.length}else{am.select()}}function ad(an,am){return an.line==am.line&&an.ch==am.ch}function Z(an,am){return an.line<am.line||(an.line==am.line&&an.ch<am.ch)}function aa(am){return{line:am.line,ch:am.ch}}var ai=document.createElement("pre");function P(am){ai.textContent=am;return ai.innerHTML}if(P("a")=="\na"){P=function(am){ai.textContent=am;return ai.innerHTML.slice(1)}}else{if(P("\t")!="\t"){P=function(am){ai.innerHTML="";ai.appendChild(document.createTextNode(am));return ai.innerHTML}}}u.htmlEscape=P;function W(ap,ao){if(!ao){return 0}if(!ap){return ao.length}for(var an=ap.length,am=ao.length;an>=0&&am>=0;--an,--am){if(ap.charAt(an)!=ao.charAt(am)){break}}return am+1}function q(ap,am){if(ap.indexOf){return ap.indexOf(am)}for(var an=0,ao=ap.length;an<ao;++an){if(ap[an]==am){return an}}return -1}function ag(am){return/\w/.test(am)||am.toUpperCase()!=am.toLowerCase()}var A="\n\nb".split(/\n/).length!=3?function(ao){var ap=0,an,am=[];while((an=ao.indexOf("\n",ap))>-1){am.push(ao.slice(ap,ao.charAt(an-1)=="\r"?an-1:an));ap=an+1}am.push(ao.slice(ap));return am}:function(am){return am.split(/\r?\n/)};u.splitLines=A;var ae=window.getSelection?function(an){try{return an.selectionStart!=an.selectionEnd}catch(am){return false}}:function(ao){try{var am=ao.ownerDocument.selection.createRange()}catch(an){}if(!am||am.parentElement()!=ao){return false}return am.compareEndPoints("StartToEnd",am)!=0};u.defineMode("null",function(){return{token:function(am){am.skipToEnd()}}});u.defineMIME("text/plain","null");var R={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",91:"Mod",92:"Mod",93:"Mod",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};u.keyNames=R;(function(){for(var am=0;am<10;am++){R[am+48]=String(am)}for(var am=65;am<=90;am++){R[am]=String.fromCharCode(am)}for(var am=1;am<=12;am++){R[am+111]=R[am+63235]="F"+am}})();return u})();CodeMirror.defineMode("javascript",function(I,M){var v=I.indentUnit;var Q=M.json;var b=function(){function W(Z){return{type:Z,style:"keyword"}}var T=W("keyword a"),Y=W("keyword b"),X=W("keyword c");var U=W("operator"),V={type:"atom",style:"atom"};return{"if":T,"while":T,"with":T,"else":Y,"do":Y,"try":Y,"finally":Y,"return":X,"break":X,"continue":X,"new":X,"delete":X,"throw":X,"var":W("var"),"const":W("var"),let:W("var"),"function":W("function"),"catch":W("catch"),"for":W("for"),"switch":W("switch"),"case":W("case"),"default":W("default"),"in":U,"typeof":U,"instanceof":U,"true":V,"false":V,"null":V,"undefined":V,"NaN":V,"Infinity":V}}();var N=/[+\-*&%=<>!?|]/;function R(V,U,T){U.tokenize=T;return T(V,U)}function h(W,T){var V=false,U;while((U=W.next())!=null){if(U==T&&!V){return false}V=!V&&U=="\\"}return V}var S,p;function B(V,U,T){S=V;p=T;return U}function l(X,V){var T=X.next();if(T=='"'||T=="'"){return R(X,V,z(T))}else{if(/[\[\]{}\(\),;\:\.]/.test(T)){return B(T)}else{if(T=="0"&&X.eat(/x/i)){X.eatWhile(/[\da-f]/i);return B("number","number")}else{if(/\d/.test(T)){X.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return B("number","number")}else{if(T=="/"){if(X.eat("*")){return R(X,V,f)}else{if(X.eat("/")){X.skipToEnd();return B("comment","comment")}else{if(V.reAllowed){h(X,"/");X.eatWhile(/[gimy]/);return B("regexp","string-2")}else{X.eatWhile(N);return B("operator",null,X.current())}}}}else{if(T=="#"){X.skipToEnd();return B("error","error")}else{if(N.test(T)){X.eatWhile(N);return B("operator",null,X.current())}else{X.eatWhile(/[\w\$_]/);var W=X.current(),U=b.propertyIsEnumerable(W)&&b[W];return(U&&V.kwAllowed)?B(U.type,U.style,W):B("variable","variable",W)}}}}}}}}function z(T){return function(V,U){if(!h(V,T)){U.tokenize=l}return B("string","string")}}function f(W,V){var T=false,U;while(U=W.next()){if(U=="/"&&T){V.tokenize=l;break}T=(U=="*")}return B("comment","comment")}var k={atom:true,number:true,variable:true,string:true,regexp:true};function t(Y,U,T,X,V,W){this.indented=Y;this.column=U;this.type=T;this.prev=V;this.info=W;if(X!=null){this.align=X}}function w(V,U){for(var T=V.localVars;T;T=T.next){if(T.name==U){return true}}}function E(X,U,T,W,Y){var Z=X.cc;u.state=X;u.stream=Y;u.marked=null,u.cc=Z;if(!X.lexical.hasOwnProperty("align")){X.lexical.align=true}while(true){var V=Z.length?Z.pop():Q?x:y;if(V(T,W)){while(Z.length&&Z[Z.length-1].lex){Z.pop()()}if(u.marked){return u.marked}if(T=="variable"&&w(X,W)){return"variable-2"}return U}}}var u={state:null,column:null,marked:null,cc:null};function a(){for(var T=arguments.length-1;T>=0;T--){u.cc.push(arguments[T])}}function G(){a.apply(null,arguments);return true}function m(U){var V=u.state;if(V.context){u.marked="def";for(var T=V.localVars;T;T=T.next){if(T.name==U){return}}V.localVars={name:U,next:V.localVars}}}var D={name:"this",next:{name:"arguments"}};function s(){if(!u.state.context){u.state.localVars=D}u.state.context={prev:u.state.context,vars:u.state.localVars}}function r(){u.state.localVars=u.state.context.vars;u.state.context=u.state.context.prev}function j(U,V){var T=function(){var W=u.state;W.lexical=new t(W.indented,u.stream.column(),U,null,W.lexical,V)};T.lex=true;return T}function F(){var T=u.state;if(T.lexical.prev){if(T.lexical.type==")"){T.indented=T.lexical.indented}T.lexical=T.lexical.prev}}F.lex=true;function c(U){return function T(V){if(V==U){return G()}else{if(U==";"){return a()}else{return G(arguments.callee)}}}}function y(T){if(T=="var"){return G(j("vardef"),J,c(";"),F)}if(T=="keyword a"){return G(j("form"),x,y,F)}if(T=="keyword b"){return G(j("form"),y,F)}if(T=="{"){return G(j("}"),n,F)}if(T==";"){return G()}if(T=="function"){return G(i)}if(T=="for"){return G(j("form"),c("("),j(")"),g,c(")"),F,y,F)}if(T=="variable"){return G(j("stat"),C)}if(T=="switch"){return G(j("form"),x,j("}","switch"),c("{"),n,F,F)}if(T=="case"){return G(x,c(":"))}if(T=="default"){return G(c(":"))}if(T=="catch"){return G(j("form"),s,c("("),q,c(")"),y,F,r)}return a(j("stat"),x,c(";"),F)}function x(T){if(k.hasOwnProperty(T)){return G(L)}if(T=="function"){return G(i)}if(T=="keyword c"){return G(A)}if(T=="("){return G(j(")"),A,c(")"),F,L)}if(T=="operator"){return G(x)}if(T=="["){return G(j("]"),O(x,"]"),F,L)}if(T=="{"){return G(j("}"),O(o,"}"),F,L)}return G()}function A(T){if(T.match(/[;\}\)\],]/)){return a()}return a(x)}function L(T,U){if(T=="operator"&&/\+\+|--/.test(U)){return G(L)}if(T=="operator"||T==":"){return G(x)}if(T==";"){return}if(T=="("){return G(j(")"),O(x,")"),F,L)}if(T=="."){return G(P,L)}if(T=="["){return G(j("]"),x,c("]"),F,L)}}function C(T){if(T==":"){return G(F,y)}return a(L,c(";"),F)}function P(T){if(T=="variable"){u.marked="property";return G()}}function o(T){if(T=="variable"){u.marked="property"}if(k.hasOwnProperty(T)){return G(c(":"),x)}}function O(V,T){function U(X){if(X==","){return G(V,U)}if(X==T){return G()}return G(c(T))}return function W(X){if(X==T){return G()}else{return a(V,U)}}}function n(T){if(T=="}"){return G()}return a(y,n)}function J(T,U){if(T=="variable"){m(U);return G(H)}return G()}function H(T,U){if(U=="="){return G(x,H)}if(T==","){return G(J)}}function g(T){if(T=="var"){return G(J,e)}if(T==";"){return a(e)}if(T=="variable"){return G(K)}return a(e)}function K(T,U){if(U=="in"){return G(x)}return G(L,e)}function e(T,U){if(T==";"){return G(d)}if(U=="in"){return G(x)}return G(x,c(";"),d)}function d(T){if(T!=")"){G(x)}}function i(T,U){if(T=="variable"){m(U);return G(i)}if(T=="("){return G(j(")"),s,O(q,")"),F,y,r)}}function q(T,U){if(T=="variable"){m(U);return G()}}return{startState:function(T){return{tokenize:l,reAllowed:true,kwAllowed:true,cc:[],lexical:new t((T||0)-v,0,"block",false),localVars:M.localVars,context:M.localVars&&{vars:M.localVars},indented:0}},token:function(V,U){if(V.sol()){if(!U.lexical.hasOwnProperty("align")){U.lexical.align=false}U.indented=V.indentation()}if(V.eatSpace()){return null}var T=U.tokenize(V,U);if(S=="comment"){return T}U.reAllowed=!!(S=="operator"||S=="keyword c"||S.match(/^[\[{}\(,;:]$/));U.kwAllowed=S!=".";return E(U,T,S,p,V)},indent:function(Y,T){if(Y.tokenize!=l){return 0}var X=T&&T.charAt(0),V=Y.lexical;if(V.type=="stat"&&X=="}"){V=V.prev}var W=V.type,U=X==W;if(W=="vardef"){return V.indented+4}else{if(W=="form"&&X=="{"){return V.indented}else{if(W=="stat"||W=="form"){return V.indented+v}else{if(V.info=="switch"&&!U){return V.indented+(/^(?:case|default)\b/.test(T)?v:2*v)}else{if(V.align){return V.column+(U?0:1)}else{return V.indented+(U?0:v)}}}}}},electricChars:":{}"}});CodeMirror.defineMIME("text/javascript","javascript");CodeMirror.defineMIME("application/json",{name:"javascript",json:true});CodeMirror.defineMode("xml",function(y,k){var r=y.indentUnit;var x=k.htmlMode?{autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:false}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false};var a=k.alignCDATA;var f,g;function o(E,D){function B(G){D.tokenize=G;return G(E,D)}var C=E.next();if(C=="<"){if(E.eat("!")){if(E.eat("[")){if(E.match("CDATA[")){return B(w("atom","]]>"))}else{return null}}else{if(E.match("--")){return B(w("comment","-->"))}else{if(E.match("DOCTYPE",true,true)){E.eatWhile(/[\w\._\-]/);return B(z(1))}else{return null}}}}else{if(E.eat("?")){E.eatWhile(/[\w\._\-]/);D.tokenize=w("meta","?>");return"meta"}else{g=E.eat("/")?"closeTag":"openTag";E.eatSpace();f="";var F;while((F=E.eat(/[^\s\u00a0=<>\"\'\/?]/))){f+=F}D.tokenize=n;return"tag"}}}else{if(C=="&"){var A;if(E.eat("#")){if(E.eat("x")){A=E.eatWhile(/[a-fA-F\d]/)&&E.eat(";")}else{A=E.eatWhile(/[\d]/)&&E.eat(";")}}else{A=E.eatWhile(/[\w\.\-:]/)&&E.eat(";")}return A?"atom":"error"}else{E.eatWhile(/[^&<]/);return null}}}function n(C,B){var A=C.next();if(A==">"||(A=="/"&&C.eat(">"))){B.tokenize=o;g=A==">"?"endTag":"selfcloseTag";return"tag"}else{if(A=="="){g="equals";return null}else{if(/[\'\"]/.test(A)){B.tokenize=j(A);return B.tokenize(C,B)}else{C.eatWhile(/[^\s\u00a0=<>\"\'\/?]/);return"word"}}}}function j(A){return function(C,B){while(!C.eol()){if(C.next()==A){B.tokenize=n;break}}return"string"}}function w(B,A){return function(D,C){while(!D.eol()){if(D.match(A)){C.tokenize=o;break}D.next()}return B}}function z(A){return function(D,C){var B;while((B=D.next())!=null){if(B=="<"){C.tokenize=z(A+1);return C.tokenize(D,C)}else{if(B==">"){if(A==1){C.tokenize=o;break}else{C.tokenize=z(A-1);return C.tokenize(D,C)}}}}return"meta"}}var l,h;function b(){for(var A=arguments.length-1;A>=0;A--){l.cc.push(arguments[A])}}function e(){b.apply(null,arguments);return true}function i(A,C){var B=x.doNotIndent.hasOwnProperty(A)||(l.context&&l.context.noIndent);l.context={prev:l.context,tagName:A,indent:l.indented,startOfLine:C,noIndent:B}}function u(){if(l.context){l.context=l.context.prev}}function d(A){if(A=="openTag"){l.tagName=f;return e(m,c(l.startOfLine))}else{if(A=="closeTag"){var B=false;if(l.context){if(l.context.tagName!=f){if(x.implicitlyClosed.hasOwnProperty(l.context.tagName.toLowerCase())){u()}B=!l.context||l.context.tagName!=f}}else{B=true}if(B){h="error"}return e(s(B))}}return e()}function c(A){return function(B){if(B=="selfcloseTag"||(B=="endTag"&&x.autoSelfClosers.hasOwnProperty(l.tagName.toLowerCase()))){q(l.tagName.toLowerCase());return e()}if(B=="endTag"){q(l.tagName.toLowerCase());i(l.tagName,A);return e()}return e()}}function s(A){return function(B){if(A){h="error"}if(B=="endTag"){u();return e()}h="error";return e(arguments.callee)}}function q(B){var A;while(true){if(!l.context){return}A=l.context.tagName.toLowerCase();if(!x.contextGrabbers.hasOwnProperty(A)||!x.contextGrabbers[A].hasOwnProperty(B)){return}u()}}function m(A){if(A=="word"){h="attribute";return e(p,m)}if(A=="endTag"||A=="selfcloseTag"){return b()}h="error";return e(m)}function p(A){if(A=="equals"){return e(v,m)}if(!x.allowMissing){h="error"}return(A=="endTag"||A=="selfcloseTag")?b():e()}function v(A){if(A=="string"){return e(t)}if(A=="word"&&x.allowUnquoted){h="string";return e()}h="error";return(A=="endTag"||A=="selfCloseTag")?b():e()}function t(A){if(A=="string"){return e(t)}else{return b()}}return{startState:function(){return{tokenize:o,cc:[],indented:0,startOfLine:true,tagName:null,context:null}},token:function(D,C){if(D.sol()){C.startOfLine=true;C.indented=D.indentation()}if(D.eatSpace()){return null}h=g=f=null;var B=C.tokenize(D,C);C.type=g;if((B||g)&&B!="comment"){l=C;while(true){var A=C.cc.pop()||d;if(A(g||B)){break}}}C.startOfLine=false;return h||B},indent:function(D,A,C){var B=D.context;if((D.tokenize!=n&&D.tokenize!=o)||B&&B.noIndent){return C?C.match(/^(\s*)/)[0].length:0}if(a&&/<!\[CDATA\[/.test(A)){return 0}if(B&&/^<\//.test(A)){B=B.prev}while(B&&!B.startOfLine){B=B.prev}if(B){return B.indent+r}else{return 0}},compareStates:function(D,B){if(D.indented!=B.indented||D.tokenize!=B.tokenize){return false}for(var C=D.context,A=B.context;;C=C.prev,A=A.prev){if(!C||!A){return C==A}if(C.tagName!=A.tagName){return false}}},electricChars:"/"}});CodeMirror.defineMIME("application/xml","xml");if(!CodeMirror.mimeModes.hasOwnProperty("text/html")){CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:true})}CodeMirror.defineMode("markdown",function(B,m){var i=CodeMirror.getMode(B,{name:"xml",htmlMode:true});var y="header",d="comment",A="quote",z="string",E="hr",s="link",D="string",g="em",j="strong",w="emstrong";var F=/^([*\-=_])(?:\s*\1){2,}\s*$/,p=/^[*\-+]\s+/,u=/^[0-9]+\.\s+/,n=/^(?:\={3,}|-{3,})$/,f=/^[^\[*_\\<>`]+/;function e(I,H,G){H.f=H.inline=G;return G(I,H)}function r(I,H,G){H.f=H.block=G;return G(I,H)}function o(G){G.em=false;G.strong=false;return null}function l(I,H){var G;if(H.indentationDiff>=4){H.indentation-=H.indentationDiff;I.skipToEnd();return d}else{if(I.eatSpace()){return null}else{if(I.peek()==="#"||I.match(n)){H.header=true}else{if(I.eat(">")){H.indentation++;H.quote=true}else{if(I.peek()==="["){return e(I,H,k)}else{if(I.match(F,true)){return E}else{if(G=I.match(p,true)||I.match(u,true)){H.indentation+=G[0].length;return z}}}}}}}return e(I,H,H.inline)}function x(I,H){var G=i.token(I,H.htmlState);if(G==="tag"&&H.htmlState.type!=="openTag"&&!H.htmlState.context){H.f=q;H.block=l}return G}function t(H){var G=[];if(H.strong){G.push(H.em?w:j)}else{if(H.em){G.push(g)}}if(H.header){G.push(y)}if(H.quote){G.push(A)}return G.length?G.join(" "):null}function b(H,G){if(H.match(f,true)){return t(G)}return undefined}function q(K,J){var I=J.text(K,J);if(typeof I!=="undefined"){return I}var H=K.next();if(H==="\\"){K.next();return t(J)}if(H==="`"){return e(K,J,v(d,"`"))}if(H==="["){return e(K,J,C)}if(H==="<"&&K.match(/^\w/,false)){K.backUp(1);return r(K,J,x)}var G=t(J);if(H==="*"||H==="_"){if(K.eat(H)){return(J.strong=!J.strong)?t(J):G}return(J.em=!J.em)?t(J):G}return t(J)}function C(I,H){while(!I.eol()){var G=I.next();if(G==="\\"){I.next()}if(G==="]"){H.inline=H.f=h;return s}}return s}function h(I,H){I.eatSpace();var G=I.next();if(G==="("||G==="["){return e(I,H,v(D,G==="("?")":"]"))}return"error"}function k(H,G){if(H.match(/^[^\]]*\]:/,true)){G.f=a;return s}return e(H,G,q)}function a(H,G){H.eatSpace();H.match(/^[^\s]+/,true);G.f=G.inline=q;return D}function c(G){if(!c[G]){c[G]=new RegExp("^(?:[^\\\\\\"+G+"]|\\\\.)*(?:\\"+G+"|$)")}return c[G]}function v(H,I,G){G=G||q;return function(K,J){K.match(c(I));J.inline=J.f=G;return H}}return{startState:function(){return{f:l,block:l,htmlState:i.startState(),indentation:0,inline:q,text:b,em:false,strong:false,header:false,quote:false}},copyState:function(G){return{f:G.f,block:G.block,htmlState:CodeMirror.copyState(i,G.htmlState),indentation:G.indentation,inline:G.inline,text:G.text,em:G.em,strong:G.strong,header:G.header,quote:G.quote}},token:function(I,H){if(I.sol()){if(I.match(/^\s*$/,true)){return o(H)}H.header=false;H.quote=false;H.f=H.block;var G=I.match(/^\s*/,true)[0].replace(/\t/g," ").length;H.indentationDiff=G-H.indentation;H.indentation=G;if(G>0){return null}}return H.f(I,H)},blankLine:o,getType:t}},"xml");CodeMirror.defineMIME("text/x-markdown","markdown");Ext.define("Ext.AbstractPlugin",{disabled:false,constructor:function(b){if(!b.cmp&&Ext.global.console){Ext.global.console.warn("Attempted to attach a plugin ")}Ext.apply(this,b)},getCmp:function(){return this.cmp},init:Ext.emptyFn,destroy:Ext.emptyFn,enable:function(){this.disabled=false},disable:function(){this.disabled=true}});Ext.define("Ext.util.Sorter",{direction:"ASC",constructor:function(d){var c=this;Ext.apply(c,d);if(c.property===undefined&&c.sorterFn===undefined){Ext.Error.raise("A Sorter requires either a property or a sorter function")}c.updateSortFunction()},createSortFunction:function(f){var j=this,i=j.property,h=j.direction||"ASC",g=h.toUpperCase()=="DESC"?-1:1;return function(a,b){return g*f.call(j,a,b)}},defaultSorterFn:function(k,l){var g=this,h=g.transform,i=g.getRoot(k)[g.property],j=g.getRoot(l)[g.property];if(h){i=h(i);j=h(j)}return i>j?1:(i<j?-1:0)},getRoot:function(b){return this.root===undefined?b:b[this.root]},setDirection:function(c){var d=this;d.direction=c;d.updateSortFunction()},toggle:function(){var b=this;b.direction=Ext.String.toggle(b.direction,"ASC","DESC");b.updateSortFunction()},updateSortFunction:function(d){var c=this;d=d||c.sorterFn||c.defaultSorterFn;c.sort=c.createSortFunction(d)}});Ext.define("Docs.History",{singleton:true,init:function(){Ext.util.History.useTopWindow=false;Ext.util.History.init(function(){this.historyLoaded=true;this.initialNavigate()},this);Ext.util.History.on("change",function(b){this.navigate(b,true)},this)},notifyTabsLoaded:function(){this.tabsLoaded=true;this.initialNavigate()},initialNavigate:function(){if(this.tabsLoaded&&this.historyLoaded){this.navigate(Ext.util.History.getToken(),true)}},navigate:function(e,g){var f=this.parseToken(e);if(f.url=="#!/api"){Docs.App.getController("Classes").loadIndex(g)}else{if(f.type==="api"){Docs.App.getController("Classes").loadClass(f.url,g)}else{if(f.url==="#!/guide"){Docs.App.getController("Guides").loadIndex(g)}else{if(f.type==="guide"){Docs.App.getController("Guides").loadGuide(f.url,g)}else{if(f.url==="#!/video"){Docs.App.getController("Videos").loadIndex(g)}else{if(f.type==="video"){Docs.App.getController("Videos").loadVideo(f.url,g)}else{if(f.url==="#!/example"){Docs.App.getController("Examples").loadIndex()}else{if(f.type==="example"){Docs.App.getController("Examples").loadExample(f.url,g)}else{if(f.url==="#!/stats"){Docs.App.getController("Stats").loadIndex()}else{if(f.url==="#!/comment"){Docs.App.getController("Comments").loadIndex()}else{if(f.url==="#!/tests"){Docs.App.getController("Tests").loadIndex()}else{if(Docs.App.getController("Welcome").isActive()){Docs.App.getController("Welcome").loadIndex(g)}else{if(!this.noRepeatNav){this.noRepeatNav=true;var h=Ext.getCmp("doctabs").staticTabs[0];if(h){this.navigate(h.href,g)}}}}}}}}}}}}}}},parseToken:function(d){var c=d&&d.match(/!?(\/(api|guide|example|video|stats|comment|tests)(\/(.*))?)/);return c?{type:c[2],url:"#!"+c[1]}:{}},push:function(e,f){e=this.cleanUrl(e);if(!/^#!?/.test(e)){e="#!"+e}var d=Ext.util.History.getToken()||"";if("#"+d.replace(/^%21/,"!")!==e){Ext.util.History.add(e)}},cleanUrl:function(b){return b.replace(/^[^#]*#/,"#")}});Ext.define("Docs.ContentGrabber",{singleton:true,get:function(f){var e;var d=Ext.get(f);if(d){e=d.dom.innerHTML;d.remove()}return e}});Ext.define("Docs.view.auth.LoginHelper",{singleton:true,loginTplHtml:['<form class="loginForm">','<input class="username" type="text" name="username" placeholder="Username" />','<input class="password" type="password" name="password" placeholder="Password" />','<label><input type="checkbox" name="remember" /> Remember Me</label>','<input class="submit" type="submit" value="Sign in" />'," or ",'<a class="register" href="http://www.sencha.com/forum/register.php" target="_blank">Register</a>',"</form>"],renderToHeader:function(c){var d=Ext.create("Ext.Template",this.loginTplHtml.join(""));d.overwrite(c,{});this.bindSubmit(c)},renderToComments:function(c){if(Ext.isIE&&Ext.ieVersion<=7){var d=Ext.create("Ext.XTemplate",'<div class="new-comment">','<span class="toggleNewComment"><span></span>Sorry, ',"adding comments is not supported in IE 7 or earlier</span>","</div>")}else{var d=Ext.create("Ext.XTemplate",'<div class="new-comment">','<span class="toggleNewComment"><span></span>Sign in to post a comment:</span>',this.loginTplHtml.join(""),"</div>")}d.overwrite(c,{});this.bindSubmit(c)},bindSubmit:function(b){Ext.get(b).down("form").on("submit",this.submitLogin,this,{preventDefault:true})},submitLogin:function(o,i){var p=Ext.get(i);var k=p.down("input[name=username]").getValue();var j=p.down("input[name=password]").getValue();var m=p.down("input[name=remember]");var n=p.down("input[type=submit]");var l=m?Boolean(m.getAttribute("checked")):false;Docs.App.getController("Auth").login(k,j,l,n)}});Ext.define("Docs.view.Scrolling",{onClassMixedIn:function(b){Ext.Function.interceptBefore(b.prototype,"initComponent",this.prototype.initScrolling)},initScrolling:function(){this.scrollContext="index";this.scrollState={};this.on("afterrender",function(){this.getScrollEl().addListener("scroll",this.saveScrollState,this)},this)},setScrollContext:function(b){this.scrollContext=b},eraseScrollContext:function(b){delete this.scrollState[b]},saveScrollState:function(){this.scrollState[this.scrollContext]=this.getScrollTop()},restoreScrollState:function(){this.setScrollTop(this.scrollState[this.scrollContext]||0)},scrollToView:function(d,c){d=Ext.get(d);c=c||{};if(d){this.setScrollTop(this.getScrollTop()+d.getY()+(c.offset||0));c.highlight&&d.highlight()}},getScrollTop:function(){return this.getScrollEl().getScroll()["top"]},setScrollTop:function(b){return this.getScrollEl().scrollTo("top",b)},scrollToTop:function(){this.getScrollEl().scrollTo("top")},getScrollEl:function(){return this.body||this.el}});Ext.define("Docs.view.examples.Device",{config:{url:"",id:undefined,device:"phone",orientation:"landscape"},constructor:function(b){this.initConfig(b);Ext.apply(this,this.getIframeSize());this.id=this.id||Ext.id();if(Ext.isWebKit){this.tpl=new Ext.XTemplate('<div class="touchExample {device} {orientation}">','<iframe id={id} style="width: {width}; height: {height}; border: 0;" ','src="{[this.deviceUrl(values)]}"></iframe>',"</div>",{deviceUrl:function(a){return a.url+"?deviceType="+(a.device==="tablet"?"Tablet":"Phone")}})}else{this.tpl=new Ext.XTemplate('<div class="touchExample {device} {orientation}">','<div id={id} class="wrong-browser" style="width: {width}; height: {height};">','<div style="padding: 20px;">Sencha Touch only functions on WebKit based browsers. <br /><br />Please use Google Chrome or Safari to see live examples.</div>',"</div>","</div>")}},toHtml:function(){return this.tpl.apply(this)},setDevice:function(b){this.device=b;Ext.apply(this,this.getIframeSize())},setOrientation:function(b){this.orientation=b;Ext.apply(this,this.getIframeSize())},getIframeSize:function(){var b={phone:{width:"481px",height:"320px"},miniphone:{width:"320px",height:"219px"},tablet:{width:"717px",height:"538px"}}[this.device];if(this.orientation==="landscape"){return b}else{return{width:b.height,height:b.width}}}});Ext.define("Ext.form.field.VTypes",(function(){var h=/^[a-zA-Z_]+$/,g=/^[a-zA-Z0-9_]+$/,e=/^(\w+)([\-+.][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/,f=/(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return{singleton:true,alternateClassName:"Ext.form.VTypes",email:function(a){return e.test(a)},emailText:'This field should be an e-mail address in the format "user@example.com"',emailMask:/[a-z0-9_\.\-@\+]/i,url:function(a){return f.test(a)},urlText:'This field should be a URL in the format "http://www.example.com"',alpha:function(a){return h.test(a)},alphaText:"This field should only contain letters and _",alphaMask:/[a-z_]/i,alphanum:function(a){return g.test(a)},alphanumText:"This field should only contain letters, numbers and _",alphanumMask:/[a-z0-9_]/i}}()));Ext.define("Ext.util.Observable",{requires:["Ext.util.Event"],statics:{releaseCapture:function(b){b.fireEvent=this.prototype.fireEvent},capture:function(f,d,e){f.fireEvent=Ext.Function.createInterceptor(f.fireEvent,d,e)},observe:function(d,c){if(d){if(!d.isObservable){Ext.applyIf(d,new this());this.capture(d.prototype,d.fireEvent,d)}if(Ext.isObject(c)){d.on(c)}}return d},prepareClass:function(d){if(!d.HasListeners){var f=function(){},e=d.superclass.HasListeners||this.HasListeners;d.prototype.HasListeners=d.HasListeners=f;f.prototype=d.hasListeners=new e()}}},isObservable:true,constructor:function(d){var c=this;Ext.apply(c,d);if(!c.hasListeners){c.hasListeners=new c.HasListeners()}c.events=c.events||{};if(c.listeners){c.on(c.listeners);c.listeners=null}if(c.bubbleEvents){c.enableBubble(c.bubbleEvents)}},onClassExtended:function(b){if(!b.HasListeners){Ext.util.Observable.prepareClass(b)}},onClassMixedIn:function(b){if(!b.HasListeners){this.prepareClass(b);b.onExtended(this.prepareClass,this)}},eventOptionsRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|element|vertical|horizontal|freezeEvent)$/,addManagedListener:function(k,o,m,n,p){var l=this,j=l.managedListeners=l.managedListeners||[],i;if(typeof o!=="string"){p=o;for(o in p){if(p.hasOwnProperty(o)){i=p[o];if(!l.eventOptionsRe.test(o)){l.addManagedListener(k,o,i.fn||i,i.scope||p.scope,i.fn?i:p)}}}}else{j.push({item:k,ename:o,fn:m,scope:n,options:p});k.on(o,m,n,p)}},removeManagedListener:function(m,r,o,l){var p=this,i,s,n,t,q;if(typeof r!=="string"){i=r;for(r in i){if(i.hasOwnProperty(r)){s=i[r];if(!p.eventOptionsRe.test(r)){p.removeManagedListener(m,r,s.fn||s,s.scope||i.scope)}}}}n=p.managedListeners?p.managedListeners.slice():[];for(q=0,t=n.length;q<t;q++){p.removeManagedListenerItem(false,n[q],m,r,o,l)}},fireEvent:function(g){g=g.toLowerCase();var h=this,j=h.events,i=j&&j[g],f=true;if(i&&h.hasListeners[g]){f=h.continueFireEvent(g,Ext.Array.slice(arguments,1),i.bubble)}return f},continueFireEvent:function(n,l,h){var j=this,i,k,m=true;do{if(j.eventsSuspended){if((i=j.eventQueue)){i.push([n,l,h])}return m}else{k=j.events[n];if(k&&k!=true){if((m=k.fire.apply(k,l))===false){break}}}}while(h&&(j=j.getBubbleParent()));return m},getBubbleParent:function(){var c=this,d=c.getBubbleTarget&&c.getBubbleTarget();if(d&&d.isObservable){return d}return null},addListener:function(o,m,n,p){var k=this,i,l,j;if(typeof o!=="string"){p=o;for(o in p){if(p.hasOwnProperty(o)){i=p[o];if(!k.eventOptionsRe.test(o)){k.addListener(o,i.fn||i,i.scope||p.scope,i.fn?i:p)}}}}else{o=o.toLowerCase();k.events[o]=k.events[o]||true;l=k.events[o]||true;if(Ext.isBoolean(l)){k.events[o]=l=new Ext.util.Event(k,o)}if(typeof m==="string"){if(!(n[m]||k[m])){Ext.Error.raise('No method named "'+m+'"')}m=n[m]||k[m]}l.addListener(m,n,Ext.isObject(p)?p:{});j=k.hasListeners;if(j.hasOwnProperty(o)){++j[o]}else{j[o]=1}}},removeListener:function(n,l,m){var j=this,h,k,i;if(typeof n!=="string"){i=n;for(n in i){if(i.hasOwnProperty(n)){h=i[n];if(!j.eventOptionsRe.test(n)){j.removeListener(n,h.fn||h,h.scope||i.scope)}}}}else{n=n.toLowerCase();k=j.events[n];if(k&&k.isEvent){k.removeListener(l,m);if(!--j.hasListeners[n]){delete j.hasListeners[n]}}}},clearListeners:function(){var d=this.events,f,e;for(e in d){if(d.hasOwnProperty(e)){f=d[e];if(f.isEvent){f.clearListeners()}}}this.clearManagedListeners()},purgeListeners:function(){if(Ext.global.console){Ext.global.console.warn("Observable: purgeListeners has been deprecated. Please use clearListeners.")}return this.clearListeners.apply(this,arguments)},clearManagedListeners:function(){var d=this.managedListeners||[],f=0,e=d.length;for(;f<e;f++){this.removeManagedListenerItem(true,d[f])}this.managedListeners=[]},removeManagedListenerItem:function(g,h,i,l,j,k){if(g||(h.item===i&&h.ename===l&&(!j||h.fn===j)&&(!k||h.scope===k))){h.item.un(h.ename,h.fn,h.scope);if(!g){Ext.Array.remove(this.managedListeners,h)}}},purgeManagedListeners:function(){if(Ext.global.console){Ext.global.console.warn("Observable: purgeManagedListeners has been deprecated. Please use clearManagedListeners.")}return this.clearManagedListeners.apply(this,arguments)},addEvents:function(i){var j=this,k=j.events||(j.events={}),h,g,l;if(typeof i=="string"){for(g=arguments,l=g.length;l--;){h=g[l];if(!k[h]){k[h]=true}}}else{Ext.applyIf(j.events,i)}},hasListener:function(b){return !!this.hasListeners[b.toLowerCase()]},suspendEvents:function(b){this.eventsSuspended=true;if(b&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var f=this,g=f.eventQueue,h,e;f.eventsSuspended=false;delete f.eventQueue;if(g){h=g.length;for(e=0;e<h;e++){f.continueFireEvent.apply(f,g[e])}}},relayEvents:function(p,n,k){k=k||"";var l=this,j=n.length,o=0,m,i;for(;o<j;o++){m=n[o];i=k+m;l.events[i]=l.events[i]||true;p.on(m,l.createRelayer(i))}},createRelayer:function(e,d){var f=this;return function(){return f.fireEvent.apply(f,[e].concat(Array.prototype.slice.apply(arguments,d||[0,-1])))}},enableBubble:function(k){if(k){var m=this,l=(typeof k=="string")?arguments:k,n=l.length,p=m.events,i,o,j;for(j=0;j<n;++j){i=l[j].toLowerCase();o=p[i];if(!o||typeof o=="boolean"){p[i]=o=new Ext.util.Event(m,i)}m.hasListeners[i]=(m.hasListeners[i]||0)+1;o.bubble=true}}}},function(){var e=this,f=e.prototype,d=function(){};d.prototype={};f.HasListeners=e.HasListeners=d;e.createAlias({on:"addListener",un:"removeListener",mon:"addManagedListener",mun:"removeManagedListener"});e.observeClass=e.observe;Ext.apply(f,(function(){function a(b){var c=(this.methodEvents=this.methodEvents||{})[b],o,p,n,m=this,q;if(!c){this.methodEvents[b]=c={};c.originalFn=this[b];c.methodName=b;c.before=[];c.after=[];q=function(i,g,h){if((p=i.apply(g||m,h))!==undefined){if(typeof p=="object"){if(p.returnValue!==undefined){o=p.returnValue}else{o=p}n=!!p.cancel}else{if(p===false){n=true}else{o=p}}}};this[b]=function(){var j=Array.prototype.slice.call(arguments,0),g,i,h;o=p=undefined;n=false;for(i=0,h=c.before.length;i<h;i++){g=c.before[i];q(g.fn,g.scope,j);if(n){return o}}if((p=c.originalFn.apply(m,j))!==undefined){o=p}for(i=0,h=c.after.length;i<h;i++){g=c.after[i];q(g.fn,g.scope,j);if(n){return o}}return o}}return c}return{beforeMethod:function(b,c,h){a.call(this,b).before.push({fn:c,scope:h})},afterMethod:function(b,c,h){a.call(this,b).after.push({fn:c,scope:h})},removeMethodListener:function(b,i,m){var c=this.getMethodEvent(b),n,o;for(n=0,o=c.before.length;n<o;n++){if(c.before[n].fn==i&&c.before[n].scope==m){Ext.Array.erase(c.before,n,1);return}}for(n=0,o=c.after.length;n<o;n++){if(c.after[n].fn==i&&c.after[n].scope==m){Ext.Array.erase(c.after,n,1);return}}},toggleEventLogging:function(b){Ext.util.Observable[b?"capture":"releaseCapture"](this,function(c){if(Ext.isDefined(Ext.global.console)){Ext.global.console.log(c,arguments)}})}}}()))});Ext.define("Ext.util.KeyMap",{alternateClassName:"Ext.KeyMap",eventName:"keydown",constructor:function(d){var c=this;if((arguments.length!==1)||(typeof d==="string")||d.dom||d.tagName||d===document||d.isComponent){c.legacyConstructor.apply(c,arguments);return}Ext.apply(c,d);c.bindings=[];if(!c.target.isComponent){c.target=Ext.get(c.target)}if(c.binding){c.addBinding(c.binding)}else{if(d.key){c.addBinding(d)}}c.enable()},legacyConstructor:function(e,g,f){var h=this;Ext.apply(h,{target:Ext.get(e),eventName:f||h.eventName,bindings:[]});if(g){h.addBinding(g)}h.enable()},addBinding:function(l){var m=l.key,k=false,o,n,i,p,j;if(Ext.isArray(l)){for(p=0,j=l.length;p<j;p++){this.addBinding(l[p])}return}if(Ext.isString(m)){n=[];i=m.toUpperCase();for(p=0,j=i.length;p<j;++p){n.push(i.charCodeAt(p))}m=n;k=true}if(!Ext.isArray(m)){m=[m]}if(!k){for(p=0,j=m.length;p<j;++p){o=m[p];if(Ext.isString(o)){m[p]=o.toUpperCase().charCodeAt(0)}}}this.bindings.push(Ext.apply({keyCode:m},l))},handleKeyDown:function(i){var j=this,h,f,g;if(this.enabled){h=this.bindings;f=0;g=h.length;i=j.processEvent.apply(j||j.processEventScope,arguments);if(!i.getKey){return i}for(;f<g;++f){this.processBinding(h[f],i)}}},processEvent:function(b){return b},processBinding:function(o,t){if(this.checkModifiers(o,t)){var n=t.getKey(),l=o.fn||o.handler,i=o.scope||this,m=o.keyCode,s=o.defaultEventAction,r,p,q=new Ext.EventObjectImpl(t);for(r=0,p=m.length;r<p;++r){if(n===m[r]){if(l.call(i,n,t)!==true&&s){q[s]()}break}}}},checkModifiers:function(j,l){var m=["shift","ctrl","alt"],n=0,i=m.length,k,e;for(;n<i;++n){e=m[n];k=j[e];if(!(k===undefined||(k===l[e+"Key"]))){return false}}return true},on:function(h,m,n){var j,i,l,k;if(Ext.isObject(h)&&!Ext.isArray(h)){j=h.key;i=h.shift;l=h.ctrl;k=h.alt}else{j=h}this.addBinding({key:j,shift:i,ctrl:l,alt:k,fn:m,scope:n})},isEnabled:function(){return this.enabled},enable:function(){var b=this;if(!b.enabled){b.target.on(b.eventName,b.handleKeyDown,b);b.enabled=true}},disable:function(){var b=this;if(b.enabled){b.target.removeListener(b.eventName,b.handleKeyDown,b);b.enabled=false}},setDisabled:function(b){if(b){this.disable()}else{this.enable()}},destroy:function(c){var d=this;d.bindings=[];d.disable();if(c===true){d.target.isComponent?d.target.destroy():d.target.remove()}delete d.target}});Ext.define("Ext.util.Memento",(function(){function i(b,c,a,d){b[d?d+a:a]=c[a]}function j(b,c,a){delete b[a]}function h(b,c,a,d){var l=d?d+a:a,e=b[l];if(e||b.hasOwnProperty(l)){g(c,a,e)}}function g(b,a,c){if(Ext.isDefined(c)){b[a]=c}else{delete b[a]}}function f(m,a,b,e,d){if(a){if(Ext.isArray(e)){var c,n=e.length;for(c=0;c<n;c++){m(a,b,e[c],d)}}else{m(a,b,e,d)}}}return{data:null,target:null,constructor:function(a,b){if(a){this.target=a;if(b){this.capture(b)}}},capture:function(d,a,b){var c=this;f(i,c.data||(c.data={}),a||c.target,d,b)},remove:function(a){f(j,this.data,null,a)},restore:function(c,d,a,b){f(h,this.data,a||this.target,c,b);if(d!==false){this.remove(c)}},restoreAll:function(l,b){var d=this,e=b||this.target,c=d.data,a;for(a in c){if(c.hasOwnProperty(a)){g(e,a,c[a])}}if(l!==false){delete d.data}}}}()));Ext.define("Ext.util.KeyNav",{alternateClassName:"Ext.KeyNav",requires:["Ext.util.KeyMap"],statics:{keyOptions:{left:37,right:39,up:38,down:40,space:32,pageUp:33,pageDown:34,del:46,backspace:8,home:36,end:35,enter:13,esc:27,tab:9}},constructor:function(d){var c=this;if(arguments.length===2){c.legacyConstructor.apply(c,arguments);return}c.setConfig(d)},legacyConstructor:function(c,d){this.setConfig(Ext.apply({target:c},d))},setConfig:function(i){var n=this,p={target:i.target,eventName:n.getKeyEvent("forceKeyDown" in i?i.forceKeyDown:n.forceKeyDown,i.eventName)},m,j,k,o,l;if(n.map){n.map.destroy()}if(i.processEvent){p.processEvent=i.processEvent;p.processEventScope=i.processEventScope||n}m=n.map=new Ext.util.KeyMap(p);j=Ext.util.KeyNav.keyOptions;k=i.scope||n;for(o in j){if(j.hasOwnProperty(o)){if(l=i[o]){if(typeof l==="function"){l={handler:l,defaultAction:(i.defaultEventAction!==undefined)?i.defaultEventAction:n.defaultEventAction}}m.addBinding({key:j[o],handler:Ext.Function.bind(n.handleEvent,l.scope||k,l.handler||l.fn,true),defaultEventAction:(l.defaultEventAction!==undefined)?l.defaultAction:n.defaultEventAction})}}}m.disable();if(!i.disabled){m.enable()}},handleEvent:function(f,d,e){return e.call(this,d)},disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,eventName:"keypress",destroy:function(b){this.map.destroy(b);delete this.map},enable:function(){this.map.enable();this.disabled=false},disable:function(){this.map.disable();this.disabled=true},setDisabled:function(b){this.map.setDisabled(b);this.disabled=b},getKeyEvent:function(c,d){if(c||(Ext.EventManager.useKeyDown&&!d)){return"keydown"}else{return d||this.eventName}}});Ext.define("Ext.util.ElementContainer",{childEls:[],constructor:function(){var c=this,d;if(c.hasOwnProperty("childEls")){d=c.childEls;delete c.childEls;c.addChildEls.apply(c,d)}},destroy:function(){var j=this,k=j.getChildEls(),i,h,l,g;for(l=k.length;l--;){h=k[l];if(typeof h!="string"){h=h.name}i=j[h];if(i){j[h]=null;i.remove()}}},addChildEls:function(){var c=this,d=arguments;if(c.hasOwnProperty("childEls")){c.childEls.push.apply(c.childEls,d)}else{c.childEls=c.getChildEls().concat(Array.prototype.slice.call(d))}c.prune(c.childEls,false)},applyChildEls:function(q,r){var n=this,m=n.getChildEls(),k,i,o,p,l;k=(r||n.id)+"-";for(o=m.length;o--;){i=m[o];if(typeof i=="string"){l=q.getById(k+i)}else{if((p=i.select)){l=Ext.select(p,true,q.dom)}else{if((p=i.selectNode)){l=Ext.get(Ext.DomQuery.selectNode(p,q.dom))}else{l=q.getById(i.id||(k+i.itemId))}}i=i.name}n[i]=l}},getChildEls:function(){var c=this,d;if(c.hasOwnProperty("childEls")){return c.childEls}d=c.self;return d.$childEls||c.getClassChildEls(d)},getClassChildEls:function(p){var t=this,i=p.$childEls,r,y,A,u,q,v,B,z,x,w,s;if(!i){w=p.superclass;if(w){w=w.self;z=[w.$childEls||t.getClassChildEls(w)];s=w.prototype.mixins||{}}else{z=[];s={}}x=p.prototype;v=x.mixins;for(B in v){if(v.hasOwnProperty(B)&&!s.hasOwnProperty(B)){q=v[B].self;z.push(q.$childEls||t.getClassChildEls(q))}}z.push(x.hasOwnProperty("childEls")&&x.childEls);for(y=0,A=z.length;y<A;++y){r=z[y];if(r&&r.length){if(!i){i=r}else{if(!u){u=true;i=i.slice(0)}i.push.apply(i,r)}}}p.$childEls=i=(i?t.prune(i,!u):[])}return i},prune:function(j,h){var f=j.length,i={},g;while(f--){g=j[f];if(typeof g!="string"){g=g.name}if(!i[g]){i[g]=1}else{if(h){h=false;j=j.slice(0)}Ext.Array.erase(j,f,1)}}return j},removeChildEls:function(k){var l=this,i=l.getChildEls(),m=(l.childEls=[]),j,h,n;for(h=0,j=i.length;h<j;++h){n=i[h];if(!k(n)){m.push(n)}}}});Ext.define("Ext.util.Floating",{uses:["Ext.Layer","Ext.window.Window"],focusOnToFront:true,shadow:"sides",constructor:function(c){var d=this;d.el=new Ext.Layer(Ext.apply({hideMode:d.hideMode,hidden:d.hidden,shadow:(typeof d.shadow!="undefined")?d.shadow:"sides",shadowOffset:d.shadowOffset,constrain:false,shim:(d.shim===false)?false:undefined},d.floating),c);d.floating=true;d.registerWithOwnerCt()},registerWithOwnerCt:function(){var b=this;if(b.zIndexParent){b.zIndexParent.unregisterFloatingItem(b)}b.zIndexParent=b.up("[floating]");b.setFloatParent(b.ownerCt);delete b.ownerCt;if(b.zIndexParent){b.zIndexParent.registerFloatingItem(b)}else{Ext.WindowManager.register(b)}},setFloatParent:function(c){var d=this;if(d.floatParent){d.mun(d.floatParent,{hide:d.onFloatParentHide,show:d.onFloatParentShow,scope:d})}d.floatParent=c;if(c){d.mon(d.floatParent,{hide:d.onFloatParentHide,show:d.onFloatParentShow,scope:d})}if((d.constrain||d.constrainHeader)&&!d.constrainTo){d.constrainTo=c?c.getTargetEl():d.container}},onAfterFloatLayout:function(){this.syncShadow()},onFloatParentHide:function(){var b=this;if(b.hideOnParentHide!==false&&b.isVisible()){b.hide();b.showOnParentShow=true}},onFloatParentShow:function(){if(this.showOnParentShow){delete this.showOnParentShow;this.show()}},setZIndex:function(d){var c=this;c.el.setZIndex(d);d+=10;if(c.floatingItems){d=Math.floor(c.floatingItems.setBase(d)/100)*100+10000}return d},doConstrain:function(e){var h=this,f=h.getConstrainVector(e),g;if(f){g=h.getPosition();g[0]+=f[0];g[1]+=f[1];h.setPosition(g)}},getConstrainVector:function(d){var c=this;if(c.constrain||c.constrainHeader){d=d||(c.floatParent&&c.floatParent.getTargetEl())||c.container||c.el.getScopeParent();return(c.constrainHeader?c.header.el:c.el).getConstrainVector(d)}},alignTo:function(d,e,f){this.setPagePosition(this.el.getAlignToXY(d.el||d,e,f));return this},toFront:function(c){var d=this;if(d.zIndexParent&&d.bringParentToFront!==false){d.zIndexParent.toFront(true)}if(!Ext.isDefined(c)){c=!d.focusOnToFront}if(c){d.preventFocusOnActivate=true}if(d.zIndexManager.bringToFront(d)){if(!c){d.focus(false,true)}}delete d.preventFocusOnActivate;return d},setActive:function(d,f){var e=this;if(d){if(e.el.shadow&&!e.maximized){e.el.enableShadow(true)}if(e.modal&&!e.preventFocusOnActivate){e.focus(false,true)}e.fireEvent("activate",e)}else{if(e.isWindow&&(f&&f.isWindow)){e.el.disableShadow()}e.fireEvent("deactivate",e)}},toBack:function(){this.zIndexManager.sendToBack(this);return this},center:function(){var d=this,c;if(d.isVisible()){c=d.el.getAlignToXY(d.container,"c-c");d.setPagePosition(c)}else{d.needsCenter=true}return d},onFloatShow:function(){if(this.needsCenter){this.center()}delete this.needsCenter},syncShadow:function(){if(this.floating){this.el.sync(true)}},fitContainer:function(){var f=this.floatParent,e=f?f.getTargetEl():this.container,d=e.getViewSize(false);this.setSize(d)}});Ext.define("Ext.fx.CubicBezier",{singleton:true,cubicBezierAtTime:function(q,A,C,r,s,w){var v=3*A,t=3*(r-A)-v,D=1-v-t,x=3*C,u=3*(s-C)-x,p=1-x-u;function y(a){return((D*a+t)*a+v)*a}function B(c,a){var b=z(c,a);return((p*b+u)*b+x)*b}function z(h,a){var b,c,e,g,d,f;for(e=h,f=0;f<8;f++){g=y(e)-h;if(Math.abs(g)<a){return e}d=(3*D*e+2*t)*e+v;if(Math.abs(d)<0.000001){break}e=e-g/d}b=0;c=1;e=h;if(e<b){return b}if(e>c){return c}while(b<c){g=y(e);if(Math.abs(g-h)<a){return e}if(h>g){b=e}else{c=e}e=(c-b)/2+b}return e}return B(q,1/(200*w))},cubicBezier:function(f,h,g,j){var i=function(a){return Ext.fx.CubicBezier.cubicBezierAtTime(a,f,h,g,j,1)};i.toCSS3=function(){return"cubic-bezier("+[f,h,g,j].join(",")+")"};i.reverse=function(){return Ext.fx.CubicBezier.cubicBezier(1-g,1-j,1-f,1-h)};return i}});Ext.define("Ext.util.Sortable",{isSortable:true,defaultSortDirection:"ASC",requires:["Ext.util.Sorter"],initSortable:function(){var d=this,c=d.sorters;d.sorters=new Ext.util.AbstractMixedCollection(false,function(a){return a.id||a.property});if(c){d.sorters.addAll(d.decodeSorters(c))}},sort:function(l,m,p,n){var o=this,k,i,j;if(Ext.isArray(l)){n=p;p=m;j=l}else{if(Ext.isObject(l)){n=p;p=m;j=[l]}else{if(Ext.isString(l)){k=o.sorters.get(l);if(!k){k={property:l,direction:m};j=[k]}else{if(m===undefined){k.toggle()}else{k.setDirection(m)}}}}}if(j&&j.length){j=o.decodeSorters(j);if(Ext.isString(p)){if(p==="prepend"){l=o.sorters.clone().items;o.sorters.clear();o.sorters.addAll(j);o.sorters.addAll(l)}else{o.sorters.addAll(j)}}else{o.sorters.clear();o.sorters.addAll(j)}}if(n!==false){o.onBeforeSort(j);l=o.sorters.items;if(l.length){o.doSort(o.generateComparator())}}return l},generateComparator:function(){var b=this.sorters.getRange();return b.length?this.createComparator(b):this.emptyComparator},createComparator:function(b){return function(i,j){var a=b[0].sort(i,j),g=b.length,h=1;for(;h<g;h++){a=a||b[h].sort.call(this,i,j)}return a}},emptyComparator:function(){return 0},onBeforeSort:Ext.emptyFn,decodeSorters:function(k){if(!Ext.isArray(k)){if(k===undefined){k=[]}else{k=[k]}}var m=k.length,j=Ext.util.Sorter,i=this.model?this.model.prototype.fields:null,l,h,n;for(n=0;n<m;n++){h=k[n];if(!(h instanceof j)){if(Ext.isString(h)){h={property:h}}Ext.applyIf(h,{root:this.sortRoot,direction:"ASC"});if(h.fn){h.sorterFn=h.fn}if(typeof h=="function"){h={sorterFn:h}}if(i&&!h.transform){l=i.get(h.property);h.transform=l?l.sortType:undefined}k[n]=new Ext.util.Sorter(h)}}return k},getSorters:function(){return this.sorters.items}});Ext.define("Ext.data.proxy.Proxy",{alias:"proxy.proxy",alternateClassName:["Ext.data.DataProxy","Ext.data.Proxy"],uses:["Ext.data.Batch","Ext.data.Operation","Ext.data.Model"],mixins:{observable:"Ext.util.Observable"},batchOrder:"create,update,destroy",batchActions:true,defaultReaderType:"json",defaultWriterType:"json",isProxy:true,constructor:function(b){b=b||{};if(b.model===undefined){delete b.model}Ext.apply(this,b);this.mixins.observable.constructor.call(this);if(this.model!==undefined&&!(this.model instanceof Ext.data.Model)){this.setModel(this.model)}},setModel:function(e,h){this.model=Ext.ModelManager.getModel(e);var f=this.reader,g=this.writer;this.setReader(f);this.setWriter(g);if(h&&this.store){this.store.setModel(this.model)}},getModel:function(){return this.model},setReader:function(d){var c=this;if(d===undefined||typeof d=="string"){d={type:d}}if(d.isReader){d.setModel(c.model)}else{Ext.applyIf(d,{proxy:c,model:c.model,type:c.defaultReaderType});d=Ext.createByAlias("reader."+d.type,d)}if(d.onMetaChange){d.onMetaChange=Ext.Function.createSequence(d.onMetaChange,this.onMetaChange,this)}c.reader=d;return c.reader},getReader:function(){return this.reader},onMetaChange:function(b){this.fireEvent("metachange",this,b)},setWriter:function(b){if(b===undefined||typeof b=="string"){b={type:b}}if(!(b instanceof Ext.data.writer.Writer)){Ext.applyIf(b,{model:this.model,type:this.defaultWriterType});b=Ext.createByAlias("writer."+b.type,b)}this.writer=b;return this.writer},getWriter:function(){return this.writer},create:Ext.emptyFn,read:Ext.emptyFn,update:Ext.emptyFn,destroy:Ext.emptyFn,batch:function(a,q){var r=this,s=r.batchActions,u,y,v,x,w,p,z,o,t;if(a.operations===undefined){a={operations:a,listeners:q}}if(a.batch){if(Ext.isDefined(a.batch.runOperation)){u=Ext.applyIf(a.batch,{proxy:r,listeners:{}})}}else{a.batch={proxy:r,listeners:a.listeners||{}}}if(!u){u=new Ext.data.Batch(a.batch)}u.on("complete",Ext.bind(r.onBatchComplete,r,[a],0));v=r.batchOrder.split(",");x=v.length;for(p=0;p<x;p++){w=v[p];y=a.operations[w];if(y){if(s){u.add(new Ext.data.Operation({action:w,records:y}))}else{o=y.length;for(z=0;z<o;z++){t=y[z];u.add(new Ext.data.Operation({action:w,records:[t]}))}}}}u.start();return u},onBatchComplete:function(e,d){var f=e.scope||this;if(d.hasException){if(Ext.isFunction(e.failure)){Ext.callback(e.failure,f,[d,e])}}else{if(Ext.isFunction(e.success)){Ext.callback(e.success,f,[d,e])}}if(Ext.isFunction(e.callback)){Ext.callback(e.callback,f,[d,e])}}},function(){Ext.data.DataProxy=this});Ext.define("Ext.data.Operation",{synchronous:true,action:undefined,filters:undefined,sorters:undefined,groupers:undefined,start:undefined,limit:undefined,batch:undefined,callback:undefined,scope:undefined,started:false,running:false,complete:false,success:undefined,exception:false,error:undefined,actionCommitRecordsRe:/^(?:create|update)$/i,actionSkipSyncRe:/^destroy$/i,constructor:function(b){Ext.apply(this,b||{})},commitRecords:function(h){var k=this,j,n,m,l,i;if(!k.actionSkipSyncRe.test(k.action)){m=k.records;if(m&&m.length){if(m.length>1){j=new Ext.util.MixedCollection();j.addAll(h);for(n=m.length;n--;){i=m[n];l=j.findBy(function(a){var b=i.getId();if(b&&a.getId()===b){return true}return a.internalId===i.internalId});k.updateClientRecord(i,l)}}else{i=m[0];l=h[0];if(l&&(i.phantom||i.getId()===l.getId())){k.updateClientRecord(i,l)}}if(k.actionCommitRecordsRe.test(k.action)){for(n=m.length;n--;){m[n].commit()}}}}},updateClientRecord:function(f,l){if(f&&l){f.beginEdit();var h=f.fields.items,i=h.length,j,k;for(k=0;k<i;k++){j=h[k];if(j.persist){f.set(j.name,l.get(j.name))}}if(f.phantom){f.setId(l.getId())}f.endEdit(true)}},setStarted:function(){this.started=true;this.running=true},setCompleted:function(){this.complete=true;this.running=false},setSuccessful:function(){this.success=true},setException:function(b){this.exception=true;this.success=false;this.running=false;this.error=b},hasException:function(){return this.exception===true},getError:function(){return this.error},getRecords:function(){var b=this.getResultSet();return this.records||(b?b.records:null)},getResultSet:function(){return this.resultSet},isStarted:function(){return this.started===true},isRunning:function(){return this.running===true},isComplete:function(){return this.complete===true},wasSuccessful:function(){return this.isComplete()&&this.success===true},setBatch:function(b){this.batch=b},allowWrite:function(){return this.action!="read"}});Ext.define("Ext.util.Filter",{anyMatch:false,exactMatch:false,caseSensitive:false,constructor:function(d){var c=this;Ext.apply(c,d);c.filter=c.filter||c.filterFn;if(c.filter===undefined){if(c.property===undefined||c.value===undefined){}else{c.filter=c.createFilterFn()}c.filterFn=c.filter}},createFilterFn:function(){var e=this,f=e.createValueMatcher(),d=e.property;return function(b){var a=e.getRoot.call(e,b)[d];return f===null?a===null:f.test(a)}},getRoot:function(c){var d=this.root;return d===undefined?c:c[d]},createValueMatcher:function(){var k=this,j=k.value,i=k.anyMatch,l=k.exactMatch,h=k.caseSensitive,g=Ext.String.escapeRegex;if(j===null){return j}if(!j.exec){j=String(j);if(i===true){j=g(j)}else{j="^"+g(j);if(l===true){j+="$"}}j=new RegExp(j,h?"":"i")}return j}});Ext.define("Ext.app.Controller",{mixins:{observable:"Ext.util.Observable"},onClassExtended:function(l,r,m){var n=Ext.getClassName(l),q=n.match(/^(.*)\.controller\./),s,o,k,t,p;if(q!==null){s=Ext.Loader.getPrefix(n)||q[1];o=m.onBeforeCreated;k=[];t=["model","view","store"];m.onBeforeCreated=function(i,f){var e,c,h,b,g,d,a;for(e=0,c=t.length;e<c;e++){h=t[e];b=Ext.Array.from(f[h+"s"]);for(g=0,d=b.length;g<d;g++){a=b[g];if(Ext.ClassManager.isCreated(a)){continue}p=Ext.Loader.getPrefix(a);if(p===""||p===a){k.push(s+"."+h+"."+a)}else{k.push(a)}}}Ext.require(k,Ext.Function.pass(o,arguments,this))}}},constructor:function(b){this.mixins.observable.constructor.call(this,b);Ext.apply(this,b||{});this.createGetters("model",this.models);this.createGetters("store",this.stores);this.createGetters("view",this.views);if(this.refs){this.ref(this.refs)}},init:function(b){},onLaunch:function(b){},createGetters:function(m,k){m=Ext.String.capitalize(m);var n=0,r=(k)?k.length:0,l,q,p,i,o;for(;n<r;n++){l="get";q=k[n];p=q.split(".");o=p.length;for(i=0;i<o;i++){l+=Ext.String.capitalize(p[i])}l+=m;if(!this[l]){this[l]=Ext.Function.pass(this["get"+m],[q],this)}this[l](q)}},ref:function(i){i=Ext.Array.from(i);var k=this,h=0,l=i.length,j,m,n;for(;h<l;h++){j=i[h];m=j.ref;n="get"+Ext.String.capitalize(m);if(!k[n]){k[n]=Ext.Function.pass(k.getRef,[m,j],k)}k.references=k.references||[];k.references.push(m.toLowerCase())}},addRef:function(b){return this.ref([b])},getRef:function(i,h,g){this.refCache=this.refCache||{};h=h||{};g=g||{};Ext.apply(h,g);if(h.forceCreate){return Ext.ComponentManager.create(h,"component")}var j=this,f=j.refCache[i];if(!f){j.refCache[i]=f=Ext.ComponentQuery.query(h.selector)[0];if(!f&&h.autoCreate){j.refCache[i]=f=Ext.ComponentManager.create(h,"component")}if(f){f.on("beforedestroy",function(){j.refCache[i]=null})}}return f},hasRef:function(b){return this.references&&this.references.indexOf(b.toLowerCase())!==-1},control:function(d,c){this.application.control(d,c,this)},getController:function(b){return this.application.getController(b)},getStore:function(b){return this.application.getStore(b)},getModel:function(b){return this.application.getModel(b)},getView:function(b){return this.application.getView(b)}});Ext.define("Docs.LocalStore",{storeName:"",init:function(){this.localStorage=!!window.localStorage;this.store=Ext.create(this.storeName);if(this.localStorage){this.cleanup();this.store.load();if(window.addEventListener){window.addEventListener("storage",Ext.Function.bind(this.onStorageChange,this),false)}else{window.attachEvent("onstorage",Ext.Function.bind(this.onStorageChange,this))}}},onStorageChange:function(b){b=b||window.event;if(b.key===this.store.getProxy().id){this.store.load()}},syncStore:function(){this.localStorage&&this.store.sync()},cleanup:function(){var f=/-settings/;for(var d=0;d<window.localStorage.length;d++){var e=window.localStorage.key(d);if(!f.test(e)){window.localStorage.removeItem(e)}}}});Ext.define("Docs.Syntax",{singleton:true,highlight:function(b){Ext.Array.forEach(Ext.query("pre",b.dom||b),function(a){a=Ext.get(a);if(a.child("code")){if(!(a.hasCls("inline-example")&&a.hasCls("preview"))){a.addCls("prettyprint")}}else{if(!a.parent(".CodeMirror")&&!a.hasCls("hierarchy")){a.addCls("notpretty")}}});prettyPrint()}});Ext.define("Ext.form.field.Field",{isFormField:true,disabled:false,submitValue:true,validateOnChange:true,suspendCheckChange:0,initField:function(){this.addEvents("change","validitychange","dirtychange");this.initValue()},initValue:function(){var b=this;b.originalValue=b.lastValue=b.value;b.suspendCheckChange++;b.setValue(b.value);b.suspendCheckChange--},getName:function(){return this.name},getValue:function(){return this.value},setValue:function(c){var d=this;d.value=c;d.checkChange();return d},isEqual:function(c,d){return String(c)===String(d)},isEqualAsString:function(c,d){return String(Ext.value(c,""))===String(Ext.value(d,""))},getSubmitData:function(){var d=this,c=null;if(!d.disabled&&d.submitValue&&!d.isFileUpload()){c={};c[d.getName()]=""+d.getValue()}return c},getModelData:function(){var d=this,c=null;if(!d.disabled&&!d.isFileUpload()){c={};c[d.getName()]=d.getValue()}return c},reset:function(){var b=this;b.setValue(b.originalValue);b.clearInvalid();delete b.wasValid},resetOriginalValue:function(){this.originalValue=this.getValue();this.checkDirty()},checkChange:function(){if(!this.suspendCheckChange){var f=this,d=f.getValue(),e=f.lastValue;if(!f.isEqual(d,e)&&!f.isDestroyed){f.lastValue=d;f.fireEvent("change",f,d,e);f.onChange(d,e)}}},onChange:function(c,d){if(this.validateOnChange){this.validate()}this.checkDirty()},isDirty:function(){var b=this;return !b.disabled&&!b.isEqual(b.getValue(),b.originalValue)},checkDirty:function(){var d=this,c=d.isDirty();if(c!==d.wasDirty){d.fireEvent("dirtychange",d,c);d.onDirtyChange(c);d.wasDirty=c}},onDirtyChange:Ext.emptyFn,getErrors:function(b){return[]},isValid:function(){var b=this;return b.disabled||Ext.isEmpty(b.getErrors())},validate:function(){var d=this,c=d.isValid();if(c!==d.wasValid){d.wasValid=c;d.fireEvent("validitychange",d,c)}return c},batchChanges:function(d){try{this.suspendCheckChange++;d()}catch(c){throw c}finally{this.suspendCheckChange--}this.checkChange()},isFileUpload:function(){return false},extractFileInput:function(){return null},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.util.TextMetrics",{statics:{shared:null,measure:function(g,i,h){var f=this,j=f.shared;if(!j){j=f.shared=new f(g,h)}j.bind(g);j.setFixedWidth(h||"auto");return j.getSize(i)},destroy:function(){var b=this;Ext.destroy(b.shared);b.shared=null}},constructor:function(e,f){var d=this.measure=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"textmetrics"});this.el=Ext.get(e);d.position("absolute");d.setLeftTop(-1000,-1000);d.hide();if(f){d.setWidth(f)}},getSize:function(f){var d=this.measure,e;d.update(f);e=d.getSize();d.update("");return e},bind:function(d){var c=this;c.el=Ext.get(d);c.measure.setStyle(c.el.getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"))},setFixedWidth:function(b){this.measure.setWidth(b)},getWidth:function(b){this.measure.dom.style.width="auto";return this.getSize(b).width},getHeight:function(b){return this.getSize(b).height},destroy:function(){var b=this;b.measure.remove();delete b.el;delete b.measure}},function(){Ext.Element.addMethods({getTextWidth:function(f,d,e){return Ext.Number.constrain(Ext.util.TextMetrics.measure(this.dom,Ext.value(f,this.dom.innerHTML,true)).width,d||0,e||1000000)}})});Ext.define("Ext.panel.Proxy",{alternateClassName:"Ext.dd.PanelProxy",moveOnDrag:true,constructor:function(e,d){var f=this;f.panel=e;f.id=f.panel.id+"-ddproxy";Ext.apply(f,d)},insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost.el},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){var b=this;if(b.ghost){if(b.proxy){b.proxy.remove();delete b.proxy}b.panel.unghost(null,b.moveOnDrag);delete b.ghost}},show:function(){var c=this,d;if(!c.ghost){d=c.panel.getSize();c.panel.el.setVisibilityMode(Ext.Element.DISPLAY);c.ghost=c.panel.ghost();if(c.insertProxy){c.proxy=c.panel.el.insertSibling({cls:Ext.baseCSSPrefix+"panel-dd-spacer"});c.proxy.setSize(d)}}},repair:function(d,f,e){this.hide();Ext.callback(f,e||this)},moveProxy:function(d,c){if(this.proxy){d.insertBefore(this.proxy.dom,c)}}});Ext.define("Ext.Template",{requires:["Ext.dom.Helper","Ext.util.Format"],inheritableStatics:{from:function(c,d){c=Ext.getDom(c);return new this(c.value||c.innerHTML,d||"")}},constructor:function(m){var k=this,h=arguments,i=[],n=0,l=h.length,j;k.initialConfig={};if(l>1){for(;n<l;n++){j=h[n];if(typeof j=="object"){Ext.apply(k.initialConfig,j);Ext.apply(k,j)}else{i.push(j)}}m=i.join("")}else{if(Ext.isArray(m)){i.push(m.join(""))}else{i.push(m)}}k.html=i.join("");if(k.compiled){k.compile()}},isTemplate:true,disableFormats:false,re:/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,apply:function(i){var j=this,m=j.disableFormats!==true,k=Ext.util.Format,n=j,h;if(j.compiled){return j.compiled(i).join("")}function l(d,b,a,c){if(a&&m){if(c){c=[i[b]].concat(Ext.functionFactory("return ["+c+"];")())}else{c=[i[b]]}if(a.substr(0,5)=="this."){return n[a.substr(5)].apply(n,c)}else{return k[a].apply(k,c)}}else{return i[b]!==undefined?i[b]:""}}h=j.html.replace(j.re,l);return h},applyOut:function(e,d){var f=this;if(f.compiled){d.push.apply(d,f.compiled(e))}else{d.push(f.apply(e))}return d},applyTemplate:function(){return this.apply.apply(this,arguments)},set:function(e,f){var d=this;d.html=e;d.compiled=null;return f?d.compile():d},compileARe:/\\/g,compileBRe:/(\r\n|\n)/g,compileCRe:/'/g,compile:function(){var me=this,fm=Ext.util.Format,useFormat=me.disableFormats!==true,body,bodyReturn;function fn(m,name,format,args){if(format&&useFormat){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format="this."+format.substr(5)+"("}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"',"+format+"values['"+name+"']"+args+") ,'"}bodyReturn=me.html.replace(me.compileARe,"\\\\").replace(me.compileBRe,"\\n").replace(me.compileCRe,"\\'").replace(me.re,fn);body="this.compiled = function(values){ return ['"+bodyReturn+"'];};";eval(body);return me},insertFirst:function(d,e,f){return this.doInsert("afterBegin",d,e,f)},insertBefore:function(d,e,f){return this.doInsert("beforeBegin",d,e,f)},insertAfter:function(d,e,f){return this.doInsert("afterEnd",d,e,f)},append:function(d,e,f){return this.doInsert("beforeEnd",d,e,f)},doInsert:function(f,i,g,h){var j=Ext.DomHelper.insertHtml(f,Ext.getDom(i),this.apply(g));return h?Ext.get(j):j},overwrite:function(h,f,g){var e=Ext.DomHelper.overwrite(Ext.getDom(h),this.apply(f));return g?Ext.get(e):e}});Ext.define("Ext.util.Animate",{uses:["Ext.fx.Manager","Ext.fx.Anim"],animate:function(d){var c=this;if(Ext.fx.Manager.hasFxBlock(c.id)){return c}Ext.fx.Manager.queueFx(new Ext.fx.Anim(c.anim(d)));return this},anim:function(d){if(!Ext.isObject(d)){return(d)?{}:false}var c=this;if(d.stopAnimation){c.stopAnimation()}Ext.applyIf(d,Ext.fx.Manager.getFxDefaults(c.id));return Ext.apply({target:c,paused:true},d)},stopFx:Ext.Function.alias(Ext.util.Animate,"stopAnimation"),stopAnimation:function(){Ext.fx.Manager.stopAnimation(this.id);return this},syncFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:true});return this},sequenceFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:false});return this},hasActiveFx:Ext.Function.alias(Ext.util.Animate,"getActiveAnimation"),getActiveAnimation:function(){return Ext.fx.Manager.getActiveAnimation(this.id)}},function(){Ext.applyIf(Ext.Element.prototype,this.prototype);Ext.CompositeElementLite.importElementMethods()});Ext.define("Ext.util.Renderable",{requires:["Ext.dom.Element"],frameCls:Ext.baseCSSPrefix+"frame",frameIdRegex:/[\-]frame\d+[TMB][LCR]$/,frameElementCls:{tl:[],tc:[],tr:[],ml:[],mc:[],mr:[],bl:[],bc:[],br:[]},frameElNames:["TL","TC","TR","ML","MC","MR","BL","BC","BR"],frameTpl:["{%this.renderDockedItems(out,values,0);%}",'<tpl if="top">','<tpl if="left"><div id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl>" style="background-position: {tl}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl>" style="background-position: {tr}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>",'<tpl if="left"><div id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl>" style="background-position: {mr}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl>" role="presentation">',"{%this.applyRenderTpl(out, values)%}","</div>",'<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>','<tpl if="bottom">','<tpl if="left"><div id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl>" style="background-position: {br}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>","{%this.renderDockedItems(out,values,1);%}"],frameTableTpl:["{%this.renderDockedItems(out,values,0);%}","<table><tbody>",'<tpl if="top">',"<tr>",'<tpl if="left"><td id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl>" style="background-position: {tl}; padding-left:{frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></td>','<tpl if="right"><td id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl>" style="background-position: {tr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>","</tpl>","<tr>",'<tpl if="left"><td id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl>" style="background-position: 0 0;" role="presentation">',"{%this.applyRenderTpl(out, values)%}","</td>",'<tpl if="right"><td id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl>" style="background-position: {mr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>",'<tpl if="bottom">',"<tr>",'<tpl if="left"><td id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></td>','<tpl if="right"><td id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl>" style="background-position: {br}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>","</tpl>","</tbody></table>","{%this.renderDockedItems(out,values,1);%}"],afterRender:function(){var f=this,j={},h=f.protoEl,i=f.getTargetEl(),g;f.finishRenderChildren();if(f.styleHtmlContent){i.addCls(f.styleHtmlCls)}h.writeTo(j);g=j.removed;if(g){i.removeCls(g)}g=j.cls;if(g.length){i.addCls(g)}g=j.style;if(j.style){i.setStyle(g)}f.protoEl=null;if(!f.ownerCt){f.updateLayout()}},afterFirstLayout:function(m,i){var l=this,n=Ext.isDefined(l.x),h=Ext.isDefined(l.y),j,k;if(l.floating&&(!n||!h)){if(l.floatParent){k=l.el.getAlignToXY(l.floatParent.getTargetEl(),"c-c");j=l.floatParent.getTargetEl().translatePoints(k[0],k[1])}else{k=l.el.getAlignToXY(l.container,"c-c");j=l.container.translatePoints(k[0],k[1])}l.x=n?l.x:j.left;l.y=h?l.y:j.top;n=h=true}if(n||h){l.setPosition(l.x,l.y)}l.onBoxReady(m,i);if(l.hasListeners.boxready){l.fireEvent("boxready",l,m,i)}},onBoxReady:Ext.emptyFn,applyRenderSelectors:function(){var i=this,f=i.renderSelectors,j=i.el,h=j.dom,g;i.applyChildEls(j);if(f){for(g in f){if(f.hasOwnProperty(g)&&f[g]){i[g]=Ext.get(Ext.DomQuery.selectNode(f[g],h))}}}},beforeRender:function(){var c=this,d=c.getComponentLayout();if(!d.initialized){d.initLayout()}c.setUI(c.ui);if(c.disabled){c.disable(true)}},doApplyRenderTpl:function(h,f){var g=f.$comp,e;if(!g.rendered){e=g.initRenderTpl();e.applyOut(f.renderData,h)}},doAutoRender:function(){var b=this;if(!b.rendered){if(b.floating){b.render(document.body)}else{b.render(Ext.isBoolean(b.autoRender)?Ext.getBody():b.autoRender)}}},doRenderContent:function(e,f){var d=f.$comp;if(d.html){Ext.DomHelper.generateMarkup(d.html,e);delete d.html}if(d.tpl){if(!d.tpl.isTemplate){d.tpl=new Ext.XTemplate(d.tpl)}if(d.data){d.tpl.applyOut(d.data,e);delete d.data}}},doRenderFramingDockedItems:function(f,h,g){var e=h.$comp;if(!e.rendered&&e.doRenderDockedItems){h.renderData.$skipDockedItems=true;e.doRenderDockedItems.call(this,f,h,g)}},finishRender:function(n){var j=this,l,o,r,q,p,m,k;if(!j.el||j.$pid){if(j.container){q=j.container.getById(j.id,true)}else{q=Ext.getDom(j.id)}if(!j.el){j.wrapPrimaryEl(q)}else{delete j.$pid;if(!j.el.dom){j.wrapPrimaryEl(j.el)}q.parentNode.insertBefore(j.el.dom,q);Ext.removeNode(q)}}else{if(!j.rendering){l=j.initRenderTpl();if(l){o=j.initRenderData();l.insertFirst(j.getTargetEl(),o)}}}if(!j.container){j.container=Ext.get(j.el.dom.parentNode)}if(j.ctCls){j.container.addCls(j.ctCls)}j.onRender(j.container,n);k=j.getTargetEl();k.setStyle(j.getOverflowStyle());j.el.setVisibilityMode(Ext.Element[j.hideMode.toUpperCase()]);if(j.overCls){j.el.hover(j.addOverCls,j.removeOverCls,j)}if(j.hasListeners.render){j.fireEvent("render",j)}if(j.contentEl){p=Ext.baseCSSPrefix;m=p+"hide-";r=Ext.get(j.contentEl);r.removeCls([p+"hidden",m+"display",m+"offsets",m+"nosize"]);k.appendChild(r.dom)}j.afterRender();if(j.hasListeners.afterrender){j.fireEvent("afterrender",j)}j.initEvents();if(j.hidden){j.el.hide()}},finishRenderChildren:function(){var b=this.getComponentLayout();b.finishRender()},getElConfig:function(){var l=this,k=l.autoEl,n=l.getFrameInfo(),r={tag:"div",id:l.id,tpl:n?l.initFramingTpl(n.table):l.initRenderTpl()},q,o,m,i,p;l.initStyles(l.protoEl);l.protoEl.writeTo(r);l.protoEl.flush();if(Ext.isString(k)){r.tag=k}else{Ext.apply(r,k)}if(r.tpl){if(n){o=l.frameElNames;m=o.length;p=l.id+"-frame1";l.frameGenId=1;r.tplData=Ext.apply({},{$comp:l,fgid:p,ui:l.ui,uiCls:l.uiCls,frameCls:l.frameCls,baseCls:l.baseCls,frameWidth:n.maxWidth,top:!!n.top,left:!!n.left,right:!!n.right,bottom:!!n.bottom,renderData:l.initRenderData()},l.getFramePositions(n));for(q=0;q<m;q++){i=o[q];l.addChildEls({name:"frame"+i,id:p+i})}l.addChildEls({name:"frameBody",id:p+"MC"})}else{r.tplData=l.initRenderData()}}return r},initFramingTpl:function(c){var d=c?this.getTpl("frameTableTpl"):this.getTpl("frameTpl");if(d&&!d.applyRenderTpl){this.setupFramingTpl(d)}return d},setupFramingTpl:function(b){b.applyRenderTpl=this.doApplyRenderTpl;b.renderDockedItems=this.doRenderFramingDockedItems},getInsertPosition:function(b){if(b!==undefined){if(Ext.isNumber(b)){b=this.container.dom.childNodes[b]}else{b=Ext.getDom(b)}}return b},getRenderTree:function(){var b=this;if(!b.hasListeners.beforerender||b.fireEvent("beforerender",b)!==false){b.beforeRender();b.rendering=true;if(b.el){return{tag:"div",id:(b.$pid=Ext.id())}}return b.getElConfig()}return null},initContainer:function(d){var c=this;if(!d&&c.el){d=c.el.dom.parentNode;c.allowDomMove=false}c.container=d.dom?d:Ext.get(d);return c.container},initRenderData:function(){var b=this;return Ext.apply({$comp:b,id:b.id,ui:b.ui,uiCls:b.uiCls,baseCls:b.baseCls,componentCls:b.componentCls,frame:b.frame},b.renderData)},initRenderTpl:function(){var b=this.getTpl("renderTpl");if(b&&!b.renderContent){this.setupRenderTpl(b)}return b},onRender:function(o,n){var m=this,k=m.x,l=m.y,p,r,j,q=m.el;if(Ext.scopeResetCSS&&!m.ownerCt){if(q.dom==Ext.getBody().dom){q.parent().addCls(Ext.resetCls)}else{m.resetEl=q.wrap({cls:Ext.resetCls})}}m.applyRenderSelectors();delete m.rendering;m.rendered=true;p=null;if(k!==undefined){p=p||{};p.x=k}if(l!==undefined){p=p||{};p.y=l}if(!m.getFrameInfo()&&Ext.isBorderBox){r=m.width;j=m.height;if(typeof r=="number"){p=p||{};p.width=r}if(typeof j=="number"){p=p||{};p.height=j}}m.lastBox=m.el.lastBox=p},render:function(l,g){var j=this,k=j.el&&(j.el=Ext.get(j.el)),h,i;Ext.suspendLayouts();l=j.initContainer(l);i=j.getInsertPosition(g);if(!k){h=j.getRenderTree();if(h){if(i){k=Ext.DomHelper.insertBefore(i,h)}else{k=Ext.DomHelper.append(l,h)}j.wrapPrimaryEl(k)}}else{j.initStyles(k);if(j.allowDomMove!==false){if(i){l.dom.insertBefore(k.dom,i)}else{l.dom.appendChild(k.dom)}}}if(k){j.finishRender(g)}Ext.resumeLayouts(!l.isDetachedBody)},ensureAttachedToBody:function(f){var d=this,e;while(d.ownerCt){d=d.ownerCt}if(d.container.isDetachedBody){d.container=e=Ext.getBody();e.appendChild(d.el.dom);if(f){d.updateLayout()}if(typeof d.x=="number"||typeof d.y=="number"){d.setPosition(d.x,d.y)}}},setupRenderTpl:function(b){b.renderBody=b.renderContent=this.doRenderContent},wrapPrimaryEl:function(b){this.el=Ext.get(b,true)},initFrame:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return}var l=this,n=l.getFrameInfo(),k,r,p,q,o=l.frameElNames,m=o.length,i;if(n){k=n.maxWidth;r=l.getFrameTpl(n.table);l.frameGenId=p=(l.frameGenId||0)+1;p=l.id+"-frame"+p;r.insertFirst(l.el,Ext.apply({$comp:l,fgid:p,ui:l.ui,uiCls:l.uiCls,frameCls:l.frameCls,baseCls:l.baseCls,frameWidth:k,top:!!n.top,left:!!n.left,right:!!n.right,bottom:!!n.bottom},l.getFramePositions(n)));l.frameBody=l.el.down("."+l.frameCls+"-mc");l.removeChildEls(function(a){return a.id&&l.frameIdRegex.test(a.id)});for(q=0;q<m;q++){i=o[q];l["frame"+i]=l.el.getById(p+i)}}},updateFrame:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return}var l=this,j=this.frameSize&&this.frameSize.table,k=this.frameTL,m=this.frameBL,n=this.frameML,i=this.frameMC,h;this.initFrame();if(i){if(l.frame){h=this.frameMC.dom.className;i.insertAfter(this.frameMC);this.frameMC.remove();this.frameBody=this.frameMC=i;i.dom.className=h;if(j){l.el.query("> table")[1].remove()}else{if(k){k.remove()}if(m){m.remove()}if(n){n.remove()}}}}else{if(l.frame){this.applyRenderSelectors()}}},getFrameInfo:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return false}var m=this,k=m.frameInfoCache,r=m.el||m.protoEl,j=r.dom?r.dom.className:r.classList.join(" "),o=k[j],n,p,l,q;if(o==null){n=Ext.fly(m.getStyleProxy(j),"frame-style-el");p=n.getStyle("background-position-x");l=n.getStyle("background-position-y");if(!p&&!l){q=n.getStyle("background-position").split(" ");p=q[0];l=q[1]}o=m.calculateFrame(p,l);if(o){r.setStyle("background-image","none")}if(m.frame===true&&!o){Ext.log.error("You have set frame: true explicity on this component ("+m.getXType()+") and it does not have any framing defined in the CSS template. In this case IE cannot figure out what sizes to use and thus framing on this component will be disabled.")}k[j]=o}m.frame=!!o;m.frameSize=o;return o},calculateFrame:function(l,m){if(!(parseInt(l,10)>=1000000&&parseInt(m,10)>=1000000)){return false}var j=Math.max,i=parseInt(l.substr(3,2),10),n=parseInt(l.substr(5,2),10),p=parseInt(m.substr(3,2),10),k=parseInt(m.substr(5,2),10),o={table:l.substr(0,3)=="110",vertical:m.substr(0,3)=="110",top:j(i,n),right:j(n,p),bottom:j(k,p),left:j(i,k)};o.maxWidth=j(o.top,o.right,o.bottom,o.left);o.width=o.left+o.right;o.height=o.top+o.bottom;return o},getStyleProxy:function(c){var d=this.styleProxyEl||(Ext.AbstractComponent.prototype.styleProxyEl=Ext.getBody().createChild({style:{position:"absolute",top:"-10000px"}},null,true));d.className=c;return d},getFramePositions:function(n){var l=this,k=n.maxWidth,j=l.dock,o,q,m,p,r;if(n.vertical){q="0 -"+(k*0)+"px";m="0 -"+(k*1)+"px";if(j&&j=="right"){q="right -"+(k*0)+"px";m="right -"+(k*1)+"px"}o={tl:"0 -"+(k*0)+"px",tr:"0 -"+(k*1)+"px",bl:"0 -"+(k*2)+"px",br:"0 -"+(k*3)+"px",ml:"-"+(k*1)+"px 0",mr:"right 0",tc:q,bc:m}}else{p="-"+(k*0)+"px 0";r="right 0";if(j&&j=="bottom"){p="left bottom";r="right bottom"}o={tl:"0 -"+(k*2)+"px",tr:"right -"+(k*3)+"px",bl:"0 -"+(k*4)+"px",br:"right -"+(k*5)+"px",ml:p,mr:r,tc:"0 -"+(k*0)+"px",bc:"0 -"+(k*1)+"px"}}return o},getFrameTpl:function(b){return this.getTpl(b?"frameTableTpl":"frameTpl")},frameInfoCache:{}});Ext.define("Ext.ComponentQuery",{singleton:true,uses:["Ext.ComponentManager"]},function(){var t=this,q=["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(""),v=function(a,b){return b.method.apply(this,[a].concat(b.args))},z=function(e,a){var g=[],d=0,b=e.length,c,f=a!==">";for(;d<b;d++){c=e[d];if(c.getRefItems){g=g.concat(c.getRefItems(f))}}return g},u=function(d){var e=[],c=0,a=d.length,b;for(;c<a;c++){b=d[c];while(!!(b=(b.ownerCt||b.floatParent))){e.push(b)}}return e},o=function(f,a,b){if(a==="*"){return f.slice()}else{var g=[],e=0,c=f.length,d;for(;e<c;e++){d=f[e];if(d.isXType(a,b)){g.push(d)}}return g}},r=function(f,c){var a=Ext.Array,g=[],e=0,b=f.length,d;for(;e<b;e++){d=f[e];if(d.hasCls(c)){g.push(d)}}return g},n=function(f,a,g,b){var h=[],e=0,c=f.length,d;for(;e<c;e++){d=f[e];if(!b?!!d[a]:(String(d[a])===b)){h.push(d)}}return h},w=function(e,a){var f=[],d=0,b=e.length,c;for(;d<b;d++){c=e[d];if(c.getItemId()===a){f.push(c)}}return f},p=function(c,b,a){return t.pseudos[b](c,a)},s=/^(\s?([>\^])\s?|\s|$)/,x=/^(#)?([\w\-]+|\*)(?:\((true|false)\))?/,y=[{re:/^\.([\w\-]+)(?:\((true|false)\))?/,method:o},{re:/^(?:[\[](?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]])/,method:n},{re:/^#([\w\-]+)/,method:w},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,method:p},{re:/^(?:\{([^\}]+)\})/,method:q}];t.Query=Ext.extend(Object,{constructor:function(a){a=a||{};Ext.apply(this,a)},execute:function(e){var c=this.operations,b=0,a=c.length,d,f;if(!e){f=Ext.ComponentManager.all.getArray()}else{if(Ext.isArray(e)){f=e}else{if(e.isMixedCollection){f=e.items}}}for(;b<a;b++){d=c[b];if(d.mode==="^"){f=u(f||[e])}else{if(d.mode){f=z(f||[e],d.mode)}else{f=v(f||z([e]),d)}}if(b===a-1){return f}}return[]},is:function(e){var f=this.operations,b=Ext.isArray(e)?e:[e],g=b.length,a=f[f.length-1],c,d;b=v(b,a);if(b.length===g){if(f.length>1){for(d=0,c=b.length;d<c;d++){if(Ext.Array.indexOf(this.execute(),b[d])===-1){return false}}}return true}return false}});Ext.apply(this,{cache:{},pseudos:{not:function(b,h){var a=Ext.ComponentQuery,d=0,c=b.length,e=[],f=-1,g;for(;d<c;++d){g=b[d];if(!a.is(g,h)){e[++f]=g}}return e},last:function(a){return a[a.length-1]}},query:function(d,h){var g=d.split(","),e=g.length,c=0,b=[],f=[],i={},k,a,j;for(;c<e;c++){d=Ext.String.trim(g[c]);k=this.cache[d]||(this.cache[d]=this.parse(d));b=b.concat(k.execute(h))}if(e>1){a=b.length;for(c=0;c<a;c++){j=b[c];if(!i[j.id]){f.push(j);i[j.id]=true}}b=f}return b},is:function(e,f){if(!f){return true}var c=f.split(","),b=c.length,d=0,a;for(;d<b;d++){f=Ext.String.trim(c[d]);a=this.cache[f]||(this.cache[f]=this.parse(f));if(a.is(e)){return true}}},parse:function(b){var d=[],c=y.length,i,a,h,g,f,k,j,e;while(b&&i!==b){i=b;a=b.match(x);if(a){h=a[1];if(h==="#"){d.push({method:w,args:[Ext.String.trim(a[2])]})}else{if(h==="."){d.push({method:r,args:[Ext.String.trim(a[2])]})}else{d.push({method:o,args:[Ext.String.trim(a[2]),Boolean(a[3])]})}}b=b.replace(a[0],"")}while(!(g=b.match(s))){for(k=0;b&&k<c;k++){j=y[k];f=b.match(j.re);e=j.method;if(f){d.push({method:Ext.isString(j.method)?Ext.functionFactory("items",Ext.String.format.apply(Ext.String,[e].concat(f.slice(1)))):j.method,args:f.slice(1)});b=b.replace(f[0],"");break}if(k===(c-1)){Ext.Error.raise('Invalid ComponentQuery selector: "'+arguments[0]+'"')}}}if(g[1]){d.push({mode:g[2]||g[1]});b=b.replace(g[0],"")}}return new t.Query({operations:d})}})});Ext.define("Ext.util.ProtoElement",(function(){var c=Ext.String.splitWords,d=Ext.Array.toMap;return{isProtoEl:true,clsProp:"cls",styleProp:"style",removedProp:"removed",styleIsText:false,constructor:function(b){var a=this;Ext.apply(a,b);a.classList=c(a.cls);a.classMap=d(a.classList);delete a.cls;if(Ext.isFunction(a.style)){a.styleFn=a.style;delete a.style}else{if(typeof a.style=="string"){a.style=Ext.Element.parseStyles(a.style)}else{if(a.style){a.style=Ext.apply({},a.style)}}}},flush:function(){this.flushClassList=[];this.removedClasses={};delete this.style},addCls:function(a){var i=this,b=c(a),r=b.length,o=i.classList,s=i.classMap,q=i.flushClassList,p=0,n;for(;p<r;++p){n=b[p];if(!s[n]){s[n]=true;o.push(n);if(q){q.push(n);delete i.removedClasses[n]}}}return i},hasCls:function(a){return a in this.classMap},removeCls:function(a){var b=this,o=b.classList,s=(b.classList=[]),q=d(c(a)),t=o.length,u=b.classMap,p=b.removedClasses,r,i;for(r=0;r<t;++r){i=o[r];if(q[i]){if(p){if(u[i]){p[i]=true;Ext.Array.remove(b.flushClassList,i)}}delete u[i]}else{s.push(i)}}return b},setStyle:function(a,b){var g=this,h=g.style||(g.style={});if(typeof a=="string"){if(arguments.length===1){g.setStyle(Ext.Element.parseStyles(a))}else{h[a]=b}}else{Ext.apply(h,a)}return g},writeTo:function(a){var h=this,b=h.flushClassList||h.classList,i=h.removedClasses,j;if(h.styleFn){j=Ext.apply({},h.styleFn());Ext.apply(j,h.style)}else{j=h.style}a[h.clsProp]=b.join(" ");if(j){a[h.styleProp]=h.styleIsText?Ext.DomHelper.generateStyles(j):j}if(i){i=Ext.Object.getKeys(i);if(i.length){a[h.removedProp]=i.join(" ")}}return a}}}()));Ext.define("Ext.util.AbstractMixedCollection",{requires:["Ext.util.Filter"],mixins:{observable:"Ext.util.Observable"},isMixedCollection:true,generation:0,constructor:function(d,e){var f=this;f.items=[];f.map={};f.keys=[];f.length=0;f.allowFunctions=d===true;if(e){f.getKey=e}f.mixins.observable.constructor.call(f)},allowFunctions:false,add:function(g,j){var k=this,i=j,l=g,h;if(arguments.length==1){i=l;l=k.getKey(i)}if(typeof l!="undefined"&&l!==null){h=k.map[l];if(typeof h!="undefined"){return k.replace(l,i)}k.map[l]=i}k.generation++;k.length++;k.items.push(i);k.keys.push(l);if(k.hasListeners.add){k.fireEvent("add",k.length-1,i,l)}return i},getKey:function(b){return b.id},replace:function(j,h){var i=this,g,f;if(arguments.length==1){h=arguments[0];j=i.getKey(h)}g=i.map[j];if(typeof j=="undefined"||j===null||typeof g=="undefined"){return i.add(j,h)}i.generation++;f=i.indexOfKey(j);i.items[f]=h;i.map[j]=h;if(i.hasListeners.replace){i.fireEvent("replace",j,g,h)}return h},addAll:function(i){var j=this,k=0,g,h,l;if(arguments.length>1||Ext.isArray(i)){g=arguments.length>1?arguments:i;for(h=g.length;k<h;k++){j.add(g[k])}}else{for(l in i){if(i.hasOwnProperty(l)){if(j.allowFunctions||typeof i[l]!="function"){j.add(l,i[l])}}}}},each:function(j,k){var g=[].concat(this.items),l=0,h=g.length,i;for(;l<h;l++){i=g[l];if(j.call(k||i,i,l,h)===false){break}}},eachKey:function(j,k){var i=this.keys,g=this.items,l=0,h=i.length;for(;l<h;l++){j.call(k||window,i[l],g[l],l,h)}},findBy:function(j,k){var i=this.keys,g=this.items,l=0,h=g.length;for(;l<h;l++){if(j.call(k||window,g[l],i[l])){return g[l]}}return null},find:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.util.MixedCollection: find has been deprecated. Use findBy instead.")}return this.findBy.apply(this,arguments)},insert:function(h,g,j){var k=this,l=g,i=j;if(arguments.length==2){i=l;l=k.getKey(i)}if(k.containsKey(l)){k.suspendEvents();k.removeAtKey(l);k.resumeEvents()}if(h>=k.length){return k.add(l,i)}k.generation++;k.length++;Ext.Array.splice(k.items,h,0,i);if(typeof l!="undefined"&&l!==null){k.map[l]=i}Ext.Array.splice(k.keys,h,0,l);if(k.hasListeners.add){k.fireEvent("add",h,i,l)}return i},remove:function(b){this.generation++;return this.removeAt(this.indexOf(b))},removeAll:function(d){d=[].concat(d);var f,e=d.length;for(f=0;f<e;f++){this.remove(d[f])}return this},removeAt:function(f){var h=this,g,e;if(f<h.length&&f>=0){h.length--;g=h.items[f];Ext.Array.erase(h.items,f,1);e=h.keys[f];if(typeof e!="undefined"){delete h.map[e]}Ext.Array.erase(h.keys,f,1);if(h.hasListeners.remove){h.fireEvent("remove",g,e)}h.generation++;return g}return false},removeAtKey:function(b){return this.removeAt(this.indexOfKey(b))},getCount:function(){return this.length},indexOf:function(b){return Ext.Array.indexOf(this.items,b)},indexOfKey:function(b){return Ext.Array.indexOf(this.keys,b)},get:function(e){var g=this,f=g.map[e],h=f!==undefined?f:(typeof e=="number")?g.items[e]:undefined;return typeof h!="function"||g.allowFunctions?h:null},getAt:function(b){return this.items[b]},getByKey:function(b){return this.map[b]},contains:function(b){return typeof this.map[this.getKey(b)]!="undefined"},containsKey:function(b){return typeof this.map[b]!="undefined"},clear:function(){var b=this;b.length=0;b.items=[];b.keys=[];b.map={};b.generation++;if(b.hasListeners.clear){b.fireEvent("clear")}},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(l,i,k,j){var p=this.extractValues(l,i),m=p.length,n=0,o;k=k||0;j=(j||j===0)?j:m-1;for(o=k;o<=j;o++){n+=p[o]}return n},collect:function(l,p,n){var i=this.extractValues(l,p),t=i.length,s={},r=[],m,o,q;for(q=0;q<t;q++){m=i[q];o=String(m);if((n||!Ext.isEmpty(m))&&!s[o]){s[o]=true;r.push(m)}}return r},extractValues:function(f,e){var d=this.items;if(e){d=Ext.Array.pluck(d,e)}return Ext.Array.pluck(d,f)},getRange:function(i,h){var j=this,l=j.items,g=[],k;if(l.length<1){return g}i=i||0;h=Math.min(typeof h=="undefined"?j.length-1:h,j.length-1);if(i<=h){for(k=i;k<=h;k++){g[g.length]=l[k]}}else{for(k=i;k>=h;k--){g[g.length]=l[k]}}return g},filter:function(k,l,i,h){var g=[],j;if(Ext.isString(k)){g.push(new Ext.util.Filter({property:k,value:l,anyMatch:i,caseSensitive:h}))}else{if(Ext.isArray(k)||k instanceof Ext.util.Filter){g=g.concat(k)}}j=function(f){var a=true,o=g.length,e,b,c,d;for(e=0;e<o;e++){b=g[e];c=b.filterFn;d=b.scope;a=a&&c.call(d,f)}return a};return this.filterBy(j)},filterBy:function(n,o){var k=this,j=new this.self(),l=k.keys,i=k.items,m=i.length,p;j.getKey=k.getKey;for(p=0;p<m;p++){if(n.call(o||k,i[p],l[p])){j.add(l[p],i[p])}}return j},findIndex:function(j,f,h,i,g){if(Ext.isEmpty(f,false)){return -1}f=this.createValueMatcher(f,i,g);return this.findIndexBy(function(a){return a&&f.test(a[j])},null,h)},findIndexBy:function(n,o,k){var l=this,m=l.keys,i=l.items,p=k||0,j=i.length;for(;p<j;p++){if(n.call(o||l,i[p],m[p])){return p}}return -1},createValueMatcher:function(j,h,g,f){if(!j.exec){var i=Ext.String.escapeRegex;j=String(j);if(h===true){j=i(j)}else{j="^"+i(j);if(f===true){j+="$"}}j=new RegExp(j,g?"":"i")}return j},clone:function(){var j=this,i=new this.self(),k=j.keys,g=j.items,l=0,h=g.length;for(;l<h;l++){i.add(k[l],g[l])}i.getKey=j.getKey;return i}});Ext.define("Ext.data.SortTypes",{singleton:true,none:function(b){return b},stripTagsRE:/<\/?[^>]+>/gi,asText:function(b){return String(b).replace(this.stripTagsRE,"")},asUCText:function(b){return String(b).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(b){return String(b).toUpperCase()},asDate:function(b){if(!b){return 0}if(Ext.isDate(b)){return b.getTime()}return Date.parse(String(b))},asFloat:function(d){var c=parseFloat(String(d).replace(/,/g,""));return isNaN(c)?0:c},asInt:function(d){var c=parseInt(String(d).replace(/,/g,""),10);return isNaN(c)?0:c}});Ext.define("Ext.data.association.Association",{alternateClassName:"Ext.data.Association",primaryKey:"id",defaultReaderType:"json",statics:{AUTO_ID:1000,create:function(b){if(!b.isAssociation){if(Ext.isString(b)){b={type:b}}switch(b.type){case"belongsTo":return new Ext.data.association.BelongsTo(b);case"hasMany":return new Ext.data.association.HasMany(b);case"hasOne":return new Ext.data.association.HasOne(b);default:Ext.Error.raise('Unknown Association type: "'+b.type+'"')}}return b}},constructor:function(h){Ext.apply(this,h);var n=Ext.ModelManager.types,m=h.ownerModel,k=h.associatedModel,l=n[m],j=n[k],i;if(l===undefined){Ext.Error.raise("The configured ownerModel was not valid (you tried "+m+")")}if(j===undefined){Ext.Error.raise("The configured associatedModel was not valid (you tried "+k+")")}this.ownerModel=l;this.associatedModel=j;Ext.applyIf(this,{ownerName:m,associatedName:k});this.associationId="association"+(++this.statics().AUTO_ID)},getReader:function(){var f=this,e=f.reader,d=f.associatedModel;if(e){if(Ext.isString(e)){e={type:e}}if(e.isReader){e.setModel(d)}else{Ext.applyIf(e,{model:d,type:f.defaultReaderType})}f.reader=Ext.createByAlias("reader."+e.type,e)}return f.reader||null}});Ext.define("Ext.data.IdGenerator",{isGenerator:true,constructor:function(d){var c=this;Ext.apply(c,d);if(c.id){Ext.data.IdGenerator.all[c.id]=c}},getRecId:function(b){return b.modelName+"-"+b.internalId},statics:{all:{},get:function(f){var h,g,e;if(typeof f=="string"){g=e=f;f=null}else{if(f.isGenerator){return f}else{g=f.id||f.type;e=f.type}}h=this.all[g];if(!h){h=Ext.create("idgen."+e,f)}return h}}});Ext.define("Ext.data.validations",{singleton:true,presenceMessage:"must be present",lengthMessage:"is the wrong length",formatMessage:"is the wrong format",inclusionMessage:"is not included in the list of acceptable values",exclusionMessage:"is not an acceptable value",emailMessage:"is not a valid email address",emailRe:/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,presence:function(d,c){if(c===undefined){c=d}return !!c||c===0},length:function(f,h){if(h===undefined||h===null){return false}var i=h.length,j=f.min,g=f.max;if((j&&i<j)||(g&&i>g)){return false}else{return true}},email:function(c,d){return Ext.data.validations.emailRe.test(d)},format:function(d,c){return !!(d.matcher&&d.matcher.test(c))},inclusion:function(d,c){return d.list&&Ext.Array.indexOf(d.list,c)!=-1},exclusion:function(d,c){return d.list&&Ext.Array.indexOf(d.list,c)==-1}});Ext.define("Ext.ZIndexManager",{alternateClassName:"Ext.WindowGroup",statics:{zBase:9000},constructor:function(d){var c=this;c.list={};c.zIndexStack=[];c.front=null;if(d){if(d.isContainer){d.on("resize",c._onContainerResize,c);c.zseed=Ext.Number.from(c.rendered?d.getEl().getStyle("zIndex"):undefined,c.getNextZSeed());c.targetEl=d.getTargetEl();c.container=d}else{Ext.EventManager.onWindowResize(c._onContainerResize,c);c.zseed=c.getNextZSeed();c.targetEl=Ext.get(d)}}else{Ext.EventManager.onWindowResize(c._onContainerResize,c);c.zseed=c.getNextZSeed();Ext.onDocumentReady(function(){c.targetEl=Ext.getBody()})}},getNextZSeed:function(){return(Ext.ZIndexManager.zBase+=10000)},setBase:function(c){this.zseed=c;var d=this.assignZIndices();this._activateLast();return d},assignZIndices:function(){var j=this.zIndexStack,a=j.length,h=0,g=this.zseed,i;for(;h<a;h++){i=j[h];if(i&&!i.hidden){g=i.setZIndex(g)}}this._activateLast();return g},_setActiveChild:function(d,e){var f=this.front;if(d!==f){if(f&&!f.destroying){f.setActive(false,d)}this.front=d;if(d&&d!=e){d.setActive(true);if(d.modal){this._showModalMask(d)}}}},onComponentHide:function(b){b.setActive(false);this._activateLast()},_activateLast:function(){var h=this,g=h.zIndexStack,i=g.length-1,j=h.front,f;h.front=undefined;for(;i>=0&&g[i].hidden;--i){}if((f=g[i])){h._setActiveChild(f,j);if(f.modal){return}}for(;i>=0;--i){f=g[i];if(f.isVisible()&&f.modal){h._showModalMask(f);return}}h._hideModalMask()},_showModalMask:function(g){var j=this,h=g.el.getStyle("zIndex")-4,f=g.floatParent?g.floatParent.getTargetEl():g.container,i=f.getBox();if(f.dom===document.body){i.height=Math.max(document.body.scrollHeight,Ext.dom.Element.getDocumentHeight());i.width=Math.max(document.body.scrollWidth,i.width)}if(!j.mask){j.mask=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"mask"});j.mask.setVisibilityMode(Ext.Element.DISPLAY);j.mask.on("click",j._onMaskClick,j)}j.mask.maskTarget=f;f.addCls(Ext.baseCSSPrefix+"body-masked");j.mask.setBox(i);j.mask.setStyle("zIndex",h);j.mask.show()},_hideModalMask:function(){var b=this.mask;if(b&&b.isVisible()){b.maskTarget.removeCls(Ext.baseCSSPrefix+"body-masked");b.maskTarget=undefined;b.hide()}},_onMaskClick:function(){if(this.front){this.front.focus()}},_onContainerResize:function(){var e=this.mask,d,f;if(e&&e.isVisible()){e.hide();d=e.maskTarget;if(d.dom===document.body){f={height:Math.max(document.body.scrollHeight,Ext.dom.Element.getDocumentHeight()),width:Math.max(document.body.scrollWidth,document.documentElement.clientWidth)}}else{f=d.getViewSize(true)}e.setSize(f);e.show()}},register:function(d){var c=this;if(d.zIndexManager){d.zIndexManager.unregister(d)}d.zIndexManager=c;c.list[d.id]=d;c.zIndexStack.push(d);d.on("hide",c.onComponentHide,c)},unregister:function(e){var d=this,f=d.list;delete e.zIndexManager;if(f&&f[e.id]){delete f[e.id];e.un("hide",d.onComponentHide);Ext.Array.remove(d.zIndexStack,e);d._activateLast()}},get:function(b){return b.isComponent?b:this.list[b]},bringToFront:function(e){var h=this,f=false,g=h.zIndexStack;e=h.get(e);if(e!==h.front){Ext.Array.remove(g,e);if(e.preventBringToFront){g.unshift(e)}else{g.push(e)}h.assignZIndices();f=true;this.front=e}if(f&&e.modal){h._showModalMask(e)}return f},sendToBack:function(d){var c=this;d=c.get(d);Ext.Array.remove(c.zIndexStack,d);c.zIndexStack.unshift(d);c.assignZIndices();this._activateLast();return d},hideAll:function(){var d=this.list,e,f;for(f in d){if(d.hasOwnProperty(f)){e=d[f];if(e.isComponent&&e.isVisible()){e.hide()}}}},hide:function(){var g=0,e=this.zIndexStack,f=e.length,h;this.tempHidden=[];for(;g<f;g++){h=e[g];if(h.isVisible()){this.tempHidden.push(h);h.el.hide()}}},show:function(){var h=0,g=this.tempHidden,f=g?g.length:0,e;for(;h<f;h++){e=g[h];e.el.show();e.setPosition(e.x,e.y)}delete this.tempHidden},getActive:function(){return this.front},getBy:function(k,l){var j=[],m=0,h=this.zIndexStack,i=h.length,n;for(;m<i;m++){n=h[m];if(k.call(l||n,n)!==false){j.push(n)}}return j},each:function(j,f){var i=this.list,h,g;for(h in i){if(i.hasOwnProperty(h)){g=i[h];if(g.isComponent&&j.call(f||g,g)===false){return}}}},eachBottomUp:function(i,j){var g=this.zIndexStack,k=0,h=g.length,l;for(;k<h;k++){l=g[k];if(l.isComponent&&i.call(j||l,l)===false){return}}},eachTopDown:function(h,i){var g=this.zIndexStack,j=g.length,f;for(;j-->0;){f=g[j];if(f.isComponent&&h.call(i||f,f)===false){return}}},destroy:function(){var e=this,h=e.list,f,g;for(g in h){if(h.hasOwnProperty(g)){f=h[g];if(f.isComponent){f.destroy()}}}delete e.zIndexStack;delete e.list;delete e.container;delete e.targetEl}},function(){Ext.WindowManager=Ext.WindowMgr=new this()});Ext.define("Docs.view.cls.Logic",{showPrivateClasses:false,constructor:function(b){Ext.apply(this,b)}});Ext.define("Ext.XTemplateParser",{constructor:function(b){Ext.apply(this,b)},doTpl:Ext.emptyFn,parse:function(z){var m=this,w=z.length,x={elseif:"elif"},v=m.topRe,H=m.actionsRe,F,G,B,y,D,A,C,s,t,I,E,J;m.level=0;m.stack=G=[];for(F=0;F<w;F=I){v.lastIndex=F;y=v.exec(z);if(!y){m.doText(z.substring(F,w));break}t=y.index;I=v.lastIndex;if(F<t){m.doText(z.substring(F,t))}if(y[1]){I=z.indexOf("%}",t+2);m.doEval(z.substring(t+2,I));I+=2}else{if(y[2]){I=z.indexOf("]}",t+2);m.doExpr(z.substring(t+2,I));I+=2}else{if(y[3]){m.doTag(y[3])}else{if(y[4]){E=null;while((s=H.exec(y[4]))!==null){B=s[2]||s[3];if(B){B=Ext.String.htmlDecode(B);D=s[1];D=x[D]||D;E=E||{};A=E[D];if(typeof A=="string"){E[D]=[A,B]}else{if(A){E[D].push(B)}else{E[D]=B}}}}if(!E){if(m.elseRe.test(y[4])){m.doElse()}else{if(m.defaultRe.test(y[4])){m.doDefault()}else{m.doTpl();G.push({type:"tpl"})}}}else{if(E["if"]){m.doIf(E["if"],E);G.push({type:"if"})}else{if(E["switch"]){m.doSwitch(E["switch"],E);G.push({type:"switch"})}else{if(E["case"]){m.doCase(E["case"],E)}else{if(E.elif){m.doElseIf(E.elif,E)}else{if(E["for"]){++m.level;if(J=m.propRe.exec(y[4])){E.propName=J[1]||J[2]}m.doFor(E["for"],E);G.push({type:"for",actions:E})}else{if(E.exec){m.doExec(E.exec,E);G.push({type:"exec",actions:E})}}}}}}}}else{if(y[0].length===5){G.push({type:"tpl"})}else{C=G.pop();m.doEnd(C.type,C.actions);if(C.type=="for"){--m.level}}}}}}}},topRe:/(?:(\{\%)|(\{\[)|\{([^{}]*)\})|(?:<tpl([^>]*)\>)|(?:<\/tpl>)/g,actionsRe:/\s*(elif|elseif|if|for|exec|switch|case|eval)\s*\=\s*(?:(?:"([^"]*)")|(?:'([^']*)'))\s*/g,propRe:/prop=(?:(?:"([^"]*)")|(?:'([^']*)'))/,defaultRe:/^\s*default\s*$/,elseRe:/^\s*else\s*$/});Ext.define("Ext.dd.DragTracker",{uses:["Ext.util.Region"],mixins:{observable:"Ext.util.Observable"},active:false,trackOver:false,tolerance:5,autoStart:false,constructor:function(b){Ext.apply(this,b);this.addEvents("mouseover","mouseout","mousedown","mouseup","mousemove","beforedragstart","dragstart","dragend","drag");this.dragRegion=new Ext.util.Region(0,0,0,0);if(this.el){this.initEl(this.el)}this.mixins.observable.constructor.call(this);if(this.disabled){this.disable()}},initEl:function(b){this.el=Ext.get(b);this.handle=Ext.get(this.delegate);this.delegate=this.handle?undefined:this.delegate;if(!this.handle){this.handle=this.el}this.mon(this.handle,{mousedown:this.onMouseDown,delegate:this.delegate,scope:this});if(this.trackOver||this.overCls){this.mon(this.handle,{mouseover:this.onMouseOver,mouseout:this.onMouseOut,delegate:this.delegate,scope:this})}},disable:function(){this.disabled=true},enable:function(){this.disabled=false},destroy:function(){this.clearListeners();delete this.el},onMouseOver:function(f,d){var e=this;if(!e.disabled){if(Ext.EventManager.contains(f)||e.delegate){e.mouseIsOut=false;if(e.overCls){e.el.addCls(e.overCls)}e.fireEvent("mouseover",e,f,e.delegate?f.getTarget(e.delegate,d):e.handle)}}},onMouseOut:function(b){if(this.mouseIsDown){this.mouseIsOut=true}else{if(this.overCls){this.el.removeCls(this.overCls)}this.fireEvent("mouseout",this,b)}},onMouseDown:function(c,d){if(this.disabled||c.dragTracked){return}this.dragTarget=this.delegate?d:this.handle.dom;this.startXY=this.lastXY=c.getXY();this.startRegion=Ext.fly(this.dragTarget).getRegion();if(this.fireEvent("mousedown",this,c)===false||this.fireEvent("beforedragstart",this,c)===false||this.onBeforeStart(c)===false){return}this.mouseIsDown=true;c.dragTracked=true;if(this.preventDefault!==false){c.preventDefault()}Ext.getDoc().on({scope:this,mouseup:this.onMouseUp,mousemove:this.onMouseMove,selectstart:this.stopSelect});if(this.autoStart){this.timer=Ext.defer(this.triggerStart,this.autoStart===true?1000:this.autoStart,this,[c])}},onMouseMove:function(g,h){if(this.active&&Ext.isIE&&!g.browserEvent.button){g.preventDefault();this.onMouseUp(g);return}g.preventDefault();var e=g.getXY(),f=this.startXY;this.lastXY=e;if(!this.active){if(Math.max(Math.abs(f[0]-e[0]),Math.abs(f[1]-e[1]))>this.tolerance){this.triggerStart(g)}else{return}}if(this.fireEvent("mousemove",this,g)===false){this.onMouseUp(g)}else{this.onDrag(g);this.fireEvent("drag",this,g)}},onMouseUp:function(b){this.mouseIsDown=false;if(this.mouseIsOut){this.mouseIsOut=false;this.onMouseOut(b)}b.preventDefault();this.fireEvent("mouseup",this,b);this.endDrag(b)},endDrag:function(f){var d=Ext.getDoc(),e=this.active;d.un("mousemove",this.onMouseMove,this);d.un("mouseup",this.onMouseUp,this);d.un("selectstart",this.stopSelect,this);this.clearStart();this.active=false;if(e){this.onEnd(f);this.fireEvent("dragend",this,f)}delete this._constrainRegion;delete Ext.EventObject.dragTracked},triggerStart:function(b){this.clearStart();this.active=true;this.onStart(b);this.fireEvent("dragstart",this,b)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(b){b.stopEvent();return false},onBeforeStart:function(b){},onStart:function(b){},onDrag:function(b){},onEnd:function(b){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getConstrainRegion:function(){if(this.constrainTo){if(this.constrainTo instanceof Ext.util.Region){return this.constrainTo}if(!this._constrainRegion){this._constrainRegion=Ext.fly(this.constrainTo).getViewRegion()}}else{if(!this._constrainRegion){this._constrainRegion=this.getDragCt().getViewRegion()}}return this._constrainRegion},getXY:function(b){return b?this.constrainModes[b](this,this.lastXY):this.lastXY},getOffset:function(f){var d=this.getXY(f),e=this.startXY;return[d[0]-e[0],d[1]-e[1]]},constrainModes:{point:function(e,g){var h=e.dragRegion,f=e.getConstrainRegion();if(!f){return g}h.x=h.left=h[0]=h.right=g[0];h.y=h.top=h[1]=h.bottom=g[1];h.constrainTo(f);return[h.left,h.top]},dragTarget:function(l,i){var g=l.startXY,j=l.startRegion.copy(),h=l.getConstrainRegion(),k;if(!h){return i}j.translateBy(i[0]-g[0],i[1]-g[1]);if(j.right>h.right){i[0]+=k=(h.right-j.right);j.left+=k}if(j.left<h.left){i[0]+=(h.left-j.left)}if(j.bottom>h.bottom){i[1]+=k=(h.bottom-j.bottom);j.top+=k}if(j.top<h.top){i[1]+=(h.top-j.top)}return i}}});Ext.define("Ext.util.HashMap",{mixins:{observable:"Ext.util.Observable"},constructor:function(e){e=e||{};var f=this,d=e.keyFn;f.addEvents("add","clear","remove","replace");f.mixins.observable.constructor.call(f,e);f.clear(true);if(d){f.getKey=d}},getCount:function(){return this.length},getData:function(d,c){if(c===undefined){c=d;d=this.getKey(c)}return[d,c]},getKey:function(b){return b.id},add:function(e,f){var d=this;if(f===undefined){f=e;e=d.getKey(f)}if(d.containsKey(e)){return d.replace(e,f)}d.map[e]=f;++d.length;if(d.hasListeners.add){d.fireEvent("add",d,e,f)}return f},replace:function(f,i){var j=this,h=j.map,g;if(i===undefined){i=f;f=j.getKey(i)}if(!j.containsKey(f)){j.add(f,i)}g=h[f];h[f]=i;if(j.hasListeners.replace){j.fireEvent("replace",j,f,i,g)}return i},remove:function(c){var d=this.findKey(c);if(d!==undefined){return this.removeAtKey(d)}return false},removeAtKey:function(e){var d=this,f;if(d.containsKey(e)){f=d.map[e];delete d.map[e];--d.length;if(d.hasListeners.remove){d.fireEvent("remove",d,e,f)}return true}return false},get:function(b){return this.map[b]},clear:function(d){var c=this;c.map={};c.length=0;if(d!==true&&c.hasListeners.clear){c.fireEvent("clear",c)}return c},containsKey:function(b){return this.map[b]!==undefined},contains:function(b){return this.containsKey(this.findKey(b))},getKeys:function(){return this.getArray(true)},getValues:function(){return this.getArray(false)},getArray:function(g){var f=[],e,h=this.map;for(e in h){if(h.hasOwnProperty(e)){f.push(g?e:h[e])}}return f},each:function(i,j){var g=Ext.apply({},this.map),f,h=this.length;j=j||this;for(f in g){if(g.hasOwnProperty(f)){if(i.call(j,f,g[f],h)===false){break}}}return this},clone:function(){var f=new this.self(),d=this.map,e;f.suspendEvents();for(e in d){if(d.hasOwnProperty(e)){f.add(e,d[e])}}f.resumeEvents();return f},findKey:function(d){var e,f=this.map;for(e in f){if(f.hasOwnProperty(e)&&f[e]===d){return e}}return undefined}});Ext.define("Ext.fx.target.Target",{isAnimTarget:true,constructor:function(b){this.target=b;this.id=this.getId()},getId:function(){return this.target.id}});Ext.define("Ext.draw.Color",{colorToHexRe:/(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/,rgbRe:/\s*rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)\s*/,hexRe:/\s*#([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)\s*/,lightnessFactor:0.2,constructor:function(i,j,g){var f=this,h=Ext.Number.constrain;f.r=h(i,0,255);f.g=h(j,0,255);f.b=h(g,0,255)},getRed:function(){return this.r},getGreen:function(){return this.g},getBlue:function(){return this.b},getRGB:function(){var b=this;return[b.r,b.g,b.b]},getHSL:function(){var o=this,t=o.r/255,p=o.g/255,l=o.b/255,h=Math.max(t,p,l),r=Math.min(t,p,l),g=h-r,q,b=0,s=0.5*(h+r);if(r!=h){b=(s<0.5)?g/(h+r):g/(2-h-r);if(t==h){q=60*(p-l)/g}else{if(p==h){q=120+60*(l-t)/g}else{q=240+60*(t-p)/g}}if(q<0){q+=360}if(q>=360){q-=360}}return[q,b,s]},getLighter:function(c){var d=this.getHSL();c=c||this.lightnessFactor;d[2]=Ext.Number.constrain(d[2]+c,0,1);return this.fromHSL(d[0],d[1],d[2])},getDarker:function(b){b=b||this.lightnessFactor;return this.getLighter(-b)},toString:function(){var g=this,j=Math.round,h=j(g.r).toString(16),i=j(g.g).toString(16),b=j(g.b).toString(16);h=(h.length==1)?"0"+h:h;i=(i.length==1)?"0"+i:i;b=(b.length==1)?"0"+b:b;return["#",h,i,b].join("")},toHex:function(g){if(Ext.isArray(g)){g=g[0]}if(!Ext.isString(g)){return""}if(g.substr(0,1)==="#"){return g}var j=this.colorToHexRe.exec(g),i,k,h,l;if(Ext.isArray(j)){i=parseInt(j[2],10);k=parseInt(j[3],10);h=parseInt(j[4],10);l=h|(k<<8)|(i<<16);return j[1]+"#"+("000000"+l.toString(16)).slice(-6)}else{return g}},fromString:function(g){var l,j,k,b,i=parseInt;if((g.length==4||g.length==7)&&g.substr(0,1)==="#"){l=g.match(this.hexRe);if(l){j=i(l[1],16)>>0;k=i(l[2],16)>>0;b=i(l[3],16)>>0;if(g.length==4){j+=(j*16);k+=(k*16);b+=(b*16)}}}else{l=g.match(this.rgbRe);if(l){j=l[1];k=l[2];b=l[3]}}return(typeof j=="undefined")?undefined:new Ext.draw.Color(j,k,b)},getGrayscale:function(){return this.r*0.3+this.g*0.59+this.b*0.11},fromHSL:function(o,h,q){var t,s,r,p,l=[],i=Math.abs,m=Math.floor;if(h==0||o==null){l=[q,q,q]}else{o/=60;t=h*(1-i(2*q-1));s=t*(1-i(o-2*m(o/2)-1));r=q-t/2;switch(m(o)){case 0:l=[t,s,0];break;case 1:l=[s,t,0];break;case 2:l=[0,t,s];break;case 3:l=[0,s,t];break;case 4:l=[s,0,t];break;case 5:l=[t,0,s];break}l=[l[0]+r,l[1]+r,l[2]+r]}return new Ext.draw.Color(l[0]*255,l[1]*255,l[2]*255)}},function(){var b=this.prototype;this.addStatics({fromHSL:function(){return b.fromHSL.apply(b,arguments)},fromString:function(){return b.fromString.apply(b,arguments)},toHex:function(){return b.toHex.apply(b,arguments)}})});Ext.define("Ext.util.LruCache",{extend:"Ext.util.HashMap",constructor:function(b){Ext.apply(this,b);this.callParent([b])},add:function(f,h){var i=this,g=i.findKey(h),j;if(g){i.unlinkEntry(j=i.map[g]);j.prev=i.last;j.next=null}else{j={prev:i.last,next:null,key:f,value:h}}if(i.last){i.last.next=j}else{i.first=j}i.last=j;i.callParent([f,j]);i.prune();return h},insertBefore:function(g,i,l){var j=this,h,k;if(l=this.map[this.findKey(l)]){h=j.findKey(i);if(h){j.unlinkEntry(k=j.map[h])}else{k={prev:l.prev,next:l,key:g,value:i}}if(l.prev){k.prev.next=k}else{j.first=k}k.next=l;l.prev=k;j.prune();return i}else{return j.add(g,i)}},get:function(d){var c=this.map[d];if(c){if(c.next){this.moveToEnd(c)}return c.value}},removeAtKey:function(b){this.unlinkEntry(this.map[b]);return this.callParent(arguments)},clear:function(b){this.first=this.last=null;return this.callParent(arguments)},unlinkEntry:function(b){if(b){if(b.next){b.next.prev=b.prev}else{this.last=b.prev}if(b.prev){b.prev.next=b.next}else{this.first=b.next}b.prev=b.next=null}},moveToEnd:function(b){this.unlinkEntry(b);if(b.prev=this.last){this.last.next=b}else{this.first=b}this.last=b},getArray:function(f){var e=[],d=this.first;while(d){e.push(f?d.key:d.value);d=d.next}return e},each:function(l,g,h){var i=this,j=h?i.last:i.first,k=i.length;g=g||i;while(j){if(l.call(g,j.key,j.value,k)===false){break}j=h?j.prev:j.next}return i},findKey:function(d){var e,f=this.map;for(e in f){if(f.hasOwnProperty(e)&&f[e].value===d){return e}}return undefined},prune:function(){var d=this,c=d.maxSize?(d.length-d.maxSize):0;if(c>0){for(;d.first&&c;c--){d.removeAtKey(d.first.key)}}}});Ext.define("Ext.util.Bindable",{bindStore:function(f,e){var h=this,g=h.store;if(!e&&h.store){if(f!==g&&g.autoDestroy){g.destroyStore()}else{h.unbindStoreListeners(g)}h.onUnbindStore(g,e)}if(f){f=Ext.data.StoreManager.lookup(f);h.bindStoreListeners(f);h.onBindStore(f,e)}h.store=f||null;return h},getStore:function(){return this.store},unbindStoreListeners:function(d){var c=this.storeListeners;if(c){d.un(c)}},bindStoreListeners:function(e){var f=this,d=Ext.apply({},f.getStoreListeners());if(!d.scope){d.scope=f}f.storeListeners=d;e.on(d)},getStoreListeners:Ext.emptyFn,onUnbindStore:Ext.emptyFn,onBindStore:Ext.emptyFn});Ext.define("Ext.util.Offset",{statics:{fromObject:function(b){return new this(b.x,b.y)}},constructor:function(d,c){this.x=(d!=null&&!isNaN(d))?d:0;this.y=(c!=null&&!isNaN(c))?c:0;return this},copy:function(){return new Ext.util.Offset(this.x,this.y)},copyFrom:function(b){this.x=b.x;this.y=b.y},toString:function(){return"Offset["+this.x+","+this.y+"]"},equals:function(b){if(!(b instanceof this.statics())){Ext.Error.raise("Offset must be an instance of Ext.util.Offset")}return(this.x==b.x&&this.y==b.y)},round:function(c){if(!isNaN(c)){var d=Math.pow(10,c);this.x=Math.round(this.x*d)/d;this.y=Math.round(this.y*d)/d}else{this.x=Math.round(this.x);this.y=Math.round(this.y)}},isZero:function(){return this.x==0&&this.y==0}});Ext.define("Ext.layout.container.boxOverflow.None",{alternateClassName:"Ext.layout.boxOverflow.None",constructor:function(c,d){this.layout=c;Ext.apply(this,d)},handleOverflow:Ext.emptyFn,clearOverflow:Ext.emptyFn,beginLayout:Ext.emptyFn,beginLayoutCycle:Ext.emptyFn,finishedLayout:Ext.emptyFn,completeLayout:function(e){var f=this,h=e.state.boxPlan,g;if(h&&h.tooNarrow){g=f.handleOverflow(e);if(g){if(g.reservedSpace){f.layout.publishInnerCtSize(e,g.reservedSpace)}}}else{f.clearOverflow()}},onRemove:Ext.emptyFn,getItem:function(b){return this.layout.owner.getComponent(b)},getOwnerType:function(d){var c="";if(d.is("toolbar")){c="toolbar"}else{if(d.is("tabbar")){c="tabbar"}else{c=d.getXType()}}return c},getPrefixConfig:Ext.emptyFn,getSuffixConfig:Ext.emptyFn,getOverflowCls:function(){return""}});Ext.define("Ext.state.Provider",{mixins:{observable:"Ext.util.Observable"},prefix:"ext-",constructor:function(d){d=d||{};var c=this;Ext.apply(c,d);c.addEvents("statechange");c.state={};c.mixins.observable.constructor.call(c)},get:function(c,d){return typeof this.state[c]=="undefined"?d:this.state[c]},clear:function(d){var c=this;delete c.state[d];c.fireEvent("statechange",c,d,null)},set:function(e,f){var d=this;d.state[e]=f;d.fireEvent("statechange",d,e,f)},decodeValue:function(o){var r=this,k=/^(a|n|d|b|s|o|e)\:(.*)$/,s=k.exec(unescape(o)),n,q,t,l,p,m;if(!s||!s[1]){return}q=s[1];o=s[2];switch(q){case"e":return null;case"n":return parseFloat(o);case"d":return new Date(Date.parse(o));case"b":return(o=="1");case"a":n=[];if(o!=""){l=o.split("^");p=l.length;for(m=0;m<p;m++){o=l[m];n.push(r.decodeValue(o))}}return n;case"o":n={};if(o!=""){l=o.split("^");p=l.length;for(m=0;m<p;m++){o=l[m];t=o.split("=");n[t[0]]=r.decodeValue(t[1])}}return n;default:return o}},encodeValue:function(j){var i="",k=0,g,h,l;if(j==null){return"e:1"}else{if(typeof j=="number"){g="n:"+j}else{if(typeof j=="boolean"){g="b:"+(j?"1":"0")}else{if(Ext.isDate(j)){g="d:"+j.toGMTString()}else{if(Ext.isArray(j)){for(h=j.length;k<h;k++){i+=this.encodeValue(j[k]);if(k!=h-1){i+="^"}}g="a:"+i}else{if(typeof j=="object"){for(l in j){if(typeof j[l]!="function"&&j[l]!==undefined){i+=l+"="+this.encodeValue(j[l])+"^"}}g="o:"+i.substring(0,i.length-1)}else{g="s:"+j}}}}}}return escape(g)}});Ext.define("Ext.data.proxy.Server",{extend:"Ext.data.proxy.Proxy",alias:"proxy.server",alternateClassName:"Ext.data.ServerProxy",uses:["Ext.data.Request"],pageParam:"page",startParam:"start",limitParam:"limit",groupParam:"group",sortParam:"sort",filterParam:"filter",directionParam:"dir",simpleSortMode:false,noCache:true,cacheString:"_dc",timeout:30000,constructor:function(d){var c=this;d=d||{};c.callParent([d]);c.extraParams=d.extraParams||{};c.api=Ext.apply({},d.api||c.api);c.nocache=c.noCache},create:function(){return this.doRequest.apply(this,arguments)},read:function(){return this.doRequest.apply(this,arguments)},update:function(){return this.doRequest.apply(this,arguments)},destroy:function(){return this.doRequest.apply(this,arguments)},setExtraParam:function(d,c){this.extraParams[d]=c},buildRequest:function(f){var h=this,g=Ext.applyIf(f.params||{},h.extraParams||{}),e;g=Ext.applyIf(g,h.getParams(f));if(f.id&&!g.id){g.id=f.id}e=new Ext.data.Request({params:g,action:f.action,records:f.records,operation:f,url:f.url,proxy:h});e.url=h.buildUrl(e);f.request=e;return e},processResponse:function(l,r,p,q,m,k){var n=this,o,j;if(l===true){o=n.getReader();j=o.read(n.extractResponseData(q));if(j.success!==false){Ext.apply(r,{response:q,resultSet:j});r.commitRecords(j.records);r.setCompleted();r.setSuccessful()}else{r.setException(j.message);n.fireEvent("exception",this,q,r)}}else{n.setException(r,q);n.fireEvent("exception",this,q,r)}if(typeof m=="function"){m.call(k||n,r)}n.afterRequest(p,l)},setException:function(c,d){c.setException({status:d.status,statusText:d.statusText})},extractResponseData:function(b){return b},applyEncoding:function(b){return Ext.encode(b)},encodeSorters:function(g){var e=[],h=g.length,f=0;for(;f<h;f++){e[f]={property:g[f].property,direction:g[f].direction}}return this.applyEncoding(e)},encodeFilters:function(g){var e=[],h=g.length,f=0;for(;f<h;f++){e[f]={property:g[f].property,value:g[f].value}}return this.applyEncoding(e)},getParams:function(z){var s=this,t={},w=Ext.isDefined,v=z.groupers,J=z.sorters,B=z.filters,D=z.page,E=z.start,u=z.limit,C=s.simpleSortMode,x=s.pageParam,G=s.startParam,I=s.limitParam,H=s.groupParam,F=s.sortParam,y=s.filterParam,A=s.directionParam;if(x&&w(D)){t[x]=D}if(G&&w(E)){t[G]=E}if(I&&w(u)){t[I]=u}if(H&&v&&v.length>0){t[H]=s.encodeSorters(v)}if(F&&J&&J.length>0){if(C){t[F]=J[0].property;t[A]=J[0].direction}else{t[F]=s.encodeSorters(J)}}if(y&&B&&B.length>0){t[y]=s.encodeFilters(B)}return t},buildUrl:function(f){var d=this,e=d.getUrl(f);if(!e){Ext.Error.raise("You are using a ServerProxy but have not supplied it with a url.")}if(d.noCache){e=Ext.urlAppend(e,Ext.String.format("{0}={1}",d.cacheString,Ext.Date.now()))}return e},getUrl:function(b){return b.url||this.api[b.action]||this.url},doRequest:function(e,f,d){Ext.Error.raise("The doRequest function has not been implemented on your Ext.data.proxy.Server subclass. See src/data/ServerProxy.js for details")},afterRequest:Ext.emptyFn,onDestroy:function(){Ext.destroy(this.reader,this.writer)}});Ext.define("Ext.data.proxy.Client",{extend:"Ext.data.proxy.Proxy",alternateClassName:"Ext.data.ClientProxy",clear:function(){Ext.Error.raise("The Ext.data.proxy.Client subclass that you are using has not defined a 'clear' function. See src/data/ClientProxy.js for details.")}});Ext.define("Ext.data.writer.Writer",{alias:"writer.base",alternateClassName:["Ext.data.DataWriter","Ext.data.Writer"],writeAllFields:true,nameProperty:"name",constructor:function(b){Ext.apply(this,b)},write:function(j){var l=j.operation,g=l.records||[],h=g.length,k=0,i=[];for(;k<h;k++){i.push(this.getRecordData(g[k],l))}return this.writeRecords(j,i)},getRecordData:function(y,A){var s=y.phantom===true,C=this.writeAllFields||s,B=this.nameProperty,x=y.fields,q=x.items,z={},t=y.clientIdProperty,u,D,v,r,w,f;if(C){f=q.length;for(w=0;w<f;w++){v=q[w];if(v.persist){D=v[B]||v.name;z[D]=y.get(v.name)}}}else{u=y.getChanges();for(r in u){if(u.hasOwnProperty(r)){v=x.get(r);D=v[B]||v.name;z[D]=u[r]}}}if(s){if(t&&A&&A.records.length>1){z[t]=y.internalId}}else{z[y.idProperty]=y.getId()}return z}});Ext.define("Ext.dd.Registry",{singleton:true,constructor:function(){this.elements={};this.handles={};this.autoIdSeed=0},getId:function(d,e){if(typeof d=="string"){return d}var f=d.id;if(!f&&e!==false){f="extdd-"+(++this.autoIdSeed);d.id=f}return f},register:function(i,h){h=h||{};if(typeof i=="string"){i=document.getElementById(i)}h.ddel=i;this.elements[this.getId(i)]=h;if(h.isHandle!==false){this.handles[h.ddel.id]=h}if(h.handles){var j=h.handles,f,g;for(f=0,g=j.length;f<g;f++){this.handles[this.getId(j[f])]=h}}},unregister:function(k){var i=this.getId(k,false),j=this.elements[i],l,g,h;if(j){delete this.elements[i];if(j.handles){l=j.handles;for(g=0,h=l.length;g<h;g++){delete this.handles[this.getId(l[g],false)]}}}},getHandle:function(b){if(typeof b!="string"){b=b.id}return this.handles[b]},getHandleFromEvent:function(c){var d=c.getTarget();return d?this.handles[d.id]:null},getTarget:function(b){if(typeof b!="string"){b=b.id}return this.elements[b]},getTargetFromEvent:function(c){var d=c.getTarget();return d?this.elements[d.id]||this.handles[d.id]:null}});Ext.define("Ext.data.Connection",{mixins:{observable:"Ext.util.Observable"},statics:{requestId:0},url:null,async:true,method:null,username:"",password:"",disableCaching:true,withCredentials:false,cors:false,disableCachingParam:"_dc",timeout:30000,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",constructor:function(b){b=b||{};Ext.apply(this,b);this.requests={};this.mixins.observable.constructor.call(this)},request:function(k){k=k||{};var o=this,l=k.scope||window,p=k.username||o.username,n=k.password||o.password||"",s,r,q,t,m;if(o.fireEvent("beforerequest",o,k)!==false){r=o.setOptions(k,l);if(o.isFormUpload(k)){o.upload(k.form,r.url,r.data,k);return null}if(k.autoAbort||o.autoAbort){o.abort()}s=k.async!==false?(k.async||o.async):false;m=o.openRequest(k,r,s,p,n);t=o.setupHeaders(m,k,r.data,r.params);q={id:++Ext.data.Connection.requestId,xhr:m,headers:t,options:k,async:s,timeout:setTimeout(function(){q.timedout=true;o.abort(q)},k.timeout||o.timeout)};o.requests[q.id]=q;o.latestId=q.id;if(s){m.onreadystatechange=Ext.Function.bind(o.onStateChange,o,[q])}m.send(r.data);if(!s){return o.onComplete(q)}return q}else{Ext.callback(k.callback,k.scope,[k,undefined,undefined]);return null}},upload:function(I,E,t,F){I=Ext.getDom(I);F=F||{};var y=Ext.id(),A=document.createElement("iframe"),H=[],G="multipart/form-data",u={target:I.target,method:I.method,encoding:I.encoding,enctype:I.enctype,action:I.action},J=function(b,a){D=document.createElement("input");Ext.fly(D).set({type:"hidden",value:a,name:b});I.appendChild(D);H.push(D)},D,B,w,h,x,C,z,v;Ext.fly(A).set({id:y,name:y,cls:Ext.baseCSSPrefix+"hide-display",src:Ext.SSL_SECURE_URL});document.body.appendChild(A);if(document.frames){document.frames[y].name=y}Ext.fly(I).set({target:y,method:"POST",enctype:G,encoding:G,action:E||u.action});if(t){B=Ext.Object.fromQueryString(t)||{};for(h in B){if(B.hasOwnProperty(h)){w=B[h];if(Ext.isArray(w)){x=w.length;for(C=0;C<x;C++){J(h,w[C])}}else{J(h,w)}}}}Ext.fly(A).on("load",Ext.Function.bind(this.onUploadComplete,this,[A,F]),null,{single:true});I.submit();Ext.fly(I).set(u);z=H.length;for(v=0;v<z;v++){Ext.removeNode(H[v])}},onUploadComplete:function(j,e){var n=this,i={responseText:"",responseXML:null},k,l;try{k=j.contentWindow.document||j.contentDocument||window.frames[j.id].document;if(k){if(k.body){if(/textarea/i.test((l=k.body.firstChild||{}).tagName)){i.responseText=l.value}else{i.responseText=k.body.innerHTML}}i.responseXML=k.XMLDocument||k}}catch(m){}n.fireEvent("requestcomplete",n,i,e);Ext.callback(e.success,e.scope,[i,e]);Ext.callback(e.callback,e.scope,[e,true,i]);setTimeout(function(){Ext.removeNode(j)},100)},isFormUpload:function(d){var c=this.getForm(d);if(c){return(d.isUpload||(/multipart\/form-data/i).test(c.getAttribute("enctype")))}return false},getForm:function(b){return Ext.getDom(b.form)||null},setOptions:function(l,m){var o=this,r=l.params||{},p=o.extraParams,s=l.urlParams,t=l.url||o.url,n=l.jsonData,u,v,q;if(Ext.isFunction(r)){r=r.call(m,l)}if(Ext.isFunction(t)){t=t.call(m,l)}t=this.setupUrl(l,t);if(!t){Ext.Error.raise({options:l,msg:"No URL specified"})}q=l.rawData||l.xmlData||n||null;if(n&&!Ext.isPrimitive(n)){q=Ext.encode(q)}if(Ext.isObject(r)){r=Ext.Object.toQueryString(r)}if(Ext.isObject(p)){p=Ext.Object.toQueryString(p)}r=r+((p)?((r)?"&":"")+p:"");s=Ext.isObject(s)?Ext.Object.toQueryString(s):s;r=this.setupParams(l,r);u=(l.method||o.method||((r||q)?"POST":"GET")).toUpperCase();this.setupMethod(l,u);v=l.disableCaching!==false?(l.disableCaching||o.disableCaching):false;if(u==="GET"&&v){t=Ext.urlAppend(t,(l.disableCachingParam||o.disableCachingParam)+"="+(new Date().getTime()))}if((u=="GET"||q)&&r){t=Ext.urlAppend(t,r);r=null}if(s){t=Ext.urlAppend(t,s)}return{url:t,method:u,data:q||r||null}},setupUrl:function(d,e){var f=this.getForm(d);if(f){e=e||f.action}return e},setupParams:function(f,g){var h=this.getForm(f),e;if(h&&!this.isFormUpload(f)){e=Ext.Element.serializeForm(h);g=g?(g+"&"+e):e}return g},setupMethod:function(d,c){if(this.isFormUpload(d)){return"POST"}return c},setupHeaders:function(n,e,u,v){var r=this,w=Ext.apply({},e.headers||{},r.defaultHeaders||{}),o=r.defaultPostHeader,q=e.jsonData,x=e.xmlData,p,t;if(!w["Content-Type"]&&(u||v)){if(u){if(e.rawData){o="text/plain"}else{if(x&&Ext.isDefined(x)){o="text/xml"}else{if(q&&Ext.isDefined(q)){o="application/json"}}}}w["Content-Type"]=o}if(r.useDefaultXhrHeader&&!w["X-Requested-With"]){w["X-Requested-With"]=r.defaultXhrHeader}try{for(p in w){if(w.hasOwnProperty(p)){t=w[p];n.setRequestHeader(p,t)}}}catch(s){r.fireEvent("exception",p,t)}return w},newRequest:function(d){var c;if((d.cors||this.cors)&&Ext.isIE&&Ext.ieVersion>=8){c=new XDomainRequest()}else{c=this.getXhrInstance()}return c},openRequest:function(l,h,k,i,g){var j=this.newRequest(l);if(i){j.open(h.method,h.url,k,i,g)}else{j.open(h.method,h.url,k)}if(l.withCredentials||this.withCredentials){j.withCredentials=true}return j},getXhrInstance:(function(){var e=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("MSXML2.XMLHTTP.3.0")},function(){return new ActiveXObject("MSXML2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],j=0,g=e.length,h;for(;j<g;++j){try{h=e[j];h();break}catch(i){}}return h}()),isLoading:function(d){if(!d){d=this.getLatest()}if(!(d&&d.xhr)){return false}var c=d.xhr.readyState;return !(c===0||c==4)},abort:function(e){var f=this,g;if(!e){e=f.getLatest()}if(e&&f.isLoading(e)){g=e.xhr;try{g.onreadystatechange=null}catch(h){g=Ext.emptyFn}g.abort();f.clearTimeout(e);if(!e.timedout){e.aborted=true}f.onComplete(e);f.cleanup(e)}},abortAll:function(){var c=this.requests,d;for(d in c){if(c.hasOwnProperty(d)){this.abort(c[d])}}},getLatest:function(){var c=this.latestId,d;if(c){d=this.requests[c]}return d||null},onStateChange:function(b){if(b.xhr.readyState==4){this.clearTimeout(b);this.onComplete(b);this.cleanup(b)}},clearTimeout:function(b){clearTimeout(b.timeout);delete b.timeout},cleanup:function(b){b.xhr=null;delete b.xhr},onComplete:function(l){var m=this,n=l.options,i,j,e;try{i=m.parseStatus(l.xhr.status)}catch(k){i={success:false,isException:false}}j=i.success;if(j){e=m.createResponse(l);m.fireEvent("requestcomplete",m,e,n);Ext.callback(n.success,n.scope,[e,n])}else{if(i.isException||l.aborted||l.timedout){e=m.createException(l)}else{e=m.createResponse(l)}m.fireEvent("requestexception",m,e,n);Ext.callback(n.failure,n.scope,[e,n])}Ext.callback(n.callback,n.scope,[n,j,e]);delete m.requests[l.id];return e},parseStatus:function(e){e=e==1223?204:e;var f=(e>=200&&e<300)||e==304,d=false;if(!f){switch(e){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:d=true;break}}return{success:f,isException:d}},createResponse:function(r){var m=r.xhr,t={},l=m.getAllResponseHeaders().replace(/\r\n/g,"\n").split("\n"),q=l.length,k,p,n,o,s;while(q--){k=l[q];p=k.indexOf(":");if(p>=0){n=k.substr(0,p).toLowerCase();if(k.charAt(p+1)==" "){++p}t[n]=k.substr(p+1)}}r.xhr=null;delete r.xhr;s={request:r,requestId:r.id,status:m.status,statusText:m.statusText,getResponseHeader:function(a){return t[a.toLowerCase()]},getAllResponseHeaders:function(){return t},responseText:m.responseText,responseXML:m.responseXML};m=null;return s},createException:function(b){return{request:b,requestId:b.id,status:b.aborted?-1:0,statusText:b.aborted?"transaction aborted":"communication failure",aborted:b.aborted,timedout:b.timedout}}});Ext.define("Ext.data.ResultSet",{loaded:true,count:0,total:0,success:false,constructor:function(b){Ext.apply(this,b);this.totalRecords=this.total;if(b.count===undefined){this.count=this.records.length}}});Ext.define("Ext.grid.plugin.DragDrop",{extend:"Ext.AbstractPlugin",alias:"plugin.gridviewdragdrop",uses:["Ext.view.DragZone","Ext.grid.ViewDropZone"],dragText:"{0} selected row{1}",ddGroup:"GridDD",enableDrop:true,enableDrag:true,init:function(b){b.on("render",this.onViewRender,this,{single:true})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},enable:function(){var b=this;if(b.dragZone){b.dragZone.unlock()}if(b.dropZone){b.dropZone.unlock()}b.callParent()},disable:function(){var b=this;if(b.dragZone){b.dragZone.lock()}if(b.dropZone){b.dropZone.lock()}b.callParent()},onViewRender:function(d){var c=this;if(c.enableDrag){c.dragZone=new Ext.view.DragZone({view:d,ddGroup:c.dragGroup||c.ddGroup,dragText:c.dragText})}if(c.enableDrop){c.dropZone=new Ext.grid.ViewDropZone({view:d,ddGroup:c.dropGroup||c.ddGroup})}}});Ext.define("Ext.util.ClickRepeater",{extend:"Ext.util.Observable",constructor:function(d,e){var f=this;f.el=Ext.get(d);f.el.unselectable();Ext.apply(f,e);f.callParent();f.addEvents("mousedown","click","mouseup");if(!f.disabled){f.disabled=true;f.enable()}if(f.handler){f.on("click",f.handler,f.scope||f)}},interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,enable:function(){if(this.disabled){this.el.on("mousedown",this.handleMouseDown,this);if(Ext.isIE){this.el.on("dblclick",this.handleDblClick,this)}if(this.preventDefault||this.stopDefault){this.el.on("click",this.eventOptions,this)}}this.disabled=false},disable:function(b){if(b||!this.disabled){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}Ext.getDoc().un("mouseup",this.handleMouseUp,this);this.el.removeAllListeners()}this.disabled=true},setDisabled:function(b){this[b?"disable":"enable"]()},eventOptions:function(b){if(this.preventDefault){b.preventDefault()}if(this.stopDefault){b.stopEvent()}},destroy:function(){this.disable(true);Ext.destroy(this.el);this.clearListeners()},handleDblClick:function(b){clearTimeout(this.timer);this.el.blur();this.fireEvent("mousedown",this,b);this.fireEvent("click",this,b)},handleMouseDown:function(b){clearTimeout(this.timer);this.el.blur();if(this.pressedCls){this.el.addCls(this.pressedCls)}this.mousedownTime=new Date();Ext.getDoc().on("mouseup",this.handleMouseUp,this);this.el.on("mouseout",this.handleMouseOut,this);this.fireEvent("mousedown",this,b);this.fireEvent("click",this,b);if(this.accelerate){this.delay=400}b=new Ext.EventObjectImpl(b);this.timer=Ext.defer(this.click,this.delay||this.interval,this,[b])},click:function(b){this.fireEvent("click",this,b);this.timer=Ext.defer(this.click,this.accelerate?this.easeOutExpo(Ext.Date.getElapsed(this.mousedownTime),400,-390,12000):this.interval,this,[b])},easeOutExpo:function(h,b,c,d){return(h==d)?b+c:c*(-Math.pow(2,-10*h/d)+1)+b},handleMouseOut:function(){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.el.on("mouseover",this.handleMouseReturn,this)},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn,this);if(this.pressedCls){this.el.addCls(this.pressedCls)}this.click()},handleMouseUp:function(b){clearTimeout(this.timer);this.el.un("mouseover",this.handleMouseReturn,this);this.el.un("mouseout",this.handleMouseOut,this);Ext.getDoc().un("mouseup",this.handleMouseUp,this);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.fireEvent("mouseup",this,b)}});Ext.define("Ext.data.Tree",{alias:"data.tree",mixins:{observable:"Ext.util.Observable"},root:null,constructor:function(d){var c=this;c.mixins.observable.constructor.call(c);if(d){c.setRootNode(d)}},getRootNode:function(){return this.root},setRootNode:function(c){var d=this;d.root=c;if(d.fireEvent("beforeappend",null,c)!==false){c.set("root",true);c.updateInfo();c.commit();c.on({scope:d,insert:d.onNodeInsert,append:d.onNodeAppend,remove:d.onNodeRemove});d.relayEvents(c,["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort","rootchange"]);d.nodeHash={};d.registerNode(c);d.fireEvent("append",null,c);d.fireEvent("rootchange",c)}return c},flatten:function(){var e=[],f=this.nodeHash,d;for(d in f){if(f.hasOwnProperty(d)){e.push(f[d])}}return e},onNodeInsert:function(d,c){this.registerNode(c,true)},onNodeAppend:function(d,c){this.registerNode(c,true)},onNodeRemove:function(d,c){this.unregisterNode(c,true)},onNodeIdChanged:function(h,g,f){var e=this.nodeHash;e[f]=h;delete e[g||h.internalId]},getNodeById:function(b){return this.nodeHash[b]},registerNode:function(f,e){var d=this;d.nodeHash[f.getId()||f.internalId]=f;f.on("idchanged",d.onNodeIdChanged,d);if(e===true){f.eachChild(function(a){d.registerNode(a,true)})}},unregisterNode:function(c,d){delete this.nodeHash[c.getId()||c.internalId];if(d===true){c.eachChild(function(a){this.unregisterNode(a,true)},this)}},sort:function(c,d){this.getRootNode().sort(c,d)},filter:function(c,d){this.getRootNode().filter(c,d)}});Ext.ns("Ext.fx");Ext.require("Ext.fx.CubicBezier",function(){var l=Math,j=l.PI,m=l.pow,h=l.sin,k=l.sqrt,i=l.abs,n=1.70158;Ext.fx.Easing={};Ext.apply(Ext.fx.Easing,{linear:function(a){return a},ease:function(f){var s=0.07813-f/2,e=-0.25,d=k(0.0066+s*s),b=d-s,g=m(i(b),1/3)*(b<0?-1:1),c=-d-s,q=m(i(c),1/3)*(c<0?-1:1),a=g+q+0.25;return m(1-a,2)*3*a*0.1+(1-a)*3*a*a+a*a*a},easeIn:function(a){return m(a,1.7)},easeOut:function(a){return m(a,0.48)},easeInOut:function(g){var c=0.48-g/1.04,d=k(0.1734+c*c),f=d-c,q=m(i(f),1/3)*(f<0?-1:1),a=-d-c,b=m(i(a),1/3)*(a<0?-1:1),e=q+b+0.5;return(1-e)*3*e*e+e*e*e},backIn:function(a){return a*a*((n+1)*a-n)},backOut:function(a){a=a-1;return a*a*((n+1)*a+n)+1},elasticIn:function(a){if(a===0||a===1){return a}var b=0.3,c=b/4;return m(2,-10*a)*h((a-c)*(2*j)/b)+1},elasticOut:function(a){return 1-Ext.fx.Easing.elasticIn(1-a)},bounceIn:function(a){return 1-Ext.fx.Easing.bounceOut(1-a)},bounceOut:function(a){var c=7.5625,b=2.75,d;if(a<(1/b)){d=c*a*a}else{if(a<(2/b)){a-=(1.5/b);d=c*a*a+0.75}else{if(a<(2.5/b)){a-=(2.25/b);d=c*a*a+0.9375}else{a-=(2.625/b);d=c*a*a+0.984375}}}return d}});Ext.apply(Ext.fx.Easing,{"back-in":Ext.fx.Easing.backIn,"back-out":Ext.fx.Easing.backOut,"ease-in":Ext.fx.Easing.easeIn,"ease-out":Ext.fx.Easing.easeOut,"elastic-in":Ext.fx.Easing.elasticIn,"elastic-out":Ext.fx.Easing.elasticIn,"bounce-in":Ext.fx.Easing.bounceIn,"bounce-out":Ext.fx.Easing.bounceOut,"ease-in-out":Ext.fx.Easing.easeInOut})});Ext.define("Ext.util.MixedCollection",{extend:"Ext.util.AbstractMixedCollection",mixins:{sortable:"Ext.util.Sortable"},constructor:function(){var b=this;b.callParent(arguments);b.addEvents("sort");b.mixins.sortable.initSortable.call(b)},doSort:function(b){this.sortBy(b)},_sort:function(i,t,m){var n=this,r,q,s=String(t).toUpperCase()=="DESC"?-1:1,o=[],c=n.keys,p=n.items;m=m||function(a,b){return a-b};for(r=0,q=p.length;r<q;r++){o[o.length]={key:c[r],value:p[r],index:r}}Ext.Array.sort(o,function(b,d){var a=m(b[i],d[i])*s;if(a===0){a=(b.index<d.index?-1:1)}return a});for(r=0,q=o.length;r<q;r++){p[r]=o[r].value;c[r]=o[r].key}n.fireEvent("sort",n)},sortBy:function(n){var j=this,h=j.items,k=j.keys,l=h.length,i=[],m;for(m=0;m<l;m++){i[m]={key:k[m],value:h[m],index:m}}Ext.Array.sort(i,function(b,c){var a=n(b.value,c.value);if(a===0){a=(b.index<c.index?-1:1)}return a});for(m=0;m<l;m++){h[m]=i[m].value;k[m]=i[m].key}j.fireEvent("sort",j,h,k)},findInsertionIndex:function(n,o){var m=this,i=m.items,k=0,j=i.length-1,p,l;if(!o){o=m.generateComparator()}while(k<=j){p=(k+j)>>1;l=o(n,i[p]);if(l>=0){k=p+1}else{if(l<0){j=p-1}}}return k},reorder:function(o){var l=this,i=l.items,p=0,m=i.length,j=[],n=[],k;l.suspendEvents();for(k in o){j[o[k]]=i[k]}for(p=0;p<m;p++){if(o[p]==undefined){n.push(i[p])}}for(p=0;p<m;p++){if(j[p]==undefined){j[p]=n.shift()}}l.clear();l.addAll(j);l.resumeEvents();l.fireEvent("sort",l)},sortByKey:function(d,c){this._sort("key",d,c||function(g,h){var a=String(g).toUpperCase(),b=String(h).toUpperCase();return a>b?1:(a<b?-1:0)})}});Ext.define("Ext.data.AbstractStore",{requires:["Ext.util.MixedCollection","Ext.data.proxy.Proxy","Ext.data.Operation","Ext.util.Filter"],mixins:{observable:"Ext.util.Observable",sortable:"Ext.util.Sortable"},statics:{create:function(b){if(!b.isStore){if(!b.type){b.type="store"}b=Ext.createByAlias("store."+b.type,b)}return b}},remoteSort:false,remoteFilter:false,autoLoad:undefined,autoSync:false,batchUpdateMode:"operation",filterOnLoad:true,sortOnLoad:true,implicitModel:false,defaultProxyType:"memory",isDestroyed:false,isStore:true,sortRoot:"data",constructor:function(e){var f=this,d;Ext.apply(f,e);f.removed=[];f.mixins.observable.constructor.apply(f,arguments);f.model=Ext.ModelManager.getModel(f.model);Ext.applyIf(f,{modelDefaults:{}});if(!f.model&&f.fields){f.model=Ext.define("Ext.data.Store.ImplicitModel-"+(f.storeId||Ext.id()),{extend:"Ext.data.Model",fields:f.fields,proxy:f.proxy||f.defaultProxyType});delete f.fields;f.implicitModel=true}if(!f.model&&f.useModelWarning!==false){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Store defined with no model. You may have mistyped the model name.")}}f.setProxy(f.proxy||f.model.getProxy());f.proxy.on("metachange",f.onMetaChange,f);if(f.id&&!f.storeId){f.storeId=f.id;delete f.id}if(f.storeId){Ext.data.StoreManager.register(f)}f.mixins.sortable.initSortable.call(f);d=f.decodeFilters(f.filters);f.filters=new Ext.util.MixedCollection();f.filters.addAll(d)},setProxy:function(d){var c=this;if(d instanceof Ext.data.proxy.Proxy){d.setModel(c.model)}else{if(Ext.isString(d)){d={type:d}}Ext.applyIf(d,{model:c.model});d=Ext.createByAlias("proxy."+d.type,d)}c.proxy=d;return c.proxy},getProxy:function(){return this.proxy},onMetaChange:function(d,c){this.fireEvent("metachange",this,c)},create:function(h,j){var i=this,g=Ext.ModelManager.create(Ext.applyIf(h,i.modelDefaults),i.model.modelName),f;j=j||{};Ext.applyIf(j,{action:"create",records:[g]});f=new Ext.data.Operation(j);i.proxy.create(f,i.onProxyWrite,i);return g},read:function(){return this.load.apply(this,arguments)},update:function(d){var f=this,e;d=d||{};Ext.applyIf(d,{action:"update",records:f.getUpdatedRecords()});e=new Ext.data.Operation(d);return f.proxy.update(e,f.onProxyWrite,f)},onProxyWrite:function(e){var h=this,g=e.wasSuccessful(),f=e.getRecords();switch(e.action){case"create":h.onCreateRecords(f,e,g);break;case"update":h.onUpdateRecords(f,e,g);break;case"destroy":h.onDestroyRecords(f,e,g);break}if(g){h.fireEvent("write",h,e);h.fireEvent("datachanged",h);h.fireEvent("refresh",h)}Ext.callback(e.callback,e.scope||h,[f,e,g])},onCreateRecords:Ext.emptyFn,onUpdateRecords:Ext.emptyFn,onDestroyRecords:function(d,e,f){if(f){this.removed=[]}},destroy:function(d){var f=this,e;d=d||{};Ext.applyIf(d,{action:"destroy",records:f.getRemovedRecords()});e=new Ext.data.Operation(d);return f.proxy.destroy(e,f.onProxyWrite,f)},onBatchOperationComplete:function(c,d){return this.onProxyWrite(d)},onBatchComplete:function(l,h){var i=this,g=l.operations,j=g.length,k;i.suspendEvents();for(k=0;k<j;k++){i.onProxyWrite(g[k])}i.resumeEvents();i.fireEvent("datachanged",i);i.fireEvent("refresh",i)},onBatchException:function(c,d){},filterNew:function(b){return b.phantom===true&&b.isValid()},getNewRecords:function(){return[]},getUpdatedRecords:function(){return[]},getModifiedRecords:function(){return[].concat(this.getNewRecords(),this.getUpdatedRecords())},filterUpdated:function(b){return b.dirty===true&&b.phantom!==true&&b.isValid()},getRemovedRecords:function(){return this.removed},filter:function(d,c){},decodeFilters:function(h){if(!Ext.isArray(h)){if(h===undefined){h=[]}else{h=[h]}}var i=h.length,g=Ext.util.Filter,f,j;for(j=0;j<i;j++){f=h[j];if(!(f instanceof g)){Ext.apply(f,{root:"data"});if(f.fn){f.filterFn=f.fn}if(typeof f=="function"){f={filterFn:f}}h[j]=new g(f)}}return h},clearFilter:function(b){},isFiltered:function(){},filterBy:function(c,d){},sync:function(n){var l=this,h={},k=l.getNewRecords(),m=l.getUpdatedRecords(),i=l.getRemovedRecords(),j=false;if(k.length>0){h.create=k;j=true}if(m.length>0){h.update=m;j=true}if(i.length>0){h.destroy=i;j=true}if(j&&l.fireEvent("beforesync",h)!==false){n=n||{};l.proxy.batch(Ext.apply(n,{operations:h,listeners:l.getBatchListeners()}))}return l},getBatchListeners:function(){var c=this,d={scope:c,exception:c.onBatchException};if(c.batchUpdateMode=="operation"){d.operationcomplete=c.onBatchOperationComplete}else{d.complete=c.onBatchComplete}return d},save:function(){return this.sync.apply(this,arguments)},load:function(d){var f=this,e;d=d||{};d.action=d.action||"read";d.filters=d.filters||f.filters.items;d.sorters=d.sorters||f.getSorters();e=new Ext.data.Operation(d);if(f.fireEvent("beforeload",f,e)!==false){f.loading=true;f.proxy.read(e,f.onProxyLoad,f)}return f},afterEdit:function(g,h){var i=this,f,j;if(i.autoSync&&!i.autoSyncSuspended){for(f=h.length;f--;){if(g.fields.get(h[f]).persist){j=true;break}}if(j){i.sync()}}i.fireEvent("update",i,g,Ext.data.Model.EDIT,h)},afterReject:function(b){this.fireEvent("update",this,b,Ext.data.Model.REJECT,null)},afterCommit:function(b){this.fireEvent("update",this,b,Ext.data.Model.COMMIT,null)},destroyStore:function(){var b=this;if(!b.isDestroyed){if(b.storeId){Ext.data.StoreManager.unregister(b)}b.clearData();b.data=b.tree=b.sorters=b.filters=b.groupers=null;if(b.reader){b.reader.destroyReader()}b.proxy=b.reader=b.writer=null;b.clearListeners();b.isDestroyed=true;if(b.implicitModel){Ext.destroy(b.model)}else{b.model=null}}},doSort:function(d){var c=this;if(c.remoteSort){c.load()}else{c.data.sortBy(d);c.fireEvent("datachanged",c);c.fireEvent("refresh",c)}},clearData:Ext.emptyFn,getCount:Ext.emptyFn,getById:Ext.emptyFn,removeAll:Ext.emptyFn,isLoading:function(){return !!this.loading},suspendAutoSync:function(){this.autoSyncSuspended=true},resumeAutoSync:function(){this.autoSyncSuspended=false}});Ext.define("Ext.data.StoreManager",{extend:"Ext.util.MixedCollection",alternateClassName:["Ext.StoreMgr","Ext.data.StoreMgr","Ext.StoreManager"],singleton:true,uses:["Ext.data.ArrayStore"],register:function(){for(var d=0,c;(c=arguments[d]);d++){this.add(c)}},unregister:function(){for(var d=0,c;(c=arguments[d]);d++){this.remove(this.lookup(c))}},lookup:function(l){if(Ext.isArray(l)){var g=["field1"],j=!Ext.isArray(l[0]),i=l,k,h;if(j){i=[];for(k=0,h=l.length;k<h;++k){i.push([l[k]])}}else{for(k=2,h=l[0].length;k<=h;++k){g.push("field"+k)}}return new Ext.data.ArrayStore({data:i,fields:g,autoDestroy:true,autoCreated:true,expanded:j})}if(Ext.isString(l)){return this.get(l)}else{return Ext.data.AbstractStore.create(l)}},getKey:function(b){return b.storeId}},function(){Ext.regStore=function(f,d){var e;if(Ext.isObject(f)){d=f}else{d.storeId=f}if(d instanceof Ext.data.Store){e=d}else{e=new Ext.data.Store(d)}return Ext.data.StoreManager.register(e)};Ext.getStore=function(b){return Ext.data.StoreManager.lookup(b)}});Ext.define("Docs.view.cls.PackageLogic",{extend:"Docs.view.cls.Logic",create:function(){this.root={children:[],text:"Root"};this.packages={"":this.root};this.privates=[];Ext.Array.forEach(this.classes,this.addClass,this);this.sortTree(this.root);return{root:this.root,privates:this.privates}},sortTree:function(b){b.children.sort(this.compare);Ext.Array.forEach(b.children,this.sortTree,this)},compare:function(g,h){if(g.leaf===h.leaf){var b=g.text.toLowerCase();var a=h.text.toLowerCase();return b>a?1:(b<a?-1:0)}else{return g.leaf?1:-1}},addClass:function(g){if(g["private"]&&!this.showPrivateClasses){this.privates.push(this.classNode(g));return}if(this.packages[g.name]){var f=this.packages[g.name];var i=this.classNode(g);f.iconCls=i.iconCls;f.url=i.url}else{var h=this.packageName(g.name);var j=this.packages[h]||this.addPackage(h);var i=this.classNode(g);this.addChild(j,i);this.packages[g.name]=i}},addPackage:function(e){var g=this.packageName(e);var h=this.packages[g]||this.addPackage(g);var f=this.packageNode(e);this.addChild(h,f);this.packages[e]=f;return f},addChild:function(d,c){d.children.push(c);if(d.leaf){d.leaf=false}},classNode:function(b){return{text:this.shortName(b.name),url:"#!/api/"+b.name,iconCls:b.icon,cls:b["private"]?"private":"",leaf:true,children:[]}},packageNode:function(b){return{text:this.shortName(b),iconCls:"icon-pkg",leaf:false,children:[]}},packageName:function(b){return b.slice(0,-this.shortName(b).length-1)||""},shortName:function(d){var c=d.split(/\./);return c.pop()}});Ext.define("Docs.view.cls.InheritanceLogic",{extend:"Docs.view.cls.Logic",create:function(){this.root={children:[],text:"Root"};this.privates=[];this.subclasses=this.buildLookupTable(this.classes);Ext.Array.forEach(this.classes,this.addClass,this);if(!this.showPrivateClasses){this.stripPrivateClasses(this.root)}this.sortTree(this.root);return{root:this.root,privates:this.privates}},sortTree:function(b){b.children.sort(Ext.bind(this.compare,this));Ext.Array.forEach(b.children,this.sortTree,this)},compare:function(g,h){var b=g.text.toLowerCase();var a=h.text.toLowerCase();return b>a?1:(b<a?-1:0)},buildLookupTable:function(d){var c={};Ext.Array.forEach(d,function(b){var a=b["extends"];if(a&&a!=="Object"){if(!c[a]){c[a]=[]}c[a].push(b)}},this);return c},classNode:function(b){return{text:b.name,url:"#!/api/"+b.name,iconCls:b.icon,cls:b["private"]?"private":""}},addClass:function(e){var d=e["extends"];if(!d||d==="Object"){var f=this.classNode(e);this.root.children.push(f);f.children=this.getSubclasses(e.name);f.leaf=f.children.length===0}},getSubclasses:function(b){if(!this.subclasses[b]){return[]}return Ext.Array.map(this.subclasses[b],function(a){var d=this.classNode(a);d.children=this.getSubclasses(a.name);d.leaf=d.children.length===0;return d},this)},stripPrivateClasses:function(b){b.children=Ext.Array.filter(b.children,function(a){this.stripPrivateClasses(a);if(a.cls==="private"&&a.children.length===0){this.privates.push(a);return false}else{return true}},this)}});Ext.define("Ext.container.DockingContainer",{requires:["Ext.util.MixedCollection","Ext.Element"],isDockingContainer:true,defaultDockWeights:{top:{render:1,visual:1},left:{render:3,visual:5},right:{render:5,visual:7},bottom:{render:7,visual:3}},dockOrder:{top:-1,left:-1,right:1,bottom:1},addDocked:function(h,i){var j=this,g=0,k,l;h=j.prepareItems(h);l=h.length;for(;g<l;g++){k=h[g];k.dock=k.dock||"top";if(i!==undefined){j.dockedItems.insert(i+g,k)}else{j.dockedItems.add(k)}if(k.onAdded!==Ext.emptyFn){k.onAdded(j,g)}if(j.onDockedAdd!==Ext.emptyFn){j.onDockedAdd(k)}}if(j.rendered&&!j.suspendLayout){j.updateLayout()}return h},destroyDockedItems:function(){var d=this.dockedItems,c;if(d){while((c=d.first())){this.removeDocked(c,true)}}},doRenderDockedItems:function(n,k,j){var l=k.$comp,m=l.componentLayout,h,i;if(m.getDockedItems&&!k.$skipDockedItems){h=m.getDockedItems("render",!j);i=h&&m.getItemsRenderTree(h);if(i){Ext.DomHelper.generateMarkup(i,n)}}},getDockedComponent:function(b){if(Ext.isObject(b)){b=b.getItemId()}return this.dockedItems.get(b)},getDockedItems:function(e,f){var d=this.getComponentLayout().getDockedItems("render",f);if(e&&d.length){d=Ext.ComponentQuery.query(e,d)}return d},getDockingRefItems:function(f,h){var g=f&&"*,* *",i=this.getDockedItems(g,true),j;i.push.apply(i,h);j=this.getDockedItems(g,false);i.push.apply(i,j);return i},initDockingItems:function(){var c=this,d=c.dockedItems;c.dockedItems=new Ext.util.AbstractMixedCollection(false,c.getComponentId);if(d){c.addDocked(d)}},insertDocked:function(c,d){this.addDocked(d,c)},onDockedAdd:Ext.emptyFn,onDockedRemove:Ext.emptyFn,removeDocked:function(h,f){var i=this,j,g;if(!i.dockedItems.contains(h)){return h}j=i.componentLayout;g=j&&i.rendered;if(g){j.onRemove(h)}i.dockedItems.remove(h);h.onRemoved();i.onDockedRemove(h);if(f===true||(f!==false&&i.autoDestroy)){h.destroy()}else{if(g){j.afterRemove(h)}}if(!i.destroying&&!i.suspendLayout){i.updateLayout()}return h},setupDockingRenderTpl:function(b){b.renderDockedItems=this.doRenderDockedItems}});Ext.define("Ext.XTemplateCompiler",{extend:"Ext.XTemplateParser",useEval:Ext.isGecko,useIndex:Ext.isIE6||Ext.isIE7,useFormat:true,propNameRe:/^[\w\d\$]*$/,compile:function(e){var f=this,d=f.generate(e);return f.useEval?f.evalTpl(d):(new Function("Ext",d))(Ext)},generate:function(f){var g=this,e="var fm=Ext.util.Format,ts=Object.prototype.toString;",h;g.maxLevel=0;g.body=["var c0=values, a0="+g.createArrayTest(0)+", p0=parent, n0=xcount, i0=xindex, v;\n"];if(g.definitions){if(typeof g.definitions==="string"){g.definitions=[g.definitions,e]}else{g.definitions.push(e)}}else{g.definitions=[e]}g.switches=[];g.parse(f);g.definitions.push((g.useEval?"$=":"return")+" function ("+g.fnArgs+") {",g.body.join(""),"}");h=g.definitions.join("\n");g.definitions.length=g.body.length=g.switches.length=0;delete g.definitions;delete g.body;delete g.switches;return h},doText:function(f){var d=this,e=d.body;f=f.replace(d.aposRe,"\\'").replace(d.newLineRe,"\\n");if(d.useIndex){e.push("out[out.length]='",f,"'\n")}else{e.push("out.push('",f,"')\n")}},doExpr:function(c){var d=this.body;d.push("if ((v="+c+")!==undefined) out");if(this.useIndex){d.push("[out.length]=v+''\n")}else{d.push(".push(v+'')\n")}},doTag:function(b){this.doExpr(this.parseTag(b))},doElse:function(){this.body.push("} else {\n")},doEval:function(b){this.body.push(b,"\n")},doIf:function(d,f){var e=this;if(d==="."){e.body.push("if (values) {\n")}else{if(e.propNameRe.test(d)){e.body.push("if (",e.parseTag(d),") {\n")}else{e.body.push("if (",e.addFn(d),e.callFn,") {\n")}}if(f.exec){e.doExec(f.exec)}},doElseIf:function(d,f){var e=this;if(d==="."){e.body.push("else if (values) {\n")}else{if(e.propNameRe.test(d)){e.body.push("} else if (",e.parseTag(d),") {\n")}else{e.body.push("} else if (",e.addFn(d),e.callFn,") {\n")}}if(f.exec){e.doExec(f.exec)}},doSwitch:function(c){var d=this;if(c==="."){d.body.push("switch (values) {\n")}else{if(d.propNameRe.test(c)){d.body.push("switch (",d.parseTag(c),") {\n")}else{d.body.push("switch (",d.addFn(c),d.callFn,") {\n")}}d.switches.push(0)},doCase:function(j){var k=this,l=Ext.isArray(j)?j:[j],i=k.switches.length-1,h,g;if(k.switches[i]){k.body.push("break;\n")}else{k.switches[i]++}for(g=0,i=l.length;g<i;++g){h=k.intRe.exec(l[g]);l[g]=h?h[1]:("'"+l[g].replace(k.aposRe,"\\'")+"'")}k.body.push("case ",l.join(": case "),":\n")},doDefault:function(){var d=this,c=d.switches.length-1;if(d.switches[c]){d.body.push("break;\n")}else{d.switches[c]++}d.body.push("default:\n")},doEnd:function(e,g){var h=this,f=h.level-1;if(e=="for"){if(g.exec){h.doExec(g.exec)}h.body.push("}\n");h.body.push("parent=p",f,";values=r",f+1,";xcount=n",f,";xindex=i",f,"\n")}else{if(e=="if"||e=="switch"){h.body.push("}\n")}}},doFor:function(m,k){var n=this,o,i=n.level,j=i-1,p="p"+i,l;if(m==="."){o="values"}else{if(n.propNameRe.test(m)){o=n.parseTag(m)}else{o=n.addFn(m)+n.callFn}}if(n.maxLevel<i){n.maxLevel=i;n.body.push("var ")}if(m=="."){l="c"+i}else{l="a"+j+"?c"+j+"[i"+j+"]:p"+i}n.body.push("i",i,"=0,n",i,"=0,c",i,"=",o,",a",i,"=",n.createArrayTest(i),",p",i,"=c",j,",r",i,"=values;\n","parent=",l,"\n","if (c",i,"){if(a",i,"){n",i,"=c",i,".length;}else if (c",i,".isMixedCollection){c",i,"=c",i,".items;n",i,"=c",i,".length;}else if(c",i,".isStore){c",i,"=c",i,".data.items;n",i,"=c",i,".length;}else{c",i,"=[c",i,"];n",i,"=1;}}\n","for (xcount=n",i,";i",i,"<n"+i+";++i",i,"){\n","values=c",i,"[i",i,"]");if(k.propName){n.body.push(".",k.propName)}n.body.push("\n","xindex=i",i,"+1\n")},createArrayTest:("isArray" in Array)?function(b){return"Array.isArray(c"+b+")"}:function(b){return"ts.call(c"+b+')==="[object Array]"'},doExec:function(h,g){var e=this,f="f"+e.definitions.length;e.definitions.push("function "+f+"("+e.fnArgs+") {"," try { with(values) {"," "+h," }} catch(e) {",'Ext.log("XTemplate Error: " + e.message);',"}","}");e.body.push(f+e.callFn+"\n")},addFn:function(e){var f=this,d="f"+f.definitions.length;if(e==="."){f.definitions.push("function "+d+"("+f.fnArgs+") {"," return values","}")}else{if(e===".."){f.definitions.push("function "+d+"("+f.fnArgs+") {"," return parent","}")}else{f.definitions.push("function "+d+"("+f.fnArgs+") {"," try { with(values) {"," return("+e+")"," }} catch(e) {",'Ext.log("XTemplate Error: " + e.message);',"}","}")}}return d},parseTag:function(i){var l=this,j=l.tagRe.exec(i),n=j[1],k=j[2],o=j[3],m=j[4],p;if(n=="."){if(!l.validTypes){l.definitions.push("var validTypes={string:1,number:1,boolean:1};");l.validTypes=true}p='validTypes[typeof values] || ts.call(values) === "[object Date]" ? values : ""'}else{if(n=="#"){p="xindex"}else{if(n.substr(0,7)=="parent."){p=n}else{if(isNaN(n)&&n.indexOf("-")==-1&&n.indexOf(".")!=-1){p="values."+n}else{p="values['"+n+"']"}}}}if(m){p="("+p+m+")"}if(k&&l.useFormat){o=o?","+o:"";if(k.substr(0,5)!="this."){k="fm."+k+"("}else{k+="("}}else{return p}return k+p+o+")"},evalTpl:function($){eval($);return $},newLineRe:/\r\n|\r|\n/g,aposRe:/[']/g,intRe:/^\s*(\d+)\s*$/,tagRe:/([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?/},function(){var b=this.prototype;b.fnArgs="out,values,parent,xindex,xcount";b.callFn=".call(this,"+b.fnArgs+")"});Ext.define("Ext.XTemplate",{extend:"Ext.Template",requires:"Ext.XTemplateCompiler",apply:function(b){return this.applyOut(b,[]).join("")},applyOut:function(g,e){var i=this,j;if(!i.fn){j=new Ext.XTemplateCompiler({useFormat:i.disableFormats!==true,definitions:i.definitions});i.fn=j.compile(i.html)}try{i.fn.call(i,e,g,{},1,1)}catch(h){Ext.log("Error: "+h.message)}return e},compile:function(){return this},statics:{getTpl:function(f,h){var e=f[h],g;if(e&&!e.isTemplate){e=Ext.ClassManager.dynInstantiate("Ext.XTemplate",e);if(f.hasOwnProperty(h)){f[h]=e}else{for(g=f.self.prototype;g;g=g.superclass){if(g.hasOwnProperty(h)){g[h]=e;break}}}}return e||null}}});Ext.define("Ext.layout.Layout",{requires:["Ext.XTemplate"],uses:["Ext.layout.Context"],isLayout:true,initialized:false,running:false,autoSizePolicy:{setsWidth:0,setsHeight:0},statics:{layoutsByType:{},create:function(o,p){var k=Ext.ClassManager,r=this.layoutsByType,q,n,s,t,m,l;if(!o||typeof o==="string"){m=o||p;s={}}else{if(o.isLayout){return o}else{s=o;m=o.type||p}}if(!(t=r[m])){q="layout."+m;n=k.getNameByAlias(q);if(!n){l=true}t=k.get(n);if(l||!t){return k.instantiateByAlias(q,s||{})}r[m]=t}return new t(s)}},constructor:function(d){var c=this;c.id=Ext.id(null,c.type+"-");Ext.apply(c,d);c.layoutCount=0},beginLayout:Ext.emptyFn,beginLayoutCycle:function(h){var e=this,f=e.context,g;if(e.lastWidthModel!=h.widthModel){if(e.lastWidthModel){g=true}e.lastWidthModel=h.widthModel}if(e.lastHeightModel!=h.heightModel){if(e.lastWidthModel){g=true}e.lastHeightModel=h.heightModel}if(g){(f=h.context).clearTriggers(e,false);f.clearTriggers(e,true);e.triggerCount=0}},finishedLayout:function(){this.ownerContext=null},redoLayout:Ext.emptyFn,undoLayout:Ext.emptyFn,getAnimatePolicy:function(){return this.animatePolicy},getItemSizePolicy:function(b){return this.autoSizePolicy},isItemBoxParent:function(b){return false},isItemLayoutRoot:function(g){var h=g.getSizeModel(),e=h.width,f=h.height;if(!g.componentLayout.lastComponentSize&&(e.calculated||f.calculated)){return false}return !e.shrinkWrap&&!f.shrinkWrap},isItemShrinkWrap:function(b){return b.shrinkWrap},isRunning:function(){return !!this.ownerContext},getItemsRenderTree:function(m,h){var j=m.length,l,k,n,i;if(j){i=[];for(l=0;l<j;++l){k=m[l];if(!k.rendered){if(h&&(h[k.id]!==undefined)){n=h[k.id]}else{this.configureItem(k);n=k.getRenderTree();if(h){h[k.id]=n}}if(n){i.push(n)}}}}return i},finishRender:Ext.emptyFn,finishRenderItems:function(h,g){var i=g.length,f,j;for(f=0;f<i;f++){j=g[f];if(j.rendering){j.finishRender(f);this.afterRenderItem(j)}}},renderChildren:function(){var d=this,e=d.getLayoutItems(),f=d.getRenderTarget();d.renderItems(e,f)},renderItems:function(h,i){var j=this,k=h.length,g=0,l;if(k){Ext.suspendLayouts();for(;g<k;g++){l=h[g];if(l&&!l.rendered){j.renderItem(l,i,g)}else{if(!j.isValidParent(l,i,g)){j.moveItem(l,i,g)}else{j.configureItem(l)}}}Ext.resumeLayouts(true)}},isValidParent:function(i,h,g){var f=i.el?i.el.dom:Ext.getDom(i),j=(h&&h.dom)||h;if(f.parentNode&&f.parentNode.className.indexOf(Ext.baseCSSPrefix+"resizable-wrap")!==-1){f=f.parentNode}if(f&&j){if(typeof g=="number"){return f===j.childNodes[g]}return f.parentNode===j}return false},configureItem:function(b){b.ownerLayout=this},renderItem:function(d,f,e){if(!d.rendered){this.configureItem(d);d.render(f,e);this.afterRenderItem(d)}},moveItem:function(d,f,e){f=f.dom||f;if(typeof e=="number"){e=f.childNodes[e]}f.insertBefore(d.el.dom,e||null);d.container=Ext.get(f);this.configureItem(d)},onContentChange:function(){this.owner.updateLayout();return true},initLayout:function(){this.initialized=true},setOwner:function(b){this.owner=b},getLayoutItems:function(){return[]},afterRenderItem:Ext.emptyFn,onAdd:Ext.emptyFn,onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,afterRemove:function(h){var i=this,j=h.el,f=i.owner,g;if(h.rendered){g=[].concat(i.itemCls||[]);if(f.itemCls){g=Ext.Array.push(g,f.itemCls)}if(g.length){j.removeCls(g)}}delete h.ownerLayout},destroy:function(){var d=this,c;if(d.targetCls){c=d.getTarget();if(c){c.removeCls(d.targetCls)}}d.onDestroy()},sortWeightedItems:function(f,g){for(var e=0,h=f.length;e<h;++e){f[e].$i=e}Ext.Array.sort(f,function(b,c){var a=c.weight-b.weight;if(!a){a=b.$i-c.$i;if(b[g]){a=-a}}return a});for(e=0;e<h;++e){delete f[e].$i}}},function(){var h=this,e={};h.prototype.sizeModels=h.sizeModels=e;var f=function(b){var a=this,c=b.name;Ext.apply(Ext.apply(a,g),b);a[c]=true;f[c]=e[c]=a;a.fixed=!(a.auto=a.natural||a.shrinkWrap)};Ext.layout.SizeModel=f;var g={calculated:false,configured:false,constrainedMax:false,constrainedMin:false,natural:false,shrinkWrap:false,calculatedFromConfigured:false,calculatedFromNatural:false,calculatedFromShrinkWrap:false,names:null};new f({name:"calculated"});new f({name:"configured",names:{width:"width",height:"height"}});new f({name:"natural"});new f({name:"shrinkWrap"});new f({name:"calculatedFromConfigured",configured:true,names:{width:"width",height:"height"}});new f({name:"calculatedFromNatural",natural:true});new f({name:"calculatedFromShrinkWrap",shrinkWrap:true});new f({name:"constrainedMax",configured:true,constrained:true,names:{width:"maxWidth",height:"maxHeight"}});new f({name:"constrainedMin",configured:true,constrained:true,names:{width:"minWidth",height:"minHeight"}})});Ext.define("Ext.layout.container.Container",{extend:"Ext.layout.Layout",alternateClassName:"Ext.layout.ContainerLayout",mixins:{elementCt:"Ext.util.ElementContainer"},requires:["Ext.XTemplate"],type:"container",manageOverflow:0,beginCollapse:Ext.emptyFn,beginExpand:Ext.emptyFn,animatePolicy:null,childEls:["overflowPadderEl"],renderTpl:["{%this.renderBody(out,values)%}"],usesContainerHeight:true,usesContainerWidth:true,usesHeight:true,usesWidth:true,reserveScrollbar:false,lastOverflowAdjust:{width:0,height:0},constructor:function(){this.callParent(arguments);this.mixins.elementCt.constructor.call(this)},destroy:function(){this.callParent();this.mixins.elementCt.destroy.call(this)},initLayout:function(){var c=this,d=Ext.getScrollbarSize().width;c.callParent();if(d&&c.manageOverflow&&!c.hasOwnProperty("lastOverflowAdjust")){if(c.owner.autoScroll||c.reserveScrollbar){c.lastOverflowAdjust={width:d,height:0}}}},beginLayout:function(b){this.callParent(arguments);b.targetContext=b.getEl("getTarget",this);this.cacheChildItems(b)},beginLayoutCycle:function(h,f){var e=this,g=e.overflowPadderEl;e.callParent(arguments);if(!h.state.overflowAdjust){h.state.overflowAdjust=e.lastOverflowAdjust}if(f){if(e.usesContainerHeight){++h.consumersContainerHeight}if(e.usesContainerWidth){++h.consumersContainerWidth}}if(g){g.setStyle("display","none")}},completeLayout:function(b){this.lastOverflowAdjust=b.state.overflowAdjust},cacheChildItems:function(j){var l=j.context,i=[],h=this.getVisibleItems(),k=h.length,g;j.childItems=i;j.visibleItems=h;for(g=0;g<k;++g){i.push(l.getCmp(h[g]))}},cacheElements:function(){var b=this.owner;this.applyChildEls(b.el,b.id)},calculateContentSize:function(L,P){var K=this,W=(P||0)|K.manageOverflow|((L.widthModel.shrinkWrap?1:0)|(L.heightModel.shrinkWrap?2:0)),X=(W&1)||undefined,S=(W&2)||undefined,Y=L.childItems,U=Y.length,E=0,G=0,O=0,V=L.props,J,M,N,i,T,Q,H,B,C,I,D,Z,F,R;if(X){if(isNaN(V.contentWidth)){++O}else{X=undefined}}if(S){if(isNaN(V.contentHeight)){++O}else{S=undefined}}if(O){for(D=0;D<U;++D){H=Y[D];Q=H.target;I=S&&H.getProp("height");F=X&&H.getProp("width");Z=H.getMarginInfo();if((X&&isNaN(Q.x))||(S&&isNaN(Q.y))){R=Q.el.getXY();if(!J){J=L.targetContext.el.getXY();T=L.targetContext.getBorderInfo();M=J[0]+T.left;N=J[1]+T.top}B=R[0]-M;C=R[1]-N}else{B=Q.x;C=Q.y}I+=Z.bottom;F+=Z.right;E=Math.max(E,C+I);G=Math.max(G,B+F);if(isNaN(E)&&isNaN(G)){K.done=false;return}}if(X||S){i=L.targetContext.getPaddingInfo()}if(X&&!L.setContentWidth(G+i.right)){K.done=false}if(S&&!L.setContentHeight(E+i.bottom)){K.done=false}}},calculateOverflow:function(F,A,L){var w=this,R=w.owner,H=w.manageOverflow,O=F.state,G=O.overflowAdjust,M,I,P,E,Q,C,z,J,B,N,D,y,K,x;if(H&&!O.secondPass&&!w.reserveScrollbar){if(R.autoScroll){K=x=true}else{if(R.overflowX){K=R.overflowX=="auto"}else{C=F.targetContext.getStyle("overflow-x");K=C&&C!="hidden"&&C!="scroll"}if(R.overflowY){x=R.overflowY=="auto"}else{C=F.targetContext.getStyle("overflow-y");x=C&&C!="hidden"&&C!="scroll"}}if(!A.gotWidth){K=false}if(!A.gotHeight){x=false}if(K||x){z=Ext.getScrollbarSize();J=F.peek("contentWidth");B=F.peek("contentHeight");N=A.width;D=A.height;y=w.getScrollbarsNeeded(N,D,J,B);O.overflowState=y;if(typeof L=="number"){y&=~L}G={width:(K&&(y&2))?z.width:0,height:(x&&(y&1))?z.height:0};if(G.width!==w.lastOverflowAdjust.width||G.height!==w.lastOverflowAdjust.height){w.done=false;F.invalidate({state:{overflowAdjust:G,overflowState:O.overflowState,secondPass:true}})}}}if(!w.done){return}P=F.padElContext||(F.padElContext=F.getEl("overflowPadderEl",w));if(P){y=O.overflowState;M=A.width;I=0;if(y){E=F.targetContext.getPaddingInfo();Q=w.scrollRangeFlags;if((y&2)&&(Q&1)){I+=E.bottom}if((y&1)&&(Q&4)){M+=E.right}P.setProp("display","");P.setSize(M,I)}else{P.setProp("display","none")}}},configureItem:function(h){var e=this,f=e.owner.itemCls,g=[].concat(e.itemCls||[]);e.callParent(arguments);if(f){g=Ext.Array.push(g,f)}h.addCls(g)},doRenderBody:function(d,c){this.renderItems(d,c);this.renderContent(d,c)},doRenderContainer:function(f,h){var j=h.$comp.layout,g=j.getRenderTpl(),i=j.getRenderData();g.applyOut(i,f)},doRenderItems:function(e,g){var h=g.$layout,f=h.getRenderTree();if(f){Ext.DomHelper.generateMarkup(f,e)}},doRenderPadder:function(f,i){var j=i.$layout,g=j.owner,h=j.getScrollRangeFlags();if(j.manageOverflow==2){if(h&5){f.push('<div id="',g.id,'-overflowPadderEl" ','style="font-size: 1px; width:1px; height: 1px;');f.push('"></div>');j.scrollRangeFlags=h}}},finishRender:function(){var d=this,f,e;d.callParent();d.cacheElements();f=d.getRenderTarget();e=d.getLayoutItems();if(d.targetCls){d.getTarget().addCls(d.targetCls)}d.finishRenderItems(f,e)},notifyOwner:function(){this.owner.afterLayout(this)},getContainerSize:function(v,r){var u=v.targetContext,s=u.getFrameInfo(),o=u.getPaddingInfo(),p=0,n=0,x=v.state.overflowAdjust,t,q,w,m;if(!v.widthModel.shrinkWrap){++n;w=r?u.getDomProp("width"):u.getProp("width");t=(typeof w=="number");if(t){++p;w-=s.width+o.width;if(x){w-=x.width}}}if(!v.heightModel.shrinkWrap){++n;m=r?u.getDomProp("height"):u.getProp("height");q=(typeof m=="number");if(q){++p;m-=s.height+o.height;if(x){m-=x.height}}}return{width:w,height:m,needed:n,got:p,gotAll:p==n,gotWidth:t,gotHeight:q}},getLayoutItems:function(){var d=this.owner,c=d&&d.items;return(c&&c.items)||[]},getRenderData:function(){var b=this.owner;return{$comp:b,$layout:this,ownerId:b.id}},getRenderedItems:function(){var l=this,j=l.getRenderTarget(),i=l.getLayoutItems(),m=i.length,k=[],h,n;for(h=0;h<m;h++){n=i[h];if(n.rendered&&l.isValidParent(n,j,h)){k.push(n)}}return k},getRenderTarget:function(){return this.owner.getTargetEl()},getElementTarget:function(){return this.getRenderTarget()},getRenderTpl:function(){var d=this,c=Ext.XTemplate.getTpl(this,"renderTpl");if(!c.renderContent){d.owner.setupRenderTpl(c)}return c},getRenderTree:function(){var f,h=this.owner.items,g,e={};do{g=h.generation;f=this.getItemsRenderTree(this.getLayoutItems(),e)}while(h.generation!==g);return f},getScrollbarsNeeded:function(p,k,q,l){var r=Ext.getScrollbarSize(),n=typeof p=="number",j=typeof k=="number",m=0,o=0;if(!r.width){return 0}if(j&&k<l){o=2;p-=r.width}if(n&&p<q){m=1;if(!o&&j){k-=r.height;if(k<l){o=2}}}return o+m},getScrollRangeFlags:(function(){var b=-1;return function(){if(b<0){var g=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"border-box",style:{width:"100px",height:"100px",padding:"10px",overflow:"auto"},children:[{style:{border:"1px solid red",width:"150px",height:"150px",margin:"0 5px 5px 0"}}]}),i=g.dom.scrollHeight,j=g.dom.scrollWidth,h={175:0,165:1,170:2,160:3},a={175:0,165:4,170:8,160:12};b=(h[i]||0)|(a[j]||0);g.remove()}return b}}()),getTarget:function(){return this.owner.getTargetEl()},getVisibleItems:function(){var i=this.getRenderTarget(),g=this.getLayoutItems(),j=g.length,h=[],l,k;for(l=0;l<j;l++){k=g[l];if(k.rendered&&this.isValidParent(k,i,l)&&k.hidden!==true){h.push(k)}}return h},setupRenderTpl:function(c){var d=this;c.renderBody=d.doRenderBody;c.renderContainer=d.doRenderContainer;c.renderItems=d.doRenderItems;c.renderPadder=d.doRenderPadder}});Ext.define("Ext.layout.container.Fit",{extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.FitLayout",alias:"layout.fit",itemCls:Ext.baseCSSPrefix+"fit-item",targetCls:Ext.baseCSSPrefix+"layout-fit",type:"fit",defaultMargins:{top:0,right:0,bottom:0,left:0},manageMargins:true,sizePolicies:{0:{setsWidth:0,setsHeight:0},1:{setsWidth:1,setsHeight:0},2:{setsWidth:0,setsHeight:1},3:{setsWidth:1,setsHeight:1}},getItemSizePolicy:function(d){var e=this.owner.getSizeModel(),f=(e.width.shrinkWrap?0:1)|(e.height.shrinkWrap?0:2);return this.sizePolicies[f]},beginLayoutCycle:function(y,i){var s=this,t=y.widthModel,u=y.heightModel,v=y.childItems,q=!t.shrinkWrap,B=!u.shrinkWrap,z=v.length,r=(y.targetContext.el.dom.tagName==="TD"),w,x,A,p;s.callParent(arguments);for(w=0;w<z;++w){A=v[w];if(!i){if(A.widthModel.calculated==q){x=null}else{x={widthModel:q?s.sizeModels.calculated:A.sizeModel.width}}if(A.heightModel.calculated!=B){(x||(x={})).heightModel=B?s.sizeModels.calculated:A.sizeModel.height}if(x){x.before=s.onBeforeInvalidateChild;A.invalidate(x)}}if(r){p=A.target.el.dom;if(A.heightModel.calculated){p.style.height=""}if(A.widthModel.calculated){p.style.width=""}}}},calculate:function(s){var n=this,o=s.childItems,u=o.length,t={contentWidth:0,contentHeight:0,length:u,ownerContext:s,targetSize:n.getContainerSize(s)},q=s.widthModel.shrinkWrap,i=s.heightModel.shrinkWrap,v=0,r=0,m,p;for(p=0;p<u;++p){t.index=p;n.fitItem(o[p],t)}if(i||q){m=s.targetContext.getPaddingInfo();if(q){v=m.width}if(i){r=m.height}}if(!s.setContentSize(t.contentWidth+v,t.contentHeight+r)){n.done=false}},fitItem:function(d,f){var e=this;if(d.invalid){e.done=false;return}f.margins=d.getMarginInfo();f.needed=f.got=0;e.fitItemWidth(d,f);e.fitItemHeight(d,f);if(f.got!=f.needed){e.done=false}},fitItemWidth:function(d,c){if(c.ownerContext.widthModel.shrinkWrap){c.contentWidth=Math.max(c.contentWidth,d.getProp("width")+c.margins.width)}else{if(d.widthModel.calculated){++c.needed;if(c.targetSize.gotWidth){++c.got;this.setItemWidth(d,c)}}}this.positionItemX(d,c)},fitItemHeight:function(d,c){if(c.ownerContext.heightModel.shrinkWrap){c.contentHeight=Math.max(c.contentHeight,d.getProp("height")+c.margins.height)}else{if(d.heightModel.calculated){++c.needed;if(c.targetSize.gotHeight){++c.got;this.setItemHeight(d,c)}}}this.positionItemY(d,c)},onBeforeInvalidateChild:function(c,d){++c.context.progressCount;if(d.widthModel){c.widthModel=d.widthModel}if(d.heightModel){c.heightModel=d.heightModel}},positionItemX:function(e,f){var d=f.margins;if(f.index||d.left){e.setProp("x",d.left)}if(d.width){e.setProp("margin-right",d.width)}},positionItemY:function(e,f){var d=f.margins;if(f.index||d.top){e.setProp("y",d.top)}if(d.height){e.setProp("margin-bottom",d.height)}},setItemHeight:function(d,c){d.setHeight(c.targetSize.height-c.margins.height)},setItemWidth:function(d,c){d.setWidth(c.targetSize.width-c.margins.width)}});Ext.define("Ext.layout.container.Card",{extend:"Ext.layout.container.Fit",alternateClassName:"Ext.layout.CardLayout",alias:"layout.card",type:"card",hideInactive:true,deferredRender:false,getRenderTree:function(){var d=this,c=d.getActiveItem();if(c){if(c.hasListeners.beforeactivate&&c.fireEvent("beforeactivate",c)===false){c=d.activeItem=d.owner.activeItem=null}else{if(c.hasListeners.activate){c.on({boxready:function(){c.fireEvent("activate",c)},single:true})}}if(d.deferredRender){if(c){return d.getItemsRenderTree([c])}}else{return d.callParent(arguments)}}},renderChildren:function(){var d=this,c=d.getActiveItem();if(!d.deferredRender){d.callParent()}else{if(c){d.renderItems([c],d.getRenderTarget())}}},isValidParent:function(h,g,f){var e=h.el?h.el.dom:Ext.getDom(h);return(e&&e.parentNode===(g.dom||g))||false},getActiveItem:function(){var c=this,d=c.parseActiveItem(c.activeItem||(c.owner&&c.owner.activeItem));if(d&&c.owner.items.indexOf(d)!=-1){c.activeItem=d}else{c.activeItem=null}return c.activeItem},parseActiveItem:function(b){if(b&&b.isComponent){return b}else{if(typeof b=="number"||b===undefined){return this.getLayoutItems()[b||0]}else{return this.owner.getComponent(b)}}},configureItem:function(b){if(b===this.getActiveItem()){b.hidden=false}else{b.hidden=true}this.callParent(arguments)},onRemove:function(d){var c=this;if(d===c.activeItem){c.activeItem=null}},getAnimation:function(d,e){var f=(d||{}).cardSwitchAnimation;if(f===false){return false}return f||e.cardSwitchAnimation},getNext:function(){var f=arguments[0],e=this.getLayoutItems(),d=Ext.Array.indexOf(e,this.activeItem);return e[d+1]||(f?e[0]:false)},next:function(){var c=arguments[0],d=arguments[1];return this.setActiveItem(this.getNext(d),c)},getPrev:function(){var f=arguments[0],e=this.getLayoutItems(),d=Ext.Array.indexOf(e,this.activeItem);return e[d-1]||(f?e[e.length-1]:false)},prev:function(){var c=arguments[0],d=arguments[1];return this.setActiveItem(this.getPrev(d),c)},setActiveItem:function(g){var j=this,h=j.owner,k=j.activeItem,i=h.rendered,l;g=j.parseActiveItem(g);l=h.items.indexOf(g);if(l==-1){l=h.items.items.length;Ext.suspendLayouts();g=h.add(g);Ext.resumeLayouts()}if(g&&k!=g){if(g.fireEvent("beforeactivate",g,k)===false){return false}if(k&&k.fireEvent("beforedeactivate",k,g)===false){return false}if(i){Ext.suspendLayouts();if(!g.rendered){j.renderItem(g,j.getRenderTarget(),h.items.length)}if(k){if(j.hideInactive){k.hide();k.hiddenByLayout=true}k.fireEvent("deactivate",k,g)}if(g.hidden){g.show()}if(!g.hidden){j.activeItem=g}Ext.resumeLayouts(true)}else{j.activeItem=g}g.fireEvent("activate",g,k);return j.activeItem}return false}});Ext.define("Ext.form.Labelable",{requires:["Ext.XTemplate"],autoEl:{tag:"table",cellspacing:0,cellpadding:0},childEls:["labelCell","labelEl","bodyEl","errorEl","inputRow"],labelableRenderTpl:["<tpl if=\"labelAlign=='top'\">","<tr>",'<td id="{id}-labelCell" colspan="3" style="{labelCellStyle}" {labelCellAttrs}>',"{beforeLabelTpl}",'<label id="{id}-labelEl" {labelAttrTpl}<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"','<tpl if="labelStyle"> style="{labelStyle}"</tpl>>',"{beforeLabelTextTpl}",'<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',"{afterLabelTextTpl}","</label>","{afterLabelTpl}","</td>","</tr>","</tpl>",'<tr id="{id}-inputRow" <tpl if="inFormLayout">id="{id}"</tpl>>','<tpl if="labelOnLeft">','<td id="{id}-labelCell" style="{labelCellStyle}" {labelCellAttrs}>',"{beforeLabelTpl}",'<label id="{id}-labelEl" {labelAttrTpl}<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"','<tpl if="labelStyle"> style="{labelStyle}"</tpl>>',"{beforeLabelTextTpl}",'<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',"{afterLabelTextTpl}","</label>","{afterLabelTpl}","</td>","</tpl>",'<td class="{baseBodyCls} {fieldBodyCls}" id="{id}-bodyEl" role="presentation" colspan="{bodyColspan}">',"{beforeSubTpl}","{[values.$comp.getSubTplMarkup()]}","{afterSubTpl}","</td>","<tpl if=\"msgTarget=='side'\">",'<td id="{id}-errorEl" class="{errorMsgCls}" style="display:none" width="{errorIconWidth}"></td>',"</tpl>","</tr>","<tpl if=\"msgTarget=='under'\">","<tr>",'<tpl if="labelOnLeft">',"<td></td>","</tpl>",'<td id="{id}-errorEl" class="{errorMsgClass}" colspan="{[values.labelOnLeft ? 2 : 3]}" style="display:none"></td>',"</tr>","</tpl>",{disableFormats:true}],activeErrorsTpl:['<tpl if="errors && errors.length">','<ul><tpl for="errors"><li<tpl if="xindex == xcount"> class="last"</tpl>>{.}</li></tpl></ul>',"</tpl>"],isFieldLabelable:true,formItemCls:Ext.baseCSSPrefix+"form-item",labelCls:Ext.baseCSSPrefix+"form-item-label",errorMsgCls:Ext.baseCSSPrefix+"form-error-msg",baseBodyCls:Ext.baseCSSPrefix+"form-item-body",fieldBodyCls:"",clearCls:Ext.baseCSSPrefix+"clear",invalidCls:Ext.baseCSSPrefix+"form-invalid",fieldLabel:undefined,labelAlign:"left",labelWidth:100,labelPad:5,labelSeparator:":",hideLabel:false,hideEmptyLabel:true,preventMark:false,autoFitErrors:true,msgTarget:"qtip",noWrap:true,labelableInsertions:["beforeLabelTpl","afterLabelTpl","beforeSubTpl","afterSubTpl","beforeLabelTextTpl","afterLabelTextTpl","labelAttrTpl"],labelableRenderProps:"allowBlank,labelAlign,fieldBodyCls,baseBodyCls,clearCls,labelSeparator,msgTarget",initLabelable:function(){var d=this,c=d.padding;if(c){d.padding=undefined;d.extraMargins=Ext.Element.parseBox(c)}d.addCls(d.formItemCls);d.lastActiveError="";d.addEvents("errorchange")},getFieldLabel:function(){return this.fieldLabel||""},setFieldLabel:function(f){f=f||"";var i=this,h=i.labelSeparator,g=i.labelEl,j;i.fieldLabel=f;if(i.rendered){if(Ext.isEmpty(f)&&i.hideEmptyLabel){g.parent().setDisplayed("none")}else{if(h){j=f.substr(f.length-1);if(j!=h){f+=h}}g.update(f);g.parent().setDisplayed("")}i.updateLayout()}},getInsertionRenderData:function(i,h){var f=h.length,g,j;while(f--){g=h[f];j=this[g];if(j){if(typeof j!="string"){if(!j.isTemplate){j=Ext.XTemplate.getTpl(this,g)}j=j.apply(i)}}i[g]=j||""}return i},getLabelableRenderData:function(){var e=this,d,f;if(!Ext.form.Labelable.errorIconWidth){Ext.form.Labelable.errorIconWidth=(f=Ext.getBody().createChild({style:"position:absolute",cls:Ext.baseCSSPrefix+"form-invalid-icon"})).getWidth();f.remove()}d=Ext.copyTo({inFormLayout:e.ownerLayout&&e.ownerLayout.type==="form",inputId:e.getInputId(),labelOnLeft:e.labelAlign!="top",fieldLabel:e.getFieldLabel(),labelCellStyle:e.getLabelCellStyle(),labelCellAttrs:e.getLabelCellAttrs(),labelCls:e.getLabelCls(),labelStyle:e.getLabelStyle(),bodyColspan:e.getBodyColspan(),errorMsgCls:e.errorMsgCls+(e.autoFitErrors?"":" "+Ext.baseCSSPrefix+"external-error-icon"),errorIconWidth:Ext.form.Labelable.errorIconWidth},e,e.labelableRenderProps,true);e.getInsertionRenderData(d,e.labelableInsertions);return d},onLabelableRender:function(){var h=this,g,f,e={};if(h.extraMargins){g=h.el.getMargin();for(f in g){if(g.hasOwnProperty(f)){e["margin-"+f]=(g[f]+h.extraMargins[f])+"px"}}h.el.setStyle(e)}},hasVisibleLabel:function(){if(this.hideLabel){return false}return !(this.hideEmptyLabel&&!this.getFieldLabel())},getBodyColspan:function(){var f=this,d=!f.hasVisibleLabel(),e;e=(d||f.labelAlign==="top")?3:2;if(f.hasActiveError()){e--}return e},getLabelCls:function(){var c=this.labelCls,d=this.labelClsExtra;return d?c+" "+d:c},getLabelCellStyle:function(){var c=this,d=c.hideLabel||(!c.fieldLabel&&c.hideEmptyLabel);return d?"display:none;":""},getLabelCellAttrs:function(){var f=this,d=f.labelAlign,e="";if(d!=="top"){e='valign="top" halign="'+d+'" width="'+(f.labelWidth+f.labelPad)+'"'}return e},getLabelStyle:function(){var f=this,d=f.labelPad,e="";if(f.labelAlign==="top"){e="margin-bottom:"+d+"px;"}else{if(f.labelWidth){e="width:"+f.labelWidth+"px;"}e+="margin-right:"+d+"px;"}return e+(f.labelStyle||"")},getSubTplMarkup:function(){return""},getInputId:function(){return""},getActiveError:function(){return this.activeError||""},hasActiveError:function(){return !!this.getActiveError()},setActiveError:function(b){this.setActiveErrors(b)},getActiveErrors:function(){return this.activeErrors||[]},setActiveErrors:function(b){b=Ext.Array.from(b);this.activeError=b[0];this.activeErrors=b;this.activeError=this.getTpl("activeErrorsTpl").apply({errors:b});this.renderActiveError()},unsetActiveError:function(){delete this.activeError;delete this.activeErrors;this.renderActiveError()},renderActiveError:function(){var f=this,d=f.getActiveError(),e=!!d;if(d!==f.lastActiveError){f.fireEvent("errorchange",f,d);f.lastActiveError=d}if(f.rendered&&!f.isDestroyed&&!f.preventMark){f.el[e?"addCls":"removeCls"](f.invalidCls);f.getActionEl().dom.setAttribute("aria-invalid",e);if(f.errorEl){f.errorEl.dom.innerHTML=d}}},setFieldDefaults:function(h){var e=this,g,f;for(f in h){if(h.hasOwnProperty(f)){g=h[f];if(!e.hasOwnProperty(f)){e[f]=g}}}}});Ext.define("Ext.layout.component.Component",{extend:"Ext.layout.Layout",type:"component",isComponentLayout:true,nullBox:{},usesContentHeight:true,usesContentWidth:true,usesHeight:true,usesWidth:true,beginLayoutCycle:function(B,p){var u=this,C=u.owner,z=B.ownerCtContext,y=B.heightModel,x=B.widthModel,w=C.el.dom===document.body,A=C.lastBox||u.nullBox,r=C.el.lastBox||u.nullBox,D=!w,s,q,t,v;u.callParent(arguments);if(p){if(u.usesContentWidth){++B.consumersContentWidth}if(u.usesContentHeight){++B.consumersContentHeight}if(u.usesWidth){++B.consumersWidth}if(u.usesHeight){++B.consumersHeight}if(z&&!z.hasRawContent){s=C.ownerLayout;if(s.usesWidth){++B.consumersWidth}if(s.usesHeight){++B.consumersHeight}}}if(x.configured){t=x.names.width;if(!w){D=p?C[t]!==r.width:x.constrained}B.setWidth(C[t],D)}else{if(B.isTopLevel){if(x.calculated){q=A.width;B.setWidth(q,q!=r.width)}q=A.x;B.setProp("x",q,q!=r.x)}}if(y.configured){v=y.names.height;if(!w){D=p?C[v]!==r.height:y.constrained}B.setHeight(C[v],D)}else{if(B.isTopLevel){if(y.calculated){q=A.height;B.setHeight(q,q!=r.height)}q=A.y;B.setProp("y",q,q!=r.y)}}},finishedLayout:function(s){var n=this,i=s.children,t=n.owner,p,r,l,q,o,m;if(i){p=i.length;for(r=0;r<p;r++){l=i[r];l.el.lastBox=l.props}}s.previousSize=n.lastComponentSize;n.lastComponentSize=t.el.lastBox=o=s.props;t.lastBox=q={};m=o.x;if(m!==undefined){q.x=m}m=o.y;if(m!==undefined){q.y=m}m=o.width;if(m!==undefined){q.width=m}m=o.height;if(m!==undefined){q.height=m}n.callParent(arguments)},notifyOwner:function(i){var j=this,g=j.lastComponentSize,h=i.previousSize,f=[g.width,g.height];if(h){f.push(h.width,h.height)}j.owner.afterComponentLayout.apply(j.owner,f)},getTarget:function(){return this.owner.el},getRenderTarget:function(){return this.owner.el},cacheTargetInfo:function(e){var f=this,g=f.targetInfo,h;if(!g){h=e.getEl("getTarget",f);f.targetInfo=g={padding:h.getPaddingInfo(),border:h.getBorderInfo()}}return g},measureAutoDimensions:function(y,C){var t=this,J=t.owner,G=y.heightModel,D=y.widthModel,H=y.boxParent,x=y.isBoxParent,I=y.props,B,s={gotWidth:false,gotHeight:false,isContainer:(B=!y.hasRawContent)},u=C||3,v,F,A=0,E=0,z,w;if(D.shrinkWrap&&y.consumersContentWidth){++A;v=!(u&1);if(B){if(v){s.contentWidth=0;s.gotWidth=true;++E}else{if((s.contentWidth=y.getProp("contentWidth"))!==undefined){s.gotWidth=true;++E}}}else{w=I.contentWidth;if(typeof w=="number"){s.contentWidth=w;s.gotWidth=true;++E}else{if(v){z=true}else{if(!y.hasDomProp("containerChildrenDone")){z=false}else{if(x||!H||H.widthModel.shrinkWrap){z=true}else{z=H.hasDomProp("width")}}}if(z){if(!isNaN(s.contentWidth=v?0:t.measureContentWidth(y))){y.setContentWidth(s.contentWidth,true);s.gotWidth=true;++E}}}}}else{if(D.natural&&y.consumersWidth){++A;w=I.width;if(typeof w=="number"){s.width=w;s.gotWidth=true;++E}else{if(x||!H){z=true}else{z=H.hasDomProp("width")}if(z){if(!isNaN(s.width=t.measureOwnerWidth(y))){y.setWidth(s.width,false);s.gotWidth=true;++E}}}}}if(G.shrinkWrap&&y.consumersContentHeight){++A;F=!(u&2);if(B){if(F){s.contentHeight=0;s.gotHeight=true;++E}else{if((s.contentHeight=y.getProp("contentHeight"))!==undefined){s.gotHeight=true;++E}}}else{w=I.contentHeight;if(typeof w=="number"){s.contentHeight=w;s.gotHeight=true;++E}else{if(F){z=true}else{if(!y.hasDomProp("containerChildrenDone")){z=false}else{if(J.noWrap){z=true}else{if(!D.shrinkWrap){z=(y.bodyContext||y).hasDomProp("width")}else{if(x||!H||H.widthModel.shrinkWrap){z=true}else{z=H.hasDomProp("width")}}}}}if(z){if(!isNaN(s.contentHeight=F?0:t.measureContentHeight(y))){y.setContentHeight(s.contentHeight,true);s.gotHeight=true;++E}}}}}else{if(G.natural&&y.consumersHeight){++A;w=I.height;if(typeof w=="number"){s.height=w;s.gotHeight=true;++E}else{if(x||!H){z=true}else{z=H.hasDomProp("width")}if(z){if(!isNaN(s.height=t.measureOwnerHeight(y))){y.setHeight(s.height,false);s.gotHeight=true;++E}}}}}if(H){y.onBoxMeasured()}s.gotAll=E==A;return s},measureContentWidth:function(b){return b.el.getWidth()-b.getFrameInfo().width},measureContentHeight:function(b){return b.el.getHeight()-b.getFrameInfo().height},measureOwnerHeight:function(b){return b.el.getHeight()},measureOwnerWidth:function(b){return b.el.getWidth()}});Ext.define("Ext.layout.component.Dock",{extend:"Ext.layout.component.Component",alias:"layout.dock",alternateClassName:"Ext.layout.component.AbstractDock",type:"dock",initializedBorders:-1,horizontalCollapsePolicy:{width:true,x:true},verticalCollapsePolicy:{height:true,y:true},finishRender:function(){var d=this,f,e;d.callParent();f=d.getRenderTarget();e=d.getDockedItems();d.finishRenderItems(f,e)},isItemBoxParent:function(b){return true},isItemShrinkWrap:function(b){return true},dockOpposites:{top:"bottom",right:"left",bottom:"top",left:"right"},handleItemBorders:function(){var q=this,z=q.owner,r,i,w=q.borders,u=q.dockOpposites,y=z.dockedItems.generation,v,s,o,p,t,x=q.collapsed;if(q.initializedBorders==y||(z.border&&!z.manageBodyBorders)){return}q.initializedBorders=y;q.collapsed=false;i=q.getLayoutItems();q.collapsed=x;r={top:[],right:[],bottom:[],left:[]};for(v=0,s=i.length;v<s;v++){o=i[v];p=o.dock;if(o.ignoreBorderManagement){continue}if(!r[p].satisfied){r[p].push(o);r[p].satisfied=true}if(!r.top.satisfied&&u[p]!=="top"){r.top.push(o)}if(!r.right.satisfied&&u[p]!=="right"){r.right.push(o)}if(!r.bottom.satisfied&&u[p]!=="bottom"){r.bottom.push(o)}if(!r.left.satisfied&&u[p]!=="left"){r.left.push(o)}}if(w){for(t in w){if(w.hasOwnProperty(t)){s=w[t].length;if(!z.manageBodyBorders){for(v=0;v<s;v++){w[t][v].removeCls(Ext.baseCSSPrefix+"docked-noborder-"+t)}if(!w[t].satisfied&&!z.bodyBorder){z.removeBodyCls(Ext.baseCSSPrefix+"docked-noborder-"+t)}}else{if(w[t].satisfied){z.setBodyStyle("border-"+t+"-width","")}}}}}for(t in r){if(r.hasOwnProperty(t)){s=r[t].length;if(!z.manageBodyBorders){for(v=0;v<s;v++){r[t][v].addCls(Ext.baseCSSPrefix+"docked-noborder-"+t)}if((!r[t].satisfied&&!z.bodyBorder)||z.bodyBorder===false){z.addBodyCls(Ext.baseCSSPrefix+"docked-noborder-"+t)}}else{if(r[t].satisfied){z.setBodyStyle("border-"+t+"-width","1px")}}}}q.borders=r},beginLayout:function(y){var r=this,z=r.owner,i=r.getLayoutItems(),A=y.context,v=i.length,s=false,x=false,q,t,p,B,w,u;r.callParent(arguments);r.handleItemBorders();u=z.getCollapsed();if(Ext.isDefined(r.lastCollapsedState)&&(u!==r.lastCollapsedState)){if(r.owner.collapsed){y.isCollapsingOrExpanding=1;z.addClsWithUI(z.collapsedCls)}else{y.isCollapsingOrExpanding=2;z.removeClsWithUI(z.collapsedCls);y.lastCollapsedState=r.lastCollapsedState}}r.lastCollapsedState=u;y.dockedItems=q=[];for(t=0;t<v;t++){p=i[t];B=A.getCmp(p);B.dockedAt={x:0,y:0};B.offsets=w=Ext.Element.parseBox(p.offsets||{});w.width=w.left+w.right;w.height=w.top+w.bottom;q.push(B)}if(z.collapsed){if(z.collapsedVertical()){s=true;y.measureDimensions=1}else{x=true;y.measureDimensions=2}}y.collapsedVert=s;y.collapsedHorz=x;y.bodyContext=y.getEl("body")},beginLayoutCycle:function(s){var p=this,i=s.dockedItems,q=i.length,t=p.owner,o=t.frameBody,l=p.lastHeightModel,r,m,n;p.callParent(arguments);if(s.collapsedVert){s.heightModel=p.sizeModels.shrinkWrap}else{if(s.collapsedHorz){s.widthModel=p.sizeModels.shrinkWrap}}if(l&&l.shrinkWrap&&!s.heightModel.shrinkWrap&&!p.owner.manageHeight){t.body.dom.style.marginBottom=""}if(s.widthModel.auto){if(s.widthModel.shrinkWrap){t.el.setWidth(null)}t.body.setWidth(null);if(o){o.setWidth(null)}}if(s.heightModel.auto){t.body.setHeight(null);if(o){o.setHeight(null)}}if(s.collapsedVert){s.setContentHeight(0)}else{if(s.collapsedHorz){s.setContentWidth(0)}}for(r=0;r<q;r++){m=i[r].target;n=m.dock;if(n=="right"){m.el.setLeft(0)}else{if(n!="left"){continue}}}},calculate:function(s){var m=this,t=m.measureAutoDimensions(s,s.measureDimensions),u=s.state,n=u.horzDone,r=u.vertDone,q=s.bodyContext,v,o,p,l;s.borderInfo||s.getBorderInfo();s.paddingInfo||s.getPaddingInfo();s.framingInfo||s.getFraming();q.borderInfo||q.getBorderInfo();q.paddingInfo||q.getPaddingInfo();v=!n&&m.createAxis(s,t.contentWidth,s.widthModel,"left","right","x","width","Width",s.collapsedHorz);o=!r&&m.createAxis(s,t.contentHeight,s.heightModel,"top","bottom","y","height","Height",s.collapsedVert);for(p=0,l=s.dockedItems.length;l--;++p){if(v){m.dockChild(s,v,l,p)}if(o){m.dockChild(s,o,l,p)}}if(v&&m.finishAxis(s,v)){u.horzDone=n=v}if(o&&m.finishAxis(s,o)){u.vertDone=r=o}if(n&&r&&m.finishConstraints(s,n,r)){m.finishPositions(s,n,r)}else{m.done=false}},createAxis:function(D,J,N,F,K,z,G,I,O){var x=0,Q=this.owner,M=Q["max"+I],P=Q["min"+I]||0,H=M!=null,w=D.state["constrained"+I],E=w!=null,y="set"+I,B,R,A,C,L;if(N.shrinkWrap&&!E){if(O){L=0}else{R=D.bodyContext;L=J+R.borderInfo[G]}}else{B=D.borderInfo;A=D.framingInfo;C=D.paddingInfo;if(E){L=w;N=this.sizeModels.calculated;D[y](w)}else{L=D.getProp(G)}L-=B[K]+C[K]+A[K];x=B[F]+C[F]+A[F]}return{shrinkWrap:N.shrinkWrap,sizeModel:N,begin:x,end:L,collapsed:O,horizontal:z=="x",ignoreFrameBegin:false,ignoreFrameEnd:false,initialSize:L-x,hasMinMaxConstraints:(P||H)&&N.shrinkWrap,isConstrainedSize:E,minSize:P,maxSize:H?M:1000000000,bodyPosProp:this.owner.manageHeight?z:("margin-"+F),dockBegin:F,dockEnd:K,posProp:z,sizeProp:G,sizePropCap:I,setSize:y,dockedPixelsEnd:0}},dockChild:function(q,p,j,o){var n=this,r=q.dockedItems[p.shrinkWrap?j:o],l=r.target,k=l.dock,m;if(l.ignoreParentFrame&&q.isCollapsingOrExpanding){r.clearMarginCache()}if(k==p.dockBegin){if(p.shrinkWrap){m=n.dockOutwardBegin(q,r,l,p)}else{m=n.dockInwardBegin(q,r,l,p)}}else{if(k==p.dockEnd){if(p.shrinkWrap){m=n.dockOutwardEnd(q,r,l,p)}else{m=n.dockInwardEnd(q,r,l,p)}}else{m=n.dockStretch(q,r,l,p)}}r.dockedAt[p.posProp]=m},dockInwardBegin:function(m,n,o,i){var k=i.begin,l=i.sizeProp,j,p;if(o.ignoreParentFrame){p=o.dock;k-=m.borderInfo[p]+m.paddingInfo[p]+m.framingInfo[p]}if(!o.overlay){j=n.getProp(l)+n.getMarginInfo()[l];i.begin+=j}return k},dockInwardEnd:function(l,m,n,h){var j=h.sizeProp,i=m.getProp(j)+m.getMarginInfo()[j],k=h.end-i;if(!n.overlay){h.end=k}if(n.ignoreParentFrame){k+=l.borderInfo[n.dock]+l.paddingInfo[n.dock]+l.framingInfo[n.dock]}return k},dockOutwardBegin:function(m,n,o,i){var k=i.begin,l=i.sizeProp,p,j;if(i.collapsed){i.ignoreFrameBegin=i.ignoreFrameEnd=true}else{if(o.ignoreParentFrame){p=o.dock;k-=m.borderInfo[p]+m.paddingInfo[p]+m.framingInfo[p];i.ignoreFrameBegin=true}}if(!o.overlay){j=n.getProp(l)+n.getMarginInfo()[l];k-=j;i.begin=k}return k},dockOutwardEnd:function(m,n,o,i){var k=i.end,l=i.sizeProp,p,j;j=n.getProp(l)+n.getMarginInfo()[l];if(i.collapsed){i.ignoreFrameBegin=i.ignoreFrameEnd=true}else{if(o.ignoreParentFrame){p=o.dock;k+=m.borderInfo[p]+m.paddingInfo[p]+m.framingInfo[p];i.ignoreFrameEnd=true}}if(!o.overlay){i.end=k+j;i.dockedPixelsEnd+=j}return k},dockStretch:function(D,E,t,C){var s=t.dock,x=C.sizeProp,F=s=="top"||s=="bottom",B=E.offsets,y=D.borderInfo,u=D.paddingInfo,z=F?"right":"bottom",q=F?"left":"top",v=C.begin+B[q],A,r,w;if(t.stretch!==false){r=C.end-v-B[z];if(t.ignoreParentFrame){w=D.framingInfo;v-=y[q]+u[q]+w[q];r+=y[x]+u[x]+w[x]}A=E.getMarginInfo();r-=A[x];E[C.setSize](r)}return v},finishAxis:function(z,x){var o=x.end-x.begin,r=x.setSize,y=x.dockBegin,u=x.dockEnd,t=z.borderInfo,q=z.paddingInfo,s=z.framingInfo,v=q[y]+t[y]+s[y],w=z.bodyContext,p,B,A;if(x.shrinkWrap){x.delta=-x.begin;B=x.initialSize;if(x.ignoreFrameBegin){x.delta-=t[y];p=-x.begin-v}else{o+=v;x.delta+=q[y]+s[y];p=-x.begin}if(!x.ignoreFrameEnd){o+=q[u]+t[u]+s[u]}x.size=o;if(!x.horizontal&&!this.owner.manageHeight){A=false}}else{x.delta=-t[x.dockBegin];B=o;p=x.begin-v}w[r](B,A);w.setProp(x.bodyPosProp,p);return !isNaN(o)},finishConstraints:function(q,v,o){var l=v.size<v.minSize,u=v.size>v.maxSize,n=o.size<o.minSize,t=o.size>o.maxSize,r=q.state,m=true,p=this.sizeModels.configured,s;if(v.shrinkWrap&&u&&o.shrinkWrap&&n){r.constrainedWidth=v.maxSize;q.widthModel=p;m=false}else{if(v.shrinkWrap){if(u){r.constrainedWidth=v.maxSize;q.widthModel=p;m=false}else{if(l){r.constrainedWidth=v.minSize;q.widthModel=p;m=false}}}if(o.shrinkWrap){if(t){r.constrainedHeight=o.maxSize;q.heightModel=p;m=false}else{if(n){r.constrainedHeight=o.minSize;q.heightModel=p;m=false}}}}if(m){if(v.shrinkWrap){q.setWidth(v.size)}if(o.shrinkWrap){if(!q.collapsedVert&&!this.owner.manageHeight){s=false;q.bodyContext.setProp("margin-bottom",o.dockedPixelsEnd)}q.setHeight(o.size,s)}}else{q.invalidate({state:{constrainedWidth:r.constrainedWidth,constrainedHeight:r.constrainedHeight}})}return m},finishPositions:function(o,r,l){var j=o.dockedItems,p=j.length,m=r.delta,n=l.delta,k,q;for(k=0;k<p;++k){q=j[k];q.setProp("x",m+q.dockedAt.x);q.setProp("y",n+q.dockedAt.y)}},finishedLayout:function(d){var e=this,f=d.target;e.callParent(arguments);if(!d.animatePolicy){if(d.isCollapsingOrExpanding===1){f.afterCollapse(false)}else{if(d.isCollapsingOrExpanding===2){f.afterExpand(false)}}}},getAnimatePolicy:function(h){var e=this,f,g;if(h.isCollapsingOrExpanding==1){f=e.lastCollapsedState}else{if(h.isCollapsingOrExpanding==2){f=h.lastCollapsedState}}if(f=="left"||f=="right"){g=e.horizontalCollapsePolicy}else{if(f=="top"||f=="bottom"){g=e.verticalCollapsePolicy}}return g},getDockedItems:function(t,i){var p=this,o=p.owner.dockedItems.items,q=o&&o.length&&t!==false,u,m,n,r,s,v;if(i==null){n=q?o.slice():o}else{n=[];for(r=0,v=o.length;r<v;++r){m=o[r].dock;s=(m=="top"||m=="left");if(i?s:!s){n.push(o[r])}}q=q&&n.length}if(q){u=(t=t||"render")=="render";Ext.Array.sort(n,function(a,b){var d,c;if(u&&((d=p.owner.dockOrder[a.dock])!==(c=p.owner.dockOrder[b.dock]))){if(!(d+c)){return d-c}}d=p.getItemWeight(a,t);c=p.getItemWeight(b,t);if((d!==undefined)&&(c!==undefined)){return d-c}return 0})}return n||[]},getItemWeight:function(d,e){var f=d.weight||this.owner.defaultDockWeights[d.dock];return f[e]||f},getLayoutItems:function(){var j=this,g,i,k,l,h;if(j.owner.collapsed){h=j.owner.getCollapsedDockedItems()}else{g=j.getDockedItems("visual");i=g.length;h=[];for(l=0;l<i;l++){k=g[l];if(!k.hidden){h.push(k)}}}return h},measureContentWidth:function(d){var c=d.bodyContext;return c.el.getWidth()-c.getBorderInfo().width},measureContentHeight:function(d){var c=d.bodyContext;return c.el.getHeight()-c.getBorderInfo().height},redoLayout:function(f){var d=this,e=d.owner;if(f.isCollapsingOrExpanding==1){if(e.reExpander){e.reExpander.el.show()}e.addClsWithUI(e.collapsedCls);f.redo(true)}else{if(f.isCollapsingOrExpanding==2){e.removeClsWithUI(e.collapsedCls);f.bodyContext.redo()}}},renderChildren:function(){var d=this,e=d.getDockedItems(),f=d.getRenderTarget();d.renderItems(e,f)},renderItems:function(s,t){var q=this,x=s.length,z=0,y=0,j,i=0,r=q.getRenderTarget().dom.childNodes,p=r.length,u,w,v,j;for(u=0,w=0;u<p;u++){v=r[u];if(Ext.fly(v).hasCls("x-resizable-handle")){break}for(w=0;w<x;w++){j=s[w];if(j.rendered&&j.el.dom===v){break}}if(w===x){i++}}for(;z<x;z++,y++){j=s[z];if(z===y&&(j.dock==="right"||j.dock==="bottom")){y+=i}if(j&&!j.rendered){q.renderItem(j,t,y)}else{if(!q.isValidParent(j,t,y)){q.moveItem(j,t,y)}}}},undoLayout:function(f){var d=this,e=d.owner;if(f.isCollapsingOrExpanding==1){if(e.reExpander){e.reExpander.el.hide()}e.removeClsWithUI(e.collapsedCls);f.undo(true)}else{if(f.isCollapsingOrExpanding==2){e.addClsWithUI(e.collapsedCls);f.bodyContext.undo()}}},sizePolicy:{nostretch:{setsWidth:0,setsHeight:0},stretchH:{setsWidth:1,setsHeight:0},stretchV:{setsWidth:0,setsHeight:1},autoStretchH:{readsWidth:1,setsWidth:1,setsHeight:0},autoStretchV:{readsHeight:1,setsWidth:0,setsHeight:1}},getItemSizePolicy:function(h){var g=this.sizePolicy,e,f;if(h.stretch===false){return g.nostretch}e=h.dock;f=(e=="left"||e=="right");if(f){return g.stretchV}return g.stretchH},configureItem:function(d,c){this.callParent(arguments);d.addCls(Ext.baseCSSPrefix+"docked");d.addClsWithUI("docked-"+d.dock)},afterRemove:function(d){this.callParent(arguments);if(this.itemCls){d.el.removeCls(this.itemCls+"-"+d.dock)}var c=d.el.dom;if(!d.destroying&&c){c.parentNode.removeChild(c)}this.childrenChanged=true}});Ext.define("Ext.layout.component.Auto",{alias:"layout.autocomponent",extend:"Ext.layout.component.Component",type:"autocomponent",setHeightInDom:false,setWidthInDom:false,waitForOuterHeightInDom:false,waitForOuterWidthInDom:false,beginLayoutCycle:function(k,g){var l=this,i=l.lastWidthModel,j=l.lastHeightModel,h=l.owner;l.callParent(arguments);if(i&&i.fixed&&k.widthModel.shrinkWrap){h.el.setWidth(null)}if(j&&j.fixed&&k.heightModel.shrinkWrap){h.el.setHeight(null)}},calculate:function(j){var k=this,l=k.measureAutoDimensions(j),h=j.heightModel,n=j.widthModel,m,i;if(l.gotWidth){if(n.shrinkWrap){k.publishOwnerWidth(j,l.contentWidth)}else{if(k.publishInnerWidth){k.publishInnerWidth(j,l.width)}}}else{if(!n.auto&&k.publishInnerWidth){m=k.waitForOuterWidthInDom?j.getDomProp("width"):j.getProp("width");if(m===undefined){k.done=false}else{k.publishInnerWidth(j,m)}}}if(l.gotHeight){if(h.shrinkWrap){k.publishOwnerHeight(j,l.contentHeight)}else{if(k.publishInnerHeight){k.publishInnerHeight(j,l.height)}}}else{if(!h.auto&&k.publishInnerHeight){i=k.waitForOuterHeightInDom?j.getDomProp("height"):j.getProp("height");if(i===undefined){k.done=false}else{k.publishInnerHeight(j,i)}}}if(!l.gotAll){k.done=false}},calculateOwnerHeightFromContentHeight:function(c,d){return d+c.getFrameInfo().height},calculateOwnerWidthFromContentWidth:function(c,d){return d+c.getFrameInfo().width},onConstrainSize:function(g,h){var f=h.heightModel,e=h.widthModel;if(f){g.heightModel=f}if(e){g.widthModel=e}},publishOwnerHeight:function(k,m){var n=this,i=n.owner,j=n.calculateOwnerHeightFromContentHeight(k,m),p,l,o;if(isNaN(j)){n.done=false}else{l=Ext.Number.constrain(j,i.minHeight,i.maxHeight);if(l==j){o=n.setHeightInDom}else{p=n.sizeModels[(l<j)?"constrainedMax":"constrainedMin"];j=l;if(k.heightModel.calculatedFromShrinkWrap){k.heightModel=p}else{k.invalidate({before:n.onConstrainSize,heightModel:p})}}k.setHeight(j,o)}},publishOwnerWidth:function(l,i){var m=this,j=m.owner,n=m.calculateOwnerWidthFromContentWidth(l,i),p,k,o;if(isNaN(n)){m.done=false}else{k=Ext.Number.constrain(n,j.minWidth,j.maxWidth);if(k==n){o=m.setWidthInDom}else{p=m.sizeModels[(k<n)?"constrainedMax":"constrainedMin"];n=k;if(l.widthModel.calculatedFromShrinkWrap){l.widthModel=p}else{l.invalidate({before:m.onConstrainSize,widthModel:p})}}l.setWidth(n,o)}}});Ext.define("Ext.layout.component.field.Field",{extend:"Ext.layout.component.Auto",alias:"layout.field",uses:["Ext.tip.QuickTip","Ext.util.TextMetrics","Ext.util.CSS"],type:"field",beginLayout:function(h){var i=this,g=i.owner,f=h.widthModel,j;i.callParent(arguments);h.labelStrategy=i.getLabelStrategy();h.errorStrategy=i.getErrorStrategy();h.labelContext=h.getEl("labelEl");h.bodyCellContext=h.getEl("bodyEl");h.inputContext=h.getEl("inputEl");h.errorContext=h.getEl("errorEl");h.inputRow=h.getEl("inputRow");if((Ext.isIE6||Ext.isIE7)&&Ext.isStrict&&h.inputContext){i.ieInputWidthAdjustment=h.inputContext.getPaddingInfo().width+h.inputContext.getBorderInfo().width}h.labelStrategy.prepare(h,g);h.errorStrategy.prepare(h,g);if(f.shrinkWrap){i.beginLayoutShrinkWrap(h)}else{if(f.natural){if(typeof g.size=="number"){i.beginLayoutFixed(h,(j=g.size*6.5+20),"px")}else{i.beginLayoutShrinkWrap(h)}h.setWidth(j,false)}else{i.beginLayoutFixed(h,"100","%")}}},beginLayoutFixed:function(h,e,g){var f=h.target;f.el.setStyle("table-layout","fixed");f.bodyEl.setStyle("width",e+g)},beginLayoutShrinkWrap:function(c){var d=c.target;if(d.inputEl&&d.inputEl.dom){d.inputEl.dom.removeAttribute("size")}d.el.setStyle("table-layout","auto");d.bodyEl.setStyle("width","")},finishedLayout:function(c){var d=this.owner;this.callParent(arguments);c.labelStrategy.finishedLayout(c,d);c.errorStrategy.finishedLayout(c,d)},calculateOwnerHeightFromContentHeight:function(c,d){return d},measureContentHeight:function(b){return b.el.getHeight()},measureContentWidth:function(b){return b.el.getWidth()},measureLabelErrorHeight:function(b){return b.labelStrategy.getHeight(b)+b.errorStrategy.getHeight(b)},onFocus:function(){this.getErrorStrategy().onFocus(this.owner)},getLabelStrategy:function(){var d=this,f=d.labelStrategies,e=d.owner.labelAlign;return f[e]||f.base},getErrorStrategy:function(){var h=this,f=h.owner,g=h.errorStrategies,e=f.msgTarget;return !f.preventMark&&Ext.isString(e)?(g[e]||g.elementId):g.none},labelStrategies:(function(){var b={prepare:function(f,a){var h=a.labelCls+"-"+a.labelAlign,g=a.labelEl;if(g){g.addCls(h)}},getHeight:function(){return 0},finishedLayout:Ext.emptyFn};return{base:b,top:Ext.applyIf({prepare:function(e,a){b.prepare(e,a);var f=a.labelEl;e.hasHiddenLabel=f&&!a.hideEmptyLabel&&!a.getFieldLabel();if(e.hasHiddenLabel){f.dom.innerHTML=" "}},getHeight:function(f){var g=f.labelContext,h=g.getProp("height"),a=f.hasHiddenLabel;if(h===undefined||a){h=g.el.getHeight()+g.getMarginInfo().height;if(a){g.setHeight(h)}}return h},finishedLayout:function(d,a){if(d.hasHiddenLabel){a.labelEl.dom.innerHTML=""}}},b),left:b,right:b}}()),errorStrategies:(function(){function k(c){var b=Ext.layout.component.field.Field.tip,a;if(b&&b.isVisible()){a=b.activeTarget;if(a&&a.el===c.getActionEl().dom){b.toFront(true)}}}var l=Ext.applyIf,g=Ext.emptyFn,h=Ext.baseCSSPrefix+"form-invalid-icon",i,j={prepare:function(a,c){var b=c.errorEl;if(b){b.setDisplayed(false)}},getHeight:function(){return 0},onFocus:g,finishedLayout:g};return{none:j,side:l({prepare:function(c,d){var a=d.errorEl,b;if(!i){i=(b=Ext.getBody().createChild({style:"position:absolute",cls:h})).getWidth();b.remove()}a.addCls(h);a.set({"data-errorqtip":d.getActiveError()||""});a.setDisplayed(d.hasActiveError());d.bodyEl.dom.colSpan=d.getBodyColspan();Ext.layout.component.field.Field.initTip()},onFocus:k},j),under:l({prepare:function(b,d){var a=d.errorEl,c=Ext.baseCSSPrefix+"form-invalid-under";a.addCls(c);a.setDisplayed(d.hasActiveError());if(d.labelAlign=="left"){a.prev().setDisplayed(d.hasVisibleLabel()?"block":"none")}},getHeight:function(a){var d=0,c,b;if(a.target.hasActiveError()){c=a.errorContext;b=c.props;d=b.height;if(d===undefined){b.height=d=c.el.getHeight()}}return d}},j),qtip:l({prepare:function(a,b){Ext.layout.component.field.Field.initTip();b.getActionEl().set({"data-errorqtip":b.getActiveError()||""})},onFocus:k},j),title:l({prepare:function(a,b){b.el.set({title:b.getActiveError()||""})}},j),elementId:l({prepare:function(b,c){var a=Ext.fly(c.msgTarget);if(a){a.dom.innerHTML=c.getActiveError()||"";a.setDisplayed(c.hasActiveError())}}},j)}}()),statics:{initTip:function(){var b=this.tip;if(!b){b=this.tip=Ext.create("Ext.tip.QuickTip",{baseCls:Ext.baseCSSPrefix+"form-invalid-tip"});b.tagConfig=Ext.apply({},{attribute:"errorqtip"},b.tagConfig)}},destroyTip:function(){var b=this.tip;if(b){b.destroy();delete this.tip}}}});Ext.define("Ext.layout.component.field.Trigger",{alias:"layout.triggerfield",extend:"Ext.layout.component.field.Field",type:"triggerfield",beginLayout:function(g){var h=this,f=h.owner,e;g.triggerWrap=g.getEl("triggerWrap");h.callParent(arguments);e=f.getTriggerStateFlags();if(e!=f.lastTriggerStateFlags){f.lastTriggerStateFlags=e;h.updateEditState()}},beginLayoutFixed:function(l,h,k){var n=this,i=l.target,m=n.ieInputWidthAdjustment,j="100%";n.callParent(arguments);i.inputCell.setStyle("width","100%");if(m){i.inputCell.setStyle("padding-right",m+"px");if(k==="px"){j=h-m-i.getTriggerWidth()}}i.inputEl.setStyle("width",j);i.triggerWrap.setStyle("width",h+k);i.triggerWrap.setStyle("table-layout","fixed")},beginLayoutShrinkWrap:function(d){var e=d.target,f="";this.callParent(arguments);e.triggerWrap.setStyle("width",f);e.inputCell.setStyle("width",f);e.inputEl.setStyle("width",f);e.triggerWrap.setStyle("table-layout","auto")},getTextWidth:function(){var e=this,f=e.owner,g=f.inputEl,h;h=(g.dom.value||(f.hasFocus?"":f.emptyText)||"")+f.growAppend;return g.getTextWidth(h)},measureContentWidth:function(l){var m=this,i=m.owner,n=m.callParent(arguments),k=l.inputContext,o,j,p;if(i.grow&&!l.state.growHandled){o=m.getTextWidth()+l.inputContext.getFrameInfo().width;j=i.growMax;p=Math.min(j,n);j=Math.max(i.growMin,j,p);o=Ext.Number.constrain(o,i.growMin,j);k.setWidth(o);l.state.growHandled=true;k.domBlock(m,"width");n=NaN}return n},updateEditState:function(){var l=this,h=l.owner,j=h.inputEl,k=Ext.baseCSSPrefix+"trigger-noedit",g,i;if(l.owner.readOnly){j.addCls(k);i=true;g=false}else{if(l.owner.editable){j.removeCls(k);i=false}else{j.addCls(k);i=true}g=!l.owner.hideTrigger}h.triggerCell.setDisplayed(g);j.dom.readOnly=i}});Ext.define("Ext.layout.component.field.Text",{extend:"Ext.layout.component.field.Field",alias:"layout.textfield",requires:["Ext.util.TextMetrics"],type:"textfield",canGrowWidth:true,measureContentWidth:function(r){var n=this,s=n.owner,t=n.callParent(arguments),o=r.inputContext,k,l,q,m,p;if(s.grow&&n.canGrowWidth&&!r.state.growHandled){k=s.inputEl;l=Ext.util.Format.htmlEncode(k.dom.value||(s.hasFocus?"":s.emptyText)||"");l+=s.growAppend;q=k.getTextWidth(l)+o.getFrameInfo().width;m=s.growMax;p=Math.min(m,t);m=Math.max(s.growMin,m,p);q=Ext.Number.constrain(q,s.growMin,m);o.setWidth(q);r.state.growHandled=true;o.domBlock(n,"width");t=NaN}return t},publishInnerHeight:function(c,d){c.inputContext.setHeight(d-this.measureLabelErrorHeight(c))},beginLayoutFixed:function(i,g,h){var f=this,j=f.ieInputWidthAdjustment;if(j){f.owner.bodyEl.setStyle("padding-right",j+"px");if(h==="px"){g-=j}}f.callParent(arguments)}});Ext.define("Ext.grid.ColumnComponentLayout",{extend:"Ext.layout.component.Auto",alias:"layout.columncomponent",type:"columncomponent",setWidthInDom:true,getContentHeight:function(b){return this.owner.isGroupHeader?b.getProp("contentHeight"):this.callParent(arguments)},calculateOwnerHeightFromContentHeight:function(f,d){var e=this.callParent(arguments);if(this.owner.isGroupHeader){e+=this.owner.titleEl.dom.offsetHeight}return e},getContentWidth:function(b){return this.owner.isGroupHeader?b.getProp("contentWidth"):this.callParent(arguments)},calculateOwnerWidthFromContentWidth:function(c,d){return d+c.getPaddingInfo().width}});Ext.define("Ext.fx.Queue",{requires:["Ext.util.HashMap"],constructor:function(){this.targets=new Ext.util.HashMap();this.fxQueue={}},getFxDefaults:function(d){var c=this.targets.get(d);if(c){return c.fxDefaults}return{}},setFxDefaults:function(e,f){var d=this.targets.get(e);if(d){d.fxDefaults=Ext.apply(d.fxDefaults||{},f)}},stopAnimation:function(e){var g=this,f=g.getFxQueue(e),h=f.length;while(h){f[h-1].end();h--}},getActiveAnimation:function(c){var d=this.getFxQueue(c);return(d&&!!d.length)?d[0]:false},hasFxBlock:function(c){var d=this.getFxQueue(c);return d&&d[0]&&d[0].block},getFxQueue:function(e){if(!e){return false}var h=this,f=h.fxQueue[e],g=h.targets.get(e);if(!g){return false}if(!f){h.fxQueue[e]=[];if(g.type!="element"){g.target.on("destroy",function(){h.fxQueue[e]=[]})}}return h.fxQueue[e]},queueFx:function(i){var j=this,h=i.target,g,f;if(!h){return}g=j.getFxQueue(h.getId());f=g.length;if(f){if(i.concurrent){i.paused=false}else{g[f-1].on("afteranimate",function(){i.paused=false})}}else{i.paused=false}i.on("afteranimate",function(){Ext.Array.remove(g,i);if(i.remove){if(h.type=="element"){var a=Ext.get(h.id);if(a){a.remove()}}}},this);g.push(i)}});Ext.define("Ext.fx.target.Element",{extend:"Ext.fx.target.Target",type:"element",getElVal:function(d,e,f){if(f==undefined){if(e==="x"){f=d.getX()}else{if(e==="y"){f=d.getY()}else{if(e==="scrollTop"){f=d.getScroll().top}else{if(e==="scrollLeft"){f=d.getScroll().left}else{if(e==="height"){f=d.getHeight()}else{if(e==="width"){f=d.getWidth()}else{f=d.getStyle(e)}}}}}}}return f},getAttr:function(e,f){var d=this.target;return[[d,this.getElVal(d,e,f)]]},setAttr:function(n){var q=this.target,o=n.length,i,p,u,r,t,v,s,j;for(r=0;r<o;r++){i=n[r].attrs;for(p in i){if(i.hasOwnProperty(p)){v=i[p].length;for(t=0;t<v;t++){u=i[p][t];s=u[0];j=u[1];if(p==="x"){s.setX(j)}else{if(p==="y"){s.setY(j)}else{if(p==="scrollTop"){s.scrollTo("top",j)}else{if(p==="scrollLeft"){s.scrollTo("left",j)}else{if(p==="width"){s.setWidth(j)}else{if(p==="height"){s.setHeight(j)}else{s.setStyle(p,j)}}}}}}}}}}}});Ext.define("Ext.fx.target.ElementCSS",{extend:"Ext.fx.target.Element",setAttr:function(o,v){var i={attrs:[],duration:[],easing:[]},q=o.length,u,j,s,r,x,y,t,w,z;for(t=0;t<q;t++){j=o[t];x=j.duration;r=j.easing;j=j.attrs;for(s in j){if(Ext.Array.indexOf(i.attrs,s)==-1){i.attrs.push(s.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()}));i.duration.push(x+"ms");i.easing.push(r)}}}u=i.attrs.join(",");x=i.duration.join(",");r=i.easing.join(", ");for(t=0;t<q;t++){j=o[t].attrs;for(s in j){z=j[s].length;for(w=0;w<z;w++){y=j[s][w];y[0].setStyle(Ext.supports.CSS3Prefix+"TransitionProperty",v?"":u);y[0].setStyle(Ext.supports.CSS3Prefix+"TransitionDuration",v?"":x);y[0].setStyle(Ext.supports.CSS3Prefix+"TransitionTimingFunction",v?"":r);y[0].setStyle(s,y[1]);if(v){y=y[0].dom.offsetWidth}else{y[0].on(Ext.supports.CSS3TransitionEnd,function(){this.setStyle(Ext.supports.CSS3Prefix+"TransitionProperty",null);this.setStyle(Ext.supports.CSS3Prefix+"TransitionDuration",null);this.setStyle(Ext.supports.CSS3Prefix+"TransitionTimingFunction",null)},y[0],{single:true})}}}}}});Ext.define("Ext.fx.target.CompositeElement",{extend:"Ext.fx.target.Element",isComposite:true,constructor:function(b){b.id=b.id||Ext.id(null,"ext-composite-");this.callParent([b])},getAttr:function(i,j){var h=[],k=this.target.elements,l=k.length,n,m;for(n=0;n<l;n++){m=k[n];if(m){m=this.target.getElement(m);h.push([m,this.getElVal(m,i,j)])}}return h}});Ext.define("Ext.fx.target.CompositeElementCSS",{extend:"Ext.fx.target.CompositeElement",requires:["Ext.fx.target.ElementCSS"],setAttr:function(){return Ext.fx.target.ElementCSS.prototype.setAttr.apply(this,arguments)}});Ext.define("Ext.fx.target.Sprite",{extend:"Ext.fx.target.Target",type:"draw",getFromPrim:function(d,e){var f;switch(e){case"rotate":case"rotation":f=d.attr.rotation;return{x:f.x||0,y:f.y||0,degrees:f.degrees||0};case"scale":case"scaling":f=d.attr.scaling;return{x:f.x||1,y:f.y||1,cx:f.cx||0,cy:f.cy||0};case"translate":case"translation":f=d.attr.translation;return{x:f.x||0,y:f.y||0};default:return d.attr[e]}},getAttr:function(d,c){return[[this.target,c!=undefined?c:this.getFromPrim(this.target,d)]]},setAttr:function(u){var y=u.length,w=[],C,z,r,i,j,s,t,A,B,v,x,D;for(A=0;A<y;A++){C=u[A].attrs;for(z in C){r=C[z];D=r.length;for(B=0;B<D;B++){j=r[B][0];i=r[B][1];if(z==="translate"||z==="translation"){t={x:i.x,y:i.y}}else{if(z==="rotate"||z==="rotation"){v=i.x;if(isNaN(v)){v=null}x=i.y;if(isNaN(x)){x=null}t={degrees:i.degrees,x:v,y:x}}else{if(z==="scale"||z==="scaling"){v=i.x;if(isNaN(v)){v=null}x=i.y;if(isNaN(x)){x=null}t={x:v,y:x,cx:i.cx,cy:i.cy}}else{if(z==="width"||z==="height"||z==="x"||z==="y"){t=parseFloat(i)}else{t=i}}}}s=Ext.Array.indexOf(w,j);if(s==-1){w.push([j,{}]);s=w.length-1}w[s][1][z]=t}}}y=w.length;for(A=0;A<y;A++){w[A][0].setAttributes(w[A][1])}this.target.redraw()}});Ext.define("Ext.fx.target.CompositeSprite",{extend:"Ext.fx.target.Sprite",getAttr:function(i,j){var h=[],k=[].concat(this.target.items),l=k.length,m,n;for(m=0;m<l;m++){n=k[m];h.push([n,j!=undefined?j:this.getFromPrim(n,i)])}return h}});Ext.define("Ext.fx.target.Component",{extend:"Ext.fx.target.Target",type:"component",getPropMethod:{top:function(){return this.getPosition(true)[1]},left:function(){return this.getPosition(true)[0]},x:function(){return this.getPosition()[0]},y:function(){return this.getPosition()[1]},height:function(){return this.getHeight()},width:function(){return this.getWidth()},opacity:function(){return this.el.getStyle("opacity")}},compMethod:{top:"setPosition",left:"setPosition",x:"setPagePosition",y:"setPagePosition",height:"setSize",width:"setSize",opacity:"setOpacity"},getAttr:function(d,c){return[[this.target,c!==undefined?c:this.getPropMethod[d].call(this.target)]]},setAttr:function(H,A,D){var i=this,w=i.target,j=H.length,F,v,E,z,B,o,x,C,h,G,y;for(z=0;z<j;z++){F=H[z].attrs;for(v in F){x=F[v].length;o={setPosition:{},setPagePosition:{},setSize:{},setOpacity:{}};for(B=0;B<x;B++){E=F[v][B];o[i.compMethod[v]].target=E[0];o[i.compMethod[v]][v]=E[1]}if(o.setPosition.target){E=o.setPosition;C=(E.left===undefined)?undefined:parseFloat(E.left);h=(E.top===undefined)?undefined:parseFloat(E.top);E.target.setPosition(C,h)}if(o.setPagePosition.target){E=o.setPagePosition;E.target.setPagePosition(E.x,E.y)}if(o.setSize.target){E=o.setSize;G=(E.width===undefined)?E.target.getWidth():parseFloat(E.width);y=(E.height===undefined)?E.target.getHeight():parseFloat(E.height);if(D||i.dynamic){E.target.setSize(G,y)}else{E.target.el.setSize(G,y)}}if(o.setOpacity.target){E=o.setOpacity;E.target.el.setStyle("opacity",E.opacity)}}}}});Ext.define("Ext.fx.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.fx.target.Element","Ext.fx.target.ElementCSS","Ext.fx.target.CompositeElement","Ext.fx.target.CompositeElementCSS","Ext.fx.target.Sprite","Ext.fx.target.CompositeSprite","Ext.fx.target.Component"],mixins:{queue:"Ext.fx.Queue"},constructor:function(){this.items=new Ext.util.MixedCollection();this.mixins.queue.constructor.call(this)},interval:16,forceJS:true,createTarget:function(g){var e=this,h=!e.forceJS&&Ext.supports.Transitions,f;e.useCSS3=h;if(g){if(g.tagName||Ext.isString(g)||g.isFly){g=Ext.get(g);f=new Ext.fx.target["Element"+(h?"CSS":"")](g)}else{if(g.dom){f=new Ext.fx.target["Element"+(h?"CSS":"")](g)}else{if(g.isComposite){f=new Ext.fx.target["CompositeElement"+(h?"CSS":"")](g)}else{if(g.isSprite){f=new Ext.fx.target.Sprite(g)}else{if(g.isCompositeSprite){f=new Ext.fx.target.CompositeSprite(g)}else{if(g.isComponent){f=new Ext.fx.target.Component(g)}else{if(g.isAnimTarget){return g}else{return null}}}}}}}e.targets.add(f);return f}else{return null}},addAnim:function(f){var d=this.items,e=this.task;d.add(f.id,f);if(!e&&d.length){e=this.task={run:this.runner,interval:this.interval,scope:this};Ext.TaskManager.start(e)}},removeAnim:function(g){var h=this,e=h.items,f=h.task;e.removeAtKey(g.id);if(f&&!e.length){Ext.TaskManager.stop(f);delete h.task}},runner:function(){var i=this,f=i.items.getRange(),j=0,g=f.length,h;i.targetArr={};i.timestamp=new Date();for(;j<g;j++){h=f[j];if(h.isReady()){i.startAnim(h)}}for(j=0;j<g;j++){h=f[j];if(h.isRunning()){i.runAnim(h)}else{if(!i.useCSS3){}}}i.applyPendingAttrs()},startAnim:function(b){b.start(this.timestamp)},runAnim:function(n){if(!n){return}var o=this,i=n.target.getId(),l=o.useCSS3&&n.target.type=="element",j=o.timestamp-n.startTime,p=(j>=n.duration),m,k;m=this.collectTargetData(n,j,l,p);if(l){n.target.setAttr(m.anims[n.id].attributes,true);o.collectTargetData(n,n.duration,l,p);n.paused=true;m=n.target.target;if(n.target.isComposite){m=n.target.target.last()}k={};k[Ext.supports.CSS3TransitionEnd]=n.lastFrame;k.scope=n;k.single=true;m.on(k)}},collectTargetData:function(l,h,j,i){var g=l.target.getId(),k=this.targetArr[g];if(!k){k=this.targetArr[g]={id:g,el:l.target,anims:{}}}k.anims[l.id]={id:l.id,anim:l,elapsed:h,isLastFrame:i,attributes:[{duration:l.duration,easing:(j&&l.reverse)?l.easingFn.reverse().toCSS3():l.easing,attrs:l.runAnim(h)}]};return k},applyPendingAttrs:function(){var j=this.targetArr,i,l,g,k,h;for(l in j){if(j.hasOwnProperty(l)){i=j[l];for(h in i.anims){if(i.anims.hasOwnProperty(h)){g=i.anims[h];k=g.anim;if(g.attributes&&k.isRunning()){i.el.setAttr(g.attributes,false,g.isLastFrame);if(g.isLastFrame){k.lastFrame()}}}}}}}});Ext.define("Ext.fx.Animator",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.fx.Manager"],isAnimator:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",running:false,paused:false,damper:1,iterations:1,currentIteration:0,keyframeStep:0,animKeyFramesRE:/^(from|to|\d+%?)$/,constructor:function(d){var c=this;d=Ext.apply(c,d||{});c.config=d;c.id=Ext.id(null,"ext-animator-");c.addEvents("beforeanimate","keyframe","afteranimate");c.mixins.observable.constructor.call(c,d);c.timeline=[];c.createTimeline(c.keyframes);if(c.target){c.applyAnimator(c.target);Ext.fx.Manager.addAnim(c)}},sorter:function(a,b){return a.pct-b.pct},createTimeline:function(u){var r=this,o=[],q=r.to||{},x=r.duration,i,z,v,s,p,y,w,t;for(p in u){if(u.hasOwnProperty(p)&&r.animKeyFramesRE.test(p)){t={attrs:Ext.apply(u[p],q)};if(p=="from"){p=0}else{if(p=="to"){p=100}}t.pct=parseInt(p,10);o.push(t)}}Ext.Array.sort(o,r.sorter);s=o.length;for(v=0;v<s;v++){i=(o[v-1])?x*(o[v-1].pct/100):0;z=x*(o[v].pct/100);r.timeline.push({duration:z-i,attrs:o[v].attrs})}},applyAnimator:function(v){var r=this,q=[],i=r.timeline,u=r.reverse,s=i.length,y,t,z,w,o,p,x;if(r.fireEvent("beforeanimate",r)!==false){for(x=0;x<s;x++){y=i[x];o=y.attrs;t=o.easing||r.easing;z=o.damper||r.damper;delete o.easing;delete o.damper;y=new Ext.fx.Anim({target:v,easing:t,damper:z,duration:y.duration,paused:true,to:o});q.push(y)}r.animations=q;r.target=y.target;for(x=0;x<s-1;x++){y=q[x];y.nextAnim=q[x+1];y.on("afteranimate",function(){this.nextAnim.paused=false});y.on("afteranimate",function(){this.fireEvent("keyframe",this,++this.keyframeStep)},r)}q[s-1].on("afteranimate",function(){this.lastFrame()},r)}},start:function(i){var h=this,j=h.delay,f=h.delayStart,g;if(j){if(!f){h.delayStart=i;return}else{g=i-f;if(g<j){return}else{i=new Date(f.getTime()+j)}}}if(h.fireEvent("beforeanimate",h)!==false){h.startTime=i;h.running=true;h.animations[h.keyframeStep].paused=false}},lastFrame:function(){var f=this,e=f.iterations,d=f.currentIteration;d++;if(d<e){f.startTime=new Date();f.currentIteration=d;f.keyframeStep=0;f.applyAnimator(f.target);f.animations[f.keyframeStep].paused=false}else{f.currentIteration=0;f.end()}},end:function(){var b=this;b.fireEvent("afteranimate",b,b.startTime,new Date()-b.startTime)},isReady:function(){return this.paused===false&&this.running===false&&this.iterations>0},isRunning:function(){return false}});Ext.define("Ext.draw.Draw",{singleton:true,requires:["Ext.draw.Color"],pathToStringRE:/,?([achlmqrstvxz]),?/gi,pathCommandRE:/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,pathValuesRE:/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,stopsRE:/^(\d+%?)$/,radian:Math.PI/180,availableAnimAttrs:{along:"along",blur:null,"clip-rect":"csv",cx:null,cy:null,fill:"color","fill-opacity":null,"font-size":null,height:null,opacity:null,path:"path",r:null,rotation:"csv",rx:null,ry:null,scale:"csv",stroke:"color","stroke-opacity":null,"stroke-width":null,translation:"csv",width:null,x:null,y:null},is:function(c,d){d=String(d).toLowerCase();return(d=="object"&&c===Object(c))||(d=="undefined"&&typeof c==d)||(d=="null"&&c===null)||(d=="array"&&Array.isArray&&Array.isArray(c))||(Object.prototype.toString.call(c).toLowerCase().slice(8,-1))==d},ellipsePath:function(c){var d=c.attr;return Ext.String.format("M{0},{1}A{2},{3},0,1,1,{0},{4}A{2},{3},0,1,1,{0},{1}z",d.x,d.y-d.ry,d.rx,d.ry,d.y+d.ry)},rectPath:function(c){var d=c.attr;if(d.radius){return Ext.String.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",d.x+d.radius,d.y,d.width-d.radius*2,d.radius,-d.radius,d.height-d.radius*2,d.radius*2-d.width,d.radius*2-d.height)}else{return Ext.String.format("M{0},{1}L{2},{1},{2},{3},{0},{3}z",d.x,d.y,d.width+d.x,d.height+d.y)}},path2string:function(){return this.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},pathToString:function(b){return b.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},parsePathString:function(f){if(!f){return null}var g={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},h=[],e=this;if(e.is(f,"array")&&e.is(f[0],"array")){h=e.pathClone(f)}if(!h.length){String(f).replace(e.pathCommandRE,function(d,j,a){var b=[],c=j.toLowerCase();a.replace(e.pathValuesRE,function(i,l){l&&b.push(+l)});if(c=="m"&&b.length>2){h.push([j].concat(Ext.Array.splice(b,0,2)));c="l";j=(j=="m")?"l":"L"}while(b.length>=g[c]){h.push([j].concat(Ext.Array.splice(b,0,g[c])));if(!g[c]){break}}})}h.toString=e.path2string;return h},mapPath:function(i,m){if(!m){return i}var l,n,p,j,r,o,q;i=this.path2curve(i);for(p=0,j=i.length;p<j;p++){q=i[p];for(r=1,o=q.length;r<o-1;r+=2){l=m.x(q[r],q[r+1]);n=m.y(q[r],q[r+1]);q[r]=l;q[r+1]=n}}return i},pathClone:function(i){var l=[],h,j,g,k;if(!this.is(i,"array")||!this.is(i&&i[0],"array")){i=this.parsePathString(i)}for(g=0,k=i.length;g<k;g++){l[g]=[];for(h=0,j=i[g].length;h<j;h++){l[g][h]=i[g][h]}}l.toString=this.path2string;return l},pathToAbsolute:function(v){if(!this.is(v,"array")||!this.is(v&&v[0],"array")){v=this.parsePathString(v)}var q=[],o=0,p=0,i=0,j=0,s=0,r=v.length,w,u,t,x;if(r&&v[0][0]=="M"){o=+v[0][1];p=+v[0][2];i=o;j=p;s++;q[0]=["M",o,p]}for(;s<r;s++){w=q[s]=[];u=v[s];if(u[0]!=u[0].toUpperCase()){w[0]=u[0].toUpperCase();switch(w[0]){case"A":w[1]=u[1];w[2]=u[2];w[3]=u[3];w[4]=u[4];w[5]=u[5];w[6]=+(u[6]+o);w[7]=+(u[7]+p);break;case"V":w[1]=+u[1]+p;break;case"H":w[1]=+u[1]+o;break;case"M":i=+u[1]+o;j=+u[2]+p;default:t=1;x=u.length;for(;t<x;t++){w[t]=+u[t]+((t%2)?o:p)}}}else{t=0;x=u.length;for(;t<x;t++){q[s][t]=u[t]}}switch(w[0]){case"Z":o=i;p=j;break;case"H":o=w[1];break;case"V":p=w[1];break;case"M":u=q[s];x=u.length;i=u[x-2];j=u[x-1];default:u=q[s];x=u.length;o=u[x-2];p=u[x-1]}}q.toString=this.path2string;return q},pathToRelative:function(A){if(!this.is(A,"array")||!this.is(A&&A[0],"array")){A=this.parsePathString(A)}var u=[],k=0,r=0,F=0,i=0,B=0,D,j,x,y,z,v,E,w,C;if(A[0][0]=="M"){k=A[0][1];r=A[0][2];F=k;i=r;B++;u.push(["M",k,r])}for(x=B,E=A.length;x<E;x++){D=u[x]=[];j=A[x];if(j[0]!=j[0].toLowerCase()){D[0]=j[0].toLowerCase();switch(D[0]){case"a":D[1]=j[1];D[2]=j[2];D[3]=j[3];D[4]=j[4];D[5]=j[5];D[6]=+(j[6]-k).toFixed(3);D[7]=+(j[7]-r).toFixed(3);break;case"v":D[1]=+(j[1]-r).toFixed(3);break;case"m":F=j[1];i=j[2];default:for(y=1,w=j.length;y<w;y++){D[y]=+(j[y]-((y%2)?k:r)).toFixed(3)}}}else{D=u[x]=[];if(j[0]=="m"){F=j[1]+k;i=j[2]+r}for(z=0,C=j.length;z<C;z++){u[x][z]=j[z]}}v=u[x].length;switch(u[x][0]){case"z":k=F;r=i;break;case"h":k+=+u[x][v-1];break;case"v":r+=+u[x][v-1];break;default:k+=+u[x][v-2];r+=+u[x][v-1]}}u.toString=this.path2string;return u},path2curve:function(i){var o=this,l=o.pathToAbsolute(i),p=l.length,k={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},q,r,m,n;for(q=0;q<p;q++){l[q]=o.command2curve(l[q],k);if(l[q].length>7){l[q].shift();n=l[q];while(n.length){Ext.Array.splice(l,q++,0,["C"].concat(Ext.Array.splice(n,0,6)))}Ext.Array.erase(l,q,1);p=l.length;q--}r=l[q];m=r.length;k.x=r[m-2];k.y=r[m-1];k.bx=parseFloat(r[m-4])||k.x;k.by=parseFloat(r[m-3])||k.y}return l},interpolatePaths:function(i,u){var w=this,A=w.pathToAbsolute(i),t=w.pathToAbsolute(u),s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},D={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},C=function(c,b){if(c[b].length>7){c[b].shift();var a=c[b];while(a.length){Ext.Array.splice(c,b++,0,["C"].concat(Ext.Array.splice(a,0,6)))}Ext.Array.erase(c,b,1);r=Math.max(A.length,t.length||0)}},B=function(a,b,d,e,c){if(a&&b&&a[c][0]=="M"&&b[c][0]!="M"){Ext.Array.splice(b,c,0,["M",e.x,e.y]);d.bx=0;d.by=0;d.x=a[c][1];d.y=a[c][2];r=Math.max(A.length,t.length||0)}},x,r,y,p,z,v;for(x=0,r=Math.max(A.length,t.length||0);x<r;x++){A[x]=w.command2curve(A[x],s);C(A,x);(t[x]=w.command2curve(t[x],D));C(t,x);B(A,t,s,D,x);B(t,A,D,s,x);y=A[x];p=t[x];z=y.length;v=p.length;s.x=y[z-2];s.y=y[z-1];s.bx=parseFloat(y[z-4])||s.x;s.by=parseFloat(y[z-3])||s.y;D.bx=(parseFloat(p[v-4])||D.x);D.by=(parseFloat(p[v-3])||D.y);D.x=p[v-2];D.y=p[v-1]}return[A,t]},command2curve:function(f,d){var e=this;if(!f){return["C",d.x,d.y,d.x,d.y,d.x,d.y]}if(f[0]!="T"&&f[0]!="Q"){d.qx=d.qy=null}switch(f[0]){case"M":d.X=f[1];d.Y=f[2];break;case"A":f=["C"].concat(e.arc2curve.apply(e,[d.x,d.y].concat(f.slice(1))));break;case"S":f=["C",d.x+(d.x-(d.bx||d.x)),d.y+(d.y-(d.by||d.y))].concat(f.slice(1));break;case"T":d.qx=d.x+(d.x-(d.qx||d.x));d.qy=d.y+(d.y-(d.qy||d.y));f=["C"].concat(e.quadratic2curve(d.x,d.y,d.qx,d.qy,f[1],f[2]));break;case"Q":d.qx=f[1];d.qy=f[2];f=["C"].concat(e.quadratic2curve(d.x,d.y,f[1],f[2],f[3],f[4]));break;case"L":f=["C"].concat(d.x,d.y,f[1],f[2],f[1],f[2]);break;case"H":f=["C"].concat(d.x,d.y,f[1],d.y,f[1],d.y);break;case"V":f=["C"].concat(d.x,d.y,d.x,f[1],d.x,f[1]);break;case"Z":f=["C"].concat(d.x,d.y,d.X,d.Y,d.X,d.Y);break}return f},quadratic2curve:function(i,o,l,n,j,p){var m=1/3,k=2/3;return[m*i+k*l,m*o+k*n,m*j+k*l,m*p+k*n,j,p]},rotate:function(h,j,i){var m=Math.cos(i),n=Math.sin(i),k=h*m-j*n,l=h*n+j*m;return{x:k,y:l}},arc2curve:function(aM,aw,at,av,aH,aS,aW,aN,az,aF){var aK=this,aY=Math.PI,aJ=aK.radian,ax=aY*120/180,a1=aJ*(+aH||0),an=[],aq=Math,y=aq.cos,a2=aq.sin,t=aq.sqrt,aL=aq.abs,aR=aq.asin,ar,a0,aP,al,am,aG,aZ,ai,x,aB,aD,aT,aU,aO,aV,aA,aX,aC,ak,ah,aj,aE,aI,h,k,ao,i,ap,ay,au,aQ;if(!aF){ar=aK.rotate(aM,aw,-a1);aM=ar.x;aw=ar.y;ar=aK.rotate(aN,az,-a1);aN=ar.x;az=ar.y;a0=y(aJ*aH);aP=a2(aJ*aH);al=(aM-aN)/2;am=(aw-az)/2;aG=(al*al)/(at*at)+(am*am)/(av*av);if(aG>1){aG=t(aG);at=aG*at;av=aG*av}aZ=at*at;ai=av*av;x=(aS==aW?-1:1)*t(aL((aZ*ai-aZ*am*am-ai*al*al)/(aZ*am*am+ai*al*al)));aB=x*at*am/av+(aM+aN)/2;aD=x*-av*al/at+(aw+az)/2;aT=aR(((aw-aD)/av).toFixed(7));aU=aR(((az-aD)/av).toFixed(7));aT=aM<aB?aY-aT:aT;aU=aN<aB?aY-aU:aU;if(aT<0){aT=aY*2+aT}if(aU<0){aU=aY*2+aU}if(aW&&aT>aU){aT=aT-aY*2}if(!aW&&aU>aT){aU=aU-aY*2}}else{aT=aF[0];aU=aF[1];aB=aF[2];aD=aF[3]}aO=aU-aT;if(aL(aO)>ax){ay=aU;au=aN;aQ=az;aU=aT+ax*(aW&&aU>aT?1:-1);aN=aB+at*y(aU);az=aD+av*a2(aU);an=aK.arc2curve(aN,az,at,av,aH,0,aW,au,aQ,[aU,ay,aB,aD])}aO=aU-aT;aV=y(aT);aA=a2(aT);aX=y(aU);aC=a2(aU);ak=aq.tan(aO/4);ah=4/3*at*ak;aj=4/3*av*ak;aE=[aM,aw];aI=[aM+ah*aA,aw-aj*aV];h=[aN+ah*aC,az-aj*aX];k=[aN,az];aI[0]=2*aE[0]-aI[0];aI[1]=2*aE[1]-aI[1];if(aF){return[aI,h,k].concat(an)}else{an=[aI,h,k].concat(an).join().split(",");ao=[];ap=an.length;for(i=0;i<ap;i++){ao[i]=i%2?aK.rotate(an[i-1],an[i],a1).y:aK.rotate(an[i],an[i+1],a1).x}return ao}},rotateAndTranslatePath:function(q){var v=q.rotation.degrees,u=q.rotation.x,w=q.rotation.y,i=q.translation.x,p=q.translation.y,j,s,x,o,t,r=[];if(!v&&!i&&!p){return this.pathToAbsolute(q.attr.path)}i=i||0;p=p||0;j=this.pathToAbsolute(q.attr.path);for(s=j.length;s--;){x=r[s]=j[s].slice();if(x[0]=="A"){o=this.rotatePoint(x[6],x[7],v,u,w);x[6]=o.x+i;x[7]=o.y+p}else{t=1;while(x[t+1]!=null){o=this.rotatePoint(x[t],x[t+1],v,u,w);x[t]=o.x+i;x[t+1]=o.y+p;t+=2}}}return r},rotatePoint:function(h,j,l,i,k){if(!l){return{x:h,y:j}}i=i||0;k=k||0;h=h-i;j=j-k;l=l*this.radian;var m=Math.cos(l),n=Math.sin(l);return{x:h*m-j*n+i,y:h*n+j*m+k}},pathDimensions:function(i){if(!i||!(i+"")){return{x:0,y:0,width:0,height:0}}i=this.path2curve(i);var n=0,o=0,s=[],u=[],r=0,p=i.length,t,v,m,q;for(;r<p;r++){t=i[r];if(t[0]=="M"){n=t[1];o=t[2];s.push(n);u.push(o)}else{q=this.curveDim(n,o,t[1],t[2],t[3],t[4],t[5],t[6]);s=s.concat(q.min.x,q.max.x);u=u.concat(q.min.y,q.max.y);n=t[5];o=t[6]}}v=Math.min.apply(0,s);m=Math.min.apply(0,u);return{x:v,y:m,path:i,width:Math.max.apply(0,s)-v,height:Math.max.apply(0,u)-m}},intersectInside:function(d,f,e){return(e[0]-f[0])*(d[1]-f[1])>(e[1]-f[1])*(d[0]-f[0])},intersectIntersection:function(e,n,t,u){var v=[],w=t[0]-u[0],x=t[1]-u[1],p=e[0]-n[0],r=e[1]-n[1],o=t[0]*u[1]-t[1]*u[0],q=e[0]*n[1]-e[1]*n[0],s=1/(w*r-x*p);v[0]=(o*p-q*w)*s;v[1]=(o*r-q*x)*s;return v},intersect:function(r,z){var s=this,v=0,t=z.length,w=z[t-1],i=r,x,e,u,j,B,A,y;for(;v<t;++v){x=z[v];A=i;i=[];e=A[A.length-1];y=0;B=A.length;for(;y<B;y++){u=A[y];if(s.intersectInside(u,w,x)){if(!s.intersectInside(e,w,x)){i.push(s.intersectIntersection(e,u,w,x))}i.push(u)}else{if(s.intersectInside(e,w,x)){i.push(s.intersectIntersection(e,u,w,x))}}e=u}w=x}return i},bezier:function(n,o,a,b,p){if(p===0){return n}else{if(p===1){return b}}var d=1-p,m=d*d*d,c=p/d;return m*(n+c*(3*o+c*(3*a+b*c)))},bezierDim:function(a,b,i,r){var C=[],z,x,c,y,D,A,B,w,d,s;if(a+3*i==r+3*b){z=a-b;z/=2*(a-b-b+i);if(z<1&&z>0){C.push(z)}}else{x=a-3*b+3*i-r;c=2*(a-b-b+i);y=a-b;D=c*c-4*x*y;A=x+x;if(D===0){z=c/A;if(z<1&&z>0){C.push(z)}}else{if(D>0){B=Math.sqrt(D);z=(B+c)/A;if(z<1&&z>0){C.push(z)}z=(c-B)/A;if(z<1&&z>0){C.push(z)}}}}w=Math.min(a,r);d=Math.max(a,r);for(s=0;s<C.length;s++){w=Math.min(w,this.bezier(a,b,i,r,C[s]));d=Math.max(d,this.bezier(a,b,i,r,C[s]))}return[w,d]},curveDim:function(s,t,q,r,k,l,n,p){var m=this.bezierDim(s,q,k,n),o=this.bezierDim(t,r,l,p);return{min:{x:m[0],y:o[0]},max:{x:m[1],y:o[1]}}},getAnchors:function(P,Q,K,L,z,A,E){E=E||4;var M=Math,F=M.PI,D=F/2,I=M.abs,T=M.sin,S=M.cos,O=M.atan,B,C,N,J,G,H,x,y,R;B=(K-P)/E;C=(z-K)/E;if((L>=Q&&L>=A)||(L<=Q&&L<=A)){N=J=D}else{N=O((K-P)/I(L-Q));if(Q<L){N=F-N}J=O((z-K)/I(L-A));if(A<L){J=F-J}}R=D-((N+J)%(F*2))/2;if(R>D){R-=F}N+=R;J+=R;G=K-B*T(N);H=L+B*S(N);x=K+C*T(J);y=L+C*S(J);if((L>Q&&H<Q)||(L<Q&&H>Q)){G+=I(Q-H)*(G-K)/(H-L);H=Q}if((L>A&&y<A)||(L<A&&y>A)){x-=I(A-y)*(x-K)/(y-L);y=A}return{x1:G,y1:H,x2:x,y2:y}},smooth:function(R,D){var E=this.path2curve(R),N=[E[0]],K=E[0][1],L=E[0][2],C,A,y=1,J=E.length,M=1,H=K,I=L,P=0,Q=0,i,j,x,G,B,F,O;for(;y<J;y++){i=E[y];j=i.length;x=E[y-1];G=x.length;B=E[y+1];F=B&&B.length;if(i[0]=="M"){H=i[1];I=i[2];C=y+1;while(E[C][0]!="C"){C++}P=E[C][5];Q=E[C][6];N.push(["M",H,I]);M=N.length;K=H;L=I;continue}if(i[j-2]==H&&i[j-1]==I&&(!B||B[0]=="M")){O=N[M].length;A=this.getAnchors(x[G-2],x[G-1],H,I,N[M][O-2],N[M][O-1],D);N[M][1]=A.x2;N[M][2]=A.y2}else{if(!B||B[0]=="M"){A={x1:i[j-2],y1:i[j-1]}}else{A=this.getAnchors(x[G-2],x[G-1],i[j-2],i[j-1],B[F-2],B[F-1],D)}}N.push(["C",K,L,A.x1,A.y1,i[j-2],i[j-1]]);K=A.x2;L=A.y2}return N},findDotAtSegment:function(s,t,q,r,l,m,n,o,k){var p=1-k;return{x:Math.pow(p,3)*s+Math.pow(p,2)*3*k*q+p*3*k*k*l+Math.pow(k,3)*n,y:Math.pow(p,3)*t+Math.pow(p,2)*3*k*r+p*3*k*k*m+Math.pow(k,3)*o}},snapEnds:function(m,i,D,w){if(Ext.isDate(m)){return this.snapEndsByDate(m,i,D)}var E=(i-m)/D,G=Math.floor(Math.log(E)/Math.LN10)+1,C=Math.pow(10,G),H,u=Math.round((E%C)*Math.pow(10,2-G)),F=[[0,15],[20,4],[30,2],[40,4],[50,9],[60,4],[70,2],[80,4],[100,15]],A=0,t,y,z,B,x=1000000000,v=F.length;H=m=Math.floor(m/C)*C;if(w){for(z=0;z<v;z++){t=F[z][0];y=(t-u)<0?1000000:(t-u)/F[z][1];if(y<x){B=t;x=y}}E=Math.floor(E*Math.pow(10,-G))*Math.pow(10,G)+B*Math.pow(10,G-2);while(H<i){H+=E;A++}i=+H.toFixed(10)}else{A=D}return{from:m,to:i,power:G,step:E,steps:A}},snapEndsByDate:function(p,o,w,n){var t=false,r=[[Ext.Date.MILLI,[1,2,3,5,10,20,30,50,100,200,300,500]],[Ext.Date.SECOND,[1,2,3,5,10,15,30]],[Ext.Date.MINUTE,[1,2,3,5,10,20,30]],[Ext.Date.HOUR,[1,2,3,4,6,12]],[Ext.Date.DAY,[1,2,3,7,14]],[Ext.Date.MONTH,[1,2,3,4,6]]],s=r.length,q=false,v,u,x,j;for(j=0;j<s;j++){v=r[j];if(!q){for(u=0;u<v[1].length;u++){if(o<Ext.Date.add(p,v[0],v[1][u]*w)){t=[v[0],v[1][u]];q=true;break}}}}if(!t){x=this.snapEnds(p.getFullYear(),o.getFullYear()+1,w,n);t=[Date.YEAR,Math.round(x.step)]}return this.snapEndsByDateAndStep(p,o,t,n)},snapEndsByDateAndStep:function(k,l,n,j){var o=[k.getFullYear(),k.getMonth(),k.getDate(),k.getHours(),k.getMinutes(),k.getSeconds(),k.getMilliseconds()],i=0,m,p;if(j){m=k}else{switch(n[0]){case Ext.Date.MILLI:m=new Date(o[0],o[1],o[2],o[3],o[4],o[5],Math.floor(o[6]/n[1])*n[1]);break;case Ext.Date.SECOND:m=new Date(o[0],o[1],o[2],o[3],o[4],Math.floor(o[5]/n[1])*n[1],0);break;case Ext.Date.MINUTE:m=new Date(o[0],o[1],o[2],o[3],Math.floor(o[4]/n[1])*n[1],0,0);break;case Ext.Date.HOUR:m=new Date(o[0],o[1],o[2],Math.floor(o[3]/n[1])*n[1],0,0,0);break;case Ext.Date.DAY:m=new Date(o[0],o[1],Math.floor(o[2]-1/n[1])*n[1]+1,0,0,0,0);break;case Ext.Date.MONTH:m=new Date(o[0],Math.floor(o[1]/n[1])*n[1],1,0,0,0,0);break;default:m=new Date(Math.floor(o[0]/n[1])*n[1],0,1,0,0,0,0);break}}p=m;while(p<l){p=Ext.Date.add(p,n[0],n[1]);i++}if(j){p=l}return{from:+m,to:+p,step:(p-m)/i,steps:i}},sorter:function(a,b){return a.offset-b.offset},rad:function(b){return b%360*Math.PI/180},degrees:function(b){return b*180/Math.PI%360},withinBox:function(e,f,d){d=d||{};return(e>=d.x&&e<=(d.x+d.width)&&f>=d.y&&f<=(d.y+d.height))},parseGradient:function(m){var r=this,q=m.type||"linear",t=m.angle||0,o=r.radian,l=m.stops,v=[],n,u,p,s;if(q=="linear"){u=[0,0,Math.cos(t*o),Math.sin(t*o)];p=1/(Math.max(Math.abs(u[2]),Math.abs(u[3]))||1);u[2]*=p;u[3]*=p;if(u[2]<0){u[0]=-u[2];u[2]=0}if(u[3]<0){u[1]=-u[3];u[3]=0}}for(n in l){if(l.hasOwnProperty(n)&&r.stopsRE.test(n)){s={offset:parseInt(n,10),color:Ext.draw.Color.toHex(l[n].color)||"#ffffff",opacity:l[n].opacity||1};v.push(s)}}Ext.Array.sort(v,r.sorter);if(q=="linear"){return{id:m.id,type:q,vector:u,stops:v}}else{return{id:m.id,type:q,centerX:m.centerX,centerY:m.centerY,focalX:m.focalX,focalY:m.focalY,radius:m.radius,vector:u,stops:v}}}});Ext.define("Ext.fx.PropertyHandler",{requires:["Ext.draw.Draw"],statics:{defaultHandler:{pixelDefaultsRE:/width|height|top$|bottom$|left$|right$/i,unitRE:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/,scrollRE:/^scroll/i,computeDelta:function(j,p,r,m,k){r=(typeof r=="number")?r:1;var l=this.unitRE,o=l.exec(j),q,n;if(o){j=o[1];n=o[2];if(!this.scrollRE.test(k)&&!n&&this.pixelDefaultsRE.test(k)){n="px"}}j=+j||0;o=l.exec(p);if(o){p=o[1];n=o[2]||n}p=+p||0;q=(m!=null)?m:j;return{from:j,delta:(p-q)*r,units:n}},get:function(i,w,x,j,q){var o=i.length,u=[],t,r,p,v,s;for(t=0;t<o;t++){if(j){r=j[t][1].from}if(Ext.isArray(i[t][1])&&Ext.isArray(w)){p=[];v=0;s=i[t][1].length;for(;v<s;v++){p.push(this.computeDelta(i[t][1][v],w[v],x,r,q))}u.push([i[t][0],p])}else{u.push([i[t][0],this.computeDelta(i[t][1],w,x,r,q)])}}return u},set:function(i,m){var l=i.length,p=[],o,r,j,n,q;for(o=0;o<l;o++){r=i[o][1];if(Ext.isArray(r)){j=[];q=0;n=r.length;for(;q<n;q++){j.push(r[q].from+r[q].delta*m+(r[q].units||0))}p.push([i[o][0],j])}else{p.push([i[o][0],r.from+r.delta*m+(r.units||0)])}}return p}},stringHandler:{computeDelta:function(h,f,i,j,g){return{from:h,delta:f}},get:function(i,w,x,j,q){var o=i.length,u=[],t,r,p,v,s;for(t=0;t<o;t++){u.push([i[t][0],this.computeDelta(i[t][1],w,x,r,q)])}return u},set:function(i,m){var l=i.length,p=[],o,r,j,n,q;for(o=0;o<l;o++){r=i[o][1];p.push([i[o][0],r.delta])}return p}},color:{rgbRE:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,hexRE:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,hex3RE:/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,parseColor:function(n,r){r=(typeof r=="number")?r:1;var m=false,p=[this.hexRE,this.rgbRE,this.hex3RE],o=p.length,k,q,i,l;for(l=0;l<o;l++){i=p[l];q=(l%2===0)?16:10;k=i.exec(n);if(k&&k.length===4){if(l===2){k[1]+=k[1];k[2]+=k[2];k[3]+=k[3]}m={red:parseInt(k[1],q),green:parseInt(k[2],q),blue:parseInt(k[3],q)};break}}return m||n},computeDelta:function(j,i,l,n){j=this.parseColor(j);i=this.parseColor(i,l);var k=n?n:j,h=typeof k,m=typeof i;if(h=="string"||h=="undefined"||m=="string"||m=="undefined"){return i||k}return{from:j,delta:{red:Math.round((i.red-k.red)*l),green:Math.round((i.green-k.green)*l),blue:Math.round((i.blue-k.blue)*l)}}},get:function(k,j,m,o){var l=k.length,p=[],n,i;for(n=0;n<l;n++){if(o){i=o[n][1].from}p.push([k[n][0],this.computeDelta(k[n][1],j,m,i)])}return p},set:function(i,n){var m=i.length,p=[],o,q,r,l,k;for(o=0;o<m;o++){q=i[o][1];if(q){l=q.from;k=q.delta;q=(typeof q=="object"&&"red" in q)?"rgb("+q.red+", "+q.green+", "+q.blue+")":q;q=(typeof q=="object"&&q.length)?q[0]:q;if(typeof q=="undefined"){return[]}r=typeof q=="string"?q:"rgb("+[(l.red+Math.round(k.red*n))%256,(l.green+Math.round(k.green*n))%256,(l.blue+Math.round(k.blue*n))%256].join(",")+")";p.push([i[o][0],r])}}return p}},object:{interpolate:function(g,e){e=(typeof e=="number")?e:1;var f={},h;for(h in g){f[h]=parseFloat(g[h])*e}return f},computeDelta:function(j,i,n,h){j=this.interpolate(j);i=this.interpolate(i,n);var k=h?h:j,l={},m;for(m in i){l[m]=i[m]-k[m]}return{from:j,delta:l}},get:function(k,j,m,o){var l=k.length,p=[],n,i;for(n=0;n<l;n++){if(o){i=o[n][1].from}p.push([k[n][0],this.computeDelta(k[n][1],j,m,i)])}return p},set:function(i,o){var n=i.length,r=[],p={},q,m,l,s,t;for(q=0;q<n;q++){s=i[q][1];m=s.from;l=s.delta;for(t in m){p[t]=m[t]+l[t]*o}r.push([i[q][0],p])}return r}},path:{computeDelta:function(h,g,j,f){j=(typeof j=="number")?j:1;var i;h=+h||0;g=+g||0;i=(f!=null)?f:h;return{from:h,delta:(g-i)*j}},forcePath:function(b){if(!Ext.isArray(b)&&!Ext.isArray(b[0])){b=Ext.draw.Draw.parsePathString(b)}return b},get:function(D,x,E,k){var C=this.forcePath(x),v=[],i=D.length,B,y,u,z,t,w,A,F,j;for(u=0;u<i;u++){j=this.forcePath(D[u][1]);z=Ext.draw.Draw.interpolatePaths(j,C);j=z[0];C=z[1];B=j.length;F=[];for(w=0;w<B;w++){z=[j[w][0]];y=j[w].length;for(A=1;A<y;A++){t=k&&k[0][1][w][A].from;z.push(this.computeDelta(j[w][A],C[w][A],E,t))}F.push(z)}v.push([D[u][0],F])}return v},set:function(i,k){var j=i.length,t=[],r,s,u,q,p,v,x,w;for(r=0;r<j;r++){v=i[r][1];q=[];x=v.length;for(s=0;s<x;s++){p=[v[s][0]];w=v[s].length;for(u=1;u<w;u++){p.push(v[s][u].from+v[s][u].delta*k)}q.push(p.join(","))}t.push([i[r][0],q.join(",")])}return t}}}},function(){var e=["outlineColor","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","fill","stroke"],h=e.length,f=0,g;for(;f<h;f++){g=e[f];this[g]=this.color}e=["cursor"];h=e.length;f=0;for(;f<h;f++){g=e[f];this[g]=this.stringHandler}});Ext.define("Ext.fx.Anim",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.fx.Manager","Ext.fx.Animator","Ext.fx.Easing","Ext.fx.CubicBezier","Ext.fx.PropertyHandler"],isAnimation:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",damper:1,bezierRE:/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,reverse:false,running:false,paused:false,iterations:1,alternate:false,currentIteration:0,startTime:0,frameCount:0,constructor:function(e){var d=this,f;e=e||{};if(e.keyframes){return new Ext.fx.Animator(e)}Ext.apply(d,e);if(d.from===undefined){d.from={}}d.propHandlers={};d.config=e;d.target=Ext.fx.Manager.createTarget(d.target);d.easingFn=Ext.fx.Easing[d.easing];d.target.dynamic=d.dynamic;if(!d.easingFn){d.easingFn=String(d.easing).match(d.bezierRE);if(d.easingFn&&d.easingFn.length==5){f=d.easingFn;d.easingFn=Ext.fx.CubicBezier.cubicBezier(+f[1],+f[2],+f[3],+f[4])}}d.id=Ext.id(null,"ext-anim-");d.addEvents("beforeanimate","afteranimate","lastframe");d.mixins.observable.constructor.call(d);Ext.fx.Manager.addAnim(d)},setAttr:function(d,c){return Ext.fx.Manager.items.get(this.id).setAttr(this.target,d,c)},initAttrs:function(){var n=this,l=n.from,k=n.to,m=n.initialFrom||{},p={},r,q,j,o;for(o in k){if(k.hasOwnProperty(o)){r=n.target.getAttr(o,l[o]);q=k[o];if(!Ext.fx.PropertyHandler[o]){if(Ext.isObject(q)){j=n.propHandlers[o]=Ext.fx.PropertyHandler.object}else{j=n.propHandlers[o]=Ext.fx.PropertyHandler.defaultHandler}}else{j=n.propHandlers[o]=Ext.fx.PropertyHandler[o]}p[o]=j.get(r,q,n.damper,m[o],o)}}n.currentAttrs=p},start:function(i){var h=this,j=h.delay,f=h.delayStart,g;if(j){if(!f){h.delayStart=i;return}else{g=i-f;if(g<j){return}else{i=new Date(f.getTime()+j)}}}if(h.fireEvent("beforeanimate",h)!==false){h.startTime=i;if(!h.paused&&!h.currentAttrs){h.initAttrs()}h.running=true;h.frameCount=0}},runAnim:function(l){var o=this,m=o.currentAttrs,s=o.duration,t=o.easingFn,u=o.propHandlers,q={},p,n,r,v;if(l>=s){l=s;v=true}if(o.reverse){l=s-l}for(r in m){if(m.hasOwnProperty(r)){n=m[r];p=v?1:t(l/s);q[r]=u[r].set(n,p)}}o.frameCount++;return q},lastFrame:function(){var f=this,e=f.iterations,d=f.currentIteration;d++;if(d<e){if(f.alternate){f.reverse=!f.reverse}f.startTime=new Date();f.currentIteration=d;f.paused=false}else{f.currentIteration=0;f.end();f.fireEvent("lastframe",f,f.startTime)}},endWasCalled:0,end:function(){if(this.endWasCalled++){return}var b=this;b.startTime=0;b.paused=false;b.running=false;Ext.fx.Manager.removeAnim(b);b.fireEvent("afteranimate",b,b.startTime);Ext.callback(b.callback,b.scope,[b,b.startTime])},isReady:function(){return this.paused===false&&this.running===false&&this.iterations>0},isRunning:function(){return this.paused===false&&this.running===true&&this.isAnimator!==true}});Ext.enableFx=true;Ext.define("Ext.data.Types",{singleton:true,requires:["Ext.data.SortTypes"]},function(){var b=Ext.data.SortTypes;Ext.apply(Ext.data.Types,{stripRe:/[\$,%]/g,AUTO:{sortType:b.none,type:"auto"},STRING:{convert:function(d){var a=this.useNull?null:"";return(d===undefined||d===null)?a:String(d)},sortType:b.asUCString,type:"string"},INT:{convert:function(a){return a!==undefined&&a!==null&&a!==""?parseInt(String(a).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:b.none,type:"int"},FLOAT:{convert:function(a){return a!==undefined&&a!==null&&a!==""?parseFloat(String(a).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:b.none,type:"float"},BOOL:{convert:function(a){if(this.useNull&&(a===undefined||a===null||a==="")){return null}return a===true||a==="true"||a==1},sortType:b.none,type:"bool"},DATE:{convert:function(f){var e=this.dateFormat,a;if(!f){return null}if(Ext.isDate(f)){return f}if(e){if(e=="timestamp"){return new Date(f*1000)}if(e=="time"){return new Date(parseInt(f,10))}return Ext.Date.parse(f,e)}a=Date.parse(f);return a?new Date(a):null},sortType:b.asDate,type:"date"}});Ext.apply(Ext.data.Types,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})});Ext.define("Ext.data.Field",{requires:["Ext.data.Types","Ext.data.SortTypes"],alias:"data.field",constructor:function(e){if(Ext.isString(e)){e={name:e}}Ext.apply(this,e);var g=Ext.data.Types,f=this.sortType,h;if(this.type){if(Ext.isString(this.type)){this.type=g[this.type.toUpperCase()]||g.AUTO}}else{this.type=g.AUTO}if(Ext.isString(f)){this.sortType=Ext.data.SortTypes[f]}else{if(Ext.isEmpty(f)){this.sortType=this.type.sortType}}if(!this.convert){this.convert=this.type.convert}},dateFormat:null,useNull:false,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC",allowBlank:true,persist:true});Ext.define("Ext.data.NodeInterface",{requires:["Ext.data.Field"],statics:{decorate:function(d){var e,f;if(typeof d=="string"){d=Ext.ModelManager.getModel(d)}if(d.prototype.isNode){return}e=d.prototype.idProperty;f=d.prototype.fields.get(e).type.type;d.override(this.getPrototypeBody());this.applyFields(d,[{name:"parentId",type:f,defaultValue:null},{name:"index",type:"int",defaultValue:null,persist:false},{name:"depth",type:"int",defaultValue:0,persist:false},{name:"expanded",type:"bool",defaultValue:false,persist:false},{name:"expandable",type:"bool",defaultValue:true,persist:false},{name:"checked",type:"auto",defaultValue:null,persist:false},{name:"leaf",type:"bool",defaultValue:false},{name:"cls",type:"string",defaultValue:null,persist:false},{name:"iconCls",type:"string",defaultValue:null,persist:false},{name:"icon",type:"string",defaultValue:null,persist:false},{name:"root",type:"boolean",defaultValue:false,persist:false},{name:"isLast",type:"boolean",defaultValue:false,persist:false},{name:"isFirst",type:"boolean",defaultValue:false,persist:false},{name:"allowDrop",type:"boolean",defaultValue:true,persist:false},{name:"allowDrag",type:"boolean",defaultValue:true,persist:false},{name:"loaded",type:"boolean",defaultValue:false,persist:false},{name:"loading",type:"boolean",defaultValue:false,persist:false},{name:"href",type:"string",defaultValue:null,persist:false},{name:"hrefTarget",type:"string",defaultValue:null,persist:false},{name:"qtip",type:"string",defaultValue:null,persist:false},{name:"qtitle",type:"string",defaultValue:null,persist:false},{name:"children",type:"auto",defaultValue:null,persist:false}])},applyFields:function(p,i){var l=p.prototype,j=l.fields,m=j.keys,n=i.length,k,o;for(o=0;o<n;o++){k=i[o];if(!Ext.Array.contains(m,k.name)){j.add(new Ext.data.Field(k))}}},getPrototypeBody:function(){return{isNode:true,constructor:function(){var b=this;this.callParent(arguments);Ext.applyIf(b,{firstChild:null,lastChild:null,parentNode:null,previousSibling:null,nextSibling:null,childNodes:[]});b.enableBubble(["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort"]);return b},createNode:function(b){if(Ext.isObject(b)&&!b.isModel){b=Ext.ModelManager.create(b,this.modelName)}return b},isLeaf:function(){return this.get("leaf")===true},setFirstChild:function(b){this.firstChild=b},setLastChild:function(b){this.lastChild=b},updateInfo:function(s){var n=this,w=n.isRoot(),p=n.parentNode,u=(!p||w?true:p.firstChild===n),q=(!p||w?true:p.lastChild===n),r=0,i=n,x=n.childNodes,o=x.length,t=0,v=n.phantom;while(i.parentNode){++r;i=i.parentNode}n.beginEdit();n.set({isFirst:u,isLast:q,depth:r,index:p?p.indexOf(n):0,parentId:p?p.getId():null});n.endEdit(true);if(s){n.commit();n.phantom=v}for(t=0;t<o;t++){x[t].updateInfo(s)}},isLast:function(){return this.get("isLast")},isFirst:function(){return this.get("isFirst")},hasChildNodes:function(){return !this.isLeaf()&&this.childNodes.length>0},isExpandable:function(){var b=this;if(b.get("expandable")){return !(b.isLeaf()||(b.isLoaded()&&!b.hasChildNodes()))}return false},appendChild:function(q,i,p){var l=this,o,m,n,k,r;if(Ext.isArray(q)){l.callStore("suspendAutoSync");for(o=0,m=q.length-1;o<m;o++){l.appendChild(q[o])}l.callStore("resumeAutoSync");l.appendChild(q[m])}else{q=l.createNode(q);if(i!==true&&(!l.hasListeners.beforeappend||l.fireEvent("beforeappend",l,q)===false)){return false}n=l.childNodes.length;k=q.parentNode;if(k){if(i!==true&&(!l.hasListeners.beforeremove||q.fireEvent("beforemove",q,k,l,n)===false)){return false}k.removeChild(q,false,false,true)}n=l.childNodes.length;if(n===0){l.setFirstChild(q)}l.childNodes.push(q);q.parentNode=l;q.nextSibling=null;l.setLastChild(q);r=l.childNodes[n-1];if(r){q.previousSibling=r;r.nextSibling=q;r.updateInfo(p)}else{q.previousSibling=null}q.updateInfo(p);if(!l.isLoaded()){l.set("loaded",true)}else{if(l.childNodes.length===1){l.afterEdit([])}}if(!q.isLeaf()&&q.phantom){q.set("loaded",true)}if(i!==true){l.fireEvent("append",l,q,n);if(k){q.fireEvent("move",q,k,l,n)}}return q}},getBubbleTarget:function(){return this.parentNode},removeChild:function(k,n,m,i){var l=this,p=l.indexOf(k),o,j;if(p==-1||(m!==true&&(!l.hasListeners.beforeremove||l.fireEvent("beforeremove",l,k,!!i)===false))){return false}Ext.Array.erase(l.childNodes,p,1);if(l.firstChild==k){l.setFirstChild(k.nextSibling)}if(l.lastChild==k){l.setLastChild(k.previousSibling)}if(k.previousSibling){k.previousSibling.nextSibling=k.nextSibling}if(k.nextSibling){k.nextSibling.previousSibling=k.previousSibling}for(o=p>0?p-1:0,j=l.childNodes.length;o<j;o++){l.childNodes[o].updateInfo()}if(!l.childNodes.length){l.set("loaded",l.isLoaded())}if(m!==true){if(l.hasListeners.remove){l.fireEvent("remove",l,k,!!i)}}if(n){k.destroy(true)}else{k.clear()}return k},copy:function(k,l){var i=this,g=i.callOverridden(arguments),h=i.childNodes?i.childNodes.length:0,j;if(l){for(j=0;j<h;j++){g.appendChild(i.childNodes[j].copy(true))}}return g},clear:function(d){var c=this;c.parentNode=c.previousSibling=c.nextSibling=null;if(d){c.firstChild=c.lastChild=null}},destroy:function(g){var k=this,l=k.destroyOptions,h=k.childNodes,j=h.length,i;if(g===true){k.clear(true);for(i=0;i<j;i++){h[i].destroy(true)}k.childNodes=null;delete k.destroyOptions;k.callOverridden([l])}else{k.destroyOptions=g;k.remove(true)}},insertBefore:function(s,o,i){var n=this,p=n.indexOf(o),m=s.parentNode,l=p,r,t,q;if(!o){return n.appendChild(s)}if(s==o){return false}s=n.createNode(s);if(i!==true&&(!n.hasListeners.beforeinsert||n.fireEvent("beforeinsert",n,s,o)===false)){return false}if(m==n&&n.indexOf(s)<p){l--}if(m){if(i!==true&&(!n.hasListeners.beforeremove||s.fireEvent("beforemove",s,m,n,p,o)===false)){return false}m.removeChild(s,false,false,true)}if(l===0){n.setFirstChild(s)}Ext.Array.splice(n.childNodes,l,0,s);s.parentNode=n;s.nextSibling=o;o.previousSibling=s;t=n.childNodes[l-1];if(t){s.previousSibling=t;t.nextSibling=s}else{s.previousSibling=null}for(q=l>0?l-1:0,r=n.childNodes.length;q<r;q++){n.childNodes[q].updateInfo()}if(!n.isLoaded()){n.set("loaded",true)}else{if(n.childNodes.length===1){n.set("loaded",n.isLoaded())}}if(!s.isLeaf()&&s.phantom){s.set("loaded",true)}if(i!==true){if(n.hasListeners.insert){n.fireEvent("insert",n,s,o)}if(m&&n.hasListeners.move){s.fireEvent("move",s,m,n,l,o)}}return s},insertChild:function(e,f){var d=this.childNodes[e];if(d){return this.insertBefore(f,d)}else{return this.appendChild(f)}},remove:function(d,f){var e=this.parentNode;if(e){e.removeChild(this,d,f)}return this},removeAll:function(f,e){var g=this.childNodes,h;while((h=g[0])){this.removeChild(h,f,e)}return this},getChildAt:function(b){return this.childNodes[b]},replaceChild:function(f,g,h){var e=g?g.nextSibling:null;this.removeChild(g,false,h);this.insertBefore(f,e,h);return g},indexOf:function(b){return Ext.Array.indexOf(this.childNodes,b)},indexOfId:function(g){var h=this.childNodes,f=h.length,e=0;for(;e<f;++e){if(h[e].getId()===g){return e}}return -1},getPath:function(g,h){g=g||this.idProperty;h=h||"/";var e=[this.get(g)],f=this.parentNode;while(f){e.unshift(f.get(g));f=f.parentNode}return h+e.join(h)},getDepth:function(){return this.get("depth")},bubble:function(h,e,f){var g=this;while(g){if(h.apply(e||g,f||[g])===false){break}g=g.parentNode}},cascade:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.Node: cascade has been deprecated. Please use cascadeBy instead.")}return this.cascadeBy.apply(this,arguments)},cascadeBy:function(k,l,h){if(k.apply(l||this,h||[this])!==false){var i=this.childNodes,j=i.length,g;for(g=0;g<j;g++){i[g].cascadeBy(k,l,h)}}},eachChild:function(k,l,h){var i=this.childNodes,j=i.length,g;for(g=0;g<j;g++){if(k.apply(l||this,h||[i[g]])===false){break}}},findChild:function(d,f,e){return this.findChildBy(function(){return this.get(d)==f},null,e)},findChildBy:function(l,m,i){var n=this.childNodes,j=n.length,o=0,k,p;for(;o<j;o++){k=n[o];if(l.call(m||k,k)===true){return k}else{if(i){p=k.findChildBy(l,m,i);if(p!==null){return p}}}}return null},contains:function(b){return b.isAncestor(this)},isAncestor:function(d){var c=this.parentNode;while(c){if(c==d){return true}c=c.parentNode}return false},sort:function(k,h,i){var m=this.childNodes,l=m.length,n,j;if(l>0){Ext.Array.sort(m,k);for(n=0;n<l;n++){j=m[n];j.previousSibling=m[n-1];j.nextSibling=m[n+1];if(n===0){this.setFirstChild(j)}if(n==l-1){this.setLastChild(j)}j.updateInfo();if(h&&!j.isLeaf()){j.sort(k,true,true)}}if(i!==true){this.fireEvent("sort",this,m)}}},isExpanded:function(){return this.get("expanded")},isLoaded:function(){return this.get("loaded")},isLoading:function(){return this.get("loading")},isRoot:function(){return !this.parentNode},isVisible:function(){var b=this.parentNode;while(b){if(!b.isExpanded()){return false}b=b.parentNode}return true},expand:function(f,g,e){var h=this;if(!h.isLeaf()){if(h.isLoading()){h.on("expand",function(){h.expand(f,g,e)},h,{single:true})}else{if(!h.isExpanded()){h.fireEvent("beforeexpand",h,function(){h.set("expanded",true);if(h.hasListeners.expand){h.fireEvent("expand",h,h.childNodes,false)}if(f){h.expandChildren(true,g,e)}else{Ext.callback(g,e||h,[h.childNodes])}},h)}else{if(f){h.expandChildren(true,g,e)}else{Ext.callback(g,e||h,[h.childNodes])}}}}else{Ext.callback(g,e||h)}},expandChildren:function(o,k,i){var l=this,n=0,r=l.childNodes,m=r.length,p,q=0;for(;n<m;++n){p=r[n];if(!p.isLeaf()&&!p.isExpanded()){q++;r[n].expand(o,function(){q--;if(k&&!q){Ext.callback(k,i||l,[l.childNodes])}})}}if(!q&&k){Ext.callback(k,i||l,[l.childNodes])}},collapse:function(f,g,e){var h=this;if(!h.isLeaf()){if(!h.collapsing&&h.isExpanded()){h.fireEvent("beforecollapse",h,function(){h.set("expanded",false);if(h.hasListeners.collapse){h.fireEvent("collapse",h,h.childNodes,false)}if(f){h.collapseChildren(true,g,e)}else{Ext.callback(g,e||h,[h.childNodes])}},h)}else{if(f){h.collapseChildren(true,g,e)}}}else{Ext.callback(g,e||h,[h.childNodes])}},collapseChildren:function(o,k,i){var l=this,n=0,q=l.childNodes,m=q.length,p,r=0;for(;n<m;++n){p=q[n];if(!p.isLeaf()&&p.isExpanded()){r++;q[n].collapse(o,function(){r--;if(k&&!r){Ext.callback(k,i||l,[l.childNodes])}})}}if(!r&&k){Ext.callback(k,i||l,[l.childNodes])}}}}}});Ext.define("Ext.data.TreeStore",{extend:"Ext.data.AbstractStore",alias:"store.tree",requires:["Ext.util.Sorter","Ext.data.Tree","Ext.data.NodeInterface"],clearOnLoad:true,clearRemovedOnLoad:true,nodeParam:"node",defaultRootId:"root",defaultRootProperty:"children",folderSort:false,constructor:function(h){var g=this,e,f;h=Ext.apply({},h);f=h.fields||g.fields;if(!f){h.fields=[{name:"text",type:"string"}]}g.callParent([h]);g.tree=new Ext.data.Tree();g.relayEvents(g.tree,["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort","rootchange"]);g.tree.on({scope:g,remove:g.onNodeRemove,beforeexpand:g.onBeforeNodeExpand,beforecollapse:g.onBeforeNodeCollapse,append:g.onNodeAdded,insert:g.onNodeAdded,sort:g.onNodeSort});g.onBeforeSort();e=g.root;if(e){delete g.root;g.setRootNode(e)}if(Ext.isDefined(g.nodeParameter)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.TreeStore: nodeParameter has been deprecated. Please use nodeParam instead.")}g.nodeParam=g.nodeParameter;delete g.nodeParameter}},setProxy:function(f){var e,d;if(f instanceof Ext.data.proxy.Proxy){d=Ext.isEmpty(f.getReader().root)}else{if(Ext.isString(f)){d=true}else{e=f.reader;d=!(e&&!Ext.isEmpty(e.root))}}f=this.callParent(arguments);if(d){e=f.getReader();e.root=this.defaultRootProperty;e.buildExtractors(true)}},onBeforeSort:function(){if(this.folderSort){this.sort({property:"leaf",direction:"ASC"},"prepend",false)}},onBeforeNodeExpand:function(d,f,e){if(d.isLoaded()){Ext.callback(f,e||d,[d.childNodes])}else{if(d.isLoading()){this.on("load",function(){Ext.callback(f,e||d,[d.childNodes])},this,{single:true})}else{this.read({node:d,callback:function(){Ext.callback(f,e||d,[d.childNodes])}})}}},getNewRecords:function(){return Ext.Array.filter(this.tree.flatten(),this.filterNew)},getUpdatedRecords:function(){return Ext.Array.filter(this.tree.flatten(),this.filterUpdated)},onBeforeNodeCollapse:function(d,f,e){f.call(e||d,d.childNodes)},onNodeRemove:function(f,i,g){var j=this,h=j.removed;if(!i.isReplace&&Ext.Array.indexOf(h,i)==-1){h.push(i)}if(j.autoSync&&!j.autoSyncSuspended&&!g){j.sync()}},onNodeAdded:function(n,l){var m=this,h=m.getProxy(),i=h.getReader(),k=l.raw||l[l.persistenceProperty],j;Ext.Array.remove(m.removed,l);if(!l.isLeaf()){j=i.getRoot(k);if(j){m.fillNode(l,i.extractData(j));delete k[i.root]}}if(m.autoSync&&!m.autoSyncSuspended&&(l.phantom||l.dirty)){m.sync()}},onNodeSort:function(){if(this.autoSync&&!this.autoSyncSuspended){this.sync()}},setRootNode:function(e,f){var d=this;e=e||{};if(!e.isModel){Ext.applyIf(e,{id:d.defaultRootId,text:"Root",allowDrag:false});Ext.data.NodeInterface.decorate(d.model);e=Ext.ModelManager.create(e,d.model)}else{if(e.isModel&&!e.isNode){Ext.data.NodeInterface.decorate(d.model)}}d.getProxy().getReader().buildExtractors(true);d.tree.setRootNode(e);if(f!==true&&!e.isLoaded()&&(d.autoLoad===true||e.isExpanded())){d.load({node:e})}return e},getRootNode:function(){return this.tree.getRootNode()},getNodeById:function(b){return this.tree.getNodeById(b)},load:function(e){e=e||{};e.params=e.params||{};var g=this,h=e.node||g.tree.getRootNode(),f;if(!h){h=g.setRootNode({expanded:true},true)}if(g.clearOnLoad){if(g.clearRemovedOnLoad){g.clearRemoved(h)}g.tree.un("remove",g.onNodeRemove,g);h.removeAll(false);g.tree.on("remove",g.onNodeRemove,g)}Ext.applyIf(e,{node:h});e.params[g.nodeParam]=h?h.getId():"root";if(h){h.set("loading",true)}return g.callParent([e])},clearRemoved:function(w){var p=this,t=p.removed,x=w.getId(),u=t.length,v=u,i={},r=[],n={},q,s,o;if(w===p.getRootNode()){p.removed=[];return}for(;v--;){q=t[v];n[q.getId()]=q}for(v=u;v--;){q=t[v];s=q;while(s&&s.getId()!==x){o=s.get("parentId");s=s.parentNode||p.getNodeById(o)||n[o]}if(s){i[q.getId()]=q}}for(v=0;v<u;v++){q=t[v];if(!i[q.getId()]){r.push(q)}}p.removed=r},fillNode:function(u,t){var p=this,r=t?t.length:0,q=p.sorters,s,n,o=false,v=r&&p.sortOnLoad&&!p.remoteSort&&q&&q.items&&q.items.length,i,m;for(s=1;s<r;s++){i=t[s];m=t[s-1];o=i[i.persistenceProperty].index!=m[m.persistenceProperty].index;if(o){break}}if(v){if(o){p.sorters.insert(0,p.indexSorter)}n=new Ext.util.MixedCollection();n.addAll(t);n.sort(p.sorters.items);t=n.items;p.sorters.remove(p.indexSorter)}else{if(o){Ext.Array.sort(t,p.sortByIndex)}}u.set("loaded",true);for(s=0;s<r;s++){u.appendChild(t[s],undefined,true)}return t},sortByIndex:function(c,d){return c[c.persistenceProperty].index-d[d.persistenceProperty].index},onProxyLoad:function(p){var k=this,n=p.wasSuccessful(),q=p.getRecords(),r=p.node,l,i,m,o;k.loading=false;r.set("loading",false);if(n){if(!k.clearOnLoad){q=k.cleanRecords(r,q)}q=k.fillNode(r,q)}k.fireEvent("read",k,p.node,q,n);k.fireEvent("load",k,p.node,q,n);Ext.callback(p.callback,p.scope||k,[q,p,n])},cleanRecords:function(m,i){var n={},k=m.childNodes,o=0,j=k.length,p=[],l;for(;o<j;++o){n[k[o].getId()]=true}for(o=0,j=i.length;o<j;++o){l=i[o];if(!n[l.getId()]){p.push(l)}}return p},removeAll:function(){var b=this.getRootNode();if(b){b.destroy(true)}this.fireEvent("clear",this)},doSort:function(d){var c=this;if(c.remoteSort){c.load()}else{c.tree.sort(d,true);c.fireEvent("datachanged",c);c.fireEvent("refresh",c)}c.fireEvent("sort",c)}},function(){var b=this.prototype;b.indexSorter=new Ext.util.Sorter({sorterFn:b.sortByIndex})});Ext.define("Ext.AbstractManager",{requires:["Ext.util.HashMap"],typeName:"type",constructor:function(b){Ext.apply(this,b||{});this.all=new Ext.util.HashMap();this.types={}},get:function(b){return this.all.get(b)},register:function(f){var d=this.all,e=d.getKey(f);if(d.containsKey(e)){Ext.Error.raise('Registering duplicate id "'+e+'" with this manager')}this.all.add(f)},unregister:function(b){this.all.remove(b)},registerType:function(c,d){this.types[c]=d;d[this.typeName]=c},isRegistered:function(b){return this.types[b]!==undefined},create:function(f,g){var e=f[this.typeName]||f.type||g,h=this.types[e];if(h===undefined){Ext.Error.raise("The '"+e+"' type has not been registered with this manager")}return new h(f)},onAvailable:function(h,j,f){var g=this.all,i;if(g.containsKey(h)){i=g.get(h);j.call(f||i,i)}else{g.on("add",function(a,c,b){if(c==h){j.call(f||b,b);g.un("add",j,f)}})}},each:function(c,d){this.all.each(c,d||this)},getCount:function(){return this.all.getCount()}});Ext.define("Ext.ModelManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ModelMgr",requires:["Ext.data.association.Association"],singleton:true,typeName:"mtype",associationStack:[],registerType:function(h,e){var g=e.prototype,f;if(g&&g.isModel){f=e}else{if(!e.extend){e.extend="Ext.data.Model"}f=Ext.define(h,e)}this.types[h]=f;return f},onModelDefined:function(n){var i=this.associationStack,k=i.length,l=[],h,m,j;for(m=0;m<k;m++){h=i[m];if(h.associatedModel==n.modelName){l.push(h)}}for(m=0,k=l.length;m<k;m++){j=l[m];this.types[j.ownerModel].prototype.associations.add(Ext.data.association.Association.create(j));Ext.Array.remove(i,j)}},registerDeferredAssociation:function(b){this.associationStack.push(b)},getModel:function(c){var d=c;if(typeof d=="string"){d=this.types[d]}return d},create:function(e,f,g){var h=typeof f=="function"?f:this.types[f||e.name];return new h(e,g)}},function(){Ext.regModel=function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn('Ext.regModel has been deprecated. Models can now be created by extending Ext.data.Model: Ext.define("MyModel", {extend: "Ext.data.Model", fields: []});.')}return this.ModelManager.registerType.apply(this.ModelManager,arguments)}});Ext.define("Ext.ComponentManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ComponentMgr",singleton:true,typeName:"xtype",create:function(d,c){if(typeof d=="string"){return Ext.widget(d)}if(d.isComponent){return d}return Ext.widget(d.xtype||c,d)},registerType:function(c,d){this.types[c]=d;d[this.typeName]=c;d.prototype[this.typeName]=c}});Ext.define("Ext.data.Errors",{extend:"Ext.util.MixedCollection",isValid:function(){return this.length===0},getByField:function(h){var i=[],g,j,f;for(f=0;f<this.length;f++){g=this.items[f];if(g.field==h){i.push(g)}}return i}});Ext.define("Ext.data.Model",{alternateClassName:"Ext.data.Record",mixins:{observable:"Ext.util.Observable"},requires:["Ext.ModelManager","Ext.data.IdGenerator","Ext.data.Field","Ext.data.Errors","Ext.data.Operation","Ext.data.validations","Ext.util.MixedCollection"],sortConvertFields:function(f,g){var h=f.type&&f.convert!==f.type.convert,e=g.type&&g.convert!==g.type.convert;if(h&&!e){return 1}if(!h&&e){return -1}return 0},itemNameFn:function(b){return b.name},onClassExtended:function(e,h,f){var g=f.onBeforeCreated;f.onBeforeCreated=function(Y,J){var L=this,G=Ext.getClassName(Y),P=Y.prototype,d=Y.prototype.superclass,X=J.validations||[],I=J.fields||[],b=J.associations||[],c=J.belongsTo,N=J.hasMany,H=J.hasOne,Z=function(m,k){var l=0,n,j;if(m){m=Ext.Array.from(m);for(n=m.length;l<n;++l){j=m[l];if(!Ext.isObject(j)){j={model:j}}j.type=k;b.push(j)}}},F=J.idgen,O=new Ext.util.MixedCollection(false,P.itemNameFn),a=new Ext.util.MixedCollection(false,P.itemNameFn),Q=d.validations,M=d.fields,U=d.associations,W,i,S,R=[],T=J.idProperty||Y.prototype.idProperty,V=Ext.Function.bind(O.sortBy,O,[P.sortConvertFields],false),K=J.proxy||Y.prototype.proxy||Y.prototype.defaultProxyType;Y.modelName=G;P.modelName=G;if(Q){X=Q.concat(X)}J.validations=X;if(M){I=M.items.concat(I)}O.on({add:V,replace:V});for(i=0,S=I.length;i<S;++i){O.add(new Ext.data.Field(I[i]))}if(!O.get(T)){O.add(new Ext.data.Field(T))}J.fields=O;if(F){J.idgen=Ext.data.IdGenerator.get(F)}Z(J.belongsTo,"belongsTo");delete J.belongsTo;Z(J.hasMany,"hasMany");delete J.hasMany;Z(J.hasOne,"hasOne");delete J.hasOne;if(U){b=U.items.concat(b)}for(i=0,S=b.length;i<S;++i){R.push("association."+b[i].type.toLowerCase())}if(K&&!K.isProxy){R.push("proxy."+(typeof K==="string"?K:K.type))}Ext.require(R,function(){Ext.ModelManager.registerType(G,Y);for(i=0,S=b.length;i<S;++i){W=b[i];Ext.apply(W,{ownerModel:G,associatedModel:W.model});if(Ext.ModelManager.getModel(W.model)===undefined){Ext.ModelManager.registerDeferredAssociation(W)}else{a.add(Ext.data.association.Association.create(W))}}J.associations=a;g.call(L,Y,J,f);Y.setProxy(K);Ext.ModelManager.onModelDefined(Y)})}},inheritableStatics:{setProxy:function(b){if(!b.isProxy){if(typeof b=="string"){b={type:b}}b=Ext.createByAlias("proxy."+b.type,b)}b.setModel(this);this.proxy=this.prototype.proxy=b;return b},getProxy:function(){return this.proxy},setFields:function(p,o,i){var k=this,l=k.prototype,m=l.fields,j=p?p.length:0,n=0;if(o){l.idProperty=o}if(i){l.clientIdProperty=i}if(m){m.clear()}else{m=k.prototype.fields=new Ext.util.MixedCollection(false,function(a){return a.name})}for(;n<j;n++){m.add(new Ext.data.Field(p[n]))}if(!m.get(l.idProperty)){m.add(new Ext.data.Field(l.idProperty))}k.fields=m;return m},getFields:function(){return this.fields},load:function(i,l){l=Ext.apply({},l);l=Ext.applyIf(l,{action:"read",id:i});var g=new Ext.data.Operation(l),k=l.scope||this,h=null,j;j=function(a){if(a.wasSuccessful()){h=a.getRecords()[0];Ext.callback(l.success,k,[h,a])}else{Ext.callback(l.failure,k,[h,a])}Ext.callback(l.callback,k,[h,a])};this.proxy.read(g,j,this)}},statics:{PREFIX:"ext-record",AUTO_ID:1,EDIT:"edit",REJECT:"reject",COMMIT:"commit",id:function(d){var c=[this.PREFIX,"-",this.AUTO_ID++].join("");d.phantom=true;d.internalId=c;return c}},idgen:{isGenerator:true,type:"default",generate:function(){return null},getRecId:function(b){return b.modelName+"-"+b.internalId}},editing:false,dirty:false,persistenceProperty:"data",evented:false,isModel:true,phantom:false,idProperty:"id",clientIdProperty:null,defaultProxyType:"ajax",constructor:function(s,w,i,y){s=s||{};var q=this,r,v,p,z,o,u,x,t;q.internalId=(w||w===0)?w:Ext.data.Model.id(q);q.raw=i;if(!q.data){q.data={}}q.modified={};if(q.persistanceProperty){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.Model: persistanceProperty has been deprecated. Use persistenceProperty instead.")}q.persistenceProperty=q.persistanceProperty}q[q.persistenceProperty]=y||{};q.mixins.observable.constructor.call(q);if(!y){r=q.fields.items;v=r.length;t=0;x=q[q.persistenceProperty];if(Ext.isArray(s)){for(;t<v;t++){p=r[t];z=p.name;o=s[t];if(o===undefined){o=p.defaultValue}if(p.convert){o=p.convert(o,q)}x[z]=o}}else{for(;t<v;t++){p=r[t];z=p.name;o=s[z];if(o===undefined){o=p.defaultValue}if(p.convert){o=p.convert(o,q)}x[z]=o}}}q.stores=[];if(q.getId()){q.phantom=false}else{if(q.phantom){u=q.idgen.generate();if(u!==null){q.setId(u)}}}q.dirty=false;q.modified={};if(typeof q.init=="function"){q.init()}q.id=q.idgen.getRecId(q)},get:function(b){return this[this.persistenceProperty][b]},_singleProp:{},set:function(r,G){var z=this,B=z[z.persistenceProperty],A=z.fields,s=z.modified,u=(typeof r=="string"),t,y,C,v,D,H,F,E,x,w;if(u){w=z._singleProp;w[r]=G}else{w=r}for(H in w){if(w.hasOwnProperty(H)){x=w[H];if((y=A&&A.get(H))&&y.convert){x=y.convert(x,z)}t=B[H];if(z.isEqual(t,x)){continue}B[H]=x;(D||(D=[])).push(H);if(y&&y.persist){if(s.hasOwnProperty(H)){if(z.isEqual(s[H],x)){delete s[H];z.dirty=false;for(v in s){if(s.hasOwnProperty(v)){z.dirty=true;break}}}}else{z.dirty=true;s[H]=t}}if(H==z.idProperty){C=true;F=t;E=x}}}if(u){delete w[r]}if(C){z.fireEvent("idchanged",z,F,E)}if(!z.editing&&D){z.afterEdit(D)}return D||null},isEqual:function(a,b){if(Ext.isDate(a)&&Ext.isDate(b)){return Ext.Date.isEqual(a,b)}return a===b},beginEdit:function(){var b=this;if(!b.editing){b.editing=true;b.dirtySave=b.dirty;b.dataSave=Ext.apply({},b[b.persistenceProperty]);b.modifiedSave=Ext.apply({},b.modified)}},cancelEdit:function(){var b=this;if(b.editing){b.editing=false;b.modified=b.modifiedSave;b[b.persistenceProperty]=b.dataSave;b.dirty=b.dirtySave;delete b.modifiedSave;delete b.dataSave;delete b.dirtySave}},endEdit:function(f,h){var e=this,g;if(e.editing){e.editing=false;if(!h){h=e.getModifiedFieldNames()}g=e.dirty||h.length>0;delete e.modifiedSave;delete e.dataSave;delete e.dirtySave;if(g&&f!==true){e.afterEdit(h)}}},getModifiedFieldNames:function(){var i=this,j=i.dataSave,h=i[i.persistenceProperty],g=[],f;for(f in h){if(h.hasOwnProperty(f)){if(!i.isEqual(h[f],j[f])){g.push(f)}}}return g},getChanges:function(){var e=this.modified,d={},f;for(f in e){if(e.hasOwnProperty(f)){d[f]=this.get(f)}}return d},isModified:function(b){return this.modified.hasOwnProperty(b)},setDirty:function(){var l=this,h=l.fields.items,i=h.length,j,f,k;l.dirty=true;for(k=0;k<i;k++){j=h[k];if(j.persist){f=j.name;l.modified[f]=l.get(f)}}},markDirty:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.Model: markDirty has been deprecated. Use setDirty instead.")}return this.setDirty.apply(this,arguments)},reject:function(f){var h=this,e=h.modified,g;for(g in e){if(e.hasOwnProperty(g)){if(typeof e[g]!="function"){h[h.persistenceProperty][g]=e[g]}}}h.dirty=false;h.editing=false;h.modified={};if(f!==true){h.afterReject()}},commit:function(d){var c=this;c.phantom=c.dirty=c.editing=false;c.modified={};if(d!==true){c.afterCommit()}},copy:function(d){var c=this;return new c.self(Ext.apply({},c[c.persistenceProperty]),d)},setProxy:function(b){if(!b.isProxy){if(typeof b==="string"){b={type:b}}b=Ext.createByAlias("proxy."+b.type,b)}b.setModel(this.self);this.proxy=b;return b},getProxy:function(){return this.proxy},validate:function(){var i=new Ext.data.Errors(),p=this.validations,n=Ext.data.validations,q,o,k,r,l,m;if(p){q=p.length;for(m=0;m<q;m++){o=p[m];k=o.field||o.name;l=o.type;r=n[l](o,this.get(k));if(!r){i.add({field:k,message:o.message||n[l+"Message"]})}}}return i},isValid:function(){return this.validate().isValid()},save:function(i){i=Ext.apply({},i);var q=this,u=q.phantom?"create":"update",m=i.scope||q,o=q.stores,t=0,r,p,s,v,n;Ext.apply(i,{records:[q],action:u});v=new Ext.data.Operation(i);n=function(a){s=[q,a];if(a.wasSuccessful()){for(r=o.length;t<r;t++){p=o[t];p.fireEvent("write",p,a);p.fireEvent("datachanged",p)}Ext.callback(i.success,m,s)}else{Ext.callback(i.failure,m,s)}Ext.callback(i.callback,m,s)};q.getProxy()[u](v,n,q);return q},destroy:function(i){i=Ext.apply({},i);var p=this,l=i.scope||p,n=p.stores,s=0,q,o,r,t,m;Ext.apply(i,{records:[p],action:"destroy"});t=new Ext.data.Operation(i);m=function(a){r=[p,a];if(a.wasSuccessful()){for(q=n.length;s<q;s++){o=n[s];o.fireEvent("write",o,a);o.fireEvent("datachanged",o)}p.clearListeners();Ext.callback(i.success,l,r)}else{Ext.callback(i.failure,l,r)}Ext.callback(i.callback,l,r)};p.getProxy().destroy(t,m,p);return p},getId:function(){return this.get(this.idProperty)},getObservableId:function(){return this.id},setId:function(b){this.set(this.idProperty,b);this.phantom=!(b||b===0)},join:function(b){Ext.Array.include(this.stores,b);this.store=this.stores[0]},unjoin:function(b){Ext.Array.remove(this.stores,b);this.store=this.stores[0]||null},afterEdit:function(b){this.callStore("afterEdit",b)},afterReject:function(){this.callStore("afterReject")},afterCommit:function(){this.callStore("afterCommit")},callStore:function(k){var m=Ext.Array.clone(arguments),h=this.stores,l=0,i=h.length,n,j;m[0]=this;for(;l<i;++l){n=h[l];if(n&&typeof n[k]=="function"){n[k].apply(n,m)}j=n.treeStore;if(j&&typeof j[k]=="function"){j[k].apply(j,m)}}},getData:function(n){var m=this,i=m.fields.items,j=i.length,k={},f,l;for(l=0;l<j;l++){f=i[l].name;k[f]=m.get(f)}if(n===true){Ext.apply(k,m.getAssociatedData())}return k},getAssociatedData:function(){return this.prepareAssociatedData({},1)},prepareAssociatedData:function(B,j){var o=this,E=o.associations.items,P=E.length,A={},H=[],C=[],K=[],I,S,T,J,O,L,M,D,N,R,F,G,Q,i;for(F=0;F<P;F++){R=E[F];D=R.associationId;M=B[D];if(M&&M!==j){continue}B[D]=j;Q=R.type;i=R.name;if(Q=="hasMany"){I=o[R.storeName];A[i]=[];if(I&&I.getCount()>0){S=I.data.items;N=S.length;for(G=0;G<N;G++){T=S[G];A[i][G]=T.getData();H.push(T);C.push(i);K.push(G)}}}else{if(Q=="belongsTo"||Q=="hasOne"){T=o[R.instanceName];if(T!==undefined){A[i]=T.getData();H.push(T);C.push(i);K.push(-1)}}}}for(F=0,N=H.length;F<N;++F){T=H[F];J=A[C[F]];O=K[F];L=T.prepareAssociatedData(B,j+1);if(O===-1){Ext.apply(J,L)}else{Ext.apply(J[O],L)}}return A}});Ext.define("Ext.layout.container.Auto",{alias:["layout.auto","layout.autocontainer"],extend:"Ext.layout.container.Container",type:"autocontainer",childEls:["clearEl"],renderTpl:["{%this.renderBody(out,values)%}",'<div id="{ownerId}-clearEl" class="',Ext.baseCSSPrefix,'clear" role="presentation"></div>'],calculate:function(d){var e=this,f;if(!d.hasDomProp("containerChildrenDone")){e.done=false}else{f=e.getContainerSize(d);if(!f.gotAll){e.done=false}e.calculateContentSize(d)}}});Ext.define("Ext.menu.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.util.KeyMap"],alternateClassName:"Ext.menu.MenuMgr",uses:["Ext.menu.Menu"],menus:{},groups:{},attached:false,lastShow:new Date(),init:function(){var b=this;b.active=new Ext.util.MixedCollection();Ext.getDoc().addKeyListener(27,function(){if(b.active.length>0){b.hideAll()}},b)},hideAll:function(){var j=this.active,h,f,g,i;if(j&&j.length>0){h=j.clone();f=h.items;i=f.length;for(g=0;g<i;g++){f[g].hide()}return true}return false},onHide:function(e){var d=this,f=d.active;f.remove(e);if(f.length<1){Ext.getDoc().un("mousedown",d.onMouseDown,d);d.attached=false}},onShow:function(i){var l=this,k=l.active,m=k.last(),n=l.attached,h=i.getEl(),j;l.lastShow=new Date();k.add(i);if(!n){Ext.getDoc().on("mousedown",l.onMouseDown,l,{buffer:Ext.isIE?10:undefined});l.attached=true}i.toFront()},onBeforeHide:function(b){if(b.activeChild){b.activeChild.hide()}if(b.autoHideTimer){clearTimeout(b.autoHideTimer);delete b.autoHideTimer}},onBeforeShow:function(e){var f=this.active,d=e.parentMenu;f.remove(e);if(!d&&!e.allowOtherMenus){this.hideAll()}else{if(d&&d.activeChild&&e!=d.activeChild){d.activeChild.hide()}}},onMouseDown:function(g){var e=this,h=e.active,f=e.lastShow;if(Ext.Date.getElapsed(f)>50&&h.length>0&&!g.getTarget("."+Ext.baseCSSPrefix+"menu")){e.hideAll()}},register:function(c){var d=this;if(!d.active){d.init()}if(c.floating){d.menus[c.id]=c;c.on({beforehide:d.onBeforeHide,hide:d.onHide,beforeshow:d.onBeforeShow,show:d.onShow,scope:d})}},get:function(c){var d=this.menus;if(typeof c=="string"){if(!d){return null}return d[c]}else{if(c.isMenu){return c}else{if(Ext.isArray(c)){return new Ext.menu.Menu({items:c})}else{return Ext.ComponentManager.create(c,"menu")}}}},unregister:function(g){var f=this,e=f.menus,h=f.active;delete e[g.id];h.remove(g);g.un({beforehide:f.onBeforeHide,hide:f.onHide,beforeshow:f.onBeforeShow,show:f.onShow,scope:f})},registerCheckable:function(f){var e=this.groups,d=f.group;if(d){if(!e[d]){e[d]=[]}e[d].push(f)}},unregisterCheckable:function(f){var e=this.groups,d=f.group;if(d){Ext.Array.remove(e[d],f)}},onCheckChange:function(o,m){var j=this.groups,p=o.group,i=0,k,n,l;if(p&&m){k=j[p];n=k.length;for(;i<n;i++){l=k[i];if(l!=o){l.setChecked(false)}}}}});Ext.define("Ext.layout.component.Button",{alias:["layout.button"],extend:"Ext.layout.component.Auto",type:"button",cellClsRE:/-btn-(tl|br)\b/,htmlRE:/<.*>/,constructor:function(){this.callParent(arguments);this.hackWidth=Ext.isIE&&(!Ext.isStrict||Ext.isIE6||Ext.isIE7);this.heightIncludesPadding=Ext.isIE6&&Ext.isStrict},beginLayout:function(b){this.callParent(arguments);this.cacheTargetInfo(b)},beginLayoutCycle:function(n){var p=this,o="",j=p.owner,i=j.btnEl,k=j.btnInnerEl,m=j.text,l;p.callParent(arguments);k.setStyle("overflow",o);if(!n.widthModel.natural){j.el.setStyle("width",o)}l=n.heightModel.shrinkWrap&&m&&p.htmlRE.test(m);i.setStyle("width",o);i.setStyle("height",l?"auto":o);k.setStyle("width",o);k.setStyle("height",l?"auto":o);k.setStyle("line-height",l?"normal":o);k.setStyle("padding-top",o);j.btnIconEl.setStyle("width",o)},calculateOwnerHeightFromContentHeight:function(c,d){return d},calculateOwnerWidthFromContentWidth:function(c,d){return d},measureContentWidth:function(v){var q=this,w=q.owner,s=w.btnEl,u=w.btnInnerEl,n=w.text,m,p,r,x,o,t;if(w.text&&q.hackWidth&&s){m=q.btnFrameWidth;if(n.indexOf(">")===-1){n=n.replace(/</g,"<")}p=Ext.util.TextMetrics.measure(u,n);x=p.width+m+q.adjWidth;o=v.getEl("btnEl");t=v.getEl("btnInnerEl");r=(w.icon||w.iconCls)&&(w.iconAlign=="top"||w.iconAlign=="bottom");v.setWidth(x);o.setWidth(p.width+m);t.setWidth(p.width+m);if(r){w.btnIconEl.setWidth(p.width+m)}}else{x=v.el.getWidth()}return x},measureContentHeight:function(u){var p=this,w=p.owner,t=w.btnInnerEl,q=u.getEl("btnEl"),s=u.getEl("btnInnerEl"),v=p.minTextHeight,r=p.adjHeight,m=w.getText(),n,o,x;if(w.vertical){n=Ext.util.TextMetrics.measure(t,w.text).width;n+=p.btnFrameHeight+r;u.setHeight(n,true,true)}else{if(m&&p.htmlRE.test(m)){o=t.getHeight();if(o<v){x=Math.floor((v-o)/2);s.setHeight(v-(p.heightIncludesPadding?x:0));s.setProp("padding-top",x);o=v}n=o+r}else{n=u.el.getHeight()}}q.setHeight(n-r);return n},publishInnerHeight:function(x,o){var r=this,z=r.owner,u=Ext.isNumber,s=x.getEl("btnEl"),w=z.btnInnerEl,t=x.getEl("btnInnerEl"),v=u(o)?o-r.adjHeight:o,y=r.btnFrameHeight,p=z.getText(),q,n;s.setHeight(v);t.setHeight(v);if(!z.vertical&&v>=0){t.setProp("line-height",v-y+"px")}if(p&&r.htmlRE.test(p)){t.setProp("line-height","normal");w.setStyle("line-height","normal");q=Ext.util.TextMetrics.measure(w,p).height;n=Math.floor(Math.max(v-y-q,0)/2);t.setProp("padding-top",r.btnFrameTop+n);t.setHeight(v-(r.heightIncludesPadding?n:0))}},publishInnerWidth:function(k,n){var l=this,j=Ext.isNumber,i=k.getEl("btnEl"),h=k.getEl("btnInnerEl"),m=j(n)?n-l.adjWidth:n;i.setWidth(m);h.setWidth(m)},clearTargetCache:function(){delete this.adjWidth},cacheTargetInfo:function(q){var m=this,r=m.owner,o=r.scale,k,n,j,p,l;if(!("adjWidth" in m)||m.lastScale!==o){if(m.lastScale){r.btnInnerEl.setStyle("line-height","")}m.lastScale=o;k=q.getPaddingInfo();n=q.getFrameInfo();j=q.getEl("btnWrap").getPaddingInfo();p=q.getEl("btnInnerEl");l=p.getPaddingInfo();Ext.apply(m,{adjWidth:j.width+n.width+k.width,adjHeight:j.height+n.height+k.height,btnFrameWidth:l.width,btnFrameHeight:l.height,btnFrameTop:l.top,minTextHeight:parseInt(p.getStyle("line-height"),10)})}m.callParent(arguments)}});Ext.define("Ext.layout.component.Tab",{extend:"Ext.layout.component.Button",alias:"layout.tab",beginLayout:function(f){var d=this,e=d.owner.closable;if(d.lastClosable!==e){d.lastClosable=e;d.clearTargetCache()}d.callParent(arguments)}});Ext.define("Ext.util.Region",{requires:["Ext.util.Offset"],statics:{getRegion:function(b){return Ext.fly(b).getPageBox(true)},from:function(b){return new this(b.top,b.right,b.bottom,b.left)}},constructor:function(i,g,b,j){var h=this;h.y=h.top=h[1]=i;h.right=g;h.bottom=b;h.x=h.left=h[0]=j},contains:function(c){var d=this;return(c.x>=d.x&&c.right<=d.right&&c.y>=d.y&&c.bottom<=d.bottom)},intersect:function(h){var i=this,k=Math.max(i.y,h.y),j=Math.min(i.right,h.right),b=Math.min(i.bottom,h.bottom),l=Math.max(i.x,h.x);if(b>k&&j>l){return new this.self(k,j,b,l)}else{return false}},union:function(h){var i=this,k=Math.min(i.y,h.y),j=Math.max(i.right,h.right),b=Math.max(i.bottom,h.bottom),l=Math.min(i.x,h.x);return new this.self(k,j,b,l)},constrainTo:function(d){var e=this,f=Ext.Number.constrain;e.top=e.y=f(e.top,d.y,d.bottom);e.bottom=f(e.bottom,d.y,d.bottom);e.left=e.x=f(e.left,d.x,d.right);e.right=f(e.right,d.x,d.right);return e},adjust:function(i,g,b,j){var h=this;h.top=h.y+=i;h.left=h.x+=j;h.right+=g;h.bottom+=b;return h},getOutOfBoundOffset:function(e,d){if(!Ext.isObject(e)){if(e=="x"){return this.getOutOfBoundOffsetX(d)}else{return this.getOutOfBoundOffsetY(d)}}else{d=e;var f=new Ext.util.Offset();f.x=this.getOutOfBoundOffsetX(d.x);f.y=this.getOutOfBoundOffsetY(d.y);return f}},getOutOfBoundOffsetX:function(b){if(b<=this.x){return this.x-b}else{if(b>=this.right){return this.right-b}}return 0},getOutOfBoundOffsetY:function(b){if(b<=this.y){return this.y-b}else{if(b>=this.bottom){return this.bottom-b}}return 0},isOutOfBound:function(d,c){if(!Ext.isObject(d)){if(d=="x"){return this.isOutOfBoundX(c)}else{return this.isOutOfBoundY(c)}}else{c=d;return(this.isOutOfBoundX(c.x)||this.isOutOfBoundY(c.y))}},isOutOfBoundX:function(b){return(b<this.x||b>this.right)},isOutOfBoundY:function(b){return(b<this.y||b>this.bottom)},restrict:function(e,g,f){if(Ext.isObject(e)){var h;f=g;g=e;if(g.copy){h=g.copy()}else{h={x:g.x,y:g.y}}h.x=this.restrictX(g.x,f);h.y=this.restrictY(g.y,f);return h}else{if(e=="x"){return this.restrictX(g,f)}else{return this.restrictY(g,f)}}},restrictX:function(c,d){if(!d){d=1}if(c<=this.x){c-=(c-this.x)*d}else{if(c>=this.right){c-=(c-this.right)*d}}return c},restrictY:function(c,d){if(!d){d=1}if(c<=this.y){c-=(c-this.y)*d}else{if(c>=this.bottom){c-=(c-this.bottom)*d}}return c},getSize:function(){return{width:this.right-this.x,height:this.bottom-this.y}},copy:function(){return new this.self(this.y,this.right,this.bottom,this.x)},copyFrom:function(c){var d=this;d.top=d.y=d[1]=c.y;d.right=c.right;d.bottom=c.bottom;d.left=d.x=d[0]=c.x;return this},toString:function(){return"Region["+this.top+","+this.right+","+this.bottom+","+this.left+"]"},translateBy:function(e,f){if(arguments.length==1){f=e.y;e=e.x}var d=this;d.top=d.y+=f;d.right+=e;d.bottom+=f;d.left=d.x+=e;return d},round:function(){var b=this;b.top=b.y=Math.round(b.y);b.right=Math.round(b.right);b.bottom=Math.round(b.bottom);b.left=b.x=Math.round(b.x);return b},equals:function(b){return(this.top==b.top&&this.right==b.right&&this.bottom==b.bottom&&this.left==b.left)}});Ext.define("Ext.grid.plugin.HeaderResizer",{extend:"Ext.util.Observable",requires:["Ext.dd.DragTracker","Ext.util.Region"],alias:"plugin.gridheaderresizer",disabled:false,config:{dynamic:false},colHeaderCls:Ext.baseCSSPrefix+"column-header",minColWidth:40,maxColWidth:1000,wResizeCursor:"col-resize",eResizeCursor:"col-resize",init:function(b){this.headerCt=b;b.on("render",this.afterHeaderRender,this,{single:true})},destroy:function(){if(this.tracker){this.tracker.destroy()}},afterHeaderRender:function(){var c=this.headerCt,d=c.el;c.mon(d,"mousemove",this.onHeaderCtMouseMove,this);this.tracker=new Ext.dd.DragTracker({disabled:this.disabled,onBeforeStart:Ext.Function.bind(this.onBeforeStart,this),onStart:Ext.Function.bind(this.onStart,this),onDrag:Ext.Function.bind(this.onDrag,this),onEnd:Ext.Function.bind(this.onEnd,this),tolerance:3,autoStart:300,el:d})},onHeaderCtMouseMove:function(q,e){var o=this,r,l,k,n,p,m;if(o.headerCt.dragging){if(o.activeHd){o.activeHd.el.dom.style.cursor="";delete o.activeHd}}else{l=q.getTarget("."+o.colHeaderCls,3,true);if(l){k=Ext.getCmp(l.id);if(k.isOnLeftEdge(q)){n=k.previousNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(n){m=o.headerCt.up("tablepanel");p=n.up("tablepanel");if(!((p===m)||((m.ownerCt.isXType("tablepanel"))&&m.ownerCt.view.lockedGrid===p))){n=null}}}else{if(k.isOnRightEdge(q)){n=k}else{n=null}}if(n){if(n.isGroupHeader){r=n.getGridColumns();n=r[r.length-1]}if(n&&!(n.fixed||(n.resizable===false)||o.disabled)){o.activeHd=n;k.el.dom.style.cursor=o.eResizeCursor}}else{k.el.dom.style.cursor="";delete o.activeHd}}}},onBeforeStart:function(c){var d=c.getTarget();this.dragHd=this.activeHd;if(!!this.dragHd&&!Ext.fly(d).hasCls(Ext.baseCSSPrefix+"column-header-trigger")&&!this.headerCt.dragging){this.tracker.constrainTo=this.getConstrainRegion();return true}else{this.headerCt.dragging=false;return false}},getConstrainRegion:function(){var h=this,f=h.dragHd.el,g=Ext.util.Region.getRegion(f),e;if(h.headerCt.forceFit){e=h.dragHd.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])")}return g.adjust(0,h.headerCt.forceFit?(e?e.getWidth()-h.minColWidth:0):h.maxColWidth-f.getWidth(),0,h.minColWidth)},onStart:function(t){var e=this,G=e.dragHd,K=G.el,z=K.getWidth(),E=e.headerCt,C=t.getTarget(),I,w,H,D,J,A,L,F,v,x,y,B;if(e.dragHd&&!Ext.fly(C).hasCls(Ext.baseCSSPrefix+"column-header-trigger")){E.dragging=true}e.origWidth=z;if(!e.dynamic){I=K.getXY();w=E.up("[scrollerOwner]");H=e.dragHd.up(":not([isGroupHeader])");D=H.up();J=w.getLhsMarker();A=w.getRhsMarker();L=A.parent();F=L.getLeft(true);v=L.getTop(true);x=L.translatePoints(I);y=D.body.getHeight()+E.getHeight();B=x.top-v;J.setTop(B);A.setTop(B);J.setHeight(y);A.setHeight(y);J.setLeft(x.left-F);A.setLeft(x.left+z-F)}},onDrag:function(k){if(!this.dynamic){var l=this.tracker.getXY("point"),i=this.headerCt.up("[scrollerOwner]"),j=i.getRhsMarker(),n=j.parent(),e=n.translatePoints(l),m=n.getLeft(true);j.setLeft(e.left-m)}else{this.doResize()}},onEnd:function(j){this.headerCt.dragging=false;if(this.dragHd){if(!this.dynamic){var k=this.dragHd,e=this.headerCt.up("[scrollerOwner]"),l=e.getLhsMarker(),i=e.getRhsMarker(),h=-9999;l.setLeft(h);i.setLeft(h)}this.doResize()}},doResize:function(){if(this.dragHd){var d=this.dragHd,e,f=this.tracker.getOffset("point");if(d.flex){delete d.flex}Ext.suspendLayouts();d.setWidth(this.origWidth+f[0]);if(this.headerCt.forceFit){e=d.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(e){delete e.flex;e.setWidth(e.getWidth()-f[0])}}Ext.resumeLayouts(true)}},disable:function(){this.disabled=true;if(this.tracker){this.tracker.disable()}},enable:function(){this.disabled=false;if(this.tracker){this.tracker.enable()}}});Ext.define("Ext.dd.DragDropManager",{singleton:true,requires:["Ext.util.Region"],uses:["Ext.tip.QuickTipManager"],alternateClassName:["Ext.dd.DragDropMgr","Ext.dd.DDM"],ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,notifyOccluded:false,_execOnAll:function(j,f){var i,g,h;for(i in this.ids){for(g in this.ids[i]){h=this.ids[i][g];if(!this.isTypeOfDD(h)){continue}h[j].apply(h,f)}}},_onLoad:function(){this.init();var b=Ext.EventManager;b.on(document,"mouseup",this.handleMouseUp,this,true);b.on(document,"mousemove",this.handleMouseMove,this,true);b.on(window,"unload",this._onUnload,this,true);b.on(window,"resize",this._onResize,this,true)},_onResize:function(b){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(c,d){if(!this.initialized){this.init()}if(!this.ids[d]){this.ids[d]={}}this.ids[d][c.id]=c},removeDDFromGroup:function(f,e){if(!this.ids[e]){this.ids[e]={}}var d=this.ids[e];if(d&&d[f.id]){delete d[f.id]}},_remove:function(c){for(var d in c.groups){if(d&&this.ids[d]&&this.ids[d][c.id]){delete this.ids[d][c.id]}}delete this.handleIds[c.id]},regHandle:function(c,d){if(!this.handleIds[c]){this.handleIds[c]={}}this.handleIds[c][d]=d},isDragDrop:function(b){return(this.getDDById(b))?true:false},getRelated:function(i,g){var j=[],k,l,h;for(k in i.groups){for(l in this.ids[k]){h=this.ids[k][l];if(!this.isTypeOfDD(h)){continue}if(!g||h.isTarget){j[j.length]=h}}}return j},isLegalTarget:function(h,i){var f=this.getRelated(h,true),j,g;for(j=0,g=f.length;j<g;++j){if(f[j].id==i.id){return true}}return false},isTypeOfDD:function(b){return(b&&b.__ygDragDrop)},isHandle:function(c,d){return(this.handleIds[c]&&this.handleIds[c][d])},getDDById:function(g){var h=this,e,f;for(e in this.ids){f=this.ids[e][g];if(f instanceof Ext.dd.DDTarget){return f}}return null},handleMouseDown:function(f,d){if(Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddDisable()}if(this.dragCurrent){this.handleMouseUp(f)}this.currentTarget=f.getTarget();this.dragCurrent=d;var e=d.getEl();this.startX=f.getPageX();this.startY=f.getPageY();this.deltaX=this.startX-e.offsetLeft;this.deltaY=this.startY-e.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var a=Ext.dd.DragDropManager;a.startDrag(a.startX,a.startY)},this.clickTimeThresh)},startDrag:function(d,c){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(d,c);this.dragCurrent.startDrag(d,c)}this.dragThreshMet=true},handleMouseUp:function(b){if(Ext.tip&&Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddEnable()}if(!this.dragCurrent){return}clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(b,true)}this.stopDrag(b);this.stopEvent(b)},stopEvent:function(b){if(this.stopPropagation){b.stopPropagation()}if(this.preventDefault){b.preventDefault()}},stopDrag:function(b){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(b);this.dragCurrent.endDrag(b)}this.dragCurrent.onMouseUp(b)}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(f){if(!this.dragCurrent){return true}if(Ext.isIE&&(f.button!==0&&f.button!==1&&f.button!==2)){this.stopEvent(f);return this.handleMouseUp(f)}var d,e;if(!this.dragThreshMet){d=Math.abs(this.startX-f.getPageX());e=Math.abs(this.startY-f.getPageY());if(d>this.clickPixelThresh||e>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(f);this.dragCurrent.onDrag(f);if(!this.dragCurrent.moveOnly){this.fireEvents(f,false)}}this.stopEvent(f);return true},fireEvents:function(w,t){var u=this,z=u.dragCurrent,i=w.getPoint(),F,H,D=[],G=[],C=[],y=[],A=[],E=[],v,B,x,e;if(!z||z.isLocked()){return}for(B in u.dragOvers){F=u.dragOvers[B];if(!u.isTypeOfDD(F)){continue}if(!this.isOverTarget(i,F,u.mode)){C.push(F)}G[B]=true;delete u.dragOvers[B]}for(e in z.groups){if("string"!=typeof e){continue}for(B in u.ids[e]){F=u.ids[e][B];if(u.isTypeOfDD(F)&&(H=F.getEl())&&(F.isTarget)&&(!F.isLocked())&&(Ext.fly(H).isVisible(true))&&((F!=z)||(z.ignoreSelf===false))){if((F.zIndex=u.getZIndex(H))!==-1){v=true}D.push(F)}}}if(v){Ext.Array.sort(D,u.byZIndex)}for(B=0,x=D.length;B<x;B++){F=D[B];if(u.isOverTarget(i,F,u.mode)){if(t){A.push(F)}else{if(!G[F.id]){E.push(F)}else{y.push(F)}u.dragOvers[F.id]=F}if(!u.notifyOccluded){break}}}if(u.mode){if(C.length){z.b4DragOut(w,C);z.onDragOut(w,C)}if(E.length){z.onDragEnter(w,E)}if(y.length){z.b4DragOver(w,y);z.onDragOver(w,y)}if(A.length){z.b4DragDrop(w,A);z.onDragDrop(w,A)}}else{for(B=0,x=C.length;B<x;++B){z.b4DragOut(w,C[B].id);z.onDragOut(w,C[B].id)}for(B=0,x=E.length;B<x;++B){z.onDragEnter(w,E[B].id)}for(B=0,x=y.length;B<x;++B){z.b4DragOver(w,y[B].id);z.onDragOver(w,y[B].id)}for(B=0,x=A.length;B<x;++B){z.b4DragDrop(w,A[B].id);z.onDragDrop(w,A[B].id)}}if(t&&!A.length){z.onInvalidDrop(w)}},getZIndex:function(e){var f=document.body,h,g=-1;e=Ext.getDom(e);while(e!==f){if(!isNaN(h=Number(Ext.fly(e).getStyle("zIndex")))){g=h}e=e.parentNode}return g},byZIndex:function(c,d){return c.zIndex<d.zIndex},getBestMatch:function(j){var h=null,f=j.length,i,g;if(f==1){h=j[0]}else{for(i=0;i<f;++i){g=j[i];if(g.cursorIsOver){h=g;break}else{if(!h||h.overlap.getArea()<g.overlap.getArea()){h=g}}}}return h},refreshCache:function(f){var g,j,i,h;for(g in f){if("string"!=typeof g){continue}for(j in this.ids[g]){i=this.ids[g][j];if(this.isTypeOfDD(i)){h=this.getLocation(i);if(h){this.locationCache[i.id]=h}else{delete this.locationCache[i.id]}}}}},verifyEl:function(d){if(d){var e;if(Ext.isIE){try{e=d.offsetParent}catch(f){}}else{e=d.offsetParent}if(e){return true}}return false},getLocation:function(s){if(!this.isTypeOfDD(s)){return null}if(s.getRegion){return s.getRegion()}var u=s.getEl(),p,v,w,e,l,b,x,q,t;try{p=Ext.Element.getXY(u)}catch(r){}if(!p){return null}v=p[0];w=v+u.offsetWidth;e=p[1];l=e+u.offsetHeight;b=e-s.padding[0];x=w+s.padding[1];q=l+s.padding[2];t=v-s.padding[3];return new Ext.util.Region(b,x,q,t)},isOverTarget:function(j,r,p){var n=this.locationCache[r.id],k,m,q,o,l;if(!n||!this.useCache){n=this.getLocation(r);this.locationCache[r.id]=n}if(!n){return false}r.cursorIsOver=n.contains(j);k=this.dragCurrent;if(!k||!k.getTargetCoord||(!p&&!k.constrainX&&!k.constrainY)){return r.cursorIsOver}r.overlap=null;m=k.getTargetCoord(j.x,j.y);q=k.getDragEl();o=new Ext.util.Region(m.y,m.x+q.offsetWidth,m.y+q.offsetHeight,m.x);l=o.intersect(n);if(l){r.overlap=l;return(p)?true:r.cursorIsOver}else{return false}},_onUnload:function(c,d){Ext.dd.DragDropManager.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);for(var b in this.elementCache){delete this.elementCache[b]}this.elementCache={};this.ids={}},elementCache:{},getElWrapper:function(c){var d=this.elementCache[c];if(!d||!d.el){d=this.elementCache[c]=new this.ElementWrapper(Ext.getDom(c))}return d},getElement:function(b){return Ext.getDom(b)},getCss:function(c){var d=Ext.getDom(c);return(d)?d.style:null},ElementWrapper:function(b){this.el=b||null;this.id=this.el&&b.id;this.css=this.el&&b.style},getPosX:function(b){return Ext.Element.getX(b)},getPosY:function(b){return Ext.Element.getY(b)},swapNode:function(h,f){if(h.swapNode){h.swapNode(f)}else{var g=f.parentNode,e=f.nextSibling;if(e==h){g.insertBefore(h,f)}else{if(f==h.nextSibling){g.insertBefore(f,h)}else{h.parentNode.replaceChild(f,h);g.insertBefore(h,e)}}}},getScroll:function(){var i=window.document,h=i.documentElement,g=i.body,j=0,f=0;if(Ext.isGecko4){j=window.scrollYOffset;f=window.scrollXOffset}else{if(h&&(h.scrollTop||h.scrollLeft)){j=h.scrollTop;f=h.scrollLeft}else{if(g){j=g.scrollTop;f=g.scrollLeft}}}return{top:j,left:f}},getStyle:function(c,d){return Ext.fly(c).getStyle(d)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(e,f){var d=Ext.Element.getXY(f);Ext.Element.setXY(e,d)},numericSort:function(a,b){return(a-b)},_timeoutCount:0,_addListeners:function(){if(document){this._onLoad()}else{if(this._timeoutCount<=2000){setTimeout(this._addListeners,10);if(document&&document.body){this._timeoutCount+=1}}}},handleWasClicked:function(e,f){if(this.isHandle(f,e.id)){return true}else{var d=e.parentNode;while(d){if(this.isHandle(f,d.id)){return true}else{d=d.parentNode}}}return false}},function(){this._addListeners()});Ext.define("Ext.state.Manager",{singleton:true,requires:["Ext.state.Provider"],constructor:function(){this.provider=new Ext.state.Provider()},setProvider:function(b){this.provider=b},get:function(c,d){return this.provider.get(c,d)},set:function(d,c){this.provider.set(d,c)},clear:function(b){this.provider.clear(b)},getProvider:function(){return this.provider}});Ext.define("Ext.state.Stateful",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.state.Manager"],stateful:false,saveDelay:100,constructor:function(d){var c=this;d=d||{};if(d.stateful!==undefined){c.stateful=d.stateful}if(d.saveDelay!==undefined){c.saveDelay=d.saveDelay}c.stateId=c.stateId||d.stateId;if(!c.stateEvents){c.stateEvents=[]}if(d.stateEvents){c.stateEvents.concat(d.stateEvents)}this.addEvents("beforestaterestore","staterestore","beforestatesave","statesave");c.mixins.observable.constructor.call(c);if(c.stateful!==false){c.addStateEvents(c.stateEvents);c.initState()}},addStateEvents:function(j){var h=this,f,i,g;if(h.stateful&&h.getStateId()){if(typeof j=="string"){j=Array.prototype.slice.call(arguments,0)}g=h.stateEventsByName||(h.stateEventsByName={});for(f=j.length;f--;){i=j[f];if(!g[i]){g[i]=1;h.on(i,h.onStateChange,h)}}}},onStateChange:function(){var h=this,f=h.saveDelay,g,e;if(!h.stateful){return}if(f){if(!h.stateTask){g=Ext.state.Stateful;e=g.runner||(g.runner=new Ext.util.TaskRunner());h.stateTask=e.newTask({run:h.saveState,scope:h,interval:f,repeat:1})}h.stateTask.start()}else{h.saveState()}},saveState:function(){var e=this,g=e.stateful&&e.getStateId(),f=e.hasListeners,h;if(g){h=e.getState()||{};if(!f.beforestatesave||e.fireEvent("beforestatesave",e,h)!==false){Ext.state.Manager.set(g,h);if(f.statesave){e.fireEvent("statesave",e,h)}}}},getState:function(){return null},applyState:function(b){if(b){Ext.apply(this,b)}},getStateId:function(){var b=this;return b.stateId||(b.autoGenId?null:b.id)},initState:function(){var e=this,g=e.stateful&&e.getStateId(),f=e.hasListeners,h;if(g){h=Ext.state.Manager.get(g);if(h){h=Ext.apply({},h);if(!f.beforestaterestore||e.fireEvent("beforestaterestore",e,h)!==false){e.applyState(h);if(f.staterestore){e.fireEvent("staterestore",e,h)}}}}},savePropToState:function(i,j,k){var g=this,l=g[i],h=g.initialConfig;if(g.hasOwnProperty(i)){if(!h||h[i]!==l){if(j){j[k||i]=l}return true}}return false},savePropsToState:function(h,j){var f=this,g,i;if(typeof h=="string"){f.savePropToState(h,j)}else{for(g=0,i=h.length;g<i;++g){f.savePropToState(h[g],j)}}return j},destroy:function(){var c=this,d=c.stateTask;if(d){d.destroy();c.stateTask=null}c.clearListeners()}});Ext.define("Ext.AbstractComponent",{requires:["Ext.ComponentQuery","Ext.ComponentManager","Ext.util.ProtoElement"],mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate",elementCt:"Ext.util.ElementContainer",renderable:"Ext.util.Renderable",state:"Ext.state.Stateful"},uses:["Ext.PluginManager","Ext.Element","Ext.DomHelper","Ext.XTemplate","Ext.ComponentQuery","Ext.ComponentLoader","Ext.EventManager","Ext.layout.Context","Ext.layout.Layout","Ext.layout.component.Auto","Ext.LoadMask","Ext.ZIndexManager"],statics:{AUTO_ID:1000,pendingLayouts:null,layoutSuspendCount:0,cancelLayout:function(d){var c=this.runningLayoutContext||this.pendingLayouts;if(c){c.cancelComponent(d)}},flushLayouts:function(){var c=this,d=c.pendingLayouts;if(d&&d.invalidQueue.length){c.pendingLayouts=null;c.runningLayoutContext=d;Ext.override(d,{runComplete:function(){c.runningLayoutContext=null;return this.callParent()}});d.run()}},resumeLayouts:function(b){if(this.layoutSuspendCount&&!--this.layoutSuspendCount){if(b){this.flushLayouts()}}},suspendLayouts:function(){++this.layoutSuspendCount},updateLayout:function(f,h){var j=this,g=j.runningLayoutContext,i;if(g){g.queueInvalidate(f)}else{i=j.pendingLayouts||(j.pendingLayouts=new Ext.layout.Context());i.queueInvalidate(f);if(!h&&!j.layoutSuspendCount&&!f.isLayoutSuspended()){j.flushLayouts()}}}},isComponent:true,getAutoId:function(){this.autoGenId=true;return ++Ext.AbstractComponent.AUTO_ID},deferLayouts:false,autoGenId:false,renderTpl:"{%this.renderContent(out,values)%}",frameSize:{left:0,top:0,right:0,bottom:0,width:0,height:0},tplWriteMode:"overwrite",baseCls:Ext.baseCSSPrefix+"component",disabledCls:Ext.baseCSSPrefix+"item-disabled",ui:"default",uiCls:[],hidden:false,disabled:false,draggable:false,floating:false,hideMode:"display",styleHtmlContent:false,styleHtmlCls:Ext.baseCSSPrefix+"html",autoShow:false,autoRender:false,allowDomMove:true,rendered:false,componentLayoutCounter:0,shrinkWrap:2,weight:0,maskOnDisable:true,_isLayoutRoot:false,constructor:function(j){var h=this,i,g,f;if(j){Ext.apply(h,j);f=h.xhooks;if(f){delete h.xhooks;Ext.override(h,f)}}else{j={}}h.initialConfig=j;h.mixins.elementCt.constructor.call(h);h.addEvents("beforeactivate","activate","beforedeactivate","deactivate","added","disable","enable","beforeshow","show","beforehide","hide","removed","beforerender","render","afterrender","boxready","beforedestroy","destroy","resize","move","focus","blur");h.getId();h.setupProtoEl();if(h.cls){h.initialCls=h.cls;h.protoEl.addCls(h.cls)}if(h.style){h.initialStyle=h.style;h.protoEl.setStyle(h.style)}h.mons=[];h.renderData=h.renderData||{};h.renderSelectors=h.renderSelectors||{};if(h.plugins){h.plugins=[].concat(h.plugins);h.constructPlugins()}if(!h.hasListeners){h.hasListeners=new h.HasListeners()}h.initComponent();Ext.ComponentManager.register(h);h.mixins.observable.constructor.call(h);h.mixins.state.constructor.call(h,j);this.addStateEvents("resize");if(h.plugins){h.plugins=[].concat(h.plugins);for(i=0,g=h.plugins.length;i<g;i++){h.plugins[i]=h.initPlugin(h.plugins[i])}}h.loader=h.getLoader();if(h.renderTo){h.render(h.renderTo)}if(h.autoShow){h.show()}if(Ext.isDefined(h.disabledClass)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.Component: disabledClass has been deprecated. Please use disabledCls.")}h.disabledCls=h.disabledClass;delete h.disabledClass}},initComponent:function(){this.constructPlugins();this.setSize(this.width,this.height)},getState:function(){var d=this,f=null,e=d.getSizeModel();if(e.width.configured){f=d.addPropertyToState(f,"width")}if(e.height.configured){f=d.addPropertyToState(f,"height")}return f},addPropertyToState:function(h,i,j){var f=this,g=arguments.length;if(g==3||f.hasOwnProperty(i)){if(g<3){j=f[i]}if(j!==f.initialConfig[i]){(h||(h={}))[i]=j}}return h},show:Ext.emptyFn,animate:function(A){var t=this,x,w,y,h,p,r,s,u,q,v,z,B;A=A||{};p=A.to||{};if(Ext.fx.Manager.hasFxBlock(t.id)){return t}x=Ext.isDefined(p.width);if(x){h=Ext.Number.constrain(p.width,t.minWidth,t.maxWidth)}w=Ext.isDefined(p.height);if(w){y=Ext.Number.constrain(p.height,t.minHeight,t.maxHeight)}if(!A.dynamic&&(x||w)){u=(A.from?A.from.width:undefined)||t.getWidth();q=u;v=(A.from?A.from.height:undefined)||t.getHeight();z=v;B=false;if(w&&y>v){z=y;B=true}if(x&&h>u){q=h;B=true}if(B){r=!Ext.isNumber(t.width);s=!Ext.isNumber(t.height);t.setSize(q,z);t.el.setSize(u,v);if(r){delete t.width}if(s){delete t.height}}if(x){p.width=h}if(w){p.height=y}}return t.mixins.animate.animate.apply(t,arguments)},onHide:function(){this.updateLayout({isRoot:false})},onShow:function(){this.updateLayout({isRoot:false})},constructPlugin:function(b){if(b.ptype&&typeof b.init!="function"){b.cmp=this;b=Ext.PluginManager.create(b)}else{if(typeof b=="string"){b=Ext.PluginManager.create({ptype:b,cmp:this})}}return b},constructPlugins:function(){var g=this,e=g.plugins,h,f;if(e){for(h=0,f=e.length;h<f;h++){e[h]=g.constructPlugin(e[h])}}},initPlugin:function(b){b.init(this);return b},updateAria:Ext.emptyFn,registerFloatingItem:function(c){var d=this;if(!d.floatingItems){d.floatingItems=new Ext.ZIndexManager(d)}d.floatingItems.register(c)},unregisterFloatingItem:function(c){var d=this;if(d.floatingItems){d.floatingItems.unregister(c)}},layoutSuspendCount:0,suspendLayouts:function(){var b=this;if(!b.rendered){return}if(++b.layoutSuspendCount==1){b.suspendLayout=true}},resumeLayouts:function(c){var d=this;if(!d.rendered){return}if(!--d.layoutSuspendCount){d.suspendLayout=false;if(c&&!d.isLayoutSuspended()){d.updateLayout(c)}}},setupProtoEl:function(){var c=this,d=[c.baseCls,c.getComponentLayout().targetCls];if(Ext.isDefined(c.cmpCls)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.Component: cmpCls has been deprecated. Please use componentCls.")}c.componentCls=c.cmpCls;delete c.cmpCls}if(c.componentCls){d.push(c.componentCls)}else{c.componentCls=c.baseCls}c.protoEl=new Ext.util.ProtoElement({cls:d.join(" ")})},setUI:function(k){var l=this,h=Ext.Array.clone(l.uiCls),j=[],m=[],i,n;for(n=0;n<h.length;n++){i=h[n];m=m.concat(l.removeClsWithUI(i,true));j.push(i)}if(m.length){l.removeCls(m)}l.removeUIFromElement();l.ui=k;l.addUIToElement();m=[];for(n=0;n<j.length;n++){i=j[n];m=m.concat(l.addClsWithUI(i,true))}if(m.length){l.addCls(m)}if(l.rendered){l.updateLayout()}},addClsWithUI:function(n,j){var k=this,l=[],m,h=0,i;if(typeof n==="string"){n=(n.indexOf(" ")<0)?[n]:Ext.String.splitWords(n)}m=n.length;k.uiCls=Ext.Array.clone(k.uiCls);for(;h<m;h++){i=n[h];if(i&&!k.hasUICls(i)){k.uiCls.push(i);l=l.concat(k.addUIClsToElement(i))}}if(j!==true){k.addCls(l)}return l},removeClsWithUI:function(n,j){var k=this,l=[],h=0,m,i;if(typeof n==="string"){n=(n.indexOf(" ")<0)?[n]:Ext.String.splitWords(n)}m=n.length;for(h=0;h<m;h++){i=n[h];if(i&&k.hasUICls(i)){k.uiCls=Ext.Array.remove(k.uiCls,i);l=l.concat(k.removeUIClsFromElement(i))}}if(j!==true){k.removeCls(l)}return l},hasUICls:function(e){var d=this,f=d.uiCls||[];return Ext.Array.contains(f,e)},frameElementsArray:["tl","tc","tr","ml","mc","mr","bl","bc","br"],addUIClsToElement:function(i){var o=this,u=o.baseCls+"-"+o.ui+"-"+i,c=[Ext.baseCSSPrefix+i,o.baseCls+"-"+i,u],n=o.frameElementCls,q,r,s,v,t,p;if(o.frame&&!Ext.supports.CSS3BorderRadius){q=o.frameElementsArray;r=q.length;s=0;for(;s<r;s++){t=q[s];v=o["frame"+t.toUpperCase()];p=u+"-"+t;if(v&&v.dom){v.addCls(p)}else{if(Ext.Array.indexOf(n[t],p)==-1){n[t].push(p)}}}}o.frameElementCls=n;return c},removeUIClsFromElement:function(i){var o=this,u=o.baseCls+"-"+o.ui+"-"+i,c=[Ext.baseCSSPrefix+i,o.baseCls+"-"+i,u],n=o.frameElementCls,q,r,s,v,t,p;if(o.frame&&!Ext.supports.CSS3BorderRadius){q=o.frameElementsArray;r=q.length;s=0;for(;s<r;s++){t=q[s];v=o["frame"+t.toUpperCase()];p=u+"-"+t;if(v&&v.dom){v.addCls(p)}else{Ext.Array.remove(n[t],p)}}}o.frameElementCls=n;return c},addUIToElement:function(){var l=this,i=l.baseCls+"-"+l.ui,c=l.frameElementCls,n,o,p,r,q,m;l.addCls(i);if(l.frame&&!Ext.supports.CSS3BorderRadius){n=l.frameElementsArray;o=n.length;p=0;for(;p<o;p++){q=n[p];r=l["frame"+q.toUpperCase()];m=i+"-"+q;if(r){r.addCls(m)}else{if(!Ext.Array.contains(c[q],m)){c[q].push(m)}}}}},removeUIFromElement:function(){var l=this,i=l.baseCls+"-"+l.ui,c=l.frameElementCls,n,o,p,r,q,m;l.removeCls(i);if(l.frame&&!Ext.supports.CSS3BorderRadius){n=l.frameElementsArray;o=n.length;p=0;for(;p<o;p++){q=n[p];r=l["frame"+q.toUpperCase()];m=i+"-"+q;if(r){r.removeCls(m)}else{Ext.Array.remove(c[q],m)}}}},getTpl:function(b){return Ext.XTemplate.getTpl(this,b)},initStyles:function(j){var o=this,q=Ext.Element,m=o.padding,p=o.margin,l=o.x,n=o.y,r,k;if(m!==undefined){j.setStyle("padding",q.unitizeBox((m===true)?5:m))}if(p!==undefined){j.setStyle("margin",q.unitizeBox((p===true)?5:p))}if(o.border!==undefined){o.setBorder(o.border,j)}if(o.cls&&o.cls!=o.initialCls){j.addCls(o.cls);delete o.cls;delete o.initialCls}if(o.style&&o.style!=o.initialStyle){j.setStyle(o.style);delete o.style;delete o.initialStyle}if(l!==undefined){j.setStyle("left",l+"px")}if(n!==undefined){j.setStyle("top",n+"px")}if(!o.getFrameInfo()&&Ext.isBorderBox){r=o.width;k=o.height;if(r!==undefined){j.setStyle("width",(typeof r==="number")?r+"px":r)}if(k!==undefined){j.setStyle("height",(typeof k==="number")?k+"px":k)}}},initEvents:function(){var j=this,h=j.afterRenderEvents,f,i,g=function(a){j.mon(f,a)};if(h){for(i in h){if(h.hasOwnProperty(i)){f=j[i];if(f&&f.on){Ext.each(h[i],g)}}}}j.addFocusListener()},addFocusListener:function(){var f=this,d=f.getFocusEl(),e;if(d){if(d.isComponent){return d.addFocusListener()}e=d.needsTabIndex();if(!f.focusListenerAdded&&(!e||Ext.FocusManager.enabled)){if(e){d.dom.tabIndex=-1}d.on({focus:f.onFocus,blur:f.onBlur,scope:f});f.focusListenerAdded=true}}},getFocusEl:Ext.emptyFn,isFocusable:function(f){var c=this,e;if((c.focusable!==false)&&(e=c.getFocusEl())&&c.rendered&&!c.destroying&&!c.isDestroyed&&!c.disabled&&c.isVisible(true)){if(e.isComponent){return e.isFocusable()}return e&&e.dom&&e.isVisible()}},preFocus:Ext.emptyFn,onFocus:function(g){var h=this,e=h.focusCls,f=h.getFocusEl();if(!h.disabled){h.preFocus(g);if(e&&f){f.addCls(h.addClsWithUI(e,true))}if(!h.hasFocus){h.hasFocus=true;h.fireEvent("focus",h,g)}}},beforeBlur:Ext.emptyFn,onBlur:function(g){var h=this,e=h.focusCls,f=h.getFocusEl();if(h.destroying){return}h.beforeBlur(g);if(e&&f){f.removeCls(h.removeClsWithUI(e,true))}if(h.validateOnBlur){h.validate()}h.hasFocus=false;h.fireEvent("blur",h,g);h.postBlur(g)},postBlur:Ext.emptyFn,is:function(b){return Ext.ComponentQuery.is(this,b)},up:function(c){var d=this.getBubbleTarget();if(c){for(;d;d=d.getBubbleTarget()){if(Ext.ComponentQuery.is(d,c)){return d}}}return d},nextSibling:function(c){var j=this.ownerCt,l,k,h,i;if(j){l=j.items;h=l.indexOf(this)+1;if(h){if(c){for(k=l.getCount();h<k;h++){if((i=l.getAt(h)).is(c)){return i}}}else{if(h<l.getCount()){return l.getAt(h)}}}}return null},previousSibling:function(c){var i=this.ownerCt,j,g,h;if(i){j=i.items;g=j.indexOf(this);if(g!=-1){if(c){for(--g;g>=0;g--){if((h=j.getAt(g)).is(c)){return h}}}else{if(g){return j.getAt(--g)}}}}return null},previousNode:function(n,m){var j=this,h,k,i,l;if(m&&j.is(n)){return j}h=this.prev(n);if(h){return h}if(j.ownerCt){for(k=j.ownerCt.items.items,l=Ext.Array.indexOf(k,j)-1;l>-1;l--){if(k[l].query){h=k[l].query(n);h=h[h.length-1];if(h){return h}}}return j.ownerCt.previousNode(n,true)}},nextNode:function(n,m){var j=this,h,k,i,l;if(m&&j.is(n)){return j}h=this.next(n);if(h){return h}if(j.ownerCt){for(k=j.ownerCt.items,l=k.indexOf(j)+1,k=k.items,i=k.length;l<i;l++){if(k[l].down){h=k[l].down(n);if(h){return h}}}return j.ownerCt.nextNode(n)}},getId:function(){return this.id||(this.id="ext-comp-"+(this.getAutoId()))},getItemId:function(){return this.itemId||this.id},getEl:function(){return this.el},getTargetEl:function(){return this.frameBody||this.el},getOverflowStyle:function(){var c=this,d=null;if(typeof c.autoScroll=="boolean"){d={overflow:c.autoScroll?"auto":""}}else{if(c.overflowX!==undefined||c.overflowY!==undefined){d={"overflow-x":(c.overflowX||""),"overflow-y":(c.overflowY||"")}}}if(d&&(Ext.isIE6||Ext.isIE7)){d.position="relative"}return d},isXType:function(c,d){if(d){return this.xtype===c}else{return this.xtypesMap[c]}},getXTypes:function(){var h=this.self,g,e,f;if(!h.xtypes){g=[];e=this;while(e){f=e.xtypes;if(f!==undefined){g.unshift.apply(g,f)}e=e.superclass}h.xtypeChain=g;h.xtypes=g.join("/")}return h.xtypes},update:function(e,h,f){var g=this;if(g.tpl&&!Ext.isString(e)){g.data=e;if(g.rendered){g.tpl[g.tplWriteMode](g.getTargetEl(),e||{})}}else{g.html=Ext.isObject(e)?Ext.DomHelper.markup(e):e;if(g.rendered){g.getTargetEl().update(g.html,h,f)}}if(g.rendered){g.updateLayout()}},setVisible:function(b){return this[b?"show":"hide"]()},isVisible:function(g){var j=this,h=j,i=j.rendered&&!j.hidden,f=j.ownerCt;j.hiddenAncestor=false;if(j.destroyed){return false}if(g&&i&&f){while(f){if(f.hidden||(f.collapsed&&!(f.getDockedItems&&Ext.Array.contains(f.getDockedItems(),h)))){j.hiddenAncestor=f;i=false;break}h=f;f=f.ownerCt}}return i},onBoxReady:function(){var b=this;if(b.disableOnBoxReady){b.onDisable()}else{if(b.enableOnBoxReady){b.onEnable()}}if(b.resizable){b.initResizable(b.resizable)}},enable:function(d){var c=this;delete c.disableOnBoxReady;c.removeCls(c.disabledCls);if(c.rendered){c.onEnable()}else{c.enableOnBoxReady=true}c.disabled=false;delete c.resetDisable;if(d!==true){c.fireEvent("enable",c)}return c},disable:function(d){var c=this;delete c.enableOnBoxReady;c.addCls(c.disabledCls);if(c.rendered){c.onDisable()}else{c.disableOnBoxReady=true}c.disabled=true;if(d!==true){delete c.resetDisable;c.fireEvent("disable",c)}return c},onEnable:function(){if(this.maskOnDisable){this.el.dom.disabled=false;this.unmask()}},onDisable:function(){if(this.maskOnDisable){this.el.dom.disabled=true;this.mask()}},mask:function(){var d=this.lastBox,f=this.getMaskTarget(),e=[];if(d){e[2]=d.height}f.mask.apply(f,e)},unmask:function(){this.getMaskTarget().unmask()},getMaskTarget:function(){return this.el},isDisabled:function(){return this.disabled},setDisabled:function(b){return this[b?"disable":"enable"]()},isHidden:function(){return this.hidden},addCls:function(e){var f=this,d=f.rendered?f.el:f.protoEl;d.addCls.apply(d,arguments);return f},addClass:function(){return this.addCls.apply(this,arguments)},hasCls:function(e){var f=this,d=f.rendered?f.el:f.protoEl;return d.hasCls.apply(d,arguments)},removeCls:function(e){var f=this,d=f.rendered?f.el:f.protoEl;d.removeCls.apply(d,arguments);return f},removeClass:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.Component: removeClass has been deprecated. Please use removeCls.")}return this.removeCls.apply(this,arguments)},addOverCls:function(){var b=this;if(!b.disabled){b.el.addCls(b.overCls)}},removeOverCls:function(){this.el.removeCls(this.overCls)},addListener:function(h,k,l,i){var j=this,m,n;if(Ext.isString(h)&&(Ext.isObject(k)||i&&i.element)){if(i.element){m=k;k={};k[h]=m;h=i.element;if(l){k.scope=l}for(n in i){if(i.hasOwnProperty(n)){if(j.eventOptionsRe.test(n)){k[n]=i[n]}}}}if(j[h]&&j[h].on){j.mon(j[h],k)}else{j.afterRenderEvents=j.afterRenderEvents||{};if(!j.afterRenderEvents[h]){j.afterRenderEvents[h]=[]}j.afterRenderEvents[h].push(k)}}return j.mixins.observable.addListener.apply(j,arguments)},removeManagedListenerItem:function(i,j,k,o,m,n){var l=this,p=j.options?j.options.element:null;if(p){p=l[p];if(p&&p.un){if(i||(j.item===k&&j.ename===o&&(!m||j.fn===m)&&(!n||j.scope===n))){p.un(j.ename,j.fn,j.scope);if(!i){Ext.Array.remove(l.managedListeners,j)}}}}else{return l.mixins.observable.removeManagedListenerItem.apply(l,arguments)}},getBubbleTarget:function(){return this.ownerCt},isFloating:function(){return this.floating},isDraggable:function(){return !!this.draggable},isDroppable:function(){return !!this.droppable},onAdded:function(e,f){var d=this;d.ownerCt=e;if(d.hasListeners.added){d.fireEvent("added",d,e,f)}},onRemoved:function(c){var d=this;if(d.hasListeners.removed){d.fireEvent("removed",d,d.ownerCt)}delete d.ownerCt;delete d.ownerLayout},beforeDestroy:Ext.emptyFn,onResize:Ext.emptyFn,setSize:function(d,e){var f=this;if(d&&typeof d=="object"){e=d.height;d=d.width}if(typeof d=="number"){f.width=Ext.Number.constrain(d,f.minWidth,f.maxWidth)}else{if(d===null){delete f.width}}if(typeof e=="number"){f.height=Ext.Number.constrain(e,f.minHeight,f.maxHeight)}else{if(e===null){delete f.height}}if(f.rendered&&f.isVisible()){f.updateLayout({isRoot:false})}return f},isLayoutRoot:function(){var d=this,c=d.ownerLayout;if(!c||d._isLayoutRoot||d.floating){return true}return c.isItemLayoutRoot(d)},isLayoutSuspended:function(){var d=this,c;while(d){if(d.layoutSuspendCount||d.suspendLayout){return true}c=d.ownerLayout;if(!c){break}d=c.owner}return false},updateLayout:function(e){var h=this,g,f=e&&e.isRoot;if(!h.rendered||h.layoutSuspendCount||h.suspendLayout){return}if(h.hidden){Ext.AbstractComponent.cancelLayout(h)}else{if(typeof f!="boolean"){f=h.isLayoutRoot()}}if(f||!h.ownerLayout||!h.ownerLayout.onContentChange(h)){if(!h.isLayoutSuspended()){g=(e&&e.hasOwnProperty("defer"))?e.defer:h.deferLayouts;Ext.AbstractComponent.updateLayout(h,g)}}},getSizeModel:function(r){var o=this,v=Ext.layout.SizeModel,m=o.componentLayout.ownerContext,u,l,t,n,q,p,s;if(m){s=m.widthModel;t=m.heightModel}if(!s||!t){u=(typeof o.width=="number");l=(typeof o.height=="number");if(o.floating||!(n=o.ownerLayout)){if(u){s=v.configured}if(l){t=v.configured}q=Ext.layout.Layout.prototype.autoSizePolicy;p=o.floating?3:o.shrinkWrap}else{q=n.getItemSizePolicy(o);p=n.isItemShrinkWrap(o)}p=(p===true)?3:(p||0);if(p!==3){if(!r){r=o.ownerCt&&o.ownerCt.getSizeModel()}if(r){p|=(r.width.shrinkWrap?1:0)|(r.height.shrinkWrap?2:0)}}if(!s){if(!q.setsWidth){if(u){s=v.configured}else{s=(p&1)?v.shrinkWrap:v.natural}}else{if(q.readsWidth){if(u){s=v.calculatedFromConfigured}else{s=(p&1)?v.calculatedFromShrinkWrap:v.calculatedFromNatural}}else{s=v.calculated}}}if(!t){if(!q.setsHeight){if(l){t=v.configured}else{t=(p&2)?v.shrinkWrap:v.natural}}else{if(q.readsHeight){if(l){t=v.calculatedFromConfigured}else{t=(p&2)?v.calculatedFromShrinkWrap:v.calculatedFromNatural}}else{t=v.calculated}}}}return{width:s,height:t}},isDescendant:function(d){if(d.isContainer){for(var c=this.ownerCt;c;c=c.ownerCt){if(c===d){return true}}}return false},doComponentLayout:function(){this.updateLayout();return this},forceComponentLayout:function(){this.updateLayout()},setComponentLayout:function(c){var d=this.componentLayout;if(d&&d.isLayout&&d!=c){d.setOwner(null)}this.componentLayout=c;c.setOwner(this)},getComponentLayout:function(){var b=this;if(!b.componentLayout||!b.componentLayout.isLayout){b.setComponentLayout(Ext.layout.Layout.create(b.componentLayout,"autocomponent"))}return b.componentLayout},afterComponentLayout:function(j,g,f,h){var i=this;if(++i.componentLayoutCounter===1){i.afterFirstLayout(j,g)}if(i.hasListeners.resize&&(j!==f||g!==h)){i.fireEvent("resize",i,j,g,f,h)}},beforeComponentLayout:function(c,d){return true},setPosition:function(g,h,f){var j=this,i=j.beforeSetPosition.apply(j,arguments);if(i&&j.rendered){i=j.convertPosition(i);if(f){j.stopAnimation();j.animate(Ext.apply({duration:1000,listeners:{afteranimate:Ext.Function.bind(j.afterSetPosition,j,[i.left,i.top])},to:i},f))}else{if(i.left!==undefined&&i.top!==undefined){j.el.setLeftTop(i.left,i.top)}else{if(i.left!==undefined){j.el.setLeft(i.left)}else{if(i.top!==undefined){j.el.setTop(i.top)}}}j.afterSetPosition(i.left,i.top)}}return j},beforeSetPosition:function(g,h,f){var i,j;if(!g||Ext.isNumber(g)){i={x:g,y:h,anim:f}}else{if(Ext.isNumber(j=g[0])){i={x:j,y:g[1],anim:h}}else{i={x:g.x,y:g.y,anim:h}}}i.hasX=Ext.isNumber(i.x);i.hasY=Ext.isNumber(i.y);this.x=i.x;this.y=i.y;return(i.hasX||i.hasY)?i:null},afterSetPosition:function(e,f){var d=this;d.onPosition(e,f);if(d.hasListeners.move){d.fireEvent("move",d,e,f)}},convertPosition:function(g,e){var f={},h=Ext.Element;if(g.hasX){f.left=e?h.addUnits(g.x):g.x}if(g.hasY){f.top=e?h.addUnits(g.y):g.y}return f},onPosition:Ext.emptyFn,setWidth:function(b){return this.setSize(b)},setHeight:function(b){return this.setSize(undefined,b)},getSize:function(){return this.el.getSize()},getWidth:function(){return this.el.getWidth()},getHeight:function(){return this.el.getHeight()},getLoader:function(){var f=this,d=f.autoLoad?(Ext.isObject(f.autoLoad)?f.autoLoad:{url:f.autoLoad}):null,e=f.loader||d;if(e){if(!e.isLoader){f.loader=new Ext.ComponentLoader(Ext.apply({target:f,autoLoad:d},e))}else{e.setTarget(f)}return f.loader}return null},setDocked:function(d,f){var e=this;e.dock=d;if(f&&e.ownerCt&&e.rendered){e.ownerCt.updateLayout()}return e},setBorder:function(e,g){var h=this,f=!!g;if(h.rendered||f){if(!f){g=h.el}if(!e){e=0}else{e=Ext.Element.unitizeBox((e===true)?1:e)}g.setStyle("border-width",e);if(!f){h.updateLayout()}}h.border=e},onDestroy:function(){var b=this;if(b.monitorResize&&Ext.EventManager.resizeEvent){Ext.EventManager.resizeEvent.removeListener(b.setSize,b)}Ext.destroy(b.componentLayout,b.loadMask,b.floatingItems)},destroy:function(){var g=this,e=g.renderSelectors,f,h;if(!g.isDestroyed){if(!g.hasListeners.beforedestroy||g.fireEvent("beforedestroy",g)!==false){g.destroying=true;g.beforeDestroy();if(g.floating){delete g.floatParent;if(g.zIndexManager){g.zIndexManager.unregister(g)}}else{if(g.ownerCt&&g.ownerCt.remove){g.ownerCt.remove(g,false)}}g.onDestroy();Ext.destroy(g.plugins);if(g.hasListeners.destroy){g.fireEvent("destroy",g)}Ext.ComponentManager.unregister(g);g.mixins.state.destroy.call(g);g.clearListeners();if(g.rendered){Ext.AbstractComponent.cancelLayout(g);if(!g.preserveElOnDestroy){g.el.remove()}g.mixins.elementCt.destroy.call(g);if(e){for(f in e){if(e.hasOwnProperty(f)){h=g[f];if(h){delete g[f];h.remove()}}}}delete g.el;delete g.frameBody;delete g.rendered}g.destroying=false;g.isDestroyed=true}}},getPlugin:function(e){var h=0,f=this.plugins,g=f.length;for(;h<g;h++){if(f[h].pluginId===e){return f[h]}}},isDescendantOf:function(b){return !!this.findParentBy(function(a){return a===b})}},function(){var b=this;b.createAlias({on:"addListener",prev:"previousSibling",next:"nextSibling"});Ext.resumeLayouts=function(a){b.resumeLayouts(a)};Ext.suspendLayouts=function(){b.suspendLayouts()};Ext.batchLayouts=function(d,a){b.suspendLayouts();d.call(a);b.resumeLayouts(true)}});Ext.define("Ext.Component",{alias:["widget.component","widget.box"],extend:"Ext.AbstractComponent",requires:["Ext.util.DelayedTask"],uses:["Ext.Layer","Ext.resizer.Resizer","Ext.util.ComponentDragger"],mixins:{floating:"Ext.util.Floating"},statics:{DIRECTION_TOP:"top",DIRECTION_RIGHT:"right",DIRECTION_BOTTOM:"bottom",DIRECTION_LEFT:"left",VERTICAL_DIRECTION_Re:/^(?:top|bottom)$/,INVALID_ID_CHARS_Re:/[\.,\s]/g},resizeHandles:"all",floating:false,toFrontOnShow:true,hideMode:"display",hideParent:false,bubbleEvents:[],actionMode:"el",monPropRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,constructor:function(d){var c=this;d=d||{};if(d.initialConfig){if(d.isAction){c.baseAction=d}d=d.initialConfig}else{if(d.tagName||d.dom||Ext.isString(d)){d={applyTo:d,id:d.id||d}}}c.callParent([d]);if(c.baseAction){c.baseAction.addComponent(c)}},initComponent:function(){var b=this;b.callParent();if(b.listeners){b.on(b.listeners);b.listeners=null}b.enableBubble(b.bubbleEvents);b.mons=[]},afterRender:function(){var b=this;b.callParent();if(!(b.x&&b.y)&&(b.pageX||b.pageY)){b.setPagePosition(b.pageX,b.pageY)}if(b.draggable){b.initDraggable()}},setAutoScroll:function(f){var h=this,e,g;h.autoScroll=!!f;if(h.rendered){g=(e=h.getLayout&&h.getLayout())?e.getRenderTarget():h.getTargetEl();g.setStyle(h.getOverflowStyle())}return h},setOverflowXY:function(g,h){var k=this,l,j,i=arguments.length;if(i){k.overflowX=g||"";if(i>1){k.overflowY=h||""}}if(k.rendered){j=(l=k.getLayout&&k.getLayout())?l.getRenderTarget():k.getTargetEl();j.setStyle(k.getOverflowStyle())}return k},beforeRender:function(){var d=this,f=d.floating,e;if(f){d.addCls(Ext.baseCSSPrefix+"layer");e=f.cls;if(e){d.addCls(e)}}return d.callParent()},afterComponentLayout:function(){this.callParent(arguments);if(this.floating){this.onAfterFloatLayout()}},makeFloating:function(b){this.mixins.floating.constructor.call(this,b)},wrapPrimaryEl:function(b){if(this.floating){this.makeFloating(b)}else{this.callParent(arguments)}},initResizable:function(d){var c=this;d=Ext.apply({target:c,dynamic:false,constrainTo:c.constrainTo||(c.floatParent?c.floatParent.getTargetEl():null),handles:c.resizeHandles},d);d.target=c;c.resizer=new Ext.resizer.Resizer(d)},getDragEl:function(){return this.el},initDraggable:function(){var c=this,d=Ext.applyIf({el:c.getDragEl(),constrainTo:c.constrain?(c.constrainTo||(c.floatParent?c.floatParent.getTargetEl():c.el.getScopeParent())):undefined},c.draggable);if(c.constrain||c.constrainDelegate){d.constrain=c.constrain;d.constrainDelegate=c.constrainDelegate}c.dd=new Ext.util.ComponentDragger(c,d)},scrollBy:function(e,f,h){var g;if((g=this.getTargetEl())&&g.dom){g.scrollBy.apply(g,arguments)}},setLoading:function(h,g){var e=this,f;if(e.rendered){Ext.destroy(e.loadMask);e.loadMask=null;if(h!==false&&!e.collapsed){if(Ext.isObject(h)){f=Ext.apply({},h)}else{if(Ext.isString(h)){f={msg:h}}else{f={}}}if(g){Ext.applyIf(f,{useTargetEl:true})}e.loadMask=new Ext.LoadMask(e,f);e.loadMask.show()}}return e.loadMask},beforeSetPosition:function(){var d=this,f=d.callParent(arguments),e;if(f){e=d.adjustPosition(f.x,f.y);f.x=e.x;f.y=e.y}return f||null},afterSetPosition:function(c,d){this.onPosition(c,d);this.fireEvent("move",this,c,d)},showAt:function(f,g,e){var h=this;if(!h.rendered&&(h.autoRender||h.floating)){h.doAutoRender()}if(h.floating){h.setPosition(f,g,e)}else{h.setPagePosition(f,g,e)}h.show()},setPagePosition:function(h,i,g){var l=this,k,j;if(Ext.isArray(h)){i=h[1];h=h[0]}l.pageX=h;l.pageY=i;if(l.floating){if(l.isContainedFloater()){j=l.floatParent.getTargetEl().getViewRegion();if(Ext.isNumber(h)&&Ext.isNumber(j.left)){h-=j.left}if(Ext.isNumber(i)&&Ext.isNumber(j.top)){i-=j.top}}else{k=l.el.translatePoints(h,i);h=k.left;i=k.top}l.setPosition(h,i,g)}else{k=l.el.translatePoints(h,i);l.setPosition(k.left,k.top,g)}return l},isContainedFloater:function(){return(this.floating&&this.floatParent)},getBox:function(d){var f=d?this.getPosition(d):this.el.getXY(),e=this.getSize();e.x=f[0];e.y=f[1];return e},updateBox:function(b){this.setSize(b.width,b.height);this.setPagePosition(b.x,b.y);return this},getOuterSize:function(){var b=this.el;return{width:b.getWidth()+b.getMargin("lr"),height:b.getHeight()+b.getMargin("tb")}},adjustPosition:function(f,g){var e=this,h;if(e.isContainedFloater()){h=e.floatParent.getTargetEl().getViewRegion();f+=h.left;g+=h.top}return{x:f,y:g}},getPosition:function(h){var l=this,g=l.el,j,k=l.isContainedFloater(),i;if((h===true)||!k){return[g.getLeft(true),g.getTop(true)]}if(l.x!==undefined&&l.y!==undefined){j=[l.x,l.y]}else{j=l.el.getXY();if(k){i=l.floatParent.getTargetEl().getViewRegion();j[0]-=i.left;j[1]-=i.top}}return j},getId:function(){var d=this,c;if(!d.id){c=d.getXType();if(c){c=c.replace(Ext.Component.INVALID_ID_CHARS_Re,"-")}else{c=Ext.name.toLowerCase()+"-comp"}d.id=c+"-"+d.getAutoId()}return d.id},show:function(i,g,f){var j=this,h=j.rendered;if(h&&j.isVisible()){if(j.toFrontOnShow&&j.floating){j.toFront()}}else{if(j.fireEvent("beforeshow",j)!==false){j.hidden=false;if(!h&&(j.autoRender||j.floating)){j.doAutoRender();h=j.rendered}if(h){j.beforeShow();j.onShow.apply(j,arguments);j.afterShow.apply(j,arguments)}}}return j},beforeShow:Ext.emptyFn,onShow:function(){var b=this;b.el.show();b.callParent(arguments);if(b.floating&&b.constrain){b.doConstrain()}},afterShow:function(j,h,l){var k=this,i,n,m;j=j||k.animateTarget;if(!k.ghost){j=null}if(j){j=j.el?j.el:Ext.get(j);n=k.el.getBox();i=j.getBox();k.el.addCls(Ext.baseCSSPrefix+"hide-offsets");m=k.ghost();m.el.stopAnimation();m.el.setX(-10000);m.el.animate({from:i,to:n,listeners:{afteranimate:function(){delete m.componentLayout.lastComponentSize;k.unghost();k.el.removeCls(Ext.baseCSSPrefix+"hide-offsets");k.onShowComplete(h,l)}}})}else{k.onShowComplete(h,l)}},onShowComplete:function(e,d){var f=this;if(f.floating){f.toFront();f.onFloatShow()}Ext.callback(e,d||f);f.fireEvent("show",f);delete f.hiddenByLayout},hide:function(){var b=this;b.showOnParentShow=false;if(!(b.rendered&&!b.isVisible())&&b.fireEvent("beforehide",b)!==false){b.hidden=true;if(b.rendered){b.onHide.apply(b,arguments)}}return b},onHide:function(i,h,k){var j=this,l,g;i=i||j.animateTarget;if(!j.ghost){i=null}if(i){i=i.el?i.el:Ext.get(i);l=j.ghost();l.el.stopAnimation();g=i.getBox();g.width+="px";g.height+="px";l.el.animate({to:g,listeners:{afteranimate:function(){delete l.componentLayout.lastComponentSize;l.el.hide();j.afterHide(h,k)}}})}j.el.hide();if(!i){j.afterHide(h,k)}},afterHide:function(e,d){var f=this;delete f.hiddenByLayout;Ext.AbstractComponent.prototype.onHide.call(this);Ext.callback(e,d||f);f.fireEvent("hide",f)},onDestroy:function(){var b=this;if(b.rendered){Ext.destroy(b.proxy,b.proxyWrap,b.resizer);if(b.actionMode=="container"||b.removeMode=="container"){b.container.remove()}}delete b.focusTask;b.callParent()},deleteMembers:function(){var d=arguments,e=d.length,f=0;for(;f<e;++f){delete this[d[f]]}},focus:function(i,f){var j=this,g,h;if(j.rendered&&!j.isDestroyed&&j.isVisible(true)&&(g=j.getFocusEl())){if(g.isComponent){return g.focus(i,f)}if(f){if(!j.focusTask){j.focusTask=new Ext.util.DelayedTask(j.focus)}j.focusTask.delay(Ext.isNumber(f)?f:10,null,j,[i,false]);return j}if((h=g.dom)){if(g.needsTabIndex()){h.tabIndex=-1}g.focus();if(i===true){h.select()}}if(j.floating){j.toFront(true)}}return j},cancelFocus:function(){var b=this.focusTask;if(b){b.cancel()}},blur:function(){var b;if(this.rendered&&(b=this.getFocusEl())){b.blur()}return this},getEl:function(){return this.el},getResizeEl:function(){return this.el},getPositionEl:function(){return this.el},getActionEl:function(){return this.el},getVisibilityEl:function(){return this.el},onResize:Ext.emptyFn,getBubbleTarget:function(){return this.ownerCt||this.floatParent},getContentTarget:function(){return this.el},cloneConfig:function(h){h=h||{};var g=h.id||Ext.id(),f=Ext.applyIf(h,this.initialConfig),e;f.id=g;e=Ext.getClass(this);return new e(f)},getXType:function(){return this.self.xtype},findParentBy:function(d){var c;for(c=this.getBubbleTarget();c&&!d(c,this);c=c.getBubbleTarget()){}return c||null},findParentByType:function(b){return Ext.isFunction(b)?this.findParentBy(function(a){return a.constructor===b}):this.up(b)},bubble:function(h,e,f){var g=this;while(g){if(h.apply(e||g,f||[g])===false){break}g=g.getBubbleTarget()}return this},getProxy:function(){var d=this,c;if(!d.proxy){c=Ext.getBody();if(Ext.scopeResetCSS){d.proxyWrap=c=Ext.getBody().createChild({cls:Ext.resetCls})}d.proxy=d.el.createProxy(Ext.baseCSSPrefix+"proxy-el",c,true)}return d.proxy}});Ext.define("Ext.toolbar.Spacer",{extend:"Ext.Component",alias:"widget.tbspacer",alternateClassName:"Ext.Toolbar.Spacer",baseCls:Ext.baseCSSPrefix+"toolbar-spacer",focusable:false});Ext.define("Ext.form.field.Base",{extend:"Ext.Component",mixins:{labelable:"Ext.form.Labelable",field:"Ext.form.field.Field"},alias:"widget.field",alternateClassName:["Ext.form.Field","Ext.form.BaseField"],requires:["Ext.util.DelayedTask","Ext.XTemplate","Ext.layout.component.field.Field"],fieldSubTpl:['<input id="{id}" type="{type}" {inputAttrTpl}',' size="1"','<tpl if="name"> name="{name}"</tpl>','<tpl if="value"> value="{[Ext.util.Format.htmlEncode(values.value)]}"</tpl>','<tpl if="placeholder"> placeholder="{placeholder}"</tpl>','<tpl if="maxLength !== undefined"> maxlength="{maxLength}"</tpl>','<tpl if="readOnly"> readonly="readonly"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' class="{fieldCls} {typeCls} {editableCls}" autocomplete="off"/>',{disableFormats:true}],subTplInsertions:["inputAttrTpl"],inputType:"text",invalidText:"The value in this field is invalid",fieldCls:Ext.baseCSSPrefix+"form-field",focusCls:"form-focus",dirtyCls:Ext.baseCSSPrefix+"form-dirty",checkChangeEvents:Ext.isIE&&(!document.documentMode||document.documentMode<9)?["change","propertychange"]:["change","input","textInput","keyup","dragdrop"],checkChangeBuffer:50,componentLayout:"field",readOnly:false,readOnlyCls:Ext.baseCSSPrefix+"form-readonly",validateOnBlur:true,hasFocus:false,baseCls:Ext.baseCSSPrefix+"field",maskOnDisable:false,initComponent:function(){var b=this;b.callParent();b.subTplData=b.subTplData||{};b.addEvents("specialkey","writeablechange");b.initLabelable();b.initField();if(!b.name){b.name=b.getInputId()}},beforeRender:function(){var d=this,c=this.readOnly;d.callParent(arguments);if(c){d.addCls(d.readOnlyCls)}},getInputId:function(){return this.inputId||(this.inputId=this.id+"-inputEl")},getSubTplData:function(){var h=this,e=h.inputType,f=h.getInputId(),g;g=Ext.apply({id:f,cmpId:h.id,name:h.name||f,disabled:h.disabled,readOnly:h.readOnly,value:h.getRawValue(),type:e,fieldCls:h.fieldCls,fieldStyle:h.getFieldStyle(),tabIdx:h.tabIndex,typeCls:Ext.baseCSSPrefix+"form-"+(e==="password"?"text":e)},h.subTplData);h.getInsertionRenderData(g,h.subTplInsertions);return g},afterFirstLayout:function(){this.callParent();var b=this.inputEl;if(b){b.selectable()}},applyRenderSelectors:function(){var b=this;b.callParent();b.inputEl=b.el.getById(b.getInputId())},getSubTplMarkup:function(){return this.getTpl("fieldSubTpl").apply(this.getSubTplData())},initRenderTpl:function(){var b=this;if(!b.hasOwnProperty("renderTpl")){b.renderTpl=b.getTpl("labelableRenderTpl")}return b.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},setFieldStyle:function(e){var d=this,f=d.inputEl;if(f){f.applyStyles(e)}d.fieldStyle=e},getFieldStyle:function(){return"width:100%;"+(Ext.isObject(this.fieldStyle)?Ext.DomHelper.generateStyles(this.fieldStyle):this.fieldStyle||"")},onRender:function(){var b=this;b.callParent(arguments);b.onLabelableRender();b.renderActiveError()},getFocusEl:function(){return this.inputEl},isFileUpload:function(){return this.inputType==="file"},extractFileInput:function(){var d=this,e=d.isFileUpload()?d.inputEl.dom:null,f;if(e){f=e.cloneNode(true);e.parentNode.replaceChild(f,e);d.inputEl=Ext.get(f)}return e},getSubmitData:function(){var e=this,d=null,f;if(!e.disabled&&e.submitValue&&!e.isFileUpload()){f=e.getSubmitValue();if(f!==null){d={};d[e.getName()]=f}}return d},getSubmitValue:function(){return this.processRawValue(this.getRawValue())},getRawValue:function(){var c=this,d=(c.inputEl?c.inputEl.getValue():Ext.value(c.rawValue,""));c.rawValue=d;return d},setRawValue:function(c){var d=this;c=Ext.value(c,"");d.rawValue=c;if(d.inputEl){d.inputEl.dom.value=c}return c},valueToRaw:function(b){return""+Ext.value(b,"")},rawToValue:function(b){return b},processRawValue:function(b){return b},getValue:function(){var d=this,c=d.rawToValue(d.processRawValue(d.getRawValue()));d.value=c;return c},setValue:function(c){var d=this;d.setRawValue(d.valueToRaw(c));return d.mixins.field.setValue.call(d,c)},onBoxReady:function(){var b=this;b.callParent();if(b.setReadOnlyOnBoxReady){b.setReadOnly(b.readOnly)}},onDisable:function(){var d=this,c=d.inputEl;d.callParent();if(c){c.dom.disabled=true;if(d.hasActiveError()){d.clearInvalid();d.needsValidateOnEnable=true}}},onEnable:function(){var d=this,c=d.inputEl;d.callParent();if(c){c.dom.disabled=false;if(d.needsValidateOnEnable){delete d.needsValidateOnEnable;d.forceValidation=true;d.isValid();delete d.forceValidation}}},setReadOnly:function(f){var e=this,d=e.inputEl;f=!!f;e[f?"addCls":"removeCls"](e.readOnlyCls);e.readOnly=f;if(d){d.dom.readOnly=f}else{if(e.rendering){e.setReadOnlyOnBoxReady=true}}e.fireEvent("writeablechange",e,f)},fireKey:function(b){if(b.isSpecialKey()){this.fireEvent("specialkey",this,new Ext.EventObjectImpl(b))}},initEvents:function(){var n=this,l=n.inputEl,e,k,p=n.checkChangeEvents,m,j=p.length,o;if(n.inEditor){n.onBlur=Ext.Function.createBuffered(n.onBlur,10)}if(l){n.mon(l,Ext.EventManager.getKeyEvent(),n.fireKey,n);e=new Ext.util.DelayedTask(n.checkChange,n);n.onChangeEvent=k=function(){e.delay(n.checkChangeBuffer)};for(m=0;m<j;m++){o=p[m];if(o==="propertychange"){n.usesPropertychange=true}n.mon(l,o,k)}}n.callParent()},doComponentLayout:function(){var j=this,i=j.inputEl,g=j.usesPropertychange,f="propertychange",h=j.onChangeEvent;if(g){j.mun(i,f,h)}j.callParent(arguments);if(g){j.mon(i,f,h)}},onDirtyChange:function(b){this[b?"addCls":"removeCls"](this.dirtyCls)},isValid:function(){var d=this,e=d.disabled,f=d.forceValidation||!e;return f?d.validateValue(d.processRawValue(d.getRawValue())):e},validateValue:function(e){var f=this,g=f.getErrors(e),h=Ext.isEmpty(g);if(!f.preventMark){if(h){f.clearInvalid()}else{f.markInvalid(g)}}return h},markInvalid:function(f){var d=this,e=d.getActiveError();d.setActiveErrors(Ext.Array.from(f));if(e!==d.getActiveError()){d.updateLayout()}},clearInvalid:function(){var c=this,d=c.hasActiveError();c.unsetActiveError();if(d){c.updateLayout()}},renderActiveError:function(){var c=this,d=c.hasActiveError();if(c.inputEl){c.inputEl[d?"addCls":"removeCls"](c.invalidCls+"-field")}c.mixins.labelable.renderActiveError.call(c)},getActionEl:function(){return this.inputEl||this.el}});Ext.define("Ext.form.field.Text",{extend:"Ext.form.field.Base",alias:"widget.textfield",requires:["Ext.form.field.VTypes","Ext.layout.component.field.Text"],alternateClassName:["Ext.form.TextField","Ext.form.Text"],size:20,growMin:30,growMax:800,growAppend:"W",allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",blankText:"This field is required",regexText:"",emptyCls:Ext.baseCSSPrefix+"form-empty-field",componentLayout:"textfield",initComponent:function(){var b=this;b.callParent();b.addEvents("autosize","keydown","keyup","keypress");b.addStateEvents("change");b.setGrowSizePolicy()},setGrowSizePolicy:function(){if(this.grow){this.shrinkWrap|=1}},initEvents:function(){var c=this,d=c.inputEl;c.callParent();if(c.selectOnFocus||c.emptyText){c.mon(d,"mousedown",c.onMouseDown,c)}if(c.maskRe||(c.vtype&&c.disableKeyFilter!==true&&(c.maskRe=Ext.form.field.VTypes[c.vtype+"Mask"]))){c.mon(d,"keypress",c.filterKeys,c)}if(c.enableKeyEvents){c.mon(d,{scope:c,keyup:c.onKeyUp,keydown:c.onKeyDown,keypress:c.onKeyPress})}},isEqual:function(c,d){return this.isEqualAsString(c,d)},onChange:function(){this.callParent();this.autoSize()},getSubTplData:function(){var f=this,e=f.getRawValue(),g=f.emptyText&&e.length<1,h;if(g){if(Ext.supports.Placeholder){h=f.emptyText}else{e=f.emptyText}}return Ext.apply(f.callParent(),{maxLength:f.enforceMaxLength?f.maxLength:undefined,readOnly:f.readOnly,placeholder:h,value:e,fieldCls:f.fieldCls+((g&&(h||e))?" "+f.emptyCls:"")})},afterRender:function(){this.autoSize();this.callParent()},onMouseDown:function(c){var d=this;if(!d.hasFocus){d.mon(d.inputEl,"mouseup",Ext.emptyFn,d,{single:true,preventDefault:true})}},processRawValue:function(e){var f=this,g=f.stripCharsRe,h;if(g){h=e.replace(g,"");if(h!==e){f.setRawValue(h);e=h}}return e},onDisable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable="on"}},onEnable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable=""}},onKeyDown:function(b){this.fireEvent("keydown",this,b)},onKeyUp:function(b){this.fireEvent("keyup",this,b)},onKeyPress:function(b){this.fireEvent("keypress",this,b)},reset:function(){this.callParent();this.applyEmptyText()},applyEmptyText:function(){var d=this,e=d.emptyText,f;if(d.rendered&&e){f=d.getRawValue().length<1&&!d.hasFocus;if(Ext.supports.Placeholder){d.inputEl.dom.placeholder=e}else{if(f){d.setRawValue(e)}}if(f){d.inputEl.addCls(d.emptyCls)}d.autoSize()}},afterFirstLayout:function(){this.callParent();if(Ext.isIE&&this.disabled){var b=this.inputEl;if(b){b.dom.unselectable="on"}}},preFocus:function(){var e=this,h=e.inputEl,f=e.emptyText,g;e.callParent(arguments);if(f&&!Ext.supports.Placeholder&&h.dom.value===f){e.setRawValue("");g=true;h.removeCls(e.emptyCls)}else{if(Ext.supports.Placeholder){e.inputEl.removeCls(e.emptyCls)}}if(e.selectOnFocus||g){h.dom.select()}},onFocus:function(){var b=this;b.callParent(arguments);if(b.emptyText){b.autoSize()}},postBlur:function(){this.callParent(arguments);this.applyEmptyText()},filterKeys:function(f){if(f.ctrlKey&&!f.altKey){return}var d=f.getKey(),e=String.fromCharCode(f.getCharCode());if(Ext.isGecko&&(f.isNavKeyPress()||d===f.BACKSPACE||(d===f.DELETE&&f.button===-1))){return}if(!Ext.isGecko&&f.isSpecialKey()&&!e){return}if(!this.maskRe.test(e)){f.stopEvent()}},getState:function(){return this.addPropertyToState(this.callParent(),"value")},applyState:function(b){this.callParent(arguments);if(b.hasOwnProperty("value")){this.setValue(b.value)}},getRawValue:function(){var c=this,d=c.callParent();if(d===c.emptyText){d=""}return d},setValue:function(d){var e=this,f=e.inputEl;if(f&&e.emptyText&&!Ext.isEmpty(d)){f.removeCls(e.emptyCls)}e.callParent(arguments);e.applyEmptyText();return e},getErrors:function(l){var q=this,m=q.callParent(arguments),v=q.validator,s=q.emptyText,t=q.allowBlank,r=q.vtype,p=Ext.form.field.VTypes,o=q.regex,n=Ext.String.format,u;l=l||q.processRawValue(q.getRawValue());if(Ext.isFunction(v)){u=v.call(q,l);if(u!==true){m.push(u)}}if(l.length<1||l===s){if(!t){m.push(q.blankText)}return m}if(l.length<q.minLength){m.push(n(q.minLengthText,q.minLength))}if(l.length>q.maxLength){m.push(n(q.maxLengthText,q.maxLength))}if(r){if(!p[r](l,q)){m.push(q.vtypeText||p[r+"Text"])}}if(o&&!o.test(l)){m.push(q.regexText||q.invalidText)}return m},selectText:function(k,j){var l=this,p=l.getRawValue(),o=true,m=l.inputEl.dom,n,i;if(p.length>0){k=k===n?0:k;j=j===n?p.length:j;if(m.setSelectionRange){m.setSelectionRange(k,j)}else{if(m.createTextRange){i=m.createTextRange();i.moveStart("character",k);i.moveEnd("character",j-p.length);i.select()}}o=Ext.isGecko||Ext.isOpera}if(o){l.focus()}},autoSize:function(){var b=this;if(b.grow&&b.rendered){b.autoSizing=true;b.updateLayout()}},afterComponentLayout:function(){var c=this,d;c.callParent();if(c.autoSizing){d=c.inputEl.getWidth();if(d!==c.lastInputWidth){c.fireEvent("autosize",c,d);c.lastInputWidth=d;delete c.autoSizing}}}});Ext.define("Ext.form.field.Trigger",{extend:"Ext.form.field.Text",alias:["widget.triggerfield","widget.trigger"],requires:["Ext.DomHelper","Ext.util.ClickRepeater","Ext.layout.component.field.Trigger"],alternateClassName:["Ext.form.TriggerField","Ext.form.TwinTriggerField","Ext.form.Trigger"],childEls:[{name:"triggerCell",select:"."+Ext.baseCSSPrefix+"trigger-cell"},{name:"triggerEl",select:"."+Ext.baseCSSPrefix+"form-trigger"},"triggerWrap","inputCell"],triggerBaseCls:Ext.baseCSSPrefix+"form-trigger",triggerWrapCls:Ext.baseCSSPrefix+"form-trigger-wrap",hideTrigger:false,editable:true,readOnly:false,repeatTriggerClick:false,autoSize:Ext.emptyFn,monitorTab:true,mimicing:false,triggerIndexRe:/trigger-index-(\d+)/,componentLayout:"triggerfield",initComponent:function(){var d=this,c;if(!d.triggerWidth){Ext.form.field.Trigger.prototype.triggerWidth=(c=Ext.getBody().createChild({style:"position:absolute",cls:Ext.baseCSSPrefix+"form-trigger"})).getWidth();c.remove()}d.wrapFocusCls=d.triggerWrapCls+"-focus";d.callParent(arguments)},getSubTplMarkup:function(){var d=this,c=d.callParent(arguments);return'<table id="'+d.id+'-triggerWrap" class="'+Ext.baseCSSPrefix+'form-trigger-wrap" cellpadding="0" cellspacing="0"><tbody><tr><td id="'+d.id+'-inputCell" class="'+Ext.baseCSSPrefix+'form-trigger-input-cell">'+c+"</td>"+d.getTriggerMarkup()+"</tr></tbody></table>"},getSubTplData:function(){var e=this,h=e.callParent(),g=e.readOnly===true,f=e.editable!==false;return Ext.apply(h,{editableCls:(g||!f)?" "+Ext.baseCSSPrefix+"trigger-noedit":"",readOnly:!f||g})},getLabelableRenderData:function(){var d=this,f=d.triggerWrapCls,e=d.callParent(arguments);return Ext.applyIf(e,{triggerWrapCls:f,triggerMarkup:d.getTriggerMarkup()})},getTriggerMarkup:function(){var l=this,g=0,k=(l.readOnly||l.hideTrigger),i,j=l.triggerBaseCls,h=[];if(!l.trigger1Cls){l.trigger1Cls=l.triggerCls}for(g=0;(i=l["trigger"+(g+1)+"Cls"])||g<1;g++){h.push({tag:"td",valign:"top",cls:Ext.baseCSSPrefix+"trigger-cell",style:"width:"+l.triggerWidth+(k?"px;display:none":"px"),cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+g,j,i].join(" "),role:"button"}})}h[g-1].cn.cls+=" "+j+"-last";return Ext.DomHelper.markup(h)},disableCheck:function(){return !this.disabled},beforeRender:function(){var d=this,c=d.triggerBaseCls;d.callParent();if(c!=Ext.baseCSSPrefix+"form-trigger"){d.addChildEls({name:"triggerEl",select:"."+c})}d.lastTriggerStateFlags=d.getTriggerStateFlags()},onRender:function(){var b=this;b.callParent(arguments);b.doc=Ext.getDoc();b.initTrigger();b.triggerEl.unselectable()},getTriggerWidth:function(){var c=this,d=0;if(c.triggerWrap&&!c.hideTrigger&&!c.readOnly){d=c.triggerEl.getCount()*c.triggerWidth}return d},setHideTrigger:function(b){if(b!=this.hideTrigger){this.hideTrigger=b;this.updateLayout()}},setEditable:function(b){if(b!=this.editable){this.editable=b;this.updateLayout()}},setReadOnly:function(b){if(b!=this.readOnly){this.readOnly=b;this.updateLayout()}},initTrigger:function(){var m=this,l=m.triggerWrap,e=m.triggerEl,r=m.disableCheck,o,p,q,n,k;if(m.repeatTriggerClick){m.triggerRepeater=new Ext.util.ClickRepeater(l,{preventDefault:true,handler:m.onTriggerWrapClick,listeners:{mouseup:m.onTriggerWrapMousup,scope:m},scope:m})}else{m.mon(l,{click:m.onTriggerWrapClick,mouseup:m.onTriggerWrapMousup,scope:m})}e.setVisibilityMode(Ext.Element.DISPLAY);e.addClsOnOver(m.triggerBaseCls+"-over",r,m);o=e.elements;p=o.length;for(n=0;n<p;n++){q=o[n];k=n+1;q.addClsOnOver(m["trigger"+(k)+"Cls"]+"-over",r,m);q.addClsOnClick(m["trigger"+(k)+"Cls"]+"-click",r,m)}e.addClsOnClick(m.triggerBaseCls+"-click",r,m)},onDestroy:function(){var b=this;Ext.destroyMembers(b,"triggerRepeater","triggerWrap","triggerEl");delete b.doc;b.callParent()},onFocus:function(){var b=this;b.callParent(arguments);if(!b.mimicing){b.bodyEl.addCls(b.wrapFocusCls);b.mimicing=true;b.mon(b.doc,"mousedown",b.mimicBlur,b,{delay:10});if(b.monitorTab){b.on("specialkey",b.checkTab,b)}}},checkTab:function(d,c){if(!this.ignoreMonitorTab&&c.getKey()==c.TAB){this.triggerBlur()}},getTriggerStateFlags:function(){var d=this,c=0;if(d.readOnly){c+=1}if(d.editable){c+=2}if(d.hideTrigger){c+=4}return c},onBlur:Ext.emptyFn,mimicBlur:function(b){if(!this.isDestroyed&&!this.bodyEl.contains(b.target)&&this.validateBlur(b)){this.triggerBlur(b)}},triggerBlur:function(c){var d=this;d.mimicing=false;d.mun(d.doc,"mousedown",d.mimicBlur,d);if(d.monitorTab&&d.inputEl){d.un("specialkey",d.checkTab,d)}Ext.form.field.Trigger.superclass.onBlur.call(d,c);if(d.bodyEl){d.bodyEl.removeCls(d.wrapFocusCls)}},validateBlur:function(b){return true},onTriggerWrapClick:function(){var i=this,h,f,g,j;j=arguments[i.triggerRepeater?1:0];if(j&&!i.readOnly&&!i.disabled){h=j.getTarget("."+i.triggerBaseCls,null);f=h&&h.className.match(i.triggerIndexRe);if(f){g=i["onTrigger"+(parseInt(f[1],10)+1)+"Click"]||i.onTriggerClick;if(g){g.call(i,j)}}}},onTriggerWrapMousup:Ext.emptyFn,onTriggerClick:Ext.emptyFn});Ext.define("Ext.resizer.Splitter",{extend:"Ext.Component",requires:["Ext.XTemplate"],uses:["Ext.resizer.SplitterTracker"],alias:"widget.splitter",childEls:["collapseEl"],renderTpl:['<tpl if="collapsible===true">','<div id="{id}-collapseEl" class="',Ext.baseCSSPrefix,"collapse-el ",Ext.baseCSSPrefix,'layout-split-{collapseDir}"> </div>',"</tpl>"],baseCls:Ext.baseCSSPrefix+"splitter",collapsedClsInternal:Ext.baseCSSPrefix+"splitter-collapsed",collapsible:false,collapseOnDblClick:true,defaultSplitMin:40,defaultSplitMax:1000,width:5,height:5,collapseTarget:"next",horizontal:false,vertical:false,getTrackerConfig:function(){return{xclass:"Ext.resizer.SplitterTracker",el:this.el,splitter:this}},beforeRender:function(){var e=this,d=e.getCollapseTarget(),f=e.getCollapseDirection();e.callParent();if(d.collapsed){e.addCls(e.collapsedClsInternal)}e.addCls(e.baseCls+"-"+e.orientation);Ext.applyIf(e.renderData,{collapseDir:f,collapsible:e.collapsible||d.collapsible})},onRender:function(){var b=this;b.callParent(arguments);if(b.performCollapse!==false){if(b.renderData.collapsible){b.mon(b.collapseEl,"click",b.toggleTargetCmp,b)}if(b.collapseOnDblClick){b.mon(b.el,"dblclick",b.toggleTargetCmp,b)}}b.mon(b.getCollapseTarget(),{collapse:b.onTargetCollapse,expand:b.onTargetExpand,scope:b});b.el.unselectable();b.tracker=Ext.create(b.getTrackerConfig());b.relayEvents(b.tracker,["beforedragstart","dragstart","dragend"])},getCollapseDirection:function(){var i=this,l=i.collapseDirection,j,h,g,k;if(!l){j=i.collapseTarget;if(j.isComponent){l=j.collapseDirection}if(!l){k=i.ownerCt.layout.type;if(j.isComponent){g=i.ownerCt.items;h=Number(g.indexOf(j)==g.indexOf(i)-1)<<1|Number(k=="hbox")}else{h=Number(i.collapseTarget=="prev")<<1|Number(k=="hbox")}l=["bottom","right","top","left"][h]}i.collapseDirection=l}i.orientation=(l=="top"||l=="bottom")?"horizontal":"vertical";i[i.orientation]=true;return l},getCollapseTarget:function(){var b=this;return b.collapseTarget.isComponent?b.collapseTarget:b.collapseTarget=="prev"?b.previousSibling():b.nextSibling()},onTargetCollapse:function(b){this.el.addCls([this.collapsedClsInternal,this.collapsedCls])},onTargetExpand:function(b){this.el.removeCls([this.collapsedClsInternal,this.collapsedCls])},toggleTargetCmp:function(i,e){var j=this.getCollapseTarget(),h=j.placeholder,g;if(h&&!h.hidden){g=true}else{g=!j.hidden}if(g){if(j.collapsed){j.expand()}else{if(j.collapseDirection){j.collapse()}else{j.collapse(this.renderData.collapseDir)}}}},setSize:function(){var b=this;b.callParent(arguments);if(Ext.isIE&&b.el){b.el.repaint()}}});Ext.define("Ext.resizer.BorderSplitter",{extend:"Ext.resizer.Splitter",uses:["Ext.resizer.BorderSplitterTracker"],alias:"widget.bordersplitter",collapseTarget:null,getTrackerConfig:function(){var b=this.callParent();b.xclass="Ext.resizer.BorderSplitterTracker";return b}});Ext.define("Ext.layout.container.Border",{alias:"layout.border",extend:"Ext.layout.container.Container",requires:["Ext.resizer.BorderSplitter","Ext.Component","Ext.fx.Anim"],alternateClassName:"Ext.layout.BorderLayout",targetCls:Ext.baseCSSPrefix+"border-layout-ct",itemCls:[Ext.baseCSSPrefix+"border-item",Ext.baseCSSPrefix+"box-item"],type:"border",padding:undefined,percentageRe:/(\d+)%/,axisProps:{horz:{borderBegin:"west",borderEnd:"east",horizontal:true,posProp:"x",sizeProp:"width",sizePropCap:"Width"},vert:{borderBegin:"north",borderEnd:"south",horizontal:false,posProp:"y",sizeProp:"height",sizePropCap:"Height"}},centerRegion:null,collapseDirections:{north:"top",south:"bottom",east:"right",west:"left"},manageMargins:true,panelCollapseAnimate:true,panelCollapseMode:"placeholder",regionWeights:{north:20,south:10,center:0,west:-10,east:-20},beginAxis:function(F,O,i){var x=this,N=x.axisProps[i],A=!N.horizontal,G=N.sizeProp,C=0,P=F.childItems,K=P.length,y,B,D,J,z,L,H,E,M,w,I;for(B=0;B<K;++B){D=P[B];z=D.target;D.layoutPos={};if(z.region){D.region=L=z.region;D.isCenter=z.isCenter;D.isHorz=z.isHorz;D.isVert=z.isVert;D.weight=z.weight||x.regionWeights[L]||0;O[z.id]=D;if(z.isCenter){y=D;J=z.flex;F.centerRegion=y;continue}if(A!==D.isVert){continue}D.reverseWeighting=(L==N.borderEnd);E=z[G];M=typeof E;if(!z.collapsed){if(M=="string"&&(H=x.percentageRe.exec(E))){D.percentage=parseInt(H[1],10)}else{if(z.flex){C+=D.flex=z.flex}}}}}if(y){w=y.target;if(I=w.placeholderFor){if(!J&&A===I.collapsedVertical()){J=0;y.collapseAxis=i}}else{if(w.collapsed&&(A===w.collapsedVertical())){J=0;y.collapseAxis=i}}}if(J==null){J=1}C+=J;return Ext.apply({before:A?"top":"left",totalFlex:C},N)},beginLayout:function(v){var q=this,r=q.getLayoutItems(),u=q.padding,p=typeof u,n=false,i,o,w,s,t,x;if(u){if(p=="string"||p=="number"){u=Ext.util.Format.parseBox(u)}}else{u=v.getEl("getTargetEl").getPaddingInfo();n=true}v.outerPad=u;v.padOnContainer=n;for(s=0,w=r.length;s<w;++s){o=r[s];x=q.getSplitterTarget(o);if(x&&o.hidden!==x.hidden){if(o.hidden){o.show()}else{o.hide()}}}q.callParent(arguments);r=v.childItems;w=r.length;t={};v.borderAxisHorz=q.beginAxis(v,t,"horz");v.borderAxisVert=q.beginAxis(v,t,"vert");for(s=0;s<w;++s){i=r[s];x=q.getSplitterTarget(i.target);if(x){i.collapseTarget=x=t[x.id];i.weight=x.weight;i.reverseWeighting=x.reverseWeighting;x.splitter=i;i.isHorz=x.isHorz;i.isVert=x.isVert}}q.sortWeightedItems(r,"reverseWeighting");q.setupSplitterNeighbors(r)},calculate:function(A){var t=this,D=t.getContainerSize(A),w=A.childItems,B=w.length,C=A.borderAxisHorz,v=A.borderAxisVert,z=A.outerPad,r=A.padOnContainer,x,i,u,q,s,y;C.begin=z.left;v.begin=z.top;s=C.end=C.flexSpace=D.width+(r?z.left:-z.right);y=v.end=v.flexSpace=D.height+(r?z.top:-z.bottom);for(x=0;x<B;++x){i=w[x];u=i.getMarginInfo();if(i.isHorz||i.isCenter){C.addUnflexed(u.width);s-=u.width}if(i.isVert||i.isCenter){v.addUnflexed(u.height);y-=u.height}if(!i.flex&&!i.percentage){if(i.isHorz||(i.isCenter&&i.collapseAxis==="horz")){q=i.getProp("width");C.addUnflexed(q);if(i.collapseTarget){s-=q}}else{if(i.isVert||(i.isCenter&&i.collapseAxis==="vert")){q=i.getProp("height");v.addUnflexed(q);if(i.collapseTarget){y-=q}}}}}for(x=0;x<B;++x){i=w[x];u=i.getMarginInfo();if(i.percentage){if(i.isHorz){q=Math.ceil(s*i.percentage/100);q=i.setWidth(q);C.addUnflexed(q)}else{if(i.isVert){q=Math.ceil(y*i.percentage/100);q=i.setHeight(q);v.addUnflexed(q)}}}}for(x=0;x<B;++x){i=w[x];if(!i.isCenter){t.calculateChildAxis(i,C);t.calculateChildAxis(i,v)}}if(t.finishAxis(A,v)+t.finishAxis(A,C)<2){t.done=false}else{t.finishPositions(w)}},calculateChildAxis:function(l,t){var v=l.collapseTarget,p="set"+t.sizePropCap,r=t.sizeProp,s=l.getMarginInfo()[r],n,u,q,o,m;if(v){n=v.region}else{n=l.region;q=l.flex}u=n==t.borderBegin;if(!u&&n!=t.borderEnd){l[p](t.end-t.begin-s);o=t.begin}else{if(q){m=Math.ceil(t.flexSpace*(q/t.totalFlex));m=l[p](m)}else{if(l.percentage){m=l.peek(r)}else{m=l.getProp(r)}}m+=s;if(u){o=t.begin;t.begin+=m}else{t.end=o=t.end-m}}l.layoutPos[t.posProp]=o},finishAxis:function(g,h){var e=h.end-h.begin,f=g.centerRegion;if(f){f["set"+h.sizePropCap](e-f.getMarginInfo()[h.sizeProp]);f.layoutPos[h.posProp]=h.begin}return Ext.isNumber(e)?1:0},finishPositions:function(g){var h=g.length,e,f;for(e=0;e<h;++e){f=g[e];f.setProp("x",f.layoutPos.x+f.marginInfo.left);f.setProp("y",f.layoutPos.y+f.marginInfo.top)}},getPlaceholder:function(b){return b.getPlaceholder&&b.getPlaceholder()},getSplitterTarget:function(c){var d=c.collapseTarget;if(d&&d.collapsed){return d.placeholder||d}return d},isItemBoxParent:function(b){return true},isItemShrinkWrap:function(b){return true},insertSplitter:function(j,f){var h=j.region,i={xtype:"bordersplitter",collapseTarget:j,id:j.id+"-splitter",hidden:!!j.hidden},g=f+((h=="south"||h=="east")?0:1);if(j.isHorz){i.height=null}else{i.width=null}if(j.collapseMode=="mini"){i.collapsedCls=j.collapsedCls}j.splitter=this.owner.add(g,i)},onAdd:function(j,g){var f=this,h=j.placeholderFor,i=j.region;f.callParent(arguments);if(i){Ext.apply(j,f.regionFlags[i]);if(i=="center"){if(f.centerRegion){Ext.Error.raise("Cannot have multiple center regions in a BorderLayout.")}f.centerRegion=j}else{j.collapseDirection=this.collapseDirections[i];if(j.split&&(j.isHorz||j.isVert)){f.insertSplitter(j,g)}}if(!j.hasOwnProperty("collapseMode")){j.collapseMode=f.panelCollapseMode}if(!j.hasOwnProperty("animCollapse")){if(j.collapseMode!="placeholder"){j.animCollapse=false}else{j.animCollapse=f.panelCollapseAnimate}}}else{if(h){Ext.apply(j,f.regionFlags[h.region]);j.region=h.region;j.weight=h.weight}}},onDestroy:function(){this.centerRegion=null;this.callParent()},onRemove:function(e){var f=this,g=e.region,h=e.splitter;if(g){if(e.isCenter){f.centerRegion=null}delete e.isCenter;delete e.isHorz;delete e.isVert;if(h){f.owner.doRemove(h,true);delete e.splitter}}f.callParent(arguments)},regionFlags:{center:{isCenter:true,isHorz:false,isVert:false},north:{isCenter:false,isHorz:false,isVert:true},south:{isCenter:false,isHorz:false,isVert:true},west:{isCenter:false,isHorz:true,isVert:false},east:{isCenter:false,isHorz:true,isVert:false}},setupSplitterNeighbors:function(q){var i={},v=q.length,j=this.touchedRegions,t,u,z,r,w,s,p,y,x;for(t=0;t<v;++t){s=q[t].target;p=s.region;if(s.isCenter){z=s}else{if(p){x=j[p];for(u=0,r=x.length;u<r;++u){w=i[x[u]];if(w){w.neighbors.push(s)}}if(s.placeholderFor){y=s.placeholderFor.splitter}else{y=s.splitter}if(y){y.neighbors=[]}i[p]=y}}}if(z){x=j.center;for(u=0,r=x.length;u<r;++u){w=i[x[u]];if(w){w.neighbors.push(z)}}}},touchedRegions:{center:["north","south","east","west"],north:["north","east","west"],south:["south","east","west"],east:["east","north","south"],west:["west","north","south"]},sizePolicies:{vert:{setsWidth:1,setsHeight:0},horz:{setsWidth:0,setsHeight:1},flexAll:{setsWidth:1,setsHeight:1}},getItemSizePolicy:function(l){var m=this,i=this.sizePolicies,n,h,k,j;if(l.isCenter){j=l.placeholderFor;if(j){if(j.collapsedVertical()){return i.vert}return i.horz}if(l.collapsed){if(l.collapsedVertical()){return i.vert}return i.horz}return i.flexAll}n=l.collapseTarget;if(n){return n.isVert?i.vert:i.horz}if(l.region){if(l.isVert){h=l.height;k=i.vert}else{h=l.width;k=i.horz}if(l.flex||(typeof h=="string"&&m.percentageRe.test(h))){return i.flexAll}return k}return m.autoSizePolicy}},function(){var d={addUnflexed:function(a){this.flexSpace=Math.max(this.flexSpace-a,0)}},c=this.prototype.axisProps;Ext.apply(c.horz,d);Ext.apply(c.vert,d)});Ext.define("Ext.app.EventBus",{requires:["Ext.util.Event","Ext.Component"],mixins:{observable:"Ext.util.Observable"},constructor:function(){this.mixins.observable.constructor.call(this);this.bus={};var b=this;Ext.override(Ext.Component,{fireEvent:function(a){if(Ext.util.Observable.prototype.fireEvent.apply(this,arguments)!==false){return b.dispatch.call(b,a,this,arguments)}return false}})},dispatch:function(o,s,p){var r=this.bus,n=r[o],u,v,w,i,x,t,q;if(n){for(u in n){if(n.hasOwnProperty(u)&&s.is(u)){v=n[u];for(w in v){if(v.hasOwnProperty(w)){i=v[w];for(t=0,q=i.length;t<q;t++){x=i[t];if(x.fire.apply(x,Array.prototype.slice.call(p,1))===false){return false}}}}}}}return true},control:function(r,t,x){var v=this.bus,u,o,w,y,p,z,q,B,A,s;if(Ext.isString(r)){y=r;r={};r[y]=t;this.control(r,null,x);return}u=Ext.util.Observable.HasListeners.prototype;for(y in r){if(r.hasOwnProperty(y)){A=r[y]||{};for(s in A){if(A.hasOwnProperty(s)){p={};z=A[s];q=x;B=new Ext.util.Event(x,s);if(Ext.isObject(z)){p=z;z=p.fn;q=p.scope||x;delete p.fn;delete p.scope}B.addListener(z,q,p);u[s]=1;o=v[s]||(v[s]={});o=o[y]||(o[y]={});w=o[x.id]||(o[x.id]=[]);w.push(B)}}}}}});Ext.define("Ext.container.AbstractContainer",{extend:"Ext.Component",requires:["Ext.util.MixedCollection","Ext.layout.container.Auto","Ext.ZIndexManager"],renderTpl:"{%this.renderContainer(out,values)%}",suspendLayout:false,autoDestroy:true,defaultType:"panel",detachOnRemove:true,isContainer:true,layoutCounter:0,baseCls:Ext.baseCSSPrefix+"container",bubbleEvents:["add","remove"],initComponent:function(){var b=this;b.addEvents("afterlayout","beforeadd","beforeremove","add","remove");b.callParent();b.getLayout();b.initItems()},initItems:function(){var c=this,d=c.items;c.items=new Ext.util.AbstractMixedCollection(false,c.getComponentId);if(d){if(!Ext.isArray(d)){d=[d]}c.add(d)}},getFocusEl:function(){return this.getTargetEl()},finishRenderChildren:function(){this.callParent();var b=this.getLayout();if(b){b.finishRender()}},beforeRender:function(){var c=this,d=c.getLayout();c.callParent();if(!d.initialized){d.initLayout()}},setupRenderTpl:function(c){var d=this.getLayout();this.callParent(arguments);d.setupRenderTpl(c)},setLayout:function(c){var d=this.layout;if(d&&d.isLayout&&d!=c){d.setOwner(null)}this.layout=c;c.setOwner(this)},getLayout:function(){var b=this;if(!b.layout||!b.layout.isLayout){b.setLayout(Ext.layout.Layout.create(b.layout,b.self.prototype.layout||"autocontainer"))}return b.layout},doLayout:function(){this.updateLayout();return this},afterLayout:function(c){var d=this;++d.layoutCounter;if(d.hasListeners.afterlayout){d.fireEvent("afterlayout",d,c)}},prepareItems:function(f,i){if(Ext.isArray(f)){f=f.slice()}else{f=[f]}var j=0,g=f.length,h;for(;j<g;j++){h=f[j];if(h==null){Ext.Array.erase(f,j,1);--j;--g}else{if(i){h=this.applyDefaults(h)}f[j]=this.lookupComponent(h)}}return f},applyDefaults:function(d){var c=this.defaults;if(c){if(Ext.isFunction(c)){c=c.call(this,d)}if(Ext.isString(d)){d=Ext.ComponentManager.get(d)}Ext.applyIf(d,c)}return d},lookupComponent:function(b){return(typeof b=="string")?Ext.ComponentManager.get(b):Ext.ComponentManager.create(b,this.defaultType)},getComponentId:function(b){return b.getItemId()},add:function(){var o=this,q=Ext.Array.slice(arguments),s=(typeof q[0]=="number")?q.shift():-1,t=o.getLayout(),m,p,u,v,i,n,r;if(q.length==1&&Ext.isArray(q[0])){p=q[0];m=true}else{p=q}r=p=o.prepareItems(p,true);v=p.length;if(o.rendered){Ext.suspendLayouts()}if(!m&&v==1){r=p[0]}for(u=0;u<v;u++){i=p[u];if(!i){Ext.Error.raise("Cannot add null item to Container with itemId/id: "+o.getItemId())}n=(s<0)?o.items.length:(s+u);if(i.floating){i.onAdded(o,n)}else{if((!o.hasListeners.beforeadd||o.fireEvent("beforeadd",o,i,n)!==false)&&o.onBeforeAdd(i)!==false){o.items.insert(n,i);i.onAdded(o,n);o.onAdd(i,n);t.onAdd(i,n);if(o.hasListeners.add){o.fireEvent("add",o,i,n)}}}}o.updateLayout();if(o.rendered){Ext.resumeLayouts(true)}return r},onAdd:Ext.emptyFn,onRemove:Ext.emptyFn,insert:function(c,d){return this.add(c,d)},move:function(e,g){var f=this.items,h;h=f.removeAt(e);if(h===false){return false}f.insert(g,h);this.doLayout();return h},onBeforeAdd:function(f){var d=this,e=f.border;if(f.ownerCt){f.ownerCt.remove(f,false)}if(d.border===false||d.border===0){f.border=Ext.isDefined(e)&&e!==false&&e!==0}},remove:function(f,c){var h=this,g=h.getComponent(f);if(Ext.isDefined(Ext.global.console)&&!g){Ext.global.console.warn("Attempted to remove a component that does not exist. Ext.container.Container: remove takes an argument of the component to remove. cmp.remove() is incorrect usage.")}if(g&&(!h.hasListeners.beforeremove||h.fireEvent("beforeremove",h,g)!==false)){h.doRemove(g,c);if(h.hasListeners.remove){h.fireEvent("remove",h,g)}if(!h.destroying){h.doLayout()}}return g},doRemove:function(l,g){var j=this,k=j.layout,h=k&&j.rendered,i=g===true||(g!==false&&j.autoDestroy);g=g===true||(g!==false&&j.autoDestroy);j.items.remove(l);l.onRemoved(i);if(h){k.onRemove(l)}j.onRemove(l,i);if(i){l.destroy()}else{if(h){k.afterRemove(l)}if(j.detachOnRemove&&l.rendered){Ext.getDetachedBody().appendChild(l.getEl())}}},removeAll:function(n){var j=this,l=j.items.items.slice(),h=[],m=0,i=l.length,k;j.suspendLayouts();for(;m<i;m++){k=l[m];j.remove(k,n);if(k.ownerCt!==j){h.push(k)}}j.resumeLayouts(!!i);return h},getRefItems:function(n){var j=this,m=j.items.items,h=m.length,l=0,k,i=[];for(;l<h;l++){k=m[l];i.push(k);if(n&&k.getRefItems){i.push.apply(i,k.getRefItems(true))}}if(j.floatingItems&&j.floatingItems.accessList){i.push.apply(i,j.floatingItems.accessList)}return i},cascade:function(i,c,t){var m=this,q=m.items?m.items.items:[],p=q.length,r=0,n,o=t?t.concat(m):[m],s=o.length-1;if(i.apply(c||m,o)!==false){for(;r<p;r++){n=q[r];if(n.cascade){n.cascade(i,c,t)}else{o[s]=n;i.apply(c||q,o)}}}return this},isAncestor:function(b){while(b){if(b.ownerCt===this){return true}b=b.ownerCt}},getComponent:function(b){if(Ext.isObject(b)){b=b.getItemId()}return this.items.get(b)},query:function(b){b=b||"*";return Ext.ComponentQuery.query(b,this)},queryBy:function(k,l){var n=[],h=this.getRefItems(true),m=0,i=h.length,j;for(;m<i;++m){j=h[m];if(k.call(l||j,j)!==false){n.push(j)}}return n},queryById:function(b){return this.down("#"+b)},child:function(b){b=b||"";return this.query("> "+b)[0]||null},nextChild:function(h,f){var j=this,g,i=j.items.indexOf(h);if(i!==-1){g=f?Ext.ComponentQuery(f,j.items.items.slice(i+1)):j.items.getAt(i+1);if(!g&&j.ownerCt){g=j.ownerCt.nextChild(j,f)}}return g},prevChild:function(h,f){var j=this,g,i=j.items.indexOf(h);if(i!==-1){g=f?Ext.ComponentQuery(f,j.items.items.slice(i+1)):j.items.getAt(i+1);if(!g&&j.ownerCt){g=j.ownerCt.nextChild(j,f)}}return g},down:function(b){return this.query(b)[0]||null},enable:function(){this.callParent(arguments);var g=this.getChildItemsToDisable(),h=g.length,e,f;for(f=0;f<h;f++){e=g[f];if(e.resetDisable){e.enable()}}},disable:function(){this.callParent(arguments);var g=this.getChildItemsToDisable(),h=g.length,e,f;for(f=0;f<h;f++){e=g[f];if(e.resetDisable!==false&&!e.disabled){e.disable();e.resetDisable=true}}},getChildItemsToDisable:function(){return this.query("[isFormField],button")},beforeLayout:function(){return true},beforeDestroy:function(){var c=this,e=c.items,f;if(e){while((f=e.first())){c.doRemove(f,true)}}Ext.destroy(c.layout);c.callParent()}});Ext.define("Ext.container.Container",{extend:"Ext.container.AbstractContainer",alias:"widget.container",alternateClassName:"Ext.Container",fireHierarchyEvent:function(b){this.hierarchyEventSource.fireEvent(b,this)},afterHide:function(){this.callParent(arguments);this.fireHierarchyEvent("hide")},afterShow:function(){this.callParent(arguments);this.fireHierarchyEvent("show")},getChildByElement:function(l,i){var j,n,h=0,m=this.getRefItems(),k=m.length;l=Ext.getDom(l);for(;h<k;h++){j=m[h];n=j.getEl();if(n&&((n.dom===l)||n.contains(l))){return(i&&j.getChildByElement)?j.getChildByElement(l,i):j}}return null}},function(){this.hierarchyEventSource=this.prototype.hierarchyEventSource=new Ext.util.Observable({events:{hide:true,show:true,collapse:true,expand:true}})});Ext.define("Ext.container.Viewport",{extend:"Ext.container.Container",alias:"widget.viewport",requires:["Ext.EventManager"],alternateClassName:"Ext.Viewport",isViewport:true,ariaRole:"application",preserveElOnDestroy:true,initComponent:function(){var f=this,e=document.body.parentNode,d;Ext.getScrollbarSize();f.width=f.height=undefined;f.callParent(arguments);Ext.fly(e).addCls(Ext.baseCSSPrefix+"viewport");if(f.autoScroll){delete f.autoScroll;Ext.fly(e).setStyle("overflow","auto")}f.el=d=Ext.getBody();d.setHeight=Ext.emptyFn;d.setWidth=Ext.emptyFn;d.setSize=Ext.emptyFn;d.dom.scroll="no";f.allowDomMove=false;f.renderTo=f.el},onRender:function(){var b=this;b.callParent(arguments);b.width=Ext.Element.getViewportWidth();b.height=Ext.Element.getViewportHeight()},afterFirstLayout:function(){var b=this;b.callParent(arguments);setTimeout(function(){Ext.EventManager.onWindowResize(b.fireResize,b)},1)},fireResize:function(c,d){if(c!=this.width||d!=this.height){this.setSize(c,d)}}});Ext.define("Docs.view.Header",{extend:"Ext.container.Container",alias:"widget.docheader",contentEl:"header-content",initComponent:function(){if(Docs.otherProducts){this.style="cursor: pointer;",this.cls="dropdown";this.menu=Ext.create("Ext.menu.Menu",{renderTo:Ext.getBody(),plain:true,items:Docs.otherProducts})}this.callParent()},listeners:{afterrender:function(b){if(this.menu){b.el.addListener("click",function(d,a){this.menu.showBy(this.el,"bl",[120,0])},this)}}}});Ext.define("Docs.view.welcome.Index",{extend:"Ext.container.Container",alias:"widget.welcomeindex",requires:["Docs.ContentGrabber"],cls:"welcome iScroll",initComponent:function(){this.html=Docs.ContentGrabber.get("welcome-content");this.hasContent=!!this.html;this.callParent(arguments)},getTab:function(){return this.hasContent?{cls:"index",href:"#",tooltip:"Home"}:false}});Ext.define("Docs.view.auth.Login",{extend:"Ext.container.Container",alias:"widget.authentication",requires:"Docs.view.auth.LoginHelper",showLoginForm:function(){Docs.view.auth.LoginHelper.renderToHeader(this.getEl())},showLoggedIn:function(b){this.update("Welcome, "+b+' | <a href="#" class="logout">Logout</a>')},showLoggedOut:function(){this.update('<a href="#" class="login">Sign in / Register</a>')}});Ext.define("Docs.view.Comments",{singleton:true,requires:["Docs.view.auth.LoginHelper","Docs.view.auth.Login"],constructor:function(){var g=['<tpl if="num > 0">','View {[values.num == 1 ? "1 comment" : values.num + " comments"]}',"</tpl>",'<tpl if="num == 0">',"No comments. Click to add","</tpl>"];this.numCommentsTpl=Ext.create("Ext.XTemplate",g.join(""));var j=['<div class="comments-div first-child" id="comments-{id}">','<a href="#" class="side toggleComments"><span></span></a>','<a href="#" class="name toggleComments">',g.join(""),"</a>","</div>"];this.loadingTpl=Ext.create("Ext.Template",'<div class="loading">Loading...</div>');this.classCommentsTpl=Ext.create("Ext.XTemplate",'<div class="comments-section">','<h3 class="members-title icon-comment">Comments</h3>',j.join(""),"</div>");this.commentsMetaTpl=Ext.create("Ext.XTemplate",j.join(""));this.memberCommentsTpl=Ext.create("Ext.Template",'<span class="toggleMemberComments">{0}</span>');var h=['<div class="comment" id="{id}">','<div class="com-meta">','<img class="avatar" width="25" height="25" src="http://www.gravatar.com/avatar/{emailHash}','?s=25&r=PG&d=http://www.sencha.com/img/avatar.png">','<div class="author<tpl if="moderator"> moderator" title="Sencha Engineer</tpl>">',"{author}",'<tpl if="showCls">','<span class="target"> on {[this.target(values.target)]}</span>',"</tpl>","<tpl if=\"action == 'problem'\">",'<span class="problem">problem</span>',"</tpl>","</div>",'<tpl if="this.isMod()">','<a href="#" class="readComment <tpl if="read">read</tpl>">Read</a>',"</tpl>",'<tpl if="this.isMod() || this.isAuthor(values.author)"><a href="#" class="editComment">Edit</a><a href="#" class="deleteComment">Delete</a></tpl>','<div class="time" title="{[this.date(values.createdAt)]}">{[this.dateStr(values.createdAt)]}</div>','<div class="vote">','<a href="#" class="voteCommentUp{[values.upVote ? " selected" : ""]}" title="Vote Up"> </a>','<span class="score">{score}</span>','<a href="#" class="voteCommentDown{[values.downVote ? " selected" : ""]}" title="Vote Down"> </a>',"</div>","</div>",'<div class="content">{contentHtml}</div>',"</div>"];var i={dateStr:function(e){try{var l=Math.ceil(Number(new Date())/1000),a=Math.ceil(Number(new Date(e))/1000),c=l-a,b;if(c<60){return"just now"}else{if(c<3600){b=String(Math.ceil(c/(60)));return b+(b=="1"?" minute":" minutes")+" ago"}else{if(c<86400){b=String(Math.ceil(c/(3600)));return b+(b=="1"?" hour":" hours")+" ago"}else{if(c<60*60*24*31){b=String(Math.ceil(c/(60*60*24)));return b+(b=="1"?" day":" days")+" ago"}else{if(c<60*60*24*365){b=String(Math.ceil(c/(60*60*24*31)));return b+(b=="1"?" month":" months")+" ago"}else{return Ext.Date.format(new Date(e),"jS M 'y")}}}}}}catch(d){return""}},date:function(b){try{return Ext.Date.format(new Date(b),"jS F Y g:ia")}catch(a){return""}},isMod:function(){return Docs.App.getController("Auth").currentUser.mod},isAuthor:function(a){return Docs.App.getController("Auth").currentUser.userName==a},target:function(b){var c=b[1],a=b[1],d="#!/api/";if(b[0]=="video"){a="Video "+a;d="#!/video/"}else{if(b[0]=="guide"){a="Guide "+a;d="#!/guide/"}else{if(b[2]!=""){c+="-"+b[2];a+=" "+b[2]}}}return'<a href="'+d+c+'">'+a+"</a>"},recentCommentsPager:Ext.Function.bind(function(b){var a=b[b.length-1];if(a&&a.total_rows){return['<div class="recent-comments-pager">',this.getPagerHtml(a),"</div>"].join("")}else{return""}},this)};this.commentsTpl=Ext.create("Ext.XTemplate",'<div class="comment-list">','<tpl for=".">',h.join(""),"</tpl>",'<div class="new-comment-wrap"></div>',"</div>","{[this.recentCommentsPager(values)]}",i);this.appendCommentsTpl=Ext.create("Ext.XTemplate",'<tpl for=".">',h.join(""),"</tpl>",i);this.commentTpl=Ext.create("Ext.XTemplate",h.join(""),i);var f=['<div class="com-meta">','<img class="avatar" width="25" height="25"',' src="http://www.gravatar.com/avatar/{emailHash}?s=25&r=PG&d=http://www.sencha.com/img/avatar.png">','<div class="author">Logged in as {userName}</div>','<label class="subscribe">','Email updates? <input type="checkbox" class="subscriptionCheckbox" <tpl if="userSubscribed">checked="checked"</tpl> /><span class="sep"> | </span>',"</label>",'<a href="#" class="toggleCommentGuide">Help</a>','<input type="submit" class="sub {[values.updateComment ? "update" : "post"]}Comment" value="{[values.updateComment ? "Update" : "Post"]} comment" />','<tpl if="updateComment">',' or <a href="#" class="cancelUpdateComment">cancel</a>',"</tpl>","</div>",'<div class="commentGuideTxt" style="display: none">',"<ul>","<li>Comments should be an <strong>extension</strong> of the documentation.</li>",'<li>For any <em>questions</em> about code or usage, please use the <a href="http://www.sencha.com/forum" target="_blank">Forum</a>.</li>',"<li>Comments may be edited or deleted at any time by a moderator.</li>",'<li>Avatars can be managed at <a href="http://www.gravatar.com" target="_blank">Gravatar</a> (use your forum email address).</li>',"<li>Comments will be formatted using the Markdown syntax, eg:</li>","</ul>",'<div class="markdown preview">',"<h4>Markdown</h4>","<pre>","Here is a **bold** item\n","Here is an _italic_ item\n","Here is an `inline` code snippet\n","Here is a [Link](#!/api)\n","\n"," Indent with 4 spaces\n"," for a code snippet\n","\n","1. Here is a numbered list\n","2. Second numbered list item\n","\n","- Here is an unordered list\n","- Second unordered list item\n","\n","End a line with two spaces\n","to create a line break\n","</pre>","</div>",'<div class="markdown result">',"<h4>Result</h4>","Here is a <strong>bold</strong> item<br/>","Here is an <em>italic</em> item<br/>","Here is an <code>inline</code> code snippet<br/>",'Here is a <a href="#!/api">Link</a><br/>',"<pre>","Indent with 4 spaces\n","for a code snippet","</pre>","<ol>","<li>Here is a numbered list</li>","<li>Second numbered list item</li>","</ol>","<ul>","<li>Here is an unordered list</li>","<li>Second unordered list item</li>","</ul>","End a line with two spaces<br/>to create a line break<br/><br/>","</div>","</div>"];this.loggedInCommentTpl=Ext.create("Ext.XTemplate",'<div class="new-comment{[values.hide ? "" : " open"]}">','<form class="newCommentForm">','<span class="action">',"Action: ",'<select class="commentAction">','<option value="comment">Post a comment</option>','<option value="question">Ask a question</option>','<option value="problem">Report a problem</option>',"</select>","</span>",'<div class="note question" style="display: none;">','Please use the <a href="http://www.sencha.com/forum" target="_blank">Sencha Forum</a> ',"to post questions. Questions posted on the Documentation may be deleted.</div>",'<div class="note problem" style="display: none;">',"<p>Please inform us of documentation problems:</p>","<ul>","<li>Typos</li>","<li>Incorrect information</li>","<li>Errors with examples</li>","</ul>",'<p>For <b>SDK bugs</b>, please use the <a href="http://www.sencha.com/forum" target="_blank">Sencha Forum</a>.<br />',' For Docs App bugs, please use the <a href="https://github.com/senchalabs/jsduck/issues" target="_blank">GitHub Issue tracker</a>.</p>',"</div>",'<div class="postCommentWrap">',"<textarea></textarea>",f.join(""),"</div>","</form>","</div>");this.editCommentTpl=Ext.create("Ext.XTemplate",'<form class="editCommentForm">','<span class="action">Edit comment</span>',"<textarea>{content}</textarea>",f.join(""),"</form>")},getPagerHtml:function(h){var e=h.total_rows;var f=h.offset+h.limit;var g=Math.min(h.limit,e-f);if(e>f){return["<span></span>",'<a href="#" class="fetchMoreComments" rel="'+f+'">',"Showing comments 1-"+f+" of "+e+". ","Click to load "+g+" more...","</a>"].join("")}else{return"<span></span>That's all. Total "+e+" comments."}},renderClassCommentContainers:function(b){this.getClassToolbar().showCommentCount();this.classCommentsTpl.insertFirst(Ext.query(".members")[0],{num:0,id:"class-"+b.name.replace(/\./g,"-")});Ext.Array.each(Ext.query(".member .long"),function(a){var d=Ext.get(a).up(".member").getAttribute("id");this.commentsMetaTpl.append(a,{num:0,id:"class-"+b.name.replace(/\./g,"-")+"-"+d.replace(/\./g,"-")})},this)},updateClassCommentMeta:function(c){var d=Docs.commentMeta["class"][c];if(d&&d[""]){this.getClassToolbar().setCommentCount(d[""]);this.numCommentsTpl.overwrite(Ext.get(Ext.query(".comments-section a.name")[0]),{num:d[""]})}else{this.getClassToolbar().setCommentCount(0);this.numCommentsTpl.overwrite(Ext.get(Ext.query(".comments-section a.name")[0]),{num:0})}Ext.Array.each(Ext.query(".member"),function(k){var b=Ext.get(k),p=b.getAttribute("id"),a=b.down(".meta .defined-in").getAttribute("rel"),m=b.down(".comments-div a.name"),l=b.down(".title"),n=Docs.commentMeta["class"][a]&&Docs.commentMeta["class"][a][p],o=l.down(".toggleMemberComments");if(n){this.numCommentsTpl.overwrite(m,{num:n});if(o){o.update(String(n))}else{this.memberCommentsTpl.append(l,[n])}}else{if(o){o.remove()}}},this);this.updateClassIndex();Ext.Array.each(Ext.ComponentQuery.query("hovermenu"),function(a){a.fireEvent("refresh",this)})},getClassToolbar:function(){return Ext.ComponentQuery.query("classoverview toolbar")[0]},updateGuideCommentMeta:function(d){var c=Docs.commentMeta.guide[d];this.numCommentsTpl.overwrite(Ext.get(Ext.query("#guide .comments-section a.name")[0]),{num:c&&c[""]?c[""]:0})},updateVideoCommentMeta:function(d){var c=Docs.commentMeta.video[d];this.numCommentsTpl.overwrite(Ext.get(Ext.query("#video .comments-section a.name")[0]),{num:c&&c[""]?c[""]:0})},renderHoverMenuMeta:function(b){Ext.Array.each(b.query("a.docClass"),function(k){var l="comments-class-"+k.getAttribute("rel").replace(/[^A-Za-z\-]/g,"-"),a=Ext.get(k),h=a.down(".toggleMemberComments"),j=Docs.commentMeta.idMap[l];if(j&&Docs.commentMeta[j[0]]&&Docs.commentMeta[j[0]][j[1]]){var i=Docs.commentMeta[j[0]][j[1]][j[2]];if(h){if(!i){h.remove()}else{h.update(String(i))}}else{if(i){this.memberCommentsTpl.append(k,[i||0])}}}},this)},updateClassIndex:function(){for(var e in Docs.commentMeta["class"]){var d=Ext.get(Ext.query('#classindex a[rel="'+e+'"]')[0]);if(d){var f=d.down(".toggleMemberComments");if(f){f.update(String(Docs.commentMeta["class"][e]["total"]))}else{Docs.view.Comments.memberCommentsTpl.append(d,[String(Docs.commentMeta["class"][e]["total"])])}}}},renderNewCommentForms:function(){var b=Docs.App.getController("Auth").currentUser;Ext.Array.each(Ext.query(".new-comment-wrap"),function(f){var h=Ext.get(f).up(".comment-list").parent().hasCls("hideCommentForm");if(h){}else{if(Docs.App.getController("Auth").isLoggedIn()){var g=this.loggedInCommentTpl.overwrite(f,b,true),a=g.down("textarea").dom;this.makeCodeMirror(a,g)}else{Docs.view.auth.LoginHelper.renderToComments(f)}}},this)},makeCodeMirror:function(e,d){e.editor=CodeMirror.fromTextArea(e,{mode:"markdown",lineWrapping:true,indentUnit:4});var f=(d&&d.down(".commentAction"));if(f){f.on("change",function(c,b){var a=Ext.get(b).getValue();d.select(".note").setStyle({display:"none"});if(a==="question"){d.down(".postCommentWrap").setStyle({display:"none"});d.down(".note.question").setStyle({display:"block"})}else{if(a==="problem"){d.down(".postCommentWrap").setStyle({display:"block"});d.down(".note.problem").setStyle({display:"block"})}else{d.down(".postCommentWrap").setStyle({display:"block"})}}})}},showMember:function(f,g){var e=Ext.get(g).down(".long"),h=("class-"+f+"-"+g).replace(/\./g,"-");if(!e.hasCls("renderedComment")){this.commentsMetaTpl.append(e,{num:0,id:h});e.addCls("renderedComment");Docs.App.getController("CommentsMeta").commentIdMap["comments-"+h]=["class",f,g]}}});Ext.define("Docs.view.cls.Index",{extend:"Ext.container.Container",alias:"widget.classindex",requires:["Docs.ContentGrabber"],mixins:["Docs.view.Scrolling"],cls:"class-categories iScroll",margin:"15 10",autoScroll:true,initComponent:function(){this.tpl=new Ext.XTemplate('<h1 class="top" style="padding-bottom: 10px">API Documentation</h1>','<tpl if="notice">','<div class="notice">{notice}</div>',"</tpl>","{categories}");this.data={notice:Docs.ContentGrabber.get("notice-text"),categories:Docs.ContentGrabber.get("categories-content")};this.callParent(arguments)},getTab:function(){var b=(Docs.data.classes||[]).length>0;return b?{cls:"classes",href:"#!/api",tooltip:"API Documentation"}:false}});Ext.define("Docs.view.examples.Container",{extend:"Ext.container.Container",alias:"widget.examplecontainer",layout:"fit",initComponent:function(){this.tpl=new Ext.XTemplate('<iframe style="width: 100%; height: 100%; border: 0;" src="{url}"></iframe>');this.callParent(arguments)},load:function(b){this.update(this.tpl.apply(b))},clear:function(){this.update("")}});Ext.define("Docs.view.cls.Header",{extend:"Ext.container.Container",padding:"10 0 17 0",height:55,alias:"widget.classheader",cls:"classheader",initComponent:function(){this.tpl=Ext.create("Ext.XTemplate",'<h1 class="{[this.getClass(values)]}">','<tpl if="private">','<span class="private">Private</span>',"</tpl>",'<tpl if="Docs.data.source">','<a href="#" class="class-source-link">{name}','<span class="class-source-tip">View source...</span>',"</a>","<tpl else>",'<strong class="class-source-link">{name}</strong>',"</tpl>",'<tpl if="singleton">',"<span>singleton</span>","</tpl>","{[this.renderAliases(values.aliases)]}","</h1>",'<tpl if="Docs.data.showPrintButton">','<a class="print" href="?print=/api/{name}" target="_blank">Print</a>',"</tpl>",{getClass:function(b){if(b.component){return"component"}else{if(b.singleton){return"singleton"}else{return"class"}}},renderAliases:function(e){var f={widget:"xtype",plugin:"ptype",feature:"ftype"};var d=[];e&&Ext.Object.each(e,function(a,b){d.push((f[a]||a)+": "+b.join(", "))});if(d.length>0){return"<span>"+d.join(", ")+"</span>"}else{return""}}});if(Docs.data.source){this.on("render",this.initSourceLink,this)}this.callParent()},initSourceLink:function(){this.classLinkEvent("click",function(){var d=this.loadedCls.files;if(d.length===1){window.open("source/"+d[0].href)}else{var c=this.createFileMenu(d);c.showBy(this,undefined,[58,-20])}},this);this.classLinkEvent("mouseover",function(){this.el.down(".class-source-tip").addCls("hover")},this);this.classLinkEvent("mouseout",function(){this.el.down(".class-source-tip").removeCls("hover")},this)},classLinkEvent:function(d,e,f){this.el.on(d,e,f,{preventDefault:true,delegate:"a.class-source-link"})},createFileMenu:function(b){return new Ext.menu.Menu({items:Ext.Array.map(b,function(a){return{text:a.filename,handler:function(){window.open("source/"+a.href)}}},this)})},load:function(b){this.loadedCls=b;this.update(this.tpl.apply(b))}});Ext.define("Ext.panel.Header",{extend:"Ext.container.Container",uses:["Ext.panel.Tool","Ext.draw.Component","Ext.util.CSS","Ext.layout.component.Body","Ext.Img"],alias:"widget.header",isHeader:true,defaultType:"tool",indicateDrag:false,weight:-1,componentLayout:"body",titleAlign:"left",childEls:["body"],renderTpl:['<div id="{id}-body" class="{baseCls}-body {bodyCls}','<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}"</tpl>','<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values)%}","</div>"],headingTpl:'<span id="{id}-textEl" class="{cls}-text {cls}-text-{ui}">{title}</span>',shrinkWrap:3,initComponent:function(){var g=this,j,k,h,l,i;g.addEvents("click","dblclick");g.indicateDragCls=g.baseCls+"-draggable";g.title=g.title||" ";g.tools=g.tools||[];g.items=g.items||[];g.orientation=g.orientation||"horizontal";g.dock=(g.dock)?g.dock:(g.orientation=="horizontal")?"top":"left";g.addClsWithUI([g.orientation,g.dock]);if(g.indicateDrag){g.addCls(g.indicateDragCls)}if(!Ext.isEmpty(g.iconCls)||!Ext.isEmpty(g.icon)){g.initIconCmp();g.items.push(g.iconCmp)}if(g.orientation=="vertical"){g.layout={type:"vbox",align:"center"};g.textConfig={width:16,cls:g.baseCls+"-text",type:"text",text:g.title,rotate:{degrees:90}};l=g.ui;if(Ext.isArray(l)){l=l[0]}j="."+g.baseCls+"-text-"+l;if(Ext.scopeResetCSS){j="."+Ext.baseCSSPrefix+"reset "+j}k=Ext.util.CSS.getRule(j);if(k){h=k.style}else{h=(i=Ext.getBody().createChild({style:"position:absolute",cls:g.baseCls+"-text-"+l})).getStyles("fontFamily","fontWeight","fontSize","color");i.remove()}if(h){Ext.apply(g.textConfig,{"font-family":h.fontFamily,"font-weight":h.fontWeight,"font-size":h.fontSize,fill:h.color})}g.titleCmp=new Ext.draw.Component({width:16,ariaRole:"heading",focusable:false,viewBox:false,flex:1,id:g.id+"_hd",autoSize:true,items:g.textConfig,xhooks:{setSize:function(a){this.callParent([a])}},childEls:[{name:"textEl",select:"."+g.baseCls+"-text"}]})}else{g.layout={type:"hbox",align:"middle"};g.titleCmp=new Ext.Component({ariaRole:"heading",focusable:false,noWrap:true,flex:1,id:g.id+"_hd",style:"text-align:"+g.titleAlign,cls:g.baseCls+"-text-container",renderTpl:g.getTpl("headingTpl"),renderData:{title:g.title,cls:g.baseCls,ui:g.ui},childEls:["textEl"]})}g.items.push(g.titleCmp);g.items=g.items.concat(g.tools);g.callParent();g.on({dblclick:g.onDblClick,click:g.onClick,element:"el",scope:g})},initIconCmp:function(){var c=this,d={focusable:false,src:Ext.BLANK_IMAGE_URL,cls:[c.baseCls+"-icon",c.iconCls],id:c.id+"-iconEl",iconCls:c.iconCls};if(!Ext.isEmpty(c.icon)){delete d.iconCls;d.src=c.icon}c.iconCmp=new Ext.Img(d)},afterRender:function(){this.el.unselectable();this.callParent()},addUIClsToElement:function(g){var j=this,h=j.callParent(arguments),k=[j.baseCls+"-body-"+g,j.baseCls+"-body-"+j.ui+"-"+g],i,l;if(j.bodyCls){i=j.bodyCls.split(" ");for(l=0;l<k.length;l++){if(!Ext.Array.contains(i,k[l])){i.push(k[l])}}j.bodyCls=i.join(" ")}else{j.bodyCls=k.join(" ")}return h},removeUIClsFromElement:function(g){var j=this,h=j.callParent(arguments),k=[j.baseCls+"-body-"+g,j.baseCls+"-body-"+j.ui+"-"+g],i,l;if(j.bodyCls){i=j.bodyCls.split(" ");for(l=0;l<k.length;l++){Ext.Array.remove(i,k[l])}j.bodyCls=i.join(" ")}return h},addUIToElement:function(){var d=this,f,e;d.callParent(arguments);e=d.baseCls+"-body-"+d.ui;if(d.rendered){if(d.bodyCls){d.body.addCls(d.bodyCls)}else{d.body.addCls(e)}}else{if(d.bodyCls){f=d.bodyCls.split(" ");if(!Ext.Array.contains(f,e)){f.push(e)}d.bodyCls=f.join(" ")}else{d.bodyCls=e}}if(d.titleCmp&&d.titleCmp.rendered&&d.titleCmp.textEl){d.titleCmp.textEl.addCls(d.baseCls+"-text-"+d.ui)}},removeUIFromElement:function(){var d=this,f,e;d.callParent(arguments);e=d.baseCls+"-body-"+d.ui;if(d.rendered){if(d.bodyCls){d.body.removeCls(d.bodyCls)}else{d.body.removeCls(e)}}else{if(d.bodyCls){f=d.bodyCls.split(" ");Ext.Array.remove(f,e);d.bodyCls=f.join(" ")}else{d.bodyCls=e}}if(d.titleCmp&&d.titleCmp.rendered&&d.titleCmp.textEl){d.titleCmp.textEl.removeCls(d.baseCls+"-text-"+d.ui)}},onClick:function(b){this.fireClickEvent("click",b)},onDblClick:function(b){this.fireClickEvent("dblclick",b)},fireClickEvent:function(e,f){var d="."+Ext.panel.Tool.prototype.baseCls;if(!f.getTarget(d)){this.fireEvent(e,this,f)}},getFocusEl:function(){return this.el},getTargetEl:function(){return this.body||this.frameBody||this.el},setTitle:function(g){var h=this,e,f;if(h.rendered){if(h.titleCmp.rendered){if(h.titleCmp.surface){h.title=g||"";e=h.titleCmp.surface.items.items[0];f=h.titleCmp.surface;f.remove(e);h.textConfig.type="text";h.textConfig.text=g;e=f.add(h.textConfig);e.setAttributes({rotate:{degrees:90}},true);h.titleCmp.autoSizeSurface()}else{h.title=g;h.titleCmp.textEl.update(h.title||" ")}h.titleCmp.updateLayout()}else{h.titleCmp.on({render:function(){h.setTitle(g)},single:true})}}else{h.title=g}},getMinWidth:function(){var j=this,k=j.titleCmp.textEl.dom,h,i=j.tools,g,l;k.style.display="inline";h=k.offsetWidth;k.style.display="";if(i&&(g=i.length)){for(l=0;l<g;l++){if(i[l].el){h+=i[l].el.dom.offsetWidth}}}if(j.iconCmp){h+=j.iconCmp.el.dom.offsetWidth}return h+10},setIconCls:function(f){var e=this,g=!f||!f.length,h=e.iconCmp;e.iconCls=f;if(!e.iconCmp&&!g){e.initIconCmp();e.insert(0,e.iconCmp)}else{if(h){if(g){e.iconCmp.destroy();delete e.iconCmp}else{h.removeCls(h.iconCls);h.addCls(f);h.iconCls=f}}}},setIcon:function(f){var e=this,g=!f||!f.length,h=e.iconCmp;e.icon=f;if(!e.iconCmp&&!g){e.initIconCmp();e.insert(0,e.iconCmp)}else{if(h){if(g){e.iconCmp.destroy();delete e.iconCmp}else{h.setSrc(e.icon)}}}},addTool:function(b){this.tools.push(this.add(b))},onAdd:function(c,d){this.callParent(arguments);if(c instanceof Ext.panel.Tool){c.bindTo(this.ownerCt);this.tools[c.type]=c}},initRenderData:function(){return Ext.applyIf(this.callParent(),{bodyCls:this.bodyCls})}});Ext.define("Ext.button.Button",{alias:"widget.button",extend:"Ext.Component",requires:["Ext.menu.Manager","Ext.util.ClickRepeater","Ext.layout.component.Button","Ext.util.TextMetrics","Ext.util.KeyMap"],alternateClassName:"Ext.Button",isButton:true,componentLayout:"button",hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",textAlign:"center",type:"button",clickEvent:"click",preventDefault:true,handleMouseEvents:true,tooltipType:"qtip",baseCls:Ext.baseCSSPrefix+"btn",pressedCls:"pressed",overCls:"over",focusCls:"focus",menuActiveCls:"menu-active",hrefTarget:"_blank",border:true,childEls:["btnEl","btnWrap","btnInnerEl","btnIconEl"],renderTpl:['<em id="{id}-btnWrap"<tpl if="splitCls"> class="{splitCls}"</tpl>>','<tpl if="href">','<a id="{id}-btnEl" href="{href}" class="{btnCls}" target="{hrefTarget}"','<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>',' role="link">','<span id="{id}-btnInnerEl" class="{baseCls}-inner">',"{text}","</span>",'<span id="{id}-btnIconEl" class="{baseCls}-icon {iconCls}"<tpl if="iconUrl"> style="background-image:url({iconUrl})"</tpl>></span>',"</a>","<tpl else>",'<button id="{id}-btnEl" type="{type}" class="{btnCls}" hidefocus="true"','<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>',' role="button" autocomplete="off">','<span id="{id}-btnInnerEl" class="{baseCls}-inner" style="{innerSpanStyle}">',"{text}","</span>",'<span id="{id}-btnIconEl" class="{baseCls}-icon {iconCls}"<tpl if="iconUrl"> style="background-image:url({iconUrl})"</tpl>></span>',"</button>","</tpl>","</em>",'<tpl if="closable">','<a id="{id}-closeEl" href="#" class="{baseCls}-close-btn" title="{closeText}"></a>',"</tpl>"],scale:"small",allowedScales:["small","medium","large"],iconAlign:"left",arrowAlign:"right",arrowCls:"arrow",maskOnDisable:false,persistentPadding:undefined,shrinkWrap:3,frame:true,initComponent:function(){var b=this;b.callParent(arguments);b.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout");if(b.menu){b.split=true;b.menu=Ext.menu.Manager.get(b.menu);b.menu.ownerButton=b}if(b.url){b.href=b.url}if(b.href&&!b.hasOwnProperty("preventDefault")){b.preventDefault=false}if(Ext.isString(b.toggleGroup)){b.enableToggle=true}},getActionEl:function(){return this.btnEl},getFocusEl:function(){return this.inOnFocus?this.el:this.btnEl},onFocus:function(c){var d=this;d.inOnFocus=true;d.callParent(arguments);d.inOnFocus=false},onBlur:function(h){var e=this,f=e.focusCls,g=e.getEl();if(e.destroying){return}e.beforeBlur(h);if(f&&g){g.removeCls(e.removeClsWithUI(f,true))}if(e.validateOnBlur){e.validate()}e.hasFocus=false;e.fireEvent("blur",e,h);e.postBlur(h)},setComponentCls:function(){var c=this,d=c.getComponentCls();if(!Ext.isEmpty(c.oldCls)){c.removeClsWithUI(c.oldCls);c.removeClsWithUI(c.pressedCls)}c.oldCls=d;c.addClsWithUI(d)},getComponentCls:function(){var c=this,d=[];if(c.iconCls||c.icon){if(c.text){d.push("icon-text-"+c.iconAlign)}else{d.push("icon")}}else{if(c.text){d.push("noicon")}}if(c.pressed){d.push(c.pressedCls)}return d},beforeRender:function(){var b=this;b.callParent();b.oldCls=b.getComponentCls();b.addClsWithUI(b.oldCls);Ext.applyIf(b.renderData,b.getTemplateArgs());if(b.scale){b.setScale(b.scale)}},onRender:function(){var f=this,e,d;f.doc=Ext.getDoc();f.callParent(arguments);if(f.split&&f.arrowTooltip){f.arrowEl.dom.setAttribute(f.getTipAttr(),f.arrowTooltip)}e=f.el;if(f.tooltip){f.setTooltip(f.tooltip,true)}if(f.handleMouseEvents){d={scope:f,mouseover:f.onMouseOver,mouseout:f.onMouseOut,mousedown:f.onMouseDown};if(f.split){d.mousemove=f.onMouseMove}}else{d={scope:f}}if(f.menu){f.mon(f.menu,{scope:f,show:f.onMenuShow,hide:f.onMenuHide});f.keyMap=new Ext.util.KeyMap({target:f.el,key:Ext.EventObject.DOWN,handler:f.onDownKey,scope:f})}if(f.repeat){f.mon(new Ext.util.ClickRepeater(e,Ext.isObject(f.repeat)?f.repeat:{}),"click",f.onRepeatClick,f)}else{d[f.clickEvent]=f.onClick}f.mon(e,d);Ext.ButtonToggleManager.register(f)},getTemplateArgs:function(){var f=this,d=f.getPersistentPadding(),e="";if(Math.max.apply(Math,d)>0){e="margin:"+Ext.Array.map(d,function(a){return -a+"px"}).join(" ")}return{href:f.getHref(),disabled:f.disabled,hrefTarget:f.hrefTarget,type:f.type,btnCls:f.getBtnCls(),splitCls:f.getSplitCls(),iconUrl:f.icon,iconCls:f.iconCls,text:f.text||" ",tabIndex:f.tabIndex,innerSpanStyle:e}},getHref:function(){var d=this,c=Ext.apply({},d.baseParams);c=Ext.apply(c,d.params);return d.href?Ext.urlAppend(d.href,Ext.Object.toQueryString(c)):false},setParams:function(b){this.params=b;this.btnEl.dom.href=this.getHref()},getSplitCls:function(){var b=this;return b.split?(b.baseCls+"-"+b.arrowCls)+" "+(b.baseCls+"-"+b.arrowCls+"-"+b.arrowAlign):""},getBtnCls:function(){return this.textAlign?this.baseCls+"-"+this.textAlign:""},setIconCls:function(e){var g=this,f=g.btnIconEl,h=g.iconCls;g.iconCls=e;if(f){f.removeCls(h);f.addCls(e||"");g.setComponentCls();if(g.didIconStateChange(h,e)){g.updateLayout()}}return g},setTooltip:function(f,e){var d=this;if(d.rendered){if(!e){d.clearTip()}if(Ext.isObject(f)){Ext.tip.QuickTipManager.register(Ext.apply({target:d.btnEl.id},f));d.tooltip=f}else{d.btnEl.dom.setAttribute(d.getTipAttr(),f)}}else{d.tooltip=f}return d},setTextAlign:function(f){var d=this,e=d.btnEl;if(e){e.removeCls(d.baseCls+"-"+d.textAlign);e.addCls(d.baseCls+"-"+f)}d.textAlign=f;return d},getTipAttr:function(){return this.tooltipType=="qtip"?"data-qtip":"title"},getRefItems:function(e){var f=this.menu,d;if(f){d=f.getRefItems(e);d.unshift(f)}return d||[]},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.btnEl)}},beforeDestroy:function(){var b=this;if(b.rendered){b.clearTip()}if(b.menu&&b.destroyMenu!==false){Ext.destroy(b.menu)}Ext.destroy(b.btnInnerEl,b.repeater);b.callParent()},onDestroy:function(){var b=this;if(b.rendered){b.doc.un("mouseover",b.monitorMouseOver,b);b.doc.un("mouseup",b.onMouseUp,b);delete b.doc;Ext.ButtonToggleManager.unregister(b);Ext.destroy(b.keyMap);delete b.keyMap}b.callParent()},setHandler:function(c,d){this.handler=c;this.scope=d;return this},setText:function(c){var d=this;d.text=c;if(d.rendered){d.btnInnerEl.update(c||" ");d.setComponentCls();if(Ext.isStrict&&Ext.isIE8){d.el.repaint()}d.updateLayout()}return d},setIcon:function(e){var h=this,f=h.btnIconEl,g=h.icon;h.icon=e;if(f){f.setStyle("background-image",e?"url("+e+")":"");h.setComponentCls();if(h.didIconStateChange(g,e)){h.updateLayout()}}return h},didIconStateChange:function(e,f){var d=Ext.isEmpty(f);return Ext.isEmpty(e)?!d:d},getText:function(){return this.text},toggle:function(f,e){var d=this;f=f===undefined?!d.pressed:!!f;if(f!==d.pressed){if(d.rendered){d[f?"addClsWithUI":"removeClsWithUI"](d.pressedCls)}d.pressed=f;if(!e){d.fireEvent("toggle",d,f);Ext.callback(d.toggleHandler,d.scope||d,[d,f])}}return d},maybeShowMenu:function(){var b=this;if(b.menu&&!b.hasVisibleMenu()&&!b.ignoreNextClick){b.showMenu()}},showMenu:function(){var b=this;if(b.rendered&&b.menu){if(b.tooltip&&b.getTipAttr()!="title"){Ext.tip.QuickTipManager.getQuickTip().cancelShow(b.btnEl)}if(b.menu.isVisible()){b.menu.hide()}b.menu.showBy(b.el,b.menuAlign,((!Ext.isStrict&&Ext.isIE)||Ext.isIE6)?[-2,-2]:undefined)}return b},hideMenu:function(){if(this.hasVisibleMenu()){this.menu.hide()}return this},hasVisibleMenu:function(){var b=this.menu;return b&&b.rendered&&b.isVisible()},onRepeatClick:function(d,c){this.onClick(c)},onClick:function(c){var d=this;if(d.preventDefault||(d.disabled&&d.getHref())&&c){c.preventDefault()}if(c.button!==0){return}if(!d.disabled){d.doToggle();d.maybeShowMenu();d.fireHandler(c)}},fireHandler:function(f){var d=this,e=d.handler;if(d.fireEvent("click",d,f)!==false){if(e){e.call(d.scope||d,d,f)}d.blur()}},doToggle:function(){var b=this;if(b.enableToggle&&(b.allowDepress!==false||!b.pressed)){b.toggle()}},onMouseOver:function(c){var d=this;if(!d.disabled&&!c.within(d.el,true,true)){d.onMouseEnter(c)}},onMouseOut:function(c){var d=this;if(!c.within(d.el,true,true)){if(d.overMenuTrigger){d.onMenuTriggerOut(c)}d.onMouseLeave(c)}},onMouseMove:function(i){var k=this,l=k.el,j=k.overMenuTrigger,e,h;if(k.split){if(k.arrowAlign==="right"){e=i.getX()-l.getX();h=l.getWidth()}else{e=i.getY()-l.getY();h=l.getHeight()}if(e>(h-k.getTriggerSize())){if(!j){k.onMenuTriggerOver(i)}}else{if(j){k.onMenuTriggerOut(i)}}}},getTriggerSize:function(){var h=this,j=h.triggerSize,f,g,i;if(j===i){f=h.arrowAlign;g=f.charAt(0);j=h.triggerSize=h.el.getFrameWidth(g)+h.btnWrap.getFrameWidth(g)+h.frameSize[f]}return j},onMouseEnter:function(c){var d=this;d.addClsWithUI(d.overCls);d.fireEvent("mouseover",d,c)},onMouseLeave:function(c){var d=this;d.removeClsWithUI(d.overCls);d.fireEvent("mouseout",d,c)},onMenuTriggerOver:function(c){var d=this;d.overMenuTrigger=true;d.fireEvent("menutriggerover",d,d.menu,c)},onMenuTriggerOut:function(c){var d=this;delete d.overMenuTrigger;d.fireEvent("menutriggerout",d,d.menu,c)},enable:function(d){var c=this;c.callParent(arguments);if(c.btnEl){c.btnEl.dom.disabled=false}c.removeClsWithUI("disabled");return c},disable:function(d){var c=this;c.callParent(arguments);if(c.btnEl){c.btnEl.dom.disabled=true}c.addClsWithUI("disabled");c.removeClsWithUI(c.overCls);if(c.btnInnerEl&&(Ext.isIE6||Ext.isIE7)){c.btnInnerEl.repaint()}return c},setScale:function(f){var e=this,d=e.ui.replace("-"+e.scale,"");if(!Ext.Array.contains(e.allowedScales,f)){throw ("#setScale: scale must be an allowed scale ("+e.allowedScales.join(", ")+")")}e.scale=f;e.setUI(d)},setUI:function(c){var d=this;if(d.scale&&!c.match(d.scale)){c=c+"-"+d.scale}d.callParent([c])},onMouseDown:function(c){var d=this;if(!d.disabled&&c.button===0){d.addClsWithUI(d.pressedCls);d.doc.on("mouseup",d.onMouseUp,d)}},onMouseUp:function(c){var d=this;if(c.button===0){if(!d.pressed){d.removeClsWithUI(d.pressedCls)}d.doc.un("mouseup",d.onMouseUp,d)}},onMenuShow:function(c){var d=this;d.ignoreNextClick=0;d.addClsWithUI(d.menuActiveCls);d.fireEvent("menushow",d,d.menu)},onMenuHide:function(c){var d=this;d.removeClsWithUI(d.menuActiveCls);d.ignoreNextClick=Ext.defer(d.restoreClick,250,d);d.fireEvent("menuhide",d,d.menu)},restoreClick:function(){this.ignoreNextClick=0},onDownKey:function(){var b=this;if(!b.disabled){if(b.menu){b.showMenu()}}},getPersistentPadding:function(){var k=this,j=k.persistentPadding,g,h,l,i;if(!j){j=k.self.prototype.persistentPadding=[0,0,0,0];if(!Ext.isIE){g=new Ext.button.Button({text:"test",style:"position:absolute;top:-999px;"});g.el=Ext.DomHelper.append(Ext.getBody(),g.getRenderTree(),true);g.applyChildEls(g.el);l=g.btnEl;i=g.btnInnerEl;l.setSize(null,null);h=i.getOffsetsTo(l);j[0]=h[1];j[1]=l.getWidth()-i.getWidth()-h[0];j[2]=l.getHeight()-i.getHeight()-h[1];j[3]=h[0];g.destroy();g.el.remove()}}return j}},function(){var d={},c=function(i,a){if(a){var b=d[i.toggleGroup],g=b.length,j;for(j=0;j<g;j++){if(b[j]!==i){b[j].toggle(false)}}}};Ext.ButtonToggleManager={register:function(b){if(!b.toggleGroup){return}var a=d[b.toggleGroup];if(!a){a=d[b.toggleGroup]=[]}a.push(b);b.on("toggle",c)},unregister:function(b){if(!b.toggleGroup){return}var a=d[b.toggleGroup];if(a){Ext.Array.remove(a,b);b.un("toggle",c)}},getPressed:function(a){var b=d[a],g=0,h;if(b){for(h=b.length;g<h;g++){if(b[g].pressed===true){return b[g]}}}return null}}});Ext.define("Ext.tab.Tab",{extend:"Ext.button.Button",alias:"widget.tab",requires:["Ext.layout.component.Tab","Ext.util.KeyNav"],componentLayout:"tab",isTab:true,baseCls:Ext.baseCSSPrefix+"tab",activeCls:"active",closableCls:"closable",closable:true,closeText:"Close Tab",active:false,childEls:["closeEl"],scale:false,position:"top",initComponent:function(){var b=this;b.addEvents("activate","deactivate","beforeclose","close");b.callParent(arguments);if(b.card){b.setCard(b.card)}},getTemplateArgs:function(){var c=this,d=c.callParent();d.closable=c.closable;d.closeText=c.closeText;return d},beforeRender:function(){var d=this,e=d.up("tabbar"),f=d.up("tabpanel");d.callParent();d.addClsWithUI(d.position);d.syncClosableUI();if(!d.minWidth){d.minWidth=(e)?e.minTabWidth:d.minWidth;if(!d.minWidth&&f){d.minWidth=f.minTabWidth}if(d.minWidth&&d.iconCls){d.minWidth+=25}}if(!d.maxWidth){d.maxWidth=(e)?e.maxTabWidth:d.maxWidth;if(!d.maxWidth&&f){d.maxWidth=f.maxTabWidth}}},onRender:function(){var b=this;b.callParent(arguments);b.keyNav=new Ext.util.KeyNav(b.el,{enter:b.onEnterKey,del:b.onDeleteKey,scope:b})},enable:function(d){var c=this;c.callParent(arguments);c.removeClsWithUI(c.position+"-disabled");return c},disable:function(d){var c=this;c.callParent(arguments);c.addClsWithUI(c.position+"-disabled");return c},onDestroy:function(){var b=this;Ext.destroy(b.keyNav);delete b.keyNav;b.callParent(arguments)},setClosable:function(d){var c=this;d=(!arguments.length||!!d);if(c.closable!=d){c.closable=d;if(c.card){c.card.closable=d}c.syncClosableUI();if(c.rendered){c.syncClosableElements();c.updateLayout()}}},syncClosableElements:function(){var d=this,c=d.closeEl;if(d.closable){if(!c){d.closeEl=d.btnWrap.insertSibling({tag:"a",cls:d.baseCls+"-close-btn",href:"#",title:d.closeText},"after")}}else{if(c){c.remove();delete d.closeEl}}},syncClosableUI:function(){var c=this,d=[c.closableCls,c.closableCls+"-"+c.position];if(c.closable){c.addClsWithUI(d)}else{c.removeClsWithUI(d)}},setCard:function(d){var c=this;c.card=d;c.setText(c.title||d.title);c.setIconCls(c.iconCls||d.iconCls);c.setIcon(c.icon||d.icon)},onCloseClick:function(){var b=this;if(b.fireEvent("beforeclose",b)!==false){if(b.tabBar){if(b.tabBar.closeTab(b)===false){return}}else{b.fireClose()}}},fireClose:function(){this.fireEvent("close",this)},onEnterKey:function(c){var d=this;if(d.tabBar){d.tabBar.onClick(c,d.el)}},onDeleteKey:function(b){if(this.closable){this.onCloseClick()}},activate:function(c){var d=this;d.active=true;d.addClsWithUI([d.activeCls,d.position+"-"+d.activeCls]);if(c!==true){d.fireEvent("activate",d)}},deactivate:function(c){var d=this;d.active=false;d.removeClsWithUI([d.activeCls,d.position+"-"+d.activeCls]);if(c!==true){d.fireEvent("deactivate",d)}}});Ext.define("Ext.tab.Bar",{extend:"Ext.panel.Header",alias:"widget.tabbar",baseCls:Ext.baseCSSPrefix+"tab-bar",requires:["Ext.tab.Tab"],isTabBar:true,defaultType:"tab",plain:false,childEls:["body","strip"],renderTpl:['<div id="{id}-body" class="{baseCls}-body {bodyCls}<tpl if="ui"> {baseCls}-body-{ui}<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl></tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values)%}","</div>",'<div id="{id}-strip" class="{baseCls}-strip<tpl if="ui"> {baseCls}-strip-{ui}<tpl for="uiCls"> {parent.baseCls}-strip-{parent.ui}-{.}</tpl></tpl>"></div>'],initComponent:function(){var b=this;if(b.plain){b.setUI(b.ui+"-plain")}b.addClsWithUI(b.dock);b.addEvents("change");b.callParent(arguments);b.layout.align=(b.orientation=="vertical")?"left":"top";b.layout.overflowHandler=new Ext.layout.container.boxOverflow.Scroller(b.layout);b.remove(b.titleCmp);delete b.titleCmp;Ext.apply(b.renderData,{bodyCls:b.bodyCls})},getLayout:function(){var b=this;b.layout.type=(b.dock==="top"||b.dock==="bottom")?"hbox":"vbox";return b.callParent(arguments)},onAdd:function(b){b.position=this.dock;this.callParent(arguments)},onRemove:function(d){var c=this;if(d===c.previousTab){c.previousTab=null}c.callParent(arguments)},afterComponentLayout:function(b){this.callParent(arguments);this.strip.setWidth(b)},onClick:function(l,m){var n=this,j=l.getTarget("."+Ext.tab.Tab.prototype.baseCls),e=j&&Ext.getCmp(j.id),k=n.tabPanel,i=e&&e.closeEl&&(m===e.closeEl.dom);if(i){l.preventDefault()}if(e&&e.isDisabled&&!e.isDisabled()){if(e.closable&&i){e.onCloseClick()}else{if(k){k.setActiveTab(e.card)}else{n.setActiveTab(e)}e.focus()}}},closeTab:function(j){var i=this,f=j.card,h=i.tabPanel,g;if(f&&f.fireEvent("beforeclose",f)===false){return false}g=i.findNextActivatable(j);Ext.suspendLayouts();if(h&&f){delete j.ownerCt;h.remove(f);if(!h.getComponent(f)){j.fireClose();i.remove(j);if(f.hasListeners.close){f.fireEvent("close",f)}}else{j.ownerCt=i;Ext.resumeLayouts(true);return false}}if(g){if(h){h.setActiveTab(g.card)}else{i.setActiveTab(g)}g.focus()}Ext.resumeLayouts(true)},findNextActivatable:function(d){var c=this;if(d.active&&c.items.getCount()>1){return(c.previousTab&&c.previousTab!==d&&!c.previousTab.disabled)?c.previousTab:(d.next("tab[disabled=false]")||d.prev("tab[disabled=false]"))}},setActiveTab:function(d){var c=this;if(!d.disabled&&d!==c.activeTab){if(c.activeTab){if(c.activeTab.isDestroyed){c.previousTab=null}else{c.previousTab=c.activeTab;c.activeTab.deactivate()}}d.activate();c.activeTab=d;c.fireEvent("change",c,d,d.card);c.on({afterlayout:c.afterTabActivate,scope:c,single:true});c.updateLayout()}},afterTabActivate:function(){this.layout.overflowHandler.scrollToItem(this.activeTab)}});Ext.define("Ext.menu.Item",{extend:"Ext.Component",alias:"widget.menuitem",alternateClassName:"Ext.menu.TextItem",activeCls:Ext.baseCSSPrefix+"menu-item-active",ariaRole:"menuitem",canActivate:true,clickHideDelay:1,destroyMenu:true,disabledCls:Ext.baseCSSPrefix+"menu-item-disabled",hideOnClick:true,isMenuItem:true,menuAlign:"tl-tr?",menuExpandDelay:200,menuHideDelay:200,tooltipType:"qtip",arrowCls:Ext.baseCSSPrefix+"menu-item-arrow",childEls:["itemEl","iconEl","textEl","arrowEl"],renderTpl:['<tpl if="plain">',"{text}","<tpl else>",'<a id="{id}-itemEl" class="'+Ext.baseCSSPrefix+'menu-item-link" href="{href}" <tpl if="hrefTarget">target="{hrefTarget}"</tpl> hidefocus="true" unselectable="on">','<img id="{id}-iconEl" src="{icon}" class="'+Ext.baseCSSPrefix+'menu-item-icon {iconCls}" />','<span id="{id}-textEl" class="'+Ext.baseCSSPrefix+'menu-item-text" <tpl if="arrowCls">style="margin-right: 17px;"</tpl> >{text}</span>','<img id="{id}-arrowEl" src="{blank}" class="{arrowCls}" />',"</a>","</tpl>"],maskOnDisable:false,activate:function(){var b=this;if(!b.activated&&b.canActivate&&b.rendered&&!b.isDisabled()&&b.isVisible()){b.el.addCls(b.activeCls);b.focus();b.activated=true;b.fireEvent("activate",b)}},getFocusEl:function(){return this.itemEl},deactivate:function(){var b=this;if(b.activated){b.el.removeCls(b.activeCls);b.blur();b.hideMenu();b.activated=false;b.fireEvent("deactivate",b)}},deferExpandMenu:function(){var b=this;if(b.activated&&(!b.menu.rendered||!b.menu.isVisible())){b.parentMenu.activeChild=b.menu;b.menu.parentItem=b;b.menu.parentMenu=b.menu.ownerCt=b.parentMenu;b.menu.showBy(b,b.menuAlign,((!Ext.isStrict&&Ext.isIE)||Ext.isIE6)?[-2,-2]:undefined)}},deferHideMenu:function(){if(this.menu.isVisible()){this.menu.hide()}},cancelDeferHide:function(){clearTimeout(this.hideMenuTimer)},deferHideParentMenus:function(){var b;Ext.menu.Manager.hideAll();if(!Ext.Element.getActiveElement()){b=this.up(":not([hidden])");if(b){b.focus()}}},expandMenu:function(d){var c=this;if(c.menu){c.cancelDeferHide();if(d===0){c.deferExpandMenu()}else{c.expandMenuTimer=Ext.defer(c.deferExpandMenu,Ext.isNumber(d)?d:c.menuExpandDelay,c)}}},getRefItems:function(e){var f=this.menu,d;if(f){d=f.getRefItems(e);d.unshift(f)}return d||[]},hideMenu:function(d){var c=this;if(c.menu){clearTimeout(c.expandMenuTimer);c.hideMenuTimer=Ext.defer(c.deferHideMenu,Ext.isNumber(d)?d:c.menuHideDelay,c)}},initComponent:function(){var e=this,h=Ext.baseCSSPrefix,f=[h+"menu-item"],g;e.addEvents("activate","click","deactivate");if(e.plain){f.push(h+"menu-item-plain")}if(e.cls){f.push(e.cls)}e.cls=f.join(" ");if(e.menu){g=e.menu;delete e.menu;e.setMenu(g)}e.callParent(arguments)},onClick:function(c){var d=this;if(!d.href){c.stopEvent()}if(d.disabled){return}if(d.hideOnClick){d.deferHideParentMenusTimer=Ext.defer(d.deferHideParentMenus,d.clickHideDelay,d)}Ext.callback(d.handler,d.scope||d,[d,c]);d.fireEvent("click",d,c);if(!d.hideOnClick){d.focus()}},onRemoved:function(){var b=this;if(b.activated&&b.parentMenu.activeItem===b){b.parentMenu.deactivateActiveItem()}b.callParent(arguments);delete b.parentMenu;delete b.ownerButton},beforeDestroy:function(){var b=this;if(b.rendered){b.clearTip()}b.callParent()},onDestroy:function(){var b=this;clearTimeout(b.expandMenuTimer);b.cancelDeferHide();clearTimeout(b.deferHideParentMenusTimer);b.setMenu(null);b.callParent(arguments)},beforeRender:function(){var d=this,c=Ext.BLANK_IMAGE_URL;d.callParent();Ext.applyIf(d.renderData,{href:d.href||"#",hrefTarget:d.hrefTarget,icon:d.icon||c,iconCls:d.iconCls+(d.checkChangeDisabled?" "+d.disabledCls:""),plain:d.plain,text:d.text,arrowCls:d.menu?d.arrowCls:"",blank:c})},onRender:function(){var b=this;b.callParent(arguments);if(b.tooltip){b.setTooltip(b.tooltip,true)}},setMenu:function(g,h){var e=this,f=e.menu;if(f){delete f.parentItem;delete f.parentMenu;delete f.ownerCt;delete f.ownerItem;if(h===true||(h!==false&&e.destroyMenu)){Ext.destroy(f)}}if(g){e.menu=Ext.menu.Manager.get(g);e.menu.ownerItem=e}else{e.menu=null}if(e.rendered&&!e.destroying){e.arrowEl[e.menu?"addCls":"removeCls"](e.arrowCls)}},setHandler:function(c,d){this.handler=c||null;this.scope=d},setIcon:function(c){var d=this.iconEl;if(d){d.src=c||Ext.BLANK_IMAGE_URL}this.icon=c},setIconCls:function(d){var f=this,e=f.iconEl;if(e){if(f.iconCls){e.removeCls(f.iconCls)}if(d){e.addCls(d)}}f.iconCls=d},setText:function(f){var d=this,e=d.textEl||d.el;d.text=f;if(d.rendered){e.update(f||"");d.ownerCt.updateLayout()}},getTipAttr:function(){return this.tooltipType=="qtip"?"data-qtip":"title"},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.itemEl)}},setTooltip:function(f,e){var d=this;if(d.rendered){if(!e){d.clearTip()}if(Ext.isObject(f)){Ext.tip.QuickTipManager.register(Ext.apply({target:d.itemEl.id},f));d.tooltip=f}else{d.itemEl.dom.setAttribute(d.getTipAttr(),f)}}else{d.tooltip=f}return d}});Ext.define("Ext.menu.CheckItem",{extend:"Ext.menu.Item",alias:"widget.menucheckitem",checkedCls:Ext.baseCSSPrefix+"menu-item-checked",uncheckedCls:Ext.baseCSSPrefix+"menu-item-unchecked",groupCls:Ext.baseCSSPrefix+"menu-group-icon",hideOnClick:false,checkChangeDisabled:false,afterRender:function(){var b=this;b.callParent();b.checked=!b.checked;b.setChecked(!b.checked,true);if(b.checkChangeDisabled){b.disableCheckChange()}},initComponent:function(){var b=this;b.addEvents("beforecheckchange","checkchange");b.callParent(arguments);Ext.menu.Manager.registerCheckable(b);if(b.group){if(!b.iconCls){b.iconCls=b.groupCls}if(b.initialConfig.hideOnClick!==false){b.hideOnClick=true}}},disableCheckChange:function(){var c=this,d=c.iconEl;if(d){d.addCls(c.disabledCls)}c.checkChangeDisabled=true},enableCheckChange:function(){var c=this,d=c.iconEl;if(d){d.removeCls(c.disabledCls)}c.checkChangeDisabled=false},onClick:function(c){var d=this;if(!d.disabled&&!d.checkChangeDisabled&&!(d.checked&&d.group)){d.setChecked(!d.checked)}this.callParent([c])},onDestroy:function(){Ext.menu.Manager.unregisterCheckable(this);this.callParent(arguments)},setChecked:function(f,e){var d=this;if(d.checked!==f&&(e||d.fireEvent("beforecheckchange",d,f)!==false)){if(d.el){d.el[f?"addCls":"removeCls"](d.checkedCls)[!f?"addCls":"removeCls"](d.uncheckedCls)}d.checked=f;Ext.menu.Manager.onCheckChange(d,f);if(!e){Ext.callback(d.checkHandler,d.scope,[d,f]);d.fireEvent("checkchange",d,f)}}}});Ext.define("Ext.menu.Separator",{extend:"Ext.menu.Item",alias:"widget.menuseparator",canActivate:false,focusable:false,hideOnClick:false,plain:true,separatorCls:Ext.baseCSSPrefix+"menu-item-separator",text:" ",beforeRender:function(e,f){var d=this;d.callParent();d.addCls(d.separatorCls)}});Ext.define("Ext.toolbar.Fill",{extend:"Ext.Component",alias:"widget.tbfill",alternateClassName:"Ext.Toolbar.Fill",isFill:true,flex:1});Ext.define("Ext.dd.StatusProxy",{extend:"Ext.Component",animRepair:false,childEls:["ghost"],renderTpl:['<div class="'+Ext.baseCSSPrefix+'dd-drop-icon"></div><div id="{id}-ghost" class="'+Ext.baseCSSPrefix+'dd-drag-ghost"></div>'],constructor:function(d){var c=this;d=d||{};Ext.apply(c,{hideMode:"visibility",hidden:true,floating:true,id:c.id||Ext.id(),cls:Ext.baseCSSPrefix+"dd-drag-proxy "+this.dropNotAllowed,shadow:d.shadow||false,renderTo:Ext.getDetachedBody()});c.callParent(arguments);this.dropStatus=this.dropNotAllowed},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",setStatus:function(b){b=b||this.dropNotAllowed;if(this.dropStatus!=b){this.el.replaceCls(this.dropStatus,b);this.dropStatus=b}},reset:function(d){var f=this,e=Ext.baseCSSPrefix+"dd-drag-proxy ";f.el.replaceCls(e+f.dropAllowed,e+f.dropNotAllowed);f.dropStatus=f.dropNotAllowed;if(d){f.ghost.update("")}},update:function(d){if(typeof d=="string"){this.ghost.update(d)}else{this.ghost.update("");d.style.margin="0";this.ghost.dom.appendChild(d)}var c=this.ghost.dom.firstChild;if(c){Ext.fly(c).setStyle("float","none")}},getGhost:function(){return this.ghost},hide:function(b){this.callParent();if(b){this.reset(true)}},stop:function(){if(this.anim&&this.anim.isAnimated&&this.anim.isAnimated()){this.anim.stop()}},sync:function(){this.el.sync()},repair:function(h,g,f){var e=this;e.callback=g;e.scope=f;if(h&&e.animRepair!==false){e.el.addCls(Ext.baseCSSPrefix+"dd-drag-repair");e.el.hideUnders(true);e.anim=e.el.animate({duration:e.repairDuration||500,easing:"ease-out",to:{x:h[0],y:h[1]},stopAnimation:true,callback:e.afterRepair,scope:e})}else{e.afterRepair()}},afterRepair:function(){var b=this;b.hide(true);b.el.removeCls(Ext.baseCSSPrefix+"dd-drag-repair");if(typeof b.callback=="function"){b.callback.call(b.scope||b)}delete b.callback;delete b.scope}});Ext.define("Ext.data.proxy.Memory",{extend:"Ext.data.proxy.Client",alias:"proxy.memory",alternateClassName:"Ext.data.MemoryProxy",constructor:function(b){this.callParent([b]);this.setReader(this.reader)},updateOperation:function(g,i,k){var l=0,j=g.getRecords(),h=j.length;for(l;l<h;l++){j[l].commit()}g.setCompleted();g.setSuccessful();Ext.callback(i,k||this,[g])},create:function(){this.updateOperation.apply(this,arguments)},update:function(){this.updateOperation.apply(this,arguments)},destroy:function(){this.updateOperation.apply(this,arguments)},read:function(l,i,k){var j=this,g=j.getReader(),h=g.read(j.data);Ext.apply(l,{resultSet:h});l.setCompleted();l.setSuccessful();Ext.callback(i,k||j,[l])},clear:Ext.emptyFn});Ext.define("Ext.data.writer.Json",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.JsonWriter",alias:"writer.json",root:undefined,encode:false,allowSingle:true,writeRecords:function(d,f){var e=this.root;if(this.allowSingle&&f.length==1){f=f[0]}if(this.encode){if(e){d.params[e]=Ext.encode(f)}else{Ext.Error.raise("Must specify a root when using encode")}}else{d.jsonData=d.jsonData||{};if(e){d.jsonData[e]=f}else{d.jsonData=f}}return d}});Ext.define("Ext.LoadMask",{extend:"Ext.Component",alias:"widget.loadmask",mixins:{floating:"Ext.util.Floating",bindable:"Ext.util.Bindable"},uses:["Ext.data.StoreManager"],msg:"Loading...",msgCls:Ext.baseCSSPrefix+"mask-loading",maskCls:Ext.baseCSSPrefix+"mask",useMsg:true,useTargetEl:false,baseCls:Ext.baseCSSPrefix+"mask-msg",childEls:["msgEl"],renderTpl:'<div id="{id}-msgEl" style="position:relative" class="{[values.$comp.msgCls]}"></div>',floating:{shadow:"frame"},focusOnToFront:false,bringParentToFront:false,constructor:function(e,d){var f=this;if(!e.isComponent){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.LoadMask: LoadMask for elements has been deprecated, use Ext.dom.Element.mask & Ext.dom.Element.unmask")}e=Ext.get(e);this.isElement=true}f.ownerCt=e;if(!this.isElement){f.bindComponent(e)}f.callParent([d]);if(f.store){f.bindStore(f.store,true)}},bindComponent:function(f){var h=this,e={scope:this,resize:h.sizeMask,added:h.onComponentAdded,removed:h.onComponentRemoved},g=Ext.container.Container.hierarchyEventSource;if(f.floating){e.move=h.sizeMask;if(f.zIndexManager.front!==f){h.restack=true;h.activeOwner=f}}else{if(f.ownerCt){h.onComponentAdded(f.ownerCt)}else{h.preventBringToFront=true}}h.mon(f,e);h.mon(g,{show:h.onContainerShow,hide:h.onContainerHide,expand:h.onContainerExpand,collapse:h.onContainerCollapse,scope:h})},onComponentAdded:function(d){var c=this;delete c.activeOwner;c.floatParent=d;if(!d.floating){d=d.up("[floating]")}if(d){c.activeOwner=d;c.mon(d,"move",c.sizeMask,c)}d=c.floatParent.ownerCt;if(c.rendered&&c.isVisible()&&d){c.floatOwner=d;c.mon(d,"afterlayout",c.sizeMask,c,{single:true})}},onComponentRemoved:function(f){var h=this,g=h.activeOwner,e=h.floatOwner;if(g){h.mun(g,"move",h.sizeMask,h)}if(e){h.mun(e,"afterlayout",h.sizeMask,h)}delete h.activeOwner;delete h.floatOwner},afterRender:function(){this.callParent(arguments);this.container=this.floatParent.getContentTarget()},onContainerShow:function(b){if(this.isActiveContainer(b)){this.onComponentShow()}},onContainerHide:function(b){if(this.isActiveContainer(b)){this.onComponentHide()}},onContainerExpand:function(b){if(this.isActiveContainer(b)){this.onComponentShow()}},onContainerCollapse:function(b){if(this.isActiveContainer(b)){this.onComponentHide()}},isActiveContainer:function(b){return this.isDescendantOf(b)},onComponentHide:function(){var b=this;if(b.rendered&&b.isVisible()){b.hide();b.showNext=true}},onComponentShow:function(){if(this.showNext){this.show()}delete this.showNext},sizeMask:function(){var d=this,c;if(d.rendered&&d.isVisible()){d.center();c=d.getMaskTarget();d.getMaskEl().show().setSize(c.getSize()).alignTo(c,"tl-tl")}},bindStore:function(e,d){var f=this;f.mixins.bindable.bindStore.apply(f,arguments);e=f.store;if(e&&e.isLoading()){f.onBeforeLoad()}},getStoreListeners:function(){return{beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.onLoad,cachemiss:this.onBeforeLoad,cachefilled:this.onLoad}},onDisable:function(){this.callParent(arguments);if(this.loading){this.onLoad()}},getOwner:function(){return this.ownerCt||this.floatParent},getMaskTarget:function(){var b=this.getOwner();return this.useTargetEl?b.getTargetEl():b.getEl()},onBeforeLoad:function(){var f=this,e=f.getOwner(),d;if(!f.disabled){f.loading=true;if(e.componentLayoutCounter){f.maybeShow()}else{d=e.afterComponentLayout;e.afterComponentLayout=function(){e.afterComponentLayout=d;d.apply(e,arguments);f.maybeShow()}}}},maybeShow:function(){var c=this,d=c.getOwner();if(!d.isVisible(true)){c.showNext=true}else{if(c.loading&&d.rendered){c.show()}}},getMaskEl:function(){var b=this;return b.maskEl||(b.maskEl=b.el.insertSibling({cls:b.maskCls,style:{zIndex:b.el.getStyle("zIndex")-2}},"before"))},onShow:function(){var c=this,d=c.msgEl;c.callParent(arguments);c.loading=true;if(c.useMsg){d.show().update(c.msg)}else{d.parent().hide()}},hide:function(){if(this.isElement){this.ownerCt.unmask();this.fireEvent("hide",this);return}delete this.showNext;return this.callParent(arguments)},onHide:function(){this.callParent();this.getMaskEl().hide()},show:function(){if(this.isElement){this.ownerCt.mask(this.useMsg?this.msg:"",this.msgCls);this.fireEvent("show",this);return}return this.callParent(arguments)},afterShow:function(){this.callParent(arguments);this.sizeMask()},setZIndex:function(d){var c=this;if(c.restack){d=parseInt(c.activeOwner.el.getStyle("zIndex"),10)+1}c.getMaskEl().setStyle("zIndex",d-1);return c.mixins.floating.setZIndex.apply(c,arguments)},onLoad:function(){this.loading=false;this.hide()},onDestroy:function(){var b=this;if(b.isElement){b.ownerCt.unmask()}Ext.destroy(b.maskEl);b.callParent()}});Ext.define("Ext.FocusManager",{singleton:true,alternateClassName:["Ext.FocusMgr"],mixins:{observable:"Ext.util.Observable"},requires:["Ext.AbstractComponent","Ext.Component","Ext.ComponentManager","Ext.ComponentQuery","Ext.util.HashMap","Ext.util.KeyNav"],enabled:false,focusElementCls:Ext.baseCSSPrefix+"focus-element",focusFrameCls:Ext.baseCSSPrefix+"focus-frame",whitelist:["textfield"],constructor:function(e){var d=this,f=Ext.ComponentQuery;d.mixins.observable.constructor.call(d,e);d.addEvents("beforecomponentfocus","componentfocus","disable","enable");d.focusTask=new Ext.util.DelayedTask(d.handleComponentFocus,d);Ext.override(Ext.AbstractComponent,{onFocus:function(){this.callParent(arguments);if(d.enabled&&this.hasFocus){Array.prototype.unshift.call(arguments,this);d.onComponentFocus.apply(d,arguments)}},onBlur:function(){this.callParent(arguments);if(d.enabled&&!this.hasFocus){Array.prototype.unshift.call(arguments,this);d.onComponentBlur.apply(d,arguments)}},onDestroy:function(){this.callParent(arguments);if(d.enabled){Array.prototype.unshift.call(arguments,this);d.onComponentDestroy.apply(d,arguments)}}});Ext.override(Ext.Component,{afterHide:function(){this.callParent(arguments);if(d.enabled){Array.prototype.unshift.call(arguments,this);d.onComponentHide.apply(d,arguments)}}});d.keyNav=new Ext.util.KeyNav(Ext.getDoc(),{disabled:true,scope:d,backspace:d.focusLast,enter:d.navigateIn,esc:d.navigateOut,tab:d.navigateSiblings,space:d.navigateIn,del:d.focusLast,left:d.navigateSiblings,right:d.navigateSiblings,down:d.navigateSiblings,up:d.navigateSiblings});d.focusData={};d.subscribers=new Ext.util.HashMap();d.focusChain={};Ext.apply(f.pseudos,{focusable:function(i){var j=i.length,b=[],c=0,a;for(;c<j;c++){a=i[c];if(a.isFocusable()){b.push(a)}}return b},nextFocus:function(i,k,b){b=b||1;k=parseInt(k,10);var l=i.length,c=k,a;for(;;){if((c+=b)>=l){c=0}else{if(c<0){c=l-1}}if(c===k){return[]}if((a=i[c]).isFocusable()){return[a]}}return[]},prevFocus:function(a,b){return this.nextFocus(a,b,-1)},root:function(i){var j=i.length,b=[],c=0,a;for(;c<j;c++){a=i[c];if(!a.ownerCt){b.push(a)}}return b}})},addXTypeToWhitelist:function(c){var d=this;if(Ext.isArray(c)){Ext.Array.forEach(c,d.addXTypeToWhitelist,d);return}if(!Ext.Array.contains(d.whitelist,c)){d.whitelist.push(c)}},clearComponent:function(b){clearTimeout(this.cmpFocusDelay);if(!b.isDestroyed){b.blur()}},disable:function(){var b=this;if(!b.enabled){return}delete b.options;b.enabled=false;b.removeDOM();b.keyNav.disable();b.fireEvent("disable",b)},enable:function(d){var c=this;if(d===true){d={focusFrame:true}}c.options=d=d||{};if(c.enabled){return}c.enabled=true;c.initDOM(d);c.keyNav.enable();c.focusEl.focus();delete c.focusedCmp;c.fireEvent("enable",c)},focusLast:function(c){var d=this;if(d.isWhitelisted(d.focusedCmp)){return true}if(d.previousFocusedCmp){d.previousFocusedCmp.focus()}},getRootComponents:function(){var f=this,h=Ext.ComponentQuery,e=h.query(":focusable:root:not([floating])"),g=h.query(":focusable:root[floating]");g.sort(function(a,b){return a.el.getZIndex()>b.el.getZIndex()});return g.concat(e)},initDOM:function(l){var i=this,g=i.focusFrameCls,j=Ext.ComponentQuery.query("{getFocusEl()}:not([focusListenerAdded])"),k=0,h=j.length;if(!Ext.isReady){return Ext.onReady(i.initDOM,i)}for(;k<h;k++){j[k].addFocusListener()}if(!i.focusEl){i.focusEl=Ext.getBody();i.focusEl.dom.tabIndex=-1}if(!i.focusFrame&&l.focusFrame){i.focusFrame=Ext.getBody().createChild({cls:g,children:[{cls:g+"-top"},{cls:g+"-bottom"},{cls:g+"-left"},{cls:g+"-right"}],style:"top: -100px; left: -100px;"});i.focusFrame.setVisibilityMode(Ext.Element.DISPLAY);i.focusFrame.hide().setLeftTop(0,0)}},isWhitelisted:function(b){return b&&Ext.Array.some(this.whitelist,function(a){return b.isXType(a)})},navigateIn:function(h){var j=this,g=j.focusedCmp,e,i;if(j.isWhitelisted(g)){return true}if(!g){e=j.getRootComponents()[0];if(e){if(e.getFocusEl()===j.focusEl){j.focusEl.blur()}e.focus()}}else{i=g.hasFocus?Ext.ComponentQuery.query(">:focusable",g)[0]:g;if(i){i.focus()}else{if(Ext.isFunction(g.onClick)){h.button=0;g.onClick(h);if(g.isVisible(true)){g.focus()}else{j.navigateOut()}}}}},navigateOut:function(f){var d=this,e;if(!d.focusedCmp||!(e=d.focusedCmp.up(":focusable"))){d.focusEl.focus()}else{e.focus()}return true},navigateSiblings:function(v,A,p){var u=this,B=A||u,e=v.getKey(),x=Ext.EventObject,t=v.shiftKey||e==x.LEFT||e==x.UP,z=e==x.LEFT||e==x.RIGHT||e==x.UP||e==x.DOWN,w=t?"prev":"next",q,y,r,s;r=(B.focusedCmp&&B.focusedCmp.comp)||B.focusedCmp;if(!r&&!p){return true}if(z&&u.isWhitelisted(r)){return true}if(!r||r.is(":root")){s=u.getRootComponents()}else{p=p||r.up();if(p){s=p.getRefItems()}}if(s){q=r?Ext.Array.indexOf(s,r):-1;y=Ext.ComponentQuery.query(":"+w+"Focus("+q+")",s)[0];if(y&&r!==y){y.focus();return y}}},onComponentBlur:function(d,f){var e=this;if(e.focusedCmp===d){e.previousFocusedCmp=d;delete e.focusedCmp}if(e.focusFrame){e.focusFrame.hide()}},onComponentFocus:function(i,h){var j=this,g=j.focusChain,e;if(!i.isFocusable()){j.clearComponent(i);if(g[i.id]){return}e=i.up();if(e){g[i.id]=true;e.focus()}return}j.focusChain={};j.focusTask.delay(10,null,null,[i,i.getFocusEl()])},handleComponentFocus:function(s,w){var u=this,p,D,A,x,q,C,t,z,y,B,r,v;if(u.fireEvent("beforecomponentfocus",u,s,u.previousFocusedCmp)===false){u.clearComponent(s);return}u.focusedCmp=s;if(u.shouldShowFocusFrame(s)){p="."+u.focusFrameCls+"-";D=u.focusFrame;x=w.getPageBox();q=x.top;C=x.left;t=x.width;z=x.height;y=D.child(p+"top");B=D.child(p+"bottom");r=D.child(p+"left");v=D.child(p+"right");y.setWidth(t).setLeftTop(C,q);B.setWidth(t).setLeftTop(C,q+z-2);r.setHeight(z-2).setLeftTop(C,q+2);v.setHeight(z-2).setLeftTop(C+t-2,q+2);D.show()}u.fireEvent("componentfocus",u,s,u.previousFocusedCmp)},onComponentHide:function(h){var i=this,f=false,g=i.focusedCmp,j;if(g){f=h.hasFocus||(h.isContainer&&h.isAncestor(i.focusedCmp))}i.clearComponent(h);if(f&&(j=h.up(":focusable"))){j.focus()}else{i.focusEl.focus()}},onComponentDestroy:function(){},removeDOM:function(){var b=this;if(b.enabled||b.subscribers.length){return}Ext.destroy(b.focusFrame);delete b.focusEl;delete b.focusFrame},removeXTypeFromWhitelist:function(c){var d=this;if(Ext.isArray(c)){Ext.Array.forEach(c,d.removeXTypeFromWhitelist,d);return}Ext.Array.remove(d.whitelist,c)},setupSubscriberKeys:function(i,k){var l=this,m=i.getFocusEl(),n=k.scope,h={backspace:l.focusLast,enter:l.navigateIn,esc:l.navigateOut,scope:l},j=function(a){if(l.focusedCmp===i){return l.navigateSiblings(a,l,i)}else{return l.navigateSiblings(a)}};Ext.iterate(k,function(a,b){h[a]=function(c){var d=j(c);if(Ext.isFunction(b)&&b.call(n||i,c,d)===true){return true}return d}},l);return new Ext.util.KeyNav(m,h)},shouldShowFocusFrame:function(j){var f=this,g=f.options||{},h=j.getFocusEl(),i=Ext.getDom(h).tagName;if(!f.focusFrame||!j){return false}if(g.focusFrame){return true}if(f.focusData[j.id].focusFrame){return true}return false}});Ext.define("Ext.menu.KeyNav",{extend:"Ext.util.KeyNav",requires:["Ext.FocusManager"],constructor:function(c){var d=this;d.menu=c;d.callParent([c.el,{down:d.down,enter:d.enter,esc:d.escape,left:d.left,right:d.right,space:d.enter,tab:d.tab,up:d.up}])},down:function(d){var e=this,f=e.menu.focusedItem;if(f&&d.getKey()==Ext.EventObject.DOWN&&e.isWhitelisted(f)){return true}e.focusNextItem(1)},enter:function(d){var f=this.menu,e=f.focusedItem;if(f.activeItem){f.onClick(d)}else{if(e&&e.isFormField){return true}}},escape:function(b){Ext.menu.Manager.hideAll()},focusNextItem:function(k){var j=this.menu,h=j.items,m=j.focusedItem,n=m?h.indexOf(m):-1,i=n+k,l;while(i!=n){if(i<0){i=h.length-1}else{if(i>=h.length){i=0}}l=h.getAt(i);if(j.canActivateItem(l)){j.setActiveItem(l);break}i+=k}},isWhitelisted:function(b){return Ext.FocusManager.isWhitelisted(b)},left:function(e){var h=this.menu,g=h.focusedItem,f=h.activeItem;if(g&&this.isWhitelisted(g)){return true}h.hide();if(h.parentMenu){h.parentMenu.focus()}},right:function(j){var i=this.menu,h=i.focusedItem,g=i.activeItem,e;if(h&&this.isWhitelisted(h)){return true}if(g){e=i.activeItem.menu;if(e){g.expandMenu(0);Ext.defer(function(){e.setActiveItem(e.items.getAt(0))},25)}}},tab:function(c){var d=this;if(c.shiftKey){d.up(c)}else{d.down(c)}},up:function(d){var e=this,f=e.menu.focusedItem;if(f&&d.getKey()==Ext.EventObject.UP&&e.isWhitelisted(f)){return true}e.focusNextItem(-1)}});Ext.define("Ext.form.CheckboxManager",{extend:"Ext.util.MixedCollection",singleton:true,getByName:function(b){return this.filterBy(function(a){return a.name==b})},getWithValue:function(d,c){return this.filterBy(function(a){return a.name==d&&a.inputValue==c})},getChecked:function(b){return this.filterBy(function(a){return a.name==b&&a.checked})}});Ext.define("Ext.form.field.Checkbox",{extend:"Ext.form.field.Base",alias:["widget.checkboxfield","widget.checkbox"],alternateClassName:"Ext.form.Checkbox",requires:["Ext.XTemplate","Ext.form.CheckboxManager"],componentLayout:"field",childEls:["boxLabelEl"],fieldSubTpl:["<tpl if=\"boxLabel && boxLabelAlign == 'before'\">","{beforeBoxLabelTpl}",'<label id="{cmpId}-boxLabelEl" {boxLabelAttrTpl} class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">',"{beforeBoxLabelTextTpl}","{boxLabel}","{afterBoxLabelTextTpl}","</label>","{afterBoxLabelTpl}","</tpl>",'<input type="button" id="{id}" {inputAttrTpl}','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' class="{fieldCls} {typeCls}" autocomplete="off" hidefocus="true" />',"<tpl if=\"boxLabel && boxLabelAlign == 'after'\">","{beforeBoxLabelTpl}",'<label id="{cmpId}-boxLabelEl" {boxLabelAttrTpl} class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">',"{beforeBoxLabelTextTpl}","{boxLabel}","{afterBoxLabelTextTpl}","</label>","{afterBoxLabelTpl}","</tpl>",{disableFormats:true,compiled:true}],subTplInsertions:["beforeBoxLabelTpl","afterBoxLabelTpl","beforeBoxLabelTextTpl","afterBoxLabelTextTpl","boxLabelAttrTpl","inputAttrTpl"],isCheckbox:true,focusCls:"form-cb-focus",fieldBodyCls:Ext.baseCSSPrefix+"form-cb-wrap",checked:false,checkedCls:Ext.baseCSSPrefix+"form-cb-checked",boxLabelCls:Ext.baseCSSPrefix+"form-cb-label",boxLabelAlign:"after",inputValue:"on",checkChangeEvents:[],inputType:"checkbox",onRe:/^on$/i,initComponent:function(){this.callParent(arguments);this.getManager().add(this)},initValue:function(){var c=this,d=!!c.checked;c.originalValue=c.lastValue=d;c.setValue(d)},getElConfig:function(){var b=this;if(b.isChecked(b.rawValue,b.inputValue)){b.addCls(b.checkedCls)}return b.callParent()},getFieldStyle:function(){return Ext.isObject(this.fieldStyle)?Ext.DomHelper.generateStyles(this.fieldStyle):this.fieldStyle||""},getSubTplData:function(){var b=this;return Ext.apply(b.callParent(),{disabled:b.readOnly||b.disabled,boxLabel:b.boxLabel,boxLabelCls:b.boxLabelCls,boxLabelAlign:b.boxLabelAlign})},initEvents:function(){var b=this;b.callParent();b.mon(b.inputEl,"click",b.onBoxClick,b)},onBoxClick:function(c){var d=this;if(!d.disabled&&!d.readOnly){this.setValue(!this.checked)}},getRawValue:function(){return this.checked},getValue:function(){return this.checked},getSubmitValue:function(){var d=this.uncheckedValue,c=Ext.isDefined(d)?d:null;return this.checked?this.inputValue:c},isChecked:function(c,d){return(c===true||c==="true"||c==="1"||c===1||(((Ext.isString(c)||Ext.isNumber(c))&&d)?c==d:this.onRe.test(c)))},setRawValue:function(h){var e=this,g=e.inputEl,f=e.isChecked(h,e.inputValue);if(g){e[f?"addCls":"removeCls"](e.checkedCls)}e.checked=e.rawValue=f;return f},setValue:function(i){var j=this,l,g,h,k;if(Ext.isArray(i)){l=j.getManager().getByName(j.name,j.getFormId()).items;h=l.length;for(g=0;g<h;++g){k=l[g];k.setValue(Ext.Array.contains(i,k.inputValue))}}else{j.callParent(arguments)}return j},valueToRaw:function(b){return b},onChange:function(e,f){var g=this,h=g.handler;if(h){h.call(g.scope||g,g,e)}g.callParent(arguments)},resetOriginalValue:function(g){var i=this,k,j,h,l;if(!g){k=i.getManager().getByName(i.name,i.getFormId()).items;h=k.length;for(l=0;l<h;++l){j=k[l];if(j!==i){k[l].resetOriginalValue(true)}}}i.callParent()},beforeDestroy:function(){this.callParent();this.getManager().removeAtKey(this.id)},getManager:function(){return Ext.form.CheckboxManager},onEnable:function(){var d=this,c=d.inputEl;d.callParent();if(c){c.dom.disabled=d.readOnly}},setReadOnly:function(f){var e=this,d=e.inputEl;if(d){d.dom.disabled=!!f||e.disabled}e.callParent(arguments)},getFormId:function(){var c=this,d;if(!c.formId){d=c.up("form");if(d){c.formId=d.id}}return c.formId}});Ext.define("Ext.layout.container.boxOverflow.Scroller",{extend:"Ext.layout.container.boxOverflow.None",requires:["Ext.util.ClickRepeater","Ext.Element"],alternateClassName:"Ext.layout.boxOverflow.Scroller",mixins:{observable:"Ext.util.Observable"},animateScroll:false,scrollIncrement:20,wheelIncrement:10,scrollRepeatInterval:60,scrollDuration:400,scrollerCls:Ext.baseCSSPrefix+"box-scroller",constructor:function(f,e){var d=this;d.layout=f;Ext.apply(d,e||{});d.mixins.observable.constructor.call(d);d.addEvents("scroll");d.scrollPosition=0;d.scrollSize=0},getPrefixConfig:function(){var b=this;b.initCSSClasses();return{cls:Ext.layout.container.Box.prototype.innerCls+" "+b.beforeCtCls,cn:{id:b.layout.owner.id+"-before-scroller",cls:b.scrollerCls+" "+b.beforeScrollerCls,style:"display:none"}}},getSuffixConfig:function(){var b=this;return{cls:Ext.layout.container.Box.prototype.innerCls+" "+b.afterCtCls,cn:{id:b.layout.owner.id+"-after-scroller",cls:b.scrollerCls+" "+b.afterScrollerCls,style:"display:none"}}},getOverflowCls:function(){return Ext.baseCSSPrefix+this.layout.direction+"-box-overflow-body"},initCSSClasses:function(){var m=this,l=Ext.baseCSSPrefix,n=m.layout,k=n.getNames(),i=k.left,j=k.right,h=m.getOwnerType(n.owner);m.beforeCtCls=m.beforeCtCls||l+"box-scroller-"+i;m.afterCtCls=m.afterCtCls||l+"box-scroller-"+j;m.beforeScrollerCls=m.beforeScrollerCls||l+h+"-scroll-"+i;m.afterScrollerCls=m.afterScrollerCls||l+h+"-scroll-"+j},beginLayout:function(d){var e=this.layout,f=e.getNames();d.innerCtScrollPos=e.innerCt.dom["scroll"+f.leftCap];this.callParent(arguments)},completeLayout:function(b){this.scrollSize=b.props["content"+this.layout.getNames().widthCap];this.callParent(arguments)},finishedLayout:function(j){var f=this,g=f.layout,i=g.getNames(),h=Math.min(f.getMaxScrollPosition(),j.innerCtScrollPos);g.innerCt.dom["scroll"+i.leftCap]=h},handleOverflow:function(i){var j=this,f=j.layout,h=f.getNames(),g="get"+h.widthCap;j.captureChildElements();j.showScrollers();return{reservedSpace:j.beforeCt[g]()+j.afterCt[g]()}},captureChildElements:function(){var e=this,f=e.layout.owner.el,h,g;if(!e.beforeCt){h=e.beforeScroller=f.getById(e.layout.owner.id+"-before-scroller");g=e.afterScroller=f.getById(e.layout.owner.id+"-after-scroller");e.beforeCt=h.up("");e.afterCt=g.up("");e.createWheelListener();h.addClsOnOver(e.beforeScrollerCls+"-hover");g.addClsOnOver(e.afterScrollerCls+"-hover");h.setVisibilityMode(Ext.Element.DISPLAY);g.setVisibilityMode(Ext.Element.DISPLAY);e.beforeRepeater=new Ext.util.ClickRepeater(h,{interval:e.scrollRepeatInterval,handler:e.scrollLeft,scope:e});e.afterRepeater=new Ext.util.ClickRepeater(g,{interval:e.scrollRepeatInterval,handler:e.scrollRight,scope:e})}},createWheelListener:function(){this.layout.innerCt.on({mousewheel:function(b){this.scrollBy(b.getWheelDelta()*this.wheelIncrement*-1,false)},stopEvent:true,scope:this})},clearOverflow:function(){var b=this.layout;this.hideScrollers()},showScrollers:function(){var b=this;b.captureChildElements();b.beforeScroller.show();b.afterScroller.show();b.updateScrollButtons();b.layout.owner.addClsWithUI("scroller")},hideScrollers:function(){var b=this;if(b.beforeScroller!==undefined){b.beforeScroller.hide();b.afterScroller.hide();b.layout.owner.removeClsWithUI("scroller")}},destroy:function(){var b=this;Ext.destroy(b.beforeRepeater,b.afterRepeater,b.beforeScroller,b.afterScroller,b.beforeCt,b.afterCt)},scrollBy:function(c,d){this.scrollTo(this.getScrollPosition()+c,d)},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},updateScrollButtons:function(){var i=this,h,j,g,f;if(i.beforeScroller===undefined||i.afterScroller===undefined){return}h=i.atExtremeBefore()?"addCls":"removeCls";j=i.atExtremeAfter()?"addCls":"removeCls";g=i.beforeScrollerCls+"-disabled";f=i.afterScrollerCls+"-disabled";i.beforeScroller[h](g);i.afterScroller[j](f);i.scrolling=false},atExtremeBefore:function(){return !this.getScrollPosition()},scrollLeft:function(){this.scrollBy(-this.scrollIncrement,false)},scrollRight:function(){this.scrollBy(this.scrollIncrement,false)},getScrollPosition:function(){var f=this,d=f.layout,e;if(f.hasOwnProperty("scrollPosition")){e=f.scrollPosition}else{e=parseInt(d.innerCt.dom["scroll"+d.getNames().leftCap],10)||0}return e},getMaxScrollPosition:function(){var e=this,f=e.layout,h=f.getNames(),g=e.scrollSize-f.innerCt["get"+h.widthCap]();return(g<0)?0:g},atExtremeAfter:function(){return this.getScrollPosition()>=this.getMaxScrollPosition()},scrollTo:function(i,h){var k=this,l=k.layout,j=l.getNames(),m=k.getScrollPosition(),n=Ext.Number.constrain(i,0,k.getMaxScrollPosition());if(n!=m&&!k.scrolling){delete k.scrollPosition;if(h===undefined){h=k.animateScroll}l.innerCt.scrollTo(j.left,n,h?k.getScrollAnim():false);if(h){k.scrolling=true}else{k.updateScrollButtons()}k.fireEvent("scroll",k,n,h?k.getScrollAnim():false)}},scrollToItem:function(l,i){var m=this,n=m.layout,k=n.getNames(),j,o,p;l=m.getItem(l);if(l!==undefined){j=m.getItemVisibility(l);if(!j.fullyVisible){o=l.getBox(true,true);p=o[k.x];if(j.hiddenEnd){p-=(m.layout.innerCt["get"+k.widthCap]()-o[k.width])}m.scrollTo(p,i)}}},getItemVisibility:function(j){var l=this,q=l.getItem(j).getBox(true,true),p=l.layout,m=p.getNames(),n=q[m.x],o=n+q[m.width],r=l.getScrollPosition(),k=r+p.innerCt["get"+m.widthCap]();return{hiddenStart:n<r,hiddenEnd:o>k,fullyVisible:n>r&&o<k}}});Ext.define("Ext.Ajax",{extend:"Ext.data.Connection",singleton:true,autoAbort:false});Ext.define("Ext.data.proxy.Ajax",{requires:["Ext.util.MixedCollection","Ext.Ajax"],extend:"Ext.data.proxy.Server",alias:"proxy.ajax",alternateClassName:["Ext.data.HttpProxy","Ext.data.AjaxProxy"],actionMethods:{create:"POST",read:"GET",update:"POST",destroy:"POST"},doRequest:function(g,h,f){var i=this.getWriter(),j=this.buildRequest(g,h,f);if(g.allowWrite()){j=i.write(j)}Ext.apply(j,{headers:this.headers,timeout:this.timeout,scope:this,callback:this.createRequestCallback(j,g,h,f),method:this.getMethod(j),disableCaching:false});Ext.Ajax.request(j);return j},getMethod:function(b){return this.actionMethods[b.action]},createRequestCallback:function(i,g,h,f){var j=this;return function(b,a,c){j.processResponse(a,g,i,c,h,f)}}},function(){Ext.data.HttpProxy=this});Ext.define("Ext.data.reader.Reader",{requires:["Ext.data.ResultSet"],alternateClassName:["Ext.data.Reader","Ext.data.DataReader"],mixins:{observable:"Ext.util.Observable"},totalProperty:"total",successProperty:"success",root:"",implicitIncludes:true,readRecordsOnFailure:true,isReader:true,constructor:function(d){var c=this;c.mixins.observable.constructor.call(c,d);c.fieldCount=0;c.model=Ext.ModelManager.getModel(c.model);if(c.model&&c.model.prototype.fields){c.buildExtractors()}this.addEvents("exception")},setModel:function(e,f){var d=this;d.model=Ext.ModelManager.getModel(e);d.buildExtractors(true);if(f&&d.proxy){d.proxy.setModel(d.model,true)}},read:function(d){var c;if(d){c=d.responseText?this.getResponseData(d):this.readRecords(d)}return c||this.nullResultSet},readRecords:function(p){var o=this,k,q,r,m,n,l,j;if(o.fieldCount!==o.getFields().length){o.buildExtractors(true)}o.rawData=p;p=o.getData(p);k=true;q=0;r=[];if(o.successProperty){l=o.getSuccess(p);if(l===false||l==="false"){k=false}}if(o.messageProperty){j=o.getMessage(p)}if(o.readRecordsOnFailure||k){m=Ext.isArray(p)?p:o.getRoot(p);if(m){n=m.length}if(o.totalProperty){l=parseInt(o.getTotal(p),10);if(!isNaN(l)){n=l}}if(m){r=o.extractData(m);q=r.length}}return new Ext.data.ResultSet({total:n||q,count:q,records:r,success:k,message:j})},extractData:function(i){var k=this,o=[],q=k.model,r=i.length,n,p,l,m;if(!i.length&&Ext.isObject(i)){i=[i];r=1}for(m=0;m<r;m++){p=i[m];l=new q(undefined,k.getId(p),p,n={});l.phantom=false;k.convertRecordData(n,p,l);o.push(l);if(k.implicitIncludes){k.readAssociated(l,p)}}return o},readAssociated:function(l,n){var o=l.associations.items,m=0,r=o.length,p,q,i,k;for(;m<r;m++){p=o[m];q=this.getAssociatedDataRoot(n,p.associationKey||p.name);if(q){k=p.getReader();if(!k){i=p.associatedModel.proxy;if(i){k=i.getReader()}else{k=new this.constructor({model:p.associatedName})}}p.read(l,k,q)}}},getAssociatedDataRoot:function(c,d){return c[d]},getFields:function(){return this.model.prototype.fields.items},getData:function(b){return b},getRoot:function(b){return b},getResponseData:function(b){Ext.Error.raise("getResponseData must be implemented in the Ext.data.reader.Reader subclass")},onMetaChange:function(h){var i=this,f=h.fields||i.getFields(),j,g;i.metaData=h;i.root=h.root||i.root;i.idProperty=h.idProperty||i.idProperty;i.totalProperty=h.totalProperty||i.totalProperty;i.successProperty=h.successProperty||i.successProperty;i.messageProperty=h.messageProperty||i.messageProperty;g=h.clientIdProperty;if(i.model){i.model.setFields(f,i.idProperty,g);i.setModel(i.model,true)}else{j=Ext.define("Ext.data.reader.Json-Model"+Ext.id(),{extend:"Ext.data.Model",fields:f,clientIdProperty:g});if(i.idProperty){j.idProperty=i.idProperty}i.setModel(j,true)}},getIdProperty:function(){return this.idProperty||this.model.prototype.idProperty},buildExtractors:function(q){var m=this,j=m.getIdProperty(),k=m.totalProperty,n=m.successProperty,l=m.messageProperty,o,p,r;if(q===true){delete m.convertRecordData}if(m.convertRecordData){return}if(k){m.getTotal=m.createAccessor(k)}if(n){m.getSuccess=m.createAccessor(n)}if(l){m.getMessage=m.createAccessor(l)}if(j){p=m.model.prototype.fields.get(j);if(p){r=p.mapping;j=(r!==undefined&&r!==null)?r:j}o=m.createAccessor(j);m.getId=function(b){var a=o.call(m,b);return(a===undefined||a==="")?null:a}}else{m.getId=function(){return null}}m.convertRecordData=m.buildRecordDataExtractor()},buildRecordDataExtractor:function(){var n=this,i=n.model.prototype,o=i.clientIdProperty,p=i.fields.items,s=p.length,v=[],q="__field",t,r=0,m,u=["var me = this,\n"," fields = me.model.prototype.fields,\n"," value,\n"," internalId"];for(;r<s;r++){m=p[r];v[r]="__field"+r;u.push(",\n ",v[r],' = fields.get("',m.name,'")')}u.push(";\n\n return function(dest, source, record) {\n");for(r=0;r<s;r++){m=p[r];t=v[r];u.push(' dest["'+m.name+'"]'," = ",n.createFieldAccessExpression(m,t,"source"),";\n")}if(o){u.push(" if (record && (internalId = "+n.createFieldAccessExpression({mapping:o},null,"source")+")) {\n");u.push(" record.internalId = internalId;\n }\n")}u.push(" };");return Ext.functionFactory(u.join("")).call(n)},destroyReader:function(){var b=this;delete b.proxy;delete b.model;delete b.convertRecordData;delete b.getId;delete b.getTotal;delete b.getSuccess;delete b.getMessage}},function(){Ext.apply(this.prototype,{nullResultSet:new Ext.data.ResultSet({total:0,count:0,records:[],success:true})})});Ext.define("Ext.data.reader.Json",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.JsonReader",alias:"reader.json",root:"",useSimpleAccessors:false,readRecords:function(b){if(b.metaData){this.onMetaChange(b.metaData)}this.jsonData=b;return this.callParent([b])},getResponseData:function(f){var g,e;try{g=Ext.decode(f.responseText);return this.readRecords(g)}catch(h){e=new Ext.data.ResultSet({total:0,count:0,records:[],success:false,message:h.message});this.fireEvent("exception",this,f,e);Ext.Logger.warn("Unable to parse the JSON returned by the server");return e}},buildExtractors:function(){var b=this;b.callParent(arguments);if(b.root){b.getRoot=b.createAccessor(b.root)}else{b.getRoot=function(a){return a}}},extractData:function(g){var h=this.record,i=[],j,f;if(h){j=g.length;if(!j&&Ext.isObject(g)){j=1;g=[g]}for(f=0;f<j;f++){i[f]=g[f][h]}}else{i=g}return this.callParent([i])},createAccessor:(function(){var b=/[\[\.]/;return function(d){if(Ext.isEmpty(d)){return Ext.emptyFn}if(Ext.isFunction(d)){return d}if(this.useSimpleAccessors!==true){var a=String(d).search(b);if(a>=0){return Ext.functionFactory("obj","return obj"+(a>0?".":"")+d)}}return function(c){return c[d]}}}()),createFieldAccessExpression:(function(){var b=/[\[\.]/;return function(k,o,p){var n=this,m=(k.mapping!==null),l=m?k.mapping:k.name,a,j;if(typeof l==="function"){a=o+".mapping("+p+", this)"}else{if(this.useSimpleAccessors===true||((j=String(l).search(b))<0)){if(!m||isNaN(l)){l='"'+l+'"'}a=p+"["+l+"]"}else{a=p+(j>0?".":"")+l}}if(k.defaultValue!==undefined){a="("+a+" === undefined) ? "+o+".defaultValue : "+a}if(k.convert){a=o+".convert("+a+", record)"}return a}}())});Ext.define("Ext.data.Store",{extend:"Ext.data.AbstractStore",alias:"store.store",requires:["Ext.data.StoreManager","Ext.data.Model","Ext.data.proxy.Ajax","Ext.data.proxy.Memory","Ext.data.reader.Json","Ext.data.writer.Json","Ext.util.LruCache"],uses:["Ext.ModelManager","Ext.util.Grouper"],remoteSort:false,remoteFilter:false,remoteGroup:false,groupField:undefined,groupDir:"ASC",trailingBufferZone:25,leadingBufferZone:200,pageSize:undefined,currentPage:1,clearOnPageLoad:true,loading:false,sortOnFilter:true,buffered:false,purgePageCount:5,clearRemovedOnLoad:true,defaultPageSize:25,statics:{recordIdFn:function(b){return b.internalId},recordIndexFn:function(b){return b.index}},onClassExtended:function(f,i,g){var j=i.model,h;if(typeof j=="string"){h=g.onBeforeCreated;g.onBeforeCreated=function(){var a=this,b=arguments;Ext.require(j,function(){h.apply(a,b)})}}},constructor:function(g){g=Ext.Object.merge({},g);var k=this,i=g.groupers||k.groupers,h=g.groupField||k.groupField,l,j;j=g.data||k.data;k.data=new Ext.util.MixedCollection(false,Ext.data.Store.recordIdFn);if(j){k.inlineData=j;delete g.data}if(!i&&h){i=[{property:h,direction:g.groupDir||k.groupDir}]}delete g.groupers;k.groupers=new Ext.util.MixedCollection();k.groupers.addAll(k.decodeGroupers(i));this.callParent([g]);if(k.buffered){k.pageMap=new k.PageMap({pageSize:k.pageSize,maxSize:k.purgePageCount});k.pagesRequested={};k.sortOnLoad=false;k.filterOnLoad=false}if(k.groupers.items.length){k.sort(k.groupers.items,"prepend",false)}l=k.proxy;j=k.inlineData;if(!k.buffered&&!k.pageSize){k.pageSize=k.defaultPageSize}if(j){if(l instanceof Ext.data.proxy.Memory){l.data=j;k.read()}else{k.add.apply(k,[j])}k.sort();delete k.inlineData}else{if(k.autoLoad){Ext.defer(k.load,10,k,[typeof k.autoLoad==="object"?k.autoLoad:undefined])}}},onBeforeSort:function(){var b=this.groupers;if(b.getCount()>0){this.sort(b.items,"prepend",false)}},decodeGroupers:function(j){if(!Ext.isArray(j)){if(j===undefined){j=[]}else{j=[j]}}var k=j.length,i=Ext.util.Grouper,g,l,h=[];for(l=0;l<k;l++){g=j[l];if(!(g instanceof i)){if(Ext.isString(g)){g={property:g}}g=Ext.apply({root:"data",direction:"ASC"},g);if(g.fn){g.sorterFn=g.fn}if(typeof g=="function"){g={sorterFn:g}}h.push(new i(g))}else{h.push(g)}}return h},group:function(j,i){var k=this,l=false,g,h;if(Ext.isArray(j)){h=j}else{if(Ext.isObject(j)){h=[j]}else{if(Ext.isString(j)){g=k.groupers.get(j);if(!g){g={property:j,direction:i};h=[g]}else{if(i===undefined){g.toggle()}else{g.setDirection(i)}}}}}if(h&&h.length){l=true;h=k.decodeGroupers(h);k.groupers.clear();k.groupers.addAll(h)}if(k.remoteGroup){k.load({scope:k,callback:k.fireGroupChange})}else{k.sort(null,null,null,l);k.fireGroupChange()}},clearGrouping:function(){var i=this,h=i.groupers.items,j=h.length,g,f;for(f=0;f<j;f++){g=h[f];i.sorters.remove(g)}i.groupers.clear();if(i.remoteGroup){i.load({scope:i,callback:i.fireGroupChange})}else{i.sort();i.fireEvent("groupchange",i,i.groupers)}},isGrouped:function(){return this.groupers.getCount()>0},fireGroupChange:function(){this.fireEvent("groupchange",this,this.groupers)},getGroups:function(q){var o=this.data.items,r=o.length,p=[],i={},m,l,k,n;for(n=0;n<r;n++){m=o[n];l=this.getGroupString(m);k=i[l];if(k===undefined){k={name:l,children:[]};p.push(k);i[l]=k}k.children.push(m)}return q?i[q]:p},getGroupsForGrouper:function(m,q){var o=m.length,n=[],r,p,k,i,l;for(l=0;l<o;l++){k=m[l];p=q.getGroupString(k);if(p!==r){i={name:p,grouper:q,records:[]};n.push(i)}i.records.push(k);r=p}return n},getGroupsForGrouperIndex:function(p,k){var m=this,l=m.groupers,i=l.getAt(k),j=m.getGroupsForGrouper(p,i),n=j.length,o;if(k+1<l.length){for(o=0;o<n;o++){j[o].children=m.getGroupsForGrouperIndex(j[o].records,k+1)}}for(o=0;o<n;o++){j[o].depth=k}return j},getGroupData:function(d){var c=this;if(d!==false){c.sort()}return c.getGroupsForGrouperIndex(c.data.items,0)},getGroupString:function(d){var c=this.groupers.first();if(c){return d.get(c.property)}return""},insert:function(m,n){var j=this,k=false,l,h,i;n=[].concat(n);for(l=0,i=n.length;l<i;l++){h=j.createModel(n[l]);h.set(j.modelDefaults);n[l]=h;j.data.insert(m+l,h);h.join(j);k=k||h.phantom===true}if(j.snapshot){j.snapshot.addAll(n)}if(j.requireSort){j.suspendEvents();j.sort();j.resumeEvents()}j.fireEvent("add",j,n,m);j.fireEvent("datachanged",j);if(j.autoSync&&k&&!j.autoSyncSuspended){j.sync()}},add:function(g){if(!Ext.isArray(g)){g=Array.prototype.slice.apply(arguments)}var j=this,l=0,k=g.length,h,i=j.sorters&&j.sorters.items.length;if(i&&k===1){return[j.addSorted(j.createModel(g[0]))]}for(;l<k;l++){h=j.createModel(g[l]);g[l]=h}if(i){j.requireSort=true}j.insert(j.data.length,g);delete j.requireSort;return g},addSorted:function(e){var f=this,d=f.data.findInsertionIndex(e,f.generateComparator());f.insert(d,e);return e},createModel:function(b){if(!b.isModel){b=Ext.ModelManager.create(b,this.model)}return b},each:function(k,l){var j=this.data.items,d=j.length,h,i;for(i=0;i<d;i++){h=j[i];if(k.call(l||h,h,i,d)===false){break}}},remove:function(q,i){if(!Ext.isArray(q)){q=[q]}i=i===true;var m=this,l=false,p=0,r=q.length,k,n,o;for(;p<r;p++){o=q[p];n=m.data.indexOf(o);if(m.snapshot){m.snapshot.remove(o)}if(n>-1){k=o.phantom===true;if(!i&&!k){m.removed.push(o)}o.unjoin(m);m.data.remove(o);l=l||!k;m.fireEvent("remove",m,o,n)}}m.fireEvent("datachanged",m);if(!i&&m.autoSync&&l&&!m.autoSyncSuspended){m.sync()}},removeAt:function(c){var d=this.getAt(c);if(d){this.remove(d)}},load:function(d){var c=this;d=d||{};if(typeof d=="function"){d={callback:d}}d.groupers=d.groupers||c.groupers.items;d.page=d.page||c.currentPage;d.start=(d.start!==undefined)?d.start:(c.currentPage-1)*c.pageSize;d.limit=d.limit||c.pageSize;d.addRecords=d.addRecords||false;if(c.buffered){return c.loadToPrefetch(d)}return c.callParent([d])},onProxyLoad:function(f){var i=this,j=f.getResultSet(),g=f.getRecords(),h=f.wasSuccessful();if(j){i.totalCount=j.total}if(h){i.loadRecords(g,f)}i.loading=false;i.fireEvent("load",i,g,h);i.fireEvent("read",i,g,f.wasSuccessful());Ext.callback(f.callback,f.scope||i,[g,f,h])},getNewRecords:function(){return this.data.filterBy(this.filterNew).items},getUpdatedRecords:function(){return this.data.filterBy(this.filterUpdated).items},filter:function(l,k){if(Ext.isString(l)){l={property:l,value:k}}var m=this,i=m.decodeFilters(l),h=0,j=m.sorters.length&&m.sortOnFilter&&!m.remoteSort,n=i.length;for(;h<n;h++){m.filters.replace(i[h])}if(m.remoteFilter){if(m.buffered){m.pageMap.clear();m.loadPage(1)}else{m.currentPage=1;m.load()}}else{if(m.filters.getCount()){m.snapshot=m.snapshot||m.data.clone();m.data=m.data.filter(m.filters.items);if(j){m.sort()}else{m.fireEvent("datachanged",m);m.fireEvent("refresh",m)}}}},clearFilter:function(d){var c=this;c.filters.clear();if(c.remoteFilter){if(d){return}if(c.buffered){c.pageMap.clear();c.loadPage(1)}else{c.currentPage=1;c.load()}}else{if(c.isFiltered()){c.data=c.snapshot.clone();delete c.snapshot;if(d!==true){c.fireEvent("datachanged",c);c.fireEvent("refresh",c)}}}},isFiltered:function(){var b=this.snapshot;return !!b&&b!==this.data},filterBy:function(d,e){var f=this;f.snapshot=f.snapshot||f.data.clone();f.data=f.queryBy(d,e||f);f.fireEvent("datachanged",f);f.fireEvent("refresh",f)},queryBy:function(e,f){var h=this,g=h.snapshot||h.data;return g.filterBy(e,f||h)},loadData:function(j,i){var n=this.model,k=j.length,l=[],m,h;for(m=0;m<k;m++){h=j[m];if(!(h instanceof Ext.data.Model)){h=Ext.ModelManager.create(h,n)}l.push(h)}this.loadRecords(l,{addRecords:i})},loadRawData:function(h,f){var i=this,g=i.proxy.reader.read(h),j=g.records;if(g.success){i.totalCount=g.total;i.loadRecords(j,{addRecords:f});i.fireEvent("load",i,j,true)}},loadRecords:function(h,n){var k=this,m=0,l=h.length,j=(n=n||{}).start,i=k.snapshot;if(!n.addRecords){delete k.snapshot;k.clearData(true)}else{if(i){i.addAll(h)}}k.data.addAll(h);if(typeof j!="undefined"){for(;m<l;m++){h[m].index=j+m;h[m].join(k)}}else{for(;m<l;m++){h[m].join(k)}}k.suspendEvents();if(k.filterOnLoad&&!k.remoteFilter){k.filter()}if(k.sortOnLoad&&!k.remoteSort){k.sort()}k.resumeEvents();k.fireEvent("datachanged",k,h);k.fireEvent("refresh",k)},loadPage:function(f,e){var d=this;d.currentPage=f;e=Ext.apply({page:f,start:(f-1)*d.pageSize,limit:d.pageSize,addRecords:!d.clearOnPageLoad},e);if(d.buffered){return d.loadToPrefetch(e)}d.read(e)},nextPage:function(b){this.loadPage(this.currentPage+1,b)},previousPage:function(b){this.loadPage(this.currentPage-1,b)},clearData:function(g){var h=this,f=h.data.items,e=f.length;while(e--){f[e].unjoin(h)}h.data.clear();if(g!==true||h.clearRemovedOnLoad){h.removed=[]}},loadToPrefetch:function(d){var c=this;c.on({prefetch:c.onItitialPrefetch,scope:c,single:true});return c.prefetch(d||{})},onItitialPrefetch:function(h,e,g,f){h.guaranteeRange(f.start,(h.viewSize||h.pageSize)-1)},prefetch:function(h){var g=this,f=g.pageSize,e;if(f){if(g.lastPageSize&&f!=g.lastPageSize){Ext.error.raise("pageSize cannot be dynamically altered")}if(!g.pageMap.pageSize){g.pageMap.pageSize=f}}else{g.pageSize=g.pageMap.pageSize=f=h.limit}g.lastPageSize=f;if(!h.page){h.page=g.getPageFromRecordIndex(h.start);h.start=(h.page-1)*f;h.limit=Math.ceil(h.limit/f)*f}if(!g.pagesRequested[h.page]){g.pagesRequested[h.page]=true;h=Ext.apply({action:"read",filters:g.filters.items,sorters:g.sorters.items},h);e=new Ext.data.Operation(h);if(g.fireEvent("beforeprefetch",g,e)!==false){g.loading=true;g.proxy.read(e,g.onProxyPrefetch,g)}}return g},prefetchPage:function(k,n){var l=this,h=l.pageSize||l.defaultPageSize,j=(k-1)*l.pageSize,i=j+h,m=l.getTotalCount();if(m){i=Math.min(i,m)}if(l.getCount()===m){return}l.prefetch(Ext.apply({page:k,start:j,limit:h},n))},onProxyPrefetch:function(g){var k=this,l=g.getResultSet(),h=g.getRecords(),i=g.wasSuccessful(),j=g.page;if(l){k.totalCount=l.total;k.fireEvent("totalcountchange",k.totalCount)}if(j!==undefined){delete k.pagesRequested[j]}if(i){k.cachePage(h,g.page)}k.loading=false;k.fireEvent("prefetch",k,h,i,g);Ext.callback(g.callback,g.scope||k,[h,g,i])},cachePage:function(e,f){var d=this;if(!Ext.isDefined(d.totalCount)){d.totalCount=e.length;d.fireEvent("totalcountchange",d.totalCount)}d.pageMap.addPage(f,e)},rangeCached:function(c,d){return this.pageMap&&this.pageMap.hasRange(c,d)},pageCached:function(b){return this.pageMap&&this.pageMap.hasPage(b)},rangeSatisfied:function(c,d){return this.rangeCached(c,d)},getPageFromRecordIndex:function(b){return Math.floor(b/this.pageSize)+1},onGuaranteedRange:function(k){var j=this,g=j.getTotalCount(),i=k.prefetchStart,h=((g-1)<k.prefetchEnd)?g-1:k.prefetchEnd,l;h=Math.max(0,h);if(i>h){Ext.log({level:"warn",msg:"Start ("+i+") was greater than end ("+h+") for the range of records requested ("+i+"-"+k.prefetchEnd+")"+(this.storeId?' from store "'+this.storeId+'"':"")})}l=j.pageMap.getRange(i,h);j.fireEvent("guaranteedrange",l,i,h);if(k.cb){k.cb.call(k.scope||j,l,i,h)}},prefetchRange:function(i,g){var k=this,l,h,j;if(!k.rangeCached(i,g)){l=k.getPageFromRecordIndex(i);h=k.getPageFromRecordIndex(g);k.pageMap.maxSize=k.purgePageCount?(h-l+1)+k.purgePageCount:0;for(j=l;j<=h;j++){if(!k.pageCached(j)){k.prefetchPage(j)}}}},guaranteeRange:function(k,p,j,m){p=(p>this.totalCount)?this.totalCount-1:p;var l=this,n=l.lastRequestStart,o={prefetchStart:k,prefetchEnd:p,cb:j,scope:m},i;l.lastRequestStart=k;if(l.rangeCached(k,p)){if(k<n){k=Math.max(k-l.leadingBufferZone,0);p=Math.min(p+l.trailingBufferZone,l.totalCount-1)}else{k=Math.max(Math.min(k-l.trailingBufferZone,l.totalCount-l.pageSize),0);p=Math.min(p+l.leadingBufferZone,l.totalCount-1)}if(!l.rangeCached(k,p)){l.prefetchRange(k,p)}l.onGuaranteedRange(o)}else{l.fireEvent("cachemiss",l,k,p);k=Math.min(Math.max(Math.floor(k-((l.leadingBufferZone+l.trailingBufferZone)/2)),0),l.totalCount-l.pageSize);p=Math.min(Math.max(Math.ceil(p+((l.leadingBufferZone+l.trailingBufferZone)/2)),0),l.totalCount-1);i=function(a,b){if(l.rangeCached(o.prefetchStart,o.prefetchEnd)){l.fireEvent("cachefilled",l,k,p);l.pageMap.un("pageAdded",i);l.onGuaranteedRange(o)}};l.pageMap.on("pageAdded",i);l.prefetchRange(o.prefetchStart,o.prefetchEnd);l.prefetchRange(k,p)}},sort:function(){var c=this,d=c.pageMap;if(c.buffered){if(c.remoteSort){d.clear();c.callParent(arguments)}else{c.callParent(arguments)}}else{c.callParent(arguments)}},doSort:function(f){var h=this,g,i,j;if(h.remoteSort){if(h.buffered){h.pageMap.clear();h.loadPage(1)}else{h.load()}}else{h.data.sortBy(f);if(!h.buffered){g=h.getRange();i=g.length;j=0;for(;j<i;j++){g[j].index=j}}h.fireEvent("datachanged",h);h.fireEvent("refresh",h)}},find:function(l,m,j,k,i,n){var h=this.createFilterFn(l,m,k,i,n);return h?this.data.findIndexBy(h,null,j):-1},findRecord:function(){var c=this,d=c.find.apply(c,arguments);return d!==-1?c.getAt(d):null},createFilterFn:function(i,j,h,g,f){if(Ext.isEmpty(j)){return false}j=this.data.createValueMatcher(j,h,g,f);return function(a){return j.test(a.data[i])}},findExact:function(d,e,f){return this.data.findIndexBy(function(a){return a.isEqual(a.get(d),e)},this,f)},findBy:function(d,e,f){return this.data.findIndexBy(d,e,f)},collect:function(f,g,j){var i=this,h=(j===true&&i.snapshot)?i.snapshot:i.data;return h.collect(f,"data",g)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalCount},getAt:function(b){return this.data.getAt(b)},getRange:function(c,d){return this.data.getRange(c,d)},getById:function(b){return(this.snapshot||this.data).findBy(function(a){return a.getId()===b})},indexOf:function(b){return this.data.indexOf(b)},indexOfTotal:function(d){var c=d.index;if(c||c===0){return c}return this.indexOf(d)},indexOfId:function(b){return this.indexOf(this.getById(b))},removeAll:function(d){var c=this;c.clearData();if(c.snapshot){c.snapshot.clear()}if(c.pageMap){c.pageMap.clear()}if(d!==true){c.fireEvent("clear",c)}},first:function(d){var c=this;if(d&&c.isGrouped()){return c.aggregate(function(a){return a.length?a[0]:undefined},c,true)}else{return c.data.first()}},last:function(d){var c=this;if(d&&c.isGrouped()){return c.aggregate(function(a){var b=a.length;return b?a[b-1]:undefined},c,true)}else{return c.data.last()}},sum:function(f,e){var d=this;if(e&&d.isGrouped()){return d.aggregate(d.getSum,d,true,[f])}else{return d.getSum(d.data.items,f)}},getSum:function(f,h){var i=0,j=0,g=f.length;for(;j<g;++j){i+=f[j].get(h)}return i},count:function(d){var c=this;if(d&&c.isGrouped()){return c.aggregate(function(a){return a.length},c,true)}else{return c.getCount()}},min:function(f,e){var d=this;if(e&&d.isGrouped()){return d.aggregate(d.getMin,d,true,[f])}else{return d.getMin(d.data.items,f)}},getMin:function(g,i){var k=1,h=g.length,j,l;if(h>0){l=g[0].get(i)}for(;k<h;++k){j=g[k].get(i);if(j<l){l=j}}return l},max:function(f,e){var d=this;if(e&&d.isGrouped()){return d.aggregate(d.getMax,d,true,[f])}else{return d.getMax(d.data.items,f)}},getMax:function(l,i){var k=1,g=l.length,j,h;if(g>0){h=l[0].get(i)}for(;k<g;++k){j=l[k].get(i);if(j>h){h=j}}return h},average:function(f,e){var d=this;if(e&&d.isGrouped()){return d.aggregate(d.getAverage,d,true,[f])}else{return d.getAverage(d.data.items,f)}},getAverage:function(f,h){var j=0,g=f.length,i=0;if(f.length>0){for(;j<g;++j){i+=f[j].get(h)}return i/g}return 0},aggregate:function(l,i,n,m){m=m||[];if(n&&this.isGrouped()){var r=this.getGroups(),p=0,o=r.length,q={},k;for(;p<o;++p){k=r[p];q[k.name]=l.apply(i||this,[k.children].concat(m))}return q}else{return l.apply(i||this,[this.data.items].concat(m))}},commitChanges:function(){var h=this,g=h.getModifiedRecords(),f=g.length,e=0;for(;e<f;e++){g[e].commit()}h.removed.length=0},filterNewOnly:function(b){return b.phantom===true},getRejectRecords:function(){var b=this.data.filterBy(this.filterNewOnly).items;return b.concat(this.getUpdatedRecords())},rejectChanges:function(){var j=this,i=j.getRejectRecords(),g=i.length,f=0,h;for(;f<g;f++){h=i[f];h.reject();if(h.phantom){j.remove(h)}}i=j.removed;g=i.length;for(f=0;f<g;f++){h=i[f];j.insert(h.index||0,h);h.reject()}j.removed.length=0}},function(){Ext.regStore("ext-empty-store",{fields:[],proxy:"memory"});this.prototype.PageMap=new Ext.Class({extend:"Ext.util.LruCache",getPageFromRecordIndex:this.prototype.getPageFromRecordIndex,addPage:function(c,d){this.add(c,d);this.fireEvent("pageAdded",c,d)},getPage:function(b){return this.get(b)},hasRange:function(g,e){var h=this.getPageFromRecordIndex(g),f=this.getPageFromRecordIndex(e);for(;h<=f;h++){if(!this.hasPage(h)){return false}}return true},hasPage:function(b){return !!this.map[b]},getRange:function(B,A){if(!this.hasRange(B,A)){Ext.Error.raise("PageMap asked for range which it does not have")}var t=this,w=t.getPageFromRecordIndex(B),q=t.getPageFromRecordIndex(A),z=(w-1)*t.pageSize,p=(q*t.pageSize)-1,u=w,i=[],r,v,s,y=0,x;for(;u<=q;u++){if(u==w){r=B-z;s=true}else{r=0;s=false}if(u==q){v=t.pageSize-(p-A);s=true}if(s){Ext.Array.push(i,Ext.Array.slice(t.getPage(u),r,v))}else{Ext.Array.push(i,t.getPage(u))}}for(x=i.length;y<x;y++){i[y].index=B++}return i}})});Ext.define("Ext.selection.Model",{extend:"Ext.util.Observable",alternateClassName:"Ext.AbstractSelectionModel",requires:["Ext.data.StoreManager"],mixins:{bindable:"Ext.util.Bindable"},allowDeselect:false,selected:null,pruneRemoved:true,constructor:function(d){var c=this;d=d||{};Ext.apply(c,d);c.addEvents("selectionchange","focuschange");c.modes={SINGLE:true,SIMPLE:true,MULTI:true};c.setSelectionMode(d.mode||c.mode);c.selected=new Ext.util.MixedCollection();c.callParent(arguments)},bindStore:function(e,d){var f=this;f.mixins.bindable.bindStore.apply(f,arguments);if(f.store&&!d){f.refresh()}},getStoreListeners:function(){var b=this;return{add:b.onStoreAdd,clear:b.onStoreClear,remove:b.onStoreRemove,update:b.onStoreUpdate}},selectAll:function(g){var j=this,k=j.store.getRange(),l=0,h=k.length,i=j.getSelection().length;j.bulkChange=true;for(;l<h;l++){j.doSelect(k[l],true,g)}delete j.bulkChange;j.maybeFireSelectionChange(j.getSelection().length!==i)},deselectAll:function(g){var j=this,k=j.getSelection(),l=0,h=k.length,i=j.getSelection().length;j.bulkChange=true;for(;l<h;l++){j.doDeselect(k[l],g)}delete j.bulkChange;j.maybeFireSelectionChange(j.getSelection().length!==i)},selectWithEvent:function(f,g,h){var e=this;switch(e.selectionMode){case"MULTI":if(g.ctrlKey&&e.isSelected(f)){e.doDeselect(f,false)}else{if(g.shiftKey&&e.lastFocused){e.selectRange(e.lastFocused,f,g.ctrlKey)}else{if(g.ctrlKey){e.doSelect(f,true,false)}else{if(e.isSelected(f)&&!g.shiftKey&&!g.ctrlKey&&e.selected.getCount()>1){e.doSelect(f,h,false)}else{e.doSelect(f,false)}}}}break;case"SIMPLE":if(e.isSelected(f)){e.doDeselect(f)}else{e.doSelect(f,true)}break;case"SINGLE":if(e.allowDeselect&&e.isSelected(f)){e.doDeselect(f)}else{e.doSelect(f,false)}break}},selectRange:function(m,r,i,t){var o=this,n=o.store,s=0,p,q,v,u=[];if(o.isLocked()){return}if(!i){o.deselectAll(true)}if(!Ext.isNumber(m)){m=n.indexOf(m)}if(!Ext.isNumber(r)){r=n.indexOf(r)}if(m>r){q=r;r=m;m=q}for(p=m;p<=r;p++){if(o.isSelected(n.getAt(p))){s++}}if(!t){v=-1}else{v=(t=="up")?m:r}for(p=m;p<=r;p++){if(s==(r-m+1)){if(p!=v){o.doDeselect(p,true)}}else{u.push(n.getAt(p))}}o.doMultiSelect(u,true)},select:function(d,f,e){if(Ext.isDefined(d)){this.doSelect(d,f,e)}},deselect:function(c,d){this.doDeselect(c,d)},doSelect:function(j,h,f){var i=this,g;if(i.locked||!i.store){return}if(typeof j==="number"){j=[i.store.getAt(j)]}if(i.selectionMode=="SINGLE"&&j){g=j.length?j[0]:j;i.doSingleSelect(g,f)}else{i.doMultiSelect(j,h,f)}},doMultiSelect:function(t,i,l){var n=this,s=n.selected,m=false,q=0,o,p;if(n.locked){return}t=!Ext.isArray(t)?[t]:t;o=t.length;if(!i&&s.getCount()>0){if(n.doDeselect(n.getSelection(),l)===false){return}}function r(){s.add(p);m=true}for(;q<o;q++){p=t[q];if(i&&n.isSelected(p)){continue}n.lastSelected=p;n.onSelectChange(p,true,l,r)}if(!n.preventFocus){n.setLastFocused(p,l)}n.maybeFireSelectionChange(m&&!l)},doDeselect:function(t,l){var m=this,s=m.selected,q=0,n,p,i=0,o=0;if(m.locked||!m.store){return false}if(typeof t==="number"){t=[m.store.getAt(t)]}else{if(!Ext.isArray(t)){t=[t]}}function r(){++o;s.remove(p)}n=t.length;for(;q<n;q++){p=t[q];if(m.isSelected(p)){if(m.lastSelected==p){m.lastSelected=s.last()}++i;m.onSelectChange(p,false,l,r)}}m.maybeFireSelectionChange(o>0&&!l);return o===i},doSingleSelect:function(h,g){var k=this,i=false,l=k.selected;if(k.locked){return}if(k.isSelected(h)){return}function j(){k.bulkChange=true;if(l.getCount()>0&&k.doDeselect(k.lastSelected,g)===false){delete k.bulkChange;return false}delete k.bulkChange;l.add(h);k.lastSelected=h;i=true}k.onSelectChange(h,true,g,j);if(i){if(!g){k.setLastFocused(h)}k.maybeFireSelectionChange(!g)}},setLastFocused:function(h,e){var g=this,f=g.lastFocused;g.lastFocused=h;if(h!==f){g.onLastFocusChanged(f,h,e)}},isFocused:function(b){return b===this.getLastFocused()},maybeFireSelectionChange:function(d){var c=this;if(d&&!c.bulkChange){c.fireEvent("selectionchange",c,c.getSelection())}},getLastSelected:function(){return this.lastSelected},getLastFocused:function(){return this.lastFocused},getSelection:function(){return this.selected.getRange()},getSelectionMode:function(){return this.selectionMode},setSelectionMode:function(b){b=b?b.toUpperCase():"SINGLE";this.selectionMode=this.modes[b]?b:"SINGLE"},isLocked:function(){return this.locked},setLocked:function(b){this.locked=!!b},isSelected:function(b){b=Ext.isNumber(b)?this.store.getAt(b):b;return this.selected.indexOf(b)!==-1},hasSelection:function(){return this.selected.getCount()>0},refresh:function(){var l=this,i=[],m=l.getSelection(),j=m.length,n,k,o=0,p=this.getLastFocused();for(;o<j;o++){n=m[o];if(!this.pruneRemoved||l.store.indexOf(n)!==-1){i.push(n)}}if(l.selected.getCount()!=i.length){k=true}l.clearSelections();if(l.store.indexOf(p)!==-1){this.setLastFocused(p,true)}if(i.length){l.doSelect(i,false,true)}l.maybeFireSelectionChange(k)},clearSelections:function(){this.selected.clear();this.lastSelected=null;this.setLastFocused(null)},onStoreAdd:function(){},onStoreClear:function(){if(this.selected.getCount>0){this.clearSelections();this.maybeFireSelectionChange(true)}},onStoreRemove:function(f,g,j){var h=this,i=h.selected;if(h.locked||!h.pruneRemoved){return}if(i.remove(g)){if(h.lastSelected==g){h.lastSelected=null}if(h.getLastFocused()==g){h.setLastFocused(null)}h.maybeFireSelectionChange(true)}},getCount:function(){return this.selected.getCount()},destroy:function(){},onStoreUpdate:function(){},onSelectChange:function(e,f,d){},onLastFocusChanged:function(c,d){this.fireEvent("focuschange",this,c,d)},onEditorKey:function(c,d){},bindComponent:function(b){}});Ext.define("Ext.selection.DataViewModel",{extend:"Ext.selection.Model",requires:["Ext.util.KeyNav"],deselectOnContainerClick:true,enableKeyNav:true,constructor:function(b){this.addEvents("beforedeselect","beforeselect","deselect","select");this.callParent(arguments)},bindComponent:function(e){var d=this,f={refresh:d.refresh,scope:d};d.view=e;d.bindStore(e.getStore());f[e.triggerEvent]=d.onItemClick;f[e.triggerCtEvent]=d.onContainerClick;e.on(f);if(d.enableKeyNav){d.initKeyNav(e)}},onItemClick:function(e,g,i,j,h){this.selectWithEvent(g,h)},onContainerClick:function(){if(this.deselectOnContainerClick){this.deselectAll()}},initKeyNav:function(d){var c=this;if(!d.rendered){d.on({render:Ext.Function.bind(c.initKeyNav,c,[d]),single:true});return}d.el.set({tabIndex:-1});c.keyNav=new Ext.util.KeyNav(d.el,{down:Ext.pass(c.onNavKey,[1],c),right:Ext.pass(c.onNavKey,[1],c),left:Ext.pass(c.onNavKey,[-1],c),up:Ext.pass(c.onNavKey,[-1],c),scope:c})},onNavKey:function(i){i=i||1;var j=this,g=j.view,k=j.getSelection()[0],l=j.view.store.getCount(),h;if(k){h=g.indexOf(g.getNode(k))+i}else{h=0}if(h<0){h=l-1}else{if(h>=l){h=0}}j.select(h)},onSelectChange:function(h,l,m,j){var k=this,i=k.view,n=l?"select":"deselect";if((m||k.fireEvent("before"+n,k,h))!==false&&j()!==false){if(l){i.onItemSelect(h)}else{i.onItemDeselect(h)}if(!m){k.fireEvent(n,k,h)}}},destroy:function(){Ext.destroy(this.keyNav);this.callParent()}});Ext.define("Ext.view.AbstractView",{extend:"Ext.Component",requires:["Ext.LoadMask","Ext.data.StoreManager","Ext.CompositeElementLite","Ext.DomQuery","Ext.selection.DataViewModel"],mixins:{bindable:"Ext.util.Bindable"},inheritableStatics:{getRecord:function(b){return this.getBoundView(b).getRecord(b)},getBoundView:function(b){return Ext.getCmp(b.boundView)}},deferInitialRefresh:true,itemCls:Ext.baseCSSPrefix+"dataview-item",loadingText:"Loading...",loadMask:true,loadingUseMsg:true,selectedItemCls:Ext.baseCSSPrefix+"item-selected",emptyText:"",deferEmptyText:true,trackOver:false,blockRefresh:false,preserveScrollOnRefresh:false,last:false,triggerEvent:"itemclick",triggerCtEvent:"containerclick",addCmpEvents:function(){},initComponent:function(){var h=this,f=Ext.isDefined,g=h.itemTpl,e={};if(g){if(Ext.isArray(g)){g=g.join("")}else{if(Ext.isObject(g)){e=Ext.apply(e,g.initialConfig);g=g.html}}if(!h.itemSelector){h.itemSelector="."+h.itemCls}g=Ext.String.format('<tpl for="."><div class="{0}">{1}</div></tpl>',h.itemCls,g);h.tpl=new Ext.XTemplate(g,e)}if(!f(h.tpl)||!f(h.itemSelector)){Ext.Error.raise({sourceClass:"Ext.view.View",tpl:h.tpl,itemSelector:h.itemSelector,msg:"DataView requires both tpl and itemSelector configurations to be defined."})}h.callParent();if(Ext.isString(h.tpl)||Ext.isArray(h.tpl)){h.tpl=new Ext.XTemplate(h.tpl)}if(f(h.overCls)||f(h.overClass)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.view.View: Using the deprecated overCls or overClass configuration. Use overItemCls instead.")}h.overItemCls=h.overCls||h.overClass;delete h.overCls;delete h.overClass}if(h.overItemCls){h.trackOver=true}if(f(h.selectedCls)||f(h.selectedClass)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.view.View: Using the deprecated selectedCls or selectedClass configuration. Use selectedItemCls instead.")}h.selectedItemCls=h.selectedCls||h.selectedClass;delete h.selectedCls;delete h.selectedClass}h.addEvents("beforerefresh","refresh","viewready","itemupdate","itemadd","itemremove");h.addCmpEvents();h.store=Ext.data.StoreManager.lookup(h.store||"ext-empty-store");h.all=new Ext.CompositeElementLite();h.scrollState={top:0,left:0};h.on({scroll:h.onViewScroll,element:"el",scope:h})},onRender:function(){var f=this,d=f.loadMask,e={msg:f.loadingText,msgCls:f.loadingCls,useMsg:f.loadingUseMsg};f.callParent(arguments);if(d){if(Ext.isObject(d)){e=Ext.apply(e,d)}f.loadMask=new Ext.LoadMask(f,e);f.loadMask.on({scope:f,beforeshow:f.onMaskBeforeShow,hide:f.onMaskHide})}},onMaskBeforeShow:function(){var c=this,d=c.loadingHeight;c.getSelectionModel().deselectAll();c.all.clear();if(d&&d>c.getHeight()){c.hasLoadingHeight=true;c.oldMinHeight=c.minHeight;c.minHeight=d;c.updateLayout()}},onMaskHide:function(){var b=this;if(!b.destroying&&b.hasLoadingHeight){b.minHeight=b.oldMinHeight;b.updateLayout();delete b.hasLoadingHeight}},afterRender:function(){this.callParent(arguments);this.getSelectionModel().bindComponent(this)},getSelectionModel:function(){var d=this,c="SINGLE";if(!d.selModel){d.selModel={}}if(d.simpleSelect){c="SIMPLE"}else{if(d.multiSelect){c="MULTI"}}Ext.applyIf(d.selModel,{allowDeselect:d.allowDeselect,mode:c});if(!d.selModel.events){d.selModel=new Ext.selection.DataViewModel(d.selModel)}if(!d.selModel.hasRelaySetup){d.relayEvents(d.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect","focuschange"]);d.selModel.hasRelaySetup=true}if(d.disableSelection){d.selModel.locked=true}return d.selModel},refresh:function(){var l=this,i,g,k,j,h;if(!l.rendered||l.isDestroyed){return}if(!l.hasListeners.beforerefresh||l.fireEvent("beforerefresh",l)!==false){i=l.getTargetEl();h=l.store.getRange();j=i.dom;if(!l.preserveScrollOnRefresh){g=j.parentNode;j.style.display="none";k=j.nextSibling;g.removeChild(j)}if(l.refreshCounter){l.clearViewEl()}else{l.fixedNodes=i.dom.childNodes.length;l.refreshCounter=1}l.tpl.append(i,l.collectData(h,0));if(h.length<1){if(!l.deferEmptyText||l.hasSkippedEmptyText){Ext.core.DomHelper.insertHtml("beforeEnd",i.dom,l.emptyText)}l.all.clear()}else{l.all.fill(Ext.query(l.getItemSelector(),i.dom));l.updateIndexes(0)}l.selModel.refresh();l.hasSkippedEmptyText=true;if(!l.preserveScrollOnRefresh){g.insertBefore(j,k);j.style.display=""}this.refreshSize();l.fireEvent("refresh",l);if(!l.viewReady){l.viewReady=true;l.fireEvent("viewready",l)}}},refreshSize:function(){var b=this.getSizeModel();if(b.height.shrinkWrap||b.width.shrinkWrap){this.updateLayout()}},clearViewEl:function(){var c=this,d=c.getTargetEl();if(c.fixedNodes){while(d.dom.childNodes[c.fixedNodes]){d.dom.removeChild(d.dom.childNodes[c.fixedNodes])}}else{d.update("")}c.refreshCounter++},onViewScroll:Ext.emptyFn,saveScrollState:function(){if(this.rendered){var c=this.el.dom,d=this.scrollState;d.left=c.scrollLeft;d.top=c.scrollTop}},restoreScrollState:function(){if(this.rendered){var c=this.el.dom,d=this.scrollState;c.scrollLeft=d.left;c.scrollTop=d.top}},prepareData:function(h,i,j){var f,g;if(j){f=j.getAssociatedData();for(g in f){if(f.hasOwnProperty(g)){h[g]=f[g]}}}return h},collectData:function(l,i){var j=[],k=0,h=l.length,g;for(;k<h;k++){g=l[k];j[k]=this.prepareData(g.data,i+k,g)}return j},bufferRender:function(f,e){var h=this,g=h.renderBuffer||(h.renderBuffer=document.createElement("div"));h.tpl.overwrite(g,h.collectData(f,e));return Ext.query(h.getItemSelector(),g)},onUpdate:function(h,g){var i=this,f=i.store.indexOf(g),j;if(f>-1){j=i.bufferRender([g],f)[0];if(i.getNode(g)){i.all.replaceElement(f,j,true);i.updateIndexes(f,f);i.selModel.refresh();if(i.hasListeners.itemupdate){i.fireEvent("itemupdate",g,f,j)}return j}}},onAdd:function(h,f,j){var i=this,g;if(i.all.getCount()===0){i.refresh();return}g=i.bufferRender(f,j);i.doAdd(g,f,j);i.selModel.refresh();i.updateIndexes(j);this.refreshSize();if(i.hasListeners.itemadd){i.fireEvent("itemadd",f,j,g)}},doAdd:function(f,g,j){var i=this.all,h=i.getCount();if(h===0){this.clearViewEl();this.getTargetEl().appendChild(f)}else{if(j<h){if(j===0){i.item(j).insertSibling(f,"before",true)}else{i.item(j-1).insertSibling(f,"after",true)}}else{i.last().insertSibling(f,"after",true)}}Ext.Array.insert(i.elements,j,f)},onRemove:function(g,f,e){var h=this;h.doRemove(f,e);h.updateIndexes(e);this.refreshSize();if(h.hasListeners.itemremove){h.fireEvent("itemremove",f,e)}},doRemove:function(d,c){this.all.removeElement(c,true)},refreshNode:function(b){this.onUpdate(this.store,this.store.getAt(b))},updateIndexes:function(h,i){var j=this.all.elements,g=this.store.getRange(),f;h=h||0;i=i||((i===0)?0:(j.length-1));for(f=h;f<=i;f++){j[f].viewIndex=f;j[f].viewRecordId=g[f].internalId;if(!j[f].boundView){j[f].boundView=this.id}}},getStore:function(){return this.store},bindStore:function(e,d){var f=this;f.mixins.bindable.bindStore.apply(f,arguments);f.getSelectionModel().bindStore(f.store);if(e&&!e.loading){if(d&&f.deferInitialRefresh){Ext.Function.defer(function(){if(!f.isDestroyed){f.refresh(true)}},1)}else{f.refresh(true)}}},onUnbindStore:function(b){this.setMaskBind(null)},onBindStore:function(b){this.setMaskBind(b)},setMaskBind:function(c){var d=this.loadMask;if(d&&d.bindStore){d.bindStore(c)}},getStoreListeners:function(){var b=this;return{refresh:b.onDataRefresh,add:b.onAdd,remove:b.onRemove,update:b.onUpdate,clear:b.refresh}},onDataRefresh:function(){if(this.blockRefresh!==true){this.refresh.apply(this,arguments)}},findItemByChild:function(b){return Ext.fly(b).findParent(this.getItemSelector(),this.getTargetEl())},findTargetByEvent:function(b){return b.getTarget(this.getItemSelector(),this.getTargetEl())},getSelectedNodes:function(){var e=[],f=this.selModel.getSelection(),g=f.length,h=0;for(;h<g;h++){e.push(this.getNode(f[h]))}return e},getRecords:function(j){var f=[],i=0,g=j.length,h=this.store.data;for(;i<g;i++){f[f.length]=h.getByKey(j[i].viewRecordId)}return f},getRecord:function(b){return this.store.data.getByKey(Ext.getDom(b).viewRecordId)},isSelected:function(c){var d=this.getRecord(c);return this.selModel.isSelected(d)},select:function(d,f,e){this.selModel.select(d,f,e)},deselect:function(c,d){this.selModel.deselect(c,d)},getNode:function(b){if(!this.rendered){return null}if(Ext.isString(b)){return document.getElementById(b)}if(Ext.isNumber(b)){return this.all.elements[b]}if(b instanceof Ext.data.Model){return this.getNodeByRecord(b)}return b},getNodeByRecord:function(f){var h=this.all.elements,g=h.length,e=0;for(;e<g;e++){if(h[e].viewRecordId===f.internalId){return h[e]}}return null},getNodes:function(h,g){var i=this.all.elements,f=[],j;h=h||0;g=!Ext.isDefined(g)?Math.max(i.length-1,0):g;if(h<=g){for(j=h;j<=g&&i[j];j++){f.push(i[j])}}else{for(j=h;j>=g&&i[j];j--){f.push(i[j])}}return f},indexOf:function(b){b=this.getNode(b);if(Ext.isNumber(b.viewIndex)){return b.viewIndex}return this.all.indexOf(b)},onDestroy:function(){var b=this;b.all.clear();b.callParent();b.bindStore(null);b.selModel.destroy()},onItemSelect:function(d){var c=this.getNode(d);if(c){Ext.fly(c).addCls(this.selectedItemCls)}},onItemDeselect:function(d){var c=this.getNode(d);if(c){Ext.fly(c).removeCls(this.selectedItemCls)}},getItemSelector:function(){return this.itemSelector}},function(){Ext.deprecate("extjs","4.0",function(){Ext.view.AbstractView.override({getSelectionCount:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectionCount will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection().length},getSelectedRecords:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectedRecords will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection()},select:function(f,e,g){if(Ext.global.console){Ext.global.console.warn("DataView: select will be removed, please access select through a DataView's SelectionModel, ie: view.getSelectionModel().select()")}var h=this.getSelectionModel();return h.select.apply(h,arguments)},clearSelections:function(){if(Ext.global.console){Ext.global.console.warn("DataView: clearSelections will be removed, please access deselectAll through DataView's SelectionModel, ie: view.getSelectionModel().deselectAll()")}var b=this.getSelectionModel();return b.deselectAll()}})})});Ext.define("Ext.view.View",{extend:"Ext.view.AbstractView",alternateClassName:"Ext.DataView",alias:"widget.dataview",inheritableStatics:{EventMap:{mousedown:"MouseDown",mouseup:"MouseUp",click:"Click",dblclick:"DblClick",contextmenu:"ContextMenu",mouseover:"MouseOver",mouseout:"MouseOut",mouseenter:"MouseEnter",mouseleave:"MouseLeave",keydown:"KeyDown",focus:"Focus"}},addCmpEvents:function(){this.addEvents("beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","beforeitemkeydown","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","itemkeydown","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","beforecontainerkeydown","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","containerkeydown","selectionchange","beforeselect","highlightitem","unhighlightitem")},getFocusEl:function(){return this.getTargetEl()},afterRender:function(){var c=this,d;c.callParent();d={scope:c,freezeEvent:true,click:c.handleEvent,mousedown:c.handleEvent,mouseup:c.handleEvent,dblclick:c.handleEvent,contextmenu:c.handleEvent,mouseover:c.handleEvent,mouseout:c.handleEvent,keydown:c.handleEvent};c.mon(c.getTargetEl(),d);if(c.store){c.bindStore(c.store,true)}},handleEvent:function(c){var d=c.type=="keydown"&&c.getKey();if(this.processUIEvent(c)!==false){this.processSpecialEvent(c)}if(d===c.SPACE){c.stopEvent()}},processItemEvent:Ext.emptyFn,processContainerEvent:Ext.emptyFn,processSpecialEvent:Ext.emptyFn,stillOverItem:function(d,e){var f;if(e&&typeof(e.offsetParent)==="object"){f=(d.type=="mouseout")?d.getRelatedTarget():d.getTarget();return Ext.fly(e).contains(f)}return false},processUIEvent:function(m){var l=this,e=m.getTarget(l.getItemSelector(),l.getTargetEl()),r=this.statics().EventMap,n,p,k=m.type,o=l.mouseOverItem,q;if(!e){if(k=="mouseover"&&l.stillOverItem(m,o)){e=o}if(k=="keydown"){p=l.getSelectionModel().getLastSelected();if(p){e=l.getNode(p)}}}if(e){n=l.indexOf(e);if(!p){p=l.getRecord(e)}if(!p||l.processItemEvent(p,e,n,m)===false){return false}q=l.isNewItemEvent(e,m);if(q===false){return false}if((l["onBeforeItem"+r[q]](p,e,n,m)===false)||(l.fireEvent("beforeitem"+q,l,p,e,n,m)===false)||(l["onItem"+r[q]](p,e,n,m)===false)){return false}l.fireEvent("item"+q,l,p,e,n,m)}else{if((l.processContainerEvent(m)===false)||(l["onBeforeContainer"+r[k]](m)===false)||(l.fireEvent("beforecontainer"+k,l,m)===false)||(l["onContainer"+r[k]](m)===false)){return false}l.fireEvent("container"+k,l,m)}return true},isNewItemEvent:function(i,h){var j=this,g=j.mouseOverItem,e=h.type;switch(e){case"mouseover":if(i===g){return false}j.mouseOverItem=i;return"mouseenter";case"mouseout":if(j.stillOverItem(h,g)){return false}j.mouseOverItem=null;return"mouseleave"}return e},onItemMouseEnter:function(f,h,e,g){if(this.trackOver){this.highlightItem(h)}},onItemMouseLeave:function(f,h,e,g){if(this.trackOver){this.clearHighlight()}},onItemMouseDown:Ext.emptyFn,onItemMouseUp:Ext.emptyFn,onItemFocus:Ext.emptyFn,onItemClick:Ext.emptyFn,onItemDblClick:Ext.emptyFn,onItemContextMenu:Ext.emptyFn,onItemKeyDown:Ext.emptyFn,onBeforeItemMouseDown:Ext.emptyFn,onBeforeItemMouseUp:Ext.emptyFn,onBeforeItemFocus:Ext.emptyFn,onBeforeItemMouseEnter:Ext.emptyFn,onBeforeItemMouseLeave:Ext.emptyFn,onBeforeItemClick:Ext.emptyFn,onBeforeItemDblClick:Ext.emptyFn,onBeforeItemContextMenu:Ext.emptyFn,onBeforeItemKeyDown:Ext.emptyFn,onContainerMouseDown:Ext.emptyFn,onContainerMouseUp:Ext.emptyFn,onContainerMouseOver:Ext.emptyFn,onContainerMouseOut:Ext.emptyFn,onContainerClick:Ext.emptyFn,onContainerDblClick:Ext.emptyFn,onContainerContextMenu:Ext.emptyFn,onContainerKeyDown:Ext.emptyFn,onBeforeContainerMouseDown:Ext.emptyFn,onBeforeContainerMouseUp:Ext.emptyFn,onBeforeContainerMouseOver:Ext.emptyFn,onBeforeContainerMouseOut:Ext.emptyFn,onBeforeContainerClick:Ext.emptyFn,onBeforeContainerDblClick:Ext.emptyFn,onBeforeContainerContextMenu:Ext.emptyFn,onBeforeContainerKeyDown:Ext.emptyFn,highlightItem:function(c){var d=this;d.clearHighlight();d.highlightedItem=c;Ext.fly(c).addCls(d.overItemCls);d.fireEvent("highlightitem",d,c)},clearHighlight:function(){var c=this,d=c.highlightedItem;if(d){Ext.fly(d).removeCls(c.overItemCls);c.fireEvent("unhighlightitem",c,d);delete c.highlightedItem}},onUpdate:function(g,h){var i=this,j=i.getNode(h),l=i.callParent(arguments),k=i.highlightedItem;if(k&&k===j){delete i.highlightedItem;if(l){i.highlightItem(l)}}},refresh:function(){this.clearHighlight();this.callParent(arguments)}});Ext.define("Docs.view.search.Dropdown",{extend:"Ext.view.View",alias:"widget.searchdropdown",floating:true,autoShow:false,autoRender:true,toFrontOnShow:true,focusOnToFront:false,store:"Search",id:"search-dropdown",overItemCls:"x-view-over",trackOver:true,itemSelector:"div.item",singleSelect:true,pageStart:0,pageSize:10,initComponent:function(){this.addEvents("changePage","footerClick");this.tpl=new Ext.XTemplate('<tpl for=".">','<div class="item">','<div class="icon {icon}"></div>','<div class="meta">{[this.getMetaTags(values.meta)]}</div>','<div class="title {[this.getCls(values.meta)]}">{name}</div>','<div class="class">{fullName}</div>',"</div>","</tpl>",'<div class="footer">','<a href="#" class="prev"><</a>','<span class="total">{[this.getStart()+1]}-{[this.getEnd()]} of {[this.getTotal()]}</span>','<a href="#" class="next">></a>',"</div>",{getCls:function(b){return b["private"]?"private":(b.removed?"removed":"")},getMetaTags:function(b){return Ext.Array.map(Docs.data.signatures,function(a){return b[a.key]?'<span class="signature '+a.key+'">'+(a["short"])+"</span>":""}).join(" ")},getTotal:Ext.bind(this.getTotal,this),getStart:Ext.bind(this.getStart,this),getEnd:Ext.bind(this.getEnd,this)});this.on("afterrender",function(){this.el.addListener("click",function(){this.fireEvent("changePage",this,-1)},this,{preventDefault:true,delegate:".prev"});this.el.addListener("click",function(){this.fireEvent("changePage",this,+1)},this,{preventDefault:true,delegate:".next"});this.el.addListener("click",function(){this.fireEvent("footerClick",this)},this,{delegate:".footer"})},this);this.callParent(arguments)},setTotal:function(b){this.total=b},getTotal:function(){return this.total},setStart:function(b){this.pageStart=b},getStart:function(b){return this.pageStart},getEnd:function(c){var d=this.pageStart+this.pageSize;return d>this.total?this.total:d}});Ext.define("Docs.view.search.Container",{extend:"Ext.container.Container",alias:"widget.searchcontainer",requires:"Docs.view.search.Dropdown",initComponent:function(){if(Docs.data.search.length){this.cls="search";this.items=[{xtype:"triggerfield",triggerCls:"reset",emptyText:"Search",width:170,id:"search-field",enableKeyEvents:true,hideTrigger:true,onTriggerClick:function(){this.reset();this.focus();this.setHideTrigger(true);Ext.getCmp("search-dropdown").hide()}},{xtype:"searchdropdown"}]}this.callParent()}});Ext.define("Docs.view.ThumbList",{extend:"Ext.view.View",alias:"widget.thumblist",cls:"thumb-list",itemSelector:"dl",urlField:"url",itemTpl:[],initComponent:function(){this.addEvents("urlclick");Ext.Array.forEach(this.data,function(c,d){c.id="sample-"+d});this.store=Ext.create("Ext.data.JsonStore",{fields:["id","title","items"]});this.store.loadData(this.data);this.tpl=new Ext.XTemplate(Ext.Array.flatten(["<div>",'<tpl for=".">','<div><a name="{id}"></a><h2><div>{title}</div></h2>',"<dl>",'<tpl for="items">',this.itemTpl,"</tpl>",'<div style="clear:left"></div></dl></div>',"</tpl>","</div>"]));this.itemTpl=undefined;this.data=undefined;this.on({afterrender:function(b){b.el.addListener("mouseover",function(a,d){Ext.get(d).addCls("over")},this,{delegate:"dd"});b.el.addListener("mouseout",function(a,d){Ext.get(d).removeCls("over")},this,{delegate:"dd"})}});this.callParent(arguments)},onContainerClick:function(c){var d=c.getTarget("h2",3,true);if(d){d.up("div").toggleCls("collapsed")}},onItemClick:function(h,j,l,i){var k=i.getTarget("dd",5,true);if(k&&!i.getTarget("a",2)){var e=k.getAttributeNS("ext",this.urlField);this.fireEvent("urlclick",e)}return this.callParent(arguments)}});Ext.define("Docs.view.guides.Index",{extend:"Ext.container.Container",alias:"widget.guideindex",requires:["Docs.view.ThumbList"],mixins:["Docs.view.Scrolling"],cls:"iScroll",margin:"10 0 0 0",autoScroll:true,initComponent:function(){this.items=[{xtype:"container",html:'<h1 class="eg">Guides</h1>'},Ext.create("Docs.view.ThumbList",{itemTpl:['<dd ext:url="#!/guide/{name}"><div class="thumb"><img src="guides/{name}/icon.png"/></div>',"<div><h4>{title}</h4><p>{description}</p></div>","</dd>"],data:Docs.data.guides})];this.callParent(arguments)},getTab:function(){var b=(Docs.data.guides||[]).length>0;return b?{cls:"guides",href:"#!/guide",tooltip:"Guides"}:false}});Ext.define("Docs.view.videos.Index",{extend:"Ext.container.Container",alias:"widget.videoindex",requires:["Docs.view.ThumbList"],mixins:["Docs.view.Scrolling"],cls:"iScroll",margin:"10 0 0 0",autoScroll:true,initComponent:function(){this.items=[{xtype:"container",html:'<h1 class="eg">Videos</h1>'},Ext.create("Docs.view.ThumbList",{itemTpl:['<dd ext:url="#!/video/{name}"><div class="thumb"><img src="{thumb}"/></div>',"<div><h4>{title}","</h4><p>{[values.description.substr(0,80)]}...</p></div>","</dd>"],data:Docs.data.videos})];this.callParent(arguments)},getTab:function(){var b=(Docs.data.videos||[]).length>0;return b?{cls:"videos",href:"#!/video",tooltip:"Videos"}:false}});Ext.define("Docs.view.examples.Index",{extend:"Ext.container.Container",alias:"widget.exampleindex",requires:["Docs.view.ThumbList"],mixins:["Docs.view.Scrolling"],cls:"iScroll",margin:"10 0 0 0",autoScroll:true,initComponent:function(){this.cls+=Docs.data.touchExamplesUi?" touch-examples-ui":"";this.items=[{xtype:"container",html:'<h1 class="eg">Examples</h1>'},Ext.create("Docs.view.ThumbList",{itemTpl:['<dd ext:url="#!/example/{name}">','<div class="thumb"><img src="{icon}"/></div>',"<div><h4>{title}","<tpl if=\"status === 'new'\">",'<span class="new-sample"> (New)</span>',"</tpl>","<tpl if=\"status === 'updated'\">",'<span class="updated-sample"> (Updated)</span>',"</tpl>","<tpl if=\"status === 'experimental'\">",'<span class="new-sample"> (Experimental)</span>',"</tpl>","</h4><p>{description}</p></div>","</dd>"],data:Docs.data.examples})];this.callParent(arguments)},getTab:function(){var b=(Docs.data.examples||[]).length>0;return b?{cls:"examples",href:"#!/example",tooltip:"Examples"}:false}});Ext.define("Ext.view.Table",{extend:"Ext.view.View",alias:"widget.tableview",uses:["Ext.view.TableChunker","Ext.util.DelayedTask","Ext.util.MixedCollection"],baseCls:Ext.baseCSSPrefix+"grid-view",itemSelector:"tr."+Ext.baseCSSPrefix+"grid-row",cellSelector:"td."+Ext.baseCSSPrefix+"grid-cell",rowSelector:"tr."+Ext.baseCSSPrefix+"grid-row",firstCls:Ext.baseCSSPrefix+"grid-cell-first",lastCls:Ext.baseCSSPrefix+"grid-cell-last",headerRowSelector:"tr."+Ext.baseCSSPrefix+"grid-header-row",selectedItemCls:Ext.baseCSSPrefix+"grid-row-selected",selectedCellCls:Ext.baseCSSPrefix+"grid-cell-selected",focusedItemCls:Ext.baseCSSPrefix+"grid-row-focused",overItemCls:Ext.baseCSSPrefix+"grid-row-over",altRowCls:Ext.baseCSSPrefix+"grid-row-alt",rowClsRe:new RegExp("(?:^|\\s*)"+Ext.baseCSSPrefix+"grid-row-(first|last|alt)(?:\\s+|$)","g"),cellRe:new RegExp(Ext.baseCSSPrefix+"grid-cell-([^\\s]+) ",""),trackOver:true,getRowClass:null,stripeRows:true,markDirty:true,initComponent:function(){var c=this,d=c.scroll;c.autoScroll=undefined;if(d===true||d==="both"){c.style=Ext.apply(c.style||{},{overflow:"auto"})}else{if(d==="horizontal"){c.style=Ext.apply(c.style||{},{"overflow-x":"auto","overflow-y":"hidden"})}else{if(d==="vertical"){c.style=Ext.apply(c.style||{},{"overflow-x":"hidden","overflow-y":"auto"})}else{c.style=Ext.apply(c.style||{},{overflow:"hidden"})}}}c.selModel.view=c;c.headerCt.view=c;c.headerCt.markDirty=c.markDirty;c.initFeatures(c.grid);delete c.grid;c.tpl="<div></div>";c.callParent()},moveColumn:function(D,r,A){var t=this,v=(A>1)?document.createDocumentFragment():undefined,B=r,j=t.getGridColumns().length,s=j-1,C=(t.firstCls||t.lastCls)&&(r==0||r==j||D==0||D==s),y,z,i,w,u,x;if(t.rendered){x=t.el.query(t.headerRowSelector);i=t.el.query(t.rowSelector);if(r>D&&v){B-=A}for(y=0,w=x.length;y<w;++y){u=x[y];if(v){for(z=0;z<A;z++){v.appendChild(u.cells[D])}u.insertBefore(v,u.cells[B]||null)}else{u.insertBefore(u.cells[D],u.cells[B]||null)}}for(y=0,w=i.length;y<w;y++){u=i[y];if(C){if(D===0){Ext.fly(u.cells[0]).removeCls(t.firstCls);Ext.fly(u.cells[1]).addCls(t.firstCls)}else{if(D===s){Ext.fly(u.cells[s]).removeCls(t.lastCls);Ext.fly(u.cells[s-1]).addCls(t.lastCls)}}if(r===0){Ext.fly(u.cells[0]).removeCls(t.firstCls);Ext.fly(u.cells[D]).addCls(t.firstCls)}else{if(r===j){Ext.fly(u.cells[s]).removeCls(t.lastCls);Ext.fly(u.cells[D]).addCls(t.lastCls)}}}if(v){for(z=0;z<A;z++){v.appendChild(u.cells[D])}u.insertBefore(v,u.cells[B]||null)}else{u.insertBefore(u.cells[D],u.cells[B]||null)}}t.setNewTemplate()}},scrollToTop:Ext.emptyFn,addElListener:function(e,f,d){this.mon(this,e,f,d,{element:"el"})},getGridColumns:function(){return this.headerCt.getGridColumns()},getHeaderAtIndex:function(b){return this.headerCt.getHeaderAtIndex(b)},getCell:function(e,d){var f=this.getNode(e);return Ext.fly(f).down(d.getCellSelector())},getFeature:function(c){var d=this.featuresMC;if(d){return d.get(c)}},initFeatures:function(k){var i=this,l,j,g,h;i.featuresMC=new Ext.util.MixedCollection();j=i.features=i.prepareFeatures();h=j?j.length:0;for(l=0;l<h;l++){g=j[l];g.view=i;g.grid=k;i.featuresMC.add(g);g.init()}},prepareFeatures:function(){var i=this,j=i.features,k,g,l=0,h;if(j){g=[];h=j.length;for(;l<h;l++){k=j[l];if(!k.isFeature){k=Ext.create("feature."+k.ftype,k)}g[l]=k}}return g},attachEventsForFeatures:function(){var d=this.features,f=d.length,e=0;for(;e<f;e++){if(d[e].isFeature){d[e].attachEvents()}}},afterRender:function(){var b=this;b.callParent();if(!b.enableTextSelection){b.el.unselectable()}b.attachEventsForFeatures()},onViewScroll:function(c,d){this.callParent(arguments);this.fireEvent("bodyscroll",c,d)},prepareData:function(q,l,o){var m=this,i=m.headerCt.prepareData(q,l,o,m,m.ownerCt),r=m.features,n=r.length,p=0,k;for(;p<n;p++){k=r[p];if(k.isFeature){Ext.apply(i,k.getAdditionalData(q,l,o,i,m))}}return i},collectData:function(A,s){var j=this.callParent(arguments),B=this.headerCt,t=B.getFullWidth(),C=this.features,v=C.length,D={rows:j,fullWidth:t},x=0,i,y=0,u,w,z,o;u=j.length;if(this.getRowClass){for(;y<u;y++){w={};z=j[y];o=z.rowCls||"";z.rowCls=this.getRowClass(A[y],y,w,this.store)+" "+o;if(w.alt){Ext.Error.raise("The getRowClass alt property is no longer supported.")}if(w.tstyle){Ext.Error.raise("The getRowClass tstyle property is no longer supported.")}if(w.cells){Ext.Error.raise("The getRowClass cells property is no longer supported.")}if(w.body){Ext.Error.raise("The getRowClass body property is no longer supported. Use the getAdditionalData method of the rowbody feature.")}if(w.bodyStyle){Ext.Error.raise("The getRowClass bodyStyle property is no longer supported.")}if(w.cols){Ext.Error.raise("The getRowClass cols property is no longer supported.")}}}for(;x<v;x++){i=C[x];if(i.isFeature&&i.collectData&&!i.disabled){D=i.collectData(A,j,s,t,D);break}}return D},forceReflow:Ext.isGecko10?function(){var c=this.el.down("table"),d;if(c){d=c.getWidth()}}:Ext.emptyFn,onHeaderResize:function(h,g,i){var j=this,f=j.el;if(f){f.select("th."+Ext.baseCSSPrefix+"grid-col-resizer-"+h.id).setWidth(g);f.select("table."+Ext.baseCSSPrefix+"grid-table-resizer").setWidth(j.headerCt.getFullWidth());if(!j.ignoreTemplate){j.setNewTemplate()}if(!i){j.el.focus()}j.forceReflow()}},onHeaderShow:function(h,g,e){var f=this;f.ignoreTemplate=true;if(g.oldWidth){f.onHeaderResize(g,g.oldWidth,e);delete g.oldWidth}else{if(g.width&&!g.flex){f.onHeaderResize(g,g.width,e)}else{if(g.el){f.onHeaderResize(g,g.el.getWidth(),e)}}}delete f.ignoreTemplate;f.setNewTemplate()},onHeaderHide:function(d,f,e){this.onHeaderResize(f,0,e)},refreshSize:function(){var c=this,d;if(!c.hasLoadingHeight){d=c.up("tablepanel");Ext.suspendLayouts();c.callParent();if(d&&Ext.getScrollbarSize().width){d.updateLayout()}Ext.resumeLayouts(true)}},setNewTemplate:function(){var c=this,d=c.headerCt.getColumnsForTpl(true);c.tpl=c.getTableChunker().getTableTpl({rowCount:c.store.getCount(),columns:d,features:c.features,enableTextSelection:c.enableTextSelection})},getTableChunker:function(){return this.chunker||Ext.view.TableChunker},addRowCls:function(d,e){var f=this.getNode(d);if(f){Ext.fly(f).addCls(e)}},removeRowCls:function(d,e){var f=this.getNode(d);if(f){Ext.fly(f).removeCls(e)}},onRowSelect:function(b){this.addRowCls(b,this.selectedItemCls)},onRowDeselect:function(c){var d=this;d.removeRowCls(c,d.selectedItemCls);d.removeRowCls(c,d.focusedItemCls)},onCellSelect:function(c){var d=this.getCellByPosition(c);if(d){d.addCls(this.selectedCellCls)}},onCellDeselect:function(c){var d=this.getCellByPosition(c);if(d){d.removeCls(this.selectedCellCls)}},onCellFocus:function(b){this.focusCell(b)},getCellByPosition:function(e){if(e){var d=this.getNode(e.row),f=this.headerCt.getHeaderAtIndex(e.column);if(f&&d){return Ext.fly(d).down(f.getCellSelector())}}return false},onRowFocus:function(g,e,f){var h=this;if(e){h.addRowCls(g,h.focusedItemCls);if(!f){h.focusRow(g)}}else{h.removeRowCls(g,h.focusedItemCls)}},focusRow:function(s){var o=this,k=o.getNode(s),r=o.el,m=0,t=o.ownerCt,l,n,p,q;if(k&&r){n=r.getY();p=n+r.dom.clientHeight;l=Ext.fly(k).getRegion();if(l.top<n){m=l.top-n}else{if(l.bottom>p){m=l.bottom-p}}q=o.getRecord(k);s=o.store.indexOf(q);if(m){t.scrollByDeltaY(m)}o.fireEvent("rowfocus",q,k,s)}},focusCell:function(n){var l=this,k=l.getCellByPosition(n),s=l.el,q=0,p=0,r=s.getRegion(),t=l.ownerCt,m,o;r.bottom=r.top+s.dom.clientHeight;r.right=r.left+s.dom.clientWidth;if(k){m=k.getRegion();if(m.top<r.top){q=m.top-r.top}else{if(m.bottom>r.bottom){q=m.bottom-r.bottom}}if(m.left<r.left){p=m.left-r.left}else{if(m.right>r.right){p=m.right-r.right}}if(q){t.scrollByDeltaY(q)}if(p){t.scrollByDeltaX(p)}s.focus();l.fireEvent("cellfocus",o,k,n)}},scrollByDelta:function(f,d){d=d||"scrollTop";var e=this.el.dom;e[d]=(e[d]+=f)},onUpdate:function(s,A,C,t){var u=this,y=u.store.indexOf(A),r,w,F,E,z,B,D=u.headerCt.getGridColumns(),x=u.overItemCls,v,i;if(D.length&&y>-1){r=u.bufferRender([A],y)[0];w=u.all.item(y);v=w.hasCls(x);w.dom.className=r.className;if(v){w.addCls(x)}F=w.query(this.cellSelector);E=Ext.fly(r).query(this.cellSelector);z=E.length;i=F[0].parentNode;for(B=0;B<z;B++){if(u.shouldUpdateCell(D[B],t)){i.insertBefore(E[B],F[B]);i.removeChild(F[B])}}u.selModel.refresh();u.doStripeRows(y,y);u.fireEvent("itemupdate",A,y,r)}},shouldUpdateCell:function(c,d){if(c.hasCustomRenderer){return true}return !d||Ext.Array.contains(d,c.dataIndex)},refresh:function(){this.setNewTemplate();this.callParent(arguments);this.doStripeRows(0)},processItemEvent:function(u,e,o,s){var q=this,n=s.getTarget(q.cellSelector,e),p=n?n.cellIndex:-1,v=q.statics().EventMap,t=q.getSelectionModel(),r=s.type,m;if(r=="keydown"&&!n&&t.getCurrentPosition){n=q.getCellByPosition(t.getCurrentPosition());if(n){n=n.dom;p=n.cellIndex}}m=q.fireEvent("uievent",r,q,n,o,p,s,u,e);if(m===false||q.callParent(arguments)===false){return false}if(r=="mouseover"||r=="mouseout"){return true}if(!n){return true}return !((q["onBeforeCell"+v[r]](n,p,u,e,o,s)===false)||(q.fireEvent("beforecell"+r,q,n,p,u,e,o,s)===false)||(q["onCell"+v[r]](n,p,u,e,o,s)===false)||(q.fireEvent("cell"+r,q,n,p,u,e,o,s)===false))},processSpecialEvent:function(s){var p=this,y=p.statics().EventMap,w=p.features,q=w.length,i=s.type,v,e,u,t,x,r,z=p.ownerCt;p.callParent(arguments);if(i=="mouseover"||i=="mouseout"){return}for(v=0;v<q;v++){e=w[v];if(e.hasFeatureEvent){t=s.getTarget(e.eventSelector,p.getTargetEl());if(t){u=e.eventPrefix;x=e.getFireEventArgs("before"+u+i,p,t,s);r=e.getFireEventArgs(u+i,p,t,s);if((p.fireEvent.apply(p,x)===false)||(z.fireEvent.apply(z,x)===false)||(p.fireEvent.apply(p,r)===false)||(z.fireEvent.apply(z,r)===false)){return false}}}}return true},onCellMouseDown:Ext.emptyFn,onCellMouseUp:Ext.emptyFn,onCellClick:Ext.emptyFn,onCellDblClick:Ext.emptyFn,onCellContextMenu:Ext.emptyFn,onCellKeyDown:Ext.emptyFn,onBeforeCellMouseDown:Ext.emptyFn,onBeforeCellMouseUp:Ext.emptyFn,onBeforeCellClick:Ext.emptyFn,onBeforeCellDblClick:Ext.emptyFn,onBeforeCellContextMenu:Ext.emptyFn,onBeforeCellKeyDown:Ext.emptyFn,expandToFit:function(c){if(c){var d=this.getMaxContentWidth(c);delete c.flex;c.setWidth(d)}},getMaxContentWidth:function(j){var i=j.getCellInnerSelector(),n=this.el.query(i),m=0,k=n.length,l=j.el.dom.scrollWidth,h;for(;m<k;m++){h=n[m].scrollWidth;if(h>l){l=h}}return l},getPositionByEvent:function(j){var k=this,e=j.getTarget(k.cellSelector),l=j.getTarget(k.itemSelector),h=k.getRecord(l),i=k.getHeaderByCell(e);return k.getPosition(h,i)},getHeaderByCell:function(c){if(c){var d=c.className.match(this.cellRe);if(d&&d[1]){return Ext.getCmp(d[1])}}return false},walkCells:function(s,r,w,q,B,p){if(!s){return}var u=this,e=s.row,y=s.column,t=u.store.getCount(),x=u.getFirstVisibleColumnIndex(),A=u.getLastVisibleColumnIndex(),v={row:e,column:y},z=u.headerCt.getHeaderAtIndex(y);if(!z||z.hidden){return false}w=w||{};r=r.toLowerCase();switch(r){case"right":if(y===A){if(q||e===t-1){return false}if(!w.ctrlKey){v.row=e+1;v.column=x}}else{if(!w.ctrlKey){v.column=y+u.getRightGap(z)}else{v.column=A}}break;case"left":if(y===x){if(q||e===0){return false}if(!w.ctrlKey){v.row=e-1;v.column=A}}else{if(!w.ctrlKey){v.column=y+u.getLeftGap(z)}else{v.column=x}}break;case"up":if(e===0){return false}else{if(!w.ctrlKey){v.row=e-1}else{v.row=0}}break;case"down":if(e===t-1){return false}else{if(!w.ctrlKey){v.row=e+1}else{v.row=t-1}}break}if(B&&B.call(p||window,v)!==true){return false}else{return v}},getFirstVisibleColumnIndex:function(){var b=this.getHeaderCt().getVisibleGridColumns()[0];return b?b.getIndex():-1},getLastVisibleColumnIndex:function(){var c=this.getHeaderCt().getVisibleGridColumns(),d=c[c.length-1];return d.getIndex()},getHeaderCt:function(){return this.headerCt},getPosition:function(g,h){var i=this,f=i.store,j=i.headerCt.getGridColumns();return{row:f.indexOf(g),column:Ext.Array.indexOf(j,h)}},getRightGap:function(h){var i=this.getHeaderCt(),j=i.getGridColumns(),g=Ext.Array.indexOf(j,h),l=g+1,k;for(;l<=j.length;l++){if(!j[l].hidden){k=l;break}}return k-g},beforeDestroy:function(){if(this.rendered){this.el.removeAllListeners()}this.callParent(arguments)},getLeftGap:function(h){var i=this.getHeaderCt(),j=i.getGridColumns(),l=Ext.Array.indexOf(j,h),k=l-1,g;for(;k>=0;k--){if(!j[k].hidden){g=k;break}}return g-l},onAdd:function(f,e,d){this.callParent(arguments);this.doStripeRows(d)},onRemove:function(f,e,d){this.callParent(arguments);this.doStripeRows(d)},doStripeRows:function(g,h){if(this.stripeRows){var k=this.getNodes(g,h),i=k.length,l=0,j;for(;l<i;l++){j=k[l];j.className=j.className.replace(this.rowClsRe," ");g++;if(g%2===0){j.className+=(" "+this.altRowCls)}}}}});Ext.define("Ext.grid.View",{extend:"Ext.view.Table",alias:"widget.gridview",stripeRows:true,autoScroll:true});Ext.define("Docs.view.HoverMenu",{extend:"Ext.view.View",alias:"widget.hovermenu",componentCls:"hover-menu",itemSelector:"div.item",deferEmptyText:false,columnHeight:25,initComponent:function(){this.renderTo=Ext.getBody();this.tpl=new Ext.XTemplate("<table>","<tr>","<td>",'<tpl for=".">','<div class="item">',"{[this.renderLink(values)]}","</div>",'<tpl if="xindex % this.columnHeight === 0 && xcount > xindex">',"</td><td>","</tpl>","</tpl>","</td>","</tr>","</table>",{columnHeight:this.columnHeight,renderLink:function(d){var c=Ext.Array.map(Docs.data.signatures,function(a){return d.meta[a.key]?'<span class="signature '+a.key+'">'+(a["short"])+"</span>":""}).join(" ");return Ext.String.format('<a href="#!/api/{0}" rel="{0}" class="docClass">{1} {2}</a>',d.url,d.label,c)}});this.callParent()}});Ext.define("Ext.data.NodeStore",{extend:"Ext.data.Store",alias:"store.node",requires:["Ext.data.NodeInterface"],node:null,recursive:false,rootVisible:false,constructor:function(e){var f=this,d;e=e||{};Ext.apply(f,e);if(Ext.isDefined(f.proxy)){Ext.Error.raise("A NodeStore cannot be bound to a proxy. Instead bind it to a record decorated with the NodeInterface by setting the node config.")}f.useModelWarning=false;e.proxy={type:"proxy"};f.callParent([e]);d=f.node;if(d){f.node=null;f.setNode(d)}},setNode:function(c){var d=this;if(d.node&&d.node!=c){d.mun(d.node,{expand:d.onNodeExpand,collapse:d.onNodeCollapse,append:d.onNodeAppend,insert:d.onNodeInsert,remove:d.onNodeRemove,sort:d.onNodeSort,scope:d});d.node=null}if(c){Ext.data.NodeInterface.decorate(c.self);d.removeAll();if(d.rootVisible){d.add(c)}else{if(!c.isExpanded()&&d.treeStore.autoLoad!==false){c.expand()}}d.mon(c,{expand:d.onNodeExpand,collapse:d.onNodeCollapse,append:d.onNodeAppend,insert:d.onNodeInsert,remove:d.onNodeRemove,sort:d.onNodeSort,scope:d});d.node=c;if(c.isExpanded()&&c.isLoaded()){d.onNodeExpand(c,c.childNodes,true)}}},onNodeSort:function(d,f){var e=this;if((e.indexOf(d)!==-1||(d===e.node&&!e.rootVisible)&&d.isExpanded())){e.onNodeCollapse(d,f,true);e.onNodeExpand(d,f,true)}},onNodeExpand:function(m,o,p){var k=this,j=k.indexOf(m)+1,l=o?o.length:0,n,i;if(!k.recursive&&m!==k.node){return}if(m!==this.node&&!k.isVisible(m)){return}if(!p&&k.fireEvent("beforeexpand",m,o,j)===false){return}if(l){k.insert(j,o);for(n=0;n<l;n++){i=o[n];if(i.isExpanded()){if(i.isLoaded()){k.onNodeExpand(i,i.childNodes,true)}else{i.set("expanded",false);i.expand()}}}}if(!p){k.fireEvent("expand",m,o)}},onNodeCollapse:function(m,p,i){var k=this,l=p.length,n=k.indexOf(m)+1,o,j;if(!k.recursive&&m!==k.node){return}if(!i&&k.fireEvent("beforecollapse",m,p,n)===false){return}for(o=0;o<l;o++){j=p[o];k.remove(j);if(j.isExpanded()){k.onNodeCollapse(j,j.childNodes,true)}}if(!i){k.fireEvent("collapse",m,p,n)}},onNodeAppend:function(k,i,g){var j=this,h,l;if(j.isVisible(i)){if(g===0){h=k}else{l=i.previousSibling;while(l.isExpanded()&&l.lastChild){l=l.lastChild}h=l}j.insert(j.indexOf(h)+1,i);if(!i.isLeaf()&&i.isExpanded()){if(i.isLoaded()){j.onNodeExpand(i,i.childNodes,true)}else{i.set("expanded",false);i.expand()}}}},onNodeInsert:function(j,h,g){var i=this,f=this.indexOf(g);if(f!=-1&&i.isVisible(h)){i.insert(f,h);if(!h.isLeaf()&&h.isExpanded()){if(h.isLoaded()){i.onNodeExpand(h,h.childNodes,true)}else{h.set("expanded",false);h.expand()}}}},onNodeRemove:function(e,g,f){var h=this;if(h.indexOf(g)!=-1){if(!g.isLeaf()&&g.isExpanded()){h.onNodeCollapse(g,g.childNodes,true)}h.remove(g)}},isVisible:function(c){var d=c.parentNode;while(d){if(d===this.node&&!this.rootVisible&&d.isExpanded()){return true}if(this.indexOf(d)===-1||!d.isExpanded()){return false}d=d.parentNode}return true}});Ext.define("Ext.tree.View",{extend:"Ext.view.Table",alias:"widget.treeview",requires:["Ext.data.NodeStore"],loadingCls:Ext.baseCSSPrefix+"grid-tree-loading",expandedCls:Ext.baseCSSPrefix+"grid-tree-node-expanded",leafCls:Ext.baseCSSPrefix+"grid-tree-node-leaf",expanderSelector:"."+Ext.baseCSSPrefix+"tree-expander",checkboxSelector:"."+Ext.baseCSSPrefix+"tree-checkbox",expanderIconOverCls:Ext.baseCSSPrefix+"tree-expander-over",nodeAnimWrapCls:Ext.baseCSSPrefix+"tree-animator-wrap",blockRefresh:true,rootVisible:true,deferInitialRefresh:false,expandDuration:250,collapseDuration:250,toggleOnDblClick:true,stripeRows:false,uiFields:["expanded","loaded","checked","expandable","leaf","icon","iconCls","loading"],initComponent:function(){var d=this,c=d.panel.getStore();if(d.initialConfig.animate===undefined){d.animate=Ext.enableFx}d.store=new Ext.data.NodeStore({treeStore:c,recursive:true,rootVisible:d.rootVisible,listeners:{beforeexpand:d.onBeforeExpand,expand:d.onExpand,beforecollapse:d.onBeforeCollapse,collapse:d.onCollapse,write:d.onStoreWrite,datachanged:d.onStoreDataChanged,scope:d}});if(d.node){d.setRootNode(d.node)}d.animQueue={};d.animWraps={};d.addEvents("afteritemexpand","afteritemcollapse");d.callParent(arguments);d.on({element:"el",scope:d,delegate:d.expanderSelector,mouseover:d.onExpanderMouseOver,mouseout:d.onExpanderMouseOut});d.on({element:"el",scope:d,delegate:d.checkboxSelector,click:d.onCheckboxChange})},afterComponentLayout:function(){this.callParent(arguments);var b=this.stretcher;if(b){b.setWidth((this.getWidth()-Ext.getScrollbarSize().width))}},processUIEvent:function(b){if(b.getTarget("."+this.nodeAnimWrapCls,this.el)){return false}return this.callParent(arguments)},onClear:function(){this.store.removeAll()},setRootNode:function(c){var d=this;d.store.setNode(c);d.node=c},onCheckboxChange:function(g,f){var h=this,e=g.getTarget(h.getItemSelector(),h.getTargetEl());if(e){h.onCheckChange(h.getRecord(e))}},onCheckChange:function(d){var c=d.get("checked");if(Ext.isBoolean(c)){c=!c;d.set("checked",c);this.fireEvent("checkchange",d,c)}},getChecked:function(){var b=[];this.node.cascadeBy(function(a){if(a.get("checked")){b.push(a)}});return b},isItemChecked:function(b){return b.get("checked")},createAnimWrap:function(o,n){var q="",r=this.panel.headerCt,u=r.getGridColumns(),p=0,m=u.length,i,s=this.getNode(o),v,t;for(;p<m;p++){i=u[p];q+='<th style="width: '+(i.hidden?0:i.getDesiredWidth())+'px; height: 0px;"></th>'}t=Ext.get(s);v=t.insertSibling({tag:"tr",html:['<td colspan="'+r.getColumnCount()+'">','<div class="'+this.nodeAnimWrapCls+'">','<table class="'+Ext.baseCSSPrefix+'grid-table" style="width: '+r.getFullWidth()+'px;"><tbody>',q,"</tbody></table>","</div>","</td>"].join("")},"after");return{record:o,node:s,el:v,expanding:false,collapsing:false,animating:false,animateEl:v.down("div"),targetEl:v.down("tbody")}},getAnimWrap:function(g,f){if(!this.animate){return null}var e=this.animWraps,h=e[g.internalId];if(f!==false){while(!h&&g){g=g.parentNode;if(g){h=e[g.internalId]}}}return h},doAdd:function(x,v,r){var q=this,t=v[0],o=t.parentNode,p=q.all.elements,a=0,u=q.getAnimWrap(o),n,w,s;if(!u||!u.expanding){return q.callParent(arguments)}o=u.record;n=u.targetEl;w=n.dom.childNodes;s=w.length-1;a=r-q.indexOf(o)-1;if(!s||a>=s){n.appendChild(x)}else{Ext.fly(w[a+1]).insertSibling(x,"before",true)}Ext.Array.insert(p,r,x);if(u.isAnimating){q.onExpand(o)}},beginBulkUpdate:function(){this.bulkUpdate=true;this.ownerCt.changingScrollbars=true},endBulkUpdate:function(){this.bulkUpdate=false;this.ownerCt.changingScrollbars=true},onRemove:function(h,g,f){var i=this,j=i.bulkUpdate;i.doRemove(g,f);if(!j){i.updateIndexes(f)}if(i.store.getCount()===0){i.refresh()}if(!j){i.fireEvent("itemremove",g,f)}},doRemove:function(h,l){var i=this,k=i.all,g=i.getAnimWrap(h),j=k.item(l).dom;if(!g||!g.collapsing){return i.callParent(arguments)}g.targetEl.appendChild(j);k.removeElement(l)},onBeforeExpand:function(i,f,j){var h=this,g;if(!h.rendered||!h.animate){return}if(h.getNode(i)){g=h.getAnimWrap(i,false);if(!g){g=h.animWraps[i.internalId]=h.createAnimWrap(i);g.animateEl.setHeight(0)}else{if(g.collapsing){g.targetEl.select(h.itemSelector).remove()}}g.expanding=true;g.collapsing=false}},onExpand:function(k){var l=this,n=l.animQueue,r=k.getId(),p=l.getNode(k),m=p?l.indexOf(p):-1,o,q,j;if(l.singleExpand){l.ensureSingleExpand(k)}if(m===-1){return}o=l.getAnimWrap(k,false);if(!o){l.fireEvent("afteritemexpand",k,m,p);return}q=o.animateEl;j=o.targetEl;q.stopAnimation();n[r]=true;q.slideIn("t",{duration:l.expandDuration,listeners:{scope:l,lastframe:function(){o.el.insertSibling(j.query(l.itemSelector),"before");o.el.remove();delete l.animWraps[o.record.internalId];delete n[r]}},callback:function(){l.fireEvent("afteritemexpand",k,m,p)}});o.isAnimating=true},onBeforeCollapse:function(i,f,j){var h=this,g;if(!h.rendered||!h.animate){return}if(h.getNode(i)){g=h.getAnimWrap(i);if(!g){g=h.animWraps[i.internalId]=h.createAnimWrap(i,j)}else{if(g.expanding){g.targetEl.select(this.itemSelector).remove()}}g.expanding=false;g.collapsing=true}},onCollapse:function(k){var l=this,n=l.animQueue,r=k.getId(),p=l.getNode(k),m=p?l.indexOf(p):-1,o=l.getAnimWrap(k),q,j;if(m===-1){return}if(!o){l.fireEvent("afteritemcollapse",k,m,p);return}q=o.animateEl;j=o.targetEl;n[r]=true;q.stopAnimation();q.slideOut("t",{duration:l.collapseDuration,listeners:{scope:l,lastframe:function(){o.el.remove();delete l.animWraps[o.record.internalId];delete n[r]}},callback:function(){l.fireEvent("afteritemcollapse",k,m,p)}});o.isAnimating=true},isAnimating:function(b){return !!this.animQueue[b.getId()]},collectData:function(n){var k=this.callParent(arguments),l=k.rows,i=l.length,m=0,j,h;for(;m<i;m++){j=l[m];h=n[m];if(h.get("qtip")){j.rowAttr='data-qtip="'+h.get("qtip")+'"';if(h.get("qtitle")){j.rowAttr+=' data-qtitle="'+h.get("qtitle")+'"'}}if(h.isExpanded()){j.rowCls=(j.rowCls||"")+" "+this.expandedCls}if(h.isLeaf()){j.rowCls=(j.rowCls||"")+" "+this.leafCls}if(h.isLoading()){j.rowCls=(j.rowCls||"")+" "+this.loadingCls}}return k},expand:function(e,f,g,h){return e.expand(f,g,h)},collapse:function(e,f,g,h){return e.collapse(f,g,h)},toggle:function(c,d){this[c.isExpanded()?"collapse":"expand"](c,d)},onItemDblClick:function(f,g,h){var e=this.editingPlugin;this.callParent(arguments);if(this.toggleOnDblClick&&!(e&&e.clicksToEdit===2)){this.toggle(f)}},onBeforeItemMouseDown:function(f,h,e,g){if(g.getTarget(this.expanderSelector,h)){return false}return this.callParent(arguments)},onItemClick:function(f,h,e,g){if(g.getTarget(this.expanderSelector,h)){this.toggle(f,g.ctrlKey);return false}return this.callParent(arguments)},onExpanderMouseOver:function(c,d){c.getTarget(this.cellSelector,10,true).addCls(this.expanderIconOverCls)},onExpanderMouseOut:function(c,d){c.getTarget(this.cellSelector,10,true).removeCls(this.expanderIconOverCls)},getTreeStore:function(){return this.panel.store},ensureSingleExpand:function(c){var d=c.parentNode;if(d){d.eachChild(function(a){if(a!==c&&a.isExpanded()){a.collapse()}})}},shouldUpdateCell:function(c,d){return Ext.Array.contains(this.uiFields,c.dataIndex)||this.callParent(arguments)},onStoreWrite:function(d,e){var f=this.panel.store;f.fireEvent("write",f,e)},onStoreDataChanged:function(d,e){var f=this.panel.store;f.fireEvent("datachanged",f)}});Ext.define("Ext.selection.RowModel",{extend:"Ext.selection.Model",alias:"selection.rowmodel",requires:["Ext.util.KeyNav"],deltaScroll:5,enableKeyNav:true,ignoreRightMouseSelection:false,constructor:function(){this.addEvents("beforedeselect","beforeselect","deselect","select");this.views=[];this.callParent(arguments)},bindComponent:function(d){var c=this;c.views=c.views||[];c.views.push(d);c.bindStore(d.getStore(),true);d.on({itemmousedown:c.onRowMouseDown,scope:c});if(c.enableKeyNav){c.initKeyNav(d)}},initKeyNav:function(d){var c=this;if(!d.rendered){d.on("render",Ext.Function.bind(c.initKeyNav,c,[d],0),c,{single:true});return}d.el.set({tabIndex:-1});c.keyNav=new Ext.util.KeyNav({target:d,eventName:"itemkeydown",processEvent:function(i,j,a,h,b){b.record=j;b.recordIndex=h;return b},up:c.onKeyUp,down:c.onKeyDown,right:c.onKeyRight,left:c.onKeyLeft,pageDown:c.onKeyPageDown,pageUp:c.onKeyPageUp,home:c.onKeyHome,end:c.onKeyEnd,space:c.onKeySpace,scope:c})},getRowsVisible:function(){var h=false,g=this.views[0],i=g.getNode(0),f,j;if(i){f=Ext.fly(i).getHeight();j=g.el.getHeight();h=Math.floor(j/f)}return h},onKeyEnd:function(f){var d=this,e=d.store.getAt(d.store.getCount()-1);if(e){if(f.shiftKey){d.selectRange(e,d.lastFocused||0);d.setLastFocused(e)}else{if(f.ctrlKey){d.setLastFocused(e)}else{d.doSelect(e)}}}},onKeyHome:function(d){var e=this,f=e.store.getAt(0);if(f){if(d.shiftKey){e.selectRange(f,e.lastFocused||0);e.setLastFocused(f)}else{if(d.ctrlKey){e.setLastFocused(f)}else{e.doSelect(f,false)}}}},onKeyPageUp:function(j){var k=this,i=k.getRowsVisible(),e,l,h;if(i){e=j.recordIndex;l=e-i;if(l<0){l=0}h=k.store.getAt(l);if(j.shiftKey){k.selectRange(h,j.record,j.ctrlKey,"up");k.setLastFocused(h)}else{if(j.ctrlKey){j.preventDefault();k.setLastFocused(h)}else{k.doSelect(h)}}}},onKeyPageDown:function(j){var l=this,i=l.getRowsVisible(),h,k,e;if(i){h=j.recordIndex;k=h+i;if(k>=l.store.getCount()){k=l.store.getCount()-1}e=l.store.getAt(k);if(j.shiftKey){l.selectRange(e,j.record,j.ctrlKey,"down");l.setLastFocused(e)}else{if(j.ctrlKey){j.preventDefault();l.setLastFocused(e)}else{l.doSelect(e)}}}},onKeySpace:function(f){var d=this,e=d.lastFocused;if(e){if(d.isSelected(e)){d.doDeselect(e,false)}else{d.doSelect(e,true)}}},onKeyUp:function(g){var h=this,f=h.store.indexOf(h.lastFocused),e;if(f>0){e=h.store.getAt(f-1);if(g.shiftKey&&h.lastFocused){if(h.isSelected(h.lastFocused)&&h.isSelected(e)){h.doDeselect(h.lastFocused,true);h.setLastFocused(e)}else{if(!h.isSelected(h.lastFocused)){h.doSelect(h.lastFocused,true);h.doSelect(e,true)}else{h.doSelect(e,true)}}}else{if(g.ctrlKey){h.setLastFocused(e)}else{h.doSelect(e)}}}},onKeyDown:function(g){var h=this,f=h.store.indexOf(h.lastFocused),e;if(f+1<h.store.getCount()){e=h.store.getAt(f+1);if(h.selected.getCount()===0){if(!g.ctrlKey){h.doSelect(e)}else{h.setLastFocused(e)}}else{if(g.shiftKey&&h.lastFocused){if(h.isSelected(h.lastFocused)&&h.isSelected(e)){h.doDeselect(h.lastFocused,true);h.setLastFocused(e)}else{if(!h.isSelected(h.lastFocused)){h.doSelect(h.lastFocused,true);h.doSelect(e,true)}else{h.doSelect(e,true)}}}else{if(g.ctrlKey){h.setLastFocused(e)}else{h.doSelect(e)}}}}},scrollByDeltaX:function(g){var f=this.views[0],h=f.up(),e=h.horizontalScroller;if(e){e.scrollByDeltaX(g)}},onKeyLeft:function(b){this.scrollByDeltaX(-this.deltaScroll)},onKeyRight:function(b){this.scrollByDeltaX(this.deltaScroll)},onRowMouseDown:function(e,g,i,j,h){if(!this.allowRightMouseSelection(h)){return}if(h.button===0||!this.isSelected(g)){this.selectWithEvent(g,h)}},allowRightMouseSelection:function(d){var c=this.ignoreRightMouseSelection&&d.button!==0;if(c){c=this.hasSelection()}return !c},onSelectChange:function(q,t,m,v){var o=this,i=o.views,s=i.length,n=o.store,u=n.indexOf(q),p=t?"select":"deselect",r=0;if((m||o.fireEvent("before"+p,o,q,u))!==false&&v()!==false){for(;r<s;r++){if(t){i[r].onRowSelect(u,m)}else{i[r].onRowDeselect(u,m)}}if(!m){o.fireEvent(p,o,q,u)}}},onLastFocusChanged:function(k,o,i){var j=this.views,l=j.length,p=this.store,m,n=0;if(k){m=p.indexOf(k);if(m!=-1){for(;n<l;n++){j[n].onRowFocus(m,false)}}}if(o){m=p.indexOf(o);if(m!=-1){for(n=0;n<l;n++){j[n].onRowFocus(m,true,i)}}}this.callParent()},onEditorTab:function(o,l){var n=this,p=n.views[0],e=o.getActiveRecord(),k=o.getActiveColumn(),j=p.getPosition(e,k),m=l.shiftKey?"left":"right";do{j=p.walkCells(j,m,l,n.preventWrap)}while(j&&!p.headerCt.getHeaderAtIndex(j.column).getEditor());if(j){o.startEditByPosition(j)}},selectByPosition:function(d){var c=this.store.getAt(d.row);this.select(c)},selectNext:function(l,p){var m=this,i=m.store,n=m.getSelection(),j=n[n.length-1],o=i.indexOf(j)+1,k;if(o===i.getCount()||o===0){k=false}else{m.doSelect(o,l,p);k=true}return k},selectPrevious:function(k,h){var l=this,m=l.getSelection(),i=m[0],n=l.store.indexOf(i)-1,j;if(n<0){j=false}else{l.doSelect(n,k,h);j=true}return j}});Ext.define("Ext.selection.TreeModel",{extend:"Ext.selection.RowModel",alias:"selection.treemodel",pruneRemoved:false,onKeyRight:function(g,e){var h=this.getLastFocused(),f=this.view;if(h){if(h.isExpanded()){this.onKeyDown(g,e)}else{if(!h.isLeaf()){f.expand(h)}}}},onKeyLeft:function(j,m){var k=this.getLastFocused(),n=this.view,e=n.getSelectionModel(),i,l;if(k){i=k.parentNode;if(k.isExpanded()){n.collapse(k)}else{if(i&&!i.isRoot()){if(j.shiftKey){e.selectRange(i,k,j.ctrlKey,"up");e.setLastFocused(i)}else{if(j.ctrlKey){e.setLastFocused(i)}else{e.select(i)}}}}}},onKeyPress:function(h,e){var g=h.getKey(),j,i;if(g===h.SPACE||g===h.ENTER){h.stopEvent();j=this.getLastSelected();if(j){this.view.onCheckChange(j)}}else{this.callParent(arguments)}}});Ext.define("Ext.toolbar.Item",{extend:"Ext.Component",alias:"widget.tbitem",alternateClassName:"Ext.Toolbar.Item",enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.define("Ext.toolbar.TextItem",{extend:"Ext.toolbar.Item",requires:["Ext.XTemplate"],alias:"widget.tbtext",alternateClassName:"Ext.Toolbar.TextItem",text:"",renderTpl:"{text}",baseCls:Ext.baseCSSPrefix+"toolbar-text",beforeRender:function(){var b=this;b.callParent();Ext.apply(b.renderData,{text:b.text})},setText:function(b){if(this.rendered){this.el.update(b);this.ownerCt.doLayout()}else{this.text=b}}});Ext.define("Docs.view.HoverMenuButton",{extend:"Ext.toolbar.TextItem",alias:"widget.hovermenubutton",componentCls:"hover-menu-button",requires:["Docs.view.HoverMenu"],showCount:false,statics:{menus:[]},initComponent:function(){this.addEvents("click");if(this.showCount){this.initialText=this.text;this.text+=" <sup>"+this.store.getCount()+"</sup>";this.store.on("datachanged",function(){this.setText(this.initialText+" <sup>"+this.store.getCount()+"</sup>")},this)}this.callParent(arguments)},getColumnHeight:function(){var c=200;var d=18;return Math.floor((Ext.Element.getViewportHeight()-c)/d)},onRender:function(){this.callParent(arguments);this.getEl().on({click:function(){this.fireEvent("click")},mouseover:this.deferShowMenu,mouseout:this.deferHideMenu,scope:this})},onDestroy:function(){if(this.menu){this.menu.destroy();Ext.Array.remove(Docs.view.HoverMenuButton.menus,this.menu)}this.callParent(arguments)},renderMenu:function(){this.menu=Ext.create("Docs.view.HoverMenu",{store:this.store,columnHeight:this.getColumnHeight()});this.menu.getEl().on({click:function(b){this.menu.hide();b.preventDefault()},mouseover:function(){clearTimeout(this.hideTimeout)},mouseout:this.deferHideMenu,scope:this});Docs.view.HoverMenuButton.menus.push(this.menu)},deferHideMenu:function(){clearTimeout(Docs.view.HoverMenuButton.showTimeout);if(!this.menu){return}this.hideTimeout=Ext.Function.defer(function(){this.menu.hide()},200,this)},deferShowMenu:function(){clearTimeout(Docs.view.HoverMenuButton.showTimeout);Docs.view.HoverMenuButton.showTimeout=Ext.Function.defer(function(){if(!this.menu){this.renderMenu()}Ext.Array.forEach(Docs.view.HoverMenuButton.menus,function(a){if(a!==this.menu){a.hide()}},this);clearTimeout(this.hideTimeout);this.menu.show();var j=this.getEl().getXY(),n=Ext.ComponentQuery.query("classoverview toolbar")[0],k=j[0]-10,l=n.getEl().getXY(),i=n.getWidth(),m=this.menu.getEl().getWidth(),h=Ext.getCmp("doctabs").getWidth();if(m>h){k=0}else{if((k+m)>h){k=h-m-30}}if(k<l[0]){k=l[0]}this.menu.getEl().setStyle({left:k+"px",top:(j[1]+25)+"px"})},200,this)},getStore:function(){return this.store}});Ext.define("Ext.dd.DragDrop",{requires:["Ext.dd.DragDropManager"],constructor:function(f,e,d){if(f){this.init(f,e,d)}},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(d,c){},startDrag:function(d,c){},b4Drag:function(b){},onDrag:function(b){},onDragEnter:function(d,c){},b4DragOver:function(b){},onDragOver:function(d,c){},b4DragOut:function(b){},onDragOut:function(d,c){},b4DragDrop:function(b){},onDragDrop:function(d,c){},onInvalidDrop:function(b){},b4EndDrag:function(b){},endDrag:function(b){},b4MouseDown:function(b){},onMouseDown:function(b){},onMouseUp:function(b){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(q,s,b){if(Ext.isNumber(s)){s={left:s,right:s,top:s,bottom:s}}s=s||this.defaultPadding;var o=Ext.get(this.getEl()).getBox(),v=Ext.get(q),c=v.getScroll(),p,u=v.dom,n,r,t;if(u==document.body){p={x:c.left,y:c.top,width:Ext.Element.getViewWidth(),height:Ext.Element.getViewHeight()}}else{n=v.getXY();p={x:n[0],y:n[1],width:u.clientWidth,height:u.clientHeight}}r=o.y-p.y;t=o.x-p.x;this.resetConstraints();this.setXConstraint(t-(s.left||0),p.width-t-o.width-(s.right||0),this.xTickSize);this.setYConstraint(r-(s.top||0),p.height-r-o.height-(s.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(f,e,d){this.initTarget(f,e,d);Ext.EventManager.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(f,e,d){this.config=d||{};this.DDMInstance=Ext.dd.DragDropManager;this.groups={};if(typeof f!=="string"){f=Ext.id(f)}this.id=f;this.addToGroup((e)?e:"default");this.handleElId=f;this.setDragElId(f);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(h,f,g,e){if(!f&&0!==f){this.padding=[h,h,h,h]}else{if(!g&&0!==g){this.padding=[h,f,h,f]}else{this.padding=[h,f,g,e]}}},setInitPosition:function(k,l){var j=this.getEl(),g,h,i;if(!this.DDMInstance.verifyEl(j)){return}g=k||0;h=l||0;i=Ext.Element.getXY(j);this.initPageX=i[0]-g;this.initPageY=i[1]-h;this.lastPageX=i[0];this.lastPageY=i[1];this.setStartPosition(i)},setStartPosition:function(c){var d=c||Ext.Element.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=d[0];this.startPageY=d[1]},addToGroup:function(b){this.groups[b]=true;this.DDMInstance.regDragDrop(this,b)},removeFromGroup:function(b){if(this.groups[b]){delete this.groups[b]}this.DDMInstance.removeDDFromGroup(this,b)},setDragElId:function(b){this.dragElId=b},setHandleElId:function(b){if(typeof b!=="string"){b=Ext.id(b)}this.handleElId=b;this.DDMInstance.regHandle(this.id,b)},setOuterHandleElId:function(b){if(typeof b!=="string"){b=Ext.id(b)}Ext.EventManager.on(b,"mousedown",this.handleMouseDown,this);this.setHandleElId(b);this.hasOuterHandles=true},unreg:function(){Ext.EventManager.un(this.id,"mousedown",this.handleMouseDown,this);this._domRef=null;this.DDMInstance._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDMInstance.isLocked()||this.locked)},handleMouseDown:function(c,d){if(this.primaryButtonOnly&&c.button!=0){return}if(this.isLocked()){return}this.DDMInstance.refreshCache(this.groups);if(this.hasOuterHandles||this.DDMInstance.isOverTarget(c.getPoint(),this)){if(this.clickValidator(c)){this.setStartPosition();this.b4MouseDown(c);this.onMouseDown(c);this.DDMInstance.handleMouseDown(c,this);this.DDMInstance.stopEvent(c)}}},clickValidator:function(c){var d=c.getTarget();return(this.isValidHandleChild(d)&&(this.id==this.handleElId||this.DDMInstance.handleWasClicked(d,this.id)))},addInvalidHandleType:function(d){var c=d.toUpperCase();this.invalidHandleTypes[c]=c},addInvalidHandleId:function(b){if(typeof b!=="string"){b=Ext.id(b)}this.invalidHandleIds[b]=b},addInvalidHandleClass:function(b){this.invalidHandleClasses.push(b)},removeInvalidHandleType:function(d){var c=d.toUpperCase();delete this.invalidHandleTypes[c]},removeInvalidHandleId:function(b){if(typeof b!=="string"){b=Ext.id(b)}delete this.invalidHandleIds[b]},removeInvalidHandleClass:function(d){for(var f=0,e=this.invalidHandleClasses.length;f<e;++f){if(this.invalidHandleClasses[f]==d){delete this.invalidHandleClasses[f]}}},isValidHandleChild:function(k){var l=true,i,e,h;try{i=k.nodeName.toUpperCase()}catch(j){i=k.nodeName}l=l&&!this.invalidHandleTypes[i];l=l&&!this.invalidHandleIds[k.id];for(e=0,h=this.invalidHandleClasses.length;l&&e<h;++e){l=!Ext.fly(k).hasCls(this.invalidHandleClasses[e])}return l},setXTicks:function(g,f){this.xTicks=[];this.xTickSize=f;var h={},e;for(e=this.initPageX;e>=this.minX;e=e-f){if(!h[e]){this.xTicks[this.xTicks.length]=e;h[e]=true}}for(e=this.initPageX;e<=this.maxX;e=e+f){if(!h[e]){this.xTicks[this.xTicks.length]=e;h[e]=true}}Ext.Array.sort(this.xTicks,this.DDMInstance.numericSort)},setYTicks:function(g,f){this.yTicks=[];this.yTickSize=f;var h={},e;for(e=this.initPageY;e>=this.minY;e=e-f){if(!h[e]){this.yTicks[this.yTicks.length]=e;h[e]=true}}for(e=this.initPageY;e<=this.maxY;e=e+f){if(!h[e]){this.yTicks[this.yTicks.length]=e;h[e]=true}}Ext.Array.sort(this.yTicks,this.DDMInstance.numericSort)},setXConstraint:function(f,d,e){this.leftConstraint=f;this.rightConstraint=d;this.minX=this.initPageX-f;this.maxX=this.initPageX+d;if(e){this.setXTicks(this.initPageX,e)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(e,f,d){this.topConstraint=e;this.bottomConstraint=f;this.minY=this.initPageY-e;this.maxY=this.initPageY+f;if(d){this.setYTicks(this.initPageY,d)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var c=(this.maintainOffset)?this.lastPageX-this.initPageX:0,d=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(c,d)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(j,m){if(!m){return j}else{if(m[0]>=j){return m[0]}else{var h,i,n,k,l;for(h=0,i=m.length;h<i;++h){n=h+1;if(m[n]&&m[n]>=j){k=j-m[h];l=m[n]-j;return(l>k)?m[h]:m[n]}}return m[m.length-1]}}},toString:function(){return("DragDrop "+this.id)}});Ext.define("Ext.dd.DD",{extend:"Ext.dd.DragDrop",requires:["Ext.dd.DragDropManager"],constructor:function(f,e,d){if(f){this.init(f,e,d)}},scroll:true,autoOffset:function(h,e){var f=h-this.startPageX,g=e-this.startPageY;this.setDelta(f,g)},setDelta:function(c,d){this.deltaX=c;this.deltaY=d},setDragElPos:function(f,d){var e=this.getDragEl();this.alignElWithMouse(e,f,d)},alignElWithMouse:function(u,r,t){var q=this.getTargetCoord(r,t),s=u.dom?u:Ext.fly(u,"_dd"),l=s.getSize(),o=Ext.Element,n,v,m,p;if(!this.deltaSetXY){n=this.cachedViewportSize={width:o.getDocumentWidth(),height:o.getDocumentHeight()};v=[Math.max(0,Math.min(q.x,n.width-l.width)),Math.max(0,Math.min(q.y,n.height-l.height))];s.setXY(v);m=s.getLeft(true);p=s.getTop(true);this.deltaSetXY=[m-q.x,p-q.y]}else{n=this.cachedViewportSize;s.setLeftTop(Math.max(0,Math.min(q.x+this.deltaSetXY[0],n.width-l.width)),Math.max(0,Math.min(q.y+this.deltaSetXY[1],n.height-l.height)))}this.cachePosition(q.x,q.y);this.autoScroll(q.x,q.y,u.offsetHeight,u.offsetWidth);return q},cachePosition:function(d,e){if(d){this.lastPageX=d;this.lastPageY=e}else{var f=Ext.Element.getXY(this.getEl());this.lastPageX=f[0];this.lastPageY=f[1]}},autoScroll:function(s,t,x,r){if(this.scroll){var q=Ext.Element.getViewHeight(),A=Ext.Element.getViewWidth(),h=this.DDMInstance.getScrollTop(),y=this.DDMInstance.getScrollLeft(),u=x+t,p=r+s,v=(q+h-t-this.deltaY),w=(A+y-s-this.deltaX),z=40,B=(document.all)?80:30;if(u>q&&v<z){window.scrollTo(y,h+B)}if(t<h&&h>0&&t-h<z){window.scrollTo(y,h-B)}if(p>A&&w<z){window.scrollTo(y+B,h)}if(s<y&&y>0&&s-y<z){window.scrollTo(y-B,h)}}},getTargetCoord:function(h,e){var f=h-this.deltaX,g=e-this.deltaY;if(this.constrainX){if(f<this.minX){f=this.minX}if(f>this.maxX){f=this.maxX}}if(this.constrainY){if(g<this.minY){g=this.minY}if(g>this.maxY){g=this.maxY}}f=this.getTick(f,this.xTicks);g=this.getTick(g,this.yTicks);return{x:f,y:g}},applyConfig:function(){this.callParent();this.scroll=(this.config.scroll!==false)},b4MouseDown:function(b){this.autoOffset(b.getPageX(),b.getPageY())},b4Drag:function(b){this.setDragElPos(b.getPageX(),b.getPageY())},toString:function(){return("DD "+this.id)}});Ext.define("Ext.dd.DDProxy",{extend:"Ext.dd.DD",statics:{dragElId:"ygddfdiv"},constructor:function(f,e,d){if(f){this.init(f,e,d);this.initFrame()}},resizeFrame:true,centerFrame:false,createFrame:function(){var e=this,f=document.body,g,h;if(!f||!f.firstChild){setTimeout(function(){e.createFrame()},50);return}g=this.getDragEl();if(!g){g=document.createElement("div");g.id=this.dragElId;h=g.style;h.position="absolute";h.visibility="hidden";h.cursor="move";h.border="2px solid #aaa";h.zIndex=999;f.insertBefore(g,f.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){this.callParent();this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(h,i){var j=this.getEl(),g=this.getDragEl(),f=g.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(f.width,10)/2),Math.round(parseInt(f.height,10)/2))}this.setDragElPos(h,i);Ext.fly(g).show()},_resizeProxy:function(){if(this.resizeFrame){var b=this.getEl();Ext.fly(this.getDragEl()).setSize(b.offsetWidth,b.offsetHeight)}},b4MouseDown:function(d){var e=d.getPageX(),f=d.getPageY();this.autoOffset(e,f);this.setDragElPos(e,f)},b4StartDrag:function(d,c){this.showFrame(d,c)},b4EndDrag:function(b){Ext.fly(this.getDragEl()).hide()},endDrag:function(f){var d=this.getEl(),e=this.getDragEl();e.style.visibility="";this.beforeMove();d.style.visibility="hidden";Ext.dd.DDM.moveToEl(d,e);e.style.visibility="hidden";d.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.define("Ext.dd.DragSource",{extend:"Ext.dd.DDProxy",requires:["Ext.dd.StatusProxy","Ext.dd.DragDropManager"],dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",animRepair:true,repairHighlightColor:"c3daf9",constructor:function(c,d){this.el=Ext.get(c);if(!this.dragData){this.dragData={}}Ext.apply(this,d);if(!this.proxy){this.proxy=new Ext.dd.StatusProxy({id:this.el.id+"-drag-status-proxy",animRepair:this.animRepair})}this.callParent([this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true}]);this.dragging=false},getDragData:function(b){return this.dragData},onDragEnter:function(h,g){var e=Ext.dd.DragDropManager.getDDById(g),f;this.cachedTarget=e;if(this.beforeDragEnter(e,h,g)!==false){if(e.isNotifyTarget){f=e.notifyEnter(this,h,this.dragData);this.proxy.setStatus(f)}else{this.proxy.setStatus(this.dropAllowed)}if(this.afterDragEnter){this.afterDragEnter(e,h,g)}}},beforeDragEnter:function(d,e,f){return true},onDragOver:function(h,g){var e=this.cachedTarget||Ext.dd.DragDropManager.getDDById(g),f;if(this.beforeDragOver(e,h,g)!==false){if(e.isNotifyTarget){f=e.notifyOver(this,h,this.dragData);this.proxy.setStatus(f)}if(this.afterDragOver){this.afterDragOver(e,h,g)}}},beforeDragOver:function(d,e,f){return true},onDragOut:function(d,f){var e=this.cachedTarget||Ext.dd.DragDropManager.getDDById(f);if(this.beforeDragOut(e,d,f)!==false){if(e.isNotifyTarget){e.notifyOut(this,d,this.dragData)}this.proxy.reset();if(this.afterDragOut){this.afterDragOut(e,d,f)}}this.cachedTarget=null},beforeDragOut:function(d,e,f){return true},onDragDrop:function(d,f){var e=this.cachedTarget||Ext.dd.DragDropManager.getDDById(f);if(this.beforeDragDrop(e,d,f)!==false){if(e.isNotifyTarget){if(e.notifyDrop(this,d,this.dragData)!==false){this.onValidDrop(e,d,f)}else{this.onInvalidDrop(e,d,f)}}else{this.onValidDrop(e,d,f)}if(this.afterDragDrop){this.afterDragDrop(e,d,f)}}delete this.cachedTarget},beforeDragDrop:function(d,e,f){return true},onValidDrop:function(d,e,f){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(d,e,f)}},getRepairXY:function(c,d){return this.el.getXY()},onInvalidDrop:function(d,e,f){this.beforeInvalidDrop(d,e,f);if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,e,this.dragData)}this.cacheTarget=null}this.proxy.repair(this.getRepairXY(e,this.dragData),this.afterRepair,this);if(this.afterInvalidDrop){this.afterInvalidDrop(e,f)}},afterRepair:function(){var b=this;if(Ext.enableFx){b.el.highlight(b.repairHighlightColor)}b.dragging=false},beforeInvalidDrop:function(d,e,f){return true},handleMouseDown:function(c){if(this.dragging){return}var d=this.getDragData(c);if(d&&this.onBeforeDrag(d,c)!==false){this.dragData=d;this.proxy.stop();this.callParent(arguments)}},onBeforeDrag:function(d,c){return true},onStartDrag:Ext.emptyFn,alignElWithMouse:function(){this.proxy.ensureAttachedToBody(true);return this.callParent(arguments)},startDrag:function(d,c){this.proxy.reset();this.proxy.hidden=false;this.dragging=true;this.proxy.update("");this.onInitDrag(d,c);this.proxy.show()},onInitDrag:function(e,f){var d=this.el.dom.cloneNode(true);d.id=Ext.id();this.proxy.update(d);this.onStartDrag(e,f);return true},getProxy:function(){return this.proxy},hideProxy:function(){this.proxy.hide();this.proxy.reset(true);this.dragging=false},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)},b4EndDrag:function(b){},endDrag:function(b){this.onEndDrag(this.dragData,b)},onEndDrag:function(d,c){},autoOffset:function(d,c){this.setDelta(-12,-20)},destroy:function(){this.callParent();Ext.destroy(this.proxy)}});Ext.define("Ext.panel.DD",{extend:"Ext.dd.DragSource",requires:["Ext.panel.Proxy"],constructor:function(d,e){var f=this;f.panel=d;f.dragData={panel:d};f.panelProxy=new Ext.panel.Proxy(d,e);f.proxy=f.panelProxy.proxy;f.callParent([d.el,e]);f.setupEl(d)},setupEl:function(f){var h=this,g=f.header,e=f.body;if(g){h.setHandleElId(g.id);e=g.el}if(e){e.setStyle("cursor","move");h.scroll=false}else{f.on("boxready",h.setupEl,h,{single:true})}},showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(d,c){this.panelProxy.show()},b4MouseDown:function(d){var e=d.getPageX(),f=d.getPageY();this.autoOffset(e,f)},onInitDrag:function(d,c){this.onStartDrag(d,c);return true},createFrame:Ext.emptyFn,getDragEl:function(b){return this.panelProxy.ghost.el.dom},endDrag:function(b){this.panelProxy.hide();this.panel.saveState()},autoOffset:function(d,c){d-=this.startPageX;c-=this.startPageY;this.setDelta(d,c)},onInvalidDrop:function(h,e,g){var f=this;f.beforeInvalidDrop(h,e,g);if(f.cachedTarget){if(f.cachedTarget.isNotifyTarget){f.cachedTarget.notifyOut(f,e,f.dragData)}f.cacheTarget=null}if(f.afterInvalidDrop){f.afterInvalidDrop(e,g)}}});Ext.define("Ext.dd.DragZone",{extend:"Ext.dd.DragSource",constructor:function(c,d){this.callParent([c,d]);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}},getDragData:function(b){return Ext.dd.Registry.getHandleFromEvent(b)},onInitDrag:function(d,c){this.proxy.update(this.dragData.ddel.cloneNode(true));this.onStartDrag(d,c);return true},afterRepair:function(){var b=this;if(Ext.enableFx){Ext.fly(b.dragData.ddel).highlight(b.repairHighlightColor)}b.dragging=false},getRepairXY:function(b){return Ext.fly(this.dragData.ddel).getXY()},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define("Ext.grid.header.DragZone",{extend:"Ext.dd.DragZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",maxProxyWidth:120,constructor:function(b){this.headerCt=b;this.ddGroup=this.getDDGroup();this.callParent([b.el]);this.proxy.el.addCls(Ext.baseCSSPrefix+"grid-col-dd")},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getDragData:function(e){var g=e.getTarget("."+this.colHeaderCls),f,h;if(g){f=Ext.getCmp(g.id);if(!this.headerCt.dragging&&f.draggable&&!(f.isOnLeftEdge(e)||f.isOnRightEdge(e))){h=document.createElement("div");h.innerHTML=Ext.getCmp(g.id).text;return{ddel:h,header:f}}}return false},onBeforeDrag:function(){return !(this.headerCt.dragging||this.disabled)},onInitDrag:function(){this.headerCt.dragging=true;this.callParent(arguments)},onDragDrop:function(){this.headerCt.dragging=false;this.callParent(arguments)},afterRepair:function(){this.callParent();this.headerCt.dragging=false},getRepairXY:function(){return this.dragData.header.el.getXY()},disable:function(){this.disabled=true},enable:function(){this.disabled=false}});Ext.define("Ext.toolbar.Separator",{extend:"Ext.toolbar.Item",alias:"widget.tbseparator",alternateClassName:"Ext.Toolbar.Separator",baseCls:Ext.baseCSSPrefix+"toolbar-separator",focusable:false});Ext.define("Ext.layout.container.boxOverflow.Menu",{extend:"Ext.layout.container.boxOverflow.None",requires:["Ext.toolbar.Separator","Ext.button.Button"],alternateClassName:"Ext.layout.boxOverflow.Menu",noItemsMenuText:'<div class="'+Ext.baseCSSPrefix+'toolbar-no-items">(None)</div>',constructor:function(c){var d=this;d.callParent(arguments);d.triggerButtonCls=d.triggerButtonCls||Ext.baseCSSPrefix+"box-menu-"+c.getNames().right;d.menuItems=[]},beginLayout:function(b){this.callParent(arguments);this.clearOverflow(b)},beginLayoutCycle:function(c,d){this.callParent(arguments);if(!d){this.clearOverflow(c);this.layout.cacheChildItems(c)}},onRemove:function(b){Ext.Array.remove(this.menuItems,b)},getSuffixConfig:function(){var f=this,d=f.layout,e=d.owner.id;f.menu=new Ext.menu.Menu({listeners:{scope:f,beforeshow:f.beforeMenuShow}});f.menuTrigger=new Ext.button.Button({id:e+"-menu-trigger",cls:Ext.layout.container.Box.prototype.innerCls+" "+f.triggerButtonCls,hidden:true,ownerCt:d.owner,ownerLayout:d,iconCls:Ext.baseCSSPrefix+f.getOwnerType(d.owner)+"-more-icon",ui:d.owner instanceof Ext.toolbar.Toolbar?"default-toolbar":"default",menu:f.menu,getSplitCls:function(){return""}});return f.menuTrigger.getRenderTree()},getOverflowCls:function(){return Ext.baseCSSPrefix+this.layout.direction+"-box-overflow-body"},handleOverflow:function(l){var m=this,n=m.layout,j=n.getNames(),i="get"+j.widthCap,k=l.state.boxPlan,h=[null,null];m.showTrigger(l);h[j.heightIndex]=(k.maxSize-m.menuTrigger["get"+j.heightCap]())/2;m.menuTrigger.setPosition.apply(m.menuTrigger,h);return{reservedSpace:m.menuTrigger[i]()}},captureChildElements:function(){var b=this.menuTrigger;if(b.rendering){b.finishRender()}},clearOverflow:function(j){var k=this,h=k.menuItems,l,n=0,m=h.length,i=k.layout.owner;i.suspendLayouts();k.captureChildElements();k.hideTrigger();i.resumeLayouts();for(;n<m;n++){l=h[n];l.suspendLayouts();l.show();l.resumeLayouts({isRoot:true})}h.length=0},showTrigger:function(D){var t=this,x=t.layout,F=x.owner,u=x.getNames(),i=u.x,B=u.width,s=D.state.boxPlan,E=s.targetSize[B],z=D.childItems,w=z.length,A=t.menuTrigger,r,y,C,v;A.suspendLayouts();A.show();A.resumeLayouts({isRoot:true});E-=t.menuTrigger.getWidth();F.suspendLayouts();t.menuItems.length=0;for(C=0;C<w;C++){r=z[C];v=r.props;if(v[i]+v[B]>E){y=r.target;t.menuItems.push(y);y.hide()}}F.resumeLayouts()},hideTrigger:function(){var b=this.menuTrigger;if(b){b.hide()}},beforeMenuShow:function(k){var l=this,i=l.menuItems,o=0,j=i.length,m,n,p=function(a,b){return a.isXType("buttongroup")&&!(b instanceof Ext.toolbar.Separator)};k.suspendLayouts();l.clearMenu();k.removeAll();for(;o<j;o++){m=i[o];if(!o&&(m instanceof Ext.toolbar.Separator)){continue}if(n&&(p(m,n)||p(n,m))){k.add("-")}l.addComponentToMenu(k,m);n=m}if(k.items.length<1){k.add(l.noItemsMenuText)}k.resumeLayouts()},createMenuConfig:function(h,f){var e=Ext.apply({},h.initialConfig),g=h.toggleGroup;Ext.copyTo(e,h,["iconCls","icon","itemId","disabled","handler","scope","menu"]);Ext.apply(e,{text:h.overflowText||h.text,hideOnClick:f,destroyMenu:false});if(g||h.enableToggle){Ext.apply(e,{group:g,checked:h.pressed,listeners:{checkchange:function(a,b){h.toggle(b)}}})}delete e.ownerCt;delete e.xtype;delete e.id;return e},addComponentToMenu:function(i,l){var j=this,k,g,h;if(l instanceof Ext.toolbar.Separator){i.add("-")}else{if(l.isComponent){if(l.isXType("splitbutton")){i.add(j.createMenuConfig(l,true))}else{if(l.isXType("button")){i.add(j.createMenuConfig(l,!l.menu))}else{if(l.isXType("buttongroup")){g=l.items.items;h=g.length;for(k=0;k<h;k++){j.addComponentToMenu(i,g[k])}}else{i.add(Ext.create(Ext.getClassName(l),j.createMenuConfig(l)))}}}}}},clearMenu:function(){var h=this.moreMenu,f,j,g,i;if(h&&h.items){f=h.items.items;g=f.length;for(j=0;j<g;j++){i=f[j];if(i.menu){delete i.menu}}}},destroy:function(){Ext.destroy(this.menu,this.menuTrigger)}});Ext.define("Ext.layout.container.Box",{alias:["layout.box"],extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.BoxLayout",requires:["Ext.layout.container.boxOverflow.None","Ext.layout.container.boxOverflow.Menu","Ext.layout.container.boxOverflow.Scroller","Ext.util.Format","Ext.dd.DragDropManager"],defaultMargins:{top:0,right:0,bottom:0,left:0},padding:0,pack:"start",flex:undefined,stretchMaxPartner:undefined,type:"box",scrollOffset:0,itemCls:Ext.baseCSSPrefix+"box-item",targetCls:Ext.baseCSSPrefix+"box-layout-ct",innerCls:Ext.baseCSSPrefix+"box-inner",availableSpaceOffset:0,reserveOffset:true,manageMargins:true,childEls:["innerCt","targetEl"],renderTpl:["{%var oc,l=values.$comp.layout,oh=l.overflowHandler;","if (oh.getPrefixConfig!==Ext.emptyFn) {","if(oc=oh.getPrefixConfig())dh.generateMarkup(oc, out)","}%}",'<div id="{ownerId}-innerCt" class="{[l.innerCls]} {[oh.getOverflowCls()]}" role="presentation">','<div id="{ownerId}-targetEl" style="position:absolute;',"width:20000px;","left:0px;top:0px;",'height:1px">',"{%this.renderBody(out, values)%}","</div>","</div>","{%if (oh.getSuffixConfig!==Ext.emptyFn) {","if(oc=oh.getSuffixConfig())dh.generateMarkup(oc, out)","}%}",{disableFormats:true,definitions:"var dh=Ext.DomHelper;"}],constructor:function(e){var f=this,d;f.callParent(arguments);f.flexSortFn=Ext.Function.bind(f.flexSort,f);f.initOverflowHandler();d=typeof f.padding;if(d=="string"||d=="number"){f.padding=Ext.util.Format.parseBox(f.padding);f.padding.height=f.padding.top+f.padding.bottom;f.padding.width=f.padding.left+f.padding.right}},getNames:function(){return this.names},getItemSizePolicy:function(e){var h=this.sizePolicy,g=this.align,f=(g=="stretchmax"||g=="stretch")?g:"";if(e.flex){h=h.flex}return h[f]},flexSort:function(g,h){var b=this.getNames().maxWidth,a=Infinity;g=g.target[b]||a;h=h.target[b]||a;if(!isFinite(g)&&!isFinite(h)){return 0}return g-h},isItemBoxParent:function(b){return true},isItemShrinkWrap:function(b){return true},minSizeSortFn:function(a,b){return b.available-a.available},roundFlex:function(b){return Math.ceil(b)},beginCollapse:function(c){var d=this;if(d.direction==="vertical"&&c.collapsedVertical()){c.collapseMemento.capture(["flex"]);delete c.flex}else{if(d.direction==="horizontal"&&c.collapsedHorizontal()){c.collapseMemento.capture(["flex"]);delete c.flex}}},beginExpand:function(b){b.collapseMemento.restore(["flex"])},beginLayout:function(m){var h=this,j=h.owner.stretchMaxPartner,i=h.innerCt.dom.style,k=h.getNames(),n=m.state,l=n.boxPlan||(n.boxPlan={});h.overflowHandler.beginLayout(m);if(typeof j==="string"){j=Ext.getCmp(j)||h.owner.query(j)[0]}m.stretchMaxPartner=j&&m.context.getCmp(j);h.callParent(arguments);m.innerCtContext=m.getEl("innerCt",h);l.scrollParallel=!!(h.owner.autoScroll||h.owner[k.overflowX]);l.scrollPerpendicular=!!(h.owner.autoScroll||h.owner[k.overflowY]);if(l.scrollParallel){n.scrollPos=h.owner.getTargetEl().dom[k.scrollLeft]}i.width="";i.height="";h.cacheFlexes(m)},beginLayoutCycle:function(w,n){var q=this,t=q.align,r=q.getNames(),o=q.pack,p=r.heightModel,u,i,v,x,s;q.overflowHandler.beginLayoutCycle(w,n);q.callParent(arguments);w.parallelSizeModel=w[r.widthModel];w.perpendicularSizeModel=w[p];w.boxOptions={align:t={stretch:t=="stretch",stretchmax:t=="stretchmax",center:t==r.center},pack:o={center:o=="center",end:o=="end"}};if(t.stretch&&w.perpendicularSizeModel.shrinkWrap){t.stretchmax=true;t.stretch=false}if(w.parallelSizeModel.shrinkWrap){o.center=o.end=false}if(t.stretchmax){u=w.childItems;x=u.length;s=q.sizeModels.shrinkWrap;for(v=0;v<x;++v){i=u[v];if(!i[p].configured){i[p]=s}}}},cacheFlexes:function(u){var p=this.getNames(),n=p.widthModel,t=0,r=u.childItems,s=r.length,o=[],x=0,v=p.minWidth,w,i,q;while(s--){i=r[s];if(i[n].calculated){w=i.target;i.flex=q=w.flex;if(q){t+=q;o.push(i);x+=w[v]||0}}}u.flexedItems=o;u.flexedMinSize=x;u.totalFlex=t;Ext.Array.sort(o,this.flexSortFn)},calculate:function(m){var h=this,i=h.getContainerSize(m),j=h.getNames(),n=m.state,k=n.boxPlan||(n.boxPlan={}),l=Ext.getScrollbarSize()[j.width];k.targetSize=i;if(l&&k.scrollPerpendicular&&m.parallelSizeModel.shrinkWrap&&!m.boxOptions.align.stretch&&!m.perpendicularSizeModel.shrinkWrap){n.additionalScrollbarWidth=l;if(!i[j.gotHeight]){h.done=false;return}}else{n.additionalScrollbarWidth=0}if(!m.parallelSizeModel.shrinkWrap&&!i[j.gotWidth]){h.done=false;return}if(!n.parallelDone){n.parallelDone=h.calculateParallel(m,j,k)}if(!n.perpendicularDone){n.perpendicularDone=h.calculatePerpendicular(m,j,k)}if(n.parallelDone&&n.perpendicularDone){if(h.owner.dock&&(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)&&!h.owner.width&&!h.horizontal){k.isIEVerticalDock=true;k.calculatedWidth=k.maxSize+m.getPaddingInfo().width+m.getFrameInfo().width}h.publishInnerCtSize(m,h.reserveOffset?h.availableSpaceOffset:0);if(h.done&&m.boxOptions.align.stretchmax&&!n.stretchMaxDone){h.calculateStretchMax(m,j,k);n.stretchMaxDone=true}}else{h.done=false}},calculateParallel:function(S,P,W){var i=this,O=S.parallelSizeModel.shrinkWrap,D=P.width,X=S.childItems,V=P.left,K=P.right,L=P.setWidth,C=X.length,F=S.flexedItems,J=F.length,G=S.boxOptions.pack,Q=i.padding,U=Q[V],A=U+Q[K]+i.scrollOffset+(i.reserveOffset?i.availableSpaceOffset:0),H,R,T,E,N,I,B,M;for(H=0;H<C;++H){N=X[H];R=N.marginInfo||N.getMarginInfo();A+=R[D];if(!N.flex){A+=N.getProp(D);if(isNaN(A)){return false}}}if(O){W.availableSpace=0;W.tooNarrow=false}else{W.availableSpace=W.targetSize[D]-A;W.tooNarrow=W.availableSpace<S.flexedMinSize;if(W.tooNarrow&&Ext.getScrollbarSize()[P.height]&&W.scrollParallel&&S.state.perpendicularDone){S.state.perpendicularDone=false;for(H=0;H<C;++H){X[H].invalidate()}}}M=A;T=W.availableSpace;E=S.totalFlex;for(H=0;H<J;H++){N=F[H];I=N.flex;B=i.roundFlex((I/E)*T);B=N[L](B);M+=B;T=Math.max(0,T-B);E-=I}if(G.center){U+=T/2;if(U<0){U=0}}else{if(G.end){U+=T}}for(H=0;H<C;++H){N=X[H];R=N.marginInfo;U+=R[V];N.setProp(P.x,U);U+=R[K]+N.props[D]}S.state.contentWidth=M+S.targetContext.getPaddingInfo()[D];if(!S.state.additionalScrollbarWidth){S[P.setContentWidth](S.state.contentWidth)}return true},calculatePerpendicular:function(W,O,ah){var Q=this,aj=W.perpendicularSizeModel.shrinkWrap,ag=ah.targetSize,ai=W.childItems,V=ai.length,L=Math.max,P=O.height,aa=O.setHeight,X=O.top,T=O.y,R=Q.padding,N=R[X],ae=ag[P]-N-R[O.bottom],G=W.boxOptions.align,Y=G.stretch,I=G.stretchmax,Z=G.center,H=0,M,i,af,S,U,J,K,ac,ab,ad;if(Y||(Z&&!aj)){if(isNaN(ae)){return false}}if(Y&&ah.scrollParallel&&ah.tooNarrow){ab=Ext.getScrollbarSize().height;ae-=ab;ah.targetSize[P]-=ab}if(Y){J=ae}else{for(i=0;i<V;i++){K=ai[i];S=K.marginInfo||K.getMarginInfo();af=K.getProp(P);if(isNaN(H=L(H,af+S[P],K.target[O.minHeight]||0))){return false}}ac=W.stretchMaxPartner;if(ac){W.setProp("maxChildHeight",H);ad=ac.childItems;if(ad&&ad.length){H=L(H,ac.getProp("maxChildHeight"));if(isNaN(H)){return false}}}ah.maxSize=H;W[O.setContentHeight](H+Q.padding[P]+W.targetContext.getPaddingInfo()[P]);if(I){J=H}else{if(Z){J=aj?H:L(ae,H);J-=W.innerCtContext.getBorderInfo()[P]}}}for(i=0;i<V;i++){K=ai[i];S=K.marginInfo||K.getMarginInfo();M=N+S[X];if(Y){K[aa](J-S[P])}else{if(Z){U=J-K.props[P];if(U>0){M=N+Math.round(U/2)}}}K.setProp(T,M)}return true},calculateStretchMax:function(C,x,v){var w=this,u=x.heightModel,z=x.height,t=x.width,A=C.childItems,E=A.length,s=v.maxSize,F=w.onBeforeInvalidateChild,i=w.onAfterInvalidateChild,r,y,B,D;for(B=0;B<E;++B){r=A[B];y=r.props;D=s-r.getMarginInfo()[z];if(D!=y[z]||r[x.heightModel].constrained){r.invalidate({before:F,after:i,layout:w,childWidth:y[t],childHeight:D,childX:y.x,childY:y.y,names:x})}}},completeLayout:function(f){var e=this,d=f.state;e.overflowHandler.completeLayout(f);if(d.boxPlan.scrollParallel){e.owner.getTargetEl().dom[e.getNames().scrollLeft]=d.scrollPos}},finishedLayout:function(b){this.overflowHandler.finishedLayout(b);this.callParent(arguments)},onBeforeInvalidateChild:function(d,e){var f=e.names.heightModel;if(!d[f].constrainedMax){d[f]=Ext.layout.SizeModel.calculated}},onAfterInvalidateChild:function(d,e){var f=e.names;d.setProp("x",e.childX);d.setProp("y",e.childY);if(d[f.heightModel].calculated){d[f.setHeight](e.childHeight)}if(d[f.widthModel].calculated){d[f.setWidth](e.childWidth)}},publishInnerCtSize:function(E,B){var x=this,y=x.getNames(),z=y.height,v=y.width,A=E.boxOptions.align,r=x.owner.dock,u=x.padding,w=E.state.boxPlan,C=w.targetSize,s=C[z],q=E.innerCtContext,F=y.contentWidth,D=(E.parallelSizeModel.shrinkWrap||(w.tooNarrow&&w.scrollParallel)?E.state.contentWidth:C[v])-(B||0),t;if(A.stretch){t=s}else{t=w.maxSize+u[y.top]+u[y.bottom]+q.getBorderInfo()[z];if(!E.perpendicularSizeModel.shrinkWrap&&A.center){t=Math.max(s,t)}}q[y.setWidth](D);q[y.setHeight](t);if(E.state.additionalScrollbarWidth){if(t>w.targetSize[y.height]){E.setProp(F,E.state.contentWidth+E.state.additionalScrollbarWidth);if(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks){E[y.setWidth](E.props[F]+E.getPaddingInfo()[y.width]+E.getBorderInfo()[y.width])}}else{E.setProp(F,E.state.contentWidth)}}if(isNaN(D+t)){x.done=false}if(w.calculatedWidth&&(r=="left"||r=="right")){E.setWidth(w.calculatedWidth,true,true)}},onRemove:function(d){var c=this;c.callParent(arguments);if(c.overflowHandler){c.overflowHandler.onRemove(d)}if(d.layoutMarginCap==c.id){delete d.layoutMarginCap}},initOverflowHandler:function(){var g=this,h=g.overflowHandler,e,f;if(typeof h=="string"){h={type:h}}e="None";if(h&&h.type!==undefined){e=h.type}f=Ext.layout.container.boxOverflow[e];if(f[g.type]){f=f[g.type]}g.overflowHandler=Ext.create("Ext.layout.container.boxOverflow."+e,g,h)},getRenderTarget:function(){return this.targetEl},getElementTarget:function(){return this.innerCt},calculateChildBox:Ext.deprecated(),calculateChildBoxes:Ext.deprecated(),updateChildBoxes:Ext.deprecated(),destroy:function(){Ext.destroy(this.innerCt,this.overflowHandler);this.callParent(arguments)}});Ext.define("Ext.layout.container.HBox",{alias:["layout.hbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.HBoxLayout",align:"top",type:"hbox",direction:"horizontal",horizontal:true,names:{lr:"lr",left:"left",leftCap:"Left",right:"right",position:"left",width:"width",contentWidth:"contentWidth",minWidth:"minWidth",maxWidth:"maxWidth",widthCap:"Width",widthModel:"widthModel",widthIndex:0,x:"x",scrollLeft:"scrollLeft",overflowX:"overflowX",center:"middle",top:"top",topPosition:"top",bottom:"bottom",height:"height",contentHeight:"contentHeight",minHeight:"minHeight",maxHeight:"maxHeight",heightCap:"Height",heightModel:"heightModel",heightIndex:1,y:"y",scrollTop:"scrollTop",overflowY:"overflowY",getWidth:"getWidth",getHeight:"getHeight",setWidth:"setWidth",setHeight:"setHeight",gotWidth:"gotWidth",gotHeight:"gotHeight",setContentWidth:"setContentWidth",setContentHeight:"setContentHeight"},sizePolicy:{flex:{"":{setsWidth:1,setsHeight:0},stretch:{setsWidth:1,setsHeight:1},stretchmax:{readsHeight:1,setsWidth:1,setsHeight:1}},"":{setsWidth:0,setsHeight:0},stretch:{setsWidth:0,setsHeight:1},stretchmax:{readsHeight:1,setsWidth:0,setsHeight:1}}});Ext.define("Ext.grid.ColumnLayout",{extend:"Ext.layout.container.HBox",alias:"layout.gridcolumn",type:"gridcolumn",reserveOffset:false,firstHeaderCls:Ext.baseCSSPrefix+"column-header-first",lastHeaderCls:Ext.baseCSSPrefix+"column-header-last",beginLayout:function(p){var l=this,q=l.owner,r=q.up("[scrollerOwner]"),k=r.view,o=0,m=l.getVisibleItems(),n=m.length,i;if(r.lockable){if(l.owner.up("tablepanel")===k.normalGrid){k=k.normalGrid.getView()}else{k=null}}l.callParent(arguments);for(;o<n;o++){i=m[o];i.removeCls([l.firstHeaderCls,l.lastHeaderCls]);i.el.setStyle({height:"auto"});i.titleEl.setStyle({height:"auto",paddingTop:""})}if(n>0){m[0].addCls(l.firstHeaderCls);m[n-1].addCls(l.lastHeaderCls)}if(!l.owner.isHeader&&Ext.getScrollbarSize().width&&!r.collapsed&&k&&k.rendered&&(p.viewTable=k.el.child("table",true))){p.viewContext=p.context.getCmp(k)}},roundFlex:function(b){return Math.floor(b)},getContainerSize:function(h){var i=this,g=i.callParent(arguments),j=h.viewContext,f;if(j&&!j.heightModel.shrinkWrap&&j.target.componentLayout.ownerContext){f=j.getProp("height");if(isNaN(f)){i.done=false}else{if(h.state.tableHeight>f){g.width-=Ext.getScrollbarSize().width;h.state.parallelDone=false;j.invalidate()}}}return g},calculate:function(f){var d=this,e=f.viewContext;if(e&&!f.state.tableHeight){f.state.tableHeight=f.viewTable.offsetHeight}d.callParent(arguments)},completeLayout:function(t){var o=this,u=o.owner,v=t.state,q=false,n=o.sizeModels.calculated,r,p,s,i,m;o.callParent(arguments);if(!v.flexesCalculated&&u.forceFit&&!u.isHeader){r=t.childItems;p=r.length;for(s=0;s<p;s++){i=r[s];m=i.target;if(m.width){m.flex=t.childItems[s].flex=m.width;delete m.width;i.widthModel=n;q=true}}if(q){o.cacheFlexes(t);t.invalidate({state:{flexesCalculated:true}})}}},finalizeLayout:function(){var k=this,l=0,m,h,j,i=k.owner,n=i.titleEl;m=k.getVisibleItems();h=m.length;j=i.el.getViewSize().height;if(n){j-=n.getHeight()}for(;l<h;l++){m[l].setPadding(j)}},publishInnerCtSize:function(i){var j=this,h=i.state.boxPlan,f=h.targetSize,g=i.peek("contentWidth");if((g!=null)&&!j.owner.isHeader){f.width=g+Ext.getScrollbarSize().width}return j.callParent(arguments)}});Ext.define("Ext.layout.container.VBox",{alias:["layout.vbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.VBoxLayout",align:"left",type:"vbox",direction:"vertical",horizontal:false,names:{lr:"tb",left:"top",leftCap:"Top",right:"bottom",position:"top",width:"height",contentWidth:"contentHeight",minWidth:"minHeight",maxWidth:"maxHeight",widthCap:"Height",widthModel:"heightModel",widthIndex:1,x:"y",scrollLeft:"scrollTop",overflowX:"overflowY",center:"center",top:"left",topPosition:"left",bottom:"right",height:"width",contentHeight:"contentWidth",minHeight:"minWidth",maxHeight:"maxWidth",heightCap:"Width",heightModel:"widthModel",heightIndex:0,y:"x",scrollTop:"scrollLeft",overflowY:"overflowX",getWidth:"getHeight",getHeight:"getWidth",setWidth:"setHeight",setHeight:"setWidth",gotWidth:"gotHeight",gotHeight:"gotWidth",setContentWidth:"setContentHeight",setContentHeight:"setContentWidth"},sizePolicy:{flex:{"":{setsWidth:0,setsHeight:1},stretch:{setsWidth:1,setsHeight:1},stretchmax:{readsWidth:1,setsWidth:1,setsHeight:1}},"":{setsWidth:0,setsHeight:0},stretch:{setsWidth:1,setsHeight:0},stretchmax:{readsWidth:1,setsWidth:1,setsHeight:0}}});Ext.define("Ext.toolbar.Toolbar",{extend:"Ext.container.Container",requires:["Ext.toolbar.Fill","Ext.layout.container.HBox","Ext.layout.container.VBox"],uses:["Ext.toolbar.Separator"],alias:"widget.toolbar",alternateClassName:"Ext.Toolbar",isToolbar:true,baseCls:Ext.baseCSSPrefix+"toolbar",ariaRole:"toolbar",defaultType:"button",vertical:false,enableOverflow:false,menuTriggerCls:Ext.baseCSSPrefix+"toolbar-more-icon",trackMenus:true,itemCls:Ext.baseCSSPrefix+"toolbar-item",statics:{shortcuts:{"-":"tbseparator"," ":"tbspacer"},shortcutsHV:{0:{"->":{xtype:"tbfill",height:0}},1:{"->":{xtype:"tbfill",width:0}}}},initComponent:function(){var c=this,d;if(!c.layout&&c.enableOverflow){c.layout={overflowHandler:"Menu"}}if(c.dock==="right"||c.dock==="left"){c.vertical=true}c.layout=Ext.applyIf(Ext.isString(c.layout)?{type:c.layout}:c.layout||{},{type:c.vertical?"vbox":"hbox",align:c.vertical?"stretchmax":"middle"});if(c.vertical){c.addClsWithUI("vertical")}if(c.ui==="footer"){c.ignoreBorderManagement=true}c.callParent();c.addEvents("overflowchange")},getRefItems:function(g){var h=this,f=h.callParent(arguments),i=h.layout,j;if(g&&h.enableOverflow){j=i.overflowHandler;if(j&&j.menu){f=f.concat(j.menu.getRefItems(g))}}return f},lookupComponent:function(f){if(typeof f=="string"){var c=Ext.toolbar.Toolbar,e=c.shortcutsHV[this.vertical?1:0][f]||c.shortcuts[f];if(typeof e=="string"){f={xtype:e}}else{if(e){f=Ext.apply({},e)}else{f={xtype:"tbtext",text:f}}}this.applyDefaults(f)}return this.callParent(arguments)},applyDefaults:function(c){if(!Ext.isString(c)){c=this.callParent(arguments);var d=this.internalDefaults;if(c.events){Ext.applyIf(c.initialConfig,d);Ext.apply(c,d)}else{Ext.applyIf(c,d)}}return c},trackMenu:function(h,f){if(this.trackMenus&&h.menu){var g=f?"mun":"mon",e=this;e[g](h,"mouseover",e.onButtonOver,e);e[g](h,"menushow",e.onButtonMenuShow,e);e[g](h,"menuhide",e.onButtonMenuHide,e)}},constructButton:function(b){return b.events?b:Ext.widget(b.split?"splitbutton":this.defaultType,b)},onBeforeAdd:function(b){if(b.is("field")||(b.is("button")&&this.ui!="footer")){b.ui=b.ui+"-toolbar"}if(b instanceof Ext.toolbar.Separator){b.setUI((this.vertical)?"vertical":"horizontal")}this.callParent(arguments)},onAdd:function(b){this.callParent(arguments);this.trackMenu(b)},onRemove:function(b){this.callParent(arguments);this.trackMenu(b,true)},getChildItemsToDisable:function(){return this.items.getRange()},onButtonOver:function(b){if(this.activeMenuBtn&&this.activeMenuBtn!=b){this.activeMenuBtn.hideMenu();b.showMenu();this.activeMenuBtn=b}},onButtonMenuShow:function(b){this.activeMenuBtn=b},onButtonMenuHide:function(b){delete this.activeMenuBtn}});Ext.define("Ext.panel.AbstractPanel",{extend:"Ext.container.Container",mixins:{docking:"Ext.container.DockingContainer"},requires:["Ext.util.MixedCollection","Ext.Element","Ext.toolbar.Toolbar"],baseCls:Ext.baseCSSPrefix+"panel",isPanel:true,componentLayout:"dock",childEls:["body"],renderTpl:["{% this.renderDockedItems(out,values,0); %}",(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)?"<div></div>":"",'<div id="{id}-body" class="{baseCls}-body<tpl if="bodyCls"> {bodyCls}</tpl>',' {baseCls}-body-{ui}<tpl if="uiCls">','<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl>','</tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values);%}","</div>","{% this.renderDockedItems(out,values,1); %}"],bodyPosProps:{x:"x",y:"y"},border:true,initComponent:function(){var b=this;b.addEvents("bodyresize");if(b.frame&&b.border&&b.bodyBorder===undefined){b.bodyBorder=false}if(b.frame&&b.border&&(b.bodyBorder===false||b.bodyBorder===0)){b.manageBodyBorders=true}b.callParent()},beforeDestroy:function(){this.destroyDockedItems();this.callParent()},initItems:function(){this.callParent();this.initDockingItems()},initRenderData:function(){var d=this,c=d.callParent();d.initBodyStyles();d.protoBody.writeTo(c);delete d.protoBody;return c},getComponent:function(d){var c=this.callParent(arguments);if(c===undefined&&!Ext.isNumber(d)){c=this.getDockedComponent(d)}return c},getProtoBody:function(){var c=this,d=c.protoBody;if(!d){c.protoBody=d=new Ext.util.ProtoElement({cls:c.bodyCls,style:c.bodyStyle,clsProp:"bodyCls",styleProp:"bodyStyle",styleIsText:true})}return d},initBodyStyles:function(){var f=this,e=f.getProtoBody(),d=Ext.Element;if(f.bodyPadding!==undefined){e.setStyle("padding",d.unitizeBox((f.bodyPadding===true)?5:f.bodyPadding))}if(f.frame&&f.bodyBorder){if(!Ext.isNumber(f.bodyBorder)){f.bodyBorder=1}e.setStyle("border-width",d.unitizeBox(f.bodyBorder))}},getCollapsedDockedItems:function(){return[this.getReExpander()]},setBodyStyle:function(e,g){var h=this,f=h.rendered?h.body:h.getProtoBody();if(Ext.isFunction(e)){e=e()}if(arguments.length==1&&Ext.isString(e)){e=Ext.Element.parseStyles(e)}f.setStyle.apply(h.body,arguments)},addBodyCls:function(d){var f=this,e=f.rendered?f.body:f.getProtoBody();e.addCls(d)},removeBodyCls:function(d){var f=this,e=f.rendered?f.body:f.getProtoBody();e.removeCls(d)},addUIClsToElement:function(d){var f=this,e=f.callParent(arguments);f.addBodyCls([Ext.baseCSSPrefix+d,f.baseCls+"-body-"+d,f.baseCls+"-body-"+f.ui+"-"+d]);return e},removeUIClsFromElement:function(d){var f=this,e=f.callParent(arguments);f.removeBodyCls([Ext.baseCSSPrefix+d,f.baseCls+"-body-"+d,f.baseCls+"-body-"+f.ui+"-"+d]);return e},addUIToElement:function(){var b=this;b.callParent(arguments);b.addBodyCls(b.baseCls+"-body-"+b.ui)},removeUIFromElement:function(){var b=this;b.callParent(arguments);b.removeBodyCls(b.baseCls+"-body-"+b.ui)},getTargetEl:function(){return this.body},getRefItems:function(d){var c=this.callParent(arguments);return this.getDockingRefItems(d,c)},setupRenderTpl:function(b){this.callParent(arguments);this.setupDockingRenderTpl(b)}});Ext.define("Ext.panel.Panel",{extend:"Ext.panel.AbstractPanel",requires:["Ext.panel.Header","Ext.fx.Anim","Ext.util.KeyMap","Ext.panel.DD","Ext.XTemplate","Ext.layout.component.Dock","Ext.util.Memento"],alias:"widget.panel",alternateClassName:"Ext.Panel",collapsedCls:"collapsed",animCollapse:Ext.enableFx,minButtonWidth:75,collapsed:false,collapseFirst:true,hideCollapseTool:false,titleCollapse:false,floatable:true,collapsible:false,closable:false,closeAction:"destroy",preventHeader:false,header:undefined,headerPosition:"top",frame:false,frameHeader:true,titleAlign:"left",manageHeight:true,initComponent:function(){var b=this;b.addEvents("beforeclose","close","beforeexpand","beforecollapse","expand","collapse","titlechange","iconchange","iconclschange");if(b.collapsible){this.addStateEvents(["expand","collapse"])}if(b.unstyled){b.setUI("plain")}if(b.frame){b.setUI(b.ui+"-framed")}b.bridgeToolbars();b.callParent();b.collapseDirection=b.collapseDirection||b.headerPosition||Ext.Component.DIRECTION_TOP;b.hiddenOnCollapse=new Ext.dom.CompositeElement()},beforeDestroy:function(){var b=this;Ext.destroy(b.placeholder,b.ghostPanel,b.dd);b.callParent()},initAria:function(){this.callParent();this.initHeaderAria()},getFocusEl:function(){return this.el},initHeaderAria:function(){var d=this,e=d.el,f=d.header;if(e&&f){e.dom.setAttribute("aria-labelledby",f.titleCmp.id)}},getHeader:function(){return this.header},setTitle:function(i){var l=this,g=l.title,j=l.header,h=l.reExpander,k=l.placeholder;l.title=i;if(j){if(j.isHeader){j.setTitle(i)}else{j.title=i}}if(h){h.setTitle(i)}if(k&&k.setTitle){k.setTitle(i)}l.fireEvent("titlechange",l,i,g)},setIconCls:function(g){var j=this,f=j.iconCls,h=j.header,i=j.placeholder;j.iconCls=g;if(h){if(h.isHeader){h.setIconCls(g)}else{h.iconCls=g}}if(i&&i.setIconCls){i.setIconCls(g)}j.fireEvent("iconclschange",j,g,f)},setIcon:function(g){var f=this,j=f.icon,h=f.header,i=f.placeholder;f.icon=g;if(h){if(h.isHeader){h.setIcon(g)}else{h.icon=g}}if(i&&i.setIcon){i.setIcon(g)}f.fireEvent("iconchange",f,g,j)},bridgeToolbars:function(){var h=this,i=[],l,g,j=h.minButtonWidth;function k(c,a,b){if(Ext.isArray(c)){c={xtype:"toolbar",items:c}}else{if(!c.xtype){c.xtype="toolbar"}}c.dock=a;if(a=="left"||a=="right"){c.vertical=true}if(b){c.layout=Ext.applyIf(c.layout||{},{pack:{left:"start",center:"center"}[h.buttonAlign]||"end"})}return c}if(h.tbar){i.push(k(h.tbar,"top"));h.tbar=null}if(h.bbar){i.push(k(h.bbar,"bottom"));h.bbar=null}if(h.buttons){h.fbar=h.buttons;h.buttons=null}if(h.fbar){l=k(h.fbar,"bottom",true);l.ui="footer";if(j){g=l.defaults;l.defaults=function(b){var a=g||{};if((!b.xtype||b.xtype==="button"||(b.isComponent&&b.isXType("button")))&&!("minWidth" in a)){a=Ext.apply({minWidth:j},a)}return a}}i.push(l);h.fbar=null}if(h.lbar){i.push(k(h.lbar,"left"));h.lbar=null}if(h.rbar){i.push(k(h.rbar,"right"));h.rbar=null}if(h.dockedItems){if(!Ext.isArray(h.dockedItems)){h.dockedItems=[h.dockedItems]}h.dockedItems=h.dockedItems.concat(i)}else{h.dockedItems=i}},isPlaceHolderCollapse:function(){return this.collapseMode=="placeholder"},onBoxReady:function(){this.callParent();if(this.collapsed){this.setHiddenDocked()}},beforeRender:function(){var c=this,d;c.callParent();c.initTools();if(!(c.preventHeader||(c.header===false))){c.updateHeader()}if(c.collapsed){if(c.isPlaceHolderCollapse()){c.hidden=true;c.placeholderCollapse();d=c.collapsed;c.collapsed=false}else{c.beginCollapse();c.addClsWithUI(c.collapsedCls)}}if(d){c.collapsed=d}},initTools:function(){var b=this;b.tools=b.tools?Ext.Array.clone(b.tools):[];if(b.collapsible&&!(b.hideCollapseTool||b.header===false||b.preventHeader)){b.collapseDirection=b.collapseDirection||b.headerPosition||"top";b.collapseTool=b.expandTool=Ext.widget({xtype:"tool",type:(b.collapsed&&!b.isPlaceHolderCollapse())?("expand-"+b.getOppositeDirection(b.collapseDirection)):("collapse-"+b.collapseDirection),handler:b.toggleCollapse,scope:b});if(b.collapseFirst){b.tools.unshift(b.collapseTool)}}b.addTools();if(b.closable){b.addClsWithUI("closable");b.addTool({type:"close",handler:Ext.Function.bind(b.close,b,[])})}if(b.collapseTool&&!b.collapseFirst){b.tools.push(b.collapseTool)}},addTools:Ext.emptyFn,close:function(){if(this.fireEvent("beforeclose",this)!==false){this.doClose()}},doClose:function(){this.fireEvent("close",this);this[this.closeAction]()},updateHeader:function(l){var g=this,i=g.header,j=g.title,k=g.tools,h=g.headerPosition=="left"||g.headerPosition=="right";if((i!==false)&&(l||j||(k&&k.length)||(g.collapsible&&!g.titleCollapse))){if(i&&i.isHeader){i.show()}else{i=g.header=Ext.widget(Ext.apply({xtype:"header",title:j,titleAlign:g.titleAlign,orientation:h?"vertical":"horizontal",dock:g.headerPosition||"top",textCls:g.headerTextCls,iconCls:g.iconCls,icon:g.icon,baseCls:g.baseCls+"-header",tools:k,ui:g.ui,id:g.id+"_header",indicateDrag:g.draggable,frame:g.frame&&g.frameHeader,ignoreParentFrame:g.frame||g.overlapHeader,ignoreBorderManagement:g.frame||g.ignoreHeaderBorderManagement,listeners:g.collapsible&&g.titleCollapse?{click:g.toggleCollapse,scope:g}:null},g.header));g.addDocked(i,0);g.tools=i.tools}g.initHeaderAria()}else{if(i){i.hide()}}},setUI:function(c){var d=this;d.callParent(arguments);if(d.header&&d.header.rendered){d.header.setUI(c)}},getContentTarget:function(){return this.body},getTargetEl:function(){return this.body||this.frameBody||this.el},isVisible:function(d){var c=this;if(c.collapsed&&c.placeholder){return c.placeholder.isVisible(d)}return c.callParent(arguments)},onHide:function(){var b=this;if(b.collapsed&&b.placeholder){b.placeholder.hide()}else{b.callParent(arguments)}},onShow:function(){var b=this;if(b.collapsed&&b.placeholder){b.hidden=true;b.placeholder.show()}else{b.callParent(arguments)}},onRemoved:function(c){var d=this;d.callParent(arguments);if(d.placeholder&&!c){d.ownerCt.remove(d.placeholder,false)}},addTool:function(j){j=[].concat(j);var k=this,i=k.header,l,h=j.length,g;for(l=0;l<h;l++){g=j[l];k.tools.push(g);if(i){i.addTool(g)}}k.updateHeader()},getOppositeDirection:function(d){var c=Ext.Component;switch(d){case c.DIRECTION_TOP:return c.DIRECTION_BOTTOM;case c.DIRECTION_RIGHT:return c.DIRECTION_LEFT;case c.DIRECTION_BOTTOM:return c.DIRECTION_TOP;case c.DIRECTION_LEFT:return c.DIRECTION_RIGHT}},getWidthAuthority:function(){if(this.collapsed&&this.collapsedHorizontal()){return 1}return this.callParent()},getHeightAuthority:function(){if(this.collapsed&&this.collapsedVertical()){return 1}return this.callParent()},collapsedHorizontal:function(){var b=this.getCollapsed();return b=="left"||b=="right"},collapsedVertical:function(){var b=this.getCollapsed();return b=="top"||b=="bottom"},getCollapsed:function(){var b=this;if(b.collapsed===true){return b.collapseDirection}return b.collapsed},getState:function(){var e=this,d=e.callParent(),f;d=e.addPropertyToState(d,"collapsed");if(e.collapsed){f=e.collapseMemento;f=f&&f.data;if(e.collapsedVertical()){if(d){delete d.height}if(f){d=e.addPropertyToState(d,"height",f.height)}}else{if(d){delete d.width}if(f){d=e.addPropertyToState(d,"width",f.width)}}}return d},findReExpander:function(k){var l=this,j=Ext.Component,m=l.dockedItems.items,i=m.length,c,n;if(l.collapseMode=="mini"){return}switch(k){case j.DIRECTION_TOP:case j.DIRECTION_BOTTOM:for(n=0;n<i;n++){c=m[n];if(!c.hidden){if(c.isHeader&&(!c.dock||c.dock=="top"||c.dock=="bottom")){return c}}}break;case j.DIRECTION_LEFT:case j.DIRECTION_RIGHT:for(n=0;n<i;n++){c=m[n];if(!c.hidden){if(c.isHeader&&(c.dock=="left"||c.dock=="right")){return c}}}break;default:throw ("Panel#findReExpander must be passed a valid collapseDirection")}},getReExpander:function(h){var e=this,g=h||e.collapseDirection,f=e.reExpander||e.findReExpander(g);e.expandDirection=e.getOppositeDirection(g);if(!f){e.reExpander=f=e.createReExpander(g,{dock:g,cls:Ext.baseCSSPrefix+"docked "+e.baseCls+"-"+e.ui+"-collapsed",ownerCt:e,ownerLayout:e.componentLayout});e.dockedItems.insert(0,f)}return f},createReExpander:function(m,n){var o=this,k=m=="left",p=m=="right",l=k||p,i,j=Ext.apply({hideMode:"offsets",title:o.title,orientation:l?"vertical":"horizontal",textCls:o.headerTextCls,icon:o.icon,iconCls:o.iconCls,baseCls:o.baseCls+"-header",ui:o.ui,frame:o.frame&&o.frameHeader,ignoreParentFrame:o.frame||o.overlapHeader,indicateDrag:o.draggable},n);if(o.collapseMode=="mini"){if(l){j.width=1}else{j.height=1}}if(!o.hideCollapseTool){i=k||(p&&o.isPlaceHolderCollapse());j[i?"items":"tools"]=[{xtype:"tool",type:"expand-"+o.getOppositeDirection(m),uiCls:["top"],handler:o.toggleCollapse,scope:o}]}j=new Ext.panel.Header(j);j.addClsWithUI(o.getHeaderCollapsedClasses(j));return j},getHeaderCollapsedClasses:function(g){var e=this,h=e.collapsedCls,f;f=[h,h+"-"+g.dock];if(e.border&&(!e.frame||(e.frame&&Ext.supports.CSS3BorderRadius))){f.push(h+"-border-"+g.dock)}return f},beginCollapse:function(){var j=this,l=j.lastBox,i=j.rendered,g=j.collapseMemento||(j.collapseMemento=new Ext.util.Memento(j)),k=j.getSizeModel(),h;g.capture(["height","minHeight","width","minWidth"]);if(l){g.capture(["x","y","height","width"],l,"last.")}if(j.collapsedVertical()){if(k.width.shrinkWrap){j.width=i?j.getWidth():j.width||j.minWidth||100}delete j.height;j.minHeight=0}else{if(j.collapsedHorizontal()){if(k.height.shrinkWrap){j.height=i?j.getHeight():j.height||j.minHeight||100}delete j.width;j.minWidth=0}}if(j.ownerCt){j.ownerCt.getLayout().beginCollapse(j)}if(!j.isPlaceHolderCollapse()){if(j.header===(h=j.getReExpander())){j.header.addClsWithUI(j.getHeaderCollapsedClasses(j.header));if(j.header.rendered){j.header.updateFrame()}}else{if(h.el){h.el.show();h.hidden=false}}}if(j.resizer){j.resizer.disable()}},beginExpand:function(){var g=this,h=g.lastBox,e=g.collapseMemento,f;e.restore(["height","minHeight","width","minWidth"]);if(h){e.restore(["x","y","height","width"],true,h,"last.")}if(g.ownerCt){g.ownerCt.getLayout().beginExpand(g)}if(!g.isPlaceHolderCollapse()){if(g.header===(f=g.getReExpander())){g.header.removeClsWithUI(g.getHeaderCollapsedClasses(g.header));if(g.header.rendered){g.header.updateFrame()}}else{f.hidden=true;f.el.hide()}}if(g.resizer){g.resizer.enable()}},collapse:function(i,g){var j=this,h=i||j.collapseDirection,f=j.ownerCt;if(j.isCollapsingOrExpanding){return j}if(arguments.length<2){g=j.animCollapse}if(j.collapsed||j.fireEvent("beforecollapse",j,i,g)===false){return j}if(f&&j.isPlaceHolderCollapse()){return j.placeholderCollapse(i,g)}j.collapsed=h;j.beginCollapse();j.fireHierarchyEvent("collapse");return j.doCollapseExpand(1,g)},doCollapseExpand:function(g,f){var i=this,j=i.animCollapse,h=i.ownerLayout;i.animCollapse=f;i.isCollapsingOrExpanding=g;if(h&&!f){h.onContentChange(i)}else{i.updateLayout({isRoot:true})}i.animCollapse=j;return i},afterCollapse:function(d){var e=this,f=e.ownerLayout;e.isCollapsingOrExpanding=0;if(e.collapseTool){e.collapseTool.setType("expand-"+e.getOppositeDirection(e.collapseDirection))}if(f&&d){f.onContentChange(e)}e.setHiddenDocked();e.fireEvent("collapse",e)},setHiddenDocked:function(){var j=this,m=j.hiddenOnCollapse,h=j.getReExpander(),n=j.getDockedItems(),i=n.length,l=0,k;m.add(j.body);for(;l<i;l++){k=n[l];if(k&&k!==h&&k.el){m.add(k.el)}}m.setStyle("visibility","hidden")},restoreHiddenDocked:function(){var b=this.hiddenOnCollapse;b.setStyle("visibility","");b.clear()},getPlaceholder:function(j){var f=this,h=j||f.collapseDirection,g=null,i=f.placeholder;if(!i){if(f.floatable||(f.collapsible&&f.titleCollapse)){g={click:{fn:f.floatable?f.floatCollapsedPanel:f.toggleCollapse,element:"el",scope:f}}}f.placeholder=i=Ext.widget(f.createReExpander(h,{id:f.id+"-placeholder",listeners:g}))}if(!i.placeholderFor){if(!i.isComponent){f.placeholder=i=f.lookupComponent(i)}Ext.applyIf(i,{margins:f.margins,placeholderFor:f});i.addCls([Ext.baseCSSPrefix+"region-collapsed-placeholder",Ext.baseCSSPrefix+"region-collapsed-"+h+"-placeholder",f.collapsedCls])}return i},placeholderCollapse:function(l,i){var m=this,n=m.ownerCt,j=l||m.collapseDirection,h=Ext.baseCSSPrefix+"border-region-slide-in",k=m.getPlaceholder(l);m.isCollapsingOrExpanding=1;m.hidden=true;m.collapsed=j;if(k.rendered){if(k.el.dom.parentNode!==m.el.dom.parentNode){m.el.dom.parentNode.insertBefore(k.el.dom,m.el.dom)}k.hidden=false;k.el.show();n.updateLayout()}else{n.insert(n.items.indexOf(m),k)}if(m.rendered){m.el.setVisibilityMode(Ext.Element.VISIBILITY);if(i){m.el.addCls(h);k.el.hide();m.el.slideOut(j.substr(0,1),{preserveScroll:true,duration:Ext.Number.from(i,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){m.el.removeCls(h);k.el.show().setStyle("display","none").slideIn(j.substr(0,1),{easing:"linear",duration:100,listeners:{afteranimate:function(){k.focus();m.isCollapsingOrExpanding=0;m.fireEvent("collapse",m)}}})}}})}else{m.el.hide();m.isCollapsingOrExpanding=0;m.fireEvent("collapse",m)}}else{m.isCollapsingOrExpanding=0;m.fireEvent("collapse",m)}return m},floatCollapsedPanel:function(){var m=this,k=m.placeholder,l=k.getBox(true),o,n=Ext.baseCSSPrefix+"border-region-slide-in",q=m.collapsed,j=m.ownerCt||m,r;if(m.el.hasCls(n)){m.slideOutFloatedPanel();return}if(m.isSliding){return}m.isSliding=true;function p(a){var b=m.el.getRegion().union(k.el.getRegion()).adjust(1,-1,-1,1);if(!b.contains(a.getPoint())){m.slideOutFloatedPanel()}}m.placeholder.el.hide();m.placeholder.hidden=true;m.el.show();m.hidden=false;m.collapsed=false;j.updateLayout();o=m.getBox(true);m.placeholder.el.show();m.placeholder.hidden=false;m.el.hide();m.hidden=true;m.collapsed=q;j.updateLayout();m.placeholderMouseMon=k.el.monitorMouseLeave(500,p);m.panelMouseMon=m.el.monitorMouseLeave(500,p);m.el.addCls(n);if(m.collapseTool){m.collapseTool.el.hide()}switch(m.collapsed){case"top":m.el.setLeftTop(l.x,l.y+l.height-1);r="t";break;case"right":m.el.setLeftTop(l.x-o.width+1,l.y);r="r";break;case"bottom":m.el.setLeftTop(l.x,l.y-o.height+1);r="b";break;case"left":m.el.setLeftTop(l.x+l.width-1,l.y);r="l";break}m.floatedFromCollapse=m.collapsed;m.collapsed=m.hidden=false;m.el.slideIn(r,{preserveScroll:true,listeners:{afteranimate:function(){m.isSliding=false}}})},isLayoutRoot:function(){if(this.floatedFromCollapse){return true}return this.callParent()},slideOutFloatedPanel:function(){var e=this,f=this.el,d;if(e.isSliding){return}e.isSliding=true;e.slideOutFloatedPanelBegin();if(typeof e.collapsed=="string"){d=e.collapsed.charAt(0)}f.slideOut(d,{preserveScroll:true,listeners:{afteranimate:function(){e.slideOutFloatedPanelEnd();e.el.removeCls(Ext.baseCSSPrefix+"border-region-slide-in");e.isSliding=false}}})},slideOutFloatedPanelBegin:function(){var d=this,c=this.el;d.collapsed=d.floatedFromCollapse;d.hidden=true;d.floatedFromCollapse=null;c.un(d.panelMouseMon);d.placeholder.el.un(d.placeholderMouseMon)},slideOutFloatedPanelEnd:function(){if(this.collapseTool){this.collapseTool.el.show()}},expand:function(d){var c=this;if(c.isCollapsingOrExpanding){return c}if(!arguments.length){d=c.animCollapse}if(!c.collapsed&&!c.floatedFromCollapse){return c}if(c.fireEvent("beforeexpand",c,d)===false){return c}if(c.isPlaceHolderCollapse()){return c.placeholderExpand(d)}c.restoreHiddenDocked();c.beginExpand();c.collapsed=false;c.fireHierarchyEvent("expand");return c.doCollapseExpand(2,d)},placeholderExpand:function(h){var m=this,j=m.collapsed,n=Ext.baseCSSPrefix+"border-region-slide-in",l,i,k;if(m.floatedFromCollapse){i=m.getPosition(true);m.slideOutFloatedPanelBegin();m.slideOutFloatedPanelEnd()}m.isCollapsingOrExpanding=2;m.placeholder.hidden=true;m.placeholder.el.hide();m.collapsed=false;m.show();if(h){if(i){l=m.el.getXY();m.el.setLeftTop(i[0],i[1]);m.el.moveTo(l[0],l[1],{duration:Ext.Number.from(h,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){m.el.removeCls(n);m.isCollapsingOrExpanding=0;m.fireEvent("expand",m)}}})}else{m.hidden=true;m.el.addCls(n);m.el.hide();m.collapsed=j;m.placeholder.show();k=j.substr(0,1);m.hidden=false;m.el.slideIn(k,{preserveScroll:true,duration:Ext.Number.from(h,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){m.collapsed=false;m.el.removeCls(n);m.placeholder.hide();m.isCollapsingOrExpanding=0;m.fireEvent("expand",m)}}})}}else{m.isCollapsingOrExpanding=0;m.fireEvent("expand",m)}return m},afterExpand:function(d){var e=this,f=e.ownerLayout;e.isCollapsingOrExpanding=0;if(e.collapseTool){e.collapseTool.setType("collapse-"+e.collapseDirection)}if(f&&d){f.onContentChange(e)}e.fireEvent("expand",e)},setBorder:function(f,h){if(h){return}var e=this,g=e.header;if(!f){f=0}else{f=Ext.Element.unitizeBox((f===true)?1:f)}if(g){if(g.isHeader){g.setBorder(f)}else{g.border=f}}if(e.rendered&&e.bodyBorder!==false){e.body.setStyle("border-width",f)}e.updateLayout();e.border=f},toggleCollapse:function(){return(this.collapsed||this.floatedFromCollapse)?this.expand():this.collapse()},getKeyMap:function(){return this.keyMap||(this.keyMap=new Ext.util.KeyMap(Ext.apply({target:this.el},this.keys)))},initDraggable:function(){this.dd=new Ext.panel.DD(this,Ext.isBoolean(this.draggable)?null:this.draggable)},ghostTools:function(){var j=[],i=this.header,k=i?i.query("tool[hidden=false]"):[],l,h,g;if(k.length){l=0;h=k.length;for(;l<h;l++){g=k[l];j.push({type:g.type})}}else{j=[{type:"placeholder"}]}return j},ghost:function(g){var i=this,f=i.ghostPanel,j=i.getBox(),h;if(!f){f=new Ext.panel.Panel({renderTo:document.body,floating:{shadow:false},frame:(Ext.supports.CSS3BorderRadius&&!i.isWindow)?i.frame:false,overlapHeader:i.overlapHeader,headerPosition:i.headerPosition,baseCls:i.baseCls,cls:i.baseCls+"-ghost "+(g||"")});i.ghostPanel=f}f.floatParent=i.floatParent;if(i.floating){f.setZIndex(Ext.Number.from(i.el.getStyle("zIndex"),0))}else{f.toFront()}if(!(i.preventHeader||(i.header===false))){h=f.header;if(h){h.suspendLayouts();Ext.Array.forEach(h.query("tool"),h.remove,h);h.resumeLayouts()}f.addTool(i.ghostTools());f.setTitle(i.title);f.setIconCls(i.iconCls)}f.el.show();f.setPagePosition(j.x,j.y);f.setSize(j.width,j.height);i.el.hide();return f},unghost:function(d,e){var f=this;if(!f.ghostPanel){return}if(d!==false){f.el.show();if(e!==false){f.setPagePosition(f.ghostPanel.el.getXY());if(f.hideMode=="offsets"){delete f.el.hideModeStyles}}Ext.defer(f.focus,10,f)}f.ghostPanel.el.hide()},beginDrag:function(){if(this.floatingItems){this.floatingItems.hide()}},endDrag:function(){if(this.floatingItems){this.floatingItems.show()}},initResizable:function(b){if(this.collapsed){b.disabled=true}this.callParent([b])}},function(){this.prototype.animCollapse=Ext.enableFx});Ext.define("Ext.tab.Panel",{extend:"Ext.panel.Panel",alias:"widget.tabpanel",alternateClassName:["Ext.TabPanel"],requires:["Ext.layout.container.Card","Ext.tab.Bar"],tabPosition:"top",removePanelHeader:true,plain:false,itemCls:Ext.baseCSSPrefix+"tabpanel-child",minTabWidth:undefined,maxTabWidth:undefined,deferredRender:true,initComponent:function(){var f=this,d=[].concat(f.dockedItems||[]),e=f.activeTab||(f.activeTab=0);f.layout=new Ext.layout.container.Card(Ext.apply({owner:f,deferredRender:f.deferredRender,itemCls:f.itemCls,activeItem:f.activeTab},f.layout));f.tabBar=new Ext.tab.Bar(Ext.apply({dock:f.tabPosition,plain:f.plain,border:f.border,cardLayout:f.layout,tabPanel:f},f.tabBar));d.push(f.tabBar);f.dockedItems=d;f.addEvents("beforetabchange","tabchange");f.callParent(arguments);f.activeTab=f.getComponent(e);if(f.activeTab){f.activeTab.tab.activate(true);f.tabBar.activeTab=f.activeTab.tab}},setActiveTab:function(e){var f=this,d;e=f.getComponent(e);if(e){d=f.getActiveTab();if(d!==e&&f.fireEvent("beforetabchange",f,e,d)===false){return false}if(!e.isComponent){Ext.suspendLayouts();e=f.add(e);Ext.resumeLayouts()}f.activeTab=e;Ext.suspendLayouts();f.layout.setActiveItem(e);e=f.activeTab=f.layout.getActiveItem();if(e&&e!==d){f.tabBar.setActiveTab(e.tab);Ext.resumeLayouts(true);if(d!==e){f.fireEvent("tabchange",f,e,d)}}else{Ext.resumeLayouts(true)}return e}},getActiveTab:function(){var c=this,d=c.getComponent(c.activeTab);if(d&&c.items.indexOf(d)!=-1){c.activeTab=d}else{c.activeTab=null}return c.activeTab},getTabBar:function(){return this.tabBar},onAdd:function(h,j){var i=this,f=h.tabConfig||{},g={xtype:"tab",card:h,disabled:h.disabled,closable:h.closable,hidden:h.hidden&&!h.hiddenByLayout,tooltip:h.tooltip,tabBar:i.tabBar,closeText:h.closeText};f=Ext.applyIf(f,g);h.tab=i.tabBar.insert(j,f);h.on({scope:i,enable:i.onItemEnable,disable:i.onItemDisable,beforeshow:i.onItemBeforeShow,iconchange:i.onItemIconChange,iconclschange:i.onItemIconClsChange,titlechange:i.onItemTitleChange});if(h.isPanel){if(i.removePanelHeader){if(h.rendered){if(h.header){h.header.hide()}}else{h.header=false}}if(h.isPanel&&i.border){h.setBorder(false)}}},onItemEnable:function(b){b.tab.enable()},onItemDisable:function(b){b.tab.disable()},onItemBeforeShow:function(b){if(b!==this.activeTab){this.setActiveTab(b);return false}},onItemIconChange:function(c,d){c.tab.setIcon(d)},onItemIconClsChange:function(c,d){c.tab.setIconCls(d)},onItemTitleChange:function(d,c){d.tab.setText(c)},doRemove:function(g,e){var h=this,f;if(h.destroying||h.items.getCount()==1){h.activeTab=null}else{if((f=h.tabBar.items.indexOf(h.tabBar.findNextActivatable(g.tab)))!==-1){h.setActiveTab(f)}}this.callParent(arguments);delete g.tab.card;delete g.tab},onRemove:function(d,f){var e=this;d.un({scope:e,enable:e.onItemEnable,disable:e.onItemDisable,beforeshow:e.onItemBeforeShow});if(!e.destroying&&d.tab.ownerCt===e.tabBar){e.tabBar.remove(d.tab)}}});Ext.define("Docs.view.comments.Index",{extend:"Ext.panel.Panel",alias:"widget.commentindex",mixins:["Docs.view.Scrolling"],cls:"comment-index iScroll",margin:"10 0 0 0",autoScroll:true,items:[{xtype:"container",html:'<h1>Recent Comments</h1> Hide read: <input type="checkbox" name="hideRead" id="hideRead" />'},{xtype:"container",id:"recentcomments"}],getTab:function(){return Docs.enableComments?{cls:"comments",href:"#!/comment",tooltip:"Comments"}:false}});Ext.define("Docs.view.guides.Container",{extend:"Ext.panel.Panel",alias:"widget.guidecontainer",componentCls:"guide-container",mixins:["Docs.view.Scrolling"],initComponent:function(){this.addEvents("afterload");this.callParent(arguments)},scrollToEl:function(b){this.scrollToView(b,{highlight:true,offset:-100})},load:function(b){this.tpl=this.tpl||new Ext.XTemplate(Docs.data.showPrintButton?'<a class="print guide" href="?print=/guide/{name}" target="_blank">Print</a>':"","{content}");this.update(this.tpl.apply(b));Docs.Syntax.highlight(this.getEl());this.fireEvent("afterload")}});Ext.define("Docs.view.videos.Container",{extend:"Ext.panel.Panel",alias:"widget.videocontainer",componentCls:"video-container",load:function(b){this.tpl=this.tpl||new Ext.XTemplate('<object width="640" height="360" id="video_player">','<param name="allowfullscreen" value="true" />','<param name="allowscriptaccess" value="always" />','<param name="flashvars" value="api=1" />','<param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id={id}&server=vimeo.com&color=4CC208&fullscreen=1" />','<embed src="http://vimeo.com/moogaloop.swf?clip_id={id}&server=vimeo.com&color=4CC208&fullscreen=1" ','type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="360"></embed>',"</object>","<h1>{title}</h1>","<p>{[this.linkify(values.description)]}</p>",{linkify:function(a){return a.replace(/(\bhttps?:\/\/\S+)/ig,"<a href='$1'>$1</a>")}});this.update(this.tpl.apply(b))},listeners:{hide:function(){var b=document.getElementById("video_player");if(b&&b.api_pause){b.api_pause()}}}});Ext.define("Docs.view.examples.TouchContainer",{extend:"Ext.panel.Panel",alias:"widget.touchexamplecontainer",requires:["Docs.view.examples.Device"],layout:"fit",cls:"example-container iScroll",autoScroll:true,bodyPadding:"10 0 5 0",initComponent:function(){this.dockedItems=[{xtype:"container",dock:"top",html:['<h1 class="example-title">Example</h1>','<div class="cls-grouping example-toolbar">','<div class="devices">','<button class="phone selected">Phone</button>','<button class="tablet">Tablet</button>',"</div>",'<span class="separator"> </span>','<div class="orientations">','<button class="landscape selected">Landscape</button>','<button class="portrait">Portrait</button>',"</div>",'<span class="separator"> </span>',"<div>",'<button class="new-window">Open in new window</button>',"</div>","</div>"].join("")}];this.callParent(arguments)},load:function(b){this.title=b.title+" Example";this.device=Ext.create("Docs.view.examples.Device",{url:b.url,device:b.device||"phone",orientation:b.orientation||"landscape"});this.refresh()},refresh:function(){this.update(this.device.toHtml());this.updateScale();this.updateTitle();this.updateButtons()},setDevice:function(b){this.device.setDevice(b);this.refresh()},setOrientation:function(b){this.device.setOrientation(b);this.refresh()},updateScale:function(){var b=Ext.query("iframe",this.el.dom)[0];if(b){b.onload=Ext.Function.bind(function(){var d=document.createElement("style");var a="html { overflow: hidden }";if(this.device.getDevice()==="tablet"){a+="body { font-size: 79.8% !important; }"}d.innerHTML=a;b.contentWindow.document.body.appendChild(d)},this)}},updateTitle:function(){Ext.get(Ext.query(".example-title")).update(this.title)},updateButtons:function(){Ext.Array.each(Ext.query(".example-toolbar .orientations button"),function(b){Ext.get(b).removeCls("selected")});Ext.get(Ext.query(".example-toolbar .orientations button."+this.device.getOrientation())).addCls("selected");Ext.Array.each(Ext.query(".example-toolbar .devices button"),function(b){Ext.get(b).removeCls("selected")});Ext.get(Ext.query(".example-toolbar .devices button."+this.device.getDevice())).addCls("selected")},clear:function(){this.update("")}});Ext.define("Ext.menu.Menu",{extend:"Ext.panel.Panel",alias:"widget.menu",requires:["Ext.layout.container.Fit","Ext.layout.container.VBox","Ext.menu.CheckItem","Ext.menu.Item","Ext.menu.KeyNav","Ext.menu.Manager","Ext.menu.Separator"],allowOtherMenus:false,ariaRole:"menu",defaultAlign:"tl-bl?",floating:true,constrain:true,hidden:true,hideMode:"visibility",ignoreParentClicks:false,isMenu:true,showSeparator:true,minWidth:undefined,defaultMinWidth:120,initComponent:function(){var f=this,i=Ext.baseCSSPrefix,g=[i+"menu"],j=f.bodyCls?[f.bodyCls]:[],h=f.floating!==false;f.addEvents("click","mouseenter","mouseleave","mouseover");Ext.menu.Manager.register(f);if(f.plain){g.push(i+"menu-plain")}f.cls=g.join(" ");j.unshift(i+"menu-body");f.bodyCls=j.join(" ");if(!f.layout){f.layout={type:"vbox",align:"stretchmax",overflowHandler:"Scroller"}}if(h&&f.minWidth===undefined){f.minWidth=f.defaultMinWidth}if(!h&&f.initialConfig.hidden!==true){f.hidden=false}f.callParent(arguments);f.on("beforeshow",function(){var a=!!f.items.length;if(a&&f.rendered){f.el.setStyle("visibility",null)}return a})},beforeRender:function(){this.callParent(arguments);if(!this.getSizeModel().width.shrinkWrap){this.layout.align="stretch"}},onBoxReady:function(){var d=this,c;d.callParent(arguments);if(d.showSeparator){c={cls:Ext.baseCSSPrefix+"menu-icon-separator",html:" "};if((!Ext.isStrict&&Ext.isIE)||Ext.isIE6){c.style="height:"+d.el.getHeight()+"px"}d.iconSepEl=d.layout.getElementTarget().insertFirst(c)}d.mon(d.el,{click:d.onClick,mouseover:d.onMouseOver,scope:d});d.mouseMonitor=d.el.monitorMouseLeave(100,d.onMouseLeave,d);d.keyNav=new Ext.menu.KeyNav(d)},getBubbleTarget:function(){return this.parentMenu||this.ownerButton||this.callParent(arguments)},canActivateItem:function(b){return b&&!b.isDisabled()&&b.isVisible()&&(b.canActivate||b.getXTypes().indexOf("menuitem")<0)},deactivateActiveItem:function(e){var h=this,g=h.activeItem,f=h.focusedItem;if(g){g.deactivate();if(!g.activated){delete h.activeItem}}if(f&&e){f.blur();delete h.focusedItem}},getFocusEl:function(){return this.focusedItem||this.el},hide:function(){this.deactivateActiveItem(true);this.callParent(arguments)},getItemFromEvent:function(b){return this.getChildByElement(b.getTarget())},lookupComponent:function(c){var d=this;if(typeof c=="string"){c=d.lookupItemFromString(c)}else{if(Ext.isObject(c)){c=d.lookupItemFromObject(c)}}c.minWidth=c.minWidth||d.minWidth;return c},lookupItemFromObject:function(h){var e=this,g=Ext.baseCSSPrefix,f;if(!h.isComponent){if(!h.xtype){h=Ext.create("Ext.menu."+(Ext.isBoolean(h.checked)?"Check":"")+"Item",h)}else{h=Ext.ComponentManager.create(h,h.xtype)}}if(h.isMenuItem){h.parentMenu=e}if(!h.isMenuItem&&!h.dock){f=[g+"menu-item",g+"menu-item-cmp"];if(!e.plain&&(h.indent===true||h.iconCls==="no-icon")){f.push(g+"menu-item-indent")}if(h.rendered){h.el.addCls(f)}else{h.cls=(h.cls?h.cls:"")+" "+f.join(" ")}h.isMenuItem=true}return h},lookupItemFromString:function(b){return(b=="separator"||b=="-")?new Ext.menu.Separator():new Ext.menu.Item({canActivate:false,hideOnClick:false,plain:true,text:b})},onClick:function(f){var d=this,e;if(d.disabled){f.stopEvent();return}if(f.within(d.layout.getRenderTarget())){e=d.getItemFromEvent(f)||d.activeItem;if(e&&e.isXType("menuitem")){if(!e.menu||!d.ignoreParentClicks){e.onClick(f)}else{f.stopEvent()}}if(!e.disabled){d.fireEvent("click",d,e,f)}}},onDestroy:function(){var b=this;Ext.menu.Manager.unregister(b);delete b.parentMenu;delete b.ownerButton;if(b.rendered){b.el.un(b.mouseMonitor);b.keyNav.destroy();delete b.keyNav}b.callParent(arguments)},onMouseLeave:function(c){var d=this;d.deactivateActiveItem();if(d.disabled){return}d.fireEvent("mouseleave",d,c)},onMouseOver:function(k){var l=this,j=k.getRelatedTarget(),e=!l.el.contains(j),m=l.getItemFromEvent(k),n=l.parentMenu,i=l.parentItem;if(e&&n){n.setActiveItem(i);i.cancelDeferHide();n.mouseMonitor.mouseenter()}if(l.disabled){return}if(m&&!m.activated){l.setActiveItem(m);if(m.activated&&m.expandMenu){m.expandMenu()}}if(e){l.fireEvent("mouseenter",l,k)}l.fireEvent("mouseover",l,m,k)},setActiveItem:function(c){var d=this;if(c&&(c!=d.activeItem)){d.deactivateActiveItem();if(d.canActivateItem(c)){if(c.activate){c.activate();if(c.activated){d.activeItem=c;d.focusedItem=c;d.focus()}}else{c.focus();d.focusedItem=c}}c.el.scrollIntoView(d.layout.getRenderTarget())}},showBy:function(e,g,h){var f=this;if(f.floating&&e){f.show();f.setPagePosition(f.el.getAlignToXY(e.el||e,g||f.defaultAlign,h));f.setVerticalPosition()}return f},show:function(){var i=this,j,f,g,h=i.maxHeight;if(!i.rendered){i.doAutoRender()}if(i.floating){j=Ext.fly(i.el.getScopeParent());f=j.getViewSize().height;i.maxHeight=Math.min(h||f,f)}g=i.callParent(arguments);i.maxHeight=h;return g},afterComponentLayout:function(j,g,f,h){var i=this;i.callParent(arguments);if(i.showSeparator){i.iconSepEl.setHeight(i.componentLayout.lastComponentSize.contentHeight)}},setVerticalPosition:function(){var o=this,m,n=o.el.getY(),l=n,j=o.getHeight(),q=Ext.Element.getViewportHeight().height,p=Ext.fly(o.el.getScopeParent()),r=p.getViewSize().height,k=n-p.getScroll().top;p=null;if(o.floating){m=o.maxHeight?o.maxHeight:r-k;if(j>r){l=n-k}else{if(m<j){l=n-(j-m)}else{if((n+j)>q){l=q-j}}}}o.el.setY(l)}});Ext.define("Docs.view.TabMenu",{extend:"Ext.menu.Menu",plain:true,componentCls:"tab-menu",initComponent:function(){this.addEvents("tabItemClick","closeAllTabs");this.items=[{text:"Close all tabs",iconCls:"close",cls:"close-all",handler:function(){this.fireEvent("closeAllTabs")},scope:this}];this.callParent()},addTab:function(c,d){this.insert(this.items.length-1,{text:c.text,iconCls:c.iconCls,origIcon:c.iconCls,href:c.href,cls:d,handler:this.onTabItemClick,scope:this})},onTabItemClick:function(b){this.fireEvent("tabItemClick",b)},addTabCls:function(c,d){this.items.each(function(a){if(a.href===c.href){a.addCls(d)}})}});Ext.define("Docs.view.Tabs",{extend:"Ext.container.Container",alias:"widget.doctabs",id:"doctabs",componentCls:"doctabs",requires:["Docs.History","Docs.view.TabMenu"],minTabWidth:80,maxTabWidth:160,animDuration:150,tabs:[],tabsInBar:[],tabCache:{},staticTabs:[],initComponent:function(){this.addEvents("tabActivate","tabClose");this.tpl=Ext.create("Ext.XTemplate",'<tpl for=".">','<div class="doctab overview {cls}{active}">','<div class="l"></div>','<div class="m">','<tpl if="text">','<a class="tabUrl ov-tab-text" href="{href}">{text}</a>',"<tpl else>",'<a class="tabUrl ov-tab" href="{href}"> </a>',"</tpl>","</div>",'<div class="r"></div>',"</div>","</tpl>",'<div style="float: left; width: 8px"> </div>','<div class="tab-overflow"></div>');this.html=this.tpl.applyTemplate(this.staticTabs);this.tabTpl=Ext.create("Ext.XTemplate",'<div class="doctab','{[values.active ? (" active") : ""]}','" style="','{[values.width ? ("width: " + values.width + "px;") : ""]}','{[values.visible ? "" : "visibility: hidden;"]}">','<div class="l"></div>','<div class="m">','<span class="icn {iconCls}"> </span>','<a class="tabUrl main-tab" href="{href}">{text}</a>',"</div>",'<div class="r"><a class="close" href="#"> </a></div>',"</div>");this.on("afterrender",this.initListeners,this);this.on("resize",this.refresh,this);this.callParent()},initListeners:function(){this.el.on("mouseover",function(c,d){Ext.get(d).addCls("ovr")},this,{delegate:".close"});this.el.on("mouseout",function(c,d){Ext.get(d).removeCls("ovr")},this,{delegate:".close"});this.el.on("click",function(f,d){var e=Ext.get(d).up(".doctab").down(".tabUrl").getAttribute("href");e=Docs.History.cleanUrl(e);this.removeTab(e);this.fireEvent("tabClose",e)},this,{delegate:".close",preventDefault:true});this.el.on("click",function(f,d){if(Ext.fly(f.getTarget()).hasCls("close")){return}var e=Ext.get(d).down(".tabUrl").getAttribute("href");this.fireEvent("tabActivate",e,{navigate:true})},this,{delegate:".doctab"});this.el.on("contextmenu",function(c,d){if(!Ext.get(d).hasCls("overview")){this.createMenu().showBy(d)}},this,{delegate:".doctab",preventDefault:true});this.el.on("click",Ext.emptyFn,this,{delegate:".tabUrl",preventDefault:true});this.el.on("mouseleave",function(){if(this.shouldResize){this.resizeTabs({animate:true})}},this)},setStaticTabs:function(b){this.staticTabs=b;this.refresh()},getStaticTabs:function(b){return this.staticTabs},addTab:function(d,c){this.tabCache[d.href]=d;if(!this.hasTab(d.href)){this.tabs.push(d.href);if(this.roomForNewTab()){this.addTabToBar(d,c)}this.addTabToMenu(this.overflowButton.menu,d)}if(c.activate){this.activateTab(d.href)}this.saveTabs()},removeTab:function(d){if(!this.hasTab(d)){return}this.removeFromArray(this.tabs,d);var e=this.removeFromArray(this.tabsInBar,d);var f=this.tabs[this.tabsInBar.length];if(f){this.tabsInBar.push(f)}if(this.activeTab===d){if(this.tabs.length===0){Docs.App.getController(this.getControllerName(d)).loadIndex()}else{if(e===this.tabs.length){e-=1}this.activateTab(this.tabs[e]);this.fireEvent("tabActivate",this.tabs[e])}}if(this.tabs.length>=this.maxTabsInBar()){this.refresh()}else{this.removeTabFromBar(d)}this.saveTabs()},removeFromArray:function(f,d){var e=Ext.Array.indexOf(f,d);if(e!==-1){Ext.Array.erase(f,e,1)}return e},activateTab:function(d){this.activeTab=d;if(!this.inTabs(d)){this.swapLastTabWith(d)}Ext.Array.each(Ext.query(".doctab a.tabUrl"),function(a){Ext.get(a).up(".doctab").removeCls(["active","highlight"])});var e=Ext.query('.doctab a[href="'+d+'"]')[0];if(e){var f=Ext.get(e).up(".doctab");f.addCls("active")}this.highlightOverviewTab(d)},refresh:function(){var i=this.tpl.applyTemplate(this.staticTabs);var f=this.maxTabsInBar()<this.tabs.length?this.maxTabsInBar():this.tabs.length;this.tabsInBar=this.tabs.slice(0,f);for(var j=0;j<f;j++){var h=this.tabCache[this.tabs[j]];var g=Ext.apply(h,{visible:true,active:this.activeTab===h.href,width:this.tabWidth()});i+=this.tabTpl.applyTemplate(g)}this.el.dom.innerHTML=i;if(this.activeTab&&this.activeTab!==this.tabs[f-1]){this.activateTab(this.activeTab);this.fireEvent("tabActivate",this.activeTab)}this.highlightOverviewTab(this.activeTab);this.createOverflowButton();this.addToolTips()},closeAllTabs:function(){if(this.inTabBar(this.activeTab)){this.tabs=this.tabsInBar=[this.activeTab]}else{this.tabs=this.tabsInBar=[]}this.refresh();this.saveTabs()},tabData:function(){return Ext.Array.map(this.tabs,function(b){return this.tabCache[b]},this)},roomForNewTab:function(){return this.tabsInBar.length<this.maxTabsInBar()},hasTab:function(b){return Ext.Array.contains(this.tabs,b)},addTabToBar:function(e,d){this.tabsInBar.push(e.href);var f=Ext.get(this.tabTpl.append(this.el.dom,e));if(d.animate&&!Ext.isIE){f.setStyle("width","10px");f.setStyle({visibility:"visible"});f.animate({to:{width:this.tabWidth()}})}else{f.setStyle({visibility:"visible"})}this.resizeTabs(d)},inTabBar:function(b){return Ext.Array.contains(this.tabsInBar,b)},inTabs:function(d){var c=Ext.Array.pluck(this.staticTabs,"href").concat(this.tabsInBar);return Ext.Array.contains(c,d)},removeTabFromBar:function(d){var c=this.getTabEl(d);c.dom.removed=true;if(Ext.isIE){c.remove();this.createOverflowButton()}else{c.animate({to:{top:30},duration:this.animDuration}).animate({to:{width:10},duration:this.animDuration,listeners:{afteranimate:function(){c.remove();this.shouldResize=true;this.createOverflowButton()},scope:this}})}},swapLastTabWith:function(d){var e=this.getTabEl(this.tabsInBar[this.tabsInBar.length-1]);if(e){var f=this.tabTpl.append(document.body,this.tabCache[d]);e.dom.parentNode.replaceChild(f,e.dom);this.tabsInBar[this.tabsInBar.length-1]=d;Ext.get(f).setStyle({visibility:"visible",width:String(this.tabWidth())+"px"})}},highlightOverviewTab:function(d){var c=Ext.query(".doctab."+this.getControllerName(d).toLowerCase());if(c&&c[0]){Ext.get(c[0]).addCls("highlight")}},maxTabsInBar:function(){return Math.floor(this.tabBarWidth()/this.minTabWidth)},tabWidth:function(){var b=Math.floor(this.tabBarWidth()/this.tabsInBar.length)+6;if(b>this.maxTabWidth){return this.maxTabWidth}else{if(b<this.minTabWidth){return this.minTabWidth}else{return b}}},tabBarWidth:function(){return this.getWidth()-(this.staticTabs.length*50)-15},resizeTabs:function(b){this.shouldResize=false;Ext.Array.each(Ext.query(".doctab"),function(a){var d=Ext.get(a);if(!d.dom.removed&&!d.hasCls("overview")){if(b&&b.animate&&!Ext.isIE){d.animate({to:{width:this.tabWidth()}})}else{d.setWidth(this.tabWidth())}}},this)},getTabEl:function(c){var d=Ext.query('.doctab a[href="'+c+'"]');if(d&&d[0]){return Ext.get(d[0]).up(".doctab")}},createOverflowButton:function(){if(this.overflowButton){this.overflowButton.destroy()}this.overflowButton=Ext.create("Ext.button.Button",{baseCls:"",renderTo:this.getEl().down(".tab-overflow"),menu:this.createMenu()})},createMenu:function(){var b=new Docs.view.TabMenu({listeners:{closeAllTabs:this.closeAllTabs,tabItemClick:function(a){this.fireEvent("tabActivate",a.href,{navigate:true})},scope:this}});Ext.Array.each(this.tabs,function(a){this.addTabToMenu(b,this.tabCache[a])},this);return b},addTabToMenu:function(g,h){var f=Ext.Array.indexOf(this.tabs,h.href);if(this.tabs.length>this.tabsInBar.length&&f===this.maxTabsInBar()){g.addTabCls(h,"overflow")}var e=this.inTabBar(h.href);g.addTab(h,e?"":"overflow")},addToolTips:function(){Ext.Array.each(this.staticTabs,function(c){var d=Ext.get(Ext.query(".doctab."+c.cls)[0]);if(d){Ext.create("Ext.tip.ToolTip",{target:d,html:c.tooltip})}})},saveTabs:function(){Docs.Settings.set("tabs",this.tabs)},getControllerName:function(b){if(/#!?\/api/.test(b)){return"Classes"}else{if(/#!?\/guide/.test(b)){return"Guides"}else{if(/#!?\/video/.test(b)){return"Videos"}else{if(/#!?\/example/.test(b)){return"Examples"}else{if(/#!?\/stats/.test(b)){return"Stats"}else{if(/#!?\/tests/.test(b)){return"Tests"}else{if(/#!?\/comment/.test(b)){return"Comments"}else{return"Index"}}}}}}}}});Ext.define("Ext.panel.Table",{extend:"Ext.panel.Panel",alias:"widget.tablepanel",uses:["Ext.selection.RowModel","Ext.grid.PagingScroller","Ext.grid.header.Container","Ext.grid.Lockable"],extraBaseCls:Ext.baseCSSPrefix+"grid",extraBodyCls:Ext.baseCSSPrefix+"grid-body",layout:"fit",hasView:false,viewType:null,selType:"rowmodel",scroll:true,deferRowRender:true,sortableColumns:true,enableLocking:false,scrollerOwner:true,enableColumnMove:true,restrictColumnReorder:false,enableColumnResize:true,enableColumnHide:true,rowLines:true,initComponent:function(){if(!this.viewType){Ext.Error.raise("You must specify a viewType config.")}if(this.headers){Ext.Error.raise("The headers config is not supported. Please specify columns instead.")}var l=this,i=l.scroll,q=false,r=false,m=l.columns||l.colModel,k,p=l.border,o,n;if(l.columnLines){l.addCls(Ext.baseCSSPrefix+"grid-with-col-lines")}if(l.rowLines){l.addCls(Ext.baseCSSPrefix+"grid-with-row-lines")}l.store=Ext.data.StoreManager.lookup(l.store||"ext-empty-store");if(!m){Ext.Error.raise("A column configuration must be specified")}if(m instanceof Ext.grid.header.Container){l.headerCt=m;l.headerCt.border=p;l.columns=l.headerCt.items.items}else{if(Ext.isArray(m)){m={items:m,border:p}}Ext.apply(m,{forceFit:l.forceFit,sortable:l.sortableColumns,enableColumnMove:l.enableColumnMove,enableColumnResize:l.enableColumnResize,enableColumnHide:l.enableColumnHide,border:p,restrictReorder:l.restrictColumnReorder});l.columns=m.items;if(l.enableLocking||Ext.ComponentQuery.query("{locked !== undefined}{processed != true}",l.columns).length){l.self.mixin("lockable",Ext.grid.Lockable);l.injectLockable()}}l.scrollTask=new Ext.util.DelayedTask(l.syncHorizontalScroll,l);l.addEvents("reconfigure","viewready");l.bodyCls=l.bodyCls||"";l.bodyCls+=(" "+l.extraBodyCls);l.cls=l.cls||"";l.cls+=(" "+l.extraBaseCls);delete l.autoScroll;if(!l.hasView){if(!l.headerCt){l.headerCt=new Ext.grid.header.Container(m)}l.columns=l.headerCt.items.items;if(l.store.buffered&&!l.store.remoteSort){for(o=0,n=l.columns.length;o<n;o++){l.columns[o].sortable=false}}if(l.hideHeaders){l.headerCt.height=0;l.headerCt.addCls(Ext.baseCSSPrefix+"grid-header-ct-hidden");l.addCls(Ext.baseCSSPrefix+"grid-header-hidden");if(Ext.isIEQuirks){l.headerCt.style={display:"none"}}}if(i===true||i==="both"){q=r=true}else{if(i==="horizontal"){r=true}else{if(i==="vertical"){q=true}}}l.relayHeaderCtEvents(l.headerCt);l.features=l.features||[];if(!Ext.isArray(l.features)){l.features=[l.features]}l.dockedItems=[].concat(l.dockedItems||[]);l.dockedItems.unshift(l.headerCt);l.viewConfig=l.viewConfig||{};if(l.store&&l.store.buffered){l.viewConfig.preserveScrollOnRefresh=true}else{if(l.invalidateScrollerOnRefresh!==undefined){l.viewConfig.preserveScrollOnRefresh=!l.invalidateScrollerOnRefresh}}k=l.getView();l.items=[k];l.hasView=true;if(q){if(l.store.buffered){l.verticalScroller=new Ext.grid.PagingScroller(Ext.apply({panel:l,store:l.store,view:l.view},l.verticalScroller))}}if(r){if(!l.hideHeaders){k.on({scroll:{fn:l.onHorizontalScroll,element:"el",scope:l}})}}l.mon(k.store,{load:l.onStoreLoad,scope:l});l.mon(k,{viewready:l.onViewReady,refresh:l.onRestoreHorzScroll,scope:l})}this.relayEvents(l.view,["beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","selectionchange","beforeselect","select","beforedeselect","deselect"]);l.callParent(arguments);l.addStateEvents(["columnresize","columnmove","columnhide","columnshow","sortchange"]);if(l.headerCt){l.headerCt.on("afterlayout",l.onRestoreHorzScroll,l)}},relayHeaderCtEvents:function(b){this.relayEvents(b,["columnresize","columnmove","columnhide","columnshow","sortchange"])},getState:function(){var e=this,d=e.callParent(),f=e.store.sorters.first();d=e.addPropertyToState(d,"columns",(e.headerCt||e).getColumnsState());if(f){d=e.addPropertyToState(d,"sort",{property:f.property,direction:f.direction,root:f.root})}return d},applyState:function(i){var j=this,h=i.sort,g=j.store,f=i.columns;delete i.columns;j.callParent(arguments);if(f){(j.headerCt||j).applyColumnsState(f)}if(h){if(g.remoteSort){g.sort({property:h.property,direction:h.direction,root:h.root},null,false)}else{g.sort(h.property,h.direction)}}},getStore:function(){return this.store},getView:function(){var d=this,c;if(!d.view){c=d.getSelectionModel();d.view=Ext.widget(Ext.apply({},d.viewConfig,{grid:d,deferInitialRefresh:d.deferRowRender!==false,scroll:d.scroll,xtype:d.viewType,store:d.store,headerCt:d.headerCt,selModel:c,features:d.features,panel:d,emptyText:d.emptyText?'<div class="'+Ext.baseCSSPrefix+'grid-empty">'+d.emptyText+"</div>":""}));d.mon(d.view,{uievent:d.processEvent,scope:d});c.view=d.view;d.headerCt.view=d.view;d.relayEvents(d.view,["cellclick","celldblclick"])}return d.view},setAutoScroll:Ext.emptyFn,processEvent:function(n,e,j,p,o,l){var m=this,k;if(o!==-1){k=m.headerCt.getGridColumns()[o];return k.processEvent.apply(k,arguments)}},determineScrollbars:function(){Ext.log.warn("Obsolete")},invalidateScroller:function(){Ext.log.warn("Obsolete")},scrollByDeltaY:function(c,d){this.getView().scrollBy(0,c,d)},scrollByDeltaX:function(c,d){this.getView().scrollBy(c,0,d)},afterCollapse:function(){var b=this;b.saveScrollPos();b.saveScrollPos();b.callParent(arguments)},afterExpand:function(){var b=this;b.callParent(arguments);b.restoreScrollPos();b.restoreScrollPos()},saveScrollPos:Ext.emptyFn,restoreScrollPos:Ext.emptyFn,onHeaderResize:function(){this.delayScroll()},onHeaderMove:function(j,i,h,g,k){var l=this;if(l.optimizedColumnMove===false){l.view.refresh()}else{l.view.moveColumn(g,k,h)}l.delayScroll()},onHeaderHide:function(d,c){this.delayScroll()},onHeaderShow:function(d,c){this.delayScroll()},delayScroll:function(){var b=this.getScrollTarget().el;if(b){this.scrollTask.delay(10,null,null,[b.dom.scrollLeft])}},onViewReady:function(){this.fireEvent("viewready",this)},onRestoreHorzScroll:function(){var b=this.scrollLeftPos;if(b){this.syncHorizontalScroll(b)}},setScrollTop:function(f){var d=this,e=d.getScrollerOwner();e.virtualScrollTop=f},getScrollerOwner:function(){var b=this;if(!this.scrollerOwner){b=this.up("[scrollerOwner]")}return b},getLhsMarker:function(){var b=this;return b.lhsMarker||(b.lhsMarker=Ext.DomHelper.append(b.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true))},getRhsMarker:function(){var b=this;return b.rhsMarker||(b.rhsMarker=Ext.DomHelper.append(b.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true))},getSelectionModel:function(){if(!this.selModel){this.selModel={}}var c="SINGLE",d;if(this.simpleSelect){c="SIMPLE"}else{if(this.multiSelect){c="MULTI"}}Ext.applyIf(this.selModel,{allowDeselect:this.allowDeselect,mode:c});if(!this.selModel.events){d=this.selModel.selType||this.selType;this.selModel=Ext.create("selection."+d,this.selModel)}if(!this.selModel.hasRelaySetup){this.relayEvents(this.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect"]);this.selModel.hasRelaySetup=true}if(this.disableSelection){this.selModel.locked=true}return this.selModel},getScrollTarget:function(){var d=this.getScrollerOwner(),c=d.query("tableview");return c[1]||c[0]},onHorizontalScroll:function(d,c){this.syncHorizontalScroll(c.scrollLeft)},syncHorizontalScroll:function(f){var d=this,e;if(d.rendered){e=d.getScrollTarget();e.el.dom.scrollLeft=f;d.headerCt.el.dom.scrollLeft=f;d.scrollLeftPos=f}},onStoreLoad:Ext.emptyFn,getEditorParent:function(){return this.body},bindStore:function(d){var c=this;c.store=d;c.getView().bindStore(d)},beforeDestroy:function(){Ext.destroy(this.verticalScroller);this.callParent()},reconfigure:function(f,e){var h=this,g=h.headerCt;if(h.lockable){h.reconfigureLockable(f,e)}else{if(e){delete h.scrollLeftPos;g.suspendLayouts();g.removeAll();g.add(e)}if(f){f=Ext.StoreManager.lookup(f);h.bindStore(f)}else{h.getView().refresh()}if(e){g.resumeLayouts(true)}g.setSortState()}h.fireEvent("reconfigure",h,f,e)}});Ext.define("Ext.grid.Panel",{extend:"Ext.panel.Table",requires:["Ext.grid.View"],alias:["widget.gridpanel","widget.grid"],alternateClassName:["Ext.list.ListView","Ext.ListView","Ext.grid.GridPanel"],viewType:"gridview",lockable:false,bothCfgCopy:["invalidateScrollerOnRefresh","hideHeaders","enableColumnHide","enableColumnMove","enableColumnResize","sortableColumns"],normalCfgCopy:["verticalScroller","verticalScrollDock","verticalScrollerType","scroll"],lockedCfgCopy:[],rowLines:true});Ext.define("Docs.view.examples.InlineEditor",{extend:"Ext.Panel",bodyPadding:2,autoScroll:true,componentCls:"inline-example-editor",initComponent:function(){this.addEvents("init","change");this.on("afterlayout",this.initCodeMirror,this);this.callParent(arguments)},initCodeMirror:function(b){if(!this.codemirror){this.codemirror=CodeMirror(this.body,{mode:"javascript",indentUnit:4,value:this.value,onChange:Ext.Function.bind(function(a){this.fireEvent("change")},this)});this.fireEvent("init")}},refresh:function(){this.codemirror.refresh()},getValue:function(){return this.codemirror?this.codemirror.getValue():this.value},getHeight:function(){var b=this.el.down(".CodeMirror-lines");return b?b.getHeight():undefined},selectAll:function(){var d=this.codemirror.lineCount()-1;var c=this.codemirror.getLine(d).length;this.codemirror.setSelection({line:0,ch:0},{line:d,ch:c})}});Ext.define("Docs.view.examples.InlinePreview",{extend:"Ext.Panel",requires:["Docs.view.examples.Device"],bodyPadding:"0 10",statics:{iframeCounter:0,getNextIframeId:function(){this.iframeCounter++;return this.iframeCounter.toString()}},options:{},constructor:function(b){b=b||{};b.iframeId=this.self.getNextIframeId();b.id="inline-preview-"+b.iframeId;this.callParent([b]);this.addEvents(["previewsuccess","previewfailure"])},initComponent:function(){this.html=this.getHtml();this.callParent(arguments)},getHtml:function(){if(Docs.data.touchExamplesUi){return Ext.create("Docs.view.examples.Device",{url:"eg-iframe.html",id:this.iframeId,device:this.options.device,orientation:this.options.orientation}).toHtml()}else{var b=new Ext.XTemplate('<iframe id="{id}" style="width: 100%; height: 100%; border: 0" frameBorder="0"></iframe>');return b.apply({id:this.iframeId})}},update:function(h){var f=this.options;var e=Ext.get(this.iframeId);var g=Ext.Function.bind(this.iframeCallback,this);if(e){e.on("load",function(){Ext.Function.defer(function(){e.dom.contentWindow.loadInlineExample(h+"\n",f,g)},100)},this,{single:true});e.dom.src="eg-iframe.html"}},iframeCallback:function(c,d){if(c){this.fireEvent("previewsuccess",this)}else{this.fireEvent("previewfailure",this,d)}},getHeight:function(){return document.getElementById(this.iframeId).parentNode.clientHeight}});Ext.define("Docs.view.examples.Inline",{extend:"Ext.Panel",alias:"widget.inlineexample",requires:["Docs.view.examples.InlineEditor","Docs.view.examples.InlinePreview"],componentCls:"inline-example-cmp",layout:"card",border:0,resizable:{transparent:true,handles:"s",constrainTo:false},maxCodeHeight:400,options:{},constructor:function(){this.callParent(arguments);this.addEvents("previewsuccess","previewfailure")},initComponent:function(){this.options=Ext.apply({device:"phone",orientation:"landscape"},this.options);this.items=[this.editor=Ext.create("Docs.view.examples.InlineEditor",{cmpName:"code",value:this.value,listeners:{init:this.updateHeight,change:this.updateHeight,scope:this}}),this.preview=Ext.create("Docs.view.examples.InlinePreview",{cmpName:"preview",options:this.options})];this.relayEvents(this.preview,["previewsuccess","previewfailure"]);if(this.options.preview){this.activeItem=1;if(this.toolbar){this.toolbar.activateButton("preview")}}else{this.activeItem=0;if(this.toolbar){this.toolbar.activateButton("code")}}this.on("afterrender",this.init,this);this.callParent(arguments)},init:function(){var b=this.layout.getActiveItem();if(b.cmpName==="preview"){this.showPreview()}this.updateHeight();if(this.toolbar){this.initToolbarEvents()}},initToolbarEvents:function(){this.toolbar.on("buttonclick",function(b){if(b==="code"){this.showCode()}else{if(b==="preview"){this.showPreview()}else{if(b==="copy"){this.showCode();this.editor.selectAll()}}}},this)},showCode:function(){this.layout.setActiveItem(0);this.updateHeight();if(this.toolbar){this.toolbar.activateButton("code")}},showPreview:function(){this.preview.update(this.editor.getValue());this.layout.setActiveItem(1);this.updateHeight();if(this.toolbar){this.toolbar.activateButton("preview")}},updateHeight:function(){var d=this.preview.getHeight();var e=this.editor.getHeight();var f=30;if(Docs.data.touchExamplesUi&&d>0){this.setHeight(d+f)}else{if(e>0){this.setHeight(Ext.Number.constrain(e+f,0,this.maxCodeHeight))}}}});Ext.define("Docs.view.tests.BatchRunner",{extend:"Ext.container.Container",requires:["Docs.view.examples.Inline"],initComponent:function(){this.addEvents("start","finish","statuschange");this.callParent(arguments)},run:function(b){this.fireEvent("start");this.runNext({pass:0,fail:0,total:b.length,remaining:b})},runNext:function(h){this.fireEvent("statuschange",h);if(!h.remaining||h.remaining.length<1){this.fireEvent("finish");return}var j=h.remaining.shift();var i=j.get("options");i.preview=false;var f="var alert = function(){};\n";var g=Ext.create("Docs.view.examples.Inline",{cls:"doc-test-preview",height:0,value:f+j.get("code"),options:i,listeners:{previewsuccess:function(a){this.onSuccess(j,h)},previewfailure:function(a,b){this.onFailure(j,h,b)},scope:this}});this.removeAll();this.add(g);g.showPreview()},onSuccess:function(d,c){d.set("status","success");d.commit();c.pass++;this.runNext(c)},onFailure:function(e,f,d){e.set("status","failure");e.set("message",d.toString());e.commit();f.fail++;this.runNext(f)}});Ext.define("Ext.tip.Tip",{extend:"Ext.panel.Panel",alternateClassName:"Ext.Tip",minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",constrainPosition:true,autoRender:true,hidden:true,baseCls:Ext.baseCSSPrefix+"tip",floating:{shadow:true,shim:true,constrain:true},focusOnToFront:false,closeAction:"hide",ariaRole:"tooltip",initComponent:function(){var b=this;b.floating=Ext.apply({},{shadow:b.shadow},b.self.prototype.floating);b.callParent(arguments);b.frame=true;b.constrain=b.constrain||b.constrainPosition},showAt:function(c){var d=this;this.callParent(arguments);if(d.isVisible()){d.setPagePosition(c[0],c[1]);if(d.constrainPosition||d.constrain){d.doConstrain()}d.toFront(true)}},showBy:function(d,c){this.showAt(this.el.getAlignToXY(d,c||this.defaultAlign))},initDraggable:function(){var b=this;b.draggable={el:b.getDragEl(),delegate:b.header.el,constrain:b,constrainTo:b.el.getScopeParent()};Ext.Component.prototype.initDraggable.call(b)},ghost:undefined,unghost:undefined});Ext.define("Ext.tip.ToolTip",{extend:"Ext.tip.Tip",alias:"widget.tooltip",alternateClassName:"Ext.ToolTip",autoHide:true,showDelay:500,hideDelay:200,dismissDelay:5000,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,quickShowInterval:250,initComponent:function(){var b=this;b.callParent(arguments);b.lastActive=new Date();b.setTarget(b.target);b.origAnchor=b.anchor},onRender:function(d,e){var f=this;f.callParent(arguments);f.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+f.getAnchorPosition();f.anchorEl=f.el.createChild({cls:Ext.baseCSSPrefix+"tip-anchor "+f.anchorCls})},setTarget:function(g){var e=this,f=Ext.get(g),h;if(e.target){h=Ext.get(e.target);e.mun(h,"mouseover",e.onTargetOver,e);e.mun(h,"mouseout",e.onTargetOut,e);e.mun(h,"mousemove",e.onMouseMove,e)}e.target=f;if(f){e.mon(f,{freezeEvent:true,mouseover:e.onTargetOver,mouseout:e.onTargetOut,mousemove:e.onMouseMove,scope:e})}if(e.anchor){e.anchorTarget=e.target}},onMouseMove:function(g){var e=this,f=e.delegate?g.getTarget(e.delegate):e.triggerElement=true,h;if(f){e.targetXY=g.getXY();if(f===e.triggerElement){if(!e.hidden&&e.trackMouse){h=e.getTargetXY();if(e.constrainPosition){h=e.el.adjustForConstraints(h,e.el.getScopeParent())}e.setPagePosition(h)}}else{e.hide();e.lastActive=new Date(0);e.onTargetOver(g)}}else{if((!e.closable&&e.isVisible())&&e.autoHide!==false){e.hide()}}},getTargetXY:function(){var r=this,w,x,n,z,s,p,v,o,q,y,t,u;if(r.delegate){r.anchorTarget=r.triggerElement}if(r.anchor){r.targetCounter++;x=r.getOffsets();n=(r.anchorToTarget&&!r.trackMouse)?r.el.getAlignToXY(r.anchorTarget,r.getAnchorAlign()):r.targetXY;z=Ext.Element.getViewWidth()-5;s=Ext.Element.getViewHeight()-5;p=document.documentElement;v=document.body;o=(p.scrollLeft||v.scrollLeft||0)+5;q=(p.scrollTop||v.scrollTop||0)+5;y=[n[0]+x[0],n[1]+x[1]];t=r.getSize();u=r.constrainPosition;r.anchorEl.removeCls(r.anchorCls);if(r.targetCounter<2&&u){if(y[0]<o){if(r.anchorToTarget){r.defaultAlign="l-r";if(r.mouseOffset){r.mouseOffset[0]*=-1}}r.anchor="left";return r.getTargetXY()}if(y[0]+t.width>z){if(r.anchorToTarget){r.defaultAlign="r-l";if(r.mouseOffset){r.mouseOffset[0]*=-1}}r.anchor="right";return r.getTargetXY()}if(y[1]<q){if(r.anchorToTarget){r.defaultAlign="t-b";if(r.mouseOffset){r.mouseOffset[1]*=-1}}r.anchor="top";return r.getTargetXY()}if(y[1]+t.height>s){if(r.anchorToTarget){r.defaultAlign="b-t";if(r.mouseOffset){r.mouseOffset[1]*=-1}}r.anchor="bottom";return r.getTargetXY()}}r.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+r.getAnchorPosition();r.anchorEl.addCls(r.anchorCls);r.targetCounter=0;return y}else{w=r.getMouseOffset();return(r.targetXY)?[r.targetXY[0]+w[0],r.targetXY[1]+w[1]]:w}},getMouseOffset:function(){var d=this,c=d.anchor?[0,0]:[15,18];if(d.mouseOffset){c[0]+=d.mouseOffset[0];c[1]+=d.mouseOffset[1]}return c},getAnchorPosition:function(){var c=this,d;if(c.anchor){c.tipAnchor=c.anchor.charAt(0)}else{d=c.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!d){Ext.Error.raise('The AnchorTip.defaultAlign value "'+c.defaultAlign+'" is invalid.')}c.tipAnchor=d[1].charAt(0)}switch(c.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var h=this,g,e,f=h.getAnchorPosition().charAt(0);if(h.anchorToTarget&&!h.trackMouse){switch(f){case"t":e=[0,9];break;case"b":e=[0,-13];break;case"r":e=[-13,0];break;default:e=[9,0];break}}else{switch(f){case"t":e=[-15-h.anchorOffset,30];break;case"b":e=[-19-h.anchorOffset,-13-h.el.dom.offsetHeight];break;case"r":e=[-15-h.el.dom.offsetWidth,-13-h.anchorOffset];break;default:e=[25,-13-h.anchorOffset];break}}g=h.getMouseOffset();e[0]+=g[0];e[1]+=g[1];return e},onTargetOver:function(f){var d=this,e;if(d.disabled||f.within(d.target.dom,true)){return}e=f.getTarget(d.delegate);if(e){d.triggerElement=e;d.clearTimer("hide");d.targetXY=f.getXY();d.delayShow()}},delayShow:function(){var b=this;if(b.hidden&&!b.showTimer){if(Ext.Date.getElapsed(b.lastActive)<b.quickShowInterval){b.show()}else{b.showTimer=Ext.defer(b.show,b.showDelay,b)}}else{if(!b.hidden&&b.autoHide!==false){b.show()}}},onTargetOut:function(c){var d=this;if(d.disabled||c.within(d.target.dom,true)){return}d.clearTimer("show");if(d.autoHide!==false){d.delayHide()}},delayHide:function(){var b=this;if(!b.hidden&&!b.hideTimer){b.hideTimer=Ext.defer(b.hide,b.hideDelay,b)}},hide:function(){var b=this;b.clearTimer("dismiss");b.lastActive=new Date();if(b.anchorEl){b.anchorEl.hide()}b.callParent(arguments);delete b.triggerElement},show:function(){var b=this;this.callParent();if(this.hidden===false){b.setPagePosition(-10000,-10000);if(b.anchor){b.anchor=b.origAnchor}if(!b.calledFromShowAt){b.showAt(b.getTargetXY())}if(b.anchor){b.syncAnchor();b.anchorEl.show()}else{b.anchorEl.hide()}}},showAt:function(c){var d=this;d.lastActive=new Date();d.clearTimers();d.calledFromShowAt=true;if(!d.isVisible()){this.callParent(arguments)}if(d.isVisible()){d.setPagePosition(c[0],c[1]);if(d.constrainPosition||d.constrain){d.doConstrain()}d.toFront(true);d.el.sync(true);if(d.dismissDelay&&d.autoHide!==false){d.dismissTimer=Ext.defer(d.hide,d.dismissDelay,d)}if(d.anchor){d.syncAnchor();if(!d.anchorEl.isVisible()){d.anchorEl.show()}}else{d.anchorEl.hide()}}delete d.calledFromShowAt},syncAnchor:function(){var h=this,f,e,g;switch(h.tipAnchor.charAt(0)){case"t":f="b";e="tl";g=[20+h.anchorOffset,1];break;case"r":f="l";e="tr";g=[-1,12+h.anchorOffset];break;case"b":f="t";e="bl";g=[20+h.anchorOffset,-1];break;default:f="r";e="tl";g=[1,12+h.anchorOffset];break}h.anchorEl.alignTo(h.el,f+"-"+e,g);h.anchorEl.setStyle("z-index",parseInt(h.el.getZIndex(),10)||0+1).setVisibilityMode(Ext.Element.DISPLAY)},setPagePosition:function(e,f){var d=this;d.callParent(arguments);if(d.anchor){d.syncAnchor()}},clearTimer:function(b){b=b+"Timer";clearTimeout(this[b]);delete this[b]},clearTimers:function(){var b=this;b.clearTimer("show");b.clearTimer("dismiss");b.clearTimer("hide")},onShow:function(){var b=this;b.callParent();b.mon(Ext.getDoc(),"mousedown",b.onDocMouseDown,b)},onHide:function(){var b=this;b.callParent();b.mun(Ext.getDoc(),"mousedown",b.onDocMouseDown,b)},onDocMouseDown:function(c){var d=this;if(!d.closable&&!c.within(d.el.dom)){d.disable();Ext.defer(d.doEnable,100,d)}},doEnable:function(){if(!this.isDestroyed){this.enable()}},onDisable:function(){this.callParent();this.clearTimers();this.hide()},beforeDestroy:function(){var b=this;b.clearTimers();Ext.destroy(b.anchorEl);delete b.anchorEl;delete b.target;delete b.anchorTarget;delete b.triggerElement;b.callParent()},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this);this.callParent()}});Ext.define("Ext.tip.QuickTip",{extend:"Ext.tip.ToolTip",alias:"widget.quicktip",alternateClassName:"Ext.QuickTip",interceptTitles:false,title:" ",tagConfig:{namespace:"data-",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign",anchor:"anchor"},initComponent:function(){var b=this;b.target=b.target||Ext.getDoc();b.targets=b.targets||{};b.callParent()},register:function(n){var j=Ext.isArray(n)?n:arguments,m=0,i=j.length,k,h,l;for(;m<i;m++){n=j[m];k=n.target;if(k){if(Ext.isArray(k)){for(h=0,l=k.length;h<l;h++){this.targets[Ext.id(k[h])]=n}}else{this.targets[Ext.id(k)]=n}}}},unregister:function(b){delete this.targets[Ext.id(b)]},cancelShow:function(e){var d=this,f=d.activeTarget;e=Ext.get(e).dom;if(d.isVisible()){if(f&&f.el==e){d.hide()}}else{if(f&&f.el==e){d.clearTimer("show")}}},getTipCfg:function(g){var h=g.getTarget(),e=h.title,f;if(this.interceptTitles&&e&&Ext.isString(e)){h.qtip=e;h.removeAttribute("title");g.preventDefault();return{text:e}}else{f=this.tagConfig;h=g.getTarget("["+f.namespace+f.attribute+"]");if(h){return{target:h,text:h.getAttribute(f.namespace+f.attribute)}}}},onTargetOver:function(v){var t=this,u=v.getTarget(t.delegate),B,y,A,w,s,z,q,x,e,r,p;if(t.disabled){return}t.targetXY=v.getXY();if(!u||u.nodeType!==1||u==document.documentElement||u==document.body){return}if(t.activeTarget&&((u==t.activeTarget.el)||Ext.fly(t.activeTarget.el).contains(u))){t.clearTimer("hide");t.show();return}if(u){x=t.targets;for(p in x){if(x.hasOwnProperty(p)){r=x[p];e=Ext.fly(r.target);if(e&&(e.dom===u||e.contains(u))){A=e.dom;break}}}if(A){t.activeTarget=t.targets[A.id];t.activeTarget.el=u;t.anchor=t.activeTarget.anchor;if(t.anchor){t.anchorTarget=u}B=Ext.isDefined(t.activeTarget.showDelay);if(B){y=t.showDelay;t.showDelay=t.activeTarget.showDelay}t.delayShow();if(B){t.showDelay=y}return}}A=Ext.fly(u,"_quicktip-target");w=t.tagConfig;s=w.namespace;z=t.getTipCfg(v);if(z){if(z.target){u=z.target;A=Ext.fly(u,"_quicktip-target")}q=A.getAttribute(s+w.hide);t.activeTarget={el:u,text:z.text,width:+A.getAttribute(s+w.width)||null,autoHide:q!="user"&&q!=="false",title:A.getAttribute(s+w.title),cls:A.getAttribute(s+w.cls),align:A.getAttribute(s+w.align)};t.anchor=A.getAttribute(s+w.anchor);if(t.anchor){t.anchorTarget=u}B=Ext.isDefined(t.activeTarget.showDelay);if(B){y=t.showDelay;t.showDelay=t.activeTarget.showDelay}t.delayShow();if(B){t.showDelay=y}}},onTargetOut:function(h){var j=this,i=j.activeTarget,g,e;if(i&&h.within(j.activeTarget.el)&&!j.getTipCfg(h)){return}j.clearTimer("show");delete j.activeTarget;if(j.autoHide!==false){g=i&&Ext.isDefined(i.hideDelay);if(g){e=j.hideDelay;j.hideDelay=i.hideDelay}j.delayHide();if(g){j.hideDelay=e}}},showAt:function(g){var e=this,h=e.activeTarget,f;if(h){if(!e.rendered){e.render(Ext.getBody());e.activeTarget=h}e.suspendLayouts();if(h.title){e.setTitle(h.title);e.header.show()}else{e.header.hide()}e.update(h.text);e.autoHide=h.autoHide;e.dismissDelay=h.dismissDelay||e.dismissDelay;f=e.lastCls;if(f){e.removeCls(f);delete e.lastCls}f=h.cls;if(f){e.addCls(f);e.lastCls=f}e.setWidth(h.width);if(e.anchor){e.constrainPosition=false}else{if(h.align){g=e.el.getAlignToXY(h.el,h.align);e.constrainPosition=false}else{e.constrainPosition=true}}e.resumeLayouts(true)}e.callParent([g])},hide:function(){delete this.activeTarget;this.callParent()}});Ext.define("Ext.tip.QuickTipManager",(function(){var c,d=false;return{requires:["Ext.tip.QuickTip"],singleton:true,alternateClassName:"Ext.QuickTips",init:function(b,i){if(!c){if(!Ext.isReady){Ext.onReady(function(){Ext.tip.QuickTipManager.init(b,i)});return}var j=Ext.apply({disabled:d,id:"ext-quicktips-tip"},i),h=j.className,a=j.xtype;if(h){delete j.className}else{if(a){h="widget."+a;delete j.xtype}}if(b!==false){j.renderTo=document.body;if(j.renderTo.tagName!="BODY"){Ext.Error.raise({sourceClass:"Ext.tip.QuickTipManager",sourceMethod:"init",msg:"Cannot init QuickTipManager: no document body"})}}c=Ext.create(h||"Ext.tip.QuickTip",j)}},destroy:function(){if(c){var a;c.destroy();c=a}},ddDisable:function(){if(c&&!d){c.disable()}},ddEnable:function(){if(c&&!d){c.enable()}},enable:function(){if(c){c.enable()}d=false},disable:function(){if(c){c.disable()}d=true},isEnabled:function(){return c!==undefined&&!c.disabled},getQuickTip:function(){return c},register:function(){c.register.apply(c,arguments)},unregister:function(){c.unregister.apply(c,arguments)},tips:function(){c.register.apply(c,arguments)}}}()));Ext.define("Ext.app.Application",{extend:"Ext.app.Controller",requires:["Ext.ModelManager","Ext.data.Model","Ext.data.StoreManager","Ext.tip.QuickTipManager","Ext.ComponentManager","Ext.app.EventBus"],scope:undefined,enableQuickTips:true,appFolder:"app",autoCreateViewport:false,constructor:function(q){q=q||{};Ext.apply(this,q);var i=q.requires||[],r,n,p,o,l,k,m;Ext.Loader.setPath(this.name,this.appFolder);if(this.paths){l=this.paths;for(m in l){if(l.hasOwnProperty(m)){k=l[m];Ext.Loader.setPath(m,k)}}}this.callParent(arguments);this.eventbus=new Ext.app.EventBus;r=Ext.Array.from(this.controllers);n=r&&r.length;this.controllers=new Ext.util.MixedCollection();if(this.autoCreateViewport){i.push(this.getModuleClassName("Viewport","view"))}for(p=0;p<n;p++){i.push(this.getModuleClassName(r[p],"controller"))}Ext.require(i);Ext.onReady(function(){for(p=0;p<n;p++){o=this.getController(r[p]);o.init(this)}this.onBeforeLaunch.call(this)},this)},control:function(d,f,e){this.eventbus.control(d,f,e)},launch:Ext.emptyFn,onBeforeLaunch:function(){var c=this,i,h,j,g;if(c.enableQuickTips){Ext.tip.QuickTipManager.init()}if(c.autoCreateViewport){c.getView("Viewport").create()}c.launch.call(this.scope||this);c.launched=true;c.fireEvent("launch",this);i=c.controllers.items;j=i.length;for(h=0;h<j;h++){g=i[h];g.onLaunch(this)}},getModuleClassName:function(d,f){var e=this.name;if(Ext.isString(d)&&(Ext.Loader.getPrefix(d)===""||d===e)){d=e+"."+f+"."+d}return d},getController:function(c){var d=this.controllers.get(c);if(!d){d=Ext.create(this.getModuleClassName(c,"controller"),{application:this,id:c});this.controllers.add(d)}return d},getStore:function(c){var d=Ext.StoreManager.get(c);if(!d){d=Ext.create(this.getModuleClassName(c,"store"),{storeId:c})}return d},getModel:function(b){b=this.getModuleClassName(b,"model");return Ext.ModelManager.getModel(b)},getView:function(b){b=this.getModuleClassName(b,"view");return Ext.ClassManager.get(b)}});Ext.define("Ext.dd.DDTarget",{extend:"Ext.dd.DragDrop",constructor:function(f,e,d){if(f){this.initTarget(f,e,d)}},getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return("DDTarget "+this.id)}});Ext.define("Ext.dd.ScrollManager",{singleton:true,requires:["Ext.dd.DragDropManager"],constructor:function(){var b=Ext.dd.DragDropManager;b.fireEvents=Ext.Function.createSequence(b.fireEvents,this.onFire,this);b.stopDrag=Ext.Function.createSequence(b.stopDrag,this.onStop,this);this.doScroll=Ext.Function.bind(this.doScroll,this);this.ddmInstance=b;this.els={};this.dragEl=null;this.proc={}},onStop:function(d){var c=Ext.dd.ScrollManager;c.dragEl=null;c.clearProc()},triggerRefresh:function(){if(this.ddmInstance.dragCurrent){this.ddmInstance.refreshCache(this.ddmInstance.dragCurrent.groups)}},doScroll:function(){if(this.ddmInstance.dragCurrent){var f=this.proc,e=f.el,h=f.el.ddScrollConfig,g=h?h.increment:this.increment;if(!this.animate){if(e.scroll(f.dir,g)){this.triggerRefresh()}}else{e.scroll(f.dir,g,true,this.animDuration,this.triggerRefresh)}}},clearProc:function(){var b=this.proc;if(b.id){clearInterval(b.id)}b.id=0;b.el=null;b.dir=""},startProc:function(e,f){this.clearProc();this.proc.el=e;this.proc.dir=f;var g=e.ddScrollConfig?e.ddScrollConfig.ddGroup:undefined,h=(e.ddScrollConfig&&e.ddScrollConfig.frequency)?e.ddScrollConfig.frequency:this.frequency;if(g===undefined||this.ddmInstance.dragCurrent.ddGroup==g){this.proc.id=setInterval(this.doScroll,h)}},onFire:function(p,m){if(m||!this.ddmInstance.dragCurrent){return}if(!this.dragEl||this.dragEl!=this.ddmInstance.dragCurrent){this.dragEl=this.ddmInstance.dragCurrent;this.refreshCache()}var e=p.getXY(),c=p.getPoint(),o=this.proc,q=this.els,s,r,t,n;for(s in q){r=q[s];t=r._region;n=r.ddScrollConfig?r.ddScrollConfig:this;if(t&&t.contains(c)&&r.isScrollable()){if(t.bottom-c.y<=n.vthresh){if(o.el!=r){this.startProc(r,"down")}return}else{if(t.right-c.x<=n.hthresh){if(o.el!=r){this.startProc(r,"left")}return}else{if(c.y-t.top<=n.vthresh){if(o.el!=r){this.startProc(r,"up")}return}else{if(c.x-t.left<=n.hthresh){if(o.el!=r){this.startProc(r,"right")}return}}}}}}this.clearProc()},register:function(f){if(Ext.isArray(f)){for(var d=0,e=f.length;d<e;d++){this.register(f[d])}}else{f=Ext.get(f);this.els[f.id]=f}},unregister:function(f){if(Ext.isArray(f)){for(var d=0,e=f.length;d<e;d++){this.unregister(f[d])}}else{f=Ext.get(f);delete this.els[f.id]}},vthresh:25,hthresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,ddGroup:undefined,refreshCache:function(){var d=this.els,c;for(c in d){if(typeof d[c]=="object"){d[c]._region=d[c].getRegion()}}}});Ext.define("Ext.dd.DropTarget",{extend:"Ext.dd.DDTarget",requires:["Ext.dd.ScrollManager"],constructor:function(c,d){this.el=Ext.get(c);Ext.apply(this,d);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}this.callParent([this.el.dom,this.ddGroup||this.group,{isTarget:true}])},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",isTarget:true,isNotifyTarget:true,notifyEnter:function(e,f,d){if(this.overClass){this.el.addCls(this.overClass)}return this.dropAllowed},notifyOver:function(e,f,d){return this.dropAllowed},notifyOut:function(e,f,d){if(this.overClass){this.el.removeCls(this.overClass)}},notifyDrop:function(e,f,d){return false},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define("Ext.dd.DropZone",{extend:"Ext.dd.DropTarget",requires:["Ext.dd.Registry"],getTargetFromEvent:function(b){return Ext.dd.Registry.getTargetFromEvent(b)},onNodeEnter:function(g,f,h,e){},onNodeOver:function(g,f,h,e){return this.dropAllowed},onNodeOut:function(g,f,h,e){},onNodeDrop:function(g,f,h,e){return false},onContainerOver:function(e,f,d){return this.dropNotAllowed},onContainerDrop:function(e,f,d){return false},notifyEnter:function(e,f,d){return this.dropNotAllowed},notifyOver:function(f,h,e){var g=this.getTargetFromEvent(h);if(!g){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,f,h,e);this.lastOverNode=null}return this.onContainerOver(f,h,e)}if(this.lastOverNode!=g){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,f,h,e)}this.onNodeEnter(g,f,h,e);this.lastOverNode=g}return this.onNodeOver(g,f,h,e)},notifyOut:function(e,f,d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,e,f,d);this.lastOverNode=null}},notifyDrop:function(f,h,e){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,f,h,e);this.lastOverNode=null}var g=this.getTargetFromEvent(h);return g?this.onNodeDrop(g,f,h,e):this.onContainerDrop(f,h,e)},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)}});Ext.define("Ext.grid.header.DropZone",{extend:"Ext.dd.DropZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",proxyOffsets:[-4,-9],constructor:function(b){this.headerCt=b;this.ddGroup=this.getDDGroup();this.callParent([b.el])},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getTargetFromEvent:function(b){return b.getTarget("."+this.colHeaderCls)},getTopIndicator:function(){if(!this.topIndicator){this.topIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-top",html:" "},true)}return this.topIndicator},getBottomIndicator:function(){if(!this.bottomIndicator){this.bottomIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-bottom",html:" "},true)}return this.bottomIndicator},getLocation:function(k,e){var h=k.getXY()[0],l=Ext.fly(e).getRegion(),i,j;if((l.right-h)<=(l.right-l.left)/2){i="after"}else{i="before"}return{pos:i,header:Ext.getCmp(e.id),node:e}},positionIndicator:function(i,F,z){var R=this.getLocation(z,F),D=R.header,M=R.pos,N=i.nextSibling("gridcolumn:not([hidden])"),A=i.previousSibling("gridcolumn:not([hidden])"),O,I,C,B,Q,P,J,H,e,y,G,K,E,L;if(!D.draggable&&D.getIndex()===0){return false}this.lastLocation=R;if((i!==D)&&((M==="before"&&N!==D)||(M==="after"&&A!==D))&&!D.isDescendantOf(i)){G=Ext.dd.DragDropManager.getRelated(this);K=G.length;E=0;for(;E<K;E++){L=G[E];if(L!==this&&L.invalidateDrop){L.invalidateDrop()}}this.valid=true;I=this.getTopIndicator();C=this.getBottomIndicator();if(M==="before"){B="tl";Q="bl"}else{B="tr";Q="br"}P=D.el.getAnchorXY(B);J=D.el.getAnchorXY(Q);H=this.headerCt.el;e=H.getLeft();y=H.getRight();P[0]=Ext.Number.constrain(P[0],e,y);J[0]=Ext.Number.constrain(J[0],e,y);P[0]-=4;P[1]-=9;J[0]-=4;I.setXY(P);C.setXY(J);I.show();C.show()}else{this.invalidateDrop()}},invalidateDrop:function(){this.valid=false;this.hideIndicators()},onNodeOver:function(q,m,n,p){var l=this,o=l.headerCt,r=true,e=p.header,k;if(p.header.el.dom===q){r=false}else{k=l.getLocation(n,q).header;r=(e.ownerCt===k.ownerCt)||(!e.ownerCt.sealed&&!k.ownerCt.sealed)}if(r){l.positionIndicator(p.header,q,n)}else{l.valid=false}return l.valid?l.dropAllowed:l.dropNotAllowed},hideIndicators:function(){this.getTopIndicator().hide();this.getBottomIndicator().hide()},onNodeOut:function(){this.hideIndicators()},onNodeDrop:function(D,v,x,B){if(this.valid){this.invalidateDrop();var y=B.header,A=this.lastLocation,G=A.header,t=y.ownerCt,w=t.items.indexOf(y),z=G.ownerCt,e=z.items.indexOf(G),E=this.headerCt,H=E.getHeaderIndex(y),C=y.isGroupHeader?y.query(":not([isGroupHeader])").length:1,s=E.getHeaderIndex(G),u,F;if(A.pos==="after"){e++;s+=G.isGroupHeader?G.query(":not([isGroupHeader])").length:1}if(t!==z&&t.lockableInjected&&z.lockableInjected&&z.lockedCt){F=t.up("[scrollerOwner]");F.lock(y,e)}else{if(t!==z&&t.lockableInjected&&z.lockableInjected&&t.lockedCt){F=t.up("[scrollerOwner]");F.unlock(y,e)}else{if((t===z)&&(e>w)){e-=1}Ext.suspendLayouts();if(t!==z){t.remove(y,false);if(t.isGroupHeader){if(!t.items.getCount()){u=t.ownerCt;u.remove(t,false);t.el.dom.parentNode.removeChild(t.el.dom)}}}if(t===z){z.move(w,e)}else{z.insert(e,y)}if(z.isGroupHeader){if(z!==t){y.savedFlex=y.flex;delete y.flex;y.width=y.getWidth()}}else{if(y.savedFlex){y.flex=y.savedFlex;delete y.width}}E.purgeCache();Ext.resumeLayouts(true);E.onHeaderMoved(y,C,H,s);if(!t.items.getCount()){t.destroy()}}}}}});Ext.define("Ext.grid.plugin.HeaderReorderer",{extend:"Ext.util.Observable",requires:["Ext.grid.header.DragZone","Ext.grid.header.DropZone"],alias:"plugin.gridheaderreorderer",init:function(b){this.headerCt=b;b.on({render:this.onHeaderCtRender,single:true,scope:this})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},onHeaderCtRender:function(){var b=this;b.dragZone=new Ext.grid.header.DragZone(b.headerCt);b.dropZone=new Ext.grid.header.DropZone(b.headerCt);if(b.disabled){b.dragZone.disable()}},enable:function(){this.disabled=false;if(this.dragZone){this.dragZone.enable()}},disable:function(){this.disabled=true;if(this.dragZone){this.dragZone.disable()}}});Ext.define("Ext.grid.header.Container",{extend:"Ext.container.Container",requires:["Ext.grid.ColumnLayout","Ext.grid.plugin.HeaderResizer","Ext.grid.plugin.HeaderReorderer"],uses:["Ext.grid.column.Column","Ext.menu.Menu","Ext.menu.CheckItem","Ext.menu.Separator"],border:true,alias:"widget.headercontainer",baseCls:Ext.baseCSSPrefix+"grid-header-ct",dock:"top",weight:100,defaultType:"gridcolumn",detachOnRemove:false,defaultWidth:100,sortAscText:"Sort Ascending",sortDescText:"Sort Descending",sortClearText:"Clear Sort",columnsText:"Columns",headerOpenCls:Ext.baseCSSPrefix+"column-header-open",triStateSort:false,ddLock:false,dragging:false,sortable:true,initComponent:function(){var b=this;b.plugins=b.plugins||[];if(!b.isHeader){if(b.enableColumnResize){b.resizer=new Ext.grid.plugin.HeaderResizer();b.plugins.push(b.resizer)}if(b.enableColumnMove){b.reorderer=new Ext.grid.plugin.HeaderReorderer();b.plugins.push(b.reorderer)}}if(b.isHeader&&!b.items){b.layout=b.layout||"auto"}else{b.layout=Ext.apply({type:"gridcolumn",align:"stretchmax"},b.initialConfig.layout)}b.defaults=b.defaults||{};Ext.applyIf(b.defaults,{triStateSort:b.triStateSort,sortable:b.sortable});b.menuTask=new Ext.util.DelayedTask(b.updateMenuDisabledState,b);b.callParent();b.addEvents("columnresize","headerclick","headertriggerclick","columnmove","columnhide","columnshow","sortchange","menucreate")},onDestroy:function(){var b=this;b.menuTask.cancel();Ext.destroy(b.resizer,b.reorderer);b.callParent()},applyColumnsState:function(o){if(!o||!o.length){return}var m=this,p=0,n=o.length,k,c,i,l;for(k=0;k<n;k++){l=o[k];i=m.down("gridcolumn[headerId="+l.id+"]");if(i){c=m.items.indexOf(i);if(p!==c){m.moveHeader(c,p)}if(i.applyColumnState){i.applyColumnState(l)}++p}}},getColumnsState:function(){var d=this,e=[],f;d.items.each(function(a){f=a.getColumnState&&a.getColumnState();if(f){e.push(f)}});return e},onAdd:function(c){var d=this;if(!c.headerId){c.headerId=c.initialConfig.id||Ext.id(null,"header-")}if(Ext.global.console&&Ext.global.console.warn){if(!d._usedIDs){d._usedIDs={}}if(d._usedIDs[c.headerId]){Ext.global.console.warn(this.$className,"attempted to reuse an existing id",c.headerId)}d._usedIDs[c.headerId]=true}d.callParent(arguments);d.purgeCache()},onRemove:function(c){var d=this;d.callParent(arguments);d.purgeCache()},applyDefaults:function(c){var d;if(c&&!c.isComponent&&c.xtype=="rownumberer"){d=c}else{d=this.callParent(arguments);if(!("width" in d)&&!d.flex){d.width=this.defaultWidth}}return d},afterRender:function(){this.callParent();this.setSortState()},setSortState:function(){var f=this.up("[store]").store,h=f.sorters,g=h.first(),e;if(g){e=this.down("gridcolumn[dataIndex="+g.property+"]");if(e){e.setSortState(g.direction,false,true)}}},getHeaderMenu:function(){var c=this.getMenu(),d;if(c){d=c.child("#columnItem");if(d){return d.menu}}return null},onHeaderVisibilityChange:function(h,i){var f=this,j=f.getHeaderMenu(),g;if(j){g=f.getMenuItemForHeader(j,h);if(g){g.setChecked(i,true)}f.menuTask.delay(50)}},getLeafMenuItems:function(){var l=this,o=l.getGridColumns(),i=[],p=0,m=0,j=o.length,k=l.getMenu(),n;for(;p<j;++p){n=o[p];if(n.hideable){n=l.getMenuItemForHeader(k,n);if(n){i.push(n);if(n.checked){++m}}}}return{items:i,checkedCount:m}},updateMenuDisabledState:function(){var j=this,h=j.getLeafMenuItems(),k=h.checkedCount,m=h.items,i=m.length,l=0,n=j.getMenu().child("#columnItem");if(k<=1){j.disableMenuItems(n,Ext.ComponentQuery.query("[checked=true]",m)[0])}else{for(;l<i;++l){j.setMenuItemState(k,n,m[l])}}},disableMenuItems:function(d,c){while(c&&c!=d){c.disableCheckChange();c=c.parentMenu.ownerItem}},setMenuItemState:function(h,g,i){var j,f;while(i&&i!=g){j=i.parentMenu;f=i.parentMenu.query("[checked=true]:not([menu])").length;i.enableCheckChange();i=j.ownerItem;if(f===h){break}}this.disableMenuItems(g,i)},getMenuItemForHeader:function(d,c){return c?d.down("menucheckitem[headerId="+c.id+"]"):null},onHeaderShow:function(f){var d=this,e=d.ownerCt;d.onHeaderVisibilityChange(f,true);if(!f.isGroupHeader){if(d.view){d.view.onHeaderShow(d,f,true)}if(e){e.onHeaderShow(d,f)}}d.fireEvent("columnshow",d,f);d.updateLayout()},onHeaderHide:function(f){var d=this,e=d.ownerCt;d.onHeaderVisibilityChange(f,false);if(!f.isGroupHeader){if(d.view){d.view.ignoreTemplate=true;d.view.onHeaderHide(d,f,true);d.view.ignoreTemplate=false}if(e){e.onHeaderHide(d,f)}d.updateLayout()}d.fireEvent("columnhide",d,f)},tempLock:function(){this.ddLock=true;Ext.Function.defer(function(){this.ddLock=false},200,this)},onHeaderResize:function(j,h,k){var l=this,i=l.view,n=l.ownerCt,m;if(i&&(m=i.el)&&m.dom.firstChild){l.tempLock();i.onHeaderResize(j,h,k);if(n){n.onHeaderResize(l,j,h)}}l.fireEvent("columnresize",this,j,h)},onHeaderClick:function(f,d,e){f.fireEvent("headerclick",this,f,d,e);this.fireEvent("headerclick",this,f,d,e)},onHeaderTriggerClick:function(g,h,f){var e=this;if(g.fireEvent("headertriggerclick",e,g,h,f)!==false&&e.fireEvent("headertriggerclick",e,g,h,f)!==false){e.showMenuBy(f,g)}},showMenuBy:function(g,i){var k=this.getMenu(),j=k.down("#ascItem"),l=k.down("#descItem"),h;k.activeHeader=k.ownerCt=i;k.setFloatParent(i);i.titleEl.addCls(this.headerOpenCls);h=i.sortable?"enable":"disable";if(j){j[h]()}if(l){l[h]()}k.showBy(g)},onMenuDeactivate:function(){var b=this.getMenu();b.activeHeader.titleEl.removeCls(this.headerOpenCls)},moveHeader:function(d,c){this.tempLock();this.onHeaderMoved(this.move(d,c),d,c)},purgeCache:function(){var b=this;delete b.gridDataColumns;delete b.hideableColumns;if(b.menu){b.menu.hide();b.menu.destroy();delete b.menu}},onHeaderMoved:function(i,h,l,j){var k=this,g=k.ownerCt;if(g&&g.onHeaderMove){g.onHeaderMove(k,i,h,l,j)}k.fireEvent("columnmove",k,i,l,j)},getMenu:function(){var b=this;if(!b.menu){b.menu=new Ext.menu.Menu({hideOnParentHide:false,items:b.getMenuItems(),listeners:{deactivate:b.onMenuDeactivate,scope:b}});b.updateMenuDisabledState();b.fireEvent("menucreate",b,b.menu)}return b.menu},getMenuItems:function(){var f=this,d=[],e=f.enableColumnHide?f.getColumnMenu(f):null;if(f.sortable){d=[{itemId:"ascItem",text:f.sortAscText,cls:Ext.baseCSSPrefix+"hmenu-sort-asc",handler:f.onSortAscClick,scope:f},{itemId:"descItem",text:f.sortDescText,cls:Ext.baseCSSPrefix+"hmenu-sort-desc",handler:f.onSortDescClick,scope:f}]}if(e&&e.length){d.push("-",{itemId:"columnItem",text:f.columnsText,cls:Ext.baseCSSPrefix+"cols-icon",menu:e})}return d},onSortAscClick:function(){var c=this.getMenu(),d=c.activeHeader;d.setSortState("ASC")},onSortDescClick:function(){var c=this.getMenu(),d=c.activeHeader;d.setSortState("DESC")},getColumnMenu:function(k){var n=[],h=0,l,i=k.query(">gridcolumn[hideable]"),j=i.length,m;for(;h<j;h++){l=i[h];m=new Ext.menu.CheckItem({text:l.menuText||l.text,checked:!l.hidden,hideOnClick:false,headerId:l.id,menu:l.isGroupHeader?this.getColumnMenu(l):undefined,checkHandler:this.onColumnCheckChange,scope:this});n.push(m);l.on({destroy:Ext.Function.bind(m.destroy,m)})}return n},onColumnCheckChange:function(e,d){var f=Ext.getCmp(e.headerId);f[d?"show":"hide"]()},getColumnsForTpl:function(l){var n=[],m=this.getGridColumns(l),j=m.length,i=0,k,h;for(;i<j;i++){k=m[i];if(k.hidden||k.up("headercontainer[hidden=true]")){h=0}else{h=k.getDesiredWidth()}n.push({dataIndex:k.dataIndex,align:k.align,width:h,id:k.id,cls:k.tdCls,columnId:k.getItemId()})}return n},getColumnCount:function(){return this.getGridColumns().length},getFullWidth:function(k){var l=0,g=this.getVisibleGridColumns(k),i=g.length,h=0,j;for(;h<i;h++){j=g[h];if(j.getDesiredWidth){l+=j.getDesiredWidth()||0}else{l+=j.getWidth()}}return l},clearOtherSortStates:function(f){var h=this.getGridColumns(),g=h.length,e=0;for(;e<g;e++){if(h[e]!==f){h[e].setSortState(null,true)}}},getVisibleGridColumns:function(b){return Ext.ComponentQuery.query(":not([hidden])",this.getGridColumns(b))},getGridColumns:function(d){var f=this,e=d?null:f.gridDataColumns;if(!e){f.gridDataColumns=e=[];f.cascade(function(a){if((a!==f)&&!a.isGroupHeader){e.push(a)}})}return e},getHideableColumns:function(d){var f=this,e=d?null:f.hideableColumns;if(!e){e=f.hideableColumns=f.query("[hideable]")}return e},getHeaderIndex:function(b){if(b.isGroupHeader){b=b.down(":not([isgroupHeader])")}return Ext.Array.indexOf(this.getGridColumns(),b)},getHeaderAtIndex:function(d){var c=this.getGridColumns();return c.length?c[d]:null},getVisibleHeaderClosestToIndex:function(c){var d=this.getHeaderAtIndex(c);if(d.hidden){d=d.next(":not([hidden])")||d.next(":not([hidden])")}return d},prepareData:function(y,D,w,t,F){var u=this,z={},C=u.gridDataColumns||u.getGridColumns(),B=C.length,A=0,x,q,v,r,E,s=F.store;for(;A<B;A++){E={tdCls:"",style:""};x=C[A];q=x.id;v=x.renderer;r=y[x.dataIndex];if(typeof v=="function"){r=v.call(x.scope||u.ownerCt,r,E,w,D,A,s,t)}if(E.css){z.cssWarning=true;E.tdCls=E.css;delete E.css}if(u.markDirty){z[q+"-modified"]=w.isModified(x.dataIndex)?Ext.baseCSSPrefix+"grid-dirty-cell":""}z[q+"-tdCls"]=E.tdCls;z[q+"-tdAttr"]=E.tdAttr;z[q+"-style"]=E.style;if(typeof r==="undefined"||r===null||r===""){r=x.emptyCellText}z[q]=r}return z},expandToFit:function(c){var d=this.view;if(d){d.expandToFit(c)}}});Ext.define("Ext.grid.column.Column",{extend:"Ext.grid.header.Container",alias:"widget.gridcolumn",requires:["Ext.util.KeyNav","Ext.grid.ColumnComponentLayout","Ext.grid.ColumnLayout"],alternateClassName:"Ext.grid.Column",baseCls:Ext.baseCSSPrefix+"column-header "+Ext.baseCSSPrefix+"unselectable",hoverCls:Ext.baseCSSPrefix+"column-header-over",handleWidth:5,sortState:null,possibleSortStates:["ASC","DESC"],childEls:["titleEl","triggerEl","textEl"],renderTpl:'<div id="{id}-titleEl" class="'+Ext.baseCSSPrefix+'column-header-inner"><span id="{id}-textEl" class="'+Ext.baseCSSPrefix+'column-header-text">{text}</span><tpl if="!menuDisabled"><div id="{id}-triggerEl" class="'+Ext.baseCSSPrefix+'column-header-trigger"></div></tpl></div>{%this.renderContainer(out,values)%}',dataIndex:null,text:" ",menuText:null,emptyCellText:" ",sortable:true,resizable:true,hideable:true,menuDisabled:false,renderer:false,editRenderer:false,align:"left",draggable:true,initDraggable:Ext.emptyFn,isHeader:true,componentLayout:"columncomponent",initResizable:Ext.emptyFn,initComponent:function(){var d=this,c;if(Ext.isDefined(d.header)){d.text=d.header;delete d.header}if(!d.triStateSort){d.possibleSortStates.length=2}if(Ext.isDefined(d.columns)){d.isGroupHeader=true;if(d.dataIndex){Ext.Error.raise("Ext.grid.column.Column: Group header may not accept a dataIndex")}if((d.width&&d.width!==Ext.grid.header.Container.prototype.defaultWidth)||d.flex){Ext.Error.raise("Ext.grid.column.Column: Group header does not support setting explicit widths or flexs. The group header width is calculated by the sum of its children.")}d.items=d.columns;delete d.columns;delete d.flex;delete d.width;d.cls=(d.cls||"")+" "+Ext.baseCSSPrefix+"group-header";d.sortable=false;d.resizable=false;d.align="center"}else{d.isContainer=false;if(d.flex){d.minWidth=d.minWidth||Ext.grid.plugin.HeaderResizer.prototype.minColWidth}}d.addCls(Ext.baseCSSPrefix+"column-header-align-"+d.align);c=d.renderer;if(c){if(typeof c=="string"){d.renderer=Ext.util.Format[c]}d.hasCustomRenderer=true}else{if(d.defaultRenderer){d.scope=d;d.renderer=d.defaultRenderer}}d.callParent(arguments);d.on({element:"el",click:d.onElClick,dblclick:d.onElDblClick,scope:d});d.on({element:"titleEl",mouseenter:d.onTitleMouseOver,mouseleave:d.onTitleMouseOut,scope:d})},onAdd:function(b){b.isSubHeader=true;b.addCls(Ext.baseCSSPrefix+"group-sub-header");this.callParent(arguments)},onRemove:function(b){b.isSubHeader=false;b.removeCls(Ext.baseCSSPrefix+"group-sub-header");this.callParent(arguments)},initRenderData:function(){var b=this;return Ext.applyIf(b.callParent(arguments),{text:b.text,menuDisabled:b.menuDisabled})},applyColumnState:function(d){var e=this,f=Ext.isDefined;e.applyColumnsState(d.columns);if(f(d.hidden)){e.hidden=d.hidden}if(f(d.locked)){e.locked=d.locked}if(f(d.sortable)){e.sortable=d.sortable}if(f(d.width)){delete e.flex;e.width=d.width}else{if(f(d.flex)){delete e.width;e.flex=d.flex}}},getColumnState:function(){var j=this,g=j.items.items,h=g?g.length:0,k,l=[],i={id:j.stateId||j.headerId};j.savePropsToState(["hidden","sortable","locked","flex","width"],i);if(j.isGroupHeader){for(k=0;k<h;k++){l.push(g[k].getColumnState())}if(l.length){i.columns=l}}else{if(j.isSubHeader&&j.ownerCt.hidden){delete j.hidden}}if("width" in i){delete i.flex}return i},setText:function(b){this.text=b;if(this.rendered){this.textEl.update(b)}},getOwnerHeaderCt:function(){return this.up(":not([isHeader])")},getIndex:function(){return this.isGroupColumn?false:this.getOwnerHeaderCt().getHeaderIndex(this)},getVisibleIndex:function(){return this.isGroupColumn?false:Ext.Array.indexOf(this.getOwnerHeaderCt().getVisibleGridColumns(),this)},beforeRender:function(){var c=this,d=c.up("tablepanel");c.callParent();if(d&&(!c.sortable||d.sortableColumns===false)&&!c.groupable&&!c.lockable&&(d.enableColumnHide===false||!c.getOwnerHeaderCt().getHideableColumns().length)){c.menuDisabled=true}},afterRender:function(){var c=this,d=c.el;c.callParent(arguments);if(c.overCls){d.addClsOnOver(c.overCls)}if(!Ext.isIE8||!Ext.isStrict){c.mon(c.getFocusEl(),{focus:c.onTitleMouseOver,blur:c.onTitleMouseOut,scope:c})}c.keyNav=new Ext.util.KeyNav(d,{enter:c.onEnterKey,down:c.onDownKey,scope:c})},afterComponentLayout:function(k,h,l,i){var j=this,g=j.getOwnerHeaderCt();j.callParent(arguments);if(g&&(l!=null||j.flex)&&k!==l){g.onHeaderResize(j,k,true)}delete j.oldWidth},setPadding:function(i){var l=this,m=parseInt(l.textEl.getStyle("line-height"),10),j=l.textEl.dom.offsetHeight,h=l.titleEl,k=i-l.el.getBorderWidth("tb"),n;if(!l.isGroupHeader){if(h.getHeight()<k){h.setHeight(k);l.ownerCt.layout.innerCt.setHeight(i)}}n=h.getViewSize().height;if(j){if(m){j=Math.ceil(j/m)*m}h.setStyle({paddingTop:Math.floor(Math.max(((n-j)/2),0))+"px"})}if(Ext.isIE&&l.triggerEl){l.triggerEl.setHeight(n)}},onDestroy:function(){var b=this;Ext.destroy(b.textEl,b.keyNav);delete b.keyNav;b.callParent(arguments)},onTitleMouseOver:function(){this.titleEl.addCls(this.hoverCls)},onTitleMouseOut:function(){this.titleEl.removeCls(this.hoverCls)},onDownKey:function(b){if(this.triggerEl){this.onElClick(b,this.triggerEl.dom||this.el.dom)}},onEnterKey:function(b){this.onElClick(b,this.el.dom)},onElDblClick:function(g,f){var h=this,e=h.ownerCt;if(e&&Ext.Array.indexOf(e.items,h)!==0&&h.isOnLeftEdge(g)){e.expandToFit(h.previousSibling("gridcolumn"))}},onElClick:function(g,e){var h=this,f=h.getOwnerHeaderCt();if(f&&!f.ddLock){if(h.triggerEl&&(g.target===h.triggerEl.dom||e===h.triggerEl.dom||g.within(h.triggerEl))){f.onHeaderTriggerClick(h,g,e)}else{if(g.getKey()||(!h.isOnLeftEdge(g)&&!h.isOnRightEdge(g))){h.toggleSortState();f.onHeaderClick(h,g,e)}}}},processEvent:function(j,e,h,l,k,i){return this.fireEvent.apply(this,arguments)},toggleSortState:function(){var d=this,e,f;if(d.sortable){e=Ext.Array.indexOf(d.possibleSortStates,d.sortState);f=(e+1)%d.possibleSortStates.length;d.setSortState(d.possibleSortStates[f])}},doSort:function(c){var d=this.up("tablepanel").store;d.sort({property:this.getSortParam(),direction:c})},getSortParam:function(){return this.dataIndex},setSortState:function(t,k,o){var n=this,m=Ext.baseCSSPrefix+"column-header-sort-",l=m+"ASC",r=m+"DESC",s=m+"null",p=n.getOwnerHeaderCt(),q=n.sortState;if(q!==t&&n.getSortParam()){n.addCls(m+t);if(t&&!o){n.doSort(t)}switch(t){case"DESC":n.removeCls([l,s]);break;case"ASC":n.removeCls([r,s]);break;case null:n.removeCls([l,r]);break}if(p&&!n.triStateSort&&!k){p.clearOtherSortStates(n)}n.sortState=t;if(n.triStateSort||t!=null){p.fireEvent("sortchange",p,n,t)}}},hide:function(p){var k=this,n=k.getOwnerHeaderCt(),q=k.ownerCt,r=q.isGroupHeader,i,l,m,o;if(r&&!p){l=q.query(">:not([hidden])");if(l.length===1&&l[0]==k){k.ownerCt.hide();return}}Ext.suspendLayouts();if(k.isGroupHeader){l=k.items.items;for(o=0,m=l.length;o<m;o++){i=l[o];if(!i.hidden){i.hide(true)}}}k.callParent();n.onHeaderHide(k);Ext.resumeLayouts(true)},show:function(o,i){var k=this,m=k.ownerCt,p,j,n,l;Ext.suspendLayouts();if(k.isSubHeader&&m.hidden){m.show(false,true)}k.callParent(arguments);if(k.isGroupHeader&&i!==true&&!k.query(":not([hidden])").length){p=k.query(">*");for(n=0,j=p.length;n<j;n++){l=p[n];if(l.hidden){l.show(true)}}}Ext.resumeLayouts(true);m=k.getOwnerHeaderCt();if(m){m.onHeaderShow(k)}},getDesiredWidth:function(){var b=this;if(b.rendered&&b.componentLayout&&b.componentLayout.lastComponentSize){return b.componentLayout.lastComponentSize.width}else{if(b.flex){return b.width}else{return b.width}}},getCellSelector:function(){return"."+Ext.baseCSSPrefix+"grid-cell-"+this.getItemId()},getCellInnerSelector:function(){return this.getCellSelector()+" ."+Ext.baseCSSPrefix+"grid-cell-inner"},isOnLeftEdge:function(b){return(b.getXY()[0]-this.el.getLeft()<=this.handleWidth)},isOnRightEdge:function(b){return(this.el.getRight()-b.getXY()[0]<=this.handleWidth)}});Ext.define("Ext.grid.column.Action",{extend:"Ext.grid.column.Column",alias:["widget.actioncolumn"],alternateClassName:"Ext.grid.ActionColumn",actionIdRe:new RegExp(Ext.baseCSSPrefix+"action-col-(\\d+)"),altText:"",menuText:"<i>Actions</i>",sortable:false,constructor:function(h){var g=this,f=Ext.apply({},h),e=f.items||[g];g.origRenderer=f.renderer||g.renderer;g.origScope=f.scope||g.scope;delete g.renderer;delete g.scope;delete f.renderer;delete f.scope;delete f.items;g.callParent([f]);g.items=e;if(g.origRenderer){g.hasCustomRenderer=true}},defaultRenderer:function(m,k){var n=this,q=Ext.baseCSSPrefix,i=n.origScope||n,o=n.items,p=o.length,r=0,l;m=Ext.isFunction(n.origRenderer)?n.origRenderer.apply(i,arguments)||"":"";k.tdCls+=" "+Ext.baseCSSPrefix+"action-col-cell";for(;r<p;r++){l=o[r];if(!l.hasActionConfiguration){l.stopSelection=n.stopSelection;l.disable=Ext.Function.bind(n.disableAction,n,[r],0);l.enable=Ext.Function.bind(n.enableAction,n,[r],0);l.hasActionConfiguration=true}m+='<img alt="'+(l.altText||n.altText)+'" src="'+(l.icon||Ext.BLANK_IMAGE_URL)+'" class="'+q+"action-col-icon "+q+"action-col-"+String(r)+" "+(l.disabled?q+"item-disabled":" ")+" "+(Ext.isFunction(l.getClass)?l.getClass.apply(l.scope||i,arguments):(l.iconCls||n.iconCls||""))+'"'+((l.tooltip)?' data-qtip="'+l.tooltip+'"':"")+" />"}return m},enableAction:function(d,e){var f=this;if(!d){d=0}else{if(!Ext.isNumber(d)){d=Ext.Array.indexOf(f.items,d)}}f.items[d].disabled=false;f.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+d).removeCls(f.disabledCls);if(!e){f.fireEvent("enable",f)}},disableAction:function(d,e){var f=this;if(!d){d=0}else{if(!Ext.isNumber(d)){d=Ext.Array.indexOf(f.items,d)}}f.items[d].disabled=true;f.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+d).addCls(f.disabledCls);if(!e){f.fireEvent("disable",f)}},destroy:function(){delete this.items;delete this.renderer;return this.callParent(arguments)},processEvent:function(v,s,q,B,u,x,z,e){var w=this,y=x.getTarget(),A,p,t,r=v=="keydown"&&x.getKey();if(r&&!Ext.fly(y).findParent(s.cellSelector)){y=Ext.fly(q).down("."+Ext.baseCSSPrefix+"action-col-icon",true)}if(y&&(A=y.className.match(w.actionIdRe))){p=w.items[parseInt(A[1],10)];if(p){if(v=="click"||(r==x.ENTER||r==x.SPACE)){t=p.handler||w.handler;if(t&&!p.disabled){t.call(p.scope||w.scope||w,s,B,u,p,x,z,e)}}else{if(v=="mousedown"&&p.stopSelection!==false){return false}}}}return w.callParent(arguments)},cascade:function(c,d){c.call(d||this,this)},getRefItems:function(){return[]}});Ext.define("Ext.tree.Column",{extend:"Ext.grid.column.Column",alias:"widget.treecolumn",tdCls:Ext.baseCSSPrefix+"grid-cell-treecolumn",initComponent:function(){var d=this.renderer||this.defaultRenderer,c=this.scope||window;this.renderer=function(C,A,J,K,D,H,E){var w=[],y=Ext.String.format,b=J.getDepth(),x=Ext.baseCSSPrefix+"tree-",I=x+"elbow-",B=x+"expander",F='<img src="{1}" class="{0}" />',a='<input type="button" role="checkbox" class="{0}" {1} />',G=d.apply(c,arguments),z=J.get("href"),v=J.get("hrefTarget"),L=J.get("cls");while(J){if(!J.isRoot()||(J.isRoot()&&E.rootVisible)){if(J.getDepth()===b){w.unshift(y(F,x+"icon "+x+"icon"+(J.get("icon")?"-inline ":(J.isLeaf()?"-leaf ":"-parent "))+(J.get("iconCls")||""),J.get("icon")||Ext.BLANK_IMAGE_URL));if(J.get("checked")!==null){w.unshift(y(a,(x+"checkbox")+(J.get("checked")?" "+x+"checkbox-checked":""),J.get("checked")?'aria-checked="true"':""));if(J.get("checked")){A.tdCls+=(" "+x+"checked")}}if(J.isLast()){if(J.isExpandable()){w.unshift(y(F,(I+"end-plus "+B),Ext.BLANK_IMAGE_URL))}else{w.unshift(y(F,(I+"end"),Ext.BLANK_IMAGE_URL))}}else{if(J.isExpandable()){w.unshift(y(F,(I+"plus "+B),Ext.BLANK_IMAGE_URL))}else{w.unshift(y(F,(x+"elbow"),Ext.BLANK_IMAGE_URL))}}}else{if(J.isLast()||J.getDepth()===0){w.unshift(y(F,(I+"empty"),Ext.BLANK_IMAGE_URL))}else{if(J.getDepth()!==0){w.unshift(y(F,(I+"line"),Ext.BLANK_IMAGE_URL))}}}}J=J.parentNode}if(z){w.push('<a href="',z,'" target="',v,'">',G,"</a>")}else{w.push(G)}if(L){A.tdCls+=" "+L}return w.join("")};this.callParent(arguments)},defaultRenderer:function(b){return b}});Ext.define("Ext.tree.Panel",{extend:"Ext.panel.Table",alias:"widget.treepanel",alternateClassName:["Ext.tree.TreePanel","Ext.TreePanel"],requires:["Ext.tree.View","Ext.selection.TreeModel","Ext.tree.Column","Ext.data.TreeStore"],viewType:"treeview",selType:"treemodel",treeCls:Ext.baseCSSPrefix+"tree-panel",deferRowRender:false,rowLines:false,lines:true,useArrows:false,singleExpand:false,ddConfig:{enableDrag:true,enableDrop:true},rootVisible:true,displayField:"text",root:null,normalCfgCopy:["displayField","root","singleExpand","useArrows","lines","rootVisible","scroll"],lockedCfgCopy:["displayField","root","singleExpand","useArrows","lines","rootVisible"],isTree:true,constructor:function(b){b=b||{};if(b.animate===undefined){b.animate=Ext.isDefined(this.animate)?this.animate:Ext.enableFx}this.enableAnimations=b.animate;delete b.animate;this.callParent([b])},initComponent:function(){var f=this,d=[f.treeCls],e;if(f.useArrows){d.push(Ext.baseCSSPrefix+"tree-arrows");f.lines=false}if(f.lines){d.push(Ext.baseCSSPrefix+"tree-lines")}else{if(!f.useArrows){d.push(Ext.baseCSSPrefix+"tree-no-lines")}}if(Ext.isString(f.store)){f.store=Ext.StoreMgr.lookup(f.store)}else{if(!f.store||Ext.isObject(f.store)&&!f.store.isStore){f.store=new Ext.data.TreeStore(Ext.apply({},f.store||{},{root:f.root,fields:f.fields,model:f.model,folderSort:f.folderSort}))}else{if(f.root){f.store=Ext.data.StoreManager.lookup(f.store);f.store.setRootNode(f.root);if(f.folderSort!==undefined){f.store.folderSort=f.folderSort;f.store.sort()}}}}f.viewConfig=Ext.apply({},f.viewConfig);f.viewConfig=Ext.applyIf(f.viewConfig,{rootVisible:f.rootVisible,animate:f.enableAnimations,singleExpand:f.singleExpand,node:f.store.getRootNode(),hideHeaders:f.hideHeaders});f.mon(f.store,{scope:f,rootchange:f.onRootChange,clear:f.onClear});f.relayEvents(f.store,["beforeload","load"]);f.store.on({append:f.createRelayer("itemappend"),remove:f.createRelayer("itemremove"),move:f.createRelayer("itemmove",[0,4]),insert:f.createRelayer("iteminsert"),beforeappend:f.createRelayer("beforeitemappend"),beforeremove:f.createRelayer("beforeitemremove"),beforemove:f.createRelayer("beforeitemmove"),beforeinsert:f.createRelayer("beforeiteminsert"),expand:f.createRelayer("itemexpand",[0,1]),collapse:f.createRelayer("itemcollapse",[0,1]),beforeexpand:f.createRelayer("beforeitemexpand",[0,1]),beforecollapse:f.createRelayer("beforeitemcollapse",[0,1])});if(!f.columns){if(f.initialConfig.hideHeaders===undefined){f.hideHeaders=true}f.addCls(Ext.baseCSSPrefix+"autowidth-table");f.columns=[{xtype:"treecolumn",text:"Name",width:Ext.isIE6?null:10000,dataIndex:f.displayField}]}if(f.cls){d.push(f.cls)}f.cls=d.join(" ");f.callParent();e=f.getView();f.relayEvents(e,["checkchange","afteritemexpand","afteritemcollapse"]);if(!e.rootVisible&&!f.getRootNode()){f.setRootNode({expanded:true})}},onClear:function(){this.view.onClear()},setRootNode:function(){return this.store.setRootNode.apply(this.store,arguments)},getRootNode:function(){return this.store.getRootNode()},onRootChange:function(b){this.view.setRootNode(b)},getChecked:function(){return this.getView().getChecked()},isItemChecked:function(b){return b.get("checked")},expandAll:function(h,i){var f=this.getRootNode(),j=this.enableAnimations,g=this.getView();if(f){if(!j){g.beginBulkUpdate()}f.expand(true,h,i);if(!j){g.endBulkUpdate()}}},collapseAll:function(h,i){var f=this.getRootNode(),j=this.enableAnimations,g=this.getView();if(f){if(!j){g.beginBulkUpdate()}if(g.rootVisible){f.collapse(true,h,i)}else{f.collapseChildren(true,h,i)}if(!j){g.endBulkUpdate()}}},expandPath:function(l,q,v,p,m){var s=this,t=s.getRootNode(),u=1,r=s.getView(),n,o;q=q||s.getRootNode().idProperty;v=v||"/";if(Ext.isEmpty(l)){Ext.callback(p,m||s,[false,null]);return}n=l.split(v);if(t.get(q)!=n[1]){Ext.callback(p,m||s,[false,t]);return}o=function(){if(++u===n.length){Ext.callback(p,m||s,[true,t]);return}var a=t.findChild(q,n[u]);if(!a){Ext.callback(p,m||s,[false,t]);return}t=a;t.expand(false,o)};t.expand(false,o)},selectPath:function(l,m,n,k,j){var o=this,p,i;m=m||o.getRootNode().idProperty;n=n||"/";p=l.split(n);i=p.pop();o.expandPath(p.join(n),m,n,function(a,b){var c=false;if(a&&b){b=b.findChild(m,i);if(b){o.getSelectionModel().select(b);Ext.callback(k,j||o,[true,b]);c=true}}else{if(b===o.getRootNode()){c=true}}Ext.callback(k,j||o,[c,b])},o)}});Ext.define("Docs.view.DocTree",{extend:"Ext.tree.Panel",alias:"widget.doctree",cls:"doc-tree iScroll",useArrows:true,rootVisible:false,border:false,bodyBorder:false,initComponent:function(){this.addEvents("urlclick");this.root.expanded=true;this.on("itemclick",this.onItemClick,this);this.on("beforeitemcollapse",this.handleBeforeExpandCollapse,this);this.on("beforeitemexpand",this.handleBeforeExpandCollapse,this);this.callParent();this.nodeTpl=new Ext.XTemplate('<a href="{url}" rel="{url}">{text}</a>');this.initNodeLinks()},initNodeLinks:function(){this.getRootNode().cascadeBy(this.applyNodeTpl,this)},applyNodeTpl:function(b){if(b.get("leaf")){b.set("text",this.nodeTpl.apply({text:b.get("text"),url:b.raw.url}));b.commit()}},onItemClick:function(h,j,k,l,i){var e=j.raw?j.raw.url:j.data.url;if(e){this.fireEvent("urlclick",e,i)}else{if(!j.isLeaf()){if(j.isExpanded()){j.collapse(false)}else{j.expand(false)}}}},selectUrl:function(d){var c=this.findNodeByUrl(d);if(c){c.bubble(function(a){a.expand()});this.getSelectionModel().select(c)}else{this.getSelectionModel().deselectAll()}},findNodeByUrl:function(b){return this.getRootNode().findChildBy(function(a){return b===a.raw.url},this,true)},findRecordByUrl:function(d){var c=this.findNodeByUrl(d);return c?c.raw:undefined},handleBeforeExpandCollapse:function(b){if(this.getView().isAnimating(b)){return false}}});Ext.define("Docs.view.GroupTree",{extend:"Docs.view.DocTree",alias:"widget.grouptree",initComponent:function(){this.root={children:[],text:"Root"};Ext.Array.each(this.data,function(b){this.root.children.push({text:b.title,expanded:true,children:Ext.Array.map(b.items,this.convert),iconCls:"icon-pkg"})},this);this.callParent()}});Ext.define("Docs.model.Stats",{extend:"Ext.data.Model",fields:["name","local_cfgs","local_properties","local_methods","local_events","local_members","total_cfgs","total_properties","total_methods","total_events","total_members","fanIn","fanOut","class_wc","members_wc","wc_per_member"]});Ext.define("Docs.view.stats.Index",{extend:"Ext.container.Container",alias:"widget.statsindex",requires:["Ext.grid.Panel","Docs.model.Stats"],mixins:["Docs.view.Scrolling"],layout:"fit",initComponent:function(){var b=Ext.create("Ext.data.Store",{model:"Docs.model.Stats",data:Docs.data.stats,sorters:"name"});this.items=[{xtype:"grid",store:b,title:"Statistics",columns:[{text:"Name",width:200,dataIndex:"name"},{text:"Configs",width:50,align:"right",dataIndex:"local_cfgs"},{text:"Props",width:50,align:"right",dataIndex:"local_properties"},{text:"Methods",width:50,align:"right",dataIndex:"local_methods"},{text:"Events",width:50,align:"right",dataIndex:"local_events"},{text:"Members",width:50,align:"right",dataIndex:"local_members",renderer:function(a){return"<b>"+a+"</b>"}},{text:"All Configs",width:50,align:"right",dataIndex:"total_cfgs"},{text:"All Props",width:50,align:"right",dataIndex:"total_properties"},{text:"All Methods",width:50,align:"right",dataIndex:"total_methods"},{text:"All Events",width:50,align:"right",dataIndex:"total_events"},{text:"All Members",width:50,align:"right",dataIndex:"total_members",renderer:function(a){return"<b>"+a+"</b>"}},{text:"Fan-in",width:50,align:"right",dataIndex:"fanIn"},{text:"Fan-out",width:50,align:"right",dataIndex:"fanOut"},{text:"Class word-count",width:50,align:"right",dataIndex:"class_wc"},{text:"Members word-count",width:50,align:"right",dataIndex:"members_wc"},{text:"wc / member",width:50,align:"right",dataIndex:"wc_per_member"}]}];this.callParent(arguments)},getTab:function(){var b=(Docs.data.stats||[]).length>0;return b?{cls:"stats",href:"#!/stats",tooltip:"Statistics",text:"Stats"}:false}});Ext.define("Docs.model.Test",{extend:"Ext.data.Model",fields:["id","name","href","code","options",{name:"status",defaultValue:"ready"},"message"]});Ext.define("Docs.view.tests.Index",{extend:"Ext.container.Container",requires:["Docs.model.Test","Docs.view.tests.BatchRunner"],mixins:["Docs.view.Scrolling"],alias:"widget.testsindex",layout:{type:"vbox",align:"stretch",shrinkToFit:true},padding:10,initComponent:function(){this.store=Ext.create("Ext.data.Store",{model:"Docs.model.Test",data:[]});this.grid=Ext.create("Ext.grid.Panel",{itemId:"testsgrid",padding:"5 0 5 0",autoScroll:true,flex:1,store:this.store,selModel:{mode:"MULTI"},columns:[{xtype:"templatecolumn",text:"Name",width:300,tpl:'<a href="{href}">{name}</a>'},{xtype:"templatecolumn",text:"Status",width:80,tpl:'<span class="doc-test-{status}">{status}</span>'},{text:"Message",flex:1,dataIndex:"message"}],listeners:{itemdblclick:function(c,d){this.batchRunner.run([d])},scope:this}});this.batchRunner=Ext.create("Docs.view.tests.BatchRunner",{height:0,listeners:{start:this.disable,finish:this.enable,statuschange:this.updateTestStatus,scope:this}});this.items=[{html:"<h1>Inline examples test page</h1>",height:30},{itemId:"testcontainer",layout:{type:"vbox",align:"stretch",shrinkToFit:true},flex:1,items:[{itemId:"testcontrols",layout:"hbox",items:[{html:"<b>Double-click</b> to run an example, or",margin:"5 5 5 0"},{xtype:"button",itemId:"run-selected-button",text:"Run Selected",margin:5,handler:function(){this.batchRunner.run(this.grid.getSelectionModel().getSelection())},scope:this},{html:"or",margin:5},{xtype:"button",itemId:"run-all-button",text:"Run All Examples",margin:5,handler:function(){this.batchRunner.run(this.store.getRange())},scope:this},{itemId:"testStatus",margin:"5 5 5 15"}]},this.grid]},this.batchRunner];this.callParent(arguments)},getTab:function(){return Docs.data.tests?{cls:"tests",href:"#!/tests",tooltip:"Tests",text:"Tests"}:false},addExamples:function(b){this.store.add(b);this.setStatus(true,this.store.getCount()+" examples loaded.")},updateTestStatus:function(d){var c=d.pass+d.fail;this.setStatus(d.fail===0,c+"/"+d.total+" examples tested, "+d.fail+" failures")},setStatus:function(d,f){var e=d?"doc-test-success":"doc-test-failure";this.down("#testStatus").update('<span class="'+e+'">'+f+"</span>")}});Ext.define("Ext.data.SequentialIdGenerator",{extend:"Ext.data.IdGenerator",alias:"idgen.sequential",constructor:function(){var b=this;b.callParent(arguments);b.parts=[b.prefix,""]},prefix:"",seed:1,generate:function(){var d=this,c=d.parts;c[1]=d.seed++;return c.join("")}});Ext.define("Ext.data.proxy.WebStorage",{extend:"Ext.data.proxy.Client",alternateClassName:"Ext.data.WebStorageProxy",requires:["Ext.data.SequentialIdGenerator"],id:undefined,constructor:function(b){this.callParent(arguments);this.cache={};if(this.getStorageObject()===undefined){Ext.Error.raise("Local Storage is not supported in this browser, please use another type of data proxy")}this.id=this.id||(this.store?this.store.storeId:undefined);if(this.id===undefined){Ext.Error.raise("No unique id was provided to the local storage proxy. See Ext.data.proxy.LocalStorage documentation for details")}this.initialize()},create:function(p,l,i){var m=this,q=p.records,r=q.length,t=m.getIds(),s,n,o;p.setStarted();if(m.isHierarchical===undefined){m.isHierarchical=!!q[0].isNode;if(m.isHierarchical){m.getStorageObject().setItem(m.getTreeKey(),true)}}for(o=0;o<r;o++){n=q[o];if(n.phantom){n.phantom=false;s=m.getNextId()}else{s=n.getId()}m.setRecord(n,s);n.commit();t.push(s)}m.setIds(t);p.setCompleted();p.setSuccessful();if(typeof l=="function"){l.call(i||m,p)}},read:function(u,p,i){var q=this,v=[],s=0,o=true,w=q.model,z,x,r,t,y;u.setStarted();if(q.isHierarchical){v=q.getTreeData()}else{z=q.getIds();x=z.length;y=u.id;if(y){t=q.getRecord(y);r=new w(t,y,t);if(r){v.push(r)}else{o=false}}else{for(;s<x;s++){y=z[s];t=q.getRecord(y);v.push(new w(t,y,t))}}}if(o){u.setSuccessful()}u.setCompleted();u.resultSet=Ext.create("Ext.data.ResultSet",{records:v,total:v.length,loaded:true});if(typeof p=="function"){p.call(i||q,u)}},update:function(n,k,i){var o=n.records,p=o.length,r=this.getIds(),l,q,m;n.setStarted();for(m=0;m<p;m++){l=o[m];this.setRecord(l);l.commit();q=l.getId();if(q!==undefined&&Ext.Array.indexOf(r,q)==-1){r.push(q)}}this.setIds(r);n.setCompleted();n.setSuccessful();if(typeof k=="function"){k.call(i||this,n)}},destroy:function(s,n,m){var q=this,t=s.records,v=q.getIds(),p=v.length,i=[],o={},r=t.length,u;s.setStarted();for(;r--;){Ext.apply(o,q.removeRecord(t[r]))}for(r=0;r<p;r++){u=v[r];if(!o[u]){i.push(u)}}q.setIds(i);s.setCompleted();s.setSuccessful();if(typeof n=="function"){n.call(m||q,s)}},getRecord:function(g){var e=this,f=e.cache,h=!f[g]?Ext.decode(e.getStorageObject().getItem(e.getRecordKey(g))):f[g];if(!h){return null}f[g]=h;h[e.model.prototype.idProperty]=g;return h},setRecord:function(r,x){if(x){r.setId(x)}else{x=r.getId()}var p=this,z=r.data,t={},s=p.model,q=s.prototype.fields.items,w=q.length,u=0,o,y,v,i;for(;u<w;u++){o=q[u];y=o.name;if(o.persist){t[y]=z[y]}}delete t[p.model.prototype.idProperty];if(r.isNode&&r.get("depth")===1){delete t.parentId}v=p.getStorageObject();i=p.getRecordKey(x);p.cache[x]=t;v.removeItem(i);v.setItem(i,Ext.encode(t))},removeRecord:function(h){var k=this,i=h.getId(),g={},l,j;g[i]=h;k.getStorageObject().removeItem(k.getRecordKey(i));delete k.cache[i];if(h.childNodes){j=h.childNodes;for(l=j.length;l--;){Ext.apply(g,k.removeRecord(j[l]))}}return g},getRecordKey:function(b){if(b.isModel){b=b.getId()}return Ext.String.format("{0}-{1}",this.id,b)},getRecordCounterKey:function(){return Ext.String.format("{0}-counter",this.id)},getTreeKey:function(){return Ext.String.format("{0}-tree",this.id)},getIds:function(){var i=this,k=(i.getStorageObject().getItem(i.id)||"").split(","),g=i.model,j=k.length,h=g.prototype.fields.get(g.prototype.idProperty).type.type==="string",l;if(j==1&&k[0]===""){k=[]}else{for(l=0;l<j;l++){k[l]=h?k[l]:+k[l]}}return k},setIds:function(e){var d=this.getStorageObject(),f=e.join(",");d.removeItem(this.id);if(!Ext.isEmpty(f)){d.setItem(this.id,f)}},getNextId:function(){var k=this,j=k.getStorageObject(),l=k.getRecordCounterKey(),g=k.model,h=g.prototype.fields.get(g.prototype.idProperty).type.type==="string",i;i=k.idGenerator.generate();j.setItem(l,i);if(!h){i=+i}return i},getTreeData:function(){var s=this,D=s.getIds(),z=D.length,w=[],C={},r=[],v=0,x=s.model,i=x.prototype.idProperty,y,t,q,u,A,B;for(;v<z;v++){B=D[v];t=s.getRecord(B);w.push(t);C[B]=t;if(!t.parentId){r.push(t)}}y=r.length;Ext.Array.sort(w,s.sortByParentId);for(v=y;v<z;v++){t=w[v];u=t.parentId;if(!q||q[i]!==u){q=C[u];q.children=A=[]}A.push(t)}for(v=z;v--;){t=w[v];if(!t.children&&!t.leaf){t.loaded=true}}for(v=y;v--;){t=r[v];r[v]=new x(t,t[i],t)}return r},sortByParentId:function(c,d){return(c.parentId||0)-(d.parentId||0)},initialize:function(){var d=this,e=d.getStorageObject(),f=+e.getItem(d.getRecordCounterKey());e.setItem(d.id,e.getItem(d.id)||"");if(e.getItem(d.getTreeKey())){d.isHierarchical=true}d.idGenerator=new Ext.data.SequentialIdGenerator({seed:f?f+1:1})},clear:function(){var i=this,h=i.getStorageObject(),j=i.getIds(),g=j.length,f;for(f=0;f<g;f++){h.removeItem(i.getRecordKey(j[f]))}h.removeItem(i.getRecordCounterKey());h.removeItem(i.getTreeKey());h.removeItem(i.id);i.cache={}},getStorageObject:function(){Ext.Error.raise("The getStorageObject function has not been defined in your Ext.data.proxy.WebStorage subclass")}});Ext.define("Ext.data.proxy.LocalStorage",{extend:"Ext.data.proxy.WebStorage",alias:"proxy.localstorage",alternateClassName:"Ext.data.LocalStorageProxy",getStorageObject:function(){return window.localStorage}});Ext.define("Docs.model.Setting",{fields:["id","key","value"],extend:"Ext.data.Model",proxy:{type:window.localStorage?"localstorage":"memory",id:Docs.data.localStorageDb+"-settings"}});Ext.define("Docs.store.Settings",{extend:"Ext.data.Store",model:"Docs.model.Setting"});Ext.define("Docs.Settings",{extend:"Docs.LocalStore",singleton:true,requires:"Docs.store.Settings",storeName:"Docs.store.Settings",defaults:{show:{"public":true,"protected":false,"private":false,deprecated:false,removed:false,inherited:true,accessor:true},showPrivateClasses:false,classTreeLogic:"PackageLogic"},set:function(d,f){var e=this.store.findExact("key",d);if(e>-1){this.store.removeAt(e)}this.store.add({key:d,value:f});this.syncStore()},get:function(c){var d=this.store.findExact("key",c);return d>-1?this.store.getAt(d).get("value"):this.defaults[c]}});Ext.define("Docs.Application",{extend:"Ext.app.Application",name:"Docs",requires:["Docs.History","Docs.Settings"],uses:["Ext.util.History","Ext.data.JsonP"],controllers:["Auth","Welcome","Failure","Classes","Comments","CommentsMeta","Search","InlineExamples","Examples","Guides","Videos","Stats","Tabs","Tests"],launch:function(){Docs.App=this;Docs.Settings.init();Ext.create("Docs.view.Viewport");Docs.History.init();if(Docs.initEventTracking){Docs.initEventTracking()}Ext.get("loading").remove()}});Ext.define("Docs.view.cls.Tree",{extend:"Docs.view.DocTree",alias:"widget.classtree",requires:["Docs.view.cls.PackageLogic","Docs.view.cls.InheritanceLogic","Docs.Settings"],initComponent:function(){this.setLogic(Docs.Settings.get("classTreeLogic"),Docs.Settings.get("showPrivateClasses"));this.dockedItems=[{xtype:"container",dock:"bottom",layout:"hbox",items:[{width:34},{xtype:"checkbox",boxLabel:"Show private classes",cls:"cls-private-cb",checked:Docs.Settings.get("showPrivateClasses"),listeners:{change:function(d,c){this.setLogic(Docs.Settings.get("classTreeLogic"),c)},scope:this}}]},{xtype:"container",dock:"bottom",cls:"cls-grouping",html:[this.makeButtonHtml("PackageLogic","By Package"),this.makeButtonHtml("InheritanceLogic","By Inheritance")].join("")}];this.on("afterrender",this.setupButtonClickHandler,this);this.callParent()},makeButtonHtml:function(d,c){return Ext.String.format('<button class="{0} {1}">{2}</button>',d,Docs.Settings.get("classTreeLogic")===d?"selected":"",c)},setupButtonClickHandler:function(){this.el.addListener("click",function(g,h){var f=Ext.get(h),e=Ext.get(Ext.query(".cls-grouping button.selected")[0]);if(e.dom===f.dom){return}e.removeCls("selected");f.addCls("selected");if(f.hasCls("PackageLogic")){this.setLogic("PackageLogic",Docs.Settings.get("showPrivateClasses"))}else{this.setLogic("InheritanceLogic",Docs.Settings.get("showPrivateClasses"))}},this,{delegate:"button"})},setLogic:function(i,f){Docs.Settings.set("classTreeLogic",i);Docs.Settings.set("showPrivateClasses",f);var g=new Docs.view.cls[i]({classes:this.data,showPrivateClasses:f});if(this.root){var h=this.getSelectionModel().getLastSelected();var j=g.create();this.expandLonelyNode(j.root);this.setRootNode(j.root);this.initNodeLinks();h&&this.selectUrl(h.raw.url)}else{var j=g.create();this.root=j.root;this.expandLonelyNode(this.root)}this.privates=j.privates},expandLonelyNode:function(d){var c=Ext.Array.filter(d.children,function(a){return a.children.length>0});if(c.length==1){c[0].expanded=true}},findRecordByUrl:function(b){return this.callParent([b])||this.findPrivateRecordByUrl(b)},findPrivateRecordByUrl:function(e){var f=this.privates;for(var d=0;d<f.length;d++){if(f[d].url===e){return f[d]}}return undefined}});Ext.define("Docs.view.TreeContainer",{extend:"Ext.panel.Panel",alias:"widget.treecontainer",requires:["Docs.view.cls.Tree","Docs.view.GroupTree"],cls:"iScroll",layout:"card",resizable:true,resizeHandles:"e",collapsible:true,hideCollapseTool:true,animCollapse:true,header:false,initComponent:function(){this.items=[{},{xtype:"classtree",id:"classtree",data:Docs.data.classes},{xtype:"grouptree",id:"exampletree",data:Docs.data.examples,convert:function(b){return{leaf:true,text:b.title,url:"#!/example/"+b.name,iconCls:"icon-example"}}},{xtype:"grouptree",id:"guidetree",data:Docs.data.guides,convert:function(b){return{leaf:true,text:b.title,url:"#!/guide/"+b.name,iconCls:"icon-guide"}}},{xtype:"grouptree",id:"videotree",data:Docs.data.videos,convert:function(b){return{leaf:true,text:b.title,url:"#!/video/"+b.name,iconCls:"icon-video"}}}];this.callParent()},showTree:function(b){this.show();this.layout.setActiveItem(b)}});Ext.define("Docs.view.cls.Toolbar",{extend:"Ext.toolbar.Toolbar",requires:["Docs.view.HoverMenuButton","Docs.Settings","Ext.form.field.Checkbox"],dock:"top",cls:"member-links",docClass:{},accessors:{},initComponent:function(){this.addEvents("menubuttonclick","commentcountclick","filter","toggleExpanded");this.items=[];this.memberButtons={};var h={cfg:"Configs",property:"Properties",method:"Methods",event:"Events",css_var:"CSS Vars",css_mixin:"CSS Mixins"};for(var i in h){var f=this.docClass.members[i].concat(this.docClass.statics[i]);f.sort(function(a,b){if(a.name==="constructor"&&a.tagname==="method"){return -1}return a.name<b.name?-1:(a.name>b.name?1:0)});if(f.length>0){var j=this.createMemberButton({text:h[i],type:i,members:f});this.memberButtons[i]=j;this.items.push(j)}}this.checkItems={"public":this.createCb("Public","public"),"protected":this.createCb("Protected","protected"),"private":this.createCb("Private","private"),inherited:this.createCb("Inherited","inherited"),accessor:this.createCb("Accessor","accessor"),deprecated:this.createCb("Deprecated","deprecated"),removed:this.createCb("Removed","removed")};var g=this;this.items=this.items.concat([{xtype:"tbfill"},this.filterField=Ext.widget("triggerfield",{triggerCls:"reset",cls:"member-filter",hideTrigger:true,emptyText:"Filter class members",enableKeyEvents:true,width:150,listeners:{keyup:function(a){this.fireEvent("filter",a.getValue(),this.getShowFlags());a.setHideTrigger(a.getValue().length===0)},specialkey:function(a,b){if(b.keyCode===Ext.EventObject.ESC){a.reset();this.fireEvent("filter","",this.getShowFlags())}},scope:this},onTriggerClick:function(){this.reset();this.focus();g.fireEvent("filter","",g.getShowFlags());this.setHideTrigger(true)}}),{xtype:"tbspacer",width:10},this.commentCount=this.createCommentCount(),{xtype:"button",text:"Show",menu:[this.checkItems["public"],this.checkItems["protected"],this.checkItems["private"],"-",this.checkItems.inherited,this.checkItems.accessor,this.checkItems.deprecated,this.checkItems.removed]},{xtype:"button",iconCls:"expand-all-members",tooltip:"Expand all",enableToggle:true,toggleHandler:function(b,a){b.setIconCls(a?"collapse-all-members":"expand-all-members");this.fireEvent("toggleExpanded",a)},scope:this}]);this.callParent(arguments)},getShowFlags:function(){var d={};for(var c in this.checkItems){d[c]=this.checkItems[c].checked}return d},createCb:function(c,d){return Ext.widget("menucheckitem",{text:c,checked:Docs.Settings.get("show")[d],listeners:{checkchange:function(){this.fireEvent("filter",this.filterField.getValue(),this.getShowFlags())},scope:this}})},createMemberButton:function(d){var c=Ext.Array.map(d.members,function(a){return this.createLinkRecord(this.docClass.name,a)},this);return Ext.create("Docs.view.HoverMenuButton",{text:d.text,cls:"icon-"+d.type,store:this.createStore(c),showCount:true,listeners:{click:function(){this.fireEvent("menubuttonclick",d.type)},scope:this}})},createStore:function(c){var d=Ext.create("Ext.data.Store",{fields:["id","url","label","inherited","accessor","meta"]});d.add(c);return d},createLinkRecord:function(d,c){return{url:d+"-"+c.id,label:(c.tagname==="method"&&c.name==="constructor")?"new "+d:c.name,inherited:c.owner!==d,accessor:c.tagname==="method"&&this.accessors.hasOwnProperty(c.name),meta:c.meta}},showMenuItems:function(d,e,f){Ext.Array.forEach(["cfg","property","method","event"],function(b){if(this.memberButtons[b]){var c=this.memberButtons[b].getStore();c.filterBy(function(h){return !(!d["public"]&&!(h.get("meta")["private"]||h.get("meta")["protected"])||!d["protected"]&&h.get("meta")["protected"]||!d["private"]&&h.get("meta")["private"]||!d.inherited&&h.get("inherited")||!d.accessor&&h.get("accessor")||!d.deprecated&&h.get("meta")["deprecated"]||!d.removed&&h.get("meta")["removed"]||e&&!f.test(h.get("label")))});var a=this.memberButtons[b].menu;if(a&&Ext.getVersion().version>="4.1.0"){a.show();a.hide()}}},this)},getFilterValue:function(){return this.filterField.getValue()},createCommentCount:function(){return Ext.create("Ext.container.Container",{width:24,margin:"0 4 0 0",cls:"comment-btn",html:"0",hidden:true,listeners:{afterrender:function(b){b.el.addListener("click",function(){this.fireEvent("commentcountclick")},this)},scope:this}})},showCommentCount:function(){this.commentCount.show()},setCommentCount:function(b){this.commentCount.update(""+b)}});Ext.define("Docs.view.cls.Overview",{extend:"Ext.panel.Panel",alias:"widget.classoverview",requires:["Docs.view.cls.Toolbar","Docs.view.examples.Inline","Docs.Syntax","Docs.Settings"],mixins:["Docs.view.Scrolling"],cls:"class-overview iScroll",autoScroll:true,border:false,bodyPadding:"20 8 20 5",initComponent:function(){this.addEvents("afterload");this.callParent(arguments)},scrollToEl:function(h,g){var f=(typeof h=="string")?Ext.get(Ext.query(h)[0]):h;if(f){var e=f.hasCls("member");f.show();if(!f.isVisible(true)){f.up(".subsection").show();f.up(".members-section").show()}if(e&&f.down(".expandable")){f.addCls("open")}this.scrollToView(f,{highlight:true,offset:(g||0)-(e?165:155)})}},load:function(b){this.docClass=b;this.accessors=this.buildAccessorsMap();if(this.toolbar){this.removeDocked(this.toolbar,false);this.toolbar.destroy()}this.toolbar=Ext.create("Docs.view.cls.Toolbar",{docClass:this.docClass,accessors:this.accessors,listeners:{filter:function(d,a){this.filterMembers(d,a)},menubuttonclick:function(a){this.scrollToEl("h3.members-title.icon-"+a,-20)},scope:this}});this.addDocked(this.toolbar);this.update(b.html);Docs.Syntax.highlight(this.getEl());this.filterMembers("",Docs.Settings.get("show"));this.fireEvent("afterload")},filterMembers:function(h,e){Docs.Settings.set("show",e);var f=h.length>0;Ext.Array.forEach(Ext.query(".doc-contents, .hierarchy"),function(a){Ext.get(a).setStyle({display:f?"none":"block"})});var g=new RegExp(Ext.String.escapeRegex(h),"i");this.eachMember(function(c){var b=Ext.get(c.id);var a=!(!e["public"]&&!(c.meta["private"]||c.meta["protected"])||!e["protected"]&&c.meta["protected"]||!e["private"]&&c.meta["private"]||!e.inherited&&(c.owner!==this.docClass.name)||!e.accessor&&c.tagname==="method"&&this.accessors.hasOwnProperty(c.name)||!e.deprecated&&c.meta.deprecated||!e.removed&&c.meta.removed||f&&!g.test(c.name));if(a){b.setStyle({display:"block"})}else{b.setStyle({display:"none"})}},this);Ext.Array.forEach(Ext.query(".member.first-child"),function(a){Ext.get(a).removeCls("first-child")});Ext.Array.forEach(Ext.query(".members-section"),function(b){var a=this.getVisibleElements(".member",b);Ext.get(b).setStyle({display:a.length>0?"block":"none"});Ext.Array.forEach(Ext.query(".subsection",b),function(d){var c=this.getVisibleElements(".member",d);if(c.length>0){c[0].addCls("first-child");Ext.get(d).setStyle({display:"block"})}else{Ext.get(d).setStyle({display:"none"})}},this)},this);this.toolbar.showMenuItems(e,f,g)},buildAccessorsMap:function(c){var d={};Ext.Array.forEach(this.docClass.members.cfg,function(b){var a=Ext.String.capitalize(b.name);d["get"+a]=true;d["set"+a]=true});return d},getVisibleElements:function(e,d){var f=Ext.Array.map(Ext.query(e,d),function(a){return Ext.get(a)});return Ext.Array.filter(f,function(a){return a.isVisible()})},eachMember:function(c,d){Ext.Array.forEach(["members","statics"],function(a){Ext.Object.each(this.docClass[a],function(b,f){Ext.Array.forEach(f,c,d)},this)},this)}});Ext.define("Docs.view.cls.Container",{extend:"Ext.container.Container",alias:"widget.classcontainer",requires:["Docs.view.cls.Header","Docs.view.cls.Overview"],layout:"border",padding:"5 10 0 10",initComponent:function(){this.items=[Ext.create("Docs.view.cls.Header",{region:"north"}),Ext.create("Docs.view.cls.Overview",{region:"center"})];this.callParent(arguments)}});Ext.define("Docs.view.Viewport",{extend:"Ext.container.Viewport",requires:["Docs.view.search.Container","Docs.view.Header","Docs.view.Tabs","Docs.view.TreeContainer","Docs.view.welcome.Index","Docs.view.auth.Login","Docs.view.comments.Index","Docs.view.Comments","Docs.view.cls.Index","Docs.view.cls.Container","Docs.view.guides.Index","Docs.view.guides.Container","Docs.view.videos.Index","Docs.view.videos.Container","Docs.view.examples.Index","Docs.view.examples.Container","Docs.view.examples.TouchContainer","Docs.view.stats.Index","Docs.view.tests.Index"],id:"viewport",layout:"border",defaults:{xtype:"container"},initComponent:function(){this.items=[{region:"north",id:"north-region",height:65,layout:{type:"vbox",align:"stretch"},items:[{height:37,xtype:"container",layout:"hbox",items:[{xtype:"docheader"},{xtype:"container",flex:1},{id:"loginContainer",xtype:"authentication",width:500,padding:"10 20 0 0"},{xtype:"searchcontainer",id:"search-container",width:230,margin:"4 0 0 0"}]},{xtype:"doctabs"}]},{region:"center",layout:"border",minWidth:800,items:[{region:"west",xtype:"treecontainer",id:"treecontainer",border:1,bodyPadding:"10 9 4 9",width:240},{region:"center",id:"center-container",layout:"fit",minWidth:800,border:false,padding:"5 10",items:{id:"card-panel",cls:"card-panel",xtype:"container",layout:{type:"card",deferredRender:true},items:[{autoScroll:true,xtype:"welcomeindex",id:"welcomeindex"},{xtype:"container",id:"failure"},{autoScroll:true,xtype:"classindex",id:"classindex"},{xtype:"classcontainer",id:"classcontainer"},{autoScroll:true,xtype:"guideindex",id:"guideindex"},{autoScroll:true,xtype:"guidecontainer",id:"guide",cls:"iScroll"},{xtype:"videoindex",id:"videoindex"},{autoScroll:true,xtype:"videocontainer",id:"video",cls:"iScroll"},{xtype:"exampleindex",id:"exampleindex"},{xtype:Docs.data.touchExamplesUi?"touchexamplecontainer":"examplecontainer",id:"example"},{xtype:"statsindex",id:"statsindex"},{xtype:"testsindex",id:"testsindex"},{xtype:"commentindex",id:"commentindex"}]}}]},{region:"south",id:"footer",height:20,contentEl:"footer-content"}];this.callParent(arguments)},setPageTitle:function(b){b=Ext.util.Format.stripTags(b);if(!this.origTitle){this.origTitle=document.title}document.title=b?(b+" - "+this.origTitle):this.origTitle}});Ext.define("Ext.util.Point",{extend:"Ext.util.Region",statics:{fromEvent:function(b){b=(b.changedTouches&&b.changedTouches.length>0)?b.changedTouches[0]:b;return new this(b.pageX,b.pageY)}},constructor:function(d,c){this.callParent([c,d,c,d])},toString:function(){return"Point["+this.x+","+this.y+"]"},equals:function(b){return(this.x==b.x&&this.y==b.y)},isWithin:function(c,d){if(!Ext.isObject(d)){d={x:d,y:d}}return(this.x<=c.x+d.x&&this.x>=c.x-d.x&&this.y<=c.y+d.y&&this.y>=c.y-d.y)},roundedEquals:function(b){return(Math.round(this.x)==Math.round(b.x)&&Math.round(this.y)==Math.round(b.y))}},function(){this.prototype.translate=Ext.util.Region.prototype.translateBy});Ext.define("Ext.Layer",{extend:"Ext.Element",uses:["Ext.Shadow"],statics:{shims:[]},isLayer:true,constructor:function(h,i){h=h||{};var n=this,m=Ext.DomHelper,k=h.parentEl,l=k?Ext.getDom(k):document.body,j=h.hideMode;if(i){n.dom=Ext.getDom(i)}if(!n.dom){n.dom=m.append(l,h.dh||{tag:"div",cls:Ext.baseCSSPrefix+"layer"})}else{n.addCls(Ext.baseCSSPrefix+"layer");if(!n.dom.parentNode){l.appendChild(n.dom)}}if(h.id){n.id=n.dom.id=h.id}else{n.id=Ext.id(n.dom)}Ext.Element.addToCache(n);if(h.cls){n.addCls(h.cls)}n.constrain=h.constrain!==false;if(j){n.setVisibilityMode(Ext.Element[j.toUpperCase()]);if(n.visibilityMode==Ext.Element.ASCLASS){n.visibilityCls=h.visibilityCls}}else{if(h.useDisplay){n.setVisibilityMode(Ext.Element.DISPLAY)}else{n.setVisibilityMode(Ext.Element.VISIBILITY)}}if(h.shadow){n.shadowOffset=h.shadowOffset||4;n.shadow=new Ext.Shadow({offset:n.shadowOffset,mode:h.shadow});n.disableShadow()}else{n.shadowOffset=0}n.useShim=h.shim!==false&&Ext.useShims;if(h.hidden===true){n.hide()}else{n.show()}},getZIndex:function(){return parseInt((this.getShim()||this).getStyle("z-index"),10)},getShim:function(){var d=this,f,e;if(!d.useShim){return null}if(!d.shim){f=d.self.shims.shift();if(!f){f=d.createShim();f.enableDisplayMode("block");f.hide()}e=d.dom.parentNode;if(f.dom.parentNode!=e){e.insertBefore(f.dom,d.dom)}d.shim=f}return d.shim},hideShim:function(){var b=this;if(b.shim){b.shim.setDisplayed(false);b.self.shims.push(b.shim);delete b.shim}},disableShadow:function(){var b=this;if(b.shadow&&!b.shadowDisabled){b.shadowDisabled=true;b.shadow.hide();b.lastShadowOffset=b.shadowOffset;b.shadowOffset=0}},enableShadow:function(d){var c=this;if(c.shadow&&c.shadowDisabled){c.shadowDisabled=false;c.shadowOffset=c.lastShadowOffset;delete c.lastShadowOffset;if(d){c.sync(true)}}},sync:function(w){var q=this,l=q.shadow,r,t,x,u,v,h,o,s,p;if(!q.updating&&q.isVisible()&&(l||q.useShim)){u=q.getShim();v=q.getLeft(true);h=q.getTop(true);o=q.dom.offsetWidth;s=q.dom.offsetHeight;if(l&&!q.shadowDisabled){if(w&&!l.isVisible()){l.show(q)}else{l.realign(v,h,o,s)}if(u){p=u.getStyle("z-index");if(p>q.zindex){q.shim.setStyle("z-index",q.zindex-2)}u.show();if(l.isVisible()){r=l.el.getXY();t=u.dom.style;x=l.el.getSize();if(Ext.supports.CSS3BoxShadow){x.height+=6;x.width+=4;r[0]-=2;r[1]-=4}t.left=(r[0])+"px";t.top=(r[1])+"px";t.width=(x.width)+"px";t.height=(x.height)+"px"}else{u.setSize(o,s);u.setLeftTop(v,h)}}}else{if(u){p=u.getStyle("z-index");if(p>q.zindex){q.shim.setStyle("z-index",q.zindex-2)}u.show();u.setSize(o,s);u.setLeftTop(v,h)}}}return q},remove:function(){this.hideUnders();this.callParent()},beginUpdate:function(){this.updating=true},endUpdate:function(){this.updating=false;this.sync(true)},hideUnders:function(){if(this.shadow){this.shadow.hide()}this.hideShim()},constrainXY:function(){if(this.constrain){var o=Ext.Element.getViewWidth(),s=Ext.Element.getViewHeight(),h=Ext.getDoc().getScroll(),l=this.getXY(),n=l[0],p=l[1],t=this.shadowOffset,m=this.dom.offsetWidth+t,r=this.dom.offsetHeight+t,q=false;if((n+m)>o+h.left){n=o-m-t;q=true}if((p+r)>s+h.top){p=s-r-t;q=true}if(n<h.left){n=h.left;q=true}if(p<h.top){p=h.top;q=true}if(q){Ext.Layer.superclass.setXY.call(this,[n,p]);this.sync()}}return this},getConstrainOffset:function(){return this.shadowOffset},setVisible:function(l,h,m,j,k){var n=this,i;i=function(){if(l){n.sync(true)}if(j){j()}};if(!l){n.hideUnders(true)}n.callParent([l,h,m,j,k]);if(!h){i()}return n},beforeFx:function(){this.beforeAction();return this.callParent(arguments)},afterFx:function(){this.callParent(arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(b){this.callParent(arguments);return this.sync()},setTop:function(b){this.callParent(arguments);return this.sync()},setLeftTop:function(c,d){this.callParent(arguments);return this.sync()},setXY:function(k,h,l,i,j){var g=this;i=g.createCB(i);g.fixDisplay();g.beforeAction();g.callParent([k,h,l,i,j]);if(!h){i()}return g},createCB:function(f){var e=this,d=e.shadow&&e.shadow.isVisible();return function(){e.constrainXY();e.sync(d);if(f){f()}}},setX:function(g,f,j,h,i){this.setXY([g,this.getY()],f,j,h,i);return this},setY:function(h,g,f,i,j){this.setXY([this.getX(),h],g,f,i,j);return this},setSize:function(i,n,h,l,j,k){var m=this;j=m.createCB(j);m.beforeAction();m.callParent([i,n,h,l,j,k]);if(!h){j()}return m},setWidth:function(h,g,k,i,j){var l=this;i=l.createCB(i);l.beforeAction();l.callParent([h,g,k,i,j]);if(!g){i()}return l},setHeight:function(g,h,k,i,j){var l=this;i=l.createCB(i);l.beforeAction();l.callParent([g,h,k,i,j]);if(!h){i()}return l},setBounds:function(l,m,r,j,q,p,k,o){var n=this;k=n.createCB(k);n.beforeAction();if(!q){Ext.Layer.superclass.setXY.call(n,[l,m]);Ext.Layer.superclass.setSize.call(n,r,j);k()}else{n.callParent([l,m,r,j,q,p,k,o])}return n},setZIndex:function(d){var c=this;c.zindex=d;if(c.getShim()){c.shim.setStyle("z-index",d++)}if(c.shadow){c.shadow.setZIndex(d++)}return c.setStyle("z-index",d)},onOpacitySet:function(d){var c=this.shadow;if(c){c.setOpacity(d)}}});Ext.define("Ext.data.Batch",{mixins:{observable:"Ext.util.Observable"},autoStart:false,pauseOnException:false,current:-1,total:0,isRunning:false,isComplete:false,hasException:false,constructor:function(d){var c=this;c.mixins.observable.constructor.call(c,d);c.operations=[];c.exceptions=[]},add:function(b){this.total++;b.setBatch(this);this.operations.push(b);return this},start:function(d){var c=this;if(c.isRunning){return c}c.exceptions.length=0;c.hasException=false;c.isRunning=true;return c.runOperation(Ext.isDefined(d)?d:c.current+1)},retry:function(){return this.start(this.current)},runNextOperation:function(){return this.runOperation(this.current+1)},pause:function(){this.isRunning=false;return this},runOperation:function(i){var h=this,j=h.operations,f=j[i],g;if(f===undefined){h.isRunning=false;h.isComplete=true;h.fireEvent("complete",h,j[j.length-1])}else{h.current=i;g=function(b){var a=b.hasException();if(a){h.hasException=true;h.exceptions.push(b);h.fireEvent("exception",h,b)}if(a&&h.pauseOnException){h.pause()}else{b.setCompleted();h.fireEvent("operationcomplete",h,b);h.runNextOperation()}};f.setStarted();h.proxy[f.action](f,g,h)}return h}});Ext.define("Ext.data.Request",{action:undefined,params:undefined,method:"GET",url:undefined,constructor:function(b){Ext.apply(this,b)}});Ext.define("Ext.view.DragZone",{extend:"Ext.dd.DragZone",containerScroll:false,constructor:function(d){var c=this;Ext.apply(c,d);if(!c.ddGroup){c.ddGroup="view-dd-zone-"+c.view.id}c.callParent([c.view.el.dom.parentNode]);c.ddel=Ext.get(document.createElement("div"));c.ddel.addCls(Ext.baseCSSPrefix+"grid-dd-wrap")},init:function(f,e,d){this.initTarget(f,e,d);this.view.mon(this.view,{itemmousedown:this.onItemMouseDown,scope:this})},onItemMouseDown:function(e,g,i,j,h){if(!this.isPreventDrag(h,g,i,j)){this.handleMouseDown(h);if(e.getSelectionModel().selectionMode=="MULTI"&&!h.ctrlKey&&e.getSelectionModel().isSelected(g)){return false}}},isPreventDrag:function(b){return false},getDragData:function(f){var e=this.view,d=f.getTarget(e.getItemSelector());if(d){return{copy:e.copy||(e.allowCopy&&f.ctrlKey),event:new Ext.EventObjectImpl(f),view:e,ddel:this.ddel,item:d,records:e.getSelectionModel().getSelection(),fromPosition:Ext.fly(d).getXY()}}},onInitDrag:function(e,k){var n=this,m=n.dragData,o=m.view,j=o.getSelectionModel(),p=o.getRecord(m.item),l=m.event;if(!j.isSelected(p)||l.hasModifier()){j.selectWithEvent(p,l,true)}m.records=j.getSelection();n.ddel.update(n.getDragText());n.proxy.update(n.ddel.dom);n.onStartDrag(e,k);return true},getDragText:function(){var b=this.dragData.records.length;return Ext.String.format(this.dragText,b,b==1?"":"s")},getRepairXY:function(c,d){return d?d.fromPosition:false}});Ext.define("Ext.util.CSS",(function(){var g=null,h=document,e=/(-[a-z])/gi,f=function(b,a){return a.charAt(1).toUpperCase()};return{singleton:true,constructor:function(){this.rules={};this.initialized=false},createStyleSheet:function(d,a){var l,m=h.getElementsByTagName("head")[0],b=h.createElement("style");b.setAttribute("type","text/css");if(a){b.setAttribute("id",a)}if(Ext.isIE){m.appendChild(b);l=b.styleSheet;l.cssText=d}else{try{b.appendChild(h.createTextNode(d))}catch(c){b.cssText=d}m.appendChild(b);l=b.styleSheet?b.styleSheet:(b.sheet||h.styleSheets[h.styleSheets.length-1])}this.cacheStyleSheet(l);return l},removeStyleSheet:function(a){var b=document.getElementById(a);if(b){b.parentNode.removeChild(b)}},swapStyleSheet:function(a,d){var b=document,c;this.removeStyleSheet(a);c=b.createElement("link");c.setAttribute("rel","stylesheet");c.setAttribute("type","text/css");c.setAttribute("id",a);c.setAttribute("href",d);b.getElementsByTagName("head")[0].appendChild(c)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(c){if(!g){g={}}try{var o=c.cssRules||c.rules,b,d=o.length-1,j,i;for(;d>=0;--d){b=o[d].selectorText;if(b){b=b.split(",");i=b.length;for(j=0;j<i;j++){g[Ext.String.trim(b[j]).toLowerCase()]=o[d]}}}}catch(a){}},getRules:function(d){if(g===null||d){g={};var b=h.styleSheets,c=0,i=b.length;for(;c<i;c++){try{if(!b[c].disabled){this.cacheStyleSheet(b[c])}}catch(a){}}}return g},getRule:function(d,b){var c=this.getRules(b),a;if(!Ext.isArray(d)){return c[d.toLowerCase()]}for(a=0;a<d.length;a++){if(c[d[a]]){return c[d[a].toLowerCase()]}}return null},updateRule:function(i,b,c){var a,d;if(!Ext.isArray(i)){a=this.getRule(i);if(a){a.style[b.replace(e,f)]=c;return true}}else{for(d=0;d<i.length;d++){if(this.updateRule(i[d],b,c)){return true}}}return false}}}()));Ext.define("Ext.PluginManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.PluginMgr",singleton:true,typeName:"ptype",create:function(d,c){if(d.init){return d}else{return Ext.createByAlias("plugin."+(d.ptype||c),d)}},findByType:function(l,i){var j=[],g=this.types,h,k;for(h in g){if(!g.hasOwnProperty(h)){continue}k=g[h];if(k.type==l&&(!i||(i===true&&k.isDefault))){j.push(k)}}return j}},function(){Ext.preg=function(){return Ext.PluginManager.registerType.apply(Ext.PluginManager,arguments)}});Ext.define("Ext.resizer.Resizer",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.resizer.ResizeTracker","Ext.Component"],alternateClassName:"Ext.Resizable",handleCls:Ext.baseCSSPrefix+"resizable-handle",pinnedCls:Ext.baseCSSPrefix+"resizable-pinned",overCls:Ext.baseCSSPrefix+"resizable-over",wrapCls:Ext.baseCSSPrefix+"resizable-wrap",dynamic:true,handles:"s e se",height:null,width:null,heightIncrement:0,widthIncrement:0,minHeight:20,minWidth:20,maxHeight:10000,maxWidth:10000,pinned:false,preserveRatio:false,transparent:false,possiblePositions:{n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"},constructor:function(C){var v=this,w,r,i,q=v.handles,B,s,y,A=0,t,u=[],x,D,z;v.addEvents("beforeresize","resizedrag","resize");if(Ext.isString(C)||Ext.isElement(C)||C.dom){w=C;C=arguments[1]||{};C.target=w}v.mixins.observable.constructor.call(v,C);w=v.target;if(w){if(w.isComponent){v.el=w.getEl();if(w.minWidth){v.minWidth=w.minWidth}if(w.minHeight){v.minHeight=w.minHeight}if(w.maxWidth){v.maxWidth=w.maxWidth}if(w.maxHeight){v.maxHeight=w.maxHeight}if(w.floating){if(!v.hasOwnProperty("handles")){v.handles="n ne e se s sw w nw"}}}else{v.el=v.target=Ext.get(w)}}else{v.target=v.el=Ext.get(v.el)}i=v.el.dom.tagName;if(i=="TEXTAREA"||i=="IMG"||i=="TABLE"){v.originalTarget=v.target;r=v.el;z=r.getBox();v.target=v.el=v.el.wrap({cls:v.wrapCls,id:v.el.id+"-rzwrap",style:r.getStyles("margin-top","margin-bottom")});v.el.setPositioning(r.getPositioning());r.clearPositioning();v.el.setBox(z);r.setStyle("position","absolute")}v.el.position();if(v.pinned){v.el.addCls(v.pinnedCls)}v.resizeTracker=new Ext.resizer.ResizeTracker({disabled:v.disabled,target:v.target,constrainTo:v.constrainTo,overCls:v.overCls,throttle:v.throttle,originalTarget:v.originalTarget,delegate:"."+v.handleCls,dynamic:v.dynamic,preserveRatio:v.preserveRatio,heightIncrement:v.heightIncrement,widthIncrement:v.widthIncrement,minHeight:v.minHeight,maxHeight:v.maxHeight,minWidth:v.minWidth,maxWidth:v.maxWidth});v.resizeTracker.on({mousedown:v.onBeforeResize,drag:v.onResize,dragend:v.onResizeEnd,scope:v});if(v.handles=="all"){v.handles="n s e w ne nw se sw"}q=v.handles=v.handles.split(/ |\s*?[,;]\s*?/);s=v.possiblePositions;y=q.length;B=v.handleCls+" "+(v.target.isComponent?(v.target.baseCls+"-handle "):"")+v.handleCls+"-";if(Ext.isIE6){x=' style="height:'+v.el.getHeight()+'px"'}for(;A<y;A++){if(q[A]&&s[q[A]]){t=s[q[A]];if(t==="east"||t==="west"){D=x}else{D=""}u.push('<div id="'+v.el.id+"-"+t+'-handle" class="'+B+t+" "+Ext.baseCSSPrefix+'unselectable"'+D+"></div>")}}Ext.DomHelper.append(v.el,u.join(""));for(A=0;A<y;A++){if(q[A]&&s[q[A]]){t=s[q[A]];v[t]=v.el.getById(v.el.id+"-"+t+"-handle");v[t].region=t;v[t].unselectable();if(v.transparent){v[t].setOpacity(0)}}}if(Ext.isNumber(v.width)){v.width=Ext.Number.constrain(v.width,v.minWidth,v.maxWidth)}if(Ext.isNumber(v.height)){v.height=Ext.Number.constrain(v.height,v.minHeight,v.maxHeight)}if(v.width!==null||v.height!==null){if(v.originalTarget){v.originalTarget.setWidth(v.width);v.originalTarget.setHeight(v.height)}v.resizeTo(v.width,v.height)}v.forceHandlesHeight()},disable:function(){this.resizeTracker.disable()},enable:function(){this.resizeTracker.enable()},onBeforeResize:function(d,f){var e=this.el.getBox();return this.fireEvent("beforeresize",this,e.width,e.height,f)},onResize:function(h,g){var e=this,f=e.el.getBox();e.forceHandlesHeight();return e.fireEvent("resizedrag",e,f.width,f.height,g)},onResizeEnd:function(h,g){var e=this,f=e.el.getBox();e.forceHandlesHeight();return e.fireEvent("resize",e,f.width,f.height,g)},resizeTo:function(d,e){var f=this;f.target.setSize(d,e);f.fireEvent("resize",f,d,e,null)},getEl:function(){return this.el},getTarget:function(){return this.target},destroy:function(){var g=0,h=this.handles,f=h.length,e=this.possiblePositions;for(;g<f;g++){this[e[h[g]]].remove()}},forceHandlesHeight:function(){var d=this,c;if(Ext.isIE6){c=d.east;if(c){c.setHeight(d.el.getHeight())}c=d.west;if(c){c.setHeight(d.el.getHeight())}d.el.repaint()}}});Ext.define("Ext.util.ComponentDragger",{extend:"Ext.dd.DragTracker",autoStart:500,constructor:function(d,c){this.comp=d;this.initialConstrainTo=c.constrainTo;this.callParent([c])},onStart:function(f){var d=this,e=d.comp;this.startPosition=e.el.getXY();if(e.ghost&&!e.liveDrag){d.proxy=e.ghost();d.dragTarget=d.proxy.header.el}if(d.constrain||d.constrainDelegate){d.constrainTo=d.calculateConstrainRegion()}if(e.beginDrag){e.beginDrag()}},calculateConstrainRegion:function(){var l=this,h=l.comp,i=l.initialConstrainTo,k,j,c=h.el.shadow?h.el.shadow.offset:0;if(!(i instanceof Ext.util.Region)){i=Ext.fly(i).getViewRegion()}if(c){i.adjust(0,-c,-c,c)}if(!l.constrainDelegate){k=Ext.fly(l.dragTarget).getRegion();j=l.proxy?l.proxy.el.getRegion():h.el.getRegion();i.adjust(k.top-j.top,k.right-j.right,k.bottom-j.bottom,k.left-j.left)}return i},onDrag:function(h){var e=this,f=(e.proxy&&!e.comp.liveDrag)?e.proxy:e.comp,g=e.getOffset(e.constrain||e.constrainDelegate?"dragTarget":null);f.setPagePosition(e.startPosition[0]+g[0],e.startPosition[1]+g[1])},onEnd:function(c){var d=this.comp;if(this.proxy&&!d.liveDrag){d.unghost()}if(d.endDrag){d.endDrag()}}});Ext.define("Ext.resizer.SplitterTracker",{extend:"Ext.dd.DragTracker",requires:["Ext.util.Region"],enabled:true,overlayCls:Ext.baseCSSPrefix+"resizable-overlay",createDragOverlay:function(){var b;b=this.overlay=Ext.getBody().createChild({cls:this.overlayCls,html:" "});b.unselectable();b.setSize(Ext.Element.getViewWidth(true),Ext.Element.getViewHeight(true));b.show()},getPrevCmp:function(){var b=this.getSplitter();return b.previousSibling()},getNextCmp:function(){var b=this.getSplitter();return b.nextSibling()},onBeforeStart:function(j){var m=this,l=m.getPrevCmp(),i=m.getNextCmp(),n=m.getSplitter().collapseEl,k=j.getTarget(),e;if(n&&k===m.getSplitter().collapseEl.dom){return false}if(i.collapsed||l.collapsed){return false}m.prevBox=l.getEl().getBox();m.nextBox=i.getEl().getBox();m.constrainTo=e=m.calculateConstrainRegion();if(!e){return false}m.createDragOverlay();return e},onStart:function(c){var d=this.getSplitter();d.addCls(d.baseCls+"-active")},calculateConstrainRegion:function(){var q=this,v=q.getSplitter(),p=v.getWidth(),o=v.defaultSplitMin,u=v.orientation,s=q.prevBox,n=q.getPrevCmp(),t=q.nextBox,r=q.getNextCmp(),l,m;if(u==="vertical"){l=new Ext.util.Region(s.y,(n.maxWidth?s.x+n.maxWidth:t.right-(r.minWidth||o))+p,s.bottom,s.x+(n.minWidth||o));m=new Ext.util.Region(t.y,t.right-(r.minWidth||o),t.bottom,(r.maxWidth?t.right-r.maxWidth:s.x+(s.minWidth||o))-p)}else{l=new Ext.util.Region(s.y+(n.minHeight||o),s.right,(n.maxHeight?s.y+n.maxHeight:t.bottom-(r.minHeight||o))+p,s.x);m=new Ext.util.Region((r.maxHeight?t.bottom-r.maxHeight:s.y+(n.minHeight||o))-p,t.right,t.bottom-(r.minHeight||o),t.x)}return l.intersect(m)},performResize:function(s,x){var q=this,B=q.getSplitter(),w=B.orientation,i=q.getPrevCmp(),r=q.getNextCmp(),A=B.ownerCt,u=A.query(">[flex]"),t=u.length,v=0,y,e,z=0;for(;v<t;v++){e=u[v].getWidth();z+=e;u[v].flex=e}x=x||q.getOffset("dragTarget");if(w==="vertical"){x=x[0];y="width"}else{y="height";x=x[1]}if(i){e=q.prevBox[y]+x;if(i.flex){i.flex=e}else{i[y]=e}}if(r){e=q.nextBox[y]-x;if(r.flex){r.flex=e}else{r[y]=e}}A.updateLayout()},endDrag:function(){var b=this;if(b.overlay){b.overlay.remove();delete b.overlay}b.callParent(arguments)},onEnd:function(f){var e=this,d=e.getSplitter();d.removeCls(d.baseCls+"-active");e.performResize(f,e.getOffset("dragTarget"))},onDrag:function(j){var l=this,i=l.getOffset("dragTarget"),k=l.getSplitter(),e=k.getEl(),h=k.orientation;if(h==="vertical"){e.setX(l.startRegion.left+i[0])}else{e.setY(l.startRegion.top+i[1])}},getSplitter:function(){return this.splitter}});Ext.define("Ext.resizer.BorderSplitterTracker",{extend:"Ext.resizer.SplitterTracker",requires:["Ext.util.Region"],getPrevCmp:null,getNextCmp:null,calculateConstrainRegion:function(){var i=this,T=i.splitter,H=T.collapseTarget,Q=T.defaultSplitMin,N=T.vertical?"Width":"Height",R="min"+N,B="max"+N,M="get"+N,C=T.neighbors,P=C.length,I=H.el.getBox(),O=I.x,G=I.y,y=I.right,L=I.bottom,E=T.vertical?(y-O):(L-G),z,K,J,A,D,F,S;J=(H[R]||Math.min(E,Q))-E;A=H[B];if(!A){A=1000000000}else{A-=E}S=E;for(z=0;z<P;++z){K=C[z];E=K[M]();D=E-K[B];F=E-(K[R]||Math.min(E,Q));if(!isNaN(D)){if(J<D){J=D}}if(A>F){A=F}}if(A-J<2){return null}I=new Ext.util.Region(G,y,L,O);i.constraintAdjusters[T.collapseDirection](I,J,A,T);i.dragInfo={minRange:J,maxRange:A,targetSize:S};return I},constraintAdjusters:{left:function(h,f,e,g){h[0]=h.x=h.left=h.right+f;h.right+=e+g.getWidth()},top:function(h,f,e,g){h[1]=h.y=h.top=h.bottom+f;h.bottom+=e+g.getHeight()},bottom:function(h,f,e,g){h.bottom=h.top-f;h.top-=e+g.getHeight()},right:function(h,f,e,g){h.right=h.left-f;h.left-=e+g.getWidth()}},onBeforeStart:function(o){var m=this,s=m.splitter,t=s.collapseTarget,e=s.neighbors,q=m.getSplitter().collapseEl,n=o.getTarget(),r=e.length,p,i;if(q&&n===s.collapseEl.dom){return false}if(t.collapsed){return false}for(p=0;p<r;++p){i=e[p];if(i.collapsed&&i.isHorz===t.isHorz){return false}}if(!(m.constrainTo=m.calculateConstrainRegion())){return false}m.createDragOverlay();return true},performResize:function(m,n){var l=this,s=l.splitter,o=s.collapseDirection,t=s.collapseTarget,p=l.splitAdjusters[s.vertical?"horz":"vert"],e=n[p.index],q=l.dragInfo,r;if(o=="right"||o=="bottom"){e=-e}e=Math.min(Math.max(q.minRange,e),q.maxRange);if(e){(r=s.ownerCt).suspendLayouts();p.adjustTarget(t,q.targetSize,e);r.resumeLayouts(true)}},splitAdjusters:{horz:{index:0,adjustTarget:function(d,e,f){d.flex=null;d.setSize(e+f)}},vert:{index:1,adjustTarget:function(d,e,f){d.flex=null;d.setSize(undefined,e+f)}}}});Ext.define("Ext.panel.Tool",{extend:"Ext.Component",requires:["Ext.tip.QuickTipManager"],alias:"widget.tool",baseCls:Ext.baseCSSPrefix+"tool",disabledCls:Ext.baseCSSPrefix+"tool-disabled",toolPressedCls:Ext.baseCSSPrefix+"tool-pressed",toolOverCls:Ext.baseCSSPrefix+"tool-over",ariaRole:"button",childEls:["toolEl"],renderTpl:['<img id="{id}-toolEl" src="{blank}" class="{baseCls}-{type}" role="presentation"/>'],tooltipType:"qtip",stopEvent:true,height:15,width:15,_toolTypes:{close:1,collapse:1,down:1,expand:1,gear:1,help:1,left:1,maximize:1,minimize:1,minus:1,next:1,pin:1,plus:1,prev:1,print:1,refresh:1,restore:1,right:1,save:1,search:1,toggle:1,unpin:1,up:1},initComponent:function(){var b=this;b.addEvents("click");if(b.id&&b._toolTypes[b.id]&&Ext.global.console){Ext.global.console.warn("When specifying a tool you should use the type option, the id can conflict now that tool is a Component")}b.type=b.type||b.id;Ext.applyIf(b.renderData,{baseCls:b.baseCls,blank:Ext.BLANK_IMAGE_URL,type:b.type});b.tooltip=b.tooltip||b.qtip;b.callParent();b.on({element:"toolEl",click:b.onClick,mousedown:b.onMouseDown,mouseover:b.onMouseOver,mouseout:b.onMouseOut,scope:b})},afterRender:function(){var c=this,d;c.callParent(arguments);if(c.tooltip){if(Ext.isObject(c.tooltip)){Ext.tip.QuickTipManager.register(Ext.apply({target:c.id},c.tooltip))}else{d=c.tooltipType=="qtip"?"data-qtip":"title";c.toolEl.dom.setAttribute(d,c.tooltip)}}},getFocusEl:function(){return this.el},setType:function(d){var c=this;c.type=d;if(c.rendered){c.toolEl.dom.className=c.baseCls+"-"+d}return c},bindTo:function(b){this.owner=b},onClick:function(g,h){var e=this,f;if(e.disabled){return false}f=e.owner||e.ownerCt;e.el.removeCls(e.toolPressedCls);e.el.removeCls(e.toolOverCls);if(e.stopEvent!==false){g.stopEvent()}Ext.callback(e.handler,e.scope||e,[g,h,f,e]);e.fireEvent("click",e,g);return true},onDestroy:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.id)}this.callParent()},onMouseDown:function(){if(this.disabled){return false}this.el.addCls(this.toolPressedCls)},onMouseOver:function(){if(this.disabled){return false}this.el.addCls(this.toolOverCls)},onMouseOut:function(){this.el.removeCls(this.toolOverCls)}});Ext.define("Ext.layout.component.Body",{alias:["layout.body"],extend:"Ext.layout.component.Auto",type:"body",beginLayout:function(b){this.callParent(arguments);b.bodyContext=b.getEl("body")},calculateOwnerHeightFromContentHeight:function(f,d){var e=this.callParent(arguments);if(f.targetContext!=f){e+=f.getPaddingInfo().height}return e},calculateOwnerWidthFromContentWidth:function(f,e){var d=this.callParent(arguments);if(f.targetContext!=f){d+=f.getPaddingInfo().width}return d},measureContentWidth:function(b){return b.bodyContext.setWidth(b.bodyContext.el.dom.offsetWidth,false)},measureContentHeight:function(b){return b.bodyContext.setHeight(b.bodyContext.el.dom.offsetHeight,false)},publishInnerHeight:function(h,f){var g=f-h.getFrameInfo().height,e=h.targetContext;if(e!=h){g-=h.getPaddingInfo().height}h.bodyContext.setHeight(g,!h.heightModel.natural)},publishInnerWidth:function(g,h){var f=h-g.getFrameInfo().width,e=g.targetContext;if(e!=g){f-=g.getPaddingInfo().width}g.bodyContext.setWidth(f,!g.widthModel.natural)}});Ext.define("Ext.Img",{extend:"Ext.Component",alias:["widget.image","widget.imagecomponent"],autoEl:"img",src:"",alt:"",imgCls:"",getElConfig:function(){var f=this,d=f.callParent(),e;if(f.autoEl=="img"){e=d}else{d.cn=[e={tag:"img",id:f.id+"-img"}]}if(f.imgCls){e.cls=(e.cls?e.cls+" ":"")+f.imgCls}e.src=f.src||Ext.BLANK_IMAGE_URL;if(f.alt){e.alt=f.alt}return d},onRender:function(){var c=this,d;c.callParent(arguments);d=c.el;c.imgEl=(c.autoEl=="img")?d:d.getById(c.id+"-img")},onDestroy:function(){Ext.destroy(this.imgEl);this.imgEl=null;this.callParent()},setSrc:function(f){var e=this,d=e.imgEl;e.src=f;if(d){d.dom.src=f||Ext.BLANK_IMAGE_URL}}});Ext.define("Ext.util.Grouper",{extend:"Ext.util.Sorter",getGroupString:function(b){return b.get(this.property)}});Ext.define("Ext.view.TableChunker",{singleton:true,requires:["Ext.XTemplate"],metaTableTpl:["{%if (this.openTableWrap)out.push(this.openTableWrap())%}",'<table class="'+Ext.baseCSSPrefix+"grid-table "+Ext.baseCSSPrefix+'grid-table-resizer" border="0" cellspacing="0" cellpadding="0" {[this.embedFullWidth(values)]}>',"<tbody>",'<tr class="'+Ext.baseCSSPrefix+'grid-header-row">','<tpl for="columns">','<th class="'+Ext.baseCSSPrefix+'grid-col-resizer-{id}" style="width: {width}px; height: 0px;"></th>',"</tpl>","</tr>","{[this.openRows()]}","{row}",'<tpl for="features">',"{[this.embedFeature(values, parent, xindex, xcount)]}","</tpl>","{[this.closeRows()]}","</tbody>","</table>","{%if (this.closeTableWrap)out.push(this.closeTableWrap())%}"],constructor:function(){Ext.XTemplate.prototype.recurse=function(c,d){return this.apply(d?c[d]:c)}},embedFeature:function(f,i,g,h){var j="";if(!f.disabled){j=f.getFeatureTpl(f,i,g,h)}return j},embedFullWidth:function(c){var d='style="width:{fullWidth}px;';if(!c.rowCount){d+="height:1px;"}return d+'"'},openRows:function(){return'<tpl for="rows">'},closeRows:function(){return"</tpl>"},metaRowTpl:['<tr class="'+Ext.baseCSSPrefix+'grid-row {[this.embedRowCls()]}" {[this.embedRowAttr()]}>','<tpl for="columns">','<td class="{cls} '+Ext.baseCSSPrefix+"grid-cell "+Ext.baseCSSPrefix+'grid-cell-{columnId} {{id}-modified} {{id}-tdCls} {[this.firstOrLastCls(xindex, xcount)]}" {{id}-tdAttr}>','<div {unselectableAttr} class="'+Ext.baseCSSPrefix+'grid-cell-inner {unselectableCls}" style="text-align: {align}; {{id}-style};">{{id}}</div>',"</td>","</tpl>","</tr>"],firstOrLastCls:function(d,c){if(d===1){return Ext.view.Table.prototype.firstCls}else{if(d===c){return Ext.view.Table.prototype.lastCls}}},embedRowCls:function(){return"{rowCls}"},embedRowAttr:function(){return"{rowAttr}"},openTableWrap:undefined,closeTableWrap:undefined,getTableTpl:function(n,u){var o,p={openRows:this.openRows,closeRows:this.closeRows,embedFeature:this.embedFeature,embedFullWidth:this.embedFullWidth,openTableWrap:this.openTableWrap,closeTableWrap:this.closeTableWrap},q={},t=n.features||[],i=t.length,r=0,m={embedRowCls:this.embedRowCls,embedRowAttr:this.embedRowAttr,firstOrLastCls:this.firstOrLastCls,unselectableAttr:n.enableTextSelection?"":'unselectable="on"',unselectableCls:n.enableTextSelection?"":Ext.baseCSSPrefix+"unselectable"},s=Array.prototype.slice.call(this.metaRowTpl,0),v;for(;r<i;r++){if(!t[r].disabled){t[r].mutateMetaRowTpl(s);Ext.apply(m,t[r].getMetaRowTplFragments());Ext.apply(q,t[r].getFragmentTpl());Ext.apply(p,t[r].getTableFragments())}}s=new Ext.XTemplate(s.join(""),m);n.row=s.applyTemplate(n);v=new Ext.XTemplate(this.metaTableTpl.join(""),p);o=v.applyTemplate(n);if(!u){o=new Ext.XTemplate(o,q)}return o}});Ext.define("Ext.grid.PagingScroller",{percentageFromEdge:0.35,numFromEdge:2,trailingBufferZone:5,leadingBufferZone:15,scrollToLoadBuffer:200,viewSize:0,rowHeight:21,tableStart:0,tableEnd:0,constructor:function(d){var c=this;c.variableRowHeight=d.variableRowHeight;c.bindView(d.view);Ext.apply(c,d);c.callParent(arguments)},bindView:function(f){var h=this,i={scroll:{fn:h.onViewScroll,element:"el",scope:h},render:h.onViewRender,resize:h.onViewResize,boxready:{fn:h.onViewResize,scope:h,single:true},refresh:h.onViewRefresh,scope:h},g={guaranteedrange:h.onGuaranteedRange,scope:h},j={reconfigure:h.onGridReconfigure,scope:h};if(h.variableRowHeight){i.beforerefresh=h.beforeViewRefresh}if(h.view){h.view.el.un("scroll",h.onViewScroll,h);h.view.un(i);h.store.un(g);if(h.grid){h.grid.un(j)}delete h.view.refreshSize}h.view=f;h.grid=h.view.up("tablepanel");h.store=f.store;if(f.rendered){h.viewSize=h.store.viewSize=Math.ceil(f.getHeight()/h.rowHeight)+h.trailingBufferZone+(h.numFromEdge*2)+h.leadingBufferZone}h.view.refreshSize=Ext.Function.createInterceptor(h.view.refreshSize,h.beforeViewrefreshSize,h);h.position=0;if(h.grid){h.grid.on(j)}else{h.view.on({added:function(){h.grid=h.view.up("tablepanel");h.grid.on(j)},single:true})}h.view.on(h.viewListeners=i);h.store.on(g)},onGridReconfigure:function(b){this.bindView(b.view)},onViewRender:function(){var c=this,d=c.view.el;d.setStyle("position","relative");c.stretcher=d.createChild({style:{position:"absolute",width:"1px",height:0,top:0,left:0}},d.dom.firstChild)},onViewResize:function(f,i,g){var h=this,j;j=Math.ceil(g/h.rowHeight)+h.trailingBufferZone+(h.numFromEdge*2)+h.leadingBufferZone;if(j>h.viewSize){h.viewSize=h.store.viewSize=j;h.handleViewScroll(h.lastScrollDirection||1)}},beforeViewRefresh:function(){var j=this,g=j.view,i,f=j.store,h=j.lastScrollDirection;j.commonRecordIndex=undefined;if(h&&(j.previousStart!==undefined)&&(j.scrollProportion===undefined)){i=g.getNodes();if(h===1){if(j.tableStart<=j.previousEnd){j.commonRecordIndex=i.length-1}}else{if(h===-1){if(j.tableEnd>=j.previousStart){j.commonRecordIndex=0}}}j.scrollOffset=-g.el.getOffsetsTo(i[j.commonRecordIndex])[1];j.commonRecordIndex-=(j.tableStart-j.previousStart)}else{j.scrollOffset=undefined}},onViewRefresh:function(){var u=this,s=u.store,v,t=u.view,p=t.el,o=p.dom,m,q,w,n,r,x;if(!s.getCount()){return}if(s.getCount()===s.getTotalCount()||(s.isFiltered()&&!s.remoteFilter)){u.stretcher.setHeight(0);return(u.disabled=true)}else{u.disabled=false}u.stretcher.setHeight(v=u.getScrollHeight());x=o.scrollTop;u.isScrollRefresh=(x>0);if(u.scrollProportion!==undefined){n=u.viewEl.child("table",true);u.scrollProportion=x/(v-n.offsetHeight);n=u.viewEl.child("table",true);n.style.position="absolute";n.style.top=(u.scrollProportion?(v*u.scrollProportion)-(n.offsetHeight*u.scrollProportion):0)+"px"}else{n=p.child("table",true);n.style.position="absolute";n.style.top=(r=(u.tableStart||0)*u.rowHeight)+"px";if(u.scrollOffset){m=t.getNodes();q=-p.getOffsetsTo(m[u.commonRecordIndex])[1];w=q-u.scrollOffset;u.position=(x+=w)}else{if((r>x)||((r+n.offsetHeight)<x+o.clientHeight)){u.position=o.scrollTop=r}}}},beforeViewrefreshSize:function(){if(this.isScrollRefresh){return(this.isScrollRefresh=false)}},onGuaranteedRange:function(f,h,g){var j=this,i=j.store;if(f.length&&j.visibleStart<f[0].index){return}j.previousStart=j.tableStart;j.previousEnd=j.tableEnd;j.tableStart=h;j.tableEnd=g;i.loadRecords(f)},onViewScroll:function(h,j){var i=this,g=i.view,e=i.position;i.position=g.el.dom.scrollTop;if(!i.disabled){i.lastScrollDirection=i.position>e?1:-1;if(e!==i.position){i.handleViewScroll(i.lastScrollDirection)}}},handleViewScroll:function(p){var s=this,n=s.store,q=s.view,r=s.viewSize,m=n.getTotalCount(),t=m-r,u=s.getFirstVisibleRowIndex(),o=s.getLastVisibleRowIndex(),v,l;if(m>=r){s.scrollProportion=undefined;if(p==-1){if(u!==undefined){if(u<(s.tableStart+s.numFromEdge)){v=Math.max(0,o+s.trailingBufferZone-r)}}else{s.scrollProportion=q.el.dom.scrollTop/(q.el.dom.scrollHeight-q.el.dom.clientHeight);v=Math.max(0,m*s.scrollProportion-(r/2)-s.numFromEdge-((s.leadingBufferZone+s.trailingBufferZone)/2))}}else{if(u!==undefined){if(o>(s.tableEnd-s.numFromEdge)){v=Math.max(0,u-s.trailingBufferZone)}}else{s.scrollProportion=q.el.dom.scrollTop/(q.el.dom.scrollHeight-q.el.dom.clientHeight);v=m*s.scrollProportion-(r/2)-s.numFromEdge-((s.leadingBufferZone+s.trailingBufferZone)/2)}}if(v!==undefined){if(v>t){v=t&~1;l=m-1}else{v=v&~1;l=v+r-1}if(n.rangeCached(v,l)){s.cancelLoad();n.guaranteeRange(v,l)}else{s.attemptLoad(v,l)}}}},getFirstVisibleRowIndex:function(){var n=this,i=n.store,j=n.view,k=j.el.dom.scrollTop,m,o,p,l;if(n.variableRowHeight){m=j.getNodes();o=i.getCount();for(p=0;p<o;p++){l=Ext.fly(m[p]).getOffsetsTo(j.el)[1]+m[p].offsetHeight;if(l>j.el.dom.clientHeight){return}if(l>0){return p+n.tableStart}}}else{return Math.floor(k/n.rowHeight)}},getLastVisibleRowIndex:function(){var l=this,p=l.store,j=l.view,i=j.el.dom.clientHeight,k,m,n,o;if(l.variableRowHeight){k=j.getNodes();m=p.getCount();for(n=m-1;n>=0;n--){o=Ext.fly(k[n]).getOffsetsTo(j.el)[1];if(o<0){return}if(o<i){return n+l.tableStart}}}else{return l.getFirstVisibleRowIndex()+Math.ceil(i/l.rowHeight)+1}},getScrollHeight:function(){var m=this,j=m.view,n,k,p=m.store,i,l=0,o=!m.hasOwnProperty("rowHeight");if(m.variableRowHeight){n=m.view.el.down("table",true);if(o){m.initialTableHeight=n.offsetHeight;m.rowHeight=m.initialTableHeight/m.store.getCount()}else{l=n.offsetHeight-m.initialTableHeight}}else{if(o){k=j.el.down(j.getItemSelector());if(k){m.rowHeight=k.getHeight(false,true)}}}return Math.floor(p.getTotalCount()*m.rowHeight)+l},attemptLoad:function(f,e){var d=this;if(d.scrollToLoadBuffer){if(!d.loadTask){d.loadTask=new Ext.util.DelayedTask(d.doAttemptLoad,d,[])}d.loadTask.delay(d.scrollToLoadBuffer,d.doAttemptLoad,d,[f,e])}else{d.store.guaranteeRange(f,e)}},cancelLoad:function(){if(this.loadTask){this.loadTask.cancel()}},doAttemptLoad:function(c,d){this.store.guaranteeRange(c,d)},destroy:function(){var c=this,d=c.viewListeners.scroll;c.store.un({guaranteedrange:c.onGuaranteedRange,scope:c});c.view.un(c.viewListeners);if(c.view.rendered){c.stretcher.remove();c.view.el.un("scroll",d.fn,d.scope)}}});Ext.define("Ext.util.History",{singleton:true,alternateClassName:"Ext.History",mixins:{observable:"Ext.util.Observable"},useTopWindow:true,fieldId:Ext.baseCSSPrefix+"history-field",iframeId:Ext.baseCSSPrefix+"history-frame",constructor:function(){var b=this;b.oldIEMode=Ext.isIE6||Ext.isIE7||!Ext.isStrict&&Ext.isIE8;b.iframe=null;b.hiddenField=null;b.ready=false;b.currentToken=null;b.mixins.observable.constructor.call(b)},getHash:function(){var d=window.location.href,c=d.indexOf("#");return c>=0?d.substr(c+1):null},setHash:function(g){var f=this,h=f.useTopWindow?window.top:window;try{h.location.hash=g}catch(e){}},doSave:function(){this.hiddenField.value=this.currentToken},handleStateChange:function(b){this.currentToken=b;this.fireEvent("change",b)},updateIFrame:function(e){var f='<html><body><div id="state">'+Ext.util.Format.htmlEncode(e)+"</div></body></html>",g;try{g=this.iframe.contentWindow.document;g.open();g.write(f);g.close();return true}catch(h){return false}},checkIFrame:function(){var k=this,g=k.iframe.contentWindow,j,l,h,i;if(!g||!g.document){Ext.Function.defer(this.checkIFrame,10,this);return}j=g.document;l=j.getElementById("state");h=l?l.innerText:null;i=k.getHash();Ext.TaskManager.start({run:function(){var a=g.document,b=a.getElementById("state"),d=b?b.innerText:null,c=k.getHash();if(d!==h){h=d;k.handleStateChange(d);k.setHash(d);i=d;k.doSave()}else{if(c!==i){i=c;k.updateIFrame(c)}}},interval:50,scope:k});k.ready=true;k.fireEvent("ready",k)},startUp:function(){var d=this,c;d.currentToken=d.hiddenField.value||this.getHash();if(d.oldIEMode){d.checkIFrame()}else{c=d.getHash();Ext.TaskManager.start({run:function(){var a=d.getHash();if(a!==c){c=a;d.handleStateChange(c);d.doSave()}},interval:50,scope:d});d.ready=true;d.fireEvent("ready",d)}},init:function(g,e){var h=this,f=Ext.DomHelper;if(h.ready){Ext.callback(g,e,[h]);return}if(!Ext.isReady){Ext.onReady(function(){h.init(g,e)});return}h.hiddenField=Ext.getDom(h.fieldId);if(!h.hiddenField){h.hiddenField=Ext.getBody().createChild({id:Ext.id(),tag:"form",cls:Ext.baseCSSPrefix+"hide-display",children:[{tag:"input",type:"hidden",id:h.fieldId}]},false,true).firstChild}if(h.oldIEMode){h.iframe=Ext.getDom(h.iframeId);if(!h.iframe){h.iframe=f.append(h.hiddenField.parentNode,{tag:"iframe",id:h.iframeId})}}h.addEvents("ready","change");if(g){h.on("ready",g,e,{single:true})}h.startUp()},add:function(e,f){var d=this;if(f!==false){if(d.getToken()===e){return true}}if(d.oldIEMode){return d.updateIFrame(e)}else{d.setHash(e);return true}},back:function(){window.history.go(-1)},forward:function(){window.history.go(1)},getToken:function(){return this.ready?this.currentToken:this.getHash()}});Ext.define("Ext.data.JsonP",{singleton:true,statics:{requestCount:0,requests:{}},timeout:30000,disableCaching:true,disableCachingParam:"_dc",callbackKey:"callback",request:function(n){n=Ext.apply({},n);if(!n.url){Ext.Error.raise("A url must be specified for a JSONP request.")}var r=this,w=Ext.isDefined(n.disableCaching)?n.disableCaching:r.disableCaching,t=n.disableCachingParam||r.disableCachingParam,x=++r.statics().requestCount,p=n.callbackName||"callback"+x,s=n.callbackKey||r.callbackKey,o=Ext.isDefined(n.timeout)?n.timeout:r.timeout,v=Ext.apply({},n.params),y=n.url,z=Ext.name,u,q;v[s]=z+".data.JsonP."+p;if(w){v[t]=new Date().getTime()}q=r.createScript(y,v,n);r.statics().requests[x]=u={url:y,params:v,script:q,id:x,scope:n.scope,success:n.success,failure:n.failure,callback:n.callback,callbackKey:s,callbackName:p};if(o>0){u.timeout=setTimeout(Ext.bind(r.handleTimeout,r,[u]),o)}r.setupErrorHandling(u);r[p]=Ext.bind(r.handleResponse,r,[u],true);r.loadScript(u);return u},abort:function(h){var e=this,g=e.statics().requests,f;if(h){if(!h.id){h=g[h]}e.handleAbort(h)}else{for(f in g){if(g.hasOwnProperty(f)){e.abort(g[f])}}}},setupErrorHandling:function(b){b.script.onerror=Ext.bind(this.handleError,this,[b])},handleAbort:function(b){b.errorType="abort";this.handleResponse(null,b)},handleError:function(b){b.errorType="error";this.handleResponse(null,b)},cleanupErrorHandling:function(b){b.script.onerror=null},handleTimeout:function(b){b.errorType="timeout";this.handleResponse(null,b)},handleResponse:function(e,d){var f=true;if(d.timeout){clearTimeout(d.timeout)}delete this[d.callbackName];delete this.statics().requests[d.id];this.cleanupErrorHandling(d);Ext.fly(d.script).remove();if(d.errorType){f=false;Ext.callback(d.failure,d.scope,[d.errorType])}else{Ext.callback(d.success,d.scope,[e])}Ext.callback(d.callback,d.scope,[f,e,d.errorType])},createScript:function(h,g,e){var f=document.createElement("script");f.setAttribute("src",Ext.urlAppend(h,Ext.Object.toQueryString(g)));f.setAttribute("async",true);f.setAttribute("type","text/javascript");return f},loadScript:function(b){Ext.getHead().appendChild(b.script)}});Ext.define("Ext.view.DropZone",{extend:"Ext.dd.DropZone",indicatorHtml:'<div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-left"></div><div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-right"></div>',indicatorCls:Ext.baseCSSPrefix+"grid-drop-indicator",constructor:function(d){var c=this;Ext.apply(c,d);if(!c.ddGroup){c.ddGroup="view-dd-zone-"+c.view.id}c.callParent([c.view.el])},fireViewEvent:function(){var c=this,d;c.lock();d=c.view.fireEvent.apply(c.view,arguments);c.unlock();return d},getTargetFromEvent:function(k){var l=k.getTarget(this.view.getItemSelector()),o,p,e,n,i,m;if(!l){o=k.getPageY();for(n=0,p=this.view.getNodes(),i=p.length;n<i;n++){e=p[n];m=Ext.fly(e).getBox();if(o<=m.bottom){return e}}}return l},getIndicator:function(){var b=this;if(!b.indicator){b.indicator=new Ext.Component({html:b.indicatorHtml,cls:b.indicatorCls,ownerCt:b.view,floating:true,shadow:false})}return b.indicator},getPosition:function(j,g){var h=j.getXY()[1],e=Ext.fly(g).getRegion(),i;if((e.bottom-h)>=(e.bottom-e.top)/2){i="before"}else{i="after"}return i},containsRecordAtOffset:function(m,h,k){if(!h){return false}var i=this.view,n=i.indexOf(h),l=i.getNode(n+k),j=l?i.getRecord(l):null;return j&&Ext.Array.contains(m,j)},positionIndicator:function(q,p,o){var n=this,l=n.view,m=n.getPosition(o,q),e=l.getRecord(q),r=p.records,k;if(!Ext.Array.contains(r,e)&&(m=="before"&&!n.containsRecordAtOffset(r,e,-1)||m=="after"&&!n.containsRecordAtOffset(r,e,1))){n.valid=true;if(n.overRecord!=e||n.currentPosition!=m){k=Ext.fly(q).getY()-l.el.getY()-1;if(m=="after"){k+=Ext.fly(q).getHeight()}n.getIndicator().setWidth(Ext.fly(l.el).getWidth()).showAt(0,k);n.overRecord=e;n.currentPosition=m}}else{n.invalidateDrop()}},invalidateDrop:function(){if(this.valid){this.valid=false;this.getIndicator().hide()}},onNodeOver:function(j,g,h,i){var e=this;if(!Ext.Array.contains(i.records,e.view.getRecord(j))){e.positionIndicator(j,i,h)}return e.valid?e.dropAllowed:e.dropNotAllowed},notifyOut:function(j,g,h,i){var e=this;e.callParent(arguments);delete e.overRecord;delete e.currentPosition;if(e.indicator){e.indicator.hide()}},onContainerOver:function(h,i,j){var k=this,e=k.view,l=e.store.getCount();if(l){k.positionIndicator(e.getNode(l-1),j,i)}else{delete k.overRecord;delete k.currentPosition;k.getIndicator().setWidth(Ext.fly(e.el).getWidth()).showAt(0,0);k.valid=true}return k.dropAllowed},onContainerDrop:function(e,f,d){return this.onNodeDrop(e,null,f,d)},onNodeDrop:function(n,j,l,m){var o=this,p=false,e={wait:false,processDrop:function(){o.invalidateDrop();o.handleNodeDrop(m,o.overRecord,o.currentPosition);p=true;o.fireViewEvent("drop",n,m,o.overRecord,o.currentPosition)},cancelDrop:function(){o.invalidateDrop();p=true}},k=false;if(o.valid){k=o.fireViewEvent("beforedrop",n,m,o.overRecord,o.currentPosition,e);if(e.wait){return}if(k!==false){if(!p){e.processDrop()}}}return k},destroy:function(){Ext.destroy(this.indicator);delete this.indicator;this.callParent()}});Ext.define("Ext.data.reader.Array",{extend:"Ext.data.reader.Json",alternateClassName:"Ext.data.ArrayReader",alias:"reader.array",totalProperty:undefined,successProperty:undefined,createFieldAccessExpression:function(i,l,g){var j=this,k=(i.mapping==null)?j.model.prototype.fields.indexOf(i):i.mapping,h;if(typeof k==="function"){h=l+".mapping("+g+", this)"}else{if(isNaN(k)){k='"'+k+'"'}h=g+"["+k+"]"}if(i.defaultValue!==undefined){h="("+h+" === undefined) ? "+l+".defaultValue : "+h}if(i.convert){h=l+".convert("+h+", record)"}return h}});Ext.define("Ext.util.Queue",{constructor:function(){this.clear()},add:function(f){var d=this,e=d.getKey(f);if(!d.map[e]){++d.length;d.items.push(f);d.map[e]=f}return f},clear:function(){var c=this,d=c.items;c.items=[];c.map={};c.length=0;return d},contains:function(c){var d=this.getKey(c);return this.map.hasOwnProperty(d)},getCount:function(){return this.length},getKey:function(b){return b.id},remove:function(h){var i=this,j=i.getKey(h),g=i.items,f;if(i.map[j]){f=Ext.Array.indexOf(g,h);Ext.Array.erase(g,f,1);delete i.map[j];--i.length}return h}});Ext.define("Ext.ElementLoader",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.data.Connection","Ext.Ajax"],statics:{Renderer:{Html:function(e,d,f){e.getTarget().update(d.responseText,f.scripts===true);return true}}},url:null,params:null,baseParams:null,autoLoad:false,target:null,loadMask:false,ajaxOptions:null,scripts:false,isLoader:true,constructor:function(d){var f=this,e;d=d||{};Ext.apply(f,d);f.setTarget(f.target);f.addEvents("beforeload","exception","load");f.mixins.observable.constructor.call(f);if(f.autoLoad){e=f.autoLoad;if(e===true){e={}}f.load(e)}},setTarget:function(c){var d=this;c=Ext.get(c);if(d.target&&d.target!=c){d.abort()}d.target=c},getTarget:function(){return this.target||null},abort:function(){var b=this.active;if(b!==undefined){Ext.Ajax.abort(b.request);if(b.mask){this.removeMask()}delete this.active}},removeMask:function(){this.target.unmask()},addMask:function(b){this.target.mask(b===true?null:b)},load:function(k){if(!this.target){Ext.Error.raise("A valid target is required when loading content")}k=Ext.apply({},k);var n=this,o=n.target,j=Ext.isDefined(k.loadMask)?k.loadMask:n.loadMask,q=Ext.apply({},k.params),r=Ext.apply({},k.ajaxOptions),m=k.callback||n.callback,l=k.scope||n.scope||n,p;Ext.applyIf(r,n.ajaxOptions);Ext.applyIf(k,r);Ext.applyIf(q,n.params);Ext.apply(q,n.baseParams);Ext.applyIf(k,{url:n.url});if(!k.url){Ext.Error.raise("You must specify the URL from which content should be loaded")}Ext.apply(k,{scope:n,params:q,callback:n.onComplete});if(n.fireEvent("beforeload",n,k)===false){return}if(j){n.addMask(j)}p=Ext.Ajax.request(k);n.active={request:p,options:k,mask:j,scope:l,callback:m,success:k.success||n.success,failure:k.failure||n.failure,renderer:k.renderer||n.renderer,scripts:Ext.isDefined(k.scripts)?k.scripts:n.scripts};n.setOptions(n.active,k)},setOptions:Ext.emptyFn,onComplete:function(h,j,i){var m=this,k=m.active,n=k.scope,l=m.getRenderer(k.renderer);if(j){j=l.call(m,m,i,k)}if(j){Ext.callback(k.success,n,[m,i,h]);m.fireEvent("load",m,i,h)}else{Ext.callback(k.failure,n,[m,i,h]);m.fireEvent("exception",m,i,h)}Ext.callback(k.callback,n,[m,j,i,h]);if(k.mask){m.removeMask()}delete m.active},getRenderer:function(b){if(Ext.isFunction(b)){return b}return this.statics().Renderer.Html},startAutoRefresh:function(e,d){var f=this;f.stopAutoRefresh();f.autoRefresh=setInterval(function(){f.load(d)},e)},stopAutoRefresh:function(){clearInterval(this.autoRefresh);delete this.autoRefresh},isAutoRefreshing:function(){return Ext.isDefined(this.autoRefresh)},destroy:function(){var b=this;b.stopAutoRefresh();delete b.target;b.abort();b.clearListeners()}});Ext.define("Ext.layout.component.Draw",{alias:"layout.draw",extend:"Ext.layout.component.Auto",type:"draw",measureContentWidth:function(j){var i=j.target,g=i.surface,f=j.getPaddingInfo(),h=j.surfaceBBox||(j.surfaceBBox=g.items.getBBox());if(!i.viewBox){if(i.autoSize){return h.width+f.width}else{return h.x+h.width+f.width}}else{if(j.heightModel.shrinkWrap){return f.width}else{return h.width/h.height*(j.getProp("contentHeight")-f.height)+f.width}}},measureContentHeight:function(j){var i=j.target,g=i.surface,f=j.getPaddingInfo(),h=j.surfaceBBox||(j.surfaceBBox=g.items.getBBox());if(!j.target.viewBox){if(i.autoSize){return h.height+f.height}else{return h.y+h.height+f.height}}else{if(j.widthModel.shrinkWrap){return f.height}else{return h.height/h.width*(j.getProp("contentWidth")-f.width)+f.height}}},publishInnerWidth:function(c,d){c.setContentWidth(d-c.getFrameInfo().width,true)},publishInnerHeight:function(c,d){c.setContentHeight(d-c.getFrameInfo().height,true)},finishedLayout:function(f){var d=f.props,e=f.getPaddingInfo();this.owner.setSurfaceSize(d.contentWidth-e.width,d.contentHeight-e.height);this.callParent(arguments)}});Ext.define("Ext.grid.LockingView",{mixins:{observable:"Ext.util.Observable"},eventRelayRe:/^(beforeitem|beforecontainer|item|container|cell)/,constructor:function(p){var m=this,k=[],j=m.eventRelayRe,i=p.locked.getView(),l=p.normal.getView(),o,n;Ext.apply(m,{lockedView:i,normalView:l,lockedGrid:p.locked,normalGrid:p.normal,panel:p.panel});m.mixins.observable.constructor.call(m,p);o=i.events;for(n in o){if(o.hasOwnProperty(n)&&j.test(n)){k.push(n)}}m.relayEvents(i,k);m.relayEvents(l,k);l.on({scope:m,itemmouseleave:m.onItemMouseLeave,itemmouseenter:m.onItemMouseEnter});i.on({scope:m,itemmouseleave:m.onItemMouseLeave,itemmouseenter:m.onItemMouseEnter})},getGridColumns:function(){var b=this.lockedGrid.headerCt.getGridColumns();return b.concat(this.normalGrid.headerCt.getGridColumns())},getEl:function(b){return this.getViewForColumn(b).getEl()},getViewForColumn:function(d){var e=this.lockedView,f;e.headerCt.cascade(function(a){if(a===d){f=true;return false}});return f?e:this.normalView},onItemMouseEnter:function(l,g){var i=this,k=i.lockedView,h=i.normalView,j;if(l.trackOver){if(l!==k){h=k}j=h.getNode(g);h.highlightItem(j)}},onItemMouseLeave:function(j,f){var h=this,i=h.lockedView,g=h.normalView;if(j.trackOver){if(j!==i){g=i}g.clearHighlight()}},relayFn:function(f,d){d=d||[];var e=this.lockedView;e[f].apply(e,d||[]);e=this.normalView;e[f].apply(e,d||[])},getSelectionModel:function(){return this.panel.getSelectionModel()},getStore:function(){return this.panel.store},getNode:function(b){return this.normalView.getNode(b)},getCell:function(e,h){var f=this.getViewForColumn(h),g;g=f.getNode(e);return Ext.fly(g).down(h.getCellSelector())},getRecord:function(c){var d=this.lockedView.getRecord(c);if(!c){d=this.normalView.getRecord(c)}return d},addElListener:function(e,f,d){this.relayFn("addElListener",arguments)},refreshNode:function(){this.relayFn("refreshNode",arguments)},refresh:function(){this.relayFn("refresh",arguments)},bindStore:function(){this.relayFn("bindStore",arguments)},addRowCls:function(){this.relayFn("addRowCls",arguments)},removeRowCls:function(){this.relayFn("removeRowCls",arguments)}});Ext.define("Ext.layout.ClassList",(function(){var c=Ext.String.splitWords,d=Ext.Array.toMap;return{dirty:false,constructor:function(a){this.owner=a;this.map=d(this.classes=c(a.el.className))},add:function(b){var a=this;if(!a.map[b]){a.map[b]=true;a.classes.push(b);if(!a.dirty){a.dirty=true;a.owner.markDirty()}}},addMany:function(a){Ext.each(c(a),this.add,this)},contains:function(a){return this.map[a]},flush:function(){this.owner.el.className=this.classes.join(" ");this.dirty=false},remove:function(b){var a=this;if(a.map[b]){delete a.map[b];a.classes=Ext.Array.filter(a.classes,function(f){return f!=b});if(!a.dirty){a.dirty=true;a.owner.markDirty()}}},removeMany:function(b){var a=this,f=d(c(b));a.classes=Ext.Array.filter(a.classes,function(e){if(!f[e]){return true}delete a.map[e];if(!a.dirty){a.dirty=true;a.owner.markDirty()}return false})}}}()));Ext.define("Ext.draw.CompositeSprite",{extend:"Ext.util.MixedCollection",mixins:{animate:"Ext.util.Animate"},autoDestroy:false,isCompositeSprite:true,constructor:function(d){var c=this;d=d||{};Ext.apply(c,d);c.addEvents("mousedown","mouseup","mouseover","mouseout","click");c.id=Ext.id(null,"ext-sprite-group-");c.callParent()},onClick:function(b){this.fireEvent("click",b)},onMouseUp:function(b){this.fireEvent("mouseup",b)},onMouseDown:function(b){this.fireEvent("mousedown",b)},onMouseOver:function(b){this.fireEvent("mouseover",b)},onMouseOut:function(b){this.fireEvent("mouseout",b)},attachEvents:function(c){var d=this;c.on({scope:d,mousedown:d.onMouseDown,mouseup:d.onMouseUp,mouseover:d.onMouseOver,mouseout:d.onMouseOut,click:d.onClick})},add:function(d,f){var e=this.callParent(arguments);this.attachEvents(e);return e},insert:function(e,d,f){return this.callParent(arguments)},remove:function(c){var d=this;c.un({scope:d,mousedown:d.onMouseDown,mouseup:d.onMouseUp,mouseover:d.onMouseOver,mouseout:d.onMouseOut,click:d.onClick});return d.callParent(arguments)},getBBox:function(){var t=0,i,q,p=this.items,s=this.length,r=Infinity,v=r,n=-r,w=r,o=-r,u,x;for(;t<s;t++){i=p[t];if(i.el&&!i.bboxExcluded){q=i.getBBox();v=Math.min(v,q.x);w=Math.min(w,q.y);n=Math.max(n,q.height+q.y);o=Math.max(o,q.width+q.x)}}return{x:v,y:w,height:n-w,width:o-v}},setAttributes:function(j,h){var i=0,f=this.items,g=this.length;for(;i<g;i++){f[i].setAttributes(j,h)}return this},hide:function(g){var h=0,e=this.items,f=this.length;for(;h<f;h++){e[h].hide(g)}return this},show:function(g){var h=0,e=this.items,f=this.length;for(;h<f;h++){e[h].show(g)}return this},redraw:function(){var h=this,i=0,j=h.items,f=h.getSurface(),g=h.length;if(f){for(;i<g;i++){f.renderItem(j[i])}}return h},setStyle:function(i){var l=0,g=this.items,h=this.length,j,k;for(;l<h;l++){j=g[l];k=j.el;if(k){k.setStyle(i)}}},addCls:function(h){var i=0,j=this.items,f=this.getSurface(),g=this.length;if(f){for(;i<g;i++){f.addCls(j[i],h)}}},removeCls:function(h){var i=0,j=this.items,f=this.getSurface(),g=this.length;if(f){for(;i<g;i++){f.removeCls(j[i],h)}}},getSurface:function(){var b=this.first();if(b){return b.surface}return null},destroy:function(){var g=this,f=g.getSurface(),h=g.autoDestroy,e;if(f){while(g.getCount()>0){e=g.first();g.remove(e);f.remove(e,h)}}g.clearListeners()}});Ext.define("Ext.window.Window",{extend:"Ext.panel.Panel",alternateClassName:"Ext.Window",requires:["Ext.util.ComponentDragger","Ext.util.Region","Ext.EventManager"],alias:"widget.window",baseCls:Ext.baseCSSPrefix+"window",resizable:true,draggable:true,constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:50,minWidth:50,expandOnShow:true,collapsible:false,closable:true,hidden:true,autoRender:true,hideMode:"offsets",floating:true,ariaRole:"alertdialog",itemCls:Ext.baseCSSPrefix+"window-item",overlapHeader:true,ignoreHeaderBorderManagement:true,isWindow:true,initComponent:function(){var b=this;b.callParent();b.addEvents("resize","maximize","minimize","restore");if(b.plain){b.addClsWithUI("plain")}if(b.modal){b.ariaRole="dialog"}if(b.floating){b.on({element:"el",mousedown:b.onMouseDown,scope:b})}b.frame=true;b.addStateEvents(["maximize","restore","resize","dragend"])},getElConfig:function(){var c=this,d;d=c.callParent();d.tabIndex=-1;return d},getState:function(){var d=this,f=d.callParent()||{},e=!!d.maximized;f.maximized=e;Ext.apply(f,{size:e?d.restoreSize:d.getSize(),pos:e?d.restorePos:d.getPosition()});return f},applyState:function(c){var d=this;if(c){d.maximized=c.maximized;if(d.maximized){d.hasSavedRestore=true;d.restoreSize=c.size;d.restorePos=c.pos}else{Ext.apply(d,{width:c.size.width,height:c.size.height,x:c.pos[0],y:c.pos[1]})}}},onMouseDown:function(c){var d;if(this.floating){if(Ext.fly(c.getTarget()).focusable()){d=true}this.toFront(d)}},onRender:function(d,e){var f=this;f.callParent(arguments);f.focusEl=f.el;if(f.maximizable){f.header.on({scope:f,dblclick:f.toggleMaximize})}},afterRender:function(){var d=this,c;d.callParent();if(d.maximized){d.maximized=false;d.maximize()}if(d.closable){c=d.getKeyMap();c.on(27,d.onEsc,d);c.disable()}},initDraggable:function(){var c=this,d;if(!c.header){c.updateHeader(true)}if(c.header){d=Ext.applyIf({el:c.el,delegate:"#"+c.header.id},c.draggable);if(c.constrain||c.constrainHeader){d.constrain=c.constrain;d.constrainDelegate=c.constrainHeader;d.constrainTo=c.constrainTo||c.container}c.dd=new Ext.util.ComponentDragger(this,d);c.relayEvents(c.dd,["dragstart","drag","dragend"])}},onEsc:function(d,c){if(!Ext.FocusManager||!Ext.FocusManager.enabled||Ext.FocusManager.focusedCmp===this){c.stopEvent();this.close()}},beforeDestroy:function(){var b=this;if(b.rendered){delete this.animateTarget;b.hide();Ext.destroy(b.keyMap)}b.callParent()},addTools:function(){var b=this;b.callParent();if(b.minimizable){b.addTool({type:"minimize",handler:Ext.Function.bind(b.minimize,b,[])})}if(b.maximizable){b.addTool({type:"maximize",handler:Ext.Function.bind(b.maximize,b,[])});b.addTool({type:"restore",handler:Ext.Function.bind(b.restore,b,[]),hidden:true})}},getFocusEl:function(){return this.getDefaultFocus()},getDefaultFocus:function(){var h=this,e,g=h.defaultButton||h.defaultFocus,f;if(g!==undefined){if(Ext.isNumber(g)){e=h.query("button")[g]}else{if(Ext.isString(g)){f=g;if(f.substr(0,1)!=="#"){f="#"+f}e=h.down(f)}else{if(g.focus){e=g}}}}return e||h.el},onFocus:function(){var c=this,d;if((Ext.FocusManager&&Ext.FocusManager.enabled)||((d=c.getDefaultFocus())===c)){c.callParent(arguments)}else{d.focus()}},afterShow:function(f){var d=this,e=f||d.animateTarget;if(this.expandOnShow){this.expand(false)}d.callParent(arguments);if(d.maximized){d.fitContainer()}d.syncMonitorWindowResize();if(!e){d.doConstrain()}if(d.keyMap){d.keyMap.enable()}},doClose:function(){var b=this;if(b.hidden){b.fireEvent("close",b);if(b.closeAction=="destroy"){this.destroy()}}else{b.hide(b.animateTarget,b.doClose,b)}},afterHide:function(){var b=this;b.syncMonitorWindowResize();if(b.keyMap){b.keyMap.disable()}b.callParent(arguments)},onWindowResize:function(){if(this.maximized){this.fitContainer()}this.doConstrain()},minimize:function(){this.fireEvent("minimize",this);return this},afterCollapse:function(){var b=this;if(b.maximizable){b.tools.maximize.hide();b.tools.restore.hide()}if(b.resizer){b.resizer.disable()}b.callParent(arguments)},afterExpand:function(){var b=this;if(b.maximized){b.tools.restore.show()}else{if(b.maximizable){b.tools.maximize.show()}}if(b.resizer){b.resizer.enable()}b.callParent(arguments)},maximize:function(){var b=this;if(!b.maximized){b.expand(false);if(!b.hasSavedRestore){b.restoreSize=b.getSize();b.restorePos=b.getPosition(true)}if(b.maximizable){b.tools.maximize.hide();b.tools.restore.show()}b.maximized=true;b.el.disableShadow();if(b.dd){b.dd.disable()}if(b.resizer){b.resizer.disable()}if(b.collapseTool){b.collapseTool.hide()}b.el.addCls(Ext.baseCSSPrefix+"window-maximized");b.container.addCls(Ext.baseCSSPrefix+"window-maximized-ct");b.syncMonitorWindowResize();b.setPosition(0,0);b.fitContainer();b.fireEvent("maximize",b)}return b},restore:function(){var d=this,c=d.tools;if(d.maximized){delete d.hasSavedRestore;d.removeCls(Ext.baseCSSPrefix+"window-maximized");if(c.restore){c.restore.hide()}if(c.maximize){c.maximize.show()}if(d.collapseTool){d.collapseTool.show()}d.setPosition(d.restorePos);d.setSize(d.restoreSize);delete d.restorePos;delete d.restoreSize;d.maximized=false;d.el.enableShadow(true);if(d.dd){d.dd.enable()}if(d.resizer){d.resizer.enable()}d.container.removeCls(Ext.baseCSSPrefix+"window-maximized-ct");d.syncMonitorWindowResize();d.doConstrain();d.fireEvent("restore",d)}return d},syncMonitorWindowResize:function(){var e=this,h=e._monitoringResize,g=e.monitorResize||e.constrain||e.constrainHeader||e.maximized,f=e.hidden||e.destroying||e.isDestroyed;if(g&&!f){if(!h){Ext.EventManager.onWindowResize(e.onWindowResize,e);e._monitoringResize=true}}else{if(h){Ext.EventManager.removeResizeListener(e.onWindowResize,e);e._monitoringResize=false}}},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()}});Ext.define("Ext.grid.ViewDropZone",{extend:"Ext.view.DropZone",indicatorHtml:'<div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-left"></div><div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-right"></div>',indicatorCls:Ext.baseCSSPrefix+"grid-drop-indicator",handleNodeDrop:function(q,o,n){var k=this.view,i=k.getStore(),l,r,p,m;if(q.copy){r=q.records;q.records=[];for(p=0,m=r.length;p<m;p++){q.records.push(r[p].copy(r[p].getId()))}}else{q.view.store.remove(q.records,q.view===k)}l=i.indexOf(o);if(n!=="before"){l++}i.insert(l,q.records);k.getSelectionModel().select(q.records)}});Ext.define("Ext.data.ArrayStore",{extend:"Ext.data.Store",alias:"store.array",requires:["Ext.data.proxy.Memory","Ext.data.reader.Array"],constructor:function(b){b=Ext.apply({proxy:{type:"memory",reader:"array"}},b);this.callParent([b])},loadData:function(h,g){if(this.expandData===true){var i=[],f=0,j=h.length;for(;f<j;f++){i[i.length]=[h[f]]}h=i}this.callParent([h,g])}},function(){Ext.data.SimpleStore=Ext.data.ArrayStore});Ext.define("Ext.ComponentLoader",{extend:"Ext.ElementLoader",statics:{Renderer:{Data:function(g,e,i){var h=true;try{g.getTarget().update(Ext.decode(e.responseText))}catch(j){h=false}return h},Component:function(i,n,k){var j=true,l=i.getTarget(),e=[];if(!l.isContainer){Ext.Error.raise({target:l,msg:"Components can only be loaded into a container"})}try{e=Ext.decode(n.responseText)}catch(m){j=false}if(j){l.suspendLayouts();if(k.removeAll){l.removeAll()}l.add(e);l.resumeLayouts(true)}return j}}},target:null,loadMask:false,renderer:"html",setTarget:function(c){var d=this;if(Ext.isString(c)){c=Ext.getCmp(c)}if(d.target&&d.target!=c){d.abort()}d.target=c},removeMask:function(){this.target.setLoading(false)},addMask:function(b){this.target.setLoading(b)},setOptions:function(c,d){c.removeAll=Ext.isDefined(d.removeAll)?d.removeAll:this.removeAll},getRenderer:function(c){if(Ext.isFunction(c)){return c}var d=this.statics().Renderer;switch(c){case"component":return d.Component;case"data":return d.Data;default:return Ext.ElementLoader.Renderer.Html}}});Ext.define("Ext.grid.Lockable",{requires:["Ext.grid.LockingView","Ext.view.Table"],syncRowHeight:true,headerCounter:0,scrollDelta:40,unlockText:"Unlock",lockText:"Lock",determineXTypeToCreate:function(){var l=this,i,k,g,j,h;if(l.subGridXType){i=l.subGridXType}else{k=this.getXTypes().split("/");g=k.length;j=k[g-1];h=k[g-2];if(h!=="tablepanel"){i=h}else{i=j}}return i},injectLockable:function(){this.lockable=true;this.hasView=true;var t=this,y=Ext.getScrollbarSize().width===0,s=t.store=Ext.StoreManager.lookup(t.store),H=t.determineXTypeToCreate(),x=t.getSelectionModel(),z=t.prepareFeatures(),C=t.prepareFeatures(),E,v,B=0,w,F,G,A,i,D,u;for(B=0,w=(z?z.length:0);B<w;B++){z[B].lockingPartner=C[B];C[B].lockingPartner=z[B]}E=Ext.apply({xtype:H,store:s,scrollerOwner:false,enableAnimations:false,scroll:y?"vertical":false,selModel:x,border:false,cls:Ext.baseCSSPrefix+"grid-inner-locked",isLayoutRoot:function(){return false},features:z},t.lockedGridConfig);v=Ext.apply({xtype:H,store:s,scrollerOwner:false,enableAnimations:false,selModel:x,border:false,isLayoutRoot:function(){return false},features:C},t.normalGridConfig);t.addCls(Ext.baseCSSPrefix+"grid-locked");Ext.copyTo(v,t,t.bothCfgCopy);Ext.copyTo(E,t,t.bothCfgCopy);Ext.copyTo(v,t,t.normalCfgCopy);Ext.copyTo(E,t,t.lockedCfgCopy);for(B=0;B<t.normalCfgCopy.length;B++){delete t[t.normalCfgCopy[B]]}for(B=0;B<t.lockedCfgCopy.length;B++){delete t[t.lockedCfgCopy[B]]}t.addEvents("lockcolumn","unlockcolumn");t.addStateEvents(["lockcolumn","unlockcolumn"]);t.lockedHeights=[];t.normalHeights=[];F=t.processColumns(t.columns);E.width=F.lockedWidth+Ext.num(x.headerWidth,0);E.columns=F.locked;v.columns=F.normal;v.flex=1;E.viewConfig=t.lockedViewConfig||{};E.viewConfig.loadingUseMsg=false;v.viewConfig=t.normalViewConfig||{};Ext.applyIf(E.viewConfig,t.viewConfig);Ext.applyIf(v.viewConfig,t.viewConfig);t.normalGrid=Ext.ComponentManager.create(v);t.lockedGrid=Ext.ComponentManager.create(E);t.view=new Ext.grid.LockingView({locked:t.lockedGrid,normal:t.normalGrid,panel:t});i=t.lockedGrid.getView();D=t.normalGrid.getView();if(y){u={scroll:{fn:t.onLockedViewScroll,element:"el",scope:t}}}else{u={mousewheel:{fn:t.onLockedViewMouseWheel,element:"el",scope:t}}}if(t.syncRowHeight){u.refresh=t.onLockedViewRefresh;u.itemupdate=t.onLockedViewItemUpdate;u.scope=t}i.on(u);u={scroll:{fn:t.onNormalViewScroll,element:"el",scope:t},refresh:t.syncRowHeight?t.onNormalViewRefresh:t.updateSpacer,scope:t};D.on(u);G=t.lockedGrid.headerCt;A=t.normalGrid.headerCt;G.lockedCt=true;G.lockableInjected=true;A.lockableInjected=true;G.on({columnshow:t.onLockedHeaderShow,columnhide:t.onLockedHeaderHide,columnmove:t.onLockedHeaderMove,sortchange:t.onLockedHeaderSortChange,columnresize:t.onLockedHeaderResize,scope:t});A.on({columnmove:t.onNormalHeaderMove,sortchange:t.onNormalHeaderSortChange,scope:t});t.modifyHeaderCt();t.items=[t.lockedGrid,t.normalGrid];t.relayHeaderCtEvents(G);t.relayHeaderCtEvents(A);t.layout={type:"hbox",align:"stretch"}},processColumns:function(k){var l=0,i=k.length,h=0,m=[],n=[],j;for(;l<i;++l){j=k[l];if(!j.isComponent){j=Ext.apply({},k[l])}j.processed=true;if(j.locked){if(j.flex){Ext.Error.raise("Columns which are locked do NOT support a flex width. You must set a width on the "+k[l].text+"column.")}if(!j.hidden){h+=j.width||Ext.grid.header.Container.prototype.defaultWidth}m.push(j)}else{n.push(j)}if(!j.headerId){j.headerId=(j.initialConfig||j).id||("L"+(++this.headerCounter))}}return{lockedWidth:h,locked:{items:m,itemId:"lockedHeaderCt",stretchMaxPartner:"^^>>#normalHeaderCt"},normal:{items:n,itemId:"normalHeaderCt",stretchMaxPartner:"^^>>#lockedHeaderCt"}}},onLockedViewMouseWheel:function(j){var m=this,k=-m.scrollDelta,i=k*j.getWheelDeltas().y,e=m.lockedGrid.getView().el.dom,n,l;if(e){n=e.scrollTop!==e.scrollHeight-e.clientHeight;l=e.scrollTop!==0}if((i<0&&l)||(i>0&&n)){j.stopEvent();m.scrolling=true;e.scrollTop+=i;m.normalGrid.getView().el.dom.scrollTop=e.scrollTop;m.scrolling=false;m.onNormalViewScroll()}},onLockedViewScroll:function(){var h=this,i=h.lockedGrid.getView(),j=h.normalGrid.getView(),g,f;if(!h.scrolling){h.scrolling=true;j.el.dom.scrollTop=i.el.dom.scrollTop;if(h.store.buffered){f=i.el.child("table",true);g=j.el.child("table",true);f.style.position="absolute"}h.scrolling=false}},onNormalViewScroll:function(){var h=this,i=h.lockedGrid.getView(),j=h.normalGrid.getView(),g,f;if(!h.scrolling){h.scrolling=true;i.el.dom.scrollTop=j.el.dom.scrollTop;if(h.store.buffered){f=i.el.child("table",true);g=j.el.child("table",true);f.style.position="absolute";f.style.top=g.style.top}h.scrolling=false}},onLockedHeaderMove:function(){if(this.syncRowHeight){this.onNormalViewRefresh()}},onNormalHeaderMove:function(){if(this.syncRowHeight){this.onLockedViewRefresh()}},updateSpacer:function(){var i=this,f=i.lockedGrid.getView().el,j=i.normalGrid.getView().el.dom,g=f.dom.id+"-spacer",h=(j.offsetHeight-j.clientHeight)+"px";i.spacerEl=Ext.getDom(g);if(i.spacerEl){i.spacerEl.style.height=h}else{Ext.core.DomHelper.append(f,{id:g,style:"height: "+h})}},onLockedViewRefresh:function(){if(this.normalGrid.headerCt.getGridColumns().length){var j=this,h=j.lockedGrid.getView(),l=h.el,i=l.query(h.getItemSelector()),k=i.length,g=0;j.lockedHeights=[];for(;g<k;g++){j.lockedHeights[g]=i[g].clientHeight}j.syncRowHeights()}},onNormalViewRefresh:function(){if(this.lockedGrid.headerCt.getGridColumns().length){var j=this,h=j.normalGrid.getView(),l=h.el,i=l.query(h.getItemSelector()),k=i.length,g=0;j.normalHeights=[];for(;g<k;g++){j.normalHeights[g]=i[g].clientHeight}j.syncRowHeights();j.updateSpacer()}},onLockedViewItemUpdate:function(e,d,f){if(this.normalGrid.headerCt.getGridColumns().length){this.lockedHeights[d]=f.clientHeight;this.syncRowHeights()}},onNormalViewItemUpdate:function(e,d,f){if(this.lockedGrid.headerCt.getGridColumns().length){this.normalHeights[d]=f.clientHeight;this.syncRowHeights()}},syncRowHeights:function(){var n=this,u=n.lockedHeights,m=n.normalHeights,v=[],o=u.length,q=0,i,s,r,p,t;if(u.length&&m.length){i=n.lockedGrid.getView();s=n.normalGrid.getView();r=i.el.query(i.getItemSelector());p=s.el.query(s.getItemSelector());for(;q<o;q++){if(!isNaN(u[q])&&!isNaN(m[q])){if(u[q]>m[q]){Ext.fly(p[q]).setHeight(u[q])}else{if(u[q]<m[q]){Ext.fly(r[q]).setHeight(m[q])}}}}t=s.el.dom.scrollTop;s.el.dom.scrollTop=t;i.el.dom.scrollTop=t;n.lockedHeights=[];n.normalHeights=[]}},modifyHeaderCt:function(){var b=this;b.lockedGrid.headerCt.getMenuItems=b.getMenuItems(true);b.normalGrid.headerCt.getMenuItems=b.getMenuItems(false)},onUnlockMenuClick:function(){this.unlock()},onLockMenuClick:function(){this.lock()},getMenuItems:function(i){var m=this,l=m.unlockText,k=m.lockText,p=Ext.baseCSSPrefix+"hmenu-unlock",n=Ext.baseCSSPrefix+"hmenu-lock",j=Ext.Function.bind(m.onUnlockMenuClick,m),o=Ext.Function.bind(m.onLockMenuClick,m);return function(){var a=Ext.grid.header.Container.prototype.getMenuItems.call(this);a.push("-",{cls:p,text:l,handler:j,disabled:!i});a.push({cls:n,text:k,handler:o,disabled:i});return a}},lock:function(i,m){var n=this,l=n.normalGrid,j=n.lockedGrid,k=l.headerCt,h=j.headerCt;i=i||k.getMenu().activeHeader;if(i.flex){i.width=i.getWidth();delete i.flex}Ext.suspendLayouts();k.remove(i,false);i.locked=true;if(Ext.isDefined(m)){h.insert(m,i)}else{h.add(i)}n.syncLockedSection();Ext.resumeLayouts(true);n.updateSpacer();n.fireEvent("lockcolumn",n,i)},syncLockedSection:function(){var b=this;b.syncLockedWidth();b.lockedGrid.getView().refresh();b.normalGrid.getView().refresh()},syncLockedWidth:function(){var f=this,e=f.lockedGrid,d=e.headerCt.getFullWidth(true);Ext.suspendLayouts();if(d>0){e.setWidth(d);e.show()}else{e.hide()}Ext.resumeLayouts(true);return d>0},onLockedHeaderResize:function(){this.syncLockedWidth()},onLockedHeaderHide:function(){this.syncLockedWidth()},onLockedHeaderShow:function(){this.syncLockedWidth()},onLockedHeaderSortChange:function(d,f,e){if(e){this.normalGrid.headerCt.clearOtherSortStates(null,true)}},onNormalHeaderSortChange:function(d,f,e){if(e){this.lockedGrid.headerCt.clearOtherSortStates(null,true)}},unlock:function(j,n){var o=this,m=o.normalGrid,k=o.lockedGrid,l=m.headerCt,p=k.headerCt,i=false;if(!Ext.isDefined(n)){n=0}j=j||p.getMenu().activeHeader;Ext.suspendLayouts();p.remove(j,false);if(o.syncLockedWidth()){i=true}j.locked=false;l.insert(n,j);o.normalGrid.getView().refresh();if(i){o.lockedGrid.getView().refresh()}Ext.resumeLayouts(true);o.fireEvent("unlockcolumn",o,j)},applyColumnsState:function(x){var q=this,z=q.lockedGrid,y=z.headerCt,s=q.normalGrid.headerCt,i=Ext.Array.toMap(y.items,"headerId"),w=Ext.Array.toMap(s.items,"headerId"),t=[],r=[],u=1,C=x.length,v,D,A,B;for(v=0;v<C;v++){B=x[v];A=i[B.id];D=A||w[B.id];if(D){if(D.applyColumnState){D.applyColumnState(B)}if(D.locked===undefined){D.locked=!!A}if(D.locked){t.push(D);if(!D.hidden&&typeof D.width=="number"){u+=D.width}}else{r.push(D)}}}if(t.length+r.length==y.items.getCount()+s.items.getCount()){y.removeAll(false);s.removeAll(false);y.add(t);s.add(r);z.setWidth(u)}},getColumnsState:function(){var d=this,e=d.lockedGrid.headerCt.getColumnsState(),f=d.normalGrid.headerCt.getColumnsState();return e.concat(f)},reconfigureLockable:function(g,f){var j=this,h=j.lockedGrid,i=j.normalGrid;if(f){Ext.suspendLayouts();h.headerCt.removeAll();i.headerCt.removeAll();f=j.processColumns(f);h.setWidth(f.lockedWidth);h.headerCt.add(f.locked.items);i.headerCt.add(f.normal.items);Ext.resumeLayouts(true)}if(g){g=Ext.data.StoreManager.lookup(g);j.store=g;h.bindStore(g);i.bindStore(g)}else{h.getView().refresh();i.getView().refresh()}}},function(){this.borrow(Ext.view.Table,["prepareFeatures"])});Ext.define("Ext.layout.ContextItem",{requires:["Ext.layout.ClassList"],heightModel:null,widthModel:null,sizeModel:null,boxChildren:null,boxParent:null,children:[],dirty:null,dirtyCount:0,hasRawContent:true,isContextItem:true,isTopLevel:false,consumersContentHeight:0,consumersContentWidth:0,consumersContainerHeight:0,consumersContainerWidth:0,consumersHeight:0,consumersWidth:0,ownerCtContext:null,remainingChildLayouts:0,remainingComponentChildLayouts:0,remainingContainerChildLayouts:0,wrapsComponent:false,constructor:function(g){var i=this,h=g.target,j,f;Ext.apply(i,g);j=i.el;i.id=j.id;i.lastBox=j.lastBox;i.blocks={};i.domBlocks={};i.triggers={};i.domTriggers={};i.flushedProps={};i.props={};i.state={};i.styles={};if(h.isComponent){i.wrapsComponent=true;i.sizeModel=f=h.getSizeModel(i.ownerCtContext&&i.ownerCtContext.sizeModel);i.widthModel=f.width;i.heightModel=f.height;i.frameBodyContext=i.getEl("frameBody")}},init:function(h){var g=this,e,f;if(h){g.ownerCtContext=h;g.isBoxParent=g.target.ownerLayout.isItemBoxParent(g);f=g.widthModel;if(f.shrinkWrap){e=h.isBoxParent?h:h.boxParent;if(e){e.addBoxChild(g)}}else{if(f.natural){g.boxParent=h}}}else{g.isTopLevel=true}},initAnimatePolicy:function(){var d=this,f=d.target,e=d.ownerCtContext;if(e&&e.isTopLevel){d.animatePolicy=f.ownerLayout.getAnimatePolicy(d)}else{if(!e&&f.isCollapsingOrExpanding&&f.animCollapse){d.animatePolicy=f.componentLayout.getAnimatePolicy(d)}}if(d.animatePolicy){d.context.queueAnimation(d)}},noFraming:{left:0,top:0,right:0,bottom:0,width:0,height:0},addCls:function(b){this.getClassList().addMany(b)},removeCls:function(b){this.getClassList().removeMany(b)},addBlock:function(g,k,j){var l=this,i=l[g],h=i[j]||(i[j]={});if(!h[k.id]){h[k.id]=k;++k.blockCount;++l.context.blockCount}},addBoxChild:function(g){var h=this,e,f=g.widthModel;g.boxParent=this;g.measuresBox=f.shrinkWrap?g.hasRawContent:f.natural;if(g.measuresBox){e=h.boxChildren;if(e){e.push(g)}else{h.boxChildren=[g]}}},addTrigger:function(l,k){var m=this,j=k?m.domTriggers:m.triggers,i=m.context,n=i.currentLayout,h=j[l]||(j[l]={});if(!h[n.id]){h[n.id]=n;++n.triggerCount;h=i.triggers[k?"dom":"data"];(h[n.id]||(h[n.id]=[])).push({item:this,prop:l});if(m.props[l]!==undefined){if(!k||!(m.dirty&&(l in m.dirty))){++n.firedTriggers}}}},boxChildMeasured:function(){var d=this,f=d.state,e=(f.boxesMeasured=(f.boxesMeasured||0)+1);if(e==d.boxChildren.length){f.clearBoxWidth=1;++d.context.progressCount;d.markDirty()}},borderNames:["border-top-width","border-right-width","border-bottom-width","border-left-width"],marginNames:["margin-top","margin-right","margin-bottom","margin-left"],paddingNames:["padding-top","padding-right","padding-bottom","padding-left"],trblNames:["top","right","bottom","left"],cacheMissHandlers:{borderInfo:function(d){var c=d.getStyles(d.borderNames,d.trblNames);c.width=c.left+c.right;c.height=c.top+c.bottom;return c},marginInfo:function(d){var c=d.getStyles(d.marginNames,d.trblNames);c.width=c.left+c.right;c.height=c.top+c.bottom;return c},paddingInfo:function(d){var e=d.frameBodyContext||d,f=e.getStyles(d.paddingNames,d.trblNames);f.width=f.left+f.right;f.height=f.top+f.bottom;return f}},checkCache:function(b){return this.cacheMissHandlers[b](this)},clearAllBlocks:function(e){var f=this[e],d;if(f){for(d in f){this.clearBlocks(e,d)}}},clearBlocks:function(n,k){var j=this[n],h=j&&j[k],m,l,i;if(h){delete j[k];m=this.context;for(i in h){l=h[i];--m.blockCount;if(!--l.blockCount&&!l.pending&&!l.done){m.queueLayout(l)}}}},block:function(d,c){this.addBlock("blocks",d,c)},domBlock:function(d,c){this.addBlock("domBlocks",d,c)},doInvalidate:function(j){var i=this,f=i.props,g=i.dirty,h=i.target.ownerLayout;i.dirty=i.invalid=false;i.props={};i.state={};i.clearAllBlocks("blocks");i.clearAllBlocks("domBlocks");if(i.wrapsComponent){if(!j){i.recoverProp("x",f,g);i.recoverProp("y",f,g);if(i.widthModel.calculated){i.recoverProp("width",f,g)}if(i.heightModel.calculated){i.recoverProp("height",f,g)}}else{i.widthModel=i.sizeModel.width;i.heightModel=i.sizeModel.height}}if(h&&h.manageMargins){i.recoverProp("margin-top",f,g);i.recoverProp("margin-right",f,g);i.recoverProp("margin-bottom",f,g);i.recoverProp("margin-left",f,g)}},fireTriggers:function(g,i){var k=this[g][i],l=this.context,j,h;if(k){for(h in k){j=k[h];++j.firedTriggers;if(!j.done&&!j.blockCount&&!j.pending){l.queueLayout(j)}}}},flush:function(){var e=this,f=e.dirty,h=e.state,g=e.el;e.dirtyCount=0;if(e.classList&&e.classList.dirty){e.classList.flush()}if("attributes" in e){g.set(e.attributes);delete e.attributes}if("innerHTML" in e){g.innerHTML=e.innerHTML;delete e.innerHTML}if(h.clearBoxWidth){h.clearBoxWidth=0;e.el.setStyle("width",null);if(!--h.blocks){e.context.queueItemLayouts(e)}}if(f){delete e.dirty;e.writeProps(f,true)}},flushAnimations:function(){var j=this,x=j.lastBox,q,o,v,t,u,w,s,p,r,z,y;if(x){q=j.target;o=q.layout&&q.layout.animate;if(o){v=Ext.isNumber(o)?o:o.duration}t=Ext.Object.getKeys(j.animatePolicy);u=Ext.apply({},{from:{},to:{},duration:v||Ext.fx.Anim.prototype.duration},o);for(w=0,s=0,p=t.length;s<p;s++){r=t[s];z=x[r];y=j.peek(r);if(z!=y){r=j.translateProps[r]||r;u.from[r]=z;u.to[r]=y;++w}}if(w){if(j.isCollapsingOrExpanding===1){q.componentLayout.undoLayout(j)}else{j.writeProps(u.from)}j.el.animate(u);Ext.fx.Manager.getFxQueue(j.el.id)[0].on({afteranimate:function(){if(j.isCollapsingOrExpanding===1){q.componentLayout.redoLayout(j);q.afterCollapse(true)}else{if(j.isCollapsingOrExpanding===2){q.afterExpand(true)}}}})}}},getBorderInfo:function(){var d=this,c=d.borderInfo;if(!c){d.borderInfo=c=d.checkCache("borderInfo")}return c},getClassList:function(){return this.classList||(this.classList=new Ext.layout.ClassList(this))},getEl:function(l,h){var j=this,i,k,g;if(l){if(l.dom){k=l}else{i=j.target;if(h){i=h}k=i[l];if(typeof k=="function"){k=k.call(i);if(k===j.el){return this}}}if(k){g=j.context.getEl(j,k)}}return g||null},getFraming:function(){var b=this;if(!b.framingInfo){b.framingInfo=b.target.frameSize||b.noFraming}return b.framingInfo},getFrameInfo:function(){var e=this,h=e.frameInfo,g,f;if(!h){g=e.getFraming();f=e.getBorderInfo();e.frameInfo=h={top:g.top+f.top,right:g.right+f.right,bottom:g.bottom+f.bottom,left:g.left+f.left,width:g.width+f.width,height:g.height+f.height}}return h},getMarginInfo:function(){var m=this,j=m.marginInfo,h,i,k,l,n;if(!j){if(!m.wrapsComponent){j=m.checkCache("marginInfo")}else{h=m.target;l=h.ownerLayout;n=l?l.id:null;i=l&&l.manageMargins;j=h.margin$;if(j&&j.ownerId!==n){j=null}if(!j){j=m.parseMargins(h.margin)||m.checkCache("marginInfo");if(i){k=m.parseMargins(h.margins,l.defaultMargins);if(k){j={top:j.top+k.top,right:j.right+k.right,bottom:j.bottom+k.bottom,left:j.left+k.left}}m.setProp("margin-top",0);m.setProp("margin-right",0);m.setProp("margin-bottom",0);m.setProp("margin-left",0)}j.ownerId=n;h.margin$=j}j.width=j.left+j.right;j.height=j.top+j.bottom}m.marginInfo=j}return j},clearMarginCache:function(){delete this.marginInfo;delete this.target.margin$},getPaddingInfo:function(){var d=this,c=d.paddingInfo;if(!c){d.paddingInfo=c=d.checkCache("paddingInfo")}return c},getProp:function(f){var d=this,e=d.props[f];d.addTrigger(f);return e},getDomProp:function(f){var d=this,e=(d.dirty&&(f in d.dirty))?undefined:d.props[f];d.addTrigger(f,true);return e},getStyle:function(g){var j=this,f=j.styles,h,i;if(g in f){i=f[g]}else{h=j.styleInfo[g];i=j.el.getStyle(g);if(h&&h.parseInt){i=parseInt(i,10)||0}f[g]=i}return i},getStyles:function(r,C){var t=this,z=t.styles,n={},y=0,A=r.length,v,w,u,D,B,x,i,s;C=C||r;for(v=0;v<A;++v){D=r[v];if(D in z){n[C[v]]=z[D];++y;if(v&&y==1){w=r.slice(0,v);u=C.slice(0,v)}}else{if(y){(w||(w=[])).push(D);(u||(u=[])).push(C[v])}}}if(y<A){w=w||r;u=u||C;x=t.styleInfo;i=t.el.getStyle(w);for(v=w.length;v--;){D=w[v];B=x[D];s=i[D];if(B&&B.parseInt){s=parseInt(s,10)||0}n[u[v]]=s;z[D]=s}}return n},hasProp:function(c){var d=this.getProp(c);return typeof d!="undefined"},hasDomProp:function(c){var d=this.getDomProp(c);return typeof d!="undefined"},invalidate:function(b){this.invalid=true;this.context.queueInvalidate(this,b)},markDirty:function(){if(++this.dirtyCount==1){this.context.queueFlush(this)}},onBoxMeasured:function(){var d=this.boxParent,c=this.state;if(d&&d.widthModel.shrinkWrap&&!c.boxMeasured&&this.measuresBox){c.boxMeasured=1;d.boxChildMeasured()}},parseMargins:function(g,h){if(g===true){g=5}var e=typeof g,f;if(e=="string"||e=="number"){f=Ext.util.Format.parseBox(g)}else{if(g||h){f={top:0,right:0,bottom:0,left:0};if(h){Ext.apply(f,this.parseMargins(h))}Ext.apply(f,g)}}return f},peek:function(b){return this.props[b]},recoverProp:function(i,g,h){var j=this,k=j.props,l;if(i in g){k[i]=g[i];if(h&&i in h){l=j.dirty||(j.dirty={});l[i]=h[i]}}},redo:function(f){var h=this,j,g,i;h.revertProps(h.props);if(f&&h.wrapsComponent){if(h.childItems){for(i=0,j=h.childItems,g=j.length;i<g;i++){j[i].redo(f)}}for(i=0,j=h.children,g=j.length;i<g;i++){j[i].redo()}}},revertProps:function(g){var f,e=this.flushedProps,h={};for(f in g){if(e.hasOwnProperty(f)){h[f]=g[f]}}this.writeProps(h)},setAttribute:function(e,f){var d=this;if(!d.attributes){d.attributes={}}d.attributes[e]=f;d.markDirty()},setBox:function(c){var d=this;if("left" in c){d.setProp("x",c.left)}if("top" in c){d.setProp("y",c.top)}d.setSize(c.width,c.height)},setContentHeight:function(d,c){if(!c&&this.hasRawContent){return 1}return this.setProp("contentHeight",d)},setContentWidth:function(c,d){if(!d&&this.hasRawContent){return 1}return this.setProp("contentWidth",c)},setContentSize:function(f,e,d){return this.setContentWidth(f,d)+this.setContentHeight(e,d)==2},setProp:function(m,n,i){var h=this,j=typeof n,k,l;if(j=="undefined"||(j==="number"&&isNaN(n))){return 0}if(h.props[m]===n){return 1}h.props[m]=n;++h.context.progressCount;if(i===false){h.fireTriggers("domTriggers",m);h.clearBlocks("domBlocks",m)}else{l=h.styleInfo[m];if(l){if(!h.dirty){h.dirty={}}if(m=="width"||m=="height"){k=h.isBorderBoxValue;if(k==null){h.isBorderBoxValue=k=!!h.el.isBorderBox()}if(!k){h.borderInfo||h.getBorderInfo();h.paddingInfo||h.getPaddingInfo()}}h.dirty[m]=n;h.markDirty()}}h.fireTriggers("triggers",m);h.clearBlocks("blocks",m);return 1},setHeight:function(i,n){var l=this,h=l.target,j,m,k;if(i<0){i=0}if(!l.wrapsComponent){if(!l.setProp("height",i,n)){return NaN}}else{i=Ext.Number.constrain(i,h.minHeight||0,h.maxHeight);if(!l.setProp("height",i,n)){return NaN}j=l.frameBodyContext;if(j){m=l.getFrameInfo();j.setHeight(i-m.height,n)}}return i},setWidth:function(n,h){var l=this,i=l.target,j,m,k;if(n<0){n=0}if(!l.wrapsComponent){if(!l.setProp("width",n,h)){return NaN}}else{n=Ext.Number.constrain(n,i.minWidth||0,i.maxWidth);if(!l.setProp("width",n,h)){return NaN}j=l.frameBodyContext;if(j){m=l.getFrameInfo();j.setWidth(n-m.width,h)}}return n},setSize:function(f,e,d){this.setWidth(f,d);this.setHeight(e,d)},translateProps:{x:"left",y:"top"},undo:function(f){var h=this,j,g,i;h.revertProps(h.lastBox);if(f&&h.wrapsComponent){if(h.childItems){for(i=0,j=h.childItems,g=j.length;i<g;i++){j[i].undo(f)}}for(i=0,j=h.children,g=j.length;i<g;i++){j[i].undo()}}},unsetProp:function(c){var d=this.dirty;delete this.props[c];if(d){delete d[c]}},writeProps:function(M,N){if(!(M&&typeof M=="object")){Ext.Logger.warn("writeProps expected dirtyProps to be an object");return}var w=this,O=w.el,K={},L=0,P=w.styleInfo,x,F,C,G="x" in M,H="y" in M,I=M.x,J=M.y,B=M.width,D=M.height,y=w.isBorderBoxValue,v=w.target,A=Math.max,z=0,E=0;if("displayed" in M){O.setDisplayed(M.displayed)}for(F in M){if(N){w.fireTriggers("domTriggers",F);w.clearBlocks("domBlocks",F);w.flushedProps[F]=1}x=P[F];if(x&&x.dom){if(x.suffix&&(C=parseInt(M[F],10))){K[F]=C+x.suffix}else{K[F]=M[F]}++L}}if(G||H){if(v.isComponent){v.setPosition(I||w.props.x,J||w.props.y)}else{if(G){K.left=I+"px";++L}if(H){K.top=J+"px";++L}}}if(!y&&(B>0||D>0)){if(!(w.borderInfo&&w.paddingInfo)){throw Error("Needed to have gotten the borderInfo and paddingInfo when the width or height was setProp'd")}if(!w.frameBodyContext){z=w.paddingInfo.width;E=w.paddingInfo.height}if(B){B=A(parseInt(B,10)-(w.borderInfo.width+z),0);K.width=B+"px";++L}if(D){D=A(parseInt(D,10)-(w.borderInfo.height+E),0);K.height=D+"px";++L}}if(L){O.setStyle(K)}}},function(){var f={dom:true,parseInt:true,suffix:"px"},d={dom:true},e={dom:false};this.prototype.styleInfo={childrenDone:e,componentChildrenDone:e,containerChildrenDone:e,containerLayoutDone:e,displayed:e,done:e,x:e,y:e,left:f,top:f,right:f,bottom:f,width:f,height:f,"border-top-width":f,"border-right-width":f,"border-bottom-width":f,"border-left-width":f,"margin-top":f,"margin-right":f,"margin-bottom":f,"margin-left":f,"padding-top":f,"padding-right":f,"padding-bottom":f,"padding-left":f,"line-height":d,display:d}});Ext.define("Ext.layout.Context",{requires:["Ext.util.Queue","Ext.layout.ContextItem","Ext.layout.Layout","Ext.fx.Anim","Ext.fx.Manager"],currentOwnerCtContext:null,remainingLayouts:0,state:0,constructor:function(d){var c=this;Ext.apply(c,d);c.items={};c.layouts={};c.blockCount=0;c.cycleCount=0;c.flushCount=0;c.calcCount=0;c.animateQueue=c.newQueue();c.completionQueue=c.newQueue();c.finalizeQueue=c.newQueue();c.finishQueue=c.newQueue();c.flushQueue=c.newQueue();c.invalidateData={};c.layoutQueue=c.newQueue();c.invalidQueue=[];c.triggers={data:{},dom:{}}},callLayout:function(d,e){this.currentLayout=d;var f=this.getCmp(d.owner);d[e](f)},cancelComponent:function(x,D){var t=this,y=x,w=!x.isComponent,C=w?y.length:1,A,B,u,v,z,k,s,r,i;for(A=0;A<C;++A){if(w){x=y[A]}if(!D){s=t.invalidQueue;u=s.length;if(u){t.invalidQueue=k=[];for(B=0;B<u;++B){r=s[B];i=r.item.target;if(i!=x&&!i.isDescendant(x)){k.push(r)}}}}z=x.componentLayout;t.cancelLayout(z);if(z.getLayoutItems){v=z.getLayoutItems();if(v.length){t.cancelComponent(v,true)}}if(x.isContainer&&!x.collapsed){z=x.layout;t.cancelLayout(z);v=z.getVisibleItems();if(v.length){t.cancelComponent(v,true)}}}},cancelLayout:function(c){var d=this;d.completionQueue.remove(c);d.finalizeQueue.remove(c);d.finishQueue.remove(c);d.layoutQueue.remove(c);if(c.running){d.layoutDone(c)}c.ownerContext=null},clearTriggers:function(m,l){var r=m.id,k=this.triggers[l?"dom":"data"][r],q=(k&&k.length)||0,n,o,i,p;for(o=0;o<q;++o){p=k[o];i=p.item;n=l?i.domTriggers:i.triggers;delete n[p.prop][r]}},finishInvalidate:function(f,h,g){if(f[g]){var i=this,j=i.currentLayout;i.currentLayout=f.layout||null;f[g](h,f);i.currentLayout=j}},flush:function(){var g=this,f=g.flushQueue.clear(),h=f.length,e;if(h){++g.flushCount;for(e=0;e<h;++e){f[e].flush()}}},flushAnimations:function(){var g=this,e=g.animateQueue.clear(),f=e.length,h;if(f){for(h=0;h<f;h++){if(e[h].target.animate!==false){e[h].flushAnimations()}}Ext.fx.Manager.runner()}},flushInvalidates:function(){var j=this,i=j.invalidQueue,k=i&&i.length,h,l,m,n;j.invalidQueue=[];if(k){l=[];for(n=0;n<k;++n){h=(m=i[n]).item.target;if(!h.container.isDetachedBody){l.push(h);if(m.options){j.invalidateData[h.id]=m.options}}}j.invalidate(l,null)}},flushLayouts:function(l,j,p){var m=this,k=p?m[l].items:m[l].clear(),n=k.length,i,o;if(n){for(i=0;i<n;++i){o=k[i];if(!o.running){m.callLayout(o,j)}}m.currentLayout=null}},getCmp:function(b){return this.getItem(b,b.el)},getEl:function(d,e){var f=this.getItem(e,e);if(!f.parent){f.parent=d;if(d.children.length){d.children.push(f)}else{d.children=[f]}}return f},getItem:function(i,f){var h=f.id,g=this.items,j=g[h]||(g[h]=new Ext.layout.ContextItem({context:this,target:i,el:f,ownerCtContext:this.currentOwnerCtContext}));return j},handleFailure:function(){var f=this.layouts,d,e;Ext.failedLayouts=(Ext.failedLayouts||0)+1;Ext.log("Layout run failed");for(e in f){d=f[e];if(f.hasOwnProperty(e)){d.running=false;d.ownerContext=null}}},invalidate:function(I,G,K){var i=this,J=!I.isComponent,T=i.items,S=i.state>0,F=i.currentOwnerCtContext,N,B,P,C,L,D,E,k,z,H,O,Q,A,R,M;i.currentOwnerCtContext=G;for(D=0,O=J?I.length:1;D<O;++D){k=J?I[D]:I;if(k.rendered&&!k.hidden){L=!k.componentLayout.ownerContext;z=i.getCmp(k);if(L){if(k.beforeLayout){k.beforeLayout()}if(S&&!G&&(C=k.ownerCt)){G=T[C.el.id]}z.init(G)}N=B=P=true;Q=k.componentLayout;Q.ownerContext=z;if(Q.getLayoutItems){Q.renderChildren();H=Q.getLayoutItems();if(H.length){i.invalidate(H,z,true);N=false}}if(k.isContainer&&!k.collapsed){A=k.layout;A.ownerContext=z;A.renderChildren();P=false;H=A.getVisibleItems();if(H.length){i.invalidate(H,z,true);B=false}}else{A=null}if(L){z.hasRawContent=true;if(z.target.isContainer){if(z.target.items.items.length||!z.target.getTargetEl().dom.firstChild){z.hasRawContent=false}}}else{z.doInvalidate(K);H=z.children;for(E=H.length;E--;){H[E].doInvalidate(true)}}R=z.props;if(N){R.componentChildrenDone=true;if(B){R.childrenDone=true}}if(B){R.containerChildrenDone=true}if(P){R.containerLayoutDone=true}M=i.invalidateData[z.id];if(M){delete i.invalidateData[z.id];if(M.state){Ext.apply(z.state,M.state)}i.finishInvalidate(M,z,"before")}i.resetLayout(Q,z,L);if(A){i.resetLayout(A,z,L)}if(M){i.finishInvalidate(M,z,"after")}if(z.boxChildren&&z.widthModel.shrinkWrap){z.el.setWidth(10000);z.state.blocks=(z.state.blocks||0)+1}if(L){z.initAnimatePolicy()}}}i.currentOwnerCtContext=F},layoutDone:function(d){var f=d.ownerContext,e;d.running=false;if(d.isComponentLayout){if(f.measuresBox){f.onBoxMeasured()}f.setProp("done",true);e=f.ownerCtContext;if(e){if(f.target.ownerLayout.isComponentLayout){if(!--e.remainingComponentChildLayouts){e.setProp("componentChildrenDone",true)}}else{if(!--e.remainingContainerChildLayouts){e.setProp("containerChildrenDone",true)}}if(!--e.remainingChildLayouts){e.setProp("childrenDone",true)}}}else{f.setProp("containerLayoutDone",true)}--this.remainingLayouts;++this.progressCount},newQueue:function(){return new Ext.util.Queue()},queueAnimation:function(b){this.animateQueue.add(b)},queueCompletion:function(b){this.completionQueue.add(b)},queueFinalize:function(b){this.finalizeQueue.add(b)},queueFlush:function(b){this.flushQueue.add(b)},chainFns:function(g,h,j){var f=g[j],i=h[j];return function(a){if(f){f.call(g.scope||g,a,g)}i.call(h.scope||h,a,h)}},queueInvalidate:function(m,l){var p=this,n=[],o=p.invalidQueue,q=o.length,s,u,r,v,t;if(m.isComponent){m=p.getCmp(s=m)}else{s=m.target}while(q--){u=o[q];r=u.item.target;if(s.isDescendant(r)){return}if(r==s){if(!(v=u.options)){u.options=l}else{if(l){if(!(t=v.state)){v.state=l.state}else{if(l.state){Ext.apply(t,l.state)}}if(l.before){v.before=p.chainFns(v,l,"before")}if(l.after){v.after=p.chainFns(v,l,"after")}}}return}if(!r.isDescendant(s)){n.push(u)}}n.push({item:m,options:l});p.invalidQueue=n},queueItemLayouts:function(f){var e=f.isComponent?f:f.target,d=e.componentLayout;if(!d.pending&&!d.invalid&&!d.done){this.queueLayout(d)}d=e.layout;if(d&&!d.pending&&!d.invalid&&!d.done){this.queueLayout(d)}},queueLayout:function(b){this.layoutQueue.add(b);b.pending=true},resetLayout:function(j,i,h){var f=this,g;f.currentLayout=j;j.done=false;j.pending=true;j.firedTriggers=0;f.layoutQueue.add(j);if(h){f.layouts[j.id]=j;j.running=true;if(j.finishedLayout){f.finishQueue.add(j)}++f.remainingLayouts;++j.layoutCount;j.beginCount=0;j.blockCount=0;j.calcCount=0;j.triggerCount=0;if(j.isComponentLayout&&(g=i.ownerCtContext)){if(i.target.ownerLayout.isComponentLayout){++g.remainingComponentChildLayouts}else{++g.remainingContainerChildLayouts}++g.remainingChildLayouts}if(!j.initialized){j.initLayout()}j.beginLayout(i)}else{++j.beginCount;if(!j.running){++f.remainingLayouts;j.running=true;if(j.isComponentLayout){i.unsetProp("done");g=i.ownerCtContext;if(g){if(i.target.ownerLayout.isComponentLayout){if(++g.remainingComponentChildLayouts==1){g.unsetProp("componentChildrenDone")}}else{if(++g.remainingContainerChildLayouts==1){g.unsetProp("containerChildrenDone")}}if(++g.remainingChildLayouts==1){g.unsetProp("childrenDone")}}}f.completionQueue.remove(j);f.finalizeQueue.remove(j)}}j.beginLayoutCycle(i,h)},run:function(){var f=this,d=false,e=100;f.flushInvalidates();f.state=1;f.totalCount=f.layoutQueue.getCount();f.flush();while((f.remainingLayouts||f.invalidQueue.length)&&e--){if(f.invalidQueue.length){f.flushInvalidates()}if(f.runCycle()){d=false}else{if(!d){f.flush();d=true;f.flushLayouts("completionQueue","completeLayout")}else{f.state=2;break}}if(!(f.remainingLayouts||f.invalidQueue.length)){f.flush();f.flushLayouts("completionQueue","completeLayout");f.flushLayouts("finalizeQueue","finalizeLayout")}}return f.runComplete()},runComplete:function(){var b=this;b.state=2;if(b.remainingLayouts){b.handleFailure();return false}b.flush();b.flushLayouts("finishQueue","finishedLayout",true);b.flushLayouts("finishQueue","notifyOwner");b.flush();b.flushAnimations();return true},runCycle:function(){var h=this,g=h.layoutQueue.clear(),e=g.length,f;++h.cycleCount;h.progressCount=0;for(f=0;f<e;++f){h.runLayout(h.currentLayout=g[f])}h.currentLayout=null;return h.progressCount>0},runLayout:function(d){var e=this,f=e.getCmp(d.owner);d.pending=false;if(f.state.blocks){return}d.done=true;++d.calcCount;++e.calcCount;d.calculate(f);if(d.done){e.layoutDone(d);if(d.completeLayout){e.queueCompletion(d)}if(d.finalizeLayout){e.queueFinalize(d)}}else{if(!d.pending&&!d.invalid&&!(d.blockCount+d.triggerCount-d.firedTriggers)){e.queueLayout(d)}}},setItemSize:function(j,k,h){var m=j,i=1,n,l;if(j.isComposite){m=j.elements;i=m.length;j=m[0]}else{if(!j.dom&&!j.el){i=m.length;j=m[0]}}for(l=0;l<i;){n=this.get(j);n.setSize(k,h);j=m[++l]}}});Ext.define("Ext.draw.Surface",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.draw.CompositeSprite"],uses:["Ext.draw.engine.Svg","Ext.draw.engine.Vml","Ext.draw.engine.SvgExporter","Ext.draw.engine.ImageExporter"],separatorRe:/[, ]+/,statics:{create:function(f,i){i=i||["Svg","Vml"];var j=0,g=i.length,h;for(;j<g;j++){if(Ext.supports[i[j]]!==false){return Ext.create("Ext.draw.engine."+i[j],f)}}return false},save:function(e,f){var g={"image/png":"Image","image/jpeg":"Image","image/svg+xml":"Svg"},h=g[e.type]||"Svg";return(Ext.draw.engine[h+"Exporter"]).self.generate(e,f)}},availableAttrs:{blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,"dominant-baseline":"auto",fill:"none","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:"",height:0,hidden:false,href:"http://sencha.com/",opacity:1,path:"M0,0",radius:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"none","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank",text:"","text-anchor":"middle",title:"Ext Draw",width:0,x:0,y:0,zIndex:0},container:undefined,height:352,width:512,x:0,y:0,orderSpritesByZIndex:true,constructor:function(d){var c=this;d=d||{};Ext.apply(c,d);c.domRef=Ext.getDoc().dom;c.customAttributes={};c.addEvents("mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","click","dblclick");c.mixins.observable.constructor.call(c);c.getId();c.initGradients();c.initItems();if(c.renderTo){c.render(c.renderTo);delete c.renderTo}c.initBackground(d.background)},initSurface:Ext.emptyFn,renderItem:Ext.emptyFn,renderItems:Ext.emptyFn,setViewBox:function(e,g,h,f){if(isFinite(e)&&isFinite(g)&&isFinite(h)&&isFinite(f)){this.viewBox={x:e,y:g,width:h,height:f};this.applyViewBox()}},addCls:Ext.emptyFn,removeCls:Ext.emptyFn,setStyle:Ext.emptyFn,initGradients:function(){if(this.hasOwnProperty("gradients")){var f=this.gradients,g=f.length,e=this.addGradient,h;if(f){for(h=0;h<g;h++){if(e.call(this,f[h],h,g)===false){break}}}}},initItems:function(){var b=this.items;this.items=new Ext.draw.CompositeSprite();this.items.autoDestroy=true;this.groups=new Ext.draw.CompositeSprite();if(b){this.add(b)}},initBackground:function(h){var l=this,m=l.width,i=l.height,k,j,n;if(Ext.isString(h)){h={fill:h}}if(h){if(h.gradient){j=h.gradient;k=j.id;l.addGradient(j);l.background=l.add({type:"rect",x:0,y:0,width:m,height:i,fill:"url(#"+k+")",zIndex:-1})}else{if(h.fill){l.background=l.add({type:"rect",x:0,y:0,width:m,height:i,fill:h.fill,zIndex:-1})}else{if(h.image){l.background=l.add({type:"image",x:0,y:0,width:m,height:i,src:h.image,zIndex:-1})}}}l.background.bboxExcluded=true}},setSize:function(d,c){this.applyViewBox()},scrubAttrs:function(i){var j,f={},g={},h=i.attr;for(j in h){if(this.translateAttrs.hasOwnProperty(j)){f[this.translateAttrs[j]]=h[j];g[this.translateAttrs[j]]=true}else{if(this.availableAttrs.hasOwnProperty(j)&&!g[j]){f[j]=h[j]}}}return f},onClick:function(b){this.processEvent("click",b)},onDblClick:function(b){this.processEvent("dblclick",b)},onMouseUp:function(b){this.processEvent("mouseup",b)},onMouseDown:function(b){this.processEvent("mousedown",b)},onMouseOver:function(b){this.processEvent("mouseover",b)},onMouseOut:function(b){this.processEvent("mouseout",b)},onMouseMove:function(b){this.fireEvent("mousemove",b)},onMouseEnter:Ext.emptyFn,onMouseLeave:Ext.emptyFn,addGradient:Ext.emptyFn,add:function(){var m=Array.prototype.slice.call(arguments),k,o,r=m.length>1,l,q,p,n,i;if(r||Ext.isArray(m[0])){l=r?m:m[0];q=[];for(p=0,n=l.length;p<n;p++){i=l[p];i=this.add(i);q.push(i)}return q}k=this.prepareItems(m[0],true)[0];this.insertByZIndex(k);this.onAdd(k);return k},insertByZIndex:function(l){var o=this,q=o.items.items,r=q.length,k=Math.ceil,n=l.attr.zIndex,m=r,s=m-1,p=0,t;if(o.orderSpritesByZIndex&&r&&n<q[s].attr.zIndex){while(p<=s){m=k((p+s)/2);t=q[m].attr.zIndex;if(t>n){s=m-1}else{if(t<n){p=m+1}else{break}}}while(m<r&&q[m].attr.zIndex<=n){m++}}o.items.insert(m,l);return m},onAdd:function(k){var i=k.group,g=k.draggable,h,j,l;if(i){h=[].concat(i);j=h.length;for(l=0;l<j;l++){i=h[l];this.getGroup(i).add(k)}delete k.group}if(g){k.initDraggable()}},remove:function(f,h){if(f){this.items.remove(f);var g=[].concat(this.groups),i=g.length,j;for(j=0;j<i;j++){g[j].remove(f)}f.onRemove();if(h===true){f.destroy()}}},removeAll:function(g){var f=this.items.items,h=f.length,e;for(e=h-1;e>-1;e--){this.remove(f[e],g)}},onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,applyViewBox:function(){var s=this,l=s.viewBox,v=s.width||1,p=s.height||1,q,r,n,u,o,t,m;if(l&&(v||p)){q=l.x;r=l.y;n=l.width;u=l.height;o=p/u;t=v/n;m=Math.min(t,o);if(n*m<v){q-=(v-n*m)/2/m}if(u*m<p){r-=(p-u*m)/2/m}s.viewBoxShift={dx:-q,dy:-r,scale:m};if(s.background){s.background.setAttributes(Ext.apply({},{x:q,y:r,width:v/m,height:p/m},{hidden:false}),true)}}else{if(s.background&&v&&p){s.background.setAttributes(Ext.apply({x:0,y:0,width:v,height:p},{hidden:false}),true)}}},getBBox:function(e,d){var f=this["getPath"+e.type](e);if(d){e.bbox.plain=e.bbox.plain||Ext.draw.Draw.pathDimensions(f);return e.bbox.plain}if(e.dirtyTransform){this.applyTransformations(e,true)}e.bbox.transform=e.bbox.transform||Ext.draw.Draw.pathDimensions(Ext.draw.Draw.mapPath(f,e.matrix));return e.bbox.transform},transformToViewBox:function(f,g){if(this.viewBoxShift){var h=this,e=h.viewBoxShift;return[f/e.scale-e.dx,g/e.scale-e.dy]}else{return[f,g]}},applyTransformations:function(e,g){if(e.type=="text"){e.bbox.transform=0;this.transform(e,false)}e.dirtyTransform=false;var h=this,f=e.attr;if(f.translation.x!=null||f.translation.y!=null){h.translate(e)}if(f.scaling.x!=null||f.scaling.y!=null){h.scale(e)}if(f.rotation.degrees!=null){h.rotate(e)}e.bbox.transform=0;this.transform(e,g);e.transformations=[]},rotate:function(g){var h,f=g.attr.rotation.degrees,i=g.attr.rotation.x,j=g.attr.rotation.y;if(!Ext.isNumber(i)||!Ext.isNumber(j)){h=this.getBBox(g,true);i=!Ext.isNumber(i)?h.x+h.width/2:i;j=!Ext.isNumber(j)?h.y+h.height/2:j}g.transformations.push({type:"rotate",degrees:f,x:i,y:j})},translate:function(d){var e=d.attr.translation.x||0,f=d.attr.translation.y||0;d.transformations.push({type:"translate",x:e,y:f})},scale:function(g){var j,h=g.attr.scaling.x||1,i=g.attr.scaling.y||1,k=g.attr.scaling.centerX,l=g.attr.scaling.centerY;if(!Ext.isNumber(k)||!Ext.isNumber(l)){j=this.getBBox(g,true);k=!Ext.isNumber(k)?j.x+j.width/2:k;l=!Ext.isNumber(l)?j.y+j.height/2:l}g.transformations.push({type:"scale",x:h,y:i,centerX:k,centerY:l})},rectPath:function(g,h,f,j,i){if(i){return[["M",g+i,h],["l",f-i*2,0],["a",i,i,0,0,1,i,i],["l",0,j-i*2],["a",i,i,0,0,1,-i,i],["l",i*2-f,0],["a",i,i,0,0,1,-i,-i],["l",0,i*2-j],["a",i,i,0,0,1,i,-i],["z"]]}return[["M",g,h],["l",f,0],["l",0,j],["l",-f,0],["z"]]},ellipsePath:function(f,g,h,e){if(e==null){e=h}return[["M",f,g],["m",0,-e],["a",h,e,0,1,1,0,2*e],["a",h,e,0,1,1,0,-2*e],["z"]]},getPathpath:function(b){return b.attr.path},getPathcircle:function(d){var a=d.attr;return this.ellipsePath(a.x,a.y,a.radius,a.radius)},getPathellipse:function(d){var a=d.attr;return this.ellipsePath(a.x,a.y,a.radiusX||(a.width/2)||0,a.radiusY||(a.height/2)||0)},getPathrect:function(d){var a=d.attr;return this.rectPath(a.x||0,a.y||0,a.width||0,a.height||0,a.r||0)},getPathimage:function(d){var a=d.attr;return this.rectPath(a.x||0,a.y||0,a.width,a.height)},getPathtext:function(d){var c=this.getBBoxText(d);return this.rectPath(c.x,c.y,c.width,c.height)},createGroup:function(c){var d=this.groups.get(c);if(!d){d=new Ext.draw.CompositeSprite({surface:this});d.id=c||Ext.id(null,"ext-surface-group-");this.groups.add(d)}return d},getGroup:function(c){var d;if(typeof c=="string"){d=this.groups.get(c);if(!d){d=this.createGroup(c)}}else{d=c}return d},prepareItems:function(g,j){g=[].concat(g);var h,f,i;for(f=0,i=g.length;f<i;f++){h=g[f];if(!(h instanceof Ext.draw.Sprite)){h.surface=this;g[f]=this.createItem(h)}else{h.surface=this}}return g},setText:Ext.emptyFn,createItem:Ext.emptyFn,getId:function(){return this.id||(this.id=Ext.id(null,"ext-surface-"))},destroy:function(){var b=this;delete b.domRef;if(b.background){b.background.destroy()}b.removeAll(true);Ext.destroy(b.groups.items)}});Ext.define("Ext.draw.Component",{alias:"widget.draw",extend:"Ext.Component",requires:["Ext.draw.Surface","Ext.layout.component.Draw"],enginePriority:["Svg","Vml"],baseCls:Ext.baseCSSPrefix+"surface",componentLayout:"draw",viewBox:true,shrinkWrap:3,autoSize:false,initComponent:function(){this.callParent(arguments);this.addEvents("mousedown","mouseup","mousemove","mouseenter","mouseleave","click","dblclick")},onRender:function(){var o=this,j=o.viewBox,q=o.autoSize,l,p,r,k,m,n;o.callParent(arguments);if(o.createSurface()!==false){p=o.surface.items;if(j||q){l=p.getBBox();r=l.width;k=l.height;m=l.x;n=l.y;if(o.viewBox){o.surface.setViewBox(m,n,r,k)}else{o.autoSizeSurface()}}}},autoSizeSurface:function(){var b=this.surface.items.getBBox();this.setSurfaceSize(b.width,b.height)},setSurfaceSize:function(d,e){this.surface.setSize(d,e);if(this.autoSize){var f=this.surface.items.getBBox();this.surface.setViewBox(f.x,f.y-(+Ext.isOpera),d,e)}},createSurface:function(){var g=this,e=Ext.applyIf({renderTo:g.el,height:g.height,width:g.width,items:g.items},g.initialConfig),f;delete e.listeners;f=Ext.draw.Surface.create(e);if(!f){return false}g.surface=f;function h(a){return function(b){g.fireEvent(a,b)}}f.on({scope:g,mouseup:h("mouseup"),mousedown:h("mousedown"),mousemove:h("mousemove"),mouseenter:h("mouseenter"),mouseleave:h("mouseleave"),click:h("click"),dblclick:h("dblclick")})},onDestroy:function(){Ext.destroy(this.surface);this.callParent(arguments)}});Ext.define("Ext.resizer.ResizeTracker",{extend:"Ext.dd.DragTracker",dynamic:true,preserveRatio:false,constrainTo:null,proxyCls:Ext.baseCSSPrefix+"resizable-proxy",constructor:function(f){var i=this,j,g,h;if(!f.el){if(f.target.isComponent){i.el=f.target.getEl()}else{i.el=f.target}}this.callParent(arguments);if(i.preserveRatio&&i.minWidth&&i.minHeight){j=i.minWidth/i.el.getWidth();g=i.minHeight/i.el.getHeight();if(g>j){i.minWidth=i.el.getWidth()*g}else{i.minHeight=i.el.getHeight()*j}}if(i.throttle){h=Ext.Function.createThrottled(function(){Ext.resizer.ResizeTracker.prototype.resize.apply(i,arguments)},i.throttle);i.resize=function(b,a,c){if(c){Ext.resizer.ResizeTracker.prototype.resize.apply(i,arguments)}else{h.apply(null,arguments)}}}},onBeforeStart:function(b){this.startBox=this.el.getBox()},getDynamicTarget:function(){var d=this,c=d.target;if(d.dynamic){return c}else{if(!d.proxy){d.proxy=d.createProxy(c)}}d.proxy.show();return d.proxy},createProxy:function(h){var e,f=this.proxyCls,g;if(h.isComponent){e=h.getProxy().addCls(f)}else{g=Ext.getBody();if(Ext.scopeResetCSS){g=Ext.getBody().createChild({cls:Ext.resetCls})}e=h.createProxy({tag:"div",cls:f,id:h.id+"-rzproxy"},g)}e.removeCls(Ext.baseCSSPrefix+"proxy-el");return e},onStart:function(b){this.activeResizeHandle=Ext.get(this.getDragTarget().id);if(!this.dynamic){this.resize(this.startBox,{horizontal:"none",vertical:"none"})}},onDrag:function(b){if(this.dynamic||this.proxy){this.updateDimensions(b)}},updateDimensions:function(z,F){var y=this,N=y.activeResizeHandle.region,L=y.getOffset(y.constrainTo?"dragTarget":null),H=y.startBox,K,C=0,x=0,I,B,P=0,e=0,w,E=L[0]<0?"right":"left",A=L[1]<0?"down":"up",J,O,M,D,G;switch(N){case"south":x=L[1];O=2;break;case"north":x=-L[1];e=-x;O=2;break;case"east":C=L[0];O=1;break;case"west":C=-L[0];P=-C;O=1;break;case"northeast":x=-L[1];e=-x;C=L[0];J=[H.x,H.y+H.height];O=3;break;case"southeast":x=L[1];C=L[0];J=[H.x,H.y];O=3;break;case"southwest":C=-L[0];P=-C;x=L[1];J=[H.x+H.width,H.y];O=3;break;case"northwest":x=-L[1];e=-x;C=-L[0];P=-C;J=[H.x+H.width,H.y+H.height];O=3;break}M={width:H.width+C,height:H.height+x,x:H.x+P,y:H.y+e};I=Ext.Number.snap(M.width,y.widthIncrement);B=Ext.Number.snap(M.height,y.heightIncrement);if(I!=M.width||B!=M.height){switch(N){case"northeast":M.y-=B-M.height;break;case"north":M.y-=B-M.height;break;case"southwest":M.x-=I-M.width;break;case"west":M.x-=I-M.width;break;case"northwest":M.x-=I-M.width;M.y-=B-M.height}M.width=I;M.height=B}if(M.width<y.minWidth||M.width>y.maxWidth){M.width=Ext.Number.constrain(M.width,y.minWidth,y.maxWidth);if(P){M.x=H.x+(H.width-M.width)}}else{y.lastX=M.x}if(M.height<y.minHeight||M.height>y.maxHeight){M.height=Ext.Number.constrain(M.height,y.minHeight,y.maxHeight);if(e){M.y=H.y+(H.height-M.height)}}else{y.lastY=M.y}if(y.preserveRatio||z.shiftKey){K=y.startBox.width/y.startBox.height;D=Math.min(Math.max(y.minHeight,M.width/K),y.maxHeight);G=Math.min(Math.max(y.minWidth,M.height*K),y.maxWidth);if(O==1){M.height=D}else{if(O==2){M.width=G}else{w=Math.abs(J[0]-this.lastXY[0])/Math.abs(J[1]-this.lastXY[1]);if(w>K){M.height=D}else{M.width=G}if(N=="northeast"){M.y=H.y-(M.height-H.height)}else{if(N=="northwest"){M.y=H.y-(M.height-H.height);M.x=H.x-(M.width-H.width)}else{if(N=="southwest"){M.x=H.x-(M.width-H.width)}}}}}}if(x===0){A="none"}if(C===0){E="none"}y.resize(M,{horizontal:E,vertical:A},F)},getResizeTarget:function(b){return b?this.target:this.getDynamicTarget()},resize:function(e,g,f){var h=this.getResizeTarget(f);if(h.isComponent){h.setSize(e.width,e.height);if(h.floating){h.setPagePosition(e.x,e.y)}}else{h.setBox(e)}h=this.originalTarget;if(h&&(this.dynamic||f)){if(h.isComponent){h.setSize(e.width,e.height);if(h.floating){h.setPagePosition(e.x,e.y)}}else{h.setBox(e)}}},onEnd:function(b){this.updateDimensions(b,true);if(this.proxy){this.proxy.hide()}}});Ext.define("Ext.draw.engine.SvgExporter",{singleton:true,statics:(function(){var o,n,p,k,j=function(a){o=a;n=o.length;p=o.width;k=o.height},m={path:function(a){var d=a.attr,e=d.path,b="",g,f,c;if(Ext.isArray(e[0])){c=e.length;for(f=0;f<c;f++){b+=e[f].join(" ")}}else{if(Ext.isArray(e)){b=e.join(" ")}else{b=e.replace(/,/g," ")}}g=q({d:b,fill:d.fill||"none",stroke:d.stroke,"fill-opacity":d.opacity,"stroke-width":d["stroke-width"],"stroke-opacity":d["stroke-opacity"],"z-index":d.zIndex,transform:a.matrix.toSvg()});return"<path "+g+"/>"},text:function(b){var e=b.attr,i=/(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)\s('*.*'*)/,f=i.exec(e.font),t=(f&&f[1])||"12",g=(f&&f[3])||"Arial",a=e.text,c=(Ext.isFF3_0||Ext.isFF3_5)?2:4,h="",d;b.getBBox();h+='<tspan x="'+(e.x||"")+'" dy="';h+=(t/c)+'">';h+=Ext.htmlEncode(a)+"</tspan>";d=q({x:e.x,y:e.y,"font-size":t,"font-family":g,"font-weight":e["font-weight"],"text-anchor":e["text-anchor"],fill:e.fill||"#000","fill-opacity":e.opacity,transform:b.matrix.toSvg()});return"<text "+d+">"+h+"</text>"},rect:function(b){var c=b.attr,a=q({x:c.x,y:c.y,rx:c.rx,ry:c.ry,width:c.width,height:c.height,fill:c.fill||"none","fill-opacity":c.opacity,stroke:c.stroke,"stroke-opacity":c["stroke-opacity"],"stroke-width":c["stroke-width"],transform:b.matrix&&b.matrix.toSvg()});return"<rect "+a+"/>"},circle:function(b){var c=b.attr,a=q({cx:c.x,cy:c.y,r:c.radius,fill:c.translation.fill||c.fill||"none","fill-opacity":c.opacity,stroke:c.stroke,"stroke-opacity":c["stroke-opacity"],"stroke-width":c["stroke-width"],transform:b.matrix.toSvg()});return"<circle "+a+" />"},image:function(b){var c=b.attr,a=q({x:c.x-(c.width/2>>0),y:c.y-(c.height/2>>0),width:c.width,height:c.height,"xlink:href":c.src,transform:b.matrix.toSvg()});return"<image "+a+" />"}},r=function(){var a='<?xml version="1.0" standalone="yes"?>';a+='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';return a},l=function(){var J='<svg width="'+p+'px" height="'+k+'px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">',U="",I,M,K,T,L,f,e,i,P,g,b,V,d,N,O,a,h,R,Q,S;K=o.items.items;M=K.length;L=function(A){var t=A.childNodes,w=t.length,x=0,z,y,s="",C,u,B,v;for(;x<w;x++){C=t[x];u=C.attributes;B=C.tagName;s+="<"+B;for(y=0,z=u.length;y<z;y++){v=u.item(y);s+=" "+v.name+'="'+v.value+'"'}s+=">";if(C.childNodes.length>0){s+=L(C)}s+="</"+B+">"}return s};if(o.getDefs){U=L(o.getDefs())}else{i=o.gradientsColl;if(i){P=i.keys;g=i.items;b=0;V=P.length}for(;b<V;b++){d=P[b];N=g[b];T=o.gradientsColl.getByKey(d);U+='<linearGradient id="'+d+'" x1="0" y1="0" x2="1" y2="1">';var c=T.colors.replace(/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,"rgb($1|$2|$3)");c=c.replace(/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,([\d\.]+)\)/g,"rgba($1|$2|$3|$4)");f=c.split(",");for(O=0,h=f.length;O<h;O++){e=f[O].split(" ");c=Ext.draw.Color.fromString(e[1].replace(/\|/g,","));U+='<stop offset="'+e[0]+'" stop-color="'+c.toString()+'" stop-opacity="1"></stop>'}U+="</linearGradient>"}}J+="<defs>"+U+"</defs>";J+=m.rect({attr:{width:"100%",height:"100%",fill:"#fff",stroke:"none",opacity:"0"}});R=new Array(M);for(O=0;O<M;O++){R[O]=O}R.sort(function(s,t){Q=K[s].attr.zIndex||0;S=K[t].attr.zIndex||0;if(Q==S){return s-t}return Q-S});for(O=0;O<M;O++){I=K[R[O]];if(!I.attr.hidden){J+=m[I.type](I)}}J+="</svg>";return J},q=function(a){var b="",c;for(c in a){if(a.hasOwnProperty(c)&&a[c]!=null){b+=c+'="'+a[c]+'" '}}return b};return{generate:function(a,b){j(b);return r()+l()}}}())});Ext.define("Ext.draw.engine.ImageExporter",{singleton:true,statics:(function(){var s={"image/png":1,"image/jpeg":1},l=function(a){if(a.hasOwnProperty("width")){u=a.width}if(a.hasOwnProperty("height")){o=a.height}if(a.hasOwnProperty("type")&&s[a.type]){r=a.type}else{return false}if(m&&n&&v&&q&&p){return true}m=m||Ext.get(document.createElement("form"));m.set({action:"http://svg.sencha.io",method:"POST"});n=n||Ext.get(document.createElement("input"));n.set({name:"svg",type:"hidden"});v=v||Ext.get(document.createElement("input"));v.set({name:"type",type:"hidden"});q=q||Ext.get(document.createElement("input"));q.set({name:"width",type:"hidden"});p=p||Ext.get(document.createElement("input"));p.set({name:"height",type:"hidden"});m.appendChild(n);m.appendChild(v);m.appendChild(q);m.appendChild(p);Ext.getBody().appendChild(m);return true},t=function(b){var a=Ext.draw.engine.SvgExporter.self.generate({},b);q.set({value:u||b.width});p.set({value:o||b.height});if(r){v.set({value:r})}n.set({value:a});m.dom.submit()},m,v,n,q,p,r,u,o;return{generate:function(a,b){if(l(a)){t(b)}else{return false}}}}())});Ext.define("Ext.ShadowPool",{singleton:true,requires:["Ext.DomHelper"],markup:(function(){return Ext.String.format('<div class="{0}{1}-shadow" role="presentation"></div>',Ext.baseCSSPrefix,Ext.isIE&&!Ext.supports.CSS3BoxShadow?"ie":"css")}()),shadows:[],pull:function(){var b=this.shadows.shift();if(!b){b=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,this.markup));b.autoBoxAdjust=false}return b},push:function(b){this.shadows.push(b)},reset:function(){var f=[].concat(this.shadows),d,e=f.length;for(d=0;d<e;d++){f[d].remove()}this.shadows=[]}});Ext.define("Ext.draw.Matrix",{requires:["Ext.draw.Draw"],constructor:function(e,f,a,b,c,d){if(e!=null){this.matrix=[[e,a,c],[f,b,d],[0,0,1]]}else{this.matrix=[[1,0,0],[0,1,0],[0,0,1]]}},add:function(z,c,f,u,w,x){var e=this,y=[[],[],[]],a=[[z,f,w],[c,u,x],[0,0,1]],b,d,t,v;for(b=0;b<3;b++){for(d=0;d<3;d++){v=0;for(t=0;t<3;t++){v+=e.matrix[b][t]*a[t][d]}y[b][d]=v}}e.matrix=y},prepend:function(z,c,f,u,w,x){var e=this,y=[[],[],[]],a=[[z,f,w],[c,u,x],[0,0,1]],b,d,t,v;for(b=0;b<3;b++){for(d=0;d<3;d++){v=0;for(t=0;t<3;t++){v+=a[b][t]*e.matrix[t][d]}y[b][d]=v}}e.matrix=y},invert:function(){var d=this.matrix,e=d[0][0],f=d[1][0],p=d[0][1],a=d[1][1],b=d[0][2],c=d[1][2],o=e*a-f*p;return new Ext.draw.Matrix(a/o,-f/o,-p/o,e/o,(p*c-a*b)/o,(f*b-e*c)/o)},clone:function(){var e=this.matrix,f=e[0][0],n=e[1][0],a=e[0][1],b=e[1][1],c=e[0][2],d=e[1][2];return new Ext.draw.Matrix(f,n,a,b,c,d)},translate:function(d,c){this.prepend(1,0,0,1,d,c)},scale:function(f,h,g,i){var j=this;if(h==null){h=f}j.add(1,0,0,1,g,i);j.add(f,0,0,h,0,0);j.add(1,0,0,1,-g,-i)},rotate:function(l,a,h){l=Ext.draw.Draw.rad(l);var j=this,i=+Math.cos(l).toFixed(9),k=+Math.sin(l).toFixed(9);j.add(i,k,-k,i,a,h);j.add(1,0,0,1,-a,-h)},x:function(e,f){var d=this.matrix;return e*d[0][0]+f*d[0][1]+d[0][2]},y:function(e,f){var d=this.matrix;return e*d[1][0]+f*d[1][1]+d[1][2]},get:function(c,d){return +this.matrix[c][d].toFixed(4)},toString:function(){var b=this;return[b.get(0,0),b.get(0,1),b.get(1,0),b.get(1,1),0,0].join()},toSvg:function(){var b=this;return"matrix("+[b.get(0,0),b.get(1,0),b.get(0,1),b.get(1,1),b.get(0,2),b.get(1,2)].join()+")"},toFilter:function(d,e){var f=this;d=d||0;e=e||0;return"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', filterType='bilinear', M11="+f.get(0,0)+", M12="+f.get(0,1)+", M21="+f.get(1,0)+", M22="+f.get(1,1)+", Dx="+(f.get(0,2)+d)+", Dy="+(f.get(1,2)+e)+")"},offset:function(){var b=this.matrix;return[(b[0][2]||0).toFixed(4),(b[1][2]||0).toFixed(4)]},split:function(){function i(a){return a[0]*a[0]+a[1]*a[1]}function f(b){var a=Math.sqrt(i(b));b[0]/=a;b[1]/=a}var g=this.matrix,j={translateX:g[0][2],translateY:g[1][2]},h;h=[[g[0][0],g[0][1]],[g[1][1],g[1][1]]];j.scaleX=Math.sqrt(i(h[0]));f(h[0]);j.shear=h[0][0]*h[1][0]+h[0][1]*h[1][1];h[1]=[h[1][0]-h[0][0]*j.shear,h[1][1]-h[0][1]*j.shear];j.scaleY=Math.sqrt(i(h[1]));f(h[1]);j.shear/=j.scaleY;j.rotate=Math.asin(-h[0][1]);j.isSimple=!+j.shear.toFixed(9)&&(j.scaleX.toFixed(9)==j.scaleY.toFixed(9)||!j.rotate);return j}});Ext.define("Ext.draw.SpriteDD",{extend:"Ext.dd.DragSource",constructor:function(e,f){var g=this,h=e.el;g.sprite=e;g.el=h;g.dragData={el:h,sprite:e};g.callParent([h,f]);g.sprite.setStyle("cursor","move")},showFrame:Ext.emptyFn,createFrame:Ext.emptyFn,getDragEl:function(b){return this.el},getRegion:function(){var v=this,y=v.el,t,z,A,r,s,b,B,u,x,e,l;l=v.sprite;e=l.getBBox();try{t=Ext.Element.getXY(y)}catch(w){}if(!t){return null}z=t[0];A=z+e.width;r=t[1];s=r+e.height;return new Ext.util.Region(r,A,s,z)},startDrag:function(e,g){var h=this,f=h.sprite.attr;h.prev=h.sprite.surface.transformToViewBox(e,g)},onDrag:function(j){var k=j.getXY(),l=this,m=l.sprite,i=m.attr,n,e;k=l.sprite.surface.transformToViewBox(k[0],k[1]);n=k[0]-l.prev[0];e=k[1]-l.prev[1];m.setAttributes({translate:{x:i.translation.x+n,y:i.translation.y+e}},true);l.prev=k},setDragElPos:function(){return false}});Ext.define("Ext.Shadow",{requires:["Ext.ShadowPool"],constructor:function(f){var j=this,i,h,g;Ext.apply(j,f);if(!Ext.isString(j.mode)){j.mode=j.defaultMode}h=j.offset;g=Math.floor(h/2);j.opacity=50;switch(j.mode.toLowerCase()){case"drop":if(Ext.supports.CSS3BoxShadow){i={t:h,l:h,h:-h,w:-h}}else{i={t:-g,l:-g,h:-g,w:-g}}break;case"sides":if(Ext.supports.CSS3BoxShadow){i={t:h,l:0,h:-h,w:0}}else{i={t:-(1+g),l:1+g-2*h,h:-1,w:g-1}}break;case"frame":if(Ext.supports.CSS3BoxShadow){i={t:0,l:0,h:0,w:0}}else{i={t:1+g-2*h,l:1+g-2*h,h:h-g-1,w:h-g-1}}break}j.adjusts=i},offset:4,defaultMode:"drop",boxShadowProperty:(function(){var c="boxShadow",d=document.documentElement.style;if(!("boxShadow" in d)){if("WebkitBoxShadow" in d){c="WebkitBoxShadow"}else{if("MozBoxShadow" in d){c="MozBoxShadow"}}}return c}()),show:function(f){var d=this,e;f=Ext.get(f);if(!d.el){d.el=Ext.ShadowPool.pull();if(d.el.dom.nextSibling!=f.dom){d.el.insertBefore(f)}}e=(parseInt(f.getStyle("z-index"),10)-1)||0;d.el.setStyle("z-index",d.zIndex||e);if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){d.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity="+d.opacity+") progid:DXImageTransform.Microsoft.Blur(pixelradius="+(d.offset)+")"}d.realign(f.getLeft(true),f.getTop(true),f.dom.offsetWidth,f.dom.offsetHeight);d.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(u,d,n,r){if(!this.el){return}var v=this.adjusts,p=this.el.dom,o=p.style,t,s,q,l;o.left=(u+v.l)+"px";o.top=(d+v.t)+"px";t=Math.max(n+v.w,0);s=Math.max(r+v.h,0);q=t+"px";l=s+"px";if(o.width!=q||o.height!=l){o.width=q;o.height=l;if(Ext.supports.CSS3BoxShadow){o[this.boxShadowProperty]="0 0 "+this.offset+"px #888"}}},hide:function(){var b=this;if(b.el){b.el.dom.style.display="none";Ext.ShadowPool.push(b.el);delete b.el}},setZIndex:function(b){this.zIndex=b;if(this.el){this.el.setStyle("z-index",b)}},setOpacity:function(b){if(this.el){if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){b=Math.floor(b*100/2)/100}this.opacity=b;this.el.setOpacity(b)}}});Ext.define("Ext.draw.Sprite",{mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate"},requires:["Ext.draw.SpriteDD"],dirty:false,dirtyHidden:false,dirtyTransform:false,dirtyPath:true,dirtyFont:true,zIndexDirty:true,isSprite:true,zIndex:0,fontProperties:["font","font-size","font-weight","font-style","font-family","text-anchor","text"],pathProperties:["x","y","d","path","height","width","radius","r","rx","ry","cx","cy"],constructor:function(d){var c=this;d=Ext.merge({},d||{});c.id=Ext.id(null,"ext-sprite-");c.transformations=[];Ext.copyTo(this,d,"surface,group,type,draggable");c.bbox={};c.attr={zIndex:0,translation:{x:null,y:null},rotation:{degrees:null,x:null,y:null},scaling:{x:null,y:null,cx:null,cy:null}};delete d.surface;delete d.group;delete d.type;delete d.draggable;c.setAttributes(d);c.addEvents("beforedestroy","destroy","render","mousedown","mouseup","mouseover","mouseout","mousemove","click");c.mixins.observable.constructor.apply(this,arguments)},initDraggable:function(){var b=this;b.draggable=true;if(!b.el){b.surface.createSpriteElement(b)}b.dd=new Ext.draw.SpriteDD(b,Ext.isBoolean(b.draggable)?null:b.draggable);b.on("beforedestroy",b.dd.destroy,b.dd)},setAttributes:function(C,z){var u=this,E=u.fontProperties,x=E.length,F=u.pathProperties,G=F.length,w=!!u.surface,L=w&&u.surface.customAttributes||{},J=u.attr,K=false,B,y,D,I,v,A,i,H;C=Ext.apply({},C);for(B in L){if(C.hasOwnProperty(B)&&typeof L[B]=="function"){Ext.apply(C,L[B].apply(u,[].concat(C[B])))}}if(!!C.hidden!==!!J.hidden){u.dirtyHidden=true}for(y=0;y<G;y++){B=F[y];if(B in C&&C[B]!==J[B]){u.dirtyPath=true;K=true;break}}if("zIndex" in C){u.zIndexDirty=true}if("text" in C){u.dirtyFont=true;K=true}for(y=0;y<x;y++){B=E[y];if(B in C&&C[B]!==J[B]){u.dirtyFont=true;K=true;break}}D=C.translation||C.translate;delete C.translate;delete C.translation;I=J.translation;if(D){if(("x" in D&&D.x!==I.x)||("y" in D&&D.y!==I.y)){u.dirtyTransform=true;I.x=D.x;I.y=D.y}}v=C.rotation||C.rotate;A=J.rotation;delete C.rotate;delete C.rotation;if(v){if(("x" in v&&v.x!==A.x)||("y" in v&&v.y!==A.y)||("degrees" in v&&v.degrees!==A.degrees)){u.dirtyTransform=true;A.x=v.x;A.y=v.y;A.degrees=v.degrees}}i=C.scaling||C.scale;H=J.scaling;delete C.scale;delete C.scaling;if(i){if(("x" in i&&i.x!==H.x)||("y" in i&&i.y!==H.y)||("cx" in i&&i.cx!==H.cx)||("cy" in i&&i.cy!==H.cy)){u.dirtyTransform=true;H.x=i.x;H.y=i.y;H.cx=i.cx;H.cy=i.cy}}if(!u.dirtyTransform&&K){if(J.scaling.x===null||J.scaling.y===null||J.rotation.y===null||J.rotation.y===null){u.dirtyTransform=true}}Ext.apply(J,C);u.dirty=true;if(z===true&&w){u.redraw()}return this},getBBox:function(){return this.surface.getBBox(this)},setText:function(b){return this.surface.setText(this,b)},hide:function(b){this.setAttributes({hidden:true},b);return this},show:function(b){this.setAttributes({hidden:false},b);return this},remove:function(){if(this.surface){this.surface.remove(this);return true}return false},onRemove:function(){this.surface.onRemove(this)},destroy:function(){var b=this;if(b.fireEvent("beforedestroy",b)!==false){b.remove();b.surface.onDestroy(b);b.clearListeners();b.fireEvent("destroy")}},redraw:function(){this.surface.renderItem(this);return this},setStyle:function(){this.el.setStyle.apply(this.el,arguments);return this},addCls:function(b){this.surface.addCls(this,b);return this},removeCls:function(b){this.surface.removeCls(this,b);return this}});Ext.define("Ext.draw.engine.Svg",{extend:"Ext.draw.Surface",requires:["Ext.draw.Draw","Ext.draw.Sprite","Ext.draw.Matrix","Ext.Element"],engine:"Svg",trimRe:/^\s+|\s+$/g,spacesRe:/\s+/,xlink:"http://www.w3.org/1999/xlink",translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",path:"d",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},parsers:{},minDefaults:{circle:{cx:0,cy:0,r:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start","font-family":null,"font-size":null,"font-weight":null,"font-style":null,fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},createSvgElement:function(g,f){var h=this.domRef.createElementNS("http://www.w3.org/2000/svg",g),e;if(f){for(e in f){h.setAttribute(e,String(f[e]))}}return h},createSpriteElement:function(d){var c=this.createSvgElement(d.type);c.id=d.id;if(c.style){c.style.webkitTapHighlightColor="rgba(0,0,0,0)"}d.el=Ext.get(c);this.applyZIndex(d);d.matrix=new Ext.draw.Matrix();d.bbox={plain:0,transform:0};this.applyAttrs(d);this.applyTransformations(d);d.fireEvent("render",d);return c},getBBoxText:function(l){var i={},n,e,r,p,m,q;if(l&&l.el){q=l.el.dom;try{i=q.getBBox();return i}catch(o){}i={x:i.x,y:Infinity,width:0,height:0};m=q.getNumberOfChars();for(p=0;p<m;p++){n=q.getExtentOfChar(p);i.y=Math.min(n.y,i.y);e=n.y+n.height-i.y;i.height=Math.max(i.height,e);r=n.x+n.width-i.x;i.width=Math.max(i.width,r)}return i}},hide:function(){Ext.get(this.el).hide()},show:function(){Ext.get(this.el).show()},hidePrim:function(b){this.addCls(b,Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(b){this.removeCls(b,Ext.baseCSSPrefix+"hide-visibility")},getDefs:function(){return this._defs||(this._defs=this.createSvgElement("defs"))},transform:function(i,r){var l=this,k=new Ext.draw.Matrix(),n=i.transformations,o=n.length,p=0,q,m;for(;p<o;p++){q=n[p];m=q.type;if(m=="translate"){k.translate(q.x,q.y)}else{if(m=="rotate"){k.rotate(q.degrees,q.x,q.y)}else{if(m=="scale"){k.scale(q.x,q.y,q.centerX,q.centerY)}}}}i.matrix=k;if(!r){i.el.set({transform:k.toSvg()})}},setSize:function(h,f){var g=this,e=g.el;h=+h||g.width;f=+f||g.height;g.width=h;g.height=f;e.setSize(h,f);e.set({width:h,height:f});g.callParent([h,f])},getRegion:function(){var h=this.el.getXY(),j=this.bgRect.getXY(),f=Math.max,g=f(h[0],j[0]),i=f(h[1],j[1]);return{left:g,top:i,right:g+this.width,bottom:i+this.height}},onRemove:function(b){if(b.el){b.el.destroy();delete b.el}this.callParent(arguments)},setViewBox:function(e,g,h,f){if(isFinite(e)&&isFinite(g)&&isFinite(h)&&isFinite(f)){this.callParent(arguments);this.el.dom.setAttribute("viewBox",[e,g,h,f].join(" "))}},render:function(p){var m=this,n,i,o,j,l,k;if(!m.el){n=m.width||0;i=m.height||0;o=m.createSvgElement("svg",{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:n,height:i});j=m.getDefs();l=m.createSvgElement("rect",{width:"100%",height:"100%",fill:"#000",stroke:"none",opacity:0});if(Ext.isSafari3){k=m.createSvgElement("rect",{x:-10,y:-10,width:"110%",height:"110%",fill:"none",stroke:"#000"})}o.appendChild(j);if(Ext.isSafari3){o.appendChild(k)}o.appendChild(l);p.appendChild(o);m.el=Ext.get(o);m.bgRect=Ext.get(l);if(Ext.isSafari3){m.webkitRect=Ext.get(k);m.webkitRect.hide()}m.el.on({scope:m,mouseup:m.onMouseUp,mousedown:m.onMouseDown,mouseover:m.onMouseOver,mouseout:m.onMouseOut,mousemove:m.onMouseMove,mouseenter:m.onMouseEnter,mouseleave:m.onMouseLeave,click:m.onClick,dblclick:m.onDblClick})}m.renderAll()},onMouseEnter:function(b){if(this.el.parent().getRegion().contains(b.getPoint())){this.fireEvent("mouseenter",b)}},onMouseLeave:function(b){if(!this.el.parent().getRegion().contains(b.getPoint())){this.fireEvent("mouseleave",b)}},processEvent:function(e,h){var i=h.getTarget(),g=this.surface,j;this.fireEvent(e,h);if(i.nodeName=="tspan"&&i.parentNode){i=i.parentNode}j=this.items.get(i.id);if(j){j.fireEvent(e,j,h)}},tuneText:function(p,o){var x=p.el.dom,w=[],i,r,n,u,t,v,s,q;if(o.hasOwnProperty("text")){n=p.tspans&&Ext.Array.map(p.tspans,function(a){return a.textContent}).join("");if(!p.tspans||o.text!=n){w=this.setText(p,o.text);p.tspans=w}else{w=p.tspans||[]}}if(w.length){i=this.getBBoxText(p).height;q=p.el.dom.getAttribute("x");for(u=0,t=w.length;u<t;u++){s=(Ext.isFF3_0||Ext.isFF3_5)?2:4;w[u].setAttribute("x",q);w[u].setAttribute("dy",u?i*1.2:i/s)}p.dirty=true}},setText:function(n,s){var p=this,v=n.el.dom,u=[],i,o,m,r,q,t;while(v.firstChild){v.removeChild(v.firstChild)}t=String(s).split("\n");for(r=0,q=t.length;r<q;r++){m=t[r];if(m){o=p.createSvgElement("tspan");o.appendChild(document.createTextNode(Ext.htmlDecode(m)));v.appendChild(o);u[r]=o}}return u},renderAll:function(){this.items.each(this.renderItem,this)},renderItem:function(b){if(!this.el){return}if(!b.el){this.createSpriteElement(b)}if(b.zIndexDirty){this.applyZIndex(b)}if(b.dirty){this.applyAttrs(b);if(b.dirtyTransform){this.applyTransformations(b)}}},redraw:function(b){b.dirty=b.zIndexDirty=true;this.renderItem(b)},applyAttrs:function(s){var x=this,F=s.el,t=s.group,A=s.attr,i=x.parsers,C=x.gradientsMap||{},z=Ext.isSafari&&!Ext.isStrict,D,B,y,u,E,v,G,H,w;if(t){D=[].concat(t);y=D.length;for(B=0;B<y;B++){t=D[B];x.getGroup(t).add(s)}delete s.group}u=x.scrubAttrs(s)||{};s.bbox.plain=0;s.bbox.transform=0;if(s.type=="circle"||s.type=="ellipse"){u.cx=u.cx||u.x;u.cy=u.cy||u.y}else{if(s.type=="rect"){u.rx=u.ry=u.r}else{if(s.type=="path"&&u.d){u.d=Ext.draw.Draw.pathToString(Ext.draw.Draw.pathToAbsolute(u.d))}}}s.dirtyPath=false;if(u["clip-rect"]){x.setClip(s,u);delete u["clip-rect"]}if(s.type=="text"&&u.font&&s.dirtyFont){F.set({style:"font: "+u.font})}if(s.type=="image"){F.dom.setAttributeNS(x.xlink,"href",u.src)}Ext.applyIf(u,x.minDefaults[s.type]);if(s.dirtyHidden){(A.hidden)?x.hidePrim(s):x.showPrim(s);s.dirtyHidden=false}for(v in u){if(u.hasOwnProperty(v)&&u[v]!=null){if(z&&("color|stroke|fill".indexOf(v)>-1)&&(u[v] in C)){u[v]=C[u[v]]}if(v=="hidden"&&s.type=="text"){continue}if(v in i){F.dom.setAttribute(v,i[v](u[v],s,x))}else{F.dom.setAttribute(v,u[v])}}}if(s.type=="text"){x.tuneText(s,u)}s.dirtyFont=false;G=A.style;if(G){F.setStyle(G)}s.dirty=false;if(Ext.isSafari3){x.webkitRect.show();setTimeout(function(){x.webkitRect.hide()})}},setClip:function(g,i){var j=this,k=i["clip-rect"],h,l;if(k){if(g.clip){g.clip.parentNode.parentNode.removeChild(g.clip.parentNode)}h=j.createSvgElement("clipPath");l=j.createSvgElement("rect");h.id=Ext.id(null,"ext-clip-");l.setAttribute("x",k.x);l.setAttribute("y",k.y);l.setAttribute("width",k.width);l.setAttribute("height",k.height);h.appendChild(l);j.getDefs().appendChild(h);g.el.dom.setAttribute("clip-path","url(#"+h.id+")");g.clip=l}},applyZIndex:function(k){var i=this,g=i.items,h=g.indexOf(k),j=k.el,l;if(i.el.dom.childNodes[h+2]!==j.dom){if(h>0){do{l=g.getAt(--h).el}while(!l&&h>0)}j.insertAfter(l||i.bgRect)}k.zIndexDirty=false},createItem:function(d){var c=new Ext.draw.Sprite(d);c.surface=this;return c},addGradient:function(n){n=Ext.draw.Draw.parseGradient(n);var p=this,q=n.stops.length,t=n.vector,i=Ext.isSafari&&!Ext.isStrict,m,o,l,r,s;s=p.gradientsMap||{};if(!i){if(n.type=="linear"){m=p.createSvgElement("linearGradient");m.setAttribute("x1",t[0]);m.setAttribute("y1",t[1]);m.setAttribute("x2",t[2]);m.setAttribute("y2",t[3])}else{m=p.createSvgElement("radialGradient");m.setAttribute("cx",n.centerX);m.setAttribute("cy",n.centerY);m.setAttribute("r",n.radius);if(Ext.isNumber(n.focalX)&&Ext.isNumber(n.focalY)){m.setAttribute("fx",n.focalX);m.setAttribute("fy",n.focalY)}}m.id=n.id;p.getDefs().appendChild(m);for(r=0;r<q;r++){o=n.stops[r];l=p.createSvgElement("stop");l.setAttribute("offset",o.offset+"%");l.setAttribute("stop-color",o.color);l.setAttribute("stop-opacity",o.opacity);m.appendChild(l)}}else{s["url(#"+n.id+")"]=n.stops[0].color}p.gradientsMap=s},hasCls:function(d,c){return c&&(" "+(d.el.dom.getAttribute("class")||"")+" ").indexOf(" "+c+" ")!=-1},addCls:function(n,l){var m=n.el,o,j,p,i=[],k=m.getAttribute("class")||"";if(!Ext.isArray(l)){if(typeof l=="string"&&!this.hasCls(n,l)){m.set({"class":k+" "+l})}}else{for(o=0,j=l.length;o<j;o++){p=l[o];if(typeof p=="string"&&(" "+k+" ").indexOf(" "+p+" ")==-1){i.push(p)}}if(i.length){m.set({"class":" "+i.join(" ")})}}},removeCls:function(l,o){var n=this,s=l.el,q=s.getAttribute("class")||"",r,m,p,i,t;if(!Ext.isArray(o)){o=[o]}if(q){t=q.replace(n.trimRe," ").split(n.spacesRe);for(r=0,p=o.length;r<p;r++){i=o[r];if(typeof i=="string"){i=i.replace(n.trimRe,"");m=Ext.Array.indexOf(t,i);if(m!=-1){Ext.Array.erase(t,m,1)}}}s.set({"class":t.join(" ")})}},destroy:function(){var b=this;b.callParent();if(b.el){b.el.remove()}if(b._defs){Ext.get(b._defs).destroy()}if(b.bgRect){Ext.get(b.bgRect).destroy()}if(b.webkitRect){Ext.get(b.webkitRect).destroy()}delete b.el}});Ext.define("Ext.draw.engine.Vml",{extend:"Ext.draw.Surface",requires:["Ext.draw.Draw","Ext.draw.Color","Ext.draw.Sprite","Ext.draw.Matrix","Ext.Element"],engine:"Vml",map:{M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},bitesRe:/([clmz]),?([^clmz]*)/gi,valRe:/-?[^,\s\-]+/g,fillUrlRe:/^url\(\s*['"]?([^\)]+?)['"]?\s*\)$/i,pathlike:/^(path|rect)$/,NonVmlPathRe:/[ahqstv]/ig,partialPathRe:/[clmz]/g,fontFamilyRe:/^['"]+|['"]+$/g,baseVmlCls:Ext.baseCSSPrefix+"vml-base",vmlGroupCls:Ext.baseCSSPrefix+"vml-group",spriteCls:Ext.baseCSSPrefix+"vml-sprite",measureSpanCls:Ext.baseCSSPrefix+"vml-measure-span",zoom:21600,coordsize:1000,coordorigin:"0 0",zIndexShift:0,orderSpritesByZIndex:false,path2vml:function(F){var r=this,E=r.NonVmlPathRe,C=r.map,z=r.valRe,i=r.zoom,A=r.bitesRe,y=Ext.Function.bind(Ext.draw.Draw.pathToAbsolute,Ext.draw.Draw),u,p,B,D,w,j,x,v;if(String(F).match(E)){y=Ext.Function.bind(Ext.draw.Draw.path2curve,Ext.draw.Draw)}else{if(!String(F).match(r.partialPathRe)){u=String(F).replace(A,function(e,a,c){var b=[],d=a.toLowerCase()=="m",f=C[a];c.replace(z,function(g){if(d&&b.length===2){f+=b+C[a=="m"?"l":"L"];b=[]}b.push(Math.round(g*i))});return f+b});return u}}p=y(F);u=[];for(w=0,j=p.length;w<j;w++){B=p[w];D=p[w][0].toLowerCase();if(D=="z"){D="x"}for(x=1,v=B.length;x<v;x++){D+=Math.round(B[x]*r.zoom)+(x!=v-1?",":"")}u.push(D)}return u.join(" ")},translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},minDefaults:{circle:{fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start",font:'10px "Arial"',fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},onMouseEnter:function(b){this.fireEvent("mouseenter",b)},onMouseLeave:function(b){this.fireEvent("mouseleave",b)},processEvent:function(e,h){var i=h.getTarget(),g=this.surface,j;this.fireEvent(e,h);j=this.items.get(i.id);if(j){j.fireEvent(e,j,h)}},createSpriteElement:function(p){var r=this,s=p.attr,q=p.type,n=r.zoom,u=p.vml||(p.vml={}),m=Math.round,t=(q==="image")?r.createNode("image"):r.createNode("shape"),l,o,v;t.coordsize=n+" "+n;t.coordorigin=s.coordorigin||"0 0";Ext.get(t).addCls(r.spriteCls);if(q=="text"){u.path=l=r.createNode("path");l.textpathok=true;u.textpath=v=r.createNode("textpath");v.on=true;t.appendChild(v);t.appendChild(l)}t.id=p.id;p.el=Ext.get(t);p.el.setStyle("zIndex",-r.zIndexShift);r.el.appendChild(t);if(q!=="image"){o=r.createNode("skew");o.on=true;t.appendChild(o);p.skew=o}p.matrix=new Ext.draw.Matrix();p.bbox={plain:null,transform:null};this.applyAttrs(p);this.applyTransformations(p);p.fireEvent("render",p);return p.el},getBBoxText:function(c){var d=c.vml;return{x:d.X+(d.bbx||0)-d.W/2,y:d.Y-d.H/2,width:d.W,height:d.H}},applyAttrs:function(B){var v=this,J=B.vml,E=B.group,L=B.attr,K=B.el,z=K.dom,y,i,w,A,D,x,C,u,H,I,F,G;if(E){w=[].concat(E);D=w.length;for(A=0;A<D;A++){E=w[A];v.getGroup(E).add(B)}delete B.group}x=v.scrubAttrs(B)||{};if(B.zIndexDirty){v.setZIndex(B)}Ext.applyIf(x,v.minDefaults[B.type]);if(B.type=="image"){Ext.apply(B.attr,{x:x.x,y:x.y,width:x.width,height:x.height});K.setStyle({width:x.width+"px",height:x.height+"px"});z.src=x.src}if(z.href){z.href=x.href}if(z.title){z.title=x.title}if(z.target){z.target=x.target}if(z.cursor){z.cursor=x.cursor}if(B.dirtyHidden){(x.hidden)?v.hidePrim(B):v.showPrim(B);B.dirtyHidden=false}if(B.dirtyPath){if(B.type=="circle"||B.type=="ellipse"){H=x.x;I=x.y;F=x.rx||x.r||0;G=x.ry||x.r||0;z.path=Ext.String.format("ar{0},{1},{2},{3},{4},{1},{4},{1}",Math.round((H-F)*v.zoom),Math.round((I-G)*v.zoom),Math.round((H+F)*v.zoom),Math.round((I+G)*v.zoom),Math.round(H*v.zoom));B.dirtyPath=false}else{if(B.type!=="text"&&B.type!=="image"){B.attr.path=x.path=v.setPaths(B,x)||x.path;z.path=v.path2vml(x.path);B.dirtyPath=false}}}if("clip-rect" in x){v.setClip(B,x)}if(B.type=="text"){v.setTextAttributes(B,x)}if(x.opacity||x["stroke-opacity"]||x.fill){v.setFill(B,x)}if(x.stroke||x["stroke-opacity"]||x.fill){v.setStroke(B,x)}y=L.style;if(y){K.setStyle(y)}B.dirty=false},setZIndex:function(n){var l=this,k=n.attr.zIndex,i=l.zIndexShift,p,j,m,o;if(k<i){p=l.items.items;j=p.length;for(o=0;o<j;o++){if((k=p[o].attr.zIndex)&&k<i){i=k}}l.zIndexShift=i;for(o=0;o<j;o++){m=p[o];if(m.el){m.el.setStyle("zIndex",m.attr.zIndex-i)}m.zIndexDirty=false}}else{if(n.el){n.el.setStyle("zIndex",k-i);n.zIndexDirty=false}}},setPaths:function(h,g){var f=h.attr,e=h.attr["stroke-width"]||1;h.bbox.plain=null;h.bbox.transform=null;if(h.type=="circle"){f.rx=f.ry=g.r;return Ext.draw.Draw.ellipsePath(h)}else{if(h.type=="ellipse"){f.rx=g.rx;f.ry=g.ry;return Ext.draw.Draw.ellipsePath(h)}else{if(h.type=="rect"){f.rx=f.ry=g.r;return Ext.draw.Draw.rectPath(h)}else{if(h.type=="path"&&f.path){return Ext.draw.Draw.pathToAbsolute(f.path)}}}}return false},setFill:function(m,r){var p=this,t=m.el.dom,n=t.fill,u=false,q,o,v,l,s;if(!n){n=t.fill=p.createNode("fill");u=true}if(Ext.isArray(r.fill)){r.fill=r.fill[0]}if(r.fill=="none"){n.on=false}else{if(typeof r.opacity=="number"){n.opacity=r.opacity}if(typeof r["fill-opacity"]=="number"){n.opacity=r["fill-opacity"]}n.on=true;if(typeof r.fill=="string"){v=r.fill.match(p.fillUrlRe);if(v){v=v[1];if(v.charAt(0)=="#"){o=p.gradientsColl.getByKey(v.substring(1))}if(o){l=r.rotation;s=-(o.angle+270+(l?l.degrees:0))%360;if(s===0){s=180}n.angle=s;n.type="gradient";n.method="sigma";if(n.colors){n.colors.value=o.colors}else{n.colors=o.colors}}else{n.src=v;n.type="tile"}}else{n.color=Ext.draw.Color.toHex(r.fill);n.src="";n.type="solid"}}}if(u){t.appendChild(n)}},setStroke:function(i,l){var n=this,o=i.el.dom,k=i.strokeEl,m=false,p,j;if(!k){k=i.strokeEl=n.createNode("stroke");m=true}if(Ext.isArray(l.stroke)){l.stroke=l.stroke[0]}if(!l.stroke||l.stroke=="none"||l.stroke==0||l["stroke-width"]==0){k.on=false}else{k.on=true;if(l.stroke&&!l.stroke.match(n.fillUrlRe)){k.color=Ext.draw.Color.toHex(l.stroke)}k.dashstyle=l["stroke-dasharray"]?"dash":"solid";k.joinstyle=l["stroke-linejoin"];k.endcap=l["stroke-linecap"]||"round";k.miterlimit=l["stroke-miterlimit"]||8;p=parseFloat(l["stroke-width"]||1)*0.75;j=l["stroke-opacity"]||1;if(Ext.isNumber(p)&&p<1){k.weight=1;k.opacity=j*p}else{k.weight=p;k.opacity=j}}if(m){o.appendChild(k)}},setClip:function(g,i){var j=this,l=g.el,h=g.clipEl,k=String(i["clip-rect"]).split(j.separatorRe);if(!h){h=g.clipEl=j.el.insertFirst(Ext.getDoc().dom.createElement("div"));h.addCls(Ext.baseCSSPrefix+"vml-sprite")}if(k.length==4){k[2]=+k[2]+(+k[0]);k[3]=+k[3]+(+k[1]);h.setStyle("clip",Ext.String.format("rect({1}px {2}px {3}px {0}px)",k[0],k[1],k[2],k[3]));h.setSize(j.el.width,j.el.height)}else{h.setStyle("clip","")}},setTextAttributes:function(o,t){var p=this,v=o.vml,r=v.textpath.style,q=p.span.style,n=p.zoom,m=Math.round,l={fontSize:"font-size",fontWeight:"font-weight",fontStyle:"font-style"},u,s;if(o.dirtyFont){if(t.font){r.font=q.font=t.font}if(t["font-family"]){r.fontFamily='"'+t["font-family"].split(",")[0].replace(p.fontFamilyRe,"")+'"';q.fontFamily=t["font-family"]}for(u in l){s=t[l[u]];if(s){r[u]=q[u]=s}}p.setText(o,t.text);if(v.textpath.string){p.span.innerHTML=String(v.textpath.string).replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,"<br>")}v.W=p.span.offsetWidth;v.H=p.span.offsetHeight+2;if(t["text-anchor"]=="middle"){r["v-text-align"]="center"}else{if(t["text-anchor"]=="end"){r["v-text-align"]="right";v.bbx=-Math.round(v.W/2)}else{r["v-text-align"]="left";v.bbx=Math.round(v.W/2)}}}v.X=t.x;v.Y=t.y;v.path.v=Ext.String.format("m{0},{1}l{2},{1}",Math.round(v.X*n),Math.round(v.Y*n),Math.round(v.X*n)+1);o.bbox.plain=null;o.bbox.transform=null;o.dirtyFont=false},setText:function(d,c){d.vml.textpath.string=Ext.htmlDecode(c)},hide:function(){this.el.hide()},show:function(){this.el.show()},hidePrim:function(b){b.el.addCls(Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(b){b.el.removeCls(Ext.baseCSSPrefix+"hide-visibility")},setSize:function(d,e){var f=this;d=d||f.width;e=e||f.height;f.width=d;f.height=e;if(f.el){if(d!=undefined){f.el.setWidth(d)}if(e!=undefined){f.el.setHeight(e)}}f.callParent(arguments)},applyViewBox:function(){var k=this,j=k.viewBox,l=k.width,h=k.height,n,i,m;k.callParent();if(j&&(l||h)){n=k.items.items;i=n.length;for(m=0;m<i;m++){k.applyTransformations(n[m])}}},onAdd:function(b){this.callParent(arguments);if(this.el){this.renderItem(b)}},onRemove:function(b){if(b.el){b.el.remove();delete b.el}this.callParent(arguments)},render:function(g){var j=this,h=Ext.getDoc().dom,e;if(!j.createNode){try{if(!h.namespaces.rvml){h.namespaces.add("rvml","urn:schemas-microsoft-com:vml")}j.createNode=function(a){return h.createElement("<rvml:"+a+' class="rvml">')}}catch(i){j.createNode=function(a){return h.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}}if(!j.el){e=h.createElement("div");j.el=Ext.get(e);j.el.addCls(j.baseVmlCls);j.span=h.createElement("span");Ext.get(j.span).addCls(j.measureSpanCls);e.appendChild(j.span);j.el.setSize(j.width||0,j.height||0);g.appendChild(e);j.el.on({scope:j,mouseup:j.onMouseUp,mousedown:j.onMouseDown,mouseover:j.onMouseOver,mouseout:j.onMouseOut,mousemove:j.onMouseMove,mouseenter:j.onMouseEnter,mouseleave:j.onMouseLeave,click:j.onClick,dblclick:j.onDblClick})}j.renderAll()},renderAll:function(){this.items.each(this.renderItem,this)},redraw:function(b){b.dirty=true;this.renderItem(b)},renderItem:function(b){if(!this.el){return}if(!b.el){this.createSpriteElement(b)}if(b.dirty){this.applyAttrs(b);if(b.dirtyTransform){this.applyTransformations(b)}}},rotationCompensation:function(g,h,f){var e=new Ext.draw.Matrix();e.rotate(-g,0.5,0.5);return{x:e.x(h,f),y:e.y(h,f)}},transform:function(J,I){var L=this,ak=L.getBBox(J,true),ae=ak.x+ak.width*0.5,af=ak.y+ak.height*0.5,W=new Ext.draw.Matrix(),X=J.transformations,N=X.length,V=0,Z=0,ai=1,aj=1,aa="",ag=J.el,R=ag.dom,y=R.style,al=L.zoom,ad=J.skew,T=L.viewBoxShift,M,P,S,ac,U,Y,i,K,O,Q,ah,ab;for(;V<N;V++){S=X[V];ac=S.type;if(ac=="translate"){W.translate(S.x,S.y)}else{if(ac=="rotate"){W.rotate(S.degrees,S.x,S.y);Z+=S.degrees}else{if(ac=="scale"){W.scale(S.x,S.y,S.centerX,S.centerY);ai*=S.x;aj*=S.y}}}}J.matrix=W.clone();if(I){return}if(T){W.prepend(T.scale,0,0,T.scale,T.dx*T.scale,T.dy*T.scale)}if(J.type!="image"&&ad){ad.origin="0,0";ad.matrix=W.toString();ab=W.offset();if(ab[0]>32767){ab[0]=32767}else{if(ab[0]<-32768){ab[0]=-32768}}if(ab[1]>32767){ab[1]=32767}else{if(ab[1]<-32768){ab[1]=-32768}}ad.offset=ab}else{y.filter=W.toFilter();y.left=Math.min(W.x(ak.x,ak.y),W.x(ak.x+ak.width,ak.y),W.x(ak.x,ak.y+ak.height),W.x(ak.x+ak.width,ak.y+ak.height))+"px";y.top=Math.min(W.y(ak.x,ak.y),W.y(ak.x+ak.width,ak.y),W.y(ak.x,ak.y+ak.height),W.y(ak.x+ak.width,ak.y+ak.height))+"px"}},createItem:function(b){return Ext.create("Ext.draw.Sprite",b)},getRegion:function(){return this.el.getRegion()},addCls:function(d,c){if(d&&d.el){d.el.addCls(c)}},removeCls:function(d,c){if(d&&d.el){d.el.removeCls(c)}},addGradient:function(o){var q=this.gradientsColl||(this.gradientsColl=Ext.create("Ext.util.MixedCollection")),t=[],m=Ext.create("Ext.util.MixedCollection"),i,p,s,n,l,r;m.addAll(o.stops);m.sortByKey("ASC",function(a,b){a=parseInt(a,10);b=parseInt(b,10);return a>b?1:(a<b?-1:0)});i=m.keys;p=m.items;s=i.length;for(r=0;r<s;r++){n=i[r];l=p[r];t.push(n+"% "+l.color)}q.add(o.id,{colors:t.join(","),angle:o.angle})},destroy:function(){var b=this;b.callParent(arguments);if(b.el){b.el.remove()}delete b.el}});Ext.define("Docs.controller.Tabs",{extend:"Ext.app.Controller",requires:["Docs.History","Docs.Settings"],refs:[{ref:"welcomeIndex",selector:"#welcomeindex"},{ref:"classIndex",selector:"#classindex"},{ref:"guideIndex",selector:"#guideindex"},{ref:"videoIndex",selector:"#videoindex"},{ref:"exampleIndex",selector:"#exampleindex"},{ref:"statsIndex",selector:"#statsindex"},{ref:"testsIndex",selector:"#testsindex"},{ref:"commentIndex",selector:"#commentindex"},{ref:"classTree",selector:"#classtree"},{ref:"guideTree",selector:"#guidetree"},{ref:"exampleTree",selector:"#exampletree"},{ref:"videoTree",selector:"#videotree"},{ref:"doctabs",selector:"#doctabs"}],init:function(){this.getController("Classes").addListener({showClass:function(b){this.addTabFromTree("#!/api/"+b)},scope:this});this.getController("Guides").addListener({showGuide:function(b){this.addTabFromTree("#!/guide/"+b)},scope:this});this.getController("Examples").addListener({showExample:function(b){this.addTabFromTree(b)},scope:this});this.getController("Videos").addListener({showVideo:function(b){this.addTabFromTree("#!/video/"+b)},scope:this});this.control({"[componentCls=doctabs]":{tabActivate:function(d,c){Docs.History.push(d,c)},scope:this}})},onLaunch:function(){this.getDoctabs().setStaticTabs(Ext.Array.filter([this.getWelcomeIndex().getTab(),this.getClassIndex().getTab(),this.getGuideIndex().getTab(),this.getVideoIndex().getTab(),this.getExampleIndex().getTab(),this.getStatsIndex().getTab(),this.getTestsIndex().getTab()],function(a){return a}));this.commentsTab=this.getCommentIndex().getTab();var b=Docs.Settings.get("tabs");if(b){Ext.Array.forEach(b,function(a){this.addTabFromTree(a,{animate:false})},this)}Docs.History.notifyTabsLoaded()},showCommentsTab:function(){var b=this.getDoctabs().getStaticTabs();this.getDoctabs().setStaticTabs(b.concat(this.commentsTab))},hideCommentsTab:function(){var b=this.getDoctabs().getStaticTabs();this.getDoctabs().setStaticTabs(Ext.Array.remove(b,this.commentsTab))},addTabFromTree:function(h,g){var e=this.getTree(h);var f=e.findRecordByUrl(h);if(f){this.addTab(f,g)}},addTab:function(d,c){c=c||{animate:true,activate:true};this.getDoctabs().addTab({href:d.url,text:d.text,iconCls:d.iconCls},c)},getTree:function(b){if(/#!?\/api/.test(b)){return this.getClassTree()}else{if(/#!?\/guide/.test(b)){return this.getGuideTree()}else{if(/#!?\/video/.test(b)){return this.getVideoTree()}else{if(/#!?\/example/.test(b)){return this.getExampleTree()}else{return this.getClassTree()}}}}}});Ext.define("Ext.util.Cookies",{singleton:true,set:function(p,n){var j=arguments,k=arguments.length,i=(k>2)?j[2]:null,l=(k>3)?j[3]:"/",o=(k>4)?j[4]:null,m=(k>5)?j[5]:false;document.cookie=p+"="+escape(n)+((i===null)?"":("; expires="+i.toGMTString()))+((l===null)?"":("; path="+l))+((o===null)?"":("; domain="+o))+((m===true)?"; secure":"")},get:function(k){var g=k+"=",i=g.length,h=document.cookie.length,j=0,l=0;while(j<h){l=j+i;if(document.cookie.substring(j,l)==g){return this.getCookieVal(l)}j=document.cookie.indexOf(" ",j)+1;if(j===0){break}}return null},clear:function(d,c){if(this.get(d)){c=c||"/";document.cookie=d+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path="+c}},getCookieVal:function(c){var d=document.cookie.indexOf(";",c);if(d==-1){d=document.cookie.length}return unescape(document.cookie.substring(c,d))}});Ext.define("Docs.Tip",{singleton:true,show:function(g,e,f){f=f||"right";this.tips=this.tips||{};if(this.tips[f]){var h=this.tips[f];h.update(g);h.setTarget(e);h.show()}else{var h=this.tips[f]=Ext.create("Ext.tip.ToolTip",{anchor:f,target:e,html:g});h.show()}}});Ext.define("Docs.controller.Content",{extend:"Ext.app.Controller",MIDDLE:1,title:"",loadIndex:function(b){b||Docs.History.push(this.baseUrl);this.getViewport().setPageTitle(this.title);Ext.getCmp("doctabs").activateTab(this.baseUrl);Ext.getCmp("card-panel").layout.setActiveItem(this.getIndex());this.getIndex().restoreScrollState()},opensNewWindow:function(b){return b.button===this.MIDDLE||b.shiftKey||b.ctrlKey},getBaseUrl:function(){return document.location.href.replace(/\/?(index.html|template.html)?#.*/,"")}});Ext.define("Docs.ClassRegistry",{singleton:true,canonicalName:function(b){if(!this.altNames){this.altNames={};Ext.each(Docs.data.search,function(a){if(a.type==="class"&&!/:/.test(a.cls)){this.altNames[a.cls]=a.id}},this)}return this.altNames[b]||b},search:function(i){var u=new Array(5*3*3);for(var t=0;t<u.length;t++){u[t]=[]}var q=/[.:]/.test(i);var o=Ext.escapeRe(i);var x=new RegExp("^"+o+"$","i");var s=new RegExp("^"+o,"i");var p=new RegExp(o,"i");var v=Docs.data.search;for(var t=0,r=v.length;t<r;t++){var z=v[t];var y=q?z.fullName:z.name;var w=z["private"]?4:(z.removed?8:0);if(x.test(y)){u[z.sort+w].push(this.highlightMatch(z,x))}else{if(s.test(y)){u[z.sort+w+12].push(this.highlightMatch(z,s))}else{if(p.test(y)){u[z.sort+w+24].push(this.highlightMatch(z,p))}}}}return Ext.Array.flatten(u)},highlightMatch:function(c,d){c=Ext.apply({},c);c.name=c.name.replace(d,"<strong>$&</strong>");c.fullName=c.fullName.replace(d,"<strong>$&</strong>");return c}});Ext.define("Docs.controller.AuthHelpers",{request:function(c,d){d.url=this.addSid(Docs.baseUrl+"/"+Docs.commentsDb+"/"+Docs.commentsVersion+d.url);if(c==="jsonp"){Ext.data.JsonP.request(d)}else{d.cors=true;Ext.Ajax.request(d)}},addSid:function(c){var d=this.getController("Auth").sid;return c+(c.match(/\?/)?"&":"?")+"sid="+d},isLoggedIn:function(){return this.getController("Auth").isLoggedIn()}});Ext.define("Docs.view.examples.InlineToolbar",{extend:"Ext.toolbar.Toolbar",componentCls:"inline-example-tb",height:30,initComponent:function(){this.addEvents("buttonclick");this.items=[{iconCls:"code",padding:"0 2 0 0",margin:"0 3 0 0",text:"Code Editor",handler:this.createEventFirerer("code")},{padding:0,margin:"0 3 0 0",iconCls:"preview",text:"Live Preview",handler:this.createEventFirerer("preview")},"->",{padding:0,margin:0,iconCls:"copy",text:"Select Code",handler:this.createEventFirerer("copy")}];this.callParent(arguments)},createEventFirerer:function(b){return Ext.Function.bind(function(){this.fireEvent("buttonclick",b)},this)},activateButton:function(b){Ext.Array.each(this.query("button"),function(a){a.removeCls("active")});Ext.Array.each(this.query("button[iconCls="+b+"]"),function(a){a.addCls("active")})}});Ext.define("Docs.controller.Auth",{extend:"Ext.app.Controller",requires:["Ext.util.Cookies","Docs.Tip"],refs:[{ref:"auth",selector:"authentication"}],init:function(){this.sid=Ext.util.Cookies.get("sid");this.addEvents("loggedIn","loggedOut","available");if(!Docs.enableComments){return}this.control({authentication:{afterrender:function(b){b.el.addListener("click",function(d,a){b.showLoginForm()},this,{preventDefault:true,delegate:".login"});b.el.addListener("click",function(d,a){this.logout()},this,{preventDefault:true,delegate:".logout"});this.retrieveSession()}}})},retrieveSession:function(){Ext.Ajax.request({url:Docs.baseUrl+"/session",params:{sid:this.sid},method:"GET",cors:true,callback:function(d,f,e){if(e&&e.responseText){this.currentUser=JSON.parse(e.responseText);this.fireEvent("available");if(this.currentUser){this.setLoggedIn()}else{this.setLoggedOut()}}},scope:this})},login:function(g,f,h,e){Ext.Ajax.request({url:Docs.baseUrl+"/login",method:"POST",cors:true,params:{username:g,password:f},callback:function(c,a,d){var b=JSON.parse(d.responseText);if(b.success){this.currentUser=b;this.setSid(b.sessionID,{remember:h});this.setLoggedIn()}else{Docs.Tip.show(b.reason,e,"bottom")}},scope:this})},logout:function(){Ext.Ajax.request({url:Docs.baseUrl+"/logout?sid="+this.sid,method:"POST",cors:true,callback:function(){this.setLoggedOut()},scope:this})},setLoggedIn:function(){if(this.currentUser){this.getAuth().showLoggedIn(this.currentUser.userName);this.fireEvent("loggedIn")}},setLoggedOut:function(b){this.currentUser={};this.setSid(null);this.getAuth().showLoggedOut();this.fireEvent("loggedOut")},isLoggedIn:function(){return Boolean(this.sid)},setSid:function(d,f){this.sid=d;if(d){var e=null;if(f&&f.remember){e=new Date();e.setTime(e.getTime()+(60*60*24*30*1000))}Ext.util.Cookies.set("sid",d,e)}else{Ext.util.Cookies.clear("sid")}}});Ext.define("Docs.controller.Welcome",{extend:"Docs.controller.Content",baseUrl:"#",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#welcomeindex"}],init:function(){this.addEvents("loadIndex")},loadIndex:function(){this.fireEvent("loadIndex");Ext.getCmp("treecontainer").hide();this.callParent([true])},isActive:function(){return !!this.getIndex().getTab()}});Ext.define("Docs.controller.Failure",{extend:"Docs.controller.Content",baseUrl:"#",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#failure"}],show404:function(c){var d=new Ext.XTemplate("<h1>Oops...</h1>","<p>{msg}</p>","<p>Maybe it was renamed to something else? Or maybe your internet connection has failed? ","This would be sad. Hopefully it's just a bug on our side. ","Report it to <a href='http://www.sencha.com/forum/showthread.php?135036'>Sencha Forum</a> if you feel so.</p>","<p>Sorry for all this :(</p>");Ext.getCmp("failure").update(d.apply({msg:c}));Ext.getCmp("card-panel").layout.setActiveItem("failure")}});Ext.define("Docs.controller.Classes",{extend:"Docs.controller.Content",baseUrl:"#!/api",title:"API Documentation",requires:["Docs.History","Docs.Syntax","Docs.ClassRegistry"],refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#classindex"},{ref:"header",selector:"classheader"},{ref:"overview",selector:"classoverview"},{ref:"tabPanel",selector:"classtabpanel"},{ref:"tree",selector:"#classtree"},{ref:"favoritesGrid",selector:"#favorites-grid"}],cache:{},init:function(){this.addEvents("showIndex","showClass","showMember");Ext.getBody().addListener("click",function(c,d){this.handleUrlClick(decodeURI(d.href),c)},this,{preventDefault:true,delegate:".docClass"});this.control({classtree:{urlclick:function(d,c){this.handleUrlClick(d,c,this.getTree())}},toolbar:{toggleExpanded:function(b){Ext.Array.forEach(Ext.query(".side.expandable"),function(a){Ext.get(a).parent()[b?"addCls":"removeCls"]("open")})}},classoverview:{afterrender:function(b){b.el.addListener("click",function(i,k){var h=Ext.get(k).up(".member"),l=h.down(".meta .defined-in"),j=l.getAttribute("rel"),a=h.getAttribute("id");if(h.hasCls("open")){this.setExpanded(a,false)}else{this.setExpanded(a,true);this.fireEvent("showMember",j,a)}h.toggleCls("open")},this,{preventDefault:true,delegate:".expandable"});b.el.addListener("click",Ext.emptyFn,this,{preventDefault:true,delegate:".not-expandable"})}},treecontainer:{afterrender:function(b){b.el.addListener("dblclick",function(){if(b.getWidth()<30){b.setWidth(b.expandedWidth)}else{b.expandedWidth=b.getWidth();b.setWidth(20)}},this,{delegate:".x-resizable-handle"})}},doctabs:{tabClose:function(b){this.getOverview().eraseScrollContext(b)}}})},setExpanded:function(f,d){var e=this.currentCls;if(!e.expanded){e.expanded={}}if(d){e.expanded[f]=d}else{delete e.expanded[f]}},applyExpanded:function(b){Ext.Object.each(b.expanded||{},function(a){Ext.get(a).addCls("open")},this)},handleUrlClick:function(d,f,e){d=Docs.History.cleanUrl(d);if(this.opensNewWindow(f)){window.open(d);e&&e.selectUrl(this.currentCls?"#!/api/"+this.currentCls.name:"")}else{this.loadClass(d)}},loadIndex:function(b){Ext.getCmp("treecontainer").showTree("classtree");this.callParent(arguments);this.fireEvent("showIndex")},loadClass:function(f,i){Ext.getCmp("card-panel").layout.setActiveItem("classcontainer");Ext.getCmp("treecontainer").showTree("classtree");i||Docs.History.push(f);var j=f.match(/^#!\/api\/(.*?)(?:-(.*))?$/);var g=Docs.ClassRegistry.canonicalName(j[1]);var h=j[2];if(this.getOverview()){this.getOverview().setLoading(true)}if(this.cache[g]){this.showClass(this.cache[g],h)}else{this.cache[g]="in-progress";Ext.data.JsonP.request({url:this.getBaseUrl()+"/output/"+g+".js",callbackName:g.replace(/\./g,"_"),success:function(b,a){this.cache[g]=b;this.showClass(b,h)},failure:function(b,a){this.cache[g]=false;this.getOverview().setLoading(false);this.getController("Failure").show404("Class <b>"+g+"</b> was not found.")},scope:this})}},showClass:function(e,f){var d=false;if(e==="in-progress"){return}this.getOverview().setLoading(false);this.getViewport().setPageTitle(e.name);if(this.currentCls!==e){this.currentCls=e;this.getHeader().load(e);this.getOverview().load(e);this.applyExpanded(e);d=true}this.currentCls=e;this.getOverview().setScrollContext("#!/api/"+e.name);if(f){this.getOverview().scrollToEl("#"+f);this.fireEvent("showMember",e.name,f)}else{this.getOverview().restoreScrollState()}this.getTree().selectUrl("#!/api/"+e.name);this.fireEvent("showClass",e.name,{reRendered:d})}});Ext.define("Docs.controller.Comments",{extend:"Docs.controller.Content",baseUrl:"#!/comment",title:"Comments",mixins:{authMixin:"Docs.controller.AuthHelpers"},requires:["Docs.view.auth.LoginHelper","Docs.Syntax","Docs.Tip"],refs:[{ref:"viewport",selector:"#viewport"},{ref:"overview",selector:"classoverview"},{ref:"index",selector:"#commentindex"}],init:function(){this.addEvents("add","remove","changeSubscription");if(!Docs.enableComments){return}this.getController("Auth").on({available:function(){this.enableComments()},loggedIn:function(){Docs.view.Comments.renderNewCommentForms();this.isMod()&&this.getController("Tabs").showCommentsTab()},loggedOut:function(){Docs.view.Comments.renderNewCommentForms();this.getController("Tabs").hideCommentsTab()},scope:this});this.getController("Classes").on({showClass:function(d,c){if(c.reRendered){this.renderClassCommentContainers(d)}},scope:this});this.getController("Guides").on({showGuide:function(d,c){if(c.reRendered){this.renderGuideCommentContainers(d)}},scope:this});this.getController("Videos").on({showVideo:function(c,d){if(d.reRendered){this.renderVideoCommentContainers(c)}},scope:this});this.control({viewport:{afterrender:function(b){Ext.Array.each([[".toggleComments","click",this.toggleComments],[".toggleMemberComments","click",this.showMemberComments],[".toggleNewComment","click",this.toggleNewComment],[".toggleCommentGuide","click",this.toggleCommentGuide],[".postComment","click",this.postComment],[".updateComment","click",this.updateComment],[".cancelUpdateComment","click",this.cancelUpdateComment],[".deleteComment","click",this.deleteComment],[".undoDeleteComment","click",this.undoDeleteComment],[".editComment","click",this.editComment],[".readComment","click",this.readComment],[".fetchMoreComments","click",this.fetchMoreComments],[".voteCommentUp","click",this.voteUp],[".voteCommentDown","click",this.voteDown],["#hideRead","change",function(){this.fetchRecentComments()}]],function(a){b.el.addListener(a[1],a[2],this,{preventDefault:true,delegate:a[0]})},this);b.el.addListener("click",this.updateSubscription,this,{delegate:".subscriptionCheckbox"})}},"classoverview toolbar":{commentcountclick:function(c){var d=Ext.get(Ext.query(".comments-section .comments-div")[0]);this.getOverview().scrollToEl(".comments-section",-20);this.openComments(d)}}})},isMod:function(){return this.getController("Auth").currentUser.mod},enableComments:function(){if(!this.commentsEnabled){this.commentsEnabled=true}},loadIndex:function(){this.fireEvent("loadIndex");Ext.getCmp("treecontainer").hide();if(!this.recentComments){this.fetchRecentComments();this.recentComments=true}this.callParent([true])},fetchComments:function(i,j,k){var l=Ext.JSON.encode(this.commentId(i)),g=Ext.JSON.encode(this.commentId(i).concat([{}])),h=this.getController("Auth").currentUser;this.request("jsonp",{url:"/comments",method:"GET",params:{reduce:false,startkey:l,endkey:g,user:h&&h.userName},success:function(a){j.call(this,a,i,k)},scope:this})},postComment:function(t,A){if(!this.isLoggedIn()){return false}var q=Ext.get(A),v=q.up(".comments-div"),B=v.getAttribute("id"),u=this.commentId(B),D=Ext.JSON.encode(u),r=v.down("textarea").dom,w=r.editor.getValue(),y=v.down(".commentAction").getValue(),p=v.select("[name=feedback]");var x=null;if(p){p.each(function(a){if(a.dom.checked){x=a.dom.value}})}if(w.replace(/( |\n|\t)+/g,"")==""){return false}if(this.lastCommentPost&&((Math.ceil(Number(new Date())/1000))-this.lastCommentPost)<10){Ext.Msg.alert("Please wait","Please wait 10 seconds between posting comments.");return false}if(q.hasCls("disabled")){return false}q.addCls("disabled");var C=u[1],s=u[1],z="#!/api/";if(u[0]=="video"){s="Video "+s;z="#!/video/"}else{if(u[0]=="guide"){s="Guide "+s;z="#!/guide/"}else{if(u[2]!=""){C+="-"+u[2];s+=" "+u[2]}}}this.request("ajax",{url:"/comments",method:"POST",params:{target:D,comment:w,rating:x,action:y,title:s,url:"http://"+window.location.host+window.location.pathname+z+C},callback:function(c,a,d){if(d&&d.responseText){var b=Ext.JSON.decode(d.responseText);this.fireEvent("add",B);r.editor.setValue("");q.removeCls("disabled");this.toggleNewComment(null,A);this.lastCommentPost=Math.ceil(Number(new Date())/1000);if(b.success&&b.id){this.fetchComments(B,this.appendNewComment,{id:b.id})}else{Ext.Msg.alert("Error",b.reason||"There was an error submitting your request")}}},scope:this})},fetchRecentComments:function(c){var d={offset:c||0,limit:100};if(this.isHideReadChecked()){d.hideRead=1}this.request("jsonp",{url:"/comments_recent",method:"GET",params:d,success:function(a){this.renderComments(a,"recentcomments",{hideCommentForm:true,append:!!c,showCls:true})},scope:this})},isHideReadChecked:function(){var b=Ext.get("hideRead");return b&&b.dom.checked},fetchMoreComments:function(c,d){this.fetchRecentComments(Ext.get(d).getAttribute("rel"))},deleteComment:function(f,g){if(!this.isLoggedIn()){return}var h=Ext.get(g).up(".comment").getAttribute("id"),i=Ext.get(g).up(".comments-div"),j=i&&i.getAttribute("id");this.request("ajax",{url:"/comments/"+h+"/delete",method:"POST",callback:function(c,a,d){var b=Ext.JSON.decode(d.responseText);if(b.success){if(j){this.fireEvent("remove",j)}Ext.get(h).update('<div class="deleted-comment">Comment was deleted. <a href="#" class="undoDeleteComment">Undo</a>.</div>')}else{Ext.Msg.alert("Error",b.reason||"There was an error submitting your request")}},scope:this})},readComment:function(f,g){if(!this.isLoggedIn()){return}var h=Ext.get(g).up(".comment").getAttribute("id"),i=Ext.get(g).up(".comments-div"),j=i&&i.getAttribute("id");this.request("ajax",{url:"/comments/"+h+"/read",method:"POST",callback:function(c,a,d){var b=Ext.JSON.decode(d.responseText);if(b.success){Ext.get(g).addCls("read")}else{Ext.Msg.alert("Error",b.reason||"There was an error submitting your request")}},scope:this})},undoDeleteComment:function(g,h){if(!this.isLoggedIn()){return}var i=Ext.get(h).up(".comment");var j=i.getAttribute("id");var k=i.up(".comments-div");var l=k&&k.getAttribute("id");this.request("ajax",{url:"/comments/"+j+"/undo_delete",method:"POST",callback:function(c,a,d){var b=Ext.JSON.decode(d.responseText);if(b.success){if(l){this.fireEvent("add",l)}b.comment.id=b.comment._id;var e=Docs.view.Comments.commentTpl.insertBefore(i,b.comment);Docs.Syntax.highlight(e);i.remove()}else{Ext.Msg.alert("Error",b.reason||"There was an error submitting your request")}},scope:this})},editComment:function(j,k){var i=Ext.get(k).up(".comment"),g=i.getAttribute("id"),l=i.down(".content"),h=this.getController("Auth").currentUser;this.request("ajax",{url:"/comments/"+g,method:"GET",callback:function(e,a,f){var b=Ext.JSON.decode(f.responseText);if(b.success){l.dom.origContent=l.dom.innerHTML;var c=Ext.merge(Ext.clone(h),{content:b.content,updateComment:true});var d=Docs.view.Comments.editCommentTpl.overwrite(l,c,true);var n=d.down("textarea").dom;Docs.view.Comments.makeCodeMirror(n,d)}},scope:this})},updateComment:function(k,g){if(!this.isLoggedIn()){return false}var h=Ext.get(g),i=h.up(".comment"),j=i.getAttribute("id");var l=i.down("textarea").dom.editor.getValue();if(h.hasCls("disabled")){return false}h.addCls("disabled");this.request("ajax",{url:"/comments/"+j,method:"POST",params:{content:l},callback:function(d,a,e){var b=Ext.JSON.decode(e.responseText);if(b.success){var c=i.down(".content");c.update(b.content);Docs.Syntax.highlight(c)}},scope:this})},cancelUpdateComment:function(j,g){var i=Ext.get(g),h=i.up(".comment"),f=h.down(".content");if(f&&f.dom.origContent){f.update(f.dom.origContent)}},voteUp:function(c,d){this.vote("up",d)},voteDown:function(c,d){this.vote("down",d)},updateSubscription:function(k,l){var i=Ext.get(l).up(".comments-div"),h=Ext.get(l).up("label"),g=i.getAttribute("id"),j=l.checked;this.request("ajax",{url:"/subscribe",method:"POST",params:{target:Ext.JSON.encode(this.commentId(g)),subscribed:j},success:function(){if(j){Docs.Tip.show("Updates to this thread will be e-mailed to you.",h,"bottom")}else{Docs.Tip.show("You have unsubscribed from this thread.",h,"bottom")}},failure:function(){Docs.Tip.show("Subscription change failed.",h,"bottom");l.checked=!l.checked},scope:this})},vote:function(i,f){if(!this.isLoggedIn()){Docs.Tip.show("Please login to vote on this comment",f);return false}else{if(Ext.get(f).hasCls("selected")){Docs.Tip.show("You have already voted on this comment",f);return false}}var h=Ext.get(f).up(".comment").getAttribute("id"),j=Ext.get(f).up(".com-meta"),g=j.down(".score");this.request("ajax",{url:"/comments/"+h,method:"POST",params:{vote:i},callback:function(c,a,d){var b=Ext.JSON.decode(d.responseText);if(b.success){Ext.Array.each(j.query(".vote a"),function(e){Ext.get(e).removeCls("selected")});if(b.direction==="up"||b.direction==="down"){Ext.get(j.query(".vote a.voteComment"+(b.direction=="up"?"Up":"Down"))[0]).addCls("selected")}g.update(String(b.total))}else{Docs.Tip.show(b.reason,f);return false}},scope:this})},toggleComments:function(f,d){var e=Ext.get(d).up(".comments-div");if(e.hasCls("open")){this.closeComments(e)}else{this.openComments(e)}},openComments:function(e){if(e.hasCls("open")){return}var f=e.down(".name"),h=e.down(".comment-list");e.addCls("open");f.setStyle("display","none");if(h){h.setStyle("display","block")}else{var g=e.getAttribute("id");Docs.view.Comments.loadingTpl.append(e);this.fetchComments(g,this.renderComments)}},closeComments:function(d){if(!d.hasCls("open")){return}var e=d.down(".name"),f=d.down(".comment-list");d.removeCls("open");e.setStyle("display","block");if(f){f.setStyle("display","none")}},showMemberComments:function(g,e){var h=Ext.get(e).up(".member");if(h){var f=h.down(".comments-div");h.addCls("open");this.openComments(f);this.getOverview().scrollToEl(f,-20)}},renderClassCommentContainers:function(){var b=this.getController("Classes").currentCls;Docs.view.Comments.renderClassCommentContainers(b)},renderGuideCommentContainers:function(b){Docs.view.Comments.classCommentsTpl.append(Ext.get("guide").down(".x-panel-body"),{num:0,id:"guide-"+b})},renderVideoCommentContainers:function(b){Docs.view.Comments.classCommentsTpl.append(Ext.get("video").down(".x-panel-body"),{num:0,id:"video-"+b})},renderComments:function(m,t,x){x=x||{};var q=Ext.get(t),n=q.down(".loading");var r=Ext.Array.map(m,function(a){a.id=a._id;a.key=a.target;if(x.showCls){a.showCls=true}return a});if(n){n.remove()}if(x.append){var v=document.createElement("div");Docs.view.Comments.appendCommentsTpl.append(v,r);q.down(".comment-list").appendChild(v);Docs.Syntax.highlight(v);this.updateCommentsPager(q,r)}else{var p=q.down(".comment-list");if(p){Docs.view.Comments.appendCommentsTpl.overwrite(p,r);this.updateCommentsPager(q,r)}else{Docs.view.Comments.commentsTpl.append(q,r)}Docs.Syntax.highlight(q)}if(x.hideCommentForm){q.addCls("hideCommentForm")}else{if(!q.hasCls("hideCommentForm")){var w=q.down(".new-comment-wrap");if(this.isLoggedIn()){var s=Ext.apply(this.getController("Auth").currentUser,{userSubscribed:Docs.commentSubscriptions[t]});var u=Docs.view.Comments.loggedInCommentTpl.overwrite(w,s,true);if(u){var o=u.down("textarea");if(o){Docs.view.Comments.makeCodeMirror(o.dom,u)}}}else{Docs.view.auth.LoginHelper.renderToComments(w)}}}},updateCommentsPager:function(f,d){var e=d[d.length-1]||{};f.down(".recent-comments-pager").update(Docs.view.Comments.getPagerHtml(e))},toggleNewComment:function(f,d){if(!this.isLoggedIn()){return}var e=Ext.get(d).up(".new-comment");if(e.hasCls("open")){e.removeCls("open")}else{e.addCls("open")}},appendNewComment:function(i,h,f){var g=Ext.get(h).down(".new-comment-wrap"),j;if(f.id){Ext.Array.each(i,function(a){if(a._id==f.id){j=a;j.id=f.id}})}else{j=i[i.length-1];j.id=i[i.length-1]._id}Docs.view.Comments.commentTpl.insertBefore(g,j);Docs.Syntax.highlight(g.up(".comment-list"))},commentId:function(b){return Docs.commentMeta.idMap[b]||["unknown"]},toggleCommentGuide:function(h,j){var g=Ext.get(j).up("form"),e=g.down(".commentGuideTxt"),i=e.getStyle("display");e.setStyle("display",(i=="none")?"block":"none")},closeCodeEditor:function(b){b.removeCls("selected");if(b.editor){b.editor.toTextArea()}}});Ext.define("Docs.controller.CommentsMeta",{extend:"Ext.app.Controller",mixins:{authMixin:"Docs.controller.AuthHelpers"},refs:[{ref:"toolbar",selector:"classoverview toolbar"},{ref:"authentication",selector:"authentication"},{ref:"overview",selector:"classoverview"}],init:function(){Docs.commentMeta={idMap:{},"class":{},guide:{},video:{}};Docs.commentSubscriptions={};this.addEvents("afterLoad");if(!Docs.enableComments){return}this.getController("Auth").on({available:function(){this.fetchCommentMeta()},loggedIn:function(){this.fetchSubscriptionMeta()},scope:this});this.getController("Comments").on({add:function(b){this.updateCommentMeta(b,1)},remove:function(b){this.updateCommentMeta(b,-1)},scope:this});this.getController("Classes").on({showIndex:function(){this.updateClassIndex()},showClass:function(d,c){if(c.reRendered){this.createCommentIdMap(this.getController("Classes").currentCls);this.renderClassCommentMeta(d)}},scope:this});this.getController("Guides").on({showGuide:function(d,c){Docs.commentMeta.idMap["comments-guide-"+d]=["guide",d,""];this.renderGuideCommentMeta(d)},scope:this});this.getController("Videos").on({showVideo:function(c,d){Docs.commentMeta.idMap["comments-video-"+c]=["video",c,""];this.renderVideoCommentMeta(c)},scope:this});this.control({hovermenu:{refresh:this.refreshHoverMenu}})},fetchCommentMeta:function(){this.request("jsonp",{url:"/comments_meta",method:"GET",success:function(b){Ext.Array.each(b.comments,function(a){this.updateMeta(a._id.split("__"),a.value)},this);Ext.Array.each(b.subscriptions,function(d){var a="comments-"+d.join("-").replace(/\./g,"-").replace(/-$/,"");Docs.commentSubscriptions[a]=true},this);this.metaLoaded=true;this.fireEvent("afterLoad");this.updateClassIndex()},scope:this})},fetchSubscriptionMeta:function(){this.request("jsonp",{url:"/subscriptions",method:"GET",success:function(b){Ext.Array.each(b.subscriptions,function(d){var a="comments-"+d.join("-").replace(/\./g,"-").replace(/-$/,"");Docs.commentSubscriptions[a]=true},this)},scope:this})},updateCommentMeta:function(f,d){var e=Docs.commentMeta.idMap[f];this.updateMeta(e,d);if(e[0]=="guide"){Docs.view.Comments.updateGuideCommentMeta(e[1])}else{if(e[0]=="video"){Docs.view.Comments.updateVideoCommentMeta(e[1])}else{Docs.view.Comments.updateClassCommentMeta(e[1])}}},updateMeta:function(d,c){Docs.commentMeta[d[0]]=Docs.commentMeta[d[0]]||{};Docs.commentMeta[d[0]][d[1]]=Docs.commentMeta[d[0]][d[1]]||{total:0};Docs.commentMeta[d[0]][d[1]][d[2]]=Docs.commentMeta[d[0]][d[1]][d[2]]||0;Docs.commentMeta[d[0]][d[1]][d[2]]+=c;Docs.commentMeta[d[0]][d[1]]["total"]+=c},createCommentIdMap:function(b){Docs.commentMeta.idMap[("comments-class-"+b.name).replace(/\./g,"-")]=["class",b.name,""];b.members&&this.createMembersCommentIdMap(b,b.members);b.statics&&this.createMembersCommentIdMap(b,b.statics)},createMembersCommentIdMap:function(e,d){for(var f in d){Ext.Array.each(d[f],function(h){var a=["class",e.name,h.id];var b=["class",h.owner,h.id];var c="comments-"+a.join("-").replace(/\./g,"-");Docs.commentMeta.idMap[c]=b},this)}},refreshHoverMenu:function(b){this.afterMetaLoaded(function(){Docs.view.Comments.renderHoverMenuMeta(b.el)},this)},updateClassIndex:function(){if(this.getController("Comments").commentsEnabled){this.afterMetaLoaded(function(){Docs.view.Comments.updateClassIndex()},this)}},renderClassCommentMeta:function(b){this.afterMetaLoaded(function(){Docs.view.Comments.updateClassCommentMeta(b)},this)},renderGuideCommentMeta:function(b){this.afterMetaLoaded(function(){Docs.view.Comments.updateGuideCommentMeta(b)},this)},renderVideoCommentMeta:function(b){this.afterMetaLoaded(function(){Docs.view.Comments.updateVideoCommentMeta(b)},this)},afterMetaLoaded:function(c,d){if(this.metaLoaded){c.call(d)}else{this.addListener("afterLoad",c,d,{single:true})}}});Ext.define("Docs.controller.Examples",{extend:"Docs.controller.Content",baseUrl:"#!/example",title:"Examples",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#exampleindex"},{ref:"tree",selector:"#exampletree"},{ref:"page",selector:"#example"}],init:function(){this.addEvents("showExample");this.control({"#exampletree":{urlclick:function(d,c){this.loadExample(d)}},"exampleindex > thumblist":{urlclick:function(b){this.loadExample(b)}},touchexamplecontainer:{afterrender:function(b){b.el.addListener("click",function(d,a){this.changeDevice("tablet")},this,{delegate:"button.tablet"});b.el.addListener("click",function(d,a){this.changeDevice("phone")},this,{delegate:"button.phone"});b.el.addListener("click",function(d,a){this.changeOrientation("portrait")},this,{delegate:"button.portrait"});b.el.addListener("click",function(d,a){this.changeOrientation("landscape")},this,{delegate:"button.landscape"});b.el.addListener("click",function(d,a){this.openInNewWindow()},this,{delegate:"button.new-window"})}}})},loadIndex:function(){Ext.getCmp("treecontainer").showTree("exampletree");this.callParent()},loadExample:function(d,f){var e=this.getExample(d);if(!e){this.getController("Failure").show404("Example <b>"+d+"</b> was not found.");return}this.getViewport().setPageTitle(e.text);if(this.activeUrl!==d){this.getPage().clear();this.activateExampleCard();this.getPage().load(e)}else{this.activateExampleCard()}f||Docs.History.push(d);this.fireEvent("showExample",d);this.getTree().selectUrl(d);this.activeUrl=d},activateExampleCard:function(){Ext.getCmp("card-panel").layout.setActiveItem("example");Ext.getCmp("treecontainer").showTree("exampletree")},getExample:function(b){if(!this.map){this.map={};Ext.Array.forEach(Docs.data.examples,function(a){Ext.Array.forEach(a.items,function(d){this.map["#!/example/"+d.name]=d},this)},this)}return this.map[b]},changeOrientation:function(b){this.getPage().setOrientation(b)},changeDevice:function(b){this.getPage().setDevice(b)},openInNewWindow:function(){window.open(this.getExample(this.activeUrl).url)}});Ext.define("Docs.controller.Guides",{extend:"Docs.controller.Content",baseUrl:"#!/guide",title:"Guides",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#guideindex"},{ref:"tree",selector:"#guidetree"},{ref:"guide",selector:"#guide"}],cache:{},init:function(){this.addEvents("showGuide");this.control({"#guidetree":{urlclick:function(d,c){this.handleUrlClick(d,c,this.getTree())}},"guideindex > thumblist":{urlclick:function(b){this.loadGuide(b)}},indexcontainer:{afterrender:function(b){b.el.addListener("click",function(d,a){this.handleUrlClick(a.href,d)},this,{preventDefault:true,delegate:".guide"})}},doctabs:{tabClose:function(b){this.getGuide().eraseScrollContext(b)}}})},handleUrlClick:function(d,f,e){d=d.replace(/.*#!?/,"#!");if(this.opensNewWindow(f)){window.open(d);e&&e.selectUrl(this.activeUrl?this.activeUrl:"")}else{this.loadGuide(d)}},loadIndex:function(){Ext.getCmp("treecontainer").showTree("guidetree");this.callParent()},loadGuide:function(j,h){Ext.getCmp("card-panel").layout.setActiveItem("guide");Ext.getCmp("treecontainer").showTree("guidetree");var g=j.match(/^#!\/guide\/(.*?)(-section-[0-9]+)?$/);var f=g[1];var i=g[2];j="#!/guide/"+f;h||Docs.History.push(j);if(this.cache[f]){this.showGuide(this.cache[f],j,f,i)}else{this.cache[f]="in-progress";Ext.data.JsonP.request({url:this.getBaseUrl()+"/guides/"+f+"/README.js",callbackName:f,success:function(a){this.cache[f]=a;this.showGuide(a,j,f,i)},failure:function(b,a){this.cache[f]=false;this.getController("Failure").show404("Guide <b>"+f+"</b> was not found.")},scope:this})}},showGuide:function(i,j,f,h){var g=false;if(i==="in-progress"){return}this.getViewport().setPageTitle(i.title);if(this.activeUrl!==j){Ext.getCmp("guide").load({name:f,content:i.guide});g=true}this.activeUrl=j;this.getGuide().setScrollContext(this.activeUrl);if(h){this.getGuide().scrollToEl(f+h)}else{this.getGuide().restoreScrollState()}this.fireEvent("showGuide",f,{reRendered:g});this.getTree().selectUrl(j)}});Ext.define("Docs.controller.Videos",{extend:"Docs.controller.Content",baseUrl:"#!/video",title:"Videos",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#videoindex"},{ref:"tree",selector:"#videotree"}],init:function(){this.addEvents("showVideo");this.control({"#videotree":{urlclick:function(b){this.loadVideo(b)}},"videoindex > thumblist":{urlclick:function(b){this.loadVideo(b)}}})},loadIndex:function(){Ext.getCmp("treecontainer").showTree("videotree");this.callParent()},loadVideo:function(j,h){var f=false;Ext.getCmp("card-panel").layout.setActiveItem("video");Ext.getCmp("treecontainer").showTree("videotree");var g=j.match(/^#!\/video\/(.*)$/)[1];var i=this.getVideo(g);if(!i){this.getController("Failure").show404("Video <b>"+g+"</b> was not found.");return}this.getViewport().setPageTitle(i.title);if(this.activeUrl!==j){Ext.getCmp("video").load(i);f=true}h||Docs.History.push(j);this.fireEvent("showVideo",g,{reRendered:f});this.getTree().selectUrl(j);this.activeUrl=j},getVideo:function(b){if(!this.map){this.map={};Ext.Array.forEach(Docs.data.videos,function(a){Ext.Array.forEach(a.items,function(d){this.map[d.name]=d},this)},this)}return this.map[b]}});Ext.define("Docs.controller.Stats",{extend:"Docs.controller.Content",baseUrl:"#!/stats",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#statsindex"}],init:function(){this.addEvents("loadIndex")},loadIndex:function(){this.fireEvent("loadIndex");Ext.getCmp("treecontainer").hide();this.callParent([true])},isActive:function(){return !!this.getIndex().getTab()}});Ext.define("Docs.controller.Tests",{extend:"Docs.controller.Content",baseUrl:"#!/tests",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#testsindex"}],init:function(){this.addEvents("loadIndex");this.control({"#testsgrid":{afterrender:this.loadExamples}})},loadIndex:function(){this.fireEvent("loadIndex");Ext.getCmp("treecontainer").hide();this.callParent([true])},isActive:function(){return !!this.getIndex().getTab()},loadExamples:function(){this.getIndex().disable();Ext.data.JsonP.request({url:this.getBaseUrl()+"/inline-examples.js",callbackName:"__inline_examples__",success:function(b){this.getIndex().addExamples(b);this.getIndex().enable()},scope:this})}});Ext.define("Docs.view.examples.InlineWrap",{alias:"widget.inlineexample",requires:["Docs.view.examples.Inline","Docs.view.examples.InlineToolbar"],constructor:function(c){this.pre=c;var d=this.parseOptions(c.className);this.initToolbar();if(d.preview){this.replacePre(d)}else{this.tb.on("buttonclick",function(a){d.preview=(a==="preview");this.replacePre(d)},this,{single:true})}},parseOptions:function(c){var d={};Ext.Array.forEach(c.split(/ +/),function(a){if(a==="phone"||a==="miniphone"||a==="tablet"){d.device=a}else{if(a==="ladscape"||a==="portrait"){d.orientation=a}else{d[a]=true}}});return d},initToolbar:function(){var b=document.createElement("div");this.pre.parentNode.insertBefore(b,this.pre);this.tb=Ext.create("Docs.view.examples.InlineToolbar",{renderTo:b})},replacePre:function(d){var c=document.createElement("div");this.pre.parentNode.replaceChild(c,this.pre);Ext.create("Docs.view.examples.Inline",{height:200,renderTo:c,value:Ext.String.htmlDecode(Ext.util.Format.stripTags(this.pre.innerHTML)),options:d,toolbar:this.tb})}});Ext.define("Docs.controller.InlineExamples",{extend:"Ext.app.Controller",requires:["Docs.view.examples.InlineWrap"],init:function(){this.control({classoverview:{resize:this.createResizer(".class-overview"),afterload:this.replaceExampleDivs},guidecontainer:{resize:this.createResizer(".guide-container"),afterload:this.replaceExampleDivs}})},createResizer:function(b){return function(){Ext.Array.each(Ext.ComponentQuery.query(b+" .inlineexample"),function(a){if(a.editor&&a.isVisible()){a.doLayout()}})}},replaceExampleDivs:function(){Ext.Array.each(Ext.query(".inline-example"),function(b){Ext.create("Docs.view.examples.InlineWrap",b)},this)}});Ext.define("Docs.store.Search",{extend:"Ext.data.Store",fields:["name","fullName","icon","url","meta","sort"],proxy:{type:"memory",reader:{type:"json"}}});Ext.define("Docs.controller.Search",{extend:"Ext.app.Controller",requires:["Docs.ClassRegistry","Docs.History"],stores:["Search"],refs:[{ref:"field",selector:"#search-field"}],pageIndex:0,pageSize:10,init:function(){this.control({"#search-dropdown":{itemclick:function(c,d){this.loadRecord(d)},changePage:function(c,d){this.pageIndex+=d;this.search(this.getField().getValue());this.keepDropdown()},footerClick:function(b){this.keepDropdown()}},"#search-field":{keyup:function(m,l){var j=this.getDropdown();m.setHideTrigger(m.getValue().length===0);if(l.keyCode===Ext.EventObject.ESC||!m.value){j.hide();m.setValue("");return}else{j.show()}var h=j.getSelectionModel();var i=h.getLastSelected();var n=j.store.indexOf(i);var k=j.store.getCount()-1;if(l.keyCode===Ext.EventObject.UP){if(n===undefined){h.select(0)}else{h.select(n===0?k:(n-1))}}else{if(l.keyCode===Ext.EventObject.DOWN){if(n===undefined){h.select(0)}else{h.select(n===k?0:n+1)}}else{if(l.keyCode===Ext.EventObject.ENTER){l.preventDefault();i&&this.loadRecord(i)}else{this.pageIndex=0;clearTimeout(this.searchTimeout);this.searchTimeout=Ext.Function.defer(function(){this.search(m.value)},50,this)}}}},focus:function(b){if(b.value&&this.getDropdown().store.getCount()>0){this.getDropdown().show()}},blur:function(){var b=this.getDropdown();this.hideTimeout=Ext.Function.defer(b.hide,500,b)}}})},getDropdown:function(){return this.dropdown||(this.dropdown=Ext.getCmp("search-dropdown"))},keepDropdown:function(){clearTimeout(this.hideTimeout);this.getField().focus()},loadRecord:function(b){Docs.History.navigate(b.get("url"));this.getDropdown().hide()},search:function(h){var e=Docs.ClassRegistry.search(h);if(this.pageIndex<0){this.pageIndex=0}else{if(this.pageIndex>Math.floor(e.length/this.pageSize)){this.pageIndex=Math.floor(e.length/this.pageSize)}}var g=this.pageIndex*this.pageSize;var f=g+this.pageSize;this.getDropdown().setTotal(e.length);this.getDropdown().setStart(g);this.getDropdown().getStore().loadData(e.slice(g,f));this.getDropdown().alignTo("search-field","bl",[-12,-2]);if(e.length===0){this.getDropdown().hide()}else{this.getDropdown().getSelectionModel().select(0)}}});Ext.ns("Docs");Ext.Loader.setConfig({enabled:true,paths:{Docs:"app"}});Ext.require("Docs.view.Viewport");Ext.require("Ext.form.field.Trigger");Ext.require("Ext.tab.Panel");Ext.require("Ext.grid.column.Action");Ext.require("Ext.grid.plugin.DragDrop");Ext.require("Ext.layout.container.Border");Ext.require("Ext.data.TreeStore");Ext.require("Ext.toolbar.Spacer");Ext.require("Docs.Application");Ext.onReady(function(){Ext.create("Docs.Application")});
+var CodeMirror=(function(){function u(aM,aJ){var b1={},bj=u.defaults;for(var az in bj){if(bj.hasOwnProperty(az)){b1[az]=(aJ&&aJ.hasOwnProperty(az)?aJ:bj)[az]}}var aD=document.createElement("div");aD.className="CodeMirror"+(b1.lineWrapping?" CodeMirror-wrap":"");aD.innerHTML='<div style="overflow: hidden; position: relative; width: 3px; height: 0px;"><textarea style="position: absolute; padding: 0; width: 1px; height: 1em" wrap="off" autocorrect="off" autocapitalize="off"></textarea></div><div class="CodeMirror-scroll" tabindex="-1"><div style="position: relative"><div style="position: relative"><div class="CodeMirror-gutter"><div class="CodeMirror-gutter-text"></div></div><div class="CodeMirror-lines"><div style="position: relative; z-index: 0"><div style="position: absolute; width: 100%; height: 0; overflow: hidden; visibility: hidden;"></div><pre class="CodeMirror-cursor"> </pre><div style="position: relative; z-index: -1"></div><div></div></div></div></div></div></div>';if(aM.appendChild){aM.appendChild(aD)}else{aM(aD)}var bX=aD.firstChild,bm=bX.firstChild,bk=aD.lastChild,bM=bk.firstChild,cg=bM.firstChild,aH=cg.firstChild,aY=aH.firstChild,bu=aH.nextSibling.firstChild,av=bu.firstChild,bc=av.nextSibling,bg=bc.nextSibling,aq=bg.nextSibling;cD();if(s){bm.style.width="0px"}if(!f){bu.draggable=true}bu.style.outline="none";if(b1.tabindex!=null){bm.tabIndex=b1.tabindex}if(b1.autofocus){bz()}if(!b1.gutter&&!b1.lineNumbers){aH.style.display="none"}if(m){bX.style.height="1px",bX.style.position="absolute"}try{ct("x")}catch(b8){if(b8.message.match(/runtime/i)){b8=new Error("A CodeMirror inside a P-style element does not work in Internet Explorer. (innerHTML bug)")}throw b8}var b7=new z(),aw=new z(),cP;var cb,cy=new i([new ah([new e("")])]),ch,cj;bT();var cW={from:{line:0,ch:0},to:{line:0,ch:0},inverted:false};var ci,bq,aZ,bF=0,bb,cn=false,cs=false;var cp,b6,aB,cN,aP,bf,aS,cA;var bd=0,cQ=0,bL=0,bN=0;var b4;var bD="",aF;var ap={};ar(function(){aW(b1.value||"");cp=false})();var a8=new k();r(bk,"mousedown",ar(ck));r(bk,"dblclick",ar(bW));r(bu,"selectstart",T);if(!N){r(bk,"contextmenu",a1)}r(bk,"scroll",function(){bF=bk.scrollTop;cd([]);if(b1.fixedGutter){aH.style.left=bk.scrollLeft+"px"}if(b1.onScroll){b1.onScroll(b9)}});r(window,"resize",function(){cd(true)});r(bm,"keyup",ar(cl));r(bm,"input",aQ);r(bm,"keydown",ar(cc));r(bm,"keypress",ar(bn));r(bm,"focus",cU);r(bm,"blur",aE);if(b1.dragDrop){r(bu,"dragstart",aI);function bC(cZ){if(b1.onDragEvent&&b1.onDragEvent(b9,O(cZ))){return}w(cZ)}r(bk,"dragenter",bC);r(bk,"dragover",bC);r(bk,"drop",ar(an))}r(bk,"paste",function(){bz();aQ()});r(bm,"paste",aQ);r(bm,"cut",ar(function(){if(!b1.readOnly){bs("")}}));if(m){r(bM,"mouseup",function(){if(document.activeElement==bm){bm.blur()}bz()})}var cw;try{cw=(document.activeElement==bm)}catch(b8){}if(cw||b1.autofocus){setTimeout(cU,20)}else{aE()}function br(cZ){return cZ>=0&&cZ<cy.size}var b9=aD.CodeMirror={getValue:b2,setValue:ar(aW),getSelection:b3,replaceSelection:ar(bs),focus:function(){window.focus();bz();cU();aQ()},setOption:function(c0,c1){var cZ=b1[c0];b1[c0]=c1;if(c0=="mode"||c0=="indentUnit"){bT()}else{if(c0=="readOnly"&&c1=="nocursor"){aE();bm.blur()}else{if(c0=="readOnly"&&!c1){cC(true)}else{if(c0=="theme"){cD()}else{if(c0=="lineWrapping"&&cZ!=c1){ar(cG)()}else{if(c0=="tabSize"){cd(true)}}}}}}if(c0=="lineNumbers"||c0=="gutter"||c0=="firstLineNumber"||c0=="theme"){be();cd(true)}},getOption:function(cZ){return b1[cZ]},undo:ar(cT),redo:ar(cJ),indentLine:ar(function(c0,cZ){if(typeof cZ!="string"){if(cZ==null){cZ=b1.smartIndent?"smart":"prev"}else{cZ=cZ?"add":"subtract"}}if(br(c0)){by(c0,cZ)}}),indentSelection:ar(cB),historySize:function(){return{undo:a8.done.length,redo:a8.undone.length}},clearHistory:function(){a8=new k()},matchBrackets:ar(function(){ce(true)}),getTokenAt:ar(function(cZ){cZ=aT(cZ);return cF(cZ.line).getTokenAt(cb,cu(cZ.line),cZ.ch)}),getStateAfter:function(cZ){cZ=bZ(cZ==null?cy.size-1:cZ);return cu(cZ+1)},cursorCoords:function(c0,cZ){if(c0==null){c0=cW.inverted}return this.charCoords(c0?cW.from:cW.to,cZ)},charCoords:function(c0,cZ){c0=aT(c0);if(cZ=="local"){return cR(c0,false)}if(cZ=="div"){return cR(c0,true)}return ao(c0)},coordsChar:function(cZ){var c0=ak(bu);return bH(cZ.x-c0.left,cZ.y-c0.top)},markText:ar(bE),setBookmark:aU,findMarksAt:bo,setMarker:ar(bV),clearMarker:ar(au),setLineClass:ar(bl),hideLine:ar(function(cZ){return cK(cZ,true)}),showLine:ar(function(cZ){return cK(cZ,false)}),onDeleteLine:function(cZ,c0){if(typeof cZ=="number"){if(!br(cZ)){return null}cZ=cF(cZ)}(cZ.handlers||(cZ.handlers=[])).push(c0);return cZ},lineInfo:aV,addWidget:function(c3,c1,c5,c2,c7){c3=cR(aT(c3));var c4=c3.yBot,c0=c3.x;c1.style.position="absolute";bM.appendChild(c1);if(c2=="over"){c4=c3.y}else{if(c2=="near"){var cZ=Math.max(bk.offsetHeight,cy.height*bP()),c6=Math.max(bM.clientWidth,bu.clientWidth)-a5();if(c3.yBot+c1.offsetHeight>cZ&&c3.y>c1.offsetHeight){c4=c3.y-c1.offsetHeight}if(c0+c1.offsetWidth>c6){c0=c6-c1.offsetWidth}}}c1.style.top=(c4+cr())+"px";c1.style.left=c1.style.right="";if(c7=="right"){c0=bM.clientWidth-c1.offsetWidth;c1.style.right="0px"}else{if(c7=="left"){c0=0}else{if(c7=="middle"){c0=(bM.clientWidth-c1.offsetWidth)/2}}c1.style.left=(c0+a5())+"px"}if(c5){aA(c0,c4,c0+c1.offsetWidth,c4+c1.offsetHeight)}},lineCount:function(){return cy.size},clipPos:aT,getCursor:function(cZ){if(cZ==null){cZ=cW.inverted}return aa(cZ?cW.from:cW.to)},somethingSelected:function(){return !ad(cW.from,cW.to)},setCursor:ar(function(cZ,c1,c0){if(c1==null&&typeof cZ.line=="number"){a6(cZ.line,cZ.ch,c0)}else{a6(cZ,c1,c0)}}),setSelection:ar(function(c1,c0,cZ){(cZ?bx:bw)(aT(c1),aT(c0||c1))}),getLine:function(cZ){if(br(cZ)){return cF(cZ).text}},getLineHandle:function(cZ){if(br(cZ)){return cF(cZ)}},setLine:ar(function(cZ,c0){if(br(cZ)){bQ(c0,{line:cZ,ch:0},{line:cZ,ch:cF(cZ).text.length})}}),removeLine:ar(function(cZ){if(br(cZ)){bQ("",{line:cZ,ch:0},aT({line:cZ+1,ch:0}))}}),replaceRange:ar(bQ),getRange:function(c0,cZ){return cO(aT(c0),aT(cZ))},triggerOnKeyDown:ar(cc),execCommand:function(cZ){return L[cZ](b9)},moveH:ar(cE),deleteH:ar(cm),moveV:ar(cx),toggleOverwrite:function(){if(cn){cn=false;bc.className=bc.className.replace(" CodeMirror-overwrite","")}else{cn=true;bc.className+=" CodeMirror-overwrite"}},posFromIndex:function(c0){var c1=0,cZ;cy.iter(0,cy.size,function(c2){var c3=c2.text.length+1;if(c3>c0){cZ=c0;return true}c0-=c3;++c1});return aT({line:c1,ch:cZ})},indexFromPos:function(c0){if(c0.line<0||c0.ch<0){return 0}var cZ=c0.ch;cy.iter(0,c0.line,function(c1){cZ+=c1.text.length+1});return cZ},scrollTo:function(cZ,c0){if(cZ!=null){bk.scrollLeft=cZ}if(c0!=null){bk.scrollTop=c0}cd([])},operation:function(cZ){return ar(cZ)()},compoundChange:function(cZ){return bO(cZ)},refresh:function(){cd(true);if(bk.scrollHeight>bF){bk.scrollTop=bF}},getInputField:function(){return bm},getWrapperElement:function(){return aD},getScrollerElement:function(){return bk},getGutterElement:function(){return aH}};function cF(cZ){return C(cy,cZ)}function a3(c0,cZ){aS=true;var c1=cZ-c0.height;for(var c2=c0;c2;c2=c2.parent){c2.height+=c1}}function aW(cZ){var c0={line:0,ch:0};aO(c0,{line:cy.size-1,ch:cF(cy.size-1).text.length},A(cZ),c0,c0);cp=true}function b2(){var cZ=[];cy.iter(0,cy.size,function(c0){cZ.push(c0.text)});return cZ.join("\n")}function ck(c8){a4(y(c8,"shiftKey"));for(var c3=j(c8);c3!=aD;c3=c3.parentNode){if(c3.parentNode==bM&&c3!=cg){return}}for(var c3=j(c8);c3!=aD;c3=c3.parentNode){if(c3.parentNode==aY){if(b1.onGutterClick){b1.onGutterClick(b9,q(aY.childNodes,c3)+cQ,c8)}return T(c8)}}var cZ=a2(c8);switch(x(c8)){case 3:if(N&&!M){a1(c8)}return;case 2:if(cZ){a6(cZ.line,cZ.ch,true)}return}if(!cZ){if(j(c8)==bk){T(c8)}return}if(!cj){cU()}var c0=+new Date;if(aZ&&aZ.time>c0-400&&ad(aZ.pos,cZ)){T(c8);setTimeout(bz,20);return aK(cZ.line)}else{if(bq&&bq.time>c0-400&&ad(bq.pos,cZ)){aZ={time:c0,pos:cZ};T(c8);return bI(cZ)}else{bq={time:c0,pos:cZ}}}var da=cZ,c1;if(b1.dragDrop&&F&&!b1.readOnly&&!ad(cW.from,cW.to)&&!Z(cZ,cW.from)&&!Z(cW.to,cZ)){if(f){bu.draggable=true}function c4(db){if(f){bu.draggable=false}bb=false;c7();c2();if(Math.abs(c8.clientX-db.clientX)+Math.abs(c8.clientY-db.clientY)<10){T(db);a6(cZ.line,cZ.ch,true);bz()}}var c7=r(document,"mouseup",ar(c4),true);var c2=r(bk,"drop",ar(c4),true);bb=true;if(bu.dragDrop){bu.dragDrop()}return}T(c8);a6(cZ.line,cZ.ch,true);function c9(db){var dd=a2(db,true);if(dd&&!ad(dd,da)){if(!cj){cU()}da=dd;bx(cZ,dd);cp=false;var dc=bA();if(dd.line>=dc.to||dd.line<dc.from){c1=setTimeout(ar(function(){c9(db)}),150)}}}function c6(db){clearTimeout(c1);var dc=a2(db);if(dc){bx(cZ,dc)}T(db);bz();cp=true;c5();c7()}var c5=r(document,"mousemove",ar(function(db){clearTimeout(c1);T(db);if(!I&&!x(db)){c6(db)}else{c9(db)}}),true);var c7=r(document,"mouseup",ar(c6),true)}function bW(cZ){for(var c1=j(cZ);c1!=aD;c1=c1.parentNode){if(c1.parentNode==aY){return T(cZ)}}var c0=a2(cZ);if(!c0){return}aZ={time:+new Date,pos:c0};T(cZ);bI(c0)}function an(c3){if(b1.onDragEvent&&b1.onDragEvent(b9,O(c3))){return}c3.preventDefault();var c6=a2(c3,true),c0=c3.dataTransfer.files;if(!c6||b1.readOnly){return}if(c0&&c0.length&&window.FileReader&&window.File){function c2(c9,c8){var c7=new FileReader;c7.onload=function(){c4[c8]=c7.result;if(++c1==c5){c6=aT(c6);ar(function(){var da=bQ(c4.join(""),c6,c6);bx(c6,da)})()}};c7.readAsText(c9)}var c5=c0.length,c4=Array(c5),c1=0;for(var cZ=0;cZ<c5;++cZ){c2(c0[cZ],cZ)}}else{try{var c4=c3.dataTransfer.getData("Text");if(c4){bO(function(){var c8=cW.from,c7=cW.to;bx(c6,c6);if(bb){bQ("",c8,c7)}bs(c4);bz()})}}catch(c3){}}}function aI(c1){var cZ=b3();c1.dataTransfer.setData("Text",cZ);if(N||af){var c0=document.createElement("img");c0.scr="data:image/gif;base64,R0lGODdhAgACAIAAAAAAAP///ywAAAAAAgACAAACAoRRADs=";c1.dataTransfer.setDragImage(c0,0,0)}}function bi(c1,cZ){if(typeof c1=="string"){c1=L[c1];if(!c1){return false}}var c0=ci;try{if(b1.readOnly){cs=true}if(cZ){ci=null}c1(b9)}catch(c2){if(c2!=ab){throw c2}return false}finally{ci=c0;cs=false}return true}function cL(c5){var cZ=c(b1.keyMap),c2=cZ.auto;clearTimeout(bB);if(c2&&!Q(c5)){bB=setTimeout(function(){if(c(b1.keyMap)==cZ){b1.keyMap=(c2.call?c2.call(null,b9):c2)}},50)}var c0=R[y(c5,"keyCode")],c4=false;if(c0==null||c5.altGraphKey){return false}if(y(c5,"altKey")){c0="Alt-"+c0}if(y(c5,"ctrlKey")){c0="Ctrl-"+c0}if(y(c5,"metaKey")){c0="Cmd-"+c0}var c3=false;function c1(){c3=true}if(y(c5,"shiftKey")){c4=l("Shift-"+c0,b1.extraKeys,b1.keyMap,function(c6){return bi(c6,true)},c1)||l(c0,b1.extraKeys,b1.keyMap,function(c6){if(typeof c6=="string"&&/^go[A-Z]/.test(c6)){return bi(c6)}},c1)}else{c4=l(c0,b1.extraKeys,b1.keyMap,bi,c1)}if(c3){c4=false}if(c4){T(c5);if(I){c5.oldKeyCode=c5.keyCode;c5.keyCode=0}}return c4}function bY(c1,cZ){var c0=l("'"+cZ+"'",b1.extraKeys,b1.keyMap,function(c2){return bi(c2,true)});if(c0){T(c1)}return c0}var cI=null,bB;function cc(c1){if(!cj){cU()}if(I&&c1.keyCode==27){c1.returnValue=false}if(bt){if(bK()){bt=false}}if(b1.onKeyEvent&&b1.onKeyEvent(b9,O(c1))){return}var cZ=y(c1,"keyCode");a4(cZ==16||y(c1,"shiftKey"));var c0=cL(c1);if(window.opera){cI=c0?cZ:null;if(!c0&&cZ==88&&y(c1,M?"metaKey":"ctrlKey")){bs("")}}}function bn(c2){if(bt){bK()}if(b1.onKeyEvent&&b1.onKeyEvent(b9,O(c2))){return}var c1=y(c2,"keyCode"),cZ=y(c2,"charCode");if(window.opera&&c1==cI){cI=null;T(c2);return}if(((window.opera&&!c2.which)||m)&&cL(c2)){return}var c0=String.fromCharCode(cZ==null?c1:cZ);if(b1.electricChars&&cb.electricChars&&b1.smartIndent&&!b1.readOnly){if(cb.electricChars.indexOf(c0)>-1){setTimeout(ar(function(){by(cW.to.line,"smart")}),75)}}if(bY(c2,c0)){return}aQ()}function cl(cZ){if(b1.onKeyEvent&&b1.onKeyEvent(b9,O(cZ))){return}if(y(cZ,"keyCode")==16){ci=null}}function cU(){if(b1.readOnly=="nocursor"){return}if(!cj){if(b1.onFocus){b1.onFocus(b9)}cj=true;if(aD.className.search(/\bCodeMirror-focused\b/)==-1){aD.className+=" CodeMirror-focused"}if(!bf){cC(true)}}am();cM()}function aE(){if(cj){if(b1.onBlur){b1.onBlur(b9)}cj=false;if(b4){ar(function(){if(b4){b4();b4=null}})()}aD.className=aD.className.replace(" CodeMirror-focused","")}clearInterval(cP);setTimeout(function(){if(!cj){ci=null}},150)}function aO(c4,c3,c2,c0,cZ){if(cs){return}if(a8){var c1=[];cy.iter(c4.line,c3.line+1,function(c5){c1.push(c5.text)});a8.addChange(c4.line,c2.length,c1);while(a8.done.length>b1.undoDepth){a8.done.shift()}}at(c4,c3,c2,c0,cZ)}function ca(c4,c5){if(!c4.length){return}var c6=c4.pop(),c0=[];for(var c1=c6.length-1;c1>=0;c1-=1){var c3=c6[c1];var c7=[],cZ=c3.start+c3.added;cy.iter(c3.start,cZ,function(c8){c7.push(c8.text)});c0.push({start:c3.start,added:c3.old.length,old:c7});var c2=aT({line:c3.start+c3.old.length-1,ch:W(c7[c7.length-1],c3.old[c3.old.length-1])});at({line:c3.start,ch:0},{line:cZ-1,ch:cF(cZ-1).text.length},c3.old,c2,c2)}cp=true;c5.push(c0)}function cT(){ca(a8.done,a8.undone)}function cJ(){ca(a8.undone,a8.done)}function at(de,c3,dk,cZ,dl){if(cs){return}var dj=false,c2=bD.length;if(!b1.lineWrapping){cy.iter(de.line,c3.line+1,function(dm){if(dm.text.length==c2){dj=true;return true}})}if(de.line!=c3.line||dk.length>1){aS=true}var db=c3.line-de.line,da=cF(de.line),c0=cF(c3.line);if(de.ch==0&&c3.ch==0&&dk[dk.length-1]==""){var c8=[],c9=null;if(de.line){c9=cF(de.line-1);c9.fixMarkEnds(c0)}else{c0.fixMarkStarts()}for(var dg=0,di=dk.length-1;dg<di;++dg){c8.push(e.inheritMarks(dk[dg],c9))}if(db){cy.remove(de.line,db,cA)}if(c8.length){cy.insert(de.line,c8)}}else{if(da==c0){if(dk.length==1){da.replace(de.ch,c3.ch,dk[0])}else{c0=da.split(c3.ch,dk[dk.length-1]);da.replace(de.ch,null,dk[0]);da.fixMarkEnds(c0);var c8=[];for(var dg=1,di=dk.length-1;dg<di;++dg){c8.push(e.inheritMarks(dk[dg],da))}c8.push(c0);cy.insert(de.line+1,c8)}}else{if(dk.length==1){da.replace(de.ch,null,dk[0]);c0.replace(null,c3.ch,"");da.append(c0);cy.remove(de.line+1,db,cA)}else{var c8=[];da.replace(de.ch,null,dk[0]);c0.replace(null,c3.ch,dk[dk.length-1]);da.fixMarkEnds(c0);for(var dg=1,di=dk.length-1;dg<di;++dg){c8.push(e.inheritMarks(dk[dg],da))}if(db>1){cy.remove(de.line+1,db-1,cA)}cy.insert(de.line+1,c8)}}}if(b1.lineWrapping){var c5=Math.max(5,bk.clientWidth/bh()-3);cy.iter(de.line,de.line+dk.length,function(dm){if(dm.hidden){return}var dn=Math.ceil(dm.text.length/c5)||1;if(dn!=dm.height){a3(dm,dn)}})}else{cy.iter(de.line,de.line+dk.length,function(dn){var dm=dn.text;if(dm.length>c2){bD=dm;c2=dm.length;aF=null;dj=false}});if(dj){c2=0;bD="";aF=null;cy.iter(0,cy.size,function(dn){var dm=dn.text;if(dm.length>c2){c2=dm.length;bD=dm}})}}var c1=[],c7=dk.length-db-1;for(var dg=0,dd=ch.length;dg<dd;++dg){var dh=ch[dg];if(dh<de.line){c1.push(dh)}else{if(dh>c3.line){c1.push(dh+c7)}}}var df=de.line+Math.min(dk.length,500);cH(de.line,df);c1.push(df);ch=c1;bG(100);aB.push({from:de.line,to:c3.line+1,diff:c7});var c6={from:de,to:c3,text:dk};if(cN){for(var c4=cN;c4.next;c4=c4.next){}c4.next=c6}else{cN=c6}function dc(dm){return dm<=Math.min(c3.line,c3.line+c7)?dm:dm+c7}bw(cZ,dl,dc(cW.from.line),dc(cW.to.line));if(bk.clientHeight){bM.style.height=(cy.height*bP()+2*cr())+"px"}}function bQ(c0,c3,c2){c3=aT(c3);if(!c2){c2=c3}else{c2=aT(c2)}c0=A(c0);function c1(c6){if(Z(c6,c3)){return c6}if(!Z(c2,c6)){return cZ}var c4=c6.line+c0.length-(c2.line-c3.line)-1;var c5=c6.ch;if(c6.line==c2.line){c5+=c0[c0.length-1].length-(c2.ch-(c2.line==c3.line?c3.ch:0))}return{line:c4,ch:c5}}var cZ;aC(c0,c3,c2,function(c4){cZ=c4;return{from:c1(cW.from),to:c1(cW.to)}});return cZ}function bs(cZ,c0){aC(A(cZ),cW.from,cW.to,function(c1){if(c0=="end"){return{from:c1,to:c1}}else{if(c0=="start"){return{from:cW.from,to:cW.from}}else{return{from:cW.from,to:c1}}}})}function aC(c2,c4,c3,cZ){var c1=c2.length==1?c2[0].length+c4.ch:c2[c2.length-1].length;var c0=cZ({line:c4.line+c2.length-1,ch:c1});aO(c4,c3,c2,c0.from,c0.to)}function cO(c3,c2){var c0=c3.line,cZ=c2.line;if(c0==cZ){return cF(c0).text.slice(c3.ch,c2.ch)}var c1=[cF(c0).text.slice(c3.ch)];cy.iter(c0+1,cZ,function(c4){c1.push(c4.text)});c1.push(cF(cZ).text.slice(0,c2.ch));return c1.join("\n")}function b3(){return cO(cW.from,cW.to)}var bt=false;function am(){if(bt){return}b7.set(b1.pollInterval,function(){aN();bK();if(cj){am()}ay()})}function aQ(){var cZ=false;bt=true;function c0(){aN();var c1=bK();if(!c1&&!cZ){cZ=true;b7.set(60,c0)}else{bt=false;am()}ay()}b7.set(20,c0)}var ba="";function bK(){if(bf||!cj||ae(bm)||b1.readOnly){return false}var c0=bm.value;if(c0==ba){return false}ci=null;var c1=0,cZ=Math.min(ba.length,c0.length);while(c1<cZ&&ba[c1]==c0[c1]){++c1}if(c1<ba.length){cW.from={line:cW.from.line,ch:cW.from.ch-(ba.length-c1)}}else{if(cn&&ad(cW.from,cW.to)){cW.to={line:cW.to.line,ch:Math.min(cF(cW.to.line).text.length,cW.to.ch+(c0.length-c1))}}}bs(c0.slice(c1),"end");ba=c0;return true}function cC(cZ){if(!ad(cW.from,cW.to)){ba="";bm.value=b3();a(bm)}else{if(cZ){ba=bm.value=""}}}function bz(){if(b1.readOnly!="nocursor"){bm.focus()}}function cY(){if(!bc.getBoundingClientRect){return}var cZ=bc.getBoundingClientRect();if(I&&cZ.top==cZ.bottom){return}var c0=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);if(cZ.top<0||cZ.bottom>c0){bc.scrollIntoView()}}function cf(){var c0=cR(cW.inverted?cW.from:cW.to);var cZ=b1.lineWrapping?Math.min(c0.x,bu.offsetWidth):c0.x;return aA(cZ,c0.y,cZ,c0.yBot)}function aA(c1,c7,cZ,c6){var c4=a5(),dc=cr();c7+=dc;c6+=dc;c1+=c4;cZ+=c4;var c9=bk.clientHeight,c2=bk.scrollTop,c0=false,db=true;if(c7<c2){bk.scrollTop=Math.max(0,c7);c0=true}else{if(c6>c2+c9){bk.scrollTop=c6-c9;c0=true}}var c8=bk.clientWidth,da=bk.scrollLeft;var c5=b1.fixedGutter?aH.clientWidth:0;var c3=c1<c5+c4+10;if(c1<da+c5||c3){if(c3){c1=0}bk.scrollLeft=Math.max(0,c1-10-c5);c0=true}else{if(cZ>c8+da-3){bk.scrollLeft=cZ+10-c8;c0=true;if(cZ>bM.clientWidth){db=false}}}if(c0&&b1.onScroll){b1.onScroll(b9)}return db}function bA(){var cZ=bP(),c2=bk.scrollTop-cr();var c1=Math.max(0,Math.floor(c2/cZ));var c0=Math.ceil((c2+bk.clientHeight)/cZ);return{from:X(cy,c1),to:X(cy,c0)}}function cd(c7,c3){if(!bk.clientWidth){cQ=bL=bd=0;return}var c2=bA();if(c7!==true&&c7.length==0&&c2.from>cQ&&c2.to<bL){return}var c8=Math.max(c2.from-100,0),c9=Math.min(cy.size,c2.to+100);if(cQ<c8&&c8-cQ<20){c8=cQ}if(bL>c9&&bL-c9<20){c9=Math.min(cy.size,bL)}var db=c7===true?[]:b0([{from:cQ,to:bL,domStart:0}],c7);var c6=0;for(var c4=0;c4<db.length;++c4){var c5=db[c4];if(c5.from<c8){c5.domStart+=(c8-c5.from);c5.from=c8}if(c5.to>c9){c5.to=c9}if(c5.from>=c5.to){db.splice(c4--,1)}else{c6+=c5.to-c5.from}}if(c6==c9-c8&&c8==cQ&&c9==bL){return}db.sort(function(dd,dc){return dd.domStart-dc.domStart});var c1=bP(),cZ=aH.style.display;aq.style.display="none";aR(c8,c9,db);aq.style.display=aH.style.display="";var c0=c8!=cQ||c9!=bL||bN!=bk.clientHeight+c1;if(c0){bN=bk.clientHeight+c1}cQ=c8;bL=c9;bd=g(cy,c8);cg.style.top=(bd*c1)+"px";if(bk.clientHeight){bM.style.height=(cy.height*c1+2*cr())+"px"}if(aq.childNodes.length!=bL-cQ){throw new Error("BAD PATCH! "+JSON.stringify(db)+" size="+(bL-cQ)+" nodes="+aq.childNodes.length)}function da(){aF=bk.clientWidth;var dd=aq.firstChild,dc=false;cy.iter(cQ,bL,function(df){if(!df.hidden){var de=Math.round(dd.offsetHeight/c1)||1;if(df.height!=de){a3(df,de);aS=dc=true}}dd=dd.nextSibling});if(dc){bM.style.height=(cy.height*c1+2*cr())+"px"}return dc}if(b1.lineWrapping){da()}else{if(aF==null){aF=ct(bD)}if(aF>bk.clientWidth){bu.style.width=aF+"px";bM.style.width="";bM.style.width=bk.scrollWidth+"px"}else{bu.style.width=bM.style.width=""}}aH.style.display=cZ;if(c0||aS){aL()&&b1.lineWrapping&&da()&&aL()}cV();if(!c3&&b1.onUpdate){b1.onUpdate(b9)}return true}function b0(c8,c6){for(var c3=0,c1=c6.length||0;c3<c1;++c3){var c5=c6[c3],cZ=[],c7=c5.diff||0;for(var c2=0,c0=c8.length;c2<c0;++c2){var c4=c8[c2];if(c5.to<=c4.from&&c5.diff){cZ.push({from:c4.from+c7,to:c4.to+c7,domStart:c4.domStart})}else{if(c5.to<=c4.from||c5.from>=c4.to){cZ.push(c4)}else{if(c5.from>c4.from){cZ.push({from:c4.from,to:c5.from,domStart:c4.domStart})}if(c5.to<c4.to){cZ.push({from:c5.to+c7,to:c4.to+c7,domStart:c4.domStart+(c5.to-c4.from)})}}}}c8=cZ}return c8}function aR(c8,c9,db){if(!db.length){aq.innerHTML=""}else{function cZ(dd){var dc=dd.nextSibling;dd.parentNode.removeChild(dd);return dc}var c3=0,c1=aq.firstChild,c0;for(var c4=0;c4<db.length;++c4){var da=db[c4];while(da.domStart>c3){c1=cZ(c1);c3++}for(var c2=0,c6=da.to-da.from;c2<c6;++c2){c1=c1.nextSibling;c3++}}while(c1){c1=cZ(c1)}}var c5=db.shift(),c1=aq.firstChild,c2=c8;var c7=document.createElement("div");cy.iter(c8,c9,function(dc){if(c5&&c5.to==c2){c5=db.shift()}if(!c5||c5.from>c2){if(dc.hidden){var dd=c7.innerHTML="<pre></pre>"}else{var dd="<pre"+(dc.className?' class="'+dc.className+'"':"")+">"+dc.getHTML(a9)+"</pre>";if(dc.bgClassName){dd='<div style="position: relative"><pre class="'+dc.bgClassName+'" style="position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: -2"> </pre>'+dd+"</div>"}}c7.innerHTML=dd;aq.insertBefore(c7.firstChild,c1)}else{c1=c1.nextSibling}++c2})}function aL(){if(!b1.gutter&&!b1.lineNumbers){return}var c0=cg.offsetHeight,c8=bk.clientHeight;aH.style.height=(c0-c8<2?c8:c0)+"px";var c6=[],c4=cQ,c7;cy.iter(cQ,Math.max(bL,cQ+1),function(da){if(da.hidden){c6.push("<pre></pre>")}else{var c9=da.gutterMarker;var dc=b1.lineNumbers?c4+b1.firstLineNumber:null;if(c9&&c9.text){dc=c9.text.replace("%N%",dc!=null?dc:"")}else{if(dc==null){dc="\u00a0"}}c6.push((c9&&c9.style?'<pre class="'+c9.style+'">':"<pre>"),dc);for(var db=1;db<da.height;++db){c6.push("<br/> ")}c6.push("</pre>");if(!c9){c7=c4}}++c4});aH.style.display="none";aY.innerHTML=c6.join("");if(c7!=null){var c2=aY.childNodes[c7-cQ];var c3=String(cy.size).length,cZ=H(c2),c1="";while(cZ.length+c1.length<c3){c1+="\u00a0"}if(c1){c2.insertBefore(document.createTextNode(c1),c2.firstChild)}}aH.style.display="";var c5=Math.abs((parseInt(bu.style.marginLeft)||0)-aH.offsetWidth)>2;bu.style.marginLeft=aH.offsetWidth+"px";aS=false;return c5}function cV(){var c2=ad(cW.from,cW.to);var dd=cR(cW.from,true);var c8=c2?dd:cR(cW.to,true);var c6=cW.inverted?dd:c8,c0=bP();var cZ=ak(aD),c1=ak(aq);bX.style.top=Math.max(0,Math.min(bk.offsetHeight,c6.y+c1.top-cZ.top))+"px";bX.style.left=Math.max(0,Math.min(bk.offsetWidth,c6.x+c1.left-cZ.left))+"px";if(c2){bc.style.top=c6.y+"px";bc.style.left=(b1.lineWrapping?Math.min(c6.x,bu.offsetWidth):c6.x)+"px";bc.style.display="";bg.style.display="none"}else{var db=dd.y==c8.y,c4="";var c9=bu.clientWidth||bu.offsetWidth;var c5=bu.clientHeight||bu.offsetHeight;function dc(di,dh,dg,de){var df=E?"width: "+(!dg?c9:c9-dg-di)+"px":"right: "+dg+"px";c4+='<div class="CodeMirror-selected" style="position: absolute; left: '+di+"px; top: "+dh+"px; "+df+"; height: "+de+'px"></div>'}if(cW.from.ch&&dd.y>=0){var da=db?c9-c8.x:0;dc(dd.x,dd.y,da,c0)}var c3=Math.max(0,dd.y+(cW.from.ch?c0:0));var c7=Math.min(c8.y,c5)-c3;if(c7>0.2*c0){dc(0,c3,0,c7)}if((!db||!cW.from.ch)&&c8.y<c5-0.5*c0){dc(0,c8.y,c9-c8.x,c0)}bg.innerHTML=c4;bc.style.display="none";bg.style.display=""}}function a4(cZ){if(cZ){ci=ci||(cW.inverted?cW.to:cW.from)}else{ci=null}}function bx(c1,c0){var cZ=ci&&aT(ci);if(cZ){if(Z(cZ,c1)){c1=cZ}else{if(Z(c0,cZ)){c0=cZ}}}bw(c1,c0);b6=true}function bw(c6,c5,cZ,c4){cv=null;if(cZ==null){cZ=cW.from.line;c4=cW.to.line}if(ad(cW.from,c6)&&ad(cW.to,c5)){return}if(Z(c5,c6)){var c2=c5;c5=c6;c6=c2}if(c6.line!=cZ){var c3=bR(c6,cZ,cW.from.ch);if(!c3){cK(c6.line,false)}else{c6=c3}}if(c5.line!=c4){c5=bR(c5,c4,cW.to.ch)}if(ad(c6,c5)){cW.inverted=false}else{if(ad(c6,cW.to)){cW.inverted=false}else{if(ad(c5,cW.from)){cW.inverted=true}}}if(b1.autoClearEmptyLines&&ad(cW.from,cW.to)){var c1=cW.inverted?c6:c5;if(c1.line!=cW.from.line&&cW.from.line<cy.size){var c0=cF(cW.from.line);if(/^\s+$/.test(c0.text)){setTimeout(ar(function(){if(c0.parent&&/^\s+$/.test(c0.text)){var c7=Y(c0);bQ("",{line:c7,ch:0},{line:c7,ch:c0.text.length})}},10))}}}cW.from=c6;cW.to=c5;aP=true}function bR(c4,c0,c1){function c3(c7){var c9=c4.line+c7,c6=c7==1?cy.size:-1;while(c9!=c6){var c5=cF(c9);if(!c5.hidden){var c8=c4.ch;if(c2||c8>c1||c8>c5.text.length){c8=c5.text.length}return{line:c9,ch:c8}}c9+=c7}}var cZ=cF(c4.line);var c2=c4.ch==cZ.text.length&&c4.ch!=c1;if(!cZ.hidden){return c4}if(c4.line>=c0){return c3(1)||c3(-1)}else{return c3(-1)||c3(1)}}function a6(cZ,c1,c0){var c2=aT({line:cZ,ch:c1||0});(c0?bx:bw)(c2,c2)}function bZ(cZ){return Math.max(0,Math.min(cZ,cy.size-1))}function aT(c1){if(c1.line<0){return{line:0,ch:0}}if(c1.line>=cy.size){return{line:cy.size-1,ch:cF(cy.size-1).text.length}}var cZ=c1.ch,c0=cF(c1.line).text.length;if(cZ==null||cZ>c0){return{line:c1.line,ch:c0}}else{if(cZ<0){return{line:c1.line,ch:0}}else{return c1}}}function co(c2,c6){var c3=cW.inverted?cW.from:cW.to,c7=c3.line,cZ=c3.ch;var c5=cF(c7);function c0(){for(var c8=c7+c2,da=c2<0?-1:cy.size;c8!=da;c8+=c2){var c9=cF(c8);if(!c9.hidden){c7=c8;c5=c9;return true}}}function c4(c8){if(cZ==(c2<0?0:c5.text.length)){if(!c8&&c0()){cZ=c2<0?c5.text.length:0}else{return false}}else{cZ+=c2}return true}if(c6=="char"){c4()}else{if(c6=="column"){c4(true)}else{if(c6=="word"){var c1=false;for(;;){if(c2<0){if(!c4()){break}}if(ag(c5.text.charAt(cZ))){c1=true}else{if(c1){if(c2<0){c2=1;c4()}break}}if(c2>0){if(!c4()){break}}}}}}return{line:c7,ch:cZ}}function cE(cZ,c0){var c1=cZ<0?cW.from:cW.to;if(ci||ad(cW.from,cW.to)){c1=co(cZ,c0)}a6(c1.line,c1.ch,true)}function cm(cZ,c0){if(!ad(cW.from,cW.to)){bQ("",cW.from,cW.to)}else{if(cZ<0){bQ("",co(cZ,c0),cW.to)}else{bQ("",cW.from,co(cZ,c0))}}b6=true}var cv=null;function cx(cZ,c0){var c2=0,c3=cR(cW.inverted?cW.from:cW.to,true);if(cv!=null){c3.x=cv}if(c0=="page"){c2=Math.min(bk.clientHeight,window.innerHeight||document.documentElement.clientHeight)}else{if(c0=="line"){c2=bP()}}var c1=bH(c3.x,c3.y+c2*cZ+2);if(c0=="page"){bk.scrollTop+=cR(c1,true).y-c3.y}a6(c1.line,c1.ch,true);cv=c3.x}function bI(c2){var c0=cF(c2.line).text;var c1=c2.ch,cZ=c2.ch;while(c1>0&&ag(c0.charAt(c1-1))){--c1}while(cZ<c0.length&&ag(c0.charAt(cZ))){++cZ}bx({line:c2.line,ch:c1},{line:c2.line,ch:cZ})}function aK(cZ){bx({line:cZ,ch:0},aT({line:cZ+1,ch:0}))}function cB(c1){if(ad(cW.from,cW.to)){return by(cW.from.line,c1)}var c0=cW.to.line-(cW.to.ch?0:1);for(var cZ=cW.from.line;cZ<=c0;++cZ){by(cZ,c1)}}function by(c1,c8){if(!c8){c8="add"}if(c8=="smart"){if(!cb.indent){c8="prev"}else{var cZ=cu(c1)}}var c9=cF(c1),c3=c9.indentation(b1.tabSize),c0=c9.text.match(/^\s*/)[0],c5;if(c8=="prev"){if(c1){c5=cF(c1-1).indentation(b1.tabSize)}else{c5=0}}else{if(c8=="smart"){c5=cb.indent(cZ,c9.text.slice(c0.length),c9.text)}else{if(c8=="add"){c5=c3+b1.indentUnit}else{if(c8=="subtract"){c5=c3-b1.indentUnit}}}}c5=Math.max(0,c5);var c7=c5-c3;if(!c7){if(cW.from.line!=c1&&cW.to.line!=c1){return}var c6=c0}else{var c6="",c4=0;if(b1.indentWithTabs){for(var c2=Math.floor(c5/b1.tabSize);c2;--c2){c4+=b1.tabSize;c6+="\t"}}while(c4<c5){++c4;c6+=" "}}bQ(c6,{line:c1,ch:0},{line:c1,ch:c0.length})}function bT(){cb=u.getMode(b1,b1.mode);cy.iter(0,cy.size,function(cZ){cZ.stateAfter=null});ch=[0];bG()}function be(){var cZ=b1.gutter||b1.lineNumbers;aH.style.display=cZ?"":"none";if(cZ){aS=true}else{aq.parentNode.style.marginLeft=0}}function cG(c1,c0){if(b1.lineWrapping){aD.className+=" CodeMirror-wrap";var cZ=bk.clientWidth/bh()-3;cy.iter(0,cy.size,function(c2){if(c2.hidden){return}var c3=Math.ceil(c2.text.length/cZ)||1;if(c3!=1){a3(c2,c3)}});bu.style.width=bM.style.width=""}else{aD.className=aD.className.replace(" CodeMirror-wrap","");aF=null;bD="";cy.iter(0,cy.size,function(c2){if(c2.height!=1&&!c2.hidden){a3(c2,1)}if(c2.text.length>bD.length){bD=c2.text}})}aB.push({from:0,to:cy.size})}function a9(c0){var cZ=b1.tabSize-c0%b1.tabSize,c2=ap[cZ];if(c2){return c2}for(var c3='<span class="cm-tab">',c1=0;c1<cZ;++c1){c3+=" "}return(ap[cZ]={html:c3+"</span>",width:cZ})}function cD(){bk.className=bk.className.replace(/\s*cm-s-\S+/g,"")+b1.theme.replace(/(^|\s)\s*/g," cm-s-")}function cX(){this.set=[]}cX.prototype.clear=ar(function(){var c4=Infinity,c0=-Infinity;for(var c3=0,c6=this.set.length;c3<c6;++c3){var c1=this.set[c3],cZ=c1.marked;if(!cZ||!c1.parent){continue}var c5=Y(c1);c4=Math.min(c4,c5);c0=Math.max(c0,c5);for(var c2=0;c2<cZ.length;++c2){if(cZ[c2].marker==this){cZ.splice(c2--,1)}}}if(c4!=Infinity){aB.push({from:c4,to:c0+1})}});cX.prototype.find=function(){var c4,c5;for(var c1=0,c3=this.set.length;c1<c3;++c1){var c7=this.set[c1],c2=c7.marked;for(var c0=0;c0<c2.length;++c0){var cZ=c2[c0];if(cZ.marker==this){if(cZ.from!=null||cZ.to!=null){var c6=Y(c7);if(c6!=null){if(cZ.from!=null){c4={line:c6,ch:cZ.from}}if(cZ.to!=null){c5={line:c6,ch:cZ.to}}}}}}}return{from:c4,to:c5}};function bE(c5,c4,c1){c5=aT(c5);c4=aT(c4);var cZ=new cX();if(!Z(c5,c4)){return cZ}function c3(c6,c9,c8,c7){cF(c6).addMark(new K(c9,c8,c7,cZ))}if(c5.line==c4.line){c3(c5.line,c5.ch,c4.ch,c1)}else{c3(c5.line,c5.ch,null,c1);for(var c0=c5.line+1,c2=c4.line;c0<c2;++c0){c3(c0,null,null,c1)}c3(c4.line,null,c4.ch,c1)}aB.push({from:c5.line,to:c4.line+1});return cZ}function aU(c0){c0=aT(c0);var cZ=new G(c0.ch);cF(c0.line).addMark(cZ);return cZ}function bo(c4){c4=aT(c4);var c3=[],c1=cF(c4.line).marked;if(!c1){return c3}for(var c0=0,c2=c1.length;c0<c2;++c0){var cZ=c1[c0];if((cZ.from==null||cZ.from<=c4.ch)&&(cZ.to==null||cZ.to>=c4.ch)){c3.push(cZ.marker||cZ)}}return c3}function bV(cZ,c1,c0){if(typeof cZ=="number"){cZ=cF(bZ(cZ))}cZ.gutterMarker={text:c1,style:c0};aS=true;return cZ}function au(cZ){if(typeof cZ=="number"){cZ=cF(bZ(cZ))}cZ.gutterMarker=null;aS=true}function aX(c0,c2){var c1=c0,cZ=c0;if(typeof c0=="number"){cZ=cF(bZ(c0))}else{c1=Y(c0)}if(c1==null){return null}if(c2(cZ,c1)){aB.push({from:c1,to:c1+1})}else{return null}return cZ}function bl(c0,cZ,c1){return aX(c0,function(c2){if(c2.className!=cZ||c2.bgClassName!=c1){c2.className=cZ;c2.bgClassName=c1;return true}})}function cK(c0,cZ){return aX(c0,function(c1,c4){if(c1.hidden!=cZ){c1.hidden=cZ;a3(c1,cZ?0:1);var c3=cW.from.line,c2=cW.to.line;if(cZ&&(c3==c4||c2==c4)){var c6=c3==c4?bR({line:c3,ch:0},c3,0):cW.from;var c5=c2==c4?bR({line:c2,ch:0},c2,0):cW.to;if(!c5){return}bw(c6,c5)}return(aS=true)}})}function aV(c0){if(typeof c0=="number"){if(!br(c0)){return null}var c1=c0;c0=cF(c0);if(!c0){return null}}else{var c1=Y(c0);if(c1==null){return null}}var cZ=c0.gutterMarker;return{line:c1,handle:c0,text:c0.text,markerText:cZ&&cZ.text,markerClass:cZ&&cZ.style,lineClass:c0.className,bgClass:c0.bgClassName}}function ct(cZ){av.innerHTML="<pre><span>x</span></pre>";av.firstChild.firstChild.firstChild.nodeValue=cZ;return av.firstChild.firstChild.offsetWidth||10}function aG(db,c5){if(c5<=0){return 0}var c2=cF(db),c8=c2.text;function c9(dc){return b5(c2,dc).left}var c6=0,c4=0,c7=c8.length,c3;var c0=Math.min(c7,Math.ceil(c5/bh()));for(;;){var c1=c9(c0);if(c1<=c5&&c0<c7){c0=Math.min(c7,Math.ceil(c0*1.2))}else{c3=c1;c7=c0;break}}if(c5>c3){return c7}c0=Math.floor(c7*0.8);c1=c9(c0);if(c1<c5){c6=c0;c4=c1}for(;;){if(c7-c6<=1){return(c3-c5>c5-c4)?c6:c7}var da=Math.ceil((c6+c7)/2),cZ=c9(da);if(cZ>c5){c7=da;c3=cZ}else{c6=da;c4=cZ}}}var cz="CodeMirror-temp-"+Math.floor(Math.random()*16777215).toString(16);function b5(c0,c3){if(c3==0){return{top:0,left:0}}var cZ=b1.lineWrapping&&c3<c0.text.length&&o.test(c0.text.slice(c3-1,c3+1));av.innerHTML="<pre>"+c0.getHTML(a9,c3,cz,cZ)+"</pre>";var c2=document.getElementById(cz);var c5=c2.offsetTop,c4=c2.offsetLeft;if(I&&c5==0&&c4==0){var c1=document.createElement("span");c1.innerHTML="x";c2.parentNode.insertBefore(c1,c2.nextSibling);c5=c1.offsetTop}return{top:c5,left:c4}}function cR(c4,c2){var cZ,c0=bP(),c3=c0*(g(cy,c4.line)-(c2?bd:0));if(c4.ch==0){cZ=0}else{var c1=b5(cF(c4.line),c4.ch);cZ=c1.left;if(b1.lineWrapping){c3+=Math.max(0,c1.top)}}return{x:cZ,y:c3,yBot:c3+c0}}function bH(c8,c7){if(c7<0){c7=0}var c5=bP(),c3=bh(),de=bd+Math.floor(c7/c5);var c9=X(cy,de);if(c9>=cy.size){return{line:cy.size-1,ch:cF(cy.size-1).text.length}}var c0=cF(c9),db=c0.text;var dg=b1.lineWrapping,c6=dg?de-g(cy,c9):0;if(c8<=0&&c6==0){return{line:c9,ch:0}}function df(di){var dj=b5(c0,di);if(dg){var dk=Math.round(dj.top/c5);return Math.max(0,dj.left+(dk-c6)*bk.clientWidth)}return dj.left}var dd=0,dc=0,c1=db.length,cZ;var da=Math.min(c1,Math.ceil((c8+c6*bk.clientWidth*0.9)/c3));for(;;){var c4=df(da);if(c4<=c8&&da<c1){da=Math.min(c1,Math.ceil(da*1.2))}else{cZ=c4;c1=da;break}}if(c8>cZ){return{line:c9,ch:c1}}da=Math.floor(c1*0.8);c4=df(da);if(c4<c8){dd=da;dc=c4}for(;;){if(c1-dd<=1){return{line:c9,ch:(cZ-c8>c8-dc)?dd:c1}}var dh=Math.ceil((dd+c1)/2),c2=df(dh);if(c2>c8){c1=dh;cZ=c2}else{dd=dh;dc=c2}}}function ao(c1){var cZ=cR(c1,true),c0=ak(bu);return{x:c0.left+cZ.x,y:c0.top+cZ.y,yBot:c0.top+cZ.yBot}}var a0,ax,bU;function bP(){if(bU==null){bU="<pre>";for(var c0=0;c0<49;++c0){bU+="x<br/>"}bU+="x</pre>"}var cZ=aq.clientHeight;if(cZ==ax){return a0}ax=cZ;av.innerHTML=bU;a0=av.firstChild.offsetHeight/50||1;av.innerHTML="";return a0}var cS,bv=0;function bh(){if(bk.clientWidth==bv){return cS}bv=bk.clientWidth;return(cS=ct("x"))}function cr(){return bu.offsetTop}function a5(){return bu.offsetLeft}function a2(c3,c2){var c1=ak(bk,true),cZ,c4;try{cZ=c3.clientX;c4=c3.clientY}catch(c3){return null}if(!c2&&(cZ-c1.left>bk.clientWidth||c4-c1.top>bk.clientHeight)){return null}var c0=ak(bu,true);return bH(cZ-c0.left,c4-c0.top)}function a1(c0){var c5=a2(c0),c4=bk.scrollTop;if(!c5||window.opera){return}if(ad(cW.from,cW.to)||Z(c5,cW.from)||!Z(c5,cW.to)){ar(a6)(c5.line,c5.ch)}var c3=bm.style.cssText;bX.style.position="absolute";bm.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(c0.clientY-5)+"px; left: "+(c0.clientX-5)+"px; z-index: 1000; background: white; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";bf=true;var c2=bm.value=b3();bz();a(bm);function cZ(){var c6=A(bm.value).join("\n");if(c6!=c2){ar(bs)(c6,"end")}bX.style.position="relative";bm.style.cssText=c3;if(B){bk.scrollTop=c4}bf=false;cC(true);am()}if(N){w(c0);var c1=r(window,"mouseup",function(){c1();setTimeout(cZ,20)},true)}else{setTimeout(cZ,50)}}function cM(){clearInterval(cP);var cZ=true;bc.style.visibility="";cP=setInterval(function(){bc.style.visibility=(cZ=!cZ)?"":"hidden"},650)}var bp={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"};function ce(c5){var cZ=cW.inverted?cW.from:cW.to,c7=cF(cZ.line),c0=cZ.ch-1;var c4=(c0>=0&&bp[c7.text.charAt(c0)])||bp[c7.text.charAt(++c0)];if(!c4){return}var c8=c4.charAt(0),c6=c4.charAt(1)==">",di=c6?1:-1,dd=c7.styles;for(var dj=c0+1,df=0,dh=dd.length;df<dh;df+=2){if((dj-=dd[df].length)<=0){var dg=dd[df+1];break}}var c2=[c7.text.charAt(c0)],dc=/[(){}[\]]/;function da(dw,dr,ds){if(!dw.text){return}var dv=dw.styles,dq=c6?0:dw.text.length-1,dt;for(var dm=c6?0:dv.length-2,dp=c6?dv.length:-2;dm!=dp;dm+=2*di){var du=dv[dm];if(dv[dm+1]!=null&&dv[dm+1]!=dg){dq+=di*du.length;continue}for(var dl=c6?0:du.length-1,dk=c6?du.length:-1;dl!=dk;dl+=di,dq+=di){if(dq>=dr&&dq<ds&&dc.test(dt=du.charAt(dl))){var dn=bp[dt];if(dn.charAt(1)==">"==c6){c2.push(dt)}else{if(c2.pop()!=dn.charAt(0)){return{pos:dq,match:false}}else{if(!c2.length){return{pos:dq,match:true}}}}}}}}for(var df=cZ.line,dh=c6?Math.min(df+100,cy.size):Math.max(-1,df-100);df!=dh;df+=di){var c7=cF(df),c3=df==cZ.line;var c9=da(c7,c3&&c6?c0+1:0,c3&&!c6?c0:c7.text.length);if(c9){break}}if(!c9){c9={pos:null,match:false}}var dg=c9.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";var de=bE({line:cZ.line,ch:c0},{line:cZ.line,ch:c0+1},dg),c1=c9.pos!=null&&bE({line:df,ch:c9.pos},{line:df,ch:c9.pos+1},dg);var db=ar(function(){de.clear();c1&&c1.clear()});if(c5){setTimeout(db,800)}else{b4=db}}function a7(c5){var c4,c1;for(var c0=c5,c2=c5-40;c0>c2;--c0){if(c0==0){return 0}var cZ=cF(c0-1);if(cZ.stateAfter){return c0}var c3=cZ.indentation(b1.tabSize);if(c1==null||c4>c3){c1=c0-1;c4=c3}}return c1}function cu(c1){var c0=a7(c1),cZ=c0&&cF(c0-1).stateAfter;if(!cZ){cZ=V(cb)}else{cZ=p(cb,cZ)}cy.iter(c0,c1,function(c2){c2.highlight(cb,cZ,b1.tabSize);c2.stateAfter=p(cb,cZ)});if(c0<c1){aB.push({from:c0,to:c1})}if(c1<cy.size&&!cF(c1).stateAfter){ch.push(c1)}return cZ}function cH(c1,cZ){var c0=cu(c1);cy.iter(c1,cZ,function(c2){c2.highlight(cb,c0,b1.tabSize);c2.stateAfter=p(cb,c0)})}function bS(){var c5=+new Date+b1.workTime;var c8=ch.length;while(ch.length){if(!cF(cQ).stateAfter){var c2=cQ}else{var c2=ch.pop()}if(c2>=cy.size){continue}var c0=a7(c2),cZ=c0&&cF(c0-1).stateAfter;if(cZ){cZ=p(cb,cZ)}else{cZ=V(cb)}var c4=0,c1=cb.compareStates,c7=false,c6=c0,c3=false;cy.iter(c6,cy.size,function(da){var db=da.stateAfter;if(+new Date>c5){ch.push(c6);bG(b1.workDelay);if(c7){aB.push({from:c2,to:c6+1})}return(c3=true)}var dc=da.highlight(cb,cZ,b1.tabSize);if(dc){c7=true}da.stateAfter=p(cb,cZ);var c9=null;if(c1){var dd=db&&c1(db,cZ);if(dd!=ab){c9=!!dd}}if(c9==null){if(dc!==false||!db){c4=0}else{if(++c4>3&&(!cb.indent||cb.indent(db,"")==cb.indent(cZ,""))){c9=true}}}if(c9){return true}++c6});if(c3){return}if(c7){aB.push({from:c2,to:c6+1})}}if(c8&&b1.onHighlightComplete){b1.onHighlightComplete(b9)}}function bG(cZ){if(!ch.length){return}aw.set(cZ,ar(bS))}function aN(){cp=b6=cN=null;aB=[];aP=false;cA=[]}function ay(){var c3=false,c0;if(aP){c3=!cf()}if(aB.length){c0=cd(aB,true)}else{if(aP){cV()}if(aS){aL()}}if(c3){cf()}if(aP){cY();cM()}if(cj&&!bf&&(cp===true||(cp!==false&&aP))){cC(b6)}if(aP&&b1.matchBrackets){setTimeout(ar(function(){if(b4){b4();b4=null}if(ad(cW.from,cW.to)){ce(false)}}),20)}var cZ=cN,c1=cA;if(aP&&b1.onCursorActivity){b1.onCursorActivity(b9)}if(cZ&&b1.onChange&&b9){b1.onChange(b9,cZ)}for(var c2=0;c2<c1.length;++c2){c1[c2](b9)}if(c0&&b1.onUpdate){b1.onUpdate(b9)}}var cq=0;function ar(cZ){return function(){if(!cq++){aN()}try{var c0=cZ.apply(this,arguments)}finally{if(!--cq){ay()}}return c0}}function bO(cZ){a8.startCompound();try{return cZ()}finally{a8.endCompound()}}for(var bJ in ac){if(ac.propertyIsEnumerable(bJ)&&!b9.propertyIsEnumerable(bJ)){b9[bJ]=ac[bJ]}}return b9}u.defaults={value:"",mode:null,theme:"default",indentUnit:2,indentWithTabs:false,smartIndent:true,tabSize:4,keyMap:"default",extraKeys:null,electricChars:true,autoClearEmptyLines:false,onKeyEvent:null,onDragEvent:null,lineWrapping:false,lineNumbers:false,gutter:false,fixedGutter:false,firstLineNumber:1,readOnly:false,dragDrop:true,onChange:null,onCursorActivity:null,onGutterClick:null,onHighlightComplete:null,onUpdate:null,onFocus:null,onBlur:null,onScroll:null,matchBrackets:false,workTime:100,workDelay:200,pollInterval:100,undoDepth:40,tabindex:null,autofocus:null};var s=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent);var M=s||/Mac/.test(navigator.platform);var U=/Win/.test(navigator.platform);var aj=u.modes={},S=u.mimeModes={};u.defineMode=function(am,ao){if(!u.defaults.mode&&am!="null"){u.defaults.mode=am}if(arguments.length>2){ao.dependencies=[];for(var an=2;an<arguments.length;++an){ao.dependencies.push(arguments[an])}}aj[am]=ao};u.defineMIME=function(an,am){S[an]=am};u.resolveMode=function(am){if(typeof am=="string"&&S.hasOwnProperty(am)){am=S[am]}else{if(typeof am=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(am)){return u.resolveMode("application/xml")}}if(typeof am=="string"){return{name:am}}else{return am||{name:"null"}}};u.getMode=function(an,am){var am=u.resolveMode(am);var ao=aj[am.name];if(!ao){return u.getMode(an,"text/plain")}return ao(an,am)};u.listModes=function(){var an=[];for(var am in aj){if(aj.propertyIsEnumerable(am)){an.push(am)}}return an};u.listMIMEs=function(){var an=[];for(var am in S){if(S.propertyIsEnumerable(am)){an.push({mime:am,mode:S[am]})}}return an};var ac=u.extensions={};u.defineExtension=function(am,an){ac[am]=an};var L=u.commands={selectAll:function(am){am.setSelection({line:0,ch:0},{line:am.lineCount()-1})},killLine:function(am){var ap=am.getCursor(true),ao=am.getCursor(false),an=!ad(ap,ao);if(!an&&am.getLine(ap.line).length==ap.ch){am.replaceRange("",ap,{line:ap.line+1,ch:0})}else{am.replaceRange("",ap,an?ao:{line:ap.line})}},deleteLine:function(am){var an=am.getCursor().line;am.replaceRange("",{line:an,ch:0},{line:an})},undo:function(am){am.undo()},redo:function(am){am.redo()},goDocStart:function(am){am.setCursor(0,0,true)},goDocEnd:function(am){am.setSelection({line:am.lineCount()-1},null,true)},goLineStart:function(am){am.setCursor(am.getCursor().line,0,true)},goLineStartSmart:function(am){var ap=am.getCursor();var ao=am.getLine(ap.line),an=Math.max(0,ao.search(/\S/));am.setCursor(ap.line,ap.ch<=an&&ap.ch?0:an,true)},goLineEnd:function(am){am.setSelection({line:am.getCursor().line},null,true)},goLineUp:function(am){am.moveV(-1,"line")},goLineDown:function(am){am.moveV(1,"line")},goPageUp:function(am){am.moveV(-1,"page")},goPageDown:function(am){am.moveV(1,"page")},goCharLeft:function(am){am.moveH(-1,"char")},goCharRight:function(am){am.moveH(1,"char")},goColumnLeft:function(am){am.moveH(-1,"column")},goColumnRight:function(am){am.moveH(1,"column")},goWordLeft:function(am){am.moveH(-1,"word")},goWordRight:function(am){am.moveH(1,"word")},delCharLeft:function(am){am.deleteH(-1,"char")},delCharRight:function(am){am.deleteH(1,"char")},delWordLeft:function(am){am.deleteH(-1,"word")},delWordRight:function(am){am.deleteH(1,"word")},indentAuto:function(am){am.indentSelection("smart")},indentMore:function(am){am.indentSelection("add")},indentLess:function(am){am.indentSelection("subtract")},insertTab:function(am){am.replaceSelection("\t","end")},transposeChars:function(am){var ao=am.getCursor(),an=am.getLine(ao.line);if(ao.ch>0&&ao.ch<an.length-1){am.replaceRange(an.charAt(ao.ch)+an.charAt(ao.ch-1),{line:ao.line,ch:ao.ch-1},{line:ao.line,ch:ao.ch+1})}},newlineAndIndent:function(am){am.replaceSelection("\n","end");am.indentLine(am.getCursor().line)},toggleOverwrite:function(am){am.toggleOverwrite()}};var v=u.keyMap={};v.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharRight",Backspace:"delCharLeft",Tab:"insertTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite"};v.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Alt-Up":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Down":"goDocEnd","Ctrl-Left":"goWordLeft","Ctrl-Right":"goWordRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delWordLeft","Ctrl-Delete":"delWordRight","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore",fallthrough:"basic"};v.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goWordLeft","Alt-Right":"goWordRight","Cmd-Left":"goLineStart","Cmd-Right":"goLineEnd","Alt-Backspace":"delWordLeft","Ctrl-Alt-Backspace":"delWordRight","Alt-Delete":"delWordRight","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore",fallthrough:["basic","emacsy"]};v["default"]=M?v.macDefault:v.pcDefault;v.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageUp","Shift-Ctrl-V":"goPageDown","Ctrl-D":"delCharRight","Ctrl-H":"delCharLeft","Alt-D":"delWordRight","Alt-Backspace":"delWordLeft","Ctrl-K":"killLine","Ctrl-T":"transposeChars"};function c(am){if(typeof am=="string"){return v[am]}else{return am}}function l(an,am,ar,ap,ao){function aq(ax){ax=c(ax);var av=ax[an];if(av!=null&&ap(av)){return true}if(ax.nofallthrough){if(ao){ao()}return true}var au=ax.fallthrough;if(au==null){return false}if(Object.prototype.toString.call(au)!="[object Array]"){return aq(au)}for(var at=0,aw=au.length;at<aw;++at){if(aq(au[at])){return true}}return false}if(am&&aq(am)){return true}return aq(ar)}function Q(an){var am=R[y(an,"keyCode")];return am=="Ctrl"||am=="Alt"||am=="Shift"||am=="Mod"}u.fromTextArea=function(an,ap){if(!ap){ap={}}ap.value=an.value;if(!ap.tabindex&&an.tabindex){ap.tabindex=an.tabindex}if(ap.autofocus==null&&an.getAttribute("autofocus")!=null){ap.autofocus=true}function ar(){an.value=am.getValue()}if(an.form){var aq=r(an.form,"submit",ar,true);if(typeof an.form.submit=="function"){var ao=an.form.submit;function at(){ar();an.form.submit=ao;an.form.submit();an.form.submit=at}an.form.submit=at}}an.style.display="none";var am=u(function(au){an.parentNode.insertBefore(au,an.nextSibling)},ap);am.save=ar;am.getTextArea=function(){return an};am.toTextArea=function(){ar();an.parentNode.removeChild(am.getWrapperElement());an.style.display="";if(an.form){aq();if(typeof an.form.submit=="function"){an.form.submit=ao}}};return am};function p(ap,am){if(am===true){return am}if(ap.copyState){return ap.copyState(am)}var ao={};for(var aq in am){var an=am[aq];if(an instanceof Array){an=an.concat([])}ao[aq]=an}return ao}u.copyState=p;function V(ao,an,am){return ao.startState?ao.startState(an,am):true}u.startState=V;function b(am,an){this.pos=this.start=0;this.string=am;this.tabSize=an||8}b.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==0},peek:function(){return this.string.charAt(this.pos)},next:function(){if(this.pos<this.string.length){return this.string.charAt(this.pos++)}},eat:function(am){var ao=this.string.charAt(this.pos);if(typeof am=="string"){var an=ao==am}else{var an=ao&&(am.test?am.test(ao):am(ao))}if(an){++this.pos;return ao}},eatWhile:function(am){var an=this.pos;while(this.eat(am)){}return this.pos>an},eatSpace:function(){var am=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++this.pos}return this.pos>am},skipToEnd:function(){this.pos=this.string.length},skipTo:function(am){var an=this.string.indexOf(am,this.pos);if(an>-1){this.pos=an;return true}},backUp:function(am){this.pos-=am},column:function(){return n(this.string,this.start,this.tabSize)},indentation:function(){return n(this.string,null,this.tabSize)},match:function(ap,an,am){if(typeof ap=="string"){function aq(ar){return am?ar.toLowerCase():ar}if(aq(this.string).indexOf(aq(ap),this.pos)==this.pos){if(an!==false){this.pos+=ap.length}return true}}else{var ao=this.string.slice(this.pos).match(ap);if(ao&&an!==false){this.pos+=ao[0].length}return ao}},current:function(){return this.string.slice(this.start,this.pos)}};u.StringStream=b;function K(ap,ao,an,am){this.from=ap;this.to=ao;this.style=an;this.marker=am}K.prototype={attach:function(am){this.marker.set.push(am)},detach:function(an){var am=q(this.marker.set,an);if(am>-1){this.marker.set.splice(am,1)}},split:function(ap,am){if(this.to<=ap&&this.to!=null){return null}var ao=this.from<ap||this.from==null?null:this.from-ap+am;var an=this.to==null?null:this.to-ap+am;return new K(ao,an,this.style,this.marker)},dup:function(){return new K(null,null,this.style,this.marker)},clipTo:function(an,aq,am,ap,ao){if(an&&ap>this.from&&(ap<this.to||this.to==null)){this.from=null}else{if(this.from!=null&&this.from>=aq){this.from=Math.max(ap,this.from)+ao}}if(am&&(aq<this.to||this.to==null)&&(aq>this.from||this.from==null)){this.to=null}else{if(this.to!=null&&this.to>aq){this.to=ap<this.to?this.to+ao:aq}}},isDead:function(){return this.from!=null&&this.to!=null&&this.from>=this.to},sameSet:function(am){return this.marker==am.marker}};function G(am){this.from=am;this.to=am;this.line=null}G.prototype={attach:function(am){this.line=am},detach:function(am){if(this.line==am){this.line=null}},split:function(an,am){if(an<this.from){this.from=this.to=(this.from-an)+am;return this}},isDead:function(){return this.from>this.to},clipTo:function(an,aq,am,ap,ao){if((an||aq<this.from)&&(am||ap>this.to)){this.from=0;this.to=-1}else{if(this.from>aq){this.from=this.to=Math.max(ap,this.from)+ao}}},sameSet:function(am){return false},find:function(){if(!this.line||!this.line.parent){return null}return{line:Y(this.line),ch:this.from}},clear:function(){if(this.line){var am=q(this.line.marked,this);if(am!=-1){this.line.marked.splice(am,1)}this.line=null}}};function e(an,am){this.styles=am||[an,null];this.text=an;this.height=1;this.marked=this.gutterMarker=this.className=this.bgClassName=this.handlers=null;this.stateAfter=this.parent=this.hidden=null}e.inheritMarks=function(aq,au){var ap=new e(aq),am=au&&au.marked;if(am){for(var ao=0;ao<am.length;++ao){if(am[ao].to==null&&am[ao].style){var an=ap.marked||(ap.marked=[]),at=am[ao];var ar=at.dup();an.push(ar);ar.attach(ap)}}}return ap};e.prototype={replace:function(aq,ap,au){var av=[],ao=this.marked,ar=ap==null?this.text.length:ap;al(0,aq,this.styles,av);if(au){av.push(au,null)}al(ar,this.text.length,this.styles,av);this.styles=av;this.text=this.text.slice(0,aq)+au+this.text.slice(ar);this.stateAfter=null;if(ao){var at=au.length-(ar-aq);for(var an=0;an<ao.length;++an){var am=ao[an];am.clipTo(aq==null,aq||0,ap==null,ar,at);if(am.isDead()){am.detach(this);ao.splice(an--,1)}}}},split:function(au,ar){var ap=[ar,null],an=this.marked;al(au,this.text.length,this.styles,ap);var ao=new e(ar+this.text.slice(au),ap);if(an){for(var aq=0;aq<an.length;++aq){var at=an[aq];var am=at.split(au,ar.length);if(am){if(!ao.marked){ao.marked=[]}ao.marked.push(am);am.attach(ao);if(am==at){an.splice(aq--,1)}}}}return ao},append:function(an){var at=this.text.length,am=an.marked,aq=this.marked;this.text+=an.text;al(0,an.text.length,an.styles,this.styles);if(aq){for(var ar=0;ar<aq.length;++ar){if(aq[ar].to==null){aq[ar].to=at}}}if(am&&am.length){if(!aq){this.marked=aq=[]}outer:for(var ar=0;ar<am.length;++ar){var au=am[ar];if(!au.from){for(var ap=0;ap<aq.length;++ap){var ao=aq[ap];if(ao.to==at&&ao.sameSet(au)){ao.to=au.to==null?null:au.to+at;if(ao.isDead()){ao.detach(this);am.splice(ar--,1)}continue outer}}}aq.push(au);au.attach(this);au.from+=at;if(au.to!=null){au.to+=at}}}},fixMarkEnds:function(an){var am=this.marked,aq=an.marked;if(!am){return}for(var ap=0;ap<am.length;++ap){var at=am[ap],ar=at.to==null;if(ar&&aq){for(var ao=0;ao<aq.length;++ao){if(aq[ao].sameSet(at)){ar=false;break}}}if(ar){at.to=this.text.length}}},fixMarkStarts:function(){var am=this.marked;if(!am){return}for(var an=0;an<am.length;++an){if(am[an].from==null){am[an].from=0}}},addMark:function(am){am.attach(this);if(this.marked==null){this.marked=[]}this.marked.push(am);this.marked.sort(function(ao,an){return(ao.from||0)-(an.from||0)})},highlight:function(ar,an,at){var aw=new b(this.text,at),ax=this.styles,au=0;var aq=false,ao=ax[0],av;if(this.text==""&&ar.blankLine){ar.blankLine(an)}while(!aw.eol()){var am=ar.token(aw,an);var ap=this.text.slice(aw.start,aw.pos);aw.start=aw.pos;if(au&&ax[au-1]==am){ax[au-2]+=ap}else{if(ap){if(!aq&&(ax[au+1]!=am||(au&&ax[au-2]!=av))){aq=true}ax[au++]=ap;ax[au++]=am;av=ao;ao=ax[au]}}if(aw.pos>5000){ax[au++]=this.text.slice(aw.pos);ax[au++]=null;break}}if(ax.length!=au){ax.length=au;aq=true}if(au&&ax[au-2]!=av){aq=true}return aq||(ax.length<5&&this.text.length<10?null:false)},getTokenAt:function(ar,ap,ao){var am=this.text,aq=new b(am);while(aq.pos<ao&&!aq.eol()){aq.start=aq.pos;var an=ar.token(aq,ap)}return{start:aq.start,end:aq.pos,string:aq.current(),className:an||null,state:ap}},indentation:function(am){return n(this.text,null,am)},getHTML:function(aM,am,ao,aq){var ax=[],av=true,at=0;function aI(aY,aW){if(!aY){return}if(av&&I&&aY.charAt(0)==" "){aY="\u00a0"+aY.slice(1)}av=false;if(aY.indexOf("\t")==-1){at+=aY.length;var aX=P(aY)}else{var aX="";for(var aZ=0;;){var aU=aY.indexOf("\t",aZ);if(aU==-1){aX+=P(aY.slice(aZ));at+=aY.length-aZ;break}else{at+=aU-aZ;var aV=aM(at);aX+=P(aY.slice(aZ,aU))+aV.html;at+=aV.width;aZ=aU+1}}}if(aW){ax.push('<span class="',aW,'">',aX,"</span>")}else{ax.push(aX)}}var aL=aI;if(am!=null){var aG=0,aB='<span id="'+ao+'">';aL=function(aW,aV){var aU=aW.length;if(am>=aG&&am<aG+aU){if(am>aG){aI(aW.slice(0,am-aG),aV);if(aq){ax.push("<wbr>")}}ax.push(aB);aI(aW.slice(am-aG),aV);ax.push("</span>");am--;aG+=aU}else{aG+=aU;aI(aW,aV);if(aG==am&&aG==aQ){ax.push(aB+"</span>")}else{if(aG>am+10&&/\s/.test(aW)){aL=function(){}}}}}}var aF=this.styles,aw=this.text,aC=this.marked;var aQ=aw.length;function ar(aU){if(!aU){return null}return"cm-"+aU.replace(/ +/g," cm-")}if(!aw&&am==null){aL(" ")}else{if(!aC||!aC.length){for(var aN=0,ay=0;ay<aQ;aN+=2){var aE=aF[aN],aP=aF[aN+1],aH=aE.length;if(ay+aH>aQ){aE=aE.slice(0,aQ-ay)}ay+=aH;aL(aE,ar(aP))}}else{var au=0,aN=0,aA="",aP,aT=0;var aS=aC[0].from||0,aK=[],aR=0;function aO(){var aU;while(aR<aC.length&&((aU=aC[aR]).from==au||aU.from==null)){if(aU.style!=null){aK.push(aU)}++aR}aS=aR<aC.length?aC[aR].from:Infinity;for(var aV=0;aV<aK.length;++aV){var aW=aK[aV].to||Infinity;if(aW==au){aK.splice(aV--,1)}else{aS=Math.min(aW,aS)}}}var aD=0;while(au<aQ){if(aS==au){aO()}var az=Math.min(aQ,aS);while(true){if(aA){var ap=au+aA.length;var an=aP;for(var aJ=0;aJ<aK.length;++aJ){an=(an?an+" ":"")+aK[aJ].style}aL(ap>az?aA.slice(0,az-au):aA,an);if(ap>=az){aA=aA.slice(az-au);au=az;break}au=ap}aA=aF[aN++];aP=ar(aF[aN++])}}}}return ax.join("")},cleanUp:function(){this.parent=null;if(this.marked){for(var am=0,an=this.marked.length;am<an;++am){this.marked[am].detach(this)}}}};function al(at,au,am,av){for(var aq=0,ar=0,an=0;ar<au;aq+=2){var ao=am[aq],ap=ar+ao.length;if(an==0){if(ap>at){av.push(ao.slice(at-ar,Math.min(ao.length,au-ar)),am[aq+1])}if(ap>=at){an=1}}else{if(an==1){if(ap>au){av.push(ao.slice(0,au-ar),am[aq+1])}else{av.push(ao,am[aq+1])}}}ar=ap}}function ah(an){this.lines=an;this.parent=null;for(var ao=0,ap=an.length,am=0;ao<ap;++ao){an[ao].parent=this;am+=an[ao].height}this.height=am}ah.prototype={chunkSize:function(){return this.lines.length},remove:function(am,au,aq){for(var ap=am,ar=am+au;ap<ar;++ap){var an=this.lines[ap];this.height-=an.height;an.cleanUp();if(an.handlers){for(var ao=0;ao<an.handlers.length;++ao){aq.push(an.handlers[ao])}}}this.lines.splice(am,au)},collapse:function(am){am.splice.apply(am,[am.length,0].concat(this.lines))},insertHeight:function(an,ao,am){this.height+=am;if(I){this.lines=this.lines.slice(0,an).concat(ao).concat(this.lines.slice(an))}else{this.lines.splice.apply(this.lines,[an,0].concat(ao))}for(var ap=0,aq=ao.length;ap<aq;++ap){ao[ap].parent=this}},iterN:function(am,ap,ao){for(var an=am+ap;am<an;++am){if(ao(this.lines[am])){return true}}}};function i(ap){this.children=ap;var ao=0,am=0;for(var an=0,ar=ap.length;an<ar;++an){var aq=ap[an];ao+=aq.chunkSize();am+=aq.height;aq.parent=this}this.size=ao;this.height=am;this.parent=null}i.prototype={chunkSize:function(){return this.size},remove:function(ao,an,ar){this.size-=an;for(var ap=0;ap<this.children.length;++ap){var am=this.children[ap],au=am.chunkSize();if(ao<au){var aq=Math.min(an,au-ao),av=am.height;am.remove(ao,aq,ar);this.height-=av-am.height;if(au==aq){this.children.splice(ap--,1);am.parent=null}if((an-=aq)==0){break}ao=0}else{ao-=au}}if(this.size-an<25){var aw=[];this.collapse(aw);this.children=[new ah(aw)];this.children[0].parent=this}},collapse:function(am){for(var an=0,ao=this.children.length;an<ao;++an){this.children[an].collapse(am)}},insert:function(an,ao){var am=0;for(var ap=0,aq=ao.length;ap<aq;++ap){am+=ao[ap].height}this.insertHeight(an,ao,am)},insertHeight:function(an,aw,av){this.size+=aw.length;this.height+=av;for(var ao=0,aq=this.children.length;ao<aq;++ao){var am=this.children[ao],ar=am.chunkSize();if(an<=ar){am.insertHeight(an,aw,av);if(am.lines&&am.lines.length>50){while(am.lines.length>50){var ap=am.lines.splice(am.lines.length-25,25);var au=new ah(ap);am.height-=au.height;this.children.splice(ao+1,0,au);au.parent=this}this.maybeSpill()}break}an-=ar}},maybeSpill:function(){if(this.children.length<=10){return}var ap=this;do{var an=ap.children.splice(ap.children.length-5,5);var ao=new i(an);if(!ap.parent){var aq=new i(ap.children);aq.parent=ap;ap.children=[aq,ao];ap=aq}else{ap.size-=ao.size;ap.height-=ao.height;var am=q(ap.parent.children,ap);ap.parent.children.splice(am+1,0,ao)}ao.parent=ap.parent}while(ap.children.length>10);ap.parent.maybeSpill()},iter:function(ao,an,am){this.iterN(ao,an-ao,am)},iterN:function(am,av,au){for(var an=0,aq=this.children.length;an<aq;++an){var ar=this.children[an],ap=ar.chunkSize();if(am<ap){var ao=Math.min(av,ap-am);if(ar.iterN(am,ao,au)){return true}if((av-=ao)==0){break}am=0}else{am-=ap}}}};function C(am,aq){while(!am.lines){for(var an=0;;++an){var ap=am.children[an],ao=ap.chunkSize();if(aq<ao){am=ap;break}aq-=ao}}return am.lines[aq]}function Y(am){if(am.parent==null){return null}var ar=am.parent,aq=q(ar.lines,am);for(var an=ar.parent;an;ar=an,an=an.parent){for(var ao=0,ap=an.children.length;;++ao){if(an.children[ao]==ar){break}aq+=an.children[ao].chunkSize()}}return aq}function X(at,aq){var ao=0;outer:do{for(var ap=0,ar=at.children.length;ap<ar;++ap){var an=at.children[ap],am=an.height;if(aq<am){at=an;continue outer}aq-=am;ao+=an.chunkSize()}return ao}while(!at.lines);for(var ap=0,ar=at.lines.length;ap<ar;++ap){var av=at.lines[ap],au=av.height;if(aq<au){break}aq-=au}return ao+ap}function g(am,at){var ao=0;outer:do{for(var an=0,aq=am.children.length;an<aq;++an){var ar=am.children[an],ap=ar.chunkSize();if(at<ap){am=ar;continue outer}at-=ap;ao+=ar.height}return ao}while(!am.lines);for(var an=0;an<at;++an){ao+=am.lines[an].height}return ao}function k(){this.time=0;this.done=[];this.undone=[];this.compound=0;this.closed=false}k.prototype={addChange:function(am,ar,an){this.undone.length=0;var ao=+new Date,au=this.done[this.done.length-1],av=au&&au[au.length-1];var aq=ao-this.time;if(this.compound&&au&&!this.closed){au.push({start:am,added:ar,old:an})}else{if(aq>400||!av||this.closed||av.start>am+an.length||av.start+av.added<am){this.done.push([{start:am,added:ar,old:an}]);this.closed=false}else{var at=Math.max(0,av.start-am),aw=Math.max(0,(am+an.length)-(av.start+av.added));for(var ap=at;ap>0;--ap){av.old.unshift(an[ap-1])}for(var ap=aw;ap>0;--ap){av.old.push(an[an.length-ap])}if(at){av.start=am}av.added+=ar-(an.length-at-aw)}}this.time=ao},startCompound:function(){if(!this.compound++){this.closed=true}},endCompound:function(){if(!--this.compound){this.closed=true}}};function J(){w(this)}function O(am){if(!am.stop){am.stop=J}return am}function T(am){if(am.preventDefault){am.preventDefault()}else{am.returnValue=false}}function D(am){if(am.stopPropagation){am.stopPropagation()}else{am.cancelBubble=true}}function w(am){T(am);D(am)}u.e_stop=w;u.e_preventDefault=T;u.e_stopPropagation=D;function j(am){return am.target||am.srcElement}function x(am){if(am.which){return am.which}else{if(am.button&1){return 1}else{if(am.button&2){return 3}else{if(am.button&4){return 2}}}}}function y(an,ao){var am=an.override&&an.override.hasOwnProperty(ao);return am?an.override[ao]:an[ao]}function r(ap,ao,an,am){if(typeof ap.addEventListener=="function"){ap.addEventListener(ao,an,false);if(am){return function(){ap.removeEventListener(ao,an,false)}}}else{var aq=function(ar){an(ar||window.event)};ap.attachEvent("on"+ao,aq);if(am){return function(){ap.detachEvent("on"+ao,aq)}}}}u.connect=r;function z(){this.id=null}z.prototype={set:function(am,an){clearTimeout(this.id);this.id=setTimeout(an,am)}};var ab=u.Pass={toString:function(){return"CodeMirror.Pass"}};var N=/gecko\/\d{7}/i.test(navigator.userAgent);var I=/MSIE \d/.test(navigator.userAgent);var B=/MSIE [1-8]\b/.test(navigator.userAgent);var E=I&&document.documentMode==5;var f=/WebKit\//.test(navigator.userAgent);var af=/Chrome\//.test(navigator.userAgent);var h=/Apple Computer/.test(navigator.vendor);var m=/KHTML\//.test(navigator.userAgent);var F=function(){if(B){return false}var am=document.createElement("div");return"draggable" in am||"dragDrop" in am}();var d=function(){var am=document.createElement("textarea");am.value="foo\nbar";if(am.value.indexOf("\r")>-1){return"\r\n"}return"\n"}();var o=/^$/;if(N){o=/$'/}else{if(h){o=/\-[^ \-?]|\?[^ !'\"\),.\-\/:;\?\]\}]/}else{if(af){o=/\-[^ \-\.?]|\?[^ \-\.?\]\}:;!'\"\),\/]|[\.!\"#&%\)*+,:;=>\]|\}~][\(\{\[<]|\$'/}}}function n(an,am,ap){if(am==null){am=an.search(/[^\s\u00a0]/);if(am==-1){am=an.length}}for(var ao=0,aq=0;ao<am;++ao){if(an.charAt(ao)=="\t"){aq+=ap-(aq%ap)}else{++aq}}return aq}function t(am){if(am.currentStyle){return am.currentStyle}return window.getComputedStyle(am,null)}function ak(an,aw){var ap=an.ownerDocument.body;var av=0,au=0,ar=false;for(var am=an;am;am=am.offsetParent){var at=am.offsetLeft,ao=am.offsetTop;if(am==ap){av+=Math.abs(at);au+=Math.abs(ao)}else{av+=at,au+=ao}if(aw&&t(am).position=="fixed"){ar=true}}var aq=aw&&!ar?null:ap;for(var am=an.parentNode;am!=aq;am=am.parentNode){if(am.scrollLeft!=null){av-=am.scrollLeft;au-=am.scrollTop}}return{left:av,top:au}}if(document.documentElement.getBoundingClientRect!=null){ak=function(ap,am){try{var ao=ap.getBoundingClientRect();ao={top:ao.top,left:ao.left}}catch(aq){ao={top:0,left:0}}if(!am){if(window.pageYOffset==null){var an=document.documentElement||document.body.parentNode;if(an.scrollTop==null){an=document.body}ao.top+=an.scrollTop;ao.left+=an.scrollLeft}else{ao.top+=window.pageYOffset;ao.left+=window.pageXOffset}}return ao}}function H(am){return am.textContent||am.innerText||am.nodeValue||""}function a(am){if(s){am.selectionStart=0;am.selectionEnd=am.value.length}else{am.select()}}function ad(an,am){return an.line==am.line&&an.ch==am.ch}function Z(an,am){return an.line<am.line||(an.line==am.line&&an.ch<am.ch)}function aa(am){return{line:am.line,ch:am.ch}}var ai=document.createElement("pre");function P(am){ai.textContent=am;return ai.innerHTML}if(P("a")=="\na"){P=function(am){ai.textContent=am;return ai.innerHTML.slice(1)}}else{if(P("\t")!="\t"){P=function(am){ai.innerHTML="";ai.appendChild(document.createTextNode(am));return ai.innerHTML}}}u.htmlEscape=P;function W(ap,ao){if(!ao){return 0}if(!ap){return ao.length}for(var an=ap.length,am=ao.length;an>=0&&am>=0;--an,--am){if(ap.charAt(an)!=ao.charAt(am)){break}}return am+1}function q(ap,am){if(ap.indexOf){return ap.indexOf(am)}for(var an=0,ao=ap.length;an<ao;++an){if(ap[an]==am){return an}}return -1}function ag(am){return/\w/.test(am)||am.toUpperCase()!=am.toLowerCase()}var A="\n\nb".split(/\n/).length!=3?function(ao){var ap=0,an,am=[];while((an=ao.indexOf("\n",ap))>-1){am.push(ao.slice(ap,ao.charAt(an-1)=="\r"?an-1:an));ap=an+1}am.push(ao.slice(ap));return am}:function(am){return am.split(/\r?\n/)};u.splitLines=A;var ae=window.getSelection?function(an){try{return an.selectionStart!=an.selectionEnd}catch(am){return false}}:function(ao){try{var am=ao.ownerDocument.selection.createRange()}catch(an){}if(!am||am.parentElement()!=ao){return false}return am.compareEndPoints("StartToEnd",am)!=0};u.defineMode("null",function(){return{token:function(am){am.skipToEnd()}}});u.defineMIME("text/plain","null");var R={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",91:"Mod",92:"Mod",93:"Mod",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};u.keyNames=R;(function(){for(var am=0;am<10;am++){R[am+48]=String(am)}for(var am=65;am<=90;am++){R[am]=String.fromCharCode(am)}for(var am=1;am<=12;am++){R[am+111]=R[am+63235]="F"+am}})();return u})();CodeMirror.defineMode("javascript",function(I,M){var v=I.indentUnit;var Q=M.json;var b=function(){function W(Z){return{type:Z,style:"keyword"}}var T=W("keyword a"),Y=W("keyword b"),X=W("keyword c");var U=W("operator"),V={type:"atom",style:"atom"};return{"if":T,"while":T,"with":T,"else":Y,"do":Y,"try":Y,"finally":Y,"return":X,"break":X,"continue":X,"new":X,"delete":X,"throw":X,"var":W("var"),"const":W("var"),let:W("var"),"function":W("function"),"catch":W("catch"),"for":W("for"),"switch":W("switch"),"case":W("case"),"default":W("default"),"in":U,"typeof":U,"instanceof":U,"true":V,"false":V,"null":V,"undefined":V,"NaN":V,"Infinity":V}}();var N=/[+\-*&%=<>!?|]/;function R(V,U,T){U.tokenize=T;return T(V,U)}function h(W,T){var V=false,U;while((U=W.next())!=null){if(U==T&&!V){return false}V=!V&&U=="\\"}return V}var S,p;function B(V,U,T){S=V;p=T;return U}function l(X,V){var T=X.next();if(T=='"'||T=="'"){return R(X,V,z(T))}else{if(/[\[\]{}\(\),;\:\.]/.test(T)){return B(T)}else{if(T=="0"&&X.eat(/x/i)){X.eatWhile(/[\da-f]/i);return B("number","number")}else{if(/\d/.test(T)){X.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return B("number","number")}else{if(T=="/"){if(X.eat("*")){return R(X,V,f)}else{if(X.eat("/")){X.skipToEnd();return B("comment","comment")}else{if(V.reAllowed){h(X,"/");X.eatWhile(/[gimy]/);return B("regexp","string-2")}else{X.eatWhile(N);return B("operator",null,X.current())}}}}else{if(T=="#"){X.skipToEnd();return B("error","error")}else{if(N.test(T)){X.eatWhile(N);return B("operator",null,X.current())}else{X.eatWhile(/[\w\$_]/);var W=X.current(),U=b.propertyIsEnumerable(W)&&b[W];return(U&&V.kwAllowed)?B(U.type,U.style,W):B("variable","variable",W)}}}}}}}}function z(T){return function(V,U){if(!h(V,T)){U.tokenize=l}return B("string","string")}}function f(W,V){var T=false,U;while(U=W.next()){if(U=="/"&&T){V.tokenize=l;break}T=(U=="*")}return B("comment","comment")}var k={atom:true,number:true,variable:true,string:true,regexp:true};function t(Y,U,T,X,V,W){this.indented=Y;this.column=U;this.type=T;this.prev=V;this.info=W;if(X!=null){this.align=X}}function w(V,U){for(var T=V.localVars;T;T=T.next){if(T.name==U){return true}}}function E(X,U,T,W,Y){var Z=X.cc;u.state=X;u.stream=Y;u.marked=null,u.cc=Z;if(!X.lexical.hasOwnProperty("align")){X.lexical.align=true}while(true){var V=Z.length?Z.pop():Q?x:y;if(V(T,W)){while(Z.length&&Z[Z.length-1].lex){Z.pop()()}if(u.marked){return u.marked}if(T=="variable"&&w(X,W)){return"variable-2"}return U}}}var u={state:null,column:null,marked:null,cc:null};function a(){for(var T=arguments.length-1;T>=0;T--){u.cc.push(arguments[T])}}function G(){a.apply(null,arguments);return true}function m(U){var V=u.state;if(V.context){u.marked="def";for(var T=V.localVars;T;T=T.next){if(T.name==U){return}}V.localVars={name:U,next:V.localVars}}}var D={name:"this",next:{name:"arguments"}};function s(){if(!u.state.context){u.state.localVars=D}u.state.context={prev:u.state.context,vars:u.state.localVars}}function r(){u.state.localVars=u.state.context.vars;u.state.context=u.state.context.prev}function j(U,V){var T=function(){var W=u.state;W.lexical=new t(W.indented,u.stream.column(),U,null,W.lexical,V)};T.lex=true;return T}function F(){var T=u.state;if(T.lexical.prev){if(T.lexical.type==")"){T.indented=T.lexical.indented}T.lexical=T.lexical.prev}}F.lex=true;function c(U){return function T(V){if(V==U){return G()}else{if(U==";"){return a()}else{return G(arguments.callee)}}}}function y(T){if(T=="var"){return G(j("vardef"),J,c(";"),F)}if(T=="keyword a"){return G(j("form"),x,y,F)}if(T=="keyword b"){return G(j("form"),y,F)}if(T=="{"){return G(j("}"),n,F)}if(T==";"){return G()}if(T=="function"){return G(i)}if(T=="for"){return G(j("form"),c("("),j(")"),g,c(")"),F,y,F)}if(T=="variable"){return G(j("stat"),C)}if(T=="switch"){return G(j("form"),x,j("}","switch"),c("{"),n,F,F)}if(T=="case"){return G(x,c(":"))}if(T=="default"){return G(c(":"))}if(T=="catch"){return G(j("form"),s,c("("),q,c(")"),y,F,r)}return a(j("stat"),x,c(";"),F)}function x(T){if(k.hasOwnProperty(T)){return G(L)}if(T=="function"){return G(i)}if(T=="keyword c"){return G(A)}if(T=="("){return G(j(")"),A,c(")"),F,L)}if(T=="operator"){return G(x)}if(T=="["){return G(j("]"),O(x,"]"),F,L)}if(T=="{"){return G(j("}"),O(o,"}"),F,L)}return G()}function A(T){if(T.match(/[;\}\)\],]/)){return a()}return a(x)}function L(T,U){if(T=="operator"&&/\+\+|--/.test(U)){return G(L)}if(T=="operator"||T==":"){return G(x)}if(T==";"){return}if(T=="("){return G(j(")"),O(x,")"),F,L)}if(T=="."){return G(P,L)}if(T=="["){return G(j("]"),x,c("]"),F,L)}}function C(T){if(T==":"){return G(F,y)}return a(L,c(";"),F)}function P(T){if(T=="variable"){u.marked="property";return G()}}function o(T){if(T=="variable"){u.marked="property"}if(k.hasOwnProperty(T)){return G(c(":"),x)}}function O(V,T){function U(X){if(X==","){return G(V,U)}if(X==T){return G()}return G(c(T))}return function W(X){if(X==T){return G()}else{return a(V,U)}}}function n(T){if(T=="}"){return G()}return a(y,n)}function J(T,U){if(T=="variable"){m(U);return G(H)}return G()}function H(T,U){if(U=="="){return G(x,H)}if(T==","){return G(J)}}function g(T){if(T=="var"){return G(J,e)}if(T==";"){return a(e)}if(T=="variable"){return G(K)}return a(e)}function K(T,U){if(U=="in"){return G(x)}return G(L,e)}function e(T,U){if(T==";"){return G(d)}if(U=="in"){return G(x)}return G(x,c(";"),d)}function d(T){if(T!=")"){G(x)}}function i(T,U){if(T=="variable"){m(U);return G(i)}if(T=="("){return G(j(")"),s,O(q,")"),F,y,r)}}function q(T,U){if(T=="variable"){m(U);return G()}}return{startState:function(T){return{tokenize:l,reAllowed:true,kwAllowed:true,cc:[],lexical:new t((T||0)-v,0,"block",false),localVars:M.localVars,context:M.localVars&&{vars:M.localVars},indented:0}},token:function(V,U){if(V.sol()){if(!U.lexical.hasOwnProperty("align")){U.lexical.align=false}U.indented=V.indentation()}if(V.eatSpace()){return null}var T=U.tokenize(V,U);if(S=="comment"){return T}U.reAllowed=!!(S=="operator"||S=="keyword c"||S.match(/^[\[{}\(,;:]$/));U.kwAllowed=S!=".";return E(U,T,S,p,V)},indent:function(Y,T){if(Y.tokenize!=l){return 0}var X=T&&T.charAt(0),V=Y.lexical;if(V.type=="stat"&&X=="}"){V=V.prev}var W=V.type,U=X==W;if(W=="vardef"){return V.indented+4}else{if(W=="form"&&X=="{"){return V.indented}else{if(W=="stat"||W=="form"){return V.indented+v}else{if(V.info=="switch"&&!U){return V.indented+(/^(?:case|default)\b/.test(T)?v:2*v)}else{if(V.align){return V.column+(U?0:1)}else{return V.indented+(U?0:v)}}}}}},electricChars:":{}"}});CodeMirror.defineMIME("text/javascript","javascript");CodeMirror.defineMIME("application/json",{name:"javascript",json:true});CodeMirror.defineMode("xml",function(y,k){var r=y.indentUnit;var x=k.htmlMode?{autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:false}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false};var a=k.alignCDATA;var f,g;function o(E,D){function B(G){D.tokenize=G;return G(E,D)}var C=E.next();if(C=="<"){if(E.eat("!")){if(E.eat("[")){if(E.match("CDATA[")){return B(w("atom","]]>"))}else{return null}}else{if(E.match("--")){return B(w("comment","-->"))}else{if(E.match("DOCTYPE",true,true)){E.eatWhile(/[\w\._\-]/);return B(z(1))}else{return null}}}}else{if(E.eat("?")){E.eatWhile(/[\w\._\-]/);D.tokenize=w("meta","?>");return"meta"}else{g=E.eat("/")?"closeTag":"openTag";E.eatSpace();f="";var F;while((F=E.eat(/[^\s\u00a0=<>\"\'\/?]/))){f+=F}D.tokenize=n;return"tag"}}}else{if(C=="&"){var A;if(E.eat("#")){if(E.eat("x")){A=E.eatWhile(/[a-fA-F\d]/)&&E.eat(";")}else{A=E.eatWhile(/[\d]/)&&E.eat(";")}}else{A=E.eatWhile(/[\w\.\-:]/)&&E.eat(";")}return A?"atom":"error"}else{E.eatWhile(/[^&<]/);return null}}}function n(C,B){var A=C.next();if(A==">"||(A=="/"&&C.eat(">"))){B.tokenize=o;g=A==">"?"endTag":"selfcloseTag";return"tag"}else{if(A=="="){g="equals";return null}else{if(/[\'\"]/.test(A)){B.tokenize=j(A);return B.tokenize(C,B)}else{C.eatWhile(/[^\s\u00a0=<>\"\'\/?]/);return"word"}}}}function j(A){return function(C,B){while(!C.eol()){if(C.next()==A){B.tokenize=n;break}}return"string"}}function w(B,A){return function(D,C){while(!D.eol()){if(D.match(A)){C.tokenize=o;break}D.next()}return B}}function z(A){return function(D,C){var B;while((B=D.next())!=null){if(B=="<"){C.tokenize=z(A+1);return C.tokenize(D,C)}else{if(B==">"){if(A==1){C.tokenize=o;break}else{C.tokenize=z(A-1);return C.tokenize(D,C)}}}}return"meta"}}var l,h;function b(){for(var A=arguments.length-1;A>=0;A--){l.cc.push(arguments[A])}}function e(){b.apply(null,arguments);return true}function i(A,C){var B=x.doNotIndent.hasOwnProperty(A)||(l.context&&l.context.noIndent);l.context={prev:l.context,tagName:A,indent:l.indented,startOfLine:C,noIndent:B}}function u(){if(l.context){l.context=l.context.prev}}function d(A){if(A=="openTag"){l.tagName=f;return e(m,c(l.startOfLine))}else{if(A=="closeTag"){var B=false;if(l.context){if(l.context.tagName!=f){if(x.implicitlyClosed.hasOwnProperty(l.context.tagName.toLowerCase())){u()}B=!l.context||l.context.tagName!=f}}else{B=true}if(B){h="error"}return e(s(B))}}return e()}function c(A){return function(B){if(B=="selfcloseTag"||(B=="endTag"&&x.autoSelfClosers.hasOwnProperty(l.tagName.toLowerCase()))){q(l.tagName.toLowerCase());return e()}if(B=="endTag"){q(l.tagName.toLowerCase());i(l.tagName,A);return e()}return e()}}function s(A){return function(B){if(A){h="error"}if(B=="endTag"){u();return e()}h="error";return e(arguments.callee)}}function q(B){var A;while(true){if(!l.context){return}A=l.context.tagName.toLowerCase();if(!x.contextGrabbers.hasOwnProperty(A)||!x.contextGrabbers[A].hasOwnProperty(B)){return}u()}}function m(A){if(A=="word"){h="attribute";return e(p,m)}if(A=="endTag"||A=="selfcloseTag"){return b()}h="error";return e(m)}function p(A){if(A=="equals"){return e(v,m)}if(!x.allowMissing){h="error"}return(A=="endTag"||A=="selfcloseTag")?b():e()}function v(A){if(A=="string"){return e(t)}if(A=="word"&&x.allowUnquoted){h="string";return e()}h="error";return(A=="endTag"||A=="selfCloseTag")?b():e()}function t(A){if(A=="string"){return e(t)}else{return b()}}return{startState:function(){return{tokenize:o,cc:[],indented:0,startOfLine:true,tagName:null,context:null}},token:function(D,C){if(D.sol()){C.startOfLine=true;C.indented=D.indentation()}if(D.eatSpace()){return null}h=g=f=null;var B=C.tokenize(D,C);C.type=g;if((B||g)&&B!="comment"){l=C;while(true){var A=C.cc.pop()||d;if(A(g||B)){break}}}C.startOfLine=false;return h||B},indent:function(D,A,C){var B=D.context;if((D.tokenize!=n&&D.tokenize!=o)||B&&B.noIndent){return C?C.match(/^(\s*)/)[0].length:0}if(a&&/<!\[CDATA\[/.test(A)){return 0}if(B&&/^<\//.test(A)){B=B.prev}while(B&&!B.startOfLine){B=B.prev}if(B){return B.indent+r}else{return 0}},compareStates:function(D,B){if(D.indented!=B.indented||D.tokenize!=B.tokenize){return false}for(var C=D.context,A=B.context;;C=C.prev,A=A.prev){if(!C||!A){return C==A}if(C.tagName!=A.tagName){return false}}},electricChars:"/"}});CodeMirror.defineMIME("application/xml","xml");if(!CodeMirror.mimeModes.hasOwnProperty("text/html")){CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:true})}CodeMirror.defineMode("markdown",function(B,m){var i=CodeMirror.getMode(B,{name:"xml",htmlMode:true});var y="header",d="comment",A="quote",z="string",E="hr",s="link",D="string",g="em",j="strong",w="emstrong";var F=/^([*\-=_])(?:\s*\1){2,}\s*$/,p=/^[*\-+]\s+/,u=/^[0-9]+\.\s+/,n=/^(?:\={3,}|-{3,})$/,f=/^[^\[*_\\<>`]+/;function e(I,H,G){H.f=H.inline=G;return G(I,H)}function r(I,H,G){H.f=H.block=G;return G(I,H)}function o(G){G.em=false;G.strong=false;return null}function l(I,H){var G;if(H.indentationDiff>=4){H.indentation-=H.indentationDiff;I.skipToEnd();return d}else{if(I.eatSpace()){return null}else{if(I.peek()==="#"||I.match(n)){H.header=true}else{if(I.eat(">")){H.indentation++;H.quote=true}else{if(I.peek()==="["){return e(I,H,k)}else{if(I.match(F,true)){return E}else{if(G=I.match(p,true)||I.match(u,true)){H.indentation+=G[0].length;return z}}}}}}}return e(I,H,H.inline)}function x(I,H){var G=i.token(I,H.htmlState);if(G==="tag"&&H.htmlState.type!=="openTag"&&!H.htmlState.context){H.f=q;H.block=l}return G}function t(H){var G=[];if(H.strong){G.push(H.em?w:j)}else{if(H.em){G.push(g)}}if(H.header){G.push(y)}if(H.quote){G.push(A)}return G.length?G.join(" "):null}function b(H,G){if(H.match(f,true)){return t(G)}return undefined}function q(K,J){var I=J.text(K,J);if(typeof I!=="undefined"){return I}var H=K.next();if(H==="\\"){K.next();return t(J)}if(H==="`"){return e(K,J,v(d,"`"))}if(H==="["){return e(K,J,C)}if(H==="<"&&K.match(/^\w/,false)){K.backUp(1);return r(K,J,x)}var G=t(J);if(H==="*"||H==="_"){if(K.eat(H)){return(J.strong=!J.strong)?t(J):G}return(J.em=!J.em)?t(J):G}return t(J)}function C(I,H){while(!I.eol()){var G=I.next();if(G==="\\"){I.next()}if(G==="]"){H.inline=H.f=h;return s}}return s}function h(I,H){I.eatSpace();var G=I.next();if(G==="("||G==="["){return e(I,H,v(D,G==="("?")":"]"))}return"error"}function k(H,G){if(H.match(/^[^\]]*\]:/,true)){G.f=a;return s}return e(H,G,q)}function a(H,G){H.eatSpace();H.match(/^[^\s]+/,true);G.f=G.inline=q;return D}function c(G){if(!c[G]){c[G]=new RegExp("^(?:[^\\\\\\"+G+"]|\\\\.)*(?:\\"+G+"|$)")}return c[G]}function v(H,I,G){G=G||q;return function(K,J){K.match(c(I));J.inline=J.f=G;return H}}return{startState:function(){return{f:l,block:l,htmlState:i.startState(),indentation:0,inline:q,text:b,em:false,strong:false,header:false,quote:false}},copyState:function(G){return{f:G.f,block:G.block,htmlState:CodeMirror.copyState(i,G.htmlState),indentation:G.indentation,inline:G.inline,text:G.text,em:G.em,strong:G.strong,header:G.header,quote:G.quote}},token:function(I,H){if(I.sol()){if(I.match(/^\s*$/,true)){return o(H)}H.header=false;H.quote=false;H.f=H.block;var G=I.match(/^\s*/,true)[0].replace(/\t/g," ").length;H.indentationDiff=G-H.indentation;H.indentation=G;if(G>0){return null}}return H.f(I,H)},blankLine:o,getType:t}},"xml");CodeMirror.defineMIME("text/x-markdown","markdown");Ext.define("Ext.AbstractPlugin",{disabled:false,constructor:function(b){if(!b.cmp&&Ext.global.console){Ext.global.console.warn("Attempted to attach a plugin ")}Ext.apply(this,b)},getCmp:function(){return this.cmp},init:Ext.emptyFn,destroy:Ext.emptyFn,enable:function(){this.disabled=false},disable:function(){this.disabled=true}});Ext.define("Ext.util.Sorter",{direction:"ASC",constructor:function(d){var c=this;Ext.apply(c,d);if(c.property===undefined&&c.sorterFn===undefined){Ext.Error.raise("A Sorter requires either a property or a sorter function")}c.updateSortFunction()},createSortFunction:function(f){var j=this,i=j.property,h=j.direction||"ASC",g=h.toUpperCase()=="DESC"?-1:1;return function(a,b){return g*f.call(j,a,b)}},defaultSorterFn:function(k,l){var g=this,h=g.transform,i=g.getRoot(k)[g.property],j=g.getRoot(l)[g.property];if(h){i=h(i);j=h(j)}return i>j?1:(i<j?-1:0)},getRoot:function(b){return this.root===undefined?b:b[this.root]},setDirection:function(c){var d=this;d.direction=c;d.updateSortFunction()},toggle:function(){var b=this;b.direction=Ext.String.toggle(b.direction,"ASC","DESC");b.updateSortFunction()},updateSortFunction:function(d){var c=this;d=d||c.sorterFn||c.defaultSorterFn;c.sort=c.createSortFunction(d)}});Ext.define("Docs.History",{singleton:true,init:function(){Ext.util.History.useTopWindow=false;Ext.util.History.init(function(){this.historyLoaded=true;this.initialNavigate()},this);Ext.util.History.on("change",function(b){this.navigate(b,true)},this)},notifyTabsLoaded:function(){this.tabsLoaded=true;this.initialNavigate()},initialNavigate:function(){if(this.tabsLoaded&&this.historyLoaded){this.navigate(Ext.util.History.getToken(),true)}},navigate:function(e,g){var f=this.parseToken(e);if(f.url=="#!/api"){Docs.App.getController("Classes").loadIndex(g)}else{if(f.type==="api"){Docs.App.getController("Classes").loadClass(f.url,g)}else{if(f.url==="#!/guide"){Docs.App.getController("Guides").loadIndex(g)}else{if(f.type==="guide"){Docs.App.getController("Guides").loadGuide(f.url,g)}else{if(f.url==="#!/video"){Docs.App.getController("Videos").loadIndex(g)}else{if(f.type==="video"){Docs.App.getController("Videos").loadVideo(f.url,g)}else{if(f.url==="#!/example"){Docs.App.getController("Examples").loadIndex()}else{if(f.type==="example"){Docs.App.getController("Examples").loadExample(f.url,g)}else{if(f.url==="#!/stats"){Docs.App.getController("Stats").loadIndex()}else{if(f.url==="#!/comment"){Docs.App.getController("Comments").loadIndex()}else{if(f.url==="#!/tests"){Docs.App.getController("Tests").loadIndex()}else{if(Docs.App.getController("Welcome").isActive()){Docs.App.getController("Welcome").loadIndex(g)}else{if(!this.noRepeatNav){this.noRepeatNav=true;var h=Ext.getCmp("doctabs").staticTabs[0];if(h){this.navigate(h.href,g)}}}}}}}}}}}}}}},parseToken:function(d){var c=d&&d.match(/!?(\/(api|guide|example|video|stats|comment|tests)(\/(.*))?)/);return c?{type:c[2],url:"#!"+c[1]}:{}},push:function(e,f){e=this.cleanUrl(e);if(!/^#!?/.test(e)){e="#!"+e}var d=Ext.util.History.getToken()||"";if("#"+d.replace(/^%21/,"!")!==e){Ext.util.History.add(e)}},cleanUrl:function(b){return b.replace(/^[^#]*#/,"#")}});Ext.define("Docs.ContentGrabber",{singleton:true,get:function(f){var e;var d=Ext.get(f);if(d){e=d.dom.innerHTML;d.remove()}return e}});Ext.define("Docs.view.auth.LoginHelper",{singleton:true,loginTplHtml:['<form class="loginForm">','<input class="username" type="text" name="username" placeholder="Username" />','<input class="password" type="password" name="password" placeholder="Password" />','<label><input type="checkbox" name="remember" /> Remember Me</label>','<input class="submit" type="submit" value="Sign in" />'," or ",'<a class="register" href="http://www.sencha.com/forum/register.php" target="_blank">Register</a>',"</form>"],renderToHeader:function(c){var d=Ext.create("Ext.Template",this.loginTplHtml.join(""));d.overwrite(c,{});this.bindSubmit(c)},renderToComments:function(c){if(Ext.isIE&&Ext.ieVersion<=7){var d=Ext.create("Ext.XTemplate",'<div class="new-comment">','<span class="toggleNewComment"><span></span>Sorry, ',"adding comments is not supported in IE 7 or earlier</span>","</div>")}else{var d=Ext.create("Ext.XTemplate",'<div class="new-comment">','<span class="toggleNewComment"><span></span>Sign in to post a comment:</span>',this.loginTplHtml.join(""),"</div>")}d.overwrite(c,{});this.bindSubmit(c)},bindSubmit:function(b){Ext.get(b).down("form").on("submit",this.submitLogin,this,{preventDefault:true})},submitLogin:function(o,i){var p=Ext.get(i);var k=p.down("input[name=username]").getValue();var j=p.down("input[name=password]").getValue();var m=p.down("input[name=remember]");var n=p.down("input[type=submit]");var l=m?Boolean(m.getAttribute("checked")):false;Docs.App.getController("Auth").login(k,j,l,n)}});Ext.define("Docs.view.Scrolling",{onClassMixedIn:function(b){Ext.Function.interceptBefore(b.prototype,"initComponent",this.prototype.initScrolling)},initScrolling:function(){this.scrollContext="index";this.scrollState={};this.on("afterrender",function(){this.getScrollEl().addListener("scroll",this.saveScrollState,this)},this)},setScrollContext:function(b){this.scrollContext=b},eraseScrollContext:function(b){delete this.scrollState[b]},saveScrollState:function(){this.scrollState[this.scrollContext]=this.getScrollTop()},restoreScrollState:function(){this.setScrollTop(this.scrollState[this.scrollContext]||0)},scrollToView:function(d,c){d=Ext.get(d);c=c||{};if(d){this.setScrollTop(this.getScrollTop()+d.getY()+(c.offset||0));c.highlight&&d.highlight()}},getScrollTop:function(){return this.getScrollEl().getScroll()["top"]},setScrollTop:function(b){return this.getScrollEl().scrollTo("top",b)},scrollToTop:function(){this.getScrollEl().scrollTo("top")},getScrollEl:function(){return this.body||this.el}});Ext.define("Docs.view.examples.Device",{config:{url:"",id:undefined,device:"phone",orientation:"landscape"},constructor:function(b){this.initConfig(b);Ext.apply(this,this.getIframeSize());this.id=this.id||Ext.id();if(Ext.isWebKit){this.tpl=new Ext.XTemplate('<div class="touchExample {device} {orientation}">','<iframe id={id} style="width: {width}; height: {height}; border: 0;" ','src="{[this.deviceUrl(values)]}"></iframe>',"</div>",{deviceUrl:function(a){return a.url+"?deviceType="+(a.device==="tablet"?"Tablet":"Phone")}})}else{this.tpl=new Ext.XTemplate('<div class="touchExample {device} {orientation}">','<div id={id} class="wrong-browser" style="width: {width}; height: {height};">','<div style="padding: 20px;">Sencha Touch only functions on WebKit based browsers. <br /><br />Please use Google Chrome or Safari to see live examples.</div>',"</div>","</div>")}},toHtml:function(){return this.tpl.apply(this)},setDevice:function(b){this.device=b;Ext.apply(this,this.getIframeSize())},setOrientation:function(b){this.orientation=b;Ext.apply(this,this.getIframeSize())},getIframeSize:function(){var b={phone:{width:"481px",height:"320px"},miniphone:{width:"320px",height:"219px"},tablet:{width:"717px",height:"538px"}}[this.device];if(this.orientation==="landscape"){return b}else{return{width:b.height,height:b.width}}}});Ext.define("Ext.form.field.VTypes",(function(){var h=/^[a-zA-Z_]+$/,g=/^[a-zA-Z0-9_]+$/,e=/^(\w+)([\-+.][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/,f=/(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return{singleton:true,alternateClassName:"Ext.form.VTypes",email:function(a){return e.test(a)},emailText:'This field should be an e-mail address in the format "user@example.com"',emailMask:/[a-z0-9_\.\-@\+]/i,url:function(a){return f.test(a)},urlText:'This field should be a URL in the format "http://www.example.com"',alpha:function(a){return h.test(a)},alphaText:"This field should only contain letters and _",alphaMask:/[a-z_]/i,alphanum:function(a){return g.test(a)},alphanumText:"This field should only contain letters, numbers and _",alphanumMask:/[a-z0-9_]/i}}()));Ext.define("Ext.util.Observable",{requires:["Ext.util.Event"],statics:{releaseCapture:function(b){b.fireEvent=this.prototype.fireEvent},capture:function(f,d,e){f.fireEvent=Ext.Function.createInterceptor(f.fireEvent,d,e)},observe:function(d,c){if(d){if(!d.isObservable){Ext.applyIf(d,new this());this.capture(d.prototype,d.fireEvent,d)}if(Ext.isObject(c)){d.on(c)}}return d},prepareClass:function(d){if(!d.HasListeners){var f=function(){},e=d.superclass.HasListeners||this.HasListeners;d.prototype.HasListeners=d.HasListeners=f;f.prototype=d.hasListeners=new e()}}},isObservable:true,constructor:function(d){var c=this;Ext.apply(c,d);if(!c.hasListeners){c.hasListeners=new c.HasListeners()}c.events=c.events||{};if(c.listeners){c.on(c.listeners);c.listeners=null}if(c.bubbleEvents){c.enableBubble(c.bubbleEvents)}},onClassExtended:function(b){if(!b.HasListeners){Ext.util.Observable.prepareClass(b)}},onClassMixedIn:function(b){if(!b.HasListeners){this.prepareClass(b);b.onExtended(this.prepareClass,this)}},eventOptionsRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|element|vertical|horizontal|freezeEvent)$/,addManagedListener:function(k,o,m,n,p){var l=this,j=l.managedListeners=l.managedListeners||[],i;if(typeof o!=="string"){p=o;for(o in p){if(p.hasOwnProperty(o)){i=p[o];if(!l.eventOptionsRe.test(o)){l.addManagedListener(k,o,i.fn||i,i.scope||p.scope,i.fn?i:p)}}}}else{j.push({item:k,ename:o,fn:m,scope:n,options:p});k.on(o,m,n,p)}},removeManagedListener:function(m,r,o,l){var p=this,i,s,n,t,q;if(typeof r!=="string"){i=r;for(r in i){if(i.hasOwnProperty(r)){s=i[r];if(!p.eventOptionsRe.test(r)){p.removeManagedListener(m,r,s.fn||s,s.scope||i.scope)}}}}n=p.managedListeners?p.managedListeners.slice():[];for(q=0,t=n.length;q<t;q++){p.removeManagedListenerItem(false,n[q],m,r,o,l)}},fireEvent:function(g){g=g.toLowerCase();var h=this,j=h.events,i=j&&j[g],f=true;if(i&&h.hasListeners[g]){f=h.continueFireEvent(g,Ext.Array.slice(arguments,1),i.bubble)}return f},continueFireEvent:function(n,l,h){var j=this,i,k,m=true;do{if(j.eventsSuspended){if((i=j.eventQueue)){i.push([n,l,h])}return m}else{k=j.events[n];if(k&&k!=true){if((m=k.fire.apply(k,l))===false){break}}}}while(h&&(j=j.getBubbleParent()));return m},getBubbleParent:function(){var c=this,d=c.getBubbleTarget&&c.getBubbleTarget();if(d&&d.isObservable){return d}return null},addListener:function(o,m,n,p){var k=this,i,l,j;if(typeof o!=="string"){p=o;for(o in p){if(p.hasOwnProperty(o)){i=p[o];if(!k.eventOptionsRe.test(o)){k.addListener(o,i.fn||i,i.scope||p.scope,i.fn?i:p)}}}}else{o=o.toLowerCase();k.events[o]=k.events[o]||true;l=k.events[o]||true;if(Ext.isBoolean(l)){k.events[o]=l=new Ext.util.Event(k,o)}if(typeof m==="string"){if(!(n[m]||k[m])){Ext.Error.raise('No method named "'+m+'"')}m=n[m]||k[m]}l.addListener(m,n,Ext.isObject(p)?p:{});j=k.hasListeners;if(j.hasOwnProperty(o)){++j[o]}else{j[o]=1}}},removeListener:function(n,l,m){var j=this,h,k,i;if(typeof n!=="string"){i=n;for(n in i){if(i.hasOwnProperty(n)){h=i[n];if(!j.eventOptionsRe.test(n)){j.removeListener(n,h.fn||h,h.scope||i.scope)}}}}else{n=n.toLowerCase();k=j.events[n];if(k&&k.isEvent){k.removeListener(l,m);if(!--j.hasListeners[n]){delete j.hasListeners[n]}}}},clearListeners:function(){var d=this.events,f,e;for(e in d){if(d.hasOwnProperty(e)){f=d[e];if(f.isEvent){f.clearListeners()}}}this.clearManagedListeners()},purgeListeners:function(){if(Ext.global.console){Ext.global.console.warn("Observable: purgeListeners has been deprecated. Please use clearListeners.")}return this.clearListeners.apply(this,arguments)},clearManagedListeners:function(){var d=this.managedListeners||[],f=0,e=d.length;for(;f<e;f++){this.removeManagedListenerItem(true,d[f])}this.managedListeners=[]},removeManagedListenerItem:function(g,h,i,l,j,k){if(g||(h.item===i&&h.ename===l&&(!j||h.fn===j)&&(!k||h.scope===k))){h.item.un(h.ename,h.fn,h.scope);if(!g){Ext.Array.remove(this.managedListeners,h)}}},purgeManagedListeners:function(){if(Ext.global.console){Ext.global.console.warn("Observable: purgeManagedListeners has been deprecated. Please use clearManagedListeners.")}return this.clearManagedListeners.apply(this,arguments)},addEvents:function(i){var j=this,k=j.events||(j.events={}),h,g,l;if(typeof i=="string"){for(g=arguments,l=g.length;l--;){h=g[l];if(!k[h]){k[h]=true}}}else{Ext.applyIf(j.events,i)}},hasListener:function(b){return !!this.hasListeners[b.toLowerCase()]},suspendEvents:function(b){this.eventsSuspended=true;if(b&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var f=this,g=f.eventQueue,h,e;f.eventsSuspended=false;delete f.eventQueue;if(g){h=g.length;for(e=0;e<h;e++){f.continueFireEvent.apply(f,g[e])}}},relayEvents:function(p,n,k){k=k||"";var l=this,j=n.length,o=0,m,i;for(;o<j;o++){m=n[o];i=k+m;l.events[i]=l.events[i]||true;p.on(m,l.createRelayer(i))}},createRelayer:function(e,d){var f=this;return function(){return f.fireEvent.apply(f,[e].concat(Array.prototype.slice.apply(arguments,d||[0,-1])))}},enableBubble:function(k){if(k){var m=this,l=(typeof k=="string")?arguments:k,n=l.length,p=m.events,i,o,j;for(j=0;j<n;++j){i=l[j].toLowerCase();o=p[i];if(!o||typeof o=="boolean"){p[i]=o=new Ext.util.Event(m,i)}m.hasListeners[i]=(m.hasListeners[i]||0)+1;o.bubble=true}}}},function(){var e=this,f=e.prototype,d=function(){};d.prototype={};f.HasListeners=e.HasListeners=d;e.createAlias({on:"addListener",un:"removeListener",mon:"addManagedListener",mun:"removeManagedListener"});e.observeClass=e.observe;Ext.apply(f,(function(){function a(b){var c=(this.methodEvents=this.methodEvents||{})[b],o,p,n,m=this,q;if(!c){this.methodEvents[b]=c={};c.originalFn=this[b];c.methodName=b;c.before=[];c.after=[];q=function(i,g,h){if((p=i.apply(g||m,h))!==undefined){if(typeof p=="object"){if(p.returnValue!==undefined){o=p.returnValue}else{o=p}n=!!p.cancel}else{if(p===false){n=true}else{o=p}}}};this[b]=function(){var j=Array.prototype.slice.call(arguments,0),g,i,h;o=p=undefined;n=false;for(i=0,h=c.before.length;i<h;i++){g=c.before[i];q(g.fn,g.scope,j);if(n){return o}}if((p=c.originalFn.apply(m,j))!==undefined){o=p}for(i=0,h=c.after.length;i<h;i++){g=c.after[i];q(g.fn,g.scope,j);if(n){return o}}return o}}return c}return{beforeMethod:function(b,c,h){a.call(this,b).before.push({fn:c,scope:h})},afterMethod:function(b,c,h){a.call(this,b).after.push({fn:c,scope:h})},removeMethodListener:function(b,i,m){var c=this.getMethodEvent(b),n,o;for(n=0,o=c.before.length;n<o;n++){if(c.before[n].fn==i&&c.before[n].scope==m){Ext.Array.erase(c.before,n,1);return}}for(n=0,o=c.after.length;n<o;n++){if(c.after[n].fn==i&&c.after[n].scope==m){Ext.Array.erase(c.after,n,1);return}}},toggleEventLogging:function(b){Ext.util.Observable[b?"capture":"releaseCapture"](this,function(c){if(Ext.isDefined(Ext.global.console)){Ext.global.console.log(c,arguments)}})}}}()))});Ext.define("Ext.util.KeyMap",{alternateClassName:"Ext.KeyMap",eventName:"keydown",constructor:function(d){var c=this;if((arguments.length!==1)||(typeof d==="string")||d.dom||d.tagName||d===document||d.isComponent){c.legacyConstructor.apply(c,arguments);return}Ext.apply(c,d);c.bindings=[];if(!c.target.isComponent){c.target=Ext.get(c.target)}if(c.binding){c.addBinding(c.binding)}else{if(d.key){c.addBinding(d)}}c.enable()},legacyConstructor:function(e,g,f){var h=this;Ext.apply(h,{target:Ext.get(e),eventName:f||h.eventName,bindings:[]});if(g){h.addBinding(g)}h.enable()},addBinding:function(l){var m=l.key,k=false,o,n,i,p,j;if(Ext.isArray(l)){for(p=0,j=l.length;p<j;p++){this.addBinding(l[p])}return}if(Ext.isString(m)){n=[];i=m.toUpperCase();for(p=0,j=i.length;p<j;++p){n.push(i.charCodeAt(p))}m=n;k=true}if(!Ext.isArray(m)){m=[m]}if(!k){for(p=0,j=m.length;p<j;++p){o=m[p];if(Ext.isString(o)){m[p]=o.toUpperCase().charCodeAt(0)}}}this.bindings.push(Ext.apply({keyCode:m},l))},handleKeyDown:function(i){var j=this,h,f,g;if(this.enabled){h=this.bindings;f=0;g=h.length;i=j.processEvent.apply(j||j.processEventScope,arguments);if(!i.getKey){return i}for(;f<g;++f){this.processBinding(h[f],i)}}},processEvent:function(b){return b},processBinding:function(o,t){if(this.checkModifiers(o,t)){var n=t.getKey(),l=o.fn||o.handler,i=o.scope||this,m=o.keyCode,s=o.defaultEventAction,r,p,q=new Ext.EventObjectImpl(t);for(r=0,p=m.length;r<p;++r){if(n===m[r]){if(l.call(i,n,t)!==true&&s){q[s]()}break}}}},checkModifiers:function(j,l){var m=["shift","ctrl","alt"],n=0,i=m.length,k,e;for(;n<i;++n){e=m[n];k=j[e];if(!(k===undefined||(k===l[e+"Key"]))){return false}}return true},on:function(h,m,n){var j,i,l,k;if(Ext.isObject(h)&&!Ext.isArray(h)){j=h.key;i=h.shift;l=h.ctrl;k=h.alt}else{j=h}this.addBinding({key:j,shift:i,ctrl:l,alt:k,fn:m,scope:n})},isEnabled:function(){return this.enabled},enable:function(){var b=this;if(!b.enabled){b.target.on(b.eventName,b.handleKeyDown,b);b.enabled=true}},disable:function(){var b=this;if(b.enabled){b.target.removeListener(b.eventName,b.handleKeyDown,b);b.enabled=false}},setDisabled:function(b){if(b){this.disable()}else{this.enable()}},destroy:function(c){var d=this;d.bindings=[];d.disable();if(c===true){d.target.isComponent?d.target.destroy():d.target.remove()}delete d.target}});Ext.define("Ext.util.Memento",(function(){function i(b,c,a,d){b[d?d+a:a]=c[a]}function j(b,c,a){delete b[a]}function h(b,c,a,d){var l=d?d+a:a,e=b[l];if(e||b.hasOwnProperty(l)){g(c,a,e)}}function g(b,a,c){if(Ext.isDefined(c)){b[a]=c}else{delete b[a]}}function f(m,a,b,e,d){if(a){if(Ext.isArray(e)){var c,n=e.length;for(c=0;c<n;c++){m(a,b,e[c],d)}}else{m(a,b,e,d)}}}return{data:null,target:null,constructor:function(a,b){if(a){this.target=a;if(b){this.capture(b)}}},capture:function(d,a,b){var c=this;f(i,c.data||(c.data={}),a||c.target,d,b)},remove:function(a){f(j,this.data,null,a)},restore:function(c,d,a,b){f(h,this.data,a||this.target,c,b);if(d!==false){this.remove(c)}},restoreAll:function(l,b){var d=this,e=b||this.target,c=d.data,a;for(a in c){if(c.hasOwnProperty(a)){g(e,a,c[a])}}if(l!==false){delete d.data}}}}()));Ext.define("Ext.util.KeyNav",{alternateClassName:"Ext.KeyNav",requires:["Ext.util.KeyMap"],statics:{keyOptions:{left:37,right:39,up:38,down:40,space:32,pageUp:33,pageDown:34,del:46,backspace:8,home:36,end:35,enter:13,esc:27,tab:9}},constructor:function(d){var c=this;if(arguments.length===2){c.legacyConstructor.apply(c,arguments);return}c.setConfig(d)},legacyConstructor:function(c,d){this.setConfig(Ext.apply({target:c},d))},setConfig:function(i){var n=this,p={target:i.target,eventName:n.getKeyEvent("forceKeyDown" in i?i.forceKeyDown:n.forceKeyDown,i.eventName)},m,j,k,o,l;if(n.map){n.map.destroy()}if(i.processEvent){p.processEvent=i.processEvent;p.processEventScope=i.processEventScope||n}m=n.map=new Ext.util.KeyMap(p);j=Ext.util.KeyNav.keyOptions;k=i.scope||n;for(o in j){if(j.hasOwnProperty(o)){if(l=i[o]){if(typeof l==="function"){l={handler:l,defaultAction:(i.defaultEventAction!==undefined)?i.defaultEventAction:n.defaultEventAction}}m.addBinding({key:j[o],handler:Ext.Function.bind(n.handleEvent,l.scope||k,l.handler||l.fn,true),defaultEventAction:(l.defaultEventAction!==undefined)?l.defaultAction:n.defaultEventAction})}}}m.disable();if(!i.disabled){m.enable()}},handleEvent:function(f,d,e){return e.call(this,d)},disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,eventName:"keypress",destroy:function(b){this.map.destroy(b);delete this.map},enable:function(){this.map.enable();this.disabled=false},disable:function(){this.map.disable();this.disabled=true},setDisabled:function(b){this.map.setDisabled(b);this.disabled=b},getKeyEvent:function(c,d){if(c||(Ext.EventManager.useKeyDown&&!d)){return"keydown"}else{return d||this.eventName}}});Ext.define("Ext.util.ElementContainer",{childEls:[],constructor:function(){var c=this,d;if(c.hasOwnProperty("childEls")){d=c.childEls;delete c.childEls;c.addChildEls.apply(c,d)}},destroy:function(){var j=this,k=j.getChildEls(),i,h,l,g;for(l=k.length;l--;){h=k[l];if(typeof h!="string"){h=h.name}i=j[h];if(i){j[h]=null;i.remove()}}},addChildEls:function(){var c=this,d=arguments;if(c.hasOwnProperty("childEls")){c.childEls.push.apply(c.childEls,d)}else{c.childEls=c.getChildEls().concat(Array.prototype.slice.call(d))}c.prune(c.childEls,false)},applyChildEls:function(q,r){var n=this,m=n.getChildEls(),k,i,o,p,l;k=(r||n.id)+"-";for(o=m.length;o--;){i=m[o];if(typeof i=="string"){l=q.getById(k+i)}else{if((p=i.select)){l=Ext.select(p,true,q.dom)}else{if((p=i.selectNode)){l=Ext.get(Ext.DomQuery.selectNode(p,q.dom))}else{l=q.getById(i.id||(k+i.itemId))}}i=i.name}n[i]=l}},getChildEls:function(){var c=this,d;if(c.hasOwnProperty("childEls")){return c.childEls}d=c.self;return d.$childEls||c.getClassChildEls(d)},getClassChildEls:function(p){var t=this,i=p.$childEls,r,y,A,u,q,v,B,z,x,w,s;if(!i){w=p.superclass;if(w){w=w.self;z=[w.$childEls||t.getClassChildEls(w)];s=w.prototype.mixins||{}}else{z=[];s={}}x=p.prototype;v=x.mixins;for(B in v){if(v.hasOwnProperty(B)&&!s.hasOwnProperty(B)){q=v[B].self;z.push(q.$childEls||t.getClassChildEls(q))}}z.push(x.hasOwnProperty("childEls")&&x.childEls);for(y=0,A=z.length;y<A;++y){r=z[y];if(r&&r.length){if(!i){i=r}else{if(!u){u=true;i=i.slice(0)}i.push.apply(i,r)}}}p.$childEls=i=(i?t.prune(i,!u):[])}return i},prune:function(j,h){var f=j.length,i={},g;while(f--){g=j[f];if(typeof g!="string"){g=g.name}if(!i[g]){i[g]=1}else{if(h){h=false;j=j.slice(0)}Ext.Array.erase(j,f,1)}}return j},removeChildEls:function(k){var l=this,i=l.getChildEls(),m=(l.childEls=[]),j,h,n;for(h=0,j=i.length;h<j;++h){n=i[h];if(!k(n)){m.push(n)}}}});Ext.define("Ext.util.Floating",{uses:["Ext.Layer","Ext.window.Window"],focusOnToFront:true,shadow:"sides",constructor:function(c){var d=this;d.el=new Ext.Layer(Ext.apply({hideMode:d.hideMode,hidden:d.hidden,shadow:(typeof d.shadow!="undefined")?d.shadow:"sides",shadowOffset:d.shadowOffset,constrain:false,shim:(d.shim===false)?false:undefined},d.floating),c);d.floating=true;d.registerWithOwnerCt()},registerWithOwnerCt:function(){var b=this;if(b.zIndexParent){b.zIndexParent.unregisterFloatingItem(b)}b.zIndexParent=b.up("[floating]");b.setFloatParent(b.ownerCt);delete b.ownerCt;if(b.zIndexParent){b.zIndexParent.registerFloatingItem(b)}else{Ext.WindowManager.register(b)}},setFloatParent:function(c){var d=this;if(d.floatParent){d.mun(d.floatParent,{hide:d.onFloatParentHide,show:d.onFloatParentShow,scope:d})}d.floatParent=c;if(c){d.mon(d.floatParent,{hide:d.onFloatParentHide,show:d.onFloatParentShow,scope:d})}if((d.constrain||d.constrainHeader)&&!d.constrainTo){d.constrainTo=c?c.getTargetEl():d.container}},onAfterFloatLayout:function(){this.syncShadow()},onFloatParentHide:function(){var b=this;if(b.hideOnParentHide!==false&&b.isVisible()){b.hide();b.showOnParentShow=true}},onFloatParentShow:function(){if(this.showOnParentShow){delete this.showOnParentShow;this.show()}},setZIndex:function(d){var c=this;c.el.setZIndex(d);d+=10;if(c.floatingItems){d=Math.floor(c.floatingItems.setBase(d)/100)*100+10000}return d},doConstrain:function(e){var h=this,f=h.getConstrainVector(e),g;if(f){g=h.getPosition();g[0]+=f[0];g[1]+=f[1];h.setPosition(g)}},getConstrainVector:function(d){var c=this;if(c.constrain||c.constrainHeader){d=d||(c.floatParent&&c.floatParent.getTargetEl())||c.container||c.el.getScopeParent();return(c.constrainHeader?c.header.el:c.el).getConstrainVector(d)}},alignTo:function(d,e,f){this.setPagePosition(this.el.getAlignToXY(d.el||d,e,f));return this},toFront:function(c){var d=this;if(d.zIndexParent&&d.bringParentToFront!==false){d.zIndexParent.toFront(true)}if(!Ext.isDefined(c)){c=!d.focusOnToFront}if(c){d.preventFocusOnActivate=true}if(d.zIndexManager.bringToFront(d)){if(!c){d.focus(false,true)}}delete d.preventFocusOnActivate;return d},setActive:function(d,f){var e=this;if(d){if(e.el.shadow&&!e.maximized){e.el.enableShadow(true)}if(e.modal&&!e.preventFocusOnActivate){e.focus(false,true)}e.fireEvent("activate",e)}else{if(e.isWindow&&(f&&f.isWindow)){e.el.disableShadow()}e.fireEvent("deactivate",e)}},toBack:function(){this.zIndexManager.sendToBack(this);return this},center:function(){var d=this,c;if(d.isVisible()){c=d.el.getAlignToXY(d.container,"c-c");d.setPagePosition(c)}else{d.needsCenter=true}return d},onFloatShow:function(){if(this.needsCenter){this.center()}delete this.needsCenter},syncShadow:function(){if(this.floating){this.el.sync(true)}},fitContainer:function(){var f=this.floatParent,e=f?f.getTargetEl():this.container,d=e.getViewSize(false);this.setSize(d)}});Ext.define("Ext.fx.CubicBezier",{singleton:true,cubicBezierAtTime:function(q,A,C,r,s,w){var v=3*A,t=3*(r-A)-v,D=1-v-t,x=3*C,u=3*(s-C)-x,p=1-x-u;function y(a){return((D*a+t)*a+v)*a}function B(c,a){var b=z(c,a);return((p*b+u)*b+x)*b}function z(h,a){var b,c,e,g,d,f;for(e=h,f=0;f<8;f++){g=y(e)-h;if(Math.abs(g)<a){return e}d=(3*D*e+2*t)*e+v;if(Math.abs(d)<0.000001){break}e=e-g/d}b=0;c=1;e=h;if(e<b){return b}if(e>c){return c}while(b<c){g=y(e);if(Math.abs(g-h)<a){return e}if(h>g){b=e}else{c=e}e=(c-b)/2+b}return e}return B(q,1/(200*w))},cubicBezier:function(f,h,g,j){var i=function(a){return Ext.fx.CubicBezier.cubicBezierAtTime(a,f,h,g,j,1)};i.toCSS3=function(){return"cubic-bezier("+[f,h,g,j].join(",")+")"};i.reverse=function(){return Ext.fx.CubicBezier.cubicBezier(1-g,1-j,1-f,1-h)};return i}});Ext.define("Ext.util.Sortable",{isSortable:true,defaultSortDirection:"ASC",requires:["Ext.util.Sorter"],initSortable:function(){var d=this,c=d.sorters;d.sorters=new Ext.util.AbstractMixedCollection(false,function(a){return a.id||a.property});if(c){d.sorters.addAll(d.decodeSorters(c))}},sort:function(l,m,p,n){var o=this,k,i,j;if(Ext.isArray(l)){n=p;p=m;j=l}else{if(Ext.isObject(l)){n=p;p=m;j=[l]}else{if(Ext.isString(l)){k=o.sorters.get(l);if(!k){k={property:l,direction:m};j=[k]}else{if(m===undefined){k.toggle()}else{k.setDirection(m)}}}}}if(j&&j.length){j=o.decodeSorters(j);if(Ext.isString(p)){if(p==="prepend"){l=o.sorters.clone().items;o.sorters.clear();o.sorters.addAll(j);o.sorters.addAll(l)}else{o.sorters.addAll(j)}}else{o.sorters.clear();o.sorters.addAll(j)}}if(n!==false){o.onBeforeSort(j);l=o.sorters.items;if(l.length){o.doSort(o.generateComparator())}}return l},generateComparator:function(){var b=this.sorters.getRange();return b.length?this.createComparator(b):this.emptyComparator},createComparator:function(b){return function(i,j){var a=b[0].sort(i,j),g=b.length,h=1;for(;h<g;h++){a=a||b[h].sort.call(this,i,j)}return a}},emptyComparator:function(){return 0},onBeforeSort:Ext.emptyFn,decodeSorters:function(k){if(!Ext.isArray(k)){if(k===undefined){k=[]}else{k=[k]}}var m=k.length,j=Ext.util.Sorter,i=this.model?this.model.prototype.fields:null,l,h,n;for(n=0;n<m;n++){h=k[n];if(!(h instanceof j)){if(Ext.isString(h)){h={property:h}}Ext.applyIf(h,{root:this.sortRoot,direction:"ASC"});if(h.fn){h.sorterFn=h.fn}if(typeof h=="function"){h={sorterFn:h}}if(i&&!h.transform){l=i.get(h.property);h.transform=l?l.sortType:undefined}k[n]=new Ext.util.Sorter(h)}}return k},getSorters:function(){return this.sorters.items}});Ext.define("Ext.data.proxy.Proxy",{alias:"proxy.proxy",alternateClassName:["Ext.data.DataProxy","Ext.data.Proxy"],uses:["Ext.data.Batch","Ext.data.Operation","Ext.data.Model"],mixins:{observable:"Ext.util.Observable"},batchOrder:"create,update,destroy",batchActions:true,defaultReaderType:"json",defaultWriterType:"json",isProxy:true,constructor:function(b){b=b||{};if(b.model===undefined){delete b.model}Ext.apply(this,b);this.mixins.observable.constructor.call(this);if(this.model!==undefined&&!(this.model instanceof Ext.data.Model)){this.setModel(this.model)}},setModel:function(e,h){this.model=Ext.ModelManager.getModel(e);var f=this.reader,g=this.writer;this.setReader(f);this.setWriter(g);if(h&&this.store){this.store.setModel(this.model)}},getModel:function(){return this.model},setReader:function(d){var c=this;if(d===undefined||typeof d=="string"){d={type:d}}if(d.isReader){d.setModel(c.model)}else{Ext.applyIf(d,{proxy:c,model:c.model,type:c.defaultReaderType});d=Ext.createByAlias("reader."+d.type,d)}if(d.onMetaChange){d.onMetaChange=Ext.Function.createSequence(d.onMetaChange,this.onMetaChange,this)}c.reader=d;return c.reader},getReader:function(){return this.reader},onMetaChange:function(b){this.fireEvent("metachange",this,b)},setWriter:function(b){if(b===undefined||typeof b=="string"){b={type:b}}if(!(b instanceof Ext.data.writer.Writer)){Ext.applyIf(b,{model:this.model,type:this.defaultWriterType});b=Ext.createByAlias("writer."+b.type,b)}this.writer=b;return this.writer},getWriter:function(){return this.writer},create:Ext.emptyFn,read:Ext.emptyFn,update:Ext.emptyFn,destroy:Ext.emptyFn,batch:function(a,q){var r=this,s=r.batchActions,u,y,v,x,w,p,z,o,t;if(a.operations===undefined){a={operations:a,listeners:q}}if(a.batch){if(Ext.isDefined(a.batch.runOperation)){u=Ext.applyIf(a.batch,{proxy:r,listeners:{}})}}else{a.batch={proxy:r,listeners:a.listeners||{}}}if(!u){u=new Ext.data.Batch(a.batch)}u.on("complete",Ext.bind(r.onBatchComplete,r,[a],0));v=r.batchOrder.split(",");x=v.length;for(p=0;p<x;p++){w=v[p];y=a.operations[w];if(y){if(s){u.add(new Ext.data.Operation({action:w,records:y}))}else{o=y.length;for(z=0;z<o;z++){t=y[z];u.add(new Ext.data.Operation({action:w,records:[t]}))}}}}u.start();return u},onBatchComplete:function(e,d){var f=e.scope||this;if(d.hasException){if(Ext.isFunction(e.failure)){Ext.callback(e.failure,f,[d,e])}}else{if(Ext.isFunction(e.success)){Ext.callback(e.success,f,[d,e])}}if(Ext.isFunction(e.callback)){Ext.callback(e.callback,f,[d,e])}}},function(){Ext.data.DataProxy=this});Ext.define("Ext.data.Operation",{synchronous:true,action:undefined,filters:undefined,sorters:undefined,groupers:undefined,start:undefined,limit:undefined,batch:undefined,callback:undefined,scope:undefined,started:false,running:false,complete:false,success:undefined,exception:false,error:undefined,actionCommitRecordsRe:/^(?:create|update)$/i,actionSkipSyncRe:/^destroy$/i,constructor:function(b){Ext.apply(this,b||{})},commitRecords:function(h){var k=this,j,n,m,l,i;if(!k.actionSkipSyncRe.test(k.action)){m=k.records;if(m&&m.length){if(m.length>1){j=new Ext.util.MixedCollection();j.addAll(h);for(n=m.length;n--;){i=m[n];l=j.findBy(function(a){var b=i.getId();if(b&&a.getId()===b){return true}return a.internalId===i.internalId});k.updateClientRecord(i,l)}}else{i=m[0];l=h[0];if(l&&(i.phantom||i.getId()===l.getId())){k.updateClientRecord(i,l)}}if(k.actionCommitRecordsRe.test(k.action)){for(n=m.length;n--;){m[n].commit()}}}}},updateClientRecord:function(f,l){if(f&&l){f.beginEdit();var h=f.fields.items,i=h.length,j,k;for(k=0;k<i;k++){j=h[k];if(j.persist){f.set(j.name,l.get(j.name))}}if(f.phantom){f.setId(l.getId())}f.endEdit(true)}},setStarted:function(){this.started=true;this.running=true},setCompleted:function(){this.complete=true;this.running=false},setSuccessful:function(){this.success=true},setException:function(b){this.exception=true;this.success=false;this.running=false;this.error=b},hasException:function(){return this.exception===true},getError:function(){return this.error},getRecords:function(){var b=this.getResultSet();return this.records||(b?b.records:null)},getResultSet:function(){return this.resultSet},isStarted:function(){return this.started===true},isRunning:function(){return this.running===true},isComplete:function(){return this.complete===true},wasSuccessful:function(){return this.isComplete()&&this.success===true},setBatch:function(b){this.batch=b},allowWrite:function(){return this.action!="read"}});Ext.define("Ext.util.Filter",{anyMatch:false,exactMatch:false,caseSensitive:false,constructor:function(d){var c=this;Ext.apply(c,d);c.filter=c.filter||c.filterFn;if(c.filter===undefined){if(c.property===undefined||c.value===undefined){}else{c.filter=c.createFilterFn()}c.filterFn=c.filter}},createFilterFn:function(){var e=this,f=e.createValueMatcher(),d=e.property;return function(b){var a=e.getRoot.call(e,b)[d];return f===null?a===null:f.test(a)}},getRoot:function(c){var d=this.root;return d===undefined?c:c[d]},createValueMatcher:function(){var k=this,j=k.value,i=k.anyMatch,l=k.exactMatch,h=k.caseSensitive,g=Ext.String.escapeRegex;if(j===null){return j}if(!j.exec){j=String(j);if(i===true){j=g(j)}else{j="^"+g(j);if(l===true){j+="$"}}j=new RegExp(j,h?"":"i")}return j}});Ext.define("Ext.app.Controller",{mixins:{observable:"Ext.util.Observable"},onClassExtended:function(l,r,m){var n=Ext.getClassName(l),q=n.match(/^(.*)\.controller\./),s,o,k,t,p;if(q!==null){s=Ext.Loader.getPrefix(n)||q[1];o=m.onBeforeCreated;k=[];t=["model","view","store"];m.onBeforeCreated=function(i,f){var e,c,h,b,g,d,a;for(e=0,c=t.length;e<c;e++){h=t[e];b=Ext.Array.from(f[h+"s"]);for(g=0,d=b.length;g<d;g++){a=b[g];if(Ext.ClassManager.isCreated(a)){continue}p=Ext.Loader.getPrefix(a);if(p===""||p===a){k.push(s+"."+h+"."+a)}else{k.push(a)}}}Ext.require(k,Ext.Function.pass(o,arguments,this))}}},constructor:function(b){this.mixins.observable.constructor.call(this,b);Ext.apply(this,b||{});this.createGetters("model",this.models);this.createGetters("store",this.stores);this.createGetters("view",this.views);if(this.refs){this.ref(this.refs)}},init:function(b){},onLaunch:function(b){},createGetters:function(m,k){m=Ext.String.capitalize(m);var n=0,r=(k)?k.length:0,l,q,p,i,o;for(;n<r;n++){l="get";q=k[n];p=q.split(".");o=p.length;for(i=0;i<o;i++){l+=Ext.String.capitalize(p[i])}l+=m;if(!this[l]){this[l]=Ext.Function.pass(this["get"+m],[q],this)}this[l](q)}},ref:function(i){i=Ext.Array.from(i);var k=this,h=0,l=i.length,j,m,n;for(;h<l;h++){j=i[h];m=j.ref;n="get"+Ext.String.capitalize(m);if(!k[n]){k[n]=Ext.Function.pass(k.getRef,[m,j],k)}k.references=k.references||[];k.references.push(m.toLowerCase())}},addRef:function(b){return this.ref([b])},getRef:function(i,h,g){this.refCache=this.refCache||{};h=h||{};g=g||{};Ext.apply(h,g);if(h.forceCreate){return Ext.ComponentManager.create(h,"component")}var j=this,f=j.refCache[i];if(!f){j.refCache[i]=f=Ext.ComponentQuery.query(h.selector)[0];if(!f&&h.autoCreate){j.refCache[i]=f=Ext.ComponentManager.create(h,"component")}if(f){f.on("beforedestroy",function(){j.refCache[i]=null})}}return f},hasRef:function(b){return this.references&&this.references.indexOf(b.toLowerCase())!==-1},control:function(d,c){this.application.control(d,c,this)},getController:function(b){return this.application.getController(b)},getStore:function(b){return this.application.getStore(b)},getModel:function(b){return this.application.getModel(b)},getView:function(b){return this.application.getView(b)}});Ext.define("Docs.LocalStore",{storeName:"",init:function(){this.localStorage=!!window.localStorage;this.store=Ext.create(this.storeName);if(this.localStorage){this.cleanup();this.store.load();if(window.addEventListener){window.addEventListener("storage",Ext.Function.bind(this.onStorageChange,this),false)}else{window.attachEvent("onstorage",Ext.Function.bind(this.onStorageChange,this))}}},onStorageChange:function(b){b=b||window.event;if(b.key===this.store.getProxy().id){this.store.load()}},syncStore:function(){this.localStorage&&this.store.sync()},cleanup:function(){var f=/-settings/;for(var d=0;d<window.localStorage.length;d++){var e=window.localStorage.key(d);if(!f.test(e)){window.localStorage.removeItem(e)}}}});Ext.define("Docs.Syntax",{singleton:true,highlight:function(b){Ext.Array.forEach(Ext.query("pre",b.dom||b),function(a){a=Ext.get(a);if(a.child("code")){if(!(a.hasCls("inline-example")&&a.hasCls("preview"))){a.addCls("prettyprint")}}else{if(!a.parent(".CodeMirror")&&!a.hasCls("hierarchy")){a.addCls("notpretty")}}});prettyPrint()}});Ext.define("Ext.form.field.Field",{isFormField:true,disabled:false,submitValue:true,validateOnChange:true,suspendCheckChange:0,initField:function(){this.addEvents("change","validitychange","dirtychange");this.initValue()},initValue:function(){var b=this;b.originalValue=b.lastValue=b.value;b.suspendCheckChange++;b.setValue(b.value);b.suspendCheckChange--},getName:function(){return this.name},getValue:function(){return this.value},setValue:function(c){var d=this;d.value=c;d.checkChange();return d},isEqual:function(c,d){return String(c)===String(d)},isEqualAsString:function(c,d){return String(Ext.value(c,""))===String(Ext.value(d,""))},getSubmitData:function(){var d=this,c=null;if(!d.disabled&&d.submitValue&&!d.isFileUpload()){c={};c[d.getName()]=""+d.getValue()}return c},getModelData:function(){var d=this,c=null;if(!d.disabled&&!d.isFileUpload()){c={};c[d.getName()]=d.getValue()}return c},reset:function(){var b=this;b.setValue(b.originalValue);b.clearInvalid();delete b.wasValid},resetOriginalValue:function(){this.originalValue=this.getValue();this.checkDirty()},checkChange:function(){if(!this.suspendCheckChange){var f=this,d=f.getValue(),e=f.lastValue;if(!f.isEqual(d,e)&&!f.isDestroyed){f.lastValue=d;f.fireEvent("change",f,d,e);f.onChange(d,e)}}},onChange:function(c,d){if(this.validateOnChange){this.validate()}this.checkDirty()},isDirty:function(){var b=this;return !b.disabled&&!b.isEqual(b.getValue(),b.originalValue)},checkDirty:function(){var d=this,c=d.isDirty();if(c!==d.wasDirty){d.fireEvent("dirtychange",d,c);d.onDirtyChange(c);d.wasDirty=c}},onDirtyChange:Ext.emptyFn,getErrors:function(b){return[]},isValid:function(){var b=this;return b.disabled||Ext.isEmpty(b.getErrors())},validate:function(){var d=this,c=d.isValid();if(c!==d.wasValid){d.wasValid=c;d.fireEvent("validitychange",d,c)}return c},batchChanges:function(d){try{this.suspendCheckChange++;d()}catch(c){throw c}finally{this.suspendCheckChange--}this.checkChange()},isFileUpload:function(){return false},extractFileInput:function(){return null},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.util.TextMetrics",{statics:{shared:null,measure:function(g,i,h){var f=this,j=f.shared;if(!j){j=f.shared=new f(g,h)}j.bind(g);j.setFixedWidth(h||"auto");return j.getSize(i)},destroy:function(){var b=this;Ext.destroy(b.shared);b.shared=null}},constructor:function(e,f){var d=this.measure=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"textmetrics"});this.el=Ext.get(e);d.position("absolute");d.setLeftTop(-1000,-1000);d.hide();if(f){d.setWidth(f)}},getSize:function(f){var d=this.measure,e;d.update(f);e=d.getSize();d.update("");return e},bind:function(d){var c=this;c.el=Ext.get(d);c.measure.setStyle(c.el.getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"))},setFixedWidth:function(b){this.measure.setWidth(b)},getWidth:function(b){this.measure.dom.style.width="auto";return this.getSize(b).width},getHeight:function(b){return this.getSize(b).height},destroy:function(){var b=this;b.measure.remove();delete b.el;delete b.measure}},function(){Ext.Element.addMethods({getTextWidth:function(f,d,e){return Ext.Number.constrain(Ext.util.TextMetrics.measure(this.dom,Ext.value(f,this.dom.innerHTML,true)).width,d||0,e||1000000)}})});Ext.define("Ext.panel.Proxy",{alternateClassName:"Ext.dd.PanelProxy",moveOnDrag:true,constructor:function(e,d){var f=this;f.panel=e;f.id=f.panel.id+"-ddproxy";Ext.apply(f,d)},insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost.el},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){var b=this;if(b.ghost){if(b.proxy){b.proxy.remove();delete b.proxy}b.panel.unghost(null,b.moveOnDrag);delete b.ghost}},show:function(){var c=this,d;if(!c.ghost){d=c.panel.getSize();c.panel.el.setVisibilityMode(Ext.Element.DISPLAY);c.ghost=c.panel.ghost();if(c.insertProxy){c.proxy=c.panel.el.insertSibling({cls:Ext.baseCSSPrefix+"panel-dd-spacer"});c.proxy.setSize(d)}}},repair:function(d,f,e){this.hide();Ext.callback(f,e||this)},moveProxy:function(d,c){if(this.proxy){d.insertBefore(this.proxy.dom,c)}}});Ext.define("Ext.Template",{requires:["Ext.dom.Helper","Ext.util.Format"],inheritableStatics:{from:function(c,d){c=Ext.getDom(c);return new this(c.value||c.innerHTML,d||"")}},constructor:function(m){var k=this,h=arguments,i=[],n=0,l=h.length,j;k.initialConfig={};if(l>1){for(;n<l;n++){j=h[n];if(typeof j=="object"){Ext.apply(k.initialConfig,j);Ext.apply(k,j)}else{i.push(j)}}m=i.join("")}else{if(Ext.isArray(m)){i.push(m.join(""))}else{i.push(m)}}k.html=i.join("");if(k.compiled){k.compile()}},isTemplate:true,disableFormats:false,re:/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,apply:function(i){var j=this,m=j.disableFormats!==true,k=Ext.util.Format,n=j,h;if(j.compiled){return j.compiled(i).join("")}function l(d,b,a,c){if(a&&m){if(c){c=[i[b]].concat(Ext.functionFactory("return ["+c+"];")())}else{c=[i[b]]}if(a.substr(0,5)=="this."){return n[a.substr(5)].apply(n,c)}else{return k[a].apply(k,c)}}else{return i[b]!==undefined?i[b]:""}}h=j.html.replace(j.re,l);return h},applyOut:function(e,d){var f=this;if(f.compiled){d.push.apply(d,f.compiled(e))}else{d.push(f.apply(e))}return d},applyTemplate:function(){return this.apply.apply(this,arguments)},set:function(e,f){var d=this;d.html=e;d.compiled=null;return f?d.compile():d},compileARe:/\\/g,compileBRe:/(\r\n|\n)/g,compileCRe:/'/g,compile:function(){var me=this,fm=Ext.util.Format,useFormat=me.disableFormats!==true,body,bodyReturn;function fn(m,name,format,args){if(format&&useFormat){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format="this."+format.substr(5)+"("}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"',"+format+"values['"+name+"']"+args+") ,'"}bodyReturn=me.html.replace(me.compileARe,"\\\\").replace(me.compileBRe,"\\n").replace(me.compileCRe,"\\'").replace(me.re,fn);body="this.compiled = function(values){ return ['"+bodyReturn+"'];};";eval(body);return me},insertFirst:function(d,e,f){return this.doInsert("afterBegin",d,e,f)},insertBefore:function(d,e,f){return this.doInsert("beforeBegin",d,e,f)},insertAfter:function(d,e,f){return this.doInsert("afterEnd",d,e,f)},append:function(d,e,f){return this.doInsert("beforeEnd",d,e,f)},doInsert:function(f,i,g,h){var j=Ext.DomHelper.insertHtml(f,Ext.getDom(i),this.apply(g));return h?Ext.get(j):j},overwrite:function(h,f,g){var e=Ext.DomHelper.overwrite(Ext.getDom(h),this.apply(f));return g?Ext.get(e):e}});Ext.define("Ext.util.Animate",{uses:["Ext.fx.Manager","Ext.fx.Anim"],animate:function(d){var c=this;if(Ext.fx.Manager.hasFxBlock(c.id)){return c}Ext.fx.Manager.queueFx(new Ext.fx.Anim(c.anim(d)));return this},anim:function(d){if(!Ext.isObject(d)){return(d)?{}:false}var c=this;if(d.stopAnimation){c.stopAnimation()}Ext.applyIf(d,Ext.fx.Manager.getFxDefaults(c.id));return Ext.apply({target:c,paused:true},d)},stopFx:Ext.Function.alias(Ext.util.Animate,"stopAnimation"),stopAnimation:function(){Ext.fx.Manager.stopAnimation(this.id);return this},syncFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:true});return this},sequenceFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:false});return this},hasActiveFx:Ext.Function.alias(Ext.util.Animate,"getActiveAnimation"),getActiveAnimation:function(){return Ext.fx.Manager.getActiveAnimation(this.id)}},function(){Ext.applyIf(Ext.Element.prototype,this.prototype);Ext.CompositeElementLite.importElementMethods()});Ext.define("Ext.util.Renderable",{requires:["Ext.dom.Element"],frameCls:Ext.baseCSSPrefix+"frame",frameIdRegex:/[\-]frame\d+[TMB][LCR]$/,frameElementCls:{tl:[],tc:[],tr:[],ml:[],mc:[],mr:[],bl:[],bc:[],br:[]},frameElNames:["TL","TC","TR","ML","MC","MR","BL","BC","BR"],frameTpl:["{%this.renderDockedItems(out,values,0);%}",'<tpl if="top">','<tpl if="left"><div id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl>" style="background-position: {tl}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl>" style="background-position: {tr}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>",'<tpl if="left"><div id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl>" style="background-position: {mr}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl>" role="presentation">',"{%this.applyRenderTpl(out, values)%}","</div>",'<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>','<tpl if="bottom">','<tpl if="left"><div id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl>" style="background-position: {br}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>","{%this.renderDockedItems(out,values,1);%}"],frameTableTpl:["{%this.renderDockedItems(out,values,0);%}","<table><tbody>",'<tpl if="top">',"<tr>",'<tpl if="left"><td id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl>" style="background-position: {tl}; padding-left:{frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></td>','<tpl if="right"><td id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl>" style="background-position: {tr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>","</tpl>","<tr>",'<tpl if="left"><td id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl>" style="background-position: 0 0;" role="presentation">',"{%this.applyRenderTpl(out, values)%}","</td>",'<tpl if="right"><td id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl>" style="background-position: {mr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>",'<tpl if="bottom">',"<tr>",'<tpl if="left"><td id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></td>','<tpl if="right"><td id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl>" style="background-position: {br}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>","</tpl>","</tbody></table>","{%this.renderDockedItems(out,values,1);%}"],afterRender:function(){var f=this,j={},h=f.protoEl,i=f.getTargetEl(),g;f.finishRenderChildren();if(f.styleHtmlContent){i.addCls(f.styleHtmlCls)}h.writeTo(j);g=j.removed;if(g){i.removeCls(g)}g=j.cls;if(g.length){i.addCls(g)}g=j.style;if(j.style){i.setStyle(g)}f.protoEl=null;if(!f.ownerCt){f.updateLayout()}},afterFirstLayout:function(m,i){var l=this,n=Ext.isDefined(l.x),h=Ext.isDefined(l.y),j,k;if(l.floating&&(!n||!h)){if(l.floatParent){k=l.el.getAlignToXY(l.floatParent.getTargetEl(),"c-c");j=l.floatParent.getTargetEl().translatePoints(k[0],k[1])}else{k=l.el.getAlignToXY(l.container,"c-c");j=l.container.translatePoints(k[0],k[1])}l.x=n?l.x:j.left;l.y=h?l.y:j.top;n=h=true}if(n||h){l.setPosition(l.x,l.y)}l.onBoxReady(m,i);if(l.hasListeners.boxready){l.fireEvent("boxready",l,m,i)}},onBoxReady:Ext.emptyFn,applyRenderSelectors:function(){var i=this,f=i.renderSelectors,j=i.el,h=j.dom,g;i.applyChildEls(j);if(f){for(g in f){if(f.hasOwnProperty(g)&&f[g]){i[g]=Ext.get(Ext.DomQuery.selectNode(f[g],h))}}}},beforeRender:function(){var c=this,d=c.getComponentLayout();if(!d.initialized){d.initLayout()}c.setUI(c.ui);if(c.disabled){c.disable(true)}},doApplyRenderTpl:function(h,f){var g=f.$comp,e;if(!g.rendered){e=g.initRenderTpl();e.applyOut(f.renderData,h)}},doAutoRender:function(){var b=this;if(!b.rendered){if(b.floating){b.render(document.body)}else{b.render(Ext.isBoolean(b.autoRender)?Ext.getBody():b.autoRender)}}},doRenderContent:function(e,f){var d=f.$comp;if(d.html){Ext.DomHelper.generateMarkup(d.html,e);delete d.html}if(d.tpl){if(!d.tpl.isTemplate){d.tpl=new Ext.XTemplate(d.tpl)}if(d.data){d.tpl.applyOut(d.data,e);delete d.data}}},doRenderFramingDockedItems:function(f,h,g){var e=h.$comp;if(!e.rendered&&e.doRenderDockedItems){h.renderData.$skipDockedItems=true;e.doRenderDockedItems.call(this,f,h,g)}},finishRender:function(n){var j=this,l,o,r,q,p,m,k;if(!j.el||j.$pid){if(j.container){q=j.container.getById(j.id,true)}else{q=Ext.getDom(j.id)}if(!j.el){j.wrapPrimaryEl(q)}else{delete j.$pid;if(!j.el.dom){j.wrapPrimaryEl(j.el)}q.parentNode.insertBefore(j.el.dom,q);Ext.removeNode(q)}}else{if(!j.rendering){l=j.initRenderTpl();if(l){o=j.initRenderData();l.insertFirst(j.getTargetEl(),o)}}}if(!j.container){j.container=Ext.get(j.el.dom.parentNode)}if(j.ctCls){j.container.addCls(j.ctCls)}j.onRender(j.container,n);k=j.getTargetEl();k.setStyle(j.getOverflowStyle());j.el.setVisibilityMode(Ext.Element[j.hideMode.toUpperCase()]);if(j.overCls){j.el.hover(j.addOverCls,j.removeOverCls,j)}if(j.hasListeners.render){j.fireEvent("render",j)}if(j.contentEl){p=Ext.baseCSSPrefix;m=p+"hide-";r=Ext.get(j.contentEl);r.removeCls([p+"hidden",m+"display",m+"offsets",m+"nosize"]);k.appendChild(r.dom)}j.afterRender();if(j.hasListeners.afterrender){j.fireEvent("afterrender",j)}j.initEvents();if(j.hidden){j.el.hide()}},finishRenderChildren:function(){var b=this.getComponentLayout();b.finishRender()},getElConfig:function(){var l=this,k=l.autoEl,n=l.getFrameInfo(),r={tag:"div",id:l.id,tpl:n?l.initFramingTpl(n.table):l.initRenderTpl()},q,o,m,i,p;l.initStyles(l.protoEl);l.protoEl.writeTo(r);l.protoEl.flush();if(Ext.isString(k)){r.tag=k}else{Ext.apply(r,k)}if(r.tpl){if(n){o=l.frameElNames;m=o.length;p=l.id+"-frame1";l.frameGenId=1;r.tplData=Ext.apply({},{$comp:l,fgid:p,ui:l.ui,uiCls:l.uiCls,frameCls:l.frameCls,baseCls:l.baseCls,frameWidth:n.maxWidth,top:!!n.top,left:!!n.left,right:!!n.right,bottom:!!n.bottom,renderData:l.initRenderData()},l.getFramePositions(n));for(q=0;q<m;q++){i=o[q];l.addChildEls({name:"frame"+i,id:p+i})}l.addChildEls({name:"frameBody",id:p+"MC"})}else{r.tplData=l.initRenderData()}}return r},initFramingTpl:function(c){var d=c?this.getTpl("frameTableTpl"):this.getTpl("frameTpl");if(d&&!d.applyRenderTpl){this.setupFramingTpl(d)}return d},setupFramingTpl:function(b){b.applyRenderTpl=this.doApplyRenderTpl;b.renderDockedItems=this.doRenderFramingDockedItems},getInsertPosition:function(b){if(b!==undefined){if(Ext.isNumber(b)){b=this.container.dom.childNodes[b]}else{b=Ext.getDom(b)}}return b},getRenderTree:function(){var b=this;if(!b.hasListeners.beforerender||b.fireEvent("beforerender",b)!==false){b.beforeRender();b.rendering=true;if(b.el){return{tag:"div",id:(b.$pid=Ext.id())}}return b.getElConfig()}return null},initContainer:function(d){var c=this;if(!d&&c.el){d=c.el.dom.parentNode;c.allowDomMove=false}c.container=d.dom?d:Ext.get(d);return c.container},initRenderData:function(){var b=this;return Ext.apply({$comp:b,id:b.id,ui:b.ui,uiCls:b.uiCls,baseCls:b.baseCls,componentCls:b.componentCls,frame:b.frame},b.renderData)},initRenderTpl:function(){var b=this.getTpl("renderTpl");if(b&&!b.renderContent){this.setupRenderTpl(b)}return b},onRender:function(o,n){var m=this,k=m.x,l=m.y,p,r,j,q=m.el;if(Ext.scopeResetCSS&&!m.ownerCt){if(q.dom==Ext.getBody().dom){q.parent().addCls(Ext.resetCls)}else{m.resetEl=q.wrap({cls:Ext.resetCls})}}m.applyRenderSelectors();delete m.rendering;m.rendered=true;p=null;if(k!==undefined){p=p||{};p.x=k}if(l!==undefined){p=p||{};p.y=l}if(!m.getFrameInfo()&&Ext.isBorderBox){r=m.width;j=m.height;if(typeof r=="number"){p=p||{};p.width=r}if(typeof j=="number"){p=p||{};p.height=j}}m.lastBox=m.el.lastBox=p},render:function(l,g){var j=this,k=j.el&&(j.el=Ext.get(j.el)),h,i;Ext.suspendLayouts();l=j.initContainer(l);i=j.getInsertPosition(g);if(!k){h=j.getRenderTree();if(h){if(i){k=Ext.DomHelper.insertBefore(i,h)}else{k=Ext.DomHelper.append(l,h)}j.wrapPrimaryEl(k)}}else{j.initStyles(k);if(j.allowDomMove!==false){if(i){l.dom.insertBefore(k.dom,i)}else{l.dom.appendChild(k.dom)}}}if(k){j.finishRender(g)}Ext.resumeLayouts(!l.isDetachedBody)},ensureAttachedToBody:function(f){var d=this,e;while(d.ownerCt){d=d.ownerCt}if(d.container.isDetachedBody){d.container=e=Ext.getBody();e.appendChild(d.el.dom);if(f){d.updateLayout()}if(typeof d.x=="number"||typeof d.y=="number"){d.setPosition(d.x,d.y)}}},setupRenderTpl:function(b){b.renderBody=b.renderContent=this.doRenderContent},wrapPrimaryEl:function(b){this.el=Ext.get(b,true)},initFrame:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return}var l=this,n=l.getFrameInfo(),k,r,p,q,o=l.frameElNames,m=o.length,i;if(n){k=n.maxWidth;r=l.getFrameTpl(n.table);l.frameGenId=p=(l.frameGenId||0)+1;p=l.id+"-frame"+p;r.insertFirst(l.el,Ext.apply({$comp:l,fgid:p,ui:l.ui,uiCls:l.uiCls,frameCls:l.frameCls,baseCls:l.baseCls,frameWidth:k,top:!!n.top,left:!!n.left,right:!!n.right,bottom:!!n.bottom},l.getFramePositions(n)));l.frameBody=l.el.down("."+l.frameCls+"-mc");l.removeChildEls(function(a){return a.id&&l.frameIdRegex.test(a.id)});for(q=0;q<m;q++){i=o[q];l["frame"+i]=l.el.getById(p+i)}}},updateFrame:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return}var l=this,j=this.frameSize&&this.frameSize.table,k=this.frameTL,m=this.frameBL,n=this.frameML,i=this.frameMC,h;this.initFrame();if(i){if(l.frame){h=this.frameMC.dom.className;i.insertAfter(this.frameMC);this.frameMC.remove();this.frameBody=this.frameMC=i;i.dom.className=h;if(j){l.el.query("> table")[1].remove()}else{if(k){k.remove()}if(m){m.remove()}if(n){n.remove()}}}}else{if(l.frame){this.applyRenderSelectors()}}},getFrameInfo:function(){if(Ext.supports.CSS3BorderRadius||!this.frame){return false}var m=this,k=m.frameInfoCache,r=m.el||m.protoEl,j=r.dom?r.dom.className:r.classList.join(" "),o=k[j],n,p,l,q;if(o==null){n=Ext.fly(m.getStyleProxy(j),"frame-style-el");p=n.getStyle("background-position-x");l=n.getStyle("background-position-y");if(!p&&!l){q=n.getStyle("background-position").split(" ");p=q[0];l=q[1]}o=m.calculateFrame(p,l);if(o){r.setStyle("background-image","none")}if(m.frame===true&&!o){Ext.log.error("You have set frame: true explicity on this component ("+m.getXType()+") and it does not have any framing defined in the CSS template. In this case IE cannot figure out what sizes to use and thus framing on this component will be disabled.")}k[j]=o}m.frame=!!o;m.frameSize=o;return o},calculateFrame:function(l,m){if(!(parseInt(l,10)>=1000000&&parseInt(m,10)>=1000000)){return false}var j=Math.max,i=parseInt(l.substr(3,2),10),n=parseInt(l.substr(5,2),10),p=parseInt(m.substr(3,2),10),k=parseInt(m.substr(5,2),10),o={table:l.substr(0,3)=="110",vertical:m.substr(0,3)=="110",top:j(i,n),right:j(n,p),bottom:j(k,p),left:j(i,k)};o.maxWidth=j(o.top,o.right,o.bottom,o.left);o.width=o.left+o.right;o.height=o.top+o.bottom;return o},getStyleProxy:function(c){var d=this.styleProxyEl||(Ext.AbstractComponent.prototype.styleProxyEl=Ext.getBody().createChild({style:{position:"absolute",top:"-10000px"}},null,true));d.className=c;return d},getFramePositions:function(n){var l=this,k=n.maxWidth,j=l.dock,o,q,m,p,r;if(n.vertical){q="0 -"+(k*0)+"px";m="0 -"+(k*1)+"px";if(j&&j=="right"){q="right -"+(k*0)+"px";m="right -"+(k*1)+"px"}o={tl:"0 -"+(k*0)+"px",tr:"0 -"+(k*1)+"px",bl:"0 -"+(k*2)+"px",br:"0 -"+(k*3)+"px",ml:"-"+(k*1)+"px 0",mr:"right 0",tc:q,bc:m}}else{p="-"+(k*0)+"px 0";r="right 0";if(j&&j=="bottom"){p="left bottom";r="right bottom"}o={tl:"0 -"+(k*2)+"px",tr:"right -"+(k*3)+"px",bl:"0 -"+(k*4)+"px",br:"right -"+(k*5)+"px",ml:p,mr:r,tc:"0 -"+(k*0)+"px",bc:"0 -"+(k*1)+"px"}}return o},getFrameTpl:function(b){return this.getTpl(b?"frameTableTpl":"frameTpl")},frameInfoCache:{}});Ext.define("Ext.ComponentQuery",{singleton:true,uses:["Ext.ComponentManager"]},function(){var t=this,q=["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(""),v=function(a,b){return b.method.apply(this,[a].concat(b.args))},z=function(e,a){var g=[],d=0,b=e.length,c,f=a!==">";for(;d<b;d++){c=e[d];if(c.getRefItems){g=g.concat(c.getRefItems(f))}}return g},u=function(d){var e=[],c=0,a=d.length,b;for(;c<a;c++){b=d[c];while(!!(b=(b.ownerCt||b.floatParent))){e.push(b)}}return e},o=function(f,a,b){if(a==="*"){return f.slice()}else{var g=[],e=0,c=f.length,d;for(;e<c;e++){d=f[e];if(d.isXType(a,b)){g.push(d)}}return g}},r=function(f,c){var a=Ext.Array,g=[],e=0,b=f.length,d;for(;e<b;e++){d=f[e];if(d.hasCls(c)){g.push(d)}}return g},n=function(f,a,g,b){var h=[],e=0,c=f.length,d;for(;e<c;e++){d=f[e];if(!b?!!d[a]:(String(d[a])===b)){h.push(d)}}return h},w=function(e,a){var f=[],d=0,b=e.length,c;for(;d<b;d++){c=e[d];if(c.getItemId()===a){f.push(c)}}return f},p=function(c,b,a){return t.pseudos[b](c,a)},s=/^(\s?([>\^])\s?|\s|$)/,x=/^(#)?([\w\-]+|\*)(?:\((true|false)\))?/,y=[{re:/^\.([\w\-]+)(?:\((true|false)\))?/,method:o},{re:/^(?:[\[](?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]])/,method:n},{re:/^#([\w\-]+)/,method:w},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,method:p},{re:/^(?:\{([^\}]+)\})/,method:q}];t.Query=Ext.extend(Object,{constructor:function(a){a=a||{};Ext.apply(this,a)},execute:function(e){var c=this.operations,b=0,a=c.length,d,f;if(!e){f=Ext.ComponentManager.all.getArray()}else{if(Ext.isArray(e)){f=e}else{if(e.isMixedCollection){f=e.items}}}for(;b<a;b++){d=c[b];if(d.mode==="^"){f=u(f||[e])}else{if(d.mode){f=z(f||[e],d.mode)}else{f=v(f||z([e]),d)}}if(b===a-1){return f}}return[]},is:function(e){var f=this.operations,b=Ext.isArray(e)?e:[e],g=b.length,a=f[f.length-1],c,d;b=v(b,a);if(b.length===g){if(f.length>1){for(d=0,c=b.length;d<c;d++){if(Ext.Array.indexOf(this.execute(),b[d])===-1){return false}}}return true}return false}});Ext.apply(this,{cache:{},pseudos:{not:function(b,h){var a=Ext.ComponentQuery,d=0,c=b.length,e=[],f=-1,g;for(;d<c;++d){g=b[d];if(!a.is(g,h)){e[++f]=g}}return e},last:function(a){return a[a.length-1]}},query:function(d,h){var g=d.split(","),e=g.length,c=0,b=[],f=[],i={},k,a,j;for(;c<e;c++){d=Ext.String.trim(g[c]);k=this.cache[d]||(this.cache[d]=this.parse(d));b=b.concat(k.execute(h))}if(e>1){a=b.length;for(c=0;c<a;c++){j=b[c];if(!i[j.id]){f.push(j);i[j.id]=true}}b=f}return b},is:function(e,f){if(!f){return true}var c=f.split(","),b=c.length,d=0,a;for(;d<b;d++){f=Ext.String.trim(c[d]);a=this.cache[f]||(this.cache[f]=this.parse(f));if(a.is(e)){return true}}},parse:function(b){var d=[],c=y.length,i,a,h,g,f,k,j,e;while(b&&i!==b){i=b;a=b.match(x);if(a){h=a[1];if(h==="#"){d.push({method:w,args:[Ext.String.trim(a[2])]})}else{if(h==="."){d.push({method:r,args:[Ext.String.trim(a[2])]})}else{d.push({method:o,args:[Ext.String.trim(a[2]),Boolean(a[3])]})}}b=b.replace(a[0],"")}while(!(g=b.match(s))){for(k=0;b&&k<c;k++){j=y[k];f=b.match(j.re);e=j.method;if(f){d.push({method:Ext.isString(j.method)?Ext.functionFactory("items",Ext.String.format.apply(Ext.String,[e].concat(f.slice(1)))):j.method,args:f.slice(1)});b=b.replace(f[0],"");break}if(k===(c-1)){Ext.Error.raise('Invalid ComponentQuery selector: "'+arguments[0]+'"')}}}if(g[1]){d.push({mode:g[2]||g[1]});b=b.replace(g[0],"")}}return new t.Query({operations:d})}})});Ext.define("Ext.util.ProtoElement",(function(){var c=Ext.String.splitWords,d=Ext.Array.toMap;return{isProtoEl:true,clsProp:"cls",styleProp:"style",removedProp:"removed",styleIsText:false,constructor:function(b){var a=this;Ext.apply(a,b);a.classList=c(a.cls);a.classMap=d(a.classList);delete a.cls;if(Ext.isFunction(a.style)){a.styleFn=a.style;delete a.style}else{if(typeof a.style=="string"){a.style=Ext.Element.parseStyles(a.style)}else{if(a.style){a.style=Ext.apply({},a.style)}}}},flush:function(){this.flushClassList=[];this.removedClasses={};delete this.style},addCls:function(a){var i=this,b=c(a),r=b.length,o=i.classList,s=i.classMap,q=i.flushClassList,p=0,n;for(;p<r;++p){n=b[p];if(!s[n]){s[n]=true;o.push(n);if(q){q.push(n);delete i.removedClasses[n]}}}return i},hasCls:function(a){return a in this.classMap},removeCls:function(a){var b=this,o=b.classList,s=(b.classList=[]),q=d(c(a)),t=o.length,u=b.classMap,p=b.removedClasses,r,i;for(r=0;r<t;++r){i=o[r];if(q[i]){if(p){if(u[i]){p[i]=true;Ext.Array.remove(b.flushClassList,i)}}delete u[i]}else{s.push(i)}}return b},setStyle:function(a,b){var g=this,h=g.style||(g.style={});if(typeof a=="string"){if(arguments.length===1){g.setStyle(Ext.Element.parseStyles(a))}else{h[a]=b}}else{Ext.apply(h,a)}return g},writeTo:function(a){var h=this,b=h.flushClassList||h.classList,i=h.removedClasses,j;if(h.styleFn){j=Ext.apply({},h.styleFn());Ext.apply(j,h.style)}else{j=h.style}a[h.clsProp]=b.join(" ");if(j){a[h.styleProp]=h.styleIsText?Ext.DomHelper.generateStyles(j):j}if(i){i=Ext.Object.getKeys(i);if(i.length){a[h.removedProp]=i.join(" ")}}return a}}}()));Ext.define("Ext.util.AbstractMixedCollection",{requires:["Ext.util.Filter"],mixins:{observable:"Ext.util.Observable"},isMixedCollection:true,generation:0,constructor:function(d,e){var f=this;f.items=[];f.map={};f.keys=[];f.length=0;f.allowFunctions=d===true;if(e){f.getKey=e}f.mixins.observable.constructor.call(f)},allowFunctions:false,add:function(g,j){var k=this,i=j,l=g,h;if(arguments.length==1){i=l;l=k.getKey(i)}if(typeof l!="undefined"&&l!==null){h=k.map[l];if(typeof h!="undefined"){return k.replace(l,i)}k.map[l]=i}k.generation++;k.length++;k.items.push(i);k.keys.push(l);if(k.hasListeners.add){k.fireEvent("add",k.length-1,i,l)}return i},getKey:function(b){return b.id},replace:function(j,h){var i=this,g,f;if(arguments.length==1){h=arguments[0];j=i.getKey(h)}g=i.map[j];if(typeof j=="undefined"||j===null||typeof g=="undefined"){return i.add(j,h)}i.generation++;f=i.indexOfKey(j);i.items[f]=h;i.map[j]=h;if(i.hasListeners.replace){i.fireEvent("replace",j,g,h)}return h},addAll:function(i){var j=this,k=0,g,h,l;if(arguments.length>1||Ext.isArray(i)){g=arguments.length>1?arguments:i;for(h=g.length;k<h;k++){j.add(g[k])}}else{for(l in i){if(i.hasOwnProperty(l)){if(j.allowFunctions||typeof i[l]!="function"){j.add(l,i[l])}}}}},each:function(j,k){var g=[].concat(this.items),l=0,h=g.length,i;for(;l<h;l++){i=g[l];if(j.call(k||i,i,l,h)===false){break}}},eachKey:function(j,k){var i=this.keys,g=this.items,l=0,h=i.length;for(;l<h;l++){j.call(k||window,i[l],g[l],l,h)}},findBy:function(j,k){var i=this.keys,g=this.items,l=0,h=g.length;for(;l<h;l++){if(j.call(k||window,g[l],i[l])){return g[l]}}return null},find:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.util.MixedCollection: find has been deprecated. Use findBy instead.")}return this.findBy.apply(this,arguments)},insert:function(h,g,j){var k=this,l=g,i=j;if(arguments.length==2){i=l;l=k.getKey(i)}if(k.containsKey(l)){k.suspendEvents();k.removeAtKey(l);k.resumeEvents()}if(h>=k.length){return k.add(l,i)}k.generation++;k.length++;Ext.Array.splice(k.items,h,0,i);if(typeof l!="undefined"&&l!==null){k.map[l]=i}Ext.Array.splice(k.keys,h,0,l);if(k.hasListeners.add){k.fireEvent("add",h,i,l)}return i},remove:function(b){this.generation++;return this.removeAt(this.indexOf(b))},removeAll:function(d){d=[].concat(d);var f,e=d.length;for(f=0;f<e;f++){this.remove(d[f])}return this},removeAt:function(f){var h=this,g,e;if(f<h.length&&f>=0){h.length--;g=h.items[f];Ext.Array.erase(h.items,f,1);e=h.keys[f];if(typeof e!="undefined"){delete h.map[e]}Ext.Array.erase(h.keys,f,1);if(h.hasListeners.remove){h.fireEvent("remove",g,e)}h.generation++;return g}return false},removeAtKey:function(b){return this.removeAt(this.indexOfKey(b))},getCount:function(){return this.length},indexOf:function(b){return Ext.Array.indexOf(this.items,b)},indexOfKey:function(b){return Ext.Array.indexOf(this.keys,b)},get:function(e){var g=this,f=g.map[e],h=f!==undefined?f:(typeof e=="number")?g.items[e]:undefined;return typeof h!="function"||g.allowFunctions?h:null},getAt:function(b){return this.items[b]},getByKey:function(b){return this.map[b]},contains:function(b){return typeof this.map[this.getKey(b)]!="undefined"},containsKey:function(b){return typeof this.map[b]!="undefined"},clear:function(){var b=this;b.length=0;b.items=[];b.keys=[];b.map={};b.generation++;if(b.hasListeners.clear){b.fireEvent("clear")}},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(l,i,k,j){var p=this.extractValues(l,i),m=p.length,n=0,o;k=k||0;j=(j||j===0)?j:m-1;for(o=k;o<=j;o++){n+=p[o]}return n},collect:function(l,p,n){var i=this.extractValues(l,p),t=i.length,s={},r=[],m,o,q;for(q=0;q<t;q++){m=i[q];o=String(m);if((n||!Ext.isEmpty(m))&&!s[o]){s[o]=true;r.push(m)}}return r},extractValues:function(f,e){var d=this.items;if(e){d=Ext.Array.pluck(d,e)}return Ext.Array.pluck(d,f)},getRange:function(i,h){var j=this,l=j.items,g=[],k;if(l.length<1){return g}i=i||0;h=Math.min(typeof h=="undefined"?j.length-1:h,j.length-1);if(i<=h){for(k=i;k<=h;k++){g[g.length]=l[k]}}else{for(k=i;k>=h;k--){g[g.length]=l[k]}}return g},filter:function(k,l,i,h){var g=[],j;if(Ext.isString(k)){g.push(new Ext.util.Filter({property:k,value:l,anyMatch:i,caseSensitive:h}))}else{if(Ext.isArray(k)||k instanceof Ext.util.Filter){g=g.concat(k)}}j=function(f){var a=true,o=g.length,e,b,c,d;for(e=0;e<o;e++){b=g[e];c=b.filterFn;d=b.scope;a=a&&c.call(d,f)}return a};return this.filterBy(j)},filterBy:function(n,o){var k=this,j=new this.self(),l=k.keys,i=k.items,m=i.length,p;j.getKey=k.getKey;for(p=0;p<m;p++){if(n.call(o||k,i[p],l[p])){j.add(l[p],i[p])}}return j},findIndex:function(j,f,h,i,g){if(Ext.isEmpty(f,false)){return -1}f=this.createValueMatcher(f,i,g);return this.findIndexBy(function(a){return a&&f.test(a[j])},null,h)},findIndexBy:function(n,o,k){var l=this,m=l.keys,i=l.items,p=k||0,j=i.length;for(;p<j;p++){if(n.call(o||l,i[p],m[p])){return p}}return -1},createValueMatcher:function(j,h,g,f){if(!j.exec){var i=Ext.String.escapeRegex;j=String(j);if(h===true){j=i(j)}else{j="^"+i(j);if(f===true){j+="$"}}j=new RegExp(j,g?"":"i")}return j},clone:function(){var j=this,i=new this.self(),k=j.keys,g=j.items,l=0,h=g.length;for(;l<h;l++){i.add(k[l],g[l])}i.getKey=j.getKey;return i}});Ext.define("Ext.data.SortTypes",{singleton:true,none:function(b){return b},stripTagsRE:/<\/?[^>]+>/gi,asText:function(b){return String(b).replace(this.stripTagsRE,"")},asUCText:function(b){return String(b).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(b){return String(b).toUpperCase()},asDate:function(b){if(!b){return 0}if(Ext.isDate(b)){return b.getTime()}return Date.parse(String(b))},asFloat:function(d){var c=parseFloat(String(d).replace(/,/g,""));return isNaN(c)?0:c},asInt:function(d){var c=parseInt(String(d).replace(/,/g,""),10);return isNaN(c)?0:c}});Ext.define("Ext.data.association.Association",{alternateClassName:"Ext.data.Association",primaryKey:"id",defaultReaderType:"json",statics:{AUTO_ID:1000,create:function(b){if(!b.isAssociation){if(Ext.isString(b)){b={type:b}}switch(b.type){case"belongsTo":return new Ext.data.association.BelongsTo(b);case"hasMany":return new Ext.data.association.HasMany(b);case"hasOne":return new Ext.data.association.HasOne(b);default:Ext.Error.raise('Unknown Association type: "'+b.type+'"')}}return b}},constructor:function(h){Ext.apply(this,h);var n=Ext.ModelManager.types,m=h.ownerModel,k=h.associatedModel,l=n[m],j=n[k],i;if(l===undefined){Ext.Error.raise("The configured ownerModel was not valid (you tried "+m+")")}if(j===undefined){Ext.Error.raise("The configured associatedModel was not valid (you tried "+k+")")}this.ownerModel=l;this.associatedModel=j;Ext.applyIf(this,{ownerName:m,associatedName:k});this.associationId="association"+(++this.statics().AUTO_ID)},getReader:function(){var f=this,e=f.reader,d=f.associatedModel;if(e){if(Ext.isString(e)){e={type:e}}if(e.isReader){e.setModel(d)}else{Ext.applyIf(e,{model:d,type:f.defaultReaderType})}f.reader=Ext.createByAlias("reader."+e.type,e)}return f.reader||null}});Ext.define("Ext.data.IdGenerator",{isGenerator:true,constructor:function(d){var c=this;Ext.apply(c,d);if(c.id){Ext.data.IdGenerator.all[c.id]=c}},getRecId:function(b){return b.modelName+"-"+b.internalId},statics:{all:{},get:function(f){var h,g,e;if(typeof f=="string"){g=e=f;f=null}else{if(f.isGenerator){return f}else{g=f.id||f.type;e=f.type}}h=this.all[g];if(!h){h=Ext.create("idgen."+e,f)}return h}}});Ext.define("Ext.data.validations",{singleton:true,presenceMessage:"must be present",lengthMessage:"is the wrong length",formatMessage:"is the wrong format",inclusionMessage:"is not included in the list of acceptable values",exclusionMessage:"is not an acceptable value",emailMessage:"is not a valid email address",emailRe:/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,presence:function(d,c){if(c===undefined){c=d}return !!c||c===0},length:function(f,h){if(h===undefined||h===null){return false}var i=h.length,j=f.min,g=f.max;if((j&&i<j)||(g&&i>g)){return false}else{return true}},email:function(c,d){return Ext.data.validations.emailRe.test(d)},format:function(d,c){return !!(d.matcher&&d.matcher.test(c))},inclusion:function(d,c){return d.list&&Ext.Array.indexOf(d.list,c)!=-1},exclusion:function(d,c){return d.list&&Ext.Array.indexOf(d.list,c)==-1}});Ext.define("Ext.ZIndexManager",{alternateClassName:"Ext.WindowGroup",statics:{zBase:9000},constructor:function(d){var c=this;c.list={};c.zIndexStack=[];c.front=null;if(d){if(d.isContainer){d.on("resize",c._onContainerResize,c);c.zseed=Ext.Number.from(c.rendered?d.getEl().getStyle("zIndex"):undefined,c.getNextZSeed());c.targetEl=d.getTargetEl();c.container=d}else{Ext.EventManager.onWindowResize(c._onContainerResize,c);c.zseed=c.getNextZSeed();c.targetEl=Ext.get(d)}}else{Ext.EventManager.onWindowResize(c._onContainerResize,c);c.zseed=c.getNextZSeed();Ext.onDocumentReady(function(){c.targetEl=Ext.getBody()})}},getNextZSeed:function(){return(Ext.ZIndexManager.zBase+=10000)},setBase:function(c){this.zseed=c;var d=this.assignZIndices();this._activateLast();return d},assignZIndices:function(){var j=this.zIndexStack,a=j.length,h=0,g=this.zseed,i;for(;h<a;h++){i=j[h];if(i&&!i.hidden){g=i.setZIndex(g)}}this._activateLast();return g},_setActiveChild:function(d,e){var f=this.front;if(d!==f){if(f&&!f.destroying){f.setActive(false,d)}this.front=d;if(d&&d!=e){d.setActive(true);if(d.modal){this._showModalMask(d)}}}},onComponentHide:function(b){b.setActive(false);this._activateLast()},_activateLast:function(){var h=this,g=h.zIndexStack,i=g.length-1,j=h.front,f;h.front=undefined;for(;i>=0&&g[i].hidden;--i){}if((f=g[i])){h._setActiveChild(f,j);if(f.modal){return}}for(;i>=0;--i){f=g[i];if(f.isVisible()&&f.modal){h._showModalMask(f);return}}h._hideModalMask()},_showModalMask:function(g){var j=this,h=g.el.getStyle("zIndex")-4,f=g.floatParent?g.floatParent.getTargetEl():g.container,i=f.getBox();if(f.dom===document.body){i.height=Math.max(document.body.scrollHeight,Ext.dom.Element.getDocumentHeight());i.width=Math.max(document.body.scrollWidth,i.width)}if(!j.mask){j.mask=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"mask"});j.mask.setVisibilityMode(Ext.Element.DISPLAY);j.mask.on("click",j._onMaskClick,j)}j.mask.maskTarget=f;f.addCls(Ext.baseCSSPrefix+"body-masked");j.mask.setBox(i);j.mask.setStyle("zIndex",h);j.mask.show()},_hideModalMask:function(){var b=this.mask;if(b&&b.isVisible()){b.maskTarget.removeCls(Ext.baseCSSPrefix+"body-masked");b.maskTarget=undefined;b.hide()}},_onMaskClick:function(){if(this.front){this.front.focus()}},_onContainerResize:function(){var e=this.mask,d,f;if(e&&e.isVisible()){e.hide();d=e.maskTarget;if(d.dom===document.body){f={height:Math.max(document.body.scrollHeight,Ext.dom.Element.getDocumentHeight()),width:Math.max(document.body.scrollWidth,document.documentElement.clientWidth)}}else{f=d.getViewSize(true)}e.setSize(f);e.show()}},register:function(d){var c=this;if(d.zIndexManager){d.zIndexManager.unregister(d)}d.zIndexManager=c;c.list[d.id]=d;c.zIndexStack.push(d);d.on("hide",c.onComponentHide,c)},unregister:function(e){var d=this,f=d.list;delete e.zIndexManager;if(f&&f[e.id]){delete f[e.id];e.un("hide",d.onComponentHide);Ext.Array.remove(d.zIndexStack,e);d._activateLast()}},get:function(b){return b.isComponent?b:this.list[b]},bringToFront:function(e){var h=this,f=false,g=h.zIndexStack;e=h.get(e);if(e!==h.front){Ext.Array.remove(g,e);if(e.preventBringToFront){g.unshift(e)}else{g.push(e)}h.assignZIndices();f=true;this.front=e}if(f&&e.modal){h._showModalMask(e)}return f},sendToBack:function(d){var c=this;d=c.get(d);Ext.Array.remove(c.zIndexStack,d);c.zIndexStack.unshift(d);c.assignZIndices();this._activateLast();return d},hideAll:function(){var d=this.list,e,f;for(f in d){if(d.hasOwnProperty(f)){e=d[f];if(e.isComponent&&e.isVisible()){e.hide()}}}},hide:function(){var g=0,e=this.zIndexStack,f=e.length,h;this.tempHidden=[];for(;g<f;g++){h=e[g];if(h.isVisible()){this.tempHidden.push(h);h.el.hide()}}},show:function(){var h=0,g=this.tempHidden,f=g?g.length:0,e;for(;h<f;h++){e=g[h];e.el.show();e.setPosition(e.x,e.y)}delete this.tempHidden},getActive:function(){return this.front},getBy:function(k,l){var j=[],m=0,h=this.zIndexStack,i=h.length,n;for(;m<i;m++){n=h[m];if(k.call(l||n,n)!==false){j.push(n)}}return j},each:function(j,f){var i=this.list,h,g;for(h in i){if(i.hasOwnProperty(h)){g=i[h];if(g.isComponent&&j.call(f||g,g)===false){return}}}},eachBottomUp:function(i,j){var g=this.zIndexStack,k=0,h=g.length,l;for(;k<h;k++){l=g[k];if(l.isComponent&&i.call(j||l,l)===false){return}}},eachTopDown:function(h,i){var g=this.zIndexStack,j=g.length,f;for(;j-->0;){f=g[j];if(f.isComponent&&h.call(i||f,f)===false){return}}},destroy:function(){var e=this,h=e.list,f,g;for(g in h){if(h.hasOwnProperty(g)){f=h[g];if(f.isComponent){f.destroy()}}}delete e.zIndexStack;delete e.list;delete e.container;delete e.targetEl}},function(){Ext.WindowManager=Ext.WindowMgr=new this()});Ext.define("Docs.view.cls.Logic",{showPrivateClasses:false,constructor:function(b){Ext.apply(this,b)}});Ext.define("Ext.XTemplateParser",{constructor:function(b){Ext.apply(this,b)},doTpl:Ext.emptyFn,parse:function(z){var m=this,w=z.length,x={elseif:"elif"},v=m.topRe,H=m.actionsRe,F,G,B,y,D,A,C,s,t,I,E,J;m.level=0;m.stack=G=[];for(F=0;F<w;F=I){v.lastIndex=F;y=v.exec(z);if(!y){m.doText(z.substring(F,w));break}t=y.index;I=v.lastIndex;if(F<t){m.doText(z.substring(F,t))}if(y[1]){I=z.indexOf("%}",t+2);m.doEval(z.substring(t+2,I));I+=2}else{if(y[2]){I=z.indexOf("]}",t+2);m.doExpr(z.substring(t+2,I));I+=2}else{if(y[3]){m.doTag(y[3])}else{if(y[4]){E=null;while((s=H.exec(y[4]))!==null){B=s[2]||s[3];if(B){B=Ext.String.htmlDecode(B);D=s[1];D=x[D]||D;E=E||{};A=E[D];if(typeof A=="string"){E[D]=[A,B]}else{if(A){E[D].push(B)}else{E[D]=B}}}}if(!E){if(m.elseRe.test(y[4])){m.doElse()}else{if(m.defaultRe.test(y[4])){m.doDefault()}else{m.doTpl();G.push({type:"tpl"})}}}else{if(E["if"]){m.doIf(E["if"],E);G.push({type:"if"})}else{if(E["switch"]){m.doSwitch(E["switch"],E);G.push({type:"switch"})}else{if(E["case"]){m.doCase(E["case"],E)}else{if(E.elif){m.doElseIf(E.elif,E)}else{if(E["for"]){++m.level;if(J=m.propRe.exec(y[4])){E.propName=J[1]||J[2]}m.doFor(E["for"],E);G.push({type:"for",actions:E})}else{if(E.exec){m.doExec(E.exec,E);G.push({type:"exec",actions:E})}}}}}}}}else{if(y[0].length===5){G.push({type:"tpl"})}else{C=G.pop();m.doEnd(C.type,C.actions);if(C.type=="for"){--m.level}}}}}}}},topRe:/(?:(\{\%)|(\{\[)|\{([^{}]*)\})|(?:<tpl([^>]*)\>)|(?:<\/tpl>)/g,actionsRe:/\s*(elif|elseif|if|for|exec|switch|case|eval)\s*\=\s*(?:(?:"([^"]*)")|(?:'([^']*)'))\s*/g,propRe:/prop=(?:(?:"([^"]*)")|(?:'([^']*)'))/,defaultRe:/^\s*default\s*$/,elseRe:/^\s*else\s*$/});Ext.define("Ext.dd.DragTracker",{uses:["Ext.util.Region"],mixins:{observable:"Ext.util.Observable"},active:false,trackOver:false,tolerance:5,autoStart:false,constructor:function(b){Ext.apply(this,b);this.addEvents("mouseover","mouseout","mousedown","mouseup","mousemove","beforedragstart","dragstart","dragend","drag");this.dragRegion=new Ext.util.Region(0,0,0,0);if(this.el){this.initEl(this.el)}this.mixins.observable.constructor.call(this);if(this.disabled){this.disable()}},initEl:function(b){this.el=Ext.get(b);this.handle=Ext.get(this.delegate);this.delegate=this.handle?undefined:this.delegate;if(!this.handle){this.handle=this.el}this.mon(this.handle,{mousedown:this.onMouseDown,delegate:this.delegate,scope:this});if(this.trackOver||this.overCls){this.mon(this.handle,{mouseover:this.onMouseOver,mouseout:this.onMouseOut,delegate:this.delegate,scope:this})}},disable:function(){this.disabled=true},enable:function(){this.disabled=false},destroy:function(){this.clearListeners();delete this.el},onMouseOver:function(f,d){var e=this;if(!e.disabled){if(Ext.EventManager.contains(f)||e.delegate){e.mouseIsOut=false;if(e.overCls){e.el.addCls(e.overCls)}e.fireEvent("mouseover",e,f,e.delegate?f.getTarget(e.delegate,d):e.handle)}}},onMouseOut:function(b){if(this.mouseIsDown){this.mouseIsOut=true}else{if(this.overCls){this.el.removeCls(this.overCls)}this.fireEvent("mouseout",this,b)}},onMouseDown:function(c,d){if(this.disabled||c.dragTracked){return}this.dragTarget=this.delegate?d:this.handle.dom;this.startXY=this.lastXY=c.getXY();this.startRegion=Ext.fly(this.dragTarget).getRegion();if(this.fireEvent("mousedown",this,c)===false||this.fireEvent("beforedragstart",this,c)===false||this.onBeforeStart(c)===false){return}this.mouseIsDown=true;c.dragTracked=true;if(this.preventDefault!==false){c.preventDefault()}Ext.getDoc().on({scope:this,mouseup:this.onMouseUp,mousemove:this.onMouseMove,selectstart:this.stopSelect});if(this.autoStart){this.timer=Ext.defer(this.triggerStart,this.autoStart===true?1000:this.autoStart,this,[c])}},onMouseMove:function(g,h){if(this.active&&Ext.isIE&&!g.browserEvent.button){g.preventDefault();this.onMouseUp(g);return}g.preventDefault();var e=g.getXY(),f=this.startXY;this.lastXY=e;if(!this.active){if(Math.max(Math.abs(f[0]-e[0]),Math.abs(f[1]-e[1]))>this.tolerance){this.triggerStart(g)}else{return}}if(this.fireEvent("mousemove",this,g)===false){this.onMouseUp(g)}else{this.onDrag(g);this.fireEvent("drag",this,g)}},onMouseUp:function(b){this.mouseIsDown=false;if(this.mouseIsOut){this.mouseIsOut=false;this.onMouseOut(b)}b.preventDefault();this.fireEvent("mouseup",this,b);this.endDrag(b)},endDrag:function(f){var d=Ext.getDoc(),e=this.active;d.un("mousemove",this.onMouseMove,this);d.un("mouseup",this.onMouseUp,this);d.un("selectstart",this.stopSelect,this);this.clearStart();this.active=false;if(e){this.onEnd(f);this.fireEvent("dragend",this,f)}delete this._constrainRegion;delete Ext.EventObject.dragTracked},triggerStart:function(b){this.clearStart();this.active=true;this.onStart(b);this.fireEvent("dragstart",this,b)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(b){b.stopEvent();return false},onBeforeStart:function(b){},onStart:function(b){},onDrag:function(b){},onEnd:function(b){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getConstrainRegion:function(){if(this.constrainTo){if(this.constrainTo instanceof Ext.util.Region){return this.constrainTo}if(!this._constrainRegion){this._constrainRegion=Ext.fly(this.constrainTo).getViewRegion()}}else{if(!this._constrainRegion){this._constrainRegion=this.getDragCt().getViewRegion()}}return this._constrainRegion},getXY:function(b){return b?this.constrainModes[b](this,this.lastXY):this.lastXY},getOffset:function(f){var d=this.getXY(f),e=this.startXY;return[d[0]-e[0],d[1]-e[1]]},constrainModes:{point:function(e,g){var h=e.dragRegion,f=e.getConstrainRegion();if(!f){return g}h.x=h.left=h[0]=h.right=g[0];h.y=h.top=h[1]=h.bottom=g[1];h.constrainTo(f);return[h.left,h.top]},dragTarget:function(l,i){var g=l.startXY,j=l.startRegion.copy(),h=l.getConstrainRegion(),k;if(!h){return i}j.translateBy(i[0]-g[0],i[1]-g[1]);if(j.right>h.right){i[0]+=k=(h.right-j.right);j.left+=k}if(j.left<h.left){i[0]+=(h.left-j.left)}if(j.bottom>h.bottom){i[1]+=k=(h.bottom-j.bottom);j.top+=k}if(j.top<h.top){i[1]+=(h.top-j.top)}return i}}});Ext.define("Ext.util.HashMap",{mixins:{observable:"Ext.util.Observable"},constructor:function(e){e=e||{};var f=this,d=e.keyFn;f.addEvents("add","clear","remove","replace");f.mixins.observable.constructor.call(f,e);f.clear(true);if(d){f.getKey=d}},getCount:function(){return this.length},getData:function(d,c){if(c===undefined){c=d;d=this.getKey(c)}return[d,c]},getKey:function(b){return b.id},add:function(e,f){var d=this;if(f===undefined){f=e;e=d.getKey(f)}if(d.containsKey(e)){return d.replace(e,f)}d.map[e]=f;++d.length;if(d.hasListeners.add){d.fireEvent("add",d,e,f)}return f},replace:function(f,i){var j=this,h=j.map,g;if(i===undefined){i=f;f=j.getKey(i)}if(!j.containsKey(f)){j.add(f,i)}g=h[f];h[f]=i;if(j.hasListeners.replace){j.fireEvent("replace",j,f,i,g)}return i},remove:function(c){var d=this.findKey(c);if(d!==undefined){return this.removeAtKey(d)}return false},removeAtKey:function(e){var d=this,f;if(d.containsKey(e)){f=d.map[e];delete d.map[e];--d.length;if(d.hasListeners.remove){d.fireEvent("remove",d,e,f)}return true}return false},get:function(b){return this.map[b]},clear:function(d){var c=this;c.map={};c.length=0;if(d!==true&&c.hasListeners.clear){c.fireEvent("clear",c)}return c},containsKey:function(b){return this.map[b]!==undefined},contains:function(b){return this.containsKey(this.findKey(b))},getKeys:function(){return this.getArray(true)},getValues:function(){return this.getArray(false)},getArray:function(g){var f=[],e,h=this.map;for(e in h){if(h.hasOwnProperty(e)){f.push(g?e:h[e])}}return f},each:function(i,j){var g=Ext.apply({},this.map),f,h=this.length;j=j||this;for(f in g){if(g.hasOwnProperty(f)){if(i.call(j,f,g[f],h)===false){break}}}return this},clone:function(){var f=new this.self(),d=this.map,e;f.suspendEvents();for(e in d){if(d.hasOwnProperty(e)){f.add(e,d[e])}}f.resumeEvents();return f},findKey:function(d){var e,f=this.map;for(e in f){if(f.hasOwnProperty(e)&&f[e]===d){return e}}return undefined}});Ext.define("Ext.fx.target.Target",{isAnimTarget:true,constructor:function(b){this.target=b;this.id=this.getId()},getId:function(){return this.target.id}});Ext.define("Ext.draw.Color",{colorToHexRe:/(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/,rgbRe:/\s*rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)\s*/,hexRe:/\s*#([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)\s*/,lightnessFactor:0.2,constructor:function(i,j,g){var f=this,h=Ext.Number.constrain;f.r=h(i,0,255);f.g=h(j,0,255);f.b=h(g,0,255)},getRed:function(){return this.r},getGreen:function(){return this.g},getBlue:function(){return this.b},getRGB:function(){var b=this;return[b.r,b.g,b.b]},getHSL:function(){var o=this,t=o.r/255,p=o.g/255,l=o.b/255,h=Math.max(t,p,l),r=Math.min(t,p,l),g=h-r,q,b=0,s=0.5*(h+r);if(r!=h){b=(s<0.5)?g/(h+r):g/(2-h-r);if(t==h){q=60*(p-l)/g}else{if(p==h){q=120+60*(l-t)/g}else{q=240+60*(t-p)/g}}if(q<0){q+=360}if(q>=360){q-=360}}return[q,b,s]},getLighter:function(c){var d=this.getHSL();c=c||this.lightnessFactor;d[2]=Ext.Number.constrain(d[2]+c,0,1);return this.fromHSL(d[0],d[1],d[2])},getDarker:function(b){b=b||this.lightnessFactor;return this.getLighter(-b)},toString:function(){var g=this,j=Math.round,h=j(g.r).toString(16),i=j(g.g).toString(16),b=j(g.b).toString(16);h=(h.length==1)?"0"+h:h;i=(i.length==1)?"0"+i:i;b=(b.length==1)?"0"+b:b;return["#",h,i,b].join("")},toHex:function(g){if(Ext.isArray(g)){g=g[0]}if(!Ext.isString(g)){return""}if(g.substr(0,1)==="#"){return g}var j=this.colorToHexRe.exec(g),i,k,h,l;if(Ext.isArray(j)){i=parseInt(j[2],10);k=parseInt(j[3],10);h=parseInt(j[4],10);l=h|(k<<8)|(i<<16);return j[1]+"#"+("000000"+l.toString(16)).slice(-6)}else{return g}},fromString:function(g){var l,j,k,b,i=parseInt;if((g.length==4||g.length==7)&&g.substr(0,1)==="#"){l=g.match(this.hexRe);if(l){j=i(l[1],16)>>0;k=i(l[2],16)>>0;b=i(l[3],16)>>0;if(g.length==4){j+=(j*16);k+=(k*16);b+=(b*16)}}}else{l=g.match(this.rgbRe);if(l){j=l[1];k=l[2];b=l[3]}}return(typeof j=="undefined")?undefined:new Ext.draw.Color(j,k,b)},getGrayscale:function(){return this.r*0.3+this.g*0.59+this.b*0.11},fromHSL:function(o,h,q){var t,s,r,p,l=[],i=Math.abs,m=Math.floor;if(h==0||o==null){l=[q,q,q]}else{o/=60;t=h*(1-i(2*q-1));s=t*(1-i(o-2*m(o/2)-1));r=q-t/2;switch(m(o)){case 0:l=[t,s,0];break;case 1:l=[s,t,0];break;case 2:l=[0,t,s];break;case 3:l=[0,s,t];break;case 4:l=[s,0,t];break;case 5:l=[t,0,s];break}l=[l[0]+r,l[1]+r,l[2]+r]}return new Ext.draw.Color(l[0]*255,l[1]*255,l[2]*255)}},function(){var b=this.prototype;this.addStatics({fromHSL:function(){return b.fromHSL.apply(b,arguments)},fromString:function(){return b.fromString.apply(b,arguments)},toHex:function(){return b.toHex.apply(b,arguments)}})});Ext.define("Ext.util.LruCache",{extend:"Ext.util.HashMap",constructor:function(b){Ext.apply(this,b);this.callParent([b])},add:function(f,h){var i=this,g=i.findKey(h),j;if(g){i.unlinkEntry(j=i.map[g]);j.prev=i.last;j.next=null}else{j={prev:i.last,next:null,key:f,value:h}}if(i.last){i.last.next=j}else{i.first=j}i.last=j;i.callParent([f,j]);i.prune();return h},insertBefore:function(g,i,l){var j=this,h,k;if(l=this.map[this.findKey(l)]){h=j.findKey(i);if(h){j.unlinkEntry(k=j.map[h])}else{k={prev:l.prev,next:l,key:g,value:i}}if(l.prev){k.prev.next=k}else{j.first=k}k.next=l;l.prev=k;j.prune();return i}else{return j.add(g,i)}},get:function(d){var c=this.map[d];if(c){if(c.next){this.moveToEnd(c)}return c.value}},removeAtKey:function(b){this.unlinkEntry(this.map[b]);return this.callParent(arguments)},clear:function(b){this.first=this.last=null;return this.callParent(arguments)},unlinkEntry:function(b){if(b){if(b.next){b.next.prev=b.prev}else{this.last=b.prev}if(b.prev){b.prev.next=b.next}else{this.first=b.next}b.prev=b.next=null}},moveToEnd:function(b){this.unlinkEntry(b);if(b.prev=this.last){this.last.next=b}else{this.first=b}this.last=b},getArray:function(f){var e=[],d=this.first;while(d){e.push(f?d.key:d.value);d=d.next}return e},each:function(l,g,h){var i=this,j=h?i.last:i.first,k=i.length;g=g||i;while(j){if(l.call(g,j.key,j.value,k)===false){break}j=h?j.prev:j.next}return i},findKey:function(d){var e,f=this.map;for(e in f){if(f.hasOwnProperty(e)&&f[e].value===d){return e}}return undefined},prune:function(){var d=this,c=d.maxSize?(d.length-d.maxSize):0;if(c>0){for(;d.first&&c;c--){d.removeAtKey(d.first.key)}}}});Ext.define("Ext.util.Bindable",{bindStore:function(f,e){var h=this,g=h.store;if(!e&&h.store){if(f!==g&&g.autoDestroy){g.destroyStore()}else{h.unbindStoreListeners(g)}h.onUnbindStore(g,e)}if(f){f=Ext.data.StoreManager.lookup(f);h.bindStoreListeners(f);h.onBindStore(f,e)}h.store=f||null;return h},getStore:function(){return this.store},unbindStoreListeners:function(d){var c=this.storeListeners;if(c){d.un(c)}},bindStoreListeners:function(e){var f=this,d=Ext.apply({},f.getStoreListeners());if(!d.scope){d.scope=f}f.storeListeners=d;e.on(d)},getStoreListeners:Ext.emptyFn,onUnbindStore:Ext.emptyFn,onBindStore:Ext.emptyFn});Ext.define("Ext.util.Offset",{statics:{fromObject:function(b){return new this(b.x,b.y)}},constructor:function(d,c){this.x=(d!=null&&!isNaN(d))?d:0;this.y=(c!=null&&!isNaN(c))?c:0;return this},copy:function(){return new Ext.util.Offset(this.x,this.y)},copyFrom:function(b){this.x=b.x;this.y=b.y},toString:function(){return"Offset["+this.x+","+this.y+"]"},equals:function(b){if(!(b instanceof this.statics())){Ext.Error.raise("Offset must be an instance of Ext.util.Offset")}return(this.x==b.x&&this.y==b.y)},round:function(c){if(!isNaN(c)){var d=Math.pow(10,c);this.x=Math.round(this.x*d)/d;this.y=Math.round(this.y*d)/d}else{this.x=Math.round(this.x);this.y=Math.round(this.y)}},isZero:function(){return this.x==0&&this.y==0}});Ext.define("Ext.layout.container.boxOverflow.None",{alternateClassName:"Ext.layout.boxOverflow.None",constructor:function(c,d){this.layout=c;Ext.apply(this,d)},handleOverflow:Ext.emptyFn,clearOverflow:Ext.emptyFn,beginLayout:Ext.emptyFn,beginLayoutCycle:Ext.emptyFn,finishedLayout:Ext.emptyFn,completeLayout:function(e){var f=this,h=e.state.boxPlan,g;if(h&&h.tooNarrow){g=f.handleOverflow(e);if(g){if(g.reservedSpace){f.layout.publishInnerCtSize(e,g.reservedSpace)}}}else{f.clearOverflow()}},onRemove:Ext.emptyFn,getItem:function(b){return this.layout.owner.getComponent(b)},getOwnerType:function(d){var c="";if(d.is("toolbar")){c="toolbar"}else{if(d.is("tabbar")){c="tabbar"}else{c=d.getXType()}}return c},getPrefixConfig:Ext.emptyFn,getSuffixConfig:Ext.emptyFn,getOverflowCls:function(){return""}});Ext.define("Ext.state.Provider",{mixins:{observable:"Ext.util.Observable"},prefix:"ext-",constructor:function(d){d=d||{};var c=this;Ext.apply(c,d);c.addEvents("statechange");c.state={};c.mixins.observable.constructor.call(c)},get:function(c,d){return typeof this.state[c]=="undefined"?d:this.state[c]},clear:function(d){var c=this;delete c.state[d];c.fireEvent("statechange",c,d,null)},set:function(e,f){var d=this;d.state[e]=f;d.fireEvent("statechange",d,e,f)},decodeValue:function(o){var r=this,k=/^(a|n|d|b|s|o|e)\:(.*)$/,s=k.exec(unescape(o)),n,q,t,l,p,m;if(!s||!s[1]){return}q=s[1];o=s[2];switch(q){case"e":return null;case"n":return parseFloat(o);case"d":return new Date(Date.parse(o));case"b":return(o=="1");case"a":n=[];if(o!=""){l=o.split("^");p=l.length;for(m=0;m<p;m++){o=l[m];n.push(r.decodeValue(o))}}return n;case"o":n={};if(o!=""){l=o.split("^");p=l.length;for(m=0;m<p;m++){o=l[m];t=o.split("=");n[t[0]]=r.decodeValue(t[1])}}return n;default:return o}},encodeValue:function(j){var i="",k=0,g,h,l;if(j==null){return"e:1"}else{if(typeof j=="number"){g="n:"+j}else{if(typeof j=="boolean"){g="b:"+(j?"1":"0")}else{if(Ext.isDate(j)){g="d:"+j.toGMTString()}else{if(Ext.isArray(j)){for(h=j.length;k<h;k++){i+=this.encodeValue(j[k]);if(k!=h-1){i+="^"}}g="a:"+i}else{if(typeof j=="object"){for(l in j){if(typeof j[l]!="function"&&j[l]!==undefined){i+=l+"="+this.encodeValue(j[l])+"^"}}g="o:"+i.substring(0,i.length-1)}else{g="s:"+j}}}}}}return escape(g)}});Ext.define("Ext.data.proxy.Server",{extend:"Ext.data.proxy.Proxy",alias:"proxy.server",alternateClassName:"Ext.data.ServerProxy",uses:["Ext.data.Request"],pageParam:"page",startParam:"start",limitParam:"limit",groupParam:"group",sortParam:"sort",filterParam:"filter",directionParam:"dir",simpleSortMode:false,noCache:true,cacheString:"_dc",timeout:30000,constructor:function(d){var c=this;d=d||{};c.callParent([d]);c.extraParams=d.extraParams||{};c.api=Ext.apply({},d.api||c.api);c.nocache=c.noCache},create:function(){return this.doRequest.apply(this,arguments)},read:function(){return this.doRequest.apply(this,arguments)},update:function(){return this.doRequest.apply(this,arguments)},destroy:function(){return this.doRequest.apply(this,arguments)},setExtraParam:function(d,c){this.extraParams[d]=c},buildRequest:function(f){var h=this,g=Ext.applyIf(f.params||{},h.extraParams||{}),e;g=Ext.applyIf(g,h.getParams(f));if(f.id&&!g.id){g.id=f.id}e=new Ext.data.Request({params:g,action:f.action,records:f.records,operation:f,url:f.url,proxy:h});e.url=h.buildUrl(e);f.request=e;return e},processResponse:function(l,r,p,q,m,k){var n=this,o,j;if(l===true){o=n.getReader();j=o.read(n.extractResponseData(q));if(j.success!==false){Ext.apply(r,{response:q,resultSet:j});r.commitRecords(j.records);r.setCompleted();r.setSuccessful()}else{r.setException(j.message);n.fireEvent("exception",this,q,r)}}else{n.setException(r,q);n.fireEvent("exception",this,q,r)}if(typeof m=="function"){m.call(k||n,r)}n.afterRequest(p,l)},setException:function(c,d){c.setException({status:d.status,statusText:d.statusText})},extractResponseData:function(b){return b},applyEncoding:function(b){return Ext.encode(b)},encodeSorters:function(g){var e=[],h=g.length,f=0;for(;f<h;f++){e[f]={property:g[f].property,direction:g[f].direction}}return this.applyEncoding(e)},encodeFilters:function(g){var e=[],h=g.length,f=0;for(;f<h;f++){e[f]={property:g[f].property,value:g[f].value}}return this.applyEncoding(e)},getParams:function(z){var s=this,t={},w=Ext.isDefined,v=z.groupers,J=z.sorters,B=z.filters,D=z.page,E=z.start,u=z.limit,C=s.simpleSortMode,x=s.pageParam,G=s.startParam,I=s.limitParam,H=s.groupParam,F=s.sortParam,y=s.filterParam,A=s.directionParam;if(x&&w(D)){t[x]=D}if(G&&w(E)){t[G]=E}if(I&&w(u)){t[I]=u}if(H&&v&&v.length>0){t[H]=s.encodeSorters(v)}if(F&&J&&J.length>0){if(C){t[F]=J[0].property;t[A]=J[0].direction}else{t[F]=s.encodeSorters(J)}}if(y&&B&&B.length>0){t[y]=s.encodeFilters(B)}return t},buildUrl:function(f){var d=this,e=d.getUrl(f);if(!e){Ext.Error.raise("You are using a ServerProxy but have not supplied it with a url.")}if(d.noCache){e=Ext.urlAppend(e,Ext.String.format("{0}={1}",d.cacheString,Ext.Date.now()))}return e},getUrl:function(b){return b.url||this.api[b.action]||this.url},doRequest:function(e,f,d){Ext.Error.raise("The doRequest function has not been implemented on your Ext.data.proxy.Server subclass. See src/data/ServerProxy.js for details")},afterRequest:Ext.emptyFn,onDestroy:function(){Ext.destroy(this.reader,this.writer)}});Ext.define("Ext.data.proxy.Client",{extend:"Ext.data.proxy.Proxy",alternateClassName:"Ext.data.ClientProxy",clear:function(){Ext.Error.raise("The Ext.data.proxy.Client subclass that you are using has not defined a 'clear' function. See src/data/ClientProxy.js for details.")}});Ext.define("Ext.data.writer.Writer",{alias:"writer.base",alternateClassName:["Ext.data.DataWriter","Ext.data.Writer"],writeAllFields:true,nameProperty:"name",constructor:function(b){Ext.apply(this,b)},write:function(j){var l=j.operation,g=l.records||[],h=g.length,k=0,i=[];for(;k<h;k++){i.push(this.getRecordData(g[k],l))}return this.writeRecords(j,i)},getRecordData:function(y,A){var s=y.phantom===true,C=this.writeAllFields||s,B=this.nameProperty,x=y.fields,q=x.items,z={},t=y.clientIdProperty,u,D,v,r,w,f;if(C){f=q.length;for(w=0;w<f;w++){v=q[w];if(v.persist){D=v[B]||v.name;z[D]=y.get(v.name)}}}else{u=y.getChanges();for(r in u){if(u.hasOwnProperty(r)){v=x.get(r);D=v[B]||v.name;z[D]=u[r]}}}if(s){if(t&&A&&A.records.length>1){z[t]=y.internalId}}else{z[y.idProperty]=y.getId()}return z}});Ext.define("Ext.dd.Registry",{singleton:true,constructor:function(){this.elements={};this.handles={};this.autoIdSeed=0},getId:function(d,e){if(typeof d=="string"){return d}var f=d.id;if(!f&&e!==false){f="extdd-"+(++this.autoIdSeed);d.id=f}return f},register:function(i,h){h=h||{};if(typeof i=="string"){i=document.getElementById(i)}h.ddel=i;this.elements[this.getId(i)]=h;if(h.isHandle!==false){this.handles[h.ddel.id]=h}if(h.handles){var j=h.handles,f,g;for(f=0,g=j.length;f<g;f++){this.handles[this.getId(j[f])]=h}}},unregister:function(k){var i=this.getId(k,false),j=this.elements[i],l,g,h;if(j){delete this.elements[i];if(j.handles){l=j.handles;for(g=0,h=l.length;g<h;g++){delete this.handles[this.getId(l[g],false)]}}}},getHandle:function(b){if(typeof b!="string"){b=b.id}return this.handles[b]},getHandleFromEvent:function(c){var d=c.getTarget();return d?this.handles[d.id]:null},getTarget:function(b){if(typeof b!="string"){b=b.id}return this.elements[b]},getTargetFromEvent:function(c){var d=c.getTarget();return d?this.elements[d.id]||this.handles[d.id]:null}});Ext.define("Ext.data.Connection",{mixins:{observable:"Ext.util.Observable"},statics:{requestId:0},url:null,async:true,method:null,username:"",password:"",disableCaching:true,withCredentials:false,cors:false,disableCachingParam:"_dc",timeout:30000,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",constructor:function(b){b=b||{};Ext.apply(this,b);this.requests={};this.mixins.observable.constructor.call(this)},request:function(k){k=k||{};var o=this,l=k.scope||window,p=k.username||o.username,n=k.password||o.password||"",s,r,q,t,m;if(o.fireEvent("beforerequest",o,k)!==false){r=o.setOptions(k,l);if(o.isFormUpload(k)){o.upload(k.form,r.url,r.data,k);return null}if(k.autoAbort||o.autoAbort){o.abort()}s=k.async!==false?(k.async||o.async):false;m=o.openRequest(k,r,s,p,n);t=o.setupHeaders(m,k,r.data,r.params);q={id:++Ext.data.Connection.requestId,xhr:m,headers:t,options:k,async:s,timeout:setTimeout(function(){q.timedout=true;o.abort(q)},k.timeout||o.timeout)};o.requests[q.id]=q;o.latestId=q.id;if(s){m.onreadystatechange=Ext.Function.bind(o.onStateChange,o,[q])}m.send(r.data);if(!s){return o.onComplete(q)}return q}else{Ext.callback(k.callback,k.scope,[k,undefined,undefined]);return null}},upload:function(I,E,t,F){I=Ext.getDom(I);F=F||{};var y=Ext.id(),A=document.createElement("iframe"),H=[],G="multipart/form-data",u={target:I.target,method:I.method,encoding:I.encoding,enctype:I.enctype,action:I.action},J=function(b,a){D=document.createElement("input");Ext.fly(D).set({type:"hidden",value:a,name:b});I.appendChild(D);H.push(D)},D,B,w,h,x,C,z,v;Ext.fly(A).set({id:y,name:y,cls:Ext.baseCSSPrefix+"hide-display",src:Ext.SSL_SECURE_URL});document.body.appendChild(A);if(document.frames){document.frames[y].name=y}Ext.fly(I).set({target:y,method:"POST",enctype:G,encoding:G,action:E||u.action});if(t){B=Ext.Object.fromQueryString(t)||{};for(h in B){if(B.hasOwnProperty(h)){w=B[h];if(Ext.isArray(w)){x=w.length;for(C=0;C<x;C++){J(h,w[C])}}else{J(h,w)}}}}Ext.fly(A).on("load",Ext.Function.bind(this.onUploadComplete,this,[A,F]),null,{single:true});I.submit();Ext.fly(I).set(u);z=H.length;for(v=0;v<z;v++){Ext.removeNode(H[v])}},onUploadComplete:function(j,e){var n=this,i={responseText:"",responseXML:null},k,l;try{k=j.contentWindow.document||j.contentDocument||window.frames[j.id].document;if(k){if(k.body){if(/textarea/i.test((l=k.body.firstChild||{}).tagName)){i.responseText=l.value}else{i.responseText=k.body.innerHTML}}i.responseXML=k.XMLDocument||k}}catch(m){}n.fireEvent("requestcomplete",n,i,e);Ext.callback(e.success,e.scope,[i,e]);Ext.callback(e.callback,e.scope,[e,true,i]);setTimeout(function(){Ext.removeNode(j)},100)},isFormUpload:function(d){var c=this.getForm(d);if(c){return(d.isUpload||(/multipart\/form-data/i).test(c.getAttribute("enctype")))}return false},getForm:function(b){return Ext.getDom(b.form)||null},setOptions:function(l,m){var o=this,r=l.params||{},p=o.extraParams,s=l.urlParams,t=l.url||o.url,n=l.jsonData,u,v,q;if(Ext.isFunction(r)){r=r.call(m,l)}if(Ext.isFunction(t)){t=t.call(m,l)}t=this.setupUrl(l,t);if(!t){Ext.Error.raise({options:l,msg:"No URL specified"})}q=l.rawData||l.xmlData||n||null;if(n&&!Ext.isPrimitive(n)){q=Ext.encode(q)}if(Ext.isObject(r)){r=Ext.Object.toQueryString(r)}if(Ext.isObject(p)){p=Ext.Object.toQueryString(p)}r=r+((p)?((r)?"&":"")+p:"");s=Ext.isObject(s)?Ext.Object.toQueryString(s):s;r=this.setupParams(l,r);u=(l.method||o.method||((r||q)?"POST":"GET")).toUpperCase();this.setupMethod(l,u);v=l.disableCaching!==false?(l.disableCaching||o.disableCaching):false;if(u==="GET"&&v){t=Ext.urlAppend(t,(l.disableCachingParam||o.disableCachingParam)+"="+(new Date().getTime()))}if((u=="GET"||q)&&r){t=Ext.urlAppend(t,r);r=null}if(s){t=Ext.urlAppend(t,s)}return{url:t,method:u,data:q||r||null}},setupUrl:function(d,e){var f=this.getForm(d);if(f){e=e||f.action}return e},setupParams:function(f,g){var h=this.getForm(f),e;if(h&&!this.isFormUpload(f)){e=Ext.Element.serializeForm(h);g=g?(g+"&"+e):e}return g},setupMethod:function(d,c){if(this.isFormUpload(d)){return"POST"}return c},setupHeaders:function(n,e,u,v){var r=this,w=Ext.apply({},e.headers||{},r.defaultHeaders||{}),o=r.defaultPostHeader,q=e.jsonData,x=e.xmlData,p,t;if(!w["Content-Type"]&&(u||v)){if(u){if(e.rawData){o="text/plain"}else{if(x&&Ext.isDefined(x)){o="text/xml"}else{if(q&&Ext.isDefined(q)){o="application/json"}}}}w["Content-Type"]=o}if(r.useDefaultXhrHeader&&!w["X-Requested-With"]){w["X-Requested-With"]=r.defaultXhrHeader}try{for(p in w){if(w.hasOwnProperty(p)){t=w[p];n.setRequestHeader(p,t)}}}catch(s){r.fireEvent("exception",p,t)}return w},newRequest:function(d){var c;if((d.cors||this.cors)&&Ext.isIE&&Ext.ieVersion>=8){c=new XDomainRequest()}else{c=this.getXhrInstance()}return c},openRequest:function(l,h,k,i,g){var j=this.newRequest(l);if(i){j.open(h.method,h.url,k,i,g)}else{j.open(h.method,h.url,k)}if(l.withCredentials||this.withCredentials){j.withCredentials=true}return j},getXhrInstance:(function(){var e=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("MSXML2.XMLHTTP.3.0")},function(){return new ActiveXObject("MSXML2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],j=0,g=e.length,h;for(;j<g;++j){try{h=e[j];h();break}catch(i){}}return h}()),isLoading:function(d){if(!d){d=this.getLatest()}if(!(d&&d.xhr)){return false}var c=d.xhr.readyState;return !(c===0||c==4)},abort:function(e){var f=this,g;if(!e){e=f.getLatest()}if(e&&f.isLoading(e)){g=e.xhr;try{g.onreadystatechange=null}catch(h){g=Ext.emptyFn}g.abort();f.clearTimeout(e);if(!e.timedout){e.aborted=true}f.onComplete(e);f.cleanup(e)}},abortAll:function(){var c=this.requests,d;for(d in c){if(c.hasOwnProperty(d)){this.abort(c[d])}}},getLatest:function(){var c=this.latestId,d;if(c){d=this.requests[c]}return d||null},onStateChange:function(b){if(b.xhr.readyState==4){this.clearTimeout(b);this.onComplete(b);this.cleanup(b)}},clearTimeout:function(b){clearTimeout(b.timeout);delete b.timeout},cleanup:function(b){b.xhr=null;delete b.xhr},onComplete:function(l){var m=this,n=l.options,i,j,e;try{i=m.parseStatus(l.xhr.status)}catch(k){i={success:false,isException:false}}j=i.success;if(j){e=m.createResponse(l);m.fireEvent("requestcomplete",m,e,n);Ext.callback(n.success,n.scope,[e,n])}else{if(i.isException||l.aborted||l.timedout){e=m.createException(l)}else{e=m.createResponse(l)}m.fireEvent("requestexception",m,e,n);Ext.callback(n.failure,n.scope,[e,n])}Ext.callback(n.callback,n.scope,[n,j,e]);delete m.requests[l.id];return e},parseStatus:function(e){e=e==1223?204:e;var f=(e>=200&&e<300)||e==304,d=false;if(!f){switch(e){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:d=true;break}}return{success:f,isException:d}},createResponse:function(r){var m=r.xhr,t={},l=m.getAllResponseHeaders().replace(/\r\n/g,"\n").split("\n"),q=l.length,k,p,n,o,s;while(q--){k=l[q];p=k.indexOf(":");if(p>=0){n=k.substr(0,p).toLowerCase();if(k.charAt(p+1)==" "){++p}t[n]=k.substr(p+1)}}r.xhr=null;delete r.xhr;s={request:r,requestId:r.id,status:m.status,statusText:m.statusText,getResponseHeader:function(a){return t[a.toLowerCase()]},getAllResponseHeaders:function(){return t},responseText:m.responseText,responseXML:m.responseXML};m=null;return s},createException:function(b){return{request:b,requestId:b.id,status:b.aborted?-1:0,statusText:b.aborted?"transaction aborted":"communication failure",aborted:b.aborted,timedout:b.timedout}}});Ext.define("Ext.data.ResultSet",{loaded:true,count:0,total:0,success:false,constructor:function(b){Ext.apply(this,b);this.totalRecords=this.total;if(b.count===undefined){this.count=this.records.length}}});Ext.define("Ext.grid.plugin.DragDrop",{extend:"Ext.AbstractPlugin",alias:"plugin.gridviewdragdrop",uses:["Ext.view.DragZone","Ext.grid.ViewDropZone"],dragText:"{0} selected row{1}",ddGroup:"GridDD",enableDrop:true,enableDrag:true,init:function(b){b.on("render",this.onViewRender,this,{single:true})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},enable:function(){var b=this;if(b.dragZone){b.dragZone.unlock()}if(b.dropZone){b.dropZone.unlock()}b.callParent()},disable:function(){var b=this;if(b.dragZone){b.dragZone.lock()}if(b.dropZone){b.dropZone.lock()}b.callParent()},onViewRender:function(d){var c=this;if(c.enableDrag){c.dragZone=new Ext.view.DragZone({view:d,ddGroup:c.dragGroup||c.ddGroup,dragText:c.dragText})}if(c.enableDrop){c.dropZone=new Ext.grid.ViewDropZone({view:d,ddGroup:c.dropGroup||c.ddGroup})}}});Ext.define("Ext.util.ClickRepeater",{extend:"Ext.util.Observable",constructor:function(d,e){var f=this;f.el=Ext.get(d);f.el.unselectable();Ext.apply(f,e);f.callParent();f.addEvents("mousedown","click","mouseup");if(!f.disabled){f.disabled=true;f.enable()}if(f.handler){f.on("click",f.handler,f.scope||f)}},interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,enable:function(){if(this.disabled){this.el.on("mousedown",this.handleMouseDown,this);if(Ext.isIE){this.el.on("dblclick",this.handleDblClick,this)}if(this.preventDefault||this.stopDefault){this.el.on("click",this.eventOptions,this)}}this.disabled=false},disable:function(b){if(b||!this.disabled){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}Ext.getDoc().un("mouseup",this.handleMouseUp,this);this.el.removeAllListeners()}this.disabled=true},setDisabled:function(b){this[b?"disable":"enable"]()},eventOptions:function(b){if(this.preventDefault){b.preventDefault()}if(this.stopDefault){b.stopEvent()}},destroy:function(){this.disable(true);Ext.destroy(this.el);this.clearListeners()},handleDblClick:function(b){clearTimeout(this.timer);this.el.blur();this.fireEvent("mousedown",this,b);this.fireEvent("click",this,b)},handleMouseDown:function(b){clearTimeout(this.timer);this.el.blur();if(this.pressedCls){this.el.addCls(this.pressedCls)}this.mousedownTime=new Date();Ext.getDoc().on("mouseup",this.handleMouseUp,this);this.el.on("mouseout",this.handleMouseOut,this);this.fireEvent("mousedown",this,b);this.fireEvent("click",this,b);if(this.accelerate){this.delay=400}b=new Ext.EventObjectImpl(b);this.timer=Ext.defer(this.click,this.delay||this.interval,this,[b])},click:function(b){this.fireEvent("click",this,b);this.timer=Ext.defer(this.click,this.accelerate?this.easeOutExpo(Ext.Date.getElapsed(this.mousedownTime),400,-390,12000):this.interval,this,[b])},easeOutExpo:function(h,b,c,d){return(h==d)?b+c:c*(-Math.pow(2,-10*h/d)+1)+b},handleMouseOut:function(){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.el.on("mouseover",this.handleMouseReturn,this)},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn,this);if(this.pressedCls){this.el.addCls(this.pressedCls)}this.click()},handleMouseUp:function(b){clearTimeout(this.timer);this.el.un("mouseover",this.handleMouseReturn,this);this.el.un("mouseout",this.handleMouseOut,this);Ext.getDoc().un("mouseup",this.handleMouseUp,this);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.fireEvent("mouseup",this,b)}});Ext.define("Ext.data.Tree",{alias:"data.tree",mixins:{observable:"Ext.util.Observable"},root:null,constructor:function(d){var c=this;c.mixins.observable.constructor.call(c);if(d){c.setRootNode(d)}},getRootNode:function(){return this.root},setRootNode:function(c){var d=this;d.root=c;if(d.fireEvent("beforeappend",null,c)!==false){c.set("root",true);c.updateInfo();c.commit();c.on({scope:d,insert:d.onNodeInsert,append:d.onNodeAppend,remove:d.onNodeRemove});d.relayEvents(c,["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort","rootchange"]);d.nodeHash={};d.registerNode(c);d.fireEvent("append",null,c);d.fireEvent("rootchange",c)}return c},flatten:function(){var e=[],f=this.nodeHash,d;for(d in f){if(f.hasOwnProperty(d)){e.push(f[d])}}return e},onNodeInsert:function(d,c){this.registerNode(c,true)},onNodeAppend:function(d,c){this.registerNode(c,true)},onNodeRemove:function(d,c){this.unregisterNode(c,true)},onNodeIdChanged:function(h,g,f){var e=this.nodeHash;e[f]=h;delete e[g||h.internalId]},getNodeById:function(b){return this.nodeHash[b]},registerNode:function(f,e){var d=this;d.nodeHash[f.getId()||f.internalId]=f;f.on("idchanged",d.onNodeIdChanged,d);if(e===true){f.eachChild(function(a){d.registerNode(a,true)})}},unregisterNode:function(c,d){delete this.nodeHash[c.getId()||c.internalId];if(d===true){c.eachChild(function(a){this.unregisterNode(a,true)},this)}},sort:function(c,d){this.getRootNode().sort(c,d)},filter:function(c,d){this.getRootNode().filter(c,d)}});Ext.ns("Ext.fx");Ext.require("Ext.fx.CubicBezier",function(){var l=Math,j=l.PI,m=l.pow,h=l.sin,k=l.sqrt,i=l.abs,n=1.70158;Ext.fx.Easing={};Ext.apply(Ext.fx.Easing,{linear:function(a){return a},ease:function(f){var s=0.07813-f/2,e=-0.25,d=k(0.0066+s*s),b=d-s,g=m(i(b),1/3)*(b<0?-1:1),c=-d-s,q=m(i(c),1/3)*(c<0?-1:1),a=g+q+0.25;return m(1-a,2)*3*a*0.1+(1-a)*3*a*a+a*a*a},easeIn:function(a){return m(a,1.7)},easeOut:function(a){return m(a,0.48)},easeInOut:function(g){var c=0.48-g/1.04,d=k(0.1734+c*c),f=d-c,q=m(i(f),1/3)*(f<0?-1:1),a=-d-c,b=m(i(a),1/3)*(a<0?-1:1),e=q+b+0.5;return(1-e)*3*e*e+e*e*e},backIn:function(a){return a*a*((n+1)*a-n)},backOut:function(a){a=a-1;return a*a*((n+1)*a+n)+1},elasticIn:function(a){if(a===0||a===1){return a}var b=0.3,c=b/4;return m(2,-10*a)*h((a-c)*(2*j)/b)+1},elasticOut:function(a){return 1-Ext.fx.Easing.elasticIn(1-a)},bounceIn:function(a){return 1-Ext.fx.Easing.bounceOut(1-a)},bounceOut:function(a){var c=7.5625,b=2.75,d;if(a<(1/b)){d=c*a*a}else{if(a<(2/b)){a-=(1.5/b);d=c*a*a+0.75}else{if(a<(2.5/b)){a-=(2.25/b);d=c*a*a+0.9375}else{a-=(2.625/b);d=c*a*a+0.984375}}}return d}});Ext.apply(Ext.fx.Easing,{"back-in":Ext.fx.Easing.backIn,"back-out":Ext.fx.Easing.backOut,"ease-in":Ext.fx.Easing.easeIn,"ease-out":Ext.fx.Easing.easeOut,"elastic-in":Ext.fx.Easing.elasticIn,"elastic-out":Ext.fx.Easing.elasticIn,"bounce-in":Ext.fx.Easing.bounceIn,"bounce-out":Ext.fx.Easing.bounceOut,"ease-in-out":Ext.fx.Easing.easeInOut})});Ext.define("Ext.util.MixedCollection",{extend:"Ext.util.AbstractMixedCollection",mixins:{sortable:"Ext.util.Sortable"},constructor:function(){var b=this;b.callParent(arguments);b.addEvents("sort");b.mixins.sortable.initSortable.call(b)},doSort:function(b){this.sortBy(b)},_sort:function(i,t,m){var n=this,r,q,s=String(t).toUpperCase()=="DESC"?-1:1,o=[],c=n.keys,p=n.items;m=m||function(a,b){return a-b};for(r=0,q=p.length;r<q;r++){o[o.length]={key:c[r],value:p[r],index:r}}Ext.Array.sort(o,function(b,d){var a=m(b[i],d[i])*s;if(a===0){a=(b.index<d.index?-1:1)}return a});for(r=0,q=o.length;r<q;r++){p[r]=o[r].value;c[r]=o[r].key}n.fireEvent("sort",n)},sortBy:function(n){var j=this,h=j.items,k=j.keys,l=h.length,i=[],m;for(m=0;m<l;m++){i[m]={key:k[m],value:h[m],index:m}}Ext.Array.sort(i,function(b,c){var a=n(b.value,c.value);if(a===0){a=(b.index<c.index?-1:1)}return a});for(m=0;m<l;m++){h[m]=i[m].value;k[m]=i[m].key}j.fireEvent("sort",j,h,k)},findInsertionIndex:function(n,o){var m=this,i=m.items,k=0,j=i.length-1,p,l;if(!o){o=m.generateComparator()}while(k<=j){p=(k+j)>>1;l=o(n,i[p]);if(l>=0){k=p+1}else{if(l<0){j=p-1}}}return k},reorder:function(o){var l=this,i=l.items,p=0,m=i.length,j=[],n=[],k;l.suspendEvents();for(k in o){j[o[k]]=i[k]}for(p=0;p<m;p++){if(o[p]==undefined){n.push(i[p])}}for(p=0;p<m;p++){if(j[p]==undefined){j[p]=n.shift()}}l.clear();l.addAll(j);l.resumeEvents();l.fireEvent("sort",l)},sortByKey:function(d,c){this._sort("key",d,c||function(g,h){var a=String(g).toUpperCase(),b=String(h).toUpperCase();return a>b?1:(a<b?-1:0)})}});Ext.define("Ext.data.AbstractStore",{requires:["Ext.util.MixedCollection","Ext.data.proxy.Proxy","Ext.data.Operation","Ext.util.Filter"],mixins:{observable:"Ext.util.Observable",sortable:"Ext.util.Sortable"},statics:{create:function(b){if(!b.isStore){if(!b.type){b.type="store"}b=Ext.createByAlias("store."+b.type,b)}return b}},remoteSort:false,remoteFilter:false,autoLoad:undefined,autoSync:false,batchUpdateMode:"operation",filterOnLoad:true,sortOnLoad:true,implicitModel:false,defaultProxyType:"memory",isDestroyed:false,isStore:true,sortRoot:"data",constructor:function(e){var f=this,d;Ext.apply(f,e);f.removed=[];f.mixins.observable.constructor.apply(f,arguments);f.model=Ext.ModelManager.getModel(f.model);Ext.applyIf(f,{modelDefaults:{}});if(!f.model&&f.fields){f.model=Ext.define("Ext.data.Store.ImplicitModel-"+(f.storeId||Ext.id()),{extend:"Ext.data.Model",fields:f.fields,proxy:f.proxy||f.defaultProxyType});delete f.fields;f.implicitModel=true}if(!f.model&&f.useModelWarning!==false){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Store defined with no model. You may have mistyped the model name.")}}f.setProxy(f.proxy||f.model.getProxy());f.proxy.on("metachange",f.onMetaChange,f);if(f.id&&!f.storeId){f.storeId=f.id;delete f.id}if(f.storeId){Ext.data.StoreManager.register(f)}f.mixins.sortable.initSortable.call(f);d=f.decodeFilters(f.filters);f.filters=new Ext.util.MixedCollection();f.filters.addAll(d)},setProxy:function(d){var c=this;if(d instanceof Ext.data.proxy.Proxy){d.setModel(c.model)}else{if(Ext.isString(d)){d={type:d}}Ext.applyIf(d,{model:c.model});d=Ext.createByAlias("proxy."+d.type,d)}c.proxy=d;return c.proxy},getProxy:function(){return this.proxy},onMetaChange:function(d,c){this.fireEvent("metachange",this,c)},create:function(h,j){var i=this,g=Ext.ModelManager.create(Ext.applyIf(h,i.modelDefaults),i.model.modelName),f;j=j||{};Ext.applyIf(j,{action:"create",records:[g]});f=new Ext.data.Operation(j);i.proxy.create(f,i.onProxyWrite,i);return g},read:function(){return this.load.apply(this,arguments)},update:function(d){var f=this,e;d=d||{};Ext.applyIf(d,{action:"update",records:f.getUpdatedRecords()});e=new Ext.data.Operation(d);return f.proxy.update(e,f.onProxyWrite,f)},onProxyWrite:function(e){var h=this,g=e.wasSuccessful(),f=e.getRecords();switch(e.action){case"create":h.onCreateRecords(f,e,g);break;case"update":h.onUpdateRecords(f,e,g);break;case"destroy":h.onDestroyRecords(f,e,g);break}if(g){h.fireEvent("write",h,e);h.fireEvent("datachanged",h);h.fireEvent("refresh",h)}Ext.callback(e.callback,e.scope||h,[f,e,g])},onCreateRecords:Ext.emptyFn,onUpdateRecords:Ext.emptyFn,onDestroyRecords:function(d,e,f){if(f){this.removed=[]}},destroy:function(d){var f=this,e;d=d||{};Ext.applyIf(d,{action:"destroy",records:f.getRemovedRecords()});e=new Ext.data.Operation(d);return f.proxy.destroy(e,f.onProxyWrite,f)},onBatchOperationComplete:function(c,d){return this.onProxyWrite(d)},onBatchComplete:function(l,h){var i=this,g=l.operations,j=g.length,k;i.suspendEvents();for(k=0;k<j;k++){i.onProxyWrite(g[k])}i.resumeEvents();i.fireEvent("datachanged",i);i.fireEvent("refresh",i)},onBatchException:function(c,d){},filterNew:function(b){return b.phantom===true&&b.isValid()},getNewRecords:function(){return[]},getUpdatedRecords:function(){return[]},getModifiedRecords:function(){return[].concat(this.getNewRecords(),this.getUpdatedRecords())},filterUpdated:function(b){return b.dirty===true&&b.phantom!==true&&b.isValid()},getRemovedRecords:function(){return this.removed},filter:function(d,c){},decodeFilters:function(h){if(!Ext.isArray(h)){if(h===undefined){h=[]}else{h=[h]}}var i=h.length,g=Ext.util.Filter,f,j;for(j=0;j<i;j++){f=h[j];if(!(f instanceof g)){Ext.apply(f,{root:"data"});if(f.fn){f.filterFn=f.fn}if(typeof f=="function"){f={filterFn:f}}h[j]=new g(f)}}return h},clearFilter:function(b){},isFiltered:function(){},filterBy:function(c,d){},sync:function(n){var l=this,h={},k=l.getNewRecords(),m=l.getUpdatedRecords(),i=l.getRemovedRecords(),j=false;if(k.length>0){h.create=k;j=true}if(m.length>0){h.update=m;j=true}if(i.length>0){h.destroy=i;j=true}if(j&&l.fireEvent("beforesync",h)!==false){n=n||{};l.proxy.batch(Ext.apply(n,{operations:h,listeners:l.getBatchListeners()}))}return l},getBatchListeners:function(){var c=this,d={scope:c,exception:c.onBatchException};if(c.batchUpdateMode=="operation"){d.operationcomplete=c.onBatchOperationComplete}else{d.complete=c.onBatchComplete}return d},save:function(){return this.sync.apply(this,arguments)},load:function(d){var f=this,e;d=d||{};d.action=d.action||"read";d.filters=d.filters||f.filters.items;d.sorters=d.sorters||f.getSorters();e=new Ext.data.Operation(d);if(f.fireEvent("beforeload",f,e)!==false){f.loading=true;f.proxy.read(e,f.onProxyLoad,f)}return f},afterEdit:function(g,h){var i=this,f,j;if(i.autoSync&&!i.autoSyncSuspended){for(f=h.length;f--;){if(g.fields.get(h[f]).persist){j=true;break}}if(j){i.sync()}}i.fireEvent("update",i,g,Ext.data.Model.EDIT,h)},afterReject:function(b){this.fireEvent("update",this,b,Ext.data.Model.REJECT,null)},afterCommit:function(b){this.fireEvent("update",this,b,Ext.data.Model.COMMIT,null)},destroyStore:function(){var b=this;if(!b.isDestroyed){if(b.storeId){Ext.data.StoreManager.unregister(b)}b.clearData();b.data=b.tree=b.sorters=b.filters=b.groupers=null;if(b.reader){b.reader.destroyReader()}b.proxy=b.reader=b.writer=null;b.clearListeners();b.isDestroyed=true;if(b.implicitModel){Ext.destroy(b.model)}else{b.model=null}}},doSort:function(d){var c=this;if(c.remoteSort){c.load()}else{c.data.sortBy(d);c.fireEvent("datachanged",c);c.fireEvent("refresh",c)}},clearData:Ext.emptyFn,getCount:Ext.emptyFn,getById:Ext.emptyFn,removeAll:Ext.emptyFn,isLoading:function(){return !!this.loading},suspendAutoSync:function(){this.autoSyncSuspended=true},resumeAutoSync:function(){this.autoSyncSuspended=false}});Ext.define("Ext.data.StoreManager",{extend:"Ext.util.MixedCollection",alternateClassName:["Ext.StoreMgr","Ext.data.StoreMgr","Ext.StoreManager"],singleton:true,uses:["Ext.data.ArrayStore"],register:function(){for(var d=0,c;(c=arguments[d]);d++){this.add(c)}},unregister:function(){for(var d=0,c;(c=arguments[d]);d++){this.remove(this.lookup(c))}},lookup:function(l){if(Ext.isArray(l)){var g=["field1"],j=!Ext.isArray(l[0]),i=l,k,h;if(j){i=[];for(k=0,h=l.length;k<h;++k){i.push([l[k]])}}else{for(k=2,h=l[0].length;k<=h;++k){g.push("field"+k)}}return new Ext.data.ArrayStore({data:i,fields:g,autoDestroy:true,autoCreated:true,expanded:j})}if(Ext.isString(l)){return this.get(l)}else{return Ext.data.AbstractStore.create(l)}},getKey:function(b){return b.storeId}},function(){Ext.regStore=function(f,d){var e;if(Ext.isObject(f)){d=f}else{d.storeId=f}if(d instanceof Ext.data.Store){e=d}else{e=new Ext.data.Store(d)}return Ext.data.StoreManager.register(e)};Ext.getStore=function(b){return Ext.data.StoreManager.lookup(b)}});Ext.define("Docs.view.cls.PackageLogic",{extend:"Docs.view.cls.Logic",create:function(){this.root={children:[],text:"Root"};this.packages={"":this.root};this.privates=[];Ext.Array.forEach(this.classes,this.addClass,this);this.sortTree(this.root);return{root:this.root,privates:this.privates}},sortTree:function(b){b.children.sort(this.compare);Ext.Array.forEach(b.children,this.sortTree,this)},compare:function(g,h){if(g.leaf===h.leaf){var b=g.text.toLowerCase();var a=h.text.toLowerCase();return b>a?1:(b<a?-1:0)}else{return g.leaf?1:-1}},addClass:function(g){if(g["private"]&&!this.showPrivateClasses){this.privates.push(this.classNode(g));return}if(this.packages[g.name]){var f=this.packages[g.name];var i=this.classNode(g);f.iconCls=i.iconCls;f.url=i.url}else{var h=this.packageName(g.name);var j=this.packages[h]||this.addPackage(h);var i=this.classNode(g);this.addChild(j,i);this.packages[g.name]=i}},addPackage:function(e){var g=this.packageName(e);var h=this.packages[g]||this.addPackage(g);var f=this.packageNode(e);this.addChild(h,f);this.packages[e]=f;return f},addChild:function(d,c){d.children.push(c);if(d.leaf){d.leaf=false}},classNode:function(b){return{text:this.shortName(b.name),url:"#!/api/"+b.name,iconCls:b.icon,cls:b["private"]?"private":"",leaf:true,children:[]}},packageNode:function(b){return{text:this.shortName(b),iconCls:"icon-pkg",leaf:false,children:[]}},packageName:function(b){return b.slice(0,-this.shortName(b).length-1)||""},shortName:function(d){var c=d.split(/\./);return c.pop()}});Ext.define("Docs.view.cls.InheritanceLogic",{extend:"Docs.view.cls.Logic",create:function(){this.root={children:[],text:"Root"};this.privates=[];this.subclasses=this.buildLookupTable(this.classes);Ext.Array.forEach(this.classes,this.addClass,this);if(!this.showPrivateClasses){this.stripPrivateClasses(this.root)}this.sortTree(this.root);return{root:this.root,privates:this.privates}},sortTree:function(b){b.children.sort(Ext.bind(this.compare,this));Ext.Array.forEach(b.children,this.sortTree,this)},compare:function(g,h){var b=g.text.toLowerCase();var a=h.text.toLowerCase();return b>a?1:(b<a?-1:0)},buildLookupTable:function(d){var c={};Ext.Array.forEach(d,function(b){var a=b["extends"];if(a&&a!=="Object"){if(!c[a]){c[a]=[]}c[a].push(b)}},this);return c},classNode:function(b){return{text:b.name,url:"#!/api/"+b.name,iconCls:b.icon,cls:b["private"]?"private":""}},addClass:function(e){var d=e["extends"];if(!d||d==="Object"){var f=this.classNode(e);this.root.children.push(f);f.children=this.getSubclasses(e.name);f.leaf=f.children.length===0}},getSubclasses:function(b){if(!this.subclasses[b]){return[]}return Ext.Array.map(this.subclasses[b],function(a){var d=this.classNode(a);d.children=this.getSubclasses(a.name);d.leaf=d.children.length===0;return d},this)},stripPrivateClasses:function(b){b.children=Ext.Array.filter(b.children,function(a){this.stripPrivateClasses(a);if(a.cls==="private"&&a.children.length===0){this.privates.push(a);return false}else{return true}},this)}});Ext.define("Ext.container.DockingContainer",{requires:["Ext.util.MixedCollection","Ext.Element"],isDockingContainer:true,defaultDockWeights:{top:{render:1,visual:1},left:{render:3,visual:5},right:{render:5,visual:7},bottom:{render:7,visual:3}},dockOrder:{top:-1,left:-1,right:1,bottom:1},addDocked:function(h,i){var j=this,g=0,k,l;h=j.prepareItems(h);l=h.length;for(;g<l;g++){k=h[g];k.dock=k.dock||"top";if(i!==undefined){j.dockedItems.insert(i+g,k)}else{j.dockedItems.add(k)}if(k.onAdded!==Ext.emptyFn){k.onAdded(j,g)}if(j.onDockedAdd!==Ext.emptyFn){j.onDockedAdd(k)}}if(j.rendered&&!j.suspendLayout){j.updateLayout()}return h},destroyDockedItems:function(){var d=this.dockedItems,c;if(d){while((c=d.first())){this.removeDocked(c,true)}}},doRenderDockedItems:function(n,k,j){var l=k.$comp,m=l.componentLayout,h,i;if(m.getDockedItems&&!k.$skipDockedItems){h=m.getDockedItems("render",!j);i=h&&m.getItemsRenderTree(h);if(i){Ext.DomHelper.generateMarkup(i,n)}}},getDockedComponent:function(b){if(Ext.isObject(b)){b=b.getItemId()}return this.dockedItems.get(b)},getDockedItems:function(e,f){var d=this.getComponentLayout().getDockedItems("render",f);if(e&&d.length){d=Ext.ComponentQuery.query(e,d)}return d},getDockingRefItems:function(f,h){var g=f&&"*,* *",i=this.getDockedItems(g,true),j;i.push.apply(i,h);j=this.getDockedItems(g,false);i.push.apply(i,j);return i},initDockingItems:function(){var c=this,d=c.dockedItems;c.dockedItems=new Ext.util.AbstractMixedCollection(false,c.getComponentId);if(d){c.addDocked(d)}},insertDocked:function(c,d){this.addDocked(d,c)},onDockedAdd:Ext.emptyFn,onDockedRemove:Ext.emptyFn,removeDocked:function(h,f){var i=this,j,g;if(!i.dockedItems.contains(h)){return h}j=i.componentLayout;g=j&&i.rendered;if(g){j.onRemove(h)}i.dockedItems.remove(h);h.onRemoved();i.onDockedRemove(h);if(f===true||(f!==false&&i.autoDestroy)){h.destroy()}else{if(g){j.afterRemove(h)}}if(!i.destroying&&!i.suspendLayout){i.updateLayout()}return h},setupDockingRenderTpl:function(b){b.renderDockedItems=this.doRenderDockedItems}});Ext.define("Ext.XTemplateCompiler",{extend:"Ext.XTemplateParser",useEval:Ext.isGecko,useIndex:Ext.isIE6||Ext.isIE7,useFormat:true,propNameRe:/^[\w\d\$]*$/,compile:function(e){var f=this,d=f.generate(e);return f.useEval?f.evalTpl(d):(new Function("Ext",d))(Ext)},generate:function(f){var g=this,e="var fm=Ext.util.Format,ts=Object.prototype.toString;",h;g.maxLevel=0;g.body=["var c0=values, a0="+g.createArrayTest(0)+", p0=parent, n0=xcount, i0=xindex, v;\n"];if(g.definitions){if(typeof g.definitions==="string"){g.definitions=[g.definitions,e]}else{g.definitions.push(e)}}else{g.definitions=[e]}g.switches=[];g.parse(f);g.definitions.push((g.useEval?"$=":"return")+" function ("+g.fnArgs+") {",g.body.join(""),"}");h=g.definitions.join("\n");g.definitions.length=g.body.length=g.switches.length=0;delete g.definitions;delete g.body;delete g.switches;return h},doText:function(f){var d=this,e=d.body;f=f.replace(d.aposRe,"\\'").replace(d.newLineRe,"\\n");if(d.useIndex){e.push("out[out.length]='",f,"'\n")}else{e.push("out.push('",f,"')\n")}},doExpr:function(c){var d=this.body;d.push("if ((v="+c+")!==undefined) out");if(this.useIndex){d.push("[out.length]=v+''\n")}else{d.push(".push(v+'')\n")}},doTag:function(b){this.doExpr(this.parseTag(b))},doElse:function(){this.body.push("} else {\n")},doEval:function(b){this.body.push(b,"\n")},doIf:function(d,f){var e=this;if(d==="."){e.body.push("if (values) {\n")}else{if(e.propNameRe.test(d)){e.body.push("if (",e.parseTag(d),") {\n")}else{e.body.push("if (",e.addFn(d),e.callFn,") {\n")}}if(f.exec){e.doExec(f.exec)}},doElseIf:function(d,f){var e=this;if(d==="."){e.body.push("else if (values) {\n")}else{if(e.propNameRe.test(d)){e.body.push("} else if (",e.parseTag(d),") {\n")}else{e.body.push("} else if (",e.addFn(d),e.callFn,") {\n")}}if(f.exec){e.doExec(f.exec)}},doSwitch:function(c){var d=this;if(c==="."){d.body.push("switch (values) {\n")}else{if(d.propNameRe.test(c)){d.body.push("switch (",d.parseTag(c),") {\n")}else{d.body.push("switch (",d.addFn(c),d.callFn,") {\n")}}d.switches.push(0)},doCase:function(j){var k=this,l=Ext.isArray(j)?j:[j],i=k.switches.length-1,h,g;if(k.switches[i]){k.body.push("break;\n")}else{k.switches[i]++}for(g=0,i=l.length;g<i;++g){h=k.intRe.exec(l[g]);l[g]=h?h[1]:("'"+l[g].replace(k.aposRe,"\\'")+"'")}k.body.push("case ",l.join(": case "),":\n")},doDefault:function(){var d=this,c=d.switches.length-1;if(d.switches[c]){d.body.push("break;\n")}else{d.switches[c]++}d.body.push("default:\n")},doEnd:function(e,g){var h=this,f=h.level-1;if(e=="for"){if(g.exec){h.doExec(g.exec)}h.body.push("}\n");h.body.push("parent=p",f,";values=r",f+1,";xcount=n",f,";xindex=i",f,"\n")}else{if(e=="if"||e=="switch"){h.body.push("}\n")}}},doFor:function(m,k){var n=this,o,i=n.level,j=i-1,p="p"+i,l;if(m==="."){o="values"}else{if(n.propNameRe.test(m)){o=n.parseTag(m)}else{o=n.addFn(m)+n.callFn}}if(n.maxLevel<i){n.maxLevel=i;n.body.push("var ")}if(m=="."){l="c"+i}else{l="a"+j+"?c"+j+"[i"+j+"]:p"+i}n.body.push("i",i,"=0,n",i,"=0,c",i,"=",o,",a",i,"=",n.createArrayTest(i),",p",i,"=c",j,",r",i,"=values;\n","parent=",l,"\n","if (c",i,"){if(a",i,"){n",i,"=c",i,".length;}else if (c",i,".isMixedCollection){c",i,"=c",i,".items;n",i,"=c",i,".length;}else if(c",i,".isStore){c",i,"=c",i,".data.items;n",i,"=c",i,".length;}else{c",i,"=[c",i,"];n",i,"=1;}}\n","for (xcount=n",i,";i",i,"<n"+i+";++i",i,"){\n","values=c",i,"[i",i,"]");if(k.propName){n.body.push(".",k.propName)}n.body.push("\n","xindex=i",i,"+1\n")},createArrayTest:("isArray" in Array)?function(b){return"Array.isArray(c"+b+")"}:function(b){return"ts.call(c"+b+')==="[object Array]"'},doExec:function(h,g){var e=this,f="f"+e.definitions.length;e.definitions.push("function "+f+"("+e.fnArgs+") {"," try { with(values) {"," "+h," }} catch(e) {",'Ext.log("XTemplate Error: " + e.message);',"}","}");e.body.push(f+e.callFn+"\n")},addFn:function(e){var f=this,d="f"+f.definitions.length;if(e==="."){f.definitions.push("function "+d+"("+f.fnArgs+") {"," return values","}")}else{if(e===".."){f.definitions.push("function "+d+"("+f.fnArgs+") {"," return parent","}")}else{f.definitions.push("function "+d+"("+f.fnArgs+") {"," try { with(values) {"," return("+e+")"," }} catch(e) {",'Ext.log("XTemplate Error: " + e.message);',"}","}")}}return d},parseTag:function(i){var l=this,j=l.tagRe.exec(i),n=j[1],k=j[2],o=j[3],m=j[4],p;if(n=="."){if(!l.validTypes){l.definitions.push("var validTypes={string:1,number:1,boolean:1};");l.validTypes=true}p='validTypes[typeof values] || ts.call(values) === "[object Date]" ? values : ""'}else{if(n=="#"){p="xindex"}else{if(n.substr(0,7)=="parent."){p=n}else{if(isNaN(n)&&n.indexOf("-")==-1&&n.indexOf(".")!=-1){p="values."+n}else{p="values['"+n+"']"}}}}if(m){p="("+p+m+")"}if(k&&l.useFormat){o=o?","+o:"";if(k.substr(0,5)!="this."){k="fm."+k+"("}else{k+="("}}else{return p}return k+p+o+")"},evalTpl:function($){eval($);return $},newLineRe:/\r\n|\r|\n/g,aposRe:/[']/g,intRe:/^\s*(\d+)\s*$/,tagRe:/([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?/},function(){var b=this.prototype;b.fnArgs="out,values,parent,xindex,xcount";b.callFn=".call(this,"+b.fnArgs+")"});Ext.define("Ext.XTemplate",{extend:"Ext.Template",requires:"Ext.XTemplateCompiler",apply:function(b){return this.applyOut(b,[]).join("")},applyOut:function(g,e){var i=this,j;if(!i.fn){j=new Ext.XTemplateCompiler({useFormat:i.disableFormats!==true,definitions:i.definitions});i.fn=j.compile(i.html)}try{i.fn.call(i,e,g,{},1,1)}catch(h){Ext.log("Error: "+h.message)}return e},compile:function(){return this},statics:{getTpl:function(f,h){var e=f[h],g;if(e&&!e.isTemplate){e=Ext.ClassManager.dynInstantiate("Ext.XTemplate",e);if(f.hasOwnProperty(h)){f[h]=e}else{for(g=f.self.prototype;g;g=g.superclass){if(g.hasOwnProperty(h)){g[h]=e;break}}}}return e||null}}});Ext.define("Ext.layout.Layout",{requires:["Ext.XTemplate"],uses:["Ext.layout.Context"],isLayout:true,initialized:false,running:false,autoSizePolicy:{setsWidth:0,setsHeight:0},statics:{layoutsByType:{},create:function(o,p){var k=Ext.ClassManager,r=this.layoutsByType,q,n,s,t,m,l;if(!o||typeof o==="string"){m=o||p;s={}}else{if(o.isLayout){return o}else{s=o;m=o.type||p}}if(!(t=r[m])){q="layout."+m;n=k.getNameByAlias(q);if(!n){l=true}t=k.get(n);if(l||!t){return k.instantiateByAlias(q,s||{})}r[m]=t}return new t(s)}},constructor:function(d){var c=this;c.id=Ext.id(null,c.type+"-");Ext.apply(c,d);c.layoutCount=0},beginLayout:Ext.emptyFn,beginLayoutCycle:function(h){var e=this,f=e.context,g;if(e.lastWidthModel!=h.widthModel){if(e.lastWidthModel){g=true}e.lastWidthModel=h.widthModel}if(e.lastHeightModel!=h.heightModel){if(e.lastWidthModel){g=true}e.lastHeightModel=h.heightModel}if(g){(f=h.context).clearTriggers(e,false);f.clearTriggers(e,true);e.triggerCount=0}},finishedLayout:function(){this.ownerContext=null},redoLayout:Ext.emptyFn,undoLayout:Ext.emptyFn,getAnimatePolicy:function(){return this.animatePolicy},getItemSizePolicy:function(b){return this.autoSizePolicy},isItemBoxParent:function(b){return false},isItemLayoutRoot:function(g){var h=g.getSizeModel(),e=h.width,f=h.height;if(!g.componentLayout.lastComponentSize&&(e.calculated||f.calculated)){return false}return !e.shrinkWrap&&!f.shrinkWrap},isItemShrinkWrap:function(b){return b.shrinkWrap},isRunning:function(){return !!this.ownerContext},getItemsRenderTree:function(m,h){var j=m.length,l,k,n,i;if(j){i=[];for(l=0;l<j;++l){k=m[l];if(!k.rendered){if(h&&(h[k.id]!==undefined)){n=h[k.id]}else{this.configureItem(k);n=k.getRenderTree();if(h){h[k.id]=n}}if(n){i.push(n)}}}}return i},finishRender:Ext.emptyFn,finishRenderItems:function(h,g){var i=g.length,f,j;for(f=0;f<i;f++){j=g[f];if(j.rendering){j.finishRender(f);this.afterRenderItem(j)}}},renderChildren:function(){var d=this,e=d.getLayoutItems(),f=d.getRenderTarget();d.renderItems(e,f)},renderItems:function(h,i){var j=this,k=h.length,g=0,l;if(k){Ext.suspendLayouts();for(;g<k;g++){l=h[g];if(l&&!l.rendered){j.renderItem(l,i,g)}else{if(!j.isValidParent(l,i,g)){j.moveItem(l,i,g)}else{j.configureItem(l)}}}Ext.resumeLayouts(true)}},isValidParent:function(i,h,g){var f=i.el?i.el.dom:Ext.getDom(i),j=(h&&h.dom)||h;if(f.parentNode&&f.parentNode.className.indexOf(Ext.baseCSSPrefix+"resizable-wrap")!==-1){f=f.parentNode}if(f&&j){if(typeof g=="number"){return f===j.childNodes[g]}return f.parentNode===j}return false},configureItem:function(b){b.ownerLayout=this},renderItem:function(d,f,e){if(!d.rendered){this.configureItem(d);d.render(f,e);this.afterRenderItem(d)}},moveItem:function(d,f,e){f=f.dom||f;if(typeof e=="number"){e=f.childNodes[e]}f.insertBefore(d.el.dom,e||null);d.container=Ext.get(f);this.configureItem(d)},onContentChange:function(){this.owner.updateLayout();return true},initLayout:function(){this.initialized=true},setOwner:function(b){this.owner=b},getLayoutItems:function(){return[]},afterRenderItem:Ext.emptyFn,onAdd:Ext.emptyFn,onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,afterRemove:function(h){var i=this,j=h.el,f=i.owner,g;if(h.rendered){g=[].concat(i.itemCls||[]);if(f.itemCls){g=Ext.Array.push(g,f.itemCls)}if(g.length){j.removeCls(g)}}delete h.ownerLayout},destroy:function(){var d=this,c;if(d.targetCls){c=d.getTarget();if(c){c.removeCls(d.targetCls)}}d.onDestroy()},sortWeightedItems:function(f,g){for(var e=0,h=f.length;e<h;++e){f[e].$i=e}Ext.Array.sort(f,function(b,c){var a=c.weight-b.weight;if(!a){a=b.$i-c.$i;if(b[g]){a=-a}}return a});for(e=0;e<h;++e){delete f[e].$i}}},function(){var h=this,e={};h.prototype.sizeModels=h.sizeModels=e;var f=function(b){var a=this,c=b.name;Ext.apply(Ext.apply(a,g),b);a[c]=true;f[c]=e[c]=a;a.fixed=!(a.auto=a.natural||a.shrinkWrap)};Ext.layout.SizeModel=f;var g={calculated:false,configured:false,constrainedMax:false,constrainedMin:false,natural:false,shrinkWrap:false,calculatedFromConfigured:false,calculatedFromNatural:false,calculatedFromShrinkWrap:false,names:null};new f({name:"calculated"});new f({name:"configured",names:{width:"width",height:"height"}});new f({name:"natural"});new f({name:"shrinkWrap"});new f({name:"calculatedFromConfigured",configured:true,names:{width:"width",height:"height"}});new f({name:"calculatedFromNatural",natural:true});new f({name:"calculatedFromShrinkWrap",shrinkWrap:true});new f({name:"constrainedMax",configured:true,constrained:true,names:{width:"maxWidth",height:"maxHeight"}});new f({name:"constrainedMin",configured:true,constrained:true,names:{width:"minWidth",height:"minHeight"}})});Ext.define("Ext.layout.container.Container",{extend:"Ext.layout.Layout",alternateClassName:"Ext.layout.ContainerLayout",mixins:{elementCt:"Ext.util.ElementContainer"},requires:["Ext.XTemplate"],type:"container",manageOverflow:0,beginCollapse:Ext.emptyFn,beginExpand:Ext.emptyFn,animatePolicy:null,childEls:["overflowPadderEl"],renderTpl:["{%this.renderBody(out,values)%}"],usesContainerHeight:true,usesContainerWidth:true,usesHeight:true,usesWidth:true,reserveScrollbar:false,lastOverflowAdjust:{width:0,height:0},constructor:function(){this.callParent(arguments);this.mixins.elementCt.constructor.call(this)},destroy:function(){this.callParent();this.mixins.elementCt.destroy.call(this)},initLayout:function(){var c=this,d=Ext.getScrollbarSize().width;c.callParent();if(d&&c.manageOverflow&&!c.hasOwnProperty("lastOverflowAdjust")){if(c.owner.autoScroll||c.reserveScrollbar){c.lastOverflowAdjust={width:d,height:0}}}},beginLayout:function(b){this.callParent(arguments);b.targetContext=b.getEl("getTarget",this);this.cacheChildItems(b)},beginLayoutCycle:function(h,f){var e=this,g=e.overflowPadderEl;e.callParent(arguments);if(!h.state.overflowAdjust){h.state.overflowAdjust=e.lastOverflowAdjust}if(f){if(e.usesContainerHeight){++h.consumersContainerHeight}if(e.usesContainerWidth){++h.consumersContainerWidth}}if(g){g.setStyle("display","none")}},completeLayout:function(b){this.lastOverflowAdjust=b.state.overflowAdjust},cacheChildItems:function(j){var l=j.context,i=[],h=this.getVisibleItems(),k=h.length,g;j.childItems=i;j.visibleItems=h;for(g=0;g<k;++g){i.push(l.getCmp(h[g]))}},cacheElements:function(){var b=this.owner;this.applyChildEls(b.el,b.id)},calculateContentSize:function(L,P){var K=this,W=(P||0)|K.manageOverflow|((L.widthModel.shrinkWrap?1:0)|(L.heightModel.shrinkWrap?2:0)),X=(W&1)||undefined,S=(W&2)||undefined,Y=L.childItems,U=Y.length,E=0,G=0,O=0,V=L.props,J,M,N,i,T,Q,H,B,C,I,D,Z,F,R;if(X){if(isNaN(V.contentWidth)){++O}else{X=undefined}}if(S){if(isNaN(V.contentHeight)){++O}else{S=undefined}}if(O){for(D=0;D<U;++D){H=Y[D];Q=H.target;I=S&&H.getProp("height");F=X&&H.getProp("width");Z=H.getMarginInfo();if((X&&isNaN(Q.x))||(S&&isNaN(Q.y))){R=Q.el.getXY();if(!J){J=L.targetContext.el.getXY();T=L.targetContext.getBorderInfo();M=J[0]+T.left;N=J[1]+T.top}B=R[0]-M;C=R[1]-N}else{B=Q.x;C=Q.y}I+=Z.bottom;F+=Z.right;E=Math.max(E,C+I);G=Math.max(G,B+F);if(isNaN(E)&&isNaN(G)){K.done=false;return}}if(X||S){i=L.targetContext.getPaddingInfo()}if(X&&!L.setContentWidth(G+i.right)){K.done=false}if(S&&!L.setContentHeight(E+i.bottom)){K.done=false}}},calculateOverflow:function(F,A,L){var w=this,R=w.owner,H=w.manageOverflow,O=F.state,G=O.overflowAdjust,M,I,P,E,Q,C,z,J,B,N,D,y,K,x;if(H&&!O.secondPass&&!w.reserveScrollbar){if(R.autoScroll){K=x=true}else{if(R.overflowX){K=R.overflowX=="auto"}else{C=F.targetContext.getStyle("overflow-x");K=C&&C!="hidden"&&C!="scroll"}if(R.overflowY){x=R.overflowY=="auto"}else{C=F.targetContext.getStyle("overflow-y");x=C&&C!="hidden"&&C!="scroll"}}if(!A.gotWidth){K=false}if(!A.gotHeight){x=false}if(K||x){z=Ext.getScrollbarSize();J=F.peek("contentWidth");B=F.peek("contentHeight");N=A.width;D=A.height;y=w.getScrollbarsNeeded(N,D,J,B);O.overflowState=y;if(typeof L=="number"){y&=~L}G={width:(K&&(y&2))?z.width:0,height:(x&&(y&1))?z.height:0};if(G.width!==w.lastOverflowAdjust.width||G.height!==w.lastOverflowAdjust.height){w.done=false;F.invalidate({state:{overflowAdjust:G,overflowState:O.overflowState,secondPass:true}})}}}if(!w.done){return}P=F.padElContext||(F.padElContext=F.getEl("overflowPadderEl",w));if(P){y=O.overflowState;M=A.width;I=0;if(y){E=F.targetContext.getPaddingInfo();Q=w.scrollRangeFlags;if((y&2)&&(Q&1)){I+=E.bottom}if((y&1)&&(Q&4)){M+=E.right}P.setProp("display","");P.setSize(M,I)}else{P.setProp("display","none")}}},configureItem:function(h){var e=this,f=e.owner.itemCls,g=[].concat(e.itemCls||[]);e.callParent(arguments);if(f){g=Ext.Array.push(g,f)}h.addCls(g)},doRenderBody:function(d,c){this.renderItems(d,c);this.renderContent(d,c)},doRenderContainer:function(f,h){var j=h.$comp.layout,g=j.getRenderTpl(),i=j.getRenderData();g.applyOut(i,f)},doRenderItems:function(e,g){var h=g.$layout,f=h.getRenderTree();if(f){Ext.DomHelper.generateMarkup(f,e)}},doRenderPadder:function(f,i){var j=i.$layout,g=j.owner,h=j.getScrollRangeFlags();if(j.manageOverflow==2){if(h&5){f.push('<div id="',g.id,'-overflowPadderEl" ','style="font-size: 1px; width:1px; height: 1px;');f.push('"></div>');j.scrollRangeFlags=h}}},finishRender:function(){var d=this,f,e;d.callParent();d.cacheElements();f=d.getRenderTarget();e=d.getLayoutItems();if(d.targetCls){d.getTarget().addCls(d.targetCls)}d.finishRenderItems(f,e)},notifyOwner:function(){this.owner.afterLayout(this)},getContainerSize:function(v,r){var u=v.targetContext,s=u.getFrameInfo(),o=u.getPaddingInfo(),p=0,n=0,x=v.state.overflowAdjust,t,q,w,m;if(!v.widthModel.shrinkWrap){++n;w=r?u.getDomProp("width"):u.getProp("width");t=(typeof w=="number");if(t){++p;w-=s.width+o.width;if(x){w-=x.width}}}if(!v.heightModel.shrinkWrap){++n;m=r?u.getDomProp("height"):u.getProp("height");q=(typeof m=="number");if(q){++p;m-=s.height+o.height;if(x){m-=x.height}}}return{width:w,height:m,needed:n,got:p,gotAll:p==n,gotWidth:t,gotHeight:q}},getLayoutItems:function(){var d=this.owner,c=d&&d.items;return(c&&c.items)||[]},getRenderData:function(){var b=this.owner;return{$comp:b,$layout:this,ownerId:b.id}},getRenderedItems:function(){var l=this,j=l.getRenderTarget(),i=l.getLayoutItems(),m=i.length,k=[],h,n;for(h=0;h<m;h++){n=i[h];if(n.rendered&&l.isValidParent(n,j,h)){k.push(n)}}return k},getRenderTarget:function(){return this.owner.getTargetEl()},getElementTarget:function(){return this.getRenderTarget()},getRenderTpl:function(){var d=this,c=Ext.XTemplate.getTpl(this,"renderTpl");if(!c.renderContent){d.owner.setupRenderTpl(c)}return c},getRenderTree:function(){var f,h=this.owner.items,g,e={};do{g=h.generation;f=this.getItemsRenderTree(this.getLayoutItems(),e)}while(h.generation!==g);return f},getScrollbarsNeeded:function(p,k,q,l){var r=Ext.getScrollbarSize(),n=typeof p=="number",j=typeof k=="number",m=0,o=0;if(!r.width){return 0}if(j&&k<l){o=2;p-=r.width}if(n&&p<q){m=1;if(!o&&j){k-=r.height;if(k<l){o=2}}}return o+m},getScrollRangeFlags:(function(){var b=-1;return function(){if(b<0){var g=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"border-box",style:{width:"100px",height:"100px",padding:"10px",overflow:"auto"},children:[{style:{border:"1px solid red",width:"150px",height:"150px",margin:"0 5px 5px 0"}}]}),i=g.dom.scrollHeight,j=g.dom.scrollWidth,h={175:0,165:1,170:2,160:3},a={175:0,165:4,170:8,160:12};b=(h[i]||0)|(a[j]||0);g.remove()}return b}}()),getTarget:function(){return this.owner.getTargetEl()},getVisibleItems:function(){var i=this.getRenderTarget(),g=this.getLayoutItems(),j=g.length,h=[],l,k;for(l=0;l<j;l++){k=g[l];if(k.rendered&&this.isValidParent(k,i,l)&&k.hidden!==true){h.push(k)}}return h},setupRenderTpl:function(c){var d=this;c.renderBody=d.doRenderBody;c.renderContainer=d.doRenderContainer;c.renderItems=d.doRenderItems;c.renderPadder=d.doRenderPadder}});Ext.define("Ext.layout.container.Fit",{extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.FitLayout",alias:"layout.fit",itemCls:Ext.baseCSSPrefix+"fit-item",targetCls:Ext.baseCSSPrefix+"layout-fit",type:"fit",defaultMargins:{top:0,right:0,bottom:0,left:0},manageMargins:true,sizePolicies:{0:{setsWidth:0,setsHeight:0},1:{setsWidth:1,setsHeight:0},2:{setsWidth:0,setsHeight:1},3:{setsWidth:1,setsHeight:1}},getItemSizePolicy:function(d){var e=this.owner.getSizeModel(),f=(e.width.shrinkWrap?0:1)|(e.height.shrinkWrap?0:2);return this.sizePolicies[f]},beginLayoutCycle:function(y,i){var s=this,t=y.widthModel,u=y.heightModel,v=y.childItems,q=!t.shrinkWrap,B=!u.shrinkWrap,z=v.length,r=(y.targetContext.el.dom.tagName==="TD"),w,x,A,p;s.callParent(arguments);for(w=0;w<z;++w){A=v[w];if(!i){if(A.widthModel.calculated==q){x=null}else{x={widthModel:q?s.sizeModels.calculated:A.sizeModel.width}}if(A.heightModel.calculated!=B){(x||(x={})).heightModel=B?s.sizeModels.calculated:A.sizeModel.height}if(x){x.before=s.onBeforeInvalidateChild;A.invalidate(x)}}if(r){p=A.target.el.dom;if(A.heightModel.calculated){p.style.height=""}if(A.widthModel.calculated){p.style.width=""}}}},calculate:function(s){var n=this,o=s.childItems,u=o.length,t={contentWidth:0,contentHeight:0,length:u,ownerContext:s,targetSize:n.getContainerSize(s)},q=s.widthModel.shrinkWrap,i=s.heightModel.shrinkWrap,v=0,r=0,m,p;for(p=0;p<u;++p){t.index=p;n.fitItem(o[p],t)}if(i||q){m=s.targetContext.getPaddingInfo();if(q){v=m.width}if(i){r=m.height}}if(!s.setContentSize(t.contentWidth+v,t.contentHeight+r)){n.done=false}},fitItem:function(d,f){var e=this;if(d.invalid){e.done=false;return}f.margins=d.getMarginInfo();f.needed=f.got=0;e.fitItemWidth(d,f);e.fitItemHeight(d,f);if(f.got!=f.needed){e.done=false}},fitItemWidth:function(d,c){if(c.ownerContext.widthModel.shrinkWrap){c.contentWidth=Math.max(c.contentWidth,d.getProp("width")+c.margins.width)}else{if(d.widthModel.calculated){++c.needed;if(c.targetSize.gotWidth){++c.got;this.setItemWidth(d,c)}}}this.positionItemX(d,c)},fitItemHeight:function(d,c){if(c.ownerContext.heightModel.shrinkWrap){c.contentHeight=Math.max(c.contentHeight,d.getProp("height")+c.margins.height)}else{if(d.heightModel.calculated){++c.needed;if(c.targetSize.gotHeight){++c.got;this.setItemHeight(d,c)}}}this.positionItemY(d,c)},onBeforeInvalidateChild:function(c,d){++c.context.progressCount;if(d.widthModel){c.widthModel=d.widthModel}if(d.heightModel){c.heightModel=d.heightModel}},positionItemX:function(e,f){var d=f.margins;if(f.index||d.left){e.setProp("x",d.left)}if(d.width){e.setProp("margin-right",d.width)}},positionItemY:function(e,f){var d=f.margins;if(f.index||d.top){e.setProp("y",d.top)}if(d.height){e.setProp("margin-bottom",d.height)}},setItemHeight:function(d,c){d.setHeight(c.targetSize.height-c.margins.height)},setItemWidth:function(d,c){d.setWidth(c.targetSize.width-c.margins.width)}});Ext.define("Ext.layout.container.Card",{extend:"Ext.layout.container.Fit",alternateClassName:"Ext.layout.CardLayout",alias:"layout.card",type:"card",hideInactive:true,deferredRender:false,getRenderTree:function(){var d=this,c=d.getActiveItem();if(c){if(c.hasListeners.beforeactivate&&c.fireEvent("beforeactivate",c)===false){c=d.activeItem=d.owner.activeItem=null}else{if(c.hasListeners.activate){c.on({boxready:function(){c.fireEvent("activate",c)},single:true})}}if(d.deferredRender){if(c){return d.getItemsRenderTree([c])}}else{return d.callParent(arguments)}}},renderChildren:function(){var d=this,c=d.getActiveItem();if(!d.deferredRender){d.callParent()}else{if(c){d.renderItems([c],d.getRenderTarget())}}},isValidParent:function(h,g,f){var e=h.el?h.el.dom:Ext.getDom(h);return(e&&e.parentNode===(g.dom||g))||false},getActiveItem:function(){var c=this,d=c.parseActiveItem(c.activeItem||(c.owner&&c.owner.activeItem));if(d&&c.owner.items.indexOf(d)!=-1){c.activeItem=d}else{c.activeItem=null}return c.activeItem},parseActiveItem:function(b){if(b&&b.isComponent){return b}else{if(typeof b=="number"||b===undefined){return this.getLayoutItems()[b||0]}else{return this.owner.getComponent(b)}}},configureItem:function(b){if(b===this.getActiveItem()){b.hidden=false}else{b.hidden=true}this.callParent(arguments)},onRemove:function(d){var c=this;if(d===c.activeItem){c.activeItem=null}},getAnimation:function(d,e){var f=(d||{}).cardSwitchAnimation;if(f===false){return false}return f||e.cardSwitchAnimation},getNext:function(){var f=arguments[0],e=this.getLayoutItems(),d=Ext.Array.indexOf(e,this.activeItem);return e[d+1]||(f?e[0]:false)},next:function(){var c=arguments[0],d=arguments[1];return this.setActiveItem(this.getNext(d),c)},getPrev:function(){var f=arguments[0],e=this.getLayoutItems(),d=Ext.Array.indexOf(e,this.activeItem);return e[d-1]||(f?e[e.length-1]:false)},prev:function(){var c=arguments[0],d=arguments[1];return this.setActiveItem(this.getPrev(d),c)},setActiveItem:function(g){var j=this,h=j.owner,k=j.activeItem,i=h.rendered,l;g=j.parseActiveItem(g);l=h.items.indexOf(g);if(l==-1){l=h.items.items.length;Ext.suspendLayouts();g=h.add(g);Ext.resumeLayouts()}if(g&&k!=g){if(g.fireEvent("beforeactivate",g,k)===false){return false}if(k&&k.fireEvent("beforedeactivate",k,g)===false){return false}if(i){Ext.suspendLayouts();if(!g.rendered){j.renderItem(g,j.getRenderTarget(),h.items.length)}if(k){if(j.hideInactive){k.hide();k.hiddenByLayout=true}k.fireEvent("deactivate",k,g)}if(g.hidden){g.show()}if(!g.hidden){j.activeItem=g}Ext.resumeLayouts(true)}else{j.activeItem=g}g.fireEvent("activate",g,k);return j.activeItem}return false}});Ext.define("Ext.form.Labelable",{requires:["Ext.XTemplate"],autoEl:{tag:"table",cellspacing:0,cellpadding:0},childEls:["labelCell","labelEl","bodyEl","errorEl","inputRow"],labelableRenderTpl:["<tpl if=\"labelAlign=='top'\">","<tr>",'<td id="{id}-labelCell" colspan="3" style="{labelCellStyle}" {labelCellAttrs}>',"{beforeLabelTpl}",'<label id="{id}-labelEl" {labelAttrTpl}<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"','<tpl if="labelStyle"> style="{labelStyle}"</tpl>>',"{beforeLabelTextTpl}",'<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',"{afterLabelTextTpl}","</label>","{afterLabelTpl}","</td>","</tr>","</tpl>",'<tr id="{id}-inputRow" <tpl if="inFormLayout">id="{id}"</tpl>>','<tpl if="labelOnLeft">','<td id="{id}-labelCell" style="{labelCellStyle}" {labelCellAttrs}>',"{beforeLabelTpl}",'<label id="{id}-labelEl" {labelAttrTpl}<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"','<tpl if="labelStyle"> style="{labelStyle}"</tpl>>',"{beforeLabelTextTpl}",'<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',"{afterLabelTextTpl}","</label>","{afterLabelTpl}","</td>","</tpl>",'<td class="{baseBodyCls} {fieldBodyCls}" id="{id}-bodyEl" role="presentation" colspan="{bodyColspan}">',"{beforeSubTpl}","{[values.$comp.getSubTplMarkup()]}","{afterSubTpl}","</td>","<tpl if=\"msgTarget=='side'\">",'<td id="{id}-errorEl" class="{errorMsgCls}" style="display:none" width="{errorIconWidth}"></td>',"</tpl>","</tr>","<tpl if=\"msgTarget=='under'\">","<tr>",'<tpl if="labelOnLeft">',"<td></td>","</tpl>",'<td id="{id}-errorEl" class="{errorMsgClass}" colspan="{[values.labelOnLeft ? 2 : 3]}" style="display:none"></td>',"</tr>","</tpl>",{disableFormats:true}],activeErrorsTpl:['<tpl if="errors && errors.length">','<ul><tpl for="errors"><li<tpl if="xindex == xcount"> class="last"</tpl>>{.}</li></tpl></ul>',"</tpl>"],isFieldLabelable:true,formItemCls:Ext.baseCSSPrefix+"form-item",labelCls:Ext.baseCSSPrefix+"form-item-label",errorMsgCls:Ext.baseCSSPrefix+"form-error-msg",baseBodyCls:Ext.baseCSSPrefix+"form-item-body",fieldBodyCls:"",clearCls:Ext.baseCSSPrefix+"clear",invalidCls:Ext.baseCSSPrefix+"form-invalid",fieldLabel:undefined,labelAlign:"left",labelWidth:100,labelPad:5,labelSeparator:":",hideLabel:false,hideEmptyLabel:true,preventMark:false,autoFitErrors:true,msgTarget:"qtip",noWrap:true,labelableInsertions:["beforeLabelTpl","afterLabelTpl","beforeSubTpl","afterSubTpl","beforeLabelTextTpl","afterLabelTextTpl","labelAttrTpl"],labelableRenderProps:"allowBlank,labelAlign,fieldBodyCls,baseBodyCls,clearCls,labelSeparator,msgTarget",initLabelable:function(){var d=this,c=d.padding;if(c){d.padding=undefined;d.extraMargins=Ext.Element.parseBox(c)}d.addCls(d.formItemCls);d.lastActiveError="";d.addEvents("errorchange")},getFieldLabel:function(){return this.fieldLabel||""},setFieldLabel:function(f){f=f||"";var i=this,h=i.labelSeparator,g=i.labelEl,j;i.fieldLabel=f;if(i.rendered){if(Ext.isEmpty(f)&&i.hideEmptyLabel){g.parent().setDisplayed("none")}else{if(h){j=f.substr(f.length-1);if(j!=h){f+=h}}g.update(f);g.parent().setDisplayed("")}i.updateLayout()}},getInsertionRenderData:function(i,h){var f=h.length,g,j;while(f--){g=h[f];j=this[g];if(j){if(typeof j!="string"){if(!j.isTemplate){j=Ext.XTemplate.getTpl(this,g)}j=j.apply(i)}}i[g]=j||""}return i},getLabelableRenderData:function(){var e=this,d,f;if(!Ext.form.Labelable.errorIconWidth){Ext.form.Labelable.errorIconWidth=(f=Ext.getBody().createChild({style:"position:absolute",cls:Ext.baseCSSPrefix+"form-invalid-icon"})).getWidth();f.remove()}d=Ext.copyTo({inFormLayout:e.ownerLayout&&e.ownerLayout.type==="form",inputId:e.getInputId(),labelOnLeft:e.labelAlign!="top",fieldLabel:e.getFieldLabel(),labelCellStyle:e.getLabelCellStyle(),labelCellAttrs:e.getLabelCellAttrs(),labelCls:e.getLabelCls(),labelStyle:e.getLabelStyle(),bodyColspan:e.getBodyColspan(),errorMsgCls:e.errorMsgCls+(e.autoFitErrors?"":" "+Ext.baseCSSPrefix+"external-error-icon"),errorIconWidth:Ext.form.Labelable.errorIconWidth},e,e.labelableRenderProps,true);e.getInsertionRenderData(d,e.labelableInsertions);return d},onLabelableRender:function(){var h=this,g,f,e={};if(h.extraMargins){g=h.el.getMargin();for(f in g){if(g.hasOwnProperty(f)){e["margin-"+f]=(g[f]+h.extraMargins[f])+"px"}}h.el.setStyle(e)}},hasVisibleLabel:function(){if(this.hideLabel){return false}return !(this.hideEmptyLabel&&!this.getFieldLabel())},getBodyColspan:function(){var f=this,d=!f.hasVisibleLabel(),e;e=(d||f.labelAlign==="top")?3:2;if(f.hasActiveError()){e--}return e},getLabelCls:function(){var c=this.labelCls,d=this.labelClsExtra;return d?c+" "+d:c},getLabelCellStyle:function(){var c=this,d=c.hideLabel||(!c.fieldLabel&&c.hideEmptyLabel);return d?"display:none;":""},getLabelCellAttrs:function(){var f=this,d=f.labelAlign,e="";if(d!=="top"){e='valign="top" halign="'+d+'" width="'+(f.labelWidth+f.labelPad)+'"'}return e},getLabelStyle:function(){var f=this,d=f.labelPad,e="";if(f.labelAlign==="top"){e="margin-bottom:"+d+"px;"}else{if(f.labelWidth){e="width:"+f.labelWidth+"px;"}e+="margin-right:"+d+"px;"}return e+(f.labelStyle||"")},getSubTplMarkup:function(){return""},getInputId:function(){return""},getActiveError:function(){return this.activeError||""},hasActiveError:function(){return !!this.getActiveError()},setActiveError:function(b){this.setActiveErrors(b)},getActiveErrors:function(){return this.activeErrors||[]},setActiveErrors:function(b){b=Ext.Array.from(b);this.activeError=b[0];this.activeErrors=b;this.activeError=this.getTpl("activeErrorsTpl").apply({errors:b});this.renderActiveError()},unsetActiveError:function(){delete this.activeError;delete this.activeErrors;this.renderActiveError()},renderActiveError:function(){var f=this,d=f.getActiveError(),e=!!d;if(d!==f.lastActiveError){f.fireEvent("errorchange",f,d);f.lastActiveError=d}if(f.rendered&&!f.isDestroyed&&!f.preventMark){f.el[e?"addCls":"removeCls"](f.invalidCls);f.getActionEl().dom.setAttribute("aria-invalid",e);if(f.errorEl){f.errorEl.dom.innerHTML=d}}},setFieldDefaults:function(h){var e=this,g,f;for(f in h){if(h.hasOwnProperty(f)){g=h[f];if(!e.hasOwnProperty(f)){e[f]=g}}}}});Ext.define("Ext.layout.component.Component",{extend:"Ext.layout.Layout",type:"component",isComponentLayout:true,nullBox:{},usesContentHeight:true,usesContentWidth:true,usesHeight:true,usesWidth:true,beginLayoutCycle:function(B,p){var u=this,C=u.owner,z=B.ownerCtContext,y=B.heightModel,x=B.widthModel,w=C.el.dom===document.body,A=C.lastBox||u.nullBox,r=C.el.lastBox||u.nullBox,D=!w,s,q,t,v;u.callParent(arguments);if(p){if(u.usesContentWidth){++B.consumersContentWidth}if(u.usesContentHeight){++B.consumersContentHeight}if(u.usesWidth){++B.consumersWidth}if(u.usesHeight){++B.consumersHeight}if(z&&!z.hasRawContent){s=C.ownerLayout;if(s.usesWidth){++B.consumersWidth}if(s.usesHeight){++B.consumersHeight}}}if(x.configured){t=x.names.width;if(!w){D=p?C[t]!==r.width:x.constrained}B.setWidth(C[t],D)}else{if(B.isTopLevel){if(x.calculated){q=A.width;B.setWidth(q,q!=r.width)}q=A.x;B.setProp("x",q,q!=r.x)}}if(y.configured){v=y.names.height;if(!w){D=p?C[v]!==r.height:y.constrained}B.setHeight(C[v],D)}else{if(B.isTopLevel){if(y.calculated){q=A.height;B.setHeight(q,q!=r.height)}q=A.y;B.setProp("y",q,q!=r.y)}}},finishedLayout:function(s){var n=this,i=s.children,t=n.owner,p,r,l,q,o,m;if(i){p=i.length;for(r=0;r<p;r++){l=i[r];l.el.lastBox=l.props}}s.previousSize=n.lastComponentSize;n.lastComponentSize=t.el.lastBox=o=s.props;t.lastBox=q={};m=o.x;if(m!==undefined){q.x=m}m=o.y;if(m!==undefined){q.y=m}m=o.width;if(m!==undefined){q.width=m}m=o.height;if(m!==undefined){q.height=m}n.callParent(arguments)},notifyOwner:function(i){var j=this,g=j.lastComponentSize,h=i.previousSize,f=[g.width,g.height];if(h){f.push(h.width,h.height)}j.owner.afterComponentLayout.apply(j.owner,f)},getTarget:function(){return this.owner.el},getRenderTarget:function(){return this.owner.el},cacheTargetInfo:function(e){var f=this,g=f.targetInfo,h;if(!g){h=e.getEl("getTarget",f);f.targetInfo=g={padding:h.getPaddingInfo(),border:h.getBorderInfo()}}return g},measureAutoDimensions:function(y,C){var t=this,J=t.owner,G=y.heightModel,D=y.widthModel,H=y.boxParent,x=y.isBoxParent,I=y.props,B,s={gotWidth:false,gotHeight:false,isContainer:(B=!y.hasRawContent)},u=C||3,v,F,A=0,E=0,z,w;if(D.shrinkWrap&&y.consumersContentWidth){++A;v=!(u&1);if(B){if(v){s.contentWidth=0;s.gotWidth=true;++E}else{if((s.contentWidth=y.getProp("contentWidth"))!==undefined){s.gotWidth=true;++E}}}else{w=I.contentWidth;if(typeof w=="number"){s.contentWidth=w;s.gotWidth=true;++E}else{if(v){z=true}else{if(!y.hasDomProp("containerChildrenDone")){z=false}else{if(x||!H||H.widthModel.shrinkWrap){z=true}else{z=H.hasDomProp("width")}}}if(z){if(!isNaN(s.contentWidth=v?0:t.measureContentWidth(y))){y.setContentWidth(s.contentWidth,true);s.gotWidth=true;++E}}}}}else{if(D.natural&&y.consumersWidth){++A;w=I.width;if(typeof w=="number"){s.width=w;s.gotWidth=true;++E}else{if(x||!H){z=true}else{z=H.hasDomProp("width")}if(z){if(!isNaN(s.width=t.measureOwnerWidth(y))){y.setWidth(s.width,false);s.gotWidth=true;++E}}}}}if(G.shrinkWrap&&y.consumersContentHeight){++A;F=!(u&2);if(B){if(F){s.contentHeight=0;s.gotHeight=true;++E}else{if((s.contentHeight=y.getProp("contentHeight"))!==undefined){s.gotHeight=true;++E}}}else{w=I.contentHeight;if(typeof w=="number"){s.contentHeight=w;s.gotHeight=true;++E}else{if(F){z=true}else{if(!y.hasDomProp("containerChildrenDone")){z=false}else{if(J.noWrap){z=true}else{if(!D.shrinkWrap){z=(y.bodyContext||y).hasDomProp("width")}else{if(x||!H||H.widthModel.shrinkWrap){z=true}else{z=H.hasDomProp("width")}}}}}if(z){if(!isNaN(s.contentHeight=F?0:t.measureContentHeight(y))){y.setContentHeight(s.contentHeight,true);s.gotHeight=true;++E}}}}}else{if(G.natural&&y.consumersHeight){++A;w=I.height;if(typeof w=="number"){s.height=w;s.gotHeight=true;++E}else{if(x||!H){z=true}else{z=H.hasDomProp("width")}if(z){if(!isNaN(s.height=t.measureOwnerHeight(y))){y.setHeight(s.height,false);s.gotHeight=true;++E}}}}}if(H){y.onBoxMeasured()}s.gotAll=E==A;return s},measureContentWidth:function(b){return b.el.getWidth()-b.getFrameInfo().width},measureContentHeight:function(b){return b.el.getHeight()-b.getFrameInfo().height},measureOwnerHeight:function(b){return b.el.getHeight()},measureOwnerWidth:function(b){return b.el.getWidth()}});Ext.define("Ext.layout.component.Dock",{extend:"Ext.layout.component.Component",alias:"layout.dock",alternateClassName:"Ext.layout.component.AbstractDock",type:"dock",initializedBorders:-1,horizontalCollapsePolicy:{width:true,x:true},verticalCollapsePolicy:{height:true,y:true},finishRender:function(){var d=this,f,e;d.callParent();f=d.getRenderTarget();e=d.getDockedItems();d.finishRenderItems(f,e)},isItemBoxParent:function(b){return true},isItemShrinkWrap:function(b){return true},dockOpposites:{top:"bottom",right:"left",bottom:"top",left:"right"},handleItemBorders:function(){var q=this,z=q.owner,r,i,w=q.borders,u=q.dockOpposites,y=z.dockedItems.generation,v,s,o,p,t,x=q.collapsed;if(q.initializedBorders==y||(z.border&&!z.manageBodyBorders)){return}q.initializedBorders=y;q.collapsed=false;i=q.getLayoutItems();q.collapsed=x;r={top:[],right:[],bottom:[],left:[]};for(v=0,s=i.length;v<s;v++){o=i[v];p=o.dock;if(o.ignoreBorderManagement){continue}if(!r[p].satisfied){r[p].push(o);r[p].satisfied=true}if(!r.top.satisfied&&u[p]!=="top"){r.top.push(o)}if(!r.right.satisfied&&u[p]!=="right"){r.right.push(o)}if(!r.bottom.satisfied&&u[p]!=="bottom"){r.bottom.push(o)}if(!r.left.satisfied&&u[p]!=="left"){r.left.push(o)}}if(w){for(t in w){if(w.hasOwnProperty(t)){s=w[t].length;if(!z.manageBodyBorders){for(v=0;v<s;v++){w[t][v].removeCls(Ext.baseCSSPrefix+"docked-noborder-"+t)}if(!w[t].satisfied&&!z.bodyBorder){z.removeBodyCls(Ext.baseCSSPrefix+"docked-noborder-"+t)}}else{if(w[t].satisfied){z.setBodyStyle("border-"+t+"-width","")}}}}}for(t in r){if(r.hasOwnProperty(t)){s=r[t].length;if(!z.manageBodyBorders){for(v=0;v<s;v++){r[t][v].addCls(Ext.baseCSSPrefix+"docked-noborder-"+t)}if((!r[t].satisfied&&!z.bodyBorder)||z.bodyBorder===false){z.addBodyCls(Ext.baseCSSPrefix+"docked-noborder-"+t)}}else{if(r[t].satisfied){z.setBodyStyle("border-"+t+"-width","1px")}}}}q.borders=r},beginLayout:function(y){var r=this,z=r.owner,i=r.getLayoutItems(),A=y.context,v=i.length,s=false,x=false,q,t,p,B,w,u;r.callParent(arguments);r.handleItemBorders();u=z.getCollapsed();if(Ext.isDefined(r.lastCollapsedState)&&(u!==r.lastCollapsedState)){if(r.owner.collapsed){y.isCollapsingOrExpanding=1;z.addClsWithUI(z.collapsedCls)}else{y.isCollapsingOrExpanding=2;z.removeClsWithUI(z.collapsedCls);y.lastCollapsedState=r.lastCollapsedState}}r.lastCollapsedState=u;y.dockedItems=q=[];for(t=0;t<v;t++){p=i[t];B=A.getCmp(p);B.dockedAt={x:0,y:0};B.offsets=w=Ext.Element.parseBox(p.offsets||{});w.width=w.left+w.right;w.height=w.top+w.bottom;q.push(B)}if(z.collapsed){if(z.collapsedVertical()){s=true;y.measureDimensions=1}else{x=true;y.measureDimensions=2}}y.collapsedVert=s;y.collapsedHorz=x;y.bodyContext=y.getEl("body")},beginLayoutCycle:function(s){var p=this,i=s.dockedItems,q=i.length,t=p.owner,o=t.frameBody,l=p.lastHeightModel,r,m,n;p.callParent(arguments);if(s.collapsedVert){s.heightModel=p.sizeModels.shrinkWrap}else{if(s.collapsedHorz){s.widthModel=p.sizeModels.shrinkWrap}}if(l&&l.shrinkWrap&&!s.heightModel.shrinkWrap&&!p.owner.manageHeight){t.body.dom.style.marginBottom=""}if(s.widthModel.auto){if(s.widthModel.shrinkWrap){t.el.setWidth(null)}t.body.setWidth(null);if(o){o.setWidth(null)}}if(s.heightModel.auto){t.body.setHeight(null);if(o){o.setHeight(null)}}if(s.collapsedVert){s.setContentHeight(0)}else{if(s.collapsedHorz){s.setContentWidth(0)}}for(r=0;r<q;r++){m=i[r].target;n=m.dock;if(n=="right"){m.el.setLeft(0)}else{if(n!="left"){continue}}}},calculate:function(s){var m=this,t=m.measureAutoDimensions(s,s.measureDimensions),u=s.state,n=u.horzDone,r=u.vertDone,q=s.bodyContext,v,o,p,l;s.borderInfo||s.getBorderInfo();s.paddingInfo||s.getPaddingInfo();s.framingInfo||s.getFraming();q.borderInfo||q.getBorderInfo();q.paddingInfo||q.getPaddingInfo();v=!n&&m.createAxis(s,t.contentWidth,s.widthModel,"left","right","x","width","Width",s.collapsedHorz);o=!r&&m.createAxis(s,t.contentHeight,s.heightModel,"top","bottom","y","height","Height",s.collapsedVert);for(p=0,l=s.dockedItems.length;l--;++p){if(v){m.dockChild(s,v,l,p)}if(o){m.dockChild(s,o,l,p)}}if(v&&m.finishAxis(s,v)){u.horzDone=n=v}if(o&&m.finishAxis(s,o)){u.vertDone=r=o}if(n&&r&&m.finishConstraints(s,n,r)){m.finishPositions(s,n,r)}else{m.done=false}},createAxis:function(D,J,N,F,K,z,G,I,O){var x=0,Q=this.owner,M=Q["max"+I],P=Q["min"+I]||0,H=M!=null,w=D.state["constrained"+I],E=w!=null,y="set"+I,B,R,A,C,L;if(N.shrinkWrap&&!E){if(O){L=0}else{R=D.bodyContext;L=J+R.borderInfo[G]}}else{B=D.borderInfo;A=D.framingInfo;C=D.paddingInfo;if(E){L=w;N=this.sizeModels.calculated;D[y](w)}else{L=D.getProp(G)}L-=B[K]+C[K]+A[K];x=B[F]+C[F]+A[F]}return{shrinkWrap:N.shrinkWrap,sizeModel:N,begin:x,end:L,collapsed:O,horizontal:z=="x",ignoreFrameBegin:false,ignoreFrameEnd:false,initialSize:L-x,hasMinMaxConstraints:(P||H)&&N.shrinkWrap,isConstrainedSize:E,minSize:P,maxSize:H?M:1000000000,bodyPosProp:this.owner.manageHeight?z:("margin-"+F),dockBegin:F,dockEnd:K,posProp:z,sizeProp:G,sizePropCap:I,setSize:y,dockedPixelsEnd:0}},dockChild:function(q,p,j,o){var n=this,r=q.dockedItems[p.shrinkWrap?j:o],l=r.target,k=l.dock,m;if(l.ignoreParentFrame&&q.isCollapsingOrExpanding){r.clearMarginCache()}if(k==p.dockBegin){if(p.shrinkWrap){m=n.dockOutwardBegin(q,r,l,p)}else{m=n.dockInwardBegin(q,r,l,p)}}else{if(k==p.dockEnd){if(p.shrinkWrap){m=n.dockOutwardEnd(q,r,l,p)}else{m=n.dockInwardEnd(q,r,l,p)}}else{m=n.dockStretch(q,r,l,p)}}r.dockedAt[p.posProp]=m},dockInwardBegin:function(m,n,o,i){var k=i.begin,l=i.sizeProp,j,p;if(o.ignoreParentFrame){p=o.dock;k-=m.borderInfo[p]+m.paddingInfo[p]+m.framingInfo[p]}if(!o.overlay){j=n.getProp(l)+n.getMarginInfo()[l];i.begin+=j}return k},dockInwardEnd:function(l,m,n,h){var j=h.sizeProp,i=m.getProp(j)+m.getMarginInfo()[j],k=h.end-i;if(!n.overlay){h.end=k}if(n.ignoreParentFrame){k+=l.borderInfo[n.dock]+l.paddingInfo[n.dock]+l.framingInfo[n.dock]}return k},dockOutwardBegin:function(m,n,o,i){var k=i.begin,l=i.sizeProp,p,j;if(i.collapsed){i.ignoreFrameBegin=i.ignoreFrameEnd=true}else{if(o.ignoreParentFrame){p=o.dock;k-=m.borderInfo[p]+m.paddingInfo[p]+m.framingInfo[p];i.ignoreFrameBegin=true}}if(!o.overlay){j=n.getProp(l)+n.getMarginInfo()[l];k-=j;i.begin=k}return k},dockOutwardEnd:function(m,n,o,i){var k=i.end,l=i.sizeProp,p,j;j=n.getProp(l)+n.getMarginInfo()[l];if(i.collapsed){i.ignoreFrameBegin=i.ignoreFrameEnd=true}else{if(o.ignoreParentFrame){p=o.dock;k+=m.borderInfo[p]+m.paddingInfo[p]+m.framingInfo[p];i.ignoreFrameEnd=true}}if(!o.overlay){i.end=k+j;i.dockedPixelsEnd+=j}return k},dockStretch:function(D,E,t,C){var s=t.dock,x=C.sizeProp,F=s=="top"||s=="bottom",B=E.offsets,y=D.borderInfo,u=D.paddingInfo,z=F?"right":"bottom",q=F?"left":"top",v=C.begin+B[q],A,r,w;if(t.stretch!==false){r=C.end-v-B[z];if(t.ignoreParentFrame){w=D.framingInfo;v-=y[q]+u[q]+w[q];r+=y[x]+u[x]+w[x]}A=E.getMarginInfo();r-=A[x];E[C.setSize](r)}return v},finishAxis:function(z,x){var o=x.end-x.begin,r=x.setSize,y=x.dockBegin,u=x.dockEnd,t=z.borderInfo,q=z.paddingInfo,s=z.framingInfo,v=q[y]+t[y]+s[y],w=z.bodyContext,p,B,A;if(x.shrinkWrap){x.delta=-x.begin;B=x.initialSize;if(x.ignoreFrameBegin){x.delta-=t[y];p=-x.begin-v}else{o+=v;x.delta+=q[y]+s[y];p=-x.begin}if(!x.ignoreFrameEnd){o+=q[u]+t[u]+s[u]}x.size=o;if(!x.horizontal&&!this.owner.manageHeight){A=false}}else{x.delta=-t[x.dockBegin];B=o;p=x.begin-v}w[r](B,A);w.setProp(x.bodyPosProp,p);return !isNaN(o)},finishConstraints:function(q,v,o){var l=v.size<v.minSize,u=v.size>v.maxSize,n=o.size<o.minSize,t=o.size>o.maxSize,r=q.state,m=true,p=this.sizeModels.configured,s;if(v.shrinkWrap&&u&&o.shrinkWrap&&n){r.constrainedWidth=v.maxSize;q.widthModel=p;m=false}else{if(v.shrinkWrap){if(u){r.constrainedWidth=v.maxSize;q.widthModel=p;m=false}else{if(l){r.constrainedWidth=v.minSize;q.widthModel=p;m=false}}}if(o.shrinkWrap){if(t){r.constrainedHeight=o.maxSize;q.heightModel=p;m=false}else{if(n){r.constrainedHeight=o.minSize;q.heightModel=p;m=false}}}}if(m){if(v.shrinkWrap){q.setWidth(v.size)}if(o.shrinkWrap){if(!q.collapsedVert&&!this.owner.manageHeight){s=false;q.bodyContext.setProp("margin-bottom",o.dockedPixelsEnd)}q.setHeight(o.size,s)}}else{q.invalidate({state:{constrainedWidth:r.constrainedWidth,constrainedHeight:r.constrainedHeight}})}return m},finishPositions:function(o,r,l){var j=o.dockedItems,p=j.length,m=r.delta,n=l.delta,k,q;for(k=0;k<p;++k){q=j[k];q.setProp("x",m+q.dockedAt.x);q.setProp("y",n+q.dockedAt.y)}},finishedLayout:function(d){var e=this,f=d.target;e.callParent(arguments);if(!d.animatePolicy){if(d.isCollapsingOrExpanding===1){f.afterCollapse(false)}else{if(d.isCollapsingOrExpanding===2){f.afterExpand(false)}}}},getAnimatePolicy:function(h){var e=this,f,g;if(h.isCollapsingOrExpanding==1){f=e.lastCollapsedState}else{if(h.isCollapsingOrExpanding==2){f=h.lastCollapsedState}}if(f=="left"||f=="right"){g=e.horizontalCollapsePolicy}else{if(f=="top"||f=="bottom"){g=e.verticalCollapsePolicy}}return g},getDockedItems:function(t,i){var p=this,o=p.owner.dockedItems.items,q=o&&o.length&&t!==false,u,m,n,r,s,v;if(i==null){n=q?o.slice():o}else{n=[];for(r=0,v=o.length;r<v;++r){m=o[r].dock;s=(m=="top"||m=="left");if(i?s:!s){n.push(o[r])}}q=q&&n.length}if(q){u=(t=t||"render")=="render";Ext.Array.sort(n,function(a,b){var d,c;if(u&&((d=p.owner.dockOrder[a.dock])!==(c=p.owner.dockOrder[b.dock]))){if(!(d+c)){return d-c}}d=p.getItemWeight(a,t);c=p.getItemWeight(b,t);if((d!==undefined)&&(c!==undefined)){return d-c}return 0})}return n||[]},getItemWeight:function(d,e){var f=d.weight||this.owner.defaultDockWeights[d.dock];return f[e]||f},getLayoutItems:function(){var j=this,g,i,k,l,h;if(j.owner.collapsed){h=j.owner.getCollapsedDockedItems()}else{g=j.getDockedItems("visual");i=g.length;h=[];for(l=0;l<i;l++){k=g[l];if(!k.hidden){h.push(k)}}}return h},measureContentWidth:function(d){var c=d.bodyContext;return c.el.getWidth()-c.getBorderInfo().width},measureContentHeight:function(d){var c=d.bodyContext;return c.el.getHeight()-c.getBorderInfo().height},redoLayout:function(f){var d=this,e=d.owner;if(f.isCollapsingOrExpanding==1){if(e.reExpander){e.reExpander.el.show()}e.addClsWithUI(e.collapsedCls);f.redo(true)}else{if(f.isCollapsingOrExpanding==2){e.removeClsWithUI(e.collapsedCls);f.bodyContext.redo()}}},renderChildren:function(){var d=this,e=d.getDockedItems(),f=d.getRenderTarget();d.renderItems(e,f)},renderItems:function(s,t){var q=this,x=s.length,z=0,y=0,j,i=0,r=q.getRenderTarget().dom.childNodes,p=r.length,u,w,v,j;for(u=0,w=0;u<p;u++){v=r[u];if(Ext.fly(v).hasCls("x-resizable-handle")){break}for(w=0;w<x;w++){j=s[w];if(j.rendered&&j.el.dom===v){break}}if(w===x){i++}}for(;z<x;z++,y++){j=s[z];if(z===y&&(j.dock==="right"||j.dock==="bottom")){y+=i}if(j&&!j.rendered){q.renderItem(j,t,y)}else{if(!q.isValidParent(j,t,y)){q.moveItem(j,t,y)}}}},undoLayout:function(f){var d=this,e=d.owner;if(f.isCollapsingOrExpanding==1){if(e.reExpander){e.reExpander.el.hide()}e.removeClsWithUI(e.collapsedCls);f.undo(true)}else{if(f.isCollapsingOrExpanding==2){e.addClsWithUI(e.collapsedCls);f.bodyContext.undo()}}},sizePolicy:{nostretch:{setsWidth:0,setsHeight:0},stretchH:{setsWidth:1,setsHeight:0},stretchV:{setsWidth:0,setsHeight:1},autoStretchH:{readsWidth:1,setsWidth:1,setsHeight:0},autoStretchV:{readsHeight:1,setsWidth:0,setsHeight:1}},getItemSizePolicy:function(h){var g=this.sizePolicy,e,f;if(h.stretch===false){return g.nostretch}e=h.dock;f=(e=="left"||e=="right");if(f){return g.stretchV}return g.stretchH},configureItem:function(d,c){this.callParent(arguments);d.addCls(Ext.baseCSSPrefix+"docked");d.addClsWithUI("docked-"+d.dock)},afterRemove:function(d){this.callParent(arguments);if(this.itemCls){d.el.removeCls(this.itemCls+"-"+d.dock)}var c=d.el.dom;if(!d.destroying&&c){c.parentNode.removeChild(c)}this.childrenChanged=true}});Ext.define("Ext.layout.component.Auto",{alias:"layout.autocomponent",extend:"Ext.layout.component.Component",type:"autocomponent",setHeightInDom:false,setWidthInDom:false,waitForOuterHeightInDom:false,waitForOuterWidthInDom:false,beginLayoutCycle:function(k,g){var l=this,i=l.lastWidthModel,j=l.lastHeightModel,h=l.owner;l.callParent(arguments);if(i&&i.fixed&&k.widthModel.shrinkWrap){h.el.setWidth(null)}if(j&&j.fixed&&k.heightModel.shrinkWrap){h.el.setHeight(null)}},calculate:function(j){var k=this,l=k.measureAutoDimensions(j),h=j.heightModel,n=j.widthModel,m,i;if(l.gotWidth){if(n.shrinkWrap){k.publishOwnerWidth(j,l.contentWidth)}else{if(k.publishInnerWidth){k.publishInnerWidth(j,l.width)}}}else{if(!n.auto&&k.publishInnerWidth){m=k.waitForOuterWidthInDom?j.getDomProp("width"):j.getProp("width");if(m===undefined){k.done=false}else{k.publishInnerWidth(j,m)}}}if(l.gotHeight){if(h.shrinkWrap){k.publishOwnerHeight(j,l.contentHeight)}else{if(k.publishInnerHeight){k.publishInnerHeight(j,l.height)}}}else{if(!h.auto&&k.publishInnerHeight){i=k.waitForOuterHeightInDom?j.getDomProp("height"):j.getProp("height");if(i===undefined){k.done=false}else{k.publishInnerHeight(j,i)}}}if(!l.gotAll){k.done=false}},calculateOwnerHeightFromContentHeight:function(c,d){return d+c.getFrameInfo().height},calculateOwnerWidthFromContentWidth:function(c,d){return d+c.getFrameInfo().width},onConstrainSize:function(g,h){var f=h.heightModel,e=h.widthModel;if(f){g.heightModel=f}if(e){g.widthModel=e}},publishOwnerHeight:function(k,m){var n=this,i=n.owner,j=n.calculateOwnerHeightFromContentHeight(k,m),p,l,o;if(isNaN(j)){n.done=false}else{l=Ext.Number.constrain(j,i.minHeight,i.maxHeight);if(l==j){o=n.setHeightInDom}else{p=n.sizeModels[(l<j)?"constrainedMax":"constrainedMin"];j=l;if(k.heightModel.calculatedFromShrinkWrap){k.heightModel=p}else{k.invalidate({before:n.onConstrainSize,heightModel:p})}}k.setHeight(j,o)}},publishOwnerWidth:function(l,i){var m=this,j=m.owner,n=m.calculateOwnerWidthFromContentWidth(l,i),p,k,o;if(isNaN(n)){m.done=false}else{k=Ext.Number.constrain(n,j.minWidth,j.maxWidth);if(k==n){o=m.setWidthInDom}else{p=m.sizeModels[(k<n)?"constrainedMax":"constrainedMin"];n=k;if(l.widthModel.calculatedFromShrinkWrap){l.widthModel=p}else{l.invalidate({before:m.onConstrainSize,widthModel:p})}}l.setWidth(n,o)}}});Ext.define("Ext.layout.component.field.Field",{extend:"Ext.layout.component.Auto",alias:"layout.field",uses:["Ext.tip.QuickTip","Ext.util.TextMetrics","Ext.util.CSS"],type:"field",beginLayout:function(h){var i=this,g=i.owner,f=h.widthModel,j;i.callParent(arguments);h.labelStrategy=i.getLabelStrategy();h.errorStrategy=i.getErrorStrategy();h.labelContext=h.getEl("labelEl");h.bodyCellContext=h.getEl("bodyEl");h.inputContext=h.getEl("inputEl");h.errorContext=h.getEl("errorEl");h.inputRow=h.getEl("inputRow");if((Ext.isIE6||Ext.isIE7)&&Ext.isStrict&&h.inputContext){i.ieInputWidthAdjustment=h.inputContext.getPaddingInfo().width+h.inputContext.getBorderInfo().width}h.labelStrategy.prepare(h,g);h.errorStrategy.prepare(h,g);if(f.shrinkWrap){i.beginLayoutShrinkWrap(h)}else{if(f.natural){if(typeof g.size=="number"){i.beginLayoutFixed(h,(j=g.size*6.5+20),"px")}else{i.beginLayoutShrinkWrap(h)}h.setWidth(j,false)}else{i.beginLayoutFixed(h,"100","%")}}},beginLayoutFixed:function(h,e,g){var f=h.target;f.el.setStyle("table-layout","fixed");f.bodyEl.setStyle("width",e+g)},beginLayoutShrinkWrap:function(c){var d=c.target;if(d.inputEl&&d.inputEl.dom){d.inputEl.dom.removeAttribute("size")}d.el.setStyle("table-layout","auto");d.bodyEl.setStyle("width","")},finishedLayout:function(c){var d=this.owner;this.callParent(arguments);c.labelStrategy.finishedLayout(c,d);c.errorStrategy.finishedLayout(c,d)},calculateOwnerHeightFromContentHeight:function(c,d){return d},measureContentHeight:function(b){return b.el.getHeight()},measureContentWidth:function(b){return b.el.getWidth()},measureLabelErrorHeight:function(b){return b.labelStrategy.getHeight(b)+b.errorStrategy.getHeight(b)},onFocus:function(){this.getErrorStrategy().onFocus(this.owner)},getLabelStrategy:function(){var d=this,f=d.labelStrategies,e=d.owner.labelAlign;return f[e]||f.base},getErrorStrategy:function(){var h=this,f=h.owner,g=h.errorStrategies,e=f.msgTarget;return !f.preventMark&&Ext.isString(e)?(g[e]||g.elementId):g.none},labelStrategies:(function(){var b={prepare:function(f,a){var h=a.labelCls+"-"+a.labelAlign,g=a.labelEl;if(g){g.addCls(h)}},getHeight:function(){return 0},finishedLayout:Ext.emptyFn};return{base:b,top:Ext.applyIf({prepare:function(e,a){b.prepare(e,a);var f=a.labelEl;e.hasHiddenLabel=f&&!a.hideEmptyLabel&&!a.getFieldLabel();if(e.hasHiddenLabel){f.dom.innerHTML=" "}},getHeight:function(f){var g=f.labelContext,h=g.getProp("height"),a=f.hasHiddenLabel;if(h===undefined||a){h=g.el.getHeight()+g.getMarginInfo().height;if(a){g.setHeight(h)}}return h},finishedLayout:function(d,a){if(d.hasHiddenLabel){a.labelEl.dom.innerHTML=""}}},b),left:b,right:b}}()),errorStrategies:(function(){function k(c){var b=Ext.layout.component.field.Field.tip,a;if(b&&b.isVisible()){a=b.activeTarget;if(a&&a.el===c.getActionEl().dom){b.toFront(true)}}}var l=Ext.applyIf,g=Ext.emptyFn,h=Ext.baseCSSPrefix+"form-invalid-icon",i,j={prepare:function(a,c){var b=c.errorEl;if(b){b.setDisplayed(false)}},getHeight:function(){return 0},onFocus:g,finishedLayout:g};return{none:j,side:l({prepare:function(c,d){var a=d.errorEl,b;if(!i){i=(b=Ext.getBody().createChild({style:"position:absolute",cls:h})).getWidth();b.remove()}a.addCls(h);a.set({"data-errorqtip":d.getActiveError()||""});a.setDisplayed(d.hasActiveError());d.bodyEl.dom.colSpan=d.getBodyColspan();Ext.layout.component.field.Field.initTip()},onFocus:k},j),under:l({prepare:function(b,d){var a=d.errorEl,c=Ext.baseCSSPrefix+"form-invalid-under";a.addCls(c);a.setDisplayed(d.hasActiveError());if(d.labelAlign=="left"){a.prev().setDisplayed(d.hasVisibleLabel()?"block":"none")}},getHeight:function(a){var d=0,c,b;if(a.target.hasActiveError()){c=a.errorContext;b=c.props;d=b.height;if(d===undefined){b.height=d=c.el.getHeight()}}return d}},j),qtip:l({prepare:function(a,b){Ext.layout.component.field.Field.initTip();b.getActionEl().set({"data-errorqtip":b.getActiveError()||""})},onFocus:k},j),title:l({prepare:function(a,b){b.el.set({title:b.getActiveError()||""})}},j),elementId:l({prepare:function(b,c){var a=Ext.fly(c.msgTarget);if(a){a.dom.innerHTML=c.getActiveError()||"";a.setDisplayed(c.hasActiveError())}}},j)}}()),statics:{initTip:function(){var b=this.tip;if(!b){b=this.tip=Ext.create("Ext.tip.QuickTip",{baseCls:Ext.baseCSSPrefix+"form-invalid-tip"});b.tagConfig=Ext.apply({},{attribute:"errorqtip"},b.tagConfig)}},destroyTip:function(){var b=this.tip;if(b){b.destroy();delete this.tip}}}});Ext.define("Ext.layout.component.field.Trigger",{alias:"layout.triggerfield",extend:"Ext.layout.component.field.Field",type:"triggerfield",beginLayout:function(g){var h=this,f=h.owner,e;g.triggerWrap=g.getEl("triggerWrap");h.callParent(arguments);e=f.getTriggerStateFlags();if(e!=f.lastTriggerStateFlags){f.lastTriggerStateFlags=e;h.updateEditState()}},beginLayoutFixed:function(l,h,k){var n=this,i=l.target,m=n.ieInputWidthAdjustment,j="100%";n.callParent(arguments);i.inputCell.setStyle("width","100%");if(m){i.inputCell.setStyle("padding-right",m+"px");if(k==="px"){j=h-m-i.getTriggerWidth()}}i.inputEl.setStyle("width",j);i.triggerWrap.setStyle("width",h+k);i.triggerWrap.setStyle("table-layout","fixed")},beginLayoutShrinkWrap:function(d){var e=d.target,f="";this.callParent(arguments);e.triggerWrap.setStyle("width",f);e.inputCell.setStyle("width",f);e.inputEl.setStyle("width",f);e.triggerWrap.setStyle("table-layout","auto")},getTextWidth:function(){var e=this,f=e.owner,g=f.inputEl,h;h=(g.dom.value||(f.hasFocus?"":f.emptyText)||"")+f.growAppend;return g.getTextWidth(h)},measureContentWidth:function(l){var m=this,i=m.owner,n=m.callParent(arguments),k=l.inputContext,o,j,p;if(i.grow&&!l.state.growHandled){o=m.getTextWidth()+l.inputContext.getFrameInfo().width;j=i.growMax;p=Math.min(j,n);j=Math.max(i.growMin,j,p);o=Ext.Number.constrain(o,i.growMin,j);k.setWidth(o);l.state.growHandled=true;k.domBlock(m,"width");n=NaN}return n},updateEditState:function(){var l=this,h=l.owner,j=h.inputEl,k=Ext.baseCSSPrefix+"trigger-noedit",g,i;if(l.owner.readOnly){j.addCls(k);i=true;g=false}else{if(l.owner.editable){j.removeCls(k);i=false}else{j.addCls(k);i=true}g=!l.owner.hideTrigger}h.triggerCell.setDisplayed(g);j.dom.readOnly=i}});Ext.define("Ext.layout.component.field.Text",{extend:"Ext.layout.component.field.Field",alias:"layout.textfield",requires:["Ext.util.TextMetrics"],type:"textfield",canGrowWidth:true,measureContentWidth:function(r){var n=this,s=n.owner,t=n.callParent(arguments),o=r.inputContext,k,l,q,m,p;if(s.grow&&n.canGrowWidth&&!r.state.growHandled){k=s.inputEl;l=Ext.util.Format.htmlEncode(k.dom.value||(s.hasFocus?"":s.emptyText)||"");l+=s.growAppend;q=k.getTextWidth(l)+o.getFrameInfo().width;m=s.growMax;p=Math.min(m,t);m=Math.max(s.growMin,m,p);q=Ext.Number.constrain(q,s.growMin,m);o.setWidth(q);r.state.growHandled=true;o.domBlock(n,"width");t=NaN}return t},publishInnerHeight:function(c,d){c.inputContext.setHeight(d-this.measureLabelErrorHeight(c))},beginLayoutFixed:function(i,g,h){var f=this,j=f.ieInputWidthAdjustment;if(j){f.owner.bodyEl.setStyle("padding-right",j+"px");if(h==="px"){g-=j}}f.callParent(arguments)}});Ext.define("Ext.grid.ColumnComponentLayout",{extend:"Ext.layout.component.Auto",alias:"layout.columncomponent",type:"columncomponent",setWidthInDom:true,getContentHeight:function(b){return this.owner.isGroupHeader?b.getProp("contentHeight"):this.callParent(arguments)},calculateOwnerHeightFromContentHeight:function(f,d){var e=this.callParent(arguments);if(this.owner.isGroupHeader){e+=this.owner.titleEl.dom.offsetHeight}return e},getContentWidth:function(b){return this.owner.isGroupHeader?b.getProp("contentWidth"):this.callParent(arguments)},calculateOwnerWidthFromContentWidth:function(c,d){return d+c.getPaddingInfo().width}});Ext.define("Ext.fx.Queue",{requires:["Ext.util.HashMap"],constructor:function(){this.targets=new Ext.util.HashMap();this.fxQueue={}},getFxDefaults:function(d){var c=this.targets.get(d);if(c){return c.fxDefaults}return{}},setFxDefaults:function(e,f){var d=this.targets.get(e);if(d){d.fxDefaults=Ext.apply(d.fxDefaults||{},f)}},stopAnimation:function(e){var g=this,f=g.getFxQueue(e),h=f.length;while(h){f[h-1].end();h--}},getActiveAnimation:function(c){var d=this.getFxQueue(c);return(d&&!!d.length)?d[0]:false},hasFxBlock:function(c){var d=this.getFxQueue(c);return d&&d[0]&&d[0].block},getFxQueue:function(e){if(!e){return false}var h=this,f=h.fxQueue[e],g=h.targets.get(e);if(!g){return false}if(!f){h.fxQueue[e]=[];if(g.type!="element"){g.target.on("destroy",function(){h.fxQueue[e]=[]})}}return h.fxQueue[e]},queueFx:function(i){var j=this,h=i.target,g,f;if(!h){return}g=j.getFxQueue(h.getId());f=g.length;if(f){if(i.concurrent){i.paused=false}else{g[f-1].on("afteranimate",function(){i.paused=false})}}else{i.paused=false}i.on("afteranimate",function(){Ext.Array.remove(g,i);if(i.remove){if(h.type=="element"){var a=Ext.get(h.id);if(a){a.remove()}}}},this);g.push(i)}});Ext.define("Ext.fx.target.Element",{extend:"Ext.fx.target.Target",type:"element",getElVal:function(d,e,f){if(f==undefined){if(e==="x"){f=d.getX()}else{if(e==="y"){f=d.getY()}else{if(e==="scrollTop"){f=d.getScroll().top}else{if(e==="scrollLeft"){f=d.getScroll().left}else{if(e==="height"){f=d.getHeight()}else{if(e==="width"){f=d.getWidth()}else{f=d.getStyle(e)}}}}}}}return f},getAttr:function(e,f){var d=this.target;return[[d,this.getElVal(d,e,f)]]},setAttr:function(n){var q=this.target,o=n.length,i,p,u,r,t,v,s,j;for(r=0;r<o;r++){i=n[r].attrs;for(p in i){if(i.hasOwnProperty(p)){v=i[p].length;for(t=0;t<v;t++){u=i[p][t];s=u[0];j=u[1];if(p==="x"){s.setX(j)}else{if(p==="y"){s.setY(j)}else{if(p==="scrollTop"){s.scrollTo("top",j)}else{if(p==="scrollLeft"){s.scrollTo("left",j)}else{if(p==="width"){s.setWidth(j)}else{if(p==="height"){s.setHeight(j)}else{s.setStyle(p,j)}}}}}}}}}}}});Ext.define("Ext.fx.target.ElementCSS",{extend:"Ext.fx.target.Element",setAttr:function(o,v){var i={attrs:[],duration:[],easing:[]},q=o.length,u,j,s,r,x,y,t,w,z;for(t=0;t<q;t++){j=o[t];x=j.duration;r=j.easing;j=j.attrs;for(s in j){if(Ext.Array.indexOf(i.attrs,s)==-1){i.attrs.push(s.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()}));i.duration.push(x+"ms");i.easing.push(r)}}}u=i.attrs.join(",");x=i.duration.join(",");r=i.easing.join(", ");for(t=0;t<q;t++){j=o[t].attrs;for(s in j){z=j[s].length;for(w=0;w<z;w++){y=j[s][w];y[0].setStyle(Ext.supports.CSS3Prefix+"TransitionProperty",v?"":u);y[0].setStyle(Ext.supports.CSS3Prefix+"TransitionDuration",v?"":x);y[0].setStyle(Ext.supports.CSS3Prefix+"TransitionTimingFunction",v?"":r);y[0].setStyle(s,y[1]);if(v){y=y[0].dom.offsetWidth}else{y[0].on(Ext.supports.CSS3TransitionEnd,function(){this.setStyle(Ext.supports.CSS3Prefix+"TransitionProperty",null);this.setStyle(Ext.supports.CSS3Prefix+"TransitionDuration",null);this.setStyle(Ext.supports.CSS3Prefix+"TransitionTimingFunction",null)},y[0],{single:true})}}}}}});Ext.define("Ext.fx.target.CompositeElement",{extend:"Ext.fx.target.Element",isComposite:true,constructor:function(b){b.id=b.id||Ext.id(null,"ext-composite-");this.callParent([b])},getAttr:function(i,j){var h=[],k=this.target.elements,l=k.length,n,m;for(n=0;n<l;n++){m=k[n];if(m){m=this.target.getElement(m);h.push([m,this.getElVal(m,i,j)])}}return h}});Ext.define("Ext.fx.target.CompositeElementCSS",{extend:"Ext.fx.target.CompositeElement",requires:["Ext.fx.target.ElementCSS"],setAttr:function(){return Ext.fx.target.ElementCSS.prototype.setAttr.apply(this,arguments)}});Ext.define("Ext.fx.target.Sprite",{extend:"Ext.fx.target.Target",type:"draw",getFromPrim:function(d,e){var f;switch(e){case"rotate":case"rotation":f=d.attr.rotation;return{x:f.x||0,y:f.y||0,degrees:f.degrees||0};case"scale":case"scaling":f=d.attr.scaling;return{x:f.x||1,y:f.y||1,cx:f.cx||0,cy:f.cy||0};case"translate":case"translation":f=d.attr.translation;return{x:f.x||0,y:f.y||0};default:return d.attr[e]}},getAttr:function(d,c){return[[this.target,c!=undefined?c:this.getFromPrim(this.target,d)]]},setAttr:function(u){var y=u.length,w=[],C,z,r,i,j,s,t,A,B,v,x,D;for(A=0;A<y;A++){C=u[A].attrs;for(z in C){r=C[z];D=r.length;for(B=0;B<D;B++){j=r[B][0];i=r[B][1];if(z==="translate"||z==="translation"){t={x:i.x,y:i.y}}else{if(z==="rotate"||z==="rotation"){v=i.x;if(isNaN(v)){v=null}x=i.y;if(isNaN(x)){x=null}t={degrees:i.degrees,x:v,y:x}}else{if(z==="scale"||z==="scaling"){v=i.x;if(isNaN(v)){v=null}x=i.y;if(isNaN(x)){x=null}t={x:v,y:x,cx:i.cx,cy:i.cy}}else{if(z==="width"||z==="height"||z==="x"||z==="y"){t=parseFloat(i)}else{t=i}}}}s=Ext.Array.indexOf(w,j);if(s==-1){w.push([j,{}]);s=w.length-1}w[s][1][z]=t}}}y=w.length;for(A=0;A<y;A++){w[A][0].setAttributes(w[A][1])}this.target.redraw()}});Ext.define("Ext.fx.target.CompositeSprite",{extend:"Ext.fx.target.Sprite",getAttr:function(i,j){var h=[],k=[].concat(this.target.items),l=k.length,m,n;for(m=0;m<l;m++){n=k[m];h.push([n,j!=undefined?j:this.getFromPrim(n,i)])}return h}});Ext.define("Ext.fx.target.Component",{extend:"Ext.fx.target.Target",type:"component",getPropMethod:{top:function(){return this.getPosition(true)[1]},left:function(){return this.getPosition(true)[0]},x:function(){return this.getPosition()[0]},y:function(){return this.getPosition()[1]},height:function(){return this.getHeight()},width:function(){return this.getWidth()},opacity:function(){return this.el.getStyle("opacity")}},compMethod:{top:"setPosition",left:"setPosition",x:"setPagePosition",y:"setPagePosition",height:"setSize",width:"setSize",opacity:"setOpacity"},getAttr:function(d,c){return[[this.target,c!==undefined?c:this.getPropMethod[d].call(this.target)]]},setAttr:function(H,A,D){var i=this,w=i.target,j=H.length,F,v,E,z,B,o,x,C,h,G,y;for(z=0;z<j;z++){F=H[z].attrs;for(v in F){x=F[v].length;o={setPosition:{},setPagePosition:{},setSize:{},setOpacity:{}};for(B=0;B<x;B++){E=F[v][B];o[i.compMethod[v]].target=E[0];o[i.compMethod[v]][v]=E[1]}if(o.setPosition.target){E=o.setPosition;C=(E.left===undefined)?undefined:parseFloat(E.left);h=(E.top===undefined)?undefined:parseFloat(E.top);E.target.setPosition(C,h)}if(o.setPagePosition.target){E=o.setPagePosition;E.target.setPagePosition(E.x,E.y)}if(o.setSize.target){E=o.setSize;G=(E.width===undefined)?E.target.getWidth():parseFloat(E.width);y=(E.height===undefined)?E.target.getHeight():parseFloat(E.height);if(D||i.dynamic){E.target.setSize(G,y)}else{E.target.el.setSize(G,y)}}if(o.setOpacity.target){E=o.setOpacity;E.target.el.setStyle("opacity",E.opacity)}}}}});Ext.define("Ext.fx.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.fx.target.Element","Ext.fx.target.ElementCSS","Ext.fx.target.CompositeElement","Ext.fx.target.CompositeElementCSS","Ext.fx.target.Sprite","Ext.fx.target.CompositeSprite","Ext.fx.target.Component"],mixins:{queue:"Ext.fx.Queue"},constructor:function(){this.items=new Ext.util.MixedCollection();this.mixins.queue.constructor.call(this)},interval:16,forceJS:true,createTarget:function(g){var e=this,h=!e.forceJS&&Ext.supports.Transitions,f;e.useCSS3=h;if(g){if(g.tagName||Ext.isString(g)||g.isFly){g=Ext.get(g);f=new Ext.fx.target["Element"+(h?"CSS":"")](g)}else{if(g.dom){f=new Ext.fx.target["Element"+(h?"CSS":"")](g)}else{if(g.isComposite){f=new Ext.fx.target["CompositeElement"+(h?"CSS":"")](g)}else{if(g.isSprite){f=new Ext.fx.target.Sprite(g)}else{if(g.isCompositeSprite){f=new Ext.fx.target.CompositeSprite(g)}else{if(g.isComponent){f=new Ext.fx.target.Component(g)}else{if(g.isAnimTarget){return g}else{return null}}}}}}}e.targets.add(f);return f}else{return null}},addAnim:function(f){var d=this.items,e=this.task;d.add(f.id,f);if(!e&&d.length){e=this.task={run:this.runner,interval:this.interval,scope:this};Ext.TaskManager.start(e)}},removeAnim:function(g){var h=this,e=h.items,f=h.task;e.removeAtKey(g.id);if(f&&!e.length){Ext.TaskManager.stop(f);delete h.task}},runner:function(){var i=this,f=i.items.getRange(),j=0,g=f.length,h;i.targetArr={};i.timestamp=new Date();for(;j<g;j++){h=f[j];if(h.isReady()){i.startAnim(h)}}for(j=0;j<g;j++){h=f[j];if(h.isRunning()){i.runAnim(h)}else{if(!i.useCSS3){}}}i.applyPendingAttrs()},startAnim:function(b){b.start(this.timestamp)},runAnim:function(n){if(!n){return}var o=this,i=n.target.getId(),l=o.useCSS3&&n.target.type=="element",j=o.timestamp-n.startTime,p=(j>=n.duration),m,k;m=this.collectTargetData(n,j,l,p);if(l){n.target.setAttr(m.anims[n.id].attributes,true);o.collectTargetData(n,n.duration,l,p);n.paused=true;m=n.target.target;if(n.target.isComposite){m=n.target.target.last()}k={};k[Ext.supports.CSS3TransitionEnd]=n.lastFrame;k.scope=n;k.single=true;m.on(k)}},collectTargetData:function(l,h,j,i){var g=l.target.getId(),k=this.targetArr[g];if(!k){k=this.targetArr[g]={id:g,el:l.target,anims:{}}}k.anims[l.id]={id:l.id,anim:l,elapsed:h,isLastFrame:i,attributes:[{duration:l.duration,easing:(j&&l.reverse)?l.easingFn.reverse().toCSS3():l.easing,attrs:l.runAnim(h)}]};return k},applyPendingAttrs:function(){var j=this.targetArr,i,l,g,k,h;for(l in j){if(j.hasOwnProperty(l)){i=j[l];for(h in i.anims){if(i.anims.hasOwnProperty(h)){g=i.anims[h];k=g.anim;if(g.attributes&&k.isRunning()){i.el.setAttr(g.attributes,false,g.isLastFrame);if(g.isLastFrame){k.lastFrame()}}}}}}}});Ext.define("Ext.fx.Animator",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.fx.Manager"],isAnimator:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",running:false,paused:false,damper:1,iterations:1,currentIteration:0,keyframeStep:0,animKeyFramesRE:/^(from|to|\d+%?)$/,constructor:function(d){var c=this;d=Ext.apply(c,d||{});c.config=d;c.id=Ext.id(null,"ext-animator-");c.addEvents("beforeanimate","keyframe","afteranimate");c.mixins.observable.constructor.call(c,d);c.timeline=[];c.createTimeline(c.keyframes);if(c.target){c.applyAnimator(c.target);Ext.fx.Manager.addAnim(c)}},sorter:function(a,b){return a.pct-b.pct},createTimeline:function(u){var r=this,o=[],q=r.to||{},x=r.duration,i,z,v,s,p,y,w,t;for(p in u){if(u.hasOwnProperty(p)&&r.animKeyFramesRE.test(p)){t={attrs:Ext.apply(u[p],q)};if(p=="from"){p=0}else{if(p=="to"){p=100}}t.pct=parseInt(p,10);o.push(t)}}Ext.Array.sort(o,r.sorter);s=o.length;for(v=0;v<s;v++){i=(o[v-1])?x*(o[v-1].pct/100):0;z=x*(o[v].pct/100);r.timeline.push({duration:z-i,attrs:o[v].attrs})}},applyAnimator:function(v){var r=this,q=[],i=r.timeline,u=r.reverse,s=i.length,y,t,z,w,o,p,x;if(r.fireEvent("beforeanimate",r)!==false){for(x=0;x<s;x++){y=i[x];o=y.attrs;t=o.easing||r.easing;z=o.damper||r.damper;delete o.easing;delete o.damper;y=new Ext.fx.Anim({target:v,easing:t,damper:z,duration:y.duration,paused:true,to:o});q.push(y)}r.animations=q;r.target=y.target;for(x=0;x<s-1;x++){y=q[x];y.nextAnim=q[x+1];y.on("afteranimate",function(){this.nextAnim.paused=false});y.on("afteranimate",function(){this.fireEvent("keyframe",this,++this.keyframeStep)},r)}q[s-1].on("afteranimate",function(){this.lastFrame()},r)}},start:function(i){var h=this,j=h.delay,f=h.delayStart,g;if(j){if(!f){h.delayStart=i;return}else{g=i-f;if(g<j){return}else{i=new Date(f.getTime()+j)}}}if(h.fireEvent("beforeanimate",h)!==false){h.startTime=i;h.running=true;h.animations[h.keyframeStep].paused=false}},lastFrame:function(){var f=this,e=f.iterations,d=f.currentIteration;d++;if(d<e){f.startTime=new Date();f.currentIteration=d;f.keyframeStep=0;f.applyAnimator(f.target);f.animations[f.keyframeStep].paused=false}else{f.currentIteration=0;f.end()}},end:function(){var b=this;b.fireEvent("afteranimate",b,b.startTime,new Date()-b.startTime)},isReady:function(){return this.paused===false&&this.running===false&&this.iterations>0},isRunning:function(){return false}});Ext.define("Ext.draw.Draw",{singleton:true,requires:["Ext.draw.Color"],pathToStringRE:/,?([achlmqrstvxz]),?/gi,pathCommandRE:/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,pathValuesRE:/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,stopsRE:/^(\d+%?)$/,radian:Math.PI/180,availableAnimAttrs:{along:"along",blur:null,"clip-rect":"csv",cx:null,cy:null,fill:"color","fill-opacity":null,"font-size":null,height:null,opacity:null,path:"path",r:null,rotation:"csv",rx:null,ry:null,scale:"csv",stroke:"color","stroke-opacity":null,"stroke-width":null,translation:"csv",width:null,x:null,y:null},is:function(c,d){d=String(d).toLowerCase();return(d=="object"&&c===Object(c))||(d=="undefined"&&typeof c==d)||(d=="null"&&c===null)||(d=="array"&&Array.isArray&&Array.isArray(c))||(Object.prototype.toString.call(c).toLowerCase().slice(8,-1))==d},ellipsePath:function(c){var d=c.attr;return Ext.String.format("M{0},{1}A{2},{3},0,1,1,{0},{4}A{2},{3},0,1,1,{0},{1}z",d.x,d.y-d.ry,d.rx,d.ry,d.y+d.ry)},rectPath:function(c){var d=c.attr;if(d.radius){return Ext.String.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",d.x+d.radius,d.y,d.width-d.radius*2,d.radius,-d.radius,d.height-d.radius*2,d.radius*2-d.width,d.radius*2-d.height)}else{return Ext.String.format("M{0},{1}L{2},{1},{2},{3},{0},{3}z",d.x,d.y,d.width+d.x,d.height+d.y)}},path2string:function(){return this.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},pathToString:function(b){return b.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},parsePathString:function(f){if(!f){return null}var g={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},h=[],e=this;if(e.is(f,"array")&&e.is(f[0],"array")){h=e.pathClone(f)}if(!h.length){String(f).replace(e.pathCommandRE,function(d,j,a){var b=[],c=j.toLowerCase();a.replace(e.pathValuesRE,function(i,l){l&&b.push(+l)});if(c=="m"&&b.length>2){h.push([j].concat(Ext.Array.splice(b,0,2)));c="l";j=(j=="m")?"l":"L"}while(b.length>=g[c]){h.push([j].concat(Ext.Array.splice(b,0,g[c])));if(!g[c]){break}}})}h.toString=e.path2string;return h},mapPath:function(i,m){if(!m){return i}var l,n,p,j,r,o,q;i=this.path2curve(i);for(p=0,j=i.length;p<j;p++){q=i[p];for(r=1,o=q.length;r<o-1;r+=2){l=m.x(q[r],q[r+1]);n=m.y(q[r],q[r+1]);q[r]=l;q[r+1]=n}}return i},pathClone:function(i){var l=[],h,j,g,k;if(!this.is(i,"array")||!this.is(i&&i[0],"array")){i=this.parsePathString(i)}for(g=0,k=i.length;g<k;g++){l[g]=[];for(h=0,j=i[g].length;h<j;h++){l[g][h]=i[g][h]}}l.toString=this.path2string;return l},pathToAbsolute:function(v){if(!this.is(v,"array")||!this.is(v&&v[0],"array")){v=this.parsePathString(v)}var q=[],o=0,p=0,i=0,j=0,s=0,r=v.length,w,u,t,x;if(r&&v[0][0]=="M"){o=+v[0][1];p=+v[0][2];i=o;j=p;s++;q[0]=["M",o,p]}for(;s<r;s++){w=q[s]=[];u=v[s];if(u[0]!=u[0].toUpperCase()){w[0]=u[0].toUpperCase();switch(w[0]){case"A":w[1]=u[1];w[2]=u[2];w[3]=u[3];w[4]=u[4];w[5]=u[5];w[6]=+(u[6]+o);w[7]=+(u[7]+p);break;case"V":w[1]=+u[1]+p;break;case"H":w[1]=+u[1]+o;break;case"M":i=+u[1]+o;j=+u[2]+p;default:t=1;x=u.length;for(;t<x;t++){w[t]=+u[t]+((t%2)?o:p)}}}else{t=0;x=u.length;for(;t<x;t++){q[s][t]=u[t]}}switch(w[0]){case"Z":o=i;p=j;break;case"H":o=w[1];break;case"V":p=w[1];break;case"M":u=q[s];x=u.length;i=u[x-2];j=u[x-1];default:u=q[s];x=u.length;o=u[x-2];p=u[x-1]}}q.toString=this.path2string;return q},pathToRelative:function(A){if(!this.is(A,"array")||!this.is(A&&A[0],"array")){A=this.parsePathString(A)}var u=[],k=0,r=0,F=0,i=0,B=0,D,j,x,y,z,v,E,w,C;if(A[0][0]=="M"){k=A[0][1];r=A[0][2];F=k;i=r;B++;u.push(["M",k,r])}for(x=B,E=A.length;x<E;x++){D=u[x]=[];j=A[x];if(j[0]!=j[0].toLowerCase()){D[0]=j[0].toLowerCase();switch(D[0]){case"a":D[1]=j[1];D[2]=j[2];D[3]=j[3];D[4]=j[4];D[5]=j[5];D[6]=+(j[6]-k).toFixed(3);D[7]=+(j[7]-r).toFixed(3);break;case"v":D[1]=+(j[1]-r).toFixed(3);break;case"m":F=j[1];i=j[2];default:for(y=1,w=j.length;y<w;y++){D[y]=+(j[y]-((y%2)?k:r)).toFixed(3)}}}else{D=u[x]=[];if(j[0]=="m"){F=j[1]+k;i=j[2]+r}for(z=0,C=j.length;z<C;z++){u[x][z]=j[z]}}v=u[x].length;switch(u[x][0]){case"z":k=F;r=i;break;case"h":k+=+u[x][v-1];break;case"v":r+=+u[x][v-1];break;default:k+=+u[x][v-2];r+=+u[x][v-1]}}u.toString=this.path2string;return u},path2curve:function(i){var o=this,l=o.pathToAbsolute(i),p=l.length,k={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},q,r,m,n;for(q=0;q<p;q++){l[q]=o.command2curve(l[q],k);if(l[q].length>7){l[q].shift();n=l[q];while(n.length){Ext.Array.splice(l,q++,0,["C"].concat(Ext.Array.splice(n,0,6)))}Ext.Array.erase(l,q,1);p=l.length;q--}r=l[q];m=r.length;k.x=r[m-2];k.y=r[m-1];k.bx=parseFloat(r[m-4])||k.x;k.by=parseFloat(r[m-3])||k.y}return l},interpolatePaths:function(i,u){var w=this,A=w.pathToAbsolute(i),t=w.pathToAbsolute(u),s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},D={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},C=function(c,b){if(c[b].length>7){c[b].shift();var a=c[b];while(a.length){Ext.Array.splice(c,b++,0,["C"].concat(Ext.Array.splice(a,0,6)))}Ext.Array.erase(c,b,1);r=Math.max(A.length,t.length||0)}},B=function(a,b,d,e,c){if(a&&b&&a[c][0]=="M"&&b[c][0]!="M"){Ext.Array.splice(b,c,0,["M",e.x,e.y]);d.bx=0;d.by=0;d.x=a[c][1];d.y=a[c][2];r=Math.max(A.length,t.length||0)}},x,r,y,p,z,v;for(x=0,r=Math.max(A.length,t.length||0);x<r;x++){A[x]=w.command2curve(A[x],s);C(A,x);(t[x]=w.command2curve(t[x],D));C(t,x);B(A,t,s,D,x);B(t,A,D,s,x);y=A[x];p=t[x];z=y.length;v=p.length;s.x=y[z-2];s.y=y[z-1];s.bx=parseFloat(y[z-4])||s.x;s.by=parseFloat(y[z-3])||s.y;D.bx=(parseFloat(p[v-4])||D.x);D.by=(parseFloat(p[v-3])||D.y);D.x=p[v-2];D.y=p[v-1]}return[A,t]},command2curve:function(f,d){var e=this;if(!f){return["C",d.x,d.y,d.x,d.y,d.x,d.y]}if(f[0]!="T"&&f[0]!="Q"){d.qx=d.qy=null}switch(f[0]){case"M":d.X=f[1];d.Y=f[2];break;case"A":f=["C"].concat(e.arc2curve.apply(e,[d.x,d.y].concat(f.slice(1))));break;case"S":f=["C",d.x+(d.x-(d.bx||d.x)),d.y+(d.y-(d.by||d.y))].concat(f.slice(1));break;case"T":d.qx=d.x+(d.x-(d.qx||d.x));d.qy=d.y+(d.y-(d.qy||d.y));f=["C"].concat(e.quadratic2curve(d.x,d.y,d.qx,d.qy,f[1],f[2]));break;case"Q":d.qx=f[1];d.qy=f[2];f=["C"].concat(e.quadratic2curve(d.x,d.y,f[1],f[2],f[3],f[4]));break;case"L":f=["C"].concat(d.x,d.y,f[1],f[2],f[1],f[2]);break;case"H":f=["C"].concat(d.x,d.y,f[1],d.y,f[1],d.y);break;case"V":f=["C"].concat(d.x,d.y,d.x,f[1],d.x,f[1]);break;case"Z":f=["C"].concat(d.x,d.y,d.X,d.Y,d.X,d.Y);break}return f},quadratic2curve:function(i,o,l,n,j,p){var m=1/3,k=2/3;return[m*i+k*l,m*o+k*n,m*j+k*l,m*p+k*n,j,p]},rotate:function(h,j,i){var m=Math.cos(i),n=Math.sin(i),k=h*m-j*n,l=h*n+j*m;return{x:k,y:l}},arc2curve:function(aM,aw,at,av,aH,aS,aW,aN,az,aF){var aK=this,aY=Math.PI,aJ=aK.radian,ax=aY*120/180,a1=aJ*(+aH||0),an=[],aq=Math,y=aq.cos,a2=aq.sin,t=aq.sqrt,aL=aq.abs,aR=aq.asin,ar,a0,aP,al,am,aG,aZ,ai,x,aB,aD,aT,aU,aO,aV,aA,aX,aC,ak,ah,aj,aE,aI,h,k,ao,i,ap,ay,au,aQ;if(!aF){ar=aK.rotate(aM,aw,-a1);aM=ar.x;aw=ar.y;ar=aK.rotate(aN,az,-a1);aN=ar.x;az=ar.y;a0=y(aJ*aH);aP=a2(aJ*aH);al=(aM-aN)/2;am=(aw-az)/2;aG=(al*al)/(at*at)+(am*am)/(av*av);if(aG>1){aG=t(aG);at=aG*at;av=aG*av}aZ=at*at;ai=av*av;x=(aS==aW?-1:1)*t(aL((aZ*ai-aZ*am*am-ai*al*al)/(aZ*am*am+ai*al*al)));aB=x*at*am/av+(aM+aN)/2;aD=x*-av*al/at+(aw+az)/2;aT=aR(((aw-aD)/av).toFixed(7));aU=aR(((az-aD)/av).toFixed(7));aT=aM<aB?aY-aT:aT;aU=aN<aB?aY-aU:aU;if(aT<0){aT=aY*2+aT}if(aU<0){aU=aY*2+aU}if(aW&&aT>aU){aT=aT-aY*2}if(!aW&&aU>aT){aU=aU-aY*2}}else{aT=aF[0];aU=aF[1];aB=aF[2];aD=aF[3]}aO=aU-aT;if(aL(aO)>ax){ay=aU;au=aN;aQ=az;aU=aT+ax*(aW&&aU>aT?1:-1);aN=aB+at*y(aU);az=aD+av*a2(aU);an=aK.arc2curve(aN,az,at,av,aH,0,aW,au,aQ,[aU,ay,aB,aD])}aO=aU-aT;aV=y(aT);aA=a2(aT);aX=y(aU);aC=a2(aU);ak=aq.tan(aO/4);ah=4/3*at*ak;aj=4/3*av*ak;aE=[aM,aw];aI=[aM+ah*aA,aw-aj*aV];h=[aN+ah*aC,az-aj*aX];k=[aN,az];aI[0]=2*aE[0]-aI[0];aI[1]=2*aE[1]-aI[1];if(aF){return[aI,h,k].concat(an)}else{an=[aI,h,k].concat(an).join().split(",");ao=[];ap=an.length;for(i=0;i<ap;i++){ao[i]=i%2?aK.rotate(an[i-1],an[i],a1).y:aK.rotate(an[i],an[i+1],a1).x}return ao}},rotateAndTranslatePath:function(q){var v=q.rotation.degrees,u=q.rotation.x,w=q.rotation.y,i=q.translation.x,p=q.translation.y,j,s,x,o,t,r=[];if(!v&&!i&&!p){return this.pathToAbsolute(q.attr.path)}i=i||0;p=p||0;j=this.pathToAbsolute(q.attr.path);for(s=j.length;s--;){x=r[s]=j[s].slice();if(x[0]=="A"){o=this.rotatePoint(x[6],x[7],v,u,w);x[6]=o.x+i;x[7]=o.y+p}else{t=1;while(x[t+1]!=null){o=this.rotatePoint(x[t],x[t+1],v,u,w);x[t]=o.x+i;x[t+1]=o.y+p;t+=2}}}return r},rotatePoint:function(h,j,l,i,k){if(!l){return{x:h,y:j}}i=i||0;k=k||0;h=h-i;j=j-k;l=l*this.radian;var m=Math.cos(l),n=Math.sin(l);return{x:h*m-j*n+i,y:h*n+j*m+k}},pathDimensions:function(i){if(!i||!(i+"")){return{x:0,y:0,width:0,height:0}}i=this.path2curve(i);var n=0,o=0,s=[],u=[],r=0,p=i.length,t,v,m,q;for(;r<p;r++){t=i[r];if(t[0]=="M"){n=t[1];o=t[2];s.push(n);u.push(o)}else{q=this.curveDim(n,o,t[1],t[2],t[3],t[4],t[5],t[6]);s=s.concat(q.min.x,q.max.x);u=u.concat(q.min.y,q.max.y);n=t[5];o=t[6]}}v=Math.min.apply(0,s);m=Math.min.apply(0,u);return{x:v,y:m,path:i,width:Math.max.apply(0,s)-v,height:Math.max.apply(0,u)-m}},intersectInside:function(d,f,e){return(e[0]-f[0])*(d[1]-f[1])>(e[1]-f[1])*(d[0]-f[0])},intersectIntersection:function(e,n,t,u){var v=[],w=t[0]-u[0],x=t[1]-u[1],p=e[0]-n[0],r=e[1]-n[1],o=t[0]*u[1]-t[1]*u[0],q=e[0]*n[1]-e[1]*n[0],s=1/(w*r-x*p);v[0]=(o*p-q*w)*s;v[1]=(o*r-q*x)*s;return v},intersect:function(r,z){var s=this,v=0,t=z.length,w=z[t-1],i=r,x,e,u,j,B,A,y;for(;v<t;++v){x=z[v];A=i;i=[];e=A[A.length-1];y=0;B=A.length;for(;y<B;y++){u=A[y];if(s.intersectInside(u,w,x)){if(!s.intersectInside(e,w,x)){i.push(s.intersectIntersection(e,u,w,x))}i.push(u)}else{if(s.intersectInside(e,w,x)){i.push(s.intersectIntersection(e,u,w,x))}}e=u}w=x}return i},bezier:function(n,o,a,b,p){if(p===0){return n}else{if(p===1){return b}}var d=1-p,m=d*d*d,c=p/d;return m*(n+c*(3*o+c*(3*a+b*c)))},bezierDim:function(a,b,i,r){var C=[],z,x,c,y,D,A,B,w,d,s;if(a+3*i==r+3*b){z=a-b;z/=2*(a-b-b+i);if(z<1&&z>0){C.push(z)}}else{x=a-3*b+3*i-r;c=2*(a-b-b+i);y=a-b;D=c*c-4*x*y;A=x+x;if(D===0){z=c/A;if(z<1&&z>0){C.push(z)}}else{if(D>0){B=Math.sqrt(D);z=(B+c)/A;if(z<1&&z>0){C.push(z)}z=(c-B)/A;if(z<1&&z>0){C.push(z)}}}}w=Math.min(a,r);d=Math.max(a,r);for(s=0;s<C.length;s++){w=Math.min(w,this.bezier(a,b,i,r,C[s]));d=Math.max(d,this.bezier(a,b,i,r,C[s]))}return[w,d]},curveDim:function(s,t,q,r,k,l,n,p){var m=this.bezierDim(s,q,k,n),o=this.bezierDim(t,r,l,p);return{min:{x:m[0],y:o[0]},max:{x:m[1],y:o[1]}}},getAnchors:function(P,Q,K,L,z,A,E){E=E||4;var M=Math,F=M.PI,D=F/2,I=M.abs,T=M.sin,S=M.cos,O=M.atan,B,C,N,J,G,H,x,y,R;B=(K-P)/E;C=(z-K)/E;if((L>=Q&&L>=A)||(L<=Q&&L<=A)){N=J=D}else{N=O((K-P)/I(L-Q));if(Q<L){N=F-N}J=O((z-K)/I(L-A));if(A<L){J=F-J}}R=D-((N+J)%(F*2))/2;if(R>D){R-=F}N+=R;J+=R;G=K-B*T(N);H=L+B*S(N);x=K+C*T(J);y=L+C*S(J);if((L>Q&&H<Q)||(L<Q&&H>Q)){G+=I(Q-H)*(G-K)/(H-L);H=Q}if((L>A&&y<A)||(L<A&&y>A)){x-=I(A-y)*(x-K)/(y-L);y=A}return{x1:G,y1:H,x2:x,y2:y}},smooth:function(R,D){var E=this.path2curve(R),N=[E[0]],K=E[0][1],L=E[0][2],C,A,y=1,J=E.length,M=1,H=K,I=L,P=0,Q=0,i,j,x,G,B,F,O;for(;y<J;y++){i=E[y];j=i.length;x=E[y-1];G=x.length;B=E[y+1];F=B&&B.length;if(i[0]=="M"){H=i[1];I=i[2];C=y+1;while(E[C][0]!="C"){C++}P=E[C][5];Q=E[C][6];N.push(["M",H,I]);M=N.length;K=H;L=I;continue}if(i[j-2]==H&&i[j-1]==I&&(!B||B[0]=="M")){O=N[M].length;A=this.getAnchors(x[G-2],x[G-1],H,I,N[M][O-2],N[M][O-1],D);N[M][1]=A.x2;N[M][2]=A.y2}else{if(!B||B[0]=="M"){A={x1:i[j-2],y1:i[j-1]}}else{A=this.getAnchors(x[G-2],x[G-1],i[j-2],i[j-1],B[F-2],B[F-1],D)}}N.push(["C",K,L,A.x1,A.y1,i[j-2],i[j-1]]);K=A.x2;L=A.y2}return N},findDotAtSegment:function(s,t,q,r,l,m,n,o,k){var p=1-k;return{x:Math.pow(p,3)*s+Math.pow(p,2)*3*k*q+p*3*k*k*l+Math.pow(k,3)*n,y:Math.pow(p,3)*t+Math.pow(p,2)*3*k*r+p*3*k*k*m+Math.pow(k,3)*o}},snapEnds:function(m,i,D,w){if(Ext.isDate(m)){return this.snapEndsByDate(m,i,D)}var E=(i-m)/D,G=Math.floor(Math.log(E)/Math.LN10)+1,C=Math.pow(10,G),H,u=Math.round((E%C)*Math.pow(10,2-G)),F=[[0,15],[20,4],[30,2],[40,4],[50,9],[60,4],[70,2],[80,4],[100,15]],A=0,t,y,z,B,x=1000000000,v=F.length;H=m=Math.floor(m/C)*C;if(w){for(z=0;z<v;z++){t=F[z][0];y=(t-u)<0?1000000:(t-u)/F[z][1];if(y<x){B=t;x=y}}E=Math.floor(E*Math.pow(10,-G))*Math.pow(10,G)+B*Math.pow(10,G-2);while(H<i){H+=E;A++}i=+H.toFixed(10)}else{A=D}return{from:m,to:i,power:G,step:E,steps:A}},snapEndsByDate:function(p,o,w,n){var t=false,r=[[Ext.Date.MILLI,[1,2,3,5,10,20,30,50,100,200,300,500]],[Ext.Date.SECOND,[1,2,3,5,10,15,30]],[Ext.Date.MINUTE,[1,2,3,5,10,20,30]],[Ext.Date.HOUR,[1,2,3,4,6,12]],[Ext.Date.DAY,[1,2,3,7,14]],[Ext.Date.MONTH,[1,2,3,4,6]]],s=r.length,q=false,v,u,x,j;for(j=0;j<s;j++){v=r[j];if(!q){for(u=0;u<v[1].length;u++){if(o<Ext.Date.add(p,v[0],v[1][u]*w)){t=[v[0],v[1][u]];q=true;break}}}}if(!t){x=this.snapEnds(p.getFullYear(),o.getFullYear()+1,w,n);t=[Date.YEAR,Math.round(x.step)]}return this.snapEndsByDateAndStep(p,o,t,n)},snapEndsByDateAndStep:function(k,l,n,j){var o=[k.getFullYear(),k.getMonth(),k.getDate(),k.getHours(),k.getMinutes(),k.getSeconds(),k.getMilliseconds()],i=0,m,p;if(j){m=k}else{switch(n[0]){case Ext.Date.MILLI:m=new Date(o[0],o[1],o[2],o[3],o[4],o[5],Math.floor(o[6]/n[1])*n[1]);break;case Ext.Date.SECOND:m=new Date(o[0],o[1],o[2],o[3],o[4],Math.floor(o[5]/n[1])*n[1],0);break;case Ext.Date.MINUTE:m=new Date(o[0],o[1],o[2],o[3],Math.floor(o[4]/n[1])*n[1],0,0);break;case Ext.Date.HOUR:m=new Date(o[0],o[1],o[2],Math.floor(o[3]/n[1])*n[1],0,0,0);break;case Ext.Date.DAY:m=new Date(o[0],o[1],Math.floor(o[2]-1/n[1])*n[1]+1,0,0,0,0);break;case Ext.Date.MONTH:m=new Date(o[0],Math.floor(o[1]/n[1])*n[1],1,0,0,0,0);break;default:m=new Date(Math.floor(o[0]/n[1])*n[1],0,1,0,0,0,0);break}}p=m;while(p<l){p=Ext.Date.add(p,n[0],n[1]);i++}if(j){p=l}return{from:+m,to:+p,step:(p-m)/i,steps:i}},sorter:function(a,b){return a.offset-b.offset},rad:function(b){return b%360*Math.PI/180},degrees:function(b){return b*180/Math.PI%360},withinBox:function(e,f,d){d=d||{};return(e>=d.x&&e<=(d.x+d.width)&&f>=d.y&&f<=(d.y+d.height))},parseGradient:function(m){var r=this,q=m.type||"linear",t=m.angle||0,o=r.radian,l=m.stops,v=[],n,u,p,s;if(q=="linear"){u=[0,0,Math.cos(t*o),Math.sin(t*o)];p=1/(Math.max(Math.abs(u[2]),Math.abs(u[3]))||1);u[2]*=p;u[3]*=p;if(u[2]<0){u[0]=-u[2];u[2]=0}if(u[3]<0){u[1]=-u[3];u[3]=0}}for(n in l){if(l.hasOwnProperty(n)&&r.stopsRE.test(n)){s={offset:parseInt(n,10),color:Ext.draw.Color.toHex(l[n].color)||"#ffffff",opacity:l[n].opacity||1};v.push(s)}}Ext.Array.sort(v,r.sorter);if(q=="linear"){return{id:m.id,type:q,vector:u,stops:v}}else{return{id:m.id,type:q,centerX:m.centerX,centerY:m.centerY,focalX:m.focalX,focalY:m.focalY,radius:m.radius,vector:u,stops:v}}}});Ext.define("Ext.fx.PropertyHandler",{requires:["Ext.draw.Draw"],statics:{defaultHandler:{pixelDefaultsRE:/width|height|top$|bottom$|left$|right$/i,unitRE:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/,scrollRE:/^scroll/i,computeDelta:function(j,p,r,m,k){r=(typeof r=="number")?r:1;var l=this.unitRE,o=l.exec(j),q,n;if(o){j=o[1];n=o[2];if(!this.scrollRE.test(k)&&!n&&this.pixelDefaultsRE.test(k)){n="px"}}j=+j||0;o=l.exec(p);if(o){p=o[1];n=o[2]||n}p=+p||0;q=(m!=null)?m:j;return{from:j,delta:(p-q)*r,units:n}},get:function(i,w,x,j,q){var o=i.length,u=[],t,r,p,v,s;for(t=0;t<o;t++){if(j){r=j[t][1].from}if(Ext.isArray(i[t][1])&&Ext.isArray(w)){p=[];v=0;s=i[t][1].length;for(;v<s;v++){p.push(this.computeDelta(i[t][1][v],w[v],x,r,q))}u.push([i[t][0],p])}else{u.push([i[t][0],this.computeDelta(i[t][1],w,x,r,q)])}}return u},set:function(i,m){var l=i.length,p=[],o,r,j,n,q;for(o=0;o<l;o++){r=i[o][1];if(Ext.isArray(r)){j=[];q=0;n=r.length;for(;q<n;q++){j.push(r[q].from+r[q].delta*m+(r[q].units||0))}p.push([i[o][0],j])}else{p.push([i[o][0],r.from+r.delta*m+(r.units||0)])}}return p}},stringHandler:{computeDelta:function(h,f,i,j,g){return{from:h,delta:f}},get:function(i,w,x,j,q){var o=i.length,u=[],t,r,p,v,s;for(t=0;t<o;t++){u.push([i[t][0],this.computeDelta(i[t][1],w,x,r,q)])}return u},set:function(i,m){var l=i.length,p=[],o,r,j,n,q;for(o=0;o<l;o++){r=i[o][1];p.push([i[o][0],r.delta])}return p}},color:{rgbRE:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,hexRE:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,hex3RE:/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,parseColor:function(n,r){r=(typeof r=="number")?r:1;var m=false,p=[this.hexRE,this.rgbRE,this.hex3RE],o=p.length,k,q,i,l;for(l=0;l<o;l++){i=p[l];q=(l%2===0)?16:10;k=i.exec(n);if(k&&k.length===4){if(l===2){k[1]+=k[1];k[2]+=k[2];k[3]+=k[3]}m={red:parseInt(k[1],q),green:parseInt(k[2],q),blue:parseInt(k[3],q)};break}}return m||n},computeDelta:function(j,i,l,n){j=this.parseColor(j);i=this.parseColor(i,l);var k=n?n:j,h=typeof k,m=typeof i;if(h=="string"||h=="undefined"||m=="string"||m=="undefined"){return i||k}return{from:j,delta:{red:Math.round((i.red-k.red)*l),green:Math.round((i.green-k.green)*l),blue:Math.round((i.blue-k.blue)*l)}}},get:function(k,j,m,o){var l=k.length,p=[],n,i;for(n=0;n<l;n++){if(o){i=o[n][1].from}p.push([k[n][0],this.computeDelta(k[n][1],j,m,i)])}return p},set:function(i,n){var m=i.length,p=[],o,q,r,l,k;for(o=0;o<m;o++){q=i[o][1];if(q){l=q.from;k=q.delta;q=(typeof q=="object"&&"red" in q)?"rgb("+q.red+", "+q.green+", "+q.blue+")":q;q=(typeof q=="object"&&q.length)?q[0]:q;if(typeof q=="undefined"){return[]}r=typeof q=="string"?q:"rgb("+[(l.red+Math.round(k.red*n))%256,(l.green+Math.round(k.green*n))%256,(l.blue+Math.round(k.blue*n))%256].join(",")+")";p.push([i[o][0],r])}}return p}},object:{interpolate:function(g,e){e=(typeof e=="number")?e:1;var f={},h;for(h in g){f[h]=parseFloat(g[h])*e}return f},computeDelta:function(j,i,n,h){j=this.interpolate(j);i=this.interpolate(i,n);var k=h?h:j,l={},m;for(m in i){l[m]=i[m]-k[m]}return{from:j,delta:l}},get:function(k,j,m,o){var l=k.length,p=[],n,i;for(n=0;n<l;n++){if(o){i=o[n][1].from}p.push([k[n][0],this.computeDelta(k[n][1],j,m,i)])}return p},set:function(i,o){var n=i.length,r=[],p={},q,m,l,s,t;for(q=0;q<n;q++){s=i[q][1];m=s.from;l=s.delta;for(t in m){p[t]=m[t]+l[t]*o}r.push([i[q][0],p])}return r}},path:{computeDelta:function(h,g,j,f){j=(typeof j=="number")?j:1;var i;h=+h||0;g=+g||0;i=(f!=null)?f:h;return{from:h,delta:(g-i)*j}},forcePath:function(b){if(!Ext.isArray(b)&&!Ext.isArray(b[0])){b=Ext.draw.Draw.parsePathString(b)}return b},get:function(D,x,E,k){var C=this.forcePath(x),v=[],i=D.length,B,y,u,z,t,w,A,F,j;for(u=0;u<i;u++){j=this.forcePath(D[u][1]);z=Ext.draw.Draw.interpolatePaths(j,C);j=z[0];C=z[1];B=j.length;F=[];for(w=0;w<B;w++){z=[j[w][0]];y=j[w].length;for(A=1;A<y;A++){t=k&&k[0][1][w][A].from;z.push(this.computeDelta(j[w][A],C[w][A],E,t))}F.push(z)}v.push([D[u][0],F])}return v},set:function(i,k){var j=i.length,t=[],r,s,u,q,p,v,x,w;for(r=0;r<j;r++){v=i[r][1];q=[];x=v.length;for(s=0;s<x;s++){p=[v[s][0]];w=v[s].length;for(u=1;u<w;u++){p.push(v[s][u].from+v[s][u].delta*k)}q.push(p.join(","))}t.push([i[r][0],q.join(",")])}return t}}}},function(){var e=["outlineColor","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","fill","stroke"],h=e.length,f=0,g;for(;f<h;f++){g=e[f];this[g]=this.color}e=["cursor"];h=e.length;f=0;for(;f<h;f++){g=e[f];this[g]=this.stringHandler}});Ext.define("Ext.fx.Anim",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.fx.Manager","Ext.fx.Animator","Ext.fx.Easing","Ext.fx.CubicBezier","Ext.fx.PropertyHandler"],isAnimation:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",damper:1,bezierRE:/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,reverse:false,running:false,paused:false,iterations:1,alternate:false,currentIteration:0,startTime:0,frameCount:0,constructor:function(e){var d=this,f;e=e||{};if(e.keyframes){return new Ext.fx.Animator(e)}Ext.apply(d,e);if(d.from===undefined){d.from={}}d.propHandlers={};d.config=e;d.target=Ext.fx.Manager.createTarget(d.target);d.easingFn=Ext.fx.Easing[d.easing];d.target.dynamic=d.dynamic;if(!d.easingFn){d.easingFn=String(d.easing).match(d.bezierRE);if(d.easingFn&&d.easingFn.length==5){f=d.easingFn;d.easingFn=Ext.fx.CubicBezier.cubicBezier(+f[1],+f[2],+f[3],+f[4])}}d.id=Ext.id(null,"ext-anim-");d.addEvents("beforeanimate","afteranimate","lastframe");d.mixins.observable.constructor.call(d);Ext.fx.Manager.addAnim(d)},setAttr:function(d,c){return Ext.fx.Manager.items.get(this.id).setAttr(this.target,d,c)},initAttrs:function(){var n=this,l=n.from,k=n.to,m=n.initialFrom||{},p={},r,q,j,o;for(o in k){if(k.hasOwnProperty(o)){r=n.target.getAttr(o,l[o]);q=k[o];if(!Ext.fx.PropertyHandler[o]){if(Ext.isObject(q)){j=n.propHandlers[o]=Ext.fx.PropertyHandler.object}else{j=n.propHandlers[o]=Ext.fx.PropertyHandler.defaultHandler}}else{j=n.propHandlers[o]=Ext.fx.PropertyHandler[o]}p[o]=j.get(r,q,n.damper,m[o],o)}}n.currentAttrs=p},start:function(i){var h=this,j=h.delay,f=h.delayStart,g;if(j){if(!f){h.delayStart=i;return}else{g=i-f;if(g<j){return}else{i=new Date(f.getTime()+j)}}}if(h.fireEvent("beforeanimate",h)!==false){h.startTime=i;if(!h.paused&&!h.currentAttrs){h.initAttrs()}h.running=true;h.frameCount=0}},runAnim:function(l){var o=this,m=o.currentAttrs,s=o.duration,t=o.easingFn,u=o.propHandlers,q={},p,n,r,v;if(l>=s){l=s;v=true}if(o.reverse){l=s-l}for(r in m){if(m.hasOwnProperty(r)){n=m[r];p=v?1:t(l/s);q[r]=u[r].set(n,p)}}o.frameCount++;return q},lastFrame:function(){var f=this,e=f.iterations,d=f.currentIteration;d++;if(d<e){if(f.alternate){f.reverse=!f.reverse}f.startTime=new Date();f.currentIteration=d;f.paused=false}else{f.currentIteration=0;f.end();f.fireEvent("lastframe",f,f.startTime)}},endWasCalled:0,end:function(){if(this.endWasCalled++){return}var b=this;b.startTime=0;b.paused=false;b.running=false;Ext.fx.Manager.removeAnim(b);b.fireEvent("afteranimate",b,b.startTime);Ext.callback(b.callback,b.scope,[b,b.startTime])},isReady:function(){return this.paused===false&&this.running===false&&this.iterations>0},isRunning:function(){return this.paused===false&&this.running===true&&this.isAnimator!==true}});Ext.enableFx=true;Ext.define("Ext.data.Types",{singleton:true,requires:["Ext.data.SortTypes"]},function(){var b=Ext.data.SortTypes;Ext.apply(Ext.data.Types,{stripRe:/[\$,%]/g,AUTO:{sortType:b.none,type:"auto"},STRING:{convert:function(d){var a=this.useNull?null:"";return(d===undefined||d===null)?a:String(d)},sortType:b.asUCString,type:"string"},INT:{convert:function(a){return a!==undefined&&a!==null&&a!==""?parseInt(String(a).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:b.none,type:"int"},FLOAT:{convert:function(a){return a!==undefined&&a!==null&&a!==""?parseFloat(String(a).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:b.none,type:"float"},BOOL:{convert:function(a){if(this.useNull&&(a===undefined||a===null||a==="")){return null}return a===true||a==="true"||a==1},sortType:b.none,type:"bool"},DATE:{convert:function(f){var e=this.dateFormat,a;if(!f){return null}if(Ext.isDate(f)){return f}if(e){if(e=="timestamp"){return new Date(f*1000)}if(e=="time"){return new Date(parseInt(f,10))}return Ext.Date.parse(f,e)}a=Date.parse(f);return a?new Date(a):null},sortType:b.asDate,type:"date"}});Ext.apply(Ext.data.Types,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})});Ext.define("Ext.data.Field",{requires:["Ext.data.Types","Ext.data.SortTypes"],alias:"data.field",constructor:function(e){if(Ext.isString(e)){e={name:e}}Ext.apply(this,e);var g=Ext.data.Types,f=this.sortType,h;if(this.type){if(Ext.isString(this.type)){this.type=g[this.type.toUpperCase()]||g.AUTO}}else{this.type=g.AUTO}if(Ext.isString(f)){this.sortType=Ext.data.SortTypes[f]}else{if(Ext.isEmpty(f)){this.sortType=this.type.sortType}}if(!this.convert){this.convert=this.type.convert}},dateFormat:null,useNull:false,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC",allowBlank:true,persist:true});Ext.define("Ext.data.NodeInterface",{requires:["Ext.data.Field"],statics:{decorate:function(d){var e,f;if(typeof d=="string"){d=Ext.ModelManager.getModel(d)}if(d.prototype.isNode){return}e=d.prototype.idProperty;f=d.prototype.fields.get(e).type.type;d.override(this.getPrototypeBody());this.applyFields(d,[{name:"parentId",type:f,defaultValue:null},{name:"index",type:"int",defaultValue:null,persist:false},{name:"depth",type:"int",defaultValue:0,persist:false},{name:"expanded",type:"bool",defaultValue:false,persist:false},{name:"expandable",type:"bool",defaultValue:true,persist:false},{name:"checked",type:"auto",defaultValue:null,persist:false},{name:"leaf",type:"bool",defaultValue:false},{name:"cls",type:"string",defaultValue:null,persist:false},{name:"iconCls",type:"string",defaultValue:null,persist:false},{name:"icon",type:"string",defaultValue:null,persist:false},{name:"root",type:"boolean",defaultValue:false,persist:false},{name:"isLast",type:"boolean",defaultValue:false,persist:false},{name:"isFirst",type:"boolean",defaultValue:false,persist:false},{name:"allowDrop",type:"boolean",defaultValue:true,persist:false},{name:"allowDrag",type:"boolean",defaultValue:true,persist:false},{name:"loaded",type:"boolean",defaultValue:false,persist:false},{name:"loading",type:"boolean",defaultValue:false,persist:false},{name:"href",type:"string",defaultValue:null,persist:false},{name:"hrefTarget",type:"string",defaultValue:null,persist:false},{name:"qtip",type:"string",defaultValue:null,persist:false},{name:"qtitle",type:"string",defaultValue:null,persist:false},{name:"children",type:"auto",defaultValue:null,persist:false}])},applyFields:function(p,i){var l=p.prototype,j=l.fields,m=j.keys,n=i.length,k,o;for(o=0;o<n;o++){k=i[o];if(!Ext.Array.contains(m,k.name)){j.add(new Ext.data.Field(k))}}},getPrototypeBody:function(){return{isNode:true,constructor:function(){var b=this;this.callParent(arguments);Ext.applyIf(b,{firstChild:null,lastChild:null,parentNode:null,previousSibling:null,nextSibling:null,childNodes:[]});b.enableBubble(["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort"]);return b},createNode:function(b){if(Ext.isObject(b)&&!b.isModel){b=Ext.ModelManager.create(b,this.modelName)}return b},isLeaf:function(){return this.get("leaf")===true},setFirstChild:function(b){this.firstChild=b},setLastChild:function(b){this.lastChild=b},updateInfo:function(s){var n=this,w=n.isRoot(),p=n.parentNode,u=(!p||w?true:p.firstChild===n),q=(!p||w?true:p.lastChild===n),r=0,i=n,x=n.childNodes,o=x.length,t=0,v=n.phantom;while(i.parentNode){++r;i=i.parentNode}n.beginEdit();n.set({isFirst:u,isLast:q,depth:r,index:p?p.indexOf(n):0,parentId:p?p.getId():null});n.endEdit(true);if(s){n.commit();n.phantom=v}for(t=0;t<o;t++){x[t].updateInfo(s)}},isLast:function(){return this.get("isLast")},isFirst:function(){return this.get("isFirst")},hasChildNodes:function(){return !this.isLeaf()&&this.childNodes.length>0},isExpandable:function(){var b=this;if(b.get("expandable")){return !(b.isLeaf()||(b.isLoaded()&&!b.hasChildNodes()))}return false},appendChild:function(q,i,p){var l=this,o,m,n,k,r;if(Ext.isArray(q)){l.callStore("suspendAutoSync");for(o=0,m=q.length-1;o<m;o++){l.appendChild(q[o])}l.callStore("resumeAutoSync");l.appendChild(q[m])}else{q=l.createNode(q);if(i!==true&&(!l.hasListeners.beforeappend||l.fireEvent("beforeappend",l,q)===false)){return false}n=l.childNodes.length;k=q.parentNode;if(k){if(i!==true&&(!l.hasListeners.beforeremove||q.fireEvent("beforemove",q,k,l,n)===false)){return false}k.removeChild(q,false,false,true)}n=l.childNodes.length;if(n===0){l.setFirstChild(q)}l.childNodes.push(q);q.parentNode=l;q.nextSibling=null;l.setLastChild(q);r=l.childNodes[n-1];if(r){q.previousSibling=r;r.nextSibling=q;r.updateInfo(p)}else{q.previousSibling=null}q.updateInfo(p);if(!l.isLoaded()){l.set("loaded",true)}else{if(l.childNodes.length===1){l.afterEdit([])}}if(!q.isLeaf()&&q.phantom){q.set("loaded",true)}if(i!==true){l.fireEvent("append",l,q,n);if(k){q.fireEvent("move",q,k,l,n)}}return q}},getBubbleTarget:function(){return this.parentNode},removeChild:function(k,n,m,i){var l=this,p=l.indexOf(k),o,j;if(p==-1||(m!==true&&(!l.hasListeners.beforeremove||l.fireEvent("beforeremove",l,k,!!i)===false))){return false}Ext.Array.erase(l.childNodes,p,1);if(l.firstChild==k){l.setFirstChild(k.nextSibling)}if(l.lastChild==k){l.setLastChild(k.previousSibling)}if(k.previousSibling){k.previousSibling.nextSibling=k.nextSibling}if(k.nextSibling){k.nextSibling.previousSibling=k.previousSibling}for(o=p>0?p-1:0,j=l.childNodes.length;o<j;o++){l.childNodes[o].updateInfo()}if(!l.childNodes.length){l.set("loaded",l.isLoaded())}if(m!==true){if(l.hasListeners.remove){l.fireEvent("remove",l,k,!!i)}}if(n){k.destroy(true)}else{k.clear()}return k},copy:function(k,l){var i=this,g=i.callOverridden(arguments),h=i.childNodes?i.childNodes.length:0,j;if(l){for(j=0;j<h;j++){g.appendChild(i.childNodes[j].copy(true))}}return g},clear:function(d){var c=this;c.parentNode=c.previousSibling=c.nextSibling=null;if(d){c.firstChild=c.lastChild=null}},destroy:function(g){var k=this,l=k.destroyOptions,h=k.childNodes,j=h.length,i;if(g===true){k.clear(true);for(i=0;i<j;i++){h[i].destroy(true)}k.childNodes=null;delete k.destroyOptions;k.callOverridden([l])}else{k.destroyOptions=g;k.remove(true)}},insertBefore:function(s,o,i){var n=this,p=n.indexOf(o),m=s.parentNode,l=p,r,t,q;if(!o){return n.appendChild(s)}if(s==o){return false}s=n.createNode(s);if(i!==true&&(!n.hasListeners.beforeinsert||n.fireEvent("beforeinsert",n,s,o)===false)){return false}if(m==n&&n.indexOf(s)<p){l--}if(m){if(i!==true&&(!n.hasListeners.beforeremove||s.fireEvent("beforemove",s,m,n,p,o)===false)){return false}m.removeChild(s,false,false,true)}if(l===0){n.setFirstChild(s)}Ext.Array.splice(n.childNodes,l,0,s);s.parentNode=n;s.nextSibling=o;o.previousSibling=s;t=n.childNodes[l-1];if(t){s.previousSibling=t;t.nextSibling=s}else{s.previousSibling=null}for(q=l>0?l-1:0,r=n.childNodes.length;q<r;q++){n.childNodes[q].updateInfo()}if(!n.isLoaded()){n.set("loaded",true)}else{if(n.childNodes.length===1){n.set("loaded",n.isLoaded())}}if(!s.isLeaf()&&s.phantom){s.set("loaded",true)}if(i!==true){if(n.hasListeners.insert){n.fireEvent("insert",n,s,o)}if(m&&n.hasListeners.move){s.fireEvent("move",s,m,n,l,o)}}return s},insertChild:function(e,f){var d=this.childNodes[e];if(d){return this.insertBefore(f,d)}else{return this.appendChild(f)}},remove:function(d,f){var e=this.parentNode;if(e){e.removeChild(this,d,f)}return this},removeAll:function(f,e){var g=this.childNodes,h;while((h=g[0])){this.removeChild(h,f,e)}return this},getChildAt:function(b){return this.childNodes[b]},replaceChild:function(f,g,h){var e=g?g.nextSibling:null;this.removeChild(g,false,h);this.insertBefore(f,e,h);return g},indexOf:function(b){return Ext.Array.indexOf(this.childNodes,b)},indexOfId:function(g){var h=this.childNodes,f=h.length,e=0;for(;e<f;++e){if(h[e].getId()===g){return e}}return -1},getPath:function(g,h){g=g||this.idProperty;h=h||"/";var e=[this.get(g)],f=this.parentNode;while(f){e.unshift(f.get(g));f=f.parentNode}return h+e.join(h)},getDepth:function(){return this.get("depth")},bubble:function(h,e,f){var g=this;while(g){if(h.apply(e||g,f||[g])===false){break}g=g.parentNode}},cascade:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.Node: cascade has been deprecated. Please use cascadeBy instead.")}return this.cascadeBy.apply(this,arguments)},cascadeBy:function(k,l,h){if(k.apply(l||this,h||[this])!==false){var i=this.childNodes,j=i.length,g;for(g=0;g<j;g++){i[g].cascadeBy(k,l,h)}}},eachChild:function(k,l,h){var i=this.childNodes,j=i.length,g;for(g=0;g<j;g++){if(k.apply(l||this,h||[i[g]])===false){break}}},findChild:function(d,f,e){return this.findChildBy(function(){return this.get(d)==f},null,e)},findChildBy:function(l,m,i){var n=this.childNodes,j=n.length,o=0,k,p;for(;o<j;o++){k=n[o];if(l.call(m||k,k)===true){return k}else{if(i){p=k.findChildBy(l,m,i);if(p!==null){return p}}}}return null},contains:function(b){return b.isAncestor(this)},isAncestor:function(d){var c=this.parentNode;while(c){if(c==d){return true}c=c.parentNode}return false},sort:function(k,h,i){var m=this.childNodes,l=m.length,n,j;if(l>0){Ext.Array.sort(m,k);for(n=0;n<l;n++){j=m[n];j.previousSibling=m[n-1];j.nextSibling=m[n+1];if(n===0){this.setFirstChild(j)}if(n==l-1){this.setLastChild(j)}j.updateInfo();if(h&&!j.isLeaf()){j.sort(k,true,true)}}if(i!==true){this.fireEvent("sort",this,m)}}},isExpanded:function(){return this.get("expanded")},isLoaded:function(){return this.get("loaded")},isLoading:function(){return this.get("loading")},isRoot:function(){return !this.parentNode},isVisible:function(){var b=this.parentNode;while(b){if(!b.isExpanded()){return false}b=b.parentNode}return true},expand:function(f,g,e){var h=this;if(!h.isLeaf()){if(h.isLoading()){h.on("expand",function(){h.expand(f,g,e)},h,{single:true})}else{if(!h.isExpanded()){h.fireEvent("beforeexpand",h,function(){h.set("expanded",true);if(h.hasListeners.expand){h.fireEvent("expand",h,h.childNodes,false)}if(f){h.expandChildren(true,g,e)}else{Ext.callback(g,e||h,[h.childNodes])}},h)}else{if(f){h.expandChildren(true,g,e)}else{Ext.callback(g,e||h,[h.childNodes])}}}}else{Ext.callback(g,e||h)}},expandChildren:function(o,k,i){var l=this,n=0,r=l.childNodes,m=r.length,p,q=0;for(;n<m;++n){p=r[n];if(!p.isLeaf()&&!p.isExpanded()){q++;r[n].expand(o,function(){q--;if(k&&!q){Ext.callback(k,i||l,[l.childNodes])}})}}if(!q&&k){Ext.callback(k,i||l,[l.childNodes])}},collapse:function(f,g,e){var h=this;if(!h.isLeaf()){if(!h.collapsing&&h.isExpanded()){h.fireEvent("beforecollapse",h,function(){h.set("expanded",false);if(h.hasListeners.collapse){h.fireEvent("collapse",h,h.childNodes,false)}if(f){h.collapseChildren(true,g,e)}else{Ext.callback(g,e||h,[h.childNodes])}},h)}else{if(f){h.collapseChildren(true,g,e)}}}else{Ext.callback(g,e||h,[h.childNodes])}},collapseChildren:function(o,k,i){var l=this,n=0,q=l.childNodes,m=q.length,p,r=0;for(;n<m;++n){p=q[n];if(!p.isLeaf()&&p.isExpanded()){r++;q[n].collapse(o,function(){r--;if(k&&!r){Ext.callback(k,i||l,[l.childNodes])}})}}if(!r&&k){Ext.callback(k,i||l,[l.childNodes])}}}}}});Ext.define("Ext.data.TreeStore",{extend:"Ext.data.AbstractStore",alias:"store.tree",requires:["Ext.util.Sorter","Ext.data.Tree","Ext.data.NodeInterface"],clearOnLoad:true,clearRemovedOnLoad:true,nodeParam:"node",defaultRootId:"root",defaultRootProperty:"children",folderSort:false,constructor:function(h){var g=this,e,f;h=Ext.apply({},h);f=h.fields||g.fields;if(!f){h.fields=[{name:"text",type:"string"}]}g.callParent([h]);g.tree=new Ext.data.Tree();g.relayEvents(g.tree,["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort","rootchange"]);g.tree.on({scope:g,remove:g.onNodeRemove,beforeexpand:g.onBeforeNodeExpand,beforecollapse:g.onBeforeNodeCollapse,append:g.onNodeAdded,insert:g.onNodeAdded,sort:g.onNodeSort});g.onBeforeSort();e=g.root;if(e){delete g.root;g.setRootNode(e)}if(Ext.isDefined(g.nodeParameter)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.TreeStore: nodeParameter has been deprecated. Please use nodeParam instead.")}g.nodeParam=g.nodeParameter;delete g.nodeParameter}},setProxy:function(f){var e,d;if(f instanceof Ext.data.proxy.Proxy){d=Ext.isEmpty(f.getReader().root)}else{if(Ext.isString(f)){d=true}else{e=f.reader;d=!(e&&!Ext.isEmpty(e.root))}}f=this.callParent(arguments);if(d){e=f.getReader();e.root=this.defaultRootProperty;e.buildExtractors(true)}},onBeforeSort:function(){if(this.folderSort){this.sort({property:"leaf",direction:"ASC"},"prepend",false)}},onBeforeNodeExpand:function(d,f,e){if(d.isLoaded()){Ext.callback(f,e||d,[d.childNodes])}else{if(d.isLoading()){this.on("load",function(){Ext.callback(f,e||d,[d.childNodes])},this,{single:true})}else{this.read({node:d,callback:function(){Ext.callback(f,e||d,[d.childNodes])}})}}},getNewRecords:function(){return Ext.Array.filter(this.tree.flatten(),this.filterNew)},getUpdatedRecords:function(){return Ext.Array.filter(this.tree.flatten(),this.filterUpdated)},onBeforeNodeCollapse:function(d,f,e){f.call(e||d,d.childNodes)},onNodeRemove:function(f,i,g){var j=this,h=j.removed;if(!i.isReplace&&Ext.Array.indexOf(h,i)==-1){h.push(i)}if(j.autoSync&&!j.autoSyncSuspended&&!g){j.sync()}},onNodeAdded:function(n,l){var m=this,h=m.getProxy(),i=h.getReader(),k=l.raw||l[l.persistenceProperty],j;Ext.Array.remove(m.removed,l);if(!l.isLeaf()){j=i.getRoot(k);if(j){m.fillNode(l,i.extractData(j));delete k[i.root]}}if(m.autoSync&&!m.autoSyncSuspended&&(l.phantom||l.dirty)){m.sync()}},onNodeSort:function(){if(this.autoSync&&!this.autoSyncSuspended){this.sync()}},setRootNode:function(e,f){var d=this;e=e||{};if(!e.isModel){Ext.applyIf(e,{id:d.defaultRootId,text:"Root",allowDrag:false});Ext.data.NodeInterface.decorate(d.model);e=Ext.ModelManager.create(e,d.model)}else{if(e.isModel&&!e.isNode){Ext.data.NodeInterface.decorate(d.model)}}d.getProxy().getReader().buildExtractors(true);d.tree.setRootNode(e);if(f!==true&&!e.isLoaded()&&(d.autoLoad===true||e.isExpanded())){d.load({node:e})}return e},getRootNode:function(){return this.tree.getRootNode()},getNodeById:function(b){return this.tree.getNodeById(b)},load:function(e){e=e||{};e.params=e.params||{};var g=this,h=e.node||g.tree.getRootNode(),f;if(!h){h=g.setRootNode({expanded:true},true)}if(g.clearOnLoad){if(g.clearRemovedOnLoad){g.clearRemoved(h)}g.tree.un("remove",g.onNodeRemove,g);h.removeAll(false);g.tree.on("remove",g.onNodeRemove,g)}Ext.applyIf(e,{node:h});e.params[g.nodeParam]=h?h.getId():"root";if(h){h.set("loading",true)}return g.callParent([e])},clearRemoved:function(w){var p=this,t=p.removed,x=w.getId(),u=t.length,v=u,i={},r=[],n={},q,s,o;if(w===p.getRootNode()){p.removed=[];return}for(;v--;){q=t[v];n[q.getId()]=q}for(v=u;v--;){q=t[v];s=q;while(s&&s.getId()!==x){o=s.get("parentId");s=s.parentNode||p.getNodeById(o)||n[o]}if(s){i[q.getId()]=q}}for(v=0;v<u;v++){q=t[v];if(!i[q.getId()]){r.push(q)}}p.removed=r},fillNode:function(u,t){var p=this,r=t?t.length:0,q=p.sorters,s,n,o=false,v=r&&p.sortOnLoad&&!p.remoteSort&&q&&q.items&&q.items.length,i,m;for(s=1;s<r;s++){i=t[s];m=t[s-1];o=i[i.persistenceProperty].index!=m[m.persistenceProperty].index;if(o){break}}if(v){if(o){p.sorters.insert(0,p.indexSorter)}n=new Ext.util.MixedCollection();n.addAll(t);n.sort(p.sorters.items);t=n.items;p.sorters.remove(p.indexSorter)}else{if(o){Ext.Array.sort(t,p.sortByIndex)}}u.set("loaded",true);for(s=0;s<r;s++){u.appendChild(t[s],undefined,true)}return t},sortByIndex:function(c,d){return c[c.persistenceProperty].index-d[d.persistenceProperty].index},onProxyLoad:function(p){var k=this,n=p.wasSuccessful(),q=p.getRecords(),r=p.node,l,i,m,o;k.loading=false;r.set("loading",false);if(n){if(!k.clearOnLoad){q=k.cleanRecords(r,q)}q=k.fillNode(r,q)}k.fireEvent("read",k,p.node,q,n);k.fireEvent("load",k,p.node,q,n);Ext.callback(p.callback,p.scope||k,[q,p,n])},cleanRecords:function(m,i){var n={},k=m.childNodes,o=0,j=k.length,p=[],l;for(;o<j;++o){n[k[o].getId()]=true}for(o=0,j=i.length;o<j;++o){l=i[o];if(!n[l.getId()]){p.push(l)}}return p},removeAll:function(){var b=this.getRootNode();if(b){b.destroy(true)}this.fireEvent("clear",this)},doSort:function(d){var c=this;if(c.remoteSort){c.load()}else{c.tree.sort(d,true);c.fireEvent("datachanged",c);c.fireEvent("refresh",c)}c.fireEvent("sort",c)}},function(){var b=this.prototype;b.indexSorter=new Ext.util.Sorter({sorterFn:b.sortByIndex})});Ext.define("Ext.AbstractManager",{requires:["Ext.util.HashMap"],typeName:"type",constructor:function(b){Ext.apply(this,b||{});this.all=new Ext.util.HashMap();this.types={}},get:function(b){return this.all.get(b)},register:function(f){var d=this.all,e=d.getKey(f);if(d.containsKey(e)){Ext.Error.raise('Registering duplicate id "'+e+'" with this manager')}this.all.add(f)},unregister:function(b){this.all.remove(b)},registerType:function(c,d){this.types[c]=d;d[this.typeName]=c},isRegistered:function(b){return this.types[b]!==undefined},create:function(f,g){var e=f[this.typeName]||f.type||g,h=this.types[e];if(h===undefined){Ext.Error.raise("The '"+e+"' type has not been registered with this manager")}return new h(f)},onAvailable:function(h,j,f){var g=this.all,i;if(g.containsKey(h)){i=g.get(h);j.call(f||i,i)}else{g.on("add",function(a,c,b){if(c==h){j.call(f||b,b);g.un("add",j,f)}})}},each:function(c,d){this.all.each(c,d||this)},getCount:function(){return this.all.getCount()}});Ext.define("Ext.ModelManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ModelMgr",requires:["Ext.data.association.Association"],singleton:true,typeName:"mtype",associationStack:[],registerType:function(h,e){var g=e.prototype,f;if(g&&g.isModel){f=e}else{if(!e.extend){e.extend="Ext.data.Model"}f=Ext.define(h,e)}this.types[h]=f;return f},onModelDefined:function(n){var i=this.associationStack,k=i.length,l=[],h,m,j;for(m=0;m<k;m++){h=i[m];if(h.associatedModel==n.modelName){l.push(h)}}for(m=0,k=l.length;m<k;m++){j=l[m];this.types[j.ownerModel].prototype.associations.add(Ext.data.association.Association.create(j));Ext.Array.remove(i,j)}},registerDeferredAssociation:function(b){this.associationStack.push(b)},getModel:function(c){var d=c;if(typeof d=="string"){d=this.types[d]}return d},create:function(e,f,g){var h=typeof f=="function"?f:this.types[f||e.name];return new h(e,g)}},function(){Ext.regModel=function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn('Ext.regModel has been deprecated. Models can now be created by extending Ext.data.Model: Ext.define("MyModel", {extend: "Ext.data.Model", fields: []});.')}return this.ModelManager.registerType.apply(this.ModelManager,arguments)}});Ext.define("Ext.ComponentManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ComponentMgr",singleton:true,typeName:"xtype",create:function(d,c){if(typeof d=="string"){return Ext.widget(d)}if(d.isComponent){return d}return Ext.widget(d.xtype||c,d)},registerType:function(c,d){this.types[c]=d;d[this.typeName]=c;d.prototype[this.typeName]=c}});Ext.define("Ext.data.Errors",{extend:"Ext.util.MixedCollection",isValid:function(){return this.length===0},getByField:function(h){var i=[],g,j,f;for(f=0;f<this.length;f++){g=this.items[f];if(g.field==h){i.push(g)}}return i}});Ext.define("Ext.data.Model",{alternateClassName:"Ext.data.Record",mixins:{observable:"Ext.util.Observable"},requires:["Ext.ModelManager","Ext.data.IdGenerator","Ext.data.Field","Ext.data.Errors","Ext.data.Operation","Ext.data.validations","Ext.util.MixedCollection"],sortConvertFields:function(f,g){var h=f.type&&f.convert!==f.type.convert,e=g.type&&g.convert!==g.type.convert;if(h&&!e){return 1}if(!h&&e){return -1}return 0},itemNameFn:function(b){return b.name},onClassExtended:function(e,h,f){var g=f.onBeforeCreated;f.onBeforeCreated=function(Y,J){var L=this,G=Ext.getClassName(Y),P=Y.prototype,d=Y.prototype.superclass,X=J.validations||[],I=J.fields||[],b=J.associations||[],c=J.belongsTo,N=J.hasMany,H=J.hasOne,Z=function(m,k){var l=0,n,j;if(m){m=Ext.Array.from(m);for(n=m.length;l<n;++l){j=m[l];if(!Ext.isObject(j)){j={model:j}}j.type=k;b.push(j)}}},F=J.idgen,O=new Ext.util.MixedCollection(false,P.itemNameFn),a=new Ext.util.MixedCollection(false,P.itemNameFn),Q=d.validations,M=d.fields,U=d.associations,W,i,S,R=[],T=J.idProperty||Y.prototype.idProperty,V=Ext.Function.bind(O.sortBy,O,[P.sortConvertFields],false),K=J.proxy||Y.prototype.proxy||Y.prototype.defaultProxyType;Y.modelName=G;P.modelName=G;if(Q){X=Q.concat(X)}J.validations=X;if(M){I=M.items.concat(I)}O.on({add:V,replace:V});for(i=0,S=I.length;i<S;++i){O.add(new Ext.data.Field(I[i]))}if(!O.get(T)){O.add(new Ext.data.Field(T))}J.fields=O;if(F){J.idgen=Ext.data.IdGenerator.get(F)}Z(J.belongsTo,"belongsTo");delete J.belongsTo;Z(J.hasMany,"hasMany");delete J.hasMany;Z(J.hasOne,"hasOne");delete J.hasOne;if(U){b=U.items.concat(b)}for(i=0,S=b.length;i<S;++i){R.push("association."+b[i].type.toLowerCase())}if(K&&!K.isProxy){R.push("proxy."+(typeof K==="string"?K:K.type))}Ext.require(R,function(){Ext.ModelManager.registerType(G,Y);for(i=0,S=b.length;i<S;++i){W=b[i];Ext.apply(W,{ownerModel:G,associatedModel:W.model});if(Ext.ModelManager.getModel(W.model)===undefined){Ext.ModelManager.registerDeferredAssociation(W)}else{a.add(Ext.data.association.Association.create(W))}}J.associations=a;g.call(L,Y,J,f);Y.setProxy(K);Ext.ModelManager.onModelDefined(Y)})}},inheritableStatics:{setProxy:function(b){if(!b.isProxy){if(typeof b=="string"){b={type:b}}b=Ext.createByAlias("proxy."+b.type,b)}b.setModel(this);this.proxy=this.prototype.proxy=b;return b},getProxy:function(){return this.proxy},setFields:function(p,o,i){var k=this,l=k.prototype,m=l.fields,j=p?p.length:0,n=0;if(o){l.idProperty=o}if(i){l.clientIdProperty=i}if(m){m.clear()}else{m=k.prototype.fields=new Ext.util.MixedCollection(false,function(a){return a.name})}for(;n<j;n++){m.add(new Ext.data.Field(p[n]))}if(!m.get(l.idProperty)){m.add(new Ext.data.Field(l.idProperty))}k.fields=m;return m},getFields:function(){return this.fields},load:function(i,l){l=Ext.apply({},l);l=Ext.applyIf(l,{action:"read",id:i});var g=new Ext.data.Operation(l),k=l.scope||this,h=null,j;j=function(a){if(a.wasSuccessful()){h=a.getRecords()[0];Ext.callback(l.success,k,[h,a])}else{Ext.callback(l.failure,k,[h,a])}Ext.callback(l.callback,k,[h,a])};this.proxy.read(g,j,this)}},statics:{PREFIX:"ext-record",AUTO_ID:1,EDIT:"edit",REJECT:"reject",COMMIT:"commit",id:function(d){var c=[this.PREFIX,"-",this.AUTO_ID++].join("");d.phantom=true;d.internalId=c;return c}},idgen:{isGenerator:true,type:"default",generate:function(){return null},getRecId:function(b){return b.modelName+"-"+b.internalId}},editing:false,dirty:false,persistenceProperty:"data",evented:false,isModel:true,phantom:false,idProperty:"id",clientIdProperty:null,defaultProxyType:"ajax",constructor:function(s,w,i,y){s=s||{};var q=this,r,v,p,z,o,u,x,t;q.internalId=(w||w===0)?w:Ext.data.Model.id(q);q.raw=i;if(!q.data){q.data={}}q.modified={};if(q.persistanceProperty){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.Model: persistanceProperty has been deprecated. Use persistenceProperty instead.")}q.persistenceProperty=q.persistanceProperty}q[q.persistenceProperty]=y||{};q.mixins.observable.constructor.call(q);if(!y){r=q.fields.items;v=r.length;t=0;x=q[q.persistenceProperty];if(Ext.isArray(s)){for(;t<v;t++){p=r[t];z=p.name;o=s[t];if(o===undefined){o=p.defaultValue}if(p.convert){o=p.convert(o,q)}x[z]=o}}else{for(;t<v;t++){p=r[t];z=p.name;o=s[z];if(o===undefined){o=p.defaultValue}if(p.convert){o=p.convert(o,q)}x[z]=o}}}q.stores=[];if(q.getId()){q.phantom=false}else{if(q.phantom){u=q.idgen.generate();if(u!==null){q.setId(u)}}}q.dirty=false;q.modified={};if(typeof q.init=="function"){q.init()}q.id=q.idgen.getRecId(q)},get:function(b){return this[this.persistenceProperty][b]},_singleProp:{},set:function(r,G){var z=this,B=z[z.persistenceProperty],A=z.fields,s=z.modified,u=(typeof r=="string"),t,y,C,v,D,H,F,E,x,w;if(u){w=z._singleProp;w[r]=G}else{w=r}for(H in w){if(w.hasOwnProperty(H)){x=w[H];if((y=A&&A.get(H))&&y.convert){x=y.convert(x,z)}t=B[H];if(z.isEqual(t,x)){continue}B[H]=x;(D||(D=[])).push(H);if(y&&y.persist){if(s.hasOwnProperty(H)){if(z.isEqual(s[H],x)){delete s[H];z.dirty=false;for(v in s){if(s.hasOwnProperty(v)){z.dirty=true;break}}}}else{z.dirty=true;s[H]=t}}if(H==z.idProperty){C=true;F=t;E=x}}}if(u){delete w[r]}if(C){z.fireEvent("idchanged",z,F,E)}if(!z.editing&&D){z.afterEdit(D)}return D||null},isEqual:function(a,b){if(Ext.isDate(a)&&Ext.isDate(b)){return Ext.Date.isEqual(a,b)}return a===b},beginEdit:function(){var b=this;if(!b.editing){b.editing=true;b.dirtySave=b.dirty;b.dataSave=Ext.apply({},b[b.persistenceProperty]);b.modifiedSave=Ext.apply({},b.modified)}},cancelEdit:function(){var b=this;if(b.editing){b.editing=false;b.modified=b.modifiedSave;b[b.persistenceProperty]=b.dataSave;b.dirty=b.dirtySave;delete b.modifiedSave;delete b.dataSave;delete b.dirtySave}},endEdit:function(f,h){var e=this,g;if(e.editing){e.editing=false;if(!h){h=e.getModifiedFieldNames()}g=e.dirty||h.length>0;delete e.modifiedSave;delete e.dataSave;delete e.dirtySave;if(g&&f!==true){e.afterEdit(h)}}},getModifiedFieldNames:function(){var i=this,j=i.dataSave,h=i[i.persistenceProperty],g=[],f;for(f in h){if(h.hasOwnProperty(f)){if(!i.isEqual(h[f],j[f])){g.push(f)}}}return g},getChanges:function(){var e=this.modified,d={},f;for(f in e){if(e.hasOwnProperty(f)){d[f]=this.get(f)}}return d},isModified:function(b){return this.modified.hasOwnProperty(b)},setDirty:function(){var l=this,h=l.fields.items,i=h.length,j,f,k;l.dirty=true;for(k=0;k<i;k++){j=h[k];if(j.persist){f=j.name;l.modified[f]=l.get(f)}}},markDirty:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.Model: markDirty has been deprecated. Use setDirty instead.")}return this.setDirty.apply(this,arguments)},reject:function(f){var h=this,e=h.modified,g;for(g in e){if(e.hasOwnProperty(g)){if(typeof e[g]!="function"){h[h.persistenceProperty][g]=e[g]}}}h.dirty=false;h.editing=false;h.modified={};if(f!==true){h.afterReject()}},commit:function(d){var c=this;c.phantom=c.dirty=c.editing=false;c.modified={};if(d!==true){c.afterCommit()}},copy:function(d){var c=this;return new c.self(Ext.apply({},c[c.persistenceProperty]),d)},setProxy:function(b){if(!b.isProxy){if(typeof b==="string"){b={type:b}}b=Ext.createByAlias("proxy."+b.type,b)}b.setModel(this.self);this.proxy=b;return b},getProxy:function(){return this.proxy},validate:function(){var i=new Ext.data.Errors(),p=this.validations,n=Ext.data.validations,q,o,k,r,l,m;if(p){q=p.length;for(m=0;m<q;m++){o=p[m];k=o.field||o.name;l=o.type;r=n[l](o,this.get(k));if(!r){i.add({field:k,message:o.message||n[l+"Message"]})}}}return i},isValid:function(){return this.validate().isValid()},save:function(i){i=Ext.apply({},i);var q=this,u=q.phantom?"create":"update",m=i.scope||q,o=q.stores,t=0,r,p,s,v,n;Ext.apply(i,{records:[q],action:u});v=new Ext.data.Operation(i);n=function(a){s=[q,a];if(a.wasSuccessful()){for(r=o.length;t<r;t++){p=o[t];p.fireEvent("write",p,a);p.fireEvent("datachanged",p)}Ext.callback(i.success,m,s)}else{Ext.callback(i.failure,m,s)}Ext.callback(i.callback,m,s)};q.getProxy()[u](v,n,q);return q},destroy:function(i){i=Ext.apply({},i);var p=this,l=i.scope||p,n=p.stores,s=0,q,o,r,t,m;Ext.apply(i,{records:[p],action:"destroy"});t=new Ext.data.Operation(i);m=function(a){r=[p,a];if(a.wasSuccessful()){for(q=n.length;s<q;s++){o=n[s];o.fireEvent("write",o,a);o.fireEvent("datachanged",o)}p.clearListeners();Ext.callback(i.success,l,r)}else{Ext.callback(i.failure,l,r)}Ext.callback(i.callback,l,r)};p.getProxy().destroy(t,m,p);return p},getId:function(){return this.get(this.idProperty)},getObservableId:function(){return this.id},setId:function(b){this.set(this.idProperty,b);this.phantom=!(b||b===0)},join:function(b){Ext.Array.include(this.stores,b);this.store=this.stores[0]},unjoin:function(b){Ext.Array.remove(this.stores,b);this.store=this.stores[0]||null},afterEdit:function(b){this.callStore("afterEdit",b)},afterReject:function(){this.callStore("afterReject")},afterCommit:function(){this.callStore("afterCommit")},callStore:function(k){var m=Ext.Array.clone(arguments),h=this.stores,l=0,i=h.length,n,j;m[0]=this;for(;l<i;++l){n=h[l];if(n&&typeof n[k]=="function"){n[k].apply(n,m)}j=n.treeStore;if(j&&typeof j[k]=="function"){j[k].apply(j,m)}}},getData:function(n){var m=this,i=m.fields.items,j=i.length,k={},f,l;for(l=0;l<j;l++){f=i[l].name;k[f]=m.get(f)}if(n===true){Ext.apply(k,m.getAssociatedData())}return k},getAssociatedData:function(){return this.prepareAssociatedData({},1)},prepareAssociatedData:function(B,j){var o=this,E=o.associations.items,P=E.length,A={},H=[],C=[],K=[],I,S,T,J,O,L,M,D,N,R,F,G,Q,i;for(F=0;F<P;F++){R=E[F];D=R.associationId;M=B[D];if(M&&M!==j){continue}B[D]=j;Q=R.type;i=R.name;if(Q=="hasMany"){I=o[R.storeName];A[i]=[];if(I&&I.getCount()>0){S=I.data.items;N=S.length;for(G=0;G<N;G++){T=S[G];A[i][G]=T.getData();H.push(T);C.push(i);K.push(G)}}}else{if(Q=="belongsTo"||Q=="hasOne"){T=o[R.instanceName];if(T!==undefined){A[i]=T.getData();H.push(T);C.push(i);K.push(-1)}}}}for(F=0,N=H.length;F<N;++F){T=H[F];J=A[C[F]];O=K[F];L=T.prepareAssociatedData(B,j+1);if(O===-1){Ext.apply(J,L)}else{Ext.apply(J[O],L)}}return A}});Ext.define("Ext.layout.container.Auto",{alias:["layout.auto","layout.autocontainer"],extend:"Ext.layout.container.Container",type:"autocontainer",childEls:["clearEl"],renderTpl:["{%this.renderBody(out,values)%}",'<div id="{ownerId}-clearEl" class="',Ext.baseCSSPrefix,'clear" role="presentation"></div>'],calculate:function(d){var e=this,f;if(!d.hasDomProp("containerChildrenDone")){e.done=false}else{f=e.getContainerSize(d);if(!f.gotAll){e.done=false}e.calculateContentSize(d)}}});Ext.define("Ext.menu.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.util.KeyMap"],alternateClassName:"Ext.menu.MenuMgr",uses:["Ext.menu.Menu"],menus:{},groups:{},attached:false,lastShow:new Date(),init:function(){var b=this;b.active=new Ext.util.MixedCollection();Ext.getDoc().addKeyListener(27,function(){if(b.active.length>0){b.hideAll()}},b)},hideAll:function(){var j=this.active,h,f,g,i;if(j&&j.length>0){h=j.clone();f=h.items;i=f.length;for(g=0;g<i;g++){f[g].hide()}return true}return false},onHide:function(e){var d=this,f=d.active;f.remove(e);if(f.length<1){Ext.getDoc().un("mousedown",d.onMouseDown,d);d.attached=false}},onShow:function(i){var l=this,k=l.active,m=k.last(),n=l.attached,h=i.getEl(),j;l.lastShow=new Date();k.add(i);if(!n){Ext.getDoc().on("mousedown",l.onMouseDown,l,{buffer:Ext.isIE?10:undefined});l.attached=true}i.toFront()},onBeforeHide:function(b){if(b.activeChild){b.activeChild.hide()}if(b.autoHideTimer){clearTimeout(b.autoHideTimer);delete b.autoHideTimer}},onBeforeShow:function(e){var f=this.active,d=e.parentMenu;f.remove(e);if(!d&&!e.allowOtherMenus){this.hideAll()}else{if(d&&d.activeChild&&e!=d.activeChild){d.activeChild.hide()}}},onMouseDown:function(g){var e=this,h=e.active,f=e.lastShow;if(Ext.Date.getElapsed(f)>50&&h.length>0&&!g.getTarget("."+Ext.baseCSSPrefix+"menu")){e.hideAll()}},register:function(c){var d=this;if(!d.active){d.init()}if(c.floating){d.menus[c.id]=c;c.on({beforehide:d.onBeforeHide,hide:d.onHide,beforeshow:d.onBeforeShow,show:d.onShow,scope:d})}},get:function(c){var d=this.menus;if(typeof c=="string"){if(!d){return null}return d[c]}else{if(c.isMenu){return c}else{if(Ext.isArray(c)){return new Ext.menu.Menu({items:c})}else{return Ext.ComponentManager.create(c,"menu")}}}},unregister:function(g){var f=this,e=f.menus,h=f.active;delete e[g.id];h.remove(g);g.un({beforehide:f.onBeforeHide,hide:f.onHide,beforeshow:f.onBeforeShow,show:f.onShow,scope:f})},registerCheckable:function(f){var e=this.groups,d=f.group;if(d){if(!e[d]){e[d]=[]}e[d].push(f)}},unregisterCheckable:function(f){var e=this.groups,d=f.group;if(d){Ext.Array.remove(e[d],f)}},onCheckChange:function(o,m){var j=this.groups,p=o.group,i=0,k,n,l;if(p&&m){k=j[p];n=k.length;for(;i<n;i++){l=k[i];if(l!=o){l.setChecked(false)}}}}});Ext.define("Ext.layout.component.Button",{alias:["layout.button"],extend:"Ext.layout.component.Auto",type:"button",cellClsRE:/-btn-(tl|br)\b/,htmlRE:/<.*>/,constructor:function(){this.callParent(arguments);this.hackWidth=Ext.isIE&&(!Ext.isStrict||Ext.isIE6||Ext.isIE7);this.heightIncludesPadding=Ext.isIE6&&Ext.isStrict},beginLayout:function(b){this.callParent(arguments);this.cacheTargetInfo(b)},beginLayoutCycle:function(n){var p=this,o="",j=p.owner,i=j.btnEl,k=j.btnInnerEl,m=j.text,l;p.callParent(arguments);k.setStyle("overflow",o);if(!n.widthModel.natural){j.el.setStyle("width",o)}l=n.heightModel.shrinkWrap&&m&&p.htmlRE.test(m);i.setStyle("width",o);i.setStyle("height",l?"auto":o);k.setStyle("width",o);k.setStyle("height",l?"auto":o);k.setStyle("line-height",l?"normal":o);k.setStyle("padding-top",o);j.btnIconEl.setStyle("width",o)},calculateOwnerHeightFromContentHeight:function(c,d){return d},calculateOwnerWidthFromContentWidth:function(c,d){return d},measureContentWidth:function(v){var q=this,w=q.owner,s=w.btnEl,u=w.btnInnerEl,n=w.text,m,p,r,x,o,t;if(w.text&&q.hackWidth&&s){m=q.btnFrameWidth;if(n.indexOf(">")===-1){n=n.replace(/</g,"<")}p=Ext.util.TextMetrics.measure(u,n);x=p.width+m+q.adjWidth;o=v.getEl("btnEl");t=v.getEl("btnInnerEl");r=(w.icon||w.iconCls)&&(w.iconAlign=="top"||w.iconAlign=="bottom");v.setWidth(x);o.setWidth(p.width+m);t.setWidth(p.width+m);if(r){w.btnIconEl.setWidth(p.width+m)}}else{x=v.el.getWidth()}return x},measureContentHeight:function(u){var p=this,w=p.owner,t=w.btnInnerEl,q=u.getEl("btnEl"),s=u.getEl("btnInnerEl"),v=p.minTextHeight,r=p.adjHeight,m=w.getText(),n,o,x;if(w.vertical){n=Ext.util.TextMetrics.measure(t,w.text).width;n+=p.btnFrameHeight+r;u.setHeight(n,true,true)}else{if(m&&p.htmlRE.test(m)){o=t.getHeight();if(o<v){x=Math.floor((v-o)/2);s.setHeight(v-(p.heightIncludesPadding?x:0));s.setProp("padding-top",x);o=v}n=o+r}else{n=u.el.getHeight()}}q.setHeight(n-r);return n},publishInnerHeight:function(x,o){var r=this,z=r.owner,u=Ext.isNumber,s=x.getEl("btnEl"),w=z.btnInnerEl,t=x.getEl("btnInnerEl"),v=u(o)?o-r.adjHeight:o,y=r.btnFrameHeight,p=z.getText(),q,n;s.setHeight(v);t.setHeight(v);if(!z.vertical&&v>=0){t.setProp("line-height",v-y+"px")}if(p&&r.htmlRE.test(p)){t.setProp("line-height","normal");w.setStyle("line-height","normal");q=Ext.util.TextMetrics.measure(w,p).height;n=Math.floor(Math.max(v-y-q,0)/2);t.setProp("padding-top",r.btnFrameTop+n);t.setHeight(v-(r.heightIncludesPadding?n:0))}},publishInnerWidth:function(k,n){var l=this,j=Ext.isNumber,i=k.getEl("btnEl"),h=k.getEl("btnInnerEl"),m=j(n)?n-l.adjWidth:n;i.setWidth(m);h.setWidth(m)},clearTargetCache:function(){delete this.adjWidth},cacheTargetInfo:function(q){var m=this,r=m.owner,o=r.scale,k,n,j,p,l;if(!("adjWidth" in m)||m.lastScale!==o){if(m.lastScale){r.btnInnerEl.setStyle("line-height","")}m.lastScale=o;k=q.getPaddingInfo();n=q.getFrameInfo();j=q.getEl("btnWrap").getPaddingInfo();p=q.getEl("btnInnerEl");l=p.getPaddingInfo();Ext.apply(m,{adjWidth:j.width+n.width+k.width,adjHeight:j.height+n.height+k.height,btnFrameWidth:l.width,btnFrameHeight:l.height,btnFrameTop:l.top,minTextHeight:parseInt(p.getStyle("line-height"),10)})}m.callParent(arguments)}});Ext.define("Ext.layout.component.Tab",{extend:"Ext.layout.component.Button",alias:"layout.tab",beginLayout:function(f){var d=this,e=d.owner.closable;if(d.lastClosable!==e){d.lastClosable=e;d.clearTargetCache()}d.callParent(arguments)}});Ext.define("Ext.util.Region",{requires:["Ext.util.Offset"],statics:{getRegion:function(b){return Ext.fly(b).getPageBox(true)},from:function(b){return new this(b.top,b.right,b.bottom,b.left)}},constructor:function(i,g,b,j){var h=this;h.y=h.top=h[1]=i;h.right=g;h.bottom=b;h.x=h.left=h[0]=j},contains:function(c){var d=this;return(c.x>=d.x&&c.right<=d.right&&c.y>=d.y&&c.bottom<=d.bottom)},intersect:function(h){var i=this,k=Math.max(i.y,h.y),j=Math.min(i.right,h.right),b=Math.min(i.bottom,h.bottom),l=Math.max(i.x,h.x);if(b>k&&j>l){return new this.self(k,j,b,l)}else{return false}},union:function(h){var i=this,k=Math.min(i.y,h.y),j=Math.max(i.right,h.right),b=Math.max(i.bottom,h.bottom),l=Math.min(i.x,h.x);return new this.self(k,j,b,l)},constrainTo:function(d){var e=this,f=Ext.Number.constrain;e.top=e.y=f(e.top,d.y,d.bottom);e.bottom=f(e.bottom,d.y,d.bottom);e.left=e.x=f(e.left,d.x,d.right);e.right=f(e.right,d.x,d.right);return e},adjust:function(i,g,b,j){var h=this;h.top=h.y+=i;h.left=h.x+=j;h.right+=g;h.bottom+=b;return h},getOutOfBoundOffset:function(e,d){if(!Ext.isObject(e)){if(e=="x"){return this.getOutOfBoundOffsetX(d)}else{return this.getOutOfBoundOffsetY(d)}}else{d=e;var f=new Ext.util.Offset();f.x=this.getOutOfBoundOffsetX(d.x);f.y=this.getOutOfBoundOffsetY(d.y);return f}},getOutOfBoundOffsetX:function(b){if(b<=this.x){return this.x-b}else{if(b>=this.right){return this.right-b}}return 0},getOutOfBoundOffsetY:function(b){if(b<=this.y){return this.y-b}else{if(b>=this.bottom){return this.bottom-b}}return 0},isOutOfBound:function(d,c){if(!Ext.isObject(d)){if(d=="x"){return this.isOutOfBoundX(c)}else{return this.isOutOfBoundY(c)}}else{c=d;return(this.isOutOfBoundX(c.x)||this.isOutOfBoundY(c.y))}},isOutOfBoundX:function(b){return(b<this.x||b>this.right)},isOutOfBoundY:function(b){return(b<this.y||b>this.bottom)},restrict:function(e,g,f){if(Ext.isObject(e)){var h;f=g;g=e;if(g.copy){h=g.copy()}else{h={x:g.x,y:g.y}}h.x=this.restrictX(g.x,f);h.y=this.restrictY(g.y,f);return h}else{if(e=="x"){return this.restrictX(g,f)}else{return this.restrictY(g,f)}}},restrictX:function(c,d){if(!d){d=1}if(c<=this.x){c-=(c-this.x)*d}else{if(c>=this.right){c-=(c-this.right)*d}}return c},restrictY:function(c,d){if(!d){d=1}if(c<=this.y){c-=(c-this.y)*d}else{if(c>=this.bottom){c-=(c-this.bottom)*d}}return c},getSize:function(){return{width:this.right-this.x,height:this.bottom-this.y}},copy:function(){return new this.self(this.y,this.right,this.bottom,this.x)},copyFrom:function(c){var d=this;d.top=d.y=d[1]=c.y;d.right=c.right;d.bottom=c.bottom;d.left=d.x=d[0]=c.x;return this},toString:function(){return"Region["+this.top+","+this.right+","+this.bottom+","+this.left+"]"},translateBy:function(e,f){if(arguments.length==1){f=e.y;e=e.x}var d=this;d.top=d.y+=f;d.right+=e;d.bottom+=f;d.left=d.x+=e;return d},round:function(){var b=this;b.top=b.y=Math.round(b.y);b.right=Math.round(b.right);b.bottom=Math.round(b.bottom);b.left=b.x=Math.round(b.x);return b},equals:function(b){return(this.top==b.top&&this.right==b.right&&this.bottom==b.bottom&&this.left==b.left)}});Ext.define("Ext.grid.plugin.HeaderResizer",{extend:"Ext.util.Observable",requires:["Ext.dd.DragTracker","Ext.util.Region"],alias:"plugin.gridheaderresizer",disabled:false,config:{dynamic:false},colHeaderCls:Ext.baseCSSPrefix+"column-header",minColWidth:40,maxColWidth:1000,wResizeCursor:"col-resize",eResizeCursor:"col-resize",init:function(b){this.headerCt=b;b.on("render",this.afterHeaderRender,this,{single:true})},destroy:function(){if(this.tracker){this.tracker.destroy()}},afterHeaderRender:function(){var c=this.headerCt,d=c.el;c.mon(d,"mousemove",this.onHeaderCtMouseMove,this);this.tracker=new Ext.dd.DragTracker({disabled:this.disabled,onBeforeStart:Ext.Function.bind(this.onBeforeStart,this),onStart:Ext.Function.bind(this.onStart,this),onDrag:Ext.Function.bind(this.onDrag,this),onEnd:Ext.Function.bind(this.onEnd,this),tolerance:3,autoStart:300,el:d})},onHeaderCtMouseMove:function(q,e){var o=this,r,l,k,n,p,m;if(o.headerCt.dragging){if(o.activeHd){o.activeHd.el.dom.style.cursor="";delete o.activeHd}}else{l=q.getTarget("."+o.colHeaderCls,3,true);if(l){k=Ext.getCmp(l.id);if(k.isOnLeftEdge(q)){n=k.previousNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(n){m=o.headerCt.up("tablepanel");p=n.up("tablepanel");if(!((p===m)||((m.ownerCt.isXType("tablepanel"))&&m.ownerCt.view.lockedGrid===p))){n=null}}}else{if(k.isOnRightEdge(q)){n=k}else{n=null}}if(n){if(n.isGroupHeader){r=n.getGridColumns();n=r[r.length-1]}if(n&&!(n.fixed||(n.resizable===false)||o.disabled)){o.activeHd=n;k.el.dom.style.cursor=o.eResizeCursor}}else{k.el.dom.style.cursor="";delete o.activeHd}}}},onBeforeStart:function(c){var d=c.getTarget();this.dragHd=this.activeHd;if(!!this.dragHd&&!Ext.fly(d).hasCls(Ext.baseCSSPrefix+"column-header-trigger")&&!this.headerCt.dragging){this.tracker.constrainTo=this.getConstrainRegion();return true}else{this.headerCt.dragging=false;return false}},getConstrainRegion:function(){var h=this,f=h.dragHd.el,g=Ext.util.Region.getRegion(f),e;if(h.headerCt.forceFit){e=h.dragHd.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])")}return g.adjust(0,h.headerCt.forceFit?(e?e.getWidth()-h.minColWidth:0):h.maxColWidth-f.getWidth(),0,h.minColWidth)},onStart:function(t){var e=this,G=e.dragHd,K=G.el,z=K.getWidth(),E=e.headerCt,C=t.getTarget(),I,w,H,D,J,A,L,F,v,x,y,B;if(e.dragHd&&!Ext.fly(C).hasCls(Ext.baseCSSPrefix+"column-header-trigger")){E.dragging=true}e.origWidth=z;if(!e.dynamic){I=K.getXY();w=E.up("[scrollerOwner]");H=e.dragHd.up(":not([isGroupHeader])");D=H.up();J=w.getLhsMarker();A=w.getRhsMarker();L=A.parent();F=L.getLeft(true);v=L.getTop(true);x=L.translatePoints(I);y=D.body.getHeight()+E.getHeight();B=x.top-v;J.setTop(B);A.setTop(B);J.setHeight(y);A.setHeight(y);J.setLeft(x.left-F);A.setLeft(x.left+z-F)}},onDrag:function(k){if(!this.dynamic){var l=this.tracker.getXY("point"),i=this.headerCt.up("[scrollerOwner]"),j=i.getRhsMarker(),n=j.parent(),e=n.translatePoints(l),m=n.getLeft(true);j.setLeft(e.left-m)}else{this.doResize()}},onEnd:function(j){this.headerCt.dragging=false;if(this.dragHd){if(!this.dynamic){var k=this.dragHd,e=this.headerCt.up("[scrollerOwner]"),l=e.getLhsMarker(),i=e.getRhsMarker(),h=-9999;l.setLeft(h);i.setLeft(h)}this.doResize()}},doResize:function(){if(this.dragHd){var d=this.dragHd,e,f=this.tracker.getOffset("point");if(d.flex){delete d.flex}Ext.suspendLayouts();d.setWidth(this.origWidth+f[0]);if(this.headerCt.forceFit){e=d.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(e){delete e.flex;e.setWidth(e.getWidth()-f[0])}}Ext.resumeLayouts(true)}},disable:function(){this.disabled=true;if(this.tracker){this.tracker.disable()}},enable:function(){this.disabled=false;if(this.tracker){this.tracker.enable()}}});Ext.define("Ext.dd.DragDropManager",{singleton:true,requires:["Ext.util.Region"],uses:["Ext.tip.QuickTipManager"],alternateClassName:["Ext.dd.DragDropMgr","Ext.dd.DDM"],ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,notifyOccluded:false,_execOnAll:function(j,f){var i,g,h;for(i in this.ids){for(g in this.ids[i]){h=this.ids[i][g];if(!this.isTypeOfDD(h)){continue}h[j].apply(h,f)}}},_onLoad:function(){this.init();var b=Ext.EventManager;b.on(document,"mouseup",this.handleMouseUp,this,true);b.on(document,"mousemove",this.handleMouseMove,this,true);b.on(window,"unload",this._onUnload,this,true);b.on(window,"resize",this._onResize,this,true)},_onResize:function(b){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(c,d){if(!this.initialized){this.init()}if(!this.ids[d]){this.ids[d]={}}this.ids[d][c.id]=c},removeDDFromGroup:function(f,e){if(!this.ids[e]){this.ids[e]={}}var d=this.ids[e];if(d&&d[f.id]){delete d[f.id]}},_remove:function(c){for(var d in c.groups){if(d&&this.ids[d]&&this.ids[d][c.id]){delete this.ids[d][c.id]}}delete this.handleIds[c.id]},regHandle:function(c,d){if(!this.handleIds[c]){this.handleIds[c]={}}this.handleIds[c][d]=d},isDragDrop:function(b){return(this.getDDById(b))?true:false},getRelated:function(i,g){var j=[],k,l,h;for(k in i.groups){for(l in this.ids[k]){h=this.ids[k][l];if(!this.isTypeOfDD(h)){continue}if(!g||h.isTarget){j[j.length]=h}}}return j},isLegalTarget:function(h,i){var f=this.getRelated(h,true),j,g;for(j=0,g=f.length;j<g;++j){if(f[j].id==i.id){return true}}return false},isTypeOfDD:function(b){return(b&&b.__ygDragDrop)},isHandle:function(c,d){return(this.handleIds[c]&&this.handleIds[c][d])},getDDById:function(g){var h=this,e,f;for(e in this.ids){f=this.ids[e][g];if(f instanceof Ext.dd.DDTarget){return f}}return null},handleMouseDown:function(f,d){if(Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddDisable()}if(this.dragCurrent){this.handleMouseUp(f)}this.currentTarget=f.getTarget();this.dragCurrent=d;var e=d.getEl();this.startX=f.getPageX();this.startY=f.getPageY();this.deltaX=this.startX-e.offsetLeft;this.deltaY=this.startY-e.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var a=Ext.dd.DragDropManager;a.startDrag(a.startX,a.startY)},this.clickTimeThresh)},startDrag:function(d,c){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(d,c);this.dragCurrent.startDrag(d,c)}this.dragThreshMet=true},handleMouseUp:function(b){if(Ext.tip&&Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddEnable()}if(!this.dragCurrent){return}clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(b,true)}this.stopDrag(b);this.stopEvent(b)},stopEvent:function(b){if(this.stopPropagation){b.stopPropagation()}if(this.preventDefault){b.preventDefault()}},stopDrag:function(b){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(b);this.dragCurrent.endDrag(b)}this.dragCurrent.onMouseUp(b)}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(f){if(!this.dragCurrent){return true}if(Ext.isIE&&(f.button!==0&&f.button!==1&&f.button!==2)){this.stopEvent(f);return this.handleMouseUp(f)}var d,e;if(!this.dragThreshMet){d=Math.abs(this.startX-f.getPageX());e=Math.abs(this.startY-f.getPageY());if(d>this.clickPixelThresh||e>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(f);this.dragCurrent.onDrag(f);if(!this.dragCurrent.moveOnly){this.fireEvents(f,false)}}this.stopEvent(f);return true},fireEvents:function(w,t){var u=this,z=u.dragCurrent,i=w.getPoint(),F,H,D=[],G=[],C=[],y=[],A=[],E=[],v,B,x,e;if(!z||z.isLocked()){return}for(B in u.dragOvers){F=u.dragOvers[B];if(!u.isTypeOfDD(F)){continue}if(!this.isOverTarget(i,F,u.mode)){C.push(F)}G[B]=true;delete u.dragOvers[B]}for(e in z.groups){if("string"!=typeof e){continue}for(B in u.ids[e]){F=u.ids[e][B];if(u.isTypeOfDD(F)&&(H=F.getEl())&&(F.isTarget)&&(!F.isLocked())&&(Ext.fly(H).isVisible(true))&&((F!=z)||(z.ignoreSelf===false))){if((F.zIndex=u.getZIndex(H))!==-1){v=true}D.push(F)}}}if(v){Ext.Array.sort(D,u.byZIndex)}for(B=0,x=D.length;B<x;B++){F=D[B];if(u.isOverTarget(i,F,u.mode)){if(t){A.push(F)}else{if(!G[F.id]){E.push(F)}else{y.push(F)}u.dragOvers[F.id]=F}if(!u.notifyOccluded){break}}}if(u.mode){if(C.length){z.b4DragOut(w,C);z.onDragOut(w,C)}if(E.length){z.onDragEnter(w,E)}if(y.length){z.b4DragOver(w,y);z.onDragOver(w,y)}if(A.length){z.b4DragDrop(w,A);z.onDragDrop(w,A)}}else{for(B=0,x=C.length;B<x;++B){z.b4DragOut(w,C[B].id);z.onDragOut(w,C[B].id)}for(B=0,x=E.length;B<x;++B){z.onDragEnter(w,E[B].id)}for(B=0,x=y.length;B<x;++B){z.b4DragOver(w,y[B].id);z.onDragOver(w,y[B].id)}for(B=0,x=A.length;B<x;++B){z.b4DragDrop(w,A[B].id);z.onDragDrop(w,A[B].id)}}if(t&&!A.length){z.onInvalidDrop(w)}},getZIndex:function(e){var f=document.body,h,g=-1;e=Ext.getDom(e);while(e!==f){if(!isNaN(h=Number(Ext.fly(e).getStyle("zIndex")))){g=h}e=e.parentNode}return g},byZIndex:function(c,d){return c.zIndex<d.zIndex},getBestMatch:function(j){var h=null,f=j.length,i,g;if(f==1){h=j[0]}else{for(i=0;i<f;++i){g=j[i];if(g.cursorIsOver){h=g;break}else{if(!h||h.overlap.getArea()<g.overlap.getArea()){h=g}}}}return h},refreshCache:function(f){var g,j,i,h;for(g in f){if("string"!=typeof g){continue}for(j in this.ids[g]){i=this.ids[g][j];if(this.isTypeOfDD(i)){h=this.getLocation(i);if(h){this.locationCache[i.id]=h}else{delete this.locationCache[i.id]}}}}},verifyEl:function(d){if(d){var e;if(Ext.isIE){try{e=d.offsetParent}catch(f){}}else{e=d.offsetParent}if(e){return true}}return false},getLocation:function(s){if(!this.isTypeOfDD(s)){return null}if(s.getRegion){return s.getRegion()}var u=s.getEl(),p,v,w,e,l,b,x,q,t;try{p=Ext.Element.getXY(u)}catch(r){}if(!p){return null}v=p[0];w=v+u.offsetWidth;e=p[1];l=e+u.offsetHeight;b=e-s.padding[0];x=w+s.padding[1];q=l+s.padding[2];t=v-s.padding[3];return new Ext.util.Region(b,x,q,t)},isOverTarget:function(j,r,p){var n=this.locationCache[r.id],k,m,q,o,l;if(!n||!this.useCache){n=this.getLocation(r);this.locationCache[r.id]=n}if(!n){return false}r.cursorIsOver=n.contains(j);k=this.dragCurrent;if(!k||!k.getTargetCoord||(!p&&!k.constrainX&&!k.constrainY)){return r.cursorIsOver}r.overlap=null;m=k.getTargetCoord(j.x,j.y);q=k.getDragEl();o=new Ext.util.Region(m.y,m.x+q.offsetWidth,m.y+q.offsetHeight,m.x);l=o.intersect(n);if(l){r.overlap=l;return(p)?true:r.cursorIsOver}else{return false}},_onUnload:function(c,d){Ext.dd.DragDropManager.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);for(var b in this.elementCache){delete this.elementCache[b]}this.elementCache={};this.ids={}},elementCache:{},getElWrapper:function(c){var d=this.elementCache[c];if(!d||!d.el){d=this.elementCache[c]=new this.ElementWrapper(Ext.getDom(c))}return d},getElement:function(b){return Ext.getDom(b)},getCss:function(c){var d=Ext.getDom(c);return(d)?d.style:null},ElementWrapper:function(b){this.el=b||null;this.id=this.el&&b.id;this.css=this.el&&b.style},getPosX:function(b){return Ext.Element.getX(b)},getPosY:function(b){return Ext.Element.getY(b)},swapNode:function(h,f){if(h.swapNode){h.swapNode(f)}else{var g=f.parentNode,e=f.nextSibling;if(e==h){g.insertBefore(h,f)}else{if(f==h.nextSibling){g.insertBefore(f,h)}else{h.parentNode.replaceChild(f,h);g.insertBefore(h,e)}}}},getScroll:function(){var i=window.document,h=i.documentElement,g=i.body,j=0,f=0;if(Ext.isGecko4){j=window.scrollYOffset;f=window.scrollXOffset}else{if(h&&(h.scrollTop||h.scrollLeft)){j=h.scrollTop;f=h.scrollLeft}else{if(g){j=g.scrollTop;f=g.scrollLeft}}}return{top:j,left:f}},getStyle:function(c,d){return Ext.fly(c).getStyle(d)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(e,f){var d=Ext.Element.getXY(f);Ext.Element.setXY(e,d)},numericSort:function(a,b){return(a-b)},_timeoutCount:0,_addListeners:function(){if(document){this._onLoad()}else{if(this._timeoutCount<=2000){setTimeout(this._addListeners,10);if(document&&document.body){this._timeoutCount+=1}}}},handleWasClicked:function(e,f){if(this.isHandle(f,e.id)){return true}else{var d=e.parentNode;while(d){if(this.isHandle(f,d.id)){return true}else{d=d.parentNode}}}return false}},function(){this._addListeners()});Ext.define("Ext.state.Manager",{singleton:true,requires:["Ext.state.Provider"],constructor:function(){this.provider=new Ext.state.Provider()},setProvider:function(b){this.provider=b},get:function(c,d){return this.provider.get(c,d)},set:function(d,c){this.provider.set(d,c)},clear:function(b){this.provider.clear(b)},getProvider:function(){return this.provider}});Ext.define("Ext.state.Stateful",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.state.Manager"],stateful:false,saveDelay:100,constructor:function(d){var c=this;d=d||{};if(d.stateful!==undefined){c.stateful=d.stateful}if(d.saveDelay!==undefined){c.saveDelay=d.saveDelay}c.stateId=c.stateId||d.stateId;if(!c.stateEvents){c.stateEvents=[]}if(d.stateEvents){c.stateEvents.concat(d.stateEvents)}this.addEvents("beforestaterestore","staterestore","beforestatesave","statesave");c.mixins.observable.constructor.call(c);if(c.stateful!==false){c.addStateEvents(c.stateEvents);c.initState()}},addStateEvents:function(j){var h=this,f,i,g;if(h.stateful&&h.getStateId()){if(typeof j=="string"){j=Array.prototype.slice.call(arguments,0)}g=h.stateEventsByName||(h.stateEventsByName={});for(f=j.length;f--;){i=j[f];if(!g[i]){g[i]=1;h.on(i,h.onStateChange,h)}}}},onStateChange:function(){var h=this,f=h.saveDelay,g,e;if(!h.stateful){return}if(f){if(!h.stateTask){g=Ext.state.Stateful;e=g.runner||(g.runner=new Ext.util.TaskRunner());h.stateTask=e.newTask({run:h.saveState,scope:h,interval:f,repeat:1})}h.stateTask.start()}else{h.saveState()}},saveState:function(){var e=this,g=e.stateful&&e.getStateId(),f=e.hasListeners,h;if(g){h=e.getState()||{};if(!f.beforestatesave||e.fireEvent("beforestatesave",e,h)!==false){Ext.state.Manager.set(g,h);if(f.statesave){e.fireEvent("statesave",e,h)}}}},getState:function(){return null},applyState:function(b){if(b){Ext.apply(this,b)}},getStateId:function(){var b=this;return b.stateId||(b.autoGenId?null:b.id)},initState:function(){var e=this,g=e.stateful&&e.getStateId(),f=e.hasListeners,h;if(g){h=Ext.state.Manager.get(g);if(h){h=Ext.apply({},h);if(!f.beforestaterestore||e.fireEvent("beforestaterestore",e,h)!==false){e.applyState(h);if(f.staterestore){e.fireEvent("staterestore",e,h)}}}}},savePropToState:function(i,j,k){var g=this,l=g[i],h=g.initialConfig;if(g.hasOwnProperty(i)){if(!h||h[i]!==l){if(j){j[k||i]=l}return true}}return false},savePropsToState:function(h,j){var f=this,g,i;if(typeof h=="string"){f.savePropToState(h,j)}else{for(g=0,i=h.length;g<i;++g){f.savePropToState(h[g],j)}}return j},destroy:function(){var c=this,d=c.stateTask;if(d){d.destroy();c.stateTask=null}c.clearListeners()}});Ext.define("Ext.AbstractComponent",{requires:["Ext.ComponentQuery","Ext.ComponentManager","Ext.util.ProtoElement"],mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate",elementCt:"Ext.util.ElementContainer",renderable:"Ext.util.Renderable",state:"Ext.state.Stateful"},uses:["Ext.PluginManager","Ext.Element","Ext.DomHelper","Ext.XTemplate","Ext.ComponentQuery","Ext.ComponentLoader","Ext.EventManager","Ext.layout.Context","Ext.layout.Layout","Ext.layout.component.Auto","Ext.LoadMask","Ext.ZIndexManager"],statics:{AUTO_ID:1000,pendingLayouts:null,layoutSuspendCount:0,cancelLayout:function(d){var c=this.runningLayoutContext||this.pendingLayouts;if(c){c.cancelComponent(d)}},flushLayouts:function(){var c=this,d=c.pendingLayouts;if(d&&d.invalidQueue.length){c.pendingLayouts=null;c.runningLayoutContext=d;Ext.override(d,{runComplete:function(){c.runningLayoutContext=null;return this.callParent()}});d.run()}},resumeLayouts:function(b){if(this.layoutSuspendCount&&!--this.layoutSuspendCount){if(b){this.flushLayouts()}}},suspendLayouts:function(){++this.layoutSuspendCount},updateLayout:function(f,h){var j=this,g=j.runningLayoutContext,i;if(g){g.queueInvalidate(f)}else{i=j.pendingLayouts||(j.pendingLayouts=new Ext.layout.Context());i.queueInvalidate(f);if(!h&&!j.layoutSuspendCount&&!f.isLayoutSuspended()){j.flushLayouts()}}}},isComponent:true,getAutoId:function(){this.autoGenId=true;return ++Ext.AbstractComponent.AUTO_ID},deferLayouts:false,autoGenId:false,renderTpl:"{%this.renderContent(out,values)%}",frameSize:{left:0,top:0,right:0,bottom:0,width:0,height:0},tplWriteMode:"overwrite",baseCls:Ext.baseCSSPrefix+"component",disabledCls:Ext.baseCSSPrefix+"item-disabled",ui:"default",uiCls:[],hidden:false,disabled:false,draggable:false,floating:false,hideMode:"display",styleHtmlContent:false,styleHtmlCls:Ext.baseCSSPrefix+"html",autoShow:false,autoRender:false,allowDomMove:true,rendered:false,componentLayoutCounter:0,shrinkWrap:2,weight:0,maskOnDisable:true,_isLayoutRoot:false,constructor:function(j){var h=this,i,g,f;if(j){Ext.apply(h,j);f=h.xhooks;if(f){delete h.xhooks;Ext.override(h,f)}}else{j={}}h.initialConfig=j;h.mixins.elementCt.constructor.call(h);h.addEvents("beforeactivate","activate","beforedeactivate","deactivate","added","disable","enable","beforeshow","show","beforehide","hide","removed","beforerender","render","afterrender","boxready","beforedestroy","destroy","resize","move","focus","blur");h.getId();h.setupProtoEl();if(h.cls){h.initialCls=h.cls;h.protoEl.addCls(h.cls)}if(h.style){h.initialStyle=h.style;h.protoEl.setStyle(h.style)}h.mons=[];h.renderData=h.renderData||{};h.renderSelectors=h.renderSelectors||{};if(h.plugins){h.plugins=[].concat(h.plugins);h.constructPlugins()}if(!h.hasListeners){h.hasListeners=new h.HasListeners()}h.initComponent();Ext.ComponentManager.register(h);h.mixins.observable.constructor.call(h);h.mixins.state.constructor.call(h,j);this.addStateEvents("resize");if(h.plugins){h.plugins=[].concat(h.plugins);for(i=0,g=h.plugins.length;i<g;i++){h.plugins[i]=h.initPlugin(h.plugins[i])}}h.loader=h.getLoader();if(h.renderTo){h.render(h.renderTo)}if(h.autoShow){h.show()}if(Ext.isDefined(h.disabledClass)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.Component: disabledClass has been deprecated. Please use disabledCls.")}h.disabledCls=h.disabledClass;delete h.disabledClass}},initComponent:function(){this.constructPlugins();this.setSize(this.width,this.height)},getState:function(){var d=this,f=null,e=d.getSizeModel();if(e.width.configured){f=d.addPropertyToState(f,"width")}if(e.height.configured){f=d.addPropertyToState(f,"height")}return f},addPropertyToState:function(h,i,j){var f=this,g=arguments.length;if(g==3||f.hasOwnProperty(i)){if(g<3){j=f[i]}if(j!==f.initialConfig[i]){(h||(h={}))[i]=j}}return h},show:Ext.emptyFn,animate:function(A){var t=this,x,w,y,h,p,r,s,u,q,v,z,B;A=A||{};p=A.to||{};if(Ext.fx.Manager.hasFxBlock(t.id)){return t}x=Ext.isDefined(p.width);if(x){h=Ext.Number.constrain(p.width,t.minWidth,t.maxWidth)}w=Ext.isDefined(p.height);if(w){y=Ext.Number.constrain(p.height,t.minHeight,t.maxHeight)}if(!A.dynamic&&(x||w)){u=(A.from?A.from.width:undefined)||t.getWidth();q=u;v=(A.from?A.from.height:undefined)||t.getHeight();z=v;B=false;if(w&&y>v){z=y;B=true}if(x&&h>u){q=h;B=true}if(B){r=!Ext.isNumber(t.width);s=!Ext.isNumber(t.height);t.setSize(q,z);t.el.setSize(u,v);if(r){delete t.width}if(s){delete t.height}}if(x){p.width=h}if(w){p.height=y}}return t.mixins.animate.animate.apply(t,arguments)},onHide:function(){this.updateLayout({isRoot:false})},onShow:function(){this.updateLayout({isRoot:false})},constructPlugin:function(b){if(b.ptype&&typeof b.init!="function"){b.cmp=this;b=Ext.PluginManager.create(b)}else{if(typeof b=="string"){b=Ext.PluginManager.create({ptype:b,cmp:this})}}return b},constructPlugins:function(){var g=this,e=g.plugins,h,f;if(e){for(h=0,f=e.length;h<f;h++){e[h]=g.constructPlugin(e[h])}}},initPlugin:function(b){b.init(this);return b},updateAria:Ext.emptyFn,registerFloatingItem:function(c){var d=this;if(!d.floatingItems){d.floatingItems=new Ext.ZIndexManager(d)}d.floatingItems.register(c)},unregisterFloatingItem:function(c){var d=this;if(d.floatingItems){d.floatingItems.unregister(c)}},layoutSuspendCount:0,suspendLayouts:function(){var b=this;if(!b.rendered){return}if(++b.layoutSuspendCount==1){b.suspendLayout=true}},resumeLayouts:function(c){var d=this;if(!d.rendered){return}if(!--d.layoutSuspendCount){d.suspendLayout=false;if(c&&!d.isLayoutSuspended()){d.updateLayout(c)}}},setupProtoEl:function(){var c=this,d=[c.baseCls,c.getComponentLayout().targetCls];if(Ext.isDefined(c.cmpCls)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.Component: cmpCls has been deprecated. Please use componentCls.")}c.componentCls=c.cmpCls;delete c.cmpCls}if(c.componentCls){d.push(c.componentCls)}else{c.componentCls=c.baseCls}c.protoEl=new Ext.util.ProtoElement({cls:d.join(" ")})},setUI:function(k){var l=this,h=Ext.Array.clone(l.uiCls),j=[],m=[],i,n;for(n=0;n<h.length;n++){i=h[n];m=m.concat(l.removeClsWithUI(i,true));j.push(i)}if(m.length){l.removeCls(m)}l.removeUIFromElement();l.ui=k;l.addUIToElement();m=[];for(n=0;n<j.length;n++){i=j[n];m=m.concat(l.addClsWithUI(i,true))}if(m.length){l.addCls(m)}if(l.rendered){l.updateLayout()}},addClsWithUI:function(n,j){var k=this,l=[],m,h=0,i;if(typeof n==="string"){n=(n.indexOf(" ")<0)?[n]:Ext.String.splitWords(n)}m=n.length;k.uiCls=Ext.Array.clone(k.uiCls);for(;h<m;h++){i=n[h];if(i&&!k.hasUICls(i)){k.uiCls.push(i);l=l.concat(k.addUIClsToElement(i))}}if(j!==true){k.addCls(l)}return l},removeClsWithUI:function(n,j){var k=this,l=[],h=0,m,i;if(typeof n==="string"){n=(n.indexOf(" ")<0)?[n]:Ext.String.splitWords(n)}m=n.length;for(h=0;h<m;h++){i=n[h];if(i&&k.hasUICls(i)){k.uiCls=Ext.Array.remove(k.uiCls,i);l=l.concat(k.removeUIClsFromElement(i))}}if(j!==true){k.removeCls(l)}return l},hasUICls:function(e){var d=this,f=d.uiCls||[];return Ext.Array.contains(f,e)},frameElementsArray:["tl","tc","tr","ml","mc","mr","bl","bc","br"],addUIClsToElement:function(i){var o=this,u=o.baseCls+"-"+o.ui+"-"+i,c=[Ext.baseCSSPrefix+i,o.baseCls+"-"+i,u],n=o.frameElementCls,q,r,s,v,t,p;if(o.frame&&!Ext.supports.CSS3BorderRadius){q=o.frameElementsArray;r=q.length;s=0;for(;s<r;s++){t=q[s];v=o["frame"+t.toUpperCase()];p=u+"-"+t;if(v&&v.dom){v.addCls(p)}else{if(Ext.Array.indexOf(n[t],p)==-1){n[t].push(p)}}}}o.frameElementCls=n;return c},removeUIClsFromElement:function(i){var o=this,u=o.baseCls+"-"+o.ui+"-"+i,c=[Ext.baseCSSPrefix+i,o.baseCls+"-"+i,u],n=o.frameElementCls,q,r,s,v,t,p;if(o.frame&&!Ext.supports.CSS3BorderRadius){q=o.frameElementsArray;r=q.length;s=0;for(;s<r;s++){t=q[s];v=o["frame"+t.toUpperCase()];p=u+"-"+t;if(v&&v.dom){v.addCls(p)}else{Ext.Array.remove(n[t],p)}}}o.frameElementCls=n;return c},addUIToElement:function(){var l=this,i=l.baseCls+"-"+l.ui,c=l.frameElementCls,n,o,p,r,q,m;l.addCls(i);if(l.frame&&!Ext.supports.CSS3BorderRadius){n=l.frameElementsArray;o=n.length;p=0;for(;p<o;p++){q=n[p];r=l["frame"+q.toUpperCase()];m=i+"-"+q;if(r){r.addCls(m)}else{if(!Ext.Array.contains(c[q],m)){c[q].push(m)}}}}},removeUIFromElement:function(){var l=this,i=l.baseCls+"-"+l.ui,c=l.frameElementCls,n,o,p,r,q,m;l.removeCls(i);if(l.frame&&!Ext.supports.CSS3BorderRadius){n=l.frameElementsArray;o=n.length;p=0;for(;p<o;p++){q=n[p];r=l["frame"+q.toUpperCase()];m=i+"-"+q;if(r){r.removeCls(m)}else{Ext.Array.remove(c[q],m)}}}},getTpl:function(b){return Ext.XTemplate.getTpl(this,b)},initStyles:function(j){var o=this,q=Ext.Element,m=o.padding,p=o.margin,l=o.x,n=o.y,r,k;if(m!==undefined){j.setStyle("padding",q.unitizeBox((m===true)?5:m))}if(p!==undefined){j.setStyle("margin",q.unitizeBox((p===true)?5:p))}if(o.border!==undefined){o.setBorder(o.border,j)}if(o.cls&&o.cls!=o.initialCls){j.addCls(o.cls);delete o.cls;delete o.initialCls}if(o.style&&o.style!=o.initialStyle){j.setStyle(o.style);delete o.style;delete o.initialStyle}if(l!==undefined){j.setStyle("left",l+"px")}if(n!==undefined){j.setStyle("top",n+"px")}if(!o.getFrameInfo()&&Ext.isBorderBox){r=o.width;k=o.height;if(r!==undefined){j.setStyle("width",(typeof r==="number")?r+"px":r)}if(k!==undefined){j.setStyle("height",(typeof k==="number")?k+"px":k)}}},initEvents:function(){var j=this,h=j.afterRenderEvents,f,i,g=function(a){j.mon(f,a)};if(h){for(i in h){if(h.hasOwnProperty(i)){f=j[i];if(f&&f.on){Ext.each(h[i],g)}}}}j.addFocusListener()},addFocusListener:function(){var f=this,d=f.getFocusEl(),e;if(d){if(d.isComponent){return d.addFocusListener()}e=d.needsTabIndex();if(!f.focusListenerAdded&&(!e||Ext.FocusManager.enabled)){if(e){d.dom.tabIndex=-1}d.on({focus:f.onFocus,blur:f.onBlur,scope:f});f.focusListenerAdded=true}}},getFocusEl:Ext.emptyFn,isFocusable:function(f){var c=this,e;if((c.focusable!==false)&&(e=c.getFocusEl())&&c.rendered&&!c.destroying&&!c.isDestroyed&&!c.disabled&&c.isVisible(true)){if(e.isComponent){return e.isFocusable()}return e&&e.dom&&e.isVisible()}},preFocus:Ext.emptyFn,onFocus:function(g){var h=this,e=h.focusCls,f=h.getFocusEl();if(!h.disabled){h.preFocus(g);if(e&&f){f.addCls(h.addClsWithUI(e,true))}if(!h.hasFocus){h.hasFocus=true;h.fireEvent("focus",h,g)}}},beforeBlur:Ext.emptyFn,onBlur:function(g){var h=this,e=h.focusCls,f=h.getFocusEl();if(h.destroying){return}h.beforeBlur(g);if(e&&f){f.removeCls(h.removeClsWithUI(e,true))}if(h.validateOnBlur){h.validate()}h.hasFocus=false;h.fireEvent("blur",h,g);h.postBlur(g)},postBlur:Ext.emptyFn,is:function(b){return Ext.ComponentQuery.is(this,b)},up:function(c){var d=this.getBubbleTarget();if(c){for(;d;d=d.getBubbleTarget()){if(Ext.ComponentQuery.is(d,c)){return d}}}return d},nextSibling:function(c){var j=this.ownerCt,l,k,h,i;if(j){l=j.items;h=l.indexOf(this)+1;if(h){if(c){for(k=l.getCount();h<k;h++){if((i=l.getAt(h)).is(c)){return i}}}else{if(h<l.getCount()){return l.getAt(h)}}}}return null},previousSibling:function(c){var i=this.ownerCt,j,g,h;if(i){j=i.items;g=j.indexOf(this);if(g!=-1){if(c){for(--g;g>=0;g--){if((h=j.getAt(g)).is(c)){return h}}}else{if(g){return j.getAt(--g)}}}}return null},previousNode:function(n,m){var j=this,h,k,i,l;if(m&&j.is(n)){return j}h=this.prev(n);if(h){return h}if(j.ownerCt){for(k=j.ownerCt.items.items,l=Ext.Array.indexOf(k,j)-1;l>-1;l--){if(k[l].query){h=k[l].query(n);h=h[h.length-1];if(h){return h}}}return j.ownerCt.previousNode(n,true)}},nextNode:function(n,m){var j=this,h,k,i,l;if(m&&j.is(n)){return j}h=this.next(n);if(h){return h}if(j.ownerCt){for(k=j.ownerCt.items,l=k.indexOf(j)+1,k=k.items,i=k.length;l<i;l++){if(k[l].down){h=k[l].down(n);if(h){return h}}}return j.ownerCt.nextNode(n)}},getId:function(){return this.id||(this.id="ext-comp-"+(this.getAutoId()))},getItemId:function(){return this.itemId||this.id},getEl:function(){return this.el},getTargetEl:function(){return this.frameBody||this.el},getOverflowStyle:function(){var c=this,d=null;if(typeof c.autoScroll=="boolean"){d={overflow:c.autoScroll?"auto":""}}else{if(c.overflowX!==undefined||c.overflowY!==undefined){d={"overflow-x":(c.overflowX||""),"overflow-y":(c.overflowY||"")}}}if(d&&(Ext.isIE6||Ext.isIE7)){d.position="relative"}return d},isXType:function(c,d){if(d){return this.xtype===c}else{return this.xtypesMap[c]}},getXTypes:function(){var h=this.self,g,e,f;if(!h.xtypes){g=[];e=this;while(e){f=e.xtypes;if(f!==undefined){g.unshift.apply(g,f)}e=e.superclass}h.xtypeChain=g;h.xtypes=g.join("/")}return h.xtypes},update:function(e,h,f){var g=this;if(g.tpl&&!Ext.isString(e)){g.data=e;if(g.rendered){g.tpl[g.tplWriteMode](g.getTargetEl(),e||{})}}else{g.html=Ext.isObject(e)?Ext.DomHelper.markup(e):e;if(g.rendered){g.getTargetEl().update(g.html,h,f)}}if(g.rendered){g.updateLayout()}},setVisible:function(b){return this[b?"show":"hide"]()},isVisible:function(g){var j=this,h=j,i=j.rendered&&!j.hidden,f=j.ownerCt;j.hiddenAncestor=false;if(j.destroyed){return false}if(g&&i&&f){while(f){if(f.hidden||(f.collapsed&&!(f.getDockedItems&&Ext.Array.contains(f.getDockedItems(),h)))){j.hiddenAncestor=f;i=false;break}h=f;f=f.ownerCt}}return i},onBoxReady:function(){var b=this;if(b.disableOnBoxReady){b.onDisable()}else{if(b.enableOnBoxReady){b.onEnable()}}if(b.resizable){b.initResizable(b.resizable)}},enable:function(d){var c=this;delete c.disableOnBoxReady;c.removeCls(c.disabledCls);if(c.rendered){c.onEnable()}else{c.enableOnBoxReady=true}c.disabled=false;delete c.resetDisable;if(d!==true){c.fireEvent("enable",c)}return c},disable:function(d){var c=this;delete c.enableOnBoxReady;c.addCls(c.disabledCls);if(c.rendered){c.onDisable()}else{c.disableOnBoxReady=true}c.disabled=true;if(d!==true){delete c.resetDisable;c.fireEvent("disable",c)}return c},onEnable:function(){if(this.maskOnDisable){this.el.dom.disabled=false;this.unmask()}},onDisable:function(){if(this.maskOnDisable){this.el.dom.disabled=true;this.mask()}},mask:function(){var d=this.lastBox,f=this.getMaskTarget(),e=[];if(d){e[2]=d.height}f.mask.apply(f,e)},unmask:function(){this.getMaskTarget().unmask()},getMaskTarget:function(){return this.el},isDisabled:function(){return this.disabled},setDisabled:function(b){return this[b?"disable":"enable"]()},isHidden:function(){return this.hidden},addCls:function(e){var f=this,d=f.rendered?f.el:f.protoEl;d.addCls.apply(d,arguments);return f},addClass:function(){return this.addCls.apply(this,arguments)},hasCls:function(e){var f=this,d=f.rendered?f.el:f.protoEl;return d.hasCls.apply(d,arguments)},removeCls:function(e){var f=this,d=f.rendered?f.el:f.protoEl;d.removeCls.apply(d,arguments);return f},removeClass:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.Component: removeClass has been deprecated. Please use removeCls.")}return this.removeCls.apply(this,arguments)},addOverCls:function(){var b=this;if(!b.disabled){b.el.addCls(b.overCls)}},removeOverCls:function(){this.el.removeCls(this.overCls)},addListener:function(h,k,l,i){var j=this,m,n;if(Ext.isString(h)&&(Ext.isObject(k)||i&&i.element)){if(i.element){m=k;k={};k[h]=m;h=i.element;if(l){k.scope=l}for(n in i){if(i.hasOwnProperty(n)){if(j.eventOptionsRe.test(n)){k[n]=i[n]}}}}if(j[h]&&j[h].on){j.mon(j[h],k)}else{j.afterRenderEvents=j.afterRenderEvents||{};if(!j.afterRenderEvents[h]){j.afterRenderEvents[h]=[]}j.afterRenderEvents[h].push(k)}}return j.mixins.observable.addListener.apply(j,arguments)},removeManagedListenerItem:function(i,j,k,o,m,n){var l=this,p=j.options?j.options.element:null;if(p){p=l[p];if(p&&p.un){if(i||(j.item===k&&j.ename===o&&(!m||j.fn===m)&&(!n||j.scope===n))){p.un(j.ename,j.fn,j.scope);if(!i){Ext.Array.remove(l.managedListeners,j)}}}}else{return l.mixins.observable.removeManagedListenerItem.apply(l,arguments)}},getBubbleTarget:function(){return this.ownerCt},isFloating:function(){return this.floating},isDraggable:function(){return !!this.draggable},isDroppable:function(){return !!this.droppable},onAdded:function(e,f){var d=this;d.ownerCt=e;if(d.hasListeners.added){d.fireEvent("added",d,e,f)}},onRemoved:function(c){var d=this;if(d.hasListeners.removed){d.fireEvent("removed",d,d.ownerCt)}delete d.ownerCt;delete d.ownerLayout},beforeDestroy:Ext.emptyFn,onResize:Ext.emptyFn,setSize:function(d,e){var f=this;if(d&&typeof d=="object"){e=d.height;d=d.width}if(typeof d=="number"){f.width=Ext.Number.constrain(d,f.minWidth,f.maxWidth)}else{if(d===null){delete f.width}}if(typeof e=="number"){f.height=Ext.Number.constrain(e,f.minHeight,f.maxHeight)}else{if(e===null){delete f.height}}if(f.rendered&&f.isVisible()){f.updateLayout({isRoot:false})}return f},isLayoutRoot:function(){var d=this,c=d.ownerLayout;if(!c||d._isLayoutRoot||d.floating){return true}return c.isItemLayoutRoot(d)},isLayoutSuspended:function(){var d=this,c;while(d){if(d.layoutSuspendCount||d.suspendLayout){return true}c=d.ownerLayout;if(!c){break}d=c.owner}return false},updateLayout:function(e){var h=this,g,f=e&&e.isRoot;if(!h.rendered||h.layoutSuspendCount||h.suspendLayout){return}if(h.hidden){Ext.AbstractComponent.cancelLayout(h)}else{if(typeof f!="boolean"){f=h.isLayoutRoot()}}if(f||!h.ownerLayout||!h.ownerLayout.onContentChange(h)){if(!h.isLayoutSuspended()){g=(e&&e.hasOwnProperty("defer"))?e.defer:h.deferLayouts;Ext.AbstractComponent.updateLayout(h,g)}}},getSizeModel:function(r){var o=this,v=Ext.layout.SizeModel,m=o.componentLayout.ownerContext,u,l,t,n,q,p,s;if(m){s=m.widthModel;t=m.heightModel}if(!s||!t){u=(typeof o.width=="number");l=(typeof o.height=="number");if(o.floating||!(n=o.ownerLayout)){if(u){s=v.configured}if(l){t=v.configured}q=Ext.layout.Layout.prototype.autoSizePolicy;p=o.floating?3:o.shrinkWrap}else{q=n.getItemSizePolicy(o);p=n.isItemShrinkWrap(o)}p=(p===true)?3:(p||0);if(p!==3){if(!r){r=o.ownerCt&&o.ownerCt.getSizeModel()}if(r){p|=(r.width.shrinkWrap?1:0)|(r.height.shrinkWrap?2:0)}}if(!s){if(!q.setsWidth){if(u){s=v.configured}else{s=(p&1)?v.shrinkWrap:v.natural}}else{if(q.readsWidth){if(u){s=v.calculatedFromConfigured}else{s=(p&1)?v.calculatedFromShrinkWrap:v.calculatedFromNatural}}else{s=v.calculated}}}if(!t){if(!q.setsHeight){if(l){t=v.configured}else{t=(p&2)?v.shrinkWrap:v.natural}}else{if(q.readsHeight){if(l){t=v.calculatedFromConfigured}else{t=(p&2)?v.calculatedFromShrinkWrap:v.calculatedFromNatural}}else{t=v.calculated}}}}return{width:s,height:t}},isDescendant:function(d){if(d.isContainer){for(var c=this.ownerCt;c;c=c.ownerCt){if(c===d){return true}}}return false},doComponentLayout:function(){this.updateLayout();return this},forceComponentLayout:function(){this.updateLayout()},setComponentLayout:function(c){var d=this.componentLayout;if(d&&d.isLayout&&d!=c){d.setOwner(null)}this.componentLayout=c;c.setOwner(this)},getComponentLayout:function(){var b=this;if(!b.componentLayout||!b.componentLayout.isLayout){b.setComponentLayout(Ext.layout.Layout.create(b.componentLayout,"autocomponent"))}return b.componentLayout},afterComponentLayout:function(j,g,f,h){var i=this;if(++i.componentLayoutCounter===1){i.afterFirstLayout(j,g)}if(i.hasListeners.resize&&(j!==f||g!==h)){i.fireEvent("resize",i,j,g,f,h)}},beforeComponentLayout:function(c,d){return true},setPosition:function(g,h,f){var j=this,i=j.beforeSetPosition.apply(j,arguments);if(i&&j.rendered){i=j.convertPosition(i);if(f){j.stopAnimation();j.animate(Ext.apply({duration:1000,listeners:{afteranimate:Ext.Function.bind(j.afterSetPosition,j,[i.left,i.top])},to:i},f))}else{if(i.left!==undefined&&i.top!==undefined){j.el.setLeftTop(i.left,i.top)}else{if(i.left!==undefined){j.el.setLeft(i.left)}else{if(i.top!==undefined){j.el.setTop(i.top)}}}j.afterSetPosition(i.left,i.top)}}return j},beforeSetPosition:function(g,h,f){var i,j;if(!g||Ext.isNumber(g)){i={x:g,y:h,anim:f}}else{if(Ext.isNumber(j=g[0])){i={x:j,y:g[1],anim:h}}else{i={x:g.x,y:g.y,anim:h}}}i.hasX=Ext.isNumber(i.x);i.hasY=Ext.isNumber(i.y);this.x=i.x;this.y=i.y;return(i.hasX||i.hasY)?i:null},afterSetPosition:function(e,f){var d=this;d.onPosition(e,f);if(d.hasListeners.move){d.fireEvent("move",d,e,f)}},convertPosition:function(g,e){var f={},h=Ext.Element;if(g.hasX){f.left=e?h.addUnits(g.x):g.x}if(g.hasY){f.top=e?h.addUnits(g.y):g.y}return f},onPosition:Ext.emptyFn,setWidth:function(b){return this.setSize(b)},setHeight:function(b){return this.setSize(undefined,b)},getSize:function(){return this.el.getSize()},getWidth:function(){return this.el.getWidth()},getHeight:function(){return this.el.getHeight()},getLoader:function(){var f=this,d=f.autoLoad?(Ext.isObject(f.autoLoad)?f.autoLoad:{url:f.autoLoad}):null,e=f.loader||d;if(e){if(!e.isLoader){f.loader=new Ext.ComponentLoader(Ext.apply({target:f,autoLoad:d},e))}else{e.setTarget(f)}return f.loader}return null},setDocked:function(d,f){var e=this;e.dock=d;if(f&&e.ownerCt&&e.rendered){e.ownerCt.updateLayout()}return e},setBorder:function(e,g){var h=this,f=!!g;if(h.rendered||f){if(!f){g=h.el}if(!e){e=0}else{e=Ext.Element.unitizeBox((e===true)?1:e)}g.setStyle("border-width",e);if(!f){h.updateLayout()}}h.border=e},onDestroy:function(){var b=this;if(b.monitorResize&&Ext.EventManager.resizeEvent){Ext.EventManager.resizeEvent.removeListener(b.setSize,b)}Ext.destroy(b.componentLayout,b.loadMask,b.floatingItems)},destroy:function(){var g=this,e=g.renderSelectors,f,h;if(!g.isDestroyed){if(!g.hasListeners.beforedestroy||g.fireEvent("beforedestroy",g)!==false){g.destroying=true;g.beforeDestroy();if(g.floating){delete g.floatParent;if(g.zIndexManager){g.zIndexManager.unregister(g)}}else{if(g.ownerCt&&g.ownerCt.remove){g.ownerCt.remove(g,false)}}g.onDestroy();Ext.destroy(g.plugins);if(g.hasListeners.destroy){g.fireEvent("destroy",g)}Ext.ComponentManager.unregister(g);g.mixins.state.destroy.call(g);g.clearListeners();if(g.rendered){Ext.AbstractComponent.cancelLayout(g);if(!g.preserveElOnDestroy){g.el.remove()}g.mixins.elementCt.destroy.call(g);if(e){for(f in e){if(e.hasOwnProperty(f)){h=g[f];if(h){delete g[f];h.remove()}}}}delete g.el;delete g.frameBody;delete g.rendered}g.destroying=false;g.isDestroyed=true}}},getPlugin:function(e){var h=0,f=this.plugins,g=f.length;for(;h<g;h++){if(f[h].pluginId===e){return f[h]}}},isDescendantOf:function(b){return !!this.findParentBy(function(a){return a===b})}},function(){var b=this;b.createAlias({on:"addListener",prev:"previousSibling",next:"nextSibling"});Ext.resumeLayouts=function(a){b.resumeLayouts(a)};Ext.suspendLayouts=function(){b.suspendLayouts()};Ext.batchLayouts=function(d,a){b.suspendLayouts();d.call(a);b.resumeLayouts(true)}});Ext.define("Ext.Component",{alias:["widget.component","widget.box"],extend:"Ext.AbstractComponent",requires:["Ext.util.DelayedTask"],uses:["Ext.Layer","Ext.resizer.Resizer","Ext.util.ComponentDragger"],mixins:{floating:"Ext.util.Floating"},statics:{DIRECTION_TOP:"top",DIRECTION_RIGHT:"right",DIRECTION_BOTTOM:"bottom",DIRECTION_LEFT:"left",VERTICAL_DIRECTION_Re:/^(?:top|bottom)$/,INVALID_ID_CHARS_Re:/[\.,\s]/g},resizeHandles:"all",floating:false,toFrontOnShow:true,hideMode:"display",hideParent:false,bubbleEvents:[],actionMode:"el",monPropRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,constructor:function(d){var c=this;d=d||{};if(d.initialConfig){if(d.isAction){c.baseAction=d}d=d.initialConfig}else{if(d.tagName||d.dom||Ext.isString(d)){d={applyTo:d,id:d.id||d}}}c.callParent([d]);if(c.baseAction){c.baseAction.addComponent(c)}},initComponent:function(){var b=this;b.callParent();if(b.listeners){b.on(b.listeners);b.listeners=null}b.enableBubble(b.bubbleEvents);b.mons=[]},afterRender:function(){var b=this;b.callParent();if(!(b.x&&b.y)&&(b.pageX||b.pageY)){b.setPagePosition(b.pageX,b.pageY)}if(b.draggable){b.initDraggable()}},setAutoScroll:function(f){var h=this,e,g;h.autoScroll=!!f;if(h.rendered){g=(e=h.getLayout&&h.getLayout())?e.getRenderTarget():h.getTargetEl();g.setStyle(h.getOverflowStyle())}return h},setOverflowXY:function(g,h){var k=this,l,j,i=arguments.length;if(i){k.overflowX=g||"";if(i>1){k.overflowY=h||""}}if(k.rendered){j=(l=k.getLayout&&k.getLayout())?l.getRenderTarget():k.getTargetEl();j.setStyle(k.getOverflowStyle())}return k},beforeRender:function(){var d=this,f=d.floating,e;if(f){d.addCls(Ext.baseCSSPrefix+"layer");e=f.cls;if(e){d.addCls(e)}}return d.callParent()},afterComponentLayout:function(){this.callParent(arguments);if(this.floating){this.onAfterFloatLayout()}},makeFloating:function(b){this.mixins.floating.constructor.call(this,b)},wrapPrimaryEl:function(b){if(this.floating){this.makeFloating(b)}else{this.callParent(arguments)}},initResizable:function(d){var c=this;d=Ext.apply({target:c,dynamic:false,constrainTo:c.constrainTo||(c.floatParent?c.floatParent.getTargetEl():null),handles:c.resizeHandles},d);d.target=c;c.resizer=new Ext.resizer.Resizer(d)},getDragEl:function(){return this.el},initDraggable:function(){var c=this,d=Ext.applyIf({el:c.getDragEl(),constrainTo:c.constrain?(c.constrainTo||(c.floatParent?c.floatParent.getTargetEl():c.el.getScopeParent())):undefined},c.draggable);if(c.constrain||c.constrainDelegate){d.constrain=c.constrain;d.constrainDelegate=c.constrainDelegate}c.dd=new Ext.util.ComponentDragger(c,d)},scrollBy:function(e,f,h){var g;if((g=this.getTargetEl())&&g.dom){g.scrollBy.apply(g,arguments)}},setLoading:function(h,g){var e=this,f;if(e.rendered){Ext.destroy(e.loadMask);e.loadMask=null;if(h!==false&&!e.collapsed){if(Ext.isObject(h)){f=Ext.apply({},h)}else{if(Ext.isString(h)){f={msg:h}}else{f={}}}if(g){Ext.applyIf(f,{useTargetEl:true})}e.loadMask=new Ext.LoadMask(e,f);e.loadMask.show()}}return e.loadMask},beforeSetPosition:function(){var d=this,f=d.callParent(arguments),e;if(f){e=d.adjustPosition(f.x,f.y);f.x=e.x;f.y=e.y}return f||null},afterSetPosition:function(c,d){this.onPosition(c,d);this.fireEvent("move",this,c,d)},showAt:function(f,g,e){var h=this;if(!h.rendered&&(h.autoRender||h.floating)){h.doAutoRender()}if(h.floating){h.setPosition(f,g,e)}else{h.setPagePosition(f,g,e)}h.show()},setPagePosition:function(h,i,g){var l=this,k,j;if(Ext.isArray(h)){i=h[1];h=h[0]}l.pageX=h;l.pageY=i;if(l.floating){if(l.isContainedFloater()){j=l.floatParent.getTargetEl().getViewRegion();if(Ext.isNumber(h)&&Ext.isNumber(j.left)){h-=j.left}if(Ext.isNumber(i)&&Ext.isNumber(j.top)){i-=j.top}}else{k=l.el.translatePoints(h,i);h=k.left;i=k.top}l.setPosition(h,i,g)}else{k=l.el.translatePoints(h,i);l.setPosition(k.left,k.top,g)}return l},isContainedFloater:function(){return(this.floating&&this.floatParent)},getBox:function(d){var f=d?this.getPosition(d):this.el.getXY(),e=this.getSize();e.x=f[0];e.y=f[1];return e},updateBox:function(b){this.setSize(b.width,b.height);this.setPagePosition(b.x,b.y);return this},getOuterSize:function(){var b=this.el;return{width:b.getWidth()+b.getMargin("lr"),height:b.getHeight()+b.getMargin("tb")}},adjustPosition:function(f,g){var e=this,h;if(e.isContainedFloater()){h=e.floatParent.getTargetEl().getViewRegion();f+=h.left;g+=h.top}return{x:f,y:g}},getPosition:function(h){var l=this,g=l.el,j,k=l.isContainedFloater(),i;if((h===true)||!k){return[g.getLeft(true),g.getTop(true)]}if(l.x!==undefined&&l.y!==undefined){j=[l.x,l.y]}else{j=l.el.getXY();if(k){i=l.floatParent.getTargetEl().getViewRegion();j[0]-=i.left;j[1]-=i.top}}return j},getId:function(){var d=this,c;if(!d.id){c=d.getXType();if(c){c=c.replace(Ext.Component.INVALID_ID_CHARS_Re,"-")}else{c=Ext.name.toLowerCase()+"-comp"}d.id=c+"-"+d.getAutoId()}return d.id},show:function(i,g,f){var j=this,h=j.rendered;if(h&&j.isVisible()){if(j.toFrontOnShow&&j.floating){j.toFront()}}else{if(j.fireEvent("beforeshow",j)!==false){j.hidden=false;if(!h&&(j.autoRender||j.floating)){j.doAutoRender();h=j.rendered}if(h){j.beforeShow();j.onShow.apply(j,arguments);j.afterShow.apply(j,arguments)}}}return j},beforeShow:Ext.emptyFn,onShow:function(){var b=this;b.el.show();b.callParent(arguments);if(b.floating&&b.constrain){b.doConstrain()}},afterShow:function(j,h,l){var k=this,i,n,m;j=j||k.animateTarget;if(!k.ghost){j=null}if(j){j=j.el?j.el:Ext.get(j);n=k.el.getBox();i=j.getBox();k.el.addCls(Ext.baseCSSPrefix+"hide-offsets");m=k.ghost();m.el.stopAnimation();m.el.setX(-10000);m.el.animate({from:i,to:n,listeners:{afteranimate:function(){delete m.componentLayout.lastComponentSize;k.unghost();k.el.removeCls(Ext.baseCSSPrefix+"hide-offsets");k.onShowComplete(h,l)}}})}else{k.onShowComplete(h,l)}},onShowComplete:function(e,d){var f=this;if(f.floating){f.toFront();f.onFloatShow()}Ext.callback(e,d||f);f.fireEvent("show",f);delete f.hiddenByLayout},hide:function(){var b=this;b.showOnParentShow=false;if(!(b.rendered&&!b.isVisible())&&b.fireEvent("beforehide",b)!==false){b.hidden=true;if(b.rendered){b.onHide.apply(b,arguments)}}return b},onHide:function(i,h,k){var j=this,l,g;i=i||j.animateTarget;if(!j.ghost){i=null}if(i){i=i.el?i.el:Ext.get(i);l=j.ghost();l.el.stopAnimation();g=i.getBox();g.width+="px";g.height+="px";l.el.animate({to:g,listeners:{afteranimate:function(){delete l.componentLayout.lastComponentSize;l.el.hide();j.afterHide(h,k)}}})}j.el.hide();if(!i){j.afterHide(h,k)}},afterHide:function(e,d){var f=this;delete f.hiddenByLayout;Ext.AbstractComponent.prototype.onHide.call(this);Ext.callback(e,d||f);f.fireEvent("hide",f)},onDestroy:function(){var b=this;if(b.rendered){Ext.destroy(b.proxy,b.proxyWrap,b.resizer);if(b.actionMode=="container"||b.removeMode=="container"){b.container.remove()}}delete b.focusTask;b.callParent()},deleteMembers:function(){var d=arguments,e=d.length,f=0;for(;f<e;++f){delete this[d[f]]}},focus:function(i,f){var j=this,g,h;if(j.rendered&&!j.isDestroyed&&j.isVisible(true)&&(g=j.getFocusEl())){if(g.isComponent){return g.focus(i,f)}if(f){if(!j.focusTask){j.focusTask=new Ext.util.DelayedTask(j.focus)}j.focusTask.delay(Ext.isNumber(f)?f:10,null,j,[i,false]);return j}if((h=g.dom)){if(g.needsTabIndex()){h.tabIndex=-1}g.focus();if(i===true){h.select()}}if(j.floating){j.toFront(true)}}return j},cancelFocus:function(){var b=this.focusTask;if(b){b.cancel()}},blur:function(){var b;if(this.rendered&&(b=this.getFocusEl())){b.blur()}return this},getEl:function(){return this.el},getResizeEl:function(){return this.el},getPositionEl:function(){return this.el},getActionEl:function(){return this.el},getVisibilityEl:function(){return this.el},onResize:Ext.emptyFn,getBubbleTarget:function(){return this.ownerCt||this.floatParent},getContentTarget:function(){return this.el},cloneConfig:function(h){h=h||{};var g=h.id||Ext.id(),f=Ext.applyIf(h,this.initialConfig),e;f.id=g;e=Ext.getClass(this);return new e(f)},getXType:function(){return this.self.xtype},findParentBy:function(d){var c;for(c=this.getBubbleTarget();c&&!d(c,this);c=c.getBubbleTarget()){}return c||null},findParentByType:function(b){return Ext.isFunction(b)?this.findParentBy(function(a){return a.constructor===b}):this.up(b)},bubble:function(h,e,f){var g=this;while(g){if(h.apply(e||g,f||[g])===false){break}g=g.getBubbleTarget()}return this},getProxy:function(){var d=this,c;if(!d.proxy){c=Ext.getBody();if(Ext.scopeResetCSS){d.proxyWrap=c=Ext.getBody().createChild({cls:Ext.resetCls})}d.proxy=d.el.createProxy(Ext.baseCSSPrefix+"proxy-el",c,true)}return d.proxy}});Ext.define("Ext.toolbar.Spacer",{extend:"Ext.Component",alias:"widget.tbspacer",alternateClassName:"Ext.Toolbar.Spacer",baseCls:Ext.baseCSSPrefix+"toolbar-spacer",focusable:false});Ext.define("Ext.form.field.Base",{extend:"Ext.Component",mixins:{labelable:"Ext.form.Labelable",field:"Ext.form.field.Field"},alias:"widget.field",alternateClassName:["Ext.form.Field","Ext.form.BaseField"],requires:["Ext.util.DelayedTask","Ext.XTemplate","Ext.layout.component.field.Field"],fieldSubTpl:['<input id="{id}" type="{type}" {inputAttrTpl}',' size="1"','<tpl if="name"> name="{name}"</tpl>','<tpl if="value"> value="{[Ext.util.Format.htmlEncode(values.value)]}"</tpl>','<tpl if="placeholder"> placeholder="{placeholder}"</tpl>','<tpl if="maxLength !== undefined"> maxlength="{maxLength}"</tpl>','<tpl if="readOnly"> readonly="readonly"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' class="{fieldCls} {typeCls} {editableCls}" autocomplete="off"/>',{disableFormats:true}],subTplInsertions:["inputAttrTpl"],inputType:"text",invalidText:"The value in this field is invalid",fieldCls:Ext.baseCSSPrefix+"form-field",focusCls:"form-focus",dirtyCls:Ext.baseCSSPrefix+"form-dirty",checkChangeEvents:Ext.isIE&&(!document.documentMode||document.documentMode<9)?["change","propertychange"]:["change","input","textInput","keyup","dragdrop"],checkChangeBuffer:50,componentLayout:"field",readOnly:false,readOnlyCls:Ext.baseCSSPrefix+"form-readonly",validateOnBlur:true,hasFocus:false,baseCls:Ext.baseCSSPrefix+"field",maskOnDisable:false,initComponent:function(){var b=this;b.callParent();b.subTplData=b.subTplData||{};b.addEvents("specialkey","writeablechange");b.initLabelable();b.initField();if(!b.name){b.name=b.getInputId()}},beforeRender:function(){var d=this,c=this.readOnly;d.callParent(arguments);if(c){d.addCls(d.readOnlyCls)}},getInputId:function(){return this.inputId||(this.inputId=this.id+"-inputEl")},getSubTplData:function(){var h=this,e=h.inputType,f=h.getInputId(),g;g=Ext.apply({id:f,cmpId:h.id,name:h.name||f,disabled:h.disabled,readOnly:h.readOnly,value:h.getRawValue(),type:e,fieldCls:h.fieldCls,fieldStyle:h.getFieldStyle(),tabIdx:h.tabIndex,typeCls:Ext.baseCSSPrefix+"form-"+(e==="password"?"text":e)},h.subTplData);h.getInsertionRenderData(g,h.subTplInsertions);return g},afterFirstLayout:function(){this.callParent();var b=this.inputEl;if(b){b.selectable()}},applyRenderSelectors:function(){var b=this;b.callParent();b.inputEl=b.el.getById(b.getInputId())},getSubTplMarkup:function(){return this.getTpl("fieldSubTpl").apply(this.getSubTplData())},initRenderTpl:function(){var b=this;if(!b.hasOwnProperty("renderTpl")){b.renderTpl=b.getTpl("labelableRenderTpl")}return b.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},setFieldStyle:function(e){var d=this,f=d.inputEl;if(f){f.applyStyles(e)}d.fieldStyle=e},getFieldStyle:function(){return"width:100%;"+(Ext.isObject(this.fieldStyle)?Ext.DomHelper.generateStyles(this.fieldStyle):this.fieldStyle||"")},onRender:function(){var b=this;b.callParent(arguments);b.onLabelableRender();b.renderActiveError()},getFocusEl:function(){return this.inputEl},isFileUpload:function(){return this.inputType==="file"},extractFileInput:function(){var d=this,e=d.isFileUpload()?d.inputEl.dom:null,f;if(e){f=e.cloneNode(true);e.parentNode.replaceChild(f,e);d.inputEl=Ext.get(f)}return e},getSubmitData:function(){var e=this,d=null,f;if(!e.disabled&&e.submitValue&&!e.isFileUpload()){f=e.getSubmitValue();if(f!==null){d={};d[e.getName()]=f}}return d},getSubmitValue:function(){return this.processRawValue(this.getRawValue())},getRawValue:function(){var c=this,d=(c.inputEl?c.inputEl.getValue():Ext.value(c.rawValue,""));c.rawValue=d;return d},setRawValue:function(c){var d=this;c=Ext.value(c,"");d.rawValue=c;if(d.inputEl){d.inputEl.dom.value=c}return c},valueToRaw:function(b){return""+Ext.value(b,"")},rawToValue:function(b){return b},processRawValue:function(b){return b},getValue:function(){var d=this,c=d.rawToValue(d.processRawValue(d.getRawValue()));d.value=c;return c},setValue:function(c){var d=this;d.setRawValue(d.valueToRaw(c));return d.mixins.field.setValue.call(d,c)},onBoxReady:function(){var b=this;b.callParent();if(b.setReadOnlyOnBoxReady){b.setReadOnly(b.readOnly)}},onDisable:function(){var d=this,c=d.inputEl;d.callParent();if(c){c.dom.disabled=true;if(d.hasActiveError()){d.clearInvalid();d.needsValidateOnEnable=true}}},onEnable:function(){var d=this,c=d.inputEl;d.callParent();if(c){c.dom.disabled=false;if(d.needsValidateOnEnable){delete d.needsValidateOnEnable;d.forceValidation=true;d.isValid();delete d.forceValidation}}},setReadOnly:function(f){var e=this,d=e.inputEl;f=!!f;e[f?"addCls":"removeCls"](e.readOnlyCls);e.readOnly=f;if(d){d.dom.readOnly=f}else{if(e.rendering){e.setReadOnlyOnBoxReady=true}}e.fireEvent("writeablechange",e,f)},fireKey:function(b){if(b.isSpecialKey()){this.fireEvent("specialkey",this,new Ext.EventObjectImpl(b))}},initEvents:function(){var n=this,l=n.inputEl,e,k,p=n.checkChangeEvents,m,j=p.length,o;if(n.inEditor){n.onBlur=Ext.Function.createBuffered(n.onBlur,10)}if(l){n.mon(l,Ext.EventManager.getKeyEvent(),n.fireKey,n);e=new Ext.util.DelayedTask(n.checkChange,n);n.onChangeEvent=k=function(){e.delay(n.checkChangeBuffer)};for(m=0;m<j;m++){o=p[m];if(o==="propertychange"){n.usesPropertychange=true}n.mon(l,o,k)}}n.callParent()},doComponentLayout:function(){var j=this,i=j.inputEl,g=j.usesPropertychange,f="propertychange",h=j.onChangeEvent;if(g){j.mun(i,f,h)}j.callParent(arguments);if(g){j.mon(i,f,h)}},onDirtyChange:function(b){this[b?"addCls":"removeCls"](this.dirtyCls)},isValid:function(){var d=this,e=d.disabled,f=d.forceValidation||!e;return f?d.validateValue(d.processRawValue(d.getRawValue())):e},validateValue:function(e){var f=this,g=f.getErrors(e),h=Ext.isEmpty(g);if(!f.preventMark){if(h){f.clearInvalid()}else{f.markInvalid(g)}}return h},markInvalid:function(f){var d=this,e=d.getActiveError();d.setActiveErrors(Ext.Array.from(f));if(e!==d.getActiveError()){d.updateLayout()}},clearInvalid:function(){var c=this,d=c.hasActiveError();c.unsetActiveError();if(d){c.updateLayout()}},renderActiveError:function(){var c=this,d=c.hasActiveError();if(c.inputEl){c.inputEl[d?"addCls":"removeCls"](c.invalidCls+"-field")}c.mixins.labelable.renderActiveError.call(c)},getActionEl:function(){return this.inputEl||this.el}});Ext.define("Ext.form.field.Text",{extend:"Ext.form.field.Base",alias:"widget.textfield",requires:["Ext.form.field.VTypes","Ext.layout.component.field.Text"],alternateClassName:["Ext.form.TextField","Ext.form.Text"],size:20,growMin:30,growMax:800,growAppend:"W",allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",blankText:"This field is required",regexText:"",emptyCls:Ext.baseCSSPrefix+"form-empty-field",componentLayout:"textfield",initComponent:function(){var b=this;b.callParent();b.addEvents("autosize","keydown","keyup","keypress");b.addStateEvents("change");b.setGrowSizePolicy()},setGrowSizePolicy:function(){if(this.grow){this.shrinkWrap|=1}},initEvents:function(){var c=this,d=c.inputEl;c.callParent();if(c.selectOnFocus||c.emptyText){c.mon(d,"mousedown",c.onMouseDown,c)}if(c.maskRe||(c.vtype&&c.disableKeyFilter!==true&&(c.maskRe=Ext.form.field.VTypes[c.vtype+"Mask"]))){c.mon(d,"keypress",c.filterKeys,c)}if(c.enableKeyEvents){c.mon(d,{scope:c,keyup:c.onKeyUp,keydown:c.onKeyDown,keypress:c.onKeyPress})}},isEqual:function(c,d){return this.isEqualAsString(c,d)},onChange:function(){this.callParent();this.autoSize()},getSubTplData:function(){var f=this,e=f.getRawValue(),g=f.emptyText&&e.length<1,h;if(g){if(Ext.supports.Placeholder){h=f.emptyText}else{e=f.emptyText}}return Ext.apply(f.callParent(),{maxLength:f.enforceMaxLength?f.maxLength:undefined,readOnly:f.readOnly,placeholder:h,value:e,fieldCls:f.fieldCls+((g&&(h||e))?" "+f.emptyCls:"")})},afterRender:function(){this.autoSize();this.callParent()},onMouseDown:function(c){var d=this;if(!d.hasFocus){d.mon(d.inputEl,"mouseup",Ext.emptyFn,d,{single:true,preventDefault:true})}},processRawValue:function(e){var f=this,g=f.stripCharsRe,h;if(g){h=e.replace(g,"");if(h!==e){f.setRawValue(h);e=h}}return e},onDisable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable="on"}},onEnable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable=""}},onKeyDown:function(b){this.fireEvent("keydown",this,b)},onKeyUp:function(b){this.fireEvent("keyup",this,b)},onKeyPress:function(b){this.fireEvent("keypress",this,b)},reset:function(){this.callParent();this.applyEmptyText()},applyEmptyText:function(){var d=this,e=d.emptyText,f;if(d.rendered&&e){f=d.getRawValue().length<1&&!d.hasFocus;if(Ext.supports.Placeholder){d.inputEl.dom.placeholder=e}else{if(f){d.setRawValue(e)}}if(f){d.inputEl.addCls(d.emptyCls)}d.autoSize()}},afterFirstLayout:function(){this.callParent();if(Ext.isIE&&this.disabled){var b=this.inputEl;if(b){b.dom.unselectable="on"}}},preFocus:function(){var e=this,h=e.inputEl,f=e.emptyText,g;e.callParent(arguments);if(f&&!Ext.supports.Placeholder&&h.dom.value===f){e.setRawValue("");g=true;h.removeCls(e.emptyCls)}else{if(Ext.supports.Placeholder){e.inputEl.removeCls(e.emptyCls)}}if(e.selectOnFocus||g){h.dom.select()}},onFocus:function(){var b=this;b.callParent(arguments);if(b.emptyText){b.autoSize()}},postBlur:function(){this.callParent(arguments);this.applyEmptyText()},filterKeys:function(f){if(f.ctrlKey&&!f.altKey){return}var d=f.getKey(),e=String.fromCharCode(f.getCharCode());if(Ext.isGecko&&(f.isNavKeyPress()||d===f.BACKSPACE||(d===f.DELETE&&f.button===-1))){return}if(!Ext.isGecko&&f.isSpecialKey()&&!e){return}if(!this.maskRe.test(e)){f.stopEvent()}},getState:function(){return this.addPropertyToState(this.callParent(),"value")},applyState:function(b){this.callParent(arguments);if(b.hasOwnProperty("value")){this.setValue(b.value)}},getRawValue:function(){var c=this,d=c.callParent();if(d===c.emptyText){d=""}return d},setValue:function(d){var e=this,f=e.inputEl;if(f&&e.emptyText&&!Ext.isEmpty(d)){f.removeCls(e.emptyCls)}e.callParent(arguments);e.applyEmptyText();return e},getErrors:function(l){var q=this,m=q.callParent(arguments),v=q.validator,s=q.emptyText,t=q.allowBlank,r=q.vtype,p=Ext.form.field.VTypes,o=q.regex,n=Ext.String.format,u;l=l||q.processRawValue(q.getRawValue());if(Ext.isFunction(v)){u=v.call(q,l);if(u!==true){m.push(u)}}if(l.length<1||l===s){if(!t){m.push(q.blankText)}return m}if(l.length<q.minLength){m.push(n(q.minLengthText,q.minLength))}if(l.length>q.maxLength){m.push(n(q.maxLengthText,q.maxLength))}if(r){if(!p[r](l,q)){m.push(q.vtypeText||p[r+"Text"])}}if(o&&!o.test(l)){m.push(q.regexText||q.invalidText)}return m},selectText:function(k,j){var l=this,p=l.getRawValue(),o=true,m=l.inputEl.dom,n,i;if(p.length>0){k=k===n?0:k;j=j===n?p.length:j;if(m.setSelectionRange){m.setSelectionRange(k,j)}else{if(m.createTextRange){i=m.createTextRange();i.moveStart("character",k);i.moveEnd("character",j-p.length);i.select()}}o=Ext.isGecko||Ext.isOpera}if(o){l.focus()}},autoSize:function(){var b=this;if(b.grow&&b.rendered){b.autoSizing=true;b.updateLayout()}},afterComponentLayout:function(){var c=this,d;c.callParent();if(c.autoSizing){d=c.inputEl.getWidth();if(d!==c.lastInputWidth){c.fireEvent("autosize",c,d);c.lastInputWidth=d;delete c.autoSizing}}}});Ext.define("Ext.form.field.Trigger",{extend:"Ext.form.field.Text",alias:["widget.triggerfield","widget.trigger"],requires:["Ext.DomHelper","Ext.util.ClickRepeater","Ext.layout.component.field.Trigger"],alternateClassName:["Ext.form.TriggerField","Ext.form.TwinTriggerField","Ext.form.Trigger"],childEls:[{name:"triggerCell",select:"."+Ext.baseCSSPrefix+"trigger-cell"},{name:"triggerEl",select:"."+Ext.baseCSSPrefix+"form-trigger"},"triggerWrap","inputCell"],triggerBaseCls:Ext.baseCSSPrefix+"form-trigger",triggerWrapCls:Ext.baseCSSPrefix+"form-trigger-wrap",hideTrigger:false,editable:true,readOnly:false,repeatTriggerClick:false,autoSize:Ext.emptyFn,monitorTab:true,mimicing:false,triggerIndexRe:/trigger-index-(\d+)/,componentLayout:"triggerfield",initComponent:function(){var d=this,c;if(!d.triggerWidth){Ext.form.field.Trigger.prototype.triggerWidth=(c=Ext.getBody().createChild({style:"position:absolute",cls:Ext.baseCSSPrefix+"form-trigger"})).getWidth();c.remove()}d.wrapFocusCls=d.triggerWrapCls+"-focus";d.callParent(arguments)},getSubTplMarkup:function(){var d=this,c=d.callParent(arguments);return'<table id="'+d.id+'-triggerWrap" class="'+Ext.baseCSSPrefix+'form-trigger-wrap" cellpadding="0" cellspacing="0"><tbody><tr><td id="'+d.id+'-inputCell" class="'+Ext.baseCSSPrefix+'form-trigger-input-cell">'+c+"</td>"+d.getTriggerMarkup()+"</tr></tbody></table>"},getSubTplData:function(){var e=this,h=e.callParent(),g=e.readOnly===true,f=e.editable!==false;return Ext.apply(h,{editableCls:(g||!f)?" "+Ext.baseCSSPrefix+"trigger-noedit":"",readOnly:!f||g})},getLabelableRenderData:function(){var d=this,f=d.triggerWrapCls,e=d.callParent(arguments);return Ext.applyIf(e,{triggerWrapCls:f,triggerMarkup:d.getTriggerMarkup()})},getTriggerMarkup:function(){var l=this,g=0,k=(l.readOnly||l.hideTrigger),i,j=l.triggerBaseCls,h=[];if(!l.trigger1Cls){l.trigger1Cls=l.triggerCls}for(g=0;(i=l["trigger"+(g+1)+"Cls"])||g<1;g++){h.push({tag:"td",valign:"top",cls:Ext.baseCSSPrefix+"trigger-cell",style:"width:"+l.triggerWidth+(k?"px;display:none":"px"),cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+g,j,i].join(" "),role:"button"}})}h[g-1].cn.cls+=" "+j+"-last";return Ext.DomHelper.markup(h)},disableCheck:function(){return !this.disabled},beforeRender:function(){var d=this,c=d.triggerBaseCls;d.callParent();if(c!=Ext.baseCSSPrefix+"form-trigger"){d.addChildEls({name:"triggerEl",select:"."+c})}d.lastTriggerStateFlags=d.getTriggerStateFlags()},onRender:function(){var b=this;b.callParent(arguments);b.doc=Ext.getDoc();b.initTrigger();b.triggerEl.unselectable()},getTriggerWidth:function(){var c=this,d=0;if(c.triggerWrap&&!c.hideTrigger&&!c.readOnly){d=c.triggerEl.getCount()*c.triggerWidth}return d},setHideTrigger:function(b){if(b!=this.hideTrigger){this.hideTrigger=b;this.updateLayout()}},setEditable:function(b){if(b!=this.editable){this.editable=b;this.updateLayout()}},setReadOnly:function(b){if(b!=this.readOnly){this.readOnly=b;this.updateLayout()}},initTrigger:function(){var m=this,l=m.triggerWrap,e=m.triggerEl,r=m.disableCheck,o,p,q,n,k;if(m.repeatTriggerClick){m.triggerRepeater=new Ext.util.ClickRepeater(l,{preventDefault:true,handler:m.onTriggerWrapClick,listeners:{mouseup:m.onTriggerWrapMousup,scope:m},scope:m})}else{m.mon(l,{click:m.onTriggerWrapClick,mouseup:m.onTriggerWrapMousup,scope:m})}e.setVisibilityMode(Ext.Element.DISPLAY);e.addClsOnOver(m.triggerBaseCls+"-over",r,m);o=e.elements;p=o.length;for(n=0;n<p;n++){q=o[n];k=n+1;q.addClsOnOver(m["trigger"+(k)+"Cls"]+"-over",r,m);q.addClsOnClick(m["trigger"+(k)+"Cls"]+"-click",r,m)}e.addClsOnClick(m.triggerBaseCls+"-click",r,m)},onDestroy:function(){var b=this;Ext.destroyMembers(b,"triggerRepeater","triggerWrap","triggerEl");delete b.doc;b.callParent()},onFocus:function(){var b=this;b.callParent(arguments);if(!b.mimicing){b.bodyEl.addCls(b.wrapFocusCls);b.mimicing=true;b.mon(b.doc,"mousedown",b.mimicBlur,b,{delay:10});if(b.monitorTab){b.on("specialkey",b.checkTab,b)}}},checkTab:function(d,c){if(!this.ignoreMonitorTab&&c.getKey()==c.TAB){this.triggerBlur()}},getTriggerStateFlags:function(){var d=this,c=0;if(d.readOnly){c+=1}if(d.editable){c+=2}if(d.hideTrigger){c+=4}return c},onBlur:Ext.emptyFn,mimicBlur:function(b){if(!this.isDestroyed&&!this.bodyEl.contains(b.target)&&this.validateBlur(b)){this.triggerBlur(b)}},triggerBlur:function(c){var d=this;d.mimicing=false;d.mun(d.doc,"mousedown",d.mimicBlur,d);if(d.monitorTab&&d.inputEl){d.un("specialkey",d.checkTab,d)}Ext.form.field.Trigger.superclass.onBlur.call(d,c);if(d.bodyEl){d.bodyEl.removeCls(d.wrapFocusCls)}},validateBlur:function(b){return true},onTriggerWrapClick:function(){var i=this,h,f,g,j;j=arguments[i.triggerRepeater?1:0];if(j&&!i.readOnly&&!i.disabled){h=j.getTarget("."+i.triggerBaseCls,null);f=h&&h.className.match(i.triggerIndexRe);if(f){g=i["onTrigger"+(parseInt(f[1],10)+1)+"Click"]||i.onTriggerClick;if(g){g.call(i,j)}}}},onTriggerWrapMousup:Ext.emptyFn,onTriggerClick:Ext.emptyFn});Ext.define("Ext.resizer.Splitter",{extend:"Ext.Component",requires:["Ext.XTemplate"],uses:["Ext.resizer.SplitterTracker"],alias:"widget.splitter",childEls:["collapseEl"],renderTpl:['<tpl if="collapsible===true">','<div id="{id}-collapseEl" class="',Ext.baseCSSPrefix,"collapse-el ",Ext.baseCSSPrefix,'layout-split-{collapseDir}"> </div>',"</tpl>"],baseCls:Ext.baseCSSPrefix+"splitter",collapsedClsInternal:Ext.baseCSSPrefix+"splitter-collapsed",collapsible:false,collapseOnDblClick:true,defaultSplitMin:40,defaultSplitMax:1000,width:5,height:5,collapseTarget:"next",horizontal:false,vertical:false,getTrackerConfig:function(){return{xclass:"Ext.resizer.SplitterTracker",el:this.el,splitter:this}},beforeRender:function(){var e=this,d=e.getCollapseTarget(),f=e.getCollapseDirection();e.callParent();if(d.collapsed){e.addCls(e.collapsedClsInternal)}e.addCls(e.baseCls+"-"+e.orientation);Ext.applyIf(e.renderData,{collapseDir:f,collapsible:e.collapsible||d.collapsible})},onRender:function(){var b=this;b.callParent(arguments);if(b.performCollapse!==false){if(b.renderData.collapsible){b.mon(b.collapseEl,"click",b.toggleTargetCmp,b)}if(b.collapseOnDblClick){b.mon(b.el,"dblclick",b.toggleTargetCmp,b)}}b.mon(b.getCollapseTarget(),{collapse:b.onTargetCollapse,expand:b.onTargetExpand,scope:b});b.el.unselectable();b.tracker=Ext.create(b.getTrackerConfig());b.relayEvents(b.tracker,["beforedragstart","dragstart","dragend"])},getCollapseDirection:function(){var i=this,l=i.collapseDirection,j,h,g,k;if(!l){j=i.collapseTarget;if(j.isComponent){l=j.collapseDirection}if(!l){k=i.ownerCt.layout.type;if(j.isComponent){g=i.ownerCt.items;h=Number(g.indexOf(j)==g.indexOf(i)-1)<<1|Number(k=="hbox")}else{h=Number(i.collapseTarget=="prev")<<1|Number(k=="hbox")}l=["bottom","right","top","left"][h]}i.collapseDirection=l}i.orientation=(l=="top"||l=="bottom")?"horizontal":"vertical";i[i.orientation]=true;return l},getCollapseTarget:function(){var b=this;return b.collapseTarget.isComponent?b.collapseTarget:b.collapseTarget=="prev"?b.previousSibling():b.nextSibling()},onTargetCollapse:function(b){this.el.addCls([this.collapsedClsInternal,this.collapsedCls])},onTargetExpand:function(b){this.el.removeCls([this.collapsedClsInternal,this.collapsedCls])},toggleTargetCmp:function(i,e){var j=this.getCollapseTarget(),h=j.placeholder,g;if(h&&!h.hidden){g=true}else{g=!j.hidden}if(g){if(j.collapsed){j.expand()}else{if(j.collapseDirection){j.collapse()}else{j.collapse(this.renderData.collapseDir)}}}},setSize:function(){var b=this;b.callParent(arguments);if(Ext.isIE&&b.el){b.el.repaint()}}});Ext.define("Ext.resizer.BorderSplitter",{extend:"Ext.resizer.Splitter",uses:["Ext.resizer.BorderSplitterTracker"],alias:"widget.bordersplitter",collapseTarget:null,getTrackerConfig:function(){var b=this.callParent();b.xclass="Ext.resizer.BorderSplitterTracker";return b}});Ext.define("Ext.layout.container.Border",{alias:"layout.border",extend:"Ext.layout.container.Container",requires:["Ext.resizer.BorderSplitter","Ext.Component","Ext.fx.Anim"],alternateClassName:"Ext.layout.BorderLayout",targetCls:Ext.baseCSSPrefix+"border-layout-ct",itemCls:[Ext.baseCSSPrefix+"border-item",Ext.baseCSSPrefix+"box-item"],type:"border",padding:undefined,percentageRe:/(\d+)%/,axisProps:{horz:{borderBegin:"west",borderEnd:"east",horizontal:true,posProp:"x",sizeProp:"width",sizePropCap:"Width"},vert:{borderBegin:"north",borderEnd:"south",horizontal:false,posProp:"y",sizeProp:"height",sizePropCap:"Height"}},centerRegion:null,collapseDirections:{north:"top",south:"bottom",east:"right",west:"left"},manageMargins:true,panelCollapseAnimate:true,panelCollapseMode:"placeholder",regionWeights:{north:20,south:10,center:0,west:-10,east:-20},beginAxis:function(F,O,i){var x=this,N=x.axisProps[i],A=!N.horizontal,G=N.sizeProp,C=0,P=F.childItems,K=P.length,y,B,D,J,z,L,H,E,M,w,I;for(B=0;B<K;++B){D=P[B];z=D.target;D.layoutPos={};if(z.region){D.region=L=z.region;D.isCenter=z.isCenter;D.isHorz=z.isHorz;D.isVert=z.isVert;D.weight=z.weight||x.regionWeights[L]||0;O[z.id]=D;if(z.isCenter){y=D;J=z.flex;F.centerRegion=y;continue}if(A!==D.isVert){continue}D.reverseWeighting=(L==N.borderEnd);E=z[G];M=typeof E;if(!z.collapsed){if(M=="string"&&(H=x.percentageRe.exec(E))){D.percentage=parseInt(H[1],10)}else{if(z.flex){C+=D.flex=z.flex}}}}}if(y){w=y.target;if(I=w.placeholderFor){if(!J&&A===I.collapsedVertical()){J=0;y.collapseAxis=i}}else{if(w.collapsed&&(A===w.collapsedVertical())){J=0;y.collapseAxis=i}}}if(J==null){J=1}C+=J;return Ext.apply({before:A?"top":"left",totalFlex:C},N)},beginLayout:function(v){var q=this,r=q.getLayoutItems(),u=q.padding,p=typeof u,n=false,i,o,w,s,t,x;if(u){if(p=="string"||p=="number"){u=Ext.util.Format.parseBox(u)}}else{u=v.getEl("getTargetEl").getPaddingInfo();n=true}v.outerPad=u;v.padOnContainer=n;for(s=0,w=r.length;s<w;++s){o=r[s];x=q.getSplitterTarget(o);if(x&&o.hidden!==x.hidden){if(o.hidden){o.show()}else{o.hide()}}}q.callParent(arguments);r=v.childItems;w=r.length;t={};v.borderAxisHorz=q.beginAxis(v,t,"horz");v.borderAxisVert=q.beginAxis(v,t,"vert");for(s=0;s<w;++s){i=r[s];x=q.getSplitterTarget(i.target);if(x){i.collapseTarget=x=t[x.id];i.weight=x.weight;i.reverseWeighting=x.reverseWeighting;x.splitter=i;i.isHorz=x.isHorz;i.isVert=x.isVert}}q.sortWeightedItems(r,"reverseWeighting");q.setupSplitterNeighbors(r)},calculate:function(A){var t=this,D=t.getContainerSize(A),w=A.childItems,B=w.length,C=A.borderAxisHorz,v=A.borderAxisVert,z=A.outerPad,r=A.padOnContainer,x,i,u,q,s,y;C.begin=z.left;v.begin=z.top;s=C.end=C.flexSpace=D.width+(r?z.left:-z.right);y=v.end=v.flexSpace=D.height+(r?z.top:-z.bottom);for(x=0;x<B;++x){i=w[x];u=i.getMarginInfo();if(i.isHorz||i.isCenter){C.addUnflexed(u.width);s-=u.width}if(i.isVert||i.isCenter){v.addUnflexed(u.height);y-=u.height}if(!i.flex&&!i.percentage){if(i.isHorz||(i.isCenter&&i.collapseAxis==="horz")){q=i.getProp("width");C.addUnflexed(q);if(i.collapseTarget){s-=q}}else{if(i.isVert||(i.isCenter&&i.collapseAxis==="vert")){q=i.getProp("height");v.addUnflexed(q);if(i.collapseTarget){y-=q}}}}}for(x=0;x<B;++x){i=w[x];u=i.getMarginInfo();if(i.percentage){if(i.isHorz){q=Math.ceil(s*i.percentage/100);q=i.setWidth(q);C.addUnflexed(q)}else{if(i.isVert){q=Math.ceil(y*i.percentage/100);q=i.setHeight(q);v.addUnflexed(q)}}}}for(x=0;x<B;++x){i=w[x];if(!i.isCenter){t.calculateChildAxis(i,C);t.calculateChildAxis(i,v)}}if(t.finishAxis(A,v)+t.finishAxis(A,C)<2){t.done=false}else{t.finishPositions(w)}},calculateChildAxis:function(l,t){var v=l.collapseTarget,p="set"+t.sizePropCap,r=t.sizeProp,s=l.getMarginInfo()[r],n,u,q,o,m;if(v){n=v.region}else{n=l.region;q=l.flex}u=n==t.borderBegin;if(!u&&n!=t.borderEnd){l[p](t.end-t.begin-s);o=t.begin}else{if(q){m=Math.ceil(t.flexSpace*(q/t.totalFlex));m=l[p](m)}else{if(l.percentage){m=l.peek(r)}else{m=l.getProp(r)}}m+=s;if(u){o=t.begin;t.begin+=m}else{t.end=o=t.end-m}}l.layoutPos[t.posProp]=o},finishAxis:function(g,h){var e=h.end-h.begin,f=g.centerRegion;if(f){f["set"+h.sizePropCap](e-f.getMarginInfo()[h.sizeProp]);f.layoutPos[h.posProp]=h.begin}return Ext.isNumber(e)?1:0},finishPositions:function(g){var h=g.length,e,f;for(e=0;e<h;++e){f=g[e];f.setProp("x",f.layoutPos.x+f.marginInfo.left);f.setProp("y",f.layoutPos.y+f.marginInfo.top)}},getPlaceholder:function(b){return b.getPlaceholder&&b.getPlaceholder()},getSplitterTarget:function(c){var d=c.collapseTarget;if(d&&d.collapsed){return d.placeholder||d}return d},isItemBoxParent:function(b){return true},isItemShrinkWrap:function(b){return true},insertSplitter:function(j,f){var h=j.region,i={xtype:"bordersplitter",collapseTarget:j,id:j.id+"-splitter",hidden:!!j.hidden},g=f+((h=="south"||h=="east")?0:1);if(j.isHorz){i.height=null}else{i.width=null}if(j.collapseMode=="mini"){i.collapsedCls=j.collapsedCls}j.splitter=this.owner.add(g,i)},onAdd:function(j,g){var f=this,h=j.placeholderFor,i=j.region;f.callParent(arguments);if(i){Ext.apply(j,f.regionFlags[i]);if(i=="center"){if(f.centerRegion){Ext.Error.raise("Cannot have multiple center regions in a BorderLayout.")}f.centerRegion=j}else{j.collapseDirection=this.collapseDirections[i];if(j.split&&(j.isHorz||j.isVert)){f.insertSplitter(j,g)}}if(!j.hasOwnProperty("collapseMode")){j.collapseMode=f.panelCollapseMode}if(!j.hasOwnProperty("animCollapse")){if(j.collapseMode!="placeholder"){j.animCollapse=false}else{j.animCollapse=f.panelCollapseAnimate}}}else{if(h){Ext.apply(j,f.regionFlags[h.region]);j.region=h.region;j.weight=h.weight}}},onDestroy:function(){this.centerRegion=null;this.callParent()},onRemove:function(e){var f=this,g=e.region,h=e.splitter;if(g){if(e.isCenter){f.centerRegion=null}delete e.isCenter;delete e.isHorz;delete e.isVert;if(h){f.owner.doRemove(h,true);delete e.splitter}}f.callParent(arguments)},regionFlags:{center:{isCenter:true,isHorz:false,isVert:false},north:{isCenter:false,isHorz:false,isVert:true},south:{isCenter:false,isHorz:false,isVert:true},west:{isCenter:false,isHorz:true,isVert:false},east:{isCenter:false,isHorz:true,isVert:false}},setupSplitterNeighbors:function(q){var i={},v=q.length,j=this.touchedRegions,t,u,z,r,w,s,p,y,x;for(t=0;t<v;++t){s=q[t].target;p=s.region;if(s.isCenter){z=s}else{if(p){x=j[p];for(u=0,r=x.length;u<r;++u){w=i[x[u]];if(w){w.neighbors.push(s)}}if(s.placeholderFor){y=s.placeholderFor.splitter}else{y=s.splitter}if(y){y.neighbors=[]}i[p]=y}}}if(z){x=j.center;for(u=0,r=x.length;u<r;++u){w=i[x[u]];if(w){w.neighbors.push(z)}}}},touchedRegions:{center:["north","south","east","west"],north:["north","east","west"],south:["south","east","west"],east:["east","north","south"],west:["west","north","south"]},sizePolicies:{vert:{setsWidth:1,setsHeight:0},horz:{setsWidth:0,setsHeight:1},flexAll:{setsWidth:1,setsHeight:1}},getItemSizePolicy:function(l){var m=this,i=this.sizePolicies,n,h,k,j;if(l.isCenter){j=l.placeholderFor;if(j){if(j.collapsedVertical()){return i.vert}return i.horz}if(l.collapsed){if(l.collapsedVertical()){return i.vert}return i.horz}return i.flexAll}n=l.collapseTarget;if(n){return n.isVert?i.vert:i.horz}if(l.region){if(l.isVert){h=l.height;k=i.vert}else{h=l.width;k=i.horz}if(l.flex||(typeof h=="string"&&m.percentageRe.test(h))){return i.flexAll}return k}return m.autoSizePolicy}},function(){var d={addUnflexed:function(a){this.flexSpace=Math.max(this.flexSpace-a,0)}},c=this.prototype.axisProps;Ext.apply(c.horz,d);Ext.apply(c.vert,d)});Ext.define("Ext.app.EventBus",{requires:["Ext.util.Event","Ext.Component"],mixins:{observable:"Ext.util.Observable"},constructor:function(){this.mixins.observable.constructor.call(this);this.bus={};var b=this;Ext.override(Ext.Component,{fireEvent:function(a){if(Ext.util.Observable.prototype.fireEvent.apply(this,arguments)!==false){return b.dispatch.call(b,a,this,arguments)}return false}})},dispatch:function(o,s,p){var r=this.bus,n=r[o],u,v,w,i,x,t,q;if(n){for(u in n){if(n.hasOwnProperty(u)&&s.is(u)){v=n[u];for(w in v){if(v.hasOwnProperty(w)){i=v[w];for(t=0,q=i.length;t<q;t++){x=i[t];if(x.fire.apply(x,Array.prototype.slice.call(p,1))===false){return false}}}}}}}return true},control:function(r,t,x){var v=this.bus,u,o,w,y,p,z,q,B,A,s;if(Ext.isString(r)){y=r;r={};r[y]=t;this.control(r,null,x);return}u=Ext.util.Observable.HasListeners.prototype;for(y in r){if(r.hasOwnProperty(y)){A=r[y]||{};for(s in A){if(A.hasOwnProperty(s)){p={};z=A[s];q=x;B=new Ext.util.Event(x,s);if(Ext.isObject(z)){p=z;z=p.fn;q=p.scope||x;delete p.fn;delete p.scope}B.addListener(z,q,p);u[s]=1;o=v[s]||(v[s]={});o=o[y]||(o[y]={});w=o[x.id]||(o[x.id]=[]);w.push(B)}}}}}});Ext.define("Ext.container.AbstractContainer",{extend:"Ext.Component",requires:["Ext.util.MixedCollection","Ext.layout.container.Auto","Ext.ZIndexManager"],renderTpl:"{%this.renderContainer(out,values)%}",suspendLayout:false,autoDestroy:true,defaultType:"panel",detachOnRemove:true,isContainer:true,layoutCounter:0,baseCls:Ext.baseCSSPrefix+"container",bubbleEvents:["add","remove"],initComponent:function(){var b=this;b.addEvents("afterlayout","beforeadd","beforeremove","add","remove");b.callParent();b.getLayout();b.initItems()},initItems:function(){var c=this,d=c.items;c.items=new Ext.util.AbstractMixedCollection(false,c.getComponentId);if(d){if(!Ext.isArray(d)){d=[d]}c.add(d)}},getFocusEl:function(){return this.getTargetEl()},finishRenderChildren:function(){this.callParent();var b=this.getLayout();if(b){b.finishRender()}},beforeRender:function(){var c=this,d=c.getLayout();c.callParent();if(!d.initialized){d.initLayout()}},setupRenderTpl:function(c){var d=this.getLayout();this.callParent(arguments);d.setupRenderTpl(c)},setLayout:function(c){var d=this.layout;if(d&&d.isLayout&&d!=c){d.setOwner(null)}this.layout=c;c.setOwner(this)},getLayout:function(){var b=this;if(!b.layout||!b.layout.isLayout){b.setLayout(Ext.layout.Layout.create(b.layout,b.self.prototype.layout||"autocontainer"))}return b.layout},doLayout:function(){this.updateLayout();return this},afterLayout:function(c){var d=this;++d.layoutCounter;if(d.hasListeners.afterlayout){d.fireEvent("afterlayout",d,c)}},prepareItems:function(f,i){if(Ext.isArray(f)){f=f.slice()}else{f=[f]}var j=0,g=f.length,h;for(;j<g;j++){h=f[j];if(h==null){Ext.Array.erase(f,j,1);--j;--g}else{if(i){h=this.applyDefaults(h)}f[j]=this.lookupComponent(h)}}return f},applyDefaults:function(d){var c=this.defaults;if(c){if(Ext.isFunction(c)){c=c.call(this,d)}if(Ext.isString(d)){d=Ext.ComponentManager.get(d)}Ext.applyIf(d,c)}return d},lookupComponent:function(b){return(typeof b=="string")?Ext.ComponentManager.get(b):Ext.ComponentManager.create(b,this.defaultType)},getComponentId:function(b){return b.getItemId()},add:function(){var o=this,q=Ext.Array.slice(arguments),s=(typeof q[0]=="number")?q.shift():-1,t=o.getLayout(),m,p,u,v,i,n,r;if(q.length==1&&Ext.isArray(q[0])){p=q[0];m=true}else{p=q}r=p=o.prepareItems(p,true);v=p.length;if(o.rendered){Ext.suspendLayouts()}if(!m&&v==1){r=p[0]}for(u=0;u<v;u++){i=p[u];if(!i){Ext.Error.raise("Cannot add null item to Container with itemId/id: "+o.getItemId())}n=(s<0)?o.items.length:(s+u);if(i.floating){i.onAdded(o,n)}else{if((!o.hasListeners.beforeadd||o.fireEvent("beforeadd",o,i,n)!==false)&&o.onBeforeAdd(i)!==false){o.items.insert(n,i);i.onAdded(o,n);o.onAdd(i,n);t.onAdd(i,n);if(o.hasListeners.add){o.fireEvent("add",o,i,n)}}}}o.updateLayout();if(o.rendered){Ext.resumeLayouts(true)}return r},onAdd:Ext.emptyFn,onRemove:Ext.emptyFn,insert:function(c,d){return this.add(c,d)},move:function(e,g){var f=this.items,h;h=f.removeAt(e);if(h===false){return false}f.insert(g,h);this.doLayout();return h},onBeforeAdd:function(f){var d=this,e=f.border;if(f.ownerCt){f.ownerCt.remove(f,false)}if(d.border===false||d.border===0){f.border=Ext.isDefined(e)&&e!==false&&e!==0}},remove:function(f,c){var h=this,g=h.getComponent(f);if(Ext.isDefined(Ext.global.console)&&!g){Ext.global.console.warn("Attempted to remove a component that does not exist. Ext.container.Container: remove takes an argument of the component to remove. cmp.remove() is incorrect usage.")}if(g&&(!h.hasListeners.beforeremove||h.fireEvent("beforeremove",h,g)!==false)){h.doRemove(g,c);if(h.hasListeners.remove){h.fireEvent("remove",h,g)}if(!h.destroying){h.doLayout()}}return g},doRemove:function(l,g){var j=this,k=j.layout,h=k&&j.rendered,i=g===true||(g!==false&&j.autoDestroy);g=g===true||(g!==false&&j.autoDestroy);j.items.remove(l);l.onRemoved(i);if(h){k.onRemove(l)}j.onRemove(l,i);if(i){l.destroy()}else{if(h){k.afterRemove(l)}if(j.detachOnRemove&&l.rendered){Ext.getDetachedBody().appendChild(l.getEl())}}},removeAll:function(n){var j=this,l=j.items.items.slice(),h=[],m=0,i=l.length,k;j.suspendLayouts();for(;m<i;m++){k=l[m];j.remove(k,n);if(k.ownerCt!==j){h.push(k)}}j.resumeLayouts(!!i);return h},getRefItems:function(n){var j=this,m=j.items.items,h=m.length,l=0,k,i=[];for(;l<h;l++){k=m[l];i.push(k);if(n&&k.getRefItems){i.push.apply(i,k.getRefItems(true))}}if(j.floatingItems&&j.floatingItems.accessList){i.push.apply(i,j.floatingItems.accessList)}return i},cascade:function(i,c,t){var m=this,q=m.items?m.items.items:[],p=q.length,r=0,n,o=t?t.concat(m):[m],s=o.length-1;if(i.apply(c||m,o)!==false){for(;r<p;r++){n=q[r];if(n.cascade){n.cascade(i,c,t)}else{o[s]=n;i.apply(c||q,o)}}}return this},isAncestor:function(b){while(b){if(b.ownerCt===this){return true}b=b.ownerCt}},getComponent:function(b){if(Ext.isObject(b)){b=b.getItemId()}return this.items.get(b)},query:function(b){b=b||"*";return Ext.ComponentQuery.query(b,this)},queryBy:function(k,l){var n=[],h=this.getRefItems(true),m=0,i=h.length,j;for(;m<i;++m){j=h[m];if(k.call(l||j,j)!==false){n.push(j)}}return n},queryById:function(b){return this.down("#"+b)},child:function(b){b=b||"";return this.query("> "+b)[0]||null},nextChild:function(h,f){var j=this,g,i=j.items.indexOf(h);if(i!==-1){g=f?Ext.ComponentQuery(f,j.items.items.slice(i+1)):j.items.getAt(i+1);if(!g&&j.ownerCt){g=j.ownerCt.nextChild(j,f)}}return g},prevChild:function(h,f){var j=this,g,i=j.items.indexOf(h);if(i!==-1){g=f?Ext.ComponentQuery(f,j.items.items.slice(i+1)):j.items.getAt(i+1);if(!g&&j.ownerCt){g=j.ownerCt.nextChild(j,f)}}return g},down:function(b){return this.query(b)[0]||null},enable:function(){this.callParent(arguments);var g=this.getChildItemsToDisable(),h=g.length,e,f;for(f=0;f<h;f++){e=g[f];if(e.resetDisable){e.enable()}}},disable:function(){this.callParent(arguments);var g=this.getChildItemsToDisable(),h=g.length,e,f;for(f=0;f<h;f++){e=g[f];if(e.resetDisable!==false&&!e.disabled){e.disable();e.resetDisable=true}}},getChildItemsToDisable:function(){return this.query("[isFormField],button")},beforeLayout:function(){return true},beforeDestroy:function(){var c=this,e=c.items,f;if(e){while((f=e.first())){c.doRemove(f,true)}}Ext.destroy(c.layout);c.callParent()}});Ext.define("Ext.container.Container",{extend:"Ext.container.AbstractContainer",alias:"widget.container",alternateClassName:"Ext.Container",fireHierarchyEvent:function(b){this.hierarchyEventSource.fireEvent(b,this)},afterHide:function(){this.callParent(arguments);this.fireHierarchyEvent("hide")},afterShow:function(){this.callParent(arguments);this.fireHierarchyEvent("show")},getChildByElement:function(l,i){var j,n,h=0,m=this.getRefItems(),k=m.length;l=Ext.getDom(l);for(;h<k;h++){j=m[h];n=j.getEl();if(n&&((n.dom===l)||n.contains(l))){return(i&&j.getChildByElement)?j.getChildByElement(l,i):j}}return null}},function(){this.hierarchyEventSource=this.prototype.hierarchyEventSource=new Ext.util.Observable({events:{hide:true,show:true,collapse:true,expand:true}})});Ext.define("Ext.container.Viewport",{extend:"Ext.container.Container",alias:"widget.viewport",requires:["Ext.EventManager"],alternateClassName:"Ext.Viewport",isViewport:true,ariaRole:"application",preserveElOnDestroy:true,initComponent:function(){var f=this,e=document.body.parentNode,d;Ext.getScrollbarSize();f.width=f.height=undefined;f.callParent(arguments);Ext.fly(e).addCls(Ext.baseCSSPrefix+"viewport");if(f.autoScroll){delete f.autoScroll;Ext.fly(e).setStyle("overflow","auto")}f.el=d=Ext.getBody();d.setHeight=Ext.emptyFn;d.setWidth=Ext.emptyFn;d.setSize=Ext.emptyFn;d.dom.scroll="no";f.allowDomMove=false;f.renderTo=f.el},onRender:function(){var b=this;b.callParent(arguments);b.width=Ext.Element.getViewportWidth();b.height=Ext.Element.getViewportHeight()},afterFirstLayout:function(){var b=this;b.callParent(arguments);setTimeout(function(){Ext.EventManager.onWindowResize(b.fireResize,b)},1)},fireResize:function(c,d){if(c!=this.width||d!=this.height){this.setSize(c,d)}}});Ext.define("Docs.view.Header",{extend:"Ext.container.Container",alias:"widget.docheader",contentEl:"header-content",initComponent:function(){if(Docs.otherProducts){this.style="cursor: pointer;",this.cls="dropdown";this.menu=Ext.create("Ext.menu.Menu",{renderTo:Ext.getBody(),plain:true,items:Docs.otherProducts})}this.callParent()},listeners:{afterrender:function(b){if(this.menu){b.el.addListener("click",function(d,a){this.menu.showBy(this.el,"bl",[120,0])},this)}}}});Ext.define("Docs.view.welcome.Index",{extend:"Ext.container.Container",alias:"widget.welcomeindex",requires:["Docs.ContentGrabber"],cls:"welcome iScroll",initComponent:function(){this.html=Docs.ContentGrabber.get("welcome-content");this.hasContent=!!this.html;this.callParent(arguments)},getTab:function(){return this.hasContent?{cls:"index",href:"#",tooltip:"Home"}:false}});Ext.define("Docs.view.auth.Login",{extend:"Ext.container.Container",alias:"widget.authentication",requires:"Docs.view.auth.LoginHelper",showLoginForm:function(){Docs.view.auth.LoginHelper.renderToHeader(this.getEl())},showLoggedIn:function(b){this.update("Welcome, "+b+' | <a href="#" class="logout">Logout</a>')},showLoggedOut:function(){this.update('<a href="#" class="login">Sign in / Register</a>')}});Ext.define("Docs.view.Comments",{singleton:true,requires:["Docs.view.auth.LoginHelper","Docs.view.auth.Login"],constructor:function(){var g=['<tpl if="num > 0">','View {[values.num == 1 ? "1 comment" : values.num + " comments"]}',"</tpl>",'<tpl if="num == 0">',"No comments. Click to add","</tpl>"];this.numCommentsTpl=Ext.create("Ext.XTemplate",g.join(""));var j=['<div class="comments-div first-child" id="comments-{id}">','<a href="#" class="side toggleComments"><span></span></a>','<a href="#" class="name toggleComments">',g.join(""),"</a>","</div>"];this.loadingTpl=Ext.create("Ext.Template",'<div class="loading">Loading...</div>');this.classCommentsTpl=Ext.create("Ext.XTemplate",'<div class="comments-section">','<h3 class="members-title icon-comment">Comments</h3>',j.join(""),"</div>");this.commentsMetaTpl=Ext.create("Ext.XTemplate",j.join(""));this.memberCommentsTpl=Ext.create("Ext.Template",'<span class="toggleMemberComments">{0}</span>');var h=['<div class="comment" id="{id}">','<div class="com-meta">','<img class="avatar" width="25" height="25" src="http://www.gravatar.com/avatar/{emailHash}','?s=25&r=PG&d=http://www.sencha.com/img/avatar.png">','<div class="author<tpl if="moderator"> moderator" title="Sencha Engineer</tpl>">',"{author}",'<tpl if="showCls">','<span class="target"> on {[this.target(values.target)]}</span>',"</tpl>","<tpl if=\"action == 'problem'\">",'<span class="problem">problem</span>',"</tpl>","</div>",'<tpl if="this.isMod()">','<a href="#" class="readComment <tpl if="read">read</tpl>">Read</a>',"</tpl>",'<tpl if="this.isMod() || this.isAuthor(values.author)"><a href="#" class="editComment">Edit</a><a href="#" class="deleteComment">Delete</a></tpl>','<div class="time" title="{[this.date(values.createdAt)]}">{[this.dateStr(values.createdAt)]}</div>','<div class="vote">','<a href="#" class="voteCommentUp{[values.upVote ? " selected" : ""]}" title="Vote Up"> </a>','<span class="score">{score}</span>','<a href="#" class="voteCommentDown{[values.downVote ? " selected" : ""]}" title="Vote Down"> </a>',"</div>","</div>",'<div class="content">{contentHtml}</div>',"</div>"];var i={dateStr:function(e){try{var l=Math.ceil(Number(new Date())/1000),a=Math.ceil(Number(new Date(e))/1000),c=l-a,b;if(c<60){return"just now"}else{if(c<3600){b=String(Math.ceil(c/(60)));return b+(b=="1"?" minute":" minutes")+" ago"}else{if(c<86400){b=String(Math.ceil(c/(3600)));return b+(b=="1"?" hour":" hours")+" ago"}else{if(c<60*60*24*31){b=String(Math.ceil(c/(60*60*24)));return b+(b=="1"?" day":" days")+" ago"}else{if(c<60*60*24*365){b=String(Math.ceil(c/(60*60*24*31)));return b+(b=="1"?" month":" months")+" ago"}else{return Ext.Date.format(new Date(e),"jS M 'y")}}}}}}catch(d){return""}},date:function(b){try{return Ext.Date.format(new Date(b),"jS F Y g:ia")}catch(a){return""}},isMod:function(){return Docs.App.getController("Auth").currentUser.mod},isAuthor:function(a){return Docs.App.getController("Auth").currentUser.userName==a},target:function(b){var c=b[1],a=b[1],d="#!/api/";if(b[0]=="video"){a="Video "+a;d="#!/video/"}else{if(b[0]=="guide"){a="Guide "+a;d="#!/guide/"}else{if(b[2]!=""){c+="-"+b[2];a+=" "+b[2]}}}return'<a href="'+d+c+'">'+a+"</a>"},recentCommentsPager:Ext.Function.bind(function(b){var a=b[b.length-1];if(a&&a.total_rows){return['<div class="recent-comments-pager">',this.getPagerHtml(a),"</div>"].join("")}else{return""}},this)};this.commentsTpl=Ext.create("Ext.XTemplate",'<div class="comment-list">','<tpl for=".">',h.join(""),"</tpl>",'<div class="new-comment-wrap"></div>',"</div>","{[this.recentCommentsPager(values)]}",i);this.appendCommentsTpl=Ext.create("Ext.XTemplate",'<tpl for=".">',h.join(""),"</tpl>",i);this.commentTpl=Ext.create("Ext.XTemplate",h.join(""),i);var f=['<div class="com-meta">','<img class="avatar" width="25" height="25"',' src="http://www.gravatar.com/avatar/{emailHash}?s=25&r=PG&d=http://www.sencha.com/img/avatar.png">','<div class="author">Logged in as {userName}</div>','<label class="subscribe">','Email updates? <input type="checkbox" class="subscriptionCheckbox" <tpl if="userSubscribed">checked="checked"</tpl> /><span class="sep"> | </span>',"</label>",'<a href="#" class="toggleCommentGuide">Help</a>','<input type="submit" class="sub {[values.updateComment ? "update" : "post"]}Comment" value="{[values.updateComment ? "Update" : "Post"]} comment" />','<tpl if="updateComment">',' or <a href="#" class="cancelUpdateComment">cancel</a>',"</tpl>","</div>",'<div class="commentGuideTxt" style="display: none">',"<ul>","<li>Comments should be an <strong>extension</strong> of the documentation.</li>",'<li>For any <em>questions</em> about code or usage, please use the <a href="http://www.sencha.com/forum" target="_blank">Forum</a>.</li>',"<li>Comments may be edited or deleted at any time by a moderator.</li>",'<li>Avatars can be managed at <a href="http://www.gravatar.com" target="_blank">Gravatar</a> (use your forum email address).</li>',"<li>Comments will be formatted using the Markdown syntax, eg:</li>","</ul>",'<div class="markdown preview">',"<h4>Markdown</h4>","<pre>","Here is a **bold** item\n","Here is an _italic_ item\n","Here is an `inline` code snippet\n","Here is a [Link](#!/api)\n","\n"," Indent with 4 spaces\n"," for a code snippet\n","\n","1. Here is a numbered list\n","2. Second numbered list item\n","\n","- Here is an unordered list\n","- Second unordered list item\n","\n","End a line with two spaces\n","to create a line break\n","</pre>","</div>",'<div class="markdown result">',"<h4>Result</h4>","Here is a <strong>bold</strong> item<br/>","Here is an <em>italic</em> item<br/>","Here is an <code>inline</code> code snippet<br/>",'Here is a <a href="#!/api">Link</a><br/>',"<pre>","Indent with 4 spaces\n","for a code snippet","</pre>","<ol>","<li>Here is a numbered list</li>","<li>Second numbered list item</li>","</ol>","<ul>","<li>Here is an unordered list</li>","<li>Second unordered list item</li>","</ul>","End a line with two spaces<br/>to create a line break<br/><br/>","</div>","</div>"];this.loggedInCommentTpl=Ext.create("Ext.XTemplate",'<div class="new-comment{[values.hide ? "" : " open"]}">','<form class="newCommentForm">','<span class="action">',"Action: ",'<select class="commentAction">','<option value="comment">Post a comment</option>','<option value="question">Ask a question</option>','<option value="problem">Report a problem</option>',"</select>","</span>",'<div class="note question" style="display: none;">','Please use the <a href="http://www.sencha.com/forum" target="_blank">Sencha Forum</a> ',"to post questions. Questions posted on the Documentation may be deleted.</div>",'<div class="note problem" style="display: none;">',"<p>Please inform us of documentation problems:</p>","<ul>","<li>Typos</li>","<li>Incorrect information</li>","<li>Errors with examples</li>","</ul>",'<p>For <b>SDK bugs</b>, please use the <a href="http://www.sencha.com/forum" target="_blank">Sencha Forum</a>.<br />',' For Docs App bugs, please use the <a href="https://github.com/senchalabs/jsduck/issues" target="_blank">GitHub Issue tracker</a>.</p>',"</div>",'<div class="postCommentWrap">',"<textarea></textarea>",f.join(""),"</div>","</form>","</div>");this.editCommentTpl=Ext.create("Ext.XTemplate",'<form class="editCommentForm">','<span class="action">Edit comment</span>',"<textarea>{content}</textarea>",f.join(""),"</form>")},getPagerHtml:function(h){var e=h.total_rows;var f=h.offset+h.limit;var g=Math.min(h.limit,e-f);if(e>f){return["<span></span>",'<a href="#" class="fetchMoreComments" rel="'+f+'">',"Showing comments 1-"+f+" of "+e+". ","Click to load "+g+" more...","</a>"].join("")}else{return"<span></span>That's all. Total "+e+" comments."}},renderClassCommentContainers:function(b){this.getClassToolbar().showCommentCount();this.classCommentsTpl.insertFirst(Ext.query(".members")[0],{num:0,id:"class-"+b.name.replace(/\./g,"-")});Ext.Array.each(Ext.query(".member .long"),function(a){var d=Ext.get(a).up(".member").getAttribute("id");this.commentsMetaTpl.append(a,{num:0,id:"class-"+b.name.replace(/\./g,"-")+"-"+d.replace(/\./g,"-")})},this)},updateClassCommentMeta:function(c){var d=Docs.commentMeta["class"][c];if(d&&d[""]){this.getClassToolbar().setCommentCount(d[""]);this.numCommentsTpl.overwrite(Ext.get(Ext.query(".comments-section a.name")[0]),{num:d[""]})}else{this.getClassToolbar().setCommentCount(0);this.numCommentsTpl.overwrite(Ext.get(Ext.query(".comments-section a.name")[0]),{num:0})}Ext.Array.each(Ext.query(".member"),function(k){var b=Ext.get(k),p=b.getAttribute("id"),a=b.down(".meta .defined-in").getAttribute("rel"),m=b.down(".comments-div a.name"),l=b.down(".title"),n=Docs.commentMeta["class"][a]&&Docs.commentMeta["class"][a][p],o=l.down(".toggleMemberComments");if(n){this.numCommentsTpl.overwrite(m,{num:n});if(o){o.update(String(n))}else{this.memberCommentsTpl.append(l,[n])}}else{if(o){o.remove()}}},this);this.updateClassIndex();Ext.Array.each(Ext.ComponentQuery.query("hovermenu"),function(a){a.fireEvent("refresh",this)})},getClassToolbar:function(){return Ext.ComponentQuery.query("classoverview toolbar")[0]},updateGuideCommentMeta:function(d){var c=Docs.commentMeta.guide[d];this.numCommentsTpl.overwrite(Ext.get(Ext.query("#guide .comments-section a.name")[0]),{num:c&&c[""]?c[""]:0})},updateVideoCommentMeta:function(d){var c=Docs.commentMeta.video[d];this.numCommentsTpl.overwrite(Ext.get(Ext.query("#video .comments-section a.name")[0]),{num:c&&c[""]?c[""]:0})},renderHoverMenuMeta:function(b){Ext.Array.each(b.query("a.docClass"),function(k){var l="comments-class-"+k.getAttribute("rel").replace(/[^A-Za-z\-]/g,"-"),a=Ext.get(k),h=a.down(".toggleMemberComments"),j=Docs.commentMeta.idMap[l];if(j&&Docs.commentMeta[j[0]]&&Docs.commentMeta[j[0]][j[1]]){var i=Docs.commentMeta[j[0]][j[1]][j[2]];if(h){if(!i){h.remove()}else{h.update(String(i))}}else{if(i){this.memberCommentsTpl.append(k,[i||0])}}}},this)},updateClassIndex:function(){for(var e in Docs.commentMeta["class"]){var d=Ext.get(Ext.query('#classindex a[rel="'+e+'"]')[0]);if(d){var f=d.down(".toggleMemberComments");if(f){f.update(String(Docs.commentMeta["class"][e]["total"]))}else{Docs.view.Comments.memberCommentsTpl.append(d,[String(Docs.commentMeta["class"][e]["total"])])}}}},renderNewCommentForms:function(){var b=Docs.App.getController("Auth").currentUser;Ext.Array.each(Ext.query(".new-comment-wrap"),function(f){var h=Ext.get(f).up(".comment-list").parent().hasCls("hideCommentForm");if(h){}else{if(Docs.App.getController("Auth").isLoggedIn()){var g=this.loggedInCommentTpl.overwrite(f,b,true),a=g.down("textarea").dom;this.makeCodeMirror(a,g)}else{Docs.view.auth.LoginHelper.renderToComments(f)}}},this)},makeCodeMirror:function(e,d){e.editor=CodeMirror.fromTextArea(e,{mode:"markdown",lineWrapping:true,indentUnit:4});var f=(d&&d.down(".commentAction"));if(f){f.on("change",function(c,b){var a=Ext.get(b).getValue();d.select(".note").setStyle({display:"none"});if(a==="question"){d.down(".postCommentWrap").setStyle({display:"none"});d.down(".note.question").setStyle({display:"block"})}else{if(a==="problem"){d.down(".postCommentWrap").setStyle({display:"block"});d.down(".note.problem").setStyle({display:"block"})}else{d.down(".postCommentWrap").setStyle({display:"block"})}}})}},showMember:function(f,g){var e=Ext.get(g).down(".long"),h=("class-"+f+"-"+g).replace(/\./g,"-");if(!e.hasCls("renderedComment")){this.commentsMetaTpl.append(e,{num:0,id:h});e.addCls("renderedComment");Docs.App.getController("CommentsMeta").commentIdMap["comments-"+h]=["class",f,g]}}});Ext.define("Docs.view.cls.Index",{extend:"Ext.container.Container",alias:"widget.classindex",requires:["Docs.ContentGrabber"],mixins:["Docs.view.Scrolling"],cls:"class-categories iScroll",margin:"15 10",autoScroll:true,initComponent:function(){this.tpl=new Ext.XTemplate('<h1 class="top" style="padding-bottom: 10px">API Documentation</h1>','<tpl if="notice">','<div class="notice">{notice}</div>',"</tpl>","{categories}");this.data={notice:Docs.ContentGrabber.get("notice-text"),categories:Docs.ContentGrabber.get("categories-content")};this.callParent(arguments)},getTab:function(){var b=(Docs.data.classes||[]).length>0;return b?{cls:"classes",href:"#!/api",tooltip:"API Documentation"}:false}});Ext.define("Docs.view.examples.Container",{extend:"Ext.container.Container",alias:"widget.examplecontainer",layout:"fit",initComponent:function(){this.tpl=new Ext.XTemplate('<iframe style="width: 100%; height: 100%; border: 0;" src="{url}"></iframe>');this.callParent(arguments)},load:function(b){this.update(this.tpl.apply(b))},clear:function(){this.update("")}});Ext.define("Docs.view.cls.Header",{extend:"Ext.container.Container",padding:"10 0 17 0",height:55,alias:"widget.classheader",cls:"classheader",initComponent:function(){this.tpl=Ext.create("Ext.XTemplate",'<h1 class="{[this.getClass(values)]}">','<tpl if="private">','<span class="private">Private</span>',"</tpl>",'<tpl if="Docs.data.source">','<a href="#" class="class-source-link">{name}','<span class="class-source-tip">View source...</span>',"</a>","<tpl else>",'<strong class="class-source-link">{name}</strong>',"</tpl>",'<tpl if="singleton">',"<span>singleton</span>","</tpl>","{[this.renderAliases(values.aliases)]}","</h1>",'<tpl if="Docs.data.showPrintButton">','<a class="print" href="?print=/api/{name}" target="_blank">Print</a>',"</tpl>",{getClass:function(b){if(b.singleton){return"singleton"}else{if(b.component){return"component"}else{return"class"}}},renderAliases:function(e){var f={widget:"xtype",plugin:"ptype",feature:"ftype"};var d=[];e&&Ext.Object.each(e,function(a,b){d.push((f[a]||a)+": "+b.join(", "))});if(d.length>0){return"<span>"+d.join(", ")+"</span>"}else{return""}}});if(Docs.data.source){this.on("render",this.initSourceLink,this)}this.callParent()},initSourceLink:function(){this.classLinkEvent("click",function(){var d=this.loadedCls.files;if(d.length===1){window.open("source/"+d[0].href)}else{var c=this.createFileMenu(d);c.showBy(this,undefined,[58,-20])}},this);this.classLinkEvent("mouseover",function(){this.el.down(".class-source-tip").addCls("hover")},this);this.classLinkEvent("mouseout",function(){this.el.down(".class-source-tip").removeCls("hover")},this)},classLinkEvent:function(d,e,f){this.el.on(d,e,f,{preventDefault:true,delegate:"a.class-source-link"})},createFileMenu:function(b){return new Ext.menu.Menu({items:Ext.Array.map(b,function(a){return{text:a.filename,handler:function(){window.open("source/"+a.href)}}},this)})},load:function(b){this.loadedCls=b;this.update(this.tpl.apply(b))}});Ext.define("Ext.panel.Header",{extend:"Ext.container.Container",uses:["Ext.panel.Tool","Ext.draw.Component","Ext.util.CSS","Ext.layout.component.Body","Ext.Img"],alias:"widget.header",isHeader:true,defaultType:"tool",indicateDrag:false,weight:-1,componentLayout:"body",titleAlign:"left",childEls:["body"],renderTpl:['<div id="{id}-body" class="{baseCls}-body {bodyCls}','<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}"</tpl>','<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values)%}","</div>"],headingTpl:'<span id="{id}-textEl" class="{cls}-text {cls}-text-{ui}">{title}</span>',shrinkWrap:3,initComponent:function(){var g=this,j,k,h,l,i;g.addEvents("click","dblclick");g.indicateDragCls=g.baseCls+"-draggable";g.title=g.title||" ";g.tools=g.tools||[];g.items=g.items||[];g.orientation=g.orientation||"horizontal";g.dock=(g.dock)?g.dock:(g.orientation=="horizontal")?"top":"left";g.addClsWithUI([g.orientation,g.dock]);if(g.indicateDrag){g.addCls(g.indicateDragCls)}if(!Ext.isEmpty(g.iconCls)||!Ext.isEmpty(g.icon)){g.initIconCmp();g.items.push(g.iconCmp)}if(g.orientation=="vertical"){g.layout={type:"vbox",align:"center"};g.textConfig={width:16,cls:g.baseCls+"-text",type:"text",text:g.title,rotate:{degrees:90}};l=g.ui;if(Ext.isArray(l)){l=l[0]}j="."+g.baseCls+"-text-"+l;if(Ext.scopeResetCSS){j="."+Ext.baseCSSPrefix+"reset "+j}k=Ext.util.CSS.getRule(j);if(k){h=k.style}else{h=(i=Ext.getBody().createChild({style:"position:absolute",cls:g.baseCls+"-text-"+l})).getStyles("fontFamily","fontWeight","fontSize","color");i.remove()}if(h){Ext.apply(g.textConfig,{"font-family":h.fontFamily,"font-weight":h.fontWeight,"font-size":h.fontSize,fill:h.color})}g.titleCmp=new Ext.draw.Component({width:16,ariaRole:"heading",focusable:false,viewBox:false,flex:1,id:g.id+"_hd",autoSize:true,items:g.textConfig,xhooks:{setSize:function(a){this.callParent([a])}},childEls:[{name:"textEl",select:"."+g.baseCls+"-text"}]})}else{g.layout={type:"hbox",align:"middle"};g.titleCmp=new Ext.Component({ariaRole:"heading",focusable:false,noWrap:true,flex:1,id:g.id+"_hd",style:"text-align:"+g.titleAlign,cls:g.baseCls+"-text-container",renderTpl:g.getTpl("headingTpl"),renderData:{title:g.title,cls:g.baseCls,ui:g.ui},childEls:["textEl"]})}g.items.push(g.titleCmp);g.items=g.items.concat(g.tools);g.callParent();g.on({dblclick:g.onDblClick,click:g.onClick,element:"el",scope:g})},initIconCmp:function(){var c=this,d={focusable:false,src:Ext.BLANK_IMAGE_URL,cls:[c.baseCls+"-icon",c.iconCls],id:c.id+"-iconEl",iconCls:c.iconCls};if(!Ext.isEmpty(c.icon)){delete d.iconCls;d.src=c.icon}c.iconCmp=new Ext.Img(d)},afterRender:function(){this.el.unselectable();this.callParent()},addUIClsToElement:function(g){var j=this,h=j.callParent(arguments),k=[j.baseCls+"-body-"+g,j.baseCls+"-body-"+j.ui+"-"+g],i,l;if(j.bodyCls){i=j.bodyCls.split(" ");for(l=0;l<k.length;l++){if(!Ext.Array.contains(i,k[l])){i.push(k[l])}}j.bodyCls=i.join(" ")}else{j.bodyCls=k.join(" ")}return h},removeUIClsFromElement:function(g){var j=this,h=j.callParent(arguments),k=[j.baseCls+"-body-"+g,j.baseCls+"-body-"+j.ui+"-"+g],i,l;if(j.bodyCls){i=j.bodyCls.split(" ");for(l=0;l<k.length;l++){Ext.Array.remove(i,k[l])}j.bodyCls=i.join(" ")}return h},addUIToElement:function(){var d=this,f,e;d.callParent(arguments);e=d.baseCls+"-body-"+d.ui;if(d.rendered){if(d.bodyCls){d.body.addCls(d.bodyCls)}else{d.body.addCls(e)}}else{if(d.bodyCls){f=d.bodyCls.split(" ");if(!Ext.Array.contains(f,e)){f.push(e)}d.bodyCls=f.join(" ")}else{d.bodyCls=e}}if(d.titleCmp&&d.titleCmp.rendered&&d.titleCmp.textEl){d.titleCmp.textEl.addCls(d.baseCls+"-text-"+d.ui)}},removeUIFromElement:function(){var d=this,f,e;d.callParent(arguments);e=d.baseCls+"-body-"+d.ui;if(d.rendered){if(d.bodyCls){d.body.removeCls(d.bodyCls)}else{d.body.removeCls(e)}}else{if(d.bodyCls){f=d.bodyCls.split(" ");Ext.Array.remove(f,e);d.bodyCls=f.join(" ")}else{d.bodyCls=e}}if(d.titleCmp&&d.titleCmp.rendered&&d.titleCmp.textEl){d.titleCmp.textEl.removeCls(d.baseCls+"-text-"+d.ui)}},onClick:function(b){this.fireClickEvent("click",b)},onDblClick:function(b){this.fireClickEvent("dblclick",b)},fireClickEvent:function(e,f){var d="."+Ext.panel.Tool.prototype.baseCls;if(!f.getTarget(d)){this.fireEvent(e,this,f)}},getFocusEl:function(){return this.el},getTargetEl:function(){return this.body||this.frameBody||this.el},setTitle:function(g){var h=this,e,f;if(h.rendered){if(h.titleCmp.rendered){if(h.titleCmp.surface){h.title=g||"";e=h.titleCmp.surface.items.items[0];f=h.titleCmp.surface;f.remove(e);h.textConfig.type="text";h.textConfig.text=g;e=f.add(h.textConfig);e.setAttributes({rotate:{degrees:90}},true);h.titleCmp.autoSizeSurface()}else{h.title=g;h.titleCmp.textEl.update(h.title||" ")}h.titleCmp.updateLayout()}else{h.titleCmp.on({render:function(){h.setTitle(g)},single:true})}}else{h.title=g}},getMinWidth:function(){var j=this,k=j.titleCmp.textEl.dom,h,i=j.tools,g,l;k.style.display="inline";h=k.offsetWidth;k.style.display="";if(i&&(g=i.length)){for(l=0;l<g;l++){if(i[l].el){h+=i[l].el.dom.offsetWidth}}}if(j.iconCmp){h+=j.iconCmp.el.dom.offsetWidth}return h+10},setIconCls:function(f){var e=this,g=!f||!f.length,h=e.iconCmp;e.iconCls=f;if(!e.iconCmp&&!g){e.initIconCmp();e.insert(0,e.iconCmp)}else{if(h){if(g){e.iconCmp.destroy();delete e.iconCmp}else{h.removeCls(h.iconCls);h.addCls(f);h.iconCls=f}}}},setIcon:function(f){var e=this,g=!f||!f.length,h=e.iconCmp;e.icon=f;if(!e.iconCmp&&!g){e.initIconCmp();e.insert(0,e.iconCmp)}else{if(h){if(g){e.iconCmp.destroy();delete e.iconCmp}else{h.setSrc(e.icon)}}}},addTool:function(b){this.tools.push(this.add(b))},onAdd:function(c,d){this.callParent(arguments);if(c instanceof Ext.panel.Tool){c.bindTo(this.ownerCt);this.tools[c.type]=c}},initRenderData:function(){return Ext.applyIf(this.callParent(),{bodyCls:this.bodyCls})}});Ext.define("Ext.button.Button",{alias:"widget.button",extend:"Ext.Component",requires:["Ext.menu.Manager","Ext.util.ClickRepeater","Ext.layout.component.Button","Ext.util.TextMetrics","Ext.util.KeyMap"],alternateClassName:"Ext.Button",isButton:true,componentLayout:"button",hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",textAlign:"center",type:"button",clickEvent:"click",preventDefault:true,handleMouseEvents:true,tooltipType:"qtip",baseCls:Ext.baseCSSPrefix+"btn",pressedCls:"pressed",overCls:"over",focusCls:"focus",menuActiveCls:"menu-active",hrefTarget:"_blank",border:true,childEls:["btnEl","btnWrap","btnInnerEl","btnIconEl"],renderTpl:['<em id="{id}-btnWrap"<tpl if="splitCls"> class="{splitCls}"</tpl>>','<tpl if="href">','<a id="{id}-btnEl" href="{href}" class="{btnCls}" target="{hrefTarget}"','<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>',' role="link">','<span id="{id}-btnInnerEl" class="{baseCls}-inner">',"{text}","</span>",'<span id="{id}-btnIconEl" class="{baseCls}-icon {iconCls}"<tpl if="iconUrl"> style="background-image:url({iconUrl})"</tpl>></span>',"</a>","<tpl else>",'<button id="{id}-btnEl" type="{type}" class="{btnCls}" hidefocus="true"','<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>',' role="button" autocomplete="off">','<span id="{id}-btnInnerEl" class="{baseCls}-inner" style="{innerSpanStyle}">',"{text}","</span>",'<span id="{id}-btnIconEl" class="{baseCls}-icon {iconCls}"<tpl if="iconUrl"> style="background-image:url({iconUrl})"</tpl>></span>',"</button>","</tpl>","</em>",'<tpl if="closable">','<a id="{id}-closeEl" href="#" class="{baseCls}-close-btn" title="{closeText}"></a>',"</tpl>"],scale:"small",allowedScales:["small","medium","large"],iconAlign:"left",arrowAlign:"right",arrowCls:"arrow",maskOnDisable:false,persistentPadding:undefined,shrinkWrap:3,frame:true,initComponent:function(){var b=this;b.callParent(arguments);b.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout");if(b.menu){b.split=true;b.menu=Ext.menu.Manager.get(b.menu);b.menu.ownerButton=b}if(b.url){b.href=b.url}if(b.href&&!b.hasOwnProperty("preventDefault")){b.preventDefault=false}if(Ext.isString(b.toggleGroup)){b.enableToggle=true}},getActionEl:function(){return this.btnEl},getFocusEl:function(){return this.inOnFocus?this.el:this.btnEl},onFocus:function(c){var d=this;d.inOnFocus=true;d.callParent(arguments);d.inOnFocus=false},onBlur:function(h){var e=this,f=e.focusCls,g=e.getEl();if(e.destroying){return}e.beforeBlur(h);if(f&&g){g.removeCls(e.removeClsWithUI(f,true))}if(e.validateOnBlur){e.validate()}e.hasFocus=false;e.fireEvent("blur",e,h);e.postBlur(h)},setComponentCls:function(){var c=this,d=c.getComponentCls();if(!Ext.isEmpty(c.oldCls)){c.removeClsWithUI(c.oldCls);c.removeClsWithUI(c.pressedCls)}c.oldCls=d;c.addClsWithUI(d)},getComponentCls:function(){var c=this,d=[];if(c.iconCls||c.icon){if(c.text){d.push("icon-text-"+c.iconAlign)}else{d.push("icon")}}else{if(c.text){d.push("noicon")}}if(c.pressed){d.push(c.pressedCls)}return d},beforeRender:function(){var b=this;b.callParent();b.oldCls=b.getComponentCls();b.addClsWithUI(b.oldCls);Ext.applyIf(b.renderData,b.getTemplateArgs());if(b.scale){b.setScale(b.scale)}},onRender:function(){var f=this,e,d;f.doc=Ext.getDoc();f.callParent(arguments);if(f.split&&f.arrowTooltip){f.arrowEl.dom.setAttribute(f.getTipAttr(),f.arrowTooltip)}e=f.el;if(f.tooltip){f.setTooltip(f.tooltip,true)}if(f.handleMouseEvents){d={scope:f,mouseover:f.onMouseOver,mouseout:f.onMouseOut,mousedown:f.onMouseDown};if(f.split){d.mousemove=f.onMouseMove}}else{d={scope:f}}if(f.menu){f.mon(f.menu,{scope:f,show:f.onMenuShow,hide:f.onMenuHide});f.keyMap=new Ext.util.KeyMap({target:f.el,key:Ext.EventObject.DOWN,handler:f.onDownKey,scope:f})}if(f.repeat){f.mon(new Ext.util.ClickRepeater(e,Ext.isObject(f.repeat)?f.repeat:{}),"click",f.onRepeatClick,f)}else{d[f.clickEvent]=f.onClick}f.mon(e,d);Ext.ButtonToggleManager.register(f)},getTemplateArgs:function(){var f=this,d=f.getPersistentPadding(),e="";if(Math.max.apply(Math,d)>0){e="margin:"+Ext.Array.map(d,function(a){return -a+"px"}).join(" ")}return{href:f.getHref(),disabled:f.disabled,hrefTarget:f.hrefTarget,type:f.type,btnCls:f.getBtnCls(),splitCls:f.getSplitCls(),iconUrl:f.icon,iconCls:f.iconCls,text:f.text||" ",tabIndex:f.tabIndex,innerSpanStyle:e}},getHref:function(){var d=this,c=Ext.apply({},d.baseParams);c=Ext.apply(c,d.params);return d.href?Ext.urlAppend(d.href,Ext.Object.toQueryString(c)):false},setParams:function(b){this.params=b;this.btnEl.dom.href=this.getHref()},getSplitCls:function(){var b=this;return b.split?(b.baseCls+"-"+b.arrowCls)+" "+(b.baseCls+"-"+b.arrowCls+"-"+b.arrowAlign):""},getBtnCls:function(){return this.textAlign?this.baseCls+"-"+this.textAlign:""},setIconCls:function(e){var g=this,f=g.btnIconEl,h=g.iconCls;g.iconCls=e;if(f){f.removeCls(h);f.addCls(e||"");g.setComponentCls();if(g.didIconStateChange(h,e)){g.updateLayout()}}return g},setTooltip:function(f,e){var d=this;if(d.rendered){if(!e){d.clearTip()}if(Ext.isObject(f)){Ext.tip.QuickTipManager.register(Ext.apply({target:d.btnEl.id},f));d.tooltip=f}else{d.btnEl.dom.setAttribute(d.getTipAttr(),f)}}else{d.tooltip=f}return d},setTextAlign:function(f){var d=this,e=d.btnEl;if(e){e.removeCls(d.baseCls+"-"+d.textAlign);e.addCls(d.baseCls+"-"+f)}d.textAlign=f;return d},getTipAttr:function(){return this.tooltipType=="qtip"?"data-qtip":"title"},getRefItems:function(e){var f=this.menu,d;if(f){d=f.getRefItems(e);d.unshift(f)}return d||[]},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.btnEl)}},beforeDestroy:function(){var b=this;if(b.rendered){b.clearTip()}if(b.menu&&b.destroyMenu!==false){Ext.destroy(b.menu)}Ext.destroy(b.btnInnerEl,b.repeater);b.callParent()},onDestroy:function(){var b=this;if(b.rendered){b.doc.un("mouseover",b.monitorMouseOver,b);b.doc.un("mouseup",b.onMouseUp,b);delete b.doc;Ext.ButtonToggleManager.unregister(b);Ext.destroy(b.keyMap);delete b.keyMap}b.callParent()},setHandler:function(c,d){this.handler=c;this.scope=d;return this},setText:function(c){var d=this;d.text=c;if(d.rendered){d.btnInnerEl.update(c||" ");d.setComponentCls();if(Ext.isStrict&&Ext.isIE8){d.el.repaint()}d.updateLayout()}return d},setIcon:function(e){var h=this,f=h.btnIconEl,g=h.icon;h.icon=e;if(f){f.setStyle("background-image",e?"url("+e+")":"");h.setComponentCls();if(h.didIconStateChange(g,e)){h.updateLayout()}}return h},didIconStateChange:function(e,f){var d=Ext.isEmpty(f);return Ext.isEmpty(e)?!d:d},getText:function(){return this.text},toggle:function(f,e){var d=this;f=f===undefined?!d.pressed:!!f;if(f!==d.pressed){if(d.rendered){d[f?"addClsWithUI":"removeClsWithUI"](d.pressedCls)}d.pressed=f;if(!e){d.fireEvent("toggle",d,f);Ext.callback(d.toggleHandler,d.scope||d,[d,f])}}return d},maybeShowMenu:function(){var b=this;if(b.menu&&!b.hasVisibleMenu()&&!b.ignoreNextClick){b.showMenu()}},showMenu:function(){var b=this;if(b.rendered&&b.menu){if(b.tooltip&&b.getTipAttr()!="title"){Ext.tip.QuickTipManager.getQuickTip().cancelShow(b.btnEl)}if(b.menu.isVisible()){b.menu.hide()}b.menu.showBy(b.el,b.menuAlign,((!Ext.isStrict&&Ext.isIE)||Ext.isIE6)?[-2,-2]:undefined)}return b},hideMenu:function(){if(this.hasVisibleMenu()){this.menu.hide()}return this},hasVisibleMenu:function(){var b=this.menu;return b&&b.rendered&&b.isVisible()},onRepeatClick:function(d,c){this.onClick(c)},onClick:function(c){var d=this;if(d.preventDefault||(d.disabled&&d.getHref())&&c){c.preventDefault()}if(c.button!==0){return}if(!d.disabled){d.doToggle();d.maybeShowMenu();d.fireHandler(c)}},fireHandler:function(f){var d=this,e=d.handler;if(d.fireEvent("click",d,f)!==false){if(e){e.call(d.scope||d,d,f)}d.blur()}},doToggle:function(){var b=this;if(b.enableToggle&&(b.allowDepress!==false||!b.pressed)){b.toggle()}},onMouseOver:function(c){var d=this;if(!d.disabled&&!c.within(d.el,true,true)){d.onMouseEnter(c)}},onMouseOut:function(c){var d=this;if(!c.within(d.el,true,true)){if(d.overMenuTrigger){d.onMenuTriggerOut(c)}d.onMouseLeave(c)}},onMouseMove:function(i){var k=this,l=k.el,j=k.overMenuTrigger,e,h;if(k.split){if(k.arrowAlign==="right"){e=i.getX()-l.getX();h=l.getWidth()}else{e=i.getY()-l.getY();h=l.getHeight()}if(e>(h-k.getTriggerSize())){if(!j){k.onMenuTriggerOver(i)}}else{if(j){k.onMenuTriggerOut(i)}}}},getTriggerSize:function(){var h=this,j=h.triggerSize,f,g,i;if(j===i){f=h.arrowAlign;g=f.charAt(0);j=h.triggerSize=h.el.getFrameWidth(g)+h.btnWrap.getFrameWidth(g)+h.frameSize[f]}return j},onMouseEnter:function(c){var d=this;d.addClsWithUI(d.overCls);d.fireEvent("mouseover",d,c)},onMouseLeave:function(c){var d=this;d.removeClsWithUI(d.overCls);d.fireEvent("mouseout",d,c)},onMenuTriggerOver:function(c){var d=this;d.overMenuTrigger=true;d.fireEvent("menutriggerover",d,d.menu,c)},onMenuTriggerOut:function(c){var d=this;delete d.overMenuTrigger;d.fireEvent("menutriggerout",d,d.menu,c)},enable:function(d){var c=this;c.callParent(arguments);if(c.btnEl){c.btnEl.dom.disabled=false}c.removeClsWithUI("disabled");return c},disable:function(d){var c=this;c.callParent(arguments);if(c.btnEl){c.btnEl.dom.disabled=true}c.addClsWithUI("disabled");c.removeClsWithUI(c.overCls);if(c.btnInnerEl&&(Ext.isIE6||Ext.isIE7)){c.btnInnerEl.repaint()}return c},setScale:function(f){var e=this,d=e.ui.replace("-"+e.scale,"");if(!Ext.Array.contains(e.allowedScales,f)){throw ("#setScale: scale must be an allowed scale ("+e.allowedScales.join(", ")+")")}e.scale=f;e.setUI(d)},setUI:function(c){var d=this;if(d.scale&&!c.match(d.scale)){c=c+"-"+d.scale}d.callParent([c])},onMouseDown:function(c){var d=this;if(!d.disabled&&c.button===0){d.addClsWithUI(d.pressedCls);d.doc.on("mouseup",d.onMouseUp,d)}},onMouseUp:function(c){var d=this;if(c.button===0){if(!d.pressed){d.removeClsWithUI(d.pressedCls)}d.doc.un("mouseup",d.onMouseUp,d)}},onMenuShow:function(c){var d=this;d.ignoreNextClick=0;d.addClsWithUI(d.menuActiveCls);d.fireEvent("menushow",d,d.menu)},onMenuHide:function(c){var d=this;d.removeClsWithUI(d.menuActiveCls);d.ignoreNextClick=Ext.defer(d.restoreClick,250,d);d.fireEvent("menuhide",d,d.menu)},restoreClick:function(){this.ignoreNextClick=0},onDownKey:function(){var b=this;if(!b.disabled){if(b.menu){b.showMenu()}}},getPersistentPadding:function(){var k=this,j=k.persistentPadding,g,h,l,i;if(!j){j=k.self.prototype.persistentPadding=[0,0,0,0];if(!Ext.isIE){g=new Ext.button.Button({text:"test",style:"position:absolute;top:-999px;"});g.el=Ext.DomHelper.append(Ext.getBody(),g.getRenderTree(),true);g.applyChildEls(g.el);l=g.btnEl;i=g.btnInnerEl;l.setSize(null,null);h=i.getOffsetsTo(l);j[0]=h[1];j[1]=l.getWidth()-i.getWidth()-h[0];j[2]=l.getHeight()-i.getHeight()-h[1];j[3]=h[0];g.destroy();g.el.remove()}}return j}},function(){var d={},c=function(i,a){if(a){var b=d[i.toggleGroup],g=b.length,j;for(j=0;j<g;j++){if(b[j]!==i){b[j].toggle(false)}}}};Ext.ButtonToggleManager={register:function(b){if(!b.toggleGroup){return}var a=d[b.toggleGroup];if(!a){a=d[b.toggleGroup]=[]}a.push(b);b.on("toggle",c)},unregister:function(b){if(!b.toggleGroup){return}var a=d[b.toggleGroup];if(a){Ext.Array.remove(a,b);b.un("toggle",c)}},getPressed:function(a){var b=d[a],g=0,h;if(b){for(h=b.length;g<h;g++){if(b[g].pressed===true){return b[g]}}}return null}}});Ext.define("Ext.tab.Tab",{extend:"Ext.button.Button",alias:"widget.tab",requires:["Ext.layout.component.Tab","Ext.util.KeyNav"],componentLayout:"tab",isTab:true,baseCls:Ext.baseCSSPrefix+"tab",activeCls:"active",closableCls:"closable",closable:true,closeText:"Close Tab",active:false,childEls:["closeEl"],scale:false,position:"top",initComponent:function(){var b=this;b.addEvents("activate","deactivate","beforeclose","close");b.callParent(arguments);if(b.card){b.setCard(b.card)}},getTemplateArgs:function(){var c=this,d=c.callParent();d.closable=c.closable;d.closeText=c.closeText;return d},beforeRender:function(){var d=this,e=d.up("tabbar"),f=d.up("tabpanel");d.callParent();d.addClsWithUI(d.position);d.syncClosableUI();if(!d.minWidth){d.minWidth=(e)?e.minTabWidth:d.minWidth;if(!d.minWidth&&f){d.minWidth=f.minTabWidth}if(d.minWidth&&d.iconCls){d.minWidth+=25}}if(!d.maxWidth){d.maxWidth=(e)?e.maxTabWidth:d.maxWidth;if(!d.maxWidth&&f){d.maxWidth=f.maxTabWidth}}},onRender:function(){var b=this;b.callParent(arguments);b.keyNav=new Ext.util.KeyNav(b.el,{enter:b.onEnterKey,del:b.onDeleteKey,scope:b})},enable:function(d){var c=this;c.callParent(arguments);c.removeClsWithUI(c.position+"-disabled");return c},disable:function(d){var c=this;c.callParent(arguments);c.addClsWithUI(c.position+"-disabled");return c},onDestroy:function(){var b=this;Ext.destroy(b.keyNav);delete b.keyNav;b.callParent(arguments)},setClosable:function(d){var c=this;d=(!arguments.length||!!d);if(c.closable!=d){c.closable=d;if(c.card){c.card.closable=d}c.syncClosableUI();if(c.rendered){c.syncClosableElements();c.updateLayout()}}},syncClosableElements:function(){var d=this,c=d.closeEl;if(d.closable){if(!c){d.closeEl=d.btnWrap.insertSibling({tag:"a",cls:d.baseCls+"-close-btn",href:"#",title:d.closeText},"after")}}else{if(c){c.remove();delete d.closeEl}}},syncClosableUI:function(){var c=this,d=[c.closableCls,c.closableCls+"-"+c.position];if(c.closable){c.addClsWithUI(d)}else{c.removeClsWithUI(d)}},setCard:function(d){var c=this;c.card=d;c.setText(c.title||d.title);c.setIconCls(c.iconCls||d.iconCls);c.setIcon(c.icon||d.icon)},onCloseClick:function(){var b=this;if(b.fireEvent("beforeclose",b)!==false){if(b.tabBar){if(b.tabBar.closeTab(b)===false){return}}else{b.fireClose()}}},fireClose:function(){this.fireEvent("close",this)},onEnterKey:function(c){var d=this;if(d.tabBar){d.tabBar.onClick(c,d.el)}},onDeleteKey:function(b){if(this.closable){this.onCloseClick()}},activate:function(c){var d=this;d.active=true;d.addClsWithUI([d.activeCls,d.position+"-"+d.activeCls]);if(c!==true){d.fireEvent("activate",d)}},deactivate:function(c){var d=this;d.active=false;d.removeClsWithUI([d.activeCls,d.position+"-"+d.activeCls]);if(c!==true){d.fireEvent("deactivate",d)}}});Ext.define("Ext.tab.Bar",{extend:"Ext.panel.Header",alias:"widget.tabbar",baseCls:Ext.baseCSSPrefix+"tab-bar",requires:["Ext.tab.Tab"],isTabBar:true,defaultType:"tab",plain:false,childEls:["body","strip"],renderTpl:['<div id="{id}-body" class="{baseCls}-body {bodyCls}<tpl if="ui"> {baseCls}-body-{ui}<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl></tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values)%}","</div>",'<div id="{id}-strip" class="{baseCls}-strip<tpl if="ui"> {baseCls}-strip-{ui}<tpl for="uiCls"> {parent.baseCls}-strip-{parent.ui}-{.}</tpl></tpl>"></div>'],initComponent:function(){var b=this;if(b.plain){b.setUI(b.ui+"-plain")}b.addClsWithUI(b.dock);b.addEvents("change");b.callParent(arguments);b.layout.align=(b.orientation=="vertical")?"left":"top";b.layout.overflowHandler=new Ext.layout.container.boxOverflow.Scroller(b.layout);b.remove(b.titleCmp);delete b.titleCmp;Ext.apply(b.renderData,{bodyCls:b.bodyCls})},getLayout:function(){var b=this;b.layout.type=(b.dock==="top"||b.dock==="bottom")?"hbox":"vbox";return b.callParent(arguments)},onAdd:function(b){b.position=this.dock;this.callParent(arguments)},onRemove:function(d){var c=this;if(d===c.previousTab){c.previousTab=null}c.callParent(arguments)},afterComponentLayout:function(b){this.callParent(arguments);this.strip.setWidth(b)},onClick:function(l,m){var n=this,j=l.getTarget("."+Ext.tab.Tab.prototype.baseCls),e=j&&Ext.getCmp(j.id),k=n.tabPanel,i=e&&e.closeEl&&(m===e.closeEl.dom);if(i){l.preventDefault()}if(e&&e.isDisabled&&!e.isDisabled()){if(e.closable&&i){e.onCloseClick()}else{if(k){k.setActiveTab(e.card)}else{n.setActiveTab(e)}e.focus()}}},closeTab:function(j){var i=this,f=j.card,h=i.tabPanel,g;if(f&&f.fireEvent("beforeclose",f)===false){return false}g=i.findNextActivatable(j);Ext.suspendLayouts();if(h&&f){delete j.ownerCt;h.remove(f);if(!h.getComponent(f)){j.fireClose();i.remove(j);if(f.hasListeners.close){f.fireEvent("close",f)}}else{j.ownerCt=i;Ext.resumeLayouts(true);return false}}if(g){if(h){h.setActiveTab(g.card)}else{i.setActiveTab(g)}g.focus()}Ext.resumeLayouts(true)},findNextActivatable:function(d){var c=this;if(d.active&&c.items.getCount()>1){return(c.previousTab&&c.previousTab!==d&&!c.previousTab.disabled)?c.previousTab:(d.next("tab[disabled=false]")||d.prev("tab[disabled=false]"))}},setActiveTab:function(d){var c=this;if(!d.disabled&&d!==c.activeTab){if(c.activeTab){if(c.activeTab.isDestroyed){c.previousTab=null}else{c.previousTab=c.activeTab;c.activeTab.deactivate()}}d.activate();c.activeTab=d;c.fireEvent("change",c,d,d.card);c.on({afterlayout:c.afterTabActivate,scope:c,single:true});c.updateLayout()}},afterTabActivate:function(){this.layout.overflowHandler.scrollToItem(this.activeTab)}});Ext.define("Ext.menu.Item",{extend:"Ext.Component",alias:"widget.menuitem",alternateClassName:"Ext.menu.TextItem",activeCls:Ext.baseCSSPrefix+"menu-item-active",ariaRole:"menuitem",canActivate:true,clickHideDelay:1,destroyMenu:true,disabledCls:Ext.baseCSSPrefix+"menu-item-disabled",hideOnClick:true,isMenuItem:true,menuAlign:"tl-tr?",menuExpandDelay:200,menuHideDelay:200,tooltipType:"qtip",arrowCls:Ext.baseCSSPrefix+"menu-item-arrow",childEls:["itemEl","iconEl","textEl","arrowEl"],renderTpl:['<tpl if="plain">',"{text}","<tpl else>",'<a id="{id}-itemEl" class="'+Ext.baseCSSPrefix+'menu-item-link" href="{href}" <tpl if="hrefTarget">target="{hrefTarget}"</tpl> hidefocus="true" unselectable="on">','<img id="{id}-iconEl" src="{icon}" class="'+Ext.baseCSSPrefix+'menu-item-icon {iconCls}" />','<span id="{id}-textEl" class="'+Ext.baseCSSPrefix+'menu-item-text" <tpl if="arrowCls">style="margin-right: 17px;"</tpl> >{text}</span>','<img id="{id}-arrowEl" src="{blank}" class="{arrowCls}" />',"</a>","</tpl>"],maskOnDisable:false,activate:function(){var b=this;if(!b.activated&&b.canActivate&&b.rendered&&!b.isDisabled()&&b.isVisible()){b.el.addCls(b.activeCls);b.focus();b.activated=true;b.fireEvent("activate",b)}},getFocusEl:function(){return this.itemEl},deactivate:function(){var b=this;if(b.activated){b.el.removeCls(b.activeCls);b.blur();b.hideMenu();b.activated=false;b.fireEvent("deactivate",b)}},deferExpandMenu:function(){var b=this;if(b.activated&&(!b.menu.rendered||!b.menu.isVisible())){b.parentMenu.activeChild=b.menu;b.menu.parentItem=b;b.menu.parentMenu=b.menu.ownerCt=b.parentMenu;b.menu.showBy(b,b.menuAlign,((!Ext.isStrict&&Ext.isIE)||Ext.isIE6)?[-2,-2]:undefined)}},deferHideMenu:function(){if(this.menu.isVisible()){this.menu.hide()}},cancelDeferHide:function(){clearTimeout(this.hideMenuTimer)},deferHideParentMenus:function(){var b;Ext.menu.Manager.hideAll();if(!Ext.Element.getActiveElement()){b=this.up(":not([hidden])");if(b){b.focus()}}},expandMenu:function(d){var c=this;if(c.menu){c.cancelDeferHide();if(d===0){c.deferExpandMenu()}else{c.expandMenuTimer=Ext.defer(c.deferExpandMenu,Ext.isNumber(d)?d:c.menuExpandDelay,c)}}},getRefItems:function(e){var f=this.menu,d;if(f){d=f.getRefItems(e);d.unshift(f)}return d||[]},hideMenu:function(d){var c=this;if(c.menu){clearTimeout(c.expandMenuTimer);c.hideMenuTimer=Ext.defer(c.deferHideMenu,Ext.isNumber(d)?d:c.menuHideDelay,c)}},initComponent:function(){var e=this,h=Ext.baseCSSPrefix,f=[h+"menu-item"],g;e.addEvents("activate","click","deactivate");if(e.plain){f.push(h+"menu-item-plain")}if(e.cls){f.push(e.cls)}e.cls=f.join(" ");if(e.menu){g=e.menu;delete e.menu;e.setMenu(g)}e.callParent(arguments)},onClick:function(c){var d=this;if(!d.href){c.stopEvent()}if(d.disabled){return}if(d.hideOnClick){d.deferHideParentMenusTimer=Ext.defer(d.deferHideParentMenus,d.clickHideDelay,d)}Ext.callback(d.handler,d.scope||d,[d,c]);d.fireEvent("click",d,c);if(!d.hideOnClick){d.focus()}},onRemoved:function(){var b=this;if(b.activated&&b.parentMenu.activeItem===b){b.parentMenu.deactivateActiveItem()}b.callParent(arguments);delete b.parentMenu;delete b.ownerButton},beforeDestroy:function(){var b=this;if(b.rendered){b.clearTip()}b.callParent()},onDestroy:function(){var b=this;clearTimeout(b.expandMenuTimer);b.cancelDeferHide();clearTimeout(b.deferHideParentMenusTimer);b.setMenu(null);b.callParent(arguments)},beforeRender:function(){var d=this,c=Ext.BLANK_IMAGE_URL;d.callParent();Ext.applyIf(d.renderData,{href:d.href||"#",hrefTarget:d.hrefTarget,icon:d.icon||c,iconCls:d.iconCls+(d.checkChangeDisabled?" "+d.disabledCls:""),plain:d.plain,text:d.text,arrowCls:d.menu?d.arrowCls:"",blank:c})},onRender:function(){var b=this;b.callParent(arguments);if(b.tooltip){b.setTooltip(b.tooltip,true)}},setMenu:function(g,h){var e=this,f=e.menu;if(f){delete f.parentItem;delete f.parentMenu;delete f.ownerCt;delete f.ownerItem;if(h===true||(h!==false&&e.destroyMenu)){Ext.destroy(f)}}if(g){e.menu=Ext.menu.Manager.get(g);e.menu.ownerItem=e}else{e.menu=null}if(e.rendered&&!e.destroying){e.arrowEl[e.menu?"addCls":"removeCls"](e.arrowCls)}},setHandler:function(c,d){this.handler=c||null;this.scope=d},setIcon:function(c){var d=this.iconEl;if(d){d.src=c||Ext.BLANK_IMAGE_URL}this.icon=c},setIconCls:function(d){var f=this,e=f.iconEl;if(e){if(f.iconCls){e.removeCls(f.iconCls)}if(d){e.addCls(d)}}f.iconCls=d},setText:function(f){var d=this,e=d.textEl||d.el;d.text=f;if(d.rendered){e.update(f||"");d.ownerCt.updateLayout()}},getTipAttr:function(){return this.tooltipType=="qtip"?"data-qtip":"title"},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.itemEl)}},setTooltip:function(f,e){var d=this;if(d.rendered){if(!e){d.clearTip()}if(Ext.isObject(f)){Ext.tip.QuickTipManager.register(Ext.apply({target:d.itemEl.id},f));d.tooltip=f}else{d.itemEl.dom.setAttribute(d.getTipAttr(),f)}}else{d.tooltip=f}return d}});Ext.define("Ext.menu.CheckItem",{extend:"Ext.menu.Item",alias:"widget.menucheckitem",checkedCls:Ext.baseCSSPrefix+"menu-item-checked",uncheckedCls:Ext.baseCSSPrefix+"menu-item-unchecked",groupCls:Ext.baseCSSPrefix+"menu-group-icon",hideOnClick:false,checkChangeDisabled:false,afterRender:function(){var b=this;b.callParent();b.checked=!b.checked;b.setChecked(!b.checked,true);if(b.checkChangeDisabled){b.disableCheckChange()}},initComponent:function(){var b=this;b.addEvents("beforecheckchange","checkchange");b.callParent(arguments);Ext.menu.Manager.registerCheckable(b);if(b.group){if(!b.iconCls){b.iconCls=b.groupCls}if(b.initialConfig.hideOnClick!==false){b.hideOnClick=true}}},disableCheckChange:function(){var c=this,d=c.iconEl;if(d){d.addCls(c.disabledCls)}c.checkChangeDisabled=true},enableCheckChange:function(){var c=this,d=c.iconEl;if(d){d.removeCls(c.disabledCls)}c.checkChangeDisabled=false},onClick:function(c){var d=this;if(!d.disabled&&!d.checkChangeDisabled&&!(d.checked&&d.group)){d.setChecked(!d.checked)}this.callParent([c])},onDestroy:function(){Ext.menu.Manager.unregisterCheckable(this);this.callParent(arguments)},setChecked:function(f,e){var d=this;if(d.checked!==f&&(e||d.fireEvent("beforecheckchange",d,f)!==false)){if(d.el){d.el[f?"addCls":"removeCls"](d.checkedCls)[!f?"addCls":"removeCls"](d.uncheckedCls)}d.checked=f;Ext.menu.Manager.onCheckChange(d,f);if(!e){Ext.callback(d.checkHandler,d.scope,[d,f]);d.fireEvent("checkchange",d,f)}}}});Ext.define("Ext.menu.Separator",{extend:"Ext.menu.Item",alias:"widget.menuseparator",canActivate:false,focusable:false,hideOnClick:false,plain:true,separatorCls:Ext.baseCSSPrefix+"menu-item-separator",text:" ",beforeRender:function(e,f){var d=this;d.callParent();d.addCls(d.separatorCls)}});Ext.define("Ext.toolbar.Fill",{extend:"Ext.Component",alias:"widget.tbfill",alternateClassName:"Ext.Toolbar.Fill",isFill:true,flex:1});Ext.define("Ext.dd.StatusProxy",{extend:"Ext.Component",animRepair:false,childEls:["ghost"],renderTpl:['<div class="'+Ext.baseCSSPrefix+'dd-drop-icon"></div><div id="{id}-ghost" class="'+Ext.baseCSSPrefix+'dd-drag-ghost"></div>'],constructor:function(d){var c=this;d=d||{};Ext.apply(c,{hideMode:"visibility",hidden:true,floating:true,id:c.id||Ext.id(),cls:Ext.baseCSSPrefix+"dd-drag-proxy "+this.dropNotAllowed,shadow:d.shadow||false,renderTo:Ext.getDetachedBody()});c.callParent(arguments);this.dropStatus=this.dropNotAllowed},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",setStatus:function(b){b=b||this.dropNotAllowed;if(this.dropStatus!=b){this.el.replaceCls(this.dropStatus,b);this.dropStatus=b}},reset:function(d){var f=this,e=Ext.baseCSSPrefix+"dd-drag-proxy ";f.el.replaceCls(e+f.dropAllowed,e+f.dropNotAllowed);f.dropStatus=f.dropNotAllowed;if(d){f.ghost.update("")}},update:function(d){if(typeof d=="string"){this.ghost.update(d)}else{this.ghost.update("");d.style.margin="0";this.ghost.dom.appendChild(d)}var c=this.ghost.dom.firstChild;if(c){Ext.fly(c).setStyle("float","none")}},getGhost:function(){return this.ghost},hide:function(b){this.callParent();if(b){this.reset(true)}},stop:function(){if(this.anim&&this.anim.isAnimated&&this.anim.isAnimated()){this.anim.stop()}},sync:function(){this.el.sync()},repair:function(h,g,f){var e=this;e.callback=g;e.scope=f;if(h&&e.animRepair!==false){e.el.addCls(Ext.baseCSSPrefix+"dd-drag-repair");e.el.hideUnders(true);e.anim=e.el.animate({duration:e.repairDuration||500,easing:"ease-out",to:{x:h[0],y:h[1]},stopAnimation:true,callback:e.afterRepair,scope:e})}else{e.afterRepair()}},afterRepair:function(){var b=this;b.hide(true);b.el.removeCls(Ext.baseCSSPrefix+"dd-drag-repair");if(typeof b.callback=="function"){b.callback.call(b.scope||b)}delete b.callback;delete b.scope}});Ext.define("Ext.data.proxy.Memory",{extend:"Ext.data.proxy.Client",alias:"proxy.memory",alternateClassName:"Ext.data.MemoryProxy",constructor:function(b){this.callParent([b]);this.setReader(this.reader)},updateOperation:function(g,i,k){var l=0,j=g.getRecords(),h=j.length;for(l;l<h;l++){j[l].commit()}g.setCompleted();g.setSuccessful();Ext.callback(i,k||this,[g])},create:function(){this.updateOperation.apply(this,arguments)},update:function(){this.updateOperation.apply(this,arguments)},destroy:function(){this.updateOperation.apply(this,arguments)},read:function(l,i,k){var j=this,g=j.getReader(),h=g.read(j.data);Ext.apply(l,{resultSet:h});l.setCompleted();l.setSuccessful();Ext.callback(i,k||j,[l])},clear:Ext.emptyFn});Ext.define("Ext.data.writer.Json",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.JsonWriter",alias:"writer.json",root:undefined,encode:false,allowSingle:true,writeRecords:function(d,f){var e=this.root;if(this.allowSingle&&f.length==1){f=f[0]}if(this.encode){if(e){d.params[e]=Ext.encode(f)}else{Ext.Error.raise("Must specify a root when using encode")}}else{d.jsonData=d.jsonData||{};if(e){d.jsonData[e]=f}else{d.jsonData=f}}return d}});Ext.define("Ext.LoadMask",{extend:"Ext.Component",alias:"widget.loadmask",mixins:{floating:"Ext.util.Floating",bindable:"Ext.util.Bindable"},uses:["Ext.data.StoreManager"],msg:"Loading...",msgCls:Ext.baseCSSPrefix+"mask-loading",maskCls:Ext.baseCSSPrefix+"mask",useMsg:true,useTargetEl:false,baseCls:Ext.baseCSSPrefix+"mask-msg",childEls:["msgEl"],renderTpl:'<div id="{id}-msgEl" style="position:relative" class="{[values.$comp.msgCls]}"></div>',floating:{shadow:"frame"},focusOnToFront:false,bringParentToFront:false,constructor:function(e,d){var f=this;if(!e.isComponent){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.LoadMask: LoadMask for elements has been deprecated, use Ext.dom.Element.mask & Ext.dom.Element.unmask")}e=Ext.get(e);this.isElement=true}f.ownerCt=e;if(!this.isElement){f.bindComponent(e)}f.callParent([d]);if(f.store){f.bindStore(f.store,true)}},bindComponent:function(f){var h=this,e={scope:this,resize:h.sizeMask,added:h.onComponentAdded,removed:h.onComponentRemoved},g=Ext.container.Container.hierarchyEventSource;if(f.floating){e.move=h.sizeMask;if(f.zIndexManager.front!==f){h.restack=true;h.activeOwner=f}}else{if(f.ownerCt){h.onComponentAdded(f.ownerCt)}else{h.preventBringToFront=true}}h.mon(f,e);h.mon(g,{show:h.onContainerShow,hide:h.onContainerHide,expand:h.onContainerExpand,collapse:h.onContainerCollapse,scope:h})},onComponentAdded:function(d){var c=this;delete c.activeOwner;c.floatParent=d;if(!d.floating){d=d.up("[floating]")}if(d){c.activeOwner=d;c.mon(d,"move",c.sizeMask,c)}d=c.floatParent.ownerCt;if(c.rendered&&c.isVisible()&&d){c.floatOwner=d;c.mon(d,"afterlayout",c.sizeMask,c,{single:true})}},onComponentRemoved:function(f){var h=this,g=h.activeOwner,e=h.floatOwner;if(g){h.mun(g,"move",h.sizeMask,h)}if(e){h.mun(e,"afterlayout",h.sizeMask,h)}delete h.activeOwner;delete h.floatOwner},afterRender:function(){this.callParent(arguments);this.container=this.floatParent.getContentTarget()},onContainerShow:function(b){if(this.isActiveContainer(b)){this.onComponentShow()}},onContainerHide:function(b){if(this.isActiveContainer(b)){this.onComponentHide()}},onContainerExpand:function(b){if(this.isActiveContainer(b)){this.onComponentShow()}},onContainerCollapse:function(b){if(this.isActiveContainer(b)){this.onComponentHide()}},isActiveContainer:function(b){return this.isDescendantOf(b)},onComponentHide:function(){var b=this;if(b.rendered&&b.isVisible()){b.hide();b.showNext=true}},onComponentShow:function(){if(this.showNext){this.show()}delete this.showNext},sizeMask:function(){var d=this,c;if(d.rendered&&d.isVisible()){d.center();c=d.getMaskTarget();d.getMaskEl().show().setSize(c.getSize()).alignTo(c,"tl-tl")}},bindStore:function(e,d){var f=this;f.mixins.bindable.bindStore.apply(f,arguments);e=f.store;if(e&&e.isLoading()){f.onBeforeLoad()}},getStoreListeners:function(){return{beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.onLoad,cachemiss:this.onBeforeLoad,cachefilled:this.onLoad}},onDisable:function(){this.callParent(arguments);if(this.loading){this.onLoad()}},getOwner:function(){return this.ownerCt||this.floatParent},getMaskTarget:function(){var b=this.getOwner();return this.useTargetEl?b.getTargetEl():b.getEl()},onBeforeLoad:function(){var f=this,e=f.getOwner(),d;if(!f.disabled){f.loading=true;if(e.componentLayoutCounter){f.maybeShow()}else{d=e.afterComponentLayout;e.afterComponentLayout=function(){e.afterComponentLayout=d;d.apply(e,arguments);f.maybeShow()}}}},maybeShow:function(){var c=this,d=c.getOwner();if(!d.isVisible(true)){c.showNext=true}else{if(c.loading&&d.rendered){c.show()}}},getMaskEl:function(){var b=this;return b.maskEl||(b.maskEl=b.el.insertSibling({cls:b.maskCls,style:{zIndex:b.el.getStyle("zIndex")-2}},"before"))},onShow:function(){var c=this,d=c.msgEl;c.callParent(arguments);c.loading=true;if(c.useMsg){d.show().update(c.msg)}else{d.parent().hide()}},hide:function(){if(this.isElement){this.ownerCt.unmask();this.fireEvent("hide",this);return}delete this.showNext;return this.callParent(arguments)},onHide:function(){this.callParent();this.getMaskEl().hide()},show:function(){if(this.isElement){this.ownerCt.mask(this.useMsg?this.msg:"",this.msgCls);this.fireEvent("show",this);return}return this.callParent(arguments)},afterShow:function(){this.callParent(arguments);this.sizeMask()},setZIndex:function(d){var c=this;if(c.restack){d=parseInt(c.activeOwner.el.getStyle("zIndex"),10)+1}c.getMaskEl().setStyle("zIndex",d-1);return c.mixins.floating.setZIndex.apply(c,arguments)},onLoad:function(){this.loading=false;this.hide()},onDestroy:function(){var b=this;if(b.isElement){b.ownerCt.unmask()}Ext.destroy(b.maskEl);b.callParent()}});Ext.define("Ext.FocusManager",{singleton:true,alternateClassName:["Ext.FocusMgr"],mixins:{observable:"Ext.util.Observable"},requires:["Ext.AbstractComponent","Ext.Component","Ext.ComponentManager","Ext.ComponentQuery","Ext.util.HashMap","Ext.util.KeyNav"],enabled:false,focusElementCls:Ext.baseCSSPrefix+"focus-element",focusFrameCls:Ext.baseCSSPrefix+"focus-frame",whitelist:["textfield"],constructor:function(e){var d=this,f=Ext.ComponentQuery;d.mixins.observable.constructor.call(d,e);d.addEvents("beforecomponentfocus","componentfocus","disable","enable");d.focusTask=new Ext.util.DelayedTask(d.handleComponentFocus,d);Ext.override(Ext.AbstractComponent,{onFocus:function(){this.callParent(arguments);if(d.enabled&&this.hasFocus){Array.prototype.unshift.call(arguments,this);d.onComponentFocus.apply(d,arguments)}},onBlur:function(){this.callParent(arguments);if(d.enabled&&!this.hasFocus){Array.prototype.unshift.call(arguments,this);d.onComponentBlur.apply(d,arguments)}},onDestroy:function(){this.callParent(arguments);if(d.enabled){Array.prototype.unshift.call(arguments,this);d.onComponentDestroy.apply(d,arguments)}}});Ext.override(Ext.Component,{afterHide:function(){this.callParent(arguments);if(d.enabled){Array.prototype.unshift.call(arguments,this);d.onComponentHide.apply(d,arguments)}}});d.keyNav=new Ext.util.KeyNav(Ext.getDoc(),{disabled:true,scope:d,backspace:d.focusLast,enter:d.navigateIn,esc:d.navigateOut,tab:d.navigateSiblings,space:d.navigateIn,del:d.focusLast,left:d.navigateSiblings,right:d.navigateSiblings,down:d.navigateSiblings,up:d.navigateSiblings});d.focusData={};d.subscribers=new Ext.util.HashMap();d.focusChain={};Ext.apply(f.pseudos,{focusable:function(i){var j=i.length,b=[],c=0,a;for(;c<j;c++){a=i[c];if(a.isFocusable()){b.push(a)}}return b},nextFocus:function(i,k,b){b=b||1;k=parseInt(k,10);var l=i.length,c=k,a;for(;;){if((c+=b)>=l){c=0}else{if(c<0){c=l-1}}if(c===k){return[]}if((a=i[c]).isFocusable()){return[a]}}return[]},prevFocus:function(a,b){return this.nextFocus(a,b,-1)},root:function(i){var j=i.length,b=[],c=0,a;for(;c<j;c++){a=i[c];if(!a.ownerCt){b.push(a)}}return b}})},addXTypeToWhitelist:function(c){var d=this;if(Ext.isArray(c)){Ext.Array.forEach(c,d.addXTypeToWhitelist,d);return}if(!Ext.Array.contains(d.whitelist,c)){d.whitelist.push(c)}},clearComponent:function(b){clearTimeout(this.cmpFocusDelay);if(!b.isDestroyed){b.blur()}},disable:function(){var b=this;if(!b.enabled){return}delete b.options;b.enabled=false;b.removeDOM();b.keyNav.disable();b.fireEvent("disable",b)},enable:function(d){var c=this;if(d===true){d={focusFrame:true}}c.options=d=d||{};if(c.enabled){return}c.enabled=true;c.initDOM(d);c.keyNav.enable();c.focusEl.focus();delete c.focusedCmp;c.fireEvent("enable",c)},focusLast:function(c){var d=this;if(d.isWhitelisted(d.focusedCmp)){return true}if(d.previousFocusedCmp){d.previousFocusedCmp.focus()}},getRootComponents:function(){var f=this,h=Ext.ComponentQuery,e=h.query(":focusable:root:not([floating])"),g=h.query(":focusable:root[floating]");g.sort(function(a,b){return a.el.getZIndex()>b.el.getZIndex()});return g.concat(e)},initDOM:function(l){var i=this,g=i.focusFrameCls,j=Ext.ComponentQuery.query("{getFocusEl()}:not([focusListenerAdded])"),k=0,h=j.length;if(!Ext.isReady){return Ext.onReady(i.initDOM,i)}for(;k<h;k++){j[k].addFocusListener()}if(!i.focusEl){i.focusEl=Ext.getBody();i.focusEl.dom.tabIndex=-1}if(!i.focusFrame&&l.focusFrame){i.focusFrame=Ext.getBody().createChild({cls:g,children:[{cls:g+"-top"},{cls:g+"-bottom"},{cls:g+"-left"},{cls:g+"-right"}],style:"top: -100px; left: -100px;"});i.focusFrame.setVisibilityMode(Ext.Element.DISPLAY);i.focusFrame.hide().setLeftTop(0,0)}},isWhitelisted:function(b){return b&&Ext.Array.some(this.whitelist,function(a){return b.isXType(a)})},navigateIn:function(h){var j=this,g=j.focusedCmp,e,i;if(j.isWhitelisted(g)){return true}if(!g){e=j.getRootComponents()[0];if(e){if(e.getFocusEl()===j.focusEl){j.focusEl.blur()}e.focus()}}else{i=g.hasFocus?Ext.ComponentQuery.query(">:focusable",g)[0]:g;if(i){i.focus()}else{if(Ext.isFunction(g.onClick)){h.button=0;g.onClick(h);if(g.isVisible(true)){g.focus()}else{j.navigateOut()}}}}},navigateOut:function(f){var d=this,e;if(!d.focusedCmp||!(e=d.focusedCmp.up(":focusable"))){d.focusEl.focus()}else{e.focus()}return true},navigateSiblings:function(v,A,p){var u=this,B=A||u,e=v.getKey(),x=Ext.EventObject,t=v.shiftKey||e==x.LEFT||e==x.UP,z=e==x.LEFT||e==x.RIGHT||e==x.UP||e==x.DOWN,w=t?"prev":"next",q,y,r,s;r=(B.focusedCmp&&B.focusedCmp.comp)||B.focusedCmp;if(!r&&!p){return true}if(z&&u.isWhitelisted(r)){return true}if(!r||r.is(":root")){s=u.getRootComponents()}else{p=p||r.up();if(p){s=p.getRefItems()}}if(s){q=r?Ext.Array.indexOf(s,r):-1;y=Ext.ComponentQuery.query(":"+w+"Focus("+q+")",s)[0];if(y&&r!==y){y.focus();return y}}},onComponentBlur:function(d,f){var e=this;if(e.focusedCmp===d){e.previousFocusedCmp=d;delete e.focusedCmp}if(e.focusFrame){e.focusFrame.hide()}},onComponentFocus:function(i,h){var j=this,g=j.focusChain,e;if(!i.isFocusable()){j.clearComponent(i);if(g[i.id]){return}e=i.up();if(e){g[i.id]=true;e.focus()}return}j.focusChain={};j.focusTask.delay(10,null,null,[i,i.getFocusEl()])},handleComponentFocus:function(s,w){var u=this,p,D,A,x,q,C,t,z,y,B,r,v;if(u.fireEvent("beforecomponentfocus",u,s,u.previousFocusedCmp)===false){u.clearComponent(s);return}u.focusedCmp=s;if(u.shouldShowFocusFrame(s)){p="."+u.focusFrameCls+"-";D=u.focusFrame;x=w.getPageBox();q=x.top;C=x.left;t=x.width;z=x.height;y=D.child(p+"top");B=D.child(p+"bottom");r=D.child(p+"left");v=D.child(p+"right");y.setWidth(t).setLeftTop(C,q);B.setWidth(t).setLeftTop(C,q+z-2);r.setHeight(z-2).setLeftTop(C,q+2);v.setHeight(z-2).setLeftTop(C+t-2,q+2);D.show()}u.fireEvent("componentfocus",u,s,u.previousFocusedCmp)},onComponentHide:function(h){var i=this,f=false,g=i.focusedCmp,j;if(g){f=h.hasFocus||(h.isContainer&&h.isAncestor(i.focusedCmp))}i.clearComponent(h);if(f&&(j=h.up(":focusable"))){j.focus()}else{i.focusEl.focus()}},onComponentDestroy:function(){},removeDOM:function(){var b=this;if(b.enabled||b.subscribers.length){return}Ext.destroy(b.focusFrame);delete b.focusEl;delete b.focusFrame},removeXTypeFromWhitelist:function(c){var d=this;if(Ext.isArray(c)){Ext.Array.forEach(c,d.removeXTypeFromWhitelist,d);return}Ext.Array.remove(d.whitelist,c)},setupSubscriberKeys:function(i,k){var l=this,m=i.getFocusEl(),n=k.scope,h={backspace:l.focusLast,enter:l.navigateIn,esc:l.navigateOut,scope:l},j=function(a){if(l.focusedCmp===i){return l.navigateSiblings(a,l,i)}else{return l.navigateSiblings(a)}};Ext.iterate(k,function(a,b){h[a]=function(c){var d=j(c);if(Ext.isFunction(b)&&b.call(n||i,c,d)===true){return true}return d}},l);return new Ext.util.KeyNav(m,h)},shouldShowFocusFrame:function(j){var f=this,g=f.options||{},h=j.getFocusEl(),i=Ext.getDom(h).tagName;if(!f.focusFrame||!j){return false}if(g.focusFrame){return true}if(f.focusData[j.id].focusFrame){return true}return false}});Ext.define("Ext.menu.KeyNav",{extend:"Ext.util.KeyNav",requires:["Ext.FocusManager"],constructor:function(c){var d=this;d.menu=c;d.callParent([c.el,{down:d.down,enter:d.enter,esc:d.escape,left:d.left,right:d.right,space:d.enter,tab:d.tab,up:d.up}])},down:function(d){var e=this,f=e.menu.focusedItem;if(f&&d.getKey()==Ext.EventObject.DOWN&&e.isWhitelisted(f)){return true}e.focusNextItem(1)},enter:function(d){var f=this.menu,e=f.focusedItem;if(f.activeItem){f.onClick(d)}else{if(e&&e.isFormField){return true}}},escape:function(b){Ext.menu.Manager.hideAll()},focusNextItem:function(k){var j=this.menu,h=j.items,m=j.focusedItem,n=m?h.indexOf(m):-1,i=n+k,l;while(i!=n){if(i<0){i=h.length-1}else{if(i>=h.length){i=0}}l=h.getAt(i);if(j.canActivateItem(l)){j.setActiveItem(l);break}i+=k}},isWhitelisted:function(b){return Ext.FocusManager.isWhitelisted(b)},left:function(e){var h=this.menu,g=h.focusedItem,f=h.activeItem;if(g&&this.isWhitelisted(g)){return true}h.hide();if(h.parentMenu){h.parentMenu.focus()}},right:function(j){var i=this.menu,h=i.focusedItem,g=i.activeItem,e;if(h&&this.isWhitelisted(h)){return true}if(g){e=i.activeItem.menu;if(e){g.expandMenu(0);Ext.defer(function(){e.setActiveItem(e.items.getAt(0))},25)}}},tab:function(c){var d=this;if(c.shiftKey){d.up(c)}else{d.down(c)}},up:function(d){var e=this,f=e.menu.focusedItem;if(f&&d.getKey()==Ext.EventObject.UP&&e.isWhitelisted(f)){return true}e.focusNextItem(-1)}});Ext.define("Ext.form.CheckboxManager",{extend:"Ext.util.MixedCollection",singleton:true,getByName:function(b){return this.filterBy(function(a){return a.name==b})},getWithValue:function(d,c){return this.filterBy(function(a){return a.name==d&&a.inputValue==c})},getChecked:function(b){return this.filterBy(function(a){return a.name==b&&a.checked})}});Ext.define("Ext.form.field.Checkbox",{extend:"Ext.form.field.Base",alias:["widget.checkboxfield","widget.checkbox"],alternateClassName:"Ext.form.Checkbox",requires:["Ext.XTemplate","Ext.form.CheckboxManager"],componentLayout:"field",childEls:["boxLabelEl"],fieldSubTpl:["<tpl if=\"boxLabel && boxLabelAlign == 'before'\">","{beforeBoxLabelTpl}",'<label id="{cmpId}-boxLabelEl" {boxLabelAttrTpl} class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">',"{beforeBoxLabelTextTpl}","{boxLabel}","{afterBoxLabelTextTpl}","</label>","{afterBoxLabelTpl}","</tpl>",'<input type="button" id="{id}" {inputAttrTpl}','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' class="{fieldCls} {typeCls}" autocomplete="off" hidefocus="true" />',"<tpl if=\"boxLabel && boxLabelAlign == 'after'\">","{beforeBoxLabelTpl}",'<label id="{cmpId}-boxLabelEl" {boxLabelAttrTpl} class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">',"{beforeBoxLabelTextTpl}","{boxLabel}","{afterBoxLabelTextTpl}","</label>","{afterBoxLabelTpl}","</tpl>",{disableFormats:true,compiled:true}],subTplInsertions:["beforeBoxLabelTpl","afterBoxLabelTpl","beforeBoxLabelTextTpl","afterBoxLabelTextTpl","boxLabelAttrTpl","inputAttrTpl"],isCheckbox:true,focusCls:"form-cb-focus",fieldBodyCls:Ext.baseCSSPrefix+"form-cb-wrap",checked:false,checkedCls:Ext.baseCSSPrefix+"form-cb-checked",boxLabelCls:Ext.baseCSSPrefix+"form-cb-label",boxLabelAlign:"after",inputValue:"on",checkChangeEvents:[],inputType:"checkbox",onRe:/^on$/i,initComponent:function(){this.callParent(arguments);this.getManager().add(this)},initValue:function(){var c=this,d=!!c.checked;c.originalValue=c.lastValue=d;c.setValue(d)},getElConfig:function(){var b=this;if(b.isChecked(b.rawValue,b.inputValue)){b.addCls(b.checkedCls)}return b.callParent()},getFieldStyle:function(){return Ext.isObject(this.fieldStyle)?Ext.DomHelper.generateStyles(this.fieldStyle):this.fieldStyle||""},getSubTplData:function(){var b=this;return Ext.apply(b.callParent(),{disabled:b.readOnly||b.disabled,boxLabel:b.boxLabel,boxLabelCls:b.boxLabelCls,boxLabelAlign:b.boxLabelAlign})},initEvents:function(){var b=this;b.callParent();b.mon(b.inputEl,"click",b.onBoxClick,b)},onBoxClick:function(c){var d=this;if(!d.disabled&&!d.readOnly){this.setValue(!this.checked)}},getRawValue:function(){return this.checked},getValue:function(){return this.checked},getSubmitValue:function(){var d=this.uncheckedValue,c=Ext.isDefined(d)?d:null;return this.checked?this.inputValue:c},isChecked:function(c,d){return(c===true||c==="true"||c==="1"||c===1||(((Ext.isString(c)||Ext.isNumber(c))&&d)?c==d:this.onRe.test(c)))},setRawValue:function(h){var e=this,g=e.inputEl,f=e.isChecked(h,e.inputValue);if(g){e[f?"addCls":"removeCls"](e.checkedCls)}e.checked=e.rawValue=f;return f},setValue:function(i){var j=this,l,g,h,k;if(Ext.isArray(i)){l=j.getManager().getByName(j.name,j.getFormId()).items;h=l.length;for(g=0;g<h;++g){k=l[g];k.setValue(Ext.Array.contains(i,k.inputValue))}}else{j.callParent(arguments)}return j},valueToRaw:function(b){return b},onChange:function(e,f){var g=this,h=g.handler;if(h){h.call(g.scope||g,g,e)}g.callParent(arguments)},resetOriginalValue:function(g){var i=this,k,j,h,l;if(!g){k=i.getManager().getByName(i.name,i.getFormId()).items;h=k.length;for(l=0;l<h;++l){j=k[l];if(j!==i){k[l].resetOriginalValue(true)}}}i.callParent()},beforeDestroy:function(){this.callParent();this.getManager().removeAtKey(this.id)},getManager:function(){return Ext.form.CheckboxManager},onEnable:function(){var d=this,c=d.inputEl;d.callParent();if(c){c.dom.disabled=d.readOnly}},setReadOnly:function(f){var e=this,d=e.inputEl;if(d){d.dom.disabled=!!f||e.disabled}e.callParent(arguments)},getFormId:function(){var c=this,d;if(!c.formId){d=c.up("form");if(d){c.formId=d.id}}return c.formId}});Ext.define("Ext.layout.container.boxOverflow.Scroller",{extend:"Ext.layout.container.boxOverflow.None",requires:["Ext.util.ClickRepeater","Ext.Element"],alternateClassName:"Ext.layout.boxOverflow.Scroller",mixins:{observable:"Ext.util.Observable"},animateScroll:false,scrollIncrement:20,wheelIncrement:10,scrollRepeatInterval:60,scrollDuration:400,scrollerCls:Ext.baseCSSPrefix+"box-scroller",constructor:function(f,e){var d=this;d.layout=f;Ext.apply(d,e||{});d.mixins.observable.constructor.call(d);d.addEvents("scroll");d.scrollPosition=0;d.scrollSize=0},getPrefixConfig:function(){var b=this;b.initCSSClasses();return{cls:Ext.layout.container.Box.prototype.innerCls+" "+b.beforeCtCls,cn:{id:b.layout.owner.id+"-before-scroller",cls:b.scrollerCls+" "+b.beforeScrollerCls,style:"display:none"}}},getSuffixConfig:function(){var b=this;return{cls:Ext.layout.container.Box.prototype.innerCls+" "+b.afterCtCls,cn:{id:b.layout.owner.id+"-after-scroller",cls:b.scrollerCls+" "+b.afterScrollerCls,style:"display:none"}}},getOverflowCls:function(){return Ext.baseCSSPrefix+this.layout.direction+"-box-overflow-body"},initCSSClasses:function(){var m=this,l=Ext.baseCSSPrefix,n=m.layout,k=n.getNames(),i=k.left,j=k.right,h=m.getOwnerType(n.owner);m.beforeCtCls=m.beforeCtCls||l+"box-scroller-"+i;m.afterCtCls=m.afterCtCls||l+"box-scroller-"+j;m.beforeScrollerCls=m.beforeScrollerCls||l+h+"-scroll-"+i;m.afterScrollerCls=m.afterScrollerCls||l+h+"-scroll-"+j},beginLayout:function(d){var e=this.layout,f=e.getNames();d.innerCtScrollPos=e.innerCt.dom["scroll"+f.leftCap];this.callParent(arguments)},completeLayout:function(b){this.scrollSize=b.props["content"+this.layout.getNames().widthCap];this.callParent(arguments)},finishedLayout:function(j){var f=this,g=f.layout,i=g.getNames(),h=Math.min(f.getMaxScrollPosition(),j.innerCtScrollPos);g.innerCt.dom["scroll"+i.leftCap]=h},handleOverflow:function(i){var j=this,f=j.layout,h=f.getNames(),g="get"+h.widthCap;j.captureChildElements();j.showScrollers();return{reservedSpace:j.beforeCt[g]()+j.afterCt[g]()}},captureChildElements:function(){var e=this,f=e.layout.owner.el,h,g;if(!e.beforeCt){h=e.beforeScroller=f.getById(e.layout.owner.id+"-before-scroller");g=e.afterScroller=f.getById(e.layout.owner.id+"-after-scroller");e.beforeCt=h.up("");e.afterCt=g.up("");e.createWheelListener();h.addClsOnOver(e.beforeScrollerCls+"-hover");g.addClsOnOver(e.afterScrollerCls+"-hover");h.setVisibilityMode(Ext.Element.DISPLAY);g.setVisibilityMode(Ext.Element.DISPLAY);e.beforeRepeater=new Ext.util.ClickRepeater(h,{interval:e.scrollRepeatInterval,handler:e.scrollLeft,scope:e});e.afterRepeater=new Ext.util.ClickRepeater(g,{interval:e.scrollRepeatInterval,handler:e.scrollRight,scope:e})}},createWheelListener:function(){this.layout.innerCt.on({mousewheel:function(b){this.scrollBy(b.getWheelDelta()*this.wheelIncrement*-1,false)},stopEvent:true,scope:this})},clearOverflow:function(){var b=this.layout;this.hideScrollers()},showScrollers:function(){var b=this;b.captureChildElements();b.beforeScroller.show();b.afterScroller.show();b.updateScrollButtons();b.layout.owner.addClsWithUI("scroller")},hideScrollers:function(){var b=this;if(b.beforeScroller!==undefined){b.beforeScroller.hide();b.afterScroller.hide();b.layout.owner.removeClsWithUI("scroller")}},destroy:function(){var b=this;Ext.destroy(b.beforeRepeater,b.afterRepeater,b.beforeScroller,b.afterScroller,b.beforeCt,b.afterCt)},scrollBy:function(c,d){this.scrollTo(this.getScrollPosition()+c,d)},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},updateScrollButtons:function(){var i=this,h,j,g,f;if(i.beforeScroller===undefined||i.afterScroller===undefined){return}h=i.atExtremeBefore()?"addCls":"removeCls";j=i.atExtremeAfter()?"addCls":"removeCls";g=i.beforeScrollerCls+"-disabled";f=i.afterScrollerCls+"-disabled";i.beforeScroller[h](g);i.afterScroller[j](f);i.scrolling=false},atExtremeBefore:function(){return !this.getScrollPosition()},scrollLeft:function(){this.scrollBy(-this.scrollIncrement,false)},scrollRight:function(){this.scrollBy(this.scrollIncrement,false)},getScrollPosition:function(){var f=this,d=f.layout,e;if(f.hasOwnProperty("scrollPosition")){e=f.scrollPosition}else{e=parseInt(d.innerCt.dom["scroll"+d.getNames().leftCap],10)||0}return e},getMaxScrollPosition:function(){var e=this,f=e.layout,h=f.getNames(),g=e.scrollSize-f.innerCt["get"+h.widthCap]();return(g<0)?0:g},atExtremeAfter:function(){return this.getScrollPosition()>=this.getMaxScrollPosition()},scrollTo:function(i,h){var k=this,l=k.layout,j=l.getNames(),m=k.getScrollPosition(),n=Ext.Number.constrain(i,0,k.getMaxScrollPosition());if(n!=m&&!k.scrolling){delete k.scrollPosition;if(h===undefined){h=k.animateScroll}l.innerCt.scrollTo(j.left,n,h?k.getScrollAnim():false);if(h){k.scrolling=true}else{k.updateScrollButtons()}k.fireEvent("scroll",k,n,h?k.getScrollAnim():false)}},scrollToItem:function(l,i){var m=this,n=m.layout,k=n.getNames(),j,o,p;l=m.getItem(l);if(l!==undefined){j=m.getItemVisibility(l);if(!j.fullyVisible){o=l.getBox(true,true);p=o[k.x];if(j.hiddenEnd){p-=(m.layout.innerCt["get"+k.widthCap]()-o[k.width])}m.scrollTo(p,i)}}},getItemVisibility:function(j){var l=this,q=l.getItem(j).getBox(true,true),p=l.layout,m=p.getNames(),n=q[m.x],o=n+q[m.width],r=l.getScrollPosition(),k=r+p.innerCt["get"+m.widthCap]();return{hiddenStart:n<r,hiddenEnd:o>k,fullyVisible:n>r&&o<k}}});Ext.define("Ext.Ajax",{extend:"Ext.data.Connection",singleton:true,autoAbort:false});Ext.define("Ext.data.proxy.Ajax",{requires:["Ext.util.MixedCollection","Ext.Ajax"],extend:"Ext.data.proxy.Server",alias:"proxy.ajax",alternateClassName:["Ext.data.HttpProxy","Ext.data.AjaxProxy"],actionMethods:{create:"POST",read:"GET",update:"POST",destroy:"POST"},doRequest:function(g,h,f){var i=this.getWriter(),j=this.buildRequest(g,h,f);if(g.allowWrite()){j=i.write(j)}Ext.apply(j,{headers:this.headers,timeout:this.timeout,scope:this,callback:this.createRequestCallback(j,g,h,f),method:this.getMethod(j),disableCaching:false});Ext.Ajax.request(j);return j},getMethod:function(b){return this.actionMethods[b.action]},createRequestCallback:function(i,g,h,f){var j=this;return function(b,a,c){j.processResponse(a,g,i,c,h,f)}}},function(){Ext.data.HttpProxy=this});Ext.define("Ext.data.reader.Reader",{requires:["Ext.data.ResultSet"],alternateClassName:["Ext.data.Reader","Ext.data.DataReader"],mixins:{observable:"Ext.util.Observable"},totalProperty:"total",successProperty:"success",root:"",implicitIncludes:true,readRecordsOnFailure:true,isReader:true,constructor:function(d){var c=this;c.mixins.observable.constructor.call(c,d);c.fieldCount=0;c.model=Ext.ModelManager.getModel(c.model);if(c.model&&c.model.prototype.fields){c.buildExtractors()}this.addEvents("exception")},setModel:function(e,f){var d=this;d.model=Ext.ModelManager.getModel(e);d.buildExtractors(true);if(f&&d.proxy){d.proxy.setModel(d.model,true)}},read:function(d){var c;if(d){c=d.responseText?this.getResponseData(d):this.readRecords(d)}return c||this.nullResultSet},readRecords:function(p){var o=this,k,q,r,m,n,l,j;if(o.fieldCount!==o.getFields().length){o.buildExtractors(true)}o.rawData=p;p=o.getData(p);k=true;q=0;r=[];if(o.successProperty){l=o.getSuccess(p);if(l===false||l==="false"){k=false}}if(o.messageProperty){j=o.getMessage(p)}if(o.readRecordsOnFailure||k){m=Ext.isArray(p)?p:o.getRoot(p);if(m){n=m.length}if(o.totalProperty){l=parseInt(o.getTotal(p),10);if(!isNaN(l)){n=l}}if(m){r=o.extractData(m);q=r.length}}return new Ext.data.ResultSet({total:n||q,count:q,records:r,success:k,message:j})},extractData:function(i){var k=this,o=[],q=k.model,r=i.length,n,p,l,m;if(!i.length&&Ext.isObject(i)){i=[i];r=1}for(m=0;m<r;m++){p=i[m];l=new q(undefined,k.getId(p),p,n={});l.phantom=false;k.convertRecordData(n,p,l);o.push(l);if(k.implicitIncludes){k.readAssociated(l,p)}}return o},readAssociated:function(l,n){var o=l.associations.items,m=0,r=o.length,p,q,i,k;for(;m<r;m++){p=o[m];q=this.getAssociatedDataRoot(n,p.associationKey||p.name);if(q){k=p.getReader();if(!k){i=p.associatedModel.proxy;if(i){k=i.getReader()}else{k=new this.constructor({model:p.associatedName})}}p.read(l,k,q)}}},getAssociatedDataRoot:function(c,d){return c[d]},getFields:function(){return this.model.prototype.fields.items},getData:function(b){return b},getRoot:function(b){return b},getResponseData:function(b){Ext.Error.raise("getResponseData must be implemented in the Ext.data.reader.Reader subclass")},onMetaChange:function(h){var i=this,f=h.fields||i.getFields(),j,g;i.metaData=h;i.root=h.root||i.root;i.idProperty=h.idProperty||i.idProperty;i.totalProperty=h.totalProperty||i.totalProperty;i.successProperty=h.successProperty||i.successProperty;i.messageProperty=h.messageProperty||i.messageProperty;g=h.clientIdProperty;if(i.model){i.model.setFields(f,i.idProperty,g);i.setModel(i.model,true)}else{j=Ext.define("Ext.data.reader.Json-Model"+Ext.id(),{extend:"Ext.data.Model",fields:f,clientIdProperty:g});if(i.idProperty){j.idProperty=i.idProperty}i.setModel(j,true)}},getIdProperty:function(){return this.idProperty||this.model.prototype.idProperty},buildExtractors:function(q){var m=this,j=m.getIdProperty(),k=m.totalProperty,n=m.successProperty,l=m.messageProperty,o,p,r;if(q===true){delete m.convertRecordData}if(m.convertRecordData){return}if(k){m.getTotal=m.createAccessor(k)}if(n){m.getSuccess=m.createAccessor(n)}if(l){m.getMessage=m.createAccessor(l)}if(j){p=m.model.prototype.fields.get(j);if(p){r=p.mapping;j=(r!==undefined&&r!==null)?r:j}o=m.createAccessor(j);m.getId=function(b){var a=o.call(m,b);return(a===undefined||a==="")?null:a}}else{m.getId=function(){return null}}m.convertRecordData=m.buildRecordDataExtractor()},buildRecordDataExtractor:function(){var n=this,i=n.model.prototype,o=i.clientIdProperty,p=i.fields.items,s=p.length,v=[],q="__field",t,r=0,m,u=["var me = this,\n"," fields = me.model.prototype.fields,\n"," value,\n"," internalId"];for(;r<s;r++){m=p[r];v[r]="__field"+r;u.push(",\n ",v[r],' = fields.get("',m.name,'")')}u.push(";\n\n return function(dest, source, record) {\n");for(r=0;r<s;r++){m=p[r];t=v[r];u.push(' dest["'+m.name+'"]'," = ",n.createFieldAccessExpression(m,t,"source"),";\n")}if(o){u.push(" if (record && (internalId = "+n.createFieldAccessExpression({mapping:o},null,"source")+")) {\n");u.push(" record.internalId = internalId;\n }\n")}u.push(" };");return Ext.functionFactory(u.join("")).call(n)},destroyReader:function(){var b=this;delete b.proxy;delete b.model;delete b.convertRecordData;delete b.getId;delete b.getTotal;delete b.getSuccess;delete b.getMessage}},function(){Ext.apply(this.prototype,{nullResultSet:new Ext.data.ResultSet({total:0,count:0,records:[],success:true})})});Ext.define("Ext.data.reader.Json",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.JsonReader",alias:"reader.json",root:"",useSimpleAccessors:false,readRecords:function(b){if(b.metaData){this.onMetaChange(b.metaData)}this.jsonData=b;return this.callParent([b])},getResponseData:function(f){var g,e;try{g=Ext.decode(f.responseText);return this.readRecords(g)}catch(h){e=new Ext.data.ResultSet({total:0,count:0,records:[],success:false,message:h.message});this.fireEvent("exception",this,f,e);Ext.Logger.warn("Unable to parse the JSON returned by the server");return e}},buildExtractors:function(){var b=this;b.callParent(arguments);if(b.root){b.getRoot=b.createAccessor(b.root)}else{b.getRoot=function(a){return a}}},extractData:function(g){var h=this.record,i=[],j,f;if(h){j=g.length;if(!j&&Ext.isObject(g)){j=1;g=[g]}for(f=0;f<j;f++){i[f]=g[f][h]}}else{i=g}return this.callParent([i])},createAccessor:(function(){var b=/[\[\.]/;return function(d){if(Ext.isEmpty(d)){return Ext.emptyFn}if(Ext.isFunction(d)){return d}if(this.useSimpleAccessors!==true){var a=String(d).search(b);if(a>=0){return Ext.functionFactory("obj","return obj"+(a>0?".":"")+d)}}return function(c){return c[d]}}}()),createFieldAccessExpression:(function(){var b=/[\[\.]/;return function(k,o,p){var n=this,m=(k.mapping!==null),l=m?k.mapping:k.name,a,j;if(typeof l==="function"){a=o+".mapping("+p+", this)"}else{if(this.useSimpleAccessors===true||((j=String(l).search(b))<0)){if(!m||isNaN(l)){l='"'+l+'"'}a=p+"["+l+"]"}else{a=p+(j>0?".":"")+l}}if(k.defaultValue!==undefined){a="("+a+" === undefined) ? "+o+".defaultValue : "+a}if(k.convert){a=o+".convert("+a+", record)"}return a}}())});Ext.define("Ext.data.Store",{extend:"Ext.data.AbstractStore",alias:"store.store",requires:["Ext.data.StoreManager","Ext.data.Model","Ext.data.proxy.Ajax","Ext.data.proxy.Memory","Ext.data.reader.Json","Ext.data.writer.Json","Ext.util.LruCache"],uses:["Ext.ModelManager","Ext.util.Grouper"],remoteSort:false,remoteFilter:false,remoteGroup:false,groupField:undefined,groupDir:"ASC",trailingBufferZone:25,leadingBufferZone:200,pageSize:undefined,currentPage:1,clearOnPageLoad:true,loading:false,sortOnFilter:true,buffered:false,purgePageCount:5,clearRemovedOnLoad:true,defaultPageSize:25,statics:{recordIdFn:function(b){return b.internalId},recordIndexFn:function(b){return b.index}},onClassExtended:function(f,i,g){var j=i.model,h;if(typeof j=="string"){h=g.onBeforeCreated;g.onBeforeCreated=function(){var a=this,b=arguments;Ext.require(j,function(){h.apply(a,b)})}}},constructor:function(g){g=Ext.Object.merge({},g);var k=this,i=g.groupers||k.groupers,h=g.groupField||k.groupField,l,j;j=g.data||k.data;k.data=new Ext.util.MixedCollection(false,Ext.data.Store.recordIdFn);if(j){k.inlineData=j;delete g.data}if(!i&&h){i=[{property:h,direction:g.groupDir||k.groupDir}]}delete g.groupers;k.groupers=new Ext.util.MixedCollection();k.groupers.addAll(k.decodeGroupers(i));this.callParent([g]);if(k.buffered){k.pageMap=new k.PageMap({pageSize:k.pageSize,maxSize:k.purgePageCount});k.pagesRequested={};k.sortOnLoad=false;k.filterOnLoad=false}if(k.groupers.items.length){k.sort(k.groupers.items,"prepend",false)}l=k.proxy;j=k.inlineData;if(!k.buffered&&!k.pageSize){k.pageSize=k.defaultPageSize}if(j){if(l instanceof Ext.data.proxy.Memory){l.data=j;k.read()}else{k.add.apply(k,[j])}k.sort();delete k.inlineData}else{if(k.autoLoad){Ext.defer(k.load,10,k,[typeof k.autoLoad==="object"?k.autoLoad:undefined])}}},onBeforeSort:function(){var b=this.groupers;if(b.getCount()>0){this.sort(b.items,"prepend",false)}},decodeGroupers:function(j){if(!Ext.isArray(j)){if(j===undefined){j=[]}else{j=[j]}}var k=j.length,i=Ext.util.Grouper,g,l,h=[];for(l=0;l<k;l++){g=j[l];if(!(g instanceof i)){if(Ext.isString(g)){g={property:g}}g=Ext.apply({root:"data",direction:"ASC"},g);if(g.fn){g.sorterFn=g.fn}if(typeof g=="function"){g={sorterFn:g}}h.push(new i(g))}else{h.push(g)}}return h},group:function(j,i){var k=this,l=false,g,h;if(Ext.isArray(j)){h=j}else{if(Ext.isObject(j)){h=[j]}else{if(Ext.isString(j)){g=k.groupers.get(j);if(!g){g={property:j,direction:i};h=[g]}else{if(i===undefined){g.toggle()}else{g.setDirection(i)}}}}}if(h&&h.length){l=true;h=k.decodeGroupers(h);k.groupers.clear();k.groupers.addAll(h)}if(k.remoteGroup){k.load({scope:k,callback:k.fireGroupChange})}else{k.sort(null,null,null,l);k.fireGroupChange()}},clearGrouping:function(){var i=this,h=i.groupers.items,j=h.length,g,f;for(f=0;f<j;f++){g=h[f];i.sorters.remove(g)}i.groupers.clear();if(i.remoteGroup){i.load({scope:i,callback:i.fireGroupChange})}else{i.sort();i.fireEvent("groupchange",i,i.groupers)}},isGrouped:function(){return this.groupers.getCount()>0},fireGroupChange:function(){this.fireEvent("groupchange",this,this.groupers)},getGroups:function(q){var o=this.data.items,r=o.length,p=[],i={},m,l,k,n;for(n=0;n<r;n++){m=o[n];l=this.getGroupString(m);k=i[l];if(k===undefined){k={name:l,children:[]};p.push(k);i[l]=k}k.children.push(m)}return q?i[q]:p},getGroupsForGrouper:function(m,q){var o=m.length,n=[],r,p,k,i,l;for(l=0;l<o;l++){k=m[l];p=q.getGroupString(k);if(p!==r){i={name:p,grouper:q,records:[]};n.push(i)}i.records.push(k);r=p}return n},getGroupsForGrouperIndex:function(p,k){var m=this,l=m.groupers,i=l.getAt(k),j=m.getGroupsForGrouper(p,i),n=j.length,o;if(k+1<l.length){for(o=0;o<n;o++){j[o].children=m.getGroupsForGrouperIndex(j[o].records,k+1)}}for(o=0;o<n;o++){j[o].depth=k}return j},getGroupData:function(d){var c=this;if(d!==false){c.sort()}return c.getGroupsForGrouperIndex(c.data.items,0)},getGroupString:function(d){var c=this.groupers.first();if(c){return d.get(c.property)}return""},insert:function(m,n){var j=this,k=false,l,h,i;n=[].concat(n);for(l=0,i=n.length;l<i;l++){h=j.createModel(n[l]);h.set(j.modelDefaults);n[l]=h;j.data.insert(m+l,h);h.join(j);k=k||h.phantom===true}if(j.snapshot){j.snapshot.addAll(n)}if(j.requireSort){j.suspendEvents();j.sort();j.resumeEvents()}j.fireEvent("add",j,n,m);j.fireEvent("datachanged",j);if(j.autoSync&&k&&!j.autoSyncSuspended){j.sync()}},add:function(g){if(!Ext.isArray(g)){g=Array.prototype.slice.apply(arguments)}var j=this,l=0,k=g.length,h,i=j.sorters&&j.sorters.items.length;if(i&&k===1){return[j.addSorted(j.createModel(g[0]))]}for(;l<k;l++){h=j.createModel(g[l]);g[l]=h}if(i){j.requireSort=true}j.insert(j.data.length,g);delete j.requireSort;return g},addSorted:function(e){var f=this,d=f.data.findInsertionIndex(e,f.generateComparator());f.insert(d,e);return e},createModel:function(b){if(!b.isModel){b=Ext.ModelManager.create(b,this.model)}return b},each:function(k,l){var j=this.data.items,d=j.length,h,i;for(i=0;i<d;i++){h=j[i];if(k.call(l||h,h,i,d)===false){break}}},remove:function(q,i){if(!Ext.isArray(q)){q=[q]}i=i===true;var m=this,l=false,p=0,r=q.length,k,n,o;for(;p<r;p++){o=q[p];n=m.data.indexOf(o);if(m.snapshot){m.snapshot.remove(o)}if(n>-1){k=o.phantom===true;if(!i&&!k){m.removed.push(o)}o.unjoin(m);m.data.remove(o);l=l||!k;m.fireEvent("remove",m,o,n)}}m.fireEvent("datachanged",m);if(!i&&m.autoSync&&l&&!m.autoSyncSuspended){m.sync()}},removeAt:function(c){var d=this.getAt(c);if(d){this.remove(d)}},load:function(d){var c=this;d=d||{};if(typeof d=="function"){d={callback:d}}d.groupers=d.groupers||c.groupers.items;d.page=d.page||c.currentPage;d.start=(d.start!==undefined)?d.start:(c.currentPage-1)*c.pageSize;d.limit=d.limit||c.pageSize;d.addRecords=d.addRecords||false;if(c.buffered){return c.loadToPrefetch(d)}return c.callParent([d])},onProxyLoad:function(f){var i=this,j=f.getResultSet(),g=f.getRecords(),h=f.wasSuccessful();if(j){i.totalCount=j.total}if(h){i.loadRecords(g,f)}i.loading=false;i.fireEvent("load",i,g,h);i.fireEvent("read",i,g,f.wasSuccessful());Ext.callback(f.callback,f.scope||i,[g,f,h])},getNewRecords:function(){return this.data.filterBy(this.filterNew).items},getUpdatedRecords:function(){return this.data.filterBy(this.filterUpdated).items},filter:function(l,k){if(Ext.isString(l)){l={property:l,value:k}}var m=this,i=m.decodeFilters(l),h=0,j=m.sorters.length&&m.sortOnFilter&&!m.remoteSort,n=i.length;for(;h<n;h++){m.filters.replace(i[h])}if(m.remoteFilter){if(m.buffered){m.pageMap.clear();m.loadPage(1)}else{m.currentPage=1;m.load()}}else{if(m.filters.getCount()){m.snapshot=m.snapshot||m.data.clone();m.data=m.data.filter(m.filters.items);if(j){m.sort()}else{m.fireEvent("datachanged",m);m.fireEvent("refresh",m)}}}},clearFilter:function(d){var c=this;c.filters.clear();if(c.remoteFilter){if(d){return}if(c.buffered){c.pageMap.clear();c.loadPage(1)}else{c.currentPage=1;c.load()}}else{if(c.isFiltered()){c.data=c.snapshot.clone();delete c.snapshot;if(d!==true){c.fireEvent("datachanged",c);c.fireEvent("refresh",c)}}}},isFiltered:function(){var b=this.snapshot;return !!b&&b!==this.data},filterBy:function(d,e){var f=this;f.snapshot=f.snapshot||f.data.clone();f.data=f.queryBy(d,e||f);f.fireEvent("datachanged",f);f.fireEvent("refresh",f)},queryBy:function(e,f){var h=this,g=h.snapshot||h.data;return g.filterBy(e,f||h)},loadData:function(j,i){var n=this.model,k=j.length,l=[],m,h;for(m=0;m<k;m++){h=j[m];if(!(h instanceof Ext.data.Model)){h=Ext.ModelManager.create(h,n)}l.push(h)}this.loadRecords(l,{addRecords:i})},loadRawData:function(h,f){var i=this,g=i.proxy.reader.read(h),j=g.records;if(g.success){i.totalCount=g.total;i.loadRecords(j,{addRecords:f});i.fireEvent("load",i,j,true)}},loadRecords:function(h,n){var k=this,m=0,l=h.length,j=(n=n||{}).start,i=k.snapshot;if(!n.addRecords){delete k.snapshot;k.clearData(true)}else{if(i){i.addAll(h)}}k.data.addAll(h);if(typeof j!="undefined"){for(;m<l;m++){h[m].index=j+m;h[m].join(k)}}else{for(;m<l;m++){h[m].join(k)}}k.suspendEvents();if(k.filterOnLoad&&!k.remoteFilter){k.filter()}if(k.sortOnLoad&&!k.remoteSort){k.sort()}k.resumeEvents();k.fireEvent("datachanged",k,h);k.fireEvent("refresh",k)},loadPage:function(f,e){var d=this;d.currentPage=f;e=Ext.apply({page:f,start:(f-1)*d.pageSize,limit:d.pageSize,addRecords:!d.clearOnPageLoad},e);if(d.buffered){return d.loadToPrefetch(e)}d.read(e)},nextPage:function(b){this.loadPage(this.currentPage+1,b)},previousPage:function(b){this.loadPage(this.currentPage-1,b)},clearData:function(g){var h=this,f=h.data.items,e=f.length;while(e--){f[e].unjoin(h)}h.data.clear();if(g!==true||h.clearRemovedOnLoad){h.removed=[]}},loadToPrefetch:function(d){var c=this;c.on({prefetch:c.onItitialPrefetch,scope:c,single:true});return c.prefetch(d||{})},onItitialPrefetch:function(h,e,g,f){h.guaranteeRange(f.start,(h.viewSize||h.pageSize)-1)},prefetch:function(h){var g=this,f=g.pageSize,e;if(f){if(g.lastPageSize&&f!=g.lastPageSize){Ext.error.raise("pageSize cannot be dynamically altered")}if(!g.pageMap.pageSize){g.pageMap.pageSize=f}}else{g.pageSize=g.pageMap.pageSize=f=h.limit}g.lastPageSize=f;if(!h.page){h.page=g.getPageFromRecordIndex(h.start);h.start=(h.page-1)*f;h.limit=Math.ceil(h.limit/f)*f}if(!g.pagesRequested[h.page]){g.pagesRequested[h.page]=true;h=Ext.apply({action:"read",filters:g.filters.items,sorters:g.sorters.items},h);e=new Ext.data.Operation(h);if(g.fireEvent("beforeprefetch",g,e)!==false){g.loading=true;g.proxy.read(e,g.onProxyPrefetch,g)}}return g},prefetchPage:function(k,n){var l=this,h=l.pageSize||l.defaultPageSize,j=(k-1)*l.pageSize,i=j+h,m=l.getTotalCount();if(m){i=Math.min(i,m)}if(l.getCount()===m){return}l.prefetch(Ext.apply({page:k,start:j,limit:h},n))},onProxyPrefetch:function(g){var k=this,l=g.getResultSet(),h=g.getRecords(),i=g.wasSuccessful(),j=g.page;if(l){k.totalCount=l.total;k.fireEvent("totalcountchange",k.totalCount)}if(j!==undefined){delete k.pagesRequested[j]}if(i){k.cachePage(h,g.page)}k.loading=false;k.fireEvent("prefetch",k,h,i,g);Ext.callback(g.callback,g.scope||k,[h,g,i])},cachePage:function(e,f){var d=this;if(!Ext.isDefined(d.totalCount)){d.totalCount=e.length;d.fireEvent("totalcountchange",d.totalCount)}d.pageMap.addPage(f,e)},rangeCached:function(c,d){return this.pageMap&&this.pageMap.hasRange(c,d)},pageCached:function(b){return this.pageMap&&this.pageMap.hasPage(b)},rangeSatisfied:function(c,d){return this.rangeCached(c,d)},getPageFromRecordIndex:function(b){return Math.floor(b/this.pageSize)+1},onGuaranteedRange:function(k){var j=this,g=j.getTotalCount(),i=k.prefetchStart,h=((g-1)<k.prefetchEnd)?g-1:k.prefetchEnd,l;h=Math.max(0,h);if(i>h){Ext.log({level:"warn",msg:"Start ("+i+") was greater than end ("+h+") for the range of records requested ("+i+"-"+k.prefetchEnd+")"+(this.storeId?' from store "'+this.storeId+'"':"")})}l=j.pageMap.getRange(i,h);j.fireEvent("guaranteedrange",l,i,h);if(k.cb){k.cb.call(k.scope||j,l,i,h)}},prefetchRange:function(i,g){var k=this,l,h,j;if(!k.rangeCached(i,g)){l=k.getPageFromRecordIndex(i);h=k.getPageFromRecordIndex(g);k.pageMap.maxSize=k.purgePageCount?(h-l+1)+k.purgePageCount:0;for(j=l;j<=h;j++){if(!k.pageCached(j)){k.prefetchPage(j)}}}},guaranteeRange:function(k,p,j,m){p=(p>this.totalCount)?this.totalCount-1:p;var l=this,n=l.lastRequestStart,o={prefetchStart:k,prefetchEnd:p,cb:j,scope:m},i;l.lastRequestStart=k;if(l.rangeCached(k,p)){if(k<n){k=Math.max(k-l.leadingBufferZone,0);p=Math.min(p+l.trailingBufferZone,l.totalCount-1)}else{k=Math.max(Math.min(k-l.trailingBufferZone,l.totalCount-l.pageSize),0);p=Math.min(p+l.leadingBufferZone,l.totalCount-1)}if(!l.rangeCached(k,p)){l.prefetchRange(k,p)}l.onGuaranteedRange(o)}else{l.fireEvent("cachemiss",l,k,p);k=Math.min(Math.max(Math.floor(k-((l.leadingBufferZone+l.trailingBufferZone)/2)),0),l.totalCount-l.pageSize);p=Math.min(Math.max(Math.ceil(p+((l.leadingBufferZone+l.trailingBufferZone)/2)),0),l.totalCount-1);i=function(a,b){if(l.rangeCached(o.prefetchStart,o.prefetchEnd)){l.fireEvent("cachefilled",l,k,p);l.pageMap.un("pageAdded",i);l.onGuaranteedRange(o)}};l.pageMap.on("pageAdded",i);l.prefetchRange(o.prefetchStart,o.prefetchEnd);l.prefetchRange(k,p)}},sort:function(){var c=this,d=c.pageMap;if(c.buffered){if(c.remoteSort){d.clear();c.callParent(arguments)}else{c.callParent(arguments)}}else{c.callParent(arguments)}},doSort:function(f){var h=this,g,i,j;if(h.remoteSort){if(h.buffered){h.pageMap.clear();h.loadPage(1)}else{h.load()}}else{h.data.sortBy(f);if(!h.buffered){g=h.getRange();i=g.length;j=0;for(;j<i;j++){g[j].index=j}}h.fireEvent("datachanged",h);h.fireEvent("refresh",h)}},find:function(l,m,j,k,i,n){var h=this.createFilterFn(l,m,k,i,n);return h?this.data.findIndexBy(h,null,j):-1},findRecord:function(){var c=this,d=c.find.apply(c,arguments);return d!==-1?c.getAt(d):null},createFilterFn:function(i,j,h,g,f){if(Ext.isEmpty(j)){return false}j=this.data.createValueMatcher(j,h,g,f);return function(a){return j.test(a.data[i])}},findExact:function(d,e,f){return this.data.findIndexBy(function(a){return a.isEqual(a.get(d),e)},this,f)},findBy:function(d,e,f){return this.data.findIndexBy(d,e,f)},collect:function(f,g,j){var i=this,h=(j===true&&i.snapshot)?i.snapshot:i.data;return h.collect(f,"data",g)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalCount},getAt:function(b){return this.data.getAt(b)},getRange:function(c,d){return this.data.getRange(c,d)},getById:function(b){return(this.snapshot||this.data).findBy(function(a){return a.getId()===b})},indexOf:function(b){return this.data.indexOf(b)},indexOfTotal:function(d){var c=d.index;if(c||c===0){return c}return this.indexOf(d)},indexOfId:function(b){return this.indexOf(this.getById(b))},removeAll:function(d){var c=this;c.clearData();if(c.snapshot){c.snapshot.clear()}if(c.pageMap){c.pageMap.clear()}if(d!==true){c.fireEvent("clear",c)}},first:function(d){var c=this;if(d&&c.isGrouped()){return c.aggregate(function(a){return a.length?a[0]:undefined},c,true)}else{return c.data.first()}},last:function(d){var c=this;if(d&&c.isGrouped()){return c.aggregate(function(a){var b=a.length;return b?a[b-1]:undefined},c,true)}else{return c.data.last()}},sum:function(f,e){var d=this;if(e&&d.isGrouped()){return d.aggregate(d.getSum,d,true,[f])}else{return d.getSum(d.data.items,f)}},getSum:function(f,h){var i=0,j=0,g=f.length;for(;j<g;++j){i+=f[j].get(h)}return i},count:function(d){var c=this;if(d&&c.isGrouped()){return c.aggregate(function(a){return a.length},c,true)}else{return c.getCount()}},min:function(f,e){var d=this;if(e&&d.isGrouped()){return d.aggregate(d.getMin,d,true,[f])}else{return d.getMin(d.data.items,f)}},getMin:function(g,i){var k=1,h=g.length,j,l;if(h>0){l=g[0].get(i)}for(;k<h;++k){j=g[k].get(i);if(j<l){l=j}}return l},max:function(f,e){var d=this;if(e&&d.isGrouped()){return d.aggregate(d.getMax,d,true,[f])}else{return d.getMax(d.data.items,f)}},getMax:function(l,i){var k=1,g=l.length,j,h;if(g>0){h=l[0].get(i)}for(;k<g;++k){j=l[k].get(i);if(j>h){h=j}}return h},average:function(f,e){var d=this;if(e&&d.isGrouped()){return d.aggregate(d.getAverage,d,true,[f])}else{return d.getAverage(d.data.items,f)}},getAverage:function(f,h){var j=0,g=f.length,i=0;if(f.length>0){for(;j<g;++j){i+=f[j].get(h)}return i/g}return 0},aggregate:function(l,i,n,m){m=m||[];if(n&&this.isGrouped()){var r=this.getGroups(),p=0,o=r.length,q={},k;for(;p<o;++p){k=r[p];q[k.name]=l.apply(i||this,[k.children].concat(m))}return q}else{return l.apply(i||this,[this.data.items].concat(m))}},commitChanges:function(){var h=this,g=h.getModifiedRecords(),f=g.length,e=0;for(;e<f;e++){g[e].commit()}h.removed.length=0},filterNewOnly:function(b){return b.phantom===true},getRejectRecords:function(){var b=this.data.filterBy(this.filterNewOnly).items;return b.concat(this.getUpdatedRecords())},rejectChanges:function(){var j=this,i=j.getRejectRecords(),g=i.length,f=0,h;for(;f<g;f++){h=i[f];h.reject();if(h.phantom){j.remove(h)}}i=j.removed;g=i.length;for(f=0;f<g;f++){h=i[f];j.insert(h.index||0,h);h.reject()}j.removed.length=0}},function(){Ext.regStore("ext-empty-store",{fields:[],proxy:"memory"});this.prototype.PageMap=new Ext.Class({extend:"Ext.util.LruCache",getPageFromRecordIndex:this.prototype.getPageFromRecordIndex,addPage:function(c,d){this.add(c,d);this.fireEvent("pageAdded",c,d)},getPage:function(b){return this.get(b)},hasRange:function(g,e){var h=this.getPageFromRecordIndex(g),f=this.getPageFromRecordIndex(e);for(;h<=f;h++){if(!this.hasPage(h)){return false}}return true},hasPage:function(b){return !!this.map[b]},getRange:function(B,A){if(!this.hasRange(B,A)){Ext.Error.raise("PageMap asked for range which it does not have")}var t=this,w=t.getPageFromRecordIndex(B),q=t.getPageFromRecordIndex(A),z=(w-1)*t.pageSize,p=(q*t.pageSize)-1,u=w,i=[],r,v,s,y=0,x;for(;u<=q;u++){if(u==w){r=B-z;s=true}else{r=0;s=false}if(u==q){v=t.pageSize-(p-A);s=true}if(s){Ext.Array.push(i,Ext.Array.slice(t.getPage(u),r,v))}else{Ext.Array.push(i,t.getPage(u))}}for(x=i.length;y<x;y++){i[y].index=B++}return i}})});Ext.define("Ext.selection.Model",{extend:"Ext.util.Observable",alternateClassName:"Ext.AbstractSelectionModel",requires:["Ext.data.StoreManager"],mixins:{bindable:"Ext.util.Bindable"},allowDeselect:false,selected:null,pruneRemoved:true,constructor:function(d){var c=this;d=d||{};Ext.apply(c,d);c.addEvents("selectionchange","focuschange");c.modes={SINGLE:true,SIMPLE:true,MULTI:true};c.setSelectionMode(d.mode||c.mode);c.selected=new Ext.util.MixedCollection();c.callParent(arguments)},bindStore:function(e,d){var f=this;f.mixins.bindable.bindStore.apply(f,arguments);if(f.store&&!d){f.refresh()}},getStoreListeners:function(){var b=this;return{add:b.onStoreAdd,clear:b.onStoreClear,remove:b.onStoreRemove,update:b.onStoreUpdate}},selectAll:function(g){var j=this,k=j.store.getRange(),l=0,h=k.length,i=j.getSelection().length;j.bulkChange=true;for(;l<h;l++){j.doSelect(k[l],true,g)}delete j.bulkChange;j.maybeFireSelectionChange(j.getSelection().length!==i)},deselectAll:function(g){var j=this,k=j.getSelection(),l=0,h=k.length,i=j.getSelection().length;j.bulkChange=true;for(;l<h;l++){j.doDeselect(k[l],g)}delete j.bulkChange;j.maybeFireSelectionChange(j.getSelection().length!==i)},selectWithEvent:function(f,g,h){var e=this;switch(e.selectionMode){case"MULTI":if(g.ctrlKey&&e.isSelected(f)){e.doDeselect(f,false)}else{if(g.shiftKey&&e.lastFocused){e.selectRange(e.lastFocused,f,g.ctrlKey)}else{if(g.ctrlKey){e.doSelect(f,true,false)}else{if(e.isSelected(f)&&!g.shiftKey&&!g.ctrlKey&&e.selected.getCount()>1){e.doSelect(f,h,false)}else{e.doSelect(f,false)}}}}break;case"SIMPLE":if(e.isSelected(f)){e.doDeselect(f)}else{e.doSelect(f,true)}break;case"SINGLE":if(e.allowDeselect&&e.isSelected(f)){e.doDeselect(f)}else{e.doSelect(f,false)}break}},selectRange:function(m,r,i,t){var o=this,n=o.store,s=0,p,q,v,u=[];if(o.isLocked()){return}if(!i){o.deselectAll(true)}if(!Ext.isNumber(m)){m=n.indexOf(m)}if(!Ext.isNumber(r)){r=n.indexOf(r)}if(m>r){q=r;r=m;m=q}for(p=m;p<=r;p++){if(o.isSelected(n.getAt(p))){s++}}if(!t){v=-1}else{v=(t=="up")?m:r}for(p=m;p<=r;p++){if(s==(r-m+1)){if(p!=v){o.doDeselect(p,true)}}else{u.push(n.getAt(p))}}o.doMultiSelect(u,true)},select:function(d,f,e){if(Ext.isDefined(d)){this.doSelect(d,f,e)}},deselect:function(c,d){this.doDeselect(c,d)},doSelect:function(j,h,f){var i=this,g;if(i.locked||!i.store){return}if(typeof j==="number"){j=[i.store.getAt(j)]}if(i.selectionMode=="SINGLE"&&j){g=j.length?j[0]:j;i.doSingleSelect(g,f)}else{i.doMultiSelect(j,h,f)}},doMultiSelect:function(t,i,l){var n=this,s=n.selected,m=false,q=0,o,p;if(n.locked){return}t=!Ext.isArray(t)?[t]:t;o=t.length;if(!i&&s.getCount()>0){if(n.doDeselect(n.getSelection(),l)===false){return}}function r(){s.add(p);m=true}for(;q<o;q++){p=t[q];if(i&&n.isSelected(p)){continue}n.lastSelected=p;n.onSelectChange(p,true,l,r)}if(!n.preventFocus){n.setLastFocused(p,l)}n.maybeFireSelectionChange(m&&!l)},doDeselect:function(t,l){var m=this,s=m.selected,q=0,n,p,i=0,o=0;if(m.locked||!m.store){return false}if(typeof t==="number"){t=[m.store.getAt(t)]}else{if(!Ext.isArray(t)){t=[t]}}function r(){++o;s.remove(p)}n=t.length;for(;q<n;q++){p=t[q];if(m.isSelected(p)){if(m.lastSelected==p){m.lastSelected=s.last()}++i;m.onSelectChange(p,false,l,r)}}m.maybeFireSelectionChange(o>0&&!l);return o===i},doSingleSelect:function(h,g){var k=this,i=false,l=k.selected;if(k.locked){return}if(k.isSelected(h)){return}function j(){k.bulkChange=true;if(l.getCount()>0&&k.doDeselect(k.lastSelected,g)===false){delete k.bulkChange;return false}delete k.bulkChange;l.add(h);k.lastSelected=h;i=true}k.onSelectChange(h,true,g,j);if(i){if(!g){k.setLastFocused(h)}k.maybeFireSelectionChange(!g)}},setLastFocused:function(h,e){var g=this,f=g.lastFocused;g.lastFocused=h;if(h!==f){g.onLastFocusChanged(f,h,e)}},isFocused:function(b){return b===this.getLastFocused()},maybeFireSelectionChange:function(d){var c=this;if(d&&!c.bulkChange){c.fireEvent("selectionchange",c,c.getSelection())}},getLastSelected:function(){return this.lastSelected},getLastFocused:function(){return this.lastFocused},getSelection:function(){return this.selected.getRange()},getSelectionMode:function(){return this.selectionMode},setSelectionMode:function(b){b=b?b.toUpperCase():"SINGLE";this.selectionMode=this.modes[b]?b:"SINGLE"},isLocked:function(){return this.locked},setLocked:function(b){this.locked=!!b},isSelected:function(b){b=Ext.isNumber(b)?this.store.getAt(b):b;return this.selected.indexOf(b)!==-1},hasSelection:function(){return this.selected.getCount()>0},refresh:function(){var l=this,i=[],m=l.getSelection(),j=m.length,n,k,o=0,p=this.getLastFocused();for(;o<j;o++){n=m[o];if(!this.pruneRemoved||l.store.indexOf(n)!==-1){i.push(n)}}if(l.selected.getCount()!=i.length){k=true}l.clearSelections();if(l.store.indexOf(p)!==-1){this.setLastFocused(p,true)}if(i.length){l.doSelect(i,false,true)}l.maybeFireSelectionChange(k)},clearSelections:function(){this.selected.clear();this.lastSelected=null;this.setLastFocused(null)},onStoreAdd:function(){},onStoreClear:function(){if(this.selected.getCount>0){this.clearSelections();this.maybeFireSelectionChange(true)}},onStoreRemove:function(f,g,j){var h=this,i=h.selected;if(h.locked||!h.pruneRemoved){return}if(i.remove(g)){if(h.lastSelected==g){h.lastSelected=null}if(h.getLastFocused()==g){h.setLastFocused(null)}h.maybeFireSelectionChange(true)}},getCount:function(){return this.selected.getCount()},destroy:function(){},onStoreUpdate:function(){},onSelectChange:function(e,f,d){},onLastFocusChanged:function(c,d){this.fireEvent("focuschange",this,c,d)},onEditorKey:function(c,d){},bindComponent:function(b){}});Ext.define("Ext.selection.DataViewModel",{extend:"Ext.selection.Model",requires:["Ext.util.KeyNav"],deselectOnContainerClick:true,enableKeyNav:true,constructor:function(b){this.addEvents("beforedeselect","beforeselect","deselect","select");this.callParent(arguments)},bindComponent:function(e){var d=this,f={refresh:d.refresh,scope:d};d.view=e;d.bindStore(e.getStore());f[e.triggerEvent]=d.onItemClick;f[e.triggerCtEvent]=d.onContainerClick;e.on(f);if(d.enableKeyNav){d.initKeyNav(e)}},onItemClick:function(e,g,i,j,h){this.selectWithEvent(g,h)},onContainerClick:function(){if(this.deselectOnContainerClick){this.deselectAll()}},initKeyNav:function(d){var c=this;if(!d.rendered){d.on({render:Ext.Function.bind(c.initKeyNav,c,[d]),single:true});return}d.el.set({tabIndex:-1});c.keyNav=new Ext.util.KeyNav(d.el,{down:Ext.pass(c.onNavKey,[1],c),right:Ext.pass(c.onNavKey,[1],c),left:Ext.pass(c.onNavKey,[-1],c),up:Ext.pass(c.onNavKey,[-1],c),scope:c})},onNavKey:function(i){i=i||1;var j=this,g=j.view,k=j.getSelection()[0],l=j.view.store.getCount(),h;if(k){h=g.indexOf(g.getNode(k))+i}else{h=0}if(h<0){h=l-1}else{if(h>=l){h=0}}j.select(h)},onSelectChange:function(h,l,m,j){var k=this,i=k.view,n=l?"select":"deselect";if((m||k.fireEvent("before"+n,k,h))!==false&&j()!==false){if(l){i.onItemSelect(h)}else{i.onItemDeselect(h)}if(!m){k.fireEvent(n,k,h)}}},destroy:function(){Ext.destroy(this.keyNav);this.callParent()}});Ext.define("Ext.view.AbstractView",{extend:"Ext.Component",requires:["Ext.LoadMask","Ext.data.StoreManager","Ext.CompositeElementLite","Ext.DomQuery","Ext.selection.DataViewModel"],mixins:{bindable:"Ext.util.Bindable"},inheritableStatics:{getRecord:function(b){return this.getBoundView(b).getRecord(b)},getBoundView:function(b){return Ext.getCmp(b.boundView)}},deferInitialRefresh:true,itemCls:Ext.baseCSSPrefix+"dataview-item",loadingText:"Loading...",loadMask:true,loadingUseMsg:true,selectedItemCls:Ext.baseCSSPrefix+"item-selected",emptyText:"",deferEmptyText:true,trackOver:false,blockRefresh:false,preserveScrollOnRefresh:false,last:false,triggerEvent:"itemclick",triggerCtEvent:"containerclick",addCmpEvents:function(){},initComponent:function(){var h=this,f=Ext.isDefined,g=h.itemTpl,e={};if(g){if(Ext.isArray(g)){g=g.join("")}else{if(Ext.isObject(g)){e=Ext.apply(e,g.initialConfig);g=g.html}}if(!h.itemSelector){h.itemSelector="."+h.itemCls}g=Ext.String.format('<tpl for="."><div class="{0}">{1}</div></tpl>',h.itemCls,g);h.tpl=new Ext.XTemplate(g,e)}if(!f(h.tpl)||!f(h.itemSelector)){Ext.Error.raise({sourceClass:"Ext.view.View",tpl:h.tpl,itemSelector:h.itemSelector,msg:"DataView requires both tpl and itemSelector configurations to be defined."})}h.callParent();if(Ext.isString(h.tpl)||Ext.isArray(h.tpl)){h.tpl=new Ext.XTemplate(h.tpl)}if(f(h.overCls)||f(h.overClass)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.view.View: Using the deprecated overCls or overClass configuration. Use overItemCls instead.")}h.overItemCls=h.overCls||h.overClass;delete h.overCls;delete h.overClass}if(h.overItemCls){h.trackOver=true}if(f(h.selectedCls)||f(h.selectedClass)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.view.View: Using the deprecated selectedCls or selectedClass configuration. Use selectedItemCls instead.")}h.selectedItemCls=h.selectedCls||h.selectedClass;delete h.selectedCls;delete h.selectedClass}h.addEvents("beforerefresh","refresh","viewready","itemupdate","itemadd","itemremove");h.addCmpEvents();h.store=Ext.data.StoreManager.lookup(h.store||"ext-empty-store");h.all=new Ext.CompositeElementLite();h.scrollState={top:0,left:0};h.on({scroll:h.onViewScroll,element:"el",scope:h})},onRender:function(){var f=this,d=f.loadMask,e={msg:f.loadingText,msgCls:f.loadingCls,useMsg:f.loadingUseMsg};f.callParent(arguments);if(d){if(Ext.isObject(d)){e=Ext.apply(e,d)}f.loadMask=new Ext.LoadMask(f,e);f.loadMask.on({scope:f,beforeshow:f.onMaskBeforeShow,hide:f.onMaskHide})}},onMaskBeforeShow:function(){var c=this,d=c.loadingHeight;c.getSelectionModel().deselectAll();c.all.clear();if(d&&d>c.getHeight()){c.hasLoadingHeight=true;c.oldMinHeight=c.minHeight;c.minHeight=d;c.updateLayout()}},onMaskHide:function(){var b=this;if(!b.destroying&&b.hasLoadingHeight){b.minHeight=b.oldMinHeight;b.updateLayout();delete b.hasLoadingHeight}},afterRender:function(){this.callParent(arguments);this.getSelectionModel().bindComponent(this)},getSelectionModel:function(){var d=this,c="SINGLE";if(!d.selModel){d.selModel={}}if(d.simpleSelect){c="SIMPLE"}else{if(d.multiSelect){c="MULTI"}}Ext.applyIf(d.selModel,{allowDeselect:d.allowDeselect,mode:c});if(!d.selModel.events){d.selModel=new Ext.selection.DataViewModel(d.selModel)}if(!d.selModel.hasRelaySetup){d.relayEvents(d.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect","focuschange"]);d.selModel.hasRelaySetup=true}if(d.disableSelection){d.selModel.locked=true}return d.selModel},refresh:function(){var l=this,i,g,k,j,h;if(!l.rendered||l.isDestroyed){return}if(!l.hasListeners.beforerefresh||l.fireEvent("beforerefresh",l)!==false){i=l.getTargetEl();h=l.store.getRange();j=i.dom;if(!l.preserveScrollOnRefresh){g=j.parentNode;j.style.display="none";k=j.nextSibling;g.removeChild(j)}if(l.refreshCounter){l.clearViewEl()}else{l.fixedNodes=i.dom.childNodes.length;l.refreshCounter=1}l.tpl.append(i,l.collectData(h,0));if(h.length<1){if(!l.deferEmptyText||l.hasSkippedEmptyText){Ext.core.DomHelper.insertHtml("beforeEnd",i.dom,l.emptyText)}l.all.clear()}else{l.all.fill(Ext.query(l.getItemSelector(),i.dom));l.updateIndexes(0)}l.selModel.refresh();l.hasSkippedEmptyText=true;if(!l.preserveScrollOnRefresh){g.insertBefore(j,k);j.style.display=""}this.refreshSize();l.fireEvent("refresh",l);if(!l.viewReady){l.viewReady=true;l.fireEvent("viewready",l)}}},refreshSize:function(){var b=this.getSizeModel();if(b.height.shrinkWrap||b.width.shrinkWrap){this.updateLayout()}},clearViewEl:function(){var c=this,d=c.getTargetEl();if(c.fixedNodes){while(d.dom.childNodes[c.fixedNodes]){d.dom.removeChild(d.dom.childNodes[c.fixedNodes])}}else{d.update("")}c.refreshCounter++},onViewScroll:Ext.emptyFn,saveScrollState:function(){if(this.rendered){var c=this.el.dom,d=this.scrollState;d.left=c.scrollLeft;d.top=c.scrollTop}},restoreScrollState:function(){if(this.rendered){var c=this.el.dom,d=this.scrollState;c.scrollLeft=d.left;c.scrollTop=d.top}},prepareData:function(h,i,j){var f,g;if(j){f=j.getAssociatedData();for(g in f){if(f.hasOwnProperty(g)){h[g]=f[g]}}}return h},collectData:function(l,i){var j=[],k=0,h=l.length,g;for(;k<h;k++){g=l[k];j[k]=this.prepareData(g.data,i+k,g)}return j},bufferRender:function(f,e){var h=this,g=h.renderBuffer||(h.renderBuffer=document.createElement("div"));h.tpl.overwrite(g,h.collectData(f,e));return Ext.query(h.getItemSelector(),g)},onUpdate:function(h,g){var i=this,f=i.store.indexOf(g),j;if(f>-1){j=i.bufferRender([g],f)[0];if(i.getNode(g)){i.all.replaceElement(f,j,true);i.updateIndexes(f,f);i.selModel.refresh();if(i.hasListeners.itemupdate){i.fireEvent("itemupdate",g,f,j)}return j}}},onAdd:function(h,f,j){var i=this,g;if(i.all.getCount()===0){i.refresh();return}g=i.bufferRender(f,j);i.doAdd(g,f,j);i.selModel.refresh();i.updateIndexes(j);this.refreshSize();if(i.hasListeners.itemadd){i.fireEvent("itemadd",f,j,g)}},doAdd:function(f,g,j){var i=this.all,h=i.getCount();if(h===0){this.clearViewEl();this.getTargetEl().appendChild(f)}else{if(j<h){if(j===0){i.item(j).insertSibling(f,"before",true)}else{i.item(j-1).insertSibling(f,"after",true)}}else{i.last().insertSibling(f,"after",true)}}Ext.Array.insert(i.elements,j,f)},onRemove:function(g,f,e){var h=this;h.doRemove(f,e);h.updateIndexes(e);this.refreshSize();if(h.hasListeners.itemremove){h.fireEvent("itemremove",f,e)}},doRemove:function(d,c){this.all.removeElement(c,true)},refreshNode:function(b){this.onUpdate(this.store,this.store.getAt(b))},updateIndexes:function(h,i){var j=this.all.elements,g=this.store.getRange(),f;h=h||0;i=i||((i===0)?0:(j.length-1));for(f=h;f<=i;f++){j[f].viewIndex=f;j[f].viewRecordId=g[f].internalId;if(!j[f].boundView){j[f].boundView=this.id}}},getStore:function(){return this.store},bindStore:function(e,d){var f=this;f.mixins.bindable.bindStore.apply(f,arguments);f.getSelectionModel().bindStore(f.store);if(e&&!e.loading){if(d&&f.deferInitialRefresh){Ext.Function.defer(function(){if(!f.isDestroyed){f.refresh(true)}},1)}else{f.refresh(true)}}},onUnbindStore:function(b){this.setMaskBind(null)},onBindStore:function(b){this.setMaskBind(b)},setMaskBind:function(c){var d=this.loadMask;if(d&&d.bindStore){d.bindStore(c)}},getStoreListeners:function(){var b=this;return{refresh:b.onDataRefresh,add:b.onAdd,remove:b.onRemove,update:b.onUpdate,clear:b.refresh}},onDataRefresh:function(){if(this.blockRefresh!==true){this.refresh.apply(this,arguments)}},findItemByChild:function(b){return Ext.fly(b).findParent(this.getItemSelector(),this.getTargetEl())},findTargetByEvent:function(b){return b.getTarget(this.getItemSelector(),this.getTargetEl())},getSelectedNodes:function(){var e=[],f=this.selModel.getSelection(),g=f.length,h=0;for(;h<g;h++){e.push(this.getNode(f[h]))}return e},getRecords:function(j){var f=[],i=0,g=j.length,h=this.store.data;for(;i<g;i++){f[f.length]=h.getByKey(j[i].viewRecordId)}return f},getRecord:function(b){return this.store.data.getByKey(Ext.getDom(b).viewRecordId)},isSelected:function(c){var d=this.getRecord(c);return this.selModel.isSelected(d)},select:function(d,f,e){this.selModel.select(d,f,e)},deselect:function(c,d){this.selModel.deselect(c,d)},getNode:function(b){if(!this.rendered){return null}if(Ext.isString(b)){return document.getElementById(b)}if(Ext.isNumber(b)){return this.all.elements[b]}if(b instanceof Ext.data.Model){return this.getNodeByRecord(b)}return b},getNodeByRecord:function(f){var h=this.all.elements,g=h.length,e=0;for(;e<g;e++){if(h[e].viewRecordId===f.internalId){return h[e]}}return null},getNodes:function(h,g){var i=this.all.elements,f=[],j;h=h||0;g=!Ext.isDefined(g)?Math.max(i.length-1,0):g;if(h<=g){for(j=h;j<=g&&i[j];j++){f.push(i[j])}}else{for(j=h;j>=g&&i[j];j--){f.push(i[j])}}return f},indexOf:function(b){b=this.getNode(b);if(Ext.isNumber(b.viewIndex)){return b.viewIndex}return this.all.indexOf(b)},onDestroy:function(){var b=this;b.all.clear();b.callParent();b.bindStore(null);b.selModel.destroy()},onItemSelect:function(d){var c=this.getNode(d);if(c){Ext.fly(c).addCls(this.selectedItemCls)}},onItemDeselect:function(d){var c=this.getNode(d);if(c){Ext.fly(c).removeCls(this.selectedItemCls)}},getItemSelector:function(){return this.itemSelector}},function(){Ext.deprecate("extjs","4.0",function(){Ext.view.AbstractView.override({getSelectionCount:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectionCount will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection().length},getSelectedRecords:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectedRecords will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection()},select:function(f,e,g){if(Ext.global.console){Ext.global.console.warn("DataView: select will be removed, please access select through a DataView's SelectionModel, ie: view.getSelectionModel().select()")}var h=this.getSelectionModel();return h.select.apply(h,arguments)},clearSelections:function(){if(Ext.global.console){Ext.global.console.warn("DataView: clearSelections will be removed, please access deselectAll through DataView's SelectionModel, ie: view.getSelectionModel().deselectAll()")}var b=this.getSelectionModel();return b.deselectAll()}})})});Ext.define("Ext.view.View",{extend:"Ext.view.AbstractView",alternateClassName:"Ext.DataView",alias:"widget.dataview",inheritableStatics:{EventMap:{mousedown:"MouseDown",mouseup:"MouseUp",click:"Click",dblclick:"DblClick",contextmenu:"ContextMenu",mouseover:"MouseOver",mouseout:"MouseOut",mouseenter:"MouseEnter",mouseleave:"MouseLeave",keydown:"KeyDown",focus:"Focus"}},addCmpEvents:function(){this.addEvents("beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","beforeitemkeydown","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","itemkeydown","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","beforecontainerkeydown","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","containerkeydown","selectionchange","beforeselect","highlightitem","unhighlightitem")},getFocusEl:function(){return this.getTargetEl()},afterRender:function(){var c=this,d;c.callParent();d={scope:c,freezeEvent:true,click:c.handleEvent,mousedown:c.handleEvent,mouseup:c.handleEvent,dblclick:c.handleEvent,contextmenu:c.handleEvent,mouseover:c.handleEvent,mouseout:c.handleEvent,keydown:c.handleEvent};c.mon(c.getTargetEl(),d);if(c.store){c.bindStore(c.store,true)}},handleEvent:function(c){var d=c.type=="keydown"&&c.getKey();if(this.processUIEvent(c)!==false){this.processSpecialEvent(c)}if(d===c.SPACE){c.stopEvent()}},processItemEvent:Ext.emptyFn,processContainerEvent:Ext.emptyFn,processSpecialEvent:Ext.emptyFn,stillOverItem:function(d,e){var f;if(e&&typeof(e.offsetParent)==="object"){f=(d.type=="mouseout")?d.getRelatedTarget():d.getTarget();return Ext.fly(e).contains(f)}return false},processUIEvent:function(m){var l=this,e=m.getTarget(l.getItemSelector(),l.getTargetEl()),r=this.statics().EventMap,n,p,k=m.type,o=l.mouseOverItem,q;if(!e){if(k=="mouseover"&&l.stillOverItem(m,o)){e=o}if(k=="keydown"){p=l.getSelectionModel().getLastSelected();if(p){e=l.getNode(p)}}}if(e){n=l.indexOf(e);if(!p){p=l.getRecord(e)}if(!p||l.processItemEvent(p,e,n,m)===false){return false}q=l.isNewItemEvent(e,m);if(q===false){return false}if((l["onBeforeItem"+r[q]](p,e,n,m)===false)||(l.fireEvent("beforeitem"+q,l,p,e,n,m)===false)||(l["onItem"+r[q]](p,e,n,m)===false)){return false}l.fireEvent("item"+q,l,p,e,n,m)}else{if((l.processContainerEvent(m)===false)||(l["onBeforeContainer"+r[k]](m)===false)||(l.fireEvent("beforecontainer"+k,l,m)===false)||(l["onContainer"+r[k]](m)===false)){return false}l.fireEvent("container"+k,l,m)}return true},isNewItemEvent:function(i,h){var j=this,g=j.mouseOverItem,e=h.type;switch(e){case"mouseover":if(i===g){return false}j.mouseOverItem=i;return"mouseenter";case"mouseout":if(j.stillOverItem(h,g)){return false}j.mouseOverItem=null;return"mouseleave"}return e},onItemMouseEnter:function(f,h,e,g){if(this.trackOver){this.highlightItem(h)}},onItemMouseLeave:function(f,h,e,g){if(this.trackOver){this.clearHighlight()}},onItemMouseDown:Ext.emptyFn,onItemMouseUp:Ext.emptyFn,onItemFocus:Ext.emptyFn,onItemClick:Ext.emptyFn,onItemDblClick:Ext.emptyFn,onItemContextMenu:Ext.emptyFn,onItemKeyDown:Ext.emptyFn,onBeforeItemMouseDown:Ext.emptyFn,onBeforeItemMouseUp:Ext.emptyFn,onBeforeItemFocus:Ext.emptyFn,onBeforeItemMouseEnter:Ext.emptyFn,onBeforeItemMouseLeave:Ext.emptyFn,onBeforeItemClick:Ext.emptyFn,onBeforeItemDblClick:Ext.emptyFn,onBeforeItemContextMenu:Ext.emptyFn,onBeforeItemKeyDown:Ext.emptyFn,onContainerMouseDown:Ext.emptyFn,onContainerMouseUp:Ext.emptyFn,onContainerMouseOver:Ext.emptyFn,onContainerMouseOut:Ext.emptyFn,onContainerClick:Ext.emptyFn,onContainerDblClick:Ext.emptyFn,onContainerContextMenu:Ext.emptyFn,onContainerKeyDown:Ext.emptyFn,onBeforeContainerMouseDown:Ext.emptyFn,onBeforeContainerMouseUp:Ext.emptyFn,onBeforeContainerMouseOver:Ext.emptyFn,onBeforeContainerMouseOut:Ext.emptyFn,onBeforeContainerClick:Ext.emptyFn,onBeforeContainerDblClick:Ext.emptyFn,onBeforeContainerContextMenu:Ext.emptyFn,onBeforeContainerKeyDown:Ext.emptyFn,highlightItem:function(c){var d=this;d.clearHighlight();d.highlightedItem=c;Ext.fly(c).addCls(d.overItemCls);d.fireEvent("highlightitem",d,c)},clearHighlight:function(){var c=this,d=c.highlightedItem;if(d){Ext.fly(d).removeCls(c.overItemCls);c.fireEvent("unhighlightitem",c,d);delete c.highlightedItem}},onUpdate:function(g,h){var i=this,j=i.getNode(h),l=i.callParent(arguments),k=i.highlightedItem;if(k&&k===j){delete i.highlightedItem;if(l){i.highlightItem(l)}}},refresh:function(){this.clearHighlight();this.callParent(arguments)}});Ext.define("Docs.view.search.Dropdown",{extend:"Ext.view.View",alias:"widget.searchdropdown",floating:true,autoShow:false,autoRender:true,toFrontOnShow:true,focusOnToFront:false,store:"Search",id:"search-dropdown",overItemCls:"x-view-over",trackOver:true,itemSelector:"div.item",singleSelect:true,pageStart:0,pageSize:10,initComponent:function(){this.addEvents("changePage","footerClick");this.tpl=new Ext.XTemplate('<tpl for=".">','<div class="item">','<div class="icon {icon}"></div>','<div class="meta">{[this.getMetaTags(values.meta)]}</div>','<div class="title {[this.getCls(values.meta)]}">{name}</div>','<div class="class">{fullName}</div>',"</div>","</tpl>",'<div class="footer">','<a href="#" class="prev"><</a>','<span class="total">{[this.getStart()+1]}-{[this.getEnd()]} of {[this.getTotal()]}</span>','<a href="#" class="next">></a>',"</div>",{getCls:function(b){return b["private"]?"private":(b.removed?"removed":"")},getMetaTags:function(b){return Ext.Array.map(Docs.data.signatures,function(a){return b[a.key]?'<span class="signature '+a.key+'">'+(a["short"])+"</span>":""}).join(" ")},getTotal:Ext.bind(this.getTotal,this),getStart:Ext.bind(this.getStart,this),getEnd:Ext.bind(this.getEnd,this)});this.on("afterrender",function(){this.el.addListener("click",function(){this.fireEvent("changePage",this,-1)},this,{preventDefault:true,delegate:".prev"});this.el.addListener("click",function(){this.fireEvent("changePage",this,+1)},this,{preventDefault:true,delegate:".next"});this.el.addListener("click",function(){this.fireEvent("footerClick",this)},this,{delegate:".footer"})},this);this.callParent(arguments)},setTotal:function(b){this.total=b},getTotal:function(){return this.total},setStart:function(b){this.pageStart=b},getStart:function(b){return this.pageStart},getEnd:function(c){var d=this.pageStart+this.pageSize;return d>this.total?this.total:d}});Ext.define("Docs.view.search.Container",{extend:"Ext.container.Container",alias:"widget.searchcontainer",requires:"Docs.view.search.Dropdown",initComponent:function(){if(Docs.data.search.length){this.cls="search";this.items=[{xtype:"triggerfield",triggerCls:"reset",emptyText:"Search",width:170,id:"search-field",enableKeyEvents:true,hideTrigger:true,onTriggerClick:function(){this.reset();this.focus();this.setHideTrigger(true);Ext.getCmp("search-dropdown").hide()}},{xtype:"searchdropdown"}]}this.callParent()}});Ext.define("Docs.view.ThumbList",{extend:"Ext.view.View",alias:"widget.thumblist",cls:"thumb-list",itemSelector:"dl",urlField:"url",itemTpl:[],initComponent:function(){this.addEvents("urlclick");Ext.Array.forEach(this.data,function(c,d){c.id="sample-"+d});this.store=Ext.create("Ext.data.JsonStore",{fields:["id","title","items"]});this.store.loadData(this.data);this.tpl=new Ext.XTemplate(Ext.Array.flatten(["<div>",'<tpl for=".">','<div><a name="{id}"></a><h2><div>{title}</div></h2>',"<dl>",'<tpl for="items">',this.itemTpl,"</tpl>",'<div style="clear:left"></div></dl></div>',"</tpl>","</div>"]));this.itemTpl=undefined;this.data=undefined;this.on({afterrender:function(b){b.el.addListener("mouseover",function(a,d){Ext.get(d).addCls("over")},this,{delegate:"dd"});b.el.addListener("mouseout",function(a,d){Ext.get(d).removeCls("over")},this,{delegate:"dd"})}});this.callParent(arguments)},onContainerClick:function(c){var d=c.getTarget("h2",3,true);if(d){d.up("div").toggleCls("collapsed")}},onItemClick:function(h,j,l,i){var k=i.getTarget("dd",5,true);if(k&&!i.getTarget("a",2)){var e=k.getAttributeNS("ext",this.urlField);this.fireEvent("urlclick",e)}return this.callParent(arguments)}});Ext.define("Docs.view.guides.Index",{extend:"Ext.container.Container",alias:"widget.guideindex",requires:["Docs.view.ThumbList"],mixins:["Docs.view.Scrolling"],cls:"iScroll",margin:"10 0 0 0",autoScroll:true,initComponent:function(){this.items=[{xtype:"container",html:'<h1 class="eg">Guides</h1>'},Ext.create("Docs.view.ThumbList",{itemTpl:['<dd ext:url="#!/guide/{name}"><div class="thumb"><img src="guides/{name}/icon.png"/></div>',"<div><h4>{title}</h4><p>{description}</p></div>","</dd>"],data:Docs.data.guides})];this.callParent(arguments)},getTab:function(){var b=(Docs.data.guides||[]).length>0;return b?{cls:"guides",href:"#!/guide",tooltip:"Guides"}:false}});Ext.define("Docs.view.videos.Index",{extend:"Ext.container.Container",alias:"widget.videoindex",requires:["Docs.view.ThumbList"],mixins:["Docs.view.Scrolling"],cls:"iScroll",margin:"10 0 0 0",autoScroll:true,initComponent:function(){this.items=[{xtype:"container",html:'<h1 class="eg">Videos</h1>'},Ext.create("Docs.view.ThumbList",{itemTpl:['<dd ext:url="#!/video/{name}"><div class="thumb"><img src="{thumb}"/></div>',"<div><h4>{title}","</h4><p>{[values.description.substr(0,80)]}...</p></div>","</dd>"],data:Docs.data.videos})];this.callParent(arguments)},getTab:function(){var b=(Docs.data.videos||[]).length>0;return b?{cls:"videos",href:"#!/video",tooltip:"Videos"}:false}});Ext.define("Docs.view.examples.Index",{extend:"Ext.container.Container",alias:"widget.exampleindex",requires:["Docs.view.ThumbList"],mixins:["Docs.view.Scrolling"],cls:"iScroll",margin:"10 0 0 0",autoScroll:true,initComponent:function(){this.cls+=Docs.data.touchExamplesUi?" touch-examples-ui":"";this.items=[{xtype:"container",html:'<h1 class="eg">Examples</h1>'},Ext.create("Docs.view.ThumbList",{itemTpl:['<dd ext:url="#!/example/{name}">','<div class="thumb"><img src="{icon}"/></div>',"<div><h4>{title}","<tpl if=\"status === 'new'\">",'<span class="new-sample"> (New)</span>',"</tpl>","<tpl if=\"status === 'updated'\">",'<span class="updated-sample"> (Updated)</span>',"</tpl>","<tpl if=\"status === 'experimental'\">",'<span class="new-sample"> (Experimental)</span>',"</tpl>","</h4><p>{description}</p></div>","</dd>"],data:Docs.data.examples})];this.callParent(arguments)},getTab:function(){var b=(Docs.data.examples||[]).length>0;return b?{cls:"examples",href:"#!/example",tooltip:"Examples"}:false}});Ext.define("Ext.view.Table",{extend:"Ext.view.View",alias:"widget.tableview",uses:["Ext.view.TableChunker","Ext.util.DelayedTask","Ext.util.MixedCollection"],baseCls:Ext.baseCSSPrefix+"grid-view",itemSelector:"tr."+Ext.baseCSSPrefix+"grid-row",cellSelector:"td."+Ext.baseCSSPrefix+"grid-cell",rowSelector:"tr."+Ext.baseCSSPrefix+"grid-row",firstCls:Ext.baseCSSPrefix+"grid-cell-first",lastCls:Ext.baseCSSPrefix+"grid-cell-last",headerRowSelector:"tr."+Ext.baseCSSPrefix+"grid-header-row",selectedItemCls:Ext.baseCSSPrefix+"grid-row-selected",selectedCellCls:Ext.baseCSSPrefix+"grid-cell-selected",focusedItemCls:Ext.baseCSSPrefix+"grid-row-focused",overItemCls:Ext.baseCSSPrefix+"grid-row-over",altRowCls:Ext.baseCSSPrefix+"grid-row-alt",rowClsRe:new RegExp("(?:^|\\s*)"+Ext.baseCSSPrefix+"grid-row-(first|last|alt)(?:\\s+|$)","g"),cellRe:new RegExp(Ext.baseCSSPrefix+"grid-cell-([^\\s]+) ",""),trackOver:true,getRowClass:null,stripeRows:true,markDirty:true,initComponent:function(){var c=this,d=c.scroll;c.autoScroll=undefined;if(d===true||d==="both"){c.style=Ext.apply(c.style||{},{overflow:"auto"})}else{if(d==="horizontal"){c.style=Ext.apply(c.style||{},{"overflow-x":"auto","overflow-y":"hidden"})}else{if(d==="vertical"){c.style=Ext.apply(c.style||{},{"overflow-x":"hidden","overflow-y":"auto"})}else{c.style=Ext.apply(c.style||{},{overflow:"hidden"})}}}c.selModel.view=c;c.headerCt.view=c;c.headerCt.markDirty=c.markDirty;c.initFeatures(c.grid);delete c.grid;c.tpl="<div></div>";c.callParent()},moveColumn:function(D,r,A){var t=this,v=(A>1)?document.createDocumentFragment():undefined,B=r,j=t.getGridColumns().length,s=j-1,C=(t.firstCls||t.lastCls)&&(r==0||r==j||D==0||D==s),y,z,i,w,u,x;if(t.rendered){x=t.el.query(t.headerRowSelector);i=t.el.query(t.rowSelector);if(r>D&&v){B-=A}for(y=0,w=x.length;y<w;++y){u=x[y];if(v){for(z=0;z<A;z++){v.appendChild(u.cells[D])}u.insertBefore(v,u.cells[B]||null)}else{u.insertBefore(u.cells[D],u.cells[B]||null)}}for(y=0,w=i.length;y<w;y++){u=i[y];if(C){if(D===0){Ext.fly(u.cells[0]).removeCls(t.firstCls);Ext.fly(u.cells[1]).addCls(t.firstCls)}else{if(D===s){Ext.fly(u.cells[s]).removeCls(t.lastCls);Ext.fly(u.cells[s-1]).addCls(t.lastCls)}}if(r===0){Ext.fly(u.cells[0]).removeCls(t.firstCls);Ext.fly(u.cells[D]).addCls(t.firstCls)}else{if(r===j){Ext.fly(u.cells[s]).removeCls(t.lastCls);Ext.fly(u.cells[D]).addCls(t.lastCls)}}}if(v){for(z=0;z<A;z++){v.appendChild(u.cells[D])}u.insertBefore(v,u.cells[B]||null)}else{u.insertBefore(u.cells[D],u.cells[B]||null)}}t.setNewTemplate()}},scrollToTop:Ext.emptyFn,addElListener:function(e,f,d){this.mon(this,e,f,d,{element:"el"})},getGridColumns:function(){return this.headerCt.getGridColumns()},getHeaderAtIndex:function(b){return this.headerCt.getHeaderAtIndex(b)},getCell:function(e,d){var f=this.getNode(e);return Ext.fly(f).down(d.getCellSelector())},getFeature:function(c){var d=this.featuresMC;if(d){return d.get(c)}},initFeatures:function(k){var i=this,l,j,g,h;i.featuresMC=new Ext.util.MixedCollection();j=i.features=i.prepareFeatures();h=j?j.length:0;for(l=0;l<h;l++){g=j[l];g.view=i;g.grid=k;i.featuresMC.add(g);g.init()}},prepareFeatures:function(){var i=this,j=i.features,k,g,l=0,h;if(j){g=[];h=j.length;for(;l<h;l++){k=j[l];if(!k.isFeature){k=Ext.create("feature."+k.ftype,k)}g[l]=k}}return g},attachEventsForFeatures:function(){var d=this.features,f=d.length,e=0;for(;e<f;e++){if(d[e].isFeature){d[e].attachEvents()}}},afterRender:function(){var b=this;b.callParent();if(!b.enableTextSelection){b.el.unselectable()}b.attachEventsForFeatures()},onViewScroll:function(c,d){this.callParent(arguments);this.fireEvent("bodyscroll",c,d)},prepareData:function(q,l,o){var m=this,i=m.headerCt.prepareData(q,l,o,m,m.ownerCt),r=m.features,n=r.length,p=0,k;for(;p<n;p++){k=r[p];if(k.isFeature){Ext.apply(i,k.getAdditionalData(q,l,o,i,m))}}return i},collectData:function(A,s){var j=this.callParent(arguments),B=this.headerCt,t=B.getFullWidth(),C=this.features,v=C.length,D={rows:j,fullWidth:t},x=0,i,y=0,u,w,z,o;u=j.length;if(this.getRowClass){for(;y<u;y++){w={};z=j[y];o=z.rowCls||"";z.rowCls=this.getRowClass(A[y],y,w,this.store)+" "+o;if(w.alt){Ext.Error.raise("The getRowClass alt property is no longer supported.")}if(w.tstyle){Ext.Error.raise("The getRowClass tstyle property is no longer supported.")}if(w.cells){Ext.Error.raise("The getRowClass cells property is no longer supported.")}if(w.body){Ext.Error.raise("The getRowClass body property is no longer supported. Use the getAdditionalData method of the rowbody feature.")}if(w.bodyStyle){Ext.Error.raise("The getRowClass bodyStyle property is no longer supported.")}if(w.cols){Ext.Error.raise("The getRowClass cols property is no longer supported.")}}}for(;x<v;x++){i=C[x];if(i.isFeature&&i.collectData&&!i.disabled){D=i.collectData(A,j,s,t,D);break}}return D},forceReflow:Ext.isGecko10?function(){var c=this.el.down("table"),d;if(c){d=c.getWidth()}}:Ext.emptyFn,onHeaderResize:function(h,g,i){var j=this,f=j.el;if(f){f.select("th."+Ext.baseCSSPrefix+"grid-col-resizer-"+h.id).setWidth(g);f.select("table."+Ext.baseCSSPrefix+"grid-table-resizer").setWidth(j.headerCt.getFullWidth());if(!j.ignoreTemplate){j.setNewTemplate()}if(!i){j.el.focus()}j.forceReflow()}},onHeaderShow:function(h,g,e){var f=this;f.ignoreTemplate=true;if(g.oldWidth){f.onHeaderResize(g,g.oldWidth,e);delete g.oldWidth}else{if(g.width&&!g.flex){f.onHeaderResize(g,g.width,e)}else{if(g.el){f.onHeaderResize(g,g.el.getWidth(),e)}}}delete f.ignoreTemplate;f.setNewTemplate()},onHeaderHide:function(d,f,e){this.onHeaderResize(f,0,e)},refreshSize:function(){var c=this,d;if(!c.hasLoadingHeight){d=c.up("tablepanel");Ext.suspendLayouts();c.callParent();if(d&&Ext.getScrollbarSize().width){d.updateLayout()}Ext.resumeLayouts(true)}},setNewTemplate:function(){var c=this,d=c.headerCt.getColumnsForTpl(true);c.tpl=c.getTableChunker().getTableTpl({rowCount:c.store.getCount(),columns:d,features:c.features,enableTextSelection:c.enableTextSelection})},getTableChunker:function(){return this.chunker||Ext.view.TableChunker},addRowCls:function(d,e){var f=this.getNode(d);if(f){Ext.fly(f).addCls(e)}},removeRowCls:function(d,e){var f=this.getNode(d);if(f){Ext.fly(f).removeCls(e)}},onRowSelect:function(b){this.addRowCls(b,this.selectedItemCls)},onRowDeselect:function(c){var d=this;d.removeRowCls(c,d.selectedItemCls);d.removeRowCls(c,d.focusedItemCls)},onCellSelect:function(c){var d=this.getCellByPosition(c);if(d){d.addCls(this.selectedCellCls)}},onCellDeselect:function(c){var d=this.getCellByPosition(c);if(d){d.removeCls(this.selectedCellCls)}},onCellFocus:function(b){this.focusCell(b)},getCellByPosition:function(e){if(e){var d=this.getNode(e.row),f=this.headerCt.getHeaderAtIndex(e.column);if(f&&d){return Ext.fly(d).down(f.getCellSelector())}}return false},onRowFocus:function(g,e,f){var h=this;if(e){h.addRowCls(g,h.focusedItemCls);if(!f){h.focusRow(g)}}else{h.removeRowCls(g,h.focusedItemCls)}},focusRow:function(s){var o=this,k=o.getNode(s),r=o.el,m=0,t=o.ownerCt,l,n,p,q;if(k&&r){n=r.getY();p=n+r.dom.clientHeight;l=Ext.fly(k).getRegion();if(l.top<n){m=l.top-n}else{if(l.bottom>p){m=l.bottom-p}}q=o.getRecord(k);s=o.store.indexOf(q);if(m){t.scrollByDeltaY(m)}o.fireEvent("rowfocus",q,k,s)}},focusCell:function(n){var l=this,k=l.getCellByPosition(n),s=l.el,q=0,p=0,r=s.getRegion(),t=l.ownerCt,m,o;r.bottom=r.top+s.dom.clientHeight;r.right=r.left+s.dom.clientWidth;if(k){m=k.getRegion();if(m.top<r.top){q=m.top-r.top}else{if(m.bottom>r.bottom){q=m.bottom-r.bottom}}if(m.left<r.left){p=m.left-r.left}else{if(m.right>r.right){p=m.right-r.right}}if(q){t.scrollByDeltaY(q)}if(p){t.scrollByDeltaX(p)}s.focus();l.fireEvent("cellfocus",o,k,n)}},scrollByDelta:function(f,d){d=d||"scrollTop";var e=this.el.dom;e[d]=(e[d]+=f)},onUpdate:function(s,A,C,t){var u=this,y=u.store.indexOf(A),r,w,F,E,z,B,D=u.headerCt.getGridColumns(),x=u.overItemCls,v,i;if(D.length&&y>-1){r=u.bufferRender([A],y)[0];w=u.all.item(y);v=w.hasCls(x);w.dom.className=r.className;if(v){w.addCls(x)}F=w.query(this.cellSelector);E=Ext.fly(r).query(this.cellSelector);z=E.length;i=F[0].parentNode;for(B=0;B<z;B++){if(u.shouldUpdateCell(D[B],t)){i.insertBefore(E[B],F[B]);i.removeChild(F[B])}}u.selModel.refresh();u.doStripeRows(y,y);u.fireEvent("itemupdate",A,y,r)}},shouldUpdateCell:function(c,d){if(c.hasCustomRenderer){return true}return !d||Ext.Array.contains(d,c.dataIndex)},refresh:function(){this.setNewTemplate();this.callParent(arguments);this.doStripeRows(0)},processItemEvent:function(u,e,o,s){var q=this,n=s.getTarget(q.cellSelector,e),p=n?n.cellIndex:-1,v=q.statics().EventMap,t=q.getSelectionModel(),r=s.type,m;if(r=="keydown"&&!n&&t.getCurrentPosition){n=q.getCellByPosition(t.getCurrentPosition());if(n){n=n.dom;p=n.cellIndex}}m=q.fireEvent("uievent",r,q,n,o,p,s,u,e);if(m===false||q.callParent(arguments)===false){return false}if(r=="mouseover"||r=="mouseout"){return true}if(!n){return true}return !((q["onBeforeCell"+v[r]](n,p,u,e,o,s)===false)||(q.fireEvent("beforecell"+r,q,n,p,u,e,o,s)===false)||(q["onCell"+v[r]](n,p,u,e,o,s)===false)||(q.fireEvent("cell"+r,q,n,p,u,e,o,s)===false))},processSpecialEvent:function(s){var p=this,y=p.statics().EventMap,w=p.features,q=w.length,i=s.type,v,e,u,t,x,r,z=p.ownerCt;p.callParent(arguments);if(i=="mouseover"||i=="mouseout"){return}for(v=0;v<q;v++){e=w[v];if(e.hasFeatureEvent){t=s.getTarget(e.eventSelector,p.getTargetEl());if(t){u=e.eventPrefix;x=e.getFireEventArgs("before"+u+i,p,t,s);r=e.getFireEventArgs(u+i,p,t,s);if((p.fireEvent.apply(p,x)===false)||(z.fireEvent.apply(z,x)===false)||(p.fireEvent.apply(p,r)===false)||(z.fireEvent.apply(z,r)===false)){return false}}}}return true},onCellMouseDown:Ext.emptyFn,onCellMouseUp:Ext.emptyFn,onCellClick:Ext.emptyFn,onCellDblClick:Ext.emptyFn,onCellContextMenu:Ext.emptyFn,onCellKeyDown:Ext.emptyFn,onBeforeCellMouseDown:Ext.emptyFn,onBeforeCellMouseUp:Ext.emptyFn,onBeforeCellClick:Ext.emptyFn,onBeforeCellDblClick:Ext.emptyFn,onBeforeCellContextMenu:Ext.emptyFn,onBeforeCellKeyDown:Ext.emptyFn,expandToFit:function(c){if(c){var d=this.getMaxContentWidth(c);delete c.flex;c.setWidth(d)}},getMaxContentWidth:function(j){var i=j.getCellInnerSelector(),n=this.el.query(i),m=0,k=n.length,l=j.el.dom.scrollWidth,h;for(;m<k;m++){h=n[m].scrollWidth;if(h>l){l=h}}return l},getPositionByEvent:function(j){var k=this,e=j.getTarget(k.cellSelector),l=j.getTarget(k.itemSelector),h=k.getRecord(l),i=k.getHeaderByCell(e);return k.getPosition(h,i)},getHeaderByCell:function(c){if(c){var d=c.className.match(this.cellRe);if(d&&d[1]){return Ext.getCmp(d[1])}}return false},walkCells:function(s,r,w,q,B,p){if(!s){return}var u=this,e=s.row,y=s.column,t=u.store.getCount(),x=u.getFirstVisibleColumnIndex(),A=u.getLastVisibleColumnIndex(),v={row:e,column:y},z=u.headerCt.getHeaderAtIndex(y);if(!z||z.hidden){return false}w=w||{};r=r.toLowerCase();switch(r){case"right":if(y===A){if(q||e===t-1){return false}if(!w.ctrlKey){v.row=e+1;v.column=x}}else{if(!w.ctrlKey){v.column=y+u.getRightGap(z)}else{v.column=A}}break;case"left":if(y===x){if(q||e===0){return false}if(!w.ctrlKey){v.row=e-1;v.column=A}}else{if(!w.ctrlKey){v.column=y+u.getLeftGap(z)}else{v.column=x}}break;case"up":if(e===0){return false}else{if(!w.ctrlKey){v.row=e-1}else{v.row=0}}break;case"down":if(e===t-1){return false}else{if(!w.ctrlKey){v.row=e+1}else{v.row=t-1}}break}if(B&&B.call(p||window,v)!==true){return false}else{return v}},getFirstVisibleColumnIndex:function(){var b=this.getHeaderCt().getVisibleGridColumns()[0];return b?b.getIndex():-1},getLastVisibleColumnIndex:function(){var c=this.getHeaderCt().getVisibleGridColumns(),d=c[c.length-1];return d.getIndex()},getHeaderCt:function(){return this.headerCt},getPosition:function(g,h){var i=this,f=i.store,j=i.headerCt.getGridColumns();return{row:f.indexOf(g),column:Ext.Array.indexOf(j,h)}},getRightGap:function(h){var i=this.getHeaderCt(),j=i.getGridColumns(),g=Ext.Array.indexOf(j,h),l=g+1,k;for(;l<=j.length;l++){if(!j[l].hidden){k=l;break}}return k-g},beforeDestroy:function(){if(this.rendered){this.el.removeAllListeners()}this.callParent(arguments)},getLeftGap:function(h){var i=this.getHeaderCt(),j=i.getGridColumns(),l=Ext.Array.indexOf(j,h),k=l-1,g;for(;k>=0;k--){if(!j[k].hidden){g=k;break}}return g-l},onAdd:function(f,e,d){this.callParent(arguments);this.doStripeRows(d)},onRemove:function(f,e,d){this.callParent(arguments);this.doStripeRows(d)},doStripeRows:function(g,h){if(this.stripeRows){var k=this.getNodes(g,h),i=k.length,l=0,j;for(;l<i;l++){j=k[l];j.className=j.className.replace(this.rowClsRe," ");g++;if(g%2===0){j.className+=(" "+this.altRowCls)}}}}});Ext.define("Ext.grid.View",{extend:"Ext.view.Table",alias:"widget.gridview",stripeRows:true,autoScroll:true});Ext.define("Docs.view.HoverMenu",{extend:"Ext.view.View",alias:"widget.hovermenu",componentCls:"hover-menu",itemSelector:"div.item",deferEmptyText:false,columnHeight:25,initComponent:function(){this.renderTo=Ext.getBody();this.tpl=new Ext.XTemplate("<table>","<tr>","<td>",'<tpl for=".">','<div class="item">',"{[this.renderLink(values)]}","</div>",'<tpl if="xindex % this.columnHeight === 0 && xcount > xindex">',"</td><td>","</tpl>","</tpl>","</td>","</tr>","</table>",{columnHeight:this.columnHeight,renderLink:function(d){var c=Ext.Array.map(Docs.data.signatures,function(a){return d.meta[a.key]?'<span class="signature '+a.key+'">'+(a["short"])+"</span>":""}).join(" ");return Ext.String.format('<a href="#!/api/{0}" rel="{0}" class="docClass">{1} {2}</a>',d.url,d.label,c)}});this.callParent()}});Ext.define("Ext.data.NodeStore",{extend:"Ext.data.Store",alias:"store.node",requires:["Ext.data.NodeInterface"],node:null,recursive:false,rootVisible:false,constructor:function(e){var f=this,d;e=e||{};Ext.apply(f,e);if(Ext.isDefined(f.proxy)){Ext.Error.raise("A NodeStore cannot be bound to a proxy. Instead bind it to a record decorated with the NodeInterface by setting the node config.")}f.useModelWarning=false;e.proxy={type:"proxy"};f.callParent([e]);d=f.node;if(d){f.node=null;f.setNode(d)}},setNode:function(c){var d=this;if(d.node&&d.node!=c){d.mun(d.node,{expand:d.onNodeExpand,collapse:d.onNodeCollapse,append:d.onNodeAppend,insert:d.onNodeInsert,remove:d.onNodeRemove,sort:d.onNodeSort,scope:d});d.node=null}if(c){Ext.data.NodeInterface.decorate(c.self);d.removeAll();if(d.rootVisible){d.add(c)}else{if(!c.isExpanded()&&d.treeStore.autoLoad!==false){c.expand()}}d.mon(c,{expand:d.onNodeExpand,collapse:d.onNodeCollapse,append:d.onNodeAppend,insert:d.onNodeInsert,remove:d.onNodeRemove,sort:d.onNodeSort,scope:d});d.node=c;if(c.isExpanded()&&c.isLoaded()){d.onNodeExpand(c,c.childNodes,true)}}},onNodeSort:function(d,f){var e=this;if((e.indexOf(d)!==-1||(d===e.node&&!e.rootVisible)&&d.isExpanded())){e.onNodeCollapse(d,f,true);e.onNodeExpand(d,f,true)}},onNodeExpand:function(m,o,p){var k=this,j=k.indexOf(m)+1,l=o?o.length:0,n,i;if(!k.recursive&&m!==k.node){return}if(m!==this.node&&!k.isVisible(m)){return}if(!p&&k.fireEvent("beforeexpand",m,o,j)===false){return}if(l){k.insert(j,o);for(n=0;n<l;n++){i=o[n];if(i.isExpanded()){if(i.isLoaded()){k.onNodeExpand(i,i.childNodes,true)}else{i.set("expanded",false);i.expand()}}}}if(!p){k.fireEvent("expand",m,o)}},onNodeCollapse:function(m,p,i){var k=this,l=p.length,n=k.indexOf(m)+1,o,j;if(!k.recursive&&m!==k.node){return}if(!i&&k.fireEvent("beforecollapse",m,p,n)===false){return}for(o=0;o<l;o++){j=p[o];k.remove(j);if(j.isExpanded()){k.onNodeCollapse(j,j.childNodes,true)}}if(!i){k.fireEvent("collapse",m,p,n)}},onNodeAppend:function(k,i,g){var j=this,h,l;if(j.isVisible(i)){if(g===0){h=k}else{l=i.previousSibling;while(l.isExpanded()&&l.lastChild){l=l.lastChild}h=l}j.insert(j.indexOf(h)+1,i);if(!i.isLeaf()&&i.isExpanded()){if(i.isLoaded()){j.onNodeExpand(i,i.childNodes,true)}else{i.set("expanded",false);i.expand()}}}},onNodeInsert:function(j,h,g){var i=this,f=this.indexOf(g);if(f!=-1&&i.isVisible(h)){i.insert(f,h);if(!h.isLeaf()&&h.isExpanded()){if(h.isLoaded()){i.onNodeExpand(h,h.childNodes,true)}else{h.set("expanded",false);h.expand()}}}},onNodeRemove:function(e,g,f){var h=this;if(h.indexOf(g)!=-1){if(!g.isLeaf()&&g.isExpanded()){h.onNodeCollapse(g,g.childNodes,true)}h.remove(g)}},isVisible:function(c){var d=c.parentNode;while(d){if(d===this.node&&!this.rootVisible&&d.isExpanded()){return true}if(this.indexOf(d)===-1||!d.isExpanded()){return false}d=d.parentNode}return true}});Ext.define("Ext.tree.View",{extend:"Ext.view.Table",alias:"widget.treeview",requires:["Ext.data.NodeStore"],loadingCls:Ext.baseCSSPrefix+"grid-tree-loading",expandedCls:Ext.baseCSSPrefix+"grid-tree-node-expanded",leafCls:Ext.baseCSSPrefix+"grid-tree-node-leaf",expanderSelector:"."+Ext.baseCSSPrefix+"tree-expander",checkboxSelector:"."+Ext.baseCSSPrefix+"tree-checkbox",expanderIconOverCls:Ext.baseCSSPrefix+"tree-expander-over",nodeAnimWrapCls:Ext.baseCSSPrefix+"tree-animator-wrap",blockRefresh:true,rootVisible:true,deferInitialRefresh:false,expandDuration:250,collapseDuration:250,toggleOnDblClick:true,stripeRows:false,uiFields:["expanded","loaded","checked","expandable","leaf","icon","iconCls","loading"],initComponent:function(){var d=this,c=d.panel.getStore();if(d.initialConfig.animate===undefined){d.animate=Ext.enableFx}d.store=new Ext.data.NodeStore({treeStore:c,recursive:true,rootVisible:d.rootVisible,listeners:{beforeexpand:d.onBeforeExpand,expand:d.onExpand,beforecollapse:d.onBeforeCollapse,collapse:d.onCollapse,write:d.onStoreWrite,datachanged:d.onStoreDataChanged,scope:d}});if(d.node){d.setRootNode(d.node)}d.animQueue={};d.animWraps={};d.addEvents("afteritemexpand","afteritemcollapse");d.callParent(arguments);d.on({element:"el",scope:d,delegate:d.expanderSelector,mouseover:d.onExpanderMouseOver,mouseout:d.onExpanderMouseOut});d.on({element:"el",scope:d,delegate:d.checkboxSelector,click:d.onCheckboxChange})},afterComponentLayout:function(){this.callParent(arguments);var b=this.stretcher;if(b){b.setWidth((this.getWidth()-Ext.getScrollbarSize().width))}},processUIEvent:function(b){if(b.getTarget("."+this.nodeAnimWrapCls,this.el)){return false}return this.callParent(arguments)},onClear:function(){this.store.removeAll()},setRootNode:function(c){var d=this;d.store.setNode(c);d.node=c},onCheckboxChange:function(g,f){var h=this,e=g.getTarget(h.getItemSelector(),h.getTargetEl());if(e){h.onCheckChange(h.getRecord(e))}},onCheckChange:function(d){var c=d.get("checked");if(Ext.isBoolean(c)){c=!c;d.set("checked",c);this.fireEvent("checkchange",d,c)}},getChecked:function(){var b=[];this.node.cascadeBy(function(a){if(a.get("checked")){b.push(a)}});return b},isItemChecked:function(b){return b.get("checked")},createAnimWrap:function(o,n){var q="",r=this.panel.headerCt,u=r.getGridColumns(),p=0,m=u.length,i,s=this.getNode(o),v,t;for(;p<m;p++){i=u[p];q+='<th style="width: '+(i.hidden?0:i.getDesiredWidth())+'px; height: 0px;"></th>'}t=Ext.get(s);v=t.insertSibling({tag:"tr",html:['<td colspan="'+r.getColumnCount()+'">','<div class="'+this.nodeAnimWrapCls+'">','<table class="'+Ext.baseCSSPrefix+'grid-table" style="width: '+r.getFullWidth()+'px;"><tbody>',q,"</tbody></table>","</div>","</td>"].join("")},"after");return{record:o,node:s,el:v,expanding:false,collapsing:false,animating:false,animateEl:v.down("div"),targetEl:v.down("tbody")}},getAnimWrap:function(g,f){if(!this.animate){return null}var e=this.animWraps,h=e[g.internalId];if(f!==false){while(!h&&g){g=g.parentNode;if(g){h=e[g.internalId]}}}return h},doAdd:function(x,v,r){var q=this,t=v[0],o=t.parentNode,p=q.all.elements,a=0,u=q.getAnimWrap(o),n,w,s;if(!u||!u.expanding){return q.callParent(arguments)}o=u.record;n=u.targetEl;w=n.dom.childNodes;s=w.length-1;a=r-q.indexOf(o)-1;if(!s||a>=s){n.appendChild(x)}else{Ext.fly(w[a+1]).insertSibling(x,"before",true)}Ext.Array.insert(p,r,x);if(u.isAnimating){q.onExpand(o)}},beginBulkUpdate:function(){this.bulkUpdate=true;this.ownerCt.changingScrollbars=true},endBulkUpdate:function(){this.bulkUpdate=false;this.ownerCt.changingScrollbars=true},onRemove:function(h,g,f){var i=this,j=i.bulkUpdate;i.doRemove(g,f);if(!j){i.updateIndexes(f)}if(i.store.getCount()===0){i.refresh()}if(!j){i.fireEvent("itemremove",g,f)}},doRemove:function(h,l){var i=this,k=i.all,g=i.getAnimWrap(h),j=k.item(l).dom;if(!g||!g.collapsing){return i.callParent(arguments)}g.targetEl.appendChild(j);k.removeElement(l)},onBeforeExpand:function(i,f,j){var h=this,g;if(!h.rendered||!h.animate){return}if(h.getNode(i)){g=h.getAnimWrap(i,false);if(!g){g=h.animWraps[i.internalId]=h.createAnimWrap(i);g.animateEl.setHeight(0)}else{if(g.collapsing){g.targetEl.select(h.itemSelector).remove()}}g.expanding=true;g.collapsing=false}},onExpand:function(k){var l=this,n=l.animQueue,r=k.getId(),p=l.getNode(k),m=p?l.indexOf(p):-1,o,q,j;if(l.singleExpand){l.ensureSingleExpand(k)}if(m===-1){return}o=l.getAnimWrap(k,false);if(!o){l.fireEvent("afteritemexpand",k,m,p);return}q=o.animateEl;j=o.targetEl;q.stopAnimation();n[r]=true;q.slideIn("t",{duration:l.expandDuration,listeners:{scope:l,lastframe:function(){o.el.insertSibling(j.query(l.itemSelector),"before");o.el.remove();delete l.animWraps[o.record.internalId];delete n[r]}},callback:function(){l.fireEvent("afteritemexpand",k,m,p)}});o.isAnimating=true},onBeforeCollapse:function(i,f,j){var h=this,g;if(!h.rendered||!h.animate){return}if(h.getNode(i)){g=h.getAnimWrap(i);if(!g){g=h.animWraps[i.internalId]=h.createAnimWrap(i,j)}else{if(g.expanding){g.targetEl.select(this.itemSelector).remove()}}g.expanding=false;g.collapsing=true}},onCollapse:function(k){var l=this,n=l.animQueue,r=k.getId(),p=l.getNode(k),m=p?l.indexOf(p):-1,o=l.getAnimWrap(k),q,j;if(m===-1){return}if(!o){l.fireEvent("afteritemcollapse",k,m,p);return}q=o.animateEl;j=o.targetEl;n[r]=true;q.stopAnimation();q.slideOut("t",{duration:l.collapseDuration,listeners:{scope:l,lastframe:function(){o.el.remove();delete l.animWraps[o.record.internalId];delete n[r]}},callback:function(){l.fireEvent("afteritemcollapse",k,m,p)}});o.isAnimating=true},isAnimating:function(b){return !!this.animQueue[b.getId()]},collectData:function(n){var k=this.callParent(arguments),l=k.rows,i=l.length,m=0,j,h;for(;m<i;m++){j=l[m];h=n[m];if(h.get("qtip")){j.rowAttr='data-qtip="'+h.get("qtip")+'"';if(h.get("qtitle")){j.rowAttr+=' data-qtitle="'+h.get("qtitle")+'"'}}if(h.isExpanded()){j.rowCls=(j.rowCls||"")+" "+this.expandedCls}if(h.isLeaf()){j.rowCls=(j.rowCls||"")+" "+this.leafCls}if(h.isLoading()){j.rowCls=(j.rowCls||"")+" "+this.loadingCls}}return k},expand:function(e,f,g,h){return e.expand(f,g,h)},collapse:function(e,f,g,h){return e.collapse(f,g,h)},toggle:function(c,d){this[c.isExpanded()?"collapse":"expand"](c,d)},onItemDblClick:function(f,g,h){var e=this.editingPlugin;this.callParent(arguments);if(this.toggleOnDblClick&&!(e&&e.clicksToEdit===2)){this.toggle(f)}},onBeforeItemMouseDown:function(f,h,e,g){if(g.getTarget(this.expanderSelector,h)){return false}return this.callParent(arguments)},onItemClick:function(f,h,e,g){if(g.getTarget(this.expanderSelector,h)){this.toggle(f,g.ctrlKey);return false}return this.callParent(arguments)},onExpanderMouseOver:function(c,d){c.getTarget(this.cellSelector,10,true).addCls(this.expanderIconOverCls)},onExpanderMouseOut:function(c,d){c.getTarget(this.cellSelector,10,true).removeCls(this.expanderIconOverCls)},getTreeStore:function(){return this.panel.store},ensureSingleExpand:function(c){var d=c.parentNode;if(d){d.eachChild(function(a){if(a!==c&&a.isExpanded()){a.collapse()}})}},shouldUpdateCell:function(c,d){return Ext.Array.contains(this.uiFields,c.dataIndex)||this.callParent(arguments)},onStoreWrite:function(d,e){var f=this.panel.store;f.fireEvent("write",f,e)},onStoreDataChanged:function(d,e){var f=this.panel.store;f.fireEvent("datachanged",f)}});Ext.define("Ext.selection.RowModel",{extend:"Ext.selection.Model",alias:"selection.rowmodel",requires:["Ext.util.KeyNav"],deltaScroll:5,enableKeyNav:true,ignoreRightMouseSelection:false,constructor:function(){this.addEvents("beforedeselect","beforeselect","deselect","select");this.views=[];this.callParent(arguments)},bindComponent:function(d){var c=this;c.views=c.views||[];c.views.push(d);c.bindStore(d.getStore(),true);d.on({itemmousedown:c.onRowMouseDown,scope:c});if(c.enableKeyNav){c.initKeyNav(d)}},initKeyNav:function(d){var c=this;if(!d.rendered){d.on("render",Ext.Function.bind(c.initKeyNav,c,[d],0),c,{single:true});return}d.el.set({tabIndex:-1});c.keyNav=new Ext.util.KeyNav({target:d,eventName:"itemkeydown",processEvent:function(i,j,a,h,b){b.record=j;b.recordIndex=h;return b},up:c.onKeyUp,down:c.onKeyDown,right:c.onKeyRight,left:c.onKeyLeft,pageDown:c.onKeyPageDown,pageUp:c.onKeyPageUp,home:c.onKeyHome,end:c.onKeyEnd,space:c.onKeySpace,scope:c})},getRowsVisible:function(){var h=false,g=this.views[0],i=g.getNode(0),f,j;if(i){f=Ext.fly(i).getHeight();j=g.el.getHeight();h=Math.floor(j/f)}return h},onKeyEnd:function(f){var d=this,e=d.store.getAt(d.store.getCount()-1);if(e){if(f.shiftKey){d.selectRange(e,d.lastFocused||0);d.setLastFocused(e)}else{if(f.ctrlKey){d.setLastFocused(e)}else{d.doSelect(e)}}}},onKeyHome:function(d){var e=this,f=e.store.getAt(0);if(f){if(d.shiftKey){e.selectRange(f,e.lastFocused||0);e.setLastFocused(f)}else{if(d.ctrlKey){e.setLastFocused(f)}else{e.doSelect(f,false)}}}},onKeyPageUp:function(j){var k=this,i=k.getRowsVisible(),e,l,h;if(i){e=j.recordIndex;l=e-i;if(l<0){l=0}h=k.store.getAt(l);if(j.shiftKey){k.selectRange(h,j.record,j.ctrlKey,"up");k.setLastFocused(h)}else{if(j.ctrlKey){j.preventDefault();k.setLastFocused(h)}else{k.doSelect(h)}}}},onKeyPageDown:function(j){var l=this,i=l.getRowsVisible(),h,k,e;if(i){h=j.recordIndex;k=h+i;if(k>=l.store.getCount()){k=l.store.getCount()-1}e=l.store.getAt(k);if(j.shiftKey){l.selectRange(e,j.record,j.ctrlKey,"down");l.setLastFocused(e)}else{if(j.ctrlKey){j.preventDefault();l.setLastFocused(e)}else{l.doSelect(e)}}}},onKeySpace:function(f){var d=this,e=d.lastFocused;if(e){if(d.isSelected(e)){d.doDeselect(e,false)}else{d.doSelect(e,true)}}},onKeyUp:function(g){var h=this,f=h.store.indexOf(h.lastFocused),e;if(f>0){e=h.store.getAt(f-1);if(g.shiftKey&&h.lastFocused){if(h.isSelected(h.lastFocused)&&h.isSelected(e)){h.doDeselect(h.lastFocused,true);h.setLastFocused(e)}else{if(!h.isSelected(h.lastFocused)){h.doSelect(h.lastFocused,true);h.doSelect(e,true)}else{h.doSelect(e,true)}}}else{if(g.ctrlKey){h.setLastFocused(e)}else{h.doSelect(e)}}}},onKeyDown:function(g){var h=this,f=h.store.indexOf(h.lastFocused),e;if(f+1<h.store.getCount()){e=h.store.getAt(f+1);if(h.selected.getCount()===0){if(!g.ctrlKey){h.doSelect(e)}else{h.setLastFocused(e)}}else{if(g.shiftKey&&h.lastFocused){if(h.isSelected(h.lastFocused)&&h.isSelected(e)){h.doDeselect(h.lastFocused,true);h.setLastFocused(e)}else{if(!h.isSelected(h.lastFocused)){h.doSelect(h.lastFocused,true);h.doSelect(e,true)}else{h.doSelect(e,true)}}}else{if(g.ctrlKey){h.setLastFocused(e)}else{h.doSelect(e)}}}}},scrollByDeltaX:function(g){var f=this.views[0],h=f.up(),e=h.horizontalScroller;if(e){e.scrollByDeltaX(g)}},onKeyLeft:function(b){this.scrollByDeltaX(-this.deltaScroll)},onKeyRight:function(b){this.scrollByDeltaX(this.deltaScroll)},onRowMouseDown:function(e,g,i,j,h){if(!this.allowRightMouseSelection(h)){return}if(h.button===0||!this.isSelected(g)){this.selectWithEvent(g,h)}},allowRightMouseSelection:function(d){var c=this.ignoreRightMouseSelection&&d.button!==0;if(c){c=this.hasSelection()}return !c},onSelectChange:function(q,t,m,v){var o=this,i=o.views,s=i.length,n=o.store,u=n.indexOf(q),p=t?"select":"deselect",r=0;if((m||o.fireEvent("before"+p,o,q,u))!==false&&v()!==false){for(;r<s;r++){if(t){i[r].onRowSelect(u,m)}else{i[r].onRowDeselect(u,m)}}if(!m){o.fireEvent(p,o,q,u)}}},onLastFocusChanged:function(k,o,i){var j=this.views,l=j.length,p=this.store,m,n=0;if(k){m=p.indexOf(k);if(m!=-1){for(;n<l;n++){j[n].onRowFocus(m,false)}}}if(o){m=p.indexOf(o);if(m!=-1){for(n=0;n<l;n++){j[n].onRowFocus(m,true,i)}}}this.callParent()},onEditorTab:function(o,l){var n=this,p=n.views[0],e=o.getActiveRecord(),k=o.getActiveColumn(),j=p.getPosition(e,k),m=l.shiftKey?"left":"right";do{j=p.walkCells(j,m,l,n.preventWrap)}while(j&&!p.headerCt.getHeaderAtIndex(j.column).getEditor());if(j){o.startEditByPosition(j)}},selectByPosition:function(d){var c=this.store.getAt(d.row);this.select(c)},selectNext:function(l,p){var m=this,i=m.store,n=m.getSelection(),j=n[n.length-1],o=i.indexOf(j)+1,k;if(o===i.getCount()||o===0){k=false}else{m.doSelect(o,l,p);k=true}return k},selectPrevious:function(k,h){var l=this,m=l.getSelection(),i=m[0],n=l.store.indexOf(i)-1,j;if(n<0){j=false}else{l.doSelect(n,k,h);j=true}return j}});Ext.define("Ext.selection.TreeModel",{extend:"Ext.selection.RowModel",alias:"selection.treemodel",pruneRemoved:false,onKeyRight:function(g,e){var h=this.getLastFocused(),f=this.view;if(h){if(h.isExpanded()){this.onKeyDown(g,e)}else{if(!h.isLeaf()){f.expand(h)}}}},onKeyLeft:function(j,m){var k=this.getLastFocused(),n=this.view,e=n.getSelectionModel(),i,l;if(k){i=k.parentNode;if(k.isExpanded()){n.collapse(k)}else{if(i&&!i.isRoot()){if(j.shiftKey){e.selectRange(i,k,j.ctrlKey,"up");e.setLastFocused(i)}else{if(j.ctrlKey){e.setLastFocused(i)}else{e.select(i)}}}}}},onKeyPress:function(h,e){var g=h.getKey(),j,i;if(g===h.SPACE||g===h.ENTER){h.stopEvent();j=this.getLastSelected();if(j){this.view.onCheckChange(j)}}else{this.callParent(arguments)}}});Ext.define("Ext.toolbar.Item",{extend:"Ext.Component",alias:"widget.tbitem",alternateClassName:"Ext.Toolbar.Item",enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.define("Ext.toolbar.TextItem",{extend:"Ext.toolbar.Item",requires:["Ext.XTemplate"],alias:"widget.tbtext",alternateClassName:"Ext.Toolbar.TextItem",text:"",renderTpl:"{text}",baseCls:Ext.baseCSSPrefix+"toolbar-text",beforeRender:function(){var b=this;b.callParent();Ext.apply(b.renderData,{text:b.text})},setText:function(b){if(this.rendered){this.el.update(b);this.ownerCt.doLayout()}else{this.text=b}}});Ext.define("Docs.view.HoverMenuButton",{extend:"Ext.toolbar.TextItem",alias:"widget.hovermenubutton",componentCls:"hover-menu-button",requires:["Docs.view.HoverMenu"],showCount:false,statics:{menus:[]},initComponent:function(){this.addEvents("click");if(this.showCount){this.initialText=this.text;this.text+=" <sup>"+this.store.getCount()+"</sup>";this.store.on("datachanged",function(){this.setText(this.initialText+" <sup>"+this.store.getCount()+"</sup>")},this)}this.callParent(arguments)},getColumnHeight:function(){var c=200;var d=18;return Math.floor((Ext.Element.getViewportHeight()-c)/d)},onRender:function(){this.callParent(arguments);this.getEl().on({click:function(){this.fireEvent("click")},mouseover:this.deferShowMenu,mouseout:this.deferHideMenu,scope:this})},onDestroy:function(){if(this.menu){this.menu.destroy();Ext.Array.remove(Docs.view.HoverMenuButton.menus,this.menu)}this.callParent(arguments)},renderMenu:function(){this.menu=Ext.create("Docs.view.HoverMenu",{store:this.store,columnHeight:this.getColumnHeight()});this.menu.getEl().on({click:function(b){this.menu.hide();b.preventDefault()},mouseover:function(){clearTimeout(this.hideTimeout)},mouseout:this.deferHideMenu,scope:this});Docs.view.HoverMenuButton.menus.push(this.menu)},deferHideMenu:function(){clearTimeout(Docs.view.HoverMenuButton.showTimeout);if(!this.menu){return}this.hideTimeout=Ext.Function.defer(function(){this.menu.hide()},200,this)},deferShowMenu:function(){clearTimeout(Docs.view.HoverMenuButton.showTimeout);Docs.view.HoverMenuButton.showTimeout=Ext.Function.defer(function(){if(!this.menu){this.renderMenu()}Ext.Array.forEach(Docs.view.HoverMenuButton.menus,function(a){if(a!==this.menu){a.hide()}},this);clearTimeout(this.hideTimeout);this.menu.show();var j=this.getEl().getXY(),n=Ext.ComponentQuery.query("classoverview toolbar")[0],k=j[0]-10,l=n.getEl().getXY(),i=n.getWidth(),m=this.menu.getEl().getWidth(),h=Ext.getCmp("doctabs").getWidth();if(m>h){k=0}else{if((k+m)>h){k=h-m-30}}if(k<l[0]){k=l[0]}this.menu.getEl().setStyle({left:k+"px",top:(j[1]+25)+"px"})},200,this)},getStore:function(){return this.store}});Ext.define("Ext.dd.DragDrop",{requires:["Ext.dd.DragDropManager"],constructor:function(f,e,d){if(f){this.init(f,e,d)}},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(d,c){},startDrag:function(d,c){},b4Drag:function(b){},onDrag:function(b){},onDragEnter:function(d,c){},b4DragOver:function(b){},onDragOver:function(d,c){},b4DragOut:function(b){},onDragOut:function(d,c){},b4DragDrop:function(b){},onDragDrop:function(d,c){},onInvalidDrop:function(b){},b4EndDrag:function(b){},endDrag:function(b){},b4MouseDown:function(b){},onMouseDown:function(b){},onMouseUp:function(b){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(q,s,b){if(Ext.isNumber(s)){s={left:s,right:s,top:s,bottom:s}}s=s||this.defaultPadding;var o=Ext.get(this.getEl()).getBox(),v=Ext.get(q),c=v.getScroll(),p,u=v.dom,n,r,t;if(u==document.body){p={x:c.left,y:c.top,width:Ext.Element.getViewWidth(),height:Ext.Element.getViewHeight()}}else{n=v.getXY();p={x:n[0],y:n[1],width:u.clientWidth,height:u.clientHeight}}r=o.y-p.y;t=o.x-p.x;this.resetConstraints();this.setXConstraint(t-(s.left||0),p.width-t-o.width-(s.right||0),this.xTickSize);this.setYConstraint(r-(s.top||0),p.height-r-o.height-(s.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(f,e,d){this.initTarget(f,e,d);Ext.EventManager.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(f,e,d){this.config=d||{};this.DDMInstance=Ext.dd.DragDropManager;this.groups={};if(typeof f!=="string"){f=Ext.id(f)}this.id=f;this.addToGroup((e)?e:"default");this.handleElId=f;this.setDragElId(f);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(h,f,g,e){if(!f&&0!==f){this.padding=[h,h,h,h]}else{if(!g&&0!==g){this.padding=[h,f,h,f]}else{this.padding=[h,f,g,e]}}},setInitPosition:function(k,l){var j=this.getEl(),g,h,i;if(!this.DDMInstance.verifyEl(j)){return}g=k||0;h=l||0;i=Ext.Element.getXY(j);this.initPageX=i[0]-g;this.initPageY=i[1]-h;this.lastPageX=i[0];this.lastPageY=i[1];this.setStartPosition(i)},setStartPosition:function(c){var d=c||Ext.Element.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=d[0];this.startPageY=d[1]},addToGroup:function(b){this.groups[b]=true;this.DDMInstance.regDragDrop(this,b)},removeFromGroup:function(b){if(this.groups[b]){delete this.groups[b]}this.DDMInstance.removeDDFromGroup(this,b)},setDragElId:function(b){this.dragElId=b},setHandleElId:function(b){if(typeof b!=="string"){b=Ext.id(b)}this.handleElId=b;this.DDMInstance.regHandle(this.id,b)},setOuterHandleElId:function(b){if(typeof b!=="string"){b=Ext.id(b)}Ext.EventManager.on(b,"mousedown",this.handleMouseDown,this);this.setHandleElId(b);this.hasOuterHandles=true},unreg:function(){Ext.EventManager.un(this.id,"mousedown",this.handleMouseDown,this);this._domRef=null;this.DDMInstance._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDMInstance.isLocked()||this.locked)},handleMouseDown:function(c,d){if(this.primaryButtonOnly&&c.button!=0){return}if(this.isLocked()){return}this.DDMInstance.refreshCache(this.groups);if(this.hasOuterHandles||this.DDMInstance.isOverTarget(c.getPoint(),this)){if(this.clickValidator(c)){this.setStartPosition();this.b4MouseDown(c);this.onMouseDown(c);this.DDMInstance.handleMouseDown(c,this);this.DDMInstance.stopEvent(c)}}},clickValidator:function(c){var d=c.getTarget();return(this.isValidHandleChild(d)&&(this.id==this.handleElId||this.DDMInstance.handleWasClicked(d,this.id)))},addInvalidHandleType:function(d){var c=d.toUpperCase();this.invalidHandleTypes[c]=c},addInvalidHandleId:function(b){if(typeof b!=="string"){b=Ext.id(b)}this.invalidHandleIds[b]=b},addInvalidHandleClass:function(b){this.invalidHandleClasses.push(b)},removeInvalidHandleType:function(d){var c=d.toUpperCase();delete this.invalidHandleTypes[c]},removeInvalidHandleId:function(b){if(typeof b!=="string"){b=Ext.id(b)}delete this.invalidHandleIds[b]},removeInvalidHandleClass:function(d){for(var f=0,e=this.invalidHandleClasses.length;f<e;++f){if(this.invalidHandleClasses[f]==d){delete this.invalidHandleClasses[f]}}},isValidHandleChild:function(k){var l=true,i,e,h;try{i=k.nodeName.toUpperCase()}catch(j){i=k.nodeName}l=l&&!this.invalidHandleTypes[i];l=l&&!this.invalidHandleIds[k.id];for(e=0,h=this.invalidHandleClasses.length;l&&e<h;++e){l=!Ext.fly(k).hasCls(this.invalidHandleClasses[e])}return l},setXTicks:function(g,f){this.xTicks=[];this.xTickSize=f;var h={},e;for(e=this.initPageX;e>=this.minX;e=e-f){if(!h[e]){this.xTicks[this.xTicks.length]=e;h[e]=true}}for(e=this.initPageX;e<=this.maxX;e=e+f){if(!h[e]){this.xTicks[this.xTicks.length]=e;h[e]=true}}Ext.Array.sort(this.xTicks,this.DDMInstance.numericSort)},setYTicks:function(g,f){this.yTicks=[];this.yTickSize=f;var h={},e;for(e=this.initPageY;e>=this.minY;e=e-f){if(!h[e]){this.yTicks[this.yTicks.length]=e;h[e]=true}}for(e=this.initPageY;e<=this.maxY;e=e+f){if(!h[e]){this.yTicks[this.yTicks.length]=e;h[e]=true}}Ext.Array.sort(this.yTicks,this.DDMInstance.numericSort)},setXConstraint:function(f,d,e){this.leftConstraint=f;this.rightConstraint=d;this.minX=this.initPageX-f;this.maxX=this.initPageX+d;if(e){this.setXTicks(this.initPageX,e)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(e,f,d){this.topConstraint=e;this.bottomConstraint=f;this.minY=this.initPageY-e;this.maxY=this.initPageY+f;if(d){this.setYTicks(this.initPageY,d)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var c=(this.maintainOffset)?this.lastPageX-this.initPageX:0,d=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(c,d)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(j,m){if(!m){return j}else{if(m[0]>=j){return m[0]}else{var h,i,n,k,l;for(h=0,i=m.length;h<i;++h){n=h+1;if(m[n]&&m[n]>=j){k=j-m[h];l=m[n]-j;return(l>k)?m[h]:m[n]}}return m[m.length-1]}}},toString:function(){return("DragDrop "+this.id)}});Ext.define("Ext.dd.DD",{extend:"Ext.dd.DragDrop",requires:["Ext.dd.DragDropManager"],constructor:function(f,e,d){if(f){this.init(f,e,d)}},scroll:true,autoOffset:function(h,e){var f=h-this.startPageX,g=e-this.startPageY;this.setDelta(f,g)},setDelta:function(c,d){this.deltaX=c;this.deltaY=d},setDragElPos:function(f,d){var e=this.getDragEl();this.alignElWithMouse(e,f,d)},alignElWithMouse:function(u,r,t){var q=this.getTargetCoord(r,t),s=u.dom?u:Ext.fly(u,"_dd"),l=s.getSize(),o=Ext.Element,n,v,m,p;if(!this.deltaSetXY){n=this.cachedViewportSize={width:o.getDocumentWidth(),height:o.getDocumentHeight()};v=[Math.max(0,Math.min(q.x,n.width-l.width)),Math.max(0,Math.min(q.y,n.height-l.height))];s.setXY(v);m=s.getLeft(true);p=s.getTop(true);this.deltaSetXY=[m-q.x,p-q.y]}else{n=this.cachedViewportSize;s.setLeftTop(Math.max(0,Math.min(q.x+this.deltaSetXY[0],n.width-l.width)),Math.max(0,Math.min(q.y+this.deltaSetXY[1],n.height-l.height)))}this.cachePosition(q.x,q.y);this.autoScroll(q.x,q.y,u.offsetHeight,u.offsetWidth);return q},cachePosition:function(d,e){if(d){this.lastPageX=d;this.lastPageY=e}else{var f=Ext.Element.getXY(this.getEl());this.lastPageX=f[0];this.lastPageY=f[1]}},autoScroll:function(s,t,x,r){if(this.scroll){var q=Ext.Element.getViewHeight(),A=Ext.Element.getViewWidth(),h=this.DDMInstance.getScrollTop(),y=this.DDMInstance.getScrollLeft(),u=x+t,p=r+s,v=(q+h-t-this.deltaY),w=(A+y-s-this.deltaX),z=40,B=(document.all)?80:30;if(u>q&&v<z){window.scrollTo(y,h+B)}if(t<h&&h>0&&t-h<z){window.scrollTo(y,h-B)}if(p>A&&w<z){window.scrollTo(y+B,h)}if(s<y&&y>0&&s-y<z){window.scrollTo(y-B,h)}}},getTargetCoord:function(h,e){var f=h-this.deltaX,g=e-this.deltaY;if(this.constrainX){if(f<this.minX){f=this.minX}if(f>this.maxX){f=this.maxX}}if(this.constrainY){if(g<this.minY){g=this.minY}if(g>this.maxY){g=this.maxY}}f=this.getTick(f,this.xTicks);g=this.getTick(g,this.yTicks);return{x:f,y:g}},applyConfig:function(){this.callParent();this.scroll=(this.config.scroll!==false)},b4MouseDown:function(b){this.autoOffset(b.getPageX(),b.getPageY())},b4Drag:function(b){this.setDragElPos(b.getPageX(),b.getPageY())},toString:function(){return("DD "+this.id)}});Ext.define("Ext.dd.DDProxy",{extend:"Ext.dd.DD",statics:{dragElId:"ygddfdiv"},constructor:function(f,e,d){if(f){this.init(f,e,d);this.initFrame()}},resizeFrame:true,centerFrame:false,createFrame:function(){var e=this,f=document.body,g,h;if(!f||!f.firstChild){setTimeout(function(){e.createFrame()},50);return}g=this.getDragEl();if(!g){g=document.createElement("div");g.id=this.dragElId;h=g.style;h.position="absolute";h.visibility="hidden";h.cursor="move";h.border="2px solid #aaa";h.zIndex=999;f.insertBefore(g,f.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){this.callParent();this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(h,i){var j=this.getEl(),g=this.getDragEl(),f=g.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(f.width,10)/2),Math.round(parseInt(f.height,10)/2))}this.setDragElPos(h,i);Ext.fly(g).show()},_resizeProxy:function(){if(this.resizeFrame){var b=this.getEl();Ext.fly(this.getDragEl()).setSize(b.offsetWidth,b.offsetHeight)}},b4MouseDown:function(d){var e=d.getPageX(),f=d.getPageY();this.autoOffset(e,f);this.setDragElPos(e,f)},b4StartDrag:function(d,c){this.showFrame(d,c)},b4EndDrag:function(b){Ext.fly(this.getDragEl()).hide()},endDrag:function(f){var d=this.getEl(),e=this.getDragEl();e.style.visibility="";this.beforeMove();d.style.visibility="hidden";Ext.dd.DDM.moveToEl(d,e);e.style.visibility="hidden";d.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.define("Ext.dd.DragSource",{extend:"Ext.dd.DDProxy",requires:["Ext.dd.StatusProxy","Ext.dd.DragDropManager"],dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",animRepair:true,repairHighlightColor:"c3daf9",constructor:function(c,d){this.el=Ext.get(c);if(!this.dragData){this.dragData={}}Ext.apply(this,d);if(!this.proxy){this.proxy=new Ext.dd.StatusProxy({id:this.el.id+"-drag-status-proxy",animRepair:this.animRepair})}this.callParent([this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true}]);this.dragging=false},getDragData:function(b){return this.dragData},onDragEnter:function(h,g){var e=Ext.dd.DragDropManager.getDDById(g),f;this.cachedTarget=e;if(this.beforeDragEnter(e,h,g)!==false){if(e.isNotifyTarget){f=e.notifyEnter(this,h,this.dragData);this.proxy.setStatus(f)}else{this.proxy.setStatus(this.dropAllowed)}if(this.afterDragEnter){this.afterDragEnter(e,h,g)}}},beforeDragEnter:function(d,e,f){return true},onDragOver:function(h,g){var e=this.cachedTarget||Ext.dd.DragDropManager.getDDById(g),f;if(this.beforeDragOver(e,h,g)!==false){if(e.isNotifyTarget){f=e.notifyOver(this,h,this.dragData);this.proxy.setStatus(f)}if(this.afterDragOver){this.afterDragOver(e,h,g)}}},beforeDragOver:function(d,e,f){return true},onDragOut:function(d,f){var e=this.cachedTarget||Ext.dd.DragDropManager.getDDById(f);if(this.beforeDragOut(e,d,f)!==false){if(e.isNotifyTarget){e.notifyOut(this,d,this.dragData)}this.proxy.reset();if(this.afterDragOut){this.afterDragOut(e,d,f)}}this.cachedTarget=null},beforeDragOut:function(d,e,f){return true},onDragDrop:function(d,f){var e=this.cachedTarget||Ext.dd.DragDropManager.getDDById(f);if(this.beforeDragDrop(e,d,f)!==false){if(e.isNotifyTarget){if(e.notifyDrop(this,d,this.dragData)!==false){this.onValidDrop(e,d,f)}else{this.onInvalidDrop(e,d,f)}}else{this.onValidDrop(e,d,f)}if(this.afterDragDrop){this.afterDragDrop(e,d,f)}}delete this.cachedTarget},beforeDragDrop:function(d,e,f){return true},onValidDrop:function(d,e,f){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(d,e,f)}},getRepairXY:function(c,d){return this.el.getXY()},onInvalidDrop:function(d,e,f){this.beforeInvalidDrop(d,e,f);if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,e,this.dragData)}this.cacheTarget=null}this.proxy.repair(this.getRepairXY(e,this.dragData),this.afterRepair,this);if(this.afterInvalidDrop){this.afterInvalidDrop(e,f)}},afterRepair:function(){var b=this;if(Ext.enableFx){b.el.highlight(b.repairHighlightColor)}b.dragging=false},beforeInvalidDrop:function(d,e,f){return true},handleMouseDown:function(c){if(this.dragging){return}var d=this.getDragData(c);if(d&&this.onBeforeDrag(d,c)!==false){this.dragData=d;this.proxy.stop();this.callParent(arguments)}},onBeforeDrag:function(d,c){return true},onStartDrag:Ext.emptyFn,alignElWithMouse:function(){this.proxy.ensureAttachedToBody(true);return this.callParent(arguments)},startDrag:function(d,c){this.proxy.reset();this.proxy.hidden=false;this.dragging=true;this.proxy.update("");this.onInitDrag(d,c);this.proxy.show()},onInitDrag:function(e,f){var d=this.el.dom.cloneNode(true);d.id=Ext.id();this.proxy.update(d);this.onStartDrag(e,f);return true},getProxy:function(){return this.proxy},hideProxy:function(){this.proxy.hide();this.proxy.reset(true);this.dragging=false},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)},b4EndDrag:function(b){},endDrag:function(b){this.onEndDrag(this.dragData,b)},onEndDrag:function(d,c){},autoOffset:function(d,c){this.setDelta(-12,-20)},destroy:function(){this.callParent();Ext.destroy(this.proxy)}});Ext.define("Ext.panel.DD",{extend:"Ext.dd.DragSource",requires:["Ext.panel.Proxy"],constructor:function(d,e){var f=this;f.panel=d;f.dragData={panel:d};f.panelProxy=new Ext.panel.Proxy(d,e);f.proxy=f.panelProxy.proxy;f.callParent([d.el,e]);f.setupEl(d)},setupEl:function(f){var h=this,g=f.header,e=f.body;if(g){h.setHandleElId(g.id);e=g.el}if(e){e.setStyle("cursor","move");h.scroll=false}else{f.on("boxready",h.setupEl,h,{single:true})}},showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(d,c){this.panelProxy.show()},b4MouseDown:function(d){var e=d.getPageX(),f=d.getPageY();this.autoOffset(e,f)},onInitDrag:function(d,c){this.onStartDrag(d,c);return true},createFrame:Ext.emptyFn,getDragEl:function(b){return this.panelProxy.ghost.el.dom},endDrag:function(b){this.panelProxy.hide();this.panel.saveState()},autoOffset:function(d,c){d-=this.startPageX;c-=this.startPageY;this.setDelta(d,c)},onInvalidDrop:function(h,e,g){var f=this;f.beforeInvalidDrop(h,e,g);if(f.cachedTarget){if(f.cachedTarget.isNotifyTarget){f.cachedTarget.notifyOut(f,e,f.dragData)}f.cacheTarget=null}if(f.afterInvalidDrop){f.afterInvalidDrop(e,g)}}});Ext.define("Ext.dd.DragZone",{extend:"Ext.dd.DragSource",constructor:function(c,d){this.callParent([c,d]);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}},getDragData:function(b){return Ext.dd.Registry.getHandleFromEvent(b)},onInitDrag:function(d,c){this.proxy.update(this.dragData.ddel.cloneNode(true));this.onStartDrag(d,c);return true},afterRepair:function(){var b=this;if(Ext.enableFx){Ext.fly(b.dragData.ddel).highlight(b.repairHighlightColor)}b.dragging=false},getRepairXY:function(b){return Ext.fly(this.dragData.ddel).getXY()},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define("Ext.grid.header.DragZone",{extend:"Ext.dd.DragZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",maxProxyWidth:120,constructor:function(b){this.headerCt=b;this.ddGroup=this.getDDGroup();this.callParent([b.el]);this.proxy.el.addCls(Ext.baseCSSPrefix+"grid-col-dd")},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getDragData:function(e){var g=e.getTarget("."+this.colHeaderCls),f,h;if(g){f=Ext.getCmp(g.id);if(!this.headerCt.dragging&&f.draggable&&!(f.isOnLeftEdge(e)||f.isOnRightEdge(e))){h=document.createElement("div");h.innerHTML=Ext.getCmp(g.id).text;return{ddel:h,header:f}}}return false},onBeforeDrag:function(){return !(this.headerCt.dragging||this.disabled)},onInitDrag:function(){this.headerCt.dragging=true;this.callParent(arguments)},onDragDrop:function(){this.headerCt.dragging=false;this.callParent(arguments)},afterRepair:function(){this.callParent();this.headerCt.dragging=false},getRepairXY:function(){return this.dragData.header.el.getXY()},disable:function(){this.disabled=true},enable:function(){this.disabled=false}});Ext.define("Ext.toolbar.Separator",{extend:"Ext.toolbar.Item",alias:"widget.tbseparator",alternateClassName:"Ext.Toolbar.Separator",baseCls:Ext.baseCSSPrefix+"toolbar-separator",focusable:false});Ext.define("Ext.layout.container.boxOverflow.Menu",{extend:"Ext.layout.container.boxOverflow.None",requires:["Ext.toolbar.Separator","Ext.button.Button"],alternateClassName:"Ext.layout.boxOverflow.Menu",noItemsMenuText:'<div class="'+Ext.baseCSSPrefix+'toolbar-no-items">(None)</div>',constructor:function(c){var d=this;d.callParent(arguments);d.triggerButtonCls=d.triggerButtonCls||Ext.baseCSSPrefix+"box-menu-"+c.getNames().right;d.menuItems=[]},beginLayout:function(b){this.callParent(arguments);this.clearOverflow(b)},beginLayoutCycle:function(c,d){this.callParent(arguments);if(!d){this.clearOverflow(c);this.layout.cacheChildItems(c)}},onRemove:function(b){Ext.Array.remove(this.menuItems,b)},getSuffixConfig:function(){var f=this,d=f.layout,e=d.owner.id;f.menu=new Ext.menu.Menu({listeners:{scope:f,beforeshow:f.beforeMenuShow}});f.menuTrigger=new Ext.button.Button({id:e+"-menu-trigger",cls:Ext.layout.container.Box.prototype.innerCls+" "+f.triggerButtonCls,hidden:true,ownerCt:d.owner,ownerLayout:d,iconCls:Ext.baseCSSPrefix+f.getOwnerType(d.owner)+"-more-icon",ui:d.owner instanceof Ext.toolbar.Toolbar?"default-toolbar":"default",menu:f.menu,getSplitCls:function(){return""}});return f.menuTrigger.getRenderTree()},getOverflowCls:function(){return Ext.baseCSSPrefix+this.layout.direction+"-box-overflow-body"},handleOverflow:function(l){var m=this,n=m.layout,j=n.getNames(),i="get"+j.widthCap,k=l.state.boxPlan,h=[null,null];m.showTrigger(l);h[j.heightIndex]=(k.maxSize-m.menuTrigger["get"+j.heightCap]())/2;m.menuTrigger.setPosition.apply(m.menuTrigger,h);return{reservedSpace:m.menuTrigger[i]()}},captureChildElements:function(){var b=this.menuTrigger;if(b.rendering){b.finishRender()}},clearOverflow:function(j){var k=this,h=k.menuItems,l,n=0,m=h.length,i=k.layout.owner;i.suspendLayouts();k.captureChildElements();k.hideTrigger();i.resumeLayouts();for(;n<m;n++){l=h[n];l.suspendLayouts();l.show();l.resumeLayouts({isRoot:true})}h.length=0},showTrigger:function(D){var t=this,x=t.layout,F=x.owner,u=x.getNames(),i=u.x,B=u.width,s=D.state.boxPlan,E=s.targetSize[B],z=D.childItems,w=z.length,A=t.menuTrigger,r,y,C,v;A.suspendLayouts();A.show();A.resumeLayouts({isRoot:true});E-=t.menuTrigger.getWidth();F.suspendLayouts();t.menuItems.length=0;for(C=0;C<w;C++){r=z[C];v=r.props;if(v[i]+v[B]>E){y=r.target;t.menuItems.push(y);y.hide()}}F.resumeLayouts()},hideTrigger:function(){var b=this.menuTrigger;if(b){b.hide()}},beforeMenuShow:function(k){var l=this,i=l.menuItems,o=0,j=i.length,m,n,p=function(a,b){return a.isXType("buttongroup")&&!(b instanceof Ext.toolbar.Separator)};k.suspendLayouts();l.clearMenu();k.removeAll();for(;o<j;o++){m=i[o];if(!o&&(m instanceof Ext.toolbar.Separator)){continue}if(n&&(p(m,n)||p(n,m))){k.add("-")}l.addComponentToMenu(k,m);n=m}if(k.items.length<1){k.add(l.noItemsMenuText)}k.resumeLayouts()},createMenuConfig:function(h,f){var e=Ext.apply({},h.initialConfig),g=h.toggleGroup;Ext.copyTo(e,h,["iconCls","icon","itemId","disabled","handler","scope","menu"]);Ext.apply(e,{text:h.overflowText||h.text,hideOnClick:f,destroyMenu:false});if(g||h.enableToggle){Ext.apply(e,{group:g,checked:h.pressed,listeners:{checkchange:function(a,b){h.toggle(b)}}})}delete e.ownerCt;delete e.xtype;delete e.id;return e},addComponentToMenu:function(i,l){var j=this,k,g,h;if(l instanceof Ext.toolbar.Separator){i.add("-")}else{if(l.isComponent){if(l.isXType("splitbutton")){i.add(j.createMenuConfig(l,true))}else{if(l.isXType("button")){i.add(j.createMenuConfig(l,!l.menu))}else{if(l.isXType("buttongroup")){g=l.items.items;h=g.length;for(k=0;k<h;k++){j.addComponentToMenu(i,g[k])}}else{i.add(Ext.create(Ext.getClassName(l),j.createMenuConfig(l)))}}}}}},clearMenu:function(){var h=this.moreMenu,f,j,g,i;if(h&&h.items){f=h.items.items;g=f.length;for(j=0;j<g;j++){i=f[j];if(i.menu){delete i.menu}}}},destroy:function(){Ext.destroy(this.menu,this.menuTrigger)}});Ext.define("Ext.layout.container.Box",{alias:["layout.box"],extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.BoxLayout",requires:["Ext.layout.container.boxOverflow.None","Ext.layout.container.boxOverflow.Menu","Ext.layout.container.boxOverflow.Scroller","Ext.util.Format","Ext.dd.DragDropManager"],defaultMargins:{top:0,right:0,bottom:0,left:0},padding:0,pack:"start",flex:undefined,stretchMaxPartner:undefined,type:"box",scrollOffset:0,itemCls:Ext.baseCSSPrefix+"box-item",targetCls:Ext.baseCSSPrefix+"box-layout-ct",innerCls:Ext.baseCSSPrefix+"box-inner",availableSpaceOffset:0,reserveOffset:true,manageMargins:true,childEls:["innerCt","targetEl"],renderTpl:["{%var oc,l=values.$comp.layout,oh=l.overflowHandler;","if (oh.getPrefixConfig!==Ext.emptyFn) {","if(oc=oh.getPrefixConfig())dh.generateMarkup(oc, out)","}%}",'<div id="{ownerId}-innerCt" class="{[l.innerCls]} {[oh.getOverflowCls()]}" role="presentation">','<div id="{ownerId}-targetEl" style="position:absolute;',"width:20000px;","left:0px;top:0px;",'height:1px">',"{%this.renderBody(out, values)%}","</div>","</div>","{%if (oh.getSuffixConfig!==Ext.emptyFn) {","if(oc=oh.getSuffixConfig())dh.generateMarkup(oc, out)","}%}",{disableFormats:true,definitions:"var dh=Ext.DomHelper;"}],constructor:function(e){var f=this,d;f.callParent(arguments);f.flexSortFn=Ext.Function.bind(f.flexSort,f);f.initOverflowHandler();d=typeof f.padding;if(d=="string"||d=="number"){f.padding=Ext.util.Format.parseBox(f.padding);f.padding.height=f.padding.top+f.padding.bottom;f.padding.width=f.padding.left+f.padding.right}},getNames:function(){return this.names},getItemSizePolicy:function(e){var h=this.sizePolicy,g=this.align,f=(g=="stretchmax"||g=="stretch")?g:"";if(e.flex){h=h.flex}return h[f]},flexSort:function(g,h){var b=this.getNames().maxWidth,a=Infinity;g=g.target[b]||a;h=h.target[b]||a;if(!isFinite(g)&&!isFinite(h)){return 0}return g-h},isItemBoxParent:function(b){return true},isItemShrinkWrap:function(b){return true},minSizeSortFn:function(a,b){return b.available-a.available},roundFlex:function(b){return Math.ceil(b)},beginCollapse:function(c){var d=this;if(d.direction==="vertical"&&c.collapsedVertical()){c.collapseMemento.capture(["flex"]);delete c.flex}else{if(d.direction==="horizontal"&&c.collapsedHorizontal()){c.collapseMemento.capture(["flex"]);delete c.flex}}},beginExpand:function(b){b.collapseMemento.restore(["flex"])},beginLayout:function(m){var h=this,j=h.owner.stretchMaxPartner,i=h.innerCt.dom.style,k=h.getNames(),n=m.state,l=n.boxPlan||(n.boxPlan={});h.overflowHandler.beginLayout(m);if(typeof j==="string"){j=Ext.getCmp(j)||h.owner.query(j)[0]}m.stretchMaxPartner=j&&m.context.getCmp(j);h.callParent(arguments);m.innerCtContext=m.getEl("innerCt",h);l.scrollParallel=!!(h.owner.autoScroll||h.owner[k.overflowX]);l.scrollPerpendicular=!!(h.owner.autoScroll||h.owner[k.overflowY]);if(l.scrollParallel){n.scrollPos=h.owner.getTargetEl().dom[k.scrollLeft]}i.width="";i.height="";h.cacheFlexes(m)},beginLayoutCycle:function(w,n){var q=this,t=q.align,r=q.getNames(),o=q.pack,p=r.heightModel,u,i,v,x,s;q.overflowHandler.beginLayoutCycle(w,n);q.callParent(arguments);w.parallelSizeModel=w[r.widthModel];w.perpendicularSizeModel=w[p];w.boxOptions={align:t={stretch:t=="stretch",stretchmax:t=="stretchmax",center:t==r.center},pack:o={center:o=="center",end:o=="end"}};if(t.stretch&&w.perpendicularSizeModel.shrinkWrap){t.stretchmax=true;t.stretch=false}if(w.parallelSizeModel.shrinkWrap){o.center=o.end=false}if(t.stretchmax){u=w.childItems;x=u.length;s=q.sizeModels.shrinkWrap;for(v=0;v<x;++v){i=u[v];if(!i[p].configured){i[p]=s}}}},cacheFlexes:function(u){var p=this.getNames(),n=p.widthModel,t=0,r=u.childItems,s=r.length,o=[],x=0,v=p.minWidth,w,i,q;while(s--){i=r[s];if(i[n].calculated){w=i.target;i.flex=q=w.flex;if(q){t+=q;o.push(i);x+=w[v]||0}}}u.flexedItems=o;u.flexedMinSize=x;u.totalFlex=t;Ext.Array.sort(o,this.flexSortFn)},calculate:function(m){var h=this,i=h.getContainerSize(m),j=h.getNames(),n=m.state,k=n.boxPlan||(n.boxPlan={}),l=Ext.getScrollbarSize()[j.width];k.targetSize=i;if(l&&k.scrollPerpendicular&&m.parallelSizeModel.shrinkWrap&&!m.boxOptions.align.stretch&&!m.perpendicularSizeModel.shrinkWrap){n.additionalScrollbarWidth=l;if(!i[j.gotHeight]){h.done=false;return}}else{n.additionalScrollbarWidth=0}if(!m.parallelSizeModel.shrinkWrap&&!i[j.gotWidth]){h.done=false;return}if(!n.parallelDone){n.parallelDone=h.calculateParallel(m,j,k)}if(!n.perpendicularDone){n.perpendicularDone=h.calculatePerpendicular(m,j,k)}if(n.parallelDone&&n.perpendicularDone){if(h.owner.dock&&(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)&&!h.owner.width&&!h.horizontal){k.isIEVerticalDock=true;k.calculatedWidth=k.maxSize+m.getPaddingInfo().width+m.getFrameInfo().width}h.publishInnerCtSize(m,h.reserveOffset?h.availableSpaceOffset:0);if(h.done&&m.boxOptions.align.stretchmax&&!n.stretchMaxDone){h.calculateStretchMax(m,j,k);n.stretchMaxDone=true}}else{h.done=false}},calculateParallel:function(S,P,W){var i=this,O=S.parallelSizeModel.shrinkWrap,D=P.width,X=S.childItems,V=P.left,K=P.right,L=P.setWidth,C=X.length,F=S.flexedItems,J=F.length,G=S.boxOptions.pack,Q=i.padding,U=Q[V],A=U+Q[K]+i.scrollOffset+(i.reserveOffset?i.availableSpaceOffset:0),H,R,T,E,N,I,B,M;for(H=0;H<C;++H){N=X[H];R=N.marginInfo||N.getMarginInfo();A+=R[D];if(!N.flex){A+=N.getProp(D);if(isNaN(A)){return false}}}if(O){W.availableSpace=0;W.tooNarrow=false}else{W.availableSpace=W.targetSize[D]-A;W.tooNarrow=W.availableSpace<S.flexedMinSize;if(W.tooNarrow&&Ext.getScrollbarSize()[P.height]&&W.scrollParallel&&S.state.perpendicularDone){S.state.perpendicularDone=false;for(H=0;H<C;++H){X[H].invalidate()}}}M=A;T=W.availableSpace;E=S.totalFlex;for(H=0;H<J;H++){N=F[H];I=N.flex;B=i.roundFlex((I/E)*T);B=N[L](B);M+=B;T=Math.max(0,T-B);E-=I}if(G.center){U+=T/2;if(U<0){U=0}}else{if(G.end){U+=T}}for(H=0;H<C;++H){N=X[H];R=N.marginInfo;U+=R[V];N.setProp(P.x,U);U+=R[K]+N.props[D]}S.state.contentWidth=M+S.targetContext.getPaddingInfo()[D];if(!S.state.additionalScrollbarWidth){S[P.setContentWidth](S.state.contentWidth)}return true},calculatePerpendicular:function(W,O,ah){var Q=this,aj=W.perpendicularSizeModel.shrinkWrap,ag=ah.targetSize,ai=W.childItems,V=ai.length,L=Math.max,P=O.height,aa=O.setHeight,X=O.top,T=O.y,R=Q.padding,N=R[X],ae=ag[P]-N-R[O.bottom],G=W.boxOptions.align,Y=G.stretch,I=G.stretchmax,Z=G.center,H=0,M,i,af,S,U,J,K,ac,ab,ad;if(Y||(Z&&!aj)){if(isNaN(ae)){return false}}if(Y&&ah.scrollParallel&&ah.tooNarrow){ab=Ext.getScrollbarSize().height;ae-=ab;ah.targetSize[P]-=ab}if(Y){J=ae}else{for(i=0;i<V;i++){K=ai[i];S=K.marginInfo||K.getMarginInfo();af=K.getProp(P);if(isNaN(H=L(H,af+S[P],K.target[O.minHeight]||0))){return false}}ac=W.stretchMaxPartner;if(ac){W.setProp("maxChildHeight",H);ad=ac.childItems;if(ad&&ad.length){H=L(H,ac.getProp("maxChildHeight"));if(isNaN(H)){return false}}}ah.maxSize=H;W[O.setContentHeight](H+Q.padding[P]+W.targetContext.getPaddingInfo()[P]);if(I){J=H}else{if(Z){J=aj?H:L(ae,H);J-=W.innerCtContext.getBorderInfo()[P]}}}for(i=0;i<V;i++){K=ai[i];S=K.marginInfo||K.getMarginInfo();M=N+S[X];if(Y){K[aa](J-S[P])}else{if(Z){U=J-K.props[P];if(U>0){M=N+Math.round(U/2)}}}K.setProp(T,M)}return true},calculateStretchMax:function(C,x,v){var w=this,u=x.heightModel,z=x.height,t=x.width,A=C.childItems,E=A.length,s=v.maxSize,F=w.onBeforeInvalidateChild,i=w.onAfterInvalidateChild,r,y,B,D;for(B=0;B<E;++B){r=A[B];y=r.props;D=s-r.getMarginInfo()[z];if(D!=y[z]||r[x.heightModel].constrained){r.invalidate({before:F,after:i,layout:w,childWidth:y[t],childHeight:D,childX:y.x,childY:y.y,names:x})}}},completeLayout:function(f){var e=this,d=f.state;e.overflowHandler.completeLayout(f);if(d.boxPlan.scrollParallel){e.owner.getTargetEl().dom[e.getNames().scrollLeft]=d.scrollPos}},finishedLayout:function(b){this.overflowHandler.finishedLayout(b);this.callParent(arguments)},onBeforeInvalidateChild:function(d,e){var f=e.names.heightModel;if(!d[f].constrainedMax){d[f]=Ext.layout.SizeModel.calculated}},onAfterInvalidateChild:function(d,e){var f=e.names;d.setProp("x",e.childX);d.setProp("y",e.childY);if(d[f.heightModel].calculated){d[f.setHeight](e.childHeight)}if(d[f.widthModel].calculated){d[f.setWidth](e.childWidth)}},publishInnerCtSize:function(E,B){var x=this,y=x.getNames(),z=y.height,v=y.width,A=E.boxOptions.align,r=x.owner.dock,u=x.padding,w=E.state.boxPlan,C=w.targetSize,s=C[z],q=E.innerCtContext,F=y.contentWidth,D=(E.parallelSizeModel.shrinkWrap||(w.tooNarrow&&w.scrollParallel)?E.state.contentWidth:C[v])-(B||0),t;if(A.stretch){t=s}else{t=w.maxSize+u[y.top]+u[y.bottom]+q.getBorderInfo()[z];if(!E.perpendicularSizeModel.shrinkWrap&&A.center){t=Math.max(s,t)}}q[y.setWidth](D);q[y.setHeight](t);if(E.state.additionalScrollbarWidth){if(t>w.targetSize[y.height]){E.setProp(F,E.state.contentWidth+E.state.additionalScrollbarWidth);if(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks){E[y.setWidth](E.props[F]+E.getPaddingInfo()[y.width]+E.getBorderInfo()[y.width])}}else{E.setProp(F,E.state.contentWidth)}}if(isNaN(D+t)){x.done=false}if(w.calculatedWidth&&(r=="left"||r=="right")){E.setWidth(w.calculatedWidth,true,true)}},onRemove:function(d){var c=this;c.callParent(arguments);if(c.overflowHandler){c.overflowHandler.onRemove(d)}if(d.layoutMarginCap==c.id){delete d.layoutMarginCap}},initOverflowHandler:function(){var g=this,h=g.overflowHandler,e,f;if(typeof h=="string"){h={type:h}}e="None";if(h&&h.type!==undefined){e=h.type}f=Ext.layout.container.boxOverflow[e];if(f[g.type]){f=f[g.type]}g.overflowHandler=Ext.create("Ext.layout.container.boxOverflow."+e,g,h)},getRenderTarget:function(){return this.targetEl},getElementTarget:function(){return this.innerCt},calculateChildBox:Ext.deprecated(),calculateChildBoxes:Ext.deprecated(),updateChildBoxes:Ext.deprecated(),destroy:function(){Ext.destroy(this.innerCt,this.overflowHandler);this.callParent(arguments)}});Ext.define("Ext.layout.container.HBox",{alias:["layout.hbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.HBoxLayout",align:"top",type:"hbox",direction:"horizontal",horizontal:true,names:{lr:"lr",left:"left",leftCap:"Left",right:"right",position:"left",width:"width",contentWidth:"contentWidth",minWidth:"minWidth",maxWidth:"maxWidth",widthCap:"Width",widthModel:"widthModel",widthIndex:0,x:"x",scrollLeft:"scrollLeft",overflowX:"overflowX",center:"middle",top:"top",topPosition:"top",bottom:"bottom",height:"height",contentHeight:"contentHeight",minHeight:"minHeight",maxHeight:"maxHeight",heightCap:"Height",heightModel:"heightModel",heightIndex:1,y:"y",scrollTop:"scrollTop",overflowY:"overflowY",getWidth:"getWidth",getHeight:"getHeight",setWidth:"setWidth",setHeight:"setHeight",gotWidth:"gotWidth",gotHeight:"gotHeight",setContentWidth:"setContentWidth",setContentHeight:"setContentHeight"},sizePolicy:{flex:{"":{setsWidth:1,setsHeight:0},stretch:{setsWidth:1,setsHeight:1},stretchmax:{readsHeight:1,setsWidth:1,setsHeight:1}},"":{setsWidth:0,setsHeight:0},stretch:{setsWidth:0,setsHeight:1},stretchmax:{readsHeight:1,setsWidth:0,setsHeight:1}}});Ext.define("Ext.grid.ColumnLayout",{extend:"Ext.layout.container.HBox",alias:"layout.gridcolumn",type:"gridcolumn",reserveOffset:false,firstHeaderCls:Ext.baseCSSPrefix+"column-header-first",lastHeaderCls:Ext.baseCSSPrefix+"column-header-last",beginLayout:function(p){var l=this,q=l.owner,r=q.up("[scrollerOwner]"),k=r.view,o=0,m=l.getVisibleItems(),n=m.length,i;if(r.lockable){if(l.owner.up("tablepanel")===k.normalGrid){k=k.normalGrid.getView()}else{k=null}}l.callParent(arguments);for(;o<n;o++){i=m[o];i.removeCls([l.firstHeaderCls,l.lastHeaderCls]);i.el.setStyle({height:"auto"});i.titleEl.setStyle({height:"auto",paddingTop:""})}if(n>0){m[0].addCls(l.firstHeaderCls);m[n-1].addCls(l.lastHeaderCls)}if(!l.owner.isHeader&&Ext.getScrollbarSize().width&&!r.collapsed&&k&&k.rendered&&(p.viewTable=k.el.child("table",true))){p.viewContext=p.context.getCmp(k)}},roundFlex:function(b){return Math.floor(b)},getContainerSize:function(h){var i=this,g=i.callParent(arguments),j=h.viewContext,f;if(j&&!j.heightModel.shrinkWrap&&j.target.componentLayout.ownerContext){f=j.getProp("height");if(isNaN(f)){i.done=false}else{if(h.state.tableHeight>f){g.width-=Ext.getScrollbarSize().width;h.state.parallelDone=false;j.invalidate()}}}return g},calculate:function(f){var d=this,e=f.viewContext;if(e&&!f.state.tableHeight){f.state.tableHeight=f.viewTable.offsetHeight}d.callParent(arguments)},completeLayout:function(t){var o=this,u=o.owner,v=t.state,q=false,n=o.sizeModels.calculated,r,p,s,i,m;o.callParent(arguments);if(!v.flexesCalculated&&u.forceFit&&!u.isHeader){r=t.childItems;p=r.length;for(s=0;s<p;s++){i=r[s];m=i.target;if(m.width){m.flex=t.childItems[s].flex=m.width;delete m.width;i.widthModel=n;q=true}}if(q){o.cacheFlexes(t);t.invalidate({state:{flexesCalculated:true}})}}},finalizeLayout:function(){var k=this,l=0,m,h,j,i=k.owner,n=i.titleEl;m=k.getVisibleItems();h=m.length;j=i.el.getViewSize().height;if(n){j-=n.getHeight()}for(;l<h;l++){m[l].setPadding(j)}},publishInnerCtSize:function(i){var j=this,h=i.state.boxPlan,f=h.targetSize,g=i.peek("contentWidth");if((g!=null)&&!j.owner.isHeader){f.width=g+Ext.getScrollbarSize().width}return j.callParent(arguments)}});Ext.define("Ext.layout.container.VBox",{alias:["layout.vbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.VBoxLayout",align:"left",type:"vbox",direction:"vertical",horizontal:false,names:{lr:"tb",left:"top",leftCap:"Top",right:"bottom",position:"top",width:"height",contentWidth:"contentHeight",minWidth:"minHeight",maxWidth:"maxHeight",widthCap:"Height",widthModel:"heightModel",widthIndex:1,x:"y",scrollLeft:"scrollTop",overflowX:"overflowY",center:"center",top:"left",topPosition:"left",bottom:"right",height:"width",contentHeight:"contentWidth",minHeight:"minWidth",maxHeight:"maxWidth",heightCap:"Width",heightModel:"widthModel",heightIndex:0,y:"x",scrollTop:"scrollLeft",overflowY:"overflowX",getWidth:"getHeight",getHeight:"getWidth",setWidth:"setHeight",setHeight:"setWidth",gotWidth:"gotHeight",gotHeight:"gotWidth",setContentWidth:"setContentHeight",setContentHeight:"setContentWidth"},sizePolicy:{flex:{"":{setsWidth:0,setsHeight:1},stretch:{setsWidth:1,setsHeight:1},stretchmax:{readsWidth:1,setsWidth:1,setsHeight:1}},"":{setsWidth:0,setsHeight:0},stretch:{setsWidth:1,setsHeight:0},stretchmax:{readsWidth:1,setsWidth:1,setsHeight:0}}});Ext.define("Ext.toolbar.Toolbar",{extend:"Ext.container.Container",requires:["Ext.toolbar.Fill","Ext.layout.container.HBox","Ext.layout.container.VBox"],uses:["Ext.toolbar.Separator"],alias:"widget.toolbar",alternateClassName:"Ext.Toolbar",isToolbar:true,baseCls:Ext.baseCSSPrefix+"toolbar",ariaRole:"toolbar",defaultType:"button",vertical:false,enableOverflow:false,menuTriggerCls:Ext.baseCSSPrefix+"toolbar-more-icon",trackMenus:true,itemCls:Ext.baseCSSPrefix+"toolbar-item",statics:{shortcuts:{"-":"tbseparator"," ":"tbspacer"},shortcutsHV:{0:{"->":{xtype:"tbfill",height:0}},1:{"->":{xtype:"tbfill",width:0}}}},initComponent:function(){var c=this,d;if(!c.layout&&c.enableOverflow){c.layout={overflowHandler:"Menu"}}if(c.dock==="right"||c.dock==="left"){c.vertical=true}c.layout=Ext.applyIf(Ext.isString(c.layout)?{type:c.layout}:c.layout||{},{type:c.vertical?"vbox":"hbox",align:c.vertical?"stretchmax":"middle"});if(c.vertical){c.addClsWithUI("vertical")}if(c.ui==="footer"){c.ignoreBorderManagement=true}c.callParent();c.addEvents("overflowchange")},getRefItems:function(g){var h=this,f=h.callParent(arguments),i=h.layout,j;if(g&&h.enableOverflow){j=i.overflowHandler;if(j&&j.menu){f=f.concat(j.menu.getRefItems(g))}}return f},lookupComponent:function(f){if(typeof f=="string"){var c=Ext.toolbar.Toolbar,e=c.shortcutsHV[this.vertical?1:0][f]||c.shortcuts[f];if(typeof e=="string"){f={xtype:e}}else{if(e){f=Ext.apply({},e)}else{f={xtype:"tbtext",text:f}}}this.applyDefaults(f)}return this.callParent(arguments)},applyDefaults:function(c){if(!Ext.isString(c)){c=this.callParent(arguments);var d=this.internalDefaults;if(c.events){Ext.applyIf(c.initialConfig,d);Ext.apply(c,d)}else{Ext.applyIf(c,d)}}return c},trackMenu:function(h,f){if(this.trackMenus&&h.menu){var g=f?"mun":"mon",e=this;e[g](h,"mouseover",e.onButtonOver,e);e[g](h,"menushow",e.onButtonMenuShow,e);e[g](h,"menuhide",e.onButtonMenuHide,e)}},constructButton:function(b){return b.events?b:Ext.widget(b.split?"splitbutton":this.defaultType,b)},onBeforeAdd:function(b){if(b.is("field")||(b.is("button")&&this.ui!="footer")){b.ui=b.ui+"-toolbar"}if(b instanceof Ext.toolbar.Separator){b.setUI((this.vertical)?"vertical":"horizontal")}this.callParent(arguments)},onAdd:function(b){this.callParent(arguments);this.trackMenu(b)},onRemove:function(b){this.callParent(arguments);this.trackMenu(b,true)},getChildItemsToDisable:function(){return this.items.getRange()},onButtonOver:function(b){if(this.activeMenuBtn&&this.activeMenuBtn!=b){this.activeMenuBtn.hideMenu();b.showMenu();this.activeMenuBtn=b}},onButtonMenuShow:function(b){this.activeMenuBtn=b},onButtonMenuHide:function(b){delete this.activeMenuBtn}});Ext.define("Ext.panel.AbstractPanel",{extend:"Ext.container.Container",mixins:{docking:"Ext.container.DockingContainer"},requires:["Ext.util.MixedCollection","Ext.Element","Ext.toolbar.Toolbar"],baseCls:Ext.baseCSSPrefix+"panel",isPanel:true,componentLayout:"dock",childEls:["body"],renderTpl:["{% this.renderDockedItems(out,values,0); %}",(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)?"<div></div>":"",'<div id="{id}-body" class="{baseCls}-body<tpl if="bodyCls"> {bodyCls}</tpl>',' {baseCls}-body-{ui}<tpl if="uiCls">','<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl>','</tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values);%}","</div>","{% this.renderDockedItems(out,values,1); %}"],bodyPosProps:{x:"x",y:"y"},border:true,initComponent:function(){var b=this;b.addEvents("bodyresize");if(b.frame&&b.border&&b.bodyBorder===undefined){b.bodyBorder=false}if(b.frame&&b.border&&(b.bodyBorder===false||b.bodyBorder===0)){b.manageBodyBorders=true}b.callParent()},beforeDestroy:function(){this.destroyDockedItems();this.callParent()},initItems:function(){this.callParent();this.initDockingItems()},initRenderData:function(){var d=this,c=d.callParent();d.initBodyStyles();d.protoBody.writeTo(c);delete d.protoBody;return c},getComponent:function(d){var c=this.callParent(arguments);if(c===undefined&&!Ext.isNumber(d)){c=this.getDockedComponent(d)}return c},getProtoBody:function(){var c=this,d=c.protoBody;if(!d){c.protoBody=d=new Ext.util.ProtoElement({cls:c.bodyCls,style:c.bodyStyle,clsProp:"bodyCls",styleProp:"bodyStyle",styleIsText:true})}return d},initBodyStyles:function(){var f=this,e=f.getProtoBody(),d=Ext.Element;if(f.bodyPadding!==undefined){e.setStyle("padding",d.unitizeBox((f.bodyPadding===true)?5:f.bodyPadding))}if(f.frame&&f.bodyBorder){if(!Ext.isNumber(f.bodyBorder)){f.bodyBorder=1}e.setStyle("border-width",d.unitizeBox(f.bodyBorder))}},getCollapsedDockedItems:function(){return[this.getReExpander()]},setBodyStyle:function(e,g){var h=this,f=h.rendered?h.body:h.getProtoBody();if(Ext.isFunction(e)){e=e()}if(arguments.length==1&&Ext.isString(e)){e=Ext.Element.parseStyles(e)}f.setStyle.apply(h.body,arguments)},addBodyCls:function(d){var f=this,e=f.rendered?f.body:f.getProtoBody();e.addCls(d)},removeBodyCls:function(d){var f=this,e=f.rendered?f.body:f.getProtoBody();e.removeCls(d)},addUIClsToElement:function(d){var f=this,e=f.callParent(arguments);f.addBodyCls([Ext.baseCSSPrefix+d,f.baseCls+"-body-"+d,f.baseCls+"-body-"+f.ui+"-"+d]);return e},removeUIClsFromElement:function(d){var f=this,e=f.callParent(arguments);f.removeBodyCls([Ext.baseCSSPrefix+d,f.baseCls+"-body-"+d,f.baseCls+"-body-"+f.ui+"-"+d]);return e},addUIToElement:function(){var b=this;b.callParent(arguments);b.addBodyCls(b.baseCls+"-body-"+b.ui)},removeUIFromElement:function(){var b=this;b.callParent(arguments);b.removeBodyCls(b.baseCls+"-body-"+b.ui)},getTargetEl:function(){return this.body},getRefItems:function(d){var c=this.callParent(arguments);return this.getDockingRefItems(d,c)},setupRenderTpl:function(b){this.callParent(arguments);this.setupDockingRenderTpl(b)}});Ext.define("Ext.panel.Panel",{extend:"Ext.panel.AbstractPanel",requires:["Ext.panel.Header","Ext.fx.Anim","Ext.util.KeyMap","Ext.panel.DD","Ext.XTemplate","Ext.layout.component.Dock","Ext.util.Memento"],alias:"widget.panel",alternateClassName:"Ext.Panel",collapsedCls:"collapsed",animCollapse:Ext.enableFx,minButtonWidth:75,collapsed:false,collapseFirst:true,hideCollapseTool:false,titleCollapse:false,floatable:true,collapsible:false,closable:false,closeAction:"destroy",preventHeader:false,header:undefined,headerPosition:"top",frame:false,frameHeader:true,titleAlign:"left",manageHeight:true,initComponent:function(){var b=this;b.addEvents("beforeclose","close","beforeexpand","beforecollapse","expand","collapse","titlechange","iconchange","iconclschange");if(b.collapsible){this.addStateEvents(["expand","collapse"])}if(b.unstyled){b.setUI("plain")}if(b.frame){b.setUI(b.ui+"-framed")}b.bridgeToolbars();b.callParent();b.collapseDirection=b.collapseDirection||b.headerPosition||Ext.Component.DIRECTION_TOP;b.hiddenOnCollapse=new Ext.dom.CompositeElement()},beforeDestroy:function(){var b=this;Ext.destroy(b.placeholder,b.ghostPanel,b.dd);b.callParent()},initAria:function(){this.callParent();this.initHeaderAria()},getFocusEl:function(){return this.el},initHeaderAria:function(){var d=this,e=d.el,f=d.header;if(e&&f){e.dom.setAttribute("aria-labelledby",f.titleCmp.id)}},getHeader:function(){return this.header},setTitle:function(i){var l=this,g=l.title,j=l.header,h=l.reExpander,k=l.placeholder;l.title=i;if(j){if(j.isHeader){j.setTitle(i)}else{j.title=i}}if(h){h.setTitle(i)}if(k&&k.setTitle){k.setTitle(i)}l.fireEvent("titlechange",l,i,g)},setIconCls:function(g){var j=this,f=j.iconCls,h=j.header,i=j.placeholder;j.iconCls=g;if(h){if(h.isHeader){h.setIconCls(g)}else{h.iconCls=g}}if(i&&i.setIconCls){i.setIconCls(g)}j.fireEvent("iconclschange",j,g,f)},setIcon:function(g){var f=this,j=f.icon,h=f.header,i=f.placeholder;f.icon=g;if(h){if(h.isHeader){h.setIcon(g)}else{h.icon=g}}if(i&&i.setIcon){i.setIcon(g)}f.fireEvent("iconchange",f,g,j)},bridgeToolbars:function(){var h=this,i=[],l,g,j=h.minButtonWidth;function k(c,a,b){if(Ext.isArray(c)){c={xtype:"toolbar",items:c}}else{if(!c.xtype){c.xtype="toolbar"}}c.dock=a;if(a=="left"||a=="right"){c.vertical=true}if(b){c.layout=Ext.applyIf(c.layout||{},{pack:{left:"start",center:"center"}[h.buttonAlign]||"end"})}return c}if(h.tbar){i.push(k(h.tbar,"top"));h.tbar=null}if(h.bbar){i.push(k(h.bbar,"bottom"));h.bbar=null}if(h.buttons){h.fbar=h.buttons;h.buttons=null}if(h.fbar){l=k(h.fbar,"bottom",true);l.ui="footer";if(j){g=l.defaults;l.defaults=function(b){var a=g||{};if((!b.xtype||b.xtype==="button"||(b.isComponent&&b.isXType("button")))&&!("minWidth" in a)){a=Ext.apply({minWidth:j},a)}return a}}i.push(l);h.fbar=null}if(h.lbar){i.push(k(h.lbar,"left"));h.lbar=null}if(h.rbar){i.push(k(h.rbar,"right"));h.rbar=null}if(h.dockedItems){if(!Ext.isArray(h.dockedItems)){h.dockedItems=[h.dockedItems]}h.dockedItems=h.dockedItems.concat(i)}else{h.dockedItems=i}},isPlaceHolderCollapse:function(){return this.collapseMode=="placeholder"},onBoxReady:function(){this.callParent();if(this.collapsed){this.setHiddenDocked()}},beforeRender:function(){var c=this,d;c.callParent();c.initTools();if(!(c.preventHeader||(c.header===false))){c.updateHeader()}if(c.collapsed){if(c.isPlaceHolderCollapse()){c.hidden=true;c.placeholderCollapse();d=c.collapsed;c.collapsed=false}else{c.beginCollapse();c.addClsWithUI(c.collapsedCls)}}if(d){c.collapsed=d}},initTools:function(){var b=this;b.tools=b.tools?Ext.Array.clone(b.tools):[];if(b.collapsible&&!(b.hideCollapseTool||b.header===false||b.preventHeader)){b.collapseDirection=b.collapseDirection||b.headerPosition||"top";b.collapseTool=b.expandTool=Ext.widget({xtype:"tool",type:(b.collapsed&&!b.isPlaceHolderCollapse())?("expand-"+b.getOppositeDirection(b.collapseDirection)):("collapse-"+b.collapseDirection),handler:b.toggleCollapse,scope:b});if(b.collapseFirst){b.tools.unshift(b.collapseTool)}}b.addTools();if(b.closable){b.addClsWithUI("closable");b.addTool({type:"close",handler:Ext.Function.bind(b.close,b,[])})}if(b.collapseTool&&!b.collapseFirst){b.tools.push(b.collapseTool)}},addTools:Ext.emptyFn,close:function(){if(this.fireEvent("beforeclose",this)!==false){this.doClose()}},doClose:function(){this.fireEvent("close",this);this[this.closeAction]()},updateHeader:function(l){var g=this,i=g.header,j=g.title,k=g.tools,h=g.headerPosition=="left"||g.headerPosition=="right";if((i!==false)&&(l||j||(k&&k.length)||(g.collapsible&&!g.titleCollapse))){if(i&&i.isHeader){i.show()}else{i=g.header=Ext.widget(Ext.apply({xtype:"header",title:j,titleAlign:g.titleAlign,orientation:h?"vertical":"horizontal",dock:g.headerPosition||"top",textCls:g.headerTextCls,iconCls:g.iconCls,icon:g.icon,baseCls:g.baseCls+"-header",tools:k,ui:g.ui,id:g.id+"_header",indicateDrag:g.draggable,frame:g.frame&&g.frameHeader,ignoreParentFrame:g.frame||g.overlapHeader,ignoreBorderManagement:g.frame||g.ignoreHeaderBorderManagement,listeners:g.collapsible&&g.titleCollapse?{click:g.toggleCollapse,scope:g}:null},g.header));g.addDocked(i,0);g.tools=i.tools}g.initHeaderAria()}else{if(i){i.hide()}}},setUI:function(c){var d=this;d.callParent(arguments);if(d.header&&d.header.rendered){d.header.setUI(c)}},getContentTarget:function(){return this.body},getTargetEl:function(){return this.body||this.frameBody||this.el},isVisible:function(d){var c=this;if(c.collapsed&&c.placeholder){return c.placeholder.isVisible(d)}return c.callParent(arguments)},onHide:function(){var b=this;if(b.collapsed&&b.placeholder){b.placeholder.hide()}else{b.callParent(arguments)}},onShow:function(){var b=this;if(b.collapsed&&b.placeholder){b.hidden=true;b.placeholder.show()}else{b.callParent(arguments)}},onRemoved:function(c){var d=this;d.callParent(arguments);if(d.placeholder&&!c){d.ownerCt.remove(d.placeholder,false)}},addTool:function(j){j=[].concat(j);var k=this,i=k.header,l,h=j.length,g;for(l=0;l<h;l++){g=j[l];k.tools.push(g);if(i){i.addTool(g)}}k.updateHeader()},getOppositeDirection:function(d){var c=Ext.Component;switch(d){case c.DIRECTION_TOP:return c.DIRECTION_BOTTOM;case c.DIRECTION_RIGHT:return c.DIRECTION_LEFT;case c.DIRECTION_BOTTOM:return c.DIRECTION_TOP;case c.DIRECTION_LEFT:return c.DIRECTION_RIGHT}},getWidthAuthority:function(){if(this.collapsed&&this.collapsedHorizontal()){return 1}return this.callParent()},getHeightAuthority:function(){if(this.collapsed&&this.collapsedVertical()){return 1}return this.callParent()},collapsedHorizontal:function(){var b=this.getCollapsed();return b=="left"||b=="right"},collapsedVertical:function(){var b=this.getCollapsed();return b=="top"||b=="bottom"},getCollapsed:function(){var b=this;if(b.collapsed===true){return b.collapseDirection}return b.collapsed},getState:function(){var e=this,d=e.callParent(),f;d=e.addPropertyToState(d,"collapsed");if(e.collapsed){f=e.collapseMemento;f=f&&f.data;if(e.collapsedVertical()){if(d){delete d.height}if(f){d=e.addPropertyToState(d,"height",f.height)}}else{if(d){delete d.width}if(f){d=e.addPropertyToState(d,"width",f.width)}}}return d},findReExpander:function(k){var l=this,j=Ext.Component,m=l.dockedItems.items,i=m.length,c,n;if(l.collapseMode=="mini"){return}switch(k){case j.DIRECTION_TOP:case j.DIRECTION_BOTTOM:for(n=0;n<i;n++){c=m[n];if(!c.hidden){if(c.isHeader&&(!c.dock||c.dock=="top"||c.dock=="bottom")){return c}}}break;case j.DIRECTION_LEFT:case j.DIRECTION_RIGHT:for(n=0;n<i;n++){c=m[n];if(!c.hidden){if(c.isHeader&&(c.dock=="left"||c.dock=="right")){return c}}}break;default:throw ("Panel#findReExpander must be passed a valid collapseDirection")}},getReExpander:function(h){var e=this,g=h||e.collapseDirection,f=e.reExpander||e.findReExpander(g);e.expandDirection=e.getOppositeDirection(g);if(!f){e.reExpander=f=e.createReExpander(g,{dock:g,cls:Ext.baseCSSPrefix+"docked "+e.baseCls+"-"+e.ui+"-collapsed",ownerCt:e,ownerLayout:e.componentLayout});e.dockedItems.insert(0,f)}return f},createReExpander:function(m,n){var o=this,k=m=="left",p=m=="right",l=k||p,i,j=Ext.apply({hideMode:"offsets",title:o.title,orientation:l?"vertical":"horizontal",textCls:o.headerTextCls,icon:o.icon,iconCls:o.iconCls,baseCls:o.baseCls+"-header",ui:o.ui,frame:o.frame&&o.frameHeader,ignoreParentFrame:o.frame||o.overlapHeader,indicateDrag:o.draggable},n);if(o.collapseMode=="mini"){if(l){j.width=1}else{j.height=1}}if(!o.hideCollapseTool){i=k||(p&&o.isPlaceHolderCollapse());j[i?"items":"tools"]=[{xtype:"tool",type:"expand-"+o.getOppositeDirection(m),uiCls:["top"],handler:o.toggleCollapse,scope:o}]}j=new Ext.panel.Header(j);j.addClsWithUI(o.getHeaderCollapsedClasses(j));return j},getHeaderCollapsedClasses:function(g){var e=this,h=e.collapsedCls,f;f=[h,h+"-"+g.dock];if(e.border&&(!e.frame||(e.frame&&Ext.supports.CSS3BorderRadius))){f.push(h+"-border-"+g.dock)}return f},beginCollapse:function(){var j=this,l=j.lastBox,i=j.rendered,g=j.collapseMemento||(j.collapseMemento=new Ext.util.Memento(j)),k=j.getSizeModel(),h;g.capture(["height","minHeight","width","minWidth"]);if(l){g.capture(["x","y","height","width"],l,"last.")}if(j.collapsedVertical()){if(k.width.shrinkWrap){j.width=i?j.getWidth():j.width||j.minWidth||100}delete j.height;j.minHeight=0}else{if(j.collapsedHorizontal()){if(k.height.shrinkWrap){j.height=i?j.getHeight():j.height||j.minHeight||100}delete j.width;j.minWidth=0}}if(j.ownerCt){j.ownerCt.getLayout().beginCollapse(j)}if(!j.isPlaceHolderCollapse()){if(j.header===(h=j.getReExpander())){j.header.addClsWithUI(j.getHeaderCollapsedClasses(j.header));if(j.header.rendered){j.header.updateFrame()}}else{if(h.el){h.el.show();h.hidden=false}}}if(j.resizer){j.resizer.disable()}},beginExpand:function(){var g=this,h=g.lastBox,e=g.collapseMemento,f;e.restore(["height","minHeight","width","minWidth"]);if(h){e.restore(["x","y","height","width"],true,h,"last.")}if(g.ownerCt){g.ownerCt.getLayout().beginExpand(g)}if(!g.isPlaceHolderCollapse()){if(g.header===(f=g.getReExpander())){g.header.removeClsWithUI(g.getHeaderCollapsedClasses(g.header));if(g.header.rendered){g.header.updateFrame()}}else{f.hidden=true;f.el.hide()}}if(g.resizer){g.resizer.enable()}},collapse:function(i,g){var j=this,h=i||j.collapseDirection,f=j.ownerCt;if(j.isCollapsingOrExpanding){return j}if(arguments.length<2){g=j.animCollapse}if(j.collapsed||j.fireEvent("beforecollapse",j,i,g)===false){return j}if(f&&j.isPlaceHolderCollapse()){return j.placeholderCollapse(i,g)}j.collapsed=h;j.beginCollapse();j.fireHierarchyEvent("collapse");return j.doCollapseExpand(1,g)},doCollapseExpand:function(g,f){var i=this,j=i.animCollapse,h=i.ownerLayout;i.animCollapse=f;i.isCollapsingOrExpanding=g;if(h&&!f){h.onContentChange(i)}else{i.updateLayout({isRoot:true})}i.animCollapse=j;return i},afterCollapse:function(d){var e=this,f=e.ownerLayout;e.isCollapsingOrExpanding=0;if(e.collapseTool){e.collapseTool.setType("expand-"+e.getOppositeDirection(e.collapseDirection))}if(f&&d){f.onContentChange(e)}e.setHiddenDocked();e.fireEvent("collapse",e)},setHiddenDocked:function(){var j=this,m=j.hiddenOnCollapse,h=j.getReExpander(),n=j.getDockedItems(),i=n.length,l=0,k;m.add(j.body);for(;l<i;l++){k=n[l];if(k&&k!==h&&k.el){m.add(k.el)}}m.setStyle("visibility","hidden")},restoreHiddenDocked:function(){var b=this.hiddenOnCollapse;b.setStyle("visibility","");b.clear()},getPlaceholder:function(j){var f=this,h=j||f.collapseDirection,g=null,i=f.placeholder;if(!i){if(f.floatable||(f.collapsible&&f.titleCollapse)){g={click:{fn:f.floatable?f.floatCollapsedPanel:f.toggleCollapse,element:"el",scope:f}}}f.placeholder=i=Ext.widget(f.createReExpander(h,{id:f.id+"-placeholder",listeners:g}))}if(!i.placeholderFor){if(!i.isComponent){f.placeholder=i=f.lookupComponent(i)}Ext.applyIf(i,{margins:f.margins,placeholderFor:f});i.addCls([Ext.baseCSSPrefix+"region-collapsed-placeholder",Ext.baseCSSPrefix+"region-collapsed-"+h+"-placeholder",f.collapsedCls])}return i},placeholderCollapse:function(l,i){var m=this,n=m.ownerCt,j=l||m.collapseDirection,h=Ext.baseCSSPrefix+"border-region-slide-in",k=m.getPlaceholder(l);m.isCollapsingOrExpanding=1;m.hidden=true;m.collapsed=j;if(k.rendered){if(k.el.dom.parentNode!==m.el.dom.parentNode){m.el.dom.parentNode.insertBefore(k.el.dom,m.el.dom)}k.hidden=false;k.el.show();n.updateLayout()}else{n.insert(n.items.indexOf(m),k)}if(m.rendered){m.el.setVisibilityMode(Ext.Element.VISIBILITY);if(i){m.el.addCls(h);k.el.hide();m.el.slideOut(j.substr(0,1),{preserveScroll:true,duration:Ext.Number.from(i,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){m.el.removeCls(h);k.el.show().setStyle("display","none").slideIn(j.substr(0,1),{easing:"linear",duration:100,listeners:{afteranimate:function(){k.focus();m.isCollapsingOrExpanding=0;m.fireEvent("collapse",m)}}})}}})}else{m.el.hide();m.isCollapsingOrExpanding=0;m.fireEvent("collapse",m)}}else{m.isCollapsingOrExpanding=0;m.fireEvent("collapse",m)}return m},floatCollapsedPanel:function(){var m=this,k=m.placeholder,l=k.getBox(true),o,n=Ext.baseCSSPrefix+"border-region-slide-in",q=m.collapsed,j=m.ownerCt||m,r;if(m.el.hasCls(n)){m.slideOutFloatedPanel();return}if(m.isSliding){return}m.isSliding=true;function p(a){var b=m.el.getRegion().union(k.el.getRegion()).adjust(1,-1,-1,1);if(!b.contains(a.getPoint())){m.slideOutFloatedPanel()}}m.placeholder.el.hide();m.placeholder.hidden=true;m.el.show();m.hidden=false;m.collapsed=false;j.updateLayout();o=m.getBox(true);m.placeholder.el.show();m.placeholder.hidden=false;m.el.hide();m.hidden=true;m.collapsed=q;j.updateLayout();m.placeholderMouseMon=k.el.monitorMouseLeave(500,p);m.panelMouseMon=m.el.monitorMouseLeave(500,p);m.el.addCls(n);if(m.collapseTool){m.collapseTool.el.hide()}switch(m.collapsed){case"top":m.el.setLeftTop(l.x,l.y+l.height-1);r="t";break;case"right":m.el.setLeftTop(l.x-o.width+1,l.y);r="r";break;case"bottom":m.el.setLeftTop(l.x,l.y-o.height+1);r="b";break;case"left":m.el.setLeftTop(l.x+l.width-1,l.y);r="l";break}m.floatedFromCollapse=m.collapsed;m.collapsed=m.hidden=false;m.el.slideIn(r,{preserveScroll:true,listeners:{afteranimate:function(){m.isSliding=false}}})},isLayoutRoot:function(){if(this.floatedFromCollapse){return true}return this.callParent()},slideOutFloatedPanel:function(){var e=this,f=this.el,d;if(e.isSliding){return}e.isSliding=true;e.slideOutFloatedPanelBegin();if(typeof e.collapsed=="string"){d=e.collapsed.charAt(0)}f.slideOut(d,{preserveScroll:true,listeners:{afteranimate:function(){e.slideOutFloatedPanelEnd();e.el.removeCls(Ext.baseCSSPrefix+"border-region-slide-in");e.isSliding=false}}})},slideOutFloatedPanelBegin:function(){var d=this,c=this.el;d.collapsed=d.floatedFromCollapse;d.hidden=true;d.floatedFromCollapse=null;c.un(d.panelMouseMon);d.placeholder.el.un(d.placeholderMouseMon)},slideOutFloatedPanelEnd:function(){if(this.collapseTool){this.collapseTool.el.show()}},expand:function(d){var c=this;if(c.isCollapsingOrExpanding){return c}if(!arguments.length){d=c.animCollapse}if(!c.collapsed&&!c.floatedFromCollapse){return c}if(c.fireEvent("beforeexpand",c,d)===false){return c}if(c.isPlaceHolderCollapse()){return c.placeholderExpand(d)}c.restoreHiddenDocked();c.beginExpand();c.collapsed=false;c.fireHierarchyEvent("expand");return c.doCollapseExpand(2,d)},placeholderExpand:function(h){var m=this,j=m.collapsed,n=Ext.baseCSSPrefix+"border-region-slide-in",l,i,k;if(m.floatedFromCollapse){i=m.getPosition(true);m.slideOutFloatedPanelBegin();m.slideOutFloatedPanelEnd()}m.isCollapsingOrExpanding=2;m.placeholder.hidden=true;m.placeholder.el.hide();m.collapsed=false;m.show();if(h){if(i){l=m.el.getXY();m.el.setLeftTop(i[0],i[1]);m.el.moveTo(l[0],l[1],{duration:Ext.Number.from(h,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){m.el.removeCls(n);m.isCollapsingOrExpanding=0;m.fireEvent("expand",m)}}})}else{m.hidden=true;m.el.addCls(n);m.el.hide();m.collapsed=j;m.placeholder.show();k=j.substr(0,1);m.hidden=false;m.el.slideIn(k,{preserveScroll:true,duration:Ext.Number.from(h,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){m.collapsed=false;m.el.removeCls(n);m.placeholder.hide();m.isCollapsingOrExpanding=0;m.fireEvent("expand",m)}}})}}else{m.isCollapsingOrExpanding=0;m.fireEvent("expand",m)}return m},afterExpand:function(d){var e=this,f=e.ownerLayout;e.isCollapsingOrExpanding=0;if(e.collapseTool){e.collapseTool.setType("collapse-"+e.collapseDirection)}if(f&&d){f.onContentChange(e)}e.fireEvent("expand",e)},setBorder:function(f,h){if(h){return}var e=this,g=e.header;if(!f){f=0}else{f=Ext.Element.unitizeBox((f===true)?1:f)}if(g){if(g.isHeader){g.setBorder(f)}else{g.border=f}}if(e.rendered&&e.bodyBorder!==false){e.body.setStyle("border-width",f)}e.updateLayout();e.border=f},toggleCollapse:function(){return(this.collapsed||this.floatedFromCollapse)?this.expand():this.collapse()},getKeyMap:function(){return this.keyMap||(this.keyMap=new Ext.util.KeyMap(Ext.apply({target:this.el},this.keys)))},initDraggable:function(){this.dd=new Ext.panel.DD(this,Ext.isBoolean(this.draggable)?null:this.draggable)},ghostTools:function(){var j=[],i=this.header,k=i?i.query("tool[hidden=false]"):[],l,h,g;if(k.length){l=0;h=k.length;for(;l<h;l++){g=k[l];j.push({type:g.type})}}else{j=[{type:"placeholder"}]}return j},ghost:function(g){var i=this,f=i.ghostPanel,j=i.getBox(),h;if(!f){f=new Ext.panel.Panel({renderTo:document.body,floating:{shadow:false},frame:(Ext.supports.CSS3BorderRadius&&!i.isWindow)?i.frame:false,overlapHeader:i.overlapHeader,headerPosition:i.headerPosition,baseCls:i.baseCls,cls:i.baseCls+"-ghost "+(g||"")});i.ghostPanel=f}f.floatParent=i.floatParent;if(i.floating){f.setZIndex(Ext.Number.from(i.el.getStyle("zIndex"),0))}else{f.toFront()}if(!(i.preventHeader||(i.header===false))){h=f.header;if(h){h.suspendLayouts();Ext.Array.forEach(h.query("tool"),h.remove,h);h.resumeLayouts()}f.addTool(i.ghostTools());f.setTitle(i.title);f.setIconCls(i.iconCls)}f.el.show();f.setPagePosition(j.x,j.y);f.setSize(j.width,j.height);i.el.hide();return f},unghost:function(d,e){var f=this;if(!f.ghostPanel){return}if(d!==false){f.el.show();if(e!==false){f.setPagePosition(f.ghostPanel.el.getXY());if(f.hideMode=="offsets"){delete f.el.hideModeStyles}}Ext.defer(f.focus,10,f)}f.ghostPanel.el.hide()},beginDrag:function(){if(this.floatingItems){this.floatingItems.hide()}},endDrag:function(){if(this.floatingItems){this.floatingItems.show()}},initResizable:function(b){if(this.collapsed){b.disabled=true}this.callParent([b])}},function(){this.prototype.animCollapse=Ext.enableFx});Ext.define("Ext.tab.Panel",{extend:"Ext.panel.Panel",alias:"widget.tabpanel",alternateClassName:["Ext.TabPanel"],requires:["Ext.layout.container.Card","Ext.tab.Bar"],tabPosition:"top",removePanelHeader:true,plain:false,itemCls:Ext.baseCSSPrefix+"tabpanel-child",minTabWidth:undefined,maxTabWidth:undefined,deferredRender:true,initComponent:function(){var f=this,d=[].concat(f.dockedItems||[]),e=f.activeTab||(f.activeTab=0);f.layout=new Ext.layout.container.Card(Ext.apply({owner:f,deferredRender:f.deferredRender,itemCls:f.itemCls,activeItem:f.activeTab},f.layout));f.tabBar=new Ext.tab.Bar(Ext.apply({dock:f.tabPosition,plain:f.plain,border:f.border,cardLayout:f.layout,tabPanel:f},f.tabBar));d.push(f.tabBar);f.dockedItems=d;f.addEvents("beforetabchange","tabchange");f.callParent(arguments);f.activeTab=f.getComponent(e);if(f.activeTab){f.activeTab.tab.activate(true);f.tabBar.activeTab=f.activeTab.tab}},setActiveTab:function(e){var f=this,d;e=f.getComponent(e);if(e){d=f.getActiveTab();if(d!==e&&f.fireEvent("beforetabchange",f,e,d)===false){return false}if(!e.isComponent){Ext.suspendLayouts();e=f.add(e);Ext.resumeLayouts()}f.activeTab=e;Ext.suspendLayouts();f.layout.setActiveItem(e);e=f.activeTab=f.layout.getActiveItem();if(e&&e!==d){f.tabBar.setActiveTab(e.tab);Ext.resumeLayouts(true);if(d!==e){f.fireEvent("tabchange",f,e,d)}}else{Ext.resumeLayouts(true)}return e}},getActiveTab:function(){var c=this,d=c.getComponent(c.activeTab);if(d&&c.items.indexOf(d)!=-1){c.activeTab=d}else{c.activeTab=null}return c.activeTab},getTabBar:function(){return this.tabBar},onAdd:function(h,j){var i=this,f=h.tabConfig||{},g={xtype:"tab",card:h,disabled:h.disabled,closable:h.closable,hidden:h.hidden&&!h.hiddenByLayout,tooltip:h.tooltip,tabBar:i.tabBar,closeText:h.closeText};f=Ext.applyIf(f,g);h.tab=i.tabBar.insert(j,f);h.on({scope:i,enable:i.onItemEnable,disable:i.onItemDisable,beforeshow:i.onItemBeforeShow,iconchange:i.onItemIconChange,iconclschange:i.onItemIconClsChange,titlechange:i.onItemTitleChange});if(h.isPanel){if(i.removePanelHeader){if(h.rendered){if(h.header){h.header.hide()}}else{h.header=false}}if(h.isPanel&&i.border){h.setBorder(false)}}},onItemEnable:function(b){b.tab.enable()},onItemDisable:function(b){b.tab.disable()},onItemBeforeShow:function(b){if(b!==this.activeTab){this.setActiveTab(b);return false}},onItemIconChange:function(c,d){c.tab.setIcon(d)},onItemIconClsChange:function(c,d){c.tab.setIconCls(d)},onItemTitleChange:function(d,c){d.tab.setText(c)},doRemove:function(g,e){var h=this,f;if(h.destroying||h.items.getCount()==1){h.activeTab=null}else{if((f=h.tabBar.items.indexOf(h.tabBar.findNextActivatable(g.tab)))!==-1){h.setActiveTab(f)}}this.callParent(arguments);delete g.tab.card;delete g.tab},onRemove:function(d,f){var e=this;d.un({scope:e,enable:e.onItemEnable,disable:e.onItemDisable,beforeshow:e.onItemBeforeShow});if(!e.destroying&&d.tab.ownerCt===e.tabBar){e.tabBar.remove(d.tab)}}});Ext.define("Docs.view.comments.Index",{extend:"Ext.panel.Panel",alias:"widget.commentindex",mixins:["Docs.view.Scrolling"],cls:"comment-index iScroll",margin:"10 0 0 0",autoScroll:true,items:[{xtype:"container",html:'<h1>Recent Comments</h1> Hide read: <input type="checkbox" name="hideRead" id="hideRead" />'},{xtype:"container",id:"recentcomments"}],getTab:function(){return Docs.enableComments?{cls:"comments",href:"#!/comment",tooltip:"Comments"}:false}});Ext.define("Docs.view.guides.Container",{extend:"Ext.panel.Panel",alias:"widget.guidecontainer",componentCls:"guide-container",mixins:["Docs.view.Scrolling"],initComponent:function(){this.addEvents("afterload");this.callParent(arguments)},scrollToEl:function(b){this.scrollToView(b,{highlight:true,offset:-100})},load:function(b){this.tpl=this.tpl||new Ext.XTemplate(Docs.data.showPrintButton?'<a class="print guide" href="?print=/guide/{name}" target="_blank">Print</a>':"","{content}");this.update(this.tpl.apply(b));Docs.Syntax.highlight(this.getEl());this.fireEvent("afterload")}});Ext.define("Docs.view.videos.Container",{extend:"Ext.panel.Panel",alias:"widget.videocontainer",componentCls:"video-container",load:function(b){this.tpl=this.tpl||new Ext.XTemplate('<object width="640" height="360" id="video_player">','<param name="allowfullscreen" value="true" />','<param name="allowscriptaccess" value="always" />','<param name="flashvars" value="api=1" />','<param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id={id}&server=vimeo.com&color=4CC208&fullscreen=1" />','<embed src="http://vimeo.com/moogaloop.swf?clip_id={id}&server=vimeo.com&color=4CC208&fullscreen=1" ','type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="360"></embed>',"</object>","<h1>{title}</h1>","<p>{[this.linkify(values.description)]}</p>",{linkify:function(a){return a.replace(/(\bhttps?:\/\/\S+)/ig,"<a href='$1'>$1</a>")}});this.update(this.tpl.apply(b))},listeners:{hide:function(){var b=document.getElementById("video_player");if(b&&b.api_pause){b.api_pause()}}}});Ext.define("Docs.view.examples.TouchContainer",{extend:"Ext.panel.Panel",alias:"widget.touchexamplecontainer",requires:["Docs.view.examples.Device"],layout:"fit",cls:"example-container iScroll",autoScroll:true,bodyPadding:"10 0 5 0",initComponent:function(){this.dockedItems=[{xtype:"container",dock:"top",html:['<h1 class="example-title">Example</h1>','<div class="cls-grouping example-toolbar">','<div class="devices">','<button class="phone selected">Phone</button>','<button class="tablet">Tablet</button>',"</div>",'<span class="separator"> </span>','<div class="orientations">','<button class="landscape selected">Landscape</button>','<button class="portrait">Portrait</button>',"</div>",'<span class="separator"> </span>',"<div>",'<button class="new-window">Open in new window</button>',"</div>","</div>"].join("")}];this.callParent(arguments)},load:function(b){this.title=b.title+" Example";this.device=Ext.create("Docs.view.examples.Device",{url:b.url,device:b.device||"phone",orientation:b.orientation||"landscape"});this.refresh()},refresh:function(){this.update(this.device.toHtml());this.updateScale();this.updateTitle();this.updateButtons()},setDevice:function(b){this.device.setDevice(b);this.refresh()},setOrientation:function(b){this.device.setOrientation(b);this.refresh()},updateScale:function(){var b=Ext.query("iframe",this.el.dom)[0];if(b){b.onload=Ext.Function.bind(function(){var d=document.createElement("style");var a="html { overflow: hidden }";if(this.device.getDevice()==="tablet"){a+="body { font-size: 79.8% !important; }"}d.innerHTML=a;b.contentWindow.document.body.appendChild(d)},this)}},updateTitle:function(){Ext.get(Ext.query(".example-title")).update(this.title)},updateButtons:function(){Ext.Array.each(Ext.query(".example-toolbar .orientations button"),function(b){Ext.get(b).removeCls("selected")});Ext.get(Ext.query(".example-toolbar .orientations button."+this.device.getOrientation())).addCls("selected");Ext.Array.each(Ext.query(".example-toolbar .devices button"),function(b){Ext.get(b).removeCls("selected")});Ext.get(Ext.query(".example-toolbar .devices button."+this.device.getDevice())).addCls("selected")},clear:function(){this.update("")}});Ext.define("Ext.menu.Menu",{extend:"Ext.panel.Panel",alias:"widget.menu",requires:["Ext.layout.container.Fit","Ext.layout.container.VBox","Ext.menu.CheckItem","Ext.menu.Item","Ext.menu.KeyNav","Ext.menu.Manager","Ext.menu.Separator"],allowOtherMenus:false,ariaRole:"menu",defaultAlign:"tl-bl?",floating:true,constrain:true,hidden:true,hideMode:"visibility",ignoreParentClicks:false,isMenu:true,showSeparator:true,minWidth:undefined,defaultMinWidth:120,initComponent:function(){var f=this,i=Ext.baseCSSPrefix,g=[i+"menu"],j=f.bodyCls?[f.bodyCls]:[],h=f.floating!==false;f.addEvents("click","mouseenter","mouseleave","mouseover");Ext.menu.Manager.register(f);if(f.plain){g.push(i+"menu-plain")}f.cls=g.join(" ");j.unshift(i+"menu-body");f.bodyCls=j.join(" ");if(!f.layout){f.layout={type:"vbox",align:"stretchmax",overflowHandler:"Scroller"}}if(h&&f.minWidth===undefined){f.minWidth=f.defaultMinWidth}if(!h&&f.initialConfig.hidden!==true){f.hidden=false}f.callParent(arguments);f.on("beforeshow",function(){var a=!!f.items.length;if(a&&f.rendered){f.el.setStyle("visibility",null)}return a})},beforeRender:function(){this.callParent(arguments);if(!this.getSizeModel().width.shrinkWrap){this.layout.align="stretch"}},onBoxReady:function(){var d=this,c;d.callParent(arguments);if(d.showSeparator){c={cls:Ext.baseCSSPrefix+"menu-icon-separator",html:" "};if((!Ext.isStrict&&Ext.isIE)||Ext.isIE6){c.style="height:"+d.el.getHeight()+"px"}d.iconSepEl=d.layout.getElementTarget().insertFirst(c)}d.mon(d.el,{click:d.onClick,mouseover:d.onMouseOver,scope:d});d.mouseMonitor=d.el.monitorMouseLeave(100,d.onMouseLeave,d);d.keyNav=new Ext.menu.KeyNav(d)},getBubbleTarget:function(){return this.parentMenu||this.ownerButton||this.callParent(arguments)},canActivateItem:function(b){return b&&!b.isDisabled()&&b.isVisible()&&(b.canActivate||b.getXTypes().indexOf("menuitem")<0)},deactivateActiveItem:function(e){var h=this,g=h.activeItem,f=h.focusedItem;if(g){g.deactivate();if(!g.activated){delete h.activeItem}}if(f&&e){f.blur();delete h.focusedItem}},getFocusEl:function(){return this.focusedItem||this.el},hide:function(){this.deactivateActiveItem(true);this.callParent(arguments)},getItemFromEvent:function(b){return this.getChildByElement(b.getTarget())},lookupComponent:function(c){var d=this;if(typeof c=="string"){c=d.lookupItemFromString(c)}else{if(Ext.isObject(c)){c=d.lookupItemFromObject(c)}}c.minWidth=c.minWidth||d.minWidth;return c},lookupItemFromObject:function(h){var e=this,g=Ext.baseCSSPrefix,f;if(!h.isComponent){if(!h.xtype){h=Ext.create("Ext.menu."+(Ext.isBoolean(h.checked)?"Check":"")+"Item",h)}else{h=Ext.ComponentManager.create(h,h.xtype)}}if(h.isMenuItem){h.parentMenu=e}if(!h.isMenuItem&&!h.dock){f=[g+"menu-item",g+"menu-item-cmp"];if(!e.plain&&(h.indent===true||h.iconCls==="no-icon")){f.push(g+"menu-item-indent")}if(h.rendered){h.el.addCls(f)}else{h.cls=(h.cls?h.cls:"")+" "+f.join(" ")}h.isMenuItem=true}return h},lookupItemFromString:function(b){return(b=="separator"||b=="-")?new Ext.menu.Separator():new Ext.menu.Item({canActivate:false,hideOnClick:false,plain:true,text:b})},onClick:function(f){var d=this,e;if(d.disabled){f.stopEvent();return}if(f.within(d.layout.getRenderTarget())){e=d.getItemFromEvent(f)||d.activeItem;if(e&&e.isXType("menuitem")){if(!e.menu||!d.ignoreParentClicks){e.onClick(f)}else{f.stopEvent()}}if(!e.disabled){d.fireEvent("click",d,e,f)}}},onDestroy:function(){var b=this;Ext.menu.Manager.unregister(b);delete b.parentMenu;delete b.ownerButton;if(b.rendered){b.el.un(b.mouseMonitor);b.keyNav.destroy();delete b.keyNav}b.callParent(arguments)},onMouseLeave:function(c){var d=this;d.deactivateActiveItem();if(d.disabled){return}d.fireEvent("mouseleave",d,c)},onMouseOver:function(k){var l=this,j=k.getRelatedTarget(),e=!l.el.contains(j),m=l.getItemFromEvent(k),n=l.parentMenu,i=l.parentItem;if(e&&n){n.setActiveItem(i);i.cancelDeferHide();n.mouseMonitor.mouseenter()}if(l.disabled){return}if(m&&!m.activated){l.setActiveItem(m);if(m.activated&&m.expandMenu){m.expandMenu()}}if(e){l.fireEvent("mouseenter",l,k)}l.fireEvent("mouseover",l,m,k)},setActiveItem:function(c){var d=this;if(c&&(c!=d.activeItem)){d.deactivateActiveItem();if(d.canActivateItem(c)){if(c.activate){c.activate();if(c.activated){d.activeItem=c;d.focusedItem=c;d.focus()}}else{c.focus();d.focusedItem=c}}c.el.scrollIntoView(d.layout.getRenderTarget())}},showBy:function(e,g,h){var f=this;if(f.floating&&e){f.show();f.setPagePosition(f.el.getAlignToXY(e.el||e,g||f.defaultAlign,h));f.setVerticalPosition()}return f},show:function(){var i=this,j,f,g,h=i.maxHeight;if(!i.rendered){i.doAutoRender()}if(i.floating){j=Ext.fly(i.el.getScopeParent());f=j.getViewSize().height;i.maxHeight=Math.min(h||f,f)}g=i.callParent(arguments);i.maxHeight=h;return g},afterComponentLayout:function(j,g,f,h){var i=this;i.callParent(arguments);if(i.showSeparator){i.iconSepEl.setHeight(i.componentLayout.lastComponentSize.contentHeight)}},setVerticalPosition:function(){var o=this,m,n=o.el.getY(),l=n,j=o.getHeight(),q=Ext.Element.getViewportHeight().height,p=Ext.fly(o.el.getScopeParent()),r=p.getViewSize().height,k=n-p.getScroll().top;p=null;if(o.floating){m=o.maxHeight?o.maxHeight:r-k;if(j>r){l=n-k}else{if(m<j){l=n-(j-m)}else{if((n+j)>q){l=q-j}}}}o.el.setY(l)}});Ext.define("Docs.view.TabMenu",{extend:"Ext.menu.Menu",plain:true,componentCls:"tab-menu",initComponent:function(){this.addEvents("tabItemClick","closeAllTabs");this.items=[{text:"Close all tabs",iconCls:"close",cls:"close-all",handler:function(){this.fireEvent("closeAllTabs")},scope:this}];this.callParent()},addTab:function(c,d){this.insert(this.items.length-1,{text:c.text,iconCls:c.iconCls,origIcon:c.iconCls,href:c.href,cls:d,handler:this.onTabItemClick,scope:this})},onTabItemClick:function(b){this.fireEvent("tabItemClick",b)},addTabCls:function(c,d){this.items.each(function(a){if(a.href===c.href){a.addCls(d)}})}});Ext.define("Docs.view.Tabs",{extend:"Ext.container.Container",alias:"widget.doctabs",id:"doctabs",componentCls:"doctabs",requires:["Docs.History","Docs.view.TabMenu"],minTabWidth:80,maxTabWidth:160,animDuration:150,tabs:[],tabsInBar:[],tabCache:{},staticTabs:[],initComponent:function(){this.addEvents("tabActivate","tabClose");this.tpl=Ext.create("Ext.XTemplate",'<tpl for=".">','<div class="doctab overview {cls}{active}">','<div class="l"></div>','<div class="m">','<tpl if="text">','<a class="tabUrl ov-tab-text" href="{href}">{text}</a>',"<tpl else>",'<a class="tabUrl ov-tab" href="{href}"> </a>',"</tpl>","</div>",'<div class="r"></div>',"</div>","</tpl>",'<div style="float: left; width: 8px"> </div>','<div class="tab-overflow"></div>');this.html=this.tpl.applyTemplate(this.staticTabs);this.tabTpl=Ext.create("Ext.XTemplate",'<div class="doctab','{[values.active ? (" active") : ""]}','" style="','{[values.width ? ("width: " + values.width + "px;") : ""]}','{[values.visible ? "" : "visibility: hidden;"]}">','<div class="l"></div>','<div class="m">','<span class="icn {iconCls}"> </span>','<a class="tabUrl main-tab" href="{href}">{text}</a>',"</div>",'<div class="r"><a class="close" href="#"> </a></div>',"</div>");this.on("afterrender",this.initListeners,this);this.on("resize",this.refresh,this);this.callParent()},initListeners:function(){this.el.on("mouseover",function(c,d){Ext.get(d).addCls("ovr")},this,{delegate:".close"});this.el.on("mouseout",function(c,d){Ext.get(d).removeCls("ovr")},this,{delegate:".close"});this.el.on("click",function(f,d){var e=Ext.get(d).up(".doctab").down(".tabUrl").getAttribute("href");e=Docs.History.cleanUrl(e);this.removeTab(e);this.fireEvent("tabClose",e)},this,{delegate:".close",preventDefault:true});this.el.on("click",function(f,d){if(Ext.fly(f.getTarget()).hasCls("close")){return}var e=Ext.get(d).down(".tabUrl").getAttribute("href");this.fireEvent("tabActivate",e,{navigate:true})},this,{delegate:".doctab"});this.el.on("contextmenu",function(c,d){if(!Ext.get(d).hasCls("overview")){this.createMenu().showBy(d)}},this,{delegate:".doctab",preventDefault:true});this.el.on("click",Ext.emptyFn,this,{delegate:".tabUrl",preventDefault:true});this.el.on("mouseleave",function(){if(this.shouldResize){this.resizeTabs({animate:true})}},this)},setStaticTabs:function(b){this.staticTabs=b;this.refresh()},getStaticTabs:function(b){return this.staticTabs},addTab:function(d,c){this.tabCache[d.href]=d;if(!this.hasTab(d.href)){this.tabs.push(d.href);if(this.roomForNewTab()){this.addTabToBar(d,c)}this.addTabToMenu(this.overflowButton.menu,d)}if(c.activate){this.activateTab(d.href)}this.saveTabs()},removeTab:function(d){if(!this.hasTab(d)){return}this.removeFromArray(this.tabs,d);var e=this.removeFromArray(this.tabsInBar,d);var f=this.tabs[this.tabsInBar.length];if(f){this.tabsInBar.push(f)}if(this.activeTab===d){if(this.tabs.length===0){Docs.App.getController(this.getControllerName(d)).loadIndex()}else{if(e===this.tabs.length){e-=1}this.activateTab(this.tabs[e]);this.fireEvent("tabActivate",this.tabs[e])}}if(this.tabs.length>=this.maxTabsInBar()){this.refresh()}else{this.removeTabFromBar(d)}this.saveTabs()},removeFromArray:function(f,d){var e=Ext.Array.indexOf(f,d);if(e!==-1){Ext.Array.erase(f,e,1)}return e},activateTab:function(d){this.activeTab=d;if(!this.inTabs(d)){this.swapLastTabWith(d)}Ext.Array.each(Ext.query(".doctab a.tabUrl"),function(a){Ext.get(a).up(".doctab").removeCls(["active","highlight"])});var e=Ext.query('.doctab a[href="'+d+'"]')[0];if(e){var f=Ext.get(e).up(".doctab");f.addCls("active")}this.highlightOverviewTab(d)},refresh:function(){var i=this.tpl.applyTemplate(this.staticTabs);var f=this.maxTabsInBar()<this.tabs.length?this.maxTabsInBar():this.tabs.length;this.tabsInBar=this.tabs.slice(0,f);for(var j=0;j<f;j++){var h=this.tabCache[this.tabs[j]];var g=Ext.apply(h,{visible:true,active:this.activeTab===h.href,width:this.tabWidth()});i+=this.tabTpl.applyTemplate(g)}this.el.dom.innerHTML=i;if(this.activeTab&&this.activeTab!==this.tabs[f-1]){this.activateTab(this.activeTab);this.fireEvent("tabActivate",this.activeTab)}this.highlightOverviewTab(this.activeTab);this.createOverflowButton();this.addToolTips()},closeAllTabs:function(){if(this.inTabBar(this.activeTab)){this.tabs=this.tabsInBar=[this.activeTab]}else{this.tabs=this.tabsInBar=[]}this.refresh();this.saveTabs()},tabData:function(){return Ext.Array.map(this.tabs,function(b){return this.tabCache[b]},this)},roomForNewTab:function(){return this.tabsInBar.length<this.maxTabsInBar()},hasTab:function(b){return Ext.Array.contains(this.tabs,b)},addTabToBar:function(e,d){this.tabsInBar.push(e.href);var f=Ext.get(this.tabTpl.append(this.el.dom,e));if(d.animate&&!Ext.isIE){f.setStyle("width","10px");f.setStyle({visibility:"visible"});f.animate({to:{width:this.tabWidth()}})}else{f.setStyle({visibility:"visible"})}this.resizeTabs(d)},inTabBar:function(b){return Ext.Array.contains(this.tabsInBar,b)},inTabs:function(d){var c=Ext.Array.pluck(this.staticTabs,"href").concat(this.tabsInBar);return Ext.Array.contains(c,d)},removeTabFromBar:function(d){var c=this.getTabEl(d);c.dom.removed=true;if(Ext.isIE){c.remove();this.createOverflowButton()}else{c.animate({to:{top:30},duration:this.animDuration}).animate({to:{width:10},duration:this.animDuration,listeners:{afteranimate:function(){c.remove();this.shouldResize=true;this.createOverflowButton()},scope:this}})}},swapLastTabWith:function(d){var e=this.getTabEl(this.tabsInBar[this.tabsInBar.length-1]);if(e){var f=this.tabTpl.append(document.body,this.tabCache[d]);e.dom.parentNode.replaceChild(f,e.dom);this.tabsInBar[this.tabsInBar.length-1]=d;Ext.get(f).setStyle({visibility:"visible",width:String(this.tabWidth())+"px"})}},highlightOverviewTab:function(d){var c=Ext.query(".doctab."+this.getControllerName(d).toLowerCase());if(c&&c[0]){Ext.get(c[0]).addCls("highlight")}},maxTabsInBar:function(){return Math.floor(this.tabBarWidth()/this.minTabWidth)},tabWidth:function(){var b=Math.floor(this.tabBarWidth()/this.tabsInBar.length)+6;if(b>this.maxTabWidth){return this.maxTabWidth}else{if(b<this.minTabWidth){return this.minTabWidth}else{return b}}},tabBarWidth:function(){return this.getWidth()-(this.staticTabs.length*50)-15},resizeTabs:function(b){this.shouldResize=false;Ext.Array.each(Ext.query(".doctab"),function(a){var d=Ext.get(a);if(!d.dom.removed&&!d.hasCls("overview")){if(b&&b.animate&&!Ext.isIE){d.animate({to:{width:this.tabWidth()}})}else{d.setWidth(this.tabWidth())}}},this)},getTabEl:function(c){var d=Ext.query('.doctab a[href="'+c+'"]');if(d&&d[0]){return Ext.get(d[0]).up(".doctab")}},createOverflowButton:function(){if(this.overflowButton){this.overflowButton.destroy()}this.overflowButton=Ext.create("Ext.button.Button",{baseCls:"",renderTo:this.getEl().down(".tab-overflow"),menu:this.createMenu()})},createMenu:function(){var b=new Docs.view.TabMenu({listeners:{closeAllTabs:this.closeAllTabs,tabItemClick:function(a){this.fireEvent("tabActivate",a.href,{navigate:true})},scope:this}});Ext.Array.each(this.tabs,function(a){this.addTabToMenu(b,this.tabCache[a])},this);return b},addTabToMenu:function(g,h){var f=Ext.Array.indexOf(this.tabs,h.href);if(this.tabs.length>this.tabsInBar.length&&f===this.maxTabsInBar()){g.addTabCls(h,"overflow")}var e=this.inTabBar(h.href);g.addTab(h,e?"":"overflow")},addToolTips:function(){Ext.Array.each(this.staticTabs,function(c){var d=Ext.get(Ext.query(".doctab."+c.cls)[0]);if(d){Ext.create("Ext.tip.ToolTip",{target:d,html:c.tooltip})}})},saveTabs:function(){Docs.Settings.set("tabs",this.tabs)},getControllerName:function(b){if(/#!?\/api/.test(b)){return"Classes"}else{if(/#!?\/guide/.test(b)){return"Guides"}else{if(/#!?\/video/.test(b)){return"Videos"}else{if(/#!?\/example/.test(b)){return"Examples"}else{if(/#!?\/stats/.test(b)){return"Stats"}else{if(/#!?\/tests/.test(b)){return"Tests"}else{if(/#!?\/comment/.test(b)){return"Comments"}else{return"Index"}}}}}}}}});Ext.define("Ext.panel.Table",{extend:"Ext.panel.Panel",alias:"widget.tablepanel",uses:["Ext.selection.RowModel","Ext.grid.PagingScroller","Ext.grid.header.Container","Ext.grid.Lockable"],extraBaseCls:Ext.baseCSSPrefix+"grid",extraBodyCls:Ext.baseCSSPrefix+"grid-body",layout:"fit",hasView:false,viewType:null,selType:"rowmodel",scroll:true,deferRowRender:true,sortableColumns:true,enableLocking:false,scrollerOwner:true,enableColumnMove:true,restrictColumnReorder:false,enableColumnResize:true,enableColumnHide:true,rowLines:true,initComponent:function(){if(!this.viewType){Ext.Error.raise("You must specify a viewType config.")}if(this.headers){Ext.Error.raise("The headers config is not supported. Please specify columns instead.")}var l=this,i=l.scroll,q=false,r=false,m=l.columns||l.colModel,k,p=l.border,o,n;if(l.columnLines){l.addCls(Ext.baseCSSPrefix+"grid-with-col-lines")}if(l.rowLines){l.addCls(Ext.baseCSSPrefix+"grid-with-row-lines")}l.store=Ext.data.StoreManager.lookup(l.store||"ext-empty-store");if(!m){Ext.Error.raise("A column configuration must be specified")}if(m instanceof Ext.grid.header.Container){l.headerCt=m;l.headerCt.border=p;l.columns=l.headerCt.items.items}else{if(Ext.isArray(m)){m={items:m,border:p}}Ext.apply(m,{forceFit:l.forceFit,sortable:l.sortableColumns,enableColumnMove:l.enableColumnMove,enableColumnResize:l.enableColumnResize,enableColumnHide:l.enableColumnHide,border:p,restrictReorder:l.restrictColumnReorder});l.columns=m.items;if(l.enableLocking||Ext.ComponentQuery.query("{locked !== undefined}{processed != true}",l.columns).length){l.self.mixin("lockable",Ext.grid.Lockable);l.injectLockable()}}l.scrollTask=new Ext.util.DelayedTask(l.syncHorizontalScroll,l);l.addEvents("reconfigure","viewready");l.bodyCls=l.bodyCls||"";l.bodyCls+=(" "+l.extraBodyCls);l.cls=l.cls||"";l.cls+=(" "+l.extraBaseCls);delete l.autoScroll;if(!l.hasView){if(!l.headerCt){l.headerCt=new Ext.grid.header.Container(m)}l.columns=l.headerCt.items.items;if(l.store.buffered&&!l.store.remoteSort){for(o=0,n=l.columns.length;o<n;o++){l.columns[o].sortable=false}}if(l.hideHeaders){l.headerCt.height=0;l.headerCt.addCls(Ext.baseCSSPrefix+"grid-header-ct-hidden");l.addCls(Ext.baseCSSPrefix+"grid-header-hidden");if(Ext.isIEQuirks){l.headerCt.style={display:"none"}}}if(i===true||i==="both"){q=r=true}else{if(i==="horizontal"){r=true}else{if(i==="vertical"){q=true}}}l.relayHeaderCtEvents(l.headerCt);l.features=l.features||[];if(!Ext.isArray(l.features)){l.features=[l.features]}l.dockedItems=[].concat(l.dockedItems||[]);l.dockedItems.unshift(l.headerCt);l.viewConfig=l.viewConfig||{};if(l.store&&l.store.buffered){l.viewConfig.preserveScrollOnRefresh=true}else{if(l.invalidateScrollerOnRefresh!==undefined){l.viewConfig.preserveScrollOnRefresh=!l.invalidateScrollerOnRefresh}}k=l.getView();l.items=[k];l.hasView=true;if(q){if(l.store.buffered){l.verticalScroller=new Ext.grid.PagingScroller(Ext.apply({panel:l,store:l.store,view:l.view},l.verticalScroller))}}if(r){if(!l.hideHeaders){k.on({scroll:{fn:l.onHorizontalScroll,element:"el",scope:l}})}}l.mon(k.store,{load:l.onStoreLoad,scope:l});l.mon(k,{viewready:l.onViewReady,refresh:l.onRestoreHorzScroll,scope:l})}this.relayEvents(l.view,["beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","selectionchange","beforeselect","select","beforedeselect","deselect"]);l.callParent(arguments);l.addStateEvents(["columnresize","columnmove","columnhide","columnshow","sortchange"]);if(l.headerCt){l.headerCt.on("afterlayout",l.onRestoreHorzScroll,l)}},relayHeaderCtEvents:function(b){this.relayEvents(b,["columnresize","columnmove","columnhide","columnshow","sortchange"])},getState:function(){var e=this,d=e.callParent(),f=e.store.sorters.first();d=e.addPropertyToState(d,"columns",(e.headerCt||e).getColumnsState());if(f){d=e.addPropertyToState(d,"sort",{property:f.property,direction:f.direction,root:f.root})}return d},applyState:function(i){var j=this,h=i.sort,g=j.store,f=i.columns;delete i.columns;j.callParent(arguments);if(f){(j.headerCt||j).applyColumnsState(f)}if(h){if(g.remoteSort){g.sort({property:h.property,direction:h.direction,root:h.root},null,false)}else{g.sort(h.property,h.direction)}}},getStore:function(){return this.store},getView:function(){var d=this,c;if(!d.view){c=d.getSelectionModel();d.view=Ext.widget(Ext.apply({},d.viewConfig,{grid:d,deferInitialRefresh:d.deferRowRender!==false,scroll:d.scroll,xtype:d.viewType,store:d.store,headerCt:d.headerCt,selModel:c,features:d.features,panel:d,emptyText:d.emptyText?'<div class="'+Ext.baseCSSPrefix+'grid-empty">'+d.emptyText+"</div>":""}));d.mon(d.view,{uievent:d.processEvent,scope:d});c.view=d.view;d.headerCt.view=d.view;d.relayEvents(d.view,["cellclick","celldblclick"])}return d.view},setAutoScroll:Ext.emptyFn,processEvent:function(n,e,j,p,o,l){var m=this,k;if(o!==-1){k=m.headerCt.getGridColumns()[o];return k.processEvent.apply(k,arguments)}},determineScrollbars:function(){Ext.log.warn("Obsolete")},invalidateScroller:function(){Ext.log.warn("Obsolete")},scrollByDeltaY:function(c,d){this.getView().scrollBy(0,c,d)},scrollByDeltaX:function(c,d){this.getView().scrollBy(c,0,d)},afterCollapse:function(){var b=this;b.saveScrollPos();b.saveScrollPos();b.callParent(arguments)},afterExpand:function(){var b=this;b.callParent(arguments);b.restoreScrollPos();b.restoreScrollPos()},saveScrollPos:Ext.emptyFn,restoreScrollPos:Ext.emptyFn,onHeaderResize:function(){this.delayScroll()},onHeaderMove:function(j,i,h,g,k){var l=this;if(l.optimizedColumnMove===false){l.view.refresh()}else{l.view.moveColumn(g,k,h)}l.delayScroll()},onHeaderHide:function(d,c){this.delayScroll()},onHeaderShow:function(d,c){this.delayScroll()},delayScroll:function(){var b=this.getScrollTarget().el;if(b){this.scrollTask.delay(10,null,null,[b.dom.scrollLeft])}},onViewReady:function(){this.fireEvent("viewready",this)},onRestoreHorzScroll:function(){var b=this.scrollLeftPos;if(b){this.syncHorizontalScroll(b)}},setScrollTop:function(f){var d=this,e=d.getScrollerOwner();e.virtualScrollTop=f},getScrollerOwner:function(){var b=this;if(!this.scrollerOwner){b=this.up("[scrollerOwner]")}return b},getLhsMarker:function(){var b=this;return b.lhsMarker||(b.lhsMarker=Ext.DomHelper.append(b.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true))},getRhsMarker:function(){var b=this;return b.rhsMarker||(b.rhsMarker=Ext.DomHelper.append(b.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true))},getSelectionModel:function(){if(!this.selModel){this.selModel={}}var c="SINGLE",d;if(this.simpleSelect){c="SIMPLE"}else{if(this.multiSelect){c="MULTI"}}Ext.applyIf(this.selModel,{allowDeselect:this.allowDeselect,mode:c});if(!this.selModel.events){d=this.selModel.selType||this.selType;this.selModel=Ext.create("selection."+d,this.selModel)}if(!this.selModel.hasRelaySetup){this.relayEvents(this.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect"]);this.selModel.hasRelaySetup=true}if(this.disableSelection){this.selModel.locked=true}return this.selModel},getScrollTarget:function(){var d=this.getScrollerOwner(),c=d.query("tableview");return c[1]||c[0]},onHorizontalScroll:function(d,c){this.syncHorizontalScroll(c.scrollLeft)},syncHorizontalScroll:function(f){var d=this,e;if(d.rendered){e=d.getScrollTarget();e.el.dom.scrollLeft=f;d.headerCt.el.dom.scrollLeft=f;d.scrollLeftPos=f}},onStoreLoad:Ext.emptyFn,getEditorParent:function(){return this.body},bindStore:function(d){var c=this;c.store=d;c.getView().bindStore(d)},beforeDestroy:function(){Ext.destroy(this.verticalScroller);this.callParent()},reconfigure:function(f,e){var h=this,g=h.headerCt;if(h.lockable){h.reconfigureLockable(f,e)}else{if(e){delete h.scrollLeftPos;g.suspendLayouts();g.removeAll();g.add(e)}if(f){f=Ext.StoreManager.lookup(f);h.bindStore(f)}else{h.getView().refresh()}if(e){g.resumeLayouts(true)}g.setSortState()}h.fireEvent("reconfigure",h,f,e)}});Ext.define("Ext.grid.Panel",{extend:"Ext.panel.Table",requires:["Ext.grid.View"],alias:["widget.gridpanel","widget.grid"],alternateClassName:["Ext.list.ListView","Ext.ListView","Ext.grid.GridPanel"],viewType:"gridview",lockable:false,bothCfgCopy:["invalidateScrollerOnRefresh","hideHeaders","enableColumnHide","enableColumnMove","enableColumnResize","sortableColumns"],normalCfgCopy:["verticalScroller","verticalScrollDock","verticalScrollerType","scroll"],lockedCfgCopy:[],rowLines:true});Ext.define("Docs.view.examples.InlineEditor",{extend:"Ext.Panel",bodyPadding:2,autoScroll:true,componentCls:"inline-example-editor",initComponent:function(){this.addEvents("init","change");this.on("afterlayout",this.initCodeMirror,this);this.callParent(arguments)},initCodeMirror:function(b){if(!this.codemirror){this.codemirror=CodeMirror(this.body,{mode:"javascript",indentUnit:4,value:this.value,onChange:Ext.Function.bind(function(a){this.fireEvent("change")},this)});this.fireEvent("init")}},refresh:function(){this.codemirror.refresh()},getValue:function(){return this.codemirror?this.codemirror.getValue():this.value},getHeight:function(){var b=this.el.down(".CodeMirror-lines");return b?b.getHeight():undefined},selectAll:function(){var d=this.codemirror.lineCount()-1;var c=this.codemirror.getLine(d).length;this.codemirror.setSelection({line:0,ch:0},{line:d,ch:c})}});Ext.define("Docs.view.examples.InlinePreview",{extend:"Ext.Panel",requires:["Docs.view.examples.Device"],bodyPadding:"0 10",statics:{iframeCounter:0,getNextIframeId:function(){this.iframeCounter++;return this.iframeCounter.toString()}},options:{},constructor:function(b){b=b||{};b.iframeId=this.self.getNextIframeId();b.id="inline-preview-"+b.iframeId;this.callParent([b]);this.addEvents(["previewsuccess","previewfailure"])},initComponent:function(){this.html=this.getHtml();this.callParent(arguments)},getHtml:function(){if(Docs.data.touchExamplesUi){return Ext.create("Docs.view.examples.Device",{url:"eg-iframe.html",id:this.iframeId,device:this.options.device,orientation:this.options.orientation}).toHtml()}else{var b=new Ext.XTemplate('<iframe id="{id}" style="width: 100%; height: 100%; border: 0" frameBorder="0"></iframe>');return b.apply({id:this.iframeId})}},update:function(h){var f=this.options;var e=Ext.get(this.iframeId);var g=Ext.Function.bind(this.iframeCallback,this);if(e){e.on("load",function(){Ext.Function.defer(function(){e.dom.contentWindow.loadInlineExample(h+"\n",f,g)},100)},this,{single:true});e.dom.src="eg-iframe.html"}},iframeCallback:function(c,d){if(c){this.fireEvent("previewsuccess",this)}else{this.fireEvent("previewfailure",this,d)}},getHeight:function(){return document.getElementById(this.iframeId).parentNode.clientHeight}});Ext.define("Docs.view.examples.Inline",{extend:"Ext.Panel",alias:"widget.inlineexample",requires:["Docs.view.examples.InlineEditor","Docs.view.examples.InlinePreview"],componentCls:"inline-example-cmp",layout:"card",border:0,resizable:{transparent:true,handles:"s",constrainTo:false},maxCodeHeight:400,options:{},constructor:function(){this.callParent(arguments);this.addEvents("previewsuccess","previewfailure")},initComponent:function(){this.options=Ext.apply({device:"phone",orientation:"landscape"},this.options);this.items=[this.editor=Ext.create("Docs.view.examples.InlineEditor",{cmpName:"code",value:this.value,listeners:{init:this.updateHeight,change:this.updateHeight,scope:this}}),this.preview=Ext.create("Docs.view.examples.InlinePreview",{cmpName:"preview",options:this.options})];this.relayEvents(this.preview,["previewsuccess","previewfailure"]);if(this.options.preview){this.activeItem=1;if(this.toolbar){this.toolbar.activateButton("preview")}}else{this.activeItem=0;if(this.toolbar){this.toolbar.activateButton("code")}}this.on("afterrender",this.init,this);this.callParent(arguments)},init:function(){var b=this.layout.getActiveItem();if(b.cmpName==="preview"){this.showPreview()}this.updateHeight();if(this.toolbar){this.initToolbarEvents()}},initToolbarEvents:function(){this.toolbar.on("buttonclick",function(b){if(b==="code"){this.showCode()}else{if(b==="preview"){this.showPreview()}else{if(b==="copy"){this.showCode();this.editor.selectAll()}}}},this)},showCode:function(){this.layout.setActiveItem(0);this.updateHeight();if(this.toolbar){this.toolbar.activateButton("code")}},showPreview:function(){this.preview.update(this.editor.getValue());this.layout.setActiveItem(1);this.updateHeight();if(this.toolbar){this.toolbar.activateButton("preview")}},updateHeight:function(){var d=this.preview.getHeight();var e=this.editor.getHeight();var f=30;if(Docs.data.touchExamplesUi&&d>0){this.setHeight(d+f)}else{if(e>0){this.setHeight(Ext.Number.constrain(e+f,0,this.maxCodeHeight))}}}});Ext.define("Docs.view.tests.BatchRunner",{extend:"Ext.container.Container",requires:["Docs.view.examples.Inline"],initComponent:function(){this.addEvents("start","finish","statuschange");this.callParent(arguments)},run:function(b){this.fireEvent("start");this.runNext({pass:0,fail:0,total:b.length,remaining:b})},runNext:function(h){this.fireEvent("statuschange",h);if(!h.remaining||h.remaining.length<1){this.fireEvent("finish");return}var j=h.remaining.shift();var i=j.get("options");i.preview=false;var f="var alert = function(){};\n";var g=Ext.create("Docs.view.examples.Inline",{cls:"doc-test-preview",height:0,value:f+j.get("code"),options:i,listeners:{previewsuccess:function(a){this.onSuccess(j,h)},previewfailure:function(a,b){this.onFailure(j,h,b)},scope:this}});this.removeAll();this.add(g);g.showPreview()},onSuccess:function(d,c){d.set("status","success");d.commit();c.pass++;this.runNext(c)},onFailure:function(e,f,d){e.set("status","failure");e.set("message",d.toString());e.commit();f.fail++;this.runNext(f)}});Ext.define("Ext.tip.Tip",{extend:"Ext.panel.Panel",alternateClassName:"Ext.Tip",minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",constrainPosition:true,autoRender:true,hidden:true,baseCls:Ext.baseCSSPrefix+"tip",floating:{shadow:true,shim:true,constrain:true},focusOnToFront:false,closeAction:"hide",ariaRole:"tooltip",initComponent:function(){var b=this;b.floating=Ext.apply({},{shadow:b.shadow},b.self.prototype.floating);b.callParent(arguments);b.frame=true;b.constrain=b.constrain||b.constrainPosition},showAt:function(c){var d=this;this.callParent(arguments);if(d.isVisible()){d.setPagePosition(c[0],c[1]);if(d.constrainPosition||d.constrain){d.doConstrain()}d.toFront(true)}},showBy:function(d,c){this.showAt(this.el.getAlignToXY(d,c||this.defaultAlign))},initDraggable:function(){var b=this;b.draggable={el:b.getDragEl(),delegate:b.header.el,constrain:b,constrainTo:b.el.getScopeParent()};Ext.Component.prototype.initDraggable.call(b)},ghost:undefined,unghost:undefined});Ext.define("Ext.tip.ToolTip",{extend:"Ext.tip.Tip",alias:"widget.tooltip",alternateClassName:"Ext.ToolTip",autoHide:true,showDelay:500,hideDelay:200,dismissDelay:5000,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,quickShowInterval:250,initComponent:function(){var b=this;b.callParent(arguments);b.lastActive=new Date();b.setTarget(b.target);b.origAnchor=b.anchor},onRender:function(d,e){var f=this;f.callParent(arguments);f.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+f.getAnchorPosition();f.anchorEl=f.el.createChild({cls:Ext.baseCSSPrefix+"tip-anchor "+f.anchorCls})},setTarget:function(g){var e=this,f=Ext.get(g),h;if(e.target){h=Ext.get(e.target);e.mun(h,"mouseover",e.onTargetOver,e);e.mun(h,"mouseout",e.onTargetOut,e);e.mun(h,"mousemove",e.onMouseMove,e)}e.target=f;if(f){e.mon(f,{freezeEvent:true,mouseover:e.onTargetOver,mouseout:e.onTargetOut,mousemove:e.onMouseMove,scope:e})}if(e.anchor){e.anchorTarget=e.target}},onMouseMove:function(g){var e=this,f=e.delegate?g.getTarget(e.delegate):e.triggerElement=true,h;if(f){e.targetXY=g.getXY();if(f===e.triggerElement){if(!e.hidden&&e.trackMouse){h=e.getTargetXY();if(e.constrainPosition){h=e.el.adjustForConstraints(h,e.el.getScopeParent())}e.setPagePosition(h)}}else{e.hide();e.lastActive=new Date(0);e.onTargetOver(g)}}else{if((!e.closable&&e.isVisible())&&e.autoHide!==false){e.hide()}}},getTargetXY:function(){var r=this,w,x,n,z,s,p,v,o,q,y,t,u;if(r.delegate){r.anchorTarget=r.triggerElement}if(r.anchor){r.targetCounter++;x=r.getOffsets();n=(r.anchorToTarget&&!r.trackMouse)?r.el.getAlignToXY(r.anchorTarget,r.getAnchorAlign()):r.targetXY;z=Ext.Element.getViewWidth()-5;s=Ext.Element.getViewHeight()-5;p=document.documentElement;v=document.body;o=(p.scrollLeft||v.scrollLeft||0)+5;q=(p.scrollTop||v.scrollTop||0)+5;y=[n[0]+x[0],n[1]+x[1]];t=r.getSize();u=r.constrainPosition;r.anchorEl.removeCls(r.anchorCls);if(r.targetCounter<2&&u){if(y[0]<o){if(r.anchorToTarget){r.defaultAlign="l-r";if(r.mouseOffset){r.mouseOffset[0]*=-1}}r.anchor="left";return r.getTargetXY()}if(y[0]+t.width>z){if(r.anchorToTarget){r.defaultAlign="r-l";if(r.mouseOffset){r.mouseOffset[0]*=-1}}r.anchor="right";return r.getTargetXY()}if(y[1]<q){if(r.anchorToTarget){r.defaultAlign="t-b";if(r.mouseOffset){r.mouseOffset[1]*=-1}}r.anchor="top";return r.getTargetXY()}if(y[1]+t.height>s){if(r.anchorToTarget){r.defaultAlign="b-t";if(r.mouseOffset){r.mouseOffset[1]*=-1}}r.anchor="bottom";return r.getTargetXY()}}r.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+r.getAnchorPosition();r.anchorEl.addCls(r.anchorCls);r.targetCounter=0;return y}else{w=r.getMouseOffset();return(r.targetXY)?[r.targetXY[0]+w[0],r.targetXY[1]+w[1]]:w}},getMouseOffset:function(){var d=this,c=d.anchor?[0,0]:[15,18];if(d.mouseOffset){c[0]+=d.mouseOffset[0];c[1]+=d.mouseOffset[1]}return c},getAnchorPosition:function(){var c=this,d;if(c.anchor){c.tipAnchor=c.anchor.charAt(0)}else{d=c.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!d){Ext.Error.raise('The AnchorTip.defaultAlign value "'+c.defaultAlign+'" is invalid.')}c.tipAnchor=d[1].charAt(0)}switch(c.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var h=this,g,e,f=h.getAnchorPosition().charAt(0);if(h.anchorToTarget&&!h.trackMouse){switch(f){case"t":e=[0,9];break;case"b":e=[0,-13];break;case"r":e=[-13,0];break;default:e=[9,0];break}}else{switch(f){case"t":e=[-15-h.anchorOffset,30];break;case"b":e=[-19-h.anchorOffset,-13-h.el.dom.offsetHeight];break;case"r":e=[-15-h.el.dom.offsetWidth,-13-h.anchorOffset];break;default:e=[25,-13-h.anchorOffset];break}}g=h.getMouseOffset();e[0]+=g[0];e[1]+=g[1];return e},onTargetOver:function(f){var d=this,e;if(d.disabled||f.within(d.target.dom,true)){return}e=f.getTarget(d.delegate);if(e){d.triggerElement=e;d.clearTimer("hide");d.targetXY=f.getXY();d.delayShow()}},delayShow:function(){var b=this;if(b.hidden&&!b.showTimer){if(Ext.Date.getElapsed(b.lastActive)<b.quickShowInterval){b.show()}else{b.showTimer=Ext.defer(b.show,b.showDelay,b)}}else{if(!b.hidden&&b.autoHide!==false){b.show()}}},onTargetOut:function(c){var d=this;if(d.disabled||c.within(d.target.dom,true)){return}d.clearTimer("show");if(d.autoHide!==false){d.delayHide()}},delayHide:function(){var b=this;if(!b.hidden&&!b.hideTimer){b.hideTimer=Ext.defer(b.hide,b.hideDelay,b)}},hide:function(){var b=this;b.clearTimer("dismiss");b.lastActive=new Date();if(b.anchorEl){b.anchorEl.hide()}b.callParent(arguments);delete b.triggerElement},show:function(){var b=this;this.callParent();if(this.hidden===false){b.setPagePosition(-10000,-10000);if(b.anchor){b.anchor=b.origAnchor}if(!b.calledFromShowAt){b.showAt(b.getTargetXY())}if(b.anchor){b.syncAnchor();b.anchorEl.show()}else{b.anchorEl.hide()}}},showAt:function(c){var d=this;d.lastActive=new Date();d.clearTimers();d.calledFromShowAt=true;if(!d.isVisible()){this.callParent(arguments)}if(d.isVisible()){d.setPagePosition(c[0],c[1]);if(d.constrainPosition||d.constrain){d.doConstrain()}d.toFront(true);d.el.sync(true);if(d.dismissDelay&&d.autoHide!==false){d.dismissTimer=Ext.defer(d.hide,d.dismissDelay,d)}if(d.anchor){d.syncAnchor();if(!d.anchorEl.isVisible()){d.anchorEl.show()}}else{d.anchorEl.hide()}}delete d.calledFromShowAt},syncAnchor:function(){var h=this,f,e,g;switch(h.tipAnchor.charAt(0)){case"t":f="b";e="tl";g=[20+h.anchorOffset,1];break;case"r":f="l";e="tr";g=[-1,12+h.anchorOffset];break;case"b":f="t";e="bl";g=[20+h.anchorOffset,-1];break;default:f="r";e="tl";g=[1,12+h.anchorOffset];break}h.anchorEl.alignTo(h.el,f+"-"+e,g);h.anchorEl.setStyle("z-index",parseInt(h.el.getZIndex(),10)||0+1).setVisibilityMode(Ext.Element.DISPLAY)},setPagePosition:function(e,f){var d=this;d.callParent(arguments);if(d.anchor){d.syncAnchor()}},clearTimer:function(b){b=b+"Timer";clearTimeout(this[b]);delete this[b]},clearTimers:function(){var b=this;b.clearTimer("show");b.clearTimer("dismiss");b.clearTimer("hide")},onShow:function(){var b=this;b.callParent();b.mon(Ext.getDoc(),"mousedown",b.onDocMouseDown,b)},onHide:function(){var b=this;b.callParent();b.mun(Ext.getDoc(),"mousedown",b.onDocMouseDown,b)},onDocMouseDown:function(c){var d=this;if(!d.closable&&!c.within(d.el.dom)){d.disable();Ext.defer(d.doEnable,100,d)}},doEnable:function(){if(!this.isDestroyed){this.enable()}},onDisable:function(){this.callParent();this.clearTimers();this.hide()},beforeDestroy:function(){var b=this;b.clearTimers();Ext.destroy(b.anchorEl);delete b.anchorEl;delete b.target;delete b.anchorTarget;delete b.triggerElement;b.callParent()},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this);this.callParent()}});Ext.define("Ext.tip.QuickTip",{extend:"Ext.tip.ToolTip",alias:"widget.quicktip",alternateClassName:"Ext.QuickTip",interceptTitles:false,title:" ",tagConfig:{namespace:"data-",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign",anchor:"anchor"},initComponent:function(){var b=this;b.target=b.target||Ext.getDoc();b.targets=b.targets||{};b.callParent()},register:function(n){var j=Ext.isArray(n)?n:arguments,m=0,i=j.length,k,h,l;for(;m<i;m++){n=j[m];k=n.target;if(k){if(Ext.isArray(k)){for(h=0,l=k.length;h<l;h++){this.targets[Ext.id(k[h])]=n}}else{this.targets[Ext.id(k)]=n}}}},unregister:function(b){delete this.targets[Ext.id(b)]},cancelShow:function(e){var d=this,f=d.activeTarget;e=Ext.get(e).dom;if(d.isVisible()){if(f&&f.el==e){d.hide()}}else{if(f&&f.el==e){d.clearTimer("show")}}},getTipCfg:function(g){var h=g.getTarget(),e=h.title,f;if(this.interceptTitles&&e&&Ext.isString(e)){h.qtip=e;h.removeAttribute("title");g.preventDefault();return{text:e}}else{f=this.tagConfig;h=g.getTarget("["+f.namespace+f.attribute+"]");if(h){return{target:h,text:h.getAttribute(f.namespace+f.attribute)}}}},onTargetOver:function(v){var t=this,u=v.getTarget(t.delegate),B,y,A,w,s,z,q,x,e,r,p;if(t.disabled){return}t.targetXY=v.getXY();if(!u||u.nodeType!==1||u==document.documentElement||u==document.body){return}if(t.activeTarget&&((u==t.activeTarget.el)||Ext.fly(t.activeTarget.el).contains(u))){t.clearTimer("hide");t.show();return}if(u){x=t.targets;for(p in x){if(x.hasOwnProperty(p)){r=x[p];e=Ext.fly(r.target);if(e&&(e.dom===u||e.contains(u))){A=e.dom;break}}}if(A){t.activeTarget=t.targets[A.id];t.activeTarget.el=u;t.anchor=t.activeTarget.anchor;if(t.anchor){t.anchorTarget=u}B=Ext.isDefined(t.activeTarget.showDelay);if(B){y=t.showDelay;t.showDelay=t.activeTarget.showDelay}t.delayShow();if(B){t.showDelay=y}return}}A=Ext.fly(u,"_quicktip-target");w=t.tagConfig;s=w.namespace;z=t.getTipCfg(v);if(z){if(z.target){u=z.target;A=Ext.fly(u,"_quicktip-target")}q=A.getAttribute(s+w.hide);t.activeTarget={el:u,text:z.text,width:+A.getAttribute(s+w.width)||null,autoHide:q!="user"&&q!=="false",title:A.getAttribute(s+w.title),cls:A.getAttribute(s+w.cls),align:A.getAttribute(s+w.align)};t.anchor=A.getAttribute(s+w.anchor);if(t.anchor){t.anchorTarget=u}B=Ext.isDefined(t.activeTarget.showDelay);if(B){y=t.showDelay;t.showDelay=t.activeTarget.showDelay}t.delayShow();if(B){t.showDelay=y}}},onTargetOut:function(h){var j=this,i=j.activeTarget,g,e;if(i&&h.within(j.activeTarget.el)&&!j.getTipCfg(h)){return}j.clearTimer("show");delete j.activeTarget;if(j.autoHide!==false){g=i&&Ext.isDefined(i.hideDelay);if(g){e=j.hideDelay;j.hideDelay=i.hideDelay}j.delayHide();if(g){j.hideDelay=e}}},showAt:function(g){var e=this,h=e.activeTarget,f;if(h){if(!e.rendered){e.render(Ext.getBody());e.activeTarget=h}e.suspendLayouts();if(h.title){e.setTitle(h.title);e.header.show()}else{e.header.hide()}e.update(h.text);e.autoHide=h.autoHide;e.dismissDelay=h.dismissDelay||e.dismissDelay;f=e.lastCls;if(f){e.removeCls(f);delete e.lastCls}f=h.cls;if(f){e.addCls(f);e.lastCls=f}e.setWidth(h.width);if(e.anchor){e.constrainPosition=false}else{if(h.align){g=e.el.getAlignToXY(h.el,h.align);e.constrainPosition=false}else{e.constrainPosition=true}}e.resumeLayouts(true)}e.callParent([g])},hide:function(){delete this.activeTarget;this.callParent()}});Ext.define("Ext.tip.QuickTipManager",(function(){var c,d=false;return{requires:["Ext.tip.QuickTip"],singleton:true,alternateClassName:"Ext.QuickTips",init:function(b,i){if(!c){if(!Ext.isReady){Ext.onReady(function(){Ext.tip.QuickTipManager.init(b,i)});return}var j=Ext.apply({disabled:d,id:"ext-quicktips-tip"},i),h=j.className,a=j.xtype;if(h){delete j.className}else{if(a){h="widget."+a;delete j.xtype}}if(b!==false){j.renderTo=document.body;if(j.renderTo.tagName!="BODY"){Ext.Error.raise({sourceClass:"Ext.tip.QuickTipManager",sourceMethod:"init",msg:"Cannot init QuickTipManager: no document body"})}}c=Ext.create(h||"Ext.tip.QuickTip",j)}},destroy:function(){if(c){var a;c.destroy();c=a}},ddDisable:function(){if(c&&!d){c.disable()}},ddEnable:function(){if(c&&!d){c.enable()}},enable:function(){if(c){c.enable()}d=false},disable:function(){if(c){c.disable()}d=true},isEnabled:function(){return c!==undefined&&!c.disabled},getQuickTip:function(){return c},register:function(){c.register.apply(c,arguments)},unregister:function(){c.unregister.apply(c,arguments)},tips:function(){c.register.apply(c,arguments)}}}()));Ext.define("Ext.app.Application",{extend:"Ext.app.Controller",requires:["Ext.ModelManager","Ext.data.Model","Ext.data.StoreManager","Ext.tip.QuickTipManager","Ext.ComponentManager","Ext.app.EventBus"],scope:undefined,enableQuickTips:true,appFolder:"app",autoCreateViewport:false,constructor:function(q){q=q||{};Ext.apply(this,q);var i=q.requires||[],r,n,p,o,l,k,m;Ext.Loader.setPath(this.name,this.appFolder);if(this.paths){l=this.paths;for(m in l){if(l.hasOwnProperty(m)){k=l[m];Ext.Loader.setPath(m,k)}}}this.callParent(arguments);this.eventbus=new Ext.app.EventBus;r=Ext.Array.from(this.controllers);n=r&&r.length;this.controllers=new Ext.util.MixedCollection();if(this.autoCreateViewport){i.push(this.getModuleClassName("Viewport","view"))}for(p=0;p<n;p++){i.push(this.getModuleClassName(r[p],"controller"))}Ext.require(i);Ext.onReady(function(){for(p=0;p<n;p++){o=this.getController(r[p]);o.init(this)}this.onBeforeLaunch.call(this)},this)},control:function(d,f,e){this.eventbus.control(d,f,e)},launch:Ext.emptyFn,onBeforeLaunch:function(){var c=this,i,h,j,g;if(c.enableQuickTips){Ext.tip.QuickTipManager.init()}if(c.autoCreateViewport){c.getView("Viewport").create()}c.launch.call(this.scope||this);c.launched=true;c.fireEvent("launch",this);i=c.controllers.items;j=i.length;for(h=0;h<j;h++){g=i[h];g.onLaunch(this)}},getModuleClassName:function(d,f){var e=this.name;if(Ext.isString(d)&&(Ext.Loader.getPrefix(d)===""||d===e)){d=e+"."+f+"."+d}return d},getController:function(c){var d=this.controllers.get(c);if(!d){d=Ext.create(this.getModuleClassName(c,"controller"),{application:this,id:c});this.controllers.add(d)}return d},getStore:function(c){var d=Ext.StoreManager.get(c);if(!d){d=Ext.create(this.getModuleClassName(c,"store"),{storeId:c})}return d},getModel:function(b){b=this.getModuleClassName(b,"model");return Ext.ModelManager.getModel(b)},getView:function(b){b=this.getModuleClassName(b,"view");return Ext.ClassManager.get(b)}});Ext.define("Ext.dd.DDTarget",{extend:"Ext.dd.DragDrop",constructor:function(f,e,d){if(f){this.initTarget(f,e,d)}},getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return("DDTarget "+this.id)}});Ext.define("Ext.dd.ScrollManager",{singleton:true,requires:["Ext.dd.DragDropManager"],constructor:function(){var b=Ext.dd.DragDropManager;b.fireEvents=Ext.Function.createSequence(b.fireEvents,this.onFire,this);b.stopDrag=Ext.Function.createSequence(b.stopDrag,this.onStop,this);this.doScroll=Ext.Function.bind(this.doScroll,this);this.ddmInstance=b;this.els={};this.dragEl=null;this.proc={}},onStop:function(d){var c=Ext.dd.ScrollManager;c.dragEl=null;c.clearProc()},triggerRefresh:function(){if(this.ddmInstance.dragCurrent){this.ddmInstance.refreshCache(this.ddmInstance.dragCurrent.groups)}},doScroll:function(){if(this.ddmInstance.dragCurrent){var f=this.proc,e=f.el,h=f.el.ddScrollConfig,g=h?h.increment:this.increment;if(!this.animate){if(e.scroll(f.dir,g)){this.triggerRefresh()}}else{e.scroll(f.dir,g,true,this.animDuration,this.triggerRefresh)}}},clearProc:function(){var b=this.proc;if(b.id){clearInterval(b.id)}b.id=0;b.el=null;b.dir=""},startProc:function(e,f){this.clearProc();this.proc.el=e;this.proc.dir=f;var g=e.ddScrollConfig?e.ddScrollConfig.ddGroup:undefined,h=(e.ddScrollConfig&&e.ddScrollConfig.frequency)?e.ddScrollConfig.frequency:this.frequency;if(g===undefined||this.ddmInstance.dragCurrent.ddGroup==g){this.proc.id=setInterval(this.doScroll,h)}},onFire:function(p,m){if(m||!this.ddmInstance.dragCurrent){return}if(!this.dragEl||this.dragEl!=this.ddmInstance.dragCurrent){this.dragEl=this.ddmInstance.dragCurrent;this.refreshCache()}var e=p.getXY(),c=p.getPoint(),o=this.proc,q=this.els,s,r,t,n;for(s in q){r=q[s];t=r._region;n=r.ddScrollConfig?r.ddScrollConfig:this;if(t&&t.contains(c)&&r.isScrollable()){if(t.bottom-c.y<=n.vthresh){if(o.el!=r){this.startProc(r,"down")}return}else{if(t.right-c.x<=n.hthresh){if(o.el!=r){this.startProc(r,"left")}return}else{if(c.y-t.top<=n.vthresh){if(o.el!=r){this.startProc(r,"up")}return}else{if(c.x-t.left<=n.hthresh){if(o.el!=r){this.startProc(r,"right")}return}}}}}}this.clearProc()},register:function(f){if(Ext.isArray(f)){for(var d=0,e=f.length;d<e;d++){this.register(f[d])}}else{f=Ext.get(f);this.els[f.id]=f}},unregister:function(f){if(Ext.isArray(f)){for(var d=0,e=f.length;d<e;d++){this.unregister(f[d])}}else{f=Ext.get(f);delete this.els[f.id]}},vthresh:25,hthresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,ddGroup:undefined,refreshCache:function(){var d=this.els,c;for(c in d){if(typeof d[c]=="object"){d[c]._region=d[c].getRegion()}}}});Ext.define("Ext.dd.DropTarget",{extend:"Ext.dd.DDTarget",requires:["Ext.dd.ScrollManager"],constructor:function(c,d){this.el=Ext.get(c);Ext.apply(this,d);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}this.callParent([this.el.dom,this.ddGroup||this.group,{isTarget:true}])},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",isTarget:true,isNotifyTarget:true,notifyEnter:function(e,f,d){if(this.overClass){this.el.addCls(this.overClass)}return this.dropAllowed},notifyOver:function(e,f,d){return this.dropAllowed},notifyOut:function(e,f,d){if(this.overClass){this.el.removeCls(this.overClass)}},notifyDrop:function(e,f,d){return false},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define("Ext.dd.DropZone",{extend:"Ext.dd.DropTarget",requires:["Ext.dd.Registry"],getTargetFromEvent:function(b){return Ext.dd.Registry.getTargetFromEvent(b)},onNodeEnter:function(g,f,h,e){},onNodeOver:function(g,f,h,e){return this.dropAllowed},onNodeOut:function(g,f,h,e){},onNodeDrop:function(g,f,h,e){return false},onContainerOver:function(e,f,d){return this.dropNotAllowed},onContainerDrop:function(e,f,d){return false},notifyEnter:function(e,f,d){return this.dropNotAllowed},notifyOver:function(f,h,e){var g=this.getTargetFromEvent(h);if(!g){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,f,h,e);this.lastOverNode=null}return this.onContainerOver(f,h,e)}if(this.lastOverNode!=g){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,f,h,e)}this.onNodeEnter(g,f,h,e);this.lastOverNode=g}return this.onNodeOver(g,f,h,e)},notifyOut:function(e,f,d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,e,f,d);this.lastOverNode=null}},notifyDrop:function(f,h,e){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,f,h,e);this.lastOverNode=null}var g=this.getTargetFromEvent(h);return g?this.onNodeDrop(g,f,h,e):this.onContainerDrop(f,h,e)},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)}});Ext.define("Ext.grid.header.DropZone",{extend:"Ext.dd.DropZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",proxyOffsets:[-4,-9],constructor:function(b){this.headerCt=b;this.ddGroup=this.getDDGroup();this.callParent([b.el])},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getTargetFromEvent:function(b){return b.getTarget("."+this.colHeaderCls)},getTopIndicator:function(){if(!this.topIndicator){this.topIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-top",html:" "},true)}return this.topIndicator},getBottomIndicator:function(){if(!this.bottomIndicator){this.bottomIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-bottom",html:" "},true)}return this.bottomIndicator},getLocation:function(k,e){var h=k.getXY()[0],l=Ext.fly(e).getRegion(),i,j;if((l.right-h)<=(l.right-l.left)/2){i="after"}else{i="before"}return{pos:i,header:Ext.getCmp(e.id),node:e}},positionIndicator:function(i,F,z){var R=this.getLocation(z,F),D=R.header,M=R.pos,N=i.nextSibling("gridcolumn:not([hidden])"),A=i.previousSibling("gridcolumn:not([hidden])"),O,I,C,B,Q,P,J,H,e,y,G,K,E,L;if(!D.draggable&&D.getIndex()===0){return false}this.lastLocation=R;if((i!==D)&&((M==="before"&&N!==D)||(M==="after"&&A!==D))&&!D.isDescendantOf(i)){G=Ext.dd.DragDropManager.getRelated(this);K=G.length;E=0;for(;E<K;E++){L=G[E];if(L!==this&&L.invalidateDrop){L.invalidateDrop()}}this.valid=true;I=this.getTopIndicator();C=this.getBottomIndicator();if(M==="before"){B="tl";Q="bl"}else{B="tr";Q="br"}P=D.el.getAnchorXY(B);J=D.el.getAnchorXY(Q);H=this.headerCt.el;e=H.getLeft();y=H.getRight();P[0]=Ext.Number.constrain(P[0],e,y);J[0]=Ext.Number.constrain(J[0],e,y);P[0]-=4;P[1]-=9;J[0]-=4;I.setXY(P);C.setXY(J);I.show();C.show()}else{this.invalidateDrop()}},invalidateDrop:function(){this.valid=false;this.hideIndicators()},onNodeOver:function(q,m,n,p){var l=this,o=l.headerCt,r=true,e=p.header,k;if(p.header.el.dom===q){r=false}else{k=l.getLocation(n,q).header;r=(e.ownerCt===k.ownerCt)||(!e.ownerCt.sealed&&!k.ownerCt.sealed)}if(r){l.positionIndicator(p.header,q,n)}else{l.valid=false}return l.valid?l.dropAllowed:l.dropNotAllowed},hideIndicators:function(){this.getTopIndicator().hide();this.getBottomIndicator().hide()},onNodeOut:function(){this.hideIndicators()},onNodeDrop:function(D,v,x,B){if(this.valid){this.invalidateDrop();var y=B.header,A=this.lastLocation,G=A.header,t=y.ownerCt,w=t.items.indexOf(y),z=G.ownerCt,e=z.items.indexOf(G),E=this.headerCt,H=E.getHeaderIndex(y),C=y.isGroupHeader?y.query(":not([isGroupHeader])").length:1,s=E.getHeaderIndex(G),u,F;if(A.pos==="after"){e++;s+=G.isGroupHeader?G.query(":not([isGroupHeader])").length:1}if(t!==z&&t.lockableInjected&&z.lockableInjected&&z.lockedCt){F=t.up("[scrollerOwner]");F.lock(y,e)}else{if(t!==z&&t.lockableInjected&&z.lockableInjected&&t.lockedCt){F=t.up("[scrollerOwner]");F.unlock(y,e)}else{if((t===z)&&(e>w)){e-=1}Ext.suspendLayouts();if(t!==z){t.remove(y,false);if(t.isGroupHeader){if(!t.items.getCount()){u=t.ownerCt;u.remove(t,false);t.el.dom.parentNode.removeChild(t.el.dom)}}}if(t===z){z.move(w,e)}else{z.insert(e,y)}if(z.isGroupHeader){if(z!==t){y.savedFlex=y.flex;delete y.flex;y.width=y.getWidth()}}else{if(y.savedFlex){y.flex=y.savedFlex;delete y.width}}E.purgeCache();Ext.resumeLayouts(true);E.onHeaderMoved(y,C,H,s);if(!t.items.getCount()){t.destroy()}}}}}});Ext.define("Ext.grid.plugin.HeaderReorderer",{extend:"Ext.util.Observable",requires:["Ext.grid.header.DragZone","Ext.grid.header.DropZone"],alias:"plugin.gridheaderreorderer",init:function(b){this.headerCt=b;b.on({render:this.onHeaderCtRender,single:true,scope:this})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},onHeaderCtRender:function(){var b=this;b.dragZone=new Ext.grid.header.DragZone(b.headerCt);b.dropZone=new Ext.grid.header.DropZone(b.headerCt);if(b.disabled){b.dragZone.disable()}},enable:function(){this.disabled=false;if(this.dragZone){this.dragZone.enable()}},disable:function(){this.disabled=true;if(this.dragZone){this.dragZone.disable()}}});Ext.define("Ext.grid.header.Container",{extend:"Ext.container.Container",requires:["Ext.grid.ColumnLayout","Ext.grid.plugin.HeaderResizer","Ext.grid.plugin.HeaderReorderer"],uses:["Ext.grid.column.Column","Ext.menu.Menu","Ext.menu.CheckItem","Ext.menu.Separator"],border:true,alias:"widget.headercontainer",baseCls:Ext.baseCSSPrefix+"grid-header-ct",dock:"top",weight:100,defaultType:"gridcolumn",detachOnRemove:false,defaultWidth:100,sortAscText:"Sort Ascending",sortDescText:"Sort Descending",sortClearText:"Clear Sort",columnsText:"Columns",headerOpenCls:Ext.baseCSSPrefix+"column-header-open",triStateSort:false,ddLock:false,dragging:false,sortable:true,initComponent:function(){var b=this;b.plugins=b.plugins||[];if(!b.isHeader){if(b.enableColumnResize){b.resizer=new Ext.grid.plugin.HeaderResizer();b.plugins.push(b.resizer)}if(b.enableColumnMove){b.reorderer=new Ext.grid.plugin.HeaderReorderer();b.plugins.push(b.reorderer)}}if(b.isHeader&&!b.items){b.layout=b.layout||"auto"}else{b.layout=Ext.apply({type:"gridcolumn",align:"stretchmax"},b.initialConfig.layout)}b.defaults=b.defaults||{};Ext.applyIf(b.defaults,{triStateSort:b.triStateSort,sortable:b.sortable});b.menuTask=new Ext.util.DelayedTask(b.updateMenuDisabledState,b);b.callParent();b.addEvents("columnresize","headerclick","headertriggerclick","columnmove","columnhide","columnshow","sortchange","menucreate")},onDestroy:function(){var b=this;b.menuTask.cancel();Ext.destroy(b.resizer,b.reorderer);b.callParent()},applyColumnsState:function(o){if(!o||!o.length){return}var m=this,p=0,n=o.length,k,c,i,l;for(k=0;k<n;k++){l=o[k];i=m.down("gridcolumn[headerId="+l.id+"]");if(i){c=m.items.indexOf(i);if(p!==c){m.moveHeader(c,p)}if(i.applyColumnState){i.applyColumnState(l)}++p}}},getColumnsState:function(){var d=this,e=[],f;d.items.each(function(a){f=a.getColumnState&&a.getColumnState();if(f){e.push(f)}});return e},onAdd:function(c){var d=this;if(!c.headerId){c.headerId=c.initialConfig.id||Ext.id(null,"header-")}if(Ext.global.console&&Ext.global.console.warn){if(!d._usedIDs){d._usedIDs={}}if(d._usedIDs[c.headerId]){Ext.global.console.warn(this.$className,"attempted to reuse an existing id",c.headerId)}d._usedIDs[c.headerId]=true}d.callParent(arguments);d.purgeCache()},onRemove:function(c){var d=this;d.callParent(arguments);d.purgeCache()},applyDefaults:function(c){var d;if(c&&!c.isComponent&&c.xtype=="rownumberer"){d=c}else{d=this.callParent(arguments);if(!("width" in d)&&!d.flex){d.width=this.defaultWidth}}return d},afterRender:function(){this.callParent();this.setSortState()},setSortState:function(){var f=this.up("[store]").store,h=f.sorters,g=h.first(),e;if(g){e=this.down("gridcolumn[dataIndex="+g.property+"]");if(e){e.setSortState(g.direction,false,true)}}},getHeaderMenu:function(){var c=this.getMenu(),d;if(c){d=c.child("#columnItem");if(d){return d.menu}}return null},onHeaderVisibilityChange:function(h,i){var f=this,j=f.getHeaderMenu(),g;if(j){g=f.getMenuItemForHeader(j,h);if(g){g.setChecked(i,true)}f.menuTask.delay(50)}},getLeafMenuItems:function(){var l=this,o=l.getGridColumns(),i=[],p=0,m=0,j=o.length,k=l.getMenu(),n;for(;p<j;++p){n=o[p];if(n.hideable){n=l.getMenuItemForHeader(k,n);if(n){i.push(n);if(n.checked){++m}}}}return{items:i,checkedCount:m}},updateMenuDisabledState:function(){var j=this,h=j.getLeafMenuItems(),k=h.checkedCount,m=h.items,i=m.length,l=0,n=j.getMenu().child("#columnItem");if(k<=1){j.disableMenuItems(n,Ext.ComponentQuery.query("[checked=true]",m)[0])}else{for(;l<i;++l){j.setMenuItemState(k,n,m[l])}}},disableMenuItems:function(d,c){while(c&&c!=d){c.disableCheckChange();c=c.parentMenu.ownerItem}},setMenuItemState:function(h,g,i){var j,f;while(i&&i!=g){j=i.parentMenu;f=i.parentMenu.query("[checked=true]:not([menu])").length;i.enableCheckChange();i=j.ownerItem;if(f===h){break}}this.disableMenuItems(g,i)},getMenuItemForHeader:function(d,c){return c?d.down("menucheckitem[headerId="+c.id+"]"):null},onHeaderShow:function(f){var d=this,e=d.ownerCt;d.onHeaderVisibilityChange(f,true);if(!f.isGroupHeader){if(d.view){d.view.onHeaderShow(d,f,true)}if(e){e.onHeaderShow(d,f)}}d.fireEvent("columnshow",d,f);d.updateLayout()},onHeaderHide:function(f){var d=this,e=d.ownerCt;d.onHeaderVisibilityChange(f,false);if(!f.isGroupHeader){if(d.view){d.view.ignoreTemplate=true;d.view.onHeaderHide(d,f,true);d.view.ignoreTemplate=false}if(e){e.onHeaderHide(d,f)}d.updateLayout()}d.fireEvent("columnhide",d,f)},tempLock:function(){this.ddLock=true;Ext.Function.defer(function(){this.ddLock=false},200,this)},onHeaderResize:function(j,h,k){var l=this,i=l.view,n=l.ownerCt,m;if(i&&(m=i.el)&&m.dom.firstChild){l.tempLock();i.onHeaderResize(j,h,k);if(n){n.onHeaderResize(l,j,h)}}l.fireEvent("columnresize",this,j,h)},onHeaderClick:function(f,d,e){f.fireEvent("headerclick",this,f,d,e);this.fireEvent("headerclick",this,f,d,e)},onHeaderTriggerClick:function(g,h,f){var e=this;if(g.fireEvent("headertriggerclick",e,g,h,f)!==false&&e.fireEvent("headertriggerclick",e,g,h,f)!==false){e.showMenuBy(f,g)}},showMenuBy:function(g,i){var k=this.getMenu(),j=k.down("#ascItem"),l=k.down("#descItem"),h;k.activeHeader=k.ownerCt=i;k.setFloatParent(i);i.titleEl.addCls(this.headerOpenCls);h=i.sortable?"enable":"disable";if(j){j[h]()}if(l){l[h]()}k.showBy(g)},onMenuDeactivate:function(){var b=this.getMenu();b.activeHeader.titleEl.removeCls(this.headerOpenCls)},moveHeader:function(d,c){this.tempLock();this.onHeaderMoved(this.move(d,c),d,c)},purgeCache:function(){var b=this;delete b.gridDataColumns;delete b.hideableColumns;if(b.menu){b.menu.hide();b.menu.destroy();delete b.menu}},onHeaderMoved:function(i,h,l,j){var k=this,g=k.ownerCt;if(g&&g.onHeaderMove){g.onHeaderMove(k,i,h,l,j)}k.fireEvent("columnmove",k,i,l,j)},getMenu:function(){var b=this;if(!b.menu){b.menu=new Ext.menu.Menu({hideOnParentHide:false,items:b.getMenuItems(),listeners:{deactivate:b.onMenuDeactivate,scope:b}});b.updateMenuDisabledState();b.fireEvent("menucreate",b,b.menu)}return b.menu},getMenuItems:function(){var f=this,d=[],e=f.enableColumnHide?f.getColumnMenu(f):null;if(f.sortable){d=[{itemId:"ascItem",text:f.sortAscText,cls:Ext.baseCSSPrefix+"hmenu-sort-asc",handler:f.onSortAscClick,scope:f},{itemId:"descItem",text:f.sortDescText,cls:Ext.baseCSSPrefix+"hmenu-sort-desc",handler:f.onSortDescClick,scope:f}]}if(e&&e.length){d.push("-",{itemId:"columnItem",text:f.columnsText,cls:Ext.baseCSSPrefix+"cols-icon",menu:e})}return d},onSortAscClick:function(){var c=this.getMenu(),d=c.activeHeader;d.setSortState("ASC")},onSortDescClick:function(){var c=this.getMenu(),d=c.activeHeader;d.setSortState("DESC")},getColumnMenu:function(k){var n=[],h=0,l,i=k.query(">gridcolumn[hideable]"),j=i.length,m;for(;h<j;h++){l=i[h];m=new Ext.menu.CheckItem({text:l.menuText||l.text,checked:!l.hidden,hideOnClick:false,headerId:l.id,menu:l.isGroupHeader?this.getColumnMenu(l):undefined,checkHandler:this.onColumnCheckChange,scope:this});n.push(m);l.on({destroy:Ext.Function.bind(m.destroy,m)})}return n},onColumnCheckChange:function(e,d){var f=Ext.getCmp(e.headerId);f[d?"show":"hide"]()},getColumnsForTpl:function(l){var n=[],m=this.getGridColumns(l),j=m.length,i=0,k,h;for(;i<j;i++){k=m[i];if(k.hidden||k.up("headercontainer[hidden=true]")){h=0}else{h=k.getDesiredWidth()}n.push({dataIndex:k.dataIndex,align:k.align,width:h,id:k.id,cls:k.tdCls,columnId:k.getItemId()})}return n},getColumnCount:function(){return this.getGridColumns().length},getFullWidth:function(k){var l=0,g=this.getVisibleGridColumns(k),i=g.length,h=0,j;for(;h<i;h++){j=g[h];if(j.getDesiredWidth){l+=j.getDesiredWidth()||0}else{l+=j.getWidth()}}return l},clearOtherSortStates:function(f){var h=this.getGridColumns(),g=h.length,e=0;for(;e<g;e++){if(h[e]!==f){h[e].setSortState(null,true)}}},getVisibleGridColumns:function(b){return Ext.ComponentQuery.query(":not([hidden])",this.getGridColumns(b))},getGridColumns:function(d){var f=this,e=d?null:f.gridDataColumns;if(!e){f.gridDataColumns=e=[];f.cascade(function(a){if((a!==f)&&!a.isGroupHeader){e.push(a)}})}return e},getHideableColumns:function(d){var f=this,e=d?null:f.hideableColumns;if(!e){e=f.hideableColumns=f.query("[hideable]")}return e},getHeaderIndex:function(b){if(b.isGroupHeader){b=b.down(":not([isgroupHeader])")}return Ext.Array.indexOf(this.getGridColumns(),b)},getHeaderAtIndex:function(d){var c=this.getGridColumns();return c.length?c[d]:null},getVisibleHeaderClosestToIndex:function(c){var d=this.getHeaderAtIndex(c);if(d.hidden){d=d.next(":not([hidden])")||d.next(":not([hidden])")}return d},prepareData:function(y,D,w,t,F){var u=this,z={},C=u.gridDataColumns||u.getGridColumns(),B=C.length,A=0,x,q,v,r,E,s=F.store;for(;A<B;A++){E={tdCls:"",style:""};x=C[A];q=x.id;v=x.renderer;r=y[x.dataIndex];if(typeof v=="function"){r=v.call(x.scope||u.ownerCt,r,E,w,D,A,s,t)}if(E.css){z.cssWarning=true;E.tdCls=E.css;delete E.css}if(u.markDirty){z[q+"-modified"]=w.isModified(x.dataIndex)?Ext.baseCSSPrefix+"grid-dirty-cell":""}z[q+"-tdCls"]=E.tdCls;z[q+"-tdAttr"]=E.tdAttr;z[q+"-style"]=E.style;if(typeof r==="undefined"||r===null||r===""){r=x.emptyCellText}z[q]=r}return z},expandToFit:function(c){var d=this.view;if(d){d.expandToFit(c)}}});Ext.define("Ext.grid.column.Column",{extend:"Ext.grid.header.Container",alias:"widget.gridcolumn",requires:["Ext.util.KeyNav","Ext.grid.ColumnComponentLayout","Ext.grid.ColumnLayout"],alternateClassName:"Ext.grid.Column",baseCls:Ext.baseCSSPrefix+"column-header "+Ext.baseCSSPrefix+"unselectable",hoverCls:Ext.baseCSSPrefix+"column-header-over",handleWidth:5,sortState:null,possibleSortStates:["ASC","DESC"],childEls:["titleEl","triggerEl","textEl"],renderTpl:'<div id="{id}-titleEl" class="'+Ext.baseCSSPrefix+'column-header-inner"><span id="{id}-textEl" class="'+Ext.baseCSSPrefix+'column-header-text">{text}</span><tpl if="!menuDisabled"><div id="{id}-triggerEl" class="'+Ext.baseCSSPrefix+'column-header-trigger"></div></tpl></div>{%this.renderContainer(out,values)%}',dataIndex:null,text:" ",menuText:null,emptyCellText:" ",sortable:true,resizable:true,hideable:true,menuDisabled:false,renderer:false,editRenderer:false,align:"left",draggable:true,initDraggable:Ext.emptyFn,isHeader:true,componentLayout:"columncomponent",initResizable:Ext.emptyFn,initComponent:function(){var d=this,c;if(Ext.isDefined(d.header)){d.text=d.header;delete d.header}if(!d.triStateSort){d.possibleSortStates.length=2}if(Ext.isDefined(d.columns)){d.isGroupHeader=true;if(d.dataIndex){Ext.Error.raise("Ext.grid.column.Column: Group header may not accept a dataIndex")}if((d.width&&d.width!==Ext.grid.header.Container.prototype.defaultWidth)||d.flex){Ext.Error.raise("Ext.grid.column.Column: Group header does not support setting explicit widths or flexs. The group header width is calculated by the sum of its children.")}d.items=d.columns;delete d.columns;delete d.flex;delete d.width;d.cls=(d.cls||"")+" "+Ext.baseCSSPrefix+"group-header";d.sortable=false;d.resizable=false;d.align="center"}else{d.isContainer=false;if(d.flex){d.minWidth=d.minWidth||Ext.grid.plugin.HeaderResizer.prototype.minColWidth}}d.addCls(Ext.baseCSSPrefix+"column-header-align-"+d.align);c=d.renderer;if(c){if(typeof c=="string"){d.renderer=Ext.util.Format[c]}d.hasCustomRenderer=true}else{if(d.defaultRenderer){d.scope=d;d.renderer=d.defaultRenderer}}d.callParent(arguments);d.on({element:"el",click:d.onElClick,dblclick:d.onElDblClick,scope:d});d.on({element:"titleEl",mouseenter:d.onTitleMouseOver,mouseleave:d.onTitleMouseOut,scope:d})},onAdd:function(b){b.isSubHeader=true;b.addCls(Ext.baseCSSPrefix+"group-sub-header");this.callParent(arguments)},onRemove:function(b){b.isSubHeader=false;b.removeCls(Ext.baseCSSPrefix+"group-sub-header");this.callParent(arguments)},initRenderData:function(){var b=this;return Ext.applyIf(b.callParent(arguments),{text:b.text,menuDisabled:b.menuDisabled})},applyColumnState:function(d){var e=this,f=Ext.isDefined;e.applyColumnsState(d.columns);if(f(d.hidden)){e.hidden=d.hidden}if(f(d.locked)){e.locked=d.locked}if(f(d.sortable)){e.sortable=d.sortable}if(f(d.width)){delete e.flex;e.width=d.width}else{if(f(d.flex)){delete e.width;e.flex=d.flex}}},getColumnState:function(){var j=this,g=j.items.items,h=g?g.length:0,k,l=[],i={id:j.stateId||j.headerId};j.savePropsToState(["hidden","sortable","locked","flex","width"],i);if(j.isGroupHeader){for(k=0;k<h;k++){l.push(g[k].getColumnState())}if(l.length){i.columns=l}}else{if(j.isSubHeader&&j.ownerCt.hidden){delete j.hidden}}if("width" in i){delete i.flex}return i},setText:function(b){this.text=b;if(this.rendered){this.textEl.update(b)}},getOwnerHeaderCt:function(){return this.up(":not([isHeader])")},getIndex:function(){return this.isGroupColumn?false:this.getOwnerHeaderCt().getHeaderIndex(this)},getVisibleIndex:function(){return this.isGroupColumn?false:Ext.Array.indexOf(this.getOwnerHeaderCt().getVisibleGridColumns(),this)},beforeRender:function(){var c=this,d=c.up("tablepanel");c.callParent();if(d&&(!c.sortable||d.sortableColumns===false)&&!c.groupable&&!c.lockable&&(d.enableColumnHide===false||!c.getOwnerHeaderCt().getHideableColumns().length)){c.menuDisabled=true}},afterRender:function(){var c=this,d=c.el;c.callParent(arguments);if(c.overCls){d.addClsOnOver(c.overCls)}if(!Ext.isIE8||!Ext.isStrict){c.mon(c.getFocusEl(),{focus:c.onTitleMouseOver,blur:c.onTitleMouseOut,scope:c})}c.keyNav=new Ext.util.KeyNav(d,{enter:c.onEnterKey,down:c.onDownKey,scope:c})},afterComponentLayout:function(k,h,l,i){var j=this,g=j.getOwnerHeaderCt();j.callParent(arguments);if(g&&(l!=null||j.flex)&&k!==l){g.onHeaderResize(j,k,true)}delete j.oldWidth},setPadding:function(i){var l=this,m=parseInt(l.textEl.getStyle("line-height"),10),j=l.textEl.dom.offsetHeight,h=l.titleEl,k=i-l.el.getBorderWidth("tb"),n;if(!l.isGroupHeader){if(h.getHeight()<k){h.setHeight(k);l.ownerCt.layout.innerCt.setHeight(i)}}n=h.getViewSize().height;if(j){if(m){j=Math.ceil(j/m)*m}h.setStyle({paddingTop:Math.floor(Math.max(((n-j)/2),0))+"px"})}if(Ext.isIE&&l.triggerEl){l.triggerEl.setHeight(n)}},onDestroy:function(){var b=this;Ext.destroy(b.textEl,b.keyNav);delete b.keyNav;b.callParent(arguments)},onTitleMouseOver:function(){this.titleEl.addCls(this.hoverCls)},onTitleMouseOut:function(){this.titleEl.removeCls(this.hoverCls)},onDownKey:function(b){if(this.triggerEl){this.onElClick(b,this.triggerEl.dom||this.el.dom)}},onEnterKey:function(b){this.onElClick(b,this.el.dom)},onElDblClick:function(g,f){var h=this,e=h.ownerCt;if(e&&Ext.Array.indexOf(e.items,h)!==0&&h.isOnLeftEdge(g)){e.expandToFit(h.previousSibling("gridcolumn"))}},onElClick:function(g,e){var h=this,f=h.getOwnerHeaderCt();if(f&&!f.ddLock){if(h.triggerEl&&(g.target===h.triggerEl.dom||e===h.triggerEl.dom||g.within(h.triggerEl))){f.onHeaderTriggerClick(h,g,e)}else{if(g.getKey()||(!h.isOnLeftEdge(g)&&!h.isOnRightEdge(g))){h.toggleSortState();f.onHeaderClick(h,g,e)}}}},processEvent:function(j,e,h,l,k,i){return this.fireEvent.apply(this,arguments)},toggleSortState:function(){var d=this,e,f;if(d.sortable){e=Ext.Array.indexOf(d.possibleSortStates,d.sortState);f=(e+1)%d.possibleSortStates.length;d.setSortState(d.possibleSortStates[f])}},doSort:function(c){var d=this.up("tablepanel").store;d.sort({property:this.getSortParam(),direction:c})},getSortParam:function(){return this.dataIndex},setSortState:function(t,k,o){var n=this,m=Ext.baseCSSPrefix+"column-header-sort-",l=m+"ASC",r=m+"DESC",s=m+"null",p=n.getOwnerHeaderCt(),q=n.sortState;if(q!==t&&n.getSortParam()){n.addCls(m+t);if(t&&!o){n.doSort(t)}switch(t){case"DESC":n.removeCls([l,s]);break;case"ASC":n.removeCls([r,s]);break;case null:n.removeCls([l,r]);break}if(p&&!n.triStateSort&&!k){p.clearOtherSortStates(n)}n.sortState=t;if(n.triStateSort||t!=null){p.fireEvent("sortchange",p,n,t)}}},hide:function(p){var k=this,n=k.getOwnerHeaderCt(),q=k.ownerCt,r=q.isGroupHeader,i,l,m,o;if(r&&!p){l=q.query(">:not([hidden])");if(l.length===1&&l[0]==k){k.ownerCt.hide();return}}Ext.suspendLayouts();if(k.isGroupHeader){l=k.items.items;for(o=0,m=l.length;o<m;o++){i=l[o];if(!i.hidden){i.hide(true)}}}k.callParent();n.onHeaderHide(k);Ext.resumeLayouts(true)},show:function(o,i){var k=this,m=k.ownerCt,p,j,n,l;Ext.suspendLayouts();if(k.isSubHeader&&m.hidden){m.show(false,true)}k.callParent(arguments);if(k.isGroupHeader&&i!==true&&!k.query(":not([hidden])").length){p=k.query(">*");for(n=0,j=p.length;n<j;n++){l=p[n];if(l.hidden){l.show(true)}}}Ext.resumeLayouts(true);m=k.getOwnerHeaderCt();if(m){m.onHeaderShow(k)}},getDesiredWidth:function(){var b=this;if(b.rendered&&b.componentLayout&&b.componentLayout.lastComponentSize){return b.componentLayout.lastComponentSize.width}else{if(b.flex){return b.width}else{return b.width}}},getCellSelector:function(){return"."+Ext.baseCSSPrefix+"grid-cell-"+this.getItemId()},getCellInnerSelector:function(){return this.getCellSelector()+" ."+Ext.baseCSSPrefix+"grid-cell-inner"},isOnLeftEdge:function(b){return(b.getXY()[0]-this.el.getLeft()<=this.handleWidth)},isOnRightEdge:function(b){return(this.el.getRight()-b.getXY()[0]<=this.handleWidth)}});Ext.define("Ext.grid.column.Action",{extend:"Ext.grid.column.Column",alias:["widget.actioncolumn"],alternateClassName:"Ext.grid.ActionColumn",actionIdRe:new RegExp(Ext.baseCSSPrefix+"action-col-(\\d+)"),altText:"",menuText:"<i>Actions</i>",sortable:false,constructor:function(h){var g=this,f=Ext.apply({},h),e=f.items||[g];g.origRenderer=f.renderer||g.renderer;g.origScope=f.scope||g.scope;delete g.renderer;delete g.scope;delete f.renderer;delete f.scope;delete f.items;g.callParent([f]);g.items=e;if(g.origRenderer){g.hasCustomRenderer=true}},defaultRenderer:function(m,k){var n=this,q=Ext.baseCSSPrefix,i=n.origScope||n,o=n.items,p=o.length,r=0,l;m=Ext.isFunction(n.origRenderer)?n.origRenderer.apply(i,arguments)||"":"";k.tdCls+=" "+Ext.baseCSSPrefix+"action-col-cell";for(;r<p;r++){l=o[r];if(!l.hasActionConfiguration){l.stopSelection=n.stopSelection;l.disable=Ext.Function.bind(n.disableAction,n,[r],0);l.enable=Ext.Function.bind(n.enableAction,n,[r],0);l.hasActionConfiguration=true}m+='<img alt="'+(l.altText||n.altText)+'" src="'+(l.icon||Ext.BLANK_IMAGE_URL)+'" class="'+q+"action-col-icon "+q+"action-col-"+String(r)+" "+(l.disabled?q+"item-disabled":" ")+" "+(Ext.isFunction(l.getClass)?l.getClass.apply(l.scope||i,arguments):(l.iconCls||n.iconCls||""))+'"'+((l.tooltip)?' data-qtip="'+l.tooltip+'"':"")+" />"}return m},enableAction:function(d,e){var f=this;if(!d){d=0}else{if(!Ext.isNumber(d)){d=Ext.Array.indexOf(f.items,d)}}f.items[d].disabled=false;f.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+d).removeCls(f.disabledCls);if(!e){f.fireEvent("enable",f)}},disableAction:function(d,e){var f=this;if(!d){d=0}else{if(!Ext.isNumber(d)){d=Ext.Array.indexOf(f.items,d)}}f.items[d].disabled=true;f.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+d).addCls(f.disabledCls);if(!e){f.fireEvent("disable",f)}},destroy:function(){delete this.items;delete this.renderer;return this.callParent(arguments)},processEvent:function(v,s,q,B,u,x,z,e){var w=this,y=x.getTarget(),A,p,t,r=v=="keydown"&&x.getKey();if(r&&!Ext.fly(y).findParent(s.cellSelector)){y=Ext.fly(q).down("."+Ext.baseCSSPrefix+"action-col-icon",true)}if(y&&(A=y.className.match(w.actionIdRe))){p=w.items[parseInt(A[1],10)];if(p){if(v=="click"||(r==x.ENTER||r==x.SPACE)){t=p.handler||w.handler;if(t&&!p.disabled){t.call(p.scope||w.scope||w,s,B,u,p,x,z,e)}}else{if(v=="mousedown"&&p.stopSelection!==false){return false}}}}return w.callParent(arguments)},cascade:function(c,d){c.call(d||this,this)},getRefItems:function(){return[]}});Ext.define("Ext.tree.Column",{extend:"Ext.grid.column.Column",alias:"widget.treecolumn",tdCls:Ext.baseCSSPrefix+"grid-cell-treecolumn",initComponent:function(){var d=this.renderer||this.defaultRenderer,c=this.scope||window;this.renderer=function(C,A,J,K,D,H,E){var w=[],y=Ext.String.format,b=J.getDepth(),x=Ext.baseCSSPrefix+"tree-",I=x+"elbow-",B=x+"expander",F='<img src="{1}" class="{0}" />',a='<input type="button" role="checkbox" class="{0}" {1} />',G=d.apply(c,arguments),z=J.get("href"),v=J.get("hrefTarget"),L=J.get("cls");while(J){if(!J.isRoot()||(J.isRoot()&&E.rootVisible)){if(J.getDepth()===b){w.unshift(y(F,x+"icon "+x+"icon"+(J.get("icon")?"-inline ":(J.isLeaf()?"-leaf ":"-parent "))+(J.get("iconCls")||""),J.get("icon")||Ext.BLANK_IMAGE_URL));if(J.get("checked")!==null){w.unshift(y(a,(x+"checkbox")+(J.get("checked")?" "+x+"checkbox-checked":""),J.get("checked")?'aria-checked="true"':""));if(J.get("checked")){A.tdCls+=(" "+x+"checked")}}if(J.isLast()){if(J.isExpandable()){w.unshift(y(F,(I+"end-plus "+B),Ext.BLANK_IMAGE_URL))}else{w.unshift(y(F,(I+"end"),Ext.BLANK_IMAGE_URL))}}else{if(J.isExpandable()){w.unshift(y(F,(I+"plus "+B),Ext.BLANK_IMAGE_URL))}else{w.unshift(y(F,(x+"elbow"),Ext.BLANK_IMAGE_URL))}}}else{if(J.isLast()||J.getDepth()===0){w.unshift(y(F,(I+"empty"),Ext.BLANK_IMAGE_URL))}else{if(J.getDepth()!==0){w.unshift(y(F,(I+"line"),Ext.BLANK_IMAGE_URL))}}}}J=J.parentNode}if(z){w.push('<a href="',z,'" target="',v,'">',G,"</a>")}else{w.push(G)}if(L){A.tdCls+=" "+L}return w.join("")};this.callParent(arguments)},defaultRenderer:function(b){return b}});Ext.define("Ext.tree.Panel",{extend:"Ext.panel.Table",alias:"widget.treepanel",alternateClassName:["Ext.tree.TreePanel","Ext.TreePanel"],requires:["Ext.tree.View","Ext.selection.TreeModel","Ext.tree.Column","Ext.data.TreeStore"],viewType:"treeview",selType:"treemodel",treeCls:Ext.baseCSSPrefix+"tree-panel",deferRowRender:false,rowLines:false,lines:true,useArrows:false,singleExpand:false,ddConfig:{enableDrag:true,enableDrop:true},rootVisible:true,displayField:"text",root:null,normalCfgCopy:["displayField","root","singleExpand","useArrows","lines","rootVisible","scroll"],lockedCfgCopy:["displayField","root","singleExpand","useArrows","lines","rootVisible"],isTree:true,constructor:function(b){b=b||{};if(b.animate===undefined){b.animate=Ext.isDefined(this.animate)?this.animate:Ext.enableFx}this.enableAnimations=b.animate;delete b.animate;this.callParent([b])},initComponent:function(){var f=this,d=[f.treeCls],e;if(f.useArrows){d.push(Ext.baseCSSPrefix+"tree-arrows");f.lines=false}if(f.lines){d.push(Ext.baseCSSPrefix+"tree-lines")}else{if(!f.useArrows){d.push(Ext.baseCSSPrefix+"tree-no-lines")}}if(Ext.isString(f.store)){f.store=Ext.StoreMgr.lookup(f.store)}else{if(!f.store||Ext.isObject(f.store)&&!f.store.isStore){f.store=new Ext.data.TreeStore(Ext.apply({},f.store||{},{root:f.root,fields:f.fields,model:f.model,folderSort:f.folderSort}))}else{if(f.root){f.store=Ext.data.StoreManager.lookup(f.store);f.store.setRootNode(f.root);if(f.folderSort!==undefined){f.store.folderSort=f.folderSort;f.store.sort()}}}}f.viewConfig=Ext.apply({},f.viewConfig);f.viewConfig=Ext.applyIf(f.viewConfig,{rootVisible:f.rootVisible,animate:f.enableAnimations,singleExpand:f.singleExpand,node:f.store.getRootNode(),hideHeaders:f.hideHeaders});f.mon(f.store,{scope:f,rootchange:f.onRootChange,clear:f.onClear});f.relayEvents(f.store,["beforeload","load"]);f.store.on({append:f.createRelayer("itemappend"),remove:f.createRelayer("itemremove"),move:f.createRelayer("itemmove",[0,4]),insert:f.createRelayer("iteminsert"),beforeappend:f.createRelayer("beforeitemappend"),beforeremove:f.createRelayer("beforeitemremove"),beforemove:f.createRelayer("beforeitemmove"),beforeinsert:f.createRelayer("beforeiteminsert"),expand:f.createRelayer("itemexpand",[0,1]),collapse:f.createRelayer("itemcollapse",[0,1]),beforeexpand:f.createRelayer("beforeitemexpand",[0,1]),beforecollapse:f.createRelayer("beforeitemcollapse",[0,1])});if(!f.columns){if(f.initialConfig.hideHeaders===undefined){f.hideHeaders=true}f.addCls(Ext.baseCSSPrefix+"autowidth-table");f.columns=[{xtype:"treecolumn",text:"Name",width:Ext.isIE6?null:10000,dataIndex:f.displayField}]}if(f.cls){d.push(f.cls)}f.cls=d.join(" ");f.callParent();e=f.getView();f.relayEvents(e,["checkchange","afteritemexpand","afteritemcollapse"]);if(!e.rootVisible&&!f.getRootNode()){f.setRootNode({expanded:true})}},onClear:function(){this.view.onClear()},setRootNode:function(){return this.store.setRootNode.apply(this.store,arguments)},getRootNode:function(){return this.store.getRootNode()},onRootChange:function(b){this.view.setRootNode(b)},getChecked:function(){return this.getView().getChecked()},isItemChecked:function(b){return b.get("checked")},expandAll:function(h,i){var f=this.getRootNode(),j=this.enableAnimations,g=this.getView();if(f){if(!j){g.beginBulkUpdate()}f.expand(true,h,i);if(!j){g.endBulkUpdate()}}},collapseAll:function(h,i){var f=this.getRootNode(),j=this.enableAnimations,g=this.getView();if(f){if(!j){g.beginBulkUpdate()}if(g.rootVisible){f.collapse(true,h,i)}else{f.collapseChildren(true,h,i)}if(!j){g.endBulkUpdate()}}},expandPath:function(l,q,v,p,m){var s=this,t=s.getRootNode(),u=1,r=s.getView(),n,o;q=q||s.getRootNode().idProperty;v=v||"/";if(Ext.isEmpty(l)){Ext.callback(p,m||s,[false,null]);return}n=l.split(v);if(t.get(q)!=n[1]){Ext.callback(p,m||s,[false,t]);return}o=function(){if(++u===n.length){Ext.callback(p,m||s,[true,t]);return}var a=t.findChild(q,n[u]);if(!a){Ext.callback(p,m||s,[false,t]);return}t=a;t.expand(false,o)};t.expand(false,o)},selectPath:function(l,m,n,k,j){var o=this,p,i;m=m||o.getRootNode().idProperty;n=n||"/";p=l.split(n);i=p.pop();o.expandPath(p.join(n),m,n,function(a,b){var c=false;if(a&&b){b=b.findChild(m,i);if(b){o.getSelectionModel().select(b);Ext.callback(k,j||o,[true,b]);c=true}}else{if(b===o.getRootNode()){c=true}}Ext.callback(k,j||o,[c,b])},o)}});Ext.define("Docs.view.DocTree",{extend:"Ext.tree.Panel",alias:"widget.doctree",cls:"doc-tree iScroll",useArrows:true,rootVisible:false,border:false,bodyBorder:false,initComponent:function(){this.addEvents("urlclick");this.root.expanded=true;this.on("itemclick",this.onItemClick,this);this.on("beforeitemcollapse",this.handleBeforeExpandCollapse,this);this.on("beforeitemexpand",this.handleBeforeExpandCollapse,this);this.callParent();this.nodeTpl=new Ext.XTemplate('<a href="{url}" rel="{url}">{text}</a>');this.initNodeLinks()},initNodeLinks:function(){this.getRootNode().cascadeBy(this.applyNodeTpl,this)},applyNodeTpl:function(b){if(b.get("leaf")){b.set("text",this.nodeTpl.apply({text:b.get("text"),url:b.raw.url}));b.commit()}},onItemClick:function(h,j,k,l,i){var e=j.raw?j.raw.url:j.data.url;if(e){this.fireEvent("urlclick",e,i)}else{if(!j.isLeaf()){if(j.isExpanded()){j.collapse(false)}else{j.expand(false)}}}},selectUrl:function(d){var c=this.findNodeByUrl(d);if(c){c.bubble(function(a){a.expand()});this.getSelectionModel().select(c)}else{this.getSelectionModel().deselectAll()}},findNodeByUrl:function(b){return this.getRootNode().findChildBy(function(a){return b===a.raw.url},this,true)},findRecordByUrl:function(d){var c=this.findNodeByUrl(d);return c?c.raw:undefined},handleBeforeExpandCollapse:function(b){if(this.getView().isAnimating(b)){return false}}});Ext.define("Docs.view.GroupTree",{extend:"Docs.view.DocTree",alias:"widget.grouptree",initComponent:function(){this.root={children:[],text:"Root"};Ext.Array.each(this.data,function(b){this.root.children.push({text:b.title,expanded:true,children:Ext.Array.map(b.items,this.convert),iconCls:"icon-pkg"})},this);this.callParent()}});Ext.define("Docs.model.Stats",{extend:"Ext.data.Model",fields:["name","local_cfgs","local_properties","local_methods","local_events","local_members","total_cfgs","total_properties","total_methods","total_events","total_members","fanIn","fanOut","class_wc","members_wc","wc_per_member"]});Ext.define("Docs.view.stats.Index",{extend:"Ext.container.Container",alias:"widget.statsindex",requires:["Ext.grid.Panel","Docs.model.Stats"],mixins:["Docs.view.Scrolling"],layout:"fit",initComponent:function(){var b=Ext.create("Ext.data.Store",{model:"Docs.model.Stats",data:Docs.data.stats,sorters:"name"});this.items=[{xtype:"grid",store:b,title:"Statistics",columns:[{text:"Name",width:200,dataIndex:"name"},{text:"Configs",width:50,align:"right",dataIndex:"local_cfgs"},{text:"Props",width:50,align:"right",dataIndex:"local_properties"},{text:"Methods",width:50,align:"right",dataIndex:"local_methods"},{text:"Events",width:50,align:"right",dataIndex:"local_events"},{text:"Members",width:50,align:"right",dataIndex:"local_members",renderer:function(a){return"<b>"+a+"</b>"}},{text:"All Configs",width:50,align:"right",dataIndex:"total_cfgs"},{text:"All Props",width:50,align:"right",dataIndex:"total_properties"},{text:"All Methods",width:50,align:"right",dataIndex:"total_methods"},{text:"All Events",width:50,align:"right",dataIndex:"total_events"},{text:"All Members",width:50,align:"right",dataIndex:"total_members",renderer:function(a){return"<b>"+a+"</b>"}},{text:"Fan-in",width:50,align:"right",dataIndex:"fanIn"},{text:"Fan-out",width:50,align:"right",dataIndex:"fanOut"},{text:"Class word-count",width:50,align:"right",dataIndex:"class_wc"},{text:"Members word-count",width:50,align:"right",dataIndex:"members_wc"},{text:"wc / member",width:50,align:"right",dataIndex:"wc_per_member"}]}];this.callParent(arguments)},getTab:function(){var b=(Docs.data.stats||[]).length>0;return b?{cls:"stats",href:"#!/stats",tooltip:"Statistics",text:"Stats"}:false}});Ext.define("Docs.model.Test",{extend:"Ext.data.Model",fields:["id","name","href","code","options",{name:"status",defaultValue:"ready"},"message"]});Ext.define("Docs.view.tests.Index",{extend:"Ext.container.Container",requires:["Docs.model.Test","Docs.view.tests.BatchRunner"],mixins:["Docs.view.Scrolling"],alias:"widget.testsindex",layout:{type:"vbox",align:"stretch",shrinkToFit:true},padding:10,initComponent:function(){this.store=Ext.create("Ext.data.Store",{model:"Docs.model.Test",data:[]});this.grid=Ext.create("Ext.grid.Panel",{itemId:"testsgrid",padding:"5 0 5 0",autoScroll:true,flex:1,store:this.store,selModel:{mode:"MULTI"},columns:[{xtype:"templatecolumn",text:"Name",width:300,tpl:'<a href="{href}">{name}</a>'},{xtype:"templatecolumn",text:"Status",width:80,tpl:'<span class="doc-test-{status}">{status}</span>'},{text:"Message",flex:1,dataIndex:"message"}],listeners:{itemdblclick:function(c,d){this.batchRunner.run([d])},scope:this}});this.batchRunner=Ext.create("Docs.view.tests.BatchRunner",{height:0,listeners:{start:this.disable,finish:this.enable,statuschange:this.updateTestStatus,scope:this}});this.items=[{html:"<h1>Inline examples test page</h1>",height:30},{itemId:"testcontainer",layout:{type:"vbox",align:"stretch",shrinkToFit:true},flex:1,items:[{itemId:"testcontrols",layout:"hbox",items:[{html:"<b>Double-click</b> to run an example, or",margin:"5 5 5 0"},{xtype:"button",itemId:"run-selected-button",text:"Run Selected",margin:5,handler:function(){this.batchRunner.run(this.grid.getSelectionModel().getSelection())},scope:this},{html:"or",margin:5},{xtype:"button",itemId:"run-all-button",text:"Run All Examples",margin:5,handler:function(){this.batchRunner.run(this.store.getRange())},scope:this},{itemId:"testStatus",margin:"5 5 5 15"}]},this.grid]},this.batchRunner];this.callParent(arguments)},getTab:function(){return Docs.data.tests?{cls:"tests",href:"#!/tests",tooltip:"Tests",text:"Tests"}:false},addExamples:function(b){this.store.add(b);this.setStatus(true,this.store.getCount()+" examples loaded.")},updateTestStatus:function(d){var c=d.pass+d.fail;this.setStatus(d.fail===0,c+"/"+d.total+" examples tested, "+d.fail+" failures")},setStatus:function(d,f){var e=d?"doc-test-success":"doc-test-failure";this.down("#testStatus").update('<span class="'+e+'">'+f+"</span>")}});Ext.define("Ext.data.SequentialIdGenerator",{extend:"Ext.data.IdGenerator",alias:"idgen.sequential",constructor:function(){var b=this;b.callParent(arguments);b.parts=[b.prefix,""]},prefix:"",seed:1,generate:function(){var d=this,c=d.parts;c[1]=d.seed++;return c.join("")}});Ext.define("Ext.data.proxy.WebStorage",{extend:"Ext.data.proxy.Client",alternateClassName:"Ext.data.WebStorageProxy",requires:["Ext.data.SequentialIdGenerator"],id:undefined,constructor:function(b){this.callParent(arguments);this.cache={};if(this.getStorageObject()===undefined){Ext.Error.raise("Local Storage is not supported in this browser, please use another type of data proxy")}this.id=this.id||(this.store?this.store.storeId:undefined);if(this.id===undefined){Ext.Error.raise("No unique id was provided to the local storage proxy. See Ext.data.proxy.LocalStorage documentation for details")}this.initialize()},create:function(p,l,i){var m=this,q=p.records,r=q.length,t=m.getIds(),s,n,o;p.setStarted();if(m.isHierarchical===undefined){m.isHierarchical=!!q[0].isNode;if(m.isHierarchical){m.getStorageObject().setItem(m.getTreeKey(),true)}}for(o=0;o<r;o++){n=q[o];if(n.phantom){n.phantom=false;s=m.getNextId()}else{s=n.getId()}m.setRecord(n,s);n.commit();t.push(s)}m.setIds(t);p.setCompleted();p.setSuccessful();if(typeof l=="function"){l.call(i||m,p)}},read:function(u,p,i){var q=this,v=[],s=0,o=true,w=q.model,z,x,r,t,y;u.setStarted();if(q.isHierarchical){v=q.getTreeData()}else{z=q.getIds();x=z.length;y=u.id;if(y){t=q.getRecord(y);r=new w(t,y,t);if(r){v.push(r)}else{o=false}}else{for(;s<x;s++){y=z[s];t=q.getRecord(y);v.push(new w(t,y,t))}}}if(o){u.setSuccessful()}u.setCompleted();u.resultSet=Ext.create("Ext.data.ResultSet",{records:v,total:v.length,loaded:true});if(typeof p=="function"){p.call(i||q,u)}},update:function(n,k,i){var o=n.records,p=o.length,r=this.getIds(),l,q,m;n.setStarted();for(m=0;m<p;m++){l=o[m];this.setRecord(l);l.commit();q=l.getId();if(q!==undefined&&Ext.Array.indexOf(r,q)==-1){r.push(q)}}this.setIds(r);n.setCompleted();n.setSuccessful();if(typeof k=="function"){k.call(i||this,n)}},destroy:function(s,n,m){var q=this,t=s.records,v=q.getIds(),p=v.length,i=[],o={},r=t.length,u;s.setStarted();for(;r--;){Ext.apply(o,q.removeRecord(t[r]))}for(r=0;r<p;r++){u=v[r];if(!o[u]){i.push(u)}}q.setIds(i);s.setCompleted();s.setSuccessful();if(typeof n=="function"){n.call(m||q,s)}},getRecord:function(g){var e=this,f=e.cache,h=!f[g]?Ext.decode(e.getStorageObject().getItem(e.getRecordKey(g))):f[g];if(!h){return null}f[g]=h;h[e.model.prototype.idProperty]=g;return h},setRecord:function(r,x){if(x){r.setId(x)}else{x=r.getId()}var p=this,z=r.data,t={},s=p.model,q=s.prototype.fields.items,w=q.length,u=0,o,y,v,i;for(;u<w;u++){o=q[u];y=o.name;if(o.persist){t[y]=z[y]}}delete t[p.model.prototype.idProperty];if(r.isNode&&r.get("depth")===1){delete t.parentId}v=p.getStorageObject();i=p.getRecordKey(x);p.cache[x]=t;v.removeItem(i);v.setItem(i,Ext.encode(t))},removeRecord:function(h){var k=this,i=h.getId(),g={},l,j;g[i]=h;k.getStorageObject().removeItem(k.getRecordKey(i));delete k.cache[i];if(h.childNodes){j=h.childNodes;for(l=j.length;l--;){Ext.apply(g,k.removeRecord(j[l]))}}return g},getRecordKey:function(b){if(b.isModel){b=b.getId()}return Ext.String.format("{0}-{1}",this.id,b)},getRecordCounterKey:function(){return Ext.String.format("{0}-counter",this.id)},getTreeKey:function(){return Ext.String.format("{0}-tree",this.id)},getIds:function(){var i=this,k=(i.getStorageObject().getItem(i.id)||"").split(","),g=i.model,j=k.length,h=g.prototype.fields.get(g.prototype.idProperty).type.type==="string",l;if(j==1&&k[0]===""){k=[]}else{for(l=0;l<j;l++){k[l]=h?k[l]:+k[l]}}return k},setIds:function(e){var d=this.getStorageObject(),f=e.join(",");d.removeItem(this.id);if(!Ext.isEmpty(f)){d.setItem(this.id,f)}},getNextId:function(){var k=this,j=k.getStorageObject(),l=k.getRecordCounterKey(),g=k.model,h=g.prototype.fields.get(g.prototype.idProperty).type.type==="string",i;i=k.idGenerator.generate();j.setItem(l,i);if(!h){i=+i}return i},getTreeData:function(){var s=this,D=s.getIds(),z=D.length,w=[],C={},r=[],v=0,x=s.model,i=x.prototype.idProperty,y,t,q,u,A,B;for(;v<z;v++){B=D[v];t=s.getRecord(B);w.push(t);C[B]=t;if(!t.parentId){r.push(t)}}y=r.length;Ext.Array.sort(w,s.sortByParentId);for(v=y;v<z;v++){t=w[v];u=t.parentId;if(!q||q[i]!==u){q=C[u];q.children=A=[]}A.push(t)}for(v=z;v--;){t=w[v];if(!t.children&&!t.leaf){t.loaded=true}}for(v=y;v--;){t=r[v];r[v]=new x(t,t[i],t)}return r},sortByParentId:function(c,d){return(c.parentId||0)-(d.parentId||0)},initialize:function(){var d=this,e=d.getStorageObject(),f=+e.getItem(d.getRecordCounterKey());e.setItem(d.id,e.getItem(d.id)||"");if(e.getItem(d.getTreeKey())){d.isHierarchical=true}d.idGenerator=new Ext.data.SequentialIdGenerator({seed:f?f+1:1})},clear:function(){var i=this,h=i.getStorageObject(),j=i.getIds(),g=j.length,f;for(f=0;f<g;f++){h.removeItem(i.getRecordKey(j[f]))}h.removeItem(i.getRecordCounterKey());h.removeItem(i.getTreeKey());h.removeItem(i.id);i.cache={}},getStorageObject:function(){Ext.Error.raise("The getStorageObject function has not been defined in your Ext.data.proxy.WebStorage subclass")}});Ext.define("Ext.data.proxy.LocalStorage",{extend:"Ext.data.proxy.WebStorage",alias:"proxy.localstorage",alternateClassName:"Ext.data.LocalStorageProxy",getStorageObject:function(){return window.localStorage}});Ext.define("Docs.model.Setting",{fields:["id","key","value"],extend:"Ext.data.Model",proxy:{type:window.localStorage?"localstorage":"memory",id:Docs.data.localStorageDb+"-settings"}});Ext.define("Docs.store.Settings",{extend:"Ext.data.Store",model:"Docs.model.Setting"});Ext.define("Docs.Settings",{extend:"Docs.LocalStore",singleton:true,requires:"Docs.store.Settings",storeName:"Docs.store.Settings",defaults:{show:{"public":true,"protected":false,"private":false,deprecated:false,removed:false,inherited:true,accessor:true},showPrivateClasses:false,classTreeLogic:"PackageLogic"},set:function(d,f){var e=this.store.findExact("key",d);if(e>-1){this.store.removeAt(e)}this.store.add({key:d,value:f});this.syncStore()},get:function(c){var d=this.store.findExact("key",c);return d>-1?this.store.getAt(d).get("value"):this.defaults[c]}});Ext.define("Docs.Application",{extend:"Ext.app.Application",name:"Docs",requires:["Docs.History","Docs.Settings"],uses:["Ext.util.History","Ext.data.JsonP"],controllers:["Auth","Welcome","Failure","Classes","Comments","CommentsMeta","Search","InlineExamples","Examples","Guides","Videos","Stats","Tabs","Tests"],launch:function(){Docs.App=this;Docs.Settings.init();Ext.create("Docs.view.Viewport");Docs.History.init();if(Docs.initEventTracking){Docs.initEventTracking()}Ext.get("loading").remove()}});Ext.define("Docs.view.cls.Tree",{extend:"Docs.view.DocTree",alias:"widget.classtree",requires:["Docs.view.cls.PackageLogic","Docs.view.cls.InheritanceLogic","Docs.Settings"],initComponent:function(){this.setLogic(Docs.Settings.get("classTreeLogic"),Docs.Settings.get("showPrivateClasses"));this.dockedItems=[{xtype:"container",dock:"bottom",layout:"hbox",items:[{width:34},{xtype:"checkbox",boxLabel:"Show private classes",cls:"cls-private-cb",checked:Docs.Settings.get("showPrivateClasses"),listeners:{change:function(d,c){this.setLogic(Docs.Settings.get("classTreeLogic"),c)},scope:this}}]},{xtype:"container",dock:"bottom",cls:"cls-grouping",html:[this.makeButtonHtml("PackageLogic","By Package"),this.makeButtonHtml("InheritanceLogic","By Inheritance")].join("")}];this.on("afterrender",this.setupButtonClickHandler,this);this.callParent()},makeButtonHtml:function(d,c){return Ext.String.format('<button class="{0} {1}">{2}</button>',d,Docs.Settings.get("classTreeLogic")===d?"selected":"",c)},setupButtonClickHandler:function(){this.el.addListener("click",function(g,h){var f=Ext.get(h),e=Ext.get(Ext.query(".cls-grouping button.selected")[0]);if(e.dom===f.dom){return}e.removeCls("selected");f.addCls("selected");if(f.hasCls("PackageLogic")){this.setLogic("PackageLogic",Docs.Settings.get("showPrivateClasses"))}else{this.setLogic("InheritanceLogic",Docs.Settings.get("showPrivateClasses"))}},this,{delegate:"button"})},setLogic:function(i,f){Docs.Settings.set("classTreeLogic",i);Docs.Settings.set("showPrivateClasses",f);var g=new Docs.view.cls[i]({classes:this.data,showPrivateClasses:f});if(this.root){var h=this.getSelectionModel().getLastSelected();var j=g.create();this.expandLonelyNode(j.root);this.setRootNode(j.root);this.initNodeLinks();h&&this.selectUrl(h.raw.url)}else{var j=g.create();this.root=j.root;this.expandLonelyNode(this.root)}this.privates=j.privates},expandLonelyNode:function(d){var c=Ext.Array.filter(d.children,function(a){return a.children.length>0});if(c.length==1){c[0].expanded=true}},findRecordByUrl:function(b){return this.callParent([b])||this.findPrivateRecordByUrl(b)},findPrivateRecordByUrl:function(e){var f=this.privates;for(var d=0;d<f.length;d++){if(f[d].url===e){return f[d]}}return undefined}});Ext.define("Docs.view.TreeContainer",{extend:"Ext.panel.Panel",alias:"widget.treecontainer",requires:["Docs.view.cls.Tree","Docs.view.GroupTree"],cls:"iScroll",layout:"card",resizable:true,resizeHandles:"e",collapsible:true,hideCollapseTool:true,animCollapse:true,header:false,initComponent:function(){this.items=[{},{xtype:"classtree",id:"classtree",data:Docs.data.classes},{xtype:"grouptree",id:"exampletree",data:Docs.data.examples,convert:function(b){return{leaf:true,text:b.title,url:"#!/example/"+b.name,iconCls:"icon-example"}}},{xtype:"grouptree",id:"guidetree",data:Docs.data.guides,convert:function(b){return{leaf:true,text:b.title,url:"#!/guide/"+b.name,iconCls:"icon-guide"}}},{xtype:"grouptree",id:"videotree",data:Docs.data.videos,convert:function(b){return{leaf:true,text:b.title,url:"#!/video/"+b.name,iconCls:"icon-video"}}}];this.callParent()},showTree:function(b){this.show();this.layout.setActiveItem(b)}});Ext.define("Docs.view.cls.Toolbar",{extend:"Ext.toolbar.Toolbar",requires:["Docs.view.HoverMenuButton","Docs.Settings","Ext.form.field.Checkbox"],dock:"top",cls:"member-links",docClass:{},accessors:{},initComponent:function(){this.addEvents("menubuttonclick","commentcountclick","filter","toggleExpanded");this.items=[];this.memberButtons={};var h={cfg:"Configs",property:"Properties",method:"Methods",event:"Events",css_var:"CSS Vars",css_mixin:"CSS Mixins"};for(var i in h){var f=this.docClass.members[i].concat(this.docClass.statics[i]);f.sort(function(a,b){if(a.name==="constructor"&&a.tagname==="method"){return -1}return a.name<b.name?-1:(a.name>b.name?1:0)});if(f.length>0){var j=this.createMemberButton({text:h[i],type:i,members:f});this.memberButtons[i]=j;this.items.push(j)}}this.checkItems={"public":this.createCb("Public","public"),"protected":this.createCb("Protected","protected"),"private":this.createCb("Private","private"),inherited:this.createCb("Inherited","inherited"),accessor:this.createCb("Accessor","accessor"),deprecated:this.createCb("Deprecated","deprecated"),removed:this.createCb("Removed","removed")};var g=this;this.items=this.items.concat([{xtype:"tbfill"},this.filterField=Ext.widget("triggerfield",{triggerCls:"reset",cls:"member-filter",hideTrigger:true,emptyText:"Filter class members",enableKeyEvents:true,width:150,listeners:{keyup:function(a){this.fireEvent("filter",a.getValue(),this.getShowFlags());a.setHideTrigger(a.getValue().length===0)},specialkey:function(a,b){if(b.keyCode===Ext.EventObject.ESC){a.reset();this.fireEvent("filter","",this.getShowFlags())}},scope:this},onTriggerClick:function(){this.reset();this.focus();g.fireEvent("filter","",g.getShowFlags());this.setHideTrigger(true)}}),{xtype:"tbspacer",width:10},this.commentCount=this.createCommentCount(),{xtype:"button",text:"Show",menu:[this.checkItems["public"],this.checkItems["protected"],this.checkItems["private"],"-",this.checkItems.inherited,this.checkItems.accessor,this.checkItems.deprecated,this.checkItems.removed]},{xtype:"button",iconCls:"expand-all-members",tooltip:"Expand all",enableToggle:true,toggleHandler:function(b,a){b.setIconCls(a?"collapse-all-members":"expand-all-members");this.fireEvent("toggleExpanded",a)},scope:this}]);this.callParent(arguments)},getShowFlags:function(){var d={};for(var c in this.checkItems){d[c]=this.checkItems[c].checked}return d},createCb:function(c,d){return Ext.widget("menucheckitem",{text:c,checked:Docs.Settings.get("show")[d],listeners:{checkchange:function(){this.fireEvent("filter",this.filterField.getValue(),this.getShowFlags())},scope:this}})},createMemberButton:function(d){var c=Ext.Array.map(d.members,function(a){return this.createLinkRecord(this.docClass.name,a)},this);return Ext.create("Docs.view.HoverMenuButton",{text:d.text,cls:"icon-"+d.type,store:this.createStore(c),showCount:true,listeners:{click:function(){this.fireEvent("menubuttonclick",d.type)},scope:this}})},createStore:function(c){var d=Ext.create("Ext.data.Store",{fields:["id","url","label","inherited","accessor","meta"]});d.add(c);return d},createLinkRecord:function(d,c){return{url:d+"-"+c.id,label:(c.tagname==="method"&&c.name==="constructor")?"new "+d:c.name,inherited:c.owner!==d,accessor:c.tagname==="method"&&this.accessors.hasOwnProperty(c.name),meta:c.meta}},showMenuItems:function(d,e,f){Ext.Array.forEach(["cfg","property","method","event"],function(b){if(this.memberButtons[b]){var c=this.memberButtons[b].getStore();c.filterBy(function(h){return !(!d["public"]&&!(h.get("meta")["private"]||h.get("meta")["protected"])||!d["protected"]&&h.get("meta")["protected"]||!d["private"]&&h.get("meta")["private"]||!d.inherited&&h.get("inherited")||!d.accessor&&h.get("accessor")||!d.deprecated&&h.get("meta")["deprecated"]||!d.removed&&h.get("meta")["removed"]||e&&!f.test(h.get("label")))});var a=this.memberButtons[b].menu;if(a&&Ext.getVersion().version>="4.1.0"){a.show();a.hide()}}},this)},getFilterValue:function(){return this.filterField.getValue()},createCommentCount:function(){return Ext.create("Ext.container.Container",{width:24,margin:"0 4 0 0",cls:"comment-btn",html:"0",hidden:true,listeners:{afterrender:function(b){b.el.addListener("click",function(){this.fireEvent("commentcountclick")},this)},scope:this}})},showCommentCount:function(){this.commentCount.show()},setCommentCount:function(b){this.commentCount.update(""+b)}});Ext.define("Docs.view.cls.Overview",{extend:"Ext.panel.Panel",alias:"widget.classoverview",requires:["Docs.view.cls.Toolbar","Docs.view.examples.Inline","Docs.Syntax","Docs.Settings"],mixins:["Docs.view.Scrolling"],cls:"class-overview iScroll",autoScroll:true,border:false,bodyPadding:"20 8 20 5",initComponent:function(){this.addEvents("afterload");this.callParent(arguments)},scrollToEl:function(h,g){var f=(typeof h=="string")?Ext.get(Ext.query(h)[0]):h;if(f){var e=f.hasCls("member");f.show();if(!f.isVisible(true)){f.up(".subsection").show();f.up(".members-section").show()}if(e&&f.down(".expandable")){f.addCls("open")}this.scrollToView(f,{highlight:true,offset:(g||0)-(e?165:155)})}},load:function(b){this.docClass=b;this.accessors=this.buildAccessorsMap();if(this.toolbar){this.removeDocked(this.toolbar,false);this.toolbar.destroy()}this.toolbar=Ext.create("Docs.view.cls.Toolbar",{docClass:this.docClass,accessors:this.accessors,listeners:{filter:function(d,a){this.filterMembers(d,a)},menubuttonclick:function(a){this.scrollToEl("h3.members-title.icon-"+a,-20)},scope:this}});this.addDocked(this.toolbar);this.update(b.html);Docs.Syntax.highlight(this.getEl());this.filterMembers("",Docs.Settings.get("show"));this.fireEvent("afterload")},filterMembers:function(h,e){Docs.Settings.set("show",e);var f=h.length>0;Ext.Array.forEach(Ext.query(".doc-contents, .hierarchy"),function(a){Ext.get(a).setStyle({display:f?"none":"block"})});var g=new RegExp(Ext.String.escapeRegex(h),"i");this.eachMember(function(c){var b=Ext.get(c.id);var a=!(!e["public"]&&!(c.meta["private"]||c.meta["protected"])||!e["protected"]&&c.meta["protected"]||!e["private"]&&c.meta["private"]||!e.inherited&&(c.owner!==this.docClass.name)||!e.accessor&&c.tagname==="method"&&this.accessors.hasOwnProperty(c.name)||!e.deprecated&&c.meta.deprecated||!e.removed&&c.meta.removed||f&&!g.test(c.name));if(a){b.setStyle({display:"block"})}else{b.setStyle({display:"none"})}},this);Ext.Array.forEach(Ext.query(".member.first-child"),function(a){Ext.get(a).removeCls("first-child")});Ext.Array.forEach(Ext.query(".members-section"),function(b){var a=this.getVisibleElements(".member",b);Ext.get(b).setStyle({display:a.length>0?"block":"none"});Ext.Array.forEach(Ext.query(".subsection",b),function(d){var c=this.getVisibleElements(".member",d);if(c.length>0){c[0].addCls("first-child");Ext.get(d).setStyle({display:"block"})}else{Ext.get(d).setStyle({display:"none"})}},this)},this);this.toolbar.showMenuItems(e,f,g)},buildAccessorsMap:function(c){var d={};Ext.Array.forEach(this.docClass.members.cfg,function(b){var a=Ext.String.capitalize(b.name);d["get"+a]=true;d["set"+a]=true});return d},getVisibleElements:function(e,d){var f=Ext.Array.map(Ext.query(e,d),function(a){return Ext.get(a)});return Ext.Array.filter(f,function(a){return a.isVisible()})},eachMember:function(c,d){Ext.Array.forEach(["members","statics"],function(a){Ext.Object.each(this.docClass[a],function(b,f){Ext.Array.forEach(f,c,d)},this)},this)}});Ext.define("Docs.view.cls.Container",{extend:"Ext.container.Container",alias:"widget.classcontainer",requires:["Docs.view.cls.Header","Docs.view.cls.Overview"],layout:"border",padding:"5 10 0 10",initComponent:function(){this.items=[Ext.create("Docs.view.cls.Header",{region:"north"}),Ext.create("Docs.view.cls.Overview",{region:"center"})];this.callParent(arguments)}});Ext.define("Docs.view.Viewport",{extend:"Ext.container.Viewport",requires:["Docs.view.search.Container","Docs.view.Header","Docs.view.Tabs","Docs.view.TreeContainer","Docs.view.welcome.Index","Docs.view.auth.Login","Docs.view.comments.Index","Docs.view.Comments","Docs.view.cls.Index","Docs.view.cls.Container","Docs.view.guides.Index","Docs.view.guides.Container","Docs.view.videos.Index","Docs.view.videos.Container","Docs.view.examples.Index","Docs.view.examples.Container","Docs.view.examples.TouchContainer","Docs.view.stats.Index","Docs.view.tests.Index"],id:"viewport",layout:"border",defaults:{xtype:"container"},initComponent:function(){this.items=[{region:"north",id:"north-region",height:65,layout:{type:"vbox",align:"stretch"},items:[{height:37,xtype:"container",layout:"hbox",items:[{xtype:"docheader"},{xtype:"container",flex:1},{id:"loginContainer",xtype:"authentication",width:500,padding:"10 20 0 0"},{xtype:"searchcontainer",id:"search-container",width:230,margin:"4 0 0 0"}]},{xtype:"doctabs"}]},{region:"center",layout:"border",minWidth:800,items:[{region:"west",xtype:"treecontainer",id:"treecontainer",border:1,bodyPadding:"10 9 4 9",width:240},{region:"center",id:"center-container",layout:"fit",minWidth:800,border:false,padding:"5 10",items:{id:"card-panel",cls:"card-panel",xtype:"container",layout:{type:"card",deferredRender:true},items:[{autoScroll:true,xtype:"welcomeindex",id:"welcomeindex"},{xtype:"container",id:"failure"},{autoScroll:true,xtype:"classindex",id:"classindex"},{xtype:"classcontainer",id:"classcontainer"},{autoScroll:true,xtype:"guideindex",id:"guideindex"},{autoScroll:true,xtype:"guidecontainer",id:"guide",cls:"iScroll"},{xtype:"videoindex",id:"videoindex"},{autoScroll:true,xtype:"videocontainer",id:"video",cls:"iScroll"},{xtype:"exampleindex",id:"exampleindex"},{xtype:Docs.data.touchExamplesUi?"touchexamplecontainer":"examplecontainer",id:"example"},{xtype:"statsindex",id:"statsindex"},{xtype:"testsindex",id:"testsindex"},{xtype:"commentindex",id:"commentindex"}]}}]},{region:"south",id:"footer",height:20,contentEl:"footer-content"}];this.callParent(arguments)},setPageTitle:function(b){b=Ext.util.Format.stripTags(b);if(!this.origTitle){this.origTitle=document.title}document.title=b?(b+" - "+this.origTitle):this.origTitle}});Ext.define("Ext.util.Point",{extend:"Ext.util.Region",statics:{fromEvent:function(b){b=(b.changedTouches&&b.changedTouches.length>0)?b.changedTouches[0]:b;return new this(b.pageX,b.pageY)}},constructor:function(d,c){this.callParent([c,d,c,d])},toString:function(){return"Point["+this.x+","+this.y+"]"},equals:function(b){return(this.x==b.x&&this.y==b.y)},isWithin:function(c,d){if(!Ext.isObject(d)){d={x:d,y:d}}return(this.x<=c.x+d.x&&this.x>=c.x-d.x&&this.y<=c.y+d.y&&this.y>=c.y-d.y)},roundedEquals:function(b){return(Math.round(this.x)==Math.round(b.x)&&Math.round(this.y)==Math.round(b.y))}},function(){this.prototype.translate=Ext.util.Region.prototype.translateBy});Ext.define("Ext.Layer",{extend:"Ext.Element",uses:["Ext.Shadow"],statics:{shims:[]},isLayer:true,constructor:function(h,i){h=h||{};var n=this,m=Ext.DomHelper,k=h.parentEl,l=k?Ext.getDom(k):document.body,j=h.hideMode;if(i){n.dom=Ext.getDom(i)}if(!n.dom){n.dom=m.append(l,h.dh||{tag:"div",cls:Ext.baseCSSPrefix+"layer"})}else{n.addCls(Ext.baseCSSPrefix+"layer");if(!n.dom.parentNode){l.appendChild(n.dom)}}if(h.id){n.id=n.dom.id=h.id}else{n.id=Ext.id(n.dom)}Ext.Element.addToCache(n);if(h.cls){n.addCls(h.cls)}n.constrain=h.constrain!==false;if(j){n.setVisibilityMode(Ext.Element[j.toUpperCase()]);if(n.visibilityMode==Ext.Element.ASCLASS){n.visibilityCls=h.visibilityCls}}else{if(h.useDisplay){n.setVisibilityMode(Ext.Element.DISPLAY)}else{n.setVisibilityMode(Ext.Element.VISIBILITY)}}if(h.shadow){n.shadowOffset=h.shadowOffset||4;n.shadow=new Ext.Shadow({offset:n.shadowOffset,mode:h.shadow});n.disableShadow()}else{n.shadowOffset=0}n.useShim=h.shim!==false&&Ext.useShims;if(h.hidden===true){n.hide()}else{n.show()}},getZIndex:function(){return parseInt((this.getShim()||this).getStyle("z-index"),10)},getShim:function(){var d=this,f,e;if(!d.useShim){return null}if(!d.shim){f=d.self.shims.shift();if(!f){f=d.createShim();f.enableDisplayMode("block");f.hide()}e=d.dom.parentNode;if(f.dom.parentNode!=e){e.insertBefore(f.dom,d.dom)}d.shim=f}return d.shim},hideShim:function(){var b=this;if(b.shim){b.shim.setDisplayed(false);b.self.shims.push(b.shim);delete b.shim}},disableShadow:function(){var b=this;if(b.shadow&&!b.shadowDisabled){b.shadowDisabled=true;b.shadow.hide();b.lastShadowOffset=b.shadowOffset;b.shadowOffset=0}},enableShadow:function(d){var c=this;if(c.shadow&&c.shadowDisabled){c.shadowDisabled=false;c.shadowOffset=c.lastShadowOffset;delete c.lastShadowOffset;if(d){c.sync(true)}}},sync:function(w){var q=this,l=q.shadow,r,t,x,u,v,h,o,s,p;if(!q.updating&&q.isVisible()&&(l||q.useShim)){u=q.getShim();v=q.getLeft(true);h=q.getTop(true);o=q.dom.offsetWidth;s=q.dom.offsetHeight;if(l&&!q.shadowDisabled){if(w&&!l.isVisible()){l.show(q)}else{l.realign(v,h,o,s)}if(u){p=u.getStyle("z-index");if(p>q.zindex){q.shim.setStyle("z-index",q.zindex-2)}u.show();if(l.isVisible()){r=l.el.getXY();t=u.dom.style;x=l.el.getSize();if(Ext.supports.CSS3BoxShadow){x.height+=6;x.width+=4;r[0]-=2;r[1]-=4}t.left=(r[0])+"px";t.top=(r[1])+"px";t.width=(x.width)+"px";t.height=(x.height)+"px"}else{u.setSize(o,s);u.setLeftTop(v,h)}}}else{if(u){p=u.getStyle("z-index");if(p>q.zindex){q.shim.setStyle("z-index",q.zindex-2)}u.show();u.setSize(o,s);u.setLeftTop(v,h)}}}return q},remove:function(){this.hideUnders();this.callParent()},beginUpdate:function(){this.updating=true},endUpdate:function(){this.updating=false;this.sync(true)},hideUnders:function(){if(this.shadow){this.shadow.hide()}this.hideShim()},constrainXY:function(){if(this.constrain){var o=Ext.Element.getViewWidth(),s=Ext.Element.getViewHeight(),h=Ext.getDoc().getScroll(),l=this.getXY(),n=l[0],p=l[1],t=this.shadowOffset,m=this.dom.offsetWidth+t,r=this.dom.offsetHeight+t,q=false;if((n+m)>o+h.left){n=o-m-t;q=true}if((p+r)>s+h.top){p=s-r-t;q=true}if(n<h.left){n=h.left;q=true}if(p<h.top){p=h.top;q=true}if(q){Ext.Layer.superclass.setXY.call(this,[n,p]);this.sync()}}return this},getConstrainOffset:function(){return this.shadowOffset},setVisible:function(l,h,m,j,k){var n=this,i;i=function(){if(l){n.sync(true)}if(j){j()}};if(!l){n.hideUnders(true)}n.callParent([l,h,m,j,k]);if(!h){i()}return n},beforeFx:function(){this.beforeAction();return this.callParent(arguments)},afterFx:function(){this.callParent(arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(b){this.callParent(arguments);return this.sync()},setTop:function(b){this.callParent(arguments);return this.sync()},setLeftTop:function(c,d){this.callParent(arguments);return this.sync()},setXY:function(k,h,l,i,j){var g=this;i=g.createCB(i);g.fixDisplay();g.beforeAction();g.callParent([k,h,l,i,j]);if(!h){i()}return g},createCB:function(f){var e=this,d=e.shadow&&e.shadow.isVisible();return function(){e.constrainXY();e.sync(d);if(f){f()}}},setX:function(g,f,j,h,i){this.setXY([g,this.getY()],f,j,h,i);return this},setY:function(h,g,f,i,j){this.setXY([this.getX(),h],g,f,i,j);return this},setSize:function(i,n,h,l,j,k){var m=this;j=m.createCB(j);m.beforeAction();m.callParent([i,n,h,l,j,k]);if(!h){j()}return m},setWidth:function(h,g,k,i,j){var l=this;i=l.createCB(i);l.beforeAction();l.callParent([h,g,k,i,j]);if(!g){i()}return l},setHeight:function(g,h,k,i,j){var l=this;i=l.createCB(i);l.beforeAction();l.callParent([g,h,k,i,j]);if(!h){i()}return l},setBounds:function(l,m,r,j,q,p,k,o){var n=this;k=n.createCB(k);n.beforeAction();if(!q){Ext.Layer.superclass.setXY.call(n,[l,m]);Ext.Layer.superclass.setSize.call(n,r,j);k()}else{n.callParent([l,m,r,j,q,p,k,o])}return n},setZIndex:function(d){var c=this;c.zindex=d;if(c.getShim()){c.shim.setStyle("z-index",d++)}if(c.shadow){c.shadow.setZIndex(d++)}return c.setStyle("z-index",d)},onOpacitySet:function(d){var c=this.shadow;if(c){c.setOpacity(d)}}});Ext.define("Ext.data.Batch",{mixins:{observable:"Ext.util.Observable"},autoStart:false,pauseOnException:false,current:-1,total:0,isRunning:false,isComplete:false,hasException:false,constructor:function(d){var c=this;c.mixins.observable.constructor.call(c,d);c.operations=[];c.exceptions=[]},add:function(b){this.total++;b.setBatch(this);this.operations.push(b);return this},start:function(d){var c=this;if(c.isRunning){return c}c.exceptions.length=0;c.hasException=false;c.isRunning=true;return c.runOperation(Ext.isDefined(d)?d:c.current+1)},retry:function(){return this.start(this.current)},runNextOperation:function(){return this.runOperation(this.current+1)},pause:function(){this.isRunning=false;return this},runOperation:function(i){var h=this,j=h.operations,f=j[i],g;if(f===undefined){h.isRunning=false;h.isComplete=true;h.fireEvent("complete",h,j[j.length-1])}else{h.current=i;g=function(b){var a=b.hasException();if(a){h.hasException=true;h.exceptions.push(b);h.fireEvent("exception",h,b)}if(a&&h.pauseOnException){h.pause()}else{b.setCompleted();h.fireEvent("operationcomplete",h,b);h.runNextOperation()}};f.setStarted();h.proxy[f.action](f,g,h)}return h}});Ext.define("Ext.data.Request",{action:undefined,params:undefined,method:"GET",url:undefined,constructor:function(b){Ext.apply(this,b)}});Ext.define("Ext.view.DragZone",{extend:"Ext.dd.DragZone",containerScroll:false,constructor:function(d){var c=this;Ext.apply(c,d);if(!c.ddGroup){c.ddGroup="view-dd-zone-"+c.view.id}c.callParent([c.view.el.dom.parentNode]);c.ddel=Ext.get(document.createElement("div"));c.ddel.addCls(Ext.baseCSSPrefix+"grid-dd-wrap")},init:function(f,e,d){this.initTarget(f,e,d);this.view.mon(this.view,{itemmousedown:this.onItemMouseDown,scope:this})},onItemMouseDown:function(e,g,i,j,h){if(!this.isPreventDrag(h,g,i,j)){this.handleMouseDown(h);if(e.getSelectionModel().selectionMode=="MULTI"&&!h.ctrlKey&&e.getSelectionModel().isSelected(g)){return false}}},isPreventDrag:function(b){return false},getDragData:function(f){var e=this.view,d=f.getTarget(e.getItemSelector());if(d){return{copy:e.copy||(e.allowCopy&&f.ctrlKey),event:new Ext.EventObjectImpl(f),view:e,ddel:this.ddel,item:d,records:e.getSelectionModel().getSelection(),fromPosition:Ext.fly(d).getXY()}}},onInitDrag:function(e,k){var n=this,m=n.dragData,o=m.view,j=o.getSelectionModel(),p=o.getRecord(m.item),l=m.event;if(!j.isSelected(p)||l.hasModifier()){j.selectWithEvent(p,l,true)}m.records=j.getSelection();n.ddel.update(n.getDragText());n.proxy.update(n.ddel.dom);n.onStartDrag(e,k);return true},getDragText:function(){var b=this.dragData.records.length;return Ext.String.format(this.dragText,b,b==1?"":"s")},getRepairXY:function(c,d){return d?d.fromPosition:false}});Ext.define("Ext.util.CSS",(function(){var g=null,h=document,e=/(-[a-z])/gi,f=function(b,a){return a.charAt(1).toUpperCase()};return{singleton:true,constructor:function(){this.rules={};this.initialized=false},createStyleSheet:function(d,a){var l,m=h.getElementsByTagName("head")[0],b=h.createElement("style");b.setAttribute("type","text/css");if(a){b.setAttribute("id",a)}if(Ext.isIE){m.appendChild(b);l=b.styleSheet;l.cssText=d}else{try{b.appendChild(h.createTextNode(d))}catch(c){b.cssText=d}m.appendChild(b);l=b.styleSheet?b.styleSheet:(b.sheet||h.styleSheets[h.styleSheets.length-1])}this.cacheStyleSheet(l);return l},removeStyleSheet:function(a){var b=document.getElementById(a);if(b){b.parentNode.removeChild(b)}},swapStyleSheet:function(a,d){var b=document,c;this.removeStyleSheet(a);c=b.createElement("link");c.setAttribute("rel","stylesheet");c.setAttribute("type","text/css");c.setAttribute("id",a);c.setAttribute("href",d);b.getElementsByTagName("head")[0].appendChild(c)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(c){if(!g){g={}}try{var o=c.cssRules||c.rules,b,d=o.length-1,j,i;for(;d>=0;--d){b=o[d].selectorText;if(b){b=b.split(",");i=b.length;for(j=0;j<i;j++){g[Ext.String.trim(b[j]).toLowerCase()]=o[d]}}}}catch(a){}},getRules:function(d){if(g===null||d){g={};var b=h.styleSheets,c=0,i=b.length;for(;c<i;c++){try{if(!b[c].disabled){this.cacheStyleSheet(b[c])}}catch(a){}}}return g},getRule:function(d,b){var c=this.getRules(b),a;if(!Ext.isArray(d)){return c[d.toLowerCase()]}for(a=0;a<d.length;a++){if(c[d[a]]){return c[d[a].toLowerCase()]}}return null},updateRule:function(i,b,c){var a,d;if(!Ext.isArray(i)){a=this.getRule(i);if(a){a.style[b.replace(e,f)]=c;return true}}else{for(d=0;d<i.length;d++){if(this.updateRule(i[d],b,c)){return true}}}return false}}}()));Ext.define("Ext.PluginManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.PluginMgr",singleton:true,typeName:"ptype",create:function(d,c){if(d.init){return d}else{return Ext.createByAlias("plugin."+(d.ptype||c),d)}},findByType:function(l,i){var j=[],g=this.types,h,k;for(h in g){if(!g.hasOwnProperty(h)){continue}k=g[h];if(k.type==l&&(!i||(i===true&&k.isDefault))){j.push(k)}}return j}},function(){Ext.preg=function(){return Ext.PluginManager.registerType.apply(Ext.PluginManager,arguments)}});Ext.define("Ext.resizer.Resizer",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.resizer.ResizeTracker","Ext.Component"],alternateClassName:"Ext.Resizable",handleCls:Ext.baseCSSPrefix+"resizable-handle",pinnedCls:Ext.baseCSSPrefix+"resizable-pinned",overCls:Ext.baseCSSPrefix+"resizable-over",wrapCls:Ext.baseCSSPrefix+"resizable-wrap",dynamic:true,handles:"s e se",height:null,width:null,heightIncrement:0,widthIncrement:0,minHeight:20,minWidth:20,maxHeight:10000,maxWidth:10000,pinned:false,preserveRatio:false,transparent:false,possiblePositions:{n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"},constructor:function(C){var v=this,w,r,i,q=v.handles,B,s,y,A=0,t,u=[],x,D,z;v.addEvents("beforeresize","resizedrag","resize");if(Ext.isString(C)||Ext.isElement(C)||C.dom){w=C;C=arguments[1]||{};C.target=w}v.mixins.observable.constructor.call(v,C);w=v.target;if(w){if(w.isComponent){v.el=w.getEl();if(w.minWidth){v.minWidth=w.minWidth}if(w.minHeight){v.minHeight=w.minHeight}if(w.maxWidth){v.maxWidth=w.maxWidth}if(w.maxHeight){v.maxHeight=w.maxHeight}if(w.floating){if(!v.hasOwnProperty("handles")){v.handles="n ne e se s sw w nw"}}}else{v.el=v.target=Ext.get(w)}}else{v.target=v.el=Ext.get(v.el)}i=v.el.dom.tagName;if(i=="TEXTAREA"||i=="IMG"||i=="TABLE"){v.originalTarget=v.target;r=v.el;z=r.getBox();v.target=v.el=v.el.wrap({cls:v.wrapCls,id:v.el.id+"-rzwrap",style:r.getStyles("margin-top","margin-bottom")});v.el.setPositioning(r.getPositioning());r.clearPositioning();v.el.setBox(z);r.setStyle("position","absolute")}v.el.position();if(v.pinned){v.el.addCls(v.pinnedCls)}v.resizeTracker=new Ext.resizer.ResizeTracker({disabled:v.disabled,target:v.target,constrainTo:v.constrainTo,overCls:v.overCls,throttle:v.throttle,originalTarget:v.originalTarget,delegate:"."+v.handleCls,dynamic:v.dynamic,preserveRatio:v.preserveRatio,heightIncrement:v.heightIncrement,widthIncrement:v.widthIncrement,minHeight:v.minHeight,maxHeight:v.maxHeight,minWidth:v.minWidth,maxWidth:v.maxWidth});v.resizeTracker.on({mousedown:v.onBeforeResize,drag:v.onResize,dragend:v.onResizeEnd,scope:v});if(v.handles=="all"){v.handles="n s e w ne nw se sw"}q=v.handles=v.handles.split(/ |\s*?[,;]\s*?/);s=v.possiblePositions;y=q.length;B=v.handleCls+" "+(v.target.isComponent?(v.target.baseCls+"-handle "):"")+v.handleCls+"-";if(Ext.isIE6){x=' style="height:'+v.el.getHeight()+'px"'}for(;A<y;A++){if(q[A]&&s[q[A]]){t=s[q[A]];if(t==="east"||t==="west"){D=x}else{D=""}u.push('<div id="'+v.el.id+"-"+t+'-handle" class="'+B+t+" "+Ext.baseCSSPrefix+'unselectable"'+D+"></div>")}}Ext.DomHelper.append(v.el,u.join(""));for(A=0;A<y;A++){if(q[A]&&s[q[A]]){t=s[q[A]];v[t]=v.el.getById(v.el.id+"-"+t+"-handle");v[t].region=t;v[t].unselectable();if(v.transparent){v[t].setOpacity(0)}}}if(Ext.isNumber(v.width)){v.width=Ext.Number.constrain(v.width,v.minWidth,v.maxWidth)}if(Ext.isNumber(v.height)){v.height=Ext.Number.constrain(v.height,v.minHeight,v.maxHeight)}if(v.width!==null||v.height!==null){if(v.originalTarget){v.originalTarget.setWidth(v.width);v.originalTarget.setHeight(v.height)}v.resizeTo(v.width,v.height)}v.forceHandlesHeight()},disable:function(){this.resizeTracker.disable()},enable:function(){this.resizeTracker.enable()},onBeforeResize:function(d,f){var e=this.el.getBox();return this.fireEvent("beforeresize",this,e.width,e.height,f)},onResize:function(h,g){var e=this,f=e.el.getBox();e.forceHandlesHeight();return e.fireEvent("resizedrag",e,f.width,f.height,g)},onResizeEnd:function(h,g){var e=this,f=e.el.getBox();e.forceHandlesHeight();return e.fireEvent("resize",e,f.width,f.height,g)},resizeTo:function(d,e){var f=this;f.target.setSize(d,e);f.fireEvent("resize",f,d,e,null)},getEl:function(){return this.el},getTarget:function(){return this.target},destroy:function(){var g=0,h=this.handles,f=h.length,e=this.possiblePositions;for(;g<f;g++){this[e[h[g]]].remove()}},forceHandlesHeight:function(){var d=this,c;if(Ext.isIE6){c=d.east;if(c){c.setHeight(d.el.getHeight())}c=d.west;if(c){c.setHeight(d.el.getHeight())}d.el.repaint()}}});Ext.define("Ext.util.ComponentDragger",{extend:"Ext.dd.DragTracker",autoStart:500,constructor:function(d,c){this.comp=d;this.initialConstrainTo=c.constrainTo;this.callParent([c])},onStart:function(f){var d=this,e=d.comp;this.startPosition=e.el.getXY();if(e.ghost&&!e.liveDrag){d.proxy=e.ghost();d.dragTarget=d.proxy.header.el}if(d.constrain||d.constrainDelegate){d.constrainTo=d.calculateConstrainRegion()}if(e.beginDrag){e.beginDrag()}},calculateConstrainRegion:function(){var l=this,h=l.comp,i=l.initialConstrainTo,k,j,c=h.el.shadow?h.el.shadow.offset:0;if(!(i instanceof Ext.util.Region)){i=Ext.fly(i).getViewRegion()}if(c){i.adjust(0,-c,-c,c)}if(!l.constrainDelegate){k=Ext.fly(l.dragTarget).getRegion();j=l.proxy?l.proxy.el.getRegion():h.el.getRegion();i.adjust(k.top-j.top,k.right-j.right,k.bottom-j.bottom,k.left-j.left)}return i},onDrag:function(h){var e=this,f=(e.proxy&&!e.comp.liveDrag)?e.proxy:e.comp,g=e.getOffset(e.constrain||e.constrainDelegate?"dragTarget":null);f.setPagePosition(e.startPosition[0]+g[0],e.startPosition[1]+g[1])},onEnd:function(c){var d=this.comp;if(this.proxy&&!d.liveDrag){d.unghost()}if(d.endDrag){d.endDrag()}}});Ext.define("Ext.resizer.SplitterTracker",{extend:"Ext.dd.DragTracker",requires:["Ext.util.Region"],enabled:true,overlayCls:Ext.baseCSSPrefix+"resizable-overlay",createDragOverlay:function(){var b;b=this.overlay=Ext.getBody().createChild({cls:this.overlayCls,html:" "});b.unselectable();b.setSize(Ext.Element.getViewWidth(true),Ext.Element.getViewHeight(true));b.show()},getPrevCmp:function(){var b=this.getSplitter();return b.previousSibling()},getNextCmp:function(){var b=this.getSplitter();return b.nextSibling()},onBeforeStart:function(j){var m=this,l=m.getPrevCmp(),i=m.getNextCmp(),n=m.getSplitter().collapseEl,k=j.getTarget(),e;if(n&&k===m.getSplitter().collapseEl.dom){return false}if(i.collapsed||l.collapsed){return false}m.prevBox=l.getEl().getBox();m.nextBox=i.getEl().getBox();m.constrainTo=e=m.calculateConstrainRegion();if(!e){return false}m.createDragOverlay();return e},onStart:function(c){var d=this.getSplitter();d.addCls(d.baseCls+"-active")},calculateConstrainRegion:function(){var q=this,v=q.getSplitter(),p=v.getWidth(),o=v.defaultSplitMin,u=v.orientation,s=q.prevBox,n=q.getPrevCmp(),t=q.nextBox,r=q.getNextCmp(),l,m;if(u==="vertical"){l=new Ext.util.Region(s.y,(n.maxWidth?s.x+n.maxWidth:t.right-(r.minWidth||o))+p,s.bottom,s.x+(n.minWidth||o));m=new Ext.util.Region(t.y,t.right-(r.minWidth||o),t.bottom,(r.maxWidth?t.right-r.maxWidth:s.x+(s.minWidth||o))-p)}else{l=new Ext.util.Region(s.y+(n.minHeight||o),s.right,(n.maxHeight?s.y+n.maxHeight:t.bottom-(r.minHeight||o))+p,s.x);m=new Ext.util.Region((r.maxHeight?t.bottom-r.maxHeight:s.y+(n.minHeight||o))-p,t.right,t.bottom-(r.minHeight||o),t.x)}return l.intersect(m)},performResize:function(s,x){var q=this,B=q.getSplitter(),w=B.orientation,i=q.getPrevCmp(),r=q.getNextCmp(),A=B.ownerCt,u=A.query(">[flex]"),t=u.length,v=0,y,e,z=0;for(;v<t;v++){e=u[v].getWidth();z+=e;u[v].flex=e}x=x||q.getOffset("dragTarget");if(w==="vertical"){x=x[0];y="width"}else{y="height";x=x[1]}if(i){e=q.prevBox[y]+x;if(i.flex){i.flex=e}else{i[y]=e}}if(r){e=q.nextBox[y]-x;if(r.flex){r.flex=e}else{r[y]=e}}A.updateLayout()},endDrag:function(){var b=this;if(b.overlay){b.overlay.remove();delete b.overlay}b.callParent(arguments)},onEnd:function(f){var e=this,d=e.getSplitter();d.removeCls(d.baseCls+"-active");e.performResize(f,e.getOffset("dragTarget"))},onDrag:function(j){var l=this,i=l.getOffset("dragTarget"),k=l.getSplitter(),e=k.getEl(),h=k.orientation;if(h==="vertical"){e.setX(l.startRegion.left+i[0])}else{e.setY(l.startRegion.top+i[1])}},getSplitter:function(){return this.splitter}});Ext.define("Ext.resizer.BorderSplitterTracker",{extend:"Ext.resizer.SplitterTracker",requires:["Ext.util.Region"],getPrevCmp:null,getNextCmp:null,calculateConstrainRegion:function(){var i=this,T=i.splitter,H=T.collapseTarget,Q=T.defaultSplitMin,N=T.vertical?"Width":"Height",R="min"+N,B="max"+N,M="get"+N,C=T.neighbors,P=C.length,I=H.el.getBox(),O=I.x,G=I.y,y=I.right,L=I.bottom,E=T.vertical?(y-O):(L-G),z,K,J,A,D,F,S;J=(H[R]||Math.min(E,Q))-E;A=H[B];if(!A){A=1000000000}else{A-=E}S=E;for(z=0;z<P;++z){K=C[z];E=K[M]();D=E-K[B];F=E-(K[R]||Math.min(E,Q));if(!isNaN(D)){if(J<D){J=D}}if(A>F){A=F}}if(A-J<2){return null}I=new Ext.util.Region(G,y,L,O);i.constraintAdjusters[T.collapseDirection](I,J,A,T);i.dragInfo={minRange:J,maxRange:A,targetSize:S};return I},constraintAdjusters:{left:function(h,f,e,g){h[0]=h.x=h.left=h.right+f;h.right+=e+g.getWidth()},top:function(h,f,e,g){h[1]=h.y=h.top=h.bottom+f;h.bottom+=e+g.getHeight()},bottom:function(h,f,e,g){h.bottom=h.top-f;h.top-=e+g.getHeight()},right:function(h,f,e,g){h.right=h.left-f;h.left-=e+g.getWidth()}},onBeforeStart:function(o){var m=this,s=m.splitter,t=s.collapseTarget,e=s.neighbors,q=m.getSplitter().collapseEl,n=o.getTarget(),r=e.length,p,i;if(q&&n===s.collapseEl.dom){return false}if(t.collapsed){return false}for(p=0;p<r;++p){i=e[p];if(i.collapsed&&i.isHorz===t.isHorz){return false}}if(!(m.constrainTo=m.calculateConstrainRegion())){return false}m.createDragOverlay();return true},performResize:function(m,n){var l=this,s=l.splitter,o=s.collapseDirection,t=s.collapseTarget,p=l.splitAdjusters[s.vertical?"horz":"vert"],e=n[p.index],q=l.dragInfo,r;if(o=="right"||o=="bottom"){e=-e}e=Math.min(Math.max(q.minRange,e),q.maxRange);if(e){(r=s.ownerCt).suspendLayouts();p.adjustTarget(t,q.targetSize,e);r.resumeLayouts(true)}},splitAdjusters:{horz:{index:0,adjustTarget:function(d,e,f){d.flex=null;d.setSize(e+f)}},vert:{index:1,adjustTarget:function(d,e,f){d.flex=null;d.setSize(undefined,e+f)}}}});Ext.define("Ext.panel.Tool",{extend:"Ext.Component",requires:["Ext.tip.QuickTipManager"],alias:"widget.tool",baseCls:Ext.baseCSSPrefix+"tool",disabledCls:Ext.baseCSSPrefix+"tool-disabled",toolPressedCls:Ext.baseCSSPrefix+"tool-pressed",toolOverCls:Ext.baseCSSPrefix+"tool-over",ariaRole:"button",childEls:["toolEl"],renderTpl:['<img id="{id}-toolEl" src="{blank}" class="{baseCls}-{type}" role="presentation"/>'],tooltipType:"qtip",stopEvent:true,height:15,width:15,_toolTypes:{close:1,collapse:1,down:1,expand:1,gear:1,help:1,left:1,maximize:1,minimize:1,minus:1,next:1,pin:1,plus:1,prev:1,print:1,refresh:1,restore:1,right:1,save:1,search:1,toggle:1,unpin:1,up:1},initComponent:function(){var b=this;b.addEvents("click");if(b.id&&b._toolTypes[b.id]&&Ext.global.console){Ext.global.console.warn("When specifying a tool you should use the type option, the id can conflict now that tool is a Component")}b.type=b.type||b.id;Ext.applyIf(b.renderData,{baseCls:b.baseCls,blank:Ext.BLANK_IMAGE_URL,type:b.type});b.tooltip=b.tooltip||b.qtip;b.callParent();b.on({element:"toolEl",click:b.onClick,mousedown:b.onMouseDown,mouseover:b.onMouseOver,mouseout:b.onMouseOut,scope:b})},afterRender:function(){var c=this,d;c.callParent(arguments);if(c.tooltip){if(Ext.isObject(c.tooltip)){Ext.tip.QuickTipManager.register(Ext.apply({target:c.id},c.tooltip))}else{d=c.tooltipType=="qtip"?"data-qtip":"title";c.toolEl.dom.setAttribute(d,c.tooltip)}}},getFocusEl:function(){return this.el},setType:function(d){var c=this;c.type=d;if(c.rendered){c.toolEl.dom.className=c.baseCls+"-"+d}return c},bindTo:function(b){this.owner=b},onClick:function(g,h){var e=this,f;if(e.disabled){return false}f=e.owner||e.ownerCt;e.el.removeCls(e.toolPressedCls);e.el.removeCls(e.toolOverCls);if(e.stopEvent!==false){g.stopEvent()}Ext.callback(e.handler,e.scope||e,[g,h,f,e]);e.fireEvent("click",e,g);return true},onDestroy:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.id)}this.callParent()},onMouseDown:function(){if(this.disabled){return false}this.el.addCls(this.toolPressedCls)},onMouseOver:function(){if(this.disabled){return false}this.el.addCls(this.toolOverCls)},onMouseOut:function(){this.el.removeCls(this.toolOverCls)}});Ext.define("Ext.layout.component.Body",{alias:["layout.body"],extend:"Ext.layout.component.Auto",type:"body",beginLayout:function(b){this.callParent(arguments);b.bodyContext=b.getEl("body")},calculateOwnerHeightFromContentHeight:function(f,d){var e=this.callParent(arguments);if(f.targetContext!=f){e+=f.getPaddingInfo().height}return e},calculateOwnerWidthFromContentWidth:function(f,e){var d=this.callParent(arguments);if(f.targetContext!=f){d+=f.getPaddingInfo().width}return d},measureContentWidth:function(b){return b.bodyContext.setWidth(b.bodyContext.el.dom.offsetWidth,false)},measureContentHeight:function(b){return b.bodyContext.setHeight(b.bodyContext.el.dom.offsetHeight,false)},publishInnerHeight:function(h,f){var g=f-h.getFrameInfo().height,e=h.targetContext;if(e!=h){g-=h.getPaddingInfo().height}h.bodyContext.setHeight(g,!h.heightModel.natural)},publishInnerWidth:function(g,h){var f=h-g.getFrameInfo().width,e=g.targetContext;if(e!=g){f-=g.getPaddingInfo().width}g.bodyContext.setWidth(f,!g.widthModel.natural)}});Ext.define("Ext.Img",{extend:"Ext.Component",alias:["widget.image","widget.imagecomponent"],autoEl:"img",src:"",alt:"",imgCls:"",getElConfig:function(){var f=this,d=f.callParent(),e;if(f.autoEl=="img"){e=d}else{d.cn=[e={tag:"img",id:f.id+"-img"}]}if(f.imgCls){e.cls=(e.cls?e.cls+" ":"")+f.imgCls}e.src=f.src||Ext.BLANK_IMAGE_URL;if(f.alt){e.alt=f.alt}return d},onRender:function(){var c=this,d;c.callParent(arguments);d=c.el;c.imgEl=(c.autoEl=="img")?d:d.getById(c.id+"-img")},onDestroy:function(){Ext.destroy(this.imgEl);this.imgEl=null;this.callParent()},setSrc:function(f){var e=this,d=e.imgEl;e.src=f;if(d){d.dom.src=f||Ext.BLANK_IMAGE_URL}}});Ext.define("Ext.util.Grouper",{extend:"Ext.util.Sorter",getGroupString:function(b){return b.get(this.property)}});Ext.define("Ext.view.TableChunker",{singleton:true,requires:["Ext.XTemplate"],metaTableTpl:["{%if (this.openTableWrap)out.push(this.openTableWrap())%}",'<table class="'+Ext.baseCSSPrefix+"grid-table "+Ext.baseCSSPrefix+'grid-table-resizer" border="0" cellspacing="0" cellpadding="0" {[this.embedFullWidth(values)]}>',"<tbody>",'<tr class="'+Ext.baseCSSPrefix+'grid-header-row">','<tpl for="columns">','<th class="'+Ext.baseCSSPrefix+'grid-col-resizer-{id}" style="width: {width}px; height: 0px;"></th>',"</tpl>","</tr>","{[this.openRows()]}","{row}",'<tpl for="features">',"{[this.embedFeature(values, parent, xindex, xcount)]}","</tpl>","{[this.closeRows()]}","</tbody>","</table>","{%if (this.closeTableWrap)out.push(this.closeTableWrap())%}"],constructor:function(){Ext.XTemplate.prototype.recurse=function(c,d){return this.apply(d?c[d]:c)}},embedFeature:function(f,i,g,h){var j="";if(!f.disabled){j=f.getFeatureTpl(f,i,g,h)}return j},embedFullWidth:function(c){var d='style="width:{fullWidth}px;';if(!c.rowCount){d+="height:1px;"}return d+'"'},openRows:function(){return'<tpl for="rows">'},closeRows:function(){return"</tpl>"},metaRowTpl:['<tr class="'+Ext.baseCSSPrefix+'grid-row {[this.embedRowCls()]}" {[this.embedRowAttr()]}>','<tpl for="columns">','<td class="{cls} '+Ext.baseCSSPrefix+"grid-cell "+Ext.baseCSSPrefix+'grid-cell-{columnId} {{id}-modified} {{id}-tdCls} {[this.firstOrLastCls(xindex, xcount)]}" {{id}-tdAttr}>','<div {unselectableAttr} class="'+Ext.baseCSSPrefix+'grid-cell-inner {unselectableCls}" style="text-align: {align}; {{id}-style};">{{id}}</div>',"</td>","</tpl>","</tr>"],firstOrLastCls:function(d,c){if(d===1){return Ext.view.Table.prototype.firstCls}else{if(d===c){return Ext.view.Table.prototype.lastCls}}},embedRowCls:function(){return"{rowCls}"},embedRowAttr:function(){return"{rowAttr}"},openTableWrap:undefined,closeTableWrap:undefined,getTableTpl:function(n,u){var o,p={openRows:this.openRows,closeRows:this.closeRows,embedFeature:this.embedFeature,embedFullWidth:this.embedFullWidth,openTableWrap:this.openTableWrap,closeTableWrap:this.closeTableWrap},q={},t=n.features||[],i=t.length,r=0,m={embedRowCls:this.embedRowCls,embedRowAttr:this.embedRowAttr,firstOrLastCls:this.firstOrLastCls,unselectableAttr:n.enableTextSelection?"":'unselectable="on"',unselectableCls:n.enableTextSelection?"":Ext.baseCSSPrefix+"unselectable"},s=Array.prototype.slice.call(this.metaRowTpl,0),v;for(;r<i;r++){if(!t[r].disabled){t[r].mutateMetaRowTpl(s);Ext.apply(m,t[r].getMetaRowTplFragments());Ext.apply(q,t[r].getFragmentTpl());Ext.apply(p,t[r].getTableFragments())}}s=new Ext.XTemplate(s.join(""),m);n.row=s.applyTemplate(n);v=new Ext.XTemplate(this.metaTableTpl.join(""),p);o=v.applyTemplate(n);if(!u){o=new Ext.XTemplate(o,q)}return o}});Ext.define("Ext.grid.PagingScroller",{percentageFromEdge:0.35,numFromEdge:2,trailingBufferZone:5,leadingBufferZone:15,scrollToLoadBuffer:200,viewSize:0,rowHeight:21,tableStart:0,tableEnd:0,constructor:function(d){var c=this;c.variableRowHeight=d.variableRowHeight;c.bindView(d.view);Ext.apply(c,d);c.callParent(arguments)},bindView:function(f){var h=this,i={scroll:{fn:h.onViewScroll,element:"el",scope:h},render:h.onViewRender,resize:h.onViewResize,boxready:{fn:h.onViewResize,scope:h,single:true},refresh:h.onViewRefresh,scope:h},g={guaranteedrange:h.onGuaranteedRange,scope:h},j={reconfigure:h.onGridReconfigure,scope:h};if(h.variableRowHeight){i.beforerefresh=h.beforeViewRefresh}if(h.view){h.view.el.un("scroll",h.onViewScroll,h);h.view.un(i);h.store.un(g);if(h.grid){h.grid.un(j)}delete h.view.refreshSize}h.view=f;h.grid=h.view.up("tablepanel");h.store=f.store;if(f.rendered){h.viewSize=h.store.viewSize=Math.ceil(f.getHeight()/h.rowHeight)+h.trailingBufferZone+(h.numFromEdge*2)+h.leadingBufferZone}h.view.refreshSize=Ext.Function.createInterceptor(h.view.refreshSize,h.beforeViewrefreshSize,h);h.position=0;if(h.grid){h.grid.on(j)}else{h.view.on({added:function(){h.grid=h.view.up("tablepanel");h.grid.on(j)},single:true})}h.view.on(h.viewListeners=i);h.store.on(g)},onGridReconfigure:function(b){this.bindView(b.view)},onViewRender:function(){var c=this,d=c.view.el;d.setStyle("position","relative");c.stretcher=d.createChild({style:{position:"absolute",width:"1px",height:0,top:0,left:0}},d.dom.firstChild)},onViewResize:function(f,i,g){var h=this,j;j=Math.ceil(g/h.rowHeight)+h.trailingBufferZone+(h.numFromEdge*2)+h.leadingBufferZone;if(j>h.viewSize){h.viewSize=h.store.viewSize=j;h.handleViewScroll(h.lastScrollDirection||1)}},beforeViewRefresh:function(){var j=this,g=j.view,i,f=j.store,h=j.lastScrollDirection;j.commonRecordIndex=undefined;if(h&&(j.previousStart!==undefined)&&(j.scrollProportion===undefined)){i=g.getNodes();if(h===1){if(j.tableStart<=j.previousEnd){j.commonRecordIndex=i.length-1}}else{if(h===-1){if(j.tableEnd>=j.previousStart){j.commonRecordIndex=0}}}j.scrollOffset=-g.el.getOffsetsTo(i[j.commonRecordIndex])[1];j.commonRecordIndex-=(j.tableStart-j.previousStart)}else{j.scrollOffset=undefined}},onViewRefresh:function(){var u=this,s=u.store,v,t=u.view,p=t.el,o=p.dom,m,q,w,n,r,x;if(!s.getCount()){return}if(s.getCount()===s.getTotalCount()||(s.isFiltered()&&!s.remoteFilter)){u.stretcher.setHeight(0);return(u.disabled=true)}else{u.disabled=false}u.stretcher.setHeight(v=u.getScrollHeight());x=o.scrollTop;u.isScrollRefresh=(x>0);if(u.scrollProportion!==undefined){n=u.viewEl.child("table",true);u.scrollProportion=x/(v-n.offsetHeight);n=u.viewEl.child("table",true);n.style.position="absolute";n.style.top=(u.scrollProportion?(v*u.scrollProportion)-(n.offsetHeight*u.scrollProportion):0)+"px"}else{n=p.child("table",true);n.style.position="absolute";n.style.top=(r=(u.tableStart||0)*u.rowHeight)+"px";if(u.scrollOffset){m=t.getNodes();q=-p.getOffsetsTo(m[u.commonRecordIndex])[1];w=q-u.scrollOffset;u.position=(x+=w)}else{if((r>x)||((r+n.offsetHeight)<x+o.clientHeight)){u.position=o.scrollTop=r}}}},beforeViewrefreshSize:function(){if(this.isScrollRefresh){return(this.isScrollRefresh=false)}},onGuaranteedRange:function(f,h,g){var j=this,i=j.store;if(f.length&&j.visibleStart<f[0].index){return}j.previousStart=j.tableStart;j.previousEnd=j.tableEnd;j.tableStart=h;j.tableEnd=g;i.loadRecords(f)},onViewScroll:function(h,j){var i=this,g=i.view,e=i.position;i.position=g.el.dom.scrollTop;if(!i.disabled){i.lastScrollDirection=i.position>e?1:-1;if(e!==i.position){i.handleViewScroll(i.lastScrollDirection)}}},handleViewScroll:function(p){var s=this,n=s.store,q=s.view,r=s.viewSize,m=n.getTotalCount(),t=m-r,u=s.getFirstVisibleRowIndex(),o=s.getLastVisibleRowIndex(),v,l;if(m>=r){s.scrollProportion=undefined;if(p==-1){if(u!==undefined){if(u<(s.tableStart+s.numFromEdge)){v=Math.max(0,o+s.trailingBufferZone-r)}}else{s.scrollProportion=q.el.dom.scrollTop/(q.el.dom.scrollHeight-q.el.dom.clientHeight);v=Math.max(0,m*s.scrollProportion-(r/2)-s.numFromEdge-((s.leadingBufferZone+s.trailingBufferZone)/2))}}else{if(u!==undefined){if(o>(s.tableEnd-s.numFromEdge)){v=Math.max(0,u-s.trailingBufferZone)}}else{s.scrollProportion=q.el.dom.scrollTop/(q.el.dom.scrollHeight-q.el.dom.clientHeight);v=m*s.scrollProportion-(r/2)-s.numFromEdge-((s.leadingBufferZone+s.trailingBufferZone)/2)}}if(v!==undefined){if(v>t){v=t&~1;l=m-1}else{v=v&~1;l=v+r-1}if(n.rangeCached(v,l)){s.cancelLoad();n.guaranteeRange(v,l)}else{s.attemptLoad(v,l)}}}},getFirstVisibleRowIndex:function(){var n=this,i=n.store,j=n.view,k=j.el.dom.scrollTop,m,o,p,l;if(n.variableRowHeight){m=j.getNodes();o=i.getCount();for(p=0;p<o;p++){l=Ext.fly(m[p]).getOffsetsTo(j.el)[1]+m[p].offsetHeight;if(l>j.el.dom.clientHeight){return}if(l>0){return p+n.tableStart}}}else{return Math.floor(k/n.rowHeight)}},getLastVisibleRowIndex:function(){var l=this,p=l.store,j=l.view,i=j.el.dom.clientHeight,k,m,n,o;if(l.variableRowHeight){k=j.getNodes();m=p.getCount();for(n=m-1;n>=0;n--){o=Ext.fly(k[n]).getOffsetsTo(j.el)[1];if(o<0){return}if(o<i){return n+l.tableStart}}}else{return l.getFirstVisibleRowIndex()+Math.ceil(i/l.rowHeight)+1}},getScrollHeight:function(){var m=this,j=m.view,n,k,p=m.store,i,l=0,o=!m.hasOwnProperty("rowHeight");if(m.variableRowHeight){n=m.view.el.down("table",true);if(o){m.initialTableHeight=n.offsetHeight;m.rowHeight=m.initialTableHeight/m.store.getCount()}else{l=n.offsetHeight-m.initialTableHeight}}else{if(o){k=j.el.down(j.getItemSelector());if(k){m.rowHeight=k.getHeight(false,true)}}}return Math.floor(p.getTotalCount()*m.rowHeight)+l},attemptLoad:function(f,e){var d=this;if(d.scrollToLoadBuffer){if(!d.loadTask){d.loadTask=new Ext.util.DelayedTask(d.doAttemptLoad,d,[])}d.loadTask.delay(d.scrollToLoadBuffer,d.doAttemptLoad,d,[f,e])}else{d.store.guaranteeRange(f,e)}},cancelLoad:function(){if(this.loadTask){this.loadTask.cancel()}},doAttemptLoad:function(c,d){this.store.guaranteeRange(c,d)},destroy:function(){var c=this,d=c.viewListeners.scroll;c.store.un({guaranteedrange:c.onGuaranteedRange,scope:c});c.view.un(c.viewListeners);if(c.view.rendered){c.stretcher.remove();c.view.el.un("scroll",d.fn,d.scope)}}});Ext.define("Ext.util.History",{singleton:true,alternateClassName:"Ext.History",mixins:{observable:"Ext.util.Observable"},useTopWindow:true,fieldId:Ext.baseCSSPrefix+"history-field",iframeId:Ext.baseCSSPrefix+"history-frame",constructor:function(){var b=this;b.oldIEMode=Ext.isIE6||Ext.isIE7||!Ext.isStrict&&Ext.isIE8;b.iframe=null;b.hiddenField=null;b.ready=false;b.currentToken=null;b.mixins.observable.constructor.call(b)},getHash:function(){var d=window.location.href,c=d.indexOf("#");return c>=0?d.substr(c+1):null},setHash:function(g){var f=this,h=f.useTopWindow?window.top:window;try{h.location.hash=g}catch(e){}},doSave:function(){this.hiddenField.value=this.currentToken},handleStateChange:function(b){this.currentToken=b;this.fireEvent("change",b)},updateIFrame:function(e){var f='<html><body><div id="state">'+Ext.util.Format.htmlEncode(e)+"</div></body></html>",g;try{g=this.iframe.contentWindow.document;g.open();g.write(f);g.close();return true}catch(h){return false}},checkIFrame:function(){var k=this,g=k.iframe.contentWindow,j,l,h,i;if(!g||!g.document){Ext.Function.defer(this.checkIFrame,10,this);return}j=g.document;l=j.getElementById("state");h=l?l.innerText:null;i=k.getHash();Ext.TaskManager.start({run:function(){var a=g.document,b=a.getElementById("state"),d=b?b.innerText:null,c=k.getHash();if(d!==h){h=d;k.handleStateChange(d);k.setHash(d);i=d;k.doSave()}else{if(c!==i){i=c;k.updateIFrame(c)}}},interval:50,scope:k});k.ready=true;k.fireEvent("ready",k)},startUp:function(){var d=this,c;d.currentToken=d.hiddenField.value||this.getHash();if(d.oldIEMode){d.checkIFrame()}else{c=d.getHash();Ext.TaskManager.start({run:function(){var a=d.getHash();if(a!==c){c=a;d.handleStateChange(c);d.doSave()}},interval:50,scope:d});d.ready=true;d.fireEvent("ready",d)}},init:function(g,e){var h=this,f=Ext.DomHelper;if(h.ready){Ext.callback(g,e,[h]);return}if(!Ext.isReady){Ext.onReady(function(){h.init(g,e)});return}h.hiddenField=Ext.getDom(h.fieldId);if(!h.hiddenField){h.hiddenField=Ext.getBody().createChild({id:Ext.id(),tag:"form",cls:Ext.baseCSSPrefix+"hide-display",children:[{tag:"input",type:"hidden",id:h.fieldId}]},false,true).firstChild}if(h.oldIEMode){h.iframe=Ext.getDom(h.iframeId);if(!h.iframe){h.iframe=f.append(h.hiddenField.parentNode,{tag:"iframe",id:h.iframeId})}}h.addEvents("ready","change");if(g){h.on("ready",g,e,{single:true})}h.startUp()},add:function(e,f){var d=this;if(f!==false){if(d.getToken()===e){return true}}if(d.oldIEMode){return d.updateIFrame(e)}else{d.setHash(e);return true}},back:function(){window.history.go(-1)},forward:function(){window.history.go(1)},getToken:function(){return this.ready?this.currentToken:this.getHash()}});Ext.define("Ext.data.JsonP",{singleton:true,statics:{requestCount:0,requests:{}},timeout:30000,disableCaching:true,disableCachingParam:"_dc",callbackKey:"callback",request:function(n){n=Ext.apply({},n);if(!n.url){Ext.Error.raise("A url must be specified for a JSONP request.")}var r=this,w=Ext.isDefined(n.disableCaching)?n.disableCaching:r.disableCaching,t=n.disableCachingParam||r.disableCachingParam,x=++r.statics().requestCount,p=n.callbackName||"callback"+x,s=n.callbackKey||r.callbackKey,o=Ext.isDefined(n.timeout)?n.timeout:r.timeout,v=Ext.apply({},n.params),y=n.url,z=Ext.name,u,q;v[s]=z+".data.JsonP."+p;if(w){v[t]=new Date().getTime()}q=r.createScript(y,v,n);r.statics().requests[x]=u={url:y,params:v,script:q,id:x,scope:n.scope,success:n.success,failure:n.failure,callback:n.callback,callbackKey:s,callbackName:p};if(o>0){u.timeout=setTimeout(Ext.bind(r.handleTimeout,r,[u]),o)}r.setupErrorHandling(u);r[p]=Ext.bind(r.handleResponse,r,[u],true);r.loadScript(u);return u},abort:function(h){var e=this,g=e.statics().requests,f;if(h){if(!h.id){h=g[h]}e.handleAbort(h)}else{for(f in g){if(g.hasOwnProperty(f)){e.abort(g[f])}}}},setupErrorHandling:function(b){b.script.onerror=Ext.bind(this.handleError,this,[b])},handleAbort:function(b){b.errorType="abort";this.handleResponse(null,b)},handleError:function(b){b.errorType="error";this.handleResponse(null,b)},cleanupErrorHandling:function(b){b.script.onerror=null},handleTimeout:function(b){b.errorType="timeout";this.handleResponse(null,b)},handleResponse:function(e,d){var f=true;if(d.timeout){clearTimeout(d.timeout)}delete this[d.callbackName];delete this.statics().requests[d.id];this.cleanupErrorHandling(d);Ext.fly(d.script).remove();if(d.errorType){f=false;Ext.callback(d.failure,d.scope,[d.errorType])}else{Ext.callback(d.success,d.scope,[e])}Ext.callback(d.callback,d.scope,[f,e,d.errorType])},createScript:function(h,g,e){var f=document.createElement("script");f.setAttribute("src",Ext.urlAppend(h,Ext.Object.toQueryString(g)));f.setAttribute("async",true);f.setAttribute("type","text/javascript");return f},loadScript:function(b){Ext.getHead().appendChild(b.script)}});Ext.define("Ext.view.DropZone",{extend:"Ext.dd.DropZone",indicatorHtml:'<div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-left"></div><div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-right"></div>',indicatorCls:Ext.baseCSSPrefix+"grid-drop-indicator",constructor:function(d){var c=this;Ext.apply(c,d);if(!c.ddGroup){c.ddGroup="view-dd-zone-"+c.view.id}c.callParent([c.view.el])},fireViewEvent:function(){var c=this,d;c.lock();d=c.view.fireEvent.apply(c.view,arguments);c.unlock();return d},getTargetFromEvent:function(k){var l=k.getTarget(this.view.getItemSelector()),o,p,e,n,i,m;if(!l){o=k.getPageY();for(n=0,p=this.view.getNodes(),i=p.length;n<i;n++){e=p[n];m=Ext.fly(e).getBox();if(o<=m.bottom){return e}}}return l},getIndicator:function(){var b=this;if(!b.indicator){b.indicator=new Ext.Component({html:b.indicatorHtml,cls:b.indicatorCls,ownerCt:b.view,floating:true,shadow:false})}return b.indicator},getPosition:function(j,g){var h=j.getXY()[1],e=Ext.fly(g).getRegion(),i;if((e.bottom-h)>=(e.bottom-e.top)/2){i="before"}else{i="after"}return i},containsRecordAtOffset:function(m,h,k){if(!h){return false}var i=this.view,n=i.indexOf(h),l=i.getNode(n+k),j=l?i.getRecord(l):null;return j&&Ext.Array.contains(m,j)},positionIndicator:function(q,p,o){var n=this,l=n.view,m=n.getPosition(o,q),e=l.getRecord(q),r=p.records,k;if(!Ext.Array.contains(r,e)&&(m=="before"&&!n.containsRecordAtOffset(r,e,-1)||m=="after"&&!n.containsRecordAtOffset(r,e,1))){n.valid=true;if(n.overRecord!=e||n.currentPosition!=m){k=Ext.fly(q).getY()-l.el.getY()-1;if(m=="after"){k+=Ext.fly(q).getHeight()}n.getIndicator().setWidth(Ext.fly(l.el).getWidth()).showAt(0,k);n.overRecord=e;n.currentPosition=m}}else{n.invalidateDrop()}},invalidateDrop:function(){if(this.valid){this.valid=false;this.getIndicator().hide()}},onNodeOver:function(j,g,h,i){var e=this;if(!Ext.Array.contains(i.records,e.view.getRecord(j))){e.positionIndicator(j,i,h)}return e.valid?e.dropAllowed:e.dropNotAllowed},notifyOut:function(j,g,h,i){var e=this;e.callParent(arguments);delete e.overRecord;delete e.currentPosition;if(e.indicator){e.indicator.hide()}},onContainerOver:function(h,i,j){var k=this,e=k.view,l=e.store.getCount();if(l){k.positionIndicator(e.getNode(l-1),j,i)}else{delete k.overRecord;delete k.currentPosition;k.getIndicator().setWidth(Ext.fly(e.el).getWidth()).showAt(0,0);k.valid=true}return k.dropAllowed},onContainerDrop:function(e,f,d){return this.onNodeDrop(e,null,f,d)},onNodeDrop:function(n,j,l,m){var o=this,p=false,e={wait:false,processDrop:function(){o.invalidateDrop();o.handleNodeDrop(m,o.overRecord,o.currentPosition);p=true;o.fireViewEvent("drop",n,m,o.overRecord,o.currentPosition)},cancelDrop:function(){o.invalidateDrop();p=true}},k=false;if(o.valid){k=o.fireViewEvent("beforedrop",n,m,o.overRecord,o.currentPosition,e);if(e.wait){return}if(k!==false){if(!p){e.processDrop()}}}return k},destroy:function(){Ext.destroy(this.indicator);delete this.indicator;this.callParent()}});Ext.define("Ext.data.reader.Array",{extend:"Ext.data.reader.Json",alternateClassName:"Ext.data.ArrayReader",alias:"reader.array",totalProperty:undefined,successProperty:undefined,createFieldAccessExpression:function(i,l,g){var j=this,k=(i.mapping==null)?j.model.prototype.fields.indexOf(i):i.mapping,h;if(typeof k==="function"){h=l+".mapping("+g+", this)"}else{if(isNaN(k)){k='"'+k+'"'}h=g+"["+k+"]"}if(i.defaultValue!==undefined){h="("+h+" === undefined) ? "+l+".defaultValue : "+h}if(i.convert){h=l+".convert("+h+", record)"}return h}});Ext.define("Ext.util.Queue",{constructor:function(){this.clear()},add:function(f){var d=this,e=d.getKey(f);if(!d.map[e]){++d.length;d.items.push(f);d.map[e]=f}return f},clear:function(){var c=this,d=c.items;c.items=[];c.map={};c.length=0;return d},contains:function(c){var d=this.getKey(c);return this.map.hasOwnProperty(d)},getCount:function(){return this.length},getKey:function(b){return b.id},remove:function(h){var i=this,j=i.getKey(h),g=i.items,f;if(i.map[j]){f=Ext.Array.indexOf(g,h);Ext.Array.erase(g,f,1);delete i.map[j];--i.length}return h}});Ext.define("Ext.ElementLoader",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.data.Connection","Ext.Ajax"],statics:{Renderer:{Html:function(e,d,f){e.getTarget().update(d.responseText,f.scripts===true);return true}}},url:null,params:null,baseParams:null,autoLoad:false,target:null,loadMask:false,ajaxOptions:null,scripts:false,isLoader:true,constructor:function(d){var f=this,e;d=d||{};Ext.apply(f,d);f.setTarget(f.target);f.addEvents("beforeload","exception","load");f.mixins.observable.constructor.call(f);if(f.autoLoad){e=f.autoLoad;if(e===true){e={}}f.load(e)}},setTarget:function(c){var d=this;c=Ext.get(c);if(d.target&&d.target!=c){d.abort()}d.target=c},getTarget:function(){return this.target||null},abort:function(){var b=this.active;if(b!==undefined){Ext.Ajax.abort(b.request);if(b.mask){this.removeMask()}delete this.active}},removeMask:function(){this.target.unmask()},addMask:function(b){this.target.mask(b===true?null:b)},load:function(k){if(!this.target){Ext.Error.raise("A valid target is required when loading content")}k=Ext.apply({},k);var n=this,o=n.target,j=Ext.isDefined(k.loadMask)?k.loadMask:n.loadMask,q=Ext.apply({},k.params),r=Ext.apply({},k.ajaxOptions),m=k.callback||n.callback,l=k.scope||n.scope||n,p;Ext.applyIf(r,n.ajaxOptions);Ext.applyIf(k,r);Ext.applyIf(q,n.params);Ext.apply(q,n.baseParams);Ext.applyIf(k,{url:n.url});if(!k.url){Ext.Error.raise("You must specify the URL from which content should be loaded")}Ext.apply(k,{scope:n,params:q,callback:n.onComplete});if(n.fireEvent("beforeload",n,k)===false){return}if(j){n.addMask(j)}p=Ext.Ajax.request(k);n.active={request:p,options:k,mask:j,scope:l,callback:m,success:k.success||n.success,failure:k.failure||n.failure,renderer:k.renderer||n.renderer,scripts:Ext.isDefined(k.scripts)?k.scripts:n.scripts};n.setOptions(n.active,k)},setOptions:Ext.emptyFn,onComplete:function(h,j,i){var m=this,k=m.active,n=k.scope,l=m.getRenderer(k.renderer);if(j){j=l.call(m,m,i,k)}if(j){Ext.callback(k.success,n,[m,i,h]);m.fireEvent("load",m,i,h)}else{Ext.callback(k.failure,n,[m,i,h]);m.fireEvent("exception",m,i,h)}Ext.callback(k.callback,n,[m,j,i,h]);if(k.mask){m.removeMask()}delete m.active},getRenderer:function(b){if(Ext.isFunction(b)){return b}return this.statics().Renderer.Html},startAutoRefresh:function(e,d){var f=this;f.stopAutoRefresh();f.autoRefresh=setInterval(function(){f.load(d)},e)},stopAutoRefresh:function(){clearInterval(this.autoRefresh);delete this.autoRefresh},isAutoRefreshing:function(){return Ext.isDefined(this.autoRefresh)},destroy:function(){var b=this;b.stopAutoRefresh();delete b.target;b.abort();b.clearListeners()}});Ext.define("Ext.layout.component.Draw",{alias:"layout.draw",extend:"Ext.layout.component.Auto",type:"draw",measureContentWidth:function(j){var i=j.target,g=i.surface,f=j.getPaddingInfo(),h=j.surfaceBBox||(j.surfaceBBox=g.items.getBBox());if(!i.viewBox){if(i.autoSize){return h.width+f.width}else{return h.x+h.width+f.width}}else{if(j.heightModel.shrinkWrap){return f.width}else{return h.width/h.height*(j.getProp("contentHeight")-f.height)+f.width}}},measureContentHeight:function(j){var i=j.target,g=i.surface,f=j.getPaddingInfo(),h=j.surfaceBBox||(j.surfaceBBox=g.items.getBBox());if(!j.target.viewBox){if(i.autoSize){return h.height+f.height}else{return h.y+h.height+f.height}}else{if(j.widthModel.shrinkWrap){return f.height}else{return h.height/h.width*(j.getProp("contentWidth")-f.width)+f.height}}},publishInnerWidth:function(c,d){c.setContentWidth(d-c.getFrameInfo().width,true)},publishInnerHeight:function(c,d){c.setContentHeight(d-c.getFrameInfo().height,true)},finishedLayout:function(f){var d=f.props,e=f.getPaddingInfo();this.owner.setSurfaceSize(d.contentWidth-e.width,d.contentHeight-e.height);this.callParent(arguments)}});Ext.define("Ext.grid.LockingView",{mixins:{observable:"Ext.util.Observable"},eventRelayRe:/^(beforeitem|beforecontainer|item|container|cell)/,constructor:function(p){var m=this,k=[],j=m.eventRelayRe,i=p.locked.getView(),l=p.normal.getView(),o,n;Ext.apply(m,{lockedView:i,normalView:l,lockedGrid:p.locked,normalGrid:p.normal,panel:p.panel});m.mixins.observable.constructor.call(m,p);o=i.events;for(n in o){if(o.hasOwnProperty(n)&&j.test(n)){k.push(n)}}m.relayEvents(i,k);m.relayEvents(l,k);l.on({scope:m,itemmouseleave:m.onItemMouseLeave,itemmouseenter:m.onItemMouseEnter});i.on({scope:m,itemmouseleave:m.onItemMouseLeave,itemmouseenter:m.onItemMouseEnter})},getGridColumns:function(){var b=this.lockedGrid.headerCt.getGridColumns();return b.concat(this.normalGrid.headerCt.getGridColumns())},getEl:function(b){return this.getViewForColumn(b).getEl()},getViewForColumn:function(d){var e=this.lockedView,f;e.headerCt.cascade(function(a){if(a===d){f=true;return false}});return f?e:this.normalView},onItemMouseEnter:function(l,g){var i=this,k=i.lockedView,h=i.normalView,j;if(l.trackOver){if(l!==k){h=k}j=h.getNode(g);h.highlightItem(j)}},onItemMouseLeave:function(j,f){var h=this,i=h.lockedView,g=h.normalView;if(j.trackOver){if(j!==i){g=i}g.clearHighlight()}},relayFn:function(f,d){d=d||[];var e=this.lockedView;e[f].apply(e,d||[]);e=this.normalView;e[f].apply(e,d||[])},getSelectionModel:function(){return this.panel.getSelectionModel()},getStore:function(){return this.panel.store},getNode:function(b){return this.normalView.getNode(b)},getCell:function(e,h){var f=this.getViewForColumn(h),g;g=f.getNode(e);return Ext.fly(g).down(h.getCellSelector())},getRecord:function(c){var d=this.lockedView.getRecord(c);if(!c){d=this.normalView.getRecord(c)}return d},addElListener:function(e,f,d){this.relayFn("addElListener",arguments)},refreshNode:function(){this.relayFn("refreshNode",arguments)},refresh:function(){this.relayFn("refresh",arguments)},bindStore:function(){this.relayFn("bindStore",arguments)},addRowCls:function(){this.relayFn("addRowCls",arguments)},removeRowCls:function(){this.relayFn("removeRowCls",arguments)}});Ext.define("Ext.layout.ClassList",(function(){var c=Ext.String.splitWords,d=Ext.Array.toMap;return{dirty:false,constructor:function(a){this.owner=a;this.map=d(this.classes=c(a.el.className))},add:function(b){var a=this;if(!a.map[b]){a.map[b]=true;a.classes.push(b);if(!a.dirty){a.dirty=true;a.owner.markDirty()}}},addMany:function(a){Ext.each(c(a),this.add,this)},contains:function(a){return this.map[a]},flush:function(){this.owner.el.className=this.classes.join(" ");this.dirty=false},remove:function(b){var a=this;if(a.map[b]){delete a.map[b];a.classes=Ext.Array.filter(a.classes,function(f){return f!=b});if(!a.dirty){a.dirty=true;a.owner.markDirty()}}},removeMany:function(b){var a=this,f=d(c(b));a.classes=Ext.Array.filter(a.classes,function(e){if(!f[e]){return true}delete a.map[e];if(!a.dirty){a.dirty=true;a.owner.markDirty()}return false})}}}()));Ext.define("Ext.draw.CompositeSprite",{extend:"Ext.util.MixedCollection",mixins:{animate:"Ext.util.Animate"},autoDestroy:false,isCompositeSprite:true,constructor:function(d){var c=this;d=d||{};Ext.apply(c,d);c.addEvents("mousedown","mouseup","mouseover","mouseout","click");c.id=Ext.id(null,"ext-sprite-group-");c.callParent()},onClick:function(b){this.fireEvent("click",b)},onMouseUp:function(b){this.fireEvent("mouseup",b)},onMouseDown:function(b){this.fireEvent("mousedown",b)},onMouseOver:function(b){this.fireEvent("mouseover",b)},onMouseOut:function(b){this.fireEvent("mouseout",b)},attachEvents:function(c){var d=this;c.on({scope:d,mousedown:d.onMouseDown,mouseup:d.onMouseUp,mouseover:d.onMouseOver,mouseout:d.onMouseOut,click:d.onClick})},add:function(d,f){var e=this.callParent(arguments);this.attachEvents(e);return e},insert:function(e,d,f){return this.callParent(arguments)},remove:function(c){var d=this;c.un({scope:d,mousedown:d.onMouseDown,mouseup:d.onMouseUp,mouseover:d.onMouseOver,mouseout:d.onMouseOut,click:d.onClick});return d.callParent(arguments)},getBBox:function(){var t=0,i,q,p=this.items,s=this.length,r=Infinity,v=r,n=-r,w=r,o=-r,u,x;for(;t<s;t++){i=p[t];if(i.el&&!i.bboxExcluded){q=i.getBBox();v=Math.min(v,q.x);w=Math.min(w,q.y);n=Math.max(n,q.height+q.y);o=Math.max(o,q.width+q.x)}}return{x:v,y:w,height:n-w,width:o-v}},setAttributes:function(j,h){var i=0,f=this.items,g=this.length;for(;i<g;i++){f[i].setAttributes(j,h)}return this},hide:function(g){var h=0,e=this.items,f=this.length;for(;h<f;h++){e[h].hide(g)}return this},show:function(g){var h=0,e=this.items,f=this.length;for(;h<f;h++){e[h].show(g)}return this},redraw:function(){var h=this,i=0,j=h.items,f=h.getSurface(),g=h.length;if(f){for(;i<g;i++){f.renderItem(j[i])}}return h},setStyle:function(i){var l=0,g=this.items,h=this.length,j,k;for(;l<h;l++){j=g[l];k=j.el;if(k){k.setStyle(i)}}},addCls:function(h){var i=0,j=this.items,f=this.getSurface(),g=this.length;if(f){for(;i<g;i++){f.addCls(j[i],h)}}},removeCls:function(h){var i=0,j=this.items,f=this.getSurface(),g=this.length;if(f){for(;i<g;i++){f.removeCls(j[i],h)}}},getSurface:function(){var b=this.first();if(b){return b.surface}return null},destroy:function(){var g=this,f=g.getSurface(),h=g.autoDestroy,e;if(f){while(g.getCount()>0){e=g.first();g.remove(e);f.remove(e,h)}}g.clearListeners()}});Ext.define("Ext.window.Window",{extend:"Ext.panel.Panel",alternateClassName:"Ext.Window",requires:["Ext.util.ComponentDragger","Ext.util.Region","Ext.EventManager"],alias:"widget.window",baseCls:Ext.baseCSSPrefix+"window",resizable:true,draggable:true,constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:50,minWidth:50,expandOnShow:true,collapsible:false,closable:true,hidden:true,autoRender:true,hideMode:"offsets",floating:true,ariaRole:"alertdialog",itemCls:Ext.baseCSSPrefix+"window-item",overlapHeader:true,ignoreHeaderBorderManagement:true,isWindow:true,initComponent:function(){var b=this;b.callParent();b.addEvents("resize","maximize","minimize","restore");if(b.plain){b.addClsWithUI("plain")}if(b.modal){b.ariaRole="dialog"}if(b.floating){b.on({element:"el",mousedown:b.onMouseDown,scope:b})}b.frame=true;b.addStateEvents(["maximize","restore","resize","dragend"])},getElConfig:function(){var c=this,d;d=c.callParent();d.tabIndex=-1;return d},getState:function(){var d=this,f=d.callParent()||{},e=!!d.maximized;f.maximized=e;Ext.apply(f,{size:e?d.restoreSize:d.getSize(),pos:e?d.restorePos:d.getPosition()});return f},applyState:function(c){var d=this;if(c){d.maximized=c.maximized;if(d.maximized){d.hasSavedRestore=true;d.restoreSize=c.size;d.restorePos=c.pos}else{Ext.apply(d,{width:c.size.width,height:c.size.height,x:c.pos[0],y:c.pos[1]})}}},onMouseDown:function(c){var d;if(this.floating){if(Ext.fly(c.getTarget()).focusable()){d=true}this.toFront(d)}},onRender:function(d,e){var f=this;f.callParent(arguments);f.focusEl=f.el;if(f.maximizable){f.header.on({scope:f,dblclick:f.toggleMaximize})}},afterRender:function(){var d=this,c;d.callParent();if(d.maximized){d.maximized=false;d.maximize()}if(d.closable){c=d.getKeyMap();c.on(27,d.onEsc,d);c.disable()}},initDraggable:function(){var c=this,d;if(!c.header){c.updateHeader(true)}if(c.header){d=Ext.applyIf({el:c.el,delegate:"#"+c.header.id},c.draggable);if(c.constrain||c.constrainHeader){d.constrain=c.constrain;d.constrainDelegate=c.constrainHeader;d.constrainTo=c.constrainTo||c.container}c.dd=new Ext.util.ComponentDragger(this,d);c.relayEvents(c.dd,["dragstart","drag","dragend"])}},onEsc:function(d,c){if(!Ext.FocusManager||!Ext.FocusManager.enabled||Ext.FocusManager.focusedCmp===this){c.stopEvent();this.close()}},beforeDestroy:function(){var b=this;if(b.rendered){delete this.animateTarget;b.hide();Ext.destroy(b.keyMap)}b.callParent()},addTools:function(){var b=this;b.callParent();if(b.minimizable){b.addTool({type:"minimize",handler:Ext.Function.bind(b.minimize,b,[])})}if(b.maximizable){b.addTool({type:"maximize",handler:Ext.Function.bind(b.maximize,b,[])});b.addTool({type:"restore",handler:Ext.Function.bind(b.restore,b,[]),hidden:true})}},getFocusEl:function(){return this.getDefaultFocus()},getDefaultFocus:function(){var h=this,e,g=h.defaultButton||h.defaultFocus,f;if(g!==undefined){if(Ext.isNumber(g)){e=h.query("button")[g]}else{if(Ext.isString(g)){f=g;if(f.substr(0,1)!=="#"){f="#"+f}e=h.down(f)}else{if(g.focus){e=g}}}}return e||h.el},onFocus:function(){var c=this,d;if((Ext.FocusManager&&Ext.FocusManager.enabled)||((d=c.getDefaultFocus())===c)){c.callParent(arguments)}else{d.focus()}},afterShow:function(f){var d=this,e=f||d.animateTarget;if(this.expandOnShow){this.expand(false)}d.callParent(arguments);if(d.maximized){d.fitContainer()}d.syncMonitorWindowResize();if(!e){d.doConstrain()}if(d.keyMap){d.keyMap.enable()}},doClose:function(){var b=this;if(b.hidden){b.fireEvent("close",b);if(b.closeAction=="destroy"){this.destroy()}}else{b.hide(b.animateTarget,b.doClose,b)}},afterHide:function(){var b=this;b.syncMonitorWindowResize();if(b.keyMap){b.keyMap.disable()}b.callParent(arguments)},onWindowResize:function(){if(this.maximized){this.fitContainer()}this.doConstrain()},minimize:function(){this.fireEvent("minimize",this);return this},afterCollapse:function(){var b=this;if(b.maximizable){b.tools.maximize.hide();b.tools.restore.hide()}if(b.resizer){b.resizer.disable()}b.callParent(arguments)},afterExpand:function(){var b=this;if(b.maximized){b.tools.restore.show()}else{if(b.maximizable){b.tools.maximize.show()}}if(b.resizer){b.resizer.enable()}b.callParent(arguments)},maximize:function(){var b=this;if(!b.maximized){b.expand(false);if(!b.hasSavedRestore){b.restoreSize=b.getSize();b.restorePos=b.getPosition(true)}if(b.maximizable){b.tools.maximize.hide();b.tools.restore.show()}b.maximized=true;b.el.disableShadow();if(b.dd){b.dd.disable()}if(b.resizer){b.resizer.disable()}if(b.collapseTool){b.collapseTool.hide()}b.el.addCls(Ext.baseCSSPrefix+"window-maximized");b.container.addCls(Ext.baseCSSPrefix+"window-maximized-ct");b.syncMonitorWindowResize();b.setPosition(0,0);b.fitContainer();b.fireEvent("maximize",b)}return b},restore:function(){var d=this,c=d.tools;if(d.maximized){delete d.hasSavedRestore;d.removeCls(Ext.baseCSSPrefix+"window-maximized");if(c.restore){c.restore.hide()}if(c.maximize){c.maximize.show()}if(d.collapseTool){d.collapseTool.show()}d.setPosition(d.restorePos);d.setSize(d.restoreSize);delete d.restorePos;delete d.restoreSize;d.maximized=false;d.el.enableShadow(true);if(d.dd){d.dd.enable()}if(d.resizer){d.resizer.enable()}d.container.removeCls(Ext.baseCSSPrefix+"window-maximized-ct");d.syncMonitorWindowResize();d.doConstrain();d.fireEvent("restore",d)}return d},syncMonitorWindowResize:function(){var e=this,h=e._monitoringResize,g=e.monitorResize||e.constrain||e.constrainHeader||e.maximized,f=e.hidden||e.destroying||e.isDestroyed;if(g&&!f){if(!h){Ext.EventManager.onWindowResize(e.onWindowResize,e);e._monitoringResize=true}}else{if(h){Ext.EventManager.removeResizeListener(e.onWindowResize,e);e._monitoringResize=false}}},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()}});Ext.define("Ext.grid.ViewDropZone",{extend:"Ext.view.DropZone",indicatorHtml:'<div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-left"></div><div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-right"></div>',indicatorCls:Ext.baseCSSPrefix+"grid-drop-indicator",handleNodeDrop:function(q,o,n){var k=this.view,i=k.getStore(),l,r,p,m;if(q.copy){r=q.records;q.records=[];for(p=0,m=r.length;p<m;p++){q.records.push(r[p].copy(r[p].getId()))}}else{q.view.store.remove(q.records,q.view===k)}l=i.indexOf(o);if(n!=="before"){l++}i.insert(l,q.records);k.getSelectionModel().select(q.records)}});Ext.define("Ext.data.ArrayStore",{extend:"Ext.data.Store",alias:"store.array",requires:["Ext.data.proxy.Memory","Ext.data.reader.Array"],constructor:function(b){b=Ext.apply({proxy:{type:"memory",reader:"array"}},b);this.callParent([b])},loadData:function(h,g){if(this.expandData===true){var i=[],f=0,j=h.length;for(;f<j;f++){i[i.length]=[h[f]]}h=i}this.callParent([h,g])}},function(){Ext.data.SimpleStore=Ext.data.ArrayStore});Ext.define("Ext.ComponentLoader",{extend:"Ext.ElementLoader",statics:{Renderer:{Data:function(g,e,i){var h=true;try{g.getTarget().update(Ext.decode(e.responseText))}catch(j){h=false}return h},Component:function(i,n,k){var j=true,l=i.getTarget(),e=[];if(!l.isContainer){Ext.Error.raise({target:l,msg:"Components can only be loaded into a container"})}try{e=Ext.decode(n.responseText)}catch(m){j=false}if(j){l.suspendLayouts();if(k.removeAll){l.removeAll()}l.add(e);l.resumeLayouts(true)}return j}}},target:null,loadMask:false,renderer:"html",setTarget:function(c){var d=this;if(Ext.isString(c)){c=Ext.getCmp(c)}if(d.target&&d.target!=c){d.abort()}d.target=c},removeMask:function(){this.target.setLoading(false)},addMask:function(b){this.target.setLoading(b)},setOptions:function(c,d){c.removeAll=Ext.isDefined(d.removeAll)?d.removeAll:this.removeAll},getRenderer:function(c){if(Ext.isFunction(c)){return c}var d=this.statics().Renderer;switch(c){case"component":return d.Component;case"data":return d.Data;default:return Ext.ElementLoader.Renderer.Html}}});Ext.define("Ext.grid.Lockable",{requires:["Ext.grid.LockingView","Ext.view.Table"],syncRowHeight:true,headerCounter:0,scrollDelta:40,unlockText:"Unlock",lockText:"Lock",determineXTypeToCreate:function(){var l=this,i,k,g,j,h;if(l.subGridXType){i=l.subGridXType}else{k=this.getXTypes().split("/");g=k.length;j=k[g-1];h=k[g-2];if(h!=="tablepanel"){i=h}else{i=j}}return i},injectLockable:function(){this.lockable=true;this.hasView=true;var t=this,y=Ext.getScrollbarSize().width===0,s=t.store=Ext.StoreManager.lookup(t.store),H=t.determineXTypeToCreate(),x=t.getSelectionModel(),z=t.prepareFeatures(),C=t.prepareFeatures(),E,v,B=0,w,F,G,A,i,D,u;for(B=0,w=(z?z.length:0);B<w;B++){z[B].lockingPartner=C[B];C[B].lockingPartner=z[B]}E=Ext.apply({xtype:H,store:s,scrollerOwner:false,enableAnimations:false,scroll:y?"vertical":false,selModel:x,border:false,cls:Ext.baseCSSPrefix+"grid-inner-locked",isLayoutRoot:function(){return false},features:z},t.lockedGridConfig);v=Ext.apply({xtype:H,store:s,scrollerOwner:false,enableAnimations:false,selModel:x,border:false,isLayoutRoot:function(){return false},features:C},t.normalGridConfig);t.addCls(Ext.baseCSSPrefix+"grid-locked");Ext.copyTo(v,t,t.bothCfgCopy);Ext.copyTo(E,t,t.bothCfgCopy);Ext.copyTo(v,t,t.normalCfgCopy);Ext.copyTo(E,t,t.lockedCfgCopy);for(B=0;B<t.normalCfgCopy.length;B++){delete t[t.normalCfgCopy[B]]}for(B=0;B<t.lockedCfgCopy.length;B++){delete t[t.lockedCfgCopy[B]]}t.addEvents("lockcolumn","unlockcolumn");t.addStateEvents(["lockcolumn","unlockcolumn"]);t.lockedHeights=[];t.normalHeights=[];F=t.processColumns(t.columns);E.width=F.lockedWidth+Ext.num(x.headerWidth,0);E.columns=F.locked;v.columns=F.normal;v.flex=1;E.viewConfig=t.lockedViewConfig||{};E.viewConfig.loadingUseMsg=false;v.viewConfig=t.normalViewConfig||{};Ext.applyIf(E.viewConfig,t.viewConfig);Ext.applyIf(v.viewConfig,t.viewConfig);t.normalGrid=Ext.ComponentManager.create(v);t.lockedGrid=Ext.ComponentManager.create(E);t.view=new Ext.grid.LockingView({locked:t.lockedGrid,normal:t.normalGrid,panel:t});i=t.lockedGrid.getView();D=t.normalGrid.getView();if(y){u={scroll:{fn:t.onLockedViewScroll,element:"el",scope:t}}}else{u={mousewheel:{fn:t.onLockedViewMouseWheel,element:"el",scope:t}}}if(t.syncRowHeight){u.refresh=t.onLockedViewRefresh;u.itemupdate=t.onLockedViewItemUpdate;u.scope=t}i.on(u);u={scroll:{fn:t.onNormalViewScroll,element:"el",scope:t},refresh:t.syncRowHeight?t.onNormalViewRefresh:t.updateSpacer,scope:t};D.on(u);G=t.lockedGrid.headerCt;A=t.normalGrid.headerCt;G.lockedCt=true;G.lockableInjected=true;A.lockableInjected=true;G.on({columnshow:t.onLockedHeaderShow,columnhide:t.onLockedHeaderHide,columnmove:t.onLockedHeaderMove,sortchange:t.onLockedHeaderSortChange,columnresize:t.onLockedHeaderResize,scope:t});A.on({columnmove:t.onNormalHeaderMove,sortchange:t.onNormalHeaderSortChange,scope:t});t.modifyHeaderCt();t.items=[t.lockedGrid,t.normalGrid];t.relayHeaderCtEvents(G);t.relayHeaderCtEvents(A);t.layout={type:"hbox",align:"stretch"}},processColumns:function(k){var l=0,i=k.length,h=0,m=[],n=[],j;for(;l<i;++l){j=k[l];if(!j.isComponent){j=Ext.apply({},k[l])}j.processed=true;if(j.locked){if(j.flex){Ext.Error.raise("Columns which are locked do NOT support a flex width. You must set a width on the "+k[l].text+"column.")}if(!j.hidden){h+=j.width||Ext.grid.header.Container.prototype.defaultWidth}m.push(j)}else{n.push(j)}if(!j.headerId){j.headerId=(j.initialConfig||j).id||("L"+(++this.headerCounter))}}return{lockedWidth:h,locked:{items:m,itemId:"lockedHeaderCt",stretchMaxPartner:"^^>>#normalHeaderCt"},normal:{items:n,itemId:"normalHeaderCt",stretchMaxPartner:"^^>>#lockedHeaderCt"}}},onLockedViewMouseWheel:function(j){var m=this,k=-m.scrollDelta,i=k*j.getWheelDeltas().y,e=m.lockedGrid.getView().el.dom,n,l;if(e){n=e.scrollTop!==e.scrollHeight-e.clientHeight;l=e.scrollTop!==0}if((i<0&&l)||(i>0&&n)){j.stopEvent();m.scrolling=true;e.scrollTop+=i;m.normalGrid.getView().el.dom.scrollTop=e.scrollTop;m.scrolling=false;m.onNormalViewScroll()}},onLockedViewScroll:function(){var h=this,i=h.lockedGrid.getView(),j=h.normalGrid.getView(),g,f;if(!h.scrolling){h.scrolling=true;j.el.dom.scrollTop=i.el.dom.scrollTop;if(h.store.buffered){f=i.el.child("table",true);g=j.el.child("table",true);f.style.position="absolute"}h.scrolling=false}},onNormalViewScroll:function(){var h=this,i=h.lockedGrid.getView(),j=h.normalGrid.getView(),g,f;if(!h.scrolling){h.scrolling=true;i.el.dom.scrollTop=j.el.dom.scrollTop;if(h.store.buffered){f=i.el.child("table",true);g=j.el.child("table",true);f.style.position="absolute";f.style.top=g.style.top}h.scrolling=false}},onLockedHeaderMove:function(){if(this.syncRowHeight){this.onNormalViewRefresh()}},onNormalHeaderMove:function(){if(this.syncRowHeight){this.onLockedViewRefresh()}},updateSpacer:function(){var i=this,f=i.lockedGrid.getView().el,j=i.normalGrid.getView().el.dom,g=f.dom.id+"-spacer",h=(j.offsetHeight-j.clientHeight)+"px";i.spacerEl=Ext.getDom(g);if(i.spacerEl){i.spacerEl.style.height=h}else{Ext.core.DomHelper.append(f,{id:g,style:"height: "+h})}},onLockedViewRefresh:function(){if(this.normalGrid.headerCt.getGridColumns().length){var j=this,h=j.lockedGrid.getView(),l=h.el,i=l.query(h.getItemSelector()),k=i.length,g=0;j.lockedHeights=[];for(;g<k;g++){j.lockedHeights[g]=i[g].clientHeight}j.syncRowHeights()}},onNormalViewRefresh:function(){if(this.lockedGrid.headerCt.getGridColumns().length){var j=this,h=j.normalGrid.getView(),l=h.el,i=l.query(h.getItemSelector()),k=i.length,g=0;j.normalHeights=[];for(;g<k;g++){j.normalHeights[g]=i[g].clientHeight}j.syncRowHeights();j.updateSpacer()}},onLockedViewItemUpdate:function(e,d,f){if(this.normalGrid.headerCt.getGridColumns().length){this.lockedHeights[d]=f.clientHeight;this.syncRowHeights()}},onNormalViewItemUpdate:function(e,d,f){if(this.lockedGrid.headerCt.getGridColumns().length){this.normalHeights[d]=f.clientHeight;this.syncRowHeights()}},syncRowHeights:function(){var n=this,u=n.lockedHeights,m=n.normalHeights,v=[],o=u.length,q=0,i,s,r,p,t;if(u.length&&m.length){i=n.lockedGrid.getView();s=n.normalGrid.getView();r=i.el.query(i.getItemSelector());p=s.el.query(s.getItemSelector());for(;q<o;q++){if(!isNaN(u[q])&&!isNaN(m[q])){if(u[q]>m[q]){Ext.fly(p[q]).setHeight(u[q])}else{if(u[q]<m[q]){Ext.fly(r[q]).setHeight(m[q])}}}}t=s.el.dom.scrollTop;s.el.dom.scrollTop=t;i.el.dom.scrollTop=t;n.lockedHeights=[];n.normalHeights=[]}},modifyHeaderCt:function(){var b=this;b.lockedGrid.headerCt.getMenuItems=b.getMenuItems(true);b.normalGrid.headerCt.getMenuItems=b.getMenuItems(false)},onUnlockMenuClick:function(){this.unlock()},onLockMenuClick:function(){this.lock()},getMenuItems:function(i){var m=this,l=m.unlockText,k=m.lockText,p=Ext.baseCSSPrefix+"hmenu-unlock",n=Ext.baseCSSPrefix+"hmenu-lock",j=Ext.Function.bind(m.onUnlockMenuClick,m),o=Ext.Function.bind(m.onLockMenuClick,m);return function(){var a=Ext.grid.header.Container.prototype.getMenuItems.call(this);a.push("-",{cls:p,text:l,handler:j,disabled:!i});a.push({cls:n,text:k,handler:o,disabled:i});return a}},lock:function(i,m){var n=this,l=n.normalGrid,j=n.lockedGrid,k=l.headerCt,h=j.headerCt;i=i||k.getMenu().activeHeader;if(i.flex){i.width=i.getWidth();delete i.flex}Ext.suspendLayouts();k.remove(i,false);i.locked=true;if(Ext.isDefined(m)){h.insert(m,i)}else{h.add(i)}n.syncLockedSection();Ext.resumeLayouts(true);n.updateSpacer();n.fireEvent("lockcolumn",n,i)},syncLockedSection:function(){var b=this;b.syncLockedWidth();b.lockedGrid.getView().refresh();b.normalGrid.getView().refresh()},syncLockedWidth:function(){var f=this,e=f.lockedGrid,d=e.headerCt.getFullWidth(true);Ext.suspendLayouts();if(d>0){e.setWidth(d);e.show()}else{e.hide()}Ext.resumeLayouts(true);return d>0},onLockedHeaderResize:function(){this.syncLockedWidth()},onLockedHeaderHide:function(){this.syncLockedWidth()},onLockedHeaderShow:function(){this.syncLockedWidth()},onLockedHeaderSortChange:function(d,f,e){if(e){this.normalGrid.headerCt.clearOtherSortStates(null,true)}},onNormalHeaderSortChange:function(d,f,e){if(e){this.lockedGrid.headerCt.clearOtherSortStates(null,true)}},unlock:function(j,n){var o=this,m=o.normalGrid,k=o.lockedGrid,l=m.headerCt,p=k.headerCt,i=false;if(!Ext.isDefined(n)){n=0}j=j||p.getMenu().activeHeader;Ext.suspendLayouts();p.remove(j,false);if(o.syncLockedWidth()){i=true}j.locked=false;l.insert(n,j);o.normalGrid.getView().refresh();if(i){o.lockedGrid.getView().refresh()}Ext.resumeLayouts(true);o.fireEvent("unlockcolumn",o,j)},applyColumnsState:function(x){var q=this,z=q.lockedGrid,y=z.headerCt,s=q.normalGrid.headerCt,i=Ext.Array.toMap(y.items,"headerId"),w=Ext.Array.toMap(s.items,"headerId"),t=[],r=[],u=1,C=x.length,v,D,A,B;for(v=0;v<C;v++){B=x[v];A=i[B.id];D=A||w[B.id];if(D){if(D.applyColumnState){D.applyColumnState(B)}if(D.locked===undefined){D.locked=!!A}if(D.locked){t.push(D);if(!D.hidden&&typeof D.width=="number"){u+=D.width}}else{r.push(D)}}}if(t.length+r.length==y.items.getCount()+s.items.getCount()){y.removeAll(false);s.removeAll(false);y.add(t);s.add(r);z.setWidth(u)}},getColumnsState:function(){var d=this,e=d.lockedGrid.headerCt.getColumnsState(),f=d.normalGrid.headerCt.getColumnsState();return e.concat(f)},reconfigureLockable:function(g,f){var j=this,h=j.lockedGrid,i=j.normalGrid;if(f){Ext.suspendLayouts();h.headerCt.removeAll();i.headerCt.removeAll();f=j.processColumns(f);h.setWidth(f.lockedWidth);h.headerCt.add(f.locked.items);i.headerCt.add(f.normal.items);Ext.resumeLayouts(true)}if(g){g=Ext.data.StoreManager.lookup(g);j.store=g;h.bindStore(g);i.bindStore(g)}else{h.getView().refresh();i.getView().refresh()}}},function(){this.borrow(Ext.view.Table,["prepareFeatures"])});Ext.define("Ext.layout.ContextItem",{requires:["Ext.layout.ClassList"],heightModel:null,widthModel:null,sizeModel:null,boxChildren:null,boxParent:null,children:[],dirty:null,dirtyCount:0,hasRawContent:true,isContextItem:true,isTopLevel:false,consumersContentHeight:0,consumersContentWidth:0,consumersContainerHeight:0,consumersContainerWidth:0,consumersHeight:0,consumersWidth:0,ownerCtContext:null,remainingChildLayouts:0,remainingComponentChildLayouts:0,remainingContainerChildLayouts:0,wrapsComponent:false,constructor:function(g){var i=this,h=g.target,j,f;Ext.apply(i,g);j=i.el;i.id=j.id;i.lastBox=j.lastBox;i.blocks={};i.domBlocks={};i.triggers={};i.domTriggers={};i.flushedProps={};i.props={};i.state={};i.styles={};if(h.isComponent){i.wrapsComponent=true;i.sizeModel=f=h.getSizeModel(i.ownerCtContext&&i.ownerCtContext.sizeModel);i.widthModel=f.width;i.heightModel=f.height;i.frameBodyContext=i.getEl("frameBody")}},init:function(h){var g=this,e,f;if(h){g.ownerCtContext=h;g.isBoxParent=g.target.ownerLayout.isItemBoxParent(g);f=g.widthModel;if(f.shrinkWrap){e=h.isBoxParent?h:h.boxParent;if(e){e.addBoxChild(g)}}else{if(f.natural){g.boxParent=h}}}else{g.isTopLevel=true}},initAnimatePolicy:function(){var d=this,f=d.target,e=d.ownerCtContext;if(e&&e.isTopLevel){d.animatePolicy=f.ownerLayout.getAnimatePolicy(d)}else{if(!e&&f.isCollapsingOrExpanding&&f.animCollapse){d.animatePolicy=f.componentLayout.getAnimatePolicy(d)}}if(d.animatePolicy){d.context.queueAnimation(d)}},noFraming:{left:0,top:0,right:0,bottom:0,width:0,height:0},addCls:function(b){this.getClassList().addMany(b)},removeCls:function(b){this.getClassList().removeMany(b)},addBlock:function(g,k,j){var l=this,i=l[g],h=i[j]||(i[j]={});if(!h[k.id]){h[k.id]=k;++k.blockCount;++l.context.blockCount}},addBoxChild:function(g){var h=this,e,f=g.widthModel;g.boxParent=this;g.measuresBox=f.shrinkWrap?g.hasRawContent:f.natural;if(g.measuresBox){e=h.boxChildren;if(e){e.push(g)}else{h.boxChildren=[g]}}},addTrigger:function(l,k){var m=this,j=k?m.domTriggers:m.triggers,i=m.context,n=i.currentLayout,h=j[l]||(j[l]={});if(!h[n.id]){h[n.id]=n;++n.triggerCount;h=i.triggers[k?"dom":"data"];(h[n.id]||(h[n.id]=[])).push({item:this,prop:l});if(m.props[l]!==undefined){if(!k||!(m.dirty&&(l in m.dirty))){++n.firedTriggers}}}},boxChildMeasured:function(){var d=this,f=d.state,e=(f.boxesMeasured=(f.boxesMeasured||0)+1);if(e==d.boxChildren.length){f.clearBoxWidth=1;++d.context.progressCount;d.markDirty()}},borderNames:["border-top-width","border-right-width","border-bottom-width","border-left-width"],marginNames:["margin-top","margin-right","margin-bottom","margin-left"],paddingNames:["padding-top","padding-right","padding-bottom","padding-left"],trblNames:["top","right","bottom","left"],cacheMissHandlers:{borderInfo:function(d){var c=d.getStyles(d.borderNames,d.trblNames);c.width=c.left+c.right;c.height=c.top+c.bottom;return c},marginInfo:function(d){var c=d.getStyles(d.marginNames,d.trblNames);c.width=c.left+c.right;c.height=c.top+c.bottom;return c},paddingInfo:function(d){var e=d.frameBodyContext||d,f=e.getStyles(d.paddingNames,d.trblNames);f.width=f.left+f.right;f.height=f.top+f.bottom;return f}},checkCache:function(b){return this.cacheMissHandlers[b](this)},clearAllBlocks:function(e){var f=this[e],d;if(f){for(d in f){this.clearBlocks(e,d)}}},clearBlocks:function(n,k){var j=this[n],h=j&&j[k],m,l,i;if(h){delete j[k];m=this.context;for(i in h){l=h[i];--m.blockCount;if(!--l.blockCount&&!l.pending&&!l.done){m.queueLayout(l)}}}},block:function(d,c){this.addBlock("blocks",d,c)},domBlock:function(d,c){this.addBlock("domBlocks",d,c)},doInvalidate:function(j){var i=this,f=i.props,g=i.dirty,h=i.target.ownerLayout;i.dirty=i.invalid=false;i.props={};i.state={};i.clearAllBlocks("blocks");i.clearAllBlocks("domBlocks");if(i.wrapsComponent){if(!j){i.recoverProp("x",f,g);i.recoverProp("y",f,g);if(i.widthModel.calculated){i.recoverProp("width",f,g)}if(i.heightModel.calculated){i.recoverProp("height",f,g)}}else{i.widthModel=i.sizeModel.width;i.heightModel=i.sizeModel.height}}if(h&&h.manageMargins){i.recoverProp("margin-top",f,g);i.recoverProp("margin-right",f,g);i.recoverProp("margin-bottom",f,g);i.recoverProp("margin-left",f,g)}},fireTriggers:function(g,i){var k=this[g][i],l=this.context,j,h;if(k){for(h in k){j=k[h];++j.firedTriggers;if(!j.done&&!j.blockCount&&!j.pending){l.queueLayout(j)}}}},flush:function(){var e=this,f=e.dirty,h=e.state,g=e.el;e.dirtyCount=0;if(e.classList&&e.classList.dirty){e.classList.flush()}if("attributes" in e){g.set(e.attributes);delete e.attributes}if("innerHTML" in e){g.innerHTML=e.innerHTML;delete e.innerHTML}if(h.clearBoxWidth){h.clearBoxWidth=0;e.el.setStyle("width",null);if(!--h.blocks){e.context.queueItemLayouts(e)}}if(f){delete e.dirty;e.writeProps(f,true)}},flushAnimations:function(){var j=this,x=j.lastBox,q,o,v,t,u,w,s,p,r,z,y;if(x){q=j.target;o=q.layout&&q.layout.animate;if(o){v=Ext.isNumber(o)?o:o.duration}t=Ext.Object.getKeys(j.animatePolicy);u=Ext.apply({},{from:{},to:{},duration:v||Ext.fx.Anim.prototype.duration},o);for(w=0,s=0,p=t.length;s<p;s++){r=t[s];z=x[r];y=j.peek(r);if(z!=y){r=j.translateProps[r]||r;u.from[r]=z;u.to[r]=y;++w}}if(w){if(j.isCollapsingOrExpanding===1){q.componentLayout.undoLayout(j)}else{j.writeProps(u.from)}j.el.animate(u);Ext.fx.Manager.getFxQueue(j.el.id)[0].on({afteranimate:function(){if(j.isCollapsingOrExpanding===1){q.componentLayout.redoLayout(j);q.afterCollapse(true)}else{if(j.isCollapsingOrExpanding===2){q.afterExpand(true)}}}})}}},getBorderInfo:function(){var d=this,c=d.borderInfo;if(!c){d.borderInfo=c=d.checkCache("borderInfo")}return c},getClassList:function(){return this.classList||(this.classList=new Ext.layout.ClassList(this))},getEl:function(l,h){var j=this,i,k,g;if(l){if(l.dom){k=l}else{i=j.target;if(h){i=h}k=i[l];if(typeof k=="function"){k=k.call(i);if(k===j.el){return this}}}if(k){g=j.context.getEl(j,k)}}return g||null},getFraming:function(){var b=this;if(!b.framingInfo){b.framingInfo=b.target.frameSize||b.noFraming}return b.framingInfo},getFrameInfo:function(){var e=this,h=e.frameInfo,g,f;if(!h){g=e.getFraming();f=e.getBorderInfo();e.frameInfo=h={top:g.top+f.top,right:g.right+f.right,bottom:g.bottom+f.bottom,left:g.left+f.left,width:g.width+f.width,height:g.height+f.height}}return h},getMarginInfo:function(){var m=this,j=m.marginInfo,h,i,k,l,n;if(!j){if(!m.wrapsComponent){j=m.checkCache("marginInfo")}else{h=m.target;l=h.ownerLayout;n=l?l.id:null;i=l&&l.manageMargins;j=h.margin$;if(j&&j.ownerId!==n){j=null}if(!j){j=m.parseMargins(h.margin)||m.checkCache("marginInfo");if(i){k=m.parseMargins(h.margins,l.defaultMargins);if(k){j={top:j.top+k.top,right:j.right+k.right,bottom:j.bottom+k.bottom,left:j.left+k.left}}m.setProp("margin-top",0);m.setProp("margin-right",0);m.setProp("margin-bottom",0);m.setProp("margin-left",0)}j.ownerId=n;h.margin$=j}j.width=j.left+j.right;j.height=j.top+j.bottom}m.marginInfo=j}return j},clearMarginCache:function(){delete this.marginInfo;delete this.target.margin$},getPaddingInfo:function(){var d=this,c=d.paddingInfo;if(!c){d.paddingInfo=c=d.checkCache("paddingInfo")}return c},getProp:function(f){var d=this,e=d.props[f];d.addTrigger(f);return e},getDomProp:function(f){var d=this,e=(d.dirty&&(f in d.dirty))?undefined:d.props[f];d.addTrigger(f,true);return e},getStyle:function(g){var j=this,f=j.styles,h,i;if(g in f){i=f[g]}else{h=j.styleInfo[g];i=j.el.getStyle(g);if(h&&h.parseInt){i=parseInt(i,10)||0}f[g]=i}return i},getStyles:function(r,C){var t=this,z=t.styles,n={},y=0,A=r.length,v,w,u,D,B,x,i,s;C=C||r;for(v=0;v<A;++v){D=r[v];if(D in z){n[C[v]]=z[D];++y;if(v&&y==1){w=r.slice(0,v);u=C.slice(0,v)}}else{if(y){(w||(w=[])).push(D);(u||(u=[])).push(C[v])}}}if(y<A){w=w||r;u=u||C;x=t.styleInfo;i=t.el.getStyle(w);for(v=w.length;v--;){D=w[v];B=x[D];s=i[D];if(B&&B.parseInt){s=parseInt(s,10)||0}n[u[v]]=s;z[D]=s}}return n},hasProp:function(c){var d=this.getProp(c);return typeof d!="undefined"},hasDomProp:function(c){var d=this.getDomProp(c);return typeof d!="undefined"},invalidate:function(b){this.invalid=true;this.context.queueInvalidate(this,b)},markDirty:function(){if(++this.dirtyCount==1){this.context.queueFlush(this)}},onBoxMeasured:function(){var d=this.boxParent,c=this.state;if(d&&d.widthModel.shrinkWrap&&!c.boxMeasured&&this.measuresBox){c.boxMeasured=1;d.boxChildMeasured()}},parseMargins:function(g,h){if(g===true){g=5}var e=typeof g,f;if(e=="string"||e=="number"){f=Ext.util.Format.parseBox(g)}else{if(g||h){f={top:0,right:0,bottom:0,left:0};if(h){Ext.apply(f,this.parseMargins(h))}Ext.apply(f,g)}}return f},peek:function(b){return this.props[b]},recoverProp:function(i,g,h){var j=this,k=j.props,l;if(i in g){k[i]=g[i];if(h&&i in h){l=j.dirty||(j.dirty={});l[i]=h[i]}}},redo:function(f){var h=this,j,g,i;h.revertProps(h.props);if(f&&h.wrapsComponent){if(h.childItems){for(i=0,j=h.childItems,g=j.length;i<g;i++){j[i].redo(f)}}for(i=0,j=h.children,g=j.length;i<g;i++){j[i].redo()}}},revertProps:function(g){var f,e=this.flushedProps,h={};for(f in g){if(e.hasOwnProperty(f)){h[f]=g[f]}}this.writeProps(h)},setAttribute:function(e,f){var d=this;if(!d.attributes){d.attributes={}}d.attributes[e]=f;d.markDirty()},setBox:function(c){var d=this;if("left" in c){d.setProp("x",c.left)}if("top" in c){d.setProp("y",c.top)}d.setSize(c.width,c.height)},setContentHeight:function(d,c){if(!c&&this.hasRawContent){return 1}return this.setProp("contentHeight",d)},setContentWidth:function(c,d){if(!d&&this.hasRawContent){return 1}return this.setProp("contentWidth",c)},setContentSize:function(f,e,d){return this.setContentWidth(f,d)+this.setContentHeight(e,d)==2},setProp:function(m,n,i){var h=this,j=typeof n,k,l;if(j=="undefined"||(j==="number"&&isNaN(n))){return 0}if(h.props[m]===n){return 1}h.props[m]=n;++h.context.progressCount;if(i===false){h.fireTriggers("domTriggers",m);h.clearBlocks("domBlocks",m)}else{l=h.styleInfo[m];if(l){if(!h.dirty){h.dirty={}}if(m=="width"||m=="height"){k=h.isBorderBoxValue;if(k==null){h.isBorderBoxValue=k=!!h.el.isBorderBox()}if(!k){h.borderInfo||h.getBorderInfo();h.paddingInfo||h.getPaddingInfo()}}h.dirty[m]=n;h.markDirty()}}h.fireTriggers("triggers",m);h.clearBlocks("blocks",m);return 1},setHeight:function(i,n){var l=this,h=l.target,j,m,k;if(i<0){i=0}if(!l.wrapsComponent){if(!l.setProp("height",i,n)){return NaN}}else{i=Ext.Number.constrain(i,h.minHeight||0,h.maxHeight);if(!l.setProp("height",i,n)){return NaN}j=l.frameBodyContext;if(j){m=l.getFrameInfo();j.setHeight(i-m.height,n)}}return i},setWidth:function(n,h){var l=this,i=l.target,j,m,k;if(n<0){n=0}if(!l.wrapsComponent){if(!l.setProp("width",n,h)){return NaN}}else{n=Ext.Number.constrain(n,i.minWidth||0,i.maxWidth);if(!l.setProp("width",n,h)){return NaN}j=l.frameBodyContext;if(j){m=l.getFrameInfo();j.setWidth(n-m.width,h)}}return n},setSize:function(f,e,d){this.setWidth(f,d);this.setHeight(e,d)},translateProps:{x:"left",y:"top"},undo:function(f){var h=this,j,g,i;h.revertProps(h.lastBox);if(f&&h.wrapsComponent){if(h.childItems){for(i=0,j=h.childItems,g=j.length;i<g;i++){j[i].undo(f)}}for(i=0,j=h.children,g=j.length;i<g;i++){j[i].undo()}}},unsetProp:function(c){var d=this.dirty;delete this.props[c];if(d){delete d[c]}},writeProps:function(M,N){if(!(M&&typeof M=="object")){Ext.Logger.warn("writeProps expected dirtyProps to be an object");return}var w=this,O=w.el,K={},L=0,P=w.styleInfo,x,F,C,G="x" in M,H="y" in M,I=M.x,J=M.y,B=M.width,D=M.height,y=w.isBorderBoxValue,v=w.target,A=Math.max,z=0,E=0;if("displayed" in M){O.setDisplayed(M.displayed)}for(F in M){if(N){w.fireTriggers("domTriggers",F);w.clearBlocks("domBlocks",F);w.flushedProps[F]=1}x=P[F];if(x&&x.dom){if(x.suffix&&(C=parseInt(M[F],10))){K[F]=C+x.suffix}else{K[F]=M[F]}++L}}if(G||H){if(v.isComponent){v.setPosition(I||w.props.x,J||w.props.y)}else{if(G){K.left=I+"px";++L}if(H){K.top=J+"px";++L}}}if(!y&&(B>0||D>0)){if(!(w.borderInfo&&w.paddingInfo)){throw Error("Needed to have gotten the borderInfo and paddingInfo when the width or height was setProp'd")}if(!w.frameBodyContext){z=w.paddingInfo.width;E=w.paddingInfo.height}if(B){B=A(parseInt(B,10)-(w.borderInfo.width+z),0);K.width=B+"px";++L}if(D){D=A(parseInt(D,10)-(w.borderInfo.height+E),0);K.height=D+"px";++L}}if(L){O.setStyle(K)}}},function(){var f={dom:true,parseInt:true,suffix:"px"},d={dom:true},e={dom:false};this.prototype.styleInfo={childrenDone:e,componentChildrenDone:e,containerChildrenDone:e,containerLayoutDone:e,displayed:e,done:e,x:e,y:e,left:f,top:f,right:f,bottom:f,width:f,height:f,"border-top-width":f,"border-right-width":f,"border-bottom-width":f,"border-left-width":f,"margin-top":f,"margin-right":f,"margin-bottom":f,"margin-left":f,"padding-top":f,"padding-right":f,"padding-bottom":f,"padding-left":f,"line-height":d,display:d}});Ext.define("Ext.layout.Context",{requires:["Ext.util.Queue","Ext.layout.ContextItem","Ext.layout.Layout","Ext.fx.Anim","Ext.fx.Manager"],currentOwnerCtContext:null,remainingLayouts:0,state:0,constructor:function(d){var c=this;Ext.apply(c,d);c.items={};c.layouts={};c.blockCount=0;c.cycleCount=0;c.flushCount=0;c.calcCount=0;c.animateQueue=c.newQueue();c.completionQueue=c.newQueue();c.finalizeQueue=c.newQueue();c.finishQueue=c.newQueue();c.flushQueue=c.newQueue();c.invalidateData={};c.layoutQueue=c.newQueue();c.invalidQueue=[];c.triggers={data:{},dom:{}}},callLayout:function(d,e){this.currentLayout=d;var f=this.getCmp(d.owner);d[e](f)},cancelComponent:function(x,D){var t=this,y=x,w=!x.isComponent,C=w?y.length:1,A,B,u,v,z,k,s,r,i;for(A=0;A<C;++A){if(w){x=y[A]}if(!D){s=t.invalidQueue;u=s.length;if(u){t.invalidQueue=k=[];for(B=0;B<u;++B){r=s[B];i=r.item.target;if(i!=x&&!i.isDescendant(x)){k.push(r)}}}}z=x.componentLayout;t.cancelLayout(z);if(z.getLayoutItems){v=z.getLayoutItems();if(v.length){t.cancelComponent(v,true)}}if(x.isContainer&&!x.collapsed){z=x.layout;t.cancelLayout(z);v=z.getVisibleItems();if(v.length){t.cancelComponent(v,true)}}}},cancelLayout:function(c){var d=this;d.completionQueue.remove(c);d.finalizeQueue.remove(c);d.finishQueue.remove(c);d.layoutQueue.remove(c);if(c.running){d.layoutDone(c)}c.ownerContext=null},clearTriggers:function(m,l){var r=m.id,k=this.triggers[l?"dom":"data"][r],q=(k&&k.length)||0,n,o,i,p;for(o=0;o<q;++o){p=k[o];i=p.item;n=l?i.domTriggers:i.triggers;delete n[p.prop][r]}},finishInvalidate:function(f,h,g){if(f[g]){var i=this,j=i.currentLayout;i.currentLayout=f.layout||null;f[g](h,f);i.currentLayout=j}},flush:function(){var g=this,f=g.flushQueue.clear(),h=f.length,e;if(h){++g.flushCount;for(e=0;e<h;++e){f[e].flush()}}},flushAnimations:function(){var g=this,e=g.animateQueue.clear(),f=e.length,h;if(f){for(h=0;h<f;h++){if(e[h].target.animate!==false){e[h].flushAnimations()}}Ext.fx.Manager.runner()}},flushInvalidates:function(){var j=this,i=j.invalidQueue,k=i&&i.length,h,l,m,n;j.invalidQueue=[];if(k){l=[];for(n=0;n<k;++n){h=(m=i[n]).item.target;if(!h.container.isDetachedBody){l.push(h);if(m.options){j.invalidateData[h.id]=m.options}}}j.invalidate(l,null)}},flushLayouts:function(l,j,p){var m=this,k=p?m[l].items:m[l].clear(),n=k.length,i,o;if(n){for(i=0;i<n;++i){o=k[i];if(!o.running){m.callLayout(o,j)}}m.currentLayout=null}},getCmp:function(b){return this.getItem(b,b.el)},getEl:function(d,e){var f=this.getItem(e,e);if(!f.parent){f.parent=d;if(d.children.length){d.children.push(f)}else{d.children=[f]}}return f},getItem:function(i,f){var h=f.id,g=this.items,j=g[h]||(g[h]=new Ext.layout.ContextItem({context:this,target:i,el:f,ownerCtContext:this.currentOwnerCtContext}));return j},handleFailure:function(){var f=this.layouts,d,e;Ext.failedLayouts=(Ext.failedLayouts||0)+1;Ext.log("Layout run failed");for(e in f){d=f[e];if(f.hasOwnProperty(e)){d.running=false;d.ownerContext=null}}},invalidate:function(I,G,K){var i=this,J=!I.isComponent,T=i.items,S=i.state>0,F=i.currentOwnerCtContext,N,B,P,C,L,D,E,k,z,H,O,Q,A,R,M;i.currentOwnerCtContext=G;for(D=0,O=J?I.length:1;D<O;++D){k=J?I[D]:I;if(k.rendered&&!k.hidden){L=!k.componentLayout.ownerContext;z=i.getCmp(k);if(L){if(k.beforeLayout){k.beforeLayout()}if(S&&!G&&(C=k.ownerCt)){G=T[C.el.id]}z.init(G)}N=B=P=true;Q=k.componentLayout;Q.ownerContext=z;if(Q.getLayoutItems){Q.renderChildren();H=Q.getLayoutItems();if(H.length){i.invalidate(H,z,true);N=false}}if(k.isContainer&&!k.collapsed){A=k.layout;A.ownerContext=z;A.renderChildren();P=false;H=A.getVisibleItems();if(H.length){i.invalidate(H,z,true);B=false}}else{A=null}if(L){z.hasRawContent=true;if(z.target.isContainer){if(z.target.items.items.length||!z.target.getTargetEl().dom.firstChild){z.hasRawContent=false}}}else{z.doInvalidate(K);H=z.children;for(E=H.length;E--;){H[E].doInvalidate(true)}}R=z.props;if(N){R.componentChildrenDone=true;if(B){R.childrenDone=true}}if(B){R.containerChildrenDone=true}if(P){R.containerLayoutDone=true}M=i.invalidateData[z.id];if(M){delete i.invalidateData[z.id];if(M.state){Ext.apply(z.state,M.state)}i.finishInvalidate(M,z,"before")}i.resetLayout(Q,z,L);if(A){i.resetLayout(A,z,L)}if(M){i.finishInvalidate(M,z,"after")}if(z.boxChildren&&z.widthModel.shrinkWrap){z.el.setWidth(10000);z.state.blocks=(z.state.blocks||0)+1}if(L){z.initAnimatePolicy()}}}i.currentOwnerCtContext=F},layoutDone:function(d){var f=d.ownerContext,e;d.running=false;if(d.isComponentLayout){if(f.measuresBox){f.onBoxMeasured()}f.setProp("done",true);e=f.ownerCtContext;if(e){if(f.target.ownerLayout.isComponentLayout){if(!--e.remainingComponentChildLayouts){e.setProp("componentChildrenDone",true)}}else{if(!--e.remainingContainerChildLayouts){e.setProp("containerChildrenDone",true)}}if(!--e.remainingChildLayouts){e.setProp("childrenDone",true)}}}else{f.setProp("containerLayoutDone",true)}--this.remainingLayouts;++this.progressCount},newQueue:function(){return new Ext.util.Queue()},queueAnimation:function(b){this.animateQueue.add(b)},queueCompletion:function(b){this.completionQueue.add(b)},queueFinalize:function(b){this.finalizeQueue.add(b)},queueFlush:function(b){this.flushQueue.add(b)},chainFns:function(g,h,j){var f=g[j],i=h[j];return function(a){if(f){f.call(g.scope||g,a,g)}i.call(h.scope||h,a,h)}},queueInvalidate:function(m,l){var p=this,n=[],o=p.invalidQueue,q=o.length,s,u,r,v,t;if(m.isComponent){m=p.getCmp(s=m)}else{s=m.target}while(q--){u=o[q];r=u.item.target;if(s.isDescendant(r)){return}if(r==s){if(!(v=u.options)){u.options=l}else{if(l){if(!(t=v.state)){v.state=l.state}else{if(l.state){Ext.apply(t,l.state)}}if(l.before){v.before=p.chainFns(v,l,"before")}if(l.after){v.after=p.chainFns(v,l,"after")}}}return}if(!r.isDescendant(s)){n.push(u)}}n.push({item:m,options:l});p.invalidQueue=n},queueItemLayouts:function(f){var e=f.isComponent?f:f.target,d=e.componentLayout;if(!d.pending&&!d.invalid&&!d.done){this.queueLayout(d)}d=e.layout;if(d&&!d.pending&&!d.invalid&&!d.done){this.queueLayout(d)}},queueLayout:function(b){this.layoutQueue.add(b);b.pending=true},resetLayout:function(j,i,h){var f=this,g;f.currentLayout=j;j.done=false;j.pending=true;j.firedTriggers=0;f.layoutQueue.add(j);if(h){f.layouts[j.id]=j;j.running=true;if(j.finishedLayout){f.finishQueue.add(j)}++f.remainingLayouts;++j.layoutCount;j.beginCount=0;j.blockCount=0;j.calcCount=0;j.triggerCount=0;if(j.isComponentLayout&&(g=i.ownerCtContext)){if(i.target.ownerLayout.isComponentLayout){++g.remainingComponentChildLayouts}else{++g.remainingContainerChildLayouts}++g.remainingChildLayouts}if(!j.initialized){j.initLayout()}j.beginLayout(i)}else{++j.beginCount;if(!j.running){++f.remainingLayouts;j.running=true;if(j.isComponentLayout){i.unsetProp("done");g=i.ownerCtContext;if(g){if(i.target.ownerLayout.isComponentLayout){if(++g.remainingComponentChildLayouts==1){g.unsetProp("componentChildrenDone")}}else{if(++g.remainingContainerChildLayouts==1){g.unsetProp("containerChildrenDone")}}if(++g.remainingChildLayouts==1){g.unsetProp("childrenDone")}}}f.completionQueue.remove(j);f.finalizeQueue.remove(j)}}j.beginLayoutCycle(i,h)},run:function(){var f=this,d=false,e=100;f.flushInvalidates();f.state=1;f.totalCount=f.layoutQueue.getCount();f.flush();while((f.remainingLayouts||f.invalidQueue.length)&&e--){if(f.invalidQueue.length){f.flushInvalidates()}if(f.runCycle()){d=false}else{if(!d){f.flush();d=true;f.flushLayouts("completionQueue","completeLayout")}else{f.state=2;break}}if(!(f.remainingLayouts||f.invalidQueue.length)){f.flush();f.flushLayouts("completionQueue","completeLayout");f.flushLayouts("finalizeQueue","finalizeLayout")}}return f.runComplete()},runComplete:function(){var b=this;b.state=2;if(b.remainingLayouts){b.handleFailure();return false}b.flush();b.flushLayouts("finishQueue","finishedLayout",true);b.flushLayouts("finishQueue","notifyOwner");b.flush();b.flushAnimations();return true},runCycle:function(){var h=this,g=h.layoutQueue.clear(),e=g.length,f;++h.cycleCount;h.progressCount=0;for(f=0;f<e;++f){h.runLayout(h.currentLayout=g[f])}h.currentLayout=null;return h.progressCount>0},runLayout:function(d){var e=this,f=e.getCmp(d.owner);d.pending=false;if(f.state.blocks){return}d.done=true;++d.calcCount;++e.calcCount;d.calculate(f);if(d.done){e.layoutDone(d);if(d.completeLayout){e.queueCompletion(d)}if(d.finalizeLayout){e.queueFinalize(d)}}else{if(!d.pending&&!d.invalid&&!(d.blockCount+d.triggerCount-d.firedTriggers)){e.queueLayout(d)}}},setItemSize:function(j,k,h){var m=j,i=1,n,l;if(j.isComposite){m=j.elements;i=m.length;j=m[0]}else{if(!j.dom&&!j.el){i=m.length;j=m[0]}}for(l=0;l<i;){n=this.get(j);n.setSize(k,h);j=m[++l]}}});Ext.define("Ext.draw.Surface",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.draw.CompositeSprite"],uses:["Ext.draw.engine.Svg","Ext.draw.engine.Vml","Ext.draw.engine.SvgExporter","Ext.draw.engine.ImageExporter"],separatorRe:/[, ]+/,statics:{create:function(f,i){i=i||["Svg","Vml"];var j=0,g=i.length,h;for(;j<g;j++){if(Ext.supports[i[j]]!==false){return Ext.create("Ext.draw.engine."+i[j],f)}}return false},save:function(e,f){var g={"image/png":"Image","image/jpeg":"Image","image/svg+xml":"Svg"},h=g[e.type]||"Svg";return(Ext.draw.engine[h+"Exporter"]).self.generate(e,f)}},availableAttrs:{blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,"dominant-baseline":"auto",fill:"none","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:"",height:0,hidden:false,href:"http://sencha.com/",opacity:1,path:"M0,0",radius:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"none","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank",text:"","text-anchor":"middle",title:"Ext Draw",width:0,x:0,y:0,zIndex:0},container:undefined,height:352,width:512,x:0,y:0,orderSpritesByZIndex:true,constructor:function(d){var c=this;d=d||{};Ext.apply(c,d);c.domRef=Ext.getDoc().dom;c.customAttributes={};c.addEvents("mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","click","dblclick");c.mixins.observable.constructor.call(c);c.getId();c.initGradients();c.initItems();if(c.renderTo){c.render(c.renderTo);delete c.renderTo}c.initBackground(d.background)},initSurface:Ext.emptyFn,renderItem:Ext.emptyFn,renderItems:Ext.emptyFn,setViewBox:function(e,g,h,f){if(isFinite(e)&&isFinite(g)&&isFinite(h)&&isFinite(f)){this.viewBox={x:e,y:g,width:h,height:f};this.applyViewBox()}},addCls:Ext.emptyFn,removeCls:Ext.emptyFn,setStyle:Ext.emptyFn,initGradients:function(){if(this.hasOwnProperty("gradients")){var f=this.gradients,g=f.length,e=this.addGradient,h;if(f){for(h=0;h<g;h++){if(e.call(this,f[h],h,g)===false){break}}}}},initItems:function(){var b=this.items;this.items=new Ext.draw.CompositeSprite();this.items.autoDestroy=true;this.groups=new Ext.draw.CompositeSprite();if(b){this.add(b)}},initBackground:function(h){var l=this,m=l.width,i=l.height,k,j,n;if(Ext.isString(h)){h={fill:h}}if(h){if(h.gradient){j=h.gradient;k=j.id;l.addGradient(j);l.background=l.add({type:"rect",x:0,y:0,width:m,height:i,fill:"url(#"+k+")",zIndex:-1})}else{if(h.fill){l.background=l.add({type:"rect",x:0,y:0,width:m,height:i,fill:h.fill,zIndex:-1})}else{if(h.image){l.background=l.add({type:"image",x:0,y:0,width:m,height:i,src:h.image,zIndex:-1})}}}l.background.bboxExcluded=true}},setSize:function(d,c){this.applyViewBox()},scrubAttrs:function(i){var j,f={},g={},h=i.attr;for(j in h){if(this.translateAttrs.hasOwnProperty(j)){f[this.translateAttrs[j]]=h[j];g[this.translateAttrs[j]]=true}else{if(this.availableAttrs.hasOwnProperty(j)&&!g[j]){f[j]=h[j]}}}return f},onClick:function(b){this.processEvent("click",b)},onDblClick:function(b){this.processEvent("dblclick",b)},onMouseUp:function(b){this.processEvent("mouseup",b)},onMouseDown:function(b){this.processEvent("mousedown",b)},onMouseOver:function(b){this.processEvent("mouseover",b)},onMouseOut:function(b){this.processEvent("mouseout",b)},onMouseMove:function(b){this.fireEvent("mousemove",b)},onMouseEnter:Ext.emptyFn,onMouseLeave:Ext.emptyFn,addGradient:Ext.emptyFn,add:function(){var m=Array.prototype.slice.call(arguments),k,o,r=m.length>1,l,q,p,n,i;if(r||Ext.isArray(m[0])){l=r?m:m[0];q=[];for(p=0,n=l.length;p<n;p++){i=l[p];i=this.add(i);q.push(i)}return q}k=this.prepareItems(m[0],true)[0];this.insertByZIndex(k);this.onAdd(k);return k},insertByZIndex:function(l){var o=this,q=o.items.items,r=q.length,k=Math.ceil,n=l.attr.zIndex,m=r,s=m-1,p=0,t;if(o.orderSpritesByZIndex&&r&&n<q[s].attr.zIndex){while(p<=s){m=k((p+s)/2);t=q[m].attr.zIndex;if(t>n){s=m-1}else{if(t<n){p=m+1}else{break}}}while(m<r&&q[m].attr.zIndex<=n){m++}}o.items.insert(m,l);return m},onAdd:function(k){var i=k.group,g=k.draggable,h,j,l;if(i){h=[].concat(i);j=h.length;for(l=0;l<j;l++){i=h[l];this.getGroup(i).add(k)}delete k.group}if(g){k.initDraggable()}},remove:function(f,h){if(f){this.items.remove(f);var g=[].concat(this.groups),i=g.length,j;for(j=0;j<i;j++){g[j].remove(f)}f.onRemove();if(h===true){f.destroy()}}},removeAll:function(g){var f=this.items.items,h=f.length,e;for(e=h-1;e>-1;e--){this.remove(f[e],g)}},onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,applyViewBox:function(){var s=this,l=s.viewBox,v=s.width||1,p=s.height||1,q,r,n,u,o,t,m;if(l&&(v||p)){q=l.x;r=l.y;n=l.width;u=l.height;o=p/u;t=v/n;m=Math.min(t,o);if(n*m<v){q-=(v-n*m)/2/m}if(u*m<p){r-=(p-u*m)/2/m}s.viewBoxShift={dx:-q,dy:-r,scale:m};if(s.background){s.background.setAttributes(Ext.apply({},{x:q,y:r,width:v/m,height:p/m},{hidden:false}),true)}}else{if(s.background&&v&&p){s.background.setAttributes(Ext.apply({x:0,y:0,width:v,height:p},{hidden:false}),true)}}},getBBox:function(e,d){var f=this["getPath"+e.type](e);if(d){e.bbox.plain=e.bbox.plain||Ext.draw.Draw.pathDimensions(f);return e.bbox.plain}if(e.dirtyTransform){this.applyTransformations(e,true)}e.bbox.transform=e.bbox.transform||Ext.draw.Draw.pathDimensions(Ext.draw.Draw.mapPath(f,e.matrix));return e.bbox.transform},transformToViewBox:function(f,g){if(this.viewBoxShift){var h=this,e=h.viewBoxShift;return[f/e.scale-e.dx,g/e.scale-e.dy]}else{return[f,g]}},applyTransformations:function(e,g){if(e.type=="text"){e.bbox.transform=0;this.transform(e,false)}e.dirtyTransform=false;var h=this,f=e.attr;if(f.translation.x!=null||f.translation.y!=null){h.translate(e)}if(f.scaling.x!=null||f.scaling.y!=null){h.scale(e)}if(f.rotation.degrees!=null){h.rotate(e)}e.bbox.transform=0;this.transform(e,g);e.transformations=[]},rotate:function(g){var h,f=g.attr.rotation.degrees,i=g.attr.rotation.x,j=g.attr.rotation.y;if(!Ext.isNumber(i)||!Ext.isNumber(j)){h=this.getBBox(g,true);i=!Ext.isNumber(i)?h.x+h.width/2:i;j=!Ext.isNumber(j)?h.y+h.height/2:j}g.transformations.push({type:"rotate",degrees:f,x:i,y:j})},translate:function(d){var e=d.attr.translation.x||0,f=d.attr.translation.y||0;d.transformations.push({type:"translate",x:e,y:f})},scale:function(g){var j,h=g.attr.scaling.x||1,i=g.attr.scaling.y||1,k=g.attr.scaling.centerX,l=g.attr.scaling.centerY;if(!Ext.isNumber(k)||!Ext.isNumber(l)){j=this.getBBox(g,true);k=!Ext.isNumber(k)?j.x+j.width/2:k;l=!Ext.isNumber(l)?j.y+j.height/2:l}g.transformations.push({type:"scale",x:h,y:i,centerX:k,centerY:l})},rectPath:function(g,h,f,j,i){if(i){return[["M",g+i,h],["l",f-i*2,0],["a",i,i,0,0,1,i,i],["l",0,j-i*2],["a",i,i,0,0,1,-i,i],["l",i*2-f,0],["a",i,i,0,0,1,-i,-i],["l",0,i*2-j],["a",i,i,0,0,1,i,-i],["z"]]}return[["M",g,h],["l",f,0],["l",0,j],["l",-f,0],["z"]]},ellipsePath:function(f,g,h,e){if(e==null){e=h}return[["M",f,g],["m",0,-e],["a",h,e,0,1,1,0,2*e],["a",h,e,0,1,1,0,-2*e],["z"]]},getPathpath:function(b){return b.attr.path},getPathcircle:function(d){var a=d.attr;return this.ellipsePath(a.x,a.y,a.radius,a.radius)},getPathellipse:function(d){var a=d.attr;return this.ellipsePath(a.x,a.y,a.radiusX||(a.width/2)||0,a.radiusY||(a.height/2)||0)},getPathrect:function(d){var a=d.attr;return this.rectPath(a.x||0,a.y||0,a.width||0,a.height||0,a.r||0)},getPathimage:function(d){var a=d.attr;return this.rectPath(a.x||0,a.y||0,a.width,a.height)},getPathtext:function(d){var c=this.getBBoxText(d);return this.rectPath(c.x,c.y,c.width,c.height)},createGroup:function(c){var d=this.groups.get(c);if(!d){d=new Ext.draw.CompositeSprite({surface:this});d.id=c||Ext.id(null,"ext-surface-group-");this.groups.add(d)}return d},getGroup:function(c){var d;if(typeof c=="string"){d=this.groups.get(c);if(!d){d=this.createGroup(c)}}else{d=c}return d},prepareItems:function(g,j){g=[].concat(g);var h,f,i;for(f=0,i=g.length;f<i;f++){h=g[f];if(!(h instanceof Ext.draw.Sprite)){h.surface=this;g[f]=this.createItem(h)}else{h.surface=this}}return g},setText:Ext.emptyFn,createItem:Ext.emptyFn,getId:function(){return this.id||(this.id=Ext.id(null,"ext-surface-"))},destroy:function(){var b=this;delete b.domRef;if(b.background){b.background.destroy()}b.removeAll(true);Ext.destroy(b.groups.items)}});Ext.define("Ext.draw.Component",{alias:"widget.draw",extend:"Ext.Component",requires:["Ext.draw.Surface","Ext.layout.component.Draw"],enginePriority:["Svg","Vml"],baseCls:Ext.baseCSSPrefix+"surface",componentLayout:"draw",viewBox:true,shrinkWrap:3,autoSize:false,initComponent:function(){this.callParent(arguments);this.addEvents("mousedown","mouseup","mousemove","mouseenter","mouseleave","click","dblclick")},onRender:function(){var o=this,j=o.viewBox,q=o.autoSize,l,p,r,k,m,n;o.callParent(arguments);if(o.createSurface()!==false){p=o.surface.items;if(j||q){l=p.getBBox();r=l.width;k=l.height;m=l.x;n=l.y;if(o.viewBox){o.surface.setViewBox(m,n,r,k)}else{o.autoSizeSurface()}}}},autoSizeSurface:function(){var b=this.surface.items.getBBox();this.setSurfaceSize(b.width,b.height)},setSurfaceSize:function(d,e){this.surface.setSize(d,e);if(this.autoSize){var f=this.surface.items.getBBox();this.surface.setViewBox(f.x,f.y-(+Ext.isOpera),d,e)}},createSurface:function(){var g=this,e=Ext.applyIf({renderTo:g.el,height:g.height,width:g.width,items:g.items},g.initialConfig),f;delete e.listeners;f=Ext.draw.Surface.create(e);if(!f){return false}g.surface=f;function h(a){return function(b){g.fireEvent(a,b)}}f.on({scope:g,mouseup:h("mouseup"),mousedown:h("mousedown"),mousemove:h("mousemove"),mouseenter:h("mouseenter"),mouseleave:h("mouseleave"),click:h("click"),dblclick:h("dblclick")})},onDestroy:function(){Ext.destroy(this.surface);this.callParent(arguments)}});Ext.define("Ext.resizer.ResizeTracker",{extend:"Ext.dd.DragTracker",dynamic:true,preserveRatio:false,constrainTo:null,proxyCls:Ext.baseCSSPrefix+"resizable-proxy",constructor:function(f){var i=this,j,g,h;if(!f.el){if(f.target.isComponent){i.el=f.target.getEl()}else{i.el=f.target}}this.callParent(arguments);if(i.preserveRatio&&i.minWidth&&i.minHeight){j=i.minWidth/i.el.getWidth();g=i.minHeight/i.el.getHeight();if(g>j){i.minWidth=i.el.getWidth()*g}else{i.minHeight=i.el.getHeight()*j}}if(i.throttle){h=Ext.Function.createThrottled(function(){Ext.resizer.ResizeTracker.prototype.resize.apply(i,arguments)},i.throttle);i.resize=function(b,a,c){if(c){Ext.resizer.ResizeTracker.prototype.resize.apply(i,arguments)}else{h.apply(null,arguments)}}}},onBeforeStart:function(b){this.startBox=this.el.getBox()},getDynamicTarget:function(){var d=this,c=d.target;if(d.dynamic){return c}else{if(!d.proxy){d.proxy=d.createProxy(c)}}d.proxy.show();return d.proxy},createProxy:function(h){var e,f=this.proxyCls,g;if(h.isComponent){e=h.getProxy().addCls(f)}else{g=Ext.getBody();if(Ext.scopeResetCSS){g=Ext.getBody().createChild({cls:Ext.resetCls})}e=h.createProxy({tag:"div",cls:f,id:h.id+"-rzproxy"},g)}e.removeCls(Ext.baseCSSPrefix+"proxy-el");return e},onStart:function(b){this.activeResizeHandle=Ext.get(this.getDragTarget().id);if(!this.dynamic){this.resize(this.startBox,{horizontal:"none",vertical:"none"})}},onDrag:function(b){if(this.dynamic||this.proxy){this.updateDimensions(b)}},updateDimensions:function(z,F){var y=this,N=y.activeResizeHandle.region,L=y.getOffset(y.constrainTo?"dragTarget":null),H=y.startBox,K,C=0,x=0,I,B,P=0,e=0,w,E=L[0]<0?"right":"left",A=L[1]<0?"down":"up",J,O,M,D,G;switch(N){case"south":x=L[1];O=2;break;case"north":x=-L[1];e=-x;O=2;break;case"east":C=L[0];O=1;break;case"west":C=-L[0];P=-C;O=1;break;case"northeast":x=-L[1];e=-x;C=L[0];J=[H.x,H.y+H.height];O=3;break;case"southeast":x=L[1];C=L[0];J=[H.x,H.y];O=3;break;case"southwest":C=-L[0];P=-C;x=L[1];J=[H.x+H.width,H.y];O=3;break;case"northwest":x=-L[1];e=-x;C=-L[0];P=-C;J=[H.x+H.width,H.y+H.height];O=3;break}M={width:H.width+C,height:H.height+x,x:H.x+P,y:H.y+e};I=Ext.Number.snap(M.width,y.widthIncrement);B=Ext.Number.snap(M.height,y.heightIncrement);if(I!=M.width||B!=M.height){switch(N){case"northeast":M.y-=B-M.height;break;case"north":M.y-=B-M.height;break;case"southwest":M.x-=I-M.width;break;case"west":M.x-=I-M.width;break;case"northwest":M.x-=I-M.width;M.y-=B-M.height}M.width=I;M.height=B}if(M.width<y.minWidth||M.width>y.maxWidth){M.width=Ext.Number.constrain(M.width,y.minWidth,y.maxWidth);if(P){M.x=H.x+(H.width-M.width)}}else{y.lastX=M.x}if(M.height<y.minHeight||M.height>y.maxHeight){M.height=Ext.Number.constrain(M.height,y.minHeight,y.maxHeight);if(e){M.y=H.y+(H.height-M.height)}}else{y.lastY=M.y}if(y.preserveRatio||z.shiftKey){K=y.startBox.width/y.startBox.height;D=Math.min(Math.max(y.minHeight,M.width/K),y.maxHeight);G=Math.min(Math.max(y.minWidth,M.height*K),y.maxWidth);if(O==1){M.height=D}else{if(O==2){M.width=G}else{w=Math.abs(J[0]-this.lastXY[0])/Math.abs(J[1]-this.lastXY[1]);if(w>K){M.height=D}else{M.width=G}if(N=="northeast"){M.y=H.y-(M.height-H.height)}else{if(N=="northwest"){M.y=H.y-(M.height-H.height);M.x=H.x-(M.width-H.width)}else{if(N=="southwest"){M.x=H.x-(M.width-H.width)}}}}}}if(x===0){A="none"}if(C===0){E="none"}y.resize(M,{horizontal:E,vertical:A},F)},getResizeTarget:function(b){return b?this.target:this.getDynamicTarget()},resize:function(e,g,f){var h=this.getResizeTarget(f);if(h.isComponent){h.setSize(e.width,e.height);if(h.floating){h.setPagePosition(e.x,e.y)}}else{h.setBox(e)}h=this.originalTarget;if(h&&(this.dynamic||f)){if(h.isComponent){h.setSize(e.width,e.height);if(h.floating){h.setPagePosition(e.x,e.y)}}else{h.setBox(e)}}},onEnd:function(b){this.updateDimensions(b,true);if(this.proxy){this.proxy.hide()}}});Ext.define("Ext.draw.engine.SvgExporter",{singleton:true,statics:(function(){var o,n,p,k,j=function(a){o=a;n=o.length;p=o.width;k=o.height},m={path:function(a){var d=a.attr,e=d.path,b="",g,f,c;if(Ext.isArray(e[0])){c=e.length;for(f=0;f<c;f++){b+=e[f].join(" ")}}else{if(Ext.isArray(e)){b=e.join(" ")}else{b=e.replace(/,/g," ")}}g=q({d:b,fill:d.fill||"none",stroke:d.stroke,"fill-opacity":d.opacity,"stroke-width":d["stroke-width"],"stroke-opacity":d["stroke-opacity"],"z-index":d.zIndex,transform:a.matrix.toSvg()});return"<path "+g+"/>"},text:function(b){var e=b.attr,i=/(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)\s('*.*'*)/,f=i.exec(e.font),t=(f&&f[1])||"12",g=(f&&f[3])||"Arial",a=e.text,c=(Ext.isFF3_0||Ext.isFF3_5)?2:4,h="",d;b.getBBox();h+='<tspan x="'+(e.x||"")+'" dy="';h+=(t/c)+'">';h+=Ext.htmlEncode(a)+"</tspan>";d=q({x:e.x,y:e.y,"font-size":t,"font-family":g,"font-weight":e["font-weight"],"text-anchor":e["text-anchor"],fill:e.fill||"#000","fill-opacity":e.opacity,transform:b.matrix.toSvg()});return"<text "+d+">"+h+"</text>"},rect:function(b){var c=b.attr,a=q({x:c.x,y:c.y,rx:c.rx,ry:c.ry,width:c.width,height:c.height,fill:c.fill||"none","fill-opacity":c.opacity,stroke:c.stroke,"stroke-opacity":c["stroke-opacity"],"stroke-width":c["stroke-width"],transform:b.matrix&&b.matrix.toSvg()});return"<rect "+a+"/>"},circle:function(b){var c=b.attr,a=q({cx:c.x,cy:c.y,r:c.radius,fill:c.translation.fill||c.fill||"none","fill-opacity":c.opacity,stroke:c.stroke,"stroke-opacity":c["stroke-opacity"],"stroke-width":c["stroke-width"],transform:b.matrix.toSvg()});return"<circle "+a+" />"},image:function(b){var c=b.attr,a=q({x:c.x-(c.width/2>>0),y:c.y-(c.height/2>>0),width:c.width,height:c.height,"xlink:href":c.src,transform:b.matrix.toSvg()});return"<image "+a+" />"}},r=function(){var a='<?xml version="1.0" standalone="yes"?>';a+='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';return a},l=function(){var J='<svg width="'+p+'px" height="'+k+'px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">',U="",I,M,K,T,L,f,e,i,P,g,b,V,d,N,O,a,h,R,Q,S;K=o.items.items;M=K.length;L=function(A){var t=A.childNodes,w=t.length,x=0,z,y,s="",C,u,B,v;for(;x<w;x++){C=t[x];u=C.attributes;B=C.tagName;s+="<"+B;for(y=0,z=u.length;y<z;y++){v=u.item(y);s+=" "+v.name+'="'+v.value+'"'}s+=">";if(C.childNodes.length>0){s+=L(C)}s+="</"+B+">"}return s};if(o.getDefs){U=L(o.getDefs())}else{i=o.gradientsColl;if(i){P=i.keys;g=i.items;b=0;V=P.length}for(;b<V;b++){d=P[b];N=g[b];T=o.gradientsColl.getByKey(d);U+='<linearGradient id="'+d+'" x1="0" y1="0" x2="1" y2="1">';var c=T.colors.replace(/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,"rgb($1|$2|$3)");c=c.replace(/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,([\d\.]+)\)/g,"rgba($1|$2|$3|$4)");f=c.split(",");for(O=0,h=f.length;O<h;O++){e=f[O].split(" ");c=Ext.draw.Color.fromString(e[1].replace(/\|/g,","));U+='<stop offset="'+e[0]+'" stop-color="'+c.toString()+'" stop-opacity="1"></stop>'}U+="</linearGradient>"}}J+="<defs>"+U+"</defs>";J+=m.rect({attr:{width:"100%",height:"100%",fill:"#fff",stroke:"none",opacity:"0"}});R=new Array(M);for(O=0;O<M;O++){R[O]=O}R.sort(function(s,t){Q=K[s].attr.zIndex||0;S=K[t].attr.zIndex||0;if(Q==S){return s-t}return Q-S});for(O=0;O<M;O++){I=K[R[O]];if(!I.attr.hidden){J+=m[I.type](I)}}J+="</svg>";return J},q=function(a){var b="",c;for(c in a){if(a.hasOwnProperty(c)&&a[c]!=null){b+=c+'="'+a[c]+'" '}}return b};return{generate:function(a,b){j(b);return r()+l()}}}())});Ext.define("Ext.draw.engine.ImageExporter",{singleton:true,statics:(function(){var s={"image/png":1,"image/jpeg":1},l=function(a){if(a.hasOwnProperty("width")){u=a.width}if(a.hasOwnProperty("height")){o=a.height}if(a.hasOwnProperty("type")&&s[a.type]){r=a.type}else{return false}if(m&&n&&v&&q&&p){return true}m=m||Ext.get(document.createElement("form"));m.set({action:"http://svg.sencha.io",method:"POST"});n=n||Ext.get(document.createElement("input"));n.set({name:"svg",type:"hidden"});v=v||Ext.get(document.createElement("input"));v.set({name:"type",type:"hidden"});q=q||Ext.get(document.createElement("input"));q.set({name:"width",type:"hidden"});p=p||Ext.get(document.createElement("input"));p.set({name:"height",type:"hidden"});m.appendChild(n);m.appendChild(v);m.appendChild(q);m.appendChild(p);Ext.getBody().appendChild(m);return true},t=function(b){var a=Ext.draw.engine.SvgExporter.self.generate({},b);q.set({value:u||b.width});p.set({value:o||b.height});if(r){v.set({value:r})}n.set({value:a});m.dom.submit()},m,v,n,q,p,r,u,o;return{generate:function(a,b){if(l(a)){t(b)}else{return false}}}}())});Ext.define("Ext.ShadowPool",{singleton:true,requires:["Ext.DomHelper"],markup:(function(){return Ext.String.format('<div class="{0}{1}-shadow" role="presentation"></div>',Ext.baseCSSPrefix,Ext.isIE&&!Ext.supports.CSS3BoxShadow?"ie":"css")}()),shadows:[],pull:function(){var b=this.shadows.shift();if(!b){b=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,this.markup));b.autoBoxAdjust=false}return b},push:function(b){this.shadows.push(b)},reset:function(){var f=[].concat(this.shadows),d,e=f.length;for(d=0;d<e;d++){f[d].remove()}this.shadows=[]}});Ext.define("Ext.draw.Matrix",{requires:["Ext.draw.Draw"],constructor:function(e,f,a,b,c,d){if(e!=null){this.matrix=[[e,a,c],[f,b,d],[0,0,1]]}else{this.matrix=[[1,0,0],[0,1,0],[0,0,1]]}},add:function(z,c,f,u,w,x){var e=this,y=[[],[],[]],a=[[z,f,w],[c,u,x],[0,0,1]],b,d,t,v;for(b=0;b<3;b++){for(d=0;d<3;d++){v=0;for(t=0;t<3;t++){v+=e.matrix[b][t]*a[t][d]}y[b][d]=v}}e.matrix=y},prepend:function(z,c,f,u,w,x){var e=this,y=[[],[],[]],a=[[z,f,w],[c,u,x],[0,0,1]],b,d,t,v;for(b=0;b<3;b++){for(d=0;d<3;d++){v=0;for(t=0;t<3;t++){v+=a[b][t]*e.matrix[t][d]}y[b][d]=v}}e.matrix=y},invert:function(){var d=this.matrix,e=d[0][0],f=d[1][0],p=d[0][1],a=d[1][1],b=d[0][2],c=d[1][2],o=e*a-f*p;return new Ext.draw.Matrix(a/o,-f/o,-p/o,e/o,(p*c-a*b)/o,(f*b-e*c)/o)},clone:function(){var e=this.matrix,f=e[0][0],n=e[1][0],a=e[0][1],b=e[1][1],c=e[0][2],d=e[1][2];return new Ext.draw.Matrix(f,n,a,b,c,d)},translate:function(d,c){this.prepend(1,0,0,1,d,c)},scale:function(f,h,g,i){var j=this;if(h==null){h=f}j.add(1,0,0,1,g,i);j.add(f,0,0,h,0,0);j.add(1,0,0,1,-g,-i)},rotate:function(l,a,h){l=Ext.draw.Draw.rad(l);var j=this,i=+Math.cos(l).toFixed(9),k=+Math.sin(l).toFixed(9);j.add(i,k,-k,i,a,h);j.add(1,0,0,1,-a,-h)},x:function(e,f){var d=this.matrix;return e*d[0][0]+f*d[0][1]+d[0][2]},y:function(e,f){var d=this.matrix;return e*d[1][0]+f*d[1][1]+d[1][2]},get:function(c,d){return +this.matrix[c][d].toFixed(4)},toString:function(){var b=this;return[b.get(0,0),b.get(0,1),b.get(1,0),b.get(1,1),0,0].join()},toSvg:function(){var b=this;return"matrix("+[b.get(0,0),b.get(1,0),b.get(0,1),b.get(1,1),b.get(0,2),b.get(1,2)].join()+")"},toFilter:function(d,e){var f=this;d=d||0;e=e||0;return"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', filterType='bilinear', M11="+f.get(0,0)+", M12="+f.get(0,1)+", M21="+f.get(1,0)+", M22="+f.get(1,1)+", Dx="+(f.get(0,2)+d)+", Dy="+(f.get(1,2)+e)+")"},offset:function(){var b=this.matrix;return[(b[0][2]||0).toFixed(4),(b[1][2]||0).toFixed(4)]},split:function(){function i(a){return a[0]*a[0]+a[1]*a[1]}function f(b){var a=Math.sqrt(i(b));b[0]/=a;b[1]/=a}var g=this.matrix,j={translateX:g[0][2],translateY:g[1][2]},h;h=[[g[0][0],g[0][1]],[g[1][1],g[1][1]]];j.scaleX=Math.sqrt(i(h[0]));f(h[0]);j.shear=h[0][0]*h[1][0]+h[0][1]*h[1][1];h[1]=[h[1][0]-h[0][0]*j.shear,h[1][1]-h[0][1]*j.shear];j.scaleY=Math.sqrt(i(h[1]));f(h[1]);j.shear/=j.scaleY;j.rotate=Math.asin(-h[0][1]);j.isSimple=!+j.shear.toFixed(9)&&(j.scaleX.toFixed(9)==j.scaleY.toFixed(9)||!j.rotate);return j}});Ext.define("Ext.draw.SpriteDD",{extend:"Ext.dd.DragSource",constructor:function(e,f){var g=this,h=e.el;g.sprite=e;g.el=h;g.dragData={el:h,sprite:e};g.callParent([h,f]);g.sprite.setStyle("cursor","move")},showFrame:Ext.emptyFn,createFrame:Ext.emptyFn,getDragEl:function(b){return this.el},getRegion:function(){var v=this,y=v.el,t,z,A,r,s,b,B,u,x,e,l;l=v.sprite;e=l.getBBox();try{t=Ext.Element.getXY(y)}catch(w){}if(!t){return null}z=t[0];A=z+e.width;r=t[1];s=r+e.height;return new Ext.util.Region(r,A,s,z)},startDrag:function(e,g){var h=this,f=h.sprite.attr;h.prev=h.sprite.surface.transformToViewBox(e,g)},onDrag:function(j){var k=j.getXY(),l=this,m=l.sprite,i=m.attr,n,e;k=l.sprite.surface.transformToViewBox(k[0],k[1]);n=k[0]-l.prev[0];e=k[1]-l.prev[1];m.setAttributes({translate:{x:i.translation.x+n,y:i.translation.y+e}},true);l.prev=k},setDragElPos:function(){return false}});Ext.define("Ext.Shadow",{requires:["Ext.ShadowPool"],constructor:function(f){var j=this,i,h,g;Ext.apply(j,f);if(!Ext.isString(j.mode)){j.mode=j.defaultMode}h=j.offset;g=Math.floor(h/2);j.opacity=50;switch(j.mode.toLowerCase()){case"drop":if(Ext.supports.CSS3BoxShadow){i={t:h,l:h,h:-h,w:-h}}else{i={t:-g,l:-g,h:-g,w:-g}}break;case"sides":if(Ext.supports.CSS3BoxShadow){i={t:h,l:0,h:-h,w:0}}else{i={t:-(1+g),l:1+g-2*h,h:-1,w:g-1}}break;case"frame":if(Ext.supports.CSS3BoxShadow){i={t:0,l:0,h:0,w:0}}else{i={t:1+g-2*h,l:1+g-2*h,h:h-g-1,w:h-g-1}}break}j.adjusts=i},offset:4,defaultMode:"drop",boxShadowProperty:(function(){var c="boxShadow",d=document.documentElement.style;if(!("boxShadow" in d)){if("WebkitBoxShadow" in d){c="WebkitBoxShadow"}else{if("MozBoxShadow" in d){c="MozBoxShadow"}}}return c}()),show:function(f){var d=this,e;f=Ext.get(f);if(!d.el){d.el=Ext.ShadowPool.pull();if(d.el.dom.nextSibling!=f.dom){d.el.insertBefore(f)}}e=(parseInt(f.getStyle("z-index"),10)-1)||0;d.el.setStyle("z-index",d.zIndex||e);if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){d.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity="+d.opacity+") progid:DXImageTransform.Microsoft.Blur(pixelradius="+(d.offset)+")"}d.realign(f.getLeft(true),f.getTop(true),f.dom.offsetWidth,f.dom.offsetHeight);d.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(u,d,n,r){if(!this.el){return}var v=this.adjusts,p=this.el.dom,o=p.style,t,s,q,l;o.left=(u+v.l)+"px";o.top=(d+v.t)+"px";t=Math.max(n+v.w,0);s=Math.max(r+v.h,0);q=t+"px";l=s+"px";if(o.width!=q||o.height!=l){o.width=q;o.height=l;if(Ext.supports.CSS3BoxShadow){o[this.boxShadowProperty]="0 0 "+this.offset+"px #888"}}},hide:function(){var b=this;if(b.el){b.el.dom.style.display="none";Ext.ShadowPool.push(b.el);delete b.el}},setZIndex:function(b){this.zIndex=b;if(this.el){this.el.setStyle("z-index",b)}},setOpacity:function(b){if(this.el){if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){b=Math.floor(b*100/2)/100}this.opacity=b;this.el.setOpacity(b)}}});Ext.define("Ext.draw.Sprite",{mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate"},requires:["Ext.draw.SpriteDD"],dirty:false,dirtyHidden:false,dirtyTransform:false,dirtyPath:true,dirtyFont:true,zIndexDirty:true,isSprite:true,zIndex:0,fontProperties:["font","font-size","font-weight","font-style","font-family","text-anchor","text"],pathProperties:["x","y","d","path","height","width","radius","r","rx","ry","cx","cy"],constructor:function(d){var c=this;d=Ext.merge({},d||{});c.id=Ext.id(null,"ext-sprite-");c.transformations=[];Ext.copyTo(this,d,"surface,group,type,draggable");c.bbox={};c.attr={zIndex:0,translation:{x:null,y:null},rotation:{degrees:null,x:null,y:null},scaling:{x:null,y:null,cx:null,cy:null}};delete d.surface;delete d.group;delete d.type;delete d.draggable;c.setAttributes(d);c.addEvents("beforedestroy","destroy","render","mousedown","mouseup","mouseover","mouseout","mousemove","click");c.mixins.observable.constructor.apply(this,arguments)},initDraggable:function(){var b=this;b.draggable=true;if(!b.el){b.surface.createSpriteElement(b)}b.dd=new Ext.draw.SpriteDD(b,Ext.isBoolean(b.draggable)?null:b.draggable);b.on("beforedestroy",b.dd.destroy,b.dd)},setAttributes:function(C,z){var u=this,E=u.fontProperties,x=E.length,F=u.pathProperties,G=F.length,w=!!u.surface,L=w&&u.surface.customAttributes||{},J=u.attr,K=false,B,y,D,I,v,A,i,H;C=Ext.apply({},C);for(B in L){if(C.hasOwnProperty(B)&&typeof L[B]=="function"){Ext.apply(C,L[B].apply(u,[].concat(C[B])))}}if(!!C.hidden!==!!J.hidden){u.dirtyHidden=true}for(y=0;y<G;y++){B=F[y];if(B in C&&C[B]!==J[B]){u.dirtyPath=true;K=true;break}}if("zIndex" in C){u.zIndexDirty=true}if("text" in C){u.dirtyFont=true;K=true}for(y=0;y<x;y++){B=E[y];if(B in C&&C[B]!==J[B]){u.dirtyFont=true;K=true;break}}D=C.translation||C.translate;delete C.translate;delete C.translation;I=J.translation;if(D){if(("x" in D&&D.x!==I.x)||("y" in D&&D.y!==I.y)){u.dirtyTransform=true;I.x=D.x;I.y=D.y}}v=C.rotation||C.rotate;A=J.rotation;delete C.rotate;delete C.rotation;if(v){if(("x" in v&&v.x!==A.x)||("y" in v&&v.y!==A.y)||("degrees" in v&&v.degrees!==A.degrees)){u.dirtyTransform=true;A.x=v.x;A.y=v.y;A.degrees=v.degrees}}i=C.scaling||C.scale;H=J.scaling;delete C.scale;delete C.scaling;if(i){if(("x" in i&&i.x!==H.x)||("y" in i&&i.y!==H.y)||("cx" in i&&i.cx!==H.cx)||("cy" in i&&i.cy!==H.cy)){u.dirtyTransform=true;H.x=i.x;H.y=i.y;H.cx=i.cx;H.cy=i.cy}}if(!u.dirtyTransform&&K){if(J.scaling.x===null||J.scaling.y===null||J.rotation.y===null||J.rotation.y===null){u.dirtyTransform=true}}Ext.apply(J,C);u.dirty=true;if(z===true&&w){u.redraw()}return this},getBBox:function(){return this.surface.getBBox(this)},setText:function(b){return this.surface.setText(this,b)},hide:function(b){this.setAttributes({hidden:true},b);return this},show:function(b){this.setAttributes({hidden:false},b);return this},remove:function(){if(this.surface){this.surface.remove(this);return true}return false},onRemove:function(){this.surface.onRemove(this)},destroy:function(){var b=this;if(b.fireEvent("beforedestroy",b)!==false){b.remove();b.surface.onDestroy(b);b.clearListeners();b.fireEvent("destroy")}},redraw:function(){this.surface.renderItem(this);return this},setStyle:function(){this.el.setStyle.apply(this.el,arguments);return this},addCls:function(b){this.surface.addCls(this,b);return this},removeCls:function(b){this.surface.removeCls(this,b);return this}});Ext.define("Ext.draw.engine.Svg",{extend:"Ext.draw.Surface",requires:["Ext.draw.Draw","Ext.draw.Sprite","Ext.draw.Matrix","Ext.Element"],engine:"Svg",trimRe:/^\s+|\s+$/g,spacesRe:/\s+/,xlink:"http://www.w3.org/1999/xlink",translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",path:"d",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},parsers:{},minDefaults:{circle:{cx:0,cy:0,r:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start","font-family":null,"font-size":null,"font-weight":null,"font-style":null,fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},createSvgElement:function(g,f){var h=this.domRef.createElementNS("http://www.w3.org/2000/svg",g),e;if(f){for(e in f){h.setAttribute(e,String(f[e]))}}return h},createSpriteElement:function(d){var c=this.createSvgElement(d.type);c.id=d.id;if(c.style){c.style.webkitTapHighlightColor="rgba(0,0,0,0)"}d.el=Ext.get(c);this.applyZIndex(d);d.matrix=new Ext.draw.Matrix();d.bbox={plain:0,transform:0};this.applyAttrs(d);this.applyTransformations(d);d.fireEvent("render",d);return c},getBBoxText:function(l){var i={},n,e,r,p,m,q;if(l&&l.el){q=l.el.dom;try{i=q.getBBox();return i}catch(o){}i={x:i.x,y:Infinity,width:0,height:0};m=q.getNumberOfChars();for(p=0;p<m;p++){n=q.getExtentOfChar(p);i.y=Math.min(n.y,i.y);e=n.y+n.height-i.y;i.height=Math.max(i.height,e);r=n.x+n.width-i.x;i.width=Math.max(i.width,r)}return i}},hide:function(){Ext.get(this.el).hide()},show:function(){Ext.get(this.el).show()},hidePrim:function(b){this.addCls(b,Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(b){this.removeCls(b,Ext.baseCSSPrefix+"hide-visibility")},getDefs:function(){return this._defs||(this._defs=this.createSvgElement("defs"))},transform:function(i,r){var l=this,k=new Ext.draw.Matrix(),n=i.transformations,o=n.length,p=0,q,m;for(;p<o;p++){q=n[p];m=q.type;if(m=="translate"){k.translate(q.x,q.y)}else{if(m=="rotate"){k.rotate(q.degrees,q.x,q.y)}else{if(m=="scale"){k.scale(q.x,q.y,q.centerX,q.centerY)}}}}i.matrix=k;if(!r){i.el.set({transform:k.toSvg()})}},setSize:function(h,f){var g=this,e=g.el;h=+h||g.width;f=+f||g.height;g.width=h;g.height=f;e.setSize(h,f);e.set({width:h,height:f});g.callParent([h,f])},getRegion:function(){var h=this.el.getXY(),j=this.bgRect.getXY(),f=Math.max,g=f(h[0],j[0]),i=f(h[1],j[1]);return{left:g,top:i,right:g+this.width,bottom:i+this.height}},onRemove:function(b){if(b.el){b.el.destroy();delete b.el}this.callParent(arguments)},setViewBox:function(e,g,h,f){if(isFinite(e)&&isFinite(g)&&isFinite(h)&&isFinite(f)){this.callParent(arguments);this.el.dom.setAttribute("viewBox",[e,g,h,f].join(" "))}},render:function(p){var m=this,n,i,o,j,l,k;if(!m.el){n=m.width||0;i=m.height||0;o=m.createSvgElement("svg",{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:n,height:i});j=m.getDefs();l=m.createSvgElement("rect",{width:"100%",height:"100%",fill:"#000",stroke:"none",opacity:0});if(Ext.isSafari3){k=m.createSvgElement("rect",{x:-10,y:-10,width:"110%",height:"110%",fill:"none",stroke:"#000"})}o.appendChild(j);if(Ext.isSafari3){o.appendChild(k)}o.appendChild(l);p.appendChild(o);m.el=Ext.get(o);m.bgRect=Ext.get(l);if(Ext.isSafari3){m.webkitRect=Ext.get(k);m.webkitRect.hide()}m.el.on({scope:m,mouseup:m.onMouseUp,mousedown:m.onMouseDown,mouseover:m.onMouseOver,mouseout:m.onMouseOut,mousemove:m.onMouseMove,mouseenter:m.onMouseEnter,mouseleave:m.onMouseLeave,click:m.onClick,dblclick:m.onDblClick})}m.renderAll()},onMouseEnter:function(b){if(this.el.parent().getRegion().contains(b.getPoint())){this.fireEvent("mouseenter",b)}},onMouseLeave:function(b){if(!this.el.parent().getRegion().contains(b.getPoint())){this.fireEvent("mouseleave",b)}},processEvent:function(e,h){var i=h.getTarget(),g=this.surface,j;this.fireEvent(e,h);if(i.nodeName=="tspan"&&i.parentNode){i=i.parentNode}j=this.items.get(i.id);if(j){j.fireEvent(e,j,h)}},tuneText:function(p,o){var x=p.el.dom,w=[],i,r,n,u,t,v,s,q;if(o.hasOwnProperty("text")){n=p.tspans&&Ext.Array.map(p.tspans,function(a){return a.textContent}).join("");if(!p.tspans||o.text!=n){w=this.setText(p,o.text);p.tspans=w}else{w=p.tspans||[]}}if(w.length){i=this.getBBoxText(p).height;q=p.el.dom.getAttribute("x");for(u=0,t=w.length;u<t;u++){s=(Ext.isFF3_0||Ext.isFF3_5)?2:4;w[u].setAttribute("x",q);w[u].setAttribute("dy",u?i*1.2:i/s)}p.dirty=true}},setText:function(n,s){var p=this,v=n.el.dom,u=[],i,o,m,r,q,t;while(v.firstChild){v.removeChild(v.firstChild)}t=String(s).split("\n");for(r=0,q=t.length;r<q;r++){m=t[r];if(m){o=p.createSvgElement("tspan");o.appendChild(document.createTextNode(Ext.htmlDecode(m)));v.appendChild(o);u[r]=o}}return u},renderAll:function(){this.items.each(this.renderItem,this)},renderItem:function(b){if(!this.el){return}if(!b.el){this.createSpriteElement(b)}if(b.zIndexDirty){this.applyZIndex(b)}if(b.dirty){this.applyAttrs(b);if(b.dirtyTransform){this.applyTransformations(b)}}},redraw:function(b){b.dirty=b.zIndexDirty=true;this.renderItem(b)},applyAttrs:function(s){var x=this,F=s.el,t=s.group,A=s.attr,i=x.parsers,C=x.gradientsMap||{},z=Ext.isSafari&&!Ext.isStrict,D,B,y,u,E,v,G,H,w;if(t){D=[].concat(t);y=D.length;for(B=0;B<y;B++){t=D[B];x.getGroup(t).add(s)}delete s.group}u=x.scrubAttrs(s)||{};s.bbox.plain=0;s.bbox.transform=0;if(s.type=="circle"||s.type=="ellipse"){u.cx=u.cx||u.x;u.cy=u.cy||u.y}else{if(s.type=="rect"){u.rx=u.ry=u.r}else{if(s.type=="path"&&u.d){u.d=Ext.draw.Draw.pathToString(Ext.draw.Draw.pathToAbsolute(u.d))}}}s.dirtyPath=false;if(u["clip-rect"]){x.setClip(s,u);delete u["clip-rect"]}if(s.type=="text"&&u.font&&s.dirtyFont){F.set({style:"font: "+u.font})}if(s.type=="image"){F.dom.setAttributeNS(x.xlink,"href",u.src)}Ext.applyIf(u,x.minDefaults[s.type]);if(s.dirtyHidden){(A.hidden)?x.hidePrim(s):x.showPrim(s);s.dirtyHidden=false}for(v in u){if(u.hasOwnProperty(v)&&u[v]!=null){if(z&&("color|stroke|fill".indexOf(v)>-1)&&(u[v] in C)){u[v]=C[u[v]]}if(v=="hidden"&&s.type=="text"){continue}if(v in i){F.dom.setAttribute(v,i[v](u[v],s,x))}else{F.dom.setAttribute(v,u[v])}}}if(s.type=="text"){x.tuneText(s,u)}s.dirtyFont=false;G=A.style;if(G){F.setStyle(G)}s.dirty=false;if(Ext.isSafari3){x.webkitRect.show();setTimeout(function(){x.webkitRect.hide()})}},setClip:function(g,i){var j=this,k=i["clip-rect"],h,l;if(k){if(g.clip){g.clip.parentNode.parentNode.removeChild(g.clip.parentNode)}h=j.createSvgElement("clipPath");l=j.createSvgElement("rect");h.id=Ext.id(null,"ext-clip-");l.setAttribute("x",k.x);l.setAttribute("y",k.y);l.setAttribute("width",k.width);l.setAttribute("height",k.height);h.appendChild(l);j.getDefs().appendChild(h);g.el.dom.setAttribute("clip-path","url(#"+h.id+")");g.clip=l}},applyZIndex:function(k){var i=this,g=i.items,h=g.indexOf(k),j=k.el,l;if(i.el.dom.childNodes[h+2]!==j.dom){if(h>0){do{l=g.getAt(--h).el}while(!l&&h>0)}j.insertAfter(l||i.bgRect)}k.zIndexDirty=false},createItem:function(d){var c=new Ext.draw.Sprite(d);c.surface=this;return c},addGradient:function(n){n=Ext.draw.Draw.parseGradient(n);var p=this,q=n.stops.length,t=n.vector,i=Ext.isSafari&&!Ext.isStrict,m,o,l,r,s;s=p.gradientsMap||{};if(!i){if(n.type=="linear"){m=p.createSvgElement("linearGradient");m.setAttribute("x1",t[0]);m.setAttribute("y1",t[1]);m.setAttribute("x2",t[2]);m.setAttribute("y2",t[3])}else{m=p.createSvgElement("radialGradient");m.setAttribute("cx",n.centerX);m.setAttribute("cy",n.centerY);m.setAttribute("r",n.radius);if(Ext.isNumber(n.focalX)&&Ext.isNumber(n.focalY)){m.setAttribute("fx",n.focalX);m.setAttribute("fy",n.focalY)}}m.id=n.id;p.getDefs().appendChild(m);for(r=0;r<q;r++){o=n.stops[r];l=p.createSvgElement("stop");l.setAttribute("offset",o.offset+"%");l.setAttribute("stop-color",o.color);l.setAttribute("stop-opacity",o.opacity);m.appendChild(l)}}else{s["url(#"+n.id+")"]=n.stops[0].color}p.gradientsMap=s},hasCls:function(d,c){return c&&(" "+(d.el.dom.getAttribute("class")||"")+" ").indexOf(" "+c+" ")!=-1},addCls:function(n,l){var m=n.el,o,j,p,i=[],k=m.getAttribute("class")||"";if(!Ext.isArray(l)){if(typeof l=="string"&&!this.hasCls(n,l)){m.set({"class":k+" "+l})}}else{for(o=0,j=l.length;o<j;o++){p=l[o];if(typeof p=="string"&&(" "+k+" ").indexOf(" "+p+" ")==-1){i.push(p)}}if(i.length){m.set({"class":" "+i.join(" ")})}}},removeCls:function(l,o){var n=this,s=l.el,q=s.getAttribute("class")||"",r,m,p,i,t;if(!Ext.isArray(o)){o=[o]}if(q){t=q.replace(n.trimRe," ").split(n.spacesRe);for(r=0,p=o.length;r<p;r++){i=o[r];if(typeof i=="string"){i=i.replace(n.trimRe,"");m=Ext.Array.indexOf(t,i);if(m!=-1){Ext.Array.erase(t,m,1)}}}s.set({"class":t.join(" ")})}},destroy:function(){var b=this;b.callParent();if(b.el){b.el.remove()}if(b._defs){Ext.get(b._defs).destroy()}if(b.bgRect){Ext.get(b.bgRect).destroy()}if(b.webkitRect){Ext.get(b.webkitRect).destroy()}delete b.el}});Ext.define("Ext.draw.engine.Vml",{extend:"Ext.draw.Surface",requires:["Ext.draw.Draw","Ext.draw.Color","Ext.draw.Sprite","Ext.draw.Matrix","Ext.Element"],engine:"Vml",map:{M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},bitesRe:/([clmz]),?([^clmz]*)/gi,valRe:/-?[^,\s\-]+/g,fillUrlRe:/^url\(\s*['"]?([^\)]+?)['"]?\s*\)$/i,pathlike:/^(path|rect)$/,NonVmlPathRe:/[ahqstv]/ig,partialPathRe:/[clmz]/g,fontFamilyRe:/^['"]+|['"]+$/g,baseVmlCls:Ext.baseCSSPrefix+"vml-base",vmlGroupCls:Ext.baseCSSPrefix+"vml-group",spriteCls:Ext.baseCSSPrefix+"vml-sprite",measureSpanCls:Ext.baseCSSPrefix+"vml-measure-span",zoom:21600,coordsize:1000,coordorigin:"0 0",zIndexShift:0,orderSpritesByZIndex:false,path2vml:function(F){var r=this,E=r.NonVmlPathRe,C=r.map,z=r.valRe,i=r.zoom,A=r.bitesRe,y=Ext.Function.bind(Ext.draw.Draw.pathToAbsolute,Ext.draw.Draw),u,p,B,D,w,j,x,v;if(String(F).match(E)){y=Ext.Function.bind(Ext.draw.Draw.path2curve,Ext.draw.Draw)}else{if(!String(F).match(r.partialPathRe)){u=String(F).replace(A,function(e,a,c){var b=[],d=a.toLowerCase()=="m",f=C[a];c.replace(z,function(g){if(d&&b.length===2){f+=b+C[a=="m"?"l":"L"];b=[]}b.push(Math.round(g*i))});return f+b});return u}}p=y(F);u=[];for(w=0,j=p.length;w<j;w++){B=p[w];D=p[w][0].toLowerCase();if(D=="z"){D="x"}for(x=1,v=B.length;x<v;x++){D+=Math.round(B[x]*r.zoom)+(x!=v-1?",":"")}u.push(D)}return u.join(" ")},translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},minDefaults:{circle:{fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start",font:'10px "Arial"',fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},onMouseEnter:function(b){this.fireEvent("mouseenter",b)},onMouseLeave:function(b){this.fireEvent("mouseleave",b)},processEvent:function(e,h){var i=h.getTarget(),g=this.surface,j;this.fireEvent(e,h);j=this.items.get(i.id);if(j){j.fireEvent(e,j,h)}},createSpriteElement:function(p){var r=this,s=p.attr,q=p.type,n=r.zoom,u=p.vml||(p.vml={}),m=Math.round,t=(q==="image")?r.createNode("image"):r.createNode("shape"),l,o,v;t.coordsize=n+" "+n;t.coordorigin=s.coordorigin||"0 0";Ext.get(t).addCls(r.spriteCls);if(q=="text"){u.path=l=r.createNode("path");l.textpathok=true;u.textpath=v=r.createNode("textpath");v.on=true;t.appendChild(v);t.appendChild(l)}t.id=p.id;p.el=Ext.get(t);p.el.setStyle("zIndex",-r.zIndexShift);r.el.appendChild(t);if(q!=="image"){o=r.createNode("skew");o.on=true;t.appendChild(o);p.skew=o}p.matrix=new Ext.draw.Matrix();p.bbox={plain:null,transform:null};this.applyAttrs(p);this.applyTransformations(p);p.fireEvent("render",p);return p.el},getBBoxText:function(c){var d=c.vml;return{x:d.X+(d.bbx||0)-d.W/2,y:d.Y-d.H/2,width:d.W,height:d.H}},applyAttrs:function(B){var v=this,J=B.vml,E=B.group,L=B.attr,K=B.el,z=K.dom,y,i,w,A,D,x,C,u,H,I,F,G;if(E){w=[].concat(E);D=w.length;for(A=0;A<D;A++){E=w[A];v.getGroup(E).add(B)}delete B.group}x=v.scrubAttrs(B)||{};if(B.zIndexDirty){v.setZIndex(B)}Ext.applyIf(x,v.minDefaults[B.type]);if(B.type=="image"){Ext.apply(B.attr,{x:x.x,y:x.y,width:x.width,height:x.height});K.setStyle({width:x.width+"px",height:x.height+"px"});z.src=x.src}if(z.href){z.href=x.href}if(z.title){z.title=x.title}if(z.target){z.target=x.target}if(z.cursor){z.cursor=x.cursor}if(B.dirtyHidden){(x.hidden)?v.hidePrim(B):v.showPrim(B);B.dirtyHidden=false}if(B.dirtyPath){if(B.type=="circle"||B.type=="ellipse"){H=x.x;I=x.y;F=x.rx||x.r||0;G=x.ry||x.r||0;z.path=Ext.String.format("ar{0},{1},{2},{3},{4},{1},{4},{1}",Math.round((H-F)*v.zoom),Math.round((I-G)*v.zoom),Math.round((H+F)*v.zoom),Math.round((I+G)*v.zoom),Math.round(H*v.zoom));B.dirtyPath=false}else{if(B.type!=="text"&&B.type!=="image"){B.attr.path=x.path=v.setPaths(B,x)||x.path;z.path=v.path2vml(x.path);B.dirtyPath=false}}}if("clip-rect" in x){v.setClip(B,x)}if(B.type=="text"){v.setTextAttributes(B,x)}if(x.opacity||x["stroke-opacity"]||x.fill){v.setFill(B,x)}if(x.stroke||x["stroke-opacity"]||x.fill){v.setStroke(B,x)}y=L.style;if(y){K.setStyle(y)}B.dirty=false},setZIndex:function(n){var l=this,k=n.attr.zIndex,i=l.zIndexShift,p,j,m,o;if(k<i){p=l.items.items;j=p.length;for(o=0;o<j;o++){if((k=p[o].attr.zIndex)&&k<i){i=k}}l.zIndexShift=i;for(o=0;o<j;o++){m=p[o];if(m.el){m.el.setStyle("zIndex",m.attr.zIndex-i)}m.zIndexDirty=false}}else{if(n.el){n.el.setStyle("zIndex",k-i);n.zIndexDirty=false}}},setPaths:function(h,g){var f=h.attr,e=h.attr["stroke-width"]||1;h.bbox.plain=null;h.bbox.transform=null;if(h.type=="circle"){f.rx=f.ry=g.r;return Ext.draw.Draw.ellipsePath(h)}else{if(h.type=="ellipse"){f.rx=g.rx;f.ry=g.ry;return Ext.draw.Draw.ellipsePath(h)}else{if(h.type=="rect"){f.rx=f.ry=g.r;return Ext.draw.Draw.rectPath(h)}else{if(h.type=="path"&&f.path){return Ext.draw.Draw.pathToAbsolute(f.path)}}}}return false},setFill:function(m,r){var p=this,t=m.el.dom,n=t.fill,u=false,q,o,v,l,s;if(!n){n=t.fill=p.createNode("fill");u=true}if(Ext.isArray(r.fill)){r.fill=r.fill[0]}if(r.fill=="none"){n.on=false}else{if(typeof r.opacity=="number"){n.opacity=r.opacity}if(typeof r["fill-opacity"]=="number"){n.opacity=r["fill-opacity"]}n.on=true;if(typeof r.fill=="string"){v=r.fill.match(p.fillUrlRe);if(v){v=v[1];if(v.charAt(0)=="#"){o=p.gradientsColl.getByKey(v.substring(1))}if(o){l=r.rotation;s=-(o.angle+270+(l?l.degrees:0))%360;if(s===0){s=180}n.angle=s;n.type="gradient";n.method="sigma";if(n.colors){n.colors.value=o.colors}else{n.colors=o.colors}}else{n.src=v;n.type="tile"}}else{n.color=Ext.draw.Color.toHex(r.fill);n.src="";n.type="solid"}}}if(u){t.appendChild(n)}},setStroke:function(i,l){var n=this,o=i.el.dom,k=i.strokeEl,m=false,p,j;if(!k){k=i.strokeEl=n.createNode("stroke");m=true}if(Ext.isArray(l.stroke)){l.stroke=l.stroke[0]}if(!l.stroke||l.stroke=="none"||l.stroke==0||l["stroke-width"]==0){k.on=false}else{k.on=true;if(l.stroke&&!l.stroke.match(n.fillUrlRe)){k.color=Ext.draw.Color.toHex(l.stroke)}k.dashstyle=l["stroke-dasharray"]?"dash":"solid";k.joinstyle=l["stroke-linejoin"];k.endcap=l["stroke-linecap"]||"round";k.miterlimit=l["stroke-miterlimit"]||8;p=parseFloat(l["stroke-width"]||1)*0.75;j=l["stroke-opacity"]||1;if(Ext.isNumber(p)&&p<1){k.weight=1;k.opacity=j*p}else{k.weight=p;k.opacity=j}}if(m){o.appendChild(k)}},setClip:function(g,i){var j=this,l=g.el,h=g.clipEl,k=String(i["clip-rect"]).split(j.separatorRe);if(!h){h=g.clipEl=j.el.insertFirst(Ext.getDoc().dom.createElement("div"));h.addCls(Ext.baseCSSPrefix+"vml-sprite")}if(k.length==4){k[2]=+k[2]+(+k[0]);k[3]=+k[3]+(+k[1]);h.setStyle("clip",Ext.String.format("rect({1}px {2}px {3}px {0}px)",k[0],k[1],k[2],k[3]));h.setSize(j.el.width,j.el.height)}else{h.setStyle("clip","")}},setTextAttributes:function(o,t){var p=this,v=o.vml,r=v.textpath.style,q=p.span.style,n=p.zoom,m=Math.round,l={fontSize:"font-size",fontWeight:"font-weight",fontStyle:"font-style"},u,s;if(o.dirtyFont){if(t.font){r.font=q.font=t.font}if(t["font-family"]){r.fontFamily='"'+t["font-family"].split(",")[0].replace(p.fontFamilyRe,"")+'"';q.fontFamily=t["font-family"]}for(u in l){s=t[l[u]];if(s){r[u]=q[u]=s}}p.setText(o,t.text);if(v.textpath.string){p.span.innerHTML=String(v.textpath.string).replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,"<br>")}v.W=p.span.offsetWidth;v.H=p.span.offsetHeight+2;if(t["text-anchor"]=="middle"){r["v-text-align"]="center"}else{if(t["text-anchor"]=="end"){r["v-text-align"]="right";v.bbx=-Math.round(v.W/2)}else{r["v-text-align"]="left";v.bbx=Math.round(v.W/2)}}}v.X=t.x;v.Y=t.y;v.path.v=Ext.String.format("m{0},{1}l{2},{1}",Math.round(v.X*n),Math.round(v.Y*n),Math.round(v.X*n)+1);o.bbox.plain=null;o.bbox.transform=null;o.dirtyFont=false},setText:function(d,c){d.vml.textpath.string=Ext.htmlDecode(c)},hide:function(){this.el.hide()},show:function(){this.el.show()},hidePrim:function(b){b.el.addCls(Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(b){b.el.removeCls(Ext.baseCSSPrefix+"hide-visibility")},setSize:function(d,e){var f=this;d=d||f.width;e=e||f.height;f.width=d;f.height=e;if(f.el){if(d!=undefined){f.el.setWidth(d)}if(e!=undefined){f.el.setHeight(e)}}f.callParent(arguments)},applyViewBox:function(){var k=this,j=k.viewBox,l=k.width,h=k.height,n,i,m;k.callParent();if(j&&(l||h)){n=k.items.items;i=n.length;for(m=0;m<i;m++){k.applyTransformations(n[m])}}},onAdd:function(b){this.callParent(arguments);if(this.el){this.renderItem(b)}},onRemove:function(b){if(b.el){b.el.remove();delete b.el}this.callParent(arguments)},render:function(g){var j=this,h=Ext.getDoc().dom,e;if(!j.createNode){try{if(!h.namespaces.rvml){h.namespaces.add("rvml","urn:schemas-microsoft-com:vml")}j.createNode=function(a){return h.createElement("<rvml:"+a+' class="rvml">')}}catch(i){j.createNode=function(a){return h.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}}if(!j.el){e=h.createElement("div");j.el=Ext.get(e);j.el.addCls(j.baseVmlCls);j.span=h.createElement("span");Ext.get(j.span).addCls(j.measureSpanCls);e.appendChild(j.span);j.el.setSize(j.width||0,j.height||0);g.appendChild(e);j.el.on({scope:j,mouseup:j.onMouseUp,mousedown:j.onMouseDown,mouseover:j.onMouseOver,mouseout:j.onMouseOut,mousemove:j.onMouseMove,mouseenter:j.onMouseEnter,mouseleave:j.onMouseLeave,click:j.onClick,dblclick:j.onDblClick})}j.renderAll()},renderAll:function(){this.items.each(this.renderItem,this)},redraw:function(b){b.dirty=true;this.renderItem(b)},renderItem:function(b){if(!this.el){return}if(!b.el){this.createSpriteElement(b)}if(b.dirty){this.applyAttrs(b);if(b.dirtyTransform){this.applyTransformations(b)}}},rotationCompensation:function(g,h,f){var e=new Ext.draw.Matrix();e.rotate(-g,0.5,0.5);return{x:e.x(h,f),y:e.y(h,f)}},transform:function(J,I){var L=this,ak=L.getBBox(J,true),ae=ak.x+ak.width*0.5,af=ak.y+ak.height*0.5,W=new Ext.draw.Matrix(),X=J.transformations,N=X.length,V=0,Z=0,ai=1,aj=1,aa="",ag=J.el,R=ag.dom,y=R.style,al=L.zoom,ad=J.skew,T=L.viewBoxShift,M,P,S,ac,U,Y,i,K,O,Q,ah,ab;for(;V<N;V++){S=X[V];ac=S.type;if(ac=="translate"){W.translate(S.x,S.y)}else{if(ac=="rotate"){W.rotate(S.degrees,S.x,S.y);Z+=S.degrees}else{if(ac=="scale"){W.scale(S.x,S.y,S.centerX,S.centerY);ai*=S.x;aj*=S.y}}}}J.matrix=W.clone();if(I){return}if(T){W.prepend(T.scale,0,0,T.scale,T.dx*T.scale,T.dy*T.scale)}if(J.type!="image"&&ad){ad.origin="0,0";ad.matrix=W.toString();ab=W.offset();if(ab[0]>32767){ab[0]=32767}else{if(ab[0]<-32768){ab[0]=-32768}}if(ab[1]>32767){ab[1]=32767}else{if(ab[1]<-32768){ab[1]=-32768}}ad.offset=ab}else{y.filter=W.toFilter();y.left=Math.min(W.x(ak.x,ak.y),W.x(ak.x+ak.width,ak.y),W.x(ak.x,ak.y+ak.height),W.x(ak.x+ak.width,ak.y+ak.height))+"px";y.top=Math.min(W.y(ak.x,ak.y),W.y(ak.x+ak.width,ak.y),W.y(ak.x,ak.y+ak.height),W.y(ak.x+ak.width,ak.y+ak.height))+"px"}},createItem:function(b){return Ext.create("Ext.draw.Sprite",b)},getRegion:function(){return this.el.getRegion()},addCls:function(d,c){if(d&&d.el){d.el.addCls(c)}},removeCls:function(d,c){if(d&&d.el){d.el.removeCls(c)}},addGradient:function(o){var q=this.gradientsColl||(this.gradientsColl=Ext.create("Ext.util.MixedCollection")),t=[],m=Ext.create("Ext.util.MixedCollection"),i,p,s,n,l,r;m.addAll(o.stops);m.sortByKey("ASC",function(a,b){a=parseInt(a,10);b=parseInt(b,10);return a>b?1:(a<b?-1:0)});i=m.keys;p=m.items;s=i.length;for(r=0;r<s;r++){n=i[r];l=p[r];t.push(n+"% "+l.color)}q.add(o.id,{colors:t.join(","),angle:o.angle})},destroy:function(){var b=this;b.callParent(arguments);if(b.el){b.el.remove()}delete b.el}});Ext.define("Docs.controller.Tabs",{extend:"Ext.app.Controller",requires:["Docs.History","Docs.Settings"],refs:[{ref:"welcomeIndex",selector:"#welcomeindex"},{ref:"classIndex",selector:"#classindex"},{ref:"guideIndex",selector:"#guideindex"},{ref:"videoIndex",selector:"#videoindex"},{ref:"exampleIndex",selector:"#exampleindex"},{ref:"statsIndex",selector:"#statsindex"},{ref:"testsIndex",selector:"#testsindex"},{ref:"commentIndex",selector:"#commentindex"},{ref:"classTree",selector:"#classtree"},{ref:"guideTree",selector:"#guidetree"},{ref:"exampleTree",selector:"#exampletree"},{ref:"videoTree",selector:"#videotree"},{ref:"doctabs",selector:"#doctabs"}],init:function(){this.getController("Classes").addListener({showClass:function(b){this.addTabFromTree("#!/api/"+b)},scope:this});this.getController("Guides").addListener({showGuide:function(b){this.addTabFromTree("#!/guide/"+b)},scope:this});this.getController("Examples").addListener({showExample:function(b){this.addTabFromTree(b)},scope:this});this.getController("Videos").addListener({showVideo:function(b){this.addTabFromTree("#!/video/"+b)},scope:this});this.control({"[componentCls=doctabs]":{tabActivate:function(d,c){Docs.History.push(d,c)},scope:this}})},onLaunch:function(){this.getDoctabs().setStaticTabs(Ext.Array.filter([this.getWelcomeIndex().getTab(),this.getClassIndex().getTab(),this.getGuideIndex().getTab(),this.getVideoIndex().getTab(),this.getExampleIndex().getTab(),this.getStatsIndex().getTab(),this.getTestsIndex().getTab()],function(a){return a}));this.commentsTab=this.getCommentIndex().getTab();var b=Docs.Settings.get("tabs");if(b){Ext.Array.forEach(b,function(a){this.addTabFromTree(a,{animate:false})},this)}Docs.History.notifyTabsLoaded()},showCommentsTab:function(){var b=this.getDoctabs().getStaticTabs();this.getDoctabs().setStaticTabs(b.concat(this.commentsTab))},hideCommentsTab:function(){var b=this.getDoctabs().getStaticTabs();this.getDoctabs().setStaticTabs(Ext.Array.remove(b,this.commentsTab))},addTabFromTree:function(h,g){var e=this.getTree(h);var f=e.findRecordByUrl(h);if(f){this.addTab(f,g)}},addTab:function(d,c){c=c||{animate:true,activate:true};this.getDoctabs().addTab({href:d.url,text:d.text,iconCls:d.iconCls},c)},getTree:function(b){if(/#!?\/api/.test(b)){return this.getClassTree()}else{if(/#!?\/guide/.test(b)){return this.getGuideTree()}else{if(/#!?\/video/.test(b)){return this.getVideoTree()}else{if(/#!?\/example/.test(b)){return this.getExampleTree()}else{return this.getClassTree()}}}}}});Ext.define("Ext.util.Cookies",{singleton:true,set:function(p,n){var j=arguments,k=arguments.length,i=(k>2)?j[2]:null,l=(k>3)?j[3]:"/",o=(k>4)?j[4]:null,m=(k>5)?j[5]:false;document.cookie=p+"="+escape(n)+((i===null)?"":("; expires="+i.toGMTString()))+((l===null)?"":("; path="+l))+((o===null)?"":("; domain="+o))+((m===true)?"; secure":"")},get:function(k){var g=k+"=",i=g.length,h=document.cookie.length,j=0,l=0;while(j<h){l=j+i;if(document.cookie.substring(j,l)==g){return this.getCookieVal(l)}j=document.cookie.indexOf(" ",j)+1;if(j===0){break}}return null},clear:function(d,c){if(this.get(d)){c=c||"/";document.cookie=d+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path="+c}},getCookieVal:function(c){var d=document.cookie.indexOf(";",c);if(d==-1){d=document.cookie.length}return unescape(document.cookie.substring(c,d))}});Ext.define("Docs.Tip",{singleton:true,show:function(g,e,f){f=f||"right";this.tips=this.tips||{};if(this.tips[f]){var h=this.tips[f];h.update(g);h.setTarget(e);h.show()}else{var h=this.tips[f]=Ext.create("Ext.tip.ToolTip",{anchor:f,target:e,html:g});h.show()}}});Ext.define("Docs.controller.Content",{extend:"Ext.app.Controller",MIDDLE:1,title:"",loadIndex:function(b){b||Docs.History.push(this.baseUrl);this.getViewport().setPageTitle(this.title);Ext.getCmp("doctabs").activateTab(this.baseUrl);Ext.getCmp("card-panel").layout.setActiveItem(this.getIndex());this.getIndex().restoreScrollState()},opensNewWindow:function(b){return b.button===this.MIDDLE||b.shiftKey||b.ctrlKey},getBaseUrl:function(){return document.location.href.replace(/\/?(index.html|template.html)?#.*/,"")}});Ext.define("Docs.ClassRegistry",{singleton:true,canonicalName:function(b){if(!this.altNames){this.altNames={};Ext.each(Docs.data.search,function(a){if(a.type==="class"&&!/:/.test(a.cls)){this.altNames[a.cls]=a.id}},this)}return this.altNames[b]||b},search:function(i){var u=new Array(5*3*3);for(var t=0;t<u.length;t++){u[t]=[]}var q=/[.:]/.test(i);var o=Ext.escapeRe(i);var x=new RegExp("^"+o+"$","i");var s=new RegExp("^"+o,"i");var p=new RegExp(o,"i");var v=Docs.data.search;for(var t=0,r=v.length;t<r;t++){var z=v[t];var y=q?z.fullName:z.name;var w=z["private"]?4:(z.removed?8:0);if(x.test(y)){u[z.sort+w].push(this.highlightMatch(z,x))}else{if(s.test(y)){u[z.sort+w+12].push(this.highlightMatch(z,s))}else{if(p.test(y)){u[z.sort+w+24].push(this.highlightMatch(z,p))}}}}return Ext.Array.flatten(u)},highlightMatch:function(c,d){c=Ext.apply({},c);c.name=c.name.replace(d,"<strong>$&</strong>");c.fullName=c.fullName.replace(d,"<strong>$&</strong>");return c}});Ext.define("Docs.controller.AuthHelpers",{request:function(c,d){d.url=this.addSid(Docs.baseUrl+"/"+Docs.commentsDb+"/"+Docs.commentsVersion+d.url);if(c==="jsonp"){Ext.data.JsonP.request(d)}else{d.cors=true;Ext.Ajax.request(d)}},addSid:function(c){var d=this.getController("Auth").sid;return c+(c.match(/\?/)?"&":"?")+"sid="+d},isLoggedIn:function(){return this.getController("Auth").isLoggedIn()}});Ext.define("Docs.view.examples.InlineToolbar",{extend:"Ext.toolbar.Toolbar",componentCls:"inline-example-tb",height:30,initComponent:function(){this.addEvents("buttonclick");this.items=[{iconCls:"code",padding:"0 2 0 0",margin:"0 3 0 0",text:"Code Editor",handler:this.createEventFirerer("code")},{padding:0,margin:"0 3 0 0",iconCls:"preview",text:"Live Preview",handler:this.createEventFirerer("preview")},"->",{padding:0,margin:0,iconCls:"copy",text:"Select Code",handler:this.createEventFirerer("copy")}];this.callParent(arguments)},createEventFirerer:function(b){return Ext.Function.bind(function(){this.fireEvent("buttonclick",b)},this)},activateButton:function(b){Ext.Array.each(this.query("button"),function(a){a.removeCls("active")});Ext.Array.each(this.query("button[iconCls="+b+"]"),function(a){a.addCls("active")})}});Ext.define("Docs.controller.Auth",{extend:"Ext.app.Controller",requires:["Ext.util.Cookies","Docs.Tip"],refs:[{ref:"auth",selector:"authentication"}],init:function(){this.sid=Ext.util.Cookies.get("sid");this.addEvents("loggedIn","loggedOut","available");if(!Docs.enableComments){return}this.control({authentication:{afterrender:function(b){b.el.addListener("click",function(d,a){b.showLoginForm()},this,{preventDefault:true,delegate:".login"});b.el.addListener("click",function(d,a){this.logout()},this,{preventDefault:true,delegate:".logout"});this.retrieveSession()}}})},retrieveSession:function(){Ext.Ajax.request({url:Docs.baseUrl+"/session",params:{sid:this.sid},method:"GET",cors:true,callback:function(d,f,e){if(e&&e.responseText){this.currentUser=JSON.parse(e.responseText);this.fireEvent("available");if(this.currentUser){this.setLoggedIn()}else{this.setLoggedOut()}}},scope:this})},login:function(g,f,h,e){Ext.Ajax.request({url:Docs.baseUrl+"/login",method:"POST",cors:true,params:{username:g,password:f},callback:function(c,a,d){var b=JSON.parse(d.responseText);if(b.success){this.currentUser=b;this.setSid(b.sessionID,{remember:h});this.setLoggedIn()}else{Docs.Tip.show(b.reason,e,"bottom")}},scope:this})},logout:function(){Ext.Ajax.request({url:Docs.baseUrl+"/logout?sid="+this.sid,method:"POST",cors:true,callback:function(){this.setLoggedOut()},scope:this})},setLoggedIn:function(){if(this.currentUser){this.getAuth().showLoggedIn(this.currentUser.userName);this.fireEvent("loggedIn")}},setLoggedOut:function(b){this.currentUser={};this.setSid(null);this.getAuth().showLoggedOut();this.fireEvent("loggedOut")},isLoggedIn:function(){return Boolean(this.sid)},setSid:function(d,f){this.sid=d;if(d){var e=null;if(f&&f.remember){e=new Date();e.setTime(e.getTime()+(60*60*24*30*1000))}Ext.util.Cookies.set("sid",d,e)}else{Ext.util.Cookies.clear("sid")}}});Ext.define("Docs.controller.Welcome",{extend:"Docs.controller.Content",baseUrl:"#",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#welcomeindex"}],init:function(){this.addEvents("loadIndex")},loadIndex:function(){this.fireEvent("loadIndex");Ext.getCmp("treecontainer").hide();this.callParent([true])},isActive:function(){return !!this.getIndex().getTab()}});Ext.define("Docs.controller.Failure",{extend:"Docs.controller.Content",baseUrl:"#",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#failure"}],show404:function(c){var d=new Ext.XTemplate("<h1>Oops...</h1>","<p>{msg}</p>","<p>Maybe it was renamed to something else? Or maybe your internet connection has failed? ","This would be sad. Hopefully it's just a bug on our side. ","Report it to <a href='http://www.sencha.com/forum/showthread.php?135036'>Sencha Forum</a> if you feel so.</p>","<p>Sorry for all this :(</p>");Ext.getCmp("failure").update(d.apply({msg:c}));Ext.getCmp("card-panel").layout.setActiveItem("failure")}});Ext.define("Docs.controller.Classes",{extend:"Docs.controller.Content",baseUrl:"#!/api",title:"API Documentation",requires:["Docs.History","Docs.Syntax","Docs.ClassRegistry"],refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#classindex"},{ref:"header",selector:"classheader"},{ref:"overview",selector:"classoverview"},{ref:"tabPanel",selector:"classtabpanel"},{ref:"tree",selector:"#classtree"},{ref:"favoritesGrid",selector:"#favorites-grid"}],cache:{},init:function(){this.addEvents("showIndex","showClass","showMember");Ext.getBody().addListener("click",function(c,d){this.handleUrlClick(decodeURI(d.href),c)},this,{preventDefault:true,delegate:".docClass"});this.control({classtree:{urlclick:function(d,c){this.handleUrlClick(d,c,this.getTree())}},toolbar:{toggleExpanded:function(b){Ext.Array.forEach(Ext.query(".side.expandable"),function(a){Ext.get(a).parent()[b?"addCls":"removeCls"]("open")})}},classoverview:{afterrender:function(b){b.el.addListener("click",function(i,k){var h=Ext.get(k).up(".member"),l=h.down(".meta .defined-in"),j=l.getAttribute("rel"),a=h.getAttribute("id");if(h.hasCls("open")){this.setExpanded(a,false)}else{this.setExpanded(a,true);this.fireEvent("showMember",j,a)}h.toggleCls("open")},this,{preventDefault:true,delegate:".expandable"});b.el.addListener("click",Ext.emptyFn,this,{preventDefault:true,delegate:".not-expandable"})}},treecontainer:{afterrender:function(b){b.el.addListener("dblclick",function(){if(b.getWidth()<30){b.setWidth(b.expandedWidth)}else{b.expandedWidth=b.getWidth();b.setWidth(20)}},this,{delegate:".x-resizable-handle"})}},doctabs:{tabClose:function(b){this.getOverview().eraseScrollContext(b)}}})},setExpanded:function(f,d){var e=this.currentCls;if(!e.expanded){e.expanded={}}if(d){e.expanded[f]=d}else{delete e.expanded[f]}},applyExpanded:function(b){Ext.Object.each(b.expanded||{},function(a){Ext.get(a).addCls("open")},this)},handleUrlClick:function(d,f,e){d=Docs.History.cleanUrl(d);if(this.opensNewWindow(f)){window.open(d);e&&e.selectUrl(this.currentCls?"#!/api/"+this.currentCls.name:"")}else{this.loadClass(d)}},loadIndex:function(b){Ext.getCmp("treecontainer").showTree("classtree");this.callParent(arguments);this.fireEvent("showIndex")},loadClass:function(f,i){Ext.getCmp("card-panel").layout.setActiveItem("classcontainer");Ext.getCmp("treecontainer").showTree("classtree");i||Docs.History.push(f);var j=f.match(/^#!\/api\/(.*?)(?:-(.*))?$/);var g=Docs.ClassRegistry.canonicalName(j[1]);var h=j[2];if(this.getOverview()){this.getOverview().setLoading(true)}if(this.cache[g]){this.showClass(this.cache[g],h)}else{this.cache[g]="in-progress";Ext.data.JsonP.request({url:this.getBaseUrl()+"/output/"+g+".js",callbackName:g.replace(/\./g,"_"),success:function(b,a){this.cache[g]=b;this.showClass(b,h)},failure:function(b,a){this.cache[g]=false;this.getOverview().setLoading(false);this.getController("Failure").show404("Class <b>"+g+"</b> was not found.")},scope:this})}},showClass:function(e,f){var d=false;if(e==="in-progress"){return}this.getOverview().setLoading(false);this.getViewport().setPageTitle(e.name);if(this.currentCls!==e){this.currentCls=e;this.getHeader().load(e);this.getOverview().load(e);this.applyExpanded(e);d=true}this.currentCls=e;this.getOverview().setScrollContext("#!/api/"+e.name);if(f){this.getOverview().scrollToEl("#"+f);this.fireEvent("showMember",e.name,f)}else{this.getOverview().restoreScrollState()}this.getTree().selectUrl("#!/api/"+e.name);this.fireEvent("showClass",e.name,{reRendered:d})}});Ext.define("Docs.controller.Comments",{extend:"Docs.controller.Content",baseUrl:"#!/comment",title:"Comments",mixins:{authMixin:"Docs.controller.AuthHelpers"},requires:["Docs.view.auth.LoginHelper","Docs.Syntax","Docs.Tip"],refs:[{ref:"viewport",selector:"#viewport"},{ref:"overview",selector:"classoverview"},{ref:"index",selector:"#commentindex"}],init:function(){this.addEvents("add","remove","changeSubscription");if(!Docs.enableComments){return}this.getController("Auth").on({available:function(){this.enableComments()},loggedIn:function(){Docs.view.Comments.renderNewCommentForms();this.isMod()&&this.getController("Tabs").showCommentsTab()},loggedOut:function(){Docs.view.Comments.renderNewCommentForms();this.getController("Tabs").hideCommentsTab()},scope:this});this.getController("Classes").on({showClass:function(d,c){if(c.reRendered){this.renderClassCommentContainers(d)}},scope:this});this.getController("Guides").on({showGuide:function(d,c){if(c.reRendered){this.renderGuideCommentContainers(d)}},scope:this});this.getController("Videos").on({showVideo:function(c,d){if(d.reRendered){this.renderVideoCommentContainers(c)}},scope:this});this.control({viewport:{afterrender:function(b){Ext.Array.each([[".toggleComments","click",this.toggleComments],[".toggleMemberComments","click",this.showMemberComments],[".toggleNewComment","click",this.toggleNewComment],[".toggleCommentGuide","click",this.toggleCommentGuide],[".postComment","click",this.postComment],[".updateComment","click",this.updateComment],[".cancelUpdateComment","click",this.cancelUpdateComment],[".deleteComment","click",this.deleteComment],[".undoDeleteComment","click",this.undoDeleteComment],[".editComment","click",this.editComment],[".readComment","click",this.readComment],[".fetchMoreComments","click",this.fetchMoreComments],[".voteCommentUp","click",this.voteUp],[".voteCommentDown","click",this.voteDown],["#hideRead","change",function(){this.fetchRecentComments()}]],function(a){b.el.addListener(a[1],a[2],this,{preventDefault:true,delegate:a[0]})},this);b.el.addListener("click",this.updateSubscription,this,{delegate:".subscriptionCheckbox"})}},"classoverview toolbar":{commentcountclick:function(c){var d=Ext.get(Ext.query(".comments-section .comments-div")[0]);this.getOverview().scrollToEl(".comments-section",-20);this.openComments(d)}}})},isMod:function(){return this.getController("Auth").currentUser.mod},enableComments:function(){if(!this.commentsEnabled){this.commentsEnabled=true}},loadIndex:function(){this.fireEvent("loadIndex");Ext.getCmp("treecontainer").hide();if(!this.recentComments){this.fetchRecentComments();this.recentComments=true}this.callParent([true])},fetchComments:function(i,j,k){var l=Ext.JSON.encode(this.commentId(i)),g=Ext.JSON.encode(this.commentId(i).concat([{}])),h=this.getController("Auth").currentUser;this.request("jsonp",{url:"/comments",method:"GET",params:{reduce:false,startkey:l,endkey:g,user:h&&h.userName},success:function(a){j.call(this,a,i,k)},scope:this})},postComment:function(t,A){if(!this.isLoggedIn()){return false}var q=Ext.get(A),v=q.up(".comments-div"),B=v.getAttribute("id"),u=this.commentId(B),D=Ext.JSON.encode(u),r=v.down("textarea").dom,w=r.editor.getValue(),y=v.down(".commentAction").getValue(),p=v.select("[name=feedback]");var x=null;if(p){p.each(function(a){if(a.dom.checked){x=a.dom.value}})}if(w.replace(/( |\n|\t)+/g,"")==""){return false}if(this.lastCommentPost&&((Math.ceil(Number(new Date())/1000))-this.lastCommentPost)<10){Ext.Msg.alert("Please wait","Please wait 10 seconds between posting comments.");return false}if(q.hasCls("disabled")){return false}q.addCls("disabled");var C=u[1],s=u[1],z="#!/api/";if(u[0]=="video"){s="Video "+s;z="#!/video/"}else{if(u[0]=="guide"){s="Guide "+s;z="#!/guide/"}else{if(u[2]!=""){C+="-"+u[2];s+=" "+u[2]}}}this.request("ajax",{url:"/comments",method:"POST",params:{target:D,comment:w,rating:x,action:y,title:s,url:"http://"+window.location.host+window.location.pathname+z+C},callback:function(c,a,d){if(d&&d.responseText){var b=Ext.JSON.decode(d.responseText);this.fireEvent("add",B);r.editor.setValue("");q.removeCls("disabled");this.toggleNewComment(null,A);this.lastCommentPost=Math.ceil(Number(new Date())/1000);if(b.success&&b.id){this.fetchComments(B,this.appendNewComment,{id:b.id})}else{Ext.Msg.alert("Error",b.reason||"There was an error submitting your request")}}},scope:this})},fetchRecentComments:function(c){var d={offset:c||0,limit:100};if(this.isHideReadChecked()){d.hideRead=1}this.request("jsonp",{url:"/comments_recent",method:"GET",params:d,success:function(a){this.renderComments(a,"recentcomments",{hideCommentForm:true,append:!!c,showCls:true})},scope:this})},isHideReadChecked:function(){var b=Ext.get("hideRead");return b&&b.dom.checked},fetchMoreComments:function(c,d){this.fetchRecentComments(Ext.get(d).getAttribute("rel"))},deleteComment:function(f,g){if(!this.isLoggedIn()){return}var h=Ext.get(g).up(".comment").getAttribute("id"),i=Ext.get(g).up(".comments-div"),j=i&&i.getAttribute("id");this.request("ajax",{url:"/comments/"+h+"/delete",method:"POST",callback:function(c,a,d){var b=Ext.JSON.decode(d.responseText);if(b.success){if(j){this.fireEvent("remove",j)}Ext.get(h).update('<div class="deleted-comment">Comment was deleted. <a href="#" class="undoDeleteComment">Undo</a>.</div>')}else{Ext.Msg.alert("Error",b.reason||"There was an error submitting your request")}},scope:this})},readComment:function(f,g){if(!this.isLoggedIn()){return}var h=Ext.get(g).up(".comment").getAttribute("id"),i=Ext.get(g).up(".comments-div"),j=i&&i.getAttribute("id");this.request("ajax",{url:"/comments/"+h+"/read",method:"POST",callback:function(c,a,d){var b=Ext.JSON.decode(d.responseText);if(b.success){Ext.get(g).addCls("read")}else{Ext.Msg.alert("Error",b.reason||"There was an error submitting your request")}},scope:this})},undoDeleteComment:function(g,h){if(!this.isLoggedIn()){return}var i=Ext.get(h).up(".comment");var j=i.getAttribute("id");var k=i.up(".comments-div");var l=k&&k.getAttribute("id");this.request("ajax",{url:"/comments/"+j+"/undo_delete",method:"POST",callback:function(c,a,d){var b=Ext.JSON.decode(d.responseText);if(b.success){if(l){this.fireEvent("add",l)}b.comment.id=b.comment._id;var e=Docs.view.Comments.commentTpl.insertBefore(i,b.comment);Docs.Syntax.highlight(e);i.remove()}else{Ext.Msg.alert("Error",b.reason||"There was an error submitting your request")}},scope:this})},editComment:function(j,k){var i=Ext.get(k).up(".comment"),g=i.getAttribute("id"),l=i.down(".content"),h=this.getController("Auth").currentUser;this.request("ajax",{url:"/comments/"+g,method:"GET",callback:function(e,a,f){var b=Ext.JSON.decode(f.responseText);if(b.success){l.dom.origContent=l.dom.innerHTML;var c=Ext.merge(Ext.clone(h),{content:b.content,updateComment:true});var d=Docs.view.Comments.editCommentTpl.overwrite(l,c,true);var n=d.down("textarea").dom;Docs.view.Comments.makeCodeMirror(n,d)}},scope:this})},updateComment:function(k,g){if(!this.isLoggedIn()){return false}var h=Ext.get(g),i=h.up(".comment"),j=i.getAttribute("id");var l=i.down("textarea").dom.editor.getValue();if(h.hasCls("disabled")){return false}h.addCls("disabled");this.request("ajax",{url:"/comments/"+j,method:"POST",params:{content:l},callback:function(d,a,e){var b=Ext.JSON.decode(e.responseText);if(b.success){var c=i.down(".content");c.update(b.content);Docs.Syntax.highlight(c)}},scope:this})},cancelUpdateComment:function(j,g){var i=Ext.get(g),h=i.up(".comment"),f=h.down(".content");if(f&&f.dom.origContent){f.update(f.dom.origContent)}},voteUp:function(c,d){this.vote("up",d)},voteDown:function(c,d){this.vote("down",d)},updateSubscription:function(k,l){var i=Ext.get(l).up(".comments-div"),h=Ext.get(l).up("label"),g=i.getAttribute("id"),j=l.checked;this.request("ajax",{url:"/subscribe",method:"POST",params:{target:Ext.JSON.encode(this.commentId(g)),subscribed:j},success:function(){if(j){Docs.Tip.show("Updates to this thread will be e-mailed to you.",h,"bottom")}else{Docs.Tip.show("You have unsubscribed from this thread.",h,"bottom")}},failure:function(){Docs.Tip.show("Subscription change failed.",h,"bottom");l.checked=!l.checked},scope:this})},vote:function(i,f){if(!this.isLoggedIn()){Docs.Tip.show("Please login to vote on this comment",f);return false}else{if(Ext.get(f).hasCls("selected")){Docs.Tip.show("You have already voted on this comment",f);return false}}var h=Ext.get(f).up(".comment").getAttribute("id"),j=Ext.get(f).up(".com-meta"),g=j.down(".score");this.request("ajax",{url:"/comments/"+h,method:"POST",params:{vote:i},callback:function(c,a,d){var b=Ext.JSON.decode(d.responseText);if(b.success){Ext.Array.each(j.query(".vote a"),function(e){Ext.get(e).removeCls("selected")});if(b.direction==="up"||b.direction==="down"){Ext.get(j.query(".vote a.voteComment"+(b.direction=="up"?"Up":"Down"))[0]).addCls("selected")}g.update(String(b.total))}else{Docs.Tip.show(b.reason,f);return false}},scope:this})},toggleComments:function(f,d){var e=Ext.get(d).up(".comments-div");if(e.hasCls("open")){this.closeComments(e)}else{this.openComments(e)}},openComments:function(e){if(e.hasCls("open")){return}var f=e.down(".name"),h=e.down(".comment-list");e.addCls("open");f.setStyle("display","none");if(h){h.setStyle("display","block")}else{var g=e.getAttribute("id");Docs.view.Comments.loadingTpl.append(e);this.fetchComments(g,this.renderComments)}},closeComments:function(d){if(!d.hasCls("open")){return}var e=d.down(".name"),f=d.down(".comment-list");d.removeCls("open");e.setStyle("display","block");if(f){f.setStyle("display","none")}},showMemberComments:function(g,e){var h=Ext.get(e).up(".member");if(h){var f=h.down(".comments-div");h.addCls("open");this.openComments(f);this.getOverview().scrollToEl(f,-20)}},renderClassCommentContainers:function(){var b=this.getController("Classes").currentCls;Docs.view.Comments.renderClassCommentContainers(b)},renderGuideCommentContainers:function(b){Docs.view.Comments.classCommentsTpl.append(Ext.get("guide").down(".x-panel-body"),{num:0,id:"guide-"+b})},renderVideoCommentContainers:function(b){Docs.view.Comments.classCommentsTpl.append(Ext.get("video").down(".x-panel-body"),{num:0,id:"video-"+b})},renderComments:function(m,t,x){x=x||{};var q=Ext.get(t),n=q.down(".loading");var r=Ext.Array.map(m,function(a){a.id=a._id;a.key=a.target;if(x.showCls){a.showCls=true}return a});if(n){n.remove()}if(x.append){var v=document.createElement("div");Docs.view.Comments.appendCommentsTpl.append(v,r);q.down(".comment-list").appendChild(v);Docs.Syntax.highlight(v);this.updateCommentsPager(q,r)}else{var p=q.down(".comment-list");if(p){Docs.view.Comments.appendCommentsTpl.overwrite(p,r);this.updateCommentsPager(q,r)}else{Docs.view.Comments.commentsTpl.append(q,r)}Docs.Syntax.highlight(q)}if(x.hideCommentForm){q.addCls("hideCommentForm")}else{if(!q.hasCls("hideCommentForm")){var w=q.down(".new-comment-wrap");if(this.isLoggedIn()){var s=Ext.apply(this.getController("Auth").currentUser,{userSubscribed:Docs.commentSubscriptions[t]});var u=Docs.view.Comments.loggedInCommentTpl.overwrite(w,s,true);if(u){var o=u.down("textarea");if(o){Docs.view.Comments.makeCodeMirror(o.dom,u)}}}else{Docs.view.auth.LoginHelper.renderToComments(w)}}}},updateCommentsPager:function(f,d){var e=d[d.length-1]||{};f.down(".recent-comments-pager").update(Docs.view.Comments.getPagerHtml(e))},toggleNewComment:function(f,d){if(!this.isLoggedIn()){return}var e=Ext.get(d).up(".new-comment");if(e.hasCls("open")){e.removeCls("open")}else{e.addCls("open")}},appendNewComment:function(i,h,f){var g=Ext.get(h).down(".new-comment-wrap"),j;if(f.id){Ext.Array.each(i,function(a){if(a._id==f.id){j=a;j.id=f.id}})}else{j=i[i.length-1];j.id=i[i.length-1]._id}Docs.view.Comments.commentTpl.insertBefore(g,j);Docs.Syntax.highlight(g.up(".comment-list"))},commentId:function(b){return Docs.commentMeta.idMap[b]||["unknown"]},toggleCommentGuide:function(h,j){var g=Ext.get(j).up("form"),e=g.down(".commentGuideTxt"),i=e.getStyle("display");e.setStyle("display",(i=="none")?"block":"none")},closeCodeEditor:function(b){b.removeCls("selected");if(b.editor){b.editor.toTextArea()}}});Ext.define("Docs.controller.CommentsMeta",{extend:"Ext.app.Controller",mixins:{authMixin:"Docs.controller.AuthHelpers"},refs:[{ref:"toolbar",selector:"classoverview toolbar"},{ref:"authentication",selector:"authentication"},{ref:"overview",selector:"classoverview"}],init:function(){Docs.commentMeta={idMap:{},"class":{},guide:{},video:{}};Docs.commentSubscriptions={};this.addEvents("afterLoad");if(!Docs.enableComments){return}this.getController("Auth").on({available:function(){this.fetchCommentMeta()},loggedIn:function(){this.fetchSubscriptionMeta()},scope:this});this.getController("Comments").on({add:function(b){this.updateCommentMeta(b,1)},remove:function(b){this.updateCommentMeta(b,-1)},scope:this});this.getController("Classes").on({showIndex:function(){this.updateClassIndex()},showClass:function(d,c){if(c.reRendered){this.createCommentIdMap(this.getController("Classes").currentCls);this.renderClassCommentMeta(d)}},scope:this});this.getController("Guides").on({showGuide:function(d,c){Docs.commentMeta.idMap["comments-guide-"+d]=["guide",d,""];this.renderGuideCommentMeta(d)},scope:this});this.getController("Videos").on({showVideo:function(c,d){Docs.commentMeta.idMap["comments-video-"+c]=["video",c,""];this.renderVideoCommentMeta(c)},scope:this});this.control({hovermenu:{refresh:this.refreshHoverMenu}})},fetchCommentMeta:function(){this.request("jsonp",{url:"/comments_meta",method:"GET",success:function(b){Ext.Array.each(b.comments,function(a){this.updateMeta(a._id.split("__"),a.value)},this);Ext.Array.each(b.subscriptions,function(d){var a="comments-"+d.join("-").replace(/\./g,"-").replace(/-$/,"");Docs.commentSubscriptions[a]=true},this);this.metaLoaded=true;this.fireEvent("afterLoad");this.updateClassIndex()},scope:this})},fetchSubscriptionMeta:function(){this.request("jsonp",{url:"/subscriptions",method:"GET",success:function(b){Ext.Array.each(b.subscriptions,function(d){var a="comments-"+d.join("-").replace(/\./g,"-").replace(/-$/,"");Docs.commentSubscriptions[a]=true},this)},scope:this})},updateCommentMeta:function(f,d){var e=Docs.commentMeta.idMap[f];this.updateMeta(e,d);if(e[0]=="guide"){Docs.view.Comments.updateGuideCommentMeta(e[1])}else{if(e[0]=="video"){Docs.view.Comments.updateVideoCommentMeta(e[1])}else{Docs.view.Comments.updateClassCommentMeta(e[1])}}},updateMeta:function(d,c){Docs.commentMeta[d[0]]=Docs.commentMeta[d[0]]||{};Docs.commentMeta[d[0]][d[1]]=Docs.commentMeta[d[0]][d[1]]||{total:0};Docs.commentMeta[d[0]][d[1]][d[2]]=Docs.commentMeta[d[0]][d[1]][d[2]]||0;Docs.commentMeta[d[0]][d[1]][d[2]]+=c;Docs.commentMeta[d[0]][d[1]]["total"]+=c},createCommentIdMap:function(b){Docs.commentMeta.idMap[("comments-class-"+b.name).replace(/\./g,"-")]=["class",b.name,""];b.members&&this.createMembersCommentIdMap(b,b.members);b.statics&&this.createMembersCommentIdMap(b,b.statics)},createMembersCommentIdMap:function(e,d){for(var f in d){Ext.Array.each(d[f],function(h){var a=["class",e.name,h.id];var b=["class",h.owner,h.id];var c="comments-"+a.join("-").replace(/\./g,"-");Docs.commentMeta.idMap[c]=b},this)}},refreshHoverMenu:function(b){this.afterMetaLoaded(function(){Docs.view.Comments.renderHoverMenuMeta(b.el)},this)},updateClassIndex:function(){if(this.getController("Comments").commentsEnabled){this.afterMetaLoaded(function(){Docs.view.Comments.updateClassIndex()},this)}},renderClassCommentMeta:function(b){this.afterMetaLoaded(function(){Docs.view.Comments.updateClassCommentMeta(b)},this)},renderGuideCommentMeta:function(b){this.afterMetaLoaded(function(){Docs.view.Comments.updateGuideCommentMeta(b)},this)},renderVideoCommentMeta:function(b){this.afterMetaLoaded(function(){Docs.view.Comments.updateVideoCommentMeta(b)},this)},afterMetaLoaded:function(c,d){if(this.metaLoaded){c.call(d)}else{this.addListener("afterLoad",c,d,{single:true})}}});Ext.define("Docs.controller.Examples",{extend:"Docs.controller.Content",baseUrl:"#!/example",title:"Examples",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#exampleindex"},{ref:"tree",selector:"#exampletree"},{ref:"page",selector:"#example"}],init:function(){this.addEvents("showExample");this.control({"#exampletree":{urlclick:function(d,c){this.loadExample(d)}},"exampleindex > thumblist":{urlclick:function(b){this.loadExample(b)}},touchexamplecontainer:{afterrender:function(b){b.el.addListener("click",function(d,a){this.changeDevice("tablet")},this,{delegate:"button.tablet"});b.el.addListener("click",function(d,a){this.changeDevice("phone")},this,{delegate:"button.phone"});b.el.addListener("click",function(d,a){this.changeOrientation("portrait")},this,{delegate:"button.portrait"});b.el.addListener("click",function(d,a){this.changeOrientation("landscape")},this,{delegate:"button.landscape"});b.el.addListener("click",function(d,a){this.openInNewWindow()},this,{delegate:"button.new-window"})}}})},loadIndex:function(){Ext.getCmp("treecontainer").showTree("exampletree");this.callParent()},loadExample:function(d,f){var e=this.getExample(d);if(!e){this.getController("Failure").show404("Example <b>"+d+"</b> was not found.");return}this.getViewport().setPageTitle(e.text);if(this.activeUrl!==d){this.getPage().clear();this.activateExampleCard();this.getPage().load(e)}else{this.activateExampleCard()}f||Docs.History.push(d);this.fireEvent("showExample",d);this.getTree().selectUrl(d);this.activeUrl=d},activateExampleCard:function(){Ext.getCmp("card-panel").layout.setActiveItem("example");Ext.getCmp("treecontainer").showTree("exampletree")},getExample:function(b){if(!this.map){this.map={};Ext.Array.forEach(Docs.data.examples,function(a){Ext.Array.forEach(a.items,function(d){this.map["#!/example/"+d.name]=d},this)},this)}return this.map[b]},changeOrientation:function(b){this.getPage().setOrientation(b)},changeDevice:function(b){this.getPage().setDevice(b)},openInNewWindow:function(){window.open(this.getExample(this.activeUrl).url)}});Ext.define("Docs.controller.Guides",{extend:"Docs.controller.Content",baseUrl:"#!/guide",title:"Guides",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#guideindex"},{ref:"tree",selector:"#guidetree"},{ref:"guide",selector:"#guide"}],cache:{},init:function(){this.addEvents("showGuide");this.control({"#guidetree":{urlclick:function(d,c){this.handleUrlClick(d,c,this.getTree())}},"guideindex > thumblist":{urlclick:function(b){this.loadGuide(b)}},indexcontainer:{afterrender:function(b){b.el.addListener("click",function(d,a){this.handleUrlClick(a.href,d)},this,{preventDefault:true,delegate:".guide"})}},doctabs:{tabClose:function(b){this.getGuide().eraseScrollContext(b)}}})},handleUrlClick:function(d,f,e){d=d.replace(/.*#!?/,"#!");if(this.opensNewWindow(f)){window.open(d);e&&e.selectUrl(this.activeUrl?this.activeUrl:"")}else{this.loadGuide(d)}},loadIndex:function(){Ext.getCmp("treecontainer").showTree("guidetree");this.callParent()},loadGuide:function(j,h){Ext.getCmp("card-panel").layout.setActiveItem("guide");Ext.getCmp("treecontainer").showTree("guidetree");var g=j.match(/^#!\/guide\/(.*?)(-section-[0-9]+)?$/);var f=g[1];var i=g[2];j="#!/guide/"+f;h||Docs.History.push(j);if(this.cache[f]){this.showGuide(this.cache[f],j,f,i)}else{this.cache[f]="in-progress";Ext.data.JsonP.request({url:this.getBaseUrl()+"/guides/"+f+"/README.js",callbackName:f,success:function(a){this.cache[f]=a;this.showGuide(a,j,f,i)},failure:function(b,a){this.cache[f]=false;this.getController("Failure").show404("Guide <b>"+f+"</b> was not found.")},scope:this})}},showGuide:function(i,j,f,h){var g=false;if(i==="in-progress"){return}this.getViewport().setPageTitle(i.title);if(this.activeUrl!==j){Ext.getCmp("guide").load({name:f,content:i.guide});g=true}this.activeUrl=j;this.getGuide().setScrollContext(this.activeUrl);if(h){this.getGuide().scrollToEl(f+h)}else{this.getGuide().restoreScrollState()}this.fireEvent("showGuide",f,{reRendered:g});this.getTree().selectUrl(j)}});Ext.define("Docs.controller.Videos",{extend:"Docs.controller.Content",baseUrl:"#!/video",title:"Videos",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#videoindex"},{ref:"tree",selector:"#videotree"}],init:function(){this.addEvents("showVideo");this.control({"#videotree":{urlclick:function(b){this.loadVideo(b)}},"videoindex > thumblist":{urlclick:function(b){this.loadVideo(b)}}})},loadIndex:function(){Ext.getCmp("treecontainer").showTree("videotree");this.callParent()},loadVideo:function(j,h){var f=false;Ext.getCmp("card-panel").layout.setActiveItem("video");Ext.getCmp("treecontainer").showTree("videotree");var g=j.match(/^#!\/video\/(.*)$/)[1];var i=this.getVideo(g);if(!i){this.getController("Failure").show404("Video <b>"+g+"</b> was not found.");return}this.getViewport().setPageTitle(i.title);if(this.activeUrl!==j){Ext.getCmp("video").load(i);f=true}h||Docs.History.push(j);this.fireEvent("showVideo",g,{reRendered:f});this.getTree().selectUrl(j);this.activeUrl=j},getVideo:function(b){if(!this.map){this.map={};Ext.Array.forEach(Docs.data.videos,function(a){Ext.Array.forEach(a.items,function(d){this.map[d.name]=d},this)},this)}return this.map[b]}});Ext.define("Docs.controller.Stats",{extend:"Docs.controller.Content",baseUrl:"#!/stats",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#statsindex"}],init:function(){this.addEvents("loadIndex")},loadIndex:function(){this.fireEvent("loadIndex");Ext.getCmp("treecontainer").hide();this.callParent([true])},isActive:function(){return !!this.getIndex().getTab()}});Ext.define("Docs.controller.Tests",{extend:"Docs.controller.Content",baseUrl:"#!/tests",refs:[{ref:"viewport",selector:"#viewport"},{ref:"index",selector:"#testsindex"}],init:function(){this.addEvents("loadIndex");this.control({"#testsgrid":{afterrender:this.loadExamples}})},loadIndex:function(){this.fireEvent("loadIndex");Ext.getCmp("treecontainer").hide();this.callParent([true])},isActive:function(){return !!this.getIndex().getTab()},loadExamples:function(){this.getIndex().disable();Ext.data.JsonP.request({url:this.getBaseUrl()+"/inline-examples.js",callbackName:"__inline_examples__",success:function(b){this.getIndex().addExamples(b);this.getIndex().enable()},scope:this})}});Ext.define("Docs.view.examples.InlineWrap",{alias:"widget.inlineexample",requires:["Docs.view.examples.Inline","Docs.view.examples.InlineToolbar"],constructor:function(c){this.pre=c;var d=this.parseOptions(c.className);this.initToolbar();if(d.preview){this.replacePre(d)}else{this.tb.on("buttonclick",function(a){d.preview=(a==="preview");this.replacePre(d)},this,{single:true})}},parseOptions:function(c){var d={};Ext.Array.forEach(c.split(/ +/),function(a){if(a==="phone"||a==="miniphone"||a==="tablet"){d.device=a}else{if(a==="ladscape"||a==="portrait"){d.orientation=a}else{d[a]=true}}});return d},initToolbar:function(){var b=document.createElement("div");this.pre.parentNode.insertBefore(b,this.pre);this.tb=Ext.create("Docs.view.examples.InlineToolbar",{renderTo:b})},replacePre:function(d){var c=document.createElement("div");this.pre.parentNode.replaceChild(c,this.pre);Ext.create("Docs.view.examples.Inline",{height:200,renderTo:c,value:Ext.String.htmlDecode(Ext.util.Format.stripTags(this.pre.innerHTML)),options:d,toolbar:this.tb})}});Ext.define("Docs.controller.InlineExamples",{extend:"Ext.app.Controller",requires:["Docs.view.examples.InlineWrap"],init:function(){this.control({classoverview:{resize:this.createResizer(".class-overview"),afterload:this.replaceExampleDivs},guidecontainer:{resize:this.createResizer(".guide-container"),afterload:this.replaceExampleDivs}})},createResizer:function(b){return function(){Ext.Array.each(Ext.ComponentQuery.query(b+" .inlineexample"),function(a){if(a.editor&&a.isVisible()){a.doLayout()}})}},replaceExampleDivs:function(){Ext.Array.each(Ext.query(".inline-example"),function(b){Ext.create("Docs.view.examples.InlineWrap",b)},this)}});Ext.define("Docs.store.Search",{extend:"Ext.data.Store",fields:["name","fullName","icon","url","meta","sort"],proxy:{type:"memory",reader:{type:"json"}}});Ext.define("Docs.controller.Search",{extend:"Ext.app.Controller",requires:["Docs.ClassRegistry","Docs.History"],stores:["Search"],refs:[{ref:"field",selector:"#search-field"}],pageIndex:0,pageSize:10,init:function(){this.control({"#search-dropdown":{itemclick:function(c,d){this.loadRecord(d)},changePage:function(c,d){this.pageIndex+=d;this.search(this.getField().getValue());this.keepDropdown()},footerClick:function(b){this.keepDropdown()}},"#search-field":{keyup:function(m,l){var j=this.getDropdown();m.setHideTrigger(m.getValue().length===0);if(l.keyCode===Ext.EventObject.ESC||!m.value){j.hide();m.setValue("");return}else{j.show()}var h=j.getSelectionModel();var i=h.getLastSelected();var n=j.store.indexOf(i);var k=j.store.getCount()-1;if(l.keyCode===Ext.EventObject.UP){if(n===undefined){h.select(0)}else{h.select(n===0?k:(n-1))}}else{if(l.keyCode===Ext.EventObject.DOWN){if(n===undefined){h.select(0)}else{h.select(n===k?0:n+1)}}else{if(l.keyCode===Ext.EventObject.ENTER){l.preventDefault();i&&this.loadRecord(i)}else{this.pageIndex=0;clearTimeout(this.searchTimeout);this.searchTimeout=Ext.Function.defer(function(){this.search(m.value)},50,this)}}}},focus:function(b){if(b.value&&this.getDropdown().store.getCount()>0){this.getDropdown().show()}},blur:function(){var b=this.getDropdown();this.hideTimeout=Ext.Function.defer(b.hide,500,b)}}})},getDropdown:function(){return this.dropdown||(this.dropdown=Ext.getCmp("search-dropdown"))},keepDropdown:function(){clearTimeout(this.hideTimeout);this.getField().focus()},loadRecord:function(b){Docs.History.navigate(b.get("url"));this.getDropdown().hide()},search:function(h){var e=Docs.ClassRegistry.search(h);if(this.pageIndex<0){this.pageIndex=0}else{if(this.pageIndex>Math.floor(e.length/this.pageSize)){this.pageIndex=Math.floor(e.length/this.pageSize)}}var g=this.pageIndex*this.pageSize;var f=g+this.pageSize;this.getDropdown().setTotal(e.length);this.getDropdown().setStart(g);this.getDropdown().getStore().loadData(e.slice(g,f));this.getDropdown().alignTo("search-field","bl",[-12,-2]);if(e.length===0){this.getDropdown().hide()}else{this.getDropdown().getSelectionModel().select(0)}}});Ext.ns("Docs");Ext.Loader.setConfig({enabled:true,paths:{Docs:"app"}});Ext.require("Docs.view.Viewport");Ext.require("Ext.form.field.Trigger");Ext.require("Ext.tab.Panel");Ext.require("Ext.grid.column.Action");Ext.require("Ext.grid.plugin.DragDrop");Ext.require("Ext.layout.container.Border");Ext.require("Ext.data.TreeStore");Ext.require("Ext.toolbar.Spacer");Ext.require("Docs.Application");Ext.onReady(function(){Ext.create("Docs.Application")});
\ No newline at end of file