@react-motion-router/stack 2.0.0-beta.sha-8fdf799 → 2.0.0-beta.sha-b7e17f2

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/build/index.js CHANGED
@@ -1,78 +1,78 @@
1
- import { NavigationBase as dt, resolveBaseURLFromPattern as ft, includesRoute as ot, ScreenBase as vt, matchRoute as K, RouterBase as gt, isValidScreenChild as X, cloneAndInject as pt, useNavigationBase as mt, useRouterBase as yt, useRouteBase as wt, useParamsBase as Et } from "@react-motion-router/core";
2
- import { Children as et, createRef as Pt, startTransition as j, useDebugValue as M, useState as St, useEffect as U, useRef as bt } from "react";
3
- import { GestureTimeline as _t, springToLinear as Lt, easingToLinear as H } from "web-animations-extension";
4
- import { jsx as ct } from "react/jsx-runtime";
5
- var g = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, kt = {}, b = {};
6
- Object.defineProperty(b, "__esModule", { value: !0 });
7
- var nt;
8
- (function(e) {
9
- e[e.tap = 0] = "tap", e[e.longpress = 1] = "longpress", e[e.pinchstart = 2] = "pinchstart", e[e.pinch = 3] = "pinch", e[e.pinchend = 4] = "pinchend", e[e.rotatestart = 5] = "rotatestart", e[e.rotate = 6] = "rotate", e[e.rotateend = 7] = "rotateend", e[e.swipestart = 8] = "swipestart", e[e.swipe = 9] = "swipe", e[e.swipeend = 10] = "swipeend", e[e.panstart = 11] = "panstart", e[e.pan = 12] = "pan", e[e.panend = 13] = "panend", e[e.doubletap = 14] = "doubletap";
10
- })(nt || (nt = {}));
11
- class Tt extends TouchEvent {
12
- constructor(t, n) {
1
+ import { NavigationBase as dt, resolveBaseURLFromPattern as ft, includesRoute as ut, ScreenBase as vt, matchRoute as N, RouterBase as gt, cloneAndInject as pt, useNavigationBase as mt, useRouterBase as yt, useRouteBase as wt, useParamsBase as Et } from "@react-motion-router/core";
2
+ import { createRef as Pt, startTransition as U, useDebugValue as X, useEffect as Y, useState as St, useRef as $, useCallback as bt } from "react";
3
+ import { GestureTimeline as _t, springToLinear as Lt, easingToLinear as A } from "web-animations-extension";
4
+ import { jsx as lt } from "react/jsx-runtime";
5
+ var g = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Tt = {}, T = {};
6
+ Object.defineProperty(T, "__esModule", { value: !0 });
7
+ var rt;
8
+ (function(n) {
9
+ n[n.tap = 0] = "tap", n[n.longpress = 1] = "longpress", n[n.pinchstart = 2] = "pinchstart", n[n.pinch = 3] = "pinch", n[n.pinchend = 4] = "pinchend", n[n.rotatestart = 5] = "rotatestart", n[n.rotate = 6] = "rotate", n[n.rotateend = 7] = "rotateend", n[n.swipestart = 8] = "swipestart", n[n.swipe = 9] = "swipe", n[n.swipeend = 10] = "swipeend", n[n.panstart = 11] = "panstart", n[n.pan = 12] = "pan", n[n.panend = 13] = "panend", n[n.doubletap = 14] = "doubletap";
10
+ })(rt || (rt = {}));
11
+ class kt extends TouchEvent {
12
+ constructor(t, e) {
13
13
  if (super(t, {
14
- touches: Array.from(n.touches),
15
- targetTouches: Array.from(n.targetTouches),
16
- changedTouches: Array.from(n.changedTouches),
17
- ctrlKey: n.ctrlKey,
18
- shiftKey: n.shiftKey,
19
- altKey: n.altKey,
20
- metaKey: n.metaKey,
14
+ touches: Array.from(e.touches),
15
+ targetTouches: Array.from(e.targetTouches),
16
+ changedTouches: Array.from(e.changedTouches),
17
+ ctrlKey: e.ctrlKey,
18
+ shiftKey: e.shiftKey,
19
+ altKey: e.altKey,
20
+ metaKey: e.metaKey,
21
21
  bubbles: !0,
22
22
  cancelable: !0
23
- }), t.includes("end") || n.type.includes("end")) {
24
- this.gestureTarget = n.changedTouches[0].target, this.x = n.changedTouches[0].clientX, this.y = n.changedTouches[0].clientY;
23
+ }), t.includes("end") || e.type.includes("end")) {
24
+ this.gestureTarget = e.changedTouches[0].target, this.x = e.changedTouches[0].clientX, this.y = e.changedTouches[0].clientY;
25
25
  return;
26
26
  }
27
- this.gestureTarget = n.touches[0].target, this.x = n.touches[0].clientX, this.y = n.touches[0].clientY;
27
+ this.gestureTarget = e.touches[0].target, this.x = e.touches[0].clientX, this.y = e.touches[0].clientY;
28
28
  }
29
29
  }
