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