loader-min.js revision 918b08f9832633dcbf580984b649169aff501b36
YUI.add("loader",function(A){(function(){var T="base",S="css",P="js",F="cssreset",U="cssfonts",R="cssgrids",C="cssbase",E=[F,U,R,"cssreset-context","cssfonts-context","cssgrids-context"],N=["reset","fonts","grids",T],Z="@VERSION@",B=Z+"/build/",X="-context",G="yui-base",c="dom",e="get",K="event",D="event-custom",f="node",d="oop",W="plugin",a={version:Z,root:B,base:"http://yui.yahooapis.com/"+B,comboBase:"http://yui.yahooapis.com/combo?",skin:{defaultSkin:"sam",base:"assets/skins/",path:"skin.css",after:E},modules:{dom:{requires:[d],submodules:{"dom-base":{requires:[d]},"dom-style":{requires:["dom-base"]},"dom-screen":{requires:["dom-base","dom-style"]},selector:{requires:["dom-base"]},"selector-native":{requires:["dom-base"]}},plugins:{"selector-css3":{requires:["selector"]}}},node:{requires:[c,T],expound:K,submodules:{"node-base":{requires:["dom-base",T,"selector"]},"node-style":{requires:["dom-style","node-base"]},"node-screen":{requires:["dom-screen","node-base"]}},plugins:{"node-event-simulate":{requires:["node-base","event-simulate"]}}},anim:{requires:[T,f],submodules:{"anim-base":{requires:[T,"node-style"]},"anim-color":{requires:["anim-base"]},"anim-curve":{requires:["anim-xy"]},"anim-easing":{requires:[G]},"anim-scroll":{requires:["anim-base"]},"anim-xy":{requires:["anim-base","node-screen"]},"anim-node-plugin":{requires:[f,"anim-base"]}}},attribute:{requires:[D]},base:{requires:["attribute"]},compat:{requires:[f,"dump","substitute"]},classnamemanager:{requires:[G]},collection:{requires:[d]},console:{requires:["widget","substitute"],skinnable:true},cookie:{requires:[G]},dd:{submodules:{"dd-ddm-base":{requires:[f,T]},"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:["dd-drag"]},"dd-constrain":{requires:["dd-drag"]},"dd-scroll":{requires:["dd-drag"]},"dd-plugin":{requires:["dd-drag"],optional:["dd-constrain","dd-proxy"]},"dd-drop-plugin":{requires:["dd-drop"]}}},dump:{requires:[G]},event:{requires:[D,f]},"event-custom":{requires:[d]},"event-simulate":{requires:[K]},"node-focusmanager":{requires:[f,W]},get:{requires:[G]},history:{requires:[f]},io:{submodules:{"io-base":{requires:[D]},"io-xdr":{requires:["io-base"]},"io-form":{requires:["io-base",f]},"io-upload-iframe":{requires:["io-base",f]},"io-queue":{requires:["io-base"]}}},json:{submodules:{"json-parse":{requires:[G]},"json-stringify":{requires:[G]}}},loader:{requires:[e]},"node-menunav":{requires:[f,"classnamemanager",W,"node-focusmanager"],skinnable:true},oop:{requires:[G]},overlay:{requires:["widget","widget-position","widget-position-ext","widget-stack","widget-stdmod"],skinnable:true},plugin:{requires:[T]},profiler:{requires:[G]},queue:{submodules:{"queue-base":{requires:[G]}},plugins:{"queue-io":{requires:["io-base"]}},requires:[D]},slider:{requires:["widget","dd-constrain"],skinnable:true},stylesheet:{requires:[G]},substitute:{optional:["dump"]},widget:{requires:[T,f,"classnamemanager"],plugins:{"widget-position":{},"widget-position-ext":{requires:["widget-position"]},"widget-stack":{skinnable:true},"widget-stdmod":{}},skinnable:true},yui:{supersedes:[G,e,"loader"]},"yui-base":{},test:{requires:["substitute",f,"json"]}}},I=function(L,g,h){return L+"/"+g+"-min."+(h||S);},H=a.modules,Y,Q,J,V,O=A.Lang,M="_provides",b="_supersedes";for(Y=0;Y<N.length;Y=Y+1){Q=N[Y];J=S+Q;H[J]={type:S,path:I(J,Q)};V=J+X;Q=Q+X;H[V]={type:S,path:I(J,Q)};if(J==R){H[J].requires=[U];H[J].optional=[F];H[V].requires=[U+X];H[V].optional=[F+X];}else{if(J==C){H[J].after=E;H[V].after=E;}}}A.Env.meta=a;A.Loader=function(h){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=null;this.onProgress=null;this.onTimeout=null;this.context=A;this.data=null;this.insertBefore=null;this.charset=null;this.base=A.Env.meta.base;this.comboBase=A.Env.meta.comboBase;this.combine=(!(T in h));this.ignoreRegistered=false;this.root=A.Env.meta.root;this.timeout=0;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo={};this.skin=A.merge(A.Env.meta.skin);var g=A.Env.meta.modules,L;for(L in g){if(g.hasOwnProperty(L)){this._internal=true;this.addModule(g[L],L);this._internal=false;}}this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.attaching=null;this.dirty=true;this.inserted={};this.skipped={};this._config(h);};A.Loader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(l){var g,L,k,h;if(l){for(g in l){if(l.hasOwnProperty(g)){k=l[g];if(g=="require"){this.require(k);}else{if(g=="modules"){for(L in k){if(k.hasOwnProperty(L)){this.addModule(k[L],L);}}}else{this[g]=k;}}}}}h=this.filter;if(O.isString(h)){h=h.toUpperCase();this.filterName=h;this.filter=this.FILTERS[h];}},formatSkin:function(h,L){var g=this.SKIN_PREFIX+h;if(L){g=g+"-"+L;}return g;},parseSkin:function(g){if(g.indexOf(this.SKIN_PREFIX)===0){var L=g.split("-");return{skin:L[1],module:L[2]};}return null;},_addSkin:function(n,l,m){var L=this.formatSkin(n),i=this.moduleInfo,g=this.skin,h=i[l]&&i[l].ext,k,j;if(l){L=this.formatSkin(n,l);if(!i[L]){k=i[l];j=k.pkg||l;this.addModule({"name":L,"type":"css","after":g.after,"path":(m||j)+"/"+g.base+n+"/"+l+".css","ext":h});}}return L;},addModule:function(h,g){g=g||h.name;h.name=g;if(!h||!h.name){return false;}if(!h.type){h.type=P;}if(!h.path&&!h.fullpath){h.path=I(g,g,h.type);}h.ext=("ext" in h)?h.ext:(this._internal)?false:true;h.requires=h.requires||[];this.moduleInfo[g]=h;var m=h.submodules,n,j,p,r,q,k,L;if(m){p=[];j=0;for(n in m){if(m.hasOwnProperty(n)){r=m[n];r.path=I(g,n,h.type);this.addModule(r,n);p.push(n);if(h.skinnable){q=this._addSkin(this.skin.defaultSkin,n,g);p.push(q.name);}j++;}}h.supersedes=p;h.rollup=Math.min(j-1,4);}k=h.plugins;if(k){for(n in k){if(k.hasOwnProperty(n)){L=k[n];L.path=I(g,n,h.type);L.requires=L.requires||[];L.requires.push(g);
this.addModule(L,n);if(h.skinnable){this._addSkin(this.skin.defaultSkin,n,g);}}}}this.dirty=true;return h;},require:function(g){var L=(typeof g==="string")?arguments:g;this.dirty=true;A.mix(this.required,A.Array.hash(L));},getRequires:function(q){if(!q){return[];}if(!this.dirty&&q.expanded){return q.expanded;}var n,p=[],L=q.requires,g=q.optional,h=this.moduleInfo,k,l,s;for(n=0;n<L.length;n=n+1){p.push(L[n]);k=this.getModule(L[n]);s=this.getRequires(k);for(l=0;l<s.length;l=l+1){p.push(s[l]);}}L=q.supersedes;if(L){for(n=0;n<L.length;n=n+1){p.push(L[n]);k=this.getModule(L[n]);s=this.getRequires(k);for(l=0;l<s.length;l=l+1){p.push(s[l]);}}}if(g&&this.loadOptional){for(n=0;n<g.length;n=n+1){p.push(g[n]);s=this.getRequires(h[g[n]]);for(l=0;l<s.length;l=l+1){p.push(s[l]);}}}q.expanded=A.Object.keys(A.Array.hash(p));return q.expanded;},getProvides:function(h,p){var g=!(p),L=(g)?M:b,k=this.getModule(h),j={},t,l,q,n,r=function(i){if(!l[i]){l[i]=true;A.mix(j,q.getProvides(i));}};if(!k){return j;}if(k[L]){return k[L];}t=k.supersedes;l={};q=this;if(t){for(n=0;n<t.length;n=n+1){r(t[n]);}}k[b]=j;k[M]=A.merge(j);k[M][h]=true;return k[L];},calculate:function(L){if(L||this.dirty){this._config(L);this._setup();this._explode();if(this.allowRollup){this._rollup();}this._reduce();this._sort();this.dirty=false;}},_setup:function(){var q=this.moduleInfo,n,p,k,g,r,h,L;for(n in q){if(q.hasOwnProperty(n)){g=q[n];if(g&&g.skinnable){r=this.skin.overrides;if(r&&r[n]){for(p=0;p<r[n].length;p=p+1){L=this._addSkin(r[n][p],n);}}else{L=this._addSkin(this.skin.defaultSkin,n);}g.requires.push(L);}}}h=A.merge(this.inserted);if(!this.ignoreRegistered){A.mix(h,YUI.Env.mods);}if(this.ignore){A.mix(h,A.Array.hash(this.ignore));}for(k in h){if(h.hasOwnProperty(k)){A.mix(h,this.getProvides(k));}}if(this.force){for(p=0;p<this.force.length;p=p+1){if(this.force[p] in h){delete h[this.force[p]];}}}this.loaded=h;},_explode:function(){var k=this.required,g,L,j,h=this,l=function(i){L=h.getModule(i);var m=L&&L.expound;if(L){if(m){k[m]=h.getModule(m);j=h.getRequires(k[m]);A.mix(k,A.Array.hash(j));}j=h.getRequires(L);A.mix(k,A.Array.hash(j));}};for(g in k){if(k.hasOwnProperty(g)){l(g);}}},getModule:function(g){var L=this.moduleInfo[g];return L;},_rollup:function(){var o,n,l,t,q={},L=this.required,h,k=this.moduleInfo,g,p;if(this.dirty||!this.rollups){for(o in k){if(k.hasOwnProperty(o)){l=this.getModule(o);if(l&&l.rollup){q[o]=l;}}}this.rollups=q;}for(;;){g=false;for(o in q){if(q.hasOwnProperty(o)){if(!L[o]&&!this.loaded[o]){l=this.getModule(o);t=l.supersedes||[];h=false;if(!l.rollup){continue;}p=0;for(n=0;n<t.length;n=n+1){if(this.loaded[t[n]]){h=false;break;}else{if(L[t[n]]){p++;h=(p>=l.rollup);if(h){break;}}}}if(h){L[o]=true;g=true;this.getRequires(l);}}}}if(!g){break;}}},_reduce:function(){var h,g,k,L,l=this.required;for(h in l){if(l.hasOwnProperty(h)){if(h in this.loaded){delete l[h];}else{L=this.getModule(h);k=L&&L.supersedes;if(k){for(g=0;g<k.length;g=g+1){if(k[g] in l){delete l[k[g]];}}}}}}},_attach:function(){if(this.attaching){A._attach(this.attaching);}else{A._attach(this.sorted);}},_onSuccess:function(){this._attach();var L=this.skipped,g,h;for(g in L){if(L.hasOwnProperty(g)){delete this.inserted[g];}}this.skipped={};h=this.onSuccess;if(h){h.call(this.context,{msg:"success",data:this.data,success:true});}},_onFailure:function(g){this._attach();var L=this.onFailure;if(L){L.call(this.context,{msg:"failure: "+g,data:this.data,success:false});}},_onTimeout:function(){this._attach();var L=this.onTimeout;if(L){L.call(this.context,{msg:"timeout",data:this.data,success:false});}},_sort:function(){var u=A.Object.keys(this.required),g=this.moduleInfo,n=this.loaded,L,h,r,q,m,i,o,t=function(s,x){var w=g[s],p,k,v,j,l;if(n[x]||!w){return false;}k=w.expanded;v=w.after;j=g[x];if(k&&A.Array.indexOf(k,x)>-1){return true;}if(v&&A.Array.indexOf(v,x)>-1){return true;}l=g[x]&&g[x].supersedes;if(l){for(p=0;p<l.length;p=p+1){if(t(s,l[p])){return true;}}}if(w.ext&&w.type==S&&!j.ext&&j.type==S){return true;}return false;};L=0;for(;;){h=u.length;o=false;for(m=L;m<h;m=m+1){r=u[m];for(i=m+1;i<h;i=i+1){if(t(r,u[i])){q=u.splice(i,1);u.splice(m,0,q[0]);o=true;break;}}if(o){break;}else{L=L+1;}}if(!o){break;}}this.sorted=u;},insert:function(h,g){this.calculate(h);if(!g){var L=this;this._internalCallback=function(){L._internalCallback=null;L.insert(null,P);};this.insert(null,S);return;}this._loading=true;this._combineComplete={};this.loadType=g;this.loadNext();},loadNext:function(l){if(!this._loading){return;}var t,k,j,h,L,r=this,n=this.loadType,o,g,p=function(u){this._combineComplete[n]=true;var v=this._combining,m=v.length,s;for(s=0;s<m;s=s+1){this.inserted[v[s]]=true;}this.loadNext(u.data);},q=function(i){r.loadNext(i.data);};if(this.combine&&(!this._combineComplete[n])){this._combining=[];t=this.sorted;k=t.length;L=this.comboBase;for(j=0;j<k;j=j+1){h=this.getModule(t[j]);if(h&&h.type===this.loadType&&!h.ext){L+=this.root+h.path;if(j<k-1){L+="&";}this._combining.push(t[j]);}}if(this._combining.length){o=(n===S)?A.Get.css:A.Get.script;o(this._filter(L),{data:this._loading,onSuccess:p,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,context:r});return;}else{this._combineComplete[n]=true;}}if(l){if(l!==this._loading){return;}this.inserted[l]=true;if(this.onProgress){this.onProgress.call(this.context,{name:l,data:this.data});}}t=this.sorted;k=t.length;for(j=0;j<k;j=j+1){if(t[j] in this.inserted){continue;}if(t[j]===this._loading){return;}h=this.getModule(t[j]);if(!h){g="Undefined module "+t[j]+" skipped";this.inserted[t[j]]=true;this.skipped[t[j]]=true;continue;}if(!n||n===h.type){this._loading=t[j];o=(h.type===S)?A.Get.css:A.Get.script;L=(h.fullpath)?this._filter(h.fullpath,t[j]):this._url(h.path,t[j]);o(L,{data:t[j],onSuccess:q,insertBefore:this.insertBefore,charset:this.charset,onFailure:this._onFailure,onTimeout:this._onTimeout,timeout:this.timeout,context:r});return;}}this._loading=null;
o=this._internalCallback;if(o){this._internalCallback=null;o.call(this);}else{this._onSuccess();}},_filter:function(i,h){var j=this.filter,g=true,L,k;if(i&&j){if(h&&this.filterName=="DEBUG"){L=this.logExclude;k=this.logInclude;if(k&&!(h in k)){g=false;}else{if(L&&(h in L)){g=false;}}}if(g){i=i.replace(new RegExp(j.searchExp,"g"),j.replaceStr);}}return i;},_url:function(g,L){return this._filter((this.base||"")+g,L);}};})();},"@VERSION@");