@ssgoi/core 7.1.0 → 7.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,44 +1,44 @@
1
- var ee = Object.defineProperty;
2
- var ne = (t, e, n) => e in t ? ee(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var T = (t, e, n) => ne(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { W as m, M as E } from "./multi-animation-DyZGEfKy.js";
5
- import { A as fs } from "./multi-animation-DyZGEfKy.js";
6
- import { I as b, F as oe, a as se, p as X, S as ie, b as re } from "./page-motion-wmW7PW6B.js";
7
- import { P as ae, S as le } from "./timeline-L_vXntmP.js";
8
- class ce {
1
+ var ue = Object.defineProperty;
2
+ var de = (t, e, n) => e in t ? ue(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var Y = (t, e, n) => de(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { W as w, M as P } from "./multi-animation-DyZGEfKy.js";
5
+ import { A as Ei } from "./multi-animation-DyZGEfKy.js";
6
+ import { I as S, F as fe, a as he, p as U, S as ye, b as me } from "./page-motion-wmW7PW6B.js";
7
+ import { P as ge, S as be } from "./timeline-L_vXntmP.js";
8
+ class we {
9
9
  constructor(e) {
10
- T(this, "durationSec");
10
+ Y(this, "durationSec");
11
11
  this.durationSec = Math.max(1 / 60, e.durationSec);
12
12
  }
13
13
  step(e, n, o) {
14
- const s = n - e.position;
15
- if (s === 0) return e;
16
- const r = Math.sign(s), i = Math.abs(s) / this.durationSec, l = r * i * o, c = e.position + l;
17
- return (r > 0 ? c >= n : c <= n) ? { position: n, velocity: 0 } : { position: c, velocity: r * i };
14
+ const i = n - e.position;
15
+ if (i === 0) return e;
16
+ const s = Math.sign(i), r = Math.abs(i) / this.durationSec, l = s * r * o, c = e.position + l;
17
+ return (s > 0 ? c >= n : c <= n) ? { position: n, velocity: 0 } : { position: c, velocity: s * r };
18
18
  }
19
19
  isSettled(e, n) {
20
- return Math.abs(e.position - n) < ae;
20
+ return Math.abs(e.position - n) < ge;
21
21
  }
22
22
  }
23
- function L(t, e) {
24
- function n(r) {
25
- let i = 0, l = 0;
26
- const c = r.offsetWidth, a = r.offsetHeight;
27
- let p = r;
28
- for (; p; )
29
- i += p.offsetTop, l += p.offsetLeft, p = p.offsetParent;
30
- return i -= window.scrollY, l -= window.scrollX, { top: i, left: l, width: c, height: a };
23
+ function ft(t, e) {
24
+ function n(s) {
25
+ let r = 0, l = 0;
26
+ const c = s.offsetWidth, a = s.offsetHeight;
27
+ let u = s;
28
+ for (; u; )
29
+ r += u.offsetTop, l += u.offsetLeft, u = u.offsetParent;
30
+ return r -= window.scrollY, l -= window.scrollX, { top: r, left: l, width: c, height: a };
31
31
  }
32
- const o = n(t), s = n(e);
32
+ const o = n(t), i = n(e);
33
33
  return new DOMRect(
34
- s.left - o.left,
35
- s.top - o.top,
36
- s.width,
37
- s.height
34
+ i.left - o.left,
35
+ i.top - o.top,
36
+ i.width,
37
+ i.height
38
38
  );
39
39
  }
40
- function z(t, e) {
41
- const n = t.getBoundingClientRect(), o = e.getBoundingClientRect(), s = t.offsetWidth > 0 ? n.width / t.offsetWidth : 1, r = t.offsetHeight > 0 ? n.height / t.offsetHeight : 1;
40
+ function H(t, e) {
41
+ const n = t.getBoundingClientRect(), o = e.getBoundingClientRect(), i = (l, c) => c > 0 && Math.abs(l - c) > 0.5 ? l / c : 1, s = i(n.width, t.offsetWidth), r = i(n.height, t.offsetHeight);
42
42
  return new DOMRect(
43
43
  (o.left - n.left) / s,
44
44
  (o.top - n.top) / r,
@@ -46,33 +46,33 @@ function z(t, e) {
46
46
  o.height / r
47
47
  );
48
48
  }
49
- function F(t, e) {
50
- const { scrollingElement: n, positionedParent: o } = t, s = n !== o && n.contains(o) ? L(n, o).top : 0;
49
+ function M(t, e) {
50
+ const { scrollingElement: n, positionedParent: o } = t, i = n !== o && n.contains(o) ? ft(n, o).top : 0;
51
51
  return {
52
52
  top: t[e].scroll.y,
53
53
  left: 0,
54
54
  width: n.clientWidth,
55
- height: n.clientHeight - s
55
+ height: n.clientHeight - i
56
56
  };
57
57
  }
58
- function kt(t, e) {
59
- const { scrollingElement: n, positionedParent: o } = t, s = n !== o && n.contains(o) ? L(n, o).top : 0;
58
+ function Xt(t, e) {
59
+ const { scrollingElement: n, positionedParent: o } = t, i = n !== o && n.contains(o) ? ft(n, o).top : 0;
60
60
  return {
61
- top: t[e].scroll.y - s,
61
+ top: t[e].scroll.y - i,
62
62
  height: n.clientHeight
63
63
  };
64
64
  }
65
- const pt = 8, ut = {
65
+ const bt = 8, wt = {
66
66
  spring: {
67
67
  stiffness: 600,
68
68
  damping: 40,
69
69
  doubleSpring: 1.2
70
70
  }
71
71
  };
72
- function pe({
72
+ function Se({
73
73
  direction: t
74
74
  }) {
75
- const e = t === "forward" ? pt : -pt;
75
+ const e = t === "forward" ? bt : -bt;
76
76
  return {
77
77
  out: {
78
78
  willChange: "transform, opacity",
@@ -94,32 +94,32 @@ function pe({
94
94
  }
95
95
  };
96
96
  }
97
- function ue() {
97
+ function Ce() {
98
98
  return {
99
- outPhysics: ut,
100
- inPhysics: ut,
99
+ outPhysics: wt,
100
+ inPhysics: wt,
101
101
  // Both sides run together — the cross-fade is the whole point of the
102
102
  // snappy feel. (fluid's sibling uses staggered fade-through.)
103
103
  composition: { mode: "parallel", startAt: [0, 0] },
104
- build: pe
104
+ build: Se
105
105
  };
106
106
  }
107
- const dt = 30, de = {
107
+ const St = 30, xe = {
108
108
  inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
109
- }, fe = {
109
+ }, $e = {
110
110
  spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
111
111
  };
112
- function ye({
112
+ function Ee({
113
113
  direction: t
114
114
  }) {
115
- const e = t === "forward" ? 1 : -1, n = -dt * e, o = dt * e;
115
+ const e = t === "forward" ? 1 : -1, n = -St * e, o = St * e;
116
116
  return {
117
117
  out: {
118
118
  willChange: "transform, opacity",
119
119
  startStyle: {},
120
- animate: (s) => ({
121
- transform: `translate3d(${n * s}px, 0, 0)`,
122
- opacity: `${1 - s}`
120
+ animate: (i) => ({
121
+ transform: `translate3d(${n * i}px, 0, 0)`,
122
+ opacity: `${1 - i}`
123
123
  })
124
124
  },
125
125
  in: {
@@ -128,43 +128,43 @@ function ye({
128
128
  transform: `translate3d(${o}px, 0, 0)`,
129
129
  opacity: "0"
130
130
  },
131
- animate: (s) => ({
132
- transform: `translate3d(${o * (1 - s)}px, 0, 0)`,
133
- opacity: `${s}`
131
+ animate: (i) => ({
132
+ transform: `translate3d(${o * (1 - i)}px, 0, 0)`,
133
+ opacity: `${i}`
134
134
  })
135
135
  }
136
136
  };
137
137
  }
138
- function he() {
138
+ function Pe() {
139
139
  return {
140
- outPhysics: de,
141
- inPhysics: fe,
140
+ outPhysics: xe,
141
+ inPhysics: $e,
142
142
  // Phased motion: outgoing falls away first under inertia, then incoming
143
143
  // springs in. The fade-through shape comes from the integrator curves
144
144
  // plus the sequence handoff, not from FADE_SPLIT inside animate(t).
145
145
  composition: { mode: "sequence" },
146
- build: ye
146
+ build: Ee
147
147
  };
148
148
  }
149
- const me = {
150
- snappy: ue(),
151
- fluid: he()
152
- }, ft = 8, ge = {
149
+ const Re = {
150
+ snappy: Ce(),
151
+ fluid: Pe()
152
+ }, Ct = 8, Ae = {
153
153
  inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
154
- }, be = {
154
+ }, Ie = {
155
155
  spring: { stiffness: 180, damping: 34, restDelta: 0.1, restSpeed: 0.1 }
156
156
  };
157
- function we({
157
+ function _e({
158
158
  direction: t
159
159
  }) {
160
- const e = t === "forward" ? 1 : -1, n = -ft * e, o = ft * e;
160
+ const e = t === "forward" ? 1 : -1, n = -Ct * e, o = Ct * e;
161
161
  return {
162
162
  out: {
163
163
  willChange: "transform, opacity",
164
164
  startStyle: {},
165
- animate: (s) => ({
166
- transform: `translate3d(0, ${n * s}px, 0)`,
167
- opacity: `${1 - s}`
165
+ animate: (i) => ({
166
+ transform: `translate3d(0, ${n * i}px, 0)`,
167
+ opacity: `${1 - i}`
168
168
  })
169
169
  },
170
170
  in: {
@@ -173,24 +173,24 @@ function we({
173
173
  transform: `translate3d(0, ${o}px, 0)`,
174
174
  opacity: "0"
175
175
  },
176
- animate: (s) => ({
177
- transform: `translate3d(0, ${o * (1 - s)}px, 0)`,
178
- opacity: `${s}`
176
+ animate: (i) => ({
177
+ transform: `translate3d(0, ${o * (1 - i)}px, 0)`,
178
+ opacity: `${i}`
179
179
  })
180
180
  }
181
181
  };
182
182
  }
183
- function Se() {
183
+ function Oe() {
184
184
  return {
185
- outPhysics: ge,
186
- inPhysics: be,
185
+ outPhysics: Ae,
186
+ inPhysics: Ie,
187
187
  composition: { mode: "sequence" },
188
- build: we
188
+ build: _e
189
189
  };
190
190
  }
191
- const xe = 40, Ce = {
191
+ const Fe = 40, ve = {
192
192
  inertia: { acceleration: 150, resistance: 1.5, restDelta: 0.1 }
193
- }, $e = {
193
+ }, Te = {
194
194
  spring: {
195
195
  stiffness: 400,
196
196
  damping: 30,
@@ -199,8 +199,8 @@ const xe = 40, Ce = {
199
199
  restSpeed: 0.1
200
200
  }
201
201
  };
202
- function Ee(t) {
203
- const e = xe;
202
+ function Me(t) {
203
+ const e = Fe;
204
204
  return {
205
205
  out: {
206
206
  willChange: "opacity",
@@ -222,32 +222,32 @@ function Ee(t) {
222
222
  }
223
223
  };
224
224
  }
225
- function Pe() {
225
+ function Ye() {
226
226
  return {
227
- outPhysics: Ce,
228
- inPhysics: $e,
227
+ outPhysics: ve,
228
+ inPhysics: Te,
229
229
  composition: { mode: "parallel", startAt: [0, 0] },
230
- build: Ee
230
+ build: Me
231
231
  };
232
232
  }
233
- const yt = Se(), Ae = {
234
- snappy: yt,
235
- directional: yt,
236
- "non-directional": Pe()
237
- }, ht = {
233
+ const xt = Oe(), De = {
234
+ snappy: xt,
235
+ directional: xt,
236
+ "non-directional": Ye()
237
+ }, $t = {
238
238
  spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
239
- }, W = 0.1, Z = 1 / 3, mt = (t) => Math.max(0, Math.min(1, t));
240
- function Ie({
239
+ }, Z = 0.1, G = 1 / 3, Et = (t) => Math.max(0, Math.min(1, t));
240
+ function Le({
241
241
  direction: t
242
242
  }) {
243
- const e = t === "forward" ? 1 : -1, n = 1 - e * W;
243
+ const e = t === "forward" ? 1 : -1, n = 1 - e * Z;
244
244
  return {
245
245
  out: {
246
246
  willChange: "transform, opacity",
247
247
  startStyle: {},
248
248
  animate: (o) => ({
249
- transform: `scale(${1 + e * o * W})`,
250
- opacity: `${mt(1 - o / Z)}`
249
+ transform: `scale(${1 + e * o * Z})`,
250
+ opacity: `${Et(1 - o / G)}`
251
251
  })
252
252
  },
253
253
  in: {
@@ -257,127 +257,127 @@ function Ie({
257
257
  opacity: "0"
258
258
  },
259
259
  animate: (o) => ({
260
- transform: `scale(${n + e * o * W})`,
261
- opacity: `${mt((o - Z) / (1 - Z))}`
260
+ transform: `scale(${n + e * o * Z})`,
261
+ opacity: `${Et((o - G) / (1 - G))}`
262
262
  })
263
263
  }
264
264
  };
265
265
  }
266
- function _e() {
266
+ function ke() {
267
267
  return {
268
- outPhysics: ht,
269
- inPhysics: ht,
268
+ outPhysics: $t,
269
+ inPhysics: $t,
270
270
  // Scale must move together on both sides; fade-through is encoded inside
271
271
  // each tick (piecewise), not via composition staggering — so parallel.
272
272
  composition: { mode: "parallel" },
273
- build: Ie
273
+ build: Le
274
274
  };
275
275
  }
276
- const gt = {
276
+ const Pt = {
277
277
  spring: { stiffness: 280, damping: 30, restDelta: 0.1, restSpeed: 0.1 }
278
- }, G = 0.1, j = 1 / 3, bt = (t) => Math.max(0, Math.min(1, t));
279
- function Re() {
278
+ }, j = 0.1, K = 1 / 3, Rt = (t) => Math.max(0, Math.min(1, t));
279
+ function He() {
280
280
  return {
281
281
  out: {
282
282
  willChange: "opacity",
283
283
  startStyle: {},
284
284
  animate: (t) => ({
285
- opacity: `${bt(1 - t / j)}`
285
+ opacity: `${Rt(1 - t / K)}`
286
286
  })
287
287
  },
288
288
  in: {
289
289
  willChange: "transform, opacity",
290
290
  startStyle: {
291
- transform: `scale(${1 - G})`,
291
+ transform: `scale(${1 - j})`,
292
292
  opacity: "0"
293
293
  },
294
294
  animate: (t) => ({
295
- transform: `scale(${1 - G + t * G})`,
296
- opacity: `${bt((t - j) / (1 - j))}`
295
+ transform: `scale(${1 - j + t * j})`,
296
+ opacity: `${Rt((t - K) / (1 - K))}`
297
297
  })
298
298
  }
299
299
  };
300
300
  }
301
- function ve() {
301
+ function Ne() {
302
302
  return {
303
- outPhysics: gt,
304
- inPhysics: gt,
303
+ outPhysics: Pt,
304
+ inPhysics: Pt,
305
305
  composition: { mode: "parallel" },
306
- build: Re
306
+ build: He
307
307
  };
308
308
  }
309
- const wt = _e(), Oe = {
310
- snappy: wt,
311
- directional: wt,
312
- "non-directional": ve()
313
- }, Fe = {
314
- x: me,
315
- y: Ae,
316
- z: Oe
309
+ const At = ke(), ze = {
310
+ snappy: At,
311
+ directional: At,
312
+ "non-directional": Ne()
313
+ }, Ve = {
314
+ x: Re,
315
+ y: De,
316
+ z: ze
317
317
  };
318
- function Te(t, e) {
319
- const n = Fe[t];
318
+ function Xe(t, e) {
319
+ const n = Ve[t];
320
320
  return n[e] ?? n.snappy;
321
321
  }
322
- const Ye = "x", De = "snappy";
323
- function St(t, e) {
322
+ const We = "x", Ue = "snappy";
323
+ function It(t, e) {
324
324
  t.style.willChange = e.willChange, t.style.backfaceVisibility = "hidden", t.style.contain = "layout paint";
325
325
  for (const [n, o] of Object.entries(e.startStyle))
326
326
  t.style[n] = o;
327
327
  }
328
- function Lt(t) {
328
+ function Wt(t) {
329
329
  t.style.willChange = "auto", t.style.backfaceVisibility = "", t.style.contain = "", t.style.transform = "", t.style.opacity = "", t.style.clipPath = "";
330
330
  }
331
- function Me(t) {
332
- Lt(t), t.style.pointerEvents = "";
331
+ function Be(t) {
332
+ Wt(t), t.style.pointerEvents = "";
333
333
  }
334
- const ke = (t = {}) => {
335
- const e = t.type ?? Ye, n = t.feel ?? De, o = Te(e, n);
334
+ const Ze = (t = {}) => {
335
+ const e = t.type ?? We, n = t.feel ?? Ue, o = Xe(e, n);
336
336
  return {
337
- prepare: ({ from: s, to: r, context: i }) => {
338
- const l = o.build({ direction: i.direction });
339
- return s.then((c) => {
340
- St(c, l.out), c.style.pointerEvents = "none";
341
- }), r.then((c) => {
342
- St(c, l.in);
337
+ prepare: ({ from: i, to: s, context: r }) => {
338
+ const l = o.build({ direction: r.direction });
339
+ return i.then((c) => {
340
+ It(c, l.out), c.style.pointerEvents = "none";
341
+ }), s.then((c) => {
342
+ It(c, l.in);
343
343
  }), {};
344
344
  },
345
- animation: ({ from: s, to: r, context: i }) => {
346
- const l = o.build({ direction: i.direction });
345
+ animation: ({ from: i, to: s, context: r }) => {
346
+ const l = o.build({ direction: r.direction });
347
347
  if (e === "z") {
348
- const p = F(i, "from"), u = F(i, "to");
349
- s.style.clipPath = `inset(${p.top}px 0 calc(100% - ${p.top + p.height}px) 0)`, r.style.clipPath = `inset(${u.top}px 0 calc(100% - ${u.top + u.height}px) 0)`;
348
+ const u = M(r, "from"), p = M(r, "to");
349
+ i.style.clipPath = `inset(${u.top}px 0 calc(100% - ${u.top + u.height}px) 0)`, s.style.clipPath = `inset(${p.top}px 0 calc(100% - ${p.top + p.height}px) 0)`;
350
350
  }
351
- const c = new m({
352
- element: s,
353
- integrator: b.from(o.outPhysics),
354
- style: (p) => l.out.animate(p),
351
+ const c = new w({
352
+ element: i,
353
+ integrator: S.from(o.outPhysics),
354
+ style: (u) => l.out.animate(u),
355
355
  // Restore the reused from node's inline styles on complete. This
356
356
  // covers willChange/backfaceVisibility/contain/transform/opacity (from
357
357
  // applyStartStyle + the WAAPI final frame), pointerEvents (set in
358
358
  // prepare), and clipPath (set above for z; harmless no-op otherwise).
359
- onComplete: () => Me(s)
360
- }), a = new m({
361
- element: r,
362
- integrator: b.from(o.inPhysics),
363
- style: (p) => l.in.animate(p),
364
- onComplete: () => Lt(r)
359
+ onComplete: () => Be(i)
360
+ }), a = new w({
361
+ element: s,
362
+ integrator: S.from(o.inPhysics),
363
+ style: (u) => l.in.animate(u),
364
+ onComplete: () => Wt(s)
365
365
  });
366
- return new E([c, a], o.composition);
366
+ return new P([c, a], o.composition);
367
367
  }
368
368
  };
369
369
  };
370
- function Le(t, e, n) {
370
+ function Ge(t, e, n) {
371
371
  return t === "y" ? e === "non-directional" ? "non-directional" : "directional" : t !== "x" || e === "snappy" || n === "snappy" ? "snappy" : "fluid";
372
372
  }
373
- function Jo(t = {}) {
374
- const e = t.type ?? "x", n = t.variant, o = t.feel, s = Le(e, n, o);
375
- return ke({ type: e, feel: s });
373
+ function ci(t = {}) {
374
+ const e = t.type ?? "x", n = t.variant, o = t.feel, i = Ge(e, n, o);
375
+ return Ze({ type: e, feel: i });
376
376
  }
377
- const He = {
377
+ const je = {
378
378
  spring: { stiffness: 200, damping: 22 }
379
- }, Ne = 10, ze = "horizontal", Ve = "#000000";
380
- function xt(t, e, n, o, s, r) {
379
+ }, Ke = 10, qe = "horizontal", Je = "#000000";
380
+ function _t(t, e, n, o, i, s) {
381
381
  window.getComputedStyle(t).position === "static" && (t.style.position = "relative");
382
382
  const l = document.createElement("div");
383
383
  l.style.cssText = `
@@ -392,45 +392,45 @@ function xt(t, e, n, o, s, r) {
392
392
  `;
393
393
  const c = [];
394
394
  for (let a = 0; a < e; a++) {
395
- const p = document.createElement("div");
395
+ const u = document.createElement("div");
396
396
  if (n === "horizontal") {
397
- const u = 100 / e;
398
- p.style.cssText = `
397
+ const p = 100 / e;
398
+ u.style.cssText = `
399
399
  position: absolute;
400
- top: ${u * a}%;
400
+ top: ${p * a}%;
401
401
  left: 0;
402
402
  width: 100%;
403
- height: calc(${u}% + 1px);
403
+ height: calc(${p}% + 1px);
404
404
  background: ${o};
405
- transform: scaleX(${s === "hidden" ? 0 : 1});
406
- transform-origin: ${r} center;
405
+ transform: scaleX(${i === "hidden" ? 0 : 1});
406
+ transform-origin: ${s} center;
407
407
  will-change: transform;
408
408
  `;
409
409
  } else {
410
- const u = 100 / e;
411
- p.style.cssText = `
410
+ const p = 100 / e;
411
+ u.style.cssText = `
412
412
  position: absolute;
413
413
  top: 0;
414
- left: ${u * a}%;
415
- width: calc(${u}% + 1px);
414
+ left: ${p * a}%;
415
+ width: calc(${p}% + 1px);
416
416
  height: 100%;
417
417
  background: ${o};
418
- transform: scaleY(${s === "hidden" ? 0 : 1});
419
- transform-origin: ${r === "left" ? "top" : "bottom"} center;
418
+ transform: scaleY(${i === "hidden" ? 0 : 1});
419
+ transform-origin: ${s === "left" ? "top" : "bottom"} center;
420
420
  will-change: transform;
421
421
  `;
422
422
  }
423
- c.push(p), l.appendChild(p);
423
+ c.push(u), l.appendChild(u);
424
424
  }
425
425
  return t.appendChild(l), { container: l, blinds: c };
426
426
  }
427
- const Ue = (t = {}) => {
428
- const e = t.blindCount ?? Ne, n = t.direction ?? ze, o = t.blindColor ?? Ve, s = t.physics ?? He;
427
+ const Qe = (t = {}) => {
428
+ const e = t.blindCount ?? Ke, n = t.direction ?? qe, o = t.blindColor ?? Je, i = t.physics ?? je;
429
429
  return {
430
- prepare: async ({ from: r, to: i }) => {
431
- const l = await r, c = await i;
430
+ prepare: async ({ from: s, to: r }) => {
431
+ const l = await s, c = await r;
432
432
  l.style.zIndex = "1000";
433
- const a = xt(
433
+ const a = _t(
434
434
  l,
435
435
  e,
436
436
  n,
@@ -439,7 +439,7 @@ const Ue = (t = {}) => {
439
439
  "left"
440
440
  );
441
441
  c.style.position = "relative", c.style.zIndex = "0";
442
- const p = xt(
442
+ const u = _t(
443
443
  c,
444
444
  e,
445
445
  n,
@@ -451,53 +451,53 @@ const Ue = (t = {}) => {
451
451
  fromEl: l,
452
452
  fromBlinds: a.blinds,
453
453
  fromContainer: a.container,
454
- toBlinds: p.blinds,
455
- toContainer: p.container
454
+ toBlinds: u.blinds,
455
+ toContainer: u.container
456
456
  };
457
457
  },
458
458
  animation: ({
459
- fromEl: r,
460
- fromBlinds: i,
459
+ fromEl: s,
460
+ fromBlinds: r,
461
461
  fromContainer: l,
462
462
  toBlinds: c,
463
463
  toContainer: a
464
464
  }) => {
465
- const p = i.map(
466
- (f) => new m({
465
+ const u = r.map(
466
+ (f) => new w({
467
467
  element: f,
468
- integrator: b.from(s),
469
- style: (h) => ({
470
- transform: n === "horizontal" ? `scaleX(${h})` : `scaleY(${h})`
468
+ integrator: S.from(i),
469
+ style: (y) => ({
470
+ transform: n === "horizontal" ? `scaleX(${y})` : `scaleY(${y})`
471
471
  })
472
472
  })
473
- ), u = c.map(
474
- (f, h) => new m({
473
+ ), p = c.map(
474
+ (f, y) => new w({
475
475
  element: f,
476
- integrator: b.from(s),
477
- style: (g, S) => ({
478
- transform: n === "horizontal" ? `scaleX(${S})` : `scaleY(${S})`
476
+ integrator: S.from(i),
477
+ style: (m, C) => ({
478
+ transform: n === "horizontal" ? `scaleX(${C})` : `scaleY(${C})`
479
479
  }),
480
- onComplete: h === c.length - 1 ? () => {
481
- a.remove(), l.remove(), r.style.zIndex = "", r.style.position = "";
480
+ onComplete: y === c.length - 1 ? () => {
481
+ a.remove(), l.remove(), s.style.zIndex = "", s.style.position = "";
482
482
  } : void 0
483
483
  })
484
- ), d = new E(p, { mode: "parallel" }), y = new E(u, { mode: "parallel" });
485
- return new E([d, y], { mode: "sequence" });
484
+ ), d = new P(u, { mode: "parallel" }), h = new P(p, { mode: "parallel" });
485
+ return new P([d, h], { mode: "sequence" });
486
486
  }
487
487
  };
488
488
  };
489
- function Qo(t = {}) {
489
+ function pi(t = {}) {
490
490
  const { type: e = "horizontal" } = t;
491
- return Ue({ direction: e });
491
+ return Qe({ direction: e });
492
492
  }
493
- const Xe = {
493
+ const tn = {
494
494
  spring: {
495
495
  stiffness: 250,
496
496
  damping: 23,
497
497
  doubleSpring: 0.7
498
498
  }
499
499
  }, k = 0.5;
500
- function Be(t) {
500
+ function en(t) {
501
501
  const e = t === "enter" ? -100 : 100, n = t === "enter" ? 100 : -100;
502
502
  return {
503
503
  out: {
@@ -521,13 +521,13 @@ function Be(t) {
521
521
  }
522
522
  };
523
523
  }
524
- function We() {
524
+ function nn() {
525
525
  return {
526
- physics: Xe,
527
- build: Be
526
+ physics: tn,
527
+ build: en
528
528
  };
529
529
  }
530
- const Ze = {
530
+ const on = {
531
531
  spring: {
532
532
  stiffness: 230,
533
533
  damping: 25,
@@ -537,7 +537,7 @@ const Ze = {
537
537
  }
538
538
  }
539
539
  };
540
- function Ge(t) {
540
+ function sn(t) {
541
541
  const e = t === "enter" ? -20 : 100, n = t === "enter" ? 100 : -20;
542
542
  return {
543
543
  out: {
@@ -558,116 +558,116 @@ function Ge(t) {
558
558
  }
559
559
  };
560
560
  }
561
- function je() {
561
+ function rn() {
562
562
  return {
563
- physics: Ze,
564
- build: Ge
563
+ physics: on,
564
+ build: sn
565
565
  };
566
566
  }
567
- const Ke = {
568
- parallax: je(),
569
- crossfade: We()
570
- }, _ = "0", Ht = "1", R = "2", qe = "parallax";
571
- function Ct(t, e) {
567
+ const an = {
568
+ parallax: rn(),
569
+ crossfade: nn()
570
+ }, O = "0", Ut = "1", F = "2", ln = "parallax";
571
+ function Ot(t, e) {
572
572
  t.style.willChange = e.willChange, t.style.backfaceVisibility = "hidden", t.style.contain = "layout paint";
573
573
  for (const [n, o] of Object.entries(e.startStyle))
574
574
  t.style[n] = o;
575
575
  }
576
- const Je = (t = {}) => {
577
- const e = Ke[t.type ?? qe], n = e.physics;
576
+ const cn = (t = {}) => {
577
+ const e = an[t.type ?? ln], n = e.physics;
578
578
  return {
579
- prepare: ({ from: o, to: s, context: r }) => {
580
- const i = r.direction === "forward" ? "enter" : "exit", l = e.build(i), c = i === "enter" ? _ : R, a = i === "enter" ? R : _;
581
- return o.then((p) => {
582
- Ct(p, l.out), p.style.pointerEvents = "none", p.style.zIndex = c;
583
- }), s.then((p) => {
584
- Ct(p, l.in), p.style.position = "relative", p.style.zIndex = a;
579
+ prepare: ({ from: o, to: i, context: s }) => {
580
+ const r = s.direction === "forward" ? "enter" : "exit", l = e.build(r), c = r === "enter" ? O : F, a = r === "enter" ? F : O;
581
+ return o.then((u) => {
582
+ Ot(u, l.out), u.style.pointerEvents = "none", u.style.zIndex = c;
583
+ }), i.then((u) => {
584
+ Ot(u, l.in), u.style.position = "relative", u.style.zIndex = a;
585
585
  }), {};
586
586
  },
587
- animation: ({ from: o, to: s, context: r }) => {
588
- const i = r.direction === "forward" ? "enter" : "exit", l = e.build(i), c = i === "enter" ? R : _, a = new m({
587
+ animation: ({ from: o, to: i, context: s }) => {
588
+ const r = s.direction === "forward" ? "enter" : "exit", l = e.build(r), c = r === "enter" ? F : O, a = new w({
589
589
  element: o,
590
- integrator: b.from(n),
591
- style: (u) => l.out.animate(u),
590
+ integrator: S.from(n),
591
+ style: (p) => l.out.animate(p),
592
592
  // The outgoing node is the real, reused element (re-hidden on navigate),
593
593
  // so clear every inline style we set on it — mirroring the `to` cleanup,
594
594
  // plus the out-only `pointerEvents` / `zIndex`.
595
595
  onComplete: () => {
596
596
  o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "", o.style.transform = "", o.style.opacity = "", o.style.pointerEvents = "", o.style.zIndex = "";
597
597
  }
598
- }), p = new m({
599
- element: s,
600
- integrator: b.from(n),
601
- style: (u) => l.in.animate(u),
598
+ }), u = new w({
599
+ element: i,
600
+ integrator: S.from(n),
601
+ style: (p) => l.in.animate(p),
602
602
  onComplete: () => {
603
- s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "", s.style.transform = "", s.style.opacity = "", s.style.position === "relative" && (s.style.position = ""), s.style.zIndex === c && (s.style.zIndex = "");
603
+ i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "", i.style.transform = "", i.style.opacity = "", i.style.position === "relative" && (i.style.position = ""), i.style.zIndex === c && (i.style.zIndex = "");
604
604
  }
605
605
  });
606
- for (const u of [a, p]) {
607
- const d = u.onComplete;
608
- u.onComplete = () => {
609
- d == null || d(), u.releaseFill();
606
+ for (const p of [a, u]) {
607
+ const d = p.onComplete;
608
+ p.onComplete = () => {
609
+ d == null || d(), p.releaseFill();
610
610
  };
611
611
  }
612
- return new E([a, p], { mode: "parallel" });
612
+ return new P([a, u], { mode: "parallel" });
613
613
  }
614
614
  };
615
615
  };
616
- function Qe(t) {
616
+ function pn(t) {
617
617
  return t === "slide" || t === "crossfade" ? "crossfade" : "parallax";
618
618
  }
619
- function ts(t = {}) {
620
- const e = t.type, n = Qe(e);
621
- return Je({ type: n });
619
+ function ui(t = {}) {
620
+ const e = t.type, n = pn(e);
621
+ return cn({ type: n });
622
622
  }
623
- const tn = (t = {}) => {
624
- const e = t.physics ?? oe, n = t.physics ?? se;
623
+ const un = (t = {}) => {
624
+ const e = t.physics ?? fe, n = t.physics ?? he;
625
625
  return {
626
- prepare: ({ to: o }) => (o.then((s) => {
627
- s.style.opacity = "0", s.style.willChange = "opacity";
626
+ prepare: ({ to: o }) => (o.then((i) => {
627
+ i.style.opacity = "0", i.style.willChange = "opacity";
628
628
  }), {}),
629
- animation: ({ from: o, to: s }) => {
630
- const r = new m({
629
+ animation: ({ from: o, to: i }) => {
630
+ const s = new w({
631
631
  element: o,
632
- integrator: b.from(n),
632
+ integrator: S.from(n),
633
633
  // Default bounds (0, 1). `u` runs 1→0 as the animation moves
634
634
  // forward, mapping opacity from fully visible to invisible.
635
635
  style: (l) => ({
636
- opacity: X("fade", "out", "forward", l).opacity
636
+ opacity: U("fade", "out", "forward", l).opacity
637
637
  }),
638
638
  onComplete: () => {
639
639
  o.style.willChange = "auto", o.style.opacity = "";
640
640
  }
641
- }), i = new m({
642
- element: s,
643
- integrator: b.from(e),
641
+ }), r = new w({
642
+ element: i,
643
+ integrator: S.from(e),
644
644
  style: (l) => ({
645
- opacity: X("fade", "in", "forward", l).opacity
645
+ opacity: U("fade", "in", "forward", l).opacity
646
646
  }),
647
647
  onComplete: () => {
648
- s.style.willChange = "auto", s.style.opacity = "";
648
+ i.style.willChange = "auto", i.style.opacity = "";
649
649
  }
650
650
  });
651
- return new E([r, i], { mode: "sequence" });
651
+ return new P([s, r], { mode: "sequence" });
652
652
  }
653
653
  };
654
654
  };
655
- function es(t = {}) {
656
- return tn();
655
+ function di(t = {}) {
656
+ return un();
657
657
  }
658
- const K = {
658
+ const q = {
659
659
  scaleDown: { stiffness: 20, damping: 7 },
660
660
  translate: { stiffness: 15, damping: 7 },
661
661
  scaleUp: { stiffness: 20, damping: 7 }
662
- }, Y = {
662
+ }, D = {
663
663
  scaleDown: 0,
664
664
  translate: 0.2,
665
665
  scaleUp: 0.8
666
- }, en = 0.8, nn = "white", $t = 1e3 / 60, on = 600;
667
- function sn(t) {
668
- const { items: e, from: n, to: o, recordFrame: s } = t, r = $t / 1e3, i = Math.abs(o - n), l = e.map((a) => ({
666
+ }, dn = 0.8, fn = "white", Ft = 1e3 / 60, hn = 600;
667
+ function yn(t) {
668
+ const { items: e, from: n, to: o, recordFrame: i } = t, s = Ft / 1e3, r = Math.abs(o - n), l = e.map((a) => ({
669
669
  item: a,
670
- integrator: new ie({
670
+ integrator: new ye({
671
671
  stiffness: a.spring.stiffness,
672
672
  damping: a.spring.damping
673
673
  }),
@@ -678,111 +678,111 @@ function sn(t) {
678
678
  }));
679
679
  for (let a = 0; a < l.length; a++)
680
680
  (a === 0 || l[a].item.offset === 0) && (l[a].started = !0);
681
- s(0);
681
+ i(0);
682
682
  let c = 0;
683
- for (let a = 1; a <= on; a++) {
684
- const p = a * $t;
685
- c = p;
686
- for (const u of l)
687
- !u.started || u.settled || (u.state = u.integrator.step(u.state, o, r), u.integrator.isSettled(u.state, o) ? (u.settleTime += r, u.settleTime >= le && (u.state = { position: o, velocity: 0 }, u.settled = !0)) : u.settleTime = 0, u.item.tick(u.state.position));
688
- for (let u = 1; u < l.length; u++) {
689
- const d = l[u];
683
+ for (let a = 1; a <= hn; a++) {
684
+ const u = a * Ft;
685
+ c = u;
686
+ for (const p of l)
687
+ !p.started || p.settled || (p.state = p.integrator.step(p.state, o, s), p.integrator.isSettled(p.state, o) ? (p.settleTime += s, p.settleTime >= be && (p.state = { position: o, velocity: 0 }, p.settled = !0)) : p.settleTime = 0, p.item.tick(p.state.position));
688
+ for (let p = 1; p < l.length; p++) {
689
+ const d = l[p];
690
690
  if (d.started) continue;
691
- const y = l[u - 1];
692
- if (!y.started) continue;
693
- (i === 0 ? 1 : Math.abs(y.state.position - n) / i) >= d.item.offset && (d.started = !0);
691
+ const h = l[p - 1];
692
+ if (!h.started) continue;
693
+ (r === 0 ? 1 : Math.abs(h.state.position - n) / r) >= d.item.offset && (d.started = !0);
694
694
  }
695
- if (s(p), l.every((u) => u.settled)) return p;
695
+ if (i(u), l.every((p) => p.settled)) return u;
696
696
  }
697
697
  return c;
698
698
  }
699
- function q(t, e) {
699
+ function J(t, e) {
700
700
  return t != null && t.spring ? {
701
701
  stiffness: t.spring.stiffness,
702
702
  damping: t.spring.damping
703
703
  } : e;
704
704
  }
705
- function Et(t) {
706
- const { rect: e, scale: n, direction: o, override: s } = t, r = o === "out" ? { scale: 1, translateY: -e.top } : { scale: n, translateY: -e.top + e.height }, i = q(s, K.scaleDown), l = q(s, K.translate), c = q(s, K.scaleUp), a = o === "out" ? 1 : 0, p = o === "out" ? 0 : 1, u = o === "out" ? [
705
+ function vt(t) {
706
+ const { rect: e, scale: n, direction: o, override: i } = t, s = o === "out" ? { scale: 1, translateY: -e.top } : { scale: n, translateY: -e.top + e.height }, r = J(i, q.scaleDown), l = J(i, q.translate), c = J(i, q.scaleUp), a = o === "out" ? 1 : 0, u = o === "out" ? 0 : 1, p = o === "out" ? [
707
707
  {
708
- spring: i,
709
- offset: Y.scaleDown,
708
+ spring: r,
709
+ offset: D.scaleDown,
710
710
  tick: (f) => {
711
- const h = 1 - f;
712
- r.scale = 1 - (1 - n) * h;
711
+ const y = 1 - f;
712
+ s.scale = 1 - (1 - n) * y;
713
713
  }
714
714
  },
715
715
  {
716
716
  spring: l,
717
- offset: Y.translate,
717
+ offset: D.translate,
718
718
  tick: (f) => {
719
- const h = 1 - f;
720
- r.translateY = -e.top - e.height * h;
719
+ const y = 1 - f;
720
+ s.translateY = -e.top - e.height * y;
721
721
  }
722
722
  },
723
723
  {
724
724
  spring: c,
725
- offset: Y.scaleUp,
725
+ offset: D.scaleUp,
726
726
  tick: (f) => {
727
- const h = 1 - f;
728
- r.scale = n + (1 - n) * h;
727
+ const y = 1 - f;
728
+ s.scale = n + (1 - n) * y;
729
729
  }
730
730
  }
731
731
  ] : [
732
732
  {
733
- spring: i,
734
- offset: Y.scaleDown,
733
+ spring: r,
734
+ offset: D.scaleDown,
735
735
  tick: (f) => {
736
- r.scale = 1 - (1 - n) * f;
736
+ s.scale = 1 - (1 - n) * f;
737
737
  }
738
738
  },
739
739
  {
740
740
  spring: l,
741
- offset: Y.translate,
741
+ offset: D.translate,
742
742
  tick: (f) => {
743
- r.translateY = -e.top + e.height * (1 - f);
743
+ s.translateY = -e.top + e.height * (1 - f);
744
744
  }
745
745
  },
746
746
  {
747
747
  spring: c,
748
- offset: Y.scaleUp,
748
+ offset: D.scaleUp,
749
749
  tick: (f) => {
750
- r.scale = n + (1 - n) * f;
750
+ s.scale = n + (1 - n) * f;
751
751
  }
752
752
  }
753
- ], d = [], y = sn({
754
- items: u,
753
+ ], d = [], h = yn({
754
+ items: p,
755
755
  from: a,
756
- to: p,
756
+ to: u,
757
757
  recordFrame: (f) => d.push({
758
758
  time: f,
759
- scale: r.scale,
760
- translateY: r.translateY
759
+ scale: s.scale,
760
+ translateY: s.translateY
761
761
  })
762
762
  });
763
- return { snapshots: d, totalDuration: y };
763
+ return { snapshots: d, totalDuration: h };
764
764
  }
765
- function rn(t, e) {
765
+ function mn(t, e) {
766
766
  if (t.length === 0) return { time: 0, scale: 1, translateY: 0 };
767
767
  if (t.length === 1 || e <= 0) return t[0];
768
768
  if (e >= 1) return t[t.length - 1];
769
- const n = e * (t.length - 1), o = Math.floor(n), s = Math.ceil(n);
770
- if (o === s) return t[o];
771
- const r = t[o], i = t[s], l = n - o;
769
+ const n = e * (t.length - 1), o = Math.floor(n), i = Math.ceil(n);
770
+ if (o === i) return t[o];
771
+ const s = t[o], r = t[i], l = n - o;
772
772
  return {
773
- time: r.time + (i.time - r.time) * l,
774
- scale: r.scale + (i.scale - r.scale) * l,
775
- translateY: r.translateY + (i.translateY - r.translateY) * l
773
+ time: s.time + (r.time - s.time) * l,
774
+ scale: s.scale + (r.scale - s.scale) * l,
775
+ translateY: s.translateY + (r.translateY - s.translateY) * l
776
776
  };
777
777
  }
778
- const an = [
778
+ const gn = [
779
779
  [1, 1],
780
780
  [-1, 1],
781
781
  [1, -1],
782
782
  [-1, -1]
783
783
  ];
784
- function ln(t, e) {
785
- const s = (r, i, l) => {
784
+ function bn(t, e) {
785
+ const i = (s, r, l) => {
786
786
  const c = document.createElement("div");
787
787
  Object.assign(c.style, {
788
788
  position: "fixed",
@@ -790,7 +790,7 @@ function ln(t, e) {
790
790
  zIndex: "9999",
791
791
  width: "15px",
792
792
  height: "15px",
793
- ...r
793
+ ...s
794
794
  });
795
795
  const a = document.createElement("div");
796
796
  Object.assign(a.style, {
@@ -799,20 +799,20 @@ function ln(t, e) {
799
799
  height: "1px",
800
800
  backgroundColor: t,
801
801
  [l]: "0",
802
- [i]: "0"
802
+ [r]: "0"
803
803
  });
804
- const p = document.createElement("div");
805
- return Object.assign(p.style, {
804
+ const u = document.createElement("div");
805
+ return Object.assign(u.style, {
806
806
  position: "absolute",
807
807
  width: "1px",
808
808
  height: "15px",
809
809
  backgroundColor: t,
810
810
  [l]: "0",
811
- [i]: "0"
812
- }), c.appendChild(a), c.appendChild(p), c;
811
+ [r]: "0"
812
+ }), c.appendChild(a), c.appendChild(u), c;
813
813
  };
814
814
  return {
815
- topLeft: s(
815
+ topLeft: i(
816
816
  {
817
817
  top: `${e.top - 1}px`,
818
818
  left: `${e.left - 1}px`
@@ -820,7 +820,7 @@ function ln(t, e) {
820
820
  "left",
821
821
  "top"
822
822
  ),
823
- topRight: s(
823
+ topRight: i(
824
824
  {
825
825
  top: `${e.top - 1}px`,
826
826
  left: `${e.left + e.width - 15 + 1}px`
@@ -828,7 +828,7 @@ function ln(t, e) {
828
828
  "right",
829
829
  "top"
830
830
  ),
831
- bottomLeft: s(
831
+ bottomLeft: i(
832
832
  {
833
833
  top: `${e.top + e.height - 15 + 1}px`,
834
834
  left: `${e.left - 1}px`
@@ -836,7 +836,7 @@ function ln(t, e) {
836
836
  "left",
837
837
  "bottom"
838
838
  ),
839
- bottomRight: s(
839
+ bottomRight: i(
840
840
  {
841
841
  top: `${e.top + e.height - 15 + 1}px`,
842
842
  left: `${e.left + e.width - 15 + 1}px`
@@ -846,11 +846,11 @@ function ln(t, e) {
846
846
  )
847
847
  };
848
848
  }
849
- function Pt(t, e) {
849
+ function Tt(t, e) {
850
850
  const n = e.left + e.width / 2, o = e.top + e.height / 2;
851
851
  t.style.transformOrigin = `${n}px ${o}px`;
852
852
  }
853
- function At(t, e) {
853
+ function Mt(t, e) {
854
854
  t.style.clipPath = `polygon(
855
855
  ${e.left}px ${e.top}px,
856
856
  ${e.left + e.width}px ${e.top}px,
@@ -858,25 +858,25 @@ function At(t, e) {
858
858
  ${e.left}px ${e.top + e.height}px
859
859
  )`;
860
860
  }
861
- function J(t, e, n, o, s) {
862
- const r = n / 1e3;
863
- return new m({
861
+ function Q(t, e, n, o, i) {
862
+ const s = n / 1e3;
863
+ return new w({
864
864
  element: t,
865
- integrator: new ce({ durationSec: r }),
865
+ integrator: new we({ durationSec: s }),
866
866
  lowerBound: 0,
867
867
  upperBound: 1,
868
- style: (i) => o(rn(e, i)),
869
- onComplete: s
868
+ style: (r) => o(mn(e, r)),
869
+ onComplete: i
870
870
  });
871
871
  }
872
- const cn = (t = {}) => {
873
- var s;
874
- const e = ((s = t.border) == null ? void 0 : s.color) ?? nn, n = en, o = t.physics;
872
+ const wn = (t = {}) => {
873
+ var i;
874
+ const e = ((i = t.border) == null ? void 0 : i.color) ?? fn, n = dn, o = t.physics;
875
875
  return {
876
- prepare: ({ from: r, to: i, context: l }) => {
877
- const c = F(l, "from"), a = F(l, "to"), p = L(document.body, l.positionedParent), u = ln(e, {
876
+ prepare: ({ from: s, to: r, context: l }) => {
877
+ const c = M(l, "from"), a = M(l, "to"), u = ft(document.body, l.positionedParent), p = bn(e, {
878
878
  ...c,
879
- top: p.top
879
+ top: u.top
880
880
  });
881
881
  for (const d of [
882
882
  "topLeft",
@@ -884,120 +884,120 @@ const cn = (t = {}) => {
884
884
  "bottomLeft",
885
885
  "bottomRight"
886
886
  ])
887
- l.positionedParent.appendChild(u[d]);
888
- return r.then((d) => {
889
- Pt(d, c), At(d, c), d.style.transform = `translateY(${-c.top}px)`;
890
- }), i.then((d) => {
891
- Pt(d, a), At(d, a), d.style.transform = `translateY(${-a.top + a.height}px) scale(${n})`;
892
- }), { borders: u, fromRect: c, toRect: a };
887
+ l.positionedParent.appendChild(p[d]);
888
+ return s.then((d) => {
889
+ Tt(d, c), Mt(d, c), d.style.transform = `translateY(${-c.top}px)`;
890
+ }), r.then((d) => {
891
+ Tt(d, a), Mt(d, a), d.style.transform = `translateY(${-a.top + a.height}px) scale(${n})`;
892
+ }), { borders: p, fromRect: c, toRect: a };
893
893
  },
894
- animation: ({ from: r, to: i, context: l, borders: c, fromRect: a, toRect: p }) => {
895
- const u = Et({
894
+ animation: ({ from: s, to: r, context: l, borders: c, fromRect: a, toRect: u }) => {
895
+ const p = vt({
896
896
  rect: a,
897
897
  scale: n,
898
898
  direction: "out",
899
899
  override: o
900
- }), d = Et({
901
- rect: p,
900
+ }), d = vt({
901
+ rect: u,
902
902
  scale: n,
903
903
  direction: "in",
904
904
  override: o
905
- }), y = J(
906
- r,
907
- u.snapshots,
908
- u.totalDuration,
909
- (w) => ({
910
- transform: `translateY(${w.translateY}px) scale(${w.scale})`
905
+ }), h = Q(
906
+ s,
907
+ p.snapshots,
908
+ p.totalDuration,
909
+ (b) => ({
910
+ transform: `translateY(${b.translateY}px) scale(${b.scale})`
911
911
  }),
912
912
  () => {
913
- r.style.clipPath = "", r.style.transformOrigin = "", r.style.transform = "";
913
+ s.style.clipPath = "", s.style.transformOrigin = "", s.style.transform = "";
914
914
  }
915
- ), f = J(
916
- i,
915
+ ), f = Q(
916
+ r,
917
917
  d.snapshots,
918
918
  d.totalDuration,
919
- (w) => ({
920
- transform: `translateY(${w.translateY}px) scale(${w.scale})`
919
+ (b) => ({
920
+ transform: `translateY(${b.translateY}px) scale(${b.scale})`
921
921
  }),
922
922
  () => {
923
- i.style.clipPath = "", i.style.transformOrigin = "", i.style.transform = "";
923
+ r.style.clipPath = "", r.style.transformOrigin = "", r.style.transform = "";
924
924
  }
925
- ), h = an.map(([w, $], x) => {
926
- const C = ["topLeft", "topRight", "bottomLeft", "bottomRight"][x];
927
- return J(
928
- c[C],
929
- u.snapshots,
930
- u.totalDuration,
925
+ ), y = gn.map(([b, $], g) => {
926
+ const x = ["topLeft", "topRight", "bottomLeft", "bottomRight"][g];
927
+ return Q(
928
+ c[x],
929
+ p.snapshots,
930
+ p.totalDuration,
931
931
  (I) => {
932
- const A = (a.width - a.width * I.scale) / 2 * 0.7 * w, P = (a.height - a.height * I.scale) / 2 * 0.7 * $;
933
- return { transform: `translate(${A}px, ${P}px)` };
932
+ const E = (a.width - a.width * I.scale) / 2 * 0.7 * b, R = (a.height - a.height * I.scale) / 2 * 0.7 * $;
933
+ return { transform: `translate(${E}px, ${R}px)` };
934
934
  }
935
935
  );
936
- }), g = new E([y, f, ...h], {
936
+ }), m = new P([h, f, ...y], {
937
937
  mode: "parallel"
938
- }), S = g.onComplete;
939
- return g.onComplete = () => {
940
- S == null || S();
941
- const w = l.positionedParent;
938
+ }), C = m.onComplete;
939
+ return m.onComplete = () => {
940
+ C == null || C();
941
+ const b = l.positionedParent;
942
942
  for (const $ of [
943
943
  "topLeft",
944
944
  "topRight",
945
945
  "bottomLeft",
946
946
  "bottomRight"
947
947
  ]) {
948
- const x = c[$];
949
- x.parentElement === w && w.removeChild(x);
948
+ const g = c[$];
949
+ g.parentElement === b && b.removeChild(g);
950
950
  }
951
- }, g;
951
+ }, m;
952
952
  }
953
953
  };
954
954
  };
955
- function ns(t = {}) {
955
+ function fi(t = {}) {
956
956
  const { options: e } = t, n = (e == null ? void 0 : e.borderColor) !== void 0 ? { border: { color: e.borderColor } } : void 0;
957
- return cn(n);
957
+ return wn(n);
958
958
  }
959
- function pn(t) {
959
+ function Sn(t) {
960
960
  if (!t) return null;
961
961
  if (t.includes("/")) {
962
962
  const n = t.split("/");
963
963
  if (n.length !== 2) return null;
964
- const o = Number.parseFloat(n[0] ?? ""), s = Number.parseFloat(n[1] ?? "");
965
- return Number.isFinite(o) && Number.isFinite(s) && o > 0 && s > 0 ? o / s : null;
964
+ const o = Number.parseFloat(n[0] ?? ""), i = Number.parseFloat(n[1] ?? "");
965
+ return Number.isFinite(o) && Number.isFinite(i) && o > 0 && i > 0 ? o / i : null;
966
966
  }
967
967
  const e = Number.parseFloat(t);
968
968
  return Number.isFinite(e) && e > 0 ? e : null;
969
969
  }
970
- function un(t) {
970
+ function Cn(t) {
971
971
  return t === "contain" || t === "cover" ? t : null;
972
972
  }
973
- function it(t) {
973
+ function at(t) {
974
974
  return t.tagName === "IMG";
975
975
  }
976
- function dn(t) {
977
- if (it(t)) return t;
976
+ function xn(t) {
977
+ if (at(t)) return t;
978
978
  if (t.tagName === "PICTURE" || t.tagName === "VIDEO")
979
979
  return null;
980
980
  const e = [];
981
981
  for (const n of Array.from(t.children)) {
982
982
  const o = n;
983
- it(o) && e.push(o);
983
+ at(o) && e.push(o);
984
984
  }
985
985
  return e.length === 1 ? e[0] ?? null : null;
986
986
  }
987
- function fn(t) {
987
+ function $n(t) {
988
988
  var c, a;
989
- if (!it(t)) return null;
989
+ if (!at(t)) return null;
990
990
  const e = t, n = e.naturalWidth, o = e.naturalHeight;
991
991
  if (typeof n == "number" && typeof o == "number" && Number.isFinite(n) && Number.isFinite(o) && n > 0 && o > 0)
992
992
  return n / o;
993
- const s = ((c = t.getAttribute("width")) == null ? void 0 : c.trim()) ?? "", r = ((a = t.getAttribute("height")) == null ? void 0 : a.trim()) ?? "", i = s === "" ? Number.NaN : Number(s), l = r === "" ? Number.NaN : Number(r);
994
- return Number.isFinite(i) && Number.isFinite(l) && i > 0 && l > 0 ? i / l : null;
993
+ const i = ((c = t.getAttribute("width")) == null ? void 0 : c.trim()) ?? "", s = ((a = t.getAttribute("height")) == null ? void 0 : a.trim()) ?? "", r = i === "" ? Number.NaN : Number(i), l = s === "" ? Number.NaN : Number(s);
994
+ return Number.isFinite(r) && Number.isFinite(l) && r > 0 && l > 0 ? r / l : null;
995
995
  }
996
- function yn(t) {
996
+ function En(t) {
997
997
  const e = t.trim().toLowerCase().replace(/\s+/g, " ");
998
998
  return e === "" || e === "center" || e === "center center" || e === "50% 50%";
999
999
  }
1000
- function B(t) {
1000
+ function V(t) {
1001
1001
  if (typeof getComputedStyle == "function")
1002
1002
  try {
1003
1003
  return getComputedStyle(t);
@@ -1005,44 +1005,44 @@ function B(t) {
1005
1005
  }
1006
1006
  return t.style;
1007
1007
  }
1008
- function hn(t) {
1009
- const e = B(t), n = yn(e.objectPosition ?? "");
1008
+ function Pn(t) {
1009
+ const e = V(t), n = En(e.objectPosition ?? "");
1010
1010
  return {
1011
- fit: n ? un(e.objectFit ?? null) : null,
1011
+ fit: n ? Cn(e.objectFit ?? null) : null,
1012
1012
  centered: n
1013
1013
  };
1014
1014
  }
1015
- function Nt(t) {
1015
+ function ht(t) {
1016
1016
  if (!t) return 0;
1017
1017
  const e = /^(-?(?:\d+\.?\d*|\.\d+))px$/.exec(t.trim());
1018
1018
  if (!e) return null;
1019
1019
  const n = Number.parseFloat(e[1] ?? "");
1020
1020
  return Number.isFinite(n) && n >= 0 ? n : null;
1021
1021
  }
1022
- function It(t) {
1023
- const e = B(t), n = [
1022
+ function lt(t) {
1023
+ const e = V(t), n = [
1024
1024
  e.borderTopLeftRadius,
1025
1025
  e.borderTopRightRadius,
1026
1026
  e.borderBottomRightRadius,
1027
1027
  e.borderBottomLeftRadius
1028
- ].map(Nt), o = n[0];
1028
+ ].map(ht), o = n[0];
1029
1029
  if (o == null)
1030
1030
  return { radius: 0, supported: !1 };
1031
- const s = n.every(
1032
- (r) => r !== null && Math.abs(r - o) < 1e-3
1031
+ const i = n.every(
1032
+ (s) => s !== null && Math.abs(s - o) < 1e-3
1033
1033
  );
1034
- return { radius: s ? o : 0, supported: s };
1034
+ return { radius: i ? o : 0, supported: i };
1035
1035
  }
1036
- function mn(t, e) {
1037
- var s;
1036
+ function Rn(t, e) {
1037
+ var i;
1038
1038
  if (!e) return null;
1039
- const n = (s = t.getAttribute(e)) == null ? void 0 : s.trim();
1039
+ const n = (i = t.getAttribute(e)) == null ? void 0 : i.trim();
1040
1040
  if (n == null || n === "") return null;
1041
1041
  const o = Number.parseFloat(n);
1042
1042
  return Number.isFinite(o) && o >= 0 ? o : null;
1043
1043
  }
1044
- function gn(t) {
1045
- const e = B(t);
1044
+ function An(t) {
1045
+ const e = V(t);
1046
1046
  return [
1047
1047
  e.paddingTop,
1048
1048
  e.paddingRight,
@@ -1052,19 +1052,19 @@ function gn(t) {
1052
1052
  e.borderRightWidth,
1053
1053
  e.borderBottomWidth,
1054
1054
  e.borderLeftWidth
1055
- ].every((o) => o ? Nt(o) === 0 : !0);
1055
+ ].every((o) => o ? ht(o) === 0 : !0);
1056
1056
  }
1057
- function bn(t) {
1058
- const e = B(t), n = (o) => o === "hidden" || o === "clip";
1057
+ function In(t) {
1058
+ const e = V(t), n = (o) => o === "hidden" || o === "clip";
1059
1059
  return n(e.overflowX) && n(e.overflowY);
1060
1060
  }
1061
1061
  function v(t) {
1062
1062
  return t.left + t.width / 2;
1063
1063
  }
1064
- function O(t) {
1064
+ function T(t) {
1065
1065
  return t.top + t.height / 2;
1066
1066
  }
1067
- function ct(t, e) {
1067
+ function z(t, e) {
1068
1068
  return {
1069
1069
  top: Math.max(0, e.top - t.top),
1070
1070
  right: Math.max(0, t.left + t.width - (e.left + e.width)),
@@ -1072,30 +1072,30 @@ function ct(t, e) {
1072
1072
  left: Math.max(0, e.left - t.left)
1073
1073
  };
1074
1074
  }
1075
- function wn(t, e) {
1076
- const n = Math.max(t.left, e.left), o = Math.max(t.top, e.top), s = Math.min(t.left + t.width, e.left + e.width), r = Math.min(t.top + t.height, e.top + e.height);
1077
- return s > n && r > o ? { left: n, top: o, width: s - n, height: r - o } : null;
1075
+ function ct(t, e) {
1076
+ const n = Math.max(t.left, e.left), o = Math.max(t.top, e.top), i = Math.min(t.left + t.width, e.left + e.width), s = Math.min(t.top + t.height, e.top + e.height);
1077
+ return i > n && s > o ? { left: n, top: o, width: i - n, height: s - o } : null;
1078
1078
  }
1079
- function _t(t, e) {
1079
+ function N(t, e) {
1080
1080
  return Math.abs(t.left - e.left) < 0.01 && Math.abs(t.top - e.top) < 0.01 && Math.abs(t.width - e.width) < 0.01 && Math.abs(t.height - e.height) < 0.01;
1081
1081
  }
1082
- function Sn(t, e, n) {
1082
+ function _n(t, e, n) {
1083
1083
  const o = t.width / t.height;
1084
- let s, r;
1085
- return n === "contain" ? o > e ? (r = t.height, s = r * e) : (s = t.width, r = s / e) : o > e ? (s = t.width, r = s / e) : (r = t.height, s = r * e), {
1086
- left: t.left + (t.width - s) / 2,
1087
- top: t.top + (t.height - r) / 2,
1088
- width: s,
1089
- height: r
1084
+ let i, s;
1085
+ return n === "contain" ? o > e ? (s = t.height, i = s * e) : (i = t.width, s = i / e) : o > e ? (i = t.width, s = i / e) : (s = t.height, i = s * e), {
1086
+ left: t.left + (t.width - i) / 2,
1087
+ top: t.top + (t.height - s) / 2,
1088
+ width: i,
1089
+ height: s
1090
1090
  };
1091
1091
  }
1092
- function zt(t, e, n) {
1093
- const o = e !== null && n !== null && t.width > 0 && t.height > 0 ? Sn(t, e, n) : t, s = n === "contain" ? o : t;
1092
+ function Bt(t, e, n) {
1093
+ const o = e !== null && n !== null && t.width > 0 && t.height > 0 ? _n(t, e, n) : t, i = n === "contain" ? o : t;
1094
1094
  return {
1095
1095
  bbox: t,
1096
1096
  content: o,
1097
- window: s,
1098
- clipInset: ct(o, s),
1097
+ window: i,
1098
+ clipInset: z(o, i),
1099
1099
  aspectRatio: e,
1100
1100
  fit: n,
1101
1101
  radius: 0,
@@ -1106,71 +1106,152 @@ function zt(t, e, n) {
1106
1106
  mediaElement: null
1107
1107
  };
1108
1108
  }
1109
- function rt(t, e, n) {
1109
+ function pt(t, e, n) {
1110
1110
  return {
1111
- ...zt(t, null, null),
1111
+ ...Bt(t, null, null),
1112
1112
  radius: e,
1113
1113
  radiusSource: n,
1114
1114
  bboxRadius: e,
1115
1115
  bboxRadiusSource: n
1116
1116
  };
1117
1117
  }
1118
- function Vt(t, e) {
1118
+ function Zt(t, e) {
1119
1119
  const n = t.aspectRatio, o = e.aspectRatio;
1120
1120
  return t.contentAware && e.contentAware && n !== null && o !== null && Math.abs(n - o) / Math.max(n, o) < 0.01;
1121
1121
  }
1122
- function Rt(t) {
1123
- return rt(
1122
+ function Yt(t) {
1123
+ return pt(
1124
1124
  t.bbox,
1125
1125
  t.bboxRadius,
1126
1126
  t.bboxRadiusSource
1127
1127
  );
1128
1128
  }
1129
- function Ut(t, e) {
1130
- return Vt(t, e) ? [t, e] : [Rt(t), Rt(e)];
1129
+ function Gt(t, e) {
1130
+ return Zt(t, e) ? [t, e] : [Yt(t), Yt(e)];
1131
1131
  }
1132
- function at(t, e, n, o) {
1133
- const s = dn(t), r = s ? n(s) : e, i = o.legacyAspectRatioAttribute ? pn(
1134
- t.getAttribute(o.legacyAspectRatioAttribute) ?? (s == null ? void 0 : s.getAttribute(o.legacyAspectRatioAttribute)) ?? null
1135
- ) : null, l = i ?? (s ? fn(s) : null), c = s ? hn(s) : { fit: null, centered: !0 }, a = c.centered && (s === null || gn(s)) ? c.fit ?? (i !== null ? o.fallbackFit ?? null : null) : null, p = zt(r, l, a), u = bn(t), y = s !== null && s !== t && u ? wn(p.window, e) : p.window, f = mn(t, o.legacyRadiusAttribute), h = s === t || u, g = h ? It(t) : { radius: 0, supported: !0 }, S = f ?? g.radius, w = f !== null ? "legacy" : g.supported ? g.radius > 0 ? "computed" : "none" : "unsupported", $ = [];
1136
- y && h && _t(y, e) && $.push(g), y && s && _t(y, r) && $.push(It(s));
1137
- const x = $.every((P) => P.supported), C = Math.max(
1132
+ function On(t, e, n, o) {
1133
+ const i = xn(t), s = i ? n(i) : e, r = o.legacyAspectRatioAttribute ? Sn(
1134
+ t.getAttribute(o.legacyAspectRatioAttribute) ?? (i == null ? void 0 : i.getAttribute(o.legacyAspectRatioAttribute)) ?? null
1135
+ ) : null, l = r ?? (i ? $n(i) : null), c = i ? Pn(i) : { fit: null, centered: !0 }, a = c.centered && (i === null || An(i)) ? c.fit ?? (r !== null ? o.fallbackFit ?? null : null) : null, u = Bt(s, l, a), p = In(t), h = i !== null && i !== t && p ? ct(u.window, e) : u.window, f = Rn(t, o.legacyRadiusAttribute), y = i === t || p, m = y ? lt(t) : { radius: 0, supported: !0 }, C = f ?? m.radius, b = f !== null ? "legacy" : m.supported ? m.radius > 0 ? "computed" : "none" : "unsupported", $ = [];
1136
+ h && y && N(h, e) && $.push(m), h && i && N(h, s) && $.push(lt(i));
1137
+ const g = $.every((R) => R.supported), x = Math.max(
1138
1138
  0,
1139
- ...$.map((P) => P.radius)
1140
- ), I = f ?? C, A = f !== null ? "legacy" : x ? C > 0 ? "computed" : "none" : "unsupported";
1141
- return !y || A === "unsupported" ? rt(e, S, w) : {
1142
- ...p,
1139
+ ...$.map((R) => R.radius)
1140
+ ), I = f ?? x, E = f !== null ? "legacy" : g ? x > 0 ? "computed" : "none" : "unsupported";
1141
+ return !h || E === "unsupported" ? pt(e, C, b) : {
1142
+ ...u,
1143
1143
  bbox: e,
1144
- window: y,
1145
- clipInset: ct(p.content, y),
1144
+ window: h,
1145
+ clipInset: z(u.content, h),
1146
1146
  radius: I,
1147
- radiusSource: A,
1148
- bboxRadius: S,
1149
- bboxRadiusSource: w,
1150
- mediaElement: p.contentAware ? s : null
1147
+ radiusSource: E,
1148
+ bboxRadius: C,
1149
+ bboxRadiusSource: b,
1150
+ mediaElement: u.contentAware ? i : null
1151
1151
  };
1152
1152
  }
1153
- function Xt(t, e, n, o, s) {
1154
- const r = n.width / o, i = n.height / s;
1153
+ function ut(t, e, n, o) {
1154
+ const i = On(
1155
+ t,
1156
+ e,
1157
+ n,
1158
+ o
1159
+ );
1160
+ if (!o.clipRoot || i.radiusSource === "unsupported")
1161
+ return i;
1162
+ let s = i.window, r = i.radius, l = [r, r, r, r], c = i.radiusSource, a = t.parentElement;
1163
+ for (; a && a !== o.clipRoot; ) {
1164
+ const p = V(a), d = (y) => y === "hidden" || y === "clip" || y === "auto" || y === "scroll", h = d(p.overflowX), f = d(p.overflowY);
1165
+ if (h || f) {
1166
+ if (![
1167
+ p.borderTopWidth,
1168
+ p.borderRightWidth,
1169
+ p.borderBottomWidth,
1170
+ p.borderLeftWidth
1171
+ ].every((E) => ht(E) === 0) || a.offsetWidth && a.clientWidth && a.offsetWidth - a.clientWidth > 1 || a.offsetHeight && a.clientHeight && a.offsetHeight - a.clientHeight > 1)
1172
+ return i;
1173
+ const m = n(a), C = {
1174
+ left: h ? m.left : s.left,
1175
+ top: f ? m.top : s.top,
1176
+ width: h ? m.width : s.width,
1177
+ height: f ? m.height : s.height
1178
+ }, b = ct(s, C);
1179
+ if (!b) return i;
1180
+ const $ = lt(a);
1181
+ if (!$.supported) return i;
1182
+ if (h && f && N(s, m))
1183
+ c !== "legacy" && (r = Math.max(r, $.radius), l = l.map(
1184
+ (E) => Math.max(E, $.radius)
1185
+ ), r > 0 && (c = "computed"));
1186
+ else if ($.radius > 0) {
1187
+ const E = {
1188
+ left: m.left + $.radius,
1189
+ top: m.top + $.radius,
1190
+ width: m.width - 2 * $.radius,
1191
+ height: m.height - 2 * $.radius
1192
+ };
1193
+ if (!N(ct(s, E) ?? m, s))
1194
+ return i;
1195
+ }
1196
+ const g = z(s, b), x = [
1197
+ [g.top, g.left],
1198
+ [g.top, g.right],
1199
+ [g.bottom, g.right],
1200
+ [g.bottom, g.left]
1201
+ ];
1202
+ for (let E = 0; E < 4; E++) {
1203
+ const R = Math.max(...x[E]), _ = l[E];
1204
+ if (R > 0.01 && R < _) return i;
1205
+ R > 0.01 && (l[E] = 0);
1206
+ }
1207
+ const I = Math.max(...l);
1208
+ if (b.width < I || b.height < I)
1209
+ return i;
1210
+ s = b;
1211
+ }
1212
+ a = a.parentElement;
1213
+ }
1214
+ const u = N(i.bbox, s);
1155
1215
  return {
1156
- left: v(t) + (v(n) - v(e)) / o - r / 2,
1157
- top: O(t) + (O(n) - O(e)) / s - i / 2,
1158
- width: r,
1159
- height: i
1216
+ ...i,
1217
+ window: s,
1218
+ clipInset: z(i.content, s),
1219
+ radius: r,
1220
+ radiusSource: c,
1221
+ ...l.some((p) => p !== r) ? { cornerRadii: l } : {},
1222
+ ...u ? { bboxRadius: r, bboxRadiusSource: c } : {}
1160
1223
  };
1161
1224
  }
1162
- const xn = {
1225
+ function jt(t, e, n, o, i) {
1226
+ const s = n.width / o, r = n.height / i;
1227
+ return {
1228
+ left: v(t) + (v(n) - v(e)) / o - s / 2,
1229
+ top: T(t) + (T(n) - T(e)) / i - r / 2,
1230
+ width: s,
1231
+ height: r
1232
+ };
1233
+ }
1234
+ const Fn = {
1163
1235
  enter: "contain",
1164
1236
  exit: "cover",
1165
1237
  legacy: "contain"
1166
1238
  };
1167
- function D(t) {
1168
- return xn[t];
1169
- }
1170
- const vt = "data-hero-enter-key", Ot = "data-hero-exit-key", Q = "data-hero-key";
1171
- class Cn {
1239
+ function L(t) {
1240
+ return Fn[t];
1241
+ }
1242
+ function yt(t, e, n) {
1243
+ const o = (l, c) => `${c > 0 ? l / c * 100 : 0}%`, i = [
1244
+ o(e.top, t.height),
1245
+ o(e.right, t.width),
1246
+ o(e.bottom, t.height),
1247
+ o(e.left, t.width)
1248
+ ].join(" "), s = n.map((l) => o(l.x, t.width)).join(" "), r = n.map((l) => o(l.y, t.height)).join(" ");
1249
+ return `inset(${i} round ${s} / ${r})`;
1250
+ }
1251
+ const Dt = "data-hero-enter-key", Lt = "data-hero-exit-key", tt = "data-hero-key";
1252
+ class vn {
1172
1253
  constructor() {
1173
- T(this, "previousFromOpacity", "");
1254
+ Y(this, "previousFromOpacity", "");
1174
1255
  }
1175
1256
  prepare(e) {
1176
1257
  e.from.then((n) => {
@@ -1183,161 +1264,193 @@ class Cn {
1183
1264
  }), [];
1184
1265
  }
1185
1266
  }
1186
- const $n = () => new Cn();
1187
- class En {
1267
+ const Tn = () => new vn();
1268
+ class Mn {
1188
1269
  contribute(e) {
1189
- const { from: n, to: o, physics: s, onComplete: r } = e, i = n.style.opacity, l = o.style.opacity, c = n.style.willChange, a = o.style.willChange;
1190
- return o.style.opacity = "0", n.style.willChange = "opacity", o.style.willChange = "opacity", r(() => {
1191
- n.style.opacity = i, o.style.opacity = l, n.style.willChange = c, o.style.willChange = a;
1270
+ const { from: n, to: o, physics: i, onComplete: s } = e, r = n.style.opacity, l = o.style.opacity, c = n.style.willChange, a = o.style.willChange;
1271
+ return o.style.opacity = "0", n.style.willChange = "opacity", o.style.willChange = "opacity", s(() => {
1272
+ n.style.opacity = r, o.style.opacity = l, n.style.willChange = c, o.style.willChange = a;
1192
1273
  }), [
1193
- new m({
1274
+ new w({
1194
1275
  element: n,
1195
- integrator: b.from(s),
1196
- style: (p, u) => ({ opacity: u })
1276
+ integrator: S.from(i),
1277
+ style: (u, p) => ({ opacity: p })
1197
1278
  }),
1198
- new m({
1279
+ new w({
1199
1280
  element: o,
1200
- integrator: b.from(s),
1201
- style: (p) => ({ opacity: p })
1281
+ integrator: S.from(i),
1282
+ style: (u) => ({ opacity: u })
1202
1283
  })
1203
1284
  ];
1204
1285
  }
1205
1286
  }
1206
- const Pn = () => new En(), An = {
1207
- static: $n,
1208
- fade: Pn
1209
- }, In = {
1287
+ const Yn = () => new Mn(), Dn = {
1288
+ static: Tn,
1289
+ fade: Yn
1290
+ }, Ln = {
1210
1291
  spring: { stiffness: 320, damping: 30 }
1211
- }, _n = () => In, Rn = {
1292
+ }, kn = () => Ln, Hn = {
1212
1293
  spring: { stiffness: 300, damping: 30, doubleSpring: 1 }
1213
- }, vn = () => Rn, On = {
1214
- default: _n,
1215
- smooth: vn
1216
- }, Fn = 700, Tn = "data-hero-aspect-ratio", Yn = "data-hero-radius";
1217
- function Ft(t, e, n) {
1218
- const o = L(t, e);
1219
- return at(
1220
- e,
1221
- o,
1222
- (s) => L(t, s),
1223
- {
1224
- fallbackFit: n,
1225
- legacyAspectRatioAttribute: Tn,
1226
- legacyRadiusAttribute: Yn
1227
- }
1228
- );
1294
+ }, Nn = () => Hn, zn = {
1295
+ default: kn,
1296
+ smooth: Nn
1297
+ }, Vn = 700, Xn = "data-hero-aspect-ratio", Wn = "data-hero-radius";
1298
+ function kt(t, e, n, o) {
1299
+ const i = (r) => {
1300
+ const l = H(t, r);
1301
+ return {
1302
+ left: l.left + t.scrollLeft,
1303
+ top: l.top + t.scrollTop,
1304
+ width: l.width,
1305
+ height: l.height
1306
+ };
1307
+ }, s = i(e);
1308
+ return ut(e, s, i, {
1309
+ clipRoot: o,
1310
+ fallbackFit: n,
1311
+ legacyAspectRatioAttribute: Xn,
1312
+ legacyRadiusAttribute: Wn
1313
+ });
1229
1314
  }
1230
- function V(t, e) {
1315
+ function X(t, e) {
1231
1316
  const n = /* @__PURE__ */ new Map(), o = t.querySelectorAll(`[${e}]`);
1232
- for (const s of Array.from(o)) {
1233
- const r = s.getAttribute(e);
1234
- r && (n.has(r) || n.set(r, s));
1317
+ for (const i of Array.from(o)) {
1318
+ const s = i.getAttribute(e);
1319
+ s && (n.has(s) || n.set(s, i));
1235
1320
  }
1236
1321
  return n;
1237
1322
  }
1238
- function Dn(t, e) {
1239
- const n = [], o = V(e, vt), s = V(t, Ot);
1323
+ function Un(t, e) {
1324
+ const n = [], o = X(e, Dt), i = X(t, Lt);
1240
1325
  for (const [l, c] of o) {
1241
- const a = s.get(l);
1326
+ const a = i.get(l);
1242
1327
  a && n.push({
1243
1328
  key: l,
1244
1329
  fromEl: a,
1245
1330
  toEl: c,
1246
- fromFit: D("exit"),
1247
- toFit: D("enter")
1331
+ fromFit: L("exit"),
1332
+ toFit: L("enter")
1248
1333
  });
1249
1334
  }
1250
- const r = V(t, vt), i = V(e, Ot);
1251
- for (const [l, c] of r) {
1252
- const a = i.get(l);
1335
+ const s = X(t, Dt), r = X(e, Lt);
1336
+ for (const [l, c] of s) {
1337
+ const a = r.get(l);
1253
1338
  a && n.push({
1254
1339
  key: l,
1255
1340
  fromEl: c,
1256
1341
  toEl: a,
1257
- fromFit: D("enter"),
1258
- toFit: D("exit")
1342
+ fromFit: L("enter"),
1343
+ toFit: L("exit")
1259
1344
  });
1260
1345
  }
1261
1346
  return n;
1262
1347
  }
1263
- function Mn(t, e) {
1348
+ function Bn(t, e) {
1264
1349
  const n = [], o = Array.from(
1265
- e.querySelectorAll(`[${Q}]`)
1350
+ e.querySelectorAll(`[${tt}]`)
1266
1351
  );
1267
- for (const s of o) {
1268
- const r = s.getAttribute(Q);
1269
- if (!r) continue;
1270
- const i = t.querySelector(
1271
- `[${Q}="${r}"]`
1352
+ for (const i of o) {
1353
+ const s = i.getAttribute(tt);
1354
+ if (!s) continue;
1355
+ const r = t.querySelector(
1356
+ `[${tt}="${s}"]`
1272
1357
  );
1273
- i && n.push({
1274
- key: r,
1275
- fromEl: i,
1276
- toEl: s,
1277
- fromFit: D("legacy"),
1278
- toFit: D("legacy")
1358
+ r && n.push({
1359
+ key: s,
1360
+ fromEl: r,
1361
+ toEl: i,
1362
+ fromFit: L("legacy"),
1363
+ toFit: L("legacy")
1279
1364
  });
1280
1365
  }
1281
1366
  return n;
1282
1367
  }
1283
- function kn(t, e) {
1284
- const n = Dn(t, e);
1285
- return n.length > 0 ? n : Mn(t, e);
1368
+ function Zn(t, e) {
1369
+ const n = Un(t, e);
1370
+ return n.length > 0 ? n : Bn(t, e);
1286
1371
  }
1287
- function Ln(t, e) {
1288
- return Ut(t, e);
1372
+ function Gn(t, e) {
1373
+ return Gt(t, e);
1289
1374
  }
1290
- function Hn(t, e) {
1375
+ function jn(t, e) {
1291
1376
  return t.radiusSource === "unsupported" || e.radiusSource === "unsupported" ? !1 : t.mediaElement !== null || e.mediaElement !== null || t.radiusSource === "computed" || t.radiusSource === "legacy" || e.radiusSource === "computed" || e.radiusSource === "legacy";
1292
1377
  }
1293
- function Nn(t, e, n) {
1294
- const { fromEl: o, toEl: s } = e, [r, i] = Ln(
1295
- Ft(t, o, e.fromFit),
1296
- Ft(t, s, e.toFit)
1297
- ), l = r.content, c = r.window, a = i.content, p = i.window, u = i.clipInset, d = r.radiusSource === "unsupported" || i.radiusSource === "unsupported", y = d ? 0 : r.radius, f = d ? 0 : i.radius;
1298
- if (l.width === 0 || l.height === 0 || c.width === 0 || c.height === 0 || a.width === 0 || a.height === 0 || p.width === 0 || p.height === 0)
1378
+ function Kn(t, e, n, o, i) {
1379
+ const { fromEl: s, toEl: r } = e, [l, c] = Gn(
1380
+ kt(t, s, e.fromFit, o),
1381
+ kt(t, r, e.toFit, i)
1382
+ ), a = l.content, u = l.window, p = c.content, d = c.window, h = c.clipInset, f = l.radiusSource === "unsupported" || c.radiusSource === "unsupported", y = f ? 0 : l.radius, m = f ? 0 : c.radius;
1383
+ if (a.width === 0 || a.height === 0 || u.width === 0 || u.height === 0 || p.width === 0 || p.height === 0 || d.width === 0 || d.height === 0)
1299
1384
  return null;
1300
- const h = Math.max(
1301
- l.width / a.width,
1302
- l.height / a.height
1303
- ), g = v(l), S = O(l), w = v(a), $ = O(a), x = g - w, C = S - $;
1304
- if (Math.abs(C) > n) return null;
1305
- const I = ct(
1306
- a,
1307
- Xt(a, l, c, h, h)
1385
+ const C = Math.max(
1386
+ a.width / p.width,
1387
+ a.height / p.height
1388
+ ), b = v(a), $ = T(a), g = v(p), x = T(p), I = b - g, E = $ - x;
1389
+ if (Math.abs(E) > n) return null;
1390
+ const R = z(
1391
+ p,
1392
+ jt(p, a, u, C, C)
1308
1393
  );
1309
1394
  return {
1310
- toContent: a,
1311
- fromVisualEl: r.mediaElement ?? o,
1312
- toVisualEl: i.mediaElement ?? s,
1313
- resetCloneRadius: Hn(r, i),
1314
- styleFor: (A, P) => {
1315
- const H = P * x, M = P * C, N = A + P * h, Kt = Math.max(0, y * P + f * A) / Math.max(Math.abs(N), 1e-6), qt = I.top * P + u.top * A, Jt = I.right * P + u.right * A, Qt = I.bottom * P + u.bottom * A, te = I.left * P + u.left * A;
1395
+ toContent: p,
1396
+ fromVisualEl: l.mediaElement ?? s,
1397
+ toVisualEl: c.mediaElement ?? r,
1398
+ resetCloneRadius: jn(l, c),
1399
+ styleFor: (_, A) => {
1400
+ const B = A * I, ee = A * E, mt = _ + A * C, ne = l.cornerRadii ?? [
1401
+ y,
1402
+ y,
1403
+ y,
1404
+ y
1405
+ ], oe = c.cornerRadii ?? [
1406
+ m,
1407
+ m,
1408
+ m,
1409
+ m
1410
+ ], ie = ne.map((ce, pe) => {
1411
+ const gt = Math.max(0, ce * A + oe[pe] * _) / Math.max(Math.abs(mt), 1e-6);
1412
+ return { x: gt, y: gt };
1413
+ }), se = R.top * A + h.top * _, re = R.right * A + h.right * _, ae = R.bottom * A + h.bottom * _, le = R.left * A + h.left * _;
1316
1414
  return {
1317
- transform: `translate(${H}px, ${M}px) scale(${N})`,
1318
- clipPath: `inset(${qt}px ${Jt}px ${Qt}px ${te}px round ${Kt}px)`
1415
+ transform: `translate(${B}px, ${ee}px) scale(${mt})`,
1416
+ clipPath: yt(
1417
+ p,
1418
+ {
1419
+ top: se,
1420
+ right: re,
1421
+ bottom: ae,
1422
+ left: le
1423
+ },
1424
+ ie
1425
+ )
1319
1426
  };
1320
1427
  }
1321
1428
  };
1322
1429
  }
1323
- function zn(t, e) {
1430
+ function qn(t, e) {
1324
1431
  t.style.transform = e.transform, t.style.clipPath = e.clipPath;
1325
1432
  }
1326
- class Vn {
1433
+ class Jn {
1327
1434
  contribute(e) {
1328
- const { resolved: n, physics: o, positionedParent: s, maxDistance: r, onComplete: i } = e, l = [];
1435
+ const { resolved: n, physics: o, positionedParent: i, maxDistance: s, onComplete: r } = e, l = [];
1329
1436
  for (const c of n.pairs) {
1330
- const a = Nn(s, c, r);
1437
+ const a = Kn(
1438
+ i,
1439
+ c,
1440
+ s,
1441
+ e.from,
1442
+ e.to
1443
+ );
1331
1444
  if (!a) continue;
1332
- const { fromVisualEl: p, toVisualEl: u } = a, d = u.cloneNode(!0);
1333
- d.style.position = "absolute", d.style.left = `${a.toContent.left}px`, d.style.top = `${a.toContent.top}px`, d.style.width = `${a.toContent.width}px`, d.style.height = `${a.toContent.height}px`, d.style.margin = "0", d.style.transformOrigin = "center center", d.style.zIndex = "1000", d.style.willChange = "transform, clip-path", d.style.pointerEvents = "none", d.style.maxWidth = "none", d.style.maxHeight = "none", a.resetCloneRadius && (d.style.borderRadius = "0"), zn(d, a.styleFor(0, 1)), s.appendChild(d);
1334
- const y = p.style.opacity, f = u.style.opacity;
1335
- p.style.opacity = "0", u.style.opacity = "0", i(() => {
1336
- p.style.opacity = y, u.style.opacity = f, d.parentElement && d.parentElement.removeChild(d);
1445
+ const { fromVisualEl: u, toVisualEl: p } = a, d = p.cloneNode(!0);
1446
+ d.style.position = "absolute", d.style.left = `${a.toContent.left}px`, d.style.top = `${a.toContent.top}px`, d.style.width = `${a.toContent.width}px`, d.style.height = `${a.toContent.height}px`, d.style.margin = "0", d.style.transformOrigin = "center center", d.style.zIndex = "1000", d.style.willChange = "transform, clip-path", d.style.pointerEvents = "none", d.style.maxWidth = "none", d.style.maxHeight = "none", a.resetCloneRadius && (d.style.borderRadius = "0"), qn(d, a.styleFor(0, 1)), i.appendChild(d);
1447
+ const h = u.style.opacity, f = p.style.opacity;
1448
+ u.style.opacity = "0", p.style.opacity = "0", r(() => {
1449
+ u.style.opacity = h, p.style.opacity = f, d.parentElement && d.parentElement.removeChild(d);
1337
1450
  }), l.push(
1338
- new m({
1451
+ new w({
1339
1452
  element: d,
1340
- integrator: b.from(o),
1453
+ integrator: S.from(o),
1341
1454
  style: a.styleFor
1342
1455
  })
1343
1456
  );
@@ -1345,150 +1458,150 @@ class Vn {
1345
1458
  return l;
1346
1459
  }
1347
1460
  }
1348
- function Un(t) {
1349
- return [new Vn(), An[t.type]()];
1461
+ function Qn(t) {
1462
+ return [new Jn(), Dn[t.type]()];
1350
1463
  }
1351
- const Xn = (t) => {
1352
- const e = Un(t), n = On[t.variant](), o = Fn;
1464
+ const to = (t) => {
1465
+ const e = Qn(t), n = zn[t.variant](), o = Vn;
1353
1466
  return {
1354
- prepare: (s) => {
1467
+ prepare: (i) => {
1355
1468
  var l;
1356
- const r = Promise.all([
1357
- s.from,
1358
- s.to
1359
- ]).then(([c, a]) => ({ pairs: kn(c, a) })), i = {
1360
- from: s.from,
1361
- to: s.to,
1362
- resolved: r
1469
+ const s = Promise.all([
1470
+ i.from,
1471
+ i.to
1472
+ ]).then(([c, a]) => ({ pairs: Zn(c, a) })), r = {
1473
+ from: i.from,
1474
+ to: i.to,
1475
+ resolved: s
1363
1476
  };
1364
1477
  for (const c of e)
1365
- (l = c.prepare) == null || l.call(c, i);
1366
- return r.then((c) => ({ resolved: c }));
1478
+ (l = c.prepare) == null || l.call(c, r);
1479
+ return s.then((c) => ({ resolved: c }));
1367
1480
  },
1368
- animation: ({ from: s, to: r, context: i, resolved: l }) => {
1481
+ animation: ({ from: i, to: s, context: r, resolved: l }) => {
1369
1482
  if (l.pairs.length === 0)
1370
- return new E([], { mode: "parallel" });
1483
+ return new P([], { mode: "parallel" });
1371
1484
  const c = [], a = (f) => {
1372
1485
  c.push(f);
1373
- }, p = {
1374
- from: s,
1375
- to: r,
1486
+ }, u = {
1487
+ from: i,
1488
+ to: s,
1376
1489
  resolved: l,
1377
1490
  physics: n,
1378
- positionedParent: i.positionedParent,
1491
+ positionedParent: r.positionedParent,
1379
1492
  maxDistance: o,
1380
1493
  onComplete: a
1381
- }, u = [];
1494
+ }, p = [];
1382
1495
  for (const f of e)
1383
- f.contribute && u.push(...f.contribute(p));
1384
- if (u.length === 0)
1385
- return new E([], { mode: "parallel" });
1386
- const d = new E(u, { mode: "parallel" }), y = d.onComplete;
1496
+ f.contribute && p.push(...f.contribute(u));
1497
+ if (p.length === 0)
1498
+ return new P([], { mode: "parallel" });
1499
+ const d = new P(p, { mode: "parallel" }), h = d.onComplete;
1387
1500
  return d.onComplete = () => {
1388
- y == null || y();
1501
+ h == null || h();
1389
1502
  for (const f of c)
1390
1503
  try {
1391
1504
  f();
1392
- } catch (h) {
1393
- console.error("[hero] cleanup error", h);
1505
+ } catch (y) {
1506
+ console.error("[hero] cleanup error", y);
1394
1507
  }
1395
1508
  }, d;
1396
1509
  }
1397
1510
  };
1398
1511
  };
1399
- function os(t = {}) {
1512
+ function hi(t = {}) {
1400
1513
  const e = t.type ?? "static", n = t.variant ?? "default";
1401
- return Xn({ type: e, variant: n });
1514
+ return to({ type: e, variant: n });
1402
1515
  }
1403
- const Bn = {
1516
+ const eo = {
1404
1517
  spring: { stiffness: 50, damping: 30 }
1405
- }, Wn = {
1518
+ }, no = {
1406
1519
  spring: { stiffness: 80, damping: 25 }
1407
- }, Zn = (t = {}) => {
1408
- const e = t.physics ?? Bn, n = t.initialRotation ?? 45, o = t.initialScale ?? 0.01, s = t.rotationTriggerPoint ?? 0.8;
1520
+ }, oo = (t = {}) => {
1521
+ const e = t.physics ?? eo, n = t.initialRotation ?? 45, o = t.initialScale ?? 0.01, i = t.rotationTriggerPoint ?? 0.8;
1409
1522
  return {
1410
- prepare: ({ from: r, to: i, context: l }) => (r.then((c) => {
1523
+ prepare: ({ from: s, to: r, context: l }) => (s.then((c) => {
1411
1524
  c.style.opacity = "1";
1412
- }), i.then((c) => {
1413
- const a = F(l, "to"), p = Math.min(a.width, a.height) * 0.4;
1414
- c.style.setProperty("--max-border-radius", `${p}px`), c.style.setProperty("--border-radius-scale", "1"), c.style.willChange = "transform", c.style.backfaceVisibility = "hidden";
1415
- const u = a.left + a.width / 2, d = a.top + a.height / 2;
1416
- c.style.transformOrigin = `${u}px ${d}px`, c.style.position = "fixed", c.style.top = `${a.top}px`, c.style.left = `${a.left}px`, c.style.width = `${a.width}px`, c.style.height = `${a.height}px`, c.style.zIndex = "1000", c.style.overflow = "hidden", c.style.transform = `rotate(${n}deg) scale(${o}) translateZ(0)`, c.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", c.style.opacity = "1";
1525
+ }), r.then((c) => {
1526
+ const a = M(l, "to"), u = Math.min(a.width, a.height) * 0.4;
1527
+ c.style.setProperty("--max-border-radius", `${u}px`), c.style.setProperty("--border-radius-scale", "1"), c.style.willChange = "transform", c.style.backfaceVisibility = "hidden";
1528
+ const p = a.left + a.width / 2, d = a.top + a.height / 2;
1529
+ c.style.transformOrigin = `${p}px ${d}px`, c.style.position = "fixed", c.style.top = `${a.top}px`, c.style.left = `${a.left}px`, c.style.width = `${a.width}px`, c.style.height = `${a.height}px`, c.style.zIndex = "1000", c.style.overflow = "hidden", c.style.transform = `rotate(${n}deg) scale(${o}) translateZ(0)`, c.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", c.style.opacity = "1";
1417
1530
  }), {}),
1418
- animation: ({ from: r, to: i }) => {
1419
- const l = new m({
1420
- element: r,
1421
- integrator: b.from(Wn),
1422
- style: (a, p) => ({ opacity: p }),
1531
+ animation: ({ from: s, to: r }) => {
1532
+ const l = new w({
1533
+ element: s,
1534
+ integrator: S.from(no),
1535
+ style: (a, u) => ({ opacity: u }),
1423
1536
  // The outgoing node is reused (re-hidden, shown again on the next
1424
1537
  // navigation), so reset every inline style we wrote to it — mirroring
1425
1538
  // the "to" cleanup below. prepare sets opacity and the out style fades
1426
1539
  // it toward 0, so clear opacity or the reused node stays invisible.
1427
1540
  onComplete: () => {
1428
- r.style.opacity = "";
1541
+ s.style.opacity = "";
1429
1542
  }
1430
- }), c = new m({
1431
- element: i,
1432
- integrator: b.from(e),
1543
+ }), c = new w({
1544
+ element: r,
1545
+ integrator: S.from(e),
1433
1546
  style: (a) => {
1434
- let p;
1547
+ let u;
1435
1548
  if (a <= 0.05)
1436
- p = o;
1437
- else if (a <= s) {
1438
- const f = (a - 0.05) / (s - 0.05), h = Math.pow(f, 9);
1439
- p = o + (0.8 - o) * h;
1549
+ u = o;
1550
+ else if (a <= i) {
1551
+ const f = (a - 0.05) / (i - 0.05), y = Math.pow(f, 9);
1552
+ u = o + (0.8 - o) * y;
1440
1553
  } else {
1441
- const f = (a - s) / (1 - s);
1442
- p = 0.8 + 0.2 * (1 - Math.pow(1 - f, 3));
1554
+ const f = (a - i) / (1 - i);
1555
+ u = 0.8 + 0.2 * (1 - Math.pow(1 - f, 3));
1443
1556
  }
1444
- const u = 0.7;
1557
+ const p = 0.7;
1445
1558
  let d;
1446
- if (a <= u)
1559
+ if (a <= p)
1447
1560
  d = n;
1448
1561
  else {
1449
- const f = (a - u) / (1 - u), h = 1 - Math.pow(1 - f, 2);
1450
- d = n * (1 - h);
1562
+ const f = (a - p) / (1 - p), y = 1 - Math.pow(1 - f, 2);
1563
+ d = n * (1 - y);
1451
1564
  }
1452
- let y;
1453
- if (a <= u)
1454
- y = 1;
1565
+ let h;
1566
+ if (a <= p)
1567
+ h = 1;
1455
1568
  else {
1456
- const f = (a - u) / (1 - u);
1457
- y = 1 - Math.pow(f, 0.5);
1569
+ const f = (a - p) / (1 - p);
1570
+ h = 1 - Math.pow(f, 0.5);
1458
1571
  }
1459
1572
  return {
1460
- transform: `rotate(${d.toFixed(2)}deg) scale(${p.toFixed(4)}) translateZ(0)`,
1461
- "--border-radius-scale": y.toFixed(4)
1573
+ transform: `rotate(${d.toFixed(2)}deg) scale(${u.toFixed(4)}) translateZ(0)`,
1574
+ "--border-radius-scale": h.toFixed(4)
1462
1575
  };
1463
1576
  },
1464
1577
  onComplete: () => {
1465
- i.style.willChange = "", i.style.backfaceVisibility = "", i.style.removeProperty("--max-border-radius"), i.style.removeProperty("--border-radius-scale"), i.style.transform = "", i.style.transformOrigin = "", i.style.position = "", i.style.zIndex = "", i.style.top = "", i.style.left = "", i.style.width = "", i.style.height = "", i.style.overflow = "", i.style.borderRadius = "";
1578
+ r.style.willChange = "", r.style.backfaceVisibility = "", r.style.removeProperty("--max-border-radius"), r.style.removeProperty("--border-radius-scale"), r.style.transform = "", r.style.transformOrigin = "", r.style.position = "", r.style.zIndex = "", r.style.top = "", r.style.left = "", r.style.width = "", r.style.height = "", r.style.overflow = "", r.style.borderRadius = "";
1466
1579
  }
1467
1580
  });
1468
- return new E([l, c], { mode: "parallel" });
1581
+ return new P([l, c], { mode: "parallel" });
1469
1582
  }
1470
1583
  };
1471
1584
  };
1472
- function ss(t = {}) {
1473
- return Zn();
1585
+ function yi(t = {}) {
1586
+ return oo();
1474
1587
  }
1475
- const Gn = {
1588
+ const io = {
1476
1589
  spring: { stiffness: 100, damping: 30 }
1477
- }, jn = (t = {}) => {
1478
- const e = t.physics ?? Gn;
1590
+ }, so = (t = {}) => {
1591
+ const e = t.physics ?? io;
1479
1592
  return {
1480
- prepare: ({ from: n, to: o }) => (n.then((s) => {
1481
- s.style.transformOrigin = "center center", s.style.willChange = "transform, opacity";
1482
- }), o.then((s) => {
1483
- s.style.opacity = "0", s.style.transform = "rotate(-180deg)", s.style.transformOrigin = "center center", s.style.willChange = "transform, opacity";
1593
+ prepare: ({ from: n, to: o }) => (n.then((i) => {
1594
+ i.style.transformOrigin = "center center", i.style.willChange = "transform, opacity";
1595
+ }), o.then((i) => {
1596
+ i.style.opacity = "0", i.style.transform = "rotate(-180deg)", i.style.transformOrigin = "center center", i.style.willChange = "transform, opacity";
1484
1597
  }), {}),
1485
1598
  animation: ({ from: n, to: o }) => {
1486
- const s = new m({
1599
+ const i = new w({
1487
1600
  element: n,
1488
- integrator: b.from(e),
1489
- style: (i) => ({
1490
- transform: `rotate(${i * 180}deg)`,
1491
- opacity: i < 0.5 ? 1 : 0
1601
+ integrator: S.from(e),
1602
+ style: (r) => ({
1603
+ transform: `rotate(${r * 180}deg)`,
1604
+ opacity: r < 0.5 ? 1 : 0
1492
1605
  }),
1493
1606
  // The outgoing node is reused (re-hidden, shown again on the next
1494
1607
  // navigation), so clear every inline style we wrote to `from`
@@ -1496,26 +1609,26 @@ const Gn = {
1496
1609
  onComplete: () => {
1497
1610
  n.style.willChange = "auto", n.style.transform = "", n.style.transformOrigin = "", n.style.opacity = "";
1498
1611
  }
1499
- }), r = new m({
1612
+ }), s = new w({
1500
1613
  element: o,
1501
- integrator: b.from(e),
1614
+ integrator: S.from(e),
1502
1615
  // u runs 1→0, so -u*180 unwinds -180→0.
1503
- style: (i, l) => ({
1616
+ style: (r, l) => ({
1504
1617
  transform: `rotate(${-l * 180}deg)`,
1505
- opacity: i > 0.5 ? 1 : 0
1618
+ opacity: r > 0.5 ? 1 : 0
1506
1619
  }),
1507
1620
  onComplete: () => {
1508
1621
  o.style.willChange = "auto", o.style.transform = "", o.style.transformOrigin = "", o.style.opacity = "";
1509
1622
  }
1510
1623
  });
1511
- return new E([s, r], { mode: "parallel" });
1624
+ return new P([i, s], { mode: "parallel" });
1512
1625
  }
1513
1626
  };
1514
1627
  };
1515
- function is(t = {}) {
1516
- return jn();
1628
+ function mi(t = {}) {
1629
+ return so();
1517
1630
  }
1518
- const Kn = {
1631
+ const ro = {
1519
1632
  spring: {
1520
1633
  stiffness: 20,
1521
1634
  damping: 8,
@@ -1523,22 +1636,22 @@ const Kn = {
1523
1636
  restDelta: 1e-3,
1524
1637
  restSpeed: 1e-3
1525
1638
  }
1526
- }, qn = (t = {}) => {
1527
- const e = t.physics ?? Kn, n = t.directional ?? !0;
1639
+ }, ao = (t = {}) => {
1640
+ const e = t.physics ?? ro, n = t.directional ?? !0;
1528
1641
  return {
1529
- prepare: ({ from: o, to: s, context: r }) => {
1530
- const i = !n || r.direction === "forward", l = i ? _ : R, c = i ? R : _;
1642
+ prepare: ({ from: o, to: i, context: s }) => {
1643
+ const r = !n || s.direction === "forward", l = r ? O : F, c = r ? F : O;
1531
1644
  return o.then((a) => {
1532
1645
  a.style.zIndex = l, a.style.willChange = "transform", a.style.backfaceVisibility = "hidden", a.style.contain = "layout paint", a.style.pointerEvents = "none";
1533
- }), s.then((a) => {
1646
+ }), i.then((a) => {
1534
1647
  a.style.willChange = "transform", a.style.backfaceVisibility = "hidden", a.style.contain = "layout paint", a.style.position = "relative", a.style.zIndex = c;
1535
1648
  }), {};
1536
1649
  },
1537
- animation: ({ from: o, to: s, context: r }) => {
1538
- const i = !n || r.direction === "forward", l = i ? R : _, c = o.offsetHeight, a = s.offsetHeight, p = window.innerHeight, u = Math.max(Math.min(c, a), p), d = new m({
1650
+ animation: ({ from: o, to: i, context: s }) => {
1651
+ const r = !n || s.direction === "forward", l = r ? F : O, c = o.offsetHeight, a = i.offsetHeight, u = window.innerHeight, p = Math.max(Math.min(c, a), u), d = new w({
1539
1652
  element: o,
1540
- integrator: b.from(e),
1541
- style: (f) => ({ transform: `translate3d(0, ${i ? -u * f : u * f}px, 0)` }),
1653
+ integrator: S.from(e),
1654
+ style: (f) => ({ transform: `translate3d(0, ${r ? -p * f : p * f}px, 0)` }),
1542
1655
  // The outgoing node is the real, reused element (re-hidden then shown
1543
1656
  // again on the next navigation), so mirror the incoming cleanup and
1544
1657
  // also reset the out-only props applied in prepare (zIndex,
@@ -1547,72 +1660,72 @@ const Kn = {
1547
1660
  onComplete: () => {
1548
1661
  o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "", o.style.transform = "", o.style.pointerEvents = "", o.style.zIndex = "";
1549
1662
  }
1550
- }), y = new m({
1551
- element: s,
1552
- integrator: b.from(e),
1553
- style: (f, h) => ({ transform: `translate3d(0, ${i ? h * u : h * -u}px, 0)` }),
1663
+ }), h = new w({
1664
+ element: i,
1665
+ integrator: S.from(e),
1666
+ style: (f, y) => ({ transform: `translate3d(0, ${r ? y * p : y * -p}px, 0)` }),
1554
1667
  onComplete: () => {
1555
- s.style.willChange = "auto", s.style.backfaceVisibility = "", s.style.contain = "", s.style.transform = "", s.style.position === "relative" && (s.style.position = ""), s.style.zIndex === l && (s.style.zIndex = "");
1668
+ i.style.willChange = "auto", i.style.backfaceVisibility = "", i.style.contain = "", i.style.transform = "", i.style.position === "relative" && (i.style.position = ""), i.style.zIndex === l && (i.style.zIndex = "");
1556
1669
  }
1557
1670
  });
1558
- for (const f of [d, y]) {
1559
- const h = f.onComplete;
1671
+ for (const f of [d, h]) {
1672
+ const y = f.onComplete;
1560
1673
  f.onComplete = () => {
1561
- h == null || h(), f.releaseFill();
1674
+ y == null || y(), f.releaseFill();
1562
1675
  };
1563
1676
  }
1564
- return new E([d, y], { mode: "parallel" });
1677
+ return new P([d, h], { mode: "parallel" });
1565
1678
  }
1566
1679
  };
1567
1680
  };
1568
- function rs(t = {}) {
1681
+ function gi(t = {}) {
1569
1682
  const { type: e = "directional" } = t;
1570
- return qn({ directional: e === "directional" });
1683
+ return ao({ directional: e === "directional" });
1571
1684
  }
1572
- const Jn = {
1685
+ const lo = {
1573
1686
  spring: { stiffness: 200, damping: 24 }
1574
- }, Qn = {
1687
+ }, co = {
1575
1688
  inertia: { acceleration: 25, resistance: 1.2 }
1576
- }, tt = 0.2;
1577
- function to() {
1689
+ }, et = 0.2;
1690
+ function po() {
1578
1691
  return {
1579
- enterPhysics: Jn,
1580
- exitPhysics: Qn,
1692
+ enterPhysics: lo,
1693
+ exitPhysics: co,
1581
1694
  background: {
1582
1695
  willChange: "transform, opacity",
1583
1696
  enterStyle: (t, e) => ({
1584
- transform: `scale(${1 - tt * t})`,
1697
+ transform: `scale(${1 - et * t})`,
1585
1698
  opacity: e
1586
1699
  }),
1587
1700
  exitStyle: (t) => ({
1588
- transform: `scale(${1 - tt + tt * t})`,
1701
+ transform: `scale(${1 - et + et * t})`,
1589
1702
  opacity: t
1590
1703
  })
1591
1704
  }
1592
1705
  };
1593
1706
  }
1594
- const eo = {
1707
+ const uo = {
1595
1708
  spring: { stiffness: 200, damping: 24 }
1596
- }, no = {
1709
+ }, fo = {
1597
1710
  inertia: { acceleration: 25, resistance: 1.2 }
1598
- }, et = 0.08, oo = 16, nt = 0.6, so = (t) => `blur(${Math.max(0, t).toFixed(2)}px)`;
1599
- function io() {
1711
+ }, nt = 0.08, ho = 16, ot = 0.6, yo = (t) => `blur(${Math.max(0, t).toFixed(2)}px)`;
1712
+ function mo() {
1600
1713
  return {
1601
- enterPhysics: eo,
1602
- exitPhysics: no,
1714
+ enterPhysics: uo,
1715
+ exitPhysics: fo,
1603
1716
  background: {
1604
1717
  willChange: "transform, opacity",
1605
1718
  // enter: t 0 → 1 as the sheet rises. At rest (t = 0) the page is
1606
1719
  // untouched; at peak it is shrunk and dimmed.
1607
1720
  enterStyle: (t) => ({
1608
- transform: `scale(${1 - et * t})`,
1609
- opacity: 1 - (1 - nt) * t
1721
+ transform: `scale(${1 - nt * t})`,
1722
+ opacity: 1 - (1 - ot) * t
1610
1723
  }),
1611
1724
  // exit: t 0 → 1 as the sheet falls away and the page returns to rest —
1612
1725
  // the inverse ramp of enter.
1613
1726
  exitStyle: (t) => ({
1614
- transform: `scale(${1 - et + et * t})`,
1615
- opacity: nt + (1 - nt) * t
1727
+ transform: `scale(${1 - nt + nt * t})`,
1728
+ opacity: ot + (1 - ot) * t
1616
1729
  })
1617
1730
  },
1618
1731
  overlay: {
@@ -1630,27 +1743,27 @@ function io() {
1630
1743
  // enter: 0 → MAX as the sheet rises (progress 0 → 1).
1631
1744
  // exit: MAX → 0 as it falls (progress 0 → 1, so the visual is inverted).
1632
1745
  style: (t, e) => {
1633
- const n = t === "enter" ? e : 1 - e, o = so(oo * n);
1746
+ const n = t === "enter" ? e : 1 - e, o = yo(ho * n);
1634
1747
  return { backdropFilter: o, WebkitBackdropFilter: o };
1635
1748
  }
1636
1749
  }
1637
1750
  };
1638
1751
  }
1639
- const ro = {
1752
+ const go = {
1640
1753
  spring: {
1641
1754
  stiffness: 190,
1642
1755
  damping: 25
1643
1756
  }
1644
- }, ao = {
1757
+ }, bo = {
1645
1758
  spring: {
1646
1759
  stiffness: 190,
1647
1760
  damping: 25
1648
1761
  }
1649
1762
  };
1650
- function lo() {
1763
+ function wo() {
1651
1764
  return {
1652
- enterPhysics: ro,
1653
- exitPhysics: ao,
1765
+ enterPhysics: go,
1766
+ exitPhysics: bo,
1654
1767
  background: {
1655
1768
  willChange: "",
1656
1769
  enterStyle: () => ({}),
@@ -1658,65 +1771,65 @@ function lo() {
1658
1771
  }
1659
1772
  };
1660
1773
  }
1661
- const co = {
1662
- static: lo(),
1663
- "background-scale": to(),
1664
- blur: io()
1665
- }, po = "static", uo = "transform", fo = (t = {}) => {
1666
- const e = co[t.type ?? po], n = e.background, o = e.overlay, s = n.willChange !== "";
1774
+ const So = {
1775
+ static: wo(),
1776
+ "background-scale": po(),
1777
+ blur: mo()
1778
+ }, Co = "static", xo = "transform", $o = (t = {}) => {
1779
+ const e = So[t.type ?? Co], n = e.background, o = e.overlay, i = n.willChange !== "";
1667
1780
  return {
1668
- prepare: ({ from: r, to: i, context: l, createElement: c }) => {
1669
- const a = l.direction === "forward" ? "enter" : "exit", p = a === "enter" ? i : r, u = a === "enter" ? r : i;
1670
- p.then((y) => {
1671
- y.style.willChange = uo, y.style.backfaceVisibility = "hidden", y.style.contain = "layout paint", y.style.zIndex = R, a === "enter" ? y.style.position = "relative" : y.style.pointerEvents = "none";
1672
- }), u.then((y) => {
1673
- s && (y.style.willChange = n.willChange, y.style.backfaceVisibility = "hidden", y.style.contain = "layout paint"), y.style.zIndex = _, a === "enter" ? y.style.pointerEvents = "none" : y.style.position = "relative";
1781
+ prepare: ({ from: s, to: r, context: l, createElement: c }) => {
1782
+ const a = l.direction === "forward" ? "enter" : "exit", u = a === "enter" ? r : s, p = a === "enter" ? s : r;
1783
+ u.then((h) => {
1784
+ h.style.willChange = xo, h.style.backfaceVisibility = "hidden", h.style.contain = "layout paint", h.style.zIndex = F, a === "enter" ? h.style.position = "relative" : h.style.pointerEvents = "none";
1785
+ }), p.then((h) => {
1786
+ i && (h.style.willChange = n.willChange, h.style.backfaceVisibility = "hidden", h.style.contain = "layout paint"), h.style.zIndex = O, a === "enter" ? h.style.pointerEvents = "none" : h.style.position = "relative";
1674
1787
  });
1675
1788
  let d;
1676
1789
  return o && (d = c("sheet-overlay"), Object.assign(d.style, o.initialStyle), d.style.willChange = o.willChange, l.positionedParent.appendChild(d)), { overlay: d };
1677
1790
  },
1678
- animation: ({ from: r, to: i, context: l, overlay: c }) => {
1679
- const a = l.direction === "forward" ? "enter" : "exit", p = a === "enter" ? e.enterPhysics : e.exitPhysics, u = a === "enter" ? i : r, d = a === "enter" ? r : i, y = F(
1791
+ animation: ({ from: s, to: r, context: l, overlay: c }) => {
1792
+ const a = l.direction === "forward" ? "enter" : "exit", u = a === "enter" ? e.enterPhysics : e.exitPhysics, p = a === "enter" ? r : s, d = a === "enter" ? s : r, h = M(
1680
1793
  l,
1681
1794
  a === "enter" ? "to" : "from"
1682
1795
  ), f = () => {
1683
- r.style.pointerEvents = "", r.style.zIndex = "";
1684
- }, h = () => {
1685
- const x = a === "enter" ? R : _;
1686
- i.style.position === "relative" && (i.style.position = ""), i.style.zIndex === x && (i.style.zIndex = "");
1687
- }, g = (x) => {
1688
- const C = x.onComplete;
1689
- x.onComplete = () => {
1690
- C == null || C(), x.releaseFill();
1796
+ s.style.pointerEvents = "", s.style.zIndex = "";
1797
+ }, y = () => {
1798
+ const g = a === "enter" ? F : O;
1799
+ r.style.position === "relative" && (r.style.position = ""), r.style.zIndex === g && (r.style.zIndex = "");
1800
+ }, m = (g) => {
1801
+ const x = g.onComplete;
1802
+ g.onComplete = () => {
1803
+ x == null || x(), g.releaseFill();
1691
1804
  };
1692
1805
  };
1693
- u.style.clipPath = `inset(${y.top}px 0 calc(100% - ${y.top + y.height}px) 0)`;
1694
- const S = a === "enter" ? (x, C) => ({
1695
- transform: `translate3d(0, ${C * y.height}px, 0)`
1696
- }) : (x) => ({
1697
- transform: `translate3d(0, ${x * y.height}px, 0)`
1698
- }), w = new m({
1699
- element: u,
1700
- integrator: b.from(p),
1701
- style: S,
1806
+ p.style.clipPath = `inset(${h.top}px 0 calc(100% - ${h.top + h.height}px) 0)`;
1807
+ const C = a === "enter" ? (g, x) => ({
1808
+ transform: `translate3d(0, ${x * h.height}px, 0)`
1809
+ }) : (g) => ({
1810
+ transform: `translate3d(0, ${g * h.height}px, 0)`
1811
+ }), b = new w({
1812
+ element: p,
1813
+ integrator: S.from(u),
1814
+ style: C,
1702
1815
  onComplete: () => {
1703
- u.style.willChange = "auto", u.style.backfaceVisibility = "", u.style.contain = "", u.style.clipPath = "", u.style.transform = "", f(), h();
1816
+ p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.contain = "", p.style.clipPath = "", p.style.transform = "", f(), y();
1704
1817
  }
1705
1818
  });
1706
- g(w);
1707
- const $ = [w];
1708
- if (s) {
1709
- const x = d.scrollHeight;
1710
- x > 0 && (d.style.height = `${x}px`);
1711
- const C = F(
1819
+ m(b);
1820
+ const $ = [b];
1821
+ if (i) {
1822
+ const g = d.scrollHeight;
1823
+ g > 0 && (d.style.height = `${g}px`);
1824
+ const x = M(
1712
1825
  l,
1713
1826
  a === "enter" ? "from" : "to"
1714
- ), I = C.left + C.width / 2, A = C.top + C.height / 2;
1715
- d.style.clipPath = `inset(${C.top}px 0 calc(100% - ${C.top + C.height}px) 0)`, d.style.transformOrigin = `${I}px ${A}px`;
1716
- const P = a === "enter" ? (M, N) => n.enterStyle(M, N) : (M) => n.exitStyle(M), H = new m({
1827
+ ), I = x.left + x.width / 2, E = x.top + x.height / 2;
1828
+ d.style.clipPath = `inset(${x.top}px 0 calc(100% - ${x.top + x.height}px) 0)`, d.style.transformOrigin = `${I}px ${E}px`;
1829
+ const R = a === "enter" ? (A, B) => n.enterStyle(A, B) : (A) => n.exitStyle(A), _ = new w({
1717
1830
  element: d,
1718
- integrator: b.from(p),
1719
- style: P,
1831
+ integrator: S.from(u),
1832
+ style: R,
1720
1833
  // The background is the reused outgoing (`from`) node on `enter` and
1721
1834
  // the surviving incoming (`to`) node on `exit` — in both cases its
1722
1835
  // inline styles must be cleared on settle so the reused node is not
@@ -1726,86 +1839,86 @@ const co = {
1726
1839
  d.style.willChange = "auto", d.style.backfaceVisibility = "", d.style.contain = "", d.style.clipPath = "", d.style.transformOrigin = "", d.style.transform = "", d.style.opacity = "", d.style.height = "";
1727
1840
  }
1728
1841
  });
1729
- g(H), $.push(H);
1842
+ m(_), $.push(_);
1730
1843
  }
1731
1844
  if (c && o) {
1732
- c.style.zIndex = Ht;
1733
- const x = kt(l, "to");
1734
- c.style.top = `${x.top}px`, c.style.height = `${x.height}px`, $.push(
1735
- new m({
1845
+ c.style.zIndex = Ut;
1846
+ const g = Xt(l, "to");
1847
+ c.style.top = `${g.top}px`, c.style.height = `${g.height}px`, $.push(
1848
+ new w({
1736
1849
  element: c,
1737
- integrator: b.from(p),
1738
- style: (C) => o.style(a, C)
1850
+ integrator: S.from(u),
1851
+ style: (x) => o.style(a, x)
1739
1852
  })
1740
1853
  );
1741
1854
  }
1742
- return new E($, { mode: "parallel" });
1855
+ return new P($, { mode: "parallel" });
1743
1856
  }
1744
1857
  };
1745
1858
  };
1746
- function yo(t) {
1859
+ function Eo(t) {
1747
1860
  return t === "scale" || t === "background-scale" ? "background-scale" : t === "blur" ? "blur" : "static";
1748
1861
  }
1749
- function as(t = {}) {
1750
- const e = t.type, n = yo(e);
1751
- return fo({ type: n });
1862
+ function bi(t = {}) {
1863
+ const e = t.type, n = Eo(e);
1864
+ return $o({ type: n });
1752
1865
  }
1753
- const ho = (t = {}) => {
1754
- const e = t.physics ?? re;
1866
+ const Po = (t = {}) => {
1867
+ const e = t.physics ?? me;
1755
1868
  return {
1756
- prepare: ({ from: n, to: o, context: s }) => {
1757
- const r = s.direction === "forward";
1758
- return n.then((i) => {
1759
- i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint", i.style.pointerEvents = "none";
1760
- }), o.then((i) => {
1761
- const l = r ? 100 : -100;
1762
- i.style.transform = `translate3d(${l}%, 0, 0)`, i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint";
1869
+ prepare: ({ from: n, to: o, context: i }) => {
1870
+ const s = i.direction === "forward";
1871
+ return n.then((r) => {
1872
+ r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint", r.style.pointerEvents = "none";
1873
+ }), o.then((r) => {
1874
+ const l = s ? 100 : -100;
1875
+ r.style.transform = `translate3d(${l}%, 0, 0)`, r.style.willChange = "transform", r.style.backfaceVisibility = "hidden", r.style.contain = "layout paint";
1763
1876
  }), {};
1764
1877
  },
1765
- animation: ({ from: n, to: o, context: s }) => {
1766
- const r = new m({
1878
+ animation: ({ from: n, to: o, context: i }) => {
1879
+ const s = new w({
1767
1880
  element: n,
1768
- integrator: b.from(e),
1769
- style: (l) => ({ transform: `translate3d(${100 * X("slide", "out", s.direction, l).x}%, 0, 0)` }),
1881
+ integrator: S.from(e),
1882
+ style: (l) => ({ transform: `translate3d(${100 * U("slide", "out", i.direction, l).x}%, 0, 0)` }),
1770
1883
  // The outgoing node is the real Activity page and gets reused on the
1771
1884
  // next navigation, so reset every inline style we wrote to it (mirror
1772
1885
  // the incoming cleanup, plus the out-only pointerEvents).
1773
1886
  onComplete: () => {
1774
1887
  n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.contain = "", n.style.transform = "", n.style.pointerEvents = "";
1775
1888
  }
1776
- }), i = new m({
1889
+ }), r = new w({
1777
1890
  element: o,
1778
- integrator: b.from(e),
1779
- style: (l) => ({ transform: `translate3d(${100 * X("slide", "in", s.direction, l).x}%, 0, 0)` }),
1891
+ integrator: S.from(e),
1892
+ style: (l) => ({ transform: `translate3d(${100 * U("slide", "in", i.direction, l).x}%, 0, 0)` }),
1780
1893
  onComplete: () => {
1781
1894
  o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "", o.style.transform = "";
1782
1895
  }
1783
1896
  });
1784
- return new E([r, i], { mode: "parallel" });
1897
+ return new P([s, r], { mode: "parallel" });
1785
1898
  }
1786
1899
  };
1787
1900
  };
1788
- function ls(t = {}) {
1789
- return ho();
1901
+ function wi(t = {}) {
1902
+ return Po();
1790
1903
  }
1791
- const mo = {
1904
+ const Ro = {
1792
1905
  spring: { stiffness: 17, damping: 6 }
1793
- }, ot = 20, U = 800, go = (t = {}) => {
1794
- const e = t.physics ?? mo;
1906
+ }, it = 20, W = 800, Ao = (t = {}) => {
1907
+ const e = t.physics ?? Ro;
1795
1908
  return {
1796
- prepare: ({ from: n, to: o }) => (n.then((s) => {
1797
- s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.pointerEvents = "none", s.style.transform = `perspective(${U}px) rotateY(0deg) translate3d(0%, 0, 0)`;
1798
- }), o.then((s) => {
1799
- s.style.willChange = "transform", s.style.backfaceVisibility = "hidden", s.style.contain = "layout paint", s.style.transform = `perspective(${U}px) rotateY(${ot}deg) translate3d(-100%, 0, 0)`;
1909
+ prepare: ({ from: n, to: o }) => (n.then((i) => {
1910
+ i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint", i.style.pointerEvents = "none", i.style.transform = `perspective(${W}px) rotateY(0deg) translate3d(0%, 0, 0)`;
1911
+ }), o.then((i) => {
1912
+ i.style.willChange = "transform", i.style.backfaceVisibility = "hidden", i.style.contain = "layout paint", i.style.transform = `perspective(${W}px) rotateY(${it}deg) translate3d(-100%, 0, 0)`;
1800
1913
  }), {}),
1801
1914
  animation: ({ from: n, to: o }) => {
1802
- const s = new m({
1915
+ const i = new w({
1803
1916
  element: n,
1804
- integrator: b.from(e),
1805
- style: (i) => {
1806
- const l = -i * ot, c = i * 100;
1917
+ integrator: S.from(e),
1918
+ style: (r) => {
1919
+ const l = -r * it, c = r * 100;
1807
1920
  return {
1808
- transform: `perspective(${U}px) rotateY(${l}deg) translate3d(${c}%, 0, 0)`
1921
+ transform: `perspective(${W}px) rotateY(${l}deg) translate3d(${c}%, 0, 0)`
1809
1922
  };
1810
1923
  },
1811
1924
  // The outgoing node is reused (Activity/cacheComponents re-hide it),
@@ -1814,30 +1927,30 @@ const mo = {
1814
1927
  onComplete: () => {
1815
1928
  n.style.transform = "", n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.contain = "", n.style.pointerEvents = "";
1816
1929
  }
1817
- }), r = new m({
1930
+ }), s = new w({
1818
1931
  element: o,
1819
- integrator: b.from(e),
1820
- style: (i, l) => {
1821
- const c = l * ot, a = -l * 100;
1932
+ integrator: S.from(e),
1933
+ style: (r, l) => {
1934
+ const c = l * it, a = -l * 100;
1822
1935
  return {
1823
- transform: `perspective(${U}px) rotateY(${c}deg) translate3d(${a}%, 0, 0)`
1936
+ transform: `perspective(${W}px) rotateY(${c}deg) translate3d(${a}%, 0, 0)`
1824
1937
  };
1825
1938
  },
1826
1939
  onComplete: () => {
1827
1940
  o.style.transform = "", o.style.willChange = "auto", o.style.backfaceVisibility = "", o.style.contain = "";
1828
1941
  }
1829
1942
  });
1830
- return new E([s, r], { mode: "sequence" });
1943
+ return new P([i, s], { mode: "sequence" });
1831
1944
  }
1832
1945
  };
1833
1946
  };
1834
- function cs(t = {}) {
1835
- return go();
1947
+ function Si(t = {}) {
1948
+ return Ao();
1836
1949
  }
1837
- function bo(t, e) {
1950
+ function Io(t, e) {
1838
1951
  return e.left >= t.left - 0.01 && e.top >= t.top - 0.01 && e.left + e.width <= t.left + t.width + 0.01 && e.top + e.height <= t.top + t.height + 0.01;
1839
1952
  }
1840
- function Bt(t) {
1953
+ function Kt(t) {
1841
1954
  const e = () => ({
1842
1955
  enterContent: t.enterRect,
1843
1956
  exitContent: t.exitRect,
@@ -1845,60 +1958,108 @@ function Bt(t) {
1845
1958
  scaleX: t.exitRect.width / t.enterRect.width,
1846
1959
  scaleY: t.exitRect.height / t.enterRect.height
1847
1960
  }), { enterMedia: n, exitMedia: o } = t;
1848
- if (!n || !o || !Vt(n, o)) return e();
1849
- const s = n.content, r = o.content;
1850
- if (s.width <= 0 || s.height <= 0 || r.width <= 0 || r.height <= 0)
1961
+ if (!n || !o || !Zt(n, o)) return e();
1962
+ const i = n.content, s = o.content;
1963
+ if (i.width <= 0 || i.height <= 0 || s.width <= 0 || s.height <= 0)
1851
1964
  return e();
1852
- const i = r.width / s.width, l = r.height / s.height, c = Xt(
1965
+ const r = s.width / i.width, l = s.height / i.height, c = jt(
1966
+ i,
1853
1967
  s,
1854
- r,
1855
1968
  o.window,
1856
- i,
1969
+ r,
1857
1970
  l
1858
1971
  );
1859
- return bo(n.window, c) ? { enterContent: s, exitContent: r, startWindow: c, scaleX: i, scaleY: l } : e();
1860
- }
1861
- function Wt(t, e) {
1972
+ return Io(n.window, c) ? {
1973
+ enterContent: i,
1974
+ exitContent: s,
1975
+ startWindow: c,
1976
+ scaleX: r,
1977
+ scaleY: l,
1978
+ exitCornerRadii: o.cornerRadii
1979
+ } : e();
1980
+ }
1981
+ function qt(t, e) {
1862
1982
  return {
1863
- top: t.top / e.height * 100,
1864
- right: (e.width - (t.left + t.width)) / e.width * 100,
1865
- bottom: (e.height - (t.top + t.height)) / e.height * 100,
1866
- left: t.left / e.width * 100
1983
+ top: t.top,
1984
+ right: e.width - (t.left + t.width),
1985
+ bottom: e.height - (t.top + t.height),
1986
+ left: t.left
1867
1987
  };
1868
1988
  }
1869
- function Zt(t, e, n) {
1989
+ function _o(t, e, n) {
1870
1990
  return {
1871
1991
  x: t / Math.max(Math.abs(e), 1e-6),
1872
1992
  y: t / Math.max(Math.abs(n), 1e-6)
1873
1993
  };
1874
1994
  }
1875
- function wo(t) {
1876
- const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius: s } = t, r = Bt(t), { enterContent: i, exitContent: l, startWindow: c, scaleX: a, scaleY: p } = r, u = l.left - i.left + (l.width - i.width) / 2 - n.x, d = l.top - i.top + (l.height - i.height) / 2 - n.y, y = Wt(c, e);
1995
+ function Jt(t, e, n, o, i, s) {
1996
+ return (n ?? [t]).map(
1997
+ (r) => _o(
1998
+ Math.max(0, r * o + e * (1 - o)),
1999
+ i,
2000
+ s
2001
+ )
2002
+ );
2003
+ }
2004
+ function Oo(t) {
2005
+ const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius: i } = t, s = Kt(t), { enterContent: r, exitContent: l, startWindow: c, scaleX: a, scaleY: u } = s, p = l.left - r.left + (l.width - r.width) / 2 - n.x, d = l.top - r.top + (l.height - r.height) / 2 - n.y, h = qt(c, e);
1877
2006
  return {
1878
- transformOrigin: `${v(i)}px ${O(i)}px`,
2007
+ transformOrigin: `${v(r)}px ${T(r)}px`,
1879
2008
  animate: (f) => {
1880
- const h = 1 - f, g = 1 + (a - 1) * h, S = 1 + (p - 1) * h, w = Math.max(0, s * h + o * (1 - h)), $ = Zt(w, g, S);
2009
+ const y = 1 - f, m = 1 + (a - 1) * y, C = 1 + (u - 1) * y, b = Jt(
2010
+ i,
2011
+ o,
2012
+ s.exitCornerRadii,
2013
+ y,
2014
+ m,
2015
+ C
2016
+ );
1881
2017
  return {
1882
- clipPath: `inset(${y.top * h}% ${y.right * h}% ${y.bottom * h}% ${y.left * h}% round ${$.x}px / ${$.y}px)`,
1883
- transform: `translate(${u * h}px, ${d * h}px) scale(${g}, ${S})`
2018
+ clipPath: yt(
2019
+ e,
2020
+ {
2021
+ top: h.top * y,
2022
+ right: h.right * y,
2023
+ bottom: h.bottom * y,
2024
+ left: h.left * y
2025
+ },
2026
+ b
2027
+ ),
2028
+ transform: `translate(${p * y}px, ${d * y}px) scale(${m}, ${C})`
1884
2029
  };
1885
2030
  }
1886
2031
  };
1887
2032
  }
1888
- function So(t) {
1889
- const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius: s } = t, r = Bt(t), { enterContent: i, exitContent: l, startWindow: c, scaleX: a, scaleY: p } = r, u = l.left - i.left + (l.width - i.width) / 2 + n.x, d = l.top - i.top + (l.height - i.height) / 2 + n.y, y = Wt(c, e);
2033
+ function Fo(t) {
2034
+ const { pageRect: e, scrollOffset: n, enterRadius: o, exitRadius: i } = t, s = Kt(t), { enterContent: r, exitContent: l, startWindow: c, scaleX: a, scaleY: u } = s, p = l.left - r.left + (l.width - r.width) / 2 + n.x, d = l.top - r.top + (l.height - r.height) / 2 + n.y, h = qt(c, e);
1890
2035
  return {
1891
- transformOrigin: `${v(i)}px ${O(i)}px`,
2036
+ transformOrigin: `${v(r)}px ${T(r)}px`,
1892
2037
  animate: (f) => {
1893
- const h = 1 - f, g = 1 + (a - 1) * h, S = 1 + (p - 1) * h, w = Math.max(0, o * (1 - h) + s * h), $ = Zt(w, g, S);
2038
+ const y = 1 - f, m = 1 + (a - 1) * y, C = 1 + (u - 1) * y, b = Jt(
2039
+ i,
2040
+ o,
2041
+ s.exitCornerRadii,
2042
+ y,
2043
+ m,
2044
+ C
2045
+ );
1894
2046
  return {
1895
- clipPath: `inset(${y.top * h}% ${y.right * h}% ${y.bottom * h}% ${y.left * h}% round ${$.x}px / ${$.y}px)`,
1896
- transform: `translate(${u * h - n.x}px, ${d * h}px) scale(${g}, ${S})`
2047
+ clipPath: yt(
2048
+ e,
2049
+ {
2050
+ top: h.top * y,
2051
+ right: h.right * y,
2052
+ bottom: h.bottom * y,
2053
+ left: h.left * y
2054
+ },
2055
+ b
2056
+ ),
2057
+ transform: `translate(${p * y - n.x}px, ${d * y}px) scale(${m}, ${C})`
1897
2058
  };
1898
2059
  }
1899
2060
  };
1900
2061
  }
1901
- const xo = {
2062
+ const vo = {
1902
2063
  spring: {
1903
2064
  stiffness: 380,
1904
2065
  damping: 30,
@@ -1909,25 +2070,25 @@ const xo = {
1909
2070
  damping: 30
1910
2071
  }
1911
2072
  }
1912
- }, Gt = 0.12, Co = 18;
1913
- function $o() {
2073
+ }, Qt = 0.12, To = 18;
2074
+ function Mo() {
1914
2075
  return {
1915
2076
  transformOrigin: "50% 50%",
1916
2077
  animate: (t) => {
1917
2078
  const e = 1 - t;
1918
2079
  return {
1919
- transform: `scale(${1 - Gt * e})`
2080
+ transform: `scale(${1 - Qt * e})`
1920
2081
  };
1921
2082
  }
1922
2083
  };
1923
2084
  }
1924
- function Eo() {
2085
+ function Yo() {
1925
2086
  return {
1926
2087
  transformOrigin: "50% 50%",
1927
2088
  animate: (t) => {
1928
2089
  const e = 1 - t;
1929
2090
  return {
1930
- transform: `scale(${1 - Gt * e})`
2091
+ transform: `scale(${1 - Qt * e})`
1931
2092
  };
1932
2093
  }
1933
2094
  };
@@ -1948,29 +2109,29 @@ const st = {
1948
2109
  WebkitBackdropFilter: "blur(0px)"
1949
2110
  },
1950
2111
  style: (t, e) => {
1951
- const n = t === "enter" ? e : 1 - e, o = `blur(${Co * n}px)`;
2112
+ const n = t === "enter" ? e : 1 - e, o = `blur(${To * n}px)`;
1952
2113
  return {
1953
2114
  backdropFilter: o,
1954
2115
  WebkitBackdropFilter: o
1955
2116
  };
1956
2117
  }
1957
2118
  };
1958
- class Po {
2119
+ class Do {
1959
2120
  constructor() {
1960
- T(this, "physics", xo);
2121
+ Y(this, "physics", vo);
1961
2122
  }
1962
2123
  contribute(e) {
1963
- const { from: n, to: o, resolved: s, physics: r } = e, i = s.mode === "enter", l = i ? n : o, c = i ? $o() : Eo();
2124
+ const { from: n, to: o, resolved: i, physics: s } = e, r = i.mode === "enter", l = r ? n : o, c = r ? Mo() : Yo();
1964
2125
  return c && (l.style.transformOrigin = c.transformOrigin), [
1965
- new m({
2126
+ new w({
1966
2127
  element: l,
1967
- integrator: b.from(r),
1968
- style: i ? (a, p) => c.animate(p) : (a) => c.animate(a)
2128
+ integrator: S.from(s),
2129
+ style: r ? (a, u) => c.animate(u) : (a) => c.animate(a)
1969
2130
  })
1970
2131
  ];
1971
2132
  }
1972
2133
  }
1973
- class Ao {
2134
+ class Lo {
1974
2135
  prepare(e) {
1975
2136
  const n = e.createElement("zoom-overlay");
1976
2137
  return Object.assign(n.style, st.initialStyle), n.style.willChange = st.willChange, e.context.positionedParent.appendChild(n), { overlay: n };
@@ -1978,18 +2139,18 @@ class Ao {
1978
2139
  contribute(e) {
1979
2140
  const n = e.extras.overlay;
1980
2141
  if (!n) return [];
1981
- n.style.zIndex = Ht;
1982
- const o = kt(e.context, "to");
2142
+ n.style.zIndex = Ut;
2143
+ const o = Xt(e.context, "to");
1983
2144
  return n.style.top = `${o.top}px`, n.style.height = `${o.height}px`, [
1984
- new m({
2145
+ new w({
1985
2146
  element: n,
1986
- integrator: b.from(e.physics),
1987
- style: (s) => st.style(e.resolved.mode, s)
2147
+ integrator: S.from(e.physics),
2148
+ style: (i) => st.style(e.resolved.mode, i)
1988
2149
  })
1989
2150
  ];
1990
2151
  }
1991
2152
  }
1992
- const Io = {
2153
+ const ko = {
1993
2154
  spring: {
1994
2155
  stiffness: 380,
1995
2156
  damping: 30,
@@ -1999,234 +2160,248 @@ const Io = {
1999
2160
  }
2000
2161
  }
2001
2162
  };
2002
- function _o({
2163
+ function Ho({
2003
2164
  enterRect: t,
2004
2165
  exitRect: e,
2005
2166
  scrollOffset: n
2006
2167
  }) {
2007
- const o = t.left - e.left + (t.width - e.width) / 2 + n.x, s = t.top - e.top + (t.height - e.height) / 2 + n.y, r = t.width / e.width, i = t.height / e.height, l = Math.max(r, i);
2168
+ const o = t.left - e.left + (t.width - e.width) / 2 + n.x, i = t.top - e.top + (t.height - e.height) / 2 + n.y, s = t.width / e.width, r = t.height / e.height, l = Math.max(s, r);
2008
2169
  return {
2009
2170
  transformOrigin: `${e.left + e.width / 2}px ${e.top + e.height / 2}px`,
2010
2171
  animate: (c) => {
2011
2172
  const a = 1 - c;
2012
2173
  return {
2013
- transform: `translate(${o * a - n.x}px, ${s * a}px) scale(${1 + (l - 1) * a})`
2174
+ transform: `translate(${o * a - n.x}px, ${i * a}px) scale(${1 + (l - 1) * a})`
2014
2175
  };
2015
2176
  }
2016
2177
  };
2017
2178
  }
2018
- function Ro({
2179
+ function No({
2019
2180
  enterRect: t,
2020
2181
  exitRect: e,
2021
2182
  scrollOffset: n
2022
2183
  }) {
2023
- const o = t.left - e.left + (t.width - e.width) / 2 - n.x, s = t.top - e.top + (t.height - e.height) / 2 - n.y, r = t.width / e.width, i = t.height / e.height, l = Math.max(r, i);
2184
+ const o = t.left - e.left + (t.width - e.width) / 2 - n.x, i = t.top - e.top + (t.height - e.height) / 2 - n.y, s = t.width / e.width, r = t.height / e.height, l = Math.max(s, r);
2024
2185
  return {
2025
2186
  transformOrigin: `${e.left + e.width / 2}px ${e.top + e.height / 2}px`,
2026
2187
  animate: (c) => {
2027
2188
  const a = 1 - c;
2028
2189
  return {
2029
- transform: `translate(${o * a}px, ${s * a}px) scale(${1 + (l - 1) * a})`
2190
+ transform: `translate(${o * a}px, ${i * a}px) scale(${1 + (l - 1) * a})`
2030
2191
  };
2031
2192
  }
2032
2193
  };
2033
2194
  }
2034
- class vo {
2195
+ class zo {
2035
2196
  constructor() {
2036
- T(this, "physics", Io);
2197
+ Y(this, "physics", ko);
2037
2198
  }
2038
2199
  contribute(e) {
2039
- const { from: n, to: o, resolved: s, input: r, physics: i } = e, l = s.mode === "enter", c = l ? n : o, a = l ? _o(r) : Ro(r);
2200
+ const { from: n, to: o, resolved: i, input: s, physics: r } = e, l = i.mode === "enter", c = l ? n : o, a = l ? Ho(s) : No(s);
2040
2201
  return a && (c.style.transformOrigin = a.transformOrigin), [
2041
- new m({
2202
+ new w({
2042
2203
  element: c,
2043
- integrator: b.from(i),
2044
- style: l ? (p, u) => a.animate(u) : (p) => a.animate(p)
2204
+ integrator: S.from(r),
2205
+ style: l ? (u, p) => a.animate(p) : (u) => a.animate(u)
2045
2206
  })
2046
2207
  ];
2047
2208
  }
2048
2209
  }
2049
- const Oo = {
2210
+ const Vo = {
2050
2211
  spring: {
2051
2212
  stiffness: 530,
2052
2213
  damping: 34,
2053
2214
  doubleSpring: 1
2054
2215
  }
2055
2216
  };
2056
- class Fo {
2217
+ class Xo {
2057
2218
  constructor() {
2058
- T(this, "physics", Oo);
2219
+ Y(this, "physics", Vo);
2059
2220
  }
2060
2221
  contribute(e) {
2061
2222
  return [];
2062
2223
  }
2063
2224
  }
2064
- const To = {
2065
- expand: () => new vo(),
2066
- static: () => new Fo(),
2067
- blur: () => new Po()
2225
+ const Wo = {
2226
+ expand: () => new zo(),
2227
+ static: () => new Xo(),
2228
+ blur: () => new Do()
2068
2229
  };
2069
- function Yo(t) {
2070
- return To[t]();
2230
+ function Uo(t) {
2231
+ return Wo[t]();
2071
2232
  }
2072
- const lt = "data-zoom-enter-key", Tt = "data-zoom-exit-key", Yt = "data-zoom-radius";
2073
- function Do(t, e) {
2233
+ const dt = "data-zoom-enter-key", Ht = "data-zoom-exit-key", Nt = "data-zoom-radius";
2234
+ function Bo(t, e) {
2074
2235
  return Math.abs(t.left - e.left) < 0.01 && Math.abs(t.top - e.top) < 0.01 && Math.abs(t.width - e.width) < 0.01 && Math.abs(t.height - e.height) < 0.01;
2075
2236
  }
2076
- function Mo(t, e) {
2237
+ function Zo(t, e) {
2077
2238
  const n = [];
2078
2239
  let o = e;
2079
2240
  for (; o && o !== t; ) {
2080
- const s = o.parentElement;
2081
- if (!s) break;
2082
- for (const r of Array.from(s.children))
2083
- r !== o && r instanceof HTMLElement && n.push(r);
2084
- o = s;
2241
+ const i = o.parentElement;
2242
+ if (!i) break;
2243
+ for (const s of Array.from(i.children))
2244
+ s !== o && s instanceof HTMLElement && n.push(s);
2245
+ o = i;
2085
2246
  }
2086
2247
  return n;
2087
2248
  }
2088
- function Dt(t) {
2089
- const e = t.querySelectorAll(`[${lt}]`);
2249
+ function zt(t) {
2250
+ const e = t.querySelectorAll(`[${dt}]`);
2090
2251
  return e.length !== 1 ? null : e[0];
2091
2252
  }
2092
- function Mt(t, e) {
2093
- const n = t.querySelectorAll(`[${Tt}]`);
2253
+ function Vt(t, e) {
2254
+ const n = t.querySelectorAll(`[${Ht}]`);
2094
2255
  for (const o of n)
2095
- if (o.getAttribute(Tt) === e)
2256
+ if (o.getAttribute(Ht) === e)
2096
2257
  return o;
2097
2258
  return null;
2098
2259
  }
2099
- function ko(t, e, n) {
2260
+ function Go(t, e, n) {
2100
2261
  if (n === "forward") {
2101
- const i = Dt(e);
2102
- if (!i) return null;
2103
- const l = i.getAttribute(lt);
2262
+ const r = zt(e);
2263
+ if (!r) return null;
2264
+ const l = r.getAttribute(dt);
2104
2265
  if (!l) return null;
2105
- const c = Mt(t, l);
2106
- return c ? { mode: "enter", enterEl: i, exitEl: c } : null;
2266
+ const c = Vt(t, l);
2267
+ return c ? { mode: "enter", enterEl: r, exitEl: c } : null;
2107
2268
  }
2108
- const o = Dt(t);
2269
+ const o = zt(t);
2109
2270
  if (!o) return null;
2110
- const s = o.getAttribute(lt);
2111
- if (!s) return null;
2112
- const r = Mt(e, s);
2113
- return r ? { mode: "exit", enterEl: o, exitEl: r } : null;
2271
+ const i = o.getAttribute(dt);
2272
+ if (!i) return null;
2273
+ const s = Vt(e, i);
2274
+ return s ? { mode: "exit", enterEl: o, exitEl: s } : null;
2114
2275
  }
2115
- function Lo(t, e, n, o) {
2116
- const s = t.mode === "enter" ? n : e, r = t.mode === "enter" ? e : n, i = z(s, t.enterEl), l = z(r, t.exitEl), c = at(
2276
+ function jo(t, e, n, o) {
2277
+ const i = t.mode === "enter" ? n : e, s = t.mode === "enter" ? e : n, r = H(i, t.enterEl), l = H(s, t.exitEl), c = ut(
2117
2278
  t.enterEl,
2118
- i,
2119
- (g) => z(s, g),
2279
+ r,
2280
+ (m) => H(i, m),
2120
2281
  {
2121
- legacyRadiusAttribute: Yt
2282
+ clipRoot: i,
2283
+ legacyRadiusAttribute: Nt
2122
2284
  }
2123
- ), a = at(
2285
+ ), a = ut(
2124
2286
  t.exitEl,
2125
2287
  l,
2126
- (g) => z(r, g),
2288
+ (m) => H(s, m),
2127
2289
  {
2128
- legacyRadiusAttribute: Yt
2290
+ clipRoot: s,
2291
+ legacyRadiusAttribute: Nt
2129
2292
  }
2130
- ), [p, u] = Ut(c, a), d = p.contentAware && u.contentAware, y = t.mode === "enter" ? n.getBoundingClientRect() : e.getBoundingClientRect(), f = {
2293
+ ), [u, p] = Gt(c, a), d = u.contentAware && p.contentAware, h = t.mode === "enter" ? n.getBoundingClientRect() : e.getBoundingClientRect(), f = {
2131
2294
  left: 0,
2132
2295
  top: 0,
2133
- width: y.width,
2134
- height: y.height
2135
- }, h = p.radiusSource === "legacy" || Do(p.window, f) ? p.radius : 0;
2296
+ width: h.width,
2297
+ height: h.height
2298
+ }, y = u.radiusSource === "legacy" || Bo(u.window, f) ? u.radius : 0;
2136
2299
  return {
2137
- enterRect: i,
2300
+ enterRect: r,
2138
2301
  exitRect: l,
2139
2302
  ...d ? {
2140
- enterMedia: p,
2141
- exitMedia: u
2303
+ enterMedia: u,
2304
+ exitMedia: p
2142
2305
  } : {},
2143
- pageRect: y,
2306
+ pageRect: h,
2144
2307
  scrollOffset: o,
2145
- enterRadius: h,
2146
- exitRadius: u.radius
2308
+ enterRadius: y,
2309
+ exitRadius: p.radius
2147
2310
  };
2148
2311
  }
2149
- class Ho {
2312
+ const rt = /* @__PURE__ */ new WeakMap();
2313
+ function Ko(t) {
2314
+ const e = rt.get(t) ?? {
2315
+ opacity: t.style.opacity,
2316
+ users: 0
2317
+ };
2318
+ e.users++, rt.set(t, e), t.style.opacity = "0";
2319
+ let n = !1;
2320
+ return () => {
2321
+ n || (n = !0, !(--e.users > 0) && (t.style.opacity === "0" && (t.style.opacity = e.opacity), rt.delete(t)));
2322
+ };
2323
+ }
2324
+ class qo {
2150
2325
  prepare(e) {
2151
2326
  e.from.then((n) => {
2152
2327
  n.style.willChange = "transform, clip-path, opacity", n.style.backfaceVisibility = "hidden", n.style.contain = "layout paint";
2153
2328
  });
2154
2329
  }
2155
2330
  contribute(e) {
2156
- const { from: n, to: o, resolved: s, input: r, physics: i, onComplete: l } = e, c = s.mode === "enter", a = c ? wo(r) : So(r), p = c ? o : n, u = c ? "t" : "u";
2157
- a && (p.style.transformOrigin = a.transformOrigin);
2158
- const d = c ? _ : R, y = c ? R : _, f = n.style.zIndex;
2331
+ const { from: n, to: o, resolved: i, input: s, physics: r, onComplete: l } = e, c = i.mode === "enter", a = c ? Oo(s) : Fo(s), u = c ? o : n, p = c ? "t" : "u";
2332
+ l(Ko(i.exitEl)), a && (u.style.transformOrigin = a.transformOrigin);
2333
+ const d = c ? O : F, h = c ? F : O, f = n.style.zIndex;
2159
2334
  n.style.zIndex = d;
2160
- const h = o.style.zIndex, g = o.style.position;
2161
- return o.style.zIndex = y, o.style.position = "relative", l(() => {
2162
- p.style.willChange = "auto", p.style.backfaceVisibility = "", p.style.transformOrigin = "", p.style.contain = "", n.style.zIndex = f, o.style.zIndex === y && (o.style.zIndex = h), o.style.position === "relative" && (o.style.position = g), o.style.transformOrigin = "", n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.transformOrigin = "", n.style.contain = "", n.style.transform = "", n.style.clipPath = "";
2335
+ const y = o.style.zIndex, m = o.style.position;
2336
+ return o.style.zIndex = h, o.style.position = "relative", l(() => {
2337
+ u.style.willChange = "auto", u.style.backfaceVisibility = "", u.style.transformOrigin = "", u.style.contain = "", n.style.zIndex = f, o.style.zIndex === h && (o.style.zIndex = y), o.style.position === "relative" && (o.style.position = m), o.style.transformOrigin = "", n.style.willChange = "auto", n.style.backfaceVisibility = "", n.style.transformOrigin = "", n.style.contain = "", n.style.transform = "", n.style.clipPath = "";
2163
2338
  }), [
2164
- new m({
2165
- element: p,
2166
- integrator: b.from(i),
2339
+ new w({
2340
+ element: u,
2341
+ integrator: S.from(r),
2167
2342
  // Enter: tile expands as `t` (0 → 1). Exit: tile shrinks as `u` —
2168
2343
  // the legacy convention from v5's outAnim path. Either way, feed
2169
2344
  // the progress that matches the tileConfig's authored direction.
2170
- style: u === "t" ? (S) => a.animate(S) : (S, w) => a.animate(w)
2345
+ style: p === "t" ? (C) => a.animate(C) : (C, b) => a.animate(b)
2171
2346
  })
2172
2347
  ];
2173
2348
  }
2174
2349
  }
2175
- class No {
2350
+ class Jo {
2176
2351
  contribute(e) {
2177
- const { resolved: n, physics: o, from: s, to: r, onComplete: i } = e, l = n.mode === "enter" ? r : s, c = Mo(l, n.enterEl);
2352
+ const { resolved: n, physics: o, from: i, to: s, onComplete: r } = e, l = n.mode === "enter" ? s : i, c = Zo(l, n.enterEl);
2178
2353
  if (c.length === 0) return [];
2179
- const a = c.map((p) => p.style.opacity);
2354
+ const a = c.map((u) => u.style.opacity);
2180
2355
  if (n.mode === "enter")
2181
- for (const p of c) p.style.opacity = "0";
2182
- return i(() => {
2183
- for (let p = 0; p < c.length; p++) {
2184
- const u = c[p];
2185
- u && (u.style.opacity = a[p] ?? "");
2356
+ for (const u of c) u.style.opacity = "0";
2357
+ return r(() => {
2358
+ for (let u = 0; u < c.length; u++) {
2359
+ const p = c[u];
2360
+ p && (p.style.opacity = a[u] ?? "");
2186
2361
  }
2187
2362
  }), c.map(
2188
- (p) => new m({
2189
- element: p,
2190
- integrator: b.from(o),
2191
- style: (u, d) => ({
2192
- opacity: n.mode === "enter" ? u : d
2363
+ (u) => new w({
2364
+ element: u,
2365
+ integrator: S.from(o),
2366
+ style: (p, d) => ({
2367
+ opacity: n.mode === "enter" ? p : d
2193
2368
  })
2194
2369
  })
2195
2370
  );
2196
2371
  }
2197
2372
  }
2198
- class jt {
2373
+ class te {
2199
2374
  contribute() {
2200
2375
  return [];
2201
2376
  }
2202
2377
  }
2203
- const zo = {
2204
- default: () => new jt(),
2205
- fade: () => new No()
2378
+ const Qo = {
2379
+ default: () => new te(),
2380
+ fade: () => new Jo()
2206
2381
  };
2207
- function Vo(t) {
2208
- return zo[t]();
2382
+ function ti(t) {
2383
+ return Qo[t]();
2209
2384
  }
2210
- class Uo extends jt {
2385
+ class ei extends te {
2211
2386
  }
2212
- function Xo(t) {
2213
- const e = Yo(t.type);
2387
+ function ni(t) {
2388
+ const e = Uo(t.type);
2214
2389
  return { strategies: [
2215
- new Ho(),
2390
+ new qo(),
2216
2391
  e,
2217
- Vo(t.variant),
2218
- new Uo(),
2392
+ ti(t.variant),
2393
+ new ei(),
2219
2394
  // Overlay is intrinsically tied to backdrop-filter-driven types. Today
2220
2395
  // that's only `blur`; the table-driven factory above owns the mapping
2221
2396
  // so this conditional is the single line that knows the relationship.
2222
- ...t.type === "blur" ? [new Ao()] : []
2397
+ ...t.type === "blur" ? [new Lo()] : []
2223
2398
  ], physics: e.physics };
2224
2399
  }
2225
- const Bo = (t) => {
2226
- const { strategies: e, physics: n } = Xo(t);
2400
+ const oi = (t) => {
2401
+ const { strategies: e, physics: n } = ni(t);
2227
2402
  return {
2228
2403
  prepare: (o) => {
2229
- const s = {
2404
+ const i = {
2230
2405
  from: o.from,
2231
2406
  to: o.to,
2232
2407
  context: { positionedParent: o.context.positionedParent },
@@ -2234,79 +2409,79 @@ const Bo = (t) => {
2234
2409
  // strategy interface narrows the cast to keep both signatures
2235
2410
  // compatible.
2236
2411
  createElement: o.createElement
2237
- }, r = {};
2238
- for (const i of e) {
2239
- if (!i.prepare) continue;
2240
- const l = i.prepare(s);
2241
- l && Object.assign(r, l);
2412
+ }, s = {};
2413
+ for (const r of e) {
2414
+ if (!r.prepare) continue;
2415
+ const l = r.prepare(i);
2416
+ l && Object.assign(s, l);
2242
2417
  }
2243
- return r;
2418
+ return s;
2244
2419
  },
2245
- animation: ({ from: o, to: s, context: r, ...i }) => {
2246
- const l = ko(o, s, r.direction);
2420
+ animation: ({ from: o, to: i, context: s, ...r }) => {
2421
+ const l = Go(o, i, s.direction);
2247
2422
  if (!l)
2248
- return new E([], { mode: "parallel" });
2249
- const c = Lo(l, o, s, r.scrollOffset), a = [], u = {
2423
+ return new P([], { mode: "parallel" });
2424
+ const c = jo(l, o, i, s.scrollOffset), a = [], p = {
2250
2425
  from: o,
2251
- to: s,
2426
+ to: i,
2252
2427
  resolved: l,
2253
2428
  input: c,
2254
2429
  physics: n,
2255
- context: r,
2256
- extras: i,
2430
+ context: s,
2431
+ extras: r,
2257
2432
  onComplete: (f) => {
2258
2433
  a.push(f);
2259
2434
  }
2260
2435
  }, d = [];
2261
2436
  for (const f of e)
2262
- f.contribute && d.push(...f.contribute(u));
2263
- const y = d[0];
2264
- if (y) {
2265
- const f = y.onComplete;
2266
- y.onComplete = () => {
2437
+ f.contribute && d.push(...f.contribute(p));
2438
+ const h = d[0];
2439
+ if (h) {
2440
+ const f = h.onComplete;
2441
+ h.onComplete = () => {
2267
2442
  f == null || f();
2268
- for (const h of a)
2443
+ for (const y of a)
2269
2444
  try {
2270
- h();
2271
- } catch (g) {
2272
- console.error("[zoom] cleanup error", g);
2445
+ y();
2446
+ } catch (m) {
2447
+ console.error("[zoom] cleanup error", m);
2273
2448
  }
2274
2449
  };
2275
2450
  }
2276
2451
  for (const f of d) {
2277
- if (!(f instanceof m)) continue;
2278
- const h = f.onComplete;
2452
+ if (!(f instanceof w)) continue;
2453
+ const y = f.onComplete;
2279
2454
  f.onComplete = () => {
2280
- h == null || h(), f.releaseFill();
2455
+ y == null || y(), f.releaseFill();
2281
2456
  };
2282
2457
  }
2283
- return new E(d, { mode: "parallel" });
2458
+ return new P(d, { mode: "parallel" });
2284
2459
  }
2285
2460
  };
2286
2461
  };
2287
- function Wo(t) {
2462
+ function ii(t) {
2288
2463
  const e = t.type ?? "static", n = t.variant ?? (t.fade ? "fade" : "default");
2289
2464
  return { type: e, variant: n };
2290
2465
  }
2291
- function ps(t = {}) {
2292
- const e = Wo(t);
2293
- return Bo(e);
2466
+ function Ci(t = {}) {
2467
+ const e = ii(t);
2468
+ return oi(e);
2294
2469
  }
2295
2470
  export {
2296
- fs as Animation,
2297
- E as MultiAnimation,
2298
- m as WebAnimation,
2299
- Jo as axis,
2300
- Qo as blind,
2301
- ts as drill,
2302
- es as fade,
2303
- ns as film,
2304
- os as hero,
2305
- ss as jaemin,
2306
- is as rotate,
2307
- rs as scroll,
2308
- as as sheet,
2309
- ls as slide,
2310
- cs as strip,
2311
- ps as zoom
2471
+ Ei as Animation,
2472
+ P as MultiAnimation,
2473
+ w as WebAnimation,
2474
+ ci as axis,
2475
+ pi as blind,
2476
+ ui as drill,
2477
+ di as fade,
2478
+ fi as film,
2479
+ hi as hero,
2480
+ yi as jaemin,
2481
+ mi as rotate,
2482
+ gi as scroll,
2483
+ bi as sheet,
2484
+ wi as slide,
2485
+ Si as strip,
2486
+ Ci as zoom
2312
2487
  };