"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[6090],{6090:(y,a,n)=>{n.r(a),n.d(a,{StorageWeb:()=>c});var s=n(8239),p=n(1278);class c extends p.Uw{constructor(){super(...arguments),this.group="CapacitorStorage"}configure(e){var t=this;return(0,s.Z)(function*({group:r}){"string"==typeof r&&(t.group=r)}).apply(this,arguments)}get(e){var t=this;return(0,s.Z)(function*(){return{value:t.impl.getItem(t.applyPrefix(e.key))}})()}set(e){var t=this;return(0,s.Z)(function*(){t.impl.setItem(t.applyPrefix(e.key),e.value)})()}remove(e){var t=this;return(0,s.Z)(function*(){t.impl.removeItem(t.applyPrefix(e.key))})()}keys(){var e=this;return(0,s.Z)(function*(){return{keys:e.rawKeys().map(r=>r.substring(e.prefix.length))}})()}clear(){var e=this;return(0,s.Z)(function*(){for(const t of e.rawKeys())e.impl.removeItem(t)})()}migrate(){var e=this;return(0,s.Z)(function*(){var t;const r=[],i=[],l="_cap_",f=Object.keys(e.impl).filter(o=>0===o.indexOf(l));for(const o of f){const u=o.substring(l.length),h=null!==(t=e.impl.getItem(o))&&void 0!==t?t:"",{value:m}=yield e.get({key:u});"string"==typeof m?i.push(u):(yield e.set({key:u,value:h}),r.push(u))}return{migrated:r,existing:i}})()}removeOld(){var e=this;return(0,s.Z)(function*(){const r=Object.keys(e.impl).filter(i=>0===i.indexOf("_cap_"));for(const i of r)e.impl.removeItem(i)})()}get impl(){return window.localStorage}get prefix(){return"NativeStorage"===this.group?"":`${this.group}.`}rawKeys(){return Object.keys(this.impl).filter(e=>0===e.indexOf(this.prefix))}applyPrefix(e){return this.prefix+e}}}}]);