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