modxcms/revolution

View on GitHub
manager/assets/ext3/adapter/yui/ext-yui-adapter.js

Summary

Maintainability
A
0 mins
Test Coverage
/*
This file is part of Ext JS 3.4

Copyright (c) 2011-2013 Sencha Inc

Contact:  http://www.sencha.com/contact

GNU General Public License Usage
This file may be used under the terms of the GNU General Public License version 3.0 as
published by the Free Software Foundation and appearing in the file LICENSE included in the
packaging of this file.

Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.

If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.

Build date: 2013-04-03 15:07:25
*/
window.undefined=window.undefined;Ext={version:"3.4.1.1",versionDetail:{major:3,minor:4,patch:1.1}};Ext.apply=function(d,e,b){if(b){Ext.apply(d,b)}if(d&&e&&typeof e=="object"){for(var a in e){d[a]=e[a]}}return d};(function(){var g=0,f=Object.prototype.toString,y=navigator.userAgent.toLowerCase(),n=function(e){return e.test(y)},s=document,q=s.documentMode,u=s.compatMode=="CSS1Compat",a=n(/opera/),H=n(/\bchrome\b/),z=n(/webkit/),d=!H&&n(/safari/),F=d&&n(/applewebkit\/4/),D=d&&n(/version\/3/),B=d&&n(/version\/4/),j=!a&&n(/msie/),G=j&&((n(/msie 7/)&&q!=8&&q!=9&&q!=10)||q==7),E=j&&((n(/msie 8/)&&q!=7&&q!=9&&q!=10)||q==8),C=j&&((n(/msie 9/)&&q!=7&&q!=8&&q!=10)||q==9),i=j&&((n(/msie 10/)&&q!=7&&q!=8&&q!=9)||q==10),J=j&&n(/msie 6/),K=j&&(J||G||E||C),c=!z&&n(/gecko/),M=c&&n(/rv:1\.8/),L=c&&n(/rv:1\.9/),m=K&&!u,h=n(/windows|win32/),A=n(/macintosh|mac os x/),p=n(/adobeair/),v=n(/linux/),r=/^https/i.test(window.location.protocol),b=[],w=[],o=Ext.emptyFn,x=Ext.apply({},{constructor:o,toString:o,valueOf:o}),l=function(){var e=l.caller.caller;return e.$owner.prototype[e.$name].apply(this,arguments)};if(x.constructor!==o){w.push("constructor")}if(x.toString!==o){w.push("toString")}if(x.valueOf!==o){w.push("valueOf")}if(!w.length){w=null}function k(){}Ext.apply(k,{$isClass:true,callParent:function(e){var t;return(t=this.callParent.caller)&&(t.$previous||((t=t.$owner?t:t.caller)&&t.$owner.superclass.self[t.$name])).apply(this,e||b)}});k.prototype={constructor:function(){},callParent:function(t){var N,e=(N=this.callParent.caller)&&(N.$previous||((N=N.$owner?N:N.caller)&&N.$owner.superclass[N.$name]));return e.apply(this,t||b)}};if(J){try{s.execCommand("BackgroundImageCache",false,true)}catch(I){}}Ext.apply(Ext,{SSL_SECURE_URL:r&&j?'javascript:""':"about:blank",isStrict:u,isSecure:r,isReady:false,enableForcedBoxModel:false,enableGarbageCollector:true,enableListenerCollection:false,enableNestedListenerRemoval:false,USE_NATIVE_JSON:false,applyIf:function(t,N){if(t){for(var e in N){if(!Ext.isDefined(t[e])){t[e]=N[e]}}}return t},id:function(e,t){e=Ext.getDom(e,true)||{};if(!e.id){e.id=(t||"ext-gen")+(++g)}return e.id},extend:function(){var t=function(O){for(var N in O){this[N]=O[N]}};var e=Object.prototype.constructor;return function(S,P,R){if(typeof P=="object"){R=P;P=S;S=R.constructor!=e?R.constructor:function(){P.apply(this,arguments)}}var O=function(){},Q,N=P.prototype;O.prototype=N;Q=S.prototype=new O();Q.constructor=S;S.superclass=N;if(N.constructor==e){N.constructor=P}S.override=function(T){Ext.override(S,T)};Q.superclass=Q.supr=(function(){return N});Q.override=t;Ext.override(S,R);S.extend=function(T){return Ext.extend(S,T)};return S}}(),global:(function(){return this})(),Base:k,namespaceCache:{},createNamespace:function(R,O){var e=Ext.namespaceCache,P=O?R.substring(0,R.lastIndexOf(".")):R,U=e[P],S,N,t,Q,T;if(!U){U=Ext.global;if(P){T=[];Q=P.split(".");for(S=0,N=Q.length;S<N;++S){t=Q[S];U=U[t]||(U[t]={});T.push(t);e[T.join(".")]=U}}}return U},getClassByName:function(N){var O=N.split("."),e=Ext.global,P=O.length,t;for(t=0;e&&t<P;++t){e=e[O[t]]}return e||null},addMembers:function(t,Q,N,e){var P,O,R;for(O in N){if(N.hasOwnProperty(O)){R=N[O];if(typeof R=="function"){R.$owner=t;R.$name=O}Q[O]=R}}if(e&&w){for(P=w.length;P-->0;){O=w[P];if(N.hasOwnProperty(O)){R=N[O];if(typeof R=="function"){R.$owner=t;R.$name=O}Q[O]=R}}}},define:function(R,P,N){var t=P.override,T,Q,e,O;if(t){delete P.override;T=Ext.getClassByName(t);Ext.override(T,P)}else{if(R){O=Ext.createNamespace(R,true);e=R.substring(R.lastIndexOf(".")+1)}T=function S(){this.constructor.apply(this,arguments)};if(R){T.displayName=R}T.$isClass=true;T.callParent=Ext.Base.callParent;if(typeof P=="function"){P=P(T)}Q=P.extend;if(Q){delete P.extend;if(typeof Q=="string"){Q=Ext.getClassByName(Q)}}else{Q=k}Ext.extend(T,Q,P);if(T.prototype.constructor===T){delete T.prototype.constructor}if(!T.prototype.$isClass){Ext.applyIf(T.prototype,k.prototype)}T.prototype.self=T;if(P.xtype){Ext.reg(P.xtype,T)}T=P.singleton?new T():T;if(R){O[e]=T}}if(N){N.call(T)}return T},override:function(P,R){var N,Q;if(R){if(P.$isClass){Q=R.statics;if(Q){delete R.statics}Ext.addMembers(P,P.prototype,R,true);if(Q){Ext.addMembers(P,P,Q)}}else{if(typeof P=="function"){N=P.prototype;Ext.apply(N,R);if(Ext.isIE&&R.hasOwnProperty("toString")){N.toString=R.toString}}else{var e=P.self,t,O;if(e&&e.$isClass){for(t in R){if(R.hasOwnProperty(t)){O=R[t];if(typeof O=="function"){if(e.$className){O.displayName=e.$className+"#"+t}O.$name=t;O.$owner=e;O.$previous=P.hasOwnProperty(t)?P[t]:l}P[t]=O}}}else{Ext.apply(P,R);if(!P.constructor.$isClass){P.constructor.prototype.callParent=k.prototype.callParent;P.constructor.callParent=k.callParent}}}}}},namespace:function(){var O=arguments.length,P=0,t,N,e,R,Q,S;for(;P<O;++P){e=arguments[P];R=arguments[P].split(".");S=window[R[0]];if(S===undefined){S=window[R[0]]={}}Q=R.slice(1);t=Q.length;for(N=0;N<t;++N){S=S[Q[N]]=S[Q[N]]||{}}}return S},urlEncode:function(Q,P){var N,t=[],O=encodeURIComponent;Ext.iterate(Q,function(e,R){N=Ext.isEmpty(R);Ext.each(N?e:R,function(S){t.push("&",O(e),"=",(!Ext.isEmpty(S)&&(S!=e||!N))?(Ext.isDate(S)?Ext.encode(S).replace(/"/g,""):O(S)):"")})});if(!P){t.shift();P=""}return P+t.join("")},urlDecode:function(N,t){if(Ext.isEmpty(N)){return{}}var Q={},P=N.split("&"),R=decodeURIComponent,e,O;Ext.each(P,function(S){S=S.split("=");e=R(S[0]);O=R(S[1]);Q[e]=t||!Q[e]?O:[].concat(Q[e]).concat(O)});return Q},urlAppend:function(e,t){if(!Ext.isEmpty(t)){return e+(e.indexOf("?")===-1?"?":"&")+t}return e},toArray:function(){return j?function(N,Q,O,P){P=[];for(var t=0,e=N.length;t<e;t++){P.push(N[t])}return P.slice(Q||0,O||P.length)}:function(e,N,t){return Array.prototype.slice.call(e,N||0,t||e.length)}}(),isIterable:function(e){if(Ext.isArray(e)||e.callee){return true}if(/NodeList|HTMLCollection/.test(f.call(e))){return true}return((typeof e.nextNode!="undefined"||e.item)&&Ext.isNumber(e.length))},each:function(P,O,N){if(Ext.isEmpty(P,true)){return}if(!Ext.isIterable(P)||Ext.isPrimitive(P)){P=[P]}for(var t=0,e=P.length;t<e;t++){if(O.call(N||P[t],P[t],t,P)===false){return t}}},iterate:function(N,t,e){if(Ext.isEmpty(N)){return}if(Ext.isIterable(N)){Ext.each(N,t,e);return}else{if(typeof N=="object"){for(var O in N){if(N.hasOwnProperty(O)){if(t.call(e||N,O,N[O],N)===false){return}}}}}},getDom:function(N,t){if(!N||!s){return null}if(N.dom){return N.dom}else{if(typeof N=="string"){var O=s.getElementById(N);if(O&&j&&t){if(N==O.getAttribute("id")){return O}else{return null}}return O}else{return N}}},getBody:function(){return Ext.get(s.body||s.documentElement)},getHead:function(){var e;return function(){if(e==undefined){e=Ext.get(s.getElementsByTagName("head")[0])}return e}}(),removeNode:j&&!E?function(){var e;return function(t){if(t&&t.tagName!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(t,true):Ext.EventManager.removeAll(t);e=e||s.createElement("div");e.appendChild(t);e.innerHTML="";delete Ext.elCache[t.id]}}}():function(e){if(e&&e.parentNode&&e.tagName!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(e,true):Ext.EventManager.removeAll(e);e.parentNode.removeChild(e);delete Ext.elCache[e.id]}},isEmpty:function(t,e){return t===null||t===undefined||((Ext.isArray(t)&&!t.length))||(!e?t==="":false)},isArray:function(e){return f.apply(e)==="[object Array]"},isDate:function(e){return f.apply(e)==="[object Date]"},isObject:function(e){return !!e&&Object.prototype.toString.call(e)==="[object Object]"},isPrimitive:function(e){return Ext.isString(e)||Ext.isNumber(e)||Ext.isBoolean(e)},isFunction:function(e){return f.apply(e)==="[object Function]"},isNumber:function(e){return typeof e==="number"&&isFinite(e)},isString:function(e){return typeof e==="string"},isBoolean:function(e){return typeof e==="boolean"},isElement:function(e){return e?!!e.tagName:false},isDefined:function(e){return typeof e!=="undefined"},isOpera:a,isWebKit:z,isChrome:H,isSafari:d,isSafari3:D,isSafari4:B,isSafari2:F,isIE:j,isIE6:J,isIE7:G,isIE8:E,isIE9:C,isIE10:i,isIE9m:K,isIE10p:j&&!(J||G||E||C),isIEQuirks:j&&(!u&&(J||G||E||C)),isGecko:c,isGecko2:M,isGecko3:L,isBorderBox:m,isLinux:v,isWindows:h,isMac:A,isAir:p});Ext.ns=Ext.namespace})();Ext.ns("Ext.util","Ext.lib","Ext.data","Ext.supports");Ext.elCache={};Ext.apply(Function.prototype,{createInterceptor:function(b,a){var c=this;return !Ext.isFunction(b)?this:function(){var e=this,d=arguments;b.target=e;b.method=c;return(b.apply(a||e||window,d)!==false)?c.apply(e||window,d):null}},createCallback:function(){var a=arguments,b=this;return function(){return b.apply(window,a)}},createDelegate:function(c,b,a){var d=this;return function(){var f=b||arguments;if(a===true){f=Array.prototype.slice.call(arguments,0);f=f.concat(b)}else{if(Ext.isNumber(a)){f=Array.prototype.slice.call(arguments,0);var e=[a,0].concat(b);Array.prototype.splice.apply(f,e)}}return d.apply(c||window,f)}},defer:function(c,e,b,a){var d=this.createDelegate(e,b,a);if(c>0){return setTimeout(d,c)}d();return 0}});Ext.applyIf(String,{format:function(b){var a=Ext.toArray(arguments,1);return b.replace(/\{(\d+)\}/g,function(c,d){return a[d]})}});Ext.applyIf(Array.prototype,{indexOf:function(b,c){var a=this.length;c=c||0;c+=(c<0)?a:0;for(;c<a;++c){if(this[c]===b){return c}}return -1},remove:function(b){var a=this.indexOf(b);if(a!=-1){this.splice(a,1)}return this}});Ext.util.TaskRunner=function(e){e=e||10;var f=[],a=[],b=0,g=false,d=function(){g=false;clearInterval(b);b=0},h=function(){if(!g){g=true;b=setInterval(i,e)}},c=function(j){a.push(j);if(j.onStop){j.onStop.apply(j.scope||j)}},i=function(){var l=a.length,n=new Date().getTime();if(l>0){for(var p=0;p<l;p++){f.remove(a[p])}a=[];if(f.length<1){d();return}}for(var p=0,o,k,m,j=f.length;p<j;++p){o=f[p];k=n-o.taskRunTime;if(o.interval<=k){m=o.run.apply(o.scope||o,o.args||[++o.taskRunCount]);o.taskRunTime=n;if(m===false||o.taskRunCount===o.repeat){c(o);return}}if(o.duration&&o.duration<=(n-o.taskStartTime)){c(o)}}};this.start=function(j){f.push(j);j.taskStartTime=new Date().getTime();j.taskRunTime=0;j.taskRunCount=0;h();return j};this.stop=function(j){c(j);return j};this.stopAll=function(){d();for(var k=0,j=f.length;k<j;k++){if(f[k].onStop){f[k].onStop()}}f=[];a=[]}};Ext.TaskMgr=new Ext.util.TaskRunner();if(typeof YAHOO=="undefined"){throw"Unable to load Ext, core YUI utilities (yahoo, dom, event) not found."}(function(){var m=YAHOO.util.Event,b=YAHOO.util.Dom,f=YAHOO.util.Connect,h=YAHOO.util.Easing,c=YAHOO.util.Anim,j,k=YAHOO.env.getVersion("yahoo").version.split("."),a=parseInt(k[0],10)>=3,l={},e=function(n,o){if(n&&n.firstChild){while(o){if(o===n){return true}o=o.parentNode;if(o&&(o.nodeType!=1)){o=null}}}return false},i=function(n){return !e(n.currentTarget,Ext.lib.Event.getRelatedTarget(n))};Ext.lib.Dom={getViewWidth:function(n){return n?b.getDocumentWidth():b.getViewportWidth()},getViewHeight:function(n){return n?b.getDocumentHeight():b.getViewportHeight()},isAncestor:function(n,o){return b.isAncestor(n,o)},getRegion:function(n){return b.getRegion(n)},getY:function(n){return this.getXY(n)[1]},getX:function(n){return this.getXY(n)[0]},getXY:function(q){var o,u,w,z,t=(document.body||document.documentElement);q=Ext.getDom(q);if(q==t){return[0,0]}if(q.getBoundingClientRect){w=q.getBoundingClientRect();z=g(document).getScroll();return[Math.round(w.left+z.left),Math.round(w.top+z.top)]}var A=0,v=0;o=q;var n=g(q).getStyle("position")=="absolute";while(o){A+=o.offsetLeft;v+=o.offsetTop;if(!n&&g(o).getStyle("position")=="absolute"){n=true}if(Ext.isGecko){u=g(o);var B=parseInt(u.getStyle("borderTopWidth"),10)||0;var r=parseInt(u.getStyle("borderLeftWidth"),10)||0;A+=r;v+=B;if(o!=q&&u.getStyle("overflow")!="visible"){A+=r;v+=B}}o=o.offsetParent}if(Ext.isSafari&&n){A-=t.offsetLeft;v-=t.offsetTop}if(Ext.isGecko&&!n){var s=g(t);A+=parseInt(s.getStyle("borderLeftWidth"),10)||0;v+=parseInt(s.getStyle("borderTopWidth"),10)||0}o=q.parentNode;while(o&&o!=t){if(!Ext.isOpera||(o.tagName!="TR"&&g(o).getStyle("display")!="inline")){A-=o.scrollLeft;v-=o.scrollTop}o=o.parentNode}return[A,v]},setXY:function(n,o){n=Ext.fly(n,"_setXY");n.position();var p=n.translatePoints(o);if(o[0]!==false){n.dom.style.left=p.left+"px"}if(o[1]!==false){n.dom.style.top=p.top+"px"}},setX:function(o,n){this.setXY(o,[n,false])},setY:function(n,o){this.setXY(n,[false,o])}};Ext.lib.Event={getPageX:function(n){return m.getPageX(n.browserEvent||n)},getPageY:function(n){return m.getPageY(n.browserEvent||n)},getXY:function(n){return m.getXY(n.browserEvent||n)},getTarget:function(n){return m.getTarget(n.browserEvent||n)},getRelatedTarget:function(n){return m.getRelatedTarget(n.browserEvent||n)},on:function(r,n,q,p,o){if((n=="mouseenter"||n=="mouseleave")&&!a){var s=l[r.id]||(l[r.id]={});s[n]=q;q=q.createInterceptor(i);n=(n=="mouseenter")?"mouseover":"mouseout"}m.on(r,n,q,p,o)},un:function(p,n,o){if((n=="mouseenter"||n=="mouseleave")&&!a){var r=l[p.id],q=r&&r[n];if(q){o=q.fn;delete r[n];n=(n=="mouseenter")?"mouseover":"mouseout"}}m.removeListener(p,n,o)},purgeElement:function(n){m.purgeElement(n)},preventDefault:function(n){m.preventDefault(n.browserEvent||n)},stopPropagation:function(n){m.stopPropagation(n.browserEvent||n)},stopEvent:function(n){m.stopEvent(n.browserEvent||n)},onAvailable:function(q,p,o,n){return m.onAvailable(q,p,o,n)}};Ext.lib.Ajax={request:function(t,r,n,s,o){if(o){var p=o.headers;if(p){for(var q in p){if(p.hasOwnProperty(q)){f.initHeader(q,p[q],false)}}}if(o.xmlData){if(!p||!p["Content-Type"]){f.initHeader("Content-Type","text/xml",false)}t=(t?t:(o.method?o.method:"POST"));s=o.xmlData}else{if(o.jsonData){if(!p||!p["Content-Type"]){f.initHeader("Content-Type","application/json",false)}t=(t?t:(o.method?o.method:"POST"));s=typeof o.jsonData=="object"?Ext.encode(o.jsonData):o.jsonData}}}return f.asyncRequest(t,r,n,s)},formRequest:function(r,q,o,s,n,p){f.setForm(r,n,p);return f.asyncRequest(Ext.getDom(r).method||"POST",q,o,s)},isCallInProgress:function(n){return f.isCallInProgress(n)},abort:function(n){return f.abort(n)},serializeForm:function(n){var o=f.setForm(n.dom||n);f.resetFormState();return o}};Ext.lib.Region=YAHOO.util.Region;Ext.lib.Point=YAHOO.util.Point;Ext.lib.Anim={scroll:function(q,o,r,s,n,p){this.run(q,o,r,s,n,p,YAHOO.util.Scroll)},motion:function(q,o,r,s,n,p){this.run(q,o,r,s,n,p,YAHOO.util.Motion)},color:function(q,o,r,s,n,p){this.run(q,o,r,s,n,p,YAHOO.util.ColorAnim)},run:function(r,o,t,u,n,q,p){p=p||YAHOO.util.Anim;if(typeof u=="string"){u=YAHOO.util.Easing[u]}var s=new p(r,o,t,u);s.animateX(function(){Ext.callback(n,q)});return s}};function g(n){if(!j){j=new Ext.Element.Flyweight()}j.dom=n;return j}if(Ext.isIE){function d(){var n=Function.prototype;delete n.createSequence;delete n.defer;delete n.createDelegate;delete n.createCallback;delete n.createInterceptor;window.detachEvent("onunload",d)}window.attachEvent("onunload",d)}if(YAHOO.util.Anim){YAHOO.util.Anim.prototype.animateX=function(p,n){var o=function(){this.onComplete.unsubscribe(o);if(typeof p=="function"){p.call(n||this,this)}};this.onComplete.subscribe(o,this,true);this.animate()}}if(YAHOO.util.DragDrop&&Ext.dd.DragDrop){YAHOO.util.DragDrop.defaultPadding=Ext.dd.DragDrop.defaultPadding;YAHOO.util.DragDrop.constrainTo=Ext.dd.DragDrop.constrainTo}YAHOO.util.Dom.getXY=function(n){var o=function(p){return Ext.lib.Dom.getXY(p)};return YAHOO.util.Dom.batch(n,o,YAHOO.util.Dom,true)};if(YAHOO.util.AnimMgr){YAHOO.util.AnimMgr.fps=1000}YAHOO.util.Region.prototype.adjust=function(p,o,n,q){this.top+=p;this.left+=o;this.right+=q;this.bottom+=n;return this};YAHOO.util.Region.prototype.constrainTo=function(n){this.top=this.top.constrain(n.top,n.bottom);this.bottom=this.bottom.constrain(n.top,n.bottom);this.left=this.left.constrain(n.left,n.right);this.right=this.right.constrain(n.left,n.right);return this}})();