@ssgoi/core 4.2.1 → 4.3.1
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/animator/runner/provider.d.ts +2 -2
- package/dist/animator/runner/provider.d.ts.map +1 -1
- package/dist/animator/single-animator.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +230 -217
- package/dist/ssgoi-transition/create-swipe-detector.d.ts.map +1 -1
- package/dist/transition/create-transition-callback.d.ts.map +1 -1
- package/dist/types.cjs +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +10 -8
- package/dist/view-transitions/depth.d.ts +2 -0
- package/dist/view-transitions/depth.d.ts.map +1 -1
- package/dist/view-transitions/index.cjs +7 -7
- package/dist/view-transitions/index.js +565 -565
- package/dist/view-transitions/sheet.d.ts +2 -0
- package/dist/view-transitions/sheet.d.ts.map +1 -1
- package/dist/view-transitions/snap.d.ts +2 -0
- package/dist/view-transitions/snap.d.ts.map +1 -1
- package/dist/view-transitions/swap.d.ts +2 -0
- package/dist/view-transitions/swap.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var tt = Object.defineProperty;
|
|
2
2
|
var et = (e, n, t) => n in e ? tt(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
3
|
var m = (e, n, t) => et(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
-
import { normalizeToMultiAnimation as
|
|
5
|
-
import { isCssAnimation as
|
|
4
|
+
import { normalizeToMultiAnimation as M, normalizeSchedule as X } from "./types.js";
|
|
5
|
+
import { isCssAnimation as Nt, isMultiAnimation as Ut, isSingleAnimation as Ht, isTickAnimation as Xt } from "./types.js";
|
|
6
6
|
import { S as $, I as it, a as nt } from "./provider-Cu4NSF1Q.js";
|
|
7
7
|
class rt {
|
|
8
8
|
constructor() {
|
|
@@ -30,9 +30,9 @@ class rt {
|
|
|
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
|
-
|
|
33
|
+
const l = i / 1e3;
|
|
34
|
+
this.elapsed = r / 1e3, this.nextTime += o + (o >= this.gap ? 4 : this.gap - o), this.listeners.forEach((c) => {
|
|
35
|
+
c(l, this.elapsed);
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
this.listeners.size > 0 ? this.rafId = requestAnimationFrame(this.tick) : (this.isRunning = !1, this.rafId = null);
|
|
@@ -76,15 +76,15 @@ function ot(e) {
|
|
|
76
76
|
to: i,
|
|
77
77
|
velocity: r = 0,
|
|
78
78
|
onUpdate: o,
|
|
79
|
-
onComplete:
|
|
80
|
-
onStart:
|
|
79
|
+
onComplete: l,
|
|
80
|
+
onStart: c
|
|
81
81
|
} = e;
|
|
82
|
-
let s = { position: t, velocity: r },
|
|
82
|
+
let s = { position: t, velocity: r }, f = !0, h = 0, p = !1;
|
|
83
83
|
const w = (v) => {
|
|
84
|
-
if (
|
|
85
|
-
if (p || (p = !0,
|
|
84
|
+
if (f) {
|
|
85
|
+
if (p || (p = !0, c == null || c()), s = n.step(s, i, v), n.isSettled(s, i)) {
|
|
86
86
|
if (h += Math.min(v, 0.033), h >= $) {
|
|
87
|
-
s = { position: i, velocity: 0 },
|
|
87
|
+
s = { position: i, velocity: 0 }, f = !1, o(s.position), _.unsubscribe(w), l();
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
90
|
} else
|
|
@@ -94,36 +94,36 @@ function ot(e) {
|
|
|
94
94
|
};
|
|
95
95
|
return _.subscribe(w), {
|
|
96
96
|
stop: () => {
|
|
97
|
-
|
|
97
|
+
f && (f = !1, _.unsubscribe(w));
|
|
98
98
|
},
|
|
99
99
|
getPosition: () => s.position,
|
|
100
100
|
getVelocity: () => s.velocity,
|
|
101
|
-
isRunning: () =>
|
|
101
|
+
isRunning: () => f
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
|
-
const
|
|
104
|
+
const x = 1e3 / 60;
|
|
105
105
|
function st(e, n, t, i = 0) {
|
|
106
|
-
let o = { position: n, velocity: i },
|
|
107
|
-
const
|
|
106
|
+
let o = { position: n, velocity: i }, l = 0;
|
|
107
|
+
const c = [];
|
|
108
108
|
for (let s = 0; s < 600; s++) {
|
|
109
|
-
const
|
|
110
|
-
if (
|
|
111
|
-
time:
|
|
109
|
+
const f = s * x;
|
|
110
|
+
if (c.push({
|
|
111
|
+
time: f,
|
|
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, x / 1e3), e.isSettled(o, t)) {
|
|
115
|
+
if (l += x / 1e3, l >= $) {
|
|
116
|
+
c.push({
|
|
117
|
+
time: (s + 1) * x,
|
|
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 c;
|
|
127
127
|
}
|
|
128
128
|
function Y(e, n) {
|
|
129
129
|
if (e.length === 0)
|
|
@@ -135,13 +135,13 @@ function Y(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 f = Math.floor((r + o) / 2);
|
|
139
|
+
e[f].time <= n ? r = f : o = f;
|
|
140
140
|
}
|
|
141
|
-
const
|
|
141
|
+
const l = e[r], c = e[o], s = (n - l.time) / (c.time - l.time);
|
|
142
142
|
return {
|
|
143
|
-
position:
|
|
144
|
-
velocity:
|
|
143
|
+
position: l.position + (c.position - l.position) * s,
|
|
144
|
+
velocity: l.velocity + (c.velocity - l.velocity) * s
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
147
|
function at(e, n) {
|
|
@@ -154,19 +154,19 @@ function ct(e) {
|
|
|
154
154
|
from: i,
|
|
155
155
|
to: r,
|
|
156
156
|
velocity: o = 0,
|
|
157
|
-
style:
|
|
158
|
-
onComplete:
|
|
157
|
+
style: l,
|
|
158
|
+
onComplete: c,
|
|
159
159
|
onStart: s
|
|
160
|
-
} = e,
|
|
161
|
-
if (
|
|
162
|
-
return s == null || s(),
|
|
160
|
+
} = e, f = st(n, i, r, o);
|
|
161
|
+
if (f.length === 0)
|
|
162
|
+
return s == null || s(), c(), {
|
|
163
163
|
stop: () => {
|
|
164
164
|
},
|
|
165
165
|
getPosition: () => r,
|
|
166
166
|
getVelocity: () => 0,
|
|
167
167
|
isRunning: () => !1
|
|
168
168
|
};
|
|
169
|
-
const h = at(
|
|
169
|
+
const h = at(f, l), p = f[f.length - 1], w = p.time, v = h[0];
|
|
170
170
|
if (v)
|
|
171
171
|
for (const y of Object.keys(v))
|
|
172
172
|
t.style[y] = "";
|
|
@@ -176,35 +176,45 @@ function ct(e) {
|
|
|
176
176
|
easing: "linear",
|
|
177
177
|
composite: "replace"
|
|
178
178
|
});
|
|
179
|
-
let
|
|
179
|
+
let u = !0;
|
|
180
180
|
const C = performance.now();
|
|
181
181
|
return s == null || s(), d.onfinish = () => {
|
|
182
|
-
|
|
182
|
+
u && (u = !1, c());
|
|
183
183
|
}, {
|
|
184
184
|
stop: () => {
|
|
185
|
-
|
|
185
|
+
u && (u = !1, d.cancel());
|
|
186
186
|
},
|
|
187
187
|
getPosition: () => {
|
|
188
|
-
if (!
|
|
188
|
+
if (!u)
|
|
189
189
|
return p.position;
|
|
190
190
|
const y = performance.now() - C;
|
|
191
|
-
return Y(
|
|
191
|
+
return Y(f, y).position;
|
|
192
192
|
},
|
|
193
193
|
getVelocity: () => {
|
|
194
|
-
if (!
|
|
194
|
+
if (!u)
|
|
195
195
|
return 0;
|
|
196
196
|
const y = performance.now() - C;
|
|
197
|
-
return Y(
|
|
197
|
+
return Y(f, y).velocity;
|
|
198
|
+
},
|
|
199
|
+
isRunning: () => u
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
function lt(e) {
|
|
203
|
+
const { to: n, onStart: t, onComplete: i } = e;
|
|
204
|
+
return t == null || t(), i(), {
|
|
205
|
+
stop: () => {
|
|
198
206
|
},
|
|
199
|
-
|
|
207
|
+
getPosition: () => n,
|
|
208
|
+
getVelocity: () => 0,
|
|
209
|
+
isRunning: () => !1
|
|
200
210
|
};
|
|
201
211
|
}
|
|
202
|
-
class
|
|
212
|
+
class ut {
|
|
203
213
|
/**
|
|
204
214
|
* Get bound runner based on animation mode
|
|
205
215
|
*
|
|
206
216
|
* @param options Animation mode options (tick or css)
|
|
207
|
-
* @returns Bound runner function
|
|
217
|
+
* @returns Bound runner function (empty runner if no animation mode specified)
|
|
208
218
|
* @throws Error if both tick and css are provided
|
|
209
219
|
*/
|
|
210
220
|
static from(n) {
|
|
@@ -218,12 +228,12 @@ class lt {
|
|
|
218
228
|
}) : t ? (r) => ot({
|
|
219
229
|
...r,
|
|
220
230
|
onUpdate: t
|
|
221
|
-
}) :
|
|
231
|
+
}) : lt;
|
|
222
232
|
}
|
|
223
233
|
}
|
|
224
234
|
class K {
|
|
225
235
|
}
|
|
226
|
-
const
|
|
236
|
+
const ft = { stiffness: 300, damping: 30 };
|
|
227
237
|
class j extends K {
|
|
228
238
|
constructor(t) {
|
|
229
239
|
super();
|
|
@@ -249,14 +259,14 @@ class j extends K {
|
|
|
249
259
|
else if (t.css) {
|
|
250
260
|
const { element: i, style: r } = t.css;
|
|
251
261
|
this.updateFn = (o) => {
|
|
252
|
-
const
|
|
253
|
-
for (const [
|
|
254
|
-
i.style[
|
|
262
|
+
const l = r(o);
|
|
263
|
+
for (const [c, s] of Object.entries(l))
|
|
264
|
+
i.style[c] = typeof s == "number" ? String(s) : s;
|
|
255
265
|
};
|
|
256
266
|
} else
|
|
257
267
|
this.updateFn = () => {
|
|
258
268
|
};
|
|
259
|
-
this.runner =
|
|
269
|
+
this.runner = ut.from({
|
|
260
270
|
tick: t.tick,
|
|
261
271
|
css: t.css
|
|
262
272
|
});
|
|
@@ -278,15 +288,10 @@ class j extends K {
|
|
|
278
288
|
return t != null && t.integrator ? t.integrator() : t != null && t.spring || t != null && t.inertia ? it.from({
|
|
279
289
|
spring: t.spring,
|
|
280
290
|
inertia: t.inertia
|
|
281
|
-
}) : new nt(
|
|
291
|
+
}) : new nt(ft);
|
|
282
292
|
}
|
|
283
293
|
runAnimation(t) {
|
|
284
|
-
|
|
285
|
-
if (this.isAnimating = !0, !this.runner) {
|
|
286
|
-
(r = (i = this.options).onStart) == null || r.call(i), this.currentValue = t, this.currentVelocity = 0, this.isAnimating = !1, this.options.onComplete();
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
this.controls = this.runner({
|
|
294
|
+
this.isAnimating = !0, this.controls = this.runner({
|
|
290
295
|
integrator: this.createIntegrator(),
|
|
291
296
|
from: this.currentValue,
|
|
292
297
|
to: t,
|
|
@@ -339,7 +344,7 @@ class j extends K {
|
|
|
339
344
|
this.options = { ...this.options, ...t };
|
|
340
345
|
}
|
|
341
346
|
}
|
|
342
|
-
class
|
|
347
|
+
class D extends K {
|
|
343
348
|
constructor(t) {
|
|
344
349
|
super();
|
|
345
350
|
m(this, "config");
|
|
@@ -397,9 +402,9 @@ class L extends K {
|
|
|
397
402
|
return this.direction === "forward" ? this.itemOrder : [...this.itemOrder].reverse();
|
|
398
403
|
}
|
|
399
404
|
onAnimatorComplete(t) {
|
|
400
|
-
var r, o,
|
|
405
|
+
var r, o, l, c, s, f;
|
|
401
406
|
const i = this.animators.get(t);
|
|
402
|
-
!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), (c = (l = this.config).onProgress) == null || c.call(l, this.completedCount, this.config.items.length), this.completedCount === this.config.items.length && (this.stopScheduler(), (f = (s = this.config).onEnd) == null || f.call(s)));
|
|
403
408
|
}
|
|
404
409
|
/**
|
|
405
410
|
* Check and start springs based on previous spring's progress
|
|
@@ -414,10 +419,10 @@ class L extends K {
|
|
|
414
419
|
this.startAnimator(r);
|
|
415
420
|
continue;
|
|
416
421
|
}
|
|
417
|
-
const
|
|
418
|
-
if (!
|
|
419
|
-
const s = this.getAnimatorProgress(
|
|
420
|
-
s >=
|
|
422
|
+
const l = t[i - 1], c = this.animators.get(l);
|
|
423
|
+
if (!c || !c.started) continue;
|
|
424
|
+
const s = this.getAnimatorProgress(c), f = o.item.normalizedOffset;
|
|
425
|
+
s >= f && this.startAnimator(r);
|
|
421
426
|
}
|
|
422
427
|
}
|
|
423
428
|
startAnimator(t) {
|
|
@@ -532,10 +537,10 @@ class L extends K {
|
|
|
532
537
|
* Uses first animator's state for initialization
|
|
533
538
|
*/
|
|
534
539
|
static fromState(t, i) {
|
|
535
|
-
return new
|
|
540
|
+
return new D({ ...i, state: t });
|
|
536
541
|
}
|
|
537
542
|
}
|
|
538
|
-
const B = Symbol.for("TRANSITION_STRATEGY"),
|
|
543
|
+
const B = Symbol.for("TRANSITION_STRATEGY"), mt = (e) => ({
|
|
539
544
|
runIn: async (n) => {
|
|
540
545
|
const { currentAnimation: t } = e;
|
|
541
546
|
if (t && t.direction === "out") {
|
|
@@ -602,7 +607,7 @@ const B = Symbol.for("TRANSITION_STRATEGY"), ft = (e) => ({
|
|
|
602
607
|
direction: "forward"
|
|
603
608
|
};
|
|
604
609
|
}
|
|
605
|
-
}),
|
|
610
|
+
}), dt = () => ({
|
|
606
611
|
runIn: async (e) => e.in ? {
|
|
607
612
|
config: await e.in,
|
|
608
613
|
state: {
|
|
@@ -640,7 +645,7 @@ const B = Symbol.for("TRANSITION_STRATEGY"), ft = (e) => ({
|
|
|
640
645
|
direction: "forward"
|
|
641
646
|
}
|
|
642
647
|
}), J = "data-ssgoi-scope", Q = "data-ssgoi-scope-ready";
|
|
643
|
-
function
|
|
648
|
+
function Ft() {
|
|
644
649
|
return (e) => {
|
|
645
650
|
if (e)
|
|
646
651
|
return e.setAttribute(J, ""), queueMicrotask(() => {
|
|
@@ -651,13 +656,13 @@ function It() {
|
|
|
651
656
|
};
|
|
652
657
|
};
|
|
653
658
|
}
|
|
654
|
-
function
|
|
659
|
+
function ht(e) {
|
|
655
660
|
return e.hasAttribute(Q);
|
|
656
661
|
}
|
|
657
|
-
function
|
|
662
|
+
function gt(e) {
|
|
658
663
|
return e.closest(`[${J}]`);
|
|
659
664
|
}
|
|
660
|
-
const
|
|
665
|
+
const pt = (e) => {
|
|
661
666
|
let n = e.parentElement;
|
|
662
667
|
for (; n && n !== document.body; ) {
|
|
663
668
|
const t = window.getComputedStyle(n), i = t.overflow + t.overflowY + t.overflowX;
|
|
@@ -666,7 +671,7 @@ const gt = (e) => {
|
|
|
666
671
|
n = n.parentElement;
|
|
667
672
|
}
|
|
668
673
|
return document.documentElement;
|
|
669
|
-
},
|
|
674
|
+
}, wt = (e) => {
|
|
670
675
|
let n = e.parentElement;
|
|
671
676
|
for (; n && n !== document.body; ) {
|
|
672
677
|
const t = window.getComputedStyle(n).position;
|
|
@@ -685,80 +690,80 @@ function W(e) {
|
|
|
685
690
|
});
|
|
686
691
|
});
|
|
687
692
|
}
|
|
688
|
-
function
|
|
693
|
+
function yt(e, n) {
|
|
689
694
|
var v;
|
|
690
695
|
let t = null, i = null, r = null, o = null;
|
|
691
|
-
const
|
|
696
|
+
const l = {
|
|
692
697
|
get currentAnimation() {
|
|
693
698
|
return t;
|
|
694
699
|
}
|
|
695
|
-
},
|
|
696
|
-
var
|
|
700
|
+
}, c = ((v = n == null ? void 0 : n.strategy) == null ? void 0 : v.call(n, l)) || mt(l), s = async (d) => {
|
|
701
|
+
var R, P;
|
|
697
702
|
i && (i.remove(), i = null);
|
|
698
|
-
const
|
|
703
|
+
const u = e(), C = u.in && u.in(d), y = !(n != null && n.strategy) && u.out ? u.out(d) : void 0;
|
|
699
704
|
if (!C)
|
|
700
705
|
return;
|
|
701
|
-
const
|
|
702
|
-
in:
|
|
703
|
-
out: y ?
|
|
704
|
-
}, g = await
|
|
706
|
+
const V = {
|
|
707
|
+
in: M(C),
|
|
708
|
+
out: y ? M(y) : void 0
|
|
709
|
+
}, g = await c.runIn(V);
|
|
705
710
|
if (!g.config) {
|
|
706
711
|
t && (t.direction = "in");
|
|
707
712
|
return;
|
|
708
713
|
}
|
|
709
|
-
const
|
|
710
|
-
(
|
|
714
|
+
const a = g.config;
|
|
715
|
+
(R = a.prepare) == null || R.call(a);
|
|
711
716
|
const S = X(
|
|
712
717
|
{
|
|
713
|
-
...
|
|
718
|
+
...a,
|
|
714
719
|
onEnd: () => {
|
|
715
|
-
var
|
|
716
|
-
t = null, (
|
|
720
|
+
var E;
|
|
721
|
+
t = null, (E = a.onEnd) == null || E.call(a);
|
|
717
722
|
}
|
|
718
723
|
},
|
|
719
724
|
d
|
|
720
725
|
);
|
|
721
|
-
|
|
722
|
-
const A =
|
|
726
|
+
a.wait && await a.wait();
|
|
727
|
+
const A = D.fromState(g.state, {
|
|
723
728
|
config: S,
|
|
724
729
|
from: g.from,
|
|
725
730
|
to: g.to
|
|
726
731
|
});
|
|
727
|
-
t = { controller: A, direction: "in" }, await W(), g.direction === "forward" ? A.forward() : A.backward();
|
|
728
|
-
},
|
|
729
|
-
var
|
|
732
|
+
t = { controller: A, direction: "in" }, (P = a.onReady) == null || P.call(a), await W(), g.direction === "forward" ? A.forward() : A.backward();
|
|
733
|
+
}, f = async (d) => {
|
|
734
|
+
var P, E;
|
|
730
735
|
i = d;
|
|
731
|
-
const
|
|
736
|
+
const u = e(), C = !(n != null && n.strategy) && u.in ? u.in(d) : void 0, y = u.out && u.out(d);
|
|
732
737
|
if (!y)
|
|
733
738
|
return;
|
|
734
|
-
const
|
|
735
|
-
in: C ?
|
|
736
|
-
out:
|
|
737
|
-
}, g = await
|
|
739
|
+
const V = {
|
|
740
|
+
in: C ? M(C) : void 0,
|
|
741
|
+
out: M(y)
|
|
742
|
+
}, g = await c.runOut(V);
|
|
738
743
|
if (!g.config) {
|
|
739
744
|
t && (t.direction = "out"), i && (i.remove(), i = null);
|
|
740
745
|
return;
|
|
741
746
|
}
|
|
742
|
-
const
|
|
743
|
-
|
|
747
|
+
const a = g.config;
|
|
748
|
+
R(), (P = a.prepare) == null || P.call(a);
|
|
744
749
|
const S = X(
|
|
745
750
|
{
|
|
746
|
-
...
|
|
751
|
+
...a,
|
|
747
752
|
onEnd: () => {
|
|
748
|
-
var
|
|
749
|
-
(
|
|
753
|
+
var I, k;
|
|
754
|
+
(I = a.onEnd) == null || I.call(a), i && (i.remove(), i = null), t = null, (k = n == null ? void 0 : n.onCleanupEnd) == null || k.call(n);
|
|
750
755
|
}
|
|
751
756
|
},
|
|
752
757
|
d
|
|
753
758
|
);
|
|
754
|
-
|
|
755
|
-
const A =
|
|
759
|
+
a.wait && await a.wait();
|
|
760
|
+
const A = D.fromState(g.state, {
|
|
756
761
|
config: S,
|
|
757
762
|
from: g.from,
|
|
758
763
|
to: g.to
|
|
759
764
|
});
|
|
760
|
-
t = { controller: A, direction: "out" }, await W(), g.direction === "forward" ? A.forward() : A.backward();
|
|
761
|
-
function
|
|
765
|
+
t = { controller: A, direction: "out" }, (E = a.onReady) == null || E.call(a), await W(), g.direction === "forward" ? A.forward() : A.backward();
|
|
766
|
+
function R() {
|
|
762
767
|
!r || !i || (o && r.contains(o) ? r.insertBefore(i, o) : r.appendChild(i));
|
|
763
768
|
}
|
|
764
769
|
};
|
|
@@ -766,26 +771,26 @@ function wt(e, n) {
|
|
|
766
771
|
const w = (d) => () => {
|
|
767
772
|
if (p) return;
|
|
768
773
|
p = !0;
|
|
769
|
-
const
|
|
774
|
+
const u = d.cloneNode(!0);
|
|
770
775
|
h ? queueMicrotask(() => {
|
|
771
|
-
document.contains(h) && u
|
|
772
|
-
}) : u
|
|
776
|
+
document.contains(h) && f(u);
|
|
777
|
+
}) : f(u);
|
|
773
778
|
};
|
|
774
779
|
return (d) => {
|
|
775
780
|
if (d)
|
|
776
781
|
return requestAnimationFrame(() => {
|
|
777
782
|
r = d.parentElement, o = d.nextElementSibling;
|
|
778
783
|
}), p = !1, (n == null ? void 0 : n.scope) === "local" ? queueMicrotask(() => {
|
|
779
|
-
h =
|
|
784
|
+
h = gt(d), !(h && !ht(h)) && s(d);
|
|
780
785
|
}) : s(d), w(d);
|
|
781
786
|
};
|
|
782
787
|
}
|
|
783
|
-
const
|
|
784
|
-
let
|
|
788
|
+
const b = /* @__PURE__ */ new Map();
|
|
789
|
+
let T = null, N = !1;
|
|
785
790
|
function Z(e) {
|
|
786
|
-
if (e instanceof HTMLElement &&
|
|
787
|
-
const t =
|
|
788
|
-
|
|
791
|
+
if (e instanceof HTMLElement && b.has(e)) {
|
|
792
|
+
const t = b.get(e);
|
|
793
|
+
b.delete(e), queueMicrotask(() => {
|
|
789
794
|
t();
|
|
790
795
|
});
|
|
791
796
|
}
|
|
@@ -795,8 +800,8 @@ function Z(e) {
|
|
|
795
800
|
i && Z(i);
|
|
796
801
|
}
|
|
797
802
|
}
|
|
798
|
-
function
|
|
799
|
-
N || typeof document > "u" || (N = !0,
|
|
803
|
+
function vt() {
|
|
804
|
+
N || typeof document > "u" || (N = !0, T = new MutationObserver((e) => {
|
|
800
805
|
for (const n of e) {
|
|
801
806
|
const t = n.removedNodes;
|
|
802
807
|
for (let i = 0; i < t.length; i++) {
|
|
@@ -804,13 +809,13 @@ function yt() {
|
|
|
804
809
|
r && Z(r);
|
|
805
810
|
}
|
|
806
811
|
}
|
|
807
|
-
}), document.body ?
|
|
812
|
+
}), document.body ? T.observe(document.body, {
|
|
808
813
|
childList: !0,
|
|
809
814
|
subtree: !0
|
|
810
815
|
}) : document.addEventListener(
|
|
811
816
|
"DOMContentLoaded",
|
|
812
817
|
() => {
|
|
813
|
-
|
|
818
|
+
T == null || T.observe(document.body, {
|
|
814
819
|
childList: !0,
|
|
815
820
|
subtree: !0
|
|
816
821
|
});
|
|
@@ -818,48 +823,48 @@ function yt() {
|
|
|
818
823
|
{ once: !0 }
|
|
819
824
|
));
|
|
820
825
|
}
|
|
821
|
-
function
|
|
822
|
-
|
|
826
|
+
function St(e, n) {
|
|
827
|
+
vt(), b.set(e, n);
|
|
823
828
|
}
|
|
824
|
-
function
|
|
825
|
-
return
|
|
829
|
+
function Mt(e) {
|
|
830
|
+
return b.has(e);
|
|
826
831
|
}
|
|
827
|
-
function
|
|
828
|
-
return
|
|
832
|
+
function xt() {
|
|
833
|
+
return b.size;
|
|
829
834
|
}
|
|
830
|
-
function
|
|
831
|
-
const n =
|
|
832
|
-
return n ? (
|
|
835
|
+
function Ot(e) {
|
|
836
|
+
const n = b.get(e);
|
|
837
|
+
return n ? (b.delete(e), n(), !0) : !1;
|
|
833
838
|
}
|
|
834
|
-
function
|
|
835
|
-
|
|
839
|
+
function Lt() {
|
|
840
|
+
b.clear(), T == null || T.disconnect(), T = null, N = !1;
|
|
836
841
|
}
|
|
837
|
-
const
|
|
838
|
-
function
|
|
839
|
-
|
|
842
|
+
const L = /* @__PURE__ */ new Map(), U = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map();
|
|
843
|
+
function Ct(e, n, t) {
|
|
844
|
+
L.set(e, n);
|
|
840
845
|
let i = U.get(e);
|
|
841
846
|
if (i)
|
|
842
847
|
return i;
|
|
843
848
|
const r = n;
|
|
844
|
-
return i =
|
|
849
|
+
return i = yt(
|
|
845
850
|
() => {
|
|
846
|
-
const o =
|
|
851
|
+
const o = L.get(e);
|
|
847
852
|
return o || (console.warn(`Transition "${String(e)}" not found`), {});
|
|
848
853
|
},
|
|
849
854
|
{
|
|
850
855
|
strategy: t == null ? void 0 : t.strategy,
|
|
851
856
|
scope: t == null ? void 0 : t.scope,
|
|
852
857
|
onCleanupEnd: () => {
|
|
853
|
-
|
|
858
|
+
L.get(e) === r && At(e);
|
|
854
859
|
}
|
|
855
860
|
}
|
|
856
861
|
), U.set(e, i), i;
|
|
857
862
|
}
|
|
858
|
-
function
|
|
859
|
-
|
|
863
|
+
function At(e) {
|
|
864
|
+
L.delete(e), U.delete(e), H.delete(e);
|
|
860
865
|
}
|
|
861
|
-
function
|
|
862
|
-
const t =
|
|
866
|
+
function Dt(e, n = "manual") {
|
|
867
|
+
const t = Ct(
|
|
863
868
|
e.key,
|
|
864
869
|
{
|
|
865
870
|
in: e.in,
|
|
@@ -876,11 +881,11 @@ function Lt(e, n = "manual") {
|
|
|
876
881
|
return i || (i = (r) => {
|
|
877
882
|
if (r) {
|
|
878
883
|
const o = t(r);
|
|
879
|
-
o &&
|
|
884
|
+
o && St(r, o);
|
|
880
885
|
}
|
|
881
886
|
}, H.set(e.key, i), i);
|
|
882
887
|
}
|
|
883
|
-
function
|
|
888
|
+
function Et(e) {
|
|
884
889
|
const n = e.filter((t) => t.symmetric).map((t) => ({
|
|
885
890
|
from: t.to,
|
|
886
891
|
to: t.from,
|
|
@@ -888,36 +893,38 @@ function At(e) {
|
|
|
888
893
|
}));
|
|
889
894
|
return [...e, ...n];
|
|
890
895
|
}
|
|
891
|
-
function
|
|
896
|
+
function Tt(e) {
|
|
892
897
|
let n = !1, t = 0, i = 0, r = !1;
|
|
893
|
-
const o = 50,
|
|
898
|
+
const o = 50, l = (d) => {
|
|
894
899
|
if (!e) return;
|
|
895
|
-
const
|
|
896
|
-
|
|
897
|
-
},
|
|
900
|
+
const u = d.touches[0];
|
|
901
|
+
u && (r = u.clientX < o, r && (t = u.clientX, i = u.clientY));
|
|
902
|
+
}, c = (d) => {
|
|
898
903
|
if (!e || !r) return;
|
|
899
|
-
const
|
|
900
|
-
if (!
|
|
901
|
-
const C =
|
|
904
|
+
const u = d.touches[0];
|
|
905
|
+
if (!u) return;
|
|
906
|
+
const C = u.clientX - t, y = u.clientY - i;
|
|
902
907
|
C > window.outerWidth / 2 - 5 && Math.abs(C) > Math.abs(y) ? n = !0 : n = !1;
|
|
903
908
|
}, s = () => {
|
|
904
909
|
e && (r = !1, t = 0, i = 0);
|
|
905
|
-
},
|
|
906
|
-
typeof window > "u" || e && (window.addEventListener("touchstart",
|
|
910
|
+
}, f = () => n, h = () => {
|
|
911
|
+
typeof window > "u" || e && (window.addEventListener("touchstart", l, { passive: !0 }), window.addEventListener("touchmove", c, { passive: !0 }), window.addEventListener("touchend", s, { passive: !0 }));
|
|
907
912
|
}, p = () => {
|
|
908
|
-
typeof window > "u" || (window.removeEventListener("touchstart",
|
|
913
|
+
typeof window > "u" || (window.removeEventListener("touchstart", l), window.removeEventListener("touchmove", c), window.removeEventListener("touchend", s));
|
|
909
914
|
};
|
|
910
915
|
let w = 0;
|
|
911
916
|
return {
|
|
912
917
|
initialize: h,
|
|
913
918
|
cleanup: p,
|
|
914
|
-
isSwipePending:
|
|
919
|
+
isSwipePending: f,
|
|
915
920
|
resetSwipeDetection: () => {
|
|
916
|
-
|
|
921
|
+
requestAnimationFrame(() => {
|
|
922
|
+
w++, w > 1 && (w = 0, n = !1);
|
|
923
|
+
});
|
|
917
924
|
}
|
|
918
925
|
};
|
|
919
926
|
}
|
|
920
|
-
function
|
|
927
|
+
function bt() {
|
|
921
928
|
let e = null, n = null;
|
|
922
929
|
const t = /* @__PURE__ */ new Map();
|
|
923
930
|
let i = null;
|
|
@@ -929,7 +936,7 @@ function Tt() {
|
|
|
929
936
|
};
|
|
930
937
|
return {
|
|
931
938
|
initializeContext: (h, p) => {
|
|
932
|
-
n = h, e || (e =
|
|
939
|
+
n = h, e || (e = pt(h), (e === document.documentElement ? window : e).addEventListener("scroll", r, {
|
|
933
940
|
passive: !0
|
|
934
941
|
})), i = p;
|
|
935
942
|
},
|
|
@@ -941,11 +948,11 @@ function Tt() {
|
|
|
941
948
|
};
|
|
942
949
|
},
|
|
943
950
|
getScrollContainer: () => e,
|
|
944
|
-
getPositionedParentElement: () => n ?
|
|
951
|
+
getPositionedParentElement: () => n ? wt(n) : document.body,
|
|
945
952
|
getScrollPosition: (h) => h && t.has(h) ? t.get(h) : { x: 0, y: 0 }
|
|
946
953
|
};
|
|
947
954
|
}
|
|
948
|
-
function
|
|
955
|
+
function O(e, n) {
|
|
949
956
|
if (n === "*")
|
|
950
957
|
return !0;
|
|
951
958
|
if (n.endsWith("/*")) {
|
|
@@ -956,14 +963,14 @@ function x(e, n) {
|
|
|
956
963
|
}
|
|
957
964
|
function G(e, n, t) {
|
|
958
965
|
for (const i of t)
|
|
959
|
-
if (
|
|
966
|
+
if (O(e, i.from) && O(n, i.to))
|
|
960
967
|
return i.transition;
|
|
961
968
|
for (const i of t)
|
|
962
|
-
if ((i.from === "*" ||
|
|
969
|
+
if ((i.from === "*" || O(e, i.from)) && (i.to === "*" || O(n, i.to)))
|
|
963
970
|
return i.transition;
|
|
964
971
|
return null;
|
|
965
972
|
}
|
|
966
|
-
function
|
|
973
|
+
function kt() {
|
|
967
974
|
let e = null;
|
|
968
975
|
function n() {
|
|
969
976
|
if (e != null && e.from && (e != null && e.to) && (e != null && e.outResolve) && (e != null && e.inResolve)) {
|
|
@@ -982,7 +989,7 @@ function bt() {
|
|
|
982
989
|
}
|
|
983
990
|
};
|
|
984
991
|
}
|
|
985
|
-
function
|
|
992
|
+
function Rt() {
|
|
986
993
|
let e = null;
|
|
987
994
|
function n() {
|
|
988
995
|
var i, r;
|
|
@@ -1005,41 +1012,45 @@ function kt() {
|
|
|
1005
1012
|
}
|
|
1006
1013
|
};
|
|
1007
1014
|
}
|
|
1008
|
-
function
|
|
1015
|
+
function zt(e, n) {
|
|
1009
1016
|
const {
|
|
1010
1017
|
transitions: t = [],
|
|
1011
1018
|
defaultTransition: i,
|
|
1012
|
-
middleware: r = (g,
|
|
1019
|
+
middleware: r = (g, a) => ({ from: g, to: a }),
|
|
1013
1020
|
// Identity function as default
|
|
1014
1021
|
skipOnIosSwipe: o = !0
|
|
1015
1022
|
// Default to true - skip animations on iOS swipe
|
|
1016
|
-
} = e, { outFirst:
|
|
1023
|
+
} = e, { outFirst: l = !0, createNavigationDetector: c } = n || {}, s = (c == null ? void 0 : c()) ?? (l ? kt() : Rt()), f = Et(t), {
|
|
1017
1024
|
initializeContext: h,
|
|
1018
1025
|
calculateScrollOffset: p,
|
|
1019
1026
|
getScrollContainer: w,
|
|
1020
1027
|
getPositionedParentElement: v,
|
|
1021
1028
|
getScrollPosition: d
|
|
1022
|
-
} =
|
|
1023
|
-
|
|
1024
|
-
const C = async (g,
|
|
1025
|
-
if (
|
|
1026
|
-
return
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
+
} = bt(), u = Tt(o);
|
|
1030
|
+
u.initialize();
|
|
1031
|
+
const C = async (g, a) => {
|
|
1032
|
+
if (u.isSwipePending())
|
|
1033
|
+
return u.resetSwipeDetection(), a === "in" ? async (k) => ({
|
|
1034
|
+
onReady: () => {
|
|
1035
|
+
k.style.visibility = "visible";
|
|
1036
|
+
}
|
|
1037
|
+
}) : () => ({});
|
|
1038
|
+
s.trigger(g, a);
|
|
1039
|
+
const S = await s.get(a);
|
|
1029
1040
|
if (!S) return () => ({});
|
|
1030
|
-
const { from: A, to:
|
|
1041
|
+
const { from: A, to: R } = r(
|
|
1031
1042
|
S.from,
|
|
1032
1043
|
S.to
|
|
1033
|
-
),
|
|
1044
|
+
), E = G(
|
|
1034
1045
|
A,
|
|
1035
|
-
|
|
1036
|
-
|
|
1046
|
+
R,
|
|
1047
|
+
f
|
|
1037
1048
|
) || i;
|
|
1038
|
-
if (!
|
|
1039
|
-
const
|
|
1040
|
-
if (
|
|
1041
|
-
const
|
|
1042
|
-
scrollOffset:
|
|
1049
|
+
if (!E) return () => ({});
|
|
1050
|
+
const I = p(S.from, S.to);
|
|
1051
|
+
if (a === "out") {
|
|
1052
|
+
const k = {
|
|
1053
|
+
scrollOffset: I,
|
|
1043
1054
|
scroll: d(S.from),
|
|
1044
1055
|
get scrollingElement() {
|
|
1045
1056
|
return w() || document.documentElement;
|
|
@@ -1048,10 +1059,10 @@ function Dt(e, n) {
|
|
|
1048
1059
|
return v();
|
|
1049
1060
|
}
|
|
1050
1061
|
};
|
|
1051
|
-
return (
|
|
1062
|
+
return (F) => E.out(F, k);
|
|
1052
1063
|
} else {
|
|
1053
|
-
const
|
|
1054
|
-
scrollOffset:
|
|
1064
|
+
const k = {
|
|
1065
|
+
scrollOffset: I,
|
|
1055
1066
|
get scroll() {
|
|
1056
1067
|
return d(S.to);
|
|
1057
1068
|
},
|
|
@@ -1062,54 +1073,56 @@ function Dt(e, n) {
|
|
|
1062
1073
|
return v();
|
|
1063
1074
|
}
|
|
1064
1075
|
};
|
|
1065
|
-
return async (
|
|
1066
|
-
const z = await Promise.resolve(
|
|
1067
|
-
return z.
|
|
1068
|
-
|
|
1076
|
+
return async (F) => {
|
|
1077
|
+
const z = await Promise.resolve(E.in(F, k)), q = z.onReady;
|
|
1078
|
+
return z.onReady = () => {
|
|
1079
|
+
F.style.visibility = "visible", q == null || q();
|
|
1069
1080
|
}, z;
|
|
1070
1081
|
};
|
|
1071
1082
|
}
|
|
1072
1083
|
}, y = (g) => ({
|
|
1073
1084
|
key: g,
|
|
1074
|
-
in: async (
|
|
1075
|
-
out: async (
|
|
1085
|
+
in: async (a) => (h(a, g), (await C(g, "in"))(a)),
|
|
1086
|
+
out: async (a) => (await C(g, "out"))(a),
|
|
1076
1087
|
// Add page transition strategy for page-level transitions
|
|
1077
|
-
[B]:
|
|
1078
|
-
}),
|
|
1079
|
-
|
|
1088
|
+
[B]: dt
|
|
1089
|
+
}), V = (g, a) => {
|
|
1090
|
+
if (u.isSwipePending())
|
|
1091
|
+
return !1;
|
|
1092
|
+
const { from: S, to: A } = r(g, a);
|
|
1080
1093
|
return !!(G(
|
|
1081
1094
|
S,
|
|
1082
1095
|
A,
|
|
1083
|
-
|
|
1096
|
+
f
|
|
1084
1097
|
) || i);
|
|
1085
1098
|
};
|
|
1086
|
-
return
|
|
1099
|
+
return c ? {
|
|
1087
1100
|
getTransition: y,
|
|
1088
|
-
hasMatchingTransition:
|
|
1101
|
+
hasMatchingTransition: V
|
|
1089
1102
|
} : y;
|
|
1090
1103
|
}
|
|
1091
1104
|
export {
|
|
1092
1105
|
J as SCOPE_ATTR,
|
|
1093
1106
|
Q as SCOPE_READY_ATTR,
|
|
1094
1107
|
B as TRANSITION_STRATEGY,
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1108
|
+
Rt as createAnyOrderDetector,
|
|
1109
|
+
mt as createDefaultStrategy,
|
|
1110
|
+
kt as createOutFirstDetector,
|
|
1111
|
+
dt as createPageTransitionStrategy,
|
|
1112
|
+
zt as createSggoiTransitionContext,
|
|
1113
|
+
Ft as createTransitionScope,
|
|
1114
|
+
gt as findScope,
|
|
1115
|
+
xt as getWatchedCount,
|
|
1116
|
+
Nt as isCssAnimation,
|
|
1117
|
+
Ut as isMultiAnimation,
|
|
1118
|
+
ht as isScopeReady,
|
|
1119
|
+
Ht as isSingleAnimation,
|
|
1120
|
+
Xt as isTickAnimation,
|
|
1121
|
+
Mt as isWatched,
|
|
1109
1122
|
X as normalizeSchedule,
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1123
|
+
M as normalizeToMultiAnimation,
|
|
1124
|
+
Lt as resetObserver,
|
|
1125
|
+
Dt as transition,
|
|
1126
|
+
Ot as triggerUnmount,
|
|
1127
|
+
St as watchUnmount
|
|
1115
1128
|
};
|