@argon-router/core 0.2.1 → 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/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { createEffect as N, createStore as j, createEvent as x, sample as F, split as fe, attach as H, scopeBind as ue, withFactory as le } from "effector";
2
- import { spread as de } from "patronum";
3
- function V(e, t) {
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 C(e) {
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 ? V(Object(r), !0).forEach(function(n) {
17
- pe(e, n, r[n]);
18
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : V(Object(r)).forEach(function(n) {
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 pe(e, t, r) {
25
- return (t = me(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
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 me(e) {
28
- var t = ye(e, "string");
27
+ function ye(e) {
28
+ var t = ge(e, "string");
29
29
  return typeof t == "symbol" ? t : t + "";
30
30
  }
31
- function ye(e, t) {
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 Qe(e) {
41
+ function We(e) {
42
42
  let t;
43
- const r = N(() => {
44
- var p;
45
- return (p = t) === null || p === void 0 ? void 0 : p();
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 = N(async () => {
50
- for (const l of (p = e.beforeOpen) !== null && p !== void 0 ? p : []) {
51
- var p;
52
- await l();
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 = N(async (p) => (await r(), await n(), e.parent && await e.parent.internal.openFx(C(C({}, p ?? {
58
- params: {}
59
- }), {}, {
60
- historyIgnore: !0
61
- })), p), {
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 = j({}, {
68
+ }), s = A({}, {
65
69
  name: "$params",
66
- sid: "fyp6wk"
67
- }), i = j(!1, {
70
+ sid: "gwsfoy"
71
+ }), o = A(!1, {
68
72
  name: "$isOpened",
69
- sid: "nq2be0"
70
- }), o = a.pending, f = x({
73
+ sid: "ym3mgh"
74
+ }), i = a.pending, c = x({
71
75
  name: "open",
72
- sid: "-e84o6b"
76
+ sid: "-da1fdx"
73
77
  }), u = x({
74
78
  name: "close",
75
- sid: "5yq009"
76
- }), y = x({
79
+ sid: "6wt8sn"
80
+ }), m = x({
77
81
  name: "opened",
78
- sid: "28lguv"
79
- }), d = x({
82
+ sid: "36opn9"
83
+ }), y = x({
80
84
  name: "openedOnServer",
81
- sid: "-rnqoit"
82
- }), b = x({
85
+ sid: "-qpnfqf"
86
+ }), h = x({
83
87
  name: "openedOnClient",
84
- sid: "-rq76gu"
85
- }), w = x({
88
+ sid: "-qs3xog"
89
+ }), F = x({
86
90
  name: "closed",
87
- sid: "-atkmcq"
91
+ sid: "2gopr"
88
92
  });
89
- return F({
93
+ return w({
90
94
  and: [{
91
- clock: f,
95
+ clock: c,
92
96
  target: a
93
97
  }],
94
98
  or: {
95
- sid: "t5oqwf"
99
+ sid: "t6sc35"
96
100
  }
97
- }), fe({
101
+ }), ue({
98
102
  and: [{
99
103
  source: a.doneData,
100
104
  match: () => typeof window > "u" ? "server" : "client",
101
105
  cases: {
102
- server: d,
103
- client: b
106
+ server: y,
107
+ client: h
104
108
  }
105
109
  }],
106
110
  or: {
107
- sid: "t8fpv8"
111
+ sid: "t9jb1y"
108
112
  }
109
- }), F({
113
+ }), w({
110
114
  and: [{
111
- clock: [b, d],
112
- target: y
115
+ clock: [h, y],
116
+ target: m
113
117
  }],
114
118
  or: {
115
- sid: "tphc9f"
119
+ sid: "tqkxg5"
116
120
  }
117
- }), F({
121
+ }), w({
118
122
  and: [{
119
- clock: y,
123
+ clock: m,
120
124
  fn: () => !0,
121
- target: i
125
+ target: o
122
126
  }],
123
127
  or: {
124
- sid: "u3rzot"
128
+ sid: "u4vkvj"
125
129
  }
126
- }), F({
130
+ }), w({
127
131
  and: [{
128
132
  clock: u,
129
- target: w
133
+ target: F
130
134
  }],
131
135
  or: {
132
- sid: "u72r8z"
136
+ sid: "u86cfp"
133
137
  }
134
- }), F({
138
+ }), w({
135
139
  and: [{
136
- clock: w,
140
+ clock: F,
137
141
  fn: () => !1,
138
- target: i
142
+ target: o
139
143
  }],
140
144
  or: {
141
- sid: "ykn3cq"
145
+ sid: "ylqojg"
142
146
  }
143
147
  }), {
144
148
  $params: s,
145
- $isOpened: i,
146
- $isPending: o,
147
- open: f,
148
- closed: w,
149
- opened: y,
150
- openedOnClient: b,
151
- openedOnServer: d,
152
- internal: C({
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: (p) => t = p
159
+ setAsyncImport: (d) => t = d
157
160
  }, e),
158
161
  "@@unitShape": () => ({
159
162
  params: s,
160
- isPending: o,
161
- isOpened: i,
162
- onOpen: f
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 = L;
172
- var he = E.compile = $e, ge = E.match = Oe;
173
- E.pathToRegexp = Z;
174
- E.stringify = Ae;
175
- const U = "/", _ = (e) => e, X = /^[$_\p{ID_Start}]$/u, q = /^[$\u200c\u200d\p{ID_Continue}]$/u, I = "https://git.new/pathToRegexpError", be = {
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 we(e) {
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* xe(e) {
197
+ function* Fe(e) {
195
198
  const t = [...e];
196
199
  let r = 0;
197
200
  function n() {
198
201
  let a = "";
199
- if (X.test(t[++r]))
200
- for (a += t[r]; q.test(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}: ${I}`);
215
+ throw new TypeError(`Unterminated quote at ${s}: ${k}`);
213
216
  }
214
217
  if (!a)
215
- throw new TypeError(`Missing parameter name at ${r}: ${I}`);
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 = be[a];
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 i = n();
236
+ const o = n();
234
237
  yield {
235
238
  type: "PARAM",
236
239
  index: r,
237
- value: i
240
+ value: o
238
241
  };
239
242
  } else if (a === "*") {
240
- const i = n();
243
+ const o = n();
241
244
  yield {
242
245
  type: "WILDCARD",
243
246
  index: r,
244
- value: i
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 Fe {
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}: ${I}`);
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 k {
294
+ class P {
292
295
  constructor(t) {
293
296
  this.tokens = t;
294
297
  }
295
298
  }
296
- E.TokenData = k;
297
- function L(e, t = {}) {
299
+ E.TokenData = P;
300
+ function M(e, t = {}) {
298
301
  const {
299
- encodePath: r = _
300
- } = t, n = new Fe(xe(e));
301
- function a(i) {
302
- const o = [];
302
+ encodePath: r = q
303
+ } = t, n = new $e(Fe(e));
304
+ function a(o) {
305
+ const i = [];
303
306
  for (; ; ) {
304
- const f = n.text();
305
- f && o.push({
307
+ const c = n.text();
308
+ c && i.push({
306
309
  type: "text",
307
- value: r(f)
310
+ value: r(c)
308
311
  });
309
312
  const u = n.tryConsume("PARAM");
310
313
  if (u) {
311
- o.push({
314
+ i.push({
312
315
  type: "param",
313
316
  name: u
314
317
  });
315
318
  continue;
316
319
  }
317
- const y = n.tryConsume("WILDCARD");
318
- if (y) {
319
- o.push({
320
+ const m = n.tryConsume("WILDCARD");
321
+ if (m) {
322
+ i.push({
320
323
  type: "wildcard",
321
- name: y
324
+ name: m
322
325
  });
323
326
  continue;
324
327
  }
325
328
  if (n.tryConsume("{")) {
326
- o.push({
329
+ i.push({
327
330
  type: "group",
328
331
  tokens: a("}")
329
332
  });
330
333
  continue;
331
334
  }
332
- return n.consume(i), o;
335
+ return n.consume(o), i;
333
336
  }
334
337
  }
335
338
  const s = a("END");
336
- return new k(s);
339
+ return new P(s);
337
340
  }
338
- function $e(e, t = {}) {
341
+ function Se(e, t = {}) {
339
342
  const {
340
343
  encode: r = encodeURIComponent,
341
- delimiter: n = U
342
- } = t, a = e instanceof k ? e : L(e, t), s = Y(a.tokens, n, r);
343
- return function(o = {}) {
344
- const [f, ...u] = s(o);
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 f;
350
+ return c;
348
351
  };
349
352
  }
350
- function Y(e, t, r) {
351
- const n = e.map((a) => Se(a, t, r));
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 i of n) {
355
- const [o, ...f] = i(a);
356
- s[0] += o, s.push(...f);
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 Se(e, t, r) {
364
+ function Oe(e, t, r) {
362
365
  if (e.type === "text") return () => [e.value];
363
366
  if (e.type === "group") {
364
- const a = Y(e.tokens, t, r);
367
+ const a = Z(e.tokens, t, r);
365
368
  return (s) => {
366
- const [i, ...o] = a(s);
367
- return o.length ? [""] : [i];
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((i, o) => {
377
- if (typeof i != "string")
378
- throw new TypeError(`Expected "${e.name}/${o}" to be a string`);
379
- return n(i);
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 Oe(e, t = {}) {
392
+ function je(e, t = {}) {
390
393
  const {
391
394
  decode: r = decodeURIComponent,
392
- delimiter: n = U
395
+ delimiter: n = _
393
396
  } = t, {
394
397
  regexp: a,
395
398
  keys: s
396
- } = Z(e, t), i = s.map((o) => r === !1 ? _ : o.type === "param" ? r : (f) => f.split(n).map(r));
397
- return function(f) {
398
- const u = a.exec(f);
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 y = u[0], d = /* @__PURE__ */ Object.create(null);
401
- for (let b = 1; b < u.length; b++) {
402
- if (u[b] === void 0) continue;
403
- const w = s[b - 1], p = i[b - 1];
404
- d[w.name] = p(u[b]);
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: y,
408
- params: d
410
+ path: m,
411
+ params: y
409
412
  };
410
413
  };
411
414
  }
412
- function Z(e, t = {}) {
415
+ function ee(e, t = {}) {
413
416
  const {
414
- delimiter: r = U,
417
+ delimiter: r = _,
415
418
  end: n = !0,
416
419
  sensitive: a = !1,
417
420
  trailing: s = !0
418
- } = t, i = [], o = [], f = a ? "" : "i", y = (Array.isArray(e) ? e : [e]).map((w) => w instanceof k ? w : L(w, 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: w
421
- } of y)
422
- for (const p of R(w, 0, [])) {
423
- const l = Ee(p, r, i);
424
- o.push(l);
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 d = `^(?:${o.join("|")})`;
427
- return s && (d += `(?:${$(r)}$)?`), d += n ? "$" : `(?=${$(r)}|$)`, {
428
- regexp: new RegExp(d, f),
429
- keys: i
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* R(e, t, r) {
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 R(n.tokens, 0, a))
439
- yield* R(e, t + 1, s);
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* R(e, t + 1, r);
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 i = 0; i < e.length; i++) {
447
- const o = e[i];
448
- if (o.type === "text") {
449
- n += $(o.value), a += o.value, s || (s = o.value.includes(t));
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 (o.type === "param" || o.type === "wildcard") {
455
+ if (i.type === "param" || i.type === "wildcard") {
453
456
  if (!s && !a)
454
- throw new TypeError(`Missing text after "${o.name}": ${I}`);
455
- o.type === "param" ? n += `(${je(t, s ? "" : a)}+)` : n += "([\\s\\S]+)", r.push(o), a = "", s = !1;
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 je(e, t) {
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 Ae(e) {
467
+ function Ne(e) {
465
468
  return e.tokens.map(function t(r, n, a) {
466
- if (r.type === "text") return we(r.value);
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 i = Ne(r.name) && Re(a[n + 1]) ? r.name : JSON.stringify(r.name);
470
- if (r.type === "param") return `:${i}`;
471
- if (r.type === "wildcard") return `*${i}`;
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 Ne(e) {
478
+ function Re(e) {
476
479
  const [t, ...r] = e;
477
- return X.test(t) ? r.every((n) => q.test(n)) : !1;
480
+ return Y.test(t) ? r.every((n) => L.test(n)) : !1;
478
481
  }
479
- function Re(e) {
480
- return (e == null ? void 0 : e.type) !== "text" ? !0 : !q.test(e.value[0]);
482
+ function Ie(e) {
483
+ return (e == null ? void 0 : e.type) !== "text" ? !0 : !L.test(e.value[0]);
481
484
  }
482
- const Ie = Symbol("any"), ke = Symbol("number"), Pe = Symbol("string"), Ce = Symbol("array"), O = {
483
- any: Ie,
484
- number: ke,
485
- string: Pe,
486
- array: Ce
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 K(e, t) {
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 J(e, t) {
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 O.any: {
525
+ case j.any: {
523
526
  if (!e[r])
524
527
  return !1;
525
528
  break;
526
529
  }
527
- case O.string: {
530
+ case j.string: {
528
531
  if (!e[r] || Array.isArray(e[r]))
529
532
  return !1;
530
533
  break;
531
534
  }
532
- case O.array: {
535
+ case j.array: {
533
536
  if (!e[r] || !Array.isArray(e[r]))
534
537
  return !1;
535
538
  break;
536
539
  }
537
- case O.number: {
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 Te(e, t) {
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 i = e[n];
557
- r[n] = isNaN(parseInt(i)) ? parseFloat(i) : parseInt(i);
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 i = e[n];
568
- r[n] = i === "0" ? parseFloat(i) : parseInt(i);
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 O.any:
574
- case O.string:
575
- case O.array: {
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 O.number: {
580
- const i = e[n];
581
- r[n] = isNaN(parseInt(i)) ? parseFloat(i) : parseInt(i);
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
- }), i = x({
599
+ }), o = x({
597
600
  name: "exited",
598
601
  sid: "-xofyk3"
599
- }), o = x({
602
+ }), i = x({
600
603
  name: "exit",
601
604
  sid: "-673d76"
602
605
  });
603
- return F({
606
+ return w({
604
607
  and: [{
605
608
  source: {
606
609
  activeRoutes: e,
607
610
  query: t
608
611
  },
609
- filter: (f) => {
612
+ filter: (c) => {
610
613
  let {
611
614
  activeRoutes: u,
612
- query: y
613
- } = f;
614
- return (!a || K(a, u)) && J(y, n);
615
+ query: m
616
+ } = c;
617
+ return (!a || J(a, u)) && Q(m, n);
615
618
  },
616
- fn: (f) => {
619
+ fn: (c) => {
617
620
  let {
618
621
  query: u
619
- } = f;
620
- return Te(u, n);
622
+ } = c;
623
+ return ve(u, n);
621
624
  }
622
625
  }],
623
626
  or: {
624
627
  sid: "-so0f9q"
625
628
  }
626
- }), F({
629
+ }), w({
627
630
  and: [{
628
631
  source: {
629
632
  activeRoutes: e,
630
633
  query: t
631
634
  },
632
- filter: (f) => {
635
+ filter: (c) => {
633
636
  let {
634
637
  activeRoutes: u,
635
- query: y
636
- } = f;
637
- return !((!a || K(a, u)) && J(y, n));
638
+ query: m
639
+ } = c;
640
+ return !((!a || J(a, u)) && Q(m, n));
638
641
  },
639
- target: i
642
+ target: o
640
643
  }],
641
644
  or: {
642
645
  sid: "-s82e29"
643
646
  }
644
647
  }), {
645
648
  entered: s,
646
- exited: i,
647
- exit: o,
648
- getPayload: (f) => Object.entries(f).reduce((u, y) => {
649
- let [d, b] = y;
650
- return typeof n[d] == "symbol" ? u[d] = b : u[d] = n[d], u;
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 ee = "%[a-f0-9]{2}", Q = new RegExp("(" + ee + ")|([^%]+?)", "gi"), W = new RegExp("(" + ee + ")+", "gi");
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 ve(e) {
670
+ function Ue(e) {
668
671
  try {
669
672
  return decodeURIComponent(e);
670
673
  } catch {
671
- let t = e.match(Q) || [];
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(Q) || [];
676
+ e = D(t, r).join(""), t = e.match(W) || [];
674
677
  return e;
675
678
  }
676
679
  }
677
- function Ue(e) {
680
+ function _e(e) {
678
681
  const t = {
679
682
  "%FE%FF": "��",
680
683
  "%FF%FE": "��"
681
684
  };
682
- let r = W.exec(e);
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 = ve(r[0]);
690
+ const a = Ue(r[0]);
688
691
  a !== r[0] && (t[r[0]] = a);
689
692
  }
690
- r = W.exec(e);
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 _e(e) {
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 Ue(e);
707
+ return _e(e);
705
708
  }
706
709
  }
707
- function qe(e, t) {
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 re(e, t) {
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 Le = (e) => e == null, Me = (e) => encodeURIComponent(e).replaceAll(/[!'()*]/g, (t) => `%${t.charCodeAt(0).toString(16).toUpperCase()}`), v = Symbol("encodeFragmentIdentifier");
733
- function ze(e) {
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, [m(t, e), "[", a, "]"].join("")] : [...r, [m(t, e), "[", m(a, e), "]=", m(n, e)].join("")];
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, [m(t, e), "[]"].join("")] : [...r, [m(t, e), "[]=", m(n, e)].join("")];
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, [m(t, e), ":list="].join("")] : [...r, [m(t, e), ":list=", m(n, e)].join("")];
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 ? [[m(r, e), t, m(a, e)].join("")] : [[n, m(a, e)].join(e.arrayFormatSeparator)]);
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, m(t, e)] : [...r, [m(t, e), "=", m(n, e)].join("")];
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 Be(e) {
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), i = typeof n == "string" && !s && S(n, e).includes(e.arrayFormatSeparator);
793
- n = i ? S(n, e) : n;
794
- const o = s || i ? n.split(e.arrayFormatSeparator).map((f) => S(f, e)) : n === null ? n : S(n, e);
795
- a[r] = o;
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 i = n === null ? [] : S(n, e).split(e.arrayFormatSeparator);
807
+ const o = n === null ? [] : S(n, e).split(e.arrayFormatSeparator);
805
808
  if (a[r] === void 0) {
806
- a[r] = i;
809
+ a[r] = o;
807
810
  return;
808
811
  }
809
- a[r] = [...a[r], ...i];
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 te(e) {
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 m(e, t) {
826
- return t.encode ? t.strict ? Me(e) : encodeURIComponent(e) : e;
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 ? _e(e) : e;
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 He(e) {
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 G(e, t, r) {
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 M(e) {
847
- e = ae(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 z(e, t) {
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
- }, te(t.arrayFormatSeparator);
862
- const r = Be(t), n = /* @__PURE__ */ Object.create(null);
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 [i, o] = re(s, "=");
870
- i === void 0 && (i = s), o = o === void 0 ? null : ["comma", "separator", "bracket-separator"].includes(t.arrayFormat) ? o : S(o, t), r(S(i, t), o, n);
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 [i, o] of Object.entries(s)) {
875
- const f = t.types[a] ? t.types[a].replace("[]", "") : void 0;
876
- s[i] = G(o, t, f);
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] = G(s, t, t.types[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 i = n[s];
881
- return a[s] = i && typeof i == "object" && !Array.isArray(i) ? ne(i) : i, a;
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 se(e, t) {
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
- }, te(t.arrayFormatSeparator);
894
- const r = (i) => t.skipNull && Le(e[i]) || t.skipEmptyString && e[i] === "", n = ze(t), a = {};
895
- for (const [i, o] of Object.entries(e))
896
- r(i) || (a[i] = o);
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((i) => {
899
- const o = e[i];
900
- return o === void 0 ? "" : o === null ? m(i, t) : Array.isArray(o) ? o.length === 0 && t.arrayFormat === "bracket-separator" ? m(i, t) + "[]" : o.reduce(n(i), []).join("&") : m(i, t) + "=" + m(o, t);
901
- }).filter((i) => i.length > 0).join("&");
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] = re(e, "#");
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: z(M(e), t),
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 oe(e, t) {
921
+ function ce(e, t) {
919
922
  t = {
920
923
  encode: !0,
921
924
  strict: !0,
922
- [v]: !0,
925
+ [U]: !0,
923
926
  ...t
924
927
  };
925
- const r = ae(e.url).split("?")[0] || "", n = M(e.url), a = {
926
- ...z(n, {
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 = se(a, t);
934
+ let s = oe(a, t);
932
935
  s && (s = `?${s}`);
933
- let i = He(e.url);
936
+ let o = ze(e.url);
934
937
  if (typeof e.fragmentIdentifier == "string") {
935
- const o = new URL(r);
936
- o.hash = e.fragmentIdentifier, i = t[v] ? o.hash : `#${e.fragmentIdentifier}`;
938
+ const i = new URL(r);
939
+ i.hash = e.fragmentIdentifier, o = t[U] ? i.hash : `#${e.fragmentIdentifier}`;
937
940
  }
938
- return `${r}${s}${i}`;
941
+ return `${r}${s}${o}`;
939
942
  }
940
- function ce(e, t, r) {
943
+ function fe(e, t, r) {
941
944
  r = {
942
945
  parseFragmentIdentifier: !0,
943
- [v]: !1,
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 oe({
954
+ return ce({
952
955
  url: n,
953
- query: qe(a, t),
956
+ query: Le(a, t),
954
957
  fragmentIdentifier: s
955
958
  }, r);
956
959
  }
957
- function Ve(e, t, r) {
960
+ function Ke(e, t, r) {
958
961
  const n = Array.isArray(t) ? (a) => !t.includes(a) : (a, s) => !t(a, s);
959
- return ce(e, n, r);
962
+ return fe(e, n, r);
960
963
  }
961
- const T = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
964
+ const v = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
962
965
  __proto__: null,
963
- exclude: Ve,
964
- extract: M,
965
- parse: z,
966
+ exclude: Ke,
967
+ extract: B,
968
+ parse: H,
966
969
  parseUrl: ie,
967
- pick: ce,
968
- stringify: se,
969
- stringifyUrl: oe
970
+ pick: fe,
971
+ stringify: oe,
972
+ stringifyUrl: ce
970
973
  }, Symbol.toStringTag, { value: "Module" }));
971
- function We(e) {
974
+ function Ge(e) {
972
975
  const {
973
976
  base: t = "/",
974
977
  routes: r
975
- } = e, n = j(null, {
978
+ } = e, n = A(null, {
976
979
  and: {
977
980
  serialize: "ignore"
978
981
  },
979
982
  name: "$history",
980
- sid: "ftu36z"
981
- }), a = j([], {
983
+ sid: "31majq"
984
+ }), a = A([], {
982
985
  and: {
983
986
  serialize: "ignore"
984
987
  },
985
988
  name: "$activeRoutes",
986
- sid: "z30ma4"
987
- }), s = j({}, {
989
+ sid: "mastmv"
990
+ }), s = A({}, {
988
991
  name: "$query",
989
- sid: "hkri52"
990
- }), i = j(null, {
992
+ sid: "4sjpht"
993
+ }), o = A(null, {
991
994
  name: "$path",
992
- sid: "-zgnqnj"
993
- }), o = x({
995
+ sid: "wq6kyf"
996
+ }), i = x({
994
997
  name: "setHistory",
995
- sid: "w6xvrg"
996
- }), f = x({
997
- name: "back",
998
- sid: "-4mcm91"
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: "6nmzsp"
1007
+ sid: "-5nj6gd"
1002
1008
  }), y = x({
1003
1009
  name: "locationUpdated",
1004
- sid: "qywvkp"
1005
- }), d = r.map((l) => {
1006
- let h = l;
1007
- const c = [];
1008
- for (c.unshift(h.internal.path); h.internal.parent; )
1009
- h = h.internal.parent, h.internal.path !== "/" && c.unshift(h.internal.path);
1010
- const g = t === "/" ? c.join("") : [t, ...c].join("");
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: g,
1014
- toPath: he(g),
1015
- fromPath: ge(g)
1019
+ path: b,
1020
+ toPath: he(b),
1021
+ fromPath: be(b)
1016
1022
  };
1017
- }), b = H({
1023
+ }), F = z({
1018
1024
  and: {
1019
1025
  source: {
1020
1026
  history: n
1021
1027
  },
1022
- effect: async (l, h) => {
1028
+ effect: async (l, g) => {
1023
1029
  let {
1024
- history: c
1030
+ history: f
1025
1031
  } = l, {
1026
- path: g,
1027
- query: P,
1028
- replace: A
1029
- } = h;
1030
- if (!c)
1032
+ path: b,
1033
+ query: C,
1034
+ replace: N
1035
+ } = g;
1036
+ if (!f)
1031
1037
  throw new Error("history not found");
1032
- const B = {
1033
- pathname: g,
1034
- search: "?".concat(T.stringify(P))
1038
+ const V = {
1039
+ pathname: b,
1040
+ search: "?".concat(v.stringify(C))
1035
1041
  };
1036
- A ? c.replace(B) : c.push(B);
1042
+ N ? f.replace(V) : f.push(V);
1037
1043
  }
1038
1044
  },
1039
1045
  or: {
1040
1046
  name: "navigateFx",
1041
- sid: "qepxid"
1047
+ sid: "e3jr9b"
1042
1048
  }
1043
- }), w = N((l) => {
1044
- const h = ue(y);
1045
- if (h({
1049
+ }), d = R((l) => {
1050
+ const g = le(y);
1051
+ if (g({
1046
1052
  pathname: l.location.pathname,
1047
- query: T.parse(l.location.search)
1053
+ query: v.parse(l.location.search)
1048
1054
  }), !l)
1049
1055
  throw new Error();
1050
- l.listen((c) => {
1056
+ l.listen((f) => {
1051
1057
  let {
1052
- location: g
1053
- } = c;
1054
- h({
1055
- pathname: g.pathname,
1056
- query: T.parse(g.search)
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: "es8v7q"
1062
- }), p = H({
1067
+ sid: "2h2oyo"
1068
+ }), O = z({
1063
1069
  and: {
1064
1070
  source: {
1065
1071
  query: s,
1066
- path: i
1072
+ path: o
1067
1073
  },
1068
1074
  effect: async (l) => {
1069
1075
  let {
1070
- query: h,
1071
- path: c
1076
+ query: g,
1077
+ path: f
1072
1078
  } = l;
1073
1079
  for (const {
1074
- route: g,
1075
- fromPath: P
1076
- } of d) {
1077
- const A = P(c);
1078
- if (A)
1079
- await g.internal.openFx({
1080
- query: h,
1081
- params: A.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
- g.internal.close();
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: "bmwb4p"
1099
+ sid: "-o9v4d"
1094
1100
  }
1095
1101
  });
1096
1102
  for (const {
1097
1103
  route: l,
1098
- toPath: h
1099
- } of d)
1100
- F({
1104
+ toPath: g
1105
+ } of h)
1106
+ w({
1101
1107
  and: [{
1102
1108
  clock: l.opened,
1103
1109
  source: a,
1104
- filter: (c) => !c.includes(l),
1105
- fn: (c) => [...c, l],
1110
+ filter: (f) => !f.includes(l),
1111
+ fn: (f) => [...f, l],
1106
1112
  target: a
1107
1113
  }],
1108
1114
  or: {
1109
- sid: "ff1m4n"
1115
+ sid: "f0qyp9"
1110
1116
  }
1111
- }), F({
1117
+ }), w({
1112
1118
  and: [{
1113
1119
  clock: l.opened,
1114
- filter: (c) => !(c != null && c.historyIgnore),
1115
- fn: (c) => {
1116
- var g;
1120
+ filter: (f) => !(f != null && f.historyIgnore),
1121
+ fn: (f) => {
1122
+ var b;
1117
1123
  return {
1118
- path: h(c && "params" in c ? c.params : void 0),
1119
- query: (g = c == null ? void 0 : c.query) !== null && g !== void 0 ? g : {},
1120
- replace: c == null ? void 0 : c.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: b
1129
+ target: c
1124
1130
  }],
1125
1131
  or: {
1126
- sid: "fuznc4"
1132
+ sid: "fgozwq"
1127
1133
  }
1128
- }), F({
1134
+ }), w({
1129
1135
  and: [{
1130
1136
  clock: l.closed,
1131
1137
  source: a,
1132
- fn: (c) => c.filter((g) => g !== l),
1138
+ fn: (f) => f.filter((b) => b !== l),
1133
1139
  target: a
1134
1140
  }],
1135
1141
  or: {
1136
- sid: "ges8p4"
1142
+ sid: "gc19qb"
1137
1143
  }
1138
1144
  });
1139
- return F({
1145
+ return w({
1140
1146
  and: [{
1141
- clock: o,
1147
+ clock: i,
1142
1148
  target: n
1143
1149
  }],
1144
1150
  or: {
1145
- sid: "guq9uv"
1151
+ sid: "ggfmfh"
1146
1152
  }
1147
- }), F({
1153
+ }), w({
1148
1154
  and: [{
1149
1155
  clock: n,
1150
1156
  filter: Boolean,
1151
- target: w
1157
+ target: d
1152
1158
  }],
1153
1159
  or: {
1154
- sid: "gxh8to"
1160
+ sid: "guq9uv"
1155
1161
  }
1156
- }), F({
1162
+ }), w({
1157
1163
  and: [{
1158
1164
  clock: y,
1159
1165
  fn: (l) => {
1160
- var h;
1166
+ var g;
1161
1167
  return {
1162
1168
  path: l.pathname,
1163
- query: (h = l.query) !== null && h !== void 0 ? h : {}
1169
+ query: (g = l.query) !== null && g !== void 0 ? g : {}
1164
1170
  };
1165
1171
  },
1166
- target: [le({
1167
- sid: "-38mmc2",
1168
- fn: () => de({
1172
+ target: [de({
1173
+ sid: "-3mx9rg",
1174
+ fn: () => pe({
1169
1175
  targets: {
1170
- path: i,
1176
+ path: o,
1171
1177
  query: s
1172
1178
  }
1173
1179
  }),
1174
1180
  name: "target",
1175
1181
  method: "spread"
1176
- }), p]
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: "hcbouf"
1206
+ sid: "i8rjuq"
1180
1207
  }
1181
1208
  }), {
1182
1209
  $query: s,
1183
- $path: i,
1210
+ $path: o,
1184
1211
  $activeRoutes: a,
1185
- back: f,
1186
- forward: u,
1212
+ back: u,
1213
+ forward: m,
1214
+ navigate: c,
1187
1215
  routes: r,
1188
- setHistory: o,
1189
- mappedRoutes: d,
1216
+ setHistory: i,
1217
+ mappedRoutes: h,
1190
1218
  trackQuery: De(a, s),
1191
1219
  "@@unitShape": () => ({
1192
1220
  query: s,
1193
- path: i,
1221
+ path: o,
1194
1222
  activeRoutes: a,
1195
- onBack: f,
1196
- onForward: u
1223
+ onBack: u,
1224
+ onForward: m,
1225
+ onNavigate: c
1197
1226
  })
1198
1227
  };
1199
1228
  }
1200
1229
  export {
1201
- Qe as createRoute,
1202
- We as createRouter,
1203
- O as parameters
1230
+ We as createRoute,
1231
+ Ge as createRouter,
1232
+ j as parameters
1204
1233
  };