@kitbag/router 0.15.1 → 0.15.3
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 +0 -10
- package/dist/kitbag-router.js +377 -375
- package/dist/kitbag-router.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/kitbag-router.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ir = Object.defineProperty;
|
|
2
2
|
var fr = (e, t, r) => t in e ? ir(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var M = (e, t, r) => fr(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import { inject as ce, toRefs as lr, computed as N, reactive as
|
|
4
|
+
import { inject as ce, toRefs as lr, computed as N, reactive as Ne, defineComponent as ue, h as te, ref as De, markRaw as be, watch as le, onUnmounted as Ve, defineAsyncComponent as hr, toValue as H, openBlock as yt, createElementBlock as dr, normalizeClass as pr, renderSlot as gt, normalizeProps as wt, guardReactiveProps as mr, unref as fe, getCurrentInstance as Rr, resolveComponent as vr, provide as yr, mergeProps as gr, createBlock as wr, resolveDynamicComponent as Er, createCommentVNode as Pr } from "vue";
|
|
5
5
|
function T(e) {
|
|
6
6
|
return typeof e != "string" ? !1 : /^(https?:\/\/|\/).*/g.test(e);
|
|
7
7
|
}
|
|
@@ -51,13 +51,13 @@ function ve(e) {
|
|
|
51
51
|
function J(e) {
|
|
52
52
|
return typeof e == "string" && e.length > 0;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function Se(e) {
|
|
55
55
|
return {
|
|
56
56
|
value: J(e) ? e.replace(/^#*/, "") : void 0
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
function kr(e, t) {
|
|
60
|
-
return
|
|
60
|
+
return Se(`${e.value ?? ""}${t.value ?? ""}`);
|
|
61
61
|
}
|
|
62
62
|
function xr(e, t) {
|
|
63
63
|
return Lr(e, t), { ...e, ...t };
|
|
@@ -109,7 +109,7 @@ function Me(e) {
|
|
|
109
109
|
function Te(e) {
|
|
110
110
|
return "components" in e && !!e.components;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function Hr(e) {
|
|
113
113
|
return "state" in e && !!e.state;
|
|
114
114
|
}
|
|
115
115
|
function At(e, t) {
|
|
@@ -131,20 +131,20 @@ function We() {
|
|
|
131
131
|
class he extends Error {
|
|
132
132
|
}
|
|
133
133
|
const G = "[", K = "]";
|
|
134
|
-
function
|
|
134
|
+
function jr(e) {
|
|
135
135
|
return e !== String && e !== Boolean && e !== Number && e !== Date;
|
|
136
136
|
}
|
|
137
137
|
function $r(e) {
|
|
138
|
-
return typeof e == "function" &&
|
|
138
|
+
return typeof e == "function" && jr(e);
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function He(e) {
|
|
141
141
|
return typeof e == "object" && "get" in e && typeof e.get == "function" && "set" in e && typeof e.set == "function";
|
|
142
142
|
}
|
|
143
143
|
function _r(e) {
|
|
144
|
-
return
|
|
144
|
+
return He(e) && e.defaultValue !== void 0;
|
|
145
145
|
}
|
|
146
146
|
function lo(e, t) {
|
|
147
|
-
return
|
|
147
|
+
return Or(e, t);
|
|
148
148
|
}
|
|
149
149
|
function qr(e, t) {
|
|
150
150
|
return e[t] ?? String;
|
|
@@ -153,7 +153,7 @@ const _ = {
|
|
|
153
153
|
invalid: (e) => {
|
|
154
154
|
throw new he(e);
|
|
155
155
|
}
|
|
156
|
-
},
|
|
156
|
+
}, Ir = {
|
|
157
157
|
get: (e) => e,
|
|
158
158
|
set: (e, { invalid: t }) => {
|
|
159
159
|
if (typeof e != "string")
|
|
@@ -222,7 +222,7 @@ function de(e, t, r = !1) {
|
|
|
222
222
|
throw new he();
|
|
223
223
|
}
|
|
224
224
|
if (t === String)
|
|
225
|
-
return
|
|
225
|
+
return Ir.get(e, _);
|
|
226
226
|
if (t === Boolean)
|
|
227
227
|
return kt.get(e, _);
|
|
228
228
|
if (t === Number)
|
|
@@ -233,7 +233,7 @@ function de(e, t, r = !1) {
|
|
|
233
233
|
return Ut.get(e, _);
|
|
234
234
|
if ($r(t))
|
|
235
235
|
return t(e, _);
|
|
236
|
-
if (
|
|
236
|
+
if (He(t))
|
|
237
237
|
return t.get(e, _);
|
|
238
238
|
if (t instanceof RegExp) {
|
|
239
239
|
if (t.test(e))
|
|
@@ -256,7 +256,7 @@ function pe(e, t, r = !1) {
|
|
|
256
256
|
return Lt.set(e, _);
|
|
257
257
|
if (t === JSON)
|
|
258
258
|
return Ut.set(e, _);
|
|
259
|
-
if (
|
|
259
|
+
if (He(t))
|
|
260
260
|
return t.set(e, _);
|
|
261
261
|
try {
|
|
262
262
|
return e.toString();
|
|
@@ -264,8 +264,8 @@ function pe(e, t, r = !1) {
|
|
|
264
264
|
throw new he();
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
|
-
function
|
|
268
|
-
return
|
|
267
|
+
function Or(e, t) {
|
|
268
|
+
return He(e) ? { ...e, defaultValue: t ?? e.defaultValue } : {
|
|
269
269
|
get: (r) => de(r, e),
|
|
270
270
|
set: (r) => pe(r, e),
|
|
271
271
|
defaultValue: t
|
|
@@ -298,14 +298,14 @@ function Y(e, t) {
|
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
|
-
var
|
|
301
|
+
var Ae = "beforeunload", Dr = "hashchange", Bt = "popstate";
|
|
302
302
|
function at(e) {
|
|
303
303
|
e === void 0 && (e = {});
|
|
304
304
|
var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
|
|
305
305
|
function a() {
|
|
306
|
-
var d = n.location,
|
|
306
|
+
var d = n.location, h = d.pathname, g = d.search, x = d.hash, L = o.state || {};
|
|
307
307
|
return [L.idx, oe({
|
|
308
|
-
pathname:
|
|
308
|
+
pathname: h,
|
|
309
309
|
search: g,
|
|
310
310
|
hash: x,
|
|
311
311
|
state: L.usr || null,
|
|
@@ -317,10 +317,10 @@ function at(e) {
|
|
|
317
317
|
if (s)
|
|
318
318
|
P.call(s), s = null;
|
|
319
319
|
else {
|
|
320
|
-
var d = V.Pop,
|
|
320
|
+
var d = V.Pop, h = a(), g = h[0], x = h[1];
|
|
321
321
|
if (P.length)
|
|
322
322
|
if (g != null) {
|
|
323
|
-
var L =
|
|
323
|
+
var L = l - g;
|
|
324
324
|
L && (s = {
|
|
325
325
|
action: d,
|
|
326
326
|
location: x,
|
|
@@ -341,68 +341,68 @@ function at(e) {
|
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
n.addEventListener(Bt, f);
|
|
344
|
-
var
|
|
345
|
-
|
|
346
|
-
idx:
|
|
344
|
+
var u = V.Pop, c = a(), l = c[0], v = c[1], E = ae(), P = ae();
|
|
345
|
+
l == null && (l = 0, o.replaceState(z({}, o.state, {
|
|
346
|
+
idx: l
|
|
347
347
|
}), ""));
|
|
348
348
|
function m(d) {
|
|
349
349
|
return typeof d == "string" ? d : X(d);
|
|
350
350
|
}
|
|
351
|
-
function y(d,
|
|
352
|
-
return
|
|
351
|
+
function y(d, h) {
|
|
352
|
+
return h === void 0 && (h = null), oe(z({
|
|
353
353
|
pathname: v.pathname,
|
|
354
354
|
hash: "",
|
|
355
355
|
search: ""
|
|
356
356
|
}, typeof d == "string" ? me(d) : d, {
|
|
357
|
-
state:
|
|
358
|
-
key:
|
|
357
|
+
state: h,
|
|
358
|
+
key: xe()
|
|
359
359
|
}));
|
|
360
360
|
}
|
|
361
|
-
function i(d,
|
|
361
|
+
function i(d, h) {
|
|
362
362
|
return [{
|
|
363
363
|
usr: d.state,
|
|
364
364
|
key: d.key,
|
|
365
|
-
idx:
|
|
365
|
+
idx: h
|
|
366
366
|
}, m(d)];
|
|
367
367
|
}
|
|
368
|
-
function p(d,
|
|
368
|
+
function p(d, h, g) {
|
|
369
369
|
return !P.length || (P.call({
|
|
370
370
|
action: d,
|
|
371
|
-
location:
|
|
371
|
+
location: h,
|
|
372
372
|
retry: g
|
|
373
373
|
}), !1);
|
|
374
374
|
}
|
|
375
375
|
function A(d) {
|
|
376
|
-
|
|
377
|
-
var
|
|
378
|
-
|
|
379
|
-
action:
|
|
376
|
+
u = d;
|
|
377
|
+
var h = a();
|
|
378
|
+
l = h[0], v = h[1], E.call({
|
|
379
|
+
action: u,
|
|
380
380
|
location: v
|
|
381
381
|
});
|
|
382
382
|
}
|
|
383
|
-
function R(d,
|
|
384
|
-
var g = V.Push, x = y(d,
|
|
383
|
+
function R(d, h) {
|
|
384
|
+
var g = V.Push, x = y(d, h);
|
|
385
385
|
function L() {
|
|
386
|
-
R(d,
|
|
386
|
+
R(d, h);
|
|
387
387
|
}
|
|
388
388
|
if (p(g, x, L)) {
|
|
389
|
-
var B = i(x,
|
|
389
|
+
var B = i(x, l + 1), C = B[0], j = B[1];
|
|
390
390
|
try {
|
|
391
|
-
o.pushState(C, "",
|
|
391
|
+
o.pushState(C, "", j);
|
|
392
392
|
} catch {
|
|
393
|
-
n.location.assign(
|
|
393
|
+
n.location.assign(j);
|
|
394
394
|
}
|
|
395
395
|
A(g);
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
function w(d,
|
|
399
|
-
var g = V.Replace, x = y(d,
|
|
398
|
+
function w(d, h) {
|
|
399
|
+
var g = V.Replace, x = y(d, h);
|
|
400
400
|
function L() {
|
|
401
|
-
w(d,
|
|
401
|
+
w(d, h);
|
|
402
402
|
}
|
|
403
403
|
if (p(g, x, L)) {
|
|
404
|
-
var B = i(x,
|
|
405
|
-
o.replaceState(C, "",
|
|
404
|
+
var B = i(x, l), C = B[0], j = B[1];
|
|
405
|
+
o.replaceState(C, "", j), A(g);
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
function S(d) {
|
|
@@ -410,7 +410,7 @@ function at(e) {
|
|
|
410
410
|
}
|
|
411
411
|
var k = {
|
|
412
412
|
get action() {
|
|
413
|
-
return
|
|
413
|
+
return u;
|
|
414
414
|
},
|
|
415
415
|
get location() {
|
|
416
416
|
return v;
|
|
@@ -425,13 +425,13 @@ function at(e) {
|
|
|
425
425
|
forward: function() {
|
|
426
426
|
S(1);
|
|
427
427
|
},
|
|
428
|
-
listen: function(
|
|
429
|
-
return E.push(
|
|
428
|
+
listen: function(h) {
|
|
429
|
+
return E.push(h);
|
|
430
430
|
},
|
|
431
|
-
block: function(
|
|
432
|
-
var g = P.push(
|
|
433
|
-
return P.length === 1 && n.addEventListener(
|
|
434
|
-
g(), P.length || n.removeEventListener(
|
|
431
|
+
block: function(h) {
|
|
432
|
+
var g = P.push(h);
|
|
433
|
+
return P.length === 1 && n.addEventListener(Ae, ke), function() {
|
|
434
|
+
g(), P.length || n.removeEventListener(Ae, ke);
|
|
435
435
|
};
|
|
436
436
|
}
|
|
437
437
|
};
|
|
@@ -441,13 +441,13 @@ function Fr(e) {
|
|
|
441
441
|
e === void 0 && (e = {});
|
|
442
442
|
var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
|
|
443
443
|
function a() {
|
|
444
|
-
var
|
|
445
|
-
return [
|
|
444
|
+
var h = me(n.location.hash.substr(1)), g = h.pathname, x = g === void 0 ? "/" : g, L = h.search, B = L === void 0 ? "" : L, C = h.hash, j = C === void 0 ? "" : C, I = o.state || {};
|
|
445
|
+
return [I.idx, oe({
|
|
446
446
|
pathname: x,
|
|
447
447
|
search: B,
|
|
448
|
-
hash:
|
|
449
|
-
state:
|
|
450
|
-
key:
|
|
448
|
+
hash: j,
|
|
449
|
+
state: I.usr || null,
|
|
450
|
+
key: I.key || "default"
|
|
451
451
|
})];
|
|
452
452
|
}
|
|
453
453
|
var s = null;
|
|
@@ -455,12 +455,12 @@ function Fr(e) {
|
|
|
455
455
|
if (s)
|
|
456
456
|
P.call(s), s = null;
|
|
457
457
|
else {
|
|
458
|
-
var
|
|
458
|
+
var h = V.Pop, g = a(), x = g[0], L = g[1];
|
|
459
459
|
if (P.length)
|
|
460
460
|
if (x != null) {
|
|
461
|
-
var B =
|
|
461
|
+
var B = l - x;
|
|
462
462
|
B && (s = {
|
|
463
|
-
action:
|
|
463
|
+
action: h,
|
|
464
464
|
location: L,
|
|
465
465
|
retry: function() {
|
|
466
466
|
k(B * -1);
|
|
@@ -475,91 +475,91 @@ function Fr(e) {
|
|
|
475
475
|
"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."
|
|
476
476
|
);
|
|
477
477
|
else
|
|
478
|
-
R(
|
|
478
|
+
R(h);
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
n.addEventListener(Bt, f), n.addEventListener(Dr, function() {
|
|
482
|
-
var
|
|
482
|
+
var h = a(), g = h[1];
|
|
483
483
|
X(g) !== X(v) && f();
|
|
484
484
|
});
|
|
485
|
-
var
|
|
486
|
-
|
|
487
|
-
idx:
|
|
485
|
+
var u = V.Pop, c = a(), l = c[0], v = c[1], E = ae(), P = ae();
|
|
486
|
+
l == null && (l = 0, o.replaceState(z({}, o.state, {
|
|
487
|
+
idx: l
|
|
488
488
|
}), ""));
|
|
489
489
|
function m() {
|
|
490
|
-
var
|
|
491
|
-
if (
|
|
490
|
+
var h = document.querySelector("base"), g = "";
|
|
491
|
+
if (h && h.getAttribute("href")) {
|
|
492
492
|
var x = n.location.href, L = x.indexOf("#");
|
|
493
493
|
g = L === -1 ? x : x.slice(0, L);
|
|
494
494
|
}
|
|
495
495
|
return g;
|
|
496
496
|
}
|
|
497
|
-
function y(
|
|
498
|
-
return m() + "#" + (typeof
|
|
497
|
+
function y(h) {
|
|
498
|
+
return m() + "#" + (typeof h == "string" ? h : X(h));
|
|
499
499
|
}
|
|
500
|
-
function i(
|
|
500
|
+
function i(h, g) {
|
|
501
501
|
return g === void 0 && (g = null), oe(z({
|
|
502
502
|
pathname: v.pathname,
|
|
503
503
|
hash: "",
|
|
504
504
|
search: ""
|
|
505
|
-
}, typeof
|
|
505
|
+
}, typeof h == "string" ? me(h) : h, {
|
|
506
506
|
state: g,
|
|
507
|
-
key:
|
|
507
|
+
key: xe()
|
|
508
508
|
}));
|
|
509
509
|
}
|
|
510
|
-
function p(
|
|
510
|
+
function p(h, g) {
|
|
511
511
|
return [{
|
|
512
|
-
usr:
|
|
513
|
-
key:
|
|
512
|
+
usr: h.state,
|
|
513
|
+
key: h.key,
|
|
514
514
|
idx: g
|
|
515
|
-
}, y(
|
|
515
|
+
}, y(h)];
|
|
516
516
|
}
|
|
517
|
-
function A(
|
|
517
|
+
function A(h, g, x) {
|
|
518
518
|
return !P.length || (P.call({
|
|
519
|
-
action:
|
|
519
|
+
action: h,
|
|
520
520
|
location: g,
|
|
521
521
|
retry: x
|
|
522
522
|
}), !1);
|
|
523
523
|
}
|
|
524
|
-
function R(
|
|
525
|
-
|
|
524
|
+
function R(h) {
|
|
525
|
+
u = h;
|
|
526
526
|
var g = a();
|
|
527
|
-
|
|
528
|
-
action:
|
|
527
|
+
l = g[0], v = g[1], E.call({
|
|
528
|
+
action: u,
|
|
529
529
|
location: v
|
|
530
530
|
});
|
|
531
531
|
}
|
|
532
|
-
function w(
|
|
533
|
-
var x = V.Push, L = i(
|
|
532
|
+
function w(h, g) {
|
|
533
|
+
var x = V.Push, L = i(h, g);
|
|
534
534
|
function B() {
|
|
535
|
-
w(
|
|
535
|
+
w(h, g);
|
|
536
536
|
}
|
|
537
|
-
if (process.env.NODE_ENV !== "production" && Y(L.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(
|
|
538
|
-
var C = p(L,
|
|
537
|
+
if (process.env.NODE_ENV !== "production" && Y(L.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(h) + ")"), A(x, L, B)) {
|
|
538
|
+
var C = p(L, l + 1), j = C[0], I = C[1];
|
|
539
539
|
try {
|
|
540
|
-
o.pushState(
|
|
540
|
+
o.pushState(j, "", I);
|
|
541
541
|
} catch {
|
|
542
|
-
n.location.assign(
|
|
542
|
+
n.location.assign(I);
|
|
543
543
|
}
|
|
544
544
|
R(x);
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
function S(
|
|
548
|
-
var x = V.Replace, L = i(
|
|
547
|
+
function S(h, g) {
|
|
548
|
+
var x = V.Replace, L = i(h, g);
|
|
549
549
|
function B() {
|
|
550
|
-
S(
|
|
550
|
+
S(h, g);
|
|
551
551
|
}
|
|
552
|
-
if (process.env.NODE_ENV !== "production" && Y(L.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(
|
|
553
|
-
var C = p(L,
|
|
554
|
-
o.replaceState(
|
|
552
|
+
if (process.env.NODE_ENV !== "production" && Y(L.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(h) + ")"), A(x, L, B)) {
|
|
553
|
+
var C = p(L, l), j = C[0], I = C[1];
|
|
554
|
+
o.replaceState(j, "", I), R(x);
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
|
-
function k(
|
|
558
|
-
o.go(
|
|
557
|
+
function k(h) {
|
|
558
|
+
o.go(h);
|
|
559
559
|
}
|
|
560
560
|
var d = {
|
|
561
561
|
get action() {
|
|
562
|
-
return
|
|
562
|
+
return u;
|
|
563
563
|
},
|
|
564
564
|
get location() {
|
|
565
565
|
return v;
|
|
@@ -579,8 +579,8 @@ function Fr(e) {
|
|
|
579
579
|
},
|
|
580
580
|
block: function(g) {
|
|
581
581
|
var x = P.push(g);
|
|
582
|
-
return P.length === 1 && n.addEventListener(
|
|
583
|
-
x(), P.length || n.removeEventListener(
|
|
582
|
+
return P.length === 1 && n.addEventListener(Ae, ke), function() {
|
|
583
|
+
x(), P.length || n.removeEventListener(Ae, ke);
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
586
|
};
|
|
@@ -594,34 +594,34 @@ function st(e) {
|
|
|
594
594
|
search: "",
|
|
595
595
|
hash: "",
|
|
596
596
|
state: null,
|
|
597
|
-
key:
|
|
597
|
+
key: xe()
|
|
598
598
|
}, typeof R == "string" ? me(R) : R));
|
|
599
599
|
return process.env.NODE_ENV !== "production" && Y(w.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(R) + ")"), w;
|
|
600
|
-
}), s = ct(o ?? a.length - 1, 0, a.length - 1), f = V.Pop,
|
|
600
|
+
}), s = ct(o ?? a.length - 1, 0, a.length - 1), f = V.Pop, u = a[s], c = ae(), l = ae();
|
|
601
601
|
function v(R) {
|
|
602
602
|
return typeof R == "string" ? R : X(R);
|
|
603
603
|
}
|
|
604
604
|
function E(R, w) {
|
|
605
605
|
return w === void 0 && (w = null), oe(z({
|
|
606
|
-
pathname:
|
|
606
|
+
pathname: u.pathname,
|
|
607
607
|
search: "",
|
|
608
608
|
hash: ""
|
|
609
609
|
}, typeof R == "string" ? me(R) : R, {
|
|
610
610
|
state: w,
|
|
611
|
-
key:
|
|
611
|
+
key: xe()
|
|
612
612
|
}));
|
|
613
613
|
}
|
|
614
614
|
function P(R, w, S) {
|
|
615
|
-
return !
|
|
615
|
+
return !l.length || (l.call({
|
|
616
616
|
action: R,
|
|
617
617
|
location: w,
|
|
618
618
|
retry: S
|
|
619
619
|
}), !1);
|
|
620
620
|
}
|
|
621
621
|
function m(R, w) {
|
|
622
|
-
f = R,
|
|
622
|
+
f = R, u = w, c.call({
|
|
623
623
|
action: f,
|
|
624
|
-
location:
|
|
624
|
+
location: u
|
|
625
625
|
});
|
|
626
626
|
}
|
|
627
627
|
function y(R, w) {
|
|
@@ -629,14 +629,14 @@ function st(e) {
|
|
|
629
629
|
function d() {
|
|
630
630
|
y(R, w);
|
|
631
631
|
}
|
|
632
|
-
process.env.NODE_ENV !== "production" && Y(
|
|
632
|
+
process.env.NODE_ENV !== "production" && Y(u.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(R) + ")"), P(S, k, d) && (s += 1, a.splice(s, a.length, k), m(S, k));
|
|
633
633
|
}
|
|
634
634
|
function i(R, w) {
|
|
635
635
|
var S = V.Replace, k = E(R, w);
|
|
636
636
|
function d() {
|
|
637
637
|
i(R, w);
|
|
638
638
|
}
|
|
639
|
-
process.env.NODE_ENV !== "production" && Y(
|
|
639
|
+
process.env.NODE_ENV !== "production" && Y(u.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(R) + ")"), P(S, k, d) && (a[s] = k, m(S, k));
|
|
640
640
|
}
|
|
641
641
|
function p(R) {
|
|
642
642
|
var w = ct(s + R, 0, a.length - 1), S = V.Pop, k = a[w];
|
|
@@ -653,7 +653,7 @@ function st(e) {
|
|
|
653
653
|
return f;
|
|
654
654
|
},
|
|
655
655
|
get location() {
|
|
656
|
-
return
|
|
656
|
+
return u;
|
|
657
657
|
},
|
|
658
658
|
createHref: v,
|
|
659
659
|
push: y,
|
|
@@ -666,10 +666,10 @@ function st(e) {
|
|
|
666
666
|
p(1);
|
|
667
667
|
},
|
|
668
668
|
listen: function(w) {
|
|
669
|
-
return
|
|
669
|
+
return c.push(w);
|
|
670
670
|
},
|
|
671
671
|
block: function(w) {
|
|
672
|
-
return
|
|
672
|
+
return l.push(w);
|
|
673
673
|
}
|
|
674
674
|
};
|
|
675
675
|
return A;
|
|
@@ -677,7 +677,7 @@ function st(e) {
|
|
|
677
677
|
function ct(e, t, r) {
|
|
678
678
|
return Math.min(Math.max(e, t), r);
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function ke(e) {
|
|
681
681
|
e.preventDefault(), e.returnValue = "";
|
|
682
682
|
}
|
|
683
683
|
function ae() {
|
|
@@ -700,7 +700,7 @@ function ae() {
|
|
|
700
700
|
}
|
|
701
701
|
};
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function xe() {
|
|
704
704
|
return Math.random().toString(36).substr(2, 8);
|
|
705
705
|
}
|
|
706
706
|
function X(e) {
|
|
@@ -752,7 +752,7 @@ function Wr(e, t) {
|
|
|
752
752
|
}, a = (...i) => {
|
|
753
753
|
const p = new URLSearchParams(e.query);
|
|
754
754
|
p.delete(...i), r({}, { query: p });
|
|
755
|
-
}, { id: s, matched: f, matches:
|
|
755
|
+
}, { id: s, matched: f, matches: u, name: c, hash: l, href: v } = lr(e), E = N({
|
|
756
756
|
get() {
|
|
757
757
|
return new Proxy(e.params, {
|
|
758
758
|
set(i, p, A) {
|
|
@@ -795,15 +795,15 @@ function Wr(e, t) {
|
|
|
795
795
|
r({}, { state: i });
|
|
796
796
|
}
|
|
797
797
|
});
|
|
798
|
-
return
|
|
798
|
+
return Ne({
|
|
799
799
|
id: s,
|
|
800
800
|
matched: f,
|
|
801
|
-
matches:
|
|
801
|
+
matches: u,
|
|
802
802
|
state: m,
|
|
803
803
|
query: P,
|
|
804
|
-
hash:
|
|
804
|
+
hash: l,
|
|
805
805
|
params: E,
|
|
806
|
-
name:
|
|
806
|
+
name: c,
|
|
807
807
|
href: v,
|
|
808
808
|
update: r,
|
|
809
809
|
[Nt]: !0
|
|
@@ -811,7 +811,7 @@ function Wr(e, t) {
|
|
|
811
811
|
}
|
|
812
812
|
const Vt = Symbol();
|
|
813
813
|
function Jr(e, t) {
|
|
814
|
-
const r =
|
|
814
|
+
const r = Ne({ ...e }), n = (s) => {
|
|
815
815
|
Object.assign(r, {
|
|
816
816
|
[Vt]: !1,
|
|
817
817
|
...s
|
|
@@ -853,15 +853,15 @@ function zr(e) {
|
|
|
853
853
|
};
|
|
854
854
|
}
|
|
855
855
|
function Kr({ mode: e, listener: t }) {
|
|
856
|
-
const r = Yr(e), n = (
|
|
857
|
-
if (
|
|
858
|
-
r.replace(
|
|
856
|
+
const r = Yr(e), n = (u, c) => {
|
|
857
|
+
if (c != null && c.replace) {
|
|
858
|
+
r.replace(u, c.state);
|
|
859
859
|
return;
|
|
860
860
|
}
|
|
861
|
-
r.push(
|
|
861
|
+
r.push(u, c == null ? void 0 : c.state);
|
|
862
862
|
}, o = () => {
|
|
863
|
-
const
|
|
864
|
-
r.replace(
|
|
863
|
+
const u = X(r.location);
|
|
864
|
+
r.replace(u);
|
|
865
865
|
};
|
|
866
866
|
let a;
|
|
867
867
|
return {
|
|
@@ -891,7 +891,7 @@ function Yr(e = "auto") {
|
|
|
891
891
|
throw new Error(`Switch is not exhaustive for mode: ${t}`);
|
|
892
892
|
}
|
|
893
893
|
}
|
|
894
|
-
class
|
|
894
|
+
class Ht extends Error {
|
|
895
895
|
constructor() {
|
|
896
896
|
super("Uncaught CallbackContextAbortError");
|
|
897
897
|
M(this, "response");
|
|
@@ -905,27 +905,27 @@ class ne extends Error {
|
|
|
905
905
|
this.response = { status: "PUSH", to: r };
|
|
906
906
|
}
|
|
907
907
|
}
|
|
908
|
-
class
|
|
908
|
+
class Le extends Error {
|
|
909
909
|
constructor(r) {
|
|
910
910
|
super("Uncaught CallbackContextRejectionError");
|
|
911
911
|
M(this, "response");
|
|
912
912
|
this.response = { status: "REJECT", type: r };
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function jt() {
|
|
916
916
|
return { reject: (o) => {
|
|
917
|
-
throw new
|
|
917
|
+
throw new Le(o);
|
|
918
918
|
}, push: (...o) => {
|
|
919
919
|
throw new ne(o);
|
|
920
920
|
}, replace: (o, a, s) => {
|
|
921
921
|
if (T(o)) {
|
|
922
|
-
const
|
|
923
|
-
throw new ne([o, { ...
|
|
922
|
+
const c = a ?? {};
|
|
923
|
+
throw new ne([o, { ...c, replace: !0 }]);
|
|
924
924
|
}
|
|
925
|
-
const f = a,
|
|
926
|
-
throw new ne([o, f, { ...
|
|
925
|
+
const f = a, u = s ?? {};
|
|
926
|
+
throw new ne([o, f, { ...u, replace: !0 }]);
|
|
927
927
|
}, abort: () => {
|
|
928
|
-
throw new
|
|
928
|
+
throw new Ht();
|
|
929
929
|
} };
|
|
930
930
|
}
|
|
931
931
|
class Z {
|
|
@@ -941,11 +941,11 @@ class Z {
|
|
|
941
941
|
const ye = (e, t, r) => {
|
|
942
942
|
var a, s;
|
|
943
943
|
const n = e.matches, o = (t == null ? void 0 : t.matches) ?? [];
|
|
944
|
-
return
|
|
944
|
+
return ((a = n.at(r)) == null ? void 0 : a.id) !== ((s = o.at(r)) == null ? void 0 : s.id);
|
|
945
945
|
}, ge = (e, t, r) => {
|
|
946
946
|
var a, s;
|
|
947
947
|
const n = e.matches, o = (t == null ? void 0 : t.matches) ?? [];
|
|
948
|
-
return
|
|
948
|
+
return ((a = n.at(r)) == null ? void 0 : a.id) !== ((s = o.at(r)) == null ? void 0 : s.id);
|
|
949
949
|
}, we = (e, t, r) => {
|
|
950
950
|
var n, o;
|
|
951
951
|
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);
|
|
@@ -1002,7 +1002,7 @@ function rn() {
|
|
|
1002
1002
|
const e = {
|
|
1003
1003
|
global: new Z(),
|
|
1004
1004
|
component: new Z()
|
|
1005
|
-
}, { reject: t, push: r, replace: n, abort: o } =
|
|
1005
|
+
}, { reject: t, push: r, replace: n, abort: o } = jt(), a = (i) => (e.global.onBeforeRouteEnter.add(i), () => e.global.onBeforeRouteEnter.delete(i)), s = (i) => (e.global.onBeforeRouteUpdate.add(i), () => e.global.onBeforeRouteUpdate.delete(i)), f = (i) => (e.global.onBeforeRouteLeave.add(i), () => e.global.onBeforeRouteLeave.delete(i)), u = (i) => (e.global.onAfterRouteEnter.add(i), () => e.global.onAfterRouteEnter.delete(i)), c = (i) => (e.global.onAfterRouteUpdate.add(i), () => e.global.onAfterRouteUpdate.delete(i)), l = (i) => (e.global.onAfterRouteLeave.add(i), () => e.global.onAfterRouteLeave.delete(i));
|
|
1006
1006
|
async function v({ to: i, from: p }) {
|
|
1007
1007
|
const { global: A, component: R } = e, w = Xr(i, p), S = en(i, p, A), k = [
|
|
1008
1008
|
...S.onBeforeRouteEnter,
|
|
@@ -1015,7 +1015,7 @@ function rn() {
|
|
|
1015
1015
|
...R.onBeforeRouteLeave
|
|
1016
1016
|
];
|
|
1017
1017
|
try {
|
|
1018
|
-
const d = k.map((
|
|
1018
|
+
const d = k.map((h) => h(i, {
|
|
1019
1019
|
from: p,
|
|
1020
1020
|
reject: t,
|
|
1021
1021
|
push: r,
|
|
@@ -1024,7 +1024,7 @@ function rn() {
|
|
|
1024
1024
|
}));
|
|
1025
1025
|
await Promise.all(d);
|
|
1026
1026
|
} catch (d) {
|
|
1027
|
-
if (d instanceof ne || d instanceof
|
|
1027
|
+
if (d instanceof ne || d instanceof Le || d instanceof Ht)
|
|
1028
1028
|
return d.response;
|
|
1029
1029
|
throw d;
|
|
1030
1030
|
}
|
|
@@ -1045,7 +1045,7 @@ function rn() {
|
|
|
1045
1045
|
...S.onAfterRouteEnter
|
|
1046
1046
|
];
|
|
1047
1047
|
try {
|
|
1048
|
-
const d = k.map((
|
|
1048
|
+
const d = k.map((h) => h(i, {
|
|
1049
1049
|
from: p,
|
|
1050
1050
|
reject: t,
|
|
1051
1051
|
push: r,
|
|
@@ -1053,7 +1053,7 @@ function rn() {
|
|
|
1053
1053
|
}));
|
|
1054
1054
|
await Promise.all(d);
|
|
1055
1055
|
} catch (d) {
|
|
1056
|
-
if (d instanceof ne || d instanceof
|
|
1056
|
+
if (d instanceof ne || d instanceof Le)
|
|
1057
1057
|
return d.response;
|
|
1058
1058
|
throw d;
|
|
1059
1059
|
}
|
|
@@ -1079,14 +1079,14 @@ function rn() {
|
|
|
1079
1079
|
return w.add(S), () => w.delete(S);
|
|
1080
1080
|
},
|
|
1081
1081
|
addGlobalRouteHooks: (i) => {
|
|
1082
|
-
i.onBeforeRouteEnter.forEach((p) => a(p)), i.onBeforeRouteUpdate.forEach((p) => s(p)), i.onBeforeRouteLeave.forEach((p) => f(p)), i.onAfterRouteEnter.forEach((p) =>
|
|
1082
|
+
i.onBeforeRouteEnter.forEach((p) => a(p)), i.onBeforeRouteUpdate.forEach((p) => s(p)), i.onBeforeRouteLeave.forEach((p) => f(p)), i.onAfterRouteEnter.forEach((p) => u(p)), i.onAfterRouteUpdate.forEach((p) => c(p)), i.onAfterRouteLeave.forEach((p) => l(p));
|
|
1083
1083
|
},
|
|
1084
1084
|
onBeforeRouteEnter: a,
|
|
1085
1085
|
onBeforeRouteUpdate: s,
|
|
1086
1086
|
onBeforeRouteLeave: f,
|
|
1087
|
-
onAfterRouteEnter:
|
|
1088
|
-
onAfterRouteUpdate:
|
|
1089
|
-
onAfterRouteLeave:
|
|
1087
|
+
onAfterRouteEnter: u,
|
|
1088
|
+
onAfterRouteUpdate: c,
|
|
1089
|
+
onAfterRouteLeave: l
|
|
1090
1090
|
};
|
|
1091
1091
|
}
|
|
1092
1092
|
function nn(e) {
|
|
@@ -1134,8 +1134,8 @@ function an(e) {
|
|
|
1134
1134
|
}
|
|
1135
1135
|
const Qe = Ge();
|
|
1136
1136
|
function sn(e) {
|
|
1137
|
-
const t = (a) =>
|
|
1138
|
-
const s =
|
|
1137
|
+
const t = (a) => be(e[a] ?? nn(a)), r = (a) => {
|
|
1138
|
+
const s = be(t(a)), f = {
|
|
1139
1139
|
id: Qe(),
|
|
1140
1140
|
component: s,
|
|
1141
1141
|
meta: {},
|
|
@@ -1182,13 +1182,13 @@ function un(e) {
|
|
|
1182
1182
|
function _t(e) {
|
|
1183
1183
|
return !!e && typeof e == "object";
|
|
1184
1184
|
}
|
|
1185
|
-
const
|
|
1185
|
+
const Ue = !0;
|
|
1186
1186
|
function fn(e, t, r) {
|
|
1187
1187
|
if (_t(e) && t in e) {
|
|
1188
1188
|
const n = e[t];
|
|
1189
|
-
return typeof n == "string" ? de(n, r,
|
|
1189
|
+
return typeof n == "string" ? de(n, r, Ue) : n;
|
|
1190
1190
|
}
|
|
1191
|
-
return de(void 0, r,
|
|
1191
|
+
return de(void 0, r, Ue);
|
|
1192
1192
|
}
|
|
1193
1193
|
function qt(e, t) {
|
|
1194
1194
|
const r = {};
|
|
@@ -1201,9 +1201,9 @@ function qt(e, t) {
|
|
|
1201
1201
|
function ln(e, t, r) {
|
|
1202
1202
|
if (_t(e) && t in e) {
|
|
1203
1203
|
const n = e[t];
|
|
1204
|
-
return pe(n, r,
|
|
1204
|
+
return pe(n, r, Ue);
|
|
1205
1205
|
}
|
|
1206
|
-
return pe(void 0, r,
|
|
1206
|
+
return pe(void 0, r, Ue);
|
|
1207
1207
|
}
|
|
1208
1208
|
const it = (e, t) => {
|
|
1209
1209
|
const r = {};
|
|
@@ -1214,7 +1214,7 @@ const it = (e, t) => {
|
|
|
1214
1214
|
return r;
|
|
1215
1215
|
};
|
|
1216
1216
|
function hn() {
|
|
1217
|
-
const e =
|
|
1217
|
+
const e = Ne(/* @__PURE__ */ new Map()), t = We() ? s() : null, r = (f) => {
|
|
1218
1218
|
e.set(f, !1), t == null || t.observe(f);
|
|
1219
1219
|
}, n = (f) => {
|
|
1220
1220
|
e.delete(f), t == null || t.unobserve(f);
|
|
@@ -1223,8 +1223,8 @@ function hn() {
|
|
|
1223
1223
|
}, a = (f) => e.get(f) ?? !1;
|
|
1224
1224
|
function s() {
|
|
1225
1225
|
return new IntersectionObserver((f) => {
|
|
1226
|
-
f.forEach((
|
|
1227
|
-
e.set(
|
|
1226
|
+
f.forEach((u) => {
|
|
1227
|
+
e.set(u.target, u.isIntersecting);
|
|
1228
1228
|
});
|
|
1229
1229
|
});
|
|
1230
1230
|
}
|
|
@@ -1235,14 +1235,14 @@ function hn() {
|
|
|
1235
1235
|
isElementVisible: a
|
|
1236
1236
|
};
|
|
1237
1237
|
}
|
|
1238
|
-
const
|
|
1238
|
+
const It = Symbol("visibilityObserver");
|
|
1239
1239
|
function dn(e) {
|
|
1240
|
-
const t = ce(
|
|
1240
|
+
const t = ce(It);
|
|
1241
1241
|
if (!t)
|
|
1242
1242
|
throw new Re();
|
|
1243
1243
|
return le(e, (n, o) => {
|
|
1244
1244
|
n && t.observe(n), o && t.unobserve(o);
|
|
1245
|
-
}, { immediate: !0 }),
|
|
1245
|
+
}, { immediate: !0 }), Ve(() => {
|
|
1246
1246
|
e.value && t.unobserve(e.value);
|
|
1247
1247
|
}), {
|
|
1248
1248
|
isElementVisible: N(() => e.value ? t.isElementVisible(e.value) : !1)
|
|
@@ -1262,25 +1262,25 @@ function mn(e, t) {
|
|
|
1262
1262
|
return [e];
|
|
1263
1263
|
let n = 0;
|
|
1264
1264
|
const o = r.reduce((s, f) => {
|
|
1265
|
-
const
|
|
1266
|
-
|
|
1267
|
-
const [
|
|
1268
|
-
return s.push(
|
|
1265
|
+
const u = ze(e.slice(n, f.index));
|
|
1266
|
+
u.length && s.push(u);
|
|
1267
|
+
const [c] = f;
|
|
1268
|
+
return s.push(c), n = f.index + c.length, s;
|
|
1269
1269
|
}, []), a = e.slice(n);
|
|
1270
1270
|
return a && o.push(a), o;
|
|
1271
1271
|
}
|
|
1272
1272
|
function Rn(e) {
|
|
1273
|
-
const t =
|
|
1273
|
+
const t = Ot(e.path.value);
|
|
1274
1274
|
return new RegExp(`^${t}$`, "i");
|
|
1275
1275
|
}
|
|
1276
1276
|
function vn(e) {
|
|
1277
1277
|
const t = new URLSearchParams(e.query.value);
|
|
1278
|
-
return Array.from(t.entries()).filter(([, r]) => !
|
|
1279
|
-
const o =
|
|
1278
|
+
return Array.from(t.entries()).filter(([, r]) => !Ye(r)).map(([r, n]) => {
|
|
1279
|
+
const o = Ot(n);
|
|
1280
1280
|
return new RegExp(`${ze(r)}=${o}(&|$)`, "i");
|
|
1281
1281
|
});
|
|
1282
1282
|
}
|
|
1283
|
-
function
|
|
1283
|
+
function Ot(e) {
|
|
1284
1284
|
return mn(e, new RegExp(yn, "g")).map((t) => t.startsWith(G) ? Dt(t) : ze(t)).join("");
|
|
1285
1285
|
}
|
|
1286
1286
|
function Dt(e) {
|
|
@@ -1293,30 +1293,30 @@ const yn = `\\${G}\\??([\\w-_]+)\\${K}`, Ke = `\\${G}\\?([\\w-_]+)\\${K}`, Ft =
|
|
|
1293
1293
|
function gn(e) {
|
|
1294
1294
|
return e.replace(new RegExp(Ke, "g"), ".*");
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1296
|
+
function Ye(e) {
|
|
1297
1297
|
return new RegExp(Ke, "g").test(e);
|
|
1298
1298
|
}
|
|
1299
1299
|
function wn(e) {
|
|
1300
1300
|
return e.replace(new RegExp(Ft, "g"), ".+");
|
|
1301
1301
|
}
|
|
1302
|
-
function
|
|
1303
|
-
const [t] =
|
|
1302
|
+
function Ee(e) {
|
|
1303
|
+
const [t] = Be(e, new RegExp(Ke, "g")), [r] = Be(e, new RegExp(Ft, "g"));
|
|
1304
1304
|
return t ?? r;
|
|
1305
1305
|
}
|
|
1306
|
-
function
|
|
1306
|
+
function Be(e, t) {
|
|
1307
1307
|
return Array.from(e.matchAll(t)).flatMap(([, ...n]) => n.map((o) => J(o) ? o : ""));
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1310
|
-
const n =
|
|
1309
|
+
function Mt(e, t, r) {
|
|
1310
|
+
const n = Wt(t, r), [o] = Be(e, n);
|
|
1311
1311
|
return o;
|
|
1312
1312
|
}
|
|
1313
|
-
function
|
|
1313
|
+
function Tt(e, t) {
|
|
1314
1314
|
if (!t)
|
|
1315
1315
|
return e;
|
|
1316
|
-
const { name: r, param: n, value: o } = t, a =
|
|
1317
|
-
return
|
|
1316
|
+
const { name: r, param: n, value: o } = t, a = Wt(e, r);
|
|
1317
|
+
return Be(e, a).reduce((f, u) => u === void 0 ? f : f.replace(u, () => pe(o, n, r.startsWith("?"))), e);
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function Wt(e, t) {
|
|
1320
1320
|
const r = [
|
|
1321
1321
|
En,
|
|
1322
1322
|
Pn,
|
|
@@ -1336,13 +1336,13 @@ function Pn(e, t) {
|
|
|
1336
1336
|
const r = new RegExp(`\\${G}${t}\\${K}`, "g");
|
|
1337
1337
|
return e.replace(r, "(.+)");
|
|
1338
1338
|
}
|
|
1339
|
-
function
|
|
1339
|
+
function Jt({ protocol: e, host: t, pathname: r, search: n, searchParams: o, hash: a }) {
|
|
1340
1340
|
const s = new URL("https://localhost");
|
|
1341
1341
|
e && (s.protocol = e), t && (s.host = t), r && (s.pathname = r), o ? s.search = new URLSearchParams(o).toString() : n && (s.search = n), a && (s.hash = a);
|
|
1342
1342
|
const f = s.toString().replace(/^https:\/\/localhost\/*/, "/");
|
|
1343
1343
|
return Et(f);
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1345
|
+
function Xe(...e) {
|
|
1346
1346
|
const t = new URLSearchParams();
|
|
1347
1347
|
for (const r of e) {
|
|
1348
1348
|
const n = new URLSearchParams(r);
|
|
@@ -1352,20 +1352,20 @@ function Ye(...e) {
|
|
|
1352
1352
|
return t;
|
|
1353
1353
|
}
|
|
1354
1354
|
function bn(e, t = {}) {
|
|
1355
|
-
const { params: r = {}, query: n } = t, o = kn(e.query, r), a =
|
|
1356
|
-
return
|
|
1355
|
+
const { params: r = {}, query: n } = t, o = kn(e.query, r), a = Xe(o, n), s = An(e.path, r), f = Se(e.hash.value ?? t.hash).value, u = Sn(e.host, r), { protocol: c, host: l } = q(u);
|
|
1356
|
+
return Jt({ protocol: c, host: l, pathname: s, searchParams: a, hash: f });
|
|
1357
1357
|
}
|
|
1358
1358
|
function Sn(e, t) {
|
|
1359
1359
|
const r = e.value && !e.value.startsWith("http") ? `https://${e.value}` : e.value;
|
|
1360
1360
|
return Object.entries(e.params).reduce((n, [o, a]) => {
|
|
1361
|
-
const s =
|
|
1362
|
-
return s ?
|
|
1361
|
+
const s = Ee(`${G}${o}${K}`);
|
|
1362
|
+
return s ? Tt(n, { name: o, param: a, value: t[s] }) : n;
|
|
1363
1363
|
}, r);
|
|
1364
1364
|
}
|
|
1365
1365
|
function An(e, t) {
|
|
1366
1366
|
return Object.entries(e.params).reduce((r, [n, o]) => {
|
|
1367
|
-
const a =
|
|
1368
|
-
return a ?
|
|
1367
|
+
const a = Ee(`${G}${n}${K}`);
|
|
1368
|
+
return a ? Tt(r, { name: n, param: o, value: t[a] }) : r;
|
|
1369
1369
|
}, e.value);
|
|
1370
1370
|
}
|
|
1371
1371
|
function kn(e, t) {
|
|
@@ -1373,22 +1373,22 @@ function kn(e, t) {
|
|
|
1373
1373
|
if (!e.value)
|
|
1374
1374
|
return r;
|
|
1375
1375
|
for (const [n, o] of Array.from(r.entries())) {
|
|
1376
|
-
const a =
|
|
1376
|
+
const a = Ee(o);
|
|
1377
1377
|
if (!a)
|
|
1378
1378
|
continue;
|
|
1379
|
-
const f =
|
|
1380
|
-
f &&
|
|
1379
|
+
const f = Ye(o), u = f ? `?${a}` : a, c = pe(t[a], e.params[u], f), l = t[a] === void 0 && c === "";
|
|
1380
|
+
f && l ? r.delete(n, o) : r.set(n, c);
|
|
1381
1381
|
}
|
|
1382
1382
|
return r;
|
|
1383
1383
|
}
|
|
1384
1384
|
const xn = (e, t) => {
|
|
1385
1385
|
try {
|
|
1386
|
-
|
|
1386
|
+
Ze(e, t);
|
|
1387
1387
|
} catch {
|
|
1388
1388
|
return !1;
|
|
1389
1389
|
}
|
|
1390
1390
|
return !0;
|
|
1391
|
-
},
|
|
1391
|
+
}, Ze = (e, t) => {
|
|
1392
1392
|
const { pathname: r, search: n } = q(t);
|
|
1393
1393
|
return {
|
|
1394
1394
|
...Ln(e.path, r),
|
|
@@ -1398,16 +1398,19 @@ const xn = (e, t) => {
|
|
|
1398
1398
|
function Ln(e, t) {
|
|
1399
1399
|
const r = {}, n = decodeURIComponent(t);
|
|
1400
1400
|
for (const [o, a] of Object.entries(e.params)) {
|
|
1401
|
-
const s = o.startsWith("?"), f = s ? o.slice(1) : o,
|
|
1402
|
-
r[f] =
|
|
1401
|
+
const s = o.startsWith("?"), f = s ? o.slice(1) : o, u = Mt(n, e.value, o), c = de(u, a, s);
|
|
1402
|
+
r[f] = c;
|
|
1403
1403
|
}
|
|
1404
1404
|
return r;
|
|
1405
1405
|
}
|
|
1406
1406
|
function Un(e, t) {
|
|
1407
|
-
const r = {}, n = new URLSearchParams(t);
|
|
1408
|
-
for (const [
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1407
|
+
const r = {}, n = new URLSearchParams(e.value), o = new URLSearchParams(t);
|
|
1408
|
+
for (const [a, s] of Array.from(n.entries())) {
|
|
1409
|
+
const f = Ee(s);
|
|
1410
|
+
if (!f)
|
|
1411
|
+
continue;
|
|
1412
|
+
const c = Ye(s), l = c ? `?${f}` : f, v = o.get(a) ?? void 0, E = de(v, e.params[l], c);
|
|
1413
|
+
r[f] = E;
|
|
1411
1414
|
}
|
|
1412
1415
|
return r;
|
|
1413
1416
|
}
|
|
@@ -1423,7 +1426,7 @@ function Bn(e, t = {}, r = {}) {
|
|
|
1423
1426
|
matches: e.matches,
|
|
1424
1427
|
name: e.name,
|
|
1425
1428
|
query: Je(o),
|
|
1426
|
-
params:
|
|
1429
|
+
params: Ze(e, n),
|
|
1427
1430
|
state: qt(e.state, r.state),
|
|
1428
1431
|
hash: a,
|
|
1429
1432
|
href: n
|
|
@@ -1435,35 +1438,35 @@ const Cn = (e) => "name" in e.matched && !!e.matched.name, Nn = (e, t) => {
|
|
|
1435
1438
|
}, Vn = (e, t) => {
|
|
1436
1439
|
const { search: r } = q(t);
|
|
1437
1440
|
return vn(e).every((o) => o.test(r));
|
|
1438
|
-
},
|
|
1441
|
+
}, Ie = (e, t) => {
|
|
1439
1442
|
const { hash: r } = q(t), { value: n } = e.hash;
|
|
1440
1443
|
return n === void 0 || `#${n.toLowerCase()}` === r.toLowerCase();
|
|
1441
1444
|
};
|
|
1442
|
-
function
|
|
1445
|
+
function Hn(e) {
|
|
1443
1446
|
const { searchParams: t, pathname: r } = q(e), n = -1, o = 1;
|
|
1444
1447
|
return (a, s) => {
|
|
1445
|
-
const f = lt(a, t),
|
|
1446
|
-
return a.depth > s.depth ? n : a.depth < s.depth ? o : f +
|
|
1448
|
+
const f = lt(a, t), u = ft(a, r), c = lt(s, t), l = ft(s, r);
|
|
1449
|
+
return a.depth > s.depth ? n : a.depth < s.depth ? o : f + u > c + l ? n : f + u < c + l ? o : Ie(a, e) ? n : Ie(s, e) ? o : 0;
|
|
1447
1450
|
};
|
|
1448
1451
|
}
|
|
1449
1452
|
function ft(e, t) {
|
|
1450
|
-
const r = Object.keys(e.path.params).filter((o) => o.startsWith("?")).map((o) => o), n = r.filter((o) =>
|
|
1453
|
+
const r = Object.keys(e.path.params).filter((o) => o.startsWith("?")).map((o) => o), n = r.filter((o) => Mt(t, e.path.value, o) === void 0);
|
|
1451
1454
|
return r.length - n.length;
|
|
1452
1455
|
}
|
|
1453
1456
|
function lt(e, t) {
|
|
1454
1457
|
const r = new URLSearchParams(t), n = new URLSearchParams(e.query.value), o = Array.from(n.keys()), a = o.filter((s) => !r.has(s));
|
|
1455
1458
|
return o.length - a.length;
|
|
1456
1459
|
}
|
|
1457
|
-
const
|
|
1460
|
+
const jn = [
|
|
1458
1461
|
Cn,
|
|
1459
1462
|
Nn,
|
|
1460
1463
|
Vn,
|
|
1461
|
-
|
|
1464
|
+
Ie,
|
|
1462
1465
|
xn
|
|
1463
1466
|
];
|
|
1464
1467
|
function $n(e, t) {
|
|
1465
|
-
const r =
|
|
1466
|
-
return e.filter((n) =>
|
|
1468
|
+
const r = Hn(t);
|
|
1469
|
+
return e.filter((n) => jn.every((o) => o(n, t))).sort(r);
|
|
1467
1470
|
}
|
|
1468
1471
|
function _n(e, t, r) {
|
|
1469
1472
|
const n = $n(e, t);
|
|
@@ -1476,7 +1479,7 @@ function _n(e, t, r) {
|
|
|
1476
1479
|
matches: o.matches,
|
|
1477
1480
|
name: o.name,
|
|
1478
1481
|
query: Je(a),
|
|
1479
|
-
params:
|
|
1482
|
+
params: Ze(o, t),
|
|
1480
1483
|
state: qt(o.state, r),
|
|
1481
1484
|
hash: s,
|
|
1482
1485
|
href: Et(t)
|
|
@@ -1484,28 +1487,28 @@ function _n(e, t, r) {
|
|
|
1484
1487
|
}
|
|
1485
1488
|
function ht(e, t) {
|
|
1486
1489
|
const r = typeof e == "string" ? q(e) : e, n = typeof t == "string" ? q(t) : t, o = r.searchParams ?? new URLSearchParams(r.search), a = n.searchParams ?? new URLSearchParams(n.search);
|
|
1487
|
-
return
|
|
1490
|
+
return Jt({
|
|
1488
1491
|
protocol: J(n.protocol) ? n.protocol : r.protocol,
|
|
1489
1492
|
host: J(n.host) ? n.host : r.host,
|
|
1490
1493
|
pathname: J(n.pathname) ? n.pathname : r.pathname,
|
|
1491
|
-
searchParams:
|
|
1494
|
+
searchParams: Xe(a, o),
|
|
1492
1495
|
hash: J(n.hash) ? n.hash : r.hash
|
|
1493
1496
|
});
|
|
1494
1497
|
}
|
|
1495
|
-
function
|
|
1498
|
+
function et(e, t) {
|
|
1496
1499
|
const r = new RegExp(`\\${G}(\\??[\\w-_]+)\\${K}`, "g");
|
|
1497
1500
|
return Array.from(e.matchAll(r)).reduce((o, [a, s]) => {
|
|
1498
|
-
const f =
|
|
1501
|
+
const f = Ee(a);
|
|
1499
1502
|
if (!f)
|
|
1500
1503
|
return o;
|
|
1501
|
-
const
|
|
1502
|
-
return ie([f], o), o[s] =
|
|
1504
|
+
const u = qr(t, f);
|
|
1505
|
+
return ie([f], o), o[s] = u, o;
|
|
1503
1506
|
}, {});
|
|
1504
1507
|
}
|
|
1505
|
-
function
|
|
1508
|
+
function Oe(e, t) {
|
|
1506
1509
|
return {
|
|
1507
1510
|
value: e,
|
|
1508
|
-
params:
|
|
1511
|
+
params: et(e, t)
|
|
1509
1512
|
};
|
|
1510
1513
|
}
|
|
1511
1514
|
function qn(e, t) {
|
|
@@ -1513,11 +1516,11 @@ function qn(e, t) {
|
|
|
1513
1516
|
const n = `${t}${r.path.value}`;
|
|
1514
1517
|
return {
|
|
1515
1518
|
...r,
|
|
1516
|
-
path:
|
|
1519
|
+
path: Oe(n, r.path.params)
|
|
1517
1520
|
};
|
|
1518
1521
|
}) : e;
|
|
1519
1522
|
}
|
|
1520
|
-
class
|
|
1523
|
+
class In extends Error {
|
|
1521
1524
|
/**
|
|
1522
1525
|
* Constructs a new DuplicateNamesError instance with a message indicating the problematic name.
|
|
1523
1526
|
* @param name - The name of the name that was duplicated.
|
|
@@ -1526,18 +1529,18 @@ class On extends Error {
|
|
|
1526
1529
|
super(`Invalid Name "${t}": Router does not support multiple routes with the same name. All name names must be unique.`);
|
|
1527
1530
|
}
|
|
1528
1531
|
}
|
|
1529
|
-
function
|
|
1532
|
+
function On(e) {
|
|
1530
1533
|
const t = e.map(({ name: r }) => r);
|
|
1531
1534
|
for (const r of t)
|
|
1532
1535
|
if (bt(t, r) > 1)
|
|
1533
|
-
throw new
|
|
1536
|
+
throw new In(r);
|
|
1534
1537
|
}
|
|
1535
1538
|
function Dn(e, t = [], r) {
|
|
1536
1539
|
const n = [
|
|
1537
1540
|
...e,
|
|
1538
1541
|
...t.map((o) => o.routes)
|
|
1539
1542
|
].flat();
|
|
1540
|
-
return
|
|
1543
|
+
return On(n), qn(n, r);
|
|
1541
1544
|
}
|
|
1542
1545
|
function Fn(e = {}, t = []) {
|
|
1543
1546
|
const r = new Z();
|
|
@@ -1552,45 +1555,45 @@ function ee(e, t, r) {
|
|
|
1552
1555
|
function ho(e, t, r = []) {
|
|
1553
1556
|
const n = Dn(e, r, t == null ? void 0 : t.base), o = rn();
|
|
1554
1557
|
o.addGlobalRouteHooks(Fn(t, r));
|
|
1555
|
-
const a = Ge(), s = Kn(), f = hn(),
|
|
1558
|
+
const a = Ge(), s = Kn(), f = hn(), u = Kr({
|
|
1556
1559
|
mode: t == null ? void 0 : t.historyMode,
|
|
1557
1560
|
listener: ({ location: b }) => {
|
|
1558
1561
|
const U = X(b);
|
|
1559
|
-
|
|
1562
|
+
l(U, { state: b.state, replace: !0 });
|
|
1560
1563
|
}
|
|
1561
1564
|
});
|
|
1562
|
-
function
|
|
1565
|
+
function c(b, U = {}) {
|
|
1563
1566
|
return _n(n, b, U.state);
|
|
1564
1567
|
}
|
|
1565
|
-
async function
|
|
1568
|
+
async function l(b, U = {}) {
|
|
1566
1569
|
const W = a();
|
|
1567
|
-
if (
|
|
1568
|
-
|
|
1570
|
+
if (u.stopListening(), g(b)) {
|
|
1571
|
+
u.update(b, U);
|
|
1569
1572
|
return;
|
|
1570
1573
|
}
|
|
1571
|
-
const
|
|
1574
|
+
const O = c(b, U) ?? p("NotFound"), $ = I(W), Q = await o.runBeforeRouteHooks({ to: O, from: $ });
|
|
1572
1575
|
switch (Q.status) {
|
|
1573
1576
|
// On abort do nothing
|
|
1574
1577
|
case "ABORT":
|
|
1575
1578
|
return;
|
|
1576
1579
|
// On push update the history, and push new route, and return
|
|
1577
1580
|
case "PUSH":
|
|
1578
|
-
|
|
1581
|
+
u.update(b, U), await E(...Q.to);
|
|
1579
1582
|
return;
|
|
1580
1583
|
// On reject update the history, the route, and set the rejection type
|
|
1581
1584
|
case "REJECT":
|
|
1582
|
-
|
|
1585
|
+
u.update(b, U), y(Q.type);
|
|
1583
1586
|
break;
|
|
1584
1587
|
// On success update history, set the route, and clear the rejection
|
|
1585
1588
|
case "SUCCESS":
|
|
1586
|
-
|
|
1589
|
+
u.update(b, U), y(null);
|
|
1587
1590
|
break;
|
|
1588
1591
|
default:
|
|
1589
1592
|
throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(Q)}`);
|
|
1590
1593
|
}
|
|
1591
|
-
const
|
|
1592
|
-
s.setProps(
|
|
1593
|
-
if (
|
|
1594
|
+
const je = W;
|
|
1595
|
+
s.setProps(O).then((D) => {
|
|
1596
|
+
if (je === W)
|
|
1594
1597
|
switch (D.status) {
|
|
1595
1598
|
case "SUCCESS":
|
|
1596
1599
|
break;
|
|
@@ -1604,8 +1607,8 @@ function ho(e, t, r = []) {
|
|
|
1604
1607
|
const $e = D;
|
|
1605
1608
|
throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify($e)}`);
|
|
1606
1609
|
}
|
|
1607
|
-
}), S(
|
|
1608
|
-
const F = await o.runAfterRouteHooks({ to:
|
|
1610
|
+
}), S(O);
|
|
1611
|
+
const F = await o.runAfterRouteHooks({ to: O, from: $ });
|
|
1609
1612
|
switch (F.status) {
|
|
1610
1613
|
case "PUSH":
|
|
1611
1614
|
await E(...F.to);
|
|
@@ -1619,30 +1622,30 @@ function ho(e, t, r = []) {
|
|
|
1619
1622
|
const D = F;
|
|
1620
1623
|
throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(D)}`);
|
|
1621
1624
|
}
|
|
1622
|
-
|
|
1625
|
+
u.startListening();
|
|
1623
1626
|
}
|
|
1624
1627
|
const v = (b, U = {}, W = {}) => {
|
|
1625
|
-
const
|
|
1626
|
-
if (!
|
|
1628
|
+
const O = n.find(($) => $.name === b);
|
|
1629
|
+
if (!O)
|
|
1627
1630
|
throw new pn(String(b));
|
|
1628
|
-
return Bn(
|
|
1631
|
+
return Bn(O, U, W);
|
|
1629
1632
|
}, E = (b, U, W) => {
|
|
1630
1633
|
if (T(b)) {
|
|
1631
1634
|
const F = { ...U }, D = ht(b, {
|
|
1632
1635
|
searchParams: F.query,
|
|
1633
1636
|
hash: F.hash
|
|
1634
1637
|
});
|
|
1635
|
-
return
|
|
1638
|
+
return l(D, F);
|
|
1636
1639
|
}
|
|
1637
1640
|
if (typeof b == "string") {
|
|
1638
1641
|
const { replace: F, ...D } = { ...W }, $e = { ...U }, _e = v(b, $e, D), ur = it({ ..._e.matched.state }, { ..._e.state, ...D.state });
|
|
1639
|
-
return
|
|
1642
|
+
return l(_e.href, { replace: F, state: ur });
|
|
1640
1643
|
}
|
|
1641
|
-
const { replace:
|
|
1644
|
+
const { replace: O, ...$ } = { ...U }, Q = it({ ...b.matched.state }, { ...b.state, ...$.state }), je = ht(b.href, {
|
|
1642
1645
|
searchParams: $.query,
|
|
1643
1646
|
hash: $.hash
|
|
1644
1647
|
});
|
|
1645
|
-
return
|
|
1648
|
+
return l(je, { replace: O, state: Q });
|
|
1646
1649
|
}, P = (b, U, W) => {
|
|
1647
1650
|
if (T(b)) {
|
|
1648
1651
|
const $ = { ...U, replace: !0 };
|
|
@@ -1652,41 +1655,41 @@ function ho(e, t, r = []) {
|
|
|
1652
1655
|
const $ = { ...W, replace: !0 }, Q = { ...U };
|
|
1653
1656
|
return E(b, Q, $);
|
|
1654
1657
|
}
|
|
1655
|
-
const
|
|
1656
|
-
return E(b,
|
|
1658
|
+
const O = { ...U, replace: !0 };
|
|
1659
|
+
return E(b, O);
|
|
1657
1660
|
}, m = (b) => {
|
|
1658
1661
|
y(b);
|
|
1659
1662
|
}, { setRejection: y, rejection: i, getRejectionRoute: p } = sn({
|
|
1660
1663
|
...r.reduce((b, U) => ({ ...b, ...U.rejections }), {}),
|
|
1661
1664
|
...t == null ? void 0 : t.rejections
|
|
1662
|
-
}), A = p("NotFound"), { currentRoute: R, routerRoute: w, updateRoute: S } = Jr(A, E), k = un(t == null ? void 0 : t.initialUrl), d =
|
|
1665
|
+
}), A = p("NotFound"), { currentRoute: R, routerRoute: w, updateRoute: S } = Jr(A, E), k = un(t == null ? void 0 : t.initialUrl), d = u.location.state, { host: h } = q(k), g = zr(h);
|
|
1663
1666
|
let x = !1;
|
|
1664
1667
|
const { promise: L, resolve: B } = Promise.withResolvers();
|
|
1665
1668
|
async function C() {
|
|
1666
1669
|
if (x)
|
|
1667
1670
|
return L;
|
|
1668
|
-
x = !0, await
|
|
1671
|
+
x = !0, await l(k, { replace: !0, state: d }), u.startListening(), B();
|
|
1669
1672
|
}
|
|
1670
|
-
function
|
|
1671
|
-
|
|
1673
|
+
function j() {
|
|
1674
|
+
u.stopListening();
|
|
1672
1675
|
}
|
|
1673
|
-
function
|
|
1676
|
+
function I(b) {
|
|
1674
1677
|
return an(b) ? null : { ...R };
|
|
1675
1678
|
}
|
|
1676
1679
|
function nt(b) {
|
|
1677
|
-
b.component("RouterView", co), b.component("RouterLink", ro), b.provide(Ct, i), b.provide($t, o), b.provide(
|
|
1680
|
+
b.component("RouterView", co), b.component("RouterLink", ro), b.provide(Ct, i), b.provide($t, o), b.provide(tr, s), b.provide(It, f), b.provide(Pt, ot), C();
|
|
1678
1681
|
}
|
|
1679
1682
|
const ot = {
|
|
1680
1683
|
route: w,
|
|
1681
1684
|
resolve: v,
|
|
1682
|
-
find:
|
|
1685
|
+
find: c,
|
|
1683
1686
|
push: E,
|
|
1684
1687
|
replace: P,
|
|
1685
1688
|
reject: m,
|
|
1686
|
-
refresh:
|
|
1687
|
-
forward:
|
|
1688
|
-
back:
|
|
1689
|
-
go:
|
|
1689
|
+
refresh: u.refresh,
|
|
1690
|
+
forward: u.forward,
|
|
1691
|
+
back: u.back,
|
|
1692
|
+
go: u.go,
|
|
1690
1693
|
install: nt,
|
|
1691
1694
|
isExternal: g,
|
|
1692
1695
|
onBeforeRouteEnter: o.onBeforeRouteEnter,
|
|
@@ -1697,14 +1700,14 @@ function ho(e, t, r = []) {
|
|
|
1697
1700
|
onAfterRouteLeave: o.onAfterRouteLeave,
|
|
1698
1701
|
prefetch: t == null ? void 0 : t.prefetch,
|
|
1699
1702
|
start: C,
|
|
1700
|
-
stop:
|
|
1703
|
+
stop: j
|
|
1701
1704
|
};
|
|
1702
1705
|
return ot;
|
|
1703
1706
|
}
|
|
1704
1707
|
function dt(e, t) {
|
|
1705
1708
|
return {
|
|
1706
1709
|
value: e,
|
|
1707
|
-
params:
|
|
1710
|
+
params: et(e, t)
|
|
1708
1711
|
};
|
|
1709
1712
|
}
|
|
1710
1713
|
function po(e) {
|
|
@@ -1714,38 +1717,38 @@ function po(e) {
|
|
|
1714
1717
|
...e
|
|
1715
1718
|
};
|
|
1716
1719
|
}
|
|
1717
|
-
function
|
|
1720
|
+
function Gt(e, t) {
|
|
1718
1721
|
return {
|
|
1719
1722
|
value: e,
|
|
1720
|
-
params:
|
|
1723
|
+
params: et(e, t)
|
|
1721
1724
|
};
|
|
1722
1725
|
}
|
|
1723
1726
|
function Mn(e) {
|
|
1724
1727
|
return ve(e) && typeof e.hash == "string";
|
|
1725
1728
|
}
|
|
1726
|
-
function
|
|
1727
|
-
return e === void 0 ?
|
|
1729
|
+
function Qt(e) {
|
|
1730
|
+
return e === void 0 ? Se() : Mn(e) ? e : Se(e);
|
|
1728
1731
|
}
|
|
1729
|
-
function
|
|
1732
|
+
function zt(e) {
|
|
1730
1733
|
return e === void 0 ? "" : e;
|
|
1731
1734
|
}
|
|
1732
1735
|
function Tn(e) {
|
|
1733
1736
|
return ve(e) && typeof e.value == "string";
|
|
1734
1737
|
}
|
|
1735
|
-
function
|
|
1736
|
-
return e === void 0 ?
|
|
1738
|
+
function Kt(e) {
|
|
1739
|
+
return e === void 0 ? Oe("", {}) : Tn(e) ? e : Oe(e, {});
|
|
1737
1740
|
}
|
|
1738
1741
|
function Wn(e) {
|
|
1739
1742
|
return ve(e) && typeof e.value == "string";
|
|
1740
1743
|
}
|
|
1741
|
-
function
|
|
1744
|
+
function Yt(e) {
|
|
1742
1745
|
return e === void 0 ? dt("", {}) : Wn(e) ? e : dt(e, {});
|
|
1743
1746
|
}
|
|
1744
1747
|
function se(e) {
|
|
1745
|
-
const t = Qe(), r =
|
|
1748
|
+
const t = Qe(), r = zt(e.name), n = Kt(e.path), o = Yt(e.query), a = Qt(e.hash), s = e.meta ?? {}, f = Hr(e) ? e.state : {}, u = be({ id: t, meta: {}, state: {}, ...e }), c = {
|
|
1746
1749
|
id: t,
|
|
1747
|
-
matched:
|
|
1748
|
-
matches: [
|
|
1750
|
+
matched: u,
|
|
1751
|
+
matches: [u],
|
|
1749
1752
|
name: r,
|
|
1750
1753
|
path: n,
|
|
1751
1754
|
query: o,
|
|
@@ -1753,75 +1756,75 @@ function se(e) {
|
|
|
1753
1756
|
meta: s,
|
|
1754
1757
|
state: f,
|
|
1755
1758
|
depth: 1,
|
|
1756
|
-
host:
|
|
1759
|
+
host: Gt("", {}),
|
|
1757
1760
|
prefetch: e.prefetch
|
|
1758
|
-
},
|
|
1759
|
-
return ie(
|
|
1761
|
+
}, l = St(e) ? At(e.parent, c) : c;
|
|
1762
|
+
return ie(l.path.params, l.query.params), l;
|
|
1760
1763
|
}
|
|
1761
|
-
const
|
|
1764
|
+
const Ce = { template: "<div>This is component</div>" }, tt = se({
|
|
1762
1765
|
name: "parentA",
|
|
1763
1766
|
path: "/parentA/[paramA]"
|
|
1764
|
-
}),
|
|
1765
|
-
parent:
|
|
1767
|
+
}), Xt = se({
|
|
1768
|
+
parent: tt,
|
|
1766
1769
|
name: "parentA.childA",
|
|
1767
1770
|
path: "/childA/[?paramB]"
|
|
1768
1771
|
}), Jn = se({
|
|
1769
|
-
parent:
|
|
1772
|
+
parent: tt,
|
|
1770
1773
|
name: "parentA.childB",
|
|
1771
1774
|
path: "/childB/[paramD]",
|
|
1772
|
-
component:
|
|
1775
|
+
component: Ce
|
|
1773
1776
|
}), Gn = se({
|
|
1774
|
-
parent:
|
|
1777
|
+
parent: Xt,
|
|
1775
1778
|
name: "parentA.childA.grandChildA",
|
|
1776
1779
|
path: "/[paramC]",
|
|
1777
|
-
component:
|
|
1780
|
+
component: Ce
|
|
1778
1781
|
});
|
|
1779
1782
|
se({
|
|
1780
1783
|
name: "parentB",
|
|
1781
1784
|
path: "/parentB",
|
|
1782
|
-
component:
|
|
1785
|
+
component: Ce
|
|
1783
1786
|
}), se({
|
|
1784
1787
|
name: "parentC",
|
|
1785
1788
|
path: "/",
|
|
1786
|
-
component:
|
|
1789
|
+
component: Ce
|
|
1787
1790
|
});
|
|
1788
1791
|
const Qn = "lazy", zn = {
|
|
1789
1792
|
components: !0,
|
|
1790
1793
|
props: !1
|
|
1791
1794
|
};
|
|
1792
|
-
function
|
|
1795
|
+
function Pe(e) {
|
|
1793
1796
|
return ["eager", "lazy", "intent"].includes(e);
|
|
1794
1797
|
}
|
|
1795
|
-
function
|
|
1798
|
+
function Zt({ routerPrefetch: e, routePrefetch: t, linkPrefetch: r }, n) {
|
|
1796
1799
|
const o = qe(r, n), a = qe(t, n), s = qe(e, n), f = [
|
|
1797
1800
|
o,
|
|
1798
1801
|
a,
|
|
1799
1802
|
s,
|
|
1800
1803
|
zn[n],
|
|
1801
1804
|
Qn
|
|
1802
|
-
].reduce((
|
|
1803
|
-
return
|
|
1805
|
+
].reduce((u, c) => Pe(u) ? u : u === !0 && Pe(c) ? c : u === !0 && !Pe(c) ? u : u === void 0 ? c : u, void 0);
|
|
1806
|
+
return Pe(f) ? f : !1;
|
|
1804
1807
|
}
|
|
1805
1808
|
function qe(e, t) {
|
|
1806
1809
|
return ve(e) ? e[t] : e;
|
|
1807
1810
|
}
|
|
1808
|
-
function
|
|
1811
|
+
function er(e) {
|
|
1809
1812
|
return typeof e == "object" && e !== null && "then" in e;
|
|
1810
1813
|
}
|
|
1811
1814
|
function pt(e) {
|
|
1812
1815
|
try {
|
|
1813
1816
|
const t = e();
|
|
1814
|
-
return
|
|
1817
|
+
return er(t) ? t.catch((r) => r) : t;
|
|
1815
1818
|
} catch (t) {
|
|
1816
1819
|
return t;
|
|
1817
1820
|
}
|
|
1818
1821
|
}
|
|
1819
|
-
const
|
|
1822
|
+
const tr = Symbol();
|
|
1820
1823
|
function Kn() {
|
|
1821
|
-
const e =
|
|
1824
|
+
const e = Ne(/* @__PURE__ */ new Map()), { push: t, replace: r, reject: n } = jt(), o = (v, E, P) => E.matches.filter((m) => Zt({ ...P, routePrefetch: m.prefetch }, "props") === v).flatMap((m) => c(m)).reduce((m, { id: y, name: i, props: p }) => {
|
|
1822
1825
|
if (!p)
|
|
1823
1826
|
return m;
|
|
1824
|
-
const A =
|
|
1827
|
+
const A = u(y, i, E), R = pt(() => p(E, {
|
|
1825
1828
|
push: t,
|
|
1826
1829
|
replace: r,
|
|
1827
1830
|
reject: n
|
|
@@ -1832,11 +1835,11 @@ function Kn() {
|
|
|
1832
1835
|
e.set(E, P);
|
|
1833
1836
|
});
|
|
1834
1837
|
}, s = async (v) => {
|
|
1835
|
-
const E = v.matches.flatMap(
|
|
1838
|
+
const E = v.matches.flatMap(c), P = [], m = [];
|
|
1836
1839
|
for (const { id: y, name: i, props: p } of E) {
|
|
1837
1840
|
if (!p)
|
|
1838
1841
|
continue;
|
|
1839
|
-
const A =
|
|
1842
|
+
const A = u(y, i, v);
|
|
1840
1843
|
if (P.push(A), !e.has(A)) {
|
|
1841
1844
|
const R = pt(() => p(v, {
|
|
1842
1845
|
push: t,
|
|
@@ -1851,22 +1854,22 @@ function Kn() {
|
|
|
1851
1854
|
throw R;
|
|
1852
1855
|
})());
|
|
1853
1856
|
}
|
|
1854
|
-
|
|
1857
|
+
l(P);
|
|
1855
1858
|
try {
|
|
1856
1859
|
return await Promise.all(m), { status: "SUCCESS" };
|
|
1857
1860
|
} catch (y) {
|
|
1858
|
-
if (y instanceof ne || y instanceof
|
|
1861
|
+
if (y instanceof ne || y instanceof Le)
|
|
1859
1862
|
return y.response;
|
|
1860
1863
|
throw y;
|
|
1861
1864
|
}
|
|
1862
1865
|
}, f = (v, E, P) => {
|
|
1863
|
-
const m =
|
|
1866
|
+
const m = u(v, E, P);
|
|
1864
1867
|
return e.get(m);
|
|
1865
1868
|
};
|
|
1866
|
-
function
|
|
1869
|
+
function u(v, E, P) {
|
|
1867
1870
|
return [v, E, P.id, JSON.stringify(P.params)].join("-");
|
|
1868
1871
|
}
|
|
1869
|
-
function
|
|
1872
|
+
function c(v) {
|
|
1870
1873
|
return Te(v) ? Object.entries(v.props ?? {}).map(([E, P]) => ({ id: v.id, name: E, props: P })) : Me(v) ? [
|
|
1871
1874
|
{
|
|
1872
1875
|
id: v.id,
|
|
@@ -1875,7 +1878,7 @@ function Kn() {
|
|
|
1875
1878
|
}
|
|
1876
1879
|
] : [];
|
|
1877
1880
|
}
|
|
1878
|
-
function
|
|
1881
|
+
function l(v) {
|
|
1879
1882
|
for (const E in e.keys())
|
|
1880
1883
|
v.includes(E) || e.delete(E);
|
|
1881
1884
|
}
|
|
@@ -1886,8 +1889,8 @@ function Kn() {
|
|
|
1886
1889
|
setProps: s
|
|
1887
1890
|
};
|
|
1888
1891
|
}
|
|
1889
|
-
function
|
|
1890
|
-
const e = ce(
|
|
1892
|
+
function rr() {
|
|
1893
|
+
const e = ce(tr);
|
|
1891
1894
|
if (!e)
|
|
1892
1895
|
throw new Re();
|
|
1893
1896
|
return e;
|
|
@@ -1901,27 +1904,27 @@ function mt(e) {
|
|
|
1901
1904
|
function Rt(e, t, r) {
|
|
1902
1905
|
le(e, (n, o) => {
|
|
1903
1906
|
n && n.addEventListener(t, r), o && o.removeEventListener(t, r);
|
|
1904
|
-
}, { immediate: !0 }),
|
|
1907
|
+
}, { immediate: !0 }), Ve(() => {
|
|
1905
1908
|
e.value && e.value.removeEventListener(t, r);
|
|
1906
1909
|
});
|
|
1907
1910
|
}
|
|
1908
1911
|
function Xn(e) {
|
|
1909
|
-
const t = /* @__PURE__ */ new Map(), r = De(), { getPrefetchProps: n, setPrefetchProps: o } =
|
|
1910
|
-
const
|
|
1911
|
-
o(
|
|
1912
|
+
const t = /* @__PURE__ */ new Map(), r = De(), { getPrefetchProps: n, setPrefetchProps: o } = rr(), { isElementVisible: a } = dn(r), s = () => {
|
|
1913
|
+
const c = Array.from(t.values()).reduce((l, v) => (Object.assign(l, v), l), {});
|
|
1914
|
+
o(c);
|
|
1912
1915
|
};
|
|
1913
|
-
le(() =>
|
|
1914
|
-
t.clear(),
|
|
1915
|
-
}, { immediate: !0 }), le(a, (
|
|
1916
|
-
const { route:
|
|
1917
|
-
!
|
|
1916
|
+
le(() => H(e), ({ route: c, ...l }) => {
|
|
1917
|
+
t.clear(), c && u("eager", c, l);
|
|
1918
|
+
}, { immediate: !0 }), le(a, (c) => {
|
|
1919
|
+
const { route: l, ...v } = H(e);
|
|
1920
|
+
!l || !c || u("lazy", l, v);
|
|
1918
1921
|
}, { immediate: !0 }), Rt(r, "focusin", f), Rt(r, "mouseover", f);
|
|
1919
1922
|
function f() {
|
|
1920
|
-
const { route:
|
|
1921
|
-
|
|
1923
|
+
const { route: c, ...l } = H(e);
|
|
1924
|
+
c && u("intent", c, l);
|
|
1922
1925
|
}
|
|
1923
|
-
function c
|
|
1924
|
-
Zn(
|
|
1926
|
+
function u(c, l, v) {
|
|
1927
|
+
Zn(c, l, v), t.has(c) || t.set(c, n(c, l, v));
|
|
1925
1928
|
}
|
|
1926
1929
|
return {
|
|
1927
1930
|
element: r,
|
|
@@ -1930,7 +1933,7 @@ function Xn(e) {
|
|
|
1930
1933
|
}
|
|
1931
1934
|
function Zn(e, t, r) {
|
|
1932
1935
|
t.matches.forEach((n) => {
|
|
1933
|
-
|
|
1936
|
+
Zt({
|
|
1934
1937
|
...r,
|
|
1935
1938
|
routePrefetch: n.prefetch
|
|
1936
1939
|
}, "components") === e && (Me(n) && mt(n.component) && n.component.__asyncLoader(), Te(n) && Object.values(n.components).forEach((a) => {
|
|
@@ -1938,50 +1941,50 @@ function Zn(e, t, r) {
|
|
|
1938
1941
|
}));
|
|
1939
1942
|
});
|
|
1940
1943
|
}
|
|
1941
|
-
function
|
|
1944
|
+
function nr(e, t, { exact: r } = {}) {
|
|
1942
1945
|
return Tr(e) ? t === void 0 ? !0 : r ? e.matched.name === t : e.matches.map((n) => n.name).includes(t) : !1;
|
|
1943
1946
|
}
|
|
1944
1947
|
function eo(e, t = {}, r = {}) {
|
|
1945
1948
|
const n = Fe(), o = N(() => {
|
|
1946
|
-
const m =
|
|
1947
|
-
return typeof m != "string" ? m : T(m) ? n.find(m,
|
|
1949
|
+
const m = H(e);
|
|
1950
|
+
return typeof m != "string" ? m : T(m) ? n.find(m, H(r)) : n.resolve(m, H(t), H(r));
|
|
1948
1951
|
}), a = N(() => {
|
|
1949
1952
|
if (o.value)
|
|
1950
1953
|
return o.value.href;
|
|
1951
|
-
const m =
|
|
1954
|
+
const m = H(e);
|
|
1952
1955
|
if (T(m))
|
|
1953
1956
|
return m;
|
|
1954
1957
|
console.error(new Error("Failed to resolve route in RouterLink."));
|
|
1955
|
-
}), s = N(() =>
|
|
1958
|
+
}), s = N(() => nr(n.route) && n.route.matches.some((m) => {
|
|
1956
1959
|
var y;
|
|
1957
1960
|
return m.id === ((y = o.value) == null ? void 0 : y.id);
|
|
1958
1961
|
})), f = N(() => {
|
|
1959
1962
|
var m;
|
|
1960
1963
|
return n.route.id === ((m = o.value) == null ? void 0 : m.id);
|
|
1961
|
-
}),
|
|
1962
|
-
const m =
|
|
1963
|
-
return typeof m != "string" || T(m) ?
|
|
1964
|
-
}), { element:
|
|
1964
|
+
}), u = N(() => !!a.value && n.isExternal(a.value)), c = N(() => {
|
|
1965
|
+
const m = H(e);
|
|
1966
|
+
return typeof m != "string" || T(m) ? H(t) : H(r);
|
|
1967
|
+
}), { element: l, commit: v } = Xn(() => ({
|
|
1965
1968
|
route: o.value,
|
|
1966
1969
|
routerPrefetch: n.prefetch,
|
|
1967
|
-
linkPrefetch:
|
|
1970
|
+
linkPrefetch: c.value.prefetch
|
|
1968
1971
|
})), E = (m) => {
|
|
1969
1972
|
v();
|
|
1970
1973
|
const y = {
|
|
1971
|
-
replace: (m == null ? void 0 : m.replace) ??
|
|
1972
|
-
query:
|
|
1973
|
-
hash: (m == null ? void 0 : m.hash) ??
|
|
1974
|
-
state: { ...
|
|
1975
|
-
}, i =
|
|
1976
|
-
return T(i) || typeof i == "object" ? n.push(i, y) : n.push(i,
|
|
1974
|
+
replace: (m == null ? void 0 : m.replace) ?? c.value.replace,
|
|
1975
|
+
query: Xe(c.value.query, m == null ? void 0 : m.query),
|
|
1976
|
+
hash: (m == null ? void 0 : m.hash) ?? c.value.hash,
|
|
1977
|
+
state: { ...c.value.state, ...m == null ? void 0 : m.state }
|
|
1978
|
+
}, i = H(e);
|
|
1979
|
+
return T(i) || typeof i == "object" ? n.push(i, y) : n.push(i, H(t), y);
|
|
1977
1980
|
};
|
|
1978
1981
|
return {
|
|
1979
|
-
element:
|
|
1982
|
+
element: l,
|
|
1980
1983
|
route: o,
|
|
1981
1984
|
href: a,
|
|
1982
1985
|
isMatch: s,
|
|
1983
1986
|
isExactMatch: f,
|
|
1984
|
-
isExternal:
|
|
1987
|
+
isExternal: u,
|
|
1985
1988
|
push: E,
|
|
1986
1989
|
replace: (m) => E({ ...m, replace: !0 })
|
|
1987
1990
|
};
|
|
@@ -2000,9 +2003,9 @@ const to = ["href"], ro = /* @__PURE__ */ ue({
|
|
|
2000
2003
|
const t = e, r = Fe(), n = N(() => E(t.to)), o = N(() => P(t.to)), a = N(() => {
|
|
2001
2004
|
const { to: y, ...i } = t;
|
|
2002
2005
|
return i;
|
|
2003
|
-
}), { element: s, isMatch: f, isExactMatch:
|
|
2006
|
+
}), { element: s, isMatch: f, isExactMatch: u, isExternal: c, push: l } = eo(() => typeof t.to == "function" ? t.to(r.resolve) : t.to, a), v = N(() => ({
|
|
2004
2007
|
"router-link--match": f.value,
|
|
2005
|
-
"router-link--exact-match":
|
|
2008
|
+
"router-link--exact-match": u.value
|
|
2006
2009
|
}));
|
|
2007
2010
|
function E(y) {
|
|
2008
2011
|
if (typeof y == "function") {
|
|
@@ -2019,7 +2022,7 @@ const to = ["href"], ro = /* @__PURE__ */ ue({
|
|
|
2019
2022
|
return T(y) ? y : y == null ? void 0 : y.href;
|
|
2020
2023
|
}
|
|
2021
2024
|
function m(y) {
|
|
2022
|
-
y.preventDefault(),
|
|
2025
|
+
y.preventDefault(), l();
|
|
2023
2026
|
}
|
|
2024
2027
|
return (y, i) => (yt(), dr("a", {
|
|
2025
2028
|
ref_key: "element",
|
|
@@ -2028,7 +2031,7 @@ const to = ["href"], ro = /* @__PURE__ */ ue({
|
|
|
2028
2031
|
class: pr(["router-link", v.value]),
|
|
2029
2032
|
onClick: m
|
|
2030
2033
|
}, [
|
|
2031
|
-
gt(y.$slots, "default", wt(mr({ route: n.value, isMatch: fe(f), isExactMatch: fe(
|
|
2034
|
+
gt(y.$slots, "default", wt(mr({ route: n.value, isMatch: fe(f), isExactMatch: fe(u), isExternal: fe(c) })))
|
|
2032
2035
|
], 10, to));
|
|
2033
2036
|
}
|
|
2034
2037
|
});
|
|
@@ -2037,14 +2040,14 @@ function no(e, t) {
|
|
|
2037
2040
|
function n() {
|
|
2038
2041
|
if (!e)
|
|
2039
2042
|
return;
|
|
2040
|
-
if (!
|
|
2043
|
+
if (!nr(r.route, e, t))
|
|
2041
2044
|
throw new Ar(e, r.route.name);
|
|
2042
2045
|
}
|
|
2043
2046
|
return le(r.route, n, { immediate: !0, deep: !0 }), r.route;
|
|
2044
2047
|
}
|
|
2045
|
-
const
|
|
2046
|
-
function
|
|
2047
|
-
return ce(
|
|
2048
|
+
const or = Symbol();
|
|
2049
|
+
function rt() {
|
|
2050
|
+
return ce(or, 0);
|
|
2048
2051
|
}
|
|
2049
2052
|
function oo(e, t) {
|
|
2050
2053
|
return ue({
|
|
@@ -2052,7 +2055,7 @@ function oo(e, t) {
|
|
|
2052
2055
|
expose: [],
|
|
2053
2056
|
setup() {
|
|
2054
2057
|
const r = t(), n = Rr();
|
|
2055
|
-
return () => r instanceof Error ? "" :
|
|
2058
|
+
return () => r instanceof Error ? "" : er(r) ? n != null && n.suspense ? te(so(e, r)) : te(ao(e, r)) : te(e, r);
|
|
2056
2059
|
}
|
|
2057
2060
|
});
|
|
2058
2061
|
}
|
|
@@ -2082,58 +2085,58 @@ const co = /* @__PURE__ */ ue({
|
|
|
2082
2085
|
name: { default: "default" }
|
|
2083
2086
|
},
|
|
2084
2087
|
setup(e) {
|
|
2085
|
-
const t = no(), r = Mr(), n =
|
|
2086
|
-
yr(
|
|
2088
|
+
const t = no(), r = Mr(), n = rt(), { getProps: o } = rr(), a = vr("RouterView", !0);
|
|
2089
|
+
yr(or, n + 1);
|
|
2087
2090
|
const s = N(() => {
|
|
2088
2091
|
if (r.value)
|
|
2089
2092
|
return r.value.component;
|
|
2090
|
-
const
|
|
2091
|
-
if (!
|
|
2093
|
+
const c = t.matches.at(n);
|
|
2094
|
+
if (!c)
|
|
2092
2095
|
return null;
|
|
2093
|
-
const
|
|
2094
|
-
return
|
|
2096
|
+
const l = f(c), v = o(c.id, e.name, t);
|
|
2097
|
+
return l ? v ? oo(l, () => v) : l : null;
|
|
2095
2098
|
});
|
|
2096
|
-
function f(
|
|
2097
|
-
return c
|
|
2099
|
+
function f(c) {
|
|
2100
|
+
return u(c)[e.name];
|
|
2098
2101
|
}
|
|
2099
|
-
function c
|
|
2100
|
-
return Te(
|
|
2102
|
+
function u(c) {
|
|
2103
|
+
return Te(c) ? c.components : Me(c) ? { default: c.component } : typeof a == "string" ? {} : { default: a };
|
|
2101
2104
|
}
|
|
2102
|
-
return (
|
|
2105
|
+
return (c, l) => s.value ? gt(c.$slots, "default", wt(gr({ key: 0 }, { route: fe(t), component: s.value, rejection: fe(r) })), () => [
|
|
2103
2106
|
(yt(), wr(Er(s.value)))
|
|
2104
2107
|
]) : Pr("", !0);
|
|
2105
2108
|
}
|
|
2106
2109
|
});
|
|
2107
|
-
function
|
|
2110
|
+
function ar() {
|
|
2108
2111
|
const e = ce($t);
|
|
2109
2112
|
if (!e)
|
|
2110
2113
|
throw new Re();
|
|
2111
2114
|
return e;
|
|
2112
2115
|
}
|
|
2113
|
-
function
|
|
2116
|
+
function sr(e) {
|
|
2114
2117
|
return (t) => {
|
|
2115
|
-
const r =
|
|
2116
|
-
return
|
|
2118
|
+
const r = rt(), o = ar().addComponentBeforeRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
|
|
2119
|
+
return Ve(o), o;
|
|
2117
2120
|
};
|
|
2118
2121
|
}
|
|
2119
|
-
function
|
|
2122
|
+
function cr(e) {
|
|
2120
2123
|
return (t) => {
|
|
2121
|
-
const r =
|
|
2122
|
-
return
|
|
2124
|
+
const r = rt(), o = ar().addComponentAfterRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
|
|
2125
|
+
return Ve(o), o;
|
|
2123
2126
|
};
|
|
2124
2127
|
}
|
|
2125
|
-
const mo =
|
|
2128
|
+
const mo = sr("onBeforeRouteLeave"), Ro = sr("onBeforeRouteUpdate"), vo = cr("onAfterRouteLeave"), yo = cr("onAfterRouteUpdate");
|
|
2126
2129
|
function uo(e) {
|
|
2127
2130
|
return ve(e) && typeof e.value == "string";
|
|
2128
2131
|
}
|
|
2129
2132
|
function vt(e) {
|
|
2130
|
-
return uo(e) ? e :
|
|
2133
|
+
return uo(e) ? e : Gt(e, {});
|
|
2131
2134
|
}
|
|
2132
|
-
function
|
|
2133
|
-
const t = Qe(), r =
|
|
2135
|
+
function go(e) {
|
|
2136
|
+
const t = Qe(), r = zt(e.name), n = Kt(e.path), o = Yt(e.query), a = Qt(e.hash), s = e.meta ?? {}, f = Vr(e) ? vt(e.host) : vt(""), u = be({ id: t, meta: {}, state: {}, ...e }), c = {
|
|
2134
2137
|
id: t,
|
|
2135
|
-
matched:
|
|
2136
|
-
matches: [
|
|
2138
|
+
matched: u,
|
|
2139
|
+
matches: [u],
|
|
2137
2140
|
name: r,
|
|
2138
2141
|
host: f,
|
|
2139
2142
|
path: n,
|
|
@@ -2142,8 +2145,8 @@ function wo(e) {
|
|
|
2142
2145
|
meta: s,
|
|
2143
2146
|
depth: 1,
|
|
2144
2147
|
state: {}
|
|
2145
|
-
},
|
|
2146
|
-
return ie(
|
|
2148
|
+
}, l = St(e) ? At(e.parent, c) : c;
|
|
2149
|
+
return ie(l.path.params, l.query.params, l.host.params), l;
|
|
2147
2150
|
}
|
|
2148
2151
|
export {
|
|
2149
2152
|
br as DuplicateParamsError,
|
|
@@ -2153,19 +2156,18 @@ export {
|
|
|
2153
2156
|
co as RouterView,
|
|
2154
2157
|
Ar as UseRouteInvalidError,
|
|
2155
2158
|
Et as asUrl,
|
|
2156
|
-
|
|
2157
|
-
|
|
2159
|
+
go as createExternalRoute,
|
|
2160
|
+
Or as createParam,
|
|
2158
2161
|
se as createRoute,
|
|
2159
2162
|
ho as createRouter,
|
|
2160
2163
|
po as createRouterPlugin,
|
|
2161
|
-
|
|
2164
|
+
nr as isRoute,
|
|
2162
2165
|
T as isUrl,
|
|
2163
|
-
vo as
|
|
2164
|
-
yo as
|
|
2165
|
-
go as onAfterRouteUpdate,
|
|
2166
|
+
vo as onAfterRouteLeave,
|
|
2167
|
+
yo as onAfterRouteUpdate,
|
|
2166
2168
|
mo as onBeforeRouteLeave,
|
|
2167
2169
|
Ro as onBeforeRouteUpdate,
|
|
2168
|
-
|
|
2170
|
+
Oe as path,
|
|
2169
2171
|
dt as query,
|
|
2170
2172
|
eo as useLink,
|
|
2171
2173
|
no as useRoute,
|