30
- b.default = Tt;
31
- var V = {}, Rt = g && g.__importDefault || function(e) {
32
- return e && e.__esModule ? e : { default: e };
30
+ T.default = kt;
31
+ var W = {}, Rt = g && g.__importDefault || function(n) {
32
+ return n && n.__esModule ? n : { default: n };
33
33
  };
34
- Object.defineProperty(V, "__esModule", { value: !0 });
35
- const It = Rt(b);
34
+ Object.defineProperty(W, "__esModule", { value: !0 });
35
+ const It = Rt(T);
36
36
  class xt extends It.default {
37
- constructor(t, n) {
38
- super("longpress", t), this.duration = 0, this.duration = n;
37
+ constructor(t, e) {
38
+ super("longpress", t), this.duration = 0, this.duration = e;
39
39
  }
40
40
  }
41
- V.default = xt;
42
- var $ = {}, Ft = g && g.__importDefault || function(e) {
43
- return e && e.__esModule ? e : { default: e };
41
+ W.default = xt;
42
+ var q = {}, Ft = g && g.__importDefault || function(n) {
43
+ return n && n.__esModule ? n : { default: n };
44
44
  };
45
- Object.defineProperty($, "__esModule", { value: !0 });
46
- const Dt = Ft(b);
45
+ Object.defineProperty(q, "__esModule", { value: !0 });
46
+ const Dt = Ft(T);
47
47
  class Ot extends Dt.default {
48
48
  constructor(t) {
49
49
  super("tap", t), this.duration = 0;
50
50
  }
51
51
  }
52
- $.default = Ot;
53
- var A = {}, Bt = g && g.__importDefault || function(e) {
54
- return e && e.__esModule ? e : { default: e };
52
+ q.default = Ot;
53
+ var G = {}, Kt = g && g.__importDefault || function(n) {
54
+ return n && n.__esModule ? n : { default: n };
55
55
  };
56
- Object.defineProperty(A, "__esModule", { value: !0 });
57
- const Kt = Bt(b);
58
- class Mt extends Kt.default {
56
+ Object.defineProperty(G, "__esModule", { value: !0 });
57
+ const Mt = Kt(T);
58
+ class Bt extends Mt.default {
59
59
  constructor(t) {
60
60
  super("doubletap", t);
61
61
  }
62
62
  }
63
- A.default = Mt;
64
- var R = {}, Yt = g && g.__importDefault || function(e) {
65
- return e && e.__esModule ? e : { default: e };
63
+ G.default = Bt;
64
+ var F = {}, Yt = g && g.__importDefault || function(n) {
65
+ return n && n.__esModule ? n : { default: n };
66
66
  };
67
- Object.defineProperty(R, "__esModule", { value: !0 });
68
- R.SwipeEndEvent = R.SwipeStartEvent = void 0;
69
- const Ct = Yt(b);
70
- var rt;
71
- (function(e) {
72
- e[e.start = 0] = "start", e[e.end = 1] = "end";
73
- })(rt || (rt = {}));
74
- class W extends Ct.default {
75
- constructor(t, n, r) {
67
+ Object.defineProperty(F, "__esModule", { value: !0 });
68
+ F.SwipeEndEvent = F.SwipeStartEvent = void 0;
69
+ const Ct = Yt(T);
70
+ var st;
71
+ (function(n) {
72
+ n[n.start = 0] = "start", n[n.end = 1] = "end";
73
+ })(st || (st = {}));
74
+ class z extends Ct.default {
75
+ constructor(t, e, r) {
76
76
  let s;
77
77
  switch (r) {
78
78
  case "start":
@@ -84,39 +84,39 @@ class W extends Ct.default {
84
84
  default:
85
85
  s = "swipe";
86
86
  }
87
- super(s, t), this.velocity = n.velocity, this.direction = n.direction;
87
+ super(s, t), this.velocity = e.velocity, this.direction = e.direction;
88
88
  }
89
89
  }
90
- class Xt extends W {
91
- constructor(t, n) {
92
- super(t, n);
90
+ class Xt extends z {
91
+ constructor(t, e) {
92
+ super(t, e);
93
93
  }
94
94
  }
95
- R.default = Xt;
96
- class jt extends W {
97
- constructor(t, n) {
98
- super(t, n, "start");
95
+ F.default = Xt;
96
+ class jt extends z {
97
+ constructor(t, e) {
98
+ super(t, e, "start");
99
99
  }
100
100
  }
101
- R.SwipeStartEvent = jt;
102
- class Ut extends W {
103
- constructor(t, n) {
104
- super(t, n, "end");
101
+ F.SwipeStartEvent = jt;
102
+ class Ht extends z {
103
+ constructor(t, e) {
104
+ super(t, e, "end");
105
105
  }
106
106
  }
107
- R.SwipeEndEvent = Ut;
108
- var I = {}, Nt = g && g.__importDefault || function(e) {
109
- return e && e.__esModule ? e : { default: e };
107
+ F.SwipeEndEvent = Ht;
108
+ var D = {}, Ut = g && g.__importDefault || function(n) {
109
+ return n && n.__esModule ? n : { default: n };
110
110
  };
111
- Object.defineProperty(I, "__esModule", { value: !0 });
112
- I.PanEndEvent = I.PanStartEvent = void 0;
113
- const Ht = Nt(b);
114
- var st;
115
- (function(e) {
116
- e[e.start = 0] = "start", e[e.end = 1] = "end";
117
- })(st || (st = {}));
118
- class q extends Ht.default {
119
- constructor(t, n, r) {
111
+ Object.defineProperty(D, "__esModule", { value: !0 });
112
+ D.PanEndEvent = D.PanStartEvent = void 0;
113
+ const Nt = Ut(T);
114
+ var it;
115
+ (function(n) {
116
+ n[n.start = 0] = "start", n[n.end = 1] = "end";
117
+ })(it || (it = {}));
118
+ class Z extends Nt.default {
119
+ constructor(t, e, r) {
120
120
  let s;
121
121
  switch (r) {
122
122
  case "start":
@@ -128,46 +128,46 @@ class q extends Ht.default {
128
128
  default:
129
129
  s = "pan";
130
130
  }
131
- super(s, t), this.velocity = n.velocity, this.translation = {
132
- x: n.translation.x,
133
- y: n.translation.y,
134
- magnitude: n.translation.magnitude,
135
- clientX: n.translation.clientX,
136
- clientY: n.translation.clientY,
137
- clientMagnitude: n.translation.clientMagnitude
131
+ super(s, t), this.velocity = e.velocity, this.translation = {
132
+ x: e.translation.x,
133
+ y: e.translation.y,
134
+ magnitude: e.translation.magnitude,
135
+ clientX: e.translation.clientX,
136
+ clientY: e.translation.clientY,
137
+ clientMagnitude: e.translation.clientMagnitude
138
138
  };
139
139
  }
140
140
  }
141
- class Vt extends q {
142
- constructor(t, n) {
143
- super(t, n);
141
+ class Vt extends Z {
142
+ constructor(t, e) {
143
+ super(t, e);
144
144
  }
145
145
  }
146
- I.default = Vt;
147
- class $t extends q {
148
- constructor(t, n) {
149
- super(t, n, "start");
146
+ D.default = Vt;
147
+ class $t extends Z {
148
+ constructor(t, e) {
149
+ super(t, e, "start");
150
150
  }
151
151
  }
152
- I.PanStartEvent = $t;
153
- class At extends q {
154
- constructor(t, n) {
155
- super(t, n, "end");
152
+ D.PanStartEvent = $t;
153
+ class At extends Z {
154
+ constructor(t, e) {
155
+ super(t, e, "end");
156
156
  }
157
157
  }
158
- I.PanEndEvent = At;
159
- var x = {}, Wt = g && g.__importDefault || function(e) {
160
- return e && e.__esModule ? e : { default: e };
158
+ D.PanEndEvent = At;
159
+ var O = {}, Wt = g && g.__importDefault || function(n) {
160
+ return n && n.__esModule ? n : { default: n };
161
161
  };
162
- Object.defineProperty(x, "__esModule", { value: !0 });
163
- x.PinchEndEvent = x.PinchStartEvent = void 0;
164
- const qt = Wt(b);
165
- var it;
166
- (function(e) {
167
- e[e.start = 0] = "start", e[e.end = 1] = "end";
168
- })(it || (it = {}));
169
- class z extends qt.default {
170
- constructor(t, n, r) {
162
+ Object.defineProperty(O, "__esModule", { value: !0 });
163
+ O.PinchEndEvent = O.PinchStartEvent = void 0;
164
+ const qt = Wt(T);
165
+ var at;
166
+ (function(n) {
167
+ n[n.start = 0] = "start", n[n.end = 1] = "end";
168
+ })(at || (at = {}));
169
+ class J extends qt.default {
170
+ constructor(t, e, r) {
171
171
  let s;
172
172
  switch (r) {
173
173
  case "start":
@@ -180,41 +180,41 @@ class z extends qt.default {
180
180
  s = "pinch";
181
181
  }
182
182
  super(s, t), Object.defineProperty(this, "scale", {
183
- value: n.scale,
183
+ value: e.scale,
184
184
  writable: !1
185
185
  });
186
186
  }
187
187
  }
188
- class zt extends z {
189
- constructor(t, n) {
190
- super(t, n);
188
+ class Gt extends J {
189
+ constructor(t, e) {
190
+ super(t, e);
191
191
  }
192
192
  }
193
- x.default = zt;
194
- class Gt extends z {
195
- constructor(t, n) {
196
- super(t, n, "start");
193
+ O.default = Gt;
194
+ class zt extends J {
195
+ constructor(t, e) {
196
+ super(t, e, "start");
197
197
  }
198
198
  }
199
- x.PinchStartEvent = Gt;
200
- class Zt extends z {
201
- constructor(t, n) {
202
- super(t, n, "end");
199
+ O.PinchStartEvent = zt;
200
+ class Zt extends J {
201
+ constructor(t, e) {
202
+ super(t, e, "end");
203
203
  }
204
204
  }
205
- x.PinchEndEvent = Zt;
206
- var F = {}, Jt = g && g.__importDefault || function(e) {
207
- return e && e.__esModule ? e : { default: e };
205
+ O.PinchEndEvent = Zt;
206
+ var K = {}, Jt = g && g.__importDefault || function(n) {
207
+ return n && n.__esModule ? n : { default: n };
208
208
  };
209
- Object.defineProperty(F, "__esModule", { value: !0 });
210
- F.RotateEndEvent = F.RotateStartEvent = void 0;
211
- const Qt = Jt(b);
212
- var at;
213
- (function(e) {
214
- e[e.start = 0] = "start", e[e.end = 1] = "end";
215
- })(at || (at = {}));
216
- class G extends Qt.default {
217
- constructor(t, n, r) {
209
+ Object.defineProperty(K, "__esModule", { value: !0 });
210
+ K.RotateEndEvent = K.RotateStartEvent = void 0;
211
+ const Qt = Jt(T);
212
+ var ot;
213
+ (function(n) {
214
+ n[n.start = 0] = "start", n[n.end = 1] = "end";
215
+ })(ot || (ot = {}));
216
+ class Q extends Qt.default {
217
+ constructor(t, e, r) {
218
218
  let s;
219
219
  switch (r) {
220
220
  case "start":
@@ -227,45 +227,45 @@ class G extends Qt.default {
227
227
  s = "rotate";
228
228
  }
229
229
  super(s, t), this.anchor = {
230
- x: n.anchor.x,
231
- y: n.anchor.y,
232
- clientX: n.anchor.clientX,
233
- clientY: n.anchor.clientY
230
+ x: e.anchor.x,
231
+ y: e.anchor.y,
232
+ clientX: e.anchor.clientX,
233
+ clientY: e.anchor.clientY
234
234
  }, Object.defineProperty(this, "rotation", {
235
- value: n.rotation,
235
+ value: e.rotation,
236
236
  writable: !1
237
- }), this.rotationDeg = n.rotationDeg;
237
+ }), this.rotationDeg = e.rotationDeg;
238
238
  }
239
239
  }
240
- class te extends G {
241
- constructor(t, n) {
242
- super(t, n);
240
+ class te extends Q {
241
+ constructor(t, e) {
242
+ super(t, e);
243
243
  }
244
244
  }
245
- F.default = te;
246
- class ee extends G {
247
- constructor(t, n) {
248
- super(t, n, "start");
245
+ K.default = te;
246
+ class ee extends Q {
247
+ constructor(t, e) {
248
+ super(t, e, "start");
249
249
  }
250
250
  }
251
- F.RotateStartEvent = ee;
252
- class ne extends G {
253
- constructor(t, n) {
254
- super(t, n, "end");
251
+ K.RotateStartEvent = ee;
252
+ class ne extends Q {
253
+ constructor(t, e) {
254
+ super(t, e, "end");
255
255
  }
256
256
  }
257
- F.RotateEndEvent = ne;
258
- var L = {};
259
- Object.defineProperty(L, "__esModule", { value: !0 });
260
- L.closest = L.Vec2 = L.assert = void 0;
261
- function re(e, t) {
262
- if (!e)
257
+ K.RotateEndEvent = ne;
258
+ var k = {};
259
+ Object.defineProperty(k, "__esModule", { value: !0 });
260
+ k.closest = k.Vec2 = k.assert = void 0;
261
+ function re(n, t) {
262
+ if (!n)
263
263
  throw new Error(t);
264
264
  }
265
- L.assert = re;
265
+ k.assert = re;
266
266
  class se {
267
- constructor(t, n) {
268
- this._x = 0, this._y = 0, this._clientX = 0, this._clientY = 0, this._clientX = t, this._clientY = n, this._x = this.translateX(t), this._y = this.translateY(n);
267
+ constructor(t, e) {
268
+ this._x = 0, this._y = 0, this._clientX = 0, this._clientY = 0, this._clientX = t, this._clientY = e, this._x = this.translateX(t), this._y = this.translateY(e);
269
269
  }
270
270
  translateY(t) {
271
271
  return -(t - window.innerHeight / 2);
@@ -307,22 +307,22 @@ class se {
307
307
  return Math.sqrt(Math.pow(this._clientX, 2) + Math.pow(this._clientY, 2));
308
308
  }
309
309
  }
310
- L.Vec2 = se;
311
- function ie(e, t) {
312
- return t.reduce((n, r) => {
313
- let s = Math.abs(n - e), i = Math.abs(r - e);
314
- return s === i ? n > r ? n : r : i < s ? r : n;
310
+ k.Vec2 = se;
311
+ function ie(n, t) {
312
+ return t.reduce((e, r) => {
313
+ let s = Math.abs(e - n), i = Math.abs(r - n);
314
+ return s === i ? e > r ? e : r : i < s ? r : e;
315
315
  });
316
316
  }
317
- L.closest = ie;
318
- (function(e) {
319
- var t = g && g.__createBinding || (Object.create ? function(c, a, h, y) {
320
- y === void 0 && (y = h), Object.defineProperty(c, y, { enumerable: !0, get: function() {
321
- return a[h];
317
+ k.closest = ie;
318
+ (function(n) {
319
+ var t = g && g.__createBinding || (Object.create ? function(c, a, l, m) {
320
+ m === void 0 && (m = l), Object.defineProperty(c, m, { enumerable: !0, get: function() {
321
+ return a[l];
322
322
  } });
323
- } : function(c, a, h, y) {
324
- y === void 0 && (y = h), c[y] = a[h];
325
- }), n = g && g.__setModuleDefault || (Object.create ? function(c, a) {
323
+ } : function(c, a, l, m) {
324
+ m === void 0 && (m = l), c[m] = a[l];
325
+ }), e = g && g.__setModuleDefault || (Object.create ? function(c, a) {
326
326
  Object.defineProperty(c, "default", { enumerable: !0, value: a });
327
327
  } : function(c, a) {
328
328
  c.default = a;
@@ -331,58 +331,58 @@ L.closest = ie;
331
331
  return c;
332
332
  var a = {};
333
333
  if (c != null)
334
- for (var h in c)
335
- h !== "default" && Object.prototype.hasOwnProperty.call(c, h) && t(a, c, h);
336
- return n(a, c), a;
334
+ for (var l in c)
335
+ l !== "default" && Object.prototype.hasOwnProperty.call(c, l) && t(a, c, l);
336
+ return e(a, c), a;
337
337
  }, s = g && g.__importDefault || function(c) {
338
338
  return c && c.__esModule ? c : { default: c };
339
339
  };
340
- Object.defineProperty(e, "__esModule", { value: !0 }), e.RotateEndEvent = e.RotateEvent = e.RotateStartEvent = e.PinchEndEvent = e.PinchEvent = e.PinchStartEvent = e.PanEndEvent = e.PanEvent = e.PanStartEvent = e.SwipeEndEvent = e.SwipeEvent = e.SwipeStartEvent = e.DoubleTapEvent = e.LongPressEvent = e.GestureEvent = e.TapEvent = void 0;
341
- const i = s(b);
342
- e.GestureEvent = i.default;
343
- const o = s(V);
344
- e.LongPressEvent = o.default;
345
- const d = s($);
346
- e.TapEvent = d.default;
347
- const u = s(A);
348
- e.DoubleTapEvent = u.default;
349
- const l = r(R);
350
- e.SwipeEvent = l.default, Object.defineProperty(e, "SwipeEndEvent", { enumerable: !0, get: function() {
351
- return l.SwipeEndEvent;
352
- } }), Object.defineProperty(e, "SwipeStartEvent", { enumerable: !0, get: function() {
353
- return l.SwipeStartEvent;
340
+ Object.defineProperty(n, "__esModule", { value: !0 }), n.RotateEndEvent = n.RotateEvent = n.RotateStartEvent = n.PinchEndEvent = n.PinchEvent = n.PinchStartEvent = n.PanEndEvent = n.PanEvent = n.PanStartEvent = n.SwipeEndEvent = n.SwipeEvent = n.SwipeStartEvent = n.DoubleTapEvent = n.LongPressEvent = n.GestureEvent = n.TapEvent = void 0;
341
+ const i = s(T);
342
+ n.GestureEvent = i.default;
343
+ const o = s(W);
344
+ n.LongPressEvent = o.default;
345
+ const u = s(q);
346
+ n.TapEvent = u.default;
347
+ const h = s(G);
348
+ n.DoubleTapEvent = h.default;
349
+ const f = r(F);
350
+ n.SwipeEvent = f.default, Object.defineProperty(n, "SwipeEndEvent", { enumerable: !0, get: function() {
351
+ return f.SwipeEndEvent;
352
+ } }), Object.defineProperty(n, "SwipeStartEvent", { enumerable: !0, get: function() {
353
+ return f.SwipeStartEvent;
354
354
  } });
355
- const m = r(I);
356
- e.PanEvent = m.default, Object.defineProperty(e, "PanEndEvent", { enumerable: !0, get: function() {
357
- return m.PanEndEvent;
358
- } }), Object.defineProperty(e, "PanStartEvent", { enumerable: !0, get: function() {
359
- return m.PanStartEvent;
355
+ const d = r(D);
356
+ n.PanEvent = d.default, Object.defineProperty(n, "PanEndEvent", { enumerable: !0, get: function() {
357
+ return d.PanEndEvent;
358
+ } }), Object.defineProperty(n, "PanStartEvent", { enumerable: !0, get: function() {
359
+ return d.PanStartEvent;
360
360
  } });
361
- const P = r(x);
362
- e.PinchEvent = P.default, Object.defineProperty(e, "PinchEndEvent", { enumerable: !0, get: function() {
361
+ const P = r(O);
362
+ n.PinchEvent = P.default, Object.defineProperty(n, "PinchEndEvent", { enumerable: !0, get: function() {
363
363
  return P.PinchEndEvent;
364
- } }), Object.defineProperty(e, "PinchStartEvent", { enumerable: !0, get: function() {
364
+ } }), Object.defineProperty(n, "PinchStartEvent", { enumerable: !0, get: function() {
365
365
  return P.PinchStartEvent;
366
366
  } });
367
- const w = r(F);
368
- e.RotateEvent = w.default, Object.defineProperty(e, "RotateEndEvent", { enumerable: !0, get: function() {
367
+ const w = r(K);
368
+ n.RotateEvent = w.default, Object.defineProperty(n, "RotateEndEvent", { enumerable: !0, get: function() {
369
369
  return w.RotateEndEvent;
370
- } }), Object.defineProperty(e, "RotateStartEvent", { enumerable: !0, get: function() {
370
+ } }), Object.defineProperty(n, "RotateStartEvent", { enumerable: !0, get: function() {
371
371
  return w.RotateStartEvent;
372
372
  } });
373
- const v = L;
373
+ const v = k;
374
374
  var p;
375
375
  (function(c) {
376
376
  c[c.right = 0] = "right", c[c.up = 1] = "up", c[c.left = 2] = "left", c[c.down = 3] = "down";
377
377
  })(p || (p = {}));
378
- class f {
378
+ class y {
379
379
  constructor() {
380
380
  this.touchStart = new TouchEvent("touchstart") || {}, this.touchMove = new TouchEvent("touchmove") || {}, this.touchEnd = new TouchEvent("touchend") || {}, this.touchCancel = new TouchEvent("touchcancel") || {}, this.velocity = 0, this.dxDy = new v.Vec2(0, 0), this.scale = 1, this.rotation = 0, this.rotationDeg = 0, this.anchor = new v.Vec2(0, 0), this.octant = 0, this.isPanning = !1, this.isPinching = !1, this.isSwiping = !1, this.isRotating = !1, this.touchStartTime = 0, this.touchEndTime = 0, this.lastTouchTime = 0, this.taps = 0, this.scaleBase = 0, this.touchMoved = !1, this.touchDown = !1, this.shouldFire = !1, this.pointers = 0, this.isLongPress = !1, this.longPressTimeout = 0, this.touchStartListener = this.onTouchStart.bind(this), this.touchMoveListener = this.onTouchMove.bind(this), this.touchEndListener = this.onTouchEnd.bind(this), this.touchCancelListener = this.onTouchCancel.bind(this), this.currentTarget = window, this.config = {
381
381
  longPressDuration: 500,
382
382
  tapDelay: 500,
383
383
  minPointers: 1,
384
384
  numberOfTaps: 0
385
- }, f.listening || (TouchEvent && window.addEventListener("touchstart", this.touchStartListener, !0), f.listening = !0);
385
+ }, y.listening || (TouchEvent && window.addEventListener("touchstart", this.touchStartListener, !0), y.listening = !0);
386
386
  }
387
387
  bind(a) {
388
388
  this.unbind(this.currentTarget), a.addEventListener("touchmove", this.touchMoveListener, !0), a.addEventListener("touchend", this.touchEndListener, !0), a.addEventListener("touchcancel", this.touchCancelListener, !0), this.currentTarget = a;
@@ -396,34 +396,34 @@ L.closest = ie;
396
396
  onPointerLeave(a) {
397
397
  if (!a.touches.length) {
398
398
  if (this.isSwiping) {
399
- const h = new l.SwipeEndEvent(a, {
399
+ const l = new f.SwipeEndEvent(a, {
400
400
  velocity: this.velocity,
401
401
  direction: p[(0, v.closest)(this.octant, [0, 1, 2, 3])]
402
402
  });
403
- this.dispatchEvent(h), this.isSwiping = !1;
403
+ this.dispatchEvent(l), this.isSwiping = !1;
404
404
  }
405
405
  if (this.isPanning) {
406
- const h = new m.PanEndEvent(a, {
406
+ const l = new d.PanEndEvent(a, {
407
407
  translation: this.dxDy,
408
408
  velocity: this.velocity
409
409
  });
410
- this.dispatchEvent(h), this.isPanning = !1;
410
+ this.dispatchEvent(l), this.isPanning = !1;
411
411
  }
412
412
  }
413
413
  if (a.touches.length === 1) {
414
414
  if (this.scaleBase = 0, this.isPinching) {
415
- const h = new P.PinchEndEvent(a, {
415
+ const l = new P.PinchEndEvent(a, {
416
416
  scale: this.scale
417
417
  });
418
- this.dispatchEvent(h), this.isPinching = !1;
418
+ this.dispatchEvent(l), this.isPinching = !1;
419
419
  }
420
420
  if (this.isRotating) {
421
- const h = new w.RotateEndEvent(a, {
421
+ const l = new w.RotateEndEvent(a, {
422
422
  rotation: this.rotation,
423
423
  rotationDeg: this.rotationDeg,
424
424
  anchor: this.anchor
425
425
  });
426
- this.dispatchEvent(h), this.isRotating = !1;
426
+ this.dispatchEvent(l), this.isRotating = !1;
427
427
  }
428
428
  }
429
429
  }
@@ -434,21 +434,21 @@ L.closest = ie;
434
434
  }
435
435
  onTouchStart(a) {
436
436
  this.currentTarget !== a.touches[0].target && (this.clean(), this.unbind(this.currentTarget), this.pointers = this.touchEnd.touches.length, this.taps = 0), this.touchStart = a;
437
- const h = parseInt(a.touches[0].target.dataset.minpointers || "0") || this.config.minPointers;
438
- if (this.touchStart.touches.length < h) {
437
+ const l = parseInt(a.touches[0].target.dataset.minpointers || "0") || this.config.minPointers;
438
+ if (this.touchStart.touches.length < l) {
439
439
  this.shouldFire = !1;
440
440
  return;
441
441
  }
442
442
  this.shouldFire = !0, this.touchStartTime = a.timeStamp, this.touchDown = !0, this.pointers || this.bind(a.touches[0].target), this.pointers = this.touchStart.touches.length;
443
- const y = parseFloat(this.currentTarget.dataset.longpressduration || "0") || this.config.longPressDuration;
443
+ const m = parseFloat(this.currentTarget.dataset.longpressduration || "0") || this.config.longPressDuration;
444
444
  if (this.longPressTimeout || (this.longPressTimeout = setTimeout(() => {
445
445
  if (!this.touchMoved && this.touchDown) {
446
- const E = Date.now() - this.touchStartTime, _ = new o.default(this.touchStart, E);
447
- this.dispatchEvent(_), this.isLongPress = !0, this.longPressTimeout = 0;
446
+ const E = Date.now() - this.touchStartTime, b = new o.default(this.touchStart, E);
447
+ this.dispatchEvent(b), this.isLongPress = !0, this.longPressTimeout = 0;
448
448
  }
449
- }, y)), this.touchStart.touches.length > 1) {
450
- const E = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), _ = new v.Vec2(this.touchStart.touches[1].clientX, this.touchStart.touches[1].clientY);
451
- this.scaleBase = E.substract(_).magnitude;
449
+ }, m)), this.touchStart.touches.length > 1) {
450
+ const E = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), b = new v.Vec2(this.touchStart.touches[1].clientX, this.touchStart.touches[1].clientY);
451
+ this.scaleBase = E.substract(b).magnitude;
452
452
  } else
453
453
  this.scaleBase = 0;
454
454
  }
@@ -456,84 +456,84 @@ L.closest = ie;
456
456
  if (!this.shouldFire)
457
457
  return;
458
458
  if (this.touchMoved = !0, this.touchMove = a, a.touches.length > 1 && this.touchStart.touches.length > 1 && (a.touches[1].clientX !== this.touchStart.touches[1].clientX || a.touches[1].clientY !== this.touchStart.touches[1].clientY)) {
459
- const S = new v.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY), Y = new v.Vec2(this.touchMove.touches[1].clientX, this.touchMove.touches[1].clientY), Q = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), tt = S.substract(Y);
460
- if (this.scaleBase && Math.abs(this.scaleBase - tt.magnitude) > 10) {
461
- const k = tt.magnitude / this.scaleBase;
462
- if (this.scale = k, this.isPinching) {
463
- const C = new P.default(a, {
464
- scale: k
459
+ const _ = new v.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY), j = new v.Vec2(this.touchMove.touches[1].clientX, this.touchMove.touches[1].clientY), et = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), nt = _.substract(j);
460
+ if (this.scaleBase && Math.abs(this.scaleBase - nt.magnitude) > 10) {
461
+ const I = nt.magnitude / this.scaleBase;
462
+ if (this.scale = I, this.isPinching) {
463
+ const H = new P.default(a, {
464
+ scale: I
465
465
  });
466
- this.dispatchEvent(C);
466
+ this.dispatchEvent(H);
467
467
  } else {
468
- const C = new P.PinchStartEvent(a, {
469
- scale: k
468
+ const H = new P.PinchStartEvent(a, {
469
+ scale: I
470
470
  });
471
- this.dispatchEvent(C), this.isPinching = !0;
471
+ this.dispatchEvent(H), this.isPinching = !0;
472
472
  }
473
473
  }
474
- this.anchor = S;
475
- let B = Math.atan2(Q.clientY - Y.clientY, Q.clientX - Y.clientX);
474
+ this.anchor = _;
475
+ let B = Math.atan2(et.clientY - j.clientY, et.clientX - j.clientX);
476
476
  if (B < 0 ? B += 1.5708 : B -= 1.5708, this.rotation = B, this.rotationDeg = B * 180 / Math.PI, this.anchor = this.anchor, this.isRotating) {
477
- const k = new w.default(a, {
477
+ const I = new w.default(a, {
478
478
  anchor: this.anchor,
479
479
  rotation: this.rotation,
480
480
  rotationDeg: this.rotationDeg
481
481
  });
482
- this.dispatchEvent(k);
482
+ this.dispatchEvent(I);
483
483
  } else {
484
- const k = new w.RotateStartEvent(a, {
484
+ const I = new w.RotateStartEvent(a, {
485
485
  anchor: this.anchor,
486
486
  rotation: this.rotation,
487
487
  rotationDeg: this.rotationDeg
488
488
  });
489
- this.dispatchEvent(k), this.isRotating = !0;
489
+ this.dispatchEvent(I), this.isRotating = !0;
490
490
  }
491
491
  }
492
- const h = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), E = new v.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY).substract(h), _ = E.magnitude, J = {
493
- x: E.x / _,
494
- y: E.y / _
495
- }, ht = Math.atan2(J.y, J.x);
496
- this.octant = Math.round(4 * ht / (2 * Math.PI) + 4) % 4;
497
- const lt = (a.timeStamp - this.touchStart.timeStamp) / 1e3, O = E.magnitude / lt;
492
+ const l = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), E = new v.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY).substract(l), b = E.magnitude, R = {
493
+ x: E.x / b,
494
+ y: E.y / b
495
+ }, S = Math.atan2(R.y, R.x);
496
+ this.octant = Math.round(4 * S / (2 * Math.PI) + 4) % 4;
497
+ const C = (a.timeStamp - this.touchStart.timeStamp) / 1e3, M = E.magnitude / C;
498
498
  if (this.isSwiping) {
499
- const S = new l.default(a, {
499
+ const _ = new f.default(a, {
500
500
  direction: p[(0, v.closest)(this.octant, [0, 1, 2, 3])],
501
- velocity: O
501
+ velocity: M
502
502
  });
503
- this.dispatchEvent(S);
503
+ this.dispatchEvent(_);
504
504
  } else {
505
- const S = new l.SwipeStartEvent(a, {
505
+ const _ = new f.SwipeStartEvent(a, {
506
506
  direction: p[(0, v.closest)(this.octant, [0, 1, 2, 3])],
507
- velocity: O
507
+ velocity: M
508
508
  });
509
- this.dispatchEvent(S), this.isSwiping = !0;
509
+ this.dispatchEvent(_), this.isSwiping = !0;
510
510
  }
511
- if (this.dxDy = E, this.velocity = O, this.isPanning) {
512
- const S = new m.default(a, {
511
+ if (this.dxDy = E, this.velocity = M, this.isPanning) {
512
+ const _ = new d.default(a, {
513
513
  translation: E,
514
- velocity: O
514
+ velocity: M
515
515
  });
516
- this.dispatchEvent(S);
516
+ this.dispatchEvent(_);
517
517
  } else {
518
- const S = new m.PanStartEvent(a, {
518
+ const _ = new d.PanStartEvent(a, {
519
519
  translation: E,
520
- velocity: O
520
+ velocity: M
521
521
  });
522
- this.dispatchEvent(S), this.isPanning = !0;
522
+ this.dispatchEvent(_), this.isPanning = !0;
523
523
  }
524
524
  }
525
525
  onTouchEnd(a) {
526
- const h = parseInt(this.currentTarget.dataset.numberoftaps || "0") || this.config.numberOfTaps;
527
- if (this.taps++, this.shouldFire = this.taps > h, this.shouldFire) {
526
+ const l = parseInt(this.currentTarget.dataset.numberoftaps || "0") || this.config.numberOfTaps;
527
+ if (this.taps++, this.shouldFire = this.taps > l, this.shouldFire) {
528
528
  this.touchEnd = a, this.touchEndTime = a.timeStamp;
529
- const y = parseFloat(this.currentTarget.dataset.tapdelay || "0") || this.config.tapDelay;
529
+ const m = parseFloat(this.currentTarget.dataset.tapdelay || "0") || this.config.tapDelay;
530
530
  if (!this.touchMoved && !this.isLongPress)
531
- if (this.taps === 1 || this.touchEndTime - this.lastTouchTime < y) {
532
- if (this.taps % 2 === h) {
533
- const _ = new u.default(a);
534
- this.dispatchEvent(_), this.taps = 0;
531
+ if (this.taps === 1 || this.touchEndTime - this.lastTouchTime < m) {
532
+ if (this.taps % 2 === l) {
533
+ const b = new h.default(a);
534
+ this.dispatchEvent(b), this.taps = 0;
535
535
  }
536
- const E = new d.default(a);
536
+ const E = new u.default(a);
537
537
  this.dispatchEvent(E);
538
538
  } else
539
539
  this.taps = 0;
@@ -544,8 +544,8 @@ L.closest = ie;
544
544
  this.shouldFire && (this.touchCancel = a, this.unbind(this.currentTarget), this.clean());
545
545
  }
546
546
  }
547
- e.default = f, f.listening = !1, TouchEvent && (window.gestureProvider = new f());
548
- })(kt);
547
+ n.default = y, y.listening = !1, TouchEvent && (window.gestureProvider = new y());
548
+ })(Tt);
549
549
  class ae extends Event {
550
550
  routerId;
551
551
  route;
@@ -554,8 +554,8 @@ class ae extends Event {
554
554
  signal;
555
555
  committed;
556
556
  transition;
557
- constructor(t, n, r, s, i, o, d) {
558
- super("navigate"), this.routerId = t, this.route = n, this.props = r, this.navigationType = s ?? "push", this.signal = i, this.committed = o, this.transition = d;
557
+ constructor(t, e, r, s, i, o, u) {
558
+ super("navigate"), this.routerId = t, this.route = e, this.props = r, this.navigationType = s ?? "push", this.signal = i, this.committed = o, this.transition = u;
559
559
  }
560
560
  }
561
561
  class oe extends Event {
@@ -563,8 +563,8 @@ class oe extends Event {
563
563
  signal;
564
564
  committed;
565
565
  transition;
566
- constructor(t, n, r, s) {
567
- super("back"), this.routerId = t, this.signal = n, this.committed = r, this.transition = s;
566
+ constructor(t, e, r, s) {
567
+ super("back"), this.routerId = t, this.signal = e, this.committed = r, this.transition = s;
568
568
  }
569
569
  }
570
570
  class ce extends Event {
@@ -572,8 +572,8 @@ class ce extends Event {
572
572
  signal;
573
573
  committed;
574
574
  transition;
575
- constructor(t, n, r, s) {
576
- super("forward"), this.routerId = t, this.signal = n, this.committed = r, this.transition = s;
575
+ constructor(t, e, r, s) {
576
+ super("forward"), this.routerId = t, this.signal = e, this.committed = r, this.transition = s;
577
577
  }
578
578
  }
579
579
  class ue extends Event {
@@ -582,13 +582,13 @@ class ue extends Event {
582
582
  super("gesture-start"), this.source = t;
583
583
  }
584
584
  }
585
- class he extends Event {
585
+ class le extends Event {
586
586
  source;
587
587
  constructor(t) {
588
588
  super("gesture-end"), this.source = t;
589
589
  }
590
590
  }
591
- class le extends Event {
591
+ class he extends Event {
592
592
  constructor() {
593
593
  super("gesture-cancel");
594
594
  }
@@ -597,8 +597,8 @@ class de {
597
597
  routerId;
598
598
  #t;
599
599
  index;
600
- constructor(t, n, r) {
601
- this.#t = t, this.routerId = n, this.index = r;
600
+ constructor(t, e, r) {
601
+ this.#t = t, this.routerId = e, this.index = r;
602
602
  }
603
603
  set ondispose(t) {
604
604
  this.#t.ondispose = t;
@@ -621,11 +621,11 @@ class de {
621
621
  get sameDocument() {
622
622
  return this.#t.sameDocument;
623
623
  }
624
- addEventListener(t, n, r) {
625
- return this.#t.addEventListener(t, n, r), () => this.#t.removeEventListener(t, n, r);
624
+ addEventListener(t, e, r) {
625
+ return this.#t.addEventListener(t, e, r), () => this.#t.removeEventListener(t, e, r);
626
626
  }
627
- removeEventListener(t, n, r) {
628
- this.#t.addEventListener(t, n, r);
627
+ removeEventListener(t, e, r) {
628
+ this.#t.addEventListener(t, e, r);
629
629
  }
630
630
  dispatchEvent(t) {
631
631
  return this.#t.dispatchEvent(t);
@@ -639,60 +639,63 @@ class fe extends dt {
639
639
  constructor(t) {
640
640
  super(), this.router = t;
641
641
  }
642
- replace(t, n = {}, r = {}) {
643
- return this.navigate(t, n, { ...r, type: "replace" });
642
+ preload(t, e = {}, r = {}) {
643
+ return this.router.preload(t, e, r);
644
+ }
645
+ replace(t, e = {}, r = {}) {
646
+ return this.navigate(t, e, { ...r, type: "replace" });
644
647
  }
645
- push(t, n = {}, r = {}) {
646
- return this.navigate(t, n, { ...r, type: "push" });
648
+ push(t, e = {}, r = {}) {
649
+ return this.navigate(t, e, { ...r, type: "push" });
647
650
  }
648
651
  reload(t = {}) {
649
652
  return window.navigation.reload({ state: t });
650
653
  }
651
- traverseTo(t, n = {}) {
652
- const r = window.navigation.traverseTo(t), s = window.navigation.transition, i = s.from.index, o = window.navigation.entries().findIndex((l) => l.key === t), d = new AbortController();
653
- d.signal.addEventListener("abort", () => this.traverseTo(s.from.key), { once: !0 }), n.signal?.addEventListener("abort", d.abort, { once: !0 });
654
- let u;
655
- return i > o ? u = this.createBackEvent(d.signal, r.committed, s) : u = this.createForwardEvent(d.signal, r.committed, s), this.dispatchEvent?.(u), r;
654
+ traverseTo(t, e = {}) {
655
+ const r = window.navigation.traverseTo(t), s = window.navigation.transition, i = s.from.index, o = window.navigation.entries().findIndex((f) => f.key === t), u = new AbortController();
656
+ u.signal.addEventListener("abort", () => this.traverseTo(s.from.key), { once: !0 }), e.signal?.addEventListener("abort", u.abort, { once: !0 });
657
+ let h;
658
+ return i > o ? h = this.createBackEvent(u.signal, r.committed, s) : h = this.createForwardEvent(u.signal, r.committed, s), this.dispatchEvent?.(h), r;
656
659
  }
657
- navigate(t, n = {}, r = {}) {
658
- const { type: s = "push" } = r, i = new URL(t, this.baseURL), o = window.navigation.navigate(i.href, { history: s, state: n }), d = window.navigation.transition, u = new AbortController();
659
- u.signal.addEventListener("abort", () => this.goBack(), { once: !0 }), r.signal?.addEventListener("abort", u.abort, { once: !0 });
660
- const l = this.createNavigateEvent(t, n, s, u.signal, o.committed, d);
661
- return this.dispatchEvent?.(l), o;
660
+ navigate(t, e = {}, r = {}) {
661
+ const { type: s = "push" } = r, i = new URL(t, this.baseURL), o = window.navigation.navigate(i.href, { history: s, state: e }), u = window.navigation.transition, h = new AbortController();
662
+ h.signal.addEventListener("abort", () => this.goBack(), { once: !0 }), r.signal?.addEventListener("abort", h.abort, { once: !0 });
663
+ const f = this.createNavigateEvent(t, e, s, h.signal, o.committed, u);
664
+ return this.dispatchEvent?.(f), o;
662
665
  }
663
666
  goBack(t = {}) {
664
667
  if (!this.canGoBack())
665
668
  return;
666
- const n = window.navigation.traverseTo(this.previous.key), r = window.navigation.transition, s = new AbortController();
669
+ const e = window.navigation.traverseTo(this.previous.key), r = window.navigation.transition, s = new AbortController();
667
670
  s.signal.addEventListener("abort", () => this.goForward(), { once: !0 }), t.signal?.addEventListener("abort", s.abort, { once: !0 });
668
- const i = this.createBackEvent(s.signal, n.committed, r);
669
- return this.dispatchEvent?.(i), n;
671
+ const i = this.createBackEvent(s.signal, e.committed, r);
672
+ return this.dispatchEvent?.(i), e;
670
673
  }
671
674
  goForward(t = {}) {
672
675
  if (!this.canGoForward())
673
676
  return;
674
- const n = window.navigation.traverseTo(this.next.key), r = window.navigation.transition, s = new AbortController();
677
+ const e = window.navigation.traverseTo(this.next.key), r = window.navigation.transition, s = new AbortController();
675
678
  s.signal.addEventListener("abort", () => this.goBack(), { once: !0 }), t.signal?.addEventListener("abort", s.abort, { once: !0 });
676
- const i = this.createForwardEvent(s.signal, n.committed, r);
677
- return this.dispatchEvent?.(i), n;
679
+ const i = this.createForwardEvent(s.signal, e.committed, r);
680
+ return this.dispatchEvent?.(i), e;
678
681
  }
679
- createBackEvent(t, n, r) {
682
+ createBackEvent(t, e, r) {
680
683
  if (!this.routerId)
681
684
  throw new Error("Router ID is not set");
682
- return new oe(this.routerId, t, n, r);
685
+ return new oe(this.routerId, t, e, r);
683
686
  }
684
- createForwardEvent(t, n, r) {
687
+ createForwardEvent(t, e, r) {
685
688
  if (!this.routerId)
686
689
  throw new Error("Router ID is not set");
687
- return new ce(this.routerId, t, n, r);
690
+ return new ce(this.routerId, t, e, r);
688
691
  }
689
- createNavigateEvent(t, n, r, s, i, o) {
692
+ createNavigateEvent(t, e, r, s, i, o) {
690
693
  if (!this.routerId)
691
694
  throw new Error("Router ID is not set");
692
695
  return new ae(
693
696
  this.routerId,
694
697
  t,
695
- n,
698
+ e,
696
699
  r,
697
700
  s,
698
701
  i,
@@ -710,22 +713,22 @@ class fe extends dt {
710
713
  }
711
714
  get entries() {
712
715
  const t = this.router.pathPatterns.filter(({ pattern: r }) => r.endsWith("**"));
713
- let n = !1;
716
+ let e = !1;
714
717
  return this.globalEntries.filter((r) => {
715
718
  if (!r.url)
716
719
  return !1;
717
720
  const s = new URL(r.url);
718
- return ft(this.baseURLPattern.pathname, s.pathname) ? ot(t, s.pathname, this.baseURLPattern.pathname) ? n ? !1 : n = !0 : (n = !1, !0) : !1;
721
+ return ft(this.baseURLPattern.pathname, s.pathname) ? ut(t, s.pathname, this.baseURLPattern.pathname) ? e ? !1 : e = !0 : (e = !1, !0) : !1;
719
722
  }).map((r, s) => new de(r, this.routerId, s));
720
723
  }
721
724
  get index() {
722
- const t = window.navigation.currentEntry?.index ?? -1, n = this.entries.at(0)?.globalIndex ?? -1, r = this.entries.at(-1)?.globalIndex ?? -1;
723
- if (t <= n)
725
+ const t = window.navigation.currentEntry?.index ?? -1, e = this.entries.at(0)?.globalIndex ?? -1, r = this.entries.at(-1)?.globalIndex ?? -1;
726
+ if (t <= e)
724
727
  return 0;
725
728
  if (t >= r)
726
729
  return this.entries.length - 1;
727
730
  {
728
- const s = this.globalEntries.slice(n, t + 1);
731
+ const s = this.globalEntries.slice(e, t + 1);
729
732
  return this.entries.findLastIndex((i) => s.findLastIndex((o) => i.key === o.key) > -1);
730
733
  }
731
734
  }
@@ -745,45 +748,45 @@ class fe extends dt {
745
748
  return !!this.next?.sameDocument;
746
749
  }
747
750
  }
748
- function ve(e) {
749
- return Object.fromEntries(e.entries());
751
+ function ve(n) {
752
+ return Object.fromEntries(n.entries());
750
753
  }
751
- function ge(e) {
752
- return new URLSearchParams(e).toString();
754
+ function ge(n) {
755
+ return new URLSearchParams(n).toString();
753
756
  }
754
- function pe(e) {
755
- return e && typeof e == "object" && "gesture" in e ? !!e.gesture : !1;
757
+ function pe(n) {
758
+ return n && typeof n == "object" && "gesture" in n ? !!n.gesture : !1;
756
759
  }
757
- function me(e) {
758
- return e && typeof e == "object" && "rollback" in e ? !!e.rollback : !1;
760
+ function me(n) {
761
+ return n && typeof n == "object" && "rollback" in n ? !!n.rollback : !1;
759
762
  }
760
- function N(e, t) {
761
- if (e === t)
763
+ function V(n, t) {
764
+ if (n === t)
762
765
  return !0;
763
- if (e === null || t === null || typeof e != "object" || typeof t != "object")
766
+ if (n === null || t === null || typeof n != "object" || typeof t != "object")
764
767
  return !1;
765
- const n = Object.keys(e), r = Object.keys(t);
766
- if (n.length !== r.length)
768
+ const e = Object.keys(n), r = Object.keys(t);
769
+ if (e.length !== r.length)
767
770
  return !1;
768
- for (let s of n)
769
- if (!r.includes(s) || !N(e[s], t[s]))
771
+ for (let s of e)
772
+ if (!r.includes(s) || !V(n[s], t[s]))
770
773
  return !1;
771
774
  return !0;
772
775
  }
773
- class ze extends vt {
776
+ class Je extends vt {
774
777
  #t;
775
- constructor(t, n) {
776
- super(t, n);
777
- const r = n, s = this.internalProps.id, i = r.navigation.entries.find((o) => o.key === s);
778
- if (!i)
779
- throw new Error(`No history entry found for: ${s}`);
780
- this.#t = i;
778
+ constructor(t, e) {
779
+ super(t, e);
780
+ const r = this.internalProps.id, s = e.navigation.entries.find((i) => i.key === r);
781
+ if (!s)
782
+ throw new Error(`No history entry found for: ${r}`);
783
+ this.#t = s;
781
784
  }
782
785
  static getDerivedStateFromProps(t) {
783
786
  return t.config?.presentation === "dialog" || t.config?.presentation === "modal" ? { elementType: "dialog" } : { elementType: "div" };
784
787
  }
785
788
  setParams(t) {
786
- super.setParams(t), this.setHistoryState(({ params: n }) => ({ params: { ...n, ...t } }));
789
+ super.setParams(t), this.setHistoryState(({ params: e }) => ({ params: { ...e, ...t } }));
787
790
  }
788
791
  setConfig(t) {
789
792
  super.setConfig(t);
@@ -800,17 +803,17 @@ class ze extends vt {
800
803
  get historyEntryState() {
801
804
  const t = this.#t;
802
805
  if (t?.url) {
803
- const n = t.getState() ?? {}, r = ve(t.url.searchParams), s = K(
806
+ const e = t.getState() ?? {}, r = ve(t.url.searchParams), s = N(
804
807
  this.props.path,
805
808
  t.url.pathname,
806
809
  this.context.baseURLPattern.pathname,
807
810
  this.props.caseSensitive
808
811
  )?.params;
809
- return n.params = {
810
- ...n.params,
812
+ return e.params = {
813
+ ...e.params,
811
814
  ...r,
812
815
  ...s
813
- }, n;
816
+ }, e;
814
817
  }
815
818
  return {};
816
819
  }
@@ -832,12 +835,12 @@ class ze extends vt {
832
835
  };
833
836
  }
834
837
  get routeProp() {
835
- const t = this.setParams.bind(this), n = this.setConfig.bind(this), { path: r } = this.props, { focused: s } = this.state, { params: i, config: o, resolvedPathname: d } = this;
838
+ const t = this.setParams.bind(this), e = this.setConfig.bind(this), { path: r } = this.props, { focused: s } = this.state, { params: i, config: o, resolvedPathname: u } = this;
836
839
  return {
837
840
  setParams: t,
838
- setConfig: n,
841
+ setConfig: e,
839
842
  path: r,
840
- resolvedPathname: d,
843
+ resolvedPathname: u,
841
844
  focused: s,
842
845
  params: i,
843
846
  config: o
@@ -846,10 +849,10 @@ class ze extends vt {
846
849
  setHistoryState(t) {
847
850
  if (!this.state.focused)
848
851
  return;
849
- const n = this.#t.getState() ?? {};
850
- t instanceof Function && (t = t(n));
852
+ const e = this.#t.getState() ?? {};
853
+ t instanceof Function && (t = t(e));
851
854
  const r = {
852
- ...n ?? {},
855
+ ...e ?? {},
853
856
  ...t
854
857
  };
855
858
  window.navigation.updateCurrentEntry({ state: r });
@@ -857,17 +860,17 @@ class ze extends vt {
857
860
  onClickOutside(t) {
858
861
  if (!this.transitionProvider.current?.ref.current)
859
862
  return;
860
- const n = this.context?.navigation, r = this.transitionProvider.current.ref.current.getBoundingClientRect();
861
- r.top <= t.clientY && t.clientY <= r.top + r.height && r.left <= t.clientX && t.clientX <= r.left + r.width || n?.goBack();
863
+ const e = this.context?.navigation, r = this.transitionProvider.current.ref.current.getBoundingClientRect();
864
+ r.top <= t.clientY && t.clientY <= r.top + r.height && r.left <= t.clientX && t.clientX <= r.left + r.width || e?.goBack();
862
865
  }
863
866
  onEnter(t) {
864
867
  if (this.transitionProvider.current?.ref.current instanceof HTMLDialogElement && this.transitionProvider.current.ref.current.open === !1) {
865
- const n = this.context?.navigation;
868
+ const e = this.context?.navigation;
866
869
  this.props.config?.presentation === "modal" ? this.transitionProvider.current.ref.current.showModal() : this.transitionProvider.current.ref.current.show(), this.transitionProvider.current.ref.current.style.maxHeight = "unset", this.transitionProvider.current.ref.current.style.maxWidth = "unset", this.transitionProvider.current.ref.current.style.width = "max-content", this.transitionProvider.current.ref.current.style.height = "max-content", this.ref.current && (this.ref.current.style.width = "max-content", this.ref.current.style.height = "max-content");
867
870
  const r = this.onClickOutside.bind(this);
868
871
  this.transitionProvider.current?.ref.current.addEventListener("close", function() {
869
- this.returnValue !== "screen-exit" && (this.style.display = "block", n?.goBack()), n?.removeEventListener("click", r);
870
- }, { once: !0 }), n?.addEventListener("click", r);
872
+ this.returnValue !== "screen-exit" && (this.style.display = "block", e?.goBack()), e?.removeEventListener("click", r);
873
+ }, { once: !0 }), e?.addEventListener("click", r);
871
874
  }
872
875
  return super.onEnter(t);
873
876
  }
@@ -875,8 +878,8 @@ class ze extends vt {
875
878
  return this.transitionProvider.current?.ref.current instanceof HTMLDialogElement && this.transitionProvider.current.ref.current.close("screen-exit"), super.onExited(t);
876
879
  }
877
880
  }
878
- function T(e) {
879
- return !!(e !== null && typeof e == "object" && e.hasOwnProperty("current"));
881
+ function x(n) {
882
+ return !!(n !== null && typeof n == "object" && n.hasOwnProperty("current"));
880
883
  }
881
884
  const ye = {
882
885
  horizontal: ["left", "right"],
@@ -886,31 +889,31 @@ const ye = {
886
889
  left: ["left"],
887
890
  right: ["right"]
888
891
  };
889
- function we(e, t) {
890
- return ye[t].includes(e);
892
+ function we(n, t) {
893
+ return ye[t].includes(n);
891
894
  }
892
- function Ee(e, { x: t, y: n }, r, s) {
893
- if (e === "right" && Math.abs(t - r.left) >= s || e === "left" && Math.abs(t - r.right) >= s || e === "down" && Math.abs(n - r.top) >= s || e === "up" && Math.abs(n - r.bottom) >= s)
895
+ function Ee(n, { x: t, y: e }, r, s) {
896
+ if (n === "right" && Math.abs(t - r.left) >= s || n === "left" && Math.abs(t - r.right) >= s || n === "down" && Math.abs(e - r.top) >= s || n === "up" && Math.abs(e - r.bottom) >= s)
894
897
  return !1;
895
898
  }
896
- function Pe(e) {
897
- return e === "left" || e === "right" || e === "horizontal";
899
+ function Pe(n) {
900
+ return n === "left" || n === "right" || n === "horizontal";
898
901
  }
899
- const D = {
902
+ const L = {
900
903
  gestureHysteresis: 0.5,
901
904
  gestureMinFlingVelocity: 400,
902
905
  gestureAreaWidth: 100,
903
906
  gestureDirection: "right",
904
907
  gestureDisabled: !1
905
- };
906
- class Se {
908
+ }, Se = 0.5;
909
+ class be {
907
910
  promise;
908
911
  state;
909
912
  nativeResolve;
910
913
  nativeReject;
911
914
  constructor() {
912
- this.state = "pending", this.nativeResolve = this.nativeReject = null, this.promise = new Promise((t, n) => {
913
- this.nativeResolve = t, this.nativeReject = n;
915
+ this.state = "pending", this.nativeResolve = this.nativeReject = null, this.promise = new Promise((t, e) => {
916
+ this.nativeResolve = t, this.nativeReject = e;
914
917
  });
915
918
  }
916
919
  resolve(t) {
@@ -921,17 +924,25 @@ class Se {
921
924
  }), this.nativeReject?.(t);
922
925
  }
923
926
  }
924
- class Ge extends gt {
927
+ class Qe extends gt {
925
928
  navigation = new fe(this);
926
929
  #t = null;
927
- constructor(t, n) {
928
- super(t, n), this.state = {
930
+ constructor(t, e) {
931
+ super(t, e);
932
+ const {
933
+ gestureAreaWidth: r = L.gestureAreaWidth,
934
+ gestureDirection: s = L.gestureDirection,
935
+ gestureDisabled: i = L.gestureDisabled,
936
+ gestureHysteresis: o = L.gestureHysteresis,
937
+ gestureMinFlingVelocity: u = L.gestureMinFlingVelocity
938
+ } = t.config?.screenConfig ?? {};
939
+ this.state = {
929
940
  screenStack: [],
930
- gestureDirection: "horizontal",
931
- gestureAreaWidth: 50,
932
- gestureHysteresis: 0.5,
933
- gestureDisabled: !0,
934
- gestureMinFlingVelocity: 500,
941
+ gestureDirection: s,
942
+ gestureAreaWidth: r,
943
+ gestureHysteresis: o,
944
+ gestureDisabled: i,
945
+ gestureMinFlingVelocity: u,
935
946
  transition: null,
936
947
  documentTitle: document.title,
937
948
  fromKey: null,
@@ -939,35 +950,45 @@ class Ge extends gt {
939
950
  controller: null
940
951
  };
941
952
  }
942
- static defaultProps = {
943
- config: {
944
- screenConfig: {
945
- ...D
946
- }
947
- }
948
- };
949
- static getDerivedStateFromProps(t, n) {
950
- const r = n.screenStack.find((s) => T(s.ref) && s.ref.current?.focused)?.props.config;
953
+ static getDerivedStateFromProps(t, e) {
954
+ const r = e.screenStack.find(
955
+ (s) => x(s.ref) && s.ref.current?.focused
956
+ )?.props.config;
951
957
  return document.title = r?.title ?? document.title, {
952
- gestureDirection: r?.gestureDirection ?? D.gestureDirection,
953
- gestureAreaWidth: r?.gestureAreaWidth ?? D.gestureAreaWidth,
954
- gestureMinFlingVelocity: r?.gestureMinFlingVelocity ?? D.gestureMinFlingVelocity,
955
- gestureHysteresis: r?.gestureHysteresis ?? D.gestureHysteresis,
956
- gestureDisabled: r?.gestureDisabled ?? D.gestureDisabled,
958
+ gestureDirection: r?.gestureDirection ?? L.gestureDirection,
959
+ gestureAreaWidth: r?.gestureAreaWidth ?? L.gestureAreaWidth,
960
+ gestureMinFlingVelocity: r?.gestureMinFlingVelocity ?? L.gestureMinFlingVelocity,
961
+ gestureHysteresis: r?.gestureHysteresis ?? L.gestureHysteresis,
962
+ gestureDisabled: r?.gestureDisabled ?? L.gestureDisabled,
957
963
  documentTitle: r?.title
958
964
  };
959
965
  }
960
966
  componentDidMount() {
961
- super.componentDidMount(), this.ref.current?.addEventListener("swipestart", this.onSwipeStart), this.ref.current?.addEventListener("swipeend", this.onSwipeEnd), window.navigation.addEventListener("currententrychange", this.onCurrentEntryChange), window.navigation.addEventListener("navigate", this.onNavigate), window.navigation.addEventListener("navigatesuccess", this.onNavigateSuccess), window.navigation.addEventListener("navigateerror", this.onNavigateError);
967
+ super.componentDidMount(), this.ref.current?.addEventListener("swipestart", this.onSwipeStart), this.ref.current?.addEventListener("swipeend", this.onSwipeEnd), window.navigation.addEventListener(
968
+ "currententrychange",
969
+ this.onCurrentEntryChange
970
+ ), window.navigation.addEventListener("navigate", this.onNavigate), window.navigation.addEventListener(
971
+ "navigatesuccess",
972
+ this.onNavigateSuccess
973
+ ), window.navigation.addEventListener("navigateerror", this.onNavigateError);
962
974
  }
963
- shouldComponentUpdate(t, n) {
964
- return !N(this.props.config, t.config) || !N(this.state, n) || this.props.id !== t.id;
975
+ shouldComponentUpdate(t, e) {
976
+ return !V(this.props.config, t.config) || !V(this.state, e) || this.props.id !== t.id;
965
977
  }
966
978
  componentWillUnmount() {
967
- this.ref.current?.removeEventListener("swipestart", this.onSwipeStart), this.ref.current?.removeEventListener("swipeend", this.onSwipeEnd), window.navigation.removeEventListener("currententrychange", this.onCurrentEntryChange), window.navigation.removeEventListener("navigate", this.onNavigate), window.navigation.removeEventListener("navigatesuccess", this.onNavigateSuccess), window.navigation.removeEventListener("navigateerror", this.onNavigateError);
979
+ this.ref.current?.removeEventListener("swipestart", this.onSwipeStart), this.ref.current?.removeEventListener("swipeend", this.onSwipeEnd), window.navigation.removeEventListener(
980
+ "currententrychange",
981
+ this.onCurrentEntryChange
982
+ ), window.navigation.removeEventListener("navigate", this.onNavigate), window.navigation.removeEventListener(
983
+ "navigatesuccess",
984
+ this.onNavigateSuccess
985
+ ), window.navigation.removeEventListener(
986
+ "navigateerror",
987
+ this.onNavigateError
988
+ );
968
989
  }
969
990
  onNavigate = () => {
970
- this.#t = new Se();
991
+ this.#t = new be();
971
992
  };
972
993
  onCurrentEntryChange = () => {
973
994
  this.#t?.nativeResolve?.(window.navigation.currentEntry);
@@ -981,20 +1002,22 @@ class Ge extends gt {
981
1002
  onGestureCancel = () => {
982
1003
  if (!this.state.transition)
983
1004
  throw new Error("Rollback failed, transition is null");
984
- window.navigation.traverseTo(this.state.transition.from.key, { info: { rollback: !0 } });
1005
+ window.navigation.traverseTo(this.state.transition.from.key, {
1006
+ info: { rollback: !0 }
1007
+ });
985
1008
  };
986
1009
  canGestureNavigate(t) {
987
1010
  if (!this.ref.current || this.state.gestureDisabled)
988
1011
  return !1;
989
- const n = this.ref.current.getBoundingClientRect(), { direction: r } = t;
990
- return (r === "down" || r === "right") && !this.navigation.canGoBack() || (r === "up" || r === "left") && !this.navigation.canGoForward() || Ee(r, t, n, this.state.gestureAreaWidth) ? !1 : we(r, this.state.gestureDirection);
1012
+ const e = this.ref.current.getBoundingClientRect(), { direction: r } = t;
1013
+ return (r === "down" || r === "right") && !this.navigation.canGoBack() || (r === "up" || r === "left") && !this.navigation.canGoForward() || Ee(r, t, e, this.state.gestureAreaWidth) ? !1 : we(r, this.state.gestureDirection);
991
1014
  }
992
1015
  onSwipeStart = (t) => {
993
1016
  if (!this.canGestureNavigate(t) || !this.ref.current || !this.screenTransitionLayer.current)
994
1017
  return;
995
- const { direction: n } = t;
996
- let r = Pe(n) ? "x" : "y", s, i;
997
- switch (n) {
1018
+ const { direction: e } = t, r = Pe(e) ? "x" : "y";
1019
+ let s, i;
1020
+ switch (e) {
998
1021
  case "right":
999
1022
  s = 0, i = this.ref.current.clientWidth;
1000
1023
  break;
@@ -1008,24 +1031,30 @@ class Ge extends gt {
1008
1031
  s = this.ref.current.clientHeight, i = 0;
1009
1032
  break;
1010
1033
  }
1011
- this.screenTransitionLayer.current.animation.timeline = new _t({
1012
- source: this.ref.current,
1013
- type: "swipe",
1014
- axis: r,
1015
- rangeStart: s,
1016
- rangeEnd: i
1017
- });
1034
+ this.screenTransitionLayer.current.animation.timeline = new _t(
1035
+ {
1036
+ source: this.ref.current,
1037
+ type: "swipe",
1038
+ axis: r,
1039
+ rangeStart: s,
1040
+ rangeEnd: i
1041
+ }
1042
+ );
1018
1043
  const o = !0;
1019
- n === "down" || n === "right" ? window.navigation.traverseTo(this.navigation.previous.key, { info: { gesture: o } }) : window.navigation.traverseTo(this.navigation.next.key, { info: { gesture: o } }), this.dispatchEvent(new ue(t));
1044
+ e === "down" || e === "right" ? window.navigation.traverseTo(this.navigation.previous.key, {
1045
+ info: { gesture: o }
1046
+ }) : window.navigation.traverseTo(this.navigation.next.key, {
1047
+ info: { gesture: o }
1048
+ }), this.dispatchEvent(new ue(t));
1020
1049
  };
1021
1050
  onSwipeEnd = (t) => {
1022
1051
  if (!this.screenTransitionLayer.current)
1023
1052
  return;
1024
- const n = this.screenTransitionLayer.current.animation.effect?.getComputedTiming().progress ?? 0, r = this.screenTransitionLayer.current.animation.playbackRate;
1053
+ const e = this.screenTransitionLayer.current.animation.effect?.getComputedTiming().progress ?? 0, r = this.screenTransitionLayer.current.animation.playbackRate;
1025
1054
  this.screenTransitionLayer.current.animation.timeline = document.timeline;
1026
- const s = r > 0 ? n > this.state.gestureHysteresis : n < this.state.gestureHysteresis;
1055
+ const s = r > 0 ? e > this.state.gestureHysteresis : e < this.state.gestureHysteresis;
1027
1056
  let i = !1;
1028
- t.velocity < this.state.gestureMinFlingVelocity && !s ? (i = !0, this.screenTransitionLayer.current.animation.reverse(), this.dispatchEvent(new le())) : this.dispatchEvent(new he(t)), i && this.screenTransitionLayer.current.animation.finished.then(() => {
1057
+ t.velocity < this.state.gestureMinFlingVelocity && !s ? (i = !0, this.screenTransitionLayer.current.animation.reverse(), this.dispatchEvent(new he())) : this.dispatchEvent(new le(t)), i && this.screenTransitionLayer.current.animation.finished.then(() => {
1029
1058
  this.state.controller?.abort("gesture-cancel");
1030
1059
  });
1031
1060
  };
@@ -1033,53 +1062,72 @@ class Ge extends gt {
1033
1062
  return this.#t?.promise ?? null;
1034
1063
  }
1035
1064
  get backNavigating() {
1036
- const t = this.state.screenStack.findIndex((r) => r.key === this.state.fromKey), n = this.state.screenStack.findIndex((r) => r.key === this.state.destinationKey);
1037
- return n >= 0 && n < t;
1065
+ const t = this.state.screenStack.findIndex(
1066
+ (r) => r.key === this.state.fromKey
1067
+ ), e = this.state.screenStack.findIndex(
1068
+ (r) => r.key === this.state.destinationKey
1069
+ );
1070
+ return e >= 0 && e < t;
1038
1071
  }
1039
1072
  get screens() {
1040
1073
  const t = this.state.screenStack;
1041
- return t.filter((n, r) => {
1042
- const s = n.ref ?? null, i = t.at(r + 1)?.ref;
1043
- return T(s) && s.current?.config.keepAlive || T(i) && i.current?.config.presentation === "modal" || T(i) && i.current?.config.presentation === "dialog" || n.key === this.navigation.current?.key || n.key === this.state.fromKey || n.key === this.state.destinationKey;
1074
+ return t.filter((e, r) => {
1075
+ const s = e.ref ?? null, i = t.at(r + 1)?.ref;
1076
+ return x(s) && s.current?.config.keepAlive || x(i) && i.current?.config.presentation === "modal" || x(i) && i.current?.config.presentation === "dialog" || e.key === this.navigation.current?.key || e.key === this.state.fromKey || e.key === this.state.destinationKey;
1044
1077
  });
1045
1078
  }
1046
- screenChildFromPathname(t, n) {
1047
- const r = et.toArray(this.props.children).find((s) => X(s) ? K(
1048
- s.props.path,
1049
- t,
1050
- this.baseURLPattern.pathname,
1051
- s.props.caseSensitive
1052
- ) !== null : !1);
1053
- return r ? (n ??= crypto.randomUUID(), pt(r, {
1079
+ async preload(t, e = {}, r = {}) {
1080
+ const { child: s, matchInfo: i } = this.screenChildFromPathname(t) ?? {};
1081
+ if (!s)
1082
+ return Promise.resolve(!1);
1083
+ const { navigation: o } = this, { signal: u } = r, { path: h } = s.props;
1084
+ return await Promise.all([
1085
+ this.preloadScreen(s),
1086
+ s.props.config?.onLoad?.({
1087
+ navigation: o,
1088
+ signal: u,
1089
+ preloading: !0,
1090
+ route: {
1091
+ focused: !1,
1092
+ path: h,
1093
+ resolvedPathname: t,
1094
+ config: {
1095
+ ...this.props.config?.screenConfig,
1096
+ ...s.props.config,
1097
+ ...e.config
1098
+ },
1099
+ params: {
1100
+ ...s.props.defaultParams,
1101
+ ...i?.params,
1102
+ ...e.params
1103
+ }
1104
+ }
1105
+ })
1106
+ ]), !0;
1107
+ }
1108
+ cloneScreenChildFromPathname(t, e) {
1109
+ const { child: r } = this.screenChildFromPathname(t) ?? {};
1110
+ return r ? (e ??= crypto.randomUUID(), pt(r, {
1054
1111
  config: {
1055
1112
  title: document.title,
1056
1113
  ...this.props.config?.screenConfig,
1057
1114
  ...r.props.config
1058
1115
  },
1059
- id: n,
1116
+ id: e,
1060
1117
  resolvedPathname: t,
1061
- key: n,
1118
+ key: e,
1062
1119
  ref: Pt()
1063
1120
  })) : null;
1064
1121
  }
1065
- getScreenChildByPathname(t) {
1066
- return et.toArray(this.props.children).find((n) => {
1067
- if (X(n))
1068
- return K(
1069
- n.props.path,
1070
- t,
1071
- this.baseURLPattern.pathname,
1072
- n.props.caseSensitive
1073
- );
1074
- });
1075
- }
1076
1122
  getScreenRefByKey(t) {
1077
- const n = this.state.screenStack.find((r) => r.key === t)?.ref;
1078
- return T(n) ? n : null;
1123
+ const e = this.state.screenStack.find(
1124
+ (r) => r.key === t
1125
+ )?.ref;
1126
+ return x(e) ? e : null;
1079
1127
  }
1080
1128
  canIntercept(t) {
1081
- const n = new URL(t.destination.url).pathname, r = this.baseURLPattern.pathname;
1082
- return this.mounted && this.shouldIntercept(t) && ot(this.pathPatterns, n, r);
1129
+ const e = new URL(t.destination.url).pathname, r = this.baseURLPattern.pathname;
1130
+ return this.mounted && this.shouldIntercept(t) && ut(this.pathPatterns, e, r);
1083
1131
  }
1084
1132
  shouldIntercept(t) {
1085
1133
  return t.canIntercept && !t.formData && !t.hashChange && !t.downloadRequest || !!this.props.config?.shouldIntercept?.(t);
@@ -1100,265 +1148,400 @@ class Ge extends gt {
1100
1148
  }
1101
1149
  }
1102
1150
  handleLoad(t) {
1103
- const n = () => {
1104
- const r = t.transition?.from?.key ?? null, s = t.destination.key, i = t.transition, o = new Array(), d = this.navigation.entries;
1105
- return d.forEach((u) => {
1106
- if (!u.url)
1151
+ const e = () => {
1152
+ const r = t.transition?.from?.key ?? null, s = t.destination.key, i = t.transition, o = [], u = this.navigation.entries;
1153
+ return u.forEach((h) => {
1154
+ if (!h.url)
1107
1155
  return null;
1108
- const l = this.screenChildFromPathname(u.url.pathname, u.key);
1109
- if (!l)
1156
+ const f = this.cloneScreenChildFromPathname(
1157
+ h.url.pathname,
1158
+ h.key
1159
+ );
1160
+ if (!f)
1110
1161
  return null;
1111
- o.push(l);
1112
- }), new Promise((u, l) => j(() => {
1113
- this.setState({ screenStack: o, fromKey: r, transition: i, destinationKey: s }, async () => {
1114
- const { initialPathname: m } = this.props.config ?? {}, [P] = d;
1115
- if (m && d.length === 1 && P.url && !K(
1116
- m,
1117
- P.url.pathname,
1118
- this.baseURLPattern.pathname
1119
- ))
1120
- return (window.navigation.transition?.finished ?? Promise.resolve()).then(() => {
1121
- this.navigation.replace(m).finished.then(() => {
1122
- const f = t.destination.getState() ?? {};
1123
- this.navigation.push(t.destination.url, f);
1124
- });
1125
- }), u();
1126
- const w = t.signal;
1127
- this.navigation.current?.key === void 0 && l(new Error("Current key is undefined"));
1128
- const v = this.getScreenRefByKey(this.navigation.current.key);
1129
- await this.dispatchLifecycleHandlers(v, null, w).catch(l), this.setState({ destinationKey: null, fromKey: null, transition: null }, u);
1130
- });
1131
- }));
1162
+ o.push(f);
1163
+ }), new Promise(
1164
+ (h, f) => U(() => {
1165
+ this.setState(
1166
+ { screenStack: o, fromKey: r, transition: i, destinationKey: s },
1167
+ async () => {
1168
+ const { initialPathname: d } = this.props.config ?? {}, [P] = u;
1169
+ if (d && u.length === 1 && P.url && !N(
1170
+ d,
1171
+ P.url.pathname,
1172
+ this.baseURLPattern.pathname
1173
+ ))
1174
+ return (window.navigation.transition?.finished ?? Promise.resolve()).then(() => {
1175
+ this.navigation.replace(d).finished.then(() => {
1176
+ const y = t.destination.getState() ?? {};
1177
+ this.navigation.push(t.destination.url, y);
1178
+ });
1179
+ }), h();
1180
+ const w = t.signal;
1181
+ this.navigation.current?.key === void 0 && f(new Error("Current key is undefined"));
1182
+ const v = this.getScreenRefByKey(
1183
+ this.navigation.current.key
1184
+ );
1185
+ await this.dispatchLifecycleHandlers(
1186
+ v,
1187
+ null,
1188
+ w
1189
+ ).catch(f), this.setState(
1190
+ { destinationKey: null, fromKey: null, transition: null },
1191
+ h
1192
+ );
1193
+ }
1194
+ );
1195
+ })
1196
+ );
1132
1197
  };
1133
- t.intercept({ handler: n });
1198
+ t.intercept({ handler: e });
1134
1199
  }
1135
1200
  handleReplace(t) {
1136
- const n = this.state.screenStack, r = t.destination, s = new URL(r.url).pathname, i = window.navigation.currentEntry?.key ?? r.key, o = this.screenChildFromPathname(s, i);
1201
+ const e = this.state.screenStack, r = t.destination, s = new URL(r.url).pathname, i = window.navigation.currentEntry?.key ?? r.key, o = this.cloneScreenChildFromPathname(
1202
+ s,
1203
+ i
1204
+ );
1137
1205
  if (!o)
1138
1206
  return t.preventDefault();
1139
- const d = () => {
1140
- const u = this.state.transition !== null, l = this.state.transition ?? window.navigation.transition, m = l?.from?.key ?? null, P = n.findIndex((w) => w.key === this.navigation.current?.key);
1141
- return n.splice(
1142
- P,
1143
- 1,
1144
- o
1145
- ), new Promise((w, v) => j(() => {
1146
- this.setState({ destinationKey: i, fromKey: m, transition: l, screenStack: n }, async () => {
1147
- const p = t.signal, f = this.getScreenRefByKey(String(m)), c = this.getScreenRefByKey(String(i)), a = this.dispatchLifecycleHandlers(c, null, p).catch(v);
1148
- if (u) {
1149
- const h = this.screenTransitionLayer.current?.animation.currentTime ?? 0;
1150
- this.screenTransitionLayer.current?.animation.cancel(), await new Promise(requestAnimationFrame);
1151
- const y = this.screenTransition(c, f);
1152
- y && (y.currentTime = h), y?.updatePlaybackRate(1), await y?.finished.catch(v);
1153
- }
1154
- await a, this.setState({ destinationKey: null, fromKey: null, transition: null }, w);
1155
- });
1156
- }));
1207
+ const u = () => {
1208
+ const h = this.state.transition !== null, f = this.state.transition ?? window.navigation.transition, d = f?.from?.key ?? null, P = e.findIndex(
1209
+ (w) => w.key === this.navigation.current?.key
1210
+ );
1211
+ return e.splice(P, 1, o), new Promise(
1212
+ (w, v) => U(() => {
1213
+ this.setState(
1214
+ { destinationKey: i, fromKey: d, transition: f, screenStack: e },
1215
+ async () => {
1216
+ const p = t.signal, y = this.getScreenRefByKey(String(d)), c = this.getScreenRefByKey(
1217
+ String(i)
1218
+ ), a = this.dispatchLifecycleHandlers(
1219
+ c,
1220
+ null,
1221
+ p
1222
+ ).catch(v);
1223
+ if (h) {
1224
+ const l = this.screenTransitionLayer.current?.animation.currentTime ?? 0;
1225
+ this.screenTransitionLayer.current?.animation.cancel(), await new Promise(requestAnimationFrame);
1226
+ const m = this.screenTransition(
1227
+ c,
1228
+ y
1229
+ );
1230
+ m && (m.currentTime = l), m?.updatePlaybackRate(1), await m?.finished.catch(v);
1231
+ }
1232
+ await a, this.setState(
1233
+ { destinationKey: null, fromKey: null, transition: null },
1234
+ w
1235
+ );
1236
+ }
1237
+ );
1238
+ })
1239
+ );
1157
1240
  };
1158
- t.intercept({ handler: d });
1241
+ t.intercept({ handler: u });
1159
1242
  }
1160
1243
  handleDefault(t) {
1161
- const n = this.state.screenStack, r = t.destination, s = new URL(r.url).pathname;
1162
- if (!X(this.getScreenChildByPathname(s)))
1244
+ const e = this.state.screenStack, r = t.destination, s = new URL(r.url).pathname;
1245
+ if (!this.screenChildFromPathname(s))
1163
1246
  return t.preventDefault();
1164
1247
  const i = () => {
1165
1248
  if (me(t.info))
1166
1249
  return Promise.resolve();
1167
- const u = window.navigation.transition;
1168
- let l = n.findIndex((p) => p.key === u?.from.key);
1169
- l === -1 && t.navigationType === "traverse" && (l = n.findIndex((p) => u?.from.url ? K(
1250
+ const h = window.navigation.transition;
1251
+ let f = e.findIndex(
1252
+ (p) => p.key === h?.from.key
1253
+ );
1254
+ f === -1 && t.navigationType === "traverse" && (f = e.findIndex((p) => h?.from.url ? N(
1170
1255
  p.props.path,
1171
- new URL(u.from.url).pathname,
1256
+ new URL(h.from.url).pathname,
1172
1257
  this.baseURLPattern.pathname,
1173
1258
  p.props.caseSensitive
1174
1259
  ) : !1));
1175
- const m = (n[l]?.key || u?.from.key) ?? null, P = n.findIndex((p) => p.key === t.destination.key), w = (n[P]?.key || window.navigation.currentEntry?.key) ?? null;
1260
+ const d = (e[f]?.key || h?.from.key) ?? null, P = e.findIndex(
1261
+ (p) => p.key === t.destination.key
1262
+ ), w = (e[P]?.key || window.navigation.currentEntry?.key) ?? null;
1176
1263
  if (t.navigationType === "push") {
1177
- const p = new URL(r.url).pathname, f = this.screenChildFromPathname(p, w);
1178
- if (!f)
1264
+ const p = new URL(r.url).pathname, y = this.cloneScreenChildFromPathname(
1265
+ p,
1266
+ w
1267
+ );
1268
+ if (!y)
1179
1269
  return Promise.resolve();
1180
- n.splice(
1181
- l + 1,
1270
+ e.splice(
1271
+ f + 1,
1182
1272
  1 / 0,
1183
1273
  // Remove all screens after current
1184
- f
1274
+ y
1185
1275
  );
1186
1276
  }
1187
1277
  const v = new AbortController();
1188
- return new Promise((p, f) => j(() => {
1189
- this.setState({ controller: v, destinationKey: w, fromKey: m, transition: u, screenStack: n }, async () => {
1190
- v.signal.onabort = f;
1191
- const c = t.signal, a = this.getScreenRefByKey(String(m)), h = this.getScreenRefByKey(String(w)), y = this.dispatchLifecycleHandlers(h, a, c).catch(f), E = this.screenTransition(h, a);
1192
- E?.updatePlaybackRate(1), E?.finished.catch(f), await y, this.setState({ destinationKey: null, fromKey: null, transition: null, controller: null }, p);
1193
- });
1194
- }));
1278
+ return new Promise(
1279
+ (p, y) => U(() => {
1280
+ this.setState(
1281
+ { controller: v, destinationKey: w, fromKey: d, transition: h, screenStack: e },
1282
+ async () => {
1283
+ v.signal.onabort = y;
1284
+ const c = t.signal, a = this.getScreenRefByKey(String(d)), l = this.getScreenRefByKey(
1285
+ String(w)
1286
+ ), m = this.dispatchLifecycleHandlers(
1287
+ l,
1288
+ a,
1289
+ c
1290
+ ).catch(y), E = this.screenTransition(
1291
+ l,
1292
+ a
1293
+ );
1294
+ E?.updatePlaybackRate(1), E?.finished.catch(y), await m, this.setState(
1295
+ {
1296
+ destinationKey: null,
1297
+ fromKey: null,
1298
+ transition: null,
1299
+ controller: null
1300
+ },
1301
+ p
1302
+ );
1303
+ }
1304
+ );
1305
+ })
1306
+ );
1195
1307
  };
1196
1308
  let o;
1197
- pe(t.info) ? (o = "after-transition", this.addEventListener("gesture-end", () => t.commit?.(), { once: !0 }), this.addEventListener("gesture-cancel", this.onGestureCancel, { once: !0 })) : o = "immediate";
1198
- const d = { handler: i, commit: o };
1199
- t.intercept(d);
1309
+ pe(t.info) ? (o = "after-transition", this.addEventListener("gesture-end", () => t.commit?.(), { once: !0 }), this.addEventListener("gesture-cancel", this.onGestureCancel, {
1310
+ once: !0
1311
+ })) : o = "immediate";
1312
+ const u = { handler: i, commit: o };
1313
+ t.intercept(u);
1200
1314
  }
1201
- async dispatchLifecycleHandlers(t, n, r) {
1315
+ async dispatchLifecycleHandlers(t, e, r) {
1202
1316
  let s = !1;
1203
- this.addEventListener("transition-start", () => s = !0, { once: !0 }), await Promise.all([
1204
- n?.current?.onExit(r),
1317
+ this.addEventListener("transition-start", () => s = !0, {
1318
+ once: !0
1319
+ }), await Promise.all([
1320
+ e?.current?.onExit(r),
1205
1321
  t?.current?.onEnter(r),
1206
1322
  t?.current?.load(r)
1207
- ]), s && await new Promise((i) => this.addEventListener("transition-end", i, { once: !0 })), !this.state.controller?.signal.aborted && await Promise.all([
1208
- n?.current?.onExited(r).then(() => n.current?.blur()),
1323
+ ]), s && await new Promise(
1324
+ (i) => this.addEventListener("transition-end", i, { once: !0 })
1325
+ ), !this.state.controller?.signal.aborted && await Promise.all([
1326
+ e?.current?.onExited(r).then(() => e.current?.blur()),
1209
1327
  t?.current?.onEntered(r).then(() => t.current?.focus())
1210
1328
  ]);
1211
1329
  }
1212
- screenTransition(t, n) {
1330
+ screenTransition(t, e) {
1213
1331
  const { backNavigating: r } = this;
1214
- if (this.screenTransitionLayer.current && t && n) {
1215
- this.screenTransitionLayer.current.direction = r ? "reverse" : "normal", t.current?.transitionProvider.current && (t.current.transitionProvider.current.exiting = !1), n.current?.transitionProvider.current && (n.current.transitionProvider.current.exiting = !0), this.screenTransitionLayer.current.sharedElementTransitionLayer.current && (this.screenTransitionLayer.current.sharedElementTransitionLayer.current.outgoingScreen = n, this.screenTransitionLayer.current.sharedElementTransitionLayer.current.incomingScreen = t);
1216
- const s = this.screens.findIndex((i) => i.ref === (r ? n : t));
1217
- return this.screenTransitionLayer.current.screens = this.screens.map((i, o) => (o = o - s + 1, T(i.ref) && i.ref.current?.transitionProvider.current ? (i.ref.current.transitionProvider.current.index = o, i.ref) : null)).filter(T), this.screenTransitionLayer.current.transition();
1332
+ if (this.screenTransitionLayer.current && t && e) {
1333
+ this.screenTransitionLayer.current.direction = r ? "reverse" : "normal", t.current?.transitionProvider.current && (t.current.transitionProvider.current.exiting = !1), e.current?.transitionProvider.current && (e.current.transitionProvider.current.exiting = !0), this.screenTransitionLayer.current.sharedElementTransitionLayer.current && (this.screenTransitionLayer.current.sharedElementTransitionLayer.current.outgoingScreen = e, this.screenTransitionLayer.current.sharedElementTransitionLayer.current.incomingScreen = t);
1334
+ const s = this.screens.findIndex(
1335
+ (i) => i.ref === (r ? e : t)
1336
+ );
1337
+ return this.screenTransitionLayer.current.screens = this.screens.map((i, o) => (o = o - s + 1, x(i.ref) && i.ref.current?.transitionProvider.current ? (i.ref.current.transitionProvider.current.index = o, i.ref) : null)).filter(x), this.screenTransitionLayer.current.transition();
1218
1338
  }
1219
1339
  }
1220
1340
  }
1221
- function be() {
1222
- return M("Stack.Navigation"), mt();
1341
+ function _e() {
1342
+ return X("Stack.Navigation"), mt();
1223
1343
  }
1224
- function Ze() {
1225
- return M("Stack.Router"), yt();
1344
+ function tn() {
1345
+ return X("Stack.Router"), yt();
1226
1346
  }
1227
- function Je() {
1228
- return M("Stack.Route"), wt();
1347
+ function en() {
1348
+ return X("Stack.Route"), wt();
1229
1349
  }
1230
- function Qe(e, t) {
1231
- return M("Stack.Params"), Et(e, t);
1350
+ function nn(n, t) {
1351
+ return X("Stack.Params"), Et(n, t);
1232
1352
  }
1233
- function _e(e) {
1234
- const t = be();
1235
- return e ?? t;
1353
+ function Le(n) {
1354
+ const t = _e();
1355
+ return n ?? t;
1236
1356
  }
1237
- function tn(e) {
1238
- const {
1239
- preload: t,
1240
- goBack: n,
1241
- params: r = {},
1242
- type: s = "push",
1243
- href: i,
1244
- onClick: o,
1245
- ...d
1246
- } = e, u = _e(e.navigation), [l, m] = St(void 0), P = u?.routerId, v = !l?.includes(window.location.origin) ? "noopener noreferrer" : n ? "prev" : "next";
1247
- return U(() => {
1248
- !t || !l || u.preloadRoute(i);
1249
- }, [t, i]), U(() => {
1250
- if (n)
1251
- m(u.previous?.url?.href);
1252
- else if (i) {
1253
- const f = ge(r), c = new URL(i, u.baseURL);
1254
- c.search = f, m(c.href);
1357
+ function Te(n, t = {}) {
1358
+ const e = $(null), r = bt(
1359
+ (s) => {
1360
+ s.forEach((i) => {
1361
+ i.isIntersecting && n(i);
1362
+ });
1363
+ },
1364
+ [n]
1365
+ );
1366
+ return Y(() => {
1367
+ const s = new IntersectionObserver(r, t), i = e.current;
1368
+ return i && s.observe(i), () => {
1369
+ i && s.unobserve(i);
1370
+ };
1371
+ }, [r, t]), e;
1372
+ }
1373
+ function ct(n, t, e, r) {
1374
+ Y(() => {
1375
+ const s = n.current;
1376
+ if (s)
1377
+ return s.addEventListener(t, e, r), () => {
1378
+ s.removeEventListener(t, e, r);
1379
+ };
1380
+ }, [n, t, e, r]);
1381
+ }
1382
+ function ke(n, { forceThreshold: t = Se } = {}) {
1383
+ const e = $(null), r = () => n(!0), s = (i) => {
1384
+ const o = i.touches[0];
1385
+ o && o.force >= t && n(!0);
1386
+ };
1387
+ return ct(e, "mouseenter", r), ct(e, "touchstart", s), e;
1388
+ }
1389
+ function rn({
1390
+ preload: n,
1391
+ goBack: t,
1392
+ params: e = {},
1393
+ type: r = "push",
1394
+ href: s,
1395
+ navigation: i,
1396
+ onClick: o,
1397
+ preloadBehaviour: u = {
1398
+ type: "onsight"
1399
+ },
1400
+ children: h,
1401
+ ...f
1402
+ }) {
1403
+ const d = Le(i), P = u?.type === "onsight", w = u?.type === "onhover", v = u?.type === "force", p = Te(
1404
+ (S) => {
1405
+ !S.isIntersecting || !n || d.preload(s, { params: e });
1406
+ },
1407
+ P ? u : {}
1408
+ ), y = ke(
1409
+ (S) => {
1410
+ !S || !n || d.preload(s, { params: e });
1411
+ },
1412
+ w ? u : {}
1413
+ );
1414
+ Y(() => {
1415
+ !n || !v || d.preload(s, { params: e });
1416
+ }, [n, s, d, v, e]);
1417
+ const [c, a] = St(void 0), l = d?.routerId, E = !c?.includes(window.location.origin) ? "noopener noreferrer" : t ? "prev" : "next";
1418
+ Y(() => {
1419
+ if (t && d.canGoBack())
1420
+ a(d.previous.url?.href);
1421
+ else if (s) {
1422
+ const S = ge(e), C = new URL(s, d.baseURL);
1423
+ C.search = S, a(C.href);
1255
1424
  }
1256
- }, [i, r]), /* @__PURE__ */ ct(
1425
+ }, [s, e, d, t]);
1426
+ const b = (S) => {
1427
+ t ? (S.preventDefault(), d.goBack()) : r === "replace" && s && (S.preventDefault(), d.replace(s)), o?.(S);
1428
+ };
1429
+ let R;
1430
+ switch (u?.type) {
1431
+ case "onhover":
1432
+ R = y;
1433
+ break;
1434
+ case "onsight":
1435
+ R = p;
1436
+ break;
1437
+ default:
1438
+ R = null;
1439
+ }
1440
+ return /* @__PURE__ */ lt(
1257
1441
  "a",
1258
1442
  {
1259
- href: l,
1260
- "data-router-id": P,
1261
- onClick: (f) => {
1262
- n ? (f.preventDefault(), u.goBack()) : s === "replace" && i && (f.preventDefault(), u.replace(i)), o?.(f);
1263
- },
1264
- rel: v,
1265
- ...d,
1266
- children: e.children
1443
+ href: c,
1444
+ "data-router-id": l,
1445
+ onClick: b,
1446
+ rel: E,
1447
+ ref: R,
1448
+ ...f,
1449
+ children: h
1267
1450
  }
1268
1451
  );
1269
1452
  }
1270
- const en = [
1453
+ const sn = [
1271
1454
  {
1272
1455
  transform: "translateX(100vw)"
1273
1456
  },
1274
1457
  {
1275
1458
  transform: "translateX(0vw)"
1276
1459
  }
1277
- ], Le = [
1460
+ ], Re = [
1278
1461
  {
1279
1462
  transform: "translateX(100vw)"
1280
1463
  },
1281
1464
  {
1282
1465
  transform: "translateX(0vw)"
1283
1466
  }
1284
- ], nn = [
1467
+ ], an = [
1285
1468
  {
1286
1469
  transform: "translateX(0vw)"
1287
1470
  },
1288
1471
  {
1289
1472
  transform: "translateX(-50vw)"
1290
1473
  }
1291
- ], ke = [
1474
+ ], Ie = [
1292
1475
  {
1293
1476
  transform: "translateX(0vw)"
1294
1477
  },
1295
1478
  {
1296
1479
  transform: "translateX(calc(100vw * -0.3))"
1297
1480
  }
1298
- ], rn = [
1481
+ ], on = [
1299
1482
  {
1300
1483
  transform: "translateX(-100vw)"
1301
1484
  },
1302
1485
  {
1303
1486
  transform: "translateX(0vw)"
1304
1487
  }
1305
- ], Te = [
1488
+ ], xe = [
1306
1489
  {
1307
1490
  transform: "translateX(-100vw)"
1308
1491
  },
1309
1492
  {
1310
1493
  transform: "translateX(0vw)"
1311
1494
  }
1312
- ], sn = [
1495
+ ], cn = [
1313
1496
  {
1314
1497
  transform: "translateX(0vw)"
1315
1498
  },
1316
1499
  {
1317
1500
  transform: "translateX(50vw)"
1318
1501
  }
1319
- ], Re = [
1502
+ ], Fe = [
1320
1503
  {
1321
1504
  transform: "translateX(0vw)"
1322
1505
  },
1323
1506
  {
1324
1507
  transform: "translateX(calc(100vw * 0.3))"
1325
1508
  }
1326
- ], an = [
1509
+ ], un = [
1327
1510
  {
1328
1511
  transform: "translateY(100vh)"
1329
1512
  },
1330
1513
  {
1331
1514
  transform: "translateY(0vh)"
1332
1515
  }
1333
- ], Ie = [
1516
+ ], De = [
1334
1517
  {
1335
1518
  transform: "translateY(100vh)"
1336
1519
  },
1337
1520
  {
1338
1521
  transform: "translateY(0vh)"
1339
1522
  }
1340
- ], on = [
1523
+ ], ln = [
1341
1524
  {
1342
1525
  transform: "translateY(0vh)"
1343
1526
  },
1344
1527
  {
1345
1528
  transform: "translateY(-50vh)"
1346
1529
  }
1347
- ], cn = [
1530
+ ], hn = [
1348
1531
  {
1349
1532
  transform: "translateY(-100vh)"
1350
1533
  },
1351
1534
  {
1352
1535
  transform: "translateY(0vh)"
1353
1536
  }
1354
- ], un = [
1537
+ ], dn = [
1355
1538
  {
1356
1539
  transform: "translateY(0vh)"
1357
1540
  },
1358
1541
  {
1359
1542
  transform: "translateY(50vh)"
1360
1543
  }
1361
- ], hn = [
1544
+ ], fn = [
1362
1545
  {
1363
1546
  transform: "scale(0.85)",
1364
1547
  opacity: 0
@@ -1367,7 +1550,7 @@ const en = [
1367
1550
  transform: "scale(1)",
1368
1551
  opacity: 1
1369
1552
  }
1370
- ], ln = [
1553
+ ], vn = [
1371
1554
  {
1372
1555
  transform: "scale(1)",
1373
1556
  opacity: 1
@@ -1376,21 +1559,21 @@ const en = [
1376
1559
  transform: "scale(1.15)",
1377
1560
  opacity: 0
1378
1561
  }
1379
- ], dn = [
1562
+ ], gn = [
1380
1563
  {
1381
1564
  opacity: 0
1382
1565
  },
1383
1566
  {
1384
1567
  opacity: 1
1385
1568
  }
1386
- ], fn = [
1569
+ ], pn = [
1387
1570
  {
1388
1571
  opacity: 1
1389
1572
  },
1390
1573
  {
1391
1574
  opacity: 0
1392
1575
  }
1393
- ], xe = [
1576
+ ], Oe = [
1394
1577
  {
1395
1578
  opacity: 0,
1396
1579
  transform: "translateY(calc(100vh * 0.08))"
@@ -1407,7 +1590,7 @@ const en = [
1407
1590
  opacity: 1,
1408
1591
  transform: "translateY(0vh)"
1409
1592
  }
1410
- ], Fe = [
1593
+ ], Ke = [
1411
1594
  {
1412
1595
  opacity: 0,
1413
1596
  transform: "translateY(96vw)"
@@ -1416,7 +1599,7 @@ const en = [
1416
1599
  opacity: 1,
1417
1600
  transform: "translateY(0vw)"
1418
1601
  }
1419
- ], De = [
1602
+ ], Me = [
1420
1603
  {
1421
1604
  opacity: 0,
1422
1605
  transform: "translateY(0vw)"
@@ -1425,21 +1608,21 @@ const en = [
1425
1608
  opacity: 1,
1426
1609
  transform: "translateY(-96vw)"
1427
1610
  }
1428
- ], Oe = [
1611
+ ], Be = [
1429
1612
  {
1430
1613
  transform: "translateY(100vh)"
1431
1614
  },
1432
1615
  {
1433
1616
  transform: "translateY(0vh)"
1434
1617
  }
1435
- ], Be = [
1618
+ ], Ye = [
1436
1619
  {
1437
1620
  transform: "translateY(0vh)"
1438
1621
  },
1439
1622
  {
1440
1623
  transform: "translateY(-2vh)"
1441
1624
  }
1442
- ], Ke = [
1625
+ ], Ce = [
1443
1626
  {
1444
1627
  transform: "scale(0.85)",
1445
1628
  opacity: 0
@@ -1456,7 +1639,7 @@ const en = [
1456
1639
  transform: "scale(1)",
1457
1640
  opacity: 1
1458
1641
  }
1459
- ], Me = [
1642
+ ], Xe = [
1460
1643
  {
1461
1644
  transform: "scale(1)",
1462
1645
  opacity: 1
@@ -1473,7 +1656,7 @@ const en = [
1473
1656
  transform: "scale(1.075)",
1474
1657
  opacity: 0
1475
1658
  }
1476
- ], Ye = [
1659
+ ], je = [
1477
1660
  {
1478
1661
  transform: "translateY(calc(100vh * 0.8))",
1479
1662
  opacity: 0
@@ -1483,13 +1666,13 @@ const en = [
1483
1666
  opacity: 1
1484
1667
  }
1485
1668
  ];
1486
- function Ce(e) {
1487
- return (t) => 1 - e(1 - t);
1669
+ function He(n) {
1670
+ return (t) => 1 - n(1 - t);
1488
1671
  }
1489
- function Xe(e) {
1490
- return (t) => Math.pow(t, e);
1672
+ function Ue(n) {
1673
+ return (t) => Math.pow(t, n);
1491
1674
  }
1492
- const Z = {
1675
+ const tt = {
1493
1676
  ...Lt({
1494
1677
  mass: 3,
1495
1678
  stiffness: 1e3,
@@ -1497,119 +1680,119 @@ const Z = {
1497
1680
  velocity: 0,
1498
1681
  steps: 200
1499
1682
  })
1500
- }, ut = {
1683
+ }, ht = {
1501
1684
  duration: 350,
1502
- easing: H(Ce(Xe(5)))
1503
- }, je = {
1685
+ easing: A(He(Ue(5)))
1686
+ }, Ne = {
1504
1687
  duration: 150,
1505
1688
  easing: "linear"
1506
- }, Ue = {
1689
+ }, Ve = {
1507
1690
  duration: 425,
1508
1691
  easing: "cubic-bezier(0.35, 0.45, 0, 1)"
1509
- }, Ne = {
1692
+ }, $e = {
1510
1693
  duration: 400,
1511
1694
  easing: "cubic-bezier(0.35, 0.45, 0, 1)"
1512
- }, He = {
1695
+ }, Ae = {
1513
1696
  duration: 250,
1514
- easing: H((e) => Math.cos((e + 1) * Math.PI) / 2 + 0.5)
1515
- }, Ve = {
1697
+ easing: A((n) => Math.cos((n + 1) * Math.PI) / 2 + 0.5)
1698
+ }, We = {
1516
1699
  duration: 200,
1517
- easing: H((e) => e === 1 ? 1 : Math.pow(e, 2))
1700
+ easing: A((n) => n === 1 ? 1 : Math.pow(n, 2))
1518
1701
  };
1519
- function vn({ ref: e, direction: t, playbackRate: n, index: r }) {
1702
+ function mn({ ref: n, direction: t, playbackRate: e, index: r }) {
1520
1703
  let i = [
1521
- ke,
1522
- Le
1704
+ Ie,
1705
+ Re
1523
1706
  ][r];
1524
1707
  const o = {
1525
- playbackRate: n,
1708
+ playbackRate: e,
1526
1709
  fill: "forwards",
1527
- ...Z
1710
+ ...tt
1528
1711
  };
1529
- return t === "reverse" && (i = i.toReversed()), new KeyframeEffect(e, i, o);
1712
+ return t === "reverse" && (i = i.toReversed()), new KeyframeEffect(n, i, o);
1530
1713
  }
1531
- function gn({ ref: e, direction: t, playbackRate: n, index: r }) {
1714
+ function yn({ ref: n, direction: t, playbackRate: e, index: r }) {
1532
1715
  let i = [
1533
- Re,
1534
- Te
1716
+ Fe,
1717
+ xe
1535
1718
  ][r];
1536
1719
  const o = {
1537
- playbackRate: n,
1720
+ playbackRate: e,
1538
1721
  fill: "forwards",
1539
- ...Z
1722
+ ...tt
1540
1723
  };
1541
- return t === "reverse" && (i = i.toReversed()), new KeyframeEffect(e, i, o);
1724
+ return t === "reverse" && (i = i.toReversed()), new KeyframeEffect(n, i, o);
1542
1725
  }
1543
- function pn({ ref: e, direction: t, playbackRate: n }) {
1544
- let r = Ie;
1726
+ function wn({ ref: n, direction: t, playbackRate: e }) {
1727
+ let r = De;
1545
1728
  const s = {
1546
- playbackRate: n,
1729
+ playbackRate: e,
1547
1730
  fill: "forwards",
1548
- ...Z
1731
+ ...tt
1549
1732
  };
1550
- return t === "reverse" && (r = r.toReversed()), new KeyframeEffect(e, r, s);
1733
+ return t === "reverse" && (r = r.toReversed()), new KeyframeEffect(n, r, s);
1551
1734
  }
1552
- function mn({ ref: e, direction: t, playbackRate: n }) {
1553
- let r = xe;
1735
+ function En({ ref: n, direction: t, playbackRate: e }) {
1736
+ let r = Oe;
1554
1737
  const s = {
1555
- playbackRate: n,
1738
+ playbackRate: e,
1556
1739
  fill: "forwards",
1557
- ...ut
1740
+ ...ht
1558
1741
  };
1559
- return t === "reverse" && (r = r.toReversed()), new KeyframeEffect(e, r, s);
1742
+ return t === "reverse" && (r = r.toReversed()), new KeyframeEffect(n, r, s);
1560
1743
  }
1561
- function yn({ ref: e, direction: t, index: n, playbackRate: r }) {
1562
- let s = Ye, i;
1563
- n === 0 ? i = Ve : i = He;
1744
+ function Pn({ ref: n, direction: t, index: e, playbackRate: r }) {
1745
+ let s = je, i;
1746
+ e === 0 ? i = We : i = Ae;
1564
1747
  const o = {
1565
1748
  playbackRate: r,
1566
1749
  fill: "forwards",
1567
1750
  ...i
1568
1751
  };
1569
- return t === "reverse" && (s = s.toReversed()), new KeyframeEffect(e, s, o);
1752
+ return t === "reverse" && (s = s.toReversed()), new KeyframeEffect(n, s, o);
1570
1753
  }
1571
- function wn({ ref: e, direction: t, index: n, playbackRate: r }) {
1754
+ function Sn({ ref: n, direction: t, index: e, playbackRate: r }) {
1572
1755
  const i = [
1573
- Be,
1574
- Oe
1575
- ][n], o = {
1756
+ Ye,
1757
+ Be
1758
+ ][e], o = {
1576
1759
  direction: t,
1577
1760
  playbackRate: r,
1578
1761
  fill: "forwards",
1579
- ...Ue
1762
+ ...Ve
1580
1763
  };
1581
- return new KeyframeEffect(e, i, o);
1764
+ return new KeyframeEffect(n, i, o);
1582
1765
  }
1583
- function En({ ref: e, direction: t, index: n, playbackRate: r }) {
1766
+ function bn({ ref: n, direction: t, index: e, playbackRate: r }) {
1584
1767
  let s = [
1585
- De,
1586
- Fe
1768
+ Me,
1769
+ Ke
1587
1770
  ], i;
1588
- n === 0 ? i = je : i = ut;
1589
- let o = s[n];
1590
- const d = {
1771
+ e === 0 ? i = Ne : i = ht;
1772
+ let o = s[e];
1773
+ const u = {
1591
1774
  playbackRate: r,
1592
1775
  fill: "forwards",
1593
1776
  ...i
1594
1777
  };
1595
- return t === "reverse" && (o = o.toReversed()), new KeyframeEffect(e, o, d);
1778
+ return t === "reverse" && (o = o.toReversed()), new KeyframeEffect(n, o, u);
1596
1779
  }
1597
- function Pn({ ref: e, direction: t, index: n, playbackRate: r }) {
1780
+ function _n({ ref: n, direction: t, index: e, playbackRate: r }) {
1598
1781
  const i = [
1599
- Me,
1600
- Ke
1601
- ][n], o = {
1782
+ Xe,
1783
+ Ce
1784
+ ][e], o = {
1602
1785
  direction: t,
1603
1786
  playbackRate: r,
1604
1787
  fill: "forwards",
1605
- ...Ne
1788
+ ...$e
1606
1789
  };
1607
- return new KeyframeEffect(e, i, o);
1790
+ return new KeyframeEffect(n, i, o);
1608
1791
  }
1609
- function Sn({ disabled: e, children: t, ...n }) {
1610
- const r = bt(null);
1611
- return U(() => {
1612
- if (e)
1792
+ function Ln({ disabled: n, children: t, ...e }) {
1793
+ const r = $(null);
1794
+ return Y(() => {
1795
+ if (n)
1613
1796
  return;
1614
1797
  const s = (i) => {
1615
1798
  i.stopPropagation(), i.preventDefault();
@@ -1617,68 +1800,68 @@ function Sn({ disabled: e, children: t, ...n }) {
1617
1800
  return r.current?.addEventListener("swipestart", s), () => {
1618
1801
  r.current?.removeEventListener("swipestart", s);
1619
1802
  };
1620
- }, [r, e]), /* @__PURE__ */ ct(
1803
+ }, [r, n]), /* @__PURE__ */ lt(
1621
1804
  "div",
1622
1805
  {
1623
1806
  ref: r,
1624
1807
  className: "gesture-region",
1625
- "data-disabled": e,
1808
+ "data-disabled": n,
1626
1809
  style: { display: "contents" },
1627
- ...n,
1810
+ ...e,
1628
1811
  children: t
1629
1812
  }
1630
1813
  );
1631
1814
  }
1632
1815
  export {
1633
- tn as Anchor,
1634
- dn as FadeInKeyframes,
1635
- fn as FadeOutKeyframes,
1636
- Sn as GestureRegion,
1816
+ rn as Anchor,
1817
+ gn as FadeInKeyframes,
1818
+ pn as FadeOutKeyframes,
1819
+ Ln as GestureRegion,
1637
1820
  de as HistoryEntry,
1638
1821
  fe as Navigation,
1639
- Ge as Router,
1640
- ze as Screen,
1641
- an as SlideInFromBottomKeyframes,
1642
- rn as SlideInFromLeftKeyframes,
1643
- en as SlideInFromRightKeyframes,
1644
- cn as SlideInFromTopKeyframes,
1645
- un as SlideOutToBottomKeyframes,
1646
- nn as SlideOutToLeftKeyframes,
1647
- sn as SlideOutToRightKeyframes,
1648
- on as SlideOutToTopKeyframes,
1649
- hn as ZoomInKeyframes,
1650
- ln as ZoomOutKeyframes,
1651
- He as androidBottomSheetSlideInOptions,
1652
- Ve as androidBottomSheetSlideOutOptions,
1653
- Be as androidConcealToBottomKeyframes,
1654
- mn as androidFadeInFromBottom,
1655
- xe as androidFadeInFromBottomKeyframes,
1656
- ut as androidFadeInFromBottomOptions,
1657
- yn as androidFadeInFromBottomSheet,
1658
- Ye as androidFadeInFromBottomSheetKeyframes,
1659
- En as androidFadeInFromRight,
1660
- Fe as androidFadeInFromRightKeyframes,
1661
- je as androidFadeOutToBottomOptions,
1662
- De as androidFadeOutToLeftKeyframes,
1663
- wn as androidRevealFromBottom,
1664
- Oe as androidRevealFromBottomKeyframes,
1665
- Ue as androidRevealFromBottomOptions,
1666
- Pn as androidScaleFromCentre,
1667
- Ke as androidScaleFromCentreKeyframes,
1668
- Ne as androidScaleFromCentreOptions,
1669
- Me as androidScaleToCentreKeyframes,
1670
- Z as iOSKeyframeOptions,
1671
- pn as iOSSlideInFromBottom,
1672
- Ie as iOSSlideInFromBottomKeyframes,
1673
- gn as iOSSlideInFromLeft,
1674
- Te as iOSSlideInFromLeftKeyframes,
1675
- vn as iOSSlideInFromRight,
1676
- Le as iOSSlideInFromRightKeyframes,
1677
- ke as iOSSlideOutToLeftKeyframes,
1678
- Re as iOSSlideOutToRightKeyframes,
1679
- be as useNavigation,
1680
- Qe as useParams,
1681
- Je as useRoute,
1682
- Ze as useRouter
1822
+ Qe as Router,
1823
+ Je as Screen,
1824
+ un as SlideInFromBottomKeyframes,
1825
+ on as SlideInFromLeftKeyframes,
1826
+ sn as SlideInFromRightKeyframes,
1827
+ hn as SlideInFromTopKeyframes,
1828
+ dn as SlideOutToBottomKeyframes,
1829
+ an as SlideOutToLeftKeyframes,
1830
+ cn as SlideOutToRightKeyframes,
1831
+ ln as SlideOutToTopKeyframes,
1832
+ fn as ZoomInKeyframes,
1833
+ vn as ZoomOutKeyframes,
1834
+ Ae as androidBottomSheetSlideInOptions,
1835
+ We as androidBottomSheetSlideOutOptions,
1836
+ Ye as androidConcealToBottomKeyframes,
1837
+ En as androidFadeInFromBottom,
1838
+ Oe as androidFadeInFromBottomKeyframes,
1839
+ ht as androidFadeInFromBottomOptions,
1840
+ Pn as androidFadeInFromBottomSheet,
1841
+ je as androidFadeInFromBottomSheetKeyframes,
1842
+ bn as androidFadeInFromRight,
1843
+ Ke as androidFadeInFromRightKeyframes,
1844
+ Ne as androidFadeOutToBottomOptions,
1845
+ Me as androidFadeOutToLeftKeyframes,
1846
+ Sn as androidRevealFromBottom,
1847
+ Be as androidRevealFromBottomKeyframes,
1848
+ Ve as androidRevealFromBottomOptions,
1849
+ _n as androidScaleFromCentre,
1850
+ Ce as androidScaleFromCentreKeyframes,
1851
+ $e as androidScaleFromCentreOptions,
1852
+ Xe as androidScaleToCentreKeyframes,
1853
+ tt as iOSKeyframeOptions,
1854
+ wn as iOSSlideInFromBottom,
1855
+ De as iOSSlideInFromBottomKeyframes,
1856
+ yn as iOSSlideInFromLeft,
1857
+ xe as iOSSlideInFromLeftKeyframes,
1858
+ mn as iOSSlideInFromRight,
1859
+ Re as iOSSlideInFromRightKeyframes,
1860
+ Ie as iOSSlideOutToLeftKeyframes,
1861
+ Fe as iOSSlideOutToRightKeyframes,
1862
+ _e as useNavigation,
1863
+ nn as useParams,
1864
+ en as useRoute,
1865
+ tn as useRouter
1683
1866
  };
1684
1867
  //# sourceMappingURL=index.js.map