loader-min.js revision bf892aff6a5186f95f716fa21af51f89466f66f2
YUI.add("loader",function(A){(function(){YUI.Env._loaderQueue=YUI.Env._loaderQueue||new A.Queue();var v={},s=YUI.Env,AB,m="base",W="css",AA="js",K="cssreset",T="cssfonts",AC="cssgrids",C="cssbase",I=[K,T,AC,"cssreset-context","cssfonts-context","cssgrids-context"],Z=["reset","fonts","grids",m],a=A.version,t=a+"/build/",d="-context",j="anim-base",x="attribute",R=x+"-base",B="base-base",w="dd-drag",g="dom",E="dataschema-base",p="datasource-local",k="dom-base",N="dom-style",M="dom-screen",G="dump",Y="get",X="event-base",n="event-custom",V="event-custom-base",q="io-base",z="node",U="node-base",J="node-style",S="oop",h="pluginhost",F="selector-css2",l="substitute",Q="widget",H="widget-position",r="yui-base",f="plugin",e={version:a,root:t,base:"http://yui.yahooapis.com/"+t,comboBase:"http://yui.yahooapis.com/combo?",skin:{defaultSkin:"sam",base:"assets/skins/",path:"skin.css",after:I},modules:{dom:{requires:[S],submodules:{"dom-base":{requires:[S]},"dom-style":{requires:[k]},"dom-screen":{requires:[k,N]},"selector-native":{requires:[k]},"selector-css2":{requires:["selector-native"]},"selector":{requires:[k]}},plugins:{"selector-css3":{requires:[F]}}},node:{requires:[g,X],submodules:{"node-base":{requires:[k,F,X]},"node-style":{requires:[N,U]},"node-screen":{requires:[M,U]},"node-pluginhost":{requires:[U,h]},"node-event-delegate":{requires:[U,"event-delegate"]}},plugins:{"node-event-simulate":{requires:[U,"event-simulate"]}}},anim:{submodules:{"anim-base":{requires:[B,J]},"anim-color":{requires:[j]},"anim-easing":{requires:[j]},"anim-scroll":{requires:[j]},"anim-xy":{requires:[j,"node-screen"]},"anim-curve":{requires:["anim-xy"]},"anim-node-plugin":{requires:["node-pluginhost",j]}}},attribute:{submodules:{"attribute-base":{requires:[n]},"attribute-complex":{requires:[R]}}},base:{submodules:{"base-base":{requires:[R]},"base-build":{requires:[B]},"base-pluginhost":{requires:[B,h]}}},cache:{requires:[f]},compat:{requires:[z,G,l]},classnamemanager:{requires:[r]},collection:{requires:[S]},console:{requires:["yui-log",Q,l],skinnable:true,plugins:{"console-filters":{requires:[f],skinnable:true}}},cookie:{requires:[r]},dataschema:{submodules:{"dataschema-base":{requires:[m]},"dataschema-array":{requires:[E]},"dataschema-json":{requires:[E,"json"]},"dataschema-text":{requires:[E]},"dataschema-xml":{requires:[E]}}},datasource:{submodules:{"datasource-local":{requires:[m]},"datasource-arrayschema":{requires:[p,f,"dataschema-array"]},"datasource-cache":{requires:[p,"cache"]},"datasource-function":{requires:[p]},"datasource-jsonschema":{requires:[p,f,"dataschema-json"]},"datasource-polling":{requires:[p]},"datasource-get":{requires:[p,Y]},"datasource-textschema":{requires:[p,f,"dataschema-text"]},"datasource-io":{requires:[p,q]},"datasource-xmlschema":{requires:[p,f,"dataschema-xml"]}}},datatype:{submodules:{"datatype-date":{requires:[r]},"datatype-number":{requires:[r]},"datatype-xml":{requires:[r]}}},dd:{submodules:{"dd-ddm-base":{requires:[z,m]},"dd-ddm":{requires:["dd-ddm-base","event-resize"]},"dd-ddm-drop":{requires:["dd-ddm"]},"dd-drag":{requires:["dd-ddm-base"]},"dd-drop":{requires:["dd-ddm-drop"]},"dd-proxy":{requires:[w]},"dd-constrain":{requires:[w]},"dd-scroll":{requires:[w]},"dd-plugin":{requires:[w],optional:["dd-constrain","dd-proxy"]},"dd-drop-plugin":{requires:["dd-drop"]}}},dump:{requires:[r]},event:{expound:U,submodules:{"event-base":{expound:U,requires:[V]},"event-delegate":{requires:[U]},"event-focus":{requires:[U]},"event-key":{requires:[U]},"event-mouseenter":{requires:[U]},"event-mousewheel":{requires:[U]},"event-resize":{requires:[U]}}},"event-custom":{submodules:{"event-custom-base":{requires:[S,"yui-later"]},"event-custom-complex":{requires:[V]}}},"event-simulate":{requires:[X]},"node-focusmanager":{requires:[x,z,f,"node-event-simulate","event-key","event-focus"]},history:{requires:[z]},imageloader:{requires:[B,M,z]},io:{submodules:{"io-base":{requires:[V]},"io-xdr":{requires:[q,"datatype-xml"]},"io-form":{requires:[q,U,J]},"io-upload-iframe":{requires:[q,U]},"io-queue":{requires:[q,"queue-promote"]}}},json:{submodules:{"json-parse":{requires:[r]},"json-stringify":{requires:[r]}}},loader:{requires:[Y]},"node-menunav":{requires:[z,"classnamemanager",f,"node-focusmanager"],skinnable:true},oop:{requires:[r]},overlay:{requires:[Q,H,"widget-position-ext","widget-stack","widget-stdmod"],skinnable:true},plugin:{requires:[B]},pluginhost:{requires:[r]},profiler:{requires:[r]},"queue-promote":{requires:[r]},"queue-run":{requires:[n]},slider:{requires:[Q,"dd-constrain"],skinnable:true},stylesheet:{requires:[r]},substitute:{optional:[G]},widget:{requires:[x,"event-focus",m,z,"classnamemanager"],plugins:{"widget-position":{},"widget-position-ext":{requires:[H]},"widget-stack":{skinnable:true},"widget-stdmod":{}},skinnable:true},yui:{submodules:{"yui-base":{},get:{},"yui-log":{},"yui-later":{}}},test:{requires:[l,z,"json","event-simulate"]}}},o=A.cached(function(L,i,AD){return L+"/"+i+"-min."+(AD||W);}),P=YUI.Env._loaderQueue,D=e.modules,u,c,b,y,O=A.Lang;for(u=0;u<Z.length;u=u+1){c=Z[u];b=W+c;D[b]={type:W,path:o(b,c)};y=b+d;c=c+d;D[y]={type:W,path:o(b,c)};if(b==AC){D[b].requires=[T];D[b].optional=[K];D[y].requires=[T+d];D[y].optional=[K+d];}else{if(b==C){D[b].after=I;D[y].after=I;}}}A.Env.meta=e;AB=s._loaded;A.Loader=function(AF){this.context=A;this.base=A.Env.meta.base;this.comboBase=A.Env.meta.comboBase;this.combine=(!(m in AF));this.root=A.Env.meta.root;this.timeout=0;this.forceMap={};this.filters={};this.required={};this.moduleInfo={};this.skin=A.merge(A.Env.meta.skin);var AE=A.Env.meta.modules,L,AD=YUI.Env.mods;this._internal=true;for(L in AE){if(AE.hasOwnProperty(L)){this.addModule(AE[L],L);}}for(L in AD){if(AD.hasOwnProperty(L)&&!this.moduleInfo[L]&&AD[L].details){this.addModule(AD[L].details,L);}}this._internal=false;this.sorted=[];this.loaded=AB[a];this.dirty=true;this.inserted={};this.skipped={};this._config(AF);};A.Loader.prototype={FILTER_DEFS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(AG){var AD,L,AF,AE;
if(AG){for(AD in AG){if(AG.hasOwnProperty(AD)){AF=AG[AD];if(AD=="require"){this.require(AF);}else{if(AD=="modules"){for(L in AF){if(AF.hasOwnProperty(L)){this.addModule(AF[L],L);}}}else{this[AD]=AF;}}}}}AE=this.filter;if(O.isString(AE)){AE=AE.toUpperCase();this.filterName=AE;this.filter=this.FILTER_DEFS[AE];if(AE=="DEBUG"){this.require("yui-log","dump");}}},formatSkin:function(AD,L){var i=this.SKIN_PREFIX+AD;if(L){i=i+"-"+L;}return i;},_addSkin:function(AJ,AH,AI){var L=this.formatSkin(AJ),AE=this.moduleInfo,i=this.skin,AD=AE[AH]&&AE[AH].ext,AG,AF;if(AH){L=this.formatSkin(AJ,AH);if(!AE[L]){AG=AE[AH];AF=AG.pkg||AH;this.addModule({"name":L,"type":"css","after":i.after,"path":(AI||AF)+"/"+i.base+AJ+"/"+AH+".css","ext":AD});}}return L;},addModule:function(AE,AD){AD=AD||AE.name;AE.name=AD;if(!AE||!AE.name){return false;}if(!AE.type){AE.type=AA;}if(!AE.path&&!AE.fullpath){AE.path=o(AD,AD,AE.type);}AE.ext=("ext" in AE)?AE.ext:(this._internal)?false:true;AE.requires=AE.requires||[];this.moduleInfo[AD]=AE;var AH=AE.submodules,AI,AF,AJ,AL,AK,AG,L;if(AH){AJ=[];AF=0;for(AI in AH){if(AH.hasOwnProperty(AI)){AL=AH[AI];AL.path=o(AD,AI,AE.type);this.addModule(AL,AI);AJ.push(AI);if(AE.skinnable){AK=this._addSkin(this.skin.defaultSkin,AI,AD);AJ.push(AK.name);}AF++;}}AE.supersedes=AJ;AE.rollup=(AF<4)?AF:Math.min(AF-1,4);}AG=AE.plugins;if(AG){for(AI in AG){if(AG.hasOwnProperty(AI)){L=AG[AI];L.path=o(AD,AI,AE.type);L.requires=L.requires||[];this.addModule(L,AI);if(AE.skinnable){this._addSkin(this.skin.defaultSkin,AI,AD);}}}}this.dirty=true;return AE;},require:function(i){var L=(typeof i==="string")?arguments:i;this.dirty=true;A.mix(this.required,A.Array.hash(L));},getRequires:function(AJ){if(!AJ){return[];}if(!this.dirty&&AJ.expanded){return AJ.expanded;}var AH,AI=[],L=AJ.requires,AD=AJ.optional,AE=this.moduleInfo,AF,AG,AK;for(AH=0;AH<L.length;AH=AH+1){AI.push(L[AH]);AF=this.getModule(L[AH]);AK=this.getRequires(AF);for(AG=0;AG<AK.length;AG=AG+1){AI.push(AK[AG]);}}L=AJ.supersedes;if(L){for(AH=0;AH<L.length;AH=AH+1){AI.push(L[AH]);AF=this.getModule(L[AH]);AK=this.getRequires(AF);for(AG=0;AG<AK.length;AG=AG+1){AI.push(AK[AG]);}}}if(AD&&this.loadOptional){for(AH=0;AH<AD.length;AH=AH+1){AI.push(AD[AH]);AK=this.getRequires(AE[AD[AH]]);for(AG=0;AG<AK.length;AG=AG+1){AI.push(AK[AG]);}}}AJ.expanded=A.Object.keys(A.Array.hash(AI));return AJ.expanded;},getProvides:function(i){var L=this.getModule(i),AE,AD;if(!L){return v;}if(L&&!L.provides){AE={};AD=L.supersedes;if(AD){A.Array.each(AD,function(AF){A.mix(AE,this.getProvides(AF));},this);}AE[i]=true;L.provides=AE;}return L.provides;},calculate:function(i,L){this.loadType=L;if(i||L||this.dirty){this._config(i);this._setup();this._explode();if(this.allowRollup&&!this.combine){this._rollup();}this._reduce();this._sort();this.dirty=false;}},_setup:function(){var AI=this.moduleInfo,AG,AH,AF,AD,AJ,AE,L;for(AG in AI){if(AI.hasOwnProperty(AG)){AD=AI[AG];if(AD&&AD.skinnable){AJ=this.skin.overrides;if(AJ&&AJ[AG]){for(AH=0;AH<AJ[AG].length;AH=AH+1){L=this._addSkin(AJ[AG][AH],AG);}}else{L=this._addSkin(this.skin.defaultSkin,AG);}AD.requires.push(L);}}}AE=A.merge(this.inserted);if(!this.ignoreRegistered){A.mix(AE,s.mods);}if(this.ignore){A.mix(AE,A.Array.hash(this.ignore));}for(AF in AE){if(AE.hasOwnProperty(AF)){A.mix(AE,this.getProvides(AF));}}if(this.force){for(AH=0;AH<this.force.length;AH=AH+1){if(this.force[AH] in AE){delete AE[this.force[AH]];}}}A.mix(this.loaded,AE);},_explode:function(){var AD=this.required,L,i;A.Object.each(AD,function(AE,AF){L=this.getModule(AF);var AG=L&&L.expound;if(L){if(AG){AD[AG]=this.getModule(AG);i=this.getRequires(AD[AG]);A.mix(AD,A.Array.hash(i));}i=this.getRequires(L);A.mix(AD,A.Array.hash(i));}},this);},getModule:function(i){var L=this.moduleInfo[i];return L;},_rollup:function(){var AI,AH,AG,AL,AK={},L=this.required,AE,AF=this.moduleInfo,AD,AJ;if(this.dirty||!this.rollups){for(AI in AF){if(AF.hasOwnProperty(AI)){AG=this.getModule(AI);if(AG&&AG.rollup){AK[AI]=AG;}}}this.rollups=AK;this.forceMap=(this.force)?A.Array.hash(this.force):{};}for(;;){AD=false;for(AI in AK){if(AK.hasOwnProperty(AI)){if(!L[AI]&&((!this.loaded[AI])||this.forceMap[AI])){AG=this.getModule(AI);AL=AG.supersedes||[];AE=false;if(!AG.rollup){continue;}AJ=0;for(AH=0;AH<AL.length;AH=AH+1){if(this.loaded[AL[AH]]&&!this.forceMap[AL[AH]]){AE=false;break;}else{if(L[AL[AH]]){AJ++;AE=(AJ>=AG.rollup);if(AE){break;}}}}if(AE){L[AI]=true;AD=true;this.getRequires(AG);}}}}if(!AD){break;}}},_reduce:function(){var AE,AD,AG,L,AH=this.required,AF=this.loadType;for(AE in AH){if(AH.hasOwnProperty(AE)){L=this.getModule(AE);if((this.loaded[AE]&&(!this.forceMap[AE])&&!this.ignoreRegistered)||(AF&&L&&L.type!=AF)){delete AH[AE];}else{AG=L&&L.supersedes;if(AG){for(AD=0;AD<AG.length;AD=AD+1){if(AG[AD] in AH){delete AH[AG[AD]];}}}}}}},_attach:function(){if(this.attaching){A._attach(this.attaching);}else{A._attach(this.sorted);}},_finish:function(){P.running=false;this._continue();},_onSuccess:function(){this._attach();var L=this.skipped,AD,AE;for(AD in L){if(L.hasOwnProperty(AD)){delete this.inserted[AD];}}this.skipped={};AE=this.onSuccess;if(AE){AE.call(this.context,{msg:"success",data:this.data,success:true});}this._finish();},_onFailure:function(i){this._attach();var L=this.onFailure;if(L){L.call(this.context,{msg:"failure: "+i.msg,data:this.data,success:false});}this._finish();},_onTimeout:function(){this._attach();var L=this.onTimeout;if(L){L.call(this.context,{msg:"timeout",data:this.data,success:false});}this._finish();},_sort:function(){var AN=A.Object.keys(this.required),AD=this.moduleInfo,AI=this.loaded,AH={},L=0,AE,AL,AK,AG,AF,AJ,i,AM=A.cached(function(AU,AS){var AP=AD[AU],AQ,AT,AV,AO=AD[AS],AR;if(AI[AS]||!AP||!AO){return false;}AT=AP.expanded;AV=AP.after;if(AT&&A.Array.indexOf(AT,AS)>-1){return true;}if(AV&&A.Array.indexOf(AV,AS)>-1){return true;}AR=AD[AS]&&AD[AS].supersedes;if(AR){for(AQ=0;AQ<AR.length;AQ=AQ+1){if(AM(AU,AR[AQ])){return true;}}}if(AP.ext&&AP.type==W&&!AO.ext&&AO.type==W){return true;
}return false;});for(;;){AE=AN.length;AJ=false;for(AG=L;AG<AE;AG=AG+1){AL=AN[AG];for(AF=AG+1;AF<AE;AF=AF+1){i=AL+AN[AF];if(!AH[i]&&AM(AL,AN[AF])){AK=AN.splice(AF,1);AN.splice(AG,0,AK[0]);AH[i]=true;AJ=true;break;}}if(AJ){break;}else{L=L+1;}}if(!AJ){break;}}this.sorted=AN;},_insert:function(AD,AE,i){if(AD){this._config(AD);}this.calculate(AE);if(!i){var L=this;this._internalCallback=function(){var AF=L.onCSS;if(AF){AF.call(L.context,A);}L._internalCallback=null;L._insert(null,null,AA);};this._insert(null,null,W);return;}this._loading=true;this._combineComplete={};this.loadNext();},_continue:function(){if(!(P.running)&&P.size()>0){P.running=true;P.next()();}},insert:function(AD,i){var L=this,AE=A.merge(this,true);delete AE.require;delete AE.dirty;P.add(function(){L._insert(AE,AD,i);});this._continue();},loadNext:function(AI){if(!this._loading){return;}var AO,AG,AF,AE,L,AN=this,AJ=this.loadType,AK,AD,AH,AL=function(AR){this._combineComplete[AJ]=true;var AS=this._combining,AP=AS.length,AQ;for(AQ=0;AQ<AP;AQ=AQ+1){this.inserted[AS[AQ]]=true;}this.loadNext(AR.data);},AM=function(i){AN.loadNext(i.data);};if(this.combine&&(!this._combineComplete[AJ])){this._combining=[];AO=this.sorted;AG=AO.length;L=this.comboBase;for(AF=0;AF<AG;AF=AF+1){AE=this.getModule(AO[AF]);if(AE&&AE.type===AJ&&!AE.ext){L+=this.root+AE.path;if(AF<AG-1){L+="&";}this._combining.push(AO[AF]);}}if(this._combining.length){if(AJ===W){AK=A.Get.css;AH=this.cssAttributes;}else{AK=A.Get.script;AH=this.jsAttributes;}AK(this._filter(L),{data:this._loading,onSuccess:AL,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,attributes:AH,timeout:this.timeout,autopurge:false,context:AN});return;}else{this._combineComplete[AJ]=true;}}if(AI){if(AI!==this._loading){return;}this.inserted[AI]=true;this.loaded[AI]=true;if(this.onProgress){this.onProgress.call(this.context,{name:AI,data:this.data});}}AO=this.sorted;AG=AO.length;for(AF=0;AF<AG;AF=AF+1){if(AO[AF] in this.inserted){continue;}if(AO[AF]===this._loading){return;}AE=this.getModule(AO[AF]);if(!AE){AD="Undefined module "+AO[AF]+" skipped";this.inserted[AO[AF]]=true;this.skipped[AO[AF]]=true;continue;}if(!AJ||AJ===AE.type){this._loading=AO[AF];if(AE.type===W){AK=A.Get.css;AH=this.cssAttributes;}else{AK=A.Get.script;AH=this.jsAttributes;}L=(AE.fullpath)?this._filter(AE.fullpath,AO[AF]):this._url(AE.path,AO[AF]);AK(L,{data:AO[AF],onSuccess:AM,insertBefore:this.insertBefore,charset:this.charset,attributes:AH,onFailure:this._onFailure,onTimeout:this._onTimeout,timeout:this.timeout,autopurge:false,context:AN});return;}}this._loading=null;AK=this._internalCallback;if(AK){this._internalCallback=null;AK.call(this);}else{this._onSuccess();}},_filter:function(AD,i){var AF=this.filter,L=i&&(i in this.filters),AE=L&&this.filters[i];if(AD){if(L){AF=(O.isString(AE))?this.FILTER_DEFS[AE.toUpperCase()]||null:AE;}if(AF){AD=AD.replace(new RegExp(AF.searchExp,"g"),AF.replaceStr);}}return AD;},_url:function(i,L){return this._filter((this.base||"")+i,L);}};})();},"@VERSION@");