@kitbag/router 0.18.2 → 0.19.0
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/kitbag-router.d.ts +11 -5
- package/dist/kitbag-router.js +942 -928
- package/dist/kitbag-router.umd.cjs +3 -3
- package/package.json +5 -5
package/dist/kitbag-router.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var T = (e, t, r) =>
|
|
4
|
-
import { inject as ae, markRaw as Ae, reactive as Ve, defineAsyncComponent as
|
|
1
|
+
var Sr = Object.defineProperty;
|
|
2
|
+
var Ar = (e, t, r) => t in e ? Sr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var T = (e, t, r) => Ar(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { inject as ae, markRaw as Ae, reactive as Ve, defineAsyncComponent as kr, watch as te, onUnmounted as Ze, computed as Z, ref as je, toValue as $, toRefs as xr, defineComponent as me, createElementBlock as Ur, openBlock as kt, normalizeClass as Lr, renderSlot as xt, normalizeProps as Ut, guardReactiveProps as Br, unref as Re, h as ue, getCurrentInstance as Cr, provide as Nr, createCommentVNode as Vr, mergeProps as Zr, createBlock as jr, resolveDynamicComponent as Or } from "vue";
|
|
5
5
|
function M(e) {
|
|
6
6
|
return typeof e != "string" ? !1 : /^(https?:\/\/|\/).*/g.test(e);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function Lt(e) {
|
|
9
9
|
return M(e) ? e : `/${e}`;
|
|
10
10
|
}
|
|
11
|
-
class
|
|
11
|
+
class $r extends Error {
|
|
12
12
|
/**
|
|
13
13
|
* Constructs a new DuplicateParamsError instance with a message indicating the problematic parameter.
|
|
14
14
|
* @param paramName - The name of the parameter that was duplicated.
|
|
@@ -17,7 +17,7 @@ class Hr extends Error {
|
|
|
17
17
|
super(`Invalid Param "${t}": Router does not support multiple params by the same name. All param names must be unique.`);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
class
|
|
20
|
+
class Hr extends Error {
|
|
21
21
|
constructor(t) {
|
|
22
22
|
super(`Child property on meta for ${t} conflicts with the parent meta.`);
|
|
23
23
|
}
|
|
@@ -27,7 +27,7 @@ class ye extends Error {
|
|
|
27
27
|
super("Router not installed");
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
class
|
|
30
|
+
class _r extends Error {
|
|
31
31
|
/**
|
|
32
32
|
* Constructs a new UseRouteInvalidError instance with a message that specifies both the given and expected route names.
|
|
33
33
|
* This detailed error message aids in quickly identifying and resolving mismatches in route usage.
|
|
@@ -38,9 +38,9 @@ class qr extends Error {
|
|
|
38
38
|
super(`useRoute called with incorrect route. Given ${t}, expected ${r}`);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
const
|
|
42
|
-
function
|
|
43
|
-
const e = ae(
|
|
41
|
+
const Bt = Symbol();
|
|
42
|
+
function Ge() {
|
|
43
|
+
const e = ae(Bt);
|
|
44
44
|
if (!e)
|
|
45
45
|
throw new ye();
|
|
46
46
|
return e;
|
|
@@ -48,51 +48,51 @@ function ze() {
|
|
|
48
48
|
function fe(e) {
|
|
49
49
|
return Array.isArray(e) ? e : [e];
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Ct(e, t) {
|
|
52
52
|
return e.filter((r) => t === r).length;
|
|
53
53
|
}
|
|
54
54
|
function ge(...e) {
|
|
55
55
|
const t = e.flatMap((r) => Array.isArray(r) ? r : Object.keys(r));
|
|
56
56
|
for (const r of t)
|
|
57
|
-
if (
|
|
58
|
-
throw new
|
|
57
|
+
if (Ct(t, r) > 1)
|
|
58
|
+
throw new $r(r);
|
|
59
59
|
}
|
|
60
60
|
class G extends Error {
|
|
61
61
|
}
|
|
62
62
|
const ve = "[", Oe = "]";
|
|
63
|
-
function
|
|
63
|
+
function qr(e) {
|
|
64
64
|
return e !== String && e !== Boolean && e !== Number && e !== Date;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
return typeof e == "function" &&
|
|
66
|
+
function Ir(e) {
|
|
67
|
+
return typeof e == "function" && qr(e);
|
|
68
68
|
}
|
|
69
69
|
function $e(e) {
|
|
70
70
|
return typeof e == "object" && "get" in e && typeof e.get == "function" && "set" in e && typeof e.set == "function";
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Nt(e) {
|
|
73
73
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean";
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function Dr(e, t) {
|
|
76
76
|
return $e(e) ? { ...e, defaultValue: t ?? e.defaultValue } : {
|
|
77
77
|
get: (r) => re(r, e),
|
|
78
78
|
set: (r) => ne(r, e),
|
|
79
79
|
defaultValue: t
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Fr(e) {
|
|
83
83
|
return $e(e) && e.defaultValue !== void 0;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
85
|
+
function ko(e, t) {
|
|
86
|
+
return Dr(e, t);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Vt(e) {
|
|
89
89
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
90
90
|
}
|
|
91
91
|
function J(e) {
|
|
92
92
|
return typeof e == "string" && e.length > 0;
|
|
93
93
|
}
|
|
94
94
|
let v = null;
|
|
95
|
-
async function
|
|
95
|
+
async function Tr() {
|
|
96
96
|
const {
|
|
97
97
|
ZodSchema: e,
|
|
98
98
|
ZodString: t,
|
|
@@ -101,18 +101,18 @@ async function Mr() {
|
|
|
101
101
|
ZodNumber: o,
|
|
102
102
|
ZodLiteral: a,
|
|
103
103
|
ZodObject: s,
|
|
104
|
-
ZodEnum:
|
|
104
|
+
ZodEnum: l,
|
|
105
105
|
ZodNativeEnum: p,
|
|
106
|
-
ZodArray:
|
|
107
|
-
ZodTuple:
|
|
108
|
-
ZodUnion:
|
|
109
|
-
ZodDiscriminatedUnion:
|
|
110
|
-
ZodRecord:
|
|
111
|
-
ZodMap:
|
|
112
|
-
ZodSet:
|
|
113
|
-
ZodIntersection:
|
|
114
|
-
ZodPromise:
|
|
115
|
-
ZodFunction:
|
|
106
|
+
ZodArray: c,
|
|
107
|
+
ZodTuple: y,
|
|
108
|
+
ZodUnion: b,
|
|
109
|
+
ZodDiscriminatedUnion: L,
|
|
110
|
+
ZodRecord: S,
|
|
111
|
+
ZodMap: w,
|
|
112
|
+
ZodSet: m,
|
|
113
|
+
ZodIntersection: h,
|
|
114
|
+
ZodPromise: R,
|
|
115
|
+
ZodFunction: f
|
|
116
116
|
} = await import("zod");
|
|
117
117
|
return {
|
|
118
118
|
ZodSchema: e,
|
|
@@ -122,37 +122,37 @@ async function Mr() {
|
|
|
122
122
|
ZodNumber: o,
|
|
123
123
|
ZodLiteral: a,
|
|
124
124
|
ZodObject: s,
|
|
125
|
-
ZodEnum:
|
|
125
|
+
ZodEnum: l,
|
|
126
126
|
ZodNativeEnum: p,
|
|
127
|
-
ZodArray:
|
|
128
|
-
ZodTuple:
|
|
129
|
-
ZodUnion:
|
|
130
|
-
ZodDiscriminatedUnion:
|
|
131
|
-
ZodRecord:
|
|
132
|
-
ZodMap:
|
|
133
|
-
ZodSet:
|
|
134
|
-
ZodIntersection:
|
|
135
|
-
ZodPromise:
|
|
136
|
-
ZodFunction:
|
|
127
|
+
ZodArray: c,
|
|
128
|
+
ZodTuple: y,
|
|
129
|
+
ZodUnion: b,
|
|
130
|
+
ZodDiscriminatedUnion: L,
|
|
131
|
+
ZodRecord: S,
|
|
132
|
+
ZodMap: w,
|
|
133
|
+
ZodSet: m,
|
|
134
|
+
ZodIntersection: h,
|
|
135
|
+
ZodPromise: R,
|
|
136
|
+
ZodFunction: f
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function Mr(e) {
|
|
140
140
|
return Object.values(e).some((t) => Object.values(t.host.params).some((r) => De(r)) || Object.values(t.path.params).some((r) => De(r)) || Object.values(t.query.params).some((r) => De(r)));
|
|
141
141
|
}
|
|
142
142
|
function De(e) {
|
|
143
143
|
return typeof e == "object" && "parse" in e && typeof e.parse == "function";
|
|
144
144
|
}
|
|
145
|
-
async function
|
|
145
|
+
async function Jr() {
|
|
146
146
|
try {
|
|
147
|
-
v = await
|
|
147
|
+
v = await Tr();
|
|
148
148
|
} catch {
|
|
149
149
|
throw new Error("Failed to initialize Zod");
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function Zt(e) {
|
|
153
153
|
return v ? e instanceof v.ZodSchema : !1;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function jt(e) {
|
|
156
156
|
return {
|
|
157
157
|
get: (t, { invalid: r }) => {
|
|
158
158
|
try {
|
|
@@ -170,9 +170,9 @@ function Ot(e) {
|
|
|
170
170
|
}
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
|
-
const
|
|
173
|
+
const Wr = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
|
|
174
174
|
function se(e, t) {
|
|
175
|
-
if (typeof t == "string" &&
|
|
175
|
+
if (typeof t == "string" && Wr.test(t)) {
|
|
176
176
|
const r = new Date(t);
|
|
177
177
|
return isNaN(r.getTime()) ? t : r;
|
|
178
178
|
}
|
|
@@ -287,21 +287,21 @@ function Je(e, t) {
|
|
|
287
287
|
throw new Error("Function schemas are not supported");
|
|
288
288
|
return JSON.stringify(t.parse(e));
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function Gr(e, t) {
|
|
291
291
|
return e[t] ?? String;
|
|
292
292
|
}
|
|
293
293
|
const N = {
|
|
294
294
|
invalid: (e) => {
|
|
295
295
|
throw new G(e);
|
|
296
296
|
}
|
|
297
|
-
},
|
|
297
|
+
}, Ot = {
|
|
298
298
|
get: (e) => e,
|
|
299
299
|
set: (e, { invalid: t }) => {
|
|
300
300
|
if (typeof e != "string")
|
|
301
301
|
throw t();
|
|
302
302
|
return e;
|
|
303
303
|
}
|
|
304
|
-
},
|
|
304
|
+
}, ze = {
|
|
305
305
|
get: (e, { invalid: t }) => {
|
|
306
306
|
if (e === "true")
|
|
307
307
|
return !0;
|
|
@@ -314,7 +314,7 @@ const N = {
|
|
|
314
314
|
throw t();
|
|
315
315
|
return e.toString();
|
|
316
316
|
}
|
|
317
|
-
},
|
|
317
|
+
}, Qe = {
|
|
318
318
|
get: (e, { invalid: t }) => {
|
|
319
319
|
const r = Number(e);
|
|
320
320
|
if (isNaN(r))
|
|
@@ -326,7 +326,7 @@ const N = {
|
|
|
326
326
|
throw t();
|
|
327
327
|
return e.toString();
|
|
328
328
|
}
|
|
329
|
-
},
|
|
329
|
+
}, $t = {
|
|
330
330
|
get: (e, { invalid: t }) => {
|
|
331
331
|
const r = new Date(e);
|
|
332
332
|
if (isNaN(r.getTime()))
|
|
@@ -338,7 +338,7 @@ const N = {
|
|
|
338
338
|
throw t();
|
|
339
339
|
return e.toISOString();
|
|
340
340
|
}
|
|
341
|
-
},
|
|
341
|
+
}, Ht = {
|
|
342
342
|
get: (e, { invalid: t }) => {
|
|
343
343
|
try {
|
|
344
344
|
return JSON.parse(e);
|
|
@@ -354,37 +354,37 @@ const N = {
|
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
};
|
|
357
|
-
function
|
|
357
|
+
function zr(e, t) {
|
|
358
358
|
switch (typeof t) {
|
|
359
359
|
case "string":
|
|
360
|
-
return
|
|
360
|
+
return Ot.get(e, N) === t;
|
|
361
361
|
case "number":
|
|
362
|
-
return Ke.get(e, N) === t;
|
|
363
|
-
case "boolean":
|
|
364
362
|
return Qe.get(e, N) === t;
|
|
363
|
+
case "boolean":
|
|
364
|
+
return ze.get(e, N) === t;
|
|
365
365
|
default:
|
|
366
366
|
return !1;
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
function re(e, t, r = !1) {
|
|
370
370
|
if (e === void 0 || !J(e)) {
|
|
371
|
-
if (
|
|
371
|
+
if (Fr(t))
|
|
372
372
|
return t.defaultValue;
|
|
373
373
|
if (r)
|
|
374
374
|
return;
|
|
375
375
|
throw new G();
|
|
376
376
|
}
|
|
377
377
|
if (t === String)
|
|
378
|
-
return
|
|
378
|
+
return Ot.get(e, N);
|
|
379
379
|
if (t === Boolean)
|
|
380
|
-
return
|
|
380
|
+
return ze.get(e, N);
|
|
381
381
|
if (t === Number)
|
|
382
|
-
return
|
|
382
|
+
return Qe.get(e, N);
|
|
383
383
|
if (t === Date)
|
|
384
|
-
return
|
|
384
|
+
return $t.get(e, N);
|
|
385
385
|
if (t === JSON)
|
|
386
|
-
return
|
|
387
|
-
if (
|
|
386
|
+
return Ht.get(e, N);
|
|
387
|
+
if (Ir(t))
|
|
388
388
|
return t(e, N);
|
|
389
389
|
if ($e(t))
|
|
390
390
|
return t.get(e, N);
|
|
@@ -393,14 +393,14 @@ function re(e, t, r = !1) {
|
|
|
393
393
|
return e;
|
|
394
394
|
throw new G();
|
|
395
395
|
}
|
|
396
|
-
if (
|
|
397
|
-
if (
|
|
396
|
+
if (Nt(t)) {
|
|
397
|
+
if (zr(e, t))
|
|
398
398
|
return t;
|
|
399
399
|
throw new G();
|
|
400
400
|
}
|
|
401
|
-
return
|
|
401
|
+
return Zt(t) ? jt(t).get(e, N) : e;
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function Qr(e, t, r = !1) {
|
|
404
404
|
try {
|
|
405
405
|
return re(e, t, r);
|
|
406
406
|
} catch (n) {
|
|
@@ -409,7 +409,7 @@ function Kr(e, t, r = !1) {
|
|
|
409
409
|
throw n;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
function
|
|
412
|
+
function Kr(e, t, r = !1) {
|
|
413
413
|
try {
|
|
414
414
|
return ne(e, t, r);
|
|
415
415
|
} catch (n) {
|
|
@@ -425,162 +425,162 @@ function ne(e, t, r = !1) {
|
|
|
425
425
|
throw new G();
|
|
426
426
|
}
|
|
427
427
|
if (t === Boolean)
|
|
428
|
-
return
|
|
428
|
+
return ze.set(e, N);
|
|
429
429
|
if (t === Number)
|
|
430
|
-
return
|
|
430
|
+
return Qe.set(e, N);
|
|
431
431
|
if (t === Date)
|
|
432
|
-
return
|
|
432
|
+
return $t.set(e, N);
|
|
433
433
|
if (t === JSON)
|
|
434
|
-
return
|
|
434
|
+
return Ht.set(e, N);
|
|
435
435
|
if ($e(t))
|
|
436
436
|
return t.set(e, N);
|
|
437
|
-
if (
|
|
437
|
+
if (Nt(t)) {
|
|
438
438
|
if (t !== e)
|
|
439
439
|
throw new G();
|
|
440
440
|
return e.toString();
|
|
441
441
|
}
|
|
442
|
-
if (
|
|
443
|
-
return
|
|
442
|
+
if (Zt(t))
|
|
443
|
+
return jt(t).set(e, N);
|
|
444
444
|
try {
|
|
445
445
|
return e.toString();
|
|
446
446
|
} catch {
|
|
447
447
|
throw new G();
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function Ke(e) {
|
|
451
451
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function Yr(e, t) {
|
|
454
454
|
const r = Array.from(e.matchAll(t));
|
|
455
455
|
if (r.length === 0)
|
|
456
456
|
return [e];
|
|
457
457
|
let n = 0;
|
|
458
|
-
const o = r.reduce((s,
|
|
459
|
-
const p =
|
|
458
|
+
const o = r.reduce((s, l) => {
|
|
459
|
+
const p = Ke(e.slice(n, l.index));
|
|
460
460
|
p.length && s.push(p);
|
|
461
|
-
const [
|
|
462
|
-
return s.push(
|
|
461
|
+
const [c] = l;
|
|
462
|
+
return s.push(c), n = l.index + c.length, s;
|
|
463
463
|
}, []), a = e.slice(n);
|
|
464
464
|
return a && o.push(a), o;
|
|
465
465
|
}
|
|
466
|
-
function
|
|
467
|
-
const t =
|
|
466
|
+
function Xr(e) {
|
|
467
|
+
const t = _t(e.path.value);
|
|
468
468
|
return new RegExp(`^${t}$`, "i");
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function en(e) {
|
|
471
471
|
const t = new URLSearchParams(e.query.value);
|
|
472
|
-
return Array.from(t.entries()).filter(([, r]) => !
|
|
473
|
-
const o =
|
|
474
|
-
return new RegExp(`${
|
|
472
|
+
return Array.from(t.entries()).filter(([, r]) => !Xe(r)).map(([r, n]) => {
|
|
473
|
+
const o = _t(n);
|
|
474
|
+
return new RegExp(`${Ke(r)}=${o}(&|$)`, "i");
|
|
475
475
|
});
|
|
476
476
|
}
|
|
477
|
-
function
|
|
478
|
-
return
|
|
477
|
+
function _t(e) {
|
|
478
|
+
return Yr(e, new RegExp(He, "g")).map((t) => t.startsWith(ve) ? qt(t) : Ke(t)).join("");
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function qt(e) {
|
|
481
481
|
return e.replace(new RegExp(He, "g"), ".+");
|
|
482
482
|
}
|
|
483
|
-
function
|
|
484
|
-
const r =
|
|
483
|
+
function tn(e, t) {
|
|
484
|
+
const r = It(t);
|
|
485
485
|
return e.replace(r, "(.*)");
|
|
486
486
|
}
|
|
487
|
-
function
|
|
488
|
-
return
|
|
487
|
+
function Ye(e, t) {
|
|
488
|
+
return nn(t).test(e.value);
|
|
489
489
|
}
|
|
490
|
-
function
|
|
491
|
-
return new RegExp(
|
|
490
|
+
function Xe(e) {
|
|
491
|
+
return new RegExp(rn, "g").test(e);
|
|
492
492
|
}
|
|
493
|
-
const He = `\\${ve}\\??([\\w-_]+)\\${Oe}`,
|
|
494
|
-
function
|
|
495
|
-
const [t] =
|
|
493
|
+
const He = `\\${ve}\\??([\\w-_]+)\\${Oe}`, rn = `\\${ve}\\?([\\w-_]+)\\${Oe}`;
|
|
494
|
+
function et(e) {
|
|
495
|
+
const [t] = Dt(e, new RegExp(He, "g"));
|
|
496
496
|
return t;
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function It(e) {
|
|
499
499
|
return new RegExp(`\\${ve}\\??${e}\\${Oe}`, "g");
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function nn(e) {
|
|
502
502
|
return new RegExp(`\\${ve}\\?${e}\\${Oe}`, "g");
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function Dt(e, t) {
|
|
505
505
|
return Array.from(e.matchAll(t)).flatMap(([, ...n]) => n.map((o) => J(o) ? o : ""));
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function on(e = "", t = {}) {
|
|
508
508
|
return J(e) ? Array.from(e.matchAll(new RegExp(He, "g"))).reduce((n, [o, a]) => {
|
|
509
|
-
const s =
|
|
509
|
+
const s = et(o);
|
|
510
510
|
if (!s)
|
|
511
511
|
return n;
|
|
512
|
-
const
|
|
513
|
-
return ge([s], n), n[a] =
|
|
512
|
+
const l = Gr(t, s);
|
|
513
|
+
return ge([s], n), n[a] = l, n;
|
|
514
514
|
}, {}) : {};
|
|
515
515
|
}
|
|
516
|
-
function
|
|
517
|
-
return
|
|
516
|
+
function an(e) {
|
|
517
|
+
return Vt(e) && typeof e.value == "string";
|
|
518
518
|
}
|
|
519
519
|
function Y(e) {
|
|
520
|
-
return e === void 0 ? z() :
|
|
520
|
+
return e === void 0 ? z() : an(e) ? e : z(e, {});
|
|
521
521
|
}
|
|
522
522
|
function z(e, t) {
|
|
523
523
|
return {
|
|
524
524
|
value: e ?? "",
|
|
525
|
-
params:
|
|
525
|
+
params: on(e, t)
|
|
526
526
|
};
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function Ft(e, t) {
|
|
529
529
|
ge(e.params, t.params);
|
|
530
530
|
const r = `${e.value}${t.value}`;
|
|
531
531
|
return z(r, { ...e.params, ...t.params });
|
|
532
532
|
}
|
|
533
|
+
function sn(e, t) {
|
|
534
|
+
return Ft(e, t);
|
|
535
|
+
}
|
|
533
536
|
function cn(e, t) {
|
|
534
|
-
return
|
|
537
|
+
return un(e, t), { ...e, ...t };
|
|
535
538
|
}
|
|
536
539
|
function un(e, t) {
|
|
537
|
-
return fn(e, t), { ...e, ...t };
|
|
538
|
-
}
|
|
539
|
-
function fn(e, t) {
|
|
540
540
|
const r = Object.keys(e).find((n) => n in t && typeof t[n] != typeof e[n]);
|
|
541
541
|
if (r)
|
|
542
|
-
throw new
|
|
542
|
+
throw new Hr(r);
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function fn(e, t) {
|
|
545
545
|
ge(e.params, t.params);
|
|
546
546
|
const r = [e.value, t.value].filter(J).join("&");
|
|
547
547
|
return z(r, { ...e.params, ...t.params });
|
|
548
548
|
}
|
|
549
|
-
function
|
|
549
|
+
function ln(e, t) {
|
|
550
550
|
return ge(e, t), { ...e, ...t };
|
|
551
551
|
}
|
|
552
|
-
function
|
|
552
|
+
function Tt(e) {
|
|
553
553
|
return "parent" in e && !!e.parent;
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function Mt(e) {
|
|
556
556
|
return "component" in e && !!e.component;
|
|
557
557
|
}
|
|
558
|
-
function
|
|
558
|
+
function lt(e) {
|
|
559
559
|
return "props" in e && typeof e.props == "function";
|
|
560
560
|
}
|
|
561
|
-
function
|
|
561
|
+
function Jt(e) {
|
|
562
562
|
return "components" in e && !!e.components;
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function ht(e) {
|
|
565
565
|
return "props" in e && typeof e.props == "object";
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function Wt(e, t) {
|
|
568
568
|
return {
|
|
569
569
|
...t,
|
|
570
|
-
path:
|
|
571
|
-
query:
|
|
572
|
-
meta:
|
|
573
|
-
state:
|
|
574
|
-
hash:
|
|
570
|
+
path: Ft(e.path, t.path),
|
|
571
|
+
query: fn(e.query, t.query),
|
|
572
|
+
meta: cn(e.meta, t.meta),
|
|
573
|
+
state: ln(e.state, t.state),
|
|
574
|
+
hash: sn(e.hash, t.hash),
|
|
575
575
|
matches: [...e.matches, t.matched],
|
|
576
576
|
host: e.host,
|
|
577
577
|
depth: e.depth + 1
|
|
578
578
|
};
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function tt() {
|
|
581
581
|
return typeof window < "u" && typeof window.document < "u";
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function rt(e) {
|
|
584
584
|
const t = new URLSearchParams(e);
|
|
585
585
|
return {
|
|
586
586
|
get: (...r) => t.get(...r),
|
|
@@ -609,49 +609,49 @@ function nt(e) {
|
|
|
609
609
|
[Symbol.iterator]: () => t[Symbol.iterator]()
|
|
610
610
|
};
|
|
611
611
|
}
|
|
612
|
-
function
|
|
612
|
+
function nt() {
|
|
613
613
|
let e = 0;
|
|
614
614
|
return () => (++e).toString();
|
|
615
615
|
}
|
|
616
|
-
const
|
|
617
|
-
function
|
|
618
|
-
return e ===
|
|
616
|
+
const hn = nt()();
|
|
617
|
+
function pn(e) {
|
|
618
|
+
return e === hn;
|
|
619
619
|
}
|
|
620
|
-
const
|
|
621
|
-
function
|
|
620
|
+
const ot = nt();
|
|
621
|
+
function Gt(e) {
|
|
622
622
|
return e === void 0 ? "" : e;
|
|
623
623
|
}
|
|
624
624
|
function he(e, t) {
|
|
625
|
-
const r =
|
|
625
|
+
const r = ot(), n = Gt(e.name), o = Y(e.path), a = Y(e.query), s = Y(e.hash), l = e.meta ?? {}, p = e.state ?? {}, c = Ae({ id: r, meta: l, state: p, ...e, props: t }), y = {
|
|
626
626
|
id: r,
|
|
627
|
-
matched:
|
|
628
|
-
matches: [
|
|
627
|
+
matched: c,
|
|
628
|
+
matches: [c],
|
|
629
629
|
name: n,
|
|
630
630
|
path: o,
|
|
631
631
|
query: a,
|
|
632
632
|
hash: s,
|
|
633
|
-
meta:
|
|
633
|
+
meta: l,
|
|
634
634
|
state: p,
|
|
635
635
|
depth: 1,
|
|
636
636
|
host: z(),
|
|
637
637
|
prefetch: e.prefetch
|
|
638
|
-
},
|
|
639
|
-
return ge(
|
|
638
|
+
}, b = Tt(e) ? Wt(e.parent, y) : y;
|
|
639
|
+
return ge(b.path.params, b.query.params, b.hash.params), b;
|
|
640
640
|
}
|
|
641
|
-
const xe = { template: "<div>This is component</div>" },
|
|
641
|
+
const xe = { template: "<div>This is component</div>" }, at = he({
|
|
642
642
|
name: "parentA",
|
|
643
643
|
path: "/parentA/[paramA]"
|
|
644
|
-
}),
|
|
645
|
-
parent:
|
|
644
|
+
}), zt = he({
|
|
645
|
+
parent: at,
|
|
646
646
|
name: "parentA.childA",
|
|
647
647
|
path: "/childA/[?paramB]"
|
|
648
|
-
}),
|
|
649
|
-
parent:
|
|
648
|
+
}), dn = he({
|
|
649
|
+
parent: at,
|
|
650
650
|
name: "parentA.childB",
|
|
651
651
|
path: "/childB/[paramD]",
|
|
652
652
|
component: xe
|
|
653
|
-
}),
|
|
654
|
-
parent:
|
|
653
|
+
}), mn = he({
|
|
654
|
+
parent: zt,
|
|
655
655
|
name: "parentA.childA.grandChildA",
|
|
656
656
|
path: "/[paramC]",
|
|
657
657
|
component: xe
|
|
@@ -665,27 +665,27 @@ he({
|
|
|
665
665
|
path: "/",
|
|
666
666
|
component: xe
|
|
667
667
|
});
|
|
668
|
-
const
|
|
668
|
+
const yn = "lazy", gn = {
|
|
669
669
|
components: !0,
|
|
670
670
|
props: !1
|
|
671
671
|
};
|
|
672
672
|
function Se(e) {
|
|
673
673
|
return ["eager", "lazy", "intent"].includes(e);
|
|
674
674
|
}
|
|
675
|
-
function
|
|
676
|
-
const o = Fe(r, n), a = Fe(t, n), s = Fe(e, n),
|
|
675
|
+
function Qt({ routerPrefetch: e, routePrefetch: t, linkPrefetch: r }, n) {
|
|
676
|
+
const o = Fe(r, n), a = Fe(t, n), s = Fe(e, n), l = [
|
|
677
677
|
o,
|
|
678
678
|
a,
|
|
679
679
|
s,
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
].reduce((p,
|
|
683
|
-
return Se(
|
|
680
|
+
gn[n],
|
|
681
|
+
yn
|
|
682
|
+
].reduce((p, c) => Se(p) ? p : p === !0 && Se(c) ? c : p === !0 && !Se(c) ? p : p === void 0 ? c : p, void 0);
|
|
683
|
+
return Se(l) ? l : !1;
|
|
684
684
|
}
|
|
685
685
|
function Fe(e, t) {
|
|
686
|
-
return
|
|
686
|
+
return Vt(e) ? e[t] : e;
|
|
687
687
|
}
|
|
688
|
-
class
|
|
688
|
+
class Kt extends Error {
|
|
689
689
|
constructor() {
|
|
690
690
|
super("Uncaught CallbackContextAbortError");
|
|
691
691
|
T(this, "response");
|
|
@@ -706,141 +706,148 @@ class Ue extends Error {
|
|
|
706
706
|
this.response = { status: "REJECT", type: r };
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function Yt() {
|
|
710
710
|
return { reject: (o) => {
|
|
711
711
|
throw new Ue(o);
|
|
712
712
|
}, push: (...o) => {
|
|
713
713
|
throw new le(o);
|
|
714
714
|
}, replace: (o, a, s) => {
|
|
715
715
|
if (M(o)) {
|
|
716
|
-
const
|
|
717
|
-
throw new le([o, { ...
|
|
716
|
+
const c = a ?? {};
|
|
717
|
+
throw new le([o, { ...c, replace: !0 }]);
|
|
718
718
|
}
|
|
719
|
-
const
|
|
720
|
-
throw new le([o,
|
|
719
|
+
const l = a, p = s ?? {};
|
|
720
|
+
throw new le([o, l, { ...p, replace: !0 }]);
|
|
721
721
|
}, abort: () => {
|
|
722
|
-
throw new
|
|
722
|
+
throw new Kt();
|
|
723
723
|
} };
|
|
724
724
|
}
|
|
725
|
-
function
|
|
725
|
+
function Xt(e) {
|
|
726
726
|
return typeof e == "object" && e !== null && "then" in e;
|
|
727
727
|
}
|
|
728
|
-
function
|
|
729
|
-
return t ? t.runWithContext(e) : e();
|
|
730
|
-
}
|
|
731
|
-
function dt(e, t) {
|
|
728
|
+
function pt(e) {
|
|
732
729
|
try {
|
|
733
|
-
const
|
|
734
|
-
return
|
|
735
|
-
} catch (
|
|
736
|
-
return
|
|
730
|
+
const t = e();
|
|
731
|
+
return Xt(t) ? t.catch((r) => r) : t;
|
|
732
|
+
} catch (t) {
|
|
733
|
+
return t;
|
|
737
734
|
}
|
|
738
735
|
}
|
|
739
|
-
|
|
740
|
-
function wn() {
|
|
736
|
+
function er() {
|
|
741
737
|
let e = null;
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
738
|
+
function t(n) {
|
|
739
|
+
e = n;
|
|
740
|
+
}
|
|
741
|
+
function r(n) {
|
|
742
|
+
return e ? e.runWithContext(n) : n();
|
|
743
|
+
}
|
|
744
|
+
return {
|
|
745
|
+
setVueApp: t,
|
|
746
|
+
runWithContext: r
|
|
747
|
+
};
|
|
748
|
+
}
|
|
749
|
+
const tr = Symbol();
|
|
750
|
+
function Rn() {
|
|
751
|
+
const { setVueApp: e, runWithContext: t } = er(), r = Ve(/* @__PURE__ */ new Map()), { push: n, replace: o, reject: a } = Yt(), s = (m, h, R) => h.matches.filter((f) => Qt({ ...R, routePrefetch: f.prefetch }, "props") === m).flatMap((f) => S(f)).reduce((f, { id: i, name: E, props: k }) => {
|
|
752
|
+
if (!k)
|
|
753
|
+
return f;
|
|
754
|
+
const A = L(i, E, h), g = t(() => pt(() => k(h, {
|
|
755
|
+
push: n,
|
|
756
|
+
replace: o,
|
|
757
|
+
reject: a,
|
|
758
|
+
parent: y(h, !0)
|
|
759
|
+
})));
|
|
760
|
+
return f[A] = g, f;
|
|
761
|
+
}, {}), l = (m) => {
|
|
762
|
+
Object.entries(m).forEach(([h, R]) => {
|
|
763
|
+
r.set(h, R);
|
|
755
764
|
});
|
|
756
|
-
},
|
|
757
|
-
const
|
|
758
|
-
for (const { id:
|
|
759
|
-
if (!
|
|
765
|
+
}, p = async (m) => {
|
|
766
|
+
const h = m.matches.flatMap(S), R = [], f = [];
|
|
767
|
+
for (const { id: i, name: E, props: k } of h) {
|
|
768
|
+
if (!k)
|
|
760
769
|
continue;
|
|
761
|
-
const A =
|
|
762
|
-
if (
|
|
763
|
-
const
|
|
764
|
-
push:
|
|
765
|
-
replace:
|
|
766
|
-
reject:
|
|
767
|
-
parent:
|
|
768
|
-
})
|
|
769
|
-
|
|
770
|
+
const A = L(i, E, m);
|
|
771
|
+
if (R.push(A), !r.has(A)) {
|
|
772
|
+
const g = t(() => pt(() => k(m, {
|
|
773
|
+
push: n,
|
|
774
|
+
replace: o,
|
|
775
|
+
reject: a,
|
|
776
|
+
parent: y(m)
|
|
777
|
+
})));
|
|
778
|
+
r.set(A, g);
|
|
770
779
|
}
|
|
771
|
-
|
|
772
|
-
const
|
|
773
|
-
if (
|
|
774
|
-
throw
|
|
780
|
+
f.push((async () => {
|
|
781
|
+
const g = await r.get(A);
|
|
782
|
+
if (g instanceof Error)
|
|
783
|
+
throw g;
|
|
775
784
|
})());
|
|
776
785
|
}
|
|
777
|
-
|
|
786
|
+
w(R);
|
|
778
787
|
try {
|
|
779
|
-
return await Promise.all(
|
|
780
|
-
} catch (
|
|
781
|
-
if (
|
|
782
|
-
return
|
|
783
|
-
throw
|
|
788
|
+
return await Promise.all(f), { status: "SUCCESS" };
|
|
789
|
+
} catch (i) {
|
|
790
|
+
if (i instanceof le || i instanceof Ue)
|
|
791
|
+
return i.response;
|
|
792
|
+
throw i;
|
|
784
793
|
}
|
|
785
|
-
},
|
|
786
|
-
const
|
|
787
|
-
return
|
|
788
|
-
}, h = (d) => {
|
|
789
|
-
e = d;
|
|
794
|
+
}, c = (m, h, R) => {
|
|
795
|
+
const f = L(m, h, R);
|
|
796
|
+
return r.get(f);
|
|
790
797
|
};
|
|
791
|
-
function
|
|
792
|
-
const
|
|
793
|
-
if (
|
|
794
|
-
return
|
|
795
|
-
name:
|
|
798
|
+
function y(m, h = !1) {
|
|
799
|
+
const R = m.matches.at(-2);
|
|
800
|
+
if (R)
|
|
801
|
+
return lt(R) ? {
|
|
802
|
+
name: R.name ?? "",
|
|
796
803
|
get props() {
|
|
797
|
-
return
|
|
804
|
+
return b(R, "default", m, h);
|
|
798
805
|
}
|
|
799
|
-
} :
|
|
800
|
-
name:
|
|
806
|
+
} : ht(R) ? {
|
|
807
|
+
name: R.name ?? "",
|
|
801
808
|
props: new Proxy({}, {
|
|
802
|
-
get(
|
|
803
|
-
return typeof
|
|
809
|
+
get(f, i) {
|
|
810
|
+
return typeof i != "string" ? Reflect.get(f, i) : b(R, i, m, h);
|
|
804
811
|
}
|
|
805
812
|
})
|
|
806
813
|
} : {
|
|
807
|
-
name:
|
|
814
|
+
name: R.name ?? "",
|
|
808
815
|
props: void 0
|
|
809
816
|
};
|
|
810
817
|
}
|
|
811
|
-
function
|
|
812
|
-
const
|
|
813
|
-
if (
|
|
814
|
-
const
|
|
818
|
+
function b(m, h, R, f = !1) {
|
|
819
|
+
const i = c(m.id, h, R);
|
|
820
|
+
if (f && !i) {
|
|
821
|
+
const E = m.name ?? "unknown", k = R.name || "unknown";
|
|
815
822
|
console.warn(`
|
|
816
|
-
Unable to access parent props "${
|
|
823
|
+
Unable to access parent props "${h}" from route "${E}" while prefetching props for route "${k}".
|
|
817
824
|
This may occur if the parent route's props were not also prefetched.
|
|
818
825
|
`);
|
|
819
826
|
}
|
|
820
|
-
return
|
|
827
|
+
return i;
|
|
821
828
|
}
|
|
822
|
-
function
|
|
823
|
-
return [
|
|
829
|
+
function L(m, h, R) {
|
|
830
|
+
return [m, h, R.id, JSON.stringify(R.params)].join("-");
|
|
824
831
|
}
|
|
825
|
-
function
|
|
826
|
-
return
|
|
832
|
+
function S(m) {
|
|
833
|
+
return lt(m) ? [
|
|
827
834
|
{
|
|
828
|
-
id:
|
|
835
|
+
id: m.id,
|
|
829
836
|
name: "default",
|
|
830
|
-
props:
|
|
837
|
+
props: m.props
|
|
831
838
|
}
|
|
832
|
-
] :
|
|
839
|
+
] : ht(m) ? Object.entries(m.props).map(([h, R]) => ({ id: m.id, name: h, props: R })) : [];
|
|
833
840
|
}
|
|
834
|
-
function
|
|
835
|
-
for (const
|
|
836
|
-
|
|
841
|
+
function w(m) {
|
|
842
|
+
for (const h of r.keys())
|
|
843
|
+
m.includes(h) || r.delete(h);
|
|
837
844
|
}
|
|
838
845
|
return {
|
|
839
|
-
getPrefetchProps:
|
|
840
|
-
setPrefetchProps:
|
|
841
|
-
getProps:
|
|
842
|
-
setProps:
|
|
843
|
-
setVueApp:
|
|
846
|
+
getPrefetchProps: s,
|
|
847
|
+
setPrefetchProps: l,
|
|
848
|
+
getProps: c,
|
|
849
|
+
setProps: p,
|
|
850
|
+
setVueApp: e
|
|
844
851
|
};
|
|
845
852
|
}
|
|
846
853
|
function rr() {
|
|
@@ -849,14 +856,14 @@ function rr() {
|
|
|
849
856
|
throw new ye();
|
|
850
857
|
return e;
|
|
851
858
|
}
|
|
852
|
-
const
|
|
859
|
+
const wn = kr(() => new Promise((e) => {
|
|
853
860
|
e({ default: { template: "foo" } });
|
|
854
861
|
}));
|
|
855
|
-
function
|
|
856
|
-
return e.name ===
|
|
862
|
+
function dt(e) {
|
|
863
|
+
return e.name === wn.name && "__asyncLoader" in e;
|
|
857
864
|
}
|
|
858
865
|
const nr = Symbol("visibilityObserver");
|
|
859
|
-
function
|
|
866
|
+
function vn(e) {
|
|
860
867
|
const t = ae(nr);
|
|
861
868
|
if (!t)
|
|
862
869
|
throw new ye();
|
|
@@ -868,90 +875,90 @@ function En(e) {
|
|
|
868
875
|
isElementVisible: Z(() => e.value ? t.isElementVisible(e.value) : !1)
|
|
869
876
|
};
|
|
870
877
|
}
|
|
871
|
-
function
|
|
878
|
+
function mt(e, t, r) {
|
|
872
879
|
te(e, (n, o) => {
|
|
873
880
|
n && n.addEventListener(t, r), o && o.removeEventListener(t, r);
|
|
874
881
|
}, { immediate: !0 }), Ze(() => {
|
|
875
882
|
e.value && e.value.removeEventListener(t, r);
|
|
876
883
|
});
|
|
877
884
|
}
|
|
878
|
-
function
|
|
879
|
-
const t = /* @__PURE__ */ new Map(), r = je(), { getPrefetchProps: n, setPrefetchProps: o } = rr(), { isElementVisible: a } =
|
|
880
|
-
const
|
|
881
|
-
o(
|
|
885
|
+
function En(e) {
|
|
886
|
+
const t = /* @__PURE__ */ new Map(), r = je(), { getPrefetchProps: n, setPrefetchProps: o } = rr(), { isElementVisible: a } = vn(r), s = () => {
|
|
887
|
+
const c = Array.from(t.values()).reduce((y, b) => (Object.assign(y, b), y), {});
|
|
888
|
+
o(c);
|
|
882
889
|
};
|
|
883
|
-
te(() =>
|
|
884
|
-
t.clear(),
|
|
885
|
-
}, { immediate: !0 }), te(a, (
|
|
886
|
-
const { route:
|
|
887
|
-
!
|
|
888
|
-
}, { immediate: !0 }),
|
|
889
|
-
function
|
|
890
|
-
const { route:
|
|
891
|
-
|
|
892
|
-
}
|
|
893
|
-
function p(
|
|
894
|
-
|
|
890
|
+
te(() => $(e), ({ route: c, ...y }) => {
|
|
891
|
+
t.clear(), c && p("eager", c, y);
|
|
892
|
+
}, { immediate: !0 }), te(a, (c) => {
|
|
893
|
+
const { route: y, ...b } = $(e);
|
|
894
|
+
!y || !c || p("lazy", y, b);
|
|
895
|
+
}, { immediate: !0 }), mt(r, "focusin", l), mt(r, "mouseover", l);
|
|
896
|
+
function l() {
|
|
897
|
+
const { route: c, ...y } = $(e);
|
|
898
|
+
c && p("intent", c, y);
|
|
899
|
+
}
|
|
900
|
+
function p(c, y, b) {
|
|
901
|
+
bn(c, y, b), t.has(c) || t.set(c, n(c, y, b));
|
|
895
902
|
}
|
|
896
903
|
return {
|
|
897
904
|
element: r,
|
|
898
905
|
commit: s
|
|
899
906
|
};
|
|
900
907
|
}
|
|
901
|
-
function
|
|
908
|
+
function bn(e, t, r) {
|
|
902
909
|
t.matches.forEach((n) => {
|
|
903
|
-
|
|
910
|
+
Qt({
|
|
904
911
|
...r,
|
|
905
912
|
routePrefetch: n.prefetch
|
|
906
|
-
}, "components") === e && (
|
|
907
|
-
|
|
913
|
+
}, "components") === e && (Mt(n) && dt(n.component) && n.component.__asyncLoader(), Jt(n) && Object.values(n.components).forEach((a) => {
|
|
914
|
+
dt(a) && a.__asyncLoader();
|
|
908
915
|
}));
|
|
909
916
|
});
|
|
910
917
|
}
|
|
911
918
|
const or = Symbol("isRouterRouteSymbol");
|
|
912
|
-
function
|
|
919
|
+
function Pn(e) {
|
|
913
920
|
return typeof e == "object" && e !== null && or in e;
|
|
914
921
|
}
|
|
915
|
-
function
|
|
916
|
-
function r(
|
|
917
|
-
if (typeof
|
|
918
|
-
const
|
|
922
|
+
function Sn(e, t) {
|
|
923
|
+
function r(h, R, f) {
|
|
924
|
+
if (typeof h == "object") {
|
|
925
|
+
const E = {
|
|
919
926
|
...e.params,
|
|
920
|
-
...
|
|
927
|
+
...h
|
|
921
928
|
};
|
|
922
|
-
return t(e.name,
|
|
929
|
+
return t(e.name, E, R);
|
|
923
930
|
}
|
|
924
|
-
const
|
|
931
|
+
const i = {
|
|
925
932
|
...e.params,
|
|
926
|
-
[
|
|
933
|
+
[h]: R
|
|
927
934
|
};
|
|
928
|
-
return t(e.name,
|
|
929
|
-
}
|
|
930
|
-
const n = (...
|
|
931
|
-
const
|
|
932
|
-
|
|
933
|
-
}, o = (...
|
|
934
|
-
const
|
|
935
|
-
|
|
936
|
-
}, a = (...
|
|
937
|
-
const
|
|
938
|
-
|
|
939
|
-
}, { id: s, matched:
|
|
935
|
+
return t(e.name, i, f);
|
|
936
|
+
}
|
|
937
|
+
const n = (...h) => {
|
|
938
|
+
const R = new URLSearchParams(e.query);
|
|
939
|
+
R.set(...h), r({}, { query: R });
|
|
940
|
+
}, o = (...h) => {
|
|
941
|
+
const R = new URLSearchParams(e.query);
|
|
942
|
+
R.append(...h), r({}, { query: R });
|
|
943
|
+
}, a = (...h) => {
|
|
944
|
+
const R = new URLSearchParams(e.query);
|
|
945
|
+
R.delete(...h), r({}, { query: R });
|
|
946
|
+
}, { id: s, matched: l, matches: p, name: c, hash: y, href: b } = xr(e), L = Z({
|
|
940
947
|
get() {
|
|
941
948
|
return new Proxy(e.params, {
|
|
942
|
-
set(
|
|
943
|
-
return r(
|
|
949
|
+
set(h, R, f) {
|
|
950
|
+
return r(R, f), !0;
|
|
944
951
|
}
|
|
945
952
|
});
|
|
946
953
|
},
|
|
947
|
-
set(
|
|
948
|
-
r(
|
|
954
|
+
set(h) {
|
|
955
|
+
r(h);
|
|
949
956
|
}
|
|
950
|
-
}),
|
|
957
|
+
}), S = Z({
|
|
951
958
|
get() {
|
|
952
959
|
return new Proxy(e.query, {
|
|
953
|
-
get(
|
|
954
|
-
switch (
|
|
960
|
+
get(h, R, f) {
|
|
961
|
+
switch (R) {
|
|
955
962
|
case "append":
|
|
956
963
|
return o;
|
|
957
964
|
case "set":
|
|
@@ -959,44 +966,44 @@ function An(e, t) {
|
|
|
959
966
|
case "delete":
|
|
960
967
|
return a;
|
|
961
968
|
default:
|
|
962
|
-
return Reflect.get(
|
|
969
|
+
return Reflect.get(h, R, f);
|
|
963
970
|
}
|
|
964
971
|
}
|
|
965
972
|
});
|
|
966
973
|
},
|
|
967
|
-
set(
|
|
968
|
-
r({}, { query:
|
|
974
|
+
set(h) {
|
|
975
|
+
r({}, { query: h });
|
|
969
976
|
}
|
|
970
|
-
}),
|
|
977
|
+
}), w = Z({
|
|
971
978
|
get() {
|
|
972
979
|
return new Proxy(e.state, {
|
|
973
|
-
set(
|
|
974
|
-
return r({}, { state: { ...e.state, [
|
|
980
|
+
set(h, R, f) {
|
|
981
|
+
return r({}, { state: { ...e.state, [R]: f } }), !0;
|
|
975
982
|
}
|
|
976
983
|
});
|
|
977
984
|
},
|
|
978
|
-
set(
|
|
979
|
-
r({}, { state:
|
|
985
|
+
set(h) {
|
|
986
|
+
r({}, { state: h });
|
|
980
987
|
}
|
|
981
988
|
});
|
|
982
989
|
return Ve({
|
|
983
990
|
id: s,
|
|
984
|
-
matched:
|
|
991
|
+
matched: l,
|
|
985
992
|
matches: p,
|
|
986
|
-
state:
|
|
987
|
-
query:
|
|
988
|
-
hash:
|
|
989
|
-
params:
|
|
990
|
-
name:
|
|
991
|
-
href:
|
|
993
|
+
state: w,
|
|
994
|
+
query: S,
|
|
995
|
+
hash: y,
|
|
996
|
+
params: L,
|
|
997
|
+
name: c,
|
|
998
|
+
href: b,
|
|
992
999
|
update: r,
|
|
993
1000
|
[or]: !0
|
|
994
1001
|
});
|
|
995
1002
|
}
|
|
996
1003
|
function ar(e, t, { exact: r } = {}) {
|
|
997
|
-
return
|
|
1004
|
+
return Pn(e) ? t === void 0 ? !0 : r ? e.matched.name === t : e.matches.map((n) => n.name).includes(t) : !1;
|
|
998
1005
|
}
|
|
999
|
-
function
|
|
1006
|
+
function st(...e) {
|
|
1000
1007
|
const t = new URLSearchParams();
|
|
1001
1008
|
for (const r of e) {
|
|
1002
1009
|
const n = new URLSearchParams(r);
|
|
@@ -1005,52 +1012,52 @@ function ct(...e) {
|
|
|
1005
1012
|
}
|
|
1006
1013
|
return t;
|
|
1007
1014
|
}
|
|
1008
|
-
function
|
|
1009
|
-
const n =
|
|
1010
|
-
const
|
|
1011
|
-
return typeof
|
|
1015
|
+
function An(e, t = {}, r = {}) {
|
|
1016
|
+
const n = Ge(), o = Z(() => {
|
|
1017
|
+
const w = $(e);
|
|
1018
|
+
return typeof w != "string" ? w : M(w) ? n.find(w, $(r)) : n.resolve(w, $(t), $(r));
|
|
1012
1019
|
}), a = Z(() => {
|
|
1013
1020
|
if (o.value)
|
|
1014
1021
|
return o.value.href;
|
|
1015
|
-
const
|
|
1016
|
-
if (M(
|
|
1017
|
-
return
|
|
1022
|
+
const w = $(e);
|
|
1023
|
+
if (M(w))
|
|
1024
|
+
return w;
|
|
1018
1025
|
console.error(new Error("Failed to resolve route in RouterLink."));
|
|
1019
|
-
}), s = Z(() => ar(n.route) && n.route.matches.some((
|
|
1020
|
-
var
|
|
1021
|
-
return
|
|
1022
|
-
})),
|
|
1023
|
-
var
|
|
1024
|
-
return n.route.id === ((
|
|
1025
|
-
}), p = Z(() => !!a.value && n.isExternal(a.value)),
|
|
1026
|
-
const
|
|
1027
|
-
return typeof
|
|
1028
|
-
}), { element:
|
|
1026
|
+
}), s = Z(() => ar(n.route) && n.route.matches.some((w) => {
|
|
1027
|
+
var m;
|
|
1028
|
+
return w.id === ((m = o.value) == null ? void 0 : m.id);
|
|
1029
|
+
})), l = Z(() => {
|
|
1030
|
+
var w;
|
|
1031
|
+
return n.route.id === ((w = o.value) == null ? void 0 : w.id);
|
|
1032
|
+
}), p = Z(() => !!a.value && n.isExternal(a.value)), c = Z(() => {
|
|
1033
|
+
const w = $(e);
|
|
1034
|
+
return typeof w != "string" || M(w) ? $(t) : $(r);
|
|
1035
|
+
}), { element: y, commit: b } = En(() => ({
|
|
1029
1036
|
route: o.value,
|
|
1030
1037
|
routerPrefetch: n.prefetch,
|
|
1031
|
-
linkPrefetch:
|
|
1032
|
-
})),
|
|
1033
|
-
|
|
1034
|
-
const
|
|
1035
|
-
replace: (
|
|
1036
|
-
query:
|
|
1037
|
-
hash: (
|
|
1038
|
-
state: { ...
|
|
1039
|
-
},
|
|
1040
|
-
return M(
|
|
1038
|
+
linkPrefetch: c.value.prefetch
|
|
1039
|
+
})), L = (w) => {
|
|
1040
|
+
b();
|
|
1041
|
+
const m = {
|
|
1042
|
+
replace: (w == null ? void 0 : w.replace) ?? c.value.replace,
|
|
1043
|
+
query: st(c.value.query, w == null ? void 0 : w.query),
|
|
1044
|
+
hash: (w == null ? void 0 : w.hash) ?? c.value.hash,
|
|
1045
|
+
state: { ...c.value.state, ...w == null ? void 0 : w.state }
|
|
1046
|
+
}, h = $(e);
|
|
1047
|
+
return M(h) || typeof h == "object" ? n.push(h, m) : n.push(h, $(t), m);
|
|
1041
1048
|
};
|
|
1042
1049
|
return {
|
|
1043
|
-
element:
|
|
1050
|
+
element: y,
|
|
1044
1051
|
route: o,
|
|
1045
1052
|
href: a,
|
|
1046
1053
|
isMatch: s,
|
|
1047
|
-
isExactMatch:
|
|
1054
|
+
isExactMatch: l,
|
|
1048
1055
|
isExternal: p,
|
|
1049
|
-
push:
|
|
1050
|
-
replace: (
|
|
1056
|
+
push: L,
|
|
1057
|
+
replace: (w) => L({ ...w, replace: !0 })
|
|
1051
1058
|
};
|
|
1052
1059
|
}
|
|
1053
|
-
const
|
|
1060
|
+
const kn = ["href"], xn = /* @__PURE__ */ me({
|
|
1054
1061
|
__name: "routerLink",
|
|
1055
1062
|
props: {
|
|
1056
1063
|
to: {},
|
|
@@ -1061,82 +1068,82 @@ const xn = ["href"], Un = /* @__PURE__ */ me({
|
|
|
1061
1068
|
state: {}
|
|
1062
1069
|
},
|
|
1063
1070
|
setup(e) {
|
|
1064
|
-
const t = e, r =
|
|
1065
|
-
const { to:
|
|
1066
|
-
return
|
|
1067
|
-
}), { element: s, isMatch:
|
|
1068
|
-
"router-link--match":
|
|
1071
|
+
const t = e, r = Ge(), n = Z(() => L(t.to)), o = Z(() => S(t.to)), a = Z(() => {
|
|
1072
|
+
const { to: m, ...h } = t;
|
|
1073
|
+
return h;
|
|
1074
|
+
}), { element: s, isMatch: l, isExactMatch: p, isExternal: c, push: y } = An(() => typeof t.to == "function" ? t.to(r.resolve) : t.to, a), b = Z(() => ({
|
|
1075
|
+
"router-link--match": l.value,
|
|
1069
1076
|
"router-link--exact-match": p.value
|
|
1070
1077
|
}));
|
|
1071
|
-
function
|
|
1072
|
-
if (typeof
|
|
1073
|
-
const
|
|
1074
|
-
return
|
|
1078
|
+
function L(m) {
|
|
1079
|
+
if (typeof m == "function") {
|
|
1080
|
+
const h = m(r.resolve);
|
|
1081
|
+
return L(h);
|
|
1075
1082
|
}
|
|
1076
|
-
return M(
|
|
1083
|
+
return M(m) ? r.find(m) : m;
|
|
1077
1084
|
}
|
|
1078
|
-
function
|
|
1079
|
-
if (typeof
|
|
1080
|
-
const
|
|
1081
|
-
return
|
|
1085
|
+
function S(m) {
|
|
1086
|
+
if (typeof m == "function") {
|
|
1087
|
+
const h = m(r.resolve);
|
|
1088
|
+
return S(h);
|
|
1082
1089
|
}
|
|
1083
|
-
return M(
|
|
1090
|
+
return M(m) ? m : m == null ? void 0 : m.href;
|
|
1084
1091
|
}
|
|
1085
|
-
function
|
|
1086
|
-
|
|
1092
|
+
function w(m) {
|
|
1093
|
+
m.preventDefault(), y();
|
|
1087
1094
|
}
|
|
1088
|
-
return (
|
|
1095
|
+
return (m, h) => (kt(), Ur("a", {
|
|
1089
1096
|
ref_key: "element",
|
|
1090
1097
|
ref: s,
|
|
1091
1098
|
href: o.value,
|
|
1092
|
-
class:
|
|
1093
|
-
onClick:
|
|
1099
|
+
class: Lr(["router-link", b.value]),
|
|
1100
|
+
onClick: w
|
|
1094
1101
|
}, [
|
|
1095
|
-
|
|
1096
|
-
], 10,
|
|
1102
|
+
xt(m.$slots, "default", Ut(Br({ route: n.value, isMatch: Re(l), isExactMatch: Re(p), isExternal: Re(c) })))
|
|
1103
|
+
], 10, kn));
|
|
1097
1104
|
}
|
|
1098
1105
|
}), sr = Symbol();
|
|
1099
|
-
function
|
|
1106
|
+
function Un() {
|
|
1100
1107
|
const e = ae(sr);
|
|
1101
1108
|
if (!e)
|
|
1102
1109
|
throw new ye();
|
|
1103
1110
|
return e;
|
|
1104
1111
|
}
|
|
1105
1112
|
function cr(e, t) {
|
|
1106
|
-
const r =
|
|
1113
|
+
const r = Ge();
|
|
1107
1114
|
function n() {
|
|
1108
1115
|
if (!e)
|
|
1109
1116
|
return;
|
|
1110
1117
|
if (!ar(r.route, e, t))
|
|
1111
|
-
throw new
|
|
1118
|
+
throw new _r(e, r.route.name);
|
|
1112
1119
|
}
|
|
1113
1120
|
return te(r.route, n, { immediate: !0, deep: !0 }), r.route;
|
|
1114
1121
|
}
|
|
1115
1122
|
const ir = Symbol();
|
|
1116
|
-
function
|
|
1123
|
+
function ct() {
|
|
1117
1124
|
return ae(ir, 0);
|
|
1118
1125
|
}
|
|
1119
|
-
function
|
|
1126
|
+
function Ln(e, t, r) {
|
|
1120
1127
|
return me({
|
|
1121
1128
|
name: "PropsWrapper",
|
|
1122
1129
|
expose: [],
|
|
1123
1130
|
setup() {
|
|
1124
|
-
const n =
|
|
1131
|
+
const n = Cr(), o = rr(), a = cr();
|
|
1125
1132
|
return () => {
|
|
1126
1133
|
const s = o.getProps(e.id, t, a);
|
|
1127
|
-
return s instanceof Error ? "" :
|
|
1134
|
+
return s instanceof Error ? "" : Xt(s) ? n != null && n.suspense ? ue(Cn, { component: r, props: s }) : ue(Bn, { component: r, props: s }) : ue(r, s);
|
|
1128
1135
|
};
|
|
1129
1136
|
}
|
|
1130
1137
|
});
|
|
1131
1138
|
}
|
|
1132
|
-
const
|
|
1139
|
+
const Bn = me((e) => {
|
|
1133
1140
|
const t = je();
|
|
1134
1141
|
return te(() => e.props, async (r) => {
|
|
1135
1142
|
t.value = await r;
|
|
1136
1143
|
}, { immediate: !0, deep: !0 }), () => t.value instanceof Error ? "" : t.value ? ue(e.component, t.value) : "";
|
|
1137
1144
|
}, {
|
|
1138
1145
|
props: ["component", "props"]
|
|
1139
|
-
}),
|
|
1146
|
+
}), Cn = me(async (e) => {
|
|
1140
1147
|
const t = je();
|
|
1141
1148
|
return t.value = await e.props, te(() => t.value, async (r) => {
|
|
1142
1149
|
t.value = await r;
|
|
@@ -1144,27 +1151,27 @@ const Cn = me((e) => {
|
|
|
1144
1151
|
}, {
|
|
1145
1152
|
props: ["component", "props"]
|
|
1146
1153
|
}), ur = Symbol();
|
|
1147
|
-
function
|
|
1154
|
+
function Nn() {
|
|
1148
1155
|
const e = /* @__PURE__ */ new Map();
|
|
1149
1156
|
return {
|
|
1150
1157
|
getRouteComponents: (r) => {
|
|
1151
1158
|
const n = e.get(r.id);
|
|
1152
1159
|
if (n)
|
|
1153
1160
|
return n;
|
|
1154
|
-
const o =
|
|
1161
|
+
const o = Vn(r);
|
|
1155
1162
|
return e.set(r.id, o), o;
|
|
1156
1163
|
}
|
|
1157
1164
|
};
|
|
1158
1165
|
}
|
|
1159
|
-
function
|
|
1160
|
-
return
|
|
1166
|
+
function Vn(e) {
|
|
1167
|
+
return Jt(e) ? yt(e, e.components) : Mt(e) ? yt(e, { default: e.component }) : { default: fr };
|
|
1161
1168
|
}
|
|
1162
|
-
function
|
|
1169
|
+
function yt(e, t) {
|
|
1163
1170
|
return Object.fromEntries(
|
|
1164
|
-
Object.entries(t).map(([r, n]) => [r,
|
|
1171
|
+
Object.entries(t).map(([r, n]) => [r, Ln(e, r, n)])
|
|
1165
1172
|
);
|
|
1166
1173
|
}
|
|
1167
|
-
function
|
|
1174
|
+
function Zn() {
|
|
1168
1175
|
const e = ae(ur);
|
|
1169
1176
|
if (!e)
|
|
1170
1177
|
throw new ye();
|
|
@@ -1176,17 +1183,17 @@ const fr = /* @__PURE__ */ me({
|
|
|
1176
1183
|
name: { default: "default" }
|
|
1177
1184
|
},
|
|
1178
1185
|
setup(e) {
|
|
1179
|
-
const t = cr(), r =
|
|
1180
|
-
|
|
1186
|
+
const t = cr(), r = Un(), n = ct(), { getRouteComponents: o } = Zn();
|
|
1187
|
+
Nr(ir, n + 1);
|
|
1181
1188
|
const a = Z(() => {
|
|
1182
1189
|
if (r.value)
|
|
1183
1190
|
return r.value.component;
|
|
1184
1191
|
const s = t.matches.at(n);
|
|
1185
1192
|
return s ? o(s)[e.name] : null;
|
|
1186
1193
|
});
|
|
1187
|
-
return (s,
|
|
1188
|
-
(
|
|
1189
|
-
]) :
|
|
1194
|
+
return (s, l) => a.value ? xt(s.$slots, "default", Ut(Zr({ key: 0 }, { route: Re(t), component: a.value, rejection: Re(r) })), () => [
|
|
1195
|
+
(kt(), jr(Or(a.value)))
|
|
1196
|
+
]) : Vr("", !0);
|
|
1190
1197
|
}
|
|
1191
1198
|
});
|
|
1192
1199
|
class oe {
|
|
@@ -1211,7 +1218,7 @@ const Ee = (e, t, r) => {
|
|
|
1211
1218
|
var n, o;
|
|
1212
1219
|
return ((n = e.matches.at(r)) == null ? void 0 : n.id) === ((o = t == null ? void 0 : t.matches.at(r)) == null ? void 0 : o.id);
|
|
1213
1220
|
};
|
|
1214
|
-
function
|
|
1221
|
+
function gt(e) {
|
|
1215
1222
|
switch (e) {
|
|
1216
1223
|
case "onBeforeRouteEnter":
|
|
1217
1224
|
case "onAfterRouteEnter":
|
|
@@ -1226,7 +1233,7 @@ function Rt(e) {
|
|
|
1226
1233
|
throw new Error(`Switch is not exhaustive for lifecycle: ${e}`);
|
|
1227
1234
|
}
|
|
1228
1235
|
}
|
|
1229
|
-
function
|
|
1236
|
+
function jn(e, t) {
|
|
1230
1237
|
const r = new oe();
|
|
1231
1238
|
return e.matches.forEach((n, o) => {
|
|
1232
1239
|
n.onBeforeRouteEnter && Ee(e, t, o) && fe(n.onBeforeRouteEnter).forEach((a) => r.onBeforeRouteEnter.add(a)), n.onBeforeRouteUpdate && Pe(e, t, o) && fe(n.onBeforeRouteUpdate).forEach((a) => r.onBeforeRouteUpdate.add(a));
|
|
@@ -1234,7 +1241,7 @@ function On(e, t) {
|
|
|
1234
1241
|
n.onBeforeRouteLeave && be(e, t, o) && fe(n.onBeforeRouteLeave).forEach((a) => r.onBeforeRouteLeave.add(a));
|
|
1235
1242
|
}), r;
|
|
1236
1243
|
}
|
|
1237
|
-
function
|
|
1244
|
+
function On(e, t) {
|
|
1238
1245
|
const r = new oe();
|
|
1239
1246
|
return e.matches.forEach((n, o) => {
|
|
1240
1247
|
n.onAfterRouteEnter && Ee(e, t, o) && fe(n.onAfterRouteEnter).forEach((a) => r.onAfterRouteEnter.add(a)), n.onAfterRouteUpdate && Pe(e, t, o) && fe(n.onAfterRouteUpdate).forEach((a) => r.onAfterRouteUpdate.add(a));
|
|
@@ -1242,7 +1249,7 @@ function $n(e, t) {
|
|
|
1242
1249
|
n.onAfterRouteLeave && be(e, t, o) && fe(n.onAfterRouteLeave).forEach((a) => r.onAfterRouteLeave.add(a));
|
|
1243
1250
|
}), r;
|
|
1244
1251
|
}
|
|
1245
|
-
function
|
|
1252
|
+
function $n(e, t, r) {
|
|
1246
1253
|
const n = new oe();
|
|
1247
1254
|
return e.matches.forEach((o, a) => {
|
|
1248
1255
|
Ee(e, t, a) && r.onBeforeRouteEnter.forEach((s) => n.onBeforeRouteEnter.add(s)), Pe(e, t, a) && r.onBeforeRouteUpdate.forEach((s) => n.onBeforeRouteUpdate.add(s));
|
|
@@ -1250,7 +1257,7 @@ function Hn(e, t, r) {
|
|
|
1250
1257
|
be(e, t, a) && r.onBeforeRouteLeave.forEach((s) => n.onBeforeRouteLeave.add(s));
|
|
1251
1258
|
}), n;
|
|
1252
1259
|
}
|
|
1253
|
-
function
|
|
1260
|
+
function Hn(e, t, r) {
|
|
1254
1261
|
const n = new oe();
|
|
1255
1262
|
return e.matches.forEach((o, a) => {
|
|
1256
1263
|
Ee(e, t, a) && r.onAfterRouteEnter.forEach((s) => n.onAfterRouteEnter.add(s)), Pe(e, t, a) && r.onAfterRouteUpdate.forEach((s) => n.onAfterRouteUpdate.add(s));
|
|
@@ -1259,64 +1266,64 @@ function _n(e, t, r) {
|
|
|
1259
1266
|
}), n;
|
|
1260
1267
|
}
|
|
1261
1268
|
const lr = Symbol();
|
|
1262
|
-
function
|
|
1263
|
-
const e = {
|
|
1269
|
+
function _n() {
|
|
1270
|
+
const { setVueApp: e, runWithContext: t } = er(), r = {
|
|
1264
1271
|
global: new oe(),
|
|
1265
1272
|
component: new oe()
|
|
1266
|
-
}, { reject:
|
|
1267
|
-
async function S({ to:
|
|
1268
|
-
const { global:
|
|
1273
|
+
}, { reject: n, push: o, replace: a, abort: s } = Yt(), l = (f) => (r.global.onBeforeRouteEnter.add(f), () => r.global.onBeforeRouteEnter.delete(f)), p = (f) => (r.global.onBeforeRouteUpdate.add(f), () => r.global.onBeforeRouteUpdate.delete(f)), c = (f) => (r.global.onBeforeRouteLeave.add(f), () => r.global.onBeforeRouteLeave.delete(f)), y = (f) => (r.global.onAfterRouteEnter.add(f), () => r.global.onAfterRouteEnter.delete(f)), b = (f) => (r.global.onAfterRouteUpdate.add(f), () => r.global.onAfterRouteUpdate.delete(f)), L = (f) => (r.global.onAfterRouteLeave.add(f), () => r.global.onAfterRouteLeave.delete(f));
|
|
1274
|
+
async function S({ to: f, from: i }) {
|
|
1275
|
+
const { global: E, component: k } = r, A = jn(f, i), g = $n(f, i, E), u = [
|
|
1276
|
+
...g.onBeforeRouteEnter,
|
|
1269
1277
|
...A.onBeforeRouteEnter,
|
|
1270
|
-
...
|
|
1278
|
+
...g.onBeforeRouteUpdate,
|
|
1271
1279
|
...A.onBeforeRouteUpdate,
|
|
1272
|
-
...
|
|
1273
|
-
...
|
|
1280
|
+
...k.onBeforeRouteUpdate,
|
|
1281
|
+
...g.onBeforeRouteLeave,
|
|
1274
1282
|
...A.onBeforeRouteLeave,
|
|
1275
|
-
...
|
|
1276
|
-
...R.onBeforeRouteLeave
|
|
1283
|
+
...k.onBeforeRouteLeave
|
|
1277
1284
|
];
|
|
1278
1285
|
try {
|
|
1279
|
-
const
|
|
1280
|
-
from:
|
|
1281
|
-
reject:
|
|
1282
|
-
push:
|
|
1283
|
-
replace:
|
|
1284
|
-
abort:
|
|
1285
|
-
})
|
|
1286
|
-
await Promise.all(
|
|
1287
|
-
} catch (
|
|
1288
|
-
if (
|
|
1289
|
-
return
|
|
1290
|
-
throw
|
|
1286
|
+
const d = u.map((x) => t(() => x(f, {
|
|
1287
|
+
from: i,
|
|
1288
|
+
reject: n,
|
|
1289
|
+
push: o,
|
|
1290
|
+
replace: a,
|
|
1291
|
+
abort: s
|
|
1292
|
+
})));
|
|
1293
|
+
await Promise.all(d);
|
|
1294
|
+
} catch (d) {
|
|
1295
|
+
if (d instanceof le || d instanceof Ue || d instanceof Kt)
|
|
1296
|
+
return d.response;
|
|
1297
|
+
throw d;
|
|
1291
1298
|
}
|
|
1292
1299
|
return {
|
|
1293
1300
|
status: "SUCCESS"
|
|
1294
1301
|
};
|
|
1295
1302
|
}
|
|
1296
|
-
async function
|
|
1297
|
-
const { global:
|
|
1298
|
-
...
|
|
1299
|
-
...P.onAfterRouteLeave,
|
|
1303
|
+
async function w({ to: f, from: i }) {
|
|
1304
|
+
const { global: E, component: k } = r, A = On(f, i), g = Hn(f, i, E), u = [
|
|
1305
|
+
...k.onAfterRouteLeave,
|
|
1300
1306
|
...A.onAfterRouteLeave,
|
|
1301
|
-
...
|
|
1302
|
-
...
|
|
1307
|
+
...g.onAfterRouteLeave,
|
|
1308
|
+
...k.onAfterRouteUpdate,
|
|
1303
1309
|
...A.onAfterRouteUpdate,
|
|
1304
|
-
...
|
|
1305
|
-
...
|
|
1306
|
-
...A.onAfterRouteEnter
|
|
1310
|
+
...g.onAfterRouteUpdate,
|
|
1311
|
+
...k.onAfterRouteEnter,
|
|
1312
|
+
...A.onAfterRouteEnter,
|
|
1313
|
+
...g.onAfterRouteEnter
|
|
1307
1314
|
];
|
|
1308
1315
|
try {
|
|
1309
|
-
const
|
|
1310
|
-
from:
|
|
1311
|
-
reject:
|
|
1312
|
-
push:
|
|
1313
|
-
replace:
|
|
1314
|
-
})
|
|
1315
|
-
await Promise.all(
|
|
1316
|
-
} catch (
|
|
1317
|
-
if (
|
|
1318
|
-
return
|
|
1319
|
-
throw
|
|
1316
|
+
const d = u.map((x) => t(() => x(f, {
|
|
1317
|
+
from: i,
|
|
1318
|
+
reject: n,
|
|
1319
|
+
push: o,
|
|
1320
|
+
replace: a
|
|
1321
|
+
})));
|
|
1322
|
+
await Promise.all(d);
|
|
1323
|
+
} catch (d) {
|
|
1324
|
+
if (d instanceof le || d instanceof Ue)
|
|
1325
|
+
return d.response;
|
|
1326
|
+
throw d;
|
|
1320
1327
|
}
|
|
1321
1328
|
return {
|
|
1322
1329
|
status: "SUCCESS"
|
|
@@ -1324,30 +1331,31 @@ function qn() {
|
|
|
1324
1331
|
}
|
|
1325
1332
|
return {
|
|
1326
1333
|
runBeforeRouteHooks: S,
|
|
1327
|
-
runAfterRouteHooks:
|
|
1328
|
-
addComponentBeforeRouteHook: ({ lifecycle:
|
|
1329
|
-
const
|
|
1330
|
-
if (
|
|
1331
|
-
return
|
|
1334
|
+
runAfterRouteHooks: w,
|
|
1335
|
+
addComponentBeforeRouteHook: ({ lifecycle: f, depth: i, hook: E }) => {
|
|
1336
|
+
const k = gt(f), A = r.component[f], g = (u, d) => {
|
|
1337
|
+
if (k(u, d.from, i))
|
|
1338
|
+
return E(u, d);
|
|
1332
1339
|
};
|
|
1333
|
-
return
|
|
1340
|
+
return A.add(g), () => A.delete(g);
|
|
1334
1341
|
},
|
|
1335
|
-
addComponentAfterRouteHook: ({ lifecycle:
|
|
1336
|
-
const
|
|
1337
|
-
if (
|
|
1338
|
-
return
|
|
1342
|
+
addComponentAfterRouteHook: ({ lifecycle: f, depth: i, hook: E }) => {
|
|
1343
|
+
const k = gt(f), A = r.component[f], g = (u, d) => {
|
|
1344
|
+
if (k(u, d.from, i))
|
|
1345
|
+
return E(u, d);
|
|
1339
1346
|
};
|
|
1340
|
-
return
|
|
1347
|
+
return A.add(g), () => A.delete(g);
|
|
1341
1348
|
},
|
|
1342
|
-
addGlobalRouteHooks: (
|
|
1343
|
-
|
|
1349
|
+
addGlobalRouteHooks: (f) => {
|
|
1350
|
+
f.onBeforeRouteEnter.forEach((i) => l(i)), f.onBeforeRouteUpdate.forEach((i) => p(i)), f.onBeforeRouteLeave.forEach((i) => c(i)), f.onAfterRouteEnter.forEach((i) => y(i)), f.onAfterRouteUpdate.forEach((i) => b(i)), f.onAfterRouteLeave.forEach((i) => L(i));
|
|
1344
1351
|
},
|
|
1345
|
-
onBeforeRouteEnter:
|
|
1346
|
-
onBeforeRouteUpdate:
|
|
1347
|
-
onBeforeRouteLeave:
|
|
1348
|
-
onAfterRouteEnter:
|
|
1349
|
-
onAfterRouteUpdate:
|
|
1350
|
-
onAfterRouteLeave:
|
|
1352
|
+
onBeforeRouteEnter: l,
|
|
1353
|
+
onBeforeRouteUpdate: p,
|
|
1354
|
+
onBeforeRouteLeave: c,
|
|
1355
|
+
onAfterRouteEnter: y,
|
|
1356
|
+
onAfterRouteUpdate: b,
|
|
1357
|
+
onAfterRouteLeave: L,
|
|
1358
|
+
setVueApp: e
|
|
1351
1359
|
};
|
|
1352
1360
|
}
|
|
1353
1361
|
function hr() {
|
|
@@ -1358,17 +1366,17 @@ function hr() {
|
|
|
1358
1366
|
}
|
|
1359
1367
|
function pr(e) {
|
|
1360
1368
|
return (t) => {
|
|
1361
|
-
const r =
|
|
1369
|
+
const r = ct(), o = hr().addComponentBeforeRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
|
|
1362
1370
|
return Ze(o), o;
|
|
1363
1371
|
};
|
|
1364
1372
|
}
|
|
1365
1373
|
function dr(e) {
|
|
1366
1374
|
return (t) => {
|
|
1367
|
-
const r =
|
|
1375
|
+
const r = ct(), o = hr().addComponentAfterRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
|
|
1368
1376
|
return Ze(o), o;
|
|
1369
1377
|
};
|
|
1370
1378
|
}
|
|
1371
|
-
const
|
|
1379
|
+
const xo = pr("onBeforeRouteLeave"), Uo = pr("onBeforeRouteUpdate"), Lo = dr("onAfterRouteLeave"), Bo = dr("onAfterRouteUpdate");
|
|
1372
1380
|
function K() {
|
|
1373
1381
|
return K = Object.assign ? Object.assign.bind() : function(e) {
|
|
1374
1382
|
for (var t = 1; t < arguments.length; t++) {
|
|
@@ -1396,36 +1404,36 @@ function X(e, t) {
|
|
|
1396
1404
|
}
|
|
1397
1405
|
}
|
|
1398
1406
|
}
|
|
1399
|
-
var Le = "beforeunload",
|
|
1400
|
-
function
|
|
1407
|
+
var Le = "beforeunload", qn = "hashchange", mr = "popstate";
|
|
1408
|
+
function Rt(e) {
|
|
1401
1409
|
e === void 0 && (e = {});
|
|
1402
1410
|
var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
|
|
1403
1411
|
function a() {
|
|
1404
|
-
var
|
|
1405
|
-
return [
|
|
1406
|
-
pathname:
|
|
1407
|
-
search:
|
|
1412
|
+
var g = n.location, u = g.pathname, d = g.search, x = g.hash, U = o.state || {};
|
|
1413
|
+
return [U.idx, pe({
|
|
1414
|
+
pathname: u,
|
|
1415
|
+
search: d,
|
|
1408
1416
|
hash: x,
|
|
1409
|
-
state:
|
|
1410
|
-
key:
|
|
1417
|
+
state: U.usr || null,
|
|
1418
|
+
key: U.key || "default"
|
|
1411
1419
|
})];
|
|
1412
1420
|
}
|
|
1413
1421
|
var s = null;
|
|
1414
|
-
function
|
|
1422
|
+
function l() {
|
|
1415
1423
|
if (s)
|
|
1416
|
-
|
|
1424
|
+
S.call(s), s = null;
|
|
1417
1425
|
else {
|
|
1418
|
-
var
|
|
1419
|
-
if (
|
|
1420
|
-
if (
|
|
1421
|
-
var
|
|
1422
|
-
|
|
1423
|
-
action:
|
|
1426
|
+
var g = j.Pop, u = a(), d = u[0], x = u[1];
|
|
1427
|
+
if (S.length)
|
|
1428
|
+
if (d != null) {
|
|
1429
|
+
var U = y - d;
|
|
1430
|
+
U && (s = {
|
|
1431
|
+
action: g,
|
|
1424
1432
|
location: x,
|
|
1425
1433
|
retry: function() {
|
|
1426
|
-
|
|
1434
|
+
k(U * -1);
|
|
1427
1435
|
}
|
|
1428
|
-
},
|
|
1436
|
+
}, k(U));
|
|
1429
1437
|
} else
|
|
1430
1438
|
process.env.NODE_ENV !== "production" && X(
|
|
1431
1439
|
!1,
|
|
@@ -1435,131 +1443,131 @@ function wt(e) {
|
|
|
1435
1443
|
"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation."
|
|
1436
1444
|
);
|
|
1437
1445
|
else
|
|
1438
|
-
|
|
1446
|
+
f(g);
|
|
1439
1447
|
}
|
|
1440
1448
|
}
|
|
1441
|
-
n.addEventListener(mr,
|
|
1442
|
-
var p = j.Pop,
|
|
1443
|
-
|
|
1444
|
-
idx:
|
|
1449
|
+
n.addEventListener(mr, l);
|
|
1450
|
+
var p = j.Pop, c = a(), y = c[0], b = c[1], L = de(), S = de();
|
|
1451
|
+
y == null && (y = 0, o.replaceState(K({}, o.state, {
|
|
1452
|
+
idx: y
|
|
1445
1453
|
}), ""));
|
|
1446
|
-
function g
|
|
1447
|
-
return typeof
|
|
1454
|
+
function w(g) {
|
|
1455
|
+
return typeof g == "string" ? g : ee(g);
|
|
1448
1456
|
}
|
|
1449
|
-
function
|
|
1450
|
-
return
|
|
1451
|
-
pathname:
|
|
1457
|
+
function m(g, u) {
|
|
1458
|
+
return u === void 0 && (u = null), pe(K({
|
|
1459
|
+
pathname: b.pathname,
|
|
1452
1460
|
hash: "",
|
|
1453
1461
|
search: ""
|
|
1454
|
-
}, typeof
|
|
1455
|
-
state:
|
|
1462
|
+
}, typeof g == "string" ? we(g) : g, {
|
|
1463
|
+
state: u,
|
|
1456
1464
|
key: Ce()
|
|
1457
1465
|
}));
|
|
1458
1466
|
}
|
|
1459
|
-
function
|
|
1467
|
+
function h(g, u) {
|
|
1460
1468
|
return [{
|
|
1461
|
-
usr:
|
|
1462
|
-
key:
|
|
1463
|
-
idx:
|
|
1464
|
-
}, g
|
|
1465
|
-
}
|
|
1466
|
-
function
|
|
1467
|
-
return !
|
|
1468
|
-
action:
|
|
1469
|
-
location:
|
|
1470
|
-
retry:
|
|
1469
|
+
usr: g.state,
|
|
1470
|
+
key: g.key,
|
|
1471
|
+
idx: u
|
|
1472
|
+
}, w(g)];
|
|
1473
|
+
}
|
|
1474
|
+
function R(g, u, d) {
|
|
1475
|
+
return !S.length || (S.call({
|
|
1476
|
+
action: g,
|
|
1477
|
+
location: u,
|
|
1478
|
+
retry: d
|
|
1471
1479
|
}), !1);
|
|
1472
1480
|
}
|
|
1473
|
-
function
|
|
1474
|
-
p =
|
|
1475
|
-
var
|
|
1476
|
-
|
|
1481
|
+
function f(g) {
|
|
1482
|
+
p = g;
|
|
1483
|
+
var u = a();
|
|
1484
|
+
y = u[0], b = u[1], L.call({
|
|
1477
1485
|
action: p,
|
|
1478
|
-
location:
|
|
1486
|
+
location: b
|
|
1479
1487
|
});
|
|
1480
1488
|
}
|
|
1481
|
-
function
|
|
1482
|
-
var
|
|
1483
|
-
function
|
|
1484
|
-
|
|
1489
|
+
function i(g, u) {
|
|
1490
|
+
var d = j.Push, x = m(g, u);
|
|
1491
|
+
function U() {
|
|
1492
|
+
i(g, u);
|
|
1485
1493
|
}
|
|
1486
|
-
if (
|
|
1487
|
-
var C =
|
|
1494
|
+
if (R(d, x, U)) {
|
|
1495
|
+
var C = h(x, y + 1), V = C[0], O = C[1];
|
|
1488
1496
|
try {
|
|
1489
|
-
o.pushState(V, "",
|
|
1497
|
+
o.pushState(V, "", O);
|
|
1490
1498
|
} catch {
|
|
1491
|
-
n.location.assign(
|
|
1499
|
+
n.location.assign(O);
|
|
1492
1500
|
}
|
|
1493
|
-
|
|
1501
|
+
f(d);
|
|
1494
1502
|
}
|
|
1495
1503
|
}
|
|
1496
|
-
function
|
|
1497
|
-
var
|
|
1498
|
-
function
|
|
1499
|
-
|
|
1504
|
+
function E(g, u) {
|
|
1505
|
+
var d = j.Replace, x = m(g, u);
|
|
1506
|
+
function U() {
|
|
1507
|
+
E(g, u);
|
|
1500
1508
|
}
|
|
1501
|
-
if (
|
|
1502
|
-
var C =
|
|
1503
|
-
o.replaceState(V, "",
|
|
1509
|
+
if (R(d, x, U)) {
|
|
1510
|
+
var C = h(x, y), V = C[0], O = C[1];
|
|
1511
|
+
o.replaceState(V, "", O), f(d);
|
|
1504
1512
|
}
|
|
1505
1513
|
}
|
|
1506
|
-
function
|
|
1507
|
-
o.go(
|
|
1514
|
+
function k(g) {
|
|
1515
|
+
o.go(g);
|
|
1508
1516
|
}
|
|
1509
1517
|
var A = {
|
|
1510
1518
|
get action() {
|
|
1511
1519
|
return p;
|
|
1512
1520
|
},
|
|
1513
1521
|
get location() {
|
|
1514
|
-
return
|
|
1522
|
+
return b;
|
|
1515
1523
|
},
|
|
1516
|
-
createHref:
|
|
1517
|
-
push:
|
|
1518
|
-
replace:
|
|
1519
|
-
go:
|
|
1524
|
+
createHref: w,
|
|
1525
|
+
push: i,
|
|
1526
|
+
replace: E,
|
|
1527
|
+
go: k,
|
|
1520
1528
|
back: function() {
|
|
1521
|
-
|
|
1529
|
+
k(-1);
|
|
1522
1530
|
},
|
|
1523
1531
|
forward: function() {
|
|
1524
|
-
|
|
1532
|
+
k(1);
|
|
1525
1533
|
},
|
|
1526
|
-
listen: function(
|
|
1527
|
-
return
|
|
1534
|
+
listen: function(u) {
|
|
1535
|
+
return L.push(u);
|
|
1528
1536
|
},
|
|
1529
|
-
block: function(
|
|
1530
|
-
var
|
|
1531
|
-
return
|
|
1532
|
-
|
|
1537
|
+
block: function(u) {
|
|
1538
|
+
var d = S.push(u);
|
|
1539
|
+
return S.length === 1 && n.addEventListener(Le, Be), function() {
|
|
1540
|
+
d(), S.length || n.removeEventListener(Le, Be);
|
|
1533
1541
|
};
|
|
1534
1542
|
}
|
|
1535
1543
|
};
|
|
1536
1544
|
return A;
|
|
1537
1545
|
}
|
|
1538
|
-
function
|
|
1546
|
+
function In(e) {
|
|
1539
1547
|
e === void 0 && (e = {});
|
|
1540
1548
|
var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
|
|
1541
1549
|
function a() {
|
|
1542
|
-
var
|
|
1543
|
-
return [
|
|
1550
|
+
var u = we(n.location.hash.substr(1)), d = u.pathname, x = d === void 0 ? "/" : d, U = u.search, C = U === void 0 ? "" : U, V = u.hash, O = V === void 0 ? "" : V, q = o.state || {};
|
|
1551
|
+
return [q.idx, pe({
|
|
1544
1552
|
pathname: x,
|
|
1545
1553
|
search: C,
|
|
1546
|
-
hash:
|
|
1547
|
-
state:
|
|
1548
|
-
key:
|
|
1554
|
+
hash: O,
|
|
1555
|
+
state: q.usr || null,
|
|
1556
|
+
key: q.key || "default"
|
|
1549
1557
|
})];
|
|
1550
1558
|
}
|
|
1551
1559
|
var s = null;
|
|
1552
|
-
function
|
|
1560
|
+
function l() {
|
|
1553
1561
|
if (s)
|
|
1554
|
-
|
|
1562
|
+
S.call(s), s = null;
|
|
1555
1563
|
else {
|
|
1556
|
-
var
|
|
1557
|
-
if (
|
|
1564
|
+
var u = j.Pop, d = a(), x = d[0], U = d[1];
|
|
1565
|
+
if (S.length)
|
|
1558
1566
|
if (x != null) {
|
|
1559
|
-
var C =
|
|
1567
|
+
var C = y - x;
|
|
1560
1568
|
C && (s = {
|
|
1561
|
-
action:
|
|
1562
|
-
location:
|
|
1569
|
+
action: u,
|
|
1570
|
+
location: U,
|
|
1563
1571
|
retry: function() {
|
|
1564
1572
|
A(C * -1);
|
|
1565
1573
|
}
|
|
@@ -1573,98 +1581,98 @@ function Dn(e) {
|
|
|
1573
1581
|
"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation."
|
|
1574
1582
|
);
|
|
1575
1583
|
else
|
|
1576
|
-
|
|
1584
|
+
i(u);
|
|
1577
1585
|
}
|
|
1578
1586
|
}
|
|
1579
|
-
n.addEventListener(mr,
|
|
1580
|
-
var
|
|
1581
|
-
ee(
|
|
1587
|
+
n.addEventListener(mr, l), n.addEventListener(qn, function() {
|
|
1588
|
+
var u = a(), d = u[1];
|
|
1589
|
+
ee(d) !== ee(b) && l();
|
|
1582
1590
|
});
|
|
1583
|
-
var p = j.Pop,
|
|
1584
|
-
|
|
1585
|
-
idx:
|
|
1591
|
+
var p = j.Pop, c = a(), y = c[0], b = c[1], L = de(), S = de();
|
|
1592
|
+
y == null && (y = 0, o.replaceState(K({}, o.state, {
|
|
1593
|
+
idx: y
|
|
1586
1594
|
}), ""));
|
|
1587
|
-
function
|
|
1588
|
-
var
|
|
1589
|
-
if (
|
|
1590
|
-
var x = n.location.href,
|
|
1591
|
-
|
|
1595
|
+
function w() {
|
|
1596
|
+
var u = document.querySelector("base"), d = "";
|
|
1597
|
+
if (u && u.getAttribute("href")) {
|
|
1598
|
+
var x = n.location.href, U = x.indexOf("#");
|
|
1599
|
+
d = U === -1 ? x : x.slice(0, U);
|
|
1592
1600
|
}
|
|
1593
|
-
return
|
|
1601
|
+
return d;
|
|
1594
1602
|
}
|
|
1595
|
-
function
|
|
1596
|
-
return
|
|
1603
|
+
function m(u) {
|
|
1604
|
+
return w() + "#" + (typeof u == "string" ? u : ee(u));
|
|
1597
1605
|
}
|
|
1598
|
-
function
|
|
1599
|
-
return
|
|
1600
|
-
pathname:
|
|
1606
|
+
function h(u, d) {
|
|
1607
|
+
return d === void 0 && (d = null), pe(K({
|
|
1608
|
+
pathname: b.pathname,
|
|
1601
1609
|
hash: "",
|
|
1602
1610
|
search: ""
|
|
1603
|
-
}, typeof
|
|
1604
|
-
state:
|
|
1611
|
+
}, typeof u == "string" ? we(u) : u, {
|
|
1612
|
+
state: d,
|
|
1605
1613
|
key: Ce()
|
|
1606
1614
|
}));
|
|
1607
1615
|
}
|
|
1608
|
-
function u
|
|
1616
|
+
function R(u, d) {
|
|
1609
1617
|
return [{
|
|
1610
|
-
usr:
|
|
1611
|
-
key:
|
|
1612
|
-
idx:
|
|
1613
|
-
},
|
|
1614
|
-
}
|
|
1615
|
-
function
|
|
1616
|
-
return !
|
|
1617
|
-
action:
|
|
1618
|
-
location:
|
|
1618
|
+
usr: u.state,
|
|
1619
|
+
key: u.key,
|
|
1620
|
+
idx: d
|
|
1621
|
+
}, m(u)];
|
|
1622
|
+
}
|
|
1623
|
+
function f(u, d, x) {
|
|
1624
|
+
return !S.length || (S.call({
|
|
1625
|
+
action: u,
|
|
1626
|
+
location: d,
|
|
1619
1627
|
retry: x
|
|
1620
1628
|
}), !1);
|
|
1621
1629
|
}
|
|
1622
|
-
function
|
|
1623
|
-
p =
|
|
1624
|
-
var
|
|
1625
|
-
|
|
1630
|
+
function i(u) {
|
|
1631
|
+
p = u;
|
|
1632
|
+
var d = a();
|
|
1633
|
+
y = d[0], b = d[1], L.call({
|
|
1626
1634
|
action: p,
|
|
1627
|
-
location:
|
|
1635
|
+
location: b
|
|
1628
1636
|
});
|
|
1629
1637
|
}
|
|
1630
|
-
function
|
|
1631
|
-
var x = j.Push,
|
|
1638
|
+
function E(u, d) {
|
|
1639
|
+
var x = j.Push, U = h(u, d);
|
|
1632
1640
|
function C() {
|
|
1633
|
-
|
|
1641
|
+
E(u, d);
|
|
1634
1642
|
}
|
|
1635
|
-
if (process.env.NODE_ENV !== "production" && X(
|
|
1636
|
-
var V =
|
|
1643
|
+
if (process.env.NODE_ENV !== "production" && X(U.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(u) + ")"), f(x, U, C)) {
|
|
1644
|
+
var V = R(U, y + 1), O = V[0], q = V[1];
|
|
1637
1645
|
try {
|
|
1638
|
-
o.pushState(
|
|
1646
|
+
o.pushState(O, "", q);
|
|
1639
1647
|
} catch {
|
|
1640
|
-
n.location.assign(
|
|
1648
|
+
n.location.assign(q);
|
|
1641
1649
|
}
|
|
1642
|
-
|
|
1650
|
+
i(x);
|
|
1643
1651
|
}
|
|
1644
1652
|
}
|
|
1645
|
-
function
|
|
1646
|
-
var x = j.Replace,
|
|
1653
|
+
function k(u, d) {
|
|
1654
|
+
var x = j.Replace, U = h(u, d);
|
|
1647
1655
|
function C() {
|
|
1648
|
-
|
|
1656
|
+
k(u, d);
|
|
1649
1657
|
}
|
|
1650
|
-
if (process.env.NODE_ENV !== "production" && X(
|
|
1651
|
-
var V =
|
|
1652
|
-
o.replaceState(
|
|
1658
|
+
if (process.env.NODE_ENV !== "production" && X(U.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(u) + ")"), f(x, U, C)) {
|
|
1659
|
+
var V = R(U, y), O = V[0], q = V[1];
|
|
1660
|
+
o.replaceState(O, "", q), i(x);
|
|
1653
1661
|
}
|
|
1654
1662
|
}
|
|
1655
|
-
function A(
|
|
1656
|
-
o.go(
|
|
1663
|
+
function A(u) {
|
|
1664
|
+
o.go(u);
|
|
1657
1665
|
}
|
|
1658
|
-
var
|
|
1666
|
+
var g = {
|
|
1659
1667
|
get action() {
|
|
1660
1668
|
return p;
|
|
1661
1669
|
},
|
|
1662
1670
|
get location() {
|
|
1663
|
-
return
|
|
1671
|
+
return b;
|
|
1664
1672
|
},
|
|
1665
|
-
createHref:
|
|
1666
|
-
push:
|
|
1667
|
-
replace:
|
|
1673
|
+
createHref: m,
|
|
1674
|
+
push: E,
|
|
1675
|
+
replace: k,
|
|
1668
1676
|
go: A,
|
|
1669
1677
|
back: function() {
|
|
1670
1678
|
A(-1);
|
|
@@ -1672,107 +1680,107 @@ function Dn(e) {
|
|
|
1672
1680
|
forward: function() {
|
|
1673
1681
|
A(1);
|
|
1674
1682
|
},
|
|
1675
|
-
listen: function(
|
|
1676
|
-
return
|
|
1683
|
+
listen: function(d) {
|
|
1684
|
+
return L.push(d);
|
|
1677
1685
|
},
|
|
1678
|
-
block: function(
|
|
1679
|
-
var x =
|
|
1680
|
-
return
|
|
1681
|
-
x(),
|
|
1686
|
+
block: function(d) {
|
|
1687
|
+
var x = S.push(d);
|
|
1688
|
+
return S.length === 1 && n.addEventListener(Le, Be), function() {
|
|
1689
|
+
x(), S.length || n.removeEventListener(Le, Be);
|
|
1682
1690
|
};
|
|
1683
1691
|
}
|
|
1684
1692
|
};
|
|
1685
|
-
return
|
|
1693
|
+
return g;
|
|
1686
1694
|
}
|
|
1687
|
-
function
|
|
1695
|
+
function wt(e) {
|
|
1688
1696
|
e === void 0 && (e = {});
|
|
1689
|
-
var t = e, r = t.initialEntries, n = r === void 0 ? ["/"] : r, o = t.initialIndex, a = n.map(function(
|
|
1690
|
-
var
|
|
1697
|
+
var t = e, r = t.initialEntries, n = r === void 0 ? ["/"] : r, o = t.initialIndex, a = n.map(function(i) {
|
|
1698
|
+
var E = pe(K({
|
|
1691
1699
|
pathname: "/",
|
|
1692
1700
|
search: "",
|
|
1693
1701
|
hash: "",
|
|
1694
1702
|
state: null,
|
|
1695
1703
|
key: Ce()
|
|
1696
|
-
}, typeof
|
|
1697
|
-
return process.env.NODE_ENV !== "production" && X(
|
|
1698
|
-
}), s =
|
|
1699
|
-
function
|
|
1700
|
-
return typeof
|
|
1701
|
-
}
|
|
1702
|
-
function
|
|
1703
|
-
return
|
|
1704
|
+
}, typeof i == "string" ? we(i) : i));
|
|
1705
|
+
return process.env.NODE_ENV !== "production" && X(E.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(i) + ")"), E;
|
|
1706
|
+
}), s = vt(o ?? a.length - 1, 0, a.length - 1), l = j.Pop, p = a[s], c = de(), y = de();
|
|
1707
|
+
function b(i) {
|
|
1708
|
+
return typeof i == "string" ? i : ee(i);
|
|
1709
|
+
}
|
|
1710
|
+
function L(i, E) {
|
|
1711
|
+
return E === void 0 && (E = null), pe(K({
|
|
1704
1712
|
pathname: p.pathname,
|
|
1705
1713
|
search: "",
|
|
1706
1714
|
hash: ""
|
|
1707
|
-
}, typeof
|
|
1708
|
-
state:
|
|
1715
|
+
}, typeof i == "string" ? we(i) : i, {
|
|
1716
|
+
state: E,
|
|
1709
1717
|
key: Ce()
|
|
1710
1718
|
}));
|
|
1711
1719
|
}
|
|
1712
|
-
function
|
|
1713
|
-
return !
|
|
1714
|
-
action:
|
|
1715
|
-
location:
|
|
1716
|
-
retry:
|
|
1720
|
+
function S(i, E, k) {
|
|
1721
|
+
return !y.length || (y.call({
|
|
1722
|
+
action: i,
|
|
1723
|
+
location: E,
|
|
1724
|
+
retry: k
|
|
1717
1725
|
}), !1);
|
|
1718
1726
|
}
|
|
1719
|
-
function
|
|
1720
|
-
|
|
1721
|
-
action:
|
|
1727
|
+
function w(i, E) {
|
|
1728
|
+
l = i, p = E, c.call({
|
|
1729
|
+
action: l,
|
|
1722
1730
|
location: p
|
|
1723
1731
|
});
|
|
1724
1732
|
}
|
|
1725
|
-
function
|
|
1726
|
-
var
|
|
1727
|
-
function
|
|
1728
|
-
|
|
1733
|
+
function m(i, E) {
|
|
1734
|
+
var k = j.Push, A = L(i, E);
|
|
1735
|
+
function g() {
|
|
1736
|
+
m(i, E);
|
|
1729
1737
|
}
|
|
1730
|
-
process.env.NODE_ENV !== "production" && X(p.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(
|
|
1738
|
+
process.env.NODE_ENV !== "production" && X(p.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(i) + ")"), S(k, A, g) && (s += 1, a.splice(s, a.length, A), w(k, A));
|
|
1731
1739
|
}
|
|
1732
|
-
function
|
|
1733
|
-
var
|
|
1734
|
-
function
|
|
1735
|
-
|
|
1740
|
+
function h(i, E) {
|
|
1741
|
+
var k = j.Replace, A = L(i, E);
|
|
1742
|
+
function g() {
|
|
1743
|
+
h(i, E);
|
|
1736
1744
|
}
|
|
1737
|
-
process.env.NODE_ENV !== "production" && X(p.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(
|
|
1745
|
+
process.env.NODE_ENV !== "production" && X(p.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(i) + ")"), S(k, A, g) && (a[s] = A, w(k, A));
|
|
1738
1746
|
}
|
|
1739
|
-
function
|
|
1740
|
-
var
|
|
1741
|
-
function
|
|
1742
|
-
|
|
1747
|
+
function R(i) {
|
|
1748
|
+
var E = vt(s + i, 0, a.length - 1), k = j.Pop, A = a[E];
|
|
1749
|
+
function g() {
|
|
1750
|
+
R(i);
|
|
1743
1751
|
}
|
|
1744
|
-
k
|
|
1752
|
+
S(k, A, g) && (s = E, w(k, A));
|
|
1745
1753
|
}
|
|
1746
|
-
var
|
|
1754
|
+
var f = {
|
|
1747
1755
|
get index() {
|
|
1748
1756
|
return s;
|
|
1749
1757
|
},
|
|
1750
1758
|
get action() {
|
|
1751
|
-
return
|
|
1759
|
+
return l;
|
|
1752
1760
|
},
|
|
1753
1761
|
get location() {
|
|
1754
1762
|
return p;
|
|
1755
1763
|
},
|
|
1756
|
-
createHref:
|
|
1757
|
-
push:
|
|
1758
|
-
replace:
|
|
1759
|
-
go:
|
|
1764
|
+
createHref: b,
|
|
1765
|
+
push: m,
|
|
1766
|
+
replace: h,
|
|
1767
|
+
go: R,
|
|
1760
1768
|
back: function() {
|
|
1761
|
-
|
|
1769
|
+
R(-1);
|
|
1762
1770
|
},
|
|
1763
1771
|
forward: function() {
|
|
1764
|
-
|
|
1772
|
+
R(1);
|
|
1765
1773
|
},
|
|
1766
|
-
listen: function(
|
|
1767
|
-
return
|
|
1774
|
+
listen: function(E) {
|
|
1775
|
+
return c.push(E);
|
|
1768
1776
|
},
|
|
1769
|
-
block: function(
|
|
1770
|
-
return
|
|
1777
|
+
block: function(E) {
|
|
1778
|
+
return y.push(E);
|
|
1771
1779
|
}
|
|
1772
1780
|
};
|
|
1773
|
-
return
|
|
1781
|
+
return f;
|
|
1774
1782
|
}
|
|
1775
|
-
function
|
|
1783
|
+
function vt(e, t, r) {
|
|
1776
1784
|
return Math.min(Math.max(e, t), r);
|
|
1777
1785
|
}
|
|
1778
1786
|
function Be(e) {
|
|
@@ -1816,23 +1824,23 @@ function we(e) {
|
|
|
1816
1824
|
return t;
|
|
1817
1825
|
}
|
|
1818
1826
|
const yr = Symbol();
|
|
1819
|
-
function
|
|
1827
|
+
function Dn(e, t) {
|
|
1820
1828
|
const r = Ve({ ...e }), n = (s) => {
|
|
1821
1829
|
Object.assign(r, {
|
|
1822
1830
|
[yr]: !1,
|
|
1823
1831
|
...s
|
|
1824
1832
|
});
|
|
1825
|
-
}, o = r, a =
|
|
1833
|
+
}, o = r, a = Sn(o, t);
|
|
1826
1834
|
return {
|
|
1827
1835
|
currentRoute: o,
|
|
1828
1836
|
routerRoute: a,
|
|
1829
1837
|
updateRoute: n
|
|
1830
1838
|
};
|
|
1831
1839
|
}
|
|
1832
|
-
function
|
|
1833
|
-
return !e.startsWith("http") ?
|
|
1840
|
+
function _(e) {
|
|
1841
|
+
return !e.startsWith("http") ? Tn(e) : Fn(e);
|
|
1834
1842
|
}
|
|
1835
|
-
function
|
|
1843
|
+
function Fn(e) {
|
|
1836
1844
|
const { protocol: t, host: r, pathname: n, search: o, searchParams: a, hash: s } = new URL(e, e);
|
|
1837
1845
|
return {
|
|
1838
1846
|
protocol: t,
|
|
@@ -1843,7 +1851,7 @@ function Tn(e) {
|
|
|
1843
1851
|
hash: s
|
|
1844
1852
|
};
|
|
1845
1853
|
}
|
|
1846
|
-
function
|
|
1854
|
+
function Tn(e) {
|
|
1847
1855
|
const { pathname: t, search: r, searchParams: n, hash: o } = new URL(e, "https://localhost");
|
|
1848
1856
|
return {
|
|
1849
1857
|
pathname: t,
|
|
@@ -1852,19 +1860,19 @@ function Mn(e) {
|
|
|
1852
1860
|
hash: o
|
|
1853
1861
|
};
|
|
1854
1862
|
}
|
|
1855
|
-
function
|
|
1863
|
+
function Mn(e) {
|
|
1856
1864
|
return (t) => {
|
|
1857
|
-
const { host: r } =
|
|
1865
|
+
const { host: r } = _(t);
|
|
1858
1866
|
return !(r === void 0 || r === e);
|
|
1859
1867
|
};
|
|
1860
1868
|
}
|
|
1861
|
-
function
|
|
1862
|
-
const r =
|
|
1863
|
-
if (
|
|
1864
|
-
r.replace(p,
|
|
1869
|
+
function Jn({ mode: e, listener: t }) {
|
|
1870
|
+
const r = Wn(e), n = (p, c) => {
|
|
1871
|
+
if (c != null && c.replace) {
|
|
1872
|
+
r.replace(p, c.state);
|
|
1865
1873
|
return;
|
|
1866
1874
|
}
|
|
1867
|
-
r.push(p,
|
|
1875
|
+
r.push(p, c == null ? void 0 : c.state);
|
|
1868
1876
|
}, o = () => {
|
|
1869
1877
|
const p = ee(r.location);
|
|
1870
1878
|
r.replace(p);
|
|
@@ -1882,41 +1890,41 @@ function Wn({ mode: e, listener: t }) {
|
|
|
1882
1890
|
}
|
|
1883
1891
|
};
|
|
1884
1892
|
}
|
|
1885
|
-
function
|
|
1893
|
+
function Wn(e = "auto") {
|
|
1886
1894
|
switch (e) {
|
|
1887
1895
|
case "auto":
|
|
1888
|
-
return
|
|
1896
|
+
return tt() ? Rt() : wt();
|
|
1889
1897
|
case "browser":
|
|
1890
|
-
return
|
|
1898
|
+
return Rt();
|
|
1891
1899
|
case "memory":
|
|
1892
|
-
return
|
|
1900
|
+
return wt();
|
|
1893
1901
|
case "hash":
|
|
1894
|
-
return
|
|
1902
|
+
return In();
|
|
1895
1903
|
default:
|
|
1896
1904
|
const t = e;
|
|
1897
1905
|
throw new Error(`Switch is not exhaustive for mode: ${t}`);
|
|
1898
1906
|
}
|
|
1899
1907
|
}
|
|
1900
|
-
function
|
|
1908
|
+
function Gn(e) {
|
|
1901
1909
|
return me(() => () => ue("h1", e), {
|
|
1902
1910
|
name: e,
|
|
1903
1911
|
props: []
|
|
1904
1912
|
});
|
|
1905
1913
|
}
|
|
1906
|
-
function
|
|
1907
|
-
const t = (a) => Ae(e[a] ??
|
|
1908
|
-
const s = Ae(t(a)),
|
|
1909
|
-
id:
|
|
1914
|
+
function zn(e) {
|
|
1915
|
+
const t = (a) => Ae(e[a] ?? Gn(a)), r = (a) => {
|
|
1916
|
+
const s = Ae(t(a)), l = {
|
|
1917
|
+
id: ot(),
|
|
1910
1918
|
component: s,
|
|
1911
1919
|
meta: {},
|
|
1912
1920
|
state: {}
|
|
1913
1921
|
};
|
|
1914
1922
|
return {
|
|
1915
|
-
id:
|
|
1916
|
-
matched:
|
|
1917
|
-
matches: [
|
|
1923
|
+
id: l.id,
|
|
1924
|
+
matched: l,
|
|
1925
|
+
matches: [l],
|
|
1918
1926
|
name: a,
|
|
1919
|
-
query:
|
|
1927
|
+
query: rt(""),
|
|
1920
1928
|
params: {},
|
|
1921
1929
|
state: {},
|
|
1922
1930
|
href: "/",
|
|
@@ -1937,23 +1945,23 @@ function Qn(e) {
|
|
|
1937
1945
|
getRejectionRoute: r
|
|
1938
1946
|
};
|
|
1939
1947
|
}
|
|
1940
|
-
class
|
|
1948
|
+
class Qn extends Error {
|
|
1941
1949
|
constructor() {
|
|
1942
1950
|
super("initialUrl must be set if window.location is unavailable");
|
|
1943
1951
|
}
|
|
1944
1952
|
}
|
|
1945
|
-
function
|
|
1953
|
+
function Kn(e) {
|
|
1946
1954
|
if (e)
|
|
1947
1955
|
return e;
|
|
1948
|
-
if (
|
|
1956
|
+
if (tt())
|
|
1949
1957
|
return window.location.toString();
|
|
1950
|
-
throw new
|
|
1958
|
+
throw new Qn();
|
|
1951
1959
|
}
|
|
1952
1960
|
function gr(e) {
|
|
1953
1961
|
return !!e && typeof e == "object";
|
|
1954
1962
|
}
|
|
1955
1963
|
const Ne = !0;
|
|
1956
|
-
function
|
|
1964
|
+
function Yn(e, t, r) {
|
|
1957
1965
|
if (gr(e) && t in e) {
|
|
1958
1966
|
const n = e[t];
|
|
1959
1967
|
return typeof n == "string" ? re(n, r, Ne) : n;
|
|
@@ -1963,37 +1971,37 @@ function Xn(e, t, r) {
|
|
|
1963
1971
|
function Rr(e, t) {
|
|
1964
1972
|
const r = {};
|
|
1965
1973
|
for (const [n, o] of Object.entries(e)) {
|
|
1966
|
-
const a =
|
|
1974
|
+
const a = Yn(t, n, o);
|
|
1967
1975
|
r[n] = a;
|
|
1968
1976
|
}
|
|
1969
1977
|
return r;
|
|
1970
1978
|
}
|
|
1971
|
-
function
|
|
1979
|
+
function Xn(e, t, r) {
|
|
1972
1980
|
if (gr(e) && t in e) {
|
|
1973
1981
|
const n = e[t];
|
|
1974
1982
|
return ne(n, r, Ne);
|
|
1975
1983
|
}
|
|
1976
1984
|
return ne(void 0, r, Ne);
|
|
1977
1985
|
}
|
|
1978
|
-
const
|
|
1986
|
+
const Et = (e, t) => {
|
|
1979
1987
|
const r = {};
|
|
1980
1988
|
for (const [n, o] of Object.entries(e)) {
|
|
1981
|
-
const a =
|
|
1989
|
+
const a = Xn(t, n, o);
|
|
1982
1990
|
r[n] = a;
|
|
1983
1991
|
}
|
|
1984
1992
|
return r;
|
|
1985
1993
|
};
|
|
1986
|
-
function
|
|
1987
|
-
const e = Ve(/* @__PURE__ */ new Map()), t =
|
|
1988
|
-
e.set(
|
|
1989
|
-
}, n = (
|
|
1990
|
-
e.delete(
|
|
1994
|
+
function eo() {
|
|
1995
|
+
const e = Ve(/* @__PURE__ */ new Map()), t = tt() ? s() : null, r = (l) => {
|
|
1996
|
+
e.set(l, !1), t == null || t.observe(l);
|
|
1997
|
+
}, n = (l) => {
|
|
1998
|
+
e.delete(l), t == null || t.unobserve(l);
|
|
1991
1999
|
}, o = () => {
|
|
1992
2000
|
t == null || t.disconnect();
|
|
1993
|
-
}, a = (
|
|
2001
|
+
}, a = (l) => e.get(l) ?? !1;
|
|
1994
2002
|
function s() {
|
|
1995
|
-
return new IntersectionObserver((
|
|
1996
|
-
|
|
2003
|
+
return new IntersectionObserver((l) => {
|
|
2004
|
+
l.forEach((p) => {
|
|
1997
2005
|
e.set(p.target, p.isIntersecting);
|
|
1998
2006
|
});
|
|
1999
2007
|
});
|
|
@@ -2005,166 +2013,166 @@ function to() {
|
|
|
2005
2013
|
isElementVisible: a
|
|
2006
2014
|
};
|
|
2007
2015
|
}
|
|
2008
|
-
class
|
|
2016
|
+
class to extends Error {
|
|
2009
2017
|
constructor(t) {
|
|
2010
2018
|
super(`Route not found: "${t}"`);
|
|
2011
2019
|
}
|
|
2012
2020
|
}
|
|
2013
2021
|
function wr(e, t, r) {
|
|
2014
|
-
const n =
|
|
2022
|
+
const n = tn(t.value, r), o = qt(n), [a] = Dt(e, new RegExp(o, "g"));
|
|
2015
2023
|
return a;
|
|
2016
2024
|
}
|
|
2017
2025
|
function vr(e, t, r, n) {
|
|
2018
|
-
const o =
|
|
2019
|
-
return e.replace(
|
|
2026
|
+
const o = Ye(t, r), a = ne(n, t.params[r], o);
|
|
2027
|
+
return e.replace(It(r), a);
|
|
2020
2028
|
}
|
|
2021
2029
|
function Er({ protocol: e, host: t, pathname: r, search: n, searchParams: o, hash: a }) {
|
|
2022
2030
|
const s = new URL("https://localhost");
|
|
2023
2031
|
e && (s.protocol = e), t && (s.host = t), r && (s.pathname = r), o ? s.search = new URLSearchParams(o).toString() : n && (s.search = n), a && (s.hash = a);
|
|
2024
|
-
const
|
|
2025
|
-
return
|
|
2032
|
+
const l = s.toString().replace(/^https:\/\/localhost\/*/, "/");
|
|
2033
|
+
return Lt(l);
|
|
2026
2034
|
}
|
|
2027
|
-
function
|
|
2028
|
-
const { params: r = {}, query: n } = t, o =
|
|
2029
|
-
return Er({ protocol:
|
|
2035
|
+
function ro(e, t = {}) {
|
|
2036
|
+
const { params: r = {}, query: n } = t, o = oo(e.query, r), a = st(o, n), s = bt(e.path, r), l = e.hash.value ? bt(e.hash, r) : t.hash, p = no(e.host, r), { protocol: c, host: y } = _(p);
|
|
2037
|
+
return Er({ protocol: c, host: y, pathname: s, searchParams: a, hash: l });
|
|
2030
2038
|
}
|
|
2031
|
-
function
|
|
2039
|
+
function no(e, t) {
|
|
2032
2040
|
const r = e.value && !e.value.startsWith("http") ? `https://${e.value}` : e.value;
|
|
2033
2041
|
return Object.keys(e.params).reduce((n, o) => vr(n, e, o, t[o]), r);
|
|
2034
2042
|
}
|
|
2035
|
-
function
|
|
2043
|
+
function bt(e, t) {
|
|
2036
2044
|
return Object.keys(e.params).reduce((r, n) => vr(r, e, n, t[n]), e.value);
|
|
2037
2045
|
}
|
|
2038
|
-
function
|
|
2046
|
+
function oo(e, t) {
|
|
2039
2047
|
const r = new URLSearchParams(e.value);
|
|
2040
2048
|
if (!e.value)
|
|
2041
2049
|
return r;
|
|
2042
2050
|
for (const [n, o] of Array.from(r.entries())) {
|
|
2043
|
-
const a =
|
|
2051
|
+
const a = et(o);
|
|
2044
2052
|
if (!a)
|
|
2045
2053
|
continue;
|
|
2046
|
-
const
|
|
2047
|
-
|
|
2054
|
+
const l = Xe(o), p = ne(t[a], e.params[a], l), c = t[a] === void 0 && p === "";
|
|
2055
|
+
l && c ? r.delete(n, o) : r.set(n, p);
|
|
2048
2056
|
}
|
|
2049
2057
|
return r;
|
|
2050
2058
|
}
|
|
2051
|
-
const
|
|
2059
|
+
const ao = (e, t) => {
|
|
2052
2060
|
try {
|
|
2053
|
-
|
|
2061
|
+
it(e, t);
|
|
2054
2062
|
} catch {
|
|
2055
2063
|
return !1;
|
|
2056
2064
|
}
|
|
2057
2065
|
return !0;
|
|
2058
|
-
},
|
|
2059
|
-
const { protocol: r, host: n, pathname: o, search: a, hash: s } =
|
|
2066
|
+
}, it = (e, t) => {
|
|
2067
|
+
const { protocol: r, host: n, pathname: o, search: a, hash: s } = _(t);
|
|
2060
2068
|
return {
|
|
2061
2069
|
...Te(e.host, `${r}//${n}`),
|
|
2062
2070
|
...Te(e.path, o),
|
|
2063
|
-
...
|
|
2071
|
+
...so(e.query, a),
|
|
2064
2072
|
...Te(e.hash, s)
|
|
2065
2073
|
};
|
|
2066
2074
|
};
|
|
2067
2075
|
function Te(e, t) {
|
|
2068
2076
|
const r = {}, n = decodeURIComponent(t);
|
|
2069
2077
|
for (const [o, a] of Object.entries(e.params)) {
|
|
2070
|
-
const s = wr(n, e, o),
|
|
2078
|
+
const s = wr(n, e, o), l = Ye(e, o), p = re(s, a, l);
|
|
2071
2079
|
r[o] = p;
|
|
2072
2080
|
}
|
|
2073
2081
|
return r;
|
|
2074
2082
|
}
|
|
2075
|
-
function
|
|
2083
|
+
function so(e, t) {
|
|
2076
2084
|
const r = {}, n = new URLSearchParams(e.value), o = new URLSearchParams(t);
|
|
2077
2085
|
for (const [a, s] of Array.from(n.entries())) {
|
|
2078
|
-
const
|
|
2079
|
-
if (!
|
|
2086
|
+
const l = et(s);
|
|
2087
|
+
if (!l)
|
|
2080
2088
|
continue;
|
|
2081
|
-
const
|
|
2082
|
-
r[
|
|
2089
|
+
const c = Xe(s), y = o.get(a) ?? void 0, b = re(y, e.params[l], c);
|
|
2090
|
+
r[l] = b;
|
|
2083
2091
|
}
|
|
2084
2092
|
return r;
|
|
2085
2093
|
}
|
|
2086
|
-
function
|
|
2087
|
-
const n =
|
|
2094
|
+
function co(e, t = {}, r = {}) {
|
|
2095
|
+
const n = ro(e, {
|
|
2088
2096
|
params: t,
|
|
2089
2097
|
query: r.query,
|
|
2090
2098
|
hash: r.hash
|
|
2091
|
-
}), { search: o, hash: a } =
|
|
2099
|
+
}), { search: o, hash: a } = _(n);
|
|
2092
2100
|
return {
|
|
2093
2101
|
id: e.id,
|
|
2094
2102
|
matched: e.matched,
|
|
2095
2103
|
matches: e.matches,
|
|
2096
2104
|
name: e.name,
|
|
2097
|
-
query:
|
|
2098
|
-
params:
|
|
2105
|
+
query: rt(o),
|
|
2106
|
+
params: it(e, n),
|
|
2099
2107
|
state: Rr(e.state, r.state),
|
|
2100
2108
|
hash: a,
|
|
2101
2109
|
href: n
|
|
2102
2110
|
};
|
|
2103
2111
|
}
|
|
2104
|
-
const
|
|
2105
|
-
const { pathname: r } =
|
|
2106
|
-
return
|
|
2107
|
-
},
|
|
2108
|
-
const { search: r } =
|
|
2109
|
-
return
|
|
2110
|
-
},
|
|
2111
|
-
const { hash: r } =
|
|
2112
|
+
const io = (e) => "name" in e.matched && !!e.matched.name, uo = (e, t) => {
|
|
2113
|
+
const { pathname: r } = _(t);
|
|
2114
|
+
return Xr(e).test(r);
|
|
2115
|
+
}, fo = (e, t) => {
|
|
2116
|
+
const { search: r } = _(t);
|
|
2117
|
+
return en(e).every((o) => o.test(r));
|
|
2118
|
+
}, We = (e, t) => {
|
|
2119
|
+
const { hash: r } = _(t), { value: n } = e.hash;
|
|
2112
2120
|
return J(n) ? `#${n.replace(/^#*/, "")}`.toLowerCase() === r.toLowerCase() : !0;
|
|
2113
2121
|
};
|
|
2114
|
-
function
|
|
2115
|
-
const { searchParams: t, pathname: r } =
|
|
2122
|
+
function lo(e) {
|
|
2123
|
+
const { searchParams: t, pathname: r } = _(e), n = -1, o = 1;
|
|
2116
2124
|
return (a, s) => {
|
|
2117
|
-
const
|
|
2118
|
-
return a.depth > s.depth ? n : a.depth < s.depth ? o :
|
|
2125
|
+
const l = St(a, t), p = Pt(a, r), c = St(s, t), y = Pt(s, r);
|
|
2126
|
+
return a.depth > s.depth ? n : a.depth < s.depth ? o : l + p > c + y ? n : l + p < c + y ? o : We(a, e) ? n : We(s, e) ? o : 0;
|
|
2119
2127
|
};
|
|
2120
2128
|
}
|
|
2121
|
-
function
|
|
2122
|
-
const r = Object.keys(e.path.params).filter((o) =>
|
|
2129
|
+
function Pt(e, t) {
|
|
2130
|
+
const r = Object.keys(e.path.params).filter((o) => Ye(e.path, o)).map((o) => o), n = r.filter((o) => wr(t, e.path, o) === void 0);
|
|
2123
2131
|
return r.length - n.length;
|
|
2124
2132
|
}
|
|
2125
|
-
function
|
|
2133
|
+
function St(e, t) {
|
|
2126
2134
|
const r = new URLSearchParams(t), n = new URLSearchParams(e.query.value), o = Array.from(n.keys()), a = o.filter((s) => !r.has(s));
|
|
2127
2135
|
return o.length - a.length;
|
|
2128
2136
|
}
|
|
2129
|
-
const
|
|
2137
|
+
const ho = [
|
|
2138
|
+
io,
|
|
2130
2139
|
uo,
|
|
2131
2140
|
fo,
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
so
|
|
2141
|
+
We,
|
|
2142
|
+
ao
|
|
2135
2143
|
];
|
|
2136
|
-
function
|
|
2137
|
-
const r =
|
|
2138
|
-
return e.filter((n) =>
|
|
2144
|
+
function po(e, t) {
|
|
2145
|
+
const r = lo(t);
|
|
2146
|
+
return e.filter((n) => ho.every((o) => o(n, t))).sort(r);
|
|
2139
2147
|
}
|
|
2140
|
-
function
|
|
2141
|
-
const n =
|
|
2148
|
+
function mo(e, t, r) {
|
|
2149
|
+
const n = po(e, t);
|
|
2142
2150
|
if (!n.length)
|
|
2143
2151
|
return;
|
|
2144
|
-
const [o] = n, { searchParams: a, hash: s } =
|
|
2152
|
+
const [o] = n, { searchParams: a, hash: s } = _(t);
|
|
2145
2153
|
return {
|
|
2146
2154
|
id: o.id,
|
|
2147
2155
|
matched: o.matched,
|
|
2148
2156
|
matches: o.matches,
|
|
2149
2157
|
name: o.name,
|
|
2150
|
-
query:
|
|
2151
|
-
params:
|
|
2158
|
+
query: rt(a),
|
|
2159
|
+
params: it(o, t),
|
|
2152
2160
|
state: Rr(o.state, r),
|
|
2153
2161
|
hash: s,
|
|
2154
|
-
href:
|
|
2162
|
+
href: Lt(t)
|
|
2155
2163
|
};
|
|
2156
2164
|
}
|
|
2157
|
-
function
|
|
2158
|
-
const r = typeof e == "string" ?
|
|
2165
|
+
function At(e, t) {
|
|
2166
|
+
const r = typeof e == "string" ? _(e) : e, n = typeof t == "string" ? _(t) : t, o = r.searchParams ?? new URLSearchParams(r.search), a = n.searchParams ?? new URLSearchParams(n.search);
|
|
2159
2167
|
return Er({
|
|
2160
2168
|
protocol: J(n.protocol) ? n.protocol : r.protocol,
|
|
2161
2169
|
host: J(n.host) ? n.host : r.host,
|
|
2162
2170
|
pathname: J(n.pathname) ? n.pathname : r.pathname,
|
|
2163
|
-
searchParams:
|
|
2171
|
+
searchParams: st(a, o),
|
|
2164
2172
|
hash: J(n.hash) ? n.hash : r.hash
|
|
2165
2173
|
});
|
|
2166
2174
|
}
|
|
2167
|
-
function
|
|
2175
|
+
function yo(e, t) {
|
|
2168
2176
|
return J(t) ? e.map((r) => {
|
|
2169
2177
|
const n = `${t}${r.path.value}`;
|
|
2170
2178
|
return {
|
|
@@ -2173,7 +2181,7 @@ function go(e, t) {
|
|
|
2173
2181
|
};
|
|
2174
2182
|
}) : e;
|
|
2175
2183
|
}
|
|
2176
|
-
class
|
|
2184
|
+
class go extends Error {
|
|
2177
2185
|
/**
|
|
2178
2186
|
* Constructs a new DuplicateNamesError instance with a message indicating the problematic name.
|
|
2179
2187
|
* @param name - The name of the name that was duplicated.
|
|
@@ -2182,20 +2190,20 @@ class Ro extends Error {
|
|
|
2182
2190
|
super(`Invalid Name "${t}": Router does not support multiple routes with the same name. All name names must be unique.`);
|
|
2183
2191
|
}
|
|
2184
2192
|
}
|
|
2185
|
-
function
|
|
2193
|
+
function Ro(e) {
|
|
2186
2194
|
const t = e.map(({ name: r }) => r);
|
|
2187
2195
|
for (const r of t)
|
|
2188
|
-
if (
|
|
2189
|
-
throw new
|
|
2196
|
+
if (Ct(t, r) > 1)
|
|
2197
|
+
throw new go(r);
|
|
2190
2198
|
}
|
|
2191
|
-
function
|
|
2199
|
+
function wo(e, t = [], r) {
|
|
2192
2200
|
const n = [
|
|
2193
2201
|
...e,
|
|
2194
2202
|
...t.map((o) => o.routes)
|
|
2195
2203
|
].flat();
|
|
2196
|
-
return
|
|
2204
|
+
return Ro(n), yo(n, r);
|
|
2197
2205
|
}
|
|
2198
|
-
function
|
|
2206
|
+
function vo(e = {}, t = []) {
|
|
2199
2207
|
const r = new oe();
|
|
2200
2208
|
return ce("onBeforeRouteEnter", e, t).forEach((n) => r.onBeforeRouteEnter.add(n)), ce("onBeforeRouteUpdate", e, t).forEach((n) => r.onBeforeRouteUpdate.add(n)), ce("onBeforeRouteLeave", e, t).forEach((n) => r.onBeforeRouteLeave.add(n)), ce("onAfterRouteEnter", e, t).forEach((n) => r.onAfterRouteEnter.add(n)), ce("onAfterRouteUpdate", e, t).forEach((n) => r.onAfterRouteUpdate.add(n)), ce("onAfterRouteLeave", e, t).forEach((n) => r.onAfterRouteLeave.add(n)), r;
|
|
2201
2209
|
}
|
|
@@ -2205,70 +2213,69 @@ function ce(e, t, r) {
|
|
|
2205
2213
|
...r.map((o) => o[e])
|
|
2206
2214
|
].flat().filter((o) => o !== void 0);
|
|
2207
2215
|
}
|
|
2208
|
-
function
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
a
|
|
2212
|
-
const s = ot(), f = wn(), p = Vn(), h = to(), l = Wn({
|
|
2216
|
+
function Co(e, t, r = []) {
|
|
2217
|
+
const n = wo(e, r, t == null ? void 0 : t.base), o = _n();
|
|
2218
|
+
o.addGlobalRouteHooks(vo(t, r));
|
|
2219
|
+
const a = nt(), s = Rn(), l = Nn(), p = eo(), c = Jn({
|
|
2213
2220
|
mode: t == null ? void 0 : t.historyMode,
|
|
2214
|
-
listener: ({ location:
|
|
2215
|
-
const B = ee(
|
|
2216
|
-
|
|
2221
|
+
listener: ({ location: P }) => {
|
|
2222
|
+
const B = ee(P);
|
|
2223
|
+
b(B, { state: P.state, replace: !0 });
|
|
2217
2224
|
}
|
|
2218
2225
|
});
|
|
2219
|
-
function
|
|
2220
|
-
return
|
|
2226
|
+
function y(P, B = {}) {
|
|
2227
|
+
return mo(n, P, B.state);
|
|
2221
2228
|
}
|
|
2222
|
-
async function
|
|
2223
|
-
const W =
|
|
2224
|
-
if (
|
|
2225
|
-
|
|
2229
|
+
async function b(P, B = {}) {
|
|
2230
|
+
const W = a();
|
|
2231
|
+
if (c.stopListening(), x(P)) {
|
|
2232
|
+
c.update(P, B);
|
|
2226
2233
|
return;
|
|
2227
2234
|
}
|
|
2228
|
-
const I =
|
|
2235
|
+
const I = y(P, B) ?? f("NotFound"), H = ut(W), Q = await o.runBeforeRouteHooks({ to: I, from: H });
|
|
2229
2236
|
switch (Q.status) {
|
|
2230
2237
|
// On abort do nothing
|
|
2231
2238
|
case "ABORT":
|
|
2232
2239
|
return;
|
|
2233
2240
|
// On push update the history, and push new route, and return
|
|
2234
2241
|
case "PUSH":
|
|
2235
|
-
|
|
2242
|
+
c.update(P, B), await S(...Q.to);
|
|
2236
2243
|
return;
|
|
2237
2244
|
// On reject update the history, the route, and set the rejection type
|
|
2238
2245
|
case "REJECT":
|
|
2239
|
-
|
|
2246
|
+
c.update(P, B), h(Q.type);
|
|
2240
2247
|
break;
|
|
2241
2248
|
// On success update history, set the route, and clear the rejection
|
|
2242
2249
|
case "SUCCESS":
|
|
2243
|
-
|
|
2250
|
+
c.update(P, B), h(null);
|
|
2244
2251
|
break;
|
|
2245
2252
|
default:
|
|
2246
2253
|
throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(Q)}`);
|
|
2247
2254
|
}
|
|
2248
2255
|
const _e = W;
|
|
2249
|
-
|
|
2256
|
+
s.setProps(I).then((D) => {
|
|
2250
2257
|
if (_e === W)
|
|
2251
2258
|
switch (D.status) {
|
|
2252
2259
|
case "SUCCESS":
|
|
2253
2260
|
break;
|
|
2254
2261
|
case "PUSH":
|
|
2255
|
-
|
|
2262
|
+
S(...D.to);
|
|
2256
2263
|
break;
|
|
2257
2264
|
case "REJECT":
|
|
2258
|
-
|
|
2265
|
+
h(D.type);
|
|
2259
2266
|
break;
|
|
2260
2267
|
default:
|
|
2261
2268
|
const qe = D;
|
|
2262
2269
|
throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(qe)}`);
|
|
2263
2270
|
}
|
|
2264
|
-
}),
|
|
2265
|
-
const F = await
|
|
2271
|
+
}), A(I);
|
|
2272
|
+
const F = await o.runAfterRouteHooks({ to: I, from: H });
|
|
2266
2273
|
switch (F.status) {
|
|
2267
2274
|
case "PUSH":
|
|
2268
|
-
await
|
|
2275
|
+
await S(...F.to);
|
|
2269
2276
|
break;
|
|
2270
2277
|
case "REJECT":
|
|
2271
|
-
|
|
2278
|
+
h(F.type);
|
|
2272
2279
|
break;
|
|
2273
2280
|
case "SUCCESS":
|
|
2274
2281
|
break;
|
|
@@ -2276,100 +2283,100 @@ function Bo(e, t, r = []) {
|
|
|
2276
2283
|
const D = F;
|
|
2277
2284
|
throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(D)}`);
|
|
2278
2285
|
}
|
|
2279
|
-
|
|
2286
|
+
c.startListening();
|
|
2280
2287
|
}
|
|
2281
|
-
const
|
|
2282
|
-
const I =
|
|
2288
|
+
const L = (P, B = {}, W = {}) => {
|
|
2289
|
+
const I = n.find((H) => H.name === P);
|
|
2283
2290
|
if (!I)
|
|
2284
|
-
throw new
|
|
2285
|
-
return
|
|
2286
|
-
},
|
|
2287
|
-
if (M(
|
|
2288
|
-
const F = { ...B }, D =
|
|
2291
|
+
throw new to(String(P));
|
|
2292
|
+
return co(I, B, W);
|
|
2293
|
+
}, S = (P, B, W) => {
|
|
2294
|
+
if (M(P)) {
|
|
2295
|
+
const F = { ...B }, D = At(P, {
|
|
2289
2296
|
searchParams: F.query,
|
|
2290
2297
|
hash: F.hash
|
|
2291
2298
|
});
|
|
2292
|
-
return
|
|
2299
|
+
return b(D, F);
|
|
2293
2300
|
}
|
|
2294
|
-
if (typeof
|
|
2295
|
-
const { replace: F, ...D } = { ...W }, qe = { ...B }, Ie =
|
|
2296
|
-
return
|
|
2301
|
+
if (typeof P == "string") {
|
|
2302
|
+
const { replace: F, ...D } = { ...W }, qe = { ...B }, Ie = L(P, qe, D), Pr = Et({ ...Ie.matched.state }, { ...Ie.state, ...D.state });
|
|
2303
|
+
return b(Ie.href, { replace: F, state: Pr });
|
|
2297
2304
|
}
|
|
2298
|
-
const { replace: I, ...
|
|
2299
|
-
searchParams:
|
|
2300
|
-
hash:
|
|
2305
|
+
const { replace: I, ...H } = { ...B }, Q = Et({ ...P.matched.state }, { ...P.state, ...H.state }), _e = At(P.href, {
|
|
2306
|
+
searchParams: H.query,
|
|
2307
|
+
hash: H.hash
|
|
2301
2308
|
});
|
|
2302
|
-
return
|
|
2303
|
-
},
|
|
2304
|
-
if (M(
|
|
2305
|
-
const
|
|
2306
|
-
return
|
|
2309
|
+
return b(_e, { replace: I, state: Q });
|
|
2310
|
+
}, w = (P, B, W) => {
|
|
2311
|
+
if (M(P)) {
|
|
2312
|
+
const H = { ...B, replace: !0 };
|
|
2313
|
+
return S(P, H);
|
|
2307
2314
|
}
|
|
2308
|
-
if (typeof
|
|
2309
|
-
const
|
|
2310
|
-
return
|
|
2315
|
+
if (typeof P == "string") {
|
|
2316
|
+
const H = { ...W, replace: !0 }, Q = { ...B };
|
|
2317
|
+
return S(P, Q, H);
|
|
2311
2318
|
}
|
|
2312
2319
|
const I = { ...B, replace: !0 };
|
|
2313
|
-
return
|
|
2314
|
-
},
|
|
2315
|
-
|
|
2316
|
-
}, { setRejection:
|
|
2317
|
-
...r.reduce((
|
|
2320
|
+
return S(P, I);
|
|
2321
|
+
}, m = (P) => {
|
|
2322
|
+
h(P);
|
|
2323
|
+
}, { setRejection: h, rejection: R, getRejectionRoute: f } = zn({
|
|
2324
|
+
...r.reduce((P, B) => ({ ...P, ...B.rejections }), {}),
|
|
2318
2325
|
...t == null ? void 0 : t.rejections
|
|
2319
|
-
}),
|
|
2320
|
-
let
|
|
2321
|
-
const { promise:
|
|
2322
|
-
async function
|
|
2323
|
-
if (
|
|
2324
|
-
return
|
|
2325
|
-
|
|
2326
|
-
}
|
|
2327
|
-
function
|
|
2328
|
-
|
|
2329
|
-
}
|
|
2330
|
-
function
|
|
2331
|
-
return
|
|
2332
|
-
}
|
|
2333
|
-
function
|
|
2334
|
-
|
|
2335
|
-
}
|
|
2336
|
-
const
|
|
2337
|
-
route:
|
|
2338
|
-
resolve:
|
|
2339
|
-
find:
|
|
2340
|
-
push:
|
|
2341
|
-
replace:
|
|
2342
|
-
reject:
|
|
2343
|
-
refresh:
|
|
2344
|
-
forward:
|
|
2345
|
-
back:
|
|
2346
|
-
go:
|
|
2347
|
-
install:
|
|
2348
|
-
isExternal:
|
|
2349
|
-
onBeforeRouteEnter:
|
|
2350
|
-
onBeforeRouteUpdate:
|
|
2351
|
-
onBeforeRouteLeave:
|
|
2352
|
-
onAfterRouteEnter:
|
|
2353
|
-
onAfterRouteUpdate:
|
|
2354
|
-
onAfterRouteLeave:
|
|
2326
|
+
}), i = f("NotFound"), { currentRoute: E, routerRoute: k, updateRoute: A } = Dn(i, S), g = Kn(t == null ? void 0 : t.initialUrl), u = c.location.state, { host: d } = _(g), x = Mn(d);
|
|
2327
|
+
let U = !1;
|
|
2328
|
+
const { promise: C, resolve: V } = Promise.withResolvers();
|
|
2329
|
+
async function O() {
|
|
2330
|
+
if (U)
|
|
2331
|
+
return C;
|
|
2332
|
+
Mr(n) && await Jr(), U = !0, await b(g, { replace: !0, state: u }), c.startListening(), V();
|
|
2333
|
+
}
|
|
2334
|
+
function q() {
|
|
2335
|
+
c.stopListening();
|
|
2336
|
+
}
|
|
2337
|
+
function ut(P) {
|
|
2338
|
+
return pn(P) ? null : { ...E };
|
|
2339
|
+
}
|
|
2340
|
+
function br(P) {
|
|
2341
|
+
o.setVueApp(P), s.setVueApp(P), P.component("RouterView", fr), P.component("RouterLink", xn), P.provide(sr, R), P.provide(lr, o), P.provide(tr, s), P.provide(ur, l), P.provide(nr, p), P.provide(Bt, ft), O();
|
|
2342
|
+
}
|
|
2343
|
+
const ft = {
|
|
2344
|
+
route: k,
|
|
2345
|
+
resolve: L,
|
|
2346
|
+
find: y,
|
|
2347
|
+
push: S,
|
|
2348
|
+
replace: w,
|
|
2349
|
+
reject: m,
|
|
2350
|
+
refresh: c.refresh,
|
|
2351
|
+
forward: c.forward,
|
|
2352
|
+
back: c.back,
|
|
2353
|
+
go: c.go,
|
|
2354
|
+
install: br,
|
|
2355
|
+
isExternal: x,
|
|
2356
|
+
onBeforeRouteEnter: o.onBeforeRouteEnter,
|
|
2357
|
+
onBeforeRouteUpdate: o.onBeforeRouteUpdate,
|
|
2358
|
+
onBeforeRouteLeave: o.onBeforeRouteLeave,
|
|
2359
|
+
onAfterRouteEnter: o.onAfterRouteEnter,
|
|
2360
|
+
onAfterRouteUpdate: o.onAfterRouteUpdate,
|
|
2361
|
+
onAfterRouteLeave: o.onAfterRouteLeave,
|
|
2355
2362
|
prefetch: t == null ? void 0 : t.prefetch,
|
|
2356
|
-
start:
|
|
2357
|
-
stop:
|
|
2363
|
+
start: O,
|
|
2364
|
+
stop: q
|
|
2358
2365
|
};
|
|
2359
|
-
return
|
|
2366
|
+
return ft;
|
|
2360
2367
|
}
|
|
2361
|
-
function
|
|
2368
|
+
function No(e) {
|
|
2362
2369
|
return {
|
|
2363
2370
|
routes: e.routes ?? [],
|
|
2364
2371
|
rejections: e.rejections ?? {},
|
|
2365
2372
|
...e
|
|
2366
2373
|
};
|
|
2367
2374
|
}
|
|
2368
|
-
function
|
|
2375
|
+
function Eo(e) {
|
|
2369
2376
|
return {
|
|
2370
2377
|
get: (t, { invalid: r }) => {
|
|
2371
2378
|
for (const n of e) {
|
|
2372
|
-
const o =
|
|
2379
|
+
const o = Qr(t, n);
|
|
2373
2380
|
if (o !== void 0)
|
|
2374
2381
|
return o;
|
|
2375
2382
|
}
|
|
@@ -2377,7 +2384,7 @@ function bo(...e) {
|
|
|
2377
2384
|
},
|
|
2378
2385
|
set: (t, { invalid: r }) => {
|
|
2379
2386
|
for (const n of e) {
|
|
2380
|
-
const o =
|
|
2387
|
+
const o = Kr(t, n);
|
|
2381
2388
|
if (o !== void 0)
|
|
2382
2389
|
return o;
|
|
2383
2390
|
}
|
|
@@ -2385,77 +2392,84 @@ function bo(...e) {
|
|
|
2385
2392
|
}
|
|
2386
2393
|
};
|
|
2387
2394
|
}
|
|
2388
|
-
|
|
2389
|
-
|
|
2395
|
+
const bo = {
|
|
2396
|
+
separator: ","
|
|
2397
|
+
};
|
|
2398
|
+
function Vo(e, t = {}) {
|
|
2399
|
+
const { separator: r } = { ...bo, ...t }, n = Eo(e);
|
|
2390
2400
|
return {
|
|
2391
|
-
get: (
|
|
2392
|
-
set: (
|
|
2393
|
-
if (!Array.isArray(
|
|
2394
|
-
throw
|
|
2395
|
-
return
|
|
2401
|
+
get: (o, a) => o.split(r).map((s) => n.get(s, a)),
|
|
2402
|
+
set: (o, a) => {
|
|
2403
|
+
if (!Array.isArray(o))
|
|
2404
|
+
throw a.invalid("Expected an array");
|
|
2405
|
+
return o.map((s) => n.set(s, a)).join(r);
|
|
2396
2406
|
}
|
|
2397
2407
|
};
|
|
2398
2408
|
}
|
|
2399
|
-
|
|
2409
|
+
const Po = {
|
|
2410
|
+
separator: ","
|
|
2411
|
+
};
|
|
2412
|
+
function Zo(e, t = {}) {
|
|
2413
|
+
const { separator: r } = { ...Po, ...t };
|
|
2400
2414
|
return {
|
|
2401
|
-
get: (
|
|
2402
|
-
const
|
|
2403
|
-
return e.map((
|
|
2415
|
+
get: (n) => {
|
|
2416
|
+
const o = n.split(r);
|
|
2417
|
+
return e.map((a, s) => re(o.at(s), a));
|
|
2404
2418
|
},
|
|
2405
|
-
set: (
|
|
2406
|
-
if (!Array.isArray(
|
|
2407
|
-
throw
|
|
2408
|
-
if (
|
|
2409
|
-
throw
|
|
2410
|
-
return e.map((
|
|
2419
|
+
set: (n, { invalid: o }) => {
|
|
2420
|
+
if (!Array.isArray(n))
|
|
2421
|
+
throw o("Expected a tuple");
|
|
2422
|
+
if (n.length !== e.length)
|
|
2423
|
+
throw o(`Expected tuple with ${e.length} values but received ${n.length} values`);
|
|
2424
|
+
return e.map((a, s) => ne(n.at(s), a)).join(r);
|
|
2411
2425
|
}
|
|
2412
2426
|
};
|
|
2413
2427
|
}
|
|
2414
|
-
const
|
|
2415
|
-
function
|
|
2416
|
-
const t =
|
|
2428
|
+
const jo = z, Oo = z, $o = z;
|
|
2429
|
+
function Ho(e) {
|
|
2430
|
+
const t = ot(), r = Gt(e.name), n = Y(e.path), o = Y(e.query), a = Y(e.hash), s = e.meta ?? {}, l = Y(e.host), p = Ae({ id: t, meta: {}, state: {}, ...e }), c = {
|
|
2417
2431
|
id: t,
|
|
2418
2432
|
matched: p,
|
|
2419
2433
|
matches: [p],
|
|
2420
2434
|
name: r,
|
|
2421
|
-
host:
|
|
2435
|
+
host: l,
|
|
2422
2436
|
path: n,
|
|
2423
2437
|
query: o,
|
|
2424
2438
|
hash: a,
|
|
2425
2439
|
meta: s,
|
|
2426
2440
|
depth: 1,
|
|
2427
2441
|
state: {}
|
|
2428
|
-
},
|
|
2429
|
-
return ge(
|
|
2442
|
+
}, y = Tt(e) ? Wt(e.parent, c) : c;
|
|
2443
|
+
return ge(y.path.params, y.query.params, y.host.params, y.hash.params), y;
|
|
2430
2444
|
}
|
|
2431
2445
|
export {
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2446
|
+
$r as DuplicateParamsError,
|
|
2447
|
+
Hr as MetaPropertyConflict,
|
|
2448
|
+
xn as RouterLink,
|
|
2435
2449
|
ye as RouterNotInstalledError,
|
|
2436
2450
|
fr as RouterView,
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2451
|
+
_r as UseRouteInvalidError,
|
|
2452
|
+
Vo as arrayOf,
|
|
2453
|
+
Lt as asUrl,
|
|
2454
|
+
Ho as createExternalRoute,
|
|
2455
|
+
Dr as createParam,
|
|
2442
2456
|
he as createRoute,
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2457
|
+
Co as createRouter,
|
|
2458
|
+
No as createRouterPlugin,
|
|
2459
|
+
Oo as host,
|
|
2446
2460
|
ar as isRoute,
|
|
2447
2461
|
M as isUrl,
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2462
|
+
Lo as onAfterRouteLeave,
|
|
2463
|
+
Bo as onAfterRouteUpdate,
|
|
2464
|
+
xo as onBeforeRouteLeave,
|
|
2465
|
+
Uo as onBeforeRouteUpdate,
|
|
2466
|
+
jo as path,
|
|
2467
|
+
$o as query,
|
|
2468
|
+
Zo as tupleOf,
|
|
2469
|
+
Eo as unionOf,
|
|
2470
|
+
An as useLink,
|
|
2457
2471
|
cr as useRoute,
|
|
2458
|
-
|
|
2459
|
-
|
|
2472
|
+
Ge as useRouter,
|
|
2473
|
+
ko as withDefault,
|
|
2460
2474
|
z as withParams
|
|
2461
2475
|
};
|