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