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