@ssgoi/core 3.5.0 → 3.5.1

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