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