pinia-plugin-persist-state 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- (function(k,te){typeof exports=="object"&&typeof module<"u"?te(exports,require("pinia")):typeof define=="function"&&define.amd?define(["exports","pinia"],te):(k=typeof globalThis<"u"?globalThis:k||self,te(k["pinia-plugin-persist-state"]={}))})(this,(function(k){"use strict";class te{_storage;constructor(t){this._storage=t==="localStorage"?localStorage:sessionStorage}clear(){this._storage.clear()}async getItem(t){return new Promise((n,s)=>{const r=this._storage.getItem(t.toString());n(r?JSON.parse(r):void 0)})}removeItem(t){this._storage.removeItem(t.toString())}removeItems(t){for(let n=0;n<this._storage.length;n++){const s=this._storage.key(n);s&&(!t||!t.includes(s))&&this._storage.removeItem(s)}}setItem(t,n){this._storage.setItem(n,JSON.stringify(t))}}class pn{_console;_createInstance;_name;_pluginOptions;_storeInstance;_resetStoreCallback;_storeOnActionSubscription;_storeMutationSubscription;_subscriptions;pluginCreated;get console(){return this._console??console}get name(){return this._name}get pluginOptions(){return this._pluginOptions??{}}set pluginOptions(t){this._pluginOptions=t}get resetStoreCallback(){return this._resetStoreCallback}get storeOnActionSubscription(){return this._storeOnActionSubscription}get storeMutationSubscription(){return this._storeMutationSubscription}get subscriptions(){return this._subscriptions}set subscriptions(t){this._subscriptions=t}constructor(t,n,s){this._name=t,this._createInstance=n,s&&(this._console=s)}invoke({store:t,options:n},s){return this._storeInstance=this._createInstance(t,{...n,...this.pluginOptions},s,this.console),this._storeInstance?(this._subscriptions=this._storeInstance.getSubscriptions(),this._storeMutationSubscription=this._storeInstance.storeSubscribe,this._storeOnActionSubscription=this._storeInstance.onAction,this.pluginCreated&&this.pluginCreated(t),!0):!1}}class hn{_className;_console;_debug=!1;get console(){return this._console??console}set console(t){this._console=t}get debug(){return this._debug}set debug(t){this._debug=t}constructor(t,n){this._debug=t,this._className=this.constructor.name,n&&(this._console=n)}debugLog(...t){this._debug&&(Array.isArray(t)&&(t[0]=`${this._className} - ${t[0]}`),this.console.log(...t))}logError(...t){this.console.error(...t)}}const dn="pinia-plugin-subscription",_n=(e,t="white")=>`background-color: ${e}; color: ${t}; padding: 1px; margin-right: 5px; font-size: 12px`;function gn(e,t){if(!e)throw new Error("Style instructions are required");console.log("%c%s",e,t.shift(),...t)}class yn{_bgColor="#ffec73";_color="green";_icon="🍍⚡";_errorBgColor="#d24545";_errorColor="white";_errorIcon="🍍⚠️";_styles={error:{bgColor:this._errorBgColor,color:this._errorColor,icon:this._errorIcon},info:{bgColor:this._bgColor,color:this._color,icon:this._icon}};formatMessage(t,n){return` [${n} ${dn}] - ${t} `}generateStyle(t){return _n(t.bgColor,t.color)}getStyleDefinition(t){return this._styles[t??"info"]}log(...t){this.useLog(this.getStyleDefinition(),t)}error(...t){this.useLog(this.getStyleDefinition("error"),t)}rebuildArgs(t,n){if(typeof t=="string")return[this.formatMessage(t,n)];if(Array.isArray(t))return[this.formatMessage(t.shift(),n),...t??[]]}useLog(t,n){gn(this.generateStyle(t),this.rebuildArgs(n,t.icon))}}function W(e){return e?Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e.trim()==="":!1:!(typeof e=="boolean"||typeof e=="number")}function mn(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Re=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const bn=()=>{},Sn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),vn=e=>e.startsWith("onUpdate:"),M=Object.assign,wn=Object.prototype.hasOwnProperty,xe=(e,t)=>wn.call(e,t),g=Array.isArray,ne=e=>lt(e)==="[object Map]",P=e=>typeof e=="function",V=e=>typeof e=="string",F=e=>typeof e=="symbol",y=e=>e!==null&&typeof e=="object",En=Object.prototype.toString,lt=e=>En.call(e),ut=e=>lt(e).slice(8,-1),ue=e=>V(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Nn=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},On=Nn(e=>e.charAt(0).toUpperCase()+e.slice(1)),se=(e,t)=>!Object.is(e,t);let ft;const fe=()=>ft||(ft=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ie(e){if(g(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=V(s)?Rn(s):Ie(s);if(r)for(const o in r)t[o]=r[o]}return t}else if(V(e)||y(e))return e}const kn=/;(?![^(]*\))/g,Vn=/:([^]+)/,Cn=/\/\*[^]*?\*\//g;function Rn(e){const t={};return e.replace(Cn,"").split(kn).forEach(n=>{if(n){const s=n.split(Vn);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Pe(e){let t="";if(V(e))t=e;else if(g(e))for(let n=0;n<e.length;n++){const s=Pe(e[n]);s&&(t+=s+" ")}else if(y(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function z(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let pt=0,De;function je(){pt++}function $e(){if(--pt>0)return;let e;for(;De;){let t=De;for(De=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}class xn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,process.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){}trigger(t){this.version++,this.notify(t)}notify(t){je();try{if(process.env.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(M({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{$e()}}}const ht=new WeakMap,Te=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),dt=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),_t=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function D(e,t,n,s,r,o){const i=ht.get(e);if(!i)return;const c=l=>{l&&(process.env.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:n,newValue:s,oldValue:r,oldTarget:o}):l.trigger())};if(je(),t==="clear")i.forEach(c);else{const l=g(e),f=l&&ue(n);if(l&&n==="length"){const h=Number(s);i.forEach((a,u)=>{(u==="length"||u===_t||!F(u)&&u>=h)&&c(a)})}else switch((n!==void 0||i.has(void 0))&&c(i.get(n)),f&&c(i.get(_t)),t){case"add":l?f&&c(i.get("length")):(c(i.get(Te)),ne(e)&&c(i.get(dt)));break;case"delete":l||(c(i.get(Te)),ne(e)&&c(i.get(dt)));break;case"set":ne(e)&&c(i.get(Te));break}}$e()}function In(e,t){const n=ht.get(e);return n&&n.get(t)}function B(e){const t=p(e);return t===e||b(e)?t:t.map(R)}function Ae(e){return e=p(e),e}function E(e,t){return N(e)?de(He(e)?R(t):t):R(t)}const Pn={__proto__:null,[Symbol.iterator](){return Me(this,Symbol.iterator,e=>E(this,e))},concat(...e){return B(this).concat(...e.map(t=>g(t)?B(t):t))},entries(){return Me(this,"entries",e=>(e[1]=E(this,e[1]),e))},every(e,t){return C(this,"every",e,t,void 0,arguments)},filter(e,t){return C(this,"filter",e,t,n=>n.map(s=>E(this,s)),arguments)},find(e,t){return C(this,"find",e,t,n=>E(this,n),arguments)},findIndex(e,t){return C(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return C(this,"findLast",e,t,n=>E(this,n),arguments)},findLastIndex(e,t){return C(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return C(this,"forEach",e,t,void 0,arguments)},includes(...e){return Fe(this,"includes",e)},indexOf(...e){return Fe(this,"indexOf",e)},join(e){return B(this).join(e)},lastIndexOf(...e){return Fe(this,"lastIndexOf",e)},map(e,t){return C(this,"map",e,t,void 0,arguments)},pop(){return re(this,"pop")},push(...e){return re(this,"push",e)},reduce(e,...t){return gt(this,"reduce",e,t)},reduceRight(e,...t){return gt(this,"reduceRight",e,t)},shift(){return re(this,"shift")},some(e,t){return C(this,"some",e,t,void 0,arguments)},splice(...e){return re(this,"splice",e)},toReversed(){return B(this).toReversed()},toSorted(e){return B(this).toSorted(e)},toSpliced(...e){return B(this).toSpliced(...e)},unshift(...e){return re(this,"unshift",e)},values(){return Me(this,"values",e=>E(this,e))}};function Me(e,t,n){const s=Ae(e),r=s[t]();return s!==e&&!b(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const Dn=Array.prototype;function C(e,t,n,s,r,o){const i=Ae(e),c=i!==e&&!b(e),l=i[t];if(l!==Dn[t]){const a=l.apply(e,o);return c?R(a):a}let f=n;i!==e&&(c?f=function(a,u){return n.call(this,E(e,a),u,e)}:n.length>2&&(f=function(a,u){return n.call(this,a,u,e)}));const h=l.call(i,f,s);return c&&r?r(h):h}function gt(e,t,n,s){const r=Ae(e),o=r!==e&&!b(e);let i=n,c=!1;r!==e&&(o?(c=s.length===0,i=function(f,h,a){return c&&(c=!1,f=E(e,f)),n.call(this,f,E(e,h),a,e)}):n.length>3&&(i=function(f,h,a){return n.call(this,f,h,a,e)}));const l=r[t](i,...s);return c?E(e,l):l}function Fe(e,t,n){const s=p(e),r=s[t](...n);return(r===-1||r===!1)&&oe(n[0])?(n[0]=p(n[0]),s[t](...n)):r}function re(e,t,n=[]){je();const s=p(e)[t].apply(e,n);return $e(),s}const jn=mn("__proto__,__v_isRef,__isVue"),yt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(F));function $n(e){return F(e)||(e=String(e)),p(this).hasOwnProperty(e)}class mt{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?Wn:wt:o?Ln:vt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=g(t);if(!r){let l;if(i&&(l=Pn[n]))return l;if(n==="hasOwnProperty")return $n}const c=Reflect.get(t,n,m(t)?t:s);if((F(n)?yt.has(n):jn(n))||o)return c;if(m(c)){const l=i&&ue(n)?c:c.value;return r&&y(l)?Ke(l):l}return y(c)?r?Ke(c):Et(c):c}}class Tn extends mt{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const i=g(t)&&ue(n);if(!this._isShallow){const f=N(o);if(!b(s)&&!N(s)&&(o=p(o),s=p(s)),!i&&m(o)&&!m(s))return f?(process.env.NODE_ENV!=="production"&&z(`Set operation on key "${String(n)}" failed: target is readonly.`,t[n]),!0):(o.value=s,!0)}const c=i?Number(n)<t.length:xe(t,n),l=Reflect.set(t,n,s,m(t)?t:r);return t===p(r)&&(c?se(s,o)&&D(t,"set",n,s,o):D(t,"add",n,s)),l}deleteProperty(t,n){const s=xe(t,n),r=t[n],o=Reflect.deleteProperty(t,n);return o&&s&&D(t,"delete",n,void 0,r),o}has(t,n){const s=Reflect.has(t,n);return!F(n)||yt.has(n),s}ownKeys(t){return Reflect.ownKeys(t)}}class An extends mt{constructor(t=!1){super(!0,t)}set(t,n){return process.env.NODE_ENV!=="production"&&z(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return process.env.NODE_ENV!=="production"&&z(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Mn=new Tn,Fn=new An,pe=e=>Reflect.getPrototypeOf(e);function Kn(e,t,n){return function(...s){const r=this.__v_raw,o=ne(p(r)),i=e==="entries"||e===Symbol.iterator&&o,c=r[e](...s),l=t?de:R;return M(Object.create(c),{next(){const{value:f,done:h}=c.next();return h?{value:f,done:h}:{value:i?[l(f[0]),l(f[1])]:l(f),done:h}}})}}function he(e){return function(...t){if(process.env.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";z(`${On(e)} operation ${n}failed: target is readonly.`,p(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Hn(e,t){const n={get(s){const r=this.__v_raw,o=p(r),i=p(s),{has:c}=pe(o),l=e?de:R;if(c.call(o,s))return l(r.get(s));if(c.call(o,i))return l(r.get(i));r!==o&&r.get(s)},get size(){return this.__v_raw.size},has(s){const r=this.__v_raw,o=p(s);return s===o?r.has(s):r.has(s)||r.has(o)},forEach(s,r){const o=this,i=o.__v_raw,c=e?de:R;return i.forEach((l,f)=>s.call(r,c(l),c(f),o))}};return M(n,e?{add:he("add"),set:he("set"),delete:he("delete"),clear:he("clear")}:{add(s){const r=p(this),o=pe(r),i=p(s),c=!b(s)&&!N(s)?i:s;return o.has.call(r,c)||se(s,c)&&o.has.call(r,s)||se(i,c)&&o.has.call(r,i)||(r.add(c),D(r,"add",c,c)),this},set(s,r){!b(r)&&!N(r)&&(r=p(r));const o=p(this),{has:i,get:c}=pe(o);let l=i.call(o,s);l?process.env.NODE_ENV!=="production"&&St(o,i,s):(s=p(s),l=i.call(o,s));const f=c.call(o,s);return o.set(s,r),l?se(r,f)&&D(o,"set",s,r,f):D(o,"add",s,r),this},delete(s){const r=p(this),{has:o,get:i}=pe(r);let c=o.call(r,s);c?process.env.NODE_ENV!=="production"&&St(r,o,s):(s=p(s),c=o.call(r,s));const l=i?i.call(r,s):void 0,f=r.delete(s);return c&&D(r,"delete",s,void 0,l),f},clear(){const s=p(this),r=s.size!==0,o=process.env.NODE_ENV!=="production"?ne(s)?new Map(s):new Set(s):void 0,i=s.clear();return r&&D(s,"clear",void 0,void 0,o),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Kn(s,e)}),n}function bt(e,t){const n=Hn(e);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(xe(n,r)&&r in s?n:s,r,o)}const qn={get:bt(!1)},Un={get:bt(!0)};function St(e,t,n){const s=p(n);if(s!==n&&t.call(e,s)){const r=ut(e);z(`Reactive ${r} contains both the raw and reactive versions of the same object${r==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const vt=new WeakMap,Ln=new WeakMap,wt=new WeakMap,Wn=new WeakMap;function zn(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Bn(e){return e.__v_skip||!Object.isExtensible(e)?0:zn(ut(e))}function Et(e){return N(e)?e:Nt(e,!1,Mn,qn,vt)}function Ke(e){return Nt(e,!0,Fn,Un,wt)}function Nt(e,t,n,s,r){if(!y(e))return process.env.NODE_ENV!=="production"&&z(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=Bn(e);if(o===0)return e;const i=r.get(e);if(i)return i;const c=new Proxy(e,o===2?s:n);return r.set(e,c),c}function He(e){return N(e)?He(e.__v_raw):!!(e&&e.__v_isReactive)}function N(e){return!!(e&&e.__v_isReadonly)}function b(e){return!!(e&&e.__v_isShallow)}function oe(e){return e?!!e.__v_raw:!1}function p(e){const t=e&&e.__v_raw;return t?p(t):e}const R=e=>y(e)?Et(e):e,de=e=>y(e)?Ke(e):e;function m(e){return e?e.__v_isRef===!0:!1}function Ot(e){return Jn(e,!1)}function Jn(e,t){return m(e)?e:new Yn(e,t)}class Yn{constructor(t,n){this.dep=new xn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:p(t),this._value=n?t:R(t),this.__v_isShallow=n}get value(){return process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||b(t)||N(t);t=s?t:p(t),se(t,n)&&(this._rawValue=t,this._value=s?t:R(t),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function Gn(e){return m(e)?e.value:e}class Xn{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=F(n)?n:String(n),this._raw=p(t);let r=!0,o=t;if(!g(t)||F(this._key)||!ue(this._key))do r=!oe(o)||b(o);while(r&&(o=o.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=Gn(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&m(this._raw[this._key])){const n=this._object[this._key];if(m(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return In(this._raw,this._key)}}class Zn{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Qn(e,t,n){return m(e)?e:P(e)?new Zn(e):y(e)&&arguments.length>1?es(e,t,n):Ot(e)}function es(e,t,n){return new Xn(e,t,n)}const K=[];function ts(e){K.push(e)}function ns(){K.pop()}let qe=!1;function ie(e,...t){if(qe)return;qe=!0;const n=K.length?K[K.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=ss();if(s)Ue(s,n,11,[e+t.map(o=>{var i,c;return(c=(i=o.toString)==null?void 0:i.call(o))!=null?c:JSON.stringify(o)}).join(""),n&&n.proxy,r.map(({vnode:o})=>`at <${Kt(n,o.type)}>`).join(`
1
+ (function(k,te){typeof exports=="object"&&typeof module<"u"?te(exports,require("pinia")):typeof define=="function"&&define.amd?define(["exports","pinia"],te):(k=typeof globalThis<"u"?globalThis:k||self,te(k["pinia-plugin-persist-state"]={}))})(this,(function(k){"use strict";class te{_storage;constructor(t){this._storage=t==="localStorage"?localStorage:sessionStorage}clear(){this._storage.clear()}async getItem(t){return new Promise((n,s)=>{const r=this._storage.getItem(t.toString());n(r?JSON.parse(r):void 0)})}removeItem(t){this._storage.removeItem(t.toString())}removeItems(t){for(let n=0;n<this._storage.length;n++){const s=this._storage.key(n);s&&(!t||!t.includes(s))&&this._storage.removeItem(s)}}setItem(t,n){this._storage.setItem(n,JSON.stringify(t))}}class pn{_console;_createInstance;_name;_pluginOptions;_storeInstance;_resetStoreCallback;_storeOnActionSubscription;_storeMutationSubscription;_subscriptions;pluginCreated;get console(){return this._console??console}get name(){return this._name}get pluginOptions(){return this._pluginOptions??{}}set pluginOptions(t){this._pluginOptions=t}get resetStoreCallback(){return this._resetStoreCallback}get storeOnActionSubscription(){return this._storeOnActionSubscription}get storeMutationSubscription(){return this._storeMutationSubscription}get subscriptions(){return this._subscriptions}set subscriptions(t){this._subscriptions=t}constructor(t,n,s){this._name=t,this._createInstance=n,s&&(this._console=s)}invoke({store:t,options:n},s){return this._storeInstance=this._createInstance(t,{...n,...this.pluginOptions},s,this.console),this._storeInstance?(this._subscriptions=this._storeInstance.getSubscriptions(),this._storeMutationSubscription=this._storeInstance.storeSubscribe,this._storeOnActionSubscription=this._storeInstance.onAction,this.pluginCreated&&this.pluginCreated(t),!0):!1}}class hn{_className;_console;_debug=!1;get console(){return this._console??console}set console(t){this._console=t}get debug(){return this._debug}set debug(t){this._debug=t}constructor(t,n){this._debug=t,this._className=this.constructor.name,n&&(this._console=n)}debugLog(...t){this._debug&&(Array.isArray(t)&&(t[0]=`${this._className} - ${t[0]}`),this.console.log(...t))}logError(...t){this.console.error(...t)}}const dn="pinia-plugin-subscription",_n=(e,t="white")=>`background-color: ${e}; color: ${t}; padding: 1px; margin-right: 5px; font-size: 12px`;function gn(e,t){if(!e)throw new Error("Style instructions are required");console.log("%c%s",e,t.shift(),...t)}class yn{_bgColor="#ffec73";_color="green";_icon="🍍⚡";_errorBgColor="#d24545";_errorColor="white";_errorIcon="🍍⚠️";_styles={error:{bgColor:this._errorBgColor,color:this._errorColor,icon:this._errorIcon},info:{bgColor:this._bgColor,color:this._color,icon:this._icon}};formatMessage(t,n){return` [${n} ${dn}] - ${t} `}generateStyle(t){return _n(t.bgColor,t.color)}getStyleDefinition(t){return this._styles[t??"info"]}log(...t){this.useLog(this.getStyleDefinition(),t)}error(...t){this.useLog(this.getStyleDefinition("error"),t)}rebuildArgs(t,n){if(typeof t=="string")return[this.formatMessage(t,n)];if(Array.isArray(t))return[this.formatMessage(t.shift(),n),...t??[]]}useLog(t,n){gn(this.generateStyle(t),this.rebuildArgs(n,t.icon))}}function W(e){return e?Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e.trim()==="":!1:!(typeof e=="boolean"||typeof e=="number")}function mn(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Pe=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const bn=()=>{},Sn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),vn=e=>e.startsWith("onUpdate:"),M=Object.assign,wn=Object.prototype.hasOwnProperty,xe=(e,t)=>wn.call(e,t),g=Array.isArray,ne=e=>lt(e)==="[object Map]",I=e=>typeof e=="function",V=e=>typeof e=="string",F=e=>typeof e=="symbol",y=e=>e!==null&&typeof e=="object",En=Object.prototype.toString,lt=e=>En.call(e),ut=e=>lt(e).slice(8,-1),ue=e=>V(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Nn=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},On=Nn(e=>e.charAt(0).toUpperCase()+e.slice(1)),se=(e,t)=>!Object.is(e,t);let ft;const fe=()=>ft||(ft=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ie(e){if(g(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=V(s)?Rn(s):Ie(s);if(r)for(const o in r)t[o]=r[o]}return t}else if(V(e)||y(e))return e}const kn=/;(?![^(]*\))/g,Vn=/:([^]+)/,Cn=/\/\*[^]*?\*\//g;function Rn(e){const t={};return e.replace(Cn,"").split(kn).forEach(n=>{if(n){const s=n.split(Vn);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function De(e){let t="";if(V(e))t=e;else if(g(e))for(let n=0;n<e.length;n++){const s=De(e[n]);s&&(t+=s+" ")}else if(y(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function z(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let pt=0,je;function $e(){pt++}function Te(){if(--pt>0)return;let e;for(;je;){let t=je;for(je=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}class Pn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,process.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(t){}trigger(t){this.version++,this.notify(t)}notify(t){$e();try{if(process.env.NODE_ENV!=="production")for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(M({effect:n.sub},t));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Te()}}}const ht=new WeakMap,Ae=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),dt=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),_t=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function D(e,t,n,s,r,o){const i=ht.get(e);if(!i)return;const c=l=>{l&&(process.env.NODE_ENV!=="production"?l.trigger({target:e,type:t,key:n,newValue:s,oldValue:r,oldTarget:o}):l.trigger())};if($e(),t==="clear")i.forEach(c);else{const l=g(e),f=l&&ue(n);if(l&&n==="length"){const h=Number(s);i.forEach((a,u)=>{(u==="length"||u===_t||!F(u)&&u>=h)&&c(a)})}else switch((n!==void 0||i.has(void 0))&&c(i.get(n)),f&&c(i.get(_t)),t){case"add":l?f&&c(i.get("length")):(c(i.get(Ae)),ne(e)&&c(i.get(dt)));break;case"delete":l||(c(i.get(Ae)),ne(e)&&c(i.get(dt)));break;case"set":ne(e)&&c(i.get(Ae));break}}Te()}function xn(e,t){const n=ht.get(e);return n&&n.get(t)}function B(e){const t=p(e);return t===e||b(e)?t:t.map(R)}function Me(e){return e=p(e),e}function E(e,t){return N(e)?de(qe(e)?R(t):t):R(t)}const In={__proto__:null,[Symbol.iterator](){return Fe(this,Symbol.iterator,e=>E(this,e))},concat(...e){return B(this).concat(...e.map(t=>g(t)?B(t):t))},entries(){return Fe(this,"entries",e=>(e[1]=E(this,e[1]),e))},every(e,t){return C(this,"every",e,t,void 0,arguments)},filter(e,t){return C(this,"filter",e,t,n=>n.map(s=>E(this,s)),arguments)},find(e,t){return C(this,"find",e,t,n=>E(this,n),arguments)},findIndex(e,t){return C(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return C(this,"findLast",e,t,n=>E(this,n),arguments)},findLastIndex(e,t){return C(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return C(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ke(this,"includes",e)},indexOf(...e){return Ke(this,"indexOf",e)},join(e){return B(this).join(e)},lastIndexOf(...e){return Ke(this,"lastIndexOf",e)},map(e,t){return C(this,"map",e,t,void 0,arguments)},pop(){return re(this,"pop")},push(...e){return re(this,"push",e)},reduce(e,...t){return gt(this,"reduce",e,t)},reduceRight(e,...t){return gt(this,"reduceRight",e,t)},shift(){return re(this,"shift")},some(e,t){return C(this,"some",e,t,void 0,arguments)},splice(...e){return re(this,"splice",e)},toReversed(){return B(this).toReversed()},toSorted(e){return B(this).toSorted(e)},toSpliced(...e){return B(this).toSpliced(...e)},unshift(...e){return re(this,"unshift",e)},values(){return Fe(this,"values",e=>E(this,e))}};function Fe(e,t,n){const s=Me(e),r=s[t]();return s!==e&&!b(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const Dn=Array.prototype;function C(e,t,n,s,r,o){const i=Me(e),c=i!==e&&!b(e),l=i[t];if(l!==Dn[t]){const a=l.apply(e,o);return c?R(a):a}let f=n;i!==e&&(c?f=function(a,u){return n.call(this,E(e,a),u,e)}:n.length>2&&(f=function(a,u){return n.call(this,a,u,e)}));const h=l.call(i,f,s);return c&&r?r(h):h}function gt(e,t,n,s){const r=Me(e),o=r!==e&&!b(e);let i=n,c=!1;r!==e&&(o?(c=s.length===0,i=function(f,h,a){return c&&(c=!1,f=E(e,f)),n.call(this,f,E(e,h),a,e)}):n.length>3&&(i=function(f,h,a){return n.call(this,f,h,a,e)}));const l=r[t](i,...s);return c?E(e,l):l}function Ke(e,t,n){const s=p(e),r=s[t](...n);return(r===-1||r===!1)&&oe(n[0])?(n[0]=p(n[0]),s[t](...n)):r}function re(e,t,n=[]){$e();const s=p(e)[t].apply(e,n);return Te(),s}const jn=mn("__proto__,__v_isRef,__isVue"),yt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(F));function $n(e){return F(e)||(e=String(e)),p(this).hasOwnProperty(e)}class mt{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?Wn:wt:o?Ln:vt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=g(t);if(!r){let l;if(i&&(l=In[n]))return l;if(n==="hasOwnProperty")return $n}const c=Reflect.get(t,n,m(t)?t:s);if((F(n)?yt.has(n):jn(n))||o)return c;if(m(c)){const l=i&&ue(n)?c:c.value;return r&&y(l)?He(l):l}return y(c)?r?He(c):Et(c):c}}class Tn extends mt{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const i=g(t)&&ue(n);if(!this._isShallow){const f=N(o);if(!b(s)&&!N(s)&&(o=p(o),s=p(s)),!i&&m(o)&&!m(s))return f?(process.env.NODE_ENV!=="production"&&z(`Set operation on key "${String(n)}" failed: target is readonly.`,t[n]),!0):(o.value=s,!0)}const c=i?Number(n)<t.length:xe(t,n),l=Reflect.set(t,n,s,m(t)?t:r);return t===p(r)&&(c?se(s,o)&&D(t,"set",n,s,o):D(t,"add",n,s)),l}deleteProperty(t,n){const s=xe(t,n),r=t[n],o=Reflect.deleteProperty(t,n);return o&&s&&D(t,"delete",n,void 0,r),o}has(t,n){const s=Reflect.has(t,n);return!F(n)||yt.has(n),s}ownKeys(t){return Reflect.ownKeys(t)}}class An extends mt{constructor(t=!1){super(!0,t)}set(t,n){return process.env.NODE_ENV!=="production"&&z(`Set operation on key "${String(n)}" failed: target is readonly.`,t),!0}deleteProperty(t,n){return process.env.NODE_ENV!=="production"&&z(`Delete operation on key "${String(n)}" failed: target is readonly.`,t),!0}}const Mn=new Tn,Fn=new An,pe=e=>Reflect.getPrototypeOf(e);function Kn(e,t,n){return function(...s){const r=this.__v_raw,o=ne(p(r)),i=e==="entries"||e===Symbol.iterator&&o,c=r[e](...s),l=t?de:R;return M(Object.create(c),{next(){const{value:f,done:h}=c.next();return h?{value:f,done:h}:{value:i?[l(f[0]),l(f[1])]:l(f),done:h}}})}}function he(e){return function(...t){if(process.env.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";z(`${On(e)} operation ${n}failed: target is readonly.`,p(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Hn(e,t){const n={get(s){const r=this.__v_raw,o=p(r),i=p(s),{has:c}=pe(o),l=e?de:R;if(c.call(o,s))return l(r.get(s));if(c.call(o,i))return l(r.get(i));r!==o&&r.get(s)},get size(){return this.__v_raw.size},has(s){const r=this.__v_raw,o=p(s);return s===o?r.has(s):r.has(s)||r.has(o)},forEach(s,r){const o=this,i=o.__v_raw,c=e?de:R;return i.forEach((l,f)=>s.call(r,c(l),c(f),o))}};return M(n,e?{add:he("add"),set:he("set"),delete:he("delete"),clear:he("clear")}:{add(s){const r=p(this),o=pe(r),i=p(s),c=!b(s)&&!N(s)?i:s;return o.has.call(r,c)||se(s,c)&&o.has.call(r,s)||se(i,c)&&o.has.call(r,i)||(r.add(c),D(r,"add",c,c)),this},set(s,r){!b(r)&&!N(r)&&(r=p(r));const o=p(this),{has:i,get:c}=pe(o);let l=i.call(o,s);l?process.env.NODE_ENV!=="production"&&St(o,i,s):(s=p(s),l=i.call(o,s));const f=c.call(o,s);return o.set(s,r),l?se(r,f)&&D(o,"set",s,r,f):D(o,"add",s,r),this},delete(s){const r=p(this),{has:o,get:i}=pe(r);let c=o.call(r,s);c?process.env.NODE_ENV!=="production"&&St(r,o,s):(s=p(s),c=o.call(r,s));const l=i?i.call(r,s):void 0,f=r.delete(s);return c&&D(r,"delete",s,void 0,l),f},clear(){const s=p(this),r=s.size!==0,o=process.env.NODE_ENV!=="production"?ne(s)?new Map(s):new Set(s):void 0,i=s.clear();return r&&D(s,"clear",void 0,void 0,o),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Kn(s,e)}),n}function bt(e,t){const n=Hn(e);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(xe(n,r)&&r in s?n:s,r,o)}const qn={get:bt(!1)},Un={get:bt(!0)};function St(e,t,n){const s=p(n);if(s!==n&&t.call(e,s)){const r=ut(e);z(`Reactive ${r} contains both the raw and reactive versions of the same object${r==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const vt=new WeakMap,Ln=new WeakMap,wt=new WeakMap,Wn=new WeakMap;function zn(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Bn(e){return e.__v_skip||!Object.isExtensible(e)?0:zn(ut(e))}function Et(e){return N(e)?e:Nt(e,!1,Mn,qn,vt)}function He(e){return Nt(e,!0,Fn,Un,wt)}function Nt(e,t,n,s,r){if(!y(e))return process.env.NODE_ENV!=="production"&&z(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=Bn(e);if(o===0)return e;const i=r.get(e);if(i)return i;const c=new Proxy(e,o===2?s:n);return r.set(e,c),c}function qe(e){return N(e)?qe(e.__v_raw):!!(e&&e.__v_isReactive)}function N(e){return!!(e&&e.__v_isReadonly)}function b(e){return!!(e&&e.__v_isShallow)}function oe(e){return e?!!e.__v_raw:!1}function p(e){const t=e&&e.__v_raw;return t?p(t):e}const R=e=>y(e)?Et(e):e,de=e=>y(e)?He(e):e;function m(e){return e?e.__v_isRef===!0:!1}function Ot(e){return Jn(e,!1)}function Jn(e,t){return m(e)?e:new Yn(e,t)}class Yn{constructor(t,n){this.dep=new Pn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:p(t),this._value=n?t:R(t),this.__v_isShallow=n}get value(){return process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||b(t)||N(t);t=s?t:p(t),se(t,n)&&(this._rawValue=t,this._value=s?t:R(t),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function Gn(e){return m(e)?e.value:e}class Xn{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=F(n)?n:String(n),this._raw=p(t);let r=!0,o=t;if(!g(t)||F(this._key)||!ue(this._key))do r=!oe(o)||b(o);while(r&&(o=o.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=Gn(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&m(this._raw[this._key])){const n=this._object[this._key];if(m(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return xn(this._raw,this._key)}}class Zn{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Qn(e,t,n){return m(e)?e:I(e)?new Zn(e):y(e)&&arguments.length>1?es(e,t,n):Ot(e)}function es(e,t,n){return new Xn(e,t,n)}const K=[];function ts(e){K.push(e)}function ns(){K.pop()}let Ue=!1;function ie(e,...t){if(Ue)return;Ue=!0;const n=K.length?K[K.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=ss();if(s)Le(s,n,11,[e+t.map(o=>{var i,c;return(c=(i=o.toString)==null?void 0:i.call(o))!=null?c:JSON.stringify(o)}).join(""),n&&n.proxy,r.map(({vnode:o})=>`at <${Kt(n,o.type)}>`).join(`
2
2
  `),r]);else{const o=[`[Vue warn]: ${e}`,...t];r.length&&o.push(`
3
- `,...rs(r)),console.warn(...o)}qe=!1}function ss(){let e=K[K.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function rs(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[`
4
- `],...os(n))}),t}function os({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,r=` at <${Kt(e.component,e.type,s)}`,o=">"+n;return e.props?[r,...is(e.props),o]:[r+o]}function is(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...kt(s,e[s]))}),n.length>3&&t.push(" ..."),t}function kt(e,t,n){return V(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:m(t)?(t=kt(e,p(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):P(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=p(t),n?t:[`${e}=`,t])}const Vt={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Ue(e,t,n,s){try{return s?e(...s):e()}catch(r){Ct(r,t,n)}}function Ct(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Re;if(t){let c=t.parent;const l=t.proxy,f=process.env.NODE_ENV!=="production"?Vt[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;c;){const h=c.ec;if(h){for(let a=0;a<h.length;a++)if(h[a](e,l,f)===!1)return}c=c.parent}if(o){Ue(o,null,10,[e,l,f]);return}}cs(e,n,r,s,i)}function cs(e,t,n,s=!0,r=!1){if(process.env.NODE_ENV!=="production"){const o=Vt[t];if(n&&ts(n),ie(`Unhandled error${o?` during execution of ${o}`:""}`),n&&ns(),s)throw e;console.error(e)}else{if(r)throw e;console.error(e)}}const S=[];let x=-1;const J=[];let j=null,Y=0;const as=Promise.resolve();let Le=null;const ls=100;function us(e){let t=x+1,n=S.length;for(;t<n;){const s=t+n>>>1,r=S[s],o=ce(r);o<e||o===e&&r.flags&2?t=s+1:n=s}return t}function fs(e){if(!(e.flags&1)){const t=ce(e),n=S[S.length-1];!n||!(e.flags&2)&&t>=ce(n)?S.push(e):S.splice(us(t),0,e),e.flags|=1,Rt()}}function Rt(){Le||(Le=as.then(xt))}function ps(e){g(e)?J.push(...e):j&&e.id===-1?j.splice(Y+1,0,e):e.flags&1||(J.push(e),e.flags|=1),Rt()}function hs(e){if(J.length){const t=[...new Set(J)].sort((n,s)=>ce(n)-ce(s));if(J.length=0,j){j.push(...t);return}for(j=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),Y=0;Y<j.length;Y++){const n=j[Y];process.env.NODE_ENV!=="production"&&It(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}j=null,Y=0}}const ce=e=>e.id==null?e.flags&2?-1:1/0:e.id;function xt(e){process.env.NODE_ENV!=="production"&&(e=e||new Map);const t=process.env.NODE_ENV!=="production"?n=>It(e,n):bn;try{for(x=0;x<S.length;x++){const n=S[x];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),Ue(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;x<S.length;x++){const n=S[x];n&&(n.flags&=-2)}x=-1,S.length=0,hs(e),Le=null,(S.length||J.length)&&xt(e)}}function It(e,t){const n=e.get(t)||0;if(n>ls){const s=t.i,r=s&&Ft(s.type);return Ct(`Maximum recursive updates exceeded${r?` in component <${r}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return e.set(t,n+1),!1}const We=new Map;process.env.NODE_ENV!=="production"&&(fe().__VUE_HMR_RUNTIME__={createRecord:ze(ds),rerender:ze(_s),reload:ze(gs)});const _e=new Map;function ds(e,t){return _e.has(e)?!1:(_e.set(e,{initialDef:ge(t),instances:new Set}),!0)}function ge(e){return Ht(e)?e.__vccOpts:e}function _s(e,t){const n=_e.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(s=>{t&&(s.render=t,ge(s.type).render=t),s.renderCache=[],s.job.flags&8||s.update()}))}function gs(e,t){const n=_e.get(e);if(!n)return;t=ge(t),Pt(n.initialDef,t);const s=[...n.instances];for(let r=0;r<s.length;r++){const o=s[r],i=ge(o.type);let c=We.get(i);c||(i!==n.initialDef&&Pt(i,t),We.set(i,c=new Set)),c.add(o),o.appContext.propsCache.delete(o.type),o.appContext.emitsCache.delete(o.type),o.appContext.optionsCache.delete(o.type),o.ceReload?(c.add(o),o.ceReload(t.styles),c.delete(o)):o.parent?fs(()=>{o.job.flags&8||(o.parent.update(),c.delete(o))}):o.appContext.reload?o.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),o.root.ce&&o!==o.root&&o.root.ce._removeChildStyle(i)}ps(()=>{We.clear()})}function Pt(e,t){M(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function ze(e){return(t,n)=>{try{return e(t,n)}catch(s){console.error(s),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let ye=null,ys=null;const ms=e=>e.__isTeleport;function Dt(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Dt(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}fe().requestIdleCallback,fe().cancelIdleCallback;const bs=Symbol.for("v-ndc");process.env.NODE_ENV;const Ss={},jt=e=>Object.getPrototypeOf(e)===Ss,vs=e=>e.__isSuspense,$t=Symbol.for("v-fgt"),ws=Symbol.for("v-txt"),Es=Symbol.for("v-cmt");function Ns(e){return e?e.__v_isVNode===!0:!1}const Os=(...e)=>At(...e),Tt=({key:e})=>e??null,me=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?V(e)||m(e)||P(e)?{i:ye,r:e,k:t,f:!!n}:e:null);function ks(e,t=null,n=null,s=0,r=null,o=e===$t?0:1,i=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Tt(t),ref:t&&me(t),scopeId:ys,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ye};return c?(Be(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=V(n)?8:16),process.env.NODE_ENV!=="production"&&l.key!==l.key&&ie("VNode created with invalid key (NaN). VNode type:",l.type),l}const Vs=process.env.NODE_ENV!=="production"?Os:At;function At(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===bs)&&(process.env.NODE_ENV!=="production"&&!e&&ie(`Invalid vnode type when creating vnode: ${e}.`),e=Es),Ns(e)){const c=be(e,t,!0);return n&&Be(c,n),c.patchFlag=-2,c}if(Ht(e)&&(e=e.__vccOpts),t){t=Cs(t);let{class:c,style:l}=t;c&&!V(c)&&(t.class=Pe(c)),y(l)&&(oe(l)&&!g(l)&&(l=M({},l)),t.style=Ie(l))}const i=V(e)?1:vs(e)?128:ms(e)?64:y(e)?4:P(e)?2:0;return process.env.NODE_ENV!=="production"&&i&4&&oe(e)&&(e=p(e),ie("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
5
- Component that was made reactive: `,e)),ks(e,t,n,s,r,i,o,!0)}function Cs(e){return e?oe(e)||jt(e)?M({},e):e:null}function be(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:c,transition:l}=e,f=t?xs(r||{},t):r,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&Tt(f),ref:t&&t.ref?n&&o?g(o)?o.concat(me(t)):[o,me(t)]:me(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:process.env.NODE_ENV!=="production"&&i===-1&&g(c)?c.map(Mt):c,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==$t?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&be(e.ssContent),ssFallback:e.ssFallback&&be(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&s&&Dt(h,l.clone(h)),h}function Mt(e){const t=be(e);return g(e.children)&&(t.children=e.children.map(Mt)),t}function Rs(e=" ",t=0){return Vs(ws,null,e,t)}function Be(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(g(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Be(e,r()),r._c&&(r._d=!0));return}else n=32,!t._&&!jt(t)&&(t._ctx=ye);else P(t)?(t={default:t,_ctx:ye},n=32):(t=String(t),s&64?(n=16,t=[Rs(t)]):n=8);e.children=t,e.shapeFlag|=n}function xs(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=Pe([t.class,s.class]));else if(r==="style")t.style=Ie([t.style,s.style]);else if(Sn(r)){const o=t[r],i=s[r];i&&o!==i&&!(g(o)&&o.includes(i))?t[r]=o?[].concat(o,i):i:i==null&&o==null&&!vn(r)&&(t[r]=i)}else r!==""&&(t[r]=s[r])}return t}{const e=fe(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};t("__VUE_INSTANCE_SETTERS__",n=>n),t("__VUE_SSR_SETTERS__",n=>n)}process.env.NODE_ENV;const Is=/(?:^|[-_])\w/g,Ps=e=>e.replace(Is,t=>t.toUpperCase()).replace(/[-_]/g,"");function Ft(e,t=!0){return P(e)?e.displayName||e.name:e.name||t&&e.__name}function Kt(e,t,n=!1){let s=Ft(t);if(!s&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(s=r[1])}if(!s&&e){const r=o=>{for(const i in o)if(o[i]===t)return i};s=r(e.components)||e.parent&&r(e.parent.type.components)||r(e.appContext.components)}return s?Ps(s):n?"App":"Anonymous"}function Ht(e){return P(e)&&"__vccOpts"in e}function Ds(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},s={style:"color:#eb2f96"},r={__vue_custom_formatter:!0,header(a){if(!y(a))return null;if(a.__isVue)return["div",e,"VueInstance"];if(m(a)){const u=a.value;return["div",{},["span",e,h(a)],"<",c(u),">"]}else{if(He(a))return["div",{},["span",e,b(a)?"ShallowReactive":"Reactive"],"<",c(a),`>${N(a)?" (readonly)":""}`];if(N(a))return["div",{},["span",e,b(a)?"ShallowReadonly":"Readonly"],"<",c(a),">"]}return null},hasBody(a){return a&&a.__isVue},body(a){if(a&&a.__isVue)return["div",{},...o(a.$)]}};function o(a){const u=[];a.type.props&&a.props&&u.push(i("props",p(a.props))),a.setupState!==Re&&u.push(i("setup",a.setupState)),a.data!==Re&&u.push(i("data",p(a.data)));const d=l(a,"computed");d&&u.push(i("computed",d));const _=l(a,"inject");return _&&u.push(i("injected",_)),u.push(["div",{},["span",{style:s.style+";opacity:0.66"},"$ (internal): "],["object",{object:a}]]),u}function i(a,u){return u=M({},u),Object.keys(u).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},a],["div",{style:"padding-left:1.25em"},...Object.keys(u).map(d=>["div",{},["span",s,d+": "],c(u[d],!1)])]]:["span",{}]}function c(a,u=!0){return typeof a=="number"?["span",t,a]:typeof a=="string"?["span",n,JSON.stringify(a)]:typeof a=="boolean"?["span",s,a]:y(a)?["object",{object:u?p(a):a}]:["span",n,String(a)]}function l(a,u){const d=a.type;if(P(d))return;const _={};for(const w in a.ctx)f(d,w,u)&&(_[w]=a.ctx[w]);return _}function f(a,u,d){const _=a[d];if(g(_)&&_.includes(u)||y(_)&&u in _||a.extends&&f(a.extends,u,d)||a.mixins&&a.mixins.some(w=>f(w,u,d)))return!0}function h(a){return b(a)?"ShallowRef":a.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(r):window.devtoolsFormatters=[r]}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;function js(){Ds()}process.env.NODE_ENV!=="production"&&js();const $s=new Set(["_","$"]);function Ts(e){return $s.has(e[0])}class As extends hn{_onAction;_options;_store;_subscriptions={};_storeSubscribe;static _requiredKeys;get onAction(){if(this._onAction)return()=>({store:this.store,callback:this._onAction})}set onAction(t){this._onAction=t}get options(){return this._options}get state(){return this._store.$state}set state(t){this._store.$state=t}get store(){return this._store}get storeSubscribe(){if(this._storeSubscribe)return()=>({store:this.store,callback:this._storeSubscribe})}set storeSubscribe(t){this._storeSubscribe=t}constructor(t,n,s=!1,r){super(s,r),this._options=n.storeOptions,this._store=t}addToState(t,n){this.isOptionApi()||n?.value||(n=Ot(n)),this.state[t]=n,this.store[t]=Qn(this.state,t)}addSubscription(t,n,s){this._subscriptions[t]={subscription:n,...s??{}}}static customizeStore(t,n,s=!1,r){if(n.storeOptions&&this.hasRequiredKeys(n.storeOptions))return new this(t,n,s,r)}hasDeniedFirstChar(t){return Ts(t[0])}static hasRequiredKeys(t){return this._requiredKeys!==void 0&&this._requiredKeys?.every(n=>!!t[n])}getOption(t){return this.options&&this.options[t]}getStatePropertyValue(t){return this.getValue(this.state[t])}getSubscriptions(){if(!W(this._subscriptions))return this._subscriptions}getValue(t){return t?.__v_isRef?t.value:t}isOptionApi(){return this.store._isOptionsAPI}stateHas(t){return this.state.hasOwnProperty(t)}storeHas(t){return this.store.hasOwnProperty(t)}}const Je="pinia-plugin-persist-state";class Ms extends yn{_pluginName=Je}const H=new Ms;let qt=class{_db;_localStorageVersionKey="IDBVersion";_name="persistStore";_objectStore;_objectStoreOptions;_objectStoreName;_transactionMode="readwrite";_version;constructor(t,n,s){this._objectStoreName=t,this._version=this.getStoredVersionNumber(),n&&(this._objectStoreOptions=n),s&&(this._transactionMode=s)}clear(){const t=()=>{if(this._objectStore){const n=this._objectStore.clear();this.requestEventsHandler(n,{error:()=>this.onError(n.error)})}};this.open({success:t})}createObjectStore(){this._db&&!this._db.objectStoreNames.contains(this._objectStoreName)&&this._db.createObjectStore(this._objectStoreName,this._objectStoreOptions)}deleteObjectStore(){const t=()=>{this._db?.deleteObjectStore(this._objectStoreName)};this.open({success:t})}async getItem(t){return new Promise(n=>{const s=()=>{if(this._objectStore){const r=this._objectStore.get(t);this.requestEventsHandler(r,{error:()=>this.onError(r.error,()=>n(void 0)),success:()=>n(r.result)})}};this.open({success:s})})}async getObjectStoreItem(t,n){return new Promise(s=>{const r=()=>{if(this._objectStore){const i=this._objectStore.index(t).get(n);this.requestEventsHandler(i,{error:()=>s(void 0),success:()=>s(i.result)})}};this.open({success:r})})}getStoredVersionNumber(){if(!localStorage)return 1;const t=localStorage.getItem(this._localStorageVersionKey);return t?parseInt(t):1}handleDeleteRequest(t,n){t.onerror=()=>H.error(`IndexedDB - Item "${n}" remove`,t.error)}onError(t,n){n&&n(t)}open(t){const n=indexedDB.open(this._name,this._version),s=()=>{this._db=n.result},r=i=>{try{if(s(),!this._db)return;const c=this._db.transaction(this._objectStoreName,this._transactionMode);c.onerror=()=>this.onError(c.error),this._objectStore=c.objectStore(this._objectStoreName),this._objectStore&&i()}catch(c){H.error("indexedDB - transaction error",[c])}};if(t?.success){const i=t.success;t.success=()=>r(i)}if(t?.upgrade){const i=t.upgrade.bind(this);t.upgrade=()=>{s(),i()}}const o=()=>{const i=c=>{if(c?.name==="VersionError"){this._version++,this.saveVersion(),this.open(t);return}t?.error&&t.error(c)};this.onError(n.error,i)};return t&&this.openRequestEventsHandler(n,{...t,error:o}),n}openRequestEventsHandler(t,n){this.requestEventsHandler(t,n),n.upgrade&&(t.onupgradeneeded=n.upgrade)}removeItem(t){const n=()=>{if(this._objectStore){const s=this._objectStore.delete(t);this.handleDeleteRequest(s,t)}};this.open({success:n})}removeItems(t){const n=()=>{if(this._objectStore){const s=this._objectStore.getAllKeys(),r=()=>{s.result.forEach(c=>{if(this._objectStore&&(!t||!t.includes(c))){const l=this._objectStore.delete(c);this.handleDeleteRequest(l,c)}})},o=()=>H.error("IndexedDB - removeItems",[s.error]);this.requestEventsHandler(s,{error:o,success:r})}};this.open({success:n})}requestEventsHandler(t,n){const{error:s,success:r}=n;s&&(t.onerror=s),r&&(t.onsuccess=r)}saveVersion(){localStorage&&localStorage.setItem(this._localStorageVersionKey,this._version.toString())}setItem(t,n){const s=()=>{if(this._objectStore){const o=this._objectStore.add(t);if(n){const i=()=>{n.forEach(l=>{this._objectStore?.createIndex(l,l,{unique:!0}),H.log(`"${l}" index created`)})},c=()=>this.onError(o.error);this.requestEventsHandler(o,{error:c,success:i})}}},r=this.createObjectStore;this.open({success:s,upgrade:r})}updateItem(t){const n=()=>{if(this._objectStore){const s=this._objectStore.put(t);s.onerror=()=>H.error("update item",[s.error,t])}};this.open({success:n})}};class Ye{_db;_db_options;get dbName(){return this._db_options.name}constructor(t){if(!t)throw new Error("DbOptions is required");this._db_options=t,this._db=this.defineDb()}defineDb(){const{keyPath:t,name:n}=this._db_options;return n==="localStorage"||n==="sessionStorage"?new te(n):new qt(n,{keyPath:t})}getItem(t){return new Promise((n,s)=>{try{return this._db.getItem(t).then(r=>n(r))}catch(r){s(r)}})}removeItem(t){this._db.removeItem(t)}setItem(t,n){if(this._db instanceof qt)try{this._db.getItem(t).then(s=>{s?this._db.updateItem(s):this._db.setItem({storeName:t,...n})})}catch(s){H.error("Persister - setItem Error",s),this._db.setItem({storename:t,...n})}else this._db.setItem(n,t)}}class Fs{_store=new Map;clear(){this._store.clear()}keyToString(t){return typeof t=="number"?t.toString():t}async getItem(t){return this._store.get(this.keyToString(t))}removeItem(t){this._store.delete(this.keyToString(t))}removeItems(t){if(t)for(const n of this._store.keys())t.includes(n)||this._store.delete(n);else this._store.clear()}setItem(t,n){this._store.set(n,t)}}let G={};const Ks={clear:()=>G={},getItem:async e=>new Promise(t=>t(G[e])),removeItem:e=>delete G[e],removeItems:e=>e?e.forEach(t=>delete G[t]):G={},setItem:(e,t)=>{G[t]=e}};class Ut extends Ye{defineDb(){return this.dbName==="localStorage"||this.dbName==="sessionStorage"?Ks:new Fs}}class ae{_encoder=new TextEncoder;_key;_materialKey;static DECRYPT="decrypt";static ENCRYPT="encrypt";constructor(t){this._key=t}async getKey(t){return await crypto.subtle.deriveKey({name:"PBKDF2",salt:this._encoder.encode("salt"),iterations:1e5,hash:"SHA-256"},this._materialKey,{name:"AES-GCM",length:256},!1,[t])}async setKeyMaterial(t){this._materialKey=await crypto.subtle.importKey("raw",this._encoder.encode(t),{name:"PBKDF2"},!1,["deriveKey"])}async decrypt(t){const[n,s]=t.split(":"),r=await crypto.subtle.decrypt({name:"AES-GCM",iv:Uint8Array.from(atob(n),o=>o.charCodeAt(0))},await this.getKey(ae.DECRYPT),Uint8Array.from(atob(s),o=>o.charCodeAt(0)));return new TextDecoder().decode(r)}async encrypt(t){const n=crypto.getRandomValues(new Uint8Array(12)),s=await crypto.subtle.encrypt({name:"AES-GCM",iv:n},await this.getKey(ae.ENCRYPT),this._encoder.encode(t));return btoa(String.fromCharCode(...new Uint8Array(n)))+":"+btoa(String.fromCharCode(...new Uint8Array(s)))}async init(){this._materialKey||await this.setKeyMaterial(this._key)}}const Ge=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const Lt=()=>{},Hs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),qs=e=>e.startsWith("onUpdate:"),Se=Object.assign,O=Array.isArray,q=e=>typeof e=="function",$=e=>typeof e=="string",Us=e=>typeof e=="symbol",U=e=>e!==null&&typeof e=="object";let Wt;const ve=()=>Wt||(Wt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Xe(e){if(O(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=$(s)?Bs(s):Xe(s);if(r)for(const o in r)t[o]=r[o]}return t}else if($(e)||U(e))return e}const Ls=/;(?![^(]*\))/g,Ws=/:([^]+)/,zs=/\/\*[^]*?\*\//g;function Bs(e){const t={};return e.replace(zs,"").split(Ls).forEach(n=>{if(n){const s=n.split(Ws);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ze(e){let t="";if($(e))t=e;else if(O(e))for(let n=0;n<e.length;n++){const s=Ze(e[n]);s&&(t+=s+" ")}else if(U(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV,new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Us));function zt(e){return Qe(e)?zt(e.__v_raw):!!(e&&e.__v_isReactive)}function Qe(e){return!!(e&&e.__v_isReadonly)}function et(e){return!!(e&&e.__v_isShallow)}function tt(e){return e?!!e.__v_raw:!1}function T(e){const t=e&&e.__v_raw;return t?T(t):e}function nt(e){return e?e.__v_isRef===!0:!1}const L=[];function Js(e){L.push(e)}function Ys(){L.pop()}let st=!1;function X(e,...t){if(st)return;st=!0;const n=L.length?L[L.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=Gs();if(s)rt(s,n,11,[e+t.map(o=>{var i,c;return(c=(i=o.toString)==null?void 0:i.call(o))!=null?c:JSON.stringify(o)}).join(""),n&&n.proxy,r.map(({vnode:o})=>`at <${ln(n,o.type)}>`).join(`
3
+ `,...rs(r)),console.warn(...o)}Ue=!1}function ss(){let e=K[K.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function rs(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[`
4
+ `],...os(n))}),t}function os({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,r=` at <${Kt(e.component,e.type,s)}`,o=">"+n;return e.props?[r,...is(e.props),o]:[r+o]}function is(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...kt(s,e[s]))}),n.length>3&&t.push(" ..."),t}function kt(e,t,n){return V(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:m(t)?(t=kt(e,p(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):I(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=p(t),n?t:[`${e}=`,t])}const Vt={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Le(e,t,n,s){try{return s?e(...s):e()}catch(r){Ct(r,t,n)}}function Ct(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Pe;if(t){let c=t.parent;const l=t.proxy,f=process.env.NODE_ENV!=="production"?Vt[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;c;){const h=c.ec;if(h){for(let a=0;a<h.length;a++)if(h[a](e,l,f)===!1)return}c=c.parent}if(o){Le(o,null,10,[e,l,f]);return}}cs(e,n,r,s,i)}function cs(e,t,n,s=!0,r=!1){if(process.env.NODE_ENV!=="production"){const o=Vt[t];if(n&&ts(n),ie(`Unhandled error${o?` during execution of ${o}`:""}`),n&&ns(),s)throw e;console.error(e)}else{if(r)throw e;console.error(e)}}const S=[];let P=-1;const J=[];let j=null,Y=0;const as=Promise.resolve();let We=null;const ls=100;function us(e){let t=P+1,n=S.length;for(;t<n;){const s=t+n>>>1,r=S[s],o=ce(r);o<e||o===e&&r.flags&2?t=s+1:n=s}return t}function fs(e){if(!(e.flags&1)){const t=ce(e),n=S[S.length-1];!n||!(e.flags&2)&&t>=ce(n)?S.push(e):S.splice(us(t),0,e),e.flags|=1,Rt()}}function Rt(){We||(We=as.then(Pt))}function ps(e){g(e)?J.push(...e):j&&e.id===-1?j.splice(Y+1,0,e):e.flags&1||(J.push(e),e.flags|=1),Rt()}function hs(e){if(J.length){const t=[...new Set(J)].sort((n,s)=>ce(n)-ce(s));if(J.length=0,j){j.push(...t);return}for(j=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),Y=0;Y<j.length;Y++){const n=j[Y];process.env.NODE_ENV!=="production"&&xt(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}j=null,Y=0}}const ce=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Pt(e){process.env.NODE_ENV!=="production"&&(e=e||new Map);const t=process.env.NODE_ENV!=="production"?n=>xt(e,n):bn;try{for(P=0;P<S.length;P++){const n=S[P];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),Le(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;P<S.length;P++){const n=S[P];n&&(n.flags&=-2)}P=-1,S.length=0,hs(e),We=null,(S.length||J.length)&&Pt(e)}}function xt(e,t){const n=e.get(t)||0;if(n>ls){const s=t.i,r=s&&Ft(s.type);return Ct(`Maximum recursive updates exceeded${r?` in component <${r}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return e.set(t,n+1),!1}const ze=new Map;process.env.NODE_ENV!=="production"&&(fe().__VUE_HMR_RUNTIME__={createRecord:Be(ds),rerender:Be(_s),reload:Be(gs)});const _e=new Map;function ds(e,t){return _e.has(e)?!1:(_e.set(e,{initialDef:ge(t),instances:new Set}),!0)}function ge(e){return Ht(e)?e.__vccOpts:e}function _s(e,t){const n=_e.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(s=>{t&&(s.render=t,ge(s.type).render=t),s.renderCache=[],s.job.flags&8||s.update()}))}function gs(e,t){const n=_e.get(e);if(!n)return;t=ge(t),It(n.initialDef,t);const s=[...n.instances];for(let r=0;r<s.length;r++){const o=s[r],i=ge(o.type);let c=ze.get(i);c||(i!==n.initialDef&&It(i,t),ze.set(i,c=new Set)),c.add(o),o.appContext.propsCache.delete(o.type),o.appContext.emitsCache.delete(o.type),o.appContext.optionsCache.delete(o.type),o.ceReload?(c.add(o),o.ceReload(t.styles),c.delete(o)):o.parent?fs(()=>{o.job.flags&8||(o.parent.update(),c.delete(o))}):o.appContext.reload?o.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),o.root.ce&&o!==o.root&&o.root.ce._removeChildStyle(i)}ps(()=>{ze.clear()})}function It(e,t){M(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Be(e){return(t,n)=>{try{return e(t,n)}catch(s){console.error(s),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let ye=null,ys=null;const ms=e=>e.__isTeleport;function Dt(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Dt(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}fe().requestIdleCallback,fe().cancelIdleCallback;const bs=Symbol.for("v-ndc");process.env.NODE_ENV;const Ss={},jt=e=>Object.getPrototypeOf(e)===Ss,vs=e=>e.__isSuspense,$t=Symbol.for("v-fgt"),ws=Symbol.for("v-txt"),Es=Symbol.for("v-cmt");function Ns(e){return e?e.__v_isVNode===!0:!1}const Os=(...e)=>At(...e),Tt=({key:e})=>e??null,me=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?V(e)||m(e)||I(e)?{i:ye,r:e,k:t,f:!!n}:e:null);function ks(e,t=null,n=null,s=0,r=null,o=e===$t?0:1,i=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Tt(t),ref:t&&me(t),scopeId:ys,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ye};return c?(Je(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=V(n)?8:16),process.env.NODE_ENV!=="production"&&l.key!==l.key&&ie("VNode created with invalid key (NaN). VNode type:",l.type),l}const Vs=process.env.NODE_ENV!=="production"?Os:At;function At(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===bs)&&(process.env.NODE_ENV!=="production"&&!e&&ie(`Invalid vnode type when creating vnode: ${e}.`),e=Es),Ns(e)){const c=be(e,t,!0);return n&&Je(c,n),c.patchFlag=-2,c}if(Ht(e)&&(e=e.__vccOpts),t){t=Cs(t);let{class:c,style:l}=t;c&&!V(c)&&(t.class=De(c)),y(l)&&(oe(l)&&!g(l)&&(l=M({},l)),t.style=Ie(l))}const i=V(e)?1:vs(e)?128:ms(e)?64:y(e)?4:I(e)?2:0;return process.env.NODE_ENV!=="production"&&i&4&&oe(e)&&(e=p(e),ie("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
5
+ Component that was made reactive: `,e)),ks(e,t,n,s,r,i,o,!0)}function Cs(e){return e?oe(e)||jt(e)?M({},e):e:null}function be(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:c,transition:l}=e,f=t?Ps(r||{},t):r,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&Tt(f),ref:t&&t.ref?n&&o?g(o)?o.concat(me(t)):[o,me(t)]:me(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:process.env.NODE_ENV!=="production"&&i===-1&&g(c)?c.map(Mt):c,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==$t?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&be(e.ssContent),ssFallback:e.ssFallback&&be(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&s&&Dt(h,l.clone(h)),h}function Mt(e){const t=be(e);return g(e.children)&&(t.children=e.children.map(Mt)),t}function Rs(e=" ",t=0){return Vs(ws,null,e,t)}function Je(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(g(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Je(e,r()),r._c&&(r._d=!0));return}else n=32,!t._&&!jt(t)&&(t._ctx=ye);else I(t)?(t={default:t,_ctx:ye},n=32):(t=String(t),s&64?(n=16,t=[Rs(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ps(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=De([t.class,s.class]));else if(r==="style")t.style=Ie([t.style,s.style]);else if(Sn(r)){const o=t[r],i=s[r];i&&o!==i&&!(g(o)&&o.includes(i))?t[r]=o?[].concat(o,i):i:i==null&&o==null&&!vn(r)&&(t[r]=i)}else r!==""&&(t[r]=s[r])}return t}{const e=fe(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};t("__VUE_INSTANCE_SETTERS__",n=>n),t("__VUE_SSR_SETTERS__",n=>n)}process.env.NODE_ENV;const xs=/(?:^|[-_])\w/g,Is=e=>e.replace(xs,t=>t.toUpperCase()).replace(/[-_]/g,"");function Ft(e,t=!0){return I(e)?e.displayName||e.name:e.name||t&&e.__name}function Kt(e,t,n=!1){let s=Ft(t);if(!s&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(s=r[1])}if(!s&&e){const r=o=>{for(const i in o)if(o[i]===t)return i};s=r(e.components)||e.parent&&r(e.parent.type.components)||r(e.appContext.components)}return s?Is(s):n?"App":"Anonymous"}function Ht(e){return I(e)&&"__vccOpts"in e}function Ds(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},s={style:"color:#eb2f96"},r={__vue_custom_formatter:!0,header(a){if(!y(a))return null;if(a.__isVue)return["div",e,"VueInstance"];if(m(a)){const u=a.value;return["div",{},["span",e,h(a)],"<",c(u),">"]}else{if(qe(a))return["div",{},["span",e,b(a)?"ShallowReactive":"Reactive"],"<",c(a),`>${N(a)?" (readonly)":""}`];if(N(a))return["div",{},["span",e,b(a)?"ShallowReadonly":"Readonly"],"<",c(a),">"]}return null},hasBody(a){return a&&a.__isVue},body(a){if(a&&a.__isVue)return["div",{},...o(a.$)]}};function o(a){const u=[];a.type.props&&a.props&&u.push(i("props",p(a.props))),a.setupState!==Pe&&u.push(i("setup",a.setupState)),a.data!==Pe&&u.push(i("data",p(a.data)));const d=l(a,"computed");d&&u.push(i("computed",d));const _=l(a,"inject");return _&&u.push(i("injected",_)),u.push(["div",{},["span",{style:s.style+";opacity:0.66"},"$ (internal): "],["object",{object:a}]]),u}function i(a,u){return u=M({},u),Object.keys(u).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},a],["div",{style:"padding-left:1.25em"},...Object.keys(u).map(d=>["div",{},["span",s,d+": "],c(u[d],!1)])]]:["span",{}]}function c(a,u=!0){return typeof a=="number"?["span",t,a]:typeof a=="string"?["span",n,JSON.stringify(a)]:typeof a=="boolean"?["span",s,a]:y(a)?["object",{object:u?p(a):a}]:["span",n,String(a)]}function l(a,u){const d=a.type;if(I(d))return;const _={};for(const w in a.ctx)f(d,w,u)&&(_[w]=a.ctx[w]);return _}function f(a,u,d){const _=a[d];if(g(_)&&_.includes(u)||y(_)&&u in _||a.extends&&f(a.extends,u,d)||a.mixins&&a.mixins.some(w=>f(w,u,d)))return!0}function h(a){return b(a)?"ShallowRef":a.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(r):window.devtoolsFormatters=[r]}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;function js(){Ds()}process.env.NODE_ENV!=="production"&&js();const $s=new Set(["_","$"]);function Ts(e){return $s.has(e[0])}class As extends hn{_onAction;_options;_store;_subscriptions={};_storeSubscribe;static _requiredKeys;get onAction(){if(this._onAction)return()=>({store:this.store,callback:this._onAction})}set onAction(t){this._onAction=t}get options(){return this._options}get state(){return this._store.$state}set state(t){this._store.$state=t}get store(){return this._store}get storeSubscribe(){if(this._storeSubscribe)return()=>({store:this.store,callback:this._storeSubscribe})}set storeSubscribe(t){this._storeSubscribe=t}constructor(t,n,s=!1,r){super(s,r),this._options=n.storeOptions,this._store=t}addToState(t,n){this.isOptionApi()||n?.value||(n=Ot(n)),this.state[t]=n,this.store[t]=Qn(this.state,t)}addSubscription(t,n,s){this._subscriptions[t]={subscription:n,...s??{}}}static customizeStore(t,n,s=!1,r){if(n.storeOptions&&this.hasRequiredKeys(n.storeOptions))return new this(t,n,s,r)}hasDeniedFirstChar(t){return Ts(t[0])}static hasRequiredKeys(t){return this._requiredKeys!==void 0&&this._requiredKeys?.every(n=>!!t[n])}getOption(t){return this.options&&this.options[t]}getStatePropertyValue(t){return this.getValue(this.state[t])}getSubscriptions(){if(!W(this._subscriptions))return this._subscriptions}getValue(t){return t?.__v_isRef?t.value:t}isOptionApi(){return this.store._isOptionsAPI}stateHas(t){return this.state.hasOwnProperty(t)}storeHas(t){return this.store.hasOwnProperty(t)}}const Ye="pinia-plugin-persist-state";class Ms extends yn{_pluginName=Ye}const H=new Ms;let qt=class{_db;_localStorageVersionKey="IDBVersion";_name="persistStore";_objectStore;_objectStoreOptions;_objectStoreName;_transactionMode="readwrite";_version;constructor(t,n,s){this._objectStoreName=t,this._version=this.getStoredVersionNumber(),n&&(this._objectStoreOptions=n),s&&(this._transactionMode=s)}clear(){const t=()=>{if(this._objectStore){const n=this._objectStore.clear();this.requestEventsHandler(n,{error:()=>this.onError(n.error)})}};this.open({success:t})}createObjectStore(){this._db&&!this._db.objectStoreNames.contains(this._objectStoreName)&&this._db.createObjectStore(this._objectStoreName,this._objectStoreOptions)}deleteObjectStore(){const t=()=>{this._db?.deleteObjectStore(this._objectStoreName)};this.open({success:t})}async getItem(t){return new Promise(n=>{const s=()=>{if(this._objectStore){const r=this._objectStore.get(t);this.requestEventsHandler(r,{error:()=>this.onError(r.error,()=>n(void 0)),success:()=>n(r.result)})}};this.open({success:s})})}async getObjectStoreItem(t,n){return new Promise(s=>{const r=()=>{if(this._objectStore){const i=this._objectStore.index(t).get(n);this.requestEventsHandler(i,{error:()=>s(void 0),success:()=>s(i.result)})}};this.open({success:r})})}getStoredVersionNumber(){if(!localStorage)return 1;const t=localStorage.getItem(this._localStorageVersionKey);return t?parseInt(t):1}handleDeleteRequest(t,n){t.onerror=()=>H.error(`IndexedDB - Item "${n}" remove`,t.error)}onError(t,n){n&&n(t)}open(t){const n=indexedDB.open(this._name,this._version),s=()=>{this._db=n.result},r=i=>{try{if(s(),!this._db)return;const c=this._db.transaction(this._objectStoreName,this._transactionMode);c.onerror=()=>this.onError(c.error),this._objectStore=c.objectStore(this._objectStoreName),this._objectStore&&i()}catch(c){H.error("indexedDB - transaction error",[c])}};if(t?.success){const i=t.success;t.success=()=>r(i)}if(t?.upgrade){const i=t.upgrade.bind(this);t.upgrade=()=>{s(),i()}}const o=()=>{const i=c=>{if(c?.name==="VersionError"){this._version++,this.saveVersion(),this.open(t);return}t?.error&&t.error(c)};this.onError(n.error,i)};return t&&this.openRequestEventsHandler(n,{...t,error:o}),n}openRequestEventsHandler(t,n){this.requestEventsHandler(t,n),n.upgrade&&(t.onupgradeneeded=n.upgrade)}removeItem(t){const n=()=>{if(this._objectStore){const s=this._objectStore.delete(t);this.handleDeleteRequest(s,t)}};this.open({success:n})}removeItems(t){const n=()=>{if(this._objectStore){const s=this._objectStore.getAllKeys(),r=()=>{s.result.forEach(c=>{if(this._objectStore&&(!t||!t.includes(c))){const l=this._objectStore.delete(c);this.handleDeleteRequest(l,c)}})},o=()=>H.error("IndexedDB - removeItems",[s.error]);this.requestEventsHandler(s,{error:o,success:r})}};this.open({success:n})}requestEventsHandler(t,n){const{error:s,success:r}=n;s&&(t.onerror=s),r&&(t.onsuccess=r)}saveVersion(){localStorage&&localStorage.setItem(this._localStorageVersionKey,this._version.toString())}setItem(t,n){const s=()=>{if(this._objectStore){const o=this._objectStore.add(t);if(n){const i=()=>{n.forEach(l=>{this._objectStore?.createIndex(l,l,{unique:!0}),H.log(`"${l}" index created`)})},c=()=>this.onError(o.error);this.requestEventsHandler(o,{error:c,success:i})}}},r=this.createObjectStore;this.open({success:s,upgrade:r})}updateItem(t){const n=()=>{if(this._objectStore){const s=this._objectStore.put(t);s.onerror=()=>H.error("update item",[s.error,t])}};this.open({success:n})}};class Ge{_db;_db_options;get dbName(){return this._db_options.name}constructor(t){if(!t)throw new Error("DbOptions is required");this._db_options=t,this._db=this.defineDb()}defineDb(){const{keyPath:t,name:n}=this._db_options;return n==="localStorage"||n==="sessionStorage"?new te(n):new qt(n,{keyPath:t})}getItem(t){return new Promise((n,s)=>{try{return this._db.getItem(t).then(r=>n(r))}catch(r){s(r)}})}removeItem(t){this._db.removeItem(t)}setItem(t,n){if(this._db instanceof qt)try{this._db.getItem(t).then(s=>{s?this._db.updateItem(s):this._db.setItem({storeName:t,...n})})}catch(s){H.error("Persister - setItem Error",s),this._db.setItem({storename:t,...n})}else this._db.setItem(n,t)}}class Fs{_store=new Map;clear(){this._store.clear()}keyToString(t){return typeof t=="number"?t.toString():t}async getItem(t){return this._store.get(this.keyToString(t))}removeItem(t){this._store.delete(this.keyToString(t))}removeItems(t){if(t)for(const n of this._store.keys())t.includes(n)||this._store.delete(n);else this._store.clear()}setItem(t,n){this._store.set(n,t)}}let G={};const Ks={clear:()=>G={},getItem:async e=>new Promise(t=>t(G[e])),removeItem:e=>delete G[e],removeItems:e=>e?e.forEach(t=>delete G[t]):G={},setItem:(e,t)=>{G[t]=e}};class Ut extends Ge{defineDb(){return this.dbName==="localStorage"||this.dbName==="sessionStorage"?Ks:new Fs}}class ae{_encoder=new TextEncoder;_key;_materialKey;static DECRYPT="decrypt";static ENCRYPT="encrypt";constructor(t){this._key=t}async getKey(t){return await crypto.subtle.deriveKey({name:"PBKDF2",salt:this._encoder.encode("salt"),iterations:1e5,hash:"SHA-256"},this._materialKey,{name:"AES-GCM",length:256},!1,[t])}async setKeyMaterial(t){this._materialKey=await crypto.subtle.importKey("raw",this._encoder.encode(t),{name:"PBKDF2"},!1,["deriveKey"])}async decrypt(t){const[n,s]=t.split(":"),r=await crypto.subtle.decrypt({name:"AES-GCM",iv:Uint8Array.from(atob(n),o=>o.charCodeAt(0))},await this.getKey(ae.DECRYPT),Uint8Array.from(atob(s),o=>o.charCodeAt(0)));return new TextDecoder().decode(r)}async encrypt(t){const n=crypto.getRandomValues(new Uint8Array(12)),s=await crypto.subtle.encrypt({name:"AES-GCM",iv:n},await this.getKey(ae.ENCRYPT),this._encoder.encode(t));return btoa(String.fromCharCode(...new Uint8Array(n)))+":"+btoa(String.fromCharCode(...new Uint8Array(s)))}async init(){this._materialKey||await this.setKeyMaterial(this._key)}}const Xe=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const Lt=()=>{},Hs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),qs=e=>e.startsWith("onUpdate:"),Se=Object.assign,O=Array.isArray,q=e=>typeof e=="function",$=e=>typeof e=="string",Us=e=>typeof e=="symbol",U=e=>e!==null&&typeof e=="object";let Wt;const ve=()=>Wt||(Wt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ze(e){if(O(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=$(s)?Bs(s):Ze(s);if(r)for(const o in r)t[o]=r[o]}return t}else if($(e)||U(e))return e}const Ls=/;(?![^(]*\))/g,Ws=/:([^]+)/,zs=/\/\*[^]*?\*\//g;function Bs(e){const t={};return e.replace(zs,"").split(Ls).forEach(n=>{if(n){const s=n.split(Ws);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Qe(e){let t="";if($(e))t=e;else if(O(e))for(let n=0;n<e.length;n++){const s=Qe(e[n]);s&&(t+=s+" ")}else if(U(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV,new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Us));function zt(e){return et(e)?zt(e.__v_raw):!!(e&&e.__v_isReactive)}function et(e){return!!(e&&e.__v_isReadonly)}function tt(e){return!!(e&&e.__v_isShallow)}function nt(e){return e?!!e.__v_raw:!1}function T(e){const t=e&&e.__v_raw;return t?T(t):e}function st(e){return e?e.__v_isRef===!0:!1}const L=[];function Js(e){L.push(e)}function Ys(){L.pop()}let rt=!1;function X(e,...t){if(rt)return;rt=!0;const n=L.length?L[L.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=Gs();if(s)ot(s,n,11,[e+t.map(o=>{var i,c;return(c=(i=o.toString)==null?void 0:i.call(o))!=null?c:JSON.stringify(o)}).join(""),n&&n.proxy,r.map(({vnode:o})=>`at <${ln(n,o.type)}>`).join(`
6
6
  `),r]);else{const o=[`[Vue warn]: ${e}`,...t];r.length&&o.push(`
7
- `,...Xs(r)),console.warn(...o)}st=!1}function Gs(){let e=L[L.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function Xs(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[`
8
- `],...Zs(n))}),t}function Zs({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,r=` at <${ln(e.component,e.type,s)}`,o=">"+n;return e.props?[r,...Qs(e.props),o]:[r+o]}function Qs(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...Bt(s,e[s]))}),n.length>3&&t.push(" ..."),t}function Bt(e,t,n){return $(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:nt(t)?(t=Bt(e,T(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):q(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=T(t),n?t:[`${e}=`,t])}const Jt={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function rt(e,t,n,s){try{return s?e(...s):e()}catch(r){Yt(r,t,n)}}function Yt(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Ge;if(t){let c=t.parent;const l=t.proxy,f=process.env.NODE_ENV!=="production"?Jt[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;c;){const h=c.ec;if(h){for(let a=0;a<h.length;a++)if(h[a](e,l,f)===!1)return}c=c.parent}if(o){rt(o,null,10,[e,l,f]);return}}er(e,n,r,s,i)}function er(e,t,n,s=!0,r=!1){if(process.env.NODE_ENV!=="production"){const o=Jt[t];if(n&&Js(n),X(`Unhandled error${o?` during execution of ${o}`:""}`),n&&Ys(),s)throw e;console.error(e)}else{if(r)throw e;console.error(e)}}const v=[];let I=-1;const Z=[];let A=null,Q=0;const tr=Promise.resolve();let ot=null;const nr=100;function sr(e){let t=I+1,n=v.length;for(;t<n;){const s=t+n>>>1,r=v[s],o=le(r);o<e||o===e&&r.flags&2?t=s+1:n=s}return t}function rr(e){if(!(e.flags&1)){const t=le(e),n=v[v.length-1];!n||!(e.flags&2)&&t>=le(n)?v.push(e):v.splice(sr(t),0,e),e.flags|=1,Gt()}}function Gt(){ot||(ot=tr.then(Xt))}function or(e){O(e)?Z.push(...e):A&&e.id===-1?A.splice(Q+1,0,e):e.flags&1||(Z.push(e),e.flags|=1),Gt()}function ir(e){if(Z.length){const t=[...new Set(Z)].sort((n,s)=>le(n)-le(s));if(Z.length=0,A){A.push(...t);return}for(A=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),Q=0;Q<A.length;Q++){const n=A[Q];process.env.NODE_ENV!=="production"&&Zt(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}A=null,Q=0}}const le=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Xt(e){process.env.NODE_ENV!=="production"&&(e=e||new Map);const t=process.env.NODE_ENV!=="production"?n=>Zt(e,n):Lt;try{for(I=0;I<v.length;I++){const n=v[I];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),rt(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;I<v.length;I++){const n=v[I];n&&(n.flags&=-2)}I=-1,v.length=0,ir(e),ot=null,(v.length||Z.length)&&Xt(e)}}function Zt(e,t){const n=e.get(t)||0;if(n>nr){const s=t.i,r=s&&an(s.type);return Yt(`Maximum recursive updates exceeded${r?` in component <${r}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return e.set(t,n+1),!1}const it=new Map;process.env.NODE_ENV!=="production"&&(ve().__VUE_HMR_RUNTIME__={createRecord:ct(cr),rerender:ct(ar),reload:ct(lr)});const we=new Map;function cr(e,t){return we.has(e)?!1:(we.set(e,{initialDef:Ee(t),instances:new Set}),!0)}function Ee(e){return un(e)?e.__vccOpts:e}function ar(e,t){const n=we.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(s=>{t&&(s.render=t,Ee(s.type).render=t),s.renderCache=[],s.job.flags&8||s.update()}))}function lr(e,t){const n=we.get(e);if(!n)return;t=Ee(t),Qt(n.initialDef,t);const s=[...n.instances];for(let r=0;r<s.length;r++){const o=s[r],i=Ee(o.type);let c=it.get(i);c||(i!==n.initialDef&&Qt(i,t),it.set(i,c=new Set)),c.add(o),o.appContext.propsCache.delete(o.type),o.appContext.emitsCache.delete(o.type),o.appContext.optionsCache.delete(o.type),o.ceReload?(c.add(o),o.ceReload(t.styles),c.delete(o)):o.parent?rr(()=>{o.job.flags&8||(o.parent.update(),c.delete(o))}):o.appContext.reload?o.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),o.root.ce&&o!==o.root&&o.root.ce._removeChildStyle(i)}or(()=>{it.clear()})}function Qt(e,t){Se(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function ct(e){return(t,n)=>{try{return e(t,n)}catch(s){console.error(s),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let ee,Ne=[];function en(e,t){var n,s;ee=e,ee?(ee.enabled=!0,Ne.forEach(({event:r,args:o})=>ee.emit(r,...o)),Ne=[]):typeof window<"u"&&window.HTMLElement&&!((s=(n=window.navigator)==null?void 0:n.userAgent)!=null&&s.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{en(o,t)}),setTimeout(()=>{ee||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Ne=[])},3e3)):Ne=[]}let Oe=null,ur=null;const fr=e=>e.__isTeleport;function tn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,tn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}ve().requestIdleCallback,ve().cancelIdleCallback;const pr=Symbol.for("v-ndc"),hr={};process.env.NODE_ENV!=="production"&&(hr.ownKeys=e=>(X("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));const dr={},nn=e=>Object.getPrototypeOf(e)===dr,_r=e=>e.__isSuspense,sn=Symbol.for("v-fgt"),gr=Symbol.for("v-txt"),yr=Symbol.for("v-cmt");function mr(e){return e?e.__v_isVNode===!0:!1}const br=(...e)=>on(...e),rn=({key:e})=>e??null,ke=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?$(e)||nt(e)||q(e)?{i:Oe,r:e,k:t,f:!!n}:e:null);function Sr(e,t=null,n=null,s=0,r=null,o=e===sn?0:1,i=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&rn(t),ref:t&&ke(t),scopeId:ur,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Oe};return c?(at(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=$(n)?8:16),process.env.NODE_ENV!=="production"&&l.key!==l.key&&X("VNode created with invalid key (NaN). VNode type:",l.type),l}const vr=process.env.NODE_ENV!=="production"?br:on;function on(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===pr)&&(process.env.NODE_ENV!=="production"&&!e&&X(`Invalid vnode type when creating vnode: ${e}.`),e=yr),mr(e)){const c=Ve(e,t,!0);return n&&at(c,n),c.patchFlag=-2,c}if(un(e)&&(e=e.__vccOpts),t){t=wr(t);let{class:c,style:l}=t;c&&!$(c)&&(t.class=Ze(c)),U(l)&&(tt(l)&&!O(l)&&(l=Se({},l)),t.style=Xe(l))}const i=$(e)?1:_r(e)?128:fr(e)?64:U(e)?4:q(e)?2:0;return process.env.NODE_ENV!=="production"&&i&4&&tt(e)&&(e=T(e),X("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
9
- Component that was made reactive: `,e)),Sr(e,t,n,s,r,i,o,!0)}function wr(e){return e?tt(e)||nn(e)?Se({},e):e:null}function Ve(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:c,transition:l}=e,f=t?Nr(r||{},t):r,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&rn(f),ref:t&&t.ref?n&&o?O(o)?o.concat(ke(t)):[o,ke(t)]:ke(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:process.env.NODE_ENV!=="production"&&i===-1&&O(c)?c.map(cn):c,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==sn?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ve(e.ssContent),ssFallback:e.ssFallback&&Ve(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&s&&tn(h,l.clone(h)),h}function cn(e){const t=Ve(e);return O(e.children)&&(t.children=e.children.map(cn)),t}function Er(e=" ",t=0){return vr(gr,null,e,t)}function at(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(O(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),at(e,r()),r._c&&(r._d=!0));return}else n=32,!t._&&!nn(t)&&(t._ctx=Oe);else q(t)?(t={default:t,_ctx:Oe},n=32):(t=String(t),s&64?(n=16,t=[Er(t)]):n=8);e.children=t,e.shapeFlag|=n}function Nr(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=Ze([t.class,s.class]));else if(r==="style")t.style=Xe([t.style,s.style]);else if(Hs(r)){const o=t[r],i=s[r];i&&o!==i&&!(O(o)&&o.includes(i))?t[r]=o?[].concat(o,i):i:i==null&&o==null&&!qs(r)&&(t[r]=i)}else r!==""&&(t[r]=s[r])}return t}{const e=ve(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};t("__VUE_INSTANCE_SETTERS__",n=>n),t("__VUE_SSR_SETTERS__",n=>n)}process.env.NODE_ENV;const Or=/(?:^|[-_])\w/g,kr=e=>e.replace(Or,t=>t.toUpperCase()).replace(/[-_]/g,"");function an(e,t=!0){return q(e)?e.displayName||e.name:e.name||t&&e.__name}function ln(e,t,n=!1){let s=an(t);if(!s&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(s=r[1])}if(!s&&e){const r=o=>{for(const i in o)if(o[i]===t)return i};s=r(e.components)||e.parent&&r(e.parent.type.components)||r(e.appContext.components)}return s?kr(s):n?"App":"Anonymous"}function un(e){return q(e)&&"__vccOpts"in e}function Vr(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},s={style:"color:#eb2f96"},r={__vue_custom_formatter:!0,header(a){if(!U(a))return null;if(a.__isVue)return["div",e,"VueInstance"];if(nt(a)){const u=a.value;return["div",{},["span",e,h(a)],"<",c(u),">"]}else{if(zt(a))return["div",{},["span",e,et(a)?"ShallowReactive":"Reactive"],"<",c(a),`>${Qe(a)?" (readonly)":""}`];if(Qe(a))return["div",{},["span",e,et(a)?"ShallowReadonly":"Readonly"],"<",c(a),">"]}return null},hasBody(a){return a&&a.__isVue},body(a){if(a&&a.__isVue)return["div",{},...o(a.$)]}};function o(a){const u=[];a.type.props&&a.props&&u.push(i("props",T(a.props))),a.setupState!==Ge&&u.push(i("setup",a.setupState)),a.data!==Ge&&u.push(i("data",T(a.data)));const d=l(a,"computed");d&&u.push(i("computed",d));const _=l(a,"inject");return _&&u.push(i("injected",_)),u.push(["div",{},["span",{style:s.style+";opacity:0.66"},"$ (internal): "],["object",{object:a}]]),u}function i(a,u){return u=Se({},u),Object.keys(u).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},a],["div",{style:"padding-left:1.25em"},...Object.keys(u).map(d=>["div",{},["span",s,d+": "],c(u[d],!1)])]]:["span",{}]}function c(a,u=!0){return typeof a=="number"?["span",t,a]:typeof a=="string"?["span",n,JSON.stringify(a)]:typeof a=="boolean"?["span",s,a]:U(a)?["object",{object:u?T(a):a}]:["span",n,String(a)]}function l(a,u){const d=a.type;if(q(d))return;const _={};for(const w in a.ctx)f(d,w,u)&&(_[w]=a.ctx[w]);return _}function f(a,u,d){const _=a[d];if(O(_)&&_.includes(u)||U(_)&&u in _||a.extends&&f(a.extends,u,d)||a.mixins&&a.mixins.some(w=>f(w,u,d)))return!0}function h(a){return et(a)?"ShallowRef":a.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(r):window.devtoolsFormatters=[r]}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;function Cr(){Vr()}process.env.NODE_ENV!=="production"&&Cr();const Rr=["@context","activeLink","computed","dep","excludedKeys","fn","isEncrypted","isLoading","subs","version"];class fn extends As{_crypt;_excludedKeys;_persister;_propertiesToEncrypt;_watchedStore;constructor(t,n,s,r){super(t,n,s,r);const{crypt:o,persister:i,watchedStore:c}=n;this._excludedKeys=this.initExcludedKeys(),this.definePersister(i),this._propertiesToEncrypt=new Set(this.getPropertiesToEncrypt()),this._watchedStore=c,o&&(this._crypt=o,this.options&&(this.options.isEncrypted=!1)),this.augmentStore(),this.remember(),this.debugLog("StorePersister constructor",{toBeWatched:this.toBeWatched(),watchedStore:c,persister:i,store:t,options:n}),this.toBeWatched()&&(this._watchedStore.add(this.store.$id),this.storeSubscribe=this.storeSubscription.bind(this))}augmentStore(){const{isEncrypted:t,persistedPropertiesToEncrypt:n,watchMutation:s}=this.options;t===void 0&&(this.options.isEncrypted=!1),n===void 0&&(this.options.persistedPropertiesToEncrypt=[]),s===void 0&&(this.options.watchMutation=!1),this.stateHas("isLoading")||this.addToState("isLoading",!1),this.store.persistState=async()=>await this.persist(),this.store.remember=async()=>await this.remember(),this.store.removePersistedState=this.removePersistedState.bind(this),this.store.watch=this.watch,this.store.stopWatch=this.stopWatch}async cryptProperty(t,n,s=!1){return s?await t.decrypt(n):await t.encrypt(n)}async cryptState(t,n=!1){return await new Promise(async s=>{const r=this._crypt,o=this.getPropertiesToEncrypt(),i=this.isEncrypted();if(this.debugLog(`cryptState - ${this.store.$id} ${n?"decrypt":"crypt"}`,{can:this._propertiesToEncrypt.size>0&&i===n&&!!r,Crypt:r,state:t}),this._propertiesToEncrypt.size>0&&r){const c={};for(const l of o){const f=this.getValue(t[l]);f&&(c[l]=await this.cryptProperty(r,f,n))}this.debugLog(`cryptState - ${this.store.$id}`,{encryptedState:c}),W(c)||(t={...t,...c},this.options&&(this.options.isEncrypted=!n))}s(t)})}static customizeStore(t,n,s,r){return!n.storeOptions?.persist&&n.storeOptions?.watchMutation&&(n.storeOptions.persist=!0),super.customizeStore(t,n,s,r)}definePersister(t){this._persister=this.options.dbName?new Ye({name:this.options.dbName,keyPath:"storeName"}):t}isEncrypted(){return this.options.isEncrypted}getPropertiesToEncrypt(){return this.options?.persistedPropertiesToEncrypt??[]}async getPersistedState(t=!0){const n=this.store.$id;try{let s=await this._persister.getItem(n);return t&&this.toBeCrypted()&&s&&(await this._crypt?.init(),s=await this.cryptState(s,!0)),this.debugLog(`getPersistedState ${n}`,{persistedState:s,state:this.state}),s}catch(s){this.logError("getPersistedState()",{storeName:n,e:s})}}async getStateToPersist(){const t=this._excludedKeys,n=this.state,s=this._propertiesToEncrypt.size>0,r=this._crypt;s&&await r.init();const o={};for(const i of Object.keys(n))if(!this.hasDeniedFirstChar(i[0])&&!t.has(i)){const c=n[i];W(c)||(s&&this._propertiesToEncrypt.has(i)?o[i]=await this.cryptProperty(r,c,!1):o[i]=T(c))}return o}getWatchMutation(){return this.options.watchMutation}static hasRequiredKeys(t){return!!t?.persist||!!t?.watchMutation}initExcludedKeys(){return new Set([...Rr,...this.options.excludedKeys??[]])}async persist(){const t=await this.getStateToPersist();this.debugLog(`persist() ${this.store.$id} - stateToPersist:`,{state:t}),W(t)||this._persister.setItem(this.store.$id,t)}propertyShouldBePersisted(t){return!this._excludedKeys.has(t)}async remember(){return this.state.isLoading=!0,new Promise(async t=>{let n=await this.getPersistedState();return n&&!W(n)&&this.store.$patch(n),this.state.isLoading=!1,t(!0)})}removePersistedState(){this._persister.removeItem(this.store.$id)}stopWatch(){this.options?.watchMutation&&(this.options&&(this.options.watchMutation=!1),this._watchedStore.delete(this.store.$id))}storeSubscription(t){this.debugLog(`store.storeSubscription() ${this.store.$id}`,["mutation type !== patch object: ",t.type!=="patch object","watchMutation: ",this.getWatchMutation(),"mutation:",t,"state:",this.state,"store:",this.store]),t.type!=="patch object"&&this.getWatchMutation()&&this.persist().then(()=>{this.store.mutationCallback&&this.store.mutationCallback(this.state,t)})}toBeCrypted(){return!!(this._crypt&&this.getPropertiesToEncrypt())}toBeWatched(){return!this._watchedStore.has(this.store.$id)}watch(){this.toBeWatched()&&(this.options&&(this.options.watchMutation=!0),this.storeSubscribe=this.storeSubscription.bind(this))}}class xr extends pn{_resetStoreCallback=t=>{const{removePersistedState:n}=t;typeof n=="function"&&n()};constructor(){super(Je,fn.customizeStore.bind(fn),H)}}const Ce=new xr;function Ir(e,t){return Ce.pluginOptions=Pr(e,t),Ce}function Pr(e,t){let n,s;const r=new Set;try{if(window)return!W(e)&&e&&(n=new Ye({name:e,keyPath:"storeName"})),t&&(s=new ae(t)),{persister:n,crypt:s,watchedStore:r}}catch{}return{persister:n,crypt:s,watchedStore:r}}function Dr(e,t){let n;return t&&(n=new ae(t)),Ce.pluginOptions={persister:new Ut({name:e}),crypt:n,watchedStore:new Set},Ce}k.PLUGIN_NAME=Je,k.PersisterMock=Ut,k.createPersistStatePlugin=Ir,k.createPluginMock=Dr,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})}));
7
+ `,...Xs(r)),console.warn(...o)}rt=!1}function Gs(){let e=L[L.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function Xs(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[`
8
+ `],...Zs(n))}),t}function Zs({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,r=` at <${ln(e.component,e.type,s)}`,o=">"+n;return e.props?[r,...Qs(e.props),o]:[r+o]}function Qs(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...Bt(s,e[s]))}),n.length>3&&t.push(" ..."),t}function Bt(e,t,n){return $(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:st(t)?(t=Bt(e,T(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):q(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=T(t),n?t:[`${e}=`,t])}const Jt={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function ot(e,t,n,s){try{return s?e(...s):e()}catch(r){Yt(r,t,n)}}function Yt(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Xe;if(t){let c=t.parent;const l=t.proxy,f=process.env.NODE_ENV!=="production"?Jt[n]:`https://vuejs.org/error-reference/#runtime-${n}`;for(;c;){const h=c.ec;if(h){for(let a=0;a<h.length;a++)if(h[a](e,l,f)===!1)return}c=c.parent}if(o){ot(o,null,10,[e,l,f]);return}}er(e,n,r,s,i)}function er(e,t,n,s=!0,r=!1){if(process.env.NODE_ENV!=="production"){const o=Jt[t];if(n&&Js(n),X(`Unhandled error${o?` during execution of ${o}`:""}`),n&&Ys(),s)throw e;console.error(e)}else{if(r)throw e;console.error(e)}}const v=[];let x=-1;const Z=[];let A=null,Q=0;const tr=Promise.resolve();let it=null;const nr=100;function sr(e){let t=x+1,n=v.length;for(;t<n;){const s=t+n>>>1,r=v[s],o=le(r);o<e||o===e&&r.flags&2?t=s+1:n=s}return t}function rr(e){if(!(e.flags&1)){const t=le(e),n=v[v.length-1];!n||!(e.flags&2)&&t>=le(n)?v.push(e):v.splice(sr(t),0,e),e.flags|=1,Gt()}}function Gt(){it||(it=tr.then(Xt))}function or(e){O(e)?Z.push(...e):A&&e.id===-1?A.splice(Q+1,0,e):e.flags&1||(Z.push(e),e.flags|=1),Gt()}function ir(e){if(Z.length){const t=[...new Set(Z)].sort((n,s)=>le(n)-le(s));if(Z.length=0,A){A.push(...t);return}for(A=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),Q=0;Q<A.length;Q++){const n=A[Q];process.env.NODE_ENV!=="production"&&Zt(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}A=null,Q=0}}const le=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Xt(e){process.env.NODE_ENV!=="production"&&(e=e||new Map);const t=process.env.NODE_ENV!=="production"?n=>Zt(e,n):Lt;try{for(x=0;x<v.length;x++){const n=v[x];if(n&&!(n.flags&8)){if(process.env.NODE_ENV!=="production"&&t(n))continue;n.flags&4&&(n.flags&=-2),ot(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;x<v.length;x++){const n=v[x];n&&(n.flags&=-2)}x=-1,v.length=0,ir(e),it=null,(v.length||Z.length)&&Xt(e)}}function Zt(e,t){const n=e.get(t)||0;if(n>nr){const s=t.i,r=s&&an(s.type);return Yt(`Maximum recursive updates exceeded${r?` in component <${r}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return e.set(t,n+1),!1}const ct=new Map;process.env.NODE_ENV!=="production"&&(ve().__VUE_HMR_RUNTIME__={createRecord:at(cr),rerender:at(ar),reload:at(lr)});const we=new Map;function cr(e,t){return we.has(e)?!1:(we.set(e,{initialDef:Ee(t),instances:new Set}),!0)}function Ee(e){return un(e)?e.__vccOpts:e}function ar(e,t){const n=we.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(s=>{t&&(s.render=t,Ee(s.type).render=t),s.renderCache=[],s.job.flags&8||s.update()}))}function lr(e,t){const n=we.get(e);if(!n)return;t=Ee(t),Qt(n.initialDef,t);const s=[...n.instances];for(let r=0;r<s.length;r++){const o=s[r],i=Ee(o.type);let c=ct.get(i);c||(i!==n.initialDef&&Qt(i,t),ct.set(i,c=new Set)),c.add(o),o.appContext.propsCache.delete(o.type),o.appContext.emitsCache.delete(o.type),o.appContext.optionsCache.delete(o.type),o.ceReload?(c.add(o),o.ceReload(t.styles),c.delete(o)):o.parent?rr(()=>{o.job.flags&8||(o.parent.update(),c.delete(o))}):o.appContext.reload?o.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),o.root.ce&&o!==o.root&&o.root.ce._removeChildStyle(i)}or(()=>{ct.clear()})}function Qt(e,t){Se(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function at(e){return(t,n)=>{try{return e(t,n)}catch(s){console.error(s),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let ee,Ne=[];function en(e,t){var n,s;ee=e,ee?(ee.enabled=!0,Ne.forEach(({event:r,args:o})=>ee.emit(r,...o)),Ne=[]):typeof window<"u"&&window.HTMLElement&&!((s=(n=window.navigator)==null?void 0:n.userAgent)!=null&&s.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{en(o,t)}),setTimeout(()=>{ee||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Ne=[])},3e3)):Ne=[]}let Oe=null,ur=null;const fr=e=>e.__isTeleport;function tn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,tn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}ve().requestIdleCallback,ve().cancelIdleCallback;const pr=Symbol.for("v-ndc"),hr={};process.env.NODE_ENV!=="production"&&(hr.ownKeys=e=>(X("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));const dr={},nn=e=>Object.getPrototypeOf(e)===dr,_r=e=>e.__isSuspense,sn=Symbol.for("v-fgt"),gr=Symbol.for("v-txt"),yr=Symbol.for("v-cmt");function mr(e){return e?e.__v_isVNode===!0:!1}const br=(...e)=>on(...e),rn=({key:e})=>e??null,ke=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?$(e)||st(e)||q(e)?{i:Oe,r:e,k:t,f:!!n}:e:null);function Sr(e,t=null,n=null,s=0,r=null,o=e===sn?0:1,i=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&rn(t),ref:t&&ke(t),scopeId:ur,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Oe};return c?(Ce(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=$(n)?8:16),process.env.NODE_ENV!=="production"&&l.key!==l.key&&X("VNode created with invalid key (NaN). VNode type:",l.type),l}const vr=process.env.NODE_ENV!=="production"?br:on;function on(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===pr)&&(process.env.NODE_ENV!=="production"&&!e&&X(`Invalid vnode type when creating vnode: ${e}.`),e=yr),mr(e)){const c=Ve(e,t,!0);return n&&Ce(c,n),c.patchFlag=-2,c}if(un(e)&&(e=e.__vccOpts),t){t=wr(t);let{class:c,style:l}=t;c&&!$(c)&&(t.class=Qe(c)),U(l)&&(nt(l)&&!O(l)&&(l=Se({},l)),t.style=Ze(l))}const i=$(e)?1:_r(e)?128:fr(e)?64:U(e)?4:q(e)?2:0;return process.env.NODE_ENV!=="production"&&i&4&&nt(e)&&(e=T(e),X("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
9
+ Component that was made reactive: `,e)),Sr(e,t,n,s,r,i,o,!0)}function wr(e){return e?nt(e)||nn(e)?Se({},e):e:null}function Ve(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:c,transition:l}=e,f=t?Nr(r||{},t):r,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&rn(f),ref:t&&t.ref?n&&o?O(o)?o.concat(ke(t)):[o,ke(t)]:ke(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:process.env.NODE_ENV!=="production"&&i===-1&&O(c)?c.map(cn):c,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==sn?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ve(e.ssContent),ssFallback:e.ssFallback&&Ve(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&s&&tn(h,l.clone(h)),h}function cn(e){const t=Ve(e);return O(e.children)&&(t.children=e.children.map(cn)),t}function Er(e=" ",t=0){return vr(gr,null,e,t)}function Ce(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(O(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Ce(e,r()),r._c&&(r._d=!0));return}else n=32,!t._&&!nn(t)&&(t._ctx=Oe);else if(q(t)){if(s&65){Ce(e,{default:t});return}t={default:t,_ctx:Oe},n=32}else t=String(t),s&64?(n=16,t=[Er(t)]):n=8;e.children=t,e.shapeFlag|=n}function Nr(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=Qe([t.class,s.class]));else if(r==="style")t.style=Ze([t.style,s.style]);else if(Hs(r)){const o=t[r],i=s[r];i&&o!==i&&!(O(o)&&o.includes(i))?t[r]=o?[].concat(o,i):i:i==null&&o==null&&!qs(r)&&(t[r]=i)}else r!==""&&(t[r]=s[r])}return t}{const e=ve(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};t("__VUE_INSTANCE_SETTERS__",n=>n),t("__VUE_SSR_SETTERS__",n=>n)}process.env.NODE_ENV;const Or=/(?:^|[-_])\w/g,kr=e=>e.replace(Or,t=>t.toUpperCase()).replace(/[-_]/g,"");function an(e,t=!0){return q(e)?e.displayName||e.name:e.name||t&&e.__name}function ln(e,t,n=!1){let s=an(t);if(!s&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(s=r[1])}if(!s&&e){const r=o=>{for(const i in o)if(o[i]===t)return i};s=r(e.components)||e.parent&&r(e.parent.type.components)||r(e.appContext.components)}return s?kr(s):n?"App":"Anonymous"}function un(e){return q(e)&&"__vccOpts"in e}function Vr(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const e={style:"color:#3ba776"},t={style:"color:#1677ff"},n={style:"color:#f5222d"},s={style:"color:#eb2f96"},r={__vue_custom_formatter:!0,header(a){if(!U(a))return null;if(a.__isVue)return["div",e,"VueInstance"];if(st(a)){const u=a.value;return["div",{},["span",e,h(a)],"<",c(u),">"]}else{if(zt(a))return["div",{},["span",e,tt(a)?"ShallowReactive":"Reactive"],"<",c(a),`>${et(a)?" (readonly)":""}`];if(et(a))return["div",{},["span",e,tt(a)?"ShallowReadonly":"Readonly"],"<",c(a),">"]}return null},hasBody(a){return a&&a.__isVue},body(a){if(a&&a.__isVue)return["div",{},...o(a.$)]}};function o(a){const u=[];a.type.props&&a.props&&u.push(i("props",T(a.props))),a.setupState!==Xe&&u.push(i("setup",a.setupState)),a.data!==Xe&&u.push(i("data",T(a.data)));const d=l(a,"computed");d&&u.push(i("computed",d));const _=l(a,"inject");return _&&u.push(i("injected",_)),u.push(["div",{},["span",{style:s.style+";opacity:0.66"},"$ (internal): "],["object",{object:a}]]),u}function i(a,u){return u=Se({},u),Object.keys(u).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},a],["div",{style:"padding-left:1.25em"},...Object.keys(u).map(d=>["div",{},["span",s,d+": "],c(u[d],!1)])]]:["span",{}]}function c(a,u=!0){return typeof a=="number"?["span",t,a]:typeof a=="string"?["span",n,JSON.stringify(a)]:typeof a=="boolean"?["span",s,a]:U(a)?["object",{object:u?T(a):a}]:["span",n,String(a)]}function l(a,u){const d=a.type;if(q(d))return;const _={};for(const w in a.ctx)f(d,w,u)&&(_[w]=a.ctx[w]);return _}function f(a,u,d){const _=a[d];if(O(_)&&_.includes(u)||U(_)&&u in _||a.extends&&f(a.extends,u,d)||a.mixins&&a.mixins.some(w=>f(w,u,d)))return!0}function h(a){return tt(a)?"ShallowRef":a.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(r):window.devtoolsFormatters=[r]}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;function Cr(){Vr()}process.env.NODE_ENV!=="production"&&Cr();const Rr=["@context","activeLink","computed","dep","excludedKeys","fn","isEncrypted","isLoading","subs","version"];class fn extends As{_className="StorePersister";_crypt;_excludedKeys;_persister;_propertiesToEncrypt;_watchedStore;constructor(t,n,s,r){super(t,n,s,r);const{crypt:o,persister:i,watchedStore:c}=n;this._excludedKeys=this.initExcludedKeys(),this.definePersister(i),this._propertiesToEncrypt=new Set(this.getPropertiesToEncrypt()),this._watchedStore=c,o&&(this._crypt=o,this.options&&(this.options.isEncrypted=!1)),this.augmentStore(),this.remember(),this.debugLog("StorePersister constructor",{toBeWatched:this.toBeWatched(),watchedStore:c,persister:i,store:t,options:n}),this.toBeWatched()&&(this._watchedStore.add(this.store.$id),this.storeSubscribe=this.storeSubscription.bind(this))}augmentStore(){const{isEncrypted:t,persistedPropertiesToEncrypt:n,watchMutation:s}=this.options;t===void 0&&(this.options.isEncrypted=!1),n===void 0&&(this.options.persistedPropertiesToEncrypt=[]),s===void 0&&(this.options.watchMutation=!1),this.stateHas("isLoading")||this.addToState("isLoading",!1),this.store.persistState=async()=>await this.persist(),this.store.remember=async()=>await this.remember(),this.store.removePersistedState=this.removePersistedState.bind(this),this.store.watch=this.watch,this.store.stopWatch=this.stopWatch}async cryptProperty(t,n,s=!1){return s?await t.decrypt(n):await t.encrypt(n)}async cryptState(t,n=!1){return await new Promise(async s=>{const r=this._crypt,o=this.getPropertiesToEncrypt(),i=this.isEncrypted();if(this.debugLog(`cryptState - ${this.store.$id} ${n?"decrypt":"crypt"}`,{can:this._propertiesToEncrypt.size>0&&i===n&&!!r,Crypt:r,state:t}),this._propertiesToEncrypt.size>0&&r){const c={};for(const l of o){const f=this.getValue(t[l]);f&&(c[l]=await this.cryptProperty(r,f,n))}this.debugLog(`cryptState - ${this.store.$id}`,{encryptedState:c}),W(c)||(t={...t,...c},this.options&&(this.options.isEncrypted=!n))}s(t)})}static customizeStore(t,n,s,r){return!n.storeOptions?.persist&&n.storeOptions?.watchMutation&&(n.storeOptions.persist=!0),super.customizeStore(t,n,s,r)}definePersister(t){this._persister=this.options.dbName?new Ge({name:this.options.dbName,keyPath:"storeName"}):t}isEncrypted(){return this.options.isEncrypted}getPropertiesToEncrypt(){return this.options?.persistedPropertiesToEncrypt??[]}async getPersistedState(t=!0){const n=this.store.$id;try{let s=await this._persister.getItem(n);return t&&this.toBeCrypted()&&s&&(await this._crypt?.init(),s=await this.cryptState(s,!0)),this.debugLog(`getPersistedState ${n}`,{persistedState:s,state:this.state}),s}catch(s){this.logError("getPersistedState()",{storeName:n,e:s})}}async getStateToPersist(){const t=this._excludedKeys,n=this.state,s=this._propertiesToEncrypt.size>0,r=this._crypt;s&&await r.init();const o={};for(const i of Object.keys(n))if(!this.hasDeniedFirstChar(i[0])&&!t.has(i)){const c=n[i];W(c)||(s&&this._propertiesToEncrypt.has(i)?o[i]=await this.cryptProperty(r,c,!1):o[i]=T(c))}return o}getWatchMutation(){return this.options.watchMutation}static hasRequiredKeys(t){return!!t?.persist||!!t?.watchMutation}initExcludedKeys(){return new Set([...Rr,...this.options.excludedKeys??[]])}async persist(){const t=await this.getStateToPersist();this.debugLog(`persist() ${this.store.$id} - stateToPersist:`,{state:t}),W(t)||this._persister.setItem(this.store.$id,t)}propertyShouldBePersisted(t){return!this._excludedKeys.has(t)}async remember(){return this.state.isLoading=!0,new Promise(async t=>{let n=await this.getPersistedState();return n&&!W(n)&&this.store.$patch(n),this.state.isLoading=!1,t(!0)})}removePersistedState(){this._persister.removeItem(this.store.$id)}stopWatch(){this.options?.watchMutation&&(this.options&&(this.options.watchMutation=!1),this._watchedStore.delete(this.store.$id))}storeSubscription(t){this.debugLog(`store.storeSubscription() ${this.store.$id}`,["mutation type !== patch object: ",t.type!=="patch object","watchMutation: ",this.getWatchMutation(),"mutation:",t,"state:",this.state,"store:",this.store]),t.type!=="patch object"&&this.getWatchMutation()&&this.persist().then(()=>{this.store.mutationCallback&&this.store.mutationCallback(this.state,t)})}toBeCrypted(){return!!(this._crypt&&this.getPropertiesToEncrypt())}toBeWatched(){return!this._watchedStore.has(this.store.$id)}watch(){this.toBeWatched()&&(this.options&&(this.options.watchMutation=!0),this.storeSubscribe=this.storeSubscription.bind(this))}}class Pr extends pn{_resetStoreCallback=t=>{const{removePersistedState:n}=t;typeof n=="function"&&n()};constructor(){super(Ye,fn.customizeStore.bind(fn),H)}}const Re=new Pr;function xr(e,t){return Re.pluginOptions=Ir(e,t),Re}function Ir(e,t){let n,s;const r=new Set;try{if(window)return!W(e)&&e&&(n=new Ge({name:e,keyPath:"storeName"})),t&&(s=new ae(t)),{persister:n,crypt:s,watchedStore:r}}catch{}return{persister:n,crypt:s,watchedStore:r}}function Dr(e,t){let n;return t&&(n=new ae(t)),Re.pluginOptions={persister:new Ut({name:e}),crypt:n,watchedStore:new Set},Re}k.PLUGIN_NAME=Ye,k.PersisterMock=Ut,k.createPersistStatePlugin=xr,k.createPluginMock=Dr,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})}));
@@ -21,4 +21,5 @@ declare module 'pinia' {
21
21
  }
22
22
 
23
23
 
24
+
24
25
  export type { PersistedStore, PersistedStoreOptions, PluginPersistedStoreOptions, } from "./store";
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "Alexandre Bidaud <alexbidaud85@gmail.com> (https://github.com/AlxBDo)",
3
3
  "name": "pinia-plugin-persist-state",
4
4
  "description": "Pinia plugin for persisting store state",
5
- "version": "0.0.1",
5
+ "version": "0.0.2",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {
@@ -1,23 +0,0 @@
1
- export default class Crypt {
2
- private _encoder;
3
- private _key;
4
- private _materialKey;
5
- private static DECRYPT;
6
- private static ENCRYPT;
7
- constructor(key: string);
8
- getKey(mode: 'decrypt' | 'encrypt'): Promise<CryptoKey>;
9
- setKeyMaterial(key: string): Promise<void>;
10
- /**
11
- * Decrypt string passed in parameter
12
- * @param {string} item - encrypted string
13
- * @returns {string} decrypted item
14
- */
15
- decrypt(item: string): Promise<string>;
16
- /**
17
- * Encrypt string passed in parameter
18
- * @param {string} item
19
- * @returns {Promise<string>} encrypted item
20
- */
21
- encrypt(item: string): Promise<string>;
22
- init(): Promise<void>;
23
- }
@@ -1,34 +0,0 @@
1
- import { ClientStorage, StorageItem } from "../types/storage";
2
- interface ObjectStoreCreationOptions {
3
- autoIncrement?: boolean;
4
- keyPath?: string;
5
- }
6
- type ObjectItemKey = string | number;
7
- export default class IndexedDB implements ClientStorage {
8
- private _db?;
9
- private _localStorageVersionKey;
10
- private _name;
11
- private _objectStore?;
12
- private _objectStoreOptions?;
13
- private _objectStoreName;
14
- private _transactionMode;
15
- private _version;
16
- constructor(objectStoreName: string, objectStoreCreationOptions?: ObjectStoreCreationOptions, transactionMode?: IDBTransactionMode);
17
- clear(): void;
18
- private createObjectStore;
19
- deleteObjectStore(): void;
20
- getItem(key: ObjectItemKey): Promise<StorageItem | undefined>;
21
- getObjectStoreItem(indexName: string, indexValue: string | number): Promise<Object | undefined>;
22
- private getStoredVersionNumber;
23
- private handleDeleteRequest;
24
- private onError;
25
- private open;
26
- private openRequestEventsHandler;
27
- removeItem(key: ObjectItemKey): void;
28
- removeItems(excludedItems?: any[]): void;
29
- private requestEventsHandler;
30
- private saveVersion;
31
- setItem(item: Object, index?: string[]): void;
32
- updateItem(item: Object): void;
33
- }
34
- export {};
@@ -1,15 +0,0 @@
1
- import { AllowedKeyPath, ClientStorage, StorageItem } from '../types/storage';
2
- export type DbOptions = {
3
- keyPath?: AllowedKeyPath;
4
- name: string;
5
- };
6
- export default class Persister {
7
- private _db;
8
- private _db_options;
9
- get dbName(): string;
10
- constructor(dbOptions: DbOptions);
11
- defineDb(): ClientStorage;
12
- getItem(itemKey: string): Promise<StorageItem | undefined>;
13
- removeItem(itemKey: string): void;
14
- setItem(key: string, item: any): void;
15
- }
@@ -1,10 +0,0 @@
1
- import { ClientStorage, StorageItem } from "../types/storage";
2
- export default class WindowStorage implements ClientStorage {
3
- private _storage;
4
- constructor(storageType: "localStorage" | "sessionStorage");
5
- clear(): void;
6
- getItem(key: string | number): Promise<StorageItem>;
7
- removeItem(key: string | number): void;
8
- removeItems(excludedItems?: any[]): void;
9
- setItem(item: StorageItem, key: string): void;
10
- }
@@ -1,12 +0,0 @@
1
- export interface ClientStorage {
2
- clear(): void;
3
- getItem(key: string | number): Promise<StorageItem | undefined>;
4
- removeItem(key: string | number): void;
5
- removeItems(excludedItems?: any[]): void;
6
- setItem(item: StorageItem, keyOrIndex?: string | string[]): void;
7
- }
8
- export type AllowedKeyPath = 'storeName' | 'id';
9
- type StorageItemAllowedTypes = boolean | number | string;
10
- export type StorageItemObject = Record<number | string | symbol, StorageItemAllowedTypes | StorageItemAllowedTypes[] | Record<number | string | symbol, StorageItemAllowedTypes | StorageItemAllowedTypes[]>>;
11
- export type StorageItem = StorageItemAllowedTypes | StorageItemAllowedTypes[] | StorageItemObject;
12
- export {};
@@ -1,27 +0,0 @@
1
- import Crypt from "../services/Crypt";
2
- import Persister from "../services/Persister";
3
- export interface PersistedState {
4
- isLoading: boolean;
5
- }
6
- export interface PersistedStore {
7
- persistState: () => Promise<void>;
8
- remember: () => Promise<void>;
9
- removePersistedState: () => void;
10
- stateIsEmpty?: () => boolean;
11
- stopWatch: () => void;
12
- watch: () => void;
13
- }
14
- export interface PersistedStoreOptions {
15
- dbName?: string;
16
- excludedKeys?: string[];
17
- isEncrypted?: boolean;
18
- persist?: boolean;
19
- persistedPropertiesToEncrypt?: string[];
20
- watchMutation?: boolean;
21
- }
22
- export type PluginPersistedStoreOptions = {
23
- crypt?: Crypt;
24
- persister: Persister;
25
- storeOptions: PersistedStoreOptions;
26
- watchedStore: Set<string>;
27
- };