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