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