define("udx.storage",["udx.utility"],function(){function a(){return console.debug("udx.storage","created"),"object"==typeof window.localStorage&&"function"==typeof window.localStorage.getItem?(console.debug("udx.storage","Browser supports native localStorage."),window.localStorage):(Object.defineProperties(this,{store:{value:{},enumerable:!1,configurable:!0,writable:!0}}),this)}return console.debug("udx.storage","loaded"),Object.defineProperties(a.prototype,{set:{value:function(a,b,c,d,e,f){if(!a||/^(?:expires|max\-age|path|domain|secure)$/i.test(a))return!1;var g="";if(c)switch(c.constructor){case Number:g=1/0===c?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+c;break;case String:g="; expires="+c;break;case Date:g="; expires="+c.toUTCString()}return document.cookie=encodeURIComponent(a)+"="+encodeURIComponent(b)+g+(e?"; domain="+e:"")+(d?"; path="+d:"")+(f?"; secure":""),!0},enumerable:!0,configurable:!0,writable:!0},get:{value:function(a){return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(a).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},enumerable:!0,configurable:!0,writable:!0},remove:{value:function(a,b,c){return a&&this.has(a)?(document.cookie=encodeURIComponent(a)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(c?"; domain="+c:"")+(b?"; path="+b:""),!0):!1},enumerable:!0,configurable:!0,writable:!0},has:{value:function(a){return new RegExp("(?:^|;\\s*)"+encodeURIComponent(a).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},enumerable:!0,configurable:!0,writable:!0},keys:{value:function(){for(var a=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),b=0;b<a.length;b++)a[b]=decodeURIComponent(a[b]);return a},enumerable:!0,configurable:!0,writable:!0},data:{value:function b(){for(var b={},a=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),c=0;c<a.length;c++){var d=decodeURIComponent(a[c]);b[d]=this.get(d)}return b},enumerable:!0,configurable:!0,writable:!0},getItem:{value:function(a){return this.get(a)},enumerable:!0,configurable:!0,writable:!0},setItem:{value:function(a,b){return this.get(a,b)},enumerable:!0,configurable:!0,writable:!0}}),Object.defineProperties(a,{create:{value:function(b,c){return new a(b,c)},enumerable:!0,configurable:!0,writable:!0},version:{value:"1.0.1",enumerable:!1,writable:!1}}),a});