@kitbag/router 0.14.2 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
- var lr = Object.defineProperty;
2
- var hr = (e, t, r) => t in e ? lr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var T = (e, t, r) => hr(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { inject as ae, toRefs as pr, computed as N, reactive as xe, defineComponent as se, h as Z, ref as qe, markRaw as ye, watch as ge, defineAsyncComponent as dr, toValue as $, openBlock as vt, createElementBlock as mr, normalizeClass as yr, renderSlot as Rt, normalizeProps as wt, guardReactiveProps as gr, unref as ue, getCurrentInstance as vr, resolveComponent as Rr, provide as wr, mergeProps as Pr, createBlock as Er, resolveDynamicComponent as br, createCommentVNode as Sr, onUnmounted as Pt } from "vue";
5
- function I(e) {
1
+ var dr = Object.defineProperty;
2
+ var mr = (e, t, r) => t in e ? dr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var O = (e, t, r) => mr(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { inject as ae, toRefs as yr, computed as N, reactive as xe, defineComponent as se, h as Z, ref as _e, markRaw as ge, watch as ie, onUnmounted as Le, defineAsyncComponent as gr, toValue as j, openBlock as wt, createElementBlock as vr, normalizeClass as Rr, renderSlot as Pt, normalizeProps as Et, guardReactiveProps as wr, unref as ue, getCurrentInstance as Pr, resolveComponent as Er, provide as br, mergeProps as Sr, createBlock as kr, resolveDynamicComponent as Ar, createCommentVNode as xr } from "vue";
5
+ function T(e) {
6
6
  return typeof e != "string" ? !1 : /^(https?:\/\/|\/).*/g.test(e);
7
7
  }
8
- function Et(e) {
9
- return I(e) ? e : `/${e}`;
8
+ function bt(e) {
9
+ return T(e) ? e : `/${e}`;
10
10
  }
11
- class kr extends Error {
11
+ class Lr extends Error {
12
12
  /**
13
13
  * Constructs a new DuplicateParamsError instance with a message indicating the problematic parameter.
14
14
  * @param paramName - The name of the parameter that was duplicated.
@@ -17,17 +17,17 @@ class kr extends Error {
17
17
  super(`Invalid Param "${t}": Router does not support multiple params by the same name. All param names must be unique.`);
18
18
  }
19
19
  }
20
- class Ar extends Error {
20
+ class Ur extends Error {
21
21
  constructor(t) {
22
22
  super(`Child property on meta for ${t} conflicts with the parent meta.`);
23
23
  }
24
24
  }
25
- class pe extends Error {
25
+ class de extends Error {
26
26
  constructor() {
27
27
  super("Router not installed");
28
28
  }
29
29
  }
30
- class xr extends Error {
30
+ class Cr extends Error {
31
31
  /**
32
32
  * Constructs a new UseRouteInvalidError instance with a message that specifies both the given and expected route names.
33
33
  * This detailed error message aids in quickly identifying and resolving mismatches in route usage.
@@ -38,17 +38,17 @@ class xr extends Error {
38
38
  super(`useRoute called with incorrect route. Given ${t}, expected ${r}`);
39
39
  }
40
40
  }
41
- const bt = Symbol();
42
- function _e() {
43
- const e = ae(bt);
41
+ const St = Symbol();
42
+ function Me() {
43
+ const e = ae(St);
44
44
  if (!e)
45
- throw new pe();
45
+ throw new de();
46
46
  return e;
47
47
  }
48
- function de(e) {
48
+ function me(e) {
49
49
  return typeof e == "object" && e !== null && !Array.isArray(e);
50
50
  }
51
- function Ur(e) {
51
+ function Br(e) {
52
52
  return e.every((t) => Array.isArray(t));
53
53
  }
54
54
  function F(e) {
@@ -59,111 +59,111 @@ function ve(e) {
59
59
  value: F(e) ? e.replace(/^#*/, "") : void 0
60
60
  };
61
61
  }
62
- function Lr(e, t) {
62
+ function Nr(e, t) {
63
63
  return ve(`${e.value ?? ""}${t.value ?? ""}`);
64
64
  }
65
- function Cr(e, t) {
66
- return Br(e, t), { ...e, ...t };
65
+ function Vr(e, t) {
66
+ return Hr(e, t), { ...e, ...t };
67
67
  }
68
- function Br(e, t) {
68
+ function Hr(e, t) {
69
69
  const r = Object.keys(e).find((n) => n in t && typeof t[n] != typeof e[n]);
70
70
  if (r)
71
- throw new Ar(r);
71
+ throw new Ur(r);
72
72
  }
73
73
  function ee(e) {
74
74
  return Array.isArray(e) ? e : [e];
75
75
  }
76
- function St(e, t) {
76
+ function kt(e, t) {
77
77
  return e.filter((r) => t === r).length;
78
78
  }
79
79
  function ce(...e) {
80
- const t = e.flatMap((r) => Array.isArray(r) ? r : Object.keys(r).map(Nr));
80
+ const t = e.flatMap((r) => Array.isArray(r) ? r : Object.keys(r).map(jr));
81
81
  for (const r of t)
82
- if (St(t, r) > 1)
83
- throw new kr(r);
82
+ if (kt(t, r) > 1)
83
+ throw new Lr(r);
84
84
  }
85
- function Nr(e) {
85
+ function jr(e) {
86
86
  return e.startsWith("?") ? e.slice(1) : e;
87
87
  }
88
- function Vr(e, t) {
88
+ function $r(e, t) {
89
89
  return ce(e.params, t.params), {
90
90
  value: `${e.value}${t.value}`,
91
91
  params: { ...e.params, ...t.params }
92
92
  };
93
93
  }
94
- function Hr(e, t) {
94
+ function qr(e, t) {
95
95
  return ce(e.params, t.params), {
96
96
  value: [e.value, t.value].filter(F).join("&"),
97
97
  params: { ...e.params, ...t.params }
98
98
  };
99
99
  }
100
- function jr(e, t) {
100
+ function _r(e, t) {
101
101
  return ce(e, t), { ...e, ...t };
102
102
  }
103
- function $r(e) {
103
+ function Mr(e) {
104
104
  return "host" in e && !!e.host;
105
105
  }
106
- function kt(e) {
106
+ function At(e) {
107
107
  return "parent" in e && !!e.parent;
108
108
  }
109
- function Me(e) {
109
+ function We(e) {
110
110
  return "component" in e && !!e.component;
111
111
  }
112
- function We(e) {
112
+ function De(e) {
113
113
  return "components" in e && !!e.components;
114
114
  }
115
- function qr(e) {
115
+ function Wr(e) {
116
116
  return "state" in e && !!e.state;
117
117
  }
118
- function At(e, t) {
118
+ function xt(e, t) {
119
119
  return {
120
120
  ...t,
121
- path: Vr(e.path, t.path),
122
- query: Hr(e.query, t.query),
123
- meta: Cr(e.meta, t.meta),
124
- state: jr(e.state, t.state),
125
- hash: Lr(e.hash, t.hash),
121
+ path: $r(e.path, t.path),
122
+ query: qr(e.query, t.query),
123
+ meta: Vr(e.meta, t.meta),
124
+ state: _r(e.state, t.state),
125
+ hash: Nr(e.hash, t.hash),
126
126
  matches: [...e.matches, t.matched],
127
127
  host: e.host,
128
128
  depth: e.depth + 1
129
129
  };
130
130
  }
131
- function De() {
131
+ function Ie() {
132
132
  return typeof window < "u" && typeof window.document < "u";
133
133
  }
134
- class ie extends Error {
134
+ class fe extends Error {
135
135
  }
136
136
  const J = "[", K = "]";
137
- function _r(e) {
137
+ function Dr(e) {
138
138
  return e !== String && e !== Boolean && e !== Number && e !== Date;
139
139
  }
140
- function Mr(e) {
141
- return typeof e == "function" && _r(e);
140
+ function Ir(e) {
141
+ return typeof e == "function" && Dr(e);
142
142
  }
143
143
  function Ue(e) {
144
144
  return typeof e == "object" && "get" in e && typeof e.get == "function" && "set" in e && typeof e.set == "function";
145
145
  }
146
- function Wr(e) {
146
+ function Or(e) {
147
147
  return Ue(e) && e.defaultValue !== void 0;
148
148
  }
149
- function fo(e, t) {
150
- return Tr(e, t);
149
+ function po(e, t) {
150
+ return Jr(e, t);
151
151
  }
152
- function Dr(e, t) {
152
+ function Tr(e, t) {
153
153
  return e[t] ?? String;
154
154
  }
155
155
  const q = {
156
156
  invalid: (e) => {
157
- throw new ie(e);
157
+ throw new fe(e);
158
158
  }
159
- }, Or = {
159
+ }, Fr = {
160
160
  get: (e) => e,
161
161
  set: (e, { invalid: t }) => {
162
162
  if (typeof e != "string")
163
163
  throw t();
164
164
  return e;
165
165
  }
166
- }, xt = {
166
+ }, Lt = {
167
167
  get: (e, { invalid: t }) => {
168
168
  if (e === "true")
169
169
  return !0;
@@ -188,7 +188,7 @@ const q = {
188
188
  throw t();
189
189
  return e.toString();
190
190
  }
191
- }, Lt = {
191
+ }, Ct = {
192
192
  get: (e, { invalid: t }) => {
193
193
  const r = new Date(e);
194
194
  if (isNaN(r.getTime()))
@@ -200,7 +200,7 @@ const q = {
200
200
  throw t();
201
201
  return e.toISOString();
202
202
  }
203
- }, Ct = {
203
+ }, Bt = {
204
204
  get: (e, { invalid: t }) => {
205
205
  try {
206
206
  return JSON.parse(e);
@@ -216,61 +216,61 @@ const q = {
216
216
  }
217
217
  }
218
218
  };
219
- function fe(e, t, r = !1) {
219
+ function le(e, t, r = !1) {
220
220
  if (e === void 0 || !F(e)) {
221
- if (Wr(t))
221
+ if (Or(t))
222
222
  return t.defaultValue;
223
223
  if (r)
224
224
  return;
225
- throw new ie();
225
+ throw new fe();
226
226
  }
227
227
  if (t === String)
228
- return Or.get(e, q);
228
+ return Fr.get(e, q);
229
229
  if (t === Boolean)
230
- return xt.get(e, q);
230
+ return Lt.get(e, q);
231
231
  if (t === Number)
232
232
  return Ut.get(e, q);
233
233
  if (t === Date)
234
- return Lt.get(e, q);
235
- if (t === JSON)
236
234
  return Ct.get(e, q);
237
- if (Mr(t))
235
+ if (t === JSON)
236
+ return Bt.get(e, q);
237
+ if (Ir(t))
238
238
  return t(e, q);
239
239
  if (Ue(t))
240
240
  return t.get(e, q);
241
241
  if (t instanceof RegExp) {
242
242
  if (t.test(e))
243
243
  return e;
244
- throw new ie();
244
+ throw new fe();
245
245
  }
246
246
  return e;
247
247
  }
248
- function le(e, t, r = !1) {
248
+ function he(e, t, r = !1) {
249
249
  if (e === void 0) {
250
250
  if (r)
251
251
  return "";
252
- throw new ie();
252
+ throw new fe();
253
253
  }
254
254
  if (t === Boolean)
255
- return xt.set(e, q);
255
+ return Lt.set(e, q);
256
256
  if (t === Number)
257
257
  return Ut.set(e, q);
258
258
  if (t === Date)
259
- return Lt.set(e, q);
260
- if (t === JSON)
261
259
  return Ct.set(e, q);
260
+ if (t === JSON)
261
+ return Bt.set(e, q);
262
262
  if (Ue(t))
263
263
  return t.set(e, q);
264
264
  try {
265
265
  return e.toString();
266
266
  } catch {
267
- throw new ie();
267
+ throw new fe();
268
268
  }
269
269
  }
270
- function Tr(e, t) {
270
+ function Jr(e, t) {
271
271
  return Ue(e) ? { ...e, defaultValue: t ?? e.defaultValue } : {
272
- get: (r) => fe(r, e),
273
- set: (r) => le(r, e),
272
+ get: (r) => le(r, e),
273
+ set: (r) => he(r, e),
274
274
  defaultValue: t
275
275
  };
276
276
  }
@@ -302,8 +302,8 @@ function Y(e, t) {
302
302
  }
303
303
  }
304
304
  }
305
- var Re = "beforeunload", Ir = "hashchange", Bt = "popstate";
306
- function st(e) {
305
+ var Re = "beforeunload", Qr = "hashchange", Nt = "popstate";
306
+ function ct(e) {
307
307
  e === void 0 && (e = {});
308
308
  var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
309
309
  function a() {
@@ -319,10 +319,10 @@ function st(e) {
319
319
  var s = null;
320
320
  function c() {
321
321
  if (s)
322
- p.call(s), s = null;
322
+ d.call(s), s = null;
323
323
  else {
324
324
  var g = V.Pop, l = a(), y = l[0], S = l[1];
325
- if (p.length)
325
+ if (d.length)
326
326
  if (y != null) {
327
327
  var A = f - y;
328
328
  A && (s = {
@@ -344,20 +344,20 @@ function st(e) {
344
344
  k(g);
345
345
  }
346
346
  }
347
- n.addEventListener(Bt, c);
348
- var i = V.Pop, u = a(), f = u[0], d = u[1], P = ne(), p = ne();
347
+ n.addEventListener(Nt, c);
348
+ var i = V.Pop, u = a(), f = u[0], h = u[1], P = ne(), d = ne();
349
349
  f == null && (f = 0, o.replaceState(G({}, o.state, {
350
350
  idx: f
351
351
  }), ""));
352
- function h(g) {
352
+ function p(g) {
353
353
  return typeof g == "string" ? g : X(g);
354
354
  }
355
355
  function v(g, l) {
356
356
  return l === void 0 && (l = null), re(G({
357
- pathname: d.pathname,
357
+ pathname: h.pathname,
358
358
  hash: "",
359
359
  search: ""
360
- }, typeof g == "string" ? he(g) : g, {
360
+ }, typeof g == "string" ? pe(g) : g, {
361
361
  state: l,
362
362
  key: Pe()
363
363
  }));
@@ -367,10 +367,10 @@ function st(e) {
367
367
  usr: g.state,
368
368
  key: g.key,
369
369
  idx: l
370
- }, h(g)];
370
+ }, p(g)];
371
371
  }
372
372
  function E(g, l, y) {
373
- return !p.length || (p.call({
373
+ return !d.length || (d.call({
374
374
  action: g,
375
375
  location: l,
376
376
  retry: y
@@ -379,9 +379,9 @@ function st(e) {
379
379
  function k(g) {
380
380
  i = g;
381
381
  var l = a();
382
- f = l[0], d = l[1], P.call({
382
+ f = l[0], h = l[1], P.call({
383
383
  action: i,
384
- location: d
384
+ location: h
385
385
  });
386
386
  }
387
387
  function m(g, l) {
@@ -412,14 +412,14 @@ function st(e) {
412
412
  function x(g) {
413
413
  o.go(g);
414
414
  }
415
- var U = {
415
+ var L = {
416
416
  get action() {
417
417
  return i;
418
418
  },
419
419
  get location() {
420
- return d;
420
+ return h;
421
421
  },
422
- createHref: h,
422
+ createHref: p,
423
423
  push: m,
424
424
  replace: w,
425
425
  go: x,
@@ -433,19 +433,19 @@ function st(e) {
433
433
  return P.push(l);
434
434
  },
435
435
  block: function(l) {
436
- var y = p.push(l);
437
- return p.length === 1 && n.addEventListener(Re, we), function() {
438
- y(), p.length || n.removeEventListener(Re, we);
436
+ var y = d.push(l);
437
+ return d.length === 1 && n.addEventListener(Re, we), function() {
438
+ y(), d.length || n.removeEventListener(Re, we);
439
439
  };
440
440
  }
441
441
  };
442
- return U;
442
+ return L;
443
443
  }
444
- function Fr(e) {
444
+ function zr(e) {
445
445
  e === void 0 && (e = {});
446
446
  var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
447
447
  function a() {
448
- var l = he(n.location.hash.substr(1)), y = l.pathname, S = y === void 0 ? "/" : y, A = l.search, C = A === void 0 ? "" : A, B = l.hash, H = B === void 0 ? "" : B, M = o.state || {};
448
+ var l = pe(n.location.hash.substr(1)), y = l.pathname, S = y === void 0 ? "/" : y, A = l.search, C = A === void 0 ? "" : A, B = l.hash, H = B === void 0 ? "" : B, M = o.state || {};
449
449
  return [M.idx, re({
450
450
  pathname: S,
451
451
  search: C,
@@ -457,19 +457,19 @@ function Fr(e) {
457
457
  var s = null;
458
458
  function c() {
459
459
  if (s)
460
- p.call(s), s = null;
460
+ d.call(s), s = null;
461
461
  else {
462
462
  var l = V.Pop, y = a(), S = y[0], A = y[1];
463
- if (p.length)
463
+ if (d.length)
464
464
  if (S != null) {
465
465
  var C = f - S;
466
466
  C && (s = {
467
467
  action: l,
468
468
  location: A,
469
469
  retry: function() {
470
- U(C * -1);
470
+ L(C * -1);
471
471
  }
472
- }, U(C));
472
+ }, L(C));
473
473
  } else
474
474
  process.env.NODE_ENV !== "production" && Y(
475
475
  !1,
@@ -482,15 +482,15 @@ function Fr(e) {
482
482
  m(l);
483
483
  }
484
484
  }
485
- n.addEventListener(Bt, c), n.addEventListener(Ir, function() {
485
+ n.addEventListener(Nt, c), n.addEventListener(Qr, function() {
486
486
  var l = a(), y = l[1];
487
- X(y) !== X(d) && c();
487
+ X(y) !== X(h) && c();
488
488
  });
489
- var i = V.Pop, u = a(), f = u[0], d = u[1], P = ne(), p = ne();
489
+ var i = V.Pop, u = a(), f = u[0], h = u[1], P = ne(), d = ne();
490
490
  f == null && (f = 0, o.replaceState(G({}, o.state, {
491
491
  idx: f
492
492
  }), ""));
493
- function h() {
493
+ function p() {
494
494
  var l = document.querySelector("base"), y = "";
495
495
  if (l && l.getAttribute("href")) {
496
496
  var S = n.location.href, A = S.indexOf("#");
@@ -499,14 +499,14 @@ function Fr(e) {
499
499
  return y;
500
500
  }
501
501
  function v(l) {
502
- return h() + "#" + (typeof l == "string" ? l : X(l));
502
+ return p() + "#" + (typeof l == "string" ? l : X(l));
503
503
  }
504
504
  function R(l, y) {
505
505
  return y === void 0 && (y = null), re(G({
506
- pathname: d.pathname,
506
+ pathname: h.pathname,
507
507
  hash: "",
508
508
  search: ""
509
- }, typeof l == "string" ? he(l) : l, {
509
+ }, typeof l == "string" ? pe(l) : l, {
510
510
  state: y,
511
511
  key: Pe()
512
512
  }));
@@ -519,7 +519,7 @@ function Fr(e) {
519
519
  }, v(l)];
520
520
  }
521
521
  function k(l, y, S) {
522
- return !p.length || (p.call({
522
+ return !d.length || (d.call({
523
523
  action: l,
524
524
  location: y,
525
525
  retry: S
@@ -528,9 +528,9 @@ function Fr(e) {
528
528
  function m(l) {
529
529
  i = l;
530
530
  var y = a();
531
- f = y[0], d = y[1], P.call({
531
+ f = y[0], h = y[1], P.call({
532
532
  action: i,
533
- location: d
533
+ location: h
534
534
  });
535
535
  }
536
536
  function w(l, y) {
@@ -558,7 +558,7 @@ function Fr(e) {
558
558
  o.replaceState(H, "", M), m(S);
559
559
  }
560
560
  }
561
- function U(l) {
561
+ function L(l) {
562
562
  o.go(l);
563
563
  }
564
564
  var g = {
@@ -566,31 +566,31 @@ function Fr(e) {
566
566
  return i;
567
567
  },
568
568
  get location() {
569
- return d;
569
+ return h;
570
570
  },
571
571
  createHref: v,
572
572
  push: w,
573
573
  replace: x,
574
- go: U,
574
+ go: L,
575
575
  back: function() {
576
- U(-1);
576
+ L(-1);
577
577
  },
578
578
  forward: function() {
579
- U(1);
579
+ L(1);
580
580
  },
581
581
  listen: function(y) {
582
582
  return P.push(y);
583
583
  },
584
584
  block: function(y) {
585
- var S = p.push(y);
586
- return p.length === 1 && n.addEventListener(Re, we), function() {
587
- S(), p.length || n.removeEventListener(Re, we);
585
+ var S = d.push(y);
586
+ return d.length === 1 && n.addEventListener(Re, we), function() {
587
+ S(), d.length || n.removeEventListener(Re, we);
588
588
  };
589
589
  }
590
590
  };
591
591
  return g;
592
592
  }
593
- function ct(e) {
593
+ function ut(e) {
594
594
  e === void 0 && (e = {});
595
595
  var t = e, r = t.initialEntries, n = r === void 0 ? ["/"] : r, o = t.initialIndex, a = n.map(function(m) {
596
596
  var w = re(G({
@@ -599,10 +599,10 @@ function ct(e) {
599
599
  hash: "",
600
600
  state: null,
601
601
  key: Pe()
602
- }, typeof m == "string" ? he(m) : m));
602
+ }, typeof m == "string" ? pe(m) : m));
603
603
  return process.env.NODE_ENV !== "production" && Y(w.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(m) + ")"), w;
604
- }), s = ut(o ?? a.length - 1, 0, a.length - 1), c = V.Pop, i = a[s], u = ne(), f = ne();
605
- function d(m) {
604
+ }), s = it(o ?? a.length - 1, 0, a.length - 1), c = V.Pop, i = a[s], u = ne(), f = ne();
605
+ function h(m) {
606
606
  return typeof m == "string" ? m : X(m);
607
607
  }
608
608
  function P(m, w) {
@@ -610,44 +610,44 @@ function ct(e) {
610
610
  pathname: i.pathname,
611
611
  search: "",
612
612
  hash: ""
613
- }, typeof m == "string" ? he(m) : m, {
613
+ }, typeof m == "string" ? pe(m) : m, {
614
614
  state: w,
615
615
  key: Pe()
616
616
  }));
617
617
  }
618
- function p(m, w, x) {
618
+ function d(m, w, x) {
619
619
  return !f.length || (f.call({
620
620
  action: m,
621
621
  location: w,
622
622
  retry: x
623
623
  }), !1);
624
624
  }
625
- function h(m, w) {
625
+ function p(m, w) {
626
626
  c = m, i = w, u.call({
627
627
  action: c,
628
628
  location: i
629
629
  });
630
630
  }
631
631
  function v(m, w) {
632
- var x = V.Push, U = P(m, w);
632
+ var x = V.Push, L = P(m, w);
633
633
  function g() {
634
634
  v(m, w);
635
635
  }
636
- process.env.NODE_ENV !== "production" && Y(i.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(m) + ")"), p(x, U, g) && (s += 1, a.splice(s, a.length, U), h(x, U));
636
+ process.env.NODE_ENV !== "production" && Y(i.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(m) + ")"), d(x, L, g) && (s += 1, a.splice(s, a.length, L), p(x, L));
637
637
  }
638
638
  function R(m, w) {
639
- var x = V.Replace, U = P(m, w);
639
+ var x = V.Replace, L = P(m, w);
640
640
  function g() {
641
641
  R(m, w);
642
642
  }
643
- process.env.NODE_ENV !== "production" && Y(i.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(m) + ")"), p(x, U, g) && (a[s] = U, h(x, U));
643
+ process.env.NODE_ENV !== "production" && Y(i.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(m) + ")"), d(x, L, g) && (a[s] = L, p(x, L));
644
644
  }
645
645
  function E(m) {
646
- var w = ut(s + m, 0, a.length - 1), x = V.Pop, U = a[w];
646
+ var w = it(s + m, 0, a.length - 1), x = V.Pop, L = a[w];
647
647
  function g() {
648
648
  E(m);
649
649
  }
650
- p(x, U, g) && (s = w, h(x, U));
650
+ d(x, L, g) && (s = w, p(x, L));
651
651
  }
652
652
  var k = {
653
653
  get index() {
@@ -659,7 +659,7 @@ function ct(e) {
659
659
  get location() {
660
660
  return i;
661
661
  },
662
- createHref: d,
662
+ createHref: h,
663
663
  push: v,
664
664
  replace: R,
665
665
  go: E,
@@ -678,7 +678,7 @@ function ct(e) {
678
678
  };
679
679
  return k;
680
680
  }
681
- function ut(e, t, r) {
681
+ function it(e, t, r) {
682
682
  return Math.min(Math.max(e, t), r);
683
683
  }
684
684
  function we(e) {
@@ -711,7 +711,7 @@ function X(e) {
711
711
  var t = e.pathname, r = t === void 0 ? "/" : t, n = e.search, o = n === void 0 ? "" : n, a = e.hash, s = a === void 0 ? "" : a;
712
712
  return o && o !== "?" && (r += o.charAt(0) === "?" ? o : "?" + o), s && s !== "#" && (r += s.charAt(0) === "#" ? s : "#" + s), r;
713
713
  }
714
- function he(e) {
714
+ function pe(e) {
715
715
  var t = {};
716
716
  if (e) {
717
717
  var r = e.indexOf("#");
@@ -721,18 +721,18 @@ function he(e) {
721
721
  }
722
722
  return t;
723
723
  }
724
- const Nt = Symbol();
725
- function Jr() {
726
- const e = ae(Nt);
724
+ const Vt = Symbol();
725
+ function Gr() {
726
+ const e = ae(Vt);
727
727
  if (!e)
728
- throw new pe();
728
+ throw new de();
729
729
  return e;
730
730
  }
731
- const Vt = Symbol("isRouterRouteSymbol");
732
- function Qr(e) {
733
- return typeof e == "object" && e !== null && Vt in e;
731
+ const Ht = Symbol("isRouterRouteSymbol");
732
+ function Kr(e) {
733
+ return typeof e == "object" && e !== null && Ht in e;
734
734
  }
735
- function zr(e, t) {
735
+ function Yr(e, t) {
736
736
  function r(R, E, k) {
737
737
  if (typeof R == "object") {
738
738
  const w = {
@@ -756,7 +756,7 @@ function zr(e, t) {
756
756
  }, a = (...R) => {
757
757
  const E = new URLSearchParams(e.query);
758
758
  E.delete(...R), r({}, { query: E });
759
- }, { id: s, matched: c, matches: i, name: u, hash: f, href: d } = pr(e), P = N({
759
+ }, { id: s, matched: c, matches: i, name: u, hash: f, href: h } = yr(e), P = N({
760
760
  get() {
761
761
  return new Proxy(e.params, {
762
762
  set(R, E, k) {
@@ -767,7 +767,7 @@ function zr(e, t) {
767
767
  set(R) {
768
768
  r(R);
769
769
  }
770
- }), p = N({
770
+ }), d = N({
771
771
  get() {
772
772
  return new Proxy(e.query, {
773
773
  get(R, E, k) {
@@ -787,7 +787,7 @@ function zr(e, t) {
787
787
  set(R) {
788
788
  r({}, { query: R });
789
789
  }
790
- }), h = N({
790
+ }), p = N({
791
791
  get() {
792
792
  return new Proxy(e.state, {
793
793
  set(R, E, k) {
@@ -803,24 +803,24 @@ function zr(e, t) {
803
803
  id: s,
804
804
  matched: c,
805
805
  matches: i,
806
- state: h,
807
- query: p,
806
+ state: p,
807
+ query: d,
808
808
  hash: f,
809
809
  params: P,
810
810
  name: u,
811
- href: d,
811
+ href: h,
812
812
  update: r,
813
- [Vt]: !0
813
+ [Ht]: !0
814
814
  });
815
815
  }
816
- const Ht = Symbol();
817
- function Gr(e, t) {
816
+ const jt = Symbol();
817
+ function Xr(e, t) {
818
818
  const r = xe({ ...e }), n = (s) => {
819
819
  Object.assign(r, {
820
- [Ht]: !1,
820
+ [jt]: !1,
821
821
  ...s
822
822
  });
823
- }, o = r, a = zr(o, t);
823
+ }, o = r, a = Yr(o, t);
824
824
  return {
825
825
  currentRoute: o,
826
826
  routerRoute: a,
@@ -828,9 +828,9 @@ function Gr(e, t) {
828
828
  };
829
829
  }
830
830
  function _(e) {
831
- return !e.startsWith("http") ? Yr(e) : Kr(e);
831
+ return !e.startsWith("http") ? en(e) : Zr(e);
832
832
  }
833
- function Kr(e) {
833
+ function Zr(e) {
834
834
  const { protocol: t, host: r, pathname: n, search: o, searchParams: a, hash: s } = new URL(e, e);
835
835
  return {
836
836
  protocol: t,
@@ -841,7 +841,7 @@ function Kr(e) {
841
841
  hash: s
842
842
  };
843
843
  }
844
- function Yr(e) {
844
+ function en(e) {
845
845
  const { pathname: t, search: r, searchParams: n, hash: o } = new URL(e, "https://localhost");
846
846
  return {
847
847
  pathname: t,
@@ -850,14 +850,14 @@ function Yr(e) {
850
850
  hash: o
851
851
  };
852
852
  }
853
- function Xr(e) {
853
+ function tn(e) {
854
854
  return (t) => {
855
855
  const { host: r } = _(t);
856
856
  return !(r === void 0 || r === e);
857
857
  };
858
858
  }
859
- function Zr({ mode: e, listener: t }) {
860
- const r = en(e), n = (i, u) => {
859
+ function rn({ mode: e, listener: t }) {
860
+ const r = nn(e), n = (i, u) => {
861
861
  if (u != null && u.replace) {
862
862
  r.replace(i, u.state);
863
863
  return;
@@ -880,16 +880,16 @@ function Zr({ mode: e, listener: t }) {
880
880
  }
881
881
  };
882
882
  }
883
- function en(e = "auto") {
883
+ function nn(e = "auto") {
884
884
  switch (e) {
885
885
  case "auto":
886
- return De() ? st() : ct();
886
+ return Ie() ? ct() : ut();
887
887
  case "browser":
888
- return st();
889
- case "memory":
890
888
  return ct();
889
+ case "memory":
890
+ return ut();
891
891
  case "hash":
892
- return Fr();
892
+ return zr();
893
893
  default:
894
894
  const t = e;
895
895
  throw new Error(`Switch is not exhaustive for mode: ${t}`);
@@ -897,122 +897,122 @@ function en(e = "auto") {
897
897
  }
898
898
  class Ee {
899
899
  constructor() {
900
- T(this, "onBeforeRouteEnter", /* @__PURE__ */ new Set());
901
- T(this, "onBeforeRouteUpdate", /* @__PURE__ */ new Set());
902
- T(this, "onBeforeRouteLeave", /* @__PURE__ */ new Set());
903
- T(this, "onAfterRouteEnter", /* @__PURE__ */ new Set());
904
- T(this, "onAfterRouteUpdate", /* @__PURE__ */ new Set());
905
- T(this, "onAfterRouteLeave", /* @__PURE__ */ new Set());
900
+ O(this, "onBeforeRouteEnter", /* @__PURE__ */ new Set());
901
+ O(this, "onBeforeRouteUpdate", /* @__PURE__ */ new Set());
902
+ O(this, "onBeforeRouteLeave", /* @__PURE__ */ new Set());
903
+ O(this, "onAfterRouteEnter", /* @__PURE__ */ new Set());
904
+ O(this, "onAfterRouteUpdate", /* @__PURE__ */ new Set());
905
+ O(this, "onAfterRouteLeave", /* @__PURE__ */ new Set());
906
906
  }
907
907
  }
908
- class jt extends Error {
908
+ class $t extends Error {
909
909
  constructor() {
910
910
  super("Uncaught CallbackContextAbortError");
911
- T(this, "response");
911
+ O(this, "response");
912
912
  this.response = { status: "ABORT" };
913
913
  }
914
914
  }
915
915
  class te extends Error {
916
916
  constructor(r) {
917
917
  super("Uncaught CallbackContextPushError");
918
- T(this, "response");
918
+ O(this, "response");
919
919
  this.response = { status: "PUSH", to: r };
920
920
  }
921
921
  }
922
922
  class be extends Error {
923
923
  constructor(r) {
924
924
  super("Uncaught CallbackContextRejectionError");
925
- T(this, "response");
925
+ O(this, "response");
926
926
  this.response = { status: "REJECT", type: r };
927
927
  }
928
928
  }
929
- function tn(e, t) {
929
+ function on(e, t) {
930
930
  const r = new Ee();
931
931
  return e.matches.forEach((n, o) => {
932
- n.onBeforeRouteEnter && Oe(e, t, o) && ee(n.onBeforeRouteEnter).forEach((a) => r.onBeforeRouteEnter.add(a)), n.onBeforeRouteUpdate && Ie(e, t, o) && ee(n.onBeforeRouteUpdate).forEach((a) => r.onBeforeRouteUpdate.add(a));
932
+ n.onBeforeRouteEnter && Oe(e, t, o) && ee(n.onBeforeRouteEnter).forEach((a) => r.onBeforeRouteEnter.add(a)), n.onBeforeRouteUpdate && Fe(e, t, o) && ee(n.onBeforeRouteUpdate).forEach((a) => r.onBeforeRouteUpdate.add(a));
933
933
  }), t.matches.forEach((n, o) => {
934
934
  n.onBeforeRouteLeave && Te(e, t, o) && ee(n.onBeforeRouteLeave).forEach((a) => r.onBeforeRouteLeave.add(a));
935
935
  }), r;
936
936
  }
937
- function rn(e, t) {
937
+ function an(e, t) {
938
938
  const r = new Ee();
939
939
  return e.matches.forEach((n, o) => {
940
- n.onAfterRouteEnter && Oe(e, t, o) && ee(n.onAfterRouteEnter).forEach((a) => r.onAfterRouteEnter.add(a)), n.onAfterRouteUpdate && Ie(e, t, o) && ee(n.onAfterRouteUpdate).forEach((a) => r.onAfterRouteUpdate.add(a));
940
+ n.onAfterRouteEnter && Oe(e, t, o) && ee(n.onAfterRouteEnter).forEach((a) => r.onAfterRouteEnter.add(a)), n.onAfterRouteUpdate && Fe(e, t, o) && ee(n.onAfterRouteUpdate).forEach((a) => r.onAfterRouteUpdate.add(a));
941
941
  }), t.matches.forEach((n, o) => {
942
942
  n.onAfterRouteLeave && Te(e, t, o) && ee(n.onAfterRouteLeave).forEach((a) => r.onAfterRouteLeave.add(a));
943
943
  }), r;
944
944
  }
945
- function $t() {
945
+ function qt() {
946
946
  return { reject: (o) => {
947
947
  throw new be(o);
948
948
  }, push: (...o) => {
949
949
  throw new te(o);
950
950
  }, replace: (o, a, s) => {
951
- if (I(o)) {
951
+ if (T(o)) {
952
952
  const u = a ?? {};
953
953
  throw new te([o, { ...u, replace: !0 }]);
954
954
  }
955
955
  const c = a, i = s ?? {};
956
956
  throw new te([o, c, { ...i, replace: !0 }]);
957
957
  }, abort: () => {
958
- throw new jt();
958
+ throw new $t();
959
959
  } };
960
960
  }
961
- function nn() {
962
- const { reject: e, push: t, replace: r, abort: n } = $t();
961
+ function sn() {
962
+ const { reject: e, push: t, replace: r, abort: n } = qt();
963
963
  async function o({ to: s, from: c, hooks: i }) {
964
- const { global: u, component: f } = i, d = tn(s, c), P = [
964
+ const { global: u, component: f } = i, h = on(s, c), P = [
965
965
  ...u.onBeforeRouteEnter,
966
- ...d.onBeforeRouteEnter,
966
+ ...h.onBeforeRouteEnter,
967
967
  ...u.onBeforeRouteUpdate,
968
- ...d.onBeforeRouteUpdate,
968
+ ...h.onBeforeRouteUpdate,
969
969
  ...f.onBeforeRouteUpdate,
970
970
  ...u.onBeforeRouteLeave,
971
- ...d.onBeforeRouteLeave,
971
+ ...h.onBeforeRouteLeave,
972
972
  ...f.onBeforeRouteLeave
973
973
  ];
974
974
  try {
975
- const p = P.map((h) => h(s, {
975
+ const d = P.map((p) => p(s, {
976
976
  from: c,
977
977
  reject: e,
978
978
  push: t,
979
979
  replace: r,
980
980
  abort: n
981
981
  }));
982
- await Promise.all(p);
983
- } catch (p) {
984
- if (p instanceof te || p instanceof be || p instanceof jt)
985
- return p.response;
986
- throw p;
982
+ await Promise.all(d);
983
+ } catch (d) {
984
+ if (d instanceof te || d instanceof be || d instanceof $t)
985
+ return d.response;
986
+ throw d;
987
987
  }
988
988
  return {
989
989
  status: "SUCCESS"
990
990
  };
991
991
  }
992
992
  async function a({ to: s, from: c, hooks: i }) {
993
- const { global: u, component: f } = i, d = rn(s, c), P = [
993
+ const { global: u, component: f } = i, h = an(s, c), P = [
994
994
  ...f.onAfterRouteLeave,
995
- ...d.onAfterRouteLeave,
995
+ ...h.onAfterRouteLeave,
996
996
  ...u.onAfterRouteLeave,
997
997
  ...f.onAfterRouteUpdate,
998
- ...d.onAfterRouteUpdate,
998
+ ...h.onAfterRouteUpdate,
999
999
  ...u.onAfterRouteUpdate,
1000
1000
  ...f.onAfterRouteEnter,
1001
- ...d.onAfterRouteEnter,
1001
+ ...h.onAfterRouteEnter,
1002
1002
  ...u.onAfterRouteEnter
1003
1003
  ];
1004
1004
  try {
1005
- const p = P.map((h) => h(s, {
1005
+ const d = P.map((p) => p(s, {
1006
1006
  from: c,
1007
1007
  reject: e,
1008
1008
  push: t,
1009
1009
  replace: r
1010
1010
  }));
1011
- await Promise.all(p);
1012
- } catch (p) {
1013
- if (p instanceof te || p instanceof be)
1014
- return p.response;
1015
- throw p;
1011
+ await Promise.all(d);
1012
+ } catch (d) {
1013
+ if (d instanceof te || d instanceof be)
1014
+ return d.response;
1015
+ throw d;
1016
1016
  }
1017
1017
  return {
1018
1018
  status: "SUCCESS"
@@ -1031,18 +1031,18 @@ const Oe = (e, t, r) => {
1031
1031
  var a;
1032
1032
  const n = e.matches, o = (t == null ? void 0 : t.matches) ?? [];
1033
1033
  return n.length < r || n[r].id !== ((a = o[r]) == null ? void 0 : a.id);
1034
- }, Ie = (e, t, r) => {
1034
+ }, Fe = (e, t, r) => {
1035
1035
  var n;
1036
1036
  return e.matches[r].id === ((n = t == null ? void 0 : t.matches[r]) == null ? void 0 : n.id);
1037
1037
  };
1038
- function it(e) {
1038
+ function ft(e) {
1039
1039
  switch (e) {
1040
1040
  case "onBeforeRouteEnter":
1041
1041
  case "onAfterRouteEnter":
1042
1042
  return Oe;
1043
1043
  case "onBeforeRouteUpdate":
1044
1044
  case "onAfterRouteUpdate":
1045
- return Ie;
1045
+ return Fe;
1046
1046
  case "onBeforeRouteLeave":
1047
1047
  case "onAfterRouteLeave":
1048
1048
  return Te;
@@ -1050,30 +1050,30 @@ function it(e) {
1050
1050
  throw new Error(`Switch is not exhaustive for lifecycle: ${e}`);
1051
1051
  }
1052
1052
  }
1053
- function on() {
1053
+ function cn() {
1054
1054
  const e = {
1055
1055
  global: new Ee(),
1056
1056
  component: new Ee()
1057
1057
  };
1058
1058
  function t({ lifecycle: n, timing: o, depth: a, hook: s }) {
1059
- const c = it(n), i = e[o][n], u = (f, d) => {
1060
- if (c(f, d.from, a))
1061
- return s(f, d);
1059
+ const c = ft(n), i = e[o][n], u = (f, h) => {
1060
+ if (c(f, h.from, a))
1061
+ return s(f, h);
1062
1062
  };
1063
1063
  return i.add(u), () => i.delete(u);
1064
1064
  }
1065
1065
  function r({ lifecycle: n, timing: o, depth: a, hook: s }) {
1066
- const c = it(n), i = e[o][n], u = (f, d) => {
1067
- if (c(f, d.from, a))
1068
- return s(f, d);
1066
+ const c = ft(n), i = e[o][n], u = (f, h) => {
1067
+ if (c(f, h.from, a))
1068
+ return s(f, h);
1069
1069
  };
1070
1070
  return i.add(u), () => i.delete(u);
1071
1071
  }
1072
1072
  return { ...e, addBeforeRouteHook: t, addAfterRouteHook: r };
1073
1073
  }
1074
- const qt = Symbol();
1075
- function an() {
1076
- const e = on();
1074
+ const _t = Symbol();
1075
+ function un() {
1076
+ const e = cn();
1077
1077
  return {
1078
1078
  onBeforeRouteEnter: (c) => e.addBeforeRouteHook({ lifecycle: "onBeforeRouteEnter", hook: c, timing: "global", depth: 0 }),
1079
1079
  onBeforeRouteUpdate: (c) => e.addBeforeRouteHook({ lifecycle: "onBeforeRouteUpdate", hook: c, timing: "global", depth: 0 }),
@@ -1084,13 +1084,13 @@ function an() {
1084
1084
  hooks: e
1085
1085
  };
1086
1086
  }
1087
- function sn(e) {
1087
+ function fn(e) {
1088
1088
  return se(() => () => Z("h1", e), {
1089
1089
  name: e,
1090
1090
  props: []
1091
1091
  });
1092
1092
  }
1093
- function Fe(e) {
1093
+ function Je(e) {
1094
1094
  const t = new URLSearchParams(e);
1095
1095
  return {
1096
1096
  get: (...r) => t.get(...r),
@@ -1119,22 +1119,22 @@ function Fe(e) {
1119
1119
  [Symbol.iterator]: () => t[Symbol.iterator]()
1120
1120
  };
1121
1121
  }
1122
- function _t() {
1122
+ function Mt() {
1123
1123
  let e = 0;
1124
1124
  return () => (++e).toString();
1125
1125
  }
1126
- const Je = _t();
1127
- function cn({
1126
+ const Qe = Mt();
1127
+ function ln({
1128
1128
  rejections: e
1129
1129
  }) {
1130
1130
  const t = (a) => {
1131
1131
  const s = {
1132
1132
  ...e
1133
1133
  };
1134
- return ye(s[a] ?? sn(a));
1134
+ return ge(s[a] ?? fn(a));
1135
1135
  }, r = (a) => {
1136
- const s = ye(t(a)), c = {
1137
- id: Je(),
1136
+ const s = ge(t(a)), c = {
1137
+ id: Qe(),
1138
1138
  component: s,
1139
1139
  meta: {},
1140
1140
  state: {}
@@ -1144,12 +1144,12 @@ function cn({
1144
1144
  matched: c,
1145
1145
  matches: [c],
1146
1146
  name: a,
1147
- query: Fe(""),
1147
+ query: Je(""),
1148
1148
  params: {},
1149
1149
  state: {},
1150
1150
  href: "/",
1151
1151
  hash: "",
1152
- [Ht]: !0
1152
+ [jt]: !0
1153
1153
  };
1154
1154
  }, n = (a) => {
1155
1155
  if (!a) {
@@ -1158,100 +1158,100 @@ function cn({
1158
1158
  }
1159
1159
  const s = t(a);
1160
1160
  o.value = { type: a, component: s };
1161
- }, o = qe(null);
1161
+ }, o = _e(null);
1162
1162
  return {
1163
1163
  setRejection: n,
1164
1164
  rejection: o,
1165
1165
  getRejectionRoute: r
1166
1166
  };
1167
1167
  }
1168
- class un extends Error {
1168
+ class hn extends Error {
1169
1169
  constructor() {
1170
1170
  super("initialUrl must be set if window.location is unavailable");
1171
1171
  }
1172
1172
  }
1173
- function fn(e) {
1173
+ function pn(e) {
1174
1174
  if (e)
1175
1175
  return e;
1176
- if (De())
1176
+ if (Ie())
1177
1177
  return window.location.toString();
1178
- throw new un();
1178
+ throw new hn();
1179
1179
  }
1180
- function Qe(e) {
1180
+ function ze(e) {
1181
1181
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1182
1182
  }
1183
- function ln(e, t) {
1183
+ function dn(e, t) {
1184
1184
  const r = Array.from(e.matchAll(t));
1185
1185
  if (r.length === 0)
1186
1186
  return [e];
1187
1187
  let n = 0;
1188
1188
  const o = r.reduce((s, c) => {
1189
- const i = Qe(e.slice(n, c.index));
1189
+ const i = ze(e.slice(n, c.index));
1190
1190
  i.length && s.push(i);
1191
1191
  const [u] = c;
1192
1192
  return s.push(u), n = c.index + u.length, s;
1193
1193
  }, []), a = e.slice(n);
1194
1194
  return a && o.push(a), o;
1195
1195
  }
1196
- function hn(e) {
1197
- const t = Mt(e.path.value);
1196
+ function mn(e) {
1197
+ const t = Wt(e.path.value);
1198
1198
  return new RegExp(`^${t}$`, "i");
1199
1199
  }
1200
- function pn(e) {
1200
+ function yn(e) {
1201
1201
  const t = new URLSearchParams(e.query.value);
1202
- return Array.from(t.entries()).filter(([, r]) => !He(r)).map(([r, n]) => {
1203
- const o = Mt(n);
1204
- return new RegExp(`${Qe(r)}=${o}(&|$)`, "i");
1202
+ return Array.from(t.entries()).filter(([, r]) => !je(r)).map(([r, n]) => {
1203
+ const o = Wt(n);
1204
+ return new RegExp(`${ze(r)}=${o}(&|$)`, "i");
1205
1205
  });
1206
1206
  }
1207
- function Mt(e) {
1208
- return ln(e, new RegExp(dn, "g")).map((t) => t.startsWith(J) ? Wt(t) : Qe(t)).join("");
1209
- }
1210
1207
  function Wt(e) {
1208
+ return dn(e, new RegExp(gn, "g")).map((t) => t.startsWith(J) ? Dt(t) : ze(t)).join("");
1209
+ }
1210
+ function Dt(e) {
1211
1211
  return [
1212
- mn,
1213
- yn
1212
+ vn,
1213
+ Rn
1214
1214
  ].reduce((t, r) => r(t), e);
1215
1215
  }
1216
- const dn = `\\${J}\\??([\\w-_]+)\\${K}`, ze = `\\${J}\\?([\\w-_]+)\\${K}`, Dt = `\\${J}([\\w-_]+)\\${K}`;
1217
- function mn(e) {
1218
- return e.replace(new RegExp(ze, "g"), ".*");
1216
+ const gn = `\\${J}\\??([\\w-_]+)\\${K}`, Ge = `\\${J}\\?([\\w-_]+)\\${K}`, It = `\\${J}([\\w-_]+)\\${K}`;
1217
+ function vn(e) {
1218
+ return e.replace(new RegExp(Ge, "g"), ".*");
1219
1219
  }
1220
- function He(e) {
1221
- return new RegExp(ze, "g").test(e);
1220
+ function je(e) {
1221
+ return new RegExp(Ge, "g").test(e);
1222
1222
  }
1223
- function yn(e) {
1224
- return e.replace(new RegExp(Dt, "g"), ".+");
1223
+ function Rn(e) {
1224
+ return e.replace(new RegExp(It, "g"), ".+");
1225
1225
  }
1226
- function Le(e) {
1227
- const [t] = Se(e, new RegExp(ze, "g")), [r] = Se(e, new RegExp(Dt, "g"));
1226
+ function Ce(e) {
1227
+ const [t] = Se(e, new RegExp(Ge, "g")), [r] = Se(e, new RegExp(It, "g"));
1228
1228
  return t ?? r;
1229
1229
  }
1230
1230
  function Se(e, t) {
1231
1231
  return Array.from(e.matchAll(t)).flatMap(([, ...n]) => n.map((o) => F(o) ? o : ""));
1232
1232
  }
1233
- function Ge(e, t) {
1233
+ function Ke(e, t) {
1234
1234
  const r = new RegExp(`\\${J}(\\??[\\w-_]+)\\${K}`, "g");
1235
1235
  return Array.from(e.matchAll(r)).reduce((o, [a, s]) => {
1236
- const c = Le(a);
1236
+ const c = Ce(a);
1237
1237
  if (!c)
1238
1238
  return o;
1239
- const i = Dr(t, c);
1239
+ const i = Tr(t, c);
1240
1240
  return ce([c], o), o[s] = i, o;
1241
1241
  }, {});
1242
1242
  }
1243
- function je(e, t) {
1243
+ function $e(e, t) {
1244
1244
  return {
1245
1245
  value: e,
1246
- params: Ge(e, t)
1246
+ params: Ke(e, t)
1247
1247
  };
1248
1248
  }
1249
- function gn(e, t) {
1249
+ function wn(e, t) {
1250
1250
  return F(t) ? e.map((r) => {
1251
1251
  const n = `${t}${r.path.value}`;
1252
1252
  return {
1253
1253
  ...r,
1254
- path: je(n, r.path.params)
1254
+ path: $e(n, r.path.params)
1255
1255
  };
1256
1256
  }) : e;
1257
1257
  }
@@ -1259,37 +1259,37 @@ function Ot(e) {
1259
1259
  return !!e && typeof e == "object";
1260
1260
  }
1261
1261
  const ke = !0;
1262
- function vn(e, t, r) {
1262
+ function Pn(e, t, r) {
1263
1263
  if (Ot(e) && t in e) {
1264
1264
  const n = e[t];
1265
- return typeof n == "string" ? fe(n, r, ke) : n;
1265
+ return typeof n == "string" ? le(n, r, ke) : n;
1266
1266
  }
1267
- return fe(void 0, r, ke);
1267
+ return le(void 0, r, ke);
1268
1268
  }
1269
1269
  function Tt(e, t) {
1270
1270
  const r = {};
1271
1271
  for (const [n, o] of Object.entries(e)) {
1272
- const a = vn(t, n, o);
1272
+ const a = Pn(t, n, o);
1273
1273
  r[n] = a;
1274
1274
  }
1275
1275
  return r;
1276
1276
  }
1277
- function Rn(e, t, r) {
1277
+ function En(e, t, r) {
1278
1278
  if (Ot(e) && t in e) {
1279
1279
  const n = e[t];
1280
- return le(n, r, ke);
1280
+ return he(n, r, ke);
1281
1281
  }
1282
- return le(void 0, r, ke);
1282
+ return he(void 0, r, ke);
1283
1283
  }
1284
- const ft = (e, t) => {
1284
+ const lt = (e, t) => {
1285
1285
  const r = {};
1286
1286
  for (const [n, o] of Object.entries(e)) {
1287
- const a = Rn(t, n, o);
1287
+ const a = En(t, n, o);
1288
1288
  r[n] = a;
1289
1289
  }
1290
1290
  return r;
1291
1291
  };
1292
- class wn extends Error {
1292
+ class bn extends Error {
1293
1293
  /**
1294
1294
  * Constructs a new DuplicateNamesError instance with a message indicating the problematic name.
1295
1295
  * @param name - The name of the name that was duplicated.
@@ -1298,14 +1298,14 @@ class wn extends Error {
1298
1298
  super(`Invalid Name "${t}": Router does not support multiple routes with the same name. All name names must be unique.`);
1299
1299
  }
1300
1300
  }
1301
- function Pn(e) {
1301
+ function Sn(e) {
1302
1302
  const t = e.map(({ name: r }) => r);
1303
1303
  for (const r of t)
1304
- if (St(t, r) > 1)
1305
- throw new wn(r);
1304
+ if (kt(t, r) > 1)
1305
+ throw new bn(r);
1306
1306
  }
1307
- function En() {
1308
- const e = xe(/* @__PURE__ */ new Map()), t = De() ? s() : null, r = (c) => {
1307
+ function kn() {
1308
+ const e = xe(/* @__PURE__ */ new Map()), t = Ie() ? s() : null, r = (c) => {
1309
1309
  e.set(c, !1), t == null || t.observe(c);
1310
1310
  }, n = (c) => {
1311
1311
  e.delete(c), t == null || t.unobserve(c);
@@ -1326,59 +1326,61 @@ function En() {
1326
1326
  isElementVisible: a
1327
1327
  };
1328
1328
  }
1329
- const It = Symbol("visibilityObserver");
1330
- function bn(e) {
1331
- const t = ae(It);
1329
+ const Ft = Symbol("visibilityObserver");
1330
+ function An(e) {
1331
+ const t = ae(Ft);
1332
1332
  if (!t)
1333
- throw new pe();
1334
- return ge(e, (n, o) => {
1333
+ throw new de();
1334
+ return ie(e, (n, o) => {
1335
1335
  n && t.observe(n), o && t.unobserve(o);
1336
- }, { immediate: !0 }), {
1336
+ }, { immediate: !0 }), Le(() => {
1337
+ e.value && t.unobserve(e.value);
1338
+ }), {
1337
1339
  isElementVisible: N(() => e.value ? t.isElementVisible(e.value) : !1)
1338
1340
  };
1339
1341
  }
1340
- class Sn extends Error {
1342
+ class xn extends Error {
1341
1343
  constructor(t) {
1342
1344
  super(`Route not found: "${t}"`);
1343
1345
  }
1344
1346
  }
1345
- function Ft(e, t, r) {
1346
- const n = Qt(t, r), [o] = Se(e, n);
1347
+ function Jt(e, t, r) {
1348
+ const n = zt(t, r), [o] = Se(e, n);
1347
1349
  return o;
1348
1350
  }
1349
- function Jt(e, t) {
1351
+ function Qt(e, t) {
1350
1352
  if (!t)
1351
1353
  return e;
1352
- const { name: r, param: n, value: o } = t, a = Qt(e, r);
1353
- return Se(e, a).reduce((c, i) => i === void 0 ? c : c.replace(i, () => le(o, n, r.startsWith("?"))), e);
1354
+ const { name: r, param: n, value: o } = t, a = zt(e, r);
1355
+ return Se(e, a).reduce((c, i) => i === void 0 ? c : c.replace(i, () => he(o, n, r.startsWith("?"))), e);
1354
1356
  }
1355
- function Qt(e, t) {
1357
+ function zt(e, t) {
1356
1358
  const r = [
1357
- kn,
1358
- An,
1359
- Wt
1359
+ Ln,
1360
+ Un,
1361
+ Dt
1360
1362
  ].reduce((n, o) => o(n, t), e);
1361
1363
  return new RegExp(r, "g");
1362
1364
  }
1363
- function kn(e, t) {
1365
+ function Ln(e, t) {
1364
1366
  if (!t.startsWith("?"))
1365
1367
  return e;
1366
1368
  const r = new RegExp(`\\${J}\\${t}\\${K}`, "g");
1367
1369
  return e.replace(r, "(.*)");
1368
1370
  }
1369
- function An(e, t) {
1371
+ function Un(e, t) {
1370
1372
  if (t.startsWith("?"))
1371
1373
  return e;
1372
1374
  const r = new RegExp(`\\${J}${t}\\${K}`, "g");
1373
1375
  return e.replace(r, "(.+)");
1374
1376
  }
1375
- function zt({ protocol: e, host: t, pathname: r, search: n, searchParams: o, hash: a }) {
1377
+ function Gt({ protocol: e, host: t, pathname: r, search: n, searchParams: o, hash: a }) {
1376
1378
  const s = new URL("https://localhost");
1377
1379
  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);
1378
1380
  const c = s.toString().replace(/^https:\/\/localhost\/*/, "/");
1379
- return Et(c);
1381
+ return bt(c);
1380
1382
  }
1381
- function Ke(...e) {
1383
+ function Ye(...e) {
1382
1384
  const t = new URLSearchParams();
1383
1385
  for (const r of e) {
1384
1386
  const n = new URLSearchParams(r);
@@ -1387,68 +1389,68 @@ function Ke(...e) {
1387
1389
  }
1388
1390
  return t;
1389
1391
  }
1390
- function xn(e, t = {}) {
1391
- const { params: r = {}, query: n } = t, o = Cn(e.query, r), a = Ke(o, n), s = Ln(e.path, r), c = ve(e.hash.value ?? t.hash).value, i = Un(e.host, r), { protocol: u, host: f } = _(i);
1392
- return zt({ protocol: u, host: f, pathname: s, searchParams: a, hash: c });
1392
+ function Cn(e, t = {}) {
1393
+ const { params: r = {}, query: n } = t, o = Vn(e.query, r), a = Ye(o, n), s = Nn(e.path, r), c = ve(e.hash.value ?? t.hash).value, i = Bn(e.host, r), { protocol: u, host: f } = _(i);
1394
+ return Gt({ protocol: u, host: f, pathname: s, searchParams: a, hash: c });
1393
1395
  }
1394
- function Un(e, t) {
1396
+ function Bn(e, t) {
1395
1397
  const r = e.value && !e.value.startsWith("http") ? `https://${e.value}` : e.value;
1396
1398
  return Object.entries(e.params).reduce((n, [o, a]) => {
1397
- const s = Le(`${J}${o}${K}`);
1398
- return s ? Jt(n, { name: o, param: a, value: t[s] }) : n;
1399
+ const s = Ce(`${J}${o}${K}`);
1400
+ return s ? Qt(n, { name: o, param: a, value: t[s] }) : n;
1399
1401
  }, r);
1400
1402
  }
1401
- function Ln(e, t) {
1403
+ function Nn(e, t) {
1402
1404
  return Object.entries(e.params).reduce((r, [n, o]) => {
1403
- const a = Le(`${J}${n}${K}`);
1404
- return a ? Jt(r, { name: n, param: o, value: t[a] }) : r;
1405
+ const a = Ce(`${J}${n}${K}`);
1406
+ return a ? Qt(r, { name: n, param: o, value: t[a] }) : r;
1405
1407
  }, e.value);
1406
1408
  }
1407
- function Cn(e, t) {
1409
+ function Vn(e, t) {
1408
1410
  const r = new URLSearchParams(e.value);
1409
1411
  if (!e.value)
1410
1412
  return r;
1411
1413
  for (const [n, o] of Array.from(r.entries())) {
1412
- const a = Le(o);
1414
+ const a = Ce(o);
1413
1415
  if (!a)
1414
1416
  continue;
1415
- const c = le(t[a], e.params[a], He(o)), i = t[a] === void 0 && c === "";
1416
- He(o) && i ? r.delete(n, o) : r.set(n, c);
1417
+ const c = he(t[a], e.params[a], je(o)), i = t[a] === void 0 && c === "";
1418
+ je(o) && i ? r.delete(n, o) : r.set(n, c);
1417
1419
  }
1418
1420
  return r;
1419
1421
  }
1420
- const Bn = (e, t) => {
1422
+ const Hn = (e, t) => {
1421
1423
  try {
1422
- Ye(e, t);
1424
+ Xe(e, t);
1423
1425
  } catch {
1424
1426
  return !1;
1425
1427
  }
1426
1428
  return !0;
1427
- }, Ye = (e, t) => {
1429
+ }, Xe = (e, t) => {
1428
1430
  const { pathname: r, search: n } = _(t);
1429
1431
  return {
1430
- ...Nn(e.path, r),
1431
- ...Vn(e.query, n)
1432
+ ...jn(e.path, r),
1433
+ ...$n(e.query, n)
1432
1434
  };
1433
1435
  };
1434
- function Nn(e, t) {
1436
+ function jn(e, t) {
1435
1437
  const r = {}, n = decodeURIComponent(t);
1436
1438
  for (const [o, a] of Object.entries(e.params)) {
1437
- const s = o.startsWith("?"), c = s ? o.slice(1) : o, i = Ft(n, e.value, o), u = fe(i, a, s);
1439
+ const s = o.startsWith("?"), c = s ? o.slice(1) : o, i = Jt(n, e.value, o), u = le(i, a, s);
1438
1440
  r[c] = u;
1439
1441
  }
1440
1442
  return r;
1441
1443
  }
1442
- function Vn(e, t) {
1444
+ function $n(e, t) {
1443
1445
  const r = {}, n = new URLSearchParams(t);
1444
1446
  for (const [o, a] of Object.entries(e.params)) {
1445
- const s = o.startsWith("?"), c = s ? o.slice(1) : o, i = n.get(c) ?? void 0, u = fe(i, a, s);
1447
+ const s = o.startsWith("?"), c = s ? o.slice(1) : o, i = n.get(c) ?? void 0, u = le(i, a, s);
1446
1448
  r[c] = u;
1447
1449
  }
1448
1450
  return r;
1449
1451
  }
1450
- function Hn(e, t = {}, r = {}) {
1451
- const n = xn(e, {
1452
+ function qn(e, t = {}, r = {}) {
1453
+ const n = Cn(e, {
1452
1454
  params: t,
1453
1455
  query: r.query,
1454
1456
  hash: r.hash
@@ -1458,51 +1460,51 @@ function Hn(e, t = {}, r = {}) {
1458
1460
  matched: e.matched,
1459
1461
  matches: e.matches,
1460
1462
  name: e.name,
1461
- query: Fe(o),
1462
- params: Ye(e, n),
1463
+ query: Je(o),
1464
+ params: Xe(e, n),
1463
1465
  state: Tt(e.state, r.state),
1464
1466
  hash: a,
1465
1467
  href: n
1466
1468
  };
1467
1469
  }
1468
- const jn = (e) => "name" in e.matched && !!e.matched.name, $n = (e, t) => {
1470
+ const _n = (e) => "name" in e.matched && !!e.matched.name, Mn = (e, t) => {
1469
1471
  const { pathname: r } = _(t);
1470
- return hn(e).test(r);
1471
- }, qn = (e, t) => {
1472
+ return mn(e).test(r);
1473
+ }, Wn = (e, t) => {
1472
1474
  const { search: r } = _(t);
1473
- return pn(e).every((o) => o.test(r));
1474
- }, $e = (e, t) => {
1475
+ return yn(e).every((o) => o.test(r));
1476
+ }, qe = (e, t) => {
1475
1477
  const { hash: r } = _(t), { value: n } = e.hash;
1476
1478
  return n === void 0 || `#${n.toLowerCase()}` === r.toLowerCase();
1477
1479
  };
1478
- function _n(e) {
1480
+ function Dn(e) {
1479
1481
  const { searchParams: t, pathname: r } = _(e), n = -1, o = 1;
1480
1482
  return (a, s) => {
1481
- const c = ht(a, t), i = lt(a, r), u = ht(s, t), f = lt(s, r);
1482
- return a.depth > s.depth ? n : a.depth < s.depth ? o : c + i > u + f ? n : c + i < u + f ? o : $e(a, e) ? n : $e(s, e) ? o : 0;
1483
+ const c = pt(a, t), i = ht(a, r), u = pt(s, t), f = ht(s, r);
1484
+ return a.depth > s.depth ? n : a.depth < s.depth ? o : c + i > u + f ? n : c + i < u + f ? o : qe(a, e) ? n : qe(s, e) ? o : 0;
1483
1485
  };
1484
1486
  }
1485
- function lt(e, t) {
1486
- const r = Object.keys(e.path.params).filter((o) => o.startsWith("?")).map((o) => o), n = r.filter((o) => Ft(t, e.path.value, o) === void 0);
1487
+ function ht(e, t) {
1488
+ const r = Object.keys(e.path.params).filter((o) => o.startsWith("?")).map((o) => o), n = r.filter((o) => Jt(t, e.path.value, o) === void 0);
1487
1489
  return r.length - n.length;
1488
1490
  }
1489
- function ht(e, t) {
1491
+ function pt(e, t) {
1490
1492
  const r = new URLSearchParams(t), n = new URLSearchParams(e.query.value), o = Array.from(n.keys()), a = o.filter((s) => !r.has(s));
1491
1493
  return o.length - a.length;
1492
1494
  }
1493
- const Mn = [
1494
- jn,
1495
- $n,
1496
- qn,
1497
- $e,
1498
- Bn
1495
+ const In = [
1496
+ _n,
1497
+ Mn,
1498
+ Wn,
1499
+ qe,
1500
+ Hn
1499
1501
  ];
1500
- function Wn(e, t) {
1501
- const r = _n(t);
1502
- return e.filter((n) => Mn.every((o) => o(n, t))).sort(r);
1502
+ function On(e, t) {
1503
+ const r = Dn(t);
1504
+ return e.filter((n) => In.every((o) => o(n, t))).sort(r);
1503
1505
  }
1504
- function Dn(e, t, r) {
1505
- const n = Wn(e, t);
1506
+ function Tn(e, t, r) {
1507
+ const n = On(e, t);
1506
1508
  if (!n.length)
1507
1509
  return;
1508
1510
  const [o] = n, { searchParams: a, hash: s } = _(t);
@@ -1511,73 +1513,73 @@ function Dn(e, t, r) {
1511
1513
  matched: o.matched,
1512
1514
  matches: o.matches,
1513
1515
  name: o.name,
1514
- query: Fe(a),
1515
- params: Ye(o, t),
1516
+ query: Je(a),
1517
+ params: Xe(o, t),
1516
1518
  state: Tt(o.state, r),
1517
1519
  hash: s,
1518
- href: Et(t)
1520
+ href: bt(t)
1519
1521
  };
1520
1522
  }
1521
- function pt(e, t) {
1523
+ function dt(e, t) {
1522
1524
  const r = typeof e == "string" ? _(e) : e, n = typeof t == "string" ? _(t) : t, o = r.searchParams ?? new URLSearchParams(r.search), a = n.searchParams ?? new URLSearchParams(n.search);
1523
- return zt({
1525
+ return Gt({
1524
1526
  protocol: F(n.protocol) ? n.protocol : r.protocol,
1525
1527
  host: F(n.host) ? n.host : r.host,
1526
1528
  pathname: F(n.pathname) ? n.pathname : r.pathname,
1527
- searchParams: Ke(a, o),
1529
+ searchParams: Ye(a, o),
1528
1530
  hash: F(n.hash) ? n.hash : r.hash
1529
1531
  });
1530
1532
  }
1531
- function lo(e, t) {
1532
- const r = Ur(e) ? e.flat() : e, n = gn(r, t == null ? void 0 : t.base);
1533
- Pn(n);
1534
- const o = _t(), a = Gn(), s = En(), c = Zr({
1533
+ function mo(e, t) {
1534
+ const r = Br(e) ? e.flat() : e, n = wn(r, t == null ? void 0 : t.base);
1535
+ Sn(n);
1536
+ const o = Mt(), a = Xn(), s = kn(), c = rn({
1535
1537
  mode: t == null ? void 0 : t.historyMode,
1536
1538
  listener: ({ location: b }) => {
1537
- const L = X(b);
1538
- k(L, { state: b.state, replace: !0 });
1539
+ const U = X(b);
1540
+ k(U, { state: b.state, replace: !0 });
1539
1541
  }
1540
- }), { runBeforeRouteHooks: i, runAfterRouteHooks: u } = nn(), {
1542
+ }), { runBeforeRouteHooks: i, runAfterRouteHooks: u } = sn(), {
1541
1543
  hooks: f,
1542
- onBeforeRouteEnter: d,
1544
+ onBeforeRouteEnter: h,
1543
1545
  onAfterRouteUpdate: P,
1544
- onBeforeRouteLeave: p,
1545
- onAfterRouteEnter: h,
1546
+ onBeforeRouteLeave: d,
1547
+ onAfterRouteEnter: p,
1546
1548
  onBeforeRouteUpdate: v,
1547
1549
  onAfterRouteLeave: R
1548
- } = an();
1549
- function E(b, L = {}) {
1550
- return Dn(n, b, L.state);
1550
+ } = un();
1551
+ function E(b, U = {}) {
1552
+ return Tn(n, b, U.state);
1551
1553
  }
1552
- async function k(b, L = {}) {
1554
+ async function k(b, U = {}) {
1553
1555
  const Q = o();
1554
- if (c.stopListening(), rt(b)) {
1555
- c.update(b, L);
1556
+ if (c.stopListening(), nt(b)) {
1557
+ c.update(b, U);
1556
1558
  return;
1557
1559
  }
1558
- const W = E(b, L) ?? y("NotFound"), j = { ...A }, z = await i({ to: W, from: j, hooks: f });
1560
+ const W = E(b, U) ?? y("NotFound"), $ = { ...A }, z = await i({ to: W, from: $, hooks: f });
1559
1561
  switch (z.status) {
1560
1562
  // On abort do nothing
1561
1563
  case "ABORT":
1562
1564
  return;
1563
1565
  // On push update the history, and push new route, and return
1564
1566
  case "PUSH":
1565
- c.update(b, L), await w(...z.to);
1567
+ c.update(b, U), await w(...z.to);
1566
1568
  return;
1567
1569
  // On reject update the history, the route, and set the rejection type
1568
1570
  case "REJECT":
1569
- c.update(b, L), g(z.type);
1571
+ c.update(b, U), g(z.type);
1570
1572
  break;
1571
1573
  // On success update history, set the route, and clear the rejection
1572
1574
  case "SUCCESS":
1573
- c.update(b, L), g(null);
1575
+ c.update(b, U), g(null);
1574
1576
  break;
1575
1577
  default:
1576
1578
  throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(z)}`);
1577
1579
  }
1578
- const Ce = Q;
1580
+ const Be = Q;
1579
1581
  a.setProps(W).then((D) => {
1580
- if (Ce === Q)
1582
+ if (Be === Q)
1581
1583
  switch (D.status) {
1582
1584
  case "SUCCESS":
1583
1585
  break;
@@ -1588,130 +1590,133 @@ function lo(e, t) {
1588
1590
  g(D.type);
1589
1591
  break;
1590
1592
  default:
1591
- const Be = D;
1592
- throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(Be)}`);
1593
+ const Ne = D;
1594
+ throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(Ne)}`);
1593
1595
  }
1594
1596
  }), B(W);
1595
- const O = await u({ to: W, from: j, hooks: f });
1596
- switch (O.status) {
1597
+ const I = await u({ to: W, from: $, hooks: f });
1598
+ switch (I.status) {
1597
1599
  case "PUSH":
1598
- await w(...O.to);
1600
+ await w(...I.to);
1599
1601
  break;
1600
1602
  case "REJECT":
1601
- g(O.type);
1603
+ g(I.type);
1602
1604
  break;
1603
1605
  case "SUCCESS":
1604
1606
  break;
1605
1607
  default:
1606
- const D = O;
1608
+ const D = I;
1607
1609
  throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(D)}`);
1608
1610
  }
1609
1611
  c.startListening();
1610
1612
  }
1611
- const m = (b, L = {}, Q = {}) => {
1612
- const W = n.find((j) => j.name === b);
1613
+ const m = (b, U = {}, Q = {}) => {
1614
+ const W = n.find(($) => $.name === b);
1613
1615
  if (!W)
1614
- throw new Sn(String(b));
1615
- return Hn(W, L, Q);
1616
- }, w = (b, L, Q) => {
1617
- if (I(b)) {
1618
- const O = { ...L }, D = pt(b, {
1619
- searchParams: O.query,
1620
- hash: O.hash
1616
+ throw new xn(String(b));
1617
+ return qn(W, U, Q);
1618
+ }, w = (b, U, Q) => {
1619
+ if (T(b)) {
1620
+ const I = { ...U }, D = dt(b, {
1621
+ searchParams: I.query,
1622
+ hash: I.hash
1621
1623
  });
1622
- return k(D, O);
1624
+ return k(D, I);
1623
1625
  }
1624
1626
  if (typeof b == "string") {
1625
- const { replace: O, ...D } = { ...Q }, Be = { ...L }, Ne = m(b, Be, D), fr = ft({ ...Ne.matched.state }, { ...Ne.state, ...D.state });
1626
- return k(Ne.href, { replace: O, state: fr });
1627
+ const { replace: I, ...D } = { ...Q }, Ne = { ...U }, Ve = m(b, Ne, D), pr = lt({ ...Ve.matched.state }, { ...Ve.state, ...D.state });
1628
+ return k(Ve.href, { replace: I, state: pr });
1627
1629
  }
1628
- const { replace: W, ...j } = { ...L }, z = ft({ ...b.matched.state }, { ...b.state, ...j.state }), Ce = pt(b.href, {
1629
- searchParams: j.query,
1630
- hash: j.hash
1630
+ const { replace: W, ...$ } = { ...U }, z = lt({ ...b.matched.state }, { ...b.state, ...$.state }), Be = dt(b.href, {
1631
+ searchParams: $.query,
1632
+ hash: $.hash
1631
1633
  });
1632
- return k(Ce, { replace: W, state: z });
1633
- }, x = (b, L, Q) => {
1634
- if (I(b)) {
1635
- const j = { ...L, replace: !0 };
1636
- return w(b, j);
1634
+ return k(Be, { replace: W, state: z });
1635
+ }, x = (b, U, Q) => {
1636
+ if (T(b)) {
1637
+ const $ = { ...U, replace: !0 };
1638
+ return w(b, $);
1637
1639
  }
1638
1640
  if (typeof b == "string") {
1639
- const j = { ...Q, replace: !0 }, z = { ...L };
1640
- return w(b, z, j);
1641
+ const $ = { ...Q, replace: !0 }, z = { ...U };
1642
+ return w(b, z, $);
1641
1643
  }
1642
- const W = { ...L, replace: !0 };
1644
+ const W = { ...U, replace: !0 };
1643
1645
  return w(b, W);
1644
- }, U = (b) => {
1646
+ }, L = (b) => {
1645
1647
  g(b);
1646
- }, { setRejection: g, rejection: l, getRejectionRoute: y } = cn(t ?? {}), S = y("NotFound"), { currentRoute: A, routerRoute: C, updateRoute: B } = Gr(S, w);
1648
+ }, { setRejection: g, rejection: l, getRejectionRoute: y } = ln(t ?? {}), S = y("NotFound"), { currentRoute: A, routerRoute: C, updateRoute: B } = Xr(S, w);
1647
1649
  c.startListening();
1648
- const H = fn(t == null ? void 0 : t.initialUrl), M = c.location.state, { host: tt } = _(H), rt = Xr(tt);
1649
- let nt = !1;
1650
- async function ot() {
1651
- nt || (await k(H, { replace: !0, state: M }), nt = !0);
1652
- }
1653
- function ir(b) {
1654
- b.component("RouterView", so), b.component("RouterLink", to), b.provide(Nt, l), b.provide(qt, f), b.provide(nr, a), b.provide(It, s), b.provide(bt, at), ot();
1655
- }
1656
- const at = {
1650
+ const H = pn(t == null ? void 0 : t.initialUrl), M = c.location.state, { host: rt } = _(H), nt = tn(rt);
1651
+ let ot = !1;
1652
+ const { promise: fr, resolve: lr } = Promise.withResolvers();
1653
+ async function at() {
1654
+ if (ot)
1655
+ return fr;
1656
+ ot = !0, await k(H, { replace: !0, state: M }), lr();
1657
+ }
1658
+ function hr(b) {
1659
+ b.component("RouterView", io), b.component("RouterLink", oo), b.provide(Vt, l), b.provide(_t, f), b.provide(or, a), b.provide(Ft, s), b.provide(St, st), at();
1660
+ }
1661
+ const st = {
1657
1662
  route: C,
1658
1663
  resolve: m,
1659
1664
  find: E,
1660
1665
  push: w,
1661
1666
  replace: x,
1662
- reject: U,
1667
+ reject: L,
1663
1668
  refresh: c.refresh,
1664
1669
  forward: c.forward,
1665
1670
  back: c.back,
1666
1671
  go: c.go,
1667
- install: ir,
1668
- isExternal: rt,
1669
- onBeforeRouteEnter: d,
1672
+ install: hr,
1673
+ isExternal: nt,
1674
+ onBeforeRouteEnter: h,
1670
1675
  onAfterRouteUpdate: P,
1671
- onBeforeRouteLeave: p,
1672
- onAfterRouteEnter: h,
1676
+ onBeforeRouteLeave: d,
1677
+ onAfterRouteEnter: p,
1673
1678
  onBeforeRouteUpdate: v,
1674
1679
  onAfterRouteLeave: R,
1675
1680
  prefetch: t == null ? void 0 : t.prefetch,
1676
- start: ot
1681
+ start: at
1677
1682
  };
1678
- return at;
1683
+ return st;
1679
1684
  }
1680
- function dt(e, t) {
1685
+ function mt(e, t) {
1681
1686
  return {
1682
1687
  value: e,
1683
- params: Ge(e, t)
1688
+ params: Ke(e, t)
1684
1689
  };
1685
1690
  }
1686
- function Gt(e, t) {
1691
+ function Kt(e, t) {
1687
1692
  return {
1688
1693
  value: e,
1689
- params: Ge(e, t)
1694
+ params: Ke(e, t)
1690
1695
  };
1691
1696
  }
1692
- function On(e) {
1693
- return de(e) && typeof e.hash == "string";
1694
- }
1695
- function Kt(e) {
1696
- return e === void 0 ? ve() : On(e) ? e : ve(e);
1697
+ function Fn(e) {
1698
+ return me(e) && typeof e.hash == "string";
1697
1699
  }
1698
1700
  function Yt(e) {
1699
- return e === void 0 ? "" : e;
1700
- }
1701
- function Tn(e) {
1702
- return de(e) && typeof e.value == "string";
1701
+ return e === void 0 ? ve() : Fn(e) ? e : ve(e);
1703
1702
  }
1704
1703
  function Xt(e) {
1705
- return e === void 0 ? je("", {}) : Tn(e) ? e : je(e, {});
1704
+ return e === void 0 ? "" : e;
1706
1705
  }
1707
- function In(e) {
1708
- return de(e) && typeof e.value == "string";
1706
+ function Jn(e) {
1707
+ return me(e) && typeof e.value == "string";
1709
1708
  }
1710
1709
  function Zt(e) {
1711
- return e === void 0 ? dt("", {}) : In(e) ? e : dt(e, {});
1710
+ return e === void 0 ? $e("", {}) : Jn(e) ? e : $e(e, {});
1711
+ }
1712
+ function Qn(e) {
1713
+ return me(e) && typeof e.value == "string";
1714
+ }
1715
+ function er(e) {
1716
+ return e === void 0 ? mt("", {}) : Qn(e) ? e : mt(e, {});
1712
1717
  }
1713
1718
  function oe(e) {
1714
- const t = Je(), r = Yt(e.name), n = Xt(e.path), o = Zt(e.query), a = Kt(e.hash), s = e.meta ?? {}, c = qr(e) ? e.state : {}, i = ye({ id: t, meta: {}, state: {}, ...e }), u = {
1719
+ const t = Qe(), r = Xt(e.name), n = Zt(e.path), o = er(e.query), a = Yt(e.hash), s = e.meta ?? {}, c = Wr(e) ? e.state : {}, i = ge({ id: t, meta: {}, state: {}, ...e }), u = {
1715
1720
  id: t,
1716
1721
  matched: i,
1717
1722
  matches: [i],
@@ -1722,25 +1727,25 @@ function oe(e) {
1722
1727
  meta: s,
1723
1728
  state: c,
1724
1729
  depth: 1,
1725
- host: Gt("", {}),
1730
+ host: Kt("", {}),
1726
1731
  prefetch: e.prefetch
1727
- }, f = kt(e) ? At(e.parent, u) : u;
1732
+ }, f = At(e) ? xt(e.parent, u) : u;
1728
1733
  return ce(f.path.params, f.query.params), f;
1729
1734
  }
1730
- const Ae = { template: "<div>This is component</div>" }, Xe = oe({
1735
+ const Ae = { template: "<div>This is component</div>" }, Ze = oe({
1731
1736
  name: "parentA",
1732
1737
  path: "/parentA/[paramA]"
1733
- }), er = oe({
1734
- parent: Xe,
1738
+ }), tr = oe({
1739
+ parent: Ze,
1735
1740
  name: "parentA.childA",
1736
1741
  path: "/[?paramB]"
1737
- }), Fn = oe({
1738
- parent: Xe,
1742
+ }), zn = oe({
1743
+ parent: Ze,
1739
1744
  name: "parentA.childB",
1740
1745
  path: "/[paramD]",
1741
1746
  component: Ae
1742
- }), Jn = oe({
1743
- parent: er,
1747
+ }), Gn = oe({
1748
+ parent: tr,
1744
1749
  name: "parentA.childA.grandChildA",
1745
1750
  path: "/[paramC]",
1746
1751
  component: Ae
@@ -1754,99 +1759,99 @@ oe({
1754
1759
  path: "/",
1755
1760
  component: Ae
1756
1761
  });
1757
- const Qn = "lazy", zn = {
1762
+ const Kn = "lazy", Yn = {
1758
1763
  components: !0,
1759
1764
  props: !1
1760
1765
  };
1761
- function me(e) {
1762
- return ["eager", "lazy"].includes(e);
1766
+ function ye(e) {
1767
+ return ["eager", "lazy", "intent"].includes(e);
1763
1768
  }
1764
- function tr({ routerPrefetch: e, routePrefetch: t, linkPrefetch: r }, n) {
1765
- const o = Ve(r, n), a = Ve(t, n), s = Ve(e, n), c = [
1769
+ function rr({ routerPrefetch: e, routePrefetch: t, linkPrefetch: r }, n) {
1770
+ const o = He(r, n), a = He(t, n), s = He(e, n), c = [
1766
1771
  o,
1767
1772
  a,
1768
1773
  s,
1769
- zn[n],
1770
- Qn
1771
- ].reduce((i, u) => me(i) ? i : i === !0 && me(u) ? u : i === !0 && !me(u) ? i : i === void 0 ? u : i, void 0);
1772
- return me(c) ? c : !1;
1774
+ Yn[n],
1775
+ Kn
1776
+ ].reduce((i, u) => ye(i) ? i : i === !0 && ye(u) ? u : i === !0 && !ye(u) ? i : i === void 0 ? u : i, void 0);
1777
+ return ye(c) ? c : !1;
1773
1778
  }
1774
- function Ve(e, t) {
1775
- return de(e) ? e[t] : e;
1779
+ function He(e, t) {
1780
+ return me(e) ? e[t] : e;
1776
1781
  }
1777
- function rr(e) {
1782
+ function nr(e) {
1778
1783
  return typeof e == "object" && e !== null && "then" in e;
1779
1784
  }
1780
- function mt(e) {
1785
+ function yt(e) {
1781
1786
  try {
1782
1787
  const t = e();
1783
- return rr(t) ? t.catch((r) => r) : t;
1788
+ return nr(t) ? t.catch((r) => r) : t;
1784
1789
  } catch (t) {
1785
1790
  return t;
1786
1791
  }
1787
1792
  }
1788
- const nr = Symbol();
1789
- function Gn() {
1790
- const e = xe(/* @__PURE__ */ new Map()), { push: t, replace: r, reject: n } = $t(), o = (d, P, p) => P.matches.filter((h) => tr({ ...p, routePrefetch: h.prefetch }, "props") === d).flatMap((h) => u(h)).reduce((h, { id: v, name: R, props: E }) => {
1793
+ const or = Symbol();
1794
+ function Xn() {
1795
+ const e = xe(/* @__PURE__ */ new Map()), { push: t, replace: r, reject: n } = qt(), o = (h, P, d) => P.matches.filter((p) => rr({ ...d, routePrefetch: p.prefetch }, "props") === h).flatMap((p) => u(p)).reduce((p, { id: v, name: R, props: E }) => {
1791
1796
  if (!E)
1792
- return h;
1793
- const k = i(v, R, P), m = mt(() => E(P, {
1797
+ return p;
1798
+ const k = i(v, R, P), m = yt(() => E(P, {
1794
1799
  push: t,
1795
1800
  replace: r,
1796
1801
  reject: n
1797
1802
  }));
1798
- return h[k] = m, h;
1799
- }, {}), a = (d) => {
1800
- Object.entries(d).forEach(([P, p]) => {
1801
- e.set(P, p);
1803
+ return p[k] = m, p;
1804
+ }, {}), a = (h) => {
1805
+ Object.entries(h).forEach(([P, d]) => {
1806
+ e.set(P, d);
1802
1807
  });
1803
- }, s = async (d) => {
1804
- const P = d.matches.flatMap(u), p = [], h = [];
1808
+ }, s = async (h) => {
1809
+ const P = h.matches.flatMap(u), d = [], p = [];
1805
1810
  for (const { id: v, name: R, props: E } of P) {
1806
1811
  if (!E)
1807
1812
  continue;
1808
- const k = i(v, R, d);
1809
- if (p.push(k), !e.has(k)) {
1810
- const m = mt(() => E(d, {
1813
+ const k = i(v, R, h);
1814
+ if (d.push(k), !e.has(k)) {
1815
+ const m = yt(() => E(h, {
1811
1816
  push: t,
1812
1817
  replace: r,
1813
1818
  reject: n
1814
1819
  }));
1815
1820
  e.set(k, m);
1816
1821
  }
1817
- h.push((async () => {
1822
+ p.push((async () => {
1818
1823
  const m = await e.get(k);
1819
1824
  if (m instanceof Error)
1820
1825
  throw m;
1821
1826
  })());
1822
1827
  }
1823
- f(p);
1828
+ f(d);
1824
1829
  try {
1825
- return await Promise.all(h), { status: "SUCCESS" };
1830
+ return await Promise.all(p), { status: "SUCCESS" };
1826
1831
  } catch (v) {
1827
1832
  if (v instanceof te || v instanceof be)
1828
1833
  return v.response;
1829
1834
  throw v;
1830
1835
  }
1831
- }, c = (d, P, p) => {
1832
- const h = i(d, P, p);
1833
- return e.get(h);
1836
+ }, c = (h, P, d) => {
1837
+ const p = i(h, P, d);
1838
+ return e.get(p);
1834
1839
  };
1835
- function i(d, P, p) {
1836
- return [d, P, p.id, JSON.stringify(p.params)].join("-");
1840
+ function i(h, P, d) {
1841
+ return [h, P, d.id, JSON.stringify(d.params)].join("-");
1837
1842
  }
1838
- function u(d) {
1839
- return We(d) ? Object.entries(d.props ?? {}).map(([P, p]) => ({ id: d.id, name: P, props: p })) : Me(d) ? [
1843
+ function u(h) {
1844
+ return De(h) ? Object.entries(h.props ?? {}).map(([P, d]) => ({ id: h.id, name: P, props: d })) : We(h) ? [
1840
1845
  {
1841
- id: d.id,
1846
+ id: h.id,
1842
1847
  name: "default",
1843
- props: d.props
1848
+ props: h.props
1844
1849
  }
1845
1850
  ] : [];
1846
1851
  }
1847
- function f(d) {
1852
+ function f(h) {
1848
1853
  for (const P in e.keys())
1849
- d.includes(P) || e.delete(P);
1854
+ h.includes(P) || e.delete(P);
1850
1855
  }
1851
1856
  return {
1852
1857
  getPrefetchProps: o,
@@ -1855,83 +1860,94 @@ function Gn() {
1855
1860
  setProps: s
1856
1861
  };
1857
1862
  }
1858
- function or() {
1859
- const e = ae(nr);
1863
+ function ar() {
1864
+ const e = ae(or);
1860
1865
  if (!e)
1861
- throw new pe();
1866
+ throw new de();
1862
1867
  return e;
1863
1868
  }
1864
- const Kn = dr(() => new Promise((e) => {
1869
+ const Zn = gr(() => new Promise((e) => {
1865
1870
  e({ default: { template: "foo" } });
1866
1871
  }));
1867
- function yt(e) {
1868
- return e.name === Kn.name && "__asyncLoader" in e;
1872
+ function gt(e) {
1873
+ return e.name === Zn.name && "__asyncLoader" in e;
1874
+ }
1875
+ function vt(e, t, r) {
1876
+ ie(e, (n, o) => {
1877
+ n && n.addEventListener(t, r), o && o.removeEventListener(t, r);
1878
+ }, { immediate: !0 }), Le(() => {
1879
+ e.value && e.value.removeEventListener(t, r);
1880
+ });
1869
1881
  }
1870
- function Yn(e) {
1871
- const t = /* @__PURE__ */ new Map(), r = qe(), { getPrefetchProps: n, setPrefetchProps: o } = or(), { isElementVisible: a } = bn(r), s = () => {
1872
- const i = Array.from(t.values()).reduce((u, f) => (Object.assign(u, f), u), {});
1873
- o(i);
1882
+ function eo(e) {
1883
+ const t = /* @__PURE__ */ new Map(), r = _e(), { getPrefetchProps: n, setPrefetchProps: o } = ar(), { isElementVisible: a } = An(r), s = () => {
1884
+ const u = Array.from(t.values()).reduce((f, h) => (Object.assign(f, h), f), {});
1885
+ o(u);
1874
1886
  };
1875
- ge(() => $(e), ({ route: i, ...u }) => {
1876
- t.clear(), i && c("eager", i, u);
1877
- }, { immediate: !0 }), ge(a, (i) => {
1878
- const { route: u, ...f } = $(e);
1879
- !u || !i || c("lazy", u, f);
1880
- }, { immediate: !0 });
1881
- function c(i, u, f) {
1882
- Xn(i, u, f), t.has(i) || t.set(i, n(i, u, f));
1887
+ ie(() => j(e), ({ route: u, ...f }) => {
1888
+ t.clear(), u && i("eager", u, f);
1889
+ }, { immediate: !0 }), ie(a, (u) => {
1890
+ const { route: f, ...h } = j(e);
1891
+ !f || !u || i("lazy", f, h);
1892
+ }, { immediate: !0 }), vt(r, "focusin", c), vt(r, "mouseover", c);
1893
+ function c() {
1894
+ const { route: u, ...f } = j(e);
1895
+ u && i("intent", u, f);
1896
+ }
1897
+ function i(u, f, h) {
1898
+ to(u, f, h), t.has(u) || t.set(u, n(u, f, h));
1883
1899
  }
1884
1900
  return {
1885
1901
  element: r,
1886
1902
  commit: s
1887
1903
  };
1888
1904
  }
1889
- function Xn(e, t, r) {
1905
+ function to(e, t, r) {
1890
1906
  t.matches.forEach((n) => {
1891
- tr({
1907
+ rr({
1892
1908
  ...r,
1893
1909
  routePrefetch: n.prefetch
1894
- }, "components") === e && (Me(n) && yt(n.component) && n.component.__asyncLoader(), We(n) && Object.values(n.components).forEach((a) => {
1895
- yt(a) && a.__asyncLoader();
1910
+ }, "components") === e && (We(n) && gt(n.component) && n.component.__asyncLoader(), De(n) && Object.values(n.components).forEach((a) => {
1911
+ gt(a) && a.__asyncLoader();
1896
1912
  }));
1897
1913
  });
1898
1914
  }
1899
- function ar(e, t, { exact: r } = {}) {
1900
- return Qr(e) ? t === void 0 ? !0 : r ? e.matched.name === t : e.matches.map((n) => n.name).includes(t) : !1;
1915
+ function sr(e, t, { exact: r } = {}) {
1916
+ return Kr(e) ? t === void 0 ? !0 : r ? e.matched.name === t : e.matches.map((n) => n.name).includes(t) : !1;
1901
1917
  }
1902
- function Zn(e, t = {}, r = {}) {
1903
- const n = _e(), o = N(() => {
1904
- const h = $(e);
1905
- return typeof h != "string" ? h : I(h) ? n.find(h, $(r)) : n.resolve(h, $(t), $(r));
1918
+ function ro(e, t = {}, r = {}) {
1919
+ const n = Me(), o = N(() => {
1920
+ const p = j(e);
1921
+ return typeof p != "string" ? p : T(p) ? n.find(p, j(r)) : n.resolve(p, j(t), j(r));
1906
1922
  }), a = N(() => {
1907
1923
  if (o.value)
1908
1924
  return o.value.href;
1909
- const h = $(e);
1910
- if (I(h))
1911
- return h;
1925
+ const p = j(e);
1926
+ if (T(p))
1927
+ return p;
1912
1928
  console.error(new Error("Failed to resolve route in RouterLink."));
1913
- }), s = N(() => ar(n.route) && n.route.matches.some((h) => {
1929
+ }), s = N(() => sr(n.route) && n.route.matches.some((p) => {
1914
1930
  var v;
1915
- return h.id === ((v = o.value) == null ? void 0 : v.id);
1931
+ return p.id === ((v = o.value) == null ? void 0 : v.id);
1916
1932
  })), c = N(() => {
1917
- var h;
1918
- return n.route.id === ((h = o.value) == null ? void 0 : h.id);
1933
+ var p;
1934
+ return n.route.id === ((p = o.value) == null ? void 0 : p.id);
1919
1935
  }), i = N(() => !!a.value && n.isExternal(a.value)), u = N(() => {
1920
- const h = $(e);
1921
- return typeof h != "string" || I(h) ? $(t) : $(r);
1922
- }), { element: f, commit: d } = Yn(() => ({
1936
+ const p = j(e);
1937
+ return typeof p != "string" || T(p) ? j(t) : j(r);
1938
+ }), { element: f, commit: h } = eo(() => ({
1923
1939
  route: o.value,
1924
1940
  routerPrefetch: n.prefetch,
1925
1941
  linkPrefetch: u.value.prefetch
1926
- })), P = (h) => {
1927
- d();
1942
+ })), P = (p) => {
1943
+ h();
1928
1944
  const v = {
1929
- replace: (h == null ? void 0 : h.replace) ?? u.value.replace,
1930
- query: Ke(u.value.query, h == null ? void 0 : h.query),
1931
- hash: (h == null ? void 0 : h.hash) ?? u.value.hash,
1932
- state: { ...u.value.state, ...h == null ? void 0 : h.state }
1933
- }, R = $(e);
1934
- return I(R) || typeof R == "object" ? n.push(R, v) : n.push(R, $(t), v);
1945
+ replace: (p == null ? void 0 : p.replace) ?? u.value.replace,
1946
+ query: Ye(u.value.query, p == null ? void 0 : p.query),
1947
+ hash: (p == null ? void 0 : p.hash) ?? u.value.hash,
1948
+ state: { ...u.value.state, ...p == null ? void 0 : p.state }
1949
+ }, R = j(e);
1950
+ return T(R) || typeof R == "object" ? n.push(R, v) : n.push(R, j(t), v);
1935
1951
  };
1936
1952
  return {
1937
1953
  element: f,
@@ -1941,10 +1957,10 @@ function Zn(e, t = {}, r = {}) {
1941
1957
  isExactMatch: c,
1942
1958
  isExternal: i,
1943
1959
  push: P,
1944
- replace: (h) => P({ ...h, replace: !0 })
1960
+ replace: (p) => P({ ...p, replace: !0 })
1945
1961
  };
1946
1962
  }
1947
- const eo = ["href"], to = /* @__PURE__ */ se({
1963
+ const no = ["href"], oo = /* @__PURE__ */ se({
1948
1964
  __name: "routerLink",
1949
1965
  props: {
1950
1966
  to: {},
@@ -1955,10 +1971,10 @@ const eo = ["href"], to = /* @__PURE__ */ se({
1955
1971
  state: {}
1956
1972
  },
1957
1973
  setup(e) {
1958
- const t = e, r = _e(), n = N(() => P(t.to)), o = N(() => p(t.to)), a = N(() => {
1974
+ const t = e, r = Me(), n = N(() => P(t.to)), o = N(() => d(t.to)), a = N(() => {
1959
1975
  const { to: v, ...R } = t;
1960
1976
  return R;
1961
- }), { element: s, isMatch: c, isExactMatch: i, isExternal: u, push: f } = Zn(() => typeof t.to == "function" ? t.to(r.resolve) : t.to, a), d = N(() => ({
1977
+ }), { element: s, isMatch: c, isExactMatch: i, isExternal: u, push: f } = ro(() => typeof t.to == "function" ? t.to(r.resolve) : t.to, a), h = N(() => ({
1962
1978
  "router-link--match": c.value,
1963
1979
  "router-link--exact-match": i.value
1964
1980
  }));
@@ -1967,64 +1983,64 @@ const eo = ["href"], to = /* @__PURE__ */ se({
1967
1983
  const R = v(r.resolve);
1968
1984
  return P(R);
1969
1985
  }
1970
- return I(v) ? r.find(v) : v;
1986
+ return T(v) ? r.find(v) : v;
1971
1987
  }
1972
- function p(v) {
1988
+ function d(v) {
1973
1989
  if (typeof v == "function") {
1974
1990
  const R = v(r.resolve);
1975
- return p(R);
1991
+ return d(R);
1976
1992
  }
1977
- return I(v) ? v : v == null ? void 0 : v.href;
1993
+ return T(v) ? v : v == null ? void 0 : v.href;
1978
1994
  }
1979
- function h(v) {
1995
+ function p(v) {
1980
1996
  v.preventDefault(), f();
1981
1997
  }
1982
- return (v, R) => (vt(), mr("a", {
1998
+ return (v, R) => (wt(), vr("a", {
1983
1999
  ref_key: "element",
1984
2000
  ref: s,
1985
2001
  href: o.value,
1986
- class: yr(["router-link", d.value]),
1987
- onClick: h
2002
+ class: Rr(["router-link", h.value]),
2003
+ onClick: p
1988
2004
  }, [
1989
- Rt(v.$slots, "default", wt(gr({ route: n.value, isMatch: ue(c), isExactMatch: ue(i), isExternal: ue(u) })))
1990
- ], 10, eo));
2005
+ Pt(v.$slots, "default", Et(wr({ route: n.value, isMatch: ue(c), isExactMatch: ue(i), isExternal: ue(u) })))
2006
+ ], 10, no));
1991
2007
  }
1992
2008
  });
1993
- function ro(e, t) {
1994
- const r = _e();
2009
+ function ao(e, t) {
2010
+ const r = Me();
1995
2011
  function n() {
1996
2012
  if (!e)
1997
2013
  return;
1998
- if (!ar(r.route, e, t))
1999
- throw new xr(e, r.route.name);
2014
+ if (!sr(r.route, e, t))
2015
+ throw new Cr(e, r.route.name);
2000
2016
  }
2001
- return ge(r.route, n, { immediate: !0, deep: !0 }), r.route;
2017
+ return ie(r.route, n, { immediate: !0, deep: !0 }), r.route;
2002
2018
  }
2003
- const sr = Symbol();
2004
- function Ze() {
2005
- return ae(sr, 0);
2019
+ const cr = Symbol();
2020
+ function et() {
2021
+ return ae(cr, 0);
2006
2022
  }
2007
- function no(e, t) {
2023
+ function so(e, t) {
2008
2024
  return se({
2009
2025
  name: "PropsWrapper",
2010
2026
  expose: [],
2011
2027
  setup() {
2012
- const r = t(), n = vr();
2013
- return () => r instanceof Error ? "" : rr(r) ? n != null && n.suspense ? Z(ao(e, r)) : Z(oo(e, r)) : Z(e, r);
2028
+ const r = t(), n = Pr();
2029
+ return () => r instanceof Error ? "" : nr(r) ? n != null && n.suspense ? Z(uo(e, r)) : Z(co(e, r)) : Z(e, r);
2014
2030
  }
2015
2031
  });
2016
2032
  }
2017
- function oo(e, t) {
2033
+ function co(e, t) {
2018
2034
  return se({
2019
2035
  name: "AsyncPropsWrapper",
2020
2036
  expose: [],
2021
2037
  setup() {
2022
- const r = qe();
2038
+ const r = _e();
2023
2039
  return (async () => r.value = await t)(), () => r.value instanceof Error ? "" : r.value ? Z(e, r.value) : "";
2024
2040
  }
2025
2041
  });
2026
2042
  }
2027
- function ao(e, t) {
2043
+ function uo(e, t) {
2028
2044
  return se({
2029
2045
  name: "SuspenseAsyncPropsWrapper",
2030
2046
  expose: [],
@@ -2034,61 +2050,61 @@ function ao(e, t) {
2034
2050
  }
2035
2051
  });
2036
2052
  }
2037
- const so = /* @__PURE__ */ se({
2053
+ const io = /* @__PURE__ */ se({
2038
2054
  __name: "routerView",
2039
2055
  props: {
2040
2056
  name: { default: "default" }
2041
2057
  },
2042
2058
  setup(e) {
2043
- const t = ro(), r = Jr(), n = Ze(), { getProps: o } = or(), a = Rr("RouterView", !0);
2044
- wr(sr, n + 1);
2059
+ const t = ao(), r = Gr(), n = et(), { getProps: o } = ar(), a = Er("RouterView", !0);
2060
+ br(cr, n + 1);
2045
2061
  const s = N(() => {
2046
2062
  if (r.value)
2047
2063
  return r.value.component;
2048
2064
  const u = t.matches.at(n);
2049
2065
  if (!u)
2050
2066
  return null;
2051
- const f = c(u), d = o(u.id, e.name, t);
2052
- return f ? d ? no(f, () => d) : f : null;
2067
+ const f = c(u), h = o(u.id, e.name, t);
2068
+ return f ? h ? so(f, () => h) : f : null;
2053
2069
  });
2054
2070
  function c(u) {
2055
2071
  return i(u)[e.name];
2056
2072
  }
2057
2073
  function i(u) {
2058
- return We(u) ? u.components : Me(u) ? { default: u.component } : typeof a == "string" ? {} : { default: a };
2074
+ return De(u) ? u.components : We(u) ? { default: u.component } : typeof a == "string" ? {} : { default: a };
2059
2075
  }
2060
- return (u, f) => s.value ? Rt(u.$slots, "default", wt(Pr({ key: 0 }, { route: ue(t), component: s.value, rejection: ue(r) })), () => [
2061
- (vt(), Er(br(s.value)))
2062
- ]) : Sr("", !0);
2076
+ return (u, f) => s.value ? Pt(u.$slots, "default", Et(Sr({ key: 0 }, { route: ue(t), component: s.value, rejection: ue(r) })), () => [
2077
+ (wt(), kr(Ar(s.value)))
2078
+ ]) : xr("", !0);
2063
2079
  }
2064
2080
  });
2065
- function cr() {
2066
- const e = ae(qt);
2081
+ function ur() {
2082
+ const e = ae(_t);
2067
2083
  if (!e)
2068
- throw new pe();
2084
+ throw new de();
2069
2085
  return e;
2070
2086
  }
2071
- function ur(e) {
2087
+ function ir(e) {
2072
2088
  return (t) => {
2073
- const r = Ze(), o = cr().addBeforeRouteHook({ lifecycle: e, hook: t, depth: r, timing: "component" });
2074
- return Pt(o), o;
2089
+ const r = et(), o = ur().addBeforeRouteHook({ lifecycle: e, hook: t, depth: r, timing: "component" });
2090
+ return Le(o), o;
2075
2091
  };
2076
2092
  }
2077
- function et(e) {
2093
+ function tt(e) {
2078
2094
  return (t) => {
2079
- const r = Ze(), o = cr().addAfterRouteHook({ lifecycle: e, hook: t, depth: r, timing: "component" });
2080
- return Pt(o), o;
2095
+ const r = et(), o = ur().addAfterRouteHook({ lifecycle: e, hook: t, depth: r, timing: "component" });
2096
+ return Le(o), o;
2081
2097
  };
2082
2098
  }
2083
- const ho = ur("onBeforeRouteUpdate"), po = ur("onBeforeRouteLeave"), mo = et("onAfterRouteEnter"), yo = et("onAfterRouteUpdate"), go = et("onAfterRouteLeave");
2084
- function co(e) {
2085
- return de(e) && typeof e.value == "string";
2099
+ const yo = ir("onBeforeRouteUpdate"), go = ir("onBeforeRouteLeave"), vo = tt("onAfterRouteEnter"), Ro = tt("onAfterRouteUpdate"), wo = tt("onAfterRouteLeave");
2100
+ function fo(e) {
2101
+ return me(e) && typeof e.value == "string";
2086
2102
  }
2087
- function gt(e) {
2088
- return co(e) ? e : Gt(e, {});
2103
+ function Rt(e) {
2104
+ return fo(e) ? e : Kt(e, {});
2089
2105
  }
2090
- function vo(e) {
2091
- const t = Je(), r = Yt(e.name), n = Xt(e.path), o = Zt(e.query), a = Kt(e.hash), s = e.meta ?? {}, c = $r(e) ? gt(e.host) : gt(""), i = ye({ id: t, meta: {}, state: {}, ...e }), u = {
2106
+ function Po(e) {
2107
+ const t = Qe(), r = Xt(e.name), n = Zt(e.path), o = er(e.query), a = Yt(e.hash), s = e.meta ?? {}, c = Mr(e) ? Rt(e.host) : Rt(""), i = ge({ id: t, meta: {}, state: {}, ...e }), u = {
2092
2108
  id: t,
2093
2109
  matched: i,
2094
2110
  matches: [i],
@@ -2100,32 +2116,32 @@ function vo(e) {
2100
2116
  meta: s,
2101
2117
  depth: 1,
2102
2118
  state: {}
2103
- }, f = kt(e) ? At(e.parent, u) : u;
2119
+ }, f = At(e) ? xt(e.parent, u) : u;
2104
2120
  return ce(f.path.params, f.query.params, f.host.params), f;
2105
2121
  }
2106
2122
  export {
2107
- kr as DuplicateParamsError,
2108
- Ar as MetaPropertyConflict,
2109
- to as RouterLink,
2110
- pe as RouterNotInstalledError,
2111
- so as RouterView,
2112
- xr as UseRouteInvalidError,
2113
- Et as asUrl,
2114
- vo as createExternalRoute,
2115
- Tr as createParam,
2123
+ Lr as DuplicateParamsError,
2124
+ Ur as MetaPropertyConflict,
2125
+ oo as RouterLink,
2126
+ de as RouterNotInstalledError,
2127
+ io as RouterView,
2128
+ Cr as UseRouteInvalidError,
2129
+ bt as asUrl,
2130
+ Po as createExternalRoute,
2131
+ Jr as createParam,
2116
2132
  oe as createRoute,
2117
- lo as createRouter,
2118
- ar as isRoute,
2119
- I as isUrl,
2120
- mo as onAfterRouteEnter,
2121
- yo as onAfterRouteLeave,
2122
- go as onAfterRouteUpdate,
2123
- ho as onBeforeRouteLeave,
2124
- po as onBeforeRouteUpdate,
2125
- je as path,
2126
- dt as query,
2127
- Zn as useLink,
2128
- ro as useRoute,
2129
- _e as useRouter,
2130
- fo as withDefault
2133
+ mo as createRouter,
2134
+ sr as isRoute,
2135
+ T as isUrl,
2136
+ vo as onAfterRouteEnter,
2137
+ Ro as onAfterRouteLeave,
2138
+ wo as onAfterRouteUpdate,
2139
+ yo as onBeforeRouteLeave,
2140
+ go as onBeforeRouteUpdate,
2141
+ $e as path,
2142
+ mt as query,
2143
+ ro as useLink,
2144
+ ao as useRoute,
2145
+ Me as useRouter,
2146
+ po as withDefault
2131
2147
  };