@ssgoi/core 4.4.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +385 -412
- package/dist/presets/index.cjs +1 -1
- package/dist/presets/index.d.ts +6 -0
- package/dist/presets/index.d.ts.map +1 -1
- package/dist/presets/index.js +31 -16
- package/dist/ssgoi-transition/create-context-manager.d.ts +6 -15
- package/dist/ssgoi-transition/create-context-manager.d.ts.map +1 -1
- package/dist/ssgoi-transition/create-navigation-direction-detector.d.ts.map +1 -1
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts +1 -4
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
- package/dist/types.d.ts +15 -38
- package/dist/types.d.ts.map +1 -1
- package/dist/view-transitions/depth.d.ts.map +1 -1
- package/dist/view-transitions/drill.d.ts.map +1 -1
- package/dist/view-transitions/index.cjs +2 -2
- package/dist/view-transitions/index.js +17 -17
- package/dist/view-transitions/instagram.d.ts.map +1 -1
- package/dist/view-transitions/pinterest.d.ts.map +1 -1
- package/dist/view-transitions/sheet.d.ts.map +1 -1
- package/dist/view-transitions/slide.d.ts.map +1 -1
- package/dist/view-transitions/snap.d.ts.map +1 -1
- package/dist/view-transitions/swap.d.ts.map +1 -1
- package/package.json +22 -15
package/dist/index.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { normalizeToMultiAnimation as M, normalizeSchedule as
|
|
5
|
-
import { isCssAnimation as
|
|
6
|
-
import { S as
|
|
7
|
-
class
|
|
1
|
+
var it = Object.defineProperty;
|
|
2
|
+
var nt = (e, n, t) => n in e ? it(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
|
+
var f = (e, n, t) => nt(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
+
import { normalizeToMultiAnimation as M, normalizeSchedule as j } from "./types.js";
|
|
5
|
+
import { isCssAnimation as Yt, isMultiAnimation as Kt, isSingleAnimation as $t, isTickAnimation as Jt } from "./types.js";
|
|
6
|
+
import { S as Y, I as rt, a as ot } from "./provider-Cu4NSF1Q.js";
|
|
7
|
+
class st {
|
|
8
8
|
constructor() {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
f(this, "listeners", /* @__PURE__ */ new Set());
|
|
10
|
+
f(this, "rafId", null);
|
|
11
|
+
f(this, "isRunning", !1);
|
|
12
12
|
// Timing
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
f(this, "startTime", Date.now());
|
|
14
|
+
f(this, "lastUpdate", this.startTime);
|
|
15
|
+
f(this, "elapsed", 0);
|
|
16
16
|
// Lag smoothing (mobile optimization)
|
|
17
|
-
|
|
17
|
+
f(this, "lagThreshold", 500);
|
|
18
18
|
// ms - detect tab switches, backgrounding
|
|
19
|
-
|
|
19
|
+
f(this, "adjustedLag", 33);
|
|
20
20
|
// ms - max time jump to prevent animation skip
|
|
21
|
-
|
|
21
|
+
f(this, "maxDeltaTime", 33);
|
|
22
22
|
// ms - clamp for physics stability (30fps minimum)
|
|
23
23
|
// FPS throttling
|
|
24
|
-
|
|
24
|
+
f(this, "gap", 1e3 / 240);
|
|
25
25
|
// max 240fps
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
f(this, "nextTime", this.gap);
|
|
27
|
+
f(this, "tick", () => {
|
|
28
28
|
const n = Date.now();
|
|
29
29
|
let i = n - this.lastUpdate;
|
|
30
30
|
i > this.lagThreshold || i < 0 ? (this.startTime += i - this.adjustedLag, i = this.adjustedLag) : i > this.maxDeltaTime && (i = this.maxDeltaTime), this.lastUpdate = n;
|
|
31
31
|
const r = n - this.startTime, o = r - this.nextTime;
|
|
32
32
|
if (o > 0) {
|
|
33
|
-
const
|
|
34
|
-
this.elapsed = r / 1e3, this.nextTime += o + (o >= this.gap ? 4 : this.gap - o), this.listeners.forEach((
|
|
35
|
-
l
|
|
33
|
+
const l = i / 1e3;
|
|
34
|
+
this.elapsed = r / 1e3, this.nextTime += o + (o >= this.gap ? 4 : this.gap - o), this.listeners.forEach((u) => {
|
|
35
|
+
u(l, this.elapsed);
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
this.listeners.size > 0 ? this.rafId = requestAnimationFrame(this.tick) : (this.isRunning = !1, this.rafId = null);
|
|
@@ -68,64 +68,64 @@ class ft {
|
|
|
68
68
|
return this.elapsed;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
const
|
|
72
|
-
function
|
|
71
|
+
const q = new st();
|
|
72
|
+
function at(e) {
|
|
73
73
|
const {
|
|
74
74
|
integrator: n,
|
|
75
75
|
from: t,
|
|
76
76
|
to: i,
|
|
77
77
|
velocity: r = 0,
|
|
78
78
|
onUpdate: o,
|
|
79
|
-
onComplete:
|
|
80
|
-
onStart:
|
|
79
|
+
onComplete: l,
|
|
80
|
+
onStart: u
|
|
81
81
|
} = e;
|
|
82
|
-
let s = { position: t, velocity: r },
|
|
83
|
-
const
|
|
84
|
-
if (
|
|
85
|
-
if (
|
|
86
|
-
if (
|
|
87
|
-
s = { position: i, velocity: 0 },
|
|
82
|
+
let s = { position: t, velocity: r }, c = !0, d = 0, w = !1;
|
|
83
|
+
const b = (E) => {
|
|
84
|
+
if (c) {
|
|
85
|
+
if (w || (w = !0, u == null || u()), s = n.step(s, i, E), n.isSettled(s, i)) {
|
|
86
|
+
if (d += Math.min(E, 0.033), d >= Y) {
|
|
87
|
+
s = { position: i, velocity: 0 }, c = !1, o(s.position), q.unsubscribe(b), l();
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
90
|
} else
|
|
91
|
-
|
|
91
|
+
d = 0;
|
|
92
92
|
o(s.position);
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
-
return
|
|
95
|
+
return q.subscribe(b), {
|
|
96
96
|
stop: () => {
|
|
97
|
-
|
|
97
|
+
c && (c = !1, q.unsubscribe(b));
|
|
98
98
|
},
|
|
99
99
|
getPosition: () => s.position,
|
|
100
100
|
getVelocity: () => s.velocity,
|
|
101
|
-
isRunning: () =>
|
|
101
|
+
isRunning: () => c
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
|
-
const
|
|
105
|
-
function
|
|
106
|
-
let o = { position: n, velocity: i },
|
|
107
|
-
const
|
|
104
|
+
const O = 1e3 / 60;
|
|
105
|
+
function ct(e, n, t, i = 0) {
|
|
106
|
+
let o = { position: n, velocity: i }, l = 0;
|
|
107
|
+
const u = [];
|
|
108
108
|
for (let s = 0; s < 600; s++) {
|
|
109
|
-
const
|
|
110
|
-
if (
|
|
111
|
-
time:
|
|
109
|
+
const c = s * O;
|
|
110
|
+
if (u.push({
|
|
111
|
+
time: c,
|
|
112
112
|
position: o.position,
|
|
113
113
|
velocity: o.velocity
|
|
114
|
-
}), o = e.step(o, t,
|
|
115
|
-
if (
|
|
116
|
-
|
|
117
|
-
time: (s + 1) *
|
|
114
|
+
}), o = e.step(o, t, O / 1e3), e.isSettled(o, t)) {
|
|
115
|
+
if (l += O / 1e3, l >= Y) {
|
|
116
|
+
u.push({
|
|
117
|
+
time: (s + 1) * O,
|
|
118
118
|
position: t,
|
|
119
119
|
velocity: 0
|
|
120
120
|
});
|
|
121
121
|
break;
|
|
122
122
|
}
|
|
123
123
|
} else
|
|
124
|
-
|
|
124
|
+
l = 0;
|
|
125
125
|
}
|
|
126
|
-
return
|
|
126
|
+
return u;
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function H(e, n) {
|
|
129
129
|
if (e.length === 0)
|
|
130
130
|
return { position: 0, velocity: 0 };
|
|
131
131
|
const t = e[0], i = e[e.length - 1];
|
|
@@ -135,71 +135,71 @@ function X(e, n) {
|
|
|
135
135
|
return { position: i.position, velocity: i.velocity };
|
|
136
136
|
let r = 0, o = e.length - 1;
|
|
137
137
|
for (; r < o - 1; ) {
|
|
138
|
-
const
|
|
139
|
-
e[
|
|
138
|
+
const c = Math.floor((r + o) / 2);
|
|
139
|
+
e[c].time <= n ? r = c : o = c;
|
|
140
140
|
}
|
|
141
|
-
const
|
|
141
|
+
const l = e[r], u = e[o], s = (n - l.time) / (u.time - l.time);
|
|
142
142
|
return {
|
|
143
|
-
position:
|
|
144
|
-
velocity:
|
|
143
|
+
position: l.position + (u.position - l.position) * s,
|
|
144
|
+
velocity: l.velocity + (u.velocity - l.velocity) * s
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function lt(e, n) {
|
|
148
148
|
return e.map((t) => n(t.position));
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function ut(e) {
|
|
151
151
|
const {
|
|
152
152
|
integrator: n,
|
|
153
153
|
element: t,
|
|
154
154
|
from: i,
|
|
155
155
|
to: r,
|
|
156
156
|
velocity: o = 0,
|
|
157
|
-
style:
|
|
158
|
-
onComplete:
|
|
157
|
+
style: l,
|
|
158
|
+
onComplete: u,
|
|
159
159
|
onStart: s
|
|
160
|
-
} = e,
|
|
161
|
-
if (
|
|
162
|
-
return s == null || s(),
|
|
160
|
+
} = e, c = ct(n, i, r, o);
|
|
161
|
+
if (c.length === 0)
|
|
162
|
+
return s == null || s(), u(), {
|
|
163
163
|
stop: () => {
|
|
164
164
|
},
|
|
165
165
|
getPosition: () => r,
|
|
166
166
|
getVelocity: () => 0,
|
|
167
167
|
isRunning: () => !1
|
|
168
168
|
};
|
|
169
|
-
const
|
|
170
|
-
if (
|
|
171
|
-
for (const
|
|
172
|
-
t.style[
|
|
173
|
-
const
|
|
174
|
-
duration:
|
|
169
|
+
const d = lt(c, l), w = c[c.length - 1], b = w.time, E = d[0];
|
|
170
|
+
if (E)
|
|
171
|
+
for (const A of Object.keys(E))
|
|
172
|
+
t.style[A] = "";
|
|
173
|
+
const y = t.animate(d, {
|
|
174
|
+
duration: b,
|
|
175
175
|
fill: "forwards",
|
|
176
176
|
easing: "linear",
|
|
177
177
|
composite: "replace"
|
|
178
178
|
});
|
|
179
|
-
let
|
|
180
|
-
const
|
|
181
|
-
return s == null || s(),
|
|
182
|
-
|
|
179
|
+
let p = !0;
|
|
180
|
+
const T = performance.now();
|
|
181
|
+
return s == null || s(), y.onfinish = () => {
|
|
182
|
+
p && (p = !1, u());
|
|
183
183
|
}, {
|
|
184
184
|
stop: () => {
|
|
185
|
-
|
|
185
|
+
p && (p = !1, y.cancel());
|
|
186
186
|
},
|
|
187
187
|
getPosition: () => {
|
|
188
|
-
if (!
|
|
189
|
-
return
|
|
190
|
-
const
|
|
191
|
-
return
|
|
188
|
+
if (!p)
|
|
189
|
+
return w.position;
|
|
190
|
+
const A = performance.now() - T;
|
|
191
|
+
return H(c, A).position;
|
|
192
192
|
},
|
|
193
193
|
getVelocity: () => {
|
|
194
|
-
if (!
|
|
194
|
+
if (!p)
|
|
195
195
|
return 0;
|
|
196
|
-
const
|
|
197
|
-
return
|
|
196
|
+
const A = performance.now() - T;
|
|
197
|
+
return H(c, A).velocity;
|
|
198
198
|
},
|
|
199
|
-
isRunning: () =>
|
|
199
|
+
isRunning: () => p
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function ft(e) {
|
|
203
203
|
const { to: n, onStart: t, onComplete: i } = e;
|
|
204
204
|
return t == null || t(), i(), {
|
|
205
205
|
stop: () => {
|
|
@@ -209,7 +209,7 @@ function yt(e) {
|
|
|
209
209
|
isRunning: () => !1
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
|
-
class
|
|
212
|
+
class dt {
|
|
213
213
|
/**
|
|
214
214
|
* Get bound runner based on animation mode
|
|
215
215
|
*
|
|
@@ -221,29 +221,29 @@ class pt {
|
|
|
221
221
|
const { tick: t, css: i } = n;
|
|
222
222
|
if (t && i)
|
|
223
223
|
throw new Error("Cannot use both 'tick' and 'css' options together");
|
|
224
|
-
return i ? (r) =>
|
|
224
|
+
return i ? (r) => ut({
|
|
225
225
|
...r,
|
|
226
226
|
element: i.element,
|
|
227
227
|
style: i.style
|
|
228
|
-
}) : t ? (r) =>
|
|
228
|
+
}) : t ? (r) => at({
|
|
229
229
|
...r,
|
|
230
230
|
onUpdate: t
|
|
231
|
-
}) :
|
|
231
|
+
}) : ft;
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
class
|
|
234
|
+
class K {
|
|
235
235
|
}
|
|
236
|
-
const
|
|
237
|
-
class
|
|
236
|
+
const mt = { stiffness: 300, damping: 30 };
|
|
237
|
+
class G extends K {
|
|
238
238
|
constructor(t) {
|
|
239
239
|
super();
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
240
|
+
f(this, "options");
|
|
241
|
+
f(this, "runner");
|
|
242
|
+
f(this, "controls", null);
|
|
243
|
+
f(this, "isAnimating", !1);
|
|
244
|
+
f(this, "currentValue");
|
|
245
|
+
f(this, "currentVelocity", 0);
|
|
246
|
+
f(this, "updateFn");
|
|
247
247
|
if (this.options = {
|
|
248
248
|
from: t.from ?? 0,
|
|
249
249
|
to: t.to ?? 1,
|
|
@@ -259,14 +259,14 @@ class $ extends Z {
|
|
|
259
259
|
else if (t.css) {
|
|
260
260
|
const { element: i, style: r } = t.css;
|
|
261
261
|
this.updateFn = (o) => {
|
|
262
|
-
const
|
|
263
|
-
for (const [
|
|
264
|
-
i.style[
|
|
262
|
+
const l = r(o);
|
|
263
|
+
for (const [u, s] of Object.entries(l))
|
|
264
|
+
i.style[u] = typeof s == "number" ? String(s) : s;
|
|
265
265
|
};
|
|
266
266
|
} else
|
|
267
267
|
this.updateFn = () => {
|
|
268
268
|
};
|
|
269
|
-
this.runner =
|
|
269
|
+
this.runner = dt.from({
|
|
270
270
|
tick: t.tick,
|
|
271
271
|
css: t.css
|
|
272
272
|
});
|
|
@@ -285,10 +285,10 @@ class $ extends Z {
|
|
|
285
285
|
*/
|
|
286
286
|
createIntegrator() {
|
|
287
287
|
const t = this.options.physics;
|
|
288
|
-
return t != null && t.integrator ? t.integrator() : t != null && t.spring || t != null && t.inertia ?
|
|
288
|
+
return t != null && t.integrator ? t.integrator() : t != null && t.spring || t != null && t.inertia ? rt.from({
|
|
289
289
|
spring: t.spring,
|
|
290
290
|
inertia: t.inertia
|
|
291
|
-
}) : new
|
|
291
|
+
}) : new ot(mt);
|
|
292
292
|
}
|
|
293
293
|
runAnimation(t) {
|
|
294
294
|
this.isAnimating = !0, this.controls = this.runner({
|
|
@@ -344,20 +344,20 @@ class $ extends Z {
|
|
|
344
344
|
this.options = { ...this.options, ...t };
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
class
|
|
347
|
+
class L extends K {
|
|
348
348
|
constructor(t) {
|
|
349
349
|
super();
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
350
|
+
f(this, "config");
|
|
351
|
+
f(this, "animators", /* @__PURE__ */ new Map());
|
|
352
|
+
f(this, "itemOrder", []);
|
|
353
|
+
f(this, "completedCount", 0);
|
|
354
|
+
f(this, "completedAnimators", /* @__PURE__ */ new Set());
|
|
355
|
+
f(this, "direction", "forward");
|
|
356
|
+
f(this, "idCounter", 0);
|
|
357
|
+
f(this, "rafId", null);
|
|
358
|
+
f(this, "from");
|
|
359
|
+
f(this, "to");
|
|
360
|
+
f(this, "initialState");
|
|
361
361
|
this.config = t.config, this.from = t.from, this.to = t.to, this.initialState = t.state ?? {
|
|
362
362
|
position: t.from,
|
|
363
363
|
velocity: 0
|
|
@@ -368,7 +368,7 @@ class q extends Z {
|
|
|
368
368
|
}
|
|
369
369
|
initializeAnimators() {
|
|
370
370
|
this.config.items.forEach((t, i) => {
|
|
371
|
-
const r = this.generateId(), o = new
|
|
371
|
+
const r = this.generateId(), o = new G({
|
|
372
372
|
from: this.from,
|
|
373
373
|
to: this.to,
|
|
374
374
|
physics: t.physics,
|
|
@@ -402,9 +402,9 @@ class q extends Z {
|
|
|
402
402
|
return this.direction === "forward" ? this.itemOrder : [...this.itemOrder].reverse();
|
|
403
403
|
}
|
|
404
404
|
onAnimatorComplete(t) {
|
|
405
|
-
var r, o,
|
|
405
|
+
var r, o, l, u, s, c;
|
|
406
406
|
const i = this.animators.get(t);
|
|
407
|
-
!i || this.completedAnimators.has(t) || (this.completedAnimators.add(t), this.completedCount++, (o = (r = i.item).onComplete) == null || o.call(r), (
|
|
407
|
+
!i || this.completedAnimators.has(t) || (this.completedAnimators.add(t), this.completedCount++, (o = (r = i.item).onComplete) == null || o.call(r), (u = (l = this.config).onProgress) == null || u.call(l, this.completedCount, this.config.items.length), this.completedCount === this.config.items.length && (this.stopScheduler(), (c = (s = this.config).onEnd) == null || c.call(s)));
|
|
408
408
|
}
|
|
409
409
|
/**
|
|
410
410
|
* Check and start springs based on previous spring's progress
|
|
@@ -419,10 +419,10 @@ class q extends Z {
|
|
|
419
419
|
this.startAnimator(r);
|
|
420
420
|
continue;
|
|
421
421
|
}
|
|
422
|
-
const
|
|
423
|
-
if (!
|
|
424
|
-
const s = this.getAnimatorProgress(
|
|
425
|
-
s >=
|
|
422
|
+
const l = t[i - 1], u = this.animators.get(l);
|
|
423
|
+
if (!u || !u.started) continue;
|
|
424
|
+
const s = this.getAnimatorProgress(u), c = o.item.normalizedOffset;
|
|
425
|
+
s >= c && this.startAnimator(r);
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
428
|
startAnimator(t) {
|
|
@@ -470,7 +470,7 @@ class q extends Z {
|
|
|
470
470
|
return;
|
|
471
471
|
const i = t.animator.getCurrentState();
|
|
472
472
|
if (i.position === i.to) {
|
|
473
|
-
const o = new
|
|
473
|
+
const o = new G({
|
|
474
474
|
from: this.to,
|
|
475
475
|
to: this.from,
|
|
476
476
|
physics: t.item.physics,
|
|
@@ -537,10 +537,10 @@ class q extends Z {
|
|
|
537
537
|
* Uses first animator's state for initialization
|
|
538
538
|
*/
|
|
539
539
|
static fromState(t, i) {
|
|
540
|
-
return new
|
|
540
|
+
return new L({ ...i, state: t });
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
|
-
const
|
|
543
|
+
const $ = Symbol.for("TRANSITION_STRATEGY"), ht = (e) => ({
|
|
544
544
|
runIn: async (n) => {
|
|
545
545
|
const { currentAnimation: t } = e;
|
|
546
546
|
if (t && t.direction === "out") {
|
|
@@ -607,7 +607,7 @@ const tt = Symbol.for("TRANSITION_STRATEGY"), vt = (e) => ({
|
|
|
607
607
|
direction: "forward"
|
|
608
608
|
};
|
|
609
609
|
}
|
|
610
|
-
}),
|
|
610
|
+
}), gt = () => ({
|
|
611
611
|
runIn: async (e) => e.in ? {
|
|
612
612
|
config: await e.in,
|
|
613
613
|
state: {
|
|
@@ -644,25 +644,25 @@ const tt = Symbol.for("TRANSITION_STRATEGY"), vt = (e) => ({
|
|
|
644
644
|
to: 0,
|
|
645
645
|
direction: "forward"
|
|
646
646
|
}
|
|
647
|
-
}),
|
|
648
|
-
function
|
|
647
|
+
}), J = "data-ssgoi-scope", Q = "data-ssgoi-scope-ready";
|
|
648
|
+
function qt() {
|
|
649
649
|
return (e) => {
|
|
650
650
|
if (e)
|
|
651
|
-
return e.setAttribute(
|
|
651
|
+
return e.setAttribute(J, ""), queueMicrotask(() => {
|
|
652
652
|
queueMicrotask(() => {
|
|
653
|
-
e.setAttribute(
|
|
653
|
+
e.setAttribute(Q, "true");
|
|
654
654
|
});
|
|
655
655
|
}), () => {
|
|
656
656
|
};
|
|
657
657
|
};
|
|
658
658
|
}
|
|
659
|
-
function
|
|
660
|
-
return e.hasAttribute(
|
|
659
|
+
function yt(e) {
|
|
660
|
+
return e.hasAttribute(Q);
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
return e.closest(`[${
|
|
662
|
+
function pt(e) {
|
|
663
|
+
return e.closest(`[${J}]`);
|
|
664
664
|
}
|
|
665
|
-
const
|
|
665
|
+
const wt = (e) => {
|
|
666
666
|
let n = e.parentElement;
|
|
667
667
|
for (; n && n !== document.body; ) {
|
|
668
668
|
const t = window.getComputedStyle(n), i = t.overflow + t.overflowY + t.overflowX;
|
|
@@ -671,7 +671,7 @@ const Tt = (e) => {
|
|
|
671
671
|
n = n.parentElement;
|
|
672
672
|
}
|
|
673
673
|
return document.documentElement;
|
|
674
|
-
},
|
|
674
|
+
}, vt = (e) => {
|
|
675
675
|
let n = e.parentElement;
|
|
676
676
|
for (; n && n !== document.body; ) {
|
|
677
677
|
const t = window.getComputedStyle(n).position;
|
|
@@ -681,7 +681,7 @@ const Tt = (e) => {
|
|
|
681
681
|
}
|
|
682
682
|
return document.body;
|
|
683
683
|
};
|
|
684
|
-
function
|
|
684
|
+
function X(e) {
|
|
685
685
|
return new Promise((n) => {
|
|
686
686
|
requestAnimationFrame(() => {
|
|
687
687
|
requestAnimationFrame(() => {
|
|
@@ -690,145 +690,145 @@ function K(e) {
|
|
|
690
690
|
});
|
|
691
691
|
});
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function Z() {
|
|
694
694
|
return typeof window > "u" || typeof navigator > "u" ? !1 : /iPad|iPhone|iPod/.test(navigator.userAgent) || // iPad on iOS 13+ reports as MacIntel but has touch
|
|
695
695
|
navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function tt() {
|
|
698
698
|
return typeof window > "u" || typeof navigator > "u" ? !1 : /Android/i.test(navigator.userAgent);
|
|
699
699
|
}
|
|
700
|
-
function
|
|
701
|
-
return typeof window > "u" || typeof navigator > "u" ? !1 : !
|
|
700
|
+
function St() {
|
|
701
|
+
return typeof window > "u" || typeof navigator > "u" ? !1 : !Z() && !tt();
|
|
702
702
|
}
|
|
703
|
-
function
|
|
704
|
-
return e.length === 0 ? !1 : !!(e.includes("all") || e.includes("ios") &&
|
|
703
|
+
function At(e) {
|
|
704
|
+
return e.length === 0 ? !1 : !!(e.includes("all") || e.includes("ios") && Z() || e.includes("android") && tt() || e.includes("desktop") && St());
|
|
705
705
|
}
|
|
706
|
-
function
|
|
707
|
-
var
|
|
706
|
+
function Ct(e, n) {
|
|
707
|
+
var E;
|
|
708
708
|
let t = null, i = null, r = null, o = null;
|
|
709
|
-
const
|
|
709
|
+
const l = {
|
|
710
710
|
get currentAnimation() {
|
|
711
711
|
return t;
|
|
712
712
|
}
|
|
713
|
-
},
|
|
714
|
-
var
|
|
713
|
+
}, u = ((E = n == null ? void 0 : n.strategy) == null ? void 0 : E.call(n, l)) || ht(l), s = async (y) => {
|
|
714
|
+
var m, g;
|
|
715
715
|
i && (i.remove(), i = null);
|
|
716
|
-
const
|
|
717
|
-
if (!
|
|
716
|
+
const p = e(), T = p.in && p.in(y), A = !(n != null && n.strategy) && p.out ? p.out(y) : void 0;
|
|
717
|
+
if (!T)
|
|
718
718
|
return;
|
|
719
|
-
const
|
|
720
|
-
in: M(
|
|
721
|
-
out:
|
|
722
|
-
},
|
|
723
|
-
if (!
|
|
719
|
+
const P = {
|
|
720
|
+
in: M(T),
|
|
721
|
+
out: A ? M(A) : void 0
|
|
722
|
+
}, v = await u.runIn(P);
|
|
723
|
+
if (!v.config) {
|
|
724
724
|
t && (t.direction = "in");
|
|
725
725
|
return;
|
|
726
726
|
}
|
|
727
|
-
const
|
|
728
|
-
(
|
|
729
|
-
const
|
|
727
|
+
const h = v.config;
|
|
728
|
+
(m = h.prepare) == null || m.call(h);
|
|
729
|
+
const C = j(
|
|
730
730
|
{
|
|
731
|
-
...
|
|
731
|
+
...h,
|
|
732
732
|
onEnd: () => {
|
|
733
|
-
var
|
|
734
|
-
t = null, (
|
|
733
|
+
var S;
|
|
734
|
+
t = null, (S = h.onEnd) == null || S.call(h);
|
|
735
735
|
}
|
|
736
736
|
},
|
|
737
|
-
|
|
737
|
+
y
|
|
738
738
|
);
|
|
739
|
-
|
|
740
|
-
const
|
|
741
|
-
config:
|
|
742
|
-
from:
|
|
743
|
-
to:
|
|
739
|
+
h.wait && await h.wait();
|
|
740
|
+
const a = L.fromState(v.state, {
|
|
741
|
+
config: C,
|
|
742
|
+
from: v.from,
|
|
743
|
+
to: v.to
|
|
744
744
|
});
|
|
745
|
-
t = { controller:
|
|
746
|
-
},
|
|
747
|
-
var
|
|
748
|
-
i =
|
|
749
|
-
const
|
|
750
|
-
if (!
|
|
745
|
+
t = { controller: a, direction: "in" }, (g = h.onReady) == null || g.call(h), await X(), v.direction === "forward" ? a.forward() : a.backward();
|
|
746
|
+
}, c = async (y) => {
|
|
747
|
+
var g, S;
|
|
748
|
+
i = y;
|
|
749
|
+
const p = e(), T = !(n != null && n.strategy) && p.in ? p.in(y) : void 0, A = p.out && p.out(y);
|
|
750
|
+
if (!A)
|
|
751
751
|
return;
|
|
752
|
-
const
|
|
753
|
-
in:
|
|
754
|
-
out: M(
|
|
755
|
-
},
|
|
756
|
-
if (!
|
|
752
|
+
const P = {
|
|
753
|
+
in: T ? M(T) : void 0,
|
|
754
|
+
out: M(A)
|
|
755
|
+
}, v = await u.runOut(P);
|
|
756
|
+
if (!v.config) {
|
|
757
757
|
t && (t.direction = "out"), i && (i.remove(), i = null);
|
|
758
758
|
return;
|
|
759
759
|
}
|
|
760
|
-
const
|
|
761
|
-
|
|
762
|
-
const
|
|
760
|
+
const h = v.config;
|
|
761
|
+
m(), (g = h.prepare) == null || g.call(h);
|
|
762
|
+
const C = j(
|
|
763
763
|
{
|
|
764
|
-
...
|
|
764
|
+
...h,
|
|
765
765
|
onEnd: () => {
|
|
766
|
-
var
|
|
767
|
-
(
|
|
766
|
+
var R, V;
|
|
767
|
+
(R = h.onEnd) == null || R.call(h), i && (i.remove(), i = null), t = null, (V = n == null ? void 0 : n.onCleanupEnd) == null || V.call(n);
|
|
768
768
|
}
|
|
769
769
|
},
|
|
770
|
-
|
|
770
|
+
y
|
|
771
771
|
);
|
|
772
|
-
|
|
773
|
-
const
|
|
774
|
-
config:
|
|
775
|
-
from:
|
|
776
|
-
to:
|
|
772
|
+
h.wait && await h.wait();
|
|
773
|
+
const a = L.fromState(v.state, {
|
|
774
|
+
config: C,
|
|
775
|
+
from: v.from,
|
|
776
|
+
to: v.to
|
|
777
777
|
});
|
|
778
|
-
t = { controller:
|
|
779
|
-
function
|
|
778
|
+
t = { controller: a, direction: "out" }, (S = h.onReady) == null || S.call(h), await X(), v.direction === "forward" ? a.forward() : a.backward();
|
|
779
|
+
function m() {
|
|
780
780
|
!r || !i || (o && r.contains(o) ? r.insertBefore(i, o) : r.appendChild(i));
|
|
781
781
|
}
|
|
782
782
|
};
|
|
783
|
-
let
|
|
784
|
-
const
|
|
785
|
-
if (
|
|
786
|
-
|
|
787
|
-
const
|
|
788
|
-
|
|
789
|
-
document.contains(
|
|
790
|
-
}) :
|
|
783
|
+
let d = null, w = !1;
|
|
784
|
+
const b = (y) => () => {
|
|
785
|
+
if (w) return;
|
|
786
|
+
w = !0;
|
|
787
|
+
const p = y.cloneNode(!0);
|
|
788
|
+
d ? queueMicrotask(() => {
|
|
789
|
+
document.contains(d) && c(p);
|
|
790
|
+
}) : c(p);
|
|
791
791
|
};
|
|
792
|
-
return (
|
|
793
|
-
if (
|
|
792
|
+
return (y) => {
|
|
793
|
+
if (y)
|
|
794
794
|
return requestAnimationFrame(() => {
|
|
795
|
-
r =
|
|
796
|
-
}),
|
|
797
|
-
|
|
798
|
-
}) : s(
|
|
795
|
+
r = y.parentElement, o = y.nextElementSibling;
|
|
796
|
+
}), w = !1, (n == null ? void 0 : n.scope) === "local" ? queueMicrotask(() => {
|
|
797
|
+
d = pt(y), !(d && !yt(d)) && s(y);
|
|
798
|
+
}) : s(y), b(y);
|
|
799
799
|
};
|
|
800
800
|
}
|
|
801
|
-
const
|
|
802
|
-
let
|
|
803
|
-
function
|
|
804
|
-
if (e instanceof HTMLElement &&
|
|
805
|
-
const t =
|
|
806
|
-
|
|
801
|
+
const I = /* @__PURE__ */ new Map();
|
|
802
|
+
let k = null, N = !1;
|
|
803
|
+
function et(e) {
|
|
804
|
+
if (e instanceof HTMLElement && I.has(e)) {
|
|
805
|
+
const t = I.get(e);
|
|
806
|
+
I.delete(e), queueMicrotask(() => {
|
|
807
807
|
t();
|
|
808
808
|
});
|
|
809
809
|
}
|
|
810
810
|
const n = e.childNodes;
|
|
811
811
|
for (let t = 0; t < n.length; t++) {
|
|
812
812
|
const i = n[t];
|
|
813
|
-
i &&
|
|
813
|
+
i && et(i);
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
|
-
function
|
|
817
|
-
|
|
816
|
+
function bt() {
|
|
817
|
+
N || typeof document > "u" || (N = !0, k = new MutationObserver((e) => {
|
|
818
818
|
for (const n of e) {
|
|
819
819
|
const t = n.removedNodes;
|
|
820
820
|
for (let i = 0; i < t.length; i++) {
|
|
821
821
|
const r = t[i];
|
|
822
|
-
r &&
|
|
822
|
+
r && et(r);
|
|
823
823
|
}
|
|
824
824
|
}
|
|
825
|
-
}), document.body ?
|
|
825
|
+
}), document.body ? k.observe(document.body, {
|
|
826
826
|
childList: !0,
|
|
827
827
|
subtree: !0
|
|
828
828
|
}) : document.addEventListener(
|
|
829
829
|
"DOMContentLoaded",
|
|
830
830
|
() => {
|
|
831
|
-
|
|
831
|
+
k == null || k.observe(document.body, {
|
|
832
832
|
childList: !0,
|
|
833
833
|
subtree: !0
|
|
834
834
|
});
|
|
@@ -836,69 +836,69 @@ function Rt() {
|
|
|
836
836
|
{ once: !0 }
|
|
837
837
|
));
|
|
838
838
|
}
|
|
839
|
-
function
|
|
840
|
-
|
|
839
|
+
function Et(e, n) {
|
|
840
|
+
bt(), I.set(e, n);
|
|
841
841
|
}
|
|
842
|
-
function
|
|
843
|
-
return
|
|
842
|
+
function Nt(e) {
|
|
843
|
+
return I.has(e);
|
|
844
844
|
}
|
|
845
|
-
function
|
|
846
|
-
return
|
|
845
|
+
function Bt() {
|
|
846
|
+
return I.size;
|
|
847
847
|
}
|
|
848
|
-
function
|
|
849
|
-
const n =
|
|
850
|
-
return n ? (
|
|
848
|
+
function Ut(e) {
|
|
849
|
+
const n = I.get(e);
|
|
850
|
+
return n ? (I.delete(e), n(), !0) : !1;
|
|
851
851
|
}
|
|
852
852
|
function Wt() {
|
|
853
|
-
|
|
853
|
+
I.clear(), k == null || k.disconnect(), k = null, N = !1;
|
|
854
854
|
}
|
|
855
|
-
const
|
|
856
|
-
function
|
|
857
|
-
|
|
858
|
-
let i =
|
|
855
|
+
const z = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map(), U = /* @__PURE__ */ new Map();
|
|
856
|
+
function Tt(e, n, t) {
|
|
857
|
+
z.set(e, n);
|
|
858
|
+
let i = B.get(e);
|
|
859
859
|
if (i)
|
|
860
860
|
return i;
|
|
861
861
|
const r = n;
|
|
862
|
-
return i =
|
|
862
|
+
return i = Ct(
|
|
863
863
|
() => {
|
|
864
|
-
const o =
|
|
864
|
+
const o = z.get(e);
|
|
865
865
|
return o || (console.warn(`Transition "${String(e)}" not found`), {});
|
|
866
866
|
},
|
|
867
867
|
{
|
|
868
868
|
strategy: t == null ? void 0 : t.strategy,
|
|
869
869
|
scope: t == null ? void 0 : t.scope,
|
|
870
870
|
onCleanupEnd: () => {
|
|
871
|
-
|
|
871
|
+
z.get(e) === r && kt(e);
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
|
-
),
|
|
874
|
+
), B.set(e, i), i;
|
|
875
875
|
}
|
|
876
|
-
function
|
|
877
|
-
|
|
876
|
+
function kt(e) {
|
|
877
|
+
z.delete(e), B.delete(e), U.delete(e);
|
|
878
878
|
}
|
|
879
|
-
function
|
|
880
|
-
const t =
|
|
879
|
+
function jt(e, n = "manual") {
|
|
880
|
+
const t = Tt(
|
|
881
881
|
e.key,
|
|
882
882
|
{
|
|
883
883
|
in: e.in,
|
|
884
884
|
out: e.out
|
|
885
885
|
},
|
|
886
886
|
{
|
|
887
|
-
strategy: e[
|
|
887
|
+
strategy: e[$],
|
|
888
888
|
scope: e.scope
|
|
889
889
|
}
|
|
890
890
|
);
|
|
891
891
|
if (n === "manual")
|
|
892
892
|
return t;
|
|
893
|
-
let i =
|
|
893
|
+
let i = U.get(e.key);
|
|
894
894
|
return i || (i = (r) => {
|
|
895
895
|
if (r) {
|
|
896
896
|
const o = t(r);
|
|
897
|
-
o &&
|
|
897
|
+
o && Et(r, o);
|
|
898
898
|
}
|
|
899
|
-
},
|
|
899
|
+
}, U.set(e.key, i), i);
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function It(e) {
|
|
902
902
|
const n = e.filter((t) => t.symmetric).map((t) => ({
|
|
903
903
|
from: t.to,
|
|
904
904
|
to: t.from,
|
|
@@ -906,29 +906,31 @@ function Ft(e) {
|
|
|
906
906
|
}));
|
|
907
907
|
return [...e, ...n];
|
|
908
908
|
}
|
|
909
|
-
function
|
|
910
|
-
var
|
|
911
|
-
let e = typeof history < "u" ? ((
|
|
912
|
-
const
|
|
913
|
-
var
|
|
909
|
+
function Pt() {
|
|
910
|
+
var s;
|
|
911
|
+
let e = typeof history < "u" ? ((s = history.state) == null ? void 0 : s.ssgoiIndex) ?? 0 : 0, n = "push", t = !1, i = !1;
|
|
912
|
+
const r = (c) => {
|
|
913
|
+
var w;
|
|
914
914
|
t = !0;
|
|
915
|
-
const
|
|
916
|
-
|
|
915
|
+
const d = ((w = c.state) == null ? void 0 : w.ssgoiIndex) ?? 0;
|
|
916
|
+
d < e ? (n = "back", i = !0) : d > e && (n = "forward"), e = d;
|
|
917
917
|
};
|
|
918
918
|
return {
|
|
919
919
|
initialize: () => {
|
|
920
|
-
var
|
|
921
|
-
typeof window > "u" || (window.addEventListener("popstate",
|
|
920
|
+
var c;
|
|
921
|
+
typeof window > "u" || (window.addEventListener("popstate", r), ((c = history.state) == null ? void 0 : c.ssgoiIndex) == null ? history.replaceState({ ...history.state, ssgoiIndex: e }, "") : e = history.state.ssgoiIndex);
|
|
922
922
|
},
|
|
923
923
|
onPageEnter: () => {
|
|
924
924
|
t || (e++, history.replaceState({ ...history.state, ssgoiIndex: e }, ""));
|
|
925
|
-
const
|
|
926
|
-
return n = "push", t = !1,
|
|
925
|
+
const c = n;
|
|
926
|
+
return n = "push", t = !1, setTimeout(() => {
|
|
927
|
+
i = !1;
|
|
928
|
+
}, 0), c;
|
|
927
929
|
},
|
|
928
|
-
isBack: () => n === "back"
|
|
930
|
+
isBack: () => i || n === "back"
|
|
929
931
|
};
|
|
930
932
|
}
|
|
931
|
-
function
|
|
933
|
+
function x(e, n) {
|
|
932
934
|
if (n === "*")
|
|
933
935
|
return !0;
|
|
934
936
|
if (n.endsWith("/*")) {
|
|
@@ -937,76 +939,79 @@ function F(e, n) {
|
|
|
937
939
|
}
|
|
938
940
|
return e === n;
|
|
939
941
|
}
|
|
940
|
-
function
|
|
942
|
+
function Rt(e, n, t) {
|
|
941
943
|
for (const i of t)
|
|
942
|
-
if (
|
|
944
|
+
if (x(e, i.from) && x(n, i.to))
|
|
943
945
|
return i.transition;
|
|
944
946
|
for (const i of t)
|
|
945
|
-
if ((i.from === "*" ||
|
|
947
|
+
if ((i.from === "*" || x(e, i.from)) && (i.to === "*" || x(n, i.to)))
|
|
946
948
|
return i.transition;
|
|
947
949
|
return null;
|
|
948
950
|
}
|
|
951
|
+
const xt = 768, Vt = 10, Ft = 10;
|
|
949
952
|
function Mt(e = {}) {
|
|
950
|
-
const { preserveScroll: n =
|
|
951
|
-
let
|
|
952
|
-
const
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
953
|
+
const { preserveScroll: n = (a) => a } = e, t = typeof n == "function" ? n : () => n;
|
|
954
|
+
let i = null, r = !1, o = !1;
|
|
955
|
+
const l = () => {
|
|
956
|
+
const a = (i == null ? void 0 : i.clientWidth) ?? 0, m = a > 0 ? a : typeof window < "u" ? window.innerWidth : 0;
|
|
957
|
+
return m > 0 && m < xt;
|
|
958
|
+
}, u = () => (o || (r = l(), o = !0), r), s = (a) => {
|
|
959
|
+
const m = t(u());
|
|
960
|
+
return m === !1 ? !1 : m === !0 ? !0 : !m.exclude.some((g) => x(a, g));
|
|
961
|
+
};
|
|
962
|
+
let c = null;
|
|
963
|
+
const d = /* @__PURE__ */ new Map();
|
|
964
|
+
let w = null, b = !1, E = 0;
|
|
965
|
+
const y = () => {
|
|
966
|
+
i && w && !b && d.set(w, {
|
|
967
|
+
x: i.scrollLeft,
|
|
968
|
+
y: i.scrollTop
|
|
958
969
|
});
|
|
959
|
-
}, p = (
|
|
960
|
-
if (!
|
|
961
|
-
|
|
962
|
-
r.scrollTo({ top: 0, left: 0 });
|
|
963
|
-
return;
|
|
964
|
-
}
|
|
965
|
-
const f = a.get(m);
|
|
966
|
-
if (!f) {
|
|
967
|
-
r.scrollTo({ top: 0, left: 0 });
|
|
968
|
-
return;
|
|
969
|
-
}
|
|
970
|
-
const A = 10;
|
|
970
|
+
}, p = (a) => {
|
|
971
|
+
if (!i) return;
|
|
972
|
+
const m = s(a) && d.has(a) ? d.get(a) : { x: 0, y: 0 };
|
|
971
973
|
let g = 0;
|
|
972
|
-
const
|
|
973
|
-
if (!
|
|
974
|
-
|
|
975
|
-
top:
|
|
976
|
-
left:
|
|
977
|
-
});
|
|
978
|
-
const E = r.scrollTop, b = r.scrollLeft;
|
|
979
|
-
!(Math.abs(E - f.y) < 1 && Math.abs(b - f.x) < 1) && g < A && (g++, requestAnimationFrame(c));
|
|
974
|
+
const S = () => {
|
|
975
|
+
if (!i) return;
|
|
976
|
+
i.scrollTo({
|
|
977
|
+
top: m.y,
|
|
978
|
+
left: m.x
|
|
979
|
+
}), !(Math.abs(i.scrollTop - m.y) < 1 && Math.abs(i.scrollLeft - m.x) < 1) && g < Vt && (g++, requestAnimationFrame(S));
|
|
980
980
|
};
|
|
981
|
-
requestAnimationFrame(
|
|
981
|
+
requestAnimationFrame(S);
|
|
982
982
|
};
|
|
983
983
|
return {
|
|
984
|
-
initializeContext: (
|
|
985
|
-
|
|
984
|
+
initializeContext: (a, m) => {
|
|
985
|
+
b = !0;
|
|
986
|
+
const g = ++E;
|
|
987
|
+
c = a, i || (i = wt(a), r = l(), o = !0, typeof ResizeObserver < "u" && new ResizeObserver(() => {
|
|
988
|
+
r = l();
|
|
989
|
+
}).observe(i), (i === document.documentElement ? window : i).addEventListener("scroll", y, {
|
|
986
990
|
passive: !0
|
|
987
|
-
})),
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
g++, g >= A ? s = !1 : requestAnimationFrame(c);
|
|
991
|
+
})), w = m, p(m);
|
|
992
|
+
let S = 0;
|
|
993
|
+
const R = () => {
|
|
994
|
+
g === E && (S++, S >= Ft ? b = !1 : requestAnimationFrame(R));
|
|
992
995
|
};
|
|
993
|
-
requestAnimationFrame(
|
|
996
|
+
requestAnimationFrame(R);
|
|
994
997
|
},
|
|
995
|
-
calculateScrollOffset: (
|
|
996
|
-
const
|
|
997
|
-
g && a.set(f, { x: 0, y: 0 });
|
|
998
|
-
const c = g ? { x: 0, y: 0 } : f && a.has(f) ? a.get(f) : { x: 0, y: 0 };
|
|
998
|
+
calculateScrollOffset: (a, m) => {
|
|
999
|
+
const g = a && d.has(a) ? d.get(a) : { x: 0, y: 0 }, S = m && s(m) && d.has(m) ? d.get(m) : { x: 0, y: 0 };
|
|
999
1000
|
return {
|
|
1000
|
-
x: -
|
|
1001
|
-
y: -
|
|
1001
|
+
x: -S.x + g.x,
|
|
1002
|
+
y: -S.y + g.y
|
|
1002
1003
|
};
|
|
1003
1004
|
},
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1005
|
+
evictScrollPosition: (a) => {
|
|
1006
|
+
d.delete(a);
|
|
1007
|
+
},
|
|
1008
|
+
shouldPreserve: s,
|
|
1009
|
+
getScrollContainer: () => i,
|
|
1010
|
+
getPositionedParentElement: () => c ? vt(c) : document.body,
|
|
1011
|
+
getScrollPosition: (a) => a && d.has(a) ? d.get(a) : { x: 0, y: 0 }
|
|
1007
1012
|
};
|
|
1008
1013
|
}
|
|
1009
|
-
function
|
|
1014
|
+
function Ot() {
|
|
1010
1015
|
let e = null;
|
|
1011
1016
|
function n() {
|
|
1012
1017
|
if (e != null && e.from && (e != null && e.to) && (e != null && e.outResolve) && (e != null && e.inResolve)) {
|
|
@@ -1025,7 +1030,7 @@ function zt() {
|
|
|
1025
1030
|
}
|
|
1026
1031
|
};
|
|
1027
1032
|
}
|
|
1028
|
-
function
|
|
1033
|
+
function zt() {
|
|
1029
1034
|
let e = null;
|
|
1030
1035
|
function n() {
|
|
1031
1036
|
var i, r;
|
|
@@ -1052,133 +1057,101 @@ function Lt() {
|
|
|
1052
1057
|
}
|
|
1053
1058
|
};
|
|
1054
1059
|
}
|
|
1055
|
-
function
|
|
1060
|
+
function Ht(e, n) {
|
|
1056
1061
|
const {
|
|
1057
1062
|
transitions: t = [],
|
|
1058
1063
|
defaultTransition: i,
|
|
1059
|
-
middleware: r = (
|
|
1064
|
+
middleware: r = (C, a) => ({ from: C, to: a }),
|
|
1060
1065
|
// Identity function as default
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
const p = Et(a ?? (o === !1 ? [] : ["ios"])), { outFirst: C = !0, createNavigationDetector: S } = n || {}, T = (S == null ? void 0 : S()) ?? (C ? zt() : Lt()), h = Ft(t), {
|
|
1072
|
-
initializeContext: y,
|
|
1073
|
-
calculateScrollOffset: m,
|
|
1074
|
-
getScrollContainer: f,
|
|
1075
|
-
getPositionedParentElement: A,
|
|
1076
|
-
getScrollPosition: g
|
|
1066
|
+
skipAnimationOnBack: o = ["ios"],
|
|
1067
|
+
preserveScroll: l = (C) => C
|
|
1068
|
+
} = e, u = At(o), { outFirst: s = !0 } = n || {}, c = s ? Ot() : zt(), d = It(t), {
|
|
1069
|
+
initializeContext: w,
|
|
1070
|
+
calculateScrollOffset: b,
|
|
1071
|
+
evictScrollPosition: E,
|
|
1072
|
+
shouldPreserve: y,
|
|
1073
|
+
getScrollContainer: p,
|
|
1074
|
+
getPositionedParentElement: T,
|
|
1075
|
+
getScrollPosition: A
|
|
1077
1076
|
} = Mt({
|
|
1078
|
-
preserveScroll: l
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
if (
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
});
|
|
1096
|
-
}
|
|
1097
|
-
const { from: W, to: st } = r(
|
|
1098
|
-
k.from,
|
|
1099
|
-
k.to
|
|
1100
|
-
), D = J(
|
|
1101
|
-
W,
|
|
1102
|
-
st,
|
|
1103
|
-
h
|
|
1077
|
+
preserveScroll: l
|
|
1078
|
+
}), P = Pt();
|
|
1079
|
+
u && P.initialize();
|
|
1080
|
+
const v = async (C, a) => {
|
|
1081
|
+
const m = u && P.isBack();
|
|
1082
|
+
c.trigger(C, a);
|
|
1083
|
+
const g = await c.get(a);
|
|
1084
|
+
if (!g) return () => ({});
|
|
1085
|
+
if (a === "in" && u && P.onPageEnter(), m)
|
|
1086
|
+
return () => ({});
|
|
1087
|
+
const { from: S, to: R } = r(
|
|
1088
|
+
g.from,
|
|
1089
|
+
g.to
|
|
1090
|
+
), F = Rt(
|
|
1091
|
+
S,
|
|
1092
|
+
R,
|
|
1093
|
+
d
|
|
1104
1094
|
) || i;
|
|
1105
|
-
if (!
|
|
1106
|
-
const
|
|
1107
|
-
if (
|
|
1108
|
-
const
|
|
1109
|
-
scrollOffset:
|
|
1110
|
-
scroll: g
|
|
1095
|
+
if (!F) return () => ({});
|
|
1096
|
+
const W = b(g.from, g.to);
|
|
1097
|
+
if (a === "out") {
|
|
1098
|
+
const D = {
|
|
1099
|
+
scrollOffset: W,
|
|
1100
|
+
scroll: A(g.from),
|
|
1111
1101
|
get scrollingElement() {
|
|
1112
|
-
return
|
|
1102
|
+
return p() || document.documentElement;
|
|
1113
1103
|
},
|
|
1114
1104
|
get positionedParent() {
|
|
1115
|
-
return
|
|
1105
|
+
return T();
|
|
1116
1106
|
}
|
|
1117
1107
|
};
|
|
1118
|
-
return (
|
|
1108
|
+
return g.from && !y(g.from) && E(g.from), (_) => F.out(_, D);
|
|
1119
1109
|
} else {
|
|
1120
|
-
const
|
|
1121
|
-
scrollOffset:
|
|
1110
|
+
const D = {
|
|
1111
|
+
scrollOffset: W,
|
|
1122
1112
|
get scroll() {
|
|
1123
|
-
return g
|
|
1113
|
+
return A(g.to);
|
|
1124
1114
|
},
|
|
1125
1115
|
get scrollingElement() {
|
|
1126
|
-
return
|
|
1116
|
+
return p() || document.documentElement;
|
|
1127
1117
|
},
|
|
1128
1118
|
get positionedParent() {
|
|
1129
|
-
return
|
|
1119
|
+
return T();
|
|
1130
1120
|
}
|
|
1131
1121
|
};
|
|
1132
|
-
return
|
|
1133
|
-
const N = await Promise.resolve(D.in(O, V)), _ = N.onReady;
|
|
1134
|
-
return N.onReady = () => {
|
|
1135
|
-
O.style.visibility = "visible", _ == null || _();
|
|
1136
|
-
}, N;
|
|
1137
|
-
};
|
|
1122
|
+
return (_) => F.in(_, D);
|
|
1138
1123
|
}
|
|
1139
|
-
}, b = (v) => ({
|
|
1140
|
-
key: v,
|
|
1141
|
-
in: async (w) => (y(w, v), (await E(v, "in"))(w)),
|
|
1142
|
-
out: async (w) => (await E(v, "out"))(w),
|
|
1143
|
-
// Add page transition strategy for page-level transitions
|
|
1144
|
-
[tt]: St
|
|
1145
|
-
}), x = (v, w) => {
|
|
1146
|
-
if (p && c.isBack())
|
|
1147
|
-
return !1;
|
|
1148
|
-
const { from: I, to: k } = r(v, w);
|
|
1149
|
-
return !!(J(
|
|
1150
|
-
I,
|
|
1151
|
-
k,
|
|
1152
|
-
h
|
|
1153
|
-
) || i);
|
|
1154
1124
|
};
|
|
1155
|
-
return
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1125
|
+
return (C) => ({
|
|
1126
|
+
key: C,
|
|
1127
|
+
in: async (a) => (w(a, C), (await v(C, "in"))(a)),
|
|
1128
|
+
out: async (a) => (await v(C, "out"))(a),
|
|
1129
|
+
// Add page transition strategy for page-level transitions
|
|
1130
|
+
[$]: gt
|
|
1131
|
+
});
|
|
1159
1132
|
}
|
|
1160
1133
|
export {
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1134
|
+
J as SCOPE_ATTR,
|
|
1135
|
+
Q as SCOPE_READY_ATTR,
|
|
1136
|
+
$ as TRANSITION_STRATEGY,
|
|
1137
|
+
zt as createAnyOrderDetector,
|
|
1138
|
+
ht as createDefaultStrategy,
|
|
1139
|
+
Ot as createOutFirstDetector,
|
|
1140
|
+
gt as createPageTransitionStrategy,
|
|
1141
|
+
Ht as createSggoiTransitionContext,
|
|
1142
|
+
qt as createTransitionScope,
|
|
1143
|
+
pt as findScope,
|
|
1144
|
+
Bt as getWatchedCount,
|
|
1145
|
+
Yt as isCssAnimation,
|
|
1146
|
+
Kt as isMultiAnimation,
|
|
1147
|
+
yt as isScopeReady,
|
|
1148
|
+
$t as isSingleAnimation,
|
|
1149
|
+
Jt as isTickAnimation,
|
|
1150
|
+
Nt as isWatched,
|
|
1151
|
+
j as normalizeSchedule,
|
|
1179
1152
|
M as normalizeToMultiAnimation,
|
|
1180
1153
|
Wt as resetObserver,
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1154
|
+
jt as transition,
|
|
1155
|
+
Ut as triggerUnmount,
|
|
1156
|
+
Et as watchUnmount
|
|
1184
1157
|
};
|