Registry.require("helper",function(){var k=Registry.get("helper"),h={items:{},remove:function(g){delete h.items[g]},create:function(g){var d={},f={retimeout_on_get:!1,timeout:300,check_interval:120},e,c={init:function(){e||c.schedule()},schedule:function(){c.unschedule();e=window.setInterval(c.clean,1E3*f.check_interval)},unschedule:function(){e&&window.clearInterval(e);e=null},setOptions:function(a){for(var b in a)a.hasOwnProperty(b)&&(f[b]=a[b],"check_interval"==b&&e&&c.schedule());return c},set:function(a,
b){d[a]={value:b,ts:(new Date).getTime()}},setj:function(a,b){return c.set(a,b?JSON.stringify(b):b)},get:function(a,b){var c=b;d[a]&&(f.retimeout_on_get&&(d[a].ts=(new Date).getTime()),c=d[a].value);return c},getj:function(){var a=c.get.apply(this,arguments);return a?JSON.parse(a):a},remove:function(a){delete d[a]},clean:function(){var a=(new Date).getTime()-1E3*f.timeout;k.each(d,function(b,d){b.ts<a&&window.setTimeout(function(){c.remove(d)},1)})},removeAll:function(){d={}},finalize:function(){c.unschedule();
d={}}};return h.items[g]=c}};Registry.register("cache","58",h)});
