pinia-plugin-persist-state 0.0.0-beta.1 → 0.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ import { createPersistStatePlugin } from 'persist-pinia-state'
|
|
|
33
33
|
const app = createApp(App)
|
|
34
34
|
const pinia = createPinia()
|
|
35
35
|
|
|
36
|
-
// Pass `dbName` (e.g. 'localStorage' or a DB name for IndexedDB)
|
|
36
|
+
// Pass `dbName` (e.g. 'localStorage', 'sessionStorage' or a DB name for IndexedDB)
|
|
37
37
|
// and an optional `cryptKey` to enable encryption support
|
|
38
38
|
pinia.use(createPlugin([
|
|
39
39
|
createPersistStatePlugin('localStorage', 'my-secret-key')
|
|
@@ -116,7 +116,7 @@ The plugin uses the Web Crypto API (PBKDF2 + AES-GCM) to encrypt properties list
|
|
|
116
116
|
## 💡 Notes
|
|
117
117
|
|
|
118
118
|
- The plugin augments Pinia store definitions using the `pinia-plugin-subscription` helper. It adds `storeOptions` to Pinia's `DefineStoreOptionsBase` type through declaration merging.
|
|
119
|
-
- The $reset method is available for stores augmented by the plugin (also
|
|
119
|
+
- The $reset method is available for stores augmented by the plugin (also setup store 😁).
|
|
120
120
|
- When using IndexedDB, the persister stores objects with a `storeName` key path.
|
|
121
121
|
|
|
122
122
|
---
|
|
@@ -68,7 +68,7 @@ class un {
|
|
|
68
68
|
this._name = t, this._createInstance = n, s && (this._console = s);
|
|
69
69
|
}
|
|
70
70
|
invoke({ store: t, options: n }, s) {
|
|
71
|
-
this._storeInstance = this._createInstance(t, { ...n, ...this.pluginOptions }, s, this.console), this._storeInstance
|
|
71
|
+
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;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
class fn {
|
|
@@ -169,7 +169,7 @@ const Ae = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
|
|
|
169
169
|
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
170
170
|
const bn = () => {
|
|
171
171
|
}, Sn = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
|
|
172
|
-
(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97),
|
|
172
|
+
(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), X = Object.assign, vn = Object.prototype.hasOwnProperty, Me = (e, t) => vn.call(e, t), g = Array.isArray, ee = (e) => gt(e) === "[object Map]", T = (e) => typeof e == "function", C = (e) => typeof e == "string", ce = (e) => typeof e == "symbol", y = (e) => e !== null && typeof e == "object", wn = Object.prototype.toString, gt = (e) => wn.call(e), yt = (e) => gt(e).slice(8, -1), we = (e) => C(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, En = (e) => {
|
|
173
173
|
const t = /* @__PURE__ */ Object.create(null);
|
|
174
174
|
return ((n) => t[n] || (t[n] = e(n)));
|
|
175
175
|
}, Nn = En((e) => e.charAt(0).toUpperCase() + e.slice(1)), ze = (e, t) => !Object.is(e, t);
|
|
@@ -254,7 +254,7 @@ class xn {
|
|
|
254
254
|
if (process.env.NODE_ENV !== "production")
|
|
255
255
|
for (let n = this.subsHead; n; n = n.nextSub)
|
|
256
256
|
n.sub.onTrigger && !(n.sub.flags & 8) && n.sub.onTrigger(
|
|
257
|
-
|
|
257
|
+
X(
|
|
258
258
|
{
|
|
259
259
|
effect: n.sub
|
|
260
260
|
},
|
|
@@ -400,10 +400,10 @@ const Rn = {
|
|
|
400
400
|
return O(this, "map", e, t, void 0, arguments);
|
|
401
401
|
},
|
|
402
402
|
pop() {
|
|
403
|
-
return
|
|
403
|
+
return Z(this, "pop");
|
|
404
404
|
},
|
|
405
405
|
push(...e) {
|
|
406
|
-
return
|
|
406
|
+
return Z(this, "push", e);
|
|
407
407
|
},
|
|
408
408
|
reduce(e, ...t) {
|
|
409
409
|
return lt(this, "reduce", e, t);
|
|
@@ -412,14 +412,14 @@ const Rn = {
|
|
|
412
412
|
return lt(this, "reduceRight", e, t);
|
|
413
413
|
},
|
|
414
414
|
shift() {
|
|
415
|
-
return
|
|
415
|
+
return Z(this, "shift");
|
|
416
416
|
},
|
|
417
417
|
// slice could use ARRAY_ITERATE but also seems to beg for range tracking
|
|
418
418
|
some(e, t) {
|
|
419
419
|
return O(this, "some", e, t, void 0, arguments);
|
|
420
420
|
},
|
|
421
421
|
splice(...e) {
|
|
422
|
-
return
|
|
422
|
+
return Z(this, "splice", e);
|
|
423
423
|
},
|
|
424
424
|
toReversed() {
|
|
425
425
|
return q(this).toReversed();
|
|
@@ -431,7 +431,7 @@ const Rn = {
|
|
|
431
431
|
return q(this).toSpliced(...e);
|
|
432
432
|
},
|
|
433
433
|
unshift(...e) {
|
|
434
|
-
return
|
|
434
|
+
return Z(this, "unshift", e);
|
|
435
435
|
},
|
|
436
436
|
values() {
|
|
437
437
|
return Ce(this, "values", (e) => I(this, e));
|
|
@@ -473,7 +473,7 @@ function xe(e, t, n) {
|
|
|
473
473
|
const s = p(e), r = s[t](...n);
|
|
474
474
|
return (r === -1 || r === !1) && te(n[0]) ? (n[0] = p(n[0]), s[t](...n)) : r;
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function Z(e, t, n = []) {
|
|
477
477
|
Je();
|
|
478
478
|
const s = p(e)[t].apply(e, n);
|
|
479
479
|
return Ye(), s;
|
|
@@ -637,7 +637,7 @@ function Kn(e, t) {
|
|
|
637
637
|
return i.forEach((l, f) => s.call(r, c(l), c(f), o));
|
|
638
638
|
}
|
|
639
639
|
};
|
|
640
|
-
return
|
|
640
|
+
return X(
|
|
641
641
|
n,
|
|
642
642
|
e ? {
|
|
643
643
|
add: le("add"),
|
|
@@ -851,10 +851,10 @@ class Qn {
|
|
|
851
851
|
return this._value = this._getter();
|
|
852
852
|
}
|
|
853
853
|
}
|
|
854
|
-
function Zn(e, t, n) {
|
|
855
|
-
return m(e) ? e : T(e) ? new Qn(e) : y(e) && arguments.length > 1 ? Xn(e, t, n) : kt(e);
|
|
856
|
-
}
|
|
857
854
|
function Xn(e, t, n) {
|
|
855
|
+
return m(e) ? e : T(e) ? new Qn(e) : y(e) && arguments.length > 1 ? Zn(e, t, n) : kt(e);
|
|
856
|
+
}
|
|
857
|
+
function Zn(e, t, n) {
|
|
858
858
|
return new Gn(e, t, n);
|
|
859
859
|
}
|
|
860
860
|
const M = [];
|
|
@@ -870,7 +870,7 @@ function se(e, ...t) {
|
|
|
870
870
|
Ie = !0;
|
|
871
871
|
const n = M.length ? M[M.length - 1].component : null, s = n && n.appContext.config.warnHandler, r = ns();
|
|
872
872
|
if (s)
|
|
873
|
-
|
|
873
|
+
Xe(
|
|
874
874
|
s,
|
|
875
875
|
n,
|
|
876
876
|
11,
|
|
@@ -968,7 +968,7 @@ const xt = {
|
|
|
968
968
|
15: "component update",
|
|
969
969
|
16: "app unmount cleanup function"
|
|
970
970
|
};
|
|
971
|
-
function
|
|
971
|
+
function Xe(e, t, n, s) {
|
|
972
972
|
try {
|
|
973
973
|
return s ? e(...s) : e();
|
|
974
974
|
} catch (r) {
|
|
@@ -990,7 +990,7 @@ function It(e, t, n, s = !0) {
|
|
|
990
990
|
c = c.parent;
|
|
991
991
|
}
|
|
992
992
|
if (o) {
|
|
993
|
-
|
|
993
|
+
Xe(o, null, 10, [
|
|
994
994
|
e,
|
|
995
995
|
l,
|
|
996
996
|
f
|
|
@@ -1066,7 +1066,7 @@ function Dt(e) {
|
|
|
1066
1066
|
if (n && !(n.flags & 8)) {
|
|
1067
1067
|
if (process.env.NODE_ENV !== "production" && t(n))
|
|
1068
1068
|
continue;
|
|
1069
|
-
n.flags & 4 && (n.flags &= -2),
|
|
1069
|
+
n.flags & 4 && (n.flags &= -2), Xe(
|
|
1070
1070
|
n,
|
|
1071
1071
|
n.i,
|
|
1072
1072
|
n.i ? 15 : 14
|
|
@@ -1134,7 +1134,7 @@ function _s(e, t) {
|
|
|
1134
1134
|
});
|
|
1135
1135
|
}
|
|
1136
1136
|
function ft(e, t) {
|
|
1137
|
-
|
|
1137
|
+
X(e, t);
|
|
1138
1138
|
for (const n in e)
|
|
1139
1139
|
n !== "__file" && !(n in t) && delete e[n];
|
|
1140
1140
|
}
|
|
@@ -1199,7 +1199,7 @@ function Os(e, t = null, n = null, s = 0, r = null, o = e === Tt ? 0 : 1, i = !1
|
|
|
1199
1199
|
appContext: null,
|
|
1200
1200
|
ctx: _e
|
|
1201
1201
|
};
|
|
1202
|
-
return c ? (
|
|
1202
|
+
return c ? (Ze(l, n), o & 128 && e.normalize(l)) : n && (l.shapeFlag |= C(n) ? 8 : 16), process.env.NODE_ENV !== "production" && l.key !== l.key && se("VNode created with invalid key (NaN). VNode type:", l.type), l;
|
|
1203
1203
|
}
|
|
1204
1204
|
const Vs = process.env.NODE_ENV !== "production" ? Ns : Mt;
|
|
1205
1205
|
function Mt(e, t = null, n = null, s = 0, r = null, o = !1) {
|
|
@@ -1210,12 +1210,12 @@ function Mt(e, t = null, n = null, s = 0, r = null, o = !1) {
|
|
|
1210
1210
|
!0
|
|
1211
1211
|
/* mergeRef: true */
|
|
1212
1212
|
);
|
|
1213
|
-
return n &&
|
|
1213
|
+
return n && Ze(c, n), c.patchFlag = -2, c;
|
|
1214
1214
|
}
|
|
1215
1215
|
if (qt(e) && (e = e.__vccOpts), t) {
|
|
1216
1216
|
t = ks(t);
|
|
1217
1217
|
let { class: c, style: l } = t;
|
|
1218
|
-
c && !C(c) && (t.class = We(c)), y(l) && (te(l) && !g(l) && (l =
|
|
1218
|
+
c && !C(c) && (t.class = We(c)), y(l) && (te(l) && !g(l) && (l = X({}, l)), t.style = Be(l));
|
|
1219
1219
|
}
|
|
1220
1220
|
const i = C(e) ? 1 : Ss(e) ? 128 : ys(e) ? 64 : y(e) ? 4 : T(e) ? 2 : 0;
|
|
1221
1221
|
return process.env.NODE_ENV !== "production" && i & 4 && te(e) && (e = p(e), se(
|
|
@@ -1235,7 +1235,7 @@ Component that was made reactive: `,
|
|
|
1235
1235
|
);
|
|
1236
1236
|
}
|
|
1237
1237
|
function ks(e) {
|
|
1238
|
-
return e ? te(e) || $t(e) ?
|
|
1238
|
+
return e ? te(e) || $t(e) ? X({}, e) : e : null;
|
|
1239
1239
|
}
|
|
1240
1240
|
function ge(e, t, n = !1, s = !1) {
|
|
1241
1241
|
const { props: r, ref: o, patchFlag: i, children: c, transition: l } = e, f = t ? xs(r || {}, t) : r, h = {
|
|
@@ -1294,7 +1294,7 @@ function Ft(e) {
|
|
|
1294
1294
|
function Cs(e = " ", t = 0) {
|
|
1295
1295
|
return Vs(vs, null, e, t);
|
|
1296
1296
|
}
|
|
1297
|
-
function
|
|
1297
|
+
function Ze(e, t) {
|
|
1298
1298
|
let n = 0;
|
|
1299
1299
|
const { shapeFlag: s } = e;
|
|
1300
1300
|
if (t == null)
|
|
@@ -1304,7 +1304,7 @@ function Xe(e, t) {
|
|
|
1304
1304
|
else if (typeof t == "object")
|
|
1305
1305
|
if (s & 65) {
|
|
1306
1306
|
const r = t.default;
|
|
1307
|
-
r && (r._c && (r._d = !1),
|
|
1307
|
+
r && (r._c && (r._d = !1), Ze(e, r()), r._c && (r._d = !0));
|
|
1308
1308
|
return;
|
|
1309
1309
|
} else
|
|
1310
1310
|
n = 32, !t._ && !$t(t) && (t._ctx = _e);
|
|
@@ -1442,7 +1442,7 @@ function Ds() {
|
|
|
1442
1442
|
]), u;
|
|
1443
1443
|
}
|
|
1444
1444
|
function i(a, u) {
|
|
1445
|
-
return u =
|
|
1445
|
+
return u = X({}, u), Object.keys(u).length ? [
|
|
1446
1446
|
"div",
|
|
1447
1447
|
{ style: "line-height:1.25em;margin-bottom:0.6em" },
|
|
1448
1448
|
[
|
|
@@ -1544,7 +1544,7 @@ class js extends fn {
|
|
|
1544
1544
|
* @param value
|
|
1545
1545
|
*/
|
|
1546
1546
|
addToState(t, n) {
|
|
1547
|
-
this.isOptionApi() || n?.value || (n = kt(n)), this.state[t] = n, this.store[t] =
|
|
1547
|
+
this.isOptionApi() || n?.value || (n = kt(n)), this.state[t] = n, this.store[t] = Xn(this.state, t);
|
|
1548
1548
|
}
|
|
1549
1549
|
addSubscription(t, n, s) {
|
|
1550
1550
|
this._subscriptions[t] = { subscription: n, ...s ?? {} };
|
|
@@ -1962,22 +1962,28 @@ process.env.NODE_ENV;
|
|
|
1962
1962
|
new Set(
|
|
1963
1963
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(Ks)
|
|
1964
1964
|
);
|
|
1965
|
+
// @__NO_SIDE_EFFECTS__
|
|
1965
1966
|
function zt(e) {
|
|
1966
|
-
return qe(e) ? zt(e.__v_raw) : !!(e && e.__v_isReactive);
|
|
1967
|
+
return /* @__PURE__ */ qe(e) ? /* @__PURE__ */ zt(e.__v_raw) : !!(e && e.__v_isReactive);
|
|
1967
1968
|
}
|
|
1969
|
+
// @__NO_SIDE_EFFECTS__
|
|
1968
1970
|
function qe(e) {
|
|
1969
1971
|
return !!(e && e.__v_isReadonly);
|
|
1970
1972
|
}
|
|
1973
|
+
// @__NO_SIDE_EFFECTS__
|
|
1971
1974
|
function Pe(e) {
|
|
1972
1975
|
return !!(e && e.__v_isShallow);
|
|
1973
1976
|
}
|
|
1977
|
+
// @__NO_SIDE_EFFECTS__
|
|
1974
1978
|
function Le(e) {
|
|
1975
1979
|
return e ? !!e.__v_raw : !1;
|
|
1976
1980
|
}
|
|
1981
|
+
// @__NO_SIDE_EFFECTS__
|
|
1977
1982
|
function j(e) {
|
|
1978
1983
|
const t = e && e.__v_raw;
|
|
1979
|
-
return t ? j(t) : e;
|
|
1984
|
+
return t ? /* @__PURE__ */ j(t) : e;
|
|
1980
1985
|
}
|
|
1986
|
+
// @__NO_SIDE_EFFECTS__
|
|
1981
1987
|
function st(e) {
|
|
1982
1988
|
return e ? e.__v_isRef === !0 : !1;
|
|
1983
1989
|
}
|
|
@@ -2057,7 +2063,7 @@ function Gs(e) {
|
|
|
2057
2063
|
}), n.length > 3 && t.push(" ..."), t;
|
|
2058
2064
|
}
|
|
2059
2065
|
function Bt(e, t, n) {
|
|
2060
|
-
return $(t) ? (t = JSON.stringify(t), n ? t : [`${e}=${t}`]) : typeof t == "number" || typeof t == "boolean" || t == null ? n ? t : [`${e}=${t}`] : st(t) ? (t = Bt(e, j(t.value), !0), n ? t : [`${e}=Ref<`, t, ">"]) : H(t) ? [`${e}=fn${t.name ? `<${t.name}>` : ""}`] : (t = j(t), n ? t : [`${e}=`, t]);
|
|
2066
|
+
return $(t) ? (t = JSON.stringify(t), n ? t : [`${e}=${t}`]) : typeof t == "number" || typeof t == "boolean" || t == null ? n ? t : [`${e}=${t}`] : /* @__PURE__ */ st(t) ? (t = Bt(e, /* @__PURE__ */ j(t.value), !0), n ? t : [`${e}=Ref<`, t, ">"]) : H(t) ? [`${e}=fn${t.name ? `<${t.name}>` : ""}`] : (t = /* @__PURE__ */ j(t), n ? t : [`${e}=`, t]);
|
|
2061
2067
|
}
|
|
2062
2068
|
const Wt = {
|
|
2063
2069
|
sp: "serverPrefetch hook",
|
|
@@ -2140,9 +2146,9 @@ const S = [];
|
|
|
2140
2146
|
let k = -1;
|
|
2141
2147
|
const Y = [];
|
|
2142
2148
|
let D = null, z = 0;
|
|
2143
|
-
const
|
|
2149
|
+
const Xs = /* @__PURE__ */ Promise.resolve();
|
|
2144
2150
|
let Ue = null;
|
|
2145
|
-
const
|
|
2151
|
+
const Zs = 100;
|
|
2146
2152
|
function er(e) {
|
|
2147
2153
|
let t = k + 1, n = S.length;
|
|
2148
2154
|
for (; t < n; ) {
|
|
@@ -2159,7 +2165,7 @@ function tr(e) {
|
|
|
2159
2165
|
}
|
|
2160
2166
|
}
|
|
2161
2167
|
function Yt() {
|
|
2162
|
-
Ue || (Ue =
|
|
2168
|
+
Ue || (Ue = Xs.then(Gt));
|
|
2163
2169
|
}
|
|
2164
2170
|
function nr(e) {
|
|
2165
2171
|
N(e) ? Y.push(...e) : D && e.id === -1 ? D.splice(z + 1, 0, e) : e.flags & 1 || (Y.push(e), e.flags |= 1), Yt();
|
|
@@ -2207,7 +2213,7 @@ function Gt(e) {
|
|
|
2207
2213
|
}
|
|
2208
2214
|
function Qt(e, t) {
|
|
2209
2215
|
const n = e.get(t) || 0;
|
|
2210
|
-
if (n >
|
|
2216
|
+
if (n > Zs) {
|
|
2211
2217
|
const s = t.i, r = s && on(s.type);
|
|
2212
2218
|
return Jt(
|
|
2213
2219
|
`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.`,
|
|
@@ -2274,21 +2280,21 @@ function Te(e) {
|
|
|
2274
2280
|
};
|
|
2275
2281
|
}
|
|
2276
2282
|
let B, ue = [];
|
|
2277
|
-
function
|
|
2283
|
+
function Xt(e, t) {
|
|
2278
2284
|
var n, s;
|
|
2279
2285
|
B = e, B ? (B.enabled = !0, ue.forEach(({ event: r, args: o }) => B.emit(r, ...o)), ue = []) : /* handle late devtools injection - only do this if we are in an actual */ /* browser environment to avoid the timer handle stalling test runner exit */ /* (#4815) */ typeof window < "u" && // some envs mock window but not fully
|
|
2280
2286
|
window.HTMLElement && // also exclude jsdom
|
|
2281
2287
|
// eslint-disable-next-line no-restricted-syntax
|
|
2282
2288
|
!((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) => {
|
|
2283
|
-
|
|
2289
|
+
Xt(o, t);
|
|
2284
2290
|
}), setTimeout(() => {
|
|
2285
2291
|
B || (t.__VUE_DEVTOOLS_HOOK_REPLAY__ = null, ue = []);
|
|
2286
2292
|
}, 3e3)) : ue = [];
|
|
2287
2293
|
}
|
|
2288
2294
|
let be = null, cr = null;
|
|
2289
2295
|
const ar = (e) => e.__isTeleport;
|
|
2290
|
-
function
|
|
2291
|
-
e.shapeFlag & 6 && e.component ? (e.transition = t,
|
|
2296
|
+
function Zt(e, t) {
|
|
2297
|
+
e.shapeFlag & 6 && e.component ? (e.transition = t, Zt(e.component.subTree, t)) : e.shapeFlag & 128 ? (e.ssContent.transition = t.clone(e.ssContent), e.ssFallback.transition = t.clone(e.ssFallback)) : e.transition = t;
|
|
2292
2298
|
}
|
|
2293
2299
|
Oe().requestIdleCallback;
|
|
2294
2300
|
Oe().cancelIdleCallback;
|
|
@@ -2306,7 +2312,7 @@ const gr = (...e) => sn(
|
|
|
2306
2312
|
ref: e,
|
|
2307
2313
|
ref_key: t,
|
|
2308
2314
|
ref_for: n
|
|
2309
|
-
}) => (typeof e == "number" && (e = "" + e), e != null ? $(e) || st(e) || H(e) ? { i: be, r: e, k: t, f: !!n } : e : null);
|
|
2315
|
+
}) => (typeof e == "number" && (e = "" + e), e != null ? $(e) || /* @__PURE__ */ st(e) || H(e) ? { i: be, r: e, k: t, f: !!n } : e : null);
|
|
2310
2316
|
function yr(e, t = null, n = null, s = 0, r = null, o = e === tn ? 0 : 1, i = !1, c = !1) {
|
|
2311
2317
|
const l = {
|
|
2312
2318
|
__v_isVNode: !0,
|
|
@@ -2353,10 +2359,10 @@ function sn(e, t = null, n = null, s = 0, r = null, o = !1) {
|
|
|
2353
2359
|
if (an(e) && (e = e.__vccOpts), t) {
|
|
2354
2360
|
t = br(t);
|
|
2355
2361
|
let { class: c, style: l } = t;
|
|
2356
|
-
c && !$(c) && (t.class = nt(c)), F(l) && (Le(l) && !N(l) && (l = Ne({}, l)), t.style = tt(l));
|
|
2362
|
+
c && !$(c) && (t.class = nt(c)), F(l) && (/* @__PURE__ */ Le(l) && !N(l) && (l = Ne({}, l)), t.style = tt(l));
|
|
2357
2363
|
}
|
|
2358
2364
|
const i = $(e) ? 1 : pr(e) ? 128 : ar(e) ? 64 : F(e) ? 4 : H(e) ? 2 : 0;
|
|
2359
|
-
return process.env.NODE_ENV !== "production" && i & 4 && Le(e) && (e = j(e), Q(
|
|
2365
|
+
return process.env.NODE_ENV !== "production" && i & 4 && /* @__PURE__ */ Le(e) && (e = /* @__PURE__ */ j(e), Q(
|
|
2360
2366
|
"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`.",
|
|
2361
2367
|
`
|
|
2362
2368
|
Component that was made reactive: `,
|
|
@@ -2373,7 +2379,7 @@ Component that was made reactive: `,
|
|
|
2373
2379
|
);
|
|
2374
2380
|
}
|
|
2375
2381
|
function br(e) {
|
|
2376
|
-
return e ? Le(e) || en(e) ? Ne({}, e) : e : null;
|
|
2382
|
+
return e ? /* @__PURE__ */ Le(e) || en(e) ? Ne({}, e) : e : null;
|
|
2377
2383
|
}
|
|
2378
2384
|
function Se(e, t, n = !1, s = !1) {
|
|
2379
2385
|
const { props: r, ref: o, patchFlag: i, children: c, transition: l } = e, f = t ? vr(r || {}, t) : r, h = {
|
|
@@ -2420,7 +2426,7 @@ function Se(e, t, n = !1, s = !1) {
|
|
|
2420
2426
|
ctx: e.ctx,
|
|
2421
2427
|
ce: e.ce
|
|
2422
2428
|
};
|
|
2423
|
-
return l && s &&
|
|
2429
|
+
return l && s && Zt(
|
|
2424
2430
|
h,
|
|
2425
2431
|
l.clone(h)
|
|
2426
2432
|
), h;
|
|
@@ -2516,7 +2522,7 @@ function Nr() {
|
|
|
2516
2522
|
return null;
|
|
2517
2523
|
if (a.__isVue)
|
|
2518
2524
|
return ["div", e, "VueInstance"];
|
|
2519
|
-
if (st(a)) {
|
|
2525
|
+
if (/* @__PURE__ */ st(a)) {
|
|
2520
2526
|
const u = a.value;
|
|
2521
2527
|
return [
|
|
2522
2528
|
"div",
|
|
@@ -2527,20 +2533,20 @@ function Nr() {
|
|
|
2527
2533
|
">"
|
|
2528
2534
|
];
|
|
2529
2535
|
} else {
|
|
2530
|
-
if (zt(a))
|
|
2536
|
+
if (/* @__PURE__ */ zt(a))
|
|
2531
2537
|
return [
|
|
2532
2538
|
"div",
|
|
2533
2539
|
{},
|
|
2534
|
-
["span", e, Pe(a) ? "ShallowReactive" : "Reactive"],
|
|
2540
|
+
["span", e, /* @__PURE__ */ Pe(a) ? "ShallowReactive" : "Reactive"],
|
|
2535
2541
|
"<",
|
|
2536
2542
|
c(a),
|
|
2537
|
-
`>${qe(a) ? " (readonly)" : ""}`
|
|
2543
|
+
`>${/* @__PURE__ */ qe(a) ? " (readonly)" : ""}`
|
|
2538
2544
|
];
|
|
2539
|
-
if (qe(a))
|
|
2545
|
+
if (/* @__PURE__ */ qe(a))
|
|
2540
2546
|
return [
|
|
2541
2547
|
"div",
|
|
2542
2548
|
{},
|
|
2543
|
-
["span", e, Pe(a) ? "ShallowReadonly" : "Readonly"],
|
|
2549
|
+
["span", e, /* @__PURE__ */ Pe(a) ? "ShallowReadonly" : "Readonly"],
|
|
2544
2550
|
"<",
|
|
2545
2551
|
c(a),
|
|
2546
2552
|
">"
|
|
@@ -2562,7 +2568,7 @@ function Nr() {
|
|
|
2562
2568
|
};
|
|
2563
2569
|
function o(a) {
|
|
2564
2570
|
const u = [];
|
|
2565
|
-
a.type.props && a.props && u.push(i("props", j(a.props))), a.setupState !== He && u.push(i("setup", a.setupState)), a.data !== He && u.push(i("data", j(a.data)));
|
|
2571
|
+
a.type.props && a.props && u.push(i("props", /* @__PURE__ */ j(a.props))), a.setupState !== He && u.push(i("setup", a.setupState)), a.data !== He && u.push(i("data", /* @__PURE__ */ j(a.data)));
|
|
2566
2572
|
const d = l(a, "computed");
|
|
2567
2573
|
d && u.push(i("computed", d));
|
|
2568
2574
|
const _ = l(a, "inject");
|
|
@@ -2605,7 +2611,7 @@ function Nr() {
|
|
|
2605
2611
|
] : ["span", {}];
|
|
2606
2612
|
}
|
|
2607
2613
|
function c(a, u = !0) {
|
|
2608
|
-
return typeof a == "number" ? ["span", t, a] : typeof a == "string" ? ["span", n, JSON.stringify(a)] : typeof a == "boolean" ? ["span", s, a] : F(a) ? ["object", { object: u ? j(a) : a }] : ["span", n, String(a)];
|
|
2614
|
+
return typeof a == "number" ? ["span", t, a] : typeof a == "string" ? ["span", n, JSON.stringify(a)] : typeof a == "boolean" ? ["span", s, a] : F(a) ? ["object", { object: u ? /* @__PURE__ */ j(a) : a }] : ["span", n, String(a)];
|
|
2609
2615
|
}
|
|
2610
2616
|
function l(a, u) {
|
|
2611
2617
|
const d = a.type;
|
|
@@ -2622,7 +2628,7 @@ function Nr() {
|
|
|
2622
2628
|
return !0;
|
|
2623
2629
|
}
|
|
2624
2630
|
function h(a) {
|
|
2625
|
-
return Pe(a) ? "ShallowRef" : a.effect ? "ComputedRef" : "Ref";
|
|
2631
|
+
return /* @__PURE__ */ Pe(a) ? "ShallowRef" : a.effect ? "ComputedRef" : "Ref";
|
|
2626
2632
|
}
|
|
2627
2633
|
window.devtoolsFormatters ? window.devtoolsFormatters.push(r) : window.devtoolsFormatters = [r];
|
|
2628
2634
|
}
|
|
@@ -2716,7 +2722,7 @@ class _t extends js {
|
|
|
2716
2722
|
for (const i of Object.keys(n))
|
|
2717
2723
|
if (!this.hasDeniedFirstChar(i[0]) && !t.has(i)) {
|
|
2718
2724
|
const c = n[i];
|
|
2719
|
-
W(c) || (s && this._propertiesToEncrypt.has(i) ? o[i] = await this.cryptProperty(r, c, !1) : o[i] = j(c));
|
|
2725
|
+
W(c) || (s && this._propertiesToEncrypt.has(i) ? o[i] = await this.cryptProperty(r, c, !1) : o[i] = /* @__PURE__ */ j(c));
|
|
2720
2726
|
}
|
|
2721
2727
|
return o;
|
|
2722
2728
|
}
|
|
@@ -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){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))}}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",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)),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=k(s)?Rn(s):xe(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=/:([^]+)/,In=/\/\*[^]*?\*\//g;function Rn(e){const t={};return e.replace(In,"").split(Vn).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(k(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 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: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(`${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),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 Zn{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 Xn{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 Xn(e):y(e)&&arguments.length>1?ts(e,t,n):Ot(e)}function ts(e,t,n){return new Zn(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,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(`
|
|
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(...
|
|
5
|
-
Component that was made reactive: `,e)),Vs(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 Ze(e){let t="";if($(e))t=e;else if(N(e))for(let n=0;n<e.length;n++){const s=Ze(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 Xe(e)?Bt(e.__v_raw):!!(e&&e.__v_isReactive)}function Xe(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(...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(`
|
|
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}}
|
|
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
|
|
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"})}));
|
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.
|
|
5
|
+
"version": "0.0.0-beta.2",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|