@kitbag/router 0.13.3 → 0.13.4

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.
@@ -1,43 +1,43 @@
1
- var sn = Object.defineProperty;
2
- var cn = (e, t, n) => t in e ? sn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var _ = (e, t, n) => cn(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { inject as re, toRefs as un, computed as N, reactive as Ue, defineComponent as le, h as ve, ref as qe, markRaw as ye, defineAsyncComponent as fn, onMounted as ln, onBeforeUnmount as hn, watch as je, toValue as se, toRef as pn, onUnmounted as mt, openBlock as gt, createElementBlock as dn, normalizeClass as mn, renderSlot as vt, normalizeProps as yt, guardReactiveProps as gn, unref as ce, resolveComponent as vn, provide as yn, mergeProps as Rn, createBlock as wn, resolveDynamicComponent as Pn, createCommentVNode as En } from "vue";
5
- class he extends Error {
1
+ var cn = Object.defineProperty;
2
+ var un = (e, t, n) => t in e ? cn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var _ = (e, t, n) => un(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { inject as oe, toRefs as fn, computed as N, reactive as Ue, defineComponent as ae, h as Y, ref as qe, markRaw as ve, defineAsyncComponent as ln, onMounted as hn, onBeforeUnmount as pn, watch as je, toValue as ue, toRef as dn, onUnmounted as mt, openBlock as gt, createElementBlock as mn, normalizeClass as gn, renderSlot as yt, normalizeProps as vt, guardReactiveProps as yn, unref as ie, getCurrentInstance as vn, resolveComponent as Rn, provide as wn, mergeProps as Pn, createBlock as En, resolveDynamicComponent as bn, createCommentVNode as Sn } from "vue";
5
+ class pe extends Error {
6
6
  constructor() {
7
7
  super("Router not installed");
8
8
  }
9
9
  }
10
- function pe(e) {
10
+ function de(e) {
11
11
  return typeof e == "object" && e !== null && !Array.isArray(e);
12
12
  }
13
- function bn(e) {
13
+ function kn(e) {
14
14
  return e.every((t) => Array.isArray(t));
15
15
  }
16
- function de(e) {
16
+ function me(e) {
17
17
  return typeof e == "string" && e.length > 0;
18
18
  }
19
19
  function Re(e) {
20
20
  return {
21
- value: de(e) ? e.replace(/^#*/, "") : void 0
21
+ value: me(e) ? e.replace(/^#*/, "") : void 0
22
22
  };
23
23
  }
24
- function Sn(e, t) {
24
+ function An(e, t) {
25
25
  return Re(`${e.value ?? ""}${t.value ?? ""}`);
26
26
  }
27
- class kn extends Error {
27
+ class xn extends Error {
28
28
  constructor(t) {
29
29
  super(`Child property on meta for ${t} conflicts with the parent meta.`);
30
30
  }
31
31
  }
32
- function An(e, t) {
33
- return xn(e, t), { ...e, ...t };
32
+ function Un(e, t) {
33
+ return Bn(e, t), { ...e, ...t };
34
34
  }
35
- function xn(e, t) {
35
+ function Bn(e, t) {
36
36
  const n = Object.keys(e).find((r) => r in t && typeof t[r] != typeof e[r]);
37
37
  if (n)
38
- throw new kn(n);
38
+ throw new xn(n);
39
39
  }
40
- class Un extends Error {
40
+ class Cn extends Error {
41
41
  /**
42
42
  * Constructs a new DuplicateParamsError instance with a message indicating the problematic parameter.
43
43
  * @param paramName - The name of the parameter that was duplicated.
@@ -46,37 +46,37 @@ class Un extends Error {
46
46
  super(`Invalid Param "${t}": Router does not support multiple params by the same name. All param names must be unique.`);
47
47
  }
48
48
  }
49
- function Y(e) {
49
+ function X(e) {
50
50
  return Array.isArray(e) ? e : [e];
51
51
  }
52
52
  function Rt(e, t) {
53
53
  return e.filter((n) => t === n).length;
54
54
  }
55
- function oe(...e) {
56
- const t = e.flatMap((n) => Array.isArray(n) ? n : Object.keys(n).map(Bn));
55
+ function se(...e) {
56
+ const t = e.flatMap((n) => Array.isArray(n) ? n : Object.keys(n).map(Ln));
57
57
  for (const n of t)
58
58
  if (Rt(t, n) > 1)
59
- throw new Un(n);
59
+ throw new Cn(n);
60
60
  }
61
- function Bn(e) {
61
+ function Ln(e) {
62
62
  return e.startsWith("?") ? e.slice(1) : e;
63
63
  }
64
- function Ln(e, t) {
65
- return oe(e.params, t.params), {
64
+ function Nn(e, t) {
65
+ return se(e.params, t.params), {
66
66
  value: `${e.value}${t.value}`,
67
67
  params: { ...e.params, ...t.params }
68
68
  };
69
69
  }
70
- function Cn(e, t) {
71
- return oe(e.params, t.params), {
72
- value: [e.value, t.value].filter(de).join("&"),
70
+ function Hn(e, t) {
71
+ return se(e.params, t.params), {
72
+ value: [e.value, t.value].filter(me).join("&"),
73
73
  params: { ...e.params, ...t.params }
74
74
  };
75
75
  }
76
- function Nn(e, t) {
77
- return oe(e, t), { ...e, ...t };
76
+ function jn(e, t) {
77
+ return se(e, t), { ...e, ...t };
78
78
  }
79
- function Hn(e) {
79
+ function Vn(e) {
80
80
  return "host" in e && !!e.host;
81
81
  }
82
82
  function wt(e) {
@@ -88,17 +88,17 @@ function _e(e) {
88
88
  function Me(e) {
89
89
  return "components" in e && !!e.components;
90
90
  }
91
- function jn(e) {
91
+ function $n(e) {
92
92
  return "state" in e && !!e.state;
93
93
  }
94
94
  function Pt(e, t) {
95
95
  return {
96
96
  ...t,
97
- path: Ln(e.path, t.path),
98
- query: Cn(e.query, t.query),
99
- meta: An(e.meta, t.meta),
100
- state: Nn(e.state, t.state),
101
- hash: Sn(e.hash, t.hash),
97
+ path: Nn(e.path, t.path),
98
+ query: Hn(e.query, t.query),
99
+ meta: Un(e.meta, t.meta),
100
+ state: jn(e.state, t.state),
101
+ hash: An(e.hash, t.hash),
102
102
  matches: [...e.matches, t.matched],
103
103
  host: e.host,
104
104
  depth: e.depth + 1
@@ -107,32 +107,32 @@ function Pt(e, t) {
107
107
  function Te() {
108
108
  return typeof window < "u" && typeof window.document < "u";
109
109
  }
110
- class Z extends Error {
110
+ class ee extends Error {
111
111
  }
112
- const W = "[", G = "]";
113
- function Vn(e) {
112
+ const D = "[", G = "]";
113
+ function On(e) {
114
114
  return e !== String && e !== Boolean && e !== Number && e !== Date;
115
115
  }
116
- function $n(e) {
117
- return typeof e == "function" && Vn(e);
116
+ function qn(e) {
117
+ return typeof e == "function" && On(e);
118
118
  }
119
119
  function Be(e) {
120
120
  return typeof e == "object" && "get" in e && typeof e.get == "function" && "set" in e && typeof e.set == "function";
121
121
  }
122
- function On(e) {
122
+ function _n(e) {
123
123
  return Be(e) && e.defaultValue !== void 0;
124
124
  }
125
- function uo(e, t) {
126
- return Mn(e, t);
125
+ function fo(e, t) {
126
+ return Wn(e, t);
127
127
  }
128
- function qn(e, t) {
128
+ function Mn(e, t) {
129
129
  return e[t] ?? String;
130
130
  }
131
131
  const O = {
132
132
  invalid: (e) => {
133
- throw new Z(e);
133
+ throw new ee(e);
134
134
  }
135
- }, _n = {
135
+ }, Tn = {
136
136
  get: (e) => e,
137
137
  set: (e, { invalid: t }) => {
138
138
  if (typeof e != "string")
@@ -192,16 +192,16 @@ const O = {
192
192
  }
193
193
  }
194
194
  };
195
- function ue(e, t, n = !1) {
196
- if (e === void 0 || !de(e)) {
197
- if (On(t))
195
+ function fe(e, t, n = !1) {
196
+ if (e === void 0 || !me(e)) {
197
+ if (_n(t))
198
198
  return t.defaultValue;
199
199
  if (n)
200
200
  return;
201
- throw new Z();
201
+ throw new ee();
202
202
  }
203
203
  if (t === String)
204
- return _n.get(e, O);
204
+ return Tn.get(e, O);
205
205
  if (t === Boolean)
206
206
  return Et.get(e, O);
207
207
  if (t === Number)
@@ -210,22 +210,22 @@ function ue(e, t, n = !1) {
210
210
  return St.get(e, O);
211
211
  if (t === JSON)
212
212
  return kt.get(e, O);
213
- if ($n(t))
213
+ if (qn(t))
214
214
  return t(e, O);
215
215
  if (Be(t))
216
216
  return t.get(e, O);
217
217
  if (t instanceof RegExp) {
218
218
  if (t.test(e))
219
219
  return e;
220
- throw new Z();
220
+ throw new ee();
221
221
  }
222
222
  return e;
223
223
  }
224
- function ie(e, t, n = !1) {
224
+ function le(e, t, n = !1) {
225
225
  if (e === void 0) {
226
226
  if (n)
227
227
  return "";
228
- throw new Z();
228
+ throw new ee();
229
229
  }
230
230
  if (t === Boolean)
231
231
  return Et.set(e, O);
@@ -240,13 +240,13 @@ function ie(e, t, n = !1) {
240
240
  try {
241
241
  return e.toString();
242
242
  } catch {
243
- throw new Z();
243
+ throw new ee();
244
244
  }
245
245
  }
246
- function Mn(e, t) {
246
+ function Wn(e, t) {
247
247
  return Be(e) ? { ...e, defaultValue: t ?? e.defaultValue } : {
248
- get: (n) => ue(n, e),
249
- set: (n) => ie(n, e),
248
+ get: (n) => fe(n, e),
249
+ set: (n) => le(n, e),
250
250
  defaultValue: t
251
251
  };
252
252
  }
@@ -264,7 +264,7 @@ var H;
264
264
  (function(e) {
265
265
  e.Pop = "POP", e.Push = "PUSH", e.Replace = "REPLACE";
266
266
  })(H || (H = {}));
267
- var ee = process.env.NODE_ENV !== "production" ? function(e) {
267
+ var te = process.env.NODE_ENV !== "production" ? function(e) {
268
268
  return Object.freeze(e);
269
269
  } : function(e) {
270
270
  return e;
@@ -278,18 +278,18 @@ function K(e, t) {
278
278
  }
279
279
  }
280
280
  }
281
- var we = "beforeunload", Tn = "hashchange", At = "popstate";
281
+ var we = "beforeunload", Dn = "hashchange", At = "popstate";
282
282
  function ot(e) {
283
283
  e === void 0 && (e = {});
284
284
  var t = e, n = t.window, r = n === void 0 ? document.defaultView : n, o = r.history;
285
285
  function a() {
286
- var v = r.location, h = v.pathname, g = v.search, b = v.hash, S = o.state || {};
287
- return [S.idx, ee({
286
+ var y = r.location, h = y.pathname, g = y.search, b = y.hash, k = o.state || {};
287
+ return [k.idx, te({
288
288
  pathname: h,
289
289
  search: g,
290
290
  hash: b,
291
- state: S.usr || null,
292
- key: S.key || "default"
291
+ state: k.usr || null,
292
+ key: k.key || "default"
293
293
  })];
294
294
  }
295
295
  var s = null;
@@ -297,17 +297,17 @@ function ot(e) {
297
297
  if (s)
298
298
  p.call(s), s = null;
299
299
  else {
300
- var v = H.Pop, h = a(), g = h[0], b = h[1];
300
+ var y = H.Pop, h = a(), g = h[0], b = h[1];
301
301
  if (p.length)
302
302
  if (g != null) {
303
- var S = f - g;
304
- S && (s = {
305
- action: v,
303
+ var k = f - g;
304
+ k && (s = {
305
+ action: y,
306
306
  location: b,
307
307
  retry: function() {
308
- x(S * -1);
308
+ x(k * -1);
309
309
  }
310
- }, x(S));
310
+ }, x(k));
311
311
  } else
312
312
  process.env.NODE_ENV !== "production" && K(
313
313
  !1,
@@ -317,76 +317,76 @@ function ot(e) {
317
317
  "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."
318
318
  );
319
319
  else
320
- A(v);
320
+ A(y);
321
321
  }
322
322
  }
323
323
  r.addEventListener(At, c);
324
- var u = H.Pop, i = a(), f = i[0], l = i[1], m = te(), p = te();
324
+ var u = H.Pop, i = a(), f = i[0], l = i[1], m = ne(), p = ne();
325
325
  f == null && (f = 0, o.replaceState(Q({}, o.state, {
326
326
  idx: f
327
327
  }), ""));
328
- function P(v) {
329
- return typeof v == "string" ? v : z(v);
328
+ function P(y) {
329
+ return typeof y == "string" ? y : z(y);
330
330
  }
331
- function y(v, h) {
332
- return h === void 0 && (h = null), ee(Q({
331
+ function R(y, h) {
332
+ return h === void 0 && (h = null), te(Q({
333
333
  pathname: l.pathname,
334
334
  hash: "",
335
335
  search: ""
336
- }, typeof v == "string" ? fe(v) : v, {
336
+ }, typeof y == "string" ? he(y) : y, {
337
337
  state: h,
338
338
  key: Ee()
339
339
  }));
340
340
  }
341
- function R(v, h) {
341
+ function v(y, h) {
342
342
  return [{
343
- usr: v.state,
344
- key: v.key,
343
+ usr: y.state,
344
+ key: y.key,
345
345
  idx: h
346
- }, P(v)];
346
+ }, P(y)];
347
347
  }
348
- function k(v, h, g) {
348
+ function S(y, h, g) {
349
349
  return !p.length || (p.call({
350
- action: v,
350
+ action: y,
351
351
  location: h,
352
352
  retry: g
353
353
  }), !1);
354
354
  }
355
- function A(v) {
356
- u = v;
355
+ function A(y) {
356
+ u = y;
357
357
  var h = a();
358
358
  f = h[0], l = h[1], m.call({
359
359
  action: u,
360
360
  location: l
361
361
  });
362
362
  }
363
- function d(v, h) {
364
- var g = H.Push, b = y(v, h);
365
- function S() {
366
- d(v, h);
363
+ function d(y, h) {
364
+ var g = H.Push, b = R(y, h);
365
+ function k() {
366
+ d(y, h);
367
367
  }
368
- if (k(g, b, S)) {
369
- var B = R(b, f + 1), C = B[0], j = B[1];
368
+ if (S(g, b, k)) {
369
+ var B = v(b, f + 1), L = B[0], j = B[1];
370
370
  try {
371
- o.pushState(C, "", j);
371
+ o.pushState(L, "", j);
372
372
  } catch {
373
373
  r.location.assign(j);
374
374
  }
375
375
  A(g);
376
376
  }
377
377
  }
378
- function E(v, h) {
379
- var g = H.Replace, b = y(v, h);
380
- function S() {
381
- E(v, h);
378
+ function E(y, h) {
379
+ var g = H.Replace, b = R(y, h);
380
+ function k() {
381
+ E(y, h);
382
382
  }
383
- if (k(g, b, S)) {
384
- var B = R(b, f), C = B[0], j = B[1];
385
- o.replaceState(C, "", j), A(g);
383
+ if (S(g, b, k)) {
384
+ var B = v(b, f), L = B[0], j = B[1];
385
+ o.replaceState(L, "", j), A(g);
386
386
  }
387
387
  }
388
- function x(v) {
389
- o.go(v);
388
+ function x(y) {
389
+ o.go(y);
390
390
  }
391
391
  var U = {
392
392
  get action() {
@@ -417,12 +417,12 @@ function ot(e) {
417
417
  };
418
418
  return U;
419
419
  }
420
- function Dn(e) {
420
+ function In(e) {
421
421
  e === void 0 && (e = {});
422
422
  var t = e, n = t.window, r = n === void 0 ? document.defaultView : n, o = r.history;
423
423
  function a() {
424
- var h = fe(r.location.hash.substr(1)), g = h.pathname, b = g === void 0 ? "/" : g, S = h.search, B = S === void 0 ? "" : S, C = h.hash, j = C === void 0 ? "" : C, q = o.state || {};
425
- return [q.idx, ee({
424
+ var h = he(r.location.hash.substr(1)), g = h.pathname, b = g === void 0 ? "/" : g, k = h.search, B = k === void 0 ? "" : k, L = h.hash, j = L === void 0 ? "" : L, q = o.state || {};
425
+ return [q.idx, te({
426
426
  pathname: b,
427
427
  search: B,
428
428
  hash: j,
@@ -435,13 +435,13 @@ function Dn(e) {
435
435
  if (s)
436
436
  p.call(s), s = null;
437
437
  else {
438
- var h = H.Pop, g = a(), b = g[0], S = g[1];
438
+ var h = H.Pop, g = a(), b = g[0], k = g[1];
439
439
  if (p.length)
440
440
  if (b != null) {
441
441
  var B = f - b;
442
442
  B && (s = {
443
443
  action: h,
444
- location: S,
444
+ location: k,
445
445
  retry: function() {
446
446
  U(B * -1);
447
447
  }
@@ -458,41 +458,41 @@ function Dn(e) {
458
458
  d(h);
459
459
  }
460
460
  }
461
- r.addEventListener(At, c), r.addEventListener(Tn, function() {
461
+ r.addEventListener(At, c), r.addEventListener(Dn, function() {
462
462
  var h = a(), g = h[1];
463
463
  z(g) !== z(l) && c();
464
464
  });
465
- var u = H.Pop, i = a(), f = i[0], l = i[1], m = te(), p = te();
465
+ var u = H.Pop, i = a(), f = i[0], l = i[1], m = ne(), p = ne();
466
466
  f == null && (f = 0, o.replaceState(Q({}, o.state, {
467
467
  idx: f
468
468
  }), ""));
469
469
  function P() {
470
470
  var h = document.querySelector("base"), g = "";
471
471
  if (h && h.getAttribute("href")) {
472
- var b = r.location.href, S = b.indexOf("#");
473
- g = S === -1 ? b : b.slice(0, S);
472
+ var b = r.location.href, k = b.indexOf("#");
473
+ g = k === -1 ? b : b.slice(0, k);
474
474
  }
475
475
  return g;
476
476
  }
477
- function y(h) {
477
+ function R(h) {
478
478
  return P() + "#" + (typeof h == "string" ? h : z(h));
479
479
  }
480
- function R(h, g) {
481
- return g === void 0 && (g = null), ee(Q({
480
+ function v(h, g) {
481
+ return g === void 0 && (g = null), te(Q({
482
482
  pathname: l.pathname,
483
483
  hash: "",
484
484
  search: ""
485
- }, typeof h == "string" ? fe(h) : h, {
485
+ }, typeof h == "string" ? he(h) : h, {
486
486
  state: g,
487
487
  key: Ee()
488
488
  }));
489
489
  }
490
- function k(h, g) {
490
+ function S(h, g) {
491
491
  return [{
492
492
  usr: h.state,
493
493
  key: h.key,
494
494
  idx: g
495
- }, y(h)];
495
+ }, R(h)];
496
496
  }
497
497
  function A(h, g, b) {
498
498
  return !p.length || (p.call({
@@ -510,12 +510,12 @@ function Dn(e) {
510
510
  });
511
511
  }
512
512
  function E(h, g) {
513
- var b = H.Push, S = R(h, g);
513
+ var b = H.Push, k = v(h, g);
514
514
  function B() {
515
515
  E(h, g);
516
516
  }
517
- if (process.env.NODE_ENV !== "production" && K(S.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(h) + ")"), A(b, S, B)) {
518
- var C = k(S, f + 1), j = C[0], q = C[1];
517
+ if (process.env.NODE_ENV !== "production" && K(k.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(h) + ")"), A(b, k, B)) {
518
+ var L = S(k, f + 1), j = L[0], q = L[1];
519
519
  try {
520
520
  o.pushState(j, "", q);
521
521
  } catch {
@@ -525,26 +525,26 @@ function Dn(e) {
525
525
  }
526
526
  }
527
527
  function x(h, g) {
528
- var b = H.Replace, S = R(h, g);
528
+ var b = H.Replace, k = v(h, g);
529
529
  function B() {
530
530
  x(h, g);
531
531
  }
532
- if (process.env.NODE_ENV !== "production" && K(S.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(h) + ")"), A(b, S, B)) {
533
- var C = k(S, f), j = C[0], q = C[1];
532
+ if (process.env.NODE_ENV !== "production" && K(k.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(h) + ")"), A(b, k, B)) {
533
+ var L = S(k, f), j = L[0], q = L[1];
534
534
  o.replaceState(j, "", q), d(b);
535
535
  }
536
536
  }
537
537
  function U(h) {
538
538
  o.go(h);
539
539
  }
540
- var v = {
540
+ var y = {
541
541
  get action() {
542
542
  return u;
543
543
  },
544
544
  get location() {
545
545
  return l;
546
546
  },
547
- createHref: y,
547
+ createHref: R,
548
548
  push: E,
549
549
  replace: x,
550
550
  go: U,
@@ -564,29 +564,29 @@ function Dn(e) {
564
564
  };
565
565
  }
566
566
  };
567
- return v;
567
+ return y;
568
568
  }
569
569
  function at(e) {
570
570
  e === void 0 && (e = {});
571
571
  var t = e, n = t.initialEntries, r = n === void 0 ? ["/"] : n, o = t.initialIndex, a = r.map(function(d) {
572
- var E = ee(Q({
572
+ var E = te(Q({
573
573
  pathname: "/",
574
574
  search: "",
575
575
  hash: "",
576
576
  state: null,
577
577
  key: Ee()
578
- }, typeof d == "string" ? fe(d) : d));
578
+ }, typeof d == "string" ? he(d) : d));
579
579
  return process.env.NODE_ENV !== "production" && K(E.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(d) + ")"), E;
580
- }), s = st(o ?? a.length - 1, 0, a.length - 1), c = H.Pop, u = a[s], i = te(), f = te();
580
+ }), s = st(o ?? a.length - 1, 0, a.length - 1), c = H.Pop, u = a[s], i = ne(), f = ne();
581
581
  function l(d) {
582
582
  return typeof d == "string" ? d : z(d);
583
583
  }
584
584
  function m(d, E) {
585
- return E === void 0 && (E = null), ee(Q({
585
+ return E === void 0 && (E = null), te(Q({
586
586
  pathname: u.pathname,
587
587
  search: "",
588
588
  hash: ""
589
- }, typeof d == "string" ? fe(d) : d, {
589
+ }, typeof d == "string" ? he(d) : d, {
590
590
  state: E,
591
591
  key: Ee()
592
592
  }));
@@ -604,26 +604,26 @@ function at(e) {
604
604
  location: u
605
605
  });
606
606
  }
607
- function y(d, E) {
607
+ function R(d, E) {
608
608
  var x = H.Push, U = m(d, E);
609
- function v() {
610
- y(d, E);
609
+ function y() {
610
+ R(d, E);
611
611
  }
612
- process.env.NODE_ENV !== "production" && K(u.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(d) + ")"), p(x, U, v) && (s += 1, a.splice(s, a.length, U), P(x, U));
612
+ process.env.NODE_ENV !== "production" && K(u.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(d) + ")"), p(x, U, y) && (s += 1, a.splice(s, a.length, U), P(x, U));
613
613
  }
614
- function R(d, E) {
614
+ function v(d, E) {
615
615
  var x = H.Replace, U = m(d, E);
616
- function v() {
617
- R(d, E);
616
+ function y() {
617
+ v(d, E);
618
618
  }
619
- process.env.NODE_ENV !== "production" && K(u.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(d) + ")"), p(x, U, v) && (a[s] = U, P(x, U));
619
+ process.env.NODE_ENV !== "production" && K(u.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(d) + ")"), p(x, U, y) && (a[s] = U, P(x, U));
620
620
  }
621
- function k(d) {
621
+ function S(d) {
622
622
  var E = st(s + d, 0, a.length - 1), x = H.Pop, U = a[E];
623
- function v() {
624
- k(d);
623
+ function y() {
624
+ S(d);
625
625
  }
626
- p(x, U, v) && (s = E, P(x, U));
626
+ p(x, U, y) && (s = E, P(x, U));
627
627
  }
628
628
  var A = {
629
629
  get index() {
@@ -636,14 +636,14 @@ function at(e) {
636
636
  return u;
637
637
  },
638
638
  createHref: l,
639
- push: y,
640
- replace: R,
641
- go: k,
639
+ push: R,
640
+ replace: v,
641
+ go: S,
642
642
  back: function() {
643
- k(-1);
643
+ S(-1);
644
644
  },
645
645
  forward: function() {
646
- k(1);
646
+ S(1);
647
647
  },
648
648
  listen: function(E) {
649
649
  return i.push(E);
@@ -660,7 +660,7 @@ function st(e, t, n) {
660
660
  function Pe(e) {
661
661
  e.preventDefault(), e.returnValue = "";
662
662
  }
663
- function te() {
663
+ function ne() {
664
664
  var e = [];
665
665
  return {
666
666
  get length() {
@@ -687,7 +687,7 @@ function z(e) {
687
687
  var t = e.pathname, n = t === void 0 ? "/" : t, r = e.search, o = r === void 0 ? "" : r, a = e.hash, s = a === void 0 ? "" : a;
688
688
  return o && o !== "?" && (n += o.charAt(0) === "?" ? o : "?" + o), s && s !== "#" && (n += s.charAt(0) === "#" ? s : "#" + s), n;
689
689
  }
690
- function fe(e) {
690
+ function he(e) {
691
691
  var t = {};
692
692
  if (e) {
693
693
  var n = e.indexOf("#");
@@ -697,7 +697,7 @@ function fe(e) {
697
697
  }
698
698
  return t;
699
699
  }
700
- class Wn extends Error {
700
+ class Fn extends Error {
701
701
  /**
702
702
  * Constructs a new UseRouteInvalidError instance with a message that specifies both the given and expected route names.
703
703
  * This detailed error message aids in quickly identifying and resolving mismatches in route usage.
@@ -709,63 +709,63 @@ class Wn extends Error {
709
709
  }
710
710
  }
711
711
  const xt = Symbol();
712
- function In() {
713
- const e = re(xt);
712
+ function Jn() {
713
+ const e = oe(xt);
714
714
  if (!e)
715
- throw new he();
715
+ throw new pe();
716
716
  return e;
717
717
  }
718
718
  const Ut = Symbol();
719
- function De() {
720
- const e = re(Ut);
719
+ function We() {
720
+ const e = oe(Ut);
721
721
  if (!e)
722
- throw new he();
722
+ throw new pe();
723
723
  return e;
724
724
  }
725
725
  const Bt = Symbol("isRouterRouteSymbol");
726
- function Fn(e) {
726
+ function Qn(e) {
727
727
  return typeof e == "object" && e !== null && Bt in e;
728
728
  }
729
- function Jn(e, t) {
730
- function n(y, R, k) {
731
- if (typeof y == "object") {
729
+ function Gn(e, t) {
730
+ function n(R, v, S) {
731
+ if (typeof R == "object") {
732
732
  const d = {
733
733
  ...e.params,
734
- ...y
734
+ ...R
735
735
  };
736
- return t(e.name, d, R);
736
+ return t(e.name, d, v);
737
737
  }
738
738
  const A = {
739
739
  ...e.params,
740
- [y]: R
740
+ [R]: v
741
741
  };
742
- return t(e.name, A, k);
743
- }
744
- const r = (...y) => {
745
- const R = new URLSearchParams(e.query.toString());
746
- R.set(...y), n({}, { query: R });
747
- }, o = (...y) => {
748
- const R = new URLSearchParams(e.query.toString());
749
- R.append(...y), n({}, { query: R });
750
- }, a = (...y) => {
751
- const R = new URLSearchParams(e.query.toString());
752
- R.delete(...y), n({}, { query: R });
753
- }, { id: s, matched: c, matches: u, name: i, hash: f } = un(e), l = N({
742
+ return t(e.name, A, S);
743
+ }
744
+ const r = (...R) => {
745
+ const v = new URLSearchParams(e.query.toString());
746
+ v.set(...R), n({}, { query: v });
747
+ }, o = (...R) => {
748
+ const v = new URLSearchParams(e.query.toString());
749
+ v.append(...R), n({}, { query: v });
750
+ }, a = (...R) => {
751
+ const v = new URLSearchParams(e.query.toString());
752
+ v.delete(...R), n({}, { query: v });
753
+ }, { id: s, matched: c, matches: u, name: i, hash: f } = fn(e), l = N({
754
754
  get() {
755
755
  return new Proxy(e.params, {
756
- set(y, R, k) {
757
- return n(R, k), !0;
756
+ set(R, v, S) {
757
+ return n(v, S), !0;
758
758
  }
759
759
  });
760
760
  },
761
- set(y) {
762
- n(y);
761
+ set(R) {
762
+ n(R);
763
763
  }
764
764
  }), m = N({
765
765
  get() {
766
766
  return new Proxy(e.query, {
767
- get(y, R, k) {
768
- switch (R) {
767
+ get(R, v, S) {
768
+ switch (v) {
769
769
  case "append":
770
770
  return o;
771
771
  case "set":
@@ -773,24 +773,24 @@ function Jn(e, t) {
773
773
  case "delete":
774
774
  return a;
775
775
  default:
776
- return Reflect.get(y, R, k);
776
+ return Reflect.get(R, v, S);
777
777
  }
778
778
  }
779
779
  });
780
780
  },
781
- set(y) {
782
- n({}, { query: y });
781
+ set(R) {
782
+ n({}, { query: R });
783
783
  }
784
784
  }), p = N({
785
785
  get() {
786
786
  return new Proxy(e.state, {
787
- set(y, R, k) {
788
- return n({}, { state: { ...e.state, [R]: k } }), !0;
787
+ set(R, v, S) {
788
+ return n({}, { state: { ...e.state, [v]: S } }), !0;
789
789
  }
790
790
  });
791
791
  },
792
- set(y) {
793
- n({}, { state: y });
792
+ set(R) {
793
+ n({}, { state: R });
794
794
  }
795
795
  });
796
796
  return Ue({
@@ -806,14 +806,14 @@ function Jn(e, t) {
806
806
  [Bt]: !0
807
807
  });
808
808
  }
809
- const Lt = Symbol();
810
- function Qn(e, t) {
809
+ const Ct = Symbol();
810
+ function Kn(e, t) {
811
811
  const n = Ue({ ...e }), r = (s) => {
812
812
  Object.assign(n, {
813
- [Lt]: !1,
813
+ [Ct]: !1,
814
814
  ...s
815
815
  });
816
- }, o = n, a = Jn(o, t);
816
+ }, o = n, a = Gn(o, t);
817
817
  return {
818
818
  currentRoute: o,
819
819
  routerRoute: a,
@@ -821,9 +821,9 @@ function Qn(e, t) {
821
821
  };
822
822
  }
823
823
  function T(e) {
824
- return !e.startsWith("http") ? Kn(e) : Gn(e);
824
+ return !e.startsWith("http") ? Yn(e) : zn(e);
825
825
  }
826
- function Gn(e) {
826
+ function zn(e) {
827
827
  const { protocol: t, host: n, pathname: r, search: o, searchParams: a, hash: s } = new URL(e, e);
828
828
  return {
829
829
  protocol: t,
@@ -834,7 +834,7 @@ function Gn(e) {
834
834
  hash: s
835
835
  };
836
836
  }
837
- function Kn(e) {
837
+ function Yn(e) {
838
838
  const { pathname: t, search: n, searchParams: r, hash: o } = new URL(e, "https://localhost");
839
839
  return {
840
840
  pathname: t,
@@ -843,14 +843,14 @@ function Kn(e) {
843
843
  hash: o
844
844
  };
845
845
  }
846
- function zn(e) {
846
+ function Xn(e) {
847
847
  return (t) => {
848
848
  const { host: n } = T(t);
849
849
  return !(n === void 0 || n === e);
850
850
  };
851
851
  }
852
- function Yn({ mode: e, listener: t }) {
853
- const n = Xn(e), r = (u, i) => {
852
+ function Zn({ mode: e, listener: t }) {
853
+ const n = er(e), r = (u, i) => {
854
854
  if (i != null && i.replace) {
855
855
  n.replace(u, i.state);
856
856
  return;
@@ -873,7 +873,7 @@ function Yn({ mode: e, listener: t }) {
873
873
  }
874
874
  };
875
875
  }
876
- function Xn(e = "auto") {
876
+ function er(e = "auto") {
877
877
  switch (e) {
878
878
  case "auto":
879
879
  return Te() ? ot() : at();
@@ -882,7 +882,7 @@ function Xn(e = "auto") {
882
882
  case "memory":
883
883
  return at();
884
884
  case "hash":
885
- return Dn();
885
+ return In();
886
886
  default:
887
887
  const t = e;
888
888
  throw new Error(`Switch is not exhaustive for mode: ${t}`);
@@ -898,14 +898,14 @@ class be {
898
898
  _(this, "onAfterRouteLeave", /* @__PURE__ */ new Set());
899
899
  }
900
900
  }
901
- class Ct extends Error {
901
+ class Lt extends Error {
902
902
  constructor() {
903
903
  super("Uncaught CallbackContextAbortError");
904
904
  _(this, "response");
905
905
  this.response = { status: "ABORT" };
906
906
  }
907
907
  }
908
- class X extends Error {
908
+ class Z extends Error {
909
909
  constructor(n) {
910
910
  super("Uncaught CallbackContextPushError");
911
911
  _(this, "response");
@@ -919,48 +919,48 @@ class Se extends Error {
919
919
  this.response = { status: "REJECT", type: n };
920
920
  }
921
921
  }
922
- function Zn(e, t) {
922
+ function tr(e, t) {
923
923
  const n = new be();
924
924
  return e.matches.forEach((r, o) => {
925
- r.onBeforeRouteEnter && We(e, t, o) && Y(r.onBeforeRouteEnter).forEach((a) => n.onBeforeRouteEnter.add(a)), r.onBeforeRouteUpdate && Fe(e, t, o) && Y(r.onBeforeRouteUpdate).forEach((a) => n.onBeforeRouteUpdate.add(a));
925
+ r.onBeforeRouteEnter && De(e, t, o) && X(r.onBeforeRouteEnter).forEach((a) => n.onBeforeRouteEnter.add(a)), r.onBeforeRouteUpdate && Fe(e, t, o) && X(r.onBeforeRouteUpdate).forEach((a) => n.onBeforeRouteUpdate.add(a));
926
926
  }), t.matches.forEach((r, o) => {
927
- r.onBeforeRouteLeave && Ie(e, t, o) && Y(r.onBeforeRouteLeave).forEach((a) => n.onBeforeRouteLeave.add(a));
927
+ r.onBeforeRouteLeave && Ie(e, t, o) && X(r.onBeforeRouteLeave).forEach((a) => n.onBeforeRouteLeave.add(a));
928
928
  }), n;
929
929
  }
930
- function er(e, t) {
930
+ function nr(e, t) {
931
931
  const n = new be();
932
932
  return e.matches.forEach((r, o) => {
933
- r.onAfterRouteEnter && We(e, t, o) && Y(r.onAfterRouteEnter).forEach((a) => n.onAfterRouteEnter.add(a)), r.onAfterRouteUpdate && Fe(e, t, o) && Y(r.onAfterRouteUpdate).forEach((a) => n.onAfterRouteUpdate.add(a));
933
+ r.onAfterRouteEnter && De(e, t, o) && X(r.onAfterRouteEnter).forEach((a) => n.onAfterRouteEnter.add(a)), r.onAfterRouteUpdate && Fe(e, t, o) && X(r.onAfterRouteUpdate).forEach((a) => n.onAfterRouteUpdate.add(a));
934
934
  }), t.matches.forEach((r, o) => {
935
- r.onAfterRouteLeave && Ie(e, t, o) && Y(r.onAfterRouteLeave).forEach((a) => n.onAfterRouteLeave.add(a));
935
+ r.onAfterRouteLeave && Ie(e, t, o) && X(r.onAfterRouteLeave).forEach((a) => n.onAfterRouteLeave.add(a));
936
936
  }), n;
937
937
  }
938
938
  function M(e) {
939
939
  return typeof e != "string" ? !1 : /^(https?:\/\/|\/).*/g.test(e);
940
940
  }
941
- function tr(e) {
941
+ function rr(e) {
942
942
  return M(e) ? e : `/${e}`;
943
943
  }
944
944
  function Nt() {
945
945
  return { reject: (o) => {
946
946
  throw new Se(o);
947
947
  }, push: (...o) => {
948
- throw new X(o);
948
+ throw new Z(o);
949
949
  }, replace: (o, a, s) => {
950
950
  if (M(o)) {
951
951
  const i = a ?? {};
952
- throw new X([o, { ...i, replace: !0 }]);
952
+ throw new Z([o, { ...i, replace: !0 }]);
953
953
  }
954
954
  const c = a, u = s ?? {};
955
- throw new X([o, c, { ...u, replace: !0 }]);
955
+ throw new Z([o, c, { ...u, replace: !0 }]);
956
956
  }, abort: () => {
957
- throw new Ct();
957
+ throw new Lt();
958
958
  } };
959
959
  }
960
- function nr() {
960
+ function or() {
961
961
  const { reject: e, push: t, replace: n, abort: r } = Nt();
962
962
  async function o({ to: s, from: c, hooks: u }) {
963
- const { global: i, component: f } = u, l = Zn(s, c), m = [
963
+ const { global: i, component: f } = u, l = tr(s, c), m = [
964
964
  ...i.onBeforeRouteEnter,
965
965
  ...l.onBeforeRouteEnter,
966
966
  ...i.onBeforeRouteUpdate,
@@ -980,7 +980,7 @@ function nr() {
980
980
  }));
981
981
  await Promise.all(p);
982
982
  } catch (p) {
983
- if (p instanceof X || p instanceof Se || p instanceof Ct)
983
+ if (p instanceof Z || p instanceof Se || p instanceof Lt)
984
984
  return p.response;
985
985
  throw p;
986
986
  }
@@ -989,7 +989,7 @@ function nr() {
989
989
  };
990
990
  }
991
991
  async function a({ to: s, from: c, hooks: u }) {
992
- const { global: i, component: f } = u, l = er(s, c), m = [
992
+ const { global: i, component: f } = u, l = nr(s, c), m = [
993
993
  ...f.onAfterRouteLeave,
994
994
  ...l.onAfterRouteLeave,
995
995
  ...i.onAfterRouteLeave,
@@ -1009,7 +1009,7 @@ function nr() {
1009
1009
  }));
1010
1010
  await Promise.all(p);
1011
1011
  } catch (p) {
1012
- if (p instanceof X || p instanceof Se)
1012
+ if (p instanceof Z || p instanceof Se)
1013
1013
  return p.response;
1014
1014
  throw p;
1015
1015
  }
@@ -1022,7 +1022,7 @@ function nr() {
1022
1022
  runAfterRouteHooks: a
1023
1023
  };
1024
1024
  }
1025
- const We = (e, t, n) => {
1025
+ const De = (e, t, n) => {
1026
1026
  var a;
1027
1027
  const r = e.matches, o = (t == null ? void 0 : t.matches) ?? [];
1028
1028
  return r.length < n || r[n].id !== ((a = o[n]) == null ? void 0 : a.id);
@@ -1038,7 +1038,7 @@ function ct(e) {
1038
1038
  switch (e) {
1039
1039
  case "onBeforeRouteEnter":
1040
1040
  case "onAfterRouteEnter":
1041
- return We;
1041
+ return De;
1042
1042
  case "onBeforeRouteUpdate":
1043
1043
  case "onAfterRouteUpdate":
1044
1044
  return Fe;
@@ -1049,7 +1049,7 @@ function ct(e) {
1049
1049
  throw new Error(`Switch is not exhaustive for lifecycle: ${e}`);
1050
1050
  }
1051
1051
  }
1052
- function rr() {
1052
+ function ar() {
1053
1053
  const e = {
1054
1054
  global: new be(),
1055
1055
  component: new be()
@@ -1071,8 +1071,8 @@ function rr() {
1071
1071
  return { ...e, addBeforeRouteHook: t, addAfterRouteHook: n };
1072
1072
  }
1073
1073
  const Ht = Symbol();
1074
- function or() {
1075
- const e = rr();
1074
+ function sr() {
1075
+ const e = ar();
1076
1076
  return {
1077
1077
  onBeforeRouteEnter: (c) => e.addBeforeRouteHook({ lifecycle: "onBeforeRouteEnter", hook: c, timing: "global", depth: 0 }),
1078
1078
  onBeforeRouteUpdate: (c) => e.addBeforeRouteHook({ lifecycle: "onBeforeRouteUpdate", hook: c, timing: "global", depth: 0 }),
@@ -1083,8 +1083,8 @@ function or() {
1083
1083
  hooks: e
1084
1084
  };
1085
1085
  }
1086
- function ar(e) {
1087
- return le(() => () => ve("h1", e), {
1086
+ function cr(e) {
1087
+ return ae(() => () => Y("h1", e), {
1088
1088
  name: e,
1089
1089
  props: []
1090
1090
  });
@@ -1118,16 +1118,16 @@ function Vt() {
1118
1118
  return () => (++e).toString();
1119
1119
  }
1120
1120
  const Je = Vt();
1121
- function sr({
1121
+ function ur({
1122
1122
  rejections: e
1123
1123
  }) {
1124
1124
  const t = (a) => {
1125
1125
  const s = {
1126
1126
  ...e
1127
1127
  };
1128
- return ye(s[a] ?? ar(a));
1128
+ return ve(s[a] ?? cr(a));
1129
1129
  }, n = (a) => {
1130
- const s = ye(t(a)), c = {
1130
+ const s = ve(t(a)), c = {
1131
1131
  id: Je(),
1132
1132
  component: s,
1133
1133
  meta: {},
@@ -1141,7 +1141,7 @@ function sr({
1141
1141
  query: jt(""),
1142
1142
  params: {},
1143
1143
  state: {},
1144
- [Lt]: !0
1144
+ [Ct]: !0
1145
1145
  };
1146
1146
  }, r = (a) => {
1147
1147
  if (!a) {
@@ -1157,7 +1157,7 @@ function sr({
1157
1157
  getRejectionRoute: n
1158
1158
  };
1159
1159
  }
1160
- class cr extends Error {
1160
+ class ir extends Error {
1161
1161
  constructor(t) {
1162
1162
  super(`Route not found: "${t}"`);
1163
1163
  }
@@ -1165,7 +1165,7 @@ class cr extends Error {
1165
1165
  function Qe(e) {
1166
1166
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1167
1167
  }
1168
- function ur(e, t) {
1168
+ function fr(e, t) {
1169
1169
  const n = Array.from(e.matchAll(t));
1170
1170
  if (n.length === 0)
1171
1171
  return [e];
@@ -1178,11 +1178,11 @@ function ur(e, t) {
1178
1178
  }, []), a = e.slice(r);
1179
1179
  return a && o.push(a), o;
1180
1180
  }
1181
- function ir(e) {
1181
+ function lr(e) {
1182
1182
  const t = $t(e.path.value);
1183
1183
  return new RegExp(`^${t}$`, "i");
1184
1184
  }
1185
- function fr(e) {
1185
+ function hr(e) {
1186
1186
  const t = new URLSearchParams(e.query.value);
1187
1187
  return Array.from(t.entries()).filter(([, n]) => !Ve(n)).map(([n, r]) => {
1188
1188
  const o = $t(r);
@@ -1190,30 +1190,30 @@ function fr(e) {
1190
1190
  });
1191
1191
  }
1192
1192
  function $t(e) {
1193
- return ur(e, new RegExp(lr, "g")).map((t) => t.startsWith(W) ? Ot(t) : Qe(t)).join("");
1193
+ return fr(e, new RegExp(pr, "g")).map((t) => t.startsWith(D) ? Ot(t) : Qe(t)).join("");
1194
1194
  }
1195
1195
  function Ot(e) {
1196
1196
  return [
1197
- hr,
1198
- pr
1197
+ dr,
1198
+ mr
1199
1199
  ].reduce((t, n) => n(t), e);
1200
1200
  }
1201
- const lr = `\\${W}\\??([\\w-_]+)\\${G}`, Ge = `\\${W}\\?([\\w-_]+)\\${G}`, qt = `\\${W}([\\w-_]+)\\${G}`;
1202
- function hr(e) {
1201
+ const pr = `\\${D}\\??([\\w-_]+)\\${G}`, Ge = `\\${D}\\?([\\w-_]+)\\${G}`, qt = `\\${D}([\\w-_]+)\\${G}`;
1202
+ function dr(e) {
1203
1203
  return e.replace(new RegExp(Ge, "g"), ".*");
1204
1204
  }
1205
1205
  function Ve(e) {
1206
1206
  return new RegExp(Ge, "g").test(e);
1207
1207
  }
1208
- function pr(e) {
1208
+ function mr(e) {
1209
1209
  return e.replace(new RegExp(qt, "g"), ".+");
1210
1210
  }
1211
- function Le(e) {
1211
+ function Ce(e) {
1212
1212
  const [t] = ke(e, new RegExp(Ge, "g")), [n] = ke(e, new RegExp(qt, "g"));
1213
1213
  return t ?? n;
1214
1214
  }
1215
1215
  function ke(e, t) {
1216
- return Array.from(e.matchAll(t)).flatMap(([, ...r]) => r.map((o) => de(o) ? o : ""));
1216
+ return Array.from(e.matchAll(t)).flatMap(([, ...r]) => r.map((o) => me(o) ? o : ""));
1217
1217
  }
1218
1218
  function _t(e, t, n) {
1219
1219
  const r = Tt(t, n), [o] = ke(e, r);
@@ -1223,141 +1223,141 @@ function Mt(e, t) {
1223
1223
  if (!t)
1224
1224
  return e;
1225
1225
  const { name: n, param: r, value: o } = t, a = Tt(e, n);
1226
- return ke(e, a).reduce((c, u) => u === void 0 ? c : c.replace(u, () => ie(o, r, n.startsWith("?"))), e);
1226
+ return ke(e, a).reduce((c, u) => u === void 0 ? c : c.replace(u, () => le(o, r, n.startsWith("?"))), e);
1227
1227
  }
1228
1228
  function Tt(e, t) {
1229
1229
  const n = [
1230
- dr,
1231
- mr,
1230
+ gr,
1231
+ yr,
1232
1232
  Ot
1233
1233
  ].reduce((r, o) => o(r, t), e);
1234
1234
  return new RegExp(n, "g");
1235
1235
  }
1236
- function dr(e, t) {
1236
+ function gr(e, t) {
1237
1237
  if (!t.startsWith("?"))
1238
1238
  return e;
1239
- const n = new RegExp(`\\${W}\\${t}\\${G}`, "g");
1239
+ const n = new RegExp(`\\${D}\\${t}\\${G}`, "g");
1240
1240
  return e.replace(n, "(.*)");
1241
1241
  }
1242
- function mr(e, t) {
1242
+ function yr(e, t) {
1243
1243
  if (t.startsWith("?"))
1244
1244
  return e;
1245
- const n = new RegExp(`\\${W}${t}\\${G}`, "g");
1245
+ const n = new RegExp(`\\${D}${t}\\${G}`, "g");
1246
1246
  return e.replace(n, "(.+)");
1247
1247
  }
1248
- function Dt({ protocol: e, host: t, pathname: n, search: r, searchParams: o, hash: a }) {
1248
+ function Wt({ protocol: e, host: t, pathname: n, search: r, searchParams: o, hash: a }) {
1249
1249
  const s = new URL("https://localhost");
1250
1250
  e && (s.protocol = e), t && (s.host = t), n && (s.pathname = n), o ? s.search = o.toString() : r && (s.search = r), a && (s.hash = a);
1251
1251
  const c = s.toString().replace(/^https:\/\/localhost\/*/, "/");
1252
- return tr(c);
1252
+ return rr(c);
1253
1253
  }
1254
- function gr(e, t) {
1254
+ function vr(e, t) {
1255
1255
  const n = new URLSearchParams(e), r = new URLSearchParams(t);
1256
1256
  for (const [o, a] of r.entries())
1257
1257
  n.append(o, a);
1258
1258
  return n;
1259
1259
  }
1260
- function vr(e, t = {}) {
1261
- const { params: n = {}, query: r } = t, o = wr(e.query, n), a = gr(o, r), s = Rr(e.path, n), c = Re(e.hash.value ?? t.hash).value, u = yr(e.host, n), { protocol: i, host: f } = T(u);
1262
- return Dt({ protocol: i, host: f, pathname: s, searchParams: a, hash: c });
1260
+ function Rr(e, t = {}) {
1261
+ const { params: n = {}, query: r } = t, o = Er(e.query, n), a = vr(o, r), s = Pr(e.path, n), c = Re(e.hash.value ?? t.hash).value, u = wr(e.host, n), { protocol: i, host: f } = T(u);
1262
+ return Wt({ protocol: i, host: f, pathname: s, searchParams: a, hash: c });
1263
1263
  }
1264
- function yr(e, t) {
1264
+ function wr(e, t) {
1265
1265
  const n = e.value && !e.value.startsWith("http") ? `https://${e.value}` : e.value;
1266
1266
  return Object.entries(e.params).reduce((r, [o, a]) => {
1267
- const s = Le(`${W}${o}${G}`);
1267
+ const s = Ce(`${D}${o}${G}`);
1268
1268
  return s ? Mt(r, { name: o, param: a, value: t[s] }) : r;
1269
1269
  }, n);
1270
1270
  }
1271
- function Rr(e, t) {
1271
+ function Pr(e, t) {
1272
1272
  return Object.entries(e.params).reduce((n, [r, o]) => {
1273
- const a = Le(`${W}${r}${G}`);
1273
+ const a = Ce(`${D}${r}${G}`);
1274
1274
  return a ? Mt(n, { name: r, param: o, value: t[a] }) : n;
1275
1275
  }, e.value);
1276
1276
  }
1277
- function wr(e, t) {
1277
+ function Er(e, t) {
1278
1278
  const n = new URLSearchParams(e.value);
1279
1279
  if (!e.value)
1280
1280
  return n;
1281
1281
  for (const [r, o] of Array.from(n.entries())) {
1282
- const a = Le(o);
1282
+ const a = Ce(o);
1283
1283
  if (!a)
1284
1284
  continue;
1285
- const c = ie(t[a], e.params[a], Ve(o)), u = t[a] === void 0 && c === "";
1285
+ const c = le(t[a], e.params[a], Ve(o)), u = t[a] === void 0 && c === "";
1286
1286
  Ve(o) && u ? n.delete(r, o) : n.set(r, c);
1287
1287
  }
1288
1288
  return n;
1289
1289
  }
1290
- function Pr(e) {
1290
+ function br(e) {
1291
1291
  return (t, n, r) => {
1292
1292
  if (M(t)) {
1293
1293
  const u = n ?? {}, { searchParams: i, ...f } = T(t);
1294
1294
  return Object.entries(u.query ?? {}).forEach(([l, m]) => {
1295
1295
  i.append(l, m);
1296
- }), Dt({ ...f, searchParams: i });
1296
+ }), Wt({ ...f, searchParams: i });
1297
1297
  }
1298
1298
  const o = n ?? {}, a = r ?? {}, s = e.find((u) => u.name === t);
1299
1299
  if (!s)
1300
- throw new cr(String(t));
1301
- return vr(s, {
1300
+ throw new ir(String(t));
1301
+ return Rr(s, {
1302
1302
  params: o,
1303
1303
  query: a.query,
1304
1304
  hash: a.hash
1305
1305
  });
1306
1306
  };
1307
1307
  }
1308
- class Er extends Error {
1308
+ class Sr extends Error {
1309
1309
  constructor() {
1310
1310
  super("initialUrl must be set if window.location is unavailable");
1311
1311
  }
1312
1312
  }
1313
- function br(e) {
1313
+ function kr(e) {
1314
1314
  if (e)
1315
1315
  return e;
1316
1316
  if (Te())
1317
1317
  return window.location.toString();
1318
- throw new Er();
1318
+ throw new Sr();
1319
1319
  }
1320
- const Sr = (e, t) => {
1320
+ const Ar = (e, t) => {
1321
1321
  try {
1322
- Wt(e, t);
1322
+ Dt(e, t);
1323
1323
  } catch {
1324
1324
  return !1;
1325
1325
  }
1326
1326
  return !0;
1327
- }, Wt = (e, t) => {
1327
+ }, Dt = (e, t) => {
1328
1328
  const { pathname: n, search: r } = T(t);
1329
1329
  return {
1330
- ...kr(e.path, n),
1331
- ...Ar(e.query, r)
1330
+ ...xr(e.path, n),
1331
+ ...Ur(e.query, r)
1332
1332
  };
1333
1333
  };
1334
- function kr(e, t) {
1334
+ function xr(e, t) {
1335
1335
  const n = {}, r = decodeURIComponent(t);
1336
1336
  for (const [o, a] of Object.entries(e.params)) {
1337
- const s = o.startsWith("?"), c = s ? o.slice(1) : o, u = _t(r, e.value, o), i = ue(u, a, s);
1337
+ const s = o.startsWith("?"), c = s ? o.slice(1) : o, u = _t(r, e.value, o), i = fe(u, a, s);
1338
1338
  n[c] = i;
1339
1339
  }
1340
1340
  return n;
1341
1341
  }
1342
- function Ar(e, t) {
1342
+ function Ur(e, t) {
1343
1343
  const n = {}, r = new URLSearchParams(t);
1344
1344
  for (const [o, a] of Object.entries(e.params)) {
1345
- const s = o.startsWith("?"), c = s ? o.slice(1) : o, u = r.get(c) ?? void 0, i = ue(u, a, s);
1345
+ const s = o.startsWith("?"), c = s ? o.slice(1) : o, u = r.get(c) ?? void 0, i = fe(u, a, s);
1346
1346
  n[c] = i;
1347
1347
  }
1348
1348
  return n;
1349
1349
  }
1350
- const xr = (e) => "name" in e.matched && !!e.matched.name, Ur = (e, t) => {
1350
+ const Br = (e) => "name" in e.matched && !!e.matched.name, Cr = (e, t) => {
1351
1351
  const { pathname: n } = T(t);
1352
- return ir(e).test(n);
1353
- }, Br = (e, t) => {
1352
+ return lr(e).test(n);
1353
+ }, Lr = (e, t) => {
1354
1354
  const { search: n } = T(t);
1355
- return fr(e).every((o) => o.test(n));
1355
+ return hr(e).every((o) => o.test(n));
1356
1356
  }, $e = (e, t) => {
1357
1357
  const { hash: n } = T(t), { value: r } = e.hash;
1358
1358
  return r === void 0 || `#${r.toLowerCase()}` === n.toLowerCase();
1359
1359
  };
1360
- function Lr(e) {
1360
+ function Nr(e) {
1361
1361
  const { searchParams: t, pathname: n } = T(e), r = -1, o = 1;
1362
1362
  return (a, s) => {
1363
1363
  const c = it(a, t), u = ut(a, n), i = it(s, t), f = ut(s, n);
@@ -1376,45 +1376,45 @@ function It(e) {
1376
1376
  return !!e && typeof e == "object";
1377
1377
  }
1378
1378
  const Ae = !0;
1379
- function Cr(e, t, n) {
1379
+ function Hr(e, t, n) {
1380
1380
  if (It(e) && t in e) {
1381
1381
  const r = e[t];
1382
1382
  if (typeof r == "string")
1383
- return ue(r, n, Ae);
1383
+ return fe(r, n, Ae);
1384
1384
  }
1385
- return ue(void 0, n, Ae);
1385
+ return fe(void 0, n, Ae);
1386
1386
  }
1387
- function Nr(e, t) {
1387
+ function jr(e, t) {
1388
1388
  const n = {};
1389
1389
  for (const [r, o] of Object.entries(e)) {
1390
- const a = Cr(t, r, o);
1390
+ const a = Hr(t, r, o);
1391
1391
  n[r] = a;
1392
1392
  }
1393
1393
  return n;
1394
1394
  }
1395
- function Hr(e, t, n) {
1395
+ function Vr(e, t, n) {
1396
1396
  if (It(e) && t in e) {
1397
1397
  const r = e[t];
1398
- return ie(r, n, Ae);
1398
+ return le(r, n, Ae);
1399
1399
  }
1400
- return ie(void 0, n, Ae);
1400
+ return le(void 0, n, Ae);
1401
1401
  }
1402
1402
  const ft = (e, t) => {
1403
1403
  const n = {};
1404
1404
  for (const [r, o] of Object.entries(e)) {
1405
- const a = Hr(t, r, o);
1405
+ const a = Vr(t, r, o);
1406
1406
  n[r] = a;
1407
1407
  }
1408
1408
  return n;
1409
- }, jr = [
1410
- xr,
1411
- Ur,
1409
+ }, $r = [
1412
1410
  Br,
1411
+ Cr,
1412
+ Lr,
1413
1413
  $e,
1414
- Sr
1414
+ Ar
1415
1415
  ];
1416
1416
  function Ne(e, t, n) {
1417
- const r = Lr(t), o = e.filter((u) => jr.every((i) => i(u, t))).sort(r);
1417
+ const r = Nr(t), o = e.filter((u) => $r.every((i) => i(u, t))).sort(r);
1418
1418
  if (o.length === 0)
1419
1419
  return;
1420
1420
  const [a] = o, { search: s, hash: c } = T(t);
@@ -1424,19 +1424,19 @@ function Ne(e, t, n) {
1424
1424
  matches: a.matches,
1425
1425
  name: a.name,
1426
1426
  query: jt(s),
1427
- params: Wt(a, t),
1428
- state: Nr(a.state, n),
1427
+ params: Dt(a, t),
1428
+ state: jr(a.state, n),
1429
1429
  hash: c
1430
1430
  };
1431
1431
  }
1432
1432
  function Ke(e, t) {
1433
- const n = new RegExp(`\\${W}(\\??[\\w-_]+)\\${G}`, "g");
1433
+ const n = new RegExp(`\\${D}(\\??[\\w-_]+)\\${G}`, "g");
1434
1434
  return Array.from(e.matchAll(n)).reduce((o, [a, s]) => {
1435
- const c = Le(a);
1435
+ const c = Ce(a);
1436
1436
  if (!c)
1437
1437
  return o;
1438
- const u = qn(t, c);
1439
- return oe([c], o), o[s] = u, o;
1438
+ const u = Mn(t, c);
1439
+ return se([c], o), o[s] = u, o;
1440
1440
  }, {});
1441
1441
  }
1442
1442
  function Oe(e, t) {
@@ -1445,8 +1445,8 @@ function Oe(e, t) {
1445
1445
  params: Ke(e, t)
1446
1446
  };
1447
1447
  }
1448
- function Vr(e, t) {
1449
- return de(t) ? e.map((n) => {
1448
+ function Or(e, t) {
1449
+ return me(t) ? e.map((n) => {
1450
1450
  const r = `${t}${n.path.value}`;
1451
1451
  return {
1452
1452
  ...n,
@@ -1454,7 +1454,7 @@ function Vr(e, t) {
1454
1454
  };
1455
1455
  }) : e;
1456
1456
  }
1457
- class $r extends Error {
1457
+ class qr extends Error {
1458
1458
  /**
1459
1459
  * Constructs a new DuplicateNamesError instance with a message indicating the problematic name.
1460
1460
  * @param name - The name of the name that was duplicated.
@@ -1463,13 +1463,13 @@ class $r extends Error {
1463
1463
  super(`Invalid Name "${t}": Router does not support multiple routes with the same name. All name names must be unique.`);
1464
1464
  }
1465
1465
  }
1466
- function Or(e) {
1466
+ function _r(e) {
1467
1467
  const t = e.map(({ name: n }) => n);
1468
1468
  for (const n of t)
1469
1469
  if (Rt(t, n) > 1)
1470
- throw new $r(n);
1470
+ throw new qr(n);
1471
1471
  }
1472
- function qr() {
1472
+ function Mr() {
1473
1473
  const e = Ue(/* @__PURE__ */ new Map()), t = Te() ? s() : null, n = (c) => {
1474
1474
  e.set(c, !1), t == null || t.observe(c);
1475
1475
  }, r = (c) => {
@@ -1492,59 +1492,59 @@ function qr() {
1492
1492
  };
1493
1493
  }
1494
1494
  const Ft = Symbol("visibilityObserver");
1495
- function _r() {
1496
- const e = re(Ft);
1495
+ function Tr() {
1496
+ const e = oe(Ft);
1497
1497
  if (!e)
1498
- throw new he();
1498
+ throw new pe();
1499
1499
  return e;
1500
1500
  }
1501
- function io(e, t) {
1502
- const n = bn(e) ? e.flat() : e, r = Vr(n, t == null ? void 0 : t.base);
1503
- Or(r);
1504
- const o = Vt(), a = Qr(), s = qr(), c = Pr(r), u = Yn({
1501
+ function lo(e, t) {
1502
+ const n = kn(e) ? e.flat() : e, r = Or(n, t == null ? void 0 : t.base);
1503
+ _r(r);
1504
+ const o = Vt(), a = Kr(), s = Mr(), c = br(r), u = Zn({
1505
1505
  mode: t == null ? void 0 : t.historyMode,
1506
1506
  listener: ({ location: w }) => {
1507
- const L = z(w);
1508
- A(L, { state: w.state, replace: !0 });
1507
+ const C = z(w);
1508
+ A(C, { state: w.state, replace: !0 });
1509
1509
  }
1510
- }), { runBeforeRouteHooks: i, runAfterRouteHooks: f } = nr(), {
1510
+ }), { runBeforeRouteHooks: i, runAfterRouteHooks: f } = or(), {
1511
1511
  hooks: l,
1512
1512
  onBeforeRouteEnter: m,
1513
1513
  onAfterRouteUpdate: p,
1514
1514
  onBeforeRouteLeave: P,
1515
- onAfterRouteEnter: y,
1516
- onBeforeRouteUpdate: R,
1517
- onAfterRouteLeave: k
1518
- } = or();
1519
- async function A(w, L = {}) {
1515
+ onAfterRouteEnter: R,
1516
+ onBeforeRouteUpdate: v,
1517
+ onAfterRouteLeave: S
1518
+ } = sr();
1519
+ async function A(w, C = {}) {
1520
1520
  const I = o();
1521
- if (u.stopListening(), Ce(w)) {
1522
- u.update(w, L);
1521
+ if (u.stopListening(), Le(w)) {
1522
+ u.update(w, C);
1523
1523
  return;
1524
1524
  }
1525
- const V = Ne(r, w, L.state) ?? g("NotFound"), me = { ...S }, F = await i({ to: V, from: me, hooks: l });
1525
+ const V = Ne(r, w, C.state) ?? g("NotFound"), ge = { ...k }, F = await i({ to: V, from: ge, hooks: l });
1526
1526
  switch (F.status) {
1527
1527
  // On abort do nothing
1528
1528
  case "ABORT":
1529
1529
  return;
1530
1530
  // On push update the history, and push new route, and return
1531
1531
  case "PUSH":
1532
- u.update(w, L), await d(...F.to);
1532
+ u.update(w, C), await d(...F.to);
1533
1533
  return;
1534
1534
  // On reject update the history, the route, and set the rejection type
1535
1535
  case "REJECT":
1536
- u.update(w, L), v(F.type);
1536
+ u.update(w, C), y(F.type);
1537
1537
  break;
1538
1538
  // On success update history, set the route, and clear the rejection
1539
1539
  case "SUCCESS":
1540
- u.update(w, L), v(null);
1540
+ u.update(w, C), y(null);
1541
1541
  break;
1542
1542
  default:
1543
1543
  throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(F)}`);
1544
1544
  }
1545
- const D = I;
1545
+ const W = I;
1546
1546
  a.setProps(V).then(($) => {
1547
- if (D === I)
1547
+ if (W === I)
1548
1548
  switch ($.status) {
1549
1549
  case "SUCCESS":
1550
1550
  break;
@@ -1552,20 +1552,20 @@ function io(e, t) {
1552
1552
  d(...$.to);
1553
1553
  break;
1554
1554
  case "REJECT":
1555
- v($.type);
1555
+ y($.type);
1556
1556
  break;
1557
1557
  default:
1558
- const ae = $;
1559
- throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(ae)}`);
1558
+ const ce = $;
1559
+ throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(ce)}`);
1560
1560
  }
1561
- }), C(V);
1562
- const J = await f({ to: V, from: me, hooks: l });
1561
+ }), L(V);
1562
+ const J = await f({ to: V, from: ge, hooks: l });
1563
1563
  switch (J.status) {
1564
1564
  case "PUSH":
1565
1565
  await d(...J.to);
1566
1566
  break;
1567
1567
  case "REJECT":
1568
- v(J.type);
1568
+ y(J.type);
1569
1569
  break;
1570
1570
  case "SUCCESS":
1571
1571
  break;
@@ -1575,41 +1575,41 @@ function io(e, t) {
1575
1575
  }
1576
1576
  u.startListening();
1577
1577
  }
1578
- const d = (w, L, I) => {
1578
+ const d = (w, C, I) => {
1579
1579
  if (M(w)) {
1580
- const $ = { ...L }, ae = c(w, $);
1581
- return A(ae, $);
1580
+ const $ = { ...C }, ce = c(w, $);
1581
+ return A(ce, $);
1582
1582
  }
1583
- const V = { ...I }, F = c(w, L ?? {}, V), D = nt(w), J = ft((D == null ? void 0 : D.state) ?? {}, V.state);
1583
+ const V = { ...I }, F = c(w, C ?? {}, V), W = nt(w), J = ft((W == null ? void 0 : W.state) ?? {}, V.state);
1584
1584
  return A(F, { ...V, state: J });
1585
- }, E = (w, L, I) => {
1585
+ }, E = (w, C, I) => {
1586
1586
  if (M(w)) {
1587
- const $ = { ...L, replace: !0 }, ae = c(w, $);
1588
- return A(ae, $);
1587
+ const $ = { ...C, replace: !0 }, ce = c(w, $);
1588
+ return A(ce, $);
1589
1589
  }
1590
- const V = { ...I, replace: !0 }, F = c(w, L ?? {}, V), D = nt(w), J = ft((D == null ? void 0 : D.state) ?? {}, V.state);
1590
+ const V = { ...I, replace: !0 }, F = c(w, C ?? {}, V), W = nt(w), J = ft((W == null ? void 0 : W.state) ?? {}, V.state);
1591
1591
  return A(F, { ...V, state: J });
1592
1592
  }, x = (w) => {
1593
- v(w);
1594
- }, U = (w, L = {}) => {
1593
+ y(w);
1594
+ }, U = (w, C = {}) => {
1595
1595
  if (!M(w)) {
1596
- const I = c(w, L);
1596
+ const I = c(w, C);
1597
1597
  return Ne(r, I);
1598
1598
  }
1599
- if (!Ce(w))
1599
+ if (!Le(w))
1600
1600
  return Ne(r, w);
1601
- }, { setRejection: v, rejection: h, getRejectionRoute: g } = sr(t ?? {}), b = g("NotFound"), { currentRoute: S, routerRoute: B, updateRoute: C } = Qn(b, d);
1601
+ }, { setRejection: y, rejection: h, getRejectionRoute: g } = ur(t ?? {}), b = g("NotFound"), { currentRoute: k, routerRoute: B, updateRoute: L } = Kn(b, d);
1602
1602
  u.startListening();
1603
- const j = br(t == null ? void 0 : t.initialUrl), q = u.location.state, { host: Ze } = T(j), Ce = zn(Ze);
1603
+ const j = kr(t == null ? void 0 : t.initialUrl), q = u.location.state, { host: Ze } = T(j), Le = Xn(Ze);
1604
1604
  let et = !1;
1605
1605
  async function tt() {
1606
1606
  et || (await A(j, { replace: !0, state: q }), et = !0);
1607
1607
  }
1608
1608
  function nt(w) {
1609
- return r.find((L) => L.name === w);
1609
+ return r.find((C) => C.name === w);
1610
1610
  }
1611
- function an(w) {
1612
- w.component("RouterView", oo), w.component("RouterLink", to), w.provide(xt, h), w.provide(Ht, l), w.provide(en, a), w.provide(Ft, s), w.provide(Ut, rt), tt();
1611
+ function sn(w) {
1612
+ w.component("RouterView", so), w.component("RouterLink", no), w.provide(xt, h), w.provide(Ht, l), w.provide(en, a), w.provide(Ft, s), w.provide(Ut, rt), tt();
1613
1613
  }
1614
1614
  const rt = {
1615
1615
  route: B,
@@ -1622,14 +1622,14 @@ function io(e, t) {
1622
1622
  forward: u.forward,
1623
1623
  back: u.back,
1624
1624
  go: u.go,
1625
- install: an,
1626
- isExternal: Ce,
1625
+ install: sn,
1626
+ isExternal: Le,
1627
1627
  onBeforeRouteEnter: m,
1628
1628
  onAfterRouteUpdate: p,
1629
1629
  onBeforeRouteLeave: P,
1630
- onAfterRouteEnter: y,
1631
- onBeforeRouteUpdate: R,
1632
- onAfterRouteLeave: k,
1630
+ onAfterRouteEnter: R,
1631
+ onBeforeRouteUpdate: v,
1632
+ onAfterRouteLeave: S,
1633
1633
  prefetch: t == null ? void 0 : t.prefetch,
1634
1634
  start: tt
1635
1635
  };
@@ -1647,29 +1647,29 @@ function Jt(e, t) {
1647
1647
  params: Ke(e, t)
1648
1648
  };
1649
1649
  }
1650
- function Mr(e) {
1651
- return pe(e) && typeof e.hash == "string";
1650
+ function Wr(e) {
1651
+ return de(e) && typeof e.hash == "string";
1652
1652
  }
1653
1653
  function Qt(e) {
1654
- return e === void 0 ? Re() : Mr(e) ? e : Re(e);
1654
+ return e === void 0 ? Re() : Wr(e) ? e : Re(e);
1655
1655
  }
1656
1656
  function Gt(e) {
1657
1657
  return e === void 0 ? "" : e;
1658
1658
  }
1659
- function Tr(e) {
1660
- return pe(e) && typeof e.value == "string";
1659
+ function Dr(e) {
1660
+ return de(e) && typeof e.value == "string";
1661
1661
  }
1662
1662
  function Kt(e) {
1663
- return e === void 0 ? Oe("", {}) : Tr(e) ? e : Oe(e, {});
1663
+ return e === void 0 ? Oe("", {}) : Dr(e) ? e : Oe(e, {});
1664
1664
  }
1665
- function Dr(e) {
1666
- return pe(e) && typeof e.value == "string";
1665
+ function Ir(e) {
1666
+ return de(e) && typeof e.value == "string";
1667
1667
  }
1668
1668
  function zt(e) {
1669
- return e === void 0 ? lt("", {}) : Dr(e) ? e : lt(e, {});
1669
+ return e === void 0 ? lt("", {}) : Ir(e) ? e : lt(e, {});
1670
1670
  }
1671
- function ne(e) {
1672
- const t = Je(), n = Gt(e.name), r = Kt(e.path), o = zt(e.query), a = Qt(e.hash), s = e.meta ?? {}, c = jn(e) ? e.state : {}, u = ye({ id: t, meta: {}, state: {}, ...e }), i = {
1671
+ function re(e) {
1672
+ const t = Je(), n = Gt(e.name), r = Kt(e.path), o = zt(e.query), a = Qt(e.hash), s = e.meta ?? {}, c = $n(e) ? e.state : {}, u = ve({ id: t, meta: {}, state: {}, ...e }), i = {
1673
1673
  id: t,
1674
1674
  matched: u,
1675
1675
  matches: [u],
@@ -1683,40 +1683,40 @@ function ne(e) {
1683
1683
  host: Jt("", {}),
1684
1684
  prefetch: e.prefetch
1685
1685
  }, f = wt(e) ? Pt(e.parent, i) : i;
1686
- return oe(f.path.params, f.query.params), f;
1686
+ return se(f.path.params, f.query.params), f;
1687
1687
  }
1688
- const xe = { template: "<div>This is component</div>" }, ze = ne({
1688
+ const xe = { template: "<div>This is component</div>" }, ze = re({
1689
1689
  name: "parentA",
1690
1690
  path: "/parentA/[paramA]"
1691
- }), Yt = ne({
1691
+ }), Yt = re({
1692
1692
  parent: ze,
1693
1693
  name: "parentA.childA",
1694
1694
  path: "/[?paramB]"
1695
- }), Wr = ne({
1695
+ }), Fr = re({
1696
1696
  parent: ze,
1697
1697
  name: "parentA.childB",
1698
1698
  path: "/[paramD]",
1699
1699
  component: xe
1700
- }), Ir = ne({
1700
+ }), Jr = re({
1701
1701
  parent: Yt,
1702
1702
  name: "parentA.childA.grandChildA",
1703
1703
  path: "/[paramC]",
1704
1704
  component: xe
1705
1705
  });
1706
- ne({
1706
+ re({
1707
1707
  name: "parentB",
1708
1708
  path: "/parentB",
1709
1709
  component: xe
1710
- }), ne({
1710
+ }), re({
1711
1711
  name: "parentC",
1712
1712
  path: "/",
1713
1713
  component: xe
1714
1714
  });
1715
- const Fr = "lazy", Jr = {
1715
+ const Qr = "lazy", Gr = {
1716
1716
  components: !0,
1717
1717
  props: !1
1718
1718
  };
1719
- function ge(e) {
1719
+ function ye(e) {
1720
1720
  return ["eager", "lazy"].includes(e);
1721
1721
  }
1722
1722
  function Xt({ routerPrefetch: e, routePrefetch: t, linkPrefetch: n }, r) {
@@ -1724,13 +1724,13 @@ function Xt({ routerPrefetch: e, routePrefetch: t, linkPrefetch: n }, r) {
1724
1724
  o,
1725
1725
  a,
1726
1726
  s,
1727
- Jr[r],
1728
- Fr
1729
- ].reduce((u, i) => ge(u) ? u : u === !0 && ge(i) ? i : u === !0 && !ge(i) ? u : u === void 0 ? i : u, void 0);
1730
- return ge(c) ? c : !1;
1727
+ Gr[r],
1728
+ Qr
1729
+ ].reduce((u, i) => ye(u) ? u : u === !0 && ye(i) ? i : u === !0 && !ye(i) ? u : u === void 0 ? i : u, void 0);
1730
+ return ye(c) ? c : !1;
1731
1731
  }
1732
1732
  function He(e, t) {
1733
- return pe(e) ? e[t] : e;
1733
+ return de(e) ? e[t] : e;
1734
1734
  }
1735
1735
  function Zt(e) {
1736
1736
  return typeof e == "object" && e !== null && "then" in e;
@@ -1744,11 +1744,11 @@ function ht(e) {
1744
1744
  }
1745
1745
  }
1746
1746
  const en = Symbol();
1747
- function Qr() {
1748
- const e = Ue(/* @__PURE__ */ new Map()), { push: t, replace: n, reject: r } = Nt(), o = (l, m, p) => m.matches.filter((P) => Xt({ ...p, routePrefetch: P.prefetch }, "props") === l).flatMap((P) => i(P)).reduce((P, { id: y, name: R, props: k }) => {
1749
- if (!k)
1747
+ function Kr() {
1748
+ const e = Ue(/* @__PURE__ */ new Map()), { push: t, replace: n, reject: r } = Nt(), o = (l, m, p) => m.matches.filter((P) => Xt({ ...p, routePrefetch: P.prefetch }, "props") === l).flatMap((P) => i(P)).reduce((P, { id: R, name: v, props: S }) => {
1749
+ if (!S)
1750
1750
  return P;
1751
- const A = u(y, R, m), d = ht(() => k(m, {
1751
+ const A = u(R, v, m), d = ht(() => S(m, {
1752
1752
  push: t,
1753
1753
  replace: n,
1754
1754
  reject: r
@@ -1760,12 +1760,12 @@ function Qr() {
1760
1760
  });
1761
1761
  }, s = async (l) => {
1762
1762
  const m = l.matches.flatMap(i), p = [], P = [];
1763
- for (const { id: y, name: R, props: k } of m) {
1764
- if (!k)
1763
+ for (const { id: R, name: v, props: S } of m) {
1764
+ if (!S)
1765
1765
  continue;
1766
- const A = u(y, R, l);
1766
+ const A = u(R, v, l);
1767
1767
  if (p.push(A), !e.has(A)) {
1768
- const d = ht(() => k(l, {
1768
+ const d = ht(() => S(l, {
1769
1769
  push: t,
1770
1770
  replace: n,
1771
1771
  reject: r
@@ -1781,10 +1781,10 @@ function Qr() {
1781
1781
  f(p);
1782
1782
  try {
1783
1783
  return await Promise.all(P), { status: "SUCCESS" };
1784
- } catch (y) {
1785
- if (y instanceof X || y instanceof Se)
1786
- return y.response;
1787
- throw y;
1784
+ } catch (R) {
1785
+ if (R instanceof Z || R instanceof Se)
1786
+ return R.response;
1787
+ throw R;
1788
1788
  }
1789
1789
  }, c = (l, m, p) => {
1790
1790
  const P = u(l, m, p);
@@ -1814,45 +1814,45 @@ function Qr() {
1814
1814
  };
1815
1815
  }
1816
1816
  function tn() {
1817
- const e = re(en);
1817
+ const e = oe(en);
1818
1818
  if (!e)
1819
- throw new he();
1819
+ throw new pe();
1820
1820
  return e;
1821
1821
  }
1822
- const Gr = fn(() => new Promise((e) => {
1822
+ const zr = ln(() => new Promise((e) => {
1823
1823
  e({ default: { template: "foo" } });
1824
1824
  }));
1825
1825
  function pt(e) {
1826
- return e.name === Gr.name && "setup" in e;
1826
+ return e.name === zr.name && "setup" in e;
1827
1827
  }
1828
- function Kr(e) {
1829
- const t = /* @__PURE__ */ new Map(), n = qe(), { getPrefetchProps: r, setPrefetchProps: o } = tn(), { observe: a, unobserve: s, isElementVisible: c } = _r(), u = () => {
1828
+ function Yr(e) {
1829
+ const t = /* @__PURE__ */ new Map(), n = qe(), { getPrefetchProps: r, setPrefetchProps: o } = tn(), { observe: a, unobserve: s, isElementVisible: c } = Tr(), u = () => {
1830
1830
  const f = Array.from(t.values()).reduce((l, m) => (Object.assign(l, m), l), {});
1831
1831
  o(f);
1832
1832
  };
1833
- ln(() => {
1833
+ hn(() => {
1834
1834
  if (!n.value) {
1835
1835
  console.warn("The usePrefetching composition will not work correctly if the element ref is not bound.");
1836
1836
  return;
1837
1837
  }
1838
1838
  a(n.value);
1839
- }), hn(() => {
1839
+ }), pn(() => {
1840
1840
  n.value && s(n.value);
1841
- }), je(() => se(e), ({ route: f, ...l }) => {
1841
+ }), je(() => ue(e), ({ route: f, ...l }) => {
1842
1842
  t.clear(), f && i("eager", f, l);
1843
1843
  }, { immediate: !0 }), je(() => !!(n.value && c(n.value)), (f) => {
1844
- const { route: l, ...m } = se(e);
1844
+ const { route: l, ...m } = ue(e);
1845
1845
  !l || !f || i("lazy", l, m);
1846
1846
  }, { immediate: !0 });
1847
1847
  function i(f, l, m) {
1848
- zr(f, l, m), t.has(f) || t.set(f, r(f, l, m));
1848
+ Xr(f, l, m), t.has(f) || t.set(f, r(f, l, m));
1849
1849
  }
1850
1850
  return {
1851
1851
  element: n,
1852
1852
  commit: u
1853
1853
  };
1854
1854
  }
1855
- function zr(e, t, n) {
1855
+ function Xr(e, t, n) {
1856
1856
  t.matches.forEach((r) => {
1857
1857
  Xt({
1858
1858
  ...n,
@@ -1862,20 +1862,29 @@ function zr(e, t, n) {
1862
1862
  }));
1863
1863
  });
1864
1864
  }
1865
- function Yr(e, t = {}, n = {}) {
1866
- const r = De(), o = pn(e), a = N(() => M(o.value) ? {} : se(t)), s = N(() => M(o.value) ? se(t) : se(n)), c = N(() => {
1865
+ function nn(e, t, { exact: n } = {}) {
1866
+ return Qn(e) ? t === void 0 ? !0 : n ? e.matched.name === t : e.matches.map((r) => r.name).includes(t) : !1;
1867
+ }
1868
+ function Zr(e, t = {}, n = {}) {
1869
+ const r = We(), o = dn(e), a = N(() => M(o.value) ? {} : ue(t)), s = N(() => M(o.value) ? ue(t) : ue(n)), c = N(() => {
1867
1870
  if (M(o.value))
1868
1871
  return o.value;
1869
1872
  try {
1870
1873
  return r.resolve(o.value, a.value, s.value);
1871
- } catch (R) {
1872
- throw R instanceof Z && console.error(`Failed to resolve route "${o.value.toString()}" in RouterLink.`, R), R;
1874
+ } catch (v) {
1875
+ throw v instanceof ee && console.error(`Failed to resolve route "${o.value.toString()}" in RouterLink.`, v), v;
1873
1876
  }
1874
- }), u = N(() => r.find(c.value, s.value)), i = N(() => !!u.value && r.route.matches.includes(u.value.matched)), f = N(() => !!u.value && r.route.matched === u.value.matched), l = N(() => r.isExternal(c.value)), { element: m, commit: p } = Kr(() => ({
1877
+ }), u = N(() => r.find(c.value, s.value)), i = N(() => nn(r.route) && r.route.matches.some((v) => {
1878
+ var S;
1879
+ return v.id === ((S = u.value) == null ? void 0 : S.id);
1880
+ })), f = N(() => {
1881
+ var v;
1882
+ return r.route.id === ((v = u.value) == null ? void 0 : v.id);
1883
+ }), l = N(() => r.isExternal(c.value)), { element: m, commit: p } = Yr(() => ({
1875
1884
  route: u.value,
1876
1885
  routerPrefetch: r.prefetch,
1877
1886
  linkPrefetch: s.value.prefetch
1878
- })), P = (R) => (p(), r.push(c.value, { ...s.value, ...R }));
1887
+ })), P = (v) => (p(), r.push(c.value, { ...s.value, ...v }));
1879
1888
  return {
1880
1889
  element: m,
1881
1890
  route: u,
@@ -1884,45 +1893,42 @@ function Yr(e, t = {}, n = {}) {
1884
1893
  isExactMatch: f,
1885
1894
  isExternal: l,
1886
1895
  push: P,
1887
- replace: (R) => P(R)
1896
+ replace: (v) => P(v)
1888
1897
  };
1889
1898
  }
1890
- function Xr(e, t, { exact: n } = {}) {
1891
- return Fn(e) ? t === void 0 ? !0 : n ? e.matched.name === t : e.matches.map((r) => r.name).includes(t) : !1;
1892
- }
1893
- function Zr(e, t) {
1894
- const n = De();
1899
+ function eo(e, t) {
1900
+ const n = We();
1895
1901
  function r() {
1896
1902
  if (!e)
1897
1903
  return;
1898
- if (!Xr(n.route, e, t))
1899
- throw new Wn(e, n.route.name);
1904
+ if (!nn(n.route, e, t))
1905
+ throw new Fn(e, n.route.name);
1900
1906
  }
1901
1907
  return je(n.route, r, { immediate: !0, deep: !0 }), n.route;
1902
1908
  }
1903
- const nn = Symbol();
1909
+ const rn = Symbol();
1904
1910
  function Ye() {
1905
- return re(nn, 0);
1911
+ return oe(rn, 0);
1906
1912
  }
1907
- function rn() {
1908
- const e = re(Ht);
1913
+ function on() {
1914
+ const e = oe(Ht);
1909
1915
  if (!e)
1910
- throw new he();
1916
+ throw new pe();
1911
1917
  return e;
1912
1918
  }
1913
- function on(e) {
1919
+ function an(e) {
1914
1920
  return (t) => {
1915
- const n = Ye(), o = rn().addBeforeRouteHook({ lifecycle: e, hook: t, depth: n, timing: "component" });
1921
+ const n = Ye(), o = on().addBeforeRouteHook({ lifecycle: e, hook: t, depth: n, timing: "component" });
1916
1922
  return mt(o), o;
1917
1923
  };
1918
1924
  }
1919
1925
  function Xe(e) {
1920
1926
  return (t) => {
1921
- const n = Ye(), o = rn().addAfterRouteHook({ lifecycle: e, hook: t, depth: n, timing: "component" });
1927
+ const n = Ye(), o = on().addAfterRouteHook({ lifecycle: e, hook: t, depth: n, timing: "component" });
1922
1928
  return mt(o), o;
1923
1929
  };
1924
1930
  }
1925
- const fo = on("onBeforeRouteUpdate"), lo = on("onBeforeRouteLeave"), ho = Xe("onAfterRouteEnter"), po = Xe("onAfterRouteUpdate"), mo = Xe("onAfterRouteLeave"), eo = ["href"], to = /* @__PURE__ */ le({
1931
+ const ho = an("onBeforeRouteUpdate"), po = an("onBeforeRouteLeave"), mo = Xe("onAfterRouteEnter"), go = Xe("onAfterRouteUpdate"), yo = Xe("onAfterRouteLeave"), to = ["href"], no = /* @__PURE__ */ ae({
1926
1932
  __name: "routerLink",
1927
1933
  props: {
1928
1934
  to: {},
@@ -1933,55 +1939,65 @@ const fo = on("onBeforeRouteUpdate"), lo = on("onBeforeRouteLeave"), ho = Xe("on
1933
1939
  state: {}
1934
1940
  },
1935
1941
  setup(e) {
1936
- const t = e, n = De(), r = N(() => M(t.to) ? t.to : t.to(n.resolve)), o = N(() => {
1942
+ const t = e, n = We(), r = N(() => M(t.to) ? t.to : t.to(n.resolve)), o = N(() => {
1937
1943
  const { to: m, ...p } = t;
1938
1944
  return p;
1939
- }), { element: a, isMatch: s, isExactMatch: c, isExternal: u, push: i } = Yr(r, o), f = N(() => ({
1945
+ }), { element: a, isMatch: s, isExactMatch: c, isExternal: u, push: i } = Zr(r, o), f = N(() => ({
1940
1946
  "router-link--match": s.value,
1941
1947
  "router-link--exact-match": c.value
1942
1948
  }));
1943
1949
  function l(m) {
1944
1950
  m.preventDefault(), i();
1945
1951
  }
1946
- return (m, p) => (gt(), dn("a", {
1952
+ return (m, p) => (gt(), mn("a", {
1947
1953
  ref_key: "element",
1948
1954
  ref: a,
1949
1955
  href: r.value,
1950
- class: mn(["router-link", f.value]),
1956
+ class: gn(["router-link", f.value]),
1951
1957
  onClick: l
1952
1958
  }, [
1953
- vt(m.$slots, "default", yt(gn({ resolved: r.value, isMatch: ce(s), isExactMatch: ce(c), isExternal: ce(u) })))
1954
- ], 10, eo));
1959
+ yt(m.$slots, "default", vt(yn({ resolved: r.value, isMatch: ie(s), isExactMatch: ie(c), isExternal: ie(u) })))
1960
+ ], 10, to));
1955
1961
  }
1956
1962
  });
1957
- function no(e, t) {
1958
- return le({
1963
+ function ro(e, t) {
1964
+ return ae({
1959
1965
  name: "PropsWrapper",
1960
1966
  expose: [],
1961
1967
  setup() {
1962
- const n = t();
1963
- return () => n instanceof Error ? "" : Zt(n) ? ve(ro(e, n)) : ve(e, n);
1968
+ const n = t(), r = vn();
1969
+ return () => n instanceof Error ? "" : Zt(n) ? r != null && r.suspense ? Y(ao(e, n)) : Y(oo(e, n)) : Y(e, n);
1964
1970
  }
1965
1971
  });
1966
1972
  }
1967
- function ro(e, t) {
1968
- return le({
1973
+ function oo(e, t) {
1974
+ return ae({
1969
1975
  name: "AsyncPropsWrapper",
1970
1976
  expose: [],
1971
1977
  setup() {
1972
1978
  const n = qe();
1973
- return (async () => n.value = await t)(), () => n.value instanceof Error ? "" : n.value ? ve(e, n.value) : "";
1979
+ return (async () => n.value = await t)(), () => n.value instanceof Error ? "" : n.value ? Y(e, n.value) : "";
1980
+ }
1981
+ });
1982
+ }
1983
+ function ao(e, t) {
1984
+ return ae({
1985
+ name: "SuspenseAsyncPropsWrapper",
1986
+ expose: [],
1987
+ async setup() {
1988
+ const n = await t;
1989
+ return () => Y(e, n);
1974
1990
  }
1975
1991
  });
1976
1992
  }
1977
- const oo = /* @__PURE__ */ le({
1993
+ const so = /* @__PURE__ */ ae({
1978
1994
  __name: "routerView",
1979
1995
  props: {
1980
1996
  name: { default: "default" }
1981
1997
  },
1982
1998
  setup(e) {
1983
- const t = Zr(), n = In(), r = Ye(), { getProps: o } = tn(), a = vn("RouterView", !0);
1984
- yn(nn, r + 1);
1999
+ const t = eo(), n = Jn(), r = Ye(), { getProps: o } = tn(), a = Rn("RouterView", !0);
2000
+ wn(rn, r + 1);
1985
2001
  const s = N(() => {
1986
2002
  if (n.value)
1987
2003
  return n.value.component;
@@ -1989,7 +2005,7 @@ const oo = /* @__PURE__ */ le({
1989
2005
  if (!i)
1990
2006
  return null;
1991
2007
  const f = c(i), l = o(i.id, e.name, t);
1992
- return f ? l ? no(f, () => l) : f : null;
2008
+ return f ? l ? ro(f, () => l) : f : null;
1993
2009
  });
1994
2010
  function c(i) {
1995
2011
  return u(i)[e.name];
@@ -1997,19 +2013,19 @@ const oo = /* @__PURE__ */ le({
1997
2013
  function u(i) {
1998
2014
  return Me(i) ? i.components : _e(i) ? { default: i.component } : typeof a == "string" ? {} : { default: a };
1999
2015
  }
2000
- return (i, f) => s.value ? vt(i.$slots, "default", yt(Rn({ key: 0 }, { route: ce(t), component: s.value, rejection: ce(n) })), () => [
2001
- (gt(), wn(Pn(s.value)))
2002
- ]) : En("", !0);
2016
+ return (i, f) => s.value ? yt(i.$slots, "default", vt(Pn({ key: 0 }, { route: ie(t), component: s.value, rejection: ie(n) })), () => [
2017
+ (gt(), En(bn(s.value)))
2018
+ ]) : Sn("", !0);
2003
2019
  }
2004
2020
  });
2005
- function ao(e) {
2006
- return pe(e) && typeof e.value == "string";
2021
+ function co(e) {
2022
+ return de(e) && typeof e.value == "string";
2007
2023
  }
2008
2024
  function dt(e) {
2009
- return ao(e) ? e : Jt(e, {});
2025
+ return co(e) ? e : Jt(e, {});
2010
2026
  }
2011
- function go(e) {
2012
- const t = Je(), n = Gt(e.name), r = Kt(e.path), o = zt(e.query), a = Qt(e.hash), s = e.meta ?? {}, c = Hn(e) ? dt(e.host) : dt(""), u = ye({ id: t, meta: {}, state: {}, ...e }), i = {
2027
+ function vo(e) {
2028
+ const t = Je(), n = Gt(e.name), r = Kt(e.path), o = zt(e.query), a = Qt(e.hash), s = e.meta ?? {}, c = Vn(e) ? dt(e.host) : dt(""), u = ve({ id: t, meta: {}, state: {}, ...e }), i = {
2013
2029
  id: t,
2014
2030
  matched: u,
2015
2031
  matches: [u],
@@ -2022,31 +2038,31 @@ function go(e) {
2022
2038
  depth: 1,
2023
2039
  state: {}
2024
2040
  }, f = wt(e) ? Pt(e.parent, i) : i;
2025
- return oe(f.path.params, f.query.params, f.host.params), f;
2041
+ return se(f.path.params, f.query.params, f.host.params), f;
2026
2042
  }
2027
2043
  export {
2028
- Un as DuplicateParamsError,
2029
- kn as MetaPropertyConflict,
2030
- to as RouterLink,
2031
- he as RouterNotInstalledError,
2032
- oo as RouterView,
2033
- Wn as UseRouteInvalidError,
2034
- tr as asUrl,
2035
- go as createExternalRoute,
2036
- Mn as createParam,
2037
- ne as createRoute,
2038
- io as createRouter,
2039
- Xr as isRoute,
2044
+ Cn as DuplicateParamsError,
2045
+ xn as MetaPropertyConflict,
2046
+ no as RouterLink,
2047
+ pe as RouterNotInstalledError,
2048
+ so as RouterView,
2049
+ Fn as UseRouteInvalidError,
2050
+ rr as asUrl,
2051
+ vo as createExternalRoute,
2052
+ Wn as createParam,
2053
+ re as createRoute,
2054
+ lo as createRouter,
2055
+ nn as isRoute,
2040
2056
  M as isUrl,
2041
- ho as onAfterRouteEnter,
2042
- po as onAfterRouteLeave,
2043
- mo as onAfterRouteUpdate,
2044
- fo as onBeforeRouteLeave,
2045
- lo as onBeforeRouteUpdate,
2057
+ mo as onAfterRouteEnter,
2058
+ go as onAfterRouteLeave,
2059
+ yo as onAfterRouteUpdate,
2060
+ ho as onBeforeRouteLeave,
2061
+ po as onBeforeRouteUpdate,
2046
2062
  Oe as path,
2047
2063
  lt as query,
2048
- Yr as useLink,
2049
- Zr as useRoute,
2050
- De as useRouter,
2051
- uo as withDefault
2064
+ Zr as useLink,
2065
+ eo as useRoute,
2066
+ We as useRouter,
2067
+ fo as withDefault
2052
2068
  };