@kitbag/router 0.17.4 → 0.17.6

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,11 +1,11 @@
1
1
  var Pr = Object.defineProperty;
2
2
  var Sr = (e, t, r) => t in e ? Pr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var M = (e, t, r) => Sr(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { inject as se, markRaw as xe, reactive as $e, defineAsyncComponent as Ar, watch as ne, onUnmounted as _e, computed as Z, ref as He, toValue as _, toRefs as kr, defineComponent as ge, openBlock as At, createElementBlock as xr, normalizeClass as Lr, renderSlot as kt, normalizeProps as xt, guardReactiveProps as Ur, unref as ve, h as fe, getCurrentInstance as Br, provide as Cr, mergeProps as Nr, createBlock as Vr, resolveDynamicComponent as Zr, createCommentVNode as jr } from "vue";
4
+ import { inject as ce, markRaw as xe, reactive as $e, defineAsyncComponent as Ar, watch as ne, onUnmounted as _e, computed as Z, ref as He, toValue as _, toRefs as kr, defineComponent as ge, openBlock as kt, createElementBlock as xr, normalizeClass as Lr, renderSlot as xt, normalizeProps as Lt, guardReactiveProps as Ur, unref as ve, h as le, getCurrentInstance as Br, provide as Nr, mergeProps as Cr, createBlock as Vr, resolveDynamicComponent as Zr, createCommentVNode as jr } from "vue";
5
5
  function T(e) {
6
6
  return typeof e != "string" ? !1 : /^(https?:\/\/|\/).*/g.test(e);
7
7
  }
8
- function Lt(e) {
8
+ function Ut(e) {
9
9
  return T(e) ? e : `/${e}`;
10
10
  }
11
11
  class $r extends Error {
@@ -38,57 +38,57 @@ class Hr extends Error {
38
38
  super(`useRoute called with incorrect route. Given ${t}, expected ${r}`);
39
39
  }
40
40
  }
41
- const Ut = Symbol();
42
- function ze() {
43
- const e = se(Ut);
41
+ const Bt = Symbol();
42
+ function Qe() {
43
+ const e = ce(Bt);
44
44
  if (!e)
45
45
  throw new Re();
46
46
  return e;
47
47
  }
48
- function le(e) {
48
+ function he(e) {
49
49
  return Array.isArray(e) ? e : [e];
50
50
  }
51
- function Bt(e, t) {
51
+ function Nt(e, t) {
52
52
  return e.filter((r) => t === r).length;
53
53
  }
54
54
  function we(...e) {
55
- const t = e.flatMap((r) => Array.isArray(r) ? r : Object.keys(r).map(qr));
55
+ const t = e.flatMap((r) => Array.isArray(r) ? r : Object.keys(r).map(Or));
56
56
  for (const r of t)
57
- if (Bt(t, r) > 1)
57
+ if (Nt(t, r) > 1)
58
58
  throw new $r(r);
59
59
  }
60
- function qr(e) {
60
+ function Or(e) {
61
61
  return e.startsWith("?") ? e.slice(1) : e;
62
62
  }
63
63
  class G extends Error {
64
64
  }
65
- const Q = "[", X = "]";
66
- function Or(e) {
65
+ const z = "[", X = "]";
66
+ function qr(e) {
67
67
  return e !== String && e !== Boolean && e !== Number && e !== Date;
68
68
  }
69
69
  function Ir(e) {
70
- return typeof e == "function" && Or(e);
70
+ return typeof e == "function" && qr(e);
71
71
  }
72
- function qe(e) {
72
+ function Oe(e) {
73
73
  return typeof e == "object" && "get" in e && typeof e.get == "function" && "set" in e && typeof e.set == "function";
74
74
  }
75
75
  function Ct(e) {
76
76
  return typeof e == "string" || typeof e == "number" || typeof e == "boolean";
77
77
  }
78
78
  function Dr(e, t) {
79
- return qe(e) ? { ...e, defaultValue: t ?? e.defaultValue } : {
80
- get: (r) => de(r, e),
81
- set: (r) => oe(r, e),
79
+ return Oe(e) ? { ...e, defaultValue: t ?? e.defaultValue } : {
80
+ get: (r) => oe(r, e),
81
+ set: (r) => ae(r, e),
82
82
  defaultValue: t
83
83
  };
84
84
  }
85
85
  function Fr(e) {
86
- return qe(e) && e.defaultValue !== void 0;
86
+ return Oe(e) && e.defaultValue !== void 0;
87
87
  }
88
- function Ao(e, t) {
88
+ function ko(e, t) {
89
89
  return Dr(e, t);
90
90
  }
91
- function Nt(e) {
91
+ function Vt(e) {
92
92
  return typeof e == "object" && e !== null && !Array.isArray(e);
93
93
  }
94
94
  function J(e) {
@@ -140,9 +140,9 @@ async function Mr() {
140
140
  };
141
141
  }
142
142
  function Tr(e) {
143
- return Object.values(e).some((t) => Object.values(t.host.params).some((r) => Me(r)) || Object.values(t.path.params).some((r) => Me(r)) || Object.values(t.query.params).some((r) => Me(r)));
143
+ return Object.values(e).some((t) => Object.values(t.host.params).some((r) => Fe(r)) || Object.values(t.path.params).some((r) => Fe(r)) || Object.values(t.query.params).some((r) => Fe(r)));
144
144
  }
145
- function Me(e) {
145
+ function Fe(e) {
146
146
  return typeof e == "object" && "parse" in e && typeof e.parse == "function";
147
147
  }
148
148
  async function Jr() {
@@ -152,10 +152,10 @@ async function Jr() {
152
152
  throw new Error("Failed to initialize Zod");
153
153
  }
154
154
  }
155
- function Vt(e) {
155
+ function Zt(e) {
156
156
  return v ? e instanceof v.ZodSchema : !1;
157
157
  }
158
- function Zt(e) {
158
+ function jt(e) {
159
159
  return {
160
160
  get: (t, { invalid: r }) => {
161
161
  try {
@@ -174,14 +174,14 @@ function Zt(e) {
174
174
  };
175
175
  }
176
176
  const Wr = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
177
- function ce(e, t) {
177
+ function ie(e, t) {
178
178
  if (typeof t == "string" && Wr.test(t)) {
179
179
  const r = new Date(t);
180
180
  return isNaN(r.getTime()) ? t : r;
181
181
  }
182
182
  return t;
183
183
  }
184
- function ue(e) {
184
+ function fe(e) {
185
185
  for (const t of e)
186
186
  try {
187
187
  return t();
@@ -205,36 +205,36 @@ function Je(e, t) {
205
205
  if (t instanceof v.ZodNumber)
206
206
  return t.parse(Number(e));
207
207
  if (t instanceof v.ZodLiteral)
208
- return ue([
208
+ return fe([
209
209
  () => t.parse(Number(e)),
210
210
  () => t.parse(!!e),
211
211
  () => t.parse(e)
212
212
  ]);
213
213
  if (t instanceof v.ZodObject)
214
- return t.parse(JSON.parse(e, ce));
214
+ return t.parse(JSON.parse(e, ie));
215
215
  if (t instanceof v.ZodEnum)
216
216
  return t.parse(e);
217
217
  if (t instanceof v.ZodNativeEnum)
218
- return ue([
218
+ return fe([
219
219
  () => t.parse(Number(e)),
220
220
  () => t.parse(e)
221
221
  ]);
222
222
  if (t instanceof v.ZodArray || t instanceof v.ZodTuple)
223
- return t.parse(JSON.parse(e, ce));
223
+ return t.parse(JSON.parse(e, ie));
224
224
  if (t instanceof v.ZodUnion) {
225
225
  const r = Array.from(t._def.options).sort(Le).map((n) => () => Je(e, n));
226
- return ue(r);
226
+ return fe(r);
227
227
  }
228
228
  if (t instanceof v.ZodDiscriminatedUnion) {
229
229
  const r = Array.from(t.options).sort(Le).map((n) => () => Je(e, n));
230
- return ue(r);
230
+ return fe(r);
231
231
  }
232
232
  if (t instanceof v.ZodRecord)
233
- return t.parse(JSON.parse(e, ce));
233
+ return t.parse(JSON.parse(e, ie));
234
234
  if (t instanceof v.ZodMap)
235
- return t.parse(new Map(JSON.parse(e, ce)));
235
+ return t.parse(new Map(JSON.parse(e, ie)));
236
236
  if (t instanceof v.ZodSet)
237
- return t.parse(new Set(JSON.parse(e, ce)));
237
+ return t.parse(new Set(JSON.parse(e, ie)));
238
238
  if (t instanceof v.ZodIntersection)
239
239
  throw new Error("Intersection schemas are not supported");
240
240
  if (t instanceof v.ZodPromise)
@@ -266,11 +266,11 @@ function We(e, t) {
266
266
  return JSON.stringify(t.parse(e));
267
267
  if (t instanceof v.ZodUnion) {
268
268
  const r = Array.from(t._def.options).sort(Le).map((n) => () => We(e, n));
269
- return ue(r);
269
+ return fe(r);
270
270
  }
271
271
  if (t instanceof v.ZodDiscriminatedUnion) {
272
272
  const r = Array.from(t.options).sort(Le).map((n) => () => We(e, n));
273
- return ue(r);
273
+ return fe(r);
274
274
  }
275
275
  if (t instanceof v.ZodRecord)
276
276
  return JSON.stringify(t.parse(e));
@@ -293,18 +293,18 @@ function We(e, t) {
293
293
  function Gr(e, t) {
294
294
  return e[t] ?? String;
295
295
  }
296
- const N = {
296
+ const C = {
297
297
  invalid: (e) => {
298
298
  throw new G(e);
299
299
  }
300
- }, jt = {
300
+ }, $t = {
301
301
  get: (e) => e,
302
302
  set: (e, { invalid: t }) => {
303
303
  if (typeof e != "string")
304
304
  throw t();
305
305
  return e;
306
306
  }
307
- }, Qe = {
307
+ }, ze = {
308
308
  get: (e, { invalid: t }) => {
309
309
  if (e === "true")
310
310
  return !0;
@@ -329,7 +329,7 @@ const N = {
329
329
  throw t();
330
330
  return e.toString();
331
331
  }
332
- }, $t = {
332
+ }, _t = {
333
333
  get: (e, { invalid: t }) => {
334
334
  const r = new Date(e);
335
335
  if (isNaN(r.getTime()))
@@ -341,7 +341,7 @@ const N = {
341
341
  throw t();
342
342
  return e.toISOString();
343
343
  }
344
- }, _t = {
344
+ }, Ht = {
345
345
  get: (e, { invalid: t }) => {
346
346
  try {
347
347
  return JSON.parse(e);
@@ -357,19 +357,19 @@ const N = {
357
357
  }
358
358
  }
359
359
  };
360
- function zr(e, t) {
360
+ function Qr(e, t) {
361
361
  switch (typeof t) {
362
362
  case "string":
363
- return jt.get(e, N) === t;
363
+ return $t.get(e, C) === t;
364
364
  case "number":
365
- return Ke.get(e, N) === t;
365
+ return Ke.get(e, C) === t;
366
366
  case "boolean":
367
- return Qe.get(e, N) === t;
367
+ return ze.get(e, C) === t;
368
368
  default:
369
369
  return !1;
370
370
  }
371
371
  }
372
- function de(e, t, r = !1) {
372
+ function oe(e, t, r = !1) {
373
373
  if (e === void 0 || !J(e)) {
374
374
  if (Fr(t))
375
375
  return t.defaultValue;
@@ -378,34 +378,34 @@ function de(e, t, r = !1) {
378
378
  throw new G();
379
379
  }
380
380
  if (t === String)
381
- return jt.get(e, N);
381
+ return $t.get(e, C);
382
382
  if (t === Boolean)
383
- return Qe.get(e, N);
383
+ return ze.get(e, C);
384
384
  if (t === Number)
385
- return Ke.get(e, N);
385
+ return Ke.get(e, C);
386
386
  if (t === Date)
387
- return $t.get(e, N);
387
+ return _t.get(e, C);
388
388
  if (t === JSON)
389
- return _t.get(e, N);
389
+ return Ht.get(e, C);
390
390
  if (Ir(t))
391
- return t(e, N);
392
- if (qe(t))
393
- return t.get(e, N);
391
+ return t(e, C);
392
+ if (Oe(t))
393
+ return t.get(e, C);
394
394
  if (t instanceof RegExp) {
395
395
  if (t.test(e))
396
396
  return e;
397
397
  throw new G();
398
398
  }
399
399
  if (Ct(t)) {
400
- if (zr(e, t))
400
+ if (Qr(e, t))
401
401
  return t;
402
402
  throw new G();
403
403
  }
404
- return Vt(t) ? Zt(t).get(e, N) : e;
404
+ return Zt(t) ? jt(t).get(e, C) : e;
405
405
  }
406
- function Qr(e, t, r = !1) {
406
+ function zr(e, t, r = !1) {
407
407
  try {
408
- return de(e, t, r);
408
+ return oe(e, t, r);
409
409
  } catch (n) {
410
410
  if (n instanceof G)
411
411
  return;
@@ -414,36 +414,36 @@ function Qr(e, t, r = !1) {
414
414
  }
415
415
  function Kr(e, t, r = !1) {
416
416
  try {
417
- return oe(e, t, r);
417
+ return ae(e, t, r);
418
418
  } catch (n) {
419
419
  if (n instanceof G)
420
420
  return;
421
421
  throw n;
422
422
  }
423
423
  }
424
- function oe(e, t, r = !1) {
424
+ function ae(e, t, r = !1) {
425
425
  if (e === void 0) {
426
426
  if (r)
427
427
  return "";
428
428
  throw new G();
429
429
  }
430
430
  if (t === Boolean)
431
- return Qe.set(e, N);
431
+ return ze.set(e, C);
432
432
  if (t === Number)
433
- return Ke.set(e, N);
433
+ return Ke.set(e, C);
434
434
  if (t === Date)
435
- return $t.set(e, N);
435
+ return _t.set(e, C);
436
436
  if (t === JSON)
437
- return _t.set(e, N);
438
- if (qe(t))
439
- return t.set(e, N);
437
+ return Ht.set(e, C);
438
+ if (Oe(t))
439
+ return t.set(e, C);
440
440
  if (Ct(t)) {
441
441
  if (t !== e)
442
442
  throw new G();
443
443
  return e.toString();
444
444
  }
445
- if (Vt(t))
446
- return Zt(t).set(e, N);
445
+ if (Zt(t))
446
+ return jt(t).set(e, C);
447
447
  try {
448
448
  return e.toString();
449
449
  } catch {
@@ -467,18 +467,18 @@ function Yr(e, t) {
467
467
  return a && o.push(a), o;
468
468
  }
469
469
  function Xr(e) {
470
- const t = Ht(e.path.value);
470
+ const t = Ot(e.path.value);
471
471
  return new RegExp(`^${t}$`, "i");
472
472
  }
473
473
  function en(e) {
474
474
  const t = new URLSearchParams(e.query.value);
475
- return Array.from(t.entries()).filter(([, r]) => !It(r)).map(([r, n]) => {
476
- const o = Ht(n);
475
+ return Array.from(t.entries()).filter(([, r]) => !et(r)).map(([r, n]) => {
476
+ const o = Ot(n);
477
477
  return new RegExp(`${Ye(r)}=${o}(&|$)`, "i");
478
478
  });
479
479
  }
480
- function Ht(e) {
481
- return Yr(e, new RegExp(tn, "g")).map((t) => t.startsWith(Q) ? qt(t) : Ye(t)).join("");
480
+ function Ot(e) {
481
+ return Yr(e, new RegExp(tn, "g")).map((t) => t.startsWith(z) ? qt(t) : Ye(t)).join("");
482
482
  }
483
483
  function qt(e) {
484
484
  return [
@@ -486,18 +486,18 @@ function qt(e) {
486
486
  nn
487
487
  ].reduce((t, r) => r(t), e);
488
488
  }
489
- const tn = `\\${Q}\\??([\\w-_]+)\\${X}`, Xe = `\\${Q}\\?([\\w-_]+)\\${X}`, Ot = `\\${Q}([\\w-_]+)\\${X}`;
489
+ const tn = `\\${z}\\??([\\w-_]+)\\${X}`, Xe = `\\${z}\\?([\\w-_]+)\\${X}`, It = `\\${z}([\\w-_]+)\\${X}`;
490
490
  function rn(e) {
491
491
  return e.replace(new RegExp(Xe, "g"), ".*");
492
492
  }
493
- function It(e) {
493
+ function et(e) {
494
494
  return new RegExp(Xe, "g").test(e);
495
495
  }
496
496
  function nn(e) {
497
- return e.replace(new RegExp(Ot, "g"), ".+");
497
+ return e.replace(new RegExp(It, "g"), ".+");
498
498
  }
499
- function Oe(e) {
500
- const [t] = Ue(e, new RegExp(Xe, "g")), [r] = Ue(e, new RegExp(Ot, "g"));
499
+ function be(e) {
500
+ const [t] = Ue(e, new RegExp(Xe, "g")), [r] = Ue(e, new RegExp(It, "g"));
501
501
  return t ?? r;
502
502
  }
503
503
  function Ue(e, t) {
@@ -506,9 +506,9 @@ function Ue(e, t) {
506
506
  function on(e = "", t = {}) {
507
507
  if (!J(e))
508
508
  return {};
509
- const r = new RegExp(`\\${Q}(\\??[\\w-_]+)\\${X}`, "g");
509
+ const r = new RegExp(`\\${z}(\\??[\\w-_]+)\\${X}`, "g");
510
510
  return Array.from(e.matchAll(r)).reduce((o, [a, s]) => {
511
- const u = Oe(a);
511
+ const u = be(a);
512
512
  if (!u)
513
513
  return o;
514
514
  const f = Gr(t, u);
@@ -516,12 +516,12 @@ function on(e = "", t = {}) {
516
516
  }, {});
517
517
  }
518
518
  function an(e) {
519
- return Nt(e) && typeof e.value == "string";
519
+ return Vt(e) && typeof e.value == "string";
520
520
  }
521
521
  function ee(e) {
522
- return e === void 0 ? z() : an(e) ? e : z(e, {});
522
+ return e === void 0 ? Q() : an(e) ? e : Q(e, {});
523
523
  }
524
- function z(e, t) {
524
+ function Q(e, t) {
525
525
  return {
526
526
  value: e ?? "",
527
527
  params: on(e, t)
@@ -530,7 +530,7 @@ function z(e, t) {
530
530
  function Dt(e, t) {
531
531
  we(e.params, t.params);
532
532
  const r = `${e.value}${t.value}`;
533
- return z(r, { ...e.params, ...t.params });
533
+ return Q(r, { ...e.params, ...t.params });
534
534
  }
535
535
  function sn(e, t) {
536
536
  return Dt(e, t);
@@ -546,7 +546,7 @@ function un(e, t) {
546
546
  function fn(e, t) {
547
547
  we(e.params, t.params);
548
548
  const r = [e.value, t.value].filter(J).join("&");
549
- return z(r, { ...e.params, ...t.params });
549
+ return Q(r, { ...e.params, ...t.params });
550
550
  }
551
551
  function ln(e, t) {
552
552
  return we(e, t), { ...e, ...t };
@@ -557,13 +557,13 @@ function Ft(e) {
557
557
  function Mt(e) {
558
558
  return "component" in e && !!e.component;
559
559
  }
560
- function ft(e) {
560
+ function lt(e) {
561
561
  return "props" in e && typeof e.props == "function";
562
562
  }
563
563
  function Tt(e) {
564
564
  return "components" in e && !!e.components;
565
565
  }
566
- function lt(e) {
566
+ function ht(e) {
567
567
  return "props" in e && typeof e.props == "object";
568
568
  }
569
569
  function Jt(e, t) {
@@ -579,10 +579,10 @@ function Jt(e, t) {
579
579
  depth: e.depth + 1
580
580
  };
581
581
  }
582
- function et() {
582
+ function tt() {
583
583
  return typeof window < "u" && typeof window.document < "u";
584
584
  }
585
- function tt(e) {
585
+ function rt(e) {
586
586
  const t = new URLSearchParams(e);
587
587
  return {
588
588
  get: (...r) => t.get(...r),
@@ -611,20 +611,20 @@ function tt(e) {
611
611
  [Symbol.iterator]: () => t[Symbol.iterator]()
612
612
  };
613
613
  }
614
- function rt() {
614
+ function nt() {
615
615
  let e = 0;
616
616
  return () => (++e).toString();
617
617
  }
618
- const hn = rt()();
618
+ const hn = nt()();
619
619
  function dn(e) {
620
620
  return e === hn;
621
621
  }
622
- const nt = rt();
622
+ const ot = nt();
623
623
  function Wt(e) {
624
624
  return e === void 0 ? "" : e;
625
625
  }
626
626
  function pe(e, t) {
627
- const r = nt(), n = Wt(e.name), o = ee(e.path), a = ee(e.query), s = ee(e.hash), u = e.meta ?? {}, f = e.state ?? {}, i = xe({ id: r, meta: u, state: f, ...e, props: t }), m = {
627
+ const r = ot(), n = Wt(e.name), o = ee(e.path), a = ee(e.query), s = ee(e.hash), u = e.meta ?? {}, f = e.state ?? {}, i = xe({ id: r, meta: u, state: f, ...e, props: t }), m = {
628
628
  id: r,
629
629
  matched: i,
630
630
  matches: [i],
@@ -635,20 +635,20 @@ function pe(e, t) {
635
635
  meta: u,
636
636
  state: f,
637
637
  depth: 1,
638
- host: z(),
638
+ host: Q(),
639
639
  prefetch: e.prefetch
640
640
  }, b = Ft(e) ? Jt(e.parent, m) : m;
641
641
  return we(b.path.params, b.query.params, b.hash.params), b;
642
642
  }
643
- const Be = { template: "<div>This is component</div>" }, ot = pe({
643
+ const Be = { template: "<div>This is component</div>" }, at = pe({
644
644
  name: "parentA",
645
645
  path: "/parentA/[paramA]"
646
646
  }), Gt = pe({
647
- parent: ot,
647
+ parent: at,
648
648
  name: "parentA.childA",
649
649
  path: "/childA/[?paramB]"
650
650
  }), pn = pe({
651
- parent: ot,
651
+ parent: at,
652
652
  name: "parentA.childB",
653
653
  path: "/childB/[paramD]",
654
654
  component: Be
@@ -671,37 +671,37 @@ const yn = "lazy", gn = {
671
671
  components: !0,
672
672
  props: !1
673
673
  };
674
- function Ae(e) {
674
+ function ke(e) {
675
675
  return ["eager", "lazy", "intent"].includes(e);
676
676
  }
677
- function zt({ routerPrefetch: e, routePrefetch: t, linkPrefetch: r }, n) {
678
- const o = Te(r, n), a = Te(t, n), s = Te(e, n), u = [
677
+ function Qt({ routerPrefetch: e, routePrefetch: t, linkPrefetch: r }, n) {
678
+ const o = Me(r, n), a = Me(t, n), s = Me(e, n), u = [
679
679
  o,
680
680
  a,
681
681
  s,
682
682
  gn[n],
683
683
  yn
684
- ].reduce((f, i) => Ae(f) ? f : f === !0 && Ae(i) ? i : f === !0 && !Ae(i) ? f : f === void 0 ? i : f, void 0);
685
- return Ae(u) ? u : !1;
684
+ ].reduce((f, i) => ke(f) ? f : f === !0 && ke(i) ? i : f === !0 && !ke(i) ? f : f === void 0 ? i : f, void 0);
685
+ return ke(u) ? u : !1;
686
686
  }
687
- function Te(e, t) {
688
- return Nt(e) ? e[t] : e;
687
+ function Me(e, t) {
688
+ return Vt(e) ? e[t] : e;
689
689
  }
690
- class Qt extends Error {
690
+ class zt extends Error {
691
691
  constructor() {
692
692
  super("Uncaught CallbackContextAbortError");
693
693
  M(this, "response");
694
694
  this.response = { status: "ABORT" };
695
695
  }
696
696
  }
697
- class he extends Error {
697
+ class de extends Error {
698
698
  constructor(r) {
699
699
  super("Uncaught CallbackContextPushError");
700
700
  M(this, "response");
701
701
  this.response = { status: "PUSH", to: r };
702
702
  }
703
703
  }
704
- class Ce extends Error {
704
+ class Ne extends Error {
705
705
  constructor(r) {
706
706
  super("Uncaught CallbackContextRejectionError");
707
707
  M(this, "response");
@@ -710,24 +710,24 @@ class Ce extends Error {
710
710
  }
711
711
  function Kt() {
712
712
  return { reject: (o) => {
713
- throw new Ce(o);
713
+ throw new Ne(o);
714
714
  }, push: (...o) => {
715
- throw new he(o);
715
+ throw new de(o);
716
716
  }, replace: (o, a, s) => {
717
717
  if (T(o)) {
718
718
  const i = a ?? {};
719
- throw new he([o, { ...i, replace: !0 }]);
719
+ throw new de([o, { ...i, replace: !0 }]);
720
720
  }
721
721
  const u = a, f = s ?? {};
722
- throw new he([o, u, { ...f, replace: !0 }]);
722
+ throw new de([o, u, { ...f, replace: !0 }]);
723
723
  }, abort: () => {
724
- throw new Qt();
724
+ throw new zt();
725
725
  } };
726
726
  }
727
727
  function Yt(e) {
728
728
  return typeof e == "object" && e !== null && "then" in e;
729
729
  }
730
- function ht(e) {
730
+ function dt(e) {
731
731
  try {
732
732
  const t = e();
733
733
  return Yt(t) ? t.catch((r) => r) : t;
@@ -737,10 +737,10 @@ function ht(e) {
737
737
  }
738
738
  const Xt = Symbol();
739
739
  function Rn() {
740
- const e = $e(/* @__PURE__ */ new Map()), { push: t, replace: r, reject: n } = Kt(), o = (y, h, g) => h.matches.filter((c) => zt({ ...g, routePrefetch: c.prefetch }, "props") === y).flatMap((c) => b(c)).reduce((c, { id: l, name: A, props: R }) => {
740
+ const e = $e(/* @__PURE__ */ new Map()), { push: t, replace: r, reject: n } = Kt(), o = (y, h, g) => h.matches.filter((c) => Qt({ ...g, routePrefetch: c.prefetch }, "props") === y).flatMap((c) => b(c)).reduce((c, { id: l, name: A, props: R }) => {
741
741
  if (!R)
742
742
  return c;
743
- const w = m(l, A, h), S = ht(() => R(h, {
743
+ const w = m(l, A, h), S = dt(() => R(h, {
744
744
  push: t,
745
745
  replace: r,
746
746
  reject: n,
@@ -758,7 +758,7 @@ function Rn() {
758
758
  continue;
759
759
  const w = m(l, A, y);
760
760
  if (g.push(w), !e.has(w)) {
761
- const S = ht(() => R(y, {
761
+ const S = dt(() => R(y, {
762
762
  push: t,
763
763
  replace: r,
764
764
  reject: n,
@@ -776,7 +776,7 @@ function Rn() {
776
776
  try {
777
777
  return await Promise.all(c), { status: "SUCCESS" };
778
778
  } catch (l) {
779
- if (l instanceof he || l instanceof Ce)
779
+ if (l instanceof de || l instanceof Ne)
780
780
  return l.response;
781
781
  throw l;
782
782
  }
@@ -787,12 +787,12 @@ function Rn() {
787
787
  function f(y, h = !1) {
788
788
  const g = y.matches.at(-2);
789
789
  if (g)
790
- return ft(g) ? {
790
+ return lt(g) ? {
791
791
  name: g.name ?? "",
792
792
  get props() {
793
793
  return i(g, "default", y, h);
794
794
  }
795
- } : lt(g) ? {
795
+ } : ht(g) ? {
796
796
  name: g.name ?? "",
797
797
  props: new Proxy({}, {
798
798
  get(c, l) {
@@ -819,13 +819,13 @@ function Rn() {
819
819
  return [y, h, g.id, JSON.stringify(g.params)].join("-");
820
820
  }
821
821
  function b(y) {
822
- return ft(y) ? [
822
+ return lt(y) ? [
823
823
  {
824
824
  id: y.id,
825
825
  name: "default",
826
826
  props: y.props
827
827
  }
828
- ] : lt(y) ? Object.entries(y.props).map(([h, g]) => ({ id: y.id, name: h, props: g })) : [];
828
+ ] : ht(y) ? Object.entries(y.props).map(([h, g]) => ({ id: y.id, name: h, props: g })) : [];
829
829
  }
830
830
  function U(y) {
831
831
  for (const h of e.keys())
@@ -839,7 +839,7 @@ function Rn() {
839
839
  };
840
840
  }
841
841
  function er() {
842
- const e = se(Xt);
842
+ const e = ce(Xt);
843
843
  if (!e)
844
844
  throw new Re();
845
845
  return e;
@@ -847,12 +847,12 @@ function er() {
847
847
  const wn = Ar(() => new Promise((e) => {
848
848
  e({ default: { template: "foo" } });
849
849
  }));
850
- function dt(e) {
850
+ function pt(e) {
851
851
  return e.name === wn.name && "__asyncLoader" in e;
852
852
  }
853
853
  const tr = Symbol("visibilityObserver");
854
854
  function vn(e) {
855
- const t = se(tr);
855
+ const t = ce(tr);
856
856
  if (!t)
857
857
  throw new Re();
858
858
  return ne(e, (n, o) => {
@@ -863,7 +863,7 @@ function vn(e) {
863
863
  isElementVisible: Z(() => e.value ? t.isElementVisible(e.value) : !1)
864
864
  };
865
865
  }
866
- function pt(e, t, r) {
866
+ function mt(e, t, r) {
867
867
  ne(e, (n, o) => {
868
868
  n && n.addEventListener(t, r), o && o.removeEventListener(t, r);
869
869
  }, { immediate: !0 }), _e(() => {
@@ -880,7 +880,7 @@ function En(e) {
880
880
  }, { immediate: !0 }), ne(a, (i) => {
881
881
  const { route: m, ...b } = _(e);
882
882
  !m || !i || f("lazy", m, b);
883
- }, { immediate: !0 }), pt(r, "focusin", u), pt(r, "mouseover", u);
883
+ }, { immediate: !0 }), mt(r, "focusin", u), mt(r, "mouseover", u);
884
884
  function u() {
885
885
  const { route: i, ...m } = _(e);
886
886
  i && f("intent", i, m);
@@ -895,11 +895,11 @@ function En(e) {
895
895
  }
896
896
  function bn(e, t, r) {
897
897
  t.matches.forEach((n) => {
898
- zt({
898
+ Qt({
899
899
  ...r,
900
900
  routePrefetch: n.prefetch
901
- }, "components") === e && (Mt(n) && dt(n.component) && n.component.__asyncLoader(), Tt(n) && Object.values(n.components).forEach((a) => {
902
- dt(a) && a.__asyncLoader();
901
+ }, "components") === e && (Mt(n) && pt(n.component) && n.component.__asyncLoader(), Tt(n) && Object.values(n.components).forEach((a) => {
902
+ pt(a) && a.__asyncLoader();
903
903
  }));
904
904
  });
905
905
  }
@@ -991,7 +991,7 @@ function Sn(e, t) {
991
991
  function nr(e, t, { exact: r } = {}) {
992
992
  return Pn(e) ? t === void 0 ? !0 : r ? e.matched.name === t : e.matches.map((n) => n.name).includes(t) : !1;
993
993
  }
994
- function at(...e) {
994
+ function st(...e) {
995
995
  const t = new URLSearchParams();
996
996
  for (const r of e) {
997
997
  const n = new URLSearchParams(r);
@@ -1001,7 +1001,7 @@ function at(...e) {
1001
1001
  return t;
1002
1002
  }
1003
1003
  function An(e, t = {}, r = {}) {
1004
- const n = ze(), o = Z(() => {
1004
+ const n = Qe(), o = Z(() => {
1005
1005
  const h = _(e);
1006
1006
  return typeof h != "string" ? h : T(h) ? n.find(h, _(r)) : n.resolve(h, _(t), _(r));
1007
1007
  }), a = Z(() => {
@@ -1028,7 +1028,7 @@ function An(e, t = {}, r = {}) {
1028
1028
  b();
1029
1029
  const g = {
1030
1030
  replace: (h == null ? void 0 : h.replace) ?? i.value.replace,
1031
- query: at(i.value.query, h == null ? void 0 : h.query),
1031
+ query: st(i.value.query, h == null ? void 0 : h.query),
1032
1032
  hash: (h == null ? void 0 : h.hash) ?? i.value.hash,
1033
1033
  state: { ...i.value.state, ...h == null ? void 0 : h.state }
1034
1034
  }, c = _(e);
@@ -1056,7 +1056,7 @@ const kn = ["href"], xn = /* @__PURE__ */ ge({
1056
1056
  state: {}
1057
1057
  },
1058
1058
  setup(e) {
1059
- const t = e, r = ze(), n = Z(() => U(t.to)), o = Z(() => y(t.to)), a = Z(() => {
1059
+ const t = e, r = Qe(), n = Z(() => U(t.to)), o = Z(() => y(t.to)), a = Z(() => {
1060
1060
  const { to: g, ...c } = t;
1061
1061
  return c;
1062
1062
  }), { element: s, isMatch: u, isExactMatch: f, isExternal: i, push: m } = An(() => typeof t.to == "function" ? t.to(r.resolve) : t.to, a), b = Z(() => ({
@@ -1080,25 +1080,25 @@ const kn = ["href"], xn = /* @__PURE__ */ ge({
1080
1080
  function h(g) {
1081
1081
  g.preventDefault(), m();
1082
1082
  }
1083
- return (g, c) => (At(), xr("a", {
1083
+ return (g, c) => (kt(), xr("a", {
1084
1084
  ref_key: "element",
1085
1085
  ref: s,
1086
1086
  href: o.value,
1087
1087
  class: Lr(["router-link", b.value]),
1088
1088
  onClick: h
1089
1089
  }, [
1090
- kt(g.$slots, "default", xt(Ur({ route: n.value, isMatch: ve(u), isExactMatch: ve(f), isExternal: ve(i) })))
1090
+ xt(g.$slots, "default", Lt(Ur({ route: n.value, isMatch: ve(u), isExactMatch: ve(f), isExternal: ve(i) })))
1091
1091
  ], 10, kn));
1092
1092
  }
1093
1093
  }), or = Symbol();
1094
1094
  function Ln() {
1095
- const e = se(or);
1095
+ const e = ce(or);
1096
1096
  if (!e)
1097
1097
  throw new Re();
1098
1098
  return e;
1099
1099
  }
1100
1100
  function ar(e, t) {
1101
- const r = ze();
1101
+ const r = Qe();
1102
1102
  function n() {
1103
1103
  if (!e)
1104
1104
  return;
@@ -1108,8 +1108,8 @@ function ar(e, t) {
1108
1108
  return ne(r.route, n, { immediate: !0, deep: !0 }), r.route;
1109
1109
  }
1110
1110
  const sr = Symbol();
1111
- function st() {
1112
- return se(sr, 0);
1111
+ function ct() {
1112
+ return ce(sr, 0);
1113
1113
  }
1114
1114
  function Un(e, t, r) {
1115
1115
  return ge({
@@ -1119,7 +1119,7 @@ function Un(e, t, r) {
1119
1119
  const n = Br(), o = er(), a = ar();
1120
1120
  return () => {
1121
1121
  const s = o.getProps(e.id, t, a);
1122
- return s instanceof Error ? "" : Yt(s) ? n != null && n.suspense ? fe(Cn, { component: r, props: s }) : fe(Bn, { component: r, props: s }) : fe(r, s);
1122
+ return s instanceof Error ? "" : Yt(s) ? n != null && n.suspense ? le(Nn, { component: r, props: s }) : le(Bn, { component: r, props: s }) : le(r, s);
1123
1123
  };
1124
1124
  }
1125
1125
  });
@@ -1128,18 +1128,18 @@ const Bn = ge((e) => {
1128
1128
  const t = He();
1129
1129
  return ne(() => e.props, async (r) => {
1130
1130
  t.value = await r;
1131
- }, { immediate: !0, deep: !0 }), () => t.value instanceof Error ? "" : t.value ? fe(e.component, t.value) : "";
1131
+ }, { immediate: !0, deep: !0 }), () => t.value instanceof Error ? "" : t.value ? le(e.component, t.value) : "";
1132
1132
  }, {
1133
1133
  props: ["component", "props"]
1134
- }), Cn = ge(async (e) => {
1134
+ }), Nn = ge(async (e) => {
1135
1135
  const t = He();
1136
1136
  return t.value = await e.props, ne(() => t.value, async (r) => {
1137
1137
  t.value = await r;
1138
- }, { deep: !0 }), () => t.value instanceof Error ? "" : t.value ? fe(e.component, t.value) : "";
1138
+ }, { deep: !0 }), () => t.value instanceof Error ? "" : t.value ? le(e.component, t.value) : "";
1139
1139
  }, {
1140
1140
  props: ["component", "props"]
1141
1141
  }), cr = Symbol();
1142
- function Nn() {
1142
+ function Cn() {
1143
1143
  const e = /* @__PURE__ */ new Map();
1144
1144
  return {
1145
1145
  getRouteComponents: (r) => {
@@ -1152,15 +1152,15 @@ function Nn() {
1152
1152
  };
1153
1153
  }
1154
1154
  function Vn(e) {
1155
- return Tt(e) ? mt(e, e.components) : Mt(e) ? mt(e, { default: e.component }) : { default: ir };
1155
+ return Tt(e) ? yt(e, e.components) : Mt(e) ? yt(e, { default: e.component }) : { default: ir };
1156
1156
  }
1157
- function mt(e, t) {
1157
+ function yt(e, t) {
1158
1158
  return Object.fromEntries(
1159
1159
  Object.entries(t).map(([r, n]) => [r, Un(e, r, n)])
1160
1160
  );
1161
1161
  }
1162
1162
  function Zn() {
1163
- const e = se(cr);
1163
+ const e = ce(cr);
1164
1164
  if (!e)
1165
1165
  throw new Re();
1166
1166
  return e;
@@ -1171,20 +1171,20 @@ const ir = /* @__PURE__ */ ge({
1171
1171
  name: { default: "default" }
1172
1172
  },
1173
1173
  setup(e) {
1174
- const t = ar(), r = Ln(), n = st(), { getRouteComponents: o } = Zn();
1175
- Cr(sr, n + 1);
1174
+ const t = ar(), r = Ln(), n = ct(), { getRouteComponents: o } = Zn();
1175
+ Nr(sr, n + 1);
1176
1176
  const a = Z(() => {
1177
1177
  if (r.value)
1178
1178
  return r.value.component;
1179
1179
  const s = t.matches.at(n);
1180
1180
  return s ? o(s)[e.name] : null;
1181
1181
  });
1182
- return (s, u) => a.value ? kt(s.$slots, "default", xt(Nr({ key: 0 }, { route: ve(t), component: a.value, rejection: ve(r) })), () => [
1183
- (At(), Vr(Zr(a.value)))
1182
+ return (s, u) => a.value ? xt(s.$slots, "default", Lt(Cr({ key: 0 }, { route: ve(t), component: a.value, rejection: ve(r) })), () => [
1183
+ (kt(), Vr(Zr(a.value)))
1184
1184
  ]) : jr("", !0);
1185
1185
  }
1186
1186
  });
1187
- class ae {
1187
+ class se {
1188
1188
  constructor() {
1189
1189
  M(this, "onBeforeRouteEnter", /* @__PURE__ */ new Set());
1190
1190
  M(this, "onBeforeRouteUpdate", /* @__PURE__ */ new Set());
@@ -1194,70 +1194,70 @@ class ae {
1194
1194
  M(this, "onAfterRouteLeave", /* @__PURE__ */ new Set());
1195
1195
  }
1196
1196
  }
1197
- const be = (e, t, r) => {
1197
+ const Pe = (e, t, r) => {
1198
1198
  var a, s;
1199
1199
  const n = e.matches, o = (t == null ? void 0 : t.matches) ?? [];
1200
1200
  return ((a = n.at(r)) == null ? void 0 : a.id) !== ((s = o.at(r)) == null ? void 0 : s.id);
1201
- }, Pe = (e, t, r) => {
1201
+ }, Se = (e, t, r) => {
1202
1202
  var a, s;
1203
1203
  const n = e.matches, o = (t == null ? void 0 : t.matches) ?? [];
1204
1204
  return ((a = n.at(r)) == null ? void 0 : a.id) !== ((s = o.at(r)) == null ? void 0 : s.id);
1205
- }, Se = (e, t, r) => {
1205
+ }, Ae = (e, t, r) => {
1206
1206
  var n, o;
1207
1207
  return ((n = e.matches.at(r)) == null ? void 0 : n.id) === ((o = t == null ? void 0 : t.matches.at(r)) == null ? void 0 : o.id);
1208
1208
  };
1209
- function yt(e) {
1209
+ function gt(e) {
1210
1210
  switch (e) {
1211
1211
  case "onBeforeRouteEnter":
1212
1212
  case "onAfterRouteEnter":
1213
- return be;
1213
+ return Pe;
1214
1214
  case "onBeforeRouteUpdate":
1215
1215
  case "onAfterRouteUpdate":
1216
- return Se;
1216
+ return Ae;
1217
1217
  case "onBeforeRouteLeave":
1218
1218
  case "onAfterRouteLeave":
1219
- return Pe;
1219
+ return Se;
1220
1220
  default:
1221
1221
  throw new Error(`Switch is not exhaustive for lifecycle: ${e}`);
1222
1222
  }
1223
1223
  }
1224
1224
  function jn(e, t) {
1225
- const r = new ae();
1225
+ const r = new se();
1226
1226
  return e.matches.forEach((n, o) => {
1227
- n.onBeforeRouteEnter && be(e, t, o) && le(n.onBeforeRouteEnter).forEach((a) => r.onBeforeRouteEnter.add(a)), n.onBeforeRouteUpdate && Se(e, t, o) && le(n.onBeforeRouteUpdate).forEach((a) => r.onBeforeRouteUpdate.add(a));
1227
+ n.onBeforeRouteEnter && Pe(e, t, o) && he(n.onBeforeRouteEnter).forEach((a) => r.onBeforeRouteEnter.add(a)), n.onBeforeRouteUpdate && Ae(e, t, o) && he(n.onBeforeRouteUpdate).forEach((a) => r.onBeforeRouteUpdate.add(a));
1228
1228
  }), t == null || t.matches.forEach((n, o) => {
1229
- n.onBeforeRouteLeave && Pe(e, t, o) && le(n.onBeforeRouteLeave).forEach((a) => r.onBeforeRouteLeave.add(a));
1229
+ n.onBeforeRouteLeave && Se(e, t, o) && he(n.onBeforeRouteLeave).forEach((a) => r.onBeforeRouteLeave.add(a));
1230
1230
  }), r;
1231
1231
  }
1232
1232
  function $n(e, t) {
1233
- const r = new ae();
1233
+ const r = new se();
1234
1234
  return e.matches.forEach((n, o) => {
1235
- n.onAfterRouteEnter && be(e, t, o) && le(n.onAfterRouteEnter).forEach((a) => r.onAfterRouteEnter.add(a)), n.onAfterRouteUpdate && Se(e, t, o) && le(n.onAfterRouteUpdate).forEach((a) => r.onAfterRouteUpdate.add(a));
1235
+ n.onAfterRouteEnter && Pe(e, t, o) && he(n.onAfterRouteEnter).forEach((a) => r.onAfterRouteEnter.add(a)), n.onAfterRouteUpdate && Ae(e, t, o) && he(n.onAfterRouteUpdate).forEach((a) => r.onAfterRouteUpdate.add(a));
1236
1236
  }), t == null || t.matches.forEach((n, o) => {
1237
- n.onAfterRouteLeave && Pe(e, t, o) && le(n.onAfterRouteLeave).forEach((a) => r.onAfterRouteLeave.add(a));
1237
+ n.onAfterRouteLeave && Se(e, t, o) && he(n.onAfterRouteLeave).forEach((a) => r.onAfterRouteLeave.add(a));
1238
1238
  }), r;
1239
1239
  }
1240
1240
  function _n(e, t, r) {
1241
- const n = new ae();
1241
+ const n = new se();
1242
1242
  return e.matches.forEach((o, a) => {
1243
- be(e, t, a) && r.onBeforeRouteEnter.forEach((s) => n.onBeforeRouteEnter.add(s)), Se(e, t, a) && r.onBeforeRouteUpdate.forEach((s) => n.onBeforeRouteUpdate.add(s));
1243
+ Pe(e, t, a) && r.onBeforeRouteEnter.forEach((s) => n.onBeforeRouteEnter.add(s)), Ae(e, t, a) && r.onBeforeRouteUpdate.forEach((s) => n.onBeforeRouteUpdate.add(s));
1244
1244
  }), t == null || t.matches.forEach((o, a) => {
1245
- Pe(e, t, a) && r.onBeforeRouteLeave.forEach((s) => n.onBeforeRouteLeave.add(s));
1245
+ Se(e, t, a) && r.onBeforeRouteLeave.forEach((s) => n.onBeforeRouteLeave.add(s));
1246
1246
  }), n;
1247
1247
  }
1248
1248
  function Hn(e, t, r) {
1249
- const n = new ae();
1249
+ const n = new se();
1250
1250
  return e.matches.forEach((o, a) => {
1251
- be(e, t, a) && r.onAfterRouteEnter.forEach((s) => n.onAfterRouteEnter.add(s)), Se(e, t, a) && r.onAfterRouteUpdate.forEach((s) => n.onAfterRouteUpdate.add(s));
1251
+ Pe(e, t, a) && r.onAfterRouteEnter.forEach((s) => n.onAfterRouteEnter.add(s)), Ae(e, t, a) && r.onAfterRouteUpdate.forEach((s) => n.onAfterRouteUpdate.add(s));
1252
1252
  }), t == null || t.matches.forEach((o, a) => {
1253
- Pe(e, t, a) && r.onAfterRouteLeave.forEach((s) => n.onAfterRouteLeave.add(s));
1253
+ Se(e, t, a) && r.onAfterRouteLeave.forEach((s) => n.onAfterRouteLeave.add(s));
1254
1254
  }), n;
1255
1255
  }
1256
1256
  const ur = Symbol();
1257
- function qn() {
1257
+ function On() {
1258
1258
  const e = {
1259
- global: new ae(),
1260
- component: new ae()
1259
+ global: new se(),
1260
+ component: new se()
1261
1261
  }, { reject: t, push: r, replace: n, abort: o } = Kt(), a = (c) => (e.global.onBeforeRouteEnter.add(c), () => e.global.onBeforeRouteEnter.delete(c)), s = (c) => (e.global.onBeforeRouteUpdate.add(c), () => e.global.onBeforeRouteUpdate.delete(c)), u = (c) => (e.global.onBeforeRouteLeave.add(c), () => e.global.onBeforeRouteLeave.delete(c)), f = (c) => (e.global.onAfterRouteEnter.add(c), () => e.global.onAfterRouteEnter.delete(c)), i = (c) => (e.global.onAfterRouteUpdate.add(c), () => e.global.onAfterRouteUpdate.delete(c)), m = (c) => (e.global.onAfterRouteLeave.add(c), () => e.global.onAfterRouteLeave.delete(c));
1262
1262
  async function b({ to: c, from: l }) {
1263
1263
  const { global: A, component: R } = e, w = jn(c, l), S = _n(c, l, A), x = [
@@ -1280,7 +1280,7 @@ function qn() {
1280
1280
  }));
1281
1281
  await Promise.all(p);
1282
1282
  } catch (p) {
1283
- if (p instanceof he || p instanceof Ce || p instanceof Qt)
1283
+ if (p instanceof de || p instanceof Ne || p instanceof zt)
1284
1284
  return p.response;
1285
1285
  throw p;
1286
1286
  }
@@ -1309,7 +1309,7 @@ function qn() {
1309
1309
  }));
1310
1310
  await Promise.all(p);
1311
1311
  } catch (p) {
1312
- if (p instanceof he || p instanceof Ce)
1312
+ if (p instanceof de || p instanceof Ne)
1313
1313
  return p.response;
1314
1314
  throw p;
1315
1315
  }
@@ -1321,14 +1321,14 @@ function qn() {
1321
1321
  runBeforeRouteHooks: b,
1322
1322
  runAfterRouteHooks: U,
1323
1323
  addComponentBeforeRouteHook: ({ lifecycle: c, depth: l, hook: A }) => {
1324
- const R = yt(c), w = e.component[c], S = (x, p) => {
1324
+ const R = gt(c), w = e.component[c], S = (x, p) => {
1325
1325
  if (R(x, p.from, l))
1326
1326
  return A(x, p);
1327
1327
  };
1328
1328
  return w.add(S), () => w.delete(S);
1329
1329
  },
1330
1330
  addComponentAfterRouteHook: ({ lifecycle: c, depth: l, hook: A }) => {
1331
- const R = yt(c), w = e.component[c], S = (x, p) => {
1331
+ const R = gt(c), w = e.component[c], S = (x, p) => {
1332
1332
  if (R(x, p.from, l))
1333
1333
  return A(x, p);
1334
1334
  };
@@ -1346,24 +1346,24 @@ function qn() {
1346
1346
  };
1347
1347
  }
1348
1348
  function fr() {
1349
- const e = se(ur);
1349
+ const e = ce(ur);
1350
1350
  if (!e)
1351
1351
  throw new Re();
1352
1352
  return e;
1353
1353
  }
1354
1354
  function lr(e) {
1355
1355
  return (t) => {
1356
- const r = st(), o = fr().addComponentBeforeRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
1356
+ const r = ct(), o = fr().addComponentBeforeRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
1357
1357
  return _e(o), o;
1358
1358
  };
1359
1359
  }
1360
1360
  function hr(e) {
1361
1361
  return (t) => {
1362
- const r = st(), o = fr().addComponentAfterRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
1362
+ const r = ct(), o = fr().addComponentAfterRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
1363
1363
  return _e(o), o;
1364
1364
  };
1365
1365
  }
1366
- const ko = lr("onBeforeRouteLeave"), xo = lr("onBeforeRouteUpdate"), Lo = hr("onAfterRouteLeave"), Uo = hr("onAfterRouteUpdate");
1366
+ const xo = lr("onBeforeRouteLeave"), Lo = lr("onBeforeRouteUpdate"), Uo = hr("onAfterRouteLeave"), Bo = hr("onAfterRouteUpdate");
1367
1367
  function Y() {
1368
1368
  return Y = Object.assign ? Object.assign.bind() : function(e) {
1369
1369
  for (var t = 1; t < arguments.length; t++) {
@@ -1391,8 +1391,8 @@ function te(e, t) {
1391
1391
  }
1392
1392
  }
1393
1393
  }
1394
- var Ne = "beforeunload", On = "hashchange", dr = "popstate";
1395
- function gt(e) {
1394
+ var Ce = "beforeunload", qn = "hashchange", dr = "popstate";
1395
+ function Rt(e) {
1396
1396
  e === void 0 && (e = {});
1397
1397
  var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
1398
1398
  function a() {
@@ -1479,7 +1479,7 @@ function gt(e) {
1479
1479
  R(p, d);
1480
1480
  }
1481
1481
  if (l(E, k, L)) {
1482
- var C = c(k, m + 1), V = C[0], $ = C[1];
1482
+ var N = c(k, m + 1), V = N[0], $ = N[1];
1483
1483
  try {
1484
1484
  o.pushState(V, "", $);
1485
1485
  } catch {
@@ -1494,7 +1494,7 @@ function gt(e) {
1494
1494
  w(p, d);
1495
1495
  }
1496
1496
  if (l(E, k, L)) {
1497
- var C = c(k, m), V = C[0], $ = C[1];
1497
+ var N = c(k, m), V = N[0], $ = N[1];
1498
1498
  o.replaceState(V, "", $), A(E);
1499
1499
  }
1500
1500
  }
@@ -1523,8 +1523,8 @@ function gt(e) {
1523
1523
  },
1524
1524
  block: function(d) {
1525
1525
  var E = y.push(d);
1526
- return y.length === 1 && n.addEventListener(Ne, Ve), function() {
1527
- E(), y.length || n.removeEventListener(Ne, Ve);
1526
+ return y.length === 1 && n.addEventListener(Ce, Ve), function() {
1527
+ E(), y.length || n.removeEventListener(Ce, Ve);
1528
1528
  };
1529
1529
  }
1530
1530
  };
@@ -1534,13 +1534,13 @@ function In(e) {
1534
1534
  e === void 0 && (e = {});
1535
1535
  var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
1536
1536
  function a() {
1537
- var d = Ee(n.location.hash.substr(1)), E = d.pathname, k = E === void 0 ? "/" : E, L = d.search, C = L === void 0 ? "" : L, V = d.hash, $ = V === void 0 ? "" : V, O = o.state || {};
1538
- return [O.idx, me({
1537
+ var d = Ee(n.location.hash.substr(1)), E = d.pathname, k = E === void 0 ? "/" : E, L = d.search, N = L === void 0 ? "" : L, V = d.hash, $ = V === void 0 ? "" : V, q = o.state || {};
1538
+ return [q.idx, me({
1539
1539
  pathname: k,
1540
- search: C,
1540
+ search: N,
1541
1541
  hash: $,
1542
- state: O.usr || null,
1543
- key: O.key || "default"
1542
+ state: q.usr || null,
1543
+ key: q.key || "default"
1544
1544
  })];
1545
1545
  }
1546
1546
  var s = null;
@@ -1551,14 +1551,14 @@ function In(e) {
1551
1551
  var d = j.Pop, E = a(), k = E[0], L = E[1];
1552
1552
  if (y.length)
1553
1553
  if (k != null) {
1554
- var C = m - k;
1555
- C && (s = {
1554
+ var N = m - k;
1555
+ N && (s = {
1556
1556
  action: d,
1557
1557
  location: L,
1558
1558
  retry: function() {
1559
- x(C * -1);
1559
+ x(N * -1);
1560
1560
  }
1561
- }, x(C));
1561
+ }, x(N));
1562
1562
  } else
1563
1563
  process.env.NODE_ENV !== "production" && te(
1564
1564
  !1,
@@ -1571,7 +1571,7 @@ function In(e) {
1571
1571
  R(d);
1572
1572
  }
1573
1573
  }
1574
- n.addEventListener(dr, u), n.addEventListener(On, function() {
1574
+ n.addEventListener(dr, u), n.addEventListener(qn, function() {
1575
1575
  var d = a(), E = d[1];
1576
1576
  re(E) !== re(b) && u();
1577
1577
  });
@@ -1624,27 +1624,27 @@ function In(e) {
1624
1624
  }
1625
1625
  function w(d, E) {
1626
1626
  var k = j.Push, L = c(d, E);
1627
- function C() {
1627
+ function N() {
1628
1628
  w(d, E);
1629
1629
  }
1630
- if (process.env.NODE_ENV !== "production" && te(L.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(d) + ")"), A(k, L, C)) {
1631
- var V = l(L, m + 1), $ = V[0], O = V[1];
1630
+ if (process.env.NODE_ENV !== "production" && te(L.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(d) + ")"), A(k, L, N)) {
1631
+ var V = l(L, m + 1), $ = V[0], q = V[1];
1632
1632
  try {
1633
- o.pushState($, "", O);
1633
+ o.pushState($, "", q);
1634
1634
  } catch {
1635
- n.location.assign(O);
1635
+ n.location.assign(q);
1636
1636
  }
1637
1637
  R(k);
1638
1638
  }
1639
1639
  }
1640
1640
  function S(d, E) {
1641
1641
  var k = j.Replace, L = c(d, E);
1642
- function C() {
1642
+ function N() {
1643
1643
  S(d, E);
1644
1644
  }
1645
- if (process.env.NODE_ENV !== "production" && te(L.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(d) + ")"), A(k, L, C)) {
1646
- var V = l(L, m), $ = V[0], O = V[1];
1647
- o.replaceState($, "", O), R(k);
1645
+ if (process.env.NODE_ENV !== "production" && te(L.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(d) + ")"), A(k, L, N)) {
1646
+ var V = l(L, m), $ = V[0], q = V[1];
1647
+ o.replaceState($, "", q), R(k);
1648
1648
  }
1649
1649
  }
1650
1650
  function x(d) {
@@ -1672,14 +1672,14 @@ function In(e) {
1672
1672
  },
1673
1673
  block: function(E) {
1674
1674
  var k = y.push(E);
1675
- return y.length === 1 && n.addEventListener(Ne, Ve), function() {
1676
- k(), y.length || n.removeEventListener(Ne, Ve);
1675
+ return y.length === 1 && n.addEventListener(Ce, Ve), function() {
1676
+ k(), y.length || n.removeEventListener(Ce, Ve);
1677
1677
  };
1678
1678
  }
1679
1679
  };
1680
1680
  return p;
1681
1681
  }
1682
- function Rt(e) {
1682
+ function wt(e) {
1683
1683
  e === void 0 && (e = {});
1684
1684
  var t = e, r = t.initialEntries, n = r === void 0 ? ["/"] : r, o = t.initialIndex, a = n.map(function(R) {
1685
1685
  var w = me(Y({
@@ -1690,7 +1690,7 @@ function Rt(e) {
1690
1690
  key: Ze()
1691
1691
  }, typeof R == "string" ? Ee(R) : R));
1692
1692
  return process.env.NODE_ENV !== "production" && te(w.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(R) + ")"), w;
1693
- }), s = wt(o ?? a.length - 1, 0, a.length - 1), u = j.Pop, f = a[s], i = ye(), m = ye();
1693
+ }), s = vt(o ?? a.length - 1, 0, a.length - 1), u = j.Pop, f = a[s], i = ye(), m = ye();
1694
1694
  function b(R) {
1695
1695
  return typeof R == "string" ? R : re(R);
1696
1696
  }
@@ -1732,7 +1732,7 @@ function Rt(e) {
1732
1732
  process.env.NODE_ENV !== "production" && te(f.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(R) + ")"), y(S, x, p) && (a[s] = x, h(S, x));
1733
1733
  }
1734
1734
  function l(R) {
1735
- var w = wt(s + R, 0, a.length - 1), S = j.Pop, x = a[w];
1735
+ var w = vt(s + R, 0, a.length - 1), S = j.Pop, x = a[w];
1736
1736
  function p() {
1737
1737
  l(R);
1738
1738
  }
@@ -1767,7 +1767,7 @@ function Rt(e) {
1767
1767
  };
1768
1768
  return A;
1769
1769
  }
1770
- function wt(e, t, r) {
1770
+ function vt(e, t, r) {
1771
1771
  return Math.min(Math.max(e, t), r);
1772
1772
  }
1773
1773
  function Ve(e) {
@@ -1824,7 +1824,7 @@ function Dn(e, t) {
1824
1824
  updateRoute: n
1825
1825
  };
1826
1826
  }
1827
- function q(e) {
1827
+ function O(e) {
1828
1828
  return !e.startsWith("http") ? Mn(e) : Fn(e);
1829
1829
  }
1830
1830
  function Fn(e) {
@@ -1849,7 +1849,7 @@ function Mn(e) {
1849
1849
  }
1850
1850
  function Tn(e) {
1851
1851
  return (t) => {
1852
- const { host: r } = q(t);
1852
+ const { host: r } = O(t);
1853
1853
  return !(r === void 0 || r === e);
1854
1854
  };
1855
1855
  }
@@ -1880,11 +1880,11 @@ function Jn({ mode: e, listener: t }) {
1880
1880
  function Wn(e = "auto") {
1881
1881
  switch (e) {
1882
1882
  case "auto":
1883
- return et() ? gt() : Rt();
1883
+ return tt() ? Rt() : wt();
1884
1884
  case "browser":
1885
- return gt();
1886
- case "memory":
1887
1885
  return Rt();
1886
+ case "memory":
1887
+ return wt();
1888
1888
  case "hash":
1889
1889
  return In();
1890
1890
  default:
@@ -1893,15 +1893,15 @@ function Wn(e = "auto") {
1893
1893
  }
1894
1894
  }
1895
1895
  function Gn(e) {
1896
- return ge(() => () => fe("h1", e), {
1896
+ return ge(() => () => le("h1", e), {
1897
1897
  name: e,
1898
1898
  props: []
1899
1899
  });
1900
1900
  }
1901
- function zn(e) {
1901
+ function Qn(e) {
1902
1902
  const t = (a) => xe(e[a] ?? Gn(a)), r = (a) => {
1903
1903
  const s = xe(t(a)), u = {
1904
- id: nt(),
1904
+ id: ot(),
1905
1905
  component: s,
1906
1906
  meta: {},
1907
1907
  state: {}
@@ -1911,7 +1911,7 @@ function zn(e) {
1911
1911
  matched: u,
1912
1912
  matches: [u],
1913
1913
  name: a,
1914
- query: tt(""),
1914
+ query: rt(""),
1915
1915
  params: {},
1916
1916
  state: {},
1917
1917
  href: "/",
@@ -1932,7 +1932,7 @@ function zn(e) {
1932
1932
  getRejectionRoute: r
1933
1933
  };
1934
1934
  }
1935
- class Qn extends Error {
1935
+ class zn extends Error {
1936
1936
  constructor() {
1937
1937
  super("initialUrl must be set if window.location is unavailable");
1938
1938
  }
@@ -1940,9 +1940,9 @@ class Qn extends Error {
1940
1940
  function Kn(e) {
1941
1941
  if (e)
1942
1942
  return e;
1943
- if (et())
1943
+ if (tt())
1944
1944
  return window.location.toString();
1945
- throw new Qn();
1945
+ throw new zn();
1946
1946
  }
1947
1947
  function mr(e) {
1948
1948
  return !!e && typeof e == "object";
@@ -1951,9 +1951,9 @@ const je = !0;
1951
1951
  function Yn(e, t, r) {
1952
1952
  if (mr(e) && t in e) {
1953
1953
  const n = e[t];
1954
- return typeof n == "string" ? de(n, r, je) : n;
1954
+ return typeof n == "string" ? oe(n, r, je) : n;
1955
1955
  }
1956
- return de(void 0, r, je);
1956
+ return oe(void 0, r, je);
1957
1957
  }
1958
1958
  function yr(e, t) {
1959
1959
  const r = {};
@@ -1966,11 +1966,11 @@ function yr(e, t) {
1966
1966
  function Xn(e, t, r) {
1967
1967
  if (mr(e) && t in e) {
1968
1968
  const n = e[t];
1969
- return oe(n, r, je);
1969
+ return ae(n, r, je);
1970
1970
  }
1971
- return oe(void 0, r, je);
1971
+ return ae(void 0, r, je);
1972
1972
  }
1973
- const vt = (e, t) => {
1973
+ const Et = (e, t) => {
1974
1974
  const r = {};
1975
1975
  for (const [n, o] of Object.entries(e)) {
1976
1976
  const a = Xn(t, n, o);
@@ -1979,7 +1979,7 @@ const vt = (e, t) => {
1979
1979
  return r;
1980
1980
  };
1981
1981
  function eo() {
1982
- const e = $e(/* @__PURE__ */ new Map()), t = et() ? s() : null, r = (u) => {
1982
+ const e = $e(/* @__PURE__ */ new Map()), t = tt() ? s() : null, r = (u) => {
1983
1983
  e.set(u, !1), t == null || t.observe(u);
1984
1984
  }, n = (u) => {
1985
1985
  e.delete(u), t == null || t.unobserve(u);
@@ -2013,7 +2013,7 @@ function Rr(e, t) {
2013
2013
  if (!t)
2014
2014
  return e;
2015
2015
  const { name: r, param: n, value: o } = t, a = wr(e, r);
2016
- return Ue(e, a).reduce((u, f) => f === void 0 ? u : u.replace(f, () => oe(o, n, r.startsWith("?"))), e);
2016
+ return Ue(e, a).reduce((u, f) => f === void 0 ? u : u.replace(f, () => ae(o, n, r.startsWith("?"))), e);
2017
2017
  }
2018
2018
  function wr(e, t) {
2019
2019
  const r = [
@@ -2026,35 +2026,35 @@ function wr(e, t) {
2026
2026
  function ro(e, t) {
2027
2027
  if (!t.startsWith("?"))
2028
2028
  return e;
2029
- const r = new RegExp(`\\${Q}\\${t}\\${X}`, "g");
2029
+ const r = new RegExp(`\\${z}\\${t}\\${X}`, "g");
2030
2030
  return e.replace(r, "(.*)");
2031
2031
  }
2032
2032
  function no(e, t) {
2033
2033
  if (t.startsWith("?"))
2034
2034
  return e;
2035
- const r = new RegExp(`\\${Q}${t}\\${X}`, "g");
2035
+ const r = new RegExp(`\\${z}${t}\\${X}`, "g");
2036
2036
  return e.replace(r, "(.+)");
2037
2037
  }
2038
2038
  function vr({ protocol: e, host: t, pathname: r, search: n, searchParams: o, hash: a }) {
2039
2039
  const s = new URL("https://localhost");
2040
2040
  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);
2041
2041
  const u = s.toString().replace(/^https:\/\/localhost\/*/, "/");
2042
- return Lt(u);
2042
+ return Ut(u);
2043
2043
  }
2044
2044
  function oo(e, t = {}) {
2045
- const { params: r = {}, query: n } = t, o = so(e.query, r), a = at(o, n), s = Et(e.path, r), u = e.hash.value ? Et(e.hash, r) : t.hash, f = ao(e.host, r), { protocol: i, host: m } = q(f);
2045
+ const { params: r = {}, query: n } = t, o = so(e.query, r), a = st(o, n), s = bt(e.path, r), u = e.hash.value ? bt(e.hash, r) : t.hash, f = ao(e.host, r), { protocol: i, host: m } = O(f);
2046
2046
  return vr({ protocol: i, host: m, pathname: s, searchParams: a, hash: u });
2047
2047
  }
2048
2048
  function ao(e, t) {
2049
2049
  const r = e.value && !e.value.startsWith("http") ? `https://${e.value}` : e.value;
2050
2050
  return Object.entries(e.params).reduce((n, [o, a]) => {
2051
- const s = Oe(`${Q}${o}${X}`);
2051
+ const s = be(`${z}${o}${X}`);
2052
2052
  return s ? Rr(n, { name: o, param: a, value: t[s] }) : n;
2053
2053
  }, r);
2054
2054
  }
2055
- function Et(e, t) {
2055
+ function bt(e, t) {
2056
2056
  return Object.entries(e.params).reduce((r, [n, o]) => {
2057
- const a = Oe(`${Q}${n}${X}`);
2057
+ const a = be(`${z}${n}${X}`);
2058
2058
  return a ? Rr(r, { name: n, param: o, value: t[a] }) : r;
2059
2059
  }, e.value);
2060
2060
  }
@@ -2063,129 +2063,140 @@ function so(e, t) {
2063
2063
  if (!e.value)
2064
2064
  return r;
2065
2065
  for (const [n, o] of Array.from(r.entries())) {
2066
- const a = Oe(o);
2066
+ const a = be(o);
2067
2067
  if (!a)
2068
2068
  continue;
2069
- const u = It(o), f = u ? `?${a}` : a, i = oe(t[a], e.params[f], u), m = t[a] === void 0 && i === "";
2069
+ const u = et(o), f = u ? `?${a}` : a, i = ae(t[a], e.params[f], u), m = t[a] === void 0 && i === "";
2070
2070
  u && m ? r.delete(n, o) : r.set(n, i);
2071
2071
  }
2072
2072
  return r;
2073
2073
  }
2074
2074
  const co = (e, t) => {
2075
2075
  try {
2076
- ct(e, t);
2076
+ it(e, t);
2077
2077
  } catch {
2078
2078
  return !1;
2079
2079
  }
2080
2080
  return !0;
2081
- }, ct = (e, t) => {
2082
- const { protocol: r, host: n, pathname: o, search: a, hash: s } = q(t);
2081
+ }, it = (e, t) => {
2082
+ const { protocol: r, host: n, pathname: o, search: a, hash: s } = O(t);
2083
2083
  return {
2084
- ...ke(e.host, `${r}//${n}`),
2085
- ...ke(e.path, o),
2086
- ...ke(e.query, a),
2087
- ...ke(e.hash, s)
2084
+ ...Te(e.host, `${r}//${n}`),
2085
+ ...Te(e.path, o),
2086
+ ...io(e.query, a),
2087
+ ...Te(e.hash, s)
2088
2088
  };
2089
2089
  };
2090
- function ke(e, t) {
2090
+ function Te(e, t) {
2091
2091
  const r = {}, n = decodeURIComponent(t);
2092
2092
  for (const [o, a] of Object.entries(e.params)) {
2093
- const s = o.startsWith("?"), u = s ? o.slice(1) : o, f = gr(n, e.value, o), i = de(f, a, s);
2093
+ const s = o.startsWith("?"), u = s ? o.slice(1) : o, f = gr(n, e.value, o), i = oe(f, a, s);
2094
2094
  r[u] = i;
2095
2095
  }
2096
2096
  return r;
2097
2097
  }
2098
- function io(e, t = {}, r = {}) {
2098
+ function io(e, t) {
2099
+ const r = {}, n = new URLSearchParams(e.value), o = new URLSearchParams(t);
2100
+ for (const [a, s] of Array.from(n.entries())) {
2101
+ const u = be(s);
2102
+ if (!u)
2103
+ continue;
2104
+ const i = et(s), m = i ? `?${u}` : u, b = o.get(a) ?? void 0, U = oe(b, e.params[m], i);
2105
+ r[u] = U;
2106
+ }
2107
+ return r;
2108
+ }
2109
+ function uo(e, t = {}, r = {}) {
2099
2110
  const n = oo(e, {
2100
2111
  params: t,
2101
2112
  query: r.query,
2102
2113
  hash: r.hash
2103
- }), { search: o, hash: a } = q(n);
2114
+ }), { search: o, hash: a } = O(n);
2104
2115
  return {
2105
2116
  id: e.id,
2106
2117
  matched: e.matched,
2107
2118
  matches: e.matches,
2108
2119
  name: e.name,
2109
- query: tt(o),
2110
- params: ct(e, n),
2120
+ query: rt(o),
2121
+ params: it(e, n),
2111
2122
  state: yr(e.state, r.state),
2112
2123
  hash: a,
2113
2124
  href: n
2114
2125
  };
2115
2126
  }
2116
- const uo = (e) => "name" in e.matched && !!e.matched.name, fo = (e, t) => {
2117
- const { pathname: r } = q(t);
2127
+ const fo = (e) => "name" in e.matched && !!e.matched.name, lo = (e, t) => {
2128
+ const { pathname: r } = O(t);
2118
2129
  return Xr(e).test(r);
2119
- }, lo = (e, t) => {
2120
- const { search: r } = q(t);
2130
+ }, ho = (e, t) => {
2131
+ const { search: r } = O(t);
2121
2132
  return en(e).every((o) => o.test(r));
2122
2133
  }, Ge = (e, t) => {
2123
- const { hash: r } = q(t), { value: n } = e.hash;
2134
+ const { hash: r } = O(t), { value: n } = e.hash;
2124
2135
  return J(n) ? `#${n.replace(/^#*/, "")}`.toLowerCase() === r.toLowerCase() : !0;
2125
2136
  };
2126
- function ho(e) {
2127
- const { searchParams: t, pathname: r } = q(e), n = -1, o = 1;
2137
+ function po(e) {
2138
+ const { searchParams: t, pathname: r } = O(e), n = -1, o = 1;
2128
2139
  return (a, s) => {
2129
- const u = Pt(a, t), f = bt(a, r), i = Pt(s, t), m = bt(s, r);
2140
+ const u = St(a, t), f = Pt(a, r), i = St(s, t), m = Pt(s, r);
2130
2141
  return a.depth > s.depth ? n : a.depth < s.depth ? o : u + f > i + m ? n : u + f < i + m ? o : Ge(a, e) ? n : Ge(s, e) ? o : 0;
2131
2142
  };
2132
2143
  }
2133
- function bt(e, t) {
2144
+ function Pt(e, t) {
2134
2145
  const r = Object.keys(e.path.params).filter((o) => o.startsWith("?")).map((o) => o), n = r.filter((o) => gr(t, e.path.value, o) === void 0);
2135
2146
  return r.length - n.length;
2136
2147
  }
2137
- function Pt(e, t) {
2148
+ function St(e, t) {
2138
2149
  const r = new URLSearchParams(t), n = new URLSearchParams(e.query.value), o = Array.from(n.keys()), a = o.filter((s) => !r.has(s));
2139
2150
  return o.length - a.length;
2140
2151
  }
2141
- const po = [
2142
- uo,
2152
+ const mo = [
2143
2153
  fo,
2144
2154
  lo,
2155
+ ho,
2145
2156
  Ge,
2146
2157
  co
2147
2158
  ];
2148
- function mo(e, t) {
2149
- const r = ho(t);
2150
- return e.filter((n) => po.every((o) => o(n, t))).sort(r);
2159
+ function yo(e, t) {
2160
+ const r = po(t);
2161
+ return e.filter((n) => mo.every((o) => o(n, t))).sort(r);
2151
2162
  }
2152
- function yo(e, t, r) {
2153
- const n = mo(e, t);
2163
+ function go(e, t, r) {
2164
+ const n = yo(e, t);
2154
2165
  if (!n.length)
2155
2166
  return;
2156
- const [o] = n, { searchParams: a, hash: s } = q(t);
2167
+ const [o] = n, { searchParams: a, hash: s } = O(t);
2157
2168
  return {
2158
2169
  id: o.id,
2159
2170
  matched: o.matched,
2160
2171
  matches: o.matches,
2161
2172
  name: o.name,
2162
- query: tt(a),
2163
- params: ct(o, t),
2173
+ query: rt(a),
2174
+ params: it(o, t),
2164
2175
  state: yr(o.state, r),
2165
2176
  hash: s,
2166
- href: Lt(t)
2177
+ href: Ut(t)
2167
2178
  };
2168
2179
  }
2169
- function St(e, t) {
2170
- const r = typeof e == "string" ? q(e) : e, n = typeof t == "string" ? q(t) : t, o = r.searchParams ?? new URLSearchParams(r.search), a = n.searchParams ?? new URLSearchParams(n.search);
2180
+ function At(e, t) {
2181
+ const r = typeof e == "string" ? O(e) : e, n = typeof t == "string" ? O(t) : t, o = r.searchParams ?? new URLSearchParams(r.search), a = n.searchParams ?? new URLSearchParams(n.search);
2171
2182
  return vr({
2172
2183
  protocol: J(n.protocol) ? n.protocol : r.protocol,
2173
2184
  host: J(n.host) ? n.host : r.host,
2174
2185
  pathname: J(n.pathname) ? n.pathname : r.pathname,
2175
- searchParams: at(a, o),
2186
+ searchParams: st(a, o),
2176
2187
  hash: J(n.hash) ? n.hash : r.hash
2177
2188
  });
2178
2189
  }
2179
- function go(e, t) {
2190
+ function Ro(e, t) {
2180
2191
  return J(t) ? e.map((r) => {
2181
- const n = `${t}${r.path}`;
2192
+ const n = `${t}${r.path.value}`;
2182
2193
  return {
2183
2194
  ...r,
2184
- path: z(n, r.path.params)
2195
+ path: Q(n, r.path.params)
2185
2196
  };
2186
2197
  }) : e;
2187
2198
  }
2188
- class Ro extends Error {
2199
+ class wo extends Error {
2189
2200
  /**
2190
2201
  * Constructs a new DuplicateNamesError instance with a message indicating the problematic name.
2191
2202
  * @param name - The name of the name that was duplicated.
@@ -2194,33 +2205,33 @@ class Ro extends Error {
2194
2205
  super(`Invalid Name "${t}": Router does not support multiple routes with the same name. All name names must be unique.`);
2195
2206
  }
2196
2207
  }
2197
- function wo(e) {
2208
+ function vo(e) {
2198
2209
  const t = e.map(({ name: r }) => r);
2199
2210
  for (const r of t)
2200
- if (Bt(t, r) > 1)
2201
- throw new Ro(r);
2211
+ if (Nt(t, r) > 1)
2212
+ throw new wo(r);
2202
2213
  }
2203
- function vo(e, t = [], r) {
2214
+ function Eo(e, t = [], r) {
2204
2215
  const n = [
2205
2216
  ...e,
2206
2217
  ...t.map((o) => o.routes)
2207
2218
  ].flat();
2208
- return wo(n), go(n, r);
2219
+ return vo(n), Ro(n, r);
2209
2220
  }
2210
- function Eo(e = {}, t = []) {
2211
- const r = new ae();
2212
- return ie("onBeforeRouteEnter", e, t).forEach((n) => r.onBeforeRouteEnter.add(n)), ie("onBeforeRouteUpdate", e, t).forEach((n) => r.onBeforeRouteUpdate.add(n)), ie("onBeforeRouteLeave", e, t).forEach((n) => r.onBeforeRouteLeave.add(n)), ie("onAfterRouteEnter", e, t).forEach((n) => r.onAfterRouteEnter.add(n)), ie("onAfterRouteUpdate", e, t).forEach((n) => r.onAfterRouteUpdate.add(n)), ie("onAfterRouteLeave", e, t).forEach((n) => r.onAfterRouteLeave.add(n)), r;
2221
+ function bo(e = {}, t = []) {
2222
+ const r = new se();
2223
+ return ue("onBeforeRouteEnter", e, t).forEach((n) => r.onBeforeRouteEnter.add(n)), ue("onBeforeRouteUpdate", e, t).forEach((n) => r.onBeforeRouteUpdate.add(n)), ue("onBeforeRouteLeave", e, t).forEach((n) => r.onBeforeRouteLeave.add(n)), ue("onAfterRouteEnter", e, t).forEach((n) => r.onAfterRouteEnter.add(n)), ue("onAfterRouteUpdate", e, t).forEach((n) => r.onAfterRouteUpdate.add(n)), ue("onAfterRouteLeave", e, t).forEach((n) => r.onAfterRouteLeave.add(n)), r;
2213
2224
  }
2214
- function ie(e, t, r) {
2225
+ function ue(e, t, r) {
2215
2226
  return [
2216
2227
  t[e],
2217
2228
  ...r.map((o) => o[e])
2218
2229
  ].flat().filter((o) => o !== void 0);
2219
2230
  }
2220
- function Bo(e, t, r = []) {
2221
- const n = vo(e, r, t == null ? void 0 : t.base), o = qn();
2222
- o.addGlobalRouteHooks(Eo(t, r));
2223
- const a = rt(), s = Rn(), u = Nn(), f = eo(), i = Jn({
2231
+ function No(e, t, r = []) {
2232
+ const n = Eo(e, r, t == null ? void 0 : t.base), o = On();
2233
+ o.addGlobalRouteHooks(bo(t, r));
2234
+ const a = nt(), s = Rn(), u = Cn(), f = eo(), i = Jn({
2224
2235
  mode: t == null ? void 0 : t.historyMode,
2225
2236
  listener: ({ location: P }) => {
2226
2237
  const B = re(P);
@@ -2228,7 +2239,7 @@ function Bo(e, t, r = []) {
2228
2239
  }
2229
2240
  });
2230
2241
  function m(P, B = {}) {
2231
- return yo(n, P, B.state);
2242
+ return go(n, P, B.state);
2232
2243
  }
2233
2244
  async function b(P, B = {}) {
2234
2245
  const W = a();
@@ -2236,7 +2247,7 @@ function Bo(e, t, r = []) {
2236
2247
  i.update(P, B);
2237
2248
  return;
2238
2249
  }
2239
- const I = m(P, B) ?? A("NotFound"), H = it(W), K = await o.runBeforeRouteHooks({ to: I, from: H });
2250
+ const I = m(P, B) ?? A("NotFound"), H = ut(W), K = await o.runBeforeRouteHooks({ to: I, from: H });
2240
2251
  switch (K.status) {
2241
2252
  // On abort do nothing
2242
2253
  case "ABORT":
@@ -2256,9 +2267,9 @@ function Bo(e, t, r = []) {
2256
2267
  default:
2257
2268
  throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(K)}`);
2258
2269
  }
2259
- const Ie = W;
2270
+ const qe = W;
2260
2271
  s.setProps(I).then((D) => {
2261
- if (Ie === W)
2272
+ if (qe === W)
2262
2273
  switch (D.status) {
2263
2274
  case "SUCCESS":
2264
2275
  break;
@@ -2269,8 +2280,8 @@ function Bo(e, t, r = []) {
2269
2280
  c(D.type);
2270
2281
  break;
2271
2282
  default:
2272
- const De = D;
2273
- throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(De)}`);
2283
+ const Ie = D;
2284
+ throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(Ie)}`);
2274
2285
  }
2275
2286
  }), x(I);
2276
2287
  const F = await o.runAfterRouteHooks({ to: I, from: H });
@@ -2293,24 +2304,24 @@ function Bo(e, t, r = []) {
2293
2304
  const I = n.find((H) => H.name === P);
2294
2305
  if (!I)
2295
2306
  throw new to(String(P));
2296
- return io(I, B, W);
2307
+ return uo(I, B, W);
2297
2308
  }, y = (P, B, W) => {
2298
2309
  if (T(P)) {
2299
- const F = { ...B }, D = St(P, {
2310
+ const F = { ...B }, D = At(P, {
2300
2311
  searchParams: F.query,
2301
2312
  hash: F.hash
2302
2313
  });
2303
2314
  return b(D, F);
2304
2315
  }
2305
2316
  if (typeof P == "string") {
2306
- const { replace: F, ...D } = { ...W }, De = { ...B }, Fe = U(P, De, D), br = vt({ ...Fe.matched.state }, { ...Fe.state, ...D.state });
2307
- return b(Fe.href, { replace: F, state: br });
2317
+ const { replace: F, ...D } = { ...W }, Ie = { ...B }, De = U(P, Ie, D), br = Et({ ...De.matched.state }, { ...De.state, ...D.state });
2318
+ return b(De.href, { replace: F, state: br });
2308
2319
  }
2309
- const { replace: I, ...H } = { ...B }, K = vt({ ...P.matched.state }, { ...P.state, ...H.state }), Ie = St(P.href, {
2320
+ const { replace: I, ...H } = { ...B }, K = Et({ ...P.matched.state }, { ...P.state, ...H.state }), qe = At(P.href, {
2310
2321
  searchParams: H.query,
2311
2322
  hash: H.hash
2312
2323
  });
2313
- return b(Ie, { replace: I, state: K });
2324
+ return b(qe, { replace: I, state: K });
2314
2325
  }, h = (P, B, W) => {
2315
2326
  if (T(P)) {
2316
2327
  const H = { ...B, replace: !0 };
@@ -2324,27 +2335,27 @@ function Bo(e, t, r = []) {
2324
2335
  return y(P, I);
2325
2336
  }, g = (P) => {
2326
2337
  c(P);
2327
- }, { setRejection: c, rejection: l, getRejectionRoute: A } = zn({
2338
+ }, { setRejection: c, rejection: l, getRejectionRoute: A } = Qn({
2328
2339
  ...r.reduce((P, B) => ({ ...P, ...B.rejections }), {}),
2329
2340
  ...t == null ? void 0 : t.rejections
2330
- }), R = A("NotFound"), { currentRoute: w, routerRoute: S, updateRoute: x } = Dn(R, y), p = Kn(t == null ? void 0 : t.initialUrl), d = i.location.state, { host: E } = q(p), k = Tn(E);
2341
+ }), R = A("NotFound"), { currentRoute: w, routerRoute: S, updateRoute: x } = Dn(R, y), p = Kn(t == null ? void 0 : t.initialUrl), d = i.location.state, { host: E } = O(p), k = Tn(E);
2331
2342
  let L = !1;
2332
- const { promise: C, resolve: V } = Promise.withResolvers();
2343
+ const { promise: N, resolve: V } = Promise.withResolvers();
2333
2344
  async function $() {
2334
2345
  if (L)
2335
- return C;
2346
+ return N;
2336
2347
  Tr(n) && await Jr(), L = !0, await b(p, { replace: !0, state: d }), i.startListening(), V();
2337
2348
  }
2338
- function O() {
2349
+ function q() {
2339
2350
  i.stopListening();
2340
2351
  }
2341
- function it(P) {
2352
+ function ut(P) {
2342
2353
  return dn(P) ? null : { ...w };
2343
2354
  }
2344
2355
  function Er(P) {
2345
- P.component("RouterView", ir), P.component("RouterLink", xn), P.provide(or, l), P.provide(ur, o), P.provide(Xt, s), P.provide(cr, u), P.provide(tr, f), P.provide(Ut, ut), $();
2356
+ P.component("RouterView", ir), P.component("RouterLink", xn), P.provide(or, l), P.provide(ur, o), P.provide(Xt, s), P.provide(cr, u), P.provide(tr, f), P.provide(Bt, ft), $();
2346
2357
  }
2347
- const ut = {
2358
+ const ft = {
2348
2359
  route: S,
2349
2360
  resolve: U,
2350
2361
  find: m,
@@ -2365,9 +2376,9 @@ function Bo(e, t, r = []) {
2365
2376
  onAfterRouteLeave: o.onAfterRouteLeave,
2366
2377
  prefetch: t == null ? void 0 : t.prefetch,
2367
2378
  start: $,
2368
- stop: O
2379
+ stop: q
2369
2380
  };
2370
- return ut;
2381
+ return ft;
2371
2382
  }
2372
2383
  function Co(e) {
2373
2384
  return {
@@ -2376,11 +2387,11 @@ function Co(e) {
2376
2387
  ...e
2377
2388
  };
2378
2389
  }
2379
- function bo(...e) {
2390
+ function Po(...e) {
2380
2391
  return {
2381
2392
  get: (t, { invalid: r }) => {
2382
2393
  for (const n of e) {
2383
- const o = Qr(t, n);
2394
+ const o = zr(t, n);
2384
2395
  if (o !== void 0)
2385
2396
  return o;
2386
2397
  }
@@ -2396,8 +2407,8 @@ function bo(...e) {
2396
2407
  }
2397
2408
  };
2398
2409
  }
2399
- function No(...e) {
2400
- const t = bo(...e);
2410
+ function Vo(...e) {
2411
+ const t = Po(...e);
2401
2412
  return {
2402
2413
  get: (r, n) => r.split(",").map((o) => t.get(o, n)),
2403
2414
  set: (r, n) => {
@@ -2407,24 +2418,24 @@ function No(...e) {
2407
2418
  }
2408
2419
  };
2409
2420
  }
2410
- function Vo(...e) {
2421
+ function Zo(...e) {
2411
2422
  return {
2412
2423
  get: (t) => {
2413
2424
  const r = t.split(",");
2414
- return e.map((n, o) => de(r.at(o), n));
2425
+ return e.map((n, o) => oe(r.at(o), n));
2415
2426
  },
2416
2427
  set: (t, { invalid: r }) => {
2417
2428
  if (!Array.isArray(t))
2418
2429
  throw r("Expected a tuple");
2419
2430
  if (t.length !== e.length)
2420
2431
  throw r(`Expected tuple with ${e.length} values but received ${t.length} values`);
2421
- return e.map((n, o) => oe(t.at(o), n)).join(",");
2432
+ return e.map((n, o) => ae(t.at(o), n)).join(",");
2422
2433
  }
2423
2434
  };
2424
2435
  }
2425
- const Zo = z, jo = z, $o = z;
2426
- function _o(e) {
2427
- const t = nt(), r = Wt(e.name), n = ee(e.path), o = ee(e.query), a = ee(e.hash), s = e.meta ?? {}, u = ee(e.host), f = xe({ id: t, meta: {}, state: {}, ...e }), i = {
2436
+ const jo = Q, $o = Q, _o = Q;
2437
+ function Ho(e) {
2438
+ const t = ot(), r = Wt(e.name), n = ee(e.path), o = ee(e.query), a = ee(e.hash), s = e.meta ?? {}, u = ee(e.host), f = xe({ id: t, meta: {}, state: {}, ...e }), i = {
2428
2439
  id: t,
2429
2440
  matched: f,
2430
2441
  matches: [f],
@@ -2446,27 +2457,27 @@ export {
2446
2457
  Re as RouterNotInstalledError,
2447
2458
  ir as RouterView,
2448
2459
  Hr as UseRouteInvalidError,
2449
- No as arrayOf,
2450
- Lt as asUrl,
2451
- _o as createExternalRoute,
2460
+ Vo as arrayOf,
2461
+ Ut as asUrl,
2462
+ Ho as createExternalRoute,
2452
2463
  Dr as createParam,
2453
2464
  pe as createRoute,
2454
- Bo as createRouter,
2465
+ No as createRouter,
2455
2466
  Co as createRouterPlugin,
2456
- jo as host,
2467
+ $o as host,
2457
2468
  nr as isRoute,
2458
2469
  T as isUrl,
2459
- Lo as onAfterRouteLeave,
2460
- Uo as onAfterRouteUpdate,
2461
- ko as onBeforeRouteLeave,
2462
- xo as onBeforeRouteUpdate,
2463
- Zo as path,
2464
- $o as query,
2465
- Vo as tupleOf,
2466
- bo as unionOf,
2470
+ Uo as onAfterRouteLeave,
2471
+ Bo as onAfterRouteUpdate,
2472
+ xo as onBeforeRouteLeave,
2473
+ Lo as onBeforeRouteUpdate,
2474
+ jo as path,
2475
+ _o as query,
2476
+ Zo as tupleOf,
2477
+ Po as unionOf,
2467
2478
  An as useLink,
2468
2479
  ar as useRoute,
2469
- ze as useRouter,
2470
- Ao as withDefault,
2471
- z as withParams
2480
+ Qe as useRouter,
2481
+ ko as withDefault,
2482
+ Q as withParams
2472
2483
  };