@ssgoi/core 2.5.5 → 3.0.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/animate/css-runner.d.ts +17 -0
- package/dist/animator/animate/css-runner.d.ts.map +1 -0
- package/dist/animator/animate/index.d.ts +42 -0
- package/dist/animator/animate/index.d.ts.map +1 -0
- package/dist/animator/animate/tick-runner.d.ts +16 -0
- package/dist/animator/animate/tick-runner.d.ts.map +1 -0
- package/dist/animator/animate/types.d.ts +31 -0
- package/dist/animator/animate/types.d.ts.map +1 -0
- package/dist/animator/animation.d.ts +57 -0
- package/dist/animator/animation.d.ts.map +1 -0
- package/dist/animator/index.d.ts +34 -33
- package/dist/animator/index.d.ts.map +1 -1
- package/dist/animator/multi-animator.d.ts +98 -0
- package/dist/animator/multi-animator.d.ts.map +1 -0
- package/dist/animator/spring-core.d.ts +63 -0
- package/dist/animator/spring-core.d.ts.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +700 -818
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
- package/dist/ssgoi-transition/create-swipe-detector.d.ts +1 -0
- package/dist/ssgoi-transition/create-swipe-detector.d.ts.map +1 -1
- package/dist/transition/create-transition-callback.d.ts +2 -2
- package/dist/transition/create-transition-callback.d.ts.map +1 -1
- package/dist/transition/transition-strategy.d.ts +28 -17
- package/dist/transition/transition-strategy.d.ts.map +1 -1
- package/dist/transition/transition.d.ts +2 -18
- package/dist/transition/transition.d.ts.map +1 -1
- package/dist/transitions/blur.d.ts +5 -5
- package/dist/transitions/blur.d.ts.map +1 -1
- package/dist/transitions/bounce.d.ts +5 -5
- package/dist/transitions/bounce.d.ts.map +1 -1
- package/dist/transitions/fade.d.ts +5 -5
- package/dist/transitions/fade.d.ts.map +1 -1
- package/dist/transitions/fly.d.ts +5 -5
- package/dist/transitions/fly.d.ts.map +1 -1
- package/dist/transitions/index.cjs +1 -1
- package/dist/transitions/index.js +206 -207
- package/dist/transitions/mask.d.ts +5 -5
- package/dist/transitions/mask.d.ts.map +1 -1
- package/dist/transitions/none.d.ts +3 -3
- package/dist/transitions/none.d.ts.map +1 -1
- package/dist/transitions/rotate.d.ts +5 -5
- package/dist/transitions/rotate.d.ts.map +1 -1
- package/dist/transitions/scale.d.ts +5 -5
- package/dist/transitions/scale.d.ts.map +1 -1
- package/dist/transitions/slide.d.ts +5 -5
- package/dist/transitions/slide.d.ts.map +1 -1
- package/dist/types.cjs +1 -1
- package/dist/types.d.ts +142 -102
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +69 -6
- package/dist/view-transitions/blind.d.ts +0 -1
- package/dist/view-transitions/blind.d.ts.map +1 -1
- package/dist/view-transitions/drill.d.ts.map +1 -1
- package/dist/view-transitions/fade.d.ts.map +1 -1
- package/dist/view-transitions/hero.d.ts.map +1 -1
- package/dist/view-transitions/index.cjs +13 -13
- package/dist/view-transitions/index.js +499 -492
- package/dist/view-transitions/scroll.d.ts.map +1 -1
- package/dist/view-transitions/slide.d.ts.map +1 -1
- package/dist/view-transitions/strip.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/animator/animate.d.ts +0 -35
- package/dist/animator/animate.d.ts.map +0 -1
- package/dist/animator/animation-scheduler.d.ts +0 -47
- package/dist/animator/animation-scheduler.d.ts.map +0 -1
- package/dist/test-utils.d.ts +0 -46
- package/dist/test-utils.d.ts.map +0 -1
|
@@ -1,25 +1,19 @@
|
|
|
1
1
|
import { p as b, g as L } from "../jaemin-BWkrXq0V.js";
|
|
2
|
-
import { a as
|
|
3
|
-
const
|
|
4
|
-
function q(t, n = 0) {
|
|
5
|
-
const i = Math.pow(10, n);
|
|
6
|
-
return Math.round(t * i) / i;
|
|
7
|
-
}
|
|
8
|
-
const G = { stiffness: 80, damping: 25 }, j = { stiffness: 75, damping: 25 }, K = 300, Z = 10, J = "horizontal", Q = "#000000", vt = (t = {}) => {
|
|
2
|
+
import { a as Mt } from "../jaemin-BWkrXq0V.js";
|
|
3
|
+
const O = (t) => new Promise((n) => setTimeout(n, t)), q = { stiffness: 80, damping: 25 }, G = { stiffness: 75, damping: 25 }, j = 300, K = 10, Z = "horizontal", J = "#000000", It = (t = {}) => {
|
|
9
4
|
const {
|
|
10
|
-
inSpring: n =
|
|
11
|
-
outSpring:
|
|
12
|
-
transitionDelay: d =
|
|
13
|
-
blindCount:
|
|
14
|
-
direction:
|
|
15
|
-
|
|
16
|
-
blindColor: e = Q
|
|
5
|
+
inSpring: n = G,
|
|
6
|
+
outSpring: r = q,
|
|
7
|
+
transitionDelay: d = j,
|
|
8
|
+
blindCount: s = K,
|
|
9
|
+
direction: l = Z,
|
|
10
|
+
blindColor: c = J
|
|
17
11
|
} = t;
|
|
18
|
-
let
|
|
19
|
-
const
|
|
20
|
-
window.getComputedStyle(
|
|
21
|
-
const
|
|
22
|
-
|
|
12
|
+
let i, o = null;
|
|
13
|
+
const a = (e, g, y = "left") => {
|
|
14
|
+
window.getComputedStyle(e).position === "static" && (e.style.position = "relative");
|
|
15
|
+
const p = document.createElement("div");
|
|
16
|
+
p.className = "blind-container", p.style.cssText = `
|
|
23
17
|
position: absolute;
|
|
24
18
|
top: 0;
|
|
25
19
|
left: 0;
|
|
@@ -29,199 +23,210 @@ const G = { stiffness: 80, damping: 25 }, j = { stiffness: 75, damping: 25 }, K
|
|
|
29
23
|
z-index: 9999;
|
|
30
24
|
overflow: hidden;
|
|
31
25
|
`;
|
|
32
|
-
const
|
|
33
|
-
for (let
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
36
|
-
const
|
|
37
|
-
|
|
26
|
+
const h = [];
|
|
27
|
+
for (let f = 0; f < s; f++) {
|
|
28
|
+
const $ = document.createElement("div");
|
|
29
|
+
if (l === "horizontal") {
|
|
30
|
+
const w = 100 / s, x = `calc(${w}% + 1px)`;
|
|
31
|
+
$.style.cssText = `
|
|
38
32
|
position: absolute;
|
|
39
|
-
top: ${
|
|
33
|
+
top: ${w * f}%;
|
|
40
34
|
left: 0;
|
|
41
35
|
width: 100%;
|
|
42
|
-
height: ${
|
|
43
|
-
background: ${
|
|
36
|
+
height: ${x};
|
|
37
|
+
background: ${c};
|
|
44
38
|
transform: scaleX(${g === "hidden" ? 0 : 1});
|
|
45
|
-
transform-origin: ${
|
|
39
|
+
transform-origin: ${y} center;
|
|
46
40
|
will-change: transform;
|
|
47
41
|
`;
|
|
48
42
|
} else {
|
|
49
|
-
const
|
|
50
|
-
|
|
43
|
+
const w = 100 / s, x = `calc(${w}% + 1px)`;
|
|
44
|
+
$.style.cssText = `
|
|
51
45
|
position: absolute;
|
|
52
46
|
top: 0;
|
|
53
|
-
left: ${
|
|
54
|
-
width: ${
|
|
47
|
+
left: ${w * f}%;
|
|
48
|
+
width: ${x};
|
|
55
49
|
height: 100%;
|
|
56
|
-
background: ${
|
|
50
|
+
background: ${c};
|
|
57
51
|
transform: scaleY(${g === "hidden" ? 0 : 1});
|
|
58
|
-
transform-origin: ${
|
|
52
|
+
transform-origin: ${y === "left" ? "top" : "bottom"} center;
|
|
59
53
|
will-change: transform;
|
|
60
54
|
`;
|
|
61
55
|
}
|
|
62
|
-
|
|
56
|
+
h.push($), p.appendChild($);
|
|
63
57
|
}
|
|
64
|
-
return
|
|
58
|
+
return e.appendChild(p), { container: p, blinds: h };
|
|
65
59
|
};
|
|
66
60
|
return {
|
|
67
61
|
out: () => {
|
|
68
|
-
let
|
|
69
|
-
return
|
|
70
|
-
|
|
62
|
+
let e = null;
|
|
63
|
+
return i = new Promise((y) => {
|
|
64
|
+
o = y;
|
|
71
65
|
}), {
|
|
72
|
-
springs: Array.from({ length:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (!
|
|
79
|
-
const f = p
|
|
80
|
-
|
|
66
|
+
springs: Array.from({ length: s }, (y, u) => ({
|
|
67
|
+
spring: r,
|
|
68
|
+
offset: 0.2,
|
|
69
|
+
tick: (p) => {
|
|
70
|
+
if (!e) return;
|
|
71
|
+
const h = e.blinds[u];
|
|
72
|
+
if (!h) return;
|
|
73
|
+
const f = 1 - p;
|
|
74
|
+
l === "horizontal" ? h.style.transform = `scaleX(${f})` : h.style.transform = `scaleY(${f})`;
|
|
81
75
|
}
|
|
82
76
|
})),
|
|
83
|
-
schedule: "
|
|
84
|
-
prepare: (
|
|
85
|
-
b(
|
|
77
|
+
schedule: "stagger",
|
|
78
|
+
prepare: (y) => {
|
|
79
|
+
b(y), y.style.zIndex = "1000", e = a(y, "hidden", "left");
|
|
86
80
|
},
|
|
87
81
|
onStart: () => {
|
|
88
82
|
},
|
|
89
83
|
onEnd: () => {
|
|
90
|
-
|
|
84
|
+
o && o();
|
|
91
85
|
}
|
|
92
86
|
};
|
|
93
87
|
},
|
|
94
88
|
in: () => {
|
|
95
|
-
let
|
|
89
|
+
let e = null;
|
|
96
90
|
return {
|
|
97
|
-
springs: Array.from({ length:
|
|
98
|
-
from: 1,
|
|
99
|
-
to: 0,
|
|
91
|
+
springs: Array.from({ length: s }, (y, u) => ({
|
|
100
92
|
spring: n,
|
|
101
|
-
offset:
|
|
102
|
-
tick: (
|
|
103
|
-
if (!
|
|
104
|
-
const
|
|
105
|
-
|
|
93
|
+
offset: 0.2,
|
|
94
|
+
tick: (p) => {
|
|
95
|
+
if (!e) return;
|
|
96
|
+
const h = e.blinds[u];
|
|
97
|
+
if (!h) return;
|
|
98
|
+
const f = 1 - p;
|
|
99
|
+
l === "horizontal" ? h.style.transform = `scaleX(${f})` : h.style.transform = `scaleY(${f})`;
|
|
106
100
|
}
|
|
107
101
|
})),
|
|
108
|
-
schedule: "
|
|
109
|
-
prepare: (
|
|
110
|
-
|
|
102
|
+
schedule: "stagger",
|
|
103
|
+
prepare: (y) => {
|
|
104
|
+
y.style.position = "relative", y.style.zIndex = "0", e = a(y, "closed", "right");
|
|
111
105
|
},
|
|
112
106
|
onStart: () => {
|
|
113
107
|
},
|
|
114
108
|
wait: async () => {
|
|
115
|
-
|
|
109
|
+
i && await i, await O(d);
|
|
116
110
|
},
|
|
117
111
|
onEnd: () => {
|
|
118
|
-
|
|
112
|
+
e && e.container && e.container.remove();
|
|
119
113
|
}
|
|
120
114
|
};
|
|
121
115
|
}
|
|
122
116
|
};
|
|
123
|
-
},
|
|
117
|
+
}, Q = {
|
|
124
118
|
stiffness: 150,
|
|
125
119
|
damping: 20
|
|
126
|
-
},
|
|
120
|
+
}, R = {
|
|
127
121
|
stiffness: 100,
|
|
128
122
|
damping: 20
|
|
129
123
|
}, Dt = (t = {}) => {
|
|
130
|
-
var
|
|
131
|
-
const { opacity: n = !1, direction:
|
|
132
|
-
stiffness: ((
|
|
124
|
+
var l, c;
|
|
125
|
+
const { opacity: n = !1, direction: r = "enter" } = t, d = r === "enter" ? Q : R, s = {
|
|
126
|
+
stiffness: ((l = t.spring) == null ? void 0 : l.stiffness) ?? d.stiffness,
|
|
133
127
|
damping: ((c = t.spring) == null ? void 0 : c.damping) ?? d.damping
|
|
134
128
|
};
|
|
135
|
-
return
|
|
136
|
-
in: (
|
|
137
|
-
spring:
|
|
129
|
+
return r === "enter" ? {
|
|
130
|
+
in: (i) => ({
|
|
131
|
+
spring: s,
|
|
138
132
|
prepare: () => {
|
|
139
|
-
|
|
133
|
+
i.style.willChange = n ? "transform, opacity" : "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint";
|
|
140
134
|
},
|
|
141
|
-
|
|
142
|
-
|
|
135
|
+
css: (o) => {
|
|
136
|
+
const a = {
|
|
137
|
+
transform: `translate3d(${(1 - o) * 100}%, 0, 0)`
|
|
138
|
+
};
|
|
139
|
+
return n && (a.opacity = o), a;
|
|
143
140
|
},
|
|
144
141
|
onEnd: () => {
|
|
145
|
-
|
|
142
|
+
i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "";
|
|
146
143
|
}
|
|
147
144
|
}),
|
|
148
|
-
out: (
|
|
149
|
-
spring:
|
|
150
|
-
prepare: (
|
|
151
|
-
b(
|
|
145
|
+
out: (i, o) => ({
|
|
146
|
+
spring: s,
|
|
147
|
+
prepare: (a) => {
|
|
148
|
+
b(a, o), a.style.zIndex = "-1", a.style.willChange = n ? "transform, opacity" : "transform", a.style.backfaceVisibility = "hidden", a.style.contain = "layout paint", a.style.pointerEvents = "none";
|
|
152
149
|
},
|
|
153
|
-
|
|
154
|
-
e
|
|
150
|
+
css: (a) => {
|
|
151
|
+
const e = {
|
|
152
|
+
transform: `translate3d(${-(1 - a) * 20}%, 0, 0)`
|
|
153
|
+
};
|
|
154
|
+
return n && (e.opacity = a), e;
|
|
155
155
|
}
|
|
156
156
|
})
|
|
157
157
|
} : {
|
|
158
|
-
in: (
|
|
159
|
-
spring:
|
|
158
|
+
in: (i) => ({
|
|
159
|
+
spring: s,
|
|
160
160
|
prepare: () => {
|
|
161
|
-
|
|
161
|
+
i.style.willChange = n ? "transform, opacity" : "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint";
|
|
162
162
|
},
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
css: (o) => {
|
|
164
|
+
const a = {
|
|
165
|
+
transform: `translate3d(${-(1 - o) * 20}%, 0, 0)`
|
|
166
|
+
};
|
|
167
|
+
return n && (a.opacity = o), a;
|
|
165
168
|
},
|
|
166
169
|
onEnd: () => {
|
|
167
|
-
|
|
170
|
+
i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "";
|
|
168
171
|
}
|
|
169
172
|
}),
|
|
170
|
-
out: (
|
|
171
|
-
spring:
|
|
172
|
-
prepare: (
|
|
173
|
-
b(
|
|
173
|
+
out: (i, o) => ({
|
|
174
|
+
spring: s,
|
|
175
|
+
prepare: (a) => {
|
|
176
|
+
b(a, o), a.style.zIndex = "100", a.style.willChange = n ? "transform, opacity" : "transform", a.style.backfaceVisibility = "hidden", a.style.contain = "layout paint", a.style.pointerEvents = "none";
|
|
174
177
|
},
|
|
175
|
-
|
|
176
|
-
e
|
|
178
|
+
css: (a) => {
|
|
179
|
+
const e = {
|
|
180
|
+
transform: `translate3d(${(1 - a) * 100}%, 0, 0)`
|
|
181
|
+
};
|
|
182
|
+
return n && (e.opacity = a), e;
|
|
177
183
|
}
|
|
178
184
|
})
|
|
179
185
|
};
|
|
180
|
-
},
|
|
186
|
+
}, tt = { stiffness: 65, damping: 16 }, nt = { stiffness: 65, damping: 14 }, et = 0, vt = (t = {}) => {
|
|
181
187
|
const {
|
|
182
|
-
inSpring: n =
|
|
183
|
-
outSpring:
|
|
184
|
-
transitionDelay: d =
|
|
188
|
+
inSpring: n = nt,
|
|
189
|
+
outSpring: r = tt,
|
|
190
|
+
transitionDelay: d = et
|
|
185
191
|
} = t;
|
|
186
|
-
let
|
|
192
|
+
let s, l = null;
|
|
187
193
|
return {
|
|
188
194
|
in: (c) => ({
|
|
189
195
|
spring: n,
|
|
190
|
-
prepare: (
|
|
191
|
-
|
|
196
|
+
prepare: () => {
|
|
197
|
+
c.style.willChange = "opacity";
|
|
192
198
|
},
|
|
193
199
|
wait: async () => {
|
|
194
|
-
|
|
195
|
-
},
|
|
196
|
-
tick: (e) => {
|
|
197
|
-
const a = q(e, 2);
|
|
198
|
-
c.style.opacity = a.toString();
|
|
200
|
+
s && (await s, await O(d));
|
|
199
201
|
},
|
|
202
|
+
css: (i) => ({
|
|
203
|
+
opacity: i
|
|
204
|
+
}),
|
|
200
205
|
onEnd: () => {
|
|
201
206
|
c.style.willChange = "auto";
|
|
202
207
|
}
|
|
203
208
|
}),
|
|
204
|
-
out: (c,
|
|
205
|
-
|
|
209
|
+
out: (c, i) => (s = new Promise((o) => {
|
|
210
|
+
l = o;
|
|
206
211
|
}), {
|
|
207
|
-
spring:
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
},
|
|
212
|
+
spring: r,
|
|
213
|
+
css: (o) => ({
|
|
214
|
+
opacity: o
|
|
215
|
+
}),
|
|
211
216
|
prepare: () => {
|
|
212
|
-
b(c,
|
|
217
|
+
b(c, i), c.style.willChange = "opacity";
|
|
213
218
|
},
|
|
214
219
|
onEnd: () => {
|
|
215
|
-
|
|
220
|
+
l && l(), c.style.willChange = "auto";
|
|
216
221
|
}
|
|
217
222
|
})
|
|
218
223
|
};
|
|
219
|
-
},
|
|
224
|
+
}, it = {
|
|
220
225
|
stiffness: 5,
|
|
221
226
|
// Lower stiffness for smoother motion
|
|
222
227
|
damping: 3.5
|
|
223
228
|
// Lower damping for more fluid movement
|
|
224
|
-
},
|
|
229
|
+
}, st = 0.8, rt = "white", m = {
|
|
225
230
|
start: 0,
|
|
226
231
|
end: 0.45
|
|
227
232
|
}, E = {
|
|
@@ -230,38 +235,38 @@ const G = { stiffness: 80, damping: 25 }, j = { stiffness: 75, damping: 25 }, K
|
|
|
230
235
|
}, A = {
|
|
231
236
|
start: 0.2,
|
|
232
237
|
end: 0.9
|
|
233
|
-
},
|
|
234
|
-
var
|
|
235
|
-
const n = (t == null ? void 0 : t.spring) ??
|
|
238
|
+
}, Ft = (t) => {
|
|
239
|
+
var s;
|
|
240
|
+
const n = (t == null ? void 0 : t.spring) ?? it, r = (t == null ? void 0 : t.scale) ?? st, d = ((s = t == null ? void 0 : t.border) == null ? void 0 : s.color) ?? rt;
|
|
236
241
|
return {
|
|
237
|
-
out: async (
|
|
238
|
-
const
|
|
239
|
-
...
|
|
240
|
-
top:
|
|
242
|
+
out: async (l, c) => {
|
|
243
|
+
const i = _(c), o = L(document.body, c.positionedParent), a = at(d, {
|
|
244
|
+
...i,
|
|
245
|
+
top: o.top
|
|
241
246
|
});
|
|
242
|
-
let
|
|
247
|
+
let e = 1, g = -i.top;
|
|
243
248
|
return {
|
|
244
249
|
spring: n,
|
|
245
250
|
prepare: () => {
|
|
246
|
-
b(
|
|
247
|
-
for (const
|
|
248
|
-
c.positionedParent.appendChild(
|
|
251
|
+
b(l), P(l, i), I(l, i), ot(l, i);
|
|
252
|
+
for (const y of a)
|
|
253
|
+
c.positionedParent.appendChild(y);
|
|
249
254
|
},
|
|
250
255
|
onEnd: () => {
|
|
251
|
-
|
|
252
|
-
for (const
|
|
253
|
-
c.positionedParent.removeChild(
|
|
256
|
+
l.style.clipPath = "", l.style.transformOrigin = "", setTimeout(() => {
|
|
257
|
+
for (const y of a)
|
|
258
|
+
c.positionedParent.removeChild(y);
|
|
254
259
|
}, 1e3);
|
|
255
260
|
},
|
|
256
|
-
tick: (
|
|
257
|
-
const u = 1 -
|
|
261
|
+
tick: (y) => {
|
|
262
|
+
const u = 1 - y;
|
|
258
263
|
if (m.start <= u && u <= m.end) {
|
|
259
264
|
const f = C(
|
|
260
265
|
u,
|
|
261
266
|
m.start,
|
|
262
267
|
m.end
|
|
263
268
|
);
|
|
264
|
-
|
|
269
|
+
e = 1 - (1 - r) * f;
|
|
265
270
|
}
|
|
266
271
|
if (E.start <= u && u <= E.end) {
|
|
267
272
|
const f = C(
|
|
@@ -269,7 +274,7 @@ const G = { stiffness: 80, damping: 25 }, j = { stiffness: 75, damping: 25 }, K
|
|
|
269
274
|
E.start,
|
|
270
275
|
E.end
|
|
271
276
|
);
|
|
272
|
-
|
|
277
|
+
e = r + (1 - r) * f;
|
|
273
278
|
}
|
|
274
279
|
if (A.start <= u && u <= A.end) {
|
|
275
280
|
const f = C(
|
|
@@ -277,95 +282,95 @@ const G = { stiffness: 80, damping: 25 }, j = { stiffness: 75, damping: 25 }, K
|
|
|
277
282
|
A.start,
|
|
278
283
|
A.end
|
|
279
284
|
);
|
|
280
|
-
|
|
285
|
+
g = -i.top - i.height * f;
|
|
281
286
|
}
|
|
282
|
-
|
|
283
|
-
const
|
|
284
|
-
|
|
287
|
+
l.style.transform = `translateY(${g}px) scale(${e})`;
|
|
288
|
+
const p = (i.width - i.width * e) / 2, h = (i.height - i.height * e) / 2;
|
|
289
|
+
lt(a, p, h);
|
|
285
290
|
}
|
|
286
291
|
};
|
|
287
292
|
},
|
|
288
|
-
in: async (
|
|
289
|
-
const
|
|
290
|
-
let
|
|
293
|
+
in: async (l, c) => {
|
|
294
|
+
const i = _(c);
|
|
295
|
+
let o = r, a = -i.top + i.height;
|
|
291
296
|
return {
|
|
292
297
|
spring: n,
|
|
293
298
|
prepare: () => {
|
|
294
|
-
P(
|
|
299
|
+
P(l, i), I(l, i), l.style.transform = `translateY(${-i.top + i.height}px) scale(${r})`;
|
|
295
300
|
},
|
|
296
301
|
onEnd: () => {
|
|
297
|
-
|
|
302
|
+
l.style.clipPath = "", l.style.transformOrigin = "", l.style.transform = "";
|
|
298
303
|
},
|
|
299
|
-
tick: (
|
|
300
|
-
if (m.start <=
|
|
301
|
-
const
|
|
302
|
-
|
|
304
|
+
tick: (e) => {
|
|
305
|
+
if (m.start <= e && e <= m.end) {
|
|
306
|
+
const g = C(
|
|
307
|
+
e,
|
|
303
308
|
m.start,
|
|
304
309
|
m.end
|
|
305
310
|
);
|
|
306
|
-
|
|
311
|
+
o = 1 - (1 - r) * g;
|
|
307
312
|
}
|
|
308
|
-
if (E.start <=
|
|
309
|
-
const
|
|
310
|
-
|
|
313
|
+
if (E.start <= e && e <= E.end) {
|
|
314
|
+
const g = C(
|
|
315
|
+
e,
|
|
311
316
|
E.start,
|
|
312
317
|
E.end
|
|
313
318
|
);
|
|
314
|
-
|
|
319
|
+
o = r + (1 - r) * g;
|
|
315
320
|
}
|
|
316
|
-
if (A.start <=
|
|
317
|
-
const
|
|
318
|
-
|
|
321
|
+
if (A.start <= e && e <= A.end) {
|
|
322
|
+
const g = C(
|
|
323
|
+
e,
|
|
319
324
|
A.start,
|
|
320
325
|
A.end
|
|
321
326
|
);
|
|
322
|
-
|
|
327
|
+
a = -i.top + i.height * (1 - g);
|
|
323
328
|
}
|
|
324
|
-
|
|
329
|
+
l.style.transform = `translateY(${a}px) scale(${o})`;
|
|
325
330
|
}
|
|
326
331
|
};
|
|
327
332
|
}
|
|
328
333
|
};
|
|
329
334
|
};
|
|
330
|
-
function
|
|
331
|
-
const d = n * 0.7,
|
|
332
|
-
t.topLeft.style.transform = `translate(${d}px, ${
|
|
335
|
+
function lt(t, n, r) {
|
|
336
|
+
const d = n * 0.7, s = r * 0.7;
|
|
337
|
+
t.topLeft.style.transform = `translate(${d}px, ${s}px)`, t.topRight.style.transform = `translate(${-d}px, ${s}px)`, t.bottomLeft.style.transform = `translate(${d}px, ${-s}px)`, t.bottomRight.style.transform = `translate(${-d}px, ${-s}px)`;
|
|
333
338
|
}
|
|
334
|
-
function
|
|
335
|
-
const r = document.createElement("div");
|
|
336
|
-
r.style.position = "fixed", r.style.pointerEvents = "none", r.style.zIndex = "9999", r.style.top = `${n.top - 1}px`, r.style.left = `${n.left - 1}px`, r.style.width = "15px", r.style.height = "15px";
|
|
339
|
+
function at(t = "white", n) {
|
|
337
340
|
const s = document.createElement("div");
|
|
338
|
-
s.style.position = "
|
|
339
|
-
const c = document.createElement("div");
|
|
340
|
-
c.style.position = "absolute", c.style.width = "1px", c.style.height = "15px", c.style.backgroundColor = t, c.style.top = "0", c.style.left = "0", r.appendChild(s), r.appendChild(c);
|
|
341
|
-
const e = document.createElement("div");
|
|
342
|
-
e.style.position = "fixed", e.style.pointerEvents = "none", e.style.zIndex = "9999", e.style.top = `${n.top - 1}px`, e.style.left = `${n.left + n.width - 15 + 1}px`, e.style.width = "15px", e.style.height = "15px";
|
|
343
|
-
const a = document.createElement("div");
|
|
344
|
-
a.style.position = "absolute", a.style.width = "15px", a.style.height = "1px", a.style.backgroundColor = t, a.style.top = "0", a.style.right = "0";
|
|
341
|
+
s.style.position = "fixed", s.style.pointerEvents = "none", s.style.zIndex = "9999", s.style.top = `${n.top - 1}px`, s.style.left = `${n.left - 1}px`, s.style.width = "15px", s.style.height = "15px";
|
|
345
342
|
const l = document.createElement("div");
|
|
346
|
-
l.style.position = "absolute", l.style.width = "
|
|
343
|
+
l.style.position = "absolute", l.style.width = "15px", l.style.height = "1px", l.style.backgroundColor = t, l.style.top = "0", l.style.left = "0";
|
|
344
|
+
const c = document.createElement("div");
|
|
345
|
+
c.style.position = "absolute", c.style.width = "1px", c.style.height = "15px", c.style.backgroundColor = t, c.style.top = "0", c.style.left = "0", s.appendChild(l), s.appendChild(c);
|
|
346
|
+
const i = document.createElement("div");
|
|
347
|
+
i.style.position = "fixed", i.style.pointerEvents = "none", i.style.zIndex = "9999", i.style.top = `${n.top - 1}px`, i.style.left = `${n.left + n.width - 15 + 1}px`, i.style.width = "15px", i.style.height = "15px";
|
|
347
348
|
const o = document.createElement("div");
|
|
348
|
-
o.style.position = "
|
|
349
|
-
const
|
|
350
|
-
|
|
349
|
+
o.style.position = "absolute", o.style.width = "15px", o.style.height = "1px", o.style.backgroundColor = t, o.style.top = "0", o.style.right = "0";
|
|
350
|
+
const a = document.createElement("div");
|
|
351
|
+
a.style.position = "absolute", a.style.width = "1px", a.style.height = "15px", a.style.backgroundColor = t, a.style.top = "0", a.style.right = "0", i.appendChild(o), i.appendChild(a);
|
|
352
|
+
const e = document.createElement("div");
|
|
353
|
+
e.style.position = "fixed", e.style.pointerEvents = "none", e.style.zIndex = "9999", e.style.top = `${n.top + n.height - 15 + 1}px`, e.style.left = `${n.left - 1}px`, e.style.width = "15px", e.style.height = "15px";
|
|
351
354
|
const g = document.createElement("div");
|
|
352
|
-
g.style.position = "absolute", g.style.width = "
|
|
355
|
+
g.style.position = "absolute", g.style.width = "15px", g.style.height = "1px", g.style.backgroundColor = t, g.style.bottom = "0", g.style.left = "0";
|
|
356
|
+
const y = document.createElement("div");
|
|
357
|
+
y.style.position = "absolute", y.style.width = "1px", y.style.height = "15px", y.style.backgroundColor = t, y.style.bottom = "0", y.style.left = "0", e.appendChild(g), e.appendChild(y);
|
|
353
358
|
const u = document.createElement("div");
|
|
354
359
|
u.style.position = "fixed", u.style.pointerEvents = "none", u.style.zIndex = "9999", u.style.top = `${n.top + n.height - 15 + 1}px`, u.style.left = `${n.left + n.width - 15 + 1}px`, u.style.width = "15px", u.style.height = "15px";
|
|
355
|
-
const
|
|
356
|
-
|
|
360
|
+
const p = document.createElement("div");
|
|
361
|
+
p.style.position = "absolute", p.style.width = "15px", p.style.height = "1px", p.style.backgroundColor = t, p.style.bottom = "0", p.style.right = "0";
|
|
357
362
|
const h = document.createElement("div");
|
|
358
|
-
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(
|
|
359
|
-
topLeft:
|
|
360
|
-
topRight:
|
|
361
|
-
bottomLeft:
|
|
363
|
+
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(p), u.appendChild(h), {
|
|
364
|
+
topLeft: s,
|
|
365
|
+
topRight: i,
|
|
366
|
+
bottomLeft: e,
|
|
362
367
|
bottomRight: u,
|
|
363
368
|
*[Symbol.iterator]() {
|
|
364
|
-
yield
|
|
369
|
+
yield s, yield i, yield e, yield u;
|
|
365
370
|
}
|
|
366
371
|
};
|
|
367
372
|
}
|
|
368
|
-
function
|
|
373
|
+
function _(t) {
|
|
369
374
|
const n = L(document.body, t.positionedParent);
|
|
370
375
|
return {
|
|
371
376
|
top: t.scroll.y,
|
|
@@ -375,10 +380,10 @@ function I(t) {
|
|
|
375
380
|
};
|
|
376
381
|
}
|
|
377
382
|
function P(t, n) {
|
|
378
|
-
const
|
|
379
|
-
t.style.transformOrigin = `${
|
|
383
|
+
const r = n.left + n.width / 2, d = n.top + n.height / 2;
|
|
384
|
+
t.style.transformOrigin = `${r}px ${d}px`;
|
|
380
385
|
}
|
|
381
|
-
function
|
|
386
|
+
function I(t, n) {
|
|
382
387
|
t.style.clipPath = `polygon(
|
|
383
388
|
${n.left}px ${n.top}px,
|
|
384
389
|
${n.left + n.width}px ${n.top}px,
|
|
@@ -386,65 +391,65 @@ function v(t, n) {
|
|
|
386
391
|
${n.left}px ${n.top + n.height}px
|
|
387
392
|
)`;
|
|
388
393
|
}
|
|
389
|
-
function
|
|
394
|
+
function ot(t, n) {
|
|
390
395
|
t.style.transform = `translateY(${-n.top}px)`;
|
|
391
396
|
}
|
|
392
|
-
function C(t, n,
|
|
393
|
-
return t <= n ? 0 : t >=
|
|
397
|
+
function C(t, n, r) {
|
|
398
|
+
return t <= n ? 0 : t >= r ? 1 : (t - n) / (r - n);
|
|
394
399
|
}
|
|
395
|
-
function
|
|
400
|
+
function ct(t, n) {
|
|
396
401
|
return t.querySelector(`[data-hero-key="${n}"]`);
|
|
397
402
|
}
|
|
398
|
-
const
|
|
399
|
-
var c,
|
|
403
|
+
const Yt = (t = {}) => {
|
|
404
|
+
var c, i;
|
|
400
405
|
const n = {
|
|
401
406
|
stiffness: ((c = t.spring) == null ? void 0 : c.stiffness) ?? 300,
|
|
402
|
-
damping: ((
|
|
403
|
-
},
|
|
404
|
-
let
|
|
407
|
+
damping: ((i = t.spring) == null ? void 0 : i.damping) ?? 30
|
|
408
|
+
}, r = t.timeout ?? 300, d = t.maxDistance ?? 700;
|
|
409
|
+
let s = null, l = null;
|
|
405
410
|
return {
|
|
406
|
-
in: async (
|
|
407
|
-
const
|
|
408
|
-
if (
|
|
411
|
+
in: async (o, a) => {
|
|
412
|
+
const e = o, g = Array.from(e.querySelectorAll("[data-hero-key]"));
|
|
413
|
+
if (g.length === 0)
|
|
409
414
|
return {
|
|
410
415
|
spring: n,
|
|
411
416
|
tick: () => {
|
|
412
417
|
}
|
|
413
418
|
// No hero elements, skip animation
|
|
414
419
|
};
|
|
415
|
-
if (!await new Promise((
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
},
|
|
419
|
-
}) || !
|
|
420
|
-
return
|
|
420
|
+
if (!await new Promise((p) => {
|
|
421
|
+
s ? p(!0) : (l = p, setTimeout(() => {
|
|
422
|
+
l = null, p(!1);
|
|
423
|
+
}, r));
|
|
424
|
+
}) || !s)
|
|
425
|
+
return s = null, {
|
|
421
426
|
spring: n,
|
|
422
427
|
tick: () => {
|
|
423
428
|
}
|
|
424
429
|
// No fromNode, skip animation
|
|
425
430
|
};
|
|
426
|
-
const u =
|
|
427
|
-
const h =
|
|
431
|
+
const u = g.map((p) => {
|
|
432
|
+
const h = p.getAttribute("data-hero-key");
|
|
428
433
|
if (!h) return null;
|
|
429
|
-
const f =
|
|
434
|
+
const f = ct(s, h);
|
|
430
435
|
if (!f) return null;
|
|
431
|
-
const $ =
|
|
436
|
+
const $ = p, w = L(s, f), x = L(e, $), U = w.left - x.left - a.scrollOffset.x, V = w.top - x.top - a.scrollOffset.y, W = w.width / x.width, H = w.height / x.height, B = $.style.transform, z = $.style.position, X = $.style.transformOrigin, M = $.style.zIndex, N = $.style.willChange;
|
|
432
437
|
return {
|
|
433
438
|
toEl: $,
|
|
434
|
-
dx:
|
|
435
|
-
dy:
|
|
436
|
-
dw:
|
|
437
|
-
dh:
|
|
439
|
+
dx: U,
|
|
440
|
+
dy: V,
|
|
441
|
+
dw: W,
|
|
442
|
+
dh: H,
|
|
438
443
|
originalTransform: B,
|
|
439
|
-
originalPosition:
|
|
440
|
-
originalTransformOrigin:
|
|
441
|
-
originalZIndex:
|
|
442
|
-
originalWillChange:
|
|
444
|
+
originalPosition: z,
|
|
445
|
+
originalTransformOrigin: X,
|
|
446
|
+
originalZIndex: M,
|
|
447
|
+
originalWillChange: N
|
|
443
448
|
};
|
|
444
449
|
}).filter(
|
|
445
|
-
(
|
|
450
|
+
(p) => p !== null && Math.abs(p.dy) <= d
|
|
446
451
|
);
|
|
447
|
-
return
|
|
452
|
+
return s = null, u.length === 0 ? {
|
|
448
453
|
spring: n,
|
|
449
454
|
tick: () => {
|
|
450
455
|
}
|
|
@@ -452,140 +457,142 @@ const Ot = (t = {}) => {
|
|
|
452
457
|
} : {
|
|
453
458
|
spring: n,
|
|
454
459
|
prepare: () => {
|
|
455
|
-
u.forEach(({ toEl:
|
|
456
|
-
|
|
460
|
+
u.forEach(({ toEl: p }) => {
|
|
461
|
+
p.style.position = "relative", p.style.transformOrigin = "top left", p.style.zIndex = "1000", p.style.willChange = "transform";
|
|
457
462
|
});
|
|
458
463
|
},
|
|
459
|
-
tick: (
|
|
464
|
+
tick: (p) => {
|
|
460
465
|
u.forEach(({ toEl: h, dx: f, dy: $, dw: w, dh: x }) => {
|
|
461
|
-
h.style.transform = `translate(${(1 -
|
|
466
|
+
h.style.transform = `translate(${(1 - p) * f}px,${(1 - p) * $}px) scale(${p + (1 - p) * w}, ${p + (1 - p) * x})`;
|
|
462
467
|
});
|
|
463
468
|
},
|
|
464
469
|
onEnd: () => {
|
|
465
470
|
u.forEach(
|
|
466
471
|
({
|
|
467
|
-
toEl:
|
|
472
|
+
toEl: p,
|
|
468
473
|
originalTransform: h,
|
|
469
474
|
originalPosition: f,
|
|
470
475
|
originalTransformOrigin: $,
|
|
471
476
|
originalZIndex: w,
|
|
472
477
|
originalWillChange: x
|
|
473
478
|
}) => {
|
|
474
|
-
|
|
479
|
+
p.style.transform = h, p.style.position = f, p.style.transformOrigin = $, p.style.zIndex = w, p.style.willChange = x;
|
|
475
480
|
}
|
|
476
481
|
);
|
|
477
482
|
}
|
|
478
483
|
};
|
|
479
484
|
},
|
|
480
|
-
out: async (
|
|
485
|
+
out: async (o) => ({
|
|
481
486
|
onStart: () => {
|
|
482
|
-
|
|
487
|
+
s = o, l && (l(!0), l = null);
|
|
488
|
+
},
|
|
489
|
+
tick: () => {
|
|
483
490
|
},
|
|
484
|
-
prepare: (
|
|
485
|
-
b(
|
|
491
|
+
prepare: (a) => {
|
|
492
|
+
b(a), a.style.opacity = "0";
|
|
486
493
|
}
|
|
487
494
|
})
|
|
488
495
|
};
|
|
489
496
|
};
|
|
490
|
-
function
|
|
497
|
+
function dt({
|
|
491
498
|
detailRect: t,
|
|
492
499
|
galleryRect: n,
|
|
493
|
-
pageRect:
|
|
500
|
+
pageRect: r,
|
|
494
501
|
scrollOffset: d
|
|
495
|
-
},
|
|
496
|
-
const
|
|
497
|
-
return
|
|
498
|
-
const h = 1 -
|
|
499
|
-
|
|
502
|
+
}, s) {
|
|
503
|
+
const l = n.left - t.left + (n.width - t.width) / 2 - d.x, c = n.top - t.top + (n.height - t.height) / 2 - d.y, i = n.width / t.width, o = n.height / t.height, a = Math.max(i, o), e = t.top / r.height * 100, g = (r.width - (t.left + t.width)) / r.width * 100, y = (r.height - (t.top + t.height)) / r.height * 100, u = t.left / r.width * 100;
|
|
504
|
+
return s.style.transformOrigin = `${t.left + t.width / 2}px ${t.top + t.height / 2}px`, (p) => {
|
|
505
|
+
const h = 1 - p, f = e * h, $ = g * h, w = y * h, x = u * h;
|
|
506
|
+
s.style.clipPath = `inset(${f}% ${$}% ${w}% ${x}%)`, s.style.transform = `translate(${l * h}px, ${c * h}px) scale(${1 + (a - 1) * h})`;
|
|
500
507
|
};
|
|
501
508
|
}
|
|
502
|
-
function
|
|
509
|
+
function ht({
|
|
503
510
|
detailRect: t,
|
|
504
511
|
galleryRect: n,
|
|
505
|
-
pageRect:
|
|
512
|
+
pageRect: r,
|
|
506
513
|
scrollOffset: d
|
|
507
|
-
},
|
|
508
|
-
const
|
|
509
|
-
return
|
|
510
|
-
const h = 1 -
|
|
511
|
-
|
|
514
|
+
}, s) {
|
|
515
|
+
const l = n.left - t.left + (n.width - t.width) / 2 + d.x, c = n.top - t.top + (n.height - t.height) / 2 + d.y, i = n.width / t.width, o = n.height / t.height, a = Math.min(i, o), e = t.top / r.height * 100, g = (r.width - (t.left + t.width)) / r.width * 100, y = (r.height - (t.top + t.height)) / r.height * 100, u = t.left / r.width * 100;
|
|
516
|
+
return s.style.transformOrigin = `${t.left + t.width / 2}px ${t.top + t.height / 2}px`, (p) => {
|
|
517
|
+
const h = 1 - p, f = e * h, $ = g * h, w = y * h, x = u * h;
|
|
518
|
+
s.style.clipPath = `inset(${f}% ${$}% ${w}% ${x}%)`, s.style.transform = `translate(${l * h - d.x}px, ${c * h - d.y}px) scale(${1 + (a - 1) * h})`;
|
|
512
519
|
};
|
|
513
520
|
}
|
|
514
|
-
function yt(t, n,
|
|
521
|
+
function yt(t, n, r) {
|
|
515
522
|
const d = t.querySelector(
|
|
516
523
|
"[data-instagram-detail-key]"
|
|
517
|
-
),
|
|
524
|
+
), s = n.querySelector(
|
|
518
525
|
"[data-instagram-detail-key]"
|
|
519
526
|
);
|
|
520
527
|
if (t.querySelectorAll("[data-instagram-detail-key]").length > 1 || n.querySelectorAll("[data-instagram-detail-key]").length > 1)
|
|
521
528
|
return null;
|
|
522
|
-
let
|
|
523
|
-
if (!d &&
|
|
524
|
-
c =
|
|
525
|
-
const
|
|
526
|
-
if (!
|
|
527
|
-
|
|
528
|
-
`[data-instagram-gallery-key="${
|
|
529
|
-
),
|
|
530
|
-
} else if (d && !
|
|
529
|
+
let l = null, c = null, i = !1;
|
|
530
|
+
if (!d && s) {
|
|
531
|
+
c = s;
|
|
532
|
+
const e = c.getAttribute("data-instagram-detail-key");
|
|
533
|
+
if (!e) return null;
|
|
534
|
+
l = t.querySelector(
|
|
535
|
+
`[data-instagram-gallery-key="${e}"]`
|
|
536
|
+
), l && (i = !0);
|
|
537
|
+
} else if (d && !s) {
|
|
531
538
|
c = d;
|
|
532
|
-
const
|
|
533
|
-
if (!
|
|
534
|
-
|
|
535
|
-
`[data-instagram-gallery-key="${
|
|
536
|
-
),
|
|
539
|
+
const e = c.getAttribute("data-instagram-detail-key");
|
|
540
|
+
if (!e) return null;
|
|
541
|
+
l = n.querySelector(
|
|
542
|
+
`[data-instagram-gallery-key="${e}"]`
|
|
543
|
+
), l && (i = !1);
|
|
537
544
|
}
|
|
538
|
-
if (!
|
|
545
|
+
if (!l || !c)
|
|
539
546
|
return null;
|
|
540
|
-
const
|
|
541
|
-
return
|
|
547
|
+
const o = L(i ? t : n, l), a = L(i ? n : t, c);
|
|
548
|
+
return i ? {
|
|
542
549
|
isEnterMode: !0,
|
|
543
|
-
inAnimation:
|
|
550
|
+
inAnimation: dt(
|
|
544
551
|
{
|
|
545
|
-
detailRect:
|
|
546
|
-
galleryRect:
|
|
552
|
+
detailRect: a,
|
|
553
|
+
galleryRect: o,
|
|
547
554
|
pageRect: n.getBoundingClientRect(),
|
|
548
|
-
scrollOffset:
|
|
555
|
+
scrollOffset: r
|
|
549
556
|
},
|
|
550
557
|
n
|
|
551
558
|
)
|
|
552
559
|
// No outAnimation - gallery stays visible
|
|
553
560
|
} : {
|
|
554
561
|
isEnterMode: !1,
|
|
555
|
-
outAnimation:
|
|
562
|
+
outAnimation: ht(
|
|
556
563
|
{
|
|
557
|
-
detailRect:
|
|
558
|
-
galleryRect:
|
|
564
|
+
detailRect: a,
|
|
565
|
+
galleryRect: o,
|
|
559
566
|
pageRect: t.getBoundingClientRect(),
|
|
560
|
-
scrollOffset:
|
|
567
|
+
scrollOffset: r
|
|
561
568
|
},
|
|
562
569
|
t
|
|
563
570
|
)
|
|
564
571
|
// No inAnimation - gallery stays visible
|
|
565
572
|
};
|
|
566
573
|
}
|
|
567
|
-
const
|
|
568
|
-
var c,
|
|
574
|
+
const Ot = (t = {}) => {
|
|
575
|
+
var c, i;
|
|
569
576
|
const n = {
|
|
570
577
|
stiffness: ((c = t.spring) == null ? void 0 : c.stiffness) ?? 150,
|
|
571
|
-
damping: ((
|
|
572
|
-
},
|
|
573
|
-
let d = null,
|
|
578
|
+
damping: ((i = t.spring) == null ? void 0 : i.damping) ?? 20
|
|
579
|
+
}, r = t.timeout ?? 300;
|
|
580
|
+
let d = null, s = null, l = null;
|
|
574
581
|
return {
|
|
575
|
-
in: async (
|
|
576
|
-
const
|
|
577
|
-
return !await new Promise((
|
|
578
|
-
d ?
|
|
579
|
-
|
|
580
|
-
},
|
|
582
|
+
in: async (o, { scrollOffset: a }) => {
|
|
583
|
+
const e = o;
|
|
584
|
+
return !await new Promise((y) => {
|
|
585
|
+
d ? y(!0) : (s = y, setTimeout(() => {
|
|
586
|
+
s = null, y(!1);
|
|
587
|
+
}, r));
|
|
581
588
|
}) || !d ? (d = null, {
|
|
582
589
|
spring: n,
|
|
583
590
|
tick: () => {
|
|
584
591
|
}
|
|
585
|
-
}) : (
|
|
592
|
+
}) : (l = yt(d, e, a), l ? (d = null, {
|
|
586
593
|
spring: n,
|
|
587
|
-
tick: (
|
|
588
|
-
|
|
594
|
+
tick: (y) => {
|
|
595
|
+
l != null && l.inAnimation && l.inAnimation(y);
|
|
589
596
|
}
|
|
590
597
|
}) : {
|
|
591
598
|
spring: n,
|
|
@@ -593,146 +600,146 @@ const Ut = (t = {}) => {
|
|
|
593
600
|
}
|
|
594
601
|
});
|
|
595
602
|
},
|
|
596
|
-
out: async (
|
|
603
|
+
out: async (o) => ({
|
|
597
604
|
spring: n,
|
|
598
605
|
onStart: () => {
|
|
599
|
-
d =
|
|
606
|
+
d = o, s && (s(!0), s = null);
|
|
600
607
|
},
|
|
601
|
-
prepare: (
|
|
602
|
-
b(
|
|
608
|
+
prepare: (a) => {
|
|
609
|
+
b(a), l != null && l.isEnterMode || (a.style.zIndex = "-1");
|
|
603
610
|
},
|
|
604
|
-
tick: (
|
|
605
|
-
|
|
611
|
+
tick: (a) => {
|
|
612
|
+
l != null && l.outAnimation && l.outAnimation(a);
|
|
606
613
|
}
|
|
607
614
|
})
|
|
608
615
|
};
|
|
609
616
|
};
|
|
610
|
-
function
|
|
617
|
+
function pt({
|
|
611
618
|
detailRect: t,
|
|
612
619
|
galleryRect: n,
|
|
613
|
-
pageRect:
|
|
620
|
+
pageRect: r,
|
|
614
621
|
scrollOffset: d
|
|
615
|
-
},
|
|
616
|
-
const
|
|
617
|
-
return
|
|
618
|
-
const h = 1 -
|
|
619
|
-
|
|
622
|
+
}, s) {
|
|
623
|
+
const l = n.left - t.left + (n.width - t.width) / 2 - d.x, c = n.top - t.top + (n.height - t.height) / 2 - d.y, i = n.width / t.width, o = n.height / t.height, a = Math.max(i, o), e = t.top / r.height * 100, g = (r.width - (t.left + t.width)) / r.width * 100, y = (r.height - (t.top + t.height)) / r.height * 100, u = t.left / r.width * 100;
|
|
624
|
+
return s.style.transformOrigin = `${t.left + t.width / 2}px ${t.top + t.height / 2}px`, (p) => {
|
|
625
|
+
const h = 1 - p, f = e * h, $ = g * h, w = y * h, x = u * h;
|
|
626
|
+
s.style.clipPath = `inset(${f}% ${$}% ${w}% ${x}%)`, s.style.transform = `translate(${l * h}px, ${c * h}px) scale(${1 + (a - 1) * h})`;
|
|
620
627
|
};
|
|
621
628
|
}
|
|
622
|
-
function
|
|
629
|
+
function ut({
|
|
623
630
|
galleryRect: t,
|
|
624
631
|
detailRect: n,
|
|
625
|
-
scrollOffset:
|
|
632
|
+
scrollOffset: r
|
|
626
633
|
}, d) {
|
|
627
|
-
const
|
|
628
|
-
return (
|
|
634
|
+
const s = n.left - t.left + (n.width - t.width) / 2 + r.x, l = n.top - t.top + (n.height - t.height) / 2 + r.y, c = n.width / t.width, i = n.height / t.height, o = Math.max(c, i);
|
|
635
|
+
return (a) => {
|
|
629
636
|
d.style.transformOrigin = `${t.left + t.width / 2}px ${t.top + t.height / 2}px`;
|
|
630
|
-
const
|
|
631
|
-
d.style.transform = `translate(${
|
|
637
|
+
const e = 1 - a;
|
|
638
|
+
d.style.transform = `translate(${s * e - r.x}px, ${l * e - r.y}px) scale(${1 + (o - 1) * e})`, d.style.opacity = `${1 - e}`;
|
|
632
639
|
};
|
|
633
640
|
}
|
|
634
|
-
function
|
|
641
|
+
function gt({
|
|
635
642
|
galleryRect: t,
|
|
636
643
|
detailRect: n,
|
|
637
|
-
scrollOffset:
|
|
644
|
+
scrollOffset: r
|
|
638
645
|
}, d) {
|
|
639
|
-
const
|
|
640
|
-
return (
|
|
641
|
-
const
|
|
642
|
-
d.style.transformOrigin = `${t.left + t.width / 2}px ${t.top + t.height / 2}px`, d.style.transform = `translate(${
|
|
646
|
+
const s = n.left - t.left + (n.width - t.width) / 2 - r.x, l = n.top - t.top + (n.height - t.height) / 2 - r.y, c = n.width / t.width, i = n.height / t.height, o = Math.max(c, i);
|
|
647
|
+
return (a) => {
|
|
648
|
+
const e = 1 - a, g = a;
|
|
649
|
+
d.style.transformOrigin = `${t.left + t.width / 2}px ${t.top + t.height / 2}px`, d.style.transform = `translate(${s * e}px, ${l * e}px) scale(${1 + (o - 1) * e})`, d.style.opacity = `${g}`;
|
|
643
650
|
};
|
|
644
651
|
}
|
|
645
|
-
function
|
|
652
|
+
function ft({
|
|
646
653
|
detailRect: t,
|
|
647
654
|
galleryRect: n,
|
|
648
|
-
pageRect:
|
|
655
|
+
pageRect: r,
|
|
649
656
|
scrollOffset: d
|
|
650
|
-
},
|
|
651
|
-
const
|
|
652
|
-
return
|
|
653
|
-
const h = 1 -
|
|
654
|
-
|
|
657
|
+
}, s) {
|
|
658
|
+
const l = n.left - t.left + (n.width - t.width) / 2 + d.x, c = n.top - t.top + (n.height - t.height) / 2 + d.y, i = n.width / t.width, o = n.height / t.height, a = Math.min(i, o), e = t.top / r.height * 100, g = (r.width - (t.left + t.width)) / r.width * 100, y = (r.height - (t.top + t.height)) / r.height * 100, u = t.left / r.width * 100;
|
|
659
|
+
return s.style.transformOrigin = `${t.left + t.width / 2}px ${t.top + t.height / 2}px`, (p) => {
|
|
660
|
+
const h = 1 - p, f = e * h, $ = g * h, w = y * h, x = u * h;
|
|
661
|
+
s.style.clipPath = `inset(${f}% ${$}% ${w}% ${x}%)`, s.style.transform = `translate(${l * h - d.x}px, ${c * h - d.y}px) scale(${1 + (a - 1) * h})`;
|
|
655
662
|
};
|
|
656
663
|
}
|
|
657
|
-
function
|
|
664
|
+
function $t(t, n, r) {
|
|
658
665
|
const d = t.querySelector(
|
|
659
666
|
"[data-pinterest-detail-key]"
|
|
660
|
-
),
|
|
667
|
+
), s = n.querySelector(
|
|
661
668
|
"[data-pinterest-detail-key]"
|
|
662
669
|
);
|
|
663
670
|
if (t.querySelectorAll("[data-pinterest-detail-key]").length > 1 || n.querySelectorAll("[data-pinterest-detail-key]").length > 1)
|
|
664
671
|
return null;
|
|
665
|
-
let
|
|
666
|
-
if (!d &&
|
|
667
|
-
c =
|
|
668
|
-
const
|
|
669
|
-
if (!
|
|
670
|
-
|
|
671
|
-
`[data-pinterest-gallery-key="${
|
|
672
|
-
),
|
|
673
|
-
} else if (d && !
|
|
672
|
+
let l = null, c = null, i = !1;
|
|
673
|
+
if (!d && s) {
|
|
674
|
+
c = s;
|
|
675
|
+
const e = c.getAttribute("data-pinterest-detail-key");
|
|
676
|
+
if (!e) return null;
|
|
677
|
+
l = t.querySelector(
|
|
678
|
+
`[data-pinterest-gallery-key="${e}"]`
|
|
679
|
+
), l && (i = !0);
|
|
680
|
+
} else if (d && !s) {
|
|
674
681
|
c = d;
|
|
675
|
-
const
|
|
676
|
-
if (!
|
|
677
|
-
|
|
678
|
-
`[data-pinterest-gallery-key="${
|
|
679
|
-
),
|
|
682
|
+
const e = c.getAttribute("data-pinterest-detail-key");
|
|
683
|
+
if (!e) return null;
|
|
684
|
+
l = n.querySelector(
|
|
685
|
+
`[data-pinterest-gallery-key="${e}"]`
|
|
686
|
+
), l && (i = !1);
|
|
680
687
|
}
|
|
681
|
-
if (!
|
|
688
|
+
if (!l || !c)
|
|
682
689
|
return null;
|
|
683
|
-
const
|
|
684
|
-
return
|
|
685
|
-
inAnimation:
|
|
690
|
+
const o = L(i ? t : n, l), a = L(i ? n : t, c);
|
|
691
|
+
return i ? {
|
|
692
|
+
inAnimation: pt(
|
|
686
693
|
{
|
|
687
|
-
detailRect:
|
|
688
|
-
galleryRect:
|
|
694
|
+
detailRect: a,
|
|
695
|
+
galleryRect: o,
|
|
689
696
|
pageRect: n.getBoundingClientRect(),
|
|
690
|
-
scrollOffset:
|
|
697
|
+
scrollOffset: r
|
|
691
698
|
},
|
|
692
699
|
n
|
|
693
700
|
),
|
|
694
|
-
outAnimation:
|
|
695
|
-
{ galleryRect:
|
|
701
|
+
outAnimation: ut(
|
|
702
|
+
{ galleryRect: o, detailRect: a, scrollOffset: r },
|
|
696
703
|
t
|
|
697
704
|
)
|
|
698
705
|
} : {
|
|
699
|
-
inAnimation:
|
|
700
|
-
{ galleryRect:
|
|
706
|
+
inAnimation: gt(
|
|
707
|
+
{ galleryRect: o, detailRect: a, scrollOffset: r },
|
|
701
708
|
n
|
|
702
709
|
),
|
|
703
|
-
outAnimation:
|
|
710
|
+
outAnimation: ft(
|
|
704
711
|
{
|
|
705
|
-
detailRect:
|
|
706
|
-
galleryRect:
|
|
712
|
+
detailRect: a,
|
|
713
|
+
galleryRect: o,
|
|
707
714
|
pageRect: t.getBoundingClientRect(),
|
|
708
|
-
scrollOffset:
|
|
715
|
+
scrollOffset: r
|
|
709
716
|
},
|
|
710
717
|
t
|
|
711
718
|
)
|
|
712
719
|
};
|
|
713
720
|
}
|
|
714
|
-
const
|
|
715
|
-
var c,
|
|
721
|
+
const Ut = (t = {}) => {
|
|
722
|
+
var c, i;
|
|
716
723
|
const n = {
|
|
717
724
|
stiffness: ((c = t.spring) == null ? void 0 : c.stiffness) ?? 30,
|
|
718
|
-
damping: ((
|
|
719
|
-
},
|
|
720
|
-
let d = null,
|
|
725
|
+
damping: ((i = t.spring) == null ? void 0 : i.damping) ?? 10
|
|
726
|
+
}, r = t.timeout ?? 300;
|
|
727
|
+
let d = null, s = null, l = null;
|
|
721
728
|
return {
|
|
722
|
-
in: async (
|
|
723
|
-
const
|
|
724
|
-
return !await new Promise((
|
|
725
|
-
d ?
|
|
726
|
-
|
|
727
|
-
},
|
|
729
|
+
in: async (o, { scrollOffset: a }) => {
|
|
730
|
+
const e = o;
|
|
731
|
+
return !await new Promise((y) => {
|
|
732
|
+
d ? y(!0) : (s = y, setTimeout(() => {
|
|
733
|
+
s = null, y(!1);
|
|
734
|
+
}, r));
|
|
728
735
|
}) || !d ? (d = null, {
|
|
729
736
|
spring: n,
|
|
730
737
|
tick: () => {
|
|
731
738
|
}
|
|
732
|
-
}) : (
|
|
739
|
+
}) : (l = $t(d, e, a), l ? (d = null, {
|
|
733
740
|
spring: n,
|
|
734
|
-
tick: (
|
|
735
|
-
|
|
741
|
+
tick: (y) => {
|
|
742
|
+
l && l.inAnimation(y);
|
|
736
743
|
}
|
|
737
744
|
}) : {
|
|
738
745
|
spring: n,
|
|
@@ -740,137 +747,137 @@ const Wt = (t = {}) => {
|
|
|
740
747
|
}
|
|
741
748
|
});
|
|
742
749
|
},
|
|
743
|
-
out: async (
|
|
750
|
+
out: async (o) => ({
|
|
744
751
|
spring: n,
|
|
745
752
|
onStart: () => {
|
|
746
|
-
d =
|
|
753
|
+
d = o, s && (s(!0), s = null);
|
|
747
754
|
},
|
|
748
|
-
prepare: (
|
|
749
|
-
b(
|
|
755
|
+
prepare: (a) => {
|
|
756
|
+
b(a), a.style.zIndex = "-1";
|
|
750
757
|
},
|
|
751
|
-
tick: (
|
|
752
|
-
|
|
758
|
+
tick: (a) => {
|
|
759
|
+
l && l.outAnimation(a);
|
|
753
760
|
}
|
|
754
761
|
})
|
|
755
762
|
};
|
|
756
763
|
}, D = {
|
|
757
764
|
stiffness: 5,
|
|
758
765
|
damping: 4
|
|
759
|
-
},
|
|
760
|
-
var
|
|
761
|
-
const n = t.direction ?? "up",
|
|
762
|
-
stiffness: ((
|
|
763
|
-
damping: ((
|
|
766
|
+
}, Vt = (t = {}) => {
|
|
767
|
+
var o, a;
|
|
768
|
+
const n = t.direction ?? "up", r = {
|
|
769
|
+
stiffness: ((o = t.spring) == null ? void 0 : o.stiffness) ?? D.stiffness,
|
|
770
|
+
damping: ((a = t.spring) == null ? void 0 : a.damping) ?? D.damping
|
|
764
771
|
}, d = n === "up";
|
|
765
|
-
let
|
|
766
|
-
const
|
|
767
|
-
if (
|
|
772
|
+
let s = null, l = null, c = null;
|
|
773
|
+
const i = () => {
|
|
774
|
+
if (s === null || l === null)
|
|
768
775
|
return null;
|
|
769
|
-
const
|
|
770
|
-
return Math.max(
|
|
776
|
+
const e = Math.min(s, l), g = window.innerHeight;
|
|
777
|
+
return Math.max(e, g);
|
|
771
778
|
};
|
|
772
779
|
return {
|
|
773
|
-
in: (
|
|
774
|
-
spring:
|
|
780
|
+
in: (e) => (l = e.offsetHeight, s !== null && (c = i()), {
|
|
781
|
+
spring: r,
|
|
775
782
|
prepare: () => {
|
|
776
|
-
|
|
783
|
+
e.style.willChange = "transform", e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
|
|
777
784
|
},
|
|
778
|
-
tick: (
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
o.style.transform = `translateY(${g}px)`;
|
|
785
|
+
tick: (g) => {
|
|
786
|
+
c === null && (c = i());
|
|
787
|
+
const y = c ?? window.innerHeight, u = d ? (1 - g) * y : (1 - g) * -y;
|
|
788
|
+
e.style.transform = `translate3d(0, ${u}px, 0)`;
|
|
783
789
|
},
|
|
784
790
|
onEnd: () => {
|
|
785
|
-
|
|
791
|
+
e.style.willChange = "auto", e.style.backfaceVisibility = "", e.style.contain = "";
|
|
786
792
|
}
|
|
787
793
|
}),
|
|
788
|
-
out: (
|
|
789
|
-
spring:
|
|
794
|
+
out: (e, g) => ({
|
|
795
|
+
spring: r,
|
|
790
796
|
onStart: () => {
|
|
791
|
-
|
|
797
|
+
s = e.offsetHeight, l !== null && (c = i());
|
|
792
798
|
},
|
|
793
|
-
tick: (
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
o.style.transform = `translateY(${g}px)`;
|
|
799
|
+
tick: (y) => {
|
|
800
|
+
c === null && (c = i());
|
|
801
|
+
const u = c ?? window.innerHeight, p = d ? (1 - y) * -u : (1 - y) * u;
|
|
802
|
+
e.style.transform = `translate3d(0, ${p}px, 0)`;
|
|
798
803
|
},
|
|
799
|
-
prepare: (
|
|
800
|
-
b(
|
|
804
|
+
prepare: (y) => {
|
|
805
|
+
b(y, g), y.style.zIndex = d ? "-1" : "1", y.style.willChange = "transform", y.style.backfaceVisibility = "hidden", y.style.contain = "layout paint", y.style.pointerEvents = "none";
|
|
801
806
|
}
|
|
802
807
|
})
|
|
803
808
|
};
|
|
804
|
-
},
|
|
809
|
+
}, v = {
|
|
805
810
|
stiffness: 15,
|
|
806
811
|
damping: 7
|
|
807
|
-
},
|
|
808
|
-
var
|
|
809
|
-
const n = t.direction ?? "left",
|
|
810
|
-
stiffness: ((
|
|
811
|
-
damping: ((
|
|
812
|
+
}, Wt = (t = {}) => {
|
|
813
|
+
var s, l;
|
|
814
|
+
const n = t.direction ?? "left", r = {
|
|
815
|
+
stiffness: ((s = t.spring) == null ? void 0 : s.stiffness) ?? v.stiffness,
|
|
816
|
+
damping: ((l = t.spring) == null ? void 0 : l.damping) ?? v.damping
|
|
812
817
|
}, d = n === "left";
|
|
813
818
|
return {
|
|
814
819
|
in: (c) => ({
|
|
815
|
-
spring:
|
|
820
|
+
spring: r,
|
|
816
821
|
prepare: () => {
|
|
817
|
-
c.style.willChange = "transform";
|
|
818
|
-
},
|
|
819
|
-
tick: (e) => {
|
|
820
|
-
const a = d ? (1 - e) * 100 : (1 - e) * -100;
|
|
821
|
-
c.style.transform = `translateX(${a}%)`;
|
|
822
|
+
c.style.willChange = "transform", c.style.backfaceVisibility = "hidden", c.style.contain = "layout paint";
|
|
822
823
|
},
|
|
824
|
+
css: (i) => ({
|
|
825
|
+
transform: `translate3d(${d ? (1 - i) * 100 : (1 - i) * -100}%, 0, 0)`
|
|
826
|
+
}),
|
|
823
827
|
onEnd: () => {
|
|
824
|
-
c.style.willChange = "auto";
|
|
828
|
+
c.style.willChange = "auto", c.style.backfaceVisibility = "", c.style.contain = "";
|
|
825
829
|
}
|
|
826
830
|
}),
|
|
827
|
-
out: (c,
|
|
828
|
-
spring:
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
b(a, e), a.style.zIndex = d ? "-1" : "1", a.style.willChange = "transform";
|
|
831
|
+
out: (c, i) => ({
|
|
832
|
+
spring: r,
|
|
833
|
+
css: (o) => ({
|
|
834
|
+
transform: `translate3d(${d ? (1 - o) * -100 : (1 - o) * 100}%, 0, 0)`
|
|
835
|
+
}),
|
|
836
|
+
prepare: (o) => {
|
|
837
|
+
b(o, i), o.style.willChange = "transform", o.style.backfaceVisibility = "hidden", o.style.contain = "layout paint", o.style.pointerEvents = "none";
|
|
835
838
|
}
|
|
836
839
|
})
|
|
837
840
|
};
|
|
838
|
-
},
|
|
841
|
+
}, F = { stiffness: 17, damping: 6 }, S = 20, T = 800, Ht = () => {
|
|
839
842
|
let t, n = null;
|
|
840
843
|
return {
|
|
841
|
-
in: (
|
|
842
|
-
spring:
|
|
843
|
-
prepare: (
|
|
844
|
-
|
|
844
|
+
in: (r) => ({
|
|
845
|
+
spring: F,
|
|
846
|
+
prepare: () => {
|
|
847
|
+
r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.transform = `perspective(${T}px) rotateY(${S}deg) translate3d(-100%, 0, 0)`;
|
|
845
848
|
},
|
|
846
849
|
wait: async () => {
|
|
847
850
|
t && await t;
|
|
848
851
|
},
|
|
849
|
-
|
|
850
|
-
const
|
|
851
|
-
|
|
852
|
+
css: (d) => {
|
|
853
|
+
const s = (1 - d) * S, l = -(1 - d) * 100;
|
|
854
|
+
return {
|
|
855
|
+
transform: `perspective(${T}px) rotateY(${s}deg) translate3d(${l}%, 0, 0)`
|
|
856
|
+
};
|
|
852
857
|
},
|
|
853
858
|
onEnd: () => {
|
|
854
|
-
|
|
859
|
+
r.style.transform = "", r.style.willChange = "auto", r.style.backfaceVisibility = "", r.style.contain = "";
|
|
855
860
|
}
|
|
856
861
|
}),
|
|
857
|
-
out: (
|
|
858
|
-
n =
|
|
862
|
+
out: (r, d) => (t = new Promise((s) => {
|
|
863
|
+
n = s;
|
|
859
864
|
}), {
|
|
860
|
-
spring:
|
|
861
|
-
prepare: (
|
|
862
|
-
b(
|
|
865
|
+
spring: F,
|
|
866
|
+
prepare: (s) => {
|
|
867
|
+
b(s, d), s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.pointerEvents = "none", s.style.transform = `perspective(${T}px) rotateY(0deg) translate3d(0%, 0, 0)`;
|
|
863
868
|
},
|
|
864
|
-
|
|
865
|
-
const
|
|
866
|
-
|
|
869
|
+
css: (s) => {
|
|
870
|
+
const l = 1 - s, c = l * S, i = l * 100;
|
|
871
|
+
return {
|
|
872
|
+
transform: `perspective(${T}px) rotateY(${-c}deg) translate3d(${i}%, 0, 0)`
|
|
873
|
+
};
|
|
867
874
|
},
|
|
868
875
|
onEnd: () => {
|
|
869
|
-
n && n(),
|
|
876
|
+
n && n(), r.style.transform = "";
|
|
870
877
|
}
|
|
871
878
|
})
|
|
872
879
|
};
|
|
873
|
-
}, wt = { stiffness: 1, damping: 1 },
|
|
880
|
+
}, wt = { stiffness: 1, damping: 1 }, xt = { stiffness: 20, damping: 25 }, bt = "#000000", mt = "circle", Y = "CURTAIN_REVEAL_OVERLAY_ID", Et = {
|
|
874
881
|
position: "fixed",
|
|
875
882
|
inset: "0",
|
|
876
883
|
width: "100vw",
|
|
@@ -880,17 +887,17 @@ const Wt = (t = {}) => {
|
|
|
880
887
|
alignItems: "center",
|
|
881
888
|
justifyContent: "center",
|
|
882
889
|
overflow: "hidden"
|
|
883
|
-
},
|
|
890
|
+
}, At = {
|
|
884
891
|
position: "relative",
|
|
885
892
|
display: "inline-block",
|
|
886
893
|
height: "5.5rem",
|
|
887
894
|
overflow: "hidden"
|
|
888
|
-
},
|
|
895
|
+
}, Lt = {
|
|
889
896
|
display: "flex",
|
|
890
897
|
height: "100%",
|
|
891
898
|
willChange: "transform",
|
|
892
899
|
transition: "transform 0.3s ease"
|
|
893
|
-
},
|
|
900
|
+
}, Ct = {
|
|
894
901
|
display: "inline-flex",
|
|
895
902
|
alignItems: "center",
|
|
896
903
|
justifyContent: "center",
|
|
@@ -899,104 +906,104 @@ const Wt = (t = {}) => {
|
|
|
899
906
|
fontWeight: "900",
|
|
900
907
|
letterSpacing: "0.02em",
|
|
901
908
|
color: "#FFFFFF"
|
|
902
|
-
}, Tt = 0.4,
|
|
903
|
-
function
|
|
909
|
+
}, Tt = 0.4, k = 0.5, kt = 0.2;
|
|
910
|
+
function St(t, n) {
|
|
904
911
|
switch (t) {
|
|
905
912
|
case "circle":
|
|
906
913
|
return `circle(${n * 100}% at 50% 50%)`;
|
|
907
914
|
case "square":
|
|
908
915
|
return `inset(${(1 - n) * 50}% round ${10 * n}%)`;
|
|
909
916
|
case "triangle": {
|
|
910
|
-
const
|
|
911
|
-
return `polygon(50% ${50 -
|
|
917
|
+
const r = n * 100;
|
|
918
|
+
return `polygon(50% ${50 - r}%, ${50 - r}% ${50 + r}%, ${50 + r}% ${50 + r}%)`;
|
|
912
919
|
}
|
|
913
920
|
}
|
|
914
921
|
}
|
|
915
|
-
const
|
|
922
|
+
const _t = (t) => t.reduce((n, r) => n + r, 0), Bt = (t = {}) => {
|
|
916
923
|
const {
|
|
917
|
-
background: n =
|
|
918
|
-
texts:
|
|
919
|
-
shape: d =
|
|
920
|
-
inSpring:
|
|
921
|
-
outSpring:
|
|
924
|
+
background: n = bt,
|
|
925
|
+
texts: r = [],
|
|
926
|
+
shape: d = mt,
|
|
927
|
+
inSpring: s = xt,
|
|
928
|
+
outSpring: l = wt,
|
|
922
929
|
textStyle: c = {}
|
|
923
930
|
} = t;
|
|
924
931
|
return {
|
|
925
|
-
out: (
|
|
926
|
-
const
|
|
932
|
+
out: (i, o) => {
|
|
933
|
+
const a = i.style.opacity;
|
|
927
934
|
return {
|
|
928
|
-
spring:
|
|
935
|
+
spring: l,
|
|
929
936
|
from: 1,
|
|
930
937
|
to: 0,
|
|
931
|
-
prepare: (
|
|
932
|
-
b(
|
|
938
|
+
prepare: (e) => {
|
|
939
|
+
b(e, o), e.style.opacity = "1";
|
|
933
940
|
},
|
|
934
|
-
tick: (
|
|
935
|
-
const
|
|
936
|
-
|
|
941
|
+
tick: (e) => {
|
|
942
|
+
const g = Math.max(0, e - Tt);
|
|
943
|
+
i.style.opacity = String(g);
|
|
937
944
|
},
|
|
938
945
|
onEnd: () => {
|
|
939
|
-
|
|
946
|
+
i.style.opacity = a;
|
|
940
947
|
}
|
|
941
948
|
};
|
|
942
949
|
},
|
|
943
|
-
in: (
|
|
944
|
-
let
|
|
945
|
-
const
|
|
946
|
-
|
|
950
|
+
in: (i) => {
|
|
951
|
+
let o = null, a = null, e = null;
|
|
952
|
+
const g = document.body.style.overflow, y = document.getElementById(
|
|
953
|
+
Y
|
|
947
954
|
);
|
|
948
955
|
let u = [];
|
|
949
|
-
const
|
|
950
|
-
|
|
956
|
+
const p = () => {
|
|
957
|
+
o = document.createElement("div"), o.id = Y, Object.assign(o.style, Et, { background: n }), document.body.appendChild(o), a = document.createElement("div"), Object.assign(a.style, At), o.appendChild(a), e = document.createElement("div"), Object.assign(e.style, Lt), a.appendChild(e), r.forEach((h) => {
|
|
951
958
|
const f = document.createElement("div");
|
|
952
|
-
f.textContent = h, Object.assign(f.style,
|
|
953
|
-
}), u = Array.from(
|
|
959
|
+
f.textContent = h, Object.assign(f.style, Ct, c), e.appendChild(f);
|
|
960
|
+
}), u = Array.from(e.children).map(
|
|
954
961
|
(h) => h.getBoundingClientRect().width
|
|
955
962
|
);
|
|
956
963
|
};
|
|
957
964
|
return {
|
|
958
|
-
spring:
|
|
965
|
+
spring: s,
|
|
959
966
|
from: 0,
|
|
960
967
|
to: 1,
|
|
961
968
|
prepare: () => {
|
|
962
|
-
document.body.style.overflow = "hidden",
|
|
969
|
+
document.body.style.overflow = "hidden", i.style.opacity = "1", y == null || y.remove(), p(), o && a && (o.style.clipPath = "none", a.style.transform = "scale(1)");
|
|
963
970
|
},
|
|
964
971
|
tick: (h) => {
|
|
965
|
-
if (!(!
|
|
966
|
-
if (h <=
|
|
967
|
-
const f = h /
|
|
968
|
-
Math.floor(f *
|
|
969
|
-
|
|
970
|
-
), w = u[$] ?? 0, x =
|
|
971
|
-
|
|
972
|
+
if (!(!o || !a || !e)) {
|
|
973
|
+
if (h <= k && r.length > 0) {
|
|
974
|
+
const f = h / k, $ = Math.min(
|
|
975
|
+
Math.floor(f * r.length),
|
|
976
|
+
r.length - 1
|
|
977
|
+
), w = u[$] ?? 0, x = _t(u.slice(0, $));
|
|
978
|
+
a.style.width = `${w}px`, e.style.transform = `translateX(-${x}px)`;
|
|
972
979
|
}
|
|
973
|
-
if (h >
|
|
980
|
+
if (h > k) {
|
|
974
981
|
const $ = 1 - Math.max(
|
|
975
982
|
0,
|
|
976
|
-
Math.min(1, (h -
|
|
983
|
+
Math.min(1, (h - k) / kt)
|
|
977
984
|
);
|
|
978
|
-
|
|
985
|
+
o.style.clipPath = St(d, $), a.style.transform = `scale(${$})`;
|
|
979
986
|
}
|
|
980
987
|
}
|
|
981
988
|
},
|
|
982
989
|
onEnd: () => {
|
|
983
|
-
|
|
990
|
+
o == null || o.remove(), o = a = e = null, document.body.style.overflow = g;
|
|
984
991
|
}
|
|
985
992
|
};
|
|
986
993
|
}
|
|
987
994
|
};
|
|
988
995
|
};
|
|
989
996
|
export {
|
|
990
|
-
|
|
991
|
-
|
|
997
|
+
It as blind,
|
|
998
|
+
Bt as curtainReveal,
|
|
992
999
|
Dt as drill,
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1000
|
+
vt as fade,
|
|
1001
|
+
Ft as film,
|
|
1002
|
+
Yt as hero,
|
|
1003
|
+
Ot as instagram,
|
|
1004
|
+
Mt as jaemin,
|
|
1005
|
+
Ut as pinterest,
|
|
1006
|
+
Vt as scroll,
|
|
1007
|
+
Wt as slide,
|
|
1008
|
+
Ht as strip
|
|
1002
1009
|
};
|