@kitbag/router 0.19.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,779 +1,919 @@
1
- var Sr = Object.defineProperty;
2
- var Ar = (e, t, r) => t in e ? Sr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var T = (e, t, r) => Ar(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { inject as ae, markRaw as Ae, reactive as Ve, defineAsyncComponent as kr, watch as te, onUnmounted as Ze, computed as Z, ref as je, toValue as $, toRefs as xr, defineComponent as me, createElementBlock as Ur, openBlock as kt, normalizeClass as Lr, renderSlot as xt, normalizeProps as Ut, guardReactiveProps as Br, unref as Re, h as ue, getCurrentInstance as Cr, provide as Nr, createCommentVNode as Vr, mergeProps as Zr, createBlock as jr, resolveDynamicComponent as Or } from "vue";
5
- function M(e) {
6
- return typeof e != "string" ? !1 : /^(https?:\/\/|\/).*/g.test(e);
1
+ var Cr = Object.defineProperty;
2
+ var Vr = (t, e, r) => e in t ? Cr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var T = (t, e, r) => Vr(t, typeof e != "symbol" ? e + "" : e, r);
4
+ import { inject as st, markRaw as Nt, reactive as Ht, defineAsyncComponent as Zr, watch as rt, onUnmounted as _t, computed as O, ref as qt, toValue as H, toRefs as Or, defineComponent as Rt, createElementBlock as jr, openBlock as Ze, normalizeClass as $r, renderSlot as Oe, normalizeProps as je, guardReactiveProps as Hr, unref as vt, h as pt, getCurrentInstance as _r, provide as qr, createCommentVNode as Ir, mergeProps as Jr, createBlock as Dr, resolveDynamicComponent as Fr } from "vue";
5
+ function M(t) {
6
+ return typeof t != "string" ? !1 : /^(https?:\/\/|\/).*/g.test(t);
7
7
  }
8
- function Lt(e) {
9
- return M(e) ? e : `/${e}`;
8
+ function $e(t) {
9
+ return M(t) ? t : `/${t}`;
10
10
  }
11
- class $r extends Error {
11
+ class Tr extends Error {
12
12
  /**
13
13
  * Constructs a new DuplicateParamsError instance with a message indicating the problematic parameter.
14
14
  * @param paramName - The name of the parameter that was duplicated.
15
15
  */
16
- constructor(t) {
17
- super(`Invalid Param "${t}": Router does not support multiple params by the same name. All param names must be unique.`);
16
+ constructor(e) {
17
+ super(`Invalid Param "${e}": Router does not support multiple params by the same name. All param names must be unique.`);
18
18
  }
19
19
  }
20
- class Hr extends Error {
21
- constructor(t) {
22
- super(`Child property on meta for ${t} conflicts with the parent meta.`);
20
+ class Mr extends Error {
21
+ constructor(e) {
22
+ super(`Child property on meta for ${e} conflicts with the parent meta.`);
23
23
  }
24
24
  }
25
- class ye extends Error {
25
+ class wt extends Error {
26
26
  constructor() {
27
27
  super("Router not installed");
28
28
  }
29
29
  }
30
- class _r extends Error {
30
+ class Wr extends Error {
31
31
  /**
32
32
  * Constructs a new UseRouteInvalidError instance with a message that specifies both the given and expected route names.
33
33
  * This detailed error message aids in quickly identifying and resolving mismatches in route usage.
34
34
  * @param routeName - The route name that was incorrectly used.
35
35
  * @param actualRouteName - The expected route name that should have been used.
36
36
  */
37
- constructor(t, r) {
38
- super(`useRoute called with incorrect route. Given ${t}, expected ${r}`);
37
+ constructor(e, r) {
38
+ super(`useRoute called with incorrect route. Given ${e}, expected ${r}`);
39
39
  }
40
40
  }
41
- const Bt = Symbol();
42
- function Ge() {
43
- const e = ae(Bt);
44
- if (!e)
45
- throw new ye();
46
- return e;
41
+ const He = Symbol();
42
+ function ee() {
43
+ const t = st(He);
44
+ if (!t)
45
+ throw new wt();
46
+ return t;
47
47
  }
48
- function fe(e) {
49
- return Array.isArray(e) ? e : [e];
48
+ function dt(t) {
49
+ return Array.isArray(t) ? t : [t];
50
50
  }
51
- function Ct(e, t) {
52
- return e.filter((r) => t === r).length;
51
+ function _e(t, e) {
52
+ return t.filter((r) => e === r).length;
53
53
  }
54
- function ge(...e) {
55
- const t = e.flatMap((r) => Array.isArray(r) ? r : Object.keys(r));
56
- for (const r of t)
57
- if (Ct(t, r) > 1)
58
- throw new $r(r);
54
+ function Et(...t) {
55
+ const e = t.flatMap((r) => Array.isArray(r) ? r : Object.keys(r));
56
+ for (const r of e)
57
+ if (_e(e, r) > 1)
58
+ throw new Tr(r);
59
59
  }
60
- class G extends Error {
60
+ class z extends Error {
61
61
  }
62
- const ve = "[", Oe = "]";
63
- function qr(e) {
64
- return e !== String && e !== Boolean && e !== Number && e !== Date;
62
+ const St = "[", It = "]";
63
+ function Gr(t) {
64
+ return t !== String && t !== Boolean && t !== Number && t !== Date;
65
65
  }
66
- function Ir(e) {
67
- return typeof e == "function" && qr(e);
66
+ function zr(t) {
67
+ return typeof t == "function" && Gr(t);
68
68
  }
69
- function $e(e) {
70
- return typeof e == "object" && "get" in e && typeof e.get == "function" && "set" in e && typeof e.set == "function";
69
+ function Jt(t) {
70
+ return typeof t == "object" && "get" in t && typeof t.get == "function" && "set" in t && typeof t.set == "function";
71
71
  }
72
- function Nt(e) {
73
- return typeof e == "string" || typeof e == "number" || typeof e == "boolean";
72
+ function qe(t) {
73
+ return typeof t == "string" || typeof t == "number" || typeof t == "boolean";
74
74
  }
75
- function Dr(e, t) {
76
- return $e(e) ? { ...e, defaultValue: t ?? e.defaultValue } : {
77
- get: (r) => re(r, e),
78
- set: (r) => ne(r, e),
79
- defaultValue: t
75
+ function Qr(t, e) {
76
+ return Jt(t) ? { ...t, defaultValue: e ?? t.defaultValue } : {
77
+ get: (r) => nt(r, t),
78
+ set: (r) => ot(r, t),
79
+ defaultValue: e
80
80
  };
81
81
  }
82
- function Fr(e) {
83
- return $e(e) && e.defaultValue !== void 0;
82
+ function Kr(t) {
83
+ return Jt(t) && t.defaultValue !== void 0;
84
84
  }
85
- function ko(e, t) {
86
- return Dr(e, t);
85
+ function jo(t, e) {
86
+ return Qr(t, e);
87
87
  }
88
- function Vt(e) {
89
- return typeof e == "object" && e !== null && !Array.isArray(e);
88
+ function Lt(t) {
89
+ return typeof t == "object" && t !== null && !Array.isArray(t);
90
90
  }
91
- function J(e) {
92
- return typeof e == "string" && e.length > 0;
91
+ function W(t) {
92
+ return typeof t == "string" && t.length > 0;
93
93
  }
94
- let v = null;
95
- async function Tr() {
94
+ let E = null;
95
+ async function Yr() {
96
96
  const {
97
- ZodSchema: e,
98
- ZodString: t,
97
+ ZodSchema: t,
98
+ ZodString: e,
99
99
  ZodBoolean: r,
100
100
  ZodDate: n,
101
101
  ZodNumber: o,
102
102
  ZodLiteral: a,
103
103
  ZodObject: s,
104
104
  ZodEnum: l,
105
- ZodNativeEnum: p,
106
- ZodArray: c,
107
- ZodTuple: y,
105
+ ZodNativeEnum: d,
106
+ ZodArray: i,
107
+ ZodTuple: m,
108
108
  ZodUnion: b,
109
- ZodDiscriminatedUnion: L,
110
- ZodRecord: S,
109
+ ZodDiscriminatedUnion: U,
110
+ ZodRecord: P,
111
111
  ZodMap: w,
112
- ZodSet: m,
113
- ZodIntersection: h,
112
+ ZodSet: y,
113
+ ZodIntersection: p,
114
114
  ZodPromise: R,
115
115
  ZodFunction: f
116
116
  } = await import("zod");
117
117
  return {
118
- ZodSchema: e,
119
- ZodString: t,
118
+ ZodSchema: t,
119
+ ZodString: e,
120
120
  ZodBoolean: r,
121
121
  ZodDate: n,
122
122
  ZodNumber: o,
123
123
  ZodLiteral: a,
124
124
  ZodObject: s,
125
125
  ZodEnum: l,
126
- ZodNativeEnum: p,
127
- ZodArray: c,
128
- ZodTuple: y,
126
+ ZodNativeEnum: d,
127
+ ZodArray: i,
128
+ ZodTuple: m,
129
129
  ZodUnion: b,
130
- ZodDiscriminatedUnion: L,
131
- ZodRecord: S,
130
+ ZodDiscriminatedUnion: U,
131
+ ZodRecord: P,
132
132
  ZodMap: w,
133
- ZodSet: m,
134
- ZodIntersection: h,
133
+ ZodSet: y,
134
+ ZodIntersection: p,
135
135
  ZodPromise: R,
136
136
  ZodFunction: f
137
137
  };
138
138
  }
139
- function Mr(e) {
140
- return Object.values(e).some((t) => Object.values(t.host.params).some((r) => De(r)) || Object.values(t.path.params).some((r) => De(r)) || Object.values(t.query.params).some((r) => De(r)));
139
+ function Xr(t) {
140
+ return Object.values(t).some((e) => Object.values(e.host.params).some((r) => Wt(r)) || Object.values(e.path.params).some((r) => Wt(r)) || Object.values(e.query.params).some((r) => Wt(r)));
141
141
  }
142
- function De(e) {
143
- return typeof e == "object" && "parse" in e && typeof e.parse == "function";
142
+ function Wt(t) {
143
+ return typeof t == "object" && "parse" in t && typeof t.parse == "function";
144
144
  }
145
- async function Jr() {
145
+ async function tn() {
146
146
  try {
147
- v = await Tr();
147
+ E = await Yr();
148
148
  } catch {
149
149
  throw new Error("Failed to initialize Zod");
150
150
  }
151
151
  }
152
- function Zt(e) {
153
- return v ? e instanceof v.ZodSchema : !1;
152
+ function Ie(t) {
153
+ return E ? t instanceof E.ZodSchema : !1;
154
154
  }
155
- function jt(e) {
155
+ function Je(t) {
156
156
  return {
157
- get: (t, { invalid: r }) => {
157
+ get: (e, { invalid: r }) => {
158
158
  try {
159
- return Me(t, e);
159
+ return Qt(e, t);
160
160
  } catch {
161
161
  throw r();
162
162
  }
163
163
  },
164
- set: (t, { invalid: r }) => {
164
+ set: (e, { invalid: r }) => {
165
165
  try {
166
- return Je(t, e);
166
+ return Kt(e, t);
167
167
  } catch {
168
168
  throw r();
169
169
  }
170
170
  }
171
171
  };
172
172
  }
173
- const Wr = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
174
- function se(e, t) {
175
- if (typeof t == "string" && Wr.test(t)) {
176
- const r = new Date(t);
177
- return isNaN(r.getTime()) ? t : r;
173
+ const en = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
174
+ function it(t, e) {
175
+ if (typeof e == "string" && en.test(e)) {
176
+ const r = new Date(e);
177
+ return isNaN(r.getTime()) ? e : r;
178
178
  }
179
- return t;
179
+ return e;
180
180
  }
181
- function ie(e) {
182
- for (const t of e)
181
+ function ft(t) {
182
+ for (const e of t)
183
183
  try {
184
- return t();
184
+ return e();
185
185
  } catch {
186
186
  continue;
187
187
  }
188
188
  throw new Error("All functions failed");
189
189
  }
190
- function ke(e, t) {
191
- return v != null && v.ZodString && e instanceof v.ZodString ? 1 : v != null && v.ZodString && t instanceof v.ZodString ? -1 : 0;
190
+ function Ut(t, e) {
191
+ return E != null && E.ZodString && t instanceof E.ZodString ? 1 : E != null && E.ZodString && e instanceof E.ZodString ? -1 : 0;
192
192
  }
193
- function Me(e, t) {
194
- if (!v)
193
+ function Qt(t, e) {
194
+ if (!E)
195
195
  throw new Error("Zod is not initialized");
196
- if (t instanceof v.ZodString)
197
- return t.parse(e);
198
- if (t instanceof v.ZodBoolean)
199
- return t.parse(!!e);
200
- if (t instanceof v.ZodDate)
201
- return t.parse(new Date(e));
202
- if (t instanceof v.ZodNumber)
203
- return t.parse(Number(e));
204
- if (t instanceof v.ZodLiteral)
205
- return ie([
206
- () => t.parse(Number(e)),
207
- () => t.parse(!!e),
208
- () => t.parse(e)
196
+ if (e instanceof E.ZodString)
197
+ return e.parse(t);
198
+ if (e instanceof E.ZodBoolean)
199
+ return e.parse(!!t);
200
+ if (e instanceof E.ZodDate)
201
+ return e.parse(new Date(t));
202
+ if (e instanceof E.ZodNumber)
203
+ return e.parse(Number(t));
204
+ if (e instanceof E.ZodLiteral)
205
+ return ft([
206
+ () => e.parse(Number(t)),
207
+ () => e.parse(!!t),
208
+ () => e.parse(t)
209
209
  ]);
210
- if (t instanceof v.ZodObject)
211
- return t.parse(JSON.parse(e, se));
212
- if (t instanceof v.ZodEnum)
213
- return t.parse(e);
214
- if (t instanceof v.ZodNativeEnum)
215
- return ie([
216
- () => t.parse(Number(e)),
217
- () => t.parse(e)
210
+ if (e instanceof E.ZodObject)
211
+ return e.parse(JSON.parse(t, it));
212
+ if (e instanceof E.ZodEnum)
213
+ return e.parse(t);
214
+ if (e instanceof E.ZodNativeEnum)
215
+ return ft([
216
+ () => e.parse(Number(t)),
217
+ () => e.parse(t)
218
218
  ]);
219
- if (t instanceof v.ZodArray || t instanceof v.ZodTuple)
220
- return t.parse(JSON.parse(e, se));
221
- if (t instanceof v.ZodUnion) {
222
- const r = Array.from(t._def.options).sort(ke).map((n) => () => Me(e, n));
223
- return ie(r);
224
- }
225
- if (t instanceof v.ZodDiscriminatedUnion) {
226
- const r = Array.from(t.options).sort(ke).map((n) => () => Me(e, n));
227
- return ie(r);
228
- }
229
- if (t instanceof v.ZodRecord)
230
- return t.parse(JSON.parse(e, se));
231
- if (t instanceof v.ZodMap)
232
- return t.parse(new Map(JSON.parse(e, se)));
233
- if (t instanceof v.ZodSet)
234
- return t.parse(new Set(JSON.parse(e, se)));
235
- if (t instanceof v.ZodIntersection)
219
+ if (e instanceof E.ZodArray || e instanceof E.ZodTuple)
220
+ return e.parse(JSON.parse(t, it));
221
+ if (e instanceof E.ZodUnion) {
222
+ const r = Array.from(e._def.options).sort(Ut).map((n) => () => Qt(t, n));
223
+ return ft(r);
224
+ }
225
+ if (e instanceof E.ZodDiscriminatedUnion) {
226
+ const r = Array.from(e.options).sort(Ut).map((n) => () => Qt(t, n));
227
+ return ft(r);
228
+ }
229
+ if (e instanceof E.ZodRecord)
230
+ return e.parse(JSON.parse(t, it));
231
+ if (e instanceof E.ZodMap)
232
+ return e.parse(new Map(JSON.parse(t, it)));
233
+ if (e instanceof E.ZodSet)
234
+ return e.parse(new Set(JSON.parse(t, it)));
235
+ if (e instanceof E.ZodIntersection)
236
236
  throw new Error("Intersection schemas are not supported");
237
- if (t instanceof v.ZodPromise)
237
+ if (e instanceof E.ZodPromise)
238
238
  throw new Error("Promise schemas are not supported");
239
- if (t instanceof v.ZodFunction)
239
+ if (e instanceof E.ZodFunction)
240
240
  throw new Error("Function schemas are not supported");
241
- return t.parse(e);
241
+ return e.parse(t);
242
242
  }
243
- function Je(e, t) {
244
- if (!v)
243
+ function Kt(t, e) {
244
+ if (!E)
245
245
  throw new Error("Zod is not initialized");
246
- if (t instanceof v.ZodString)
247
- return t.parse(e);
248
- if (t instanceof v.ZodBoolean)
249
- return t.parse(e).toString();
250
- if (t instanceof v.ZodDate)
251
- return t.parse(e).toISOString();
252
- if (t instanceof v.ZodNumber)
253
- return t.parse(Number(e)).toString();
254
- if (t instanceof v.ZodLiteral)
255
- return t.parse(e).toString();
256
- if (t instanceof v.ZodObject)
257
- return JSON.stringify(t.parse(e));
258
- if (t instanceof v.ZodEnum)
259
- return t.parse(e);
260
- if (t instanceof v.ZodNativeEnum)
261
- return t.parse(e).toString();
262
- if (t instanceof v.ZodArray || t instanceof v.ZodTuple)
263
- return JSON.stringify(t.parse(e));
264
- if (t instanceof v.ZodUnion) {
265
- const r = Array.from(t._def.options).sort(ke).map((n) => () => Je(e, n));
266
- return ie(r);
267
- }
268
- if (t instanceof v.ZodDiscriminatedUnion) {
269
- const r = Array.from(t.options).sort(ke).map((n) => () => Je(e, n));
270
- return ie(r);
271
- }
272
- if (t instanceof v.ZodRecord)
273
- return JSON.stringify(t.parse(e));
274
- if (t instanceof v.ZodMap) {
275
- const r = t.parse(e);
246
+ if (e instanceof E.ZodString)
247
+ return e.parse(t);
248
+ if (e instanceof E.ZodBoolean)
249
+ return e.parse(t).toString();
250
+ if (e instanceof E.ZodDate)
251
+ return e.parse(t).toISOString();
252
+ if (e instanceof E.ZodNumber)
253
+ return e.parse(Number(t)).toString();
254
+ if (e instanceof E.ZodLiteral)
255
+ return e.parse(t).toString();
256
+ if (e instanceof E.ZodObject)
257
+ return JSON.stringify(e.parse(t));
258
+ if (e instanceof E.ZodEnum)
259
+ return e.parse(t);
260
+ if (e instanceof E.ZodNativeEnum)
261
+ return e.parse(t).toString();
262
+ if (e instanceof E.ZodArray || e instanceof E.ZodTuple)
263
+ return JSON.stringify(e.parse(t));
264
+ if (e instanceof E.ZodUnion) {
265
+ const r = Array.from(e._def.options).sort(Ut).map((n) => () => Kt(t, n));
266
+ return ft(r);
267
+ }
268
+ if (e instanceof E.ZodDiscriminatedUnion) {
269
+ const r = Array.from(e.options).sort(Ut).map((n) => () => Kt(t, n));
270
+ return ft(r);
271
+ }
272
+ if (e instanceof E.ZodRecord)
273
+ return JSON.stringify(e.parse(t));
274
+ if (e instanceof E.ZodMap) {
275
+ const r = e.parse(t);
276
+ return JSON.stringify(Array.from(r.entries()));
277
+ }
278
+ if (e instanceof E.ZodSet) {
279
+ const r = e.parse(t);
280
+ return JSON.stringify(Array.from(r.values()));
281
+ }
282
+ if (e instanceof E.ZodIntersection)
283
+ throw new Error("Intersection schemas are not supported");
284
+ if (e instanceof E.ZodPromise)
285
+ throw new Error("Promise schemas are not supported");
286
+ if (e instanceof E.ZodFunction)
287
+ throw new Error("Function schemas are not supported");
288
+ return JSON.stringify(e.parse(t));
289
+ }
290
+ function re(t) {
291
+ return typeof t == "object" && t !== null && "then" in t;
292
+ }
293
+ function L(t, e) {
294
+ const r = t["~standard"].validate(e);
295
+ if (re(r))
296
+ throw new Error("Promise schemas are not supported");
297
+ if (r.issues)
298
+ throw new Error("Validation failed");
299
+ return r.value;
300
+ }
301
+ function rn(t) {
302
+ return Lt(t) && "type" in t && typeof t.type == "string" && "~standard" in t && Lt(t["~standard"]) && "vendor" in t["~standard"] && t["~standard"].vendor === "valibot";
303
+ }
304
+ function De(t) {
305
+ return rn(t);
306
+ }
307
+ function Fe(t) {
308
+ return {
309
+ get: (e, { invalid: r }) => {
310
+ try {
311
+ return Yt(e, t);
312
+ } catch {
313
+ throw r();
314
+ }
315
+ },
316
+ set: (e, { invalid: r }) => {
317
+ try {
318
+ return Xt(e, t);
319
+ } catch {
320
+ throw r();
321
+ }
322
+ }
323
+ };
324
+ }
325
+ const nn = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
326
+ function ct(t, e) {
327
+ if (typeof e == "string" && nn.test(e)) {
328
+ const r = new Date(e);
329
+ return isNaN(r.getTime()) ? e : r;
330
+ }
331
+ return e;
332
+ }
333
+ function lt(t) {
334
+ for (const e of t)
335
+ try {
336
+ return e();
337
+ } catch {
338
+ continue;
339
+ }
340
+ throw new Error("All functions failed");
341
+ }
342
+ function Bt(t, e) {
343
+ return t.type === "string" ? 1 : e.type === "string" ? -1 : 0;
344
+ }
345
+ function Yt(t, e) {
346
+ if (e.type === "boolean")
347
+ return L(e, !!t);
348
+ if (e.type === "date")
349
+ return L(e, new Date(t));
350
+ if (e.type === "number")
351
+ return L(e, Number(t));
352
+ if (e.type === "literal")
353
+ return lt([
354
+ () => L(e, Number(t)),
355
+ () => L(e, !!t),
356
+ () => L(e, t)
357
+ ]);
358
+ if (e.type === "object")
359
+ return L(e, JSON.parse(t, ct));
360
+ if (e.type === "enum")
361
+ return lt([
362
+ () => L(e, Number(t)),
363
+ () => L(e, !!t),
364
+ () => L(e, t)
365
+ ]);
366
+ if (e.type === "array" || e.type === "tuple")
367
+ return L(e, JSON.parse(t, ct));
368
+ if (e.type === "union" && "options" in e) {
369
+ const r = e.options.sort(Bt).map((n) => () => Yt(t, n));
370
+ return lt(r);
371
+ }
372
+ if (e.type === "variant" && "options" in e) {
373
+ const r = e.options.sort(Bt).map((n) => () => Yt(t, n));
374
+ return lt(r);
375
+ }
376
+ if (e.type === "record")
377
+ return L(e, JSON.parse(t, ct));
378
+ if (e.type === "map")
379
+ return L(e, new Map(JSON.parse(t, ct)));
380
+ if (e.type === "set")
381
+ return L(e, new Set(JSON.parse(t, ct)));
382
+ if (e.type === "intersection")
383
+ throw new Error("Intersection schemas are not supported");
384
+ if (e.type === "promise")
385
+ throw new Error("Promise schemas are not supported");
386
+ if (e.type === "function")
387
+ throw new Error("Function schemas are not supported");
388
+ return L(e, t);
389
+ }
390
+ function Xt(t, e) {
391
+ if (e.type === "string" || e.type === "boolean")
392
+ return L(e, t).toString();
393
+ if (e.type === "date")
394
+ return L(e, t).toISOString();
395
+ if (e.type === "number")
396
+ return L(e, Number(t)).toString();
397
+ if (e.type === "literal")
398
+ return L(e, t).toString();
399
+ if (e.type === "object")
400
+ return JSON.stringify(L(e, t));
401
+ if (e.type === "enum" || e.type === "nativeEnum")
402
+ return L(e, t).toString();
403
+ if (e.type === "array" || e.type === "tuple")
404
+ return JSON.stringify(L(e, t));
405
+ if (e.type === "union" && "options" in e) {
406
+ const r = e.options.sort(Bt).map((n) => () => Xt(t, n));
407
+ return lt(r);
408
+ }
409
+ if (e.type === "variant" && "options" in e) {
410
+ const r = e.options.sort(Bt).map((n) => () => Xt(t, n));
411
+ return lt(r);
412
+ }
413
+ if (e.type === "record")
414
+ return JSON.stringify(L(e, t));
415
+ if (e.type === "map") {
416
+ const r = L(e, t);
276
417
  return JSON.stringify(Array.from(r.entries()));
277
418
  }
278
- if (t instanceof v.ZodSet) {
279
- const r = t.parse(e);
419
+ if (e.type === "set") {
420
+ const r = L(e, t);
280
421
  return JSON.stringify(Array.from(r.values()));
281
422
  }
282
- if (t instanceof v.ZodIntersection)
423
+ if (e.type === "intersection")
283
424
  throw new Error("Intersection schemas are not supported");
284
- if (t instanceof v.ZodPromise)
425
+ if (e.type === "promise")
285
426
  throw new Error("Promise schemas are not supported");
286
- if (t instanceof v.ZodFunction)
427
+ if (e.type === "function")
287
428
  throw new Error("Function schemas are not supported");
288
- return JSON.stringify(t.parse(e));
429
+ return JSON.stringify(L(e, t));
289
430
  }
290
- function Gr(e, t) {
291
- return e[t] ?? String;
431
+ function on(t, e) {
432
+ return t[e] ?? String;
292
433
  }
293
- const N = {
294
- invalid: (e) => {
295
- throw new G(e);
434
+ const C = {
435
+ invalid: (t) => {
436
+ throw new z(t);
296
437
  }
297
- }, Ot = {
298
- get: (e) => e,
299
- set: (e, { invalid: t }) => {
300
- if (typeof e != "string")
301
- throw t();
302
- return e;
438
+ }, Te = {
439
+ get: (t) => t,
440
+ set: (t, { invalid: e }) => {
441
+ if (typeof t != "string")
442
+ throw e();
443
+ return t;
303
444
  }
304
- }, ze = {
305
- get: (e, { invalid: t }) => {
306
- if (e === "true")
445
+ }, ne = {
446
+ get: (t, { invalid: e }) => {
447
+ if (t === "true")
307
448
  return !0;
308
- if (e === "false")
449
+ if (t === "false")
309
450
  return !1;
310
- throw t();
451
+ throw e();
311
452
  },
312
- set: (e, { invalid: t }) => {
313
- if (typeof e != "boolean")
314
- throw t();
315
- return e.toString();
316
- }
317
- }, Qe = {
318
- get: (e, { invalid: t }) => {
319
- const r = Number(e);
453
+ set: (t, { invalid: e }) => {
454
+ if (typeof t != "boolean")
455
+ throw e();
456
+ return t.toString();
457
+ }
458
+ }, oe = {
459
+ get: (t, { invalid: e }) => {
460
+ const r = Number(t);
320
461
  if (isNaN(r))
321
- throw t();
462
+ throw e();
322
463
  return r;
323
464
  },
324
- set: (e, { invalid: t }) => {
325
- if (typeof e != "number")
326
- throw t();
327
- return e.toString();
465
+ set: (t, { invalid: e }) => {
466
+ if (typeof t != "number")
467
+ throw e();
468
+ return t.toString();
328
469
  }
329
- }, $t = {
330
- get: (e, { invalid: t }) => {
331
- const r = new Date(e);
470
+ }, Me = {
471
+ get: (t, { invalid: e }) => {
472
+ const r = new Date(t);
332
473
  if (isNaN(r.getTime()))
333
- throw t();
474
+ throw e();
334
475
  return r;
335
476
  },
336
- set: (e, { invalid: t }) => {
337
- if (typeof e != "object" || !(e instanceof Date))
338
- throw t();
339
- return e.toISOString();
477
+ set: (t, { invalid: e }) => {
478
+ if (typeof t != "object" || !(t instanceof Date))
479
+ throw e();
480
+ return t.toISOString();
340
481
  }
341
- }, Ht = {
342
- get: (e, { invalid: t }) => {
482
+ }, We = {
483
+ get: (t, { invalid: e }) => {
343
484
  try {
344
- return JSON.parse(e);
485
+ return JSON.parse(t);
345
486
  } catch {
346
- throw t();
487
+ throw e();
347
488
  }
348
489
  },
349
- set: (e, { invalid: t }) => {
490
+ set: (t, { invalid: e }) => {
350
491
  try {
351
- return JSON.stringify(e);
492
+ return JSON.stringify(t);
352
493
  } catch {
353
- throw t();
494
+ throw e();
354
495
  }
355
496
  }
356
497
  };
357
- function zr(e, t) {
358
- switch (typeof t) {
498
+ function an(t, e) {
499
+ switch (typeof e) {
359
500
  case "string":
360
- return Ot.get(e, N) === t;
501
+ return Te.get(t, C) === e;
361
502
  case "number":
362
- return Qe.get(e, N) === t;
503
+ return oe.get(t, C) === e;
363
504
  case "boolean":
364
- return ze.get(e, N) === t;
505
+ return ne.get(t, C) === e;
365
506
  default:
366
507
  return !1;
367
508
  }
368
509
  }
369
- function re(e, t, r = !1) {
370
- if (e === void 0 || !J(e)) {
371
- if (Fr(t))
372
- return t.defaultValue;
510
+ function nt(t, e, r = !1) {
511
+ if (t === void 0 || !W(t)) {
512
+ if (Kr(e))
513
+ return e.defaultValue;
373
514
  if (r)
374
515
  return;
375
- throw new G();
376
- }
377
- if (t === String)
378
- return Ot.get(e, N);
379
- if (t === Boolean)
380
- return ze.get(e, N);
381
- if (t === Number)
382
- return Qe.get(e, N);
383
- if (t === Date)
384
- return $t.get(e, N);
385
- if (t === JSON)
386
- return Ht.get(e, N);
387
- if (Ir(t))
388
- return t(e, N);
389
- if ($e(t))
390
- return t.get(e, N);
391
- if (t instanceof RegExp) {
392
- if (t.test(e))
393
- return e;
394
- throw new G();
395
- }
396
- if (Nt(t)) {
397
- if (zr(e, t))
516
+ throw new z();
517
+ }
518
+ if (e === String)
519
+ return Te.get(t, C);
520
+ if (e === Boolean)
521
+ return ne.get(t, C);
522
+ if (e === Number)
523
+ return oe.get(t, C);
524
+ if (e === Date)
525
+ return Me.get(t, C);
526
+ if (e === JSON)
527
+ return We.get(t, C);
528
+ if (zr(e))
529
+ return e(t, C);
530
+ if (Jt(e))
531
+ return e.get(t, C);
532
+ if (e instanceof RegExp) {
533
+ if (e.test(t))
398
534
  return t;
399
- throw new G();
535
+ throw new z();
536
+ }
537
+ if (qe(e)) {
538
+ if (an(t, e))
539
+ return e;
540
+ throw new z();
400
541
  }
401
- return Zt(t) ? jt(t).get(e, N) : e;
542
+ return Ie(e) ? Je(e).get(t, C) : De(e) ? Fe(e).get(t, C) : t;
402
543
  }
403
- function Qr(e, t, r = !1) {
544
+ function sn(t, e, r = !1) {
404
545
  try {
405
- return re(e, t, r);
546
+ return nt(t, e, r);
406
547
  } catch (n) {
407
- if (n instanceof G)
548
+ if (n instanceof z)
408
549
  return;
409
550
  throw n;
410
551
  }
411
552
  }
412
- function Kr(e, t, r = !1) {
553
+ function cn(t, e, r = !1) {
413
554
  try {
414
- return ne(e, t, r);
555
+ return ot(t, e, r);
415
556
  } catch (n) {
416
- if (n instanceof G)
557
+ if (n instanceof z)
417
558
  return;
418
559
  throw n;
419
560
  }
420
561
  }
421
- function ne(e, t, r = !1) {
422
- if (e === void 0) {
562
+ function ot(t, e, r = !1) {
563
+ if (t === void 0) {
423
564
  if (r)
424
565
  return "";
425
- throw new G();
426
- }
427
- if (t === Boolean)
428
- return ze.set(e, N);
429
- if (t === Number)
430
- return Qe.set(e, N);
431
- if (t === Date)
432
- return $t.set(e, N);
433
- if (t === JSON)
434
- return Ht.set(e, N);
435
- if ($e(t))
436
- return t.set(e, N);
437
- if (Nt(t)) {
438
- if (t !== e)
439
- throw new G();
440
- return e.toString();
441
- }
442
- if (Zt(t))
443
- return jt(t).set(e, N);
566
+ throw new z();
567
+ }
568
+ if (e === Boolean)
569
+ return ne.set(t, C);
570
+ if (e === Number)
571
+ return oe.set(t, C);
572
+ if (e === Date)
573
+ return Me.set(t, C);
574
+ if (e === JSON)
575
+ return We.set(t, C);
576
+ if (Jt(e))
577
+ return e.set(t, C);
578
+ if (qe(e)) {
579
+ if (e !== t)
580
+ throw new z();
581
+ return t.toString();
582
+ }
583
+ if (Ie(e))
584
+ return Je(e).set(t, C);
585
+ if (De(e))
586
+ return Fe(e).set(t, C);
444
587
  try {
445
- return e.toString();
588
+ return t.toString();
446
589
  } catch {
447
- throw new G();
590
+ throw new z();
448
591
  }
449
592
  }
450
- function Ke(e) {
451
- return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
593
+ function ae(t) {
594
+ return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
452
595
  }
453
- function Yr(e, t) {
454
- const r = Array.from(e.matchAll(t));
596
+ function un(t, e) {
597
+ const r = Array.from(t.matchAll(e));
455
598
  if (r.length === 0)
456
- return [e];
599
+ return [t];
457
600
  let n = 0;
458
601
  const o = r.reduce((s, l) => {
459
- const p = Ke(e.slice(n, l.index));
460
- p.length && s.push(p);
461
- const [c] = l;
462
- return s.push(c), n = l.index + c.length, s;
463
- }, []), a = e.slice(n);
602
+ const d = ae(t.slice(n, l.index));
603
+ d.length && s.push(d);
604
+ const [i] = l;
605
+ return s.push(i), n = l.index + i.length, s;
606
+ }, []), a = t.slice(n);
464
607
  return a && o.push(a), o;
465
608
  }
466
- function Xr(e) {
467
- const t = _t(e.path.value);
468
- return new RegExp(`^${t}$`, "i");
609
+ function fn(t) {
610
+ const e = Ge(t.path.value);
611
+ return new RegExp(`^${e}$`, "i");
469
612
  }
470
- function en(e) {
471
- const t = new URLSearchParams(e.query.value);
472
- return Array.from(t.entries()).filter(([, r]) => !Xe(r)).map(([r, n]) => {
473
- const o = _t(n);
474
- return new RegExp(`${Ke(r)}=${o}(&|$)`, "i");
613
+ function ln(t) {
614
+ const e = new URLSearchParams(t.query.value);
615
+ return Array.from(e.entries()).filter(([, r]) => !ie(r)).map(([r, n]) => {
616
+ const o = Ge(n);
617
+ return new RegExp(`${ae(r)}=${o}(&|$)`, "i");
475
618
  });
476
619
  }
477
- function _t(e) {
478
- return Yr(e, new RegExp(He, "g")).map((t) => t.startsWith(ve) ? qt(t) : Ke(t)).join("");
620
+ function Ge(t) {
621
+ return un(t, new RegExp(Dt, "g")).map((e) => e.startsWith(St) ? ze(e) : ae(e)).join("");
479
622
  }
480
- function qt(e) {
481
- return e.replace(new RegExp(He, "g"), ".+");
623
+ function ze(t) {
624
+ return t.replace(new RegExp(Dt, "g"), ".+");
482
625
  }
483
- function tn(e, t) {
484
- const r = It(t);
485
- return e.replace(r, "(.*)");
626
+ function pn(t, e) {
627
+ const r = Qe(e);
628
+ return t.replace(r, "(.*)");
486
629
  }
487
- function Ye(e, t) {
488
- return nn(t).test(e.value);
630
+ function se(t, e) {
631
+ return hn(e).test(t.value);
489
632
  }
490
- function Xe(e) {
491
- return new RegExp(rn, "g").test(e);
633
+ function ie(t) {
634
+ return new RegExp(dn, "g").test(t);
492
635
  }
493
- const He = `\\${ve}\\??([\\w-_]+)\\${Oe}`, rn = `\\${ve}\\?([\\w-_]+)\\${Oe}`;
494
- function et(e) {
495
- const [t] = Dt(e, new RegExp(He, "g"));
496
- return t;
636
+ const Dt = `\\${St}\\??([\\w-_]+)\\${It}`, dn = `\\${St}\\?([\\w-_]+)\\${It}`;
637
+ function ce(t) {
638
+ const [e] = Ke(t, new RegExp(Dt, "g"));
639
+ return e;
497
640
  }
498
- function It(e) {
499
- return new RegExp(`\\${ve}\\??${e}\\${Oe}`, "g");
641
+ function Qe(t) {
642
+ return new RegExp(`\\${St}\\??${t}\\${It}`, "g");
500
643
  }
501
- function nn(e) {
502
- return new RegExp(`\\${ve}\\?${e}\\${Oe}`, "g");
644
+ function hn(t) {
645
+ return new RegExp(`\\${St}\\?${t}\\${It}`, "g");
503
646
  }
504
- function Dt(e, t) {
505
- return Array.from(e.matchAll(t)).flatMap(([, ...n]) => n.map((o) => J(o) ? o : ""));
647
+ function Ke(t, e) {
648
+ return Array.from(t.matchAll(e)).flatMap(([, ...n]) => n.map((o) => W(o) ? o : ""));
506
649
  }
507
- function on(e = "", t = {}) {
508
- return J(e) ? Array.from(e.matchAll(new RegExp(He, "g"))).reduce((n, [o, a]) => {
509
- const s = et(o);
650
+ function yn(t = "", e = {}) {
651
+ return W(t) ? Array.from(t.matchAll(new RegExp(Dt, "g"))).reduce((n, [o, a]) => {
652
+ const s = ce(o);
510
653
  if (!s)
511
654
  return n;
512
- const l = Gr(t, s);
513
- return ge([s], n), n[a] = l, n;
655
+ const l = on(e, s);
656
+ return Et([s], n), n[a] = l, n;
514
657
  }, {}) : {};
515
658
  }
516
- function an(e) {
517
- return Vt(e) && typeof e.value == "string";
659
+ function mn(t) {
660
+ return Lt(t) && typeof t.value == "string";
518
661
  }
519
- function Y(e) {
520
- return e === void 0 ? z() : an(e) ? e : z(e, {});
662
+ function X(t) {
663
+ return t === void 0 ? Q() : mn(t) ? t : Q(t, {});
521
664
  }
522
- function z(e, t) {
665
+ function Q(t, e) {
523
666
  return {
524
- value: e ?? "",
525
- params: on(e, t)
667
+ value: t ?? "",
668
+ params: yn(t, e)
526
669
  };
527
670
  }
528
- function Ft(e, t) {
529
- ge(e.params, t.params);
530
- const r = `${e.value}${t.value}`;
531
- return z(r, { ...e.params, ...t.params });
671
+ function Ye(t, e) {
672
+ Et(t.params, e.params);
673
+ const r = `${t.value}${e.value}`;
674
+ return Q(r, { ...t.params, ...e.params });
532
675
  }
533
- function sn(e, t) {
534
- return Ft(e, t);
676
+ function gn(t, e) {
677
+ return Ye(t, e);
535
678
  }
536
- function cn(e, t) {
537
- return un(e, t), { ...e, ...t };
679
+ function Rn(t, e) {
680
+ return wn(t, e), { ...t, ...e };
538
681
  }
539
- function un(e, t) {
540
- const r = Object.keys(e).find((n) => n in t && typeof t[n] != typeof e[n]);
682
+ function wn(t, e) {
683
+ const r = Object.keys(t).find((n) => n in e && typeof e[n] != typeof t[n]);
541
684
  if (r)
542
- throw new Hr(r);
685
+ throw new Mr(r);
543
686
  }
544
- function fn(e, t) {
545
- ge(e.params, t.params);
546
- const r = [e.value, t.value].filter(J).join("&");
547
- return z(r, { ...e.params, ...t.params });
687
+ function En(t, e) {
688
+ Et(t.params, e.params);
689
+ const r = [t.value, e.value].filter(W).join("&");
690
+ return Q(r, { ...t.params, ...e.params });
548
691
  }
549
- function ln(e, t) {
550
- return ge(e, t), { ...e, ...t };
692
+ function vn(t, e) {
693
+ return Et(t, e), { ...t, ...e };
551
694
  }
552
- function Tt(e) {
553
- return "parent" in e && !!e.parent;
695
+ function Xe(t) {
696
+ return "parent" in t && !!t.parent;
554
697
  }
555
- function Mt(e) {
556
- return "component" in e && !!e.component;
698
+ function tr(t) {
699
+ return "component" in t && !!t.component;
557
700
  }
558
- function lt(e) {
559
- return "props" in e && typeof e.props == "function";
701
+ function we(t) {
702
+ return "props" in t && typeof t.props == "function";
560
703
  }
561
- function Jt(e) {
562
- return "components" in e && !!e.components;
704
+ function er(t) {
705
+ return "components" in t && !!t.components;
563
706
  }
564
- function ht(e) {
565
- return "props" in e && typeof e.props == "object";
707
+ function Ee(t) {
708
+ return "props" in t && typeof t.props == "object";
566
709
  }
567
- function Wt(e, t) {
710
+ function rr(t, e) {
568
711
  return {
569
- ...t,
570
- path: Ft(e.path, t.path),
571
- query: fn(e.query, t.query),
572
- meta: cn(e.meta, t.meta),
573
- state: ln(e.state, t.state),
574
- hash: sn(e.hash, t.hash),
575
- matches: [...e.matches, t.matched],
576
- host: e.host,
577
- depth: e.depth + 1
712
+ ...e,
713
+ path: Ye(t.path, e.path),
714
+ query: En(t.query, e.query),
715
+ meta: Rn(t.meta, e.meta),
716
+ state: vn(t.state, e.state),
717
+ hash: gn(t.hash, e.hash),
718
+ matches: [...t.matches, e.matched],
719
+ host: t.host,
720
+ depth: t.depth + 1
578
721
  };
579
722
  }
580
- function tt() {
723
+ function ue() {
581
724
  return typeof window < "u" && typeof window.document < "u";
582
725
  }
583
- function rt(e) {
584
- const t = new URLSearchParams(e);
726
+ function fe(t) {
727
+ const e = new URLSearchParams(t);
585
728
  return {
586
- get: (...r) => t.get(...r),
587
- getAll: (...r) => t.getAll(...r),
729
+ get: (...r) => e.get(...r),
730
+ getAll: (...r) => e.getAll(...r),
588
731
  set: (...r) => {
589
- t.set(...r);
732
+ e.set(...r);
590
733
  },
591
734
  append: (...r) => {
592
- t.append(...r);
735
+ e.append(...r);
593
736
  },
594
737
  delete: (...r) => {
595
- t.delete(...r);
738
+ e.delete(...r);
596
739
  },
597
- toString: (...r) => t.toString(...r),
740
+ toString: (...r) => e.toString(...r),
598
741
  forEach: (...r) => {
599
- t.forEach(...r);
742
+ e.forEach(...r);
600
743
  },
601
- entries: (...r) => t.entries(...r),
602
- keys: (...r) => t.keys(...r),
603
- values: (...r) => t.values(...r),
604
- has: (...r) => t.has(...r),
605
- size: t.size,
744
+ entries: (...r) => e.entries(...r),
745
+ keys: (...r) => e.keys(...r),
746
+ values: (...r) => e.values(...r),
747
+ has: (...r) => e.has(...r),
748
+ size: e.size,
606
749
  sort: () => {
607
- t.sort();
750
+ e.sort();
608
751
  },
609
- [Symbol.iterator]: () => t[Symbol.iterator]()
752
+ [Symbol.iterator]: () => e[Symbol.iterator]()
610
753
  };
611
754
  }
612
- function nt() {
613
- let e = 0;
614
- return () => (++e).toString();
755
+ function le() {
756
+ let t = 0;
757
+ return () => (++t).toString();
615
758
  }
616
- const hn = nt()();
617
- function pn(e) {
618
- return e === hn;
759
+ const bn = le()();
760
+ function Sn(t) {
761
+ return t === bn;
619
762
  }
620
- const ot = nt();
621
- function Gt(e) {
622
- return e === void 0 ? "" : e;
763
+ const pe = le();
764
+ function nr(t) {
765
+ return t === void 0 ? "" : t;
623
766
  }
624
- function he(e, t) {
625
- const r = ot(), n = Gt(e.name), o = Y(e.path), a = Y(e.query), s = Y(e.hash), l = e.meta ?? {}, p = e.state ?? {}, c = Ae({ id: r, meta: l, state: p, ...e, props: t }), y = {
767
+ function yt(t, e) {
768
+ const r = pe(), n = nr(t.name), o = X(t.path), a = X(t.query), s = X(t.hash), l = t.meta ?? {}, d = t.state ?? {}, i = Nt({ id: r, meta: l, state: d, ...t, props: e }), m = {
626
769
  id: r,
627
- matched: c,
628
- matches: [c],
770
+ matched: i,
771
+ matches: [i],
629
772
  name: n,
630
773
  path: o,
631
774
  query: a,
632
775
  hash: s,
633
776
  meta: l,
634
- state: p,
777
+ state: d,
635
778
  depth: 1,
636
- host: z(),
637
- prefetch: e.prefetch
638
- }, b = Tt(e) ? Wt(e.parent, y) : y;
639
- return ge(b.path.params, b.query.params, b.hash.params), b;
779
+ host: Q(),
780
+ prefetch: t.prefetch
781
+ }, b = Xe(t) ? rr(t.parent, m) : m;
782
+ return Et(b.path.params, b.query.params, b.hash.params), b;
640
783
  }
641
- const xe = { template: "<div>This is component</div>" }, at = he({
784
+ const Ct = { template: "<div>This is component</div>" }, de = yt({
642
785
  name: "parentA",
643
786
  path: "/parentA/[paramA]"
644
- }), zt = he({
645
- parent: at,
787
+ }), or = yt({
788
+ parent: de,
646
789
  name: "parentA.childA",
647
790
  path: "/childA/[?paramB]"
648
- }), dn = he({
649
- parent: at,
791
+ }), Pn = yt({
792
+ parent: de,
650
793
  name: "parentA.childB",
651
794
  path: "/childB/[paramD]",
652
- component: xe
653
- }), mn = he({
654
- parent: zt,
795
+ component: Ct
796
+ }), An = yt({
797
+ parent: or,
655
798
  name: "parentA.childA.grandChildA",
656
799
  path: "/[paramC]",
657
- component: xe
800
+ component: Ct
658
801
  });
659
- he({
802
+ yt({
660
803
  name: "parentB",
661
804
  path: "/parentB",
662
- component: xe
663
- }), he({
805
+ component: Ct
806
+ }), yt({
664
807
  name: "parentC",
665
808
  path: "/",
666
- component: xe
809
+ component: Ct
667
810
  });
668
- const yn = "lazy", gn = {
811
+ const kn = "lazy", xn = {
669
812
  components: !0,
670
813
  props: !1
671
814
  };
672
- function Se(e) {
673
- return ["eager", "lazy", "intent"].includes(e);
815
+ function xt(t) {
816
+ return ["eager", "lazy", "intent"].includes(t);
674
817
  }
675
- function Qt({ routerPrefetch: e, routePrefetch: t, linkPrefetch: r }, n) {
676
- const o = Fe(r, n), a = Fe(t, n), s = Fe(e, n), l = [
818
+ function ar({ routerPrefetch: t, routePrefetch: e, linkPrefetch: r }, n) {
819
+ const o = Gt(r, n), a = Gt(e, n), s = Gt(t, n), l = [
677
820
  o,
678
821
  a,
679
822
  s,
680
- gn[n],
681
- yn
682
- ].reduce((p, c) => Se(p) ? p : p === !0 && Se(c) ? c : p === !0 && !Se(c) ? p : p === void 0 ? c : p, void 0);
683
- return Se(l) ? l : !1;
823
+ xn[n],
824
+ kn
825
+ ].reduce((d, i) => xt(d) ? d : d === !0 && xt(i) ? i : d === !0 && !xt(i) ? d : d === void 0 ? i : d, void 0);
826
+ return xt(l) ? l : !1;
684
827
  }
685
- function Fe(e, t) {
686
- return Vt(e) ? e[t] : e;
828
+ function Gt(t, e) {
829
+ return Lt(t) ? t[e] : t;
687
830
  }
688
- class Kt extends Error {
831
+ class sr extends Error {
689
832
  constructor() {
690
833
  super("Uncaught CallbackContextAbortError");
691
834
  T(this, "response");
692
835
  this.response = { status: "ABORT" };
693
836
  }
694
837
  }
695
- class le extends Error {
838
+ class ht extends Error {
696
839
  constructor(r) {
697
840
  super("Uncaught CallbackContextPushError");
698
841
  T(this, "response");
699
842
  this.response = { status: "PUSH", to: r };
700
843
  }
701
844
  }
702
- class Ue extends Error {
845
+ class Vt extends Error {
703
846
  constructor(r) {
704
847
  super("Uncaught CallbackContextRejectionError");
705
848
  T(this, "response");
706
849
  this.response = { status: "REJECT", type: r };
707
850
  }
708
851
  }
709
- function Yt() {
852
+ function ir() {
710
853
  return { reject: (o) => {
711
- throw new Ue(o);
854
+ throw new Vt(o);
712
855
  }, push: (...o) => {
713
- throw new le(o);
856
+ throw new ht(o);
714
857
  }, replace: (o, a, s) => {
715
858
  if (M(o)) {
716
- const c = a ?? {};
717
- throw new le([o, { ...c, replace: !0 }]);
859
+ const i = a ?? {};
860
+ throw new ht([o, { ...i, replace: !0 }]);
718
861
  }
719
- const l = a, p = s ?? {};
720
- throw new le([o, l, { ...p, replace: !0 }]);
862
+ const l = a, d = s ?? {};
863
+ throw new ht([o, l, { ...d, replace: !0 }]);
721
864
  }, abort: () => {
722
- throw new Kt();
865
+ throw new sr();
723
866
  } };
724
867
  }
725
- function Xt(e) {
726
- return typeof e == "object" && e !== null && "then" in e;
727
- }
728
- function pt(e) {
868
+ function ve(t) {
729
869
  try {
730
- const t = e();
731
- return Xt(t) ? t.catch((r) => r) : t;
732
- } catch (t) {
733
- return t;
870
+ const e = t();
871
+ return re(e) ? e.catch((r) => r) : e;
872
+ } catch (e) {
873
+ return e;
734
874
  }
735
875
  }
736
- function er() {
737
- let e = null;
738
- function t(n) {
739
- e = n;
876
+ function cr() {
877
+ let t = null;
878
+ function e(n) {
879
+ t = n;
740
880
  }
741
881
  function r(n) {
742
- return e ? e.runWithContext(n) : n();
882
+ return t ? t.runWithContext(n) : n();
743
883
  }
744
884
  return {
745
- setVueApp: t,
885
+ setVueApp: e,
746
886
  runWithContext: r
747
887
  };
748
888
  }
749
- const tr = Symbol();
750
- function Rn() {
751
- const { setVueApp: e, runWithContext: t } = er(), r = Ve(/* @__PURE__ */ new Map()), { push: n, replace: o, reject: a } = Yt(), s = (m, h, R) => h.matches.filter((f) => Qt({ ...R, routePrefetch: f.prefetch }, "props") === m).flatMap((f) => S(f)).reduce((f, { id: i, name: E, props: k }) => {
889
+ const ur = Symbol();
890
+ function Nn() {
891
+ const { setVueApp: t, runWithContext: e } = cr(), r = Ht(/* @__PURE__ */ new Map()), { push: n, replace: o, reject: a } = ir(), s = (y, p, R) => p.matches.filter((f) => ar({ ...R, routePrefetch: f.prefetch }, "props") === y).flatMap((f) => P(f)).reduce((f, { id: c, name: v, props: k }) => {
752
892
  if (!k)
753
893
  return f;
754
- const A = L(i, E, h), g = t(() => pt(() => k(h, {
894
+ const A = U(c, v, p), g = e(() => ve(() => k(p, {
755
895
  push: n,
756
896
  replace: o,
757
897
  reject: a,
758
- parent: y(h, !0)
898
+ parent: m(p, !0)
759
899
  })));
760
900
  return f[A] = g, f;
761
- }, {}), l = (m) => {
762
- Object.entries(m).forEach(([h, R]) => {
763
- r.set(h, R);
901
+ }, {}), l = (y) => {
902
+ Object.entries(y).forEach(([p, R]) => {
903
+ r.set(p, R);
764
904
  });
765
- }, p = async (m) => {
766
- const h = m.matches.flatMap(S), R = [], f = [];
767
- for (const { id: i, name: E, props: k } of h) {
905
+ }, d = async (y) => {
906
+ const p = y.matches.flatMap(P), R = [], f = [];
907
+ for (const { id: c, name: v, props: k } of p) {
768
908
  if (!k)
769
909
  continue;
770
- const A = L(i, E, m);
910
+ const A = U(c, v, y);
771
911
  if (R.push(A), !r.has(A)) {
772
- const g = t(() => pt(() => k(m, {
912
+ const g = e(() => ve(() => k(y, {
773
913
  push: n,
774
914
  replace: o,
775
915
  reject: a,
776
- parent: y(m)
916
+ parent: m(y)
777
917
  })));
778
918
  r.set(A, g);
779
919
  }
@@ -786,28 +926,28 @@ function Rn() {
786
926
  w(R);
787
927
  try {
788
928
  return await Promise.all(f), { status: "SUCCESS" };
789
- } catch (i) {
790
- if (i instanceof le || i instanceof Ue)
791
- return i.response;
792
- throw i;
929
+ } catch (c) {
930
+ if (c instanceof ht || c instanceof Vt)
931
+ return c.response;
932
+ throw c;
793
933
  }
794
- }, c = (m, h, R) => {
795
- const f = L(m, h, R);
934
+ }, i = (y, p, R) => {
935
+ const f = U(y, p, R);
796
936
  return r.get(f);
797
937
  };
798
- function y(m, h = !1) {
799
- const R = m.matches.at(-2);
938
+ function m(y, p = !1) {
939
+ const R = y.matches.at(-2);
800
940
  if (R)
801
- return lt(R) ? {
941
+ return we(R) ? {
802
942
  name: R.name ?? "",
803
943
  get props() {
804
- return b(R, "default", m, h);
944
+ return b(R, "default", y, p);
805
945
  }
806
- } : ht(R) ? {
946
+ } : Ee(R) ? {
807
947
  name: R.name ?? "",
808
948
  props: new Proxy({}, {
809
- get(f, i) {
810
- return typeof i != "string" ? Reflect.get(f, i) : b(R, i, m, h);
949
+ get(f, c) {
950
+ return typeof c != "string" ? Reflect.get(f, c) : b(R, c, y, p);
811
951
  }
812
952
  })
813
953
  } : {
@@ -815,149 +955,149 @@ function Rn() {
815
955
  props: void 0
816
956
  };
817
957
  }
818
- function b(m, h, R, f = !1) {
819
- const i = c(m.id, h, R);
820
- if (f && !i) {
821
- const E = m.name ?? "unknown", k = R.name || "unknown";
958
+ function b(y, p, R, f = !1) {
959
+ const c = i(y.id, p, R);
960
+ if (f && !c) {
961
+ const v = y.name ?? "unknown", k = R.name || "unknown";
822
962
  console.warn(`
823
- Unable to access parent props "${h}" from route "${E}" while prefetching props for route "${k}".
963
+ Unable to access parent props "${p}" from route "${v}" while prefetching props for route "${k}".
824
964
  This may occur if the parent route's props were not also prefetched.
825
965
  `);
826
966
  }
827
- return i;
967
+ return c;
828
968
  }
829
- function L(m, h, R) {
830
- return [m, h, R.id, JSON.stringify(R.params)].join("-");
969
+ function U(y, p, R) {
970
+ return [y, p, R.id, JSON.stringify(R.params)].join("-");
831
971
  }
832
- function S(m) {
833
- return lt(m) ? [
972
+ function P(y) {
973
+ return we(y) ? [
834
974
  {
835
- id: m.id,
975
+ id: y.id,
836
976
  name: "default",
837
- props: m.props
977
+ props: y.props
838
978
  }
839
- ] : ht(m) ? Object.entries(m.props).map(([h, R]) => ({ id: m.id, name: h, props: R })) : [];
979
+ ] : Ee(y) ? Object.entries(y.props).map(([p, R]) => ({ id: y.id, name: p, props: R })) : [];
840
980
  }
841
- function w(m) {
842
- for (const h of r.keys())
843
- m.includes(h) || r.delete(h);
981
+ function w(y) {
982
+ for (const p of r.keys())
983
+ y.includes(p) || r.delete(p);
844
984
  }
845
985
  return {
846
986
  getPrefetchProps: s,
847
987
  setPrefetchProps: l,
848
- getProps: c,
849
- setProps: p,
850
- setVueApp: e
988
+ getProps: i,
989
+ setProps: d,
990
+ setVueApp: t
851
991
  };
852
992
  }
853
- function rr() {
854
- const e = ae(tr);
855
- if (!e)
856
- throw new ye();
857
- return e;
993
+ function fr() {
994
+ const t = st(ur);
995
+ if (!t)
996
+ throw new wt();
997
+ return t;
858
998
  }
859
- const wn = kr(() => new Promise((e) => {
860
- e({ default: { template: "foo" } });
999
+ const Ln = Zr(() => new Promise((t) => {
1000
+ t({ default: { template: "foo" } });
861
1001
  }));
862
- function dt(e) {
863
- return e.name === wn.name && "__asyncLoader" in e;
1002
+ function be(t) {
1003
+ return t.name === Ln.name && "__asyncLoader" in t;
864
1004
  }
865
- const nr = Symbol("visibilityObserver");
866
- function vn(e) {
867
- const t = ae(nr);
868
- if (!t)
869
- throw new ye();
870
- return te(e, (n, o) => {
871
- n && t.observe(n), o && t.unobserve(o);
872
- }, { immediate: !0 }), Ze(() => {
873
- e.value && t.unobserve(e.value);
1005
+ const lr = Symbol("visibilityObserver");
1006
+ function Un(t) {
1007
+ const e = st(lr);
1008
+ if (!e)
1009
+ throw new wt();
1010
+ return rt(t, (n, o) => {
1011
+ n && e.observe(n), o && e.unobserve(o);
1012
+ }, { immediate: !0 }), _t(() => {
1013
+ t.value && e.unobserve(t.value);
874
1014
  }), {
875
- isElementVisible: Z(() => e.value ? t.isElementVisible(e.value) : !1)
1015
+ isElementVisible: O(() => t.value ? e.isElementVisible(t.value) : !1)
876
1016
  };
877
1017
  }
878
- function mt(e, t, r) {
879
- te(e, (n, o) => {
880
- n && n.addEventListener(t, r), o && o.removeEventListener(t, r);
881
- }, { immediate: !0 }), Ze(() => {
882
- e.value && e.value.removeEventListener(t, r);
1018
+ function Se(t, e, r) {
1019
+ rt(t, (n, o) => {
1020
+ n && n.addEventListener(e, r), o && o.removeEventListener(e, r);
1021
+ }, { immediate: !0 }), _t(() => {
1022
+ t.value && t.value.removeEventListener(e, r);
883
1023
  });
884
1024
  }
885
- function En(e) {
886
- const t = /* @__PURE__ */ new Map(), r = je(), { getPrefetchProps: n, setPrefetchProps: o } = rr(), { isElementVisible: a } = vn(r), s = () => {
887
- const c = Array.from(t.values()).reduce((y, b) => (Object.assign(y, b), y), {});
888
- o(c);
1025
+ function Bn(t) {
1026
+ const e = /* @__PURE__ */ new Map(), r = qt(), { getPrefetchProps: n, setPrefetchProps: o } = fr(), { isElementVisible: a } = Un(r), s = () => {
1027
+ const i = Array.from(e.values()).reduce((m, b) => (Object.assign(m, b), m), {});
1028
+ o(i);
889
1029
  };
890
- te(() => $(e), ({ route: c, ...y }) => {
891
- t.clear(), c && p("eager", c, y);
892
- }, { immediate: !0 }), te(a, (c) => {
893
- const { route: y, ...b } = $(e);
894
- !y || !c || p("lazy", y, b);
895
- }, { immediate: !0 }), mt(r, "focusin", l), mt(r, "mouseover", l);
1030
+ rt(() => H(t), ({ route: i, ...m }) => {
1031
+ e.clear(), i && d("eager", i, m);
1032
+ }, { immediate: !0 }), rt(a, (i) => {
1033
+ const { route: m, ...b } = H(t);
1034
+ !m || !i || d("lazy", m, b);
1035
+ }, { immediate: !0 }), Se(r, "focusin", l), Se(r, "mouseover", l);
896
1036
  function l() {
897
- const { route: c, ...y } = $(e);
898
- c && p("intent", c, y);
1037
+ const { route: i, ...m } = H(t);
1038
+ i && d("intent", i, m);
899
1039
  }
900
- function p(c, y, b) {
901
- bn(c, y, b), t.has(c) || t.set(c, n(c, y, b));
1040
+ function d(i, m, b) {
1041
+ Cn(i, m, b), e.has(i) || e.set(i, n(i, m, b));
902
1042
  }
903
1043
  return {
904
1044
  element: r,
905
1045
  commit: s
906
1046
  };
907
1047
  }
908
- function bn(e, t, r) {
909
- t.matches.forEach((n) => {
910
- Qt({
1048
+ function Cn(t, e, r) {
1049
+ e.matches.forEach((n) => {
1050
+ ar({
911
1051
  ...r,
912
1052
  routePrefetch: n.prefetch
913
- }, "components") === e && (Mt(n) && dt(n.component) && n.component.__asyncLoader(), Jt(n) && Object.values(n.components).forEach((a) => {
914
- dt(a) && a.__asyncLoader();
1053
+ }, "components") === t && (tr(n) && be(n.component) && n.component.__asyncLoader(), er(n) && Object.values(n.components).forEach((a) => {
1054
+ be(a) && a.__asyncLoader();
915
1055
  }));
916
1056
  });
917
1057
  }
918
- const or = Symbol("isRouterRouteSymbol");
919
- function Pn(e) {
920
- return typeof e == "object" && e !== null && or in e;
1058
+ const pr = Symbol("isRouterRouteSymbol");
1059
+ function Vn(t) {
1060
+ return typeof t == "object" && t !== null && pr in t;
921
1061
  }
922
- function Sn(e, t) {
923
- function r(h, R, f) {
924
- if (typeof h == "object") {
925
- const E = {
926
- ...e.params,
927
- ...h
1062
+ function Zn(t, e) {
1063
+ function r(p, R, f) {
1064
+ if (typeof p == "object") {
1065
+ const v = {
1066
+ ...t.params,
1067
+ ...p
928
1068
  };
929
- return t(e.name, E, R);
1069
+ return e(t.name, v, R);
930
1070
  }
931
- const i = {
932
- ...e.params,
933
- [h]: R
1071
+ const c = {
1072
+ ...t.params,
1073
+ [p]: R
934
1074
  };
935
- return t(e.name, i, f);
936
- }
937
- const n = (...h) => {
938
- const R = new URLSearchParams(e.query);
939
- R.set(...h), r({}, { query: R });
940
- }, o = (...h) => {
941
- const R = new URLSearchParams(e.query);
942
- R.append(...h), r({}, { query: R });
943
- }, a = (...h) => {
944
- const R = new URLSearchParams(e.query);
945
- R.delete(...h), r({}, { query: R });
946
- }, { id: s, matched: l, matches: p, name: c, hash: y, href: b } = xr(e), L = Z({
1075
+ return e(t.name, c, f);
1076
+ }
1077
+ const n = (...p) => {
1078
+ const R = new URLSearchParams(t.query);
1079
+ R.set(...p), r({}, { query: R });
1080
+ }, o = (...p) => {
1081
+ const R = new URLSearchParams(t.query);
1082
+ R.append(...p), r({}, { query: R });
1083
+ }, a = (...p) => {
1084
+ const R = new URLSearchParams(t.query);
1085
+ R.delete(...p), r({}, { query: R });
1086
+ }, { id: s, matched: l, matches: d, name: i, hash: m, href: b } = Or(t), U = O({
947
1087
  get() {
948
- return new Proxy(e.params, {
949
- set(h, R, f) {
1088
+ return new Proxy(t.params, {
1089
+ set(p, R, f) {
950
1090
  return r(R, f), !0;
951
1091
  }
952
1092
  });
953
1093
  },
954
- set(h) {
955
- r(h);
1094
+ set(p) {
1095
+ r(p);
956
1096
  }
957
- }), S = Z({
1097
+ }), P = O({
958
1098
  get() {
959
- return new Proxy(e.query, {
960
- get(h, R, f) {
1099
+ return new Proxy(t.query, {
1100
+ get(p, R, f) {
961
1101
  switch (R) {
962
1102
  case "append":
963
1103
  return o;
@@ -966,98 +1106,98 @@ function Sn(e, t) {
966
1106
  case "delete":
967
1107
  return a;
968
1108
  default:
969
- return Reflect.get(h, R, f);
1109
+ return Reflect.get(p, R, f);
970
1110
  }
971
1111
  }
972
1112
  });
973
1113
  },
974
- set(h) {
975
- r({}, { query: h });
1114
+ set(p) {
1115
+ r({}, { query: p });
976
1116
  }
977
- }), w = Z({
1117
+ }), w = O({
978
1118
  get() {
979
- return new Proxy(e.state, {
980
- set(h, R, f) {
981
- return r({}, { state: { ...e.state, [R]: f } }), !0;
1119
+ return new Proxy(t.state, {
1120
+ set(p, R, f) {
1121
+ return r({}, { state: { ...t.state, [R]: f } }), !0;
982
1122
  }
983
1123
  });
984
1124
  },
985
- set(h) {
986
- r({}, { state: h });
1125
+ set(p) {
1126
+ r({}, { state: p });
987
1127
  }
988
1128
  });
989
- return Ve({
1129
+ return Ht({
990
1130
  id: s,
991
1131
  matched: l,
992
- matches: p,
1132
+ matches: d,
993
1133
  state: w,
994
- query: S,
995
- hash: y,
996
- params: L,
997
- name: c,
1134
+ query: P,
1135
+ hash: m,
1136
+ params: U,
1137
+ name: i,
998
1138
  href: b,
999
1139
  update: r,
1000
- [or]: !0
1140
+ [pr]: !0
1001
1141
  });
1002
1142
  }
1003
- function ar(e, t, { exact: r } = {}) {
1004
- return Pn(e) ? t === void 0 ? !0 : r ? e.matched.name === t : e.matches.map((n) => n.name).includes(t) : !1;
1143
+ function dr(t, e, { exact: r } = {}) {
1144
+ return Vn(t) ? e === void 0 ? !0 : r ? t.matched.name === e : t.matches.map((n) => n.name).includes(e) : !1;
1005
1145
  }
1006
- function st(...e) {
1007
- const t = new URLSearchParams();
1008
- for (const r of e) {
1146
+ function he(...t) {
1147
+ const e = new URLSearchParams();
1148
+ for (const r of t) {
1009
1149
  const n = new URLSearchParams(r);
1010
1150
  for (const [o, a] of n.entries())
1011
- t.append(o, a);
1151
+ e.append(o, a);
1012
1152
  }
1013
- return t;
1153
+ return e;
1014
1154
  }
1015
- function An(e, t = {}, r = {}) {
1016
- const n = Ge(), o = Z(() => {
1017
- const w = $(e);
1018
- return typeof w != "string" ? w : M(w) ? n.find(w, $(r)) : n.resolve(w, $(t), $(r));
1019
- }), a = Z(() => {
1155
+ function On(t, e = {}, r = {}) {
1156
+ const n = ee(), o = O(() => {
1157
+ const w = H(t);
1158
+ return typeof w != "string" ? w : M(w) ? n.find(w, H(r)) : n.resolve(w, H(e), H(r));
1159
+ }), a = O(() => {
1020
1160
  if (o.value)
1021
1161
  return o.value.href;
1022
- const w = $(e);
1162
+ const w = H(t);
1023
1163
  if (M(w))
1024
1164
  return w;
1025
1165
  console.error(new Error("Failed to resolve route in RouterLink."));
1026
- }), s = Z(() => ar(n.route) && n.route.matches.some((w) => {
1027
- var m;
1028
- return w.id === ((m = o.value) == null ? void 0 : m.id);
1029
- })), l = Z(() => {
1166
+ }), s = O(() => dr(n.route) && n.route.matches.some((w) => {
1167
+ var y;
1168
+ return w.id === ((y = o.value) == null ? void 0 : y.id);
1169
+ })), l = O(() => {
1030
1170
  var w;
1031
1171
  return n.route.id === ((w = o.value) == null ? void 0 : w.id);
1032
- }), p = Z(() => !!a.value && n.isExternal(a.value)), c = Z(() => {
1033
- const w = $(e);
1034
- return typeof w != "string" || M(w) ? $(t) : $(r);
1035
- }), { element: y, commit: b } = En(() => ({
1172
+ }), d = O(() => !!a.value && n.isExternal(a.value)), i = O(() => {
1173
+ const w = H(t);
1174
+ return typeof w != "string" || M(w) ? H(e) : H(r);
1175
+ }), { element: m, commit: b } = Bn(() => ({
1036
1176
  route: o.value,
1037
1177
  routerPrefetch: n.prefetch,
1038
- linkPrefetch: c.value.prefetch
1039
- })), L = (w) => {
1178
+ linkPrefetch: i.value.prefetch
1179
+ })), U = (w) => {
1040
1180
  b();
1041
- const m = {
1042
- replace: (w == null ? void 0 : w.replace) ?? c.value.replace,
1043
- query: st(c.value.query, w == null ? void 0 : w.query),
1044
- hash: (w == null ? void 0 : w.hash) ?? c.value.hash,
1045
- state: { ...c.value.state, ...w == null ? void 0 : w.state }
1046
- }, h = $(e);
1047
- return M(h) || typeof h == "object" ? n.push(h, m) : n.push(h, $(t), m);
1181
+ const y = {
1182
+ replace: (w == null ? void 0 : w.replace) ?? i.value.replace,
1183
+ query: he(i.value.query, w == null ? void 0 : w.query),
1184
+ hash: (w == null ? void 0 : w.hash) ?? i.value.hash,
1185
+ state: { ...i.value.state, ...w == null ? void 0 : w.state }
1186
+ }, p = H(t);
1187
+ return M(p) || typeof p == "object" ? n.push(p, y) : n.push(p, H(e), y);
1048
1188
  };
1049
1189
  return {
1050
- element: y,
1190
+ element: m,
1051
1191
  route: o,
1052
1192
  href: a,
1053
1193
  isMatch: s,
1054
1194
  isExactMatch: l,
1055
- isExternal: p,
1056
- push: L,
1057
- replace: (w) => L({ ...w, replace: !0 })
1195
+ isExternal: d,
1196
+ push: U,
1197
+ replace: (w) => U({ ...w, replace: !0 })
1058
1198
  };
1059
1199
  }
1060
- const kn = ["href"], xn = /* @__PURE__ */ me({
1200
+ const jn = ["href"], $n = /* @__PURE__ */ Rt({
1061
1201
  __name: "routerLink",
1062
1202
  props: {
1063
1203
  to: {},
@@ -1067,136 +1207,136 @@ const kn = ["href"], xn = /* @__PURE__ */ me({
1067
1207
  replace: { type: Boolean },
1068
1208
  state: {}
1069
1209
  },
1070
- setup(e) {
1071
- const t = e, r = Ge(), n = Z(() => L(t.to)), o = Z(() => S(t.to)), a = Z(() => {
1072
- const { to: m, ...h } = t;
1073
- return h;
1074
- }), { element: s, isMatch: l, isExactMatch: p, isExternal: c, push: y } = An(() => typeof t.to == "function" ? t.to(r.resolve) : t.to, a), b = Z(() => ({
1210
+ setup(t) {
1211
+ const e = t, r = ee(), n = O(() => U(e.to)), o = O(() => P(e.to)), a = O(() => {
1212
+ const { to: y, ...p } = e;
1213
+ return p;
1214
+ }), { element: s, isMatch: l, isExactMatch: d, isExternal: i, push: m } = On(() => typeof e.to == "function" ? e.to(r.resolve) : e.to, a), b = O(() => ({
1075
1215
  "router-link--match": l.value,
1076
- "router-link--exact-match": p.value
1216
+ "router-link--exact-match": d.value
1077
1217
  }));
1078
- function L(m) {
1079
- if (typeof m == "function") {
1080
- const h = m(r.resolve);
1081
- return L(h);
1218
+ function U(y) {
1219
+ if (typeof y == "function") {
1220
+ const p = y(r.resolve);
1221
+ return U(p);
1082
1222
  }
1083
- return M(m) ? r.find(m) : m;
1223
+ return M(y) ? r.find(y) : y;
1084
1224
  }
1085
- function S(m) {
1086
- if (typeof m == "function") {
1087
- const h = m(r.resolve);
1088
- return S(h);
1225
+ function P(y) {
1226
+ if (typeof y == "function") {
1227
+ const p = y(r.resolve);
1228
+ return P(p);
1089
1229
  }
1090
- return M(m) ? m : m == null ? void 0 : m.href;
1230
+ return M(y) ? y : y == null ? void 0 : y.href;
1091
1231
  }
1092
- function w(m) {
1093
- m.preventDefault(), y();
1232
+ function w(y) {
1233
+ y.preventDefault(), m();
1094
1234
  }
1095
- return (m, h) => (kt(), Ur("a", {
1235
+ return (y, p) => (Ze(), jr("a", {
1096
1236
  ref_key: "element",
1097
1237
  ref: s,
1098
1238
  href: o.value,
1099
- class: Lr(["router-link", b.value]),
1239
+ class: $r(["router-link", b.value]),
1100
1240
  onClick: w
1101
1241
  }, [
1102
- xt(m.$slots, "default", Ut(Br({ route: n.value, isMatch: Re(l), isExactMatch: Re(p), isExternal: Re(c) })))
1103
- ], 10, kn));
1242
+ Oe(y.$slots, "default", je(Hr({ route: n.value, isMatch: vt(l), isExactMatch: vt(d), isExternal: vt(i) })))
1243
+ ], 10, jn));
1104
1244
  }
1105
- }), sr = Symbol();
1106
- function Un() {
1107
- const e = ae(sr);
1108
- if (!e)
1109
- throw new ye();
1110
- return e;
1245
+ }), hr = Symbol();
1246
+ function Hn() {
1247
+ const t = st(hr);
1248
+ if (!t)
1249
+ throw new wt();
1250
+ return t;
1111
1251
  }
1112
- function cr(e, t) {
1113
- const r = Ge();
1252
+ function yr(t, e) {
1253
+ const r = ee();
1114
1254
  function n() {
1115
- if (!e)
1255
+ if (!t)
1116
1256
  return;
1117
- if (!ar(r.route, e, t))
1118
- throw new _r(e, r.route.name);
1257
+ if (!dr(r.route, t, e))
1258
+ throw new Wr(t, r.route.name);
1119
1259
  }
1120
- return te(r.route, n, { immediate: !0, deep: !0 }), r.route;
1260
+ return rt(r.route, n, { immediate: !0, deep: !0 }), r.route;
1121
1261
  }
1122
- const ir = Symbol();
1123
- function ct() {
1124
- return ae(ir, 0);
1262
+ const mr = Symbol();
1263
+ function ye() {
1264
+ return st(mr, 0);
1125
1265
  }
1126
- function Ln(e, t, r) {
1127
- return me({
1266
+ function _n(t, e, r) {
1267
+ return Rt({
1128
1268
  name: "PropsWrapper",
1129
1269
  expose: [],
1130
1270
  setup() {
1131
- const n = Cr(), o = rr(), a = cr();
1271
+ const n = _r(), o = fr(), a = yr();
1132
1272
  return () => {
1133
- const s = o.getProps(e.id, t, a);
1134
- return s instanceof Error ? "" : Xt(s) ? n != null && n.suspense ? ue(Cn, { component: r, props: s }) : ue(Bn, { component: r, props: s }) : ue(r, s);
1273
+ const s = o.getProps(t.id, e, a);
1274
+ return s instanceof Error ? "" : re(s) ? n != null && n.suspense ? pt(In, { component: r, props: s }) : pt(qn, { component: r, props: s }) : pt(r, s);
1135
1275
  };
1136
1276
  }
1137
1277
  });
1138
1278
  }
1139
- const Bn = me((e) => {
1140
- const t = je();
1141
- return te(() => e.props, async (r) => {
1142
- t.value = await r;
1143
- }, { immediate: !0, deep: !0 }), () => t.value instanceof Error ? "" : t.value ? ue(e.component, t.value) : "";
1279
+ const qn = Rt((t) => {
1280
+ const e = qt();
1281
+ return rt(() => t.props, async (r) => {
1282
+ e.value = await r;
1283
+ }, { immediate: !0, deep: !0 }), () => e.value instanceof Error ? "" : e.value ? pt(t.component, e.value) : "";
1144
1284
  }, {
1145
1285
  props: ["component", "props"]
1146
- }), Cn = me(async (e) => {
1147
- const t = je();
1148
- return t.value = await e.props, te(() => t.value, async (r) => {
1149
- t.value = await r;
1150
- }, { deep: !0 }), () => t.value instanceof Error ? "" : t.value ? ue(e.component, t.value) : "";
1286
+ }), In = Rt(async (t) => {
1287
+ const e = qt();
1288
+ return e.value = await t.props, rt(() => e.value, async (r) => {
1289
+ e.value = await r;
1290
+ }, { deep: !0 }), () => e.value instanceof Error ? "" : e.value ? pt(t.component, e.value) : "";
1151
1291
  }, {
1152
1292
  props: ["component", "props"]
1153
- }), ur = Symbol();
1154
- function Nn() {
1155
- const e = /* @__PURE__ */ new Map();
1293
+ }), gr = Symbol();
1294
+ function Jn() {
1295
+ const t = /* @__PURE__ */ new Map();
1156
1296
  return {
1157
1297
  getRouteComponents: (r) => {
1158
- const n = e.get(r.id);
1298
+ const n = t.get(r.id);
1159
1299
  if (n)
1160
1300
  return n;
1161
- const o = Vn(r);
1162
- return e.set(r.id, o), o;
1301
+ const o = Dn(r);
1302
+ return t.set(r.id, o), o;
1163
1303
  }
1164
1304
  };
1165
1305
  }
1166
- function Vn(e) {
1167
- return Jt(e) ? yt(e, e.components) : Mt(e) ? yt(e, { default: e.component }) : { default: fr };
1306
+ function Dn(t) {
1307
+ return er(t) ? Pe(t, t.components) : tr(t) ? Pe(t, { default: t.component }) : { default: Rr };
1168
1308
  }
1169
- function yt(e, t) {
1309
+ function Pe(t, e) {
1170
1310
  return Object.fromEntries(
1171
- Object.entries(t).map(([r, n]) => [r, Ln(e, r, n)])
1311
+ Object.entries(e).map(([r, n]) => [r, _n(t, r, n)])
1172
1312
  );
1173
1313
  }
1174
- function Zn() {
1175
- const e = ae(ur);
1176
- if (!e)
1177
- throw new ye();
1178
- return e;
1314
+ function Fn() {
1315
+ const t = st(gr);
1316
+ if (!t)
1317
+ throw new wt();
1318
+ return t;
1179
1319
  }
1180
- const fr = /* @__PURE__ */ me({
1320
+ const Rr = /* @__PURE__ */ Rt({
1181
1321
  __name: "routerView",
1182
1322
  props: {
1183
1323
  name: { default: "default" }
1184
1324
  },
1185
- setup(e) {
1186
- const t = cr(), r = Un(), n = ct(), { getRouteComponents: o } = Zn();
1187
- Nr(ir, n + 1);
1188
- const a = Z(() => {
1325
+ setup(t) {
1326
+ const e = yr(), r = Hn(), n = ye(), { getRouteComponents: o } = Fn();
1327
+ qr(mr, n + 1);
1328
+ const a = O(() => {
1189
1329
  if (r.value)
1190
1330
  return r.value.component;
1191
- const s = t.matches.at(n);
1192
- return s ? o(s)[e.name] : null;
1331
+ const s = e.matches.at(n);
1332
+ return s ? o(s)[t.name] : null;
1193
1333
  });
1194
- return (s, l) => a.value ? xt(s.$slots, "default", Ut(Zr({ key: 0 }, { route: Re(t), component: a.value, rejection: Re(r) })), () => [
1195
- (kt(), jr(Or(a.value)))
1196
- ]) : Vr("", !0);
1334
+ return (s, l) => a.value ? Oe(s.$slots, "default", je(Jr({ key: 0 }, { route: vt(e), component: a.value, rejection: vt(r) })), () => [
1335
+ (Ze(), Dr(Fr(a.value)))
1336
+ ]) : Ir("", !0);
1197
1337
  }
1198
1338
  });
1199
- class oe {
1339
+ class at {
1200
1340
  constructor() {
1201
1341
  T(this, "onBeforeRouteEnter", /* @__PURE__ */ new Set());
1202
1342
  T(this, "onBeforeRouteUpdate", /* @__PURE__ */ new Set());
@@ -1206,73 +1346,73 @@ class oe {
1206
1346
  T(this, "onAfterRouteLeave", /* @__PURE__ */ new Set());
1207
1347
  }
1208
1348
  }
1209
- const Ee = (e, t, r) => {
1349
+ const Pt = (t, e, r) => {
1210
1350
  var a, s;
1211
- const n = e.matches, o = (t == null ? void 0 : t.matches) ?? [];
1351
+ const n = t.matches, o = (e == null ? void 0 : e.matches) ?? [];
1212
1352
  return ((a = n.at(r)) == null ? void 0 : a.id) !== ((s = o.at(r)) == null ? void 0 : s.id);
1213
- }, be = (e, t, r) => {
1353
+ }, At = (t, e, r) => {
1214
1354
  var a, s;
1215
- const n = e.matches, o = (t == null ? void 0 : t.matches) ?? [];
1355
+ const n = t.matches, o = (e == null ? void 0 : e.matches) ?? [];
1216
1356
  return ((a = n.at(r)) == null ? void 0 : a.id) !== ((s = o.at(r)) == null ? void 0 : s.id);
1217
- }, Pe = (e, t, r) => {
1357
+ }, kt = (t, e, r) => {
1218
1358
  var n, o;
1219
- return ((n = e.matches.at(r)) == null ? void 0 : n.id) === ((o = t == null ? void 0 : t.matches.at(r)) == null ? void 0 : o.id);
1359
+ return ((n = t.matches.at(r)) == null ? void 0 : n.id) === ((o = e == null ? void 0 : e.matches.at(r)) == null ? void 0 : o.id);
1220
1360
  };
1221
- function gt(e) {
1222
- switch (e) {
1361
+ function Ae(t) {
1362
+ switch (t) {
1223
1363
  case "onBeforeRouteEnter":
1224
1364
  case "onAfterRouteEnter":
1225
- return Ee;
1365
+ return Pt;
1226
1366
  case "onBeforeRouteUpdate":
1227
1367
  case "onAfterRouteUpdate":
1228
- return Pe;
1368
+ return kt;
1229
1369
  case "onBeforeRouteLeave":
1230
1370
  case "onAfterRouteLeave":
1231
- return be;
1371
+ return At;
1232
1372
  default:
1233
- throw new Error(`Switch is not exhaustive for lifecycle: ${e}`);
1373
+ throw new Error(`Switch is not exhaustive for lifecycle: ${t}`);
1234
1374
  }
1235
1375
  }
1236
- function jn(e, t) {
1237
- const r = new oe();
1238
- return e.matches.forEach((n, o) => {
1239
- n.onBeforeRouteEnter && Ee(e, t, o) && fe(n.onBeforeRouteEnter).forEach((a) => r.onBeforeRouteEnter.add(a)), n.onBeforeRouteUpdate && Pe(e, t, o) && fe(n.onBeforeRouteUpdate).forEach((a) => r.onBeforeRouteUpdate.add(a));
1240
- }), t == null || t.matches.forEach((n, o) => {
1241
- n.onBeforeRouteLeave && be(e, t, o) && fe(n.onBeforeRouteLeave).forEach((a) => r.onBeforeRouteLeave.add(a));
1376
+ function Tn(t, e) {
1377
+ const r = new at();
1378
+ return t.matches.forEach((n, o) => {
1379
+ n.onBeforeRouteEnter && Pt(t, e, o) && dt(n.onBeforeRouteEnter).forEach((a) => r.onBeforeRouteEnter.add(a)), n.onBeforeRouteUpdate && kt(t, e, o) && dt(n.onBeforeRouteUpdate).forEach((a) => r.onBeforeRouteUpdate.add(a));
1380
+ }), e == null || e.matches.forEach((n, o) => {
1381
+ n.onBeforeRouteLeave && At(t, e, o) && dt(n.onBeforeRouteLeave).forEach((a) => r.onBeforeRouteLeave.add(a));
1242
1382
  }), r;
1243
1383
  }
1244
- function On(e, t) {
1245
- const r = new oe();
1246
- return e.matches.forEach((n, o) => {
1247
- n.onAfterRouteEnter && Ee(e, t, o) && fe(n.onAfterRouteEnter).forEach((a) => r.onAfterRouteEnter.add(a)), n.onAfterRouteUpdate && Pe(e, t, o) && fe(n.onAfterRouteUpdate).forEach((a) => r.onAfterRouteUpdate.add(a));
1248
- }), t == null || t.matches.forEach((n, o) => {
1249
- n.onAfterRouteLeave && be(e, t, o) && fe(n.onAfterRouteLeave).forEach((a) => r.onAfterRouteLeave.add(a));
1384
+ function Mn(t, e) {
1385
+ const r = new at();
1386
+ return t.matches.forEach((n, o) => {
1387
+ n.onAfterRouteEnter && Pt(t, e, o) && dt(n.onAfterRouteEnter).forEach((a) => r.onAfterRouteEnter.add(a)), n.onAfterRouteUpdate && kt(t, e, o) && dt(n.onAfterRouteUpdate).forEach((a) => r.onAfterRouteUpdate.add(a));
1388
+ }), e == null || e.matches.forEach((n, o) => {
1389
+ n.onAfterRouteLeave && At(t, e, o) && dt(n.onAfterRouteLeave).forEach((a) => r.onAfterRouteLeave.add(a));
1250
1390
  }), r;
1251
1391
  }
1252
- function $n(e, t, r) {
1253
- const n = new oe();
1254
- return e.matches.forEach((o, a) => {
1255
- Ee(e, t, a) && r.onBeforeRouteEnter.forEach((s) => n.onBeforeRouteEnter.add(s)), Pe(e, t, a) && r.onBeforeRouteUpdate.forEach((s) => n.onBeforeRouteUpdate.add(s));
1256
- }), t == null || t.matches.forEach((o, a) => {
1257
- be(e, t, a) && r.onBeforeRouteLeave.forEach((s) => n.onBeforeRouteLeave.add(s));
1392
+ function Wn(t, e, r) {
1393
+ const n = new at();
1394
+ return t.matches.forEach((o, a) => {
1395
+ Pt(t, e, a) && r.onBeforeRouteEnter.forEach((s) => n.onBeforeRouteEnter.add(s)), kt(t, e, a) && r.onBeforeRouteUpdate.forEach((s) => n.onBeforeRouteUpdate.add(s));
1396
+ }), e == null || e.matches.forEach((o, a) => {
1397
+ At(t, e, a) && r.onBeforeRouteLeave.forEach((s) => n.onBeforeRouteLeave.add(s));
1258
1398
  }), n;
1259
1399
  }
1260
- function Hn(e, t, r) {
1261
- const n = new oe();
1262
- return e.matches.forEach((o, a) => {
1263
- Ee(e, t, a) && r.onAfterRouteEnter.forEach((s) => n.onAfterRouteEnter.add(s)), Pe(e, t, a) && r.onAfterRouteUpdate.forEach((s) => n.onAfterRouteUpdate.add(s));
1264
- }), t == null || t.matches.forEach((o, a) => {
1265
- be(e, t, a) && r.onAfterRouteLeave.forEach((s) => n.onAfterRouteLeave.add(s));
1400
+ function Gn(t, e, r) {
1401
+ const n = new at();
1402
+ return t.matches.forEach((o, a) => {
1403
+ Pt(t, e, a) && r.onAfterRouteEnter.forEach((s) => n.onAfterRouteEnter.add(s)), kt(t, e, a) && r.onAfterRouteUpdate.forEach((s) => n.onAfterRouteUpdate.add(s));
1404
+ }), e == null || e.matches.forEach((o, a) => {
1405
+ At(t, e, a) && r.onAfterRouteLeave.forEach((s) => n.onAfterRouteLeave.add(s));
1266
1406
  }), n;
1267
1407
  }
1268
- const lr = Symbol();
1269
- function _n() {
1270
- const { setVueApp: e, runWithContext: t } = er(), r = {
1271
- global: new oe(),
1272
- component: new oe()
1273
- }, { reject: n, push: o, replace: a, abort: s } = Yt(), l = (f) => (r.global.onBeforeRouteEnter.add(f), () => r.global.onBeforeRouteEnter.delete(f)), p = (f) => (r.global.onBeforeRouteUpdate.add(f), () => r.global.onBeforeRouteUpdate.delete(f)), c = (f) => (r.global.onBeforeRouteLeave.add(f), () => r.global.onBeforeRouteLeave.delete(f)), y = (f) => (r.global.onAfterRouteEnter.add(f), () => r.global.onAfterRouteEnter.delete(f)), b = (f) => (r.global.onAfterRouteUpdate.add(f), () => r.global.onAfterRouteUpdate.delete(f)), L = (f) => (r.global.onAfterRouteLeave.add(f), () => r.global.onAfterRouteLeave.delete(f));
1274
- async function S({ to: f, from: i }) {
1275
- const { global: E, component: k } = r, A = jn(f, i), g = $n(f, i, E), u = [
1408
+ const wr = Symbol();
1409
+ function zn() {
1410
+ const { setVueApp: t, runWithContext: e } = cr(), r = {
1411
+ global: new at(),
1412
+ component: new at()
1413
+ }, { reject: n, push: o, replace: a, abort: s } = ir(), l = (f) => (r.global.onBeforeRouteEnter.add(f), () => r.global.onBeforeRouteEnter.delete(f)), d = (f) => (r.global.onBeforeRouteUpdate.add(f), () => r.global.onBeforeRouteUpdate.delete(f)), i = (f) => (r.global.onBeforeRouteLeave.add(f), () => r.global.onBeforeRouteLeave.delete(f)), m = (f) => (r.global.onAfterRouteEnter.add(f), () => r.global.onAfterRouteEnter.delete(f)), b = (f) => (r.global.onAfterRouteUpdate.add(f), () => r.global.onAfterRouteUpdate.delete(f)), U = (f) => (r.global.onAfterRouteLeave.add(f), () => r.global.onAfterRouteLeave.delete(f));
1414
+ async function P({ to: f, from: c }) {
1415
+ const { global: v, component: k } = r, A = Tn(f, c), g = Wn(f, c, v), u = [
1276
1416
  ...g.onBeforeRouteEnter,
1277
1417
  ...A.onBeforeRouteEnter,
1278
1418
  ...g.onBeforeRouteUpdate,
@@ -1283,25 +1423,25 @@ function _n() {
1283
1423
  ...k.onBeforeRouteLeave
1284
1424
  ];
1285
1425
  try {
1286
- const d = u.map((x) => t(() => x(f, {
1287
- from: i,
1426
+ const h = u.map((x) => e(() => x(f, {
1427
+ from: c,
1288
1428
  reject: n,
1289
1429
  push: o,
1290
1430
  replace: a,
1291
1431
  abort: s
1292
1432
  })));
1293
- await Promise.all(d);
1294
- } catch (d) {
1295
- if (d instanceof le || d instanceof Ue || d instanceof Kt)
1296
- return d.response;
1297
- throw d;
1433
+ await Promise.all(h);
1434
+ } catch (h) {
1435
+ if (h instanceof ht || h instanceof Vt || h instanceof sr)
1436
+ return h.response;
1437
+ throw h;
1298
1438
  }
1299
1439
  return {
1300
1440
  status: "SUCCESS"
1301
1441
  };
1302
1442
  }
1303
- async function w({ to: f, from: i }) {
1304
- const { global: E, component: k } = r, A = On(f, i), g = Hn(f, i, E), u = [
1443
+ async function w({ to: f, from: c }) {
1444
+ const { global: v, component: k } = r, A = Mn(f, c), g = Gn(f, c, v), u = [
1305
1445
  ...k.onAfterRouteLeave,
1306
1446
  ...A.onAfterRouteLeave,
1307
1447
  ...g.onAfterRouteLeave,
@@ -1313,129 +1453,129 @@ function _n() {
1313
1453
  ...g.onAfterRouteEnter
1314
1454
  ];
1315
1455
  try {
1316
- const d = u.map((x) => t(() => x(f, {
1317
- from: i,
1456
+ const h = u.map((x) => e(() => x(f, {
1457
+ from: c,
1318
1458
  reject: n,
1319
1459
  push: o,
1320
1460
  replace: a
1321
1461
  })));
1322
- await Promise.all(d);
1323
- } catch (d) {
1324
- if (d instanceof le || d instanceof Ue)
1325
- return d.response;
1326
- throw d;
1462
+ await Promise.all(h);
1463
+ } catch (h) {
1464
+ if (h instanceof ht || h instanceof Vt)
1465
+ return h.response;
1466
+ throw h;
1327
1467
  }
1328
1468
  return {
1329
1469
  status: "SUCCESS"
1330
1470
  };
1331
1471
  }
1332
1472
  return {
1333
- runBeforeRouteHooks: S,
1473
+ runBeforeRouteHooks: P,
1334
1474
  runAfterRouteHooks: w,
1335
- addComponentBeforeRouteHook: ({ lifecycle: f, depth: i, hook: E }) => {
1336
- const k = gt(f), A = r.component[f], g = (u, d) => {
1337
- if (k(u, d.from, i))
1338
- return E(u, d);
1475
+ addComponentBeforeRouteHook: ({ lifecycle: f, depth: c, hook: v }) => {
1476
+ const k = Ae(f), A = r.component[f], g = (u, h) => {
1477
+ if (k(u, h.from, c))
1478
+ return v(u, h);
1339
1479
  };
1340
1480
  return A.add(g), () => A.delete(g);
1341
1481
  },
1342
- addComponentAfterRouteHook: ({ lifecycle: f, depth: i, hook: E }) => {
1343
- const k = gt(f), A = r.component[f], g = (u, d) => {
1344
- if (k(u, d.from, i))
1345
- return E(u, d);
1482
+ addComponentAfterRouteHook: ({ lifecycle: f, depth: c, hook: v }) => {
1483
+ const k = Ae(f), A = r.component[f], g = (u, h) => {
1484
+ if (k(u, h.from, c))
1485
+ return v(u, h);
1346
1486
  };
1347
1487
  return A.add(g), () => A.delete(g);
1348
1488
  },
1349
1489
  addGlobalRouteHooks: (f) => {
1350
- f.onBeforeRouteEnter.forEach((i) => l(i)), f.onBeforeRouteUpdate.forEach((i) => p(i)), f.onBeforeRouteLeave.forEach((i) => c(i)), f.onAfterRouteEnter.forEach((i) => y(i)), f.onAfterRouteUpdate.forEach((i) => b(i)), f.onAfterRouteLeave.forEach((i) => L(i));
1490
+ f.onBeforeRouteEnter.forEach((c) => l(c)), f.onBeforeRouteUpdate.forEach((c) => d(c)), f.onBeforeRouteLeave.forEach((c) => i(c)), f.onAfterRouteEnter.forEach((c) => m(c)), f.onAfterRouteUpdate.forEach((c) => b(c)), f.onAfterRouteLeave.forEach((c) => U(c));
1351
1491
  },
1352
1492
  onBeforeRouteEnter: l,
1353
- onBeforeRouteUpdate: p,
1354
- onBeforeRouteLeave: c,
1355
- onAfterRouteEnter: y,
1493
+ onBeforeRouteUpdate: d,
1494
+ onBeforeRouteLeave: i,
1495
+ onAfterRouteEnter: m,
1356
1496
  onAfterRouteUpdate: b,
1357
- onAfterRouteLeave: L,
1358
- setVueApp: e
1497
+ onAfterRouteLeave: U,
1498
+ setVueApp: t
1359
1499
  };
1360
1500
  }
1361
- function hr() {
1362
- const e = ae(lr);
1363
- if (!e)
1364
- throw new ye();
1365
- return e;
1501
+ function Er() {
1502
+ const t = st(wr);
1503
+ if (!t)
1504
+ throw new wt();
1505
+ return t;
1366
1506
  }
1367
- function pr(e) {
1368
- return (t) => {
1369
- const r = ct(), o = hr().addComponentBeforeRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
1370
- return Ze(o), o;
1507
+ function vr(t) {
1508
+ return (e) => {
1509
+ const r = ye(), o = Er().addComponentBeforeRouteHook({ lifecycle: t, hook: e, depth: r - 1 });
1510
+ return _t(o), o;
1371
1511
  };
1372
1512
  }
1373
- function dr(e) {
1374
- return (t) => {
1375
- const r = ct(), o = hr().addComponentAfterRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
1376
- return Ze(o), o;
1513
+ function br(t) {
1514
+ return (e) => {
1515
+ const r = ye(), o = Er().addComponentAfterRouteHook({ lifecycle: t, hook: e, depth: r - 1 });
1516
+ return _t(o), o;
1377
1517
  };
1378
1518
  }
1379
- const xo = pr("onBeforeRouteLeave"), Uo = pr("onBeforeRouteUpdate"), Lo = dr("onAfterRouteLeave"), Bo = dr("onAfterRouteUpdate");
1380
- function K() {
1381
- return K = Object.assign ? Object.assign.bind() : function(e) {
1382
- for (var t = 1; t < arguments.length; t++) {
1383
- var r = arguments[t];
1384
- for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
1519
+ const $o = vr("onBeforeRouteLeave"), Ho = vr("onBeforeRouteUpdate"), _o = br("onAfterRouteLeave"), qo = br("onAfterRouteUpdate");
1520
+ function Y() {
1521
+ return Y = Object.assign ? Object.assign.bind() : function(t) {
1522
+ for (var e = 1; e < arguments.length; e++) {
1523
+ var r = arguments[e];
1524
+ for (var n in r) ({}).hasOwnProperty.call(r, n) && (t[n] = r[n]);
1385
1525
  }
1386
- return e;
1387
- }, K.apply(null, arguments);
1526
+ return t;
1527
+ }, Y.apply(null, arguments);
1388
1528
  }
1389
1529
  var j;
1390
- (function(e) {
1391
- e.Pop = "POP", e.Push = "PUSH", e.Replace = "REPLACE";
1530
+ (function(t) {
1531
+ t.Pop = "POP", t.Push = "PUSH", t.Replace = "REPLACE";
1392
1532
  })(j || (j = {}));
1393
- var pe = process.env.NODE_ENV !== "production" ? function(e) {
1394
- return Object.freeze(e);
1395
- } : function(e) {
1396
- return e;
1533
+ var mt = process.env.NODE_ENV !== "production" ? function(t) {
1534
+ return Object.freeze(t);
1535
+ } : function(t) {
1536
+ return t;
1397
1537
  };
1398
- function X(e, t) {
1399
- if (!e) {
1400
- typeof console < "u" && console.warn(t);
1538
+ function tt(t, e) {
1539
+ if (!t) {
1540
+ typeof console < "u" && console.warn(e);
1401
1541
  try {
1402
- throw new Error(t);
1542
+ throw new Error(e);
1403
1543
  } catch {
1404
1544
  }
1405
1545
  }
1406
1546
  }
1407
- var Le = "beforeunload", qn = "hashchange", mr = "popstate";
1408
- function Rt(e) {
1409
- e === void 0 && (e = {});
1410
- var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
1547
+ var Zt = "beforeunload", Qn = "hashchange", Sr = "popstate";
1548
+ function ke(t) {
1549
+ t === void 0 && (t = {});
1550
+ var e = t, r = e.window, n = r === void 0 ? document.defaultView : r, o = n.history;
1411
1551
  function a() {
1412
- var g = n.location, u = g.pathname, d = g.search, x = g.hash, U = o.state || {};
1413
- return [U.idx, pe({
1552
+ var g = n.location, u = g.pathname, h = g.search, x = g.hash, N = o.state || {};
1553
+ return [N.idx, mt({
1414
1554
  pathname: u,
1415
- search: d,
1555
+ search: h,
1416
1556
  hash: x,
1417
- state: U.usr || null,
1418
- key: U.key || "default"
1557
+ state: N.usr || null,
1558
+ key: N.key || "default"
1419
1559
  })];
1420
1560
  }
1421
1561
  var s = null;
1422
1562
  function l() {
1423
1563
  if (s)
1424
- S.call(s), s = null;
1564
+ P.call(s), s = null;
1425
1565
  else {
1426
- var g = j.Pop, u = a(), d = u[0], x = u[1];
1427
- if (S.length)
1428
- if (d != null) {
1429
- var U = y - d;
1430
- U && (s = {
1566
+ var g = j.Pop, u = a(), h = u[0], x = u[1];
1567
+ if (P.length)
1568
+ if (h != null) {
1569
+ var N = m - h;
1570
+ N && (s = {
1431
1571
  action: g,
1432
1572
  location: x,
1433
1573
  retry: function() {
1434
- k(U * -1);
1574
+ k(N * -1);
1435
1575
  }
1436
- }, k(U));
1576
+ }, k(N));
1437
1577
  } else
1438
- process.env.NODE_ENV !== "production" && X(
1578
+ process.env.NODE_ENV !== "production" && tt(
1439
1579
  !1,
1440
1580
  // TODO: Write up a doc that explains our blocking strategy in
1441
1581
  // detail and link to it here so people can understand better what
@@ -1446,69 +1586,69 @@ function Rt(e) {
1446
1586
  f(g);
1447
1587
  }
1448
1588
  }
1449
- n.addEventListener(mr, l);
1450
- var p = j.Pop, c = a(), y = c[0], b = c[1], L = de(), S = de();
1451
- y == null && (y = 0, o.replaceState(K({}, o.state, {
1452
- idx: y
1589
+ n.addEventListener(Sr, l);
1590
+ var d = j.Pop, i = a(), m = i[0], b = i[1], U = gt(), P = gt();
1591
+ m == null && (m = 0, o.replaceState(Y({}, o.state, {
1592
+ idx: m
1453
1593
  }), ""));
1454
1594
  function w(g) {
1455
- return typeof g == "string" ? g : ee(g);
1595
+ return typeof g == "string" ? g : et(g);
1456
1596
  }
1457
- function m(g, u) {
1458
- return u === void 0 && (u = null), pe(K({
1597
+ function y(g, u) {
1598
+ return u === void 0 && (u = null), mt(Y({
1459
1599
  pathname: b.pathname,
1460
1600
  hash: "",
1461
1601
  search: ""
1462
- }, typeof g == "string" ? we(g) : g, {
1602
+ }, typeof g == "string" ? bt(g) : g, {
1463
1603
  state: u,
1464
- key: Ce()
1604
+ key: jt()
1465
1605
  }));
1466
1606
  }
1467
- function h(g, u) {
1607
+ function p(g, u) {
1468
1608
  return [{
1469
1609
  usr: g.state,
1470
1610
  key: g.key,
1471
1611
  idx: u
1472
1612
  }, w(g)];
1473
1613
  }
1474
- function R(g, u, d) {
1475
- return !S.length || (S.call({
1614
+ function R(g, u, h) {
1615
+ return !P.length || (P.call({
1476
1616
  action: g,
1477
1617
  location: u,
1478
- retry: d
1618
+ retry: h
1479
1619
  }), !1);
1480
1620
  }
1481
1621
  function f(g) {
1482
- p = g;
1622
+ d = g;
1483
1623
  var u = a();
1484
- y = u[0], b = u[1], L.call({
1485
- action: p,
1624
+ m = u[0], b = u[1], U.call({
1625
+ action: d,
1486
1626
  location: b
1487
1627
  });
1488
1628
  }
1489
- function i(g, u) {
1490
- var d = j.Push, x = m(g, u);
1491
- function U() {
1492
- i(g, u);
1629
+ function c(g, u) {
1630
+ var h = j.Push, x = y(g, u);
1631
+ function N() {
1632
+ c(g, u);
1493
1633
  }
1494
- if (R(d, x, U)) {
1495
- var C = h(x, y + 1), V = C[0], O = C[1];
1634
+ if (R(h, x, N)) {
1635
+ var V = p(x, m + 1), Z = V[0], $ = V[1];
1496
1636
  try {
1497
- o.pushState(V, "", O);
1637
+ o.pushState(Z, "", $);
1498
1638
  } catch {
1499
- n.location.assign(O);
1639
+ n.location.assign($);
1500
1640
  }
1501
- f(d);
1641
+ f(h);
1502
1642
  }
1503
1643
  }
1504
- function E(g, u) {
1505
- var d = j.Replace, x = m(g, u);
1506
- function U() {
1507
- E(g, u);
1644
+ function v(g, u) {
1645
+ var h = j.Replace, x = y(g, u);
1646
+ function N() {
1647
+ v(g, u);
1508
1648
  }
1509
- if (R(d, x, U)) {
1510
- var C = h(x, y), V = C[0], O = C[1];
1511
- o.replaceState(V, "", O), f(d);
1649
+ if (R(h, x, N)) {
1650
+ var V = p(x, m), Z = V[0], $ = V[1];
1651
+ o.replaceState(Z, "", $), f(h);
1512
1652
  }
1513
1653
  }
1514
1654
  function k(g) {
@@ -1516,14 +1656,14 @@ function Rt(e) {
1516
1656
  }
1517
1657
  var A = {
1518
1658
  get action() {
1519
- return p;
1659
+ return d;
1520
1660
  },
1521
1661
  get location() {
1522
1662
  return b;
1523
1663
  },
1524
1664
  createHref: w,
1525
- push: i,
1526
- replace: E,
1665
+ push: c,
1666
+ replace: v,
1527
1667
  go: k,
1528
1668
  back: function() {
1529
1669
  k(-1);
@@ -1532,48 +1672,48 @@ function Rt(e) {
1532
1672
  k(1);
1533
1673
  },
1534
1674
  listen: function(u) {
1535
- return L.push(u);
1675
+ return U.push(u);
1536
1676
  },
1537
1677
  block: function(u) {
1538
- var d = S.push(u);
1539
- return S.length === 1 && n.addEventListener(Le, Be), function() {
1540
- d(), S.length || n.removeEventListener(Le, Be);
1678
+ var h = P.push(u);
1679
+ return P.length === 1 && n.addEventListener(Zt, Ot), function() {
1680
+ h(), P.length || n.removeEventListener(Zt, Ot);
1541
1681
  };
1542
1682
  }
1543
1683
  };
1544
1684
  return A;
1545
1685
  }
1546
- function In(e) {
1547
- e === void 0 && (e = {});
1548
- var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
1686
+ function Kn(t) {
1687
+ t === void 0 && (t = {});
1688
+ var e = t, r = e.window, n = r === void 0 ? document.defaultView : r, o = n.history;
1549
1689
  function a() {
1550
- var u = we(n.location.hash.substr(1)), d = u.pathname, x = d === void 0 ? "/" : d, U = u.search, C = U === void 0 ? "" : U, V = u.hash, O = V === void 0 ? "" : V, q = o.state || {};
1551
- return [q.idx, pe({
1690
+ var u = bt(n.location.hash.substr(1)), h = u.pathname, x = h === void 0 ? "/" : h, N = u.search, V = N === void 0 ? "" : N, Z = u.hash, $ = Z === void 0 ? "" : Z, I = o.state || {};
1691
+ return [I.idx, mt({
1552
1692
  pathname: x,
1553
- search: C,
1554
- hash: O,
1555
- state: q.usr || null,
1556
- key: q.key || "default"
1693
+ search: V,
1694
+ hash: $,
1695
+ state: I.usr || null,
1696
+ key: I.key || "default"
1557
1697
  })];
1558
1698
  }
1559
1699
  var s = null;
1560
1700
  function l() {
1561
1701
  if (s)
1562
- S.call(s), s = null;
1702
+ P.call(s), s = null;
1563
1703
  else {
1564
- var u = j.Pop, d = a(), x = d[0], U = d[1];
1565
- if (S.length)
1704
+ var u = j.Pop, h = a(), x = h[0], N = h[1];
1705
+ if (P.length)
1566
1706
  if (x != null) {
1567
- var C = y - x;
1568
- C && (s = {
1707
+ var V = m - x;
1708
+ V && (s = {
1569
1709
  action: u,
1570
- location: U,
1710
+ location: N,
1571
1711
  retry: function() {
1572
- A(C * -1);
1712
+ A(V * -1);
1573
1713
  }
1574
- }, A(C));
1714
+ }, A(V));
1575
1715
  } else
1576
- process.env.NODE_ENV !== "production" && X(
1716
+ process.env.NODE_ENV !== "production" && tt(
1577
1717
  !1,
1578
1718
  // TODO: Write up a doc that explains our blocking strategy in
1579
1719
  // detail and link to it here so people can understand better
@@ -1581,83 +1721,83 @@ function In(e) {
1581
1721
  "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."
1582
1722
  );
1583
1723
  else
1584
- i(u);
1724
+ c(u);
1585
1725
  }
1586
1726
  }
1587
- n.addEventListener(mr, l), n.addEventListener(qn, function() {
1588
- var u = a(), d = u[1];
1589
- ee(d) !== ee(b) && l();
1727
+ n.addEventListener(Sr, l), n.addEventListener(Qn, function() {
1728
+ var u = a(), h = u[1];
1729
+ et(h) !== et(b) && l();
1590
1730
  });
1591
- var p = j.Pop, c = a(), y = c[0], b = c[1], L = de(), S = de();
1592
- y == null && (y = 0, o.replaceState(K({}, o.state, {
1593
- idx: y
1731
+ var d = j.Pop, i = a(), m = i[0], b = i[1], U = gt(), P = gt();
1732
+ m == null && (m = 0, o.replaceState(Y({}, o.state, {
1733
+ idx: m
1594
1734
  }), ""));
1595
1735
  function w() {
1596
- var u = document.querySelector("base"), d = "";
1736
+ var u = document.querySelector("base"), h = "";
1597
1737
  if (u && u.getAttribute("href")) {
1598
- var x = n.location.href, U = x.indexOf("#");
1599
- d = U === -1 ? x : x.slice(0, U);
1738
+ var x = n.location.href, N = x.indexOf("#");
1739
+ h = N === -1 ? x : x.slice(0, N);
1600
1740
  }
1601
- return d;
1741
+ return h;
1602
1742
  }
1603
- function m(u) {
1604
- return w() + "#" + (typeof u == "string" ? u : ee(u));
1743
+ function y(u) {
1744
+ return w() + "#" + (typeof u == "string" ? u : et(u));
1605
1745
  }
1606
- function h(u, d) {
1607
- return d === void 0 && (d = null), pe(K({
1746
+ function p(u, h) {
1747
+ return h === void 0 && (h = null), mt(Y({
1608
1748
  pathname: b.pathname,
1609
1749
  hash: "",
1610
1750
  search: ""
1611
- }, typeof u == "string" ? we(u) : u, {
1612
- state: d,
1613
- key: Ce()
1751
+ }, typeof u == "string" ? bt(u) : u, {
1752
+ state: h,
1753
+ key: jt()
1614
1754
  }));
1615
1755
  }
1616
- function R(u, d) {
1756
+ function R(u, h) {
1617
1757
  return [{
1618
1758
  usr: u.state,
1619
1759
  key: u.key,
1620
- idx: d
1621
- }, m(u)];
1760
+ idx: h
1761
+ }, y(u)];
1622
1762
  }
1623
- function f(u, d, x) {
1624
- return !S.length || (S.call({
1763
+ function f(u, h, x) {
1764
+ return !P.length || (P.call({
1625
1765
  action: u,
1626
- location: d,
1766
+ location: h,
1627
1767
  retry: x
1628
1768
  }), !1);
1629
1769
  }
1630
- function i(u) {
1631
- p = u;
1632
- var d = a();
1633
- y = d[0], b = d[1], L.call({
1634
- action: p,
1770
+ function c(u) {
1771
+ d = u;
1772
+ var h = a();
1773
+ m = h[0], b = h[1], U.call({
1774
+ action: d,
1635
1775
  location: b
1636
1776
  });
1637
1777
  }
1638
- function E(u, d) {
1639
- var x = j.Push, U = h(u, d);
1640
- function C() {
1641
- E(u, d);
1778
+ function v(u, h) {
1779
+ var x = j.Push, N = p(u, h);
1780
+ function V() {
1781
+ v(u, h);
1642
1782
  }
1643
- if (process.env.NODE_ENV !== "production" && X(U.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(u) + ")"), f(x, U, C)) {
1644
- var V = R(U, y + 1), O = V[0], q = V[1];
1783
+ if (process.env.NODE_ENV !== "production" && tt(N.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(u) + ")"), f(x, N, V)) {
1784
+ var Z = R(N, m + 1), $ = Z[0], I = Z[1];
1645
1785
  try {
1646
- o.pushState(O, "", q);
1786
+ o.pushState($, "", I);
1647
1787
  } catch {
1648
- n.location.assign(q);
1788
+ n.location.assign(I);
1649
1789
  }
1650
- i(x);
1790
+ c(x);
1651
1791
  }
1652
1792
  }
1653
- function k(u, d) {
1654
- var x = j.Replace, U = h(u, d);
1655
- function C() {
1656
- k(u, d);
1793
+ function k(u, h) {
1794
+ var x = j.Replace, N = p(u, h);
1795
+ function V() {
1796
+ k(u, h);
1657
1797
  }
1658
- if (process.env.NODE_ENV !== "production" && X(U.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(u) + ")"), f(x, U, C)) {
1659
- var V = R(U, y), O = V[0], q = V[1];
1660
- o.replaceState(O, "", q), i(x);
1798
+ if (process.env.NODE_ENV !== "production" && tt(N.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(u) + ")"), f(x, N, V)) {
1799
+ var Z = R(N, m), $ = Z[0], I = Z[1];
1800
+ o.replaceState($, "", I), c(x);
1661
1801
  }
1662
1802
  }
1663
1803
  function A(u) {
@@ -1665,13 +1805,13 @@ function In(e) {
1665
1805
  }
1666
1806
  var g = {
1667
1807
  get action() {
1668
- return p;
1808
+ return d;
1669
1809
  },
1670
1810
  get location() {
1671
1811
  return b;
1672
1812
  },
1673
- createHref: m,
1674
- push: E,
1813
+ createHref: y,
1814
+ push: v,
1675
1815
  replace: k,
1676
1816
  go: A,
1677
1817
  back: function() {
@@ -1680,76 +1820,76 @@ function In(e) {
1680
1820
  forward: function() {
1681
1821
  A(1);
1682
1822
  },
1683
- listen: function(d) {
1684
- return L.push(d);
1823
+ listen: function(h) {
1824
+ return U.push(h);
1685
1825
  },
1686
- block: function(d) {
1687
- var x = S.push(d);
1688
- return S.length === 1 && n.addEventListener(Le, Be), function() {
1689
- x(), S.length || n.removeEventListener(Le, Be);
1826
+ block: function(h) {
1827
+ var x = P.push(h);
1828
+ return P.length === 1 && n.addEventListener(Zt, Ot), function() {
1829
+ x(), P.length || n.removeEventListener(Zt, Ot);
1690
1830
  };
1691
1831
  }
1692
1832
  };
1693
1833
  return g;
1694
1834
  }
1695
- function wt(e) {
1696
- e === void 0 && (e = {});
1697
- var t = e, r = t.initialEntries, n = r === void 0 ? ["/"] : r, o = t.initialIndex, a = n.map(function(i) {
1698
- var E = pe(K({
1835
+ function xe(t) {
1836
+ t === void 0 && (t = {});
1837
+ var e = t, r = e.initialEntries, n = r === void 0 ? ["/"] : r, o = e.initialIndex, a = n.map(function(c) {
1838
+ var v = mt(Y({
1699
1839
  pathname: "/",
1700
1840
  search: "",
1701
1841
  hash: "",
1702
1842
  state: null,
1703
- key: Ce()
1704
- }, typeof i == "string" ? we(i) : i));
1705
- return process.env.NODE_ENV !== "production" && X(E.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(i) + ")"), E;
1706
- }), s = vt(o ?? a.length - 1, 0, a.length - 1), l = j.Pop, p = a[s], c = de(), y = de();
1707
- function b(i) {
1708
- return typeof i == "string" ? i : ee(i);
1709
- }
1710
- function L(i, E) {
1711
- return E === void 0 && (E = null), pe(K({
1712
- pathname: p.pathname,
1843
+ key: jt()
1844
+ }, typeof c == "string" ? bt(c) : c));
1845
+ return process.env.NODE_ENV !== "production" && tt(v.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(c) + ")"), v;
1846
+ }), s = Ne(o ?? a.length - 1, 0, a.length - 1), l = j.Pop, d = a[s], i = gt(), m = gt();
1847
+ function b(c) {
1848
+ return typeof c == "string" ? c : et(c);
1849
+ }
1850
+ function U(c, v) {
1851
+ return v === void 0 && (v = null), mt(Y({
1852
+ pathname: d.pathname,
1713
1853
  search: "",
1714
1854
  hash: ""
1715
- }, typeof i == "string" ? we(i) : i, {
1716
- state: E,
1717
- key: Ce()
1855
+ }, typeof c == "string" ? bt(c) : c, {
1856
+ state: v,
1857
+ key: jt()
1718
1858
  }));
1719
1859
  }
1720
- function S(i, E, k) {
1721
- return !y.length || (y.call({
1722
- action: i,
1723
- location: E,
1860
+ function P(c, v, k) {
1861
+ return !m.length || (m.call({
1862
+ action: c,
1863
+ location: v,
1724
1864
  retry: k
1725
1865
  }), !1);
1726
1866
  }
1727
- function w(i, E) {
1728
- l = i, p = E, c.call({
1867
+ function w(c, v) {
1868
+ l = c, d = v, i.call({
1729
1869
  action: l,
1730
- location: p
1870
+ location: d
1731
1871
  });
1732
1872
  }
1733
- function m(i, E) {
1734
- var k = j.Push, A = L(i, E);
1873
+ function y(c, v) {
1874
+ var k = j.Push, A = U(c, v);
1735
1875
  function g() {
1736
- m(i, E);
1876
+ y(c, v);
1737
1877
  }
1738
- process.env.NODE_ENV !== "production" && X(p.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(i) + ")"), S(k, A, g) && (s += 1, a.splice(s, a.length, A), w(k, A));
1878
+ process.env.NODE_ENV !== "production" && tt(d.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(c) + ")"), P(k, A, g) && (s += 1, a.splice(s, a.length, A), w(k, A));
1739
1879
  }
1740
- function h(i, E) {
1741
- var k = j.Replace, A = L(i, E);
1880
+ function p(c, v) {
1881
+ var k = j.Replace, A = U(c, v);
1742
1882
  function g() {
1743
- h(i, E);
1883
+ p(c, v);
1744
1884
  }
1745
- process.env.NODE_ENV !== "production" && X(p.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(i) + ")"), S(k, A, g) && (a[s] = A, w(k, A));
1885
+ process.env.NODE_ENV !== "production" && tt(d.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(c) + ")"), P(k, A, g) && (a[s] = A, w(k, A));
1746
1886
  }
1747
- function R(i) {
1748
- var E = vt(s + i, 0, a.length - 1), k = j.Pop, A = a[E];
1887
+ function R(c) {
1888
+ var v = Ne(s + c, 0, a.length - 1), k = j.Pop, A = a[v];
1749
1889
  function g() {
1750
- R(i);
1890
+ R(c);
1751
1891
  }
1752
- S(k, A, g) && (s = E, w(k, A));
1892
+ P(k, A, g) && (s = v, w(k, A));
1753
1893
  }
1754
1894
  var f = {
1755
1895
  get index() {
@@ -1759,11 +1899,11 @@ function wt(e) {
1759
1899
  return l;
1760
1900
  },
1761
1901
  get location() {
1762
- return p;
1902
+ return d;
1763
1903
  },
1764
1904
  createHref: b,
1765
- push: m,
1766
- replace: h,
1905
+ push: y,
1906
+ replace: p,
1767
1907
  go: R,
1768
1908
  back: function() {
1769
1909
  R(-1);
@@ -1771,79 +1911,79 @@ function wt(e) {
1771
1911
  forward: function() {
1772
1912
  R(1);
1773
1913
  },
1774
- listen: function(E) {
1775
- return c.push(E);
1914
+ listen: function(v) {
1915
+ return i.push(v);
1776
1916
  },
1777
- block: function(E) {
1778
- return y.push(E);
1917
+ block: function(v) {
1918
+ return m.push(v);
1779
1919
  }
1780
1920
  };
1781
1921
  return f;
1782
1922
  }
1783
- function vt(e, t, r) {
1784
- return Math.min(Math.max(e, t), r);
1923
+ function Ne(t, e, r) {
1924
+ return Math.min(Math.max(t, e), r);
1785
1925
  }
1786
- function Be(e) {
1787
- e.preventDefault(), e.returnValue = "";
1926
+ function Ot(t) {
1927
+ t.preventDefault(), t.returnValue = "";
1788
1928
  }
1789
- function de() {
1790
- var e = [];
1929
+ function gt() {
1930
+ var t = [];
1791
1931
  return {
1792
1932
  get length() {
1793
- return e.length;
1933
+ return t.length;
1794
1934
  },
1795
1935
  push: function(r) {
1796
- return e.push(r), function() {
1797
- e = e.filter(function(n) {
1936
+ return t.push(r), function() {
1937
+ t = t.filter(function(n) {
1798
1938
  return n !== r;
1799
1939
  });
1800
1940
  };
1801
1941
  },
1802
1942
  call: function(r) {
1803
- e.forEach(function(n) {
1943
+ t.forEach(function(n) {
1804
1944
  return n && n(r);
1805
1945
  });
1806
1946
  }
1807
1947
  };
1808
1948
  }
1809
- function Ce() {
1949
+ function jt() {
1810
1950
  return Math.random().toString(36).substr(2, 8);
1811
1951
  }
1812
- function ee(e) {
1813
- var t = e.pathname, r = t === void 0 ? "/" : t, n = e.search, o = n === void 0 ? "" : n, a = e.hash, s = a === void 0 ? "" : a;
1952
+ function et(t) {
1953
+ var e = t.pathname, r = e === void 0 ? "/" : e, n = t.search, o = n === void 0 ? "" : n, a = t.hash, s = a === void 0 ? "" : a;
1814
1954
  return o && o !== "?" && (r += o.charAt(0) === "?" ? o : "?" + o), s && s !== "#" && (r += s.charAt(0) === "#" ? s : "#" + s), r;
1815
1955
  }
1816
- function we(e) {
1817
- var t = {};
1818
- if (e) {
1819
- var r = e.indexOf("#");
1820
- r >= 0 && (t.hash = e.substr(r), e = e.substr(0, r));
1821
- var n = e.indexOf("?");
1822
- n >= 0 && (t.search = e.substr(n), e = e.substr(0, n)), e && (t.pathname = e);
1956
+ function bt(t) {
1957
+ var e = {};
1958
+ if (t) {
1959
+ var r = t.indexOf("#");
1960
+ r >= 0 && (e.hash = t.substr(r), t = t.substr(0, r));
1961
+ var n = t.indexOf("?");
1962
+ n >= 0 && (e.search = t.substr(n), t = t.substr(0, n)), t && (e.pathname = t);
1823
1963
  }
1824
- return t;
1964
+ return e;
1825
1965
  }
1826
- const yr = Symbol();
1827
- function Dn(e, t) {
1828
- const r = Ve({ ...e }), n = (s) => {
1966
+ const Pr = Symbol();
1967
+ function Yn(t, e) {
1968
+ const r = Ht({ ...t }), n = (s) => {
1829
1969
  Object.assign(r, {
1830
- [yr]: !1,
1970
+ [Pr]: !1,
1831
1971
  ...s
1832
1972
  });
1833
- }, o = r, a = Sn(o, t);
1973
+ }, o = r, a = Zn(o, e);
1834
1974
  return {
1835
1975
  currentRoute: o,
1836
1976
  routerRoute: a,
1837
1977
  updateRoute: n
1838
1978
  };
1839
1979
  }
1840
- function _(e) {
1841
- return !e.startsWith("http") ? Tn(e) : Fn(e);
1980
+ function q(t) {
1981
+ return !t.startsWith("http") ? to(t) : Xn(t);
1842
1982
  }
1843
- function Fn(e) {
1844
- const { protocol: t, host: r, pathname: n, search: o, searchParams: a, hash: s } = new URL(e, e);
1983
+ function Xn(t) {
1984
+ const { protocol: e, host: r, pathname: n, search: o, searchParams: a, hash: s } = new URL(t, t);
1845
1985
  return {
1846
- protocol: t,
1986
+ protocol: e,
1847
1987
  host: r,
1848
1988
  pathname: n,
1849
1989
  search: o,
@@ -1851,31 +1991,31 @@ function Fn(e) {
1851
1991
  hash: s
1852
1992
  };
1853
1993
  }
1854
- function Tn(e) {
1855
- const { pathname: t, search: r, searchParams: n, hash: o } = new URL(e, "https://localhost");
1994
+ function to(t) {
1995
+ const { pathname: e, search: r, searchParams: n, hash: o } = new URL(t, "https://localhost");
1856
1996
  return {
1857
- pathname: t,
1997
+ pathname: e,
1858
1998
  search: r,
1859
1999
  searchParams: n,
1860
2000
  hash: o
1861
2001
  };
1862
2002
  }
1863
- function Mn(e) {
1864
- return (t) => {
1865
- const { host: r } = _(t);
1866
- return !(r === void 0 || r === e);
2003
+ function eo(t) {
2004
+ return (e) => {
2005
+ const { host: r } = q(e);
2006
+ return !(r === void 0 || r === t);
1867
2007
  };
1868
2008
  }
1869
- function Jn({ mode: e, listener: t }) {
1870
- const r = Wn(e), n = (p, c) => {
1871
- if (c != null && c.replace) {
1872
- r.replace(p, c.state);
2009
+ function ro({ mode: t, listener: e }) {
2010
+ const r = no(t), n = (d, i) => {
2011
+ if (i != null && i.replace) {
2012
+ r.replace(d, i.state);
1873
2013
  return;
1874
2014
  }
1875
- r.push(p, c == null ? void 0 : c.state);
2015
+ r.push(d, i == null ? void 0 : i.state);
1876
2016
  }, o = () => {
1877
- const p = ee(r.location);
1878
- r.replace(p);
2017
+ const d = et(r.location);
2018
+ r.replace(d);
1879
2019
  };
1880
2020
  let a;
1881
2021
  return {
@@ -1883,38 +2023,38 @@ function Jn({ mode: e, listener: t }) {
1883
2023
  update: n,
1884
2024
  refresh: o,
1885
2025
  startListening: () => {
1886
- a == null || a(), a = r.listen(t);
2026
+ a == null || a(), a = r.listen(e);
1887
2027
  },
1888
2028
  stopListening: () => {
1889
2029
  a == null || a();
1890
2030
  }
1891
2031
  };
1892
2032
  }
1893
- function Wn(e = "auto") {
1894
- switch (e) {
2033
+ function no(t = "auto") {
2034
+ switch (t) {
1895
2035
  case "auto":
1896
- return tt() ? Rt() : wt();
2036
+ return ue() ? ke() : xe();
1897
2037
  case "browser":
1898
- return Rt();
2038
+ return ke();
1899
2039
  case "memory":
1900
- return wt();
2040
+ return xe();
1901
2041
  case "hash":
1902
- return In();
2042
+ return Kn();
1903
2043
  default:
1904
- const t = e;
1905
- throw new Error(`Switch is not exhaustive for mode: ${t}`);
2044
+ const e = t;
2045
+ throw new Error(`Switch is not exhaustive for mode: ${e}`);
1906
2046
  }
1907
2047
  }
1908
- function Gn(e) {
1909
- return me(() => () => ue("h1", e), {
1910
- name: e,
2048
+ function oo(t) {
2049
+ return Rt(() => () => pt("h1", t), {
2050
+ name: t,
1911
2051
  props: []
1912
2052
  });
1913
2053
  }
1914
- function zn(e) {
1915
- const t = (a) => Ae(e[a] ?? Gn(a)), r = (a) => {
1916
- const s = Ae(t(a)), l = {
1917
- id: ot(),
2054
+ function ao(t) {
2055
+ const e = (a) => Nt(t[a] ?? oo(a)), r = (a) => {
2056
+ const s = Nt(e(a)), l = {
2057
+ id: pe(),
1918
2058
  component: s,
1919
2059
  meta: {},
1920
2060
  state: {}
@@ -1924,85 +2064,85 @@ function zn(e) {
1924
2064
  matched: l,
1925
2065
  matches: [l],
1926
2066
  name: a,
1927
- query: rt(""),
2067
+ query: fe(""),
1928
2068
  params: {},
1929
2069
  state: {},
1930
2070
  href: "/",
1931
2071
  hash: "",
1932
- [yr]: !0
2072
+ [Pr]: !0
1933
2073
  };
1934
2074
  }, n = (a) => {
1935
2075
  if (!a) {
1936
2076
  o.value = null;
1937
2077
  return;
1938
2078
  }
1939
- const s = t(a);
2079
+ const s = e(a);
1940
2080
  o.value = { type: a, component: s };
1941
- }, o = je(null);
2081
+ }, o = qt(null);
1942
2082
  return {
1943
2083
  setRejection: n,
1944
2084
  rejection: o,
1945
2085
  getRejectionRoute: r
1946
2086
  };
1947
2087
  }
1948
- class Qn extends Error {
2088
+ class so extends Error {
1949
2089
  constructor() {
1950
2090
  super("initialUrl must be set if window.location is unavailable");
1951
2091
  }
1952
2092
  }
1953
- function Kn(e) {
1954
- if (e)
1955
- return e;
1956
- if (tt())
2093
+ function io(t) {
2094
+ if (t)
2095
+ return t;
2096
+ if (ue())
1957
2097
  return window.location.toString();
1958
- throw new Qn();
2098
+ throw new so();
1959
2099
  }
1960
- function gr(e) {
1961
- return !!e && typeof e == "object";
2100
+ function Ar(t) {
2101
+ return !!t && typeof t == "object";
1962
2102
  }
1963
- const Ne = !0;
1964
- function Yn(e, t, r) {
1965
- if (gr(e) && t in e) {
1966
- const n = e[t];
1967
- return typeof n == "string" ? re(n, r, Ne) : n;
2103
+ const $t = !0;
2104
+ function co(t, e, r) {
2105
+ if (Ar(t) && e in t) {
2106
+ const n = t[e];
2107
+ return typeof n == "string" ? nt(n, r, $t) : n;
1968
2108
  }
1969
- return re(void 0, r, Ne);
2109
+ return nt(void 0, r, $t);
1970
2110
  }
1971
- function Rr(e, t) {
2111
+ function kr(t, e) {
1972
2112
  const r = {};
1973
- for (const [n, o] of Object.entries(e)) {
1974
- const a = Yn(t, n, o);
2113
+ for (const [n, o] of Object.entries(t)) {
2114
+ const a = co(e, n, o);
1975
2115
  r[n] = a;
1976
2116
  }
1977
2117
  return r;
1978
2118
  }
1979
- function Xn(e, t, r) {
1980
- if (gr(e) && t in e) {
1981
- const n = e[t];
1982
- return ne(n, r, Ne);
2119
+ function uo(t, e, r) {
2120
+ if (Ar(t) && e in t) {
2121
+ const n = t[e];
2122
+ return ot(n, r, $t);
1983
2123
  }
1984
- return ne(void 0, r, Ne);
2124
+ return ot(void 0, r, $t);
1985
2125
  }
1986
- const Et = (e, t) => {
2126
+ const Le = (t, e) => {
1987
2127
  const r = {};
1988
- for (const [n, o] of Object.entries(e)) {
1989
- const a = Xn(t, n, o);
2128
+ for (const [n, o] of Object.entries(t)) {
2129
+ const a = uo(e, n, o);
1990
2130
  r[n] = a;
1991
2131
  }
1992
2132
  return r;
1993
2133
  };
1994
- function eo() {
1995
- const e = Ve(/* @__PURE__ */ new Map()), t = tt() ? s() : null, r = (l) => {
1996
- e.set(l, !1), t == null || t.observe(l);
2134
+ function fo() {
2135
+ const t = Ht(/* @__PURE__ */ new Map()), e = ue() ? s() : null, r = (l) => {
2136
+ t.set(l, !1), e == null || e.observe(l);
1997
2137
  }, n = (l) => {
1998
- e.delete(l), t == null || t.unobserve(l);
2138
+ t.delete(l), e == null || e.unobserve(l);
1999
2139
  }, o = () => {
2000
- t == null || t.disconnect();
2001
- }, a = (l) => e.get(l) ?? !1;
2140
+ e == null || e.disconnect();
2141
+ }, a = (l) => t.get(l) ?? !1;
2002
2142
  function s() {
2003
2143
  return new IntersectionObserver((l) => {
2004
- l.forEach((p) => {
2005
- e.set(p.target, p.isIntersecting);
2144
+ l.forEach((d) => {
2145
+ t.set(d.target, d.isIntersecting);
2006
2146
  });
2007
2147
  });
2008
2148
  }
@@ -2013,269 +2153,269 @@ function eo() {
2013
2153
  isElementVisible: a
2014
2154
  };
2015
2155
  }
2016
- class to extends Error {
2017
- constructor(t) {
2018
- super(`Route not found: "${t}"`);
2156
+ class lo extends Error {
2157
+ constructor(e) {
2158
+ super(`Route not found: "${e}"`);
2019
2159
  }
2020
2160
  }
2021
- function wr(e, t, r) {
2022
- const n = tn(t.value, r), o = qt(n), [a] = Dt(e, new RegExp(o, "g"));
2161
+ function xr(t, e, r) {
2162
+ const n = pn(e.value, r), o = ze(n), [a] = Ke(t, new RegExp(o, "g"));
2023
2163
  return a;
2024
2164
  }
2025
- function vr(e, t, r, n) {
2026
- const o = Ye(t, r), a = ne(n, t.params[r], o);
2027
- return e.replace(It(r), a);
2165
+ function Nr(t, e, r, n) {
2166
+ const o = se(e, r), a = ot(n, e.params[r], o);
2167
+ return t.replace(Qe(r), a);
2028
2168
  }
2029
- function Er({ protocol: e, host: t, pathname: r, search: n, searchParams: o, hash: a }) {
2169
+ function Lr({ protocol: t, host: e, pathname: r, search: n, searchParams: o, hash: a }) {
2030
2170
  const s = new URL("https://localhost");
2031
- e && (s.protocol = e), t && (s.host = t), r && (s.pathname = r), o ? s.search = new URLSearchParams(o).toString() : n && (s.search = n), a && (s.hash = a);
2171
+ t && (s.protocol = t), e && (s.host = e), r && (s.pathname = r), o ? s.search = new URLSearchParams(o).toString() : n && (s.search = n), a && (s.hash = a);
2032
2172
  const l = s.toString().replace(/^https:\/\/localhost\/*/, "/");
2033
- return Lt(l);
2173
+ return $e(l);
2034
2174
  }
2035
- function ro(e, t = {}) {
2036
- const { params: r = {}, query: n } = t, o = oo(e.query, r), a = st(o, n), s = bt(e.path, r), l = e.hash.value ? bt(e.hash, r) : t.hash, p = no(e.host, r), { protocol: c, host: y } = _(p);
2037
- return Er({ protocol: c, host: y, pathname: s, searchParams: a, hash: l });
2175
+ function po(t, e = {}) {
2176
+ const { params: r = {}, query: n } = e, o = yo(t.query, r), a = he(o, n), s = Ue(t.path, r), l = t.hash.value ? Ue(t.hash, r) : e.hash, d = ho(t.host, r), { protocol: i, host: m } = q(d);
2177
+ return Lr({ protocol: i, host: m, pathname: s, searchParams: a, hash: l });
2038
2178
  }
2039
- function no(e, t) {
2040
- const r = e.value && !e.value.startsWith("http") ? `https://${e.value}` : e.value;
2041
- return Object.keys(e.params).reduce((n, o) => vr(n, e, o, t[o]), r);
2179
+ function ho(t, e) {
2180
+ const r = t.value && !t.value.startsWith("http") ? `https://${t.value}` : t.value;
2181
+ return Object.keys(t.params).reduce((n, o) => Nr(n, t, o, e[o]), r);
2042
2182
  }
2043
- function bt(e, t) {
2044
- return Object.keys(e.params).reduce((r, n) => vr(r, e, n, t[n]), e.value);
2183
+ function Ue(t, e) {
2184
+ return Object.keys(t.params).reduce((r, n) => Nr(r, t, n, e[n]), t.value);
2045
2185
  }
2046
- function oo(e, t) {
2047
- const r = new URLSearchParams(e.value);
2048
- if (!e.value)
2186
+ function yo(t, e) {
2187
+ const r = new URLSearchParams(t.value);
2188
+ if (!t.value)
2049
2189
  return r;
2050
2190
  for (const [n, o] of Array.from(r.entries())) {
2051
- const a = et(o);
2191
+ const a = ce(o);
2052
2192
  if (!a)
2053
2193
  continue;
2054
- const l = Xe(o), p = ne(t[a], e.params[a], l), c = t[a] === void 0 && p === "";
2055
- l && c ? r.delete(n, o) : r.set(n, p);
2194
+ const l = ie(o), d = ot(e[a], t.params[a], l), i = e[a] === void 0 && d === "";
2195
+ l && i ? r.delete(n, o) : r.set(n, d);
2056
2196
  }
2057
2197
  return r;
2058
2198
  }
2059
- const ao = (e, t) => {
2199
+ const mo = (t, e) => {
2060
2200
  try {
2061
- it(e, t);
2201
+ me(t, e);
2062
2202
  } catch {
2063
2203
  return !1;
2064
2204
  }
2065
2205
  return !0;
2066
- }, it = (e, t) => {
2067
- const { protocol: r, host: n, pathname: o, search: a, hash: s } = _(t);
2206
+ }, me = (t, e) => {
2207
+ const { protocol: r, host: n, pathname: o, search: a, hash: s } = q(e);
2068
2208
  return {
2069
- ...Te(e.host, `${r}//${n}`),
2070
- ...Te(e.path, o),
2071
- ...so(e.query, a),
2072
- ...Te(e.hash, s)
2209
+ ...zt(t.host, `${r}//${n}`),
2210
+ ...zt(t.path, o),
2211
+ ...go(t.query, a),
2212
+ ...zt(t.hash, s)
2073
2213
  };
2074
2214
  };
2075
- function Te(e, t) {
2076
- const r = {}, n = decodeURIComponent(t);
2077
- for (const [o, a] of Object.entries(e.params)) {
2078
- const s = wr(n, e, o), l = Ye(e, o), p = re(s, a, l);
2079
- r[o] = p;
2215
+ function zt(t, e) {
2216
+ const r = {}, n = decodeURIComponent(e);
2217
+ for (const [o, a] of Object.entries(t.params)) {
2218
+ const s = xr(n, t, o), l = se(t, o), d = nt(s, a, l);
2219
+ r[o] = d;
2080
2220
  }
2081
2221
  return r;
2082
2222
  }
2083
- function so(e, t) {
2084
- const r = {}, n = new URLSearchParams(e.value), o = new URLSearchParams(t);
2223
+ function go(t, e) {
2224
+ const r = {}, n = new URLSearchParams(t.value), o = new URLSearchParams(e);
2085
2225
  for (const [a, s] of Array.from(n.entries())) {
2086
- const l = et(s);
2226
+ const l = ce(s);
2087
2227
  if (!l)
2088
2228
  continue;
2089
- const c = Xe(s), y = o.get(a) ?? void 0, b = re(y, e.params[l], c);
2229
+ const i = ie(s), m = o.get(a) ?? void 0, b = nt(m, t.params[l], i);
2090
2230
  r[l] = b;
2091
2231
  }
2092
2232
  return r;
2093
2233
  }
2094
- function co(e, t = {}, r = {}) {
2095
- const n = ro(e, {
2096
- params: t,
2234
+ function Ro(t, e = {}, r = {}) {
2235
+ const n = po(t, {
2236
+ params: e,
2097
2237
  query: r.query,
2098
2238
  hash: r.hash
2099
- }), { search: o, hash: a } = _(n);
2239
+ }), { search: o, hash: a } = q(n);
2100
2240
  return {
2101
- id: e.id,
2102
- matched: e.matched,
2103
- matches: e.matches,
2104
- name: e.name,
2105
- query: rt(o),
2106
- params: it(e, n),
2107
- state: Rr(e.state, r.state),
2241
+ id: t.id,
2242
+ matched: t.matched,
2243
+ matches: t.matches,
2244
+ name: t.name,
2245
+ query: fe(o),
2246
+ params: me(t, n),
2247
+ state: kr(t.state, r.state),
2108
2248
  hash: a,
2109
2249
  href: n
2110
2250
  };
2111
2251
  }
2112
- const io = (e) => "name" in e.matched && !!e.matched.name, uo = (e, t) => {
2113
- const { pathname: r } = _(t);
2114
- return Xr(e).test(r);
2115
- }, fo = (e, t) => {
2116
- const { search: r } = _(t);
2117
- return en(e).every((o) => o.test(r));
2118
- }, We = (e, t) => {
2119
- const { hash: r } = _(t), { value: n } = e.hash;
2120
- return J(n) ? `#${n.replace(/^#*/, "")}`.toLowerCase() === r.toLowerCase() : !0;
2252
+ const wo = (t) => "name" in t.matched && !!t.matched.name, Eo = (t, e) => {
2253
+ const { pathname: r } = q(e);
2254
+ return fn(t).test(r);
2255
+ }, vo = (t, e) => {
2256
+ const { search: r } = q(e);
2257
+ return ln(t).every((o) => o.test(r));
2258
+ }, te = (t, e) => {
2259
+ const { hash: r } = q(e), { value: n } = t.hash;
2260
+ return W(n) ? `#${n.replace(/^#*/, "")}`.toLowerCase() === r.toLowerCase() : !0;
2121
2261
  };
2122
- function lo(e) {
2123
- const { searchParams: t, pathname: r } = _(e), n = -1, o = 1;
2262
+ function bo(t) {
2263
+ const { searchParams: e, pathname: r } = q(t), n = -1, o = 1;
2124
2264
  return (a, s) => {
2125
- const l = St(a, t), p = Pt(a, r), c = St(s, t), y = Pt(s, r);
2126
- return a.depth > s.depth ? n : a.depth < s.depth ? o : l + p > c + y ? n : l + p < c + y ? o : We(a, e) ? n : We(s, e) ? o : 0;
2265
+ const l = Ce(a, e), d = Be(a, r), i = Ce(s, e), m = Be(s, r);
2266
+ return a.depth > s.depth ? n : a.depth < s.depth ? o : l + d > i + m ? n : l + d < i + m ? o : te(a, t) ? n : te(s, t) ? o : 0;
2127
2267
  };
2128
2268
  }
2129
- function Pt(e, t) {
2130
- const r = Object.keys(e.path.params).filter((o) => Ye(e.path, o)).map((o) => o), n = r.filter((o) => wr(t, e.path, o) === void 0);
2269
+ function Be(t, e) {
2270
+ const r = Object.keys(t.path.params).filter((o) => se(t.path, o)).map((o) => o), n = r.filter((o) => xr(e, t.path, o) === void 0);
2131
2271
  return r.length - n.length;
2132
2272
  }
2133
- function St(e, t) {
2134
- const r = new URLSearchParams(t), n = new URLSearchParams(e.query.value), o = Array.from(n.keys()), a = o.filter((s) => !r.has(s));
2273
+ function Ce(t, e) {
2274
+ const r = new URLSearchParams(e), n = new URLSearchParams(t.query.value), o = Array.from(n.keys()), a = o.filter((s) => !r.has(s));
2135
2275
  return o.length - a.length;
2136
2276
  }
2137
- const ho = [
2138
- io,
2139
- uo,
2140
- fo,
2141
- We,
2142
- ao
2277
+ const So = [
2278
+ wo,
2279
+ Eo,
2280
+ vo,
2281
+ te,
2282
+ mo
2143
2283
  ];
2144
- function po(e, t) {
2145
- const r = lo(t);
2146
- return e.filter((n) => ho.every((o) => o(n, t))).sort(r);
2284
+ function Po(t, e) {
2285
+ const r = bo(e);
2286
+ return t.filter((n) => So.every((o) => o(n, e))).sort(r);
2147
2287
  }
2148
- function mo(e, t, r) {
2149
- const n = po(e, t);
2288
+ function Ao(t, e, r) {
2289
+ const n = Po(t, e);
2150
2290
  if (!n.length)
2151
2291
  return;
2152
- const [o] = n, { searchParams: a, hash: s } = _(t);
2292
+ const [o] = n, { searchParams: a, hash: s } = q(e);
2153
2293
  return {
2154
2294
  id: o.id,
2155
2295
  matched: o.matched,
2156
2296
  matches: o.matches,
2157
2297
  name: o.name,
2158
- query: rt(a),
2159
- params: it(o, t),
2160
- state: Rr(o.state, r),
2298
+ query: fe(a),
2299
+ params: me(o, e),
2300
+ state: kr(o.state, r),
2161
2301
  hash: s,
2162
- href: Lt(t)
2302
+ href: $e(e)
2163
2303
  };
2164
2304
  }
2165
- function At(e, t) {
2166
- const r = typeof e == "string" ? _(e) : e, n = typeof t == "string" ? _(t) : t, o = r.searchParams ?? new URLSearchParams(r.search), a = n.searchParams ?? new URLSearchParams(n.search);
2167
- return Er({
2168
- protocol: J(n.protocol) ? n.protocol : r.protocol,
2169
- host: J(n.host) ? n.host : r.host,
2170
- pathname: J(n.pathname) ? n.pathname : r.pathname,
2171
- searchParams: st(a, o),
2172
- hash: J(n.hash) ? n.hash : r.hash
2305
+ function Ve(t, e) {
2306
+ const r = typeof t == "string" ? q(t) : t, n = typeof e == "string" ? q(e) : e, o = r.searchParams ?? new URLSearchParams(r.search), a = n.searchParams ?? new URLSearchParams(n.search);
2307
+ return Lr({
2308
+ protocol: W(n.protocol) ? n.protocol : r.protocol,
2309
+ host: W(n.host) ? n.host : r.host,
2310
+ pathname: W(n.pathname) ? n.pathname : r.pathname,
2311
+ searchParams: he(a, o),
2312
+ hash: W(n.hash) ? n.hash : r.hash
2173
2313
  });
2174
2314
  }
2175
- function yo(e, t) {
2176
- return J(t) ? e.map((r) => {
2177
- const n = `${t}${r.path.value}`;
2315
+ function ko(t, e) {
2316
+ return W(e) ? t.map((r) => {
2317
+ const n = `${e}${r.path.value}`;
2178
2318
  return {
2179
2319
  ...r,
2180
- path: z(n, r.path.params)
2320
+ path: Q(n, r.path.params)
2181
2321
  };
2182
- }) : e;
2322
+ }) : t;
2183
2323
  }
2184
- class go extends Error {
2324
+ class xo extends Error {
2185
2325
  /**
2186
2326
  * Constructs a new DuplicateNamesError instance with a message indicating the problematic name.
2187
2327
  * @param name - The name of the name that was duplicated.
2188
2328
  */
2189
- constructor(t) {
2190
- super(`Invalid Name "${t}": Router does not support multiple routes with the same name. All name names must be unique.`);
2329
+ constructor(e) {
2330
+ super(`Invalid Name "${e}": Router does not support multiple routes with the same name. All name names must be unique.`);
2191
2331
  }
2192
2332
  }
2193
- function Ro(e) {
2194
- const t = e.map(({ name: r }) => r);
2195
- for (const r of t)
2196
- if (Ct(t, r) > 1)
2197
- throw new go(r);
2333
+ function No(t) {
2334
+ const e = t.map(({ name: r }) => r);
2335
+ for (const r of e)
2336
+ if (_e(e, r) > 1)
2337
+ throw new xo(r);
2198
2338
  }
2199
- function wo(e, t = [], r) {
2339
+ function Lo(t, e = [], r) {
2200
2340
  const n = [
2201
- ...e,
2202
- ...t.map((o) => o.routes)
2341
+ ...t,
2342
+ ...e.map((o) => o.routes)
2203
2343
  ].flat();
2204
- return Ro(n), yo(n, r);
2344
+ return No(n), ko(n, r);
2205
2345
  }
2206
- function vo(e = {}, t = []) {
2207
- const r = new oe();
2208
- return ce("onBeforeRouteEnter", e, t).forEach((n) => r.onBeforeRouteEnter.add(n)), ce("onBeforeRouteUpdate", e, t).forEach((n) => r.onBeforeRouteUpdate.add(n)), ce("onBeforeRouteLeave", e, t).forEach((n) => r.onBeforeRouteLeave.add(n)), ce("onAfterRouteEnter", e, t).forEach((n) => r.onAfterRouteEnter.add(n)), ce("onAfterRouteUpdate", e, t).forEach((n) => r.onAfterRouteUpdate.add(n)), ce("onAfterRouteLeave", e, t).forEach((n) => r.onAfterRouteLeave.add(n)), r;
2346
+ function Uo(t = {}, e = []) {
2347
+ const r = new at();
2348
+ return ut("onBeforeRouteEnter", t, e).forEach((n) => r.onBeforeRouteEnter.add(n)), ut("onBeforeRouteUpdate", t, e).forEach((n) => r.onBeforeRouteUpdate.add(n)), ut("onBeforeRouteLeave", t, e).forEach((n) => r.onBeforeRouteLeave.add(n)), ut("onAfterRouteEnter", t, e).forEach((n) => r.onAfterRouteEnter.add(n)), ut("onAfterRouteUpdate", t, e).forEach((n) => r.onAfterRouteUpdate.add(n)), ut("onAfterRouteLeave", t, e).forEach((n) => r.onAfterRouteLeave.add(n)), r;
2209
2349
  }
2210
- function ce(e, t, r) {
2350
+ function ut(t, e, r) {
2211
2351
  return [
2212
- t[e],
2213
- ...r.map((o) => o[e])
2352
+ e[t],
2353
+ ...r.map((o) => o[t])
2214
2354
  ].flat().filter((o) => o !== void 0);
2215
2355
  }
2216
- function Co(e, t, r = []) {
2217
- const n = wo(e, r, t == null ? void 0 : t.base), o = _n();
2218
- o.addGlobalRouteHooks(vo(t, r));
2219
- const a = nt(), s = Rn(), l = Nn(), p = eo(), c = Jn({
2220
- mode: t == null ? void 0 : t.historyMode,
2221
- listener: ({ location: P }) => {
2222
- const B = ee(P);
2223
- b(B, { state: P.state, replace: !0 });
2356
+ function Io(t, e, r = []) {
2357
+ const n = Lo(t, r, e == null ? void 0 : e.base), o = zn();
2358
+ o.addGlobalRouteHooks(Uo(e, r));
2359
+ const a = le(), s = Nn(), l = Jn(), d = fo(), i = ro({
2360
+ mode: e == null ? void 0 : e.historyMode,
2361
+ listener: ({ location: S }) => {
2362
+ const B = et(S);
2363
+ b(B, { state: S.state, replace: !0 });
2224
2364
  }
2225
2365
  });
2226
- function y(P, B = {}) {
2227
- return mo(n, P, B.state);
2366
+ function m(S, B = {}) {
2367
+ return Ao(n, S, B.state);
2228
2368
  }
2229
- async function b(P, B = {}) {
2230
- const W = a();
2231
- if (c.stopListening(), x(P)) {
2232
- c.update(P, B);
2369
+ async function b(S, B = {}) {
2370
+ const G = a();
2371
+ if (i.stopListening(), x(S)) {
2372
+ i.update(S, B);
2233
2373
  return;
2234
2374
  }
2235
- const I = y(P, B) ?? f("NotFound"), H = ut(W), Q = await o.runBeforeRouteHooks({ to: I, from: H });
2236
- switch (Q.status) {
2375
+ const J = m(S, B) ?? f("NotFound"), _ = ge(G), K = await o.runBeforeRouteHooks({ to: J, from: _ });
2376
+ switch (K.status) {
2237
2377
  // On abort do nothing
2238
2378
  case "ABORT":
2239
2379
  return;
2240
2380
  // On push update the history, and push new route, and return
2241
2381
  case "PUSH":
2242
- c.update(P, B), await S(...Q.to);
2382
+ i.update(S, B), await P(...K.to);
2243
2383
  return;
2244
2384
  // On reject update the history, the route, and set the rejection type
2245
2385
  case "REJECT":
2246
- c.update(P, B), h(Q.type);
2386
+ i.update(S, B), p(K.type);
2247
2387
  break;
2248
2388
  // On success update history, set the route, and clear the rejection
2249
2389
  case "SUCCESS":
2250
- c.update(P, B), h(null);
2390
+ i.update(S, B), p(null);
2251
2391
  break;
2252
2392
  default:
2253
- throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(Q)}`);
2393
+ throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(K)}`);
2254
2394
  }
2255
- const _e = W;
2256
- s.setProps(I).then((D) => {
2257
- if (_e === W)
2395
+ const Ft = G;
2396
+ s.setProps(J).then((D) => {
2397
+ if (Ft === G)
2258
2398
  switch (D.status) {
2259
2399
  case "SUCCESS":
2260
2400
  break;
2261
2401
  case "PUSH":
2262
- S(...D.to);
2402
+ P(...D.to);
2263
2403
  break;
2264
2404
  case "REJECT":
2265
- h(D.type);
2405
+ p(D.type);
2266
2406
  break;
2267
2407
  default:
2268
- const qe = D;
2269
- throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(qe)}`);
2408
+ const Tt = D;
2409
+ throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(Tt)}`);
2270
2410
  }
2271
- }), A(I);
2272
- const F = await o.runAfterRouteHooks({ to: I, from: H });
2411
+ }), A(J);
2412
+ const F = await o.runAfterRouteHooks({ to: J, from: _ });
2273
2413
  switch (F.status) {
2274
2414
  case "PUSH":
2275
- await S(...F.to);
2415
+ await P(...F.to);
2276
2416
  break;
2277
2417
  case "REJECT":
2278
- h(F.type);
2418
+ p(F.type);
2279
2419
  break;
2280
2420
  case "SUCCESS":
2281
2421
  break;
@@ -2283,75 +2423,75 @@ function Co(e, t, r = []) {
2283
2423
  const D = F;
2284
2424
  throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(D)}`);
2285
2425
  }
2286
- c.startListening();
2287
- }
2288
- const L = (P, B = {}, W = {}) => {
2289
- const I = n.find((H) => H.name === P);
2290
- if (!I)
2291
- throw new to(String(P));
2292
- return co(I, B, W);
2293
- }, S = (P, B, W) => {
2294
- if (M(P)) {
2295
- const F = { ...B }, D = At(P, {
2426
+ i.startListening();
2427
+ }
2428
+ const U = (S, B = {}, G = {}) => {
2429
+ const J = n.find((_) => _.name === S);
2430
+ if (!J)
2431
+ throw new lo(String(S));
2432
+ return Ro(J, B, G);
2433
+ }, P = (S, B, G) => {
2434
+ if (M(S)) {
2435
+ const F = { ...B }, D = Ve(S, {
2296
2436
  searchParams: F.query,
2297
2437
  hash: F.hash
2298
2438
  });
2299
2439
  return b(D, F);
2300
2440
  }
2301
- if (typeof P == "string") {
2302
- const { replace: F, ...D } = { ...W }, qe = { ...B }, Ie = L(P, qe, D), Pr = Et({ ...Ie.matched.state }, { ...Ie.state, ...D.state });
2303
- return b(Ie.href, { replace: F, state: Pr });
2441
+ if (typeof S == "string") {
2442
+ const { replace: F, ...D } = { ...G }, Tt = { ...B }, Mt = U(S, Tt, D), Br = Le({ ...Mt.matched.state }, { ...Mt.state, ...D.state });
2443
+ return b(Mt.href, { replace: F, state: Br });
2304
2444
  }
2305
- const { replace: I, ...H } = { ...B }, Q = Et({ ...P.matched.state }, { ...P.state, ...H.state }), _e = At(P.href, {
2306
- searchParams: H.query,
2307
- hash: H.hash
2445
+ const { replace: J, ..._ } = { ...B }, K = Le({ ...S.matched.state }, { ...S.state, ..._.state }), Ft = Ve(S.href, {
2446
+ searchParams: _.query,
2447
+ hash: _.hash
2308
2448
  });
2309
- return b(_e, { replace: I, state: Q });
2310
- }, w = (P, B, W) => {
2311
- if (M(P)) {
2312
- const H = { ...B, replace: !0 };
2313
- return S(P, H);
2449
+ return b(Ft, { replace: J, state: K });
2450
+ }, w = (S, B, G) => {
2451
+ if (M(S)) {
2452
+ const _ = { ...B, replace: !0 };
2453
+ return P(S, _);
2314
2454
  }
2315
- if (typeof P == "string") {
2316
- const H = { ...W, replace: !0 }, Q = { ...B };
2317
- return S(P, Q, H);
2455
+ if (typeof S == "string") {
2456
+ const _ = { ...G, replace: !0 }, K = { ...B };
2457
+ return P(S, K, _);
2318
2458
  }
2319
- const I = { ...B, replace: !0 };
2320
- return S(P, I);
2321
- }, m = (P) => {
2322
- h(P);
2323
- }, { setRejection: h, rejection: R, getRejectionRoute: f } = zn({
2324
- ...r.reduce((P, B) => ({ ...P, ...B.rejections }), {}),
2325
- ...t == null ? void 0 : t.rejections
2326
- }), i = f("NotFound"), { currentRoute: E, routerRoute: k, updateRoute: A } = Dn(i, S), g = Kn(t == null ? void 0 : t.initialUrl), u = c.location.state, { host: d } = _(g), x = Mn(d);
2327
- let U = !1;
2328
- const { promise: C, resolve: V } = Promise.withResolvers();
2329
- async function O() {
2330
- if (U)
2331
- return C;
2332
- Mr(n) && await Jr(), U = !0, await b(g, { replace: !0, state: u }), c.startListening(), V();
2333
- }
2334
- function q() {
2335
- c.stopListening();
2336
- }
2337
- function ut(P) {
2338
- return pn(P) ? null : { ...E };
2339
- }
2340
- function br(P) {
2341
- o.setVueApp(P), s.setVueApp(P), P.component("RouterView", fr), P.component("RouterLink", xn), P.provide(sr, R), P.provide(lr, o), P.provide(tr, s), P.provide(ur, l), P.provide(nr, p), P.provide(Bt, ft), O();
2342
- }
2343
- const ft = {
2459
+ const J = { ...B, replace: !0 };
2460
+ return P(S, J);
2461
+ }, y = (S) => {
2462
+ p(S);
2463
+ }, { setRejection: p, rejection: R, getRejectionRoute: f } = ao({
2464
+ ...r.reduce((S, B) => ({ ...S, ...B.rejections }), {}),
2465
+ ...e == null ? void 0 : e.rejections
2466
+ }), c = f("NotFound"), { currentRoute: v, routerRoute: k, updateRoute: A } = Yn(c, P), g = io(e == null ? void 0 : e.initialUrl), u = i.location.state, { host: h } = q(g), x = eo(h);
2467
+ let N = !1;
2468
+ const { promise: V, resolve: Z } = Promise.withResolvers();
2469
+ async function $() {
2470
+ if (N)
2471
+ return V;
2472
+ Xr(n) && await tn(), N = !0, await b(g, { replace: !0, state: u }), i.startListening(), Z();
2473
+ }
2474
+ function I() {
2475
+ i.stopListening();
2476
+ }
2477
+ function ge(S) {
2478
+ return Sn(S) ? null : { ...v };
2479
+ }
2480
+ function Ur(S) {
2481
+ o.setVueApp(S), s.setVueApp(S), S.component("RouterView", Rr), S.component("RouterLink", $n), S.provide(hr, R), S.provide(wr, o), S.provide(ur, s), S.provide(gr, l), S.provide(lr, d), S.provide(He, Re), $();
2482
+ }
2483
+ const Re = {
2344
2484
  route: k,
2345
- resolve: L,
2346
- find: y,
2347
- push: S,
2485
+ resolve: U,
2486
+ find: m,
2487
+ push: P,
2348
2488
  replace: w,
2349
- reject: m,
2350
- refresh: c.refresh,
2351
- forward: c.forward,
2352
- back: c.back,
2353
- go: c.go,
2354
- install: br,
2489
+ reject: y,
2490
+ refresh: i.refresh,
2491
+ forward: i.forward,
2492
+ back: i.back,
2493
+ go: i.go,
2494
+ install: Ur,
2355
2495
  isExternal: x,
2356
2496
  onBeforeRouteEnter: o.onBeforeRouteEnter,
2357
2497
  onBeforeRouteUpdate: o.onBeforeRouteUpdate,
@@ -2359,44 +2499,44 @@ function Co(e, t, r = []) {
2359
2499
  onAfterRouteEnter: o.onAfterRouteEnter,
2360
2500
  onAfterRouteUpdate: o.onAfterRouteUpdate,
2361
2501
  onAfterRouteLeave: o.onAfterRouteLeave,
2362
- prefetch: t == null ? void 0 : t.prefetch,
2363
- start: O,
2364
- stop: q
2502
+ prefetch: e == null ? void 0 : e.prefetch,
2503
+ start: $,
2504
+ stop: I
2365
2505
  };
2366
- return ft;
2506
+ return Re;
2367
2507
  }
2368
- function No(e) {
2508
+ function Jo(t) {
2369
2509
  return {
2370
- routes: e.routes ?? [],
2371
- rejections: e.rejections ?? {},
2372
- ...e
2510
+ routes: t.routes ?? [],
2511
+ rejections: t.rejections ?? {},
2512
+ ...t
2373
2513
  };
2374
2514
  }
2375
- function Eo(e) {
2515
+ function Bo(t) {
2376
2516
  return {
2377
- get: (t, { invalid: r }) => {
2378
- for (const n of e) {
2379
- const o = Qr(t, n);
2517
+ get: (e, { invalid: r }) => {
2518
+ for (const n of t) {
2519
+ const o = sn(e, n);
2380
2520
  if (o !== void 0)
2381
2521
  return o;
2382
2522
  }
2383
- throw r(`Value ${t} does not satisfy any of the possible values`);
2523
+ throw r(`Value ${e} does not satisfy any of the possible values`);
2384
2524
  },
2385
- set: (t, { invalid: r }) => {
2386
- for (const n of e) {
2387
- const o = Kr(t, n);
2525
+ set: (e, { invalid: r }) => {
2526
+ for (const n of t) {
2527
+ const o = cn(e, n);
2388
2528
  if (o !== void 0)
2389
2529
  return o;
2390
2530
  }
2391
- throw r(`Value ${t} does not satisfy any of the possible values`);
2531
+ throw r(`Value ${e} does not satisfy any of the possible values`);
2392
2532
  }
2393
2533
  };
2394
2534
  }
2395
- const bo = {
2535
+ const Co = {
2396
2536
  separator: ","
2397
2537
  };
2398
- function Vo(e, t = {}) {
2399
- const { separator: r } = { ...bo, ...t }, n = Eo(e);
2538
+ function Do(t, e = {}) {
2539
+ const { separator: r } = { ...Co, ...e }, n = Bo(t);
2400
2540
  return {
2401
2541
  get: (o, a) => o.split(r).map((s) => n.get(s, a)),
2402
2542
  set: (o, a) => {
@@ -2406,31 +2546,31 @@ function Vo(e, t = {}) {
2406
2546
  }
2407
2547
  };
2408
2548
  }
2409
- const Po = {
2549
+ const Vo = {
2410
2550
  separator: ","
2411
2551
  };
2412
- function Zo(e, t = {}) {
2413
- const { separator: r } = { ...Po, ...t };
2552
+ function Fo(t, e = {}) {
2553
+ const { separator: r } = { ...Vo, ...e };
2414
2554
  return {
2415
2555
  get: (n) => {
2416
2556
  const o = n.split(r);
2417
- return e.map((a, s) => re(o.at(s), a));
2557
+ return t.map((a, s) => nt(o.at(s), a));
2418
2558
  },
2419
2559
  set: (n, { invalid: o }) => {
2420
2560
  if (!Array.isArray(n))
2421
2561
  throw o("Expected a tuple");
2422
- if (n.length !== e.length)
2423
- throw o(`Expected tuple with ${e.length} values but received ${n.length} values`);
2424
- return e.map((a, s) => ne(n.at(s), a)).join(r);
2562
+ if (n.length !== t.length)
2563
+ throw o(`Expected tuple with ${t.length} values but received ${n.length} values`);
2564
+ return t.map((a, s) => ot(n.at(s), a)).join(r);
2425
2565
  }
2426
2566
  };
2427
2567
  }
2428
- const jo = z, Oo = z, $o = z;
2429
- function Ho(e) {
2430
- const t = ot(), r = Gt(e.name), n = Y(e.path), o = Y(e.query), a = Y(e.hash), s = e.meta ?? {}, l = Y(e.host), p = Ae({ id: t, meta: {}, state: {}, ...e }), c = {
2431
- id: t,
2432
- matched: p,
2433
- matches: [p],
2568
+ const To = Q, Mo = Q, Wo = Q;
2569
+ function Go(t) {
2570
+ const e = pe(), r = nr(t.name), n = X(t.path), o = X(t.query), a = X(t.hash), s = t.meta ?? {}, l = X(t.host), d = Nt({ id: e, meta: {}, state: {}, ...t }), i = {
2571
+ id: e,
2572
+ matched: d,
2573
+ matches: [d],
2434
2574
  name: r,
2435
2575
  host: l,
2436
2576
  path: n,
@@ -2439,37 +2579,37 @@ function Ho(e) {
2439
2579
  meta: s,
2440
2580
  depth: 1,
2441
2581
  state: {}
2442
- }, y = Tt(e) ? Wt(e.parent, c) : c;
2443
- return ge(y.path.params, y.query.params, y.host.params, y.hash.params), y;
2582
+ }, m = Xe(t) ? rr(t.parent, i) : i;
2583
+ return Et(m.path.params, m.query.params, m.host.params, m.hash.params), m;
2444
2584
  }
2445
2585
  export {
2446
- $r as DuplicateParamsError,
2447
- Hr as MetaPropertyConflict,
2448
- xn as RouterLink,
2449
- ye as RouterNotInstalledError,
2450
- fr as RouterView,
2451
- _r as UseRouteInvalidError,
2452
- Vo as arrayOf,
2453
- Lt as asUrl,
2454
- Ho as createExternalRoute,
2455
- Dr as createParam,
2456
- he as createRoute,
2457
- Co as createRouter,
2458
- No as createRouterPlugin,
2459
- Oo as host,
2460
- ar as isRoute,
2586
+ Tr as DuplicateParamsError,
2587
+ Mr as MetaPropertyConflict,
2588
+ $n as RouterLink,
2589
+ wt as RouterNotInstalledError,
2590
+ Rr as RouterView,
2591
+ Wr as UseRouteInvalidError,
2592
+ Do as arrayOf,
2593
+ $e as asUrl,
2594
+ Go as createExternalRoute,
2595
+ Qr as createParam,
2596
+ yt as createRoute,
2597
+ Io as createRouter,
2598
+ Jo as createRouterPlugin,
2599
+ Mo as host,
2600
+ dr as isRoute,
2461
2601
  M as isUrl,
2462
- Lo as onAfterRouteLeave,
2463
- Bo as onAfterRouteUpdate,
2464
- xo as onBeforeRouteLeave,
2465
- Uo as onBeforeRouteUpdate,
2466
- jo as path,
2467
- $o as query,
2468
- Zo as tupleOf,
2469
- Eo as unionOf,
2470
- An as useLink,
2471
- cr as useRoute,
2472
- Ge as useRouter,
2473
- ko as withDefault,
2474
- z as withParams
2602
+ _o as onAfterRouteLeave,
2603
+ qo as onAfterRouteUpdate,
2604
+ $o as onBeforeRouteLeave,
2605
+ Ho as onBeforeRouteUpdate,
2606
+ To as path,
2607
+ Wo as query,
2608
+ Fo as tupleOf,
2609
+ Bo as unionOf,
2610
+ On as useLink,
2611
+ yr as useRoute,
2612
+ ee as useRouter,
2613
+ jo as withDefault,
2614
+ Q as withParams
2475
2615
  };