/* jQuery Storage API Plugin 1.7.3 https://github.com/julien-maurel/jQuery-Storage-API */!function(e){"function"==typeofdefine&&define.amd?define(["jquery"],e):e("object"==typeofexports?require("jquery"):jQuery)}(function(e){functiont(t){varr,i,n,o=arguments.length,s=window[t],a=arguments,u=a[1];if(2>o)throwError("Minimum 2 arguments must be given");if(e.isArray(u)){i={};for(varfinu){r=u[f];try{i[r]=JSON.parse(s.getItem(r))}catch(c){i[r]=s.getItem(r)}}returni}if(2!=o){try{i=JSON.parse(s.getItem(u))}catch(c){thrownewReferenceError(u+" is not defined in this storage")}for(varf=2;o-1>f;f++)if(i=i[a[f]],void0===i)thrownewReferenceError([].slice.call(a,1,f+1).join(".")+" is not defined in this storage");if(e.isArray(a[f])){n=i,i={};for(varmina[f])i[a[f][m]]=n[a[f][m]];returni}returni[a[f]]}try{returnJSON.parse(s.getItem(u))}catch(c){returns.getItem(u)}}functionr(t){varr,i,n=arguments.length,o=window[t],s=arguments,a=s[1],u=s[2],f={};if(2>n||!e.isPlainObject(a)&&3>n)throwError("Minimum 3 arguments must be given or second parameter must be an object");if(e.isPlainObject(a)){for(varcina)r=a[c],e.isPlainObject(r)?o.setItem(c,JSON.stringify(r)):o.setItem(c,r);returna}if(3==n)return"object"==typeofu?o.setItem(a,JSON.stringify(u)):o.setItem(a,u),u;try{i=o.getItem(a),null!=i&&(f=JSON.parse(i))}catch(m){}i=f;for(varc=2;n-2>c;c++)r=s[c],i[r]&&e.isPlainObject(i[r])||(i[r]={}),i=i[r];returni[s[c]]=s[c+1],o.setItem(a,JSON.stringify(f)),f}functioni(t){varr,i,n=arguments.length,o=window[t],s=arguments,a=s[1];if(2>n)throwError("Minimum 2 arguments must be given");if(e.isArray(a)){for(varuina)o.removeItem(a[u]);return!0}if(2==n)returno.removeItem(a),!0;try{r=i=JSON.parse(o.getItem(a))}catch(f){thrownewReferenceError(a+" is not defined in this storage")}for(varu=2;n-1>u;u++)if(i=i[s[u]],void0===i)thrownewReferenceError([].slice.call(s,1,u).join(".")+" is not defined in this storage");if(e.isArray(s[u]))for(varcins[u])deletei[s[u][c]];elsedeletei[s[u]];returno.setItem(a,JSON.stringify(r)),!0}functionn(t,r){varn=a(t);for(varoinn)i(t,n[o]);if(r)for(varoine.namespaceStorages)u(o)}functiono(r){vari=arguments.length,n=arguments,s=(window[r],n[1]);if(1==i)return0==a(r).length;if(e.isArray(s)){for(varu=0;u<s.length;u++)if(!o(r,s[u]))return!1;return!0}try{varf=t.apply(this,arguments);e.isArray(n[i-1])||(f={totest:f});for(varuinf)if(!(e.isPlainObject(f[u])&&e.isEmptyObject(f[u])||e.isArray(f[u])&&!f[u].length)&&f[u])return!1;return!0}catch(c){return!0}}functions(r){vari=arguments.length,n=arguments,o=(window[r],n[1]);if(2>i)throwError("Minimum 2 arguments must be given");if(e.isArray(o)){for(vara=0;a<o.length;a++)if(!s(r,o[a]))return!1;return!0}try{varu=t.apply(this,arguments);e.isArray(n[i-1])||(u={totest:u});for(varainu)if(void0===u[a]||null===u[a])return!1;return!0}catch(f){return!1}}functiona(r){vari=arguments.length,n=window[r],o=arguments,s=(o[1],[]),a={};if(a=i>1?t.apply(this,o):n,a._cookie)for(varuine.cookie())""!=u&&s.push(u.replace(a._prefix,""));elsefor(varfina)s.push(f);returns}functionu(t){if(!t||"string"!=typeoft)throwError("First parameter must be a string");g?(window.localStorage.getItem(t)||window.localStorage.setItem(t,"{}"),window.sessionStorage.getItem(t)||window.sessionStorage.setItem(t,"{}")):(window.localCookieStorage.getItem(t)||window.localCookieStorage.setItem(t,"{}"),window.sessionCookieStorage.getItem(t)||window.sessionCookieStorage.setItem(t,"{}"));varr={localStorage:e.extend({},e.localStorage,{_ns:t}),sessionStorage:e.extend({},e.sessionStorage,{_ns:t})};returne.cookie&&(window.cookieStorage.getItem(t)||window.cookieStorage.setItem(t,"{}"),r.cookieStorage=e.extend({},e.cookieStorage,{_ns:t})),e.namespaceStorages[t]=r,r}functionf(e){if(!window[e])return!1;vart="jsapi";try{returnwindow[e].setItem(t,t),window[e].removeItem(t),!0}catch(r){return!1}}varc="ls_",m="ss_",g=f("localStorage"),h={_type:"",_ns:"",_callMethod:function(e,t){varr=[this._type],t=Array.prototype.slice.call(t),i=t[0];returnthis._ns&&r.push(this._ns),"string"==typeofi&&-1!==i.indexOf(".")&&(t.shift(),[].unshift.apply(t,i.split("."))),[].push.apply(r,t),e.apply(this,r)},get:function(){returnthis._callMethod(t,arguments)},set:function(){vart=arguments.length,i=arguments,n=i[0];if(1>t||!e.isPlainObject(n)&&2>t)throwError("Minimum 2 arguments must be given or first parameter must be an object");if(e.isPlainObject(n)&&this._ns){for(varoinn)r(this._type,this._ns,o,n[o]);returnn}vars=this._callMethod(r,i);returnthis._ns?s[n.split(".")[0]]:s},remove:function(){if(arguments.length<1)throwError("Minimum 1 argument must be given");returnthis._callMethod(i,arguments)},removeAll:function(e){returnthis._ns?(r(this._type,this._ns,{}),!0):n(this._type,e)},isEmpty:function(){returnthis._callMethod(o,arguments)},isSet:function(){if(arguments.length<1)throwError("Minimum 1 argument must be given");returnthis._callMethod(s,arguments)},keys:function(){returnthis._callMethod(a,arguments)}};if(e.cookie){window.name||(window.name=Math.floor(1e8*Math.random()));varl={_cookie:!0,_prefix:"",_expires:null,_path:null,_domain:null,setItem:function(t,r){e.cookie(this._prefix+t,r,{expires:this._expires,path:this._path,domain:this._domain})},getItem:function(t){returne.cookie(this._prefix+t)},removeItem:function(t){returne.removeCookie(this._prefix+t)},clear:function(){for(vartine.cookie())""!=t&&(!this._prefix&&-1===t.indexOf(c)&&-1===t.indexOf(m)||this._prefix&&0===t.indexOf(this._prefix))&&e.removeCookie(t)},setExpires:function(e){returnthis._expires=e,this},setPath:function(e){returnthis._path=e,this},setDomain:function(e){returnthis._domain=e,this},setConf:function(e){returne.path&&(this._path=e.path),e.domain&&(this._domain=e.domain),e.expires&&(this._expires=e.expires),this},setDefaultConf:function(){this._path=this._domain=this._expires=null}};g||(window.localCookieStorage=e.extend({},l,{_prefix:c,_expires:3650}),window.sessionCookieStorage=e.extend({},l,{_prefix:m+window.name+"_"})),window.cookieStorage=e.extend({},l),e.cookieStorage=e.extend({},h,{_type:"cookieStorage",setExpires:function(e){returnwindow.cookieStorage.setExpires(e),this},setPath:function(e){returnwindow.cookieStorage.setPath(e),this},setDomain:function(e){returnwindow.cookieStorage.setDomain(e),this},setConf:function(e){returnwindow.cookieStorage.setConf(e),this},setDefaultConf:function(){returnwindow.cookieStorage.setDefaultConf(),this}})}e.initNamespaceStorage=function(e){returnu(e)},g?(e.localStorage=e.extend({},h,{_type:"localStorage"}),e.sessionStorage=e.extend({},h,{_type:"sessionStorage"})):(e.localStorage=e.extend({},h,{_type:"localCookieStorage"}),e.sessionStorage=e.extend({},h,{_type:"sessionCookieStorage"})),e.namespaceStorages={},e.removeAllStorages=function(t){e.localStorage.removeAll(t),e.sessionStorage.removeAll(t),e.cookieStorage&&e.cookieStorage.removeAll(t),t||(e.namespaceStorages={})}});