@ssgoi/core 7.0.4 → 7.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation/animation.d.ts +4 -66
- package/dist/animation/animation.d.ts.map +1 -1
- package/dist/animation/integrator/provider.d.ts +1 -1
- package/dist/animation/integrator/provider.d.ts.map +1 -1
- package/dist/animation/web-animation.d.ts.map +1 -1
- package/dist/index.cjs +15 -15
- package/dist/index.js +1189 -1345
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +543 -707
- package/dist/multi-animation-B5hEmEgN.cjs +1 -0
- package/dist/{multi-animation-ZFZBDBGr.js → multi-animation-DyZGEfKy.js} +72 -128
- package/dist/page-motion-gH3WomQO.cjs +1 -0
- package/dist/page-motion-wmW7PW6B.js +204 -0
- package/dist/resolve-transition-rule-BL12rDDu.cjs +1 -0
- package/dist/resolve-transition-rule-DbkMu0rm.js +160 -0
- package/dist/runtime/animation.d.ts +68 -0
- package/dist/runtime/animation.d.ts.map +1 -0
- package/dist/runtime/index.d.ts +12 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/motion-state.d.ts +25 -0
- package/dist/runtime/motion-state.d.ts.map +1 -0
- package/dist/runtime/page-motion.d.ts +27 -0
- package/dist/runtime/page-motion.d.ts.map +1 -0
- package/dist/runtime/physics.d.ts +30 -0
- package/dist/runtime/physics.d.ts.map +1 -0
- package/dist/runtime/presence.d.ts +20 -0
- package/dist/runtime/presence.d.ts.map +1 -0
- package/dist/runtime/resolve-transition-rule.d.ts +21 -0
- package/dist/runtime/resolve-transition-rule.d.ts.map +1 -0
- package/dist/runtime/timeline.d.ts +12 -0
- package/dist/runtime/timeline.d.ts.map +1 -0
- package/dist/runtime/types.d.ts +53 -0
- package/dist/runtime/types.d.ts.map +1 -0
- package/dist/runtime.cjs +1 -0
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.js +51 -0
- package/dist/ssgoi-transition/navigation-direction.d.ts +3 -4
- package/dist/ssgoi-transition/navigation-direction.d.ts.map +1 -1
- package/dist/ssgoi-transition/path-pattern.d.ts +1 -1
- package/dist/ssgoi-transition/path-pattern.d.ts.map +1 -1
- package/dist/ssgoi-transition/resolve-transition-rule.d.ts +2 -20
- package/dist/ssgoi-transition/resolve-transition-rule.d.ts.map +1 -1
- package/dist/timeline-L_vXntmP.js +68 -0
- package/dist/timeline-Zoo1I4XU.cjs +1 -0
- package/dist/transitions/fade/transition.d.ts.map +1 -1
- package/dist/transitions/slide/transition.d.ts.map +1 -1
- package/dist/types/index.d.ts +17 -147
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +7 -1
- package/dist/multi-animation-6124HEke.cjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,232 +1,78 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import { A as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
E(this, "restDelta");
|
|
13
|
-
E(this, "restSpeed");
|
|
14
|
-
const { stiffness: n, damping: s } = t, o = 1;
|
|
15
|
-
this.omega = Math.sqrt(n / o), this.zeta = s / (2 * Math.sqrt(n * o)), this.restDelta = t.restDelta ?? ct, this.restSpeed = t.restSpeed ?? kt;
|
|
1
|
+
var ee = Object.defineProperty;
|
|
2
|
+
var ne = (t, e, n) => e in t ? ee(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var T = (t, e, n) => ne(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { W as m, M as E } from "./multi-animation-DyZGEfKy.js";
|
|
5
|
+
import { A as fs } from "./multi-animation-DyZGEfKy.js";
|
|
6
|
+
import { I as b, F as oe, a as se, p as X, S as ie, b as re } from "./page-motion-wmW7PW6B.js";
|
|
7
|
+
import { P as ae, S as le } from "./timeline-L_vXntmP.js";
|
|
8
|
+
class ce {
|
|
9
|
+
constructor(e) {
|
|
10
|
+
T(this, "durationSec");
|
|
11
|
+
this.durationSec = Math.max(1 / 60, e.durationSec);
|
|
16
12
|
}
|
|
17
|
-
step(
|
|
18
|
-
const
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
isSettled(t, n) {
|
|
25
|
-
const s = Math.abs(n - t.position), o = Math.abs(t.velocity);
|
|
26
|
-
return s < this.restDelta && o < this.restSpeed;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
class re {
|
|
30
|
-
constructor(t) {
|
|
31
|
-
E(this, "leader");
|
|
32
|
-
E(this, "follower");
|
|
33
|
-
E(this, "restDelta");
|
|
34
|
-
E(this, "restSpeed");
|
|
35
|
-
this.restDelta = t.restDelta ?? ct, this.restSpeed = t.restSpeed ?? kt, this.leader = new X({
|
|
36
|
-
stiffness: t.stiffness,
|
|
37
|
-
damping: t.damping,
|
|
38
|
-
restDelta: this.restDelta,
|
|
39
|
-
restSpeed: this.restSpeed
|
|
40
|
-
});
|
|
41
|
-
let n, s, o, i;
|
|
42
|
-
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 X({
|
|
43
|
-
stiffness: n,
|
|
44
|
-
damping: s,
|
|
45
|
-
restDelta: o ?? this.restDelta,
|
|
46
|
-
restSpeed: i ?? this.restSpeed
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
step(t, n, s) {
|
|
50
|
-
const i = t._leader ?? {
|
|
51
|
-
position: t.position,
|
|
52
|
-
velocity: t.velocity
|
|
53
|
-
}, r = this.leader.step(i, n, s), l = this.follower.step(
|
|
54
|
-
t,
|
|
55
|
-
r.position,
|
|
56
|
-
s
|
|
57
|
-
);
|
|
58
|
-
return {
|
|
59
|
-
position: l.position,
|
|
60
|
-
velocity: l.velocity,
|
|
61
|
-
_leader: r
|
|
62
|
-
};
|
|
13
|
+
step(e, n, o) {
|
|
14
|
+
const s = n - e.position;
|
|
15
|
+
if (s === 0) return e;
|
|
16
|
+
const r = Math.sign(s), i = Math.abs(s) / this.durationSec, l = r * i * o, c = e.position + l;
|
|
17
|
+
return (r > 0 ? c >= n : c <= n) ? { position: n, velocity: 0 } : { position: c, velocity: r * i };
|
|
63
18
|
}
|
|
64
|
-
isSettled(
|
|
65
|
-
|
|
66
|
-
return s._leader ? Math.abs(n - s._leader.position) < this.restDelta && Math.abs(s._leader.velocity) < this.restSpeed && o : o;
|
|
19
|
+
isSettled(e, n) {
|
|
20
|
+
return Math.abs(e.position - n) < ae;
|
|
67
21
|
}
|
|
68
22
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
E(this, "resistanceType");
|
|
75
|
-
E(this, "min");
|
|
76
|
-
E(this, "max");
|
|
77
|
-
E(this, "bounceStiffness");
|
|
78
|
-
E(this, "bounceDamping");
|
|
79
|
-
E(this, "restDelta");
|
|
80
|
-
this.acceleration = t.acceleration, this.resistance = t.resistance, this.resistanceType = t.resistanceType ?? "quadratic", this.min = t.min, this.max = t.max, this.bounceStiffness = t.bounceStiffness ?? le, this.bounceDamping = t.bounceDamping ?? ce, this.restDelta = t.restDelta ?? ae;
|
|
81
|
-
}
|
|
82
|
-
step(t, n, s) {
|
|
83
|
-
const o = Math.min(s, 0.033), { acceleration: i, resistance: r, resistanceType: l, min: c, max: a } = this, { position: p, velocity: d } = t, u = c !== void 0 && p < c, h = a !== void 0 && p > a;
|
|
84
|
-
let f;
|
|
85
|
-
if (u || h) {
|
|
86
|
-
const g = p - (u ? c : a), $ = -this.bounceStiffness * g, x = -this.bounceDamping * d;
|
|
87
|
-
f = $ + x;
|
|
88
|
-
} else {
|
|
89
|
-
const S = n > p ? 1 : -1;
|
|
90
|
-
let g;
|
|
91
|
-
l === "linear" ? g = r * d : g = r * d * Math.abs(d), f = S * i - g;
|
|
92
|
-
}
|
|
93
|
-
const y = d + f * o;
|
|
94
|
-
let m = p + y * o;
|
|
95
|
-
if (!u && !h) {
|
|
96
|
-
const S = n > p ? 1 : -1;
|
|
97
|
-
(S > 0 && m > n || S < 0 && m < n) && (m = n);
|
|
98
|
-
}
|
|
99
|
-
return {
|
|
100
|
-
position: m,
|
|
101
|
-
velocity: m === n ? 0 : y
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
isSettled(t, n) {
|
|
105
|
-
return Math.abs(n - t.position) < this.restDelta;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
class w {
|
|
109
|
-
/**
|
|
110
|
-
* Create an Integrator from physics config
|
|
111
|
-
*
|
|
112
|
-
* @param config Physics configuration (spring or inertia)
|
|
113
|
-
* @returns Appropriate Integrator instance
|
|
114
|
-
* @throws Error if both spring and inertia are provided
|
|
115
|
-
*/
|
|
116
|
-
static from(t) {
|
|
117
|
-
if (t.spring && t.inertia)
|
|
118
|
-
throw new Error(
|
|
119
|
-
"Cannot use both 'spring' and 'inertia' together. Choose one physics type."
|
|
120
|
-
);
|
|
121
|
-
if (t.inertia)
|
|
122
|
-
return new pe({
|
|
123
|
-
acceleration: t.inertia.acceleration,
|
|
124
|
-
resistance: t.inertia.resistance,
|
|
125
|
-
resistanceType: t.inertia.resistanceType,
|
|
126
|
-
min: t.inertia.min,
|
|
127
|
-
max: t.inertia.max,
|
|
128
|
-
bounceStiffness: t.inertia.bounceStiffness,
|
|
129
|
-
bounceDamping: t.inertia.bounceDamping,
|
|
130
|
-
restDelta: t.inertia.restDelta
|
|
131
|
-
});
|
|
132
|
-
const n = t.spring ?? { stiffness: 300, damping: 30 };
|
|
133
|
-
if (n.doubleSpring) {
|
|
134
|
-
const s = n.doubleSpring;
|
|
135
|
-
let o;
|
|
136
|
-
return typeof s == "number" ? o = s : typeof s == "object" && (o = {
|
|
137
|
-
stiffness: s.stiffness,
|
|
138
|
-
damping: s.damping
|
|
139
|
-
}), new re({
|
|
140
|
-
stiffness: n.stiffness,
|
|
141
|
-
damping: n.damping,
|
|
142
|
-
follower: o,
|
|
143
|
-
restDelta: n.restDelta,
|
|
144
|
-
restSpeed: n.restSpeed
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
return new X({
|
|
148
|
-
stiffness: n.stiffness,
|
|
149
|
-
damping: n.damping,
|
|
150
|
-
restDelta: n.restDelta,
|
|
151
|
-
restSpeed: n.restSpeed
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Create an Integrator from SpringConfig (legacy support)
|
|
156
|
-
* @deprecated Use from({ spring: config }) instead
|
|
157
|
-
*/
|
|
158
|
-
static fromSpring(t) {
|
|
159
|
-
return w.from({ spring: t });
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
class de {
|
|
163
|
-
constructor(t) {
|
|
164
|
-
E(this, "durationSec");
|
|
165
|
-
this.durationSec = Math.max(1 / 60, t.durationSec);
|
|
166
|
-
}
|
|
167
|
-
step(t, n, s) {
|
|
168
|
-
const o = n - t.position;
|
|
169
|
-
if (o === 0) return t;
|
|
170
|
-
const i = Math.sign(o), r = Math.abs(o) / this.durationSec, l = i * r * s, c = t.position + l;
|
|
171
|
-
return (i > 0 ? c >= n : c <= n) ? { position: n, velocity: 0 } : { position: c, velocity: i * r };
|
|
172
|
-
}
|
|
173
|
-
isSettled(t, n) {
|
|
174
|
-
return Math.abs(t.position - n) < ct;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
function k(e, t) {
|
|
178
|
-
function n(i) {
|
|
179
|
-
let r = 0, l = 0;
|
|
180
|
-
const c = i.offsetWidth, a = i.offsetHeight;
|
|
181
|
-
let p = i;
|
|
23
|
+
function L(t, e) {
|
|
24
|
+
function n(r) {
|
|
25
|
+
let i = 0, l = 0;
|
|
26
|
+
const c = r.offsetWidth, a = r.offsetHeight;
|
|
27
|
+
let p = r;
|
|
182
28
|
for (; p; )
|
|
183
|
-
|
|
184
|
-
return
|
|
29
|
+
i += p.offsetTop, l += p.offsetLeft, p = p.offsetParent;
|
|
30
|
+
return i -= window.scrollY, l -= window.scrollX, { top: i, left: l, width: c, height: a };
|
|
185
31
|
}
|
|
186
|
-
const
|
|
32
|
+
const o = n(t), s = n(e);
|
|
187
33
|
return new DOMRect(
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
34
|
+
s.left - o.left,
|
|
35
|
+
s.top - o.top,
|
|
36
|
+
s.width,
|
|
37
|
+
s.height
|
|
192
38
|
);
|
|
193
39
|
}
|
|
194
|
-
function z(
|
|
195
|
-
const n =
|
|
40
|
+
function z(t, e) {
|
|
41
|
+
const n = t.getBoundingClientRect(), o = e.getBoundingClientRect(), s = t.offsetWidth > 0 ? n.width / t.offsetWidth : 1, r = t.offsetHeight > 0 ? n.height / t.offsetHeight : 1;
|
|
196
42
|
return new DOMRect(
|
|
197
|
-
(
|
|
198
|
-
(
|
|
199
|
-
|
|
200
|
-
|
|
43
|
+
(o.left - n.left) / s,
|
|
44
|
+
(o.top - n.top) / r,
|
|
45
|
+
o.width / s,
|
|
46
|
+
o.height / r
|
|
201
47
|
);
|
|
202
48
|
}
|
|
203
|
-
function F(
|
|
204
|
-
const { scrollingElement: n, positionedParent:
|
|
49
|
+
function F(t, e) {
|
|
50
|
+
const { scrollingElement: n, positionedParent: o } = t, s = n !== o && n.contains(o) ? L(n, o).top : 0;
|
|
205
51
|
return {
|
|
206
|
-
top: e
|
|
52
|
+
top: t[e].scroll.y,
|
|
207
53
|
left: 0,
|
|
208
54
|
width: n.clientWidth,
|
|
209
|
-
height: n.clientHeight -
|
|
55
|
+
height: n.clientHeight - s
|
|
210
56
|
};
|
|
211
57
|
}
|
|
212
|
-
function
|
|
213
|
-
const { scrollingElement: n, positionedParent:
|
|
58
|
+
function kt(t, e) {
|
|
59
|
+
const { scrollingElement: n, positionedParent: o } = t, s = n !== o && n.contains(o) ? L(n, o).top : 0;
|
|
214
60
|
return {
|
|
215
|
-
top: e
|
|
61
|
+
top: t[e].scroll.y - s,
|
|
216
62
|
height: n.clientHeight
|
|
217
63
|
};
|
|
218
64
|
}
|
|
219
|
-
const
|
|
65
|
+
const pt = 8, ut = {
|
|
220
66
|
spring: {
|
|
221
67
|
stiffness: 600,
|
|
222
68
|
damping: 40,
|
|
223
69
|
doubleSpring: 1.2
|
|
224
70
|
}
|
|
225
71
|
};
|
|
226
|
-
function
|
|
227
|
-
direction:
|
|
72
|
+
function pe({
|
|
73
|
+
direction: t
|
|
228
74
|
}) {
|
|
229
|
-
const
|
|
75
|
+
const e = t === "forward" ? pt : -pt;
|
|
230
76
|
return {
|
|
231
77
|
out: {
|
|
232
78
|
willChange: "transform, opacity",
|
|
@@ -238,113 +84,113 @@ function ue({
|
|
|
238
84
|
in: {
|
|
239
85
|
willChange: "transform, opacity",
|
|
240
86
|
startStyle: {
|
|
241
|
-
transform: `translate3d(${
|
|
87
|
+
transform: `translate3d(${e}px, 0, 0)`,
|
|
242
88
|
opacity: "0"
|
|
243
89
|
},
|
|
244
90
|
animate: (n) => ({
|
|
245
|
-
transform: `translate3d(${
|
|
91
|
+
transform: `translate3d(${e * (1 - n)}px, 0, 0)`,
|
|
246
92
|
opacity: `${n}`
|
|
247
93
|
})
|
|
248
94
|
}
|
|
249
95
|
};
|
|
250
96
|
}
|
|
251
|
-
function
|
|
97
|
+
function ue() {
|
|
252
98
|
return {
|
|
253
99
|
outPhysics: ut,
|
|
254
100
|
inPhysics: ut,
|
|
255
101
|
// Both sides run together — the cross-fade is the whole point of the
|
|
256
102
|
// snappy feel. (fluid's sibling uses staggered fade-through.)
|
|
257
103
|
composition: { mode: "parallel", startAt: [0, 0] },
|
|
258
|
-
build:
|
|
104
|
+
build: pe
|
|
259
105
|
};
|
|
260
106
|
}
|
|
261
|
-
const
|
|
107
|
+
const dt = 30, de = {
|
|
262
108
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
263
|
-
},
|
|
109
|
+
}, fe = {
|
|
264
110
|
spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
|
|
265
111
|
};
|
|
266
|
-
function
|
|
267
|
-
direction:
|
|
112
|
+
function ye({
|
|
113
|
+
direction: t
|
|
268
114
|
}) {
|
|
269
|
-
const
|
|
115
|
+
const e = t === "forward" ? 1 : -1, n = -dt * e, o = dt * e;
|
|
270
116
|
return {
|
|
271
117
|
out: {
|
|
272
118
|
willChange: "transform, opacity",
|
|
273
119
|
startStyle: {},
|
|
274
|
-
animate: (
|
|
275
|
-
transform: `translate3d(${n *
|
|
276
|
-
opacity: `${1 -
|
|
120
|
+
animate: (s) => ({
|
|
121
|
+
transform: `translate3d(${n * s}px, 0, 0)`,
|
|
122
|
+
opacity: `${1 - s}`
|
|
277
123
|
})
|
|
278
124
|
},
|
|
279
125
|
in: {
|
|
280
126
|
willChange: "transform, opacity",
|
|
281
127
|
startStyle: {
|
|
282
|
-
transform: `translate3d(${
|
|
128
|
+
transform: `translate3d(${o}px, 0, 0)`,
|
|
283
129
|
opacity: "0"
|
|
284
130
|
},
|
|
285
|
-
animate: (
|
|
286
|
-
transform: `translate3d(${
|
|
287
|
-
opacity: `${
|
|
131
|
+
animate: (s) => ({
|
|
132
|
+
transform: `translate3d(${o * (1 - s)}px, 0, 0)`,
|
|
133
|
+
opacity: `${s}`
|
|
288
134
|
})
|
|
289
135
|
}
|
|
290
136
|
};
|
|
291
137
|
}
|
|
292
|
-
function
|
|
138
|
+
function he() {
|
|
293
139
|
return {
|
|
294
|
-
outPhysics:
|
|
295
|
-
inPhysics:
|
|
140
|
+
outPhysics: de,
|
|
141
|
+
inPhysics: fe,
|
|
296
142
|
// Phased motion: outgoing falls away first under inertia, then incoming
|
|
297
143
|
// springs in. The fade-through shape comes from the integrator curves
|
|
298
144
|
// plus the sequence handoff, not from FADE_SPLIT inside animate(t).
|
|
299
145
|
composition: { mode: "sequence" },
|
|
300
|
-
build:
|
|
146
|
+
build: ye
|
|
301
147
|
};
|
|
302
148
|
}
|
|
303
|
-
const
|
|
304
|
-
snappy:
|
|
305
|
-
fluid:
|
|
306
|
-
},
|
|
149
|
+
const me = {
|
|
150
|
+
snappy: ue(),
|
|
151
|
+
fluid: he()
|
|
152
|
+
}, ft = 8, ge = {
|
|
307
153
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
308
|
-
},
|
|
154
|
+
}, be = {
|
|
309
155
|
spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
|
|
310
156
|
};
|
|
311
|
-
function
|
|
312
|
-
direction:
|
|
157
|
+
function we({
|
|
158
|
+
direction: t
|
|
313
159
|
}) {
|
|
314
|
-
const
|
|
160
|
+
const e = t === "forward" ? 1 : -1, n = -ft * e, o = ft * e;
|
|
315
161
|
return {
|
|
316
162
|
out: {
|
|
317
163
|
willChange: "transform, opacity",
|
|
318
164
|
startStyle: {},
|
|
319
|
-
animate: (
|
|
320
|
-
transform: `translate3d(0, ${n *
|
|
321
|
-
opacity: `${1 -
|
|
165
|
+
animate: (s) => ({
|
|
166
|
+
transform: `translate3d(0, ${n * s}px, 0)`,
|
|
167
|
+
opacity: `${1 - s}`
|
|
322
168
|
})
|
|
323
169
|
},
|
|
324
170
|
in: {
|
|
325
171
|
willChange: "transform, opacity",
|
|
326
172
|
startStyle: {
|
|
327
|
-
transform: `translate3d(0, ${
|
|
173
|
+
transform: `translate3d(0, ${o}px, 0)`,
|
|
328
174
|
opacity: "0"
|
|
329
175
|
},
|
|
330
|
-
animate: (
|
|
331
|
-
transform: `translate3d(0, ${
|
|
332
|
-
opacity: `${
|
|
176
|
+
animate: (s) => ({
|
|
177
|
+
transform: `translate3d(0, ${o * (1 - s)}px, 0)`,
|
|
178
|
+
opacity: `${s}`
|
|
333
179
|
})
|
|
334
180
|
}
|
|
335
181
|
};
|
|
336
182
|
}
|
|
337
|
-
function
|
|
183
|
+
function Se() {
|
|
338
184
|
return {
|
|
339
|
-
outPhysics:
|
|
340
|
-
inPhysics:
|
|
185
|
+
outPhysics: ge,
|
|
186
|
+
inPhysics: be,
|
|
341
187
|
composition: { mode: "sequence" },
|
|
342
|
-
build:
|
|
188
|
+
build: we
|
|
343
189
|
};
|
|
344
190
|
}
|
|
345
|
-
const
|
|
191
|
+
const xe = 40, Ce = {
|
|
346
192
|
inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
|
|
347
|
-
},
|
|
193
|
+
}, $e = {
|
|
348
194
|
spring: {
|
|
349
195
|
stiffness: 400,
|
|
350
196
|
damping: 30,
|
|
@@ -353,8 +199,8 @@ const $e = 40, Ee = {
|
|
|
353
199
|
restSpeed: 0.1
|
|
354
200
|
}
|
|
355
201
|
};
|
|
356
|
-
function
|
|
357
|
-
const
|
|
202
|
+
function Ee(t) {
|
|
203
|
+
const e = xe;
|
|
358
204
|
return {
|
|
359
205
|
out: {
|
|
360
206
|
willChange: "opacity",
|
|
@@ -366,42 +212,42 @@ function _e(e) {
|
|
|
366
212
|
in: {
|
|
367
213
|
willChange: "transform, opacity",
|
|
368
214
|
startStyle: {
|
|
369
|
-
transform: `translate3d(0, ${
|
|
215
|
+
transform: `translate3d(0, ${e}px, 0)`,
|
|
370
216
|
opacity: "0"
|
|
371
217
|
},
|
|
372
218
|
animate: (n) => ({
|
|
373
|
-
transform: `translate3d(0, ${
|
|
219
|
+
transform: `translate3d(0, ${e * (1 - n)}px, 0)`,
|
|
374
220
|
opacity: `${n}`
|
|
375
221
|
})
|
|
376
222
|
}
|
|
377
223
|
};
|
|
378
224
|
}
|
|
379
|
-
function
|
|
225
|
+
function Pe() {
|
|
380
226
|
return {
|
|
381
|
-
outPhysics:
|
|
382
|
-
inPhysics:
|
|
227
|
+
outPhysics: Ce,
|
|
228
|
+
inPhysics: $e,
|
|
383
229
|
composition: { mode: "parallel", startAt: [0, 0] },
|
|
384
|
-
build:
|
|
230
|
+
build: Ee
|
|
385
231
|
};
|
|
386
232
|
}
|
|
387
|
-
const yt =
|
|
233
|
+
const yt = Se(), Ae = {
|
|
388
234
|
snappy: yt,
|
|
389
235
|
directional: yt,
|
|
390
|
-
"non-directional":
|
|
391
|
-
},
|
|
236
|
+
"non-directional": Pe()
|
|
237
|
+
}, ht = {
|
|
392
238
|
spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
|
|
393
|
-
}, W = 0.1, Z = 1 / 3,
|
|
394
|
-
function
|
|
395
|
-
direction:
|
|
239
|
+
}, W = 0.1, Z = 1 / 3, mt = (t) => Math.max(0, Math.min(1, t));
|
|
240
|
+
function Ie({
|
|
241
|
+
direction: t
|
|
396
242
|
}) {
|
|
397
|
-
const
|
|
243
|
+
const e = t === "forward" ? 1 : -1, n = 1 - e * W;
|
|
398
244
|
return {
|
|
399
245
|
out: {
|
|
400
246
|
willChange: "transform, opacity",
|
|
401
247
|
startStyle: {},
|
|
402
|
-
animate: (
|
|
403
|
-
transform: `scale(${1 +
|
|
404
|
-
opacity: `${
|
|
248
|
+
animate: (o) => ({
|
|
249
|
+
transform: `scale(${1 + e * o * W})`,
|
|
250
|
+
opacity: `${mt(1 - o / Z)}`
|
|
405
251
|
})
|
|
406
252
|
},
|
|
407
253
|
in: {
|
|
@@ -410,33 +256,33 @@ function Re({
|
|
|
410
256
|
transform: `scale(${n})`,
|
|
411
257
|
opacity: "0"
|
|
412
258
|
},
|
|
413
|
-
animate: (
|
|
414
|
-
transform: `scale(${n +
|
|
415
|
-
opacity: `${
|
|
259
|
+
animate: (o) => ({
|
|
260
|
+
transform: `scale(${n + e * o * W})`,
|
|
261
|
+
opacity: `${mt((o - Z) / (1 - Z))}`
|
|
416
262
|
})
|
|
417
263
|
}
|
|
418
264
|
};
|
|
419
265
|
}
|
|
420
|
-
function
|
|
266
|
+
function _e() {
|
|
421
267
|
return {
|
|
422
|
-
outPhysics:
|
|
423
|
-
inPhysics:
|
|
268
|
+
outPhysics: ht,
|
|
269
|
+
inPhysics: ht,
|
|
424
270
|
// Scale must move together on both sides; fade-through is encoded inside
|
|
425
271
|
// each tick (piecewise), not via composition staggering — so parallel.
|
|
426
272
|
composition: { mode: "parallel" },
|
|
427
|
-
build:
|
|
273
|
+
build: Ie
|
|
428
274
|
};
|
|
429
275
|
}
|
|
430
|
-
const
|
|
276
|
+
const gt = {
|
|
431
277
|
spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
|
|
432
|
-
}, G = 0.1, j = 1 / 3,
|
|
433
|
-
function
|
|
278
|
+
}, G = 0.1, j = 1 / 3, bt = (t) => Math.max(0, Math.min(1, t));
|
|
279
|
+
function Re() {
|
|
434
280
|
return {
|
|
435
281
|
out: {
|
|
436
282
|
willChange: "opacity",
|
|
437
283
|
startStyle: {},
|
|
438
|
-
animate: (
|
|
439
|
-
opacity: `${
|
|
284
|
+
animate: (t) => ({
|
|
285
|
+
opacity: `${bt(1 - t / j)}`
|
|
440
286
|
})
|
|
441
287
|
},
|
|
442
288
|
in: {
|
|
@@ -445,94 +291,94 @@ function Oe() {
|
|
|
445
291
|
transform: `scale(${1 - G})`,
|
|
446
292
|
opacity: "0"
|
|
447
293
|
},
|
|
448
|
-
animate: (
|
|
449
|
-
transform: `scale(${1 - G +
|
|
450
|
-
opacity: `${
|
|
294
|
+
animate: (t) => ({
|
|
295
|
+
transform: `scale(${1 - G + t * G})`,
|
|
296
|
+
opacity: `${bt((t - j) / (1 - j))}`
|
|
451
297
|
})
|
|
452
298
|
}
|
|
453
299
|
};
|
|
454
300
|
}
|
|
455
|
-
function
|
|
301
|
+
function ve() {
|
|
456
302
|
return {
|
|
457
|
-
outPhysics:
|
|
458
|
-
inPhysics:
|
|
303
|
+
outPhysics: gt,
|
|
304
|
+
inPhysics: gt,
|
|
459
305
|
composition: { mode: "parallel" },
|
|
460
|
-
build:
|
|
306
|
+
build: Re
|
|
461
307
|
};
|
|
462
308
|
}
|
|
463
|
-
const
|
|
464
|
-
snappy:
|
|
465
|
-
directional:
|
|
466
|
-
"non-directional":
|
|
467
|
-
},
|
|
468
|
-
x:
|
|
469
|
-
y:
|
|
470
|
-
z:
|
|
309
|
+
const wt = _e(), Oe = {
|
|
310
|
+
snappy: wt,
|
|
311
|
+
directional: wt,
|
|
312
|
+
"non-directional": ve()
|
|
313
|
+
}, Fe = {
|
|
314
|
+
x: me,
|
|
315
|
+
y: Ae,
|
|
316
|
+
z: Oe
|
|
471
317
|
};
|
|
472
|
-
function
|
|
473
|
-
const n =
|
|
474
|
-
return n[
|
|
318
|
+
function Te(t, e) {
|
|
319
|
+
const n = Fe[t];
|
|
320
|
+
return n[e] ?? n.snappy;
|
|
475
321
|
}
|
|
476
|
-
const Ye = "x",
|
|
477
|
-
function
|
|
478
|
-
|
|
479
|
-
for (const [n,
|
|
480
|
-
|
|
322
|
+
const Ye = "x", De = "snappy";
|
|
323
|
+
function St(t, e) {
|
|
324
|
+
t.style.willChange = e.willChange, t.style.backfaceVisibility = "hidden", t.style.contain = "layout paint";
|
|
325
|
+
for (const [n, o] of Object.entries(e.startStyle))
|
|
326
|
+
t.style[n] = o;
|
|
481
327
|
}
|
|
482
|
-
function
|
|
483
|
-
|
|
328
|
+
function Lt(t) {
|
|
329
|
+
t.style.willChange = "auto", t.style.backfaceVisibility = "", t.style.contain = "", t.style.transform = "", t.style.opacity = "", t.style.clipPath = "";
|
|
484
330
|
}
|
|
485
|
-
function
|
|
486
|
-
|
|
331
|
+
function Me(t) {
|
|
332
|
+
Lt(t), t.style.pointerEvents = "";
|
|
487
333
|
}
|
|
488
|
-
const
|
|
489
|
-
const
|
|
334
|
+
const ke = (t = {}) => {
|
|
335
|
+
const e = t.type ?? Ye, n = t.feel ?? De, o = Te(e, n);
|
|
490
336
|
return {
|
|
491
|
-
prepare: ({ from:
|
|
492
|
-
const l =
|
|
493
|
-
return
|
|
494
|
-
|
|
495
|
-
}),
|
|
496
|
-
|
|
337
|
+
prepare: ({ from: s, to: r, context: i }) => {
|
|
338
|
+
const l = o.build({ direction: i.direction });
|
|
339
|
+
return s.then((c) => {
|
|
340
|
+
St(c, l.out), c.style.pointerEvents = "none";
|
|
341
|
+
}), r.then((c) => {
|
|
342
|
+
St(c, l.in);
|
|
497
343
|
}), {};
|
|
498
344
|
},
|
|
499
|
-
animation: ({ from:
|
|
500
|
-
const l =
|
|
501
|
-
if (
|
|
502
|
-
const p = F(
|
|
503
|
-
|
|
345
|
+
animation: ({ from: s, to: r, context: i }) => {
|
|
346
|
+
const l = o.build({ direction: i.direction });
|
|
347
|
+
if (e === "z") {
|
|
348
|
+
const p = F(i, "from"), u = F(i, "to");
|
|
349
|
+
s.style.clipPath = `inset(${p.top}px 0 calc(100% - ${p.top + p.height}px) 0)`, r.style.clipPath = `inset(${u.top}px 0 calc(100% - ${u.top + u.height}px) 0)`;
|
|
504
350
|
}
|
|
505
|
-
const c = new
|
|
506
|
-
element:
|
|
507
|
-
integrator:
|
|
351
|
+
const c = new m({
|
|
352
|
+
element: s,
|
|
353
|
+
integrator: b.from(o.outPhysics),
|
|
508
354
|
style: (p) => l.out.animate(p),
|
|
509
355
|
// Restore the reused from node's inline styles on complete. This
|
|
510
356
|
// covers willChange/backfaceVisibility/contain/transform/opacity (from
|
|
511
357
|
// applyStartStyle + the WAAPI final frame), pointerEvents (set in
|
|
512
358
|
// prepare), and clipPath (set above for z; harmless no-op otherwise).
|
|
513
|
-
onComplete: () =>
|
|
514
|
-
}), a = new
|
|
515
|
-
element:
|
|
516
|
-
integrator:
|
|
359
|
+
onComplete: () => Me(s)
|
|
360
|
+
}), a = new m({
|
|
361
|
+
element: r,
|
|
362
|
+
integrator: b.from(o.inPhysics),
|
|
517
363
|
style: (p) => l.in.animate(p),
|
|
518
|
-
onComplete: () =>
|
|
364
|
+
onComplete: () => Lt(r)
|
|
519
365
|
});
|
|
520
|
-
return new
|
|
366
|
+
return new E([c, a], o.composition);
|
|
521
367
|
}
|
|
522
368
|
};
|
|
523
369
|
};
|
|
524
|
-
function
|
|
525
|
-
return
|
|
370
|
+
function Le(t, e, n) {
|
|
371
|
+
return t === "y" ? e === "non-directional" ? "non-directional" : "directional" : t !== "x" || e === "snappy" || n === "snappy" ? "snappy" : "fluid";
|
|
526
372
|
}
|
|
527
|
-
function
|
|
528
|
-
const
|
|
529
|
-
return
|
|
373
|
+
function Jo(t = {}) {
|
|
374
|
+
const e = t.type ?? "x", n = t.variant, o = t.feel, s = Le(e, n, o);
|
|
375
|
+
return ke({ type: e, feel: s });
|
|
530
376
|
}
|
|
531
|
-
const
|
|
377
|
+
const He = {
|
|
532
378
|
spring: { stiffness: 200, damping: 22 }
|
|
533
|
-
},
|
|
534
|
-
function
|
|
535
|
-
window.getComputedStyle(
|
|
379
|
+
}, Ne = 10, ze = "horizontal", Ve = "#000000";
|
|
380
|
+
function xt(t, e, n, o, s, r) {
|
|
381
|
+
window.getComputedStyle(t).position === "static" && (t.style.position = "relative");
|
|
536
382
|
const l = document.createElement("div");
|
|
537
383
|
l.style.cssText = `
|
|
538
384
|
position: absolute;
|
|
@@ -545,59 +391,59 @@ function Ct(e, t, n, s, o, i) {
|
|
|
545
391
|
overflow: hidden;
|
|
546
392
|
`;
|
|
547
393
|
const c = [];
|
|
548
|
-
for (let a = 0; a <
|
|
394
|
+
for (let a = 0; a < e; a++) {
|
|
549
395
|
const p = document.createElement("div");
|
|
550
396
|
if (n === "horizontal") {
|
|
551
|
-
const
|
|
397
|
+
const u = 100 / e;
|
|
552
398
|
p.style.cssText = `
|
|
553
399
|
position: absolute;
|
|
554
|
-
top: ${
|
|
400
|
+
top: ${u * a}%;
|
|
555
401
|
left: 0;
|
|
556
402
|
width: 100%;
|
|
557
|
-
height: calc(${
|
|
558
|
-
background: ${
|
|
559
|
-
transform: scaleX(${
|
|
560
|
-
transform-origin: ${
|
|
403
|
+
height: calc(${u}% + 1px);
|
|
404
|
+
background: ${o};
|
|
405
|
+
transform: scaleX(${s === "hidden" ? 0 : 1});
|
|
406
|
+
transform-origin: ${r} center;
|
|
561
407
|
will-change: transform;
|
|
562
408
|
`;
|
|
563
409
|
} else {
|
|
564
|
-
const
|
|
410
|
+
const u = 100 / e;
|
|
565
411
|
p.style.cssText = `
|
|
566
412
|
position: absolute;
|
|
567
413
|
top: 0;
|
|
568
|
-
left: ${
|
|
569
|
-
width: calc(${
|
|
414
|
+
left: ${u * a}%;
|
|
415
|
+
width: calc(${u}% + 1px);
|
|
570
416
|
height: 100%;
|
|
571
|
-
background: ${
|
|
572
|
-
transform: scaleY(${
|
|
573
|
-
transform-origin: ${
|
|
417
|
+
background: ${o};
|
|
418
|
+
transform: scaleY(${s === "hidden" ? 0 : 1});
|
|
419
|
+
transform-origin: ${r === "left" ? "top" : "bottom"} center;
|
|
574
420
|
will-change: transform;
|
|
575
421
|
`;
|
|
576
422
|
}
|
|
577
423
|
c.push(p), l.appendChild(p);
|
|
578
424
|
}
|
|
579
|
-
return
|
|
425
|
+
return t.appendChild(l), { container: l, blinds: c };
|
|
580
426
|
}
|
|
581
|
-
const
|
|
582
|
-
const
|
|
427
|
+
const Ue = (t = {}) => {
|
|
428
|
+
const e = t.blindCount ?? Ne, n = t.direction ?? ze, o = t.blindColor ?? Ve, s = t.physics ?? He;
|
|
583
429
|
return {
|
|
584
|
-
prepare: async ({ from:
|
|
585
|
-
const l = await
|
|
430
|
+
prepare: async ({ from: r, to: i }) => {
|
|
431
|
+
const l = await r, c = await i;
|
|
586
432
|
l.style.zIndex = "1000";
|
|
587
|
-
const a =
|
|
433
|
+
const a = xt(
|
|
588
434
|
l,
|
|
589
|
-
|
|
435
|
+
e,
|
|
590
436
|
n,
|
|
591
|
-
|
|
437
|
+
o,
|
|
592
438
|
"hidden",
|
|
593
439
|
"left"
|
|
594
440
|
);
|
|
595
441
|
c.style.position = "relative", c.style.zIndex = "0";
|
|
596
|
-
const p =
|
|
442
|
+
const p = xt(
|
|
597
443
|
c,
|
|
598
|
-
|
|
444
|
+
e,
|
|
599
445
|
n,
|
|
600
|
-
|
|
446
|
+
o,
|
|
601
447
|
"closed",
|
|
602
448
|
"right"
|
|
603
449
|
);
|
|
@@ -610,78 +456,78 @@ const Be = (e = {}) => {
|
|
|
610
456
|
};
|
|
611
457
|
},
|
|
612
458
|
animation: ({
|
|
613
|
-
fromEl:
|
|
614
|
-
fromBlinds:
|
|
459
|
+
fromEl: r,
|
|
460
|
+
fromBlinds: i,
|
|
615
461
|
fromContainer: l,
|
|
616
462
|
toBlinds: c,
|
|
617
463
|
toContainer: a
|
|
618
464
|
}) => {
|
|
619
|
-
const p =
|
|
620
|
-
(f) => new
|
|
465
|
+
const p = i.map(
|
|
466
|
+
(f) => new m({
|
|
621
467
|
element: f,
|
|
622
|
-
integrator:
|
|
623
|
-
style: (
|
|
624
|
-
transform: n === "horizontal" ? `scaleX(${
|
|
468
|
+
integrator: b.from(s),
|
|
469
|
+
style: (h) => ({
|
|
470
|
+
transform: n === "horizontal" ? `scaleX(${h})` : `scaleY(${h})`
|
|
625
471
|
})
|
|
626
472
|
})
|
|
627
|
-
),
|
|
628
|
-
(f,
|
|
473
|
+
), u = c.map(
|
|
474
|
+
(f, h) => new m({
|
|
629
475
|
element: f,
|
|
630
|
-
integrator:
|
|
631
|
-
style: (
|
|
476
|
+
integrator: b.from(s),
|
|
477
|
+
style: (g, S) => ({
|
|
632
478
|
transform: n === "horizontal" ? `scaleX(${S})` : `scaleY(${S})`
|
|
633
479
|
}),
|
|
634
|
-
onComplete:
|
|
635
|
-
a.remove(), l.remove(),
|
|
480
|
+
onComplete: h === c.length - 1 ? () => {
|
|
481
|
+
a.remove(), l.remove(), r.style.zIndex = "", r.style.position = "";
|
|
636
482
|
} : void 0
|
|
637
483
|
})
|
|
638
|
-
),
|
|
639
|
-
return new
|
|
484
|
+
), d = new E(p, { mode: "parallel" }), y = new E(u, { mode: "parallel" });
|
|
485
|
+
return new E([d, y], { mode: "sequence" });
|
|
640
486
|
}
|
|
641
487
|
};
|
|
642
488
|
};
|
|
643
|
-
function
|
|
644
|
-
const { type:
|
|
645
|
-
return
|
|
489
|
+
function Qo(t = {}) {
|
|
490
|
+
const { type: e = "horizontal" } = t;
|
|
491
|
+
return Ue({ direction: e });
|
|
646
492
|
}
|
|
647
|
-
const
|
|
493
|
+
const Xe = {
|
|
648
494
|
spring: {
|
|
649
495
|
stiffness: 250,
|
|
650
496
|
damping: 23,
|
|
651
497
|
doubleSpring: 0.7
|
|
652
498
|
}
|
|
653
|
-
},
|
|
654
|
-
function
|
|
655
|
-
const
|
|
499
|
+
}, k = 0.5;
|
|
500
|
+
function Be(t) {
|
|
501
|
+
const e = t === "enter" ? -100 : 100, n = t === "enter" ? 100 : -100;
|
|
656
502
|
return {
|
|
657
503
|
out: {
|
|
658
504
|
willChange: "transform, opacity",
|
|
659
505
|
startStyle: {},
|
|
660
|
-
animate: (
|
|
661
|
-
transform: `translate3d(${
|
|
662
|
-
opacity: `${
|
|
506
|
+
animate: (o) => ({
|
|
507
|
+
transform: `translate3d(${e * o}%, 0, 0)`,
|
|
508
|
+
opacity: `${k + (1 - k) * (1 - o)}`
|
|
663
509
|
})
|
|
664
510
|
},
|
|
665
511
|
in: {
|
|
666
512
|
willChange: "transform, opacity",
|
|
667
513
|
startStyle: {
|
|
668
514
|
transform: `translate3d(${n}%, 0, 0)`,
|
|
669
|
-
opacity: `${
|
|
515
|
+
opacity: `${k}`
|
|
670
516
|
},
|
|
671
|
-
animate: (
|
|
672
|
-
transform: `translate3d(${n * (1 -
|
|
673
|
-
opacity: `${
|
|
517
|
+
animate: (o) => ({
|
|
518
|
+
transform: `translate3d(${n * (1 - o)}%, 0, 0)`,
|
|
519
|
+
opacity: `${k + (1 - k) * o}`
|
|
674
520
|
})
|
|
675
521
|
}
|
|
676
522
|
};
|
|
677
523
|
}
|
|
678
|
-
function
|
|
524
|
+
function We() {
|
|
679
525
|
return {
|
|
680
|
-
physics:
|
|
681
|
-
build:
|
|
526
|
+
physics: Xe,
|
|
527
|
+
build: Be
|
|
682
528
|
};
|
|
683
529
|
}
|
|
684
|
-
const
|
|
530
|
+
const Ze = {
|
|
685
531
|
spring: {
|
|
686
532
|
stiffness: 230,
|
|
687
533
|
damping: 25,
|
|
@@ -691,14 +537,14 @@ const je = {
|
|
|
691
537
|
}
|
|
692
538
|
}
|
|
693
539
|
};
|
|
694
|
-
function
|
|
695
|
-
const
|
|
540
|
+
function Ge(t) {
|
|
541
|
+
const e = t === "enter" ? -20 : 100, n = t === "enter" ? 100 : -20;
|
|
696
542
|
return {
|
|
697
543
|
out: {
|
|
698
544
|
willChange: "transform",
|
|
699
545
|
startStyle: {},
|
|
700
|
-
animate: (
|
|
701
|
-
transform: `translate3d(${
|
|
546
|
+
animate: (o) => ({
|
|
547
|
+
transform: `translate3d(${e * o}%, 0, 0)`
|
|
702
548
|
})
|
|
703
549
|
},
|
|
704
550
|
in: {
|
|
@@ -706,122 +552,122 @@ function qe(e) {
|
|
|
706
552
|
startStyle: {
|
|
707
553
|
transform: `translate3d(${n}%, 0, 0)`
|
|
708
554
|
},
|
|
709
|
-
animate: (
|
|
710
|
-
transform: `translate3d(${n * (1 -
|
|
555
|
+
animate: (o) => ({
|
|
556
|
+
transform: `translate3d(${n * (1 - o)}%, 0, 0)`
|
|
711
557
|
})
|
|
712
558
|
}
|
|
713
559
|
};
|
|
714
560
|
}
|
|
715
|
-
function
|
|
561
|
+
function je() {
|
|
716
562
|
return {
|
|
717
|
-
physics:
|
|
718
|
-
build:
|
|
563
|
+
physics: Ze,
|
|
564
|
+
build: Ge
|
|
719
565
|
};
|
|
720
566
|
}
|
|
721
|
-
const
|
|
722
|
-
parallax:
|
|
723
|
-
crossfade:
|
|
724
|
-
},
|
|
725
|
-
function
|
|
726
|
-
|
|
727
|
-
for (const [n,
|
|
728
|
-
|
|
729
|
-
}
|
|
730
|
-
const
|
|
731
|
-
const
|
|
567
|
+
const Ke = {
|
|
568
|
+
parallax: je(),
|
|
569
|
+
crossfade: We()
|
|
570
|
+
}, _ = "0", Ht = "1", R = "2", qe = "parallax";
|
|
571
|
+
function Ct(t, e) {
|
|
572
|
+
t.style.willChange = e.willChange, t.style.backfaceVisibility = "hidden", t.style.contain = "layout paint";
|
|
573
|
+
for (const [n, o] of Object.entries(e.startStyle))
|
|
574
|
+
t.style[n] = o;
|
|
575
|
+
}
|
|
576
|
+
const Je = (t = {}) => {
|
|
577
|
+
const e = Ke[t.type ?? qe], n = e.physics;
|
|
732
578
|
return {
|
|
733
|
-
prepare: ({ from:
|
|
734
|
-
const
|
|
735
|
-
return
|
|
736
|
-
|
|
737
|
-
}),
|
|
738
|
-
|
|
579
|
+
prepare: ({ from: o, to: s, context: r }) => {
|
|
580
|
+
const i = r.direction === "forward" ? "enter" : "exit", l = e.build(i), c = i === "enter" ? _ : R, a = i === "enter" ? R : _;
|
|
581
|
+
return o.then((p) => {
|
|
582
|
+
Ct(p, l.out), p.style.pointerEvents = "none", p.style.zIndex = c;
|
|
583
|
+
}), s.then((p) => {
|
|
584
|
+
Ct(p, l.in), p.style.position = "relative", p.style.zIndex = a;
|
|
739
585
|
}), {};
|
|
740
586
|
},
|
|
741
|
-
animation: ({ from:
|
|
742
|
-
const
|
|
743
|
-
element:
|
|
744
|
-
integrator:
|
|
745
|
-
style: (
|
|
587
|
+
animation: ({ from: o, to: s, context: r }) => {
|
|
588
|
+
const i = r.direction === "forward" ? "enter" : "exit", l = e.build(i), c = i === "enter" ? R : _, a = new m({
|
|
589
|
+
element: o,
|
|
590
|
+
integrator: b.from(n),
|
|
591
|
+
style: (u) => l.out.animate(u),
|
|
746
592
|
// The outgoing node is the real, reused element (re-hidden on navigate),
|
|
747
593
|
// so clear every inline style we set on it — mirroring the `to` cleanup,
|
|
748
594
|
// plus the out-only `pointerEvents` / `zIndex`.
|
|
749
595
|
onComplete: () => {
|
|
750
|
-
|
|
596
|
+
o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "", o.style.transform = "", o.style.opacity = "", o.style.pointerEvents = "", o.style.zIndex = "";
|
|
751
597
|
}
|
|
752
|
-
}), p = new
|
|
753
|
-
element:
|
|
754
|
-
integrator:
|
|
755
|
-
style: (
|
|
598
|
+
}), p = new m({
|
|
599
|
+
element: s,
|
|
600
|
+
integrator: b.from(n),
|
|
601
|
+
style: (u) => l.in.animate(u),
|
|
756
602
|
onComplete: () => {
|
|
757
|
-
|
|
603
|
+
s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "", s.style.transform = "", s.style.opacity = "", s.style.position === "relative" && (s.style.position = ""), s.style.zIndex === c && (s.style.zIndex = "");
|
|
758
604
|
}
|
|
759
605
|
});
|
|
760
|
-
for (const
|
|
761
|
-
const
|
|
762
|
-
|
|
763
|
-
|
|
606
|
+
for (const u of [a, p]) {
|
|
607
|
+
const d = u.onComplete;
|
|
608
|
+
u.onComplete = () => {
|
|
609
|
+
d == null || d(), u.releaseFill();
|
|
764
610
|
};
|
|
765
611
|
}
|
|
766
|
-
return new
|
|
612
|
+
return new E([a, p], { mode: "parallel" });
|
|
767
613
|
}
|
|
768
614
|
};
|
|
769
615
|
};
|
|
770
|
-
function
|
|
771
|
-
return
|
|
772
|
-
}
|
|
773
|
-
function
|
|
774
|
-
const
|
|
775
|
-
return
|
|
776
|
-
}
|
|
777
|
-
const
|
|
778
|
-
|
|
779
|
-
}, sn = {
|
|
780
|
-
spring: { stiffness: 170, damping: 20, doubleSpring: !0 }
|
|
781
|
-
}, on = (e = {}) => {
|
|
782
|
-
const t = e.physics ?? sn, n = e.physics ?? nn;
|
|
616
|
+
function Qe(t) {
|
|
617
|
+
return t === "slide" || t === "crossfade" ? "crossfade" : "parallax";
|
|
618
|
+
}
|
|
619
|
+
function ts(t = {}) {
|
|
620
|
+
const e = t.type, n = Qe(e);
|
|
621
|
+
return Je({ type: n });
|
|
622
|
+
}
|
|
623
|
+
const tn = (t = {}) => {
|
|
624
|
+
const e = t.physics ?? oe, n = t.physics ?? se;
|
|
783
625
|
return {
|
|
784
|
-
prepare: ({ to:
|
|
785
|
-
|
|
626
|
+
prepare: ({ to: o }) => (o.then((s) => {
|
|
627
|
+
s.style.opacity = "0", s.style.willChange = "opacity";
|
|
786
628
|
}), {}),
|
|
787
|
-
animation: ({ from:
|
|
788
|
-
const
|
|
789
|
-
element:
|
|
790
|
-
integrator:
|
|
629
|
+
animation: ({ from: o, to: s }) => {
|
|
630
|
+
const r = new m({
|
|
631
|
+
element: o,
|
|
632
|
+
integrator: b.from(n),
|
|
791
633
|
// Default bounds (0, 1). `u` runs 1→0 as the animation moves
|
|
792
634
|
// forward, mapping opacity from fully visible to invisible.
|
|
793
|
-
style: (l
|
|
635
|
+
style: (l) => ({
|
|
636
|
+
opacity: X("fade", "out", "forward", l).opacity
|
|
637
|
+
}),
|
|
794
638
|
onComplete: () => {
|
|
795
|
-
|
|
639
|
+
o.style.willChange = "auto", o.style.opacity = "";
|
|
796
640
|
}
|
|
797
|
-
}),
|
|
798
|
-
element:
|
|
799
|
-
integrator:
|
|
800
|
-
style: (l) => ({
|
|
641
|
+
}), i = new m({
|
|
642
|
+
element: s,
|
|
643
|
+
integrator: b.from(e),
|
|
644
|
+
style: (l) => ({
|
|
645
|
+
opacity: X("fade", "in", "forward", l).opacity
|
|
646
|
+
}),
|
|
801
647
|
onComplete: () => {
|
|
802
|
-
|
|
648
|
+
s.style.willChange = "auto", s.style.opacity = "";
|
|
803
649
|
}
|
|
804
650
|
});
|
|
805
|
-
return new
|
|
651
|
+
return new E([r, i], { mode: "sequence" });
|
|
806
652
|
}
|
|
807
653
|
};
|
|
808
654
|
};
|
|
809
|
-
function
|
|
810
|
-
return
|
|
655
|
+
function es(t = {}) {
|
|
656
|
+
return tn();
|
|
811
657
|
}
|
|
812
|
-
const
|
|
658
|
+
const K = {
|
|
813
659
|
scaleDown: { stiffness: 20, damping: 7 },
|
|
814
660
|
translate: { stiffness: 15, damping: 7 },
|
|
815
661
|
scaleUp: { stiffness: 20, damping: 7 }
|
|
816
|
-
},
|
|
662
|
+
}, Y = {
|
|
817
663
|
scaleDown: 0,
|
|
818
664
|
translate: 0.2,
|
|
819
665
|
scaleUp: 0.8
|
|
820
|
-
},
|
|
821
|
-
function
|
|
822
|
-
const { items:
|
|
666
|
+
}, en = 0.8, nn = "white", $t = 1e3 / 60, on = 600;
|
|
667
|
+
function sn(t) {
|
|
668
|
+
const { items: e, from: n, to: o, recordFrame: s } = t, r = $t / 1e3, i = Math.abs(o - n), l = e.map((a) => ({
|
|
823
669
|
item: a,
|
|
824
|
-
integrator: new
|
|
670
|
+
integrator: new ie({
|
|
825
671
|
stiffness: a.spring.stiffness,
|
|
826
672
|
damping: a.spring.damping
|
|
827
673
|
}),
|
|
@@ -832,111 +678,111 @@ function cn(e) {
|
|
|
832
678
|
}));
|
|
833
679
|
for (let a = 0; a < l.length; a++)
|
|
834
680
|
(a === 0 || l[a].item.offset === 0) && (l[a].started = !0);
|
|
835
|
-
|
|
681
|
+
s(0);
|
|
836
682
|
let c = 0;
|
|
837
|
-
for (let a = 1; a <=
|
|
838
|
-
const p = a *
|
|
683
|
+
for (let a = 1; a <= on; a++) {
|
|
684
|
+
const p = a * $t;
|
|
839
685
|
c = p;
|
|
840
|
-
for (const
|
|
841
|
-
!
|
|
842
|
-
for (let
|
|
843
|
-
const
|
|
844
|
-
if (
|
|
845
|
-
const
|
|
846
|
-
if (!
|
|
847
|
-
(
|
|
686
|
+
for (const u of l)
|
|
687
|
+
!u.started || u.settled || (u.state = u.integrator.step(u.state, o, r), u.integrator.isSettled(u.state, o) ? (u.settleTime += r, u.settleTime >= le && (u.state = { position: o, velocity: 0 }, u.settled = !0)) : u.settleTime = 0, u.item.tick(u.state.position));
|
|
688
|
+
for (let u = 1; u < l.length; u++) {
|
|
689
|
+
const d = l[u];
|
|
690
|
+
if (d.started) continue;
|
|
691
|
+
const y = l[u - 1];
|
|
692
|
+
if (!y.started) continue;
|
|
693
|
+
(i === 0 ? 1 : Math.abs(y.state.position - n) / i) >= d.item.offset && (d.started = !0);
|
|
848
694
|
}
|
|
849
|
-
if (
|
|
695
|
+
if (s(p), l.every((u) => u.settled)) return p;
|
|
850
696
|
}
|
|
851
697
|
return c;
|
|
852
698
|
}
|
|
853
|
-
function
|
|
854
|
-
return
|
|
855
|
-
stiffness:
|
|
856
|
-
damping:
|
|
857
|
-
} :
|
|
699
|
+
function q(t, e) {
|
|
700
|
+
return t != null && t.spring ? {
|
|
701
|
+
stiffness: t.spring.stiffness,
|
|
702
|
+
damping: t.spring.damping
|
|
703
|
+
} : e;
|
|
858
704
|
}
|
|
859
|
-
function
|
|
860
|
-
const { rect:
|
|
705
|
+
function Et(t) {
|
|
706
|
+
const { rect: e, scale: n, direction: o, override: s } = t, r = o === "out" ? { scale: 1, translateY: -e.top } : { scale: n, translateY: -e.top + e.height }, i = q(s, K.scaleDown), l = q(s, K.translate), c = q(s, K.scaleUp), a = o === "out" ? 1 : 0, p = o === "out" ? 0 : 1, u = o === "out" ? [
|
|
861
707
|
{
|
|
862
|
-
spring:
|
|
863
|
-
offset:
|
|
708
|
+
spring: i,
|
|
709
|
+
offset: Y.scaleDown,
|
|
864
710
|
tick: (f) => {
|
|
865
|
-
const
|
|
866
|
-
|
|
711
|
+
const h = 1 - f;
|
|
712
|
+
r.scale = 1 - (1 - n) * h;
|
|
867
713
|
}
|
|
868
714
|
},
|
|
869
715
|
{
|
|
870
716
|
spring: l,
|
|
871
|
-
offset:
|
|
717
|
+
offset: Y.translate,
|
|
872
718
|
tick: (f) => {
|
|
873
|
-
const
|
|
874
|
-
|
|
719
|
+
const h = 1 - f;
|
|
720
|
+
r.translateY = -e.top - e.height * h;
|
|
875
721
|
}
|
|
876
722
|
},
|
|
877
723
|
{
|
|
878
724
|
spring: c,
|
|
879
|
-
offset:
|
|
725
|
+
offset: Y.scaleUp,
|
|
880
726
|
tick: (f) => {
|
|
881
|
-
const
|
|
882
|
-
|
|
727
|
+
const h = 1 - f;
|
|
728
|
+
r.scale = n + (1 - n) * h;
|
|
883
729
|
}
|
|
884
730
|
}
|
|
885
731
|
] : [
|
|
886
732
|
{
|
|
887
|
-
spring:
|
|
888
|
-
offset:
|
|
733
|
+
spring: i,
|
|
734
|
+
offset: Y.scaleDown,
|
|
889
735
|
tick: (f) => {
|
|
890
|
-
|
|
736
|
+
r.scale = 1 - (1 - n) * f;
|
|
891
737
|
}
|
|
892
738
|
},
|
|
893
739
|
{
|
|
894
740
|
spring: l,
|
|
895
|
-
offset:
|
|
741
|
+
offset: Y.translate,
|
|
896
742
|
tick: (f) => {
|
|
897
|
-
|
|
743
|
+
r.translateY = -e.top + e.height * (1 - f);
|
|
898
744
|
}
|
|
899
745
|
},
|
|
900
746
|
{
|
|
901
747
|
spring: c,
|
|
902
|
-
offset:
|
|
748
|
+
offset: Y.scaleUp,
|
|
903
749
|
tick: (f) => {
|
|
904
|
-
|
|
750
|
+
r.scale = n + (1 - n) * f;
|
|
905
751
|
}
|
|
906
752
|
}
|
|
907
|
-
],
|
|
908
|
-
items:
|
|
753
|
+
], d = [], y = sn({
|
|
754
|
+
items: u,
|
|
909
755
|
from: a,
|
|
910
756
|
to: p,
|
|
911
|
-
recordFrame: (f) =>
|
|
757
|
+
recordFrame: (f) => d.push({
|
|
912
758
|
time: f,
|
|
913
|
-
scale:
|
|
914
|
-
translateY:
|
|
759
|
+
scale: r.scale,
|
|
760
|
+
translateY: r.translateY
|
|
915
761
|
})
|
|
916
762
|
});
|
|
917
|
-
return { snapshots:
|
|
918
|
-
}
|
|
919
|
-
function
|
|
920
|
-
if (
|
|
921
|
-
if (
|
|
922
|
-
if (
|
|
923
|
-
const n =
|
|
924
|
-
if (
|
|
925
|
-
const
|
|
763
|
+
return { snapshots: d, totalDuration: y };
|
|
764
|
+
}
|
|
765
|
+
function rn(t, e) {
|
|
766
|
+
if (t.length === 0) return { time: 0, scale: 1, translateY: 0 };
|
|
767
|
+
if (t.length === 1 || e <= 0) return t[0];
|
|
768
|
+
if (e >= 1) return t[t.length - 1];
|
|
769
|
+
const n = e * (t.length - 1), o = Math.floor(n), s = Math.ceil(n);
|
|
770
|
+
if (o === s) return t[o];
|
|
771
|
+
const r = t[o], i = t[s], l = n - o;
|
|
926
772
|
return {
|
|
927
|
-
time:
|
|
928
|
-
scale:
|
|
929
|
-
translateY:
|
|
773
|
+
time: r.time + (i.time - r.time) * l,
|
|
774
|
+
scale: r.scale + (i.scale - r.scale) * l,
|
|
775
|
+
translateY: r.translateY + (i.translateY - r.translateY) * l
|
|
930
776
|
};
|
|
931
777
|
}
|
|
932
|
-
const
|
|
778
|
+
const an = [
|
|
933
779
|
[1, 1],
|
|
934
780
|
[-1, 1],
|
|
935
781
|
[1, -1],
|
|
936
782
|
[-1, -1]
|
|
937
783
|
];
|
|
938
|
-
function
|
|
939
|
-
const
|
|
784
|
+
function ln(t, e) {
|
|
785
|
+
const s = (r, i, l) => {
|
|
940
786
|
const c = document.createElement("div");
|
|
941
787
|
Object.assign(c.style, {
|
|
942
788
|
position: "fixed",
|
|
@@ -944,155 +790,155 @@ function un(e, t) {
|
|
|
944
790
|
zIndex: "9999",
|
|
945
791
|
width: "15px",
|
|
946
792
|
height: "15px",
|
|
947
|
-
...
|
|
793
|
+
...r
|
|
948
794
|
});
|
|
949
795
|
const a = document.createElement("div");
|
|
950
796
|
Object.assign(a.style, {
|
|
951
797
|
position: "absolute",
|
|
952
798
|
width: "15px",
|
|
953
799
|
height: "1px",
|
|
954
|
-
backgroundColor:
|
|
800
|
+
backgroundColor: t,
|
|
955
801
|
[l]: "0",
|
|
956
|
-
[
|
|
802
|
+
[i]: "0"
|
|
957
803
|
});
|
|
958
804
|
const p = document.createElement("div");
|
|
959
805
|
return Object.assign(p.style, {
|
|
960
806
|
position: "absolute",
|
|
961
807
|
width: "1px",
|
|
962
808
|
height: "15px",
|
|
963
|
-
backgroundColor:
|
|
809
|
+
backgroundColor: t,
|
|
964
810
|
[l]: "0",
|
|
965
|
-
[
|
|
811
|
+
[i]: "0"
|
|
966
812
|
}), c.appendChild(a), c.appendChild(p), c;
|
|
967
813
|
};
|
|
968
814
|
return {
|
|
969
|
-
topLeft:
|
|
815
|
+
topLeft: s(
|
|
970
816
|
{
|
|
971
|
-
top: `${
|
|
972
|
-
left: `${
|
|
817
|
+
top: `${e.top - 1}px`,
|
|
818
|
+
left: `${e.left - 1}px`
|
|
973
819
|
},
|
|
974
820
|
"left",
|
|
975
821
|
"top"
|
|
976
822
|
),
|
|
977
|
-
topRight:
|
|
823
|
+
topRight: s(
|
|
978
824
|
{
|
|
979
|
-
top: `${
|
|
980
|
-
left: `${
|
|
825
|
+
top: `${e.top - 1}px`,
|
|
826
|
+
left: `${e.left + e.width - 15 + 1}px`
|
|
981
827
|
},
|
|
982
828
|
"right",
|
|
983
829
|
"top"
|
|
984
830
|
),
|
|
985
|
-
bottomLeft:
|
|
831
|
+
bottomLeft: s(
|
|
986
832
|
{
|
|
987
|
-
top: `${
|
|
988
|
-
left: `${
|
|
833
|
+
top: `${e.top + e.height - 15 + 1}px`,
|
|
834
|
+
left: `${e.left - 1}px`
|
|
989
835
|
},
|
|
990
836
|
"left",
|
|
991
837
|
"bottom"
|
|
992
838
|
),
|
|
993
|
-
bottomRight:
|
|
839
|
+
bottomRight: s(
|
|
994
840
|
{
|
|
995
|
-
top: `${
|
|
996
|
-
left: `${
|
|
841
|
+
top: `${e.top + e.height - 15 + 1}px`,
|
|
842
|
+
left: `${e.left + e.width - 15 + 1}px`
|
|
997
843
|
},
|
|
998
844
|
"right",
|
|
999
845
|
"bottom"
|
|
1000
846
|
)
|
|
1001
847
|
};
|
|
1002
848
|
}
|
|
1003
|
-
function
|
|
1004
|
-
const n =
|
|
1005
|
-
|
|
849
|
+
function Pt(t, e) {
|
|
850
|
+
const n = e.left + e.width / 2, o = e.top + e.height / 2;
|
|
851
|
+
t.style.transformOrigin = `${n}px ${o}px`;
|
|
1006
852
|
}
|
|
1007
|
-
function At(
|
|
1008
|
-
|
|
1009
|
-
${
|
|
1010
|
-
${
|
|
1011
|
-
${
|
|
1012
|
-
${
|
|
853
|
+
function At(t, e) {
|
|
854
|
+
t.style.clipPath = `polygon(
|
|
855
|
+
${e.left}px ${e.top}px,
|
|
856
|
+
${e.left + e.width}px ${e.top}px,
|
|
857
|
+
${e.left + e.width}px ${e.top + e.height}px,
|
|
858
|
+
${e.left}px ${e.top + e.height}px
|
|
1013
859
|
)`;
|
|
1014
860
|
}
|
|
1015
|
-
function J(
|
|
1016
|
-
const
|
|
1017
|
-
return new
|
|
1018
|
-
element:
|
|
1019
|
-
integrator: new
|
|
861
|
+
function J(t, e, n, o, s) {
|
|
862
|
+
const r = n / 1e3;
|
|
863
|
+
return new m({
|
|
864
|
+
element: t,
|
|
865
|
+
integrator: new ce({ durationSec: r }),
|
|
1020
866
|
lowerBound: 0,
|
|
1021
867
|
upperBound: 1,
|
|
1022
|
-
style: (
|
|
1023
|
-
onComplete:
|
|
868
|
+
style: (i) => o(rn(e, i)),
|
|
869
|
+
onComplete: s
|
|
1024
870
|
});
|
|
1025
871
|
}
|
|
1026
|
-
const
|
|
1027
|
-
var
|
|
1028
|
-
const
|
|
872
|
+
const cn = (t = {}) => {
|
|
873
|
+
var s;
|
|
874
|
+
const e = ((s = t.border) == null ? void 0 : s.color) ?? nn, n = en, o = t.physics;
|
|
1029
875
|
return {
|
|
1030
|
-
prepare: ({ from:
|
|
1031
|
-
const c = F(l, "from"), a = F(l, "to"), p =
|
|
876
|
+
prepare: ({ from: r, to: i, context: l }) => {
|
|
877
|
+
const c = F(l, "from"), a = F(l, "to"), p = L(document.body, l.positionedParent), u = ln(e, {
|
|
1032
878
|
...c,
|
|
1033
879
|
top: p.top
|
|
1034
880
|
});
|
|
1035
|
-
for (const
|
|
881
|
+
for (const d of [
|
|
1036
882
|
"topLeft",
|
|
1037
883
|
"topRight",
|
|
1038
884
|
"bottomLeft",
|
|
1039
885
|
"bottomRight"
|
|
1040
886
|
])
|
|
1041
|
-
l.positionedParent.appendChild(d
|
|
1042
|
-
return
|
|
1043
|
-
|
|
1044
|
-
}),
|
|
1045
|
-
|
|
1046
|
-
}), { borders:
|
|
887
|
+
l.positionedParent.appendChild(u[d]);
|
|
888
|
+
return r.then((d) => {
|
|
889
|
+
Pt(d, c), At(d, c), d.style.transform = `translateY(${-c.top}px)`;
|
|
890
|
+
}), i.then((d) => {
|
|
891
|
+
Pt(d, a), At(d, a), d.style.transform = `translateY(${-a.top + a.height}px) scale(${n})`;
|
|
892
|
+
}), { borders: u, fromRect: c, toRect: a };
|
|
1047
893
|
},
|
|
1048
|
-
animation: ({ from:
|
|
1049
|
-
const
|
|
894
|
+
animation: ({ from: r, to: i, context: l, borders: c, fromRect: a, toRect: p }) => {
|
|
895
|
+
const u = Et({
|
|
1050
896
|
rect: a,
|
|
1051
897
|
scale: n,
|
|
1052
898
|
direction: "out",
|
|
1053
|
-
override:
|
|
1054
|
-
}),
|
|
899
|
+
override: o
|
|
900
|
+
}), d = Et({
|
|
1055
901
|
rect: p,
|
|
1056
902
|
scale: n,
|
|
1057
903
|
direction: "in",
|
|
1058
|
-
override:
|
|
1059
|
-
}),
|
|
1060
|
-
i,
|
|
1061
|
-
d.snapshots,
|
|
1062
|
-
d.totalDuration,
|
|
1063
|
-
(g) => ({
|
|
1064
|
-
transform: `translateY(${g.translateY}px) scale(${g.scale})`
|
|
1065
|
-
}),
|
|
1066
|
-
() => {
|
|
1067
|
-
i.style.clipPath = "", i.style.transformOrigin = "", i.style.transform = "";
|
|
1068
|
-
}
|
|
1069
|
-
), f = J(
|
|
904
|
+
override: o
|
|
905
|
+
}), y = J(
|
|
1070
906
|
r,
|
|
1071
907
|
u.snapshots,
|
|
1072
908
|
u.totalDuration,
|
|
1073
|
-
(
|
|
1074
|
-
transform: `translateY(${
|
|
909
|
+
(w) => ({
|
|
910
|
+
transform: `translateY(${w.translateY}px) scale(${w.scale})`
|
|
1075
911
|
}),
|
|
1076
912
|
() => {
|
|
1077
913
|
r.style.clipPath = "", r.style.transformOrigin = "", r.style.transform = "";
|
|
1078
914
|
}
|
|
1079
|
-
),
|
|
915
|
+
), f = J(
|
|
916
|
+
i,
|
|
917
|
+
d.snapshots,
|
|
918
|
+
d.totalDuration,
|
|
919
|
+
(w) => ({
|
|
920
|
+
transform: `translateY(${w.translateY}px) scale(${w.scale})`
|
|
921
|
+
}),
|
|
922
|
+
() => {
|
|
923
|
+
i.style.clipPath = "", i.style.transformOrigin = "", i.style.transform = "";
|
|
924
|
+
}
|
|
925
|
+
), h = an.map(([w, $], x) => {
|
|
1080
926
|
const C = ["topLeft", "topRight", "bottomLeft", "bottomRight"][x];
|
|
1081
927
|
return J(
|
|
1082
928
|
c[C],
|
|
1083
|
-
|
|
1084
|
-
|
|
929
|
+
u.snapshots,
|
|
930
|
+
u.totalDuration,
|
|
1085
931
|
(I) => {
|
|
1086
|
-
const A = (a.width - a.width * I.scale) / 2 * 0.7 *
|
|
1087
|
-
return { transform: `translate(${A}px, ${
|
|
932
|
+
const A = (a.width - a.width * I.scale) / 2 * 0.7 * w, P = (a.height - a.height * I.scale) / 2 * 0.7 * $;
|
|
933
|
+
return { transform: `translate(${A}px, ${P}px)` };
|
|
1088
934
|
}
|
|
1089
935
|
);
|
|
1090
|
-
}),
|
|
936
|
+
}), g = new E([y, f, ...h], {
|
|
1091
937
|
mode: "parallel"
|
|
1092
|
-
}), S =
|
|
1093
|
-
return
|
|
938
|
+
}), S = g.onComplete;
|
|
939
|
+
return g.onComplete = () => {
|
|
1094
940
|
S == null || S();
|
|
1095
|
-
const
|
|
941
|
+
const w = l.positionedParent;
|
|
1096
942
|
for (const $ of [
|
|
1097
943
|
"topLeft",
|
|
1098
944
|
"topRight",
|
|
@@ -1100,398 +946,398 @@ const fn = (e = {}) => {
|
|
|
1100
946
|
"bottomRight"
|
|
1101
947
|
]) {
|
|
1102
948
|
const x = c[$];
|
|
1103
|
-
x.parentElement ===
|
|
949
|
+
x.parentElement === w && w.removeChild(x);
|
|
1104
950
|
}
|
|
1105
|
-
},
|
|
951
|
+
}, g;
|
|
1106
952
|
}
|
|
1107
953
|
};
|
|
1108
954
|
};
|
|
1109
|
-
function
|
|
1110
|
-
const { options:
|
|
1111
|
-
return
|
|
955
|
+
function ns(t = {}) {
|
|
956
|
+
const { options: e } = t, n = (e == null ? void 0 : e.borderColor) !== void 0 ? { border: { color: e.borderColor } } : void 0;
|
|
957
|
+
return cn(n);
|
|
1112
958
|
}
|
|
1113
|
-
function
|
|
1114
|
-
if (!
|
|
1115
|
-
if (
|
|
1116
|
-
const n =
|
|
959
|
+
function pn(t) {
|
|
960
|
+
if (!t) return null;
|
|
961
|
+
if (t.includes("/")) {
|
|
962
|
+
const n = t.split("/");
|
|
1117
963
|
if (n.length !== 2) return null;
|
|
1118
|
-
const
|
|
1119
|
-
return Number.isFinite(
|
|
964
|
+
const o = Number.parseFloat(n[0] ?? ""), s = Number.parseFloat(n[1] ?? "");
|
|
965
|
+
return Number.isFinite(o) && Number.isFinite(s) && o > 0 && s > 0 ? o / s : null;
|
|
1120
966
|
}
|
|
1121
|
-
const
|
|
1122
|
-
return Number.isFinite(
|
|
967
|
+
const e = Number.parseFloat(t);
|
|
968
|
+
return Number.isFinite(e) && e > 0 ? e : null;
|
|
1123
969
|
}
|
|
1124
|
-
function
|
|
1125
|
-
return
|
|
970
|
+
function un(t) {
|
|
971
|
+
return t === "contain" || t === "cover" ? t : null;
|
|
1126
972
|
}
|
|
1127
|
-
function it(
|
|
1128
|
-
return
|
|
973
|
+
function it(t) {
|
|
974
|
+
return t.tagName === "IMG";
|
|
1129
975
|
}
|
|
1130
|
-
function
|
|
1131
|
-
if (it(
|
|
1132
|
-
if (
|
|
976
|
+
function dn(t) {
|
|
977
|
+
if (it(t)) return t;
|
|
978
|
+
if (t.tagName === "PICTURE" || t.tagName === "VIDEO")
|
|
1133
979
|
return null;
|
|
1134
|
-
const
|
|
1135
|
-
for (const n of Array.from(
|
|
1136
|
-
const
|
|
1137
|
-
it(
|
|
980
|
+
const e = [];
|
|
981
|
+
for (const n of Array.from(t.children)) {
|
|
982
|
+
const o = n;
|
|
983
|
+
it(o) && e.push(o);
|
|
1138
984
|
}
|
|
1139
|
-
return
|
|
985
|
+
return e.length === 1 ? e[0] ?? null : null;
|
|
1140
986
|
}
|
|
1141
|
-
function
|
|
987
|
+
function fn(t) {
|
|
1142
988
|
var c, a;
|
|
1143
|
-
if (!it(
|
|
1144
|
-
const
|
|
1145
|
-
if (typeof n == "number" && typeof
|
|
1146
|
-
return n /
|
|
1147
|
-
const
|
|
1148
|
-
return Number.isFinite(
|
|
1149
|
-
}
|
|
1150
|
-
function
|
|
1151
|
-
const
|
|
1152
|
-
return
|
|
1153
|
-
}
|
|
1154
|
-
function B(
|
|
989
|
+
if (!it(t)) return null;
|
|
990
|
+
const e = t, n = e.naturalWidth, o = e.naturalHeight;
|
|
991
|
+
if (typeof n == "number" && typeof o == "number" && Number.isFinite(n) && Number.isFinite(o) && n > 0 && o > 0)
|
|
992
|
+
return n / o;
|
|
993
|
+
const s = ((c = t.getAttribute("width")) == null ? void 0 : c.trim()) ?? "", r = ((a = t.getAttribute("height")) == null ? void 0 : a.trim()) ?? "", i = s === "" ? Number.NaN : Number(s), l = r === "" ? Number.NaN : Number(r);
|
|
994
|
+
return Number.isFinite(i) && Number.isFinite(l) && i > 0 && l > 0 ? i / l : null;
|
|
995
|
+
}
|
|
996
|
+
function yn(t) {
|
|
997
|
+
const e = t.trim().toLowerCase().replace(/\s+/g, " ");
|
|
998
|
+
return e === "" || e === "center" || e === "center center" || e === "50% 50%";
|
|
999
|
+
}
|
|
1000
|
+
function B(t) {
|
|
1155
1001
|
if (typeof getComputedStyle == "function")
|
|
1156
1002
|
try {
|
|
1157
|
-
return getComputedStyle(
|
|
1003
|
+
return getComputedStyle(t);
|
|
1158
1004
|
} catch {
|
|
1159
1005
|
}
|
|
1160
|
-
return
|
|
1006
|
+
return t.style;
|
|
1161
1007
|
}
|
|
1162
|
-
function
|
|
1163
|
-
const
|
|
1008
|
+
function hn(t) {
|
|
1009
|
+
const e = B(t), n = yn(e.objectPosition ?? "");
|
|
1164
1010
|
return {
|
|
1165
|
-
fit: n ?
|
|
1011
|
+
fit: n ? un(e.objectFit ?? null) : null,
|
|
1166
1012
|
centered: n
|
|
1167
1013
|
};
|
|
1168
1014
|
}
|
|
1169
|
-
function
|
|
1170
|
-
if (!
|
|
1171
|
-
const
|
|
1172
|
-
if (!
|
|
1173
|
-
const n = Number.parseFloat(
|
|
1015
|
+
function Nt(t) {
|
|
1016
|
+
if (!t) return 0;
|
|
1017
|
+
const e = /^(-?(?:\d+\.?\d*|\.\d+))px$/.exec(t.trim());
|
|
1018
|
+
if (!e) return null;
|
|
1019
|
+
const n = Number.parseFloat(e[1] ?? "");
|
|
1174
1020
|
return Number.isFinite(n) && n >= 0 ? n : null;
|
|
1175
1021
|
}
|
|
1176
|
-
function It(
|
|
1177
|
-
const
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
].map(
|
|
1183
|
-
if (
|
|
1022
|
+
function It(t) {
|
|
1023
|
+
const e = B(t), n = [
|
|
1024
|
+
e.borderTopLeftRadius,
|
|
1025
|
+
e.borderTopRightRadius,
|
|
1026
|
+
e.borderBottomRightRadius,
|
|
1027
|
+
e.borderBottomLeftRadius
|
|
1028
|
+
].map(Nt), o = n[0];
|
|
1029
|
+
if (o == null)
|
|
1184
1030
|
return { radius: 0, supported: !1 };
|
|
1185
|
-
const
|
|
1186
|
-
(
|
|
1031
|
+
const s = n.every(
|
|
1032
|
+
(r) => r !== null && Math.abs(r - o) < 1e-3
|
|
1187
1033
|
);
|
|
1188
|
-
return { radius:
|
|
1034
|
+
return { radius: s ? o : 0, supported: s };
|
|
1189
1035
|
}
|
|
1190
|
-
function
|
|
1191
|
-
var
|
|
1192
|
-
if (!
|
|
1193
|
-
const n = (
|
|
1036
|
+
function mn(t, e) {
|
|
1037
|
+
var s;
|
|
1038
|
+
if (!e) return null;
|
|
1039
|
+
const n = (s = t.getAttribute(e)) == null ? void 0 : s.trim();
|
|
1194
1040
|
if (n == null || n === "") return null;
|
|
1195
|
-
const
|
|
1196
|
-
return Number.isFinite(
|
|
1041
|
+
const o = Number.parseFloat(n);
|
|
1042
|
+
return Number.isFinite(o) && o >= 0 ? o : null;
|
|
1197
1043
|
}
|
|
1198
|
-
function
|
|
1199
|
-
const
|
|
1044
|
+
function gn(t) {
|
|
1045
|
+
const e = B(t);
|
|
1200
1046
|
return [
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
].every((
|
|
1210
|
-
}
|
|
1211
|
-
function
|
|
1212
|
-
const
|
|
1213
|
-
return n(
|
|
1214
|
-
}
|
|
1215
|
-
function
|
|
1216
|
-
return
|
|
1217
|
-
}
|
|
1218
|
-
function
|
|
1219
|
-
return
|
|
1220
|
-
}
|
|
1221
|
-
function
|
|
1047
|
+
e.paddingTop,
|
|
1048
|
+
e.paddingRight,
|
|
1049
|
+
e.paddingBottom,
|
|
1050
|
+
e.paddingLeft,
|
|
1051
|
+
e.borderTopWidth,
|
|
1052
|
+
e.borderRightWidth,
|
|
1053
|
+
e.borderBottomWidth,
|
|
1054
|
+
e.borderLeftWidth
|
|
1055
|
+
].every((o) => o ? Nt(o) === 0 : !0);
|
|
1056
|
+
}
|
|
1057
|
+
function bn(t) {
|
|
1058
|
+
const e = B(t), n = (o) => o === "hidden" || o === "clip";
|
|
1059
|
+
return n(e.overflowX) && n(e.overflowY);
|
|
1060
|
+
}
|
|
1061
|
+
function v(t) {
|
|
1062
|
+
return t.left + t.width / 2;
|
|
1063
|
+
}
|
|
1064
|
+
function O(t) {
|
|
1065
|
+
return t.top + t.height / 2;
|
|
1066
|
+
}
|
|
1067
|
+
function ct(t, e) {
|
|
1222
1068
|
return {
|
|
1223
|
-
top: Math.max(0,
|
|
1224
|
-
right: Math.max(0,
|
|
1225
|
-
bottom: Math.max(0,
|
|
1226
|
-
left: Math.max(0,
|
|
1069
|
+
top: Math.max(0, e.top - t.top),
|
|
1070
|
+
right: Math.max(0, t.left + t.width - (e.left + e.width)),
|
|
1071
|
+
bottom: Math.max(0, t.top + t.height - (e.top + e.height)),
|
|
1072
|
+
left: Math.max(0, e.left - t.left)
|
|
1227
1073
|
};
|
|
1228
1074
|
}
|
|
1229
|
-
function
|
|
1230
|
-
const n = Math.max(
|
|
1231
|
-
return
|
|
1075
|
+
function wn(t, e) {
|
|
1076
|
+
const n = Math.max(t.left, e.left), o = Math.max(t.top, e.top), s = Math.min(t.left + t.width, e.left + e.width), r = Math.min(t.top + t.height, e.top + e.height);
|
|
1077
|
+
return s > n && r > o ? { left: n, top: o, width: s - n, height: r - o } : null;
|
|
1232
1078
|
}
|
|
1233
|
-
function
|
|
1234
|
-
return Math.abs(
|
|
1079
|
+
function _t(t, e) {
|
|
1080
|
+
return Math.abs(t.left - e.left) < 0.01 && Math.abs(t.top - e.top) < 0.01 && Math.abs(t.width - e.width) < 0.01 && Math.abs(t.height - e.height) < 0.01;
|
|
1235
1081
|
}
|
|
1236
|
-
function
|
|
1237
|
-
const
|
|
1238
|
-
let
|
|
1239
|
-
return n === "contain" ?
|
|
1240
|
-
left:
|
|
1241
|
-
top:
|
|
1242
|
-
width:
|
|
1243
|
-
height:
|
|
1082
|
+
function Sn(t, e, n) {
|
|
1083
|
+
const o = t.width / t.height;
|
|
1084
|
+
let s, r;
|
|
1085
|
+
return n === "contain" ? o > e ? (r = t.height, s = r * e) : (s = t.width, r = s / e) : o > e ? (s = t.width, r = s / e) : (r = t.height, s = r * e), {
|
|
1086
|
+
left: t.left + (t.width - s) / 2,
|
|
1087
|
+
top: t.top + (t.height - r) / 2,
|
|
1088
|
+
width: s,
|
|
1089
|
+
height: r
|
|
1244
1090
|
};
|
|
1245
1091
|
}
|
|
1246
|
-
function
|
|
1247
|
-
const
|
|
1092
|
+
function zt(t, e, n) {
|
|
1093
|
+
const o = e !== null && n !== null && t.width > 0 && t.height > 0 ? Sn(t, e, n) : t, s = n === "contain" ? o : t;
|
|
1248
1094
|
return {
|
|
1249
|
-
bbox:
|
|
1250
|
-
content:
|
|
1251
|
-
window:
|
|
1252
|
-
clipInset:
|
|
1253
|
-
aspectRatio:
|
|
1095
|
+
bbox: t,
|
|
1096
|
+
content: o,
|
|
1097
|
+
window: s,
|
|
1098
|
+
clipInset: ct(o, s),
|
|
1099
|
+
aspectRatio: e,
|
|
1254
1100
|
fit: n,
|
|
1255
1101
|
radius: 0,
|
|
1256
1102
|
radiusSource: "none",
|
|
1257
1103
|
bboxRadius: 0,
|
|
1258
1104
|
bboxRadiusSource: "none",
|
|
1259
|
-
contentAware:
|
|
1105
|
+
contentAware: e !== null && n !== null,
|
|
1260
1106
|
mediaElement: null
|
|
1261
1107
|
};
|
|
1262
1108
|
}
|
|
1263
|
-
function rt(
|
|
1109
|
+
function rt(t, e, n) {
|
|
1264
1110
|
return {
|
|
1265
|
-
...
|
|
1266
|
-
radius:
|
|
1111
|
+
...zt(t, null, null),
|
|
1112
|
+
radius: e,
|
|
1267
1113
|
radiusSource: n,
|
|
1268
|
-
bboxRadius:
|
|
1114
|
+
bboxRadius: e,
|
|
1269
1115
|
bboxRadiusSource: n
|
|
1270
1116
|
};
|
|
1271
1117
|
}
|
|
1272
|
-
function
|
|
1273
|
-
const n =
|
|
1274
|
-
return
|
|
1118
|
+
function Vt(t, e) {
|
|
1119
|
+
const n = t.aspectRatio, o = e.aspectRatio;
|
|
1120
|
+
return t.contentAware && e.contentAware && n !== null && o !== null && Math.abs(n - o) / Math.max(n, o) < 0.01;
|
|
1275
1121
|
}
|
|
1276
|
-
function
|
|
1122
|
+
function Rt(t) {
|
|
1277
1123
|
return rt(
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1124
|
+
t.bbox,
|
|
1125
|
+
t.bboxRadius,
|
|
1126
|
+
t.bboxRadiusSource
|
|
1281
1127
|
);
|
|
1282
1128
|
}
|
|
1283
|
-
function
|
|
1284
|
-
return
|
|
1129
|
+
function Ut(t, e) {
|
|
1130
|
+
return Vt(t, e) ? [t, e] : [Rt(t), Rt(e)];
|
|
1285
1131
|
}
|
|
1286
|
-
function at(
|
|
1287
|
-
const
|
|
1288
|
-
|
|
1289
|
-
) : null, l =
|
|
1290
|
-
|
|
1291
|
-
const x = $.every((
|
|
1132
|
+
function at(t, e, n, o) {
|
|
1133
|
+
const s = dn(t), r = s ? n(s) : e, i = o.legacyAspectRatioAttribute ? pn(
|
|
1134
|
+
t.getAttribute(o.legacyAspectRatioAttribute) ?? (s == null ? void 0 : s.getAttribute(o.legacyAspectRatioAttribute)) ?? null
|
|
1135
|
+
) : null, l = i ?? (s ? fn(s) : null), c = s ? hn(s) : { fit: null, centered: !0 }, a = c.centered && (s === null || gn(s)) ? c.fit ?? (i !== null ? o.fallbackFit ?? null : null) : null, p = zt(r, l, a), u = bn(t), y = s !== null && s !== t && u ? wn(p.window, e) : p.window, f = mn(t, o.legacyRadiusAttribute), h = s === t || u, g = h ? It(t) : { radius: 0, supported: !0 }, S = f ?? g.radius, w = f !== null ? "legacy" : g.supported ? g.radius > 0 ? "computed" : "none" : "unsupported", $ = [];
|
|
1136
|
+
y && h && _t(y, e) && $.push(g), y && s && _t(y, r) && $.push(It(s));
|
|
1137
|
+
const x = $.every((P) => P.supported), C = Math.max(
|
|
1292
1138
|
0,
|
|
1293
|
-
...$.map((
|
|
1139
|
+
...$.map((P) => P.radius)
|
|
1294
1140
|
), I = f ?? C, A = f !== null ? "legacy" : x ? C > 0 ? "computed" : "none" : "unsupported";
|
|
1295
|
-
return !
|
|
1141
|
+
return !y || A === "unsupported" ? rt(e, S, w) : {
|
|
1296
1142
|
...p,
|
|
1297
|
-
bbox:
|
|
1298
|
-
window:
|
|
1299
|
-
clipInset:
|
|
1143
|
+
bbox: e,
|
|
1144
|
+
window: y,
|
|
1145
|
+
clipInset: ct(p.content, y),
|
|
1300
1146
|
radius: I,
|
|
1301
1147
|
radiusSource: A,
|
|
1302
1148
|
bboxRadius: S,
|
|
1303
|
-
bboxRadiusSource:
|
|
1304
|
-
mediaElement: p.contentAware ?
|
|
1149
|
+
bboxRadiusSource: w,
|
|
1150
|
+
mediaElement: p.contentAware ? s : null
|
|
1305
1151
|
};
|
|
1306
1152
|
}
|
|
1307
|
-
function
|
|
1308
|
-
const
|
|
1153
|
+
function Xt(t, e, n, o, s) {
|
|
1154
|
+
const r = n.width / o, i = n.height / s;
|
|
1309
1155
|
return {
|
|
1310
|
-
left:
|
|
1311
|
-
top:
|
|
1312
|
-
width:
|
|
1313
|
-
height:
|
|
1156
|
+
left: v(t) + (v(n) - v(e)) / o - r / 2,
|
|
1157
|
+
top: O(t) + (O(n) - O(e)) / s - i / 2,
|
|
1158
|
+
width: r,
|
|
1159
|
+
height: i
|
|
1314
1160
|
};
|
|
1315
1161
|
}
|
|
1316
|
-
const
|
|
1162
|
+
const xn = {
|
|
1317
1163
|
enter: "contain",
|
|
1318
1164
|
exit: "cover",
|
|
1319
1165
|
legacy: "contain"
|
|
1320
1166
|
};
|
|
1321
|
-
function
|
|
1322
|
-
return
|
|
1167
|
+
function D(t) {
|
|
1168
|
+
return xn[t];
|
|
1323
1169
|
}
|
|
1324
|
-
const
|
|
1325
|
-
class
|
|
1170
|
+
const vt = "data-hero-enter-key", Ot = "data-hero-exit-key", Q = "data-hero-key";
|
|
1171
|
+
class Cn {
|
|
1326
1172
|
constructor() {
|
|
1327
|
-
|
|
1173
|
+
T(this, "previousFromOpacity", "");
|
|
1328
1174
|
}
|
|
1329
|
-
prepare(
|
|
1330
|
-
|
|
1175
|
+
prepare(e) {
|
|
1176
|
+
e.from.then((n) => {
|
|
1331
1177
|
this.previousFromOpacity = n.style.opacity, n.style.opacity = "0";
|
|
1332
1178
|
});
|
|
1333
1179
|
}
|
|
1334
|
-
contribute(
|
|
1335
|
-
return
|
|
1336
|
-
|
|
1180
|
+
contribute(e) {
|
|
1181
|
+
return e.onComplete(() => {
|
|
1182
|
+
e.from.style.opacity = this.previousFromOpacity;
|
|
1337
1183
|
}), [];
|
|
1338
1184
|
}
|
|
1339
1185
|
}
|
|
1340
|
-
const
|
|
1341
|
-
class
|
|
1342
|
-
contribute(
|
|
1343
|
-
const { from: n, to:
|
|
1344
|
-
return
|
|
1345
|
-
n.style.opacity =
|
|
1186
|
+
const $n = () => new Cn();
|
|
1187
|
+
class En {
|
|
1188
|
+
contribute(e) {
|
|
1189
|
+
const { from: n, to: o, physics: s, onComplete: r } = e, i = n.style.opacity, l = o.style.opacity, c = n.style.willChange, a = o.style.willChange;
|
|
1190
|
+
return o.style.opacity = "0", n.style.willChange = "opacity", o.style.willChange = "opacity", r(() => {
|
|
1191
|
+
n.style.opacity = i, o.style.opacity = l, n.style.willChange = c, o.style.willChange = a;
|
|
1346
1192
|
}), [
|
|
1347
|
-
new
|
|
1193
|
+
new m({
|
|
1348
1194
|
element: n,
|
|
1349
|
-
integrator:
|
|
1350
|
-
style: (p,
|
|
1195
|
+
integrator: b.from(s),
|
|
1196
|
+
style: (p, u) => ({ opacity: u })
|
|
1351
1197
|
}),
|
|
1352
|
-
new
|
|
1353
|
-
element:
|
|
1354
|
-
integrator:
|
|
1198
|
+
new m({
|
|
1199
|
+
element: o,
|
|
1200
|
+
integrator: b.from(s),
|
|
1355
1201
|
style: (p) => ({ opacity: p })
|
|
1356
1202
|
})
|
|
1357
1203
|
];
|
|
1358
1204
|
}
|
|
1359
1205
|
}
|
|
1360
|
-
const
|
|
1361
|
-
static:
|
|
1362
|
-
fade:
|
|
1363
|
-
},
|
|
1206
|
+
const Pn = () => new En(), An = {
|
|
1207
|
+
static: $n,
|
|
1208
|
+
fade: Pn
|
|
1209
|
+
}, In = {
|
|
1364
1210
|
spring: { stiffness: 320, damping: 30 }
|
|
1365
|
-
},
|
|
1211
|
+
}, _n = () => In, Rn = {
|
|
1366
1212
|
spring: { stiffness: 300, damping: 30, doubleSpring: 1 }
|
|
1367
|
-
},
|
|
1368
|
-
default:
|
|
1369
|
-
smooth:
|
|
1370
|
-
},
|
|
1371
|
-
function Ft(
|
|
1372
|
-
const
|
|
1213
|
+
}, vn = () => Rn, On = {
|
|
1214
|
+
default: _n,
|
|
1215
|
+
smooth: vn
|
|
1216
|
+
}, Fn = 700, Tn = "data-hero-aspect-ratio", Yn = "data-hero-radius";
|
|
1217
|
+
function Ft(t, e, n) {
|
|
1218
|
+
const o = L(t, e);
|
|
1373
1219
|
return at(
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
(
|
|
1220
|
+
e,
|
|
1221
|
+
o,
|
|
1222
|
+
(s) => L(t, s),
|
|
1377
1223
|
{
|
|
1378
1224
|
fallbackFit: n,
|
|
1379
|
-
legacyAspectRatioAttribute:
|
|
1380
|
-
legacyRadiusAttribute:
|
|
1225
|
+
legacyAspectRatioAttribute: Tn,
|
|
1226
|
+
legacyRadiusAttribute: Yn
|
|
1381
1227
|
}
|
|
1382
1228
|
);
|
|
1383
1229
|
}
|
|
1384
|
-
function
|
|
1385
|
-
const n = /* @__PURE__ */ new Map(),
|
|
1386
|
-
for (const
|
|
1387
|
-
const
|
|
1388
|
-
|
|
1230
|
+
function V(t, e) {
|
|
1231
|
+
const n = /* @__PURE__ */ new Map(), o = t.querySelectorAll(`[${e}]`);
|
|
1232
|
+
for (const s of Array.from(o)) {
|
|
1233
|
+
const r = s.getAttribute(e);
|
|
1234
|
+
r && (n.has(r) || n.set(r, s));
|
|
1389
1235
|
}
|
|
1390
1236
|
return n;
|
|
1391
1237
|
}
|
|
1392
|
-
function
|
|
1393
|
-
const n = [],
|
|
1394
|
-
for (const [l, c] of
|
|
1395
|
-
const a =
|
|
1238
|
+
function Dn(t, e) {
|
|
1239
|
+
const n = [], o = V(e, vt), s = V(t, Ot);
|
|
1240
|
+
for (const [l, c] of o) {
|
|
1241
|
+
const a = s.get(l);
|
|
1396
1242
|
a && n.push({
|
|
1397
1243
|
key: l,
|
|
1398
1244
|
fromEl: a,
|
|
1399
1245
|
toEl: c,
|
|
1400
|
-
fromFit:
|
|
1401
|
-
toFit:
|
|
1246
|
+
fromFit: D("exit"),
|
|
1247
|
+
toFit: D("enter")
|
|
1402
1248
|
});
|
|
1403
1249
|
}
|
|
1404
|
-
const
|
|
1405
|
-
for (const [l, c] of
|
|
1406
|
-
const a =
|
|
1250
|
+
const r = V(t, vt), i = V(e, Ot);
|
|
1251
|
+
for (const [l, c] of r) {
|
|
1252
|
+
const a = i.get(l);
|
|
1407
1253
|
a && n.push({
|
|
1408
1254
|
key: l,
|
|
1409
1255
|
fromEl: c,
|
|
1410
1256
|
toEl: a,
|
|
1411
|
-
fromFit:
|
|
1412
|
-
toFit:
|
|
1257
|
+
fromFit: D("enter"),
|
|
1258
|
+
toFit: D("exit")
|
|
1413
1259
|
});
|
|
1414
1260
|
}
|
|
1415
1261
|
return n;
|
|
1416
1262
|
}
|
|
1417
|
-
function
|
|
1418
|
-
const n = [],
|
|
1419
|
-
|
|
1263
|
+
function Mn(t, e) {
|
|
1264
|
+
const n = [], o = Array.from(
|
|
1265
|
+
e.querySelectorAll(`[${Q}]`)
|
|
1420
1266
|
);
|
|
1421
|
-
for (const
|
|
1422
|
-
const
|
|
1423
|
-
if (!
|
|
1424
|
-
const
|
|
1425
|
-
`[${Q}="${
|
|
1267
|
+
for (const s of o) {
|
|
1268
|
+
const r = s.getAttribute(Q);
|
|
1269
|
+
if (!r) continue;
|
|
1270
|
+
const i = t.querySelector(
|
|
1271
|
+
`[${Q}="${r}"]`
|
|
1426
1272
|
);
|
|
1427
|
-
|
|
1428
|
-
key:
|
|
1429
|
-
fromEl:
|
|
1430
|
-
toEl:
|
|
1431
|
-
fromFit:
|
|
1432
|
-
toFit:
|
|
1273
|
+
i && n.push({
|
|
1274
|
+
key: r,
|
|
1275
|
+
fromEl: i,
|
|
1276
|
+
toEl: s,
|
|
1277
|
+
fromFit: D("legacy"),
|
|
1278
|
+
toFit: D("legacy")
|
|
1433
1279
|
});
|
|
1434
1280
|
}
|
|
1435
1281
|
return n;
|
|
1436
1282
|
}
|
|
1437
|
-
function
|
|
1438
|
-
const n =
|
|
1439
|
-
return n.length > 0 ? n :
|
|
1283
|
+
function kn(t, e) {
|
|
1284
|
+
const n = Dn(t, e);
|
|
1285
|
+
return n.length > 0 ? n : Mn(t, e);
|
|
1440
1286
|
}
|
|
1441
|
-
function
|
|
1442
|
-
return
|
|
1287
|
+
function Ln(t, e) {
|
|
1288
|
+
return Ut(t, e);
|
|
1443
1289
|
}
|
|
1444
|
-
function
|
|
1445
|
-
return
|
|
1290
|
+
function Hn(t, e) {
|
|
1291
|
+
return t.radiusSource === "unsupported" || e.radiusSource === "unsupported" ? !1 : t.mediaElement !== null || e.mediaElement !== null || t.radiusSource === "computed" || t.radiusSource === "legacy" || e.radiusSource === "computed" || e.radiusSource === "legacy";
|
|
1446
1292
|
}
|
|
1447
|
-
function
|
|
1448
|
-
const { fromEl:
|
|
1449
|
-
Ft(
|
|
1450
|
-
Ft(
|
|
1451
|
-
), l =
|
|
1293
|
+
function Nn(t, e, n) {
|
|
1294
|
+
const { fromEl: o, toEl: s } = e, [r, i] = Ln(
|
|
1295
|
+
Ft(t, o, e.fromFit),
|
|
1296
|
+
Ft(t, s, e.toFit)
|
|
1297
|
+
), l = r.content, c = r.window, a = i.content, p = i.window, u = i.clipInset, d = r.radiusSource === "unsupported" || i.radiusSource === "unsupported", y = d ? 0 : r.radius, f = d ? 0 : i.radius;
|
|
1452
1298
|
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)
|
|
1453
1299
|
return null;
|
|
1454
|
-
const
|
|
1300
|
+
const h = Math.max(
|
|
1455
1301
|
l.width / a.width,
|
|
1456
1302
|
l.height / a.height
|
|
1457
|
-
),
|
|
1303
|
+
), g = v(l), S = O(l), w = v(a), $ = O(a), x = g - w, C = S - $;
|
|
1458
1304
|
if (Math.abs(C) > n) return null;
|
|
1459
|
-
const I =
|
|
1305
|
+
const I = ct(
|
|
1460
1306
|
a,
|
|
1461
|
-
|
|
1307
|
+
Xt(a, l, c, h, h)
|
|
1462
1308
|
);
|
|
1463
1309
|
return {
|
|
1464
1310
|
toContent: a,
|
|
1465
|
-
fromVisualEl:
|
|
1466
|
-
toVisualEl:
|
|
1467
|
-
resetCloneRadius:
|
|
1468
|
-
styleFor: (A,
|
|
1469
|
-
const H =
|
|
1311
|
+
fromVisualEl: r.mediaElement ?? o,
|
|
1312
|
+
toVisualEl: i.mediaElement ?? s,
|
|
1313
|
+
resetCloneRadius: Hn(r, i),
|
|
1314
|
+
styleFor: (A, P) => {
|
|
1315
|
+
const H = P * x, M = P * C, N = A + P * h, Kt = Math.max(0, y * P + f * A) / Math.max(Math.abs(N), 1e-6), qt = I.top * P + u.top * A, Jt = I.right * P + u.right * A, Qt = I.bottom * P + u.bottom * A, te = I.left * P + u.left * A;
|
|
1470
1316
|
return {
|
|
1471
|
-
transform: `translate(${H}px, ${
|
|
1472
|
-
clipPath: `inset(${
|
|
1317
|
+
transform: `translate(${H}px, ${M}px) scale(${N})`,
|
|
1318
|
+
clipPath: `inset(${qt}px ${Jt}px ${Qt}px ${te}px round ${Kt}px)`
|
|
1473
1319
|
};
|
|
1474
1320
|
}
|
|
1475
1321
|
};
|
|
1476
1322
|
}
|
|
1477
|
-
function
|
|
1478
|
-
|
|
1323
|
+
function zn(t, e) {
|
|
1324
|
+
t.style.transform = e.transform, t.style.clipPath = e.clipPath;
|
|
1479
1325
|
}
|
|
1480
|
-
class
|
|
1481
|
-
contribute(
|
|
1482
|
-
const { resolved: n, physics:
|
|
1326
|
+
class Vn {
|
|
1327
|
+
contribute(e) {
|
|
1328
|
+
const { resolved: n, physics: o, positionedParent: s, maxDistance: r, onComplete: i } = e, l = [];
|
|
1483
1329
|
for (const c of n.pairs) {
|
|
1484
|
-
const a =
|
|
1330
|
+
const a = Nn(s, c, r);
|
|
1485
1331
|
if (!a) continue;
|
|
1486
|
-
const { fromVisualEl: p, toVisualEl:
|
|
1487
|
-
|
|
1488
|
-
const
|
|
1489
|
-
p.style.opacity = "0",
|
|
1490
|
-
p.style.opacity =
|
|
1332
|
+
const { fromVisualEl: p, toVisualEl: u } = a, d = u.cloneNode(!0);
|
|
1333
|
+
d.style.position = "absolute", d.style.left = `${a.toContent.left}px`, d.style.top = `${a.toContent.top}px`, d.style.width = `${a.toContent.width}px`, d.style.height = `${a.toContent.height}px`, d.style.margin = "0", d.style.transformOrigin = "center center", d.style.zIndex = "1000", d.style.willChange = "transform, clip-path", d.style.pointerEvents = "none", d.style.maxWidth = "none", d.style.maxHeight = "none", a.resetCloneRadius && (d.style.borderRadius = "0"), zn(d, a.styleFor(0, 1)), s.appendChild(d);
|
|
1334
|
+
const y = p.style.opacity, f = u.style.opacity;
|
|
1335
|
+
p.style.opacity = "0", u.style.opacity = "0", i(() => {
|
|
1336
|
+
p.style.opacity = y, u.style.opacity = f, d.parentElement && d.parentElement.removeChild(d);
|
|
1491
1337
|
}), l.push(
|
|
1492
|
-
new
|
|
1493
|
-
element:
|
|
1494
|
-
integrator:
|
|
1338
|
+
new m({
|
|
1339
|
+
element: d,
|
|
1340
|
+
integrator: b.from(o),
|
|
1495
1341
|
style: a.styleFor
|
|
1496
1342
|
})
|
|
1497
1343
|
);
|
|
@@ -1499,150 +1345,150 @@ class Wn {
|
|
|
1499
1345
|
return l;
|
|
1500
1346
|
}
|
|
1501
1347
|
}
|
|
1502
|
-
function
|
|
1503
|
-
return [new
|
|
1348
|
+
function Un(t) {
|
|
1349
|
+
return [new Vn(), An[t.type]()];
|
|
1504
1350
|
}
|
|
1505
|
-
const
|
|
1506
|
-
const
|
|
1351
|
+
const Xn = (t) => {
|
|
1352
|
+
const e = Un(t), n = On[t.variant](), o = Fn;
|
|
1507
1353
|
return {
|
|
1508
|
-
prepare: (
|
|
1354
|
+
prepare: (s) => {
|
|
1509
1355
|
var l;
|
|
1510
|
-
const
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
]).then(([c, a]) => ({ pairs:
|
|
1514
|
-
from:
|
|
1515
|
-
to:
|
|
1516
|
-
resolved:
|
|
1356
|
+
const r = Promise.all([
|
|
1357
|
+
s.from,
|
|
1358
|
+
s.to
|
|
1359
|
+
]).then(([c, a]) => ({ pairs: kn(c, a) })), i = {
|
|
1360
|
+
from: s.from,
|
|
1361
|
+
to: s.to,
|
|
1362
|
+
resolved: r
|
|
1517
1363
|
};
|
|
1518
|
-
for (const c of
|
|
1519
|
-
(l = c.prepare) == null || l.call(c,
|
|
1520
|
-
return
|
|
1364
|
+
for (const c of e)
|
|
1365
|
+
(l = c.prepare) == null || l.call(c, i);
|
|
1366
|
+
return r.then((c) => ({ resolved: c }));
|
|
1521
1367
|
},
|
|
1522
|
-
animation: ({ from:
|
|
1368
|
+
animation: ({ from: s, to: r, context: i, resolved: l }) => {
|
|
1523
1369
|
if (l.pairs.length === 0)
|
|
1524
|
-
return new
|
|
1370
|
+
return new E([], { mode: "parallel" });
|
|
1525
1371
|
const c = [], a = (f) => {
|
|
1526
1372
|
c.push(f);
|
|
1527
1373
|
}, p = {
|
|
1528
|
-
from:
|
|
1529
|
-
to:
|
|
1374
|
+
from: s,
|
|
1375
|
+
to: r,
|
|
1530
1376
|
resolved: l,
|
|
1531
1377
|
physics: n,
|
|
1532
|
-
positionedParent:
|
|
1533
|
-
maxDistance:
|
|
1378
|
+
positionedParent: i.positionedParent,
|
|
1379
|
+
maxDistance: o,
|
|
1534
1380
|
onComplete: a
|
|
1535
|
-
},
|
|
1536
|
-
for (const f of
|
|
1537
|
-
f.contribute &&
|
|
1538
|
-
if (
|
|
1539
|
-
return new
|
|
1540
|
-
const
|
|
1541
|
-
return
|
|
1542
|
-
|
|
1381
|
+
}, u = [];
|
|
1382
|
+
for (const f of e)
|
|
1383
|
+
f.contribute && u.push(...f.contribute(p));
|
|
1384
|
+
if (u.length === 0)
|
|
1385
|
+
return new E([], { mode: "parallel" });
|
|
1386
|
+
const d = new E(u, { mode: "parallel" }), y = d.onComplete;
|
|
1387
|
+
return d.onComplete = () => {
|
|
1388
|
+
y == null || y();
|
|
1543
1389
|
for (const f of c)
|
|
1544
1390
|
try {
|
|
1545
1391
|
f();
|
|
1546
|
-
} catch (
|
|
1547
|
-
console.error("[hero] cleanup error",
|
|
1392
|
+
} catch (h) {
|
|
1393
|
+
console.error("[hero] cleanup error", h);
|
|
1548
1394
|
}
|
|
1549
|
-
},
|
|
1395
|
+
}, d;
|
|
1550
1396
|
}
|
|
1551
1397
|
};
|
|
1552
1398
|
};
|
|
1553
|
-
function
|
|
1554
|
-
const
|
|
1555
|
-
return
|
|
1399
|
+
function os(t = {}) {
|
|
1400
|
+
const e = t.type ?? "static", n = t.variant ?? "default";
|
|
1401
|
+
return Xn({ type: e, variant: n });
|
|
1556
1402
|
}
|
|
1557
|
-
const
|
|
1403
|
+
const Bn = {
|
|
1558
1404
|
spring: { stiffness: 50, damping: 30 }
|
|
1559
|
-
},
|
|
1405
|
+
}, Wn = {
|
|
1560
1406
|
spring: { stiffness: 80, damping: 25 }
|
|
1561
|
-
},
|
|
1562
|
-
const
|
|
1407
|
+
}, Zn = (t = {}) => {
|
|
1408
|
+
const e = t.physics ?? Bn, n = t.initialRotation ?? 45, o = t.initialScale ?? 0.01, s = t.rotationTriggerPoint ?? 0.8;
|
|
1563
1409
|
return {
|
|
1564
|
-
prepare: ({ from:
|
|
1410
|
+
prepare: ({ from: r, to: i, context: l }) => (r.then((c) => {
|
|
1565
1411
|
c.style.opacity = "1";
|
|
1566
|
-
}),
|
|
1412
|
+
}), i.then((c) => {
|
|
1567
1413
|
const a = F(l, "to"), p = Math.min(a.width, a.height) * 0.4;
|
|
1568
1414
|
c.style.setProperty("--max-border-radius", `${p}px`), c.style.setProperty("--border-radius-scale", "1"), c.style.willChange = "transform", c.style.backfaceVisibility = "hidden";
|
|
1569
|
-
const
|
|
1570
|
-
c.style.transformOrigin = `${
|
|
1415
|
+
const u = a.left + a.width / 2, d = a.top + a.height / 2;
|
|
1416
|
+
c.style.transformOrigin = `${u}px ${d}px`, c.style.position = "fixed", c.style.top = `${a.top}px`, c.style.left = `${a.left}px`, c.style.width = `${a.width}px`, c.style.height = `${a.height}px`, c.style.zIndex = "1000", c.style.overflow = "hidden", c.style.transform = `rotate(${n}deg) scale(${o}) translateZ(0)`, c.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", c.style.opacity = "1";
|
|
1571
1417
|
}), {}),
|
|
1572
|
-
animation: ({ from:
|
|
1573
|
-
const l = new
|
|
1574
|
-
element:
|
|
1575
|
-
integrator:
|
|
1418
|
+
animation: ({ from: r, to: i }) => {
|
|
1419
|
+
const l = new m({
|
|
1420
|
+
element: r,
|
|
1421
|
+
integrator: b.from(Wn),
|
|
1576
1422
|
style: (a, p) => ({ opacity: p }),
|
|
1577
1423
|
// The outgoing node is reused (re-hidden, shown again on the next
|
|
1578
1424
|
// navigation), so reset every inline style we wrote to it — mirroring
|
|
1579
1425
|
// the "to" cleanup below. prepare sets opacity and the out style fades
|
|
1580
1426
|
// it toward 0, so clear opacity or the reused node stays invisible.
|
|
1581
1427
|
onComplete: () => {
|
|
1582
|
-
|
|
1428
|
+
r.style.opacity = "";
|
|
1583
1429
|
}
|
|
1584
|
-
}), c = new
|
|
1585
|
-
element:
|
|
1586
|
-
integrator:
|
|
1430
|
+
}), c = new m({
|
|
1431
|
+
element: i,
|
|
1432
|
+
integrator: b.from(e),
|
|
1587
1433
|
style: (a) => {
|
|
1588
1434
|
let p;
|
|
1589
1435
|
if (a <= 0.05)
|
|
1590
|
-
p =
|
|
1591
|
-
else if (a <=
|
|
1592
|
-
const f = (a - 0.05) / (
|
|
1593
|
-
p =
|
|
1436
|
+
p = o;
|
|
1437
|
+
else if (a <= s) {
|
|
1438
|
+
const f = (a - 0.05) / (s - 0.05), h = Math.pow(f, 9);
|
|
1439
|
+
p = o + (0.8 - o) * h;
|
|
1594
1440
|
} else {
|
|
1595
|
-
const f = (a -
|
|
1441
|
+
const f = (a - s) / (1 - s);
|
|
1596
1442
|
p = 0.8 + 0.2 * (1 - Math.pow(1 - f, 3));
|
|
1597
1443
|
}
|
|
1598
|
-
const
|
|
1599
|
-
let
|
|
1600
|
-
if (a <=
|
|
1601
|
-
|
|
1444
|
+
const u = 0.7;
|
|
1445
|
+
let d;
|
|
1446
|
+
if (a <= u)
|
|
1447
|
+
d = n;
|
|
1602
1448
|
else {
|
|
1603
|
-
const f = (a -
|
|
1604
|
-
|
|
1449
|
+
const f = (a - u) / (1 - u), h = 1 - Math.pow(1 - f, 2);
|
|
1450
|
+
d = n * (1 - h);
|
|
1605
1451
|
}
|
|
1606
|
-
let
|
|
1607
|
-
if (a <=
|
|
1608
|
-
|
|
1452
|
+
let y;
|
|
1453
|
+
if (a <= u)
|
|
1454
|
+
y = 1;
|
|
1609
1455
|
else {
|
|
1610
|
-
const f = (a -
|
|
1611
|
-
|
|
1456
|
+
const f = (a - u) / (1 - u);
|
|
1457
|
+
y = 1 - Math.pow(f, 0.5);
|
|
1612
1458
|
}
|
|
1613
1459
|
return {
|
|
1614
|
-
transform: `rotate(${
|
|
1615
|
-
"--border-radius-scale":
|
|
1460
|
+
transform: `rotate(${d.toFixed(2)}deg) scale(${p.toFixed(4)}) translateZ(0)`,
|
|
1461
|
+
"--border-radius-scale": y.toFixed(4)
|
|
1616
1462
|
};
|
|
1617
1463
|
},
|
|
1618
1464
|
onComplete: () => {
|
|
1619
|
-
|
|
1465
|
+
i.style.willChange = "", i.style.backfaceVisibility = "", i.style.removeProperty("--max-border-radius"), i.style.removeProperty("--border-radius-scale"), i.style.transform = "", i.style.transformOrigin = "", i.style.position = "", i.style.zIndex = "", i.style.top = "", i.style.left = "", i.style.width = "", i.style.height = "", i.style.overflow = "", i.style.borderRadius = "";
|
|
1620
1466
|
}
|
|
1621
1467
|
});
|
|
1622
|
-
return new
|
|
1468
|
+
return new E([l, c], { mode: "parallel" });
|
|
1623
1469
|
}
|
|
1624
1470
|
};
|
|
1625
1471
|
};
|
|
1626
|
-
function
|
|
1627
|
-
return
|
|
1472
|
+
function ss(t = {}) {
|
|
1473
|
+
return Zn();
|
|
1628
1474
|
}
|
|
1629
|
-
const
|
|
1475
|
+
const Gn = {
|
|
1630
1476
|
spring: { stiffness: 100, damping: 30 }
|
|
1631
|
-
},
|
|
1632
|
-
const
|
|
1477
|
+
}, jn = (t = {}) => {
|
|
1478
|
+
const e = t.physics ?? Gn;
|
|
1633
1479
|
return {
|
|
1634
|
-
prepare: ({ from: n, to:
|
|
1635
|
-
|
|
1636
|
-
}),
|
|
1637
|
-
|
|
1480
|
+
prepare: ({ from: n, to: o }) => (n.then((s) => {
|
|
1481
|
+
s.style.transformOrigin = "center center", s.style.willChange = "transform, opacity";
|
|
1482
|
+
}), o.then((s) => {
|
|
1483
|
+
s.style.opacity = "0", s.style.transform = "rotate(-180deg)", s.style.transformOrigin = "center center", s.style.willChange = "transform, opacity";
|
|
1638
1484
|
}), {}),
|
|
1639
|
-
animation: ({ from: n, to:
|
|
1640
|
-
const
|
|
1485
|
+
animation: ({ from: n, to: o }) => {
|
|
1486
|
+
const s = new m({
|
|
1641
1487
|
element: n,
|
|
1642
|
-
integrator:
|
|
1643
|
-
style: (
|
|
1644
|
-
transform: `rotate(${
|
|
1645
|
-
opacity:
|
|
1488
|
+
integrator: b.from(e),
|
|
1489
|
+
style: (i) => ({
|
|
1490
|
+
transform: `rotate(${i * 180}deg)`,
|
|
1491
|
+
opacity: i < 0.5 ? 1 : 0
|
|
1646
1492
|
}),
|
|
1647
1493
|
// The outgoing node is reused (re-hidden, shown again on the next
|
|
1648
1494
|
// navigation), so clear every inline style we wrote to `from`
|
|
@@ -1650,26 +1496,26 @@ const Jn = {
|
|
|
1650
1496
|
onComplete: () => {
|
|
1651
1497
|
n.style.willChange = "auto", n.style.transform = "", n.style.transformOrigin = "", n.style.opacity = "";
|
|
1652
1498
|
}
|
|
1653
|
-
}),
|
|
1654
|
-
element:
|
|
1655
|
-
integrator:
|
|
1499
|
+
}), r = new m({
|
|
1500
|
+
element: o,
|
|
1501
|
+
integrator: b.from(e),
|
|
1656
1502
|
// u runs 1→0, so -u*180 unwinds -180→0.
|
|
1657
|
-
style: (
|
|
1503
|
+
style: (i, l) => ({
|
|
1658
1504
|
transform: `rotate(${-l * 180}deg)`,
|
|
1659
|
-
opacity:
|
|
1505
|
+
opacity: i > 0.5 ? 1 : 0
|
|
1660
1506
|
}),
|
|
1661
1507
|
onComplete: () => {
|
|
1662
|
-
|
|
1508
|
+
o.style.willChange = "auto", o.style.transform = "", o.style.transformOrigin = "", o.style.opacity = "";
|
|
1663
1509
|
}
|
|
1664
1510
|
});
|
|
1665
|
-
return new
|
|
1511
|
+
return new E([s, r], { mode: "parallel" });
|
|
1666
1512
|
}
|
|
1667
1513
|
};
|
|
1668
1514
|
};
|
|
1669
|
-
function
|
|
1670
|
-
return
|
|
1515
|
+
function is(t = {}) {
|
|
1516
|
+
return jn();
|
|
1671
1517
|
}
|
|
1672
|
-
const
|
|
1518
|
+
const Kn = {
|
|
1673
1519
|
spring: {
|
|
1674
1520
|
stiffness: 20,
|
|
1675
1521
|
damping: 8,
|
|
@@ -1677,96 +1523,96 @@ const ts = {
|
|
|
1677
1523
|
restDelta: 1e-3,
|
|
1678
1524
|
restSpeed: 1e-3
|
|
1679
1525
|
}
|
|
1680
|
-
},
|
|
1681
|
-
const
|
|
1526
|
+
}, qn = (t = {}) => {
|
|
1527
|
+
const e = t.physics ?? Kn, n = t.directional ?? !0;
|
|
1682
1528
|
return {
|
|
1683
|
-
prepare: ({ from:
|
|
1684
|
-
const
|
|
1685
|
-
return
|
|
1529
|
+
prepare: ({ from: o, to: s, context: r }) => {
|
|
1530
|
+
const i = !n || r.direction === "forward", l = i ? _ : R, c = i ? R : _;
|
|
1531
|
+
return o.then((a) => {
|
|
1686
1532
|
a.style.zIndex = l, a.style.willChange = "transform", a.style.backfaceVisibility = "hidden", a.style.contain = "layout paint", a.style.pointerEvents = "none";
|
|
1687
|
-
}),
|
|
1533
|
+
}), s.then((a) => {
|
|
1688
1534
|
a.style.willChange = "transform", a.style.backfaceVisibility = "hidden", a.style.contain = "layout paint", a.style.position = "relative", a.style.zIndex = c;
|
|
1689
1535
|
}), {};
|
|
1690
1536
|
},
|
|
1691
|
-
animation: ({ from:
|
|
1692
|
-
const
|
|
1693
|
-
element:
|
|
1694
|
-
integrator:
|
|
1695
|
-
style: (f) => ({ transform: `translate3d(0, ${
|
|
1537
|
+
animation: ({ from: o, to: s, context: r }) => {
|
|
1538
|
+
const i = !n || r.direction === "forward", l = i ? R : _, c = o.offsetHeight, a = s.offsetHeight, p = window.innerHeight, u = Math.max(Math.min(c, a), p), d = new m({
|
|
1539
|
+
element: o,
|
|
1540
|
+
integrator: b.from(e),
|
|
1541
|
+
style: (f) => ({ transform: `translate3d(0, ${i ? -u * f : u * f}px, 0)` }),
|
|
1696
1542
|
// The outgoing node is the real, reused element (re-hidden then shown
|
|
1697
1543
|
// again on the next navigation), so mirror the incoming cleanup and
|
|
1698
1544
|
// also reset the out-only props applied in prepare (zIndex,
|
|
1699
1545
|
// pointerEvents) — otherwise the leftover inline styles corrupt the
|
|
1700
1546
|
// page the next time it appears.
|
|
1701
1547
|
onComplete: () => {
|
|
1702
|
-
|
|
1548
|
+
o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "", o.style.transform = "", o.style.pointerEvents = "", o.style.zIndex = "";
|
|
1703
1549
|
}
|
|
1704
|
-
}),
|
|
1705
|
-
element:
|
|
1706
|
-
integrator:
|
|
1707
|
-
style: (f,
|
|
1550
|
+
}), y = new m({
|
|
1551
|
+
element: s,
|
|
1552
|
+
integrator: b.from(e),
|
|
1553
|
+
style: (f, h) => ({ transform: `translate3d(0, ${i ? h * u : h * -u}px, 0)` }),
|
|
1708
1554
|
onComplete: () => {
|
|
1709
|
-
|
|
1555
|
+
s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "", s.style.transform = "", s.style.position === "relative" && (s.style.position = ""), s.style.zIndex === l && (s.style.zIndex = "");
|
|
1710
1556
|
}
|
|
1711
1557
|
});
|
|
1712
|
-
for (const f of [
|
|
1713
|
-
const
|
|
1558
|
+
for (const f of [d, y]) {
|
|
1559
|
+
const h = f.onComplete;
|
|
1714
1560
|
f.onComplete = () => {
|
|
1715
|
-
|
|
1561
|
+
h == null || h(), f.releaseFill();
|
|
1716
1562
|
};
|
|
1717
1563
|
}
|
|
1718
|
-
return new
|
|
1564
|
+
return new E([d, y], { mode: "parallel" });
|
|
1719
1565
|
}
|
|
1720
1566
|
};
|
|
1721
1567
|
};
|
|
1722
|
-
function
|
|
1723
|
-
const { type:
|
|
1724
|
-
return
|
|
1568
|
+
function rs(t = {}) {
|
|
1569
|
+
const { type: e = "directional" } = t;
|
|
1570
|
+
return qn({ directional: e === "directional" });
|
|
1725
1571
|
}
|
|
1726
|
-
const
|
|
1572
|
+
const Jn = {
|
|
1727
1573
|
spring: { stiffness: 200, damping: 24 }
|
|
1728
|
-
},
|
|
1574
|
+
}, Qn = {
|
|
1729
1575
|
inertia: { acceleration: 25, resistance: 1.2 }
|
|
1730
1576
|
}, tt = 0.2;
|
|
1731
|
-
function
|
|
1577
|
+
function to() {
|
|
1732
1578
|
return {
|
|
1733
|
-
enterPhysics:
|
|
1734
|
-
exitPhysics:
|
|
1579
|
+
enterPhysics: Jn,
|
|
1580
|
+
exitPhysics: Qn,
|
|
1735
1581
|
background: {
|
|
1736
1582
|
willChange: "transform, opacity",
|
|
1737
|
-
enterStyle: (
|
|
1738
|
-
transform: `scale(${1 - tt *
|
|
1739
|
-
opacity: t
|
|
1740
|
-
}),
|
|
1741
|
-
exitStyle: (e) => ({
|
|
1742
|
-
transform: `scale(${1 - tt + tt * e})`,
|
|
1583
|
+
enterStyle: (t, e) => ({
|
|
1584
|
+
transform: `scale(${1 - tt * t})`,
|
|
1743
1585
|
opacity: e
|
|
1586
|
+
}),
|
|
1587
|
+
exitStyle: (t) => ({
|
|
1588
|
+
transform: `scale(${1 - tt + tt * t})`,
|
|
1589
|
+
opacity: t
|
|
1744
1590
|
})
|
|
1745
1591
|
}
|
|
1746
1592
|
};
|
|
1747
1593
|
}
|
|
1748
|
-
const
|
|
1594
|
+
const eo = {
|
|
1749
1595
|
spring: { stiffness: 200, damping: 24 }
|
|
1750
|
-
},
|
|
1596
|
+
}, no = {
|
|
1751
1597
|
inertia: { acceleration: 25, resistance: 1.2 }
|
|
1752
|
-
}, et = 0.08,
|
|
1753
|
-
function
|
|
1598
|
+
}, et = 0.08, oo = 16, nt = 0.6, so = (t) => `blur(${Math.max(0, t).toFixed(2)}px)`;
|
|
1599
|
+
function io() {
|
|
1754
1600
|
return {
|
|
1755
|
-
enterPhysics:
|
|
1756
|
-
exitPhysics:
|
|
1601
|
+
enterPhysics: eo,
|
|
1602
|
+
exitPhysics: no,
|
|
1757
1603
|
background: {
|
|
1758
1604
|
willChange: "transform, opacity",
|
|
1759
1605
|
// enter: t 0 → 1 as the sheet rises. At rest (t = 0) the page is
|
|
1760
1606
|
// untouched; at peak it is shrunk and dimmed.
|
|
1761
|
-
enterStyle: (
|
|
1762
|
-
transform: `scale(${1 - et *
|
|
1763
|
-
opacity: 1 - (1 - nt) *
|
|
1607
|
+
enterStyle: (t) => ({
|
|
1608
|
+
transform: `scale(${1 - et * t})`,
|
|
1609
|
+
opacity: 1 - (1 - nt) * t
|
|
1764
1610
|
}),
|
|
1765
1611
|
// exit: t 0 → 1 as the sheet falls away and the page returns to rest —
|
|
1766
1612
|
// the inverse ramp of enter.
|
|
1767
|
-
exitStyle: (
|
|
1768
|
-
transform: `scale(${1 - et + et *
|
|
1769
|
-
opacity: nt + (1 - nt) *
|
|
1613
|
+
exitStyle: (t) => ({
|
|
1614
|
+
transform: `scale(${1 - et + et * t})`,
|
|
1615
|
+
opacity: nt + (1 - nt) * t
|
|
1770
1616
|
})
|
|
1771
1617
|
},
|
|
1772
1618
|
overlay: {
|
|
@@ -1783,28 +1629,28 @@ function cs() {
|
|
|
1783
1629
|
},
|
|
1784
1630
|
// enter: 0 → MAX as the sheet rises (progress 0 → 1).
|
|
1785
1631
|
// exit: MAX → 0 as it falls (progress 0 → 1, so the visual is inverted).
|
|
1786
|
-
style: (
|
|
1787
|
-
const n =
|
|
1788
|
-
return { backdropFilter:
|
|
1632
|
+
style: (t, e) => {
|
|
1633
|
+
const n = t === "enter" ? e : 1 - e, o = so(oo * n);
|
|
1634
|
+
return { backdropFilter: o, WebkitBackdropFilter: o };
|
|
1789
1635
|
}
|
|
1790
1636
|
}
|
|
1791
1637
|
};
|
|
1792
1638
|
}
|
|
1793
|
-
const
|
|
1639
|
+
const ro = {
|
|
1794
1640
|
spring: {
|
|
1795
1641
|
stiffness: 190,
|
|
1796
1642
|
damping: 25
|
|
1797
1643
|
}
|
|
1798
|
-
},
|
|
1644
|
+
}, ao = {
|
|
1799
1645
|
spring: {
|
|
1800
1646
|
stiffness: 190,
|
|
1801
1647
|
damping: 25
|
|
1802
1648
|
}
|
|
1803
1649
|
};
|
|
1804
|
-
function
|
|
1650
|
+
function lo() {
|
|
1805
1651
|
return {
|
|
1806
|
-
enterPhysics:
|
|
1807
|
-
exitPhysics:
|
|
1652
|
+
enterPhysics: ro,
|
|
1653
|
+
exitPhysics: ao,
|
|
1808
1654
|
background: {
|
|
1809
1655
|
willChange: "",
|
|
1810
1656
|
enterStyle: () => ({}),
|
|
@@ -1812,156 +1658,154 @@ function us() {
|
|
|
1812
1658
|
}
|
|
1813
1659
|
};
|
|
1814
1660
|
}
|
|
1815
|
-
const
|
|
1816
|
-
static:
|
|
1817
|
-
"background-scale":
|
|
1818
|
-
blur:
|
|
1819
|
-
},
|
|
1820
|
-
const
|
|
1661
|
+
const co = {
|
|
1662
|
+
static: lo(),
|
|
1663
|
+
"background-scale": to(),
|
|
1664
|
+
blur: io()
|
|
1665
|
+
}, po = "static", uo = "transform", fo = (t = {}) => {
|
|
1666
|
+
const e = co[t.type ?? po], n = e.background, o = e.overlay, s = n.willChange !== "";
|
|
1821
1667
|
return {
|
|
1822
|
-
prepare: ({ from:
|
|
1823
|
-
const a = l.direction === "forward" ? "enter" : "exit", p = a === "enter" ?
|
|
1824
|
-
p.then((
|
|
1825
|
-
|
|
1826
|
-
}),
|
|
1827
|
-
|
|
1668
|
+
prepare: ({ from: r, to: i, context: l, createElement: c }) => {
|
|
1669
|
+
const a = l.direction === "forward" ? "enter" : "exit", p = a === "enter" ? i : r, u = a === "enter" ? r : i;
|
|
1670
|
+
p.then((y) => {
|
|
1671
|
+
y.style.willChange = uo, y.style.backfaceVisibility = "hidden", y.style.contain = "layout paint", y.style.zIndex = R, a === "enter" ? y.style.position = "relative" : y.style.pointerEvents = "none";
|
|
1672
|
+
}), u.then((y) => {
|
|
1673
|
+
s && (y.style.willChange = n.willChange, y.style.backfaceVisibility = "hidden", y.style.contain = "layout paint"), y.style.zIndex = _, a === "enter" ? y.style.pointerEvents = "none" : y.style.position = "relative";
|
|
1828
1674
|
});
|
|
1829
|
-
let
|
|
1830
|
-
return
|
|
1675
|
+
let d;
|
|
1676
|
+
return o && (d = c("sheet-overlay"), Object.assign(d.style, o.initialStyle), d.style.willChange = o.willChange, l.positionedParent.appendChild(d)), { overlay: d };
|
|
1831
1677
|
},
|
|
1832
|
-
animation: ({ from:
|
|
1833
|
-
const a = l.direction === "forward" ? "enter" : "exit", p = a === "enter" ?
|
|
1678
|
+
animation: ({ from: r, to: i, context: l, overlay: c }) => {
|
|
1679
|
+
const a = l.direction === "forward" ? "enter" : "exit", p = a === "enter" ? e.enterPhysics : e.exitPhysics, u = a === "enter" ? i : r, d = a === "enter" ? r : i, y = F(
|
|
1834
1680
|
l,
|
|
1835
1681
|
a === "enter" ? "to" : "from"
|
|
1836
1682
|
), f = () => {
|
|
1837
|
-
|
|
1838
|
-
},
|
|
1839
|
-
const x = a === "enter" ?
|
|
1840
|
-
|
|
1841
|
-
},
|
|
1683
|
+
r.style.pointerEvents = "", r.style.zIndex = "";
|
|
1684
|
+
}, h = () => {
|
|
1685
|
+
const x = a === "enter" ? R : _;
|
|
1686
|
+
i.style.position === "relative" && (i.style.position = ""), i.style.zIndex === x && (i.style.zIndex = "");
|
|
1687
|
+
}, g = (x) => {
|
|
1842
1688
|
const C = x.onComplete;
|
|
1843
1689
|
x.onComplete = () => {
|
|
1844
1690
|
C == null || C(), x.releaseFill();
|
|
1845
1691
|
};
|
|
1846
1692
|
};
|
|
1847
|
-
|
|
1693
|
+
u.style.clipPath = `inset(${y.top}px 0 calc(100% - ${y.top + y.height}px) 0)`;
|
|
1848
1694
|
const S = a === "enter" ? (x, C) => ({
|
|
1849
|
-
transform: `translate3d(0, ${C *
|
|
1695
|
+
transform: `translate3d(0, ${C * y.height}px, 0)`
|
|
1850
1696
|
}) : (x) => ({
|
|
1851
|
-
transform: `translate3d(0, ${x *
|
|
1852
|
-
}),
|
|
1853
|
-
element:
|
|
1854
|
-
integrator:
|
|
1697
|
+
transform: `translate3d(0, ${x * y.height}px, 0)`
|
|
1698
|
+
}), w = new m({
|
|
1699
|
+
element: u,
|
|
1700
|
+
integrator: b.from(p),
|
|
1855
1701
|
style: S,
|
|
1856
1702
|
onComplete: () => {
|
|
1857
|
-
|
|
1703
|
+
u.style.willChange = "auto", u.style.backfaceVisibility = "", u.style.contain = "", u.style.clipPath = "", u.style.transform = "", f(), h();
|
|
1858
1704
|
}
|
|
1859
1705
|
});
|
|
1860
|
-
|
|
1861
|
-
const $ = [
|
|
1862
|
-
if (
|
|
1863
|
-
const x =
|
|
1864
|
-
x > 0 && (
|
|
1706
|
+
g(w);
|
|
1707
|
+
const $ = [w];
|
|
1708
|
+
if (s) {
|
|
1709
|
+
const x = d.scrollHeight;
|
|
1710
|
+
x > 0 && (d.style.height = `${x}px`);
|
|
1865
1711
|
const C = F(
|
|
1866
1712
|
l,
|
|
1867
1713
|
a === "enter" ? "from" : "to"
|
|
1868
1714
|
), I = C.left + C.width / 2, A = C.top + C.height / 2;
|
|
1869
|
-
|
|
1870
|
-
const
|
|
1871
|
-
element:
|
|
1872
|
-
integrator:
|
|
1873
|
-
style:
|
|
1715
|
+
d.style.clipPath = `inset(${C.top}px 0 calc(100% - ${C.top + C.height}px) 0)`, d.style.transformOrigin = `${I}px ${A}px`;
|
|
1716
|
+
const P = a === "enter" ? (M, N) => n.enterStyle(M, N) : (M) => n.exitStyle(M), H = new m({
|
|
1717
|
+
element: d,
|
|
1718
|
+
integrator: b.from(p),
|
|
1719
|
+
style: P,
|
|
1874
1720
|
// The background is the reused outgoing (`from`) node on `enter` and
|
|
1875
1721
|
// the surviving incoming (`to`) node on `exit` — in both cases its
|
|
1876
1722
|
// inline styles must be cleared on settle so the reused node is not
|
|
1877
1723
|
// left scaled/faded/clipped the next time it is shown. releaseFill
|
|
1878
1724
|
// below drops the WAAPI fill so these resets actually take effect.
|
|
1879
1725
|
onComplete: () => {
|
|
1880
|
-
|
|
1726
|
+
d.style.willChange = "auto", d.style.backfaceVisibility = "", d.style.contain = "", d.style.clipPath = "", d.style.transformOrigin = "", d.style.transform = "", d.style.opacity = "", d.style.height = "";
|
|
1881
1727
|
}
|
|
1882
1728
|
});
|
|
1883
|
-
|
|
1729
|
+
g(H), $.push(H);
|
|
1884
1730
|
}
|
|
1885
|
-
if (c &&
|
|
1886
|
-
c.style.zIndex =
|
|
1887
|
-
const x =
|
|
1731
|
+
if (c && o) {
|
|
1732
|
+
c.style.zIndex = Ht;
|
|
1733
|
+
const x = kt(l, "to");
|
|
1888
1734
|
c.style.top = `${x.top}px`, c.style.height = `${x.height}px`, $.push(
|
|
1889
|
-
new
|
|
1735
|
+
new m({
|
|
1890
1736
|
element: c,
|
|
1891
|
-
integrator:
|
|
1892
|
-
style: (C) =>
|
|
1737
|
+
integrator: b.from(p),
|
|
1738
|
+
style: (C) => o.style(a, C)
|
|
1893
1739
|
})
|
|
1894
1740
|
);
|
|
1895
1741
|
}
|
|
1896
|
-
return new
|
|
1742
|
+
return new E($, { mode: "parallel" });
|
|
1897
1743
|
}
|
|
1898
1744
|
};
|
|
1899
1745
|
};
|
|
1900
|
-
function
|
|
1901
|
-
return
|
|
1746
|
+
function yo(t) {
|
|
1747
|
+
return t === "scale" || t === "background-scale" ? "background-scale" : t === "blur" ? "blur" : "static";
|
|
1902
1748
|
}
|
|
1903
|
-
function
|
|
1904
|
-
const
|
|
1905
|
-
return
|
|
1749
|
+
function as(t = {}) {
|
|
1750
|
+
const e = t.type, n = yo(e);
|
|
1751
|
+
return fo({ type: n });
|
|
1906
1752
|
}
|
|
1907
|
-
const
|
|
1908
|
-
|
|
1909
|
-
}, ws = (e = {}) => {
|
|
1910
|
-
const t = e.physics ?? bs;
|
|
1753
|
+
const ho = (t = {}) => {
|
|
1754
|
+
const e = t.physics ?? re;
|
|
1911
1755
|
return {
|
|
1912
|
-
prepare: ({ from: n, to:
|
|
1913
|
-
const
|
|
1914
|
-
return n.then((
|
|
1915
|
-
|
|
1916
|
-
}),
|
|
1917
|
-
const l =
|
|
1918
|
-
|
|
1756
|
+
prepare: ({ from: n, to: o, context: s }) => {
|
|
1757
|
+
const r = s.direction === "forward";
|
|
1758
|
+
return n.then((i) => {
|
|
1759
|
+
i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint", i.style.pointerEvents = "none";
|
|
1760
|
+
}), o.then((i) => {
|
|
1761
|
+
const l = r ? 100 : -100;
|
|
1762
|
+
i.style.transform = `translate3d(${l}%, 0, 0)`, i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint";
|
|
1919
1763
|
}), {};
|
|
1920
1764
|
},
|
|
1921
|
-
animation: ({ from: n, to:
|
|
1922
|
-
const
|
|
1765
|
+
animation: ({ from: n, to: o, context: s }) => {
|
|
1766
|
+
const r = new m({
|
|
1923
1767
|
element: n,
|
|
1924
|
-
integrator:
|
|
1925
|
-
style: (
|
|
1768
|
+
integrator: b.from(e),
|
|
1769
|
+
style: (l) => ({ transform: `translate3d(${100 * X("slide", "out", s.direction, l).x}%, 0, 0)` }),
|
|
1926
1770
|
// The outgoing node is the real Activity page and gets reused on the
|
|
1927
1771
|
// next navigation, so reset every inline style we wrote to it (mirror
|
|
1928
1772
|
// the incoming cleanup, plus the out-only pointerEvents).
|
|
1929
1773
|
onComplete: () => {
|
|
1930
1774
|
n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.contain = "", n.style.transform = "", n.style.pointerEvents = "";
|
|
1931
1775
|
}
|
|
1932
|
-
}),
|
|
1933
|
-
element:
|
|
1934
|
-
integrator:
|
|
1935
|
-
style: (
|
|
1776
|
+
}), i = new m({
|
|
1777
|
+
element: o,
|
|
1778
|
+
integrator: b.from(e),
|
|
1779
|
+
style: (l) => ({ transform: `translate3d(${100 * X("slide", "in", s.direction, l).x}%, 0, 0)` }),
|
|
1936
1780
|
onComplete: () => {
|
|
1937
|
-
|
|
1781
|
+
o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "", o.style.transform = "";
|
|
1938
1782
|
}
|
|
1939
1783
|
});
|
|
1940
|
-
return new
|
|
1784
|
+
return new E([r, i], { mode: "parallel" });
|
|
1941
1785
|
}
|
|
1942
1786
|
};
|
|
1943
1787
|
};
|
|
1944
|
-
function
|
|
1945
|
-
return
|
|
1788
|
+
function ls(t = {}) {
|
|
1789
|
+
return ho();
|
|
1946
1790
|
}
|
|
1947
|
-
const
|
|
1791
|
+
const mo = {
|
|
1948
1792
|
spring: { stiffness: 17, damping: 6 }
|
|
1949
|
-
},
|
|
1950
|
-
const
|
|
1793
|
+
}, ot = 20, U = 800, go = (t = {}) => {
|
|
1794
|
+
const e = t.physics ?? mo;
|
|
1951
1795
|
return {
|
|
1952
|
-
prepare: ({ from: n, to:
|
|
1953
|
-
|
|
1954
|
-
}),
|
|
1955
|
-
|
|
1796
|
+
prepare: ({ from: n, to: o }) => (n.then((s) => {
|
|
1797
|
+
s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.pointerEvents = "none", s.style.transform = `perspective(${U}px) rotateY(0deg) translate3d(0%, 0, 0)`;
|
|
1798
|
+
}), o.then((s) => {
|
|
1799
|
+
s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.transform = `perspective(${U}px) rotateY(${ot}deg) translate3d(-100%, 0, 0)`;
|
|
1956
1800
|
}), {}),
|
|
1957
|
-
animation: ({ from: n, to:
|
|
1958
|
-
const
|
|
1801
|
+
animation: ({ from: n, to: o }) => {
|
|
1802
|
+
const s = new m({
|
|
1959
1803
|
element: n,
|
|
1960
|
-
integrator:
|
|
1961
|
-
style: (
|
|
1962
|
-
const l = -
|
|
1804
|
+
integrator: b.from(e),
|
|
1805
|
+
style: (i) => {
|
|
1806
|
+
const l = -i * ot, c = i * 100;
|
|
1963
1807
|
return {
|
|
1964
|
-
transform: `perspective(${
|
|
1808
|
+
transform: `perspective(${U}px) rotateY(${l}deg) translate3d(${c}%, 0, 0)`
|
|
1965
1809
|
};
|
|
1966
1810
|
},
|
|
1967
1811
|
// The outgoing node is reused (Activity/cacheComponents re-hide it),
|
|
@@ -1970,91 +1814,91 @@ const Ss = {
|
|
|
1970
1814
|
onComplete: () => {
|
|
1971
1815
|
n.style.transform = "", n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.contain = "", n.style.pointerEvents = "";
|
|
1972
1816
|
}
|
|
1973
|
-
}),
|
|
1974
|
-
element:
|
|
1975
|
-
integrator:
|
|
1976
|
-
style: (
|
|
1977
|
-
const c = l *
|
|
1817
|
+
}), r = new m({
|
|
1818
|
+
element: o,
|
|
1819
|
+
integrator: b.from(e),
|
|
1820
|
+
style: (i, l) => {
|
|
1821
|
+
const c = l * ot, a = -l * 100;
|
|
1978
1822
|
return {
|
|
1979
|
-
transform: `perspective(${
|
|
1823
|
+
transform: `perspective(${U}px) rotateY(${c}deg) translate3d(${a}%, 0, 0)`
|
|
1980
1824
|
};
|
|
1981
1825
|
},
|
|
1982
1826
|
onComplete: () => {
|
|
1983
|
-
|
|
1827
|
+
o.style.transform = "", o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "";
|
|
1984
1828
|
}
|
|
1985
1829
|
});
|
|
1986
|
-
return new
|
|
1830
|
+
return new E([s, r], { mode: "sequence" });
|
|
1987
1831
|
}
|
|
1988
1832
|
};
|
|
1989
1833
|
};
|
|
1990
|
-
function
|
|
1991
|
-
return
|
|
1992
|
-
}
|
|
1993
|
-
function
|
|
1994
|
-
return
|
|
1995
|
-
}
|
|
1996
|
-
function
|
|
1997
|
-
const
|
|
1998
|
-
enterContent:
|
|
1999
|
-
exitContent:
|
|
2000
|
-
startWindow:
|
|
2001
|
-
scaleX:
|
|
2002
|
-
scaleY:
|
|
2003
|
-
}), { enterMedia: n, exitMedia:
|
|
2004
|
-
if (!n || !
|
|
2005
|
-
const
|
|
2006
|
-
if (
|
|
2007
|
-
return
|
|
2008
|
-
const
|
|
2009
|
-
|
|
2010
|
-
i,
|
|
2011
|
-
s.window,
|
|
1834
|
+
function cs(t = {}) {
|
|
1835
|
+
return go();
|
|
1836
|
+
}
|
|
1837
|
+
function bo(t, e) {
|
|
1838
|
+
return e.left >= t.left - 0.01 && e.top >= t.top - 0.01 && e.left + e.width <= t.left + t.width + 0.01 && e.top + e.height <= t.top + t.height + 0.01;
|
|
1839
|
+
}
|
|
1840
|
+
function Bt(t) {
|
|
1841
|
+
const e = () => ({
|
|
1842
|
+
enterContent: t.enterRect,
|
|
1843
|
+
exitContent: t.exitRect,
|
|
1844
|
+
startWindow: t.enterRect,
|
|
1845
|
+
scaleX: t.exitRect.width / t.enterRect.width,
|
|
1846
|
+
scaleY: t.exitRect.height / t.enterRect.height
|
|
1847
|
+
}), { enterMedia: n, exitMedia: o } = t;
|
|
1848
|
+
if (!n || !o || !Vt(n, o)) return e();
|
|
1849
|
+
const s = n.content, r = o.content;
|
|
1850
|
+
if (s.width <= 0 || s.height <= 0 || r.width <= 0 || r.height <= 0)
|
|
1851
|
+
return e();
|
|
1852
|
+
const i = r.width / s.width, l = r.height / s.height, c = Xt(
|
|
1853
|
+
s,
|
|
2012
1854
|
r,
|
|
1855
|
+
o.window,
|
|
1856
|
+
i,
|
|
2013
1857
|
l
|
|
2014
1858
|
);
|
|
2015
|
-
return
|
|
1859
|
+
return bo(n.window, c) ? { enterContent: s, exitContent: r, startWindow: c, scaleX: i, scaleY: l } : e();
|
|
2016
1860
|
}
|
|
2017
|
-
function
|
|
1861
|
+
function Wt(t, e) {
|
|
2018
1862
|
return {
|
|
2019
|
-
top:
|
|
2020
|
-
right: (
|
|
2021
|
-
bottom: (
|
|
2022
|
-
left:
|
|
1863
|
+
top: t.top / e.height * 100,
|
|
1864
|
+
right: (e.width - (t.left + t.width)) / e.width * 100,
|
|
1865
|
+
bottom: (e.height - (t.top + t.height)) / e.height * 100,
|
|
1866
|
+
left: t.left / e.width * 100
|
|
2023
1867
|
};
|
|
2024
1868
|
}
|
|
2025
|
-
function
|
|
1869
|
+
function Zt(t, e, n) {
|
|
2026
1870
|
return {
|
|
2027
|
-
x:
|
|
2028
|
-
y:
|
|
1871
|
+
x: t / Math.max(Math.abs(e), 1e-6),
|
|
1872
|
+
y: t / Math.max(Math.abs(n), 1e-6)
|
|
2029
1873
|
};
|
|
2030
1874
|
}
|
|
2031
|
-
function
|
|
2032
|
-
const { pageRect:
|
|
1875
|
+
function wo(t) {
|
|
1876
|
+
const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius: s } = t, r = Bt(t), { enterContent: i, exitContent: l, startWindow: c, scaleX: a, scaleY: p } = r, u = l.left - i.left + (l.width - i.width) / 2 - n.x, d = l.top - i.top + (l.height - i.height) / 2 - n.y, y = Wt(c, e);
|
|
2033
1877
|
return {
|
|
2034
|
-
transformOrigin: `${
|
|
1878
|
+
transformOrigin: `${v(i)}px ${O(i)}px`,
|
|
2035
1879
|
animate: (f) => {
|
|
2036
|
-
const
|
|
1880
|
+
const h = 1 - f, g = 1 + (a - 1) * h, S = 1 + (p - 1) * h, w = Math.max(0, s * h + o * (1 - h)), $ = Zt(w, g, S);
|
|
2037
1881
|
return {
|
|
2038
|
-
clipPath: `inset(${
|
|
2039
|
-
transform: `translate(${
|
|
1882
|
+
clipPath: `inset(${y.top * h}% ${y.right * h}% ${y.bottom * h}% ${y.left * h}% round ${$.x}px / ${$.y}px)`,
|
|
1883
|
+
transform: `translate(${u * h}px, ${d * h}px) scale(${g}, ${S})`
|
|
2040
1884
|
};
|
|
2041
1885
|
}
|
|
2042
1886
|
};
|
|
2043
1887
|
}
|
|
2044
|
-
function
|
|
2045
|
-
const { pageRect:
|
|
1888
|
+
function So(t) {
|
|
1889
|
+
const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius: s } = t, r = Bt(t), { enterContent: i, exitContent: l, startWindow: c, scaleX: a, scaleY: p } = r, u = l.left - i.left + (l.width - i.width) / 2 + n.x, d = l.top - i.top + (l.height - i.height) / 2 + n.y, y = Wt(c, e);
|
|
2046
1890
|
return {
|
|
2047
|
-
transformOrigin: `${
|
|
1891
|
+
transformOrigin: `${v(i)}px ${O(i)}px`,
|
|
2048
1892
|
animate: (f) => {
|
|
2049
|
-
const
|
|
1893
|
+
const h = 1 - f, g = 1 + (a - 1) * h, S = 1 + (p - 1) * h, w = Math.max(0, o * (1 - h) + s * h), $ = Zt(w, g, S);
|
|
2050
1894
|
return {
|
|
2051
|
-
clipPath: `inset(${
|
|
2052
|
-
transform: `translate(${
|
|
1895
|
+
clipPath: `inset(${y.top * h}% ${y.right * h}% ${y.bottom * h}% ${y.left * h}% round ${$.x}px / ${$.y}px)`,
|
|
1896
|
+
transform: `translate(${u * h - n.x}px, ${d * h}px) scale(${g}, ${S})`
|
|
2053
1897
|
};
|
|
2054
1898
|
}
|
|
2055
1899
|
};
|
|
2056
1900
|
}
|
|
2057
|
-
const
|
|
1901
|
+
const xo = {
|
|
2058
1902
|
spring: {
|
|
2059
1903
|
stiffness: 380,
|
|
2060
1904
|
damping: 30,
|
|
@@ -2065,30 +1909,30 @@ const Ps = {
|
|
|
2065
1909
|
damping: 30
|
|
2066
1910
|
}
|
|
2067
1911
|
}
|
|
2068
|
-
},
|
|
2069
|
-
function
|
|
1912
|
+
}, Gt = 0.12, Co = 18;
|
|
1913
|
+
function $o() {
|
|
2070
1914
|
return {
|
|
2071
1915
|
transformOrigin: "50% 50%",
|
|
2072
|
-
animate: (
|
|
2073
|
-
const
|
|
1916
|
+
animate: (t) => {
|
|
1917
|
+
const e = 1 - t;
|
|
2074
1918
|
return {
|
|
2075
|
-
transform: `scale(${1 -
|
|
1919
|
+
transform: `scale(${1 - Gt * e})`
|
|
2076
1920
|
};
|
|
2077
1921
|
}
|
|
2078
1922
|
};
|
|
2079
1923
|
}
|
|
2080
|
-
function
|
|
1924
|
+
function Eo() {
|
|
2081
1925
|
return {
|
|
2082
1926
|
transformOrigin: "50% 50%",
|
|
2083
|
-
animate: (
|
|
2084
|
-
const
|
|
1927
|
+
animate: (t) => {
|
|
1928
|
+
const e = 1 - t;
|
|
2085
1929
|
return {
|
|
2086
|
-
transform: `scale(${1 -
|
|
1930
|
+
transform: `scale(${1 - Gt * e})`
|
|
2087
1931
|
};
|
|
2088
1932
|
}
|
|
2089
1933
|
};
|
|
2090
1934
|
}
|
|
2091
|
-
const
|
|
1935
|
+
const st = {
|
|
2092
1936
|
willChange: "backdrop-filter",
|
|
2093
1937
|
// `top` + `height` are set per-transition in OverlayStrategy.contribute (they
|
|
2094
1938
|
// track the live scroll position), so they are intentionally omitted here.
|
|
@@ -2103,49 +1947,49 @@ const ot = {
|
|
|
2103
1947
|
backdropFilter: "blur(0px)",
|
|
2104
1948
|
WebkitBackdropFilter: "blur(0px)"
|
|
2105
1949
|
},
|
|
2106
|
-
style: (
|
|
2107
|
-
const n =
|
|
1950
|
+
style: (t, e) => {
|
|
1951
|
+
const n = t === "enter" ? e : 1 - e, o = `blur(${Co * n}px)`;
|
|
2108
1952
|
return {
|
|
2109
|
-
backdropFilter:
|
|
2110
|
-
WebkitBackdropFilter:
|
|
1953
|
+
backdropFilter: o,
|
|
1954
|
+
WebkitBackdropFilter: o
|
|
2111
1955
|
};
|
|
2112
1956
|
}
|
|
2113
1957
|
};
|
|
2114
|
-
class
|
|
1958
|
+
class Po {
|
|
2115
1959
|
constructor() {
|
|
2116
|
-
|
|
1960
|
+
T(this, "physics", xo);
|
|
2117
1961
|
}
|
|
2118
|
-
contribute(
|
|
2119
|
-
const { from: n, to:
|
|
1962
|
+
contribute(e) {
|
|
1963
|
+
const { from: n, to: o, resolved: s, physics: r } = e, i = s.mode === "enter", l = i ? n : o, c = i ? $o() : Eo();
|
|
2120
1964
|
return c && (l.style.transformOrigin = c.transformOrigin), [
|
|
2121
|
-
new
|
|
1965
|
+
new m({
|
|
2122
1966
|
element: l,
|
|
2123
|
-
integrator:
|
|
2124
|
-
style:
|
|
1967
|
+
integrator: b.from(r),
|
|
1968
|
+
style: i ? (a, p) => c.animate(p) : (a) => c.animate(a)
|
|
2125
1969
|
})
|
|
2126
1970
|
];
|
|
2127
1971
|
}
|
|
2128
1972
|
}
|
|
2129
|
-
class
|
|
2130
|
-
prepare(
|
|
2131
|
-
const n =
|
|
2132
|
-
return Object.assign(n.style,
|
|
1973
|
+
class Ao {
|
|
1974
|
+
prepare(e) {
|
|
1975
|
+
const n = e.createElement("zoom-overlay");
|
|
1976
|
+
return Object.assign(n.style, st.initialStyle), n.style.willChange = st.willChange, e.context.positionedParent.appendChild(n), { overlay: n };
|
|
2133
1977
|
}
|
|
2134
|
-
contribute(
|
|
2135
|
-
const n =
|
|
1978
|
+
contribute(e) {
|
|
1979
|
+
const n = e.extras.overlay;
|
|
2136
1980
|
if (!n) return [];
|
|
2137
|
-
n.style.zIndex =
|
|
2138
|
-
const
|
|
2139
|
-
return n.style.top = `${
|
|
2140
|
-
new
|
|
1981
|
+
n.style.zIndex = Ht;
|
|
1982
|
+
const o = kt(e.context, "to");
|
|
1983
|
+
return n.style.top = `${o.top}px`, n.style.height = `${o.height}px`, [
|
|
1984
|
+
new m({
|
|
2141
1985
|
element: n,
|
|
2142
|
-
integrator:
|
|
2143
|
-
style: (
|
|
1986
|
+
integrator: b.from(e.physics),
|
|
1987
|
+
style: (s) => st.style(e.resolved.mode, s)
|
|
2144
1988
|
})
|
|
2145
1989
|
];
|
|
2146
1990
|
}
|
|
2147
1991
|
}
|
|
2148
|
-
const
|
|
1992
|
+
const Io = {
|
|
2149
1993
|
spring: {
|
|
2150
1994
|
stiffness: 380,
|
|
2151
1995
|
damping: 30,
|
|
@@ -2155,314 +1999,314 @@ const Os = {
|
|
|
2155
1999
|
}
|
|
2156
2000
|
}
|
|
2157
2001
|
};
|
|
2158
|
-
function
|
|
2159
|
-
enterRect:
|
|
2160
|
-
exitRect:
|
|
2002
|
+
function _o({
|
|
2003
|
+
enterRect: t,
|
|
2004
|
+
exitRect: e,
|
|
2161
2005
|
scrollOffset: n
|
|
2162
2006
|
}) {
|
|
2163
|
-
const
|
|
2007
|
+
const o = t.left - e.left + (t.width - e.width) / 2 + n.x, s = t.top - e.top + (t.height - e.height) / 2 + n.y, r = t.width / e.width, i = t.height / e.height, l = Math.max(r, i);
|
|
2164
2008
|
return {
|
|
2165
|
-
transformOrigin: `${
|
|
2009
|
+
transformOrigin: `${e.left + e.width / 2}px ${e.top + e.height / 2}px`,
|
|
2166
2010
|
animate: (c) => {
|
|
2167
2011
|
const a = 1 - c;
|
|
2168
2012
|
return {
|
|
2169
|
-
transform: `translate(${
|
|
2013
|
+
transform: `translate(${o * a - n.x}px, ${s * a}px) scale(${1 + (l - 1) * a})`
|
|
2170
2014
|
};
|
|
2171
2015
|
}
|
|
2172
2016
|
};
|
|
2173
2017
|
}
|
|
2174
|
-
function
|
|
2175
|
-
enterRect:
|
|
2176
|
-
exitRect:
|
|
2018
|
+
function Ro({
|
|
2019
|
+
enterRect: t,
|
|
2020
|
+
exitRect: e,
|
|
2177
2021
|
scrollOffset: n
|
|
2178
2022
|
}) {
|
|
2179
|
-
const
|
|
2023
|
+
const o = t.left - e.left + (t.width - e.width) / 2 - n.x, s = t.top - e.top + (t.height - e.height) / 2 - n.y, r = t.width / e.width, i = t.height / e.height, l = Math.max(r, i);
|
|
2180
2024
|
return {
|
|
2181
|
-
transformOrigin: `${
|
|
2025
|
+
transformOrigin: `${e.left + e.width / 2}px ${e.top + e.height / 2}px`,
|
|
2182
2026
|
animate: (c) => {
|
|
2183
2027
|
const a = 1 - c;
|
|
2184
2028
|
return {
|
|
2185
|
-
transform: `translate(${
|
|
2029
|
+
transform: `translate(${o * a}px, ${s * a}px) scale(${1 + (l - 1) * a})`
|
|
2186
2030
|
};
|
|
2187
2031
|
}
|
|
2188
2032
|
};
|
|
2189
2033
|
}
|
|
2190
|
-
class
|
|
2034
|
+
class vo {
|
|
2191
2035
|
constructor() {
|
|
2192
|
-
|
|
2036
|
+
T(this, "physics", Io);
|
|
2193
2037
|
}
|
|
2194
|
-
contribute(
|
|
2195
|
-
const { from: n, to:
|
|
2038
|
+
contribute(e) {
|
|
2039
|
+
const { from: n, to: o, resolved: s, input: r, physics: i } = e, l = s.mode === "enter", c = l ? n : o, a = l ? _o(r) : Ro(r);
|
|
2196
2040
|
return a && (c.style.transformOrigin = a.transformOrigin), [
|
|
2197
|
-
new
|
|
2041
|
+
new m({
|
|
2198
2042
|
element: c,
|
|
2199
|
-
integrator:
|
|
2200
|
-
style: l ? (p,
|
|
2043
|
+
integrator: b.from(i),
|
|
2044
|
+
style: l ? (p, u) => a.animate(u) : (p) => a.animate(p)
|
|
2201
2045
|
})
|
|
2202
2046
|
];
|
|
2203
2047
|
}
|
|
2204
2048
|
}
|
|
2205
|
-
const
|
|
2049
|
+
const Oo = {
|
|
2206
2050
|
spring: {
|
|
2207
2051
|
stiffness: 530,
|
|
2208
2052
|
damping: 34,
|
|
2209
2053
|
doubleSpring: 1
|
|
2210
2054
|
}
|
|
2211
2055
|
};
|
|
2212
|
-
class
|
|
2056
|
+
class Fo {
|
|
2213
2057
|
constructor() {
|
|
2214
|
-
|
|
2058
|
+
T(this, "physics", Oo);
|
|
2215
2059
|
}
|
|
2216
|
-
contribute(
|
|
2060
|
+
contribute(e) {
|
|
2217
2061
|
return [];
|
|
2218
2062
|
}
|
|
2219
2063
|
}
|
|
2220
|
-
const
|
|
2221
|
-
expand: () => new
|
|
2222
|
-
static: () => new
|
|
2223
|
-
blur: () => new
|
|
2064
|
+
const To = {
|
|
2065
|
+
expand: () => new vo(),
|
|
2066
|
+
static: () => new Fo(),
|
|
2067
|
+
blur: () => new Po()
|
|
2224
2068
|
};
|
|
2225
|
-
function
|
|
2226
|
-
return
|
|
2069
|
+
function Yo(t) {
|
|
2070
|
+
return To[t]();
|
|
2227
2071
|
}
|
|
2228
|
-
const lt = "data-zoom-enter-key", Tt = "data-zoom-exit-key",
|
|
2229
|
-
function
|
|
2230
|
-
return Math.abs(
|
|
2072
|
+
const lt = "data-zoom-enter-key", Tt = "data-zoom-exit-key", Yt = "data-zoom-radius";
|
|
2073
|
+
function Do(t, e) {
|
|
2074
|
+
return Math.abs(t.left - e.left) < 0.01 && Math.abs(t.top - e.top) < 0.01 && Math.abs(t.width - e.width) < 0.01 && Math.abs(t.height - e.height) < 0.01;
|
|
2231
2075
|
}
|
|
2232
|
-
function
|
|
2076
|
+
function Mo(t, e) {
|
|
2233
2077
|
const n = [];
|
|
2234
|
-
let
|
|
2235
|
-
for (;
|
|
2236
|
-
const
|
|
2237
|
-
if (!
|
|
2238
|
-
for (const
|
|
2239
|
-
|
|
2240
|
-
|
|
2078
|
+
let o = e;
|
|
2079
|
+
for (; o && o !== t; ) {
|
|
2080
|
+
const s = o.parentElement;
|
|
2081
|
+
if (!s) break;
|
|
2082
|
+
for (const r of Array.from(s.children))
|
|
2083
|
+
r !== o && r instanceof HTMLElement && n.push(r);
|
|
2084
|
+
o = s;
|
|
2241
2085
|
}
|
|
2242
2086
|
return n;
|
|
2243
2087
|
}
|
|
2244
|
-
function
|
|
2245
|
-
const
|
|
2246
|
-
return
|
|
2088
|
+
function Dt(t) {
|
|
2089
|
+
const e = t.querySelectorAll(`[${lt}]`);
|
|
2090
|
+
return e.length !== 1 ? null : e[0];
|
|
2247
2091
|
}
|
|
2248
|
-
function
|
|
2249
|
-
const n =
|
|
2250
|
-
for (const
|
|
2251
|
-
if (
|
|
2252
|
-
return
|
|
2092
|
+
function Mt(t, e) {
|
|
2093
|
+
const n = t.querySelectorAll(`[${Tt}]`);
|
|
2094
|
+
for (const o of n)
|
|
2095
|
+
if (o.getAttribute(Tt) === e)
|
|
2096
|
+
return o;
|
|
2253
2097
|
return null;
|
|
2254
2098
|
}
|
|
2255
|
-
function
|
|
2099
|
+
function ko(t, e, n) {
|
|
2256
2100
|
if (n === "forward") {
|
|
2257
|
-
const
|
|
2258
|
-
if (!
|
|
2259
|
-
const l =
|
|
2101
|
+
const i = Dt(e);
|
|
2102
|
+
if (!i) return null;
|
|
2103
|
+
const l = i.getAttribute(lt);
|
|
2260
2104
|
if (!l) return null;
|
|
2261
|
-
const c =
|
|
2262
|
-
return c ? { mode: "enter", enterEl:
|
|
2105
|
+
const c = Mt(t, l);
|
|
2106
|
+
return c ? { mode: "enter", enterEl: i, exitEl: c } : null;
|
|
2263
2107
|
}
|
|
2264
|
-
const
|
|
2265
|
-
if (!s) return null;
|
|
2266
|
-
const o = s.getAttribute(lt);
|
|
2108
|
+
const o = Dt(t);
|
|
2267
2109
|
if (!o) return null;
|
|
2268
|
-
const
|
|
2269
|
-
|
|
2110
|
+
const s = o.getAttribute(lt);
|
|
2111
|
+
if (!s) return null;
|
|
2112
|
+
const r = Mt(e, s);
|
|
2113
|
+
return r ? { mode: "exit", enterEl: o, exitEl: r } : null;
|
|
2270
2114
|
}
|
|
2271
|
-
function
|
|
2272
|
-
const
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
(
|
|
2115
|
+
function Lo(t, e, n, o) {
|
|
2116
|
+
const s = t.mode === "enter" ? n : e, r = t.mode === "enter" ? e : n, i = z(s, t.enterEl), l = z(r, t.exitEl), c = at(
|
|
2117
|
+
t.enterEl,
|
|
2118
|
+
i,
|
|
2119
|
+
(g) => z(s, g),
|
|
2276
2120
|
{
|
|
2277
|
-
legacyRadiusAttribute:
|
|
2121
|
+
legacyRadiusAttribute: Yt
|
|
2278
2122
|
}
|
|
2279
2123
|
), a = at(
|
|
2280
|
-
|
|
2124
|
+
t.exitEl,
|
|
2281
2125
|
l,
|
|
2282
|
-
(
|
|
2126
|
+
(g) => z(r, g),
|
|
2283
2127
|
{
|
|
2284
|
-
legacyRadiusAttribute:
|
|
2128
|
+
legacyRadiusAttribute: Yt
|
|
2285
2129
|
}
|
|
2286
|
-
), [p,
|
|
2130
|
+
), [p, u] = Ut(c, a), d = p.contentAware && u.contentAware, y = t.mode === "enter" ? n.getBoundingClientRect() : e.getBoundingClientRect(), f = {
|
|
2287
2131
|
left: 0,
|
|
2288
2132
|
top: 0,
|
|
2289
|
-
width:
|
|
2290
|
-
height:
|
|
2291
|
-
},
|
|
2133
|
+
width: y.width,
|
|
2134
|
+
height: y.height
|
|
2135
|
+
}, h = p.radiusSource === "legacy" || Do(p.window, f) ? p.radius : 0;
|
|
2292
2136
|
return {
|
|
2293
|
-
enterRect:
|
|
2137
|
+
enterRect: i,
|
|
2294
2138
|
exitRect: l,
|
|
2295
|
-
...
|
|
2139
|
+
...d ? {
|
|
2296
2140
|
enterMedia: p,
|
|
2297
|
-
exitMedia:
|
|
2141
|
+
exitMedia: u
|
|
2298
2142
|
} : {},
|
|
2299
|
-
pageRect:
|
|
2300
|
-
scrollOffset:
|
|
2301
|
-
enterRadius:
|
|
2302
|
-
exitRadius:
|
|
2143
|
+
pageRect: y,
|
|
2144
|
+
scrollOffset: o,
|
|
2145
|
+
enterRadius: h,
|
|
2146
|
+
exitRadius: u.radius
|
|
2303
2147
|
};
|
|
2304
2148
|
}
|
|
2305
|
-
class
|
|
2306
|
-
prepare(
|
|
2307
|
-
|
|
2149
|
+
class Ho {
|
|
2150
|
+
prepare(e) {
|
|
2151
|
+
e.from.then((n) => {
|
|
2308
2152
|
n.style.willChange = "transform, clip-path, opacity", n.style.backfaceVisibility = "hidden", n.style.contain = "layout paint";
|
|
2309
2153
|
});
|
|
2310
2154
|
}
|
|
2311
|
-
contribute(
|
|
2312
|
-
const { from: n, to:
|
|
2155
|
+
contribute(e) {
|
|
2156
|
+
const { from: n, to: o, resolved: s, input: r, physics: i, onComplete: l } = e, c = s.mode === "enter", a = c ? wo(r) : So(r), p = c ? o : n, u = c ? "t" : "u";
|
|
2313
2157
|
a && (p.style.transformOrigin = a.transformOrigin);
|
|
2314
|
-
const
|
|
2315
|
-
n.style.zIndex =
|
|
2316
|
-
const
|
|
2317
|
-
return
|
|
2318
|
-
p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.transformOrigin = "", p.style.contain = "", n.style.zIndex = f,
|
|
2158
|
+
const d = c ? _ : R, y = c ? R : _, f = n.style.zIndex;
|
|
2159
|
+
n.style.zIndex = d;
|
|
2160
|
+
const h = o.style.zIndex, g = o.style.position;
|
|
2161
|
+
return o.style.zIndex = y, o.style.position = "relative", l(() => {
|
|
2162
|
+
p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.transformOrigin = "", p.style.contain = "", n.style.zIndex = f, o.style.zIndex === y && (o.style.zIndex = h), o.style.position === "relative" && (o.style.position = g), o.style.transformOrigin = "", n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.transformOrigin = "", n.style.contain = "", n.style.transform = "", n.style.clipPath = "";
|
|
2319
2163
|
}), [
|
|
2320
|
-
new
|
|
2164
|
+
new m({
|
|
2321
2165
|
element: p,
|
|
2322
|
-
integrator:
|
|
2166
|
+
integrator: b.from(i),
|
|
2323
2167
|
// Enter: tile expands as `t` (0 → 1). Exit: tile shrinks as `u` —
|
|
2324
2168
|
// the legacy convention from v5's outAnim path. Either way, feed
|
|
2325
2169
|
// the progress that matches the tileConfig's authored direction.
|
|
2326
|
-
style:
|
|
2170
|
+
style: u === "t" ? (S) => a.animate(S) : (S, w) => a.animate(w)
|
|
2327
2171
|
})
|
|
2328
2172
|
];
|
|
2329
2173
|
}
|
|
2330
2174
|
}
|
|
2331
|
-
class
|
|
2332
|
-
contribute(
|
|
2333
|
-
const { resolved: n, physics:
|
|
2175
|
+
class No {
|
|
2176
|
+
contribute(e) {
|
|
2177
|
+
const { resolved: n, physics: o, from: s, to: r, onComplete: i } = e, l = n.mode === "enter" ? r : s, c = Mo(l, n.enterEl);
|
|
2334
2178
|
if (c.length === 0) return [];
|
|
2335
2179
|
const a = c.map((p) => p.style.opacity);
|
|
2336
2180
|
if (n.mode === "enter")
|
|
2337
2181
|
for (const p of c) p.style.opacity = "0";
|
|
2338
|
-
return
|
|
2182
|
+
return i(() => {
|
|
2339
2183
|
for (let p = 0; p < c.length; p++) {
|
|
2340
|
-
const
|
|
2341
|
-
|
|
2184
|
+
const u = c[p];
|
|
2185
|
+
u && (u.style.opacity = a[p] ?? "");
|
|
2342
2186
|
}
|
|
2343
2187
|
}), c.map(
|
|
2344
|
-
(p) => new
|
|
2188
|
+
(p) => new m({
|
|
2345
2189
|
element: p,
|
|
2346
|
-
integrator:
|
|
2347
|
-
style: (
|
|
2348
|
-
opacity: n.mode === "enter" ?
|
|
2190
|
+
integrator: b.from(o),
|
|
2191
|
+
style: (u, d) => ({
|
|
2192
|
+
opacity: n.mode === "enter" ? u : d
|
|
2349
2193
|
})
|
|
2350
2194
|
})
|
|
2351
2195
|
);
|
|
2352
2196
|
}
|
|
2353
2197
|
}
|
|
2354
|
-
class
|
|
2198
|
+
class jt {
|
|
2355
2199
|
contribute() {
|
|
2356
2200
|
return [];
|
|
2357
2201
|
}
|
|
2358
2202
|
}
|
|
2359
|
-
const
|
|
2360
|
-
default: () => new
|
|
2361
|
-
fade: () => new
|
|
2203
|
+
const zo = {
|
|
2204
|
+
default: () => new jt(),
|
|
2205
|
+
fade: () => new No()
|
|
2362
2206
|
};
|
|
2363
|
-
function
|
|
2364
|
-
return
|
|
2207
|
+
function Vo(t) {
|
|
2208
|
+
return zo[t]();
|
|
2365
2209
|
}
|
|
2366
|
-
class
|
|
2210
|
+
class Uo extends jt {
|
|
2367
2211
|
}
|
|
2368
|
-
function
|
|
2369
|
-
const
|
|
2212
|
+
function Xo(t) {
|
|
2213
|
+
const e = Yo(t.type);
|
|
2370
2214
|
return { strategies: [
|
|
2371
|
-
new
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
new
|
|
2215
|
+
new Ho(),
|
|
2216
|
+
e,
|
|
2217
|
+
Vo(t.variant),
|
|
2218
|
+
new Uo(),
|
|
2375
2219
|
// Overlay is intrinsically tied to backdrop-filter-driven types. Today
|
|
2376
2220
|
// that's only `blur`; the table-driven factory above owns the mapping
|
|
2377
2221
|
// so this conditional is the single line that knows the relationship.
|
|
2378
|
-
...
|
|
2379
|
-
], physics:
|
|
2222
|
+
...t.type === "blur" ? [new Ao()] : []
|
|
2223
|
+
], physics: e.physics };
|
|
2380
2224
|
}
|
|
2381
|
-
const
|
|
2382
|
-
const { strategies:
|
|
2225
|
+
const Bo = (t) => {
|
|
2226
|
+
const { strategies: e, physics: n } = Xo(t);
|
|
2383
2227
|
return {
|
|
2384
|
-
prepare: (
|
|
2385
|
-
const
|
|
2386
|
-
from:
|
|
2387
|
-
to:
|
|
2388
|
-
context: { positionedParent:
|
|
2228
|
+
prepare: (o) => {
|
|
2229
|
+
const s = {
|
|
2230
|
+
from: o.from,
|
|
2231
|
+
to: o.to,
|
|
2232
|
+
context: { positionedParent: o.context.positionedParent },
|
|
2389
2233
|
// `createElement` from the dispatcher is generic over tag; the
|
|
2390
2234
|
// strategy interface narrows the cast to keep both signatures
|
|
2391
2235
|
// compatible.
|
|
2392
|
-
createElement:
|
|
2393
|
-
},
|
|
2394
|
-
for (const
|
|
2395
|
-
if (!
|
|
2396
|
-
const l =
|
|
2397
|
-
l && Object.assign(
|
|
2236
|
+
createElement: o.createElement
|
|
2237
|
+
}, r = {};
|
|
2238
|
+
for (const i of e) {
|
|
2239
|
+
if (!i.prepare) continue;
|
|
2240
|
+
const l = i.prepare(s);
|
|
2241
|
+
l && Object.assign(r, l);
|
|
2398
2242
|
}
|
|
2399
|
-
return
|
|
2243
|
+
return r;
|
|
2400
2244
|
},
|
|
2401
|
-
animation: ({ from:
|
|
2402
|
-
const l =
|
|
2245
|
+
animation: ({ from: o, to: s, context: r, ...i }) => {
|
|
2246
|
+
const l = ko(o, s, r.direction);
|
|
2403
2247
|
if (!l)
|
|
2404
|
-
return new
|
|
2405
|
-
const c =
|
|
2406
|
-
from:
|
|
2407
|
-
to:
|
|
2248
|
+
return new E([], { mode: "parallel" });
|
|
2249
|
+
const c = Lo(l, o, s, r.scrollOffset), a = [], u = {
|
|
2250
|
+
from: o,
|
|
2251
|
+
to: s,
|
|
2408
2252
|
resolved: l,
|
|
2409
2253
|
input: c,
|
|
2410
2254
|
physics: n,
|
|
2411
|
-
context:
|
|
2412
|
-
extras:
|
|
2255
|
+
context: r,
|
|
2256
|
+
extras: i,
|
|
2413
2257
|
onComplete: (f) => {
|
|
2414
2258
|
a.push(f);
|
|
2415
2259
|
}
|
|
2416
|
-
},
|
|
2417
|
-
for (const f of
|
|
2418
|
-
f.contribute &&
|
|
2419
|
-
const
|
|
2420
|
-
if (
|
|
2421
|
-
const f =
|
|
2422
|
-
|
|
2260
|
+
}, d = [];
|
|
2261
|
+
for (const f of e)
|
|
2262
|
+
f.contribute && d.push(...f.contribute(u));
|
|
2263
|
+
const y = d[0];
|
|
2264
|
+
if (y) {
|
|
2265
|
+
const f = y.onComplete;
|
|
2266
|
+
y.onComplete = () => {
|
|
2423
2267
|
f == null || f();
|
|
2424
|
-
for (const
|
|
2268
|
+
for (const h of a)
|
|
2425
2269
|
try {
|
|
2426
|
-
|
|
2427
|
-
} catch (
|
|
2428
|
-
console.error("[zoom] cleanup error",
|
|
2270
|
+
h();
|
|
2271
|
+
} catch (g) {
|
|
2272
|
+
console.error("[zoom] cleanup error", g);
|
|
2429
2273
|
}
|
|
2430
2274
|
};
|
|
2431
2275
|
}
|
|
2432
|
-
for (const f of
|
|
2433
|
-
if (!(f instanceof
|
|
2434
|
-
const
|
|
2276
|
+
for (const f of d) {
|
|
2277
|
+
if (!(f instanceof m)) continue;
|
|
2278
|
+
const h = f.onComplete;
|
|
2435
2279
|
f.onComplete = () => {
|
|
2436
|
-
|
|
2280
|
+
h == null || h(), f.releaseFill();
|
|
2437
2281
|
};
|
|
2438
2282
|
}
|
|
2439
|
-
return new
|
|
2283
|
+
return new E(d, { mode: "parallel" });
|
|
2440
2284
|
}
|
|
2441
2285
|
};
|
|
2442
2286
|
};
|
|
2443
|
-
function
|
|
2444
|
-
const
|
|
2445
|
-
return { type:
|
|
2287
|
+
function Wo(t) {
|
|
2288
|
+
const e = t.type ?? "static", n = t.variant ?? (t.fade ? "fade" : "default");
|
|
2289
|
+
return { type: e, variant: n };
|
|
2446
2290
|
}
|
|
2447
|
-
function
|
|
2448
|
-
const
|
|
2449
|
-
return
|
|
2291
|
+
function ps(t = {}) {
|
|
2292
|
+
const e = Wo(t);
|
|
2293
|
+
return Bo(e);
|
|
2450
2294
|
}
|
|
2451
2295
|
export {
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2296
|
+
fs as Animation,
|
|
2297
|
+
E as MultiAnimation,
|
|
2298
|
+
m as WebAnimation,
|
|
2299
|
+
Jo as axis,
|
|
2300
|
+
Qo as blind,
|
|
2301
|
+
ts as drill,
|
|
2302
|
+
es as fade,
|
|
2303
|
+
ns as film,
|
|
2304
|
+
os as hero,
|
|
2305
|
+
ss as jaemin,
|
|
2306
|
+
is as rotate,
|
|
2307
|
+
rs as scroll,
|
|
2308
|
+
as as sheet,
|
|
2309
|
+
ls as slide,
|
|
2310
|
+
cs as strip,
|
|
2311
|
+
ps as zoom
|
|
2468
2312
|
};
|