class t{constructor(){this.items={}}clear(){this.items={}}getItem(t){return this.items[t]||null}setItem(t,e){this.items[t]=e}removeItem(t){delete this.items[t]}}class e{constructor(t){this.storage=t}static hasStorage(t){try{const e=`anjHasStorage${+new Date}`,s=window[t];s.setItem(e,e);const r=s.getItem(e);return s.removeItem(e),r===e}catch(e){return!1}}clear(){return this.storage.clear()}getItem(t){return JSON.parse(this.storage.getItem(t))}removeItem(t){return this.storage.removeItem(t)}setItem(t,e){return this.storage.setItem(t,JSON.stringify(e))}}class s extends e{constructor(){s.hasStorage("sessionStorage")?super(window.sessionStorage):super(new t)}}class r extends e{constructor(){r.hasStorage("localStorage")?super(window.localStorage):super(new t)}}export{t as F,r as L,e as S,s as a};