@kitbag/router 0.11.2 → 0.11.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,348 +1,333 @@
1
- var Ye = Object.defineProperty;
2
- var Xe = (t, e, n) => e in t ? Ye(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var M = (t, e, n) => Xe(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { defineComponent as ut, h as pt, ref as ie, inject as it, toRefs as Ze, reactive as Ht, markRaw as dt, defineAsyncComponent as tn, watch as fe, toValue as ht, toRef as en, computed as V, onUnmounted as le, openBlock as he, createElementBlock as nn, normalizeClass as rn, renderSlot as pe, normalizeProps as de, guardReactiveProps as on, unref as ot, resolveComponent as an, provide as sn, mergeProps as cn, createBlock as un, resolveDynamicComponent as fn, createCommentVNode as ln } from "vue";
5
- class St extends Error {
1
+ var Xt = Object.defineProperty;
2
+ var Zt = (e, t, n) => t in e ? Xt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var M = (e, t, n) => Zt(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { defineComponent as ue, h as pe, ref as ft, inject as ie, toRefs as en, reactive as je, markRaw as de, defineAsyncComponent as tn, watch as lt, toValue as he, toRef as nn, computed as V, onUnmounted as ht, openBlock as pt, createElementBlock as rn, normalizeClass as on, renderSlot as dt, normalizeProps as mt, guardReactiveProps as an, unref as oe, resolveComponent as sn, provide as cn, mergeProps as un, createBlock as fn, resolveDynamicComponent as ln, createCommentVNode as hn } from "vue";
5
+ class Se extends Error {
6
6
  constructor() {
7
7
  super("Router not installed");
8
8
  }
9
9
  }
10
- function ft(t) {
11
- return typeof t == "object" && t !== null && !Array.isArray(t);
10
+ function fe(e) {
11
+ return typeof e == "object" && e !== null && !Array.isArray(e);
12
12
  }
13
- function hn(t) {
14
- return t.every((e) => Array.isArray(e));
13
+ function pn(e) {
14
+ return e.every((t) => Array.isArray(t));
15
15
  }
16
- function lt(t) {
17
- return typeof t == "string" && t.length > 0;
16
+ function le(e) {
17
+ return typeof e == "string" && e.length > 0;
18
18
  }
19
- function mt(t) {
20
- const e = lt(t) ? t.replace(/^#/, "") : void 0;
21
- function n() {
22
- return e !== void 0;
23
- }
24
- function r() {
25
- return n() ? `#${t}` : "";
26
- }
19
+ function me(e) {
27
20
  return {
28
- value: e,
29
- hasValue: n,
30
- toString: r
21
+ value: le(e) ? e.replace(/^#*/, "") : void 0
31
22
  };
32
23
  }
33
- function pn(t, e) {
34
- return mt(`${t.value ?? ""}${e.value ?? ""}`);
24
+ function dn(e, t) {
25
+ return me(`${e.value ?? ""}${t.value ?? ""}`);
35
26
  }
36
- class dn extends Error {
37
- constructor(e) {
38
- super(`Child property on meta for ${e} conflicts with the parent meta.`);
27
+ class mn extends Error {
28
+ constructor(t) {
29
+ super(`Child property on meta for ${t} conflicts with the parent meta.`);
39
30
  }
40
31
  }
41
- function mn(t, e) {
42
- return gn(t, e), { ...t, ...e };
32
+ function gn(e, t) {
33
+ return Rn(e, t), { ...e, ...t };
43
34
  }
44
- function gn(t, e) {
45
- const n = Object.keys(t).find((r) => r in e && typeof e[r] != typeof t[r]);
35
+ function Rn(e, t) {
36
+ const n = Object.keys(e).find((r) => r in t && typeof t[r] != typeof e[r]);
46
37
  if (n)
47
- throw new dn(n);
38
+ throw new mn(n);
48
39
  }
49
- class Rn extends Error {
40
+ class yn extends Error {
50
41
  /**
51
42
  * Constructs a new DuplicateParamsError instance with a message indicating the problematic parameter.
52
43
  * @param paramName - The name of the parameter that was duplicated.
53
44
  */
54
- constructor(e) {
55
- super(`Invalid Param "${e}": Router does not support multiple params by the same name. All param names must be unique.`);
45
+ constructor(t) {
46
+ super(`Invalid Param "${t}": Router does not support multiple params by the same name. All param names must be unique.`);
56
47
  }
57
48
  }
58
- function z(t) {
59
- return Array.isArray(t) ? t : [t];
49
+ function z(e) {
50
+ return Array.isArray(e) ? e : [e];
60
51
  }
61
- function me(t, e) {
62
- return t.filter((n) => e === n).length;
52
+ function gt(e, t) {
53
+ return e.filter((n) => t === n).length;
63
54
  }
64
- function et(...t) {
65
- const e = t.flatMap((n) => Array.isArray(n) ? n : Object.keys(n).map(yn));
66
- for (const n of e)
67
- if (me(e, n) > 1)
68
- throw new Rn(n);
55
+ function te(...e) {
56
+ const t = e.flatMap((n) => Array.isArray(n) ? n : Object.keys(n).map(vn));
57
+ for (const n of t)
58
+ if (gt(t, n) > 1)
59
+ throw new yn(n);
69
60
  }
70
- function yn(t) {
71
- return t.startsWith("?") ? t.slice(1) : t;
61
+ function vn(e) {
62
+ return e.startsWith("?") ? e.slice(1) : e;
72
63
  }
73
- function vn(t, e) {
74
- et(t.params, e.params);
75
- const n = `${t.value}${e.value}`;
76
- return {
77
- value: n,
78
- params: { ...t.params, ...e.params },
79
- toString: () => n
64
+ function wn(e, t) {
65
+ return te(e.params, t.params), {
66
+ value: `${e.value}${t.value}`,
67
+ params: { ...e.params, ...t.params }
80
68
  };
81
69
  }
82
- function wn(t, e) {
83
- et(t.params, e.params);
84
- const n = [t.value, e.value].filter(lt).join("&");
85
- return {
86
- value: n,
87
- params: { ...t.params, ...e.params },
88
- toString: () => n
70
+ function Pn(e, t) {
71
+ return te(e.params, t.params), {
72
+ value: [e.value, t.value].filter(le).join("&"),
73
+ params: { ...e.params, ...t.params }
89
74
  };
90
75
  }
91
- function Pn(t, e) {
92
- return et(t, e), { ...t, ...e };
76
+ function En(e, t) {
77
+ return te(e, t), { ...e, ...t };
93
78
  }
94
- function En(t) {
95
- return "host" in t && !!t.host;
79
+ function Sn(e) {
80
+ return "host" in e && !!e.host;
96
81
  }
97
- function ge(t) {
98
- return "parent" in t && !!t.parent;
82
+ function Rt(e) {
83
+ return "parent" in e && !!e.parent;
99
84
  }
100
- function Vt(t) {
101
- return "component" in t && !!t.component;
85
+ function Ve(e) {
86
+ return "component" in e && !!e.component;
102
87
  }
103
- function jt(t) {
104
- return "components" in t && !!t.components;
88
+ function qe(e) {
89
+ return "components" in e && !!e.components;
105
90
  }
106
- function Sn(t) {
107
- return "state" in t && !!t.state;
91
+ function bn(e) {
92
+ return "state" in e && !!e.state;
108
93
  }
109
- function Re(t, e) {
94
+ function yt(e, t) {
110
95
  return {
111
- ...e,
112
- path: vn(t.path, e.path),
113
- query: wn(t.query, e.query),
114
- meta: mn(t.meta, e.meta),
115
- state: Pn(t.state, e.state),
116
- hash: pn(t.hash, e.hash),
117
- matches: [...t.matches, e.matched],
118
- host: t.host,
119
- depth: t.depth + 1
96
+ ...t,
97
+ path: wn(e.path, t.path),
98
+ query: Pn(e.query, t.query),
99
+ meta: gn(e.meta, t.meta),
100
+ state: En(e.state, t.state),
101
+ hash: dn(e.hash, t.hash),
102
+ matches: [...e.matches, t.matched],
103
+ host: e.host,
104
+ depth: e.depth + 1
120
105
  };
121
106
  }
122
- function ye() {
107
+ function vt() {
123
108
  return typeof window < "u" && typeof window.document < "u";
124
109
  }
125
- function bn(t, e) {
126
- return ut({
110
+ function An(e, t) {
111
+ return ue({
127
112
  name: "PropsWrapper",
128
113
  expose: [],
129
114
  setup() {
130
- const n = e();
131
- return "then" in n ? () => pt(An(t, n)) : () => pt(t, n);
115
+ const n = t();
116
+ return "then" in n ? () => pe(xn(e, n)) : () => pe(e, n);
132
117
  }
133
118
  });
134
119
  }
135
- function An(t, e) {
136
- return ut({
120
+ function xn(e, t) {
121
+ return ue({
137
122
  name: "AsyncPropsWrapper",
138
123
  expose: [],
139
124
  setup() {
140
- const n = ie();
141
- return (async () => n.value = await e)(), () => n.value ? pt(t, n.value) : "";
125
+ const n = ft();
126
+ return (async () => n.value = await t)(), () => n.value ? pe(e, n.value) : "";
142
127
  }
143
128
  });
144
129
  }
145
130
  class Y extends Error {
146
131
  }
147
132
  const T = "[", J = "]";
148
- function xn(t) {
149
- return t !== String && t !== Boolean && t !== Number && t !== Date;
133
+ function kn(e) {
134
+ return e !== String && e !== Boolean && e !== Number && e !== Date;
150
135
  }
151
- function kn(t) {
152
- return typeof t == "function" && xn(t);
136
+ function Ln(e) {
137
+ return typeof e == "function" && kn(e);
153
138
  }
154
- function bt(t) {
155
- return typeof t == "object" && "get" in t && typeof t.get == "function" && "set" in t && typeof t.set == "function";
139
+ function be(e) {
140
+ return typeof e == "object" && "get" in e && typeof e.get == "function" && "set" in e && typeof e.set == "function";
156
141
  }
157
- function Bn(t) {
158
- return bt(t) && t.defaultValue !== void 0;
142
+ function Bn(e) {
143
+ return be(e) && e.defaultValue !== void 0;
159
144
  }
160
- function Gr(t, e) {
161
- return Un(t, e);
145
+ function zr(e, t) {
146
+ return Cn(e, t);
162
147
  }
163
- function Ln(t, e) {
164
- return t[e] ?? String;
148
+ function Un(e, t) {
149
+ return e[t] ?? String;
165
150
  }
166
- const H = {
167
- invalid: (t) => {
168
- throw new Y(t);
151
+ const j = {
152
+ invalid: (e) => {
153
+ throw new Y(e);
169
154
  }
170
155
  }, Nn = {
171
- get: (t) => t,
172
- set: (t, { invalid: e }) => {
173
- if (typeof t != "string")
174
- throw e();
175
- return t;
176
- }
177
- }, ve = {
178
- get: (t, { invalid: e }) => {
179
- if (t === "true")
156
+ get: (e) => e,
157
+ set: (e, { invalid: t }) => {
158
+ if (typeof e != "string")
159
+ throw t();
160
+ return e;
161
+ }
162
+ }, wt = {
163
+ get: (e, { invalid: t }) => {
164
+ if (e === "true")
180
165
  return !0;
181
- if (t === "false")
166
+ if (e === "false")
182
167
  return !1;
183
- throw e();
168
+ throw t();
184
169
  },
185
- set: (t, { invalid: e }) => {
186
- if (typeof t != "boolean")
187
- throw e();
188
- return t.toString();
189
- }
190
- }, we = {
191
- get: (t, { invalid: e }) => {
192
- const n = Number(t);
170
+ set: (e, { invalid: t }) => {
171
+ if (typeof e != "boolean")
172
+ throw t();
173
+ return e.toString();
174
+ }
175
+ }, Pt = {
176
+ get: (e, { invalid: t }) => {
177
+ const n = Number(e);
193
178
  if (isNaN(n))
194
- throw e();
179
+ throw t();
195
180
  return n;
196
181
  },
197
- set: (t, { invalid: e }) => {
198
- if (typeof t != "number")
199
- throw e();
200
- return t.toString();
201
- }
202
- }, Pe = {
203
- get: (t, { invalid: e }) => {
204
- const n = new Date(t);
182
+ set: (e, { invalid: t }) => {
183
+ if (typeof e != "number")
184
+ throw t();
185
+ return e.toString();
186
+ }
187
+ }, Et = {
188
+ get: (e, { invalid: t }) => {
189
+ const n = new Date(e);
205
190
  if (isNaN(n.getTime()))
206
- throw e();
191
+ throw t();
207
192
  return n;
208
193
  },
209
- set: (t, { invalid: e }) => {
210
- if (typeof t != "object" || !(t instanceof Date))
211
- throw e();
212
- return t.toISOString();
194
+ set: (e, { invalid: t }) => {
195
+ if (typeof e != "object" || !(e instanceof Date))
196
+ throw t();
197
+ return e.toISOString();
213
198
  }
214
- }, Ee = {
215
- get: (t, { invalid: e }) => {
199
+ }, St = {
200
+ get: (e, { invalid: t }) => {
216
201
  try {
217
- return JSON.parse(t);
202
+ return JSON.parse(e);
218
203
  } catch {
219
- throw e();
204
+ throw t();
220
205
  }
221
206
  },
222
- set: (t, { invalid: e }) => {
207
+ set: (e, { invalid: t }) => {
223
208
  try {
224
- return JSON.stringify(t);
209
+ return JSON.stringify(e);
225
210
  } catch {
226
- throw e();
211
+ throw t();
227
212
  }
228
213
  }
229
214
  };
230
- function at(t, e, n = !1) {
231
- if (t === void 0 || !lt(t)) {
232
- if (Bn(e))
233
- return e.defaultValue;
215
+ function ae(e, t, n = !1) {
216
+ if (e === void 0 || !le(e)) {
217
+ if (Bn(t))
218
+ return t.defaultValue;
234
219
  if (n)
235
220
  return;
236
221
  throw new Y();
237
222
  }
238
- if (e === String)
239
- return Nn.get(t, H);
240
- if (e === Boolean)
241
- return ve.get(t, H);
242
- if (e === Number)
243
- return we.get(t, H);
244
- if (e === Date)
245
- return Pe.get(t, H);
246
- if (e === JSON)
247
- return Ee.get(t, H);
248
- if (kn(e))
249
- return e(t, H);
250
- if (bt(e))
251
- return e.get(t, H);
252
- if (e instanceof RegExp) {
253
- if (e.test(t))
254
- return t;
223
+ if (t === String)
224
+ return Nn.get(e, j);
225
+ if (t === Boolean)
226
+ return wt.get(e, j);
227
+ if (t === Number)
228
+ return Pt.get(e, j);
229
+ if (t === Date)
230
+ return Et.get(e, j);
231
+ if (t === JSON)
232
+ return St.get(e, j);
233
+ if (Ln(t))
234
+ return t(e, j);
235
+ if (be(t))
236
+ return t.get(e, j);
237
+ if (t instanceof RegExp) {
238
+ if (t.test(e))
239
+ return e;
255
240
  throw new Y();
256
241
  }
257
- return t;
242
+ return e;
258
243
  }
259
- function st(t, e, n = !1) {
260
- if (t === void 0) {
244
+ function se(e, t, n = !1) {
245
+ if (e === void 0) {
261
246
  if (n)
262
247
  return "";
263
248
  throw new Y();
264
249
  }
265
- if (e === Boolean)
266
- return ve.set(t, H);
267
- if (e === Number)
268
- return we.set(t, H);
269
- if (e === Date)
270
- return Pe.set(t, H);
271
- if (e === JSON)
272
- return Ee.set(t, H);
273
- if (bt(e))
274
- return e.set(t, H);
250
+ if (t === Boolean)
251
+ return wt.set(e, j);
252
+ if (t === Number)
253
+ return Pt.set(e, j);
254
+ if (t === Date)
255
+ return Et.set(e, j);
256
+ if (t === JSON)
257
+ return St.set(e, j);
258
+ if (be(t))
259
+ return t.set(e, j);
275
260
  try {
276
- return t.toString();
261
+ return e.toString();
277
262
  } catch {
278
263
  throw new Y();
279
264
  }
280
265
  }
281
- function Un(t, e) {
282
- return bt(t) ? { ...t, defaultValue: e ?? t.defaultValue } : {
283
- get: (n) => at(n, t),
284
- set: (n) => st(n, t),
285
- defaultValue: e
266
+ function Cn(e, t) {
267
+ return be(e) ? { ...e, defaultValue: t ?? e.defaultValue } : {
268
+ get: (n) => ae(n, e),
269
+ set: (n) => se(n, e),
270
+ defaultValue: t
286
271
  };
287
272
  }
288
273
  function F() {
289
- return F = Object.assign ? Object.assign.bind() : function(t) {
290
- for (var e = 1; e < arguments.length; e++) {
291
- var n = arguments[e];
274
+ return F = Object.assign ? Object.assign.bind() : function(e) {
275
+ for (var t = 1; t < arguments.length; t++) {
276
+ var n = arguments[t];
292
277
  for (var r in n)
293
- Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
278
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
294
279
  }
295
- return t;
280
+ return e;
296
281
  }, F.apply(this, arguments);
297
282
  }
298
- var U;
299
- (function(t) {
300
- t.Pop = "POP", t.Push = "PUSH", t.Replace = "REPLACE";
301
- })(U || (U = {}));
302
- var X = process.env.NODE_ENV !== "production" ? function(t) {
303
- return Object.freeze(t);
304
- } : function(t) {
305
- return t;
283
+ var C;
284
+ (function(e) {
285
+ e.Pop = "POP", e.Push = "PUSH", e.Replace = "REPLACE";
286
+ })(C || (C = {}));
287
+ var X = process.env.NODE_ENV !== "production" ? function(e) {
288
+ return Object.freeze(e);
289
+ } : function(e) {
290
+ return e;
306
291
  };
307
- function Q(t, e) {
308
- if (!t) {
309
- typeof console < "u" && console.warn(e);
292
+ function Q(e, t) {
293
+ if (!e) {
294
+ typeof console < "u" && console.warn(t);
310
295
  try {
311
- throw new Error(e);
296
+ throw new Error(t);
312
297
  } catch {
313
298
  }
314
299
  }
315
300
  }
316
- var gt = "beforeunload", $n = "hashchange", Se = "popstate";
317
- function Xt(t) {
318
- t === void 0 && (t = {});
319
- var e = t, n = e.window, r = n === void 0 ? document.defaultView : n, o = r.history;
301
+ var ge = "beforeunload", Hn = "hashchange", bt = "popstate";
302
+ function Ze(e) {
303
+ e === void 0 && (e = {});
304
+ var t = e, n = t.window, r = n === void 0 ? document.defaultView : n, o = r.history;
320
305
  function a() {
321
- var m = r.location, l = m.pathname, d = m.search, w = m.hash, P = o.state || {};
322
- return [P.idx, X({
306
+ var g = r.location, l = g.pathname, m = g.search, E = g.hash, S = o.state || {};
307
+ return [S.idx, X({
323
308
  pathname: l,
324
- search: d,
325
- hash: w,
326
- state: P.usr || null,
327
- key: P.key || "default"
309
+ search: m,
310
+ hash: E,
311
+ state: S.usr || null,
312
+ key: S.key || "default"
328
313
  })];
329
314
  }
330
315
  var s = null;
331
- function u() {
316
+ function i() {
332
317
  if (s)
333
318
  p.call(s), s = null;
334
319
  else {
335
- var m = U.Pop, l = a(), d = l[0], w = l[1];
320
+ var g = C.Pop, l = a(), m = l[0], E = l[1];
336
321
  if (p.length)
337
- if (d != null) {
338
- var P = i - d;
339
- P && (s = {
340
- action: m,
341
- location: w,
322
+ if (m != null) {
323
+ var S = u - m;
324
+ S && (s = {
325
+ action: g,
326
+ location: E,
342
327
  retry: function() {
343
- b(P * -1);
328
+ b(S * -1);
344
329
  }
345
- }, b(P));
330
+ }, b(S));
346
331
  } else
347
332
  process.env.NODE_ENV !== "production" && Q(
348
333
  !1,
@@ -352,87 +337,87 @@ function Xt(t) {
352
337
  "You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation."
353
338
  );
354
339
  else
355
- j(m);
340
+ B(g);
356
341
  }
357
342
  }
358
- r.addEventListener(Se, u);
359
- var c = U.Pop, f = a(), i = f[0], h = f[1], y = Z(), p = Z();
360
- i == null && (i = 0, o.replaceState(F({}, o.state, {
361
- idx: i
343
+ r.addEventListener(bt, i);
344
+ var c = C.Pop, f = a(), u = f[0], h = f[1], P = Z(), p = Z();
345
+ u == null && (u = 0, o.replaceState(F({}, o.state, {
346
+ idx: u
362
347
  }), ""));
363
- function S(m) {
364
- return typeof m == "string" ? m : G(m);
348
+ function A(g) {
349
+ return typeof g == "string" ? g : G(g);
365
350
  }
366
- function E(m, l) {
351
+ function v(g, l) {
367
352
  return l === void 0 && (l = null), X(F({
368
353
  pathname: h.pathname,
369
354
  hash: "",
370
355
  search: ""
371
- }, typeof m == "string" ? ct(m) : m, {
356
+ }, typeof g == "string" ? ce(g) : g, {
372
357
  state: l,
373
- key: yt()
358
+ key: ye()
374
359
  }));
375
360
  }
376
- function A(m, l) {
361
+ function R(g, l) {
377
362
  return [{
378
- usr: m.state,
379
- key: m.key,
363
+ usr: g.state,
364
+ key: g.key,
380
365
  idx: l
381
- }, S(m)];
366
+ }, A(g)];
382
367
  }
383
- function k(m, l, d) {
368
+ function x(g, l, m) {
384
369
  return !p.length || (p.call({
385
- action: m,
370
+ action: g,
386
371
  location: l,
387
- retry: d
372
+ retry: m
388
373
  }), !1);
389
374
  }
390
- function j(m) {
391
- c = m;
375
+ function B(g) {
376
+ c = g;
392
377
  var l = a();
393
- i = l[0], h = l[1], y.call({
378
+ u = l[0], h = l[1], P.call({
394
379
  action: c,
395
380
  location: h
396
381
  });
397
382
  }
398
- function g(m, l) {
399
- var d = U.Push, w = E(m, l);
400
- function P() {
401
- g(m, l);
383
+ function d(g, l) {
384
+ var m = C.Push, E = v(g, l);
385
+ function S() {
386
+ d(g, l);
402
387
  }
403
- if (k(d, w, P)) {
404
- var B = A(w, i + 1), N = B[0], C = B[1];
388
+ if (x(m, E, S)) {
389
+ var L = R(E, u + 1), N = L[0], $ = L[1];
405
390
  try {
406
- o.pushState(N, "", C);
391
+ o.pushState(N, "", $);
407
392
  } catch {
408
- r.location.assign(C);
393
+ r.location.assign($);
409
394
  }
410
- j(d);
395
+ B(m);
411
396
  }
412
397
  }
413
- function v(m, l) {
414
- var d = U.Replace, w = E(m, l);
415
- function P() {
416
- v(m, l);
398
+ function y(g, l) {
399
+ var m = C.Replace, E = v(g, l);
400
+ function S() {
401
+ y(g, l);
417
402
  }
418
- if (k(d, w, P)) {
419
- var B = A(w, i), N = B[0], C = B[1];
420
- o.replaceState(N, "", C), j(d);
403
+ if (x(m, E, S)) {
404
+ var L = R(E, u), N = L[0], $ = L[1];
405
+ o.replaceState(N, "", $), B(m);
421
406
  }
422
407
  }
423
- function b(m) {
424
- o.go(m);
408
+ function b(g) {
409
+ o.go(g);
425
410
  }
426
- var x = {
411
+ var k = {
427
412
  get action() {
428
413
  return c;
429
414
  },
430
415
  get location() {
431
416
  return h;
432
417
  },
433
- createHref: S,
434
- push: g,
435
- replace: v,
418
+ createHref: A,
419
+ push: d,
420
+ replace: y,
436
421
  go: b,
437
422
  back: function() {
438
423
  b(-1);
@@ -441,46 +426,46 @@ function Xt(t) {
441
426
  b(1);
442
427
  },
443
428
  listen: function(l) {
444
- return y.push(l);
429
+ return P.push(l);
445
430
  },
446
431
  block: function(l) {
447
- var d = p.push(l);
448
- return p.length === 1 && r.addEventListener(gt, Rt), function() {
449
- d(), p.length || r.removeEventListener(gt, Rt);
432
+ var m = p.push(l);
433
+ return p.length === 1 && r.addEventListener(ge, Re), function() {
434
+ m(), p.length || r.removeEventListener(ge, Re);
450
435
  };
451
436
  }
452
437
  };
453
- return x;
438
+ return k;
454
439
  }
455
- function Cn(t) {
456
- t === void 0 && (t = {});
457
- var e = t, n = e.window, r = n === void 0 ? document.defaultView : n, o = r.history;
440
+ function $n(e) {
441
+ e === void 0 && (e = {});
442
+ var t = e, n = t.window, r = n === void 0 ? document.defaultView : n, o = r.history;
458
443
  function a() {
459
- var l = ct(r.location.hash.substr(1)), d = l.pathname, w = d === void 0 ? "/" : d, P = l.search, B = P === void 0 ? "" : P, N = l.hash, C = N === void 0 ? "" : N, $ = o.state || {};
460
- return [$.idx, X({
461
- pathname: w,
462
- search: B,
463
- hash: C,
464
- state: $.usr || null,
465
- key: $.key || "default"
444
+ var l = ce(r.location.hash.substr(1)), m = l.pathname, E = m === void 0 ? "/" : m, S = l.search, L = S === void 0 ? "" : S, N = l.hash, $ = N === void 0 ? "" : N, H = o.state || {};
445
+ return [H.idx, X({
446
+ pathname: E,
447
+ search: L,
448
+ hash: $,
449
+ state: H.usr || null,
450
+ key: H.key || "default"
466
451
  })];
467
452
  }
468
453
  var s = null;
469
- function u() {
454
+ function i() {
470
455
  if (s)
471
456
  p.call(s), s = null;
472
457
  else {
473
- var l = U.Pop, d = a(), w = d[0], P = d[1];
458
+ var l = C.Pop, m = a(), E = m[0], S = m[1];
474
459
  if (p.length)
475
- if (w != null) {
476
- var B = i - w;
477
- B && (s = {
460
+ if (E != null) {
461
+ var L = u - E;
462
+ L && (s = {
478
463
  action: l,
479
- location: P,
464
+ location: S,
480
465
  retry: function() {
481
- x(B * -1);
466
+ k(L * -1);
482
467
  }
483
- }, x(B));
468
+ }, k(L));
484
469
  } else
485
470
  process.env.NODE_ENV !== "production" && Q(
486
471
  !1,
@@ -490,337 +475,362 @@ function Cn(t) {
490
475
  "You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation."
491
476
  );
492
477
  else
493
- g(l);
478
+ d(l);
494
479
  }
495
480
  }
496
- r.addEventListener(Se, u), r.addEventListener($n, function() {
497
- var l = a(), d = l[1];
498
- G(d) !== G(h) && u();
481
+ r.addEventListener(bt, i), r.addEventListener(Hn, function() {
482
+ var l = a(), m = l[1];
483
+ G(m) !== G(h) && i();
499
484
  });
500
- var c = U.Pop, f = a(), i = f[0], h = f[1], y = Z(), p = Z();
501
- i == null && (i = 0, o.replaceState(F({}, o.state, {
502
- idx: i
485
+ var c = C.Pop, f = a(), u = f[0], h = f[1], P = Z(), p = Z();
486
+ u == null && (u = 0, o.replaceState(F({}, o.state, {
487
+ idx: u
503
488
  }), ""));
504
- function S() {
505
- var l = document.querySelector("base"), d = "";
489
+ function A() {
490
+ var l = document.querySelector("base"), m = "";
506
491
  if (l && l.getAttribute("href")) {
507
- var w = r.location.href, P = w.indexOf("#");
508
- d = P === -1 ? w : w.slice(0, P);
492
+ var E = r.location.href, S = E.indexOf("#");
493
+ m = S === -1 ? E : E.slice(0, S);
509
494
  }
510
- return d;
495
+ return m;
511
496
  }
512
- function E(l) {
513
- return S() + "#" + (typeof l == "string" ? l : G(l));
497
+ function v(l) {
498
+ return A() + "#" + (typeof l == "string" ? l : G(l));
514
499
  }
515
- function A(l, d) {
516
- return d === void 0 && (d = null), X(F({
500
+ function R(l, m) {
501
+ return m === void 0 && (m = null), X(F({
517
502
  pathname: h.pathname,
518
503
  hash: "",
519
504
  search: ""
520
- }, typeof l == "string" ? ct(l) : l, {
521
- state: d,
522
- key: yt()
505
+ }, typeof l == "string" ? ce(l) : l, {
506
+ state: m,
507
+ key: ye()
523
508
  }));
524
509
  }
525
- function k(l, d) {
510
+ function x(l, m) {
526
511
  return [{
527
512
  usr: l.state,
528
513
  key: l.key,
529
- idx: d
530
- }, E(l)];
514
+ idx: m
515
+ }, v(l)];
531
516
  }
532
- function j(l, d, w) {
517
+ function B(l, m, E) {
533
518
  return !p.length || (p.call({
534
519
  action: l,
535
- location: d,
536
- retry: w
520
+ location: m,
521
+ retry: E
537
522
  }), !1);
538
523
  }
539
- function g(l) {
524
+ function d(l) {
540
525
  c = l;
541
- var d = a();
542
- i = d[0], h = d[1], y.call({
526
+ var m = a();
527
+ u = m[0], h = m[1], P.call({
543
528
  action: c,
544
529
  location: h
545
530
  });
546
531
  }
547
- function v(l, d) {
548
- var w = U.Push, P = A(l, d);
549
- function B() {
550
- v(l, d);
532
+ function y(l, m) {
533
+ var E = C.Push, S = R(l, m);
534
+ function L() {
535
+ y(l, m);
551
536
  }
552
- if (process.env.NODE_ENV !== "production" && Q(P.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(l) + ")"), j(w, P, B)) {
553
- var N = k(P, i + 1), C = N[0], $ = N[1];
537
+ if (process.env.NODE_ENV !== "production" && Q(S.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(l) + ")"), B(E, S, L)) {
538
+ var N = x(S, u + 1), $ = N[0], H = N[1];
554
539
  try {
555
- o.pushState(C, "", $);
540
+ o.pushState($, "", H);
556
541
  } catch {
557
- r.location.assign($);
542
+ r.location.assign(H);
558
543
  }
559
- g(w);
544
+ d(E);
560
545
  }
561
546
  }
562
- function b(l, d) {
563
- var w = U.Replace, P = A(l, d);
564
- function B() {
565
- b(l, d);
547
+ function b(l, m) {
548
+ var E = C.Replace, S = R(l, m);
549
+ function L() {
550
+ b(l, m);
566
551
  }
567
- if (process.env.NODE_ENV !== "production" && Q(P.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(l) + ")"), j(w, P, B)) {
568
- var N = k(P, i), C = N[0], $ = N[1];
569
- o.replaceState(C, "", $), g(w);
552
+ if (process.env.NODE_ENV !== "production" && Q(S.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(l) + ")"), B(E, S, L)) {
553
+ var N = x(S, u), $ = N[0], H = N[1];
554
+ o.replaceState($, "", H), d(E);
570
555
  }
571
556
  }
572
- function x(l) {
557
+ function k(l) {
573
558
  o.go(l);
574
559
  }
575
- var m = {
560
+ var g = {
576
561
  get action() {
577
562
  return c;
578
563
  },
579
564
  get location() {
580
565
  return h;
581
566
  },
582
- createHref: E,
583
- push: v,
567
+ createHref: v,
568
+ push: y,
584
569
  replace: b,
585
- go: x,
570
+ go: k,
586
571
  back: function() {
587
- x(-1);
572
+ k(-1);
588
573
  },
589
574
  forward: function() {
590
- x(1);
575
+ k(1);
591
576
  },
592
- listen: function(d) {
593
- return y.push(d);
577
+ listen: function(m) {
578
+ return P.push(m);
594
579
  },
595
- block: function(d) {
596
- var w = p.push(d);
597
- return p.length === 1 && r.addEventListener(gt, Rt), function() {
598
- w(), p.length || r.removeEventListener(gt, Rt);
580
+ block: function(m) {
581
+ var E = p.push(m);
582
+ return p.length === 1 && r.addEventListener(ge, Re), function() {
583
+ E(), p.length || r.removeEventListener(ge, Re);
599
584
  };
600
585
  }
601
586
  };
602
- return m;
587
+ return g;
603
588
  }
604
- function Zt(t) {
605
- t === void 0 && (t = {});
606
- var e = t, n = e.initialEntries, r = n === void 0 ? ["/"] : n, o = e.initialIndex, a = r.map(function(g) {
607
- var v = X(F({
589
+ function et(e) {
590
+ e === void 0 && (e = {});
591
+ var t = e, n = t.initialEntries, r = n === void 0 ? ["/"] : n, o = t.initialIndex, a = r.map(function(d) {
592
+ var y = X(F({
608
593
  pathname: "/",
609
594
  search: "",
610
595
  hash: "",
611
596
  state: null,
612
- key: yt()
613
- }, typeof g == "string" ? ct(g) : g));
614
- return process.env.NODE_ENV !== "production" && Q(v.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(g) + ")"), v;
615
- }), s = te(o ?? a.length - 1, 0, a.length - 1), u = U.Pop, c = a[s], f = Z(), i = Z();
616
- function h(g) {
617
- return typeof g == "string" ? g : G(g);
618
- }
619
- function y(g, v) {
620
- return v === void 0 && (v = null), X(F({
597
+ key: ye()
598
+ }, typeof d == "string" ? ce(d) : d));
599
+ return process.env.NODE_ENV !== "production" && Q(y.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(d) + ")"), y;
600
+ }), s = tt(o ?? a.length - 1, 0, a.length - 1), i = C.Pop, c = a[s], f = Z(), u = Z();
601
+ function h(d) {
602
+ return typeof d == "string" ? d : G(d);
603
+ }
604
+ function P(d, y) {
605
+ return y === void 0 && (y = null), X(F({
621
606
  pathname: c.pathname,
622
607
  search: "",
623
608
  hash: ""
624
- }, typeof g == "string" ? ct(g) : g, {
625
- state: v,
626
- key: yt()
609
+ }, typeof d == "string" ? ce(d) : d, {
610
+ state: y,
611
+ key: ye()
627
612
  }));
628
613
  }
629
- function p(g, v, b) {
630
- return !i.length || (i.call({
631
- action: g,
632
- location: v,
614
+ function p(d, y, b) {
615
+ return !u.length || (u.call({
616
+ action: d,
617
+ location: y,
633
618
  retry: b
634
619
  }), !1);
635
620
  }
636
- function S(g, v) {
637
- u = g, c = v, f.call({
638
- action: u,
621
+ function A(d, y) {
622
+ i = d, c = y, f.call({
623
+ action: i,
639
624
  location: c
640
625
  });
641
626
  }
642
- function E(g, v) {
643
- var b = U.Push, x = y(g, v);
644
- function m() {
645
- E(g, v);
627
+ function v(d, y) {
628
+ var b = C.Push, k = P(d, y);
629
+ function g() {
630
+ v(d, y);
646
631
  }
647
- process.env.NODE_ENV !== "production" && Q(c.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(g) + ")"), p(b, x, m) && (s += 1, a.splice(s, a.length, x), S(b, x));
632
+ process.env.NODE_ENV !== "production" && Q(c.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(d) + ")"), p(b, k, g) && (s += 1, a.splice(s, a.length, k), A(b, k));
648
633
  }
649
- function A(g, v) {
650
- var b = U.Replace, x = y(g, v);
651
- function m() {
652
- A(g, v);
634
+ function R(d, y) {
635
+ var b = C.Replace, k = P(d, y);
636
+ function g() {
637
+ R(d, y);
653
638
  }
654
- process.env.NODE_ENV !== "production" && Q(c.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(g) + ")"), p(b, x, m) && (a[s] = x, S(b, x));
639
+ process.env.NODE_ENV !== "production" && Q(c.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(d) + ")"), p(b, k, g) && (a[s] = k, A(b, k));
655
640
  }
656
- function k(g) {
657
- var v = te(s + g, 0, a.length - 1), b = U.Pop, x = a[v];
658
- function m() {
659
- k(g);
641
+ function x(d) {
642
+ var y = tt(s + d, 0, a.length - 1), b = C.Pop, k = a[y];
643
+ function g() {
644
+ x(d);
660
645
  }
661
- p(b, x, m) && (s = v, S(b, x));
646
+ p(b, k, g) && (s = y, A(b, k));
662
647
  }
663
- var j = {
648
+ var B = {
664
649
  get index() {
665
650
  return s;
666
651
  },
667
652
  get action() {
668
- return u;
653
+ return i;
669
654
  },
670
655
  get location() {
671
656
  return c;
672
657
  },
673
658
  createHref: h,
674
- push: E,
675
- replace: A,
676
- go: k,
659
+ push: v,
660
+ replace: R,
661
+ go: x,
677
662
  back: function() {
678
- k(-1);
663
+ x(-1);
679
664
  },
680
665
  forward: function() {
681
- k(1);
666
+ x(1);
682
667
  },
683
- listen: function(v) {
684
- return f.push(v);
668
+ listen: function(y) {
669
+ return f.push(y);
685
670
  },
686
- block: function(v) {
687
- return i.push(v);
671
+ block: function(y) {
672
+ return u.push(y);
688
673
  }
689
674
  };
690
- return j;
675
+ return B;
691
676
  }
692
- function te(t, e, n) {
693
- return Math.min(Math.max(t, e), n);
677
+ function tt(e, t, n) {
678
+ return Math.min(Math.max(e, t), n);
694
679
  }
695
- function Rt(t) {
696
- t.preventDefault(), t.returnValue = "";
680
+ function Re(e) {
681
+ e.preventDefault(), e.returnValue = "";
697
682
  }
698
683
  function Z() {
699
- var t = [];
684
+ var e = [];
700
685
  return {
701
686
  get length() {
702
- return t.length;
687
+ return e.length;
703
688
  },
704
689
  push: function(n) {
705
- return t.push(n), function() {
706
- t = t.filter(function(r) {
690
+ return e.push(n), function() {
691
+ e = e.filter(function(r) {
707
692
  return r !== n;
708
693
  });
709
694
  };
710
695
  },
711
696
  call: function(n) {
712
- t.forEach(function(r) {
697
+ e.forEach(function(r) {
713
698
  return r && r(n);
714
699
  });
715
700
  }
716
701
  };
717
702
  }
718
- function yt() {
703
+ function ye() {
719
704
  return Math.random().toString(36).substr(2, 8);
720
705
  }
721
- function G(t) {
722
- var e = t.pathname, n = e === void 0 ? "/" : e, r = t.search, o = r === void 0 ? "" : r, a = t.hash, s = a === void 0 ? "" : a;
706
+ function G(e) {
707
+ var t = e.pathname, n = t === void 0 ? "/" : t, r = e.search, o = r === void 0 ? "" : r, a = e.hash, s = a === void 0 ? "" : a;
723
708
  return o && o !== "?" && (n += o.charAt(0) === "?" ? o : "?" + o), s && s !== "#" && (n += s.charAt(0) === "#" ? s : "#" + s), n;
724
709
  }
725
- function ct(t) {
726
- var e = {};
727
- if (t) {
728
- var n = t.indexOf("#");
729
- n >= 0 && (e.hash = t.substr(n), t = t.substr(0, n));
730
- var r = t.indexOf("?");
731
- r >= 0 && (e.search = t.substr(r), t = t.substr(0, r)), t && (e.pathname = t);
710
+ function ce(e) {
711
+ var t = {};
712
+ if (e) {
713
+ var n = e.indexOf("#");
714
+ n >= 0 && (t.hash = e.substr(n), e = e.substr(0, n));
715
+ var r = e.indexOf("?");
716
+ r >= 0 && (t.search = e.substr(r), e = e.substr(0, r)), e && (t.pathname = e);
732
717
  }
733
- return e;
718
+ return t;
734
719
  }
735
- class Hn extends Error {
720
+ class jn extends Error {
736
721
  /**
737
722
  * Constructs a new UseRouteInvalidError instance with a message that specifies both the given and expected route names.
738
723
  * This detailed error message aids in quickly identifying and resolving mismatches in route usage.
739
724
  * @param routeName - The route name that was incorrectly used.
740
725
  * @param actualRouteName - The expected route name that should have been used.
741
726
  */
742
- constructor(e, n) {
743
- super(`useRoute called with incorrect route. Given ${e}, expected ${n}`);
727
+ constructor(t, n) {
728
+ super(`useRoute called with incorrect route. Given ${t}, expected ${n}`);
744
729
  }
745
730
  }
746
- const be = Symbol();
731
+ const At = Symbol();
747
732
  function Vn() {
748
- const t = it(be);
749
- if (!t)
750
- throw new St();
751
- return t;
733
+ const e = ie(At);
734
+ if (!e)
735
+ throw new Se();
736
+ return e;
752
737
  }
753
- const Ae = Symbol();
754
- function Ot() {
755
- const t = it(Ae);
756
- if (!t)
757
- throw new St();
758
- return t;
738
+ const xt = Symbol();
739
+ function Oe() {
740
+ const e = ie(xt);
741
+ if (!e)
742
+ throw new Se();
743
+ return e;
759
744
  }
760
- const xe = Symbol("isRouterRouteSymbol");
761
- function jn(t) {
762
- return typeof t == "object" && t !== null && xe in t;
745
+ const kt = Symbol("isRouterRouteSymbol");
746
+ function qn(e) {
747
+ return typeof e == "object" && e !== null && kt in e;
763
748
  }
764
- function On(t, e) {
765
- function n(y, p, S) {
766
- if (typeof y == "object") {
767
- const A = {
768
- ...t.params,
769
- ...y
749
+ function On(e, t) {
750
+ function n(v, R, x) {
751
+ if (typeof v == "object") {
752
+ const d = {
753
+ ...e.params,
754
+ ...v
770
755
  };
771
- return e(t.name, A, p);
756
+ return t(e.name, d, R);
772
757
  }
773
- const E = {
774
- ...t.params,
775
- [y]: p
758
+ const B = {
759
+ ...e.params,
760
+ [v]: R
776
761
  };
777
- return e(t.name, E, S);
778
- }
779
- const { id: r, matched: o, matches: a, name: s, query: u, params: c, state: f, hash: i } = Ze(t), h = Ht({
780
- id: r,
781
- matched: o,
782
- matches: a,
783
- state: f,
762
+ return t(e.name, B, x);
763
+ }
764
+ const r = (...v) => {
765
+ const R = new URLSearchParams(e.query.toString());
766
+ R.set(...v), n({}, { query: R });
767
+ }, o = (...v) => {
768
+ const R = new URLSearchParams(e.query.toString());
769
+ R.append(...v), n({}, { query: R });
770
+ }, a = (...v) => {
771
+ const R = new URLSearchParams(e.query.toString());
772
+ R.delete(...v), n({}, { query: R });
773
+ }, { id: s, matched: i, matches: c, name: f, query: u, params: h, state: P, hash: p } = en(e), A = je({
774
+ id: s,
775
+ matched: i,
776
+ matches: c,
777
+ state: P,
784
778
  query: u,
785
- hash: i,
786
- params: c,
787
- name: s,
779
+ hash: p,
780
+ params: h,
781
+ name: f,
788
782
  update: n,
789
- [xe]: !0
783
+ [kt]: !0
790
784
  });
791
- return new Proxy(h, {
792
- get: (y, p, S) => p === "params" ? new Proxy(t.params, {
793
- set(E, A, k) {
794
- return n(A, k), !0;
785
+ return new Proxy(A, {
786
+ get: (v, R, x) => R === "params" ? new Proxy(e.params, {
787
+ set(B, d, y) {
788
+ return n(d, y), !0;
795
789
  }
796
- }) : p === "state" ? new Proxy(t.state, {
797
- set(E, A, k) {
798
- return n({}, { state: { ...t.state, [A]: k } }), !0;
790
+ }) : R === "state" ? new Proxy(e.state, {
791
+ set(B, d, y) {
792
+ return n({}, { state: { ...e.state, [d]: y } }), !0;
799
793
  }
800
- }) : Reflect.get(y, p, S)
794
+ }) : R === "query" ? new Proxy(e.query, {
795
+ get(B, d, y) {
796
+ switch (d) {
797
+ case "append":
798
+ return o;
799
+ case "set":
800
+ return r;
801
+ case "delete":
802
+ return a;
803
+ default:
804
+ return Reflect.get(B, d, y);
805
+ }
806
+ }
807
+ }) : Reflect.get(v, R, x),
808
+ set(v, R, x, B) {
809
+ return R === "query" ? (n({}, { query: x }), !0) : Reflect.set(v, R, x, B);
810
+ }
801
811
  });
802
812
  }
803
- const ke = Symbol();
804
- function _n(t, e) {
805
- const n = Ht({ ...t }), r = (s) => {
813
+ const Lt = Symbol();
814
+ function _n(e, t) {
815
+ const n = je({ ...e }), r = (s) => {
806
816
  Object.assign(n, {
807
- [ke]: !1,
817
+ [Lt]: !1,
808
818
  ...s
809
819
  });
810
- }, o = n, a = On(o, e);
820
+ }, o = n, a = On(o, t);
811
821
  return {
812
822
  currentRoute: o,
813
823
  routerRoute: a,
814
824
  updateRoute: r
815
825
  };
816
826
  }
817
- function D(t) {
818
- return !t.startsWith("http") ? Mn(t) : qn(t);
827
+ function D(e) {
828
+ return !e.startsWith("http") ? Wn(e) : Dn(e);
819
829
  }
820
- function qn(t) {
821
- const { protocol: e, host: n, pathname: r, search: o, searchParams: a, hash: s } = new URL(t, t);
830
+ function Dn(e) {
831
+ const { protocol: t, host: n, pathname: r, search: o, searchParams: a, hash: s } = new URL(e, e);
822
832
  return {
823
- protocol: e,
833
+ protocol: t,
824
834
  host: n,
825
835
  pathname: r,
826
836
  search: o,
@@ -828,23 +838,23 @@ function qn(t) {
828
838
  hash: s
829
839
  };
830
840
  }
831
- function Mn(t) {
832
- const { pathname: e, search: n, searchParams: r, hash: o } = new URL(t, "https://localhost");
841
+ function Wn(e) {
842
+ const { pathname: t, search: n, searchParams: r, hash: o } = new URL(e, "https://localhost");
833
843
  return {
834
- pathname: e,
844
+ pathname: t,
835
845
  search: n,
836
846
  searchParams: r,
837
847
  hash: o
838
848
  };
839
849
  }
840
- function Wn(t) {
841
- return (e) => {
842
- const { host: n } = D(e);
843
- return !(n === void 0 || n === t);
850
+ function Mn(e) {
851
+ return (t) => {
852
+ const { host: n } = D(t);
853
+ return !(n === void 0 || n === e);
844
854
  };
845
855
  }
846
- function Dn({ mode: t, listener: e }) {
847
- const n = Tn(t), r = (c, f) => {
856
+ function Tn({ mode: e, listener: t }) {
857
+ const n = In(e), r = (c, f) => {
848
858
  if (f != null && f.replace) {
849
859
  n.replace(c, f.state);
850
860
  return;
@@ -860,29 +870,29 @@ function Dn({ mode: t, listener: e }) {
860
870
  update: r,
861
871
  refresh: o,
862
872
  startListening: () => {
863
- a == null || a(), a = n.listen(e);
873
+ a == null || a(), a = n.listen(t);
864
874
  },
865
875
  stopListening: () => {
866
876
  a == null || a();
867
877
  }
868
878
  };
869
879
  }
870
- function Tn(t = "auto") {
871
- switch (t) {
880
+ function In(e = "auto") {
881
+ switch (e) {
872
882
  case "auto":
873
- return ye() ? Xt() : Zt();
883
+ return vt() ? Ze() : et();
874
884
  case "browser":
875
- return Xt();
885
+ return Ze();
876
886
  case "memory":
877
- return Zt();
887
+ return et();
878
888
  case "hash":
879
- return Cn();
889
+ return $n();
880
890
  default:
881
- const e = t;
882
- throw new Error(`Switch is not exhaustive for mode: ${e}`);
891
+ const t = e;
892
+ throw new Error(`Switch is not exhaustive for mode: ${t}`);
883
893
  }
884
894
  }
885
- class vt {
895
+ class ve {
886
896
  constructor() {
887
897
  M(this, "onBeforeRouteEnter", /* @__PURE__ */ new Set());
888
898
  M(this, "onBeforeRouteUpdate", /* @__PURE__ */ new Set());
@@ -892,88 +902,91 @@ class vt {
892
902
  M(this, "onAfterRouteLeave", /* @__PURE__ */ new Set());
893
903
  }
894
904
  }
895
- class ee extends Error {
905
+ class nt extends Error {
896
906
  }
897
- class rt extends Error {
907
+ class re extends Error {
898
908
  constructor(n) {
899
909
  super("Error occurred during a router push operation.");
900
910
  M(this, "to");
901
911
  this.to = n;
902
912
  }
903
913
  }
904
- class Lt extends Error {
914
+ class Be extends Error {
905
915
  constructor(n) {
906
916
  super(`Routing action rejected: ${n}`);
907
917
  M(this, "type");
908
918
  this.type = n;
909
919
  }
910
920
  }
911
- function In(t, e) {
912
- const n = new vt();
913
- return t.matches.forEach((r, o) => {
914
- r.onBeforeRouteEnter && _t(t, e, o) && z(r.onBeforeRouteEnter).forEach((a) => n.onBeforeRouteEnter.add(a)), r.onBeforeRouteUpdate && Mt(t, e, o) && z(r.onBeforeRouteUpdate).forEach((a) => n.onBeforeRouteUpdate.add(a));
915
- }), e.matches.forEach((r, o) => {
916
- r.onBeforeRouteLeave && qt(t, e, o) && z(r.onBeforeRouteLeave).forEach((a) => n.onBeforeRouteLeave.add(a));
921
+ function Fn(e, t) {
922
+ const n = new ve();
923
+ return e.matches.forEach((r, o) => {
924
+ r.onBeforeRouteEnter && _e(e, t, o) && z(r.onBeforeRouteEnter).forEach((a) => n.onBeforeRouteEnter.add(a)), r.onBeforeRouteUpdate && We(e, t, o) && z(r.onBeforeRouteUpdate).forEach((a) => n.onBeforeRouteUpdate.add(a));
925
+ }), t.matches.forEach((r, o) => {
926
+ r.onBeforeRouteLeave && De(e, t, o) && z(r.onBeforeRouteLeave).forEach((a) => n.onBeforeRouteLeave.add(a));
917
927
  }), n;
918
928
  }
919
- function Fn(t, e) {
920
- const n = new vt();
921
- return t.matches.forEach((r, o) => {
922
- r.onAfterRouteEnter && _t(t, e, o) && z(r.onAfterRouteEnter).forEach((a) => n.onAfterRouteEnter.add(a)), r.onAfterRouteUpdate && Mt(t, e, o) && z(r.onAfterRouteUpdate).forEach((a) => n.onAfterRouteUpdate.add(a));
923
- }), e.matches.forEach((r, o) => {
924
- r.onAfterRouteLeave && qt(t, e, o) && z(r.onAfterRouteLeave).forEach((a) => n.onAfterRouteLeave.add(a));
929
+ function Jn(e, t) {
930
+ const n = new ve();
931
+ return e.matches.forEach((r, o) => {
932
+ r.onAfterRouteEnter && _e(e, t, o) && z(r.onAfterRouteEnter).forEach((a) => n.onAfterRouteEnter.add(a)), r.onAfterRouteUpdate && We(e, t, o) && z(r.onAfterRouteUpdate).forEach((a) => n.onAfterRouteUpdate.add(a));
933
+ }), t.matches.forEach((r, o) => {
934
+ r.onAfterRouteLeave && De(e, t, o) && z(r.onAfterRouteLeave).forEach((a) => n.onAfterRouteLeave.add(a));
925
935
  }), n;
926
936
  }
927
- function W(t) {
928
- return typeof t != "string" ? !1 : /^(https?:\/\/|\/).*/g.test(t);
929
- }
930
- function Jn() {
931
- const t = (s) => {
932
- throw new Lt(s);
933
- }, e = (...s) => {
934
- throw new rt(s);
935
- }, n = (s, u, c) => {
936
- if (W(s)) {
937
- const h = u ?? {};
938
- throw new rt([s, { ...h, replace: !0 }]);
937
+ function _(e) {
938
+ return typeof e != "string" ? !1 : /^(https?:\/\/|\/).*/g.test(e);
939
+ }
940
+ function Qn(e) {
941
+ return _(e) ? e : `/${e}`;
942
+ }
943
+ function Gn() {
944
+ const e = (s) => {
945
+ throw new Be(s);
946
+ }, t = (...s) => {
947
+ throw new re(s);
948
+ }, n = (s, i, c) => {
949
+ if (_(s)) {
950
+ const h = i ?? {};
951
+ throw new re([s, { ...h, replace: !0 }]);
939
952
  }
940
- const f = u, i = c ?? {};
941
- throw new rt([s, f, { ...i, replace: !0 }]);
953
+ const f = i, u = c ?? {};
954
+ throw new re([s, f, { ...u, replace: !0 }]);
942
955
  }, r = () => {
943
- throw new ee();
956
+ throw new nt();
944
957
  };
945
- async function o({ to: s, from: u, hooks: c }) {
946
- const { global: f, component: i } = c, h = In(s, u), y = [
958
+ async function o({ to: s, from: i, hooks: c }) {
959
+ const { global: f, component: u } = c, h = Fn(s, i), P = [
947
960
  ...f.onBeforeRouteEnter,
948
961
  ...h.onBeforeRouteEnter,
949
962
  ...f.onBeforeRouteUpdate,
950
963
  ...h.onBeforeRouteUpdate,
951
- ...i.onBeforeRouteUpdate,
964
+ ...u.onBeforeRouteUpdate,
952
965
  ...f.onBeforeRouteLeave,
953
966
  ...h.onBeforeRouteLeave,
954
- ...i.onBeforeRouteLeave
967
+ ...u.onBeforeRouteLeave
955
968
  ];
956
969
  try {
957
- const p = y.map((S) => S(s, {
958
- from: u,
959
- reject: t,
960
- push: e,
970
+ const p = P.map((A) => A(s, {
971
+ from: i,
972
+ reject: e,
973
+ push: t,
961
974
  replace: n,
962
975
  abort: r
963
976
  }));
964
977
  await Promise.all(p);
965
978
  } catch (p) {
966
- if (p instanceof rt)
979
+ if (p instanceof re)
967
980
  return {
968
981
  status: "PUSH",
969
982
  to: p.to
970
983
  };
971
- if (p instanceof Lt)
984
+ if (p instanceof Be)
972
985
  return {
973
986
  status: "REJECT",
974
987
  type: p.type
975
988
  };
976
- if (p instanceof ee)
989
+ if (p instanceof nt)
977
990
  return {
978
991
  status: "ABORT"
979
992
  };
@@ -983,33 +996,33 @@ function Jn() {
983
996
  status: "SUCCESS"
984
997
  };
985
998
  }
986
- async function a({ to: s, from: u, hooks: c }) {
987
- const { global: f, component: i } = c, h = Fn(s, u), y = [
988
- ...i.onAfterRouteLeave,
999
+ async function a({ to: s, from: i, hooks: c }) {
1000
+ const { global: f, component: u } = c, h = Jn(s, i), P = [
1001
+ ...u.onAfterRouteLeave,
989
1002
  ...h.onAfterRouteLeave,
990
1003
  ...f.onAfterRouteLeave,
991
- ...i.onAfterRouteUpdate,
1004
+ ...u.onAfterRouteUpdate,
992
1005
  ...h.onAfterRouteUpdate,
993
1006
  ...f.onAfterRouteUpdate,
994
- ...i.onAfterRouteEnter,
1007
+ ...u.onAfterRouteEnter,
995
1008
  ...h.onAfterRouteEnter,
996
1009
  ...f.onAfterRouteEnter
997
1010
  ];
998
1011
  try {
999
- const p = y.map((S) => S(s, {
1000
- from: u,
1001
- reject: t,
1002
- push: e,
1012
+ const p = P.map((A) => A(s, {
1013
+ from: i,
1014
+ reject: e,
1015
+ push: t,
1003
1016
  replace: n
1004
1017
  }));
1005
1018
  await Promise.all(p);
1006
1019
  } catch (p) {
1007
- if (p instanceof rt)
1020
+ if (p instanceof re)
1008
1021
  return {
1009
1022
  status: "PUSH",
1010
1023
  to: p.to
1011
1024
  };
1012
- if (p instanceof Lt)
1025
+ if (p instanceof Be)
1013
1026
  return {
1014
1027
  status: "REJECT",
1015
1028
  type: p.type
@@ -1025,479 +1038,492 @@ function Jn() {
1025
1038
  runAfterRouteHooks: a
1026
1039
  };
1027
1040
  }
1028
- const _t = (t, e, n) => {
1029
- const r = t.matches, o = (e == null ? void 0 : e.matches) ?? [];
1041
+ const _e = (e, t, n) => {
1042
+ const r = e.matches, o = (t == null ? void 0 : t.matches) ?? [];
1030
1043
  return r.length < n || r[n] !== o[n];
1031
- }, qt = (t, e, n) => {
1032
- const r = t.matches, o = (e == null ? void 0 : e.matches) ?? [];
1044
+ }, De = (e, t, n) => {
1045
+ const r = e.matches, o = (t == null ? void 0 : t.matches) ?? [];
1033
1046
  return r.length < n || r[n] !== o[n];
1034
- }, Mt = (t, e, n) => t.matches[n] === (e == null ? void 0 : e.matches[n]);
1035
- function ne(t) {
1036
- switch (t) {
1047
+ }, We = (e, t, n) => e.matches[n] === (t == null ? void 0 : t.matches[n]);
1048
+ function rt(e) {
1049
+ switch (e) {
1037
1050
  case "onBeforeRouteEnter":
1038
1051
  case "onAfterRouteEnter":
1039
- return _t;
1052
+ return _e;
1040
1053
  case "onBeforeRouteUpdate":
1041
1054
  case "onAfterRouteUpdate":
1042
- return Mt;
1055
+ return We;
1043
1056
  case "onBeforeRouteLeave":
1044
1057
  case "onAfterRouteLeave":
1045
- return qt;
1058
+ return De;
1046
1059
  default:
1047
- throw new Error(`Switch is not exhaustive for lifecycle: ${t}`);
1060
+ throw new Error(`Switch is not exhaustive for lifecycle: ${e}`);
1048
1061
  }
1049
1062
  }
1050
- function Qn() {
1051
- const t = {
1052
- global: new vt(),
1053
- component: new vt()
1063
+ function Kn() {
1064
+ const e = {
1065
+ global: new ve(),
1066
+ component: new ve()
1054
1067
  };
1055
- function e({ lifecycle: r, timing: o, depth: a, hook: s }) {
1056
- const u = ne(r), c = t[o][r], f = (i, h) => {
1057
- if (u(i, h.from, a))
1058
- return s(i, h);
1068
+ function t({ lifecycle: r, timing: o, depth: a, hook: s }) {
1069
+ const i = rt(r), c = e[o][r], f = (u, h) => {
1070
+ if (i(u, h.from, a))
1071
+ return s(u, h);
1059
1072
  };
1060
1073
  return c.add(f), () => c.delete(f);
1061
1074
  }
1062
1075
  function n({ lifecycle: r, timing: o, depth: a, hook: s }) {
1063
- const u = ne(r), c = t[o][r], f = (i, h) => {
1064
- if (u(i, h.from, a))
1065
- return s(i, h);
1076
+ const i = rt(r), c = e[o][r], f = (u, h) => {
1077
+ if (i(u, h.from, a))
1078
+ return s(u, h);
1066
1079
  };
1067
1080
  return c.add(f), () => c.delete(f);
1068
1081
  }
1069
- return { ...t, addBeforeRouteHook: e, addAfterRouteHook: n };
1082
+ return { ...e, addBeforeRouteHook: t, addAfterRouteHook: n };
1070
1083
  }
1071
- const Be = Symbol();
1072
- function Gn() {
1073
- const t = Qn();
1084
+ const Bt = Symbol();
1085
+ function zn() {
1086
+ const e = Kn();
1074
1087
  return {
1075
- onBeforeRouteEnter: (u) => t.addBeforeRouteHook({ lifecycle: "onBeforeRouteEnter", hook: u, timing: "global", depth: 0 }),
1076
- onBeforeRouteUpdate: (u) => t.addBeforeRouteHook({ lifecycle: "onBeforeRouteUpdate", hook: u, timing: "global", depth: 0 }),
1077
- onBeforeRouteLeave: (u) => t.addBeforeRouteHook({ lifecycle: "onBeforeRouteLeave", hook: u, timing: "global", depth: 0 }),
1078
- onAfterRouteEnter: (u) => t.addAfterRouteHook({ lifecycle: "onAfterRouteEnter", hook: u, timing: "global", depth: 0 }),
1079
- onAfterRouteUpdate: (u) => t.addAfterRouteHook({ lifecycle: "onAfterRouteUpdate", hook: u, timing: "global", depth: 0 }),
1080
- onAfterRouteLeave: (u) => t.addAfterRouteHook({ lifecycle: "onAfterRouteLeave", hook: u, timing: "global", depth: 0 }),
1081
- hooks: t
1088
+ onBeforeRouteEnter: (i) => e.addBeforeRouteHook({ lifecycle: "onBeforeRouteEnter", hook: i, timing: "global", depth: 0 }),
1089
+ onBeforeRouteUpdate: (i) => e.addBeforeRouteHook({ lifecycle: "onBeforeRouteUpdate", hook: i, timing: "global", depth: 0 }),
1090
+ onBeforeRouteLeave: (i) => e.addBeforeRouteHook({ lifecycle: "onBeforeRouteLeave", hook: i, timing: "global", depth: 0 }),
1091
+ onAfterRouteEnter: (i) => e.addAfterRouteHook({ lifecycle: "onAfterRouteEnter", hook: i, timing: "global", depth: 0 }),
1092
+ onAfterRouteUpdate: (i) => e.addAfterRouteHook({ lifecycle: "onAfterRouteUpdate", hook: i, timing: "global", depth: 0 }),
1093
+ onAfterRouteLeave: (i) => e.addAfterRouteHook({ lifecycle: "onAfterRouteLeave", hook: i, timing: "global", depth: 0 }),
1094
+ hooks: e
1082
1095
  };
1083
1096
  }
1084
- function Kn(t) {
1085
- return ut(() => () => pt("h1", t), {
1086
- name: t,
1097
+ function Yn(e) {
1098
+ return ue(() => () => pe("h1", e), {
1099
+ name: e,
1087
1100
  props: []
1088
1101
  });
1089
1102
  }
1090
- function Le(t) {
1091
- const e = new URLSearchParams(t);
1103
+ function Ut(e) {
1104
+ const t = new URLSearchParams(e);
1092
1105
  return {
1093
- get: (n) => e.get(n),
1094
- getAll: (n) => e.getAll(n)
1106
+ get: (...n) => t.get(...n),
1107
+ getAll: (...n) => t.getAll(...n),
1108
+ set: (...n) => {
1109
+ t.set(...n);
1110
+ },
1111
+ append: (...n) => {
1112
+ t.append(...n);
1113
+ },
1114
+ delete: (...n) => {
1115
+ t.delete(...n);
1116
+ },
1117
+ toString: (...n) => t.toString(...n),
1118
+ forEach: (...n) => {
1119
+ t.forEach(...n);
1120
+ },
1121
+ entries: (...n) => t.entries(...n),
1122
+ keys: (...n) => t.keys(...n),
1123
+ values: (...n) => t.values(...n),
1124
+ has: (...n) => t.has(...n)
1095
1125
  };
1096
1126
  }
1097
- function zn() {
1098
- let t = 0;
1099
- return () => (++t).toString();
1127
+ function Xn() {
1128
+ let e = 0;
1129
+ return () => (++e).toString();
1100
1130
  }
1101
- const Wt = zn();
1102
- function Yn({
1103
- rejections: t
1131
+ const Me = Xn();
1132
+ function Zn({
1133
+ rejections: e
1104
1134
  }) {
1105
- const e = (a) => {
1135
+ const t = (a) => {
1106
1136
  const s = {
1107
- ...t
1137
+ ...e
1108
1138
  };
1109
- return dt(s[a] ?? Kn(a));
1139
+ return de(s[a] ?? Yn(a));
1110
1140
  }, n = (a) => {
1111
- const s = dt(e(a)), u = {
1112
- id: Wt(),
1113
- name: a,
1141
+ const s = de(t(a)), i = {
1142
+ id: Me(),
1114
1143
  component: s,
1115
1144
  meta: {},
1116
1145
  state: {}
1117
1146
  };
1118
1147
  return {
1119
- id: u.id,
1120
- matched: u,
1121
- matches: [u],
1148
+ id: i.id,
1149
+ matched: i,
1150
+ matches: [i],
1122
1151
  name: a,
1123
- query: Le(""),
1152
+ query: Ut(""),
1124
1153
  params: {},
1125
1154
  state: {},
1126
- [ke]: !0
1155
+ [Lt]: !0
1127
1156
  };
1128
1157
  }, r = (a) => {
1129
1158
  if (!a) {
1130
1159
  o.value = null;
1131
1160
  return;
1132
1161
  }
1133
- const s = e(a);
1162
+ const s = t(a);
1134
1163
  o.value = { type: a, component: s };
1135
- }, o = ie(null);
1164
+ }, o = ft(null);
1136
1165
  return {
1137
1166
  setRejection: r,
1138
1167
  rejection: o,
1139
1168
  getRejectionRoute: n
1140
1169
  };
1141
1170
  }
1142
- class Xn extends Error {
1143
- constructor(e) {
1144
- super(`Route not found: "${e}"`);
1171
+ class er extends Error {
1172
+ constructor(t) {
1173
+ super(`Route not found: "${t}"`);
1145
1174
  }
1146
1175
  }
1147
- function Dt(t) {
1148
- return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1176
+ function Te(e) {
1177
+ return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1149
1178
  }
1150
- function Zn(t, e) {
1151
- const n = Array.from(t.matchAll(e));
1179
+ function tr(e, t) {
1180
+ const n = Array.from(e.matchAll(t));
1152
1181
  if (n.length === 0)
1153
- return [t];
1182
+ return [e];
1154
1183
  let r = 0;
1155
- const o = n.reduce((s, u) => {
1156
- const c = Dt(t.slice(r, u.index));
1184
+ const o = n.reduce((s, i) => {
1185
+ const c = Te(e.slice(r, i.index));
1157
1186
  c.length && s.push(c);
1158
- const [f] = u;
1159
- return s.push(f), r = u.index + f.length, s;
1160
- }, []), a = t.slice(r);
1187
+ const [f] = i;
1188
+ return s.push(f), r = i.index + f.length, s;
1189
+ }, []), a = e.slice(r);
1161
1190
  return a && o.push(a), o;
1162
1191
  }
1163
- function tr(t) {
1164
- const e = Ne(t.path.toString());
1165
- return new RegExp(`^${e}$`, "i");
1192
+ function nr(e) {
1193
+ const t = Nt(e.path.value);
1194
+ return new RegExp(`^${t}$`, "i");
1166
1195
  }
1167
- function er(t) {
1168
- const e = new URLSearchParams(t.query.toString());
1169
- return Array.from(e.entries()).filter(([, n]) => !$t(n)).map(([n, r]) => {
1170
- const o = Ne(r);
1171
- return new RegExp(`${Dt(n)}=${o}(&|$)`, "i");
1196
+ function rr(e) {
1197
+ const t = new URLSearchParams(e.query.value);
1198
+ return Array.from(t.entries()).filter(([, n]) => !Ce(n)).map(([n, r]) => {
1199
+ const o = Nt(r);
1200
+ return new RegExp(`${Te(n)}=${o}(&|$)`, "i");
1172
1201
  });
1173
1202
  }
1174
- function Ne(t) {
1175
- return Zn(t, new RegExp(nr, "g")).map((e) => e.startsWith(T) ? Ue(e) : Dt(e)).join("");
1203
+ function Nt(e) {
1204
+ return tr(e, new RegExp(or, "g")).map((t) => t.startsWith(T) ? Ct(t) : Te(t)).join("");
1176
1205
  }
1177
- function Ue(t) {
1206
+ function Ct(e) {
1178
1207
  return [
1179
- rr,
1180
- or
1181
- ].reduce((e, n) => n(e), t);
1208
+ ar,
1209
+ sr
1210
+ ].reduce((t, n) => n(t), e);
1182
1211
  }
1183
- const nr = `\\${T}\\??([\\w-_]+)\\${J}`, Tt = `\\${T}\\?([\\w-_]+)\\${J}`, $e = `\\${T}([\\w-_]+)\\${J}`;
1184
- function rr(t) {
1185
- return t.replace(new RegExp(Tt, "g"), ".*");
1212
+ const or = `\\${T}\\??([\\w-_]+)\\${J}`, Ie = `\\${T}\\?([\\w-_]+)\\${J}`, Ht = `\\${T}([\\w-_]+)\\${J}`;
1213
+ function ar(e) {
1214
+ return e.replace(new RegExp(Ie, "g"), ".*");
1186
1215
  }
1187
- function $t(t) {
1188
- return new RegExp(Tt, "g").test(t);
1216
+ function Ce(e) {
1217
+ return new RegExp(Ie, "g").test(e);
1189
1218
  }
1190
- function or(t) {
1191
- return t.replace(new RegExp($e, "g"), ".+");
1219
+ function sr(e) {
1220
+ return e.replace(new RegExp(Ht, "g"), ".+");
1192
1221
  }
1193
- function At(t) {
1194
- const [e] = wt(t, new RegExp(Tt, "g")), [n] = wt(t, new RegExp($e, "g"));
1195
- return e ?? n;
1222
+ function Ae(e) {
1223
+ const [t] = we(e, new RegExp(Ie, "g")), [n] = we(e, new RegExp(Ht, "g"));
1224
+ return t ?? n;
1196
1225
  }
1197
- function wt(t, e) {
1198
- return Array.from(t.matchAll(e)).flatMap(([, ...r]) => r.map((o) => lt(o) ? o : ""));
1226
+ function we(e, t) {
1227
+ return Array.from(e.matchAll(t)).flatMap(([, ...r]) => r.map((o) => le(o) ? o : ""));
1199
1228
  }
1200
- function Ce(t, e, n) {
1201
- const r = Ve(e, n), [o] = wt(t, r);
1229
+ function $t(e, t, n) {
1230
+ const r = Vt(t, n), [o] = we(e, r);
1202
1231
  return o;
1203
1232
  }
1204
- function He(t, e) {
1205
- if (!e)
1206
- return t;
1207
- const { name: n, param: r, value: o } = e, a = Ve(t, n);
1208
- return wt(t, a).reduce((u, c) => c === void 0 ? u : u.replace(c, () => st(o, r, n.startsWith("?"))), t);
1233
+ function jt(e, t) {
1234
+ if (!t)
1235
+ return e;
1236
+ const { name: n, param: r, value: o } = t, a = Vt(e, n);
1237
+ return we(e, a).reduce((i, c) => c === void 0 ? i : i.replace(c, () => se(o, r, n.startsWith("?"))), e);
1209
1238
  }
1210
- function Ve(t, e) {
1239
+ function Vt(e, t) {
1211
1240
  const n = [
1212
- ar,
1213
- sr,
1214
- Ue
1215
- ].reduce((r, o) => o(r, e), t);
1241
+ cr,
1242
+ ur,
1243
+ Ct
1244
+ ].reduce((r, o) => o(r, t), e);
1216
1245
  return new RegExp(n, "g");
1217
1246
  }
1218
- function ar(t, e) {
1219
- if (!e.startsWith("?"))
1220
- return t;
1221
- const n = new RegExp(`\\${T}\\${e}\\${J}`, "g");
1222
- return t.replace(n, "(.*)");
1223
- }
1224
- function sr(t, e) {
1225
- if (e.startsWith("?"))
1226
- return t;
1227
- const n = new RegExp(`\\${T}${e}\\${J}`, "g");
1228
- return t.replace(n, "(.+)");
1229
- }
1230
- function je(t, ...e) {
1231
- return e.reduce((n, r) => {
1232
- if (!r)
1233
- return n;
1234
- const o = new URLSearchParams(r).toString();
1235
- return Object.keys(o).length === 0 ? n : n.includes("?") ? `${n}&${o}` : `${n}?${o}`;
1236
- }, t);
1237
- }
1238
- function cr(t, e = {}) {
1239
- const { params: n = {}, query: r } = e, o = ur(t.host, n), a = ir(t.path, n), s = fr(t.query, n), u = je(`${o}${a}`, s, r), c = mt(t.hash.value ?? e.hash).toString();
1240
- return `${u}${c}`;
1241
- }
1242
- function ur(t, e) {
1243
- const n = t.toString();
1244
- return Object.entries(t.params).reduce((r, [o, a]) => {
1245
- const s = At(`${T}${o}${J}`);
1246
- return s ? He(r, { name: o, param: a, value: e[s] }) : r;
1247
- }, n);
1247
+ function cr(e, t) {
1248
+ if (!t.startsWith("?"))
1249
+ return e;
1250
+ const n = new RegExp(`\\${T}\\${t}\\${J}`, "g");
1251
+ return e.replace(n, "(.*)");
1252
+ }
1253
+ function ur(e, t) {
1254
+ if (t.startsWith("?"))
1255
+ return e;
1256
+ const n = new RegExp(`\\${T}${t}\\${J}`, "g");
1257
+ return e.replace(n, "(.+)");
1258
+ }
1259
+ function qt({ protocol: e, host: t, pathname: n, search: r, searchParams: o, hash: a }) {
1260
+ const s = new URL("https://localhost");
1261
+ e && (s.protocol = e), t && (s.host = t), n && (s.pathname = n), o ? s.search = o.toString() : r && (s.search = r), a && (s.hash = a);
1262
+ const i = s.toString().replace(/^https:\/\/localhost\/*/, "/");
1263
+ return Qn(i);
1264
+ }
1265
+ function ir(e, t) {
1266
+ const n = new URLSearchParams(e), r = new URLSearchParams(t);
1267
+ for (const [o, a] of r.entries())
1268
+ n.append(o, a);
1269
+ return n;
1270
+ }
1271
+ function fr(e, t = {}) {
1272
+ const { params: n = {}, query: r } = t, o = pr(e.query, n), a = ir(o, r), s = hr(e.path, n), i = me(e.hash.value ?? t.hash).value, c = lr(e.host, n), { protocol: f, host: u } = D(c);
1273
+ return qt({ protocol: f, host: u, pathname: s, searchParams: a, hash: i });
1248
1274
  }
1249
- function ir(t, e) {
1250
- const n = t.toString();
1251
- return Object.entries(t.params).reduce((r, [o, a]) => {
1252
- const s = At(`${T}${o}${J}`);
1253
- return s ? He(r, { name: o, param: a, value: e[s] }) : r;
1275
+ function lr(e, t) {
1276
+ const n = e.value && !e.value.startsWith("http") ? `https://${e.value}` : e.value;
1277
+ return Object.entries(e.params).reduce((r, [o, a]) => {
1278
+ const s = Ae(`${T}${o}${J}`);
1279
+ return s ? jt(r, { name: o, param: a, value: t[s] }) : r;
1254
1280
  }, n);
1255
1281
  }
1256
- function fr(t, e) {
1257
- const n = t.toString();
1258
- if (!n)
1259
- return {};
1260
- const r = new URLSearchParams(n);
1261
- return Array.from(r.entries()).reduce((o, [a, s]) => {
1262
- const u = At(s);
1263
- if (!u)
1264
- return { ...o, [a]: s };
1265
- const f = st(e[u], t.params[u], $t(s)), i = e[u] === void 0 && f === "";
1266
- return $t(s) && i ? o : { ...o, [a]: f };
1267
- }, {});
1282
+ function hr(e, t) {
1283
+ return Object.entries(e.params).reduce((n, [r, o]) => {
1284
+ const a = Ae(`${T}${r}${J}`);
1285
+ return a ? jt(n, { name: r, param: o, value: t[a] }) : n;
1286
+ }, e.value);
1268
1287
  }
1269
- function lr(t) {
1270
- return (e, n, r) => {
1271
- if (W(e))
1272
- return je(e, (n ?? {}).query);
1273
- const o = n ?? {}, a = r ?? {}, s = t.find((c) => c.name === e);
1288
+ function pr(e, t) {
1289
+ const n = new URLSearchParams(e.value);
1290
+ if (!e.value)
1291
+ return n;
1292
+ for (const [r, o] of n.entries()) {
1293
+ const a = Ae(o);
1294
+ if (!a)
1295
+ continue;
1296
+ const i = se(t[a], e.params[a], Ce(o)), c = t[a] === void 0 && i === "";
1297
+ Ce(o) && c ? n.delete(r, o) : n.set(r, i);
1298
+ }
1299
+ return n;
1300
+ }
1301
+ function dr(e) {
1302
+ return (t, n, r) => {
1303
+ if (_(t)) {
1304
+ const c = n ?? {}, { searchParams: f, ...u } = D(t);
1305
+ return Object.entries(c.query ?? {}).forEach(([h, P]) => {
1306
+ f.append(h, P);
1307
+ }), qt({ ...u, searchParams: f });
1308
+ }
1309
+ const o = n ?? {}, a = r ?? {}, s = e.find((c) => c.name === t);
1274
1310
  if (!s)
1275
- throw new Xn(String(e));
1276
- return cr(s, {
1311
+ throw new er(String(t));
1312
+ return fr(s, {
1277
1313
  params: o,
1278
1314
  query: a.query,
1279
1315
  hash: a.hash
1280
1316
  });
1281
1317
  };
1282
1318
  }
1283
- class hr extends Error {
1319
+ class mr extends Error {
1284
1320
  constructor() {
1285
1321
  super("initialUrl must be set if window.location is unavailable");
1286
1322
  }
1287
1323
  }
1288
- function pr(t) {
1289
- if (t)
1290
- return t;
1291
- if (ye())
1324
+ function gr(e) {
1325
+ if (e)
1326
+ return e;
1327
+ if (vt())
1292
1328
  return window.location.toString();
1293
- throw new hr();
1329
+ throw new mr();
1294
1330
  }
1295
- const dr = (t, e) => {
1331
+ const Rr = (e, t) => {
1296
1332
  try {
1297
- Oe(t, e);
1333
+ Ot(e, t);
1298
1334
  } catch {
1299
1335
  return !1;
1300
1336
  }
1301
1337
  return !0;
1302
- }, Oe = (t, e) => {
1303
- const { pathname: n, search: r } = D(e);
1338
+ }, Ot = (e, t) => {
1339
+ const { pathname: n, search: r } = D(t);
1304
1340
  return {
1305
- ...mr(t.path, n),
1306
- ...gr(t.query, r)
1341
+ ...yr(e.path, n),
1342
+ ...vr(e.query, r)
1307
1343
  };
1308
1344
  };
1309
- function mr(t, e) {
1310
- const n = {}, r = decodeURIComponent(e);
1311
- for (const [o, a] of Object.entries(t.params)) {
1312
- const s = o.startsWith("?"), u = s ? o.slice(1) : o, c = Ce(r, t.toString(), o), f = at(c, a, s);
1313
- n[u] = f;
1345
+ function yr(e, t) {
1346
+ const n = {}, r = decodeURIComponent(t);
1347
+ for (const [o, a] of Object.entries(e.params)) {
1348
+ const s = o.startsWith("?"), i = s ? o.slice(1) : o, c = $t(r, e.value, o), f = ae(c, a, s);
1349
+ n[i] = f;
1314
1350
  }
1315
1351
  return n;
1316
1352
  }
1317
- function gr(t, e) {
1318
- const n = {}, r = new URLSearchParams(e);
1319
- for (const [o, a] of Object.entries(t.params)) {
1320
- const s = o.startsWith("?"), u = s ? o.slice(1) : o, c = r.get(u) ?? void 0, f = at(c, a, s);
1321
- n[u] = f;
1353
+ function vr(e, t) {
1354
+ const n = {}, r = new URLSearchParams(t);
1355
+ for (const [o, a] of Object.entries(e.params)) {
1356
+ const s = o.startsWith("?"), i = s ? o.slice(1) : o, c = r.get(i) ?? void 0, f = ae(c, a, s);
1357
+ n[i] = f;
1322
1358
  }
1323
1359
  return n;
1324
1360
  }
1325
- const Rr = (t) => "name" in t.matched && !!t.matched.name, yr = (t, e) => {
1326
- const { pathname: n } = D(e);
1327
- return tr(t).test(n);
1328
- }, vr = (t, e) => {
1329
- const { search: n } = D(e);
1330
- return er(t).every((o) => o.test(n));
1331
- }, wr = (t, e) => {
1332
- const { hash: n } = D(e), r = t.hash.toString();
1333
- return !t.hash.hasValue() || r.toLowerCase() === n.toLowerCase();
1361
+ const wr = (e) => "name" in e.matched && !!e.matched.name, Pr = (e, t) => {
1362
+ const { pathname: n } = D(t);
1363
+ return nr(e).test(n);
1364
+ }, Er = (e, t) => {
1365
+ const { search: n } = D(t);
1366
+ return rr(e).every((o) => o.test(n));
1367
+ }, He = (e, t) => {
1368
+ const { hash: n } = D(t), { value: r } = e.hash;
1369
+ return r === void 0 || `#${r.toLowerCase()}` === n.toLowerCase();
1334
1370
  };
1335
- function Pr(t) {
1336
- const { searchParams: e, pathname: n } = D(t), r = -1, o = 1;
1371
+ function Sr(e) {
1372
+ const { searchParams: t, pathname: n } = D(e), r = -1, o = 1;
1337
1373
  return (a, s) => {
1338
- const u = oe(a, e), c = re(a, n), f = oe(s, e), i = re(s, n);
1339
- if (a.depth > s.depth)
1340
- return r;
1341
- if (a.depth < s.depth)
1342
- return o;
1343
- if (u + c > f + i)
1344
- return r;
1345
- if (u + c < f + i)
1346
- return o;
1347
- const { hash: h } = D(t);
1348
- return a.hash.toString() === h ? r : s.hash.toString() === h ? o : 0;
1374
+ const i = at(a, t), c = ot(a, n), f = at(s, t), u = ot(s, n);
1375
+ return a.depth > s.depth ? r : a.depth < s.depth ? o : i + c > f + u ? r : i + c < f + u ? o : He(a, e) ? r : He(s, e) ? o : 0;
1349
1376
  };
1350
1377
  }
1351
- function re(t, e) {
1352
- const n = Object.keys(t.path.params).filter((o) => o.startsWith("?")).map((o) => o), r = n.filter((o) => Ce(e, t.path.toString(), o) === void 0);
1378
+ function ot(e, t) {
1379
+ const n = Object.keys(e.path.params).filter((o) => o.startsWith("?")).map((o) => o), r = n.filter((o) => $t(t, e.path.value, o) === void 0);
1353
1380
  return n.length - r.length;
1354
1381
  }
1355
- function oe(t, e) {
1356
- const n = new URLSearchParams(t.query.toString()), r = Array.from(n.keys()), o = r.filter((a) => !e.has(a));
1382
+ function at(e, t) {
1383
+ const n = new URLSearchParams(e.query.value), r = Array.from(n.keys()), o = r.filter((a) => !t.has(a));
1357
1384
  return r.length - o.length;
1358
1385
  }
1359
- function _e(t) {
1360
- return !!t && typeof t == "object";
1386
+ function _t(e) {
1387
+ return !!e && typeof e == "object";
1361
1388
  }
1362
- const Pt = !0;
1363
- function Er(t, e, n) {
1364
- if (_e(t) && e in t) {
1365
- const r = t[e];
1389
+ const Pe = !0;
1390
+ function br(e, t, n) {
1391
+ if (_t(e) && t in e) {
1392
+ const r = e[t];
1366
1393
  if (typeof r == "string")
1367
- return at(r, n, Pt);
1394
+ return ae(r, n, Pe);
1368
1395
  }
1369
- return at(void 0, n, Pt);
1396
+ return ae(void 0, n, Pe);
1370
1397
  }
1371
- function Sr(t, e) {
1398
+ function Ar(e, t) {
1372
1399
  const n = {};
1373
- for (const [r, o] of Object.entries(t)) {
1374
- const a = Er(e, r, o);
1400
+ for (const [r, o] of Object.entries(e)) {
1401
+ const a = br(t, r, o);
1375
1402
  n[r] = a;
1376
1403
  }
1377
1404
  return n;
1378
1405
  }
1379
- function br(t, e, n) {
1380
- if (_e(t) && e in t) {
1381
- const r = t[e];
1382
- return st(r, n, Pt);
1406
+ function xr(e, t, n) {
1407
+ if (_t(e) && t in e) {
1408
+ const r = e[t];
1409
+ return se(r, n, Pe);
1383
1410
  }
1384
- return st(void 0, n, Pt);
1411
+ return se(void 0, n, Pe);
1385
1412
  }
1386
- const ae = (t, e) => {
1413
+ const st = (e, t) => {
1387
1414
  const n = {};
1388
- for (const [r, o] of Object.entries(t)) {
1389
- const a = br(e, r, o);
1415
+ for (const [r, o] of Object.entries(e)) {
1416
+ const a = xr(t, r, o);
1390
1417
  n[r] = a;
1391
1418
  }
1392
1419
  return n;
1393
- }, Ar = [
1394
- Rr,
1395
- yr,
1396
- vr,
1420
+ }, kr = [
1397
1421
  wr,
1398
- dr
1422
+ Pr,
1423
+ Er,
1424
+ He,
1425
+ Rr
1399
1426
  ];
1400
- function Nt(t, e, n) {
1401
- const r = Pr(e), o = t.filter((c) => Ar.every((f) => f(c, e))).sort(r);
1427
+ function Ue(e, t, n) {
1428
+ const r = Sr(t), o = e.filter((c) => kr.every((f) => f(c, t))).sort(r);
1402
1429
  if (o.length === 0)
1403
1430
  return;
1404
- const [a] = o, { search: s, hash: u } = D(e);
1431
+ const [a] = o, { search: s, hash: i } = D(t);
1405
1432
  return {
1406
1433
  id: a.id,
1407
1434
  matched: a.matched,
1408
1435
  matches: a.matches,
1409
1436
  name: a.name,
1410
- query: Le(s),
1411
- params: Oe(a, e),
1412
- state: Sr(a.state, n),
1413
- hash: u
1437
+ query: Ut(s),
1438
+ params: Ot(a, t),
1439
+ state: Ar(a.state, n),
1440
+ hash: i
1414
1441
  };
1415
1442
  }
1416
- function It(t, e) {
1443
+ function Fe(e, t) {
1417
1444
  const n = new RegExp(`\\${T}(\\??[\\w-_]+)\\${J}`, "g");
1418
- return Array.from(t.matchAll(n)).reduce((o, [a, s]) => {
1419
- const u = At(a);
1420
- if (!u)
1445
+ return Array.from(e.matchAll(n)).reduce((o, [a, s]) => {
1446
+ const i = Ae(a);
1447
+ if (!i)
1421
1448
  return o;
1422
- const c = Ln(e, u);
1423
- return et([u], o), o[s] = c, o;
1449
+ const c = Un(t, i);
1450
+ return te([i], o), o[s] = c, o;
1424
1451
  }, {});
1425
1452
  }
1426
- function Ct(t, e) {
1453
+ function $e(e, t) {
1427
1454
  return {
1428
- value: t,
1429
- params: It(t, e),
1430
- toString: () => t
1455
+ value: e,
1456
+ params: Fe(e, t)
1431
1457
  };
1432
1458
  }
1433
- function xr(t, e) {
1434
- return lt(e) ? t.map((n) => {
1435
- const r = `${e}${n.path.value}`;
1459
+ function Lr(e, t) {
1460
+ return le(t) ? e.map((n) => {
1461
+ const r = `${t}${n.path.value}`;
1436
1462
  return {
1437
1463
  ...n,
1438
- path: Ct(r, n.path.params)
1464
+ path: $e(r, n.path.params)
1439
1465
  };
1440
- }) : t;
1466
+ }) : e;
1441
1467
  }
1442
- class kr extends Error {
1468
+ class Br extends Error {
1443
1469
  /**
1444
1470
  * Constructs a new DuplicateNamesError instance with a message indicating the problematic name.
1445
1471
  * @param name - The name of the name that was duplicated.
1446
1472
  */
1447
- constructor(e) {
1448
- super(`Invalid Name "${e}": Router does not support multiple routes with the same name. All name names must be unique.`);
1449
- }
1450
- }
1451
- function Br(t) {
1452
- const e = t.map(({ name: n }) => n);
1453
- for (const n of e)
1454
- if (me(e, n) > 1)
1455
- throw new kr(n);
1456
- }
1457
- function Kr(t, e) {
1458
- const n = hn(t) ? t.flat() : t, r = xr(n, e == null ? void 0 : e.base);
1459
- Br(r);
1460
- const o = Vr(), a = lr(r), s = Dn({
1461
- mode: e == null ? void 0 : e.historyMode,
1462
- listener: ({ location: R }) => {
1463
- const L = G(R);
1464
- A(L, { state: R.state });
1473
+ constructor(t) {
1474
+ super(`Invalid Name "${t}": Router does not support multiple routes with the same name. All name names must be unique.`);
1475
+ }
1476
+ }
1477
+ function Ur(e) {
1478
+ const t = e.map(({ name: n }) => n);
1479
+ for (const n of t)
1480
+ if (gt(t, n) > 1)
1481
+ throw new Br(n);
1482
+ }
1483
+ function Yr(e, t) {
1484
+ const n = pn(e) ? e.flat() : e, r = Lr(n, t == null ? void 0 : t.base);
1485
+ Ur(r);
1486
+ const o = qr(), a = dr(r), s = Tn({
1487
+ mode: t == null ? void 0 : t.historyMode,
1488
+ listener: ({ location: w }) => {
1489
+ const U = G(w);
1490
+ R(U, { state: w.state });
1465
1491
  }
1466
- }), { runBeforeRouteHooks: u, runAfterRouteHooks: c } = Jn(), {
1492
+ }), { runBeforeRouteHooks: i, runAfterRouteHooks: c } = Gn(), {
1467
1493
  hooks: f,
1468
- onBeforeRouteEnter: i,
1494
+ onBeforeRouteEnter: u,
1469
1495
  onAfterRouteUpdate: h,
1470
- onBeforeRouteLeave: y,
1496
+ onBeforeRouteLeave: P,
1471
1497
  onAfterRouteEnter: p,
1472
- onBeforeRouteUpdate: S,
1473
- onAfterRouteLeave: E
1474
- } = Gn();
1475
- async function A(R, L = {}) {
1476
- if (s.stopListening(), $(R)) {
1477
- s.update(R, L);
1498
+ onBeforeRouteUpdate: A,
1499
+ onAfterRouteLeave: v
1500
+ } = zn();
1501
+ async function R(w, U = {}) {
1502
+ if (s.stopListening(), H(w)) {
1503
+ s.update(w, U);
1478
1504
  return;
1479
1505
  }
1480
- const O = Nt(r, R, L.state) ?? m("NotFound"), _ = { ...d }, K = await u({ to: O, from: _, hooks: f });
1506
+ const q = Ue(r, w, U.state) ?? g("NotFound"), O = { ...m }, K = await i({ to: q, from: O, hooks: f });
1481
1507
  switch (K.status) {
1482
1508
  case "ABORT":
1483
1509
  return;
1484
1510
  case "PUSH":
1485
- s.update(R, L), await k(...K.to);
1511
+ s.update(w, U), await x(...K.to);
1486
1512
  return;
1487
1513
  case "REJECT":
1488
- s.update(R, L), b(K.type);
1514
+ s.update(w, U), b(K.type);
1489
1515
  break;
1490
1516
  case "SUCCESS":
1491
- s.update(R, L), b(null);
1517
+ s.update(w, U), b(null);
1492
1518
  break;
1493
1519
  default:
1494
1520
  throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(K)}`);
1495
1521
  }
1496
- o.setProps(O), P(O);
1497
- const I = await c({ to: O, from: _, hooks: f });
1522
+ o.setProps(q), S(q);
1523
+ const I = await c({ to: q, from: O, hooks: f });
1498
1524
  switch (I.status) {
1499
1525
  case "PUSH":
1500
- await k(...I.to);
1526
+ await x(...I.to);
1501
1527
  break;
1502
1528
  case "REJECT":
1503
1529
  b(I.type);
@@ -1505,109 +1531,107 @@ function Kr(t, e) {
1505
1531
  case "SUCCESS":
1506
1532
  break;
1507
1533
  default:
1508
- const q = I;
1509
- throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(q)}`);
1534
+ const W = I;
1535
+ throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(W)}`);
1510
1536
  }
1511
1537
  s.startListening();
1512
1538
  }
1513
- const k = (R, L, O) => {
1514
- if (W(R)) {
1515
- const nt = { ...L }, Bt = a(R, nt);
1516
- return A(Bt, nt);
1539
+ const x = (w, U, q) => {
1540
+ if (_(w)) {
1541
+ const ne = { ...U }, Le = a(w, ne);
1542
+ return R(Le, ne);
1517
1543
  }
1518
- const _ = { ...O }, I = a(R, L ?? {}, _), q = zt(R), kt = ae((q == null ? void 0 : q.state) ?? {}, _.state);
1519
- return A(I, { ..._, state: kt });
1520
- }, j = (R, L, O) => {
1521
- if (W(R)) {
1522
- const nt = { ...L, replace: !0 }, Bt = a(R, nt);
1523
- return A(Bt, nt);
1544
+ const O = { ...q }, I = a(w, U ?? {}, O), W = Ye(w), ke = st((W == null ? void 0 : W.state) ?? {}, O.state);
1545
+ return R(I, { ...O, state: ke });
1546
+ }, B = (w, U, q) => {
1547
+ if (_(w)) {
1548
+ const ne = { ...U, replace: !0 }, Le = a(w, ne);
1549
+ return R(Le, ne);
1524
1550
  }
1525
- const _ = { ...O, replace: !0 }, I = a(R, L ?? {}, _), q = zt(R), kt = ae((q == null ? void 0 : q.state) ?? {}, _.state);
1526
- return A(I, { ..._, state: kt });
1527
- }, g = (R) => {
1528
- b(R);
1529
- }, v = (R, L = {}) => {
1530
- if (!W(R)) {
1531
- const O = a(R, L);
1532
- return Nt(r, O);
1551
+ const O = { ...q, replace: !0 }, I = a(w, U ?? {}, O), W = Ye(w), ke = st((W == null ? void 0 : W.state) ?? {}, O.state);
1552
+ return R(I, { ...O, state: ke });
1553
+ }, d = (w) => {
1554
+ b(w);
1555
+ }, y = (w, U = {}) => {
1556
+ if (!_(w)) {
1557
+ const q = a(w, U);
1558
+ return Ue(r, q);
1533
1559
  }
1534
- if (!$(R))
1535
- return Nt(r, R);
1536
- }, { setRejection: b, rejection: x, getRejectionRoute: m } = Yn(e ?? {}), l = m("NotFound"), { currentRoute: d, routerRoute: w, updateRoute: P } = _n(l, k);
1560
+ if (!H(w))
1561
+ return Ue(r, w);
1562
+ }, { setRejection: b, rejection: k, getRejectionRoute: g } = Zn(t ?? {}), l = g("NotFound"), { currentRoute: m, routerRoute: E, updateRoute: S } = _n(l, x);
1537
1563
  s.startListening();
1538
- const B = pr(e == null ? void 0 : e.initialUrl), N = s.location.state, { host: C } = D(B), $ = Wn(C);
1539
- let xt = !1;
1540
- async function Kt() {
1541
- xt || (await A(B, { replace: !0, state: N }), xt = !0);
1564
+ const L = gr(t == null ? void 0 : t.initialUrl), N = s.location.state, { host: $ } = D(L), H = Mn($);
1565
+ let xe = !1;
1566
+ async function ze() {
1567
+ xe || (await R(L, { replace: !0, state: N }), xe = !0);
1542
1568
  }
1543
- function zt(R) {
1544
- return r.find((L) => L.name === R);
1569
+ function Ye(w) {
1570
+ return r.find((U) => U.name === w);
1545
1571
  }
1546
- function ze(R) {
1547
- R.component("RouterView", Ir), R.component("RouterLink", Tr), R.provide(be, x), R.provide(Be, f), R.provide(Fe, o), R.provide(Ae, Yt), Kt();
1572
+ function Yt(w) {
1573
+ w.component("RouterView", Jr), w.component("RouterLink", Fr), w.provide(At, k), w.provide(Bt, f), w.provide(Jt, o), w.provide(xt, Xe), ze();
1548
1574
  }
1549
- const Yt = {
1550
- route: w,
1575
+ const Xe = {
1576
+ route: E,
1551
1577
  resolve: a,
1552
- push: k,
1553
- replace: j,
1554
- reject: g,
1555
- find: v,
1578
+ push: x,
1579
+ replace: B,
1580
+ reject: d,
1581
+ find: y,
1556
1582
  refresh: s.refresh,
1557
1583
  forward: s.forward,
1558
1584
  back: s.back,
1559
1585
  go: s.go,
1560
- install: ze,
1561
- isExternal: $,
1562
- onBeforeRouteEnter: i,
1586
+ install: Yt,
1587
+ isExternal: H,
1588
+ onBeforeRouteEnter: u,
1563
1589
  onAfterRouteUpdate: h,
1564
- onBeforeRouteLeave: y,
1590
+ onBeforeRouteLeave: P,
1565
1591
  onAfterRouteEnter: p,
1566
- onBeforeRouteUpdate: S,
1567
- onAfterRouteLeave: E,
1568
- prefetch: e == null ? void 0 : e.prefetch,
1569
- start: Kt
1592
+ onBeforeRouteUpdate: A,
1593
+ onAfterRouteLeave: v,
1594
+ prefetch: t == null ? void 0 : t.prefetch,
1595
+ start: ze
1570
1596
  };
1571
- return Yt;
1597
+ return Xe;
1572
1598
  }
1573
- function se(t, e) {
1599
+ function ct(e, t) {
1574
1600
  return {
1575
- value: t,
1576
- params: It(t, e),
1577
- toString: () => t
1601
+ value: e,
1602
+ params: Fe(e, t)
1578
1603
  };
1579
1604
  }
1580
- function qe(t, e) {
1605
+ function Dt(e, t) {
1581
1606
  return {
1582
- value: t,
1583
- params: It(t, e),
1584
- toString: () => t
1607
+ value: e,
1608
+ params: Fe(e, t)
1585
1609
  };
1586
1610
  }
1587
- function Lr(t) {
1588
- return ft(t) && typeof t.hash == "string";
1611
+ function Nr(e) {
1612
+ return fe(e) && typeof e.hash == "string";
1589
1613
  }
1590
- function Me(t) {
1591
- return t === void 0 ? mt() : Lr(t) ? t : mt(t);
1614
+ function Wt(e) {
1615
+ return e === void 0 ? me() : Nr(e) ? e : me(e);
1592
1616
  }
1593
- function Ft(t) {
1594
- return t === void 0 ? "" : t;
1617
+ function Je(e) {
1618
+ return e === void 0 ? "" : e;
1595
1619
  }
1596
- function Nr(t) {
1597
- return ft(t) && typeof t.value == "string";
1620
+ function Cr(e) {
1621
+ return fe(e) && typeof e.value == "string";
1598
1622
  }
1599
- function We(t) {
1600
- return t === void 0 ? Ct("", {}) : Nr(t) ? t : Ct(t, {});
1623
+ function Mt(e) {
1624
+ return e === void 0 ? $e("", {}) : Cr(e) ? e : $e(e, {});
1601
1625
  }
1602
- function Ur(t) {
1603
- return ft(t) && typeof t.value == "string";
1626
+ function Hr(e) {
1627
+ return fe(e) && typeof e.value == "string";
1604
1628
  }
1605
- function De(t) {
1606
- return t === void 0 ? se("", {}) : Ur(t) ? t : se(t, {});
1629
+ function Tt(e) {
1630
+ return e === void 0 ? ct("", {}) : Hr(e) ? e : ct(e, {});
1607
1631
  }
1608
- function tt(t) {
1609
- const e = Wt(), n = Ft(t.name), r = We(t.path), o = De(t.query), a = Me(t.hash), s = t.meta ?? {}, u = Sn(t) ? t.state : {}, c = dt({ id: e, meta: {}, state: {}, ...t }), f = {
1610
- id: e,
1632
+ function ee(e) {
1633
+ const t = Me(), n = Je(e.name), r = Mt(e.path), o = Tt(e.query), a = Wt(e.hash), s = e.meta ?? {}, i = bn(e) ? e.state : {}, c = de({ id: t, meta: {}, state: {}, ...e }), f = {
1634
+ id: t,
1611
1635
  matched: c,
1612
1636
  matches: [c],
1613
1637
  name: n,
@@ -1615,77 +1639,77 @@ function tt(t) {
1615
1639
  query: o,
1616
1640
  hash: a,
1617
1641
  meta: s,
1618
- state: u,
1642
+ state: i,
1619
1643
  depth: 1,
1620
- host: qe("", {}),
1621
- prefetch: t.prefetch
1622
- }, i = ge(t) ? Re(t.parent, f) : f;
1623
- return et(i.path.params, i.query.params), i;
1644
+ host: Dt("", {}),
1645
+ prefetch: e.prefetch
1646
+ }, u = Rt(e) ? yt(e.parent, f) : f;
1647
+ return te(u.path.params, u.query.params), u;
1624
1648
  }
1625
- const Et = { template: "<div>This is component</div>" }, Jt = tt({
1649
+ const Ee = { template: "<div>This is component</div>" }, Qe = ee({
1626
1650
  name: "parentA",
1627
1651
  path: "/parentA/[paramA]"
1628
- }), Te = tt({
1629
- parent: Jt,
1652
+ }), It = ee({
1653
+ parent: Qe,
1630
1654
  name: "parentA.childA",
1631
1655
  path: "/[?paramB]"
1632
- }), $r = tt({
1633
- parent: Jt,
1656
+ }), $r = ee({
1657
+ parent: Qe,
1634
1658
  name: "parentA.childB",
1635
1659
  path: "/[paramD]",
1636
- component: Et
1637
- }), Cr = tt({
1638
- parent: Te,
1660
+ component: Ee
1661
+ }), jr = ee({
1662
+ parent: It,
1639
1663
  name: "parentA.childA.grandChildA",
1640
1664
  path: "/[paramC]",
1641
- component: Et
1665
+ component: Ee
1642
1666
  });
1643
- tt({
1667
+ ee({
1644
1668
  name: "parentB",
1645
1669
  path: "/parentB",
1646
- component: Et
1647
- }), tt({
1670
+ component: Ee
1671
+ }), ee({
1648
1672
  name: "parentC",
1649
1673
  path: "/",
1650
- component: Et
1674
+ component: Ee
1651
1675
  });
1652
- const Hr = {
1676
+ const Vr = {
1653
1677
  components: !0,
1654
1678
  props: !1
1655
1679
  };
1656
- function Ie({ routerPrefetch: t, routePrefetch: e, linkPrefetch: n }, r) {
1657
- return Ut(n, r) ?? Ut(e, r) ?? Ut(t, r) ?? Hr[r];
1680
+ function Ft({ routerPrefetch: e, routePrefetch: t, linkPrefetch: n }, r) {
1681
+ return Ne(n, r) ?? Ne(t, r) ?? Ne(e, r) ?? Vr[r];
1658
1682
  }
1659
- function Ut(t, e) {
1660
- return ft(t) ? t[e] : t;
1683
+ function Ne(e, t) {
1684
+ return fe(e) ? e[t] : e;
1661
1685
  }
1662
- const Fe = Symbol();
1663
- function Vr() {
1664
- const t = Ht(/* @__PURE__ */ new Map()), e = (c, f) => c.matches.filter((i) => Ie({ ...f, routePrefetch: i.prefetch }, "props")).flatMap((i) => s(i)).reduce((i, { id: h, name: y, props: p }) => {
1665
- const S = a(h, y, c);
1666
- return i[S] = p == null ? void 0 : p(c.params), i;
1686
+ const Jt = Symbol();
1687
+ function qr() {
1688
+ const e = je(/* @__PURE__ */ new Map()), t = (c, f) => c.matches.filter((u) => Ft({ ...f, routePrefetch: u.prefetch }, "props")).flatMap((u) => s(u)).reduce((u, { id: h, name: P, props: p }) => {
1689
+ const A = a(h, P, c);
1690
+ return u[A] = p == null ? void 0 : p(c.params), u;
1667
1691
  }, {}), n = (c) => {
1668
- Object.entries(c).forEach(([f, i]) => {
1669
- t.set(f, i);
1692
+ Object.entries(c).forEach(([f, u]) => {
1693
+ e.set(f, u);
1670
1694
  });
1671
1695
  }, r = (c) => {
1672
- const i = c.matches.flatMap(s).reduce((h, { id: y, name: p, props: S }) => {
1673
- const E = a(y, p, c);
1674
- if (!S || t.has(E))
1696
+ const u = c.matches.flatMap(s).reduce((h, { id: P, name: p, props: A }) => {
1697
+ const v = a(P, p, c);
1698
+ if (!A || e.has(v))
1675
1699
  return h;
1676
- const A = S(c.params);
1677
- return t.set(E, A), h.push(E), h;
1700
+ const R = A(c.params);
1701
+ return e.set(v, R), h.push(v), h;
1678
1702
  }, []);
1679
- u(i);
1680
- }, o = (c, f, i) => {
1681
- const h = a(c, f, i);
1682
- return t.get(h);
1703
+ i(u);
1704
+ }, o = (c, f, u) => {
1705
+ const h = a(c, f, u);
1706
+ return e.get(h);
1683
1707
  };
1684
- function a(c, f, i) {
1685
- return [c, f, i.id, JSON.stringify(i.params)].join("-");
1708
+ function a(c, f, u) {
1709
+ return [c, f, u.id, JSON.stringify(u.params)].join("-");
1686
1710
  }
1687
1711
  function s(c) {
1688
- return jt(c) ? Object.entries(c.props ?? {}).map(([f, i]) => ({ id: c.id, name: f, props: i })) : Vt(c) ? [
1712
+ return qe(c) ? Object.entries(c.props ?? {}).map(([f, u]) => ({ id: c.id, name: f, props: u })) : Ve(c) ? [
1689
1713
  {
1690
1714
  id: c.id,
1691
1715
  name: "default",
@@ -1693,120 +1717,120 @@ function Vr() {
1693
1717
  }
1694
1718
  ] : [];
1695
1719
  }
1696
- function u(c) {
1697
- for (const f in t.keys())
1698
- c.includes(f) || t.delete(f);
1720
+ function i(c) {
1721
+ for (const f in e.keys())
1722
+ c.includes(f) || e.delete(f);
1699
1723
  }
1700
1724
  return {
1701
- getPrefetchProps: e,
1725
+ getPrefetchProps: t,
1702
1726
  setPrefetchProps: n,
1703
1727
  getProps: o,
1704
1728
  setProps: r
1705
1729
  };
1706
1730
  }
1707
- function Je() {
1708
- const t = it(Fe);
1709
- if (!t)
1710
- throw new St();
1711
- return t;
1731
+ function Qt() {
1732
+ const e = ie(Jt);
1733
+ if (!e)
1734
+ throw new Se();
1735
+ return e;
1712
1736
  }
1713
- const jr = tn(() => new Promise((t) => {
1714
- t({ default: { template: "foo" } });
1737
+ const Or = tn(() => new Promise((e) => {
1738
+ e({ default: { template: "foo" } });
1715
1739
  }));
1716
- function ce(t) {
1717
- return t.name === jr.name && "setup" in t;
1718
- }
1719
- function Or(t) {
1720
- let e = {};
1721
- const { getPrefetchProps: n, setPrefetchProps: r } = Je();
1722
- return fe(() => ht(t), ({ route: a, ...s }) => {
1723
- a && (_r(a, s), e = n(a, s));
1740
+ function ut(e) {
1741
+ return e.name === Or.name && "setup" in e;
1742
+ }
1743
+ function _r(e) {
1744
+ let t = {};
1745
+ const { getPrefetchProps: n, setPrefetchProps: r } = Qt();
1746
+ return lt(() => he(e), ({ route: a, ...s }) => {
1747
+ a && (Dr(a, s), t = n(a, s));
1724
1748
  }, { immediate: !0 }), {
1725
1749
  commit: () => {
1726
- r(e);
1750
+ r(t);
1727
1751
  }
1728
1752
  };
1729
1753
  }
1730
- function _r(t, { routerPrefetch: e, linkPrefetch: n }) {
1731
- t.matches.forEach((r) => {
1732
- Ie({
1754
+ function Dr(e, { routerPrefetch: t, linkPrefetch: n }) {
1755
+ e.matches.forEach((r) => {
1756
+ Ft({
1733
1757
  routePrefetch: r.prefetch,
1734
- routerPrefetch: e,
1758
+ routerPrefetch: t,
1735
1759
  linkPrefetch: n
1736
- }, "components") && (Vt(r) && ce(r.component) && r.component.setup(), jt(r) && Object.values(r.components).forEach((a) => {
1737
- ce(a) && a.setup();
1760
+ }, "components") && (Ve(r) && ut(r.component) && r.component.setup(), qe(r) && Object.values(r.components).forEach((a) => {
1761
+ ut(a) && a.setup();
1738
1762
  }));
1739
1763
  });
1740
1764
  }
1741
- function qr(t, e = {}, n = {}) {
1742
- const r = Ot(), o = en(t), a = V(() => W(o.value) ? {} : ht(e)), s = V(() => W(o.value) ? ht(e) : ht(n)), u = V(() => {
1743
- if (W(o.value))
1765
+ function Wr(e, t = {}, n = {}) {
1766
+ const r = Oe(), o = nn(e), a = V(() => _(o.value) ? {} : he(t)), s = V(() => _(o.value) ? he(t) : he(n)), i = V(() => {
1767
+ if (_(o.value))
1744
1768
  return o.value;
1745
1769
  try {
1746
1770
  return r.resolve(o.value, a.value, s.value);
1747
- } catch (E) {
1748
- throw E instanceof Y && console.error(`Failed to resolve route "${o.value.toString()}" in RouterLink.`, E), E;
1771
+ } catch (v) {
1772
+ throw v instanceof Y && console.error(`Failed to resolve route "${o.value.toString()}" in RouterLink.`, v), v;
1749
1773
  }
1750
- }), c = V(() => r.find(u.value, s.value)), f = V(() => !!c.value && r.route.matches.includes(c.value.matched)), i = V(() => !!c.value && r.route.matched === c.value.matched), h = V(() => r.isExternal(u.value)), { commit: y } = Or(() => ({
1774
+ }), c = V(() => r.find(i.value, s.value)), f = V(() => !!c.value && r.route.matches.includes(c.value.matched)), u = V(() => !!c.value && r.route.matched === c.value.matched), h = V(() => r.isExternal(i.value)), { commit: P } = _r(() => ({
1751
1775
  route: c.value,
1752
1776
  routerPrefetch: r.prefetch,
1753
1777
  linkPrefetch: s.value.prefetch
1754
- })), p = (E) => (y(), r.push(u.value, { ...s.value, ...E }));
1778
+ })), p = (v) => (P(), r.push(i.value, { ...s.value, ...v }));
1755
1779
  return {
1756
1780
  route: c,
1757
- href: u,
1781
+ href: i,
1758
1782
  isMatch: f,
1759
- isExactMatch: i,
1783
+ isExactMatch: u,
1760
1784
  isExternal: h,
1761
1785
  push: p,
1762
- replace: (E) => p(E)
1786
+ replace: (v) => p(v)
1763
1787
  };
1764
1788
  }
1765
- function Mr(t, e, { exact: n } = {}) {
1766
- if (!jn(t))
1789
+ function Mr(e, t, { exact: n } = {}) {
1790
+ if (!qn(e))
1767
1791
  return !1;
1768
- if (e === void 0)
1792
+ if (t === void 0)
1769
1793
  return !0;
1770
- const r = t.matches.map((o) => Ft(o.name));
1794
+ const r = e.matches.map((o) => Je(o.name));
1771
1795
  if (n) {
1772
1796
  const o = r.at(-1);
1773
- return e === o;
1797
+ return t === o;
1774
1798
  }
1775
- return r.includes(e);
1799
+ return r.includes(t);
1776
1800
  }
1777
- function Wr(t, e) {
1778
- const n = Ot();
1801
+ function Tr(e, t) {
1802
+ const n = Oe();
1779
1803
  function r() {
1780
- if (!t)
1804
+ if (!e)
1781
1805
  return;
1782
- if (!Mr(n.route, t, e))
1783
- throw new Hn(t, n.route.name);
1806
+ if (!Mr(n.route, e, t))
1807
+ throw new jn(e, n.route.name);
1784
1808
  }
1785
- return fe(n.route, r, { immediate: !0, deep: !0 }), n.route;
1786
- }
1787
- const Qe = Symbol();
1788
- function Qt() {
1789
- return it(Qe, 0);
1809
+ return lt(n.route, r, { immediate: !0, deep: !0 }), n.route;
1790
1810
  }
1811
+ const Gt = Symbol();
1791
1812
  function Ge() {
1792
- const t = it(Be);
1793
- if (!t)
1794
- throw new St();
1795
- return t;
1813
+ return ie(Gt, 0);
1814
+ }
1815
+ function Kt() {
1816
+ const e = ie(Bt);
1817
+ if (!e)
1818
+ throw new Se();
1819
+ return e;
1796
1820
  }
1797
- function Ke(t) {
1798
- return (e) => {
1799
- const n = Qt(), o = Ge().addBeforeRouteHook({ lifecycle: t, hook: e, depth: n, timing: "component" });
1800
- return le(o), o;
1821
+ function zt(e) {
1822
+ return (t) => {
1823
+ const n = Ge(), o = Kt().addBeforeRouteHook({ lifecycle: e, hook: t, depth: n, timing: "component" });
1824
+ return ht(o), o;
1801
1825
  };
1802
1826
  }
1803
- function Gt(t) {
1804
- return (e) => {
1805
- const n = Qt(), o = Ge().addAfterRouteHook({ lifecycle: t, hook: e, depth: n, timing: "component" });
1806
- return le(o), o;
1827
+ function Ke(e) {
1828
+ return (t) => {
1829
+ const n = Ge(), o = Kt().addAfterRouteHook({ lifecycle: e, hook: t, depth: n, timing: "component" });
1830
+ return ht(o), o;
1807
1831
  };
1808
1832
  }
1809
- const zr = Ke("onBeforeRouteUpdate"), Yr = Ke("onBeforeRouteLeave"), Xr = Gt("onAfterRouteEnter"), Zr = Gt("onAfterRouteUpdate"), to = Gt("onAfterRouteLeave"), Dr = ["href"], Tr = /* @__PURE__ */ ut({
1833
+ const Xr = zt("onBeforeRouteUpdate"), Zr = zt("onBeforeRouteLeave"), eo = Ke("onAfterRouteEnter"), to = Ke("onAfterRouteUpdate"), no = Ke("onAfterRouteLeave"), Ir = ["href"], Fr = /* @__PURE__ */ ue({
1810
1834
  __name: "routerLink",
1811
1835
  props: {
1812
1836
  to: {},
@@ -1816,101 +1840,102 @@ const zr = Ke("onBeforeRouteUpdate"), Yr = Ke("onBeforeRouteLeave"), Xr = Gt("on
1816
1840
  replace: { type: Boolean },
1817
1841
  state: {}
1818
1842
  },
1819
- setup(t) {
1820
- const e = t, n = Ot(), r = V(() => W(e.to) ? e.to : e.to(n.resolve)), o = V(() => {
1821
- const { to: h, ...y } = e;
1822
- return y;
1823
- }), { isMatch: a, isExactMatch: s, isExternal: u, push: c } = qr(r, o), f = V(() => ({
1843
+ setup(e) {
1844
+ const t = e, n = Oe(), r = V(() => _(t.to) ? t.to : t.to(n.resolve)), o = V(() => {
1845
+ const { to: h, ...P } = t;
1846
+ return P;
1847
+ }), { isMatch: a, isExactMatch: s, isExternal: i, push: c } = Wr(r, o), f = V(() => ({
1824
1848
  "router-link--match": a.value,
1825
1849
  "router-link--exact-match": s.value
1826
1850
  }));
1827
- function i(h) {
1851
+ function u(h) {
1828
1852
  h.preventDefault(), c();
1829
1853
  }
1830
- return (h, y) => (he(), nn("a", {
1854
+ return (h, P) => (pt(), rn("a", {
1831
1855
  href: r.value,
1832
- class: rn(["router-link", f.value]),
1833
- onClick: i
1856
+ class: on(["router-link", f.value]),
1857
+ onClick: u
1834
1858
  }, [
1835
- pe(h.$slots, "default", de(on({ resolved: r.value, isMatch: ot(a), isExactMatch: ot(s), isExternal: ot(u) })))
1836
- ], 10, Dr));
1859
+ dt(h.$slots, "default", mt(an({ resolved: r.value, isMatch: oe(a), isExactMatch: oe(s), isExternal: oe(i) })))
1860
+ ], 10, Ir));
1837
1861
  }
1838
- }), Ir = /* @__PURE__ */ ut({
1862
+ }), Jr = /* @__PURE__ */ ue({
1839
1863
  __name: "routerView",
1840
1864
  props: {
1841
1865
  name: {}
1842
1866
  },
1843
- setup(t) {
1844
- const { name: e = "default" } = t, n = Wr(), r = Vn(), o = Qt(), { getProps: a } = Je(), s = an("RouterView", !0);
1845
- sn(Qe, o + 1);
1846
- const u = V(() => {
1867
+ setup(e) {
1868
+ const { name: t = "default" } = e, n = Tr(), r = Vn(), o = Ge(), { getProps: a } = Qt(), s = sn("RouterView", !0);
1869
+ cn(Gt, o + 1);
1870
+ const i = V(() => {
1847
1871
  if (r.value)
1848
1872
  return r.value.component;
1849
- const i = n.matches.at(o);
1850
- if (!i)
1873
+ const u = n.matches.at(o);
1874
+ if (!u)
1851
1875
  return null;
1852
- const h = c(i), y = a(i.id, e, n);
1853
- return h ? y ? bn(h, () => y) : h : null;
1876
+ const h = c(u), P = a(u.id, t, n);
1877
+ return h ? P ? An(h, () => P) : h : null;
1854
1878
  });
1855
- function c(i) {
1856
- return f(i)[e];
1879
+ function c(u) {
1880
+ return f(u)[t];
1857
1881
  }
1858
- function f(i) {
1859
- return jt(i) ? i.components : Vt(i) ? { default: i.component } : typeof s == "string" ? {} : { default: s };
1882
+ function f(u) {
1883
+ return qe(u) ? u.components : Ve(u) ? { default: u.component } : typeof s == "string" ? {} : { default: s };
1860
1884
  }
1861
- return (i, h) => u.value ? pe(i.$slots, "default", de(cn({ key: 0 }, { route: ot(n), component: u.value, rejection: ot(r) })), () => [
1862
- (he(), un(fn(u.value)))
1863
- ]) : ln("", !0);
1885
+ return (u, h) => i.value ? dt(u.$slots, "default", mt(un({ key: 0 }, { route: oe(n), component: i.value, rejection: oe(r) })), () => [
1886
+ (pt(), fn(ln(i.value)))
1887
+ ]) : hn("", !0);
1864
1888
  }
1865
1889
  });
1866
- function Fr(t) {
1867
- return ft(t) && typeof t.value == "string";
1890
+ function Qr(e) {
1891
+ return fe(e) && typeof e.value == "string";
1868
1892
  }
1869
- function ue(t) {
1870
- return Fr(t) ? t : qe(t, {});
1893
+ function it(e) {
1894
+ return Qr(e) ? e : Dt(e, {});
1871
1895
  }
1872
- function eo(t) {
1873
- const e = Wt(), n = Ft(t.name), r = We(t.path), o = De(t.query), a = Me(t.hash), s = t.meta ?? {}, u = En(t) ? ue(t.host) : ue(""), c = dt({ id: e, meta: {}, state: {}, ...t }), f = {
1874
- id: e,
1896
+ function ro(e) {
1897
+ const t = Me(), n = Je(e.name), r = Mt(e.path), o = Tt(e.query), a = Wt(e.hash), s = e.meta ?? {}, i = Sn(e) ? it(e.host) : it(""), c = de({ id: t, meta: {}, state: {}, ...e }), f = {
1898
+ id: t,
1875
1899
  matched: c,
1876
1900
  matches: [c],
1877
1901
  name: n,
1878
- host: u,
1902
+ host: i,
1879
1903
  path: r,
1880
1904
  query: o,
1881
1905
  hash: a,
1882
1906
  meta: s,
1883
1907
  depth: 1,
1884
1908
  state: {}
1885
- }, i = ge(t) ? Re(t.parent, f) : f;
1886
- return et(i.path.params, i.query.params, i.host.params), i;
1909
+ }, u = Rt(e) ? yt(e.parent, f) : f;
1910
+ return te(u.path.params, u.query.params, u.host.params), u;
1887
1911
  }
1888
1912
  export {
1889
- Rn as DuplicateParamsError,
1890
- Tr as RouterLink,
1891
- St as RouterNotInstalledError,
1892
- Ir as RouterView,
1893
- Hn as UseRouteInvalidError,
1894
- bn as component,
1895
- eo as createExternalRoute,
1896
- Un as createParam,
1897
- tt as createRoute,
1898
- Kr as createRouter,
1913
+ yn as DuplicateParamsError,
1914
+ Fr as RouterLink,
1915
+ Se as RouterNotInstalledError,
1916
+ Jr as RouterView,
1917
+ jn as UseRouteInvalidError,
1918
+ Qn as asUrl,
1919
+ An as component,
1920
+ ro as createExternalRoute,
1921
+ Cn as createParam,
1922
+ ee as createRoute,
1923
+ Yr as createRouter,
1899
1924
  Bn as isParamWithDefault,
1900
1925
  Mr as isRoute,
1901
- W as isUrl,
1902
- Xr as onAfterRouteEnter,
1903
- Zr as onAfterRouteLeave,
1904
- to as onAfterRouteUpdate,
1905
- zr as onBeforeRouteLeave,
1906
- Yr as onBeforeRouteUpdate,
1907
- Ct as path,
1908
- se as query,
1909
- Ae as routerInjectionKey,
1910
- be as routerRejectionKey,
1911
- qr as useLink,
1926
+ _ as isUrl,
1927
+ eo as onAfterRouteEnter,
1928
+ to as onAfterRouteLeave,
1929
+ no as onAfterRouteUpdate,
1930
+ Xr as onBeforeRouteLeave,
1931
+ Zr as onBeforeRouteUpdate,
1932
+ $e as path,
1933
+ ct as query,
1934
+ xt as routerInjectionKey,
1935
+ At as routerRejectionKey,
1936
+ Wr as useLink,
1912
1937
  Vn as useRejection,
1913
- Wr as useRoute,
1914
- Ot as useRouter,
1915
- Gr as withDefault
1938
+ Tr as useRoute,
1939
+ Oe as useRouter,
1940
+ zr as withDefault
1916
1941
  };