Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: chrome/test/data/dromaeo/lib/ext-core.js

Issue 269054: Importing dromaeo performance tests to src/chrome/test/data.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/data/dromaeo/lib/ext-base.js ('k') | chrome/test/data/dromaeo/lib/jquery.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Ext JS Library 2.2
3 * Copyright(c) 2006-2008, Ext JS, LLC.
4 * licensing@extjs.com
5 *
6 * http://extjs.com/license
7 */
8
9 Ext.DomHelper=function(){var L=null;var F=/^(?:br|frame|hr|img|input|link|meta|r ange|spacer|wbr|area|param|col)$/i;var B=/^table|tbody|tr|td$/i;var A=function(T ){if(typeof T=="string"){return T}var O="";if(Ext.isArray(T)){for(var R=0,P=T.le ngth;R<P;R++){O+=A(T[R])}return O}if(!T.tag){T.tag="div"}O+="<"+T.tag;for(var N in T){if(N=="tag"||N=="children"||N=="cn"||N=="html"||typeof T[N]=="function"){c ontinue}if(N=="style"){var S=T["style"];if(typeof S=="function"){S=S.call()}if(t ypeof S=="string"){O+=" style=\""+S+"\""}else{if(typeof S=="object"){O+=" style= \"";for(var Q in S){if(typeof S[Q]!="function"){O+=Q+":"+S[Q]+";"}}O+="\""}}}els e{if(N=="cls"){O+=" class=\""+T["cls"]+"\""}else{if(N=="htmlFor"){O+=" for=\""+T ["htmlFor"]+"\""}else{O+=" "+N+"=\""+T[N]+"\""}}}}if(F.test(T.tag)){O+="/>"}else {O+=">";var U=T.children||T.cn;if(U){O+=A(U)}else{if(T.html){O+=T.html}}O+="</"+ T.tag+">"}return O};var M=function(T,O){var S;if(Ext.isArray(T)){S=document.crea teDocumentFragment();for(var R=0,P=T.length;R<P;R++){M(T[R],S)}}else{if(typeof T =="string"){S=document.createTextNode(T)}else{S=document.createElement(T.tag||"d iv");var Q=!!S.setAttribute;for(var N in T){if(N=="tag"||N=="children"||N=="cn"| |N=="html"||N=="style"||typeof T[N]=="function"){continue}if(N=="cls"){S.classNa me=T["cls"]}else{if(Q){S.setAttribute(N,T[N])}else{S[N]=T[N]}}}Ext.DomHelper.app lyStyles(S,T.style);var U=T.children||T.cn;if(U){M(U,S)}else{if(T.html){S.innerH TML=T.html}}}}if(O){O.appendChild(S)}return S};var I=function(S,Q,P,R){L.innerHT ML=[Q,P,R].join("");var N=-1,O=L;while(++N<S){O=O.firstChild}return O};var J="<t able>",E="</table>",C=J+"<tbody>",K="</tbody>"+E,H=C+"<tr>",D="</tr>"+K;var G=fu nction(N,O,Q,P){if(!L){L=document.createElement("div")}var R;var S=null;if(N=="t d"){if(O=="afterbegin"||O=="beforeend"){return }if(O=="beforebegin"){S=Q;Q=Q.par entNode}else{S=Q.nextSibling;Q=Q.parentNode}R=I(4,H,P,D)}else{if(N=="tr"){if(O== "beforebegin"){S=Q;Q=Q.parentNode;R=I(3,C,P,K)}else{if(O=="afterend"){S=Q.nextSi bling;Q=Q.parentNode;R=I(3,C,P,K)}else{if(O=="afterbegin"){S=Q.firstChild}R=I(4, H,P,D)}}}else{if(N=="tbody"){if(O=="beforebegin"){S=Q;Q=Q.parentNode;R=I(2,J,P,E )}else{if(O=="afterend"){S=Q.nextSibling;Q=Q.parentNode;R=I(2,J,P,E)}else{if(O== "afterbegin"){S=Q.firstChild}R=I(3,C,P,K)}}}else{if(O=="beforebegin"||O=="aftere nd"){return }if(O=="afterbegin"){S=Q.firstChild}R=I(2,J,P,E)}}}Q.insertBefore(R, S);return R};return{useDom:false,markup:function(N){return A(N)},applyStyles:fun ction(P,Q){if(Q){P=Ext.fly(P);if(typeof Q=="string"){var O=/\s?([a-z\-]*)\:\s?([ ^;]*);?/gi;var R;while((R=O.exec(Q))!=null){P.setStyle(R[1],R[2])}}else{if(typeo f Q=="object"){for(var N in Q){P.setStyle(N,Q[N])}}else{if(typeof Q=="function") {Ext.DomHelper.applyStyles(P,Q.call())}}}}},insertHtml:function(P,R,Q){P=P.toLow erCase();if(R.insertAdjacentHTML){if(B.test(R.tagName)){var O;if(O=G(R.tagName.t oLowerCase(),P,R,Q)){return O}}switch(P){case"beforebegin":R.insertAdjacentHTML( "BeforeBegin",Q);return R.previousSibling;case"afterbegin":R.insertAdjacentHTML( "AfterBegin",Q);return R.firstChild;case"beforeend":R.insertAdjacentHTML("Before End",Q);return R.lastChild;case"afterend":R.insertAdjacentHTML("AfterEnd",Q);ret urn R.nextSibling}throw"Illegal insertion point -> \""+P+"\""}var N=R.ownerDocum ent.createRange();var S;switch(P){case"beforebegin":N.setStartBefore(R);S=N.crea teContextualFragment(Q);R.parentNode.insertBefore(S,R);return R.previousSibling; case"afterbegin":if(R.firstChild){N.setStartBefore(R.firstChild);S=N.createConte xtualFragment(Q);R.insertBefore(S,R.firstChild);return R.firstChild}else{R.inner HTML=Q;return R.firstChild}case"beforeend":if(R.lastChild){N.setStartAfter(R.las tChild);S=N.createContextualFragment(Q);R.appendChild(S);return R.lastChild}else {R.innerHTML=Q;return R.lastChild}case"afterend":N.setStartAfter(R);S=N.createCo ntextualFragment(Q);R.parentNode.insertBefore(S,R.nextSibling);return R.nextSibl ing}throw"Illegal insertion point -> \""+P+"\""},insertBefore:function(N,P,O){re turn this.doInsert(N,P,O,"beforeBegin")},insertAfter:function(N,P,O){return this .doInsert(N,P,O,"afterEnd","nextSibling")},insertFirst:function(N,P,O){return th is.doInsert(N,P,O,"afterBegin","firstChild")},doInsert:function(Q,S,R,T,P){Q=Ext .getDom(Q);var O;if(this.useDom){O=M(S,null);(P==="firstChild"?Q:Q.parentNode).i nsertBefore(O,P?Q[P]:Q)}else{var N=A(S);O=this.insertHtml(T,Q,N)}return R?Ext.ge t(O,true):O},append:function(P,R,Q){P=Ext.getDom(P);var O;if(this.useDom){O=M(R, null);P.appendChild(O)}else{var N=A(R);O=this.insertHtml("beforeEnd",P,N)}return Q?Ext.get(O,true):O},overwrite:function(N,P,O){N=Ext.getDom(N);N.innerHTML=A(P) ;return O?Ext.get(N.firstChild,true):N.firstChild},createTemplate:function(O){va r N=A(O);return new Ext.Template(N)}}}();
10 Ext.Template=function(E){var B=arguments;if(Ext.isArray(E)){E=E.join("")}else{if (B.length>1){var C=[];for(var D=0,A=B.length;D<A;D++){if(typeof B[D]=="object"){ Ext.apply(this,B[D])}else{C[C.length]=B[D]}}E=C.join("")}}this.html=E;if(this.co mpiled){this.compile()}};Ext.Template.prototype={applyTemplate:function(B){if(th is.compiled){return this.compiled(B)}var A=this.disableFormats!==true;var E=Ext. util.Format,C=this;var D=function(G,I,L,H){if(L&&A){if(L.substr(0,5)=="this."){r eturn C.call(L.substr(5),B[I],B)}else{if(H){var K=/^\s*['"](.*)["']\s*$/;H=H.spl it(",");for(var J=0,F=H.length;J<F;J++){H[J]=H[J].replace(K,"$1")}H=[B[I]].conca t(H)}else{H=[B[I]]}return E[L].apply(E,H)}}else{return B[I]!==undefined?B[I]:""} };return this.html.replace(this.re,D)},set:function(A,B){this.html=A;this.compil ed=null;if(B){this.compile()}return this},disableFormats:false,re:/\{([\w-]+)(?: \:([\w\.]*)(?:\((.*?)?\))?)?\}/g,compile:function(){var fm=Ext.util.Format;var u seF=this.disableFormats!==true;var sep=Ext.isGecko?"+":",";var fn=function(m,nam e,format,args){if(format&&useF){args=args?","+args:"";if(format.substr(0,5)!="th is."){format="fm."+format+"("}else{format="this.call(\""+format.substr(5)+"\", " ;args=", values"}}else{args="";format="(values['"+name+"'] == undefined ? '' : " }return"'"+sep+format+"values['"+name+"']"+args+")"+sep+"'"};var body;if(Ext.isG ecko){body="this.compiled = function(values){ return '"+this.html.replace(/\\/g, "\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+"';} ;"}else{body=["this.compiled = function(values){ return ['"];body.push(this.html .replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(t his.re,fn));body.push("'].join('');};");body=body.join("")}eval(body);return thi s},call:function(C,B,A){return this[C](B,A)},insertFirst:function(B,A,C){return this.doInsert("afterBegin",B,A,C)},insertBefore:function(B,A,C){return this.doIn sert("beforeBegin",B,A,C)},insertAfter:function(B,A,C){return this.doInsert("aft erEnd",B,A,C)},append:function(B,A,C){return this.doInsert("beforeEnd",B,A,C)},d oInsert:function(C,E,B,A){E=Ext.getDom(E);var D=Ext.DomHelper.insertHtml(C,E,thi s.applyTemplate(B));return A?Ext.get(D,true):D},overwrite:function(B,A,C){B=Ext. getDom(B);B.innerHTML=this.applyTemplate(A);return C?Ext.get(B.firstChild,true): B.firstChild}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate ;Ext.DomHelper.Template=Ext.Template;Ext.Template.from=function(B,A){B=Ext.getDo m(B);return new Ext.Template(B.value||B.innerHTML,A||"")};
11 Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={};var nonSpace=/ \S/;var trimRe=/^\s+|\s+$/g;var tplRe=/\{(\d+)\}/g;var modeRe=/^(\s?[\/>+~]\s?|\ s|$)/;var tagTokenRe=/^(#)?([\w-\*]+)/;var nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/;fu nction child(p,index){var i=0;var n=p.firstChild;while(n){if(n.nodeType==1){if(+ +i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nex tSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling) &&n.nodeType!=1){}return n}function children(d){var n=d.firstChild,ni=-1;while(n ){var nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeCh ild(n)}else{n.nodeIndex=++ni}n=nx}return this}function byClassName(c,a,v){if(!v) {return c}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" " ).indexOf(v)!=-1){r[++ri]=ci}}return r}function attrValue(n,attr){if(!n.tagName& &typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAt tribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs ;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!=" undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTa gName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"| |mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni .children||ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.n odeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=t agName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeT ype!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++r i]=n}}}else{if(mode=="~"){for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&(n .nodeType!=1||(tagName=="*"||n.tagName.toLowerCase()!=tagName))){}if(n){result[+ +ri]=n}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}fo r(var i=0,l=b.length;i<l;i++){a[a.length]=b[i]}return a}function byTag(cs,tagNam e){if(cs.tagName||cs==document){cs=[cs]}if(!tagName){return cs}var r=[],ri=-1;ta gName=tagName.toLowerCase();for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType==1&&ci.t agName.toLowerCase()==tagName){r[++ri]=ci}}return r}function byId(cs,attr,id){if (cs.tagName||cs==document){cs=[cs]}if(!id){return cs}var r=[],ri=-1;for(var i=0, ci;ci=cs[i];i++){if(ci&&ci.id==id){r[++ri]=ci;return r}}return r}function byAttr ibute(cs,attr,value,op,custom){var r=[],ri=-1,st=custom=="{";var f=Ext.DomQuery. operators[op];for(var i=0,ci;ci=cs[i];i++){var a;if(st){a=Ext.DomQuery.getStyle( ci,attr)}else{if(attr=="class"||attr=="className"){a=ci.className}else{if(attr== "for"){a=ci.htmlFor}else{if(attr=="href"){a=ci.getAttribute("href",2)}else{a=ci. getAttribute(attr)}}}}if((f&&f(a,value))||(!f&&a)){r[++ri]=ci}}return r}function byPseudo(cs,name,value){return Ext.DomQuery.pseudos[name](cs,value)}var isIE=wi ndow.ActiveXObject?true:false;eval("var batch = 30803;");var key=30803;function nodupIEXml(cs){var d=++key;cs[0].setAttribute("_nodup",d);var r=[cs[0]];for(var i=1,len=cs.length;i<len;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setA ttribute("_nodup",d);r[r.length]=c}}for(var i=0,len=cs.length;i<len;i++){cs[i].r emoveAttribute("_nodup")}return r}function nodup(cs){if(!cs){return[]}var len=cs .length,c,i,r=cs,cj,ri=-1;if(!len||typeof cs.nodeType!="undefined"||len==1){retu rn cs}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs) }var d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d}else {r=[];for(var j=0;j<i;j++){r[++ri]=cs[j]}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d ){cj._nodup=d;r[++ri]=cj}}return r}}return r}function quickDiffIEXml(c1,c2){var d=++key;for(var i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d)}var r=[];for(var i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[ r.length]=c2[i]}}for(var i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qd iff")}return r}function quickDiff(c1,c2){var len1=c1.length;if(!len1){return c2} if(isIE&&c1[0].selectSingleNode){return quickDiffIEXml(c1,c2)}var d=++key;for(va r i=0;i<len1;i++){c1[i]._qdiff=d}var r=[];for(var i=0,len=c2.length;i<len;i++){i f(c2[i]._qdiff!=d){r[r.length]=c2[i]}}return r}function quickId(ns,mode,root,id) {if(ns==root){var d=root.ownerDocument||root;return d.getElementById(id)}ns=getN odes(ns,mode,"*");return byId(ns,null,id)}return{getStyle:function(el,name){retu rn Ext.fly(el).getStyle(name)},compile:function(path,type){type=type||"select";v ar fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n "];var q=path,mode,lq;var tk=Ext.DomQuery.matchers;var tklen=tk.length;var mm;va r lmode=q.match(modeRe);if(lmode&&lmode[1]){fn[fn.length]="mode=\""+lmode[1].rep lace(trimRe,"")+"\";";q=q.replace(lmode[1],"")}while(path.substr(0,1)=="/"){path =path.substr(1)}while(q&&lq!=q){lq=q;var tm=q.match(tagTokenRe);if(type=="select "){if(tm){if(tm[1]=="#"){fn[fn.length]="n = quickId(n, mode, root, \""+tm[2]+"\" );"}else{fn[fn.length]="n = getNodes(n, mode, \""+tm[2]+"\");"}q=q.replace(tm[0] ,"")}else{if(q.substr(0,1)!="@"){fn[fn.length]="n = getNodes(n, mode, \"*\");"}} }else{if(tm){if(tm[1]=="#"){fn[fn.length]="n = byId(n, null, \""+tm[2]+"\");"}el se{fn[fn.length]="n = byTag(n, \""+tm[2]+"\");"}q=q.replace(tm[0],"")}}while(!(m m=q.match(modeRe))){var matched=false;for(var j=0;j<tklen;j++){var t=tk[j];var m =q.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m [i]});q=q.replace(m[0],"");matched=true;break}}if(!matched){throw"Error parsing selector, parsing failed at \""+q+"\""}}if(mm[1]){fn[fn.length]="mode=\""+mm[1]. replace(trimRe,"")+"\";";q=q.replace(mm[1],"")}}fn[fn.length]="return nodup(n);\ n}";eval(fn.join(""));return f},select:function(path,root,type){if(!root||root== document){root=document}if(typeof root=="string"){root=document.getElementById(r oot)}var paths=path.split(",");var results=[];for(var i=0,len=paths.length;i<len ;i++){var p=paths[i].replace(trimRe,"");if(!cache[p]){cache[p]=Ext.DomQuery.comp ile(p);if(!cache[p]){throw p+" is not a valid selector"}}var result=cache[p](roo t);if(result&&result!=document){results=results.concat(result)}}if(paths.length> 1){return nodup(results)}return results},selectNode:function(path,root){return E xt.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){p ath=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery. compile(path,"select")}var n=valueCache[path](root);n=n[0]?n[0]:n;var v=(n&&n.fi rstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?d efaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery .selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss) {if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray( el);var result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.le ngth==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.rep lace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"si mple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):r esult},matchers:[{re:/^\.([\w-]+)/,select:"n = byClassName(n, null, \" {1} \");" },{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:"n = byPseudo(n, \"{1}\", \"{2}\");"},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\ }])/,select:"n = byAttribute(n, \"{2}\", \"{4}\", \"{3}\", \"{1}\");"},{re:/^#([ \w-]+)/,select:"n = byId(n, null, \"{1}\");"},{re:/^@([\w-]+)/,select:"return {f irstChild:{nodeValue:attrValue(n, \"{1}\")}};"}],operators:{"=":function(a,v){re turn a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr (0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"* =":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0} ,"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":functi on(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":fu nction(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibl ing)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!= 1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1;var m= nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a);var f= (m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn. _batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1 ){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n} }else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){va r r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}re turn r},"empty":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=c i.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeTy pe==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},"contains":function(c, v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText|| "").indexOf(v)!=-1){r[++ri]=ci}}return r},"nodeValue":function(c,v){var r=[],ri= -1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[+ +ri]=ci}}return r},"checked":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i ++){if(ci.checked==true){r[++ri]=ci}}return r},"not":function(c,ss){return Ext.D omQuery.filter(c,ss,true)},"any":function(c,selectors){var ss=selectors.split("| ");var r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext. DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},"odd":function(c){return this["n th-child"](c,"odd")},"even":function(c){return this["nth-child"](c,"even")},"nth ":function(c,a){return c[a-1]||[]},"first":function(c){return c[0]||[]},"last":f unction(c){return c[c.length-1]||[]},"has":function(c,ss){var s=Ext.DomQuery.sel ect;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci} }return r},"next":function(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i =0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},"prev":f unction(c,ss){var is=Ext.DomQuery.is;var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){ var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery .select;
12 Ext.util.Observable=function(){if(this.listeners){this.on(this.listeners);delete this.listeners}};Ext.util.Observable.prototype={fireEvent:function(){if(this.ev entsSuspended!==true){var A=this.events[arguments[0].toLowerCase()];if(typeof A= ="object"){return A.fire.apply(A,Array.prototype.slice.call(arguments,1))}}retur n true},filterOptRe:/^(?:scope|delay|buffer|single)$/,addListener:function(A,C,B ,F){if(typeof A=="object"){F=A;for(var E in F){if(this.filterOptRe.test(E)){cont inue}if(typeof F[E]=="function"){this.addListener(E,F[E],F.scope,F)}else{this.ad dListener(E,F[E].fn,F[E].scope,F[E])}}return }F=(!F||typeof F=="boolean")?{}:F;A =A.toLowerCase();var D=this.events[A]||true;if(typeof D=="boolean"){D=new Ext.ut il.Event(this,A);this.events[A]=D}D.addListener(C,B,F)},removeListener:function( A,C,B){var D=this.events[A.toLowerCase()];if(typeof D=="object"){D.removeListene r(C,B)}},purgeListeners:function(){for(var A in this.events){if(typeof this.even ts[A]=="object"){this.events[A].clearListeners()}}},relayEvents:function(F,D){va r E=function(G){return function(){return this.fireEvent.apply(this,Ext.combine(G ,Array.prototype.slice.call(arguments,0)))}};for(var C=0,A=D.length;C<A;C++){var B=D[C];if(!this.events[B]){this.events[B]=true}F.on(B,E(B),this)}},addEvents:fu nction(D){if(!this.events){this.events={}}if(typeof D=="string"){for(var C=0,A=a rguments,B;B=A[C];C++){if(!this.events[A[C]]){this.events[A[C]]=true}}}else{Ext. applyIf(this.events,D)}},hasListener:function(A){var B=this.events[A];return typ eof B=="object"&&B.listeners.length>0},suspendEvents:function(){this.eventsSuspe nded=true},resumeEvents:function(){this.eventsSuspended=false},getMethodEvent:fu nction(G){if(!this.methodEvents){this.methodEvents={}}var F=this.methodEvents[G] ;if(!F){F={};this.methodEvents[G]=F;F.originalFn=this[G];F.methodName=G;F.before =[];F.after=[];var C,B,D;var E=this;var A=function(J,I,H){if((B=J.apply(I||E,H)) !==undefined){if(typeof B==="object"){if(B.returnValue!==undefined){C=B.returnVa lue}else{C=B}if(B.cancel===true){D=true}}else{if(B===false){D=true}else{C=B}}}}; this[G]=function(){C=B=undefined;D=false;var I=Array.prototype.slice.call(argume nts,0);for(var J=0,H=F.before.length;J<H;J++){A(F.before[J].fn,F.before[J].scope ,I);if(D){return C}}if((B=F.originalFn.apply(E,I))!==undefined){C=B}for(var J=0, H=F.after.length;J<H;J++){A(F.after[J].fn,F.after[J].scope,I);if(D){return C}}re turn C}}return F},beforeMethod:function(D,B,A){var C=this.getMethodEvent(D);C.be fore.push({fn:B,scope:A})},afterMethod:function(D,B,A){var C=this.getMethodEvent (D);C.after.push({fn:B,scope:A})},removeMethodListener:function(F,D,C){var E=thi s.getMethodEvent(F);for(var B=0,A=E.before.length;B<A;B++){if(E.before[B].fn==D& &E.before[B].scope==C){E.before.splice(B,1);return }}for(var B=0,A=E.after.lengt h;B<A;B++){if(E.after[B].fn==D&&E.after[B].scope==C){E.after.splice(B,1);return }}}};Ext.util.Observable.prototype.on=Ext.util.Observable.prototype.addListener; Ext.util.Observable.prototype.un=Ext.util.Observable.prototype.removeListener;Ex t.util.Observable.capture=function(C,B,A){C.fireEvent=C.fireEvent.createIntercep tor(B,A)};Ext.util.Observable.releaseCapture=function(A){A.fireEvent=Ext.util.Ob servable.prototype.fireEvent};(function(){var B=function(F,G,E){var D=new Ext.ut il.DelayedTask();return function(){D.delay(G.buffer,F,E,Array.prototype.slice.ca ll(arguments,0))}};var C=function(F,G,E,D){return function(){G.removeListener(E, D);return F.apply(D,arguments)}};var A=function(E,F,D){return function(){var G=A rray.prototype.slice.call(arguments,0);setTimeout(function(){E.apply(D,G)},F.del ay||10)}};Ext.util.Event=function(E,D){this.name=D;this.obj=E;this.listeners=[]} ;Ext.util.Event.prototype={addListener:function(G,F,E){F=F||this.obj;if(!this.is Listening(G,F)){var D=this.createListener(G,F,E);if(!this.firing){this.listeners .push(D)}else{this.listeners=this.listeners.slice(0);this.listeners.push(D)}}},c reateListener:function(G,F,H){H=H||{};F=F||this.obj;var D={fn:G,scope:F,options: H};var E=G;if(H.delay){E=A(E,H,F)}if(H.single){E=C(E,this,G,F)}if(H.buffer){E=B( E,H,F)}D.fireFn=E;return D},findListener:function(I,H){H=H||this.obj;var F=this. listeners;for(var G=0,D=F.length;G<D;G++){var E=F[G];if(E.fn==I&&E.scope==H){ret urn G}}return -1},isListening:function(E,D){return this.findListener(E,D)!=-1},r emoveListener:function(F,E){var D;if((D=this.findListener(F,E))!=-1){if(!this.fi ring){this.listeners.splice(D,1)}else{this.listeners=this.listeners.slice(0);thi s.listeners.splice(D,1)}return true}return false},clearListeners:function(){this .listeners=[]},fire:function(){var F=this.listeners,I,D=F.length;if(D>0){this.fi ring=true;var G=Array.prototype.slice.call(arguments,0);for(var H=0;H<D;H++){var E=F[H];if(E.fireFn.apply(E.scope||this.obj||window,arguments)===false){this.fir ing=false;return false}}this.firing=false}return true}}})();
13 Ext.EventManager=function(){var X,Q,M=false;var N,W,H,S;var P=Ext.lib.Event;var R=Ext.lib.Dom;var A="Ex"+"t";var J={};var O=function(b,E,a,Z,Y){var d=Ext.id(b); if(!J[d]){J[d]={}}var c=J[d];if(!c[E]){c[E]=[]}var D=c[E];D.push({id:d,ename:E,f n:a,wrap:Z,scope:Y});P.on(b,E,Z);if(E=="mousewheel"&&b.addEventListener){b.addEv entListener("DOMMouseScroll",Z,false);P.on(window,"unload",function(){b.removeEv entListener("DOMMouseScroll",Z,false)})}if(E=="mousedown"&&b==document){Ext.Even tManager.stoppedMouseDownEvent.addListener(Z)}};var I=function(Y,a,e,g){Y=Ext.ge tDom(Y);var D=Ext.id(Y),f=J[D],E;if(f){var c=f[a],Z;if(c){for(var b=0,d=c.length ;b<d;b++){Z=c[b];if(Z.fn==e&&(!g||Z.scope==g)){E=Z.wrap;P.un(Y,a,E);c.splice(b,1 );break}}}}if(a=="mousewheel"&&Y.addEventListener&&E){Y.removeEventListener("DOM MouseScroll",E,false)}if(a=="mousedown"&&Y==document&&E){Ext.EventManager.stoppe dMouseDownEvent.removeListener(E)}};var F=function(a){a=Ext.getDom(a);var c=Ext. id(a),b=J[c],E;if(b){for(var Z in b){if(b.hasOwnProperty(Z)){E=b[Z];for(var Y=0, D=E.length;Y<D;Y++){P.un(a,Z,E[Y].wrap);E[Y]=null}}b[Z]=null}delete J[c]}};var C =function(){if(!M){M=Ext.isReady=true;if(Ext.isGecko||Ext.isOpera){document.remo veEventListener("DOMContentLoaded",C,false)}}if(Q){clearInterval(Q);Q=null}if(X) {X.fire();X.clearListeners()}};var B=function(){X=new Ext.util.Event();if(Ext.is Ready){return }P.on(window,"load",C);if(Ext.isGecko||Ext.isOpera){document.addEv entListener("DOMContentLoaded",C,false)}else{if(Ext.isIE){Q=setInterval(function (){try{Ext.isReady||(document.documentElement.doScroll("left"))}catch(D){return }C()},5);document.onreadystatechange=function(){if(document.readyState=="complet e"){document.onreadystatechange=null;C()}}}else{if(Ext.isSafari){Q=setInterval(f unction(){var D=document.readyState;if(D=="complete"){C()}},10)}}}};var V=functi on(E,Y){var D=new Ext.util.DelayedTask(E);return function(Z){Z=new Ext.EventObje ctImpl(Z);D.delay(Y.buffer,E,null,[Z])}};var T=function(a,Z,D,Y,E){return functi on(b){Ext.EventManager.removeListener(Z,D,Y,E);a(b)}};var G=function(D,E){return function(Y){Y=new Ext.EventObjectImpl(Y);setTimeout(function(){D(Y)},E.delay||1 0)}};var L=function(Y,E,D,c,b){var d=(!D||typeof D=="boolean")?{}:D;c=c||d.fn;b= b||d.scope;var a=Ext.getDom(Y);if(!a){throw"Error listening for \""+E+"\". Eleme nt \""+Y+"\" doesn't exist."}var Z=function(g){if(!window[A]){return }g=Ext.Even tObject.setEvent(g);var f;if(d.delegate){f=g.getTarget(d.delegate,a);if(!f){retu rn }}else{f=g.target}if(d.stopEvent===true){g.stopEvent()}if(d.preventDefault=== true){g.preventDefault()}if(d.stopPropagation===true){g.stopPropagation()}if(d.n ormalized===false){g=g.browserEvent}c.call(b||a,g,f,d)};if(d.delay){Z=G(Z,d)}if( d.single){Z=T(Z,a,E,c,b)}if(d.buffer){Z=V(Z,d)}O(a,E,c,Z,b);return Z};var K=/^(? :scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|a rgs|delegate)$/;var U={addListener:function(Y,D,a,Z,E){if(typeof D=="object"){va r c=D;for(var b in c){if(K.test(b)){continue}if(typeof c[b]=="function"){L(Y,b,c ,c[b],c.scope)}else{L(Y,b,c[b])}}return }return L(Y,D,E,a,Z)},removeListener:fun ction(E,D,Z,Y){return I(E,D,Z,Y)},removeAll:function(D){return F(D)},onDocumentR eady:function(Y,E,D){if(!X){B()}if(M||Ext.isReady){D||(D={});Y.defer(D.delay||0, E)}else{X.addListener(Y,E,D)}},onWindowResize:function(Y,E,D){if(!N){N=new Ext.u til.Event();W=new Ext.util.DelayedTask(function(){N.fire(R.getViewWidth(),R.getV iewHeight())});P.on(window,"resize",this.fireWindowResize,this)}N.addListener(Y, E,D)},fireWindowResize:function(){if(N){if((Ext.isIE||Ext.isAir)&&W){W.delay(50) }else{N.fire(R.getViewWidth(),R.getViewHeight())}}},onTextResize:function(Z,Y,D) {if(!H){H=new Ext.util.Event();var E=new Ext.Element(document.createElement("div "));E.dom.className="x-text-resize";E.dom.innerHTML="X";E.appendTo(document.body );S=E.dom.offsetHeight;setInterval(function(){if(E.dom.offsetHeight!=S){H.fire(S ,S=E.dom.offsetHeight)}},this.textResizeInterval)}H.addListener(Z,Y,D)},removeRe sizeListener:function(E,D){if(N){N.removeListener(E,D)}},fireResize:function(){i f(N){N.fire(R.getViewWidth(),R.getViewHeight())}},ieDeferSrc:false,textResizeInt erval:50};U.on=U.addListener;U.un=U.removeListener;U.stoppedMouseDownEvent=new E xt.util.Event();return U}();Ext.onReady=Ext.EventManager.onDocumentReady;(functi on(){var A=function(){var C=document.body||document.getElementsByTagName("body") [0];if(!C){return false}var B=[" ",Ext.isIE?"ext-ie "+(Ext.isIE6?"ext-ie6":"ext- ie7"):Ext.isGecko?"ext-gecko "+(Ext.isGecko2?"ext-gecko2":"ext-gecko3"):Ext.isOp era?"ext-opera":Ext.isSafari?"ext-safari":""];if(Ext.isMac){B.push("ext-mac")}if (Ext.isLinux){B.push("ext-linux")}if(Ext.isBorderBox){B.push("ext-border-box")}i f(Ext.isStrict){var D=C.parentNode;if(D){D.className+=" ext-strict"}}C.className +=B.join(" ");return true};if(!A()){Ext.onReady(A)}})();Ext.EventObject=function (){var B=Ext.lib.Event;var A={3:13,63234:37,63235:39,63232:38,63233:40,63276:33, 63277:34,63272:46,63273:36,63275:35};var C=Ext.isIE?{1:0,4:1,2:2}:(Ext.isSafari? {1:0,2:1,3:2}:{0:0,1:1,2:2});Ext.EventObjectImpl=function(D){if(D){this.setEvent (D.browserEvent||D)}};Ext.EventObjectImpl.prototype={browserEvent:null,button:-1 ,shiftKey:false,ctrlKey:false,altKey:false,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER :13,RETURN:13,SHIFT:16,CTRL:17,CONTROL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SP ACE:32,PAGE_UP:33,PAGEUP:33,PAGE_DOWN:34,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:3 8,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THR EE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69, F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85, V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_T HREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NI NE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:1 11,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:12 2,F12:123,setEvent:function(D){if(D==this||(D&&D.browserEvent)){return D}this.br owserEvent=D;if(D){this.button=D.button?C[D.button]:(D.which?D.which-1:-1);if(D. type=="click"&&this.button==-1){this.button=0}this.type=D.type;this.shiftKey=D.s hiftKey;this.ctrlKey=D.ctrlKey||D.metaKey;this.altKey=D.altKey;this.keyCode=D.ke yCode;this.charCode=D.charCode;this.target=B.getTarget(D);this.xy=B.getXY(D)}els e{this.button=-1;this.shiftKey=false;this.ctrlKey=false;this.altKey=false;this.k eyCode=0;this.charCode=0;this.target=null;this.xy=[0,0]}return this},stopEvent:f unction(){if(this.browserEvent){if(this.browserEvent.type=="mousedown"){Ext.Even tManager.stoppedMouseDownEvent.fire(this)}B.stopEvent(this.browserEvent)}},preve ntDefault:function(){if(this.browserEvent){B.preventDefault(this.browserEvent)}} ,isNavKeyPress:function(){var D=this.keyCode;D=Ext.isSafari?(A[D]||D):D;return(D >=33&&D<=40)||D==this.RETURN||D==this.TAB||D==this.ESC},isSpecialKey:function(){ var D=this.keyCode;return(this.type=="keypress"&&this.ctrlKey)||D==9||D==13||D== 40||D==27||(D==16)||(D==17)||(D>=18&&D<=20)||(D>=33&&D<=35)||(D>=36&&D<=39)||(D> =44&&D<=45)},stopPropagation:function(){if(this.browserEvent){if(this.browserEve nt.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}B.stopPr opagation(this.browserEvent)}},getCharCode:function(){return this.charCode||this .keyCode},getKey:function(){var D=this.keyCode||this.charCode;return Ext.isSafar i?(A[D]||D):D},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getTime:function(){if(this.browserEvent){return B.getTime(this.brow serEvent)}return null},getXY:function(){return this.xy},getTarget:function(E,F,D ){return E?Ext.fly(this.target).findParent(E,F,D):(D?Ext.get(this.target):this.t arget)},getRelatedTarget:function(){if(this.browserEvent){return B.getRelatedTar get(this.browserEvent)}return null},getWheelDelta:function(){var D=this.browserE vent;var E=0;if(D.wheelDelta){E=D.wheelDelta/120}else{if(D.detail){E=-D.detail/3 }}return E},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shif tKey)?true:false},within:function(E,F){var D=this[F?"getRelatedTarget":"getTarge t"]();return D&&Ext.fly(E).contains(D)},getPoint:function(){return new Ext.lib.P oint(this.xy[0],this.xy[1])}};return new Ext.EventObjectImpl()}();
14 (function(){var D=Ext.lib.Dom;var E=Ext.lib.Event;var A=Ext.lib.Anim;var propCac he={};var camelRe=/(-[a-z])/gi;var camelFn=function(m,a){return a.charAt(1).toUp perCase()};var view=document.defaultView;Ext.Element=function(element,forceNew){ var dom=typeof element=="string"?document.getElementById(element):element;if(!do m){return null}var id=dom.id;if(forceNew!==true&&id&&Ext.Element.cache[id]){retu rn Ext.Element.cache[id]}this.dom=dom;this.id=id||Ext.id(dom)};var El=Ext.Elemen t;El.prototype={originalDisplay:"",visibilityMode:1,defaultUnit:"px",setVisibili tyMode:function(visMode){this.visibilityMode=visMode;return this},enableDisplayM ode:function(display){this.setVisibilityMode(El.DISPLAY);if(typeof display!="und efined"){this.originalDisplay=display}return this},findParent:function(simpleSel ector,maxDepth,returnEl){var p=this.dom,b=document.body,depth=0,dq=Ext.DomQuery, stopEl;maxDepth=maxDepth||50;if(typeof maxDepth!="number"){stopEl=Ext.getDom(max Depth);maxDepth=10}while(p&&p.nodeType==1&&depth<maxDepth&&p!=b&&p!=stopEl){if(d q.is(p,simpleSelector)){return returnEl?Ext.get(p):p}depth++;p=p.parentNode}retu rn null},findParentNode:function(simpleSelector,maxDepth,returnEl){var p=Ext.fly (this.dom.parentNode,"_internal");return p?p.findParent(simpleSelector,maxDepth, returnEl):null},up:function(simpleSelector,maxDepth){return this.findParentNode( simpleSelector,maxDepth,true)},is:function(simpleSelector){return Ext.DomQuery.i s(this.dom,simpleSelector)},animate:function(args,duration,onComplete,easing,ani mType){this.anim(args,{duration:duration,callback:onComplete,easing:easing},anim Type);return this},anim:function(args,opt,animType,defaultDur,defaultEase,cb){an imType=animType||"run";opt=opt||{};var anim=Ext.lib.Anim[animType](this.dom,args ,(opt.duration||defaultDur)||0.35,(opt.easing||defaultEase)||"easeOut",function( ){Ext.callback(cb,this);Ext.callback(opt.callback,opt.scope||this,[this,opt])},t his);opt.anim=anim;return anim},preanim:function(a,i){return !a[i]?false:(typeof a[i]=="object"?a[i]:{duration:a[i+1],callback:a[i+2],easing:a[i+3]})},clean:fun ction(forceReclean){if(this.isCleaned&&forceReclean!==true){return this}var ns=/ \S/;var d=this.dom,n=d.firstChild,ni=-1;while(n){var nx=n.nextSibling;if(n.nodeT ype==3&&!ns.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}this. isCleaned=true;return this},scrollIntoView:function(container,hscroll){var c=Ext .getDom(container)||Ext.getBody().dom;var el=this.dom;var o=this.getOffsetsTo(c) ,l=o[0]+c.scrollLeft,t=o[1]+c.scrollTop,b=t+el.offsetHeight,r=l+el.offsetWidth;v ar ch=c.clientHeight;var ct=parseInt(c.scrollTop,10);var cl=parseInt(c.scrollLef t,10);var cb=ct+ch;var cr=cl+c.clientWidth;if(el.offsetHeight>ch||t<ct){c.scroll Top=t}else{if(b>cb){c.scrollTop=b-ch}}c.scrollTop=c.scrollTop;if(hscroll!==false ){if(el.offsetWidth>c.clientWidth||l<cl){c.scrollLeft=l}else{if(r>cr){c.scrollLe ft=r-c.clientWidth}}c.scrollLeft=c.scrollLeft}return this},scrollChildIntoView:f unction(child,hscroll){Ext.fly(child,"_scrollChildIntoView").scrollIntoView(this ,hscroll)},autoHeight:function(animate,duration,onComplete,easing){var oldHeight =this.getHeight();this.clip();this.setHeight(1);setTimeout(function(){var height =parseInt(this.dom.scrollHeight,10);if(!animate){this.setHeight(height);this.unc lip();if(typeof onComplete=="function"){onComplete()}}else{this.setHeight(oldHei ght);this.setHeight(height,animate,duration,function(){this.unclip();if(typeof o nComplete=="function"){onComplete()}}.createDelegate(this),easing)}}.createDeleg ate(this),0);return this},contains:function(el){if(!el){return false}return D.is Ancestor(this.dom,el.dom?el.dom:el)},isVisible:function(deep){var vis=!(this.get Style("visibility")=="hidden"||this.getStyle("display")=="none");if(deep!==true| |!vis){return vis}var p=this.dom.parentNode;while(p&&p.tagName.toLowerCase()!="b ody"){if(!Ext.fly(p,"_isVisible").isVisible()){return false}p=p.parentNode}retur n true},select:function(selector,unique){return El.select(selector,unique,this.d om)},query:function(selector){return Ext.DomQuery.select(selector,this.dom)},chi ld:function(selector,returnDom){var n=Ext.DomQuery.selectNode(selector,this.dom) ;return returnDom?n:Ext.get(n)},down:function(selector,returnDom){var n=Ext.DomQ uery.selectNode(" > "+selector,this.dom);return returnDom?n:Ext.get(n)},initDD:f unction(group,config,overrides){var dd=new Ext.dd.DD(Ext.id(this.dom),group,conf ig);return Ext.apply(dd,overrides)},initDDProxy:function(group,config,overrides) {var dd=new Ext.dd.DDProxy(Ext.id(this.dom),group,config);return Ext.apply(dd,ov errides)},initDDTarget:function(group,config,overrides){var dd=new Ext.dd.DDTarg et(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides)},setVisible:fun ction(visible,animate){if(!animate||!A){if(this.visibilityMode==El.DISPLAY){this .setDisplayed(visible)}else{this.fixDisplay();this.dom.style.visibility=visible? "visible":"hidden"}}else{var dom=this.dom;var visMode=this.visibilityMode;if(vis ible){this.setOpacity(0.01);this.setVisible(true)}this.anim({opacity:{to:(visibl e?1:0)}},this.preanim(arguments,1),null,0.35,"easeIn",function(){if(!visible){if (visMode==El.DISPLAY){dom.style.display="none"}else{dom.style.visibility="hidden "}Ext.get(dom).setOpacity(1)}})}return this},isDisplayed:function(){return this. getStyle("display")!="none"},toggle:function(animate){this.setVisible(!this.isVi sible(),this.preanim(arguments,0));return this},setDisplayed:function(value){if( typeof value=="boolean"){value=value?this.originalDisplay:"none"}this.setStyle(" display",value);return this},focus:function(){try{this.dom.focus()}catch(e){}ret urn this},blur:function(){try{this.dom.blur()}catch(e){}return this},addClass:fu nction(className){if(Ext.isArray(className)){for(var i=0,len=className.length;i< len;i++){this.addClass(className[i])}}else{if(className&&!this.hasClass(classNam e)){this.dom.className=this.dom.className+" "+className}}return this},radioClass :function(className){var siblings=this.dom.parentNode.childNodes;for(var i=0;i<s iblings.length;i++){var s=siblings[i];if(s.nodeType==1){Ext.get(s).removeClass(c lassName)}}this.addClass(className);return this},removeClass:function(className) {if(!className||!this.dom.className){return this}if(Ext.isArray(className)){for( var i=0,len=className.length;i<len;i++){this.removeClass(className[i])}}else{if( this.hasClass(className)){var re=this.classReCache[className];if(!re){re=new Reg Exp("(?:^|\\s+)"+className+"(?:\\s+|$)","g");this.classReCache[className]=re}thi s.dom.className=this.dom.className.replace(re," ")}}return this},classReCache:{} ,toggleClass:function(className){if(this.hasClass(className)){this.removeClass(c lassName)}else{this.addClass(className)}return this},hasClass:function(className ){return className&&(" "+this.dom.className+" ").indexOf(" "+className+" ")!=-1} ,replaceClass:function(oldClassName,newClassName){this.removeClass(oldClassName) ;this.addClass(newClassName);return this},getStyles:function(){var a=arguments,l en=a.length,r={};for(var i=0;i<len;i++){r[a[i]]=this.getStyle(a[i])}return r},ge tStyle:function(){return view&&view.getComputedStyle?function(prop){var el=this. dom,v,cs,camel;if(prop=="float"){prop="cssFloat"}if(v=el.style[prop]){return v}i f(cs=view.getComputedStyle(el,"")){if(!(camel=propCache[prop])){camel=propCache[ prop]=prop.replace(camelRe,camelFn)}return cs[camel]}return null}:function(prop) {var el=this.dom,v,cs,camel;if(prop=="opacity"){if(typeof el.style.filter=="stri ng"){var m=el.style.filter.match(/alpha\(opacity=(.*)\)/i);if(m){var fv=parseFlo at(m[1]);if(!isNaN(fv)){return fv?fv/100:0}}}return 1}else{if(prop=="float"){pro p="styleFloat"}}if(!(camel=propCache[prop])){camel=propCache[prop]=prop.replace( camelRe,camelFn)}if(v=el.style[camel]){return v}if(cs=el.currentStyle){return cs [camel]}return null}}(),setStyle:function(prop,value){if(typeof prop=="string"){ var camel;if(!(camel=propCache[prop])){camel=propCache[prop]=prop.replace(camelR e,camelFn)}if(camel=="opacity"){this.setOpacity(value)}else{this.dom.style[camel ]=value}}else{for(var style in prop){if(typeof prop[style]!="function"){this.set Style(style,prop[style])}}}return this},applyStyles:function(style){Ext.DomHelpe r.applyStyles(this.dom,style);return this},getX:function(){return D.getX(this.do m)},getY:function(){return D.getY(this.dom)},getXY:function(){return D.getXY(thi s.dom)},getOffsetsTo:function(el){var o=this.getXY();var e=Ext.fly(el,"_internal ").getXY();return[o[0]-e[0],o[1]-e[1]]},setX:function(x,animate){if(!animate||!A ){D.setX(this.dom,x)}else{this.setXY([x,this.getY()],this.preanim(arguments,1))} return this},setY:function(y,animate){if(!animate||!A){D.setY(this.dom,y)}else{t his.setXY([this.getX(),y],this.preanim(arguments,1))}return this},setLeft:functi on(left){this.setStyle("left",this.addUnits(left));return this},setTop:function( top){this.setStyle("top",this.addUnits(top));return this},setRight:function(righ t){this.setStyle("right",this.addUnits(right));return this},setBottom:function(b ottom){this.setStyle("bottom",this.addUnits(bottom));return this},setXY:function (pos,animate){if(!animate||!A){D.setXY(this.dom,pos)}else{this.anim({points:{to: pos}},this.preanim(arguments,1),"motion")}return this},setLocation:function(x,y, animate){this.setXY([x,y],this.preanim(arguments,2));return this},moveTo:functio n(x,y,animate){this.setXY([x,y],this.preanim(arguments,2));return this},getRegio n:function(){return D.getRegion(this.dom)},getHeight:function(contentHeight){var h=this.dom.offsetHeight||0;h=contentHeight!==true?h:h-this.getBorderWidth("tb") -this.getPadding("tb");return h<0?0:h},getWidth:function(contentWidth){var w=thi s.dom.offsetWidth||0;w=contentWidth!==true?w:w-this.getBorderWidth("lr")-this.ge tPadding("lr");return w<0?0:w},getComputedHeight:function(){var h=Math.max(this. dom.offsetHeight,this.dom.clientHeight);if(!h){h=parseInt(this.getStyle("height" ),10)||0;if(!this.isBorderBox()){h+=this.getFrameWidth("tb")}}return h},getCompu tedWidth:function(){var w=Math.max(this.dom.offsetWidth,this.dom.clientWidth);if (!w){w=parseInt(this.getStyle("width"),10)||0;if(!this.isBorderBox()){w+=this.ge tFrameWidth("lr")}}return w},getSize:function(contentSize){return{width:this.get Width(contentSize),height:this.getHeight(contentSize)}},getStyleSize:function(){ var w,h,d=this.dom,s=d.style;if(s.width&&s.width!="auto"){w=parseInt(s.width,10) ;if(Ext.isBorderBox){w-=this.getFrameWidth("lr")}}if(s.height&&s.height!="auto") {h=parseInt(s.height,10);if(Ext.isBorderBox){h-=this.getFrameWidth("tb")}}return {width:w||this.getWidth(true),height:h||this.getHeight(true)}},getViewSize:funct ion(){var d=this.dom,doc=document,aw=0,ah=0;if(d==doc||d==doc.body){return{width :D.getViewWidth(),height:D.getViewHeight()}}else{return{width:d.clientWidth,heig ht:d.clientHeight}}},getValue:function(asNumber){return asNumber?parseInt(this.d om.value,10):this.dom.value},adjustWidth:function(width){if(typeof width=="numbe r"){if(this.autoBoxAdjust&&!this.isBorderBox()){width-=(this.getBorderWidth("lr" )+this.getPadding("lr"))}if(width<0){width=0}}return width},adjustHeight:functio n(height){if(typeof height=="number"){if(this.autoBoxAdjust&&!this.isBorderBox() ){height-=(this.getBorderWidth("tb")+this.getPadding("tb"))}if(height<0){height= 0}}return height},setWidth:function(width,animate){width=this.adjustWidth(width) ;if(!animate||!A){this.dom.style.width=this.addUnits(width)}else{this.anim({widt h:{to:width}},this.preanim(arguments,1))}return this},setHeight:function(height, animate){height=this.adjustHeight(height);if(!animate||!A){this.dom.style.height =this.addUnits(height)}else{this.anim({height:{to:height}},this.preanim(argument s,1))}return this},setSize:function(width,height,animate){if(typeof width=="obje ct"){height=width.height;width=width.width}width=this.adjustWidth(width);height= this.adjustHeight(height);if(!animate||!A){this.dom.style.width=this.addUnits(wi dth);this.dom.style.height=this.addUnits(height)}else{this.anim({width:{to:width },height:{to:height}},this.preanim(arguments,2))}return this},setBounds:function (x,y,width,height,animate){if(!animate||!A){this.setSize(width,height);this.setL ocation(x,y)}else{width=this.adjustWidth(width);height=this.adjustHeight(height) ;this.anim({points:{to:[x,y]},width:{to:width},height:{to:height}},this.preanim( arguments,4),"motion")}return this},setRegion:function(region,animate){this.setB ounds(region.left,region.top,region.right-region.left,region.bottom-region.top,t his.preanim(arguments,1));return this},addListener:function(eventName,fn,scope,o ptions){Ext.EventManager.on(this.dom,eventName,fn,scope||this,options)},removeLi stener:function(eventName,fn,scope){Ext.EventManager.removeListener(this.dom,eve ntName,fn,scope||this);return this},removeAllListeners:function(){Ext.EventManag er.removeAll(this.dom);return this},relayEvent:function(eventName,observable){th is.on(eventName,function(e){observable.fireEvent(eventName,e)})},setOpacity:func tion(opacity,animate){if(!animate||!A){var s=this.dom.style;if(Ext.isIE){s.zoom= 1;s.filter=(s.filter||"").replace(/alpha\([^\)]*\)/gi,"")+(opacity==1?"":" alpha (opacity="+opacity*100+")")}else{s.opacity=opacity}}else{this.anim({opacity:{to: opacity}},this.preanim(arguments,1),null,0.35,"easeIn")}return this},getLeft:fun ction(local){if(!local){return this.getX()}else{return parseInt(this.getStyle("l eft"),10)||0}},getRight:function(local){if(!local){return this.getX()+this.getWi dth()}else{return(this.getLeft(true)+this.getWidth())||0}},getTop:function(local ){if(!local){return this.getY()}else{return parseInt(this.getStyle("top"),10)||0 }},getBottom:function(local){if(!local){return this.getY()+this.getHeight()}else {return(this.getTop(true)+this.getHeight())||0}},position:function(pos,zIndex,x, y){if(!pos){if(this.getStyle("position")=="static"){this.setStyle("position","re lative")}}else{this.setStyle("position",pos)}if(zIndex){this.setStyle("z-index", zIndex)}if(x!==undefined&&y!==undefined){this.setXY([x,y])}else{if(x!==undefined ){this.setX(x)}else{if(y!==undefined){this.setY(y)}}}},clearPositioning:function (value){value=value||"";this.setStyle({"left":value,"right":value,"top":value,"b ottom":value,"z-index":"","position":"static"});return this},getPositioning:func tion(){var l=this.getStyle("left");var t=this.getStyle("top");return{"position": this.getStyle("position"),"left":l,"right":l?"":this.getStyle("right"),"top":t," bottom":t?"":this.getStyle("bottom"),"z-index":this.getStyle("z-index")}},getBor derWidth:function(side){return this.addStyles(side,El.borders)},getPadding:funct ion(side){return this.addStyles(side,El.paddings)},setPositioning:function(pc){t his.applyStyles(pc);if(pc.right=="auto"){this.dom.style.right=""}if(pc.bottom==" auto"){this.dom.style.bottom=""}return this},fixDisplay:function(){if(this.getSt yle("display")=="none"){this.setStyle("visibility","hidden");this.setStyle("disp lay",this.originalDisplay);if(this.getStyle("display")=="none"){this.setStyle("d isplay","block")}}},setOverflow:function(v){if(v=="auto"&&Ext.isMac&&Ext.isGecko 2){this.dom.style.overflow="hidden";(function(){this.dom.style.overflow="auto"}) .defer(1,this)}else{this.dom.style.overflow=v}},setLeftTop:function(left,top){th is.dom.style.left=this.addUnits(left);this.dom.style.top=this.addUnits(top);retu rn this},move:function(direction,distance,animate){var xy=this.getXY();direction =direction.toLowerCase();switch(direction){case"l":case"left":this.moveTo(xy[0]- distance,xy[1],this.preanim(arguments,2));break;case"r":case"right":this.moveTo( xy[0]+distance,xy[1],this.preanim(arguments,2));break;case"t":case"top":case"up" :this.moveTo(xy[0],xy[1]-distance,this.preanim(arguments,2));break;case"b":case" bottom":case"down":this.moveTo(xy[0],xy[1]+distance,this.preanim(arguments,2));b reak}return this},clip:function(){if(!this.isClipped){this.isClipped=true;this.o riginalClip={"o":this.getStyle("overflow"),"x":this.getStyle("overflow-x"),"y":t his.getStyle("overflow-y")};this.setStyle("overflow","hidden");this.setStyle("ov erflow-x","hidden");this.setStyle("overflow-y","hidden")}return this},unclip:fun ction(){if(this.isClipped){this.isClipped=false;var o=this.originalClip;if(o.o){ this.setStyle("overflow",o.o)}if(o.x){this.setStyle("overflow-x",o.x)}if(o.y){th is.setStyle("overflow-y",o.y)}}return this},getAnchorXY:function(anchor,local,s) {var w,h,vp=false;if(!s){var d=this.dom;if(d==document.body||d==document){vp=tru e;w=D.getViewWidth();h=D.getViewHeight()}else{w=this.getWidth();h=this.getHeight ()}}else{w=s.width;h=s.height}var x=0,y=0,r=Math.round;switch((anchor||"tl").toL owerCase()){case"c":x=r(w*0.5);y=r(h*0.5);break;case"t":x=r(w*0.5);y=0;break;cas e"l":x=0;y=r(h*0.5);break;case"r":x=w;y=r(h*0.5);break;case"b":x=r(w*0.5);y=h;br eak;case"tl":x=0;y=0;break;case"bl":x=0;y=h;break;case"br":x=w;y=h;break;case"tr ":x=w;y=0;break}if(local===true){return[x,y]}if(vp){var sc=this.getScroll();retu rn[x+sc.left,y+sc.top]}var o=this.getXY();return[x+o[0],y+o[1]]},getAlignToXY:fu nction(el,p,o){el=Ext.get(el);if(!el||!el.dom){throw"Element.alignToXY with an e lement that doesn't exist"}var d=this.dom;var c=false;var p1="",p2="";o=o||[0,0] ;if(!p){p="tl-bl"}else{if(p=="?"){p="tl-bl?"}else{if(p.indexOf("-")==-1){p="tl-" +p}}}p=p.toLowerCase();var m=p.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!m){throw"El ement.alignTo with an invalid alignment "+p}p1=m[1];p2=m[2];c=!!m[3];var a1=this .getAnchorXY(p1,true);var a2=el.getAnchorXY(p2,false);var x=a2[0]-a1[0]+o[0];var y=a2[1]-a1[1]+o[1];if(c){var w=this.getWidth(),h=this.getHeight(),r=el.getRegio n();var dw=D.getViewWidth()-5,dh=D.getViewHeight()-5;var p1y=p1.charAt(0),p1x=p1 .charAt(p1.length-1);var p2y=p2.charAt(0),p2x=p2.charAt(p2.length-1);var swapY=( (p1y=="t"&&p2y=="b")||(p1y=="b"&&p2y=="t"));var swapX=((p1x=="r"&&p2x=="l")||(p1 x=="l"&&p2x=="r"));var doc=document;var scrollX=(doc.documentElement.scrollLeft| |doc.body.scrollLeft||0)+5;var scrollY=(doc.documentElement.scrollTop||doc.body. scrollTop||0)+5;if((x+w)>dw+scrollX){x=swapX?r.left-w:dw+scrollX-w}if(x<scrollX) {x=swapX?r.right:scrollX}if((y+h)>dh+scrollY){y=swapY?r.top-h:dh+scrollY-h}if(y< scrollY){y=swapY?r.bottom:scrollY}}return[x,y]},getConstrainToXY:function(){var os={top:0,left:0,bottom:0,right:0};return function(el,local,offsets,proposedXY){ el=Ext.get(el);offsets=offsets?Ext.applyIf(offsets,os):os;var vw,vh,vx=0,vy=0;if (el.dom==document.body||el.dom==document){vw=Ext.lib.Dom.getViewWidth();vh=Ext.l ib.Dom.getViewHeight()}else{vw=el.dom.clientWidth;vh=el.dom.clientHeight;if(!loc al){var vxy=el.getXY();vx=vxy[0];vy=vxy[1]}}var s=el.getScroll();vx+=offsets.lef t+s.left;vy+=offsets.top+s.top;vw-=offsets.right;vh-=offsets.bottom;var vr=vx+vw ;var vb=vy+vh;var xy=proposedXY||(!local?this.getXY():[this.getLeft(true),this.g etTop(true)]);var x=xy[0],y=xy[1];var w=this.dom.offsetWidth,h=this.dom.offsetHe ight;var moved=false;if((x+w)>vr){x=vr-w;moved=true}if((y+h)>vb){y=vb-h;moved=tr ue}if(x<vx){x=vx;moved=true}if(y<vy){y=vy;moved=true}return moved?[x,y]:false}}( ),adjustForConstraints:function(xy,parent,offsets){return this.getConstrainToXY( parent||document,false,offsets,xy)||xy},alignTo:function(element,position,offset s,animate){var xy=this.getAlignToXY(element,position,offsets);this.setXY(xy,this .preanim(arguments,3));return this},anchorTo:function(el,alignment,offsets,anima te,monitorScroll,callback){var action=function(){this.alignTo(el,alignment,offse ts,animate);Ext.callback(callback,this)};Ext.EventManager.onWindowResize(action, this);var tm=typeof monitorScroll;if(tm!="undefined"){Ext.EventManager.on(window ,"scroll",action,this,{buffer:tm=="number"?monitorScroll:50})}action.call(this); return this},clearOpacity:function(){if(window.ActiveXObject){if(typeof this.dom .style.filter=="string"&&(/alpha/i).test(this.dom.style.filter)){this.dom.style. filter=""}}else{this.dom.style.opacity="";this.dom.style["-moz-opacity"]="";this .dom.style["-khtml-opacity"]=""}return this},hide:function(animate){this.setVisi ble(false,this.preanim(arguments,0));return this},show:function(animate){this.se tVisible(true,this.preanim(arguments,0));return this},addUnits:function(size){re turn Ext.Element.addUnits(size,this.defaultUnit)},update:function(html,loadScrip ts,callback){if(typeof html=="undefined"){html=""}if(loadScripts!==true){this.do m.innerHTML=html;if(typeof callback=="function"){callback()}return this}var id=E xt.id();var dom=this.dom;html+="<span id=\""+id+"\"></span>";E.onAvailable(id,fu nction(){var hd=document.getElementsByTagName("head")[0];var re=/(?:<script([^>] *)?>)((\n|\r|.)*?)(?:<\/script>)/ig;var srcRe=/\ssrc=([\'\"])(.*?)\1/i;var typeR e=/\stype=([\'\"])(.*?)\1/i;var match;while(match=re.exec(html)){var attrs=match [1];var srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){var s= document.createElement("script");s.src=srcMatch[2];var typeMatch=attrs.match(typ eRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(m atch[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}el se{window.eval(match[2])}}}}var el=document.getElementById(id);if(el){Ext.remove Node(el)}if(typeof callback=="function"){callback()}});dom.innerHTML=html.replac e(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},load:function( ){var um=this.getUpdater();um.update.apply(um,arguments);return this},getUpdater :function(){if(!this.updateManager){this.updateManager=new Ext.Updater(this)}ret urn this.updateManager},unselectable:function(){this.dom.unselectable="on";this. swallowEvent("selectstart",true);this.applyStyles("-moz-user-select:none;-khtml- user-select:none;");this.addClass("x-unselectable");return this},getCenterXY:fun ction(){return this.getAlignToXY(document,"c-c")},center:function(centerIn){this .alignTo(centerIn||document,"c-c");return this},isBorderBox:function(){return no BoxAdjust[this.dom.tagName.toLowerCase()]||Ext.isBorderBox},getBox:function(cont entBox,local){var xy;if(!local){xy=this.getXY()}else{var left=parseInt(this.getS tyle("left"),10)||0;var top=parseInt(this.getStyle("top"),10)||0;xy=[left,top]}v ar el=this.dom,w=el.offsetWidth,h=el.offsetHeight,bx;if(!contentBox){bx={x:xy[0] ,y:xy[1],0:xy[0],1:xy[1],width:w,height:h}}else{var l=this.getBorderWidth("l")+t his.getPadding("l");var r=this.getBorderWidth("r")+this.getPadding("r");var t=th is.getBorderWidth("t")+this.getPadding("t");var b=this.getBorderWidth("b")+this. getPadding("b");bx={x:xy[0]+l,y:xy[1]+t,0:xy[0]+l,1:xy[1]+t,width:w-(l+r),height :h-(t+b)}}bx.right=bx.x+bx.width;bx.bottom=bx.y+bx.height;return bx},getFrameWid th:function(sides,onlyContentBox){return onlyContentBox&&Ext.isBorderBox?0:(this .getPadding(sides)+this.getBorderWidth(sides))},setBox:function(box,adjust,anima te){var w=box.width,h=box.height;if((adjust&&!this.autoBoxAdjust)&&!this.isBorde rBox()){w-=(this.getBorderWidth("lr")+this.getPadding("lr"));h-=(this.getBorderW idth("tb")+this.getPadding("tb"))}this.setBounds(box.x,box.y,w,h,this.preanim(ar guments,2));return this},repaint:function(){var dom=this.dom;this.addClass("x-re paint");setTimeout(function(){Ext.get(dom).removeClass("x-repaint")},1);return t his},getMargins:function(side){if(!side){return{top:parseInt(this.getStyle("marg in-top"),10)||0,left:parseInt(this.getStyle("margin-left"),10)||0,bottom:parseIn t(this.getStyle("margin-bottom"),10)||0,right:parseInt(this.getStyle("margin-rig ht"),10)||0}}else{return this.addStyles(side,El.margins)}},addStyles:function(si des,styles){var val=0,v,w;for(var i=0,len=sides.length;i<len;i++){v=this.getStyl e(styles[sides.charAt(i)]);if(v){w=parseInt(v,10);if(w){val+=(w>=0?w:-1*w)}}}ret urn val},createProxy:function(config,renderTo,matchBox){config=typeof config=="o bject"?config:{tag:"div",cls:config};var proxy;if(renderTo){proxy=Ext.DomHelper. append(renderTo,config,true)}else{proxy=Ext.DomHelper.insertBefore(this.dom,conf ig,true)}if(matchBox){proxy.setBox(this.getBox())}return proxy},mask:function(ms g,msgCls){if(this.getStyle("position")=="static"){this.setStyle("position","rela tive")}if(this._maskMsg){this._maskMsg.remove()}if(this._mask){this._mask.remove ()}this._mask=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask"},true);this.addCl ass("x-masked");this._mask.setDisplayed(true);if(typeof msg=="string"){this._mas kMsg=Ext.DomHelper.append(this.dom,{cls:"ext-el-mask-msg",cn:{tag:"div"}},true); var mm=this._maskMsg;mm.dom.className=msgCls?"ext-el-mask-msg "+msgCls:"ext-el-m ask-msg";mm.dom.firstChild.innerHTML=msg;mm.setDisplayed(true);mm.center(this)}i f(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&this.getStyle("height")=="auto"){this._m ask.setSize(this.dom.clientWidth,this.getHeight())}return this._mask},unmask:fun ction(){if(this._mask){if(this._maskMsg){this._maskMsg.remove();delete this._mas kMsg}this._mask.remove();delete this._mask}this.removeClass("x-masked")},isMaske d:function(){return this._mask&&this._mask.isVisible()},createShim:function(){va r el=document.createElement("iframe");el.frameBorder="0";el.className="ext-shim" ;if(Ext.isIE&&Ext.isSecure){el.src=Ext.SSL_SECURE_URL}var shim=Ext.get(this.dom. parentNode.insertBefore(el,this.dom));shim.autoBoxAdjust=false;return shim},remo ve:function(){Ext.removeNode(this.dom);delete El.cache[this.dom.id]},hover:funct ion(overFn,outFn,scope){var preOverFn=function(e){if(!e.within(this,true)){overF n.apply(scope||this,arguments)}};var preOutFn=function(e){if(!e.within(this,true )){outFn.apply(scope||this,arguments)}};this.on("mouseover",preOverFn,this.dom); this.on("mouseout",preOutFn,this.dom);return this},addClassOnOver:function(class Name){this.hover(function(){Ext.fly(this,"_internal").addClass(className)},funct ion(){Ext.fly(this,"_internal").removeClass(className)});return this},addClassOn Focus:function(className){this.on("focus",function(){Ext.fly(this,"_internal").a ddClass(className)},this.dom);this.on("blur",function(){Ext.fly(this,"_internal" ).removeClass(className)},this.dom);return this},addClassOnClick:function(classN ame){var dom=this.dom;this.on("mousedown",function(){Ext.fly(dom,"_internal").ad dClass(className);var d=Ext.getDoc();var fn=function(){Ext.fly(dom,"_internal"). removeClass(className);d.removeListener("mouseup",fn)};d.on("mouseup",fn)});retu rn this},swallowEvent:function(eventName,preventDefault){var fn=function(e){e.st opPropagation();if(preventDefault){e.preventDefault()}};if(Ext.isArray(eventName )){for(var i=0,len=eventName.length;i<len;i++){this.on(eventName[i],fn)}return t his}this.on(eventName,fn);return this},parent:function(selector,returnDom){retur n this.matchNode("parentNode","parentNode",selector,returnDom)},next:function(se lector,returnDom){return this.matchNode("nextSibling","nextSibling",selector,ret urnDom)},prev:function(selector,returnDom){return this.matchNode("previousSiblin g","previousSibling",selector,returnDom)},first:function(selector,returnDom){ret urn this.matchNode("nextSibling","firstChild",selector,returnDom)},last:function (selector,returnDom){return this.matchNode("previousSibling","lastChild",selecto r,returnDom)},matchNode:function(dir,start,selector,returnDom){var n=this.dom[st art];while(n){if(n.nodeType==1&&(!selector||Ext.DomQuery.is(n,selector))){return !returnDom?Ext.get(n):n}n=n[dir]}return null},appendChild:function(el){el=Ext.g et(el);el.appendTo(this);return this},createChild:function(config,insertBefore,r eturnDom){config=config||{tag:"div"};if(insertBefore){return Ext.DomHelper.inser tBefore(insertBefore,config,returnDom!==true)}return Ext.DomHelper[!this.dom.fir stChild?"overwrite":"append"](this.dom,config,returnDom!==true)},appendTo:functi on(el){el=Ext.getDom(el);el.appendChild(this.dom);return this},insertBefore:func tion(el){el=Ext.getDom(el);el.parentNode.insertBefore(this.dom,el);return this}, insertAfter:function(el){el=Ext.getDom(el);el.parentNode.insertBefore(this.dom,e l.nextSibling);return this},insertFirst:function(el,returnDom){el=el||{};if(type of el=="object"&&!el.nodeType&&!el.dom){return this.createChild(el,this.dom.firs tChild,returnDom)}else{el=Ext.getDom(el);this.dom.insertBefore(el,this.dom.first Child);return !returnDom?Ext.get(el):el}},insertSibling:function(el,where,return Dom){var rt;if(Ext.isArray(el)){for(var i=0,len=el.length;i<len;i++){rt=this.ins ertSibling(el[i],where,returnDom)}return rt}where=where?where.toLowerCase():"bef ore";el=el||{};var refNode=where=="before"?this.dom:this.dom.nextSibling;if(type of el=="object"&&!el.nodeType&&!el.dom){if(where=="after"&&!this.dom.nextSibling ){rt=Ext.DomHelper.append(this.dom.parentNode,el,!returnDom)}else{rt=Ext.DomHelp er[where=="after"?"insertAfter":"insertBefore"](this.dom,el,!returnDom)}}else{rt =this.dom.parentNode.insertBefore(Ext.getDom(el),refNode);if(!returnDom){rt=Ext. get(rt)}}return rt},wrap:function(config,returnDom){if(!config){config={tag:"div "}}var newEl=Ext.DomHelper.insertBefore(this.dom,config,!returnDom);newEl.dom?ne wEl.dom.appendChild(this.dom):newEl.appendChild(this.dom);return newEl},replace: function(el){el=Ext.get(el);this.insertBefore(el);el.remove();return this},repla ceWith:function(el){if(typeof el=="object"&&!el.nodeType&&!el.dom){el=this.inser tSibling(el,"before")}else{el=Ext.getDom(el);this.dom.parentNode.insertBefore(el ,this.dom)}El.uncache(this.id);this.dom.parentNode.removeChild(this.dom);this.do m=el;this.id=Ext.id(el);El.cache[this.id]=this;return this},insertHtml:function( where,html,returnEl){var el=Ext.DomHelper.insertHtml(where,this.dom,html);return returnEl?Ext.get(el):el},set:function(o,useSet){var el=this.dom;useSet=typeof u seSet=="undefined"?(el.setAttribute?true:false):useSet;for(var attr in o){if(att r=="style"||typeof o[attr]=="function"){continue}if(attr=="cls"){el.className=o[ "cls"]}else{if(o.hasOwnProperty(attr)){if(useSet){el.setAttribute(attr,o[attr])} else{el[attr]=o[attr]}}}}if(o.style){Ext.DomHelper.applyStyles(el,o.style)}retur n this},addKeyListener:function(key,fn,scope){var config;if(typeof key!="object" ||Ext.isArray(key)){config={key:key,fn:fn,scope:scope}}else{config={key:key.key, shift:key.shift,ctrl:key.ctrl,alt:key.alt,fn:fn,scope:scope}}return new Ext.KeyM ap(this,config)},addKeyMap:function(config){return new Ext.KeyMap(this,config)}, isScrollable:function(){var dom=this.dom;return dom.scrollHeight>dom.clientHeigh t||dom.scrollWidth>dom.clientWidth},scrollTo:function(side,value,animate){var pr op=side.toLowerCase()=="left"?"scrollLeft":"scrollTop";if(!animate||!A){this.dom [prop]=value}else{var to=prop=="scrollLeft"?[value,this.dom.scrollTop]:[this.dom .scrollLeft,value];this.anim({scroll:{"to":to}},this.preanim(arguments,2),"scrol l")}return this},scroll:function(direction,distance,animate){if(!this.isScrollab le()){return }var el=this.dom;var l=el.scrollLeft,t=el.scrollTop;var w=el.scroll Width,h=el.scrollHeight;var cw=el.clientWidth,ch=el.clientHeight;direction=direc tion.toLowerCase();var scrolled=false;var a=this.preanim(arguments,2);switch(dir ection){case"l":case"left":if(w-l>cw){var v=Math.min(l+distance,w-cw);this.scrol lTo("left",v,a);scrolled=true}break;case"r":case"right":if(l>0){var v=Math.max(l -distance,0);this.scrollTo("left",v,a);scrolled=true}break;case"t":case"top":cas e"up":if(t>0){var v=Math.max(t-distance,0);this.scrollTo("top",v,a);scrolled=tru e}break;case"b":case"bottom":case"down":if(h-t>ch){var v=Math.min(t+distance,h-c h);this.scrollTo("top",v,a);scrolled=true}break}return scrolled},translatePoints :function(x,y){if(typeof x=="object"||Ext.isArray(x)){y=x[1];x=x[0]}var p=this.g etStyle("position");var o=this.getXY();var l=parseInt(this.getStyle("left"),10); var t=parseInt(this.getStyle("top"),10);if(isNaN(l)){l=(p=="relative")?0:this.do m.offsetLeft}if(isNaN(t)){t=(p=="relative")?0:this.dom.offsetTop}return{left:(x- o[0]+l),top:(y-o[1]+t)}},getScroll:function(){var d=this.dom,doc=document;if(d== doc||d==doc.body){var l,t;if(Ext.isIE&&Ext.isStrict){l=doc.documentElement.scrol lLeft||(doc.body.scrollLeft||0);t=doc.documentElement.scrollTop||(doc.body.scrol lTop||0)}else{l=window.pageXOffset||(doc.body.scrollLeft||0);t=window.pageYOffse t||(doc.body.scrollTop||0)}return{left:l,top:t}}else{return{left:d.scrollLeft,to p:d.scrollTop}}},getColor:function(attr,defaultValue,prefix){var v=this.getStyle (attr);if(!v||v=="transparent"||v=="inherit"){return defaultValue}var color=type of prefix=="undefined"?"#":prefix;if(v.substr(0,4)=="rgb("){var rvs=v.slice(4,v. length-1).split(",");for(var i=0;i<3;i++){var h=parseInt(rvs[i]);var s=h.toStrin g(16);if(h<16){s="0"+s}color+=s}}else{if(v.substr(0,1)=="#"){if(v.length==4){for (var i=1;i<4;i++){var c=v.charAt(i);color+=c+c}}else{if(v.length==7){color+=v.su bstr(1)}}}}return(color.length>5?color.toLowerCase():defaultValue)},boxWrap:func tion(cls){cls=cls||"x-box";var el=Ext.get(this.insertHtml("beforeBegin",String.f ormat("<div class=\"{0}\">"+El.boxMarkup+"</div>",cls)));el.child("."+cls+"-mc") .dom.appendChild(this.dom);return el},getAttributeNS:Ext.isIE?function(ns,name){ var d=this.dom;var type=typeof d[ns+":"+name];if(type!="undefined"&&type!="unkno wn"){return d[ns+":"+name]}return d[name]}:function(ns,name){var d=this.dom;retu rn d.getAttributeNS(ns,name)||d.getAttribute(ns+":"+name)||d.getAttribute(name)| |d[name]},getTextWidth:function(text,min,max){return(Ext.util.TextMetrics.measur e(this.dom,Ext.value(text,this.dom.innerHTML,true)).width).constrain(min||0,max| |1000000)}};var ep=El.prototype;ep.on=ep.addListener;ep.mon=ep.addListener;ep.ge tUpdateManager=ep.getUpdater;ep.un=ep.removeListener;ep.autoBoxAdjust=true;El.un itPattern=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i;El.addUnits=function(v,defaultUn it){if(v===""||v=="auto"){return v}if(v===undefined){return""}if(typeof v=="numb er"||!El.unitPattern.test(v)){return v+(defaultUnit||"px")}return v};El.boxMarku p="<div class=\"{0}-tl\"><div class=\"{0}-tr\"><div class=\"{0}-tc\"></div></div ></div><div class=\"{0}-ml\"><div class=\"{0}-mr\"><div class=\"{0}-mc\"></div>< /div></div><div class=\"{0}-bl\"><div class=\"{0}-br\"><div class=\"{0}-bc\"></d iv></div></div>";El.VISIBILITY=1;El.DISPLAY=2;El.borders={l:"border-left-width", r:"border-right-width",t:"border-top-width",b:"border-bottom-width"};El.paddings ={l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"};El.marg ins={l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"};El.cache ={};var docEl;El.get=function(el){var ex,elm,id;if(!el){return null}if(typeof el =="string"){if(!(elm=document.getElementById(el))){return null}if(ex=El.cache[el ]){ex.dom=elm}else{ex=El.cache[el]=new El(elm)}return ex}else{if(el.tagName){if( !(id=el.id)){id=Ext.id(el)}if(ex=El.cache[id]){ex.dom=el}else{ex=El.cache[id]=ne w El(el)}return ex}else{if(el instanceof El){if(el!=docEl){el.dom=document.getEl ementById(el.id)||el.dom;El.cache[el.id]=el}return el}else{if(el.isComposite){re turn el}else{if(Ext.isArray(el)){return El.select(el)}else{if(el==document){if(! docEl){var f=function(){};f.prototype=El.prototype;docEl=new f();docEl.dom=docum ent}return docEl}}}}}}return null};El.uncache=function(el){for(var i=0,a=argumen ts,len=a.length;i<len;i++){if(a[i]){delete El.cache[a[i].id||a[i]]}}};El.garbage Collect=function(){if(!Ext.enableGarbageCollector){clearInterval(El.collectorThr ead);return }for(var eid in El.cache){var el=El.cache[eid],d=el.dom;if(!d||!d.pa rentNode||(!d.offsetParent&&!document.getElementById(eid))){delete El.cache[eid] ;if(d&&Ext.enableListenerCollection){Ext.EventManager.removeAll(d)}}}};El.collec torThreadId=setInterval(El.garbageCollect,30000);var flyFn=function(){};flyFn.pr ototype=El.prototype;var _cls=new flyFn();El.Flyweight=function(dom){this.dom=do m};El.Flyweight.prototype=_cls;El.Flyweight.prototype.isFlyweight=true;El._flywe ights={};El.fly=function(el,named){named=named||"_global";el=Ext.getDom(el);if(! el){return null}if(!El._flyweights[named]){El._flyweights[named]=new El.Flyweigh t()}El._flyweights[named].dom=el;return El._flyweights[named]};Ext.get=El.get;Ex t.fly=El.fly;var noBoxAdjust=Ext.isStrict?{select:1}:{input:1,select:1,textarea: 1};if(Ext.isIE||Ext.isGecko){noBoxAdjust["button"]=1}Ext.EventManager.on(window, "unload",function(){delete El.cache;delete El._flyweights})})();
15 Ext.enableFx=true;Ext.Fx={slideIn:function(A,C){var B=this.getFxEl();C=C||{};B.q ueueFx(C,function(){A=A||"t";this.fixDisplay();var D=this.getFxRestore();var I=t his.getBox();this.setSize(I);var F=this.fxWrap(D.pos,C,"hidden");var K=this.dom. style;K.visibility="visible";K.position="absolute";var E=function(){B.fxUnwrap(F ,D.pos,C);K.width=D.width;K.height=D.height;B.afterFx(C)};var J,L={to:[I.x,I.y]} ,H={to:I.width},G={to:I.height};switch(A.toLowerCase()){case"t":F.setSize(I.widt h,0);K.left=K.bottom="0";J={height:G};break;case"l":F.setSize(0,I.height);K.righ t=K.top="0";J={width:H};break;case"r":F.setSize(0,I.height);F.setX(I.right);K.le ft=K.top="0";J={width:H,points:L};break;case"b":F.setSize(I.width,0);F.setY(I.bo ttom);K.left=K.top="0";J={height:G,points:L};break;case"tl":F.setSize(0,0);K.rig ht=K.bottom="0";J={width:H,height:G};break;case"bl":F.setSize(0,0);F.setY(I.y+I. height);K.right=K.top="0";J={width:H,height:G,points:L};break;case"br":F.setSize (0,0);F.setXY([I.right,I.bottom]);K.left=K.top="0";J={width:H,height:G,points:L} ;break;case"tr":F.setSize(0,0);F.setX(I.x+I.width);K.left=K.bottom="0";J={width: H,height:G,points:L};break}this.dom.style.visibility="visible";F.show();argument s.callee.anim=F.fxanim(J,C,"motion",0.5,"easeOut",E)});return this},slideOut:fun ction(A,C){var B=this.getFxEl();C=C||{};B.queueFx(C,function(){A=A||"t";var I=th is.getFxRestore();var D=this.getBox();this.setSize(D);var G=this.fxWrap(I.pos,C, "visible");var F=this.dom.style;F.visibility="visible";F.position="absolute";G.s etSize(D);var J=function(){if(C.useDisplay){B.setDisplayed(false)}else{B.hide()} B.fxUnwrap(G,I.pos,C);F.width=I.width;F.height=I.height;B.afterFx(C)};var E,H={t o:0};switch(A.toLowerCase()){case"t":F.left=F.bottom="0";E={height:H};break;case "l":F.right=F.top="0";E={width:H};break;case"r":F.left=F.top="0";E={width:H,poin ts:{to:[D.right,D.y]}};break;case"b":F.left=F.top="0";E={height:H,points:{to:[D. x,D.bottom]}};break;case"tl":F.right=F.bottom="0";E={width:H,height:H};break;cas e"bl":F.right=F.top="0";E={width:H,height:H,points:{to:[D.x,D.bottom]}};break;ca se"br":F.left=F.top="0";E={width:H,height:H,points:{to:[D.x+D.width,D.bottom]}}; break;case"tr":F.left=F.bottom="0";E={width:H,height:H,points:{to:[D.right,D.y]} };break}arguments.callee.anim=G.fxanim(E,C,"motion",0.5,"easeOut",J)});return th is},puff:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){this.cl earOpacity();this.show();var F=this.getFxRestore();var D=this.dom.style;var G=fu nction(){if(B.useDisplay){A.setDisplayed(false)}else{A.hide()}A.clearOpacity();A .setPositioning(F.pos);D.width=F.width;D.height=F.height;D.fontSize="";A.afterFx (B)};var E=this.getWidth();var C=this.getHeight();arguments.callee.anim=this.fxa nim({width:{to:this.adjustWidth(E*2)},height:{to:this.adjustHeight(C*2)},points: {by:[-(E*0.5),-(C*0.5)]},opacity:{to:0},fontSize:{to:200,unit:"%"}},B,"motion",0 .5,"easeOut",G)});return this},switchOff:function(B){var A=this.getFxEl();B=B||{ };A.queueFx(B,function(){this.clearOpacity();this.clip();var D=this.getFxRestore ();var C=this.dom.style;var E=function(){if(B.useDisplay){A.setDisplayed(false)} else{A.hide()}A.clearOpacity();A.setPositioning(D.pos);C.width=D.width;C.height= D.height;A.afterFx(B)};this.fxanim({opacity:{to:0.3}},null,null,0.1,null,functio n(){this.clearOpacity();(function(){this.fxanim({height:{to:1},points:{by:[0,thi s.getHeight()*0.5]}},B,"motion",0.3,"easeIn",E)}).defer(100,this)})});return thi s},highlight:function(A,C){var B=this.getFxEl();C=C||{};B.queueFx(C,function(){A =A||"ffff9c";var D=C.attr||"backgroundColor";this.clearOpacity();this.show();var G=this.getColor(D);var H=this.dom.style[D];var F=(C.endColor||G)||"ffffff";var I=function(){B.dom.style[D]=H;B.afterFx(C)};var E={};E[D]={from:A,to:F};argument s.callee.anim=this.fxanim(E,C,"color",1,"easeIn",I)});return this},frame:functio n(A,C,D){var B=this.getFxEl();D=D||{};B.queueFx(D,function(){A=A||"#C3DAF9";if(A .length==6){A="#"+A}C=C||1;var G=D.duration||1;this.show();var E=this.getBox();v ar F=function(){var H=Ext.getBody().createChild({style:{visbility:"hidden",posit ion:"absolute","z-index":"35000",border:"0px solid "+A}});var I=Ext.isBorderBox? 2:1;H.animate({top:{from:E.y,to:E.y-20},left:{from:E.x,to:E.x-20},borderWidth:{f rom:0,to:10},opacity:{from:1,to:0},height:{from:E.height,to:(E.height+(20*I))},w idth:{from:E.width,to:(E.width+(20*I))}},G,function(){H.remove();if(--C>0){F()}e lse{B.afterFx(D)}})};F.call(this)});return this},pause:function(C){var A=this.ge tFxEl();var B={};A.queueFx(B,function(){setTimeout(function(){A.afterFx(B)},C*10 00)});return this},fadeIn:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,f unction(){this.setOpacity(0);this.fixDisplay();this.dom.style.visibility="visibl e";var C=B.endOpacity||1;arguments.callee.anim=this.fxanim({opacity:{to:C}},B,nu ll,0.5,"easeOut",function(){if(C==1){this.clearOpacity()}A.afterFx(B)})});return this},fadeOut:function(B){var A=this.getFxEl();B=B||{};A.queueFx(B,function(){a rguments.callee.anim=this.fxanim({opacity:{to:B.endOpacity||0}},B,null,0.5,"ease Out",function(){if(this.visibilityMode==Ext.Element.DISPLAY||B.useDisplay){this. dom.style.display="none"}else{this.dom.style.visibility="hidden"}this.clearOpaci ty();A.afterFx(B)})});return this},scale:function(A,B,C){this.shift(Ext.apply({} ,C,{width:A,height:B}));return this},shift:function(B){var A=this.getFxEl();B=B| |{};A.queueFx(B,function(){var E={},D=B.width,F=B.height,C=B.x,H=B.y,G=B.opacity ;if(D!==undefined){E.width={to:this.adjustWidth(D)}}if(F!==undefined){E.height={ to:this.adjustHeight(F)}}if(B.left!==undefined){E.left={to:B.left}}if(B.top!==un defined){E.top={to:B.top}}if(B.right!==undefined){E.right={to:B.right}}if(B.bott om!==undefined){E.bottom={to:B.bottom}}if(C!==undefined||H!==undefined){E.points ={to:[C!==undefined?C:this.getX(),H!==undefined?H:this.getY()]}}if(G!==undefined ){E.opacity={to:G}}if(B.xy!==undefined){E.points={to:B.xy}}arguments.callee.anim =this.fxanim(E,B,"motion",0.35,"easeOut",function(){A.afterFx(B)})});return this },ghost:function(A,C){var B=this.getFxEl();C=C||{};B.queueFx(C,function(){A=A||" b";var H=this.getFxRestore();var E=this.getWidth(),G=this.getHeight();var F=this .dom.style;var J=function(){if(C.useDisplay){B.setDisplayed(false)}else{B.hide() }B.clearOpacity();B.setPositioning(H.pos);F.width=H.width;F.height=H.height;B.af terFx(C)};var D={opacity:{to:0},points:{}},I=D.points;switch(A.toLowerCase()){ca se"t":I.by=[0,-G];break;case"l":I.by=[-E,0];break;case"r":I.by=[E,0];break;case" b":I.by=[0,G];break;case"tl":I.by=[-E,-G];break;case"bl":I.by=[-E,G];break;case" br":I.by=[E,G];break;case"tr":I.by=[E,-G];break}arguments.callee.anim=this.fxani m(D,C,"motion",0.5,"easeOut",J)});return this},syncFx:function(){this.fxDefaults =Ext.apply(this.fxDefaults||{},{block:false,concurrent:true,stopFx:false});retur n this},sequenceFx:function(){this.fxDefaults=Ext.apply(this.fxDefaults||{},{blo ck:false,concurrent:false,stopFx:false});return this},nextFx:function(){var A=th is.fxQueue[0];if(A){A.call(this)}},hasActiveFx:function(){return this.fxQueue&&t his.fxQueue[0]},stopFx:function(){if(this.hasActiveFx()){var A=this.fxQueue[0];i f(A&&A.anim&&A.anim.isAnimated()){this.fxQueue=[A];A.anim.stop(true)}}return thi s},beforeFx:function(A){if(this.hasActiveFx()&&!A.concurrent){if(A.stopFx){this. stopFx();return true}return false}return true},hasFxBlock:function(){var A=this. fxQueue;return A&&A[0]&&A[0].block},queueFx:function(C,A){if(!this.fxQueue){this .fxQueue=[]}if(!this.hasFxBlock()){Ext.applyIf(C,this.fxDefaults);if(!C.concurre nt){var B=this.beforeFx(C);A.block=C.block;this.fxQueue.push(A);if(B){this.nextF x()}}else{A.call(this)}}return this},fxWrap:function(F,D,C){var B;if(!D.wrap||!( B=Ext.get(D.wrap))){var A;if(D.fixPosition){A=this.getXY()}var E=document.create Element("div");E.style.visibility=C;B=Ext.get(this.dom.parentNode.insertBefore(E ,this.dom));B.setPositioning(F);if(B.getStyle("position")=="static"){B.position( "relative")}this.clearPositioning("auto");B.clip();B.dom.appendChild(this.dom);i f(A){B.setXY(A)}}return B},fxUnwrap:function(A,C,B){this.clearPositioning();this .setPositioning(C);if(!B.wrap){A.dom.parentNode.insertBefore(this.dom,A.dom);A.r emove()}},getFxRestore:function(){var A=this.dom.style;return{pos:this.getPositi oning(),width:A.width,height:A.height}},afterFx:function(A){if(A.afterStyle){thi s.applyStyles(A.afterStyle)}if(A.afterCls){this.addClass(A.afterCls)}if(A.remove ===true){this.remove()}Ext.callback(A.callback,A.scope,[this]);if(!A.concurrent) {this.fxQueue.shift();this.nextFx()}},getFxEl:function(){return Ext.get(this.dom )},fxanim:function(D,E,B,F,C,A){B=B||"run";E=E||{};var G=Ext.lib.Anim[B](this.do m,D,(E.duration||F)||0.35,(E.easing||C)||"easeOut",function(){Ext.callback(A,thi s)},this);E.anim=G;return G}};Ext.Fx.resize=Ext.Fx.scale;Ext.apply(Ext.Element.p rototype,Ext.Fx);
16 Ext.CompositeElement=function(A){this.elements=[];this.addElements(A)};Ext.Compo siteElement.prototype={isComposite:true,addElements:function(E){if(!E){return th is}if(typeof E=="string"){E=Ext.Element.selectorFunction(E)}var D=this.elements; var B=D.length-1;for(var C=0,A=E.length;C<A;C++){D[++B]=Ext.get(E[C])}return thi s},fill:function(A){this.elements=[];this.add(A);return this},filter:function(A) {var B=[];this.each(function(C){if(C.is(A)){B[B.length]=C.dom}});this.fill(B);re turn this},invoke:function(E,B){var D=this.elements;for(var C=0,A=D.length;C<A;C ++){Ext.Element.prototype[E].apply(D[C],B)}return this},add:function(A){if(typeo f A=="string"){this.addElements(Ext.Element.selectorFunction(A))}else{if(A.lengt h!==undefined){this.addElements(A)}else{this.addElements([A])}}return this},each :function(E,D){var C=this.elements;for(var B=0,A=C.length;B<A;B++){if(E.call(D|| C[B],C[B],this,B)===false){break}}return this},item:function(A){return this.elem ents[A]||null},first:function(){return this.item(0)},last:function(){return this .item(this.elements.length-1)},getCount:function(){return this.elements.length}, contains:function(A){return this.indexOf(A)!==-1},indexOf:function(A){return thi s.elements.indexOf(Ext.get(A))},removeElement:function(D,F){if(Ext.isArray(D)){f or(var C=0,A=D.length;C<A;C++){this.removeElement(D[C])}return this}var B=typeof D=="number"?D:this.indexOf(D);if(B!==-1&&this.elements[B]){if(F){var E=this.ele ments[B];if(E.dom){E.remove()}else{Ext.removeNode(E)}}this.elements.splice(B,1)} return this},replaceElement:function(D,C,A){var B=typeof D=="number"?D:this.inde xOf(D);if(B!==-1){if(A){this.elements[B].replaceWith(C)}else{this.elements.splic e(B,1,Ext.get(C))}}return this},clear:function(){this.elements=[]}};(function(){ Ext.CompositeElement.createCall=function(B,C){if(!B[C]){B[C]=function(){return t his.invoke(C,arguments)}}};for(var A in Ext.Element.prototype){if(typeof Ext.Ele ment.prototype[A]=="function"){Ext.CompositeElement.createCall(Ext.CompositeElem ent.prototype,A)}}})();Ext.CompositeElementLite=function(A){Ext.CompositeElement Lite.superclass.constructor.call(this,A);this.el=new Ext.Element.Flyweight()};Ex t.extend(Ext.CompositeElementLite,Ext.CompositeElement,{addElements:function(E){ if(E){if(Ext.isArray(E)){this.elements=this.elements.concat(E)}else{var D=this.e lements;var B=D.length-1;for(var C=0,A=E.length;C<A;C++){D[++B]=E[C]}}}return th is},invoke:function(F,B){var D=this.elements;var E=this.el;for(var C=0,A=D.lengt h;C<A;C++){E.dom=D[C];Ext.Element.prototype[F].apply(E,B)}return this},item:func tion(A){if(!this.elements[A]){return null}this.el.dom=this.elements[A];return th is.el},addListener:function(B,G,F,E){var D=this.elements;for(var C=0,A=D.length; C<A;C++){Ext.EventManager.on(D[C],B,G,F||D[C],E)}return this},each:function(F,E) {var C=this.elements;var D=this.el;for(var B=0,A=C.length;B<A;B++){D.dom=C[B];if (F.call(E||D,D,this,B)===false){break}}return this},indexOf:function(A){return t his.elements.indexOf(Ext.getDom(A))},replaceElement:function(D,C,A){var B=typeof D=="number"?D:this.indexOf(D);if(B!==-1){C=Ext.getDom(C);if(A){var E=this.eleme nts[B];E.parentNode.insertBefore(C,E);Ext.removeNode(E)}this.elements.splice(B,1 ,C)}return this}});Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLit e.prototype.addListener;if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQue ry.select}Ext.Element.select=function(A,D,B){var C;if(typeof A=="string"){C=Ext. Element.selectorFunction(A,B)}else{if(A.length!==undefined){C=A}else{throw"Inval id selector"}}if(D===true){return new Ext.CompositeElement(C)}else{return new Ex t.CompositeElementLite(C)}};Ext.select=Ext.Element.select;
17 Ext.data.Connection=function(A){Ext.apply(this,A);this.addEvents("beforerequest" ,"requestcomplete","requestexception");Ext.data.Connection.superclass.constructo r.call(this)};Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000, autoAbort:false,disableCaching:true,disableCachingParam:"_dc",request:function(E ){if(this.fireEvent("beforerequest",this,E)!==false){var C=E.params;if(typeof C= ="function"){C=C.call(E.scope||window,E)}if(typeof C=="object"){C=Ext.urlEncode( C)}if(this.extraParams){var G=Ext.urlEncode(this.extraParams);C=C?(C+"&"+G):G}va r B=E.url||this.url;if(typeof B=="function"){B=B.call(E.scope||window,E)}if(E.fo rm){var D=Ext.getDom(E.form);B=B||D.action;var J=D.getAttribute("enctype");if(E. isUpload||(J&&J.toLowerCase()=="multipart/form-data")){return this.doFormUpload( E,C,B)}var I=Ext.lib.Ajax.serializeForm(D);C=C?(C+"&"+I):I}var K=E.headers;if(th is.defaultHeaders){K=Ext.apply(K||{},this.defaultHeaders);if(!E.headers){E.heade rs=K}}var F={success:this.handleResponse,failure:this.handleFailure,scope:this,a rgument:{options:E},timeout:E.timeout||this.timeout};var A=E.method||this.method ||((C||E.xmlData||E.jsonData)?"POST":"GET");if(A=="GET"&&(this.disableCaching&&E .disableCaching!==false)||E.disableCaching===true){var H=E.disableCachingParam|| this.disableCachingParam;B+=(B.indexOf("?")!=-1?"&":"?")+H+"="+(new Date().getTi me())}if(typeof E.autoAbort=="boolean"){if(E.autoAbort){this.abort()}}else{if(th is.autoAbort!==false){this.abort()}}if((A=="GET"||E.xmlData||E.jsonData)&&C){B+= (B.indexOf("?")!=-1?"&":"?")+C;C=""}this.transId=Ext.lib.Ajax.request(A,B,F,C,E) ;return this.transId}else{Ext.callback(E.callback,E.scope,[E,null,null]);return null}},isLoading:function(A){if(A){return Ext.lib.Ajax.isCallInProgress(A)}else{ return this.transId?true:false}},abort:function(A){if(A||this.isLoading()){Ext.l ib.Ajax.abort(A||this.transId)}},handleResponse:function(A){this.transId=false;v ar B=A.argument.options;A.argument=B?B.argument:null;this.fireEvent("requestcomp lete",this,A,B);Ext.callback(B.success,B.scope,[A,B]);Ext.callback(B.callback,B. scope,[B,true,A])},handleFailure:function(A,C){this.transId=false;var B=A.argume nt.options;A.argument=B?B.argument:null;this.fireEvent("requestexception",this,A ,B,C);Ext.callback(B.failure,B.scope,[A,B]);Ext.callback(B.callback,B.scope,[B,f alse,A])},doFormUpload:function(E,A,B){var C=Ext.id();var F=document.createEleme nt("iframe");F.id=C;F.name=C;F.className="x-hidden";if(Ext.isIE){F.src=Ext.SSL_S ECURE_URL}document.body.appendChild(F);if(Ext.isIE){document.frames[C].name=C}va r D=Ext.getDom(E.form);D.target=C;D.method="POST";D.enctype=D.encoding="multipar t/form-data";if(B){D.action=B}var L,J;if(A){L=[];A=Ext.urlDecode(A,false);for(va r H in A){if(A.hasOwnProperty(H)){J=document.createElement("input");J.type="hidd en";J.name=H;J.value=A[H];D.appendChild(J);L.push(J)}}}function G(){var M={respo nseText:"",responseXML:null};M.argument=E?E.argument:null;try{var O;if(Ext.isIE) {O=F.contentWindow.document}else{O=(F.contentDocument||window.frames[C].document )}if(O&&O.body){M.responseText=O.body.innerHTML}if(O&&O.XMLDocument){M.responseX ML=O.XMLDocument}else{M.responseXML=O}}catch(N){}Ext.EventManager.removeListener (F,"load",G,this);this.fireEvent("requestcomplete",this,M,E);Ext.callback(E.succ ess,E.scope,[M,E]);Ext.callback(E.callback,E.scope,[E,true,M]);setTimeout(functi on(){Ext.removeNode(F)},100)}Ext.EventManager.on(F,"load",G,this);D.submit();if( L){for(var I=0,K=L.length;I<K;I++){Ext.removeNode(L[I])}}}});Ext.Ajax=new Ext.da ta.Connection({autoAbort:false,serializeForm:function(A){return Ext.lib.Ajax.ser ializeForm(A)}});
18 Ext.Updater=Ext.extend(Ext.util.Observable,{constructor:function(B,A){B=Ext.get( B);if(!A&&B.updateManager){return B.updateManager}this.el=B;this.defaultUrl=null ;this.addEvents("beforeupdate","update","failure");var C=Ext.Updater.defaults;th is.sslBlankUrl=C.sslBlankUrl;this.disableCaching=C.disableCaching;this.indicator Text=C.indicatorText;this.showLoadIndicator=C.showLoadIndicator;this.timeout=C.t imeout;this.loadScripts=C.loadScripts;this.transaction=null;this.refreshDelegate =this.refresh.createDelegate(this);this.updateDelegate=this.update.createDelegat e(this);this.formUpdateDelegate=this.formUpdate.createDelegate(this);if(!this.re nderer){this.renderer=this.getDefaultRenderer()}Ext.Updater.superclass.construct or.call(this)},getDefaultRenderer:function(){return new Ext.Updater.BasicRendere r()},getEl:function(){return this.el},update:function(B,F,G,D){if(this.fireEvent ("beforeupdate",this.el,B,F)!==false){var A,C;if(typeof B=="object"){A=B;B=A.url ;F=F||A.params;G=G||A.callback;D=D||A.discardUrl;C=A.scope;if(typeof A.nocache!= "undefined"){this.disableCaching=A.nocache}if(typeof A.text!="undefined"){this.i ndicatorText="<div class=\"loading-indicator\">"+A.text+"</div>"}if(typeof A.scr ipts!="undefined"){this.loadScripts=A.scripts}if(typeof A.timeout!="undefined"){ this.timeout=A.timeout}}this.showLoading();if(!D){this.defaultUrl=B}if(typeof B= ="function"){B=B.call(this)}var E=Ext.apply({},{url:B,params:(typeof F=="functio n"&&C)?F.createDelegate(C):F,success:this.processSuccess,failure:this.processFai lure,scope:this,callback:undefined,timeout:(this.timeout*1000),disableCaching:th is.disableCaching,argument:{"options":A,"url":B,"form":null,"callback":G,"scope" :C||window,"params":F}},A);this.transaction=Ext.Ajax.request(E)}},formUpdate:fun ction(C,A,B,D){if(this.fireEvent("beforeupdate",this.el,C,A)!==false){if(typeof A=="function"){A=A.call(this)}C=Ext.getDom(C);this.transaction=Ext.Ajax.request( {form:C,url:A,success:this.processSuccess,failure:this.processFailure,scope:this ,timeout:(this.timeout*1000),argument:{"url":A,"form":C,"callback":D,"reset":B}} );this.showLoading.defer(1,this)}},refresh:function(A){if(this.defaultUrl==null) {return }this.update(this.defaultUrl,null,A,true)},startAutoRefresh:function(B,C ,D,E,A){if(A){this.update(C||this.defaultUrl,D,E,true)}if(this.autoRefreshProcId ){clearInterval(this.autoRefreshProcId)}this.autoRefreshProcId=setInterval(this. update.createDelegate(this,[C||this.defaultUrl,D,E,true]),B*1000)},stopAutoRefre sh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);d elete this.autoRefreshProcId}},isAutoRefreshing:function(){return this.autoRefre shProcId?true:false},showLoading:function(){if(this.showLoadIndicator){this.el.u pdate(this.indicatorText)}},processSuccess:function(A){this.transaction=null;if( A.argument.form&&A.argument.reset){try{A.argument.form.reset()}catch(B){}}if(thi s.loadScripts){this.renderer.render(this.el,A,this,this.updateComplete.createDel egate(this,[A]))}else{this.renderer.render(this.el,A,this);this.updateComplete(A )}},updateComplete:function(A){this.fireEvent("update",this.el,A);if(typeof A.ar gument.callback=="function"){A.argument.callback.call(A.argument.scope,this.el,t rue,A,A.argument.options)}},processFailure:function(A){this.transaction=null;thi s.fireEvent("failure",this.el,A);if(typeof A.argument.callback=="function"){A.ar gument.callback.call(A.argument.scope,this.el,false,A,A.argument.options)}},setR enderer:function(A){this.renderer=A},getRenderer:function(){return this.renderer },setDefaultUrl:function(A){this.defaultUrl=A},abort:function(){if(this.transact ion){Ext.Ajax.abort(this.transaction)}},isUpdating:function(){if(this.transactio n){return Ext.Ajax.isLoading(this.transaction)}return false}});Ext.Updater.defau lts={timeout:30,loadScripts:false,sslBlankUrl:(Ext.SSL_SECURE_URL||"javascript:f alse"),disableCaching:false,showLoadIndicator:true,indicatorText:"<div class=\"l oading-indicator\">Loading...</div>"};Ext.Updater.updateElement=function(D,C,E,B ){var A=Ext.get(D).getUpdater();Ext.apply(A,B);A.update(C,E,B?B.callback:null)}; Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={rend er:function(C,A,B,D){C.update(A.responseText,B.loadScripts,D)}};Ext.UpdateManage r=Ext.Updater;
19 Ext.util.DelayedTask=function(E,D,A){var G=null,F,B;var C=function(){var H=new D ate().getTime();if(H-B>=F){clearInterval(G);G=null;E.apply(D,A||[])}};this.delay =function(I,K,J,H){if(G&&I!=F){this.cancel()}F=I;B=new Date().getTime();E=K||E;D =J||D;A=H||A;if(!G){G=setInterval(C,F)}};this.cancel=function(){if(G){clearInter val(G);G=null}}};
OLDNEW
« no previous file with comments | « chrome/test/data/dromaeo/lib/ext-base.js ('k') | chrome/test/data/dromaeo/lib/jquery.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698