@ssgoi/core 3.1.4 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,10 +10,10 @@ const P = (t) => new Promise((n) => setTimeout(n, t)), B = { stiffness: 80, damp
10
10
  blindColor: l = j
11
11
  } = t;
12
12
  let i, c = null;
13
- const o = (e, p, y = "left") => {
13
+ const o = (e, h, u = "left") => {
14
14
  window.getComputedStyle(e).position === "static" && (e.style.position = "relative");
15
- const g = document.createElement("div");
16
- g.className = "blind-container", g.style.cssText = `
15
+ const y = document.createElement("div");
16
+ y.className = "blind-container", y.style.cssText = `
17
17
  position: absolute;
18
18
  top: 0;
19
19
  left: 0;
@@ -23,7 +23,7 @@ const P = (t) => new Promise((n) => setTimeout(n, t)), B = { stiffness: 80, damp
23
23
  z-index: 9999;
24
24
  overflow: hidden;
25
25
  `;
26
- const u = [];
26
+ const g = [];
27
27
  for (let m = 0; m < r; m++) {
28
28
  const f = document.createElement("div");
29
29
  if (s === "horizontal") {
@@ -35,8 +35,8 @@ const P = (t) => new Promise((n) => setTimeout(n, t)), B = { stiffness: 80, damp
35
35
  width: 100%;
36
36
  height: ${$};
37
37
  background: ${l};
38
- transform: scaleX(${p === "hidden" ? 0 : 1});
39
- transform-origin: ${y} center;
38
+ transform: scaleX(${h === "hidden" ? 0 : 1});
39
+ transform-origin: ${u} center;
40
40
  will-change: transform;
41
41
  `;
42
42
  } else {
@@ -48,42 +48,42 @@ const P = (t) => new Promise((n) => setTimeout(n, t)), B = { stiffness: 80, damp
48
48
  width: ${$};
49
49
  height: 100%;
50
50
  background: ${l};
51
- transform: scaleY(${p === "hidden" ? 0 : 1});
52
- transform-origin: ${y === "left" ? "top" : "bottom"} center;
51
+ transform: scaleY(${h === "hidden" ? 0 : 1});
52
+ transform-origin: ${u === "left" ? "top" : "bottom"} center;
53
53
  will-change: transform;
54
54
  `;
55
55
  }
56
- u.push(f), g.appendChild(f);
56
+ g.push(f), y.appendChild(f);
57
57
  }
58
- return e.appendChild(g), { container: g, blinds: u };
58
+ return e.appendChild(y), { container: y, blinds: g };
59
59
  };
60
60
  return {
61
61
  out: () => {
62
62
  let e = null;
63
- i = new Promise((h) => {
64
- c = h;
63
+ i = new Promise((p) => {
64
+ c = p;
65
65
  });
66
- const p = (h) => {
67
- const g = 1 - h;
66
+ const h = (p) => {
67
+ const y = 1 - p;
68
68
  return {
69
- transform: s === "horizontal" ? `scaleX(${g})` : `scaleY(${g})`
69
+ transform: s === "horizontal" ? `scaleX(${y})` : `scaleY(${y})`
70
70
  };
71
71
  };
72
72
  return {
73
- springs: Array.from({ length: r }, (h, g) => ({
73
+ springs: Array.from({ length: r }, (p, y) => ({
74
74
  spring: a,
75
75
  offset: 0.2,
76
76
  css: {
77
77
  // Use getter for lazy element access (evaluated after prepare)
78
78
  get element() {
79
- return e == null ? void 0 : e.blinds[g];
79
+ return e == null ? void 0 : e.blinds[y];
80
80
  },
81
- style: p
81
+ style: h
82
82
  }
83
83
  })),
84
84
  schedule: "stagger",
85
- prepare: (h) => {
86
- x(h), h.style.zIndex = "1000", e = o(h, "hidden", "left");
85
+ prepare: (p) => {
86
+ x(p), p.style.zIndex = "1000", e = o(p, "hidden", "left");
87
87
  },
88
88
  onStart: () => {
89
89
  },
@@ -94,27 +94,27 @@ const P = (t) => new Promise((n) => setTimeout(n, t)), B = { stiffness: 80, damp
94
94
  },
95
95
  in: () => {
96
96
  let e = null;
97
- const p = (h) => {
98
- const g = 1 - h;
97
+ const h = (p) => {
98
+ const y = 1 - p;
99
99
  return {
100
- transform: s === "horizontal" ? `scaleX(${g})` : `scaleY(${g})`
100
+ transform: s === "horizontal" ? `scaleX(${y})` : `scaleY(${y})`
101
101
  };
102
102
  };
103
103
  return {
104
- springs: Array.from({ length: r }, (h, g) => ({
104
+ springs: Array.from({ length: r }, (p, y) => ({
105
105
  spring: n,
106
106
  offset: 0.2,
107
107
  css: {
108
108
  // Use getter for lazy element access (evaluated after prepare)
109
109
  get element() {
110
- return e == null ? void 0 : e.blinds[g];
110
+ return e == null ? void 0 : e.blinds[y];
111
111
  },
112
- style: p
112
+ style: h
113
113
  }
114
114
  })),
115
115
  schedule: "stagger",
116
- prepare: (h) => {
117
- h.style.position = "relative", h.style.zIndex = "0", e = o(h, "closed", "right");
116
+ prepare: (p) => {
117
+ p.style.position = "relative", p.style.zIndex = "0", e = o(p, "closed", "right");
118
118
  },
119
119
  onStart: () => {
120
120
  },
@@ -235,18 +235,18 @@ const P = (t) => new Promise((n) => setTimeout(n, t)), B = { stiffness: 80, damp
235
235
  })
236
236
  };
237
237
  }, tt = {
238
- scaleDown: { stiffness: 7, damping: 4 },
238
+ scaleDown: { stiffness: 20, damping: 7 },
239
239
  // Soft start for cinematic scale
240
- translate: { stiffness: 5, damping: 3.5 },
240
+ translate: { stiffness: 15, damping: 7 },
241
241
  // Medium for movement
242
- scaleUp: { stiffness: 7, damping: 4 }
242
+ scaleUp: { stiffness: 20, damping: 7 }
243
243
  // Crisp return to full size
244
244
  }, E = {
245
245
  scaleDown: 0,
246
246
  // Start immediately
247
247
  translate: 0.2,
248
248
  // Start when scaleDown is 25% complete
249
- scaleUp: 0.9
249
+ scaleUp: 0.8
250
250
  // Start when translate is 70% complete
251
251
  }, nt = 0.8, et = "white", Ot = (t) => {
252
252
  var r;
@@ -259,10 +259,10 @@ const P = (t) => new Promise((n) => setTimeout(n, t)), B = { stiffness: 80, damp
259
259
  }), e = {
260
260
  scale: 1,
261
261
  translateY: -i.top
262
- }, p = () => {
262
+ }, h = () => {
263
263
  s.style.transform = `translateY(${e.translateY}px) scale(${e.scale})`;
264
- const y = (i.width - i.width * e.scale) / 2, h = (i.height - i.height * e.scale) / 2;
265
- it(o, y, h);
264
+ const u = (i.width - i.width * e.scale) / 2, p = (i.height - i.height * e.scale) / 2;
265
+ it(o, u, p);
266
266
  };
267
267
  return {
268
268
  springs: [
@@ -270,40 +270,40 @@ const P = (t) => new Promise((n) => setTimeout(n, t)), B = { stiffness: 80, damp
270
270
  {
271
271
  spring: n.scaleDown,
272
272
  offset: E.scaleDown,
273
- tick: (y) => {
274
- const h = 1 - y;
275
- e.scale = 1 - (1 - a) * h, p();
273
+ tick: (u) => {
274
+ const p = 1 - u;
275
+ e.scale = 1 - (1 - a) * p, h();
276
276
  }
277
277
  },
278
278
  // Spring 2: Translate (vertical movement)
279
279
  {
280
280
  spring: n.translate,
281
281
  offset: E.translate,
282
- tick: (y) => {
283
- const h = 1 - y;
284
- e.translateY = -i.top - i.height * h, p();
282
+ tick: (u) => {
283
+ const p = 1 - u;
284
+ e.translateY = -i.top - i.height * p, h();
285
285
  }
286
286
  },
287
287
  // Spring 3: Scale Up (scale → 1)
288
288
  {
289
289
  spring: n.scaleUp,
290
290
  offset: E.scaleUp,
291
- tick: (y) => {
292
- const h = 1 - y;
293
- e.scale = a + (1 - a) * h, p();
291
+ tick: (u) => {
292
+ const p = 1 - u;
293
+ e.scale = a + (1 - a) * p, h();
294
294
  }
295
295
  }
296
296
  ],
297
297
  schedule: "stagger",
298
298
  prepare: () => {
299
299
  x(s), k(s, i), S(s, i), at(s, i);
300
- for (const y of o)
301
- l.positionedParent.appendChild(y);
300
+ for (const u of o)
301
+ l.positionedParent.appendChild(u);
302
302
  },
303
303
  onEnd: () => {
304
304
  s.style.clipPath = "", s.style.transformOrigin = "", setTimeout(() => {
305
- for (const y of o)
306
- l.positionedParent.removeChild(y);
305
+ for (const u of o)
306
+ l.positionedParent.removeChild(u);
307
307
  }, 1e3);
308
308
  }
309
309
  };
@@ -372,22 +372,22 @@ function st(t = "white", n) {
372
372
  o.style.position = "absolute", o.style.width = "1px", o.style.height = "15px", o.style.backgroundColor = t, o.style.top = "0", o.style.right = "0", i.appendChild(c), i.appendChild(o);
373
373
  const e = document.createElement("div");
374
374
  e.style.position = "fixed", e.style.pointerEvents = "none", e.style.zIndex = "9999", e.style.top = `${n.top + n.height - 15 + 1}px`, e.style.left = `${n.left - 1}px`, e.style.width = "15px", e.style.height = "15px";
375
+ const h = document.createElement("div");
376
+ h.style.position = "absolute", h.style.width = "15px", h.style.height = "1px", h.style.backgroundColor = t, h.style.bottom = "0", h.style.left = "0";
377
+ const u = document.createElement("div");
378
+ u.style.position = "absolute", u.style.width = "1px", u.style.height = "15px", u.style.backgroundColor = t, u.style.bottom = "0", u.style.left = "0", e.appendChild(h), e.appendChild(u);
375
379
  const p = document.createElement("div");
376
- p.style.position = "absolute", p.style.width = "15px", p.style.height = "1px", p.style.backgroundColor = t, p.style.bottom = "0", p.style.left = "0";
380
+ p.style.position = "fixed", p.style.pointerEvents = "none", p.style.zIndex = "9999", p.style.top = `${n.top + n.height - 15 + 1}px`, p.style.left = `${n.left + n.width - 15 + 1}px`, p.style.width = "15px", p.style.height = "15px";
377
381
  const y = document.createElement("div");
378
- y.style.position = "absolute", y.style.width = "1px", y.style.height = "15px", y.style.backgroundColor = t, y.style.bottom = "0", y.style.left = "0", e.appendChild(p), e.appendChild(y);
379
- const h = document.createElement("div");
380
- h.style.position = "fixed", h.style.pointerEvents = "none", h.style.zIndex = "9999", h.style.top = `${n.top + n.height - 15 + 1}px`, h.style.left = `${n.left + n.width - 15 + 1}px`, h.style.width = "15px", h.style.height = "15px";
382
+ y.style.position = "absolute", y.style.width = "15px", y.style.height = "1px", y.style.backgroundColor = t, y.style.bottom = "0", y.style.right = "0";
381
383
  const g = document.createElement("div");
382
- g.style.position = "absolute", g.style.width = "15px", g.style.height = "1px", g.style.backgroundColor = t, g.style.bottom = "0", g.style.right = "0";
383
- const u = document.createElement("div");
384
- return u.style.position = "absolute", u.style.width = "1px", u.style.height = "15px", u.style.backgroundColor = t, u.style.bottom = "0", u.style.right = "0", h.appendChild(g), h.appendChild(u), {
384
+ return g.style.position = "absolute", g.style.width = "1px", g.style.height = "15px", g.style.backgroundColor = t, g.style.bottom = "0", g.style.right = "0", p.appendChild(y), p.appendChild(g), {
385
385
  topLeft: r,
386
386
  topRight: i,
387
387
  bottomLeft: e,
388
- bottomRight: h,
388
+ bottomRight: p,
389
389
  *[Symbol.iterator]() {
390
- yield r, yield i, yield e, yield h;
390
+ yield r, yield i, yield e, yield p;
391
391
  }
392
392
  };
393
393
  }
@@ -427,17 +427,17 @@ const Dt = (t = {}) => {
427
427
  let r = null, s = null;
428
428
  return {
429
429
  in: async (c, o) => {
430
- const e = c, p = Array.from(e.querySelectorAll("[data-hero-key]"));
431
- if (p.length === 0)
430
+ const e = c, h = Array.from(e.querySelectorAll("[data-hero-key]"));
431
+ if (h.length === 0)
432
432
  return {
433
433
  spring: n,
434
434
  tick: () => {
435
435
  }
436
436
  // No hero elements, skip animation
437
437
  };
438
- if (!await new Promise((g) => {
439
- r ? g(!0) : (s = g, setTimeout(() => {
440
- s = null, g(!1);
438
+ if (!await new Promise((y) => {
439
+ r ? y(!0) : (s = y, setTimeout(() => {
440
+ s = null, y(!1);
441
441
  }, a));
442
442
  }) || !r)
443
443
  return r = null, {
@@ -446,12 +446,12 @@ const Dt = (t = {}) => {
446
446
  }
447
447
  // No fromNode, skip animation
448
448
  };
449
- const h = p.map((g) => {
450
- const u = g.getAttribute("data-hero-key");
451
- if (!u) return null;
452
- const m = rt(r, u);
449
+ const p = h.map((y) => {
450
+ const g = y.getAttribute("data-hero-key");
451
+ if (!g) return null;
452
+ const m = rt(r, g);
453
453
  if (!m) return null;
454
- const f = g, w = b(r, m), $ = b(e, f), v = w.left - $.left - o.scrollOffset.x, F = w.top - $.top - o.scrollOffset.y, Y = w.width / $.width, U = w.height / $.height, V = f.style.transform, W = f.style.position, z = f.style.transformOrigin, X = f.style.zIndex, M = f.style.willChange;
454
+ const f = y, w = b(r, m), $ = b(e, f), v = w.left - $.left - o.scrollOffset.x, F = w.top - $.top - o.scrollOffset.y, Y = w.width / $.width, U = w.height / $.height, V = f.style.transform, W = f.style.position, z = f.style.transformOrigin, X = f.style.zIndex, M = f.style.willChange;
455
455
  return {
456
456
  toEl: f,
457
457
  dx: v,
@@ -465,37 +465,37 @@ const Dt = (t = {}) => {
465
465
  originalWillChange: M
466
466
  };
467
467
  }).filter(
468
- (g) => g !== null && Math.abs(g.dy) <= d
468
+ (y) => y !== null && Math.abs(y.dy) <= d
469
469
  );
470
- return r = null, h.length === 0 ? {
470
+ return r = null, p.length === 0 ? {
471
471
  spring: n,
472
472
  tick: () => {
473
473
  }
474
474
  // No matching hero elements
475
475
  } : {
476
- springs: h.map(({ toEl: g, dx: u, dy: m, dw: f, dh: w }) => ({
476
+ springs: p.map(({ toEl: y, dx: g, dy: m, dw: f, dh: w }) => ({
477
477
  spring: n,
478
478
  tick: ($) => {
479
- g.style.transform = `translate(${(1 - $) * u}px, ${(1 - $) * m}px) scale(${$ + (1 - $) * f}, ${$ + (1 - $) * w})`;
479
+ y.style.transform = `translate(${(1 - $) * g}px, ${(1 - $) * m}px) scale(${$ + (1 - $) * f}, ${$ + (1 - $) * w})`;
480
480
  }
481
481
  })),
482
482
  schedule: "parallel",
483
483
  prepare: () => {
484
- h.forEach(({ toEl: g }) => {
485
- g.style.position = "relative", g.style.transformOrigin = "top left", g.style.zIndex = "1000", g.style.willChange = "transform";
484
+ p.forEach(({ toEl: y }) => {
485
+ y.style.position = "relative", y.style.transformOrigin = "top left", y.style.zIndex = "1000", y.style.willChange = "transform";
486
486
  });
487
487
  },
488
488
  onEnd: () => {
489
- h.forEach(
489
+ p.forEach(
490
490
  ({
491
- toEl: g,
492
- originalTransform: u,
491
+ toEl: y,
492
+ originalTransform: g,
493
493
  originalPosition: m,
494
494
  originalTransformOrigin: f,
495
495
  originalZIndex: w,
496
496
  originalWillChange: $
497
497
  }) => {
498
- g.style.transform = u, g.style.position = m, g.style.transformOrigin = f, g.style.zIndex = w, g.style.willChange = $;
498
+ y.style.transform = g, y.style.position = m, y.style.transformOrigin = f, y.style.zIndex = w, y.style.willChange = $;
499
499
  }
500
500
  );
501
501
  }
@@ -520,14 +520,14 @@ function lt({
520
520
  pageRect: a,
521
521
  scrollOffset: d
522
522
  }) {
523
- const r = n.left - t.left + (n.width - t.width) / 2 - d.x, s = n.top - t.top + (n.height - t.height) / 2 - d.y, l = n.width / t.width, i = n.height / t.height, c = Math.max(l, i), o = t.top / a.height * 100, e = (a.width - (t.left + t.width)) / a.width * 100, p = (a.height - (t.top + t.height)) / a.height * 100, y = t.left / a.width * 100;
523
+ const r = n.left - t.left + (n.width - t.width) / 2 - d.x, s = n.top - t.top + (n.height - t.height) / 2 - d.y, l = n.width / t.width, i = n.height / t.height, c = Math.max(l, i), o = t.top / a.height * 100, e = (a.width - (t.left + t.width)) / a.width * 100, h = (a.height - (t.top + t.height)) / a.height * 100, u = t.left / a.width * 100;
524
524
  return {
525
525
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
526
- animate: (g) => {
527
- const u = 1 - g;
526
+ animate: (y) => {
527
+ const g = 1 - y;
528
528
  return {
529
- clipPath: `inset(${o * u}% ${e * u}% ${p * u}% ${y * u}%)`,
530
- transform: `translate(${r * u}px, ${s * u}px) scale(${1 + (c - 1) * u})`
529
+ clipPath: `inset(${o * g}% ${e * g}% ${h * g}% ${u * g}%)`,
530
+ transform: `translate(${r * g}px, ${s * g}px) scale(${1 + (c - 1) * g})`
531
531
  };
532
532
  }
533
533
  };
@@ -538,14 +538,14 @@ function ot({
538
538
  pageRect: a,
539
539
  scrollOffset: d
540
540
  }) {
541
- const r = n.left - t.left + (n.width - t.width) / 2 + d.x, s = n.top - t.top + (n.height - t.height) / 2 + d.y, l = n.width / t.width, i = n.height / t.height, c = Math.min(l, i), o = t.top / a.height * 100, e = (a.width - (t.left + t.width)) / a.width * 100, p = (a.height - (t.top + t.height)) / a.height * 100, y = t.left / a.width * 100;
541
+ const r = n.left - t.left + (n.width - t.width) / 2 + d.x, s = n.top - t.top + (n.height - t.height) / 2 + d.y, l = n.width / t.width, i = n.height / t.height, c = Math.min(l, i), o = t.top / a.height * 100, e = (a.width - (t.left + t.width)) / a.width * 100, h = (a.height - (t.top + t.height)) / a.height * 100, u = t.left / a.width * 100;
542
542
  return {
543
543
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
544
- animate: (g) => {
545
- const u = 1 - g;
544
+ animate: (y) => {
545
+ const g = 1 - y;
546
546
  return {
547
- clipPath: `inset(${o * u}% ${e * u}% ${p * u}% ${y * u}%)`,
548
- transform: `translate(${r * u - d.x}px, ${s * u - d.y}px) scale(${1 + (c - 1) * u})`
547
+ clipPath: `inset(${o * g}% ${e * g}% ${h * g}% ${u * g}%)`,
548
+ transform: `translate(${r * g - d.x}px, ${s * g - d.y}px) scale(${1 + (c - 1) * g})`
549
549
  };
550
550
  }
551
551
  };
@@ -612,35 +612,35 @@ const Pt = (t = {}) => {
612
612
  let d = null, r = null, s = null, l = null;
613
613
  return {
614
614
  in: async (o, { scrollOffset: e }) => {
615
- const p = o;
616
- return !await new Promise((h) => {
617
- d ? h(!0) : (r = h, setTimeout(() => {
618
- r = null, h(!1);
615
+ const h = o;
616
+ return !await new Promise((p) => {
617
+ d ? p(!0) : (r = p, setTimeout(() => {
618
+ r = null, p(!1);
619
619
  }, a));
620
620
  }) || !d ? (l == null || l(), l = null, d = null, {
621
621
  spring: n,
622
622
  css: () => ({})
623
- }) : (s = ct(d, p, e), l == null || l(), l = null, s ? (d = null, {
623
+ }) : (s = ct(d, h, e), l == null || l(), l = null, s ? (d = null, {
624
624
  spring: n,
625
- css: (h) => s != null && s.inAnimation ? s.inAnimation(h) : {}
625
+ css: (p) => s != null && s.inAnimation ? s.inAnimation(p) : {}
626
626
  }) : (d = null, {
627
627
  spring: n,
628
628
  css: () => ({})
629
629
  }));
630
630
  },
631
- out: async (o, e) => {
632
- const p = new Promise((y) => {
633
- l = y;
631
+ out: async (o) => {
632
+ const e = new Promise((h) => {
633
+ l = h;
634
634
  });
635
635
  return {
636
636
  spring: n,
637
- prepare: (y) => {
638
- s != null && s.isEnterMode ? x(y) : (x(y, e), y.style.zIndex = "-1");
637
+ prepare: (h) => {
638
+ x(h), s != null && s.isEnterMode || (h.style.zIndex = "-1");
639
639
  },
640
640
  wait: async () => {
641
- d = o, r && (r(!0), r = null), await p;
641
+ d = o, r && (r(!0), r = null), await e;
642
642
  },
643
- css: (y) => s != null && s.outAnimation ? s.outAnimation(y) : {}
643
+ css: (h) => s != null && s.outAnimation ? s.outAnimation(h) : {}
644
644
  };
645
645
  }
646
646
  };
@@ -651,14 +651,14 @@ function dt({
651
651
  pageRect: a,
652
652
  scrollOffset: d
653
653
  }) {
654
- const r = n.left - t.left + (n.width - t.width) / 2 - d.x, s = n.top - t.top + (n.height - t.height) / 2 - d.y, l = n.width / t.width, i = n.height / t.height, c = Math.max(l, i), o = t.top / a.height * 100, e = (a.width - (t.left + t.width)) / a.width * 100, p = (a.height - (t.top + t.height)) / a.height * 100, y = t.left / a.width * 100;
654
+ const r = n.left - t.left + (n.width - t.width) / 2 - d.x, s = n.top - t.top + (n.height - t.height) / 2 - d.y, l = n.width / t.width, i = n.height / t.height, c = Math.max(l, i), o = t.top / a.height * 100, e = (a.width - (t.left + t.width)) / a.width * 100, h = (a.height - (t.top + t.height)) / a.height * 100, u = t.left / a.width * 100;
655
655
  return {
656
656
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
657
- animate: (g) => {
658
- const u = 1 - g;
657
+ animate: (y) => {
658
+ const g = 1 - y;
659
659
  return {
660
- clipPath: `inset(${o * u}% ${e * u}% ${p * u}% ${y * u}%)`,
661
- transform: `translate(${r * u}px, ${s * u}px) scale(${1 + (c - 1) * u})`
660
+ clipPath: `inset(${o * g}% ${e * g}% ${h * g}% ${u * g}%)`,
661
+ transform: `translate(${r * g}px, ${s * g}px) scale(${1 + (c - 1) * g})`
662
662
  };
663
663
  }
664
664
  };
@@ -689,10 +689,10 @@ function pt({
689
689
  return {
690
690
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
691
691
  animate: (o) => {
692
- const e = 1 - o, p = o;
692
+ const e = 1 - o, h = o;
693
693
  return {
694
694
  transform: `translate(${d * e}px, ${r * e}px) scale(${1 + (i - 1) * e})`,
695
- opacity: `${p}`
695
+ opacity: `${h}`
696
696
  };
697
697
  }
698
698
  };
@@ -703,14 +703,14 @@ function yt({
703
703
  pageRect: a,
704
704
  scrollOffset: d
705
705
  }) {
706
- const r = n.left - t.left + (n.width - t.width) / 2 + d.x, s = n.top - t.top + (n.height - t.height) / 2 + d.y, l = n.width / t.width, i = n.height / t.height, c = Math.min(l, i), o = t.top / a.height * 100, e = (a.width - (t.left + t.width)) / a.width * 100, p = (a.height - (t.top + t.height)) / a.height * 100, y = t.left / a.width * 100;
706
+ const r = n.left - t.left + (n.width - t.width) / 2 + d.x, s = n.top - t.top + (n.height - t.height) / 2 + d.y, l = n.width / t.width, i = n.height / t.height, c = Math.min(l, i), o = t.top / a.height * 100, e = (a.width - (t.left + t.width)) / a.width * 100, h = (a.height - (t.top + t.height)) / a.height * 100, u = t.left / a.width * 100;
707
707
  return {
708
708
  transformOrigin: `${t.left + t.width / 2}px ${t.top + t.height / 2}px`,
709
- animate: (g) => {
710
- const u = 1 - g;
709
+ animate: (y) => {
710
+ const g = 1 - y;
711
711
  return {
712
- clipPath: `inset(${o * u}% ${e * u}% ${p * u}% ${y * u}%)`,
713
- transform: `translate(${r * u - d.x}px, ${s * u - d.y}px) scale(${1 + (c - 1) * u})`
712
+ clipPath: `inset(${o * g}% ${e * g}% ${h * g}% ${u * g}%)`,
713
+ transform: `translate(${r * g - d.x}px, ${s * g - d.y}px) scale(${1 + (c - 1) * g})`
714
714
  };
715
715
  }
716
716
  };
@@ -748,29 +748,29 @@ function gt(t, n, a) {
748
748
  galleryRect: c,
749
749
  pageRect: n.getBoundingClientRect(),
750
750
  scrollOffset: a
751
- }), p = ht({
751
+ }), h = ht({
752
752
  galleryRect: c,
753
753
  detailRect: o,
754
754
  scrollOffset: a
755
755
  });
756
- return n.style.transformOrigin = e.transformOrigin, t.style.transformOrigin = p.transformOrigin, {
756
+ return n.style.transformOrigin = e.transformOrigin, t.style.transformOrigin = h.transformOrigin, {
757
757
  inAnimation: e.animate,
758
- outAnimation: p.animate
758
+ outAnimation: h.animate
759
759
  };
760
760
  } else {
761
761
  const e = pt({
762
762
  galleryRect: c,
763
763
  detailRect: o,
764
764
  scrollOffset: a
765
- }), p = yt({
765
+ }), h = yt({
766
766
  detailRect: o,
767
767
  galleryRect: c,
768
768
  pageRect: t.getBoundingClientRect(),
769
769
  scrollOffset: a
770
770
  });
771
- return n.style.transformOrigin = e.transformOrigin, t.style.transformOrigin = p.transformOrigin, {
771
+ return n.style.transformOrigin = e.transformOrigin, t.style.transformOrigin = h.transformOrigin, {
772
772
  inAnimation: e.animate,
773
- outAnimation: p.animate
773
+ outAnimation: h.animate
774
774
  };
775
775
  }
776
776
  }
@@ -783,35 +783,35 @@ const vt = (t = {}) => {
783
783
  let d = null, r = null, s = null, l = null;
784
784
  return {
785
785
  in: async (o, { scrollOffset: e }) => {
786
- const p = o;
787
- return !await new Promise((h) => {
788
- d ? h(!0) : (r = h, setTimeout(() => {
789
- r = null, h(!1);
786
+ const h = o;
787
+ return !await new Promise((p) => {
788
+ d ? p(!0) : (r = p, setTimeout(() => {
789
+ r = null, p(!1);
790
790
  }, a));
791
791
  }) || !d ? (l == null || l(), l = null, d = null, {
792
792
  spring: n,
793
793
  css: () => ({})
794
- }) : (s = gt(d, p, e), l == null || l(), l = null, s ? (d = null, {
794
+ }) : (s = gt(d, h, e), l == null || l(), l = null, s ? (d = null, {
795
795
  spring: n,
796
- css: (h) => s ? s.inAnimation(h) : {}
796
+ css: (p) => s ? s.inAnimation(p) : {}
797
797
  }) : (d = null, {
798
798
  spring: n,
799
799
  css: () => ({})
800
800
  }));
801
801
  },
802
802
  out: async (o) => {
803
- const e = new Promise((p) => {
804
- l = p;
803
+ const e = new Promise((h) => {
804
+ l = h;
805
805
  });
806
806
  return {
807
807
  spring: n,
808
- prepare: (p) => {
809
- x(p), p.style.zIndex = "-1";
808
+ prepare: (h) => {
809
+ x(h), h.style.zIndex = "-1";
810
810
  },
811
811
  wait: async () => {
812
812
  d = o, r && (r(!0), r = null), await e;
813
813
  },
814
- css: (p) => s ? s.outAnimation(p) : {}
814
+ css: (h) => s ? s.outAnimation(h) : {}
815
815
  };
816
816
  }
817
817
  };
@@ -828,8 +828,8 @@ const vt = (t = {}) => {
828
828
  const i = () => {
829
829
  if (r === null || s === null)
830
830
  return null;
831
- const e = Math.min(r, s), p = window.innerHeight;
832
- return Math.max(e, p);
831
+ const e = Math.min(r, s), h = window.innerHeight;
832
+ return Math.max(e, h);
833
833
  };
834
834
  return {
835
835
  in: (e) => (s = e.offsetHeight, r !== null && (l = i()), {
@@ -837,27 +837,27 @@ const vt = (t = {}) => {
837
837
  prepare: () => {
838
838
  e.style.willChange = "transform", e.style.backfaceVisibility = "hidden", e.style.contain = "layout paint";
839
839
  },
840
- tick: (p) => {
840
+ tick: (h) => {
841
841
  l === null && (l = i());
842
- const y = l ?? window.innerHeight, h = d ? (1 - p) * y : (1 - p) * -y;
843
- e.style.transform = `translate3d(0, ${h}px, 0)`;
842
+ const u = l ?? window.innerHeight, p = d ? (1 - h) * u : (1 - h) * -u;
843
+ e.style.transform = `translate3d(0, ${p}px, 0)`;
844
844
  },
845
845
  onEnd: () => {
846
846
  e.style.willChange = "auto", e.style.backfaceVisibility = "", e.style.contain = "";
847
847
  }
848
848
  }),
849
- out: (e, p) => ({
849
+ out: (e, h) => ({
850
850
  spring: a,
851
851
  onStart: () => {
852
852
  r = e.offsetHeight, s !== null && (l = i());
853
853
  },
854
- tick: (y) => {
854
+ tick: (u) => {
855
855
  l === null && (l = i());
856
- const h = l ?? window.innerHeight, g = d ? (1 - y) * -h : (1 - y) * h;
857
- e.style.transform = `translate3d(0, ${g}px, 0)`;
856
+ const p = l ?? window.innerHeight, y = d ? (1 - u) * -p : (1 - u) * p;
857
+ e.style.transform = `translate3d(0, ${y}px, 0)`;
858
858
  },
859
- prepare: (y) => {
860
- x(y, p), y.style.zIndex = d ? "-1" : "1", y.style.willChange = "transform", y.style.backfaceVisibility = "hidden", y.style.contain = "layout paint", y.style.pointerEvents = "none";
859
+ prepare: (u) => {
860
+ x(u, h), u.style.zIndex = d ? "-1" : "1", u.style.willChange = "transform", u.style.backfaceVisibility = "hidden", u.style.contain = "layout paint", u.style.pointerEvents = "none";
861
861
  }
862
862
  })
863
863
  };
@@ -994,8 +994,8 @@ const Tt = (t) => t.reduce((n, a) => n + a, 0), Vt = (t = {}) => {
994
994
  x(e, c), e.style.opacity = "1";
995
995
  },
996
996
  tick: (e) => {
997
- const p = Math.max(0, e - Ct);
998
- i.style.opacity = String(p);
997
+ const h = Math.max(0, e - Ct);
998
+ i.style.opacity = String(h);
999
999
  },
1000
1000
  onEnd: () => {
1001
1001
  i.style.opacity = o;
@@ -1004,16 +1004,16 @@ const Tt = (t) => t.reduce((n, a) => n + a, 0), Vt = (t = {}) => {
1004
1004
  },
1005
1005
  in: (i) => {
1006
1006
  let c = null, o = null, e = null;
1007
- const p = document.body.style.overflow, y = document.getElementById(
1007
+ const h = document.body.style.overflow, u = document.getElementById(
1008
1008
  D
1009
1009
  );
1010
- let h = [];
1011
- const g = () => {
1012
- c = document.createElement("div"), c.id = D, Object.assign(c.style, wt, { background: n }), document.body.appendChild(c), o = document.createElement("div"), Object.assign(o.style, xt), c.appendChild(o), e = document.createElement("div"), Object.assign(e.style, bt), o.appendChild(e), a.forEach((u) => {
1010
+ let p = [];
1011
+ const y = () => {
1012
+ c = document.createElement("div"), c.id = D, Object.assign(c.style, wt, { background: n }), document.body.appendChild(c), o = document.createElement("div"), Object.assign(o.style, xt), c.appendChild(o), e = document.createElement("div"), Object.assign(e.style, bt), o.appendChild(e), a.forEach((g) => {
1013
1013
  const m = document.createElement("div");
1014
- m.textContent = u, Object.assign(m.style, Et, l), e.appendChild(m);
1015
- }), h = Array.from(e.children).map(
1016
- (u) => u.getBoundingClientRect().width
1014
+ m.textContent = g, Object.assign(m.style, Et, l), e.appendChild(m);
1015
+ }), p = Array.from(e.children).map(
1016
+ (g) => g.getBoundingClientRect().width
1017
1017
  );
1018
1018
  };
1019
1019
  return {
@@ -1021,28 +1021,28 @@ const Tt = (t) => t.reduce((n, a) => n + a, 0), Vt = (t = {}) => {
1021
1021
  from: 0,
1022
1022
  to: 1,
1023
1023
  prepare: () => {
1024
- document.body.style.overflow = "hidden", i.style.opacity = "1", y == null || y.remove(), g(), c && o && (c.style.clipPath = "none", o.style.transform = "scale(1)");
1024
+ document.body.style.overflow = "hidden", i.style.opacity = "1", u == null || u.remove(), y(), c && o && (c.style.clipPath = "none", o.style.transform = "scale(1)");
1025
1025
  },
1026
- tick: (u) => {
1026
+ tick: (g) => {
1027
1027
  if (!(!c || !o || !e)) {
1028
- if (u <= A && a.length > 0) {
1029
- const m = u / A, f = Math.min(
1028
+ if (g <= A && a.length > 0) {
1029
+ const m = g / A, f = Math.min(
1030
1030
  Math.floor(m * a.length),
1031
1031
  a.length - 1
1032
- ), w = h[f] ?? 0, $ = Tt(h.slice(0, f));
1032
+ ), w = p[f] ?? 0, $ = Tt(p.slice(0, f));
1033
1033
  o.style.width = `${w}px`, e.style.transform = `translateX(-${$}px)`;
1034
1034
  }
1035
- if (u > A) {
1035
+ if (g > A) {
1036
1036
  const f = 1 - Math.max(
1037
1037
  0,
1038
- Math.min(1, (u - A) / At)
1038
+ Math.min(1, (g - A) / At)
1039
1039
  );
1040
1040
  c.style.clipPath = Lt(d, f), o.style.transform = `scale(${f})`;
1041
1041
  }
1042
1042
  }
1043
1043
  },
1044
1044
  onEnd: () => {
1045
- c == null || c.remove(), c = o = e = null, document.body.style.overflow = p;
1045
+ c == null || c.remove(), c = o = e = null, document.body.style.overflow = h;
1046
1046
  }
1047
1047
  };
1048
1048
  }