pinia-plugin-persist-state 0.0.0-beta.2 → 0.0.0-beta.4

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.
@@ -2671,7 +2671,7 @@ class _t extends js {
2671
2671
  }
2672
2672
  augmentStore() {
2673
2673
  const { isEncrypted: t, persistedPropertiesToEncrypt: n, watchMutation: s } = this.options;
2674
- 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._persister.removeItem(this.store.$id), this.store.watch = this.watch, this.store.stopWatch = this.stopWatch;
2674
+ 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;
2675
2675
  }
2676
2676
  async cryptProperty(t, n, s = !1) {
2677
2677
  return s ? await t.decrypt(n) : await t.encrypt(n);
@@ -2748,11 +2748,14 @@ class _t extends js {
2748
2748
  return n && !W(n) && this.store.$patch(n), this.state.isLoading = !1, t(!0);
2749
2749
  });
2750
2750
  }
2751
+ removePersistedState() {
2752
+ this._persister.removeItem(this.store.$id);
2753
+ }
2751
2754
  stopWatch() {
2752
2755
  this.options?.watchMutation && (this.options && (this.options.watchMutation = !1), this._watchedStore.delete(this.store.$id));
2753
2756
  }
2754
2757
  storeSubscription(t) {
2755
- this.debugLog(`store.$subscribe ${this.store.$id}`, [
2758
+ this.debugLog(`store.storeSubscription() ${this.store.$id}`, [
2756
2759
  "mutation type !== patch object: ",
2757
2760
  t.type !== "patch object",
2758
2761
  "watchMutation: ",
@@ -2778,6 +2781,10 @@ class _t extends js {
2778
2781
  }
2779
2782
  }
2780
2783
  class kr extends un {
2784
+ _resetStoreCallback = (t) => {
2785
+ const { removePersistedState: n } = t;
2786
+ typeof n == "function" && n();
2787
+ };
2781
2788
  constructor() {
2782
2789
  super(
2783
2790
  Lt,
@@ -1,9 +1,9 @@
1
- (function(O,ee){typeof exports=="object"&&typeof module<"u"?ee(exports,require("pinia")):typeof define=="function"&&define.amd?define(["exports","pinia"],ee):(O=typeof globalThis<"u"?globalThis:O||self,ee(O["pinia-plugin-persist-state"]={}))})(this,(function(O){"use strict";class ee{_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{_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,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))}}const mn=new Set(["_","$"]);function bn(e){return mn.has(e[0])}function L(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 Sn(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ce=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const vn=()=>{},wn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),U=Object.assign,En=Object.prototype.hasOwnProperty,Ie=(e,t)=>En.call(e,t),g=Array.isArray,te=e=>lt(e)==="[object Map]",x=e=>typeof e=="function",V=e=>typeof e=="string",ne=e=>typeof e=="symbol",y=e=>e!==null&&typeof e=="object",Nn=Object.prototype.toString,lt=e=>Nn.call(e),ut=e=>lt(e).slice(8,-1),ue=e=>V(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,On=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Vn=On(e=>e.charAt(0).toUpperCase()+e.slice(1)),Re=(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 xe(e){if(g(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=V(s)?Rn(s):xe(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,Cn=/:([^]+)/,In=/\/\*[^]*?\*\//g;function Rn(e){const t={};return e.replace(In,"").split(kn).forEach(n=>{if(n){const s=n.split(Cn);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(U({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 P(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||!ne(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)),te(e)&&c(i.get(dt)));break;case"delete":l||(c(i.get(Te)),te(e)&&c(i.get(dt)));break;case"set":te(e)&&c(i.get(Te));break}}$e()}function Pn(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(C)}function Ae(e){return e=p(e),e}function D(e,t){return E(e)?He(e)?oe(C(t)):oe(t):C(t)}const Dn={__proto__:null,[Symbol.iterator](){return Me(this,Symbol.iterator,e=>D(this,e))},concat(...e){return B(this).concat(...e.map(t=>g(t)?B(t):t))},entries(){return Me(this,"entries",e=>(e[1]=D(this,e[1]),e))},every(e,t){return k(this,"every",e,t,void 0,arguments)},filter(e,t){return k(this,"filter",e,t,n=>n.map(s=>D(this,s)),arguments)},find(e,t){return k(this,"find",e,t,n=>D(this,n),arguments)},findIndex(e,t){return k(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return k(this,"findLast",e,t,n=>D(this,n),arguments)},findLastIndex(e,t){return k(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return k(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 k(this,"map",e,t,void 0,arguments)},pop(){return se(this,"pop")},push(...e){return se(this,"push",e)},reduce(e,...t){return gt(this,"reduce",e,t)},reduceRight(e,...t){return gt(this,"reduceRight",e,t)},shift(){return se(this,"shift")},some(e,t){return k(this,"some",e,t,void 0,arguments)},splice(...e){return se(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 se(this,"unshift",e)},values(){return Me(this,"values",e=>D(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 jn=Array.prototype;function k(e,t,n,s,r,o){const i=Ae(e),c=i!==e&&!b(e),l=i[t];if(l!==jn[t]){const a=l.apply(e,o);return c?C(a):a}let f=n;i!==e&&(c?f=function(a,u){return n.call(this,D(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);let o=n;return r!==e&&(b(e)?n.length>3&&(o=function(i,c,l){return n.call(this,i,c,l,e)}):o=function(i,c,l){return n.call(this,i,D(e,c),l,e)}),r[t](o,...s)}function Fe(e,t,n){const s=p(e),r=s[t](...n);return(r===-1||r===!1)&&re(n[0])?(n[0]=p(n[0]),s[t](...n)):r}function se(e,t,n=[]){je();const s=p(e)[t].apply(e,n);return $e(),s}const $n=Sn("__proto__,__v_isRef,__isVue"),yt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ne));function Tn(e){return ne(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?Bn:wt:o?zn:vt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=g(t);if(!r){let l;if(i&&(l=Dn[n]))return l;if(n==="hasOwnProperty")return Tn}const c=Reflect.get(t,n,m(t)?t:s);if((ne(n)?yt.has(n):$n(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 An 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=E(o);if(!b(s)&&!E(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:Ie(t,n),l=Reflect.set(t,n,s,m(t)?t:r);return t===p(r)&&(c?Re(s,o)&&P(t,"set",n,s,o):P(t,"add",n,s)),l}deleteProperty(t,n){const s=Ie(t,n),r=t[n],o=Reflect.deleteProperty(t,n);return o&&s&&P(t,"delete",n,void 0,r),o}has(t,n){const s=Reflect.has(t,n);return!ne(n)||yt.has(n),s}ownKeys(t){return Reflect.ownKeys(t)}}class Mn 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 Fn=new An,Kn=new Mn,pe=e=>Reflect.getPrototypeOf(e);function Hn(e,t,n){return function(...s){const r=this.__v_raw,o=p(r),i=te(o),c=e==="entries"||e===Symbol.iterator&&i,l=r[e](...s),f=t?oe:C;return{next(){const{value:h,done:a}=l.next();return a?{value:h,done:a}:{value:c?[f(h[0]),f(h[1])]:f(h),done:a}},[Symbol.iterator](){return this}}}}function he(e){return function(...t){if(process.env.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";z(`${Vn(e)} operation ${n}failed: target is readonly.`,p(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function qn(e,t){const n={get(s){const r=this.__v_raw,o=p(r),i=p(s),{has:c}=pe(o),l=e?oe:C;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(){const s=this.__v_raw;return!e&&p(s),s.size},has(s){const r=this.__v_raw;p(r);const 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;p(i);const c=e?oe:C;return i.forEach((l,f)=>s.call(r,c(l),c(f),o))}};return U(n,e?{add:he("add"),set:he("set"),delete:he("delete"),clear:he("clear")}:{add(s){!b(s)&&!E(s)&&(s=p(s));const r=p(this);return pe(r).has.call(r,s)||(r.add(s),P(r,"add",s,s)),this},set(s,r){!b(r)&&!E(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?Re(r,f)&&P(o,"set",s,r,f):P(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&&P(r,"delete",s,void 0,l),f},clear(){const s=p(this),r=s.size!==0,o=process.env.NODE_ENV!=="production"?te(s)?new Map(s):new Set(s):void 0,i=s.clear();return r&&P(s,"clear",void 0,void 0,o),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Hn(s,e)}),n}function bt(e,t){const n=qn(e);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(Ie(n,r)&&r in s?n:s,r,o)}const Ln={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,zn=new WeakMap,wt=new WeakMap,Bn=new WeakMap;function Wn(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Jn(e){return e.__v_skip||!Object.isExtensible(e)?0:Wn(ut(e))}function Et(e){return E(e)?e:Nt(e,!1,Fn,Ln,vt)}function Ke(e){return Nt(e,!0,Kn,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=Jn(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 E(e)?He(e.__v_raw):!!(e&&e.__v_isReactive)}function E(e){return!!(e&&e.__v_isReadonly)}function b(e){return!!(e&&e.__v_isShallow)}function re(e){return e?!!e.__v_raw:!1}function p(e){const t=e&&e.__v_raw;return t?p(t):e}const C=e=>y(e)?Et(e):e,oe=e=>y(e)?Ke(e):e;function m(e){return e?e.__v_isRef===!0:!1}function Ot(e){return Yn(e,!1)}function Yn(e,t){return m(e)?e:new Gn(e,t)}class Gn{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:C(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)||E(t);t=s?t:p(t),Re(t,n)&&(this._rawValue=t,this._value=s?t:C(t),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function Qn(e){return m(e)?e.value:e}class Xn{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._raw=p(t);let r=!0,o=t;if(!g(t)||!ue(String(n)))do r=!re(o)||b(o);while(r&&(o=o.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=Qn(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 Pn(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 es(e,t,n){return m(e)?e:x(e)?new Zn(e):y(e)&&arguments.length>1?ts(e,t,n):Ot(e)}function ts(e,t,n){return new Xn(e,t,n)}const M=[];function ns(e){M.push(e)}function ss(){M.pop()}let qe=!1;function ie(e,...t){if(qe)return;qe=!0;const n=M.length?M[M.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=rs();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(`
1
+ (function(O,ee){typeof exports=="object"&&typeof module<"u"?ee(exports,require("pinia")):typeof define=="function"&&define.amd?define(["exports","pinia"],ee):(O=typeof globalThis<"u"?globalThis:O||self,ee(O["pinia-plugin-persist-state"]={}))})(this,(function(O){"use strict";class ee{_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{_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,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))}}const mn=new Set(["_","$"]);function bn(e){return mn.has(e[0])}function L(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 Sn(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ce=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const vn=()=>{},wn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),U=Object.assign,En=Object.prototype.hasOwnProperty,Pe=(e,t)=>En.call(e,t),g=Array.isArray,te=e=>lt(e)==="[object Map]",R=e=>typeof e=="function",k=e=>typeof e=="string",ne=e=>typeof e=="symbol",y=e=>e!==null&&typeof e=="object",Nn=Object.prototype.toString,lt=e=>Nn.call(e),ut=e=>lt(e).slice(8,-1),ue=e=>k(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,On=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},kn=On(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ie=(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 Re(e){if(g(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=k(s)?In(s):Re(s);if(r)for(const o in r)t[o]=r[o]}return t}else if(k(e)||y(e))return e}const Vn=/;(?![^(]*\))/g,Cn=/:([^]+)/,Pn=/\/\*[^]*?\*\//g;function In(e){const t={};return e.replace(Pn,"").split(Vn).forEach(n=>{if(n){const s=n.split(Cn);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function xe(e){let t="";if(k(e))t=e;else if(g(e))for(let n=0;n<e.length;n++){const s=xe(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 Rn{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(U({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 x(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||!ne(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)),te(e)&&c(i.get(dt)));break;case"delete":l||(c(i.get(Te)),te(e)&&c(i.get(dt)));break;case"set":te(e)&&c(i.get(Te));break}}$e()}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(C)}function Ae(e){return e=p(e),e}function D(e,t){return E(e)?He(e)?oe(C(t)):oe(t):C(t)}const Dn={__proto__:null,[Symbol.iterator](){return Me(this,Symbol.iterator,e=>D(this,e))},concat(...e){return B(this).concat(...e.map(t=>g(t)?B(t):t))},entries(){return Me(this,"entries",e=>(e[1]=D(this,e[1]),e))},every(e,t){return V(this,"every",e,t,void 0,arguments)},filter(e,t){return V(this,"filter",e,t,n=>n.map(s=>D(this,s)),arguments)},find(e,t){return V(this,"find",e,t,n=>D(this,n),arguments)},findIndex(e,t){return V(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return V(this,"findLast",e,t,n=>D(this,n),arguments)},findLastIndex(e,t){return V(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return V(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 V(this,"map",e,t,void 0,arguments)},pop(){return se(this,"pop")},push(...e){return se(this,"push",e)},reduce(e,...t){return gt(this,"reduce",e,t)},reduceRight(e,...t){return gt(this,"reduceRight",e,t)},shift(){return se(this,"shift")},some(e,t){return V(this,"some",e,t,void 0,arguments)},splice(...e){return se(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 se(this,"unshift",e)},values(){return Me(this,"values",e=>D(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 jn=Array.prototype;function V(e,t,n,s,r,o){const i=Ae(e),c=i!==e&&!b(e),l=i[t];if(l!==jn[t]){const a=l.apply(e,o);return c?C(a):a}let f=n;i!==e&&(c?f=function(a,u){return n.call(this,D(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);let o=n;return r!==e&&(b(e)?n.length>3&&(o=function(i,c,l){return n.call(this,i,c,l,e)}):o=function(i,c,l){return n.call(this,i,D(e,c),l,e)}),r[t](o,...s)}function Fe(e,t,n){const s=p(e),r=s[t](...n);return(r===-1||r===!1)&&re(n[0])?(n[0]=p(n[0]),s[t](...n)):r}function se(e,t,n=[]){je();const s=p(e)[t].apply(e,n);return $e(),s}const $n=Sn("__proto__,__v_isRef,__isVue"),yt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ne));function Tn(e){return ne(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?Bn:wt:o?zn:vt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=g(t);if(!r){let l;if(i&&(l=Dn[n]))return l;if(n==="hasOwnProperty")return Tn}const c=Reflect.get(t,n,m(t)?t:s);if((ne(n)?yt.has(n):$n(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 An 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=E(o);if(!b(s)&&!E(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:Pe(t,n),l=Reflect.set(t,n,s,m(t)?t:r);return t===p(r)&&(c?Ie(s,o)&&x(t,"set",n,s,o):x(t,"add",n,s)),l}deleteProperty(t,n){const s=Pe(t,n),r=t[n],o=Reflect.deleteProperty(t,n);return o&&s&&x(t,"delete",n,void 0,r),o}has(t,n){const s=Reflect.has(t,n);return!ne(n)||yt.has(n),s}ownKeys(t){return Reflect.ownKeys(t)}}class Mn 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 Fn=new An,Kn=new Mn,pe=e=>Reflect.getPrototypeOf(e);function Hn(e,t,n){return function(...s){const r=this.__v_raw,o=p(r),i=te(o),c=e==="entries"||e===Symbol.iterator&&i,l=r[e](...s),f=t?oe:C;return{next(){const{value:h,done:a}=l.next();return a?{value:h,done:a}:{value:c?[f(h[0]),f(h[1])]:f(h),done:a}},[Symbol.iterator](){return this}}}}function he(e){return function(...t){if(process.env.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";z(`${kn(e)} operation ${n}failed: target is readonly.`,p(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function qn(e,t){const n={get(s){const r=this.__v_raw,o=p(r),i=p(s),{has:c}=pe(o),l=e?oe:C;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(){const s=this.__v_raw;return!e&&p(s),s.size},has(s){const r=this.__v_raw;p(r);const 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;p(i);const c=e?oe:C;return i.forEach((l,f)=>s.call(r,c(l),c(f),o))}};return U(n,e?{add:he("add"),set:he("set"),delete:he("delete"),clear:he("clear")}:{add(s){!b(s)&&!E(s)&&(s=p(s));const r=p(this);return pe(r).has.call(r,s)||(r.add(s),x(r,"add",s,s)),this},set(s,r){!b(r)&&!E(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?Ie(r,f)&&x(o,"set",s,r,f):x(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&&x(r,"delete",s,void 0,l),f},clear(){const s=p(this),r=s.size!==0,o=process.env.NODE_ENV!=="production"?te(s)?new Map(s):new Set(s):void 0,i=s.clear();return r&&x(s,"clear",void 0,void 0,o),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=Hn(s,e)}),n}function bt(e,t){const n=qn(e);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(Pe(n,r)&&r in s?n:s,r,o)}const Ln={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,zn=new WeakMap,wt=new WeakMap,Bn=new WeakMap;function Wn(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Jn(e){return e.__v_skip||!Object.isExtensible(e)?0:Wn(ut(e))}function Et(e){return E(e)?e:Nt(e,!1,Fn,Ln,vt)}function Ke(e){return Nt(e,!0,Kn,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=Jn(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 E(e)?He(e.__v_raw):!!(e&&e.__v_isReactive)}function E(e){return!!(e&&e.__v_isReadonly)}function b(e){return!!(e&&e.__v_isShallow)}function re(e){return e?!!e.__v_raw:!1}function p(e){const t=e&&e.__v_raw;return t?p(t):e}const C=e=>y(e)?Et(e):e,oe=e=>y(e)?Ke(e):e;function m(e){return e?e.__v_isRef===!0:!1}function Ot(e){return Yn(e,!1)}function Yn(e,t){return m(e)?e:new Gn(e,t)}class Gn{constructor(t,n){this.dep=new Rn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:p(t),this._value=n?t:C(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)||E(t);t=s?t:p(t),Ie(t,n)&&(this._rawValue=t,this._value=s?t:C(t),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:t,oldValue:n}):this.dep.trigger())}}function Qn(e){return m(e)?e.value:e}class Xn{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._raw=p(t);let r=!0,o=t;if(!g(t)||!ue(String(n)))do r=!re(o)||b(o);while(r&&(o=o.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=Qn(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 es(e,t,n){return m(e)?e:R(e)?new Zn(e):y(e)&&arguments.length>1?ts(e,t,n):Ot(e)}function ts(e,t,n){return new Xn(e,t,n)}const M=[];function ns(e){M.push(e)}function ss(){M.pop()}let qe=!1;function ie(e,...t){if(qe)return;qe=!0;const n=M.length?M[M.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=rs();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
3
  `,...os(r)),console.warn(...o)}qe=!1}function rs(){let e=M[M.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 os(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[`
4
- `],...is(n))}),t}function is({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,...cs(e.props),o]:[r+o]}function cs(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...Vt(s,e[s]))}),n.length>3&&t.push(" ..."),t}function Vt(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=Vt(e,p(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):x(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=p(t),n?t:[`${e}=`,t])}const kt={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||Ce;if(t){let c=t.parent;const l=t.proxy,f=process.env.NODE_ENV!=="production"?kt[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}}as(e,n,r,s,i)}function as(e,t,n,s=!0,r=!1){if(process.env.NODE_ENV!=="production"){const o=kt[t];if(n&&ns(n),ie(`Unhandled error${o?` during execution of ${o}`:""}`),n&&ss(),s)throw e;console.error(e)}else{if(r)throw e;console.error(e)}}const S=[];let I=-1;const W=[];let j=null,J=0;const ls=Promise.resolve();let Ue=null;const us=100;function fs(e){let t=I+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 ps(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(fs(t),0,e),e.flags|=1,It()}}function It(){Ue||(Ue=ls.then(Rt))}function hs(e){g(e)?W.push(...e):j&&e.id===-1?j.splice(J+1,0,e):e.flags&1||(W.push(e),e.flags|=1),It()}function ds(e){if(W.length){const t=[...new Set(W)].sort((n,s)=>ce(n)-ce(s));if(W.length=0,j){j.push(...t);return}for(j=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),J=0;J<j.length;J++){const n=j[J];process.env.NODE_ENV!=="production"&&xt(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}j=null,J=0}}const ce=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Rt(e){process.env.NODE_ENV!=="production"&&(e=e||new Map);const t=process.env.NODE_ENV!=="production"?n=>xt(e,n):vn;try{for(I=0;I<S.length;I++){const n=S[I];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(;I<S.length;I++){const n=S[I];n&&(n.flags&=-2)}I=-1,S.length=0,ds(e),Ue=null,(S.length||W.length)&&Rt(e)}}function xt(e,t){const n=e.get(t)||0;if(n>us){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(_s),rerender:Be(gs),reload:Be(ys)});const de=new Map;function _s(e,t){return de.has(e)?!1:(de.set(e,{initialDef:_e(t),instances:new Set}),!0)}function _e(e){return Ht(e)?e.__vccOpts:e}function gs(e,t){const n=de.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(s=>{t&&(s.render=t,_e(s.type).render=t),s.renderCache=[],s.job.flags&8||s.update()}))}function ys(e,t){const n=de.get(e);if(!n)return;t=_e(t),Pt(n.initialDef,t);const s=[...n.instances];for(let r=0;r<s.length;r++){const o=s[r],i=_e(o.type);let c=ze.get(i);c||(i!==n.initialDef&&Pt(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?ps(()=>{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)}hs(()=>{ze.clear()})}function Pt(e,t){U(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 ge=null,ms=null;const bs=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 Ss=Symbol.for("v-ndc");process.env.NODE_ENV;const vs={},jt=e=>Object.getPrototypeOf(e)===vs,ws=e=>e.__isSuspense,$t=Symbol.for("v-fgt"),Es=Symbol.for("v-txt"),Ns=Symbol.for("v-cmt");function Os(e){return e?e.__v_isVNode===!0:!1}const Vs=(...e)=>At(...e),Tt=({key:e})=>e??null,ye=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?V(e)||m(e)||x(e)?{i:ge,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&&ye(t),scopeId:ms,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:ge};return c?(We(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 Cs=process.env.NODE_ENV!=="production"?Vs:At;function At(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Ss)&&(process.env.NODE_ENV!=="production"&&!e&&ie(`Invalid vnode type when creating vnode: ${e}.`),e=Ns),Os(e)){const c=me(e,t,!0);return n&&We(c,n),c.patchFlag=-2,c}if(Ht(e)&&(e=e.__vccOpts),t){t=Is(t);let{class:c,style:l}=t;c&&!V(c)&&(t.class=Pe(c)),y(l)&&(re(l)&&!g(l)&&(l=U({},l)),t.style=xe(l))}const i=V(e)?1:ws(e)?128:bs(e)?64:y(e)?4:x(e)?2:0;return process.env.NODE_ENV!=="production"&&i&4&&re(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 Is(e){return e?re(e)||jt(e)?U({},e):e:null}function me(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(ye(t)):[o,ye(t)]:ye(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&&me(e.ssContent),ssFallback:e.ssFallback&&me(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=me(e);return g(e.children)&&(t.children=e.children.map(Mt)),t}function Rs(e=" ",t=0){return Cs(Es,null,e,t)}function We(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),We(e,r()),r._c&&(r._d=!0));return}else n=32,!t._&&!jt(t)&&(t._ctx=ge);else x(t)?(t={default:t,_ctx:ge},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=xe([t.style,s.style]);else if(wn(r)){const o=t[r],i=s[r];i&&o!==i&&!(g(o)&&o.includes(i))&&(t[r]=o?[].concat(o,i):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 Ps=/(?:^|[-_])\w/g,Ds=e=>e.replace(Ps,t=>t.toUpperCase()).replace(/[-_]/g,"");function Ft(e,t=!0){return x(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?Ds(s):n?"App":"Anonymous"}function Ht(e){return x(e)&&"__vccOpts"in e}function js(){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),`>${E(a)?" (readonly)":""}`];if(E(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!==Ce&&u.push(i("setup",a.setupState)),a.data!==Ce&&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=U({},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(x(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 $s(){js()}process.env.NODE_ENV!=="production"&&$s();class Ts extends hn{_className="Store";_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]=es(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 bn(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(!L(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 As extends yn{_pluginName=Je}const F=new As;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=()=>F.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){F.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=()=>F.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}),F.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=()=>F.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 ee(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(console.log("Persister - setItem",[t,n,this._db]),this._db instanceof qt)try{this._db.getItem(t).then(s=>{s?this._db.updateItem(s):this._db.setItem({storeName:t,...n})})}catch(s){F.error("Persister - setItem Error",s),this._db.setItem({storename:t,...n})}else this._db.setItem(n,t)}}class Ms{_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 Y={};const Fs={clear:()=>Y={},getItem:async e=>new Promise(t=>t(Y[e])),removeItem:e=>delete Y[e],removeItems:e=>e?e.forEach(t=>delete Y[t]):Y={},setItem:(e,t)=>{Y[t]=e}};class Lt extends Ye{defineDb(){return this.dbName==="localStorage"||this.dbName==="sessionStorage"?Fs:new Ms}}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 Ut=()=>{},Ks=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),be=Object.assign,N=Array.isArray,K=e=>typeof e=="function",$=e=>typeof e=="string",Hs=e=>typeof e=="symbol",H=e=>e!==null&&typeof e=="object";let zt;const Se=()=>zt||(zt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Qe(e){if(N(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=$(s)?zs(s):Qe(s);if(r)for(const o in r)t[o]=r[o]}return t}else if($(e)||H(e))return e}const qs=/;(?![^(]*\))/g,Ls=/:([^]+)/,Us=/\/\*[^]*?\*\//g;function zs(e){const t={};return e.replace(Us,"").split(qs).forEach(n=>{if(n){const s=n.split(Ls);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Xe(e){let t="";if($(e))t=e;else if(N(e))for(let n=0;n<e.length;n++){const s=Xe(e[n]);s&&(t+=s+" ")}else if(H(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(Hs));function Bt(e){return Ze(e)?Bt(e.__v_raw):!!(e&&e.__v_isReactive)}function Ze(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 q=[];function Bs(e){q.push(e)}function Ws(){q.pop()}let st=!1;function G(e,...t){if(st)return;st=!0;const n=q.length?q[q.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=Js();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(`
4
+ `],...is(n))}),t}function is({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,...cs(e.props),o]:[r+o]}function cs(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 k(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,">"]):R(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||Ce;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}}as(e,n,r,s,i)}function as(e,t,n,s=!0,r=!1){if(process.env.NODE_ENV!=="production"){const o=Vt[t];if(n&&ns(n),ie(`Unhandled error${o?` during execution of ${o}`:""}`),n&&ss(),s)throw e;console.error(e)}else{if(r)throw e;console.error(e)}}const S=[];let P=-1;const W=[];let j=null,J=0;const ls=Promise.resolve();let Ue=null;const us=100;function fs(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 ps(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(fs(t),0,e),e.flags|=1,Pt()}}function Pt(){Ue||(Ue=ls.then(It))}function hs(e){g(e)?W.push(...e):j&&e.id===-1?j.splice(J+1,0,e):e.flags&1||(W.push(e),e.flags|=1),Pt()}function ds(e){if(W.length){const t=[...new Set(W)].sort((n,s)=>ce(n)-ce(s));if(W.length=0,j){j.push(...t);return}for(j=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),J=0;J<j.length;J++){const n=j[J];process.env.NODE_ENV!=="production"&&Rt(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}j=null,J=0}}const ce=e=>e.id==null?e.flags&2?-1:1/0:e.id;function It(e){process.env.NODE_ENV!=="production"&&(e=e||new Map);const t=process.env.NODE_ENV!=="production"?n=>Rt(e,n):vn;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,ds(e),Ue=null,(S.length||W.length)&&It(e)}}function Rt(e,t){const n=e.get(t)||0;if(n>us){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(_s),rerender:Be(gs),reload:Be(ys)});const de=new Map;function _s(e,t){return de.has(e)?!1:(de.set(e,{initialDef:_e(t),instances:new Set}),!0)}function _e(e){return Ht(e)?e.__vccOpts:e}function gs(e,t){const n=de.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(s=>{t&&(s.render=t,_e(s.type).render=t),s.renderCache=[],s.job.flags&8||s.update()}))}function ys(e,t){const n=de.get(e);if(!n)return;t=_e(t),xt(n.initialDef,t);const s=[...n.instances];for(let r=0;r<s.length;r++){const o=s[r],i=_e(o.type);let c=ze.get(i);c||(i!==n.initialDef&&xt(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?ps(()=>{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)}hs(()=>{ze.clear()})}function xt(e,t){U(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 ge=null,ms=null;const bs=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 Ss=Symbol.for("v-ndc");process.env.NODE_ENV;const vs={},jt=e=>Object.getPrototypeOf(e)===vs,ws=e=>e.__isSuspense,$t=Symbol.for("v-fgt"),Es=Symbol.for("v-txt"),Ns=Symbol.for("v-cmt");function Os(e){return e?e.__v_isVNode===!0:!1}const ks=(...e)=>At(...e),Tt=({key:e})=>e??null,ye=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?k(e)||m(e)||R(e)?{i:ge,r:e,k:t,f:!!n}:e:null);function Vs(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&&ye(t),scopeId:ms,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:ge};return c?(We(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=k(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 Cs=process.env.NODE_ENV!=="production"?ks:At;function At(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Ss)&&(process.env.NODE_ENV!=="production"&&!e&&ie(`Invalid vnode type when creating vnode: ${e}.`),e=Ns),Os(e)){const c=me(e,t,!0);return n&&We(c,n),c.patchFlag=-2,c}if(Ht(e)&&(e=e.__vccOpts),t){t=Ps(t);let{class:c,style:l}=t;c&&!k(c)&&(t.class=xe(c)),y(l)&&(re(l)&&!g(l)&&(l=U({},l)),t.style=Re(l))}const i=k(e)?1:ws(e)?128:bs(e)?64:y(e)?4:R(e)?2:0;return process.env.NODE_ENV!=="production"&&i&4&&re(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)),Vs(e,t,n,s,r,i,o,!0)}function Ps(e){return e?re(e)||jt(e)?U({},e):e:null}function me(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:c,transition:l}=e,f=t?Rs(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(ye(t)):[o,ye(t)]:ye(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&&me(e.ssContent),ssFallback:e.ssFallback&&me(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=me(e);return g(e.children)&&(t.children=e.children.map(Mt)),t}function Is(e=" ",t=0){return Cs(Es,null,e,t)}function We(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),We(e,r()),r._c&&(r._d=!0));return}else n=32,!t._&&!jt(t)&&(t._ctx=ge);else R(t)?(t={default:t,_ctx:ge},n=32):(t=String(t),s&64?(n=16,t=[Is(t)]):n=8);e.children=t,e.shapeFlag|=n}function Rs(...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=xe([t.class,s.class]));else if(r==="style")t.style=Re([t.style,s.style]);else if(wn(r)){const o=t[r],i=s[r];i&&o!==i&&!(g(o)&&o.includes(i))&&(t[r]=o?[].concat(o,i):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,Ds=e=>e.replace(xs,t=>t.toUpperCase()).replace(/[-_]/g,"");function Ft(e,t=!0){return R(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?Ds(s):n?"App":"Anonymous"}function Ht(e){return R(e)&&"__vccOpts"in e}function js(){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),`>${E(a)?" (readonly)":""}`];if(E(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!==Ce&&u.push(i("setup",a.setupState)),a.data!==Ce&&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=U({},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(R(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 $s(){js()}process.env.NODE_ENV!=="production"&&$s();class Ts extends hn{_className="Store";_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]=es(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 bn(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(!L(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 As extends yn{_pluginName=Je}const F=new As;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=()=>F.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){F.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=()=>F.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}),F.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=()=>F.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 ee(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(console.log("Persister - setItem",[t,n,this._db]),this._db instanceof qt)try{this._db.getItem(t).then(s=>{s?this._db.updateItem(s):this._db.setItem({storeName:t,...n})})}catch(s){F.error("Persister - setItem Error",s),this._db.setItem({storename:t,...n})}else this._db.setItem(n,t)}}class Ms{_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 Y={};const Fs={clear:()=>Y={},getItem:async e=>new Promise(t=>t(Y[e])),removeItem:e=>delete Y[e],removeItems:e=>e?e.forEach(t=>delete Y[t]):Y={},setItem:(e,t)=>{Y[t]=e}};class Lt extends Ye{defineDb(){return this.dbName==="localStorage"||this.dbName==="sessionStorage"?Fs:new Ms}}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 Ut=()=>{},Ks=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),be=Object.assign,N=Array.isArray,K=e=>typeof e=="function",$=e=>typeof e=="string",Hs=e=>typeof e=="symbol",H=e=>e!==null&&typeof e=="object";let zt;const Se=()=>zt||(zt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Qe(e){if(N(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=$(s)?zs(s):Qe(s);if(r)for(const o in r)t[o]=r[o]}return t}else if($(e)||H(e))return e}const qs=/;(?![^(]*\))/g,Ls=/:([^]+)/,Us=/\/\*[^]*?\*\//g;function zs(e){const t={};return e.replace(Us,"").split(qs).forEach(n=>{if(n){const s=n.split(Ls);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Xe(e){let t="";if($(e))t=e;else if(N(e))for(let n=0;n<e.length;n++){const s=Xe(e[n]);s&&(t+=s+" ")}else if(H(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(Hs));function Bt(e){return Ze(e)?Bt(e.__v_raw):!!(e&&e.__v_isReactive)}function Ze(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 q=[];function Bs(e){q.push(e)}function Ws(){q.pop()}let st=!1;function G(e,...t){if(st)return;st=!0;const n=q.length?q[q.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=Js();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(`
6
6
  `),r]);else{const o=[`[Vue warn]: ${e}`,...t];r.length&&o.push(`
7
7
  `,...Ys(r)),console.warn(...o)}st=!1}function Js(){let e=q[q.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 Ys(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[`
8
- `],...Gs(n))}),t}function Gs({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(...Wt(s,e[s]))}),n.length>3&&t.push(" ..."),t}function Wt(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=Wt(e,T(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):K(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}}Xs(e,n,r,s,i)}function Xs(e,t,n,s=!0,r=!1){if(process.env.NODE_ENV!=="production"){const o=Jt[t];if(n&&Bs(n),G(`Unhandled error${o?` during execution of ${o}`:""}`),n&&Ws(),s)throw e;console.error(e)}else{if(r)throw e;console.error(e)}}const v=[];let R=-1;const Q=[];let A=null,X=0;const Zs=Promise.resolve();let ot=null;const er=100;function tr(e){let t=R+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 nr(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(tr(t),0,e),e.flags|=1,Gt()}}function Gt(){ot||(ot=Zs.then(Qt))}function sr(e){N(e)?Q.push(...e):A&&e.id===-1?A.splice(X+1,0,e):e.flags&1||(Q.push(e),e.flags|=1),Gt()}function rr(e){if(Q.length){const t=[...new Set(Q)].sort((n,s)=>le(n)-le(s));if(Q.length=0,A){A.push(...t);return}for(A=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),X=0;X<A.length;X++){const n=A[X];process.env.NODE_ENV!=="production"&&Xt(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}A=null,X=0}}const le=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Qt(e){process.env.NODE_ENV!=="production"&&(e=e||new Map);const t=process.env.NODE_ENV!=="production"?n=>Xt(e,n):Ut;try{for(R=0;R<v.length;R++){const n=v[R];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(;R<v.length;R++){const n=v[R];n&&(n.flags&=-2)}R=-1,v.length=0,rr(e),ot=null,(v.length||Q.length)&&Qt(e)}}function Xt(e,t){const n=e.get(t)||0;if(n>er){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"&&(Se().__VUE_HMR_RUNTIME__={createRecord:ct(or),rerender:ct(ir),reload:ct(cr)});const ve=new Map;function or(e,t){return ve.has(e)?!1:(ve.set(e,{initialDef:we(t),instances:new Set}),!0)}function we(e){return un(e)?e.__vccOpts:e}function ir(e,t){const n=ve.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(s=>{t&&(s.render=t,we(s.type).render=t),s.renderCache=[],s.job.flags&8||s.update()}))}function cr(e,t){const n=ve.get(e);if(!n)return;t=we(t),Zt(n.initialDef,t);const s=[...n.instances];for(let r=0;r<s.length;r++){const o=s[r],i=we(o.type);let c=it.get(i);c||(i!==n.initialDef&&Zt(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?nr(()=>{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)}sr(()=>{it.clear()})}function Zt(e,t){be(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 Z,Ee=[];function en(e,t){var n,s;Z=e,Z?(Z.enabled=!0,Ee.forEach(({event:r,args:o})=>Z.emit(r,...o)),Ee=[]):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(()=>{Z||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Ee=[])},3e3)):Ee=[]}let Ne=null,ar=null;const lr=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}Se().requestIdleCallback,Se().cancelIdleCallback;const ur=Symbol.for("v-ndc"),fr={};process.env.NODE_ENV!=="production"&&(fr.ownKeys=e=>(G("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 pr={},nn=e=>Object.getPrototypeOf(e)===pr,hr=e=>e.__isSuspense,sn=Symbol.for("v-fgt"),dr=Symbol.for("v-txt"),_r=Symbol.for("v-cmt");function gr(e){return e?e.__v_isVNode===!0:!1}const yr=(...e)=>on(...e),rn=({key:e})=>e??null,Oe=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?$(e)||nt(e)||K(e)?{i:Ne,r:e,k:t,f:!!n}:e:null);function mr(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&&Oe(t),scopeId:ar,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:Ne};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&&G("VNode created with invalid key (NaN). VNode type:",l.type),l}const br=process.env.NODE_ENV!=="production"?yr:on;function on(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===ur)&&(process.env.NODE_ENV!=="production"&&!e&&G(`Invalid vnode type when creating vnode: ${e}.`),e=_r),gr(e)){const c=Ve(e,t,!0);return n&&at(c,n),c.patchFlag=-2,c}if(un(e)&&(e=e.__vccOpts),t){t=Sr(t);let{class:c,style:l}=t;c&&!$(c)&&(t.class=Xe(c)),H(l)&&(tt(l)&&!N(l)&&(l=be({},l)),t.style=Qe(l))}const i=$(e)?1:hr(e)?128:lr(e)?64:H(e)?4:K(e)?2:0;return process.env.NODE_ENV!=="production"&&i&4&&tt(e)&&(e=T(e),G("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)),mr(e,t,n,s,r,i,o,!0)}function Sr(e){return e?tt(e)||nn(e)?be({},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?wr(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?N(o)?o.concat(Oe(t)):[o,Oe(t)]:Oe(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:process.env.NODE_ENV!=="production"&&i===-1&&N(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 N(e.children)&&(t.children=e.children.map(cn)),t}function vr(e=" ",t=0){return br(dr,null,e,t)}function at(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(N(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=Ne);else K(t)?(t={default:t,_ctx:Ne},n=32):(t=String(t),s&64?(n=16,t=[vr(t)]):n=8);e.children=t,e.shapeFlag|=n}function wr(...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=Xe([t.class,s.class]));else if(r==="style")t.style=Qe([t.style,s.style]);else if(Ks(r)){const o=t[r],i=s[r];i&&o!==i&&!(N(o)&&o.includes(i))&&(t[r]=o?[].concat(o,i):i)}else r!==""&&(t[r]=s[r])}return t}{const e=Se(),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 Er=/(?:^|[-_])\w/g,Nr=e=>e.replace(Er,t=>t.toUpperCase()).replace(/[-_]/g,"");function an(e,t=!0){return K(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?Nr(s):n?"App":"Anonymous"}function un(e){return K(e)&&"__vccOpts"in e}function Or(){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(!H(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(Bt(a))return["div",{},["span",e,et(a)?"ShallowReactive":"Reactive"],"<",c(a),`>${Ze(a)?" (readonly)":""}`];if(Ze(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=be({},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]:H(a)?["object",{object:u?T(a):a}]:["span",n,String(a)]}function l(a,u){const d=a.type;if(K(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(N(_)&&_.includes(u)||H(_)&&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 Vr(){Or()}process.env.NODE_ENV!=="production"&&Vr();const kr=["@context","activeLink","computed","dep","excludedKeys","fn","isEncrypted","isLoading","subs","version"];class fn extends Ts{_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._persister.removeItem(this.store.$id),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}),L(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];L(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}initExcludedKeys(){return new Set([...kr,...this.options.excludedKeys??[]])}async persist(){const t=await this.getStateToPersist();this.debugLog(`persist() ${this.store.$id} - stateToPersist:`,{state:t}),L(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&&!L(n)&&this.store.$patch(n),this.state.isLoading=!1,t(!0)})}stopWatch(){this.options?.watchMutation&&(this.options&&(this.options.watchMutation=!1),this._watchedStore.delete(this.store.$id))}storeSubscription(t){this.debugLog(`store.$subscribe ${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 Cr extends pn{constructor(){super(Je,fn.customizeStore.bind(fn),F)}}const ke=new Cr;function Ir(e,t){return ke.pluginOptions=Rr(e,t),ke}function Rr(e,t){let n,s;const r=new Set;try{if(window)return!L(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 xr(e,t){let n;return t&&(n=new ae(t)),ke.pluginOptions={persister:new Lt({name:e}),crypt:n,watchedStore:new Set},ke}O.PLUGIN_NAME=Je,O.PersisterMock=Lt,O.createPersistStatePlugin=Ir,O.createPluginMock=xr,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})}));
8
+ `],...Gs(n))}),t}function Gs({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(...Wt(s,e[s]))}),n.length>3&&t.push(" ..."),t}function Wt(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=Wt(e,T(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):K(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}}Xs(e,n,r,s,i)}function Xs(e,t,n,s=!0,r=!1){if(process.env.NODE_ENV!=="production"){const o=Jt[t];if(n&&Bs(n),G(`Unhandled error${o?` during execution of ${o}`:""}`),n&&Ws(),s)throw e;console.error(e)}else{if(r)throw e;console.error(e)}}const v=[];let I=-1;const Q=[];let A=null,X=0;const Zs=Promise.resolve();let ot=null;const er=100;function tr(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 nr(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(tr(t),0,e),e.flags|=1,Gt()}}function Gt(){ot||(ot=Zs.then(Qt))}function sr(e){N(e)?Q.push(...e):A&&e.id===-1?A.splice(X+1,0,e):e.flags&1||(Q.push(e),e.flags|=1),Gt()}function rr(e){if(Q.length){const t=[...new Set(Q)].sort((n,s)=>le(n)-le(s));if(Q.length=0,A){A.push(...t);return}for(A=t,process.env.NODE_ENV!=="production"&&(e=e||new Map),X=0;X<A.length;X++){const n=A[X];process.env.NODE_ENV!=="production"&&Xt(e,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}A=null,X=0}}const le=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Qt(e){process.env.NODE_ENV!=="production"&&(e=e||new Map);const t=process.env.NODE_ENV!=="production"?n=>Xt(e,n):Ut;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,rr(e),ot=null,(v.length||Q.length)&&Qt(e)}}function Xt(e,t){const n=e.get(t)||0;if(n>er){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"&&(Se().__VUE_HMR_RUNTIME__={createRecord:ct(or),rerender:ct(ir),reload:ct(cr)});const ve=new Map;function or(e,t){return ve.has(e)?!1:(ve.set(e,{initialDef:we(t),instances:new Set}),!0)}function we(e){return un(e)?e.__vccOpts:e}function ir(e,t){const n=ve.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(s=>{t&&(s.render=t,we(s.type).render=t),s.renderCache=[],s.job.flags&8||s.update()}))}function cr(e,t){const n=ve.get(e);if(!n)return;t=we(t),Zt(n.initialDef,t);const s=[...n.instances];for(let r=0;r<s.length;r++){const o=s[r],i=we(o.type);let c=it.get(i);c||(i!==n.initialDef&&Zt(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?nr(()=>{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)}sr(()=>{it.clear()})}function Zt(e,t){be(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 Z,Ee=[];function en(e,t){var n,s;Z=e,Z?(Z.enabled=!0,Ee.forEach(({event:r,args:o})=>Z.emit(r,...o)),Ee=[]):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(()=>{Z||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Ee=[])},3e3)):Ee=[]}let Ne=null,ar=null;const lr=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}Se().requestIdleCallback,Se().cancelIdleCallback;const ur=Symbol.for("v-ndc"),fr={};process.env.NODE_ENV!=="production"&&(fr.ownKeys=e=>(G("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 pr={},nn=e=>Object.getPrototypeOf(e)===pr,hr=e=>e.__isSuspense,sn=Symbol.for("v-fgt"),dr=Symbol.for("v-txt"),_r=Symbol.for("v-cmt");function gr(e){return e?e.__v_isVNode===!0:!1}const yr=(...e)=>on(...e),rn=({key:e})=>e??null,Oe=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?$(e)||nt(e)||K(e)?{i:Ne,r:e,k:t,f:!!n}:e:null);function mr(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&&Oe(t),scopeId:ar,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:Ne};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&&G("VNode created with invalid key (NaN). VNode type:",l.type),l}const br=process.env.NODE_ENV!=="production"?yr:on;function on(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===ur)&&(process.env.NODE_ENV!=="production"&&!e&&G(`Invalid vnode type when creating vnode: ${e}.`),e=_r),gr(e)){const c=ke(e,t,!0);return n&&at(c,n),c.patchFlag=-2,c}if(un(e)&&(e=e.__vccOpts),t){t=Sr(t);let{class:c,style:l}=t;c&&!$(c)&&(t.class=Xe(c)),H(l)&&(tt(l)&&!N(l)&&(l=be({},l)),t.style=Qe(l))}const i=$(e)?1:hr(e)?128:lr(e)?64:H(e)?4:K(e)?2:0;return process.env.NODE_ENV!=="production"&&i&4&&tt(e)&&(e=T(e),G("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)),mr(e,t,n,s,r,i,o,!0)}function Sr(e){return e?tt(e)||nn(e)?be({},e):e:null}function ke(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:c,transition:l}=e,f=t?wr(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?N(o)?o.concat(Oe(t)):[o,Oe(t)]:Oe(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:process.env.NODE_ENV!=="production"&&i===-1&&N(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&&ke(e.ssContent),ssFallback:e.ssFallback&&ke(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=ke(e);return N(e.children)&&(t.children=e.children.map(cn)),t}function vr(e=" ",t=0){return br(dr,null,e,t)}function at(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(N(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=Ne);else K(t)?(t={default:t,_ctx:Ne},n=32):(t=String(t),s&64?(n=16,t=[vr(t)]):n=8);e.children=t,e.shapeFlag|=n}function wr(...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=Xe([t.class,s.class]));else if(r==="style")t.style=Qe([t.style,s.style]);else if(Ks(r)){const o=t[r],i=s[r];i&&o!==i&&!(N(o)&&o.includes(i))&&(t[r]=o?[].concat(o,i):i)}else r!==""&&(t[r]=s[r])}return t}{const e=Se(),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 Er=/(?:^|[-_])\w/g,Nr=e=>e.replace(Er,t=>t.toUpperCase()).replace(/[-_]/g,"");function an(e,t=!0){return K(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?Nr(s):n?"App":"Anonymous"}function un(e){return K(e)&&"__vccOpts"in e}function Or(){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(!H(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(Bt(a))return["div",{},["span",e,et(a)?"ShallowReactive":"Reactive"],"<",c(a),`>${Ze(a)?" (readonly)":""}`];if(Ze(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=be({},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]:H(a)?["object",{object:u?T(a):a}]:["span",n,String(a)]}function l(a,u){const d=a.type;if(K(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(N(_)&&_.includes(u)||H(_)&&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 kr(){Or()}process.env.NODE_ENV!=="production"&&kr();const Vr=["@context","activeLink","computed","dep","excludedKeys","fn","isEncrypted","isLoading","subs","version"];class fn extends Ts{_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}),L(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];L(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}initExcludedKeys(){return new Set([...Vr,...this.options.excludedKeys??[]])}async persist(){const t=await this.getStateToPersist();this.debugLog(`persist() ${this.store.$id} - stateToPersist:`,{state:t}),L(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&&!L(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 Cr extends pn{_resetStoreCallback=t=>{const{removePersistedState:n}=t;typeof n=="function"&&n()};constructor(){super(Je,fn.customizeStore.bind(fn),F)}}const Ve=new Cr;function Pr(e,t){return Ve.pluginOptions=Ir(e,t),Ve}function Ir(e,t){let n,s;const r=new Set;try{if(window)return!L(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 Rr(e,t){let n;return t&&(n=new ae(t)),Ve.pluginOptions={persister:new Lt({name:e}),crypt:n,watchedStore:new Set},Ve}O.PLUGIN_NAME=Je,O.PersisterMock=Lt,O.createPersistStatePlugin=Pr,O.createPluginMock=Rr,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})}));
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.0-beta.2",
5
+ "version": "0.0.0-beta.4",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {