@ssgoi/core 6.5.0-beta.0 → 6.5.0-beta.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/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var $ = (e, t, n) =>
|
|
4
|
-
import { P as
|
|
5
|
-
import { A as
|
|
1
|
+
var Mt = Object.defineProperty;
|
|
2
|
+
var Ut = (e, t, n) => t in e ? Mt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var $ = (e, t, n) => Ut(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { P as K, V as Dt, W as g, M as C, S as Vt } from "./multi-animation-CnxqLEka.js";
|
|
5
|
+
import { A as Fs } from "./multi-animation-CnxqLEka.js";
|
|
6
6
|
function v(e, t) {
|
|
7
7
|
const n = [];
|
|
8
8
|
for (let s = 0; s < e.length; s++)
|
|
@@ -17,7 +17,7 @@ function v(e, t) {
|
|
|
17
17
|
}
|
|
18
18
|
return n;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function vt(e, t) {
|
|
21
21
|
return [
|
|
22
22
|
{
|
|
23
23
|
from: e.exit,
|
|
@@ -31,7 +31,7 @@ function Dt(e, t) {
|
|
|
31
31
|
}
|
|
32
32
|
];
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function G(e, t, n) {
|
|
35
35
|
const s = [];
|
|
36
36
|
for (let o = 0; o < e.length; o++)
|
|
37
37
|
for (let i = o + 1; i < e.length; i++) {
|
|
@@ -51,7 +51,7 @@ function J(e, t, n) {
|
|
|
51
51
|
}
|
|
52
52
|
return s;
|
|
53
53
|
}
|
|
54
|
-
class
|
|
54
|
+
class k {
|
|
55
55
|
constructor(t) {
|
|
56
56
|
$(this, "omega");
|
|
57
57
|
// Angular frequency
|
|
@@ -60,7 +60,7 @@ class Y {
|
|
|
60
60
|
$(this, "restDelta");
|
|
61
61
|
$(this, "restSpeed");
|
|
62
62
|
const { stiffness: n, damping: s } = t, o = 1;
|
|
63
|
-
this.omega = Math.sqrt(n / o), this.zeta = s / (2 * Math.sqrt(n * o)), this.restDelta = t.restDelta ??
|
|
63
|
+
this.omega = Math.sqrt(n / o), this.zeta = s / (2 * Math.sqrt(n * o)), this.restDelta = t.restDelta ?? K, this.restSpeed = t.restSpeed ?? Dt;
|
|
64
64
|
}
|
|
65
65
|
step(t, n, s) {
|
|
66
66
|
const o = Math.min(s, 0.033), { omega: i, zeta: r } = this, { position: l, velocity: c } = t, a = -2 * o * r * i * c, p = o * i * i * (n - l), d = c + a + p;
|
|
@@ -74,20 +74,20 @@ class Y {
|
|
|
74
74
|
return s < this.restDelta && o < this.restSpeed;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
class
|
|
77
|
+
class Rt {
|
|
78
78
|
constructor(t) {
|
|
79
79
|
$(this, "leader");
|
|
80
80
|
$(this, "follower");
|
|
81
81
|
$(this, "restDelta");
|
|
82
82
|
$(this, "restSpeed");
|
|
83
|
-
this.restDelta = t.restDelta ??
|
|
83
|
+
this.restDelta = t.restDelta ?? K, this.restSpeed = t.restSpeed ?? Dt, this.leader = new k({
|
|
84
84
|
stiffness: t.stiffness,
|
|
85
85
|
damping: t.damping,
|
|
86
86
|
restDelta: this.restDelta,
|
|
87
87
|
restSpeed: this.restSpeed
|
|
88
88
|
});
|
|
89
89
|
let n, s, o, i;
|
|
90
|
-
typeof t.follower == "number" ? (n = t.stiffness * t.follower, s = t.damping) : t.follower ? (n = t.follower.stiffness, s = t.follower.damping, o = t.follower.restDelta, i = t.follower.restSpeed) : (n = t.stiffness, s = t.damping), this.follower = new
|
|
90
|
+
typeof t.follower == "number" ? (n = t.stiffness * t.follower, s = t.damping) : t.follower ? (n = t.follower.stiffness, s = t.follower.damping, o = t.follower.restDelta, i = t.follower.restSpeed) : (n = t.stiffness, s = t.damping), this.follower = new k({
|
|
91
91
|
stiffness: n,
|
|
92
92
|
damping: s,
|
|
93
93
|
restDelta: o ?? this.restDelta,
|
|
@@ -115,7 +115,7 @@ class Vt {
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
const zt = 0.01, Nt = 500, Xt = 10;
|
|
118
|
-
class
|
|
118
|
+
class Bt {
|
|
119
119
|
constructor(t) {
|
|
120
120
|
$(this, "acceleration");
|
|
121
121
|
$(this, "resistance");
|
|
@@ -131,8 +131,8 @@ class Rt {
|
|
|
131
131
|
const o = Math.min(s, 0.033), { acceleration: i, resistance: r, resistanceType: l, min: c, max: a } = this, { position: p, velocity: d } = t, f = c !== void 0 && p < c, u = a !== void 0 && p > a;
|
|
132
132
|
let y;
|
|
133
133
|
if (f || u) {
|
|
134
|
-
const b = p - (f ? c : a), x = -this.bounceStiffness * b,
|
|
135
|
-
y = x +
|
|
134
|
+
const b = p - (f ? c : a), x = -this.bounceStiffness * b, E = -this.bounceDamping * d;
|
|
135
|
+
y = x + E;
|
|
136
136
|
} else {
|
|
137
137
|
const S = n > p ? 1 : -1;
|
|
138
138
|
let b;
|
|
@@ -167,7 +167,7 @@ class m {
|
|
|
167
167
|
"Cannot use both 'spring' and 'inertia' together. Choose one physics type."
|
|
168
168
|
);
|
|
169
169
|
if (t.inertia)
|
|
170
|
-
return new
|
|
170
|
+
return new Bt({
|
|
171
171
|
acceleration: t.inertia.acceleration,
|
|
172
172
|
resistance: t.inertia.resistance,
|
|
173
173
|
resistanceType: t.inertia.resistanceType,
|
|
@@ -184,7 +184,7 @@ class m {
|
|
|
184
184
|
return typeof s == "number" ? o = s : typeof s == "object" && (o = {
|
|
185
185
|
stiffness: s.stiffness,
|
|
186
186
|
damping: s.damping
|
|
187
|
-
}), new
|
|
187
|
+
}), new Rt({
|
|
188
188
|
stiffness: n.stiffness,
|
|
189
189
|
damping: n.damping,
|
|
190
190
|
follower: o,
|
|
@@ -192,7 +192,7 @@ class m {
|
|
|
192
192
|
restSpeed: n.restSpeed
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
|
-
return new
|
|
195
|
+
return new k({
|
|
196
196
|
stiffness: n.stiffness,
|
|
197
197
|
damping: n.damping,
|
|
198
198
|
restDelta: n.restDelta,
|
|
@@ -207,7 +207,7 @@ class m {
|
|
|
207
207
|
return m.from({ spring: t });
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
-
class
|
|
210
|
+
class Wt {
|
|
211
211
|
constructor(t) {
|
|
212
212
|
$(this, "durationSec");
|
|
213
213
|
this.durationSec = Math.max(1 / 60, t.durationSec);
|
|
@@ -219,10 +219,10 @@ class Bt {
|
|
|
219
219
|
return (i > 0 ? c >= n : c <= n) ? { position: n, velocity: 0 } : { position: c, velocity: i * r };
|
|
220
220
|
}
|
|
221
221
|
isSettled(t, n) {
|
|
222
|
-
return Math.abs(t.position - n) <
|
|
222
|
+
return Math.abs(t.position - n) < K;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function J(e, t) {
|
|
226
226
|
function n(i) {
|
|
227
227
|
let r = 0, l = 0;
|
|
228
228
|
const c = i.offsetWidth, a = i.offsetHeight;
|
|
@@ -240,7 +240,7 @@ function A(e, t) {
|
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
242
|
function I(e, t) {
|
|
243
|
-
const { scrollingElement: n, positionedParent: s } = e, o = n !== s && n.contains(s) ?
|
|
243
|
+
const { scrollingElement: n, positionedParent: s } = e, o = n !== s && n.contains(s) ? J(n, s).top : 0;
|
|
244
244
|
return {
|
|
245
245
|
top: e[t].scroll.y,
|
|
246
246
|
left: 0,
|
|
@@ -257,7 +257,7 @@ const tt = 8, et = {
|
|
|
257
257
|
restSpeed: 0.1
|
|
258
258
|
}
|
|
259
259
|
};
|
|
260
|
-
function
|
|
260
|
+
function Zt({
|
|
261
261
|
direction: e
|
|
262
262
|
}) {
|
|
263
263
|
const t = e === "forward" ? tt : -tt;
|
|
@@ -282,22 +282,22 @@ function Wt({
|
|
|
282
282
|
}
|
|
283
283
|
};
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function qt() {
|
|
286
286
|
return {
|
|
287
287
|
outPhysics: et,
|
|
288
288
|
inPhysics: et,
|
|
289
289
|
// Both sides run together — the cross-fade is the whole point of the
|
|
290
290
|
// snappy feel. (fluid's sibling uses staggered fade-through.)
|
|
291
291
|
composition: { mode: "parallel", startAt: [0, 0] },
|
|
292
|
-
build:
|
|
292
|
+
build: Zt
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
|
-
const nt = 30,
|
|
295
|
+
const nt = 30, jt = {
|
|
296
296
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
297
|
-
},
|
|
297
|
+
}, Kt = {
|
|
298
298
|
spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
|
|
299
299
|
};
|
|
300
|
-
function
|
|
300
|
+
function Gt({
|
|
301
301
|
direction: e
|
|
302
302
|
}) {
|
|
303
303
|
const t = e === "forward" ? 1 : -1, n = -nt * t, s = nt * t;
|
|
@@ -323,26 +323,26 @@ function Kt({
|
|
|
323
323
|
}
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function Jt() {
|
|
327
327
|
return {
|
|
328
|
-
outPhysics:
|
|
329
|
-
inPhysics:
|
|
328
|
+
outPhysics: jt,
|
|
329
|
+
inPhysics: Kt,
|
|
330
330
|
// Phased motion: outgoing falls away first under inertia, then incoming
|
|
331
331
|
// springs in. The fade-through shape comes from the integrator curves
|
|
332
332
|
// plus the sequence handoff, not from FADE_SPLIT inside animate(t).
|
|
333
333
|
composition: { mode: "sequence" },
|
|
334
|
-
build:
|
|
334
|
+
build: Gt
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
|
-
const
|
|
338
|
-
snappy:
|
|
339
|
-
fluid:
|
|
340
|
-
}, st = 8,
|
|
337
|
+
const Qt = {
|
|
338
|
+
snappy: qt(),
|
|
339
|
+
fluid: Jt()
|
|
340
|
+
}, st = 8, te = {
|
|
341
341
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
342
|
-
},
|
|
342
|
+
}, ee = {
|
|
343
343
|
spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
|
|
344
344
|
};
|
|
345
|
-
function
|
|
345
|
+
function ne({
|
|
346
346
|
direction: e
|
|
347
347
|
}) {
|
|
348
348
|
const t = e === "forward" ? 1 : -1, n = -st * t, s = st * t;
|
|
@@ -368,21 +368,21 @@ function ee({
|
|
|
368
368
|
}
|
|
369
369
|
};
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function se() {
|
|
372
372
|
return {
|
|
373
|
-
outPhysics:
|
|
374
|
-
inPhysics:
|
|
373
|
+
outPhysics: te,
|
|
374
|
+
inPhysics: ee,
|
|
375
375
|
composition: { mode: "sequence" },
|
|
376
|
-
build:
|
|
376
|
+
build: ne
|
|
377
377
|
};
|
|
378
378
|
}
|
|
379
|
-
const
|
|
379
|
+
const oe = 8, ie = {
|
|
380
380
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
381
|
-
},
|
|
381
|
+
}, re = {
|
|
382
382
|
spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
|
|
383
383
|
};
|
|
384
|
-
function
|
|
385
|
-
const t =
|
|
384
|
+
function ae(e) {
|
|
385
|
+
const t = oe;
|
|
386
386
|
return {
|
|
387
387
|
out: {
|
|
388
388
|
willChange: "opacity",
|
|
@@ -404,32 +404,32 @@ function re(e) {
|
|
|
404
404
|
}
|
|
405
405
|
};
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function le() {
|
|
408
408
|
return {
|
|
409
|
-
outPhysics:
|
|
410
|
-
inPhysics:
|
|
409
|
+
outPhysics: ie,
|
|
410
|
+
inPhysics: re,
|
|
411
411
|
composition: { mode: "sequence" },
|
|
412
|
-
build:
|
|
412
|
+
build: ae
|
|
413
413
|
};
|
|
414
414
|
}
|
|
415
|
-
const ot =
|
|
415
|
+
const ot = se(), ce = {
|
|
416
416
|
snappy: ot,
|
|
417
417
|
directional: ot,
|
|
418
|
-
"non-directional":
|
|
418
|
+
"non-directional": le()
|
|
419
419
|
}, it = {
|
|
420
420
|
spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
|
|
421
|
-
},
|
|
422
|
-
function
|
|
421
|
+
}, M = 0.1, U = 1 / 3, rt = (e) => Math.max(0, Math.min(1, e));
|
|
422
|
+
function pe({
|
|
423
423
|
direction: e
|
|
424
424
|
}) {
|
|
425
|
-
const t = e === "forward" ? 1 : -1, n = 1 - t *
|
|
425
|
+
const t = e === "forward" ? 1 : -1, n = 1 - t * M;
|
|
426
426
|
return {
|
|
427
427
|
out: {
|
|
428
428
|
willChange: "transform, opacity",
|
|
429
429
|
startStyle: {},
|
|
430
430
|
animate: (s) => ({
|
|
431
|
-
transform: `scale(${1 + t * s *
|
|
432
|
-
opacity: `${rt(1 - s /
|
|
431
|
+
transform: `scale(${1 + t * s * M})`,
|
|
432
|
+
opacity: `${rt(1 - s / U)}`
|
|
433
433
|
})
|
|
434
434
|
},
|
|
435
435
|
in: {
|
|
@@ -439,82 +439,82 @@ function ce({
|
|
|
439
439
|
opacity: "0"
|
|
440
440
|
},
|
|
441
441
|
animate: (s) => ({
|
|
442
|
-
transform: `scale(${n + t * s *
|
|
443
|
-
opacity: `${rt((s -
|
|
442
|
+
transform: `scale(${n + t * s * M})`,
|
|
443
|
+
opacity: `${rt((s - U) / (1 - U))}`
|
|
444
444
|
})
|
|
445
445
|
}
|
|
446
446
|
};
|
|
447
447
|
}
|
|
448
|
-
function
|
|
448
|
+
function de() {
|
|
449
449
|
return {
|
|
450
450
|
outPhysics: it,
|
|
451
451
|
inPhysics: it,
|
|
452
452
|
// Scale must move together on both sides; fade-through is encoded inside
|
|
453
453
|
// each tick (piecewise), not via composition staggering — so parallel.
|
|
454
454
|
composition: { mode: "parallel" },
|
|
455
|
-
build:
|
|
455
|
+
build: pe
|
|
456
456
|
};
|
|
457
457
|
}
|
|
458
458
|
const at = {
|
|
459
459
|
spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
|
|
460
|
-
},
|
|
461
|
-
function
|
|
460
|
+
}, V = 0.1, R = 1 / 3, lt = (e) => Math.max(0, Math.min(1, e));
|
|
461
|
+
function fe() {
|
|
462
462
|
return {
|
|
463
463
|
out: {
|
|
464
464
|
willChange: "opacity",
|
|
465
465
|
startStyle: {},
|
|
466
466
|
animate: (e) => ({
|
|
467
|
-
opacity: `${lt(1 - e /
|
|
467
|
+
opacity: `${lt(1 - e / R)}`
|
|
468
468
|
})
|
|
469
469
|
},
|
|
470
470
|
in: {
|
|
471
471
|
willChange: "transform, opacity",
|
|
472
472
|
startStyle: {
|
|
473
|
-
transform: `scale(${1 -
|
|
473
|
+
transform: `scale(${1 - V})`,
|
|
474
474
|
opacity: "0"
|
|
475
475
|
},
|
|
476
476
|
animate: (e) => ({
|
|
477
|
-
transform: `scale(${1 -
|
|
478
|
-
opacity: `${lt((e -
|
|
477
|
+
transform: `scale(${1 - V + e * V})`,
|
|
478
|
+
opacity: `${lt((e - R) / (1 - R))}`
|
|
479
479
|
})
|
|
480
480
|
}
|
|
481
481
|
};
|
|
482
482
|
}
|
|
483
|
-
function
|
|
483
|
+
function ye() {
|
|
484
484
|
return {
|
|
485
485
|
outPhysics: at,
|
|
486
486
|
inPhysics: at,
|
|
487
487
|
composition: { mode: "parallel" },
|
|
488
|
-
build:
|
|
488
|
+
build: fe
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
|
-
const ct =
|
|
491
|
+
const ct = de(), he = {
|
|
492
492
|
snappy: ct,
|
|
493
493
|
directional: ct,
|
|
494
|
-
"non-directional":
|
|
495
|
-
},
|
|
496
|
-
x:
|
|
497
|
-
y:
|
|
498
|
-
z:
|
|
494
|
+
"non-directional": ye()
|
|
495
|
+
}, ue = {
|
|
496
|
+
x: Qt,
|
|
497
|
+
y: ce,
|
|
498
|
+
z: he
|
|
499
499
|
};
|
|
500
|
-
function
|
|
501
|
-
const n =
|
|
500
|
+
function me(e, t) {
|
|
501
|
+
const n = ue[e];
|
|
502
502
|
return n[t] ?? n.snappy;
|
|
503
503
|
}
|
|
504
|
-
const
|
|
504
|
+
const ge = "x", we = "snappy";
|
|
505
505
|
function pt(e, t) {
|
|
506
506
|
e.style.willChange = t.willChange, e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
|
|
507
507
|
for (const [n, s] of Object.entries(t.startStyle))
|
|
508
508
|
e.style[n] = s;
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function It(e) {
|
|
511
511
|
e.style.willChange = "auto", e.style.backfaceVisibility = "", e.style.contain = "", e.style.transform = "", e.style.opacity = "", e.style.clipPath = "";
|
|
512
512
|
}
|
|
513
|
-
function
|
|
514
|
-
|
|
513
|
+
function Se(e) {
|
|
514
|
+
It(e), e.style.pointerEvents = "";
|
|
515
515
|
}
|
|
516
|
-
const
|
|
517
|
-
const t = e.direction ?? "forward", n = e.type ??
|
|
516
|
+
const be = (e = {}) => {
|
|
517
|
+
const t = e.direction ?? "forward", n = e.type ?? ge, s = e.feel ?? we, o = me(n, s), i = o.build({ direction: t });
|
|
518
518
|
return {
|
|
519
519
|
prepare: ({ from: r, to: l }) => (r.then((c) => {
|
|
520
520
|
pt(c, i.out), c.style.pointerEvents = "none";
|
|
@@ -534,31 +534,31 @@ const Se = (e = {}) => {
|
|
|
534
534
|
// covers willChange/backfaceVisibility/contain/transform/opacity (from
|
|
535
535
|
// applyStartStyle + the WAAPI final frame), pointerEvents (set in
|
|
536
536
|
// prepare), and clipPath (set above for z; harmless no-op otherwise).
|
|
537
|
-
onComplete: () =>
|
|
537
|
+
onComplete: () => Se(r)
|
|
538
538
|
}), p = new g({
|
|
539
539
|
element: l,
|
|
540
540
|
integrator: m.from(o.inPhysics),
|
|
541
541
|
style: (d) => i.in.animate(d),
|
|
542
|
-
onComplete: () =>
|
|
542
|
+
onComplete: () => It(l)
|
|
543
543
|
});
|
|
544
|
-
return new
|
|
544
|
+
return new C([a, p], o.composition);
|
|
545
545
|
}
|
|
546
546
|
};
|
|
547
547
|
};
|
|
548
|
-
function
|
|
548
|
+
function $e(e, t, n) {
|
|
549
549
|
return e === "y" ? t === "non-directional" ? "non-directional" : "directional" : e !== "x" || t === "snappy" || n === "snappy" ? "snappy" : "fluid";
|
|
550
550
|
}
|
|
551
|
-
function
|
|
552
|
-
const { paths: t } = e, n = e.type ?? "x", s = e.variant, o = e.feel, i =
|
|
553
|
-
return
|
|
551
|
+
function ws(e) {
|
|
552
|
+
const { paths: t } = e, n = e.type ?? "x", s = e.variant, o = e.feel, i = $e(n, s, o);
|
|
553
|
+
return G(
|
|
554
554
|
t,
|
|
555
555
|
{ forward: "forward", backward: "backward" },
|
|
556
|
-
(r) =>
|
|
556
|
+
(r) => be({ type: n, direction: r, feel: i })
|
|
557
557
|
);
|
|
558
558
|
}
|
|
559
|
-
const
|
|
559
|
+
const Ce = {
|
|
560
560
|
spring: { stiffness: 200, damping: 22 }
|
|
561
|
-
}, Ee = 10,
|
|
561
|
+
}, Ee = 10, xe = "horizontal", Pe = "#000000";
|
|
562
562
|
function dt(e, t, n, s, o, i) {
|
|
563
563
|
window.getComputedStyle(e).position === "static" && (e.style.position = "relative");
|
|
564
564
|
const l = document.createElement("div");
|
|
@@ -606,8 +606,8 @@ function dt(e, t, n, s, o, i) {
|
|
|
606
606
|
}
|
|
607
607
|
return e.appendChild(l), { container: l, blinds: c };
|
|
608
608
|
}
|
|
609
|
-
const
|
|
610
|
-
const t = e.blindCount ?? Ee, n = e.direction ??
|
|
609
|
+
const _e = (e = {}) => {
|
|
610
|
+
const t = e.blindCount ?? Ee, n = e.direction ?? xe, s = e.blindColor ?? Pe, o = e.physics ?? Ce;
|
|
611
611
|
return {
|
|
612
612
|
prepare: async ({ from: i, to: r }) => {
|
|
613
613
|
const l = await i, c = await r;
|
|
@@ -663,22 +663,22 @@ const Pe = (e = {}) => {
|
|
|
663
663
|
a.remove(), l.remove(), i.style.zIndex = "", i.style.position = "";
|
|
664
664
|
} : void 0
|
|
665
665
|
})
|
|
666
|
-
), f = new
|
|
667
|
-
return new
|
|
666
|
+
), f = new C(p, { mode: "parallel" }), u = new C(d, { mode: "parallel" });
|
|
667
|
+
return new C([f, u], { mode: "sequence" });
|
|
668
668
|
}
|
|
669
669
|
};
|
|
670
670
|
};
|
|
671
|
-
function
|
|
671
|
+
function Ss(e) {
|
|
672
672
|
const { paths: t, type: n = "horizontal" } = e;
|
|
673
673
|
return v(
|
|
674
674
|
t,
|
|
675
|
-
() =>
|
|
675
|
+
() => _e({ direction: n })
|
|
676
676
|
);
|
|
677
677
|
}
|
|
678
|
-
const
|
|
678
|
+
const De = {
|
|
679
679
|
spring: { stiffness: 200, damping: 20, doubleSpring: 0.7 }
|
|
680
680
|
}, O = 0.5;
|
|
681
|
-
function
|
|
681
|
+
function ve(e) {
|
|
682
682
|
const t = e === "enter" ? -100 : 100, n = e === "enter" ? 100 : -100;
|
|
683
683
|
return {
|
|
684
684
|
out: {
|
|
@@ -702,16 +702,16 @@ function De(e) {
|
|
|
702
702
|
}
|
|
703
703
|
};
|
|
704
704
|
}
|
|
705
|
-
function
|
|
705
|
+
function Ie() {
|
|
706
706
|
return {
|
|
707
|
-
physics:
|
|
708
|
-
build:
|
|
707
|
+
physics: De,
|
|
708
|
+
build: ve
|
|
709
709
|
};
|
|
710
710
|
}
|
|
711
|
-
const
|
|
711
|
+
const Te = {
|
|
712
712
|
spring: { stiffness: 170, damping: 22 }
|
|
713
713
|
};
|
|
714
|
-
function
|
|
714
|
+
function Oe(e) {
|
|
715
715
|
const t = e === "enter" ? -20 : 100, n = e === "enter" ? 100 : -20;
|
|
716
716
|
return {
|
|
717
717
|
out: {
|
|
@@ -732,23 +732,23 @@ function Te(e) {
|
|
|
732
732
|
}
|
|
733
733
|
};
|
|
734
734
|
}
|
|
735
|
-
function
|
|
735
|
+
function Ae() {
|
|
736
736
|
return {
|
|
737
|
-
physics:
|
|
738
|
-
build:
|
|
737
|
+
physics: Te,
|
|
738
|
+
build: Oe
|
|
739
739
|
};
|
|
740
740
|
}
|
|
741
|
-
const
|
|
742
|
-
parallax:
|
|
743
|
-
crossfade:
|
|
744
|
-
},
|
|
741
|
+
const Fe = {
|
|
742
|
+
parallax: Ae(),
|
|
743
|
+
crossfade: Ie()
|
|
744
|
+
}, ke = "parallax";
|
|
745
745
|
function ft(e, t) {
|
|
746
746
|
e.style.willChange = t.willChange, e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
|
|
747
747
|
for (const [n, s] of Object.entries(t.startStyle))
|
|
748
748
|
e.style[n] = s;
|
|
749
749
|
}
|
|
750
|
-
const
|
|
751
|
-
const t = e.direction ?? "enter", n =
|
|
750
|
+
const Ye = (e = {}) => {
|
|
751
|
+
const t = e.direction ?? "enter", n = Fe[e.type ?? ke], s = n.physics, o = n.build(t);
|
|
752
752
|
return {
|
|
753
753
|
prepare: ({ from: i, to: r }) => (i.then((l) => {
|
|
754
754
|
ft(l, o.out), l.style.pointerEvents = "none", l.style.zIndex = t === "enter" ? "-1" : "100";
|
|
@@ -774,26 +774,26 @@ const ke = (e = {}) => {
|
|
|
774
774
|
r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "", r.style.transform = "", r.style.opacity = "";
|
|
775
775
|
}
|
|
776
776
|
});
|
|
777
|
-
return new
|
|
777
|
+
return new C([l, c], { mode: "parallel" });
|
|
778
778
|
}
|
|
779
779
|
};
|
|
780
780
|
};
|
|
781
|
-
function
|
|
781
|
+
function Le(e) {
|
|
782
782
|
return e === "slide" || e === "crossfade" ? "crossfade" : "parallax";
|
|
783
783
|
}
|
|
784
|
-
function
|
|
785
|
-
const { enter: t, exit: n } = e, s = e.type, o =
|
|
786
|
-
return
|
|
784
|
+
function bs(e) {
|
|
785
|
+
const { enter: t, exit: n } = e, s = e.type, o = Le(s);
|
|
786
|
+
return vt(
|
|
787
787
|
{ enter: t, exit: n },
|
|
788
|
-
(i) =>
|
|
788
|
+
(i) => Ye({ direction: i, type: o })
|
|
789
789
|
);
|
|
790
790
|
}
|
|
791
|
-
const
|
|
791
|
+
const He = {
|
|
792
792
|
spring: { stiffness: 180, damping: 20, doubleSpring: !0 }
|
|
793
|
-
},
|
|
793
|
+
}, Me = {
|
|
794
794
|
spring: { stiffness: 170, damping: 20, doubleSpring: !0 }
|
|
795
|
-
},
|
|
796
|
-
const t = e.physics ??
|
|
795
|
+
}, Ue = (e = {}) => {
|
|
796
|
+
const t = e.physics ?? Me, n = e.physics ?? He;
|
|
797
797
|
return {
|
|
798
798
|
prepare: ({ to: s }) => (s.then((o) => {
|
|
799
799
|
o.style.opacity = "0", o.style.willChange = "opacity";
|
|
@@ -816,15 +816,15 @@ const Le = {
|
|
|
816
816
|
o.style.willChange = "auto", o.style.opacity = "";
|
|
817
817
|
}
|
|
818
818
|
});
|
|
819
|
-
return new
|
|
819
|
+
return new C([i, r], { mode: "sequence" });
|
|
820
820
|
}
|
|
821
821
|
};
|
|
822
822
|
};
|
|
823
|
-
function
|
|
823
|
+
function $s(e) {
|
|
824
824
|
const { paths: t } = e;
|
|
825
|
-
return v(t, () =>
|
|
825
|
+
return v(t, () => Ue());
|
|
826
826
|
}
|
|
827
|
-
const
|
|
827
|
+
const z = {
|
|
828
828
|
scaleDown: { stiffness: 20, damping: 7 },
|
|
829
829
|
translate: { stiffness: 15, damping: 7 },
|
|
830
830
|
scaleUp: { stiffness: 20, damping: 7 }
|
|
@@ -832,11 +832,11 @@ const X = {
|
|
|
832
832
|
scaleDown: 0,
|
|
833
833
|
translate: 0.2,
|
|
834
834
|
scaleUp: 0.8
|
|
835
|
-
},
|
|
835
|
+
}, Ve = 0.8, Re = "white", yt = 1e3 / 60, ze = 600;
|
|
836
836
|
function Ne(e) {
|
|
837
837
|
const { items: t, from: n, to: s, recordFrame: o } = e, i = yt / 1e3, r = Math.abs(s - n), l = t.map((a) => ({
|
|
838
838
|
item: a,
|
|
839
|
-
integrator: new
|
|
839
|
+
integrator: new k({
|
|
840
840
|
stiffness: a.spring.stiffness,
|
|
841
841
|
damping: a.spring.damping
|
|
842
842
|
}),
|
|
@@ -853,7 +853,7 @@ function Ne(e) {
|
|
|
853
853
|
const p = a * yt;
|
|
854
854
|
c = p;
|
|
855
855
|
for (const d of l)
|
|
856
|
-
!d.started || d.settled || (d.state = d.integrator.step(d.state, s, i), d.integrator.isSettled(d.state, s) ? (d.settleTime += i, d.settleTime >=
|
|
856
|
+
!d.started || d.settled || (d.state = d.integrator.step(d.state, s, i), d.integrator.isSettled(d.state, s) ? (d.settleTime += i, d.settleTime >= Vt && (d.state = { position: s, velocity: 0 }, d.settled = !0)) : d.settleTime = 0, d.item.tick(d.state.position));
|
|
857
857
|
for (let d = 1; d < l.length; d++) {
|
|
858
858
|
const f = l[d];
|
|
859
859
|
if (f.started) continue;
|
|
@@ -865,14 +865,14 @@ function Ne(e) {
|
|
|
865
865
|
}
|
|
866
866
|
return c;
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function N(e, t) {
|
|
869
869
|
return e != null && e.spring ? {
|
|
870
870
|
stiffness: e.spring.stiffness,
|
|
871
871
|
damping: e.spring.damping
|
|
872
872
|
} : t;
|
|
873
873
|
}
|
|
874
874
|
function ht(e) {
|
|
875
|
-
const { rect: t, scale: n, direction: s, override: o } = e, i = s === "out" ? { scale: 1, translateY: -t.top } : { scale: n, translateY: -t.top + t.height }, r =
|
|
875
|
+
const { rect: t, scale: n, direction: s, override: o } = e, i = s === "out" ? { scale: 1, translateY: -t.top } : { scale: n, translateY: -t.top + t.height }, r = N(o, z.scaleDown), l = N(o, z.translate), c = N(o, z.scaleUp), a = s === "out" ? 1 : 0, p = s === "out" ? 0 : 1, d = s === "out" ? [
|
|
876
876
|
{
|
|
877
877
|
spring: r,
|
|
878
878
|
offset: T.scaleDown,
|
|
@@ -944,13 +944,13 @@ function Xe(e, t) {
|
|
|
944
944
|
translateY: i.translateY + (r.translateY - i.translateY) * l
|
|
945
945
|
};
|
|
946
946
|
}
|
|
947
|
-
const
|
|
947
|
+
const Be = [
|
|
948
948
|
[1, 1],
|
|
949
949
|
[-1, 1],
|
|
950
950
|
[1, -1],
|
|
951
951
|
[-1, -1]
|
|
952
952
|
];
|
|
953
|
-
function
|
|
953
|
+
function We(e, t) {
|
|
954
954
|
const o = (i, r, l) => {
|
|
955
955
|
const c = document.createElement("div");
|
|
956
956
|
Object.assign(c.style, {
|
|
@@ -1027,23 +1027,23 @@ function mt(e, t) {
|
|
|
1027
1027
|
${t.left}px ${t.top + t.height}px
|
|
1028
1028
|
)`;
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1030
|
+
function X(e, t, n, s, o) {
|
|
1031
1031
|
const i = n / 1e3;
|
|
1032
1032
|
return new g({
|
|
1033
1033
|
element: e,
|
|
1034
|
-
integrator: new
|
|
1034
|
+
integrator: new Wt({ durationSec: i }),
|
|
1035
1035
|
lowerBound: 0,
|
|
1036
1036
|
upperBound: 1,
|
|
1037
1037
|
style: (r) => s(Xe(t, r)),
|
|
1038
1038
|
onComplete: o
|
|
1039
1039
|
});
|
|
1040
1040
|
}
|
|
1041
|
-
const
|
|
1041
|
+
const Ze = (e = {}) => {
|
|
1042
1042
|
var o;
|
|
1043
|
-
const t = ((o = e.border) == null ? void 0 : o.color) ??
|
|
1043
|
+
const t = ((o = e.border) == null ? void 0 : o.color) ?? Re, n = Ve, s = e.physics;
|
|
1044
1044
|
return {
|
|
1045
1045
|
prepare: ({ from: i, to: r, context: l }) => {
|
|
1046
|
-
const c = I(l, "from"), a = I(l, "to"), p =
|
|
1046
|
+
const c = I(l, "from"), a = I(l, "to"), p = J(document.body, l.positionedParent), d = We(t, {
|
|
1047
1047
|
...c,
|
|
1048
1048
|
top: p.top
|
|
1049
1049
|
});
|
|
@@ -1071,7 +1071,7 @@ const We = (e = {}) => {
|
|
|
1071
1071
|
scale: n,
|
|
1072
1072
|
direction: "in",
|
|
1073
1073
|
override: s
|
|
1074
|
-
}), u =
|
|
1074
|
+
}), u = X(
|
|
1075
1075
|
i,
|
|
1076
1076
|
d.snapshots,
|
|
1077
1077
|
d.totalDuration,
|
|
@@ -1081,7 +1081,7 @@ const We = (e = {}) => {
|
|
|
1081
1081
|
() => {
|
|
1082
1082
|
i.style.clipPath = "", i.style.transformOrigin = "", i.style.transform = "";
|
|
1083
1083
|
}
|
|
1084
|
-
), y =
|
|
1084
|
+
), y = X(
|
|
1085
1085
|
r,
|
|
1086
1086
|
f.snapshots,
|
|
1087
1087
|
f.totalDuration,
|
|
@@ -1091,18 +1091,18 @@ const We = (e = {}) => {
|
|
|
1091
1091
|
() => {
|
|
1092
1092
|
r.style.clipPath = "", r.style.transformOrigin = "", r.style.transform = "";
|
|
1093
1093
|
}
|
|
1094
|
-
), h =
|
|
1095
|
-
const P = ["topLeft", "topRight", "bottomLeft", "bottomRight"][
|
|
1096
|
-
return
|
|
1094
|
+
), h = Be.map(([b, x], E) => {
|
|
1095
|
+
const P = ["topLeft", "topRight", "bottomLeft", "bottomRight"][E];
|
|
1096
|
+
return X(
|
|
1097
1097
|
c[P],
|
|
1098
1098
|
d.snapshots,
|
|
1099
1099
|
d.totalDuration,
|
|
1100
1100
|
(D) => {
|
|
1101
|
-
const _ = (a.width - a.width * D.scale) / 2 * 0.7 * b,
|
|
1102
|
-
return { transform: `translate(${_}px, ${
|
|
1101
|
+
const _ = (a.width - a.width * D.scale) / 2 * 0.7 * b, H = (a.height - a.height * D.scale) / 2 * 0.7 * x;
|
|
1102
|
+
return { transform: `translate(${_}px, ${H}px)` };
|
|
1103
1103
|
}
|
|
1104
1104
|
);
|
|
1105
|
-
}), w = new
|
|
1105
|
+
}), w = new C([u, y, ...h], {
|
|
1106
1106
|
mode: "parallel"
|
|
1107
1107
|
}), S = w.onComplete;
|
|
1108
1108
|
return w.onComplete = () => {
|
|
@@ -1114,19 +1114,19 @@ const We = (e = {}) => {
|
|
|
1114
1114
|
"bottomLeft",
|
|
1115
1115
|
"bottomRight"
|
|
1116
1116
|
]) {
|
|
1117
|
-
const
|
|
1118
|
-
|
|
1117
|
+
const E = c[x];
|
|
1118
|
+
E.parentElement === b && b.removeChild(E);
|
|
1119
1119
|
}
|
|
1120
1120
|
}, w;
|
|
1121
1121
|
}
|
|
1122
1122
|
};
|
|
1123
1123
|
};
|
|
1124
|
-
function
|
|
1124
|
+
function Cs(e) {
|
|
1125
1125
|
const { paths: t, options: n } = e, s = (n == null ? void 0 : n.borderColor) !== void 0 ? { border: { color: n.borderColor } } : void 0;
|
|
1126
|
-
return v(t, () =>
|
|
1126
|
+
return v(t, () => Ze(s));
|
|
1127
1127
|
}
|
|
1128
|
-
const gt = "data-hero-enter-key", wt = "data-hero-exit-key",
|
|
1129
|
-
class
|
|
1128
|
+
const gt = "data-hero-enter-key", wt = "data-hero-exit-key", B = "data-hero-key";
|
|
1129
|
+
class qe {
|
|
1130
1130
|
constructor() {
|
|
1131
1131
|
$(this, "previousFromOpacity", "");
|
|
1132
1132
|
}
|
|
@@ -1141,8 +1141,8 @@ class Ze {
|
|
|
1141
1141
|
}), [];
|
|
1142
1142
|
}
|
|
1143
1143
|
}
|
|
1144
|
-
const
|
|
1145
|
-
class
|
|
1144
|
+
const je = () => new qe();
|
|
1145
|
+
class Ke {
|
|
1146
1146
|
contribute(t) {
|
|
1147
1147
|
const { from: n, to: s, physics: o, onComplete: i } = t, r = n.style.opacity, l = s.style.opacity, c = n.style.willChange, a = s.style.willChange;
|
|
1148
1148
|
return s.style.opacity = "0", n.style.willChange = "opacity", s.style.willChange = "opacity", i(() => {
|
|
@@ -1161,18 +1161,18 @@ class je {
|
|
|
1161
1161
|
];
|
|
1162
1162
|
}
|
|
1163
1163
|
}
|
|
1164
|
-
const
|
|
1165
|
-
static:
|
|
1166
|
-
fade:
|
|
1167
|
-
},
|
|
1164
|
+
const Ge = () => new Ke(), Je = {
|
|
1165
|
+
static: je,
|
|
1166
|
+
fade: Ge
|
|
1167
|
+
}, Qe = {
|
|
1168
1168
|
spring: { stiffness: 320, damping: 30 }
|
|
1169
|
-
},
|
|
1169
|
+
}, tn = () => Qe, en = {
|
|
1170
1170
|
spring: { stiffness: 300, damping: 30, doubleSpring: 1 }
|
|
1171
|
-
},
|
|
1172
|
-
default:
|
|
1173
|
-
smooth:
|
|
1174
|
-
},
|
|
1175
|
-
function
|
|
1171
|
+
}, nn = () => en, sn = {
|
|
1172
|
+
default: tn,
|
|
1173
|
+
smooth: nn
|
|
1174
|
+
}, on = 700, rn = "data-hero-aspect-ratio", an = "data-hero-radius";
|
|
1175
|
+
function ln(e) {
|
|
1176
1176
|
if (!e) return null;
|
|
1177
1177
|
if (e.includes("/")) {
|
|
1178
1178
|
const [n, s] = e.split("/"), o = parseFloat(n ?? ""), i = parseFloat(s ?? "");
|
|
@@ -1182,18 +1182,18 @@ function an(e) {
|
|
|
1182
1182
|
return Number.isFinite(t) && t > 0 ? t : null;
|
|
1183
1183
|
}
|
|
1184
1184
|
function St(e) {
|
|
1185
|
-
const t = e.getAttribute(
|
|
1185
|
+
const t = e.getAttribute(an);
|
|
1186
1186
|
if (!t) return 0;
|
|
1187
1187
|
const n = parseFloat(t);
|
|
1188
1188
|
return Number.isFinite(n) && n > 0 ? n : 0;
|
|
1189
1189
|
}
|
|
1190
|
-
function
|
|
1190
|
+
function Y(e) {
|
|
1191
1191
|
return e.left + e.width / 2;
|
|
1192
1192
|
}
|
|
1193
|
-
function
|
|
1193
|
+
function L(e) {
|
|
1194
1194
|
return e.top + e.height / 2;
|
|
1195
1195
|
}
|
|
1196
|
-
function
|
|
1196
|
+
function cn(e, t) {
|
|
1197
1197
|
return {
|
|
1198
1198
|
top: Math.max(0, t.top - e.top),
|
|
1199
1199
|
right: Math.max(0, e.left + e.width - (t.left + t.width)),
|
|
@@ -1201,7 +1201,7 @@ function ln(e, t) {
|
|
|
1201
1201
|
left: Math.max(0, t.left - e.left)
|
|
1202
1202
|
};
|
|
1203
1203
|
}
|
|
1204
|
-
function
|
|
1204
|
+
function pn(e, t, n) {
|
|
1205
1205
|
const s = e.width / e.height;
|
|
1206
1206
|
let o, i;
|
|
1207
1207
|
return n === "contain" ? s > t ? (i = e.height, o = i * t) : (o = e.width, i = o / t) : s > t ? (o = e.width, i = o / t) : (i = e.height, o = i * t), {
|
|
@@ -1212,7 +1212,7 @@ function cn(e, t, n) {
|
|
|
1212
1212
|
};
|
|
1213
1213
|
}
|
|
1214
1214
|
function bt(e, t, n) {
|
|
1215
|
-
const s =
|
|
1215
|
+
const s = J(e, t), o = ln(t.getAttribute(rn));
|
|
1216
1216
|
if (o === null)
|
|
1217
1217
|
return {
|
|
1218
1218
|
bbox: s,
|
|
@@ -1220,16 +1220,16 @@ function bt(e, t, n) {
|
|
|
1220
1220
|
window: s,
|
|
1221
1221
|
clipInset: { top: 0, right: 0, bottom: 0, left: 0 }
|
|
1222
1222
|
};
|
|
1223
|
-
const i =
|
|
1223
|
+
const i = pn(s, o, n), r = n === "cover" ? s : i;
|
|
1224
1224
|
return {
|
|
1225
1225
|
bbox: s,
|
|
1226
1226
|
content: i,
|
|
1227
1227
|
window: r,
|
|
1228
|
-
clipInset:
|
|
1228
|
+
clipInset: cn(i, r)
|
|
1229
1229
|
};
|
|
1230
1230
|
}
|
|
1231
|
-
function
|
|
1232
|
-
const o = n.width / s, i = n.height / s, r = e.width / 2 + (
|
|
1231
|
+
function dn(e, t, n, s) {
|
|
1232
|
+
const o = n.width / s, i = n.height / s, r = e.width / 2 + (Y(n) - Y(t)) / s - o / 2, l = e.height / 2 + (L(n) - L(t)) / s - i / 2;
|
|
1233
1233
|
return {
|
|
1234
1234
|
top: Math.max(0, l),
|
|
1235
1235
|
right: Math.max(0, e.width - r - o),
|
|
@@ -1237,7 +1237,7 @@ function pn(e, t, n, s) {
|
|
|
1237
1237
|
left: Math.max(0, r)
|
|
1238
1238
|
};
|
|
1239
1239
|
}
|
|
1240
|
-
function
|
|
1240
|
+
function A(e, t) {
|
|
1241
1241
|
const n = /* @__PURE__ */ new Map(), s = e.querySelectorAll(`[${t}]`);
|
|
1242
1242
|
for (const o of Array.from(s)) {
|
|
1243
1243
|
const i = o.getAttribute(t);
|
|
@@ -1245,8 +1245,8 @@ function F(e, t) {
|
|
|
1245
1245
|
}
|
|
1246
1246
|
return n;
|
|
1247
1247
|
}
|
|
1248
|
-
function
|
|
1249
|
-
const n = [], s =
|
|
1248
|
+
function fn(e, t) {
|
|
1249
|
+
const n = [], s = A(t, gt), o = A(e, wt);
|
|
1250
1250
|
for (const [l, c] of s) {
|
|
1251
1251
|
const a = o.get(l);
|
|
1252
1252
|
a && n.push({
|
|
@@ -1257,7 +1257,7 @@ function dn(e, t) {
|
|
|
1257
1257
|
toFit: "contain"
|
|
1258
1258
|
});
|
|
1259
1259
|
}
|
|
1260
|
-
const i =
|
|
1260
|
+
const i = A(e, gt), r = A(t, wt);
|
|
1261
1261
|
for (const [l, c] of i) {
|
|
1262
1262
|
const a = r.get(l);
|
|
1263
1263
|
a && n.push({
|
|
@@ -1270,15 +1270,15 @@ function dn(e, t) {
|
|
|
1270
1270
|
}
|
|
1271
1271
|
return n;
|
|
1272
1272
|
}
|
|
1273
|
-
function
|
|
1273
|
+
function yn(e, t) {
|
|
1274
1274
|
const n = [], s = Array.from(
|
|
1275
|
-
t.querySelectorAll(`[${
|
|
1275
|
+
t.querySelectorAll(`[${B}]`)
|
|
1276
1276
|
);
|
|
1277
1277
|
for (const o of s) {
|
|
1278
|
-
const i = o.getAttribute(
|
|
1278
|
+
const i = o.getAttribute(B);
|
|
1279
1279
|
if (!i) continue;
|
|
1280
1280
|
const r = e.querySelector(
|
|
1281
|
-
`[${
|
|
1281
|
+
`[${B}="${i}"]`
|
|
1282
1282
|
);
|
|
1283
1283
|
r && n.push({
|
|
1284
1284
|
key: i,
|
|
@@ -1290,20 +1290,20 @@ function fn(e, t) {
|
|
|
1290
1290
|
}
|
|
1291
1291
|
return n;
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1294
|
-
const n =
|
|
1295
|
-
return n.length > 0 ? n :
|
|
1293
|
+
function hn(e, t) {
|
|
1294
|
+
const n = fn(e, t);
|
|
1295
|
+
return n.length > 0 ? n : yn(e, t);
|
|
1296
1296
|
}
|
|
1297
|
-
function
|
|
1297
|
+
function un(e, t, n) {
|
|
1298
1298
|
const { fromEl: s, toEl: o } = t, i = bt(e, s, t.fromFit), r = bt(e, o, t.toFit), l = i.content, c = i.window, a = r.content, p = r.window, d = r.clipInset, f = St(s), u = St(o);
|
|
1299
1299
|
if (l.width === 0 || l.height === 0 || c.width === 0 || c.height === 0 || a.width === 0 || a.height === 0 || p.width === 0 || p.height === 0)
|
|
1300
1300
|
return null;
|
|
1301
1301
|
const y = Math.max(
|
|
1302
1302
|
l.width / a.width,
|
|
1303
1303
|
l.height / a.height
|
|
1304
|
-
), h =
|
|
1305
|
-
if (Math.abs(
|
|
1306
|
-
const P =
|
|
1304
|
+
), h = Y(l), w = L(l), S = Y(a), b = L(a), x = h - S, E = w - b;
|
|
1305
|
+
if (Math.abs(E) > n) return null;
|
|
1306
|
+
const P = dn(
|
|
1307
1307
|
a,
|
|
1308
1308
|
l,
|
|
1309
1309
|
c,
|
|
@@ -1313,25 +1313,25 @@ function hn(e, t, n) {
|
|
|
1313
1313
|
toContent: a,
|
|
1314
1314
|
hasRadius: f > 0 || u > 0,
|
|
1315
1315
|
styleFor: (D, _) => {
|
|
1316
|
-
const
|
|
1316
|
+
const H = _ * x, At = _ * E, Q = D + _ * y, Ft = (f * _ + u * D) / Q, kt = P.top * _ + d.top * D, Yt = P.right * _ + d.right * D, Lt = P.bottom * _ + d.bottom * D, Ht = P.left * _ + d.left * D;
|
|
1317
1317
|
return {
|
|
1318
|
-
transform: `translate(${
|
|
1319
|
-
clipPath: `inset(${
|
|
1318
|
+
transform: `translate(${H}px, ${At}px) scale(${Q})`,
|
|
1319
|
+
clipPath: `inset(${kt}px ${Yt}px ${Lt}px ${Ht}px round ${Ft}px)`
|
|
1320
1320
|
};
|
|
1321
1321
|
}
|
|
1322
1322
|
};
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1324
|
+
function mn(e, t) {
|
|
1325
1325
|
e.style.transform = t.transform, e.style.clipPath = t.clipPath;
|
|
1326
1326
|
}
|
|
1327
|
-
class
|
|
1327
|
+
class gn {
|
|
1328
1328
|
contribute(t) {
|
|
1329
1329
|
const { resolved: n, physics: s, positionedParent: o, maxDistance: i, onComplete: r } = t, l = [];
|
|
1330
1330
|
for (const c of n.pairs) {
|
|
1331
|
-
const { fromEl: a, toEl: p } = c, d =
|
|
1331
|
+
const { fromEl: a, toEl: p } = c, d = un(o, c, i);
|
|
1332
1332
|
if (!d) continue;
|
|
1333
1333
|
const f = p.cloneNode(!0);
|
|
1334
|
-
f.style.position = "absolute", f.style.left = `${d.toContent.left}px`, f.style.top = `${d.toContent.top}px`, f.style.width = `${d.toContent.width}px`, f.style.height = `${d.toContent.height}px`, f.style.margin = "0", f.style.transformOrigin = "center center", f.style.zIndex = "1000", f.style.willChange = "transform, clip-path", f.style.pointerEvents = "none", f.style.maxWidth = "none", f.style.maxHeight = "none", d.hasRadius && (f.style.borderRadius = "0"),
|
|
1334
|
+
f.style.position = "absolute", f.style.left = `${d.toContent.left}px`, f.style.top = `${d.toContent.top}px`, f.style.width = `${d.toContent.width}px`, f.style.height = `${d.toContent.height}px`, f.style.margin = "0", f.style.transformOrigin = "center center", f.style.zIndex = "1000", f.style.willChange = "transform, clip-path", f.style.pointerEvents = "none", f.style.maxWidth = "none", f.style.maxHeight = "none", d.hasRadius && (f.style.borderRadius = "0"), mn(f, d.styleFor(0, 1)), o.appendChild(f);
|
|
1335
1335
|
const u = a.style.opacity, y = p.style.opacity;
|
|
1336
1336
|
a.style.opacity = "0", p.style.opacity = "0", r(() => {
|
|
1337
1337
|
a.style.opacity = u, p.style.opacity = y, f.parentElement && f.parentElement.removeChild(f);
|
|
@@ -1346,18 +1346,18 @@ class mn {
|
|
|
1346
1346
|
return l;
|
|
1347
1347
|
}
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1350
|
-
return [new
|
|
1349
|
+
function wn(e) {
|
|
1350
|
+
return [new gn(), Je[e.type]()];
|
|
1351
1351
|
}
|
|
1352
|
-
const
|
|
1353
|
-
const t =
|
|
1352
|
+
const Sn = (e) => {
|
|
1353
|
+
const t = wn(e), n = sn[e.variant](), s = on;
|
|
1354
1354
|
return {
|
|
1355
1355
|
prepare: (o) => {
|
|
1356
1356
|
var l;
|
|
1357
1357
|
const i = Promise.all([
|
|
1358
1358
|
o.from,
|
|
1359
1359
|
o.to
|
|
1360
|
-
]).then(([c, a]) => ({ pairs:
|
|
1360
|
+
]).then(([c, a]) => ({ pairs: hn(c, a) })), r = {
|
|
1361
1361
|
from: o.from,
|
|
1362
1362
|
to: o.to,
|
|
1363
1363
|
resolved: i
|
|
@@ -1368,7 +1368,7 @@ const wn = (e) => {
|
|
|
1368
1368
|
},
|
|
1369
1369
|
animation: ({ from: o, to: i, context: r, resolved: l }) => {
|
|
1370
1370
|
if (l.pairs.length === 0)
|
|
1371
|
-
return new
|
|
1371
|
+
return new C([], { mode: "parallel" });
|
|
1372
1372
|
const c = [], a = (y) => {
|
|
1373
1373
|
c.push(y);
|
|
1374
1374
|
}, p = {
|
|
@@ -1383,8 +1383,8 @@ const wn = (e) => {
|
|
|
1383
1383
|
for (const y of t)
|
|
1384
1384
|
y.contribute && d.push(...y.contribute(p));
|
|
1385
1385
|
if (d.length === 0)
|
|
1386
|
-
return new
|
|
1387
|
-
const f = new
|
|
1386
|
+
return new C([], { mode: "parallel" });
|
|
1387
|
+
const f = new C(d, { mode: "parallel" }), u = f.onComplete;
|
|
1388
1388
|
return f.onComplete = () => {
|
|
1389
1389
|
u == null || u();
|
|
1390
1390
|
for (const y of c)
|
|
@@ -1401,15 +1401,15 @@ function Es(e) {
|
|
|
1401
1401
|
const { paths: t } = e, n = e.type ?? "static", s = e.variant ?? "default";
|
|
1402
1402
|
return v(
|
|
1403
1403
|
t,
|
|
1404
|
-
() =>
|
|
1404
|
+
() => Sn({ type: n, variant: s })
|
|
1405
1405
|
);
|
|
1406
1406
|
}
|
|
1407
|
-
const
|
|
1407
|
+
const bn = {
|
|
1408
1408
|
spring: { stiffness: 50, damping: 30 }
|
|
1409
|
-
},
|
|
1409
|
+
}, $n = {
|
|
1410
1410
|
spring: { stiffness: 80, damping: 25 }
|
|
1411
|
-
},
|
|
1412
|
-
const t = e.physics ??
|
|
1411
|
+
}, Cn = (e = {}) => {
|
|
1412
|
+
const t = e.physics ?? bn, n = e.initialRotation ?? 45, s = e.initialScale ?? 0.01, o = e.rotationTriggerPoint ?? 0.8;
|
|
1413
1413
|
return {
|
|
1414
1414
|
prepare: ({ from: i, to: r, context: l }) => (i.then((c) => {
|
|
1415
1415
|
c.style.opacity = "1";
|
|
@@ -1422,7 +1422,7 @@ const Sn = {
|
|
|
1422
1422
|
animation: ({ from: i, to: r }) => {
|
|
1423
1423
|
const l = new g({
|
|
1424
1424
|
element: i,
|
|
1425
|
-
integrator: m.from(
|
|
1425
|
+
integrator: m.from($n),
|
|
1426
1426
|
style: (a, p) => ({ opacity: p }),
|
|
1427
1427
|
// The outgoing node is reused (re-hidden, shown again on the next
|
|
1428
1428
|
// navigation), so reset every inline style we wrote to it — mirroring
|
|
@@ -1469,17 +1469,17 @@ const Sn = {
|
|
|
1469
1469
|
r.style.willChange = "", r.style.backfaceVisibility = "", r.style.removeProperty("--max-border-radius"), r.style.removeProperty("--border-radius-scale"), r.style.transform = "", r.style.transformOrigin = "", r.style.position = "", r.style.zIndex = "", r.style.top = "", r.style.left = "", r.style.width = "", r.style.height = "", r.style.overflow = "", r.style.borderRadius = "";
|
|
1470
1470
|
}
|
|
1471
1471
|
});
|
|
1472
|
-
return new
|
|
1472
|
+
return new C([l, c], { mode: "parallel" });
|
|
1473
1473
|
}
|
|
1474
1474
|
};
|
|
1475
1475
|
};
|
|
1476
|
-
function
|
|
1476
|
+
function xs(e) {
|
|
1477
1477
|
const { paths: t } = e;
|
|
1478
|
-
return v(t, () =>
|
|
1478
|
+
return v(t, () => Cn());
|
|
1479
1479
|
}
|
|
1480
1480
|
const En = {
|
|
1481
1481
|
spring: { stiffness: 100, damping: 30 }
|
|
1482
|
-
},
|
|
1482
|
+
}, xn = (e = {}) => {
|
|
1483
1483
|
const t = e.physics ?? En;
|
|
1484
1484
|
return {
|
|
1485
1485
|
prepare: ({ from: n, to: s }) => (n.then((o) => {
|
|
@@ -1513,15 +1513,15 @@ const En = {
|
|
|
1513
1513
|
s.style.willChange = "auto", s.style.transform = "", s.style.transformOrigin = "", s.style.opacity = "";
|
|
1514
1514
|
}
|
|
1515
1515
|
});
|
|
1516
|
-
return new
|
|
1516
|
+
return new C([o, i], { mode: "parallel" });
|
|
1517
1517
|
}
|
|
1518
1518
|
};
|
|
1519
1519
|
};
|
|
1520
|
-
function
|
|
1520
|
+
function Ps(e) {
|
|
1521
1521
|
const { paths: t } = e;
|
|
1522
|
-
return v(t, () =>
|
|
1522
|
+
return v(t, () => xn());
|
|
1523
1523
|
}
|
|
1524
|
-
const
|
|
1524
|
+
const Pn = {
|
|
1525
1525
|
spring: {
|
|
1526
1526
|
stiffness: 20,
|
|
1527
1527
|
damping: 8,
|
|
@@ -1530,7 +1530,7 @@ const xn = {
|
|
|
1530
1530
|
restSpeed: 1e-3
|
|
1531
1531
|
}
|
|
1532
1532
|
}, $t = (e = {}) => {
|
|
1533
|
-
const t = e.direction ?? "up", n = e.physics ??
|
|
1533
|
+
const t = e.direction ?? "up", n = e.physics ?? Pn, s = t === "up";
|
|
1534
1534
|
return {
|
|
1535
1535
|
prepare: ({ from: o, to: i }) => (o.then((r) => {
|
|
1536
1536
|
r.style.zIndex = s ? "-1" : "1", r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none";
|
|
@@ -1558,52 +1558,52 @@ const xn = {
|
|
|
1558
1558
|
i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "", i.style.transform = "";
|
|
1559
1559
|
}
|
|
1560
1560
|
});
|
|
1561
|
-
return new
|
|
1561
|
+
return new C([p, d], { mode: "parallel" });
|
|
1562
1562
|
}
|
|
1563
1563
|
};
|
|
1564
1564
|
};
|
|
1565
|
-
function
|
|
1565
|
+
function _s(e) {
|
|
1566
1566
|
const { paths: t, type: n = "directional" } = e;
|
|
1567
1567
|
return n === "non-directional" ? v(
|
|
1568
1568
|
t,
|
|
1569
1569
|
() => $t({ direction: "up" })
|
|
1570
|
-
) :
|
|
1570
|
+
) : G(
|
|
1571
1571
|
t,
|
|
1572
1572
|
{ forward: "up", backward: "down" },
|
|
1573
1573
|
(s) => $t({ direction: s })
|
|
1574
1574
|
);
|
|
1575
1575
|
}
|
|
1576
|
-
const
|
|
1576
|
+
const _n = {
|
|
1577
1577
|
spring: { stiffness: 200, damping: 24 }
|
|
1578
|
-
},
|
|
1578
|
+
}, Dn = {
|
|
1579
1579
|
inertia: { acceleration: 25, resistance: 1.2 }
|
|
1580
|
-
},
|
|
1581
|
-
function
|
|
1580
|
+
}, W = 0.2;
|
|
1581
|
+
function vn() {
|
|
1582
1582
|
return {
|
|
1583
|
-
enterPhysics:
|
|
1584
|
-
exitPhysics:
|
|
1583
|
+
enterPhysics: _n,
|
|
1584
|
+
exitPhysics: Dn,
|
|
1585
1585
|
background: {
|
|
1586
1586
|
willChange: "transform, opacity",
|
|
1587
1587
|
enterStyle: (e, t) => ({
|
|
1588
|
-
transform: `scale(${1 -
|
|
1588
|
+
transform: `scale(${1 - W * e})`,
|
|
1589
1589
|
opacity: t
|
|
1590
1590
|
}),
|
|
1591
1591
|
exitStyle: (e) => ({
|
|
1592
|
-
transform: `scale(${1 -
|
|
1592
|
+
transform: `scale(${1 - W + W * e})`,
|
|
1593
1593
|
opacity: e
|
|
1594
1594
|
})
|
|
1595
1595
|
}
|
|
1596
1596
|
};
|
|
1597
1597
|
}
|
|
1598
|
-
const
|
|
1598
|
+
const In = {
|
|
1599
1599
|
spring: { stiffness: 300, damping: 30 }
|
|
1600
|
-
},
|
|
1600
|
+
}, Tn = {
|
|
1601
1601
|
inertia: { acceleration: 30, resistance: 1 }
|
|
1602
1602
|
};
|
|
1603
|
-
function
|
|
1603
|
+
function On() {
|
|
1604
1604
|
return {
|
|
1605
|
-
enterPhysics:
|
|
1606
|
-
exitPhysics:
|
|
1605
|
+
enterPhysics: In,
|
|
1606
|
+
exitPhysics: Tn,
|
|
1607
1607
|
background: {
|
|
1608
1608
|
willChange: "",
|
|
1609
1609
|
enterStyle: () => ({}),
|
|
@@ -1611,16 +1611,16 @@ function Tn() {
|
|
|
1611
1611
|
}
|
|
1612
1612
|
};
|
|
1613
1613
|
}
|
|
1614
|
-
const
|
|
1615
|
-
static:
|
|
1616
|
-
"background-scale":
|
|
1617
|
-
},
|
|
1618
|
-
const t = e.direction ?? "enter", n =
|
|
1614
|
+
const An = {
|
|
1615
|
+
static: On(),
|
|
1616
|
+
"background-scale": vn()
|
|
1617
|
+
}, Fn = "static", kn = "transform", Yn = (e = {}) => {
|
|
1618
|
+
const t = e.direction ?? "enter", n = An[e.type ?? Fn], s = t === "enter" ? n.enterPhysics : n.exitPhysics, o = n.background, i = o.willChange !== "";
|
|
1619
1619
|
return {
|
|
1620
1620
|
prepare: ({ from: r, to: l }) => {
|
|
1621
1621
|
const c = t === "enter" ? l : r, a = t === "enter" ? r : l;
|
|
1622
1622
|
return c.then((p) => {
|
|
1623
|
-
p.style.willChange =
|
|
1623
|
+
p.style.willChange = kn, p.style.backfaceVisibility = "hidden", p.style.contain = "layout paint", t === "exit" && (p.style.pointerEvents = "none", p.style.zIndex = "100");
|
|
1624
1624
|
}), a.then((p) => {
|
|
1625
1625
|
i && (p.style.willChange = o.willChange, p.style.backfaceVisibility = "hidden", p.style.contain = "layout paint"), t === "enter" && (p.style.pointerEvents = "none", p.style.zIndex = "-1");
|
|
1626
1626
|
}), {};
|
|
@@ -1633,10 +1633,10 @@ const On = {
|
|
|
1633
1633
|
r.style.pointerEvents = "", r.style.zIndex = "";
|
|
1634
1634
|
};
|
|
1635
1635
|
a.style.clipPath = `inset(${d.top}px 0 calc(100% - ${d.top + d.height}px) 0)`;
|
|
1636
|
-
const u = t === "enter" ? (
|
|
1636
|
+
const u = t === "enter" ? (E, P) => ({
|
|
1637
1637
|
transform: `translate3d(0, ${P * d.height}px, 0)`
|
|
1638
|
-
}) : (
|
|
1639
|
-
transform: `translate3d(0, ${
|
|
1638
|
+
}) : (E) => ({
|
|
1639
|
+
transform: `translate3d(0, ${E * d.height}px, 0)`
|
|
1640
1640
|
}), y = new g({
|
|
1641
1641
|
element: a,
|
|
1642
1642
|
integrator: m.from(s),
|
|
@@ -1646,13 +1646,13 @@ const On = {
|
|
|
1646
1646
|
}
|
|
1647
1647
|
});
|
|
1648
1648
|
if (!i)
|
|
1649
|
-
return new
|
|
1649
|
+
return new C([y], { mode: "parallel" });
|
|
1650
1650
|
const h = I(
|
|
1651
1651
|
c,
|
|
1652
1652
|
t === "enter" ? "from" : "to"
|
|
1653
1653
|
), w = h.left + h.width / 2, S = h.top + h.height / 2;
|
|
1654
1654
|
p.style.clipPath = `inset(${h.top}px 0 calc(100% - ${h.top + h.height}px) 0)`, p.style.transformOrigin = `${w}px ${S}px`;
|
|
1655
|
-
const b = t === "enter" ? (
|
|
1655
|
+
const b = t === "enter" ? (E, P) => o.enterStyle(E, P) : (E) => o.exitStyle(E), x = new g({
|
|
1656
1656
|
element: p,
|
|
1657
1657
|
integrator: m.from(s),
|
|
1658
1658
|
style: b,
|
|
@@ -1668,24 +1668,24 @@ const On = {
|
|
|
1668
1668
|
p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.contain = "", p.style.clipPath = "", p.style.transformOrigin = "", p.style.transform = "", p.style.opacity = "";
|
|
1669
1669
|
}
|
|
1670
1670
|
});
|
|
1671
|
-
return new
|
|
1671
|
+
return new C([y, x], { mode: "parallel" });
|
|
1672
1672
|
}
|
|
1673
1673
|
};
|
|
1674
1674
|
};
|
|
1675
|
-
function
|
|
1675
|
+
function Ln(e) {
|
|
1676
1676
|
return e === "scale" || e === "background-scale" ? "background-scale" : "static";
|
|
1677
1677
|
}
|
|
1678
|
-
function
|
|
1679
|
-
const { enter: t, exit: n } = e, s = e.type, o =
|
|
1680
|
-
return
|
|
1678
|
+
function Ds(e) {
|
|
1679
|
+
const { enter: t, exit: n } = e, s = e.type, o = Ln(s);
|
|
1680
|
+
return vt(
|
|
1681
1681
|
{ enter: t, exit: n },
|
|
1682
|
-
(i) =>
|
|
1682
|
+
(i) => Yn({ direction: i, type: o })
|
|
1683
1683
|
);
|
|
1684
1684
|
}
|
|
1685
|
-
const
|
|
1685
|
+
const Hn = {
|
|
1686
1686
|
spring: { stiffness: 170, damping: 22, doubleSpring: 0.8 }
|
|
1687
|
-
},
|
|
1688
|
-
const t = e.direction ?? "left", n = e.physics ??
|
|
1687
|
+
}, Mn = (e = {}) => {
|
|
1688
|
+
const t = e.direction ?? "left", n = e.physics ?? Hn, s = t === "left";
|
|
1689
1689
|
return {
|
|
1690
1690
|
prepare: ({ from: o, to: i }) => (o.then((r) => {
|
|
1691
1691
|
r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none";
|
|
@@ -1712,36 +1712,36 @@ const Ln = {
|
|
|
1712
1712
|
i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "", i.style.transform = "";
|
|
1713
1713
|
}
|
|
1714
1714
|
});
|
|
1715
|
-
return new
|
|
1715
|
+
return new C([r, l], { mode: "parallel" });
|
|
1716
1716
|
}
|
|
1717
1717
|
};
|
|
1718
1718
|
};
|
|
1719
|
-
function
|
|
1719
|
+
function vs(e) {
|
|
1720
1720
|
const { paths: t } = e;
|
|
1721
|
-
return
|
|
1721
|
+
return G(
|
|
1722
1722
|
t,
|
|
1723
1723
|
{ forward: "left", backward: "right" },
|
|
1724
|
-
(n) =>
|
|
1724
|
+
(n) => Mn({ direction: n })
|
|
1725
1725
|
);
|
|
1726
1726
|
}
|
|
1727
|
-
const
|
|
1727
|
+
const Un = {
|
|
1728
1728
|
spring: { stiffness: 17, damping: 6 }
|
|
1729
|
-
},
|
|
1730
|
-
const t = e.physics ??
|
|
1729
|
+
}, Z = 20, F = 800, Vn = (e = {}) => {
|
|
1730
|
+
const t = e.physics ?? Un;
|
|
1731
1731
|
return {
|
|
1732
1732
|
prepare: ({ from: n, to: s }) => (n.then((o) => {
|
|
1733
|
-
o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none", o.style.transform = `perspective(${
|
|
1733
|
+
o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none", o.style.transform = `perspective(${F}px) rotateY(0deg) translate3d(0%, 0, 0)`;
|
|
1734
1734
|
}), s.then((o) => {
|
|
1735
|
-
o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.transform = `perspective(${
|
|
1735
|
+
o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.transform = `perspective(${F}px) rotateY(${Z}deg) translate3d(-100%, 0, 0)`;
|
|
1736
1736
|
}), {}),
|
|
1737
1737
|
animation: ({ from: n, to: s }) => {
|
|
1738
1738
|
const o = new g({
|
|
1739
1739
|
element: n,
|
|
1740
1740
|
integrator: m.from(t),
|
|
1741
1741
|
style: (r) => {
|
|
1742
|
-
const l = -r *
|
|
1742
|
+
const l = -r * Z, c = r * 100;
|
|
1743
1743
|
return {
|
|
1744
|
-
transform: `perspective(${
|
|
1744
|
+
transform: `perspective(${F}px) rotateY(${l}deg) translate3d(${c}%, 0, 0)`
|
|
1745
1745
|
};
|
|
1746
1746
|
},
|
|
1747
1747
|
// The outgoing node is reused (Activity/cacheComponents re-hide it),
|
|
@@ -1754,24 +1754,33 @@ const Mn = {
|
|
|
1754
1754
|
element: s,
|
|
1755
1755
|
integrator: m.from(t),
|
|
1756
1756
|
style: (r, l) => {
|
|
1757
|
-
const c = l *
|
|
1757
|
+
const c = l * Z, a = -l * 100;
|
|
1758
1758
|
return {
|
|
1759
|
-
transform: `perspective(${
|
|
1759
|
+
transform: `perspective(${F}px) rotateY(${c}deg) translate3d(${a}%, 0, 0)`
|
|
1760
1760
|
};
|
|
1761
1761
|
},
|
|
1762
1762
|
onComplete: () => {
|
|
1763
1763
|
s.style.transform = "", s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "";
|
|
1764
1764
|
}
|
|
1765
1765
|
});
|
|
1766
|
-
return new
|
|
1766
|
+
return new C([o, i], { mode: "sequence" });
|
|
1767
1767
|
}
|
|
1768
1768
|
};
|
|
1769
1769
|
};
|
|
1770
|
-
function
|
|
1770
|
+
function Is(e) {
|
|
1771
1771
|
const { paths: t } = e;
|
|
1772
|
-
return v(t, () =>
|
|
1772
|
+
return v(t, () => Vn());
|
|
1773
1773
|
}
|
|
1774
|
-
function
|
|
1774
|
+
function Ct(e, t) {
|
|
1775
|
+
const n = e.getBoundingClientRect(), s = t.getBoundingClientRect();
|
|
1776
|
+
return new DOMRect(
|
|
1777
|
+
s.left - n.left,
|
|
1778
|
+
s.top - n.top,
|
|
1779
|
+
s.width,
|
|
1780
|
+
s.height
|
|
1781
|
+
);
|
|
1782
|
+
}
|
|
1783
|
+
function Rn({
|
|
1775
1784
|
enterRect: e,
|
|
1776
1785
|
exitRect: t,
|
|
1777
1786
|
pageRect: n,
|
|
@@ -1817,30 +1826,30 @@ const Nn = {
|
|
|
1817
1826
|
damping: 33,
|
|
1818
1827
|
doubleSpring: 1
|
|
1819
1828
|
}
|
|
1820
|
-
},
|
|
1821
|
-
function
|
|
1829
|
+
}, Tt = 0.12, Xn = 18;
|
|
1830
|
+
function Bn() {
|
|
1822
1831
|
return {
|
|
1823
1832
|
transformOrigin: "50% 50%",
|
|
1824
1833
|
animate: (e) => {
|
|
1825
1834
|
const t = 1 - e;
|
|
1826
1835
|
return {
|
|
1827
|
-
transform: `scale(${1 -
|
|
1836
|
+
transform: `scale(${1 - Tt * t})`
|
|
1828
1837
|
};
|
|
1829
1838
|
}
|
|
1830
1839
|
};
|
|
1831
1840
|
}
|
|
1832
|
-
function
|
|
1841
|
+
function Wn() {
|
|
1833
1842
|
return {
|
|
1834
1843
|
transformOrigin: "50% 50%",
|
|
1835
1844
|
animate: (e) => {
|
|
1836
1845
|
const t = 1 - e;
|
|
1837
1846
|
return {
|
|
1838
|
-
transform: `scale(${1 -
|
|
1847
|
+
transform: `scale(${1 - Tt * t})`
|
|
1839
1848
|
};
|
|
1840
1849
|
}
|
|
1841
1850
|
};
|
|
1842
1851
|
}
|
|
1843
|
-
const
|
|
1852
|
+
const q = {
|
|
1844
1853
|
willChange: "backdrop-filter",
|
|
1845
1854
|
initialStyle: {
|
|
1846
1855
|
position: "absolute",
|
|
@@ -1864,12 +1873,12 @@ const j = {
|
|
|
1864
1873
|
};
|
|
1865
1874
|
}
|
|
1866
1875
|
};
|
|
1867
|
-
class
|
|
1876
|
+
class Zn {
|
|
1868
1877
|
constructor() {
|
|
1869
1878
|
$(this, "physics", Nn);
|
|
1870
1879
|
}
|
|
1871
1880
|
contribute(t) {
|
|
1872
|
-
const { from: n, to: s, resolved: o, physics: i } = t, r = o.mode === "enter", l = r ? n : s, c = r ?
|
|
1881
|
+
const { from: n, to: s, resolved: o, physics: i } = t, r = o.mode === "enter", l = r ? n : s, c = r ? Bn() : Wn();
|
|
1873
1882
|
return c && (l.style.transformOrigin = c.transformOrigin), [
|
|
1874
1883
|
new g({
|
|
1875
1884
|
element: l,
|
|
@@ -1879,10 +1888,10 @@ class Wn {
|
|
|
1879
1888
|
];
|
|
1880
1889
|
}
|
|
1881
1890
|
}
|
|
1882
|
-
class
|
|
1891
|
+
class qn {
|
|
1883
1892
|
prepare(t) {
|
|
1884
1893
|
const n = t.createElement("zoom-overlay");
|
|
1885
|
-
return Object.assign(n.style,
|
|
1894
|
+
return Object.assign(n.style, q.initialStyle), n.style.willChange = q.willChange, t.context.positionedParent.appendChild(n), { overlay: n };
|
|
1886
1895
|
}
|
|
1887
1896
|
contribute(t) {
|
|
1888
1897
|
const n = t.extras.overlay;
|
|
@@ -1890,19 +1899,19 @@ class Zn {
|
|
|
1890
1899
|
new g({
|
|
1891
1900
|
element: n,
|
|
1892
1901
|
integrator: m.from(t.physics),
|
|
1893
|
-
style: (s) =>
|
|
1902
|
+
style: (s) => q.style(t.resolved.mode, s)
|
|
1894
1903
|
})
|
|
1895
1904
|
]) : [];
|
|
1896
1905
|
}
|
|
1897
1906
|
}
|
|
1898
|
-
const
|
|
1907
|
+
const jn = {
|
|
1899
1908
|
spring: {
|
|
1900
1909
|
stiffness: 430,
|
|
1901
1910
|
damping: 33,
|
|
1902
1911
|
doubleSpring: 1
|
|
1903
1912
|
}
|
|
1904
1913
|
};
|
|
1905
|
-
function
|
|
1914
|
+
function Kn({
|
|
1906
1915
|
enterRect: e,
|
|
1907
1916
|
exitRect: t,
|
|
1908
1917
|
scrollOffset: n
|
|
@@ -1918,7 +1927,7 @@ function jn({
|
|
|
1918
1927
|
}
|
|
1919
1928
|
};
|
|
1920
1929
|
}
|
|
1921
|
-
function
|
|
1930
|
+
function Gn({
|
|
1922
1931
|
enterRect: e,
|
|
1923
1932
|
exitRect: t,
|
|
1924
1933
|
scrollOffset: n
|
|
@@ -1934,12 +1943,12 @@ function Kn({
|
|
|
1934
1943
|
}
|
|
1935
1944
|
};
|
|
1936
1945
|
}
|
|
1937
|
-
class
|
|
1946
|
+
class Jn {
|
|
1938
1947
|
constructor() {
|
|
1939
|
-
$(this, "physics",
|
|
1948
|
+
$(this, "physics", jn);
|
|
1940
1949
|
}
|
|
1941
1950
|
contribute(t) {
|
|
1942
|
-
const { from: n, to: s, resolved: o, input: i, physics: r } = t, l = o.mode === "enter", c = l ? n : s, a = l ?
|
|
1951
|
+
const { from: n, to: s, resolved: o, input: i, physics: r } = t, l = o.mode === "enter", c = l ? n : s, a = l ? Kn(i) : Gn(i);
|
|
1943
1952
|
return a && (c.style.transformOrigin = a.transformOrigin), [
|
|
1944
1953
|
new g({
|
|
1945
1954
|
element: c,
|
|
@@ -1949,37 +1958,37 @@ class Gn {
|
|
|
1949
1958
|
];
|
|
1950
1959
|
}
|
|
1951
1960
|
}
|
|
1952
|
-
const
|
|
1961
|
+
const Qn = {
|
|
1953
1962
|
spring: {
|
|
1954
1963
|
stiffness: 530,
|
|
1955
1964
|
damping: 34,
|
|
1956
1965
|
doubleSpring: 1
|
|
1957
1966
|
}
|
|
1958
1967
|
};
|
|
1959
|
-
class
|
|
1968
|
+
class ts {
|
|
1960
1969
|
constructor() {
|
|
1961
|
-
$(this, "physics",
|
|
1970
|
+
$(this, "physics", Qn);
|
|
1962
1971
|
}
|
|
1963
1972
|
contribute(t) {
|
|
1964
1973
|
return [];
|
|
1965
1974
|
}
|
|
1966
1975
|
}
|
|
1967
|
-
const
|
|
1968
|
-
expand: () => new
|
|
1969
|
-
static: () => new
|
|
1970
|
-
blur: () => new
|
|
1976
|
+
const es = {
|
|
1977
|
+
expand: () => new Jn(),
|
|
1978
|
+
static: () => new ts(),
|
|
1979
|
+
blur: () => new Zn()
|
|
1971
1980
|
};
|
|
1972
|
-
function
|
|
1973
|
-
return
|
|
1981
|
+
function ns(e) {
|
|
1982
|
+
return es[e]();
|
|
1974
1983
|
}
|
|
1975
|
-
const
|
|
1976
|
-
function
|
|
1977
|
-
const t = e.getAttribute(
|
|
1984
|
+
const j = "data-zoom-enter-key", Et = "data-zoom-exit-key", ss = "data-zoom-radius";
|
|
1985
|
+
function xt(e) {
|
|
1986
|
+
const t = e.getAttribute(ss);
|
|
1978
1987
|
if (!t) return 0;
|
|
1979
1988
|
const n = parseFloat(t);
|
|
1980
1989
|
return Number.isFinite(n) && n > 0 ? n : 0;
|
|
1981
1990
|
}
|
|
1982
|
-
function
|
|
1991
|
+
function os(e, t) {
|
|
1983
1992
|
const n = [];
|
|
1984
1993
|
let s = t;
|
|
1985
1994
|
for (; s && s !== e; ) {
|
|
@@ -1991,57 +2000,57 @@ function ss(e, t) {
|
|
|
1991
2000
|
}
|
|
1992
2001
|
return n;
|
|
1993
2002
|
}
|
|
1994
|
-
function
|
|
1995
|
-
const t = e.querySelectorAll(`[${
|
|
2003
|
+
function Pt(e) {
|
|
2004
|
+
const t = e.querySelectorAll(`[${j}]`);
|
|
1996
2005
|
return t.length !== 1 ? null : t[0];
|
|
1997
2006
|
}
|
|
1998
|
-
function
|
|
2007
|
+
function _t(e, t) {
|
|
1999
2008
|
const n = e.querySelectorAll(`[${Et}]`);
|
|
2000
2009
|
for (const s of n)
|
|
2001
2010
|
if (s.getAttribute(Et) === t)
|
|
2002
2011
|
return s;
|
|
2003
2012
|
return null;
|
|
2004
2013
|
}
|
|
2005
|
-
function
|
|
2006
|
-
const n =
|
|
2014
|
+
function is(e, t) {
|
|
2015
|
+
const n = Pt(e), s = Pt(t);
|
|
2007
2016
|
if (!n && s) {
|
|
2008
|
-
const o = s.getAttribute(
|
|
2017
|
+
const o = s.getAttribute(j);
|
|
2009
2018
|
if (!o) return null;
|
|
2010
|
-
const i =
|
|
2019
|
+
const i = _t(e, o);
|
|
2011
2020
|
return i ? { mode: "enter", enterEl: s, exitEl: i } : null;
|
|
2012
2021
|
}
|
|
2013
2022
|
if (n && !s) {
|
|
2014
|
-
const o = n.getAttribute(
|
|
2023
|
+
const o = n.getAttribute(j);
|
|
2015
2024
|
if (!o) return null;
|
|
2016
|
-
const i =
|
|
2025
|
+
const i = _t(t, o);
|
|
2017
2026
|
return i ? { mode: "exit", enterEl: n, exitEl: i } : null;
|
|
2018
2027
|
}
|
|
2019
2028
|
return null;
|
|
2020
2029
|
}
|
|
2021
|
-
function
|
|
2030
|
+
function rs(e, t, n, s) {
|
|
2022
2031
|
return {
|
|
2023
|
-
enterRect:
|
|
2032
|
+
enterRect: Ct(
|
|
2024
2033
|
e.mode === "enter" ? n : t,
|
|
2025
2034
|
e.enterEl
|
|
2026
2035
|
),
|
|
2027
|
-
exitRect:
|
|
2036
|
+
exitRect: Ct(
|
|
2028
2037
|
e.mode === "enter" ? t : n,
|
|
2029
2038
|
e.exitEl
|
|
2030
2039
|
),
|
|
2031
2040
|
pageRect: e.mode === "enter" ? n.getBoundingClientRect() : t.getBoundingClientRect(),
|
|
2032
2041
|
scrollOffset: s,
|
|
2033
|
-
enterRadius:
|
|
2034
|
-
exitRadius:
|
|
2042
|
+
enterRadius: xt(e.enterEl),
|
|
2043
|
+
exitRadius: xt(e.exitEl)
|
|
2035
2044
|
};
|
|
2036
2045
|
}
|
|
2037
|
-
class
|
|
2046
|
+
class as {
|
|
2038
2047
|
prepare(t) {
|
|
2039
2048
|
t.from.then((n) => {
|
|
2040
2049
|
n.style.willChange = "transform, clip-path, opacity", n.style.backfaceVisibility = "hidden", n.style.contain = "layout paint";
|
|
2041
2050
|
});
|
|
2042
2051
|
}
|
|
2043
2052
|
contribute(t) {
|
|
2044
|
-
const { from: n, to: s, resolved: o, input: i, physics: r, onComplete: l } = t, c = o.mode === "enter", a = c ?
|
|
2053
|
+
const { from: n, to: s, resolved: o, input: i, physics: r, onComplete: l } = t, c = o.mode === "enter", a = c ? Rn(i) : zn(i), p = c ? s : n, d = c ? "t" : "u";
|
|
2045
2054
|
a && (p.style.transformOrigin = a.transformOrigin);
|
|
2046
2055
|
const f = c ? "-2" : "2", u = n.style.zIndex;
|
|
2047
2056
|
return n.style.zIndex = f, l(() => {
|
|
@@ -2058,9 +2067,9 @@ class rs {
|
|
|
2058
2067
|
];
|
|
2059
2068
|
}
|
|
2060
2069
|
}
|
|
2061
|
-
class
|
|
2070
|
+
class ls {
|
|
2062
2071
|
contribute(t) {
|
|
2063
|
-
const { resolved: n, physics: s, from: o, to: i, onComplete: r } = t, l = n.mode === "enter" ? i : o, c =
|
|
2072
|
+
const { resolved: n, physics: s, from: o, to: i, onComplete: r } = t, l = n.mode === "enter" ? i : o, c = os(l, n.enterEl);
|
|
2064
2073
|
if (c.length === 0) return [];
|
|
2065
2074
|
const a = c.map((p) => p.style.opacity);
|
|
2066
2075
|
if (n.mode === "enter")
|
|
@@ -2081,35 +2090,35 @@ class as {
|
|
|
2081
2090
|
);
|
|
2082
2091
|
}
|
|
2083
2092
|
}
|
|
2084
|
-
class
|
|
2093
|
+
class Ot {
|
|
2085
2094
|
contribute() {
|
|
2086
2095
|
return [];
|
|
2087
2096
|
}
|
|
2088
2097
|
}
|
|
2089
|
-
const
|
|
2090
|
-
default: () => new
|
|
2091
|
-
fade: () => new
|
|
2098
|
+
const cs = {
|
|
2099
|
+
default: () => new Ot(),
|
|
2100
|
+
fade: () => new ls()
|
|
2092
2101
|
};
|
|
2093
|
-
function
|
|
2094
|
-
return
|
|
2102
|
+
function ps(e) {
|
|
2103
|
+
return cs[e]();
|
|
2095
2104
|
}
|
|
2096
|
-
class
|
|
2105
|
+
class ds extends Ot {
|
|
2097
2106
|
}
|
|
2098
|
-
function
|
|
2099
|
-
const t =
|
|
2107
|
+
function fs(e) {
|
|
2108
|
+
const t = ns(e.type);
|
|
2100
2109
|
return { strategies: [
|
|
2101
|
-
new
|
|
2110
|
+
new as(),
|
|
2102
2111
|
t,
|
|
2103
|
-
|
|
2104
|
-
new
|
|
2112
|
+
ps(e.variant),
|
|
2113
|
+
new ds(),
|
|
2105
2114
|
// Overlay is intrinsically tied to backdrop-filter-driven types. Today
|
|
2106
2115
|
// that's only `blur`; the table-driven factory above owns the mapping
|
|
2107
2116
|
// so this conditional is the single line that knows the relationship.
|
|
2108
|
-
...e.type === "blur" ? [new
|
|
2117
|
+
...e.type === "blur" ? [new qn()] : []
|
|
2109
2118
|
], physics: t.physics };
|
|
2110
2119
|
}
|
|
2111
|
-
const
|
|
2112
|
-
const { strategies: t, physics: n } =
|
|
2120
|
+
const ys = (e) => {
|
|
2121
|
+
const { strategies: t, physics: n } = fs(e);
|
|
2113
2122
|
return {
|
|
2114
2123
|
prepare: (s) => {
|
|
2115
2124
|
const o = {
|
|
@@ -2129,10 +2138,10 @@ const fs = (e) => {
|
|
|
2129
2138
|
return i;
|
|
2130
2139
|
},
|
|
2131
2140
|
animation: ({ from: s, to: o, context: i, ...r }) => {
|
|
2132
|
-
const l =
|
|
2141
|
+
const l = is(s, o);
|
|
2133
2142
|
if (!l)
|
|
2134
|
-
return new
|
|
2135
|
-
const c =
|
|
2143
|
+
return new C([], { mode: "parallel" });
|
|
2144
|
+
const c = rs(l, s, o, i.scrollOffset), a = [], d = {
|
|
2136
2145
|
from: s,
|
|
2137
2146
|
to: o,
|
|
2138
2147
|
resolved: l,
|
|
@@ -2158,36 +2167,36 @@ const fs = (e) => {
|
|
|
2158
2167
|
}
|
|
2159
2168
|
};
|
|
2160
2169
|
}
|
|
2161
|
-
return new
|
|
2170
|
+
return new C(f, { mode: "parallel" });
|
|
2162
2171
|
}
|
|
2163
2172
|
};
|
|
2164
2173
|
};
|
|
2165
|
-
function
|
|
2174
|
+
function hs(e) {
|
|
2166
2175
|
const t = e.type ?? "static", n = e.variant ?? (e.fade ? "fade" : "default");
|
|
2167
2176
|
return { type: t, variant: n };
|
|
2168
2177
|
}
|
|
2169
|
-
function
|
|
2170
|
-
const t =
|
|
2178
|
+
function Ts(e) {
|
|
2179
|
+
const t = hs(e);
|
|
2171
2180
|
return v(
|
|
2172
2181
|
e.paths,
|
|
2173
|
-
() =>
|
|
2182
|
+
() => ys(t)
|
|
2174
2183
|
);
|
|
2175
2184
|
}
|
|
2176
2185
|
export {
|
|
2177
|
-
|
|
2178
|
-
|
|
2186
|
+
Fs as Animation,
|
|
2187
|
+
C as MultiAnimation,
|
|
2179
2188
|
g as WebAnimation,
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2189
|
+
ws as axis,
|
|
2190
|
+
Ss as blind,
|
|
2191
|
+
bs as drill,
|
|
2192
|
+
$s as fade,
|
|
2193
|
+
Cs as film,
|
|
2185
2194
|
Es as hero,
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2195
|
+
xs as jaemin,
|
|
2196
|
+
Ps as rotate,
|
|
2197
|
+
_s as scroll,
|
|
2198
|
+
Ds as sheet,
|
|
2199
|
+
vs as slide,
|
|
2200
|
+
Is as strip,
|
|
2201
|
+
Ts as zoom
|
|
2193
2202
|
};
|