yui-base-min.js revision bac35d09bf82c623c78e34ebb7ba382185b0d022
if(typeof YUI!="undefined"){YUI._YUI=YUI;}var YUI=function(){var c=0,f=this,b=arguments,a=b.length,e=function(h,g){return(h&&h.hasOwnProperty&&(h instanceof g));},d=(typeof YUI_config!=="undefined")&&YUI_config;if(!(e(f,YUI))){f=new YUI();}else{f._init();if(YUI.GlobalConfig){f.applyConfig(YUI.GlobalConfig);}if(d){f.applyConfig(d);}if(!a){f._setup();}}if(a){for(;c<a;c++){f.applyConfig(b[c]);}f._setup();}f.instanceOf=e;return f;};(function(){var p,b,q="@VERSION@",h=".",n="http://yui.yahooapis.com/",t="yui3-js-enabled",l=function(){},g=Array.prototype.slice,r={"io.xdrReady":1,"io.xdrResponse":1,"SWF.eventHandler":1},f=(typeof window!="undefined"),e=(f)?window:null,v=(f)?e.document:null,d=v&&v.documentElement,a=d&&d.className,c={},i=new Date().getTime(),m=function(z,y,x,w){if(z&&z.addEventListener){z.addEventListener(y,x,w);}else{if(z&&z.attachEvent){z.attachEvent("on"+y,x);}}},u=function(A,z,y,w){if(A&&A.removeEventListener){try{A.removeEventListener(z,y,w);}catch(x){}}else{if(A&&A.detachEvent){A.detachEvent("on"+z,y);}}},s=function(){YUI.Env.windowLoaded=true;YUI.Env.DOMReady=true;if(f){u(window,"load",s);}},j=function(y,x){var w=y.Env._loader;if(w){w.ignoreRegistered=false;w.onEnd=null;w.data=null;w.required=[];w.loadType=null;}else{w=new y.Loader(y.config);y.Env._loader=w;}return w;},o=function(y,x){for(var w in x){if(x.hasOwnProperty(w)){y[w]=x[w];}}},k={success:true};if(d&&a.indexOf(t)==-1){if(a){a+=" ";}a+=t;d.className=a;}if(q.indexOf("@")>-1){q="3.2.0";}p={applyConfig:function(D){D=D||l;var y,A,z=this.config,B=z.modules,x=z.groups,C=z.rls,w=this.Env._loader;for(A in D){if(D.hasOwnProperty(A)){y=D[A];if(B&&A=="modules"){o(B,y);}else{if(x&&A=="groups"){o(x,y);}else{if(C&&A=="rls"){o(C,y);}else{if(A=="win"){z[A]=y.contentWindow||y;z.doc=z[A].document;}else{if(A=="_yuid"){}else{z[A]=y;}}}}}}}if(w){w._config(D);}},_config:function(w){this.applyConfig(w);},_init:function(){var y,z=this,w=YUI.Env,x=z.Env,A;z.version=q;if(!x){z.Env={mods:{},versions:{},base:n,cdn:n+q+"/build/",_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_guidp:"y",_loaded:{},getBase:w&&w.getBase||function(G,F){var B,C,E,H,D;C=(v&&v.getElementsByTagName("script"))||[];for(E=0;E<C.length;E=E+1){H=C[E].src;if(H){D=H.match(G);B=D&&D[1];if(B){y=D[2];if(y){D=y.indexOf("js");if(D>-1){y=y.substr(0,D);}}D=H.match(F);if(D&&D[3]){B=D[1]+D[3];}break;}}}return B||x.cdn;}};x=z.Env;x._loaded[q]={};if(w&&z!==YUI){x._yidx=++w._yidx;x._guidp=("yui_"+q+"_"+x._yidx+"_"+i).replace(/\./g,"_");}else{if(YUI._YUI){w=YUI._YUI.Env;x._yidx+=w._yidx;x._uidx+=w._uidx;for(A in w){if(!(A in x)){x[A]=w[A];}}delete YUI._YUI;}}z.id=z.stamp(z);c[z.id]=z;}z.constructor=YUI;z.config=z.config||{win:e,doc:v,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,cacheUse:true,fetchCSS:true};z.config.base=YUI.config.base||z.Env.getBase(/^(.*)yui\/yui([\.\-].*)js(\?.*)?$/,/^(.*\?)(.*\&)(.*)yui\/yui[\.\-].*js(\?.*)?$/);if(!y||(!("-min.-debug.").indexOf(y))){y="-min.";}z.config.loaderPath=YUI.config.loaderPath||"loader/loader"+(y||"-min.")+"js";},_setup:function(B){var x,A=this,w=[],z=YUI.Env.mods,y=A.config.core||["get","rls","intl-base","loader","yui-log","yui-later","yui-throttle"];for(x=0;x<y.length;x++){if(z[y[x]]){w.push(y[x]);}}A._attach(["yui-base"]);A._attach(w);},applyTo:function(C,B,y){if(!(B in r)){this.log(B+": applyTo not allowed","warn","yui");return null;}var x=c[C],A,w,z;if(x){A=B.split(".");w=x;for(z=0;z<A.length;z=z+1){w=w[A[z]];if(!w){this.log("applyTo not found: "+B,"warn","yui");}}return w.apply(x,y);}return null;},add:function(x,C,B,w){w=w||{};var A=YUI.Env,D={name:x,fn:C,version:B,details:w},E,z,y=A.versions;A.mods[x]=D;y[B]=y[B]||{};y[B][x]=D;for(z in c){if(c.hasOwnProperty(z)){E=c[z].Env._loader;if(E){if(!E.moduleInfo[x]){E.addModule(w,x);}}}}return this;},_attach:function(w,C){var F,A,J,x,I,y,z,L=YUI.Env.mods,B=this,E,D=B.Env._attached,G=w.length,K;for(F=0;F<G;F++){if(!D[w[F]]){A=w[F];J=L[A];if(!J){K=B.Env._loader;if(!K||!K.moduleInfo[A]){B.message("NOT loaded: "+A,"warn","yui");}}else{D[A]=true;x=J.details;I=x.requires;y=x.use;z=x.after;if(I){for(E=0;E<I.length;E++){if(!D[I[E]]){if(!B._attach(I)){return false;}break;}}}if(z){for(E=0;E<z.length;E++){if(!D[z[E]]){if(!B._attach(z)){return false;}break;}}}if(J.fn){try{J.fn(B,A);}catch(H){B.error("Attach error: "+A,H,A);return false;}}if(y){for(E=0;E<y.length;E++){if(!D[y[E]]){if(!B._attach(y)){return false;}break;}}}}}}return true;},use:function(){var y=g.call(arguments,0),C=y[y.length-1],B=this,A=0,x,w=B.Env,z=true;if(B.Lang.isFunction(C)){y.pop();}else{C=null;}if(B.config.cacheUse){while((x=y[A++])){if(!w._attached[x]){z=false;break;}}if(z){if(y.length){}B._notify(C,k,y);return B;}}if(B._loading){B._useQueue=B._useQueue||new B.Queue();B._useQueue.add([y,C]);}else{B._use(y,function(E,D){E._notify(C,D,y);});}return B;},_notify:function(z,w,x){if(!w.success&&this.config.loadErrorFn){this.config.loadErrorFn.call(this,this,z,w,x);}else{if(z){try{z(this,w);}catch(y){this.error("use callback error",y,x);}}}},_use:function(y,A){if(!this.Array){this._attach(["yui-base"]);}var M,F,N,K,x=this,O=YUI.Env,z=O.mods,w=x.Env,C=w._used,J=O._loaderQueue,R=y[0],E=x.Array,P=x.config,D=P.bootstrap,L=[],H=[],Q=true,B=P.fetchCSS,I=function(T,S){if(!T.length){return;}E.each(T,function(W){if(!S){H.push(W);}if(C[W]){return;}var U=z[W],X,V;if(U){C[W]=true;X=U.details.requires;V=U.details.use;}else{if(!O._loaded[q][W]){L.push(W);}else{C[W]=true;}}if(X&&X.length){I(X);}if(V&&V.length){I(V,1);}});},G=function(W){var U=W||{success:true,msg:"not dynamic"},T,S,V=true,X=U.data;x._loading=false;if(X){S=L;L=[];H=[];I(X);T=L.length;if(T){if(L.sort().join()==S.sort().join()){T=false;}}}if(T&&X){x._loading=false;x._use(y,function(){if(x._attach(X)){x._notify(A,U,X);}});}else{if(X){V=x._attach(X);}if(V){x._notify(A,U,y);}}if(x._useQueue&&x._useQueue.size()&&!x._loading){x._use.apply(x,x._useQueue.next());}};if(R==="*"){Q=x._attach(x.Object.keys(z));if(Q){G();}return x;}if(D&&x.Loader&&y.length){F=j(x);F.require(y);F.ignoreRegistered=true;
F.calculate(null,(B)?null:"js");y=F.sorted;}I(y);M=L.length;if(M){L=x.Object.keys(E.hash(L));M=L.length;}if(D&&M&&x.Loader){x._loading=true;F=j(x);F.onEnd=G;F.context=x;F.data=y;F.ignoreRegistered=false;F.require(y);F.insert(null,(B)?null:"js");}else{if(M&&x.config.use_rls){O._rls_queue=O._rls_queue||new x.Queue();K=function(S,T){O._rls_in_progress=true;S.Get.script(S._rls(T),{onEnd:function(U){G(U);O._rls_in_progress=false;if(O._rls_queue.size()){O._rls_queue.next()();}},data:T});};if(O._rls_in_progress){O._rls_queue.add(function(){K(x,y);});}else{K(x,y);}}else{if(D&&M&&x.Get&&!w.bootstrapped){x._loading=true;N=function(){x._loading=false;J.running=false;w.bootstrapped=true;if(x._attach(["loader"])){x._use(y,A);}};if(O._bootstrapping){J.add(N);}else{O._bootstrapping=true;x.Get.script(P.base+P.loaderPath,{onEnd:N});}}else{Q=x._attach(y);if(Q){G();}}}}return x;},namespace:function(){var x=arguments,B=this,z=0,y,A,w;for(;z<x.length;z++){w=x[z];if(w.indexOf(h)){A=w.split(h);for(y=(A[0]=="YAHOO")?1:0;y<A.length;y++){B[A[y]]=B[A[y]]||{};B=B[A[y]];}}else{B[w]=B[w]||{};}}return B;},log:l,message:l,error:function(A,y,x){var z=this,w;if(z.config.errorFn){w=z.config.errorFn.apply(z,arguments);}if(z.config.throwFail&&!w){throw (y||new Error(A));}else{z.message(A,"error");}return z;},guid:function(w){var x=this.Env._guidp+"_"+(++this.Env._uidx);return(w)?(w+x):x;},stamp:function(y,z){var w;if(!y){return y;}if(y.uniqueID&&y.nodeType&&y.nodeType!==9){w=y.uniqueID;}else{w=(typeof y==="string")?y:y._yuid;}if(!w){w=this.guid();if(!z){try{y._yuid=w;}catch(x){w=null;}}}return w;},destroy:function(){var w=this;if(w.Event){w.Event._unload();}delete c[w.id];delete w.Env;delete w.config;}};YUI.prototype=p;for(b in p){if(p.hasOwnProperty(b)){YUI[b]=p[b];}}YUI._init();if(f){m(window,"load",s);}else{s();}YUI.Env.add=m;YUI.Env.remove=u;if(typeof exports=="object"){exports.YUI=YUI;}}());YUI.add("yui-base",function(c){var j=c.Lang||(c.Lang={}),n=String.prototype,l=Object.prototype.toString,b={"undefined":"undefined","number":"number","boolean":"boolean","string":"string","[object Function]":"function","[object RegExp]":"regexp","[object Array]":"array","[object Date]":"date","[object Error]":"error"},d=/\{\s*([^|}]+?)\s*(?:\|([^}]*))?\s*\}/g,r=/^\s+|\s+$/g,e=c.config.win,o=e&&!!(e.MooTools||e.Prototype);j.isArray=(!o&&Array.isArray)||function(u){return j.type(u)==="array";};j.isBoolean=function(u){return typeof u==="boolean";};j.isFunction=function(u){return j.type(u)==="function";};j.isDate=function(u){return j.type(u)==="date"&&u.toString()!=="Invalid Date"&&!isNaN(u);};j.isNull=function(u){return u===null;};j.isNumber=function(u){return typeof u==="number"&&isFinite(u);};j.isObject=function(w,v){var u=typeof w;return(w&&(u==="object"||(!v&&(u==="function"||j.isFunction(w)))))||false;};j.isString=function(u){return typeof u==="string";};j.isUndefined=function(u){return typeof u==="undefined";};j.trim=n.trim?function(u){return u&&u.trim?u.trim():u;}:function(u){try{return u.replace(r,"");}catch(v){return u;}};j.trimLeft=n.trimLeft?function(u){return u.trimLeft();}:function(u){return u.replace(/^\s+/,"");};j.trimRight=n.trimRight?function(u){return u.trimRight();}:function(u){return u.replace(/\s+$/,"");};j.isValue=function(v){var u=j.type(v);switch(u){case"number":return isFinite(v);case"null":case"undefined":return false;default:return !!u;}};j.type=function(u){return b[typeof u]||b[l.call(u)]||(u?"object":"null");};j.sub=function(u,v){return u.replace?u.replace(d,function(w,x){return j.isUndefined(v[x])?w:v[x];}):u;};j.now=Date.now||function(){return new Date().getTime();};var f=c.Lang,q=Array.prototype;function k(w,z,y){var v,u;z||(z=0);if(y||k.test(w)){try{return q.slice.call(w,z);}catch(x){u=[];for(v=w.length;z<v;++z){u.push(w[z]);}return u;}}return[w];}c.Array=k;k.test=function(w){var u=0;if(f.isArray(w)){u=1;}else{if(f.isObject(w)){try{if("length" in w&&!w.tagName&&!w.alert&&!w.apply){u=2;}}catch(v){}}}return u;};k.each=k.forEach=q.forEach?function(w,u,v){q.forEach.call(w||[],u,v||c);return c;}:function(y,w,x){for(var v=0,u=(y&&y.length)||0;v<u;++v){w.call(x||c,y[v],v,y);}return c;};k.hash=function(x,v){var y={},z=v&&v.length,w,u;for(w=0,u=x.length;w<u;++w){y[x[w]]=z&&z>w?v[w]:true;}return y;};k.indexOf=q.indexOf?function(v,u){return q.indexOf.call(v,u);}:function(x,w){for(var v=0,u=x.length;v<u;++v){if(x[v]===w){return v;}}return -1;};k.numericSort=function(v,u){return v-u;};k.some=q.some?function(w,u,v){return q.some.call(w,u,v);}:function(y,w,x){for(var v=0,u=y.length;v<u;++v){if(w.call(x,y[v],v,y)){return true;}}return false;};function s(){this._init();this.add.apply(this,arguments);}s.prototype={_init:function(){this._q=[];},next:function(){return this._q.shift();},last:function(){return this._q.pop();},add:function(){this._q.push.apply(this._q,arguments);return this;},size:function(){return this._q.length;}};c.Queue=s;YUI.Env._loaderQueue=YUI.Env._loaderQueue||new s();var m="__",h=["toString","valueOf"],a=function(x,w){var u,y,v;for(u=0;u<h.length;u++){y=h[u];v=w[y];if(j.isFunction(v)&&v!=Object.prototype[y]){x[y]=v;}}};c.merge=function(){var v=arguments,x={},w,u=v.length;for(w=0;w<u;w=w+1){c.mix(x,v[w],true);}return x;};c.mix=function(u,D,w,C,z,B){if(!D||!u){return u||c;}if(z){switch(z){case 1:return c.mix(u.prototype,D.prototype,w,C,0,B);case 2:c.mix(u.prototype,D.prototype,w,C,0,B);break;case 3:return c.mix(u,D.prototype,w,C,0,B);case 4:return c.mix(u.prototype,D,w,C,0,B);default:}}var y,x,v,A;if(C&&C.length){for(y=0,x=C.length;y<x;++y){v=C[y];A=c.Lang.type(u[v]);if(D.hasOwnProperty(v)){if(B&&A=="object"){c.mix(u[v],D[v]);}else{if(w||!(v in u)){u[v]=D[v];}}}}}else{for(y in D){if(D.hasOwnProperty(y)){if(B&&c.Lang.isObject(u[y],true)){c.mix(u[y],D[y],w,C,0,true);}else{if(w||!(y in u)){u[y]=D[y];}}}}if(c.UA.ie){a(u,D);}}return u;};c.cached=function(w,u,v){u=u||{};return function(y){var x=(arguments.length>1)?Array.prototype.join.call(arguments,m):y;if(!(x in u)||(v&&u[x]==v)){u[x]=w.apply(w,arguments);}return u[x];
};};var p=Object.prototype.hasOwnProperty,e=c.config.win,o=e&&!!(e.MooTools||e.Prototype),t,g=c.Object=(!o&&Object.create)?function(u){return Object.create(u);}:(function(){function u(){}return function(v){u.prototype=v;return new u();};}()),i=g.owns=function(v,u){return !!v&&p.call(v,u);};g.hasKey=i;g.keys=(!o&&Object.keys)||(function(){var u=!{valueOf:0}.propertyIsEnumerable("valueOf"),v=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toString","toLocaleString","valueOf"];return function(A){if(!c.Lang.isObject(A)){throw new TypeError("Object.keys called on a non-object");}var z=[],y,x,w;for(x in A){if(i(A,x)){z.push(x);}}if(u){for(y=0,w=v.length;y<w;++y){x=v[y];if(i(A,x)){z.push(x);}}}return z;};}());g.values=function(y){var x=g.keys(y),w=0,u=x.length,v=[];for(;w<u;++w){v.push(y[x[w]]);}return v;};g.size=function(u){return g.keys(u).length;};g.hasValue=function(v,u){return c.Array.indexOf(g.values(v),u)>-1;};g.each=function(x,v,y,w){var u;for(u in x){if(w||i(x,u)){v.call(y||c,x[u],u,x);}}return c;};g.some=function(x,v,y,w){var u;for(u in x){if(w||i(x,u)){if(v.call(y||c,x[u],u,x)){return true;}}}return false;};g.getValue=function(y,x){if(!c.Lang.isObject(y)){return t;}var v,w=c.Array(x),u=w.length;for(v=0;y!==t&&v<u;v++){y=y[w[v]];}return y;};g.setValue=function(A,y,z){var u,x=c.Array(y),w=x.length-1,v=A;if(w>=0){for(u=0;v!==t&&u<w;u++){v=v[x[u]];}if(v!==t){v[x[u]]=z;}else{return t;}}return A;};g.isEmpty=function(u){return !g.keys(u).length;};YUI.Env.parseUA=function(A){var z=function(D){var E=0;return parseFloat(D.replace(/\./g,function(){return(E++==1)?"":".";}));},C=c.config.win,u=C&&C.navigator,x={ie:0,opera:0,gecko:0,webkit:0,safari:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:u&&u.cajaVersion,secure:false,os:null},v=A||u&&u.userAgent,B=C&&C.location,w=B&&B.href,y;x.secure=w&&(w.toLowerCase().indexOf("https")===0);if(v){if((/windows|win32/i).test(v)){x.os="windows";}else{if((/macintosh/i).test(v)){x.os="macintosh";}else{if((/rhino/i).test(v)){x.os="rhino";}}}if((/KHTML/).test(v)){x.webkit=1;}y=v.match(/AppleWebKit\/([^\s]*)/);if(y&&y[1]){x.webkit=z(y[1]);x.safari=x.webkit;if(/ Mobile\//.test(v)){x.mobile="Apple";y=v.match(/OS ([^\s]*)/);if(y&&y[1]){y=z(y[1].replace("_","."));}x.ios=y;x.ipad=x.ipod=x.iphone=0;y=v.match(/iPad|iPod|iPhone/);if(y&&y[0]){x[y[0].toLowerCase()]=x.ios;}}else{y=v.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(y){x.mobile=y[0];}if(/webOS/.test(v)){x.mobile="WebOS";y=v.match(/webOS\/([^\s]*);/);if(y&&y[1]){x.webos=z(y[1]);}}if(/ Android/.test(v)){x.mobile="Android";y=v.match(/Android ([^\s]*);/);if(y&&y[1]){x.android=z(y[1]);}}}y=v.match(/Chrome\/([^\s]*)/);if(y&&y[1]){x.chrome=z(y[1]);x.safari=0;}else{y=v.match(/AdobeAIR\/([^\s]*)/);if(y){x.air=y[0];}}}if(!x.webkit){y=v.match(/Opera[\s\/]([^\s]*)/);if(y&&y[1]){x.opera=z(y[1]);y=v.match(/Version\/([^\s]*)/);if(y&&y[1]){x.opera=z(y[1]);}y=v.match(/Opera Mini[^;]*/);if(y){x.mobile=y[0];}}else{y=v.match(/MSIE\s([^;]*)/);if(y&&y[1]){x.ie=z(y[1]);}else{y=v.match(/Gecko\/([^\s]*)/);if(y){x.gecko=1;y=v.match(/rv:([^\s\)]*)/);if(y&&y[1]){x.gecko=z(y[1]);}}}}}}YUI.Env.UA=x;return x;};c.UA=YUI.Env.UA||YUI.Env.parseUA();},"@VERSION@");