@moises.ai/design-system 3.3.8 → 3.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +299 -272
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ var rc = [" ", "Enter", "ArrowUp", "ArrowDown"], ac = [" ", "Enter"], gt = "Sele
27
27
  disabled: p,
28
28
  required: y,
29
29
  form: v
30
- } = n, m = Jn(e), [k, b] = d.useState(null), [S, I] = d.useState(null), [R, E] = d.useState(!1), w = Ur(u), [T, Q] = bn({
30
+ } = n, m = Jn(e), [k, b] = d.useState(null), [R, S] = d.useState(null), [I, E] = d.useState(!1), w = Ur(u), [T, Q] = bn({
31
31
  prop: s,
32
32
  defaultProp: r ?? !1,
33
33
  onChange: o,
@@ -45,9 +45,9 @@ var rc = [" ", "Enter", "ArrowUp", "ArrowDown"], ac = [" ", "Enter"], gt = "Sele
45
45
  scope: e,
46
46
  trigger: k,
47
47
  onTriggerChange: b,
48
- valueNode: S,
49
- onValueNodeChange: I,
50
- valueNodeHasChildren: R,
48
+ valueNode: R,
49
+ onValueNodeChange: S,
50
+ valueNodeHasChildren: I,
51
51
  onValueNodeHasChildrenChange: E,
52
52
  contentId: bs(),
53
53
  value: D,
@@ -101,8 +101,8 @@ sa.displayName = gt;
101
101
  var ra = "SelectTrigger", aa = d.forwardRef(
102
102
  (n, e) => {
103
103
  const { __scopeSelect: t, disabled: s = !1, ...r } = n, o = Jn(t), i = _e(ra, t), l = i.disabled || s, c = Ce(e, i.onTriggerChange), u = xn(t), h = d.useRef("touch"), [A, p, y] = wa((m) => {
104
- const k = u().filter((I) => !I.disabled), b = k.find((I) => I.value === i.value), S = Na(k, m, b);
105
- S !== void 0 && i.onValueChange(S.value);
104
+ const k = u().filter((S) => !S.disabled), b = k.find((S) => S.value === i.value), R = Na(k, m, b);
105
+ R !== void 0 && i.onValueChange(R.value);
106
106
  }), v = (m) => {
107
107
  l || (i.onOpenChange(!0), y()), m && (i.triggerPointerDownPosRef.current = {
108
108
  x: Math.round(m.pageX),
@@ -206,12 +206,12 @@ var Ue = 10, [ua, $e] = Ut(mt), Ac = "SelectContentImpl", hc = bi("SelectContent
206
206
  avoidCollisions: k,
207
207
  //
208
208
  ...b
209
- } = n, S = _e(mt, t), [I, R] = d.useState(null), [E, w] = d.useState(null), T = Ce(e, (q) => R(q)), [Q, D] = d.useState(null), [O, z] = d.useState(
209
+ } = n, R = _e(mt, t), [S, I] = d.useState(null), [E, w] = d.useState(null), T = Ce(e, (q) => I(q)), [Q, D] = d.useState(null), [O, z] = d.useState(
210
210
  null
211
211
  ), j = xn(t), [B, N] = d.useState(!1), U = d.useRef(!1);
212
212
  d.useEffect(() => {
213
- if (I) return fi(I);
214
- }, [I]), vi();
213
+ if (S) return fi(S);
214
+ }, [S]), vi();
215
215
  const W = d.useCallback(
216
216
  (q) => {
217
217
  const [ie, ...Ee] = j().map((te) => te.ref.current), [oe] = Ee.slice(-1), ee = document.activeElement;
@@ -220,15 +220,15 @@ var Ue = 10, [ua, $e] = Ut(mt), Ac = "SelectContentImpl", hc = bi("SelectContent
220
220
  },
221
221
  [j, E]
222
222
  ), L = d.useCallback(
223
- () => W([Q, I]),
224
- [W, Q, I]
223
+ () => W([Q, S]),
224
+ [W, Q, S]
225
225
  );
226
226
  d.useEffect(() => {
227
227
  B && L();
228
228
  }, [B, L]);
229
- const { onOpenChange: F, triggerPointerDownPosRef: H } = S;
229
+ const { onOpenChange: F, triggerPointerDownPosRef: H } = R;
230
230
  d.useEffect(() => {
231
- if (I) {
231
+ if (S) {
232
232
  let q = { x: 0, y: 0 };
233
233
  const ie = (oe) => {
234
234
  var ee, te;
@@ -237,13 +237,13 @@ var Ue = 10, [ua, $e] = Ut(mt), Ac = "SelectContentImpl", hc = bi("SelectContent
237
237
  y: Math.abs(Math.round(oe.pageY) - (((te = H.current) == null ? void 0 : te.y) ?? 0))
238
238
  };
239
239
  }, Ee = (oe) => {
240
- q.x <= 10 && q.y <= 10 ? oe.preventDefault() : I.contains(oe.target) || F(!1), document.removeEventListener("pointermove", ie), H.current = null;
240
+ q.x <= 10 && q.y <= 10 ? oe.preventDefault() : S.contains(oe.target) || F(!1), document.removeEventListener("pointermove", ie), H.current = null;
241
241
  };
242
242
  return H.current !== null && (document.addEventListener("pointermove", ie), document.addEventListener("pointerup", Ee, { capture: !0, once: !0 })), () => {
243
243
  document.removeEventListener("pointermove", ie), document.removeEventListener("pointerup", Ee, { capture: !0 });
244
244
  };
245
245
  }
246
- }, [I, F, H]), d.useEffect(() => {
246
+ }, [S, F, H]), d.useEffect(() => {
247
247
  const q = () => F(!1);
248
248
  return window.addEventListener("blur", q), window.addEventListener("resize", q), () => {
249
249
  window.removeEventListener("blur", q), window.removeEventListener("resize", q);
@@ -255,15 +255,15 @@ var Ue = 10, [ua, $e] = Ut(mt), Ac = "SelectContentImpl", hc = bi("SelectContent
255
255
  }), Ht = d.useCallback(
256
256
  (q, ie, Ee) => {
257
257
  const oe = !U.current && !Ee;
258
- (S.value !== void 0 && S.value === ie || oe) && (D(q), oe && (U.current = !0));
258
+ (R.value !== void 0 && R.value === ie || oe) && (D(q), oe && (U.current = !0));
259
259
  },
260
- [S.value]
261
- ), Wn = d.useCallback(() => I == null ? void 0 : I.focus(), [I]), bt = d.useCallback(
260
+ [R.value]
261
+ ), Wn = d.useCallback(() => S == null ? void 0 : S.focus(), [S]), bt = d.useCallback(
262
262
  (q, ie, Ee) => {
263
263
  const oe = !U.current && !Ee;
264
- (S.value !== void 0 && S.value === ie || oe) && z(q);
264
+ (R.value !== void 0 && R.value === ie || oe) && z(q);
265
265
  },
266
- [S.value]
266
+ [R.value]
267
267
  ), dn = s === "popper" ? ls : ha, Mt = dn === ls ? {
268
268
  side: l,
269
269
  sideOffset: c,
@@ -280,7 +280,7 @@ var Ue = 10, [ua, $e] = Ut(mt), Ac = "SelectContentImpl", hc = bi("SelectContent
280
280
  ua,
281
281
  {
282
282
  scope: t,
283
- content: I,
283
+ content: S,
284
284
  viewport: E,
285
285
  onViewportChange: w,
286
286
  itemRefCallback: Ht,
@@ -296,13 +296,13 @@ var Ue = 10, [ua, $e] = Ut(mt), Ac = "SelectContentImpl", hc = bi("SelectContent
296
296
  yi,
297
297
  {
298
298
  asChild: !0,
299
- trapped: S.open,
299
+ trapped: R.open,
300
300
  onMountAutoFocus: (q) => {
301
301
  q.preventDefault();
302
302
  },
303
303
  onUnmountAutoFocus: ae(r, (q) => {
304
304
  var ie;
305
- (ie = S.trigger) == null || ie.focus({ preventScroll: !0 }), q.preventDefault();
305
+ (ie = R.trigger) == null || ie.focus({ preventScroll: !0 }), q.preventDefault();
306
306
  }),
307
307
  children: /* @__PURE__ */ a(
308
308
  ki,
@@ -312,14 +312,14 @@ var Ue = 10, [ua, $e] = Ut(mt), Ac = "SelectContentImpl", hc = bi("SelectContent
312
312
  onEscapeKeyDown: o,
313
313
  onPointerDownOutside: i,
314
314
  onFocusOutside: (q) => q.preventDefault(),
315
- onDismiss: () => S.onOpenChange(!1),
315
+ onDismiss: () => R.onOpenChange(!1),
316
316
  children: /* @__PURE__ */ a(
317
317
  dn,
318
318
  {
319
319
  role: "listbox",
320
- id: S.contentId,
321
- "data-state": S.open ? "open" : "closed",
322
- dir: S.dir,
320
+ id: R.contentId,
321
+ "data-state": R.open ? "open" : "closed",
322
+ dir: R.dir,
323
323
  onContextMenu: (q) => q.preventDefault(),
324
324
  ...b,
325
325
  ...Mt,
@@ -356,7 +356,7 @@ var Ue = 10, [ua, $e] = Ut(mt), Ac = "SelectContentImpl", hc = bi("SelectContent
356
356
  );
357
357
  Aa.displayName = Ac;
358
358
  var pc = "SelectItemAlignedPosition", ha = d.forwardRef((n, e) => {
359
- const { __scopeSelect: t, onPlaced: s, ...r } = n, o = _e(mt, t), i = $e(mt, t), [l, c] = d.useState(null), [u, h] = d.useState(null), A = Ce(e, (T) => h(T)), p = xn(t), y = d.useRef(!1), v = d.useRef(!0), { viewport: m, selectedItem: k, selectedItemText: b, focusSelectedItem: S } = i, I = d.useCallback(() => {
359
+ const { __scopeSelect: t, onPlaced: s, ...r } = n, o = _e(mt, t), i = $e(mt, t), [l, c] = d.useState(null), [u, h] = d.useState(null), A = Ce(e, (T) => h(T)), p = xn(t), y = d.useRef(!1), v = d.useRef(!0), { viewport: m, selectedItem: k, selectedItemText: b, focusSelectedItem: R } = i, S = d.useCallback(() => {
360
360
  if (o.trigger && o.valueNode && l && u && m && k && b) {
361
361
  const T = o.trigger.getBoundingClientRect(), Q = u.getBoundingClientRect(), D = o.valueNode.getBoundingClientRect(), O = b.getBoundingClientRect();
362
362
  if (o.dir !== "rtl") {
@@ -411,16 +411,16 @@ var pc = "SelectItemAlignedPosition", ha = d.forwardRef((n, e) => {
411
411
  o.dir,
412
412
  s
413
413
  ]);
414
- Xe(() => I(), [I]);
415
- const [R, E] = d.useState();
414
+ Xe(() => S(), [S]);
415
+ const [I, E] = d.useState();
416
416
  Xe(() => {
417
417
  u && E(window.getComputedStyle(u).zIndex);
418
418
  }, [u]);
419
419
  const w = d.useCallback(
420
420
  (T) => {
421
- T && v.current === !0 && (I(), S == null || S(), v.current = !1);
421
+ T && v.current === !0 && (S(), R == null || R(), v.current = !1);
422
422
  },
423
- [I, S]
423
+ [S, R]
424
424
  );
425
425
  return /* @__PURE__ */ a(
426
426
  mc,
@@ -437,7 +437,7 @@ var pc = "SelectItemAlignedPosition", ha = d.forwardRef((n, e) => {
437
437
  display: "flex",
438
438
  flexDirection: "column",
439
439
  position: "fixed",
440
- zIndex: R
440
+ zIndex: I
441
441
  },
442
442
  children: /* @__PURE__ */ a(
443
443
  pe.div,
@@ -529,8 +529,8 @@ var [mc, Ts] = Ut(mt, {}), cs = "SelectViewport", pa = d.forwardRef(
529
529
  if (y > 0) {
530
530
  const v = window.innerHeight - Ue * 2, m = parseFloat(A.style.minHeight), k = parseFloat(A.style.height), b = Math.max(m, k);
531
531
  if (b < v) {
532
- const S = b + y, I = Math.min(v, S), R = S - I;
533
- A.style.height = I + "px", A.style.bottom === "0px" && (h.scrollTop = R > 0 ? R : 0, A.style.justifyContent = "flex-end");
532
+ const R = b + y, S = Math.min(v, R), I = R - S;
533
+ A.style.height = S + "px", A.style.bottom === "0px" && (h.scrollTop = I > 0 ? I : 0, A.style.justifyContent = "flex-end");
534
534
  }
535
535
  }
536
536
  }
@@ -566,9 +566,9 @@ var Sn = "SelectItem", [Cc, Ca] = Ut(Sn), ya = d.forwardRef(
566
566
  ...i
567
567
  } = n, l = _e(Sn, t), c = $e(Sn, t), u = l.value === s, [h, A] = d.useState(o ?? ""), [p, y] = d.useState(!1), v = Ce(
568
568
  e,
569
- (S) => {
570
- var I;
571
- return (I = c.itemRefCallback) == null ? void 0 : I.call(c, S, s, r);
569
+ (R) => {
570
+ var S;
571
+ return (S = c.itemRefCallback) == null ? void 0 : S.call(c, R, s, r);
572
572
  }
573
573
  ), m = bs(), k = d.useRef("touch"), b = () => {
574
574
  r || (l.onValueChange(s), l.onOpenChange(!1));
@@ -585,8 +585,8 @@ var Sn = "SelectItem", [Cc, Ca] = Ut(Sn), ya = d.forwardRef(
585
585
  disabled: r,
586
586
  textId: m,
587
587
  isSelected: u,
588
- onItemTextChange: d.useCallback((S) => {
589
- A((I) => I || ((S == null ? void 0 : S.textContent) ?? "").trim());
588
+ onItemTextChange: d.useCallback((R) => {
589
+ A((S) => S || ((R == null ? void 0 : R.textContent) ?? "").trim());
590
590
  }, []),
591
591
  children: /* @__PURE__ */ a(
592
592
  Tn.ItemSlot,
@@ -616,20 +616,20 @@ var Sn = "SelectItem", [Cc, Ca] = Ut(Sn), ya = d.forwardRef(
616
616
  onPointerUp: ae(i.onPointerUp, () => {
617
617
  k.current === "mouse" && b();
618
618
  }),
619
- onPointerDown: ae(i.onPointerDown, (S) => {
620
- k.current = S.pointerType;
619
+ onPointerDown: ae(i.onPointerDown, (R) => {
620
+ k.current = R.pointerType;
621
621
  }),
622
- onPointerMove: ae(i.onPointerMove, (S) => {
623
- var I;
624
- k.current = S.pointerType, r ? (I = c.onItemLeave) == null || I.call(c) : k.current === "mouse" && S.currentTarget.focus({ preventScroll: !0 });
622
+ onPointerMove: ae(i.onPointerMove, (R) => {
623
+ var S;
624
+ k.current = R.pointerType, r ? (S = c.onItemLeave) == null || S.call(c) : k.current === "mouse" && R.currentTarget.focus({ preventScroll: !0 });
625
625
  }),
626
- onPointerLeave: ae(i.onPointerLeave, (S) => {
627
- var I;
628
- S.currentTarget === document.activeElement && ((I = c.onItemLeave) == null || I.call(c));
626
+ onPointerLeave: ae(i.onPointerLeave, (R) => {
627
+ var S;
628
+ R.currentTarget === document.activeElement && ((S = c.onItemLeave) == null || S.call(c));
629
629
  }),
630
- onKeyDown: ae(i.onKeyDown, (S) => {
631
- var R;
632
- ((R = c.searchRef) == null ? void 0 : R.current) !== "" && S.key === " " || (ac.includes(S.key) && b(), S.key === " " && S.preventDefault());
630
+ onKeyDown: ae(i.onKeyDown, (R) => {
631
+ var I;
632
+ ((I = c.searchRef) == null ? void 0 : I.current) !== "" && R.key === " " || (ac.includes(R.key) && b(), R.key === " " && R.preventDefault());
633
633
  })
634
634
  }
635
635
  )
@@ -647,8 +647,8 @@ var Yt = "SelectItemText", ka = d.forwardRef(
647
647
  (b) => A(b),
648
648
  c.onItemTextChange,
649
649
  (b) => {
650
- var S;
651
- return (S = l.itemTextRefCallback) == null ? void 0 : S.call(l, b, c.value, c.disabled);
650
+ var R;
651
+ return (R = l.itemTextRefCallback) == null ? void 0 : R.call(l, b, c.value, c.disabled);
652
652
  }
653
653
  ), y = h == null ? void 0 : h.textContent, v = d.useMemo(
654
654
  () => /* @__PURE__ */ a("option", { value: c.value, disabled: c.disabled, children: y }, c.value),
@@ -838,16 +838,16 @@ var Ec = sa, Bc = aa, wc = ia, Nc = la, Tc = ca, xc = da, Jc = pa, Uc = ma, Dc =
838
838
  inverted: y = !1,
839
839
  form: v,
840
840
  ...m
841
- } = n, k = d.useRef(/* @__PURE__ */ new Set()), b = d.useRef(0), I = i === "horizontal" ? Vc : Wc, [R = [], E] = bn({
841
+ } = n, k = d.useRef(/* @__PURE__ */ new Set()), b = d.useRef(0), S = i === "horizontal" ? Vc : Wc, [I = [], E] = bn({
842
842
  prop: h,
843
843
  defaultProp: u,
844
844
  onChange: (z) => {
845
845
  var B;
846
846
  (B = [...k.current][b.current]) == null || B.focus(), A(z);
847
847
  }
848
- }), w = d.useRef(R);
848
+ }), w = d.useRef(I);
849
849
  function T(z) {
850
- const j = Gc(R, z);
850
+ const j = Gc(I, z);
851
851
  O(z, j);
852
852
  }
853
853
  function Q(z) {
@@ -855,7 +855,7 @@ var Ec = sa, Bc = aa, wc = ia, Nc = la, Tc = ca, xc = da, Jc = pa, Uc = ma, Dc =
855
855
  }
856
856
  function D() {
857
857
  const z = w.current[b.current];
858
- R[b.current] !== z && p(R);
858
+ I[b.current] !== z && p(I);
859
859
  }
860
860
  function O(z, j, { commit: B } = { commit: !1 }) {
861
861
  const N = _c(o), U = $c(Math.round((z - s) / o) * o + s, N), W = In(U, [s, r]);
@@ -879,18 +879,18 @@ var Ec = sa, Bc = aa, wc = ia, Nc = la, Tc = ca, xc = da, Jc = pa, Uc = ma, Dc =
879
879
  max: r,
880
880
  valueIndexToChangeRef: b,
881
881
  thumbs: k.current,
882
- values: R,
882
+ values: I,
883
883
  orientation: i,
884
884
  form: v,
885
885
  children: /* @__PURE__ */ a(hs.Provider, { scope: n.__scopeSlider, children: /* @__PURE__ */ a(hs.Slot, { scope: n.__scopeSlider, children: /* @__PURE__ */ a(
886
- I,
886
+ S,
887
887
  {
888
888
  "aria-disabled": l,
889
889
  "data-disabled": l ? "" : void 0,
890
890
  ...m,
891
891
  ref: e,
892
892
  onPointerDown: ae(m.onPointerDown, () => {
893
- l || (w.current = R);
893
+ l || (w.current = I);
894
894
  }),
895
895
  min: s,
896
896
  max: r,
@@ -899,10 +899,10 @@ var Ec = sa, Bc = aa, wc = ia, Nc = la, Tc = ca, xc = da, Jc = pa, Uc = ma, Dc =
899
899
  onSlideMove: l ? void 0 : Q,
900
900
  onSlideEnd: l ? void 0 : D,
901
901
  onHomeKeyDown: () => !l && O(s, 0, { commit: !0 }),
902
- onEndKeyDown: () => !l && O(r, R.length - 1, { commit: !0 }),
902
+ onEndKeyDown: () => !l && O(r, I.length - 1, { commit: !0 }),
903
903
  onStepKeyDown: ({ event: z, direction: j }) => {
904
904
  if (!l) {
905
- const U = Ta.includes(z.key) || z.shiftKey && xa.includes(z.key) ? 10 : 1, W = b.current, L = R[W], F = o * U * j;
905
+ const U = Ta.includes(z.key) || z.shiftKey && xa.includes(z.key) ? 10 : 1, W = b.current, L = I[W], F = o * U * j;
906
906
  O(L + F, W, { commit: !0 });
907
907
  }
908
908
  }
@@ -930,10 +930,10 @@ var [Oa, Qa] = Ua(Dt, {
930
930
  onSlideEnd: c,
931
931
  onStepKeyDown: u,
932
932
  ...h
933
- } = n, [A, p] = d.useState(null), y = Ce(e, (I) => p(I)), v = d.useRef(void 0), m = Ur(r), k = m === "ltr", b = k && !o || !k && o;
934
- function S(I) {
935
- const R = v.current || A.getBoundingClientRect(), E = [0, R.width], T = xs(E, b ? [t, s] : [s, t]);
936
- return v.current = R, T(I - R.left);
933
+ } = n, [A, p] = d.useState(null), y = Ce(e, (S) => p(S)), v = d.useRef(void 0), m = Ur(r), k = m === "ltr", b = k && !o || !k && o;
934
+ function R(S) {
935
+ const I = v.current || A.getBoundingClientRect(), E = [0, I.width], T = xs(E, b ? [t, s] : [s, t]);
936
+ return v.current = I, T(S - I.left);
937
937
  }
938
938
  return /* @__PURE__ */ a(
939
939
  Oa,
@@ -954,20 +954,20 @@ var [Oa, Qa] = Ua(Dt, {
954
954
  ...h.style,
955
955
  "--radix-slider-thumb-transform": "translateX(-50%)"
956
956
  },
957
- onSlideStart: (I) => {
958
- const R = S(I.clientX);
959
- i == null || i(R);
957
+ onSlideStart: (S) => {
958
+ const I = R(S.clientX);
959
+ i == null || i(I);
960
960
  },
961
- onSlideMove: (I) => {
962
- const R = S(I.clientX);
963
- l == null || l(R);
961
+ onSlideMove: (S) => {
962
+ const I = R(S.clientX);
963
+ l == null || l(I);
964
964
  },
965
965
  onSlideEnd: () => {
966
966
  v.current = void 0, c == null || c();
967
967
  },
968
- onStepKeyDown: (I) => {
969
- const E = Ja[b ? "from-left" : "from-right"].includes(I.key);
970
- u == null || u({ event: I, direction: E ? -1 : 1 });
968
+ onStepKeyDown: (S) => {
969
+ const E = Ja[b ? "from-left" : "from-right"].includes(S.key);
970
+ u == null || u({ event: S, direction: E ? -1 : 1 });
971
971
  }
972
972
  }
973
973
  )
@@ -987,8 +987,8 @@ var [Oa, Qa] = Ua(Dt, {
987
987
  ...u
988
988
  } = n, h = d.useRef(null), A = Ce(e, h), p = d.useRef(void 0), y = !r;
989
989
  function v(m) {
990
- const k = p.current || h.current.getBoundingClientRect(), b = [0, k.height], I = xs(b, y ? [s, t] : [t, s]);
991
- return p.current = k, I(m - k.top);
990
+ const k = p.current || h.current.getBoundingClientRect(), b = [0, k.height], S = xs(b, y ? [s, t] : [t, s]);
991
+ return p.current = k, S(m - k.top);
992
992
  }
993
993
  return /* @__PURE__ */ a(
994
994
  Oa,
@@ -1109,7 +1109,7 @@ var gs = "SliderThumb", Pa = d.forwardRef(
1109
1109
  }
1110
1110
  ), qc = d.forwardRef(
1111
1111
  (n, e) => {
1112
- const { __scopeSlider: t, index: s, name: r, ...o } = n, i = Un(gs, t), l = Qa(gs, t), [c, u] = d.useState(null), h = Ce(e, (S) => u(S)), A = c ? i.form || !!c.closest("form") : !0, p = Ri(c), y = i.values[s], v = y === void 0 ? 0 : Wa(y, i.min, i.max), m = Kc(s, i.values.length), k = p == null ? void 0 : p[l.size], b = k ? Xc(k, v, l.direction) : 0;
1112
+ const { __scopeSlider: t, index: s, name: r, ...o } = n, i = Un(gs, t), l = Qa(gs, t), [c, u] = d.useState(null), h = Ce(e, (R) => u(R)), A = c ? i.form || !!c.closest("form") : !0, p = Ri(c), y = i.values[s], v = y === void 0 ? 0 : Wa(y, i.min, i.max), m = Kc(s, i.values.length), k = p == null ? void 0 : p[l.size], b = k ? Xc(k, v, l.direction) : 0;
1113
1113
  return d.useEffect(() => {
1114
1114
  if (c)
1115
1115
  return i.thumbs.add(c), () => {
@@ -1420,15 +1420,15 @@ const $a = d.forwardRef((n, e) => {
1420
1420
  d.useEffect(() => m(r), [r]);
1421
1421
  const [k, b] = d.useState(o);
1422
1422
  d.useEffect(() => b(o), [o]);
1423
- const [S, I] = d.useState(i);
1424
- d.useEffect(() => I(i), [i]);
1425
- const [R, E] = d.useState(l);
1426
- return d.useEffect(() => E(l), [l]), d.createElement(Os, { ...u, ref: e, isRoot: !0, hasBackground: c, appearance: h, accentColor: p, grayColor: v, panelBackground: k, radius: S, scaling: R, onAppearanceChange: A, onAccentColorChange: y, onGrayColorChange: m, onPanelBackgroundChange: b, onRadiusChange: I, onScalingChange: E });
1423
+ const [R, S] = d.useState(i);
1424
+ d.useEffect(() => S(i), [i]);
1425
+ const [I, E] = d.useState(l);
1426
+ return d.useEffect(() => E(l), [l]), d.createElement(Os, { ...u, ref: e, isRoot: !0, hasBackground: c, appearance: h, accentColor: p, grayColor: v, panelBackground: k, radius: R, scaling: I, onAppearanceChange: A, onAccentColorChange: y, onGrayColorChange: m, onPanelBackgroundChange: b, onRadiusChange: S, onScalingChange: E });
1427
1427
  });
1428
1428
  $a.displayName = "ThemeRoot";
1429
1429
  const Os = d.forwardRef((n, e) => {
1430
- const t = d.useContext(Rn), { asChild: s, isRoot: r, hasBackground: o, appearance: i = (t == null ? void 0 : t.appearance) ?? we.appearance.default, accentColor: l = (t == null ? void 0 : t.accentColor) ?? we.accentColor.default, grayColor: c = (t == null ? void 0 : t.resolvedGrayColor) ?? we.grayColor.default, panelBackground: u = (t == null ? void 0 : t.panelBackground) ?? we.panelBackground.default, radius: h = (t == null ? void 0 : t.radius) ?? we.radius.default, scaling: A = (t == null ? void 0 : t.scaling) ?? we.scaling.default, onAppearanceChange: p = It, onAccentColorChange: y = It, onGrayColorChange: v = It, onPanelBackgroundChange: m = It, onRadiusChange: k = It, onScalingChange: b = It, ...S } = n, I = s ? ge : "div", R = c === "auto" ? pd(l) : c, E = n.appearance === "light" || n.appearance === "dark", w = o === void 0 ? r || E : o;
1431
- return d.createElement(Rn.Provider, { value: d.useMemo(() => ({ appearance: i, accentColor: l, grayColor: c, resolvedGrayColor: R, panelBackground: u, radius: h, scaling: A, onAppearanceChange: p, onAccentColorChange: y, onGrayColorChange: v, onPanelBackgroundChange: m, onRadiusChange: k, onScalingChange: b }), [i, l, c, R, u, h, A, p, y, v, m, k, b]) }, d.createElement(I, { "data-is-root-theme": r ? "true" : "false", "data-accent-color": l, "data-gray-color": R, "data-has-background": w ? "true" : "false", "data-panel-background": u, "data-radius": h, "data-scaling": A, ref: e, ...S, className: f("radix-themes", { light: i === "light", dark: i === "dark" }, S.className) }));
1430
+ const t = d.useContext(Rn), { asChild: s, isRoot: r, hasBackground: o, appearance: i = (t == null ? void 0 : t.appearance) ?? we.appearance.default, accentColor: l = (t == null ? void 0 : t.accentColor) ?? we.accentColor.default, grayColor: c = (t == null ? void 0 : t.resolvedGrayColor) ?? we.grayColor.default, panelBackground: u = (t == null ? void 0 : t.panelBackground) ?? we.panelBackground.default, radius: h = (t == null ? void 0 : t.radius) ?? we.radius.default, scaling: A = (t == null ? void 0 : t.scaling) ?? we.scaling.default, onAppearanceChange: p = It, onAccentColorChange: y = It, onGrayColorChange: v = It, onPanelBackgroundChange: m = It, onRadiusChange: k = It, onScalingChange: b = It, ...R } = n, S = s ? ge : "div", I = c === "auto" ? pd(l) : c, E = n.appearance === "light" || n.appearance === "dark", w = o === void 0 ? r || E : o;
1431
+ return d.createElement(Rn.Provider, { value: d.useMemo(() => ({ appearance: i, accentColor: l, grayColor: c, resolvedGrayColor: I, panelBackground: u, radius: h, scaling: A, onAppearanceChange: p, onAccentColorChange: y, onGrayColorChange: v, onPanelBackgroundChange: m, onRadiusChange: k, onScalingChange: b }), [i, l, c, I, u, h, A, p, y, v, m, k, b]) }, d.createElement(S, { "data-is-root-theme": r ? "true" : "false", "data-accent-color": l, "data-gray-color": I, "data-has-background": w ? "true" : "false", "data-panel-background": u, "data-radius": h, "data-scaling": A, ref: e, ...R, className: f("radix-themes", { light: i === "light", dark: i === "dark" }, R.className) }));
1432
1432
  });
1433
1433
  Os.displayName = "ThemeImpl";
1434
1434
  const tt = (n) => {
@@ -1912,13 +1912,13 @@ const KA = "_sliderRoot_7wkh4_23", GA = "_sliderTrack_7wkh4_31", XA = "_sliderRa
1912
1912
  tooltipArrow: _A,
1913
1913
  sliderContainer: $A
1914
1914
  }, qo = ({ onChangeValue: n, volume: e, disabled: t }) => {
1915
- const [s, r] = G(!1), o = ye(), i = ye(0), l = x((R) => {
1916
- if (R < 1e-3) return -1 / 0;
1917
- const E = 20 * Math.log10(R);
1915
+ const [s, r] = G(!1), o = ye(), i = ye(0), l = x((I) => {
1916
+ if (I < 1e-3) return -1 / 0;
1917
+ const E = 20 * Math.log10(I);
1918
1918
  return E < -60 ? -60 : E;
1919
- }, []), c = x((R) => R === -1 / 0 || R <= -60 ? 0 : Math.pow(10, R / 20), []), u = Y(() => {
1920
- const R = l(e);
1921
- return R === -1 / 0 ? -60 : Math.max(-60, Math.min(6, R));
1919
+ }, []), c = x((I) => I === -1 / 0 || I <= -60 ? 0 : Math.pow(10, I / 20), []), u = Y(() => {
1920
+ const I = l(e);
1921
+ return I === -1 / 0 ? -60 : Math.max(-60, Math.min(6, I));
1922
1922
  }, [e, l]), h = Y(() => e < 1e-3, [e]), A = x(() => {
1923
1923
  clearTimeout(o.current), r(!0);
1924
1924
  }, []), p = x(() => {
@@ -1926,13 +1926,13 @@ const KA = "_sliderRoot_7wkh4_23", GA = "_sliderTrack_7wkh4_31", XA = "_sliderRa
1926
1926
  r(!1);
1927
1927
  }, 300);
1928
1928
  }, []), y = x(
1929
- (R) => {
1930
- (R.key === "ArrowUp" || R.key === "ArrowDown") && A(), (R.key === "ArrowLeft" || R.key === "ArrowRight") && (R.preventDefault(), R.stopPropagation(), A());
1929
+ (I) => {
1930
+ (I.key === "ArrowUp" || I.key === "ArrowDown") && A(), (I.key === "ArrowLeft" || I.key === "ArrowRight") && (I.preventDefault(), I.stopPropagation(), A());
1931
1931
  },
1932
1932
  [A]
1933
1933
  ), v = x(
1934
- (R) => {
1935
- n(R.map(c));
1934
+ (I) => {
1935
+ n(I.map(c));
1936
1936
  },
1937
1937
  [n, c]
1938
1938
  ), m = x(() => {
@@ -1941,10 +1941,10 @@ const KA = "_sliderRoot_7wkh4_23", GA = "_sliderTrack_7wkh4_31", XA = "_sliderRa
1941
1941
  p();
1942
1942
  }, [p]), b = x(() => {
1943
1943
  n([1]), A();
1944
- }, [n, A]), S = x(() => {
1945
- const R = Date.now();
1946
- R - i.current < 300 && b(), i.current = R;
1947
- }, [b]), I = Y(
1944
+ }, [n, A]), R = x(() => {
1945
+ const I = Date.now();
1946
+ I - i.current < 300 && b(), i.current = I;
1947
+ }, [b]), S = Y(
1948
1948
  () => /* @__PURE__ */ g(he, { children: [
1949
1949
  h ? "-∞ dB" : `${u.toFixed(1)} dB`,
1950
1950
  /* @__PURE__ */ a(ws, { className: ct.tooltipArrow })
@@ -1973,7 +1973,7 @@ const KA = "_sliderRoot_7wkh4_23", GA = "_sliderTrack_7wkh4_31", XA = "_sliderRa
1973
1973
  onPointerDown: m,
1974
1974
  onKeyDown: y,
1975
1975
  onBlur: k,
1976
- onClick: S
1976
+ onClick: R
1977
1977
  }
1978
1978
  ) }),
1979
1979
  /* @__PURE__ */ a(
@@ -1983,7 +1983,7 @@ const KA = "_sliderRoot_7wkh4_23", GA = "_sliderTrack_7wkh4_31", XA = "_sliderRa
1983
1983
  side: "bottom",
1984
1984
  align: "center",
1985
1985
  sideOffset: 10,
1986
- children: I
1986
+ children: S
1987
1987
  }
1988
1988
  )
1989
1989
  ] }) })
@@ -2632,13 +2632,13 @@ const Fp = ({
2632
2632
  size: A = "1",
2633
2633
  ...p
2634
2634
  }) => {
2635
- const y = (o == null ? void 0 : o.id) || r, v = (o == null ? void 0 : o.name) || t, m = (o == null ? void 0 : o.description) || s, k = (o == null ? void 0 : o.image) || e, b = (o == null ? void 0 : o.icon) || l, S = k && (k != null && k.startsWith("url(")) ? k == null ? void 0 : k.substring(4, (k == null ? void 0 : k.length) - 1).replace(/"/g, "") : k, I = (T) => {
2635
+ const y = (o == null ? void 0 : o.id) || r, v = (o == null ? void 0 : o.name) || t, m = (o == null ? void 0 : o.description) || s, k = (o == null ? void 0 : o.image) || e, b = (o == null ? void 0 : o.icon) || l, R = k && (k != null && k.startsWith("url(")) ? k == null ? void 0 : k.substring(4, (k == null ? void 0 : k.length) - 1).replace(/"/g, "") : k, S = (T) => {
2636
2636
  T.stopPropagation(), T.preventDefault(), h == null || h();
2637
- }, R = {
2637
+ }, I = {
2638
2638
  1: { avatar: 60, icon: 15 },
2639
2639
  2: { avatar: 68, icon: 15 },
2640
2640
  3: { avatar: 80, icon: 15 }
2641
- }, E = typeof A == "string" ? parseInt(A, 10) : A, w = R[E] || R[1];
2641
+ }, E = typeof A == "string" ? parseInt(A, 10) : A, w = I[E] || I[1];
2642
2642
  return /* @__PURE__ */ a(
2643
2643
  on,
2644
2644
  {
@@ -2650,7 +2650,7 @@ const Fp = ({
2650
2650
  ),
2651
2651
  style: { "--color-surface": "transparent" },
2652
2652
  "data-state": u ? "checked" : "unchecked",
2653
- onClick: I,
2653
+ onClick: S,
2654
2654
  ...p,
2655
2655
  children: /* @__PURE__ */ g(C, { gap: "2", children: [
2656
2656
  /* @__PURE__ */ a(C, { width: `${w.avatar}px`, height: `${w.avatar}px`, children: i ? /* @__PURE__ */ a(
@@ -2685,7 +2685,7 @@ const Fp = ({
2685
2685
  ) : /* @__PURE__ */ a(
2686
2686
  Ze,
2687
2687
  {
2688
- src: S,
2688
+ src: R,
2689
2689
  className: f(
2690
2690
  $.listCardsAvatar,
2691
2691
  $[`listCardsAvatarSize${A}`]
@@ -3293,25 +3293,25 @@ const Vt = 10, Wt = 10, ut = 9.5, Zn = -Math.PI / 2, Yn = 0.01, mr = (n) => Math
3293
3293
  p.current && (document.head.removeChild(p.current), p.current = null), b(), m.current && cancelAnimationFrame(m.current);
3294
3294
  };
3295
3295
  }, [h, k, b]);
3296
- const S = x(
3296
+ const R = x(
3297
3297
  (B) => {
3298
3298
  v.current = mr(B), !m.current && (m.current = requestAnimationFrame(() => {
3299
3299
  m.current = 0, t(v.current);
3300
3300
  }));
3301
3301
  },
3302
3302
  [t]
3303
- ), I = x(
3303
+ ), S = x(
3304
3304
  (B) => {
3305
3305
  B.preventDefault(), B.stopPropagation();
3306
3306
  const N = B.wheelDelta ?? -B.deltaY * 25;
3307
3307
  if (!N) return;
3308
3308
  const U = e + (N > 0 ? Yn : -Yn);
3309
- S(U);
3309
+ R(U);
3310
3310
  },
3311
- [e, S]
3311
+ [e, R]
3312
3312
  );
3313
- Tt("wheel", I, i);
3314
- const R = x(
3313
+ Tt("wheel", S, i);
3314
+ const I = x(
3315
3315
  (B) => {
3316
3316
  var U;
3317
3317
  if (s) return;
@@ -3324,17 +3324,17 @@ const Vt = 10, Wt = 10, ut = 9.5, Zn = -Math.PI / 2, Yn = 0.01, mr = (n) => Math
3324
3324
  (B) => {
3325
3325
  if (!h) return;
3326
3326
  const N = y.current - B.clientY, U = e + N * Yn;
3327
- S(U), y.current = B.clientY;
3327
+ R(U), y.current = B.clientY;
3328
3328
  },
3329
- [h, e, S]
3329
+ [h, e, R]
3330
3330
  ), w = x((B) => {
3331
3331
  var N, U;
3332
3332
  (U = (N = B.currentTarget) == null ? void 0 : N.releasePointerCapture) == null || U.call(N, B.pointerId), A(!1);
3333
3333
  }, []), T = x(
3334
3334
  (B) => {
3335
- B.detail === 2 && S(0);
3335
+ B.detail === 2 && R(0);
3336
3336
  },
3337
- [S]
3337
+ [R]
3338
3338
  ), { arcPath: Q, pointerRotation: D, arcColor: O, pointerColor: z } = Y(() => {
3339
3339
  const B = fr(e, r, o), N = mr(B), U = Zn + N * Math.PI, W = Vt + ut * Math.cos(Zn), L = Wt + ut * Math.sin(Zn), F = Vt + ut * Math.cos(U), H = Wt + ut * Math.sin(U), _ = 0, Qe = N > 0 ? 1 : 0;
3340
3340
  return {
@@ -3366,7 +3366,7 @@ const Vt = 10, Wt = 10, ut = 9.5, Zn = -Math.PI / 2, Yn = 0.01, mr = (n) => Math
3366
3366
  h && St.active,
3367
3367
  s && St.disabled
3368
3368
  ),
3369
- onPointerDown: R,
3369
+ onPointerDown: I,
3370
3370
  onPointerMove: E,
3371
3371
  onPointerUp: w,
3372
3372
  onPointerCancel: w,
@@ -4297,32 +4297,32 @@ const _m = "_content_1vf1h_1", $m = "_pan_1vf1h_13", ef = "_disabled_1vf1h_26",
4297
4297
  n == null && e(r);
4298
4298
  }, [n, e, r]);
4299
4299
  const p = x(
4300
- (I) => {
4301
- if (I.preventDefault(), I.stopPropagation(), t) return;
4302
- const R = I.wheelDelta ?? -I.deltaY * 25;
4303
- if (!R || Math.abs(R) <= 50) return;
4300
+ (S) => {
4301
+ if (S.preventDefault(), S.stopPropagation(), t) return;
4302
+ const I = S.wheelDelta ?? -S.deltaY * 25;
4303
+ if (!I || Math.abs(I) <= 50) return;
4304
4304
  const E = Date.now();
4305
4305
  if (E - A.current < 100) return;
4306
- const w = R > 0 ? 1 : -1, T = kr(n, s, w);
4306
+ const w = I > 0 ? 1 : -1, T = kr(n, s, w);
4307
4307
  e(T), A.current = E;
4308
4308
  },
4309
4309
  [e, n, s, t]
4310
4310
  ), y = x(
4311
- (I) => {
4311
+ (S) => {
4312
4312
  if (t) {
4313
- I.preventDefault();
4313
+ S.preventDefault();
4314
4314
  return;
4315
4315
  }
4316
- I.preventDefault(), c(!0), h(I.clientY);
4316
+ S.preventDefault(), c(!0), h(S.clientY);
4317
4317
  },
4318
4318
  [t]
4319
4319
  ), v = x(
4320
- (I) => {
4320
+ (S) => {
4321
4321
  if (!l || t) return;
4322
- const R = u - I.clientY;
4323
- if (Math.abs(R) <= 20) return;
4324
- const E = R > 0 ? 1 : -1, w = kr(n, s, E);
4325
- e(w), h(I.clientY), A.current = Date.now();
4322
+ const I = u - S.clientY;
4323
+ if (Math.abs(I) <= 20) return;
4324
+ const E = I > 0 ? 1 : -1, w = kr(n, s, E);
4325
+ e(w), h(S.clientY), A.current = Date.now();
4326
4326
  },
4327
4327
  [l, u, n, e, s, t]
4328
4328
  ), m = x(() => {
@@ -4330,15 +4330,15 @@ const _m = "_content_1vf1h_1", $m = "_pan_1vf1h_13", ef = "_disabled_1vf1h_26",
4330
4330
  }, []), k = x(() => {
4331
4331
  c(!1);
4332
4332
  }, []), b = x(
4333
- (I) => {
4334
- I.detail === 2 && !t && e(r);
4333
+ (S) => {
4334
+ S.detail === 2 && !t && e(r);
4335
4335
  },
4336
4336
  [e, r, t]
4337
- ), S = x(
4338
- (I) => {
4337
+ ), R = x(
4338
+ (S) => {
4339
4339
  if (!o || t) return;
4340
- const R = sf(s, I);
4341
- R && e(R);
4340
+ const I = sf(s, S);
4341
+ I && e(I);
4342
4342
  },
4343
4343
  [o, t, e, s]
4344
4344
  );
@@ -4346,7 +4346,7 @@ const _m = "_content_1vf1h_1", $m = "_pan_1vf1h_13", ef = "_disabled_1vf1h_26",
4346
4346
  containerRef: i,
4347
4347
  isDragging: l,
4348
4348
  handleClick: b,
4349
- handleDotClick: S
4349
+ handleDotClick: R
4350
4350
  };
4351
4351
  }, lf = ({
4352
4352
  className: n,
@@ -4367,8 +4367,8 @@ const _m = "_content_1vf1h_1", $m = "_pan_1vf1h_13", ef = "_disabled_1vf1h_26",
4367
4367
  defaultDot: c,
4368
4368
  clickableDots: r
4369
4369
  }), y = Y(() => typeof e == "object" && e !== null ? e.position : rf(e, o), [e, o]), { pointerRotation: v, pointerColor: m } = Y(() => af(y, s), [y, s]), k = (b) => {
4370
- const S = yr[b.color] || yr.neutral, I = b.position === y, R = i === b.position && r;
4371
- return s ? S.default : I ? S.active : R ? S.hover : S.default;
4370
+ const R = yr[b.color] || yr.neutral, S = b.position === y, I = i === b.position && r;
4371
+ return s ? R.default : S ? R.active : I ? R.hover : R.default;
4372
4372
  };
4373
4373
  return /* @__PURE__ */ a(
4374
4374
  "div",
@@ -4414,15 +4414,15 @@ const _m = "_content_1vf1h_1", $m = "_pan_1vf1h_13", ef = "_disabled_1vf1h_26",
4414
4414
  }
4415
4415
  ),
4416
4416
  o == null ? void 0 : o.map((b) => {
4417
- const S = _o[b.position];
4418
- if (!S) return null;
4419
- const I = k(b), R = r && !s;
4417
+ const R = _o[b.position];
4418
+ if (!R) return null;
4419
+ const S = k(b), I = r && !s;
4420
4420
  return /* @__PURE__ */ g(Ae.Fragment, { children: [
4421
- R && /* @__PURE__ */ a(
4421
+ I && /* @__PURE__ */ a(
4422
4422
  "circle",
4423
4423
  {
4424
- cx: S.x,
4425
- cy: S.y,
4424
+ cx: R.x,
4425
+ cy: R.y,
4426
4426
  r: 4,
4427
4427
  style: {
4428
4428
  cursor: "pointer",
@@ -4438,23 +4438,23 @@ const _m = "_content_1vf1h_1", $m = "_pan_1vf1h_13", ef = "_disabled_1vf1h_26",
4438
4438
  /* @__PURE__ */ a(
4439
4439
  "circle",
4440
4440
  {
4441
- cx: S.x,
4442
- cy: S.y,
4441
+ cx: R.x,
4442
+ cy: R.y,
4443
4443
  r: 1,
4444
- fill: I,
4444
+ fill: S,
4445
4445
  style: {
4446
- cursor: R ? "pointer" : "default",
4446
+ cursor: I ? "pointer" : "default",
4447
4447
  transition: "fill 0.2s ease",
4448
- pointerEvents: R ? "none" : "all"
4448
+ pointerEvents: I ? "none" : "all"
4449
4449
  },
4450
4450
  onMouseEnter: () => {
4451
- R && l(b.position);
4451
+ I && l(b.position);
4452
4452
  },
4453
4453
  onMouseLeave: () => {
4454
- R && l(null);
4454
+ I && l(null);
4455
4455
  },
4456
4456
  onClick: (E) => {
4457
- R && (E.stopPropagation(), p(b.position));
4457
+ I && (E.stopPropagation(), p(b.position));
4458
4458
  }
4459
4459
  }
4460
4460
  )
@@ -4508,21 +4508,21 @@ const uf = "_starButton_azi6g_1", Af = "_disabled_azi6g_17", hf = "_readOnly_azi
4508
4508
  maxLabel: h,
4509
4509
  ...A
4510
4510
  }) => {
4511
- const [p, y] = G(t || 0), [v, m] = G(0), k = e !== void 0 ? e : p, b = e !== void 0, S = x(
4511
+ const [p, y] = G(t || 0), [v, m] = G(0), k = e !== void 0 ? e : p, b = e !== void 0, R = x(
4512
4512
  (w) => {
4513
4513
  if (s || r) return;
4514
4514
  const T = w + 1, Q = T === k ? 0 : T;
4515
4515
  b || y(Q), o == null || o({ value: Q });
4516
4516
  },
4517
4517
  [s, r, b, o, k]
4518
- ), I = x(
4518
+ ), S = x(
4519
4519
  (w) => {
4520
4520
  if (s || r) return;
4521
4521
  const T = w.currentTarget.getBoundingClientRect(), Q = w.clientX - T.left, D = T.width / n, O = Math.floor(Q / D), j = Math.max(0, Math.min(O, n - 1)) + 1;
4522
4522
  j !== v && (m(j), i == null || i({ value: j }));
4523
4523
  },
4524
4524
  [s, r, n, v, i]
4525
- ), R = x(() => {
4525
+ ), I = x(() => {
4526
4526
  s || r || (m(0), i == null || i({ value: 0 }));
4527
4527
  }, [s, r, i]), E = (w) => {
4528
4528
  const T = v > 0 ? w < v : w < k, Q = v > 0 && w < v, D = w < k;
@@ -4537,7 +4537,7 @@ const uf = "_starButton_azi6g_1", Af = "_disabled_azi6g_17", hf = "_readOnly_azi
4537
4537
  [Be.disabled]: s,
4538
4538
  [Be.readOnly]: r
4539
4539
  }),
4540
- onClick: () => S(w),
4540
+ onClick: () => R(w),
4541
4541
  disabled: s || r,
4542
4542
  "aria-label": `Rate ${w + 1} out of ${n}`,
4543
4543
  ...A,
@@ -4567,8 +4567,8 @@ const uf = "_starButton_azi6g_1", Af = "_disabled_azi6g_17", hf = "_readOnly_azi
4567
4567
  className: Be.starsContainer,
4568
4568
  role: "radiogroup",
4569
4569
  "aria-label": `Rating: ${k} out of ${n} stars`,
4570
- onMouseMove: I,
4571
- onMouseLeave: R,
4570
+ onMouseMove: S,
4571
+ onMouseLeave: I,
4572
4572
  children: Array.from({ length: n }, (w, T) => E(T))
4573
4573
  }
4574
4574
  ),
@@ -5196,7 +5196,7 @@ const kn = {
5196
5196
  onAddConditioningAudio: s,
5197
5197
  showConditioningTextPaywall: r,
5198
5198
  showAdvancedControlsPaywall: o,
5199
- i18n: i = { _: (I) => I },
5199
+ i18n: i = { _: (S) => S },
5200
5200
  loading: l,
5201
5201
  onSubmit: c,
5202
5202
  limitReached: u,
@@ -5208,9 +5208,9 @@ const kn = {
5208
5208
  generateFromSelectionTrack: m,
5209
5209
  unmutedTracksCount: k,
5210
5210
  onMountConcurrency: b,
5211
- onClear: S
5211
+ onClear: R
5212
5212
  }) => {
5213
- const [I, R] = G(!1), [E, w] = G("2"), [T, Q] = G(E), { submitted: D, handleSubmit: O } = tr(c), z = Y(() => [
5213
+ const [S, I] = G(!1), [E, w] = G("2"), [T, Q] = G(E), { submitted: D, handleSubmit: O } = tr(c), z = Y(() => [
5214
5214
  { value: "2", label: i._("Presets") },
5215
5215
  { value: "1", label: i._("Custom") }
5216
5216
  ], []), j = Y(() => u || k === 0 || E === "2" && !n.presetId || E === "1" && !n.conditioningText && !n.conditioningAudio, [
@@ -5269,9 +5269,9 @@ const kn = {
5269
5269
  );
5270
5270
  ce(() => {
5271
5271
  if (E !== T) {
5272
- R(!0);
5272
+ I(!0);
5273
5273
  const F = setTimeout(() => {
5274
- Q(E), R(!1);
5274
+ Q(E), I(!1);
5275
5275
  }, kn.timeouts.animationDuration);
5276
5276
  return () => clearTimeout(F);
5277
5277
  }
@@ -5326,7 +5326,7 @@ const kn = {
5326
5326
  top: "130px",
5327
5327
  zIndex: 10,
5328
5328
  backgroundColor: "var(--neutral-2)",
5329
- opacity: I ? 0 : 1,
5329
+ opacity: S ? 0 : 1,
5330
5330
  transition: `opacity ${kn.timeouts.animationDuration}ms ease-in-out`
5331
5331
  }
5332
5332
  }
@@ -5341,7 +5341,7 @@ const kn = {
5341
5341
  style: {
5342
5342
  position: "relative",
5343
5343
  flex: 1,
5344
- opacity: I ? 0 : 1,
5344
+ opacity: S ? 0 : 1,
5345
5345
  transition: `opacity ${kn.timeouts.animationDuration}ms ease-in-out`,
5346
5346
  overflow: "hidden"
5347
5347
  },
@@ -5427,7 +5427,7 @@ const kn = {
5427
5427
  inpaintingTrack: v,
5428
5428
  generateFromSelectionTrack: m,
5429
5429
  unmutedTracksCount: k,
5430
- onClear: S,
5430
+ onClear: R,
5431
5431
  i18n: i
5432
5432
  }
5433
5433
  ) }),
@@ -5453,7 +5453,7 @@ const kn = {
5453
5453
  Te,
5454
5454
  {
5455
5455
  type: "error",
5456
- onClick: S,
5456
+ onClick: R,
5457
5457
  ctaLabel: i._("Clear"),
5458
5458
  showBackground: !1,
5459
5459
  showIcon: !1,
@@ -5529,7 +5529,7 @@ const Ir = {
5529
5529
  showStemsPaywall: y,
5530
5530
  showHiFiSwitch: v
5531
5531
  }) => {
5532
- var R;
5532
+ var I;
5533
5533
  const { submitted: m, handleSubmit: k } = tr(i), b = [
5534
5534
  {
5535
5535
  value: "freeVocalInstruments",
@@ -5641,7 +5641,7 @@ const Ir = {
5641
5641
  name: n._("Other"),
5642
5642
  category: "paid"
5643
5643
  }
5644
- ], S = async (E) => {
5644
+ ], R = async (E) => {
5645
5645
  if (E.isLocked) {
5646
5646
  y(E.value);
5647
5647
  return;
@@ -5659,7 +5659,7 @@ const Ir = {
5659
5659
  }
5660
5660
  return Q.includes("other") && Q.length === 1 ? { ...T, selectedStems: [] } : { ...T, selectedStems: Q };
5661
5661
  });
5662
- }, I = (E) => {
5662
+ }, S = (E) => {
5663
5663
  c((w) => ({
5664
5664
  ...w,
5665
5665
  selectedStems: E.value
@@ -5677,7 +5677,7 @@ const Ir = {
5677
5677
  icon: Ir[E.value]
5678
5678
  })),
5679
5679
  value: l.selectedStems,
5680
- onSelect: I
5680
+ onSelect: S
5681
5681
  }
5682
5682
  ),
5683
5683
  /* @__PURE__ */ a(V, { size: "2", weight: "medium", mt: "2", children: n._("Music Stems") })
@@ -5696,7 +5696,7 @@ const Ir = {
5696
5696
  };
5697
5697
  }),
5698
5698
  value: l.selectedStems,
5699
- onSelect: S,
5699
+ onSelect: R,
5700
5700
  style: {
5701
5701
  marginBottom: "12px"
5702
5702
  }
@@ -5717,7 +5717,7 @@ const Ir = {
5717
5717
  Pn,
5718
5718
  {
5719
5719
  title: n._("Separate Stems"),
5720
- disabled: !((R = l == null ? void 0 : l.selectedStems) != null && R.length) || !(l != null && l.trackName),
5720
+ disabled: !((I = l == null ? void 0 : l.selectedStems) != null && I.length) || !(l != null && l.trackName),
5721
5721
  loading: u,
5722
5722
  onClick: k,
5723
5723
  besideFooter: /* @__PURE__ */ g(C, { align: "center", gap: "2", children: [
@@ -6185,14 +6185,14 @@ class tv extends cn {
6185
6185
  const A = (p) => {
6186
6186
  if (p.button !== o || (c.set(p.pointerId, p), c.size > 1)) return;
6187
6187
  let y = p.clientX, v = p.clientY, m = !1;
6188
- const k = Date.now(), b = t.getBoundingClientRect(), { left: S, top: I } = b, R = (D) => {
6188
+ const k = Date.now(), b = t.getBoundingClientRect(), { left: R, top: S } = b, I = (D) => {
6189
6189
  if (D.defaultPrevented || c.size > 1 || u && Date.now() - k < i) return;
6190
6190
  const O = D.clientX, z = D.clientY, j = O - y, B = z - v;
6191
- (m || Math.abs(j) > r || Math.abs(B) > r) && (D.preventDefault(), D.stopPropagation(), m || (l.set({ type: "start", x: y - S, y: v - I }), m = !0), l.set({ type: "move", x: O - S, y: z - I, deltaX: j, deltaY: B }), y = O, v = z);
6191
+ (m || Math.abs(j) > r || Math.abs(B) > r) && (D.preventDefault(), D.stopPropagation(), m || (l.set({ type: "start", x: y - R, y: v - S }), m = !0), l.set({ type: "move", x: O - R, y: z - S, deltaX: j, deltaY: B }), y = O, v = z);
6192
6192
  }, E = (D) => {
6193
6193
  if (c.delete(D.pointerId), m) {
6194
6194
  const O = D.clientX, z = D.clientY;
6195
- l.set({ type: "end", x: O - S, y: z - I });
6195
+ l.set({ type: "end", x: O - R, y: z - S });
6196
6196
  }
6197
6197
  h();
6198
6198
  }, w = (D) => {
@@ -6202,8 +6202,8 @@ class tv extends cn {
6202
6202
  }, Q = (D) => {
6203
6203
  D.defaultPrevented || c.size > 1 || m && D.preventDefault();
6204
6204
  };
6205
- document.addEventListener("pointermove", R), document.addEventListener("pointerup", E), document.addEventListener("pointerout", w), document.addEventListener("pointercancel", w), document.addEventListener("touchmove", Q, { passive: !1 }), document.addEventListener("click", T, { capture: !0 }), h = () => {
6206
- document.removeEventListener("pointermove", R), document.removeEventListener("pointerup", E), document.removeEventListener("pointerout", w), document.removeEventListener("pointercancel", w), document.removeEventListener("touchmove", Q), setTimeout(() => {
6205
+ document.addEventListener("pointermove", I), document.addEventListener("pointerup", E), document.addEventListener("pointerout", w), document.addEventListener("pointercancel", w), document.addEventListener("touchmove", Q, { passive: !1 }), document.addEventListener("click", T, { capture: !0 }), h = () => {
6206
+ document.removeEventListener("pointermove", I), document.removeEventListener("pointerup", E), document.removeEventListener("pointerout", w), document.removeEventListener("pointercancel", w), document.removeEventListener("touchmove", Q), setTimeout(() => {
6207
6207
  document.removeEventListener("click", T, { capture: !0 });
6208
6208
  }, 10);
6209
6209
  };
@@ -6366,16 +6366,16 @@ class tv extends cn {
6366
6366
  var e;
6367
6367
  }
6368
6368
  renderBarWaveform(e, t, s, r) {
6369
- const { width: o, height: i } = s.canvas, { halfHeight: l, barWidth: c, barRadius: u, barIndexScale: h, barSpacing: A, barMinHeight: p } = function({ width: v, height: m, length: k, options: b, pixelRatio: S }) {
6370
- const I = m / 2, R = b.barWidth ? b.barWidth * S : 1, E = b.barGap ? b.barGap * S : b.barWidth ? R / 2 : 0, w = R + E || 1;
6371
- return { halfHeight: I, barWidth: R, barGap: E, barRadius: b.barRadius || 0, barMinHeight: b.barMinHeight ? b.barMinHeight * S : 0, barIndexScale: k > 0 ? v / w / k : 0, barSpacing: w };
6372
- }({ width: o, height: i, length: (e[0] || []).length, options: t, pixelRatio: this.getPixelRatio() }), y = function({ channelData: v, barIndexScale: m, barSpacing: k, barWidth: b, halfHeight: S, vScale: I, canvasHeight: R, barAlign: E, barMinHeight: w }) {
6369
+ const { width: o, height: i } = s.canvas, { halfHeight: l, barWidth: c, barRadius: u, barIndexScale: h, barSpacing: A, barMinHeight: p } = function({ width: v, height: m, length: k, options: b, pixelRatio: R }) {
6370
+ const S = m / 2, I = b.barWidth ? b.barWidth * R : 1, E = b.barGap ? b.barGap * R : b.barWidth ? I / 2 : 0, w = I + E || 1;
6371
+ return { halfHeight: S, barWidth: I, barGap: E, barRadius: b.barRadius || 0, barMinHeight: b.barMinHeight ? b.barMinHeight * R : 0, barIndexScale: k > 0 ? v / w / k : 0, barSpacing: w };
6372
+ }({ width: o, height: i, length: (e[0] || []).length, options: t, pixelRatio: this.getPixelRatio() }), y = function({ channelData: v, barIndexScale: m, barSpacing: k, barWidth: b, halfHeight: R, vScale: S, canvasHeight: I, barAlign: E, barMinHeight: w }) {
6373
6373
  const T = v[0] || [], Q = v[1] || T, D = T.length, O = [];
6374
6374
  let z = 0, j = 0, B = 0;
6375
6375
  for (let N = 0; N <= D; N++) {
6376
6376
  const U = Math.round(N * m);
6377
6377
  if (U > z) {
6378
- const { topHeight: F, totalHeight: H } = _f({ maxTop: j, maxBottom: B, halfHeight: S, vScale: I, barMinHeight: w, barAlign: E }), _ = $f({ barAlign: E, halfHeight: S, topHeight: F, totalHeight: H, canvasHeight: R });
6378
+ const { topHeight: F, totalHeight: H } = _f({ maxTop: j, maxBottom: B, halfHeight: R, vScale: S, barMinHeight: w, barAlign: E }), _ = $f({ barAlign: E, halfHeight: R, topHeight: F, totalHeight: H, canvasHeight: I });
6379
6379
  O.push({ x: z * k, y: _, width: b, height: H }), z = U, j = 0, B = 0;
6380
6380
  }
6381
6381
  const W = Math.abs(T[N] || 0), L = Math.abs(Q[N] || 0);
@@ -6391,18 +6391,18 @@ class tv extends cn {
6391
6391
  const { width: o, height: i } = s.canvas, l = function({ channelData: c, width: u, height: h, vScale: A }) {
6392
6392
  const p = h / 2, y = c[0] || [];
6393
6393
  return [y, c[1] || y].map((v, m) => {
6394
- const k = v.length, b = k ? u / k : 0, S = p, I = m === 0 ? -1 : 1, R = [{ x: 0, y: S }];
6394
+ const k = v.length, b = k ? u / k : 0, R = p, S = m === 0 ? -1 : 1, I = [{ x: 0, y: R }];
6395
6395
  let E = 0, w = 0;
6396
6396
  for (let T = 0; T <= k; T++) {
6397
6397
  const Q = Math.round(T * b);
6398
6398
  if (Q > E) {
6399
- const O = S + (Math.round(w * p * A) || 1) * I;
6400
- R.push({ x: E, y: O }), E = Q, w = 0;
6399
+ const O = R + (Math.round(w * p * A) || 1) * S;
6400
+ I.push({ x: E, y: O }), E = Q, w = 0;
6401
6401
  }
6402
6402
  const D = Math.abs(v[T] || 0);
6403
6403
  D > w && (w = D);
6404
6404
  }
6405
- return R.push({ x: E, y: S }), R;
6405
+ return I.push({ x: E, y: R }), I;
6406
6406
  });
6407
6407
  }({ channelData: e, width: o, height: i, vScale: r });
6408
6408
  s.beginPath();
@@ -6453,9 +6453,9 @@ class tv extends cn {
6453
6453
  const m = v * h;
6454
6454
  let k = Math.min(u - m, h);
6455
6455
  if (k = Er(k, t), k <= 0) return;
6456
- const b = function({ channelData: S, offset: I, clampedWidth: R, totalWidth: E }) {
6457
- return S.map((w) => {
6458
- const T = Math.floor(I / E * w.length), Q = Math.floor((I + R) / E * w.length);
6456
+ const b = function({ channelData: R, offset: S, clampedWidth: I, totalWidth: E }) {
6457
+ return R.map((w) => {
6458
+ const T = Math.floor(S / E * w.length), Q = Math.floor((S + I) / E * w.length);
6459
6459
  return w.slice(T, Q);
6460
6460
  });
6461
6461
  }({ channelData: e, offset: m, clampedWidth: k, totalWidth: u });
@@ -6707,8 +6707,8 @@ class rn extends Yf {
6707
6707
  super({ media: t, mediaControls: e.mediaControls, autoplay: e.autoplay, playbackRate: e.audioRate }), this.plugins = [], this.decodedData = null, this.stopAtPosition = null, this.subscriptions = [], this.mediaSubscriptions = [], this.abortController = null, this.reactiveCleanups = [], this.options = Object.assign({}, sv, e);
6708
6708
  const { state: s, actions: r } = function(l) {
6709
6709
  var c, u, h, A, p, y;
6710
- const v = (c = l == null ? void 0 : l.currentTime) !== null && c !== void 0 ? c : le(0), m = (u = l == null ? void 0 : l.duration) !== null && u !== void 0 ? u : le(0), k = (h = l == null ? void 0 : l.isPlaying) !== null && h !== void 0 ? h : le(!1), b = (A = l == null ? void 0 : l.isSeeking) !== null && A !== void 0 ? A : le(!1), S = (p = l == null ? void 0 : l.volume) !== null && p !== void 0 ? p : le(1), I = (y = l == null ? void 0 : l.playbackRate) !== null && y !== void 0 ? y : le(1), R = le(null), E = le(null), w = le(""), T = le(0), Q = le(0), D = ht(() => !k.value, [k]), O = ht(() => R.value !== null, [R]), z = ht(() => O.value && m.value > 0, [O, m]), j = ht(() => v.value, [v]), B = ht(() => m.value > 0 ? v.value / m.value : 0, [v, m]);
6711
- return { state: { currentTime: v, duration: m, isPlaying: k, isPaused: D, isSeeking: b, volume: S, playbackRate: I, audioBuffer: R, peaks: E, url: w, zoom: T, scrollPosition: Q, canPlay: O, isReady: z, progress: j, progressPercent: B }, actions: { setCurrentTime: (N) => {
6710
+ const v = (c = l == null ? void 0 : l.currentTime) !== null && c !== void 0 ? c : le(0), m = (u = l == null ? void 0 : l.duration) !== null && u !== void 0 ? u : le(0), k = (h = l == null ? void 0 : l.isPlaying) !== null && h !== void 0 ? h : le(!1), b = (A = l == null ? void 0 : l.isSeeking) !== null && A !== void 0 ? A : le(!1), R = (p = l == null ? void 0 : l.volume) !== null && p !== void 0 ? p : le(1), S = (y = l == null ? void 0 : l.playbackRate) !== null && y !== void 0 ? y : le(1), I = le(null), E = le(null), w = le(""), T = le(0), Q = le(0), D = ht(() => !k.value, [k]), O = ht(() => I.value !== null, [I]), z = ht(() => O.value && m.value > 0, [O, m]), j = ht(() => v.value, [v]), B = ht(() => m.value > 0 ? v.value / m.value : 0, [v, m]);
6711
+ return { state: { currentTime: v, duration: m, isPlaying: k, isPaused: D, isSeeking: b, volume: R, playbackRate: S, audioBuffer: I, peaks: E, url: w, zoom: T, scrollPosition: Q, canPlay: O, isReady: z, progress: j, progressPercent: B }, actions: { setCurrentTime: (N) => {
6712
6712
  const U = Math.max(0, Math.min(m.value || 1 / 0, N));
6713
6713
  v.set(U);
6714
6714
  }, setDuration: (N) => {
@@ -6719,12 +6719,12 @@ class rn extends Yf {
6719
6719
  b.set(N);
6720
6720
  }, setVolume: (N) => {
6721
6721
  const U = Math.max(0, Math.min(1, N));
6722
- S.set(U);
6722
+ R.set(U);
6723
6723
  }, setPlaybackRate: (N) => {
6724
6724
  const U = Math.max(0.1, Math.min(16, N));
6725
- I.set(U);
6725
+ S.set(U);
6726
6726
  }, setAudioBuffer: (N) => {
6727
- R.set(N), N && m.set(N.duration);
6727
+ I.set(N), N && m.set(N.duration);
6728
6728
  }, setPeaks: (N) => {
6729
6729
  E.set(N);
6730
6730
  }, setUrl: (N) => {
@@ -7100,14 +7100,14 @@ function ai({
7100
7100
  classNamesButton: y,
7101
7101
  onPlayStateChange: v
7102
7102
  }) {
7103
- const [m, k] = G(!1), [b, S] = G(!1), [I, R] = G(!1), [E, w] = G(!1);
7103
+ const [m, k] = G(!1), [b, R] = G(!1), [S, I] = G(!1), [E, w] = G(!1);
7104
7104
  ce(() => {
7105
7105
  typeof navigator < "u" && w(/^((?!chrome|android).)*safari/i.test(navigator.userAgent));
7106
7106
  }, []);
7107
7107
  const T = Y(() => s, [s]), Q = Y(() => r ? !1 : !T || T && m, [T, m, r]), D = ye(null), O = ye(null);
7108
7108
  ce(() => {
7109
- I || (!h || o) && R(!0);
7110
- }, [h, o, I]);
7109
+ S || (!h || o) && I(!0);
7110
+ }, [h, o, S]);
7111
7111
  const z = x(() => {
7112
7112
  var H;
7113
7113
  O.current && ((H = O.current) == null || H.pause());
@@ -7120,7 +7120,7 @@ function ai({
7120
7120
  O.current && n && ((H = O.current) == null || H.load(n));
7121
7121
  }, [n]);
7122
7122
  const B = x((H) => {
7123
- O.current = H, S(!0), k(!1);
7123
+ O.current = H, R(!0), k(!1);
7124
7124
  }, []), N = x(
7125
7125
  (H) => {
7126
7126
  if (k(!0), t == null || t(!0), v == null || v(!0), c) {
@@ -7583,7 +7583,7 @@ const Nv = "_footerVoiceForm_lsc2c_2", Tv = {
7583
7583
  onClickUpgradeConcurrency: v,
7584
7584
  onRemoveTrack: m
7585
7585
  }) => {
7586
- const [k, b] = G(null), [S, I] = G(null), { submitted: R, handleSubmit: E } = tr(h), [w, T] = G({
7586
+ const [k, b] = G(null), [R, S] = G(null), { submitted: I, handleSubmit: E } = tr(h), [w, T] = G({
7587
7587
  lastPlayed: null,
7588
7588
  active: null,
7589
7589
  isPlaying: !1,
@@ -7600,12 +7600,12 @@ const Nv = "_footerVoiceForm_lsc2c_2", Tv = {
7600
7600
  [n, t]
7601
7601
  ), D = x(
7602
7602
  (U) => {
7603
- S !== U && I(U);
7603
+ R !== U && S(U);
7604
7604
  },
7605
- [S, I]
7605
+ [R, S]
7606
7606
  ), O = x(
7607
7607
  (U) => {
7608
- I(null), w.active && w.active.pause(), T((W) => ({
7608
+ S(null), w.active && w.active.pause(), T((W) => ({
7609
7609
  ...W,
7610
7610
  isPlaying: !1,
7611
7611
  active: null
@@ -7637,12 +7637,12 @@ const Nv = "_footerVoiceForm_lsc2c_2", Tv = {
7637
7637
  return ce(() => {
7638
7638
  var U;
7639
7639
  if (w.isPlaying === !1)
7640
- I(null);
7640
+ S(null);
7641
7641
  else if (w.isPlaying === !0 && w.active) {
7642
7642
  const W = (U = n.find(
7643
7643
  (L) => w.active && L.metadata.previewUrl === w.active.url
7644
7644
  )) == null ? void 0 : U.identifier;
7645
- W && I(W);
7645
+ W && S(W);
7646
7646
  }
7647
7647
  }, [w, n]), /* @__PURE__ */ g(C, { direction: "column", height: "100%", children: [
7648
7648
  /* @__PURE__ */ a(
@@ -7651,11 +7651,11 @@ const Nv = "_footerVoiceForm_lsc2c_2", Tv = {
7651
7651
  voices: n,
7652
7652
  selectedId: k,
7653
7653
  handleSelect: Q,
7654
- playingItem: S,
7654
+ playingItem: R,
7655
7655
  handleAvatarClick: D,
7656
7656
  handleDetailsClick: O,
7657
7657
  wavegroup: z,
7658
- setPlayingItem: I,
7658
+ setPlayingItem: S,
7659
7659
  style: { display: o ? "none" : "block" },
7660
7660
  i18n: i
7661
7661
  }
@@ -7701,7 +7701,7 @@ const Nv = "_footerVoiceForm_lsc2c_2", Tv = {
7701
7701
  onMountConcurrency: p
7702
7702
  }
7703
7703
  ),
7704
- !c && !R && !u && !o && /* @__PURE__ */ a(
7704
+ !c && !I && !u && !o && /* @__PURE__ */ a(
7705
7705
  wv,
7706
7706
  {
7707
7707
  trackId: e.trackId,
@@ -7711,7 +7711,7 @@ const Nv = "_footerVoiceForm_lsc2c_2", Tv = {
7711
7711
  onRemoveTrack: m
7712
7712
  }
7713
7713
  ),
7714
- !c && R && !u && !o && /* @__PURE__ */ a(Te, { showIcon: !1, showBackground: !1, children: /* @__PURE__ */ a(J, { size: "2", children: i._("Voice conversion initialized!") }) }),
7714
+ !c && I && !u && !o && /* @__PURE__ */ a(Te, { showIcon: !1, showBackground: !1, children: /* @__PURE__ */ a(J, { size: "2", children: i._("Voice conversion initialized!") }) }),
7715
7715
  !c && u && !o && /* @__PURE__ */ a(
7716
7716
  Te,
7717
7717
  {
@@ -8584,12 +8584,12 @@ const jC = (n) => /* @__PURE__ */ g("div", { className: fe.creditsHeader, childr
8584
8584
  /* @__PURE__ */ g(C, { gap: "2", direction: "column", children: [
8585
8585
  /* @__PURE__ */ a(V, { size: "2", weight: "medium", children: n._("Input Level") }),
8586
8586
  /* @__PURE__ */ a("div", { className: Le.levelMeter, children: /* @__PURE__ */ a("div", { className: Le.levelMeterTrack, children: /* @__PURE__ */ a("div", { className: Le.levelMeterRow, children: Array.from({ length: 17 }, (m, k) => {
8587
- const b = Math.max(0, (v - 5) / 25) * 17, S = k < b;
8588
- let I = "low";
8589
- return k >= 15 ? I = "high" : k >= 11 && (I = "mid"), /* @__PURE__ */ a(
8587
+ const b = Math.max(0, (v - 5) / 25) * 17, R = k < b;
8588
+ let S = "low";
8589
+ return k >= 15 ? S = "high" : k >= 11 && (S = "mid"), /* @__PURE__ */ a(
8590
8590
  "div",
8591
8591
  {
8592
- className: `${Le.levelMeterSegment} ${S ? `${Le.active} ${Le[I]}` : ""}`
8592
+ className: `${Le.levelMeterSegment} ${R ? `${Le.active} ${Le[S]}` : ""}`
8593
8593
  },
8594
8594
  `level-${k}`
8595
8595
  );
@@ -8706,11 +8706,11 @@ const _C = "_newSetlistItem_uefno_1", $C = "_menuOpen_uefno_11", ey = "_avatarSe
8706
8706
  m(!0);
8707
8707
  }, b = () => {
8708
8708
  m(!1);
8709
- }, S = (E) => {
8709
+ }, R = (E) => {
8710
8710
  E.stopPropagation();
8711
- }, I = (E) => {
8711
+ }, S = (E) => {
8712
8712
  E.stopPropagation();
8713
- }, R = Y(() => {
8713
+ }, I = Y(() => {
8714
8714
  if (A)
8715
8715
  return /* @__PURE__ */ g(C, { gap: "1", align: "center", children: [
8716
8716
  /* @__PURE__ */ a(
@@ -8798,7 +8798,7 @@ const _C = "_newSetlistItem_uefno_1", $C = "_menuOpen_uefno_11", ey = "_avatarSe
8798
8798
  children: o
8799
8799
  }
8800
8800
  ),
8801
- R
8801
+ I
8802
8802
  ]
8803
8803
  }
8804
8804
  )
@@ -8816,8 +8816,8 @@ const _C = "_newSetlistItem_uefno_1", $C = "_menuOpen_uefno_11", ey = "_avatarSe
8816
8816
  className: f(K.dropdownTriggerWrapper, {
8817
8817
  [K.dropdownTriggerWrapperMobile]: y
8818
8818
  }),
8819
- onPointerDown: S,
8820
- onClick: I,
8819
+ onPointerDown: R,
8820
+ onClick: S,
8821
8821
  children: /* @__PURE__ */ a(
8822
8822
  ta,
8823
8823
  {
@@ -8884,11 +8884,11 @@ const _C = "_newSetlistItem_uefno_1", $C = "_menuOpen_uefno_11", ey = "_avatarSe
8884
8884
  marginTop: 0,
8885
8885
  zIndex: "auto"
8886
8886
  };
8887
- const S = b + A, I = n.length + A - S;
8887
+ const R = b + A, S = n.length + A - R;
8888
8888
  return {
8889
8889
  position: "relative",
8890
- marginTop: S === 0 ? 0 : -40,
8891
- zIndex: I
8890
+ marginTop: R === 0 ? 0 : -40,
8891
+ zIndex: S
8892
8892
  };
8893
8893
  };
8894
8894
  return /* @__PURE__ */ a(
@@ -8945,16 +8945,16 @@ const _C = "_newSetlistItem_uefno_1", $C = "_menuOpen_uefno_11", ey = "_avatarSe
8945
8945
  collapsed: r
8946
8946
  }
8947
8947
  )),
8948
- n.map((b, S) => {
8949
- const I = e === b.id;
8948
+ n.map((b, R) => {
8949
+ const S = e === b.id;
8950
8950
  return /* @__PURE__ */ a(
8951
8951
  rs,
8952
8952
  {
8953
- isSelected: I,
8953
+ isSelected: S,
8954
8954
  onClick: () => t == null ? void 0 : t(b.id),
8955
8955
  dropdownMenuOpen: i === b.id,
8956
- onDropdownMenuOpenChange: (R) => {
8957
- l(R ? b.id : null);
8956
+ onDropdownMenuOpenChange: (I) => {
8957
+ l(I ? b.id : null);
8958
8958
  },
8959
8959
  avatar: b.icon || /* @__PURE__ */ a(is, { width: 16, height: 16 }),
8960
8960
  group: b.group,
@@ -8968,7 +8968,7 @@ const _C = "_newSetlistItem_uefno_1", $C = "_menuOpen_uefno_11", ey = "_avatarSe
8968
8968
  [K.collapsedStackItem]: p,
8969
8969
  [K.collapsedTransition]: r
8970
8970
  }),
8971
- style: k(S)
8971
+ style: k(R)
8972
8972
  },
8973
8973
  b.id
8974
8974
  );
@@ -9323,13 +9323,13 @@ const nk = "_track_1xe9y_1", sk = "_leftIcon_1xe9y_9", rk = "_name_1xe9y_15", ak
9323
9323
  // Children (having content means group/takelanes)
9324
9324
  children: b
9325
9325
  }) => {
9326
- const S = !!b, I = x(() => k == null ? void 0 : k(!A), [A, k]);
9326
+ const R = !!b, S = x(() => k == null ? void 0 : k(!A), [A, k]);
9327
9327
  return /* @__PURE__ */ g("div", { className: f(ue.container, { [ue.isOpen]: A }), children: [
9328
9328
  /* @__PURE__ */ g(
9329
9329
  "div",
9330
9330
  {
9331
9331
  className: f(ue.track, {
9332
- [ue.isParentTrack]: S,
9332
+ [ue.isParentTrack]: R,
9333
9333
  [ue.isCompact]: i
9334
9334
  }),
9335
9335
  style: { height: `${o}px` },
@@ -9337,60 +9337,87 @@ const nk = "_track_1xe9y_1", sk = "_leftIcon_1xe9y_9", rk = "_name_1xe9y_15", ak
9337
9337
  /* @__PURE__ */ g("div", { className: ue.trackContent, children: [
9338
9338
  /* @__PURE__ */ g("div", { className: ue.line, children: [
9339
9339
  /* @__PURE__ */ g("div", { className: ue.left, children: [
9340
- /* @__PURE__ */ a("div", { className: ue.leftIcon, children: /* @__PURE__ */ a(kk, { isOpen: A, onToggleOpen: I }) }),
9340
+ /* @__PURE__ */ a("div", { className: ue.leftIcon, children: /* @__PURE__ */ a(kk, { isOpen: A, onToggleOpen: S }) }),
9341
9341
  /* @__PURE__ */ a(kt, { content: n, children: /* @__PURE__ */ a(
9342
9342
  V,
9343
9343
  {
9344
9344
  size: "2",
9345
9345
  className: ue.name,
9346
- onClick: S ? I : void 0,
9346
+ onClick: R ? S : void 0,
9347
9347
  children: n
9348
9348
  }
9349
9349
  ) })
9350
9350
  ] }),
9351
- /* @__PURE__ */ a("div", { className: ue.menuOptions, children: e && /* @__PURE__ */ a(
9352
- ln,
9353
- {
9354
- trigger: /* @__PURE__ */ a(qs, { className: ue.menuOptionsTrigger, variant: "ghost", color: "gray", size: "1", children: /* @__PURE__ */ a($l, { width: 16, height: 16 }) }),
9355
- options: e
9356
- }
9357
- ) })
9358
- ] }),
9359
- /* @__PURE__ */ a("div", { className: ue.trackControls, children: !i && s && /* @__PURE__ */ g(he, { children: [
9360
9351
  /* @__PURE__ */ a(
9361
- qo,
9352
+ "div",
9362
9353
  {
9363
- volume: l,
9364
- onChangeValue: p
9354
+ className: ue.menuOptions,
9355
+ onPointerDown: (I) => I.stopPropagation(),
9356
+ onMouseDown: (I) => I.stopPropagation(),
9357
+ onTouchStart: (I) => I.stopPropagation(),
9358
+ children: e && /* @__PURE__ */ a(
9359
+ ln,
9360
+ {
9361
+ trigger: /* @__PURE__ */ a(qs, { className: ue.menuOptionsTrigger, variant: "ghost", color: "gray", size: "1", children: /* @__PURE__ */ a($l, { width: 16, height: 16 }) }),
9362
+ options: e
9363
+ }
9364
+ )
9365
9365
  }
9366
- ),
9367
- t && /* @__PURE__ */ a(Xo, { className: ue.pan, value: c, onChange: y })
9368
- ] }) })
9369
- ] }),
9370
- s && /* @__PURE__ */ g("div", { className: ue.right, children: [
9371
- /* @__PURE__ */ a(
9372
- ks,
9373
- {
9374
- className: ue.rightButton,
9375
- variant: "mute",
9376
- isActive: u,
9377
- onChange: v
9378
- }
9379
- ),
9366
+ )
9367
+ ] }),
9380
9368
  /* @__PURE__ */ a(
9381
- ks,
9369
+ "div",
9382
9370
  {
9383
- className: ue.rightButton,
9384
- variant: "solo",
9385
- isActive: h,
9386
- onChange: m
9371
+ className: ue.trackControls,
9372
+ onPointerDown: (I) => I.stopPropagation(),
9373
+ onMouseDown: (I) => I.stopPropagation(),
9374
+ onTouchStart: (I) => I.stopPropagation(),
9375
+ children: !i && s && /* @__PURE__ */ g(he, { children: [
9376
+ /* @__PURE__ */ a(
9377
+ qo,
9378
+ {
9379
+ volume: l,
9380
+ onChangeValue: p
9381
+ }
9382
+ ),
9383
+ t && /* @__PURE__ */ a(Xo, { className: ue.pan, value: c, onChange: y })
9384
+ ] })
9387
9385
  }
9388
9386
  )
9389
- ] })
9387
+ ] }),
9388
+ s && /* @__PURE__ */ g(
9389
+ "div",
9390
+ {
9391
+ className: ue.right,
9392
+ onPointerDown: (I) => I.stopPropagation(),
9393
+ onMouseDown: (I) => I.stopPropagation(),
9394
+ onTouchStart: (I) => I.stopPropagation(),
9395
+ children: [
9396
+ /* @__PURE__ */ a(
9397
+ ks,
9398
+ {
9399
+ className: ue.rightButton,
9400
+ variant: "mute",
9401
+ isActive: u,
9402
+ onChange: v
9403
+ }
9404
+ ),
9405
+ /* @__PURE__ */ a(
9406
+ ks,
9407
+ {
9408
+ className: ue.rightButton,
9409
+ variant: "solo",
9410
+ isActive: h,
9411
+ onChange: m
9412
+ }
9413
+ )
9414
+ ]
9415
+ }
9416
+ )
9390
9417
  ]
9391
9418
  }
9392
9419
  ),
9393
- S && A && /* @__PURE__ */ a("div", { className: ue.group, children: b })
9420
+ R && A && /* @__PURE__ */ a("div", { className: ue.group, children: b })
9394
9421
  ] });
9395
9422
  }
9396
9423
  );
@@ -9564,7 +9591,7 @@ const Nk = "_DataTable_1fuq9_1", Tk = "_titleText_1fuq9_23", xk = "_artistText_1
9564
9591
  stickyOffset: h = 0,
9565
9592
  ...A
9566
9593
  }) => {
9567
- const [p, y] = G(!1), v = i == null ? void 0 : i.field, m = Y(() => new Set(s), [s]), k = x((B) => m.has(B), [m]), b = s.length, S = (t == null ? void 0 : t.length) ?? 0, I = b > 0, R = S > 0 && b === S, E = Y(
9594
+ const [p, y] = G(!1), v = i == null ? void 0 : i.field, m = Y(() => new Set(s), [s]), k = x((B) => m.has(B), [m]), b = s.length, R = (t == null ? void 0 : t.length) ?? 0, S = b > 0, I = R > 0 && b === R, E = Y(
9568
9595
  () => t == null ? void 0 : t.some((B) => {
9569
9596
  var N;
9570
9597
  return (N = B.dropdownOptions) == null ? void 0 : N.length;
@@ -9629,15 +9656,15 @@ const Nk = "_DataTable_1fuq9_1", Tk = "_titleText_1fuq9_23", xk = "_artistText_1
9629
9656
  xt,
9630
9657
  {
9631
9658
  className: f(Z.checkboxCell, Z.selectColumn, {
9632
- [Z.showCheckboxHeader]: p || I
9659
+ [Z.showCheckboxHeader]: p || S
9633
9660
  }),
9634
9661
  children: /* @__PURE__ */ a(
9635
9662
  Vn,
9636
9663
  {
9637
9664
  size: "1",
9638
- checked: R,
9665
+ checked: I,
9639
9666
  onCheckedChange: (B) => c == null ? void 0 : c(B === !0),
9640
- ...I && !R ? { checked: "indeterminate" } : {}
9667
+ ...S && !I ? { checked: "indeterminate" } : {}
9641
9668
  }
9642
9669
  )
9643
9670
  }
@@ -9665,9 +9692,9 @@ const Nk = "_DataTable_1fuq9_1", Tk = "_titleText_1fuq9_23", xk = "_artistText_1
9665
9692
  ),
9666
9693
  N === 0 && o && /* @__PURE__ */ a(C, { gap: "2", className: Z.headerActions, children: o({
9667
9694
  selectedCount: b,
9668
- total: S,
9669
- anySelected: I,
9670
- allSelected: R
9695
+ total: R,
9696
+ anySelected: S,
9697
+ allSelected: I
9671
9698
  }) })
9672
9699
  ] })
9673
9700
  },