YUI.add("cache-offline",function(e,t){function r(){r.superclass.constructor.apply(this,arguments)}var s=null,a=e.JSON;try{s=e.config.win.localStorage}catch(i){}e.mix(r,{NAME:"cacheOffline",ATTRS:{sandbox:{value:"default",writeOnce:"initOnly"},expires:{value:864e5},max:{value:null,readOnly:!0},uniqueKeys:{value:!0,readOnly:!0,setter:function(){return!0}}},flushAll:function(){var e,t=s;if(t)if(t.clear)t.clear();else for(e in t)t.hasOwnProperty(e)&&(t.removeItem(e),delete t[e])}}),e.extend(r,e.Cache,s?{_setMax:function(e){return null},_getSize:function(){for(var e=0,t=0,r=s.length;t<r;++t)0===s.key(t).indexOf(this.get("sandbox"))&&e++;return e},_getEntries:function(){for(var e=[],t=0,r=s.length,n=this.get("sandbox");t<r;++t)0===s.key(t).indexOf(n)&&(e[t]=a.parse(s.key(t).substring(n.length)));return e},_defAddFn:function(e){var e=e.entry,t=e.request,r=e.cached,n=e.expires;e.cached=r.getTime(),e.expires=n&&n.getTime();try{s.setItem(this.get("sandbox")+a.stringify({request:t}),a.stringify(e))}catch(i){this.fire("error",{error:i})}},_defFlushFn:function(e){for(var t,r=s.length-1;-1<r;--r)0===(t=s.key(r)).indexOf(this.get("sandbox"))&&s.removeItem(t)},retrieve:function(e){var t,r;this.fire("request",{request:e});try{r=this.get("sandbox")+a.stringify({request:e});try{t=a.parse(s.getItem(r))}catch(i){}}catch(n){}return t&&(t.cached=new Date(t.cached),r=(r=t.expires)?new Date(r):null,t.expires=r,this._isMatch(e,t))?(this.fire("retrieve",{entry:t}),t):null}}:{_setMax:function(e){return null}}),e.CacheOffline=r},"patched-v3.18.3",{requires:["cache-base","json"]});