@stonecrop/stonecrop 0.2.35 → 0.2.37
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/dist/stonecrop.js +1054 -1042
- package/dist/stonecrop.js.map +1 -1
- package/dist/stonecrop.tsbuildinfo +1 -1
- package/dist/stonecrop.umd.cjs +20 -20
- package/dist/stonecrop.umd.cjs.map +1 -1
- package/package.json +4 -4
- /package/{readme.md → README.md} +0 -0
package/dist/stonecrop.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { effectScope as
|
|
5
|
-
function
|
|
1
|
+
var vr = Object.defineProperty;
|
|
2
|
+
var yr = (e, t, n) => t in e ? vr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var x = (e, t, n) => yr(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { effectScope as _n, ref as oe, markRaw as le, toRaw as Ce, watch as Me, unref as fe, hasInjectionContext as _r, inject as pe, getCurrentInstance as bt, reactive as En, isRef as Ae, isReactive as wt, toRef as Xe, nextTick as ct, computed as z, getCurrentScope as Er, onScopeDispose as br, toRefs as jt, onBeforeMount as wr, shallowRef as Sr, shallowReactive as Or, defineComponent as bn, h as wn, provide as Ze, watchEffect as Nr } from "vue";
|
|
5
|
+
function ut(e) {
|
|
6
6
|
this.message = e || "";
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
constructor: { value:
|
|
8
|
+
ut.prototype = Object.create(Error.prototype, {
|
|
9
|
+
constructor: { value: ut },
|
|
10
10
|
name: { value: "NotImplemented" },
|
|
11
11
|
stack: {
|
|
12
12
|
get: function() {
|
|
@@ -14,7 +14,7 @@ at.prototype = Object.create(Error.prototype, {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
const
|
|
17
|
+
const we = class we {
|
|
18
18
|
/**
|
|
19
19
|
* @constructor
|
|
20
20
|
* @param {Registry} registry - The immutable registry
|
|
@@ -36,7 +36,7 @@ const _e = class _e {
|
|
|
36
36
|
* @example
|
|
37
37
|
* 'Stonecrop'
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
x(this, "name", "Stonecrop");
|
|
40
40
|
/**
|
|
41
41
|
* @property {Registry} registry
|
|
42
42
|
* @description The registry is an immutable collection of doctypes
|
|
@@ -55,7 +55,7 @@ const _e = class _e {
|
|
|
55
55
|
* @see {@link Registry}
|
|
56
56
|
* @see {@link DoctypeMeta}
|
|
57
57
|
*/
|
|
58
|
-
|
|
58
|
+
x(this, "registry");
|
|
59
59
|
/**
|
|
60
60
|
* @property {Schema} schema - The Stonecrop schema
|
|
61
61
|
* @description The schema is a subset of the registry
|
|
@@ -72,25 +72,25 @@ const _e = class _e {
|
|
|
72
72
|
* @see {@link DoctypeMeta}
|
|
73
73
|
* @see {@link DoctypeMeta.schema}
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
x(this, "schema");
|
|
76
76
|
/**
|
|
77
77
|
* @property {ImmutableDoctype['workflow']} workflow
|
|
78
78
|
* @description The workflow is a subset of the registry
|
|
79
79
|
*/
|
|
80
|
-
|
|
80
|
+
x(this, "workflow");
|
|
81
81
|
/**
|
|
82
82
|
* @property {ImmutableDoctype['actions']} actions
|
|
83
83
|
* @description The actions are a subset of the registry
|
|
84
84
|
*/
|
|
85
|
-
|
|
85
|
+
x(this, "actions");
|
|
86
86
|
/**
|
|
87
87
|
* @property {ReturnType<typeof useDataStore>} store
|
|
88
88
|
* @description The Pinia store that manages the mutable records
|
|
89
89
|
*/
|
|
90
|
-
|
|
91
|
-
if (
|
|
92
|
-
return
|
|
93
|
-
|
|
90
|
+
x(this, "store");
|
|
91
|
+
if (we._root)
|
|
92
|
+
return we._root;
|
|
93
|
+
we._root = this, this.registry = t, this.store = n, this.schema = r, this.workflow = o, this.actions = s;
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* @method setup
|
|
@@ -116,7 +116,7 @@ const _e = class _e {
|
|
|
116
116
|
* const meta = stonecrop.getMeta(doctype)
|
|
117
117
|
*/
|
|
118
118
|
getMeta(t) {
|
|
119
|
-
return this.registry.getMeta ? this.registry.getMeta(t.doctype) : new
|
|
119
|
+
return this.registry.getMeta ? this.registry.getMeta(t.doctype) : new ut(t.doctype);
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
122
|
* @method getWorkflow
|
|
@@ -209,35 +209,35 @@ const _e = class _e {
|
|
|
209
209
|
* @property {Stonecrop} _root
|
|
210
210
|
* @description The root Stonecrop instance
|
|
211
211
|
*/
|
|
212
|
-
|
|
213
|
-
let
|
|
214
|
-
var
|
|
215
|
-
function
|
|
212
|
+
x(we, "_root");
|
|
213
|
+
let lt = we;
|
|
214
|
+
var Sn = !1;
|
|
215
|
+
function je(e, t, n) {
|
|
216
216
|
return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, n), n) : (e[t] = n, n);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function et(e, t) {
|
|
219
219
|
if (Array.isArray(e)) {
|
|
220
220
|
e.splice(t, 1);
|
|
221
221
|
return;
|
|
222
222
|
}
|
|
223
223
|
delete e[t];
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
return
|
|
225
|
+
function kr() {
|
|
226
|
+
return On().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
227
227
|
}
|
|
228
|
-
function
|
|
229
|
-
return typeof navigator < "u" && typeof window < "u" ? window : typeof
|
|
228
|
+
function On() {
|
|
229
|
+
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
230
230
|
}
|
|
231
|
-
const
|
|
232
|
-
let
|
|
233
|
-
function
|
|
231
|
+
const Pr = typeof Proxy == "function", $r = "devtools-plugin:setup", Rr = "plugin:settings:set";
|
|
232
|
+
let ye, ft;
|
|
233
|
+
function Ir() {
|
|
234
234
|
var e;
|
|
235
|
-
return
|
|
235
|
+
return ye !== void 0 || (typeof window < "u" && window.performance ? (ye = !0, ft = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (ye = !0, ft = globalThis.perf_hooks.performance) : ye = !1), ye;
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
return
|
|
237
|
+
function Cr() {
|
|
238
|
+
return Ir() ? ft.now() : Date.now();
|
|
239
239
|
}
|
|
240
|
-
class
|
|
240
|
+
class Ar {
|
|
241
241
|
constructor(t, n) {
|
|
242
242
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
|
|
243
243
|
const r = {};
|
|
@@ -265,9 +265,9 @@ class Rr {
|
|
|
265
265
|
s = i;
|
|
266
266
|
},
|
|
267
267
|
now() {
|
|
268
|
-
return
|
|
268
|
+
return Cr();
|
|
269
269
|
}
|
|
270
|
-
}, n && n.on(
|
|
270
|
+
}, n && n.on(Rr, (i, a) => {
|
|
271
271
|
i === this.plugin.id && this.fallbacks.setSettings(a);
|
|
272
272
|
}), this.proxiedOn = new Proxy({}, {
|
|
273
273
|
get: (i, a) => this.target ? this.target.on[a] : (...c) => {
|
|
@@ -299,12 +299,12 @@ class Rr {
|
|
|
299
299
|
n.resolve(await this.target[n.method](...n.args));
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
function
|
|
303
|
-
const n = e, r =
|
|
302
|
+
function St(e, t) {
|
|
303
|
+
const n = e, r = On(), o = kr(), s = Pr && n.enableEarlyProxy;
|
|
304
304
|
if (o && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s))
|
|
305
|
-
o.emit(
|
|
305
|
+
o.emit($r, e, t);
|
|
306
306
|
else {
|
|
307
|
-
const i = s ? new
|
|
307
|
+
const i = s ? new Ar(n, o) : null;
|
|
308
308
|
(r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
309
309
|
pluginDescriptor: n,
|
|
310
310
|
setupFn: t,
|
|
@@ -313,35 +313,35 @@ function wt(e, t) {
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
/*!
|
|
316
|
-
* pinia v2.
|
|
317
|
-
* (c)
|
|
316
|
+
* pinia v2.2.2
|
|
317
|
+
* (c) 2024 Eduardo San Martin Morote
|
|
318
318
|
* @license MIT
|
|
319
319
|
*/
|
|
320
|
-
let
|
|
321
|
-
const
|
|
320
|
+
let $e;
|
|
321
|
+
const Te = (e) => $e = e, Nn = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
322
322
|
/* istanbul ignore next */
|
|
323
323
|
Symbol()
|
|
324
324
|
);
|
|
325
|
-
function
|
|
325
|
+
function me(e) {
|
|
326
326
|
return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
|
|
327
327
|
}
|
|
328
|
-
var
|
|
328
|
+
var K;
|
|
329
329
|
(function(e) {
|
|
330
330
|
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
331
|
-
})(
|
|
332
|
-
const
|
|
333
|
-
function
|
|
331
|
+
})(K || (K = {}));
|
|
332
|
+
const de = typeof window < "u", Lt = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
|
|
333
|
+
function Tr(e, { autoBom: t = !1 } = {}) {
|
|
334
334
|
return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function Ot(e, t, n) {
|
|
337
337
|
const r = new XMLHttpRequest();
|
|
338
338
|
r.open("GET", e), r.responseType = "blob", r.onload = function() {
|
|
339
|
-
|
|
339
|
+
$n(r.response, t, n);
|
|
340
340
|
}, r.onerror = function() {
|
|
341
341
|
console.error("could not download file");
|
|
342
342
|
}, r.send();
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function kn(e) {
|
|
345
345
|
const t = new XMLHttpRequest();
|
|
346
346
|
t.open("HEAD", e, !1);
|
|
347
347
|
try {
|
|
@@ -350,7 +350,7 @@ function Sn(e) {
|
|
|
350
350
|
}
|
|
351
351
|
return t.status >= 200 && t.status <= 299;
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function Be(e) {
|
|
354
354
|
try {
|
|
355
355
|
e.dispatchEvent(new MouseEvent("click"));
|
|
356
356
|
} catch {
|
|
@@ -358,43 +358,43 @@ function je(e) {
|
|
|
358
358
|
n.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(n);
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
const
|
|
361
|
+
const Ue = typeof navigator == "object" ? navigator : { userAgent: "" }, Pn = /Macintosh/.test(Ue.userAgent) && /AppleWebKit/.test(Ue.userAgent) && !/Safari/.test(Ue.userAgent), $n = de ? (
|
|
362
362
|
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
|
|
363
|
-
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !
|
|
363
|
+
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !Pn ? Dr : (
|
|
364
364
|
// Use msSaveOrOpenBlob as a second approach
|
|
365
|
-
"msSaveOrOpenBlob" in
|
|
365
|
+
"msSaveOrOpenBlob" in Ue ? Mr : (
|
|
366
366
|
// Fallback to using FileReader and a popup
|
|
367
|
-
|
|
367
|
+
Vr
|
|
368
368
|
)
|
|
369
369
|
)
|
|
370
370
|
) : () => {
|
|
371
371
|
};
|
|
372
|
-
function
|
|
372
|
+
function Dr(e, t = "download", n) {
|
|
373
373
|
const r = document.createElement("a");
|
|
374
|
-
r.download = t, r.rel = "noopener", typeof e == "string" ? (r.href = e, r.origin !== location.origin ?
|
|
374
|
+
r.download = t, r.rel = "noopener", typeof e == "string" ? (r.href = e, r.origin !== location.origin ? kn(r.href) ? Ot(e, t, n) : (r.target = "_blank", Be(r)) : Be(r)) : (r.href = URL.createObjectURL(e), setTimeout(function() {
|
|
375
375
|
URL.revokeObjectURL(r.href);
|
|
376
376
|
}, 4e4), setTimeout(function() {
|
|
377
|
-
|
|
377
|
+
Be(r);
|
|
378
378
|
}, 0));
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function Mr(e, t = "download", n) {
|
|
381
381
|
if (typeof e == "string")
|
|
382
|
-
if (
|
|
383
|
-
|
|
382
|
+
if (kn(e))
|
|
383
|
+
Ot(e, t, n);
|
|
384
384
|
else {
|
|
385
385
|
const r = document.createElement("a");
|
|
386
386
|
r.href = e, r.target = "_blank", setTimeout(function() {
|
|
387
|
-
|
|
387
|
+
Be(r);
|
|
388
388
|
});
|
|
389
389
|
}
|
|
390
390
|
else
|
|
391
|
-
navigator.msSaveOrOpenBlob(
|
|
391
|
+
navigator.msSaveOrOpenBlob(Tr(e, n), t);
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function Vr(e, t, n, r) {
|
|
394
394
|
if (r = r || open("", "_blank"), r && (r.document.title = r.document.body.innerText = "downloading..."), typeof e == "string")
|
|
395
|
-
return
|
|
396
|
-
const o = e.type === "application/octet-stream", s = /constructor/i.test(String(
|
|
397
|
-
if ((i || o && s ||
|
|
395
|
+
return Ot(e, t, n);
|
|
396
|
+
const o = e.type === "application/octet-stream", s = /constructor/i.test(String(Lt.HTMLElement)) || "safari" in Lt, i = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
397
|
+
if ((i || o && s || Pn) && typeof FileReader < "u") {
|
|
398
398
|
const a = new FileReader();
|
|
399
399
|
a.onloadend = function() {
|
|
400
400
|
let c = a.result;
|
|
@@ -409,51 +409,51 @@ function Tr(e, t, n, r) {
|
|
|
409
409
|
}, 4e4);
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
function
|
|
412
|
+
function j(e, t) {
|
|
413
413
|
const n = "🍍 " + e;
|
|
414
414
|
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(n, t) : t === "error" ? console.error(n) : t === "warn" ? console.warn(n) : console.log(n);
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function Nt(e) {
|
|
417
417
|
return "_a" in e && "install" in e;
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function Rn() {
|
|
420
420
|
if (!("clipboard" in navigator))
|
|
421
|
-
return
|
|
421
|
+
return j("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
424
|
-
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (
|
|
423
|
+
function In(e) {
|
|
424
|
+
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (j('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
|
|
425
425
|
}
|
|
426
|
-
async function
|
|
427
|
-
if (!
|
|
426
|
+
async function xr(e) {
|
|
427
|
+
if (!Rn())
|
|
428
428
|
try {
|
|
429
|
-
await navigator.clipboard.writeText(JSON.stringify(e.state.value)),
|
|
429
|
+
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), j("Global state copied to clipboard.");
|
|
430
430
|
} catch (t) {
|
|
431
|
-
if (
|
|
431
|
+
if (In(t))
|
|
432
432
|
return;
|
|
433
|
-
|
|
433
|
+
j("Failed to serialize the state. Check the console for more details.", "error"), console.error(t);
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
async function
|
|
437
|
-
if (!
|
|
436
|
+
async function jr(e) {
|
|
437
|
+
if (!Rn())
|
|
438
438
|
try {
|
|
439
|
-
|
|
439
|
+
Cn(e, JSON.parse(await navigator.clipboard.readText())), j("Global state pasted from clipboard.");
|
|
440
440
|
} catch (t) {
|
|
441
|
-
if (
|
|
441
|
+
if (In(t))
|
|
442
442
|
return;
|
|
443
|
-
|
|
443
|
+
j("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(t);
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
|
-
async function
|
|
446
|
+
async function Lr(e) {
|
|
447
447
|
try {
|
|
448
|
-
|
|
448
|
+
$n(new Blob([JSON.stringify(e.state.value)], {
|
|
449
449
|
type: "text/plain;charset=utf-8"
|
|
450
450
|
}), "pinia-state.json");
|
|
451
451
|
} catch (t) {
|
|
452
|
-
|
|
452
|
+
j("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(t);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
let Y;
|
|
456
|
-
function
|
|
456
|
+
function Br() {
|
|
457
457
|
Y || (Y = document.createElement("input"), Y.type = "file", Y.accept = ".json");
|
|
458
458
|
function e() {
|
|
459
459
|
return new Promise((t, n) => {
|
|
@@ -468,18 +468,18 @@ function xr() {
|
|
|
468
468
|
}
|
|
469
469
|
return e;
|
|
470
470
|
}
|
|
471
|
-
async function
|
|
471
|
+
async function Ur(e) {
|
|
472
472
|
try {
|
|
473
|
-
const n = await
|
|
473
|
+
const n = await Br()();
|
|
474
474
|
if (!n)
|
|
475
475
|
return;
|
|
476
476
|
const { text: r, file: o } = n;
|
|
477
|
-
|
|
477
|
+
Cn(e, JSON.parse(r)), j(`Global state imported from "${o.name}".`);
|
|
478
478
|
} catch (t) {
|
|
479
|
-
|
|
479
|
+
j("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(t);
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function Cn(e, t) {
|
|
483
483
|
for (const n in t) {
|
|
484
484
|
const r = e.state.value[n];
|
|
485
485
|
r ? Object.assign(r, t[n]) : e.state.value[n] = t[n];
|
|
@@ -492,18 +492,18 @@ function J(e) {
|
|
|
492
492
|
}
|
|
493
493
|
};
|
|
494
494
|
}
|
|
495
|
-
const
|
|
496
|
-
function
|
|
497
|
-
return
|
|
498
|
-
id:
|
|
499
|
-
label:
|
|
495
|
+
const An = "🍍 Pinia (root)", Fe = "_root";
|
|
496
|
+
function Fr(e) {
|
|
497
|
+
return Nt(e) ? {
|
|
498
|
+
id: Fe,
|
|
499
|
+
label: An
|
|
500
500
|
} : {
|
|
501
501
|
id: e.$id,
|
|
502
502
|
label: e.$id
|
|
503
503
|
};
|
|
504
504
|
}
|
|
505
|
-
function
|
|
506
|
-
if (
|
|
505
|
+
function Hr(e) {
|
|
506
|
+
if (Nt(e)) {
|
|
507
507
|
const n = Array.from(e._s.keys()), r = e._s;
|
|
508
508
|
return {
|
|
509
509
|
state: n.map((s) => ({
|
|
@@ -538,7 +538,7 @@ function Br(e) {
|
|
|
538
538
|
value: e[n]
|
|
539
539
|
}))), t;
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function Gr(e) {
|
|
542
542
|
return e ? Array.isArray(e) ? e.reduce((t, n) => (t.keys.push(n.key), t.operations.push(n.type), t.oldValue[n.key] = n.oldValue, t.newValue[n.key] = n.newValue, t), {
|
|
543
543
|
oldValue: {},
|
|
544
544
|
keys: [],
|
|
@@ -551,36 +551,36 @@ function Ur(e) {
|
|
|
551
551
|
newValue: e.newValue
|
|
552
552
|
} : {};
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function Wr(e) {
|
|
555
555
|
switch (e) {
|
|
556
|
-
case
|
|
556
|
+
case K.direct:
|
|
557
557
|
return "mutation";
|
|
558
|
-
case
|
|
558
|
+
case K.patchFunction:
|
|
559
559
|
return "$patch";
|
|
560
|
-
case
|
|
560
|
+
case K.patchObject:
|
|
561
561
|
return "$patch";
|
|
562
562
|
default:
|
|
563
563
|
return "unknown";
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
|
-
let
|
|
567
|
-
const
|
|
568
|
-
function
|
|
569
|
-
|
|
566
|
+
let Ee = !0;
|
|
567
|
+
const He = [], ue = "pinia:mutations", L = "pinia", { assign: zr } = Object, Ge = (e) => "🍍 " + e;
|
|
568
|
+
function qr(e, t) {
|
|
569
|
+
St({
|
|
570
570
|
id: "dev.esm.pinia",
|
|
571
571
|
label: "Pinia 🍍",
|
|
572
572
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
573
573
|
packageName: "pinia",
|
|
574
574
|
homepage: "https://pinia.vuejs.org",
|
|
575
|
-
componentStateTypes:
|
|
575
|
+
componentStateTypes: He,
|
|
576
576
|
app: e
|
|
577
577
|
}, (n) => {
|
|
578
|
-
typeof n.now != "function" &&
|
|
579
|
-
id:
|
|
578
|
+
typeof n.now != "function" && j("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), n.addTimelineLayer({
|
|
579
|
+
id: ue,
|
|
580
580
|
label: "Pinia 🍍",
|
|
581
581
|
color: 15064968
|
|
582
582
|
}), n.addInspector({
|
|
583
|
-
id:
|
|
583
|
+
id: L,
|
|
584
584
|
label: "Pinia 🍍",
|
|
585
585
|
icon: "storage",
|
|
586
586
|
treeFilterPlaceholder: "Search stores",
|
|
@@ -588,28 +588,28 @@ function Gr(e, t) {
|
|
|
588
588
|
{
|
|
589
589
|
icon: "content_copy",
|
|
590
590
|
action: () => {
|
|
591
|
-
|
|
591
|
+
xr(t);
|
|
592
592
|
},
|
|
593
593
|
tooltip: "Serialize and copy the state"
|
|
594
594
|
},
|
|
595
595
|
{
|
|
596
596
|
icon: "content_paste",
|
|
597
597
|
action: async () => {
|
|
598
|
-
await
|
|
598
|
+
await jr(t), n.sendInspectorTree(L), n.sendInspectorState(L);
|
|
599
599
|
},
|
|
600
600
|
tooltip: "Replace the state with the content of your clipboard"
|
|
601
601
|
},
|
|
602
602
|
{
|
|
603
603
|
icon: "save",
|
|
604
604
|
action: () => {
|
|
605
|
-
|
|
605
|
+
Lr(t);
|
|
606
606
|
},
|
|
607
607
|
tooltip: "Save the state as a JSON file"
|
|
608
608
|
},
|
|
609
609
|
{
|
|
610
610
|
icon: "folder_open",
|
|
611
611
|
action: async () => {
|
|
612
|
-
await
|
|
612
|
+
await Ur(t), n.sendInspectorTree(L), n.sendInspectorState(L);
|
|
613
613
|
},
|
|
614
614
|
tooltip: "Import the state from a JSON file"
|
|
615
615
|
}
|
|
@@ -620,7 +620,7 @@ function Gr(e, t) {
|
|
|
620
620
|
tooltip: 'Reset the state (with "$reset")',
|
|
621
621
|
action: (r) => {
|
|
622
622
|
const o = t._s.get(r);
|
|
623
|
-
o ? typeof o.$reset != "function" ?
|
|
623
|
+
o ? typeof o.$reset != "function" ? j(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`, "warn") : (o.$reset(), j(`Store "${r}" reset.`)) : j(`Cannot reset "${r}" store because it wasn't found.`, "warn");
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
626
|
]
|
|
@@ -630,12 +630,12 @@ function Gr(e, t) {
|
|
|
630
630
|
const i = r.componentInstance.proxy._pStores;
|
|
631
631
|
Object.values(i).forEach((a) => {
|
|
632
632
|
r.instanceData.state.push({
|
|
633
|
-
type:
|
|
633
|
+
type: Ge(a.$id),
|
|
634
634
|
key: "state",
|
|
635
635
|
editable: !0,
|
|
636
636
|
value: a._isOptionsAPI ? {
|
|
637
637
|
_custom: {
|
|
638
|
-
value:
|
|
638
|
+
value: Ce(a.$state),
|
|
639
639
|
actions: [
|
|
640
640
|
{
|
|
641
641
|
icon: "restore",
|
|
@@ -649,7 +649,7 @@ function Gr(e, t) {
|
|
|
649
649
|
Object.keys(a.$state).reduce((c, u) => (c[u] = a.$state[u], c), {})
|
|
650
650
|
)
|
|
651
651
|
}), a._getters && a._getters.length && r.instanceData.state.push({
|
|
652
|
-
type:
|
|
652
|
+
type: Ge(a.$id),
|
|
653
653
|
key: "getters",
|
|
654
654
|
editable: !1,
|
|
655
655
|
value: a._getters.reduce((c, u) => {
|
|
@@ -664,48 +664,48 @@ function Gr(e, t) {
|
|
|
664
664
|
});
|
|
665
665
|
}
|
|
666
666
|
}), n.on.getInspectorTree((r) => {
|
|
667
|
-
if (r.app === e && r.inspectorId ===
|
|
667
|
+
if (r.app === e && r.inspectorId === L) {
|
|
668
668
|
let o = [t];
|
|
669
|
-
o = o.concat(Array.from(t._s.values())), r.rootNodes = (r.filter ? o.filter((s) => "$id" in s ? s.$id.toLowerCase().includes(r.filter.toLowerCase()) :
|
|
669
|
+
o = o.concat(Array.from(t._s.values())), r.rootNodes = (r.filter ? o.filter((s) => "$id" in s ? s.$id.toLowerCase().includes(r.filter.toLowerCase()) : An.toLowerCase().includes(r.filter.toLowerCase())) : o).map(Fr);
|
|
670
670
|
}
|
|
671
|
-
}), n.on.getInspectorState((r) => {
|
|
672
|
-
if (r.app === e && r.inspectorId ===
|
|
673
|
-
const o = r.nodeId ===
|
|
671
|
+
}), globalThis.$pinia = t, n.on.getInspectorState((r) => {
|
|
672
|
+
if (r.app === e && r.inspectorId === L) {
|
|
673
|
+
const o = r.nodeId === Fe ? t : t._s.get(r.nodeId);
|
|
674
674
|
if (!o)
|
|
675
675
|
return;
|
|
676
|
-
o && (r.state =
|
|
676
|
+
o && (r.nodeId !== Fe && (globalThis.$store = Ce(o)), r.state = Hr(o));
|
|
677
677
|
}
|
|
678
678
|
}), n.on.editInspectorState((r, o) => {
|
|
679
|
-
if (r.app === e && r.inspectorId ===
|
|
680
|
-
const s = r.nodeId ===
|
|
679
|
+
if (r.app === e && r.inspectorId === L) {
|
|
680
|
+
const s = r.nodeId === Fe ? t : t._s.get(r.nodeId);
|
|
681
681
|
if (!s)
|
|
682
|
-
return
|
|
682
|
+
return j(`store "${r.nodeId}" not found`, "error");
|
|
683
683
|
const { path: i } = r;
|
|
684
|
-
|
|
684
|
+
Nt(s) ? i.unshift("state") : (i.length !== 1 || !s._customProperties.has(i[0]) || i[0] in s.$state) && i.unshift("$state"), Ee = !1, r.set(s, i, r.state.value), Ee = !0;
|
|
685
685
|
}
|
|
686
686
|
}), n.on.editComponentState((r) => {
|
|
687
687
|
if (r.type.startsWith("🍍")) {
|
|
688
688
|
const o = r.type.replace(/^🍍\s*/, ""), s = t._s.get(o);
|
|
689
689
|
if (!s)
|
|
690
|
-
return
|
|
690
|
+
return j(`store "${o}" not found`, "error");
|
|
691
691
|
const { path: i } = r;
|
|
692
692
|
if (i[0] !== "state")
|
|
693
|
-
return
|
|
693
|
+
return j(`Invalid path for store "${o}":
|
|
694
694
|
${i}
|
|
695
695
|
Only state can be modified.`);
|
|
696
|
-
i[0] = "$state",
|
|
696
|
+
i[0] = "$state", Ee = !1, r.set(s, i, r.state.value), Ee = !0;
|
|
697
697
|
}
|
|
698
698
|
});
|
|
699
699
|
});
|
|
700
700
|
}
|
|
701
|
-
function
|
|
702
|
-
|
|
701
|
+
function Jr(e, t) {
|
|
702
|
+
He.includes(Ge(t.$id)) || He.push(Ge(t.$id)), St({
|
|
703
703
|
id: "dev.esm.pinia",
|
|
704
704
|
label: "Pinia 🍍",
|
|
705
705
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
706
706
|
packageName: "pinia",
|
|
707
707
|
homepage: "https://pinia.vuejs.org",
|
|
708
|
-
componentStateTypes:
|
|
708
|
+
componentStateTypes: He,
|
|
709
709
|
app: e,
|
|
710
710
|
settings: {
|
|
711
711
|
logStoreChanges: {
|
|
@@ -722,9 +722,9 @@ function Wr(e, t) {
|
|
|
722
722
|
}, (n) => {
|
|
723
723
|
const r = typeof n.now == "function" ? n.now.bind(n) : Date.now;
|
|
724
724
|
t.$onAction(({ after: i, onError: a, name: c, args: u }) => {
|
|
725
|
-
const f =
|
|
725
|
+
const f = Tn++;
|
|
726
726
|
n.addTimelineEvent({
|
|
727
|
-
layerId:
|
|
727
|
+
layerId: ue,
|
|
728
728
|
event: {
|
|
729
729
|
time: r(),
|
|
730
730
|
title: "🛫 " + c,
|
|
@@ -738,7 +738,7 @@ function Wr(e, t) {
|
|
|
738
738
|
}
|
|
739
739
|
}), i((l) => {
|
|
740
740
|
re = void 0, n.addTimelineEvent({
|
|
741
|
-
layerId:
|
|
741
|
+
layerId: ue,
|
|
742
742
|
event: {
|
|
743
743
|
time: r(),
|
|
744
744
|
title: "🛬 " + c,
|
|
@@ -754,7 +754,7 @@ function Wr(e, t) {
|
|
|
754
754
|
});
|
|
755
755
|
}), a((l) => {
|
|
756
756
|
re = void 0, n.addTimelineEvent({
|
|
757
|
-
layerId:
|
|
757
|
+
layerId: ue,
|
|
758
758
|
event: {
|
|
759
759
|
time: r(),
|
|
760
760
|
logType: "error",
|
|
@@ -771,9 +771,9 @@ function Wr(e, t) {
|
|
|
771
771
|
});
|
|
772
772
|
});
|
|
773
773
|
}, !0), t._customProperties.forEach((i) => {
|
|
774
|
-
|
|
775
|
-
n.notifyComponentUpdate(), n.sendInspectorState(
|
|
776
|
-
layerId:
|
|
774
|
+
Me(() => fe(t[i]), (a, c) => {
|
|
775
|
+
n.notifyComponentUpdate(), n.sendInspectorState(L), Ee && n.addTimelineEvent({
|
|
776
|
+
layerId: ue,
|
|
777
777
|
event: {
|
|
778
778
|
time: r(),
|
|
779
779
|
title: "Change",
|
|
@@ -787,15 +787,15 @@ function Wr(e, t) {
|
|
|
787
787
|
});
|
|
788
788
|
}, { deep: !0 });
|
|
789
789
|
}), t.$subscribe(({ events: i, type: a }, c) => {
|
|
790
|
-
if (n.notifyComponentUpdate(), n.sendInspectorState(
|
|
790
|
+
if (n.notifyComponentUpdate(), n.sendInspectorState(L), !Ee)
|
|
791
791
|
return;
|
|
792
792
|
const u = {
|
|
793
793
|
time: r(),
|
|
794
|
-
title:
|
|
795
|
-
data:
|
|
794
|
+
title: Wr(a),
|
|
795
|
+
data: zr({ store: J(t.$id) }, Gr(i)),
|
|
796
796
|
groupId: re
|
|
797
797
|
};
|
|
798
|
-
a ===
|
|
798
|
+
a === K.patchFunction ? u.subtitle = "⤵️" : a === K.patchObject ? u.subtitle = "🧩" : i && !Array.isArray(i) && (u.subtitle = i.type), i && (u.data["rawEvent(s)"] = {
|
|
799
799
|
_custom: {
|
|
800
800
|
display: "DebuggerEvent",
|
|
801
801
|
type: "object",
|
|
@@ -803,14 +803,14 @@ function Wr(e, t) {
|
|
|
803
803
|
value: i
|
|
804
804
|
}
|
|
805
805
|
}), n.addTimelineEvent({
|
|
806
|
-
layerId:
|
|
806
|
+
layerId: ue,
|
|
807
807
|
event: u
|
|
808
808
|
});
|
|
809
809
|
}, { detached: !0, flush: "sync" });
|
|
810
810
|
const o = t._hotUpdate;
|
|
811
|
-
t._hotUpdate =
|
|
811
|
+
t._hotUpdate = le((i) => {
|
|
812
812
|
o(i), n.addTimelineEvent({
|
|
813
|
-
layerId:
|
|
813
|
+
layerId: ue,
|
|
814
814
|
event: {
|
|
815
815
|
time: r(),
|
|
816
816
|
title: "🔥 " + t.$id,
|
|
@@ -820,20 +820,20 @@ function Wr(e, t) {
|
|
|
820
820
|
info: J("HMR update")
|
|
821
821
|
}
|
|
822
822
|
}
|
|
823
|
-
}), n.notifyComponentUpdate(), n.sendInspectorTree(
|
|
823
|
+
}), n.notifyComponentUpdate(), n.sendInspectorTree(L), n.sendInspectorState(L);
|
|
824
824
|
});
|
|
825
825
|
const { $dispose: s } = t;
|
|
826
826
|
t.$dispose = () => {
|
|
827
|
-
s(), n.notifyComponentUpdate(), n.sendInspectorTree(
|
|
828
|
-
}, n.notifyComponentUpdate(), n.sendInspectorTree(
|
|
827
|
+
s(), n.notifyComponentUpdate(), n.sendInspectorTree(L), n.sendInspectorState(L), n.getSettings().logStoreChanges && j(`Disposed "${t.$id}" store 🗑`);
|
|
828
|
+
}, n.notifyComponentUpdate(), n.sendInspectorTree(L), n.sendInspectorState(L), n.getSettings().logStoreChanges && j(`"${t.$id}" store installed 🆕`);
|
|
829
829
|
});
|
|
830
830
|
}
|
|
831
|
-
let
|
|
832
|
-
function
|
|
833
|
-
const r = t.reduce((o, s) => (o[s] =
|
|
831
|
+
let Tn = 0, re;
|
|
832
|
+
function Bt(e, t, n) {
|
|
833
|
+
const r = t.reduce((o, s) => (o[s] = Ce(e)[s], o), {});
|
|
834
834
|
for (const o in r)
|
|
835
835
|
e[o] = function() {
|
|
836
|
-
const s =
|
|
836
|
+
const s = Tn, i = n ? new Proxy(e, {
|
|
837
837
|
get(...c) {
|
|
838
838
|
return re = s, Reflect.get(...c);
|
|
839
839
|
},
|
|
@@ -846,28 +846,31 @@ function Lt(e, t, n) {
|
|
|
846
846
|
return re = void 0, a;
|
|
847
847
|
};
|
|
848
848
|
}
|
|
849
|
-
function
|
|
850
|
-
if (t.$id.startsWith("__hot:"))
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
849
|
+
function Kr({ app: e, store: t, options: n }) {
|
|
850
|
+
if (!t.$id.startsWith("__hot:")) {
|
|
851
|
+
if (t._isOptionsAPI = !!n.state, !t._p._testing) {
|
|
852
|
+
Bt(t, Object.keys(n.actions), t._isOptionsAPI);
|
|
853
|
+
const r = t._hotUpdate;
|
|
854
|
+
Ce(t)._hotUpdate = function(o) {
|
|
855
|
+
r.apply(this, arguments), Bt(t, Object.keys(o._hmrPayload.actions), !!t._isOptionsAPI);
|
|
856
|
+
};
|
|
857
|
+
}
|
|
858
|
+
Jr(
|
|
859
|
+
e,
|
|
860
|
+
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
861
|
+
t
|
|
862
|
+
);
|
|
863
|
+
}
|
|
861
864
|
}
|
|
862
|
-
function
|
|
863
|
-
const e =
|
|
865
|
+
function Qr() {
|
|
866
|
+
const e = _n(!0), t = e.run(() => oe({}));
|
|
864
867
|
let n = [], r = [];
|
|
865
|
-
const o =
|
|
868
|
+
const o = le({
|
|
866
869
|
install(s) {
|
|
867
|
-
|
|
870
|
+
Te(o), o._a = s, s.provide(Nn, o), s.config.globalProperties.$pinia = o, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && de && qr(s, o), r.forEach((i) => n.push(i)), r = [];
|
|
868
871
|
},
|
|
869
872
|
use(s) {
|
|
870
|
-
return !this._a && !
|
|
873
|
+
return !this._a && !Sn ? r.push(s) : n.push(s), this;
|
|
871
874
|
},
|
|
872
875
|
_p: n,
|
|
873
876
|
// it's actually undefined here
|
|
@@ -877,173 +880,172 @@ function qr() {
|
|
|
877
880
|
_s: /* @__PURE__ */ new Map(),
|
|
878
881
|
state: t
|
|
879
882
|
});
|
|
880
|
-
return
|
|
883
|
+
return process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof Proxy < "u" && o.use(Kr), o;
|
|
881
884
|
}
|
|
882
|
-
function
|
|
885
|
+
function Dn(e, t) {
|
|
883
886
|
for (const n in t) {
|
|
884
887
|
const r = t[n];
|
|
885
888
|
if (!(n in e))
|
|
886
889
|
continue;
|
|
887
890
|
const o = e[n];
|
|
888
|
-
|
|
891
|
+
me(o) && me(r) && !Ae(r) && !wt(r) ? e[n] = Dn(o, r) : e[n] = r;
|
|
889
892
|
}
|
|
890
893
|
return e;
|
|
891
894
|
}
|
|
892
|
-
const
|
|
895
|
+
const Mn = () => {
|
|
893
896
|
};
|
|
894
|
-
function
|
|
897
|
+
function Ut(e, t, n, r = Mn) {
|
|
895
898
|
e.push(t);
|
|
896
899
|
const o = () => {
|
|
897
900
|
const s = e.indexOf(t);
|
|
898
901
|
s > -1 && (e.splice(s, 1), r());
|
|
899
902
|
};
|
|
900
|
-
return !n &&
|
|
903
|
+
return !n && Er() && br(o), o;
|
|
901
904
|
}
|
|
902
|
-
function
|
|
905
|
+
function _e(e, ...t) {
|
|
903
906
|
e.slice().forEach((n) => {
|
|
904
907
|
n(...t);
|
|
905
908
|
});
|
|
906
909
|
}
|
|
907
|
-
const
|
|
908
|
-
function
|
|
909
|
-
e instanceof Map && t instanceof Map
|
|
910
|
+
const Yr = (e) => e(), Ft = Symbol(), tt = Symbol();
|
|
911
|
+
function dt(e, t) {
|
|
912
|
+
e instanceof Map && t instanceof Map ? t.forEach((n, r) => e.set(r, n)) : e instanceof Set && t instanceof Set && t.forEach(e.add, e);
|
|
910
913
|
for (const n in t) {
|
|
911
914
|
if (!t.hasOwnProperty(n))
|
|
912
915
|
continue;
|
|
913
916
|
const r = t[n], o = e[n];
|
|
914
|
-
|
|
917
|
+
me(o) && me(r) && e.hasOwnProperty(n) && !Ae(r) && !wt(r) ? e[n] = dt(o, r) : e[n] = r;
|
|
915
918
|
}
|
|
916
919
|
return e;
|
|
917
920
|
}
|
|
918
|
-
const
|
|
921
|
+
const Xr = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
919
922
|
/* istanbul ignore next */
|
|
920
923
|
Symbol()
|
|
921
924
|
);
|
|
922
|
-
function
|
|
923
|
-
return !
|
|
925
|
+
function Zr(e) {
|
|
926
|
+
return !me(e) || !e.hasOwnProperty(Xr);
|
|
924
927
|
}
|
|
925
928
|
const { assign: W } = Object;
|
|
926
|
-
function
|
|
927
|
-
return !!(
|
|
929
|
+
function Ht(e) {
|
|
930
|
+
return !!(Ae(e) && e.effect);
|
|
928
931
|
}
|
|
929
|
-
function
|
|
932
|
+
function Gt(e, t, n, r) {
|
|
930
933
|
const { state: o, actions: s, getters: i } = t, a = n.state.value[e];
|
|
931
934
|
let c;
|
|
932
935
|
function u() {
|
|
933
936
|
!a && (process.env.NODE_ENV === "production" || !r) && (n.state.value[e] = o ? o() : {});
|
|
934
937
|
const f = process.env.NODE_ENV !== "production" && r ? (
|
|
935
938
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
936
|
-
|
|
937
|
-
) :
|
|
938
|
-
return W(f, s, Object.keys(i || {}).reduce((l, d) => (process.env.NODE_ENV !== "production" && d in f && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${d}" in store "${e}".`), l[d] =
|
|
939
|
-
|
|
939
|
+
jt(oe(o ? o() : {}).value)
|
|
940
|
+
) : jt(n.state.value[e]);
|
|
941
|
+
return W(f, s, Object.keys(i || {}).reduce((l, d) => (process.env.NODE_ENV !== "production" && d in f && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${d}" in store "${e}".`), l[d] = le(z(() => {
|
|
942
|
+
Te(n);
|
|
940
943
|
const p = n._s.get(e);
|
|
941
944
|
return i[d].call(p, p);
|
|
942
945
|
})), l), {}));
|
|
943
946
|
}
|
|
944
|
-
return c =
|
|
947
|
+
return c = ht(e, u, t, n, r, !0), c;
|
|
945
948
|
}
|
|
946
|
-
function
|
|
949
|
+
function ht(e, t, n = {}, r, o, s) {
|
|
947
950
|
let i;
|
|
948
951
|
const a = W({ actions: {} }, n);
|
|
949
952
|
if (process.env.NODE_ENV !== "production" && !r._e.active)
|
|
950
953
|
throw new Error("Pinia destroyed");
|
|
951
|
-
const c = {
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
};
|
|
955
|
-
process.env.NODE_ENV !== "production" && !En && (c.onTrigger = (E) => {
|
|
956
|
-
u ? p = E : u == !1 && !w._hotUpdating && (Array.isArray(p) ? p.push(E) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
954
|
+
const c = { deep: !0 };
|
|
955
|
+
process.env.NODE_ENV !== "production" && !Sn && (c.onTrigger = (y) => {
|
|
956
|
+
u ? p = y : u == !1 && !w._hotUpdating && (Array.isArray(p) ? p.push(y) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
957
957
|
});
|
|
958
958
|
let u, f, l = [], d = [], p;
|
|
959
959
|
const b = r.state.value[e];
|
|
960
960
|
!s && !b && (process.env.NODE_ENV === "production" || !o) && (r.state.value[e] = {});
|
|
961
|
-
const
|
|
962
|
-
let
|
|
963
|
-
function
|
|
964
|
-
let
|
|
965
|
-
u = f = !1, process.env.NODE_ENV !== "production" && (p = []), typeof
|
|
966
|
-
type:
|
|
961
|
+
const S = oe({});
|
|
962
|
+
let E;
|
|
963
|
+
function R(y) {
|
|
964
|
+
let v;
|
|
965
|
+
u = f = !1, process.env.NODE_ENV !== "production" && (p = []), typeof y == "function" ? (y(r.state.value[e]), v = {
|
|
966
|
+
type: K.patchFunction,
|
|
967
967
|
storeId: e,
|
|
968
968
|
events: p
|
|
969
|
-
}) : (
|
|
970
|
-
type:
|
|
971
|
-
payload:
|
|
969
|
+
}) : (dt(r.state.value[e], y), v = {
|
|
970
|
+
type: K.patchObject,
|
|
971
|
+
payload: y,
|
|
972
972
|
storeId: e,
|
|
973
973
|
events: p
|
|
974
974
|
});
|
|
975
|
-
const A =
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
}), f = !0,
|
|
979
|
-
}
|
|
980
|
-
const
|
|
981
|
-
const { state:
|
|
982
|
-
this.$patch((
|
|
983
|
-
W(
|
|
975
|
+
const A = E = Symbol();
|
|
976
|
+
ct().then(() => {
|
|
977
|
+
E === A && (u = !0);
|
|
978
|
+
}), f = !0, _e(l, v, r.state.value[e]);
|
|
979
|
+
}
|
|
980
|
+
const k = s ? function() {
|
|
981
|
+
const { state: v } = n, A = v ? v() : {};
|
|
982
|
+
this.$patch((V) => {
|
|
983
|
+
W(V, A);
|
|
984
984
|
});
|
|
985
985
|
} : (
|
|
986
986
|
/* istanbul ignore next */
|
|
987
987
|
process.env.NODE_ENV !== "production" ? () => {
|
|
988
988
|
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
989
|
-
} :
|
|
989
|
+
} : Mn
|
|
990
990
|
);
|
|
991
991
|
function P() {
|
|
992
992
|
i.stop(), l = [], d = [], r._s.delete(e);
|
|
993
993
|
}
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
994
|
+
const M = (y, v = "") => {
|
|
995
|
+
if (Ft in y)
|
|
996
|
+
return y[tt] = v, y;
|
|
997
|
+
const A = function() {
|
|
998
|
+
Te(r);
|
|
999
|
+
const V = Array.from(arguments), ie = [], ae = [];
|
|
1000
|
+
function Ve(F) {
|
|
1001
|
+
ie.push(F);
|
|
1000
1002
|
}
|
|
1001
|
-
function
|
|
1002
|
-
|
|
1003
|
+
function ge(F) {
|
|
1004
|
+
ae.push(F);
|
|
1003
1005
|
}
|
|
1004
|
-
|
|
1005
|
-
args:
|
|
1006
|
-
name:
|
|
1006
|
+
_e(d, {
|
|
1007
|
+
args: V,
|
|
1008
|
+
name: A[tt],
|
|
1007
1009
|
store: w,
|
|
1008
|
-
after:
|
|
1009
|
-
onError:
|
|
1010
|
+
after: Ve,
|
|
1011
|
+
onError: ge
|
|
1010
1012
|
});
|
|
1011
|
-
let
|
|
1013
|
+
let Q;
|
|
1012
1014
|
try {
|
|
1013
|
-
|
|
1014
|
-
} catch (
|
|
1015
|
-
throw
|
|
1015
|
+
Q = y.apply(this && this.$id === e ? this : w, V);
|
|
1016
|
+
} catch (F) {
|
|
1017
|
+
throw _e(ae, F), F;
|
|
1016
1018
|
}
|
|
1017
|
-
return
|
|
1019
|
+
return Q instanceof Promise ? Q.then((F) => (_e(ie, F), F)).catch((F) => (_e(ae, F), Promise.reject(F))) : (_e(ie, Q), Q);
|
|
1018
1020
|
};
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
+
return A[Ft] = !0, A[tt] = v, A;
|
|
1022
|
+
}, B = /* @__PURE__ */ le({
|
|
1021
1023
|
actions: {},
|
|
1022
1024
|
getters: {},
|
|
1023
1025
|
state: [],
|
|
1024
|
-
hotState:
|
|
1026
|
+
hotState: S
|
|
1025
1027
|
}), q = {
|
|
1026
1028
|
_p: r,
|
|
1027
1029
|
// _s: scope,
|
|
1028
1030
|
$id: e,
|
|
1029
|
-
$onAction:
|
|
1030
|
-
$patch:
|
|
1031
|
-
$reset:
|
|
1032
|
-
$subscribe(
|
|
1033
|
-
const A =
|
|
1034
|
-
(
|
|
1031
|
+
$onAction: Ut.bind(null, d),
|
|
1032
|
+
$patch: R,
|
|
1033
|
+
$reset: k,
|
|
1034
|
+
$subscribe(y, v = {}) {
|
|
1035
|
+
const A = Ut(l, y, v.detached, () => V()), V = i.run(() => Me(() => r.state.value[e], (ie) => {
|
|
1036
|
+
(v.flush === "sync" ? f : u) && y({
|
|
1035
1037
|
storeId: e,
|
|
1036
|
-
type:
|
|
1038
|
+
type: K.direct,
|
|
1037
1039
|
events: p
|
|
1038
1040
|
}, ie);
|
|
1039
|
-
}, W({}, c,
|
|
1041
|
+
}, W({}, c, v)));
|
|
1040
1042
|
return A;
|
|
1041
1043
|
},
|
|
1042
1044
|
$dispose: P
|
|
1043
|
-
}, w =
|
|
1045
|
+
}, w = En(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && de ? W(
|
|
1044
1046
|
{
|
|
1045
|
-
_hmrPayload:
|
|
1046
|
-
_customProperties:
|
|
1047
|
+
_hmrPayload: B,
|
|
1048
|
+
_customProperties: le(/* @__PURE__ */ new Set())
|
|
1047
1049
|
// devtools custom properties
|
|
1048
1050
|
},
|
|
1049
1051
|
q
|
|
@@ -1051,79 +1053,79 @@ function dt(e, t, n = {}, r, o, s) {
|
|
|
1051
1053
|
// setupStore
|
|
1052
1054
|
) : q);
|
|
1053
1055
|
r._s.set(e, w);
|
|
1054
|
-
const G = (r._a && r._a.runWithContext ||
|
|
1055
|
-
for (const
|
|
1056
|
-
const
|
|
1057
|
-
if (
|
|
1058
|
-
process.env.NODE_ENV !== "production" && o ?
|
|
1059
|
-
else if (typeof
|
|
1060
|
-
const A = process.env.NODE_ENV !== "production" && o ?
|
|
1061
|
-
G[
|
|
1062
|
-
} else process.env.NODE_ENV !== "production" &&
|
|
1056
|
+
const G = (r._a && r._a.runWithContext || Yr)(() => r._e.run(() => (i = _n()).run(() => t({ action: M }))));
|
|
1057
|
+
for (const y in G) {
|
|
1058
|
+
const v = G[y];
|
|
1059
|
+
if (Ae(v) && !Ht(v) || wt(v))
|
|
1060
|
+
process.env.NODE_ENV !== "production" && o ? je(S.value, y, Xe(G, y)) : s || (b && Zr(v) && (Ae(v) ? v.value = b[y] : dt(v, b[y])), r.state.value[e][y] = v), process.env.NODE_ENV !== "production" && B.state.push(y);
|
|
1061
|
+
else if (typeof v == "function") {
|
|
1062
|
+
const A = process.env.NODE_ENV !== "production" && o ? v : M(v, y);
|
|
1063
|
+
G[y] = A, process.env.NODE_ENV !== "production" && (B.actions[y] = v), a.actions[y] = v;
|
|
1064
|
+
} else process.env.NODE_ENV !== "production" && Ht(v) && (B.getters[y] = s ? (
|
|
1063
1065
|
// @ts-expect-error
|
|
1064
|
-
n.getters[
|
|
1065
|
-
) :
|
|
1066
|
-
(G._getters =
|
|
1066
|
+
n.getters[y]
|
|
1067
|
+
) : v, de && (G._getters || // @ts-expect-error: same
|
|
1068
|
+
(G._getters = le([]))).push(y));
|
|
1067
1069
|
}
|
|
1068
|
-
if (W(w, G), W(
|
|
1069
|
-
get: () => process.env.NODE_ENV !== "production" && o ?
|
|
1070
|
-
set: (
|
|
1070
|
+
if (W(w, G), W(Ce(w), G), Object.defineProperty(w, "$state", {
|
|
1071
|
+
get: () => process.env.NODE_ENV !== "production" && o ? S.value : r.state.value[e],
|
|
1072
|
+
set: (y) => {
|
|
1071
1073
|
if (process.env.NODE_ENV !== "production" && o)
|
|
1072
1074
|
throw new Error("cannot set hotState");
|
|
1073
|
-
|
|
1074
|
-
W(
|
|
1075
|
+
R((v) => {
|
|
1076
|
+
W(v, y);
|
|
1075
1077
|
});
|
|
1076
1078
|
}
|
|
1077
|
-
}), process.env.NODE_ENV !== "production" && (w._hotUpdate =
|
|
1078
|
-
w._hotUpdating = !0,
|
|
1079
|
-
if (
|
|
1080
|
-
const A =
|
|
1081
|
-
typeof A == "object" &&
|
|
1079
|
+
}), process.env.NODE_ENV !== "production" && (w._hotUpdate = le((y) => {
|
|
1080
|
+
w._hotUpdating = !0, y._hmrPayload.state.forEach((v) => {
|
|
1081
|
+
if (v in w.$state) {
|
|
1082
|
+
const A = y.$state[v], V = w.$state[v];
|
|
1083
|
+
typeof A == "object" && me(A) && me(V) ? Dn(A, V) : y.$state[v] = V;
|
|
1082
1084
|
}
|
|
1083
|
-
|
|
1084
|
-
}), Object.keys(w.$state).forEach((
|
|
1085
|
-
|
|
1086
|
-
}), u = !1, f = !1, r.state.value[e] =
|
|
1085
|
+
je(w, v, Xe(y.$state, v));
|
|
1086
|
+
}), Object.keys(w.$state).forEach((v) => {
|
|
1087
|
+
v in y.$state || et(w, v);
|
|
1088
|
+
}), u = !1, f = !1, r.state.value[e] = Xe(y._hmrPayload, "hotState"), f = !0, ct().then(() => {
|
|
1087
1089
|
u = !0;
|
|
1088
1090
|
});
|
|
1089
|
-
for (const
|
|
1090
|
-
const A =
|
|
1091
|
-
|
|
1091
|
+
for (const v in y._hmrPayload.actions) {
|
|
1092
|
+
const A = y[v];
|
|
1093
|
+
je(w, v, M(A, v));
|
|
1092
1094
|
}
|
|
1093
|
-
for (const
|
|
1094
|
-
const A =
|
|
1095
|
+
for (const v in y._hmrPayload.getters) {
|
|
1096
|
+
const A = y._hmrPayload.getters[v], V = s ? (
|
|
1095
1097
|
// special handling of options api
|
|
1096
|
-
z(() => (
|
|
1098
|
+
z(() => (Te(r), A.call(w, w)))
|
|
1097
1099
|
) : A;
|
|
1098
|
-
|
|
1100
|
+
je(w, v, V);
|
|
1099
1101
|
}
|
|
1100
|
-
Object.keys(w._hmrPayload.getters).forEach((
|
|
1101
|
-
|
|
1102
|
-
}), Object.keys(w._hmrPayload.actions).forEach((
|
|
1103
|
-
|
|
1104
|
-
}), w._hmrPayload =
|
|
1105
|
-
})),
|
|
1106
|
-
const
|
|
1102
|
+
Object.keys(w._hmrPayload.getters).forEach((v) => {
|
|
1103
|
+
v in y._hmrPayload.getters || et(w, v);
|
|
1104
|
+
}), Object.keys(w._hmrPayload.actions).forEach((v) => {
|
|
1105
|
+
v in y._hmrPayload.actions || et(w, v);
|
|
1106
|
+
}), w._hmrPayload = y._hmrPayload, w._getters = y._getters, w._hotUpdating = !1;
|
|
1107
|
+
})), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && de) {
|
|
1108
|
+
const y = {
|
|
1107
1109
|
writable: !0,
|
|
1108
1110
|
configurable: !0,
|
|
1109
1111
|
// avoid warning on devtools trying to display this property
|
|
1110
1112
|
enumerable: !1
|
|
1111
1113
|
};
|
|
1112
|
-
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((
|
|
1113
|
-
Object.defineProperty(w,
|
|
1114
|
+
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((v) => {
|
|
1115
|
+
Object.defineProperty(w, v, W({ value: w[v] }, y));
|
|
1114
1116
|
});
|
|
1115
1117
|
}
|
|
1116
|
-
return r._p.forEach((
|
|
1117
|
-
if (
|
|
1118
|
-
const
|
|
1118
|
+
return r._p.forEach((y) => {
|
|
1119
|
+
if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && de) {
|
|
1120
|
+
const v = i.run(() => y({
|
|
1119
1121
|
store: w,
|
|
1120
1122
|
app: r._a,
|
|
1121
1123
|
pinia: r,
|
|
1122
1124
|
options: a
|
|
1123
1125
|
}));
|
|
1124
|
-
Object.keys(
|
|
1126
|
+
Object.keys(v || {}).forEach((A) => w._customProperties.add(A)), W(w, v);
|
|
1125
1127
|
} else
|
|
1126
|
-
W(w, i.run(() =>
|
|
1128
|
+
W(w, i.run(() => y({
|
|
1127
1129
|
store: w,
|
|
1128
1130
|
app: r._a,
|
|
1129
1131
|
pinia: r,
|
|
@@ -1133,26 +1135,27 @@ function dt(e, t, n = {}, r, o, s) {
|
|
|
1133
1135
|
state: () => new MyClass()
|
|
1134
1136
|
Found in store "${w.$id}".`), b && s && n.hydrate && n.hydrate(w.$state, b), u = !0, f = !0, w;
|
|
1135
1137
|
}
|
|
1136
|
-
|
|
1138
|
+
// @__NO_SIDE_EFFECTS__
|
|
1139
|
+
function eo(e, t, n) {
|
|
1137
1140
|
let r, o;
|
|
1138
1141
|
const s = typeof t == "function";
|
|
1139
1142
|
r = e, o = s ? n : t;
|
|
1140
1143
|
function i(a, c) {
|
|
1141
|
-
const u =
|
|
1144
|
+
const u = _r();
|
|
1142
1145
|
if (a = // in test mode, ignore the argument provided as we can always retrieve a
|
|
1143
1146
|
// pinia instance with getActivePinia()
|
|
1144
|
-
(process.env.NODE_ENV === "test" &&
|
|
1147
|
+
(process.env.NODE_ENV === "test" && $e && $e._testing ? null : a) || (u ? pe(Nn, null) : null), a && Te(a), process.env.NODE_ENV !== "production" && !$e)
|
|
1145
1148
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
1146
1149
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
1147
1150
|
This will fail in production.`);
|
|
1148
|
-
a =
|
|
1151
|
+
a = $e, a._s.has(r) || (s ? ht(r, t, o, a) : Gt(r, o, a), process.env.NODE_ENV !== "production" && (i._pinia = a));
|
|
1149
1152
|
const f = a._s.get(r);
|
|
1150
1153
|
if (process.env.NODE_ENV !== "production" && c) {
|
|
1151
|
-
const l = "__hot:" + r, d = s ?
|
|
1154
|
+
const l = "__hot:" + r, d = s ? ht(l, t, o, a, !0) : Gt(l, W({}, o), a, !0);
|
|
1152
1155
|
c._hotUpdate(d), delete a.state.value[l], a._s.delete(l);
|
|
1153
1156
|
}
|
|
1154
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
1155
|
-
const l =
|
|
1157
|
+
if (process.env.NODE_ENV !== "production" && de) {
|
|
1158
|
+
const l = bt();
|
|
1156
1159
|
if (l && l.proxy && // avoid adding stores that are just built for hot module replacement
|
|
1157
1160
|
!c) {
|
|
1158
1161
|
const d = l.proxy, p = "_pStores" in d ? d._pStores : d._pStores = {};
|
|
@@ -1163,14 +1166,14 @@ This will fail in production.`);
|
|
|
1163
1166
|
}
|
|
1164
1167
|
return i.$id = r, i;
|
|
1165
1168
|
}
|
|
1166
|
-
const
|
|
1169
|
+
const to = /* @__PURE__ */ eo("data", () => {
|
|
1167
1170
|
const e = oe([]), t = oe({});
|
|
1168
1171
|
return { records: e, record: t };
|
|
1169
1172
|
});
|
|
1170
|
-
function
|
|
1171
|
-
e || (e =
|
|
1172
|
-
const t =
|
|
1173
|
-
return
|
|
1173
|
+
function Ti(e) {
|
|
1174
|
+
e || (e = pe("$registry"));
|
|
1175
|
+
const t = to(), n = oe(new lt(e, t)), r = oe(!1);
|
|
1176
|
+
return wr(async () => {
|
|
1174
1177
|
var c, u;
|
|
1175
1178
|
const o = e.router.currentRoute.value, s = (c = o.params.records) == null ? void 0 : c.toString().toLowerCase(), i = (u = o.params.record) == null ? void 0 : u.toString().toLowerCase();
|
|
1176
1179
|
if (!s && !i)
|
|
@@ -1179,15 +1182,15 @@ function Ai(e) {
|
|
|
1179
1182
|
e.addDoctype(a), n.value.setup(a), s && (i ? await n.value.getRecord(a, i) : await n.value.getRecords(a)), n.value.runAction(a, "LOAD", i ? [i] : void 0), r.value = !0;
|
|
1180
1183
|
}), { stonecrop: n, isReady: r };
|
|
1181
1184
|
}
|
|
1182
|
-
class
|
|
1185
|
+
class Di {
|
|
1183
1186
|
constructor(t, n, r, o, s) {
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1187
|
+
x(this, "doctype");
|
|
1188
|
+
x(this, "schema");
|
|
1189
|
+
x(this, "workflow");
|
|
1190
|
+
x(this, "actions");
|
|
1188
1191
|
// TODO: allow different components for different views; probably
|
|
1189
1192
|
// should be defined in the schema instead?
|
|
1190
|
-
|
|
1193
|
+
x(this, "component");
|
|
1191
1194
|
this.doctype = t, this.schema = n, this.workflow = r, this.actions = o, this.component = s;
|
|
1192
1195
|
}
|
|
1193
1196
|
get slug() {
|
|
@@ -1197,15 +1200,15 @@ class Ti {
|
|
|
1197
1200
|
return this.doctype;
|
|
1198
1201
|
}
|
|
1199
1202
|
}
|
|
1200
|
-
const
|
|
1203
|
+
const Se = class Se {
|
|
1201
1204
|
constructor(t, n) {
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
if (
|
|
1207
|
-
return
|
|
1208
|
-
|
|
1205
|
+
x(this, "name");
|
|
1206
|
+
x(this, "router");
|
|
1207
|
+
x(this, "registry");
|
|
1208
|
+
x(this, "getMeta");
|
|
1209
|
+
if (Se._root)
|
|
1210
|
+
return Se._root;
|
|
1211
|
+
Se._root = this, this.name = "Registry", this.router = t, this.registry = {}, this.getMeta = n;
|
|
1209
1212
|
}
|
|
1210
1213
|
addDoctype(t) {
|
|
1211
1214
|
t.doctype in Object.keys(this.registry) || (this.registry[t.slug] = t), this.router.hasRoute(t.doctype) || this.router.addRoute({
|
|
@@ -1215,52 +1218,57 @@ const Ee = class Ee {
|
|
|
1215
1218
|
});
|
|
1216
1219
|
}
|
|
1217
1220
|
};
|
|
1218
|
-
|
|
1219
|
-
let
|
|
1221
|
+
x(Se, "_root");
|
|
1222
|
+
let pt = Se;
|
|
1220
1223
|
/*!
|
|
1221
|
-
* vue-router v4.4.
|
|
1224
|
+
* vue-router v4.4.5
|
|
1222
1225
|
* (c) 2024 Eduardo San Martin Morote
|
|
1223
1226
|
* @license MIT
|
|
1224
1227
|
*/
|
|
1225
1228
|
const Z = typeof document < "u";
|
|
1226
|
-
function
|
|
1227
|
-
return e
|
|
1229
|
+
function Vn(e) {
|
|
1230
|
+
return typeof e == "object" || "displayName" in e || "props" in e || "__vccOpts" in e;
|
|
1228
1231
|
}
|
|
1229
|
-
|
|
1230
|
-
|
|
1232
|
+
function no(e) {
|
|
1233
|
+
return e.__esModule || e[Symbol.toStringTag] === "Module" || // support CF with dynamic imports that do not
|
|
1234
|
+
// add the Module string tag
|
|
1235
|
+
e.default && Vn(e.default);
|
|
1236
|
+
}
|
|
1237
|
+
const C = Object.assign;
|
|
1238
|
+
function nt(e, t) {
|
|
1231
1239
|
const n = {};
|
|
1232
1240
|
for (const r in t) {
|
|
1233
1241
|
const o = t[r];
|
|
1234
|
-
n[r] =
|
|
1242
|
+
n[r] = H(o) ? o.map(e) : e(o);
|
|
1235
1243
|
}
|
|
1236
1244
|
return n;
|
|
1237
1245
|
}
|
|
1238
|
-
const
|
|
1239
|
-
},
|
|
1246
|
+
const Re = () => {
|
|
1247
|
+
}, H = Array.isArray;
|
|
1240
1248
|
function O(e) {
|
|
1241
1249
|
const t = Array.from(arguments).slice(1);
|
|
1242
1250
|
console.warn.apply(console, ["[Vue Router warn]: " + e].concat(t));
|
|
1243
1251
|
}
|
|
1244
|
-
const
|
|
1252
|
+
const xn = /#/g, ro = /&/g, oo = /\//g, so = /=/g, io = /\?/g, jn = /\+/g, ao = /%5B/g, co = /%5D/g, Ln = /%5E/g, uo = /%60/g, Bn = /%7B/g, lo = /%7C/g, Un = /%7D/g, fo = /%20/g;
|
|
1245
1253
|
function kt(e) {
|
|
1246
|
-
return encodeURI("" + e).replace(
|
|
1254
|
+
return encodeURI("" + e).replace(lo, "|").replace(ao, "[").replace(co, "]");
|
|
1247
1255
|
}
|
|
1248
|
-
function
|
|
1249
|
-
return kt(e).replace(
|
|
1256
|
+
function ho(e) {
|
|
1257
|
+
return kt(e).replace(Bn, "{").replace(Un, "}").replace(Ln, "^");
|
|
1250
1258
|
}
|
|
1251
|
-
function
|
|
1252
|
-
return kt(e).replace(
|
|
1259
|
+
function mt(e) {
|
|
1260
|
+
return kt(e).replace(jn, "%2B").replace(fo, "+").replace(xn, "%23").replace(ro, "%26").replace(uo, "`").replace(Bn, "{").replace(Un, "}").replace(Ln, "^");
|
|
1253
1261
|
}
|
|
1254
|
-
function
|
|
1255
|
-
return
|
|
1262
|
+
function po(e) {
|
|
1263
|
+
return mt(e).replace(so, "%3D");
|
|
1256
1264
|
}
|
|
1257
|
-
function
|
|
1258
|
-
return kt(e).replace(
|
|
1265
|
+
function mo(e) {
|
|
1266
|
+
return kt(e).replace(xn, "%23").replace(io, "%3F");
|
|
1259
1267
|
}
|
|
1260
|
-
function
|
|
1261
|
-
return e == null ? "" :
|
|
1268
|
+
function go(e) {
|
|
1269
|
+
return e == null ? "" : mo(e).replace(oo, "%2F");
|
|
1262
1270
|
}
|
|
1263
|
-
function
|
|
1271
|
+
function Oe(e) {
|
|
1264
1272
|
try {
|
|
1265
1273
|
return decodeURIComponent("" + e);
|
|
1266
1274
|
} catch {
|
|
@@ -1268,47 +1276,47 @@ function be(e) {
|
|
|
1268
1276
|
}
|
|
1269
1277
|
return "" + e;
|
|
1270
1278
|
}
|
|
1271
|
-
const
|
|
1272
|
-
function
|
|
1279
|
+
const vo = /\/$/, yo = (e) => e.replace(vo, "");
|
|
1280
|
+
function rt(e, t, n = "/") {
|
|
1273
1281
|
let r, o = {}, s = "", i = "";
|
|
1274
1282
|
const a = t.indexOf("#");
|
|
1275
1283
|
let c = t.indexOf("?");
|
|
1276
|
-
return a < c && a >= 0 && (c = -1), c > -1 && (r = t.slice(0, c), s = t.slice(c + 1, a > -1 ? a : t.length), o = e(s)), a > -1 && (r = r || t.slice(0, a), i = t.slice(a, t.length)), r =
|
|
1284
|
+
return a < c && a >= 0 && (c = -1), c > -1 && (r = t.slice(0, c), s = t.slice(c + 1, a > -1 ? a : t.length), o = e(s)), a > -1 && (r = r || t.slice(0, a), i = t.slice(a, t.length)), r = bo(r ?? t, n), {
|
|
1277
1285
|
fullPath: r + (s && "?") + s + i,
|
|
1278
1286
|
path: r,
|
|
1279
1287
|
query: o,
|
|
1280
|
-
hash:
|
|
1288
|
+
hash: Oe(i)
|
|
1281
1289
|
};
|
|
1282
1290
|
}
|
|
1283
|
-
function
|
|
1291
|
+
function _o(e, t) {
|
|
1284
1292
|
const n = t.query ? e(t.query) : "";
|
|
1285
1293
|
return t.path + (n && "?") + n + (t.hash || "");
|
|
1286
1294
|
}
|
|
1287
|
-
function
|
|
1295
|
+
function Wt(e, t) {
|
|
1288
1296
|
return !t || !e.toLowerCase().startsWith(t.toLowerCase()) ? e : e.slice(t.length) || "/";
|
|
1289
1297
|
}
|
|
1290
|
-
function
|
|
1298
|
+
function zt(e, t, n) {
|
|
1291
1299
|
const r = t.matched.length - 1, o = n.matched.length - 1;
|
|
1292
|
-
return r > -1 && r === o && se(t.matched[r], n.matched[o]) &&
|
|
1300
|
+
return r > -1 && r === o && se(t.matched[r], n.matched[o]) && Fn(t.params, n.params) && e(t.query) === e(n.query) && t.hash === n.hash;
|
|
1293
1301
|
}
|
|
1294
1302
|
function se(e, t) {
|
|
1295
1303
|
return (e.aliasOf || e) === (t.aliasOf || t);
|
|
1296
1304
|
}
|
|
1297
|
-
function
|
|
1305
|
+
function Fn(e, t) {
|
|
1298
1306
|
if (Object.keys(e).length !== Object.keys(t).length)
|
|
1299
1307
|
return !1;
|
|
1300
1308
|
for (const n in e)
|
|
1301
|
-
if (!
|
|
1309
|
+
if (!Eo(e[n], t[n]))
|
|
1302
1310
|
return !1;
|
|
1303
1311
|
return !0;
|
|
1304
1312
|
}
|
|
1305
|
-
function
|
|
1306
|
-
return
|
|
1313
|
+
function Eo(e, t) {
|
|
1314
|
+
return H(e) ? qt(e, t) : H(t) ? qt(t, e) : e === t;
|
|
1307
1315
|
}
|
|
1308
|
-
function
|
|
1309
|
-
return
|
|
1316
|
+
function qt(e, t) {
|
|
1317
|
+
return H(t) ? e.length === t.length && e.every((n, r) => n === t[r]) : e.length === 1 && e[0] === t;
|
|
1310
1318
|
}
|
|
1311
|
-
function
|
|
1319
|
+
function bo(e, t) {
|
|
1312
1320
|
if (e.startsWith("/"))
|
|
1313
1321
|
return e;
|
|
1314
1322
|
if (process.env.NODE_ENV !== "production" && !t.startsWith("/"))
|
|
@@ -1338,28 +1346,28 @@ const te = {
|
|
|
1338
1346
|
meta: {},
|
|
1339
1347
|
redirectedFrom: void 0
|
|
1340
1348
|
};
|
|
1341
|
-
var
|
|
1349
|
+
var De;
|
|
1342
1350
|
(function(e) {
|
|
1343
1351
|
e.pop = "pop", e.push = "push";
|
|
1344
|
-
})(
|
|
1345
|
-
var
|
|
1352
|
+
})(De || (De = {}));
|
|
1353
|
+
var Ie;
|
|
1346
1354
|
(function(e) {
|
|
1347
1355
|
e.back = "back", e.forward = "forward", e.unknown = "";
|
|
1348
|
-
})(
|
|
1349
|
-
function
|
|
1356
|
+
})(Ie || (Ie = {}));
|
|
1357
|
+
function wo(e) {
|
|
1350
1358
|
if (!e)
|
|
1351
1359
|
if (Z) {
|
|
1352
1360
|
const t = document.querySelector("base");
|
|
1353
1361
|
e = t && t.getAttribute("href") || "/", e = e.replace(/^\w+:\/\/[^\/]+/, "");
|
|
1354
1362
|
} else
|
|
1355
1363
|
e = "/";
|
|
1356
|
-
return e[0] !== "/" && e[0] !== "#" && (e = "/" + e),
|
|
1364
|
+
return e[0] !== "/" && e[0] !== "#" && (e = "/" + e), yo(e);
|
|
1357
1365
|
}
|
|
1358
|
-
const
|
|
1359
|
-
function
|
|
1360
|
-
return e.replace(
|
|
1366
|
+
const So = /^[^#]+#/;
|
|
1367
|
+
function Oo(e, t) {
|
|
1368
|
+
return e.replace(So, "#") + t;
|
|
1361
1369
|
}
|
|
1362
|
-
function
|
|
1370
|
+
function No(e, t) {
|
|
1363
1371
|
const n = document.documentElement.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
1364
1372
|
return {
|
|
1365
1373
|
behavior: t.behavior,
|
|
@@ -1367,11 +1375,11 @@ function wo(e, t) {
|
|
|
1367
1375
|
top: r.top - n.top - (t.top || 0)
|
|
1368
1376
|
};
|
|
1369
1377
|
}
|
|
1370
|
-
const
|
|
1378
|
+
const ze = () => ({
|
|
1371
1379
|
left: window.scrollX,
|
|
1372
1380
|
top: window.scrollY
|
|
1373
1381
|
});
|
|
1374
|
-
function
|
|
1382
|
+
function ko(e) {
|
|
1375
1383
|
let t;
|
|
1376
1384
|
if ("el" in e) {
|
|
1377
1385
|
const n = e.el, r = typeof n == "string" && n.startsWith("#");
|
|
@@ -1391,49 +1399,49 @@ function So(e) {
|
|
|
1391
1399
|
process.env.NODE_ENV !== "production" && O(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);
|
|
1392
1400
|
return;
|
|
1393
1401
|
}
|
|
1394
|
-
t =
|
|
1402
|
+
t = No(o, e);
|
|
1395
1403
|
} else
|
|
1396
1404
|
t = e;
|
|
1397
1405
|
"scrollBehavior" in document.documentElement.style ? window.scrollTo(t) : window.scrollTo(t.left != null ? t.left : window.scrollX, t.top != null ? t.top : window.scrollY);
|
|
1398
1406
|
}
|
|
1399
|
-
function
|
|
1407
|
+
function Jt(e, t) {
|
|
1400
1408
|
return (history.state ? history.state.position - t : -1) + e;
|
|
1401
1409
|
}
|
|
1402
|
-
const
|
|
1403
|
-
function
|
|
1404
|
-
|
|
1410
|
+
const gt = /* @__PURE__ */ new Map();
|
|
1411
|
+
function Po(e, t) {
|
|
1412
|
+
gt.set(e, t);
|
|
1405
1413
|
}
|
|
1406
|
-
function
|
|
1407
|
-
const t =
|
|
1408
|
-
return
|
|
1414
|
+
function $o(e) {
|
|
1415
|
+
const t = gt.get(e);
|
|
1416
|
+
return gt.delete(e), t;
|
|
1409
1417
|
}
|
|
1410
|
-
let
|
|
1411
|
-
function
|
|
1418
|
+
let Ro = () => location.protocol + "//" + location.host;
|
|
1419
|
+
function Hn(e, t) {
|
|
1412
1420
|
const { pathname: n, search: r, hash: o } = t, s = e.indexOf("#");
|
|
1413
1421
|
if (s > -1) {
|
|
1414
1422
|
let a = o.includes(e.slice(s)) ? e.slice(s).length : 1, c = o.slice(a);
|
|
1415
|
-
return c[0] !== "/" && (c = "/" + c),
|
|
1423
|
+
return c[0] !== "/" && (c = "/" + c), Wt(c, "");
|
|
1416
1424
|
}
|
|
1417
|
-
return
|
|
1425
|
+
return Wt(n, e) + r + o;
|
|
1418
1426
|
}
|
|
1419
|
-
function
|
|
1427
|
+
function Io(e, t, n, r) {
|
|
1420
1428
|
let o = [], s = [], i = null;
|
|
1421
1429
|
const a = ({ state: d }) => {
|
|
1422
|
-
const p =
|
|
1423
|
-
let
|
|
1430
|
+
const p = Hn(e, location), b = n.value, S = t.value;
|
|
1431
|
+
let E = 0;
|
|
1424
1432
|
if (d) {
|
|
1425
1433
|
if (n.value = p, t.value = d, i && i === b) {
|
|
1426
1434
|
i = null;
|
|
1427
1435
|
return;
|
|
1428
1436
|
}
|
|
1429
|
-
|
|
1437
|
+
E = S ? d.position - S.position : 0;
|
|
1430
1438
|
} else
|
|
1431
1439
|
r(p);
|
|
1432
|
-
o.forEach((
|
|
1433
|
-
|
|
1434
|
-
delta:
|
|
1435
|
-
type:
|
|
1436
|
-
direction:
|
|
1440
|
+
o.forEach((R) => {
|
|
1441
|
+
R(n.value, b, {
|
|
1442
|
+
delta: E,
|
|
1443
|
+
type: De.pop,
|
|
1444
|
+
direction: E ? E > 0 ? Ie.forward : Ie.back : Ie.unknown
|
|
1437
1445
|
});
|
|
1438
1446
|
});
|
|
1439
1447
|
};
|
|
@@ -1450,7 +1458,7 @@ function Po(e, t, n, r) {
|
|
|
1450
1458
|
}
|
|
1451
1459
|
function f() {
|
|
1452
1460
|
const { history: d } = window;
|
|
1453
|
-
d.state && d.replaceState(
|
|
1461
|
+
d.state && d.replaceState(C({}, d.state, { scroll: ze() }), "");
|
|
1454
1462
|
}
|
|
1455
1463
|
function l() {
|
|
1456
1464
|
for (const d of s)
|
|
@@ -1465,19 +1473,19 @@ function Po(e, t, n, r) {
|
|
|
1465
1473
|
destroy: l
|
|
1466
1474
|
};
|
|
1467
1475
|
}
|
|
1468
|
-
function
|
|
1476
|
+
function Kt(e, t, n, r = !1, o = !1) {
|
|
1469
1477
|
return {
|
|
1470
1478
|
back: e,
|
|
1471
1479
|
current: t,
|
|
1472
1480
|
forward: n,
|
|
1473
1481
|
replaced: r,
|
|
1474
1482
|
position: window.history.length,
|
|
1475
|
-
scroll: o ?
|
|
1483
|
+
scroll: o ? ze() : null
|
|
1476
1484
|
};
|
|
1477
1485
|
}
|
|
1478
|
-
function
|
|
1486
|
+
function Co(e) {
|
|
1479
1487
|
const { history: t, location: n } = window, r = {
|
|
1480
|
-
value:
|
|
1488
|
+
value: Hn(e, n)
|
|
1481
1489
|
}, o = { value: t.state };
|
|
1482
1490
|
o.value || s(r.value, {
|
|
1483
1491
|
back: null,
|
|
@@ -1491,7 +1499,7 @@ function $o(e) {
|
|
|
1491
1499
|
scroll: null
|
|
1492
1500
|
}, !0);
|
|
1493
1501
|
function s(c, u, f) {
|
|
1494
|
-
const l = e.indexOf("#"), d = l > -1 ? (n.host && document.querySelector("base") ? e : e.slice(l)) + c :
|
|
1502
|
+
const l = e.indexOf("#"), d = l > -1 ? (n.host && document.querySelector("base") ? e : e.slice(l)) + c : Ro() + e + c;
|
|
1495
1503
|
try {
|
|
1496
1504
|
t[f ? "replaceState" : "pushState"](u, "", d), o.value = u;
|
|
1497
1505
|
} catch (p) {
|
|
@@ -1499,7 +1507,7 @@ function $o(e) {
|
|
|
1499
1507
|
}
|
|
1500
1508
|
}
|
|
1501
1509
|
function i(c, u) {
|
|
1502
|
-
const f =
|
|
1510
|
+
const f = C({}, t.state, Kt(
|
|
1503
1511
|
o.value.back,
|
|
1504
1512
|
// keep back and forward entries but override current position
|
|
1505
1513
|
c,
|
|
@@ -1509,7 +1517,7 @@ function $o(e) {
|
|
|
1509
1517
|
s(c, f, !0), r.value = c;
|
|
1510
1518
|
}
|
|
1511
1519
|
function a(c, u) {
|
|
1512
|
-
const f =
|
|
1520
|
+
const f = C(
|
|
1513
1521
|
{},
|
|
1514
1522
|
// use current history state to gracefully handle a wrong call to
|
|
1515
1523
|
// history.replaceState
|
|
@@ -1518,15 +1526,15 @@ function $o(e) {
|
|
|
1518
1526
|
t.state,
|
|
1519
1527
|
{
|
|
1520
1528
|
forward: c,
|
|
1521
|
-
scroll:
|
|
1529
|
+
scroll: ze()
|
|
1522
1530
|
}
|
|
1523
1531
|
);
|
|
1524
1532
|
process.env.NODE_ENV !== "production" && !t.state && O(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:
|
|
1525
1533
|
|
|
1526
1534
|
history.replaceState(history.state, '', url)
|
|
1527
1535
|
|
|
1528
|
-
You can find more information at https://
|
|
1529
|
-
const l =
|
|
1536
|
+
You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`), s(f.current, f, !0);
|
|
1537
|
+
const l = C({}, Kt(r.value, c, null), { position: f.position + 1 }, u);
|
|
1530
1538
|
s(c, l, !1), r.value = c;
|
|
1531
1539
|
}
|
|
1532
1540
|
return {
|
|
@@ -1536,18 +1544,18 @@ You can find more information at https://next.router.vuejs.org/guide/migration/#
|
|
|
1536
1544
|
replace: i
|
|
1537
1545
|
};
|
|
1538
1546
|
}
|
|
1539
|
-
function
|
|
1540
|
-
e =
|
|
1541
|
-
const t =
|
|
1547
|
+
function Ao(e) {
|
|
1548
|
+
e = wo(e);
|
|
1549
|
+
const t = Co(e), n = Io(e, t.state, t.location, t.replace);
|
|
1542
1550
|
function r(s, i = !0) {
|
|
1543
1551
|
i || n.pauseListeners(), history.go(s);
|
|
1544
1552
|
}
|
|
1545
|
-
const o =
|
|
1553
|
+
const o = C({
|
|
1546
1554
|
// it's overridden right after
|
|
1547
1555
|
location: "",
|
|
1548
1556
|
base: e,
|
|
1549
1557
|
go: r,
|
|
1550
|
-
createHref:
|
|
1558
|
+
createHref: Oo.bind(null, e)
|
|
1551
1559
|
}, t, n);
|
|
1552
1560
|
return Object.defineProperty(o, "location", {
|
|
1553
1561
|
enumerable: !0,
|
|
@@ -1557,18 +1565,18 @@ function Ro(e) {
|
|
|
1557
1565
|
get: () => t.state.value
|
|
1558
1566
|
}), o;
|
|
1559
1567
|
}
|
|
1560
|
-
function
|
|
1568
|
+
function We(e) {
|
|
1561
1569
|
return typeof e == "string" || e && typeof e == "object";
|
|
1562
1570
|
}
|
|
1563
|
-
function
|
|
1571
|
+
function Gn(e) {
|
|
1564
1572
|
return typeof e == "string" || typeof e == "symbol";
|
|
1565
1573
|
}
|
|
1566
|
-
const
|
|
1567
|
-
var
|
|
1574
|
+
const vt = Symbol(process.env.NODE_ENV !== "production" ? "navigation failure" : "");
|
|
1575
|
+
var Qt;
|
|
1568
1576
|
(function(e) {
|
|
1569
1577
|
e[e.aborted = 4] = "aborted", e[e.cancelled = 8] = "cancelled", e[e.duplicated = 16] = "duplicated";
|
|
1570
|
-
})(
|
|
1571
|
-
const
|
|
1578
|
+
})(Qt || (Qt = {}));
|
|
1579
|
+
const To = {
|
|
1572
1580
|
1({ location: e, currentLocation: t }) {
|
|
1573
1581
|
return `No match for
|
|
1574
1582
|
${JSON.stringify(e)}${t ? `
|
|
@@ -1576,7 +1584,7 @@ while being at
|
|
|
1576
1584
|
` + JSON.stringify(t) : ""}`;
|
|
1577
1585
|
},
|
|
1578
1586
|
2({ from: e, to: t }) {
|
|
1579
|
-
return `Redirected from "${e.fullPath}" to "${
|
|
1587
|
+
return `Redirected from "${e.fullPath}" to "${Mo(t)}" via a navigation guard.`;
|
|
1580
1588
|
},
|
|
1581
1589
|
4({ from: e, to: t }) {
|
|
1582
1590
|
return `Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`;
|
|
@@ -1588,37 +1596,37 @@ while being at
|
|
|
1588
1596
|
return `Avoided redundant navigation to current location: "${e.fullPath}".`;
|
|
1589
1597
|
}
|
|
1590
1598
|
};
|
|
1591
|
-
function
|
|
1592
|
-
return process.env.NODE_ENV !== "production" ?
|
|
1599
|
+
function Ne(e, t) {
|
|
1600
|
+
return process.env.NODE_ENV !== "production" ? C(new Error(To[e](t)), {
|
|
1593
1601
|
type: e,
|
|
1594
|
-
[
|
|
1595
|
-
}, t) :
|
|
1602
|
+
[vt]: !0
|
|
1603
|
+
}, t) : C(new Error(), {
|
|
1596
1604
|
type: e,
|
|
1597
|
-
[
|
|
1605
|
+
[vt]: !0
|
|
1598
1606
|
}, t);
|
|
1599
1607
|
}
|
|
1600
1608
|
function X(e, t) {
|
|
1601
|
-
return e instanceof Error &&
|
|
1609
|
+
return e instanceof Error && vt in e && (t == null || !!(e.type & t));
|
|
1602
1610
|
}
|
|
1603
|
-
const
|
|
1604
|
-
function
|
|
1611
|
+
const Do = ["params", "query", "hash"];
|
|
1612
|
+
function Mo(e) {
|
|
1605
1613
|
if (typeof e == "string")
|
|
1606
1614
|
return e;
|
|
1607
1615
|
if (e.path != null)
|
|
1608
1616
|
return e.path;
|
|
1609
1617
|
const t = {};
|
|
1610
|
-
for (const n of
|
|
1618
|
+
for (const n of Do)
|
|
1611
1619
|
n in e && (t[n] = e[n]);
|
|
1612
1620
|
return JSON.stringify(t, null, 2);
|
|
1613
1621
|
}
|
|
1614
|
-
const
|
|
1622
|
+
const Yt = "[^/]+?", Vo = {
|
|
1615
1623
|
sensitive: !1,
|
|
1616
1624
|
strict: !1,
|
|
1617
1625
|
start: !0,
|
|
1618
1626
|
end: !0
|
|
1619
|
-
},
|
|
1620
|
-
function
|
|
1621
|
-
const n =
|
|
1627
|
+
}, xo = /[.+*?^${}()[\]/\\]/g;
|
|
1628
|
+
function jo(e, t) {
|
|
1629
|
+
const n = C({}, Vo, t), r = [];
|
|
1622
1630
|
let o = n.start ? "^" : "";
|
|
1623
1631
|
const s = [];
|
|
1624
1632
|
for (const u of e) {
|
|
@@ -1631,27 +1639,27 @@ function Mo(e, t) {
|
|
|
1631
1639
|
const d = u[l];
|
|
1632
1640
|
let p = 40 + (n.sensitive ? 0.25 : 0);
|
|
1633
1641
|
if (d.type === 0)
|
|
1634
|
-
l || (o += "/"), o += d.value.replace(
|
|
1642
|
+
l || (o += "/"), o += d.value.replace(xo, "\\$&"), p += 40;
|
|
1635
1643
|
else if (d.type === 1) {
|
|
1636
|
-
const { value: b, repeatable:
|
|
1644
|
+
const { value: b, repeatable: S, optional: E, regexp: R } = d;
|
|
1637
1645
|
s.push({
|
|
1638
1646
|
name: b,
|
|
1639
|
-
repeatable:
|
|
1640
|
-
optional:
|
|
1647
|
+
repeatable: S,
|
|
1648
|
+
optional: E
|
|
1641
1649
|
});
|
|
1642
|
-
const
|
|
1643
|
-
if (
|
|
1650
|
+
const k = R || Yt;
|
|
1651
|
+
if (k !== Yt) {
|
|
1644
1652
|
p += 10;
|
|
1645
1653
|
try {
|
|
1646
|
-
new RegExp(`(${
|
|
1647
|
-
} catch (
|
|
1648
|
-
throw new Error(`Invalid custom RegExp for param "${b}" (${
|
|
1654
|
+
new RegExp(`(${k})`);
|
|
1655
|
+
} catch (M) {
|
|
1656
|
+
throw new Error(`Invalid custom RegExp for param "${b}" (${k}): ` + M.message);
|
|
1649
1657
|
}
|
|
1650
1658
|
}
|
|
1651
|
-
let P =
|
|
1659
|
+
let P = S ? `((?:${k})(?:/(?:${k}))*)` : `(${k})`;
|
|
1652
1660
|
l || (P = // avoid an optional / if there are more segments e.g. /:p?-static
|
|
1653
1661
|
// or /:p?-:p2
|
|
1654
|
-
|
|
1662
|
+
E && u.length < 2 ? `(?:/${P})` : "/" + P), E && (P += "?"), o += P, p += 20, E && (p += -8), S && (p += -20), k === ".*" && (p += -50);
|
|
1655
1663
|
}
|
|
1656
1664
|
f.push(p);
|
|
1657
1665
|
}
|
|
@@ -1681,16 +1689,16 @@ function Mo(e, t) {
|
|
|
1681
1689
|
if (p.type === 0)
|
|
1682
1690
|
f += p.value;
|
|
1683
1691
|
else if (p.type === 1) {
|
|
1684
|
-
const { value: b, repeatable:
|
|
1685
|
-
if (
|
|
1692
|
+
const { value: b, repeatable: S, optional: E } = p, R = b in u ? u[b] : "";
|
|
1693
|
+
if (H(R) && !S)
|
|
1686
1694
|
throw new Error(`Provided param "${b}" is an array but it is not repeatable (* or + modifiers)`);
|
|
1687
|
-
const
|
|
1688
|
-
if (!
|
|
1689
|
-
if (
|
|
1695
|
+
const k = H(R) ? R.join("/") : R;
|
|
1696
|
+
if (!k)
|
|
1697
|
+
if (E)
|
|
1690
1698
|
d.length < 2 && (f.endsWith("/") ? f = f.slice(0, -1) : l = !0);
|
|
1691
1699
|
else
|
|
1692
1700
|
throw new Error(`Missing required param "${b}"`);
|
|
1693
|
-
f +=
|
|
1701
|
+
f += k;
|
|
1694
1702
|
}
|
|
1695
1703
|
}
|
|
1696
1704
|
return f || "/";
|
|
@@ -1703,7 +1711,7 @@ function Mo(e, t) {
|
|
|
1703
1711
|
stringify: c
|
|
1704
1712
|
};
|
|
1705
1713
|
}
|
|
1706
|
-
function
|
|
1714
|
+
function Lo(e, t) {
|
|
1707
1715
|
let n = 0;
|
|
1708
1716
|
for (; n < e.length && n < t.length; ) {
|
|
1709
1717
|
const r = t[n] - e[n];
|
|
@@ -1713,36 +1721,36 @@ function Vo(e, t) {
|
|
|
1713
1721
|
}
|
|
1714
1722
|
return e.length < t.length ? e.length === 1 && e[0] === 80 ? -1 : 1 : e.length > t.length ? t.length === 1 && t[0] === 80 ? 1 : -1 : 0;
|
|
1715
1723
|
}
|
|
1716
|
-
function
|
|
1724
|
+
function Wn(e, t) {
|
|
1717
1725
|
let n = 0;
|
|
1718
1726
|
const r = e.score, o = t.score;
|
|
1719
1727
|
for (; n < r.length && n < o.length; ) {
|
|
1720
|
-
const s =
|
|
1728
|
+
const s = Lo(r[n], o[n]);
|
|
1721
1729
|
if (s)
|
|
1722
1730
|
return s;
|
|
1723
1731
|
n++;
|
|
1724
1732
|
}
|
|
1725
1733
|
if (Math.abs(o.length - r.length) === 1) {
|
|
1726
|
-
if (
|
|
1734
|
+
if (Xt(r))
|
|
1727
1735
|
return 1;
|
|
1728
|
-
if (
|
|
1736
|
+
if (Xt(o))
|
|
1729
1737
|
return -1;
|
|
1730
1738
|
}
|
|
1731
1739
|
return o.length - r.length;
|
|
1732
1740
|
}
|
|
1733
|
-
function
|
|
1741
|
+
function Xt(e) {
|
|
1734
1742
|
const t = e[e.length - 1];
|
|
1735
1743
|
return e.length > 0 && t[t.length - 1] < 0;
|
|
1736
1744
|
}
|
|
1737
|
-
const
|
|
1745
|
+
const Bo = {
|
|
1738
1746
|
type: 0,
|
|
1739
1747
|
value: ""
|
|
1740
|
-
},
|
|
1741
|
-
function
|
|
1748
|
+
}, Uo = /[a-zA-Z0-9_]/;
|
|
1749
|
+
function Fo(e) {
|
|
1742
1750
|
if (!e)
|
|
1743
1751
|
return [[]];
|
|
1744
1752
|
if (e === "/")
|
|
1745
|
-
return [[
|
|
1753
|
+
return [[Bo]];
|
|
1746
1754
|
if (!e.startsWith("/"))
|
|
1747
1755
|
throw new Error(process.env.NODE_ENV !== "production" ? `Route paths should start with a "/": "${e}" should be "/${e}".` : `Invalid path "${e}"`);
|
|
1748
1756
|
function t(p) {
|
|
@@ -1783,7 +1791,7 @@ function Lo(e) {
|
|
|
1783
1791
|
d(), n = r;
|
|
1784
1792
|
break;
|
|
1785
1793
|
case 1:
|
|
1786
|
-
c === "(" ? n = 2 :
|
|
1794
|
+
c === "(" ? n = 2 : Uo.test(c) ? d() : (l(), n = 0, c !== "*" && c !== "?" && c !== "+" && a--);
|
|
1787
1795
|
break;
|
|
1788
1796
|
case 2:
|
|
1789
1797
|
c === ")" ? f[f.length - 1] == "\\" ? f = f.slice(0, -1) + c : n = 3 : f += c;
|
|
@@ -1798,14 +1806,14 @@ function Lo(e) {
|
|
|
1798
1806
|
}
|
|
1799
1807
|
return n === 2 && t(`Unfinished custom RegExp for param "${u}"`), l(), i(), o;
|
|
1800
1808
|
}
|
|
1801
|
-
function
|
|
1802
|
-
const r =
|
|
1809
|
+
function Ho(e, t, n) {
|
|
1810
|
+
const r = jo(Fo(e.path), n);
|
|
1803
1811
|
if (process.env.NODE_ENV !== "production") {
|
|
1804
1812
|
const s = /* @__PURE__ */ new Set();
|
|
1805
1813
|
for (const i of r.keys)
|
|
1806
1814
|
s.has(i.name) && O(`Found duplicated params with name "${i.name}" for path "${e.path}". Only the last one will be available on "$route.params".`), s.add(i.name);
|
|
1807
1815
|
}
|
|
1808
|
-
const o =
|
|
1816
|
+
const o = C(r, {
|
|
1809
1817
|
record: e,
|
|
1810
1818
|
parent: t,
|
|
1811
1819
|
// these needs to be populated by the parent
|
|
@@ -1814,55 +1822,57 @@ function Bo(e, t, n) {
|
|
|
1814
1822
|
});
|
|
1815
1823
|
return t && !o.record.aliasOf == !t.record.aliasOf && t.children.push(o), o;
|
|
1816
1824
|
}
|
|
1817
|
-
function
|
|
1825
|
+
function Go(e, t) {
|
|
1818
1826
|
const n = [], r = /* @__PURE__ */ new Map();
|
|
1819
|
-
t =
|
|
1827
|
+
t = nn({ strict: !1, end: !0, sensitive: !1 }, t);
|
|
1820
1828
|
function o(l) {
|
|
1821
1829
|
return r.get(l);
|
|
1822
1830
|
}
|
|
1823
1831
|
function s(l, d, p) {
|
|
1824
|
-
const b = !p,
|
|
1825
|
-
process.env.NODE_ENV !== "production" &&
|
|
1826
|
-
const
|
|
1827
|
-
v
|
|
1828
|
-
];
|
|
1832
|
+
const b = !p, S = en(l);
|
|
1833
|
+
process.env.NODE_ENV !== "production" && Jo(S, d), S.aliasOf = p && p.record;
|
|
1834
|
+
const E = nn(t, l), R = [S];
|
|
1829
1835
|
if ("alias" in l) {
|
|
1830
|
-
const
|
|
1831
|
-
for (const
|
|
1832
|
-
|
|
1833
|
-
//
|
|
1834
|
-
//
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1836
|
+
const M = typeof l.alias == "string" ? [l.alias] : l.alias;
|
|
1837
|
+
for (const B of M)
|
|
1838
|
+
R.push(
|
|
1839
|
+
// we need to normalize again to ensure the `mods` property
|
|
1840
|
+
// being non enumerable
|
|
1841
|
+
en(C({}, S, {
|
|
1842
|
+
// this allows us to hold a copy of the `components` option
|
|
1843
|
+
// so that async components cache is hold on the original record
|
|
1844
|
+
components: p ? p.record.components : S.components,
|
|
1845
|
+
path: B,
|
|
1846
|
+
// we might be the child of an alias
|
|
1847
|
+
aliasOf: p ? p.record : S
|
|
1848
|
+
// the aliases are always of the same kind as the original since they
|
|
1849
|
+
// are defined on the same record
|
|
1850
|
+
}))
|
|
1851
|
+
);
|
|
1842
1852
|
}
|
|
1843
|
-
let
|
|
1844
|
-
for (const
|
|
1845
|
-
const { path:
|
|
1846
|
-
if (d &&
|
|
1853
|
+
let k, P;
|
|
1854
|
+
for (const M of R) {
|
|
1855
|
+
const { path: B } = M;
|
|
1856
|
+
if (d && B[0] !== "/") {
|
|
1847
1857
|
const q = d.record.path, w = q[q.length - 1] === "/" ? "" : "/";
|
|
1848
|
-
|
|
1858
|
+
M.path = d.record.path + (B && w + B);
|
|
1849
1859
|
}
|
|
1850
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
1860
|
+
if (process.env.NODE_ENV !== "production" && M.path === "*")
|
|
1851
1861
|
throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
|
|
1852
|
-
See more at https://
|
|
1853
|
-
if (
|
|
1854
|
-
const q =
|
|
1862
|
+
See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);
|
|
1863
|
+
if (k = Ho(M, d, E), process.env.NODE_ENV !== "production" && d && B[0] === "/" && Ko(k, d), p ? (p.alias.push(k), process.env.NODE_ENV !== "production" && qo(p, k)) : (P = P || k, P !== k && P.alias.push(k), b && l.name && !tn(k) && i(l.name)), zn(k) && c(k), S.children) {
|
|
1864
|
+
const q = S.children;
|
|
1855
1865
|
for (let w = 0; w < q.length; w++)
|
|
1856
|
-
s(q[w],
|
|
1866
|
+
s(q[w], k, p && p.children[w]);
|
|
1857
1867
|
}
|
|
1858
|
-
p = p ||
|
|
1868
|
+
p = p || k;
|
|
1859
1869
|
}
|
|
1860
1870
|
return P ? () => {
|
|
1861
1871
|
i(P);
|
|
1862
|
-
} :
|
|
1872
|
+
} : Re;
|
|
1863
1873
|
}
|
|
1864
1874
|
function i(l) {
|
|
1865
|
-
if (
|
|
1875
|
+
if (Gn(l)) {
|
|
1866
1876
|
const d = r.get(l);
|
|
1867
1877
|
d && (r.delete(l), n.splice(n.indexOf(d), 1), d.children.forEach(i), d.alias.forEach(i));
|
|
1868
1878
|
} else {
|
|
@@ -1874,23 +1884,23 @@ See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch
|
|
|
1874
1884
|
return n;
|
|
1875
1885
|
}
|
|
1876
1886
|
function c(l) {
|
|
1877
|
-
const d =
|
|
1878
|
-
n.splice(d, 0, l), l.record.name && !
|
|
1887
|
+
const d = Qo(l, n);
|
|
1888
|
+
n.splice(d, 0, l), l.record.name && !tn(l) && r.set(l.record.name, l);
|
|
1879
1889
|
}
|
|
1880
1890
|
function u(l, d) {
|
|
1881
|
-
let p, b = {},
|
|
1891
|
+
let p, b = {}, S, E;
|
|
1882
1892
|
if ("name" in l && l.name) {
|
|
1883
1893
|
if (p = r.get(l.name), !p)
|
|
1884
|
-
throw
|
|
1894
|
+
throw Ne(1, {
|
|
1885
1895
|
location: l
|
|
1886
1896
|
});
|
|
1887
1897
|
if (process.env.NODE_ENV !== "production") {
|
|
1888
|
-
const P = Object.keys(l.params || {}).filter((
|
|
1898
|
+
const P = Object.keys(l.params || {}).filter((M) => !p.keys.find((B) => B.name === M));
|
|
1889
1899
|
P.length && O(`Discarded invalid param(s) "${P.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);
|
|
1890
1900
|
}
|
|
1891
|
-
|
|
1901
|
+
E = p.record.name, b = C(
|
|
1892
1902
|
// paramsFromLocation is a new object
|
|
1893
|
-
|
|
1903
|
+
Zt(
|
|
1894
1904
|
d.params,
|
|
1895
1905
|
// only keep params that exist in the resolved location
|
|
1896
1906
|
// only keep optional params coming from a parent record
|
|
@@ -1898,28 +1908,28 @@ See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch
|
|
|
1898
1908
|
),
|
|
1899
1909
|
// discard any existing params in the current location that do not exist here
|
|
1900
1910
|
// #1497 this ensures better active/exact matching
|
|
1901
|
-
l.params &&
|
|
1902
|
-
),
|
|
1911
|
+
l.params && Zt(l.params, p.keys.map((P) => P.name))
|
|
1912
|
+
), S = p.stringify(b);
|
|
1903
1913
|
} else if (l.path != null)
|
|
1904
|
-
|
|
1914
|
+
S = l.path, process.env.NODE_ENV !== "production" && !S.startsWith("/") && O(`The Matcher cannot resolve relative paths but received "${S}". Unless you directly called \`matcher.resolve("${S}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`), p = n.find((P) => P.re.test(S)), p && (b = p.parse(S), E = p.record.name);
|
|
1905
1915
|
else {
|
|
1906
1916
|
if (p = d.name ? r.get(d.name) : n.find((P) => P.re.test(d.path)), !p)
|
|
1907
|
-
throw
|
|
1917
|
+
throw Ne(1, {
|
|
1908
1918
|
location: l,
|
|
1909
1919
|
currentLocation: d
|
|
1910
1920
|
});
|
|
1911
|
-
|
|
1921
|
+
E = p.record.name, b = C({}, d.params, l.params), S = p.stringify(b);
|
|
1912
1922
|
}
|
|
1913
|
-
const
|
|
1914
|
-
let
|
|
1915
|
-
for (;
|
|
1916
|
-
|
|
1923
|
+
const R = [];
|
|
1924
|
+
let k = p;
|
|
1925
|
+
for (; k; )
|
|
1926
|
+
R.unshift(k.record), k = k.parent;
|
|
1917
1927
|
return {
|
|
1918
|
-
name:
|
|
1919
|
-
path:
|
|
1928
|
+
name: E,
|
|
1929
|
+
path: S,
|
|
1920
1930
|
params: b,
|
|
1921
|
-
matched:
|
|
1922
|
-
meta:
|
|
1931
|
+
matched: R,
|
|
1932
|
+
meta: zo(R)
|
|
1923
1933
|
};
|
|
1924
1934
|
}
|
|
1925
1935
|
e.forEach((l) => s(l));
|
|
@@ -1935,30 +1945,35 @@ See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch
|
|
|
1935
1945
|
getRecordMatcher: o
|
|
1936
1946
|
};
|
|
1937
1947
|
}
|
|
1938
|
-
function
|
|
1948
|
+
function Zt(e, t) {
|
|
1939
1949
|
const n = {};
|
|
1940
1950
|
for (const r of t)
|
|
1941
1951
|
r in e && (n[r] = e[r]);
|
|
1942
1952
|
return n;
|
|
1943
1953
|
}
|
|
1944
|
-
function
|
|
1945
|
-
|
|
1954
|
+
function en(e) {
|
|
1955
|
+
const t = {
|
|
1946
1956
|
path: e.path,
|
|
1947
1957
|
redirect: e.redirect,
|
|
1948
1958
|
name: e.name,
|
|
1949
1959
|
meta: e.meta || {},
|
|
1950
|
-
aliasOf:
|
|
1960
|
+
aliasOf: e.aliasOf,
|
|
1951
1961
|
beforeEnter: e.beforeEnter,
|
|
1952
|
-
props:
|
|
1962
|
+
props: Wo(e),
|
|
1953
1963
|
children: e.children || [],
|
|
1954
1964
|
instances: {},
|
|
1955
1965
|
leaveGuards: /* @__PURE__ */ new Set(),
|
|
1956
1966
|
updateGuards: /* @__PURE__ */ new Set(),
|
|
1957
1967
|
enterCallbacks: {},
|
|
1968
|
+
// must be declared afterwards
|
|
1969
|
+
// mods: {},
|
|
1958
1970
|
components: "components" in e ? e.components || null : e.component && { default: e.component }
|
|
1959
1971
|
};
|
|
1972
|
+
return Object.defineProperty(t, "mods", {
|
|
1973
|
+
value: {}
|
|
1974
|
+
}), t;
|
|
1960
1975
|
}
|
|
1961
|
-
function
|
|
1976
|
+
function Wo(e) {
|
|
1962
1977
|
const t = {}, n = e.props || !1;
|
|
1963
1978
|
if ("component" in e)
|
|
1964
1979
|
t.default = n;
|
|
@@ -1967,7 +1982,7 @@ function Fo(e) {
|
|
|
1967
1982
|
t[r] = typeof n == "object" ? n[r] : n;
|
|
1968
1983
|
return t;
|
|
1969
1984
|
}
|
|
1970
|
-
function
|
|
1985
|
+
function tn(e) {
|
|
1971
1986
|
for (; e; ) {
|
|
1972
1987
|
if (e.record.aliasOf)
|
|
1973
1988
|
return !0;
|
|
@@ -1975,91 +1990,91 @@ function Xt(e) {
|
|
|
1975
1990
|
}
|
|
1976
1991
|
return !1;
|
|
1977
1992
|
}
|
|
1978
|
-
function
|
|
1979
|
-
return e.reduce((t, n) =>
|
|
1993
|
+
function zo(e) {
|
|
1994
|
+
return e.reduce((t, n) => C(t, n.meta), {});
|
|
1980
1995
|
}
|
|
1981
|
-
function
|
|
1996
|
+
function nn(e, t) {
|
|
1982
1997
|
const n = {};
|
|
1983
1998
|
for (const r in e)
|
|
1984
1999
|
n[r] = r in t ? t[r] : e[r];
|
|
1985
2000
|
return n;
|
|
1986
2001
|
}
|
|
1987
|
-
function
|
|
2002
|
+
function yt(e, t) {
|
|
1988
2003
|
return e.name === t.name && e.optional === t.optional && e.repeatable === t.repeatable;
|
|
1989
2004
|
}
|
|
1990
|
-
function
|
|
2005
|
+
function qo(e, t) {
|
|
1991
2006
|
for (const n of e.keys)
|
|
1992
|
-
if (!n.optional && !t.keys.find(
|
|
2007
|
+
if (!n.optional && !t.keys.find(yt.bind(null, n)))
|
|
1993
2008
|
return O(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
|
|
1994
2009
|
for (const n of t.keys)
|
|
1995
|
-
if (!n.optional && !e.keys.find(
|
|
2010
|
+
if (!n.optional && !e.keys.find(yt.bind(null, n)))
|
|
1996
2011
|
return O(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
|
|
1997
2012
|
}
|
|
1998
|
-
function
|
|
2013
|
+
function Jo(e, t) {
|
|
1999
2014
|
t && t.record.name && !e.name && !e.path && O(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);
|
|
2000
2015
|
}
|
|
2001
|
-
function
|
|
2016
|
+
function Ko(e, t) {
|
|
2002
2017
|
for (const n of t.keys)
|
|
2003
|
-
if (!e.keys.find(
|
|
2018
|
+
if (!e.keys.find(yt.bind(null, n)))
|
|
2004
2019
|
return O(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`);
|
|
2005
2020
|
}
|
|
2006
|
-
function
|
|
2021
|
+
function Qo(e, t) {
|
|
2007
2022
|
let n = 0, r = t.length;
|
|
2008
2023
|
for (; n !== r; ) {
|
|
2009
2024
|
const s = n + r >> 1;
|
|
2010
|
-
|
|
2025
|
+
Wn(e, t[s]) < 0 ? r = s : n = s + 1;
|
|
2011
2026
|
}
|
|
2012
|
-
const o =
|
|
2027
|
+
const o = Yo(e);
|
|
2013
2028
|
return o && (r = t.lastIndexOf(o, r - 1), process.env.NODE_ENV !== "production" && r < 0 && O(`Finding ancestor route "${o.record.path}" failed for "${e.record.path}"`)), r;
|
|
2014
2029
|
}
|
|
2015
|
-
function
|
|
2030
|
+
function Yo(e) {
|
|
2016
2031
|
let t = e;
|
|
2017
2032
|
for (; t = t.parent; )
|
|
2018
|
-
if (
|
|
2033
|
+
if (zn(t) && Wn(e, t) === 0)
|
|
2019
2034
|
return t;
|
|
2020
2035
|
}
|
|
2021
|
-
function
|
|
2036
|
+
function zn({ record: e }) {
|
|
2022
2037
|
return !!(e.name || e.components && Object.keys(e.components).length || e.redirect);
|
|
2023
2038
|
}
|
|
2024
|
-
function
|
|
2039
|
+
function Xo(e) {
|
|
2025
2040
|
const t = {};
|
|
2026
2041
|
if (e === "" || e === "?")
|
|
2027
2042
|
return t;
|
|
2028
2043
|
const r = (e[0] === "?" ? e.slice(1) : e).split("&");
|
|
2029
2044
|
for (let o = 0; o < r.length; ++o) {
|
|
2030
|
-
const s = r[o].replace(
|
|
2045
|
+
const s = r[o].replace(jn, " "), i = s.indexOf("="), a = Oe(i < 0 ? s : s.slice(0, i)), c = i < 0 ? null : Oe(s.slice(i + 1));
|
|
2031
2046
|
if (a in t) {
|
|
2032
2047
|
let u = t[a];
|
|
2033
|
-
|
|
2048
|
+
H(u) || (u = t[a] = [u]), u.push(c);
|
|
2034
2049
|
} else
|
|
2035
2050
|
t[a] = c;
|
|
2036
2051
|
}
|
|
2037
2052
|
return t;
|
|
2038
2053
|
}
|
|
2039
|
-
function
|
|
2054
|
+
function rn(e) {
|
|
2040
2055
|
let t = "";
|
|
2041
2056
|
for (let n in e) {
|
|
2042
2057
|
const r = e[n];
|
|
2043
|
-
if (n =
|
|
2058
|
+
if (n = po(n), r == null) {
|
|
2044
2059
|
r !== void 0 && (t += (t.length ? "&" : "") + n);
|
|
2045
2060
|
continue;
|
|
2046
2061
|
}
|
|
2047
|
-
(
|
|
2062
|
+
(H(r) ? r.map((s) => s && mt(s)) : [r && mt(r)]).forEach((s) => {
|
|
2048
2063
|
s !== void 0 && (t += (t.length ? "&" : "") + n, s != null && (t += "=" + s));
|
|
2049
2064
|
});
|
|
2050
2065
|
}
|
|
2051
2066
|
return t;
|
|
2052
2067
|
}
|
|
2053
|
-
function
|
|
2068
|
+
function Zo(e) {
|
|
2054
2069
|
const t = {};
|
|
2055
2070
|
for (const n in e) {
|
|
2056
2071
|
const r = e[n];
|
|
2057
|
-
r !== void 0 && (t[n] =
|
|
2072
|
+
r !== void 0 && (t[n] = H(r) ? r.map((o) => o == null ? null : "" + o) : r == null ? r : "" + r);
|
|
2058
2073
|
}
|
|
2059
2074
|
return t;
|
|
2060
2075
|
}
|
|
2061
|
-
const
|
|
2062
|
-
function
|
|
2076
|
+
const es = Symbol(process.env.NODE_ENV !== "production" ? "router view location matched" : ""), on = Symbol(process.env.NODE_ENV !== "production" ? "router view depth" : ""), Pt = Symbol(process.env.NODE_ENV !== "production" ? "router" : ""), qn = Symbol(process.env.NODE_ENV !== "production" ? "route location" : ""), _t = Symbol(process.env.NODE_ENV !== "production" ? "router view location" : "");
|
|
2077
|
+
function ke() {
|
|
2063
2078
|
let e = [];
|
|
2064
2079
|
function t(r) {
|
|
2065
2080
|
return e.push(r), () => {
|
|
@@ -2081,15 +2096,15 @@ function ne(e, t, n, r, o, s = (i) => i()) {
|
|
|
2081
2096
|
(r.enterCallbacks[o] = r.enterCallbacks[o] || []);
|
|
2082
2097
|
return () => new Promise((a, c) => {
|
|
2083
2098
|
const u = (d) => {
|
|
2084
|
-
d === !1 ? c(
|
|
2099
|
+
d === !1 ? c(Ne(4, {
|
|
2085
2100
|
from: n,
|
|
2086
2101
|
to: t
|
|
2087
|
-
})) : d instanceof Error ? c(d) :
|
|
2102
|
+
})) : d instanceof Error ? c(d) : We(d) ? c(Ne(2, {
|
|
2088
2103
|
from: t,
|
|
2089
2104
|
to: d
|
|
2090
2105
|
})) : (i && // since enterCallbackArray is truthy, both record and name also are
|
|
2091
2106
|
r.enterCallbacks[o] === i && typeof d == "function" && i.push(d), a());
|
|
2092
|
-
}, f = s(() => e.call(r && r.instances[o], t, n, process.env.NODE_ENV !== "production" ?
|
|
2107
|
+
}, f = s(() => e.call(r && r.instances[o], t, n, process.env.NODE_ENV !== "production" ? ts(u, t, n) : u));
|
|
2093
2108
|
let l = Promise.resolve(f);
|
|
2094
2109
|
if (e.length < 3 && (l = l.then(u)), process.env.NODE_ENV !== "production" && e.length > 2) {
|
|
2095
2110
|
const d = `The "next" callback was never called inside of ${e.name ? '"' + e.name + '"' : ""}:
|
|
@@ -2105,13 +2120,13 @@ ${e.toString()}
|
|
|
2105
2120
|
l.catch((d) => c(d));
|
|
2106
2121
|
});
|
|
2107
2122
|
}
|
|
2108
|
-
function
|
|
2123
|
+
function ts(e, t, n) {
|
|
2109
2124
|
let r = 0;
|
|
2110
2125
|
return function() {
|
|
2111
2126
|
r++ === 1 && O(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`), e._called = !0, r === 1 && e.apply(null, arguments);
|
|
2112
2127
|
};
|
|
2113
2128
|
}
|
|
2114
|
-
function
|
|
2129
|
+
function ot(e, t, n, r, o = (s) => s()) {
|
|
2115
2130
|
const s = [];
|
|
2116
2131
|
for (const i of e) {
|
|
2117
2132
|
process.env.NODE_ENV !== "production" && !i.components && !i.children.length && O(`Record with path "${i.path}" is either missing a "component(s)" or "children" property.`);
|
|
@@ -2128,16 +2143,16 @@ function nt(e, t, n, r, o = (s) => s()) {
|
|
|
2128
2143
|
!c.__warnedDefineAsync && (c.__warnedDefineAsync = !0, O(`Component "${a}" in record with path "${i.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`));
|
|
2129
2144
|
}
|
|
2130
2145
|
if (!(t !== "beforeRouteEnter" && !i.instances[a]))
|
|
2131
|
-
if (
|
|
2146
|
+
if (Vn(c)) {
|
|
2132
2147
|
const f = (c.__vccOpts || c)[t];
|
|
2133
2148
|
f && s.push(ne(f, n, r, i, a, o));
|
|
2134
2149
|
} else {
|
|
2135
2150
|
let u = c();
|
|
2136
2151
|
process.env.NODE_ENV !== "production" && !("catch" in u) && (O(`Component "${a}" in record with path "${i.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`), u = Promise.resolve(u)), s.push(() => u.then((f) => {
|
|
2137
2152
|
if (!f)
|
|
2138
|
-
|
|
2139
|
-
const l =
|
|
2140
|
-
i.components[a] = l;
|
|
2153
|
+
throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);
|
|
2154
|
+
const l = no(f) ? f.default : f;
|
|
2155
|
+
i.mods[a] = f, i.components[a] = l;
|
|
2141
2156
|
const p = (l.__vccOpts || l)[t];
|
|
2142
2157
|
return p && ne(p, n, r, i, a, o)();
|
|
2143
2158
|
}));
|
|
@@ -2146,15 +2161,12 @@ function nt(e, t, n, r, o = (s) => s()) {
|
|
|
2146
2161
|
}
|
|
2147
2162
|
return s;
|
|
2148
2163
|
}
|
|
2149
|
-
function
|
|
2150
|
-
|
|
2151
|
-
}
|
|
2152
|
-
function nn(e) {
|
|
2153
|
-
const t = de(Nt), n = de(Fn);
|
|
2164
|
+
function sn(e) {
|
|
2165
|
+
const t = pe(Pt), n = pe(qn);
|
|
2154
2166
|
let r = !1, o = null;
|
|
2155
2167
|
const s = z(() => {
|
|
2156
|
-
const f =
|
|
2157
|
-
return process.env.NODE_ENV !== "production" && (!r || f !== o) && (
|
|
2168
|
+
const f = fe(e.to);
|
|
2169
|
+
return process.env.NODE_ENV !== "production" && (!r || f !== o) && (We(f) || (r ? O(`Invalid value for prop "to" in useLink()
|
|
2158
2170
|
- to:`, f, `
|
|
2159
2171
|
- previous to:`, o, `
|
|
2160
2172
|
- props:`, e) : O(`Invalid value for prop "to" in useLink()
|
|
@@ -2167,24 +2179,24 @@ function nn(e) {
|
|
|
2167
2179
|
const b = p.findIndex(se.bind(null, d));
|
|
2168
2180
|
if (b > -1)
|
|
2169
2181
|
return b;
|
|
2170
|
-
const
|
|
2182
|
+
const S = an(f[l - 2]);
|
|
2171
2183
|
return (
|
|
2172
2184
|
// we are dealing with nested routes
|
|
2173
2185
|
l > 1 && // if the parent and matched route have the same path, this link is
|
|
2174
2186
|
// referring to the empty child. Or we currently are on a different
|
|
2175
2187
|
// child of the same parent
|
|
2176
|
-
|
|
2177
|
-
p[p.length - 1].path !==
|
|
2188
|
+
an(d) === S && // avoid comparing the child with its parent
|
|
2189
|
+
p[p.length - 1].path !== S ? p.findIndex(se.bind(null, f[l - 2])) : b
|
|
2178
2190
|
);
|
|
2179
|
-
}), a = z(() => i.value > -1 &&
|
|
2191
|
+
}), a = z(() => i.value > -1 && ss(n.params, s.value.params)), c = z(() => i.value > -1 && i.value === n.matched.length - 1 && Fn(n.params, s.value.params));
|
|
2180
2192
|
function u(f = {}) {
|
|
2181
|
-
return
|
|
2182
|
-
|
|
2193
|
+
return os(f) ? t[fe(e.replace) ? "replace" : "push"](
|
|
2194
|
+
fe(e.to)
|
|
2183
2195
|
// avoid uncaught errors are they are logged anyway
|
|
2184
|
-
).catch(
|
|
2196
|
+
).catch(Re) : Promise.resolve();
|
|
2185
2197
|
}
|
|
2186
2198
|
if (process.env.NODE_ENV !== "production" && Z) {
|
|
2187
|
-
const f =
|
|
2199
|
+
const f = bt();
|
|
2188
2200
|
if (f) {
|
|
2189
2201
|
const l = {
|
|
2190
2202
|
route: s.value,
|
|
@@ -2192,8 +2204,8 @@ function nn(e) {
|
|
|
2192
2204
|
isExactActive: c.value,
|
|
2193
2205
|
error: null
|
|
2194
2206
|
};
|
|
2195
|
-
f.__vrl_devtools = f.__vrl_devtools || [], f.__vrl_devtools.push(l),
|
|
2196
|
-
l.route = s.value, l.isActive = a.value, l.isExactActive = c.value, l.error =
|
|
2207
|
+
f.__vrl_devtools = f.__vrl_devtools || [], f.__vrl_devtools.push(l), Nr(() => {
|
|
2208
|
+
l.route = s.value, l.isActive = a.value, l.isExactActive = c.value, l.error = We(fe(e.to)) ? null : 'Invalid "to" value';
|
|
2197
2209
|
}, { flush: "post" });
|
|
2198
2210
|
}
|
|
2199
2211
|
}
|
|
@@ -2205,7 +2217,7 @@ function nn(e) {
|
|
|
2205
2217
|
navigate: u
|
|
2206
2218
|
};
|
|
2207
2219
|
}
|
|
2208
|
-
const
|
|
2220
|
+
const ns = /* @__PURE__ */ bn({
|
|
2209
2221
|
name: "RouterLink",
|
|
2210
2222
|
compatConfig: { MODE: 3 },
|
|
2211
2223
|
props: {
|
|
@@ -2223,20 +2235,20 @@ const ts = /* @__PURE__ */ yn({
|
|
|
2223
2235
|
default: "page"
|
|
2224
2236
|
}
|
|
2225
2237
|
},
|
|
2226
|
-
useLink:
|
|
2238
|
+
useLink: sn,
|
|
2227
2239
|
setup(e, { slots: t }) {
|
|
2228
|
-
const n =
|
|
2229
|
-
[
|
|
2240
|
+
const n = En(sn(e)), { options: r } = pe(Pt), o = z(() => ({
|
|
2241
|
+
[cn(e.activeClass, r.linkActiveClass, "router-link-active")]: n.isActive,
|
|
2230
2242
|
// [getLinkClass(
|
|
2231
2243
|
// props.inactiveClass,
|
|
2232
2244
|
// options.linkInactiveClass,
|
|
2233
2245
|
// 'router-link-inactive'
|
|
2234
2246
|
// )]: !link.isExactActive,
|
|
2235
|
-
[
|
|
2247
|
+
[cn(e.exactActiveClass, r.linkExactActiveClass, "router-link-exact-active")]: n.isExactActive
|
|
2236
2248
|
}));
|
|
2237
2249
|
return () => {
|
|
2238
2250
|
const s = t.default && t.default(n);
|
|
2239
|
-
return e.custom ? s :
|
|
2251
|
+
return e.custom ? s : wn("a", {
|
|
2240
2252
|
"aria-current": n.isExactActive ? e.ariaCurrentValue : null,
|
|
2241
2253
|
href: n.href,
|
|
2242
2254
|
// this would override user added attrs but Vue will still add
|
|
@@ -2246,8 +2258,8 @@ const ts = /* @__PURE__ */ yn({
|
|
|
2246
2258
|
}, s);
|
|
2247
2259
|
};
|
|
2248
2260
|
}
|
|
2249
|
-
}),
|
|
2250
|
-
function
|
|
2261
|
+
}), rs = ns;
|
|
2262
|
+
function os(e) {
|
|
2251
2263
|
if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && !(e.button !== void 0 && e.button !== 0)) {
|
|
2252
2264
|
if (e.currentTarget && e.currentTarget.getAttribute) {
|
|
2253
2265
|
const t = e.currentTarget.getAttribute("target");
|
|
@@ -2257,21 +2269,21 @@ function rs(e) {
|
|
|
2257
2269
|
return e.preventDefault && e.preventDefault(), !0;
|
|
2258
2270
|
}
|
|
2259
2271
|
}
|
|
2260
|
-
function
|
|
2272
|
+
function ss(e, t) {
|
|
2261
2273
|
for (const n in t) {
|
|
2262
2274
|
const r = t[n], o = e[n];
|
|
2263
2275
|
if (typeof r == "string") {
|
|
2264
2276
|
if (r !== o)
|
|
2265
2277
|
return !1;
|
|
2266
|
-
} else if (!
|
|
2278
|
+
} else if (!H(o) || o.length !== r.length || r.some((s, i) => s !== o[i]))
|
|
2267
2279
|
return !1;
|
|
2268
2280
|
}
|
|
2269
2281
|
return !0;
|
|
2270
2282
|
}
|
|
2271
|
-
function
|
|
2283
|
+
function an(e) {
|
|
2272
2284
|
return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
|
|
2273
2285
|
}
|
|
2274
|
-
const
|
|
2286
|
+
const cn = (e, t, n) => e ?? t ?? n, is = /* @__PURE__ */ bn({
|
|
2275
2287
|
name: "RouterView",
|
|
2276
2288
|
// #674 we manually inherit them
|
|
2277
2289
|
inheritAttrs: !1,
|
|
@@ -2286,59 +2298,59 @@ const on = (e, t, n) => e ?? t ?? n, ss = /* @__PURE__ */ yn({
|
|
|
2286
2298
|
// https://github.com/vuejs/router/issues/1315
|
|
2287
2299
|
compatConfig: { MODE: 3 },
|
|
2288
2300
|
setup(e, { attrs: t, slots: n }) {
|
|
2289
|
-
process.env.NODE_ENV !== "production" &&
|
|
2290
|
-
const r =
|
|
2291
|
-
let u =
|
|
2301
|
+
process.env.NODE_ENV !== "production" && cs();
|
|
2302
|
+
const r = pe(_t), o = z(() => e.route || r.value), s = pe(on, 0), i = z(() => {
|
|
2303
|
+
let u = fe(s);
|
|
2292
2304
|
const { matched: f } = o.value;
|
|
2293
2305
|
let l;
|
|
2294
2306
|
for (; (l = f[u]) && !l.components; )
|
|
2295
2307
|
u++;
|
|
2296
2308
|
return u;
|
|
2297
2309
|
}), a = z(() => o.value.matched[i.value]);
|
|
2298
|
-
|
|
2310
|
+
Ze(on, z(() => i.value + 1)), Ze(es, a), Ze(_t, o);
|
|
2299
2311
|
const c = oe();
|
|
2300
|
-
return
|
|
2312
|
+
return Me(() => [c.value, a.value, e.name], ([u, f, l], [d, p, b]) => {
|
|
2301
2313
|
f && (f.instances[l] = u, p && p !== f && u && u === d && (f.leaveGuards.size || (f.leaveGuards = p.leaveGuards), f.updateGuards.size || (f.updateGuards = p.updateGuards))), u && f && // if there is no instance but to and from are the same this might be
|
|
2302
2314
|
// the first visit
|
|
2303
|
-
(!p || !se(f, p) || !d) && (f.enterCallbacks[l] || []).forEach((
|
|
2315
|
+
(!p || !se(f, p) || !d) && (f.enterCallbacks[l] || []).forEach((S) => S(u));
|
|
2304
2316
|
}, { flush: "post" }), () => {
|
|
2305
2317
|
const u = o.value, f = e.name, l = a.value, d = l && l.components[f];
|
|
2306
2318
|
if (!d)
|
|
2307
|
-
return
|
|
2308
|
-
const p = l.props[f], b = p ? p === !0 ? u.params : typeof p == "function" ? p(u) : p : null,
|
|
2309
|
-
onVnodeUnmounted: (
|
|
2310
|
-
|
|
2319
|
+
return un(n.default, { Component: d, route: u });
|
|
2320
|
+
const p = l.props[f], b = p ? p === !0 ? u.params : typeof p == "function" ? p(u) : p : null, E = wn(d, C({}, b, t, {
|
|
2321
|
+
onVnodeUnmounted: (R) => {
|
|
2322
|
+
R.component.isUnmounted && (l.instances[f] = null);
|
|
2311
2323
|
},
|
|
2312
2324
|
ref: c
|
|
2313
2325
|
}));
|
|
2314
|
-
if (process.env.NODE_ENV !== "production" && Z &&
|
|
2315
|
-
const
|
|
2326
|
+
if (process.env.NODE_ENV !== "production" && Z && E.ref) {
|
|
2327
|
+
const R = {
|
|
2316
2328
|
depth: i.value,
|
|
2317
2329
|
name: l.name,
|
|
2318
2330
|
path: l.path,
|
|
2319
2331
|
meta: l.meta
|
|
2320
2332
|
};
|
|
2321
|
-
(
|
|
2322
|
-
P.__vrv_devtools =
|
|
2333
|
+
(H(E.ref) ? E.ref.map((P) => P.i) : [E.ref.i]).forEach((P) => {
|
|
2334
|
+
P.__vrv_devtools = R;
|
|
2323
2335
|
});
|
|
2324
2336
|
}
|
|
2325
2337
|
return (
|
|
2326
2338
|
// pass the vnode to the slot as a prop.
|
|
2327
2339
|
// h and <component :is="..."> both accept vnodes
|
|
2328
|
-
|
|
2340
|
+
un(n.default, { Component: E, route: u }) || E
|
|
2329
2341
|
);
|
|
2330
2342
|
};
|
|
2331
2343
|
}
|
|
2332
2344
|
});
|
|
2333
|
-
function
|
|
2345
|
+
function un(e, t) {
|
|
2334
2346
|
if (!e)
|
|
2335
2347
|
return null;
|
|
2336
2348
|
const n = e(t);
|
|
2337
2349
|
return n.length === 1 ? n[0] : n;
|
|
2338
2350
|
}
|
|
2339
|
-
const
|
|
2340
|
-
function
|
|
2341
|
-
const e =
|
|
2351
|
+
const as = is;
|
|
2352
|
+
function cs() {
|
|
2353
|
+
const e = bt(), t = e.parent && e.parent.type.name, n = e.parent && e.parent.subTree && e.parent.subTree.type;
|
|
2342
2354
|
if (t && (t === "KeepAlive" || t.includes("Transition")) && typeof n == "object" && n.name === "RouterView") {
|
|
2343
2355
|
const r = t === "KeepAlive" ? "keep-alive" : "transition";
|
|
2344
2356
|
O(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
|
|
@@ -2351,10 +2363,10 @@ Use slot props instead:
|
|
|
2351
2363
|
</router-view>`);
|
|
2352
2364
|
}
|
|
2353
2365
|
}
|
|
2354
|
-
function
|
|
2355
|
-
const n =
|
|
2366
|
+
function Pe(e, t) {
|
|
2367
|
+
const n = C({}, e, {
|
|
2356
2368
|
// remove variables that can contain vue instances
|
|
2357
|
-
matched: e.matched.map((r) =>
|
|
2369
|
+
matched: e.matched.map((r) => _s(r, ["instances", "children", "aliasOf"]))
|
|
2358
2370
|
});
|
|
2359
2371
|
return {
|
|
2360
2372
|
_custom: {
|
|
@@ -2366,20 +2378,20 @@ function ke(e, t) {
|
|
|
2366
2378
|
}
|
|
2367
2379
|
};
|
|
2368
2380
|
}
|
|
2369
|
-
function
|
|
2381
|
+
function Le(e) {
|
|
2370
2382
|
return {
|
|
2371
2383
|
_custom: {
|
|
2372
2384
|
display: e
|
|
2373
2385
|
}
|
|
2374
2386
|
};
|
|
2375
2387
|
}
|
|
2376
|
-
let
|
|
2377
|
-
function
|
|
2388
|
+
let us = 0;
|
|
2389
|
+
function ls(e, t, n) {
|
|
2378
2390
|
if (t.__hasDevtools)
|
|
2379
2391
|
return;
|
|
2380
2392
|
t.__hasDevtools = !0;
|
|
2381
|
-
const r =
|
|
2382
|
-
|
|
2393
|
+
const r = us++;
|
|
2394
|
+
St({
|
|
2383
2395
|
id: "org.vuejs.router" + (r ? "." + r : ""),
|
|
2384
2396
|
label: "Vue Router",
|
|
2385
2397
|
packageName: "vue-router",
|
|
@@ -2393,7 +2405,7 @@ function us(e, t, n) {
|
|
|
2393
2405
|
type: "Routing",
|
|
2394
2406
|
key: "$route",
|
|
2395
2407
|
editable: !1,
|
|
2396
|
-
value:
|
|
2408
|
+
value: Pe(t.currentRoute.value, "Current Route")
|
|
2397
2409
|
});
|
|
2398
2410
|
}), o.on.visitComponentTree(({ treeNode: f, componentInstance: l }) => {
|
|
2399
2411
|
if (l.__vrv_devtools) {
|
|
@@ -2402,19 +2414,19 @@ function us(e, t, n) {
|
|
|
2402
2414
|
label: (d.name ? `${d.name.toString()}: ` : "") + d.path,
|
|
2403
2415
|
textColor: 0,
|
|
2404
2416
|
tooltip: "This component is rendered by <router-view>",
|
|
2405
|
-
backgroundColor:
|
|
2417
|
+
backgroundColor: Jn
|
|
2406
2418
|
});
|
|
2407
2419
|
}
|
|
2408
|
-
|
|
2409
|
-
let p = d.route.path, b =
|
|
2410
|
-
d.error ? (p = d.error, b =
|
|
2420
|
+
H(l.__vrl_devtools) && (l.__devtoolsApi = o, l.__vrl_devtools.forEach((d) => {
|
|
2421
|
+
let p = d.route.path, b = Yn, S = "", E = 0;
|
|
2422
|
+
d.error ? (p = d.error, b = ms, E = gs) : d.isExactActive ? (b = Qn, S = "This is exactly active") : d.isActive && (b = Kn, S = "This link is active"), f.tags.push({
|
|
2411
2423
|
label: p,
|
|
2412
|
-
textColor:
|
|
2413
|
-
tooltip:
|
|
2424
|
+
textColor: E,
|
|
2425
|
+
tooltip: S,
|
|
2414
2426
|
backgroundColor: b
|
|
2415
2427
|
});
|
|
2416
2428
|
}));
|
|
2417
|
-
}),
|
|
2429
|
+
}), Me(t.currentRoute, () => {
|
|
2418
2430
|
c(), o.notifyComponentUpdate(), o.sendInspectorTree(a), o.sendInspectorState(a);
|
|
2419
2431
|
});
|
|
2420
2432
|
const s = "router:navigations:" + r;
|
|
@@ -2438,9 +2450,9 @@ function us(e, t, n) {
|
|
|
2438
2450
|
let i = 0;
|
|
2439
2451
|
t.beforeEach((f, l) => {
|
|
2440
2452
|
const d = {
|
|
2441
|
-
guard:
|
|
2442
|
-
from:
|
|
2443
|
-
to:
|
|
2453
|
+
guard: Le("beforeEach"),
|
|
2454
|
+
from: Pe(l, "Current Location during this navigation"),
|
|
2455
|
+
to: Pe(f, "Target location")
|
|
2444
2456
|
};
|
|
2445
2457
|
Object.defineProperty(f.meta, "__navigationId", {
|
|
2446
2458
|
value: i++
|
|
@@ -2456,7 +2468,7 @@ function us(e, t, n) {
|
|
|
2456
2468
|
});
|
|
2457
2469
|
}), t.afterEach((f, l, d) => {
|
|
2458
2470
|
const p = {
|
|
2459
|
-
guard:
|
|
2471
|
+
guard: Le("afterEach")
|
|
2460
2472
|
};
|
|
2461
2473
|
d ? (p.failure = {
|
|
2462
2474
|
_custom: {
|
|
@@ -2466,7 +2478,7 @@ function us(e, t, n) {
|
|
|
2466
2478
|
tooltip: "Navigation Failure",
|
|
2467
2479
|
value: d
|
|
2468
2480
|
}
|
|
2469
|
-
}, p.status =
|
|
2481
|
+
}, p.status = Le("❌")) : p.status = Le("✅"), p.from = Pe(l, "Current Location during this navigation"), p.to = Pe(f, "Target location"), o.addTimelineEvent({
|
|
2470
2482
|
layerId: s,
|
|
2471
2483
|
event: {
|
|
2472
2484
|
title: "End of navigation",
|
|
@@ -2492,10 +2504,10 @@ function us(e, t, n) {
|
|
|
2492
2504
|
let l = n.getRoutes().filter((d) => !d.parent || // these routes have a parent with no component which will not appear in the view
|
|
2493
2505
|
// therefore we still need to include them
|
|
2494
2506
|
!d.parent.record.components);
|
|
2495
|
-
l.forEach(
|
|
2507
|
+
l.forEach(er), f.filter && (l = l.filter((d) => (
|
|
2496
2508
|
// save matches state based on the payload
|
|
2497
|
-
|
|
2498
|
-
))), l.forEach((d) =>
|
|
2509
|
+
Et(d, f.filter.toLowerCase())
|
|
2510
|
+
))), l.forEach((d) => Zn(d, t.currentRoute.value)), f.rootNodes = l.map(Xn);
|
|
2499
2511
|
}
|
|
2500
2512
|
let u;
|
|
2501
2513
|
o.on.getInspectorTree((f) => {
|
|
@@ -2504,16 +2516,16 @@ function us(e, t, n) {
|
|
|
2504
2516
|
if (f.app === e && f.inspectorId === a) {
|
|
2505
2517
|
const d = n.getRoutes().find((p) => p.record.__vd_id === f.nodeId);
|
|
2506
2518
|
d && (f.state = {
|
|
2507
|
-
options:
|
|
2519
|
+
options: ds(d)
|
|
2508
2520
|
});
|
|
2509
2521
|
}
|
|
2510
2522
|
}), o.sendInspectorTree(a), o.sendInspectorState(a);
|
|
2511
2523
|
});
|
|
2512
2524
|
}
|
|
2513
|
-
function
|
|
2525
|
+
function fs(e) {
|
|
2514
2526
|
return e.optional ? e.repeatable ? "*" : "?" : e.repeatable ? "+" : "";
|
|
2515
2527
|
}
|
|
2516
|
-
function
|
|
2528
|
+
function ds(e) {
|
|
2517
2529
|
const { record: t } = e, n = [
|
|
2518
2530
|
{ editable: !1, key: "path", value: t.path }
|
|
2519
2531
|
];
|
|
@@ -2528,7 +2540,7 @@ function fs(e) {
|
|
|
2528
2540
|
_custom: {
|
|
2529
2541
|
type: null,
|
|
2530
2542
|
readOnly: !0,
|
|
2531
|
-
display: e.keys.map((r) => `${r.name}${
|
|
2543
|
+
display: e.keys.map((r) => `${r.name}${fs(r)}`).join(" "),
|
|
2532
2544
|
tooltip: "Param keys",
|
|
2533
2545
|
value: e.keys
|
|
2534
2546
|
}
|
|
@@ -2559,171 +2571,171 @@ function fs(e) {
|
|
|
2559
2571
|
}
|
|
2560
2572
|
}), n;
|
|
2561
2573
|
}
|
|
2562
|
-
const
|
|
2563
|
-
function
|
|
2574
|
+
const Jn = 15485081, Kn = 2450411, Qn = 8702998, hs = 2282478, Yn = 16486972, ps = 6710886, ms = 16704226, gs = 12131356;
|
|
2575
|
+
function Xn(e) {
|
|
2564
2576
|
const t = [], { record: n } = e;
|
|
2565
2577
|
n.name != null && t.push({
|
|
2566
2578
|
label: String(n.name),
|
|
2567
2579
|
textColor: 0,
|
|
2568
|
-
backgroundColor:
|
|
2580
|
+
backgroundColor: hs
|
|
2569
2581
|
}), n.aliasOf && t.push({
|
|
2570
2582
|
label: "alias",
|
|
2571
2583
|
textColor: 0,
|
|
2572
|
-
backgroundColor:
|
|
2584
|
+
backgroundColor: Yn
|
|
2573
2585
|
}), e.__vd_match && t.push({
|
|
2574
2586
|
label: "matches",
|
|
2575
2587
|
textColor: 0,
|
|
2576
|
-
backgroundColor:
|
|
2588
|
+
backgroundColor: Jn
|
|
2577
2589
|
}), e.__vd_exactActive && t.push({
|
|
2578
2590
|
label: "exact",
|
|
2579
2591
|
textColor: 0,
|
|
2580
|
-
backgroundColor:
|
|
2592
|
+
backgroundColor: Qn
|
|
2581
2593
|
}), e.__vd_active && t.push({
|
|
2582
2594
|
label: "active",
|
|
2583
2595
|
textColor: 0,
|
|
2584
|
-
backgroundColor:
|
|
2596
|
+
backgroundColor: Kn
|
|
2585
2597
|
}), n.redirect && t.push({
|
|
2586
2598
|
label: typeof n.redirect == "string" ? `redirect: ${n.redirect}` : "redirects",
|
|
2587
2599
|
textColor: 16777215,
|
|
2588
|
-
backgroundColor:
|
|
2600
|
+
backgroundColor: ps
|
|
2589
2601
|
});
|
|
2590
2602
|
let r = n.__vd_id;
|
|
2591
|
-
return r == null && (r = String(
|
|
2603
|
+
return r == null && (r = String(vs++), n.__vd_id = r), {
|
|
2592
2604
|
id: r,
|
|
2593
2605
|
label: n.path,
|
|
2594
2606
|
tags: t,
|
|
2595
|
-
children: e.children.map(
|
|
2607
|
+
children: e.children.map(Xn)
|
|
2596
2608
|
};
|
|
2597
2609
|
}
|
|
2598
|
-
let
|
|
2599
|
-
const
|
|
2600
|
-
function
|
|
2610
|
+
let vs = 0;
|
|
2611
|
+
const ys = /^\/(.*)\/([a-z]*)$/;
|
|
2612
|
+
function Zn(e, t) {
|
|
2601
2613
|
const n = t.matched.length && se(t.matched[t.matched.length - 1], e.record);
|
|
2602
|
-
e.__vd_exactActive = e.__vd_active = n, n || (e.__vd_active = t.matched.some((r) => se(r, e.record))), e.children.forEach((r) =>
|
|
2614
|
+
e.__vd_exactActive = e.__vd_active = n, n || (e.__vd_active = t.matched.some((r) => se(r, e.record))), e.children.forEach((r) => Zn(r, t));
|
|
2603
2615
|
}
|
|
2604
|
-
function
|
|
2605
|
-
e.__vd_match = !1, e.children.forEach(
|
|
2616
|
+
function er(e) {
|
|
2617
|
+
e.__vd_match = !1, e.children.forEach(er);
|
|
2606
2618
|
}
|
|
2607
|
-
function
|
|
2608
|
-
const n = String(e.re).match(
|
|
2619
|
+
function Et(e, t) {
|
|
2620
|
+
const n = String(e.re).match(ys);
|
|
2609
2621
|
if (e.__vd_match = !1, !n || n.length < 3)
|
|
2610
2622
|
return !1;
|
|
2611
2623
|
if (new RegExp(n[1].replace(/\$$/, ""), n[2]).test(t))
|
|
2612
|
-
return e.children.forEach((i) =>
|
|
2613
|
-
const o = e.record.path.toLowerCase(), s =
|
|
2614
|
-
return !t.startsWith("/") && (s.includes(t) || o.includes(t)) || s.startsWith(t) || o.startsWith(t) || e.record.name && String(e.record.name).includes(t) ? !0 : e.children.some((i) =>
|
|
2624
|
+
return e.children.forEach((i) => Et(i, t)), e.record.path !== "/" || t === "/" ? (e.__vd_match = e.re.test(t), !0) : !1;
|
|
2625
|
+
const o = e.record.path.toLowerCase(), s = Oe(o);
|
|
2626
|
+
return !t.startsWith("/") && (s.includes(t) || o.includes(t)) || s.startsWith(t) || o.startsWith(t) || e.record.name && String(e.record.name).includes(t) ? !0 : e.children.some((i) => Et(i, t));
|
|
2615
2627
|
}
|
|
2616
|
-
function
|
|
2628
|
+
function _s(e, t) {
|
|
2617
2629
|
const n = {};
|
|
2618
2630
|
for (const r in e)
|
|
2619
2631
|
t.includes(r) || (n[r] = e[r]);
|
|
2620
2632
|
return n;
|
|
2621
2633
|
}
|
|
2622
|
-
function
|
|
2623
|
-
const t =
|
|
2634
|
+
function Es(e) {
|
|
2635
|
+
const t = Go(e.routes, e), n = e.parseQuery || Xo, r = e.stringifyQuery || rn, o = e.history;
|
|
2624
2636
|
if (process.env.NODE_ENV !== "production" && !o)
|
|
2625
|
-
throw new Error('Provide the "history" option when calling "createRouter()": https://
|
|
2626
|
-
const s =
|
|
2637
|
+
throw new Error('Provide the "history" option when calling "createRouter()": https://router.vuejs.org/api/interfaces/RouterOptions.html#history');
|
|
2638
|
+
const s = ke(), i = ke(), a = ke(), c = Sr(te);
|
|
2627
2639
|
let u = te;
|
|
2628
2640
|
Z && e.scrollBehavior && "scrollRestoration" in history && (history.scrollRestoration = "manual");
|
|
2629
|
-
const f =
|
|
2641
|
+
const f = nt.bind(null, (h) => "" + h), l = nt.bind(null, go), d = (
|
|
2630
2642
|
// @ts-expect-error: intentionally avoid the type check
|
|
2631
|
-
|
|
2643
|
+
nt.bind(null, Oe)
|
|
2632
2644
|
);
|
|
2633
2645
|
function p(h, g) {
|
|
2634
2646
|
let m, _;
|
|
2635
|
-
return
|
|
2647
|
+
return Gn(h) ? (m = t.getRecordMatcher(h), process.env.NODE_ENV !== "production" && !m && O(`Parent route "${String(h)}" not found when adding child route`, g), _ = g) : _ = h, t.addRoute(_, m);
|
|
2636
2648
|
}
|
|
2637
2649
|
function b(h) {
|
|
2638
2650
|
const g = t.getRecordMatcher(h);
|
|
2639
2651
|
g ? t.removeRoute(g) : process.env.NODE_ENV !== "production" && O(`Cannot remove non-existent route "${String(h)}"`);
|
|
2640
2652
|
}
|
|
2641
|
-
function
|
|
2653
|
+
function S() {
|
|
2642
2654
|
return t.getRoutes().map((h) => h.record);
|
|
2643
2655
|
}
|
|
2644
|
-
function
|
|
2656
|
+
function E(h) {
|
|
2645
2657
|
return !!t.getRecordMatcher(h);
|
|
2646
2658
|
}
|
|
2647
|
-
function
|
|
2648
|
-
if (g =
|
|
2649
|
-
const
|
|
2650
|
-
return process.env.NODE_ENV !== "production" && (
|
|
2659
|
+
function R(h, g) {
|
|
2660
|
+
if (g = C({}, g || c.value), typeof h == "string") {
|
|
2661
|
+
const N = rt(n, h, g.path), T = t.resolve({ path: N.path }, g), ce = o.createHref(N.fullPath);
|
|
2662
|
+
return process.env.NODE_ENV !== "production" && (ce.startsWith("//") ? O(`Location "${h}" resolved to "${ce}". A resolved location cannot start with multiple slashes.`) : T.matched.length || O(`No match found for location with path "${h}"`)), C(N, T, {
|
|
2651
2663
|
params: d(T.params),
|
|
2652
|
-
hash:
|
|
2664
|
+
hash: Oe(N.hash),
|
|
2653
2665
|
redirectedFrom: void 0,
|
|
2654
|
-
href:
|
|
2666
|
+
href: ce
|
|
2655
2667
|
});
|
|
2656
2668
|
}
|
|
2657
|
-
if (process.env.NODE_ENV !== "production" && !
|
|
2669
|
+
if (process.env.NODE_ENV !== "production" && !We(h))
|
|
2658
2670
|
return O(`router.resolve() was passed an invalid location. This will fail in production.
|
|
2659
|
-
- Location:`, h),
|
|
2671
|
+
- Location:`, h), R({});
|
|
2660
2672
|
let m;
|
|
2661
2673
|
if (h.path != null)
|
|
2662
2674
|
process.env.NODE_ENV !== "production" && "params" in h && !("name" in h) && // @ts-expect-error: the type is never
|
|
2663
|
-
Object.keys(h.params).length && O(`Path "${h.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`), m =
|
|
2664
|
-
path:
|
|
2675
|
+
Object.keys(h.params).length && O(`Path "${h.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`), m = C({}, h, {
|
|
2676
|
+
path: rt(n, h.path, g.path).path
|
|
2665
2677
|
});
|
|
2666
2678
|
else {
|
|
2667
|
-
const
|
|
2668
|
-
for (const T in
|
|
2669
|
-
|
|
2670
|
-
m =
|
|
2671
|
-
params: l(
|
|
2679
|
+
const N = C({}, h.params);
|
|
2680
|
+
for (const T in N)
|
|
2681
|
+
N[T] == null && delete N[T];
|
|
2682
|
+
m = C({}, h, {
|
|
2683
|
+
params: l(N)
|
|
2672
2684
|
}), g.params = l(g.params);
|
|
2673
2685
|
}
|
|
2674
|
-
const _ = t.resolve(m, g),
|
|
2675
|
-
process.env.NODE_ENV !== "production" &&
|
|
2676
|
-
const D =
|
|
2677
|
-
hash:
|
|
2686
|
+
const _ = t.resolve(m, g), I = h.hash || "";
|
|
2687
|
+
process.env.NODE_ENV !== "production" && I && !I.startsWith("#") && O(`A \`hash\` should always start with the character "#". Replace "${I}" with "#${I}".`), _.params = f(d(_.params));
|
|
2688
|
+
const D = _o(r, C({}, h, {
|
|
2689
|
+
hash: ho(I),
|
|
2678
2690
|
path: _.path
|
|
2679
2691
|
})), $ = o.createHref(D);
|
|
2680
|
-
return process.env.NODE_ENV !== "production" && ($.startsWith("//") ? O(`Location "${h}" resolved to "${$}". A resolved location cannot start with multiple slashes.`) : _.matched.length || O(`No match found for location with path "${h.path != null ? h.path : h}"`)),
|
|
2692
|
+
return process.env.NODE_ENV !== "production" && ($.startsWith("//") ? O(`Location "${h}" resolved to "${$}". A resolved location cannot start with multiple slashes.`) : _.matched.length || O(`No match found for location with path "${h.path != null ? h.path : h}"`)), C({
|
|
2681
2693
|
fullPath: D,
|
|
2682
2694
|
// keep the hash encoded so fullPath is effectively path + encodedQuery +
|
|
2683
2695
|
// hash
|
|
2684
|
-
hash:
|
|
2696
|
+
hash: I,
|
|
2685
2697
|
query: (
|
|
2686
2698
|
// if the user is using a custom query lib like qs, we might have
|
|
2687
2699
|
// nested objects, so we keep the query as is, meaning it can contain
|
|
2688
2700
|
// numbers at `$route.query`, but at the point, the user will have to
|
|
2689
2701
|
// use their own type anyway.
|
|
2690
2702
|
// https://github.com/vuejs/router/issues/328#issuecomment-649481567
|
|
2691
|
-
r ===
|
|
2703
|
+
r === rn ? Zo(h.query) : h.query || {}
|
|
2692
2704
|
)
|
|
2693
2705
|
}, _, {
|
|
2694
2706
|
redirectedFrom: void 0,
|
|
2695
2707
|
href: $
|
|
2696
2708
|
});
|
|
2697
2709
|
}
|
|
2698
|
-
function
|
|
2699
|
-
return typeof h == "string" ?
|
|
2710
|
+
function k(h) {
|
|
2711
|
+
return typeof h == "string" ? rt(n, h, c.value.path) : C({}, h);
|
|
2700
2712
|
}
|
|
2701
2713
|
function P(h, g) {
|
|
2702
2714
|
if (u !== h)
|
|
2703
|
-
return
|
|
2715
|
+
return Ne(8, {
|
|
2704
2716
|
from: g,
|
|
2705
2717
|
to: h
|
|
2706
2718
|
});
|
|
2707
2719
|
}
|
|
2708
|
-
function
|
|
2720
|
+
function M(h) {
|
|
2709
2721
|
return w(h);
|
|
2710
2722
|
}
|
|
2711
|
-
function
|
|
2712
|
-
return
|
|
2723
|
+
function B(h) {
|
|
2724
|
+
return M(C(k(h), { replace: !0 }));
|
|
2713
2725
|
}
|
|
2714
2726
|
function q(h) {
|
|
2715
2727
|
const g = h.matched[h.matched.length - 1];
|
|
2716
2728
|
if (g && g.redirect) {
|
|
2717
2729
|
const { redirect: m } = g;
|
|
2718
2730
|
let _ = typeof m == "function" ? m(h) : m;
|
|
2719
|
-
if (typeof _ == "string" && (_ = _.includes("?") || _.includes("#") ? _ =
|
|
2731
|
+
if (typeof _ == "string" && (_ = _.includes("?") || _.includes("#") ? _ = k(_) : (
|
|
2720
2732
|
// force empty params
|
|
2721
2733
|
{ path: _ }
|
|
2722
2734
|
), _.params = {}), process.env.NODE_ENV !== "production" && _.path == null && !("name" in _))
|
|
2723
2735
|
throw O(`Invalid redirect found:
|
|
2724
2736
|
${JSON.stringify(_, null, 2)}
|
|
2725
2737
|
when navigating to "${h.fullPath}". A redirect must contain a name or path. This will break in production.`), new Error("Invalid redirect");
|
|
2726
|
-
return
|
|
2738
|
+
return C({
|
|
2727
2739
|
query: h.query,
|
|
2728
2740
|
hash: h.hash,
|
|
2729
2741
|
// avoid transferring params if the redirect has a path
|
|
@@ -2732,11 +2744,11 @@ ${JSON.stringify(_, null, 2)}
|
|
|
2732
2744
|
}
|
|
2733
2745
|
}
|
|
2734
2746
|
function w(h, g) {
|
|
2735
|
-
const m = u =
|
|
2736
|
-
if (
|
|
2747
|
+
const m = u = R(h), _ = c.value, I = h.state, D = h.force, $ = h.replace === !0, N = q(m);
|
|
2748
|
+
if (N)
|
|
2737
2749
|
return w(
|
|
2738
|
-
|
|
2739
|
-
state: typeof
|
|
2750
|
+
C(k(N), {
|
|
2751
|
+
state: typeof N == "object" ? C({}, I, N.state) : I,
|
|
2740
2752
|
force: D,
|
|
2741
2753
|
replace: $
|
|
2742
2754
|
}),
|
|
@@ -2745,8 +2757,8 @@ ${JSON.stringify(_, null, 2)}
|
|
|
2745
2757
|
);
|
|
2746
2758
|
const T = m;
|
|
2747
2759
|
T.redirectedFrom = g;
|
|
2748
|
-
let
|
|
2749
|
-
return !D &&
|
|
2760
|
+
let ce;
|
|
2761
|
+
return !D && zt(r, _, m) && (ce = Ne(16, { to: T, from: _ }), Vt(
|
|
2750
2762
|
_,
|
|
2751
2763
|
_,
|
|
2752
2764
|
// this is a push, the only way for it to be triggered from a
|
|
@@ -2755,25 +2767,25 @@ ${JSON.stringify(_, null, 2)}
|
|
|
2755
2767
|
// This cannot be the first navigation because the initial location
|
|
2756
2768
|
// cannot be manually navigated to
|
|
2757
2769
|
!1
|
|
2758
|
-
)), (
|
|
2770
|
+
)), (ce ? Promise.resolve(ce) : y(T, _)).catch((U) => X(U) ? (
|
|
2759
2771
|
// navigation redirects still mark the router as ready
|
|
2760
2772
|
X(
|
|
2761
|
-
|
|
2773
|
+
U,
|
|
2762
2774
|
2
|
|
2763
2775
|
/* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
|
|
2764
|
-
) ?
|
|
2776
|
+
) ? U : Ke(U)
|
|
2765
2777
|
) : (
|
|
2766
2778
|
// reject any unknown error
|
|
2767
|
-
|
|
2768
|
-
)).then((
|
|
2769
|
-
if (
|
|
2779
|
+
Q(U, T, _)
|
|
2780
|
+
)).then((U) => {
|
|
2781
|
+
if (U) {
|
|
2770
2782
|
if (X(
|
|
2771
|
-
|
|
2783
|
+
U,
|
|
2772
2784
|
2
|
|
2773
2785
|
/* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
|
|
2774
2786
|
))
|
|
2775
2787
|
return process.env.NODE_ENV !== "production" && // we are redirecting to the same location we were already at
|
|
2776
|
-
|
|
2788
|
+
zt(r, R(U.to), T) && // and we have done it a couple of times
|
|
2777
2789
|
g && // @ts-expect-error: added only in dev
|
|
2778
2790
|
(g._count = g._count ? (
|
|
2779
2791
|
// @ts-expect-error
|
|
@@ -2781,96 +2793,96 @@ ${JSON.stringify(_, null, 2)}
|
|
|
2781
2793
|
) : 1) > 30 ? (O(`Detected a possibly infinite redirection in a navigation guard when going from "${_.fullPath}" to "${T.fullPath}". Aborting to avoid a Stack Overflow.
|
|
2782
2794
|
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`), Promise.reject(new Error("Infinite redirect in navigation guard"))) : w(
|
|
2783
2795
|
// keep options
|
|
2784
|
-
|
|
2796
|
+
C({
|
|
2785
2797
|
// preserve an existing replacement but allow the redirect to override it
|
|
2786
2798
|
replace: $
|
|
2787
|
-
},
|
|
2788
|
-
state: typeof
|
|
2799
|
+
}, k(U.to), {
|
|
2800
|
+
state: typeof U.to == "object" ? C({}, I, U.to.state) : I,
|
|
2789
2801
|
force: D
|
|
2790
2802
|
}),
|
|
2791
2803
|
// preserve the original redirectedFrom if any
|
|
2792
2804
|
g || T
|
|
2793
2805
|
);
|
|
2794
2806
|
} else
|
|
2795
|
-
|
|
2796
|
-
return
|
|
2807
|
+
U = A(T, _, !0, $, I);
|
|
2808
|
+
return v(T, _, U), U;
|
|
2797
2809
|
});
|
|
2798
2810
|
}
|
|
2799
|
-
function
|
|
2811
|
+
function Mt(h, g) {
|
|
2800
2812
|
const m = P(h, g);
|
|
2801
2813
|
return m ? Promise.reject(m) : Promise.resolve();
|
|
2802
2814
|
}
|
|
2803
2815
|
function G(h) {
|
|
2804
|
-
const g =
|
|
2816
|
+
const g = xe.values().next().value;
|
|
2805
2817
|
return g && typeof g.runWithContext == "function" ? g.runWithContext(h) : h();
|
|
2806
2818
|
}
|
|
2807
|
-
function
|
|
2819
|
+
function y(h, g) {
|
|
2808
2820
|
let m;
|
|
2809
|
-
const [_,
|
|
2810
|
-
m =
|
|
2811
|
-
for (const
|
|
2812
|
-
|
|
2821
|
+
const [_, I, D] = bs(h, g);
|
|
2822
|
+
m = ot(_.reverse(), "beforeRouteLeave", h, g);
|
|
2823
|
+
for (const N of _)
|
|
2824
|
+
N.leaveGuards.forEach((T) => {
|
|
2813
2825
|
m.push(ne(T, h, g));
|
|
2814
2826
|
});
|
|
2815
|
-
const $ =
|
|
2816
|
-
return m.push($),
|
|
2827
|
+
const $ = Mt.bind(null, h, g);
|
|
2828
|
+
return m.push($), ve(m).then(() => {
|
|
2817
2829
|
m = [];
|
|
2818
|
-
for (const
|
|
2819
|
-
m.push(ne(
|
|
2820
|
-
return m.push($),
|
|
2830
|
+
for (const N of s.list())
|
|
2831
|
+
m.push(ne(N, h, g));
|
|
2832
|
+
return m.push($), ve(m);
|
|
2821
2833
|
}).then(() => {
|
|
2822
|
-
m =
|
|
2823
|
-
for (const
|
|
2824
|
-
|
|
2834
|
+
m = ot(I, "beforeRouteUpdate", h, g);
|
|
2835
|
+
for (const N of I)
|
|
2836
|
+
N.updateGuards.forEach((T) => {
|
|
2825
2837
|
m.push(ne(T, h, g));
|
|
2826
2838
|
});
|
|
2827
|
-
return m.push($),
|
|
2839
|
+
return m.push($), ve(m);
|
|
2828
2840
|
}).then(() => {
|
|
2829
2841
|
m = [];
|
|
2830
|
-
for (const
|
|
2831
|
-
if (
|
|
2832
|
-
if (
|
|
2833
|
-
for (const T of
|
|
2842
|
+
for (const N of D)
|
|
2843
|
+
if (N.beforeEnter)
|
|
2844
|
+
if (H(N.beforeEnter))
|
|
2845
|
+
for (const T of N.beforeEnter)
|
|
2834
2846
|
m.push(ne(T, h, g));
|
|
2835
2847
|
else
|
|
2836
|
-
m.push(ne(
|
|
2837
|
-
return m.push($),
|
|
2838
|
-
}).then(() => (h.matched.forEach((
|
|
2848
|
+
m.push(ne(N.beforeEnter, h, g));
|
|
2849
|
+
return m.push($), ve(m);
|
|
2850
|
+
}).then(() => (h.matched.forEach((N) => N.enterCallbacks = {}), m = ot(D, "beforeRouteEnter", h, g, G), m.push($), ve(m))).then(() => {
|
|
2839
2851
|
m = [];
|
|
2840
|
-
for (const
|
|
2841
|
-
m.push(ne(
|
|
2842
|
-
return m.push($),
|
|
2843
|
-
}).catch((
|
|
2844
|
-
|
|
2852
|
+
for (const N of i.list())
|
|
2853
|
+
m.push(ne(N, h, g));
|
|
2854
|
+
return m.push($), ve(m);
|
|
2855
|
+
}).catch((N) => X(
|
|
2856
|
+
N,
|
|
2845
2857
|
8
|
|
2846
2858
|
/* ErrorTypes.NAVIGATION_CANCELLED */
|
|
2847
|
-
) ?
|
|
2859
|
+
) ? N : Promise.reject(N));
|
|
2848
2860
|
}
|
|
2849
|
-
function
|
|
2861
|
+
function v(h, g, m) {
|
|
2850
2862
|
a.list().forEach((_) => G(() => _(h, g, m)));
|
|
2851
2863
|
}
|
|
2852
|
-
function A(h, g, m, _,
|
|
2864
|
+
function A(h, g, m, _, I) {
|
|
2853
2865
|
const D = P(h, g);
|
|
2854
2866
|
if (D)
|
|
2855
2867
|
return D;
|
|
2856
|
-
const $ = g === te,
|
|
2857
|
-
m && (_ || $ ? o.replace(h.fullPath,
|
|
2858
|
-
scroll: $ &&
|
|
2859
|
-
},
|
|
2868
|
+
const $ = g === te, N = Z ? history.state : {};
|
|
2869
|
+
m && (_ || $ ? o.replace(h.fullPath, C({
|
|
2870
|
+
scroll: $ && N && N.scroll
|
|
2871
|
+
}, I)) : o.push(h.fullPath, I)), c.value = h, Vt(h, g, m, $), Ke();
|
|
2860
2872
|
}
|
|
2861
|
-
let
|
|
2873
|
+
let V;
|
|
2862
2874
|
function ie() {
|
|
2863
|
-
|
|
2864
|
-
if (!
|
|
2875
|
+
V || (V = o.listen((h, g, m) => {
|
|
2876
|
+
if (!xt.listening)
|
|
2865
2877
|
return;
|
|
2866
|
-
const _ =
|
|
2867
|
-
if (
|
|
2868
|
-
w(I
|
|
2878
|
+
const _ = R(h), I = q(_);
|
|
2879
|
+
if (I) {
|
|
2880
|
+
w(C(I, { replace: !0 }), _).catch(Re);
|
|
2869
2881
|
return;
|
|
2870
2882
|
}
|
|
2871
2883
|
u = _;
|
|
2872
2884
|
const D = c.value;
|
|
2873
|
-
Z &&
|
|
2885
|
+
Z && Po(Jt(D.fullPath, m.delta), ze()), y(_, D).catch(($) => X(
|
|
2874
2886
|
$,
|
|
2875
2887
|
12
|
|
2876
2888
|
/* ErrorTypes.NAVIGATION_CANCELLED */
|
|
@@ -2882,13 +2894,13 @@ ${JSON.stringify(_, null, 2)}
|
|
|
2882
2894
|
$.to,
|
|
2883
2895
|
_
|
|
2884
2896
|
// avoid an uncaught rejection, let push call triggerError
|
|
2885
|
-
).then((
|
|
2897
|
+
).then((N) => {
|
|
2886
2898
|
X(
|
|
2887
|
-
|
|
2899
|
+
N,
|
|
2888
2900
|
20
|
|
2889
2901
|
/* ErrorTypes.NAVIGATION_DUPLICATED */
|
|
2890
|
-
) && !m.delta && m.type ===
|
|
2891
|
-
}).catch(
|
|
2902
|
+
) && !m.delta && m.type === De.pop && o.go(-1, !1);
|
|
2903
|
+
}).catch(Re), Promise.reject()) : (m.delta && o.go(-m.delta, !1), Q($, _, D))).then(($) => {
|
|
2892
2904
|
$ = $ || A(
|
|
2893
2905
|
// after navigation, all matched components are resolved
|
|
2894
2906
|
_,
|
|
@@ -2900,86 +2912,86 @@ ${JSON.stringify(_, null, 2)}
|
|
|
2900
2912
|
$,
|
|
2901
2913
|
8
|
|
2902
2914
|
/* ErrorTypes.NAVIGATION_CANCELLED */
|
|
2903
|
-
) ? o.go(-m.delta, !1) : m.type ===
|
|
2915
|
+
) ? o.go(-m.delta, !1) : m.type === De.pop && X(
|
|
2904
2916
|
$,
|
|
2905
2917
|
20
|
|
2906
2918
|
/* ErrorTypes.NAVIGATION_DUPLICATED */
|
|
2907
|
-
) && o.go(-1, !1)),
|
|
2908
|
-
}).catch(
|
|
2919
|
+
) && o.go(-1, !1)), v(_, D, $);
|
|
2920
|
+
}).catch(Re);
|
|
2909
2921
|
}));
|
|
2910
2922
|
}
|
|
2911
|
-
let
|
|
2912
|
-
function
|
|
2913
|
-
|
|
2914
|
-
const _ =
|
|
2915
|
-
return _.length ? _.forEach((
|
|
2923
|
+
let ae = ke(), Ve = ke(), ge;
|
|
2924
|
+
function Q(h, g, m) {
|
|
2925
|
+
Ke(h);
|
|
2926
|
+
const _ = Ve.list();
|
|
2927
|
+
return _.length ? _.forEach((I) => I(h, g, m)) : (process.env.NODE_ENV !== "production" && O("uncaught error during route navigation:"), console.error(h)), Promise.reject(h);
|
|
2916
2928
|
}
|
|
2917
|
-
function
|
|
2918
|
-
return
|
|
2919
|
-
|
|
2929
|
+
function F() {
|
|
2930
|
+
return ge && c.value !== te ? Promise.resolve() : new Promise((h, g) => {
|
|
2931
|
+
ae.add([h, g]);
|
|
2920
2932
|
});
|
|
2921
2933
|
}
|
|
2922
|
-
function
|
|
2923
|
-
return
|
|
2934
|
+
function Ke(h) {
|
|
2935
|
+
return ge || (ge = !h, ie(), ae.list().forEach(([g, m]) => h ? m(h) : g()), ae.reset()), h;
|
|
2924
2936
|
}
|
|
2925
|
-
function
|
|
2926
|
-
const { scrollBehavior:
|
|
2927
|
-
if (!Z || !
|
|
2937
|
+
function Vt(h, g, m, _) {
|
|
2938
|
+
const { scrollBehavior: I } = e;
|
|
2939
|
+
if (!Z || !I)
|
|
2928
2940
|
return Promise.resolve();
|
|
2929
|
-
const D = !m &&
|
|
2930
|
-
return
|
|
2941
|
+
const D = !m && $o(Jt(h.fullPath, 0)) || (_ || !m) && history.state && history.state.scroll || null;
|
|
2942
|
+
return ct().then(() => I(h, g, D)).then(($) => $ && ko($)).catch(($) => Q($, h, g));
|
|
2931
2943
|
}
|
|
2932
|
-
const
|
|
2933
|
-
let
|
|
2934
|
-
const
|
|
2944
|
+
const Qe = (h) => o.go(h);
|
|
2945
|
+
let Ye;
|
|
2946
|
+
const xe = /* @__PURE__ */ new Set(), xt = {
|
|
2935
2947
|
currentRoute: c,
|
|
2936
2948
|
listening: !0,
|
|
2937
2949
|
addRoute: p,
|
|
2938
2950
|
removeRoute: b,
|
|
2939
2951
|
clearRoutes: t.clearRoutes,
|
|
2940
|
-
hasRoute:
|
|
2941
|
-
getRoutes:
|
|
2942
|
-
resolve:
|
|
2952
|
+
hasRoute: E,
|
|
2953
|
+
getRoutes: S,
|
|
2954
|
+
resolve: R,
|
|
2943
2955
|
options: e,
|
|
2944
|
-
push:
|
|
2945
|
-
replace:
|
|
2946
|
-
go:
|
|
2947
|
-
back: () =>
|
|
2948
|
-
forward: () =>
|
|
2956
|
+
push: M,
|
|
2957
|
+
replace: B,
|
|
2958
|
+
go: Qe,
|
|
2959
|
+
back: () => Qe(-1),
|
|
2960
|
+
forward: () => Qe(1),
|
|
2949
2961
|
beforeEach: s.add,
|
|
2950
2962
|
beforeResolve: i.add,
|
|
2951
2963
|
afterEach: a.add,
|
|
2952
|
-
onError:
|
|
2953
|
-
isReady:
|
|
2964
|
+
onError: Ve.add,
|
|
2965
|
+
isReady: F,
|
|
2954
2966
|
install(h) {
|
|
2955
2967
|
const g = this;
|
|
2956
|
-
h.component("RouterLink",
|
|
2968
|
+
h.component("RouterLink", rs), h.component("RouterView", as), h.config.globalProperties.$router = g, Object.defineProperty(h.config.globalProperties, "$route", {
|
|
2957
2969
|
enumerable: !0,
|
|
2958
|
-
get: () =>
|
|
2970
|
+
get: () => fe(c)
|
|
2959
2971
|
}), Z && // used for the initial navigation client side to avoid pushing
|
|
2960
2972
|
// multiple times when the router is used in multiple apps
|
|
2961
|
-
!
|
|
2962
|
-
process.env.NODE_ENV !== "production" && O("Unexpected error when starting the router:",
|
|
2973
|
+
!Ye && c.value === te && (Ye = !0, M(o.location).catch((I) => {
|
|
2974
|
+
process.env.NODE_ENV !== "production" && O("Unexpected error when starting the router:", I);
|
|
2963
2975
|
}));
|
|
2964
2976
|
const m = {};
|
|
2965
|
-
for (const
|
|
2966
|
-
Object.defineProperty(m,
|
|
2967
|
-
get: () => c.value[
|
|
2977
|
+
for (const I in te)
|
|
2978
|
+
Object.defineProperty(m, I, {
|
|
2979
|
+
get: () => c.value[I],
|
|
2968
2980
|
enumerable: !0
|
|
2969
2981
|
});
|
|
2970
|
-
h.provide(
|
|
2982
|
+
h.provide(Pt, g), h.provide(qn, Or(m)), h.provide(_t, c);
|
|
2971
2983
|
const _ = h.unmount;
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
}, process.env.NODE_ENV !== "production" && Z &&
|
|
2984
|
+
xe.add(h), h.unmount = function() {
|
|
2985
|
+
xe.delete(h), xe.size < 1 && (u = te, V && V(), V = null, c.value = te, Ye = !1, ge = !1), _();
|
|
2986
|
+
}, process.env.NODE_ENV !== "production" && Z && ls(h, g, t);
|
|
2975
2987
|
}
|
|
2976
2988
|
};
|
|
2977
|
-
function
|
|
2989
|
+
function ve(h) {
|
|
2978
2990
|
return h.reduce((g, m) => g.then(() => G(m)), Promise.resolve());
|
|
2979
2991
|
}
|
|
2980
|
-
return
|
|
2992
|
+
return xt;
|
|
2981
2993
|
}
|
|
2982
|
-
function
|
|
2994
|
+
function bs(e, t) {
|
|
2983
2995
|
const n = [], r = [], o = [], s = Math.max(t.matched.length, e.matched.length);
|
|
2984
2996
|
for (let i = 0; i < s; i++) {
|
|
2985
2997
|
const a = t.matched[i];
|
|
@@ -2989,36 +3001,36 @@ function Es(e, t) {
|
|
|
2989
3001
|
}
|
|
2990
3002
|
return [n, r, o];
|
|
2991
3003
|
}
|
|
2992
|
-
const
|
|
2993
|
-
history:
|
|
3004
|
+
const ws = Es({
|
|
3005
|
+
history: Ao(),
|
|
2994
3006
|
routes: []
|
|
2995
3007
|
});
|
|
2996
|
-
function
|
|
3008
|
+
function Ss(e) {
|
|
2997
3009
|
return e && typeof e.then == "function";
|
|
2998
3010
|
}
|
|
2999
3011
|
Promise.resolve(!1);
|
|
3000
3012
|
Promise.resolve(!0);
|
|
3001
|
-
var
|
|
3002
|
-
function
|
|
3013
|
+
var he = Promise.resolve();
|
|
3014
|
+
function tr(e, t) {
|
|
3003
3015
|
return e || (e = 0), new Promise(function(n) {
|
|
3004
3016
|
return setTimeout(function() {
|
|
3005
3017
|
return n(t);
|
|
3006
3018
|
}, e);
|
|
3007
3019
|
});
|
|
3008
3020
|
}
|
|
3009
|
-
function
|
|
3021
|
+
function Os(e, t) {
|
|
3010
3022
|
return Math.floor(Math.random() * (t - e + 1) + e);
|
|
3011
3023
|
}
|
|
3012
|
-
function
|
|
3024
|
+
function $t() {
|
|
3013
3025
|
return Math.random().toString(36).substring(2);
|
|
3014
3026
|
}
|
|
3015
|
-
var
|
|
3016
|
-
function
|
|
3027
|
+
var ln = 0, st = 0;
|
|
3028
|
+
function qe() {
|
|
3017
3029
|
var e = (/* @__PURE__ */ new Date()).getTime();
|
|
3018
|
-
return e ===
|
|
3030
|
+
return e === ln ? (st++, e * 1e3 + st) : (ln = e, st = 0, e * 1e3);
|
|
3019
3031
|
}
|
|
3020
|
-
var
|
|
3021
|
-
function
|
|
3032
|
+
var Ns = qe, ks = "native";
|
|
3033
|
+
function Ps(e) {
|
|
3022
3034
|
var t = {
|
|
3023
3035
|
messagesCallback: null,
|
|
3024
3036
|
bc: new BroadcastChannel(e),
|
|
@@ -3029,20 +3041,20 @@ function Ns(e) {
|
|
|
3029
3041
|
t.messagesCallback && t.messagesCallback(n.data);
|
|
3030
3042
|
}, t;
|
|
3031
3043
|
}
|
|
3032
|
-
function
|
|
3044
|
+
function $s(e) {
|
|
3033
3045
|
e.bc.close(), e.subFns = [];
|
|
3034
3046
|
}
|
|
3035
|
-
function
|
|
3047
|
+
function Rs(e, t) {
|
|
3036
3048
|
try {
|
|
3037
|
-
return e.bc.postMessage(t, !1),
|
|
3049
|
+
return e.bc.postMessage(t, !1), he;
|
|
3038
3050
|
} catch (n) {
|
|
3039
3051
|
return Promise.reject(n);
|
|
3040
3052
|
}
|
|
3041
3053
|
}
|
|
3042
|
-
function
|
|
3054
|
+
function Is(e, t) {
|
|
3043
3055
|
e.messagesCallback = t;
|
|
3044
3056
|
}
|
|
3045
|
-
function
|
|
3057
|
+
function Cs() {
|
|
3046
3058
|
if (typeof window > "u")
|
|
3047
3059
|
return !1;
|
|
3048
3060
|
if (typeof BroadcastChannel == "function") {
|
|
@@ -3052,19 +3064,19 @@ function Is() {
|
|
|
3052
3064
|
} else
|
|
3053
3065
|
return !1;
|
|
3054
3066
|
}
|
|
3055
|
-
function
|
|
3067
|
+
function As() {
|
|
3056
3068
|
return 150;
|
|
3057
3069
|
}
|
|
3058
|
-
var
|
|
3059
|
-
create:
|
|
3060
|
-
close:
|
|
3061
|
-
onMessage:
|
|
3062
|
-
postMessage:
|
|
3063
|
-
canBeUsed:
|
|
3070
|
+
var Ts = {
|
|
3071
|
+
create: Ps,
|
|
3072
|
+
close: $s,
|
|
3073
|
+
onMessage: Is,
|
|
3074
|
+
postMessage: Rs,
|
|
3075
|
+
canBeUsed: Cs,
|
|
3064
3076
|
type: ks,
|
|
3065
|
-
averageResponseTime:
|
|
3066
|
-
microSeconds:
|
|
3067
|
-
},
|
|
3077
|
+
averageResponseTime: As,
|
|
3078
|
+
microSeconds: Ns
|
|
3079
|
+
}, nr = (
|
|
3068
3080
|
/** @class */
|
|
3069
3081
|
function() {
|
|
3070
3082
|
function e(t) {
|
|
@@ -3074,16 +3086,16 @@ var As = {
|
|
|
3074
3086
|
return this.map.has(t);
|
|
3075
3087
|
}, e.prototype.add = function(t) {
|
|
3076
3088
|
var n = this;
|
|
3077
|
-
this.map.set(t,
|
|
3078
|
-
n._to = !1,
|
|
3089
|
+
this.map.set(t, rr()), this._to || (this._to = !0, setTimeout(function() {
|
|
3090
|
+
n._to = !1, Ds(n);
|
|
3079
3091
|
}, 0));
|
|
3080
3092
|
}, e.prototype.clear = function() {
|
|
3081
3093
|
this.map.clear();
|
|
3082
3094
|
}, e;
|
|
3083
3095
|
}()
|
|
3084
3096
|
);
|
|
3085
|
-
function
|
|
3086
|
-
for (var t =
|
|
3097
|
+
function Ds(e) {
|
|
3098
|
+
for (var t = rr() - e.ttl, n = e.map[Symbol.iterator](); ; ) {
|
|
3087
3099
|
var r = n.next().value;
|
|
3088
3100
|
if (!r)
|
|
3089
3101
|
return;
|
|
@@ -3094,17 +3106,17 @@ function Ts(e) {
|
|
|
3094
3106
|
return;
|
|
3095
3107
|
}
|
|
3096
3108
|
}
|
|
3097
|
-
function
|
|
3109
|
+
function rr() {
|
|
3098
3110
|
return (/* @__PURE__ */ new Date()).getTime();
|
|
3099
3111
|
}
|
|
3100
|
-
function
|
|
3112
|
+
function Rt() {
|
|
3101
3113
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = JSON.parse(JSON.stringify(e));
|
|
3102
3114
|
return typeof t.webWorkerSupport > "u" && (t.webWorkerSupport = !0), t.idb || (t.idb = {}), t.idb.ttl || (t.idb.ttl = 1e3 * 45), t.idb.fallbackInterval || (t.idb.fallbackInterval = 150), e.idb && typeof e.idb.onclose == "function" && (t.idb.onclose = e.idb.onclose), t.localstorage || (t.localstorage = {}), t.localstorage.removeTimeout || (t.localstorage.removeTimeout = 1e3 * 60), e.methods && (t.methods = e.methods), t.node || (t.node = {}), t.node.ttl || (t.node.ttl = 1e3 * 60 * 2), t.node.maxParallelWrites || (t.node.maxParallelWrites = 2048), typeof t.node.useFastPath > "u" && (t.node.useFastPath = !0), t;
|
|
3103
3115
|
}
|
|
3104
|
-
var
|
|
3116
|
+
var Ms = qe, Vs = "pubkey.broadcast-channel-0-", ee = "messages", Je = {
|
|
3105
3117
|
durability: "relaxed"
|
|
3106
|
-
},
|
|
3107
|
-
function
|
|
3118
|
+
}, xs = "idb";
|
|
3119
|
+
function or() {
|
|
3108
3120
|
if (typeof indexedDB < "u") return indexedDB;
|
|
3109
3121
|
if (typeof window < "u") {
|
|
3110
3122
|
if (typeof window.mozIndexedDB < "u") return window.mozIndexedDB;
|
|
@@ -3113,11 +3125,11 @@ function er() {
|
|
|
3113
3125
|
}
|
|
3114
3126
|
return !1;
|
|
3115
3127
|
}
|
|
3116
|
-
function
|
|
3128
|
+
function It(e) {
|
|
3117
3129
|
e.commit && e.commit();
|
|
3118
3130
|
}
|
|
3119
|
-
function
|
|
3120
|
-
var t =
|
|
3131
|
+
function js(e) {
|
|
3132
|
+
var t = or(), n = Vs + e, r = t.open(n);
|
|
3121
3133
|
return r.onupgradeneeded = function(o) {
|
|
3122
3134
|
var s = o.target.result;
|
|
3123
3135
|
s.createObjectStore(ee, {
|
|
@@ -3132,12 +3144,12 @@ function xs(e) {
|
|
|
3132
3144
|
};
|
|
3133
3145
|
});
|
|
3134
3146
|
}
|
|
3135
|
-
function
|
|
3147
|
+
function Ls(e, t, n) {
|
|
3136
3148
|
var r = (/* @__PURE__ */ new Date()).getTime(), o = {
|
|
3137
3149
|
uuid: t,
|
|
3138
3150
|
time: r,
|
|
3139
3151
|
data: n
|
|
3140
|
-
}, s = e.transaction([ee], "readwrite",
|
|
3152
|
+
}, s = e.transaction([ee], "readwrite", Je);
|
|
3141
3153
|
return new Promise(function(i, a) {
|
|
3142
3154
|
s.oncomplete = function() {
|
|
3143
3155
|
return i();
|
|
@@ -3145,11 +3157,11 @@ function js(e, t, n) {
|
|
|
3145
3157
|
return a(u);
|
|
3146
3158
|
};
|
|
3147
3159
|
var c = s.objectStore(ee);
|
|
3148
|
-
c.add(o),
|
|
3160
|
+
c.add(o), It(s);
|
|
3149
3161
|
});
|
|
3150
3162
|
}
|
|
3151
|
-
function
|
|
3152
|
-
var n = e.transaction(ee, "readonly",
|
|
3163
|
+
function Bs(e, t) {
|
|
3164
|
+
var n = e.transaction(ee, "readonly", Je), r = n.objectStore(ee), o = [], s = IDBKeyRange.bound(t + 1, 1 / 0);
|
|
3153
3165
|
if (r.getAll) {
|
|
3154
3166
|
var i = r.getAll(s);
|
|
3155
3167
|
return new Promise(function(c, u) {
|
|
@@ -3173,14 +3185,14 @@ function Ls(e, t) {
|
|
|
3173
3185
|
return u(l);
|
|
3174
3186
|
}, f.onsuccess = function(l) {
|
|
3175
3187
|
var d = l.target.result;
|
|
3176
|
-
d ? d.value.id < t + 1 ? d.continue(t + 1) : (o.push(d.value), d.continue()) : (
|
|
3188
|
+
d ? d.value.id < t + 1 ? d.continue(t + 1) : (o.push(d.value), d.continue()) : (It(n), c(o));
|
|
3177
3189
|
};
|
|
3178
3190
|
});
|
|
3179
3191
|
}
|
|
3180
|
-
function
|
|
3192
|
+
function Us(e, t) {
|
|
3181
3193
|
if (e.closed)
|
|
3182
3194
|
return Promise.resolve([]);
|
|
3183
|
-
var n = e.db.transaction(ee, "readwrite",
|
|
3195
|
+
var n = e.db.transaction(ee, "readwrite", Je), r = n.objectStore(ee);
|
|
3184
3196
|
return Promise.all(t.map(function(o) {
|
|
3185
3197
|
var s = r.delete(o);
|
|
3186
3198
|
return new Promise(function(i) {
|
|
@@ -3190,107 +3202,107 @@ function Bs(e, t) {
|
|
|
3190
3202
|
});
|
|
3191
3203
|
}));
|
|
3192
3204
|
}
|
|
3193
|
-
function
|
|
3194
|
-
var n = (/* @__PURE__ */ new Date()).getTime() - t, r = e.transaction(ee, "readonly",
|
|
3205
|
+
function Fs(e, t) {
|
|
3206
|
+
var n = (/* @__PURE__ */ new Date()).getTime() - t, r = e.transaction(ee, "readonly", Je), o = r.objectStore(ee), s = [];
|
|
3195
3207
|
return new Promise(function(i) {
|
|
3196
3208
|
o.openCursor().onsuccess = function(a) {
|
|
3197
3209
|
var c = a.target.result;
|
|
3198
3210
|
if (c) {
|
|
3199
3211
|
var u = c.value;
|
|
3200
|
-
u.time < n ? (s.push(u), c.continue()) : (
|
|
3212
|
+
u.time < n ? (s.push(u), c.continue()) : (It(r), i(s));
|
|
3201
3213
|
} else
|
|
3202
3214
|
i(s);
|
|
3203
3215
|
};
|
|
3204
3216
|
});
|
|
3205
3217
|
}
|
|
3206
3218
|
function Hs(e) {
|
|
3207
|
-
return
|
|
3208
|
-
return
|
|
3219
|
+
return Fs(e.db, e.options.idb.ttl).then(function(t) {
|
|
3220
|
+
return Us(e, t.map(function(n) {
|
|
3209
3221
|
return n.id;
|
|
3210
3222
|
}));
|
|
3211
3223
|
});
|
|
3212
3224
|
}
|
|
3213
|
-
function
|
|
3214
|
-
return t =
|
|
3225
|
+
function Gs(e, t) {
|
|
3226
|
+
return t = Rt(t), js(e).then(function(n) {
|
|
3215
3227
|
var r = {
|
|
3216
3228
|
closed: !1,
|
|
3217
3229
|
lastCursorId: 0,
|
|
3218
3230
|
channelName: e,
|
|
3219
3231
|
options: t,
|
|
3220
|
-
uuid:
|
|
3232
|
+
uuid: $t(),
|
|
3221
3233
|
/**
|
|
3222
3234
|
* emittedMessagesIds
|
|
3223
3235
|
* contains all messages that have been emitted before
|
|
3224
3236
|
* @type {ObliviousSet}
|
|
3225
3237
|
*/
|
|
3226
|
-
eMIs: new
|
|
3238
|
+
eMIs: new nr(t.idb.ttl * 2),
|
|
3227
3239
|
// ensures we do not read messages in parallel
|
|
3228
|
-
writeBlockPromise:
|
|
3240
|
+
writeBlockPromise: he,
|
|
3229
3241
|
messagesCallback: null,
|
|
3230
3242
|
readQueuePromises: [],
|
|
3231
3243
|
db: n
|
|
3232
3244
|
};
|
|
3233
3245
|
return n.onclose = function() {
|
|
3234
3246
|
r.closed = !0, t.idb.onclose && t.idb.onclose();
|
|
3235
|
-
},
|
|
3247
|
+
}, sr(r), r;
|
|
3236
3248
|
});
|
|
3237
3249
|
}
|
|
3238
|
-
function
|
|
3239
|
-
e.closed ||
|
|
3240
|
-
return
|
|
3250
|
+
function sr(e) {
|
|
3251
|
+
e.closed || ir(e).then(function() {
|
|
3252
|
+
return tr(e.options.idb.fallbackInterval);
|
|
3241
3253
|
}).then(function() {
|
|
3242
|
-
return
|
|
3254
|
+
return sr(e);
|
|
3243
3255
|
});
|
|
3244
3256
|
}
|
|
3245
|
-
function
|
|
3257
|
+
function Ws(e, t) {
|
|
3246
3258
|
return !(e.uuid === t.uuid || t.eMIs.has(e.id) || e.data.time < t.messagesCallbackTime);
|
|
3247
3259
|
}
|
|
3248
|
-
function
|
|
3249
|
-
return e.closed || !e.messagesCallback ?
|
|
3260
|
+
function ir(e) {
|
|
3261
|
+
return e.closed || !e.messagesCallback ? he : Bs(e.db, e.lastCursorId).then(function(t) {
|
|
3250
3262
|
var n = t.filter(function(r) {
|
|
3251
3263
|
return !!r;
|
|
3252
3264
|
}).map(function(r) {
|
|
3253
3265
|
return r.id > e.lastCursorId && (e.lastCursorId = r.id), r;
|
|
3254
3266
|
}).filter(function(r) {
|
|
3255
|
-
return
|
|
3267
|
+
return Ws(r, e);
|
|
3256
3268
|
}).sort(function(r, o) {
|
|
3257
3269
|
return r.time - o.time;
|
|
3258
3270
|
});
|
|
3259
3271
|
return n.forEach(function(r) {
|
|
3260
3272
|
e.messagesCallback && (e.eMIs.add(r.id), e.messagesCallback(r.data));
|
|
3261
|
-
}),
|
|
3273
|
+
}), he;
|
|
3262
3274
|
});
|
|
3263
3275
|
}
|
|
3264
|
-
function
|
|
3276
|
+
function zs(e) {
|
|
3265
3277
|
e.closed = !0, e.db.close();
|
|
3266
3278
|
}
|
|
3267
|
-
function
|
|
3279
|
+
function qs(e, t) {
|
|
3268
3280
|
return e.writeBlockPromise = e.writeBlockPromise.then(function() {
|
|
3269
|
-
return
|
|
3281
|
+
return Ls(e.db, e.uuid, t);
|
|
3270
3282
|
}).then(function() {
|
|
3271
|
-
|
|
3283
|
+
Os(0, 10) === 0 && Hs(e);
|
|
3272
3284
|
}), e.writeBlockPromise;
|
|
3273
3285
|
}
|
|
3274
|
-
function
|
|
3275
|
-
e.messagesCallbackTime = n, e.messagesCallback = t,
|
|
3286
|
+
function Js(e, t, n) {
|
|
3287
|
+
e.messagesCallbackTime = n, e.messagesCallback = t, ir(e);
|
|
3276
3288
|
}
|
|
3277
|
-
function
|
|
3278
|
-
return !!
|
|
3289
|
+
function Ks() {
|
|
3290
|
+
return !!or();
|
|
3279
3291
|
}
|
|
3280
|
-
function
|
|
3292
|
+
function Qs(e) {
|
|
3281
3293
|
return e.idb.fallbackInterval * 2;
|
|
3282
3294
|
}
|
|
3283
|
-
var
|
|
3284
|
-
create:
|
|
3285
|
-
close:
|
|
3286
|
-
onMessage:
|
|
3287
|
-
postMessage:
|
|
3288
|
-
canBeUsed:
|
|
3289
|
-
type:
|
|
3290
|
-
averageResponseTime:
|
|
3291
|
-
microSeconds:
|
|
3292
|
-
},
|
|
3293
|
-
function
|
|
3295
|
+
var Ys = {
|
|
3296
|
+
create: Gs,
|
|
3297
|
+
close: zs,
|
|
3298
|
+
onMessage: Js,
|
|
3299
|
+
postMessage: qs,
|
|
3300
|
+
canBeUsed: Ks,
|
|
3301
|
+
type: xs,
|
|
3302
|
+
averageResponseTime: Qs,
|
|
3303
|
+
microSeconds: Ms
|
|
3304
|
+
}, Xs = qe, Zs = "pubkey.broadcastChannel-", ei = "localstorage";
|
|
3305
|
+
function ar() {
|
|
3294
3306
|
var e;
|
|
3295
3307
|
if (typeof window > "u") return null;
|
|
3296
3308
|
try {
|
|
@@ -3299,54 +3311,54 @@ function rr() {
|
|
|
3299
3311
|
}
|
|
3300
3312
|
return e;
|
|
3301
3313
|
}
|
|
3302
|
-
function
|
|
3303
|
-
return
|
|
3314
|
+
function cr(e) {
|
|
3315
|
+
return Zs + e;
|
|
3304
3316
|
}
|
|
3305
|
-
function
|
|
3317
|
+
function ti(e, t) {
|
|
3306
3318
|
return new Promise(function(n) {
|
|
3307
|
-
|
|
3308
|
-
var r =
|
|
3309
|
-
token:
|
|
3319
|
+
tr().then(function() {
|
|
3320
|
+
var r = cr(e.channelName), o = {
|
|
3321
|
+
token: $t(),
|
|
3310
3322
|
time: (/* @__PURE__ */ new Date()).getTime(),
|
|
3311
3323
|
data: t,
|
|
3312
3324
|
uuid: e.uuid
|
|
3313
3325
|
}, s = JSON.stringify(o);
|
|
3314
|
-
|
|
3326
|
+
ar().setItem(r, s);
|
|
3315
3327
|
var i = document.createEvent("Event");
|
|
3316
3328
|
i.initEvent("storage", !0, !0), i.key = r, i.newValue = s, window.dispatchEvent(i), n();
|
|
3317
3329
|
});
|
|
3318
3330
|
});
|
|
3319
3331
|
}
|
|
3320
|
-
function
|
|
3321
|
-
var n =
|
|
3332
|
+
function ni(e, t) {
|
|
3333
|
+
var n = cr(e), r = function(s) {
|
|
3322
3334
|
s.key === n && t(JSON.parse(s.newValue));
|
|
3323
3335
|
};
|
|
3324
3336
|
return window.addEventListener("storage", r), r;
|
|
3325
3337
|
}
|
|
3326
|
-
function
|
|
3338
|
+
function ri(e) {
|
|
3327
3339
|
window.removeEventListener("storage", e);
|
|
3328
3340
|
}
|
|
3329
|
-
function
|
|
3330
|
-
if (t =
|
|
3341
|
+
function oi(e, t) {
|
|
3342
|
+
if (t = Rt(t), !ur())
|
|
3331
3343
|
throw new Error("BroadcastChannel: localstorage cannot be used");
|
|
3332
|
-
var n =
|
|
3344
|
+
var n = $t(), r = new nr(t.localstorage.removeTimeout), o = {
|
|
3333
3345
|
channelName: e,
|
|
3334
3346
|
uuid: n,
|
|
3335
3347
|
eMIs: r
|
|
3336
3348
|
// emittedMessagesIds
|
|
3337
3349
|
};
|
|
3338
|
-
return o.listener =
|
|
3350
|
+
return o.listener = ni(e, function(s) {
|
|
3339
3351
|
o.messagesCallback && s.uuid !== n && (!s.token || r.has(s.token) || s.data.time && s.data.time < o.messagesCallbackTime || (r.add(s.token), o.messagesCallback(s.data)));
|
|
3340
3352
|
}), o;
|
|
3341
3353
|
}
|
|
3342
|
-
function
|
|
3343
|
-
|
|
3354
|
+
function si(e) {
|
|
3355
|
+
ri(e.listener);
|
|
3344
3356
|
}
|
|
3345
|
-
function
|
|
3357
|
+
function ii(e, t, n) {
|
|
3346
3358
|
e.messagesCallbackTime = n, e.messagesCallback = t;
|
|
3347
3359
|
}
|
|
3348
|
-
function
|
|
3349
|
-
var e =
|
|
3360
|
+
function ur() {
|
|
3361
|
+
var e = ar();
|
|
3350
3362
|
if (!e) return !1;
|
|
3351
3363
|
try {
|
|
3352
3364
|
var t = "__broadcastchannel_check";
|
|
@@ -3356,34 +3368,34 @@ function sr() {
|
|
|
3356
3368
|
}
|
|
3357
3369
|
return !0;
|
|
3358
3370
|
}
|
|
3359
|
-
function
|
|
3371
|
+
function ai() {
|
|
3360
3372
|
var e = 120, t = navigator.userAgent.toLowerCase();
|
|
3361
3373
|
return t.includes("safari") && !t.includes("chrome") ? e * 2 : e;
|
|
3362
3374
|
}
|
|
3363
|
-
var
|
|
3364
|
-
create:
|
|
3365
|
-
close:
|
|
3366
|
-
onMessage:
|
|
3367
|
-
postMessage:
|
|
3368
|
-
canBeUsed:
|
|
3369
|
-
type:
|
|
3370
|
-
averageResponseTime:
|
|
3371
|
-
microSeconds:
|
|
3372
|
-
},
|
|
3373
|
-
function
|
|
3375
|
+
var ci = {
|
|
3376
|
+
create: oi,
|
|
3377
|
+
close: si,
|
|
3378
|
+
onMessage: ii,
|
|
3379
|
+
postMessage: ti,
|
|
3380
|
+
canBeUsed: ur,
|
|
3381
|
+
type: ei,
|
|
3382
|
+
averageResponseTime: ai,
|
|
3383
|
+
microSeconds: Xs
|
|
3384
|
+
}, ui = qe, li = "simulate", Ct = /* @__PURE__ */ new Set();
|
|
3385
|
+
function fi(e) {
|
|
3374
3386
|
var t = {
|
|
3375
3387
|
name: e,
|
|
3376
3388
|
messagesCallback: null
|
|
3377
3389
|
};
|
|
3378
|
-
return
|
|
3390
|
+
return Ct.add(t), t;
|
|
3379
3391
|
}
|
|
3380
|
-
function
|
|
3381
|
-
|
|
3392
|
+
function di(e) {
|
|
3393
|
+
Ct.delete(e);
|
|
3382
3394
|
}
|
|
3383
|
-
function
|
|
3395
|
+
function hi(e, t) {
|
|
3384
3396
|
return new Promise(function(n) {
|
|
3385
3397
|
return setTimeout(function() {
|
|
3386
|
-
var r = Array.from(
|
|
3398
|
+
var r = Array.from(Ct);
|
|
3387
3399
|
r.filter(function(o) {
|
|
3388
3400
|
return o.name === e.name;
|
|
3389
3401
|
}).filter(function(o) {
|
|
@@ -3396,35 +3408,35 @@ function di(e, t) {
|
|
|
3396
3408
|
}, 5);
|
|
3397
3409
|
});
|
|
3398
3410
|
}
|
|
3399
|
-
function
|
|
3411
|
+
function pi(e, t) {
|
|
3400
3412
|
e.messagesCallback = t;
|
|
3401
3413
|
}
|
|
3402
|
-
function
|
|
3414
|
+
function mi() {
|
|
3403
3415
|
return !0;
|
|
3404
3416
|
}
|
|
3405
|
-
function
|
|
3417
|
+
function gi() {
|
|
3406
3418
|
return 5;
|
|
3407
3419
|
}
|
|
3408
|
-
var
|
|
3409
|
-
create:
|
|
3410
|
-
close:
|
|
3411
|
-
onMessage:
|
|
3412
|
-
postMessage:
|
|
3413
|
-
canBeUsed:
|
|
3414
|
-
type:
|
|
3415
|
-
averageResponseTime:
|
|
3416
|
-
microSeconds:
|
|
3417
|
-
},
|
|
3418
|
-
|
|
3420
|
+
var vi = {
|
|
3421
|
+
create: fi,
|
|
3422
|
+
close: di,
|
|
3423
|
+
onMessage: pi,
|
|
3424
|
+
postMessage: hi,
|
|
3425
|
+
canBeUsed: mi,
|
|
3426
|
+
type: li,
|
|
3427
|
+
averageResponseTime: gi,
|
|
3428
|
+
microSeconds: ui
|
|
3429
|
+
}, fn = [
|
|
3430
|
+
Ts,
|
|
3419
3431
|
// fastest
|
|
3420
|
-
|
|
3421
|
-
|
|
3432
|
+
Ys,
|
|
3433
|
+
ci
|
|
3422
3434
|
];
|
|
3423
|
-
function
|
|
3424
|
-
var t = [].concat(e.methods,
|
|
3435
|
+
function yi(e) {
|
|
3436
|
+
var t = [].concat(e.methods, fn).filter(Boolean);
|
|
3425
3437
|
if (e.type) {
|
|
3426
3438
|
if (e.type === "simulate")
|
|
3427
|
-
return
|
|
3439
|
+
return vi;
|
|
3428
3440
|
var n = t.find(function(o) {
|
|
3429
3441
|
return o.type === e.type;
|
|
3430
3442
|
});
|
|
@@ -3438,19 +3450,19 @@ function vi(e) {
|
|
|
3438
3450
|
return o.canBeUsed();
|
|
3439
3451
|
});
|
|
3440
3452
|
if (r) return r;
|
|
3441
|
-
throw new Error("No usable method found in " + JSON.stringify(
|
|
3453
|
+
throw new Error("No usable method found in " + JSON.stringify(fn.map(function(o) {
|
|
3442
3454
|
return o.type;
|
|
3443
3455
|
})));
|
|
3444
3456
|
}
|
|
3445
|
-
var
|
|
3446
|
-
this.id =
|
|
3457
|
+
var lr = /* @__PURE__ */ new Set(), _i = 0, At = function(t, n) {
|
|
3458
|
+
this.id = _i++, lr.add(this), this.name = t, dn && (n = dn), this.options = Rt(n), this.method = yi(this.options), this._iL = !1, this._onML = null, this._addEL = {
|
|
3447
3459
|
message: [],
|
|
3448
3460
|
internal: []
|
|
3449
|
-
}, this._uMP = /* @__PURE__ */ new Set(), this._befC = [], this._prepP = null,
|
|
3461
|
+
}, this._uMP = /* @__PURE__ */ new Set(), this._befC = [], this._prepP = null, Ei(this);
|
|
3450
3462
|
};
|
|
3451
|
-
|
|
3452
|
-
var
|
|
3453
|
-
|
|
3463
|
+
At._pubkey = !0;
|
|
3464
|
+
var dn;
|
|
3465
|
+
At.prototype = {
|
|
3454
3466
|
postMessage: function(t) {
|
|
3455
3467
|
if (this.closed)
|
|
3456
3468
|
throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed " + /**
|
|
@@ -3459,36 +3471,36 @@ Ct.prototype = {
|
|
|
3459
3471
|
* gives some clue about where in your application this happens.
|
|
3460
3472
|
*/
|
|
3461
3473
|
JSON.stringify(t));
|
|
3462
|
-
return
|
|
3474
|
+
return hn(this, "message", t);
|
|
3463
3475
|
},
|
|
3464
3476
|
postInternal: function(t) {
|
|
3465
|
-
return
|
|
3477
|
+
return hn(this, "internal", t);
|
|
3466
3478
|
},
|
|
3467
3479
|
set onmessage(e) {
|
|
3468
3480
|
var t = this.method.microSeconds(), n = {
|
|
3469
3481
|
time: t,
|
|
3470
3482
|
fn: e
|
|
3471
3483
|
};
|
|
3472
|
-
|
|
3484
|
+
mn(this, "message", this._onML), e && typeof e == "function" ? (this._onML = n, pn(this, "message", n)) : this._onML = null;
|
|
3473
3485
|
},
|
|
3474
3486
|
addEventListener: function(t, n) {
|
|
3475
3487
|
var r = this.method.microSeconds(), o = {
|
|
3476
3488
|
time: r,
|
|
3477
3489
|
fn: n
|
|
3478
3490
|
};
|
|
3479
|
-
|
|
3491
|
+
pn(this, t, o);
|
|
3480
3492
|
},
|
|
3481
3493
|
removeEventListener: function(t, n) {
|
|
3482
3494
|
var r = this._addEL[t].find(function(o) {
|
|
3483
3495
|
return o.fn === n;
|
|
3484
3496
|
});
|
|
3485
|
-
|
|
3497
|
+
mn(this, t, r);
|
|
3486
3498
|
},
|
|
3487
3499
|
close: function() {
|
|
3488
3500
|
var t = this;
|
|
3489
3501
|
if (!this.closed) {
|
|
3490
|
-
|
|
3491
|
-
var n = this._prepP ? this._prepP :
|
|
3502
|
+
lr.delete(this), this.closed = !0;
|
|
3503
|
+
var n = this._prepP ? this._prepP : he;
|
|
3492
3504
|
return this._onML = null, this._addEL.message = [], n.then(function() {
|
|
3493
3505
|
return Promise.all(Array.from(t._uMP));
|
|
3494
3506
|
}).then(function() {
|
|
@@ -3507,12 +3519,12 @@ Ct.prototype = {
|
|
|
3507
3519
|
return this.closed;
|
|
3508
3520
|
}
|
|
3509
3521
|
};
|
|
3510
|
-
function
|
|
3522
|
+
function hn(e, t, n) {
|
|
3511
3523
|
var r = e.method.microSeconds(), o = {
|
|
3512
3524
|
time: r,
|
|
3513
3525
|
type: t,
|
|
3514
3526
|
data: n
|
|
3515
|
-
}, s = e._prepP ? e._prepP :
|
|
3527
|
+
}, s = e._prepP ? e._prepP : he;
|
|
3516
3528
|
return s.then(function() {
|
|
3517
3529
|
var i = e.method.postMessage(e._state, o);
|
|
3518
3530
|
return e._uMP.add(i), i.catch().then(function() {
|
|
@@ -3520,25 +3532,25 @@ function ln(e, t, n) {
|
|
|
3520
3532
|
}), i;
|
|
3521
3533
|
});
|
|
3522
3534
|
}
|
|
3523
|
-
function
|
|
3535
|
+
function Ei(e) {
|
|
3524
3536
|
var t = e.method.create(e.name, e.options);
|
|
3525
|
-
|
|
3537
|
+
Ss(t) ? (e._prepP = t, t.then(function(n) {
|
|
3526
3538
|
e._state = n;
|
|
3527
3539
|
})) : e._state = t;
|
|
3528
3540
|
}
|
|
3529
|
-
function
|
|
3541
|
+
function fr(e) {
|
|
3530
3542
|
return e._addEL.message.length > 0 || e._addEL.internal.length > 0;
|
|
3531
3543
|
}
|
|
3532
|
-
function
|
|
3533
|
-
e._addEL[t].push(n),
|
|
3544
|
+
function pn(e, t, n) {
|
|
3545
|
+
e._addEL[t].push(n), bi(e);
|
|
3534
3546
|
}
|
|
3535
|
-
function
|
|
3547
|
+
function mn(e, t, n) {
|
|
3536
3548
|
e._addEL[t] = e._addEL[t].filter(function(r) {
|
|
3537
3549
|
return r !== n;
|
|
3538
|
-
}),
|
|
3550
|
+
}), wi(e);
|
|
3539
3551
|
}
|
|
3540
|
-
function
|
|
3541
|
-
if (!e._iL &&
|
|
3552
|
+
function bi(e) {
|
|
3553
|
+
if (!e._iL && fr(e)) {
|
|
3542
3554
|
var t = function(o) {
|
|
3543
3555
|
e._addEL[o.type].forEach(function(s) {
|
|
3544
3556
|
var i = 1e5, a = s.time - i;
|
|
@@ -3550,14 +3562,14 @@ function Ei(e) {
|
|
|
3550
3562
|
}) : (e._iL = !0, e.method.onMessage(e._state, t, n));
|
|
3551
3563
|
}
|
|
3552
3564
|
}
|
|
3553
|
-
function
|
|
3554
|
-
if (e._iL && !
|
|
3565
|
+
function wi(e) {
|
|
3566
|
+
if (e._iL && !fr(e)) {
|
|
3555
3567
|
e._iL = !1;
|
|
3556
3568
|
var t = e.method.microSeconds();
|
|
3557
3569
|
e.method.onMessage(e._state, null, t);
|
|
3558
3570
|
}
|
|
3559
3571
|
}
|
|
3560
|
-
class
|
|
3572
|
+
class it extends Error {
|
|
3561
3573
|
/**
|
|
3562
3574
|
* @param {string} message
|
|
3563
3575
|
* @param {string[]} keys
|
|
@@ -3566,17 +3578,17 @@ class ot extends Error {
|
|
|
3566
3578
|
super(t), this.name = "DevalueError", this.path = n.join("");
|
|
3567
3579
|
}
|
|
3568
3580
|
}
|
|
3569
|
-
function
|
|
3581
|
+
function gn(e) {
|
|
3570
3582
|
return Object(e) !== e;
|
|
3571
3583
|
}
|
|
3572
|
-
const
|
|
3584
|
+
const Si = /* @__PURE__ */ Object.getOwnPropertyNames(
|
|
3573
3585
|
Object.prototype
|
|
3574
3586
|
).sort().join("\0");
|
|
3575
|
-
function
|
|
3587
|
+
function Oi(e) {
|
|
3576
3588
|
const t = Object.getPrototypeOf(e);
|
|
3577
|
-
return t === Object.prototype || t === null || Object.getOwnPropertyNames(t).sort().join("\0") ===
|
|
3589
|
+
return t === Object.prototype || t === null || Object.getOwnPropertyNames(t).sort().join("\0") === Si;
|
|
3578
3590
|
}
|
|
3579
|
-
function
|
|
3591
|
+
function Ni(e) {
|
|
3580
3592
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
3581
3593
|
}
|
|
3582
3594
|
function ki(e) {
|
|
@@ -3606,7 +3618,7 @@ function ki(e) {
|
|
|
3606
3618
|
return e < " " ? `\\u${e.charCodeAt(0).toString(16).padStart(4, "0")}` : "";
|
|
3607
3619
|
}
|
|
3608
3620
|
}
|
|
3609
|
-
function
|
|
3621
|
+
function be(e) {
|
|
3610
3622
|
let t = "", n = 0;
|
|
3611
3623
|
const r = e.length;
|
|
3612
3624
|
for (let o = 0; o < r; o += 1) {
|
|
@@ -3615,11 +3627,11 @@ function ye(e) {
|
|
|
3615
3627
|
}
|
|
3616
3628
|
return `"${n === 0 ? e : t + e.slice(n)}"`;
|
|
3617
3629
|
}
|
|
3618
|
-
const
|
|
3619
|
-
function
|
|
3620
|
-
return
|
|
3630
|
+
const Tt = -1, dr = -2, hr = -3, pr = -4, mr = -5, Dt = -6;
|
|
3631
|
+
function vn(e, t) {
|
|
3632
|
+
return Pi(JSON.parse(e));
|
|
3621
3633
|
}
|
|
3622
|
-
function
|
|
3634
|
+
function Pi(e, t) {
|
|
3623
3635
|
if (typeof e == "number") return o(e, !0);
|
|
3624
3636
|
if (!Array.isArray(e) || e.length === 0)
|
|
3625
3637
|
throw new Error("Invalid input");
|
|
@@ -3628,11 +3640,11 @@ function Ni(e, t) {
|
|
|
3628
3640
|
e
|
|
3629
3641
|
), r = Array(n.length);
|
|
3630
3642
|
function o(s, i = !1) {
|
|
3631
|
-
if (s ===
|
|
3632
|
-
if (s ===
|
|
3633
|
-
if (s ===
|
|
3634
|
-
if (s ===
|
|
3635
|
-
if (s ===
|
|
3643
|
+
if (s === Tt) return;
|
|
3644
|
+
if (s === hr) return NaN;
|
|
3645
|
+
if (s === pr) return 1 / 0;
|
|
3646
|
+
if (s === mr) return -1 / 0;
|
|
3647
|
+
if (s === Dt) return -0;
|
|
3636
3648
|
if (i) throw new Error("Invalid input");
|
|
3637
3649
|
if (s in r) return r[s];
|
|
3638
3650
|
const a = n[s];
|
|
@@ -3680,7 +3692,7 @@ function Ni(e, t) {
|
|
|
3680
3692
|
r[s] = c;
|
|
3681
3693
|
for (let u = 0; u < a.length; u += 1) {
|
|
3682
3694
|
const f = a[u];
|
|
3683
|
-
f !==
|
|
3695
|
+
f !== dr && (c[u] = o(f));
|
|
3684
3696
|
}
|
|
3685
3697
|
}
|
|
3686
3698
|
else {
|
|
@@ -3695,7 +3707,7 @@ function Ni(e, t) {
|
|
|
3695
3707
|
}
|
|
3696
3708
|
return o(0);
|
|
3697
3709
|
}
|
|
3698
|
-
function
|
|
3710
|
+
function yn(e, t) {
|
|
3699
3711
|
const n = [], r = /* @__PURE__ */ new Map(), o = [];
|
|
3700
3712
|
for (const u in t)
|
|
3701
3713
|
o.push({ key: u, fn: t[u] });
|
|
@@ -3703,13 +3715,13 @@ function mn(e, t) {
|
|
|
3703
3715
|
let i = 0;
|
|
3704
3716
|
function a(u) {
|
|
3705
3717
|
if (typeof u == "function")
|
|
3706
|
-
throw new
|
|
3718
|
+
throw new it("Cannot stringify a function", s);
|
|
3707
3719
|
if (r.has(u)) return r.get(u);
|
|
3708
|
-
if (u === void 0) return
|
|
3709
|
-
if (Number.isNaN(u)) return
|
|
3710
|
-
if (u === 1 / 0) return
|
|
3711
|
-
if (u === -1 / 0) return
|
|
3712
|
-
if (u === 0 && 1 / u < 0) return
|
|
3720
|
+
if (u === void 0) return Tt;
|
|
3721
|
+
if (Number.isNaN(u)) return hr;
|
|
3722
|
+
if (u === 1 / 0) return pr;
|
|
3723
|
+
if (u === -1 / 0) return mr;
|
|
3724
|
+
if (u === 0 && 1 / u < 0) return Dt;
|
|
3713
3725
|
const f = i++;
|
|
3714
3726
|
r.set(u, f);
|
|
3715
3727
|
for (const { key: d, fn: p } of o) {
|
|
@@ -3718,66 +3730,66 @@ function mn(e, t) {
|
|
|
3718
3730
|
return n[f] = `["${d}",${a(b)}]`, f;
|
|
3719
3731
|
}
|
|
3720
3732
|
let l = "";
|
|
3721
|
-
if (
|
|
3722
|
-
l =
|
|
3733
|
+
if (gn(u))
|
|
3734
|
+
l = at(u);
|
|
3723
3735
|
else
|
|
3724
|
-
switch (
|
|
3736
|
+
switch (Ni(u)) {
|
|
3725
3737
|
case "Number":
|
|
3726
3738
|
case "String":
|
|
3727
3739
|
case "Boolean":
|
|
3728
|
-
l = `["Object",${
|
|
3740
|
+
l = `["Object",${at(u)}]`;
|
|
3729
3741
|
break;
|
|
3730
3742
|
case "BigInt":
|
|
3731
3743
|
l = `["BigInt",${u}]`;
|
|
3732
3744
|
break;
|
|
3733
3745
|
case "Date":
|
|
3734
|
-
l = `["Date","${u.toISOString()}"]`;
|
|
3746
|
+
l = `["Date","${!isNaN(u.getDate()) ? u.toISOString() : ""}"]`;
|
|
3735
3747
|
break;
|
|
3736
3748
|
case "RegExp":
|
|
3737
|
-
const { source:
|
|
3738
|
-
l =
|
|
3749
|
+
const { source: b, flags: S } = u;
|
|
3750
|
+
l = S ? `["RegExp",${be(b)},"${S}"]` : `["RegExp",${be(b)}]`;
|
|
3739
3751
|
break;
|
|
3740
3752
|
case "Array":
|
|
3741
3753
|
l = "[";
|
|
3742
|
-
for (let
|
|
3743
|
-
|
|
3754
|
+
for (let E = 0; E < u.length; E += 1)
|
|
3755
|
+
E > 0 && (l += ","), E in u ? (s.push(`[${E}]`), l += a(u[E]), s.pop()) : l += dr;
|
|
3744
3756
|
l += "]";
|
|
3745
3757
|
break;
|
|
3746
3758
|
case "Set":
|
|
3747
3759
|
l = '["Set"';
|
|
3748
|
-
for (const
|
|
3749
|
-
l += `,${a(
|
|
3760
|
+
for (const E of u)
|
|
3761
|
+
l += `,${a(E)}`;
|
|
3750
3762
|
l += "]";
|
|
3751
3763
|
break;
|
|
3752
3764
|
case "Map":
|
|
3753
3765
|
l = '["Map"';
|
|
3754
|
-
for (const [
|
|
3766
|
+
for (const [E, R] of u)
|
|
3755
3767
|
s.push(
|
|
3756
|
-
`.get(${
|
|
3757
|
-
), l += `,${a(
|
|
3768
|
+
`.get(${gn(E) ? at(E) : "..."})`
|
|
3769
|
+
), l += `,${a(E)},${a(R)}`, s.pop();
|
|
3758
3770
|
l += "]";
|
|
3759
3771
|
break;
|
|
3760
3772
|
default:
|
|
3761
|
-
if (!
|
|
3762
|
-
throw new
|
|
3773
|
+
if (!Oi(u))
|
|
3774
|
+
throw new it(
|
|
3763
3775
|
"Cannot stringify arbitrary non-POJOs",
|
|
3764
3776
|
s
|
|
3765
3777
|
);
|
|
3766
3778
|
if (Object.getOwnPropertySymbols(u).length > 0)
|
|
3767
|
-
throw new
|
|
3779
|
+
throw new it(
|
|
3768
3780
|
"Cannot stringify POJOs with symbolic keys",
|
|
3769
3781
|
s
|
|
3770
3782
|
);
|
|
3771
3783
|
if (Object.getPrototypeOf(u) === null) {
|
|
3772
3784
|
l = '["null"';
|
|
3773
|
-
for (const
|
|
3774
|
-
s.push(`.${
|
|
3785
|
+
for (const E in u)
|
|
3786
|
+
s.push(`.${E}`), l += `,${be(E)},${a(u[E])}`, s.pop();
|
|
3775
3787
|
l += "]";
|
|
3776
3788
|
} else {
|
|
3777
3789
|
l = "{";
|
|
3778
|
-
let
|
|
3779
|
-
for (const
|
|
3780
|
-
|
|
3790
|
+
let E = !1;
|
|
3791
|
+
for (const R in u)
|
|
3792
|
+
E && (l += ","), E = !0, s.push(`.${R}`), l += `${be(R)}:${a(u[R])}`, s.pop();
|
|
3781
3793
|
l += "}";
|
|
3782
3794
|
}
|
|
3783
3795
|
}
|
|
@@ -3786,17 +3798,17 @@ function mn(e, t) {
|
|
|
3786
3798
|
const c = a(e);
|
|
3787
3799
|
return c < 0 ? `${c}` : `[${n.join(",")}]`;
|
|
3788
3800
|
}
|
|
3789
|
-
function
|
|
3801
|
+
function at(e) {
|
|
3790
3802
|
const t = typeof e;
|
|
3791
|
-
return t === "string" ?
|
|
3803
|
+
return t === "string" ? be(e) : e instanceof String ? be(e.toString()) : e === void 0 ? Tt.toString() : e === 0 && 1 / e < 0 ? Dt.toString() : t === "bigint" ? `["BigInt","${e}"]` : String(e);
|
|
3792
3804
|
}
|
|
3793
|
-
function
|
|
3794
|
-
let o = `${t.$id}-${e.toString()}`, s = new
|
|
3795
|
-
|
|
3796
|
-
i || (a = Date.now(), s.postMessage({ timestamp: a, state:
|
|
3805
|
+
function $i(e, t, { initialize: n, type: r }) {
|
|
3806
|
+
let o = `${t.$id}-${e.toString()}`, s = new At(o, { type: r }), i = !1, a = 0;
|
|
3807
|
+
Me(() => t[e], (f) => {
|
|
3808
|
+
i || (a = Date.now(), s.postMessage({ timestamp: a, state: vn(yn(f)) })), i = !1;
|
|
3797
3809
|
}, { deep: !0 }), s.onmessage = (f) => {
|
|
3798
3810
|
if (f === void 0) {
|
|
3799
|
-
s.postMessage({ timestamp: a, state:
|
|
3811
|
+
s.postMessage({ timestamp: a, state: vn(yn(t[e])) });
|
|
3800
3812
|
return;
|
|
3801
3813
|
}
|
|
3802
3814
|
f.timestamp <= a || (i = !0, a = f.timestamp, t[e] = f.state);
|
|
@@ -3804,33 +3816,33 @@ function Pi(e, t, { initialize: n, type: r }) {
|
|
|
3804
3816
|
let c = () => s.postMessage(void 0), u = () => s.close();
|
|
3805
3817
|
return n && c(), { sync: c, unshare: u };
|
|
3806
3818
|
}
|
|
3807
|
-
var
|
|
3819
|
+
var Ri = (e, t) => Object.keys(t).includes(e), Ii = ({ initialize: e = !0, enable: t = !0, type: n }) => ({ store: r, options: o }) => {
|
|
3808
3820
|
var a, c;
|
|
3809
3821
|
let s = ((a = o == null ? void 0 : o.share) == null ? void 0 : a.enable) ?? t, i = ((c = o == null ? void 0 : o.share) == null ? void 0 : c.omit) ?? [];
|
|
3810
3822
|
!s || Object.keys(r.$state).forEach((u) => {
|
|
3811
3823
|
var f;
|
|
3812
|
-
i.includes(u) ||
|
|
3824
|
+
i.includes(u) || !Ri(u, r.$state) || $i(u, r, { initialize: ((f = o == null ? void 0 : o.share) == null ? void 0 : f.initialize) ?? e, type: n });
|
|
3813
3825
|
});
|
|
3814
3826
|
};
|
|
3815
|
-
const
|
|
3816
|
-
|
|
3817
|
-
|
|
3827
|
+
const gr = Qr();
|
|
3828
|
+
gr.use(
|
|
3829
|
+
Ii({
|
|
3818
3830
|
enable: !0,
|
|
3819
3831
|
initialize: !0
|
|
3820
3832
|
})
|
|
3821
3833
|
);
|
|
3822
|
-
const
|
|
3834
|
+
const Mi = {
|
|
3823
3835
|
install: (e, t) => {
|
|
3824
|
-
const n = (t == null ? void 0 : t.router) ||
|
|
3825
|
-
if (e.use(n), e.use(
|
|
3836
|
+
const n = (t == null ? void 0 : t.router) || ws, r = new pt(n, t == null ? void 0 : t.getMeta);
|
|
3837
|
+
if (e.use(n), e.use(gr), e.provide("$registry", r), t != null && t.components)
|
|
3826
3838
|
for (const [o, s] of Object.entries(t.components))
|
|
3827
3839
|
e.component(o, s);
|
|
3828
3840
|
}
|
|
3829
3841
|
};
|
|
3830
3842
|
export {
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3843
|
+
Di as DoctypeMeta,
|
|
3844
|
+
pt as Registry,
|
|
3845
|
+
Mi as Stonecrop,
|
|
3846
|
+
Ti as useStonecrop
|
|
3835
3847
|
};
|
|
3836
3848
|
//# sourceMappingURL=stonecrop.js.map
|