@ssgoi/core 3.1.2 → 3.1.4

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