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