@react-motion-router/stack 2.0.0-beta.sha-679879e → 2.0.0-beta.sha-112968d
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/Anchor.d.ts +1 -1
- package/build/GestureRegion.d.ts +1 -1
- package/build/HistoryEntry.d.ts +4 -4
- package/build/Navigation.d.ts +185 -5
- package/build/__tests__/Navigation/common/constants.d.ts +4 -0
- package/build/__tests__/Navigation/preload.test.d.ts +1 -0
- package/build/__tests__/Screen/set-config.test.d.ts +1 -0
- package/build/__tests__/Screen/set-params.test.d.ts +1 -0
- package/build/common/constants.d.ts +1 -0
- package/build/common/events.d.ts +2 -2
- package/build/common/hooks.d.ts +4 -0
- package/build/common/promise-wrapper.d.ts +2 -3
- package/build/index.js +880 -645
- package/build/index.js.map +1 -1
- package/package.json +5 -3
- /package/build/__tests__/{navigation.test.d.ts → Navigation/entries.test.d.ts} +0 -0
- /package/build/__tests__/{screen.test.d.ts → Navigation/index.test.d.ts} +0 -0
package/build/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { NavigationBase as
|
|
2
|
-
import { createRef as
|
|
3
|
-
import { GestureTimeline as
|
|
4
|
-
import { jsx as
|
|
5
|
-
var g = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {},
|
|
6
|
-
Object.defineProperty(
|
|
7
|
-
var
|
|
1
|
+
import { NavigationBase as gt, resolveBaseURLFromPattern as pt, matchRoute as X, LAST_INDEX as k, FIRST_INDEX as U, SINGLE_ELEMENT_LENGTH as R, ScreenBase as mt, RouterBase as yt, cloneAndInject as wt, useNavigationBase as Et, useRouterBase as Pt, useRouteBase as St, useParamsBase as bt } from "@react-motion-router/core";
|
|
2
|
+
import { createRef as _t, startTransition as $, useDebugValue as H, useEffect as j, useState as Lt, useRef as q, useCallback as dt } from "react";
|
|
3
|
+
import { GestureTimeline as Tt, springToLinear as Rt, easingToLinear as z } from "web-animations-extension";
|
|
4
|
+
import { jsx as ft } from "react/jsx-runtime";
|
|
5
|
+
var g = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, kt = {}, T = {};
|
|
6
|
+
Object.defineProperty(T, "__esModule", { value: !0 });
|
|
7
|
+
var ot;
|
|
8
8
|
(function(n) {
|
|
9
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
|
-
})(
|
|
11
|
-
class
|
|
10
|
+
})(ot || (ot = {}));
|
|
11
|
+
class It extends TouchEvent {
|
|
12
12
|
constructor(t, e) {
|
|
13
13
|
if (super(t, {
|
|
14
14
|
touches: Array.from(e.touches),
|
|
@@ -27,108 +27,108 @@ class kt extends TouchEvent {
|
|
|
27
27
|
this.gestureTarget = e.touches[0].target, this.x = e.touches[0].clientX, this.y = e.touches[0].clientY;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
var
|
|
30
|
+
T.default = It;
|
|
31
|
+
var Z = {}, xt = g && g.__importDefault || function(n) {
|
|
32
32
|
return n && n.__esModule ? n : { default: n };
|
|
33
33
|
};
|
|
34
|
-
Object.defineProperty(
|
|
35
|
-
const
|
|
36
|
-
class
|
|
34
|
+
Object.defineProperty(Z, "__esModule", { value: !0 });
|
|
35
|
+
const Ft = xt(T);
|
|
36
|
+
class Ot extends Ft.default {
|
|
37
37
|
constructor(t, e) {
|
|
38
38
|
super("longpress", t), this.duration = 0, this.duration = e;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
var
|
|
41
|
+
Z.default = Ot;
|
|
42
|
+
var J = {}, Dt = g && g.__importDefault || function(n) {
|
|
43
43
|
return n && n.__esModule ? n : { default: n };
|
|
44
44
|
};
|
|
45
|
-
Object.defineProperty(
|
|
46
|
-
const
|
|
47
|
-
class
|
|
45
|
+
Object.defineProperty(J, "__esModule", { value: !0 });
|
|
46
|
+
const Mt = Dt(T);
|
|
47
|
+
class Kt extends Mt.default {
|
|
48
48
|
constructor(t) {
|
|
49
49
|
super("tap", t), this.duration = 0;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
|
|
53
|
-
var
|
|
52
|
+
J.default = Kt;
|
|
53
|
+
var Q = {}, Bt = g && g.__importDefault || function(n) {
|
|
54
54
|
return n && n.__esModule ? n : { default: n };
|
|
55
55
|
};
|
|
56
|
-
Object.defineProperty(
|
|
57
|
-
const
|
|
58
|
-
class
|
|
56
|
+
Object.defineProperty(Q, "__esModule", { value: !0 });
|
|
57
|
+
const Yt = Bt(T);
|
|
58
|
+
class Ct extends Yt.default {
|
|
59
59
|
constructor(t) {
|
|
60
60
|
super("doubletap", t);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
var
|
|
63
|
+
Q.default = Ct;
|
|
64
|
+
var D = {}, Xt = g && g.__importDefault || function(n) {
|
|
65
65
|
return n && n.__esModule ? n : { default: n };
|
|
66
66
|
};
|
|
67
|
-
Object.defineProperty(
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
var
|
|
67
|
+
Object.defineProperty(D, "__esModule", { value: !0 });
|
|
68
|
+
D.SwipeEndEvent = D.SwipeStartEvent = void 0;
|
|
69
|
+
const Ut = Xt(T);
|
|
70
|
+
var ct;
|
|
71
71
|
(function(n) {
|
|
72
72
|
n[n.start = 0] = "start", n[n.end = 1] = "end";
|
|
73
|
-
})(
|
|
74
|
-
class
|
|
75
|
-
constructor(t, e,
|
|
76
|
-
let
|
|
77
|
-
switch (
|
|
73
|
+
})(ct || (ct = {}));
|
|
74
|
+
class tt extends Ut.default {
|
|
75
|
+
constructor(t, e, s) {
|
|
76
|
+
let r;
|
|
77
|
+
switch (s) {
|
|
78
78
|
case "start":
|
|
79
|
-
|
|
79
|
+
r = "swipestart";
|
|
80
80
|
break;
|
|
81
81
|
case "end":
|
|
82
|
-
|
|
82
|
+
r = "swipeend";
|
|
83
83
|
break;
|
|
84
84
|
default:
|
|
85
|
-
|
|
85
|
+
r = "swipe";
|
|
86
86
|
}
|
|
87
|
-
super(
|
|
87
|
+
super(r, t), this.velocity = e.velocity, this.direction = e.direction;
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
class
|
|
90
|
+
class Nt extends tt {
|
|
91
91
|
constructor(t, e) {
|
|
92
92
|
super(t, e);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
|
|
96
|
-
class jt extends
|
|
95
|
+
D.default = Nt;
|
|
96
|
+
class jt extends tt {
|
|
97
97
|
constructor(t, e) {
|
|
98
98
|
super(t, e, "start");
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
class
|
|
101
|
+
D.SwipeStartEvent = jt;
|
|
102
|
+
class Ht extends tt {
|
|
103
103
|
constructor(t, e) {
|
|
104
104
|
super(t, e, "end");
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
var
|
|
107
|
+
D.SwipeEndEvent = Ht;
|
|
108
|
+
var M = {}, At = g && g.__importDefault || function(n) {
|
|
109
109
|
return n && n.__esModule ? n : { default: n };
|
|
110
110
|
};
|
|
111
|
-
Object.defineProperty(
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
var
|
|
111
|
+
Object.defineProperty(M, "__esModule", { value: !0 });
|
|
112
|
+
M.PanEndEvent = M.PanStartEvent = void 0;
|
|
113
|
+
const Vt = At(T);
|
|
114
|
+
var ut;
|
|
115
115
|
(function(n) {
|
|
116
116
|
n[n.start = 0] = "start", n[n.end = 1] = "end";
|
|
117
|
-
})(
|
|
118
|
-
class
|
|
119
|
-
constructor(t, e,
|
|
120
|
-
let
|
|
121
|
-
switch (
|
|
117
|
+
})(ut || (ut = {}));
|
|
118
|
+
class et extends Vt.default {
|
|
119
|
+
constructor(t, e, s) {
|
|
120
|
+
let r;
|
|
121
|
+
switch (s) {
|
|
122
122
|
case "start":
|
|
123
|
-
|
|
123
|
+
r = "panstart";
|
|
124
124
|
break;
|
|
125
125
|
case "end":
|
|
126
|
-
|
|
126
|
+
r = "panend";
|
|
127
127
|
break;
|
|
128
128
|
default:
|
|
129
|
-
|
|
129
|
+
r = "pan";
|
|
130
130
|
}
|
|
131
|
-
super(
|
|
131
|
+
super(r, t), this.velocity = e.velocity, this.translation = {
|
|
132
132
|
x: e.translation.x,
|
|
133
133
|
y: e.translation.y,
|
|
134
134
|
magnitude: e.translation.magnitude,
|
|
@@ -138,95 +138,95 @@ class Z extends Nt.default {
|
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
class
|
|
141
|
+
class $t extends et {
|
|
142
142
|
constructor(t, e) {
|
|
143
143
|
super(t, e);
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
|
|
147
|
-
class
|
|
146
|
+
M.default = $t;
|
|
147
|
+
class Wt extends et {
|
|
148
148
|
constructor(t, e) {
|
|
149
149
|
super(t, e, "start");
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
|
|
153
|
-
class
|
|
152
|
+
M.PanStartEvent = Wt;
|
|
153
|
+
class Gt extends et {
|
|
154
154
|
constructor(t, e) {
|
|
155
155
|
super(t, e, "end");
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
|
|
159
|
-
var
|
|
158
|
+
M.PanEndEvent = Gt;
|
|
159
|
+
var K = {}, qt = g && g.__importDefault || function(n) {
|
|
160
160
|
return n && n.__esModule ? n : { default: n };
|
|
161
161
|
};
|
|
162
|
-
Object.defineProperty(
|
|
163
|
-
|
|
164
|
-
const
|
|
165
|
-
var
|
|
162
|
+
Object.defineProperty(K, "__esModule", { value: !0 });
|
|
163
|
+
K.PinchEndEvent = K.PinchStartEvent = void 0;
|
|
164
|
+
const zt = qt(T);
|
|
165
|
+
var lt;
|
|
166
166
|
(function(n) {
|
|
167
167
|
n[n.start = 0] = "start", n[n.end = 1] = "end";
|
|
168
|
-
})(
|
|
169
|
-
class
|
|
170
|
-
constructor(t, e,
|
|
171
|
-
let
|
|
172
|
-
switch (
|
|
168
|
+
})(lt || (lt = {}));
|
|
169
|
+
class nt extends zt.default {
|
|
170
|
+
constructor(t, e, s) {
|
|
171
|
+
let r;
|
|
172
|
+
switch (s) {
|
|
173
173
|
case "start":
|
|
174
|
-
|
|
174
|
+
r = "pinchstart";
|
|
175
175
|
break;
|
|
176
176
|
case "end":
|
|
177
|
-
|
|
177
|
+
r = "pinchend";
|
|
178
178
|
break;
|
|
179
179
|
default:
|
|
180
|
-
|
|
180
|
+
r = "pinch";
|
|
181
181
|
}
|
|
182
|
-
super(
|
|
182
|
+
super(r, t), Object.defineProperty(this, "scale", {
|
|
183
183
|
value: e.scale,
|
|
184
184
|
writable: !1
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
class
|
|
188
|
+
class Zt extends nt {
|
|
189
189
|
constructor(t, e) {
|
|
190
190
|
super(t, e);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
|
|
194
|
-
class
|
|
193
|
+
K.default = Zt;
|
|
194
|
+
class Jt extends nt {
|
|
195
195
|
constructor(t, e) {
|
|
196
196
|
super(t, e, "start");
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
|
|
200
|
-
class
|
|
199
|
+
K.PinchStartEvent = Jt;
|
|
200
|
+
class Qt extends nt {
|
|
201
201
|
constructor(t, e) {
|
|
202
202
|
super(t, e, "end");
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
|
|
206
|
-
var
|
|
205
|
+
K.PinchEndEvent = Qt;
|
|
206
|
+
var B = {}, te = g && g.__importDefault || function(n) {
|
|
207
207
|
return n && n.__esModule ? n : { default: n };
|
|
208
208
|
};
|
|
209
|
-
Object.defineProperty(
|
|
210
|
-
|
|
211
|
-
const
|
|
212
|
-
var
|
|
209
|
+
Object.defineProperty(B, "__esModule", { value: !0 });
|
|
210
|
+
B.RotateEndEvent = B.RotateStartEvent = void 0;
|
|
211
|
+
const ee = te(T);
|
|
212
|
+
var ht;
|
|
213
213
|
(function(n) {
|
|
214
214
|
n[n.start = 0] = "start", n[n.end = 1] = "end";
|
|
215
|
-
})(
|
|
216
|
-
class
|
|
217
|
-
constructor(t, e,
|
|
218
|
-
let
|
|
219
|
-
switch (
|
|
215
|
+
})(ht || (ht = {}));
|
|
216
|
+
class st extends ee.default {
|
|
217
|
+
constructor(t, e, s) {
|
|
218
|
+
let r;
|
|
219
|
+
switch (s) {
|
|
220
220
|
case "start":
|
|
221
|
-
|
|
221
|
+
r = "rotatestart";
|
|
222
222
|
break;
|
|
223
223
|
case "end":
|
|
224
|
-
|
|
224
|
+
r = "rotateend";
|
|
225
225
|
break;
|
|
226
226
|
default:
|
|
227
|
-
|
|
227
|
+
r = "rotate";
|
|
228
228
|
}
|
|
229
|
-
super(
|
|
229
|
+
super(r, t), this.anchor = {
|
|
230
230
|
x: e.anchor.x,
|
|
231
231
|
y: e.anchor.y,
|
|
232
232
|
clientX: e.anchor.clientX,
|
|
@@ -237,33 +237,33 @@ class Q extends Qt.default {
|
|
|
237
237
|
}), this.rotationDeg = e.rotationDeg;
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
class
|
|
240
|
+
class ne extends st {
|
|
241
241
|
constructor(t, e) {
|
|
242
242
|
super(t, e);
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
|
|
246
|
-
class
|
|
245
|
+
B.default = ne;
|
|
246
|
+
class se extends st {
|
|
247
247
|
constructor(t, e) {
|
|
248
248
|
super(t, e, "start");
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
-
|
|
252
|
-
class
|
|
251
|
+
B.RotateStartEvent = se;
|
|
252
|
+
class re extends st {
|
|
253
253
|
constructor(t, e) {
|
|
254
254
|
super(t, e, "end");
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
|
|
258
|
-
var
|
|
259
|
-
Object.defineProperty(
|
|
260
|
-
|
|
261
|
-
function
|
|
257
|
+
B.RotateEndEvent = re;
|
|
258
|
+
var I = {};
|
|
259
|
+
Object.defineProperty(I, "__esModule", { value: !0 });
|
|
260
|
+
I.closest = I.Vec2 = I.assert = void 0;
|
|
261
|
+
function ie(n, t) {
|
|
262
262
|
if (!n)
|
|
263
263
|
throw new Error(t);
|
|
264
264
|
}
|
|
265
|
-
|
|
266
|
-
class
|
|
265
|
+
I.assert = ie;
|
|
266
|
+
class ae {
|
|
267
267
|
constructor(t, e) {
|
|
268
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
|
}
|
|
@@ -307,73 +307,73 @@ class se {
|
|
|
307
307
|
return Math.sqrt(Math.pow(this._clientX, 2) + Math.pow(this._clientY, 2));
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
-
|
|
311
|
-
function
|
|
312
|
-
return t.reduce((e,
|
|
313
|
-
let
|
|
314
|
-
return
|
|
310
|
+
I.Vec2 = ae;
|
|
311
|
+
function oe(n, t) {
|
|
312
|
+
return t.reduce((e, s) => {
|
|
313
|
+
let r = Math.abs(e - n), i = Math.abs(s - n);
|
|
314
|
+
return r === i ? e > s ? e : s : i < r ? s : e;
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
|
-
|
|
317
|
+
I.closest = oe;
|
|
318
318
|
(function(n) {
|
|
319
|
-
var t = g && g.__createBinding || (Object.create ? function(
|
|
320
|
-
P === void 0 && (P =
|
|
321
|
-
return a[
|
|
319
|
+
var t = g && g.__createBinding || (Object.create ? function(l, a, f, P) {
|
|
320
|
+
P === void 0 && (P = f), Object.defineProperty(l, P, { enumerable: !0, get: function() {
|
|
321
|
+
return a[f];
|
|
322
322
|
} });
|
|
323
|
-
} : function(
|
|
324
|
-
P === void 0 && (P =
|
|
325
|
-
}), e = g && g.__setModuleDefault || (Object.create ? function(
|
|
326
|
-
Object.defineProperty(
|
|
327
|
-
} : function(
|
|
328
|
-
|
|
329
|
-
}),
|
|
330
|
-
if (
|
|
331
|
-
return
|
|
323
|
+
} : function(l, a, f, P) {
|
|
324
|
+
P === void 0 && (P = f), l[P] = a[f];
|
|
325
|
+
}), e = g && g.__setModuleDefault || (Object.create ? function(l, a) {
|
|
326
|
+
Object.defineProperty(l, "default", { enumerable: !0, value: a });
|
|
327
|
+
} : function(l, a) {
|
|
328
|
+
l.default = a;
|
|
329
|
+
}), s = g && g.__importStar || function(l) {
|
|
330
|
+
if (l && l.__esModule)
|
|
331
|
+
return l;
|
|
332
332
|
var a = {};
|
|
333
|
-
if (
|
|
334
|
-
for (var
|
|
335
|
-
|
|
336
|
-
return e(a,
|
|
337
|
-
},
|
|
338
|
-
return
|
|
333
|
+
if (l != null)
|
|
334
|
+
for (var f in l)
|
|
335
|
+
f !== "default" && Object.prototype.hasOwnProperty.call(l, f) && t(a, l, f);
|
|
336
|
+
return e(a, l), a;
|
|
337
|
+
}, r = g && g.__importDefault || function(l) {
|
|
338
|
+
return l && l.__esModule ? l : { default: l };
|
|
339
339
|
};
|
|
340
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 =
|
|
341
|
+
const i = r(T);
|
|
342
342
|
n.GestureEvent = i.default;
|
|
343
|
-
const o =
|
|
343
|
+
const o = r(Z);
|
|
344
344
|
n.LongPressEvent = o.default;
|
|
345
|
-
const c =
|
|
345
|
+
const c = r(J);
|
|
346
346
|
n.TapEvent = c.default;
|
|
347
|
-
const
|
|
348
|
-
n.DoubleTapEvent =
|
|
349
|
-
const
|
|
350
|
-
n.SwipeEvent =
|
|
351
|
-
return
|
|
347
|
+
const u = r(Q);
|
|
348
|
+
n.DoubleTapEvent = u.default;
|
|
349
|
+
const h = s(D);
|
|
350
|
+
n.SwipeEvent = h.default, Object.defineProperty(n, "SwipeEndEvent", { enumerable: !0, get: function() {
|
|
351
|
+
return h.SwipeEndEvent;
|
|
352
352
|
} }), Object.defineProperty(n, "SwipeStartEvent", { enumerable: !0, get: function() {
|
|
353
|
-
return
|
|
353
|
+
return h.SwipeStartEvent;
|
|
354
354
|
} });
|
|
355
|
-
const d =
|
|
355
|
+
const d = s(M);
|
|
356
356
|
n.PanEvent = d.default, Object.defineProperty(n, "PanEndEvent", { enumerable: !0, get: function() {
|
|
357
357
|
return d.PanEndEvent;
|
|
358
358
|
} }), Object.defineProperty(n, "PanStartEvent", { enumerable: !0, get: function() {
|
|
359
359
|
return d.PanStartEvent;
|
|
360
360
|
} });
|
|
361
|
-
const w =
|
|
361
|
+
const w = s(K);
|
|
362
362
|
n.PinchEvent = w.default, Object.defineProperty(n, "PinchEndEvent", { enumerable: !0, get: function() {
|
|
363
363
|
return w.PinchEndEvent;
|
|
364
364
|
} }), Object.defineProperty(n, "PinchStartEvent", { enumerable: !0, get: function() {
|
|
365
365
|
return w.PinchStartEvent;
|
|
366
366
|
} });
|
|
367
|
-
const E =
|
|
367
|
+
const E = s(B);
|
|
368
368
|
n.RotateEvent = E.default, Object.defineProperty(n, "RotateEndEvent", { enumerable: !0, get: function() {
|
|
369
369
|
return E.RotateEndEvent;
|
|
370
370
|
} }), Object.defineProperty(n, "RotateStartEvent", { enumerable: !0, get: function() {
|
|
371
371
|
return E.RotateStartEvent;
|
|
372
372
|
} });
|
|
373
|
-
const v =
|
|
373
|
+
const v = I;
|
|
374
374
|
var p;
|
|
375
|
-
(function(
|
|
376
|
-
|
|
375
|
+
(function(l) {
|
|
376
|
+
l[l.right = 0] = "right", l[l.up = 1] = "up", l[l.left = 2] = "left", l[l.down = 3] = "down";
|
|
377
377
|
})(p || (p = {}));
|
|
378
378
|
class m {
|
|
379
379
|
constructor() {
|
|
@@ -396,34 +396,34 @@ k.closest = ie;
|
|
|
396
396
|
onPointerLeave(a) {
|
|
397
397
|
if (!a.touches.length) {
|
|
398
398
|
if (this.isSwiping) {
|
|
399
|
-
const
|
|
399
|
+
const f = new h.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(
|
|
403
|
+
this.dispatchEvent(f), this.isSwiping = !1;
|
|
404
404
|
}
|
|
405
405
|
if (this.isPanning) {
|
|
406
|
-
const
|
|
406
|
+
const f = new d.PanEndEvent(a, {
|
|
407
407
|
translation: this.dxDy,
|
|
408
408
|
velocity: this.velocity
|
|
409
409
|
});
|
|
410
|
-
this.dispatchEvent(
|
|
410
|
+
this.dispatchEvent(f), this.isPanning = !1;
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
if (a.touches.length === 1) {
|
|
414
414
|
if (this.scaleBase = 0, this.isPinching) {
|
|
415
|
-
const
|
|
415
|
+
const f = new w.PinchEndEvent(a, {
|
|
416
416
|
scale: this.scale
|
|
417
417
|
});
|
|
418
|
-
this.dispatchEvent(
|
|
418
|
+
this.dispatchEvent(f), this.isPinching = !1;
|
|
419
419
|
}
|
|
420
420
|
if (this.isRotating) {
|
|
421
|
-
const
|
|
421
|
+
const f = new E.RotateEndEvent(a, {
|
|
422
422
|
rotation: this.rotation,
|
|
423
423
|
rotationDeg: this.rotationDeg,
|
|
424
424
|
anchor: this.anchor
|
|
425
425
|
});
|
|
426
|
-
this.dispatchEvent(
|
|
426
|
+
this.dispatchEvent(f), this.isRotating = !1;
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
429
|
}
|
|
@@ -434,8 +434,8 @@ k.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
|
|
438
|
-
if (this.touchStart.touches.length <
|
|
437
|
+
const f = parseInt(a.touches[0].target.dataset.minpointers || "0") || this.config.minPointers;
|
|
438
|
+
if (this.touchStart.touches.length < f) {
|
|
439
439
|
this.shouldFire = !1;
|
|
440
440
|
return;
|
|
441
441
|
}
|
|
@@ -456,81 +456,81 @@ k.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 _ = new v.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY),
|
|
460
|
-
if (this.scaleBase && Math.abs(this.scaleBase -
|
|
461
|
-
const
|
|
462
|
-
if (this.scale =
|
|
463
|
-
const
|
|
464
|
-
scale:
|
|
459
|
+
const _ = new v.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY), A = new v.Vec2(this.touchMove.touches[1].clientX, this.touchMove.touches[1].clientY), it = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), at = _.substract(A);
|
|
460
|
+
if (this.scaleBase && Math.abs(this.scaleBase - at.magnitude) > 10) {
|
|
461
|
+
const F = at.magnitude / this.scaleBase;
|
|
462
|
+
if (this.scale = F, this.isPinching) {
|
|
463
|
+
const V = new w.default(a, {
|
|
464
|
+
scale: F
|
|
465
465
|
});
|
|
466
|
-
this.dispatchEvent(
|
|
466
|
+
this.dispatchEvent(V);
|
|
467
467
|
} else {
|
|
468
|
-
const
|
|
469
|
-
scale:
|
|
468
|
+
const V = new w.PinchStartEvent(a, {
|
|
469
|
+
scale: F
|
|
470
470
|
});
|
|
471
|
-
this.dispatchEvent(
|
|
471
|
+
this.dispatchEvent(V), this.isPinching = !0;
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
this.anchor = _;
|
|
475
|
-
let
|
|
476
|
-
if (
|
|
477
|
-
const
|
|
475
|
+
let C = Math.atan2(it.clientY - A.clientY, it.clientX - A.clientX);
|
|
476
|
+
if (C < 0 ? C += 1.5708 : C -= 1.5708, this.rotation = C, this.rotationDeg = C * 180 / Math.PI, this.anchor = this.anchor, this.isRotating) {
|
|
477
|
+
const F = new E.default(a, {
|
|
478
478
|
anchor: this.anchor,
|
|
479
479
|
rotation: this.rotation,
|
|
480
480
|
rotationDeg: this.rotationDeg
|
|
481
481
|
});
|
|
482
|
-
this.dispatchEvent(
|
|
482
|
+
this.dispatchEvent(F);
|
|
483
483
|
} else {
|
|
484
|
-
const
|
|
484
|
+
const F = new E.RotateStartEvent(a, {
|
|
485
485
|
anchor: this.anchor,
|
|
486
486
|
rotation: this.rotation,
|
|
487
487
|
rotationDeg: this.rotationDeg
|
|
488
488
|
});
|
|
489
|
-
this.dispatchEvent(
|
|
489
|
+
this.dispatchEvent(F), this.isRotating = !0;
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
|
-
const
|
|
492
|
+
const f = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), y = new v.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY).substract(f), b = y.magnitude, x = {
|
|
493
493
|
x: y.x / b,
|
|
494
494
|
y: y.y / b
|
|
495
|
-
}, S = Math.atan2(
|
|
495
|
+
}, S = Math.atan2(x.y, x.x);
|
|
496
496
|
this.octant = Math.round(4 * S / (2 * Math.PI) + 4) % 4;
|
|
497
|
-
const
|
|
497
|
+
const N = (a.timeStamp - this.touchStart.timeStamp) / 1e3, Y = y.magnitude / N;
|
|
498
498
|
if (this.isSwiping) {
|
|
499
|
-
const _ = new
|
|
499
|
+
const _ = new h.default(a, {
|
|
500
500
|
direction: p[(0, v.closest)(this.octant, [0, 1, 2, 3])],
|
|
501
|
-
velocity:
|
|
501
|
+
velocity: Y
|
|
502
502
|
});
|
|
503
503
|
this.dispatchEvent(_);
|
|
504
504
|
} else {
|
|
505
|
-
const _ = new
|
|
505
|
+
const _ = new h.SwipeStartEvent(a, {
|
|
506
506
|
direction: p[(0, v.closest)(this.octant, [0, 1, 2, 3])],
|
|
507
|
-
velocity:
|
|
507
|
+
velocity: Y
|
|
508
508
|
});
|
|
509
509
|
this.dispatchEvent(_), this.isSwiping = !0;
|
|
510
510
|
}
|
|
511
|
-
if (this.dxDy = y, this.velocity =
|
|
511
|
+
if (this.dxDy = y, this.velocity = Y, this.isPanning) {
|
|
512
512
|
const _ = new d.default(a, {
|
|
513
513
|
translation: y,
|
|
514
|
-
velocity:
|
|
514
|
+
velocity: Y
|
|
515
515
|
});
|
|
516
516
|
this.dispatchEvent(_);
|
|
517
517
|
} else {
|
|
518
518
|
const _ = new d.PanStartEvent(a, {
|
|
519
519
|
translation: y,
|
|
520
|
-
velocity:
|
|
520
|
+
velocity: Y
|
|
521
521
|
});
|
|
522
522
|
this.dispatchEvent(_), this.isPanning = !0;
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
onTouchEnd(a) {
|
|
526
|
-
const
|
|
527
|
-
if (this.taps++, this.shouldFire = this.taps >
|
|
526
|
+
const f = parseInt(this.currentTarget.dataset.numberoftaps || "0") || this.config.numberOfTaps;
|
|
527
|
+
if (this.taps++, this.shouldFire = this.taps > f, this.shouldFire) {
|
|
528
528
|
this.touchEnd = a, this.touchEndTime = a.timeStamp;
|
|
529
529
|
const P = parseFloat(this.currentTarget.dataset.tapdelay || "0") || this.config.tapDelay;
|
|
530
530
|
if (!this.touchMoved && !this.isLongPress)
|
|
531
531
|
if (this.taps === 1 || this.touchEndTime - this.lastTouchTime < P) {
|
|
532
|
-
if (this.taps % 2 ===
|
|
533
|
-
const b = new
|
|
532
|
+
if (this.taps % 2 === f) {
|
|
533
|
+
const b = new u.default(a);
|
|
534
534
|
this.dispatchEvent(b), this.taps = 0;
|
|
535
535
|
}
|
|
536
536
|
const y = new c.default(a);
|
|
@@ -545,8 +545,8 @@ k.closest = ie;
|
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
n.default = m, m.listening = !1, TouchEvent && (window.gestureProvider = new m());
|
|
548
|
-
})(
|
|
549
|
-
class
|
|
548
|
+
})(kt);
|
|
549
|
+
class ce extends Event {
|
|
550
550
|
routerId;
|
|
551
551
|
route;
|
|
552
552
|
props;
|
|
@@ -554,51 +554,51 @@ class ae extends Event {
|
|
|
554
554
|
signal;
|
|
555
555
|
committed;
|
|
556
556
|
transition;
|
|
557
|
-
constructor(t, e,
|
|
558
|
-
super("navigate"), this.routerId = t, this.route = e, this.props =
|
|
557
|
+
constructor(t, e, s, r, i, o, c) {
|
|
558
|
+
super("navigate"), this.routerId = t, this.route = e, this.props = s, this.navigationType = r ?? "push", this.signal = i, this.committed = o, this.transition = c;
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
|
-
class
|
|
561
|
+
class ue extends Event {
|
|
562
562
|
routerId;
|
|
563
563
|
signal;
|
|
564
564
|
committed;
|
|
565
565
|
transition;
|
|
566
|
-
constructor(t, e,
|
|
567
|
-
super("back"), this.routerId = t, this.signal = e, this.committed =
|
|
566
|
+
constructor(t, e, s, r) {
|
|
567
|
+
super("back"), this.routerId = t, this.signal = e, this.committed = s, this.transition = r;
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
class
|
|
570
|
+
class le extends Event {
|
|
571
571
|
routerId;
|
|
572
572
|
signal;
|
|
573
573
|
committed;
|
|
574
574
|
transition;
|
|
575
|
-
constructor(t, e,
|
|
576
|
-
super("forward"), this.routerId = t, this.signal = e, this.committed =
|
|
575
|
+
constructor(t, e, s, r) {
|
|
576
|
+
super("forward"), this.routerId = t, this.signal = e, this.committed = s, this.transition = r;
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
|
-
class
|
|
579
|
+
class he extends Event {
|
|
580
580
|
source;
|
|
581
581
|
constructor(t) {
|
|
582
582
|
super("gesture-start"), this.source = t;
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
|
-
class
|
|
585
|
+
class de extends Event {
|
|
586
586
|
source;
|
|
587
587
|
constructor(t) {
|
|
588
588
|
super("gesture-end"), this.source = t;
|
|
589
589
|
}
|
|
590
590
|
}
|
|
591
|
-
class
|
|
591
|
+
class fe extends Event {
|
|
592
592
|
constructor() {
|
|
593
593
|
super("gesture-cancel");
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
class
|
|
596
|
+
class ve {
|
|
597
597
|
routerId;
|
|
598
598
|
#t;
|
|
599
599
|
index;
|
|
600
|
-
constructor(t, e,
|
|
601
|
-
this.#t = t, this.routerId = e, this.index =
|
|
600
|
+
constructor(t, e, s) {
|
|
601
|
+
this.#t = t, this.routerId = e, this.index = s;
|
|
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, e,
|
|
625
|
-
return this.#t.addEventListener(t, e,
|
|
624
|
+
addEventListener(t, e, s) {
|
|
625
|
+
return this.#t.addEventListener(t, e, s), () => this.#t.removeEventListener(t, e, s);
|
|
626
626
|
}
|
|
627
|
-
removeEventListener(t, e,
|
|
628
|
-
this.#t.addEventListener(t, e,
|
|
627
|
+
removeEventListener(t, e, s) {
|
|
628
|
+
this.#t.addEventListener(t, e, s);
|
|
629
629
|
}
|
|
630
630
|
dispatchEvent(t) {
|
|
631
631
|
return this.#t.dispatchEvent(t);
|
|
@@ -634,183 +634,398 @@ class de {
|
|
|
634
634
|
return this.#t.getState();
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
-
class
|
|
638
|
-
|
|
637
|
+
class ge extends gt {
|
|
638
|
+
config;
|
|
639
639
|
constructor(t) {
|
|
640
|
-
super(), this.
|
|
640
|
+
super(t), this.config = t;
|
|
641
641
|
}
|
|
642
|
-
preload(t, e = {},
|
|
643
|
-
const { pathname:
|
|
644
|
-
return this.
|
|
642
|
+
preload(t, e = {}, s = {}) {
|
|
643
|
+
const { pathname: r } = new URL(t, this.baseURL);
|
|
644
|
+
return this.config.preload(r, e, s);
|
|
645
645
|
}
|
|
646
|
-
replace(t, e = {},
|
|
647
|
-
return this.navigate(t, e, { ...
|
|
646
|
+
replace(t, e = {}, s = {}) {
|
|
647
|
+
return this.navigate(t, e, { ...s, type: "replace" });
|
|
648
648
|
}
|
|
649
|
-
push(t, e = {},
|
|
650
|
-
return this.navigate(t, e, { ...
|
|
649
|
+
push(t, e = {}, s = {}) {
|
|
650
|
+
return this.navigate(t, e, { ...s, type: "push" });
|
|
651
651
|
}
|
|
652
652
|
reload(t = {}) {
|
|
653
653
|
return window.navigation.reload({ state: t });
|
|
654
654
|
}
|
|
655
655
|
traverseTo(t, e = {}) {
|
|
656
|
-
const
|
|
657
|
-
c.signal.addEventListener(
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
656
|
+
const s = window.navigation.traverseTo(t), r = window.navigation.transition, i = r.from.index, o = window.navigation.entries().findIndex((h) => h.key === t), c = new AbortController();
|
|
657
|
+
c.signal.addEventListener(
|
|
658
|
+
"abort",
|
|
659
|
+
() => this.traverseTo(r.from.key),
|
|
660
|
+
{ once: !0 }
|
|
661
|
+
), e.signal?.addEventListener("abort", c.abort, { once: !0 });
|
|
662
|
+
let u;
|
|
663
|
+
return i > o ? u = this.createBackEvent(
|
|
664
|
+
c.signal,
|
|
665
|
+
s.committed,
|
|
666
|
+
r
|
|
667
|
+
) : u = this.createForwardEvent(
|
|
668
|
+
c.signal,
|
|
669
|
+
s.committed,
|
|
670
|
+
r
|
|
671
|
+
), this.dispatchEvent?.(u), s;
|
|
672
|
+
}
|
|
673
|
+
navigate(t, e = {}, s = {}) {
|
|
674
|
+
const { type: r = "push" } = s, i = new URL(t, this.baseURL), o = window.navigation.navigate(i.href, { history: r, state: e }), c = window.navigation.transition, u = new AbortController();
|
|
675
|
+
u.signal.addEventListener("abort", () => this.goBack(), { once: !0 }), s.signal?.addEventListener("abort", u.abort, { once: !0 });
|
|
676
|
+
const h = this.createNavigateEvent(
|
|
677
|
+
t,
|
|
678
|
+
e,
|
|
679
|
+
r,
|
|
680
|
+
u.signal,
|
|
681
|
+
o.committed,
|
|
682
|
+
c
|
|
683
|
+
);
|
|
684
|
+
return this.dispatchEvent?.(h), o;
|
|
666
685
|
}
|
|
667
686
|
goBack(t = {}) {
|
|
668
687
|
if (!this.canGoBack())
|
|
669
688
|
return;
|
|
670
|
-
const e = window.navigation.traverseTo(this.previous.key),
|
|
671
|
-
|
|
672
|
-
const i = this.createBackEvent(
|
|
689
|
+
const e = window.navigation.traverseTo(this.previous.key), s = window.navigation.transition, r = new AbortController();
|
|
690
|
+
r.signal.addEventListener("abort", () => this.goForward(), { once: !0 }), t.signal?.addEventListener("abort", r.abort, { once: !0 });
|
|
691
|
+
const i = this.createBackEvent(
|
|
692
|
+
r.signal,
|
|
693
|
+
e.committed,
|
|
694
|
+
s
|
|
695
|
+
);
|
|
673
696
|
return this.dispatchEvent?.(i), e;
|
|
674
697
|
}
|
|
675
698
|
goForward(t = {}) {
|
|
676
699
|
if (!this.canGoForward())
|
|
677
700
|
return;
|
|
678
|
-
const e = window.navigation.traverseTo(this.next.key),
|
|
679
|
-
|
|
680
|
-
const i = this.createForwardEvent(
|
|
701
|
+
const e = window.navigation.traverseTo(this.next.key), s = window.navigation.transition, r = new AbortController();
|
|
702
|
+
r.signal.addEventListener("abort", () => this.goBack(), { once: !0 }), t.signal?.addEventListener("abort", r.abort, { once: !0 });
|
|
703
|
+
const i = this.createForwardEvent(
|
|
704
|
+
r.signal,
|
|
705
|
+
e.committed,
|
|
706
|
+
s
|
|
707
|
+
);
|
|
681
708
|
return this.dispatchEvent?.(i), e;
|
|
682
709
|
}
|
|
683
|
-
createBackEvent(t, e,
|
|
710
|
+
createBackEvent(t, e, s) {
|
|
684
711
|
if (!this.routerId)
|
|
685
712
|
throw new Error("Router ID is not set");
|
|
686
|
-
return new
|
|
713
|
+
return new ue(this.routerId, t, e, s);
|
|
687
714
|
}
|
|
688
|
-
createForwardEvent(t, e,
|
|
715
|
+
createForwardEvent(t, e, s) {
|
|
689
716
|
if (!this.routerId)
|
|
690
717
|
throw new Error("Router ID is not set");
|
|
691
|
-
return new
|
|
718
|
+
return new le(this.routerId, t, e, s);
|
|
692
719
|
}
|
|
693
|
-
createNavigateEvent(t, e,
|
|
720
|
+
createNavigateEvent(t, e, s, r, i, o) {
|
|
694
721
|
if (!this.routerId)
|
|
695
722
|
throw new Error("Router ID is not set");
|
|
696
|
-
return new
|
|
723
|
+
return new ce(
|
|
697
724
|
this.routerId,
|
|
698
725
|
t,
|
|
699
726
|
e,
|
|
700
|
-
r,
|
|
701
727
|
s,
|
|
728
|
+
r,
|
|
702
729
|
i,
|
|
703
730
|
o
|
|
704
731
|
);
|
|
705
732
|
}
|
|
706
733
|
get committed() {
|
|
707
|
-
return this.
|
|
734
|
+
return this.config.getCommitted();
|
|
708
735
|
}
|
|
709
736
|
get transition() {
|
|
710
|
-
return this.
|
|
737
|
+
return this.config.getTransition();
|
|
711
738
|
}
|
|
712
739
|
get globalEntries() {
|
|
713
740
|
return window.navigation.entries();
|
|
714
741
|
}
|
|
742
|
+
/**
|
|
743
|
+
* Returns the list of history entries **owned by this router**, derived from the
|
|
744
|
+
* browser’s global navigation history.
|
|
745
|
+
*
|
|
746
|
+
* ---
|
|
747
|
+
*
|
|
748
|
+
* ### Mental model
|
|
749
|
+
*
|
|
750
|
+
* The Web Navigation API exposes a **single, flat history list**.
|
|
751
|
+
* This router projects a **scoped, ordered view** of that list ensuring the
|
|
752
|
+
* router can only see entries it created.
|
|
753
|
+
*
|
|
754
|
+
* Each global entry is classified as one of:
|
|
755
|
+
*
|
|
756
|
+
* - **Owned by this router**
|
|
757
|
+
* - **Owned by a nested router**
|
|
758
|
+
* - **Owned by a different (foreign) router**
|
|
759
|
+
*
|
|
760
|
+
* The resulting entry list is built by iterating global history **from the
|
|
761
|
+
* beginning**, applying ownership rules, and stopping when ownership is lost.
|
|
762
|
+
*
|
|
763
|
+
* ---
|
|
764
|
+
*
|
|
765
|
+
* ### Ownership & contiguity rules
|
|
766
|
+
*
|
|
767
|
+
* 1. **Entries owned by this router**
|
|
768
|
+
* - Are included
|
|
769
|
+
* - Preserve global ordering
|
|
770
|
+
*
|
|
771
|
+
* 2. **Entries owned by nested routers**
|
|
772
|
+
* - Exactly **one entry is included** (the nested router’s mount point),
|
|
773
|
+
* because it must be rendered by the parent router
|
|
774
|
+
* - All subsequent entries belonging to that same nested scope are excluded
|
|
775
|
+
*
|
|
776
|
+
* 3. **Entries owned by a foreign router**
|
|
777
|
+
* - Are excluded
|
|
778
|
+
* - **Terminate entry collection** once at least one entry has been matched
|
|
779
|
+
*
|
|
780
|
+
* This means contiguity is enforced **only across routers that cannot be
|
|
781
|
+
* matched by this router at all**.
|
|
782
|
+
*
|
|
783
|
+
* ---
|
|
784
|
+
*
|
|
785
|
+
* ### Important invariants
|
|
786
|
+
*
|
|
787
|
+
* - Returned entries are always in **global history order**
|
|
788
|
+
* - Local indices are **stable and monotonic**
|
|
789
|
+
* - Nested router entries never leak into the parent router
|
|
790
|
+
* - Entry collection stops once navigation leaves this router’s ownership
|
|
791
|
+
* after it has begun
|
|
792
|
+
*
|
|
793
|
+
* ---
|
|
794
|
+
*
|
|
795
|
+
* ### Example
|
|
796
|
+
*
|
|
797
|
+
* Global history:
|
|
798
|
+
* ```
|
|
799
|
+
* 0: / (parent)
|
|
800
|
+
* 1: /world (parent)
|
|
801
|
+
* 2: /world/1 (nested mount point)
|
|
802
|
+
* 3: /world/2 (nested)
|
|
803
|
+
* 4: /about (parent)
|
|
804
|
+
* 5: /other-router/page (foreign)
|
|
805
|
+
* 6: / (parent)
|
|
806
|
+
* ```
|
|
807
|
+
*
|
|
808
|
+
* Parent router entries:
|
|
809
|
+
* ```
|
|
810
|
+
* /, /world, /world/1, /about
|
|
811
|
+
* ```
|
|
812
|
+
*
|
|
813
|
+
* Collection stops at index 5 because ownership is transferred to a
|
|
814
|
+
* foreign router.
|
|
815
|
+
*
|
|
816
|
+
*
|
|
817
|
+
* This approach balances correctness, simplicity, and predictable behavior
|
|
818
|
+
* without requiring global history rewriting or fragile index arithmetic.
|
|
819
|
+
*/
|
|
715
820
|
get entries() {
|
|
716
|
-
const t = this.
|
|
717
|
-
let e = null, r = !1;
|
|
718
|
-
return this.globalEntries.filter((
|
|
719
|
-
if (!
|
|
720
|
-
return !1;
|
|
721
|
-
const i = new URL(s.url), o = dt(this.baseURLPattern.pathname, i.pathname);
|
|
722
|
-
if (!o)
|
|
821
|
+
const t = this.config.getPathPatterns().filter(({ pattern: i }) => i.endsWith("**"));
|
|
822
|
+
let e = null, s = k, r = !1;
|
|
823
|
+
return this.globalEntries.filter((i, o) => {
|
|
824
|
+
if (!i.url || r)
|
|
723
825
|
return !1;
|
|
826
|
+
const c = new URL(i.url), u = pt(
|
|
827
|
+
this.baseURLPattern.pathname,
|
|
828
|
+
c.pathname
|
|
829
|
+
);
|
|
830
|
+
if (!u)
|
|
831
|
+
return s !== k && (r = !0), !1;
|
|
724
832
|
if (e) {
|
|
725
|
-
const
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
833
|
+
const h = new URLPattern(
|
|
834
|
+
e.pattern,
|
|
835
|
+
u.href
|
|
836
|
+
);
|
|
837
|
+
if (X(
|
|
838
|
+
c.pathname,
|
|
729
839
|
c.pathname,
|
|
840
|
+
h.pathname,
|
|
730
841
|
e.caseSensitive
|
|
731
|
-
)
|
|
732
|
-
return
|
|
842
|
+
))
|
|
843
|
+
return !1;
|
|
733
844
|
}
|
|
734
845
|
return e = t.find(
|
|
735
|
-
({ pattern:
|
|
736
|
-
|
|
737
|
-
|
|
846
|
+
({ pattern: h, caseSensitive: d }) => X(
|
|
847
|
+
h,
|
|
848
|
+
c.pathname,
|
|
738
849
|
this.baseURLPattern.pathname,
|
|
739
|
-
|
|
850
|
+
d
|
|
740
851
|
)
|
|
741
|
-
) ?? null, !0;
|
|
742
|
-
}).map((
|
|
743
|
-
}
|
|
852
|
+
) ?? null, s = o, !0;
|
|
853
|
+
}).map((i, o) => new ve(i, this.routerId, o));
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* Returns the **local history index** for this router, derived from the
|
|
857
|
+
* browser’s global navigation state.
|
|
858
|
+
*
|
|
859
|
+
* ---
|
|
860
|
+
*
|
|
861
|
+
* ### Problem this solves
|
|
862
|
+
*
|
|
863
|
+
* The Web Navigation API exposes a **single, flat history list**.
|
|
864
|
+
* This router exposes a **scoped history view** that:
|
|
865
|
+
*
|
|
866
|
+
* - filters out entries owned by nested routers
|
|
867
|
+
* - preserves global ordering
|
|
868
|
+
* - reindexes entries locally
|
|
869
|
+
*
|
|
870
|
+
* As a result, there is **no arithmetic relationship** between:
|
|
871
|
+
*
|
|
872
|
+
* - `window.navigation.currentEntry.index` (global)
|
|
873
|
+
* - this router’s local `index`
|
|
874
|
+
*
|
|
875
|
+
* This getter computes the local index **by identity**, not position.
|
|
876
|
+
*
|
|
877
|
+
* ---
|
|
878
|
+
*
|
|
879
|
+
* ### High-level behavior
|
|
880
|
+
*
|
|
881
|
+
* The returned index is:
|
|
882
|
+
*
|
|
883
|
+
* > the index of the **most recent local entry** that appears in the
|
|
884
|
+
* > browser’s global history **at or before** the current global entry.
|
|
885
|
+
*
|
|
886
|
+
* ---
|
|
887
|
+
*
|
|
888
|
+
* ### Resolution strategy
|
|
889
|
+
*
|
|
890
|
+
* 1. If the current global index is **before** this router’s first entry,
|
|
891
|
+
* the index resolves to `0`.
|
|
892
|
+
*
|
|
893
|
+
* 2. If the current global index is **after** this router’s last entry,
|
|
894
|
+
* the index resolves to `entries.length - 1`.
|
|
895
|
+
*
|
|
896
|
+
* 3. Otherwise:
|
|
897
|
+
* - A window of global history is sliced from the first local entry
|
|
898
|
+
* up to and including the current global entry.
|
|
899
|
+
* - Local entries are scanned **from newest to oldest**.
|
|
900
|
+
* - The first local entry whose `key` appears in that global slice
|
|
901
|
+
* determines the local index.
|
|
902
|
+
*
|
|
903
|
+
* Entry identity is determined by **history entry keys**, not URLs or
|
|
904
|
+
* global indices.
|
|
905
|
+
*
|
|
906
|
+
* ---
|
|
907
|
+
*
|
|
908
|
+
* ### Why key-based matching is required
|
|
909
|
+
*
|
|
910
|
+
* - Global indices are sparse once nested routers are involved
|
|
911
|
+
* - URLs may repeat or be replaced
|
|
912
|
+
* - History entries can be inserted between parent entries
|
|
913
|
+
*
|
|
914
|
+
* Keys provide the only stable identity that survives these cases.
|
|
915
|
+
*
|
|
916
|
+
* ---
|
|
917
|
+
*
|
|
918
|
+
* ### Invariant
|
|
919
|
+
*
|
|
920
|
+
* The returned index always satisfies:
|
|
921
|
+
*
|
|
922
|
+
* ```
|
|
923
|
+
* 0 ≤ index < entries.length
|
|
924
|
+
* ```
|
|
925
|
+
*
|
|
926
|
+
* and monotonically tracks navigation through global history.
|
|
927
|
+
*
|
|
928
|
+
* ---
|
|
929
|
+
*
|
|
930
|
+
* ### Example
|
|
931
|
+
*
|
|
932
|
+
* Global history:
|
|
933
|
+
* ```
|
|
934
|
+
* 0: /
|
|
935
|
+
* 1: /world
|
|
936
|
+
* 2: /world/1 (nested)
|
|
937
|
+
* 3: /about ← current
|
|
938
|
+
* ```
|
|
939
|
+
*
|
|
940
|
+
* Local router entries:
|
|
941
|
+
* ```
|
|
942
|
+
* / (index 0)
|
|
943
|
+
* /world (index 1)
|
|
944
|
+
* /about (index 2)
|
|
945
|
+
* ```
|
|
946
|
+
*
|
|
947
|
+
* Result:
|
|
948
|
+
* ```
|
|
949
|
+
* index === 2
|
|
950
|
+
* ```
|
|
951
|
+
*/
|
|
744
952
|
get index() {
|
|
745
|
-
const t = window.navigation.currentEntry?.index ??
|
|
953
|
+
const t = window.navigation.currentEntry?.index ?? k, e = this.entries.at(U)?.globalIndex ?? k, s = this.entries.at(k)?.globalIndex ?? k;
|
|
746
954
|
if (t <= e)
|
|
747
|
-
return
|
|
748
|
-
if (t >=
|
|
749
|
-
return this.entries.length -
|
|
955
|
+
return U;
|
|
956
|
+
if (t >= s)
|
|
957
|
+
return this.entries.length - R;
|
|
750
958
|
{
|
|
751
|
-
const
|
|
752
|
-
|
|
959
|
+
const r = this.globalEntries.slice(
|
|
960
|
+
e,
|
|
961
|
+
t + R
|
|
962
|
+
);
|
|
963
|
+
return this.entries.findLastIndex((i) => r.findLastIndex(
|
|
964
|
+
(o) => i.key === o.key
|
|
965
|
+
) > k);
|
|
753
966
|
}
|
|
754
967
|
}
|
|
755
968
|
get previous() {
|
|
756
|
-
return this.entries[this.index -
|
|
969
|
+
return this.entries[this.index - R] ?? null;
|
|
757
970
|
}
|
|
758
971
|
get next() {
|
|
759
|
-
return this.entries[this.index +
|
|
972
|
+
return this.entries[this.index + R] ?? null;
|
|
760
973
|
}
|
|
761
974
|
get current() {
|
|
762
975
|
return this.entries[this.index];
|
|
763
976
|
}
|
|
764
977
|
canGoBack() {
|
|
765
|
-
return
|
|
978
|
+
return this.previous?.url?.origin === globalThis.location.origin;
|
|
766
979
|
}
|
|
767
980
|
canGoForward() {
|
|
768
|
-
return
|
|
981
|
+
return this.next?.url?.origin === globalThis.location.origin;
|
|
769
982
|
}
|
|
770
983
|
}
|
|
771
|
-
function
|
|
984
|
+
function pe(n) {
|
|
772
985
|
return Object.fromEntries(n.entries());
|
|
773
986
|
}
|
|
774
|
-
function
|
|
987
|
+
function me(n) {
|
|
775
988
|
return new URLSearchParams(n).toString();
|
|
776
989
|
}
|
|
777
|
-
function
|
|
990
|
+
function ye(n) {
|
|
778
991
|
return n && typeof n == "object" && "gesture" in n ? !!n.gesture : !1;
|
|
779
992
|
}
|
|
780
|
-
function
|
|
993
|
+
function we(n) {
|
|
781
994
|
return n && typeof n == "object" && "rollback" in n ? !!n.rollback : !1;
|
|
782
995
|
}
|
|
783
|
-
function
|
|
996
|
+
function W(n, t) {
|
|
784
997
|
if (n === t)
|
|
785
998
|
return !0;
|
|
786
999
|
if (n === null || t === null || typeof n != "object" || typeof t != "object")
|
|
787
1000
|
return !1;
|
|
788
|
-
const e = Object.keys(n),
|
|
789
|
-
if (e.length !==
|
|
1001
|
+
const e = Object.keys(n), s = Object.keys(t);
|
|
1002
|
+
if (e.length !== s.length)
|
|
790
1003
|
return !1;
|
|
791
|
-
for (
|
|
792
|
-
if (!
|
|
1004
|
+
for (const r of e)
|
|
1005
|
+
if (!s.includes(r) || !W(n[r], t[r]))
|
|
793
1006
|
return !1;
|
|
794
1007
|
return !0;
|
|
795
1008
|
}
|
|
796
|
-
class
|
|
1009
|
+
class en extends mt {
|
|
797
1010
|
#t;
|
|
798
1011
|
constructor(t, e) {
|
|
799
1012
|
super(t, e);
|
|
800
|
-
const
|
|
801
|
-
if (!
|
|
802
|
-
throw new Error(`No history entry found for: ${
|
|
803
|
-
this.#t =
|
|
1013
|
+
const s = this.internalProps.id, r = e.navigation.entries.find((i) => i.key === s);
|
|
1014
|
+
if (!r)
|
|
1015
|
+
throw new Error(`No history entry found for: ${s}`);
|
|
1016
|
+
this.#t = r;
|
|
804
1017
|
}
|
|
805
1018
|
static getDerivedStateFromProps(t) {
|
|
806
1019
|
return t.config?.presentation === "dialog" || t.config?.presentation === "modal" ? { elementType: "dialog" } : { elementType: "div" };
|
|
807
1020
|
}
|
|
808
1021
|
setParams(t) {
|
|
809
|
-
super.setParams(t), this.setHistoryState(
|
|
1022
|
+
super.setParams(t), this.setHistoryState(
|
|
1023
|
+
({ params: e }) => ({ params: { ...e, ...t } })
|
|
1024
|
+
);
|
|
810
1025
|
}
|
|
811
1026
|
setConfig(t) {
|
|
812
1027
|
super.setConfig(t), this.setHistoryState(({ config: e }) => {
|
|
813
|
-
const
|
|
1028
|
+
const s = /* @__PURE__ */ new Set([
|
|
814
1029
|
"footer",
|
|
815
1030
|
"header",
|
|
816
1031
|
"onEnter",
|
|
@@ -824,7 +1039,7 @@ class Je extends ft {
|
|
|
824
1039
|
config: {
|
|
825
1040
|
...e,
|
|
826
1041
|
...Object.fromEntries(
|
|
827
|
-
Object.entries(t).filter(([
|
|
1042
|
+
Object.entries(t).filter(([r]) => !s.has(r))
|
|
828
1043
|
)
|
|
829
1044
|
}
|
|
830
1045
|
};
|
|
@@ -842,7 +1057,7 @@ class Je extends ft {
|
|
|
842
1057
|
get historyEntryState() {
|
|
843
1058
|
const t = this.#t;
|
|
844
1059
|
if (t?.url) {
|
|
845
|
-
const e = t.getState() ?? {},
|
|
1060
|
+
const e = t.getState() ?? {}, s = pe(t.url.searchParams), r = X(
|
|
846
1061
|
this.props.path,
|
|
847
1062
|
t.url.pathname,
|
|
848
1063
|
this.context.baseURLPattern.pathname,
|
|
@@ -850,8 +1065,8 @@ class Je extends ft {
|
|
|
850
1065
|
)?.params;
|
|
851
1066
|
return e.params = {
|
|
852
1067
|
...e.params,
|
|
853
|
-
...
|
|
854
|
-
...
|
|
1068
|
+
...s,
|
|
1069
|
+
...r
|
|
855
1070
|
}, e;
|
|
856
1071
|
}
|
|
857
1072
|
return {};
|
|
@@ -874,13 +1089,13 @@ class Je extends ft {
|
|
|
874
1089
|
};
|
|
875
1090
|
}
|
|
876
1091
|
get routeProp() {
|
|
877
|
-
const t = this.setParams.bind(this), e = this.setConfig.bind(this), { path:
|
|
1092
|
+
const t = this.setParams.bind(this), e = this.setConfig.bind(this), { path: s } = this.props, { focused: r } = this.state, { params: i, config: o, resolvedPathname: c } = this;
|
|
878
1093
|
return {
|
|
879
1094
|
setParams: t,
|
|
880
1095
|
setConfig: e,
|
|
881
|
-
path:
|
|
1096
|
+
path: s,
|
|
882
1097
|
resolvedPathname: c,
|
|
883
|
-
focused:
|
|
1098
|
+
focused: r,
|
|
884
1099
|
params: i,
|
|
885
1100
|
config: o
|
|
886
1101
|
};
|
|
@@ -890,37 +1105,39 @@ class Je extends ft {
|
|
|
890
1105
|
return;
|
|
891
1106
|
const e = this.#t.getState() ?? {};
|
|
892
1107
|
t instanceof Function && (t = t(e));
|
|
893
|
-
const
|
|
1108
|
+
const s = {
|
|
894
1109
|
...e ?? {},
|
|
895
1110
|
...t
|
|
896
1111
|
};
|
|
897
|
-
window.navigation.updateCurrentEntry({ state:
|
|
1112
|
+
window.navigation.updateCurrentEntry({ state: s });
|
|
898
1113
|
}
|
|
899
1114
|
onClickOutside(t) {
|
|
900
1115
|
if (!this.transitionProvider.current?.ref.current)
|
|
901
1116
|
return;
|
|
902
|
-
const e = this.context?.navigation
|
|
903
|
-
|
|
1117
|
+
const e = this.context?.navigation;
|
|
1118
|
+
t.composedPath().includes(this.transitionProvider.current.ref.current) || e?.goBack();
|
|
904
1119
|
}
|
|
905
1120
|
onEnter(t) {
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
1121
|
+
const e = this.transitionProvider.current?.ref;
|
|
1122
|
+
if (e?.current instanceof HTMLDialogElement && e.current.open === !1) {
|
|
1123
|
+
const s = this.context?.navigation;
|
|
1124
|
+
this.props.config?.presentation === "modal" ? e.current.showModal() : e.current.show(), e.current.style.maxHeight = "unset", e.current.style.maxWidth = "unset", e.current.style.width = "max-content", e.current.style.height = "max-content";
|
|
909
1125
|
const r = this.onClickOutside.bind(this);
|
|
910
|
-
|
|
911
|
-
this.returnValue !== "screen-exit" && (this.style.display = "block",
|
|
912
|
-
}, { once: !0 }),
|
|
1126
|
+
e.current.addEventListener("close", function() {
|
|
1127
|
+
this.returnValue !== "screen-exit" && (this.style.display = "block", s?.goBack()), s?.removeEventListener("click", r);
|
|
1128
|
+
}, { once: !0 }), s?.addEventListener("click", r);
|
|
913
1129
|
}
|
|
914
1130
|
return super.onEnter(t);
|
|
915
1131
|
}
|
|
916
1132
|
onExited(t) {
|
|
917
|
-
|
|
1133
|
+
const e = this.transitionProvider.current?.ref;
|
|
1134
|
+
return e?.current instanceof HTMLDialogElement && e.current.close("screen-exit"), super.onExited(t);
|
|
918
1135
|
}
|
|
919
1136
|
}
|
|
920
|
-
function
|
|
921
|
-
return !!(n !== null && typeof n == "object" &&
|
|
1137
|
+
function O(n) {
|
|
1138
|
+
return !!(n !== null && typeof n == "object" && Object.hasOwn(n, "current"));
|
|
922
1139
|
}
|
|
923
|
-
const
|
|
1140
|
+
const Ee = {
|
|
924
1141
|
horizontal: ["left", "right"],
|
|
925
1142
|
vertical: ["up", "down"],
|
|
926
1143
|
up: ["up"],
|
|
@@ -928,14 +1145,14 @@ const ye = {
|
|
|
928
1145
|
left: ["left"],
|
|
929
1146
|
right: ["right"]
|
|
930
1147
|
};
|
|
931
|
-
function
|
|
932
|
-
return
|
|
1148
|
+
function Pe(n, t) {
|
|
1149
|
+
return Ee[t].includes(n);
|
|
933
1150
|
}
|
|
934
|
-
function
|
|
935
|
-
if (n === "right" && Math.abs(t -
|
|
1151
|
+
function Se(n, { x: t, y: e }, s, r) {
|
|
1152
|
+
if (n === "right" && Math.abs(t - s.left) >= r || n === "left" && Math.abs(t - s.right) >= r || n === "down" && Math.abs(e - s.top) >= r || n === "up" && Math.abs(e - s.bottom) >= r)
|
|
936
1153
|
return !1;
|
|
937
1154
|
}
|
|
938
|
-
function
|
|
1155
|
+
function be(n) {
|
|
939
1156
|
return n === "left" || n === "right" || n === "horizontal";
|
|
940
1157
|
}
|
|
941
1158
|
const L = {
|
|
@@ -944,41 +1161,54 @@ const L = {
|
|
|
944
1161
|
gestureAreaWidth: 100,
|
|
945
1162
|
gestureDirection: "right",
|
|
946
1163
|
gestureDisabled: !1
|
|
947
|
-
},
|
|
948
|
-
class
|
|
1164
|
+
}, _e = 0.5, Le = 1;
|
|
1165
|
+
class Te {
|
|
949
1166
|
promise;
|
|
950
1167
|
state;
|
|
951
|
-
|
|
952
|
-
|
|
1168
|
+
#t;
|
|
1169
|
+
#e;
|
|
953
1170
|
constructor() {
|
|
954
|
-
this.state = "pending", this
|
|
955
|
-
this
|
|
1171
|
+
this.state = "pending", this.#t = this.#e = null, this.promise = new Promise((t, e) => {
|
|
1172
|
+
this.#t = t, this.#e = e;
|
|
956
1173
|
});
|
|
957
1174
|
}
|
|
958
1175
|
resolve(t) {
|
|
959
|
-
this.state = "resolved", this
|
|
1176
|
+
this.state = "resolved", this.#t?.(t);
|
|
960
1177
|
}
|
|
961
1178
|
reject(t) {
|
|
962
1179
|
this.state = "rejected", this.promise.catch(() => {
|
|
963
|
-
}), this
|
|
1180
|
+
}), this.#e?.(t);
|
|
964
1181
|
}
|
|
965
1182
|
}
|
|
966
|
-
class
|
|
967
|
-
navigation
|
|
1183
|
+
class nn extends yt {
|
|
1184
|
+
navigation;
|
|
968
1185
|
#t = null;
|
|
969
1186
|
constructor(t, e) {
|
|
970
|
-
super(t, e)
|
|
1187
|
+
super(t, e), this.navigation = new ge({
|
|
1188
|
+
addEventListener: this.addEventListener.bind(this),
|
|
1189
|
+
removeEventListener: this.removeEventListener.bind(this),
|
|
1190
|
+
dispatchEvent: this.dispatchEvent.bind(this),
|
|
1191
|
+
parent: this.parent?.navigation ?? null,
|
|
1192
|
+
routerId: this.id,
|
|
1193
|
+
baseURL: this.baseURL,
|
|
1194
|
+
baseURLPattern: this.baseURLPattern,
|
|
1195
|
+
getCommitted: () => this.committed,
|
|
1196
|
+
getTransition: () => this.state.transition,
|
|
1197
|
+
getPathPatterns: () => this.pathPatterns,
|
|
1198
|
+
preload: this.preload.bind(this),
|
|
1199
|
+
getNavigatorById: (u) => this.getRouterById(u)?.navigation ?? null
|
|
1200
|
+
});
|
|
971
1201
|
const {
|
|
972
|
-
gestureAreaWidth:
|
|
973
|
-
gestureDirection:
|
|
1202
|
+
gestureAreaWidth: s = L.gestureAreaWidth,
|
|
1203
|
+
gestureDirection: r = L.gestureDirection,
|
|
974
1204
|
gestureDisabled: i = L.gestureDisabled,
|
|
975
1205
|
gestureHysteresis: o = L.gestureHysteresis,
|
|
976
1206
|
gestureMinFlingVelocity: c = L.gestureMinFlingVelocity
|
|
977
1207
|
} = t.config?.screenConfig ?? {};
|
|
978
1208
|
this.state = {
|
|
979
1209
|
screenStack: [],
|
|
980
|
-
gestureDirection:
|
|
981
|
-
gestureAreaWidth:
|
|
1210
|
+
gestureDirection: r,
|
|
1211
|
+
gestureAreaWidth: s,
|
|
982
1212
|
gestureHysteresis: o,
|
|
983
1213
|
gestureDisabled: i,
|
|
984
1214
|
gestureMinFlingVelocity: c,
|
|
@@ -990,16 +1220,16 @@ class Qe extends vt {
|
|
|
990
1220
|
};
|
|
991
1221
|
}
|
|
992
1222
|
static getDerivedStateFromProps(t, e) {
|
|
993
|
-
const
|
|
994
|
-
(
|
|
1223
|
+
const s = e.screenStack.find(
|
|
1224
|
+
(r) => O(r.ref) && r.ref.current?.focused
|
|
995
1225
|
)?.props.config;
|
|
996
|
-
return document.title =
|
|
997
|
-
gestureDirection:
|
|
998
|
-
gestureAreaWidth:
|
|
999
|
-
gestureMinFlingVelocity:
|
|
1000
|
-
gestureHysteresis:
|
|
1001
|
-
gestureDisabled:
|
|
1002
|
-
documentTitle:
|
|
1226
|
+
return document.title = s?.title ?? document.title, {
|
|
1227
|
+
gestureDirection: s?.gestureDirection ?? L.gestureDirection,
|
|
1228
|
+
gestureAreaWidth: s?.gestureAreaWidth ?? L.gestureAreaWidth,
|
|
1229
|
+
gestureMinFlingVelocity: s?.gestureMinFlingVelocity ?? L.gestureMinFlingVelocity,
|
|
1230
|
+
gestureHysteresis: s?.gestureHysteresis ?? L.gestureHysteresis,
|
|
1231
|
+
gestureDisabled: s?.gestureDisabled ?? L.gestureDisabled,
|
|
1232
|
+
documentTitle: s?.title
|
|
1003
1233
|
};
|
|
1004
1234
|
}
|
|
1005
1235
|
componentDidMount() {
|
|
@@ -1011,8 +1241,9 @@ class Qe extends vt {
|
|
|
1011
1241
|
this.onNavigateSuccess
|
|
1012
1242
|
), window.navigation.addEventListener("navigateerror", this.onNavigateError);
|
|
1013
1243
|
}
|
|
1244
|
+
// TODO: figure out how to remove this
|
|
1014
1245
|
shouldComponentUpdate(t, e) {
|
|
1015
|
-
return !
|
|
1246
|
+
return !W(this.props.config, t.config) || !W(this.state, e) || this.props.id !== t.id;
|
|
1016
1247
|
}
|
|
1017
1248
|
componentWillUnmount() {
|
|
1018
1249
|
this.ref.current?.removeEventListener("swipestart", this.onSwipeStart), this.ref.current?.removeEventListener("swipeend", this.onSwipeEnd), window.navigation.removeEventListener(
|
|
@@ -1027,16 +1258,16 @@ class Qe extends vt {
|
|
|
1027
1258
|
);
|
|
1028
1259
|
}
|
|
1029
1260
|
onNavigate = () => {
|
|
1030
|
-
this.#t = new
|
|
1261
|
+
this.#t = new Te();
|
|
1031
1262
|
};
|
|
1032
1263
|
onCurrentEntryChange = () => {
|
|
1033
|
-
this.#t?.
|
|
1264
|
+
this.#t?.resolve?.(window.navigation.currentEntry);
|
|
1034
1265
|
};
|
|
1035
1266
|
onNavigateSuccess = () => {
|
|
1036
1267
|
this.#t = null;
|
|
1037
1268
|
};
|
|
1038
1269
|
onNavigateError = ({ error: t }) => {
|
|
1039
|
-
this.#t?.state === "pending" && this.#t.
|
|
1270
|
+
this.#t?.state === "pending" && this.#t.reject?.(t), this.#t = null;
|
|
1040
1271
|
};
|
|
1041
1272
|
onGestureCancel = () => {
|
|
1042
1273
|
if (!this.state.transition)
|
|
@@ -1048,34 +1279,34 @@ class Qe extends vt {
|
|
|
1048
1279
|
canGestureNavigate(t) {
|
|
1049
1280
|
if (!this.ref.current || this.state.gestureDisabled)
|
|
1050
1281
|
return !1;
|
|
1051
|
-
const e = this.ref.current.getBoundingClientRect(), { direction:
|
|
1052
|
-
return (
|
|
1282
|
+
const e = this.ref.current.getBoundingClientRect(), { direction: s } = t;
|
|
1283
|
+
return (s === "down" || s === "right") && !this.navigation.canGoBack() || (s === "up" || s === "left") && !this.navigation.canGoForward() || Se(s, t, e, this.state.gestureAreaWidth) ? !1 : Pe(s, this.state.gestureDirection);
|
|
1053
1284
|
}
|
|
1054
1285
|
onSwipeStart = (t) => {
|
|
1055
1286
|
if (!this.canGestureNavigate(t) || !this.ref.current || !this.screenTransitionLayer.current)
|
|
1056
1287
|
return;
|
|
1057
|
-
const { direction: e } = t,
|
|
1058
|
-
let
|
|
1288
|
+
const { direction: e } = t, s = be(e) ? "x" : "y";
|
|
1289
|
+
let r, i;
|
|
1059
1290
|
switch (e) {
|
|
1060
1291
|
case "right":
|
|
1061
|
-
|
|
1292
|
+
r = 0, i = this.ref.current.clientWidth;
|
|
1062
1293
|
break;
|
|
1063
1294
|
case "left":
|
|
1064
|
-
|
|
1295
|
+
r = this.ref.current.clientWidth, i = 0;
|
|
1065
1296
|
break;
|
|
1066
1297
|
case "down":
|
|
1067
|
-
|
|
1298
|
+
r = 0, i = this.ref.current.clientHeight;
|
|
1068
1299
|
break;
|
|
1069
1300
|
case "up":
|
|
1070
|
-
|
|
1301
|
+
r = this.ref.current.clientHeight, i = 0;
|
|
1071
1302
|
break;
|
|
1072
1303
|
}
|
|
1073
|
-
this.screenTransitionLayer.current.animation.timeline = new
|
|
1304
|
+
this.screenTransitionLayer.current.animation.timeline = new Tt(
|
|
1074
1305
|
{
|
|
1075
1306
|
source: this.ref.current,
|
|
1076
1307
|
type: "swipe",
|
|
1077
|
-
axis:
|
|
1078
|
-
rangeStart:
|
|
1308
|
+
axis: s,
|
|
1309
|
+
rangeStart: r,
|
|
1079
1310
|
rangeEnd: i
|
|
1080
1311
|
}
|
|
1081
1312
|
);
|
|
@@ -1084,16 +1315,16 @@ class Qe extends vt {
|
|
|
1084
1315
|
info: { gesture: o }
|
|
1085
1316
|
}) : window.navigation.traverseTo(this.navigation.next.key, {
|
|
1086
1317
|
info: { gesture: o }
|
|
1087
|
-
}), this.dispatchEvent(new
|
|
1318
|
+
}), this.dispatchEvent(new he(t));
|
|
1088
1319
|
};
|
|
1089
1320
|
onSwipeEnd = (t) => {
|
|
1090
1321
|
if (!this.screenTransitionLayer.current)
|
|
1091
1322
|
return;
|
|
1092
|
-
const e = this.screenTransitionLayer.current.animation.effect?.getComputedTiming().progress ?? 0,
|
|
1323
|
+
const e = this.screenTransitionLayer.current.animation.effect?.getComputedTiming().progress ?? 0, s = this.screenTransitionLayer.current.animation.playbackRate;
|
|
1093
1324
|
this.screenTransitionLayer.current.animation.timeline = document.timeline;
|
|
1094
|
-
const
|
|
1325
|
+
const r = s > 0 ? e > this.state.gestureHysteresis : e < this.state.gestureHysteresis;
|
|
1095
1326
|
let i = !1;
|
|
1096
|
-
t.velocity < this.state.gestureMinFlingVelocity && !
|
|
1327
|
+
t.velocity < this.state.gestureMinFlingVelocity && !r ? (i = !0, this.screenTransitionLayer.current.animation.reverse(), this.dispatchEvent(new fe())) : this.dispatchEvent(new de(t)), i && this.screenTransitionLayer.current.animation.finished.then(() => {
|
|
1097
1328
|
this.state.controller?.abort("gesture-cancel");
|
|
1098
1329
|
});
|
|
1099
1330
|
};
|
|
@@ -1102,41 +1333,41 @@ class Qe extends vt {
|
|
|
1102
1333
|
}
|
|
1103
1334
|
get backNavigating() {
|
|
1104
1335
|
const t = this.state.screenStack.findIndex(
|
|
1105
|
-
(
|
|
1336
|
+
(s) => s.key === this.state.fromKey
|
|
1106
1337
|
), e = this.state.screenStack.findIndex(
|
|
1107
|
-
(
|
|
1338
|
+
(s) => s.key === this.state.destinationKey
|
|
1108
1339
|
);
|
|
1109
|
-
return e >=
|
|
1340
|
+
return e >= U && e < t;
|
|
1110
1341
|
}
|
|
1111
1342
|
get screens() {
|
|
1112
1343
|
const t = this.state.screenStack;
|
|
1113
|
-
return t.filter((e,
|
|
1114
|
-
const
|
|
1115
|
-
return
|
|
1344
|
+
return t.filter((e, s) => {
|
|
1345
|
+
const r = e.ref ?? null, i = t.at(s + R)?.ref;
|
|
1346
|
+
return O(r) && r.current?.config.keepAlive || O(i) && i.current?.config.presentation === "modal" || O(i) && i.current?.config.presentation === "dialog" || e.key === this.navigation.current?.key || e.key === this.state.fromKey || e.key === this.state.destinationKey;
|
|
1116
1347
|
});
|
|
1117
1348
|
}
|
|
1118
|
-
async preload(t, e = {},
|
|
1119
|
-
const { child:
|
|
1120
|
-
if (!
|
|
1349
|
+
async preload(t, e = {}, s = {}) {
|
|
1350
|
+
const { child: r, matchInfo: i } = this.screenChildFromPathname(t) ?? {};
|
|
1351
|
+
if (!r)
|
|
1121
1352
|
return Promise.resolve(!1);
|
|
1122
|
-
const { navigation: o } = this, { signal: c } =
|
|
1353
|
+
const { navigation: o } = this, { signal: c } = s, { path: u } = r.props;
|
|
1123
1354
|
return await Promise.all([
|
|
1124
|
-
this.preloadScreen(
|
|
1125
|
-
|
|
1355
|
+
this.preloadScreen(r),
|
|
1356
|
+
r.props.config?.onLoad?.({
|
|
1126
1357
|
navigation: o,
|
|
1127
1358
|
signal: c,
|
|
1128
1359
|
preloading: !0,
|
|
1129
1360
|
route: {
|
|
1130
1361
|
focused: !1,
|
|
1131
|
-
path:
|
|
1362
|
+
path: u,
|
|
1132
1363
|
resolvedPathname: t,
|
|
1133
1364
|
config: {
|
|
1134
1365
|
...this.props.config?.screenConfig,
|
|
1135
|
-
...
|
|
1366
|
+
...r.props.config,
|
|
1136
1367
|
...e.config
|
|
1137
1368
|
},
|
|
1138
1369
|
params: {
|
|
1139
|
-
...
|
|
1370
|
+
...r.props.defaultParams,
|
|
1140
1371
|
...i?.params,
|
|
1141
1372
|
...e.params
|
|
1142
1373
|
}
|
|
@@ -1145,28 +1376,28 @@ class Qe extends vt {
|
|
|
1145
1376
|
]), !0;
|
|
1146
1377
|
}
|
|
1147
1378
|
cloneScreenChildFromPathname(t, e) {
|
|
1148
|
-
const { child:
|
|
1149
|
-
return
|
|
1379
|
+
const { child: s } = this.screenChildFromPathname(t) ?? {};
|
|
1380
|
+
return s ? (e ??= crypto.randomUUID(), wt(s, {
|
|
1150
1381
|
config: {
|
|
1151
1382
|
title: document.title,
|
|
1152
1383
|
...this.props.config?.screenConfig,
|
|
1153
|
-
...
|
|
1384
|
+
...s.props.config
|
|
1154
1385
|
},
|
|
1155
1386
|
id: e,
|
|
1156
1387
|
resolvedPathname: t,
|
|
1157
1388
|
key: e,
|
|
1158
|
-
ref:
|
|
1389
|
+
ref: _t()
|
|
1159
1390
|
})) : null;
|
|
1160
1391
|
}
|
|
1161
1392
|
getScreenRefByKey(t) {
|
|
1162
1393
|
const e = this.state.screenStack.find(
|
|
1163
|
-
(
|
|
1394
|
+
(s) => s.key === t
|
|
1164
1395
|
)?.ref;
|
|
1165
|
-
return
|
|
1396
|
+
return O(e) ? e : null;
|
|
1166
1397
|
}
|
|
1167
1398
|
canIntercept(t) {
|
|
1168
|
-
const e = new URL(t.destination.url).pathname,
|
|
1169
|
-
return this.mounted && this.shouldIntercept(t) &&
|
|
1399
|
+
const e = new URL(t.destination.url).pathname, s = this.baseURLPattern.pathname;
|
|
1400
|
+
return this.mounted && this.shouldIntercept(t) && this.includesRoute(e, s);
|
|
1170
1401
|
}
|
|
1171
1402
|
shouldIntercept(t) {
|
|
1172
1403
|
return t.canIntercept && !t.formData && !t.hashChange && !t.downloadRequest || !!this.props.config?.shouldIntercept?.(t);
|
|
@@ -1188,24 +1419,24 @@ class Qe extends vt {
|
|
|
1188
1419
|
}
|
|
1189
1420
|
handleLoad(t) {
|
|
1190
1421
|
const e = () => {
|
|
1191
|
-
const
|
|
1192
|
-
return c.forEach((
|
|
1193
|
-
if (!
|
|
1422
|
+
const s = t.transition?.from?.key ?? null, r = t.destination.key, i = t.transition, o = [], c = this.navigation.entries;
|
|
1423
|
+
return c.forEach((u) => {
|
|
1424
|
+
if (!u.url)
|
|
1194
1425
|
return null;
|
|
1195
|
-
const
|
|
1196
|
-
|
|
1197
|
-
|
|
1426
|
+
const h = this.cloneScreenChildFromPathname(
|
|
1427
|
+
u.url.pathname,
|
|
1428
|
+
u.key
|
|
1198
1429
|
);
|
|
1199
|
-
if (!
|
|
1430
|
+
if (!h)
|
|
1200
1431
|
return null;
|
|
1201
|
-
o.push(
|
|
1432
|
+
o.push(h);
|
|
1202
1433
|
}), new Promise(
|
|
1203
|
-
(
|
|
1434
|
+
(u, h) => $(() => {
|
|
1204
1435
|
this.setState(
|
|
1205
|
-
{ screenStack: o, fromKey:
|
|
1436
|
+
{ screenStack: o, fromKey: s, transition: i, destinationKey: r },
|
|
1206
1437
|
async () => {
|
|
1207
1438
|
const { initialPathname: d } = this.props.config ?? {}, [w] = c;
|
|
1208
|
-
if (d && c.length ===
|
|
1439
|
+
if (d && c.length === R && w.url && !X(
|
|
1209
1440
|
d,
|
|
1210
1441
|
w.url.pathname,
|
|
1211
1442
|
this.baseURLPattern.pathname
|
|
@@ -1215,9 +1446,9 @@ class Qe extends vt {
|
|
|
1215
1446
|
const m = t.destination.getState() ?? {};
|
|
1216
1447
|
this.navigation.push(t.destination.url, m);
|
|
1217
1448
|
});
|
|
1218
|
-
}),
|
|
1449
|
+
}), u();
|
|
1219
1450
|
const E = t.signal;
|
|
1220
|
-
this.navigation.current?.key === void 0 &&
|
|
1451
|
+
this.navigation.current?.key === void 0 && h(new Error("Current key is undefined"));
|
|
1221
1452
|
const v = this.getScreenRefByKey(
|
|
1222
1453
|
this.navigation.current.key
|
|
1223
1454
|
);
|
|
@@ -1225,9 +1456,9 @@ class Qe extends vt {
|
|
|
1225
1456
|
v,
|
|
1226
1457
|
null,
|
|
1227
1458
|
E
|
|
1228
|
-
).catch(
|
|
1459
|
+
).catch(h), this.setState(
|
|
1229
1460
|
{ destinationKey: null, fromKey: null, transition: null },
|
|
1230
|
-
|
|
1461
|
+
u
|
|
1231
1462
|
);
|
|
1232
1463
|
}
|
|
1233
1464
|
);
|
|
@@ -1237,20 +1468,24 @@ class Qe extends vt {
|
|
|
1237
1468
|
t.intercept({ handler: e });
|
|
1238
1469
|
}
|
|
1239
1470
|
handleReplace(t) {
|
|
1240
|
-
const e = this.state.screenStack,
|
|
1241
|
-
|
|
1471
|
+
const e = this.state.screenStack, s = t.destination, r = new URL(s.url).pathname, i = window.navigation.currentEntry?.key ?? s.key, o = this.cloneScreenChildFromPathname(
|
|
1472
|
+
r,
|
|
1242
1473
|
i
|
|
1243
1474
|
);
|
|
1244
1475
|
if (!o)
|
|
1245
1476
|
return t.preventDefault();
|
|
1246
1477
|
const c = () => {
|
|
1247
|
-
const
|
|
1478
|
+
const u = this.state.transition ?? window.navigation.transition, h = u?.from?.key ?? null, d = e.findIndex(
|
|
1248
1479
|
(w) => w.key === this.navigation.current?.key
|
|
1249
1480
|
);
|
|
1250
|
-
return e.splice(
|
|
1251
|
-
|
|
1481
|
+
return e.splice(
|
|
1482
|
+
d,
|
|
1483
|
+
R,
|
|
1484
|
+
o
|
|
1485
|
+
), new Promise(
|
|
1486
|
+
(w, E) => $(() => {
|
|
1252
1487
|
this.setState(
|
|
1253
|
-
{ destinationKey: i, fromKey:
|
|
1488
|
+
{ destinationKey: i, fromKey: h, transition: u, screenStack: e },
|
|
1254
1489
|
async () => {
|
|
1255
1490
|
const v = t.signal, p = this.getScreenRefByKey(
|
|
1256
1491
|
String(i)
|
|
@@ -1271,34 +1506,34 @@ class Qe extends vt {
|
|
|
1271
1506
|
t.intercept({ handler: c });
|
|
1272
1507
|
}
|
|
1273
1508
|
handleDefault(t) {
|
|
1274
|
-
const e = this.state.screenStack,
|
|
1275
|
-
if (!this.screenChildFromPathname(
|
|
1509
|
+
const e = this.state.screenStack, s = t.destination, r = new URL(s.url).pathname;
|
|
1510
|
+
if (!this.screenChildFromPathname(r))
|
|
1276
1511
|
return t.preventDefault();
|
|
1277
1512
|
const i = () => {
|
|
1278
|
-
if (
|
|
1513
|
+
if (we(t.info))
|
|
1279
1514
|
return Promise.resolve();
|
|
1280
|
-
const
|
|
1281
|
-
let
|
|
1282
|
-
(p) => p.key ===
|
|
1515
|
+
const u = window.navigation.transition;
|
|
1516
|
+
let h = e.findIndex(
|
|
1517
|
+
(p) => p.key === u?.from.key
|
|
1283
1518
|
);
|
|
1284
|
-
|
|
1519
|
+
h === k && t.navigationType === "traverse" && (h = e.findIndex((p) => u?.from.url ? X(
|
|
1285
1520
|
p.props.path,
|
|
1286
|
-
new URL(
|
|
1521
|
+
new URL(u.from.url).pathname,
|
|
1287
1522
|
this.baseURLPattern.pathname,
|
|
1288
1523
|
p.props.caseSensitive
|
|
1289
1524
|
) : !1));
|
|
1290
|
-
const d = (e[
|
|
1525
|
+
const d = (e[h]?.key || u?.from.key) ?? null, w = e.findIndex(
|
|
1291
1526
|
(p) => p.key === t.destination.key
|
|
1292
1527
|
), E = (e[w]?.key || window.navigation.currentEntry?.key) ?? null;
|
|
1293
1528
|
if (t.navigationType === "push") {
|
|
1294
|
-
const p = new URL(
|
|
1529
|
+
const p = new URL(s.url).pathname, m = this.cloneScreenChildFromPathname(
|
|
1295
1530
|
p,
|
|
1296
1531
|
E
|
|
1297
1532
|
);
|
|
1298
1533
|
if (!m)
|
|
1299
1534
|
return Promise.resolve();
|
|
1300
1535
|
e.splice(
|
|
1301
|
-
|
|
1536
|
+
h + R,
|
|
1302
1537
|
1 / 0,
|
|
1303
1538
|
// Remove all screens after current
|
|
1304
1539
|
m
|
|
@@ -1306,22 +1541,22 @@ class Qe extends vt {
|
|
|
1306
1541
|
}
|
|
1307
1542
|
const v = new AbortController();
|
|
1308
1543
|
return new Promise(
|
|
1309
|
-
(p, m) =>
|
|
1544
|
+
(p, m) => $(() => {
|
|
1310
1545
|
this.setState(
|
|
1311
|
-
{ controller: v, destinationKey: E, fromKey: d, transition:
|
|
1546
|
+
{ controller: v, destinationKey: E, fromKey: d, transition: u, screenStack: e },
|
|
1312
1547
|
async () => {
|
|
1313
1548
|
v.signal.onabort = m;
|
|
1314
|
-
const
|
|
1549
|
+
const l = t.signal, a = this.getScreenRefByKey(String(d)), f = this.getScreenRefByKey(
|
|
1315
1550
|
String(E)
|
|
1316
1551
|
), P = this.dispatchLifecycleHandlers(
|
|
1317
|
-
|
|
1552
|
+
f,
|
|
1318
1553
|
a,
|
|
1319
|
-
|
|
1554
|
+
l
|
|
1320
1555
|
).catch(m), y = this.screenTransition(
|
|
1321
|
-
|
|
1556
|
+
f,
|
|
1322
1557
|
a
|
|
1323
1558
|
);
|
|
1324
|
-
y?.updatePlaybackRate(
|
|
1559
|
+
y?.updatePlaybackRate(Le), y?.finished.catch(m), await P, this.setState(
|
|
1325
1560
|
{
|
|
1326
1561
|
destinationKey: null,
|
|
1327
1562
|
fromKey: null,
|
|
@@ -1336,242 +1571,244 @@ class Qe extends vt {
|
|
|
1336
1571
|
);
|
|
1337
1572
|
};
|
|
1338
1573
|
let o;
|
|
1339
|
-
|
|
1574
|
+
ye(t.info) ? (o = "after-transition", this.addEventListener("gesture-end", () => t.commit?.(), { once: !0 }), this.addEventListener("gesture-cancel", this.onGestureCancel, {
|
|
1340
1575
|
once: !0
|
|
1341
1576
|
})) : o = "immediate";
|
|
1342
1577
|
const c = { handler: i, commit: o };
|
|
1343
1578
|
t.intercept(c);
|
|
1344
1579
|
}
|
|
1345
|
-
async dispatchLifecycleHandlers(t, e,
|
|
1346
|
-
let
|
|
1347
|
-
this.addEventListener("transition-start", () =>
|
|
1580
|
+
async dispatchLifecycleHandlers(t, e, s) {
|
|
1581
|
+
let r = !1;
|
|
1582
|
+
this.addEventListener("transition-start", () => r = !0, {
|
|
1348
1583
|
once: !0
|
|
1349
1584
|
}), await Promise.all([
|
|
1350
|
-
e?.current?.onExit(
|
|
1351
|
-
t?.current?.onEnter(
|
|
1352
|
-
t?.current?.load(
|
|
1353
|
-
]),
|
|
1585
|
+
e?.current?.onExit(s),
|
|
1586
|
+
t?.current?.onEnter(s),
|
|
1587
|
+
t?.current?.load(s)
|
|
1588
|
+
]), r && await new Promise(
|
|
1354
1589
|
(i) => this.addEventListener("transition-end", i, { once: !0 })
|
|
1355
1590
|
), !this.state.controller?.signal.aborted && await Promise.all([
|
|
1356
|
-
e?.current?.onExited(
|
|
1357
|
-
t?.current?.onEntered(
|
|
1591
|
+
e?.current?.onExited(s).then(() => e.current?.blur()),
|
|
1592
|
+
t?.current?.onEntered(s).then(() => t.current?.focus())
|
|
1358
1593
|
]);
|
|
1359
1594
|
}
|
|
1360
1595
|
screenTransition(t, e) {
|
|
1361
|
-
const { backNavigating:
|
|
1362
|
-
if (
|
|
1363
|
-
|
|
1364
|
-
const
|
|
1365
|
-
|
|
1596
|
+
const { backNavigating: s } = this, r = this.screenTransitionLayer.current;
|
|
1597
|
+
if (r && t && e) {
|
|
1598
|
+
r.direction = s ? "reverse" : "normal", t.current?.transitionProvider.current && (t.current.transitionProvider.current.exiting = !1), e.current?.transitionProvider.current && (e.current.transitionProvider.current.exiting = !0);
|
|
1599
|
+
const i = r.sharedElementTransitionLayer.current;
|
|
1600
|
+
i && (i.outgoingScreen = e, i.incomingScreen = t);
|
|
1601
|
+
const o = this.screens.findIndex(
|
|
1602
|
+
(c) => c.ref === (s ? e : t)
|
|
1366
1603
|
);
|
|
1367
|
-
return
|
|
1604
|
+
return r.screens = this.screens.map((c, u) => (u = u - o + R, O(c.ref) && c.ref.current?.transitionProvider.current ? (c.ref.current.transitionProvider.current.index = u, c.ref) : null)).filter(O), r.transition();
|
|
1368
1605
|
}
|
|
1369
1606
|
}
|
|
1370
1607
|
}
|
|
1371
|
-
function
|
|
1372
|
-
return
|
|
1608
|
+
function Re() {
|
|
1609
|
+
return H("Stack.Navigation"), Et();
|
|
1610
|
+
}
|
|
1611
|
+
function sn() {
|
|
1612
|
+
return H("Stack.Router"), Pt();
|
|
1373
1613
|
}
|
|
1374
|
-
function
|
|
1375
|
-
return
|
|
1614
|
+
function rn() {
|
|
1615
|
+
return H("Stack.Route"), St();
|
|
1376
1616
|
}
|
|
1377
|
-
function
|
|
1378
|
-
return
|
|
1617
|
+
function an(n, t) {
|
|
1618
|
+
return H("Stack.Params"), bt(n, t);
|
|
1379
1619
|
}
|
|
1380
|
-
function
|
|
1381
|
-
|
|
1620
|
+
function G(n, t, e, s) {
|
|
1621
|
+
j(() => {
|
|
1622
|
+
const r = n.current;
|
|
1623
|
+
if (r)
|
|
1624
|
+
return r.addEventListener(t, e, s), () => {
|
|
1625
|
+
r.removeEventListener(t, e, s);
|
|
1626
|
+
};
|
|
1627
|
+
}, [n, t, e, s]);
|
|
1382
1628
|
}
|
|
1383
|
-
function
|
|
1384
|
-
const t =
|
|
1629
|
+
function ke(n) {
|
|
1630
|
+
const t = Re();
|
|
1385
1631
|
return n ?? t;
|
|
1386
1632
|
}
|
|
1387
|
-
function
|
|
1388
|
-
const e =
|
|
1389
|
-
(
|
|
1390
|
-
|
|
1633
|
+
function Ie(n, t = {}) {
|
|
1634
|
+
const e = q(null), s = dt(
|
|
1635
|
+
(r) => {
|
|
1636
|
+
r.forEach((i) => {
|
|
1391
1637
|
i.isIntersecting && n(i);
|
|
1392
1638
|
});
|
|
1393
1639
|
},
|
|
1394
1640
|
[n]
|
|
1395
1641
|
);
|
|
1396
|
-
return
|
|
1397
|
-
const
|
|
1398
|
-
return i &&
|
|
1399
|
-
i &&
|
|
1642
|
+
return j(() => {
|
|
1643
|
+
const r = new IntersectionObserver(s, t), i = e.current;
|
|
1644
|
+
return i && r.observe(i), () => {
|
|
1645
|
+
i && r.unobserve(i);
|
|
1400
1646
|
};
|
|
1401
|
-
}, [
|
|
1647
|
+
}, [s, t]), e;
|
|
1402
1648
|
}
|
|
1403
|
-
function
|
|
1404
|
-
|
|
1405
|
-
const s = n.current;
|
|
1406
|
-
if (s)
|
|
1407
|
-
return s.addEventListener(t, e, r), () => {
|
|
1408
|
-
s.removeEventListener(t, e, r);
|
|
1409
|
-
};
|
|
1410
|
-
}, [n, t, e, r]);
|
|
1411
|
-
}
|
|
1412
|
-
function ke(n, { forceThreshold: t = Se } = {}) {
|
|
1413
|
-
const e = $(null), r = () => n(!0), s = (i) => {
|
|
1649
|
+
function xe(n, { forceThreshold: t = _e } = {}) {
|
|
1650
|
+
const e = q(null), s = () => n(!0), r = (i) => {
|
|
1414
1651
|
const o = i.touches[0];
|
|
1415
1652
|
o && o.force >= t && n(!0);
|
|
1416
1653
|
};
|
|
1417
|
-
return
|
|
1654
|
+
return G(e, "mouseenter", s), G(e, "touchstart", r), e;
|
|
1418
1655
|
}
|
|
1419
|
-
function
|
|
1656
|
+
function on({
|
|
1420
1657
|
preload: n,
|
|
1421
1658
|
goBack: t,
|
|
1422
1659
|
params: e = {},
|
|
1423
|
-
type:
|
|
1424
|
-
href:
|
|
1660
|
+
type: s = "push",
|
|
1661
|
+
href: r,
|
|
1425
1662
|
navigation: i,
|
|
1426
1663
|
onClick: o,
|
|
1427
1664
|
preloadBehaviour: c = {
|
|
1428
1665
|
type: "onsight"
|
|
1429
1666
|
},
|
|
1430
|
-
children:
|
|
1431
|
-
...
|
|
1667
|
+
children: u,
|
|
1668
|
+
...h
|
|
1432
1669
|
}) {
|
|
1433
|
-
const d =
|
|
1670
|
+
const d = ke(i), w = c?.type === "onsight", E = c?.type === "onhover", v = c?.type === "force", p = Ie(
|
|
1434
1671
|
(S) => {
|
|
1435
|
-
!S.isIntersecting || !n || d.preload(
|
|
1672
|
+
!S.isIntersecting || !n || d.preload(r, { params: e });
|
|
1436
1673
|
},
|
|
1437
1674
|
w ? c : {}
|
|
1438
|
-
), m =
|
|
1675
|
+
), m = xe(
|
|
1439
1676
|
(S) => {
|
|
1440
|
-
!S || !n || d.preload(
|
|
1677
|
+
!S || !n || d.preload(r, { params: e });
|
|
1441
1678
|
},
|
|
1442
1679
|
E ? c : {}
|
|
1443
1680
|
);
|
|
1444
|
-
|
|
1445
|
-
!n || !v || d.preload(
|
|
1446
|
-
}, [n,
|
|
1447
|
-
const [
|
|
1448
|
-
|
|
1681
|
+
j(() => {
|
|
1682
|
+
!n || !v || d.preload(r, { params: e });
|
|
1683
|
+
}, [n, r, d, v, e]);
|
|
1684
|
+
const [l, a] = Lt(void 0), f = d?.routerId, y = !l?.includes(window.location.origin) ? "noopener noreferrer" : t ? "prev" : "next";
|
|
1685
|
+
j(() => {
|
|
1449
1686
|
if (t && d.canGoBack())
|
|
1450
1687
|
a(d.previous.url?.href);
|
|
1451
|
-
else if (
|
|
1452
|
-
const S =
|
|
1453
|
-
|
|
1688
|
+
else if (r) {
|
|
1689
|
+
const S = me(e), N = new URL(r, d.baseURL);
|
|
1690
|
+
N.search = S, a(N.href);
|
|
1454
1691
|
}
|
|
1455
|
-
}, [
|
|
1692
|
+
}, [r, e, d, t]);
|
|
1456
1693
|
const b = (S) => {
|
|
1457
|
-
t ? (S.preventDefault(), d.goBack()) :
|
|
1694
|
+
t ? (S.preventDefault(), d.goBack()) : s === "replace" && r && (S.preventDefault(), d.replace(r)), o?.(S);
|
|
1458
1695
|
};
|
|
1459
|
-
let
|
|
1696
|
+
let x;
|
|
1460
1697
|
switch (c?.type) {
|
|
1461
1698
|
case "onhover":
|
|
1462
|
-
|
|
1699
|
+
x = m;
|
|
1463
1700
|
break;
|
|
1464
1701
|
case "onsight":
|
|
1465
|
-
|
|
1702
|
+
x = p;
|
|
1466
1703
|
break;
|
|
1467
1704
|
default:
|
|
1468
|
-
|
|
1705
|
+
x = null;
|
|
1469
1706
|
}
|
|
1470
|
-
return /* @__PURE__ */
|
|
1707
|
+
return /* @__PURE__ */ ft(
|
|
1471
1708
|
"a",
|
|
1472
1709
|
{
|
|
1473
|
-
href:
|
|
1474
|
-
"data-router-id":
|
|
1710
|
+
href: l,
|
|
1711
|
+
"data-router-id": f,
|
|
1475
1712
|
onClick: b,
|
|
1476
1713
|
rel: y,
|
|
1477
|
-
ref:
|
|
1478
|
-
...
|
|
1479
|
-
children:
|
|
1714
|
+
ref: x,
|
|
1715
|
+
...h,
|
|
1716
|
+
children: u
|
|
1480
1717
|
}
|
|
1481
1718
|
);
|
|
1482
1719
|
}
|
|
1483
|
-
const
|
|
1720
|
+
const cn = [
|
|
1484
1721
|
{
|
|
1485
1722
|
transform: "translateX(100vw)"
|
|
1486
1723
|
},
|
|
1487
1724
|
{
|
|
1488
1725
|
transform: "translateX(0vw)"
|
|
1489
1726
|
}
|
|
1490
|
-
],
|
|
1727
|
+
], Fe = [
|
|
1491
1728
|
{
|
|
1492
1729
|
transform: "translateX(100vw)"
|
|
1493
1730
|
},
|
|
1494
1731
|
{
|
|
1495
1732
|
transform: "translateX(0vw)"
|
|
1496
1733
|
}
|
|
1497
|
-
],
|
|
1734
|
+
], un = [
|
|
1498
1735
|
{
|
|
1499
1736
|
transform: "translateX(0vw)"
|
|
1500
1737
|
},
|
|
1501
1738
|
{
|
|
1502
1739
|
transform: "translateX(-50vw)"
|
|
1503
1740
|
}
|
|
1504
|
-
],
|
|
1741
|
+
], Oe = [
|
|
1505
1742
|
{
|
|
1506
1743
|
transform: "translateX(0vw)"
|
|
1507
1744
|
},
|
|
1508
1745
|
{
|
|
1509
1746
|
transform: "translateX(calc(100vw * -0.3))"
|
|
1510
1747
|
}
|
|
1511
|
-
],
|
|
1748
|
+
], ln = [
|
|
1512
1749
|
{
|
|
1513
1750
|
transform: "translateX(-100vw)"
|
|
1514
1751
|
},
|
|
1515
1752
|
{
|
|
1516
1753
|
transform: "translateX(0vw)"
|
|
1517
1754
|
}
|
|
1518
|
-
],
|
|
1755
|
+
], De = [
|
|
1519
1756
|
{
|
|
1520
1757
|
transform: "translateX(-100vw)"
|
|
1521
1758
|
},
|
|
1522
1759
|
{
|
|
1523
1760
|
transform: "translateX(0vw)"
|
|
1524
1761
|
}
|
|
1525
|
-
],
|
|
1762
|
+
], hn = [
|
|
1526
1763
|
{
|
|
1527
1764
|
transform: "translateX(0vw)"
|
|
1528
1765
|
},
|
|
1529
1766
|
{
|
|
1530
1767
|
transform: "translateX(50vw)"
|
|
1531
1768
|
}
|
|
1532
|
-
],
|
|
1769
|
+
], Me = [
|
|
1533
1770
|
{
|
|
1534
1771
|
transform: "translateX(0vw)"
|
|
1535
1772
|
},
|
|
1536
1773
|
{
|
|
1537
1774
|
transform: "translateX(calc(100vw * 0.3))"
|
|
1538
1775
|
}
|
|
1539
|
-
],
|
|
1776
|
+
], dn = [
|
|
1540
1777
|
{
|
|
1541
1778
|
transform: "translateY(100vh)"
|
|
1542
1779
|
},
|
|
1543
1780
|
{
|
|
1544
1781
|
transform: "translateY(0vh)"
|
|
1545
1782
|
}
|
|
1546
|
-
],
|
|
1783
|
+
], Ke = [
|
|
1547
1784
|
{
|
|
1548
1785
|
transform: "translateY(100vh)"
|
|
1549
1786
|
},
|
|
1550
1787
|
{
|
|
1551
1788
|
transform: "translateY(0vh)"
|
|
1552
1789
|
}
|
|
1553
|
-
],
|
|
1790
|
+
], fn = [
|
|
1554
1791
|
{
|
|
1555
1792
|
transform: "translateY(0vh)"
|
|
1556
1793
|
},
|
|
1557
1794
|
{
|
|
1558
1795
|
transform: "translateY(-50vh)"
|
|
1559
1796
|
}
|
|
1560
|
-
],
|
|
1797
|
+
], vn = [
|
|
1561
1798
|
{
|
|
1562
1799
|
transform: "translateY(-100vh)"
|
|
1563
1800
|
},
|
|
1564
1801
|
{
|
|
1565
1802
|
transform: "translateY(0vh)"
|
|
1566
1803
|
}
|
|
1567
|
-
],
|
|
1804
|
+
], gn = [
|
|
1568
1805
|
{
|
|
1569
1806
|
transform: "translateY(0vh)"
|
|
1570
1807
|
},
|
|
1571
1808
|
{
|
|
1572
1809
|
transform: "translateY(50vh)"
|
|
1573
1810
|
}
|
|
1574
|
-
],
|
|
1811
|
+
], pn = [
|
|
1575
1812
|
{
|
|
1576
1813
|
transform: "scale(0.85)",
|
|
1577
1814
|
opacity: 0
|
|
@@ -1580,7 +1817,7 @@ const sn = [
|
|
|
1580
1817
|
transform: "scale(1)",
|
|
1581
1818
|
opacity: 1
|
|
1582
1819
|
}
|
|
1583
|
-
],
|
|
1820
|
+
], mn = [
|
|
1584
1821
|
{
|
|
1585
1822
|
transform: "scale(1)",
|
|
1586
1823
|
opacity: 1
|
|
@@ -1589,21 +1826,21 @@ const sn = [
|
|
|
1589
1826
|
transform: "scale(1.15)",
|
|
1590
1827
|
opacity: 0
|
|
1591
1828
|
}
|
|
1592
|
-
],
|
|
1829
|
+
], yn = [
|
|
1593
1830
|
{
|
|
1594
1831
|
opacity: 0
|
|
1595
1832
|
},
|
|
1596
1833
|
{
|
|
1597
1834
|
opacity: 1
|
|
1598
1835
|
}
|
|
1599
|
-
],
|
|
1836
|
+
], wn = [
|
|
1600
1837
|
{
|
|
1601
1838
|
opacity: 1
|
|
1602
1839
|
},
|
|
1603
1840
|
{
|
|
1604
1841
|
opacity: 0
|
|
1605
1842
|
}
|
|
1606
|
-
],
|
|
1843
|
+
], Be = [
|
|
1607
1844
|
{
|
|
1608
1845
|
opacity: 0,
|
|
1609
1846
|
transform: "translateY(calc(100vh * 0.08))"
|
|
@@ -1620,7 +1857,7 @@ const sn = [
|
|
|
1620
1857
|
opacity: 1,
|
|
1621
1858
|
transform: "translateY(0vh)"
|
|
1622
1859
|
}
|
|
1623
|
-
],
|
|
1860
|
+
], Ye = [
|
|
1624
1861
|
{
|
|
1625
1862
|
opacity: 0,
|
|
1626
1863
|
transform: "translateY(96vw)"
|
|
@@ -1629,7 +1866,7 @@ const sn = [
|
|
|
1629
1866
|
opacity: 1,
|
|
1630
1867
|
transform: "translateY(0vw)"
|
|
1631
1868
|
}
|
|
1632
|
-
],
|
|
1869
|
+
], Ce = [
|
|
1633
1870
|
{
|
|
1634
1871
|
opacity: 0,
|
|
1635
1872
|
transform: "translateY(0vw)"
|
|
@@ -1638,21 +1875,21 @@ const sn = [
|
|
|
1638
1875
|
opacity: 1,
|
|
1639
1876
|
transform: "translateY(-96vw)"
|
|
1640
1877
|
}
|
|
1641
|
-
],
|
|
1878
|
+
], Xe = [
|
|
1642
1879
|
{
|
|
1643
1880
|
transform: "translateY(100vh)"
|
|
1644
1881
|
},
|
|
1645
1882
|
{
|
|
1646
1883
|
transform: "translateY(0vh)"
|
|
1647
1884
|
}
|
|
1648
|
-
],
|
|
1885
|
+
], Ue = [
|
|
1649
1886
|
{
|
|
1650
1887
|
transform: "translateY(0vh)"
|
|
1651
1888
|
},
|
|
1652
1889
|
{
|
|
1653
1890
|
transform: "translateY(-2vh)"
|
|
1654
1891
|
}
|
|
1655
|
-
],
|
|
1892
|
+
], Ne = [
|
|
1656
1893
|
{
|
|
1657
1894
|
transform: "scale(0.85)",
|
|
1658
1895
|
opacity: 0
|
|
@@ -1669,7 +1906,7 @@ const sn = [
|
|
|
1669
1906
|
transform: "scale(1)",
|
|
1670
1907
|
opacity: 1
|
|
1671
1908
|
}
|
|
1672
|
-
],
|
|
1909
|
+
], je = [
|
|
1673
1910
|
{
|
|
1674
1911
|
transform: "scale(1)",
|
|
1675
1912
|
opacity: 1
|
|
@@ -1686,7 +1923,7 @@ const sn = [
|
|
|
1686
1923
|
transform: "scale(1.075)",
|
|
1687
1924
|
opacity: 0
|
|
1688
1925
|
}
|
|
1689
|
-
],
|
|
1926
|
+
], He = [
|
|
1690
1927
|
{
|
|
1691
1928
|
transform: "translateY(calc(100vh * 0.8))",
|
|
1692
1929
|
opacity: 0
|
|
@@ -1696,145 +1933,142 @@ const sn = [
|
|
|
1696
1933
|
opacity: 1
|
|
1697
1934
|
}
|
|
1698
1935
|
];
|
|
1699
|
-
function
|
|
1936
|
+
function Ae(n) {
|
|
1700
1937
|
return (t) => 1 - n(1 - t);
|
|
1701
1938
|
}
|
|
1702
|
-
function
|
|
1939
|
+
function Ve(n) {
|
|
1703
1940
|
return (t) => Math.pow(t, n);
|
|
1704
1941
|
}
|
|
1705
|
-
const
|
|
1706
|
-
...
|
|
1942
|
+
const rt = {
|
|
1943
|
+
...Rt({
|
|
1707
1944
|
mass: 3,
|
|
1708
1945
|
stiffness: 1e3,
|
|
1709
1946
|
damping: 500,
|
|
1710
1947
|
velocity: 0,
|
|
1711
1948
|
steps: 200
|
|
1712
1949
|
})
|
|
1713
|
-
},
|
|
1950
|
+
}, vt = {
|
|
1714
1951
|
duration: 350,
|
|
1715
|
-
easing:
|
|
1716
|
-
},
|
|
1952
|
+
easing: z(Ae(Ve(5)))
|
|
1953
|
+
}, $e = {
|
|
1717
1954
|
duration: 150,
|
|
1718
1955
|
easing: "linear"
|
|
1719
|
-
},
|
|
1956
|
+
}, We = {
|
|
1720
1957
|
duration: 425,
|
|
1721
1958
|
easing: "cubic-bezier(0.35, 0.45, 0, 1)"
|
|
1722
|
-
},
|
|
1959
|
+
}, Ge = {
|
|
1723
1960
|
duration: 400,
|
|
1724
1961
|
easing: "cubic-bezier(0.35, 0.45, 0, 1)"
|
|
1725
|
-
},
|
|
1962
|
+
}, qe = {
|
|
1726
1963
|
duration: 250,
|
|
1727
|
-
easing:
|
|
1728
|
-
},
|
|
1964
|
+
easing: z((n) => Math.cos((n + 1) * Math.PI) / 2 + 0.5)
|
|
1965
|
+
}, ze = {
|
|
1729
1966
|
duration: 200,
|
|
1730
|
-
easing:
|
|
1967
|
+
easing: z((n) => n === 1 ? 1 : Math.pow(n, 2))
|
|
1731
1968
|
};
|
|
1732
|
-
function
|
|
1969
|
+
function En({ ref: n, direction: t, playbackRate: e, index: s }) {
|
|
1733
1970
|
let i = [
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
][
|
|
1971
|
+
Oe,
|
|
1972
|
+
Fe
|
|
1973
|
+
][s];
|
|
1737
1974
|
const o = {
|
|
1738
1975
|
playbackRate: e,
|
|
1739
1976
|
fill: "forwards",
|
|
1740
|
-
...
|
|
1977
|
+
...rt
|
|
1741
1978
|
};
|
|
1742
1979
|
return t === "reverse" && (i = i.toReversed()), new KeyframeEffect(n, i, o);
|
|
1743
1980
|
}
|
|
1744
|
-
function
|
|
1981
|
+
function Pn({ ref: n, direction: t, playbackRate: e, index: s }) {
|
|
1745
1982
|
let i = [
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
][
|
|
1983
|
+
Me,
|
|
1984
|
+
De
|
|
1985
|
+
][s];
|
|
1749
1986
|
const o = {
|
|
1750
1987
|
playbackRate: e,
|
|
1751
1988
|
fill: "forwards",
|
|
1752
|
-
...
|
|
1989
|
+
...rt
|
|
1753
1990
|
};
|
|
1754
1991
|
return t === "reverse" && (i = i.toReversed()), new KeyframeEffect(n, i, o);
|
|
1755
1992
|
}
|
|
1756
|
-
function
|
|
1757
|
-
let
|
|
1758
|
-
const
|
|
1993
|
+
function Sn({ ref: n, direction: t, playbackRate: e }) {
|
|
1994
|
+
let s = Ke;
|
|
1995
|
+
const r = {
|
|
1759
1996
|
playbackRate: e,
|
|
1760
1997
|
fill: "forwards",
|
|
1761
|
-
...
|
|
1998
|
+
...rt
|
|
1762
1999
|
};
|
|
1763
|
-
return t === "reverse" && (
|
|
2000
|
+
return t === "reverse" && (s = s.toReversed()), new KeyframeEffect(n, s, r);
|
|
1764
2001
|
}
|
|
1765
|
-
function
|
|
1766
|
-
let
|
|
1767
|
-
const
|
|
2002
|
+
function bn({ ref: n, direction: t, playbackRate: e }) {
|
|
2003
|
+
let s = Be;
|
|
2004
|
+
const r = {
|
|
1768
2005
|
playbackRate: e,
|
|
1769
2006
|
fill: "forwards",
|
|
1770
|
-
...
|
|
2007
|
+
...vt
|
|
1771
2008
|
};
|
|
1772
|
-
return t === "reverse" && (
|
|
2009
|
+
return t === "reverse" && (s = s.toReversed()), new KeyframeEffect(n, s, r);
|
|
1773
2010
|
}
|
|
1774
|
-
function
|
|
1775
|
-
let
|
|
1776
|
-
e ===
|
|
2011
|
+
function _n({ ref: n, direction: t, index: e, playbackRate: s }) {
|
|
2012
|
+
let r = He, i;
|
|
2013
|
+
e === U ? i = ze : i = qe;
|
|
1777
2014
|
const o = {
|
|
1778
|
-
playbackRate:
|
|
2015
|
+
playbackRate: s,
|
|
1779
2016
|
fill: "forwards",
|
|
1780
2017
|
...i
|
|
1781
2018
|
};
|
|
1782
|
-
return t === "reverse" && (
|
|
2019
|
+
return t === "reverse" && (r = r.toReversed()), new KeyframeEffect(n, r, o);
|
|
1783
2020
|
}
|
|
1784
|
-
function
|
|
2021
|
+
function Ln({ ref: n, direction: t, index: e, playbackRate: s }) {
|
|
1785
2022
|
const i = [
|
|
1786
|
-
|
|
1787
|
-
|
|
2023
|
+
Ue,
|
|
2024
|
+
Xe
|
|
1788
2025
|
][e], o = {
|
|
1789
2026
|
direction: t,
|
|
1790
|
-
playbackRate:
|
|
2027
|
+
playbackRate: s,
|
|
1791
2028
|
fill: "forwards",
|
|
1792
|
-
...
|
|
2029
|
+
...We
|
|
1793
2030
|
};
|
|
1794
2031
|
return new KeyframeEffect(n, i, o);
|
|
1795
2032
|
}
|
|
1796
|
-
function
|
|
1797
|
-
const
|
|
1798
|
-
|
|
1799
|
-
|
|
2033
|
+
function Tn({ ref: n, direction: t, index: e, playbackRate: s }) {
|
|
2034
|
+
const r = [
|
|
2035
|
+
Ce,
|
|
2036
|
+
Ye
|
|
1800
2037
|
];
|
|
1801
2038
|
let i;
|
|
1802
|
-
e ===
|
|
1803
|
-
let o =
|
|
2039
|
+
e === U ? i = $e : i = vt;
|
|
2040
|
+
let o = r[e];
|
|
1804
2041
|
const c = {
|
|
1805
|
-
playbackRate:
|
|
2042
|
+
playbackRate: s,
|
|
1806
2043
|
fill: "forwards",
|
|
1807
2044
|
...i
|
|
1808
2045
|
};
|
|
1809
2046
|
return t === "reverse" && (o = o.toReversed()), new KeyframeEffect(n, o, c);
|
|
1810
2047
|
}
|
|
1811
|
-
function
|
|
2048
|
+
function Rn({ ref: n, direction: t, index: e, playbackRate: s }) {
|
|
1812
2049
|
const i = [
|
|
1813
|
-
|
|
1814
|
-
|
|
2050
|
+
je,
|
|
2051
|
+
Ne
|
|
1815
2052
|
][e], o = {
|
|
1816
2053
|
direction: t,
|
|
1817
|
-
playbackRate:
|
|
2054
|
+
playbackRate: s,
|
|
1818
2055
|
fill: "forwards",
|
|
1819
|
-
|
|
2056
|
+
...Ge
|
|
1820
2057
|
};
|
|
1821
2058
|
return new KeyframeEffect(n, i, o);
|
|
1822
2059
|
}
|
|
1823
|
-
function
|
|
1824
|
-
const
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
r.current?.removeEventListener("swipestart", s);
|
|
1833
|
-
};
|
|
1834
|
-
}, [r, n]), /* @__PURE__ */ ut(
|
|
2060
|
+
function kn({ disabled: n, children: t, ...e }) {
|
|
2061
|
+
const s = q(null), r = dt((i) => {
|
|
2062
|
+
n || (i.stopPropagation(), i.preventDefault());
|
|
2063
|
+
}, [n]);
|
|
2064
|
+
return G(
|
|
2065
|
+
s,
|
|
2066
|
+
"swipestart",
|
|
2067
|
+
r
|
|
2068
|
+
), /* @__PURE__ */ ft(
|
|
1835
2069
|
"div",
|
|
1836
2070
|
{
|
|
1837
|
-
ref:
|
|
2071
|
+
ref: s,
|
|
1838
2072
|
className: "gesture-region",
|
|
1839
2073
|
"data-disabled": n,
|
|
1840
2074
|
style: { display: "contents" },
|
|
@@ -1844,59 +2078,60 @@ function Ln({ disabled: n, children: t, ...e }) {
|
|
|
1844
2078
|
);
|
|
1845
2079
|
}
|
|
1846
2080
|
export {
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
2081
|
+
on as Anchor,
|
|
2082
|
+
yn as FadeInKeyframes,
|
|
2083
|
+
wn as FadeOutKeyframes,
|
|
2084
|
+
kn as GestureRegion,
|
|
2085
|
+
ve as HistoryEntry,
|
|
2086
|
+
ge as Navigation,
|
|
2087
|
+
nn as Router,
|
|
2088
|
+
en as Screen,
|
|
2089
|
+
dn as SlideInFromBottomKeyframes,
|
|
2090
|
+
ln as SlideInFromLeftKeyframes,
|
|
2091
|
+
cn as SlideInFromRightKeyframes,
|
|
2092
|
+
vn as SlideInFromTopKeyframes,
|
|
2093
|
+
gn as SlideOutToBottomKeyframes,
|
|
2094
|
+
un as SlideOutToLeftKeyframes,
|
|
2095
|
+
hn as SlideOutToRightKeyframes,
|
|
2096
|
+
fn as SlideOutToTopKeyframes,
|
|
2097
|
+
pn as ZoomInKeyframes,
|
|
2098
|
+
mn as ZoomOutKeyframes,
|
|
2099
|
+
qe as androidBottomSheetSlideInOptions,
|
|
2100
|
+
ze as androidBottomSheetSlideOutOptions,
|
|
2101
|
+
Ue as androidConcealToBottomKeyframes,
|
|
2102
|
+
bn as androidFadeInFromBottom,
|
|
2103
|
+
Be as androidFadeInFromBottomKeyframes,
|
|
2104
|
+
vt as androidFadeInFromBottomOptions,
|
|
2105
|
+
_n as androidFadeInFromBottomSheet,
|
|
2106
|
+
He as androidFadeInFromBottomSheetKeyframes,
|
|
2107
|
+
Tn as androidFadeInFromRight,
|
|
2108
|
+
Ye as androidFadeInFromRightKeyframes,
|
|
2109
|
+
$e as androidFadeOutToBottomOptions,
|
|
2110
|
+
Ce as androidFadeOutToLeftKeyframes,
|
|
2111
|
+
Ln as androidRevealFromBottom,
|
|
2112
|
+
Xe as androidRevealFromBottomKeyframes,
|
|
2113
|
+
We as androidRevealFromBottomOptions,
|
|
2114
|
+
Rn as androidScaleFromCentre,
|
|
2115
|
+
Ne as androidScaleFromCentreKeyframes,
|
|
2116
|
+
Ge as androidScaleFromCentreOptions,
|
|
2117
|
+
je as androidScaleToCentreKeyframes,
|
|
2118
|
+
rt as iOSKeyframeOptions,
|
|
2119
|
+
Sn as iOSSlideInFromBottom,
|
|
2120
|
+
Ke as iOSSlideInFromBottomKeyframes,
|
|
2121
|
+
Pn as iOSSlideInFromLeft,
|
|
2122
|
+
De as iOSSlideInFromLeftKeyframes,
|
|
2123
|
+
En as iOSSlideInFromRight,
|
|
2124
|
+
Fe as iOSSlideInFromRightKeyframes,
|
|
2125
|
+
Oe as iOSSlideOutToLeftKeyframes,
|
|
2126
|
+
Me as iOSSlideOutToRightKeyframes,
|
|
2127
|
+
be as isHorizontalDirection,
|
|
2128
|
+
Se as isOutOfBounds,
|
|
2129
|
+
O as isRefObject,
|
|
2130
|
+
Pe as isSupportedDirection,
|
|
2131
|
+
G as useEventListener,
|
|
2132
|
+
Re as useNavigation,
|
|
2133
|
+
an as useParams,
|
|
2134
|
+
rn as useRoute,
|
|
2135
|
+
sn as useRouter
|
|
1901
2136
|
};
|
|
1902
2137
|
//# sourceMappingURL=index.js.map
|