@ssgoi/core 4.3.1 → 4.4.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 +395 -356
- package/dist/ssgoi-transition/create-context-manager.d.ts +16 -1
- package/dist/ssgoi-transition/create-context-manager.d.ts.map +1 -1
- package/dist/ssgoi-transition/find-matching-transition.d.ts.map +1 -1
- package/dist/types.d.ts +23 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
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 d = (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 Xt, isMultiAnimation as Yt, isSingleAnimation as Ht, isTickAnimation as jt } from "./types.js";
|
|
6
|
+
import { S as B, I as rt, a as ot } from "./provider-Cu4NSF1Q.js";
|
|
7
|
+
class st {
|
|
8
8
|
constructor() {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
d(this, "listeners", /* @__PURE__ */ new Set());
|
|
10
|
+
d(this, "rafId", null);
|
|
11
|
+
d(this, "isRunning", !1);
|
|
12
12
|
// Timing
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
d(this, "startTime", Date.now());
|
|
14
|
+
d(this, "lastUpdate", this.startTime);
|
|
15
|
+
d(this, "elapsed", 0);
|
|
16
16
|
// Lag smoothing (mobile optimization)
|
|
17
|
-
|
|
17
|
+
d(this, "lagThreshold", 500);
|
|
18
18
|
// ms - detect tab switches, backgrounding
|
|
19
|
-
|
|
19
|
+
d(this, "adjustedLag", 33);
|
|
20
20
|
// ms - max time jump to prevent animation skip
|
|
21
|
-
|
|
21
|
+
d(this, "maxDeltaTime", 33);
|
|
22
22
|
// ms - clamp for physics stability (30fps minimum)
|
|
23
23
|
// FPS throttling
|
|
24
|
-
|
|
24
|
+
d(this, "gap", 1e3 / 240);
|
|
25
25
|
// max 240fps
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
d(this, "nextTime", this.gap);
|
|
27
|
+
d(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
|
|
33
|
+
const s = i / 1e3;
|
|
34
34
|
this.elapsed = r / 1e3, this.nextTime += o + (o >= this.gap ? 4 : this.gap - o), this.listeners.forEach((c) => {
|
|
35
|
-
c(
|
|
35
|
+
c(s, 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 rt {
|
|
|
68
68
|
return this.elapsed;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
const
|
|
72
|
-
function
|
|
71
|
+
const N = 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:
|
|
79
|
+
onComplete: s,
|
|
80
80
|
onStart: c
|
|
81
81
|
} = e;
|
|
82
|
-
let
|
|
83
|
-
const
|
|
82
|
+
let a = { position: t, velocity: r }, f = !0, y = 0, C = !1;
|
|
83
|
+
const A = (E) => {
|
|
84
84
|
if (f) {
|
|
85
|
-
if (
|
|
86
|
-
if (
|
|
87
|
-
|
|
85
|
+
if (C || (C = !0, c == null || c()), a = n.step(a, i, E), n.isSettled(a, i)) {
|
|
86
|
+
if (y += Math.min(E, 0.033), y >= B) {
|
|
87
|
+
a = { position: i, velocity: 0 }, f = !1, o(a.position), N.unsubscribe(A), s();
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
90
|
} else
|
|
91
|
-
|
|
92
|
-
o(
|
|
91
|
+
y = 0;
|
|
92
|
+
o(a.position);
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
-
return
|
|
95
|
+
return N.subscribe(A), {
|
|
96
96
|
stop: () => {
|
|
97
|
-
f && (f = !1,
|
|
97
|
+
f && (f = !1, N.unsubscribe(A));
|
|
98
98
|
},
|
|
99
|
-
getPosition: () =>
|
|
100
|
-
getVelocity: () =>
|
|
99
|
+
getPosition: () => a.position,
|
|
100
|
+
getVelocity: () => a.velocity,
|
|
101
101
|
isRunning: () => f
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
|
-
const
|
|
105
|
-
function
|
|
106
|
-
let o = { position: n, velocity: i },
|
|
104
|
+
const O = 1e3 / 60;
|
|
105
|
+
function ct(e, n, t, i = 0) {
|
|
106
|
+
let o = { position: n, velocity: i }, s = 0;
|
|
107
107
|
const c = [];
|
|
108
|
-
for (let
|
|
109
|
-
const f =
|
|
108
|
+
for (let a = 0; a < 600; a++) {
|
|
109
|
+
const f = a * O;
|
|
110
110
|
if (c.push({
|
|
111
111
|
time: f,
|
|
112
112
|
position: o.position,
|
|
113
113
|
velocity: o.velocity
|
|
114
|
-
}), o = e.step(o, t,
|
|
115
|
-
if (
|
|
114
|
+
}), o = e.step(o, t, O / 1e3), e.isSettled(o, t)) {
|
|
115
|
+
if (s += O / 1e3, s >= B) {
|
|
116
116
|
c.push({
|
|
117
|
-
time: (
|
|
117
|
+
time: (a + 1) * O,
|
|
118
118
|
position: t,
|
|
119
119
|
velocity: 0
|
|
120
120
|
});
|
|
121
121
|
break;
|
|
122
122
|
}
|
|
123
123
|
} else
|
|
124
|
-
|
|
124
|
+
s = 0;
|
|
125
125
|
}
|
|
126
126
|
return c;
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function W(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];
|
|
@@ -138,68 +138,68 @@ function Y(e, n) {
|
|
|
138
138
|
const f = Math.floor((r + o) / 2);
|
|
139
139
|
e[f].time <= n ? r = f : o = f;
|
|
140
140
|
}
|
|
141
|
-
const
|
|
141
|
+
const s = e[r], c = e[o], a = (n - s.time) / (c.time - s.time);
|
|
142
142
|
return {
|
|
143
|
-
position:
|
|
144
|
-
velocity:
|
|
143
|
+
position: s.position + (c.position - s.position) * a,
|
|
144
|
+
velocity: s.velocity + (c.velocity - s.velocity) * a
|
|
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:
|
|
157
|
+
style: s,
|
|
158
158
|
onComplete: c,
|
|
159
|
-
onStart:
|
|
160
|
-
} = e, f =
|
|
159
|
+
onStart: a
|
|
160
|
+
} = e, f = ct(n, i, r, o);
|
|
161
161
|
if (f.length === 0)
|
|
162
|
-
return
|
|
162
|
+
return a == null || a(), c(), {
|
|
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 y = lt(f, s), C = f[f.length - 1], A = C.time, E = y[0];
|
|
170
|
+
if (E)
|
|
171
|
+
for (const l of Object.keys(E))
|
|
172
|
+
t.style[l] = "";
|
|
173
|
+
const g = t.animate(y, {
|
|
174
|
+
duration: A,
|
|
175
175
|
fill: "forwards",
|
|
176
176
|
easing: "linear",
|
|
177
177
|
composite: "replace"
|
|
178
178
|
});
|
|
179
|
-
let
|
|
180
|
-
const
|
|
181
|
-
return
|
|
182
|
-
|
|
179
|
+
let m = !0;
|
|
180
|
+
const h = performance.now();
|
|
181
|
+
return a == null || a(), g.onfinish = () => {
|
|
182
|
+
m && (m = !1, c());
|
|
183
183
|
}, {
|
|
184
184
|
stop: () => {
|
|
185
|
-
|
|
185
|
+
m && (m = !1, g.cancel());
|
|
186
186
|
},
|
|
187
187
|
getPosition: () => {
|
|
188
|
-
if (!
|
|
189
|
-
return
|
|
190
|
-
const
|
|
191
|
-
return
|
|
188
|
+
if (!m)
|
|
189
|
+
return C.position;
|
|
190
|
+
const l = performance.now() - h;
|
|
191
|
+
return W(f, l).position;
|
|
192
192
|
},
|
|
193
193
|
getVelocity: () => {
|
|
194
|
-
if (!
|
|
194
|
+
if (!m)
|
|
195
195
|
return 0;
|
|
196
|
-
const
|
|
197
|
-
return
|
|
196
|
+
const l = performance.now() - h;
|
|
197
|
+
return W(f, l).velocity;
|
|
198
198
|
},
|
|
199
|
-
isRunning: () =>
|
|
199
|
+
isRunning: () => m
|
|
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 lt(e) {
|
|
|
209
209
|
isRunning: () => !1
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
|
-
class
|
|
212
|
+
class mt {
|
|
213
213
|
/**
|
|
214
214
|
* Get bound runner based on animation mode
|
|
215
215
|
*
|
|
@@ -221,29 +221,29 @@ class ut {
|
|
|
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 J {
|
|
235
235
|
}
|
|
236
|
-
const
|
|
237
|
-
class
|
|
236
|
+
const dt = { stiffness: 300, damping: 30 };
|
|
237
|
+
class G extends J {
|
|
238
238
|
constructor(t) {
|
|
239
239
|
super();
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
240
|
+
d(this, "options");
|
|
241
|
+
d(this, "runner");
|
|
242
|
+
d(this, "controls", null);
|
|
243
|
+
d(this, "isAnimating", !1);
|
|
244
|
+
d(this, "currentValue");
|
|
245
|
+
d(this, "currentVelocity", 0);
|
|
246
|
+
d(this, "updateFn");
|
|
247
247
|
if (this.options = {
|
|
248
248
|
from: t.from ?? 0,
|
|
249
249
|
to: t.to ?? 1,
|
|
@@ -259,14 +259,14 @@ class j extends K {
|
|
|
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 [c,
|
|
264
|
-
i.style[c] = typeof
|
|
262
|
+
const s = r(o);
|
|
263
|
+
for (const [c, a] of Object.entries(s))
|
|
264
|
+
i.style[c] = typeof a == "number" ? String(a) : a;
|
|
265
265
|
};
|
|
266
266
|
} else
|
|
267
267
|
this.updateFn = () => {
|
|
268
268
|
};
|
|
269
|
-
this.runner =
|
|
269
|
+
this.runner = mt.from({
|
|
270
270
|
tick: t.tick,
|
|
271
271
|
css: t.css
|
|
272
272
|
});
|
|
@@ -285,10 +285,10 @@ class j extends K {
|
|
|
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(dt);
|
|
292
292
|
}
|
|
293
293
|
runAnimation(t) {
|
|
294
294
|
this.isAnimating = !0, this.controls = this.runner({
|
|
@@ -344,20 +344,20 @@ class j extends K {
|
|
|
344
344
|
this.options = { ...this.options, ...t };
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
class D extends
|
|
347
|
+
class D extends J {
|
|
348
348
|
constructor(t) {
|
|
349
349
|
super();
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
350
|
+
d(this, "config");
|
|
351
|
+
d(this, "animators", /* @__PURE__ */ new Map());
|
|
352
|
+
d(this, "itemOrder", []);
|
|
353
|
+
d(this, "completedCount", 0);
|
|
354
|
+
d(this, "completedAnimators", /* @__PURE__ */ new Set());
|
|
355
|
+
d(this, "direction", "forward");
|
|
356
|
+
d(this, "idCounter", 0);
|
|
357
|
+
d(this, "rafId", null);
|
|
358
|
+
d(this, "from");
|
|
359
|
+
d(this, "to");
|
|
360
|
+
d(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 D extends K {
|
|
|
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 D extends K {
|
|
|
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, s, c, a, f;
|
|
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), (c = (
|
|
407
|
+
!i || this.completedAnimators.has(t) || (this.completedAnimators.add(t), this.completedCount++, (o = (r = i.item).onComplete) == null || o.call(r), (c = (s = this.config).onProgress) == null || c.call(s, this.completedCount, this.config.items.length), this.completedCount === this.config.items.length && (this.stopScheduler(), (f = (a = this.config).onEnd) == null || f.call(a)));
|
|
408
408
|
}
|
|
409
409
|
/**
|
|
410
410
|
* Check and start springs based on previous spring's progress
|
|
@@ -419,10 +419,10 @@ class D extends K {
|
|
|
419
419
|
this.startAnimator(r);
|
|
420
420
|
continue;
|
|
421
421
|
}
|
|
422
|
-
const
|
|
422
|
+
const s = t[i - 1], c = this.animators.get(s);
|
|
423
423
|
if (!c || !c.started) continue;
|
|
424
|
-
const
|
|
425
|
-
|
|
424
|
+
const a = this.getAnimatorProgress(c), f = o.item.normalizedOffset;
|
|
425
|
+
a >= f && this.startAnimator(r);
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
428
|
startAnimator(t) {
|
|
@@ -470,7 +470,7 @@ class D extends K {
|
|
|
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,
|
|
@@ -540,7 +540,7 @@ class D extends K {
|
|
|
540
540
|
return new D({ ...i, state: t });
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
|
-
const
|
|
543
|
+
const Q = 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 B = Symbol.for("TRANSITION_STRATEGY"), mt = (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 B = Symbol.for("TRANSITION_STRATEGY"), mt = (e) => ({
|
|
|
644
644
|
to: 0,
|
|
645
645
|
direction: "forward"
|
|
646
646
|
}
|
|
647
|
-
}),
|
|
648
|
-
function
|
|
647
|
+
}), Z = "data-ssgoi-scope", tt = "data-ssgoi-scope-ready";
|
|
648
|
+
function Mt() {
|
|
649
649
|
return (e) => {
|
|
650
650
|
if (e)
|
|
651
|
-
return e.setAttribute(
|
|
651
|
+
return e.setAttribute(Z, ""), queueMicrotask(() => {
|
|
652
652
|
queueMicrotask(() => {
|
|
653
|
-
e.setAttribute(
|
|
653
|
+
e.setAttribute(tt, "true");
|
|
654
654
|
});
|
|
655
655
|
}), () => {
|
|
656
656
|
};
|
|
657
657
|
};
|
|
658
658
|
}
|
|
659
|
-
function
|
|
660
|
-
return e.hasAttribute(
|
|
659
|
+
function pt(e) {
|
|
660
|
+
return e.hasAttribute(tt);
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
return e.closest(`[${
|
|
662
|
+
function wt(e) {
|
|
663
|
+
return e.closest(`[${Z}]`);
|
|
664
664
|
}
|
|
665
|
-
const
|
|
665
|
+
const yt = (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 pt = (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 pt = (e) => {
|
|
|
681
681
|
}
|
|
682
682
|
return document.body;
|
|
683
683
|
};
|
|
684
|
-
function
|
|
684
|
+
function $(e) {
|
|
685
685
|
return new Promise((n) => {
|
|
686
686
|
requestAnimationFrame(() => {
|
|
687
687
|
requestAnimationFrame(() => {
|
|
@@ -690,132 +690,132 @@ function W(e) {
|
|
|
690
690
|
});
|
|
691
691
|
});
|
|
692
692
|
}
|
|
693
|
-
function
|
|
694
|
-
var
|
|
693
|
+
function St(e, n) {
|
|
694
|
+
var E;
|
|
695
695
|
let t = null, i = null, r = null, o = null;
|
|
696
|
-
const
|
|
696
|
+
const s = {
|
|
697
697
|
get currentAnimation() {
|
|
698
698
|
return t;
|
|
699
699
|
}
|
|
700
|
-
}, c = ((
|
|
701
|
-
var
|
|
700
|
+
}, c = ((E = n == null ? void 0 : n.strategy) == null ? void 0 : E.call(n, s)) || ht(s), a = async (g) => {
|
|
701
|
+
var S, b;
|
|
702
702
|
i && (i.remove(), i = null);
|
|
703
|
-
const
|
|
704
|
-
if (!
|
|
703
|
+
const m = e(), h = m.in && m.in(g), l = !(n != null && n.strategy) && m.out ? m.out(g) : void 0;
|
|
704
|
+
if (!h)
|
|
705
705
|
return;
|
|
706
|
-
const
|
|
707
|
-
in: M(
|
|
708
|
-
out:
|
|
709
|
-
},
|
|
710
|
-
if (!
|
|
706
|
+
const T = {
|
|
707
|
+
in: M(h),
|
|
708
|
+
out: l ? M(l) : void 0
|
|
709
|
+
}, p = await c.runIn(T);
|
|
710
|
+
if (!p.config) {
|
|
711
711
|
t && (t.direction = "in");
|
|
712
712
|
return;
|
|
713
713
|
}
|
|
714
|
-
const
|
|
715
|
-
(
|
|
716
|
-
const
|
|
714
|
+
const u = p.config;
|
|
715
|
+
(S = u.prepare) == null || S.call(u);
|
|
716
|
+
const v = j(
|
|
717
717
|
{
|
|
718
|
-
...
|
|
718
|
+
...u,
|
|
719
719
|
onEnd: () => {
|
|
720
|
-
var
|
|
721
|
-
t = null, (
|
|
720
|
+
var k;
|
|
721
|
+
t = null, (k = u.onEnd) == null || k.call(u);
|
|
722
722
|
}
|
|
723
723
|
},
|
|
724
|
-
|
|
724
|
+
g
|
|
725
725
|
);
|
|
726
|
-
|
|
727
|
-
const
|
|
728
|
-
config:
|
|
729
|
-
from:
|
|
730
|
-
to:
|
|
726
|
+
u.wait && await u.wait();
|
|
727
|
+
const w = D.fromState(p.state, {
|
|
728
|
+
config: v,
|
|
729
|
+
from: p.from,
|
|
730
|
+
to: p.to
|
|
731
731
|
});
|
|
732
|
-
t = { controller:
|
|
733
|
-
}, f = async (
|
|
734
|
-
var
|
|
735
|
-
i =
|
|
736
|
-
const
|
|
737
|
-
if (!
|
|
732
|
+
t = { controller: w, direction: "in" }, (b = u.onReady) == null || b.call(u), await $(), p.direction === "forward" ? w.forward() : w.backward();
|
|
733
|
+
}, f = async (g) => {
|
|
734
|
+
var b, k;
|
|
735
|
+
i = g;
|
|
736
|
+
const m = e(), h = !(n != null && n.strategy) && m.in ? m.in(g) : void 0, l = m.out && m.out(g);
|
|
737
|
+
if (!l)
|
|
738
738
|
return;
|
|
739
|
-
const
|
|
740
|
-
in:
|
|
741
|
-
out: M(
|
|
742
|
-
},
|
|
743
|
-
if (!
|
|
739
|
+
const T = {
|
|
740
|
+
in: h ? M(h) : void 0,
|
|
741
|
+
out: M(l)
|
|
742
|
+
}, p = await c.runOut(T);
|
|
743
|
+
if (!p.config) {
|
|
744
744
|
t && (t.direction = "out"), i && (i.remove(), i = null);
|
|
745
745
|
return;
|
|
746
746
|
}
|
|
747
|
-
const
|
|
748
|
-
|
|
749
|
-
const
|
|
747
|
+
const u = p.config;
|
|
748
|
+
S(), (b = u.prepare) == null || b.call(u);
|
|
749
|
+
const v = j(
|
|
750
750
|
{
|
|
751
|
-
...
|
|
751
|
+
...u,
|
|
752
752
|
onEnd: () => {
|
|
753
|
-
var
|
|
754
|
-
(
|
|
753
|
+
var z, V;
|
|
754
|
+
(z = u.onEnd) == null || z.call(u), i && (i.remove(), i = null), t = null, (V = n == null ? void 0 : n.onCleanupEnd) == null || V.call(n);
|
|
755
755
|
}
|
|
756
756
|
},
|
|
757
|
-
|
|
757
|
+
g
|
|
758
758
|
);
|
|
759
|
-
|
|
760
|
-
const
|
|
761
|
-
config:
|
|
762
|
-
from:
|
|
763
|
-
to:
|
|
759
|
+
u.wait && await u.wait();
|
|
760
|
+
const w = D.fromState(p.state, {
|
|
761
|
+
config: v,
|
|
762
|
+
from: p.from,
|
|
763
|
+
to: p.to
|
|
764
764
|
});
|
|
765
|
-
t = { controller:
|
|
766
|
-
function
|
|
765
|
+
t = { controller: w, direction: "out" }, (k = u.onReady) == null || k.call(u), await $(), p.direction === "forward" ? w.forward() : w.backward();
|
|
766
|
+
function S() {
|
|
767
767
|
!r || !i || (o && r.contains(o) ? r.insertBefore(i, o) : r.appendChild(i));
|
|
768
768
|
}
|
|
769
769
|
};
|
|
770
|
-
let
|
|
771
|
-
const
|
|
772
|
-
if (
|
|
773
|
-
|
|
774
|
-
const
|
|
775
|
-
|
|
776
|
-
document.contains(
|
|
777
|
-
}) : f(
|
|
770
|
+
let y = null, C = !1;
|
|
771
|
+
const A = (g) => () => {
|
|
772
|
+
if (C) return;
|
|
773
|
+
C = !0;
|
|
774
|
+
const m = g.cloneNode(!0);
|
|
775
|
+
y ? queueMicrotask(() => {
|
|
776
|
+
document.contains(y) && f(m);
|
|
777
|
+
}) : f(m);
|
|
778
778
|
};
|
|
779
|
-
return (
|
|
780
|
-
if (
|
|
779
|
+
return (g) => {
|
|
780
|
+
if (g)
|
|
781
781
|
return requestAnimationFrame(() => {
|
|
782
|
-
r =
|
|
783
|
-
}),
|
|
784
|
-
|
|
785
|
-
}) :
|
|
782
|
+
r = g.parentElement, o = g.nextElementSibling;
|
|
783
|
+
}), C = !1, (n == null ? void 0 : n.scope) === "local" ? queueMicrotask(() => {
|
|
784
|
+
y = wt(g), !(y && !pt(y)) && a(g);
|
|
785
|
+
}) : a(g), A(g);
|
|
786
786
|
};
|
|
787
787
|
}
|
|
788
|
-
const
|
|
789
|
-
let
|
|
790
|
-
function
|
|
791
|
-
if (e instanceof HTMLElement &&
|
|
792
|
-
const t =
|
|
793
|
-
|
|
788
|
+
const P = /* @__PURE__ */ new Map();
|
|
789
|
+
let R = null, U = !1;
|
|
790
|
+
function et(e) {
|
|
791
|
+
if (e instanceof HTMLElement && P.has(e)) {
|
|
792
|
+
const t = P.get(e);
|
|
793
|
+
P.delete(e), queueMicrotask(() => {
|
|
794
794
|
t();
|
|
795
795
|
});
|
|
796
796
|
}
|
|
797
797
|
const n = e.childNodes;
|
|
798
798
|
for (let t = 0; t < n.length; t++) {
|
|
799
799
|
const i = n[t];
|
|
800
|
-
i &&
|
|
800
|
+
i && et(i);
|
|
801
801
|
}
|
|
802
802
|
}
|
|
803
|
-
function
|
|
804
|
-
|
|
803
|
+
function Ct() {
|
|
804
|
+
U || typeof document > "u" || (U = !0, R = new MutationObserver((e) => {
|
|
805
805
|
for (const n of e) {
|
|
806
806
|
const t = n.removedNodes;
|
|
807
807
|
for (let i = 0; i < t.length; i++) {
|
|
808
808
|
const r = t[i];
|
|
809
|
-
r &&
|
|
809
|
+
r && et(r);
|
|
810
810
|
}
|
|
811
811
|
}
|
|
812
|
-
}), document.body ?
|
|
812
|
+
}), document.body ? R.observe(document.body, {
|
|
813
813
|
childList: !0,
|
|
814
814
|
subtree: !0
|
|
815
815
|
}) : document.addEventListener(
|
|
816
816
|
"DOMContentLoaded",
|
|
817
817
|
() => {
|
|
818
|
-
|
|
818
|
+
R == null || R.observe(document.body, {
|
|
819
819
|
childList: !0,
|
|
820
820
|
subtree: !0
|
|
821
821
|
});
|
|
@@ -823,30 +823,30 @@ function vt() {
|
|
|
823
823
|
{ once: !0 }
|
|
824
824
|
));
|
|
825
825
|
}
|
|
826
|
-
function
|
|
827
|
-
|
|
828
|
-
}
|
|
829
|
-
function Mt(e) {
|
|
830
|
-
return b.has(e);
|
|
831
|
-
}
|
|
832
|
-
function xt() {
|
|
833
|
-
return b.size;
|
|
826
|
+
function At(e, n) {
|
|
827
|
+
Ct(), P.set(e, n);
|
|
834
828
|
}
|
|
835
829
|
function Ot(e) {
|
|
836
|
-
|
|
837
|
-
return n ? (b.delete(e), n(), !0) : !1;
|
|
830
|
+
return P.has(e);
|
|
838
831
|
}
|
|
839
832
|
function Lt() {
|
|
840
|
-
|
|
833
|
+
return P.size;
|
|
834
|
+
}
|
|
835
|
+
function Dt(e) {
|
|
836
|
+
const n = P.get(e);
|
|
837
|
+
return n ? (P.delete(e), n(), !0) : !1;
|
|
841
838
|
}
|
|
842
|
-
|
|
843
|
-
|
|
839
|
+
function zt() {
|
|
840
|
+
P.clear(), R == null || R.disconnect(), R = null, U = !1;
|
|
841
|
+
}
|
|
842
|
+
const L = /* @__PURE__ */ new Map(), X = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map();
|
|
843
|
+
function Tt(e, n, t) {
|
|
844
844
|
L.set(e, n);
|
|
845
|
-
let i =
|
|
845
|
+
let i = X.get(e);
|
|
846
846
|
if (i)
|
|
847
847
|
return i;
|
|
848
848
|
const r = n;
|
|
849
|
-
return i =
|
|
849
|
+
return i = St(
|
|
850
850
|
() => {
|
|
851
851
|
const o = L.get(e);
|
|
852
852
|
return o || (console.warn(`Transition "${String(e)}" not found`), {});
|
|
@@ -855,37 +855,37 @@ function Ct(e, n, t) {
|
|
|
855
855
|
strategy: t == null ? void 0 : t.strategy,
|
|
856
856
|
scope: t == null ? void 0 : t.scope,
|
|
857
857
|
onCleanupEnd: () => {
|
|
858
|
-
L.get(e) === r &&
|
|
858
|
+
L.get(e) === r && Et(e);
|
|
859
859
|
}
|
|
860
860
|
}
|
|
861
|
-
),
|
|
861
|
+
), X.set(e, i), i;
|
|
862
862
|
}
|
|
863
|
-
function
|
|
864
|
-
L.delete(e),
|
|
863
|
+
function Et(e) {
|
|
864
|
+
L.delete(e), X.delete(e), Y.delete(e);
|
|
865
865
|
}
|
|
866
|
-
function
|
|
867
|
-
const t =
|
|
866
|
+
function qt(e, n = "manual") {
|
|
867
|
+
const t = Tt(
|
|
868
868
|
e.key,
|
|
869
869
|
{
|
|
870
870
|
in: e.in,
|
|
871
871
|
out: e.out
|
|
872
872
|
},
|
|
873
873
|
{
|
|
874
|
-
strategy: e[
|
|
874
|
+
strategy: e[Q],
|
|
875
875
|
scope: e.scope
|
|
876
876
|
}
|
|
877
877
|
);
|
|
878
878
|
if (n === "manual")
|
|
879
879
|
return t;
|
|
880
|
-
let i =
|
|
880
|
+
let i = Y.get(e.key);
|
|
881
881
|
return i || (i = (r) => {
|
|
882
882
|
if (r) {
|
|
883
883
|
const o = t(r);
|
|
884
|
-
o &&
|
|
884
|
+
o && At(r, o);
|
|
885
885
|
}
|
|
886
|
-
},
|
|
886
|
+
}, Y.set(e.key, i), i);
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function bt(e) {
|
|
889
889
|
const n = e.filter((t) => t.symmetric).map((t) => ({
|
|
890
890
|
from: t.to,
|
|
891
891
|
to: t.from,
|
|
@@ -893,83 +893,115 @@ function Et(e) {
|
|
|
893
893
|
}));
|
|
894
894
|
return [...e, ...n];
|
|
895
895
|
}
|
|
896
|
-
function
|
|
896
|
+
function Rt(e) {
|
|
897
897
|
let n = !1, t = 0, i = 0, r = !1;
|
|
898
|
-
const o = 50,
|
|
898
|
+
const o = 50, s = (g) => {
|
|
899
899
|
if (!e) return;
|
|
900
|
-
const
|
|
901
|
-
|
|
902
|
-
}, c = (
|
|
900
|
+
const m = g.touches[0];
|
|
901
|
+
m && (r = m.clientX < o, r && (t = m.clientX, i = m.clientY));
|
|
902
|
+
}, c = (g) => {
|
|
903
903
|
if (!e || !r) return;
|
|
904
|
-
const
|
|
905
|
-
if (!
|
|
906
|
-
const
|
|
907
|
-
|
|
908
|
-
},
|
|
904
|
+
const m = g.touches[0];
|
|
905
|
+
if (!m) return;
|
|
906
|
+
const h = m.clientX - t, l = m.clientY - i;
|
|
907
|
+
h > window.outerWidth / 2 - 5 && Math.abs(h) > Math.abs(l) ? n = !0 : n = !1;
|
|
908
|
+
}, a = () => {
|
|
909
909
|
e && (r = !1, t = 0, i = 0);
|
|
910
|
-
}, f = () => n,
|
|
911
|
-
typeof window > "u" || e && (window.addEventListener("touchstart",
|
|
912
|
-
},
|
|
913
|
-
typeof window > "u" || (window.removeEventListener("touchstart",
|
|
910
|
+
}, f = () => n, y = () => {
|
|
911
|
+
typeof window > "u" || e && (window.addEventListener("touchstart", s, { passive: !0 }), window.addEventListener("touchmove", c, { passive: !0 }), window.addEventListener("touchend", a, { passive: !0 }));
|
|
912
|
+
}, C = () => {
|
|
913
|
+
typeof window > "u" || (window.removeEventListener("touchstart", s), window.removeEventListener("touchmove", c), window.removeEventListener("touchend", a));
|
|
914
914
|
};
|
|
915
|
-
let
|
|
915
|
+
let A = 0;
|
|
916
916
|
return {
|
|
917
|
-
initialize:
|
|
918
|
-
cleanup:
|
|
917
|
+
initialize: y,
|
|
918
|
+
cleanup: C,
|
|
919
919
|
isSwipePending: f,
|
|
920
920
|
resetSwipeDetection: () => {
|
|
921
921
|
requestAnimationFrame(() => {
|
|
922
|
-
|
|
922
|
+
A++, A > 1 && (A = 0, n = !1);
|
|
923
923
|
});
|
|
924
924
|
}
|
|
925
925
|
};
|
|
926
926
|
}
|
|
927
|
-
function
|
|
928
|
-
let e = null, n = null;
|
|
929
|
-
const t = /* @__PURE__ */ new Map();
|
|
930
|
-
let i = null;
|
|
931
|
-
const r = () => {
|
|
932
|
-
e && i && t.set(i, {
|
|
933
|
-
x: e.scrollLeft,
|
|
934
|
-
y: e.scrollTop
|
|
935
|
-
});
|
|
936
|
-
};
|
|
937
|
-
return {
|
|
938
|
-
initializeContext: (h, p) => {
|
|
939
|
-
n = h, e || (e = pt(h), (e === document.documentElement ? window : e).addEventListener("scroll", r, {
|
|
940
|
-
passive: !0
|
|
941
|
-
})), i = p;
|
|
942
|
-
},
|
|
943
|
-
calculateScrollOffset: (h, p) => {
|
|
944
|
-
const w = h && t.has(h) ? t.get(h) : { x: 0, y: 0 }, v = p && t.has(p) ? t.get(p) : { x: 0, y: 0 };
|
|
945
|
-
return {
|
|
946
|
-
x: -v.x + w.x,
|
|
947
|
-
y: -v.y + w.y
|
|
948
|
-
};
|
|
949
|
-
},
|
|
950
|
-
getScrollContainer: () => e,
|
|
951
|
-
getPositionedParentElement: () => n ? wt(n) : document.body,
|
|
952
|
-
getScrollPosition: (h) => h && t.has(h) ? t.get(h) : { x: 0, y: 0 }
|
|
953
|
-
};
|
|
954
|
-
}
|
|
955
|
-
function O(e, n) {
|
|
927
|
+
function I(e, n) {
|
|
956
928
|
if (n === "*")
|
|
957
929
|
return !0;
|
|
958
930
|
if (n.endsWith("/*")) {
|
|
959
|
-
const t = n.slice(0, -
|
|
960
|
-
return e
|
|
931
|
+
const t = n.slice(0, -1);
|
|
932
|
+
return e.startsWith(t) && e.length > t.length;
|
|
961
933
|
}
|
|
962
934
|
return e === n;
|
|
963
935
|
}
|
|
964
|
-
function
|
|
936
|
+
function K(e, n, t) {
|
|
965
937
|
for (const i of t)
|
|
966
|
-
if (
|
|
938
|
+
if (I(e, i.from) && I(n, i.to))
|
|
967
939
|
return i.transition;
|
|
968
940
|
for (const i of t)
|
|
969
|
-
if ((i.from === "*" ||
|
|
941
|
+
if ((i.from === "*" || I(e, i.from)) && (i.to === "*" || I(n, i.to)))
|
|
970
942
|
return i.transition;
|
|
971
943
|
return null;
|
|
972
944
|
}
|
|
945
|
+
function Pt(e = {}) {
|
|
946
|
+
const { preserveScroll: n = !1, resetPatterns: t = [] } = e, i = (h) => t.some((l) => I(h, l));
|
|
947
|
+
let r = null, o = null;
|
|
948
|
+
const s = /* @__PURE__ */ new Map();
|
|
949
|
+
let c = null, a = !1;
|
|
950
|
+
const f = () => {
|
|
951
|
+
r && c && !a && s.set(c, {
|
|
952
|
+
x: r.scrollLeft,
|
|
953
|
+
y: r.scrollTop
|
|
954
|
+
});
|
|
955
|
+
}, y = (h) => {
|
|
956
|
+
if (!r || !n) return;
|
|
957
|
+
if (i(h)) {
|
|
958
|
+
r.scrollTo({ top: 0, left: 0 });
|
|
959
|
+
return;
|
|
960
|
+
}
|
|
961
|
+
const l = s.get(h);
|
|
962
|
+
if (!l) {
|
|
963
|
+
r.scrollTo({ top: 0, left: 0 });
|
|
964
|
+
return;
|
|
965
|
+
}
|
|
966
|
+
const T = 10;
|
|
967
|
+
let p = 0;
|
|
968
|
+
const u = () => {
|
|
969
|
+
if (!r) return;
|
|
970
|
+
r.scrollTo({
|
|
971
|
+
top: l.y,
|
|
972
|
+
left: l.x
|
|
973
|
+
});
|
|
974
|
+
const v = r.scrollTop, w = r.scrollLeft;
|
|
975
|
+
!(Math.abs(v - l.y) < 1 && Math.abs(w - l.x) < 1) && p < T && (p++, requestAnimationFrame(u));
|
|
976
|
+
};
|
|
977
|
+
requestAnimationFrame(u);
|
|
978
|
+
};
|
|
979
|
+
return {
|
|
980
|
+
initializeContext: (h, l) => {
|
|
981
|
+
a = !0, o = h, r || (r = yt(h), (r === document.documentElement ? window : r).addEventListener("scroll", f, {
|
|
982
|
+
passive: !0
|
|
983
|
+
})), c = l, y(l);
|
|
984
|
+
const T = 10;
|
|
985
|
+
let p = 0;
|
|
986
|
+
const u = () => {
|
|
987
|
+
p++, p >= T ? a = !1 : requestAnimationFrame(u);
|
|
988
|
+
};
|
|
989
|
+
requestAnimationFrame(u);
|
|
990
|
+
},
|
|
991
|
+
calculateScrollOffset: (h, l) => {
|
|
992
|
+
const T = h && s.has(h) ? s.get(h) : { x: 0, y: 0 }, p = l && i(l);
|
|
993
|
+
p && s.set(l, { x: 0, y: 0 });
|
|
994
|
+
const u = p ? { x: 0, y: 0 } : l && s.has(l) ? s.get(l) : { x: 0, y: 0 };
|
|
995
|
+
return {
|
|
996
|
+
x: -u.x + T.x,
|
|
997
|
+
y: -u.y + T.y
|
|
998
|
+
};
|
|
999
|
+
},
|
|
1000
|
+
getScrollContainer: () => r,
|
|
1001
|
+
getPositionedParentElement: () => o ? vt(o) : document.body,
|
|
1002
|
+
getScrollPosition: (h) => h && s.has(h) ? s.get(h) : { x: 0, y: 0 }
|
|
1003
|
+
};
|
|
1004
|
+
}
|
|
973
1005
|
function kt() {
|
|
974
1006
|
let e = null;
|
|
975
1007
|
function n() {
|
|
@@ -989,7 +1021,7 @@ function kt() {
|
|
|
989
1021
|
}
|
|
990
1022
|
};
|
|
991
1023
|
}
|
|
992
|
-
function
|
|
1024
|
+
function Vt() {
|
|
993
1025
|
let e = null;
|
|
994
1026
|
function n() {
|
|
995
1027
|
var i, r;
|
|
@@ -1012,117 +1044,124 @@ function Rt() {
|
|
|
1012
1044
|
}
|
|
1013
1045
|
};
|
|
1014
1046
|
}
|
|
1015
|
-
function
|
|
1047
|
+
function _t(e, n) {
|
|
1016
1048
|
const {
|
|
1017
1049
|
transitions: t = [],
|
|
1018
1050
|
defaultTransition: i,
|
|
1019
|
-
middleware: r = (
|
|
1051
|
+
middleware: r = (v, w) => ({ from: v, to: w }),
|
|
1020
1052
|
// Identity function as default
|
|
1021
|
-
skipOnIosSwipe: o = !0
|
|
1053
|
+
skipOnIosSwipe: o = !0,
|
|
1022
1054
|
// Default to true - skip animations on iOS swipe
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1055
|
+
experimentalPreserveScroll: s = !1,
|
|
1056
|
+
// Default to false - manual scroll management
|
|
1057
|
+
scrollResetPatterns: c = []
|
|
1058
|
+
// Default to empty array - no routes reset scroll
|
|
1059
|
+
} = e, { outFirst: a = !0, createNavigationDetector: f } = n || {}, y = (f == null ? void 0 : f()) ?? (a ? kt() : Vt()), C = bt(t), {
|
|
1060
|
+
initializeContext: A,
|
|
1061
|
+
calculateScrollOffset: E,
|
|
1062
|
+
getScrollContainer: g,
|
|
1063
|
+
getPositionedParentElement: m,
|
|
1064
|
+
getScrollPosition: h
|
|
1065
|
+
} = Pt({
|
|
1066
|
+
preserveScroll: s,
|
|
1067
|
+
resetPatterns: c
|
|
1068
|
+
}), l = Rt(o);
|
|
1069
|
+
l.initialize();
|
|
1070
|
+
const T = async (v, w) => {
|
|
1071
|
+
if (l.isSwipePending())
|
|
1072
|
+
return l.resetSwipeDetection(), w === "in" ? async (F) => ({
|
|
1034
1073
|
onReady: () => {
|
|
1035
|
-
|
|
1074
|
+
F.style.visibility = "visible";
|
|
1036
1075
|
}
|
|
1037
1076
|
}) : () => ({});
|
|
1038
|
-
|
|
1039
|
-
const S = await
|
|
1077
|
+
y.trigger(v, w);
|
|
1078
|
+
const S = await y.get(w);
|
|
1040
1079
|
if (!S) return () => ({});
|
|
1041
|
-
const { from:
|
|
1080
|
+
const { from: b, to: k } = r(
|
|
1042
1081
|
S.from,
|
|
1043
1082
|
S.to
|
|
1044
|
-
),
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1083
|
+
), V = K(
|
|
1084
|
+
b,
|
|
1085
|
+
k,
|
|
1086
|
+
C
|
|
1048
1087
|
) || i;
|
|
1049
|
-
if (!
|
|
1050
|
-
const
|
|
1051
|
-
if (
|
|
1052
|
-
const
|
|
1053
|
-
scrollOffset:
|
|
1054
|
-
scroll:
|
|
1088
|
+
if (!V) return () => ({});
|
|
1089
|
+
const H = E(S.from, S.to);
|
|
1090
|
+
if (w === "out") {
|
|
1091
|
+
const F = {
|
|
1092
|
+
scrollOffset: H,
|
|
1093
|
+
scroll: h(S.from),
|
|
1055
1094
|
get scrollingElement() {
|
|
1056
|
-
return
|
|
1095
|
+
return g() || document.documentElement;
|
|
1057
1096
|
},
|
|
1058
1097
|
get positionedParent() {
|
|
1059
|
-
return
|
|
1098
|
+
return m();
|
|
1060
1099
|
}
|
|
1061
1100
|
};
|
|
1062
|
-
return (
|
|
1101
|
+
return (x) => V.out(x, F);
|
|
1063
1102
|
} else {
|
|
1064
|
-
const
|
|
1065
|
-
scrollOffset:
|
|
1103
|
+
const F = {
|
|
1104
|
+
scrollOffset: H,
|
|
1066
1105
|
get scroll() {
|
|
1067
|
-
return
|
|
1106
|
+
return h(S.to);
|
|
1068
1107
|
},
|
|
1069
1108
|
get scrollingElement() {
|
|
1070
|
-
return
|
|
1109
|
+
return g() || document.documentElement;
|
|
1071
1110
|
},
|
|
1072
1111
|
get positionedParent() {
|
|
1073
|
-
return
|
|
1112
|
+
return m();
|
|
1074
1113
|
}
|
|
1075
1114
|
};
|
|
1076
|
-
return async (
|
|
1077
|
-
const
|
|
1078
|
-
return
|
|
1079
|
-
|
|
1080
|
-
},
|
|
1115
|
+
return async (x) => {
|
|
1116
|
+
const q = await Promise.resolve(V.in(x, F)), _ = q.onReady;
|
|
1117
|
+
return q.onReady = () => {
|
|
1118
|
+
x.style.visibility = "visible", _ == null || _();
|
|
1119
|
+
}, q;
|
|
1081
1120
|
};
|
|
1082
1121
|
}
|
|
1083
|
-
},
|
|
1084
|
-
key:
|
|
1085
|
-
in: async (
|
|
1086
|
-
out: async (
|
|
1122
|
+
}, p = (v) => ({
|
|
1123
|
+
key: v,
|
|
1124
|
+
in: async (w) => (A(w, v), (await T(v, "in"))(w)),
|
|
1125
|
+
out: async (w) => (await T(v, "out"))(w),
|
|
1087
1126
|
// Add page transition strategy for page-level transitions
|
|
1088
|
-
[
|
|
1089
|
-
}),
|
|
1090
|
-
if (
|
|
1127
|
+
[Q]: gt
|
|
1128
|
+
}), u = (v, w) => {
|
|
1129
|
+
if (l.isSwipePending())
|
|
1091
1130
|
return !1;
|
|
1092
|
-
const { from: S, to:
|
|
1093
|
-
return !!(
|
|
1131
|
+
const { from: S, to: b } = r(v, w);
|
|
1132
|
+
return !!(K(
|
|
1094
1133
|
S,
|
|
1095
|
-
|
|
1096
|
-
|
|
1134
|
+
b,
|
|
1135
|
+
C
|
|
1097
1136
|
) || i);
|
|
1098
1137
|
};
|
|
1099
|
-
return
|
|
1100
|
-
getTransition:
|
|
1101
|
-
hasMatchingTransition:
|
|
1102
|
-
} :
|
|
1138
|
+
return f ? {
|
|
1139
|
+
getTransition: p,
|
|
1140
|
+
hasMatchingTransition: u
|
|
1141
|
+
} : p;
|
|
1103
1142
|
}
|
|
1104
1143
|
export {
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1144
|
+
Z as SCOPE_ATTR,
|
|
1145
|
+
tt as SCOPE_READY_ATTR,
|
|
1146
|
+
Q as TRANSITION_STRATEGY,
|
|
1147
|
+
Vt as createAnyOrderDetector,
|
|
1148
|
+
ht as createDefaultStrategy,
|
|
1110
1149
|
kt as createOutFirstDetector,
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1150
|
+
gt as createPageTransitionStrategy,
|
|
1151
|
+
_t as createSggoiTransitionContext,
|
|
1152
|
+
Mt as createTransitionScope,
|
|
1153
|
+
wt as findScope,
|
|
1154
|
+
Lt as getWatchedCount,
|
|
1155
|
+
Xt as isCssAnimation,
|
|
1156
|
+
Yt as isMultiAnimation,
|
|
1157
|
+
pt as isScopeReady,
|
|
1119
1158
|
Ht as isSingleAnimation,
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1159
|
+
jt as isTickAnimation,
|
|
1160
|
+
Ot as isWatched,
|
|
1161
|
+
j as normalizeSchedule,
|
|
1123
1162
|
M as normalizeToMultiAnimation,
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1163
|
+
zt as resetObserver,
|
|
1164
|
+
qt as transition,
|
|
1165
|
+
Dt as triggerUnmount,
|
|
1166
|
+
At as watchUnmount
|
|
1128
1167
|
};
|