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