@ssgoi/core 3.5.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animator/integrator/double-spring-integrator.d.ts +31 -0
- package/dist/animator/integrator/double-spring-integrator.d.ts.map +1 -0
- package/dist/animator/integrator/index.d.ts +13 -0
- package/dist/animator/integrator/index.d.ts.map +1 -0
- package/dist/animator/integrator/inertia-integrator.d.ts +34 -0
- package/dist/animator/integrator/inertia-integrator.d.ts.map +1 -0
- package/dist/animator/integrator/provider.d.ts +22 -0
- package/dist/animator/integrator/provider.d.ts.map +1 -0
- package/dist/animator/integrator/spring-integrator.d.ts +19 -0
- package/dist/animator/integrator/spring-integrator.d.ts.map +1 -0
- package/dist/animator/integrator/types.d.ts +34 -0
- package/dist/animator/integrator/types.d.ts.map +1 -0
- package/dist/animator/multi-animator.d.ts +18 -13
- package/dist/animator/multi-animator.d.ts.map +1 -1
- package/dist/animator/{animate → runner}/css-runner.d.ts +2 -2
- package/dist/animator/runner/css-runner.d.ts.map +1 -0
- package/dist/animator/runner/provider.d.ts +35 -0
- package/dist/animator/runner/provider.d.ts.map +1 -0
- package/dist/animator/{animate → runner}/tick-runner.d.ts +2 -2
- package/dist/animator/runner/tick-runner.d.ts.map +1 -0
- package/dist/animator/runner/ticker.d.ts.map +1 -0
- package/dist/animator/{animate → runner}/types.d.ts +6 -3
- package/dist/animator/runner/types.d.ts.map +1 -0
- package/dist/animator/{index.d.ts → single-animator.d.ts} +22 -12
- package/dist/animator/single-animator.d.ts.map +1 -0
- package/dist/animator/{animation.d.ts → types.d.ts} +2 -2
- package/dist/animator/types.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +552 -569
- package/dist/provider-Cs5iBqRD.cjs +1 -0
- package/dist/provider-Cu4NSF1Q.js +167 -0
- package/dist/transition/create-transition-callback.d.ts.map +1 -1
- package/dist/transition/transition-strategy.d.ts +8 -8
- package/dist/transition/transition-strategy.d.ts.map +1 -1
- package/dist/transitions/blur.d.ts +4 -4
- package/dist/transitions/blur.d.ts.map +1 -1
- package/dist/transitions/bounce.d.ts +4 -4
- package/dist/transitions/bounce.d.ts.map +1 -1
- package/dist/transitions/fade.d.ts +4 -4
- package/dist/transitions/fade.d.ts.map +1 -1
- package/dist/transitions/index.cjs +1 -1
- package/dist/transitions/index.d.ts +5 -0
- package/dist/transitions/index.d.ts.map +1 -1
- package/dist/transitions/index.js +141 -191
- package/dist/transitions/rotate.d.ts +4 -4
- package/dist/transitions/rotate.d.ts.map +1 -1
- package/dist/transitions/scale.d.ts +4 -4
- package/dist/transitions/scale.d.ts.map +1 -1
- package/dist/transitions/slide.d.ts +4 -4
- package/dist/transitions/slide.d.ts.map +1 -1
- package/dist/transitions/utils.d.ts +8 -0
- package/dist/transitions/utils.d.ts.map +1 -0
- package/dist/types.cjs +1 -1
- package/dist/types.d.ts +124 -38
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +41 -48
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/wait-paint.d.ts +15 -0
- package/dist/utils/wait-paint.d.ts.map +1 -0
- package/dist/view-transitions/blind.d.ts +2 -3
- package/dist/view-transitions/blind.d.ts.map +1 -1
- package/dist/view-transitions/curtain-reveal.d.ts +2 -3
- package/dist/view-transitions/curtain-reveal.d.ts.map +1 -1
- package/dist/view-transitions/depth.d.ts +2 -2
- package/dist/view-transitions/depth.d.ts.map +1 -1
- package/dist/view-transitions/drill.d.ts +2 -2
- package/dist/view-transitions/drill.d.ts.map +1 -1
- package/dist/view-transitions/fade.d.ts +2 -3
- package/dist/view-transitions/fade.d.ts.map +1 -1
- package/dist/view-transitions/film.d.ts +2 -1
- package/dist/view-transitions/film.d.ts.map +1 -1
- package/dist/view-transitions/hero.d.ts +2 -2
- package/dist/view-transitions/hero.d.ts.map +1 -1
- package/dist/view-transitions/index.cjs +19 -19
- package/dist/view-transitions/index.d.ts +1 -0
- package/dist/view-transitions/index.d.ts.map +1 -1
- package/dist/view-transitions/index.js +874 -869
- package/dist/view-transitions/instagram.d.ts +2 -2
- package/dist/view-transitions/instagram.d.ts.map +1 -1
- package/dist/view-transitions/jaemin.d.ts +2 -2
- package/dist/view-transitions/jaemin.d.ts.map +1 -1
- package/dist/view-transitions/pinterest.d.ts +2 -2
- package/dist/view-transitions/pinterest.d.ts.map +1 -1
- package/dist/view-transitions/rotate.d.ts +5 -2
- package/dist/view-transitions/rotate.d.ts.map +1 -1
- package/dist/view-transitions/scroll.d.ts +2 -2
- package/dist/view-transitions/scroll.d.ts.map +1 -1
- package/dist/view-transitions/sheet.d.ts +2 -2
- package/dist/view-transitions/sheet.d.ts.map +1 -1
- package/dist/view-transitions/slide.d.ts +2 -2
- package/dist/view-transitions/slide.d.ts.map +1 -1
- package/dist/view-transitions/snap.d.ts +14 -0
- package/dist/view-transitions/snap.d.ts.map +1 -0
- package/dist/view-transitions/strip.d.ts +6 -2
- package/dist/view-transitions/strip.d.ts.map +1 -1
- package/dist/view-transitions/swap.d.ts +2 -2
- package/dist/view-transitions/swap.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/animator/animate/css-runner.d.ts.map +0 -1
- package/dist/animator/animate/index.d.ts +0 -42
- package/dist/animator/animate/index.d.ts.map +0 -1
- package/dist/animator/animate/tick-runner.d.ts.map +0 -1
- package/dist/animator/animate/types.d.ts.map +0 -1
- package/dist/animator/animation.d.ts.map +0 -1
- package/dist/animator/index.d.ts.map +0 -1
- package/dist/animator/spring-core.d.ts +0 -82
- package/dist/animator/spring-core.d.ts.map +0 -1
- package/dist/animator/ticker.d.ts.map +0 -1
- /package/dist/animator/{ticker.d.ts → runner/ticker.d.ts} +0 -0
|
@@ -1,44 +1,46 @@
|
|
|
1
|
-
const
|
|
2
|
-
var
|
|
3
|
-
t.style.position = "absolute", t.style.width = "100%", t.style.top = `${-1 * (((
|
|
4
|
-
},
|
|
5
|
-
function x(t,
|
|
6
|
-
function
|
|
7
|
-
let
|
|
8
|
-
const c =
|
|
9
|
-
let
|
|
10
|
-
for (;
|
|
11
|
-
|
|
12
|
-
return
|
|
1
|
+
const g = (t, i) => {
|
|
2
|
+
var l;
|
|
3
|
+
t.style.position = "absolute", t.style.width = "100%", t.style.top = `${-1 * (((l = i == null ? void 0 : i.scrollOffset) == null ? void 0 : l.y) ?? 0)}px`, t.style.left = "0";
|
|
4
|
+
}, F = (t) => new Promise((i) => setTimeout(i, t));
|
|
5
|
+
function x(t, i) {
|
|
6
|
+
function l(s) {
|
|
7
|
+
let r = 0, e = 0;
|
|
8
|
+
const c = s.offsetWidth, y = s.offsetHeight;
|
|
9
|
+
let o = s;
|
|
10
|
+
for (; o; )
|
|
11
|
+
r += o.offsetTop, e += o.offsetLeft, o = o.offsetParent;
|
|
12
|
+
return r -= window.scrollY, e -= window.scrollX, { top: r, left: e, width: c, height: y };
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const a = l(t), n = l(i);
|
|
15
15
|
return new DOMRect(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
n.left - a.left,
|
|
17
|
+
n.top - a.top,
|
|
18
|
+
n.width,
|
|
19
|
+
n.height
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
let t,
|
|
24
|
-
return { promise: new Promise((
|
|
25
|
-
t =
|
|
26
|
-
}), resolve: t, reject:
|
|
22
|
+
function E() {
|
|
23
|
+
let t, i;
|
|
24
|
+
return { promise: new Promise((a, n) => {
|
|
25
|
+
t = a, i = n;
|
|
26
|
+
}), resolve: t, reject: i };
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const W = {
|
|
29
|
+
spring: { stiffness: 200, damping: 22 }
|
|
30
|
+
}, M = {
|
|
31
|
+
spring: { stiffness: 200, damping: 22 }
|
|
32
|
+
}, B = 300, q = 10, j = "horizontal", N = "#000000", Wt = (t = {}) => {
|
|
29
33
|
const {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const l = document.createElement("div");
|
|
41
|
-
l.className = "blind-container", l.style.cssText = `
|
|
34
|
+
transitionDelay: i = B,
|
|
35
|
+
blindCount: l = q,
|
|
36
|
+
direction: a = j,
|
|
37
|
+
blindColor: n = N
|
|
38
|
+
} = t, s = t.physics ?? M, r = t.physics ?? W;
|
|
39
|
+
let e, c = null;
|
|
40
|
+
const y = (o, p, d = "left") => {
|
|
41
|
+
window.getComputedStyle(o).position === "static" && (o.style.position = "relative");
|
|
42
|
+
const f = document.createElement("div");
|
|
43
|
+
f.className = "blind-container", f.style.cssText = `
|
|
42
44
|
position: absolute;
|
|
43
45
|
top: 0;
|
|
44
46
|
left: 0;
|
|
@@ -48,67 +50,67 @@ const Q = { stiffness: 80, damping: 25 }, R = { stiffness: 75, damping: 25 }, tt
|
|
|
48
50
|
z-index: 9999;
|
|
49
51
|
overflow: hidden;
|
|
50
52
|
`;
|
|
51
|
-
const
|
|
52
|
-
for (let
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
const
|
|
56
|
-
|
|
53
|
+
const h = [];
|
|
54
|
+
for (let $ = 0; $ < l; $++) {
|
|
55
|
+
const w = document.createElement("div");
|
|
56
|
+
if (a === "horizontal") {
|
|
57
|
+
const b = 100 / l, C = `calc(${b}% + 1px)`;
|
|
58
|
+
w.style.cssText = `
|
|
57
59
|
position: absolute;
|
|
58
|
-
top: ${
|
|
60
|
+
top: ${b * $}%;
|
|
59
61
|
left: 0;
|
|
60
62
|
width: 100%;
|
|
61
|
-
height: ${
|
|
62
|
-
background: ${
|
|
63
|
-
transform: scaleX(${
|
|
64
|
-
transform-origin: ${
|
|
63
|
+
height: ${C};
|
|
64
|
+
background: ${n};
|
|
65
|
+
transform: scaleX(${p === "hidden" ? 0 : 1});
|
|
66
|
+
transform-origin: ${d} center;
|
|
65
67
|
will-change: transform;
|
|
66
68
|
`;
|
|
67
69
|
} else {
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
+
const b = 100 / l, C = `calc(${b}% + 1px)`;
|
|
71
|
+
w.style.cssText = `
|
|
70
72
|
position: absolute;
|
|
71
73
|
top: 0;
|
|
72
|
-
left: ${
|
|
73
|
-
width: ${
|
|
74
|
+
left: ${b * $}%;
|
|
75
|
+
width: ${C};
|
|
74
76
|
height: 100%;
|
|
75
|
-
background: ${
|
|
76
|
-
transform: scaleY(${
|
|
77
|
-
transform-origin: ${
|
|
77
|
+
background: ${n};
|
|
78
|
+
transform: scaleY(${p === "hidden" ? 0 : 1});
|
|
79
|
+
transform-origin: ${d === "left" ? "top" : "bottom"} center;
|
|
78
80
|
will-change: transform;
|
|
79
81
|
`;
|
|
80
82
|
}
|
|
81
|
-
|
|
83
|
+
h.push(w), f.appendChild(w);
|
|
82
84
|
}
|
|
83
|
-
return
|
|
85
|
+
return o.appendChild(f), { container: f, blinds: h };
|
|
84
86
|
};
|
|
85
87
|
return {
|
|
86
|
-
out: () => {
|
|
87
|
-
let
|
|
88
|
-
|
|
89
|
-
c =
|
|
88
|
+
out: (o) => {
|
|
89
|
+
let p = null;
|
|
90
|
+
e = new Promise((f) => {
|
|
91
|
+
c = f;
|
|
90
92
|
});
|
|
91
|
-
const
|
|
92
|
-
const
|
|
93
|
+
const d = (f) => {
|
|
94
|
+
const h = 1 - f;
|
|
93
95
|
return {
|
|
94
|
-
transform:
|
|
96
|
+
transform: a === "horizontal" ? `scaleX(${h})` : `scaleY(${h})`
|
|
95
97
|
};
|
|
96
98
|
};
|
|
97
99
|
return {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
items: Array.from({ length: l }, (f, h) => ({
|
|
101
|
+
physics: r,
|
|
100
102
|
offset: 0.2,
|
|
101
103
|
css: {
|
|
102
104
|
// Use getter for lazy element access (evaluated after prepare)
|
|
103
105
|
get element() {
|
|
104
|
-
return
|
|
106
|
+
return p == null ? void 0 : p.blinds[h];
|
|
105
107
|
},
|
|
106
|
-
style:
|
|
108
|
+
style: d
|
|
107
109
|
}
|
|
108
110
|
})),
|
|
109
111
|
schedule: "stagger",
|
|
110
|
-
prepare: (
|
|
111
|
-
|
|
112
|
+
prepare: () => {
|
|
113
|
+
g(o), o.style.zIndex = "1000", p = y(o, "hidden", "left");
|
|
112
114
|
},
|
|
113
115
|
onStart: () => {
|
|
114
116
|
},
|
|
@@ -117,42 +119,46 @@ const Q = { stiffness: 80, damping: 25 }, R = { stiffness: 75, damping: 25 }, tt
|
|
|
117
119
|
}
|
|
118
120
|
};
|
|
119
121
|
},
|
|
120
|
-
in: () => {
|
|
121
|
-
let
|
|
122
|
-
const
|
|
123
|
-
const
|
|
122
|
+
in: (o) => {
|
|
123
|
+
let p = null;
|
|
124
|
+
const d = (f) => {
|
|
125
|
+
const h = 1 - f;
|
|
124
126
|
return {
|
|
125
|
-
transform:
|
|
127
|
+
transform: a === "horizontal" ? `scaleX(${h})` : `scaleY(${h})`
|
|
126
128
|
};
|
|
127
129
|
};
|
|
128
130
|
return {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
+
items: Array.from({ length: l }, (f, h) => ({
|
|
132
|
+
physics: s,
|
|
131
133
|
offset: 0.2,
|
|
132
134
|
css: {
|
|
133
135
|
// Use getter for lazy element access (evaluated after prepare)
|
|
134
136
|
get element() {
|
|
135
|
-
return
|
|
137
|
+
return p == null ? void 0 : p.blinds[h];
|
|
136
138
|
},
|
|
137
|
-
style:
|
|
139
|
+
style: d
|
|
138
140
|
}
|
|
139
141
|
})),
|
|
140
142
|
schedule: "stagger",
|
|
141
|
-
prepare: (
|
|
142
|
-
|
|
143
|
+
prepare: () => {
|
|
144
|
+
o.style.position = "relative", o.style.zIndex = "0", p = y(o, "closed", "right");
|
|
143
145
|
},
|
|
144
146
|
onStart: () => {
|
|
145
147
|
},
|
|
146
148
|
wait: async () => {
|
|
147
|
-
|
|
149
|
+
e && await e, await F(i);
|
|
148
150
|
},
|
|
149
151
|
onEnd: () => {
|
|
150
|
-
|
|
152
|
+
p && p.container && p.container.remove();
|
|
151
153
|
}
|
|
152
154
|
};
|
|
153
155
|
}
|
|
154
156
|
};
|
|
155
|
-
},
|
|
157
|
+
}, G = {
|
|
158
|
+
spring: { stiffness: 1, damping: 1 }
|
|
159
|
+
}, Z = {
|
|
160
|
+
spring: { stiffness: 20, damping: 25 }
|
|
161
|
+
}, J = "#000000", K = "circle", m = "CURTAIN_REVEAL_OVERLAY_ID", Q = {
|
|
156
162
|
position: "fixed",
|
|
157
163
|
inset: "0",
|
|
158
164
|
width: "100vw",
|
|
@@ -162,17 +168,17 @@ const Q = { stiffness: 80, damping: 25 }, R = { stiffness: 75, damping: 25 }, tt
|
|
|
162
168
|
alignItems: "center",
|
|
163
169
|
justifyContent: "center",
|
|
164
170
|
overflow: "hidden"
|
|
165
|
-
},
|
|
171
|
+
}, R = {
|
|
166
172
|
position: "relative",
|
|
167
173
|
display: "inline-block",
|
|
168
174
|
height: "5.5rem",
|
|
169
175
|
overflow: "hidden"
|
|
170
|
-
},
|
|
176
|
+
}, tt = {
|
|
171
177
|
display: "flex",
|
|
172
178
|
height: "100%",
|
|
173
179
|
willChange: "transform",
|
|
174
180
|
transition: "transform 0.3s ease"
|
|
175
|
-
},
|
|
181
|
+
}, st = {
|
|
176
182
|
display: "inline-flex",
|
|
177
183
|
alignItems: "center",
|
|
178
184
|
justifyContent: "center",
|
|
@@ -181,1316 +187,1315 @@ const Q = { stiffness: 80, damping: 25 }, R = { stiffness: 75, damping: 25 }, tt
|
|
|
181
187
|
fontWeight: "900",
|
|
182
188
|
letterSpacing: "0.02em",
|
|
183
189
|
color: "#FFFFFF"
|
|
184
|
-
},
|
|
185
|
-
function
|
|
190
|
+
}, it = 0.4, A = 0.5, nt = 0.2;
|
|
191
|
+
function et(t, i) {
|
|
186
192
|
switch (t) {
|
|
187
193
|
case "circle":
|
|
188
|
-
return `circle(${
|
|
194
|
+
return `circle(${i * 100}% at 50% 50%)`;
|
|
189
195
|
case "square":
|
|
190
|
-
return `inset(${(1 -
|
|
196
|
+
return `inset(${(1 - i) * 50}% round ${10 * i}%)`;
|
|
191
197
|
case "triangle": {
|
|
192
|
-
const
|
|
193
|
-
return `polygon(50% ${50 -
|
|
198
|
+
const l = i * 100;
|
|
199
|
+
return `polygon(50% ${50 - l}%, ${50 - l}% ${50 + l}%, ${50 + l}% ${50 + l}%)`;
|
|
194
200
|
}
|
|
195
201
|
}
|
|
196
202
|
}
|
|
197
|
-
const
|
|
203
|
+
const rt = (t) => t.reduce((i, l) => i + l, 0), Mt = (t = {}) => {
|
|
198
204
|
const {
|
|
199
|
-
background:
|
|
200
|
-
texts:
|
|
201
|
-
shape:
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
textStyle: d = {}
|
|
205
|
-
} = t;
|
|
205
|
+
background: i = J,
|
|
206
|
+
texts: l = [],
|
|
207
|
+
shape: a = K,
|
|
208
|
+
textStyle: n = {}
|
|
209
|
+
} = t, s = t.physics ?? Z, r = t.physics ?? G;
|
|
206
210
|
return {
|
|
207
|
-
out: (
|
|
208
|
-
const
|
|
211
|
+
out: (e, c) => {
|
|
212
|
+
const y = e.style.opacity;
|
|
209
213
|
return {
|
|
210
|
-
|
|
214
|
+
physics: r,
|
|
211
215
|
from: 1,
|
|
212
216
|
to: 0,
|
|
213
|
-
prepare: (
|
|
214
|
-
|
|
217
|
+
prepare: () => {
|
|
218
|
+
g(e, c), e.style.opacity = "1";
|
|
215
219
|
},
|
|
216
|
-
tick: (
|
|
217
|
-
const
|
|
218
|
-
|
|
220
|
+
tick: (o) => {
|
|
221
|
+
const p = Math.max(0, o - it);
|
|
222
|
+
e.style.opacity = String(p);
|
|
219
223
|
},
|
|
220
224
|
onEnd: () => {
|
|
221
|
-
|
|
225
|
+
e.style.opacity = y;
|
|
222
226
|
}
|
|
223
227
|
};
|
|
224
228
|
},
|
|
225
|
-
in: (
|
|
226
|
-
let c = null,
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
+
in: (e) => {
|
|
230
|
+
let c = null, y = null, o = null;
|
|
231
|
+
const p = document.body.style.overflow, d = document.getElementById(
|
|
232
|
+
m
|
|
229
233
|
);
|
|
230
|
-
let
|
|
231
|
-
const
|
|
232
|
-
c = document.createElement("div"), c.id =
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
}),
|
|
236
|
-
(
|
|
234
|
+
let u = [];
|
|
235
|
+
const f = () => {
|
|
236
|
+
c = document.createElement("div"), c.id = m, Object.assign(c.style, Q, { background: i }), document.body.appendChild(c), y = document.createElement("div"), Object.assign(y.style, R), c.appendChild(y), o = document.createElement("div"), Object.assign(o.style, tt), y.appendChild(o), l.forEach((h) => {
|
|
237
|
+
const $ = document.createElement("div");
|
|
238
|
+
$.textContent = h, Object.assign($.style, st, n), o.appendChild($);
|
|
239
|
+
}), u = Array.from(o.children).map(
|
|
240
|
+
(h) => h.getBoundingClientRect().width
|
|
237
241
|
);
|
|
238
242
|
};
|
|
239
243
|
return {
|
|
240
|
-
|
|
244
|
+
physics: s,
|
|
241
245
|
from: 0,
|
|
242
246
|
to: 1,
|
|
243
247
|
prepare: () => {
|
|
244
|
-
document.body.style.overflow = "hidden",
|
|
248
|
+
document.body.style.overflow = "hidden", e.style.opacity = "1", d == null || d.remove(), f(), c && y && (c.style.clipPath = "none", y.style.transform = "scale(1)");
|
|
245
249
|
},
|
|
246
|
-
tick: (
|
|
247
|
-
if (!(!c || !
|
|
248
|
-
if (
|
|
249
|
-
const
|
|
250
|
-
Math.floor(
|
|
251
|
-
|
|
252
|
-
),
|
|
253
|
-
|
|
250
|
+
tick: (h) => {
|
|
251
|
+
if (!(!c || !y || !o)) {
|
|
252
|
+
if (h <= A && l.length > 0) {
|
|
253
|
+
const $ = h / A, w = Math.min(
|
|
254
|
+
Math.floor($ * l.length),
|
|
255
|
+
l.length - 1
|
|
256
|
+
), b = u[w] ?? 0, C = rt(u.slice(0, w));
|
|
257
|
+
y.style.width = `${b}px`, o.style.transform = `translateX(-${C}px)`;
|
|
254
258
|
}
|
|
255
|
-
if (
|
|
256
|
-
const
|
|
259
|
+
if (h > A) {
|
|
260
|
+
const w = 1 - Math.max(
|
|
257
261
|
0,
|
|
258
|
-
Math.min(1, (
|
|
262
|
+
Math.min(1, (h - A) / nt)
|
|
259
263
|
);
|
|
260
|
-
c.style.clipPath =
|
|
264
|
+
c.style.clipPath = et(a, w), y.style.transform = `scale(${w})`;
|
|
261
265
|
}
|
|
262
266
|
}
|
|
263
267
|
},
|
|
264
268
|
onEnd: () => {
|
|
265
|
-
c == null || c.remove(), c =
|
|
269
|
+
c == null || c.remove(), c = y = o = null, document.body.style.overflow = p;
|
|
266
270
|
}
|
|
267
271
|
};
|
|
268
272
|
}
|
|
269
273
|
};
|
|
270
|
-
},
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
274
|
+
}, at = {
|
|
275
|
+
spring: {
|
|
276
|
+
stiffness: 600,
|
|
277
|
+
damping: 40,
|
|
278
|
+
restDelta: 0.1,
|
|
279
|
+
restSpeed: 1e14
|
|
280
|
+
}
|
|
281
|
+
}, ot = {
|
|
282
|
+
spring: {
|
|
283
|
+
stiffness: 600,
|
|
284
|
+
damping: 40,
|
|
285
|
+
restDelta: 0.1,
|
|
286
|
+
restSpeed: 1e14
|
|
287
|
+
}
|
|
288
|
+
}, O = 0.05;
|
|
289
|
+
function T(t) {
|
|
290
|
+
const i = x(document.body, t.positionedParent), l = t.scroll.y, a = window.innerHeight - i.top;
|
|
281
291
|
return {
|
|
282
|
-
top:
|
|
292
|
+
top: l,
|
|
283
293
|
left: 0,
|
|
284
|
-
width:
|
|
285
|
-
height:
|
|
294
|
+
width: i.width,
|
|
295
|
+
height: a
|
|
286
296
|
};
|
|
287
297
|
}
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
damping: ((s = t.spring) == null ? void 0 : s.damping) ?? r.damping,
|
|
293
|
-
doubleSpring: ((c = t.spring) == null ? void 0 : c.doubleSpring) ?? r.doubleSpring
|
|
294
|
-
};
|
|
295
|
-
let { promise: a, resolve: o } = S();
|
|
296
|
-
return n === "enter" ? {
|
|
298
|
+
const Bt = (t = {}) => {
|
|
299
|
+
const { direction: i = "enter" } = t, l = t.physics ?? (i === "enter" ? at : ot);
|
|
300
|
+
let { promise: a, resolve: n } = E();
|
|
301
|
+
return i === "enter" ? {
|
|
297
302
|
// Entering page: scales up from small (0.8 → 1) with fade in
|
|
298
|
-
in: (
|
|
299
|
-
const
|
|
303
|
+
in: (s, r) => {
|
|
304
|
+
const e = T(r), c = e.left + e.width / 2, y = e.top + e.height / 2;
|
|
300
305
|
return {
|
|
301
|
-
|
|
306
|
+
physics: l,
|
|
302
307
|
prepare: () => {
|
|
303
|
-
|
|
308
|
+
s.style.opacity = "0", s.style.willChange = "transform, opacity", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.transformOrigin = `${c}px ${y}px`;
|
|
304
309
|
},
|
|
305
310
|
wait: async () => {
|
|
306
311
|
if (a) {
|
|
307
312
|
await a;
|
|
308
|
-
const
|
|
309
|
-
a =
|
|
313
|
+
const o = E();
|
|
314
|
+
a = o.promise, n = o.resolve;
|
|
310
315
|
}
|
|
311
316
|
},
|
|
312
|
-
css: (
|
|
313
|
-
transform: `scale(${1 -
|
|
314
|
-
opacity:
|
|
317
|
+
css: (o) => ({
|
|
318
|
+
transform: `scale(${1 - O + o * O})`,
|
|
319
|
+
opacity: o
|
|
315
320
|
}),
|
|
316
321
|
onEnd: () => {
|
|
317
|
-
|
|
322
|
+
s.style.opacity = "1", s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "", s.style.transformOrigin = "";
|
|
318
323
|
}
|
|
319
324
|
};
|
|
320
325
|
},
|
|
321
326
|
// Exiting page: scales up (1 → 1.2) with fade out, goes to back
|
|
322
|
-
out: (
|
|
323
|
-
const
|
|
327
|
+
out: (s, r) => {
|
|
328
|
+
const e = T(r), c = e.left + e.width / 2, y = e.top + e.height / 2 + r.scrollOffset.y;
|
|
324
329
|
return {
|
|
325
|
-
|
|
326
|
-
prepare: (
|
|
327
|
-
|
|
330
|
+
physics: l,
|
|
331
|
+
prepare: () => {
|
|
332
|
+
g(s, r), s.style.zIndex = "-1", s.style.willChange = "transform, opacity", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.pointerEvents = "none", s.style.transformOrigin = `${c}px ${y}px`;
|
|
328
333
|
},
|
|
329
|
-
css: (
|
|
330
|
-
transform: `scale(${1 + (1 -
|
|
331
|
-
opacity:
|
|
334
|
+
css: (o) => ({
|
|
335
|
+
transform: `scale(${1 + (1 - o) * O})`,
|
|
336
|
+
opacity: o
|
|
332
337
|
}),
|
|
333
338
|
onEnd: () => {
|
|
334
|
-
|
|
339
|
+
n && n();
|
|
335
340
|
}
|
|
336
341
|
};
|
|
337
342
|
}
|
|
338
343
|
} : {
|
|
339
344
|
// Entering page: scales down from large (1.2 → 1) with fade in
|
|
340
|
-
in: (
|
|
341
|
-
const
|
|
345
|
+
in: (s, r) => {
|
|
346
|
+
const e = T(r), c = e.left + e.width / 2, y = e.top + e.height / 2;
|
|
342
347
|
return {
|
|
343
|
-
|
|
348
|
+
physics: l,
|
|
344
349
|
prepare: () => {
|
|
345
|
-
|
|
350
|
+
s.style.opacity = "0", s.style.willChange = "transform, opacity", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.transformOrigin = `${c}px ${y}px`;
|
|
346
351
|
},
|
|
347
352
|
wait: async () => {
|
|
348
353
|
if (a) {
|
|
349
354
|
await a;
|
|
350
|
-
const
|
|
351
|
-
a =
|
|
355
|
+
const o = E();
|
|
356
|
+
a = o.promise, n = o.resolve;
|
|
352
357
|
}
|
|
353
358
|
},
|
|
354
|
-
css: (
|
|
355
|
-
transform: `scale(${1 +
|
|
356
|
-
opacity:
|
|
359
|
+
css: (o) => ({
|
|
360
|
+
transform: `scale(${1 + O - o * O})`,
|
|
361
|
+
opacity: o
|
|
357
362
|
}),
|
|
358
363
|
onEnd: () => {
|
|
359
|
-
|
|
364
|
+
s.style.opacity = "1", s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "", s.style.transformOrigin = "";
|
|
360
365
|
}
|
|
361
366
|
};
|
|
362
367
|
},
|
|
363
368
|
// Exiting page: scales down to small (1 → 0.8) with fade out
|
|
364
|
-
out: (
|
|
365
|
-
const
|
|
369
|
+
out: (s, r) => {
|
|
370
|
+
const e = T(r), c = e.left + e.width / 2, y = e.top + e.height / 2 + r.scrollOffset.y;
|
|
366
371
|
return {
|
|
367
|
-
|
|
368
|
-
prepare: (
|
|
369
|
-
|
|
372
|
+
physics: l,
|
|
373
|
+
prepare: () => {
|
|
374
|
+
g(s, r), s.style.zIndex = "100", s.style.willChange = "transform, opacity", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.pointerEvents = "none", s.style.transformOrigin = `${c}px ${y}px`;
|
|
370
375
|
},
|
|
371
|
-
css: (
|
|
372
|
-
transform: `scale(${1 - (1 -
|
|
373
|
-
opacity:
|
|
376
|
+
css: (o) => ({
|
|
377
|
+
transform: `scale(${1 - (1 - o) * O})`,
|
|
378
|
+
opacity: o
|
|
374
379
|
}),
|
|
375
380
|
onEnd: () => {
|
|
376
|
-
|
|
381
|
+
n && n();
|
|
377
382
|
}
|
|
378
383
|
};
|
|
379
384
|
}
|
|
380
385
|
};
|
|
381
|
-
},
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
return r === "enter" ? {
|
|
397
|
-
in: (c) => ({
|
|
398
|
-
spring: a,
|
|
386
|
+
}, lt = {
|
|
387
|
+
spring: {
|
|
388
|
+
stiffness: 170,
|
|
389
|
+
damping: 22
|
|
390
|
+
}
|
|
391
|
+
}, ct = {
|
|
392
|
+
spring: {
|
|
393
|
+
stiffness: 170,
|
|
394
|
+
damping: 22
|
|
395
|
+
}
|
|
396
|
+
}, qt = (t = {}) => {
|
|
397
|
+
const { opacity: i = !1, direction: l = "enter" } = t, a = t.physics ?? (l === "enter" ? lt : ct);
|
|
398
|
+
return l === "enter" ? {
|
|
399
|
+
in: (n) => ({
|
|
400
|
+
physics: a,
|
|
399
401
|
prepare: () => {
|
|
400
|
-
|
|
402
|
+
n.style.willChange = i ? "transform, opacity" : "transform", n.style.backfaceVisibility = "hidden", n.style.contain = "layout paint";
|
|
401
403
|
},
|
|
402
|
-
css: (
|
|
403
|
-
const
|
|
404
|
-
transform: `translate3d(${(1 -
|
|
404
|
+
css: (s) => {
|
|
405
|
+
const r = {
|
|
406
|
+
transform: `translate3d(${(1 - s) * 100}%, 0, 0)`
|
|
405
407
|
};
|
|
406
|
-
return
|
|
408
|
+
return i && (r.opacity = s), r;
|
|
407
409
|
},
|
|
408
410
|
onEnd: () => {
|
|
409
|
-
|
|
411
|
+
n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.contain = "";
|
|
410
412
|
}
|
|
411
413
|
}),
|
|
412
|
-
out: (
|
|
413
|
-
|
|
414
|
-
prepare: (
|
|
415
|
-
|
|
414
|
+
out: (n, s) => ({
|
|
415
|
+
physics: a,
|
|
416
|
+
prepare: () => {
|
|
417
|
+
g(n, s), n.style.zIndex = "-1", n.style.willChange = i ? "transform, opacity" : "transform", n.style.backfaceVisibility = "hidden", n.style.contain = "layout paint", n.style.pointerEvents = "none";
|
|
416
418
|
},
|
|
417
|
-
css: (
|
|
418
|
-
const
|
|
419
|
-
transform: `translate3d(${-(1 -
|
|
419
|
+
css: (r) => {
|
|
420
|
+
const e = {
|
|
421
|
+
transform: `translate3d(${-(1 - r) * 20}%, 0, 0)`
|
|
420
422
|
};
|
|
421
|
-
return
|
|
423
|
+
return i && (e.opacity = r), e;
|
|
422
424
|
}
|
|
423
425
|
})
|
|
424
426
|
} : {
|
|
425
|
-
in: (
|
|
426
|
-
|
|
427
|
+
in: (n) => ({
|
|
428
|
+
physics: a,
|
|
427
429
|
prepare: () => {
|
|
428
|
-
|
|
430
|
+
n.style.willChange = i ? "transform, opacity" : "transform", n.style.backfaceVisibility = "hidden", n.style.contain = "layout paint";
|
|
429
431
|
},
|
|
430
|
-
css: (
|
|
431
|
-
const
|
|
432
|
-
transform: `translate3d(${-(1 -
|
|
432
|
+
css: (s) => {
|
|
433
|
+
const r = {
|
|
434
|
+
transform: `translate3d(${-(1 - s) * 20}%, 0, 0)`
|
|
433
435
|
};
|
|
434
|
-
return
|
|
436
|
+
return i && (r.opacity = s), r;
|
|
435
437
|
},
|
|
436
438
|
onEnd: () => {
|
|
437
|
-
|
|
439
|
+
n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.contain = "";
|
|
438
440
|
}
|
|
439
441
|
}),
|
|
440
|
-
out: (
|
|
441
|
-
|
|
442
|
-
prepare: (
|
|
443
|
-
|
|
442
|
+
out: (n, s) => ({
|
|
443
|
+
physics: a,
|
|
444
|
+
prepare: () => {
|
|
445
|
+
g(n, s), n.style.zIndex = "100", n.style.willChange = i ? "transform, opacity" : "transform", n.style.backfaceVisibility = "hidden", n.style.contain = "layout paint", n.style.pointerEvents = "none";
|
|
444
446
|
},
|
|
445
|
-
css: (
|
|
446
|
-
const
|
|
447
|
-
transform: `translate3d(${(1 -
|
|
447
|
+
css: (r) => {
|
|
448
|
+
const e = {
|
|
449
|
+
transform: `translate3d(${(1 - r) * 100}%, 0, 0)`
|
|
448
450
|
};
|
|
449
|
-
return
|
|
451
|
+
return i && (e.opacity = r), e;
|
|
450
452
|
}
|
|
451
453
|
})
|
|
452
454
|
};
|
|
453
|
-
},
|
|
454
|
-
stiffness: 180,
|
|
455
|
-
|
|
456
|
-
doubleSpring: !0
|
|
457
|
-
},
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
doubleSpring: !0
|
|
461
|
-
}, Et = 0, Bt = (t = {}) => {
|
|
462
|
-
const {
|
|
463
|
-
inSpring: n = xt,
|
|
464
|
-
outSpring: r = mt,
|
|
465
|
-
transitionDelay: p = Et
|
|
466
|
-
} = t;
|
|
467
|
-
let { promise: a, resolve: o } = S();
|
|
455
|
+
}, yt = {
|
|
456
|
+
spring: { stiffness: 180, damping: 20, doubleSpring: !0 }
|
|
457
|
+
}, ht = {
|
|
458
|
+
spring: { stiffness: 170, damping: 20, doubleSpring: !0 }
|
|
459
|
+
}, pt = 0, jt = (t = {}) => {
|
|
460
|
+
const { transitionDelay: i = pt } = t, l = t.physics ?? ht, a = t.physics ?? yt;
|
|
461
|
+
let { promise: n, resolve: s } = E();
|
|
468
462
|
return {
|
|
469
|
-
in: (
|
|
470
|
-
|
|
463
|
+
in: (r) => ({
|
|
464
|
+
physics: l,
|
|
471
465
|
prepare: () => {
|
|
472
|
-
|
|
466
|
+
r.style.opacity = "0", r.style.willChange = "opacity";
|
|
473
467
|
},
|
|
474
468
|
wait: async () => {
|
|
475
|
-
if (
|
|
476
|
-
await
|
|
477
|
-
const
|
|
478
|
-
|
|
469
|
+
if (n) {
|
|
470
|
+
await n;
|
|
471
|
+
const e = E();
|
|
472
|
+
n = e.promise, s = e.resolve, await F(i);
|
|
479
473
|
}
|
|
480
474
|
},
|
|
481
|
-
css: (
|
|
482
|
-
opacity:
|
|
475
|
+
css: (e) => ({
|
|
476
|
+
opacity: e
|
|
483
477
|
}),
|
|
484
478
|
onEnd: () => {
|
|
485
|
-
|
|
479
|
+
r.style.willChange = "auto", r.style.opacity = "1";
|
|
486
480
|
}
|
|
487
481
|
}),
|
|
488
|
-
out: (
|
|
489
|
-
|
|
482
|
+
out: (r, e) => ({
|
|
483
|
+
physics: a,
|
|
490
484
|
css: (c) => ({
|
|
491
485
|
opacity: c
|
|
492
486
|
}),
|
|
493
487
|
prepare: () => {
|
|
494
|
-
|
|
488
|
+
g(r, e), r.style.willChange = "opacity";
|
|
495
489
|
},
|
|
496
490
|
onEnd: () => {
|
|
497
|
-
|
|
491
|
+
s && s(), r.style.willChange = "auto";
|
|
498
492
|
}
|
|
499
493
|
})
|
|
500
494
|
};
|
|
501
|
-
},
|
|
495
|
+
}, dt = {
|
|
502
496
|
scaleDown: { stiffness: 20, damping: 7 },
|
|
503
497
|
// Soft start for cinematic scale
|
|
504
498
|
translate: { stiffness: 15, damping: 7 },
|
|
505
499
|
// Medium for movement
|
|
506
500
|
scaleUp: { stiffness: 20, damping: 7 }
|
|
507
501
|
// Crisp return to full size
|
|
508
|
-
},
|
|
502
|
+
}, S = {
|
|
509
503
|
scaleDown: 0,
|
|
510
504
|
// Start immediately
|
|
511
505
|
translate: 0.2,
|
|
512
506
|
// Start when scaleDown is 25% complete
|
|
513
507
|
scaleUp: 0.8
|
|
514
508
|
// Start when translate is 70% complete
|
|
515
|
-
},
|
|
516
|
-
var
|
|
517
|
-
const
|
|
509
|
+
}, ut = 0.8, ft = "white", Nt = (t) => {
|
|
510
|
+
var n;
|
|
511
|
+
const i = dt, l = ut, a = ((n = t == null ? void 0 : t.border) == null ? void 0 : n.color) ?? ft;
|
|
518
512
|
return {
|
|
519
|
-
out: async (
|
|
520
|
-
const
|
|
521
|
-
...
|
|
513
|
+
out: async (s, r) => {
|
|
514
|
+
const e = I(r), c = x(document.body, r.positionedParent), y = wt(a, {
|
|
515
|
+
...e,
|
|
522
516
|
top: c.top
|
|
523
|
-
}),
|
|
517
|
+
}), o = {
|
|
524
518
|
scale: 1,
|
|
525
|
-
translateY: -
|
|
526
|
-
},
|
|
527
|
-
|
|
528
|
-
const
|
|
529
|
-
|
|
519
|
+
translateY: -e.top
|
|
520
|
+
}, p = () => {
|
|
521
|
+
s.style.transform = `translateY(${o.translateY}px) scale(${o.scale})`;
|
|
522
|
+
const d = (e.width - e.width * o.scale) / 2, u = (e.height - e.height * o.scale) / 2;
|
|
523
|
+
gt(y, d, u);
|
|
530
524
|
};
|
|
531
525
|
return {
|
|
532
|
-
|
|
526
|
+
items: [
|
|
533
527
|
// Spring 1: Scale Down (1 → scale)
|
|
534
528
|
{
|
|
535
|
-
spring:
|
|
536
|
-
offset:
|
|
537
|
-
tick: (
|
|
538
|
-
const
|
|
539
|
-
|
|
529
|
+
physics: (t == null ? void 0 : t.physics) ?? { spring: i.scaleDown },
|
|
530
|
+
offset: S.scaleDown,
|
|
531
|
+
tick: (d) => {
|
|
532
|
+
const u = 1 - d;
|
|
533
|
+
o.scale = 1 - (1 - l) * u, p();
|
|
540
534
|
}
|
|
541
535
|
},
|
|
542
536
|
// Spring 2: Translate (vertical movement)
|
|
543
537
|
{
|
|
544
|
-
spring:
|
|
545
|
-
offset:
|
|
546
|
-
tick: (
|
|
547
|
-
const
|
|
548
|
-
|
|
538
|
+
physics: (t == null ? void 0 : t.physics) ?? { spring: i.translate },
|
|
539
|
+
offset: S.translate,
|
|
540
|
+
tick: (d) => {
|
|
541
|
+
const u = 1 - d;
|
|
542
|
+
o.translateY = -e.top - e.height * u, p();
|
|
549
543
|
}
|
|
550
544
|
},
|
|
551
545
|
// Spring 3: Scale Up (scale → 1)
|
|
552
546
|
{
|
|
553
|
-
spring:
|
|
554
|
-
offset:
|
|
555
|
-
tick: (
|
|
556
|
-
const
|
|
557
|
-
|
|
547
|
+
physics: (t == null ? void 0 : t.physics) ?? { spring: i.scaleUp },
|
|
548
|
+
offset: S.scaleUp,
|
|
549
|
+
tick: (d) => {
|
|
550
|
+
const u = 1 - d;
|
|
551
|
+
o.scale = l + (1 - l) * u, p();
|
|
558
552
|
}
|
|
559
553
|
}
|
|
560
554
|
],
|
|
561
555
|
schedule: "stagger",
|
|
562
556
|
prepare: () => {
|
|
563
|
-
|
|
564
|
-
for (const
|
|
565
|
-
|
|
557
|
+
g(s), Y(s, e), _(s, e), $t(s, e);
|
|
558
|
+
for (const d of y)
|
|
559
|
+
r.positionedParent.appendChild(d);
|
|
566
560
|
},
|
|
567
561
|
onEnd: () => {
|
|
568
|
-
|
|
569
|
-
for (const
|
|
570
|
-
|
|
562
|
+
s.style.clipPath = "", s.style.transformOrigin = "", setTimeout(() => {
|
|
563
|
+
for (const d of y)
|
|
564
|
+
r.positionedParent.removeChild(d);
|
|
571
565
|
}, 1e3);
|
|
572
566
|
}
|
|
573
567
|
};
|
|
574
568
|
},
|
|
575
|
-
in: async (
|
|
576
|
-
const
|
|
577
|
-
scale:
|
|
578
|
-
translateY: -
|
|
579
|
-
},
|
|
580
|
-
|
|
569
|
+
in: async (s, r) => {
|
|
570
|
+
const e = I(r), c = {
|
|
571
|
+
scale: l,
|
|
572
|
+
translateY: -e.top + e.height
|
|
573
|
+
}, y = () => {
|
|
574
|
+
s.style.transform = `translateY(${c.translateY}px) scale(${c.scale})`;
|
|
581
575
|
};
|
|
582
576
|
return {
|
|
583
|
-
|
|
577
|
+
items: [
|
|
584
578
|
// Spring 1: Scale Down (1 → scale) - element starts scaled, shrinks further
|
|
585
579
|
{
|
|
586
|
-
spring:
|
|
587
|
-
offset:
|
|
588
|
-
tick: (
|
|
589
|
-
c.scale = 1 - (1 -
|
|
580
|
+
physics: (t == null ? void 0 : t.physics) ?? { spring: i.scaleDown },
|
|
581
|
+
offset: S.scaleDown,
|
|
582
|
+
tick: (o) => {
|
|
583
|
+
c.scale = 1 - (1 - l) * o, y();
|
|
590
584
|
}
|
|
591
585
|
},
|
|
592
586
|
// Spring 2: Translate (vertical movement from bottom to top)
|
|
593
587
|
{
|
|
594
|
-
spring:
|
|
595
|
-
offset:
|
|
596
|
-
tick: (
|
|
597
|
-
c.translateY = -
|
|
588
|
+
physics: (t == null ? void 0 : t.physics) ?? { spring: i.translate },
|
|
589
|
+
offset: S.translate,
|
|
590
|
+
tick: (o) => {
|
|
591
|
+
c.translateY = -e.top + e.height * (1 - o), y();
|
|
598
592
|
}
|
|
599
593
|
},
|
|
600
594
|
// Spring 3: Scale Up (scale → 1) - element returns to full size
|
|
601
595
|
{
|
|
602
|
-
spring:
|
|
603
|
-
offset:
|
|
604
|
-
tick: (
|
|
605
|
-
c.scale =
|
|
596
|
+
physics: (t == null ? void 0 : t.physics) ?? { spring: i.scaleUp },
|
|
597
|
+
offset: S.scaleUp,
|
|
598
|
+
tick: (o) => {
|
|
599
|
+
c.scale = l + (1 - l) * o, y();
|
|
606
600
|
}
|
|
607
601
|
}
|
|
608
602
|
],
|
|
609
603
|
schedule: "stagger",
|
|
610
604
|
prepare: () => {
|
|
611
|
-
|
|
605
|
+
Y(s, e), _(s, e), s.style.transform = `translateY(${-e.top + e.height}px) scale(${l})`;
|
|
612
606
|
},
|
|
613
607
|
onEnd: () => {
|
|
614
|
-
|
|
608
|
+
s.style.clipPath = "", s.style.transformOrigin = "", s.style.transform = "";
|
|
615
609
|
}
|
|
616
610
|
};
|
|
617
611
|
}
|
|
618
612
|
};
|
|
619
613
|
};
|
|
620
|
-
function
|
|
621
|
-
const
|
|
622
|
-
t.topLeft.style.transform = `translate(${
|
|
614
|
+
function gt(t, i, l) {
|
|
615
|
+
const a = i * 0.7, n = l * 0.7;
|
|
616
|
+
t.topLeft.style.transform = `translate(${a}px, ${n}px)`, t.topRight.style.transform = `translate(${-a}px, ${n}px)`, t.bottomLeft.style.transform = `translate(${a}px, ${-n}px)`, t.bottomRight.style.transform = `translate(${-a}px, ${-n}px)`;
|
|
623
617
|
}
|
|
624
|
-
function
|
|
625
|
-
const
|
|
626
|
-
|
|
627
|
-
const o = document.createElement("div");
|
|
628
|
-
o.style.position = "absolute", o.style.width = "15px", o.style.height = "1px", o.style.backgroundColor = t, o.style.top = "0", o.style.left = "0";
|
|
629
|
-
const d = document.createElement("div");
|
|
630
|
-
d.style.position = "absolute", d.style.width = "1px", d.style.height = "15px", d.style.backgroundColor = t, d.style.top = "0", d.style.left = "0", a.appendChild(o), a.appendChild(d);
|
|
618
|
+
function wt(t = "white", i) {
|
|
619
|
+
const n = document.createElement("div");
|
|
620
|
+
n.style.position = "fixed", n.style.pointerEvents = "none", n.style.zIndex = "9999", n.style.top = `${i.top - 1}px`, n.style.left = `${i.left - 1}px`, n.style.width = "15px", n.style.height = "15px";
|
|
631
621
|
const s = document.createElement("div");
|
|
632
|
-
s.style.position = "
|
|
622
|
+
s.style.position = "absolute", s.style.width = "15px", s.style.height = "1px", s.style.backgroundColor = t, s.style.top = "0", s.style.left = "0";
|
|
623
|
+
const r = document.createElement("div");
|
|
624
|
+
r.style.position = "absolute", r.style.width = "1px", r.style.height = "15px", r.style.backgroundColor = t, r.style.top = "0", r.style.left = "0", n.appendChild(s), n.appendChild(r);
|
|
625
|
+
const e = document.createElement("div");
|
|
626
|
+
e.style.position = "fixed", e.style.pointerEvents = "none", e.style.zIndex = "9999", e.style.top = `${i.top - 1}px`, e.style.left = `${i.left + i.width - 15 + 1}px`, e.style.width = "15px", e.style.height = "15px";
|
|
633
627
|
const c = document.createElement("div");
|
|
634
628
|
c.style.position = "absolute", c.style.width = "15px", c.style.height = "1px", c.style.backgroundColor = t, c.style.top = "0", c.style.right = "0";
|
|
635
|
-
const e = document.createElement("div");
|
|
636
|
-
e.style.position = "absolute", e.style.width = "1px", e.style.height = "15px", e.style.backgroundColor = t, e.style.top = "0", e.style.right = "0", s.appendChild(c), s.appendChild(e);
|
|
637
|
-
const i = document.createElement("div");
|
|
638
|
-
i.style.position = "fixed", i.style.pointerEvents = "none", i.style.zIndex = "9999", i.style.top = `${n.top + n.height - 15 + 1}px`, i.style.left = `${n.left - 1}px`, i.style.width = "15px", i.style.height = "15px";
|
|
639
629
|
const y = document.createElement("div");
|
|
640
|
-
y.style.position = "absolute", y.style.width = "
|
|
641
|
-
const
|
|
642
|
-
|
|
643
|
-
const
|
|
644
|
-
|
|
645
|
-
const
|
|
646
|
-
|
|
630
|
+
y.style.position = "absolute", y.style.width = "1px", y.style.height = "15px", y.style.backgroundColor = t, y.style.top = "0", y.style.right = "0", e.appendChild(c), e.appendChild(y);
|
|
631
|
+
const o = document.createElement("div");
|
|
632
|
+
o.style.position = "fixed", o.style.pointerEvents = "none", o.style.zIndex = "9999", o.style.top = `${i.top + i.height - 15 + 1}px`, o.style.left = `${i.left - 1}px`, o.style.width = "15px", o.style.height = "15px";
|
|
633
|
+
const p = document.createElement("div");
|
|
634
|
+
p.style.position = "absolute", p.style.width = "15px", p.style.height = "1px", p.style.backgroundColor = t, p.style.bottom = "0", p.style.left = "0";
|
|
635
|
+
const d = document.createElement("div");
|
|
636
|
+
d.style.position = "absolute", d.style.width = "1px", d.style.height = "15px", d.style.backgroundColor = t, d.style.bottom = "0", d.style.left = "0", o.appendChild(p), o.appendChild(d);
|
|
647
637
|
const u = document.createElement("div");
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
638
|
+
u.style.position = "fixed", u.style.pointerEvents = "none", u.style.zIndex = "9999", u.style.top = `${i.top + i.height - 15 + 1}px`, u.style.left = `${i.left + i.width - 15 + 1}px`, u.style.width = "15px", u.style.height = "15px";
|
|
639
|
+
const f = document.createElement("div");
|
|
640
|
+
f.style.position = "absolute", f.style.width = "15px", f.style.height = "1px", f.style.backgroundColor = t, f.style.bottom = "0", f.style.right = "0";
|
|
641
|
+
const h = document.createElement("div");
|
|
642
|
+
return h.style.position = "absolute", h.style.width = "1px", h.style.height = "15px", h.style.backgroundColor = t, h.style.bottom = "0", h.style.right = "0", u.appendChild(f), u.appendChild(h), {
|
|
643
|
+
topLeft: n,
|
|
644
|
+
topRight: e,
|
|
645
|
+
bottomLeft: o,
|
|
646
|
+
bottomRight: u,
|
|
653
647
|
*[Symbol.iterator]() {
|
|
654
|
-
yield
|
|
648
|
+
yield n, yield e, yield o, yield u;
|
|
655
649
|
}
|
|
656
650
|
};
|
|
657
651
|
}
|
|
658
|
-
function
|
|
659
|
-
const
|
|
652
|
+
function I(t) {
|
|
653
|
+
const i = x(document.body, t.positionedParent);
|
|
660
654
|
return {
|
|
661
655
|
top: t.scroll.y,
|
|
662
656
|
left: 0,
|
|
663
|
-
width:
|
|
664
|
-
height: window.innerHeight -
|
|
657
|
+
width: i.width,
|
|
658
|
+
height: window.innerHeight - i.top
|
|
665
659
|
};
|
|
666
660
|
}
|
|
667
|
-
function
|
|
668
|
-
const
|
|
669
|
-
t.style.transformOrigin = `${
|
|
661
|
+
function Y(t, i) {
|
|
662
|
+
const l = i.left + i.width / 2, a = i.top + i.height / 2;
|
|
663
|
+
t.style.transformOrigin = `${l}px ${a}px`;
|
|
670
664
|
}
|
|
671
|
-
function
|
|
665
|
+
function _(t, i) {
|
|
672
666
|
t.style.clipPath = `polygon(
|
|
673
|
-
${
|
|
674
|
-
${
|
|
675
|
-
${
|
|
676
|
-
${
|
|
667
|
+
${i.left}px ${i.top}px,
|
|
668
|
+
${i.left + i.width}px ${i.top}px,
|
|
669
|
+
${i.left + i.width}px ${i.top + i.height}px,
|
|
670
|
+
${i.left}px ${i.top + i.height}px
|
|
677
671
|
)`;
|
|
678
672
|
}
|
|
679
|
-
function
|
|
680
|
-
t.style.transform = `translateY(${-
|
|
673
|
+
function $t(t, i) {
|
|
674
|
+
t.style.transform = `translateY(${-i.top}px)`;
|
|
681
675
|
}
|
|
682
|
-
|
|
683
|
-
|
|
676
|
+
const bt = {
|
|
677
|
+
spring: { stiffness: 300, damping: 30 }
|
|
678
|
+
};
|
|
679
|
+
function xt(t, i) {
|
|
680
|
+
return t.querySelector(`[data-hero-key="${i}"]`);
|
|
684
681
|
}
|
|
685
|
-
const
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
stiffness: ((d = t.spring) == null ? void 0 : d.stiffness) ?? 300,
|
|
689
|
-
damping: ((s = t.spring) == null ? void 0 : s.damping) ?? 30
|
|
690
|
-
}, r = t.timeout ?? 300, p = t.maxDistance ?? 700;
|
|
691
|
-
let a = null, o = null;
|
|
682
|
+
const Gt = (t = {}) => {
|
|
683
|
+
const i = t.physics ?? bt, l = t.maxDistance ?? 700;
|
|
684
|
+
let a = null, n = E();
|
|
692
685
|
return {
|
|
693
|
-
in: async (
|
|
694
|
-
const
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
if (!await new Promise((l) => {
|
|
703
|
-
a ? l(!0) : (o = l, setTimeout(() => {
|
|
704
|
-
o = null, l(!1);
|
|
705
|
-
}, r));
|
|
706
|
-
}) || !a)
|
|
707
|
-
return a = null, {
|
|
708
|
-
spring: n,
|
|
709
|
-
tick: () => {
|
|
710
|
-
}
|
|
711
|
-
// No fromNode, skip animation
|
|
712
|
-
};
|
|
713
|
-
const g = y.map((l) => {
|
|
714
|
-
const u = l.getAttribute("data-hero-key");
|
|
715
|
-
if (!u) return null;
|
|
716
|
-
const b = Ot(a, u);
|
|
717
|
-
if (!b) return null;
|
|
718
|
-
const f = l, $ = x(a, b), w = x(i, f), E = $.left - w.left - e.scrollOffset.x, M = $.top - w.top - e.scrollOffset.y, G = $.width / w.width, B = $.height / w.height, q = f.style.transform, j = f.style.position, Z = f.style.transformOrigin, J = f.style.zIndex, K = f.style.willChange;
|
|
686
|
+
in: async (s, r) => {
|
|
687
|
+
const e = s, c = Array.from(e.querySelectorAll("[data-hero-key]"));
|
|
688
|
+
await n.promise;
|
|
689
|
+
const y = c.map((o) => {
|
|
690
|
+
const p = o.getAttribute("data-hero-key");
|
|
691
|
+
if (!p) return null;
|
|
692
|
+
const d = xt(a, p);
|
|
693
|
+
if (!d) return null;
|
|
694
|
+
const u = o, f = x(a, d), h = x(e, u), $ = f.left - h.left - r.scrollOffset.x, w = f.top - h.top - r.scrollOffset.y, b = f.width / h.width, C = f.height / h.height, V = u.style.transform, U = u.style.position, H = u.style.transformOrigin, X = u.style.zIndex, z = u.style.willChange;
|
|
719
695
|
return {
|
|
720
|
-
toEl:
|
|
721
|
-
dx:
|
|
722
|
-
dy:
|
|
723
|
-
dw:
|
|
724
|
-
dh:
|
|
725
|
-
originalTransform:
|
|
726
|
-
originalPosition:
|
|
727
|
-
originalTransformOrigin:
|
|
728
|
-
originalZIndex:
|
|
729
|
-
originalWillChange:
|
|
696
|
+
toEl: u,
|
|
697
|
+
dx: $,
|
|
698
|
+
dy: w,
|
|
699
|
+
dw: b,
|
|
700
|
+
dh: C,
|
|
701
|
+
originalTransform: V,
|
|
702
|
+
originalPosition: U,
|
|
703
|
+
originalTransformOrigin: H,
|
|
704
|
+
originalZIndex: X,
|
|
705
|
+
originalWillChange: z
|
|
730
706
|
};
|
|
731
707
|
}).filter(
|
|
732
|
-
(
|
|
708
|
+
(o) => o !== null && Math.abs(o.dy) <= l
|
|
733
709
|
);
|
|
734
|
-
return a = null,
|
|
735
|
-
|
|
710
|
+
return a = null, n = E(), y.length === 0 ? {
|
|
711
|
+
physics: i,
|
|
736
712
|
tick: () => {
|
|
737
713
|
}
|
|
738
714
|
// No matching hero elements
|
|
739
715
|
} : {
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
tick: (
|
|
743
|
-
|
|
716
|
+
items: y.map(({ toEl: o, dx: p, dy: d, dw: u, dh: f }) => ({
|
|
717
|
+
physics: i,
|
|
718
|
+
tick: (h) => {
|
|
719
|
+
o.style.transform = `translate(${(1 - h) * p}px, ${(1 - h) * d}px) scale(${h + (1 - h) * u}, ${h + (1 - h) * f})`;
|
|
744
720
|
}
|
|
745
721
|
})),
|
|
746
722
|
schedule: "parallel",
|
|
747
723
|
prepare: () => {
|
|
748
|
-
|
|
749
|
-
|
|
724
|
+
y.forEach(({ toEl: o }) => {
|
|
725
|
+
o.style.position = "relative", o.style.transformOrigin = "top left", o.style.zIndex = "1000", o.style.willChange = "transform";
|
|
750
726
|
});
|
|
751
727
|
},
|
|
752
728
|
onEnd: () => {
|
|
753
|
-
|
|
729
|
+
y.forEach(
|
|
754
730
|
({
|
|
755
|
-
toEl:
|
|
756
|
-
originalTransform:
|
|
757
|
-
originalPosition:
|
|
758
|
-
originalTransformOrigin:
|
|
759
|
-
originalZIndex:
|
|
760
|
-
originalWillChange:
|
|
731
|
+
toEl: o,
|
|
732
|
+
originalTransform: p,
|
|
733
|
+
originalPosition: d,
|
|
734
|
+
originalTransformOrigin: u,
|
|
735
|
+
originalZIndex: f,
|
|
736
|
+
originalWillChange: h
|
|
761
737
|
}) => {
|
|
762
|
-
|
|
738
|
+
o.style.transform = p, o.style.position = d, o.style.transformOrigin = u, o.style.zIndex = f, o.style.willChange = h;
|
|
763
739
|
}
|
|
764
740
|
);
|
|
765
741
|
}
|
|
766
742
|
};
|
|
767
743
|
},
|
|
768
|
-
out: async (
|
|
769
|
-
|
|
770
|
-
onStart: () => {
|
|
771
|
-
a = c, o && (o(!0), o = null);
|
|
772
|
-
},
|
|
744
|
+
out: async (s) => ({
|
|
745
|
+
physics: i,
|
|
773
746
|
tick: () => {
|
|
774
747
|
},
|
|
775
|
-
prepare: (
|
|
776
|
-
|
|
748
|
+
prepare: () => {
|
|
749
|
+
a = s, n.resolve(), g(s), s.style.opacity = "0";
|
|
777
750
|
}
|
|
778
751
|
})
|
|
779
752
|
};
|
|
780
|
-
},
|
|
781
|
-
stiffness:
|
|
782
|
-
damping: 19,
|
|
783
|
-
doubleSpring: 0.8
|
|
753
|
+
}, Et = {
|
|
754
|
+
spring: { stiffness: 180, damping: 22, doubleSpring: 1 }
|
|
784
755
|
};
|
|
785
|
-
function
|
|
756
|
+
function Ct({
|
|
786
757
|
detailRect: t,
|
|
787
|
-
galleryRect:
|
|
788
|
-
pageRect:
|
|
789
|
-
scrollOffset:
|
|
758
|
+
galleryRect: i,
|
|
759
|
+
pageRect: l,
|
|
760
|
+
scrollOffset: a
|
|
790
761
|
}) {
|
|
791
|
-
const
|
|
762
|
+
const n = i.left - t.left + (i.width - t.width) / 2 - a.x, s = i.top - t.top + (i.height - t.height) / 2 - a.y, r = i.width / t.width, e = i.height / t.height, c = Math.max(r, e), y = t.top / l.height * 100, o = (l.width - (t.left + t.width)) / l.width * 100, p = (l.height - (t.top + t.height)) / l.height * 100, d = t.left / l.width * 100;
|
|
792
763
|
return {
|
|
793
764
|
transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
|
|
794
|
-
animate: (
|
|
795
|
-
const
|
|
765
|
+
animate: (f) => {
|
|
766
|
+
const h = 1 - f;
|
|
796
767
|
return {
|
|
797
|
-
clipPath: `inset(${
|
|
798
|
-
transform: `translate(${
|
|
768
|
+
clipPath: `inset(${y * h}% ${o * h}% ${p * h}% ${d * h}%)`,
|
|
769
|
+
transform: `translate(${n * h}px, ${s * h}px) scale(${1 + (c - 1) * h})`
|
|
799
770
|
};
|
|
800
771
|
}
|
|
801
772
|
};
|
|
802
773
|
}
|
|
803
|
-
function
|
|
774
|
+
function Ot({
|
|
804
775
|
detailRect: t,
|
|
805
|
-
galleryRect:
|
|
806
|
-
pageRect:
|
|
807
|
-
scrollOffset:
|
|
776
|
+
galleryRect: i,
|
|
777
|
+
pageRect: l,
|
|
778
|
+
scrollOffset: a
|
|
808
779
|
}) {
|
|
809
|
-
const
|
|
780
|
+
const n = i.left - t.left + (i.width - t.width) / 2 + a.x, s = i.top - t.top + (i.height - t.height) / 2 + a.y, r = i.width / t.width, e = i.height / t.height, c = Math.min(r, e), y = t.top / l.height * 100, o = (l.width - (t.left + t.width)) / l.width * 100, p = (l.height - (t.top + t.height)) / l.height * 100, d = t.left / l.width * 100;
|
|
810
781
|
return {
|
|
811
782
|
transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
|
|
812
|
-
animate: (
|
|
813
|
-
const
|
|
783
|
+
animate: (f) => {
|
|
784
|
+
const h = 1 - f;
|
|
814
785
|
return {
|
|
815
|
-
clipPath: `inset(${
|
|
816
|
-
transform: `translate(${
|
|
786
|
+
clipPath: `inset(${y * h}% ${o * h}% ${p * h}% ${d * h}%)`,
|
|
787
|
+
transform: `translate(${n * h - a.x}px, ${s * h - a.y}px) scale(${1 + (c - 1) * h})`
|
|
817
788
|
};
|
|
818
789
|
}
|
|
819
790
|
};
|
|
820
791
|
}
|
|
821
|
-
function
|
|
822
|
-
const
|
|
792
|
+
function St(t, i, l) {
|
|
793
|
+
const a = t.querySelector(
|
|
823
794
|
"[data-instagram-detail-key]"
|
|
824
|
-
),
|
|
795
|
+
), n = i.querySelector(
|
|
825
796
|
"[data-instagram-detail-key]"
|
|
826
797
|
);
|
|
827
|
-
if (t.querySelectorAll("[data-instagram-detail-key]").length > 1 ||
|
|
798
|
+
if (t.querySelectorAll("[data-instagram-detail-key]").length > 1 || i.querySelectorAll("[data-instagram-detail-key]").length > 1)
|
|
828
799
|
return null;
|
|
829
|
-
let
|
|
830
|
-
if (!
|
|
831
|
-
|
|
832
|
-
const
|
|
833
|
-
if (!
|
|
834
|
-
|
|
835
|
-
`[data-instagram-gallery-key="${
|
|
836
|
-
),
|
|
837
|
-
} else if (
|
|
838
|
-
|
|
839
|
-
const
|
|
840
|
-
if (!
|
|
841
|
-
|
|
842
|
-
`[data-instagram-gallery-key="${
|
|
843
|
-
),
|
|
800
|
+
let s = null, r = null, e = !1;
|
|
801
|
+
if (!a && n) {
|
|
802
|
+
r = n;
|
|
803
|
+
const o = r.getAttribute("data-instagram-detail-key");
|
|
804
|
+
if (!o) return null;
|
|
805
|
+
s = t.querySelector(
|
|
806
|
+
`[data-instagram-gallery-key="${o}"]`
|
|
807
|
+
), s && (e = !0);
|
|
808
|
+
} else if (a && !n) {
|
|
809
|
+
r = a;
|
|
810
|
+
const o = r.getAttribute("data-instagram-detail-key");
|
|
811
|
+
if (!o) return null;
|
|
812
|
+
s = i.querySelector(
|
|
813
|
+
`[data-instagram-gallery-key="${o}"]`
|
|
814
|
+
), s && (e = !1);
|
|
844
815
|
}
|
|
845
|
-
if (!
|
|
816
|
+
if (!s || !r)
|
|
846
817
|
return null;
|
|
847
|
-
const c = x(
|
|
848
|
-
if (
|
|
849
|
-
const
|
|
850
|
-
detailRect:
|
|
818
|
+
const c = x(e ? t : i, s), y = x(e ? i : t, r);
|
|
819
|
+
if (e) {
|
|
820
|
+
const o = Ct({
|
|
821
|
+
detailRect: y,
|
|
851
822
|
galleryRect: c,
|
|
852
|
-
pageRect:
|
|
853
|
-
scrollOffset:
|
|
823
|
+
pageRect: i.getBoundingClientRect(),
|
|
824
|
+
scrollOffset: l
|
|
854
825
|
});
|
|
855
|
-
return
|
|
826
|
+
return i.style.transformOrigin = o.transformOrigin, {
|
|
856
827
|
isEnterMode: !0,
|
|
857
|
-
inAnimation:
|
|
828
|
+
inAnimation: o.animate
|
|
858
829
|
// No outAnimation - gallery stays visible
|
|
859
830
|
};
|
|
860
831
|
} else {
|
|
861
|
-
const
|
|
862
|
-
detailRect:
|
|
832
|
+
const o = Ot({
|
|
833
|
+
detailRect: y,
|
|
863
834
|
galleryRect: c,
|
|
864
835
|
pageRect: t.getBoundingClientRect(),
|
|
865
|
-
scrollOffset:
|
|
836
|
+
scrollOffset: l
|
|
866
837
|
});
|
|
867
|
-
return t.style.transformOrigin =
|
|
838
|
+
return t.style.transformOrigin = o.transformOrigin, {
|
|
868
839
|
isEnterMode: !1,
|
|
869
|
-
outAnimation:
|
|
840
|
+
outAnimation: o.animate
|
|
870
841
|
// No inAnimation - gallery stays visible
|
|
871
842
|
};
|
|
872
843
|
}
|
|
873
844
|
}
|
|
874
845
|
const Zt = (t = {}) => {
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
stiffness: ((s = t.spring) == null ? void 0 : s.stiffness) ?? L.stiffness,
|
|
878
|
-
damping: ((c = t.spring) == null ? void 0 : c.damping) ?? L.damping,
|
|
879
|
-
doubleSpring: ((e = t.spring) == null ? void 0 : e.doubleSpring) ?? L.doubleSpring
|
|
880
|
-
}, r = t.timeout ?? 300;
|
|
881
|
-
let p = null, a = null, o = null, d = null;
|
|
846
|
+
const i = t.physics ?? Et, l = t.timeout ?? 300;
|
|
847
|
+
let a = null, n = null, s = null, r = null;
|
|
882
848
|
return {
|
|
883
|
-
in: async (
|
|
884
|
-
const
|
|
885
|
-
return !await new Promise((
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
},
|
|
889
|
-
}) || !
|
|
890
|
-
|
|
849
|
+
in: async (e, { scrollOffset: c }) => {
|
|
850
|
+
const y = e;
|
|
851
|
+
return !await new Promise((p) => {
|
|
852
|
+
a ? p(!0) : (n = p, setTimeout(() => {
|
|
853
|
+
n = null, p(!1);
|
|
854
|
+
}, l));
|
|
855
|
+
}) || !a ? (r == null || r(), r = null, a = null, {
|
|
856
|
+
physics: i,
|
|
891
857
|
css: () => ({})
|
|
892
|
-
}) : (
|
|
893
|
-
|
|
894
|
-
css: (
|
|
895
|
-
}) : (
|
|
896
|
-
|
|
858
|
+
}) : (s = St(a, y, c), r == null || r(), r = null, s ? (a = null, {
|
|
859
|
+
physics: i,
|
|
860
|
+
css: (p) => s != null && s.inAnimation ? s.inAnimation(p) : {}
|
|
861
|
+
}) : (a = null, {
|
|
862
|
+
physics: i,
|
|
897
863
|
css: () => ({})
|
|
898
864
|
}));
|
|
899
865
|
},
|
|
900
|
-
out: async (
|
|
901
|
-
const
|
|
902
|
-
|
|
866
|
+
out: async (e, c) => {
|
|
867
|
+
const y = new Promise((o) => {
|
|
868
|
+
r = o;
|
|
903
869
|
});
|
|
904
870
|
return {
|
|
905
|
-
|
|
906
|
-
prepare: (
|
|
907
|
-
|
|
871
|
+
physics: i,
|
|
872
|
+
prepare: () => {
|
|
873
|
+
s != null && s.isEnterMode ? g(e) : (g(e, c), e.style.zIndex = "-1");
|
|
908
874
|
},
|
|
909
875
|
wait: async () => {
|
|
910
|
-
|
|
876
|
+
a = e, n && (n(!0), n = null), await y;
|
|
911
877
|
},
|
|
912
|
-
css: (
|
|
878
|
+
css: (o) => s != null && s.outAnimation ? s.outAnimation(o) : {}
|
|
913
879
|
};
|
|
914
880
|
}
|
|
915
881
|
};
|
|
882
|
+
}, At = {
|
|
883
|
+
spring: { stiffness: 50, damping: 30 }
|
|
916
884
|
};
|
|
917
|
-
function
|
|
918
|
-
const
|
|
885
|
+
function Tt(t) {
|
|
886
|
+
const i = x(document.body, t.positionedParent);
|
|
919
887
|
return {
|
|
920
888
|
top: t.scroll.y,
|
|
921
889
|
left: 0,
|
|
922
|
-
width:
|
|
923
|
-
height: window.innerHeight -
|
|
890
|
+
width: i.width,
|
|
891
|
+
height: window.innerHeight - i.top
|
|
924
892
|
};
|
|
925
893
|
}
|
|
926
894
|
const Jt = (t = {}) => {
|
|
927
|
-
|
|
928
|
-
const n = {
|
|
929
|
-
stiffness: ((o = t.spring) == null ? void 0 : o.stiffness) ?? 50,
|
|
930
|
-
damping: ((d = t.spring) == null ? void 0 : d.damping) ?? 30
|
|
931
|
-
}, r = t.initialRotation ?? 45, p = t.initialScale ?? 0.01, a = t.rotationTriggerPoint ?? 0.8;
|
|
895
|
+
const i = t.physics ?? At, l = t.initialRotation ?? 45, a = t.initialScale ?? 0.01, n = t.rotationTriggerPoint ?? 0.8;
|
|
932
896
|
return {
|
|
933
|
-
out: async (s,
|
|
897
|
+
out: async (s, r) => {
|
|
934
898
|
const e = s.style.opacity;
|
|
935
899
|
return {
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
900
|
+
physics: {
|
|
901
|
+
spring: {
|
|
902
|
+
stiffness: 80,
|
|
903
|
+
damping: 25
|
|
904
|
+
}
|
|
939
905
|
},
|
|
940
906
|
from: 1,
|
|
941
907
|
to: 0,
|
|
942
908
|
prepare: () => {
|
|
943
|
-
|
|
909
|
+
g(s, r), s.style.opacity = "1";
|
|
944
910
|
},
|
|
945
|
-
tick: (
|
|
946
|
-
s.style.opacity = String(
|
|
911
|
+
tick: (c) => {
|
|
912
|
+
s.style.opacity = String(c);
|
|
947
913
|
},
|
|
948
914
|
onEnd: () => {
|
|
949
915
|
s.style.opacity = e;
|
|
950
916
|
}
|
|
951
917
|
};
|
|
952
918
|
},
|
|
953
|
-
in: async (s,
|
|
954
|
-
const e =
|
|
919
|
+
in: async (s, r) => {
|
|
920
|
+
const e = Tt(r), c = s.style.transform, y = s.style.transformOrigin, o = s.style.position, p = s.style.zIndex;
|
|
955
921
|
return {
|
|
956
|
-
|
|
922
|
+
physics: i,
|
|
957
923
|
from: 0,
|
|
958
924
|
to: 1,
|
|
959
925
|
prepare: () => {
|
|
960
|
-
const
|
|
926
|
+
const d = Math.min(e.width, e.height) * 0.4;
|
|
961
927
|
s.style.setProperty(
|
|
962
928
|
"--max-border-radius",
|
|
963
|
-
`${
|
|
929
|
+
`${d}px`
|
|
964
930
|
), s.style.setProperty("--border-radius-scale", "1"), s.style.willChange = "transform", s.style.backfaceVisibility = "hidden";
|
|
965
|
-
const u = e.left + e.width / 2,
|
|
966
|
-
s.style.transformOrigin = `${u}px ${
|
|
931
|
+
const u = e.left + e.width / 2, f = e.top + e.height / 2;
|
|
932
|
+
s.style.transformOrigin = `${u}px ${f}px`, s.style.position = "fixed", s.style.top = `${e.top}px`, s.style.left = `${e.left}px`, s.style.width = `${e.width}px`, s.style.height = `${e.height}px`, s.style.zIndex = "1000", s.style.overflow = "hidden", s.style.transform = `rotate(${l}deg) scale(${a}) translateZ(0)`, s.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", s.style.opacity = "1";
|
|
967
933
|
},
|
|
968
|
-
tick: (
|
|
934
|
+
tick: (d) => {
|
|
969
935
|
let u;
|
|
970
|
-
if (
|
|
971
|
-
u =
|
|
972
|
-
else if (
|
|
973
|
-
const w = (
|
|
974
|
-
u =
|
|
936
|
+
if (d <= 0.05)
|
|
937
|
+
u = a;
|
|
938
|
+
else if (d <= n) {
|
|
939
|
+
const w = (d - 0.05) / (n - 0.05), b = Math.pow(w, 9);
|
|
940
|
+
u = a + (0.8 - a) * b;
|
|
975
941
|
} else {
|
|
976
|
-
const w = (
|
|
942
|
+
const w = (d - n) / (1 - n);
|
|
977
943
|
u = 0.8 + 0.2 * (1 - Math.pow(1 - w, 3));
|
|
978
944
|
}
|
|
979
|
-
let
|
|
980
|
-
const
|
|
981
|
-
if (
|
|
982
|
-
|
|
945
|
+
let f;
|
|
946
|
+
const h = 0.7;
|
|
947
|
+
if (d <= h)
|
|
948
|
+
f = l;
|
|
983
949
|
else {
|
|
984
|
-
const w = (
|
|
985
|
-
|
|
950
|
+
const w = (d - h) / (1 - h), b = 1 - Math.pow(1 - w, 2);
|
|
951
|
+
f = l * (1 - b);
|
|
986
952
|
}
|
|
987
953
|
let $;
|
|
988
|
-
if (
|
|
954
|
+
if (d <= h)
|
|
989
955
|
$ = 1;
|
|
990
956
|
else {
|
|
991
|
-
const w = (
|
|
957
|
+
const w = (d - h) / (1 - h);
|
|
992
958
|
$ = 1 - Math.pow(w, 0.5);
|
|
993
959
|
}
|
|
994
|
-
s.style.transform = `rotate(${
|
|
960
|
+
s.style.transform = `rotate(${f.toFixed(2)}deg) scale(${u.toFixed(4)}) translateZ(0)`, s.style.setProperty(
|
|
995
961
|
"--border-radius-scale",
|
|
996
962
|
$.toFixed(4)
|
|
997
963
|
);
|
|
998
964
|
},
|
|
999
965
|
onEnd: () => {
|
|
1000
|
-
s.style.willChange = "", s.style.backfaceVisibility = "", s.style.removeProperty("--max-border-radius"), s.style.removeProperty("--border-radius-scale"), s.style.transform =
|
|
966
|
+
s.style.willChange = "", s.style.backfaceVisibility = "", s.style.removeProperty("--max-border-radius"), s.style.removeProperty("--border-radius-scale"), s.style.transform = c, s.style.transformOrigin = y, s.style.position = o, s.style.zIndex = p, s.style.top = "", s.style.left = "", s.style.width = "", s.style.height = "", s.style.overflow = "", s.style.borderRadius = "";
|
|
1001
967
|
}
|
|
1002
968
|
};
|
|
1003
969
|
}
|
|
1004
970
|
};
|
|
1005
|
-
},
|
|
1006
|
-
stiffness:
|
|
1007
|
-
damping: 19,
|
|
1008
|
-
doubleSpring: 0.7
|
|
971
|
+
}, Pt = {
|
|
972
|
+
spring: { stiffness: 200, damping: 23, doubleSpring: 1 }
|
|
1009
973
|
};
|
|
1010
|
-
function
|
|
974
|
+
function kt({
|
|
1011
975
|
detailRect: t,
|
|
1012
|
-
galleryRect:
|
|
1013
|
-
pageRect:
|
|
1014
|
-
scrollOffset:
|
|
976
|
+
galleryRect: i,
|
|
977
|
+
pageRect: l,
|
|
978
|
+
scrollOffset: a
|
|
1015
979
|
}) {
|
|
1016
|
-
const
|
|
980
|
+
const n = i.left - t.left + (i.width - t.width) / 2 - a.x, s = i.top - t.top + (i.height - t.height) / 2 - a.y, r = i.width / t.width, e = i.height / t.height, c = Math.max(r, e), y = t.top / l.height * 100, o = (l.width - (t.left + t.width)) / l.width * 100, p = (l.height - (t.top + t.height)) / l.height * 100, d = t.left / l.width * 100;
|
|
1017
981
|
return {
|
|
1018
982
|
transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
|
|
1019
|
-
animate: (
|
|
1020
|
-
const
|
|
983
|
+
animate: (f) => {
|
|
984
|
+
const h = 1 - f;
|
|
1021
985
|
return {
|
|
1022
|
-
clipPath: `inset(${
|
|
1023
|
-
transform: `translate(${
|
|
986
|
+
clipPath: `inset(${y * h}% ${o * h}% ${p * h}% ${d * h}%)`,
|
|
987
|
+
transform: `translate(${n * h}px, ${s * h}px) scale(${1 + (c - 1) * h})`
|
|
1024
988
|
};
|
|
1025
989
|
}
|
|
1026
990
|
};
|
|
1027
991
|
}
|
|
1028
|
-
function
|
|
992
|
+
function Lt({
|
|
1029
993
|
galleryRect: t,
|
|
1030
|
-
detailRect:
|
|
1031
|
-
scrollOffset:
|
|
994
|
+
detailRect: i,
|
|
995
|
+
scrollOffset: l
|
|
1032
996
|
}) {
|
|
1033
|
-
const
|
|
997
|
+
const a = i.left - t.left + (i.width - t.width) / 2 + l.x, n = i.top - t.top + (i.height - t.height) / 2 + l.y, s = i.width / t.width, r = i.height / t.height, e = Math.max(s, r);
|
|
1034
998
|
return {
|
|
1035
999
|
transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
|
|
1036
|
-
animate: (
|
|
1037
|
-
const
|
|
1000
|
+
animate: (y) => {
|
|
1001
|
+
const o = 1 - y;
|
|
1038
1002
|
return {
|
|
1039
|
-
transform: `translate(${
|
|
1040
|
-
opacity: `${1 -
|
|
1003
|
+
transform: `translate(${a * o - l.x}px, ${n * o - l.y}px) scale(${1 + (e - 1) * o})`,
|
|
1004
|
+
opacity: `${1 - o}`
|
|
1041
1005
|
};
|
|
1042
1006
|
}
|
|
1043
1007
|
};
|
|
1044
1008
|
}
|
|
1045
|
-
function
|
|
1009
|
+
function vt({
|
|
1046
1010
|
galleryRect: t,
|
|
1047
|
-
detailRect:
|
|
1048
|
-
scrollOffset:
|
|
1011
|
+
detailRect: i,
|
|
1012
|
+
scrollOffset: l
|
|
1049
1013
|
}) {
|
|
1050
|
-
const
|
|
1014
|
+
const a = i.left - t.left + (i.width - t.width) / 2 - l.x, n = i.top - t.top + (i.height - t.height) / 2 - l.y, s = i.width / t.width, r = i.height / t.height, e = Math.max(s, r);
|
|
1051
1015
|
return {
|
|
1052
1016
|
transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
|
|
1053
|
-
animate: (
|
|
1054
|
-
const
|
|
1017
|
+
animate: (y) => {
|
|
1018
|
+
const o = 1 - y, p = y;
|
|
1055
1019
|
return {
|
|
1056
|
-
transform: `translate(${
|
|
1057
|
-
opacity: `${
|
|
1020
|
+
transform: `translate(${a * o}px, ${n * o}px) scale(${1 + (e - 1) * o})`,
|
|
1021
|
+
opacity: `${p}`
|
|
1058
1022
|
};
|
|
1059
1023
|
}
|
|
1060
1024
|
};
|
|
1061
1025
|
}
|
|
1062
|
-
function
|
|
1026
|
+
function mt({
|
|
1063
1027
|
detailRect: t,
|
|
1064
|
-
galleryRect:
|
|
1065
|
-
pageRect:
|
|
1066
|
-
scrollOffset:
|
|
1028
|
+
galleryRect: i,
|
|
1029
|
+
pageRect: l,
|
|
1030
|
+
scrollOffset: a
|
|
1067
1031
|
}) {
|
|
1068
|
-
const
|
|
1032
|
+
const n = i.left - t.left + (i.width - t.width) / 2 + a.x, s = i.top - t.top + (i.height - t.height) / 2 + a.y, r = i.width / t.width, e = i.height / t.height, c = Math.min(r, e), y = t.top / l.height * 100, o = (l.width - (t.left + t.width)) / l.width * 100, p = (l.height - (t.top + t.height)) / l.height * 100, d = t.left / l.width * 100;
|
|
1069
1033
|
return {
|
|
1070
1034
|
transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
|
|
1071
|
-
animate: (
|
|
1072
|
-
const
|
|
1035
|
+
animate: (f) => {
|
|
1036
|
+
const h = 1 - f;
|
|
1073
1037
|
return {
|
|
1074
|
-
clipPath: `inset(${
|
|
1075
|
-
transform: `translate(${
|
|
1038
|
+
clipPath: `inset(${y * h}% ${o * h}% ${p * h}% ${d * h}%)`,
|
|
1039
|
+
transform: `translate(${n * h - a.x}px, ${s * h - a.y}px) scale(${1 + (c - 1) * h})`
|
|
1076
1040
|
};
|
|
1077
1041
|
}
|
|
1078
1042
|
};
|
|
1079
1043
|
}
|
|
1080
|
-
function
|
|
1081
|
-
const
|
|
1044
|
+
function It(t, i, l) {
|
|
1045
|
+
const a = t.querySelector(
|
|
1082
1046
|
"[data-pinterest-detail-key]"
|
|
1083
|
-
),
|
|
1047
|
+
), n = i.querySelector(
|
|
1084
1048
|
"[data-pinterest-detail-key]"
|
|
1085
1049
|
);
|
|
1086
|
-
if (t.querySelectorAll("[data-pinterest-detail-key]").length > 1 ||
|
|
1050
|
+
if (t.querySelectorAll("[data-pinterest-detail-key]").length > 1 || i.querySelectorAll("[data-pinterest-detail-key]").length > 1)
|
|
1087
1051
|
return null;
|
|
1088
|
-
let
|
|
1089
|
-
if (!
|
|
1090
|
-
|
|
1091
|
-
const
|
|
1092
|
-
if (!
|
|
1093
|
-
|
|
1094
|
-
`[data-pinterest-gallery-key="${
|
|
1095
|
-
),
|
|
1096
|
-
} else if (
|
|
1097
|
-
|
|
1098
|
-
const
|
|
1099
|
-
if (!
|
|
1100
|
-
|
|
1101
|
-
`[data-pinterest-gallery-key="${
|
|
1102
|
-
),
|
|
1052
|
+
let s = null, r = null, e = !1;
|
|
1053
|
+
if (!a && n) {
|
|
1054
|
+
r = n;
|
|
1055
|
+
const o = r.getAttribute("data-pinterest-detail-key");
|
|
1056
|
+
if (!o) return null;
|
|
1057
|
+
s = t.querySelector(
|
|
1058
|
+
`[data-pinterest-gallery-key="${o}"]`
|
|
1059
|
+
), s && (e = !0);
|
|
1060
|
+
} else if (a && !n) {
|
|
1061
|
+
r = a;
|
|
1062
|
+
const o = r.getAttribute("data-pinterest-detail-key");
|
|
1063
|
+
if (!o) return null;
|
|
1064
|
+
s = i.querySelector(
|
|
1065
|
+
`[data-pinterest-gallery-key="${o}"]`
|
|
1066
|
+
), s && (e = !1);
|
|
1103
1067
|
}
|
|
1104
|
-
if (!
|
|
1068
|
+
if (!s || !r)
|
|
1105
1069
|
return null;
|
|
1106
|
-
const c = x(
|
|
1107
|
-
if (
|
|
1108
|
-
const
|
|
1109
|
-
detailRect:
|
|
1070
|
+
const c = x(e ? t : i, s), y = x(e ? i : t, r);
|
|
1071
|
+
if (e) {
|
|
1072
|
+
const o = kt({
|
|
1073
|
+
detailRect: y,
|
|
1110
1074
|
galleryRect: c,
|
|
1111
|
-
pageRect:
|
|
1112
|
-
scrollOffset:
|
|
1113
|
-
}),
|
|
1075
|
+
pageRect: i.getBoundingClientRect(),
|
|
1076
|
+
scrollOffset: l
|
|
1077
|
+
}), p = Lt({
|
|
1114
1078
|
galleryRect: c,
|
|
1115
|
-
detailRect:
|
|
1116
|
-
scrollOffset:
|
|
1079
|
+
detailRect: y,
|
|
1080
|
+
scrollOffset: l
|
|
1117
1081
|
});
|
|
1118
|
-
return
|
|
1119
|
-
inAnimation:
|
|
1120
|
-
outAnimation:
|
|
1082
|
+
return i.style.transformOrigin = o.transformOrigin, t.style.transformOrigin = p.transformOrigin, {
|
|
1083
|
+
inAnimation: o.animate,
|
|
1084
|
+
outAnimation: p.animate
|
|
1121
1085
|
};
|
|
1122
1086
|
} else {
|
|
1123
|
-
const
|
|
1087
|
+
const o = vt({
|
|
1124
1088
|
galleryRect: c,
|
|
1125
|
-
detailRect:
|
|
1126
|
-
scrollOffset:
|
|
1127
|
-
}),
|
|
1128
|
-
detailRect:
|
|
1089
|
+
detailRect: y,
|
|
1090
|
+
scrollOffset: l
|
|
1091
|
+
}), p = mt({
|
|
1092
|
+
detailRect: y,
|
|
1129
1093
|
galleryRect: c,
|
|
1130
1094
|
pageRect: t.getBoundingClientRect(),
|
|
1131
|
-
scrollOffset:
|
|
1095
|
+
scrollOffset: l
|
|
1132
1096
|
});
|
|
1133
|
-
return
|
|
1134
|
-
inAnimation:
|
|
1135
|
-
outAnimation:
|
|
1097
|
+
return i.style.transformOrigin = o.transformOrigin, t.style.transformOrigin = p.transformOrigin, {
|
|
1098
|
+
inAnimation: o.animate,
|
|
1099
|
+
outAnimation: p.animate
|
|
1136
1100
|
};
|
|
1137
1101
|
}
|
|
1138
1102
|
}
|
|
1139
1103
|
const Kt = (t = {}) => {
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
stiffness: ((s = t.spring) == null ? void 0 : s.stiffness) ?? v.stiffness,
|
|
1143
|
-
damping: ((c = t.spring) == null ? void 0 : c.damping) ?? v.damping,
|
|
1144
|
-
doubleSpring: ((e = t.spring) == null ? void 0 : e.doubleSpring) ?? v.doubleSpring
|
|
1145
|
-
}, r = t.timeout ?? 300;
|
|
1146
|
-
let p = null, a = null, o = null, d = null;
|
|
1104
|
+
const i = t.physics ?? Pt, l = t.timeout ?? 300;
|
|
1105
|
+
let a = null, n = null, s = null, r = null;
|
|
1147
1106
|
return {
|
|
1148
|
-
in: async (
|
|
1149
|
-
const
|
|
1150
|
-
return !await new Promise((
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
},
|
|
1154
|
-
}) || !
|
|
1155
|
-
|
|
1107
|
+
in: async (e, { scrollOffset: c }) => {
|
|
1108
|
+
const y = e;
|
|
1109
|
+
return !await new Promise((p) => {
|
|
1110
|
+
a ? p(!0) : (n = p, setTimeout(() => {
|
|
1111
|
+
n = null, p(!1);
|
|
1112
|
+
}, l));
|
|
1113
|
+
}) || !a ? (r == null || r(), r = null, a = null, {
|
|
1114
|
+
physics: i,
|
|
1156
1115
|
css: () => ({})
|
|
1157
|
-
}) : (
|
|
1158
|
-
|
|
1159
|
-
css: (
|
|
1160
|
-
}) : (
|
|
1161
|
-
|
|
1116
|
+
}) : (s = It(a, y, c), r == null || r(), r = null, s ? (a = null, {
|
|
1117
|
+
physics: i,
|
|
1118
|
+
css: (p) => s ? s.inAnimation(p) : {}
|
|
1119
|
+
}) : (a = null, {
|
|
1120
|
+
physics: i,
|
|
1162
1121
|
css: () => ({})
|
|
1163
1122
|
}));
|
|
1164
1123
|
},
|
|
1165
|
-
out: async (
|
|
1166
|
-
const
|
|
1167
|
-
|
|
1124
|
+
out: async (e) => {
|
|
1125
|
+
const c = new Promise((y) => {
|
|
1126
|
+
r = y;
|
|
1168
1127
|
});
|
|
1169
1128
|
return {
|
|
1170
|
-
|
|
1171
|
-
prepare: (
|
|
1172
|
-
|
|
1129
|
+
physics: i,
|
|
1130
|
+
prepare: () => {
|
|
1131
|
+
g(e), e.style.zIndex = "-1", a = e, n && (n(!0), n = null);
|
|
1173
1132
|
},
|
|
1174
1133
|
wait: async () => {
|
|
1175
|
-
|
|
1134
|
+
await c;
|
|
1176
1135
|
},
|
|
1177
|
-
css: (
|
|
1136
|
+
css: (y) => s ? s.outAnimation(y) : {}
|
|
1178
1137
|
};
|
|
1179
1138
|
}
|
|
1180
1139
|
};
|
|
1181
|
-
},
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
m(t, n), t.style.transformOrigin = "center center", t.style.willChange = "transform, opacity";
|
|
1200
|
-
},
|
|
1201
|
-
css: (r) => ({
|
|
1202
|
-
// 0deg → 180deg, hide after 90deg (progress < 0.5)
|
|
1203
|
-
transform: `rotate(${(1 - r) * 180}deg)`,
|
|
1204
|
-
opacity: r > 0.5 ? 1 : 0
|
|
1140
|
+
}, Yt = {
|
|
1141
|
+
spring: { stiffness: 100, damping: 30 }
|
|
1142
|
+
}, Qt = (t = {}) => {
|
|
1143
|
+
const i = t.physics ?? Yt;
|
|
1144
|
+
return {
|
|
1145
|
+
in: (l) => ({
|
|
1146
|
+
physics: i,
|
|
1147
|
+
prepare: () => {
|
|
1148
|
+
l.style.opacity = "0", l.style.transform = "rotate(-180deg)", l.style.transformOrigin = "center center", l.style.willChange = "transform, opacity";
|
|
1149
|
+
},
|
|
1150
|
+
css: (a) => ({
|
|
1151
|
+
// -180deg → 0deg, show after 90deg (progress > 0.5)
|
|
1152
|
+
transform: `rotate(${(a - 1) * 180}deg)`,
|
|
1153
|
+
opacity: a > 0.5 ? 1 : 0
|
|
1154
|
+
}),
|
|
1155
|
+
onEnd: () => {
|
|
1156
|
+
l.style.willChange = "auto", l.style.transform = "", l.style.transformOrigin = "", l.style.opacity = "";
|
|
1157
|
+
}
|
|
1205
1158
|
}),
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
|
|
1159
|
+
out: (l, a) => ({
|
|
1160
|
+
physics: i,
|
|
1161
|
+
prepare: () => {
|
|
1162
|
+
g(l, a), l.style.transformOrigin = "center center", l.style.willChange = "transform, opacity";
|
|
1163
|
+
},
|
|
1164
|
+
css: (n) => ({
|
|
1165
|
+
// 0deg → 180deg, hide after 90deg (progress < 0.5)
|
|
1166
|
+
transform: `rotate(${(1 - n) * 180}deg)`,
|
|
1167
|
+
opacity: n > 0.5 ? 1 : 0
|
|
1168
|
+
}),
|
|
1169
|
+
onEnd: () => {
|
|
1170
|
+
l.style.willChange = "auto";
|
|
1171
|
+
}
|
|
1172
|
+
})
|
|
1173
|
+
};
|
|
1174
|
+
}, _t = {
|
|
1175
|
+
spring: { stiffness: 5, damping: 4 }
|
|
1213
1176
|
}, Rt = (t = {}) => {
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
}, p = n === "up";
|
|
1219
|
-
let a = null, o = null, d = null;
|
|
1220
|
-
const s = () => {
|
|
1221
|
-
if (a === null || o === null)
|
|
1177
|
+
const i = t.direction ?? "up", l = t.physics ?? _t, a = i === "up";
|
|
1178
|
+
let n = null, s = null, r = null;
|
|
1179
|
+
const e = () => {
|
|
1180
|
+
if (n === null || s === null)
|
|
1222
1181
|
return null;
|
|
1223
|
-
const
|
|
1224
|
-
return Math.max(
|
|
1182
|
+
const c = Math.min(n, s), y = window.innerHeight;
|
|
1183
|
+
return Math.max(c, y);
|
|
1225
1184
|
};
|
|
1226
1185
|
return {
|
|
1227
|
-
in: (
|
|
1228
|
-
|
|
1186
|
+
in: (c) => (s = c.offsetHeight, n !== null && (r = e()), {
|
|
1187
|
+
physics: l,
|
|
1229
1188
|
prepare: () => {
|
|
1230
|
-
|
|
1189
|
+
c.style.willChange = "transform", c.style.backfaceVisibility = "hidden", c.style.contain = "layout paint";
|
|
1231
1190
|
},
|
|
1232
1191
|
tick: (y) => {
|
|
1233
|
-
|
|
1234
|
-
const
|
|
1235
|
-
|
|
1192
|
+
r === null && (r = e());
|
|
1193
|
+
const o = r ?? window.innerHeight, p = a ? (1 - y) * o : (1 - y) * -o;
|
|
1194
|
+
c.style.transform = `translate3d(0, ${p}px, 0)`;
|
|
1236
1195
|
},
|
|
1237
1196
|
onEnd: () => {
|
|
1238
|
-
|
|
1197
|
+
c.style.willChange = "auto", c.style.backfaceVisibility = "", c.style.contain = "";
|
|
1239
1198
|
}
|
|
1240
1199
|
}),
|
|
1241
|
-
out: (
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
d === null && (d = s());
|
|
1248
|
-
const g = d ?? window.innerHeight, l = p ? (1 - h) * -g : (1 - h) * g;
|
|
1249
|
-
i.style.transform = `translate3d(0, ${l}px, 0)`;
|
|
1200
|
+
out: (c, y) => ({
|
|
1201
|
+
physics: l,
|
|
1202
|
+
tick: (o) => {
|
|
1203
|
+
r === null && (r = e());
|
|
1204
|
+
const p = r ?? window.innerHeight, d = a ? (1 - o) * -p : (1 - o) * p;
|
|
1205
|
+
c.style.transform = `translate3d(0, ${d}px, 0)`;
|
|
1250
1206
|
},
|
|
1251
|
-
prepare: (
|
|
1252
|
-
|
|
1207
|
+
prepare: () => {
|
|
1208
|
+
n = c.offsetHeight, s !== null && (r = e()), g(c, y), c.style.zIndex = a ? "-1" : "1", c.style.willChange = "transform", c.style.backfaceVisibility = "hidden", c.style.contain = "layout paint", c.style.pointerEvents = "none";
|
|
1253
1209
|
}
|
|
1254
1210
|
})
|
|
1255
1211
|
};
|
|
1256
|
-
},
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1212
|
+
}, Dt = {
|
|
1213
|
+
inertia: {
|
|
1214
|
+
acceleration: 20,
|
|
1215
|
+
resistance: 1.5
|
|
1216
|
+
}
|
|
1217
|
+
}, Ft = {
|
|
1218
|
+
inertia: {
|
|
1219
|
+
acceleration: 20,
|
|
1220
|
+
resistance: 1
|
|
1221
|
+
}
|
|
1264
1222
|
};
|
|
1265
|
-
function
|
|
1266
|
-
const
|
|
1223
|
+
function P(t) {
|
|
1224
|
+
const i = x(document.body, t.positionedParent), l = t.scroll.y, a = window.innerHeight - i.top;
|
|
1267
1225
|
return {
|
|
1268
|
-
top:
|
|
1226
|
+
top: l,
|
|
1269
1227
|
left: 0,
|
|
1270
|
-
width:
|
|
1271
|
-
height:
|
|
1228
|
+
width: i.width,
|
|
1229
|
+
height: a
|
|
1272
1230
|
};
|
|
1273
1231
|
}
|
|
1274
|
-
const
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
stiffness: ((a = t.spring) == null ? void 0 : a.stiffness) ?? r.stiffness,
|
|
1278
|
-
damping: ((o = t.spring) == null ? void 0 : o.damping) ?? r.damping,
|
|
1279
|
-
doubleSpring: ((d = t.spring) == null ? void 0 : d.doubleSpring) ?? r.doubleSpring
|
|
1280
|
-
};
|
|
1281
|
-
return n === "enter" ? {
|
|
1232
|
+
const ts = (t = {}) => {
|
|
1233
|
+
const { direction: i = "enter" } = t, l = t.physics ?? (i === "enter" ? Dt : Ft);
|
|
1234
|
+
return i === "enter" ? {
|
|
1282
1235
|
// Entering sheet: slides up from bottom
|
|
1283
|
-
in: (
|
|
1284
|
-
const
|
|
1236
|
+
in: (a, n) => {
|
|
1237
|
+
const r = P(n).height;
|
|
1285
1238
|
return {
|
|
1286
|
-
|
|
1239
|
+
physics: l,
|
|
1287
1240
|
prepare: () => {
|
|
1288
|
-
|
|
1241
|
+
a.style.willChange = "transform", a.style.backfaceVisibility = "hidden", a.style.contain = "layout paint";
|
|
1289
1242
|
},
|
|
1290
|
-
css: (
|
|
1291
|
-
transform: `translate3d(0, ${(1 -
|
|
1243
|
+
css: (e) => ({
|
|
1244
|
+
transform: `translate3d(0, ${(1 - e) * r}px, 0)`
|
|
1292
1245
|
}),
|
|
1293
1246
|
onEnd: () => {
|
|
1294
|
-
|
|
1247
|
+
a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "";
|
|
1295
1248
|
}
|
|
1296
1249
|
};
|
|
1297
1250
|
},
|
|
1298
1251
|
// Exiting background: scales down with fade
|
|
1299
|
-
out: (
|
|
1300
|
-
const
|
|
1252
|
+
out: (a, n) => {
|
|
1253
|
+
const s = P(n), r = s.left + s.width / 2, e = s.top + s.height / 2 + n.scrollOffset.y;
|
|
1301
1254
|
return {
|
|
1302
|
-
|
|
1303
|
-
prepare: (
|
|
1304
|
-
|
|
1255
|
+
physics: l,
|
|
1256
|
+
prepare: () => {
|
|
1257
|
+
g(a, n), a.style.zIndex = "-1", a.style.willChange = "transform, opacity", a.style.backfaceVisibility = "hidden", a.style.contain = "layout paint", a.style.pointerEvents = "none", a.style.transformOrigin = `${r}px ${e}px`;
|
|
1305
1258
|
},
|
|
1306
|
-
css: (
|
|
1307
|
-
transform: `scale(${0.8 +
|
|
1308
|
-
opacity:
|
|
1259
|
+
css: (c) => ({
|
|
1260
|
+
transform: `scale(${0.8 + c * 0.2})`,
|
|
1261
|
+
opacity: c
|
|
1309
1262
|
})
|
|
1310
1263
|
};
|
|
1311
1264
|
}
|
|
1312
1265
|
} : {
|
|
1313
1266
|
// Entering background: scales up with fade
|
|
1314
|
-
in: (
|
|
1315
|
-
const
|
|
1267
|
+
in: (a, n) => {
|
|
1268
|
+
const s = P(n), r = s.left + s.width / 2, e = s.top + s.height / 2;
|
|
1316
1269
|
return {
|
|
1317
|
-
|
|
1270
|
+
physics: l,
|
|
1318
1271
|
prepare: () => {
|
|
1319
|
-
|
|
1272
|
+
a.style.willChange = "transform, opacity", a.style.backfaceVisibility = "hidden", a.style.contain = "layout paint", a.style.transformOrigin = `${r}px ${e}px`;
|
|
1320
1273
|
},
|
|
1321
|
-
css: (
|
|
1322
|
-
transform: `scale(${0.8 +
|
|
1323
|
-
opacity:
|
|
1274
|
+
css: (c) => ({
|
|
1275
|
+
transform: `scale(${0.8 + c * 0.2})`,
|
|
1276
|
+
opacity: c
|
|
1324
1277
|
}),
|
|
1325
1278
|
onEnd: () => {
|
|
1326
|
-
|
|
1279
|
+
a.style.willChange = "auto", a.style.backfaceVisibility = "", a.style.contain = "", a.style.transformOrigin = "";
|
|
1327
1280
|
}
|
|
1328
1281
|
};
|
|
1329
1282
|
},
|
|
1330
1283
|
// Exiting sheet: slides down with high z-index
|
|
1331
|
-
out: (
|
|
1332
|
-
const
|
|
1284
|
+
out: (a, n) => {
|
|
1285
|
+
const r = P(n).height;
|
|
1333
1286
|
return {
|
|
1334
|
-
|
|
1335
|
-
prepare: (
|
|
1336
|
-
|
|
1287
|
+
physics: l,
|
|
1288
|
+
prepare: () => {
|
|
1289
|
+
g(a, n), a.style.zIndex = "100", a.style.willChange = "transform", a.style.backfaceVisibility = "hidden", a.style.contain = "layout paint", a.style.pointerEvents = "none";
|
|
1337
1290
|
},
|
|
1338
|
-
css: (
|
|
1339
|
-
transform: `translate3d(0, ${(1 -
|
|
1291
|
+
css: (e) => ({
|
|
1292
|
+
transform: `translate3d(0, ${(1 - e) * r}px, 0)`
|
|
1340
1293
|
})
|
|
1341
1294
|
};
|
|
1342
1295
|
}
|
|
1343
1296
|
};
|
|
1344
|
-
},
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
damping: ((o = t.spring) == null ? void 0 : o.damping) ?? I.damping,
|
|
1353
|
-
doubleSpring: ((d = t.spring) == null ? void 0 : d.doubleSpring) ?? I.doubleSpring
|
|
1354
|
-
}, p = n === "left";
|
|
1297
|
+
}, Vt = {
|
|
1298
|
+
spring: {
|
|
1299
|
+
stiffness: 140,
|
|
1300
|
+
damping: 19,
|
|
1301
|
+
doubleSpring: 0.8
|
|
1302
|
+
}
|
|
1303
|
+
}, ss = (t = {}) => {
|
|
1304
|
+
const i = t.direction ?? "left", l = t.physics ?? Vt, a = i === "left";
|
|
1355
1305
|
return {
|
|
1356
|
-
in: (
|
|
1357
|
-
|
|
1306
|
+
in: (n) => ({
|
|
1307
|
+
physics: l,
|
|
1358
1308
|
prepare: () => {
|
|
1359
|
-
|
|
1309
|
+
n.style.willChange = "transform", n.style.backfaceVisibility = "hidden", n.style.contain = "layout paint";
|
|
1360
1310
|
},
|
|
1361
|
-
css: (
|
|
1362
|
-
transform: `translate3d(${
|
|
1311
|
+
css: (s) => ({
|
|
1312
|
+
transform: `translate3d(${a ? (1 - s) * 100 : (1 - s) * -100}%, 0, 0)`
|
|
1363
1313
|
}),
|
|
1364
1314
|
onEnd: () => {
|
|
1365
|
-
|
|
1315
|
+
n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.contain = "";
|
|
1366
1316
|
}
|
|
1367
1317
|
}),
|
|
1368
|
-
out: (
|
|
1369
|
-
|
|
1370
|
-
css: (
|
|
1371
|
-
transform: `translate3d(${
|
|
1318
|
+
out: (n, s) => ({
|
|
1319
|
+
physics: l,
|
|
1320
|
+
css: (r) => ({
|
|
1321
|
+
transform: `translate3d(${a ? (1 - r) * -100 : (1 - r) * 100}%, 0, 0)`
|
|
1372
1322
|
}),
|
|
1373
|
-
prepare: (
|
|
1374
|
-
|
|
1323
|
+
prepare: () => {
|
|
1324
|
+
g(n, s), n.style.willChange = "transform", n.style.backfaceVisibility = "hidden", n.style.contain = "layout paint", n.style.pointerEvents = "none";
|
|
1375
1325
|
}
|
|
1376
1326
|
})
|
|
1377
1327
|
};
|
|
1378
|
-
},
|
|
1379
|
-
|
|
1328
|
+
}, k = 8, Ut = {
|
|
1329
|
+
spring: {
|
|
1330
|
+
stiffness: 600,
|
|
1331
|
+
damping: 40,
|
|
1332
|
+
restDelta: 0.1,
|
|
1333
|
+
restSpeed: 1e14
|
|
1334
|
+
}
|
|
1335
|
+
}, is = (t = {}) => {
|
|
1336
|
+
const i = t.direction ?? "left", l = t.physics ?? Ut, a = i === "left";
|
|
1337
|
+
let { promise: n, resolve: s } = E();
|
|
1380
1338
|
return {
|
|
1339
|
+
// Entering page: fades in + slides from opposite direction
|
|
1381
1340
|
in: (r) => ({
|
|
1382
|
-
|
|
1341
|
+
physics: l,
|
|
1383
1342
|
prepare: () => {
|
|
1384
|
-
r.style.
|
|
1343
|
+
r.style.opacity = "0", r.style.willChange = "transform, opacity", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint";
|
|
1385
1344
|
},
|
|
1386
1345
|
wait: async () => {
|
|
1387
|
-
|
|
1346
|
+
if (n) {
|
|
1347
|
+
await n;
|
|
1348
|
+
const e = E();
|
|
1349
|
+
n = e.promise, s = e.resolve;
|
|
1350
|
+
}
|
|
1388
1351
|
},
|
|
1389
|
-
css: (
|
|
1390
|
-
const
|
|
1352
|
+
css: (e) => {
|
|
1353
|
+
const c = a ? (1 - e) * k : (1 - e) * -k, y = `${e}`;
|
|
1391
1354
|
return {
|
|
1392
|
-
transform: `
|
|
1355
|
+
transform: `translate3d(${c}px, 0, 0)`,
|
|
1356
|
+
opacity: y
|
|
1393
1357
|
};
|
|
1394
1358
|
},
|
|
1395
1359
|
onEnd: () => {
|
|
1396
|
-
r.style.
|
|
1360
|
+
r.style.opacity = "1", r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "";
|
|
1397
1361
|
}
|
|
1398
1362
|
}),
|
|
1399
|
-
|
|
1400
|
-
|
|
1363
|
+
// Exiting page: fade out + slide in same direction as navigation
|
|
1364
|
+
out: (r, e) => ({
|
|
1365
|
+
physics: l,
|
|
1366
|
+
prepare: () => {
|
|
1367
|
+
g(r, e), r.style.willChange = "transform, opacity", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none";
|
|
1368
|
+
},
|
|
1369
|
+
css: (c) => {
|
|
1370
|
+
const y = a ? (1 - c) * -k : (1 - c) * k, o = `${c}`;
|
|
1371
|
+
return {
|
|
1372
|
+
transform: `translate3d(${y}px, 0, 0)`,
|
|
1373
|
+
opacity: o
|
|
1374
|
+
};
|
|
1375
|
+
},
|
|
1376
|
+
onEnd: () => {
|
|
1377
|
+
s && s(), r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "";
|
|
1378
|
+
}
|
|
1379
|
+
})
|
|
1380
|
+
};
|
|
1381
|
+
}, Ht = {
|
|
1382
|
+
spring: { stiffness: 17, damping: 6 }
|
|
1383
|
+
}, v = 20, L = 800, ns = (t = {}) => {
|
|
1384
|
+
const i = t.physics ?? Ht;
|
|
1385
|
+
let l, a = null;
|
|
1386
|
+
return {
|
|
1387
|
+
in: (n) => ({
|
|
1388
|
+
physics: i,
|
|
1389
|
+
prepare: () => {
|
|
1390
|
+
n.style.willChange = "transform", n.style.backfaceVisibility = "hidden", n.style.contain = "layout paint", n.style.transform = `perspective(${L}px) rotateY(${v}deg) translate3d(-100%, 0, 0)`;
|
|
1391
|
+
},
|
|
1392
|
+
wait: async () => {
|
|
1393
|
+
l && await l;
|
|
1394
|
+
},
|
|
1395
|
+
css: (s) => {
|
|
1396
|
+
const r = (1 - s) * v, e = -(1 - s) * 100;
|
|
1397
|
+
return {
|
|
1398
|
+
transform: `perspective(${L}px) rotateY(${r}deg) translate3d(${e}%, 0, 0)`
|
|
1399
|
+
};
|
|
1400
|
+
},
|
|
1401
|
+
onEnd: () => {
|
|
1402
|
+
n.style.transform = "", n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.contain = "";
|
|
1403
|
+
}
|
|
1404
|
+
}),
|
|
1405
|
+
out: (n, s) => (l = new Promise((r) => {
|
|
1406
|
+
a = r;
|
|
1401
1407
|
}), {
|
|
1402
|
-
|
|
1403
|
-
prepare: (
|
|
1404
|
-
|
|
1408
|
+
physics: i,
|
|
1409
|
+
prepare: () => {
|
|
1410
|
+
g(n, s), n.style.willChange = "transform", n.style.backfaceVisibility = "hidden", n.style.contain = "layout paint", n.style.pointerEvents = "none", n.style.transform = `perspective(${L}px) rotateY(0deg) translate3d(0%, 0, 0)`;
|
|
1405
1411
|
},
|
|
1406
|
-
css: (
|
|
1407
|
-
const
|
|
1412
|
+
css: (r) => {
|
|
1413
|
+
const e = 1 - r, c = e * v, y = e * 100;
|
|
1408
1414
|
return {
|
|
1409
|
-
transform: `perspective(${
|
|
1415
|
+
transform: `perspective(${L}px) rotateY(${-c}deg) translate3d(${y}%, 0, 0)`
|
|
1410
1416
|
};
|
|
1411
1417
|
},
|
|
1412
1418
|
onEnd: () => {
|
|
1413
|
-
|
|
1419
|
+
a && a(), n.style.transform = "";
|
|
1414
1420
|
}
|
|
1415
1421
|
})
|
|
1416
1422
|
};
|
|
1417
|
-
},
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1423
|
+
}, Xt = {
|
|
1424
|
+
spring: {
|
|
1425
|
+
stiffness: 600,
|
|
1426
|
+
damping: 40,
|
|
1427
|
+
restDelta: 0.1,
|
|
1428
|
+
restSpeed: 1e14
|
|
1429
|
+
}
|
|
1430
|
+
}, D = 0.05;
|
|
1431
|
+
function zt(t) {
|
|
1432
|
+
const i = x(document.body, t.positionedParent), l = t.scroll.y, a = window.innerHeight - i.top;
|
|
1424
1433
|
return {
|
|
1425
|
-
top:
|
|
1434
|
+
top: l,
|
|
1426
1435
|
left: 0,
|
|
1427
|
-
width:
|
|
1428
|
-
height:
|
|
1436
|
+
width: i.width,
|
|
1437
|
+
height: a
|
|
1429
1438
|
};
|
|
1430
1439
|
}
|
|
1431
|
-
const
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
stiffness: ((a = t.spring) == null ? void 0 : a.stiffness) ?? D.stiffness,
|
|
1435
|
-
damping: ((o = t.spring) == null ? void 0 : o.damping) ?? D.damping,
|
|
1436
|
-
doubleSpring: ((d = t.spring) == null ? void 0 : d.doubleSpring) ?? D.doubleSpring
|
|
1437
|
-
};
|
|
1438
|
-
let { promise: r, resolve: p } = S();
|
|
1440
|
+
const es = (t = {}) => {
|
|
1441
|
+
const i = t.physics ?? Xt;
|
|
1442
|
+
let { promise: l, resolve: a } = E();
|
|
1439
1443
|
return {
|
|
1440
1444
|
// Entering page: scales up from small (0.95 → 1) with fade in
|
|
1441
|
-
in: (
|
|
1442
|
-
const
|
|
1445
|
+
in: (n, s) => {
|
|
1446
|
+
const r = zt(s), e = r.left + r.width / 2, c = r.top + r.height / 2;
|
|
1443
1447
|
return {
|
|
1444
|
-
|
|
1448
|
+
physics: i,
|
|
1445
1449
|
prepare: () => {
|
|
1446
|
-
|
|
1450
|
+
n.style.opacity = "0", n.style.willChange = "transform, opacity", n.style.backfaceVisibility = "hidden", n.style.contain = "layout paint", n.style.transformOrigin = `${e}px ${c}px`;
|
|
1447
1451
|
},
|
|
1448
1452
|
wait: async () => {
|
|
1449
|
-
if (
|
|
1450
|
-
await
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1453
|
+
if (l) {
|
|
1454
|
+
await l;
|
|
1455
|
+
const y = E();
|
|
1456
|
+
l = y.promise, a = y.resolve;
|
|
1453
1457
|
}
|
|
1454
1458
|
},
|
|
1455
|
-
css: (
|
|
1456
|
-
transform: `scale(${1 -
|
|
1457
|
-
opacity:
|
|
1459
|
+
css: (y) => ({
|
|
1460
|
+
transform: `scale(${1 - D + y * D})`,
|
|
1461
|
+
opacity: y
|
|
1458
1462
|
}),
|
|
1459
1463
|
onEnd: () => {
|
|
1460
|
-
|
|
1464
|
+
n.style.opacity = "1", n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.contain = "", n.style.transformOrigin = "";
|
|
1461
1465
|
}
|
|
1462
1466
|
};
|
|
1463
1467
|
},
|
|
1464
1468
|
// Exiting page: fade out only (no scale)
|
|
1465
|
-
out: (
|
|
1466
|
-
|
|
1467
|
-
prepare: (
|
|
1468
|
-
|
|
1469
|
+
out: (n, s) => ({
|
|
1470
|
+
physics: i,
|
|
1471
|
+
prepare: () => {
|
|
1472
|
+
g(n, s), n.style.willChange = "opacity", n.style.backfaceVisibility = "hidden", n.style.contain = "layout paint", n.style.pointerEvents = "none";
|
|
1469
1473
|
},
|
|
1470
|
-
css: (
|
|
1471
|
-
opacity:
|
|
1474
|
+
css: (r) => ({
|
|
1475
|
+
opacity: r
|
|
1472
1476
|
}),
|
|
1473
1477
|
onEnd: () => {
|
|
1474
|
-
|
|
1478
|
+
a && a();
|
|
1475
1479
|
}
|
|
1476
1480
|
})
|
|
1477
1481
|
};
|
|
1478
1482
|
};
|
|
1479
1483
|
export {
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1484
|
+
Wt as blind,
|
|
1485
|
+
Mt as curtainReveal,
|
|
1486
|
+
Bt as depth,
|
|
1487
|
+
qt as drill,
|
|
1488
|
+
jt as fade,
|
|
1489
|
+
Nt as film,
|
|
1490
|
+
Gt as hero,
|
|
1487
1491
|
Zt as instagram,
|
|
1488
1492
|
Jt as jaemin,
|
|
1489
1493
|
Kt as pinterest,
|
|
1490
1494
|
Qt as rotate,
|
|
1491
1495
|
Rt as scroll,
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
+
ts as sheet,
|
|
1497
|
+
ss as slide,
|
|
1498
|
+
is as snap,
|
|
1499
|
+
ns as strip,
|
|
1500
|
+
es as swap
|
|
1496
1501
|
};
|