/* Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html version: 3.3.0 build: 3167 */ YUI.add('loader-base',function(Y){if(!YUI.Env[Y.version]){(function(){var VERSION=Y.version,BUILD='/build/',ROOT=VERSION+BUILD,CDN_BASE=Y.Env.base,GALLERY_VERSION='gallery-2010.12.16-18-24',TNT='2in3',TNT_VERSION='4',YUI2_VERSION='2.8.2',COMBO_BASE=CDN_BASE+'combo?',META={version:VERSION,root:ROOT,base:Y.Env.base,comboBase:COMBO_BASE,skin:{defaultSkin:'sam',base:'assets/skins/',path:'skin.css',after:['cssreset','cssfonts','cssgrids','cssbase','cssreset-context','cssfonts-context']},groups:{},patterns:{}},groups=META.groups,yui2Update=function(tnt,yui2){var root=TNT+'.'+ (tnt||TNT_VERSION)+'/'+ (yui2||YUI2_VERSION)+BUILD;groups.yui2.base=CDN_BASE+root;groups.yui2.root=root;},galleryUpdate=function(tag){var root=(tag||GALLERY_VERSION)+BUILD;groups.gallery.base=CDN_BASE+root;groups.gallery.root=root;};groups[VERSION]={};groups.gallery={ext:false,combine:true,comboBase:COMBO_BASE,update:galleryUpdate,patterns:{'gallery-':{},'gallerycss-':{type:'css'}}};groups.yui2={combine:true,ext:false,comboBase:COMBO_BASE,update:yui2Update,patterns:{'yui2-':{configFn:function(me){if(/-skin|reset|fonts|grids|base/.test(me.name)){me.type='css';me.path=me.path.replace(/\.js/,'.css');me.path=me.path.replace(/\/yui2-skin/,'/assets/skins/sam/yui2-skin');}}}}};galleryUpdate();yui2Update();YUI.Env[VERSION]=META;}());} var NOT_FOUND={},NO_REQUIREMENTS=[],MAX_URL_LENGTH=(Y.UA.ie)?2048:8192,GLOBAL_ENV=YUI.Env,GLOBAL_LOADED=GLOBAL_ENV._loaded,CSS='css',JS='js',INTL='intl',VERSION=Y.version,ROOT_LANG='',YObject=Y.Object,oeach=YObject.each,YArray=Y.Array,_queue=GLOBAL_ENV._loaderQueue,META=GLOBAL_ENV[VERSION],SKIN_PREFIX='skin-',L=Y.Lang,ON_PAGE=GLOBAL_ENV.mods,modulekey,cache,_path=function(dir,file,type,nomin){var path=dir+'/'+file;if(!nomin){path+='-min';} path+='.'+(type||CSS);return path;};Y.Env.meta=META;Y.Loader=function(o){var defaults=META.modules,self=this;modulekey=META.md5;self.context=Y;self.base=Y.Env.meta.base;self.comboBase=Y.Env.meta.comboBase;self.combine=o.base&&(o.base.indexOf(self.comboBase.substr(0,20))>-1);self.maxURLLength=MAX_URL_LENGTH;self.root=Y.Env.meta.root;self.timeout=0;self.forceMap={};self.allowRollup=true;self.filters={};self.required={};self.patterns={};self.moduleInfo={};self.groups=Y.merge(Y.Env.meta.groups);self.skin=Y.merge(Y.Env.meta.skin);self.conditions={};self.config=o;self._internal=true;cache=GLOBAL_ENV._renderedMods;if(cache){oeach(cache,function(v,k){self.moduleInfo[k]=Y.merge(v);});cache=GLOBAL_ENV._conditions;oeach(cache,function(v,k){self.conditions[k]=Y.merge(v);});}else{oeach(defaults,self.addModule,self);} if(!GLOBAL_ENV._renderedMods){GLOBAL_ENV._renderedMods=Y.merge(self.moduleInfo);GLOBAL_ENV._conditions=Y.merge(self.conditions);} self._inspectPage();self._internal=false;self._config(o);self.sorted=[];self.loaded=GLOBAL_LOADED[VERSION];self.dirty=true;self.inserted={};self.skipped={};self.tested={};};Y.Loader.prototype={FILTER_DEFS:{RAW:{'searchExp':'-min\\.js','replaceStr':'.js'},DEBUG:{'searchExp':'-min\\.js','replaceStr':'-debug.js'}},_inspectPage:function(){oeach(ON_PAGE,function(v,k){if(v.details){var m=this.moduleInfo[k],req=v.details.requires,mr=m&&m.requires;if(m){if(!m._inspected&&req&&mr.length!=req.length){delete m.expanded;}}else{m=this.addModule(v.details,k);} m._inspected=true;}},this);},_requires:function(mod1,mod2){var i,rm,after_map,s,info=this.moduleInfo,m=info[mod1],other=info[mod2];if(!m||!other){return false;} rm=m.expanded_map;after_map=m.after_map;if(after_map&&(mod2 in after_map)){return true;} after_map=other.after_map;if(after_map&&(mod1 in after_map)){return false;} s=info[mod2]&&info[mod2].supersedes;if(s){for(i=0;i-1){found=p;break;}}} if(found){if(p.action){p.action.call(this,mname,pname);}else{m=this.addModule(Y.merge(found),mname);m.temp=true;}}} return m;},_rollup:function(){},_reduce:function(r){r=r||this.required;var i,j,s,m,type=this.loadType;for(i in r){if(r.hasOwnProperty(i)){m=this.getModule(i);if(((this.loaded[i]||ON_PAGE[i])&&!this.forceMap[i]&&!this.ignoreRegistered)||(type&&m&&m.type!=type)){delete r[i];} s=m&&m.supersedes;if(s){for(j=0;j0){_queue.running=true;_queue.next()();}},insert:function(o,type,skipsort){var self=this,copy=Y.merge(this);delete copy.require;delete copy.dirty;_queue.add(function(){self._insert(copy,o,type,skipsort);});this._continue();},loadNext:function(mname){if(!this._loading){return;} var s,len,i,m,url,fn,msg,attr,group,groupName,j,frag,comboSource,comboSources,mods,combining,urls,comboBase,self=this,type=self.loadType,handleSuccess=function(o){self.loadNext(o.data);},handleCombo=function(o){self._combineComplete[type]=true;var i,len=combining.length;for(i=0;iself.maxURLLength)){urls.push(self._filter(url));url=j;} url+=frag;if(i<(len-1)){url+='&';} combining.push(m.name);}} if(combining.length&&(url!=j)){urls.push(self._filter(url));}}} if(combining.length){if(type===CSS){fn=Y.Get.css;attr=self.cssAttributes;}else{fn=Y.Get.script;attr=self.jsAttributes;} fn(urls,{data:self._loading,onSuccess:handleCombo,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,attributes:attr,timeout:self.timeout,autopurge:false,context:self});return;}else{self._combineComplete[type]=true;}} if(mname){if(mname!==self._loading){return;} self.inserted[mname]=true;if(self.onProgress){self.onProgress.call(self.context,{name:mname,data:self.data});}} s=self.sorted;len=s.length;for(i=0;i