@argon-router/core 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +437 -408
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createEffect as
|
|
2
|
-
import { spread as
|
|
3
|
-
function
|
|
1
|
+
import { createEffect as R, createStore as A, createEvent as x, sample as w, split as ue, attach as z, scopeBind as le, withFactory as de } from "effector";
|
|
2
|
+
import { spread as pe } from "patronum";
|
|
3
|
+
function K(e, t) {
|
|
4
4
|
var r = Object.keys(e);
|
|
5
5
|
if (Object.getOwnPropertySymbols) {
|
|
6
6
|
var n = Object.getOwnPropertySymbols(e);
|
|
@@ -10,25 +10,25 @@ function V(e, t) {
|
|
|
10
10
|
}
|
|
11
11
|
return r;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function T(e) {
|
|
14
14
|
for (var t = 1; t < arguments.length; t++) {
|
|
15
15
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
16
|
-
t % 2 ?
|
|
17
|
-
|
|
18
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) :
|
|
16
|
+
t % 2 ? K(Object(r), !0).forEach(function(n) {
|
|
17
|
+
me(e, n, r[n]);
|
|
18
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : K(Object(r)).forEach(function(n) {
|
|
19
19
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
return e;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
return (t =
|
|
24
|
+
function me(e, t, r) {
|
|
25
|
+
return (t = ye(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
var t =
|
|
27
|
+
function ye(e) {
|
|
28
|
+
var t = ge(e, "string");
|
|
29
29
|
return typeof t == "symbol" ? t : t + "";
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function ge(e, t) {
|
|
32
32
|
if (typeof e != "object" || !e) return e;
|
|
33
33
|
var r = e[Symbol.toPrimitive];
|
|
34
34
|
if (r !== void 0) {
|
|
@@ -38,128 +38,131 @@ function ye(e, t) {
|
|
|
38
38
|
}
|
|
39
39
|
return (t === "string" ? String : Number)(e);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function We(e) {
|
|
42
42
|
let t;
|
|
43
|
-
const r =
|
|
44
|
-
var
|
|
45
|
-
return (
|
|
43
|
+
const r = R(() => {
|
|
44
|
+
var d;
|
|
45
|
+
return (d = t) === null || d === void 0 ? void 0 : d();
|
|
46
46
|
}, {
|
|
47
47
|
name: "waitForAsyncBundleFx",
|
|
48
48
|
sid: "tw7mq7"
|
|
49
|
-
}), n =
|
|
50
|
-
for (const
|
|
51
|
-
var
|
|
52
|
-
await
|
|
49
|
+
}), n = R(async () => {
|
|
50
|
+
for (const O of (d = e.beforeOpen) !== null && d !== void 0 ? d : []) {
|
|
51
|
+
var d;
|
|
52
|
+
await O();
|
|
53
53
|
}
|
|
54
54
|
}, {
|
|
55
55
|
name: "beforeOpenFx",
|
|
56
56
|
sid: "ls74w9"
|
|
57
|
-
}), a =
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
}), a = R(async (d) => {
|
|
58
|
+
await r(), await n();
|
|
59
|
+
const O = e.parent;
|
|
60
|
+
return O && await O.internal.openFx(T(T({}, d ?? {
|
|
61
|
+
params: {}
|
|
62
|
+
}), {}, {
|
|
63
|
+
historyIgnore: !0
|
|
64
|
+
})), d;
|
|
65
|
+
}, {
|
|
62
66
|
name: "openFx",
|
|
63
67
|
sid: "-hz9h5i"
|
|
64
|
-
}), s =
|
|
68
|
+
}), s = A({}, {
|
|
65
69
|
name: "$params",
|
|
66
|
-
sid: "
|
|
67
|
-
}),
|
|
70
|
+
sid: "gwsfoy"
|
|
71
|
+
}), o = A(!1, {
|
|
68
72
|
name: "$isOpened",
|
|
69
|
-
sid: "
|
|
70
|
-
}),
|
|
73
|
+
sid: "ym3mgh"
|
|
74
|
+
}), i = a.pending, c = x({
|
|
71
75
|
name: "open",
|
|
72
|
-
sid: "-
|
|
76
|
+
sid: "-da1fdx"
|
|
73
77
|
}), u = x({
|
|
74
78
|
name: "close",
|
|
75
|
-
sid: "
|
|
76
|
-
}),
|
|
79
|
+
sid: "6wt8sn"
|
|
80
|
+
}), m = x({
|
|
77
81
|
name: "opened",
|
|
78
|
-
sid: "
|
|
79
|
-
}),
|
|
82
|
+
sid: "36opn9"
|
|
83
|
+
}), y = x({
|
|
80
84
|
name: "openedOnServer",
|
|
81
|
-
sid: "-
|
|
82
|
-
}),
|
|
85
|
+
sid: "-qpnfqf"
|
|
86
|
+
}), h = x({
|
|
83
87
|
name: "openedOnClient",
|
|
84
|
-
sid: "-
|
|
85
|
-
}),
|
|
88
|
+
sid: "-qs3xog"
|
|
89
|
+
}), F = x({
|
|
86
90
|
name: "closed",
|
|
87
|
-
sid: "
|
|
91
|
+
sid: "2gopr"
|
|
88
92
|
});
|
|
89
|
-
return
|
|
93
|
+
return w({
|
|
90
94
|
and: [{
|
|
91
|
-
clock:
|
|
95
|
+
clock: c,
|
|
92
96
|
target: a
|
|
93
97
|
}],
|
|
94
98
|
or: {
|
|
95
|
-
sid: "
|
|
99
|
+
sid: "t6sc35"
|
|
96
100
|
}
|
|
97
|
-
}),
|
|
101
|
+
}), ue({
|
|
98
102
|
and: [{
|
|
99
103
|
source: a.doneData,
|
|
100
104
|
match: () => typeof window > "u" ? "server" : "client",
|
|
101
105
|
cases: {
|
|
102
|
-
server:
|
|
103
|
-
client:
|
|
106
|
+
server: y,
|
|
107
|
+
client: h
|
|
104
108
|
}
|
|
105
109
|
}],
|
|
106
110
|
or: {
|
|
107
|
-
sid: "
|
|
111
|
+
sid: "t9jb1y"
|
|
108
112
|
}
|
|
109
|
-
}),
|
|
113
|
+
}), w({
|
|
110
114
|
and: [{
|
|
111
|
-
clock: [
|
|
112
|
-
target:
|
|
115
|
+
clock: [h, y],
|
|
116
|
+
target: m
|
|
113
117
|
}],
|
|
114
118
|
or: {
|
|
115
|
-
sid: "
|
|
119
|
+
sid: "tqkxg5"
|
|
116
120
|
}
|
|
117
|
-
}),
|
|
121
|
+
}), w({
|
|
118
122
|
and: [{
|
|
119
|
-
clock:
|
|
123
|
+
clock: m,
|
|
120
124
|
fn: () => !0,
|
|
121
|
-
target:
|
|
125
|
+
target: o
|
|
122
126
|
}],
|
|
123
127
|
or: {
|
|
124
|
-
sid: "
|
|
128
|
+
sid: "u4vkvj"
|
|
125
129
|
}
|
|
126
|
-
}),
|
|
130
|
+
}), w({
|
|
127
131
|
and: [{
|
|
128
132
|
clock: u,
|
|
129
|
-
target:
|
|
133
|
+
target: F
|
|
130
134
|
}],
|
|
131
135
|
or: {
|
|
132
|
-
sid: "
|
|
136
|
+
sid: "u86cfp"
|
|
133
137
|
}
|
|
134
|
-
}),
|
|
138
|
+
}), w({
|
|
135
139
|
and: [{
|
|
136
|
-
clock:
|
|
140
|
+
clock: F,
|
|
137
141
|
fn: () => !1,
|
|
138
|
-
target:
|
|
142
|
+
target: o
|
|
139
143
|
}],
|
|
140
144
|
or: {
|
|
141
|
-
sid: "
|
|
145
|
+
sid: "ylqojg"
|
|
142
146
|
}
|
|
143
147
|
}), {
|
|
144
148
|
$params: s,
|
|
145
|
-
$isOpened:
|
|
146
|
-
$isPending:
|
|
147
|
-
open:
|
|
148
|
-
closed:
|
|
149
|
-
opened:
|
|
150
|
-
openedOnClient:
|
|
151
|
-
openedOnServer:
|
|
152
|
-
internal:
|
|
153
|
-
index: !1,
|
|
149
|
+
$isOpened: o,
|
|
150
|
+
$isPending: i,
|
|
151
|
+
open: c,
|
|
152
|
+
closed: F,
|
|
153
|
+
opened: m,
|
|
154
|
+
openedOnClient: h,
|
|
155
|
+
openedOnServer: y,
|
|
156
|
+
internal: T({
|
|
154
157
|
close: u,
|
|
155
158
|
openFx: a,
|
|
156
|
-
setAsyncImport: (
|
|
159
|
+
setAsyncImport: (d) => t = d
|
|
157
160
|
}, e),
|
|
158
161
|
"@@unitShape": () => ({
|
|
159
162
|
params: s,
|
|
160
|
-
isPending:
|
|
161
|
-
isOpened:
|
|
162
|
-
onOpen:
|
|
163
|
+
isPending: i,
|
|
164
|
+
isOpened: o,
|
|
165
|
+
onOpen: c
|
|
163
166
|
})
|
|
164
167
|
};
|
|
165
168
|
}
|
|
@@ -168,11 +171,11 @@ Object.defineProperty(E, "__esModule", {
|
|
|
168
171
|
value: !0
|
|
169
172
|
});
|
|
170
173
|
E.TokenData = void 0;
|
|
171
|
-
E.parse =
|
|
172
|
-
var he = E.compile =
|
|
173
|
-
E.pathToRegexp =
|
|
174
|
-
E.stringify =
|
|
175
|
-
const
|
|
174
|
+
E.parse = M;
|
|
175
|
+
var he = E.compile = Se, be = E.match = je;
|
|
176
|
+
E.pathToRegexp = ee;
|
|
177
|
+
E.stringify = Ne;
|
|
178
|
+
const _ = "/", q = (e) => e, Y = /^[$_\p{ID_Start}]$/u, L = /^[$\u200c\u200d\p{ID_Continue}]$/u, k = "https://git.new/pathToRegexpError", we = {
|
|
176
179
|
// Groups.
|
|
177
180
|
"{": "{",
|
|
178
181
|
"}": "}",
|
|
@@ -185,19 +188,19 @@ const U = "/", _ = (e) => e, X = /^[$_\p{ID_Start}]$/u, q = /^[$\u200c\u200d\p{I
|
|
|
185
188
|
"?": "?",
|
|
186
189
|
"!": "!"
|
|
187
190
|
};
|
|
188
|
-
function
|
|
191
|
+
function xe(e) {
|
|
189
192
|
return e.replace(/[{}()\[\]+?!:*]/g, "\\$&");
|
|
190
193
|
}
|
|
191
194
|
function $(e) {
|
|
192
195
|
return e.replace(/[.+*?^${}()[\]|/\\]/g, "\\$&");
|
|
193
196
|
}
|
|
194
|
-
function*
|
|
197
|
+
function* Fe(e) {
|
|
195
198
|
const t = [...e];
|
|
196
199
|
let r = 0;
|
|
197
200
|
function n() {
|
|
198
201
|
let a = "";
|
|
199
|
-
if (
|
|
200
|
-
for (a += t[r];
|
|
202
|
+
if (Y.test(t[++r]))
|
|
203
|
+
for (a += t[r]; L.test(t[++r]); )
|
|
201
204
|
a += t[r];
|
|
202
205
|
else if (t[r] === '"') {
|
|
203
206
|
let s = r;
|
|
@@ -209,14 +212,14 @@ function* xe(e) {
|
|
|
209
212
|
t[r] === "\\" ? a += t[++r] : a += t[r];
|
|
210
213
|
}
|
|
211
214
|
if (s)
|
|
212
|
-
throw new TypeError(`Unterminated quote at ${s}: ${
|
|
215
|
+
throw new TypeError(`Unterminated quote at ${s}: ${k}`);
|
|
213
216
|
}
|
|
214
217
|
if (!a)
|
|
215
|
-
throw new TypeError(`Missing parameter name at ${r}: ${
|
|
218
|
+
throw new TypeError(`Missing parameter name at ${r}: ${k}`);
|
|
216
219
|
return a;
|
|
217
220
|
}
|
|
218
221
|
for (; r < t.length; ) {
|
|
219
|
-
const a = t[r], s =
|
|
222
|
+
const a = t[r], s = we[a];
|
|
220
223
|
if (s)
|
|
221
224
|
yield {
|
|
222
225
|
type: s,
|
|
@@ -230,18 +233,18 @@ function* xe(e) {
|
|
|
230
233
|
value: t[r++]
|
|
231
234
|
};
|
|
232
235
|
else if (a === ":") {
|
|
233
|
-
const
|
|
236
|
+
const o = n();
|
|
234
237
|
yield {
|
|
235
238
|
type: "PARAM",
|
|
236
239
|
index: r,
|
|
237
|
-
value:
|
|
240
|
+
value: o
|
|
238
241
|
};
|
|
239
242
|
} else if (a === "*") {
|
|
240
|
-
const
|
|
243
|
+
const o = n();
|
|
241
244
|
yield {
|
|
242
245
|
type: "WILDCARD",
|
|
243
246
|
index: r,
|
|
244
|
-
value:
|
|
247
|
+
value: o
|
|
245
248
|
};
|
|
246
249
|
} else
|
|
247
250
|
yield {
|
|
@@ -256,7 +259,7 @@ function* xe(e) {
|
|
|
256
259
|
value: ""
|
|
257
260
|
};
|
|
258
261
|
}
|
|
259
|
-
class
|
|
262
|
+
class $e {
|
|
260
263
|
constructor(t) {
|
|
261
264
|
this.tokens = t;
|
|
262
265
|
}
|
|
@@ -279,7 +282,7 @@ class Fe {
|
|
|
279
282
|
type: n,
|
|
280
283
|
index: a
|
|
281
284
|
} = this.peek();
|
|
282
|
-
throw new TypeError(`Unexpected ${n} at ${a}, expected ${t}: ${
|
|
285
|
+
throw new TypeError(`Unexpected ${n} at ${a}, expected ${t}: ${k}`);
|
|
283
286
|
}
|
|
284
287
|
text() {
|
|
285
288
|
let t = "", r;
|
|
@@ -288,95 +291,95 @@ class Fe {
|
|
|
288
291
|
return t;
|
|
289
292
|
}
|
|
290
293
|
}
|
|
291
|
-
class
|
|
294
|
+
class P {
|
|
292
295
|
constructor(t) {
|
|
293
296
|
this.tokens = t;
|
|
294
297
|
}
|
|
295
298
|
}
|
|
296
|
-
E.TokenData =
|
|
297
|
-
function
|
|
299
|
+
E.TokenData = P;
|
|
300
|
+
function M(e, t = {}) {
|
|
298
301
|
const {
|
|
299
|
-
encodePath: r =
|
|
300
|
-
} = t, n = new Fe(
|
|
301
|
-
function a(
|
|
302
|
-
const
|
|
302
|
+
encodePath: r = q
|
|
303
|
+
} = t, n = new $e(Fe(e));
|
|
304
|
+
function a(o) {
|
|
305
|
+
const i = [];
|
|
303
306
|
for (; ; ) {
|
|
304
|
-
const
|
|
305
|
-
|
|
307
|
+
const c = n.text();
|
|
308
|
+
c && i.push({
|
|
306
309
|
type: "text",
|
|
307
|
-
value: r(
|
|
310
|
+
value: r(c)
|
|
308
311
|
});
|
|
309
312
|
const u = n.tryConsume("PARAM");
|
|
310
313
|
if (u) {
|
|
311
|
-
|
|
314
|
+
i.push({
|
|
312
315
|
type: "param",
|
|
313
316
|
name: u
|
|
314
317
|
});
|
|
315
318
|
continue;
|
|
316
319
|
}
|
|
317
|
-
const
|
|
318
|
-
if (
|
|
319
|
-
|
|
320
|
+
const m = n.tryConsume("WILDCARD");
|
|
321
|
+
if (m) {
|
|
322
|
+
i.push({
|
|
320
323
|
type: "wildcard",
|
|
321
|
-
name:
|
|
324
|
+
name: m
|
|
322
325
|
});
|
|
323
326
|
continue;
|
|
324
327
|
}
|
|
325
328
|
if (n.tryConsume("{")) {
|
|
326
|
-
|
|
329
|
+
i.push({
|
|
327
330
|
type: "group",
|
|
328
331
|
tokens: a("}")
|
|
329
332
|
});
|
|
330
333
|
continue;
|
|
331
334
|
}
|
|
332
|
-
return n.consume(
|
|
335
|
+
return n.consume(o), i;
|
|
333
336
|
}
|
|
334
337
|
}
|
|
335
338
|
const s = a("END");
|
|
336
|
-
return new
|
|
339
|
+
return new P(s);
|
|
337
340
|
}
|
|
338
|
-
function
|
|
341
|
+
function Se(e, t = {}) {
|
|
339
342
|
const {
|
|
340
343
|
encode: r = encodeURIComponent,
|
|
341
|
-
delimiter: n =
|
|
342
|
-
} = t, a = e instanceof
|
|
343
|
-
return function(
|
|
344
|
-
const [
|
|
344
|
+
delimiter: n = _
|
|
345
|
+
} = t, a = e instanceof P ? e : M(e, t), s = Z(a.tokens, n, r);
|
|
346
|
+
return function(i = {}) {
|
|
347
|
+
const [c, ...u] = s(i);
|
|
345
348
|
if (u.length)
|
|
346
349
|
throw new TypeError(`Missing parameters: ${u.join(", ")}`);
|
|
347
|
-
return
|
|
350
|
+
return c;
|
|
348
351
|
};
|
|
349
352
|
}
|
|
350
|
-
function
|
|
351
|
-
const n = e.map((a) =>
|
|
353
|
+
function Z(e, t, r) {
|
|
354
|
+
const n = e.map((a) => Oe(a, t, r));
|
|
352
355
|
return (a) => {
|
|
353
356
|
const s = [""];
|
|
354
|
-
for (const
|
|
355
|
-
const [
|
|
356
|
-
s[0] +=
|
|
357
|
+
for (const o of n) {
|
|
358
|
+
const [i, ...c] = o(a);
|
|
359
|
+
s[0] += i, s.push(...c);
|
|
357
360
|
}
|
|
358
361
|
return s;
|
|
359
362
|
};
|
|
360
363
|
}
|
|
361
|
-
function
|
|
364
|
+
function Oe(e, t, r) {
|
|
362
365
|
if (e.type === "text") return () => [e.value];
|
|
363
366
|
if (e.type === "group") {
|
|
364
|
-
const a =
|
|
367
|
+
const a = Z(e.tokens, t, r);
|
|
365
368
|
return (s) => {
|
|
366
|
-
const [
|
|
367
|
-
return
|
|
369
|
+
const [o, ...i] = a(s);
|
|
370
|
+
return i.length ? [""] : [o];
|
|
368
371
|
};
|
|
369
372
|
}
|
|
370
|
-
const n = r ||
|
|
373
|
+
const n = r || q;
|
|
371
374
|
return e.type === "wildcard" && r !== !1 ? (a) => {
|
|
372
375
|
const s = a[e.name];
|
|
373
376
|
if (s == null) return ["", e.name];
|
|
374
377
|
if (!Array.isArray(s) || s.length === 0)
|
|
375
378
|
throw new TypeError(`Expected "${e.name}" to be a non-empty array`);
|
|
376
|
-
return [s.map((
|
|
377
|
-
if (typeof
|
|
378
|
-
throw new TypeError(`Expected "${e.name}/${
|
|
379
|
-
return n(
|
|
379
|
+
return [s.map((o, i) => {
|
|
380
|
+
if (typeof o != "string")
|
|
381
|
+
throw new TypeError(`Expected "${e.name}/${i}" to be a string`);
|
|
382
|
+
return n(o);
|
|
380
383
|
}).join(t)];
|
|
381
384
|
} : (a) => {
|
|
382
385
|
const s = a[e.name];
|
|
@@ -386,112 +389,112 @@ function Se(e, t, r) {
|
|
|
386
389
|
return [n(s)];
|
|
387
390
|
};
|
|
388
391
|
}
|
|
389
|
-
function
|
|
392
|
+
function je(e, t = {}) {
|
|
390
393
|
const {
|
|
391
394
|
decode: r = decodeURIComponent,
|
|
392
|
-
delimiter: n =
|
|
395
|
+
delimiter: n = _
|
|
393
396
|
} = t, {
|
|
394
397
|
regexp: a,
|
|
395
398
|
keys: s
|
|
396
|
-
} =
|
|
397
|
-
return function(
|
|
398
|
-
const u = a.exec(
|
|
399
|
+
} = ee(e, t), o = s.map((i) => r === !1 ? q : i.type === "param" ? r : (c) => c.split(n).map(r));
|
|
400
|
+
return function(c) {
|
|
401
|
+
const u = a.exec(c);
|
|
399
402
|
if (!u) return !1;
|
|
400
|
-
const
|
|
401
|
-
for (let
|
|
402
|
-
if (u[
|
|
403
|
-
const
|
|
404
|
-
|
|
403
|
+
const m = u[0], y = /* @__PURE__ */ Object.create(null);
|
|
404
|
+
for (let h = 1; h < u.length; h++) {
|
|
405
|
+
if (u[h] === void 0) continue;
|
|
406
|
+
const F = s[h - 1], d = o[h - 1];
|
|
407
|
+
y[F.name] = d(u[h]);
|
|
405
408
|
}
|
|
406
409
|
return {
|
|
407
|
-
path:
|
|
408
|
-
params:
|
|
410
|
+
path: m,
|
|
411
|
+
params: y
|
|
409
412
|
};
|
|
410
413
|
};
|
|
411
414
|
}
|
|
412
|
-
function
|
|
415
|
+
function ee(e, t = {}) {
|
|
413
416
|
const {
|
|
414
|
-
delimiter: r =
|
|
417
|
+
delimiter: r = _,
|
|
415
418
|
end: n = !0,
|
|
416
419
|
sensitive: a = !1,
|
|
417
420
|
trailing: s = !0
|
|
418
|
-
} = t,
|
|
421
|
+
} = t, o = [], i = [], c = a ? "" : "i", m = (Array.isArray(e) ? e : [e]).map((F) => F instanceof P ? F : M(F, t));
|
|
419
422
|
for (const {
|
|
420
|
-
tokens:
|
|
421
|
-
} of
|
|
422
|
-
for (const
|
|
423
|
-
const
|
|
424
|
-
|
|
423
|
+
tokens: F
|
|
424
|
+
} of m)
|
|
425
|
+
for (const d of I(F, 0, [])) {
|
|
426
|
+
const O = Ee(d, r, o);
|
|
427
|
+
i.push(O);
|
|
425
428
|
}
|
|
426
|
-
let
|
|
427
|
-
return s && (
|
|
428
|
-
regexp: new RegExp(
|
|
429
|
-
keys:
|
|
429
|
+
let y = `^(?:${i.join("|")})`;
|
|
430
|
+
return s && (y += `(?:${$(r)}$)?`), y += n ? "$" : `(?=${$(r)}|$)`, {
|
|
431
|
+
regexp: new RegExp(y, c),
|
|
432
|
+
keys: o
|
|
430
433
|
};
|
|
431
434
|
}
|
|
432
|
-
function*
|
|
435
|
+
function* I(e, t, r) {
|
|
433
436
|
if (t === e.length)
|
|
434
437
|
return yield r;
|
|
435
438
|
const n = e[t];
|
|
436
439
|
if (n.type === "group") {
|
|
437
440
|
const a = r.slice();
|
|
438
|
-
for (const s of
|
|
439
|
-
yield*
|
|
441
|
+
for (const s of I(n.tokens, 0, a))
|
|
442
|
+
yield* I(e, t + 1, s);
|
|
440
443
|
} else
|
|
441
444
|
r.push(n);
|
|
442
|
-
yield*
|
|
445
|
+
yield* I(e, t + 1, r);
|
|
443
446
|
}
|
|
444
447
|
function Ee(e, t, r) {
|
|
445
448
|
let n = "", a = "", s = !0;
|
|
446
|
-
for (let
|
|
447
|
-
const
|
|
448
|
-
if (
|
|
449
|
-
n += $(
|
|
449
|
+
for (let o = 0; o < e.length; o++) {
|
|
450
|
+
const i = e[o];
|
|
451
|
+
if (i.type === "text") {
|
|
452
|
+
n += $(i.value), a += i.value, s || (s = i.value.includes(t));
|
|
450
453
|
continue;
|
|
451
454
|
}
|
|
452
|
-
if (
|
|
455
|
+
if (i.type === "param" || i.type === "wildcard") {
|
|
453
456
|
if (!s && !a)
|
|
454
|
-
throw new TypeError(`Missing text after "${
|
|
455
|
-
|
|
457
|
+
throw new TypeError(`Missing text after "${i.name}": ${k}`);
|
|
458
|
+
i.type === "param" ? n += `(${Ae(t, s ? "" : a)}+)` : n += "([\\s\\S]+)", r.push(i), a = "", s = !1;
|
|
456
459
|
continue;
|
|
457
460
|
}
|
|
458
461
|
}
|
|
459
462
|
return n;
|
|
460
463
|
}
|
|
461
|
-
function
|
|
464
|
+
function Ae(e, t) {
|
|
462
465
|
return t.length < 2 ? e.length < 2 ? `[^${$(e + t)}]` : `(?:(?!${$(e)})[^${$(t)}])` : e.length < 2 ? `(?:(?!${$(t)})[^${$(e)}])` : `(?:(?!${$(t)}|${$(e)})[\\s\\S])`;
|
|
463
466
|
}
|
|
464
|
-
function
|
|
467
|
+
function Ne(e) {
|
|
465
468
|
return e.tokens.map(function t(r, n, a) {
|
|
466
|
-
if (r.type === "text") return
|
|
469
|
+
if (r.type === "text") return xe(r.value);
|
|
467
470
|
if (r.type === "group")
|
|
468
471
|
return `{${r.tokens.map(t).join("")}}`;
|
|
469
|
-
const
|
|
470
|
-
if (r.type === "param") return `:${
|
|
471
|
-
if (r.type === "wildcard") return `*${
|
|
472
|
+
const o = Re(r.name) && Ie(a[n + 1]) ? r.name : JSON.stringify(r.name);
|
|
473
|
+
if (r.type === "param") return `:${o}`;
|
|
474
|
+
if (r.type === "wildcard") return `*${o}`;
|
|
472
475
|
throw new TypeError(`Unexpected token: ${r}`);
|
|
473
476
|
}).join("");
|
|
474
477
|
}
|
|
475
|
-
function
|
|
478
|
+
function Re(e) {
|
|
476
479
|
const [t, ...r] = e;
|
|
477
|
-
return
|
|
480
|
+
return Y.test(t) ? r.every((n) => L.test(n)) : !1;
|
|
478
481
|
}
|
|
479
|
-
function
|
|
480
|
-
return (e == null ? void 0 : e.type) !== "text" ? !0 : !
|
|
482
|
+
function Ie(e) {
|
|
483
|
+
return (e == null ? void 0 : e.type) !== "text" ? !0 : !L.test(e.value[0]);
|
|
481
484
|
}
|
|
482
|
-
const
|
|
483
|
-
any:
|
|
484
|
-
number:
|
|
485
|
-
string:
|
|
486
|
-
array:
|
|
485
|
+
const ke = Symbol("any"), Pe = Symbol("number"), Ce = Symbol("string"), Te = Symbol("array"), j = {
|
|
486
|
+
any: ke,
|
|
487
|
+
number: Pe,
|
|
488
|
+
string: Ce,
|
|
489
|
+
array: Te
|
|
487
490
|
};
|
|
488
|
-
function
|
|
491
|
+
function J(e, t) {
|
|
489
492
|
for (const r of e)
|
|
490
493
|
if (!t.includes(r))
|
|
491
494
|
return !1;
|
|
492
495
|
return !0;
|
|
493
496
|
}
|
|
494
|
-
function
|
|
497
|
+
function Q(e, t) {
|
|
495
498
|
for (const r in t) {
|
|
496
499
|
const n = t[r];
|
|
497
500
|
if (Array.isArray(n) && (!e[r] || JSON.stringify(n) !== e[r]))
|
|
@@ -519,22 +522,22 @@ function J(e, t) {
|
|
|
519
522
|
}
|
|
520
523
|
}
|
|
521
524
|
switch (n) {
|
|
522
|
-
case
|
|
525
|
+
case j.any: {
|
|
523
526
|
if (!e[r])
|
|
524
527
|
return !1;
|
|
525
528
|
break;
|
|
526
529
|
}
|
|
527
|
-
case
|
|
530
|
+
case j.string: {
|
|
528
531
|
if (!e[r] || Array.isArray(e[r]))
|
|
529
532
|
return !1;
|
|
530
533
|
break;
|
|
531
534
|
}
|
|
532
|
-
case
|
|
535
|
+
case j.array: {
|
|
533
536
|
if (!e[r] || !Array.isArray(e[r]))
|
|
534
537
|
return !1;
|
|
535
538
|
break;
|
|
536
539
|
}
|
|
537
|
-
case
|
|
540
|
+
case j.number: {
|
|
538
541
|
if (!e[r] || Array.isArray(e[r]) || isNaN(parseInt(e[r])) && isNaN(parseFloat(e[r])))
|
|
539
542
|
return !1;
|
|
540
543
|
break;
|
|
@@ -543,7 +546,7 @@ function J(e, t) {
|
|
|
543
546
|
}
|
|
544
547
|
return !0;
|
|
545
548
|
}
|
|
546
|
-
function
|
|
549
|
+
function ve(e, t) {
|
|
547
550
|
const r = {};
|
|
548
551
|
for (const n in t) {
|
|
549
552
|
const a = t[n], s = e[n];
|
|
@@ -553,8 +556,8 @@ function Te(e, t) {
|
|
|
553
556
|
}
|
|
554
557
|
switch (typeof a) {
|
|
555
558
|
case "number": {
|
|
556
|
-
const
|
|
557
|
-
r[n] = isNaN(parseInt(
|
|
559
|
+
const o = e[n];
|
|
560
|
+
r[n] = isNaN(parseInt(o)) ? parseFloat(o) : parseInt(o);
|
|
558
561
|
break;
|
|
559
562
|
}
|
|
560
563
|
case "object": {
|
|
@@ -564,21 +567,21 @@ function Te(e, t) {
|
|
|
564
567
|
case "string":
|
|
565
568
|
r[n] = e[n];
|
|
566
569
|
case "boolean": {
|
|
567
|
-
const
|
|
568
|
-
r[n] =
|
|
570
|
+
const o = e[n];
|
|
571
|
+
r[n] = o === "0" ? parseFloat(o) : parseInt(o);
|
|
569
572
|
break;
|
|
570
573
|
}
|
|
571
574
|
}
|
|
572
575
|
switch (a) {
|
|
573
|
-
case
|
|
574
|
-
case
|
|
575
|
-
case
|
|
576
|
+
case j.any:
|
|
577
|
+
case j.string:
|
|
578
|
+
case j.array: {
|
|
576
579
|
r[n] = e[n];
|
|
577
580
|
break;
|
|
578
581
|
}
|
|
579
|
-
case
|
|
580
|
-
const
|
|
581
|
-
r[n] = isNaN(parseInt(
|
|
582
|
+
case j.number: {
|
|
583
|
+
const o = e[n];
|
|
584
|
+
r[n] = isNaN(parseInt(o)) ? parseFloat(o) : parseInt(o);
|
|
582
585
|
break;
|
|
583
586
|
}
|
|
584
587
|
}
|
|
@@ -593,66 +596,66 @@ function De(e, t) {
|
|
|
593
596
|
} = r, s = x({
|
|
594
597
|
name: "entered",
|
|
595
598
|
sid: "-d3obu6"
|
|
596
|
-
}),
|
|
599
|
+
}), o = x({
|
|
597
600
|
name: "exited",
|
|
598
601
|
sid: "-xofyk3"
|
|
599
|
-
}),
|
|
602
|
+
}), i = x({
|
|
600
603
|
name: "exit",
|
|
601
604
|
sid: "-673d76"
|
|
602
605
|
});
|
|
603
|
-
return
|
|
606
|
+
return w({
|
|
604
607
|
and: [{
|
|
605
608
|
source: {
|
|
606
609
|
activeRoutes: e,
|
|
607
610
|
query: t
|
|
608
611
|
},
|
|
609
|
-
filter: (
|
|
612
|
+
filter: (c) => {
|
|
610
613
|
let {
|
|
611
614
|
activeRoutes: u,
|
|
612
|
-
query:
|
|
613
|
-
} =
|
|
614
|
-
return (!a ||
|
|
615
|
+
query: m
|
|
616
|
+
} = c;
|
|
617
|
+
return (!a || J(a, u)) && Q(m, n);
|
|
615
618
|
},
|
|
616
|
-
fn: (
|
|
619
|
+
fn: (c) => {
|
|
617
620
|
let {
|
|
618
621
|
query: u
|
|
619
|
-
} =
|
|
620
|
-
return
|
|
622
|
+
} = c;
|
|
623
|
+
return ve(u, n);
|
|
621
624
|
}
|
|
622
625
|
}],
|
|
623
626
|
or: {
|
|
624
627
|
sid: "-so0f9q"
|
|
625
628
|
}
|
|
626
|
-
}),
|
|
629
|
+
}), w({
|
|
627
630
|
and: [{
|
|
628
631
|
source: {
|
|
629
632
|
activeRoutes: e,
|
|
630
633
|
query: t
|
|
631
634
|
},
|
|
632
|
-
filter: (
|
|
635
|
+
filter: (c) => {
|
|
633
636
|
let {
|
|
634
637
|
activeRoutes: u,
|
|
635
|
-
query:
|
|
636
|
-
} =
|
|
637
|
-
return !((!a ||
|
|
638
|
+
query: m
|
|
639
|
+
} = c;
|
|
640
|
+
return !((!a || J(a, u)) && Q(m, n));
|
|
638
641
|
},
|
|
639
|
-
target:
|
|
642
|
+
target: o
|
|
640
643
|
}],
|
|
641
644
|
or: {
|
|
642
645
|
sid: "-s82e29"
|
|
643
646
|
}
|
|
644
647
|
}), {
|
|
645
648
|
entered: s,
|
|
646
|
-
exited:
|
|
647
|
-
exit:
|
|
648
|
-
getPayload: (
|
|
649
|
-
let [
|
|
650
|
-
return typeof n[
|
|
649
|
+
exited: o,
|
|
650
|
+
exit: i,
|
|
651
|
+
getPayload: (c) => Object.entries(c).reduce((u, m) => {
|
|
652
|
+
let [y, h] = m;
|
|
653
|
+
return typeof n[y] == "symbol" ? u[y] = h : u[y] = n[y], u;
|
|
651
654
|
}, {})
|
|
652
655
|
};
|
|
653
656
|
};
|
|
654
657
|
}
|
|
655
|
-
const
|
|
658
|
+
const re = "%[a-f0-9]{2}", W = new RegExp("(" + re + ")|([^%]+?)", "gi"), G = new RegExp("(" + re + ")+", "gi");
|
|
656
659
|
function D(e, t) {
|
|
657
660
|
try {
|
|
658
661
|
return [decodeURIComponent(e.join(""))];
|
|
@@ -664,30 +667,30 @@ function D(e, t) {
|
|
|
664
667
|
const r = e.slice(0, t), n = e.slice(t);
|
|
665
668
|
return Array.prototype.concat.call([], D(r), D(n));
|
|
666
669
|
}
|
|
667
|
-
function
|
|
670
|
+
function Ue(e) {
|
|
668
671
|
try {
|
|
669
672
|
return decodeURIComponent(e);
|
|
670
673
|
} catch {
|
|
671
|
-
let t = e.match(
|
|
674
|
+
let t = e.match(W) || [];
|
|
672
675
|
for (let r = 1; r < t.length; r++)
|
|
673
|
-
e = D(t, r).join(""), t = e.match(
|
|
676
|
+
e = D(t, r).join(""), t = e.match(W) || [];
|
|
674
677
|
return e;
|
|
675
678
|
}
|
|
676
679
|
}
|
|
677
|
-
function
|
|
680
|
+
function _e(e) {
|
|
678
681
|
const t = {
|
|
679
682
|
"%FE%FF": "��",
|
|
680
683
|
"%FF%FE": "��"
|
|
681
684
|
};
|
|
682
|
-
let r =
|
|
685
|
+
let r = G.exec(e);
|
|
683
686
|
for (; r; ) {
|
|
684
687
|
try {
|
|
685
688
|
t[r[0]] = decodeURIComponent(r[0]);
|
|
686
689
|
} catch {
|
|
687
|
-
const a =
|
|
690
|
+
const a = Ue(r[0]);
|
|
688
691
|
a !== r[0] && (t[r[0]] = a);
|
|
689
692
|
}
|
|
690
|
-
r =
|
|
693
|
+
r = G.exec(e);
|
|
691
694
|
}
|
|
692
695
|
t["%C2"] = "�";
|
|
693
696
|
const n = Object.keys(t);
|
|
@@ -695,16 +698,16 @@ function Ue(e) {
|
|
|
695
698
|
e = e.replace(new RegExp(a, "g"), t[a]);
|
|
696
699
|
return e;
|
|
697
700
|
}
|
|
698
|
-
function
|
|
701
|
+
function qe(e) {
|
|
699
702
|
if (typeof e != "string")
|
|
700
703
|
throw new TypeError("Expected `encodedURI` to be of type `string`, got `" + typeof e + "`");
|
|
701
704
|
try {
|
|
702
705
|
return decodeURIComponent(e);
|
|
703
706
|
} catch {
|
|
704
|
-
return
|
|
707
|
+
return _e(e);
|
|
705
708
|
}
|
|
706
709
|
}
|
|
707
|
-
function
|
|
710
|
+
function Le(e, t) {
|
|
708
711
|
const r = {};
|
|
709
712
|
if (Array.isArray(t))
|
|
710
713
|
for (const n of t) {
|
|
@@ -721,7 +724,7 @@ function qe(e, t) {
|
|
|
721
724
|
}
|
|
722
725
|
return r;
|
|
723
726
|
}
|
|
724
|
-
function
|
|
727
|
+
function te(e, t) {
|
|
725
728
|
if (!(typeof e == "string" && typeof t == "string"))
|
|
726
729
|
throw new TypeError("Expected the arguments to be of type `string`");
|
|
727
730
|
if (e === "" || t === "")
|
|
@@ -729,29 +732,29 @@ function re(e, t) {
|
|
|
729
732
|
const r = e.indexOf(t);
|
|
730
733
|
return r === -1 ? [] : [e.slice(0, r), e.slice(r + t.length)];
|
|
731
734
|
}
|
|
732
|
-
const
|
|
733
|
-
function
|
|
735
|
+
const Me = (e) => e == null, Be = (e) => encodeURIComponent(e).replaceAll(/[!'()*]/g, (t) => `%${t.charCodeAt(0).toString(16).toUpperCase()}`), U = Symbol("encodeFragmentIdentifier");
|
|
736
|
+
function He(e) {
|
|
734
737
|
switch (e.arrayFormat) {
|
|
735
738
|
case "index":
|
|
736
739
|
return (t) => (r, n) => {
|
|
737
740
|
const a = r.length;
|
|
738
|
-
return n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [
|
|
741
|
+
return n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [p(t, e), "[", a, "]"].join("")] : [...r, [p(t, e), "[", p(a, e), "]=", p(n, e)].join("")];
|
|
739
742
|
};
|
|
740
743
|
case "bracket":
|
|
741
|
-
return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [
|
|
744
|
+
return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [p(t, e), "[]"].join("")] : [...r, [p(t, e), "[]=", p(n, e)].join("")];
|
|
742
745
|
case "colon-list-separator":
|
|
743
|
-
return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [
|
|
746
|
+
return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [p(t, e), ":list="].join("")] : [...r, [p(t, e), ":list=", p(n, e)].join("")];
|
|
744
747
|
case "comma":
|
|
745
748
|
case "separator":
|
|
746
749
|
case "bracket-separator": {
|
|
747
750
|
const t = e.arrayFormat === "bracket-separator" ? "[]=" : "=";
|
|
748
|
-
return (r) => (n, a) => a === void 0 || e.skipNull && a === null || e.skipEmptyString && a === "" ? n : (a = a === null ? "" : a, n.length === 0 ? [[
|
|
751
|
+
return (r) => (n, a) => a === void 0 || e.skipNull && a === null || e.skipEmptyString && a === "" ? n : (a = a === null ? "" : a, n.length === 0 ? [[p(r, e), t, p(a, e)].join("")] : [[n, p(a, e)].join(e.arrayFormatSeparator)]);
|
|
749
752
|
}
|
|
750
753
|
default:
|
|
751
|
-
return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r,
|
|
754
|
+
return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, p(t, e)] : [...r, [p(t, e), "=", p(n, e)].join("")];
|
|
752
755
|
}
|
|
753
756
|
}
|
|
754
|
-
function
|
|
757
|
+
function Ve(e) {
|
|
755
758
|
let t;
|
|
756
759
|
switch (e.arrayFormat) {
|
|
757
760
|
case "index":
|
|
@@ -789,10 +792,10 @@ function Be(e) {
|
|
|
789
792
|
case "comma":
|
|
790
793
|
case "separator":
|
|
791
794
|
return (r, n, a) => {
|
|
792
|
-
const s = typeof n == "string" && n.includes(e.arrayFormatSeparator),
|
|
793
|
-
n =
|
|
794
|
-
const
|
|
795
|
-
a[r] =
|
|
795
|
+
const s = typeof n == "string" && n.includes(e.arrayFormatSeparator), o = typeof n == "string" && !s && S(n, e).includes(e.arrayFormatSeparator);
|
|
796
|
+
n = o ? S(n, e) : n;
|
|
797
|
+
const i = s || o ? n.split(e.arrayFormatSeparator).map((c) => S(c, e)) : n === null ? n : S(n, e);
|
|
798
|
+
a[r] = i;
|
|
796
799
|
};
|
|
797
800
|
case "bracket-separator":
|
|
798
801
|
return (r, n, a) => {
|
|
@@ -801,12 +804,12 @@ function Be(e) {
|
|
|
801
804
|
a[r] = n && S(n, e);
|
|
802
805
|
return;
|
|
803
806
|
}
|
|
804
|
-
const
|
|
807
|
+
const o = n === null ? [] : S(n, e).split(e.arrayFormatSeparator);
|
|
805
808
|
if (a[r] === void 0) {
|
|
806
|
-
a[r] =
|
|
809
|
+
a[r] = o;
|
|
807
810
|
return;
|
|
808
811
|
}
|
|
809
|
-
a[r] = [...a[r], ...
|
|
812
|
+
a[r] = [...a[r], ...o];
|
|
810
813
|
};
|
|
811
814
|
default:
|
|
812
815
|
return (r, n, a) => {
|
|
@@ -818,37 +821,37 @@ function Be(e) {
|
|
|
818
821
|
};
|
|
819
822
|
}
|
|
820
823
|
}
|
|
821
|
-
function
|
|
824
|
+
function ne(e) {
|
|
822
825
|
if (typeof e != "string" || e.length !== 1)
|
|
823
826
|
throw new TypeError("arrayFormatSeparator must be single character string");
|
|
824
827
|
}
|
|
825
|
-
function
|
|
826
|
-
return t.encode ? t.strict ?
|
|
828
|
+
function p(e, t) {
|
|
829
|
+
return t.encode ? t.strict ? Be(e) : encodeURIComponent(e) : e;
|
|
827
830
|
}
|
|
828
831
|
function S(e, t) {
|
|
829
|
-
return t.decode ?
|
|
830
|
-
}
|
|
831
|
-
function ne(e) {
|
|
832
|
-
return Array.isArray(e) ? e.sort() : typeof e == "object" ? ne(Object.keys(e)).sort((t, r) => Number(t) - Number(r)).map((t) => e[t]) : e;
|
|
832
|
+
return t.decode ? qe(e) : e;
|
|
833
833
|
}
|
|
834
834
|
function ae(e) {
|
|
835
|
+
return Array.isArray(e) ? e.sort() : typeof e == "object" ? ae(Object.keys(e)).sort((t, r) => Number(t) - Number(r)).map((t) => e[t]) : e;
|
|
836
|
+
}
|
|
837
|
+
function se(e) {
|
|
835
838
|
const t = e.indexOf("#");
|
|
836
839
|
return t !== -1 && (e = e.slice(0, t)), e;
|
|
837
840
|
}
|
|
838
|
-
function
|
|
841
|
+
function ze(e) {
|
|
839
842
|
let t = "";
|
|
840
843
|
const r = e.indexOf("#");
|
|
841
844
|
return r !== -1 && (t = e.slice(r)), t;
|
|
842
845
|
}
|
|
843
|
-
function
|
|
846
|
+
function X(e, t, r) {
|
|
844
847
|
return r === "string" && typeof e == "string" ? e : typeof r == "function" && typeof e == "string" ? r(e) : t.parseBooleans && e !== null && (e.toLowerCase() === "true" || e.toLowerCase() === "false") ? e.toLowerCase() === "true" : r === "number" && !Number.isNaN(Number(e)) && typeof e == "string" && e.trim() !== "" || t.parseNumbers && !Number.isNaN(Number(e)) && typeof e == "string" && e.trim() !== "" ? Number(e) : e;
|
|
845
848
|
}
|
|
846
|
-
function
|
|
847
|
-
e =
|
|
849
|
+
function B(e) {
|
|
850
|
+
e = se(e);
|
|
848
851
|
const t = e.indexOf("?");
|
|
849
852
|
return t === -1 ? "" : e.slice(t + 1);
|
|
850
853
|
}
|
|
851
|
-
function
|
|
854
|
+
function H(e, t) {
|
|
852
855
|
t = {
|
|
853
856
|
decode: !0,
|
|
854
857
|
sort: !0,
|
|
@@ -858,30 +861,30 @@ function z(e, t) {
|
|
|
858
861
|
parseBooleans: !1,
|
|
859
862
|
types: /* @__PURE__ */ Object.create(null),
|
|
860
863
|
...t
|
|
861
|
-
},
|
|
862
|
-
const r =
|
|
864
|
+
}, ne(t.arrayFormatSeparator);
|
|
865
|
+
const r = Ve(t), n = /* @__PURE__ */ Object.create(null);
|
|
863
866
|
if (typeof e != "string" || (e = e.trim().replace(/^[?#&]/, ""), !e))
|
|
864
867
|
return n;
|
|
865
868
|
for (const a of e.split("&")) {
|
|
866
869
|
if (a === "")
|
|
867
870
|
continue;
|
|
868
871
|
const s = t.decode ? a.replaceAll("+", " ") : a;
|
|
869
|
-
let [
|
|
870
|
-
|
|
872
|
+
let [o, i] = te(s, "=");
|
|
873
|
+
o === void 0 && (o = s), i = i === void 0 ? null : ["comma", "separator", "bracket-separator"].includes(t.arrayFormat) ? i : S(i, t), r(S(o, t), i, n);
|
|
871
874
|
}
|
|
872
875
|
for (const [a, s] of Object.entries(n))
|
|
873
876
|
if (typeof s == "object" && s !== null && t.types[a] !== "string")
|
|
874
|
-
for (const [
|
|
875
|
-
const
|
|
876
|
-
s[
|
|
877
|
+
for (const [o, i] of Object.entries(s)) {
|
|
878
|
+
const c = t.types[a] ? t.types[a].replace("[]", "") : void 0;
|
|
879
|
+
s[o] = X(i, t, c);
|
|
877
880
|
}
|
|
878
|
-
else typeof s == "object" && s !== null && t.types[a] === "string" ? n[a] = Object.values(s).join(t.arrayFormatSeparator) : n[a] =
|
|
881
|
+
else typeof s == "object" && s !== null && t.types[a] === "string" ? n[a] = Object.values(s).join(t.arrayFormatSeparator) : n[a] = X(s, t, t.types[a]);
|
|
879
882
|
return t.sort === !1 ? n : (t.sort === !0 ? Object.keys(n).sort() : Object.keys(n).sort(t.sort)).reduce((a, s) => {
|
|
880
|
-
const
|
|
881
|
-
return a[s] =
|
|
883
|
+
const o = n[s];
|
|
884
|
+
return a[s] = o && typeof o == "object" && !Array.isArray(o) ? ae(o) : o, a;
|
|
882
885
|
}, /* @__PURE__ */ Object.create(null));
|
|
883
886
|
}
|
|
884
|
-
function
|
|
887
|
+
function oe(e, t) {
|
|
885
888
|
if (!e)
|
|
886
889
|
return "";
|
|
887
890
|
t = {
|
|
@@ -890,15 +893,15 @@ function se(e, t) {
|
|
|
890
893
|
arrayFormat: "none",
|
|
891
894
|
arrayFormatSeparator: ",",
|
|
892
895
|
...t
|
|
893
|
-
},
|
|
894
|
-
const r = (
|
|
895
|
-
for (const [
|
|
896
|
-
r(
|
|
896
|
+
}, ne(t.arrayFormatSeparator);
|
|
897
|
+
const r = (o) => t.skipNull && Me(e[o]) || t.skipEmptyString && e[o] === "", n = He(t), a = {};
|
|
898
|
+
for (const [o, i] of Object.entries(e))
|
|
899
|
+
r(o) || (a[o] = i);
|
|
897
900
|
const s = Object.keys(a);
|
|
898
|
-
return t.sort !== !1 && s.sort(t.sort), s.map((
|
|
899
|
-
const
|
|
900
|
-
return
|
|
901
|
-
}).filter((
|
|
901
|
+
return t.sort !== !1 && s.sort(t.sort), s.map((o) => {
|
|
902
|
+
const i = e[o];
|
|
903
|
+
return i === void 0 ? "" : i === null ? p(o, t) : Array.isArray(i) ? i.length === 0 && t.arrayFormat === "bracket-separator" ? p(o, t) + "[]" : i.reduce(n(o), []).join("&") : p(o, t) + "=" + p(i, t);
|
|
904
|
+
}).filter((o) => o.length > 0).join("&");
|
|
902
905
|
}
|
|
903
906
|
function ie(e, t) {
|
|
904
907
|
var a;
|
|
@@ -906,41 +909,41 @@ function ie(e, t) {
|
|
|
906
909
|
decode: !0,
|
|
907
910
|
...t
|
|
908
911
|
};
|
|
909
|
-
let [r, n] =
|
|
912
|
+
let [r, n] = te(e, "#");
|
|
910
913
|
return r === void 0 && (r = e), {
|
|
911
914
|
url: ((a = r == null ? void 0 : r.split("?")) == null ? void 0 : a[0]) ?? "",
|
|
912
|
-
query:
|
|
915
|
+
query: H(B(e), t),
|
|
913
916
|
...t && t.parseFragmentIdentifier && n ? {
|
|
914
917
|
fragmentIdentifier: S(n, t)
|
|
915
918
|
} : {}
|
|
916
919
|
};
|
|
917
920
|
}
|
|
918
|
-
function
|
|
921
|
+
function ce(e, t) {
|
|
919
922
|
t = {
|
|
920
923
|
encode: !0,
|
|
921
924
|
strict: !0,
|
|
922
|
-
[
|
|
925
|
+
[U]: !0,
|
|
923
926
|
...t
|
|
924
927
|
};
|
|
925
|
-
const r =
|
|
926
|
-
...
|
|
928
|
+
const r = se(e.url).split("?")[0] || "", n = B(e.url), a = {
|
|
929
|
+
...H(n, {
|
|
927
930
|
sort: !1
|
|
928
931
|
}),
|
|
929
932
|
...e.query
|
|
930
933
|
};
|
|
931
|
-
let s =
|
|
934
|
+
let s = oe(a, t);
|
|
932
935
|
s && (s = `?${s}`);
|
|
933
|
-
let
|
|
936
|
+
let o = ze(e.url);
|
|
934
937
|
if (typeof e.fragmentIdentifier == "string") {
|
|
935
|
-
const
|
|
936
|
-
|
|
938
|
+
const i = new URL(r);
|
|
939
|
+
i.hash = e.fragmentIdentifier, o = t[U] ? i.hash : `#${e.fragmentIdentifier}`;
|
|
937
940
|
}
|
|
938
|
-
return `${r}${s}${
|
|
941
|
+
return `${r}${s}${o}`;
|
|
939
942
|
}
|
|
940
|
-
function
|
|
943
|
+
function fe(e, t, r) {
|
|
941
944
|
r = {
|
|
942
945
|
parseFragmentIdentifier: !0,
|
|
943
|
-
[
|
|
946
|
+
[U]: !1,
|
|
944
947
|
...r
|
|
945
948
|
};
|
|
946
949
|
const {
|
|
@@ -948,141 +951,144 @@ function ce(e, t, r) {
|
|
|
948
951
|
query: a,
|
|
949
952
|
fragmentIdentifier: s
|
|
950
953
|
} = ie(e, r);
|
|
951
|
-
return
|
|
954
|
+
return ce({
|
|
952
955
|
url: n,
|
|
953
|
-
query:
|
|
956
|
+
query: Le(a, t),
|
|
954
957
|
fragmentIdentifier: s
|
|
955
958
|
}, r);
|
|
956
959
|
}
|
|
957
|
-
function
|
|
960
|
+
function Ke(e, t, r) {
|
|
958
961
|
const n = Array.isArray(t) ? (a) => !t.includes(a) : (a, s) => !t(a, s);
|
|
959
|
-
return
|
|
962
|
+
return fe(e, n, r);
|
|
960
963
|
}
|
|
961
|
-
const
|
|
964
|
+
const v = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
962
965
|
__proto__: null,
|
|
963
|
-
exclude:
|
|
964
|
-
extract:
|
|
965
|
-
parse:
|
|
966
|
+
exclude: Ke,
|
|
967
|
+
extract: B,
|
|
968
|
+
parse: H,
|
|
966
969
|
parseUrl: ie,
|
|
967
|
-
pick:
|
|
968
|
-
stringify:
|
|
969
|
-
stringifyUrl:
|
|
970
|
+
pick: fe,
|
|
971
|
+
stringify: oe,
|
|
972
|
+
stringifyUrl: ce
|
|
970
973
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
971
|
-
function
|
|
974
|
+
function Ge(e) {
|
|
972
975
|
const {
|
|
973
976
|
base: t = "/",
|
|
974
977
|
routes: r
|
|
975
|
-
} = e, n =
|
|
978
|
+
} = e, n = A(null, {
|
|
976
979
|
and: {
|
|
977
980
|
serialize: "ignore"
|
|
978
981
|
},
|
|
979
982
|
name: "$history",
|
|
980
|
-
sid: "
|
|
981
|
-
}), a =
|
|
983
|
+
sid: "31majq"
|
|
984
|
+
}), a = A([], {
|
|
982
985
|
and: {
|
|
983
986
|
serialize: "ignore"
|
|
984
987
|
},
|
|
985
988
|
name: "$activeRoutes",
|
|
986
|
-
sid: "
|
|
987
|
-
}), s =
|
|
989
|
+
sid: "mastmv"
|
|
990
|
+
}), s = A({}, {
|
|
988
991
|
name: "$query",
|
|
989
|
-
sid: "
|
|
990
|
-
}),
|
|
992
|
+
sid: "4sjpht"
|
|
993
|
+
}), o = A(null, {
|
|
991
994
|
name: "$path",
|
|
992
|
-
sid: "
|
|
993
|
-
}),
|
|
995
|
+
sid: "wq6kyf"
|
|
996
|
+
}), i = x({
|
|
994
997
|
name: "setHistory",
|
|
995
|
-
sid: "
|
|
996
|
-
}),
|
|
997
|
-
name: "
|
|
998
|
-
sid: "-
|
|
998
|
+
sid: "tco5ea"
|
|
999
|
+
}), c = x({
|
|
1000
|
+
name: "navigate",
|
|
1001
|
+
sid: "-6nqgd3"
|
|
999
1002
|
}), u = x({
|
|
1003
|
+
name: "back",
|
|
1004
|
+
sid: "-gxisi3"
|
|
1005
|
+
}), m = x({
|
|
1000
1006
|
name: "forward",
|
|
1001
|
-
sid: "
|
|
1007
|
+
sid: "-5nj6gd"
|
|
1002
1008
|
}), y = x({
|
|
1003
1009
|
name: "locationUpdated",
|
|
1004
|
-
sid: "
|
|
1005
|
-
}),
|
|
1006
|
-
let
|
|
1007
|
-
const
|
|
1008
|
-
for (
|
|
1009
|
-
|
|
1010
|
-
const
|
|
1010
|
+
sid: "enqpbn"
|
|
1011
|
+
}), h = r.map((l) => {
|
|
1012
|
+
let g = l;
|
|
1013
|
+
const f = [];
|
|
1014
|
+
for (f.unshift(g.internal.path); g.internal.parent; )
|
|
1015
|
+
g = g.internal.parent, g.internal.path !== "/" && f.unshift(g.internal.path);
|
|
1016
|
+
const b = t === "/" ? f.join("") : [t, ...f].join("");
|
|
1011
1017
|
return {
|
|
1012
1018
|
route: l,
|
|
1013
|
-
path:
|
|
1014
|
-
toPath: he(
|
|
1015
|
-
fromPath:
|
|
1019
|
+
path: b,
|
|
1020
|
+
toPath: he(b),
|
|
1021
|
+
fromPath: be(b)
|
|
1016
1022
|
};
|
|
1017
|
-
}),
|
|
1023
|
+
}), F = z({
|
|
1018
1024
|
and: {
|
|
1019
1025
|
source: {
|
|
1020
1026
|
history: n
|
|
1021
1027
|
},
|
|
1022
|
-
effect: async (l,
|
|
1028
|
+
effect: async (l, g) => {
|
|
1023
1029
|
let {
|
|
1024
|
-
history:
|
|
1030
|
+
history: f
|
|
1025
1031
|
} = l, {
|
|
1026
|
-
path:
|
|
1027
|
-
query:
|
|
1028
|
-
replace:
|
|
1029
|
-
} =
|
|
1030
|
-
if (!
|
|
1032
|
+
path: b,
|
|
1033
|
+
query: C,
|
|
1034
|
+
replace: N
|
|
1035
|
+
} = g;
|
|
1036
|
+
if (!f)
|
|
1031
1037
|
throw new Error("history not found");
|
|
1032
|
-
const
|
|
1033
|
-
pathname:
|
|
1034
|
-
search: "?".concat(
|
|
1038
|
+
const V = {
|
|
1039
|
+
pathname: b,
|
|
1040
|
+
search: "?".concat(v.stringify(C))
|
|
1035
1041
|
};
|
|
1036
|
-
|
|
1042
|
+
N ? f.replace(V) : f.push(V);
|
|
1037
1043
|
}
|
|
1038
1044
|
},
|
|
1039
1045
|
or: {
|
|
1040
1046
|
name: "navigateFx",
|
|
1041
|
-
sid: "
|
|
1047
|
+
sid: "e3jr9b"
|
|
1042
1048
|
}
|
|
1043
|
-
}),
|
|
1044
|
-
const
|
|
1045
|
-
if (
|
|
1049
|
+
}), d = R((l) => {
|
|
1050
|
+
const g = le(y);
|
|
1051
|
+
if (g({
|
|
1046
1052
|
pathname: l.location.pathname,
|
|
1047
|
-
query:
|
|
1053
|
+
query: v.parse(l.location.search)
|
|
1048
1054
|
}), !l)
|
|
1049
1055
|
throw new Error();
|
|
1050
|
-
l.listen((
|
|
1056
|
+
l.listen((f) => {
|
|
1051
1057
|
let {
|
|
1052
|
-
location:
|
|
1053
|
-
} =
|
|
1054
|
-
|
|
1055
|
-
pathname:
|
|
1056
|
-
query:
|
|
1058
|
+
location: b
|
|
1059
|
+
} = f;
|
|
1060
|
+
g({
|
|
1061
|
+
pathname: b.pathname,
|
|
1062
|
+
query: v.parse(b.search)
|
|
1057
1063
|
});
|
|
1058
1064
|
});
|
|
1059
1065
|
}, {
|
|
1060
1066
|
name: "subscribeHistoryFx",
|
|
1061
|
-
sid: "
|
|
1062
|
-
}),
|
|
1067
|
+
sid: "2h2oyo"
|
|
1068
|
+
}), O = z({
|
|
1063
1069
|
and: {
|
|
1064
1070
|
source: {
|
|
1065
1071
|
query: s,
|
|
1066
|
-
path:
|
|
1072
|
+
path: o
|
|
1067
1073
|
},
|
|
1068
1074
|
effect: async (l) => {
|
|
1069
1075
|
let {
|
|
1070
|
-
query:
|
|
1071
|
-
path:
|
|
1076
|
+
query: g,
|
|
1077
|
+
path: f
|
|
1072
1078
|
} = l;
|
|
1073
1079
|
for (const {
|
|
1074
|
-
route:
|
|
1075
|
-
fromPath:
|
|
1076
|
-
} of
|
|
1077
|
-
const
|
|
1078
|
-
if (
|
|
1079
|
-
await
|
|
1080
|
-
query:
|
|
1081
|
-
params:
|
|
1080
|
+
route: b,
|
|
1081
|
+
fromPath: C
|
|
1082
|
+
} of h) {
|
|
1083
|
+
const N = C(f);
|
|
1084
|
+
if (N)
|
|
1085
|
+
await b.internal.openFx({
|
|
1086
|
+
query: g,
|
|
1087
|
+
params: N.params,
|
|
1082
1088
|
historyIgnore: !0
|
|
1083
1089
|
});
|
|
1084
1090
|
else {
|
|
1085
|
-
|
|
1091
|
+
b.internal.close();
|
|
1086
1092
|
continue;
|
|
1087
1093
|
}
|
|
1088
1094
|
}
|
|
@@ -1090,115 +1096,138 @@ function We(e) {
|
|
|
1090
1096
|
},
|
|
1091
1097
|
or: {
|
|
1092
1098
|
name: "openRoutesByPathFx",
|
|
1093
|
-
sid: "
|
|
1099
|
+
sid: "-o9v4d"
|
|
1094
1100
|
}
|
|
1095
1101
|
});
|
|
1096
1102
|
for (const {
|
|
1097
1103
|
route: l,
|
|
1098
|
-
toPath:
|
|
1099
|
-
} of
|
|
1100
|
-
|
|
1104
|
+
toPath: g
|
|
1105
|
+
} of h)
|
|
1106
|
+
w({
|
|
1101
1107
|
and: [{
|
|
1102
1108
|
clock: l.opened,
|
|
1103
1109
|
source: a,
|
|
1104
|
-
filter: (
|
|
1105
|
-
fn: (
|
|
1110
|
+
filter: (f) => !f.includes(l),
|
|
1111
|
+
fn: (f) => [...f, l],
|
|
1106
1112
|
target: a
|
|
1107
1113
|
}],
|
|
1108
1114
|
or: {
|
|
1109
|
-
sid: "
|
|
1115
|
+
sid: "f0qyp9"
|
|
1110
1116
|
}
|
|
1111
|
-
}),
|
|
1117
|
+
}), w({
|
|
1112
1118
|
and: [{
|
|
1113
1119
|
clock: l.opened,
|
|
1114
|
-
filter: (
|
|
1115
|
-
fn: (
|
|
1116
|
-
var
|
|
1120
|
+
filter: (f) => !(f != null && f.historyIgnore),
|
|
1121
|
+
fn: (f) => {
|
|
1122
|
+
var b;
|
|
1117
1123
|
return {
|
|
1118
|
-
path:
|
|
1119
|
-
query: (
|
|
1120
|
-
replace:
|
|
1124
|
+
path: g(f && "params" in f ? f.params : void 0),
|
|
1125
|
+
query: (b = f == null ? void 0 : f.query) !== null && b !== void 0 ? b : {},
|
|
1126
|
+
replace: f == null ? void 0 : f.replace
|
|
1121
1127
|
};
|
|
1122
1128
|
},
|
|
1123
|
-
target:
|
|
1129
|
+
target: c
|
|
1124
1130
|
}],
|
|
1125
1131
|
or: {
|
|
1126
|
-
sid: "
|
|
1132
|
+
sid: "fgozwq"
|
|
1127
1133
|
}
|
|
1128
|
-
}),
|
|
1134
|
+
}), w({
|
|
1129
1135
|
and: [{
|
|
1130
1136
|
clock: l.closed,
|
|
1131
1137
|
source: a,
|
|
1132
|
-
fn: (
|
|
1138
|
+
fn: (f) => f.filter((b) => b !== l),
|
|
1133
1139
|
target: a
|
|
1134
1140
|
}],
|
|
1135
1141
|
or: {
|
|
1136
|
-
sid: "
|
|
1142
|
+
sid: "gc19qb"
|
|
1137
1143
|
}
|
|
1138
1144
|
});
|
|
1139
|
-
return
|
|
1145
|
+
return w({
|
|
1140
1146
|
and: [{
|
|
1141
|
-
clock:
|
|
1147
|
+
clock: i,
|
|
1142
1148
|
target: n
|
|
1143
1149
|
}],
|
|
1144
1150
|
or: {
|
|
1145
|
-
sid: "
|
|
1151
|
+
sid: "ggfmfh"
|
|
1146
1152
|
}
|
|
1147
|
-
}),
|
|
1153
|
+
}), w({
|
|
1148
1154
|
and: [{
|
|
1149
1155
|
clock: n,
|
|
1150
1156
|
filter: Boolean,
|
|
1151
|
-
target:
|
|
1157
|
+
target: d
|
|
1152
1158
|
}],
|
|
1153
1159
|
or: {
|
|
1154
|
-
sid: "
|
|
1160
|
+
sid: "guq9uv"
|
|
1155
1161
|
}
|
|
1156
|
-
}),
|
|
1162
|
+
}), w({
|
|
1157
1163
|
and: [{
|
|
1158
1164
|
clock: y,
|
|
1159
1165
|
fn: (l) => {
|
|
1160
|
-
var
|
|
1166
|
+
var g;
|
|
1161
1167
|
return {
|
|
1162
1168
|
path: l.pathname,
|
|
1163
|
-
query: (
|
|
1169
|
+
query: (g = l.query) !== null && g !== void 0 ? g : {}
|
|
1164
1170
|
};
|
|
1165
1171
|
},
|
|
1166
|
-
target: [
|
|
1167
|
-
sid: "-
|
|
1168
|
-
fn: () =>
|
|
1172
|
+
target: [de({
|
|
1173
|
+
sid: "-3mx9rg",
|
|
1174
|
+
fn: () => pe({
|
|
1169
1175
|
targets: {
|
|
1170
|
-
path:
|
|
1176
|
+
path: o,
|
|
1171
1177
|
query: s
|
|
1172
1178
|
}
|
|
1173
1179
|
}),
|
|
1174
1180
|
name: "target",
|
|
1175
1181
|
method: "spread"
|
|
1176
|
-
}),
|
|
1182
|
+
}), O]
|
|
1183
|
+
}],
|
|
1184
|
+
or: {
|
|
1185
|
+
sid: "h9kpvm"
|
|
1186
|
+
}
|
|
1187
|
+
}), w({
|
|
1188
|
+
and: [{
|
|
1189
|
+
clock: c,
|
|
1190
|
+
target: F
|
|
1191
|
+
}],
|
|
1192
|
+
or: {
|
|
1193
|
+
sid: "hugwfc"
|
|
1194
|
+
}
|
|
1195
|
+
}), w({
|
|
1196
|
+
and: [{
|
|
1197
|
+
clock: [s, o],
|
|
1198
|
+
source: {
|
|
1199
|
+
query: s,
|
|
1200
|
+
path: o
|
|
1201
|
+
},
|
|
1202
|
+
fn: (l) => l,
|
|
1203
|
+
target: c
|
|
1177
1204
|
}],
|
|
1178
1205
|
or: {
|
|
1179
|
-
sid: "
|
|
1206
|
+
sid: "i8rjuq"
|
|
1180
1207
|
}
|
|
1181
1208
|
}), {
|
|
1182
1209
|
$query: s,
|
|
1183
|
-
$path:
|
|
1210
|
+
$path: o,
|
|
1184
1211
|
$activeRoutes: a,
|
|
1185
|
-
back:
|
|
1186
|
-
forward:
|
|
1212
|
+
back: u,
|
|
1213
|
+
forward: m,
|
|
1214
|
+
navigate: c,
|
|
1187
1215
|
routes: r,
|
|
1188
|
-
setHistory:
|
|
1189
|
-
mappedRoutes:
|
|
1216
|
+
setHistory: i,
|
|
1217
|
+
mappedRoutes: h,
|
|
1190
1218
|
trackQuery: De(a, s),
|
|
1191
1219
|
"@@unitShape": () => ({
|
|
1192
1220
|
query: s,
|
|
1193
|
-
path:
|
|
1221
|
+
path: o,
|
|
1194
1222
|
activeRoutes: a,
|
|
1195
|
-
onBack:
|
|
1196
|
-
onForward:
|
|
1223
|
+
onBack: u,
|
|
1224
|
+
onForward: m,
|
|
1225
|
+
onNavigate: c
|
|
1197
1226
|
})
|
|
1198
1227
|
};
|
|
1199
1228
|
}
|
|
1200
1229
|
export {
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1230
|
+
We as createRoute,
|
|
1231
|
+
Ge as createRouter,
|
|
1232
|
+
j as parameters
|
|
1204
1233
|
};
|