@manyducks.co/dolla 3.1.0 → 3.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/router.js CHANGED
@@ -1,11 +1,9 @@
1
- import { a as e, c as t, f as n, h as r, l as i, n as a, p as o, r as s, t as c, u as l } from "./signals-CMJPGr_M.js";
2
- import { a as u, b as d, d as f, i as p, l as m, m as h, n as g, p as _, s as v, t as y, v as b } from "./context-B5blupD2.js";
3
- import { c as x } from "./core-JHktdqjt.js";
1
+ import { B as e, D as t, E as n, F as r, I as i, L as a, M as o, O as s, P as c, R as l, S as u, T as d, _ as f, b as p, c as m, f as h, g, h as _, p as v, w as y, x as b, y as x, z as S } from "./core-BRSu5hVw.js";
4
2
  //#region src/router/utils.ts
5
- function S(e) {
3
+ function C(e) {
6
4
  return e.split("/").map((e) => e.trim()).filter(Boolean);
7
5
  }
8
- function C(e) {
6
+ function w(e) {
9
7
  let t = e.map((e) => e.toString()).filter(Boolean).join("/");
10
8
  if (!t) return "";
11
9
  let n = t.startsWith("/"), r = t.split("/"), i = [];
@@ -13,19 +11,20 @@ function C(e) {
13
11
  let a = i.join("/");
14
12
  return n && (a = "/" + a), a || (n ? "/" : "");
15
13
  }
16
- function w(e, t = null) {
17
- return t ?? (t = e, e = ""), t.startsWith("/") ? C([t]) : C([e, t]);
14
+ function T(e, t = null) {
15
+ return t ?? (t = e, e = ""), t.startsWith("/") ? w([t]) : w([e, t]);
18
16
  }
19
- function T(e) {
17
+ function E(e) {
20
18
  return Object.fromEntries(new URLSearchParams(e));
21
19
  }
22
- function E(e, t, n) {
20
+ function D(e, t, n) {
23
21
  let r = {};
24
22
  if (n === !0) Object.assign(r, e);
25
23
  else if (i(n)) for (let t of n) t in e && (r[t] = e[t]);
26
- return Object.assign(r, t), new URLSearchParams(r);
24
+ for (let [e, n] of Object.entries(t)) n === null ? delete r[e] : r[e] = n;
25
+ return new URLSearchParams(r);
27
26
  }
28
- var D = class {
27
+ var O = class {
29
28
  staticChildren = /* @__PURE__ */ new Map();
30
29
  numericChild = null;
31
30
  paramChild = null;
@@ -34,77 +33,77 @@ var D = class {
34
33
  paramName;
35
34
  numericName;
36
35
  };
37
- function O(e) {
38
- let i = new D(), a = [];
39
- function s(e, t) {
40
- let n = S(e), r = i;
41
- for (let e of n) if (e === "*") r = r.wildcardChild ??= new D();
42
- else if (e.charCodeAt(0) === 123) e.charCodeAt(1) === 35 ? (r = r.numericChild ??= new D(), r.numericName = e.slice(2, -1)) : (r = r.paramChild ??= new D(), r.paramName = e.slice(1, -1));
36
+ function k(t) {
37
+ let n = new O(), i = [];
38
+ function o(e, t) {
39
+ let r = C(e), i = n;
40
+ for (let e of r) if (e === "*") i = i.wildcardChild ??= new O();
41
+ else if (e.charCodeAt(0) === 123) e.charCodeAt(1) === 35 ? (i = i.numericChild ??= new O(), i.numericName = e.slice(2, -1)) : (i = i.paramChild ??= new O(), i.paramName = e.slice(1, -1));
43
42
  else {
44
- let t = e.toLowerCase(), n = r.staticChildren.get(t);
45
- n || r.staticChildren.set(t, n = new D()), r = n;
43
+ let t = e.toLowerCase(), n = i.staticChildren.get(t);
44
+ n || i.staticChildren.set(t, n = new O()), i = n;
46
45
  }
47
- r.route = t;
46
+ i.route = t;
48
47
  }
49
- function c(e, i = [], u = []) {
50
- t(n(e) && o(e.path), "Invalid route object");
51
- let d = i.map((e) => e.path), f = i.at(-1), p = f && e.meta ? {
52
- ...f.meta,
53
- ...e.meta
54
- } : e.meta || {}, m = d.length ? C([...d, e.path]) : e.path, h = M(m);
55
- if (e.redirect) {
56
- t(!e.routes && !e.view, "Route cannot mix redirect with view/routes");
57
- let n = e.redirect;
58
- o(n) && (n = w(C(d), n), n.startsWith("/") || (n = "/" + n));
59
- for (let e of h) {
60
- let t = {
61
- pattern: e,
62
- meta: p,
63
- redirect: n
48
+ function s(t, n = [], c = []) {
49
+ r(l(t) && S(t.path), "Invalid route object");
50
+ let u = n.map((e) => e.path), d = n.at(-1), f = d && t.meta ? {
51
+ ...d.meta,
52
+ ...t.meta
53
+ } : t.meta || {}, p = u.length ? w([...u, t.path]) : t.path, m = N(p);
54
+ if (t.redirect) {
55
+ r(!t.routes && !t.view, "Route cannot mix redirect with view/routes");
56
+ let e = t.redirect;
57
+ S(e) && (e = T(w(u), e), e.startsWith("/") || (e = "/" + e));
58
+ for (let t of m) {
59
+ let n = {
60
+ pattern: t,
61
+ meta: f,
62
+ redirect: e
64
63
  };
65
- s(e, t), o(n) && a.push(t);
64
+ o(t, n), S(e) && i.push(n);
66
65
  }
67
66
  return;
68
67
  }
69
- t(e.view || e.routes, "Route must have view, redirect, or routes");
70
- let g = e.view || ((e) => e.children);
71
- if (!l(g) && !g._lazy) throw TypeError(`Expected view function for ${e.path}`);
72
- if (e.routes) {
73
- let t = {
74
- id: r(),
75
- pattern: m,
76
- view: g,
77
- preload: e.preload,
78
- errorView: e.errorView
68
+ r(t.view || t.routes, "Route must have view, redirect, or routes");
69
+ let h = t.view || ((e) => e.children);
70
+ if (!a(h) && !h._lazy) throw TypeError(`Expected view function for ${t.path}`);
71
+ if (t.routes) {
72
+ let r = {
73
+ id: e(),
74
+ pattern: p,
75
+ view: h,
76
+ preload: t.preload,
77
+ errorView: t.errorView
79
78
  };
80
- for (let n of e.routes) c(n, [...i, e], [...u, t]);
81
- } else for (let t of h) {
82
- let n = {
83
- id: r(),
84
- pattern: t,
85
- view: g,
86
- preload: e.preload,
87
- errorView: e.errorView
79
+ for (let e of t.routes) s(e, [...n, t], [...c, r]);
80
+ } else for (let n of m) {
81
+ let r = {
82
+ id: e(),
83
+ pattern: n,
84
+ view: h,
85
+ preload: t.preload,
86
+ errorView: t.errorView
88
87
  };
89
- s(t, {
90
- pattern: t,
91
- meta: p,
92
- layers: [...u, n]
88
+ o(n, {
89
+ pattern: n,
90
+ meta: f,
91
+ layers: [...c, r]
93
92
  });
94
93
  }
95
94
  }
96
- for (let t of e) c(t);
97
- for (let e of a) t(k(i, e.redirect, { willMatch: (t) => t !== e }), `Dead redirect: ${e.pattern} -> ${e.redirect}`);
98
- return i;
95
+ for (let e of t) s(e);
96
+ for (let e of i) r(A(n, e.redirect, { willMatch: (t) => t !== e }), `Dead redirect: ${e.pattern} -> ${e.redirect}`);
97
+ return n;
99
98
  }
100
- function k(e, t, n = {}) {
101
- let [r, i] = t.split("?"), a = S(r), o = {};
99
+ function A(e, t, n = {}) {
100
+ let [r, i] = t.split("?"), a = C(r), o = {};
102
101
  function s(e, t) {
103
102
  if (t === a.length) return e.route && (!n.willMatch || n.willMatch(e.route)) ? {
104
103
  path: r || "/",
105
104
  pattern: e.route.pattern,
106
105
  params: { ...o },
107
- query: T(i || ""),
106
+ query: E(i || ""),
108
107
  meta: e.route.meta,
109
108
  layers: e.route.layers ?? [],
110
109
  redirect: e.route.redirect
@@ -115,7 +114,7 @@ function k(e, t, n = {}) {
115
114
  ...o,
116
115
  wildcard: "/"
117
116
  },
118
- query: T(i || ""),
117
+ query: E(i || ""),
119
118
  meta: e.wildcardChild.route.meta,
120
119
  layers: e.wildcardChild.route.layers ?? [],
121
120
  redirect: e.wildcardChild.route.redirect
@@ -144,7 +143,7 @@ function k(e, t, n = {}) {
144
143
  ...o,
145
144
  wildcard: "/" + a.slice(t).map(decodeURIComponent).join("/")
146
145
  },
147
- query: T(i || ""),
146
+ query: E(i || ""),
148
147
  meta: e.wildcardChild.route.meta,
149
148
  layers: e.wildcardChild.route.layers ?? [],
150
149
  redirect: e.wildcardChild.route.redirect
@@ -152,28 +151,28 @@ function k(e, t, n = {}) {
152
151
  }
153
152
  return s(e, 0);
154
153
  }
155
- async function A(e, n, r = []) {
156
- let i = k(e, n);
157
- if (!i) return { journey: [...r, {
154
+ async function j(e, t, n = []) {
155
+ let i = A(e, t);
156
+ if (!i) return { journey: [...n, {
158
157
  kind: "miss",
159
- message: `no match for '${n}'`
158
+ message: `no match for '${t}'`
160
159
  }] };
161
160
  if (i.redirect != null) {
162
- let n = i.redirect;
163
- return o(n) ? n = N(n, i.params) : (n = await n(i), t(o(n), "Redirect function must return a path."), n.startsWith("/") || (n = w(i.path, n))), A(e, n, [...r, {
161
+ let t = i.redirect;
162
+ return S(t) ? t = P(t, i.params) : (t = await t(i), r(S(t), "Redirect function must return a path."), t.startsWith("/") || (t = T(i.path, t))), j(e, t, [...n, {
164
163
  kind: "redirect",
165
- message: `redirecting '${i.path}' -> '${n}'`
164
+ message: `redirecting '${i.path}' -> '${t}'`
166
165
  }]);
167
166
  }
168
167
  return {
169
168
  match: i,
170
- journey: [...r, {
169
+ journey: [...n, {
171
170
  kind: "match",
172
171
  message: `matched route '${i.path}'`
173
172
  }]
174
173
  };
175
174
  }
176
- function j(e, t, n = window) {
175
+ function M(e, t, n = window) {
177
176
  function r(r) {
178
177
  if (r.button && r.button !== 0 || r.ctrlKey || r.metaKey || r.altKey || r.shiftKey || r.defaultPrevented) return;
179
178
  let i = r.target.closest("a");
@@ -183,8 +182,8 @@ function j(e, t, n = window) {
183
182
  }
184
183
  return e.addEventListener("click", r), () => e.removeEventListener("click", r);
185
184
  }
186
- function M(e) {
187
- let t = S(e), n = [[]];
185
+ function N(e) {
186
+ let t = C(e), n = [[]];
188
187
  for (let e of t) {
189
188
  let t = e.endsWith("?}"), r = t ? e.replace("?", "") : e;
190
189
  if (t) {
@@ -194,131 +193,130 @@ function M(e) {
194
193
  }
195
194
  return n.map((e) => "/" + e.join("/")).map((e) => e === "/" ? e : e.replace(/\/$/, ""));
196
195
  }
197
- function N(e, t) {
196
+ function P(e, t) {
198
197
  for (let n in t) {
199
198
  let r = String(t[n]);
200
199
  e = e.replace(`{${n}}`, r).replace(`{#${n}}`, r).replace(`{${n}?}`, r).replace(`{#${n}?}`, r);
201
200
  }
202
201
  return e = e.replace(/\{#?[a-zA-Z0-9_]+\?\}/g, ""), e = e.replace(/\/+/g, "/"), e.length > 1 && e.endsWith("/") && (e = e.slice(0, -1)), e;
203
202
  }
204
- function P(e) {
205
- let t = window.history.state?.index || 0;
203
+ function F(t) {
204
+ let n = window.history.state?.index || 0;
206
205
  window.history.state?.index === void 0 && window.history.replaceState({
207
206
  ...window.history.state,
208
207
  key: Date.now().toString(),
209
- index: t
208
+ index: n
210
209
  }, "");
211
- let n = e ? () => window.location.hash.slice(1).split("?")[0] || "/" : () => window.location.pathname, i = e ? () => {
210
+ let r = t ? () => window.location.hash.slice(1).split("?")[0] || "/" : () => window.location.pathname, i = t ? () => {
212
211
  let e = window.location.hash, t = e.indexOf("?");
213
212
  return t === -1 ? "" : e.slice(t);
214
213
  } : () => window.location.search, a = () => window.history.state?.key || "root";
215
214
  return {
216
- getPath: n,
215
+ getPath: r,
217
216
  getSearch: i,
218
217
  getKey: a,
219
218
  getIndex: () => window.history.state?.index || 0,
220
- push: (n) => {
221
- t++;
222
- let i = e ? "/#" : "";
219
+ push: (r) => {
220
+ n++;
221
+ let i = t ? "/#" : "";
223
222
  window.history.pushState({
224
- key: r(),
225
- index: t
226
- }, "", i + n);
223
+ key: e(),
224
+ index: n
225
+ }, "", i + r);
227
226
  },
228
- replace: (n) => {
229
- let r = e ? "/#" : "";
227
+ replace: (e) => {
228
+ let r = t ? "/#" : "";
230
229
  window.history.replaceState({
231
230
  key: a(),
232
- index: t
233
- }, "", r + n);
231
+ index: n
232
+ }, "", r + e);
234
233
  }
235
234
  };
236
235
  }
237
236
  //#endregion
238
237
  //#region src/router/store.ts
239
- function F({ currentMatch: t, setCurrentMatch: n, progress: r, history: i, updateRoute: o, guards: s }) {
238
+ function I({ currentMatch: e, setCurrentMatch: n, progress: r, history: i, updateRoute: a, guards: s }) {
240
239
  this.name = "dolla:router";
241
- let c = x(this);
242
- async function l(e, t) {
240
+ let l = m(this);
241
+ async function u(e, t) {
243
242
  for (let e of s) if (await e()) return;
244
- c.info(`đŸ—ēī¸ navigating to '${e}'${t ? " (replace)" : ""}`);
245
- let n = w(i.getPath(), e);
246
- t ? i.replace(n) : i.push(n), o();
243
+ l.info(`đŸ—ēī¸ navigating to '${e}'${t ? " (replace)" : ""}`);
244
+ let n = T(i.getPath(), e);
245
+ t ? i.replace(n) : i.push(n), a();
247
246
  }
248
247
  return {
249
- path: a(() => t().path),
250
- pattern: a(() => t().pattern),
251
- params: a(() => t().params),
252
- query: a(() => t().query),
253
- meta: a(() => t().meta),
248
+ path: t(() => e().path),
249
+ pattern: t(() => e().pattern),
250
+ params: t(() => e().params),
251
+ query: t(() => e().query),
252
+ meta: t(() => e().meta),
254
253
  progress: r,
255
- setQuery(r) {
256
- let a = e(t), o = E(a.query, r, !0), s = Object.fromEntries(o);
254
+ setQuery(t) {
255
+ let r = o(e), a = D(r.query, t, !0), s = Object.fromEntries(a);
257
256
  n({
258
- ...a,
257
+ ...r,
259
258
  query: s
260
259
  });
261
- let c = o.size ? "?" + o.toString() : "";
262
- return i.replace(a.path + c), s;
260
+ let c = a.size ? "?" + a.toString() : "";
261
+ return i.replace(r.path + c), s;
263
262
  },
264
263
  back: (e = 1) => window.history.go(-e),
265
264
  forward: (e = 1) => window.history.go(e),
266
- push: (e) => l(e, !1),
267
- replace: (e) => l(e, !0),
265
+ push: (e) => u(e, !1),
266
+ replace: (e) => u(e, !0),
268
267
  block: (e) => (s.add(e), () => s.delete(e)),
269
- isActive(e, n = !1) {
270
- let r = e === "/" ? "/" : e.replace(/\/$/, ""), i = r === "/" ? "/" : r + "/";
271
- return a(() => {
272
- let e = t().path, a = e === "/" ? "/" : e.replace(/\/$/, "");
273
- return n ? a === r : a === r || a.startsWith(i);
268
+ isActive(n, r = !1) {
269
+ return t(() => {
270
+ let t = c(n), i = t === "/" ? "/" : t.replace(/\/$/, ""), a = i === "/" ? "/" : i + "/", o = e().path, s = o === "/" ? "/" : o.replace(/\/$/, "");
271
+ return r ? s === i : s === i || s.startsWith(a);
274
272
  });
275
273
  }
276
274
  };
277
275
  }
278
276
  //#endregion
279
277
  //#region src/router/router.ts
280
- var I = Symbol();
281
- function L(e) {
278
+ var L = Symbol();
279
+ function R(e) {
282
280
  return {
283
281
  _lazy: !0,
284
282
  load: e
285
283
  };
286
284
  }
287
- function R(t) {
288
- return function(n) {
285
+ function z(e) {
286
+ return function(t) {
289
287
  "scrollRestoration" in window.history && (window.history.scrollRestoration = "manual");
290
- let r = P(!!t.hash), i = /* @__PURE__ */ new Map(), a = r.getKey(), [o, l] = s({
288
+ let r = F(!!e.hash), i = /* @__PURE__ */ new Map(), a = r.getKey(), [c, l] = s({
291
289
  path: r.getPath(),
292
290
  pattern: "",
293
291
  params: {},
294
292
  query: Object.fromEntries(new URLSearchParams(r.getSearch())),
295
293
  meta: {}
296
- }), [u, S] = s(0), C = O(t.routes), w = /* @__PURE__ */ new Set(), T = g(n);
294
+ }), [g, S] = s(0), C = k(e.routes), w = /* @__PURE__ */ new Set(), T = v(t);
297
295
  T.name = "dolla:router";
298
- let D = x(T), [k, M] = s();
299
- n[I] = k;
300
- let L = {
301
- context: n,
302
- slot: k,
303
- setSlot: M
296
+ let E = m(T), [O, A] = s();
297
+ t[L] = O;
298
+ let N = {
299
+ context: t,
300
+ slot: O,
301
+ setSlot: A
304
302
  }, R = [];
305
- async function z(u) {
303
+ async function z(f) {
306
304
  i.set(a, window.scrollY);
307
- let p = u ?? r.getPath(), { match: m, journey: g } = await A(C, p);
308
- if (n[b]) for (let e = 0; e < g.length; e++) {
305
+ let m = f ?? r.getPath(), { match: h, journey: g } = await j(C, m);
306
+ if (t[y]) for (let e = 0; e < g.length; e++) {
309
307
  let t = g[e], n = `(update ${e + 1}/${g.length})`;
310
- t.kind === "match" ? D.info(`📍 ${n} ${t.message}`) : t.kind === "redirect" ? D.info(`â†Šī¸ ${n} ${t.message}`) : D.info(`💀 ${n} ${t.message}`);
308
+ t.kind === "match" ? E.info(`📍 ${n} ${t.message}`) : t.kind === "redirect" ? E.info(`â†Šī¸ ${n} ${t.message}`) : E.info(`💀 ${n} ${t.message}`);
311
309
  }
312
- if (!m) throw Error(`Failed to match route '${p}'`);
313
- let { layers: _, params: v } = m, y = [], x = 0;
310
+ if (!h) throw Error(`Failed to match route '${m}'`);
311
+ let { layers: _, params: v } = h, b = [], x = 0;
314
312
  for (let e = 0; e < _.length; e++) {
315
- let t = `${_[e].id}:${N(_[e].pattern, v)}`;
316
- y.push(t), x === e && R[e]?.key === t && x++;
313
+ let t = `${_[e].id}:${P(_[e].pattern, v)}`;
314
+ b.push(t), x === e && R[e]?.key === t && x++;
317
315
  }
318
316
  let w = [], T = [];
319
317
  for (let e = x; e < _.length; e++) {
320
318
  let t = _[e];
321
- t.preload && w.push(Promise.resolve(t.preload(m)).then((t) => {
319
+ t.preload && w.push(Promise.resolve(t.preload(h)).then((t) => {
322
320
  T[e - x] = t;
323
321
  }));
324
322
  let n = t.view;
@@ -334,30 +332,30 @@ function R(t) {
334
332
  try {
335
333
  await Promise.all(w);
336
334
  } catch (e) {
337
- if (S(0), e instanceof B) return V.replace(e.redirectPath);
335
+ if (S(0), e instanceof V) return B.replace(e.redirectPath);
338
336
  O = e instanceof Error ? e : Error(String(e)), k = x;
339
337
  }
340
338
  }
341
- let j = E(e(o).query, m.query, t.preserveQuery), M = j.toString(), P = m.path + (M ? `?${M}` : "");
342
- P !== r.getPath() + r.getSearch() && r.replace(P), c(() => {
339
+ let A = D(o(c).query, h.query, e.preserveQuery), M = A.toString(), F = h.path + (M ? `?${M}` : "");
340
+ F !== r.getPath() + r.getSearch() && r.replace(F), n(() => {
343
341
  if (l({
344
- ...m,
345
- query: Object.fromEntries(j)
342
+ ...h,
343
+ query: Object.fromEntries(A)
346
344
  }), !(x === _.length && R.length === _.length)) {
347
345
  R[x] && (R[x].node.unmount(), R.length = x);
348
346
  for (let e = x; e < _.length; e++) {
349
- let t = _[e], n = R[e - 1] ?? L, [r, i] = s(), a = t.view, o = {
347
+ let t = _[e], n = R[e - 1] ?? N, [r, i] = s(), a = t.view, o = {
350
348
  data: T[e - x],
351
- children: h(d, { args: [r] })
349
+ children: u(d, { args: [r] })
352
350
  };
353
351
  if (O && e === k) {
354
352
  if (!t.errorView) throw O;
355
353
  a = t.errorView, o = { error: O };
356
354
  }
357
- let c = new f(n.context, a, o);
355
+ let c = new p(n.context, a, o);
358
356
  if (n.setSlot(c), R.push({
359
357
  id: t.id,
360
- key: y[e],
358
+ key: b[e],
361
359
  node: c,
362
360
  context: c.context,
363
361
  slot: r,
@@ -369,61 +367,61 @@ function R(t) {
369
367
  window.scrollTo(0, i.get(r.getKey()) ?? 0), a = r.getKey();
370
368
  });
371
369
  }
372
- let V = y(n, F, {
373
- currentMatch: o,
370
+ let B = h(t, I, {
371
+ currentMatch: c,
374
372
  setCurrentMatch: l,
375
- progress: u,
373
+ progress: g,
376
374
  history: r,
377
375
  updateRoute: z,
378
376
  guards: w
379
377
  });
380
- m(n, () => {
381
- let e = !1, t = !1, i = r.getIndex(), a = _(window, "popstate", async () => {
378
+ x(t, () => {
379
+ let e = !1, n = !1, i = r.getIndex(), a = b(window, "popstate", async () => {
382
380
  if (e) {
383
381
  e = !1;
384
382
  return;
385
383
  }
386
- if (t) {
387
- t = !1, i = r.getIndex(), z();
384
+ if (n) {
385
+ n = !1, i = r.getIndex(), z();
388
386
  return;
389
387
  }
390
- let n = r.getIndex(), a = i - n;
388
+ let t = r.getIndex(), a = i - t;
391
389
  if (w.size > 0) {
392
390
  e = !0, window.history.go(a);
393
- let n = !1;
391
+ let t = !1;
394
392
  for (let e of w) if (await e()) {
395
- n = !0;
393
+ t = !0;
396
394
  break;
397
395
  }
398
- n || (t = !0, window.history.go(-a));
396
+ t || (n = !0, window.history.go(-a));
399
397
  return;
400
398
  }
401
- i = n, z();
402
- }), o = _(window, "beforeunload", (e) => {
399
+ i = t, z();
400
+ }), o = b(window, "beforeunload", (e) => {
403
401
  w.size > 0 && (e.preventDefault(), e.returnValue = "");
404
- }), s = j(p(n), V.push);
405
- v(n, () => {
402
+ }), s = M(_(t), B.push);
403
+ f(t, () => {
406
404
  a(), o(), s();
407
405
  }), z();
408
406
  });
409
407
  };
410
408
  }
411
- function z() {
409
+ function B() {
412
410
  this.name = "dolla:router";
413
- let e = this[I];
414
- return t(e != null, "Router plugin not found on root."), new d(this, e);
411
+ let e = this[L];
412
+ return r(e != null, "Router plugin not found on root."), new d(this, e);
415
413
  }
416
- var B = class extends Error {
414
+ var V = class extends Error {
417
415
  constructor(e) {
418
416
  super(`Redirecting to ${e}`), this.redirectPath = e, this.name = "RedirectError";
419
417
  }
420
418
  };
421
419
  //#endregion
422
420
  //#region src/router/index.ts
423
- function V(e) {
424
- return u(e, F);
421
+ function H(e) {
422
+ return g(e, I);
425
423
  }
426
424
  //#endregion
427
- export { z as Outlet, B as RedirectError, R as createRouterPlugin, V as getRouter, L as lazy };
425
+ export { B as Outlet, V as RedirectError, z as createRouterPlugin, H as getRouter, R as lazy };
428
426
 
429
427
  //# sourceMappingURL=router.js.map