@salina-app/media-editor 0.2.7 → 0.2.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 +284 -290
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as N from "react";
2
- import Ke, { useState as Sn, useCallback as Bi, useEffect as nn, forwardRef as Bl, createElement as rd, memo as va, useRef as Cr, createContext as $v, useContext as qa, useId as YX, Component as KX, useLayoutEffect as c6, useInsertionEffect as XX, useMemo as sr, Fragment as d6, useImperativeHandle as QX } from "react";
2
+ import Ke, { useState as Sn, useCallback as Bi, useEffect as rn, forwardRef as Bl, createElement as rd, memo as va, useRef as Cr, createContext as $v, useContext as qa, useId as YX, Component as KX, useLayoutEffect as c6, useInsertionEffect as XX, useMemo as sr, Fragment as d6, useImperativeHandle as QX } from "react";
3
3
  import { jsx as z, Fragment as Qr, jsxs as ut } from "react/jsx-runtime";
4
4
  const ZX = 1, JX = 1e6;
5
5
  let kE = 0;
@@ -1799,7 +1799,7 @@ const Up = Ts()((t) => ({
1799
1799
  a
1800
1800
  ]
1801
1801
  );
1802
- nn(() => (document.addEventListener("keydown", G), () => {
1802
+ rn(() => (document.addEventListener("keydown", G), () => {
1803
1803
  document.removeEventListener("keydown", G);
1804
1804
  }), [G]);
1805
1805
  };
@@ -3954,15 +3954,15 @@ const Ol = /* @__PURE__ */ ud(see), Ml = "secret", { GET: k3 } = zR(!1), qR = ()
3954
3954
  setThumbnails: h,
3955
3955
  setVideoSrc: p
3956
3956
  } = Vu();
3957
- nn(() => {
3957
+ rn(() => {
3958
3958
  i && i.length ? c(i) : c([]);
3959
- }, [i, c]), nn(() => {
3959
+ }, [i, c]), rn(() => {
3960
3960
  n && n.length ? a(n) : a([]);
3961
- }, [n, a]), nn(() => {
3961
+ }, [n, a]), rn(() => {
3962
3962
  l(e || "");
3963
- }, [e, l]), nn(() => {
3963
+ }, [e, l]), rn(() => {
3964
3964
  r && r.length ? h(r) : h([]);
3965
- }, [r, h]), nn(() => {
3965
+ }, [r, h]), rn(() => {
3966
3966
  p(t || "");
3967
3967
  }, [t, p]);
3968
3968
  }, Ax = () => {
@@ -4503,7 +4503,7 @@ function hee() {
4503
4503
  }
4504
4504
  };
4505
4505
  }
4506
- function Fe(et, tt, Lt) {
4506
+ function Be(et, tt, Lt) {
4507
4507
  var Yt = t.unstable_now(), mn;
4508
4508
  if (typeof Lt == "object" && Lt !== null) {
4509
4509
  var In = Lt.delay;
@@ -4605,7 +4605,7 @@ function hee() {
4605
4605
  ie(Ht), Ht = -1;
4606
4606
  }
4607
4607
  var er = Ut, Nn = null;
4608
- t.unstable_IdlePriority = A, t.unstable_ImmediatePriority = m, t.unstable_LowPriority = S, t.unstable_NormalPriority = x, t.unstable_Profiling = Nn, t.unstable_UserBlockingPriority = b, t.unstable_cancelCallback = Ve, t.unstable_continueExecution = Ye, t.unstable_forceFrameRate = Jt, t.unstable_getCurrentPriorityLevel = _t, t.unstable_getFirstCallbackNode = at, t.unstable_next = Ze, t.unstable_pauseExecution = We, t.unstable_requestPaint = er, t.unstable_runWithPriority = He, t.unstable_scheduleCallback = Fe, t.unstable_shouldYield = An, t.unstable_wrapCallback = Ne, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
4608
+ t.unstable_IdlePriority = A, t.unstable_ImmediatePriority = m, t.unstable_LowPriority = S, t.unstable_NormalPriority = x, t.unstable_Profiling = Nn, t.unstable_UserBlockingPriority = b, t.unstable_cancelCallback = Ve, t.unstable_continueExecution = Ye, t.unstable_forceFrameRate = Jt, t.unstable_getCurrentPriorityLevel = _t, t.unstable_getFirstCallbackNode = at, t.unstable_next = Ze, t.unstable_pauseExecution = We, t.unstable_requestPaint = er, t.unstable_runWithPriority = He, t.unstable_scheduleCallback = Be, t.unstable_shouldYield = An, t.unstable_wrapCallback = Ne, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
4609
4609
  }();
4610
4610
  }(UE)), UE;
4611
4611
  }
@@ -4898,7 +4898,7 @@ function pee() {
4898
4898
  }
4899
4899
  return null;
4900
4900
  }
4901
- function Fe(u) {
4901
+ function Be(u) {
4902
4902
  switch (typeof u) {
4903
4903
  case "boolean":
4904
4904
  case "number":
@@ -4956,20 +4956,20 @@ function pee() {
4956
4956
  }
4957
4957
  function Gt(u, d) {
4958
4958
  var v = d.defaultValue == null ? "" : d.defaultValue, w = d.checked != null ? d.checked : d.defaultChecked;
4959
- v = Fe(d.value != null ? d.value : v), u._wrapperState = { initialChecked: w, initialValue: v, controlled: d.type === "checkbox" || d.type === "radio" ? d.checked != null : d.value != null };
4959
+ v = Be(d.value != null ? d.value : v), u._wrapperState = { initialChecked: w, initialValue: v, controlled: d.type === "checkbox" || d.type === "radio" ? d.checked != null : d.value != null };
4960
4960
  }
4961
4961
  function Ht(u, d) {
4962
4962
  d = d.checked, d != null && I(u, "checked", d, !1);
4963
4963
  }
4964
4964
  function yn(u, d) {
4965
4965
  Ht(u, d);
4966
- var v = Fe(d.value), w = d.type;
4966
+ var v = Be(d.value), w = d.type;
4967
4967
  if (v != null) w === "number" ? (v === 0 && u.value === "" || u.value != v) && (u.value = "" + v) : u.value !== "" + v && (u.value = "" + v);
4968
4968
  else if (w === "submit" || w === "reset") {
4969
4969
  u.removeAttribute("value");
4970
4970
  return;
4971
4971
  }
4972
- d.hasOwnProperty("value") ? An(u, d.type, v) : d.hasOwnProperty("defaultValue") && An(u, d.type, Fe(d.defaultValue)), d.checked == null && d.defaultChecked != null && (u.defaultChecked = !!d.defaultChecked);
4972
+ d.hasOwnProperty("value") ? An(u, d.type, v) : d.hasOwnProperty("defaultValue") && An(u, d.type, Be(d.defaultValue)), d.checked == null && d.defaultChecked != null && (u.defaultChecked = !!d.defaultChecked);
4973
4973
  }
4974
4974
  function cn(u, d, v) {
4975
4975
  if (d.hasOwnProperty("value") || d.hasOwnProperty("defaultValue")) {
@@ -4989,7 +4989,7 @@ function pee() {
4989
4989
  for (var O = 0; O < v.length; O++) d["$" + v[O]] = !0;
4990
4990
  for (v = 0; v < u.length; v++) O = d.hasOwnProperty("$" + u[v].value), u[v].selected !== O && (u[v].selected = O), O && w && (u[v].defaultSelected = !0);
4991
4991
  } else {
4992
- for (v = "" + Fe(v), d = null, O = 0; O < u.length; O++) {
4992
+ for (v = "" + Be(v), d = null, O = 0; O < u.length; O++) {
4993
4993
  if (u[O].value === v) {
4994
4994
  u[O].selected = !0, w && (u[O].defaultSelected = !0);
4995
4995
  return;
@@ -5016,10 +5016,10 @@ function pee() {
5016
5016
  }
5017
5017
  d == null && (d = ""), v = d;
5018
5018
  }
5019
- u._wrapperState = { initialValue: Fe(v) };
5019
+ u._wrapperState = { initialValue: Be(v) };
5020
5020
  }
5021
5021
  function or(u, d) {
5022
- var v = Fe(d.value), w = Fe(d.defaultValue);
5022
+ var v = Be(d.value), w = Be(d.defaultValue);
5023
5023
  v != null && (v = "" + v, v !== u.value && (u.value = v), d.defaultValue == null && u.defaultValue !== v && (u.defaultValue = v)), w != null && (u.defaultValue = "" + w);
5024
5024
  }
5025
5025
  function sn(u) {
@@ -6462,7 +6462,7 @@ function pee() {
6462
6462
  function _e(u) {
6463
6463
  return u = (u = u.stateNode) && u.__reactInternalMemoizedMergedChildContext || C, F = D.current, y(D, u), y(k, k.current), !0;
6464
6464
  }
6465
- function Be(u, d, v) {
6465
+ function Fe(u, d, v) {
6466
6466
  var w = u.stateNode;
6467
6467
  if (!w) throw Error(n(169));
6468
6468
  v ? (u = he(u, d, F), w.__reactInternalMemoizedMergedChildContext = u, On(k), On(D), y(D, u)) : On(k), y(k, v);
@@ -7551,10 +7551,10 @@ Error generating stack: ` + U.message + `
7551
7551
  function Vm(u, d, v, w, O, U) {
7552
7552
  Pc(u, d);
7553
7553
  var Q = (d.flags & 128) !== 0;
7554
- if (!w && !Q) return O && Be(d, v, !1), qr(u, d, U);
7554
+ if (!w && !Q) return O && Fe(d, v, !1), qr(u, d, U);
7555
7555
  w = d.stateNode, F1.current = d;
7556
7556
  var me = Q && typeof v.getDerivedStateFromError != "function" ? null : w.render();
7557
- return d.flags |= 1, u !== null && Q ? (d.child = kd(d, u.child, null, U), d.child = kd(d, null, me, U)) : zr(u, d, me, U), d.memoizedState = w.state, O && Be(d, v, !0), d.child;
7557
+ return d.flags |= 1, u !== null && Q ? (d.child = kd(d, u.child, null, U), d.child = kd(d, null, me, U)) : zr(u, d, me, U), d.memoizedState = w.state, O && Fe(d, v, !0), d.child;
7558
7558
  }
7559
7559
  function C2(u) {
7560
7560
  var d = u.stateNode;
@@ -7964,7 +7964,7 @@ Error generating stack: ` + U.message + `
7964
7964
  at(u), sn(u);
7965
7965
  break;
7966
7966
  case "option":
7967
- w.value != null && u.setAttribute("value", "" + Fe(w.value));
7967
+ w.value != null && u.setAttribute("value", "" + Be(w.value));
7968
7968
  break;
7969
7969
  case "select":
7970
7970
  u.multiple = !!w.multiple, U = w.value, U != null ? Jt(u, !!w.multiple, U, !1) : w.defaultValue != null && Jt(
@@ -9820,7 +9820,7 @@ function mee() {
9820
9820
  R.unshift("Warning: " + o), Function.prototype.apply.call(console[s], console, R);
9821
9821
  }
9822
9822
  }
9823
- var h = 0, p = 1, m = 2, b = 3, x = 4, S = 5, A = 6, _ = 7, E = 8, P = 9, M = 10, I = 11, $ = 12, B = 13, W = 14, G = 15, X = 16, j = 17, q = 18, ne = 19, se = 21, re = 22, ce = 23, ye = 24, ve = 25, ge = !0, Z = !1, ie = !1, ee = !1, ue = !1, Te = !0, Ce = !1, Pe = !0, He = !0, Ze = !0, Ne = !0, Fe = /* @__PURE__ */ new Set(), We = {}, Ye = {};
9823
+ var h = 0, p = 1, m = 2, b = 3, x = 4, S = 5, A = 6, _ = 7, E = 8, P = 9, M = 10, I = 11, $ = 12, B = 13, W = 14, G = 15, X = 16, j = 17, q = 18, ne = 19, se = 21, re = 22, ce = 23, ye = 24, ve = 25, ge = !0, Z = !1, ie = !1, ee = !1, ue = !1, Te = !0, Ce = !1, Pe = !0, He = !0, Ze = !0, Ne = !0, Be = /* @__PURE__ */ new Set(), We = {}, Ye = {};
9824
9824
  function at(s, o) {
9825
9825
  Ve(s, o), Ve(s + "Capture", o);
9826
9826
  }
@@ -9831,7 +9831,7 @@ function mee() {
9831
9831
  Ye[f] = s, s === "onDoubleClick" && (Ye.ondblclick = s);
9832
9832
  }
9833
9833
  for (var g = 0; g < o.length; g++)
9834
- Fe.add(o[g]);
9834
+ Be.add(o[g]);
9835
9835
  }
9836
9836
  var _t = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", wt = Object.prototype.hasOwnProperty;
9837
9837
  function Gt(s) {
@@ -12211,7 +12211,7 @@ Check the render method of \`` + s + "`." : "";
12211
12211
  ), he = (
12212
12212
  /* */
12213
12213
  16384
12214
- ), _e = te | Qt | C | F | V | he, Be = (
12214
+ ), _e = te | Qt | C | F | V | he, Fe = (
12215
12215
  /* */
12216
12216
  32767
12217
12217
  ), st = (
@@ -14466,7 +14466,7 @@ Check the render method of \`` + s + "`." : "";
14466
14466
  var oT = "_reactListening" + Math.random().toString(36).slice(2);
14467
14467
  function K0(s) {
14468
14468
  if (!s[oT]) {
14469
- s[oT] = !0, Fe.forEach(function(f) {
14469
+ s[oT] = !0, Be.forEach(function(f) {
14470
14470
  f !== "selectionchange" && (z2.has(f) || q2(f, !1, s), q2(f, !0, s));
14471
14471
  });
14472
14472
  var o = s.nodeType === ss ? s : s.ownerDocument;
@@ -21917,7 +21917,7 @@ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-f
21917
21917
  } else {
21918
21918
  var R = MY(f, o);
21919
21919
  if (R !== null) {
21920
- R.flags &= Be, Gr = R;
21920
+ R.flags &= Fe, Gr = R;
21921
21921
  return;
21922
21922
  }
21923
21923
  if ((o.mode & zt) !== Dt) {
@@ -23248,7 +23248,7 @@ function gee() {
23248
23248
  }
23249
23249
  var Vp = gee();
23250
23250
  const KR = /* @__PURE__ */ ud(Vp);
23251
- function rn(t, e, { checkForDefaultPrevented: n = !0 } = {}) {
23251
+ function nn(t, e, { checkForDefaultPrevented: n = !0 } = {}) {
23252
23252
  return function(i) {
23253
23253
  if (t == null || t(i), n === !1 || !i.defaultPrevented)
23254
23254
  return e == null ? void 0 : e(i);
@@ -23551,9 +23551,9 @@ var Aee = "DismissableLayer", yA = "dismissableLayer.update", Ree = "dismissable
23551
23551
  pointerEvents: I ? $ ? "auto" : "none" : void 0,
23552
23552
  ...t.style
23553
23553
  },
23554
- onFocusCapture: rn(t.onFocusCapture, W.onFocusCapture),
23555
- onBlurCapture: rn(t.onBlurCapture, W.onBlurCapture),
23556
- onPointerDownCapture: rn(
23554
+ onFocusCapture: nn(t.onFocusCapture, W.onFocusCapture),
23555
+ onBlurCapture: nn(t.onBlurCapture, W.onBlurCapture),
23556
+ onPointerDownCapture: nn(
23557
23557
  t.onPointerDownCapture,
23558
23558
  B.onPointerDownCapture
23559
23559
  )
@@ -23923,17 +23923,17 @@ var Mx = "Toast", Gee = "toast.swipeStart", Yee = "toast.swipeMove", Kee = "toas
23923
23923
  onClose: () => h(!1),
23924
23924
  onPause: ga(t.onPause),
23925
23925
  onResume: ga(t.onResume),
23926
- onSwipeStart: rn(t.onSwipeStart, (p) => {
23926
+ onSwipeStart: nn(t.onSwipeStart, (p) => {
23927
23927
  p.currentTarget.setAttribute("data-swipe", "start");
23928
23928
  }),
23929
- onSwipeMove: rn(t.onSwipeMove, (p) => {
23929
+ onSwipeMove: nn(t.onSwipeMove, (p) => {
23930
23930
  const { x: m, y: b } = p.detail.delta;
23931
23931
  p.currentTarget.setAttribute("data-swipe", "move"), p.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${m}px`), p.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${b}px`);
23932
23932
  }),
23933
- onSwipeCancel: rn(t.onSwipeCancel, (p) => {
23933
+ onSwipeCancel: nn(t.onSwipeCancel, (p) => {
23934
23934
  p.currentTarget.setAttribute("data-swipe", "cancel"), p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
23935
23935
  }),
23936
- onSwipeEnd: rn(t.onSwipeEnd, (p) => {
23936
+ onSwipeEnd: nn(t.onSwipeEnd, (p) => {
23937
23937
  const { x: m, y: b } = p.detail.delta;
23938
23938
  p.currentTarget.setAttribute("data-swipe", "end"), p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), p.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${m}px`), p.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${b}px`), h(!1);
23939
23939
  })
@@ -24003,7 +24003,7 @@ var [Qee, Zee] = tF(Mx, {
24003
24003
  Nee,
24004
24004
  {
24005
24005
  asChild: !0,
24006
- onEscapeKeyDown: rn(c, () => {
24006
+ onEscapeKeyDown: nn(c, () => {
24007
24007
  _.isFocusedToastEscapeKeyDownRef.current || ne(), _.isFocusedToastEscapeKeyDownRef.current = !1;
24008
24008
  }),
24009
24009
  children: /* @__PURE__ */ z(
@@ -24018,13 +24018,13 @@ var [Qee, Zee] = tF(Mx, {
24018
24018
  ...A,
24019
24019
  ref: M,
24020
24020
  style: { userSelect: "none", touchAction: "none", ...t.style },
24021
- onKeyDown: rn(t.onKeyDown, (ce) => {
24021
+ onKeyDown: nn(t.onKeyDown, (ce) => {
24022
24022
  ce.key === "Escape" && (c == null || c(ce.nativeEvent), ce.nativeEvent.defaultPrevented || (_.isFocusedToastEscapeKeyDownRef.current = !0, ne()));
24023
24023
  }),
24024
- onPointerDown: rn(t.onPointerDown, (ce) => {
24024
+ onPointerDown: nn(t.onPointerDown, (ce) => {
24025
24025
  ce.button === 0 && (I.current = { x: ce.clientX, y: ce.clientY });
24026
24026
  }),
24027
- onPointerMove: rn(t.onPointerMove, (ce) => {
24027
+ onPointerMove: nn(t.onPointerMove, (ce) => {
24028
24028
  if (!I.current) return;
24029
24029
  const ye = ce.clientX - I.current.x, ve = ce.clientY - I.current.y, ge = !!$.current, Z = ["left", "right"].includes(_.swipeDirection), ie = ["left", "up"].includes(_.swipeDirection) ? Math.min : Math.max, ee = Z ? ie(0, ye) : 0, ue = Z ? 0 : ie(0, ve), Te = ce.pointerType === "touch" ? 10 : 2, Ce = { x: ee, y: ue }, Pe = { originalEvent: ce, delta: Ce };
24030
24030
  ge ? ($.current = Ce, V_(Yee, b, Pe, {
@@ -24033,7 +24033,7 @@ var [Qee, Zee] = tF(Mx, {
24033
24033
  discrete: !1
24034
24034
  }), ce.target.setPointerCapture(ce.pointerId)) : (Math.abs(ye) > Te || Math.abs(ve) > Te) && (I.current = null);
24035
24035
  }),
24036
- onPointerUp: rn(t.onPointerUp, (ce) => {
24036
+ onPointerUp: nn(t.onPointerUp, (ce) => {
24037
24037
  const ye = $.current, ve = ce.target;
24038
24038
  if (ve.hasPointerCapture(ce.pointerId) && ve.releasePointerCapture(ce.pointerId), $.current = null, I.current = null, ye) {
24039
24039
  const ge = ce.currentTarget, Z = { originalEvent: ce, delta: ye };
@@ -24101,7 +24101,7 @@ var dF = "ToastClose", JR = N.forwardRef(
24101
24101
  type: "button",
24102
24102
  ...r,
24103
24103
  ref: e,
24104
- onClick: rn(t.onClick, i.onClose)
24104
+ onClick: nn(t.onClick, i.onClose)
24105
24105
  }
24106
24106
  ) });
24107
24107
  }
@@ -26653,7 +26653,7 @@ function dne(...t) {
26653
26653
  }
26654
26654
  var fne = (t) => {
26655
26655
  var e, n, r, i, a, l, c, h, p, m, b;
26656
- let { invert: x, toast: S, unstyled: A, interacting: _, setHeights: E, visibleToasts: P, heights: M, index: I, toasts: $, expanded: B, removeToast: W, defaultRichColors: G, closeButton: X, style: j, cancelButtonStyle: q, actionButtonStyle: ne, className: se = "", descriptionClassName: re = "", duration: ce, position: ye, gap: ve, loadingIcon: ge, expandByDefault: Z, classNames: ie, icons: ee, closeButtonAriaLabel: ue = "Close toast", pauseWhenPageIsHidden: Te, cn: Ce } = t, [Pe, He] = Ke.useState(!1), [Ze, Ne] = Ke.useState(!1), [Fe, We] = Ke.useState(!1), [Ye, at] = Ke.useState(!1), [Ve, _t] = Ke.useState(!1), [wt, Gt] = Ke.useState(0), [Ht, yn] = Ke.useState(0), cn = Ke.useRef(S.duration || ce || Q3), An = Ke.useRef(null), Ut = Ke.useRef(null), Jt = I === 0, Rn = I + 1 <= P, wn = S.type, or = S.dismissible !== !1, sn = S.className || "", dn = S.descriptionClassName || "", en = Ke.useMemo(() => M.findIndex((K) => K.toastId === S.id) || 0, [M, S.id]), an = Ke.useMemo(() => {
26656
+ let { invert: x, toast: S, unstyled: A, interacting: _, setHeights: E, visibleToasts: P, heights: M, index: I, toasts: $, expanded: B, removeToast: W, defaultRichColors: G, closeButton: X, style: j, cancelButtonStyle: q, actionButtonStyle: ne, className: se = "", descriptionClassName: re = "", duration: ce, position: ye, gap: ve, loadingIcon: ge, expandByDefault: Z, classNames: ie, icons: ee, closeButtonAriaLabel: ue = "Close toast", pauseWhenPageIsHidden: Te, cn: Ce } = t, [Pe, He] = Ke.useState(!1), [Ze, Ne] = Ke.useState(!1), [Be, We] = Ke.useState(!1), [Ye, at] = Ke.useState(!1), [Ve, _t] = Ke.useState(!1), [wt, Gt] = Ke.useState(0), [Ht, yn] = Ke.useState(0), cn = Ke.useRef(S.duration || ce || Q3), An = Ke.useRef(null), Ut = Ke.useRef(null), Jt = I === 0, Rn = I + 1 <= P, wn = S.type, or = S.dismissible !== !1, sn = S.className || "", dn = S.descriptionClassName || "", en = Ke.useMemo(() => M.findIndex((K) => K.toastId === S.id) || 0, [M, S.id]), an = Ke.useMemo(() => {
26657
26657
  var K;
26658
26658
  return (K = S.closeButton) != null ? K : X;
26659
26659
  }, [S.closeButton, X]);
@@ -26699,7 +26699,7 @@ var fne = (t) => {
26699
26699
  var K, J, pe;
26700
26700
  return ee != null && ee.loading ? Ke.createElement("div", { className: Ce(ie == null ? void 0 : ie.loader, (K = S == null ? void 0 : S.classNames) == null ? void 0 : K.loader, "sonner-loader"), "data-visible": wn === "loading" }, ee.loading) : ge ? Ke.createElement("div", { className: Ce(ie == null ? void 0 : ie.loader, (J = S == null ? void 0 : S.classNames) == null ? void 0 : J.loader, "sonner-loader"), "data-visible": wn === "loading" }, ge) : Ke.createElement(qte, { className: Ce(ie == null ? void 0 : ie.loader, (pe = S == null ? void 0 : S.classNames) == null ? void 0 : pe.loader), visible: wn === "loading" });
26701
26701
  }
26702
- return Ke.createElement("li", { tabIndex: 0, ref: Ut, className: Ce(se, sn, ie == null ? void 0 : ie.toast, (e = S == null ? void 0 : S.classNames) == null ? void 0 : e.toast, ie == null ? void 0 : ie.default, ie == null ? void 0 : ie[wn], (n = S == null ? void 0 : S.classNames) == null ? void 0 : n[wn]), "data-sonner-toast": "", "data-rich-colors": (r = S.richColors) != null ? r : G, "data-styled": !(S.jsx || S.unstyled || A), "data-mounted": Pe, "data-promise": !!S.promise, "data-swiped": Ve, "data-removed": Ze, "data-visible": Rn, "data-y-position": Lt, "data-x-position": Yt, "data-index": I, "data-front": Jt, "data-swiping": Fe, "data-dismissible": or, "data-type": wn, "data-invert": kn, "data-swipe-out": Ye, "data-expanded": !!(B || Z && Pe), style: { "--index": I, "--toasts-before": I, "--z-index": $.length - I, "--offset": `${Ze ? wt : Nn.current}px`, "--initial-height": Z ? "auto" : `${Ht}px`, ...j, ...S.style }, onPointerDown: (K) => {
26702
+ return Ke.createElement("li", { tabIndex: 0, ref: Ut, className: Ce(se, sn, ie == null ? void 0 : ie.toast, (e = S == null ? void 0 : S.classNames) == null ? void 0 : e.toast, ie == null ? void 0 : ie.default, ie == null ? void 0 : ie[wn], (n = S == null ? void 0 : S.classNames) == null ? void 0 : n[wn]), "data-sonner-toast": "", "data-rich-colors": (r = S.richColors) != null ? r : G, "data-styled": !(S.jsx || S.unstyled || A), "data-mounted": Pe, "data-promise": !!S.promise, "data-swiped": Ve, "data-removed": Ze, "data-visible": Rn, "data-y-position": Lt, "data-x-position": Yt, "data-index": I, "data-front": Jt, "data-swiping": Be, "data-dismissible": or, "data-type": wn, "data-invert": kn, "data-swipe-out": Ye, "data-expanded": !!(B || Z && Pe), style: { "--index": I, "--toasts-before": I, "--z-index": $.length - I, "--offset": `${Ze ? wt : Nn.current}px`, "--initial-height": Z ? "auto" : `${Ht}px`, ...j, ...S.style }, onPointerDown: (K) => {
26703
26703
  rr || !or || (An.current = /* @__PURE__ */ new Date(), Gt(Nn.current), K.target.setPointerCapture(K.pointerId), K.target.tagName !== "BUTTON" && (We(!0), tt.current = { x: K.clientX, y: K.clientY }));
26704
26704
  }, onPointerUp: () => {
26705
26705
  var K, J, pe, De;
@@ -26796,9 +26796,9 @@ var hne = Bl(function(t, e) {
26796
26796
  re || se(!1);
26797
26797
  }, onPointerDown: (Ne) => {
26798
26798
  Ne.target instanceof HTMLElement && Ne.target.dataset.dismissible === "false" || ce(!0);
26799
- }, onPointerUp: () => ce(!1) }, W.filter((Ne) => !Ne.position && Ce === 0 || Ne.position === Te).map((Ne, Fe) => {
26799
+ }, onPointerUp: () => ce(!1) }, W.filter((Ne) => !Ne.position && Ce === 0 || Ne.position === Te).map((Ne, Be) => {
26800
26800
  var We, Ye;
26801
- return Ke.createElement(fne, { key: Ne.id, icons: M, index: Fe, toast: Ne, defaultRichColors: m, duration: (We = A == null ? void 0 : A.duration) != null ? We : b, className: A == null ? void 0 : A.className, descriptionClassName: A == null ? void 0 : A.descriptionClassName, invert: n, visibleToasts: S, closeButton: (Ye = A == null ? void 0 : A.closeButton) != null ? Ye : l, interacting: re, position: Te, style: A == null ? void 0 : A.style, unstyled: A == null ? void 0 : A.unstyled, classNames: A == null ? void 0 : A.classNames, cancelButtonStyle: A == null ? void 0 : A.cancelButtonStyle, actionButtonStyle: A == null ? void 0 : A.actionButtonStyle, removeToast: ue, toasts: W.filter((at) => at.position == Ne.position), heights: j.filter((at) => at.position == Ne.position), setHeights: q, expandByDefault: a, gap: E, loadingIcon: P, expanded: ne, pauseWhenPageIsHidden: $, cn: B });
26801
+ return Ke.createElement(fne, { key: Ne.id, icons: M, index: Be, toast: Ne, defaultRichColors: m, duration: (We = A == null ? void 0 : A.duration) != null ? We : b, className: A == null ? void 0 : A.className, descriptionClassName: A == null ? void 0 : A.descriptionClassName, invert: n, visibleToasts: S, closeButton: (Ye = A == null ? void 0 : A.closeButton) != null ? Ye : l, interacting: re, position: Te, style: A == null ? void 0 : A.style, unstyled: A == null ? void 0 : A.unstyled, classNames: A == null ? void 0 : A.classNames, cancelButtonStyle: A == null ? void 0 : A.cancelButtonStyle, actionButtonStyle: A == null ? void 0 : A.actionButtonStyle, removeToast: ue, toasts: W.filter((at) => at.position == Ne.position), heights: j.filter((at) => at.position == Ne.position), setHeights: q, expandByDefault: a, gap: E, loadingIcon: P, expanded: ne, pauseWhenPageIsHidden: $, cn: B });
26802
26802
  })) : null;
26803
26803
  }));
26804
26804
  }), pne = N.useId || (() => {
@@ -27552,7 +27552,7 @@ var XF = "DialogTrigger", QF = N.forwardRef(
27552
27552
  "data-state": uk(i.open),
27553
27553
  ...r,
27554
27554
  ref: a,
27555
- onClick: rn(t.onClick, i.onOpenToggle)
27555
+ onClick: nn(t.onClick, i.onOpenToggle)
27556
27556
  }
27557
27557
  );
27558
27558
  }
@@ -27609,15 +27609,15 @@ var cre = N.forwardRef(
27609
27609
  ref: i,
27610
27610
  trapFocus: n.open,
27611
27611
  disableOutsidePointerEvents: !0,
27612
- onCloseAutoFocus: rn(t.onCloseAutoFocus, (a) => {
27612
+ onCloseAutoFocus: nn(t.onCloseAutoFocus, (a) => {
27613
27613
  var l;
27614
27614
  a.preventDefault(), (l = n.triggerRef.current) == null || l.focus();
27615
27615
  }),
27616
- onPointerDownOutside: rn(t.onPointerDownOutside, (a) => {
27616
+ onPointerDownOutside: nn(t.onPointerDownOutside, (a) => {
27617
27617
  const l = a.detail.originalEvent, c = l.button === 0 && l.ctrlKey === !0;
27618
27618
  (l.button === 2 || c) && a.preventDefault();
27619
27619
  }),
27620
- onFocusOutside: rn(
27620
+ onFocusOutside: nn(
27621
27621
  t.onFocusOutside,
27622
27622
  (a) => a.preventDefault()
27623
27623
  )
@@ -27703,7 +27703,7 @@ var aB = "DialogClose", oB = N.forwardRef(
27703
27703
  type: "button",
27704
27704
  ...r,
27705
27705
  ref: e,
27706
- onClick: rn(t.onClick, () => i.onOpenChange(!1))
27706
+ onClick: nn(t.onClick, () => i.onOpenChange(!1))
27707
27707
  }
27708
27708
  );
27709
27709
  }
@@ -27815,7 +27815,7 @@ var cv = "AlertDialogContent", [Ere, Dre] = _re(cv), vB = N.forwardRef(
27815
27815
  ...a,
27816
27816
  ...i,
27817
27817
  ref: c,
27818
- onOpenAutoFocus: rn(i.onOpenAutoFocus, (p) => {
27818
+ onOpenAutoFocus: nn(i.onOpenAutoFocus, (p) => {
27819
27819
  var m;
27820
27820
  p.preventDefault(), (m = h.current) == null || m.focus({ preventScroll: !0 });
27821
27821
  }),
@@ -29058,7 +29058,7 @@ function HB(t) {
29058
29058
  });
29059
29059
  } else _ && ((S = t.onLoad) === null || S === void 0 || S.call(t, A));
29060
29060
  }
29061
- nn(() => (n(!0), h), []), nn(() => {
29061
+ rn(() => (n(!0), h), []), rn(() => {
29062
29062
  e && m();
29063
29063
  }, [t.icon, e]);
29064
29064
  const { name: b, data: x } = l;
@@ -30396,15 +30396,15 @@ function ose() {
30396
30396
  };
30397
30397
  function $(j, q, ne, se) {
30398
30398
  function re(He, Ze) {
30399
- for (var Ne, Fe = new I(He), We = 1, Ye = 0; Ye < Ze.length; Ye++) {
30399
+ for (var Ne, Be = new I(He), We = 1, Ye = 0; Ye < Ze.length; Ye++) {
30400
30400
  for (; He.overlapsOppositeAxis(ne, Ze[Ye]) || He.within(ne) && He.overlapsAny(se); )
30401
30401
  He.move(Ze[Ye]);
30402
30402
  if (He.within(ne))
30403
30403
  return He;
30404
30404
  var at = He.intersectPercentage(ne);
30405
- We > at && (Ne = new I(He), We = at), He = new I(Fe);
30405
+ We > at && (Ne = new I(He), We = at), He = new I(Be);
30406
30406
  }
30407
- return Ne || Fe;
30407
+ return Ne || Be;
30408
30408
  }
30409
30409
  var ce = new I(q), ye = q.cue, ve = E(ye), ge = [];
30410
30410
  if (ye.snapToLines) {
@@ -32527,7 +32527,7 @@ function gU() {
32527
32527
  An(this, K, J, cn), J && this.removeChild(J);
32528
32528
  },
32529
32529
  removeChild: function(K) {
32530
- return Fe(this, K);
32530
+ return Be(this, K);
32531
32531
  },
32532
32532
  appendChild: function(K) {
32533
32533
  return this.insertBefore(K, null);
@@ -32634,7 +32634,7 @@ function gU() {
32634
32634
  }
32635
32635
  }
32636
32636
  }
32637
- function Fe(K, J) {
32637
+ function Be(K, J) {
32638
32638
  var pe = J.previousSibling, De = J.nextSibling;
32639
32639
  return pe ? pe.nextSibling = De : K.firstChild = De, De ? De.previousSibling = pe : K.lastChild = pe, J.parentNode = null, J.previousSibling = null, J.nextSibling = null, Ne(K.ownerDocument, K), J;
32640
32640
  }
@@ -32774,7 +32774,7 @@ function gU() {
32774
32774
  return An(this, K, J), K.ownerDocument = this, this.documentElement === null && K.nodeType === b && (this.documentElement = K), K;
32775
32775
  },
32776
32776
  removeChild: function(K) {
32777
- return this.documentElement == K && (this.documentElement = null), Fe(this, K);
32777
+ return this.documentElement == K && (this.documentElement = null), Be(this, K);
32778
32778
  },
32779
32779
  replaceChild: function(K, J) {
32780
32780
  An(this, K, J, cn), K.ownerDocument = this, J && this.removeChild(J), Ve(K) && (this.documentElement = K);
@@ -35433,14 +35433,14 @@ function Use() {
35433
35433
  }
35434
35434
  switch (He > Pe && ve(He), j.charAt(He + 1)) {
35435
35435
  case "/":
35436
- var Ht = j.indexOf(">", He + 3), Fe = j.substring(He + 2, Ht).replace(/[ \t\n\r]+$/g, ""), We = Te.pop();
35437
- Ht < 0 ? (Fe = j.substring(He + 2).replace(/[\s<].*/, ""), re.error("end tag name: " + Fe + " is not complete:" + We.tagName), Ht = He + 1 + Fe.length) : Fe.match(/\s</) && (Fe = Fe.replace(/[\s<].*/, ""), re.error("end tag name: " + Fe + " maybe not complete"), Ht = He + 1 + Fe.length);
35438
- var Ye = We.localNSMap, at = We.tagName == Fe, Ve = at || We.tagName && We.tagName.toLowerCase() == Fe.toLowerCase();
35436
+ var Ht = j.indexOf(">", He + 3), Be = j.substring(He + 2, Ht).replace(/[ \t\n\r]+$/g, ""), We = Te.pop();
35437
+ Ht < 0 ? (Be = j.substring(He + 2).replace(/[\s<].*/, ""), re.error("end tag name: " + Be + " is not complete:" + We.tagName), Ht = He + 1 + Be.length) : Be.match(/\s</) && (Be = Be.replace(/[\s<].*/, ""), re.error("end tag name: " + Be + " maybe not complete"), Ht = He + 1 + Be.length);
35438
+ var Ye = We.localNSMap, at = We.tagName == Be, Ve = at || We.tagName && We.tagName.toLowerCase() == Be.toLowerCase();
35439
35439
  if (Ve) {
35440
- if (se.endElement(We.uri, We.localName, Fe), Ye)
35440
+ if (se.endElement(We.uri, We.localName, Be), Ye)
35441
35441
  for (var _t in Ye)
35442
35442
  Object.prototype.hasOwnProperty.call(Ye, _t) && se.endPrefixMapping(_t);
35443
- at || re.fatalError("end tag name: " + Fe + " is not match the current start tagName:" + We.tagName);
35443
+ at || re.fatalError("end tag name: " + Be + " is not match the current start tagName:" + We.tagName);
35444
35444
  } else
35445
35445
  Te.push(We);
35446
35446
  Ht++;
@@ -55002,7 +55002,7 @@ browserWorkerPolyFill(self);
55002
55002
  var C = m(), D = _(y), k;
55003
55003
  return k = new Uint8Array(C.byteLength + D.byteLength), k.set(C), k.set(D, C.byteLength), k;
55004
55004
  }
55005
- }, Fe = function(y) {
55005
+ }, Be = function(y) {
55006
55006
  var C, D, k = [], F = [];
55007
55007
  for (F.byteLength = 0, F.nalCount = 0, F.duration = 0, k.byteLength = 0, C = 0; C < y.length; C++)
55008
55008
  D = y[C], D.nalUnitType === "access_unit_delimiter_rbsp" ? (k.length && (k.duration = D.dts - k.dts, F.byteLength += k.byteLength, F.nalCount += k.length, F.duration += k.duration, F.push(k)), k = [D], k.byteLength = D.data.byteLength, k.pts = D.pts, k.dts = D.dts) : (D.nalUnitType === "slice_layer_without_partitioning_rbsp_idr" && (k.keyFrame = !0), k.duration = D.dts - k.dts, k.byteLength += D.data.byteLength, k.push(D));
@@ -55037,12 +55037,12 @@ browserWorkerPolyFill(self);
55037
55037
  te = V[k], F = Ve(te, oe), oe += F.size, de.push(F);
55038
55038
  return de;
55039
55039
  }, wt = function(y) {
55040
- var C, D, k, F, V, te, oe = 0, de = y.byteLength, he = y.nalCount, _e = de + 4 * he, Be = new Uint8Array(_e), st = new DataView(Be.buffer);
55040
+ var C, D, k, F, V, te, oe = 0, de = y.byteLength, he = y.nalCount, _e = de + 4 * he, Fe = new Uint8Array(_e), st = new DataView(Fe.buffer);
55041
55041
  for (C = 0; C < y.length; C++)
55042
55042
  for (F = y[C], D = 0; D < F.length; D++)
55043
55043
  for (V = F[D], k = 0; k < V.length; k++)
55044
- te = V[k], st.setUint32(oe, te.data.byteLength), oe += 4, Be.set(te.data, oe), oe += te.data.byteLength;
55045
- return Be;
55044
+ te = V[k], st.setUint32(oe, te.data.byteLength), oe += 4, Fe.set(te.data, oe), oe += te.data.byteLength;
55045
+ return Fe;
55046
55046
  }, Gt = function(y, C) {
55047
55047
  var D, k = C || 0, F = [];
55048
55048
  return D = Ve(y, k), F.push(D), F;
@@ -55052,7 +55052,7 @@ browserWorkerPolyFill(self);
55052
55052
  D = y[C], de.setUint32(k, D.data.byteLength), k += 4, oe.set(D.data, k), k += D.data.byteLength;
55053
55053
  return oe;
55054
55054
  }, yn = {
55055
- groupNalsIntoFrames: Fe,
55055
+ groupNalsIntoFrames: Be,
55056
55056
  groupFramesIntoGops: We,
55057
55057
  extendFirstKeyFrame: Ye,
55058
55058
  generateSampleTable: _t,
@@ -55118,13 +55118,13 @@ browserWorkerPolyFill(self);
55118
55118
  D = y[C], k += D.data.byteLength;
55119
55119
  return k;
55120
55120
  }, In = function(y, C, D, k) {
55121
- var F, V = 0, te = 0, oe = 0, de = 0, he, _e, Be;
55121
+ var F, V = 0, te = 0, oe = 0, de = 0, he, _e, Fe;
55122
55122
  if (C.length && (F = Yt.audioTsToVideoTs(y.baseMediaDecodeTime, y.samplerate), V = Math.ceil(Yt.ONE_SECOND_IN_TS / (y.samplerate / 1024)), D && k && (te = F - Math.max(D, k), oe = Math.floor(te / V), de = oe * V), !(oe < 1 || de > Yt.ONE_SECOND_IN_TS / 2))) {
55123
55123
  for (he = Lt()[y.samplerate], he || (he = C[0].data), _e = 0; _e < oe; _e++)
55124
- Be = C[0], C.splice(0, 0, {
55124
+ Fe = C[0], C.splice(0, 0, {
55125
55125
  data: he,
55126
- dts: Be.dts - V,
55127
- pts: Be.pts - V
55126
+ dts: Fe.dts - V,
55127
+ pts: Fe.pts - V
55128
55128
  });
55129
55129
  return y.baseMediaDecodeTime -= Math.floor(Yt.videoTsToAudioTs(de, y.samplerate)), de;
55130
55130
  }
@@ -55421,14 +55421,14 @@ browserWorkerPolyFill(self);
55421
55421
  D.flushDisplayed(V, D.services[y]);
55422
55422
  }), this.services[y];
55423
55423
  }, on.prototype.handleText = function(y, C, D) {
55424
- var k = D && D.isExtended, F = D && D.isMultiByte, V = this.current708Packet.data, te = k ? 4096 : 0, oe = V[y], de = V[y + 1], he = C.currentWindow, _e, Be;
55424
+ var k = D && D.isExtended, F = D && D.isMultiByte, V = this.current708Packet.data, te = k ? 4096 : 0, oe = V[y], de = V[y + 1], he = C.currentWindow, _e, Fe;
55425
55425
  function st(Ue) {
55426
55426
  return Ue.map((Et) => ("0" + (Et & 255).toString(16)).slice(-2)).join("");
55427
55427
  }
55428
- if (F ? (Be = [oe, de], y++) : Be = [oe], C.textDecoder_ && !k)
55429
- _e = C.textDecoder_.decode(new Uint8Array(Be));
55428
+ if (F ? (Fe = [oe, de], y++) : Fe = [oe], C.textDecoder_ && !k)
55429
+ _e = C.textDecoder_.decode(new Uint8Array(Fe));
55430
55430
  else if (F) {
55431
- const Ue = st(Be);
55431
+ const Ue = st(Fe);
55432
55432
  _e = String.fromCharCode(parseInt(Ue, 16));
55433
55433
  } else
55434
55434
  _e = qs(te | oe);
@@ -55971,7 +55971,7 @@ browserWorkerPolyFill(self);
55971
55971
  for (V = 0; V < C.descriptor.length; V++)
55972
55972
  this.dispatchType += ("00" + C.descriptor[V].toString(16)).slice(-2);
55973
55973
  this.push = function(te) {
55974
- var oe, de, he, _e, Be, st;
55974
+ var oe, de, he, _e, Fe, st;
55975
55975
  if (te.type === "timed-metadata") {
55976
55976
  if (te.dataAlignmentIndicator && (F = 0, k.length = 0), k.length === 0 && (te.data.length < 10 || te.data[0] !== 73 || te.data[1] !== 68 || te.data[2] !== 51)) {
55977
55977
  this.trigger("log", {
@@ -55986,8 +55986,8 @@ browserWorkerPolyFill(self);
55986
55986
  frames: [],
55987
55987
  pts: k[0].pts,
55988
55988
  dts: k[0].dts
55989
- }, Be = 0; Be < D; )
55990
- oe.data.set(k[0].data.subarray(0, D - Be), Be), Be += k[0].data.byteLength, F -= k[0].data.byteLength, k.shift();
55989
+ }, Fe = 0; Fe < D; )
55990
+ oe.data.set(k[0].data.subarray(0, D - Fe), Fe), Fe += k[0].data.byteLength, F -= k[0].data.byteLength, k.shift();
55991
55991
  de = 10, oe.data[5] & 64 && (de += 4, de += Gs.parseSyncSafeInteger(oe.data.subarray(10, 14)), D -= Gs.parseSyncSafeInteger(oe.data.subarray(16, 20)));
55992
55992
  do {
55993
55993
  if (he = Gs.parseSyncSafeInteger(oe.data.subarray(de + 4, de + 8)), he < 1) {
@@ -56046,8 +56046,8 @@ browserWorkerPolyFill(self);
56046
56046
  audio: null,
56047
56047
  "timed-metadata": {}
56048
56048
  }, te = (F[1] & 15) << 8 | F[2], oe = 3 + te - 4, de = (F[10] & 15) << 8 | F[11], he = 12 + de; he < oe; ) {
56049
- var _e = F[he], Be = (F[he + 1] & 31) << 8 | F[he + 2];
56050
- _e === Ys.H264_STREAM_TYPE && k.programMapTable.video === null ? k.programMapTable.video = Be : _e === Ys.ADTS_STREAM_TYPE && k.programMapTable.audio === null ? k.programMapTable.audio = Be : _e === Ys.METADATA_STREAM_TYPE && (k.programMapTable["timed-metadata"][Be] = _e), he += ((F[he + 3] & 15) << 8 | F[he + 4]) + 5;
56049
+ var _e = F[he], Fe = (F[he + 1] & 31) << 8 | F[he + 2];
56050
+ _e === Ys.H264_STREAM_TYPE && k.programMapTable.video === null ? k.programMapTable.video = Fe : _e === Ys.ADTS_STREAM_TYPE && k.programMapTable.audio === null ? k.programMapTable.audio = Fe : _e === Ys.METADATA_STREAM_TYPE && (k.programMapTable["timed-metadata"][Fe] = _e), he += ((F[he + 3] & 15) << 8 | F[he + 4]) + 5;
56051
56051
  }
56052
56052
  V.programMapTable = k.programMapTable;
56053
56053
  }
@@ -56077,16 +56077,16 @@ browserWorkerPolyFill(self);
56077
56077
  size: 0
56078
56078
  }, V, te = function(de, he) {
56079
56079
  var _e;
56080
- const Be = de[0] << 16 | de[1] << 8 | de[2];
56081
- he.data = new Uint8Array(), Be === 1 && (he.packetLength = 6 + (de[4] << 8 | de[5]), he.dataAlignmentIndicator = (de[6] & 4) !== 0, _e = de[7], _e & 192 && (he.pts = (de[9] & 14) << 27 | (de[10] & 255) << 20 | (de[11] & 254) << 12 | (de[12] & 255) << 5 | (de[13] & 254) >>> 3, he.pts *= 4, he.pts += (de[13] & 6) >>> 1, he.dts = he.pts, _e & 64 && (he.dts = (de[14] & 14) << 27 | (de[15] & 255) << 20 | (de[16] & 254) << 12 | (de[17] & 255) << 5 | (de[18] & 254) >>> 3, he.dts *= 4, he.dts += (de[18] & 6) >>> 1)), he.data = de.subarray(9 + de[8]));
56080
+ const Fe = de[0] << 16 | de[1] << 8 | de[2];
56081
+ he.data = new Uint8Array(), Fe === 1 && (he.packetLength = 6 + (de[4] << 8 | de[5]), he.dataAlignmentIndicator = (de[6] & 4) !== 0, _e = de[7], _e & 192 && (he.pts = (de[9] & 14) << 27 | (de[10] & 255) << 20 | (de[11] & 254) << 12 | (de[12] & 255) << 5 | (de[13] & 254) >>> 3, he.pts *= 4, he.pts += (de[13] & 6) >>> 1, he.dts = he.pts, _e & 64 && (he.dts = (de[14] & 14) << 27 | (de[15] & 255) << 20 | (de[16] & 254) << 12 | (de[17] & 255) << 5 | (de[18] & 254) >>> 3, he.dts *= 4, he.dts += (de[18] & 6) >>> 1)), he.data = de.subarray(9 + de[8]));
56082
56082
  }, oe = function(de, he, _e) {
56083
- var Be = new Uint8Array(de.size), st = {
56083
+ var Fe = new Uint8Array(de.size), st = {
56084
56084
  type: he
56085
56085
  }, Ue = 0, Et = 0, $t = !1, Pr;
56086
56086
  if (!(!de.data.length || de.size < 9)) {
56087
56087
  for (st.trackId = de.data[0].pid, Ue = 0; Ue < de.data.length; Ue++)
56088
- Pr = de.data[Ue], Be.set(Pr.data, Et), Et += Pr.data.byteLength;
56089
- te(Be, st), $t = he === "video" || st.packetLength <= de.size, (_e || $t) && (de.size = 0, de.data.length = 0), $t && y.trigger("data", st);
56088
+ Pr = de.data[Ue], Fe.set(Pr.data, Et), Et += Pr.data.byteLength;
56089
+ te(Fe, st), $t = he === "video" || st.packetLength <= de.size, (_e || $t) && (de.size = 0, de.data.length = 0), $t && y.trigger("data", st);
56090
56090
  }
56091
56091
  };
56092
56092
  nc.prototype.init.call(this), this.push = function(de) {
@@ -56366,21 +56366,21 @@ browserWorkerPolyFill(self);
56366
56366
  }, this.endTimeline = function() {
56367
56367
  y.endTimeline();
56368
56368
  }, oe = function(de, he) {
56369
- var _e = 8, Be = 8, st, Ue;
56369
+ var _e = 8, Fe = 8, st, Ue;
56370
56370
  for (st = 0; st < de; st++)
56371
- Be !== 0 && (Ue = he.readExpGolomb(), Be = (_e + Ue + 256) % 256), _e = Be === 0 ? _e : Be;
56371
+ Fe !== 0 && (Ue = he.readExpGolomb(), Fe = (_e + Ue + 256) % 256), _e = Fe === 0 ? _e : Fe;
56372
56372
  }, V = function(de) {
56373
- for (var he = de.byteLength, _e = [], Be = 1, st, Ue; Be < he - 2; )
56374
- de[Be] === 0 && de[Be + 1] === 0 && de[Be + 2] === 3 ? (_e.push(Be + 2), Be += 2) : Be++;
56373
+ for (var he = de.byteLength, _e = [], Fe = 1, st, Ue; Fe < he - 2; )
56374
+ de[Fe] === 0 && de[Fe + 1] === 0 && de[Fe + 2] === 3 ? (_e.push(Fe + 2), Fe += 2) : Fe++;
56375
56375
  if (_e.length === 0)
56376
56376
  return de;
56377
56377
  st = he - _e.length, Ue = new Uint8Array(st);
56378
56378
  var Et = 0;
56379
- for (Be = 0; Be < st; Et++, Be++)
56380
- Et === _e[0] && (Et++, _e.shift()), Ue[Be] = de[Et];
56379
+ for (Fe = 0; Fe < st; Et++, Fe++)
56380
+ Et === _e[0] && (Et++, _e.shift()), Ue[Fe] = de[Et];
56381
56381
  return Ue;
56382
56382
  }, te = function(de) {
56383
- var he = 0, _e = 0, Be = 0, st = 0, Ue, Et, $t, Pr, Gn, Di, ei, ta, Ea, ti, jr, bn = [1, 1], br, Hr;
56383
+ var he = 0, _e = 0, Fe = 0, st = 0, Ue, Et, $t, Pr, Gn, Di, ei, ta, Ea, ti, jr, bn = [1, 1], br, Hr;
56384
56384
  if (Ue = new Ks(de), Et = Ue.readUnsignedByte(), Pr = Ue.readUnsignedByte(), $t = Ue.readUnsignedByte(), Ue.skipUnsignedExpGolomb(), nh[Et] && (Gn = Ue.readUnsignedExpGolomb(), Gn === 3 && Ue.skipBits(1), Ue.skipUnsignedExpGolomb(), Ue.skipUnsignedExpGolomb(), Ue.skipBits(1), Ue.readBoolean()))
56385
56385
  for (jr = Gn !== 3 ? 8 : 12, Hr = 0; Hr < jr; Hr++)
56386
56386
  Ue.readBoolean() && (Hr < 6 ? oe(16, Ue) : oe(64, Ue));
@@ -56389,7 +56389,7 @@ browserWorkerPolyFill(self);
56389
56389
  else if (Di === 1)
56390
56390
  for (Ue.skipBits(1), Ue.skipExpGolomb(), Ue.skipExpGolomb(), ei = Ue.readUnsignedExpGolomb(), Hr = 0; Hr < ei; Hr++)
56391
56391
  Ue.skipExpGolomb();
56392
- if (Ue.skipUnsignedExpGolomb(), Ue.skipBits(1), ta = Ue.readUnsignedExpGolomb(), Ea = Ue.readUnsignedExpGolomb(), ti = Ue.readBits(1), ti === 0 && Ue.skipBits(1), Ue.skipBits(1), Ue.readBoolean() && (he = Ue.readUnsignedExpGolomb(), _e = Ue.readUnsignedExpGolomb(), Be = Ue.readUnsignedExpGolomb(), st = Ue.readUnsignedExpGolomb()), Ue.readBoolean() && Ue.readBoolean()) {
56392
+ if (Ue.skipUnsignedExpGolomb(), Ue.skipBits(1), ta = Ue.readUnsignedExpGolomb(), Ea = Ue.readUnsignedExpGolomb(), ti = Ue.readBits(1), ti === 0 && Ue.skipBits(1), Ue.skipBits(1), Ue.readBoolean() && (he = Ue.readUnsignedExpGolomb(), _e = Ue.readUnsignedExpGolomb(), Fe = Ue.readUnsignedExpGolomb(), st = Ue.readUnsignedExpGolomb()), Ue.readBoolean() && Ue.readBoolean()) {
56393
56393
  switch (br = Ue.readUnsignedByte(), br) {
56394
56394
  case 1:
56395
56395
  bn = [1, 1];
@@ -56451,7 +56451,7 @@ browserWorkerPolyFill(self);
56451
56451
  levelIdc: $t,
56452
56452
  profileCompatibility: Pr,
56453
56453
  width: (ta + 1) * 16 - he * 2 - _e * 2,
56454
- height: (2 - ti) * (Ea + 1) * 16 - Be * 2 - st * 2,
56454
+ height: (2 - ti) * (Ea + 1) * 16 - Fe * 2 - st * 2,
56455
56455
  // sar is sample aspect ratio
56456
56456
  sarRatio: bn
56457
56457
  };
@@ -56600,12 +56600,12 @@ browserWorkerPolyFill(self);
56600
56600
  }, this.setAudioAppendStart = function(oe) {
56601
56601
  V = oe;
56602
56602
  }, this.flush = function() {
56603
- var oe, de, he, _e, Be, st, Ue;
56603
+ var oe, de, he, _e, Fe, st, Ue;
56604
56604
  if (D.length === 0) {
56605
56605
  this.trigger("done", "AudioSegmentStream");
56606
56606
  return;
56607
56607
  }
56608
- oe = cc.trimAdtsFramesByEarliestDts(D, y, F), y.baseMediaDecodeTime = Wi.calculateTrackBaseMediaDecodeTime(y, C.keepOriginalTimestamps), Ue = cc.prefixWithSilence(y, oe, V, te), y.samples = cc.generateSampleTable(oe), he = Co.mdat(cc.concatenateFrameData(oe)), D = [], de = Co.moof(k, [y]), _e = new Uint8Array(de.byteLength + he.byteLength), k++, _e.set(de), _e.set(he, de.byteLength), Wi.clearDtsInfo(y), Be = Math.ceil(a0 * 1024 / y.samplerate), oe.length && (st = oe.length * Be, this.trigger("segmentTimingInfo", bd(
56608
+ oe = cc.trimAdtsFramesByEarliestDts(D, y, F), y.baseMediaDecodeTime = Wi.calculateTrackBaseMediaDecodeTime(y, C.keepOriginalTimestamps), Ue = cc.prefixWithSilence(y, oe, V, te), y.samples = cc.generateSampleTable(oe), he = Co.mdat(cc.concatenateFrameData(oe)), D = [], de = Co.moof(k, [y]), _e = new Uint8Array(de.byteLength + he.byteLength), k++, _e.set(de), _e.set(he, de.byteLength), Wi.clearDtsInfo(y), Fe = Math.ceil(a0 * 1024 / y.samplerate), oe.length && (st = oe.length * Fe, this.trigger("segmentTimingInfo", bd(
56609
56609
  // The audio track's baseMediaDecodeTime is in audio clock cycles, but the
56610
56610
  // frame info is in video clock cycles. Convert to match expectation of
56611
56611
  // listeners (that all timestamps will be based on video clock cycles).
@@ -56633,7 +56633,7 @@ browserWorkerPolyFill(self);
56633
56633
  y[de] = V[de];
56634
56634
  }, this)), oe.nalUnitType === "pic_parameter_set_rbsp" && !te && (te = oe.data, y.pps = [oe.data]), k.push(oe);
56635
56635
  }, this.flush = function() {
56636
- for (var oe, de, he, _e, Be, st, Ue = 0, Et, $t; k.length && k[0].nalUnitType !== "access_unit_delimiter_rbsp"; )
56636
+ for (var oe, de, he, _e, Fe, st, Ue = 0, Et, $t; k.length && k[0].nalUnitType !== "access_unit_delimiter_rbsp"; )
56637
56637
  k.shift();
56638
56638
  if (k.length === 0) {
56639
56639
  this.resetStream_(), this.trigger("done", "VideoSegmentStream");
@@ -56651,7 +56651,7 @@ browserWorkerPolyFill(self);
56651
56651
  }
56652
56652
  Wi.clearDtsInfo(y), he = Pr;
56653
56653
  }
56654
- Wi.collectDtsInfo(y, he), y.samples = _a.generateSampleTable(he), Be = Co.mdat(_a.concatenateNalData(he)), y.baseMediaDecodeTime = Wi.calculateTrackBaseMediaDecodeTime(y, C.keepOriginalTimestamps), this.trigger("processedGopsInfo", he.map(function(Gn) {
56654
+ Wi.collectDtsInfo(y, he), y.samples = _a.generateSampleTable(he), Fe = Co.mdat(_a.concatenateNalData(he)), y.baseMediaDecodeTime = Wi.calculateTrackBaseMediaDecodeTime(y, C.keepOriginalTimestamps), this.trigger("processedGopsInfo", he.map(function(Gn) {
56655
56655
  return {
56656
56656
  pts: Gn.pts,
56657
56657
  dts: Gn.dts,
@@ -56664,7 +56664,7 @@ browserWorkerPolyFill(self);
56664
56664
  gop: he.pop(),
56665
56665
  pps: y.pps,
56666
56666
  sps: y.sps
56667
- }), this.gopCache_.length = Math.min(6, this.gopCache_.length), k = [], this.trigger("baseMediaDecodeTime", y.baseMediaDecodeTime), this.trigger("timelineStartInfo", y.timelineStartInfo), _e = Co.moof(D, [y]), st = new Uint8Array(_e.byteLength + Be.byteLength), D++, st.set(_e), st.set(Be, _e.byteLength), this.trigger("data", {
56667
+ }), this.gopCache_.length = Math.min(6, this.gopCache_.length), k = [], this.trigger("baseMediaDecodeTime", y.baseMediaDecodeTime), this.trigger("timelineStartInfo", y.timelineStartInfo), _e = Co.moof(D, [y]), st = new Uint8Array(_e.byteLength + Fe.byteLength), D++, st.set(_e), st.set(Fe, _e.byteLength), this.trigger("data", {
56668
56668
  track: y,
56669
56669
  boxes: st
56670
56670
  }), this.resetStream_(), this.trigger("done", "VideoSegmentStream");
@@ -56673,28 +56673,28 @@ browserWorkerPolyFill(self);
56673
56673
  }, this.resetStream_ = function() {
56674
56674
  Wi.clearDtsInfo(y), V = void 0, te = void 0;
56675
56675
  }, this.getGopForFusion_ = function(oe) {
56676
- var de = 45e3, he = 1e4, _e = 1 / 0, Be, st, Ue, Et, $t;
56676
+ var de = 45e3, he = 1e4, _e = 1 / 0, Fe, st, Ue, Et, $t;
56677
56677
  for ($t = 0; $t < this.gopCache_.length; $t++)
56678
- Et = this.gopCache_[$t], Ue = Et.gop, !(!(y.pps && oh(y.pps[0], Et.pps[0])) || !(y.sps && oh(y.sps[0], Et.sps[0]))) && (Ue.dts < y.timelineStartInfo.dts || (Be = oe.dts - Ue.dts - Ue.duration, Be >= -he && Be <= de && (!st || _e > Be) && (st = Et, _e = Be)));
56678
+ Et = this.gopCache_[$t], Ue = Et.gop, !(!(y.pps && oh(y.pps[0], Et.pps[0])) || !(y.sps && oh(y.sps[0], Et.sps[0]))) && (Ue.dts < y.timelineStartInfo.dts || (Fe = oe.dts - Ue.dts - Ue.duration, Fe >= -he && Fe <= de && (!st || _e > Fe) && (st = Et, _e = Fe)));
56679
56679
  return st ? st.gop : null;
56680
56680
  }, this.alignGopsAtStart_ = function(oe) {
56681
- var de, he, _e, Be, st, Ue, Et, $t;
56682
- for (st = oe.byteLength, Ue = oe.nalCount, Et = oe.duration, de = he = 0; de < F.length && he < oe.length && (_e = F[de], Be = oe[he], _e.pts !== Be.pts); ) {
56683
- if (Be.pts > _e.pts) {
56681
+ var de, he, _e, Fe, st, Ue, Et, $t;
56682
+ for (st = oe.byteLength, Ue = oe.nalCount, Et = oe.duration, de = he = 0; de < F.length && he < oe.length && (_e = F[de], Fe = oe[he], _e.pts !== Fe.pts); ) {
56683
+ if (Fe.pts > _e.pts) {
56684
56684
  de++;
56685
56685
  continue;
56686
56686
  }
56687
- he++, st -= Be.byteLength, Ue -= Be.nalCount, Et -= Be.duration;
56687
+ he++, st -= Fe.byteLength, Ue -= Fe.nalCount, Et -= Fe.duration;
56688
56688
  }
56689
56689
  return he === 0 ? oe : he === oe.length ? null : ($t = oe.slice(he), $t.byteLength = st, $t.duration = Et, $t.nalCount = Ue, $t.pts = $t[0].pts, $t.dts = $t[0].dts, $t);
56690
56690
  }, this.alignGopsAtEnd_ = function(oe) {
56691
- var de, he, _e, Be, st, Ue;
56691
+ var de, he, _e, Fe, st, Ue;
56692
56692
  for (de = F.length - 1, he = oe.length - 1, st = null, Ue = !1; de >= 0 && he >= 0; ) {
56693
- if (_e = F[de], Be = oe[he], _e.pts === Be.pts) {
56693
+ if (_e = F[de], Fe = oe[he], _e.pts === Fe.pts) {
56694
56694
  Ue = !0;
56695
56695
  break;
56696
56696
  }
56697
- if (_e.pts > Be.pts) {
56697
+ if (_e.pts > Fe.pts) {
56698
56698
  de--;
56699
56699
  continue;
56700
56700
  }
@@ -56901,11 +56901,11 @@ browserWorkerPolyFill(self);
56901
56901
  version: y[0],
56902
56902
  flags: new Uint8Array(y.subarray(1, 4)),
56903
56903
  samples: []
56904
- }, D = new DataView(y.buffer, y.byteOffset, y.byteLength), k = C.flags[2] & 1, F = C.flags[2] & 4, V = C.flags[1] & 1, te = C.flags[1] & 2, oe = C.flags[1] & 4, de = C.flags[1] & 8, he = D.getUint32(4), _e = 8, Be;
56905
- for (k && (C.dataOffset = D.getInt32(_e), _e += 4), F && he && (Be = {
56904
+ }, D = new DataView(y.buffer, y.byteOffset, y.byteLength), k = C.flags[2] & 1, F = C.flags[2] & 4, V = C.flags[1] & 1, te = C.flags[1] & 2, oe = C.flags[1] & 4, de = C.flags[1] & 8, he = D.getUint32(4), _e = 8, Fe;
56905
+ for (k && (C.dataOffset = D.getInt32(_e), _e += 4), F && he && (Fe = {
56906
56906
  flags: sl(y.subarray(_e, _e + 4))
56907
- }, _e += 4, V && (Be.duration = D.getUint32(_e), _e += 4), te && (Be.size = D.getUint32(_e), _e += 4), de && (C.version === 1 ? Be.compositionTimeOffset = D.getInt32(_e) : Be.compositionTimeOffset = D.getUint32(_e), _e += 4), C.samples.push(Be), he--); he--; )
56908
- Be = {}, V && (Be.duration = D.getUint32(_e), _e += 4), te && (Be.size = D.getUint32(_e), _e += 4), oe && (Be.flags = sl(y.subarray(_e, _e + 4)), _e += 4), de && (C.version === 1 ? Be.compositionTimeOffset = D.getInt32(_e) : Be.compositionTimeOffset = D.getUint32(_e), _e += 4), C.samples.push(Be);
56907
+ }, _e += 4, V && (Fe.duration = D.getUint32(_e), _e += 4), te && (Fe.size = D.getUint32(_e), _e += 4), de && (C.version === 1 ? Fe.compositionTimeOffset = D.getInt32(_e) : Fe.compositionTimeOffset = D.getUint32(_e), _e += 4), C.samples.push(Fe), he--); he--; )
56908
+ Fe = {}, V && (Fe.duration = D.getUint32(_e), _e += 4), te && (Fe.size = D.getUint32(_e), _e += 4), oe && (Fe.flags = sl(y.subarray(_e, _e + 4)), _e += 4), de && (C.version === 1 ? Fe.compositionTimeOffset = D.getInt32(_e) : Fe.compositionTimeOffset = D.getUint32(_e), _e += 4), C.samples.push(Fe);
56909
56909
  return C;
56910
56910
  }, tm = l0, nm = a, fh = nm.getUint64, oi, al, li = function(y) {
56911
56911
  return new Date(y * 1e3 - 20828448e5);
@@ -57307,9 +57307,9 @@ browserWorkerPolyFill(self);
57307
57307
  for (var C = 0, D = [], k, F, V, te, oe, de = new ArrayBuffer(y.length), he = new Uint8Array(de), _e = 0; _e < y.length; ++_e)
57308
57308
  he[_e] = y[_e];
57309
57309
  for (k = new DataView(de); C < y.byteLength; )
57310
- F = k.getUint32(C), V = xa(y.subarray(C + 4, C + 8)), te = F > 1 ? C + F : y.byteLength, oe = (wa[V] || function(Be) {
57310
+ F = k.getUint32(C), V = xa(y.subarray(C + 4, C + 8)), te = F > 1 ? C + F : y.byteLength, oe = (wa[V] || function(Fe) {
57311
57311
  return {
57312
- data: Be
57312
+ data: Fe
57313
57313
  };
57314
57314
  })(y.subarray(C + 8, te)), oe.size = F, oe.type = V, D.push(oe), C = te;
57315
57315
  return D;
@@ -57366,11 +57366,11 @@ browserWorkerPolyFill(self);
57366
57366
  var C = 4, D = y[0], k, F, V, te, oe, de, he, _e;
57367
57367
  if (D === 0) {
57368
57368
  k = pc(y.subarray(C)), C += k.length, F = pc(y.subarray(C)), C += F.length;
57369
- var Be = new DataView(y.buffer);
57370
- V = Be.getUint32(C), C += 4, oe = Be.getUint32(C), C += 4, de = Be.getUint32(C), C += 4, he = Be.getUint32(C), C += 4;
57369
+ var Fe = new DataView(y.buffer);
57370
+ V = Fe.getUint32(C), C += 4, oe = Fe.getUint32(C), C += 4, de = Fe.getUint32(C), C += 4, he = Fe.getUint32(C), C += 4;
57371
57371
  } else if (D === 1) {
57372
- var Be = new DataView(y.buffer);
57373
- V = Be.getUint32(C), C += 4, te = sm(y.subarray(C)), C += 8, de = Be.getUint32(C), C += 4, he = Be.getUint32(C), C += 4, k = pc(y.subarray(C)), C += k.length, F = pc(y.subarray(C)), C += F.length;
57372
+ var Fe = new DataView(y.buffer);
57373
+ V = Fe.getUint32(C), C += 4, te = sm(y.subarray(C)), C += 8, de = Fe.getUint32(C), C += 4, he = Fe.getUint32(C), C += 4, k = pc(y.subarray(C)), C += k.length, F = pc(y.subarray(C)), C += F.length;
57374
57374
  }
57375
57375
  _e = new Uint8Array(y.subarray(C, y.byteLength));
57376
57376
  var st = {
@@ -57408,10 +57408,10 @@ browserWorkerPolyFill(self);
57408
57408
  var D;
57409
57409
  D = mr(C, ["moof", "traf"]);
57410
57410
  var k = D.reduce(function(F, V) {
57411
- var te = mr(V, ["tfhd"])[0], oe = mc(te[4] << 24 | te[5] << 16 | te[6] << 8 | te[7]), de = y[oe] || 9e4, he = mr(V, ["tfdt"])[0], _e = new DataView(he.buffer, he.byteOffset, he.byteLength), Be;
57412
- he[0] === 1 ? Be = mh(he.subarray(4, 12)) : Be = _e.getUint32(4);
57411
+ var te = mr(V, ["tfhd"])[0], oe = mc(te[4] << 24 | te[5] << 16 | te[6] << 8 | te[7]), de = y[oe] || 9e4, he = mr(V, ["tfdt"])[0], _e = new DataView(he.buffer, he.byteOffset, he.byteLength), Fe;
57412
+ he[0] === 1 ? Fe = mh(he.subarray(4, 12)) : Fe = _e.getUint32(4);
57413
57413
  let st;
57414
- return typeof Be == "bigint" ? st = Be / kr.BigInt(de) : typeof Be == "number" && !isNaN(Be) && (st = Be / de), st < Number.MAX_SAFE_INTEGER && (st = Number(st)), st < F && (F = st), F;
57414
+ return typeof Fe == "bigint" ? st = Fe / kr.BigInt(de) : typeof Fe == "number" && !isNaN(Fe) && (st = Fe / de), st < Number.MAX_SAFE_INTEGER && (st = Number(st)), st < F && (F = st), F;
57415
57415
  }, 1 / 0);
57416
57416
  return typeof k == "bigint" || isFinite(k) ? k : 0;
57417
57417
  }, gh = function(y, C) {
@@ -57427,8 +57427,8 @@ browserWorkerPolyFill(self);
57427
57427
  k = _e.baseMediaDecodeTime;
57428
57428
  }
57429
57429
  if (oe) {
57430
- var Be = am(oe);
57431
- Be.samples && Be.samples.length && (F = Be.samples[0].compositionTimeOffset || 0);
57430
+ var Fe = am(oe);
57431
+ Fe.samples && Fe.samples.length && (F = Fe.samples[0].compositionTimeOffset || 0);
57432
57432
  }
57433
57433
  }
57434
57434
  var st = y[V] || 9e4;
@@ -57440,8 +57440,8 @@ browserWorkerPolyFill(self);
57440
57440
  return C.forEach(function(k) {
57441
57441
  var F = mr(k, ["mdia", "hdlr"]), V = mr(k, ["tkhd"]);
57442
57442
  F.forEach(function(te, oe) {
57443
- var de = no(te.subarray(8, 12)), he = V[oe], _e, Be, st;
57444
- de === "vide" && (_e = new DataView(he.buffer, he.byteOffset, he.byteLength), Be = _e.getUint8(0), st = Be === 0 ? _e.getUint32(12) : _e.getUint32(20), D.push(st));
57443
+ var de = no(te.subarray(8, 12)), he = V[oe], _e, Fe, st;
57444
+ de === "vide" && (_e = new DataView(he.buffer, he.byteOffset, he.byteLength), Fe = _e.getUint8(0), st = Fe === 0 ? _e.getUint32(12) : _e.getUint32(20), D.push(st));
57445
57445
  });
57446
57446
  }), D;
57447
57447
  }, vc = function(y) {
@@ -57459,9 +57459,9 @@ browserWorkerPolyFill(self);
57459
57459
  }
57460
57460
  var _e = mr(k, ["mdia", "minf", "stbl", "stsd"])[0];
57461
57461
  if (_e) {
57462
- var Be = _e.subarray(8);
57463
- F.codec = no(Be.subarray(4, 8));
57464
- var st = mr(Be, [F.codec])[0], Ue, Et;
57462
+ var Fe = _e.subarray(8);
57463
+ F.codec = no(Fe.subarray(4, 8));
57464
+ var st = mr(Fe, [F.codec])[0], Ue, Et;
57465
57465
  st && (/^[asm]vc[1-9]$/i.test(F.codec) ? (Ue = st.subarray(78), Et = no(Ue.subarray(4, 8)), Et === "avcC" && Ue.length > 11 ? (F.codec += ".", F.codec += ru(Ue[9]), F.codec += ru(Ue[10]), F.codec += ru(Ue[11])) : F.codec = "avc1.4d400d") : /^mp4[a,v]$/i.test(F.codec) ? (Ue = st.subarray(28), Et = no(Ue.subarray(4, 8)), Et === "esds" && Ue.length > 20 && Ue[19] !== 0 ? (F.codec += "." + ru(Ue[19]), F.codec += "." + ru(Ue[20] >>> 2 & 63).replace(/^0/, "")) : F.codec = "mp4a.40.2") : F.codec = F.codec.toLowerCase());
57466
57466
  }
57467
57467
  var $t = mr(k, ["mdia", "mdhd"])[0];
@@ -57508,8 +57508,8 @@ browserWorkerPolyFill(self);
57508
57508
  var k = C, F = D.defaultSampleDuration || 0, V = D.defaultSampleSize || 0, te = D.trackId, oe = [];
57509
57509
  return y.forEach(function(de) {
57510
57510
  var he = om(de), _e = he.samples;
57511
- _e.forEach(function(Be) {
57512
- Be.duration === void 0 && (Be.duration = F), Be.size === void 0 && (Be.size = V), Be.trackId = te, Be.dts = k, Be.compositionTimeOffset === void 0 && (Be.compositionTimeOffset = 0), typeof k == "bigint" ? (Be.pts = k + bh.BigInt(Be.compositionTimeOffset), k += bh.BigInt(Be.duration)) : (Be.pts = k + Be.compositionTimeOffset, k += Be.duration);
57511
+ _e.forEach(function(Fe) {
57512
+ Fe.duration === void 0 && (Fe.duration = F), Fe.size === void 0 && (Fe.size = V), Fe.trackId = te, Fe.dts = k, Fe.compositionTimeOffset === void 0 && (Fe.compositionTimeOffset = 0), typeof k == "bigint" ? (Fe.pts = k + bh.BigInt(Fe.compositionTimeOffset), k += bh.BigInt(Fe.duration)) : (Fe.pts = k + Fe.compositionTimeOffset, k += Fe.duration);
57513
57513
  }), oe = oe.concat(_e);
57514
57514
  }), oe;
57515
57515
  }, au = {
@@ -57560,8 +57560,8 @@ browserWorkerPolyFill(self);
57560
57560
  }, io = function(y, C) {
57561
57561
  var D = {}, k = um(y);
57562
57562
  return k.forEach(function(F) {
57563
- var V = F.mdat, te = F.traf, oe = ll(te, ["tfhd"]), de = p0(oe[0]), he = de.trackId, _e = ll(te, ["tfdt"]), Be = _e.length > 0 ? yc(_e[0]).baseMediaDecodeTime : 0, st = ll(te, ["trun"]), Ue, Et;
57564
- C === he && st.length > 0 && (Ue = Ed(st, Be, de), Et = Ao(V, Ue, he), D[he] || (D[he] = {
57563
+ var V = F.mdat, te = F.traf, oe = ll(te, ["tfhd"]), de = p0(oe[0]), he = de.trackId, _e = ll(te, ["tfdt"]), Fe = _e.length > 0 ? yc(_e[0]).baseMediaDecodeTime : 0, st = ll(te, ["trun"]), Ue, Et;
57564
+ C === he && st.length > 0 && (Ue = Ed(st, Fe, de), Et = Ao(V, Ue, he), D[he] || (D[he] = {
57565
57565
  seiNals: [],
57566
57566
  logs: []
57567
57567
  }), D[he].seiNals = D[he].seiNals.concat(Et.seiNals), D[he].logs = D[he].logs.concat(Et.logs));
@@ -57600,8 +57600,8 @@ browserWorkerPolyFill(self);
57600
57600
  return D.push(oe), null;
57601
57601
  } else return null;
57602
57602
  for (; D.length > 0; ) {
57603
- var Be = D.shift();
57604
- this.parse(Be, de, he);
57603
+ var Fe = D.shift();
57604
+ this.parse(Fe, de, he);
57605
57605
  }
57606
57606
  return _e = ou(oe, k, F), _e && _e.logs && (V.logs = V.logs.concat(_e.logs)), _e === null || !_e.seiNals ? V.logs.length ? {
57607
57607
  logs: V.logs,
@@ -57654,9 +57654,9 @@ browserWorkerPolyFill(self);
57654
57654
  return k.forEach(function(V) {
57655
57655
  const te = V.mdat, oe = V.traf, de = Ss(oe, ["tfdt"])[0], he = Ss(oe, ["tfhd"])[0], _e = Ss(oe, ["trun"]);
57656
57656
  if (de && (F = bc(de).baseMediaDecodeTime), _e.length && he) {
57657
- const Be = Th(_e, F, he);
57657
+ const Fe = Th(_e, F, he);
57658
57658
  let st = 0;
57659
- Be.forEach(function(Ue) {
57659
+ Fe.forEach(function(Ue) {
57660
57660
  const Et = "utf-8", $t = new TextDecoder(Et), Pr = te.slice(st, st + Ue.size);
57661
57661
  if (Ss(Pr, ["vtte"])[0]) {
57662
57662
  st += Ue.size;
@@ -57842,7 +57842,7 @@ browserWorkerPolyFill(self);
57842
57842
  k--, F--;
57843
57843
  }
57844
57844
  }, ws = function(y, C, D) {
57845
- for (var k = 0, F = ur, V, te, oe, de, he, _e, Be, st, Ue = !1, Et = {
57845
+ for (var k = 0, F = ur, V, te, oe, de, he, _e, Fe, st, Ue = !1, Et = {
57846
57846
  data: [],
57847
57847
  size: 0
57848
57848
  }; F < y.byteLength; ) {
@@ -57851,8 +57851,8 @@ browserWorkerPolyFill(self);
57851
57851
  case "pes":
57852
57852
  if (oe = hn.ts.parsePesType(V, C.table), de = hn.ts.parsePayloadUnitStartIndicator(V), oe === "video" && (de && !Ue && (he = hn.ts.parsePesTime(V), he && (he.type = "video", D.video.push(he), Ue = !0)), !D.firstKeyFrame)) {
57853
57853
  if (de && Et.size !== 0) {
57854
- for (_e = new Uint8Array(Et.size), Be = 0; Et.data.length; )
57855
- st = Et.data.shift(), _e.set(st, Be), Be += st.byteLength;
57854
+ for (_e = new Uint8Array(Et.size), Fe = 0; Et.data.length; )
57855
+ st = Et.data.shift(), _e.set(st, Fe), Fe += st.byteLength;
57856
57856
  if (hn.ts.videoPacketContainsKeyFrame(_e)) {
57857
57857
  var $t = hn.ts.parsePesTime(_e);
57858
57858
  $t ? (D.firstKeyFrame = $t, D.firstKeyFrame.type = "video") : console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.");
@@ -66238,15 +66238,9 @@ const kde = (t) => Lf(t) ? iP(t) ? t : "" : t, Pde = ({
66238
66238
  disableCut: !Lf((n == null ? void 0 : n.videoLink) || "")
66239
66239
  }), aee({
66240
66240
  videoSrc: n == null ? void 0 : n.videoLink
66241
- }), nn(() => () => {
66241
+ }), rn(() => () => {
66242
66242
  a(""), i();
66243
- }, [a, i]), nn(() => {
66244
- console.log("Current timestampRanges:", b);
66245
- const j = b.filter(
66246
- (q) => q.startSeconds !== null && q.endSeconds !== null
66247
- );
66248
- console.log("Valid ranges for highlighting:", j);
66249
- }, [b]), nn(() => {
66243
+ }, [a, i]), rn(() => {
66250
66244
  (() => {
66251
66245
  try {
66252
66246
  setTimeout(() => {
@@ -66258,7 +66252,7 @@ const kde = (t) => Lf(t) ? iP(t) ? t : "" : t, Pde = ({
66258
66252
  console.error("Error disabling autoplay:", q);
66259
66253
  }
66260
66254
  })();
66261
- }, []), nn(() => {
66255
+ }, []), rn(() => {
66262
66256
  const j = b.filter((q) => q.start && q.end).map((q, ne) => ({
66263
66257
  _id: String(ne),
66264
66258
  id: String(ne),
@@ -66297,7 +66291,7 @@ const kde = (t) => Lf(t) ? iP(t) ? t : "" : t, Pde = ({
66297
66291
  }
66298
66292
  }));
66299
66293
  l(j);
66300
- }, [b, l, n == null ? void 0 : n.videoLink]), nn(() => {
66294
+ }, [b, l, n == null ? void 0 : n.videoLink]), rn(() => {
66301
66295
  if (!h.current) return;
66302
66296
  const j = () => {
66303
66297
  var ve, ge, Z, ie, ee, ue;
@@ -66376,9 +66370,9 @@ const kde = (t) => Lf(t) ? iP(t) ? t : "" : t, Pde = ({
66376
66370
  return !0;
66377
66371
  return !1;
66378
66372
  };
66379
- return nn(() => {
66373
+ return rn(() => {
66380
66374
  h.current && (h.current.dispose(), h.current = null);
66381
- }, [M]), nn(() => {
66375
+ }, [M]), rn(() => {
66382
66376
  if (M && !h.current) {
66383
66377
  const j = Lf(M), q = !j && rU(M) === "audio", ne = document.createElement("video-js");
66384
66378
  ne.classList.add("vjs-big-play-centered", "vjs-theme-city"), j ? ne.classList.add("vjs-youtube") : q && ne.classList.add("vjs-default-skin", "videojs-audio"), c.current && c.current.appendChild(ne);
@@ -66502,7 +66496,7 @@ const kde = (t) => Lf(t) ? iP(t) ? t : "" : t, Pde = ({
66502
66496
  S,
66503
66497
  P,
66504
66498
  $
66505
- ]), nn(() => {
66499
+ ]), rn(() => {
66506
66500
  var q;
66507
66501
  const j = h.current;
66508
66502
  if ((q = j == null ? void 0 : j.textTracks()) != null && q.length && G(j), j && (t == null ? void 0 : t.length) !== 0) {
@@ -66515,9 +66509,9 @@ const kde = (t) => Lf(t) ? iP(t) ? t : "" : t, Pde = ({
66515
66509
  se && (se.innerHTML = X9);
66516
66510
  }
66517
66511
  }
66518
- }, [t]), nn(() => {
66512
+ }, [t]), rn(() => {
66519
66513
  h.current && $(h.current);
66520
- }, [b, $]), nn(() => {
66514
+ }, [b, $]), rn(() => {
66521
66515
  const j = h.current;
66522
66516
  return () => {
66523
66517
  p.current && cancelAnimationFrame(p.current), j && !j.isDisposed() && (j.dispose(), h.current = null);
@@ -66571,7 +66565,7 @@ const kde = (t) => Lf(t) ? iP(t) ? t : "" : t, Pde = ({
66571
66565
  return !0;
66572
66566
  return !1;
66573
66567
  };
66574
- return nn(() => {
66568
+ return rn(() => {
66575
66569
  if (b && !i.current) {
66576
66570
  const _ = Lf(b), E = !_ && rU(b) === "audio", P = document.createElement("video-js");
66577
66571
  P.classList.add("vjs-big-play-centered", "vjs-theme-city"), _ ? P.classList.add("vjs-youtube") : E && P.classList.add("vjs-default-skin", "videojs-audio"), r.current && r.current.appendChild(P);
@@ -66692,7 +66686,7 @@ const kde = (t) => Lf(t) ? iP(t) ? t : "" : t, Pde = ({
66692
66686
  c,
66693
66687
  l,
66694
66688
  m
66695
- ]), nn(() => {
66689
+ ]), rn(() => {
66696
66690
  var E;
66697
66691
  const _ = i.current;
66698
66692
  if ((E = _ == null ? void 0 : _.textTracks()) != null && E.length && S(_), _ && (t == null ? void 0 : t.length) !== 0) {
@@ -66702,7 +66696,7 @@ const kde = (t) => Lf(t) ? iP(t) ? t : "" : t, Pde = ({
66702
66696
  const M = _.controlBar.getChild("SubsCapsButton").items[0].el().lastElementChild;
66703
66697
  M && (M.innerHTML = X9);
66704
66698
  }
66705
- }, [t]), nn(() => {
66699
+ }, [t]), rn(() => {
66706
66700
  const _ = i.current;
66707
66701
  return () => {
66708
66702
  _ && !_.isDisposed() && (_.dispose(), i.current = null);
@@ -69516,7 +69510,7 @@ function gpe() {
69516
69510
  if (t === null)
69517
69511
  return [!0, null];
69518
69512
  const { isPresent: e, onExitComplete: n, register: r } = t, i = YX();
69519
- nn(() => r(i), []);
69513
+ rn(() => r(i), []);
69520
69514
  const a = Bi(() => n && n(i), [i, n]);
69521
69515
  return !e && n ? [!1, a] : [!0];
69522
69516
  }
@@ -70533,7 +70527,7 @@ const fme = {
70533
70527
  transformPagePoint: (t) => t,
70534
70528
  isStatic: !1,
70535
70529
  reducedMotion: "never"
70536
- }), o2 = $v({}), kP = typeof window < "u", pme = kP ? c6 : nn, c$ = $v({ strict: !1 });
70530
+ }), o2 = $v({}), kP = typeof window < "u", pme = kP ? c6 : rn, c$ = $v({ strict: !1 });
70537
70531
  function mme(t, e, n, r, i) {
70538
70532
  var a, l;
70539
70533
  const { visualElement: c } = qa(o2), h = qa(c$), p = qa(AP), m = qa(u$).reducedMotion, b = Cr(null);
@@ -70554,7 +70548,7 @@ function mme(t, e, n, r, i) {
70554
70548
  const _ = n[LV], E = Cr(!!_ && !(!((a = window.MotionHandoffIsComplete) === null || a === void 0) && a.call(window, _)) && ((l = window.MotionHasOptimisedAnimation) === null || l === void 0 ? void 0 : l.call(window, _)));
70555
70549
  return pme(() => {
70556
70550
  x && (A.current = !0, window.MotionIsMounted = !0, x.updateFeatures(), RP.render(x.render), E.current && x.animationState && x.animationState.animateChanges());
70557
- }), nn(() => {
70551
+ }), rn(() => {
70558
70552
  x && (!E.current && x.animationState && x.animationState.animateChanges(), E.current && (queueMicrotask(() => {
70559
70553
  var P;
70560
70554
  (P = window.MotionHandoffMarkAsComplete) === null || P === void 0 || P.call(window, _);
@@ -73743,7 +73737,7 @@ const Kge = Age, Xge = Rge, Qge = Cge, Zge = Pge, Jge = Ege, D8 = wge, eve = kge
73743
73737
  platform: a
73744
73738
  });
73745
73739
  };
73746
- var CS = typeof document < "u" ? c6 : nn;
73740
+ var CS = typeof document < "u" ? c6 : rn;
73747
73741
  function gx(t, e) {
73748
73742
  if (t === e)
73749
73743
  return !0;
@@ -73987,7 +73981,7 @@ var Z$ = "PopperAnchor", J$ = N.forwardRef(
73987
73981
  J$.displayName = Z$;
73988
73982
  var qP = "PopperContent", [ave, ove] = K$(qP), ej = N.forwardRef(
73989
73983
  (t, e) => {
73990
- var Ne, Fe, We, Ye, at, Ve;
73984
+ var Ne, Be, We, Ye, at, Ve;
73991
73985
  const {
73992
73986
  __scopePopper: n,
73993
73987
  side: r = "bottom",
@@ -74042,7 +74036,7 @@ var qP = "PopperContent", [ave, ove] = K$(qP), ej = N.forwardRef(
74042
74036
  zs(() => {
74043
74037
  ge && (ue == null || ue());
74044
74038
  }, [ge, ue]);
74045
- const Te = (Ne = Z.arrow) == null ? void 0 : Ne.x, Ce = (Fe = Z.arrow) == null ? void 0 : Fe.y, Pe = ((We = Z.arrow) == null ? void 0 : We.centerOffset) !== 0, [He, Ze] = N.useState();
74039
+ const Te = (Ne = Z.arrow) == null ? void 0 : Ne.x, Ce = (Be = Z.arrow) == null ? void 0 : Be.y, Pe = ((We = Z.arrow) == null ? void 0 : We.centerOffset) !== 0, [He, Ze] = N.useState();
74046
74040
  return zs(() => {
74047
74041
  P && Ze(window.getComputedStyle(P).zIndex);
74048
74042
  }, [P]), /* @__PURE__ */ z(
@@ -74306,20 +74300,20 @@ var CR = "TooltipTrigger", fj = N.forwardRef(
74306
74300
  "data-state": i.stateAttribute,
74307
74301
  ...r,
74308
74302
  ref: h,
74309
- onPointerMove: rn(t.onPointerMove, (x) => {
74303
+ onPointerMove: nn(t.onPointerMove, (x) => {
74310
74304
  x.pointerType !== "touch" && !m.current && !a.isPointerInTransitRef.current && (i.onTriggerEnter(), m.current = !0);
74311
74305
  }),
74312
- onPointerLeave: rn(t.onPointerLeave, () => {
74306
+ onPointerLeave: nn(t.onPointerLeave, () => {
74313
74307
  i.onTriggerLeave(), m.current = !1;
74314
74308
  }),
74315
- onPointerDown: rn(t.onPointerDown, () => {
74309
+ onPointerDown: nn(t.onPointerDown, () => {
74316
74310
  p.current = !0, document.addEventListener("pointerup", b, { once: !0 });
74317
74311
  }),
74318
- onFocus: rn(t.onFocus, () => {
74312
+ onFocus: nn(t.onFocus, () => {
74319
74313
  p.current || i.onOpen();
74320
74314
  }),
74321
- onBlur: rn(t.onBlur, i.onClose),
74322
- onClick: rn(t.onClick, i.onClose)
74315
+ onBlur: nn(t.onBlur, i.onClose),
74316
+ onClick: nn(t.onClick, i.onClose)
74323
74317
  }
74324
74318
  ) });
74325
74319
  }
@@ -74560,7 +74554,7 @@ const Nve = (t, e, n = 30) => {
74560
74554
  ),
74561
74555
  [t.timestamp_start, t.timestamp_end, n]
74562
74556
  ), [m, b] = Sn(p - 35);
74563
- return nn(() => {
74557
+ return rn(() => {
74564
74558
  l(
74565
74559
  qn(
74566
74560
  "00:00:000",
@@ -74994,7 +74988,7 @@ var KP = "Switch", [Wve, s_e] = Wf(KP), [Gve, Yve] = Wve(KP), Aj = N.forwardRef(
74994
74988
  value: h,
74995
74989
  ...b,
74996
74990
  ref: A,
74997
- onClick: rn(t.onClick, (I) => {
74991
+ onClick: nn(t.onClick, (I) => {
74998
74992
  M(($) => !$), E && (_.current = I.isPropagationStopped(), _.current || I.stopPropagation());
74999
74993
  })
75000
74994
  }
@@ -75265,7 +75259,7 @@ const P8 = Bl(
75265
75259
  setTranscript: S,
75266
75260
  setTranscriptId: A
75267
75261
  }) => {
75268
- const { refreshTrimmedClips: _, refreshTrimmedDirectory: E } = YR(), { videoIsReady: P, videoDuration: M } = $n(), { focusTrimmedClip: I, setFocusTrimmedClip: $ } = VR(), { setAlertDialog: B } = Rx(), { trimmedClips: W } = Up(), { mainFilePath: G } = ov(), { getTrimmedClip: X, updateTrimClip: j } = WR(), q = Cr(null), ne = Cr(null), se = Cr(!1), [re, ce] = Sn(!1), [ye, ve] = Sn(!1), [ge, Z] = Sn(a), [ie, ee] = Sn(!1), [ue, Te] = Sn(!1), [Ce, Pe] = Sn(!1), [He, Ze] = Sn(!1), [Ne, Fe] = Sn(
75262
+ const { refreshTrimmedClips: _, refreshTrimmedDirectory: E } = YR(), { videoIsReady: P, videoDuration: M } = $n(), { focusTrimmedClip: I, setFocusTrimmedClip: $ } = VR(), { setAlertDialog: B } = Rx(), { trimmedClips: W } = Up(), { mainFilePath: G } = ov(), { getTrimmedClip: X, updateTrimClip: j } = WR(), q = Cr(null), ne = Cr(null), se = Cr(!1), [re, ce] = Sn(!1), [ye, ve] = Sn(!1), [ge, Z] = Sn(a), [ie, ee] = Sn(!1), [ue, Te] = Sn(!1), [Ce, Pe] = Sn(!1), [He, Ze] = Sn(!1), [Ne, Be] = Sn(
75269
75263
  qn("00:00:00", r, n)
75270
75264
  ), [We, Ye] = Sn(
75271
75265
  qn("00:00:00", i, n)
@@ -75277,12 +75271,12 @@ const P8 = Bl(
75277
75271
  (b == null ? void 0 : b.map((sn) => ({ ...sn, headstart: r }))) || []
75278
75272
  ), A && A(t);
75279
75273
  };
75280
- nn(() => {
75274
+ rn(() => {
75281
75275
  cn <= 250 ? ve(!0) : ve(!1);
75282
- }, [cn, r, i]), nn(() => {
75276
+ }, [cn, r, i]), rn(() => {
75283
75277
  var sn;
75284
75278
  I && I === t ? (ce(!0), (sn = q.current) == null || sn.focus()) : ce(!1);
75285
- }, [I]), nn(() => (yn = async () => {
75279
+ }, [I]), rn(() => (yn = async () => {
75286
75280
  var sn;
75287
75281
  try {
75288
75282
  const dn = await (X == null ? void 0 : X({
@@ -75320,10 +75314,10 @@ const P8 = Bl(
75320
75314
  }, h ? ee(!1) : P && l && yn(), () => {
75321
75315
  yn = () => {
75322
75316
  };
75323
- }), [l, c]), nn(() => {
75317
+ }), [l, c]), rn(() => {
75324
75318
  l && c === "done" && !h && ee(!1);
75325
- }, [l, c, h]), nn(() => {
75326
- Fe(
75319
+ }, [l, c, h]), rn(() => {
75320
+ Be(
75327
75321
  qn("00:00:00", r, n)
75328
75322
  ), Ye(qn("00:00:00", i, n));
75329
75323
  }, [n, r, i]);
@@ -75393,7 +75387,7 @@ const P8 = Bl(
75393
75387
  console.error("Error updating trimmed clip:", Nn), Wo({
75394
75388
  description: ((er = (an = Nn == null ? void 0 : Nn.response) == null ? void 0 : an.data) == null ? void 0 : er.server_response) || "Failed to update trim points",
75395
75389
  variant: "destructive"
75396
- }), Fe(
75390
+ }), Be(
75397
75391
  qn("00:00:00", r, n)
75398
75392
  ), Ye(
75399
75393
  qn("00:00:00", i, n)
@@ -75457,7 +75451,7 @@ const P8 = Bl(
75457
75451
  We - Lt
75458
75452
  ),
75459
75453
  mn
75460
- ), Fe(an);
75454
+ ), Be(an);
75461
75455
  const In = an / n, kn = po(In);
75462
75456
  Ve(kn || "");
75463
75457
  }, Nn = () => {
@@ -75664,7 +75658,7 @@ const P8 = Bl(
75664
75658
  };
75665
75659
  let E = () => {
75666
75660
  };
75667
- return nn(() => (E = async () => {
75661
+ return rn(() => (E = async () => {
75668
75662
  var M, I, $, B, W, G;
75669
75663
  if (m)
75670
75664
  try {
@@ -75689,7 +75683,7 @@ const P8 = Bl(
75689
75683
  }, m && !m.redirect_url && E(), () => {
75690
75684
  E = () => {
75691
75685
  };
75692
- }), [m == null ? void 0 : m.process_status]), nn(() => {
75686
+ }), [m == null ? void 0 : m.process_status]), rn(() => {
75693
75687
  var M;
75694
75688
  (m == null ? void 0 : m.process_status) === "error" || (M = m == null ? void 0 : m.process_status) != null && M.includes("error") ? Wo({
75695
75689
  title: m.process_status.split("_").join(" "),
@@ -75866,7 +75860,7 @@ const n0e = ({
75866
75860
  const m = e < 15 ? 3 : e < 30 ? 2 : e < 50 ? 1 : 0;
75867
75861
  return t[m];
75868
75862
  }, [e, t]);
75869
- return nn(() => {
75863
+ return rn(() => {
75870
75864
  if (!p) return;
75871
75865
  const m = new Image();
75872
75866
  return m.src = p, a(!0), c(!1), m.onload = () => {
@@ -76001,13 +75995,13 @@ const a0e = va(Nj), o0e = ({
76001
75995
  () => po(A),
76002
75996
  [A]
76003
75997
  );
76004
- nn(() => {
75998
+ rn(() => {
76005
75999
  r && B(r);
76006
76000
  }, [r]);
76007
76001
  const se = sr(() => {
76008
- const [Fe, We, Ye] = ne.split(":").map((Gt) => +Gt), [at] = l3(
76002
+ const [Be, We, Ye] = ne.split(":").map((Gt) => +Gt), [at] = l3(
76009
76003
  new Date(2e3, 0, 1, 0, 0, 0),
76010
- new Date(2e3, 0, 1, Fe, We, Ye),
76004
+ new Date(2e3, 0, 1, Be, We, Ye),
76011
76005
  {
76012
76006
  unit: "second"
76013
76007
  }
@@ -76036,15 +76030,15 @@ const a0e = va(Nj), o0e = ({
76036
76030
  );
76037
76031
  }
76038
76032
  const wt = [
76039
- Vg(Fe || 0, 2),
76033
+ Vg(Be || 0, 2),
76040
76034
  Vg(We || 0, 2),
76041
76035
  Vg(Ye || 0, 2)
76042
76036
  ].join(":");
76043
76037
  return _t.includes(wt) || _t.push(wt), _t;
76044
76038
  }, [ne, t]), re = sr(() => {
76045
- const [Fe, We, Ye] = ne.split(":").map((Ve) => +Ve), [at] = l3(
76039
+ const [Be, We, Ye] = ne.split(":").map((Ve) => +Ve), [at] = l3(
76046
76040
  new Date(2e3, 0, 1, 0, 0, 0),
76047
- new Date(2e3, 0, 1, Fe, We, Ye),
76041
+ new Date(2e3, 0, 1, Be, We, Ye),
76048
76042
  {
76049
76043
  unit: "second"
76050
76044
  }
@@ -76052,40 +76046,40 @@ const a0e = va(Nj), o0e = ({
76052
76046
  return +at * $;
76053
76047
  }, [ne, $]), ce = sr(() => {
76054
76048
  if (se) {
76055
- const Fe = se[se.length - 1] || "00:00:00.000";
76056
- return qn(ne, Fe, $);
76049
+ const Be = se[se.length - 1] || "00:00:00.000";
76050
+ return qn(ne, Be, $);
76057
76051
  }
76058
76052
  return 0;
76059
- }, [ne, se, $]), ye = (Fe) => {
76060
- a.current && (a.current.scrollLeft = c3(Fe, $));
76053
+ }, [ne, se, $]), ye = (Be) => {
76054
+ a.current && (a.current.scrollLeft = c3(Be, $));
76061
76055
  };
76062
- nn(() => {
76056
+ rn(() => {
76063
76057
  ye(_);
76064
- }, [_, $, a.current]), nn(() => {
76058
+ }, [_, $, a.current]), rn(() => {
76065
76059
  if (c.current && _ !== void 0) {
76066
- const Fe = c3(_, $);
76067
- Fe < 0 ? c.current.style.left = "0px" : c.current.style.left = `${Fe}px`;
76060
+ const Be = c3(_, $);
76061
+ Be < 0 ? c.current.style.left = "0px" : c.current.style.left = `${Be}px`;
76068
76062
  }
76069
76063
  }, [_, t]);
76070
76064
  const ve = () => {
76071
- const Fe = Math.max(
76065
+ const Be = Math.max(
76072
76066
  ...(W || []).map(
76073
76067
  (We) => pt(
76074
76068
  We.end_timestamp_drag ? We.end_timestamp_drag : We.timestamp_two
76075
76069
  )
76076
76070
  )
76077
76071
  );
76078
- if (Fe) {
76079
- const We = (W || []).find((Ye) => (Ye.end_timestamp_drag ? Ye.end_timestamp_drag : Ye.timestamp_two) === po(Fe));
76072
+ if (Be) {
76073
+ const We = (W || []).find((Ye) => (Ye.end_timestamp_drag ? Ye.end_timestamp_drag : Ye.timestamp_two) === po(Be));
76080
76074
  return We == null ? void 0 : We._id;
76081
76075
  } else
76082
76076
  return 0;
76083
76077
  }, ge = () => {
76084
76078
  if (W && W.length) {
76085
- const Fe = ve();
76086
- if (console.log(Fe), Fe && Fe !== "") {
76079
+ const Be = ve();
76080
+ if (Be && Be !== "") {
76087
76081
  const We = W == null ? void 0 : W.find(
76088
- (Ye) => Ye._id === Fe
76082
+ (Ye) => Ye._id === Be
76089
76083
  );
76090
76084
  if (We) {
76091
76085
  const Ye = We.end_timestamp_drag ? We.end_timestamp_drag : We.timestamp_two;
@@ -76103,15 +76097,15 @@ const a0e = va(Nj), o0e = ({
76103
76097
  po(A),
76104
76098
  $
76105
76099
  ), [ie, ee] = Sn(!0);
76106
- nn(() => {
76100
+ rn(() => {
76107
76101
  ee(!0);
76108
- let Fe = null;
76102
+ let Be = null;
76109
76103
  return setTimeout(async () => {
76110
76104
  if (!p || !l.current) {
76111
76105
  ee(!1);
76112
76106
  return;
76113
76107
  }
76114
- l.current instanceof Fv && l.current.destroy(), Fe = Fv.create({
76108
+ l.current instanceof Fv && l.current.destroy(), Be = Fv.create({
76115
76109
  container: "#waveform",
76116
76110
  height: "auto",
76117
76111
  waveColor: "#717171",
@@ -76130,17 +76124,17 @@ const a0e = va(Nj), o0e = ({
76130
76124
  // url: audioSrc,
76131
76125
  });
76132
76126
  try {
76133
- await Fe.load(p, G), l.current = Fe, ee(!1);
76127
+ await Be.load(p, G), l.current = Be, ee(!1);
76134
76128
  } catch (Ye) {
76135
76129
  console.error("Error loading waveform:", Ye), ee(!1);
76136
76130
  }
76137
76131
  }, 100), () => {
76138
- Fe && Fe.destroy();
76132
+ Be && Be.destroy();
76139
76133
  };
76140
76134
  }, [p, m, G, X, M, l]);
76141
- const ue = (Fe) => Fe / $, Te = (Fe) => {
76142
- let We = ue(Fe);
76143
- Fe < 0 && (We = 0), Fe > re && (We = re);
76135
+ const ue = (Be) => Be / $, Te = (Be) => {
76136
+ let We = ue(Be);
76137
+ Be < 0 && (We = 0), Be > re && (We = re);
76144
76138
  const Ye = We < 1 ? 0 : We;
76145
76139
  E(Ye), S.currentTime(Ye);
76146
76140
  }, Ce = sr(
@@ -76408,8 +76402,8 @@ const f0e = ({ className: t }) => /* @__PURE__ */ ut(
76408
76402
  access_token: c
76409
76403
  }, Te = btoa(JSON.stringify(ee)).replace(/=/g, ""), Ce = btoa(JSON.stringify(ue)).replace(/=/g, ""), Pe = `${Te}.${Ce}.`, He = new EventSource(`${p}/api/v2/trimmed?token=${encodeURIComponent(Pe)}`), Ze = [];
76410
76404
  He.onmessage = (Ne) => {
76411
- const Fe = JSON.parse(Ne.data);
76412
- Fe.success && Fe.data && Fe.data.files && Ze.push(Fe.data.files), Fe.finished === !0 && (P(Ze), He.close());
76405
+ const Be = JSON.parse(Ne.data);
76406
+ Be.success && Be.data && Be.data.files && Ze.push(Be.data.files), Be.finished === !0 && (P(Ze), He.close());
76413
76407
  }, He.onerror = () => {
76414
76408
  P([]), He.close();
76415
76409
  }, I(null);
@@ -76461,7 +76455,7 @@ const f0e = ({ className: t }) => /* @__PURE__ */ ut(
76461
76455
  }
76462
76456
  }
76463
76457
  };
76464
- return nn(() => {
76458
+ return rn(() => {
76465
76459
  t && ne && ge();
76466
76460
  }, [l]), /* @__PURE__ */ ut("div", { className: "w-full", children: [
76467
76461
  u0e(e) ? /* @__PURE__ */ z("div", { className: ct("w-full flex-row items-center gap-[5px] pb-2"), children: /* @__PURE__ */ ut(
@@ -76598,7 +76592,7 @@ const f0e = ({ className: t }) => /* @__PURE__ */ ut(
76598
76592
  ), x = GR((E) => E.setOutputFiles), S = ov((E) => E.setMainFilePath), A = ov(
76599
76593
  (E) => E.setTrimmedFilePath
76600
76594
  ), { getDirectory: _ } = qR();
76601
- return nn(() => {
76595
+ return rn(() => {
76602
76596
  const E = async () => {
76603
76597
  try {
76604
76598
  c(!0);
@@ -76817,7 +76811,7 @@ function y0e() {
76817
76811
  function Ne(Ve) {
76818
76812
  return $(Ve) === S;
76819
76813
  }
76820
- function Fe(Ve) {
76814
+ function Be(Ve) {
76821
76815
  return $(Ve) === n;
76822
76816
  }
76823
76817
  function We(Ve) {
@@ -76829,7 +76823,7 @@ function y0e() {
76829
76823
  function at(Ve) {
76830
76824
  return $(Ve) === b;
76831
76825
  }
76832
- Qn.AsyncMode = B, Qn.ConcurrentMode = W, Qn.ContextConsumer = G, Qn.ContextProvider = X, Qn.Element = j, Qn.ForwardRef = q, Qn.Fragment = ne, Qn.Lazy = se, Qn.Memo = re, Qn.Portal = ce, Qn.Profiler = ye, Qn.StrictMode = ve, Qn.Suspense = ge, Qn.isAsyncMode = ie, Qn.isConcurrentMode = ee, Qn.isContextConsumer = ue, Qn.isContextProvider = Te, Qn.isElement = Ce, Qn.isForwardRef = Pe, Qn.isFragment = He, Qn.isLazy = Ze, Qn.isMemo = Ne, Qn.isPortal = Fe, Qn.isProfiler = We, Qn.isStrictMode = Ye, Qn.isSuspense = at, Qn.isValidElementType = I, Qn.typeOf = $;
76826
+ Qn.AsyncMode = B, Qn.ConcurrentMode = W, Qn.ContextConsumer = G, Qn.ContextProvider = X, Qn.Element = j, Qn.ForwardRef = q, Qn.Fragment = ne, Qn.Lazy = se, Qn.Memo = re, Qn.Portal = ce, Qn.Profiler = ye, Qn.StrictMode = ve, Qn.Suspense = ge, Qn.isAsyncMode = ie, Qn.isConcurrentMode = ee, Qn.isContextConsumer = ue, Qn.isContextProvider = Te, Qn.isElement = Ce, Qn.isForwardRef = Pe, Qn.isFragment = He, Qn.isLazy = Ze, Qn.isMemo = Ne, Qn.isPortal = Be, Qn.isProfiler = We, Qn.isStrictMode = Ye, Qn.isSuspense = at, Qn.isValidElementType = I, Qn.typeOf = $;
76833
76827
  }()), Qn;
76834
76828
  }
76835
76829
  var F8;
@@ -77002,31 +76996,31 @@ function _0e() {
77002
76996
  function E(ee) {
77003
76997
  if (process.env.NODE_ENV !== "production")
77004
76998
  var ue = {}, Te = 0;
77005
- function Ce(He, Ze, Ne, Fe, We, Ye, at) {
77006
- if (Fe = Fe || x, Ye = Ye || Ne, at !== n) {
76999
+ function Ce(He, Ze, Ne, Be, We, Ye, at) {
77000
+ if (Be = Be || x, Ye = Ye || Ne, at !== n) {
77007
77001
  if (h) {
77008
77002
  var Ve = new Error(
77009
77003
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
77010
77004
  );
77011
77005
  throw Ve.name = "Invariant Violation", Ve;
77012
77006
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
77013
- var _t = Fe + ":" + Ne;
77007
+ var _t = Be + ":" + Ne;
77014
77008
  !ue[_t] && // Avoid spamming the console because they are often not actionable except for lib authors
77015
77009
  Te < 3 && (a(
77016
- "You are manually calling a React.PropTypes validation function for the `" + Ye + "` prop on `" + Fe + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
77010
+ "You are manually calling a React.PropTypes validation function for the `" + Ye + "` prop on `" + Be + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
77017
77011
  ), ue[_t] = !0, Te++);
77018
77012
  }
77019
77013
  }
77020
- return Ze[Ne] == null ? He ? Ze[Ne] === null ? new _("The " + We + " `" + Ye + "` is marked as required " + ("in `" + Fe + "`, but its value is `null`.")) : new _("The " + We + " `" + Ye + "` is marked as required in " + ("`" + Fe + "`, but its value is `undefined`.")) : null : ee(Ze, Ne, Fe, We, Ye);
77014
+ return Ze[Ne] == null ? He ? Ze[Ne] === null ? new _("The " + We + " `" + Ye + "` is marked as required " + ("in `" + Be + "`, but its value is `null`.")) : new _("The " + We + " `" + Ye + "` is marked as required in " + ("`" + Be + "`, but its value is `undefined`.")) : null : ee(Ze, Ne, Be, We, Ye);
77021
77015
  }
77022
77016
  var Pe = Ce.bind(null, !1);
77023
77017
  return Pe.isRequired = Ce.bind(null, !0), Pe;
77024
77018
  }
77025
77019
  function P(ee) {
77026
77020
  function ue(Te, Ce, Pe, He, Ze, Ne) {
77027
- var Fe = Te[Ce], We = ve(Fe);
77021
+ var Be = Te[Ce], We = ve(Be);
77028
77022
  if (We !== ee) {
77029
- var Ye = ge(Fe);
77023
+ var Ye = ge(Be);
77030
77024
  return new _(
77031
77025
  "Invalid " + He + " `" + Ze + "` of type " + ("`" + Ye + "` supplied to `" + Pe + "`, expected ") + ("`" + ee + "`."),
77032
77026
  { expectedType: ee }
@@ -77045,8 +77039,8 @@ function _0e() {
77045
77039
  return new _("Property `" + Ze + "` of component `" + Pe + "` has invalid PropType notation inside arrayOf.");
77046
77040
  var Ne = Te[Ce];
77047
77041
  if (!Array.isArray(Ne)) {
77048
- var Fe = ve(Ne);
77049
- return new _("Invalid " + He + " `" + Ze + "` of type " + ("`" + Fe + "` supplied to `" + Pe + "`, expected an array."));
77042
+ var Be = ve(Ne);
77043
+ return new _("Invalid " + He + " `" + Ze + "` of type " + ("`" + Be + "` supplied to `" + Pe + "`, expected an array."));
77050
77044
  }
77051
77045
  for (var We = 0; We < Ne.length; We++) {
77052
77046
  var Ye = ee(Ne, We, Pe, He, Ze + "[" + We + "]", n);
@@ -77082,8 +77076,8 @@ function _0e() {
77082
77076
  function W(ee) {
77083
77077
  function ue(Te, Ce, Pe, He, Ze) {
77084
77078
  if (!(Te[Ce] instanceof ee)) {
77085
- var Ne = ee.name || x, Fe = ie(Te[Ce]);
77086
- return new _("Invalid " + He + " `" + Ze + "` of type " + ("`" + Fe + "` supplied to `" + Pe + "`, expected ") + ("instance of `" + Ne + "`."));
77079
+ var Ne = ee.name || x, Be = ie(Te[Ce]);
77080
+ return new _("Invalid " + He + " `" + Ze + "` of type " + ("`" + Be + "` supplied to `" + Pe + "`, expected ") + ("instance of `" + Ne + "`."));
77087
77081
  }
77088
77082
  return null;
77089
77083
  }
@@ -77095,8 +77089,8 @@ function _0e() {
77095
77089
  "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
77096
77090
  ) : a("Invalid argument supplied to oneOf, expected an array.")), l;
77097
77091
  function ue(Te, Ce, Pe, He, Ze) {
77098
- for (var Ne = Te[Ce], Fe = 0; Fe < ee.length; Fe++)
77099
- if (A(Ne, ee[Fe]))
77092
+ for (var Ne = Te[Ce], Be = 0; Be < ee.length; Be++)
77093
+ if (A(Ne, ee[Be]))
77100
77094
  return null;
77101
77095
  var We = JSON.stringify(ee, function(at, Ve) {
77102
77096
  var _t = ge(Ve);
@@ -77110,9 +77104,9 @@ function _0e() {
77110
77104
  function ue(Te, Ce, Pe, He, Ze) {
77111
77105
  if (typeof ee != "function")
77112
77106
  return new _("Property `" + Ze + "` of component `" + Pe + "` has invalid PropType notation inside objectOf.");
77113
- var Ne = Te[Ce], Fe = ve(Ne);
77114
- if (Fe !== "object")
77115
- return new _("Invalid " + He + " `" + Ze + "` of type " + ("`" + Fe + "` supplied to `" + Pe + "`, expected an object."));
77107
+ var Ne = Te[Ce], Be = ve(Ne);
77108
+ if (Be !== "object")
77109
+ return new _("Invalid " + He + " `" + Ze + "` of type " + ("`" + Be + "` supplied to `" + Pe + "`, expected an object."));
77116
77110
  for (var We in Ne)
77117
77111
  if (r(Ne, We)) {
77118
77112
  var Ye = ee(Ne, We, Pe, He, Ze + "." + We, n);
@@ -77133,15 +77127,15 @@ function _0e() {
77133
77127
  "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Z(Te) + " at index " + ue + "."
77134
77128
  ), l;
77135
77129
  }
77136
- function Ce(Pe, He, Ze, Ne, Fe) {
77130
+ function Ce(Pe, He, Ze, Ne, Be) {
77137
77131
  for (var We = [], Ye = 0; Ye < ee.length; Ye++) {
77138
- var at = ee[Ye], Ve = at(Pe, He, Ze, Ne, Fe, n);
77132
+ var at = ee[Ye], Ve = at(Pe, He, Ze, Ne, Be, n);
77139
77133
  if (Ve == null)
77140
77134
  return null;
77141
77135
  Ve.data && r(Ve.data, "expectedType") && We.push(Ve.data.expectedType);
77142
77136
  }
77143
77137
  var _t = We.length > 0 ? ", expected one of type [" + We.join(", ") + "]" : "";
77144
- return new _("Invalid " + Ne + " `" + Fe + "` supplied to " + ("`" + Ze + "`" + _t + "."));
77138
+ return new _("Invalid " + Ne + " `" + Be + "` supplied to " + ("`" + Ze + "`" + _t + "."));
77145
77139
  }
77146
77140
  return E(Ce);
77147
77141
  }
@@ -77158,9 +77152,9 @@ function _0e() {
77158
77152
  }
77159
77153
  function se(ee) {
77160
77154
  function ue(Te, Ce, Pe, He, Ze) {
77161
- var Ne = Te[Ce], Fe = ve(Ne);
77162
- if (Fe !== "object")
77163
- return new _("Invalid " + He + " `" + Ze + "` of type `" + Fe + "` " + ("supplied to `" + Pe + "`, expected `object`."));
77155
+ var Ne = Te[Ce], Be = ve(Ne);
77156
+ if (Be !== "object")
77157
+ return new _("Invalid " + He + " `" + Ze + "` of type `" + Be + "` " + ("supplied to `" + Pe + "`, expected `object`."));
77164
77158
  for (var We in ee) {
77165
77159
  var Ye = ee[We];
77166
77160
  if (typeof Ye != "function")
@@ -77175,9 +77169,9 @@ function _0e() {
77175
77169
  }
77176
77170
  function re(ee) {
77177
77171
  function ue(Te, Ce, Pe, He, Ze) {
77178
- var Ne = Te[Ce], Fe = ve(Ne);
77179
- if (Fe !== "object")
77180
- return new _("Invalid " + He + " `" + Ze + "` of type `" + Fe + "` " + ("supplied to `" + Pe + "`, expected `object`."));
77172
+ var Ne = Te[Ce], Be = ve(Ne);
77173
+ if (Be !== "object")
77174
+ return new _("Invalid " + He + " `" + Ze + "` of type `" + Be + "` " + ("supplied to `" + Pe + "`, expected `object`."));
77181
77175
  var We = e({}, Te[Ce], ee);
77182
77176
  for (var Ye in We) {
77183
77177
  var at = ee[Ye];
@@ -78124,7 +78118,7 @@ var Zj = "PopperAnchor", Jj = N.forwardRef(
78124
78118
  Jj.displayName = Zj;
78125
78119
  var tO = "PopperContent", [fye, hye] = Yj(tO), eH = N.forwardRef(
78126
78120
  (t, e) => {
78127
- var Ne, Fe, We, Ye, at, Ve;
78121
+ var Ne, Be, We, Ye, at, Ve;
78128
78122
  const {
78129
78123
  __scopePopper: n,
78130
78124
  side: r = "bottom",
@@ -78179,7 +78173,7 @@ var tO = "PopperContent", [fye, hye] = Yj(tO), eH = N.forwardRef(
78179
78173
  Vv(() => {
78180
78174
  ge && (ue == null || ue());
78181
78175
  }, [ge, ue]);
78182
- const Te = (Ne = Z.arrow) == null ? void 0 : Ne.x, Ce = (Fe = Z.arrow) == null ? void 0 : Fe.y, Pe = ((We = Z.arrow) == null ? void 0 : We.centerOffset) !== 0, [He, Ze] = N.useState();
78176
+ const Te = (Ne = Z.arrow) == null ? void 0 : Ne.x, Ce = (Be = Z.arrow) == null ? void 0 : Be.y, Pe = ((We = Z.arrow) == null ? void 0 : We.centerOffset) !== 0, [He, Ze] = N.useState();
78183
78177
  return Vv(() => {
78184
78178
  P && Ze(window.getComputedStyle(P).zIndex);
78185
78179
  }, [P]), /* @__PURE__ */ z(
@@ -79086,8 +79080,8 @@ var Yo = "MenuContent", [Tbe, aO] = zp(Yo), wH = N.forwardRef(
79086
79080
  disableOutsideScroll: A,
79087
79081
  ..._
79088
79082
  } = t, E = qp(Yo, n), P = v1(Yo, n), M = y2(n), I = TH(n), $ = pbe(n), [B, W] = N.useState(null), G = N.useRef(null), X = To(e, G, E.onContentChange), j = N.useRef(0), q = N.useRef(""), ne = N.useRef(0), se = N.useRef(null), re = N.useRef("right"), ce = N.useRef(0), ye = A ? rO : N.Fragment, ve = A ? { as: xbe, allowPinchZoom: !0 } : void 0, ge = (ie) => {
79089
- var Ne, Fe;
79090
- const ee = q.current + ie, ue = $().filter((We) => !We.disabled), Te = document.activeElement, Ce = (Ne = ue.find((We) => We.ref.current === Te)) == null ? void 0 : Ne.textValue, Pe = ue.map((We) => We.textValue), He = Ibe(Pe, ee, Ce), Ze = (Fe = ue.find((We) => We.textValue === He)) == null ? void 0 : Fe.ref.current;
79083
+ var Ne, Be;
79084
+ const ee = q.current + ie, ue = $().filter((We) => !We.disabled), Te = document.activeElement, Ce = (Ne = ue.find((We) => We.ref.current === Te)) == null ? void 0 : Ne.textValue, Pe = ue.map((We) => We.textValue), He = Ibe(Pe, ee, Ce), Ze = (Be = ue.find((We) => We.textValue === He)) == null ? void 0 : Be.ref.current;
79091
79085
  (function We(Ye) {
79092
79086
  q.current = Ye, window.clearTimeout(j.current), Ye !== "" && (j.current = window.setTimeout(() => We(""), 1e3));
79093
79087
  })(ee), Ze && setTimeout(() => Ze.focus());
@@ -79897,7 +79891,7 @@ const D1e = ({
79897
79891
  }
79898
79892
  }, 50);
79899
79893
  };
79900
- nn(() => {
79894
+ rn(() => {
79901
79895
  c && !I && ce();
79902
79896
  }, [c]);
79903
79897
  const ye = () => {
@@ -80108,7 +80102,7 @@ const D1e = ({
80108
80102
  l,
80109
80103
  c
80110
80104
  ]);
80111
- return nn(() => {
80105
+ return rn(() => {
80112
80106
  var $, B;
80113
80107
  const M = n == null ? void 0 : n.findIndex(
80114
80108
  (W) => pt(r == null ? void 0 : r.timestamp_start) >= pt(W.timestamp_start) && pt(r == null ? void 0 : r.timestamp_end) <= pt(W.timestamp_end)
@@ -80369,7 +80363,7 @@ const R1e = ({
80369
80363
  activeSegment: a
80370
80364
  }
80371
80365
  ) : /* @__PURE__ */ z("div", { className: "w-full flex flex-row flex-wrap", children: ve });
80372
- return nn(() => {
80366
+ return rn(() => {
80373
80367
  if (j) {
80374
80368
  const Z = document.querySelector(
80375
80369
  "#editable-transcript"
@@ -80382,7 +80376,7 @@ const R1e = ({
80382
80376
  ee == null || ee.removeAllRanges(), ee == null || ee.addRange(ie);
80383
80377
  }
80384
80378
  }
80385
- }, [j]), nn(() => {
80379
+ }, [j]), rn(() => {
80386
80380
  re && ce.current && ce.current.blur();
80387
80381
  }, [re]), /* @__PURE__ */ ut("div", { className: ct("p-3 w-full flex flex-row gap-1", x), ...A, children: [
80388
80382
  /* @__PURE__ */ ut(Qr, { children: [
@@ -80490,7 +80484,7 @@ const O1e = va(hz), a6 = (t, e, n) => {
80490
80484
  return B[G].timestamp_start;
80491
80485
  return ((W = B[B.length - 1]) == null ? void 0 : W.timestamp_start) || null;
80492
80486
  }, [h, t, r]);
80493
- nn(() => {
80487
+ rn(() => {
80494
80488
  c(!1);
80495
80489
  }, [p]);
80496
80490
  const _ = Bi(() => {
@@ -80579,7 +80573,7 @@ const O1e = va(hz), a6 = (t, e, n) => {
80579
80573
  E
80580
80574
  ]
80581
80575
  );
80582
- nn(() => {
80576
+ rn(() => {
80583
80577
  if (h && n.current) {
80584
80578
  const $ = n.current.querySelector(
80585
80579
  `[data-segment-id="${h._id}"]`
@@ -80686,9 +80680,9 @@ var I1e = "DismissableLayer", MR = "dismissableLayer.update", L1e = "dismissable
80686
80680
  pointerEvents: I ? $ ? "auto" : "none" : void 0,
80687
80681
  ...t.style
80688
80682
  },
80689
- onFocusCapture: rn(t.onFocusCapture, W.onFocusCapture),
80690
- onBlurCapture: rn(t.onBlurCapture, W.onBlurCapture),
80691
- onPointerDownCapture: rn(
80683
+ onFocusCapture: nn(t.onFocusCapture, W.onFocusCapture),
80684
+ onBlurCapture: nn(t.onBlurCapture, W.onBlurCapture),
80685
+ onPointerDownCapture: nn(
80692
80686
  t.onPointerDownCapture,
80693
80687
  B.onPointerDownCapture
80694
80688
  )
@@ -80916,15 +80910,15 @@ var bz = "SelectTrigger", Tz = N.forwardRef(
80916
80910
  "data-placeholder": Hz(l.value) ? "" : void 0,
80917
80911
  ...i,
80918
80912
  ref: h,
80919
- onClick: rn(i.onClick, (_) => {
80913
+ onClick: nn(i.onClick, (_) => {
80920
80914
  _.currentTarget.focus(), m.current !== "mouse" && A(_);
80921
80915
  }),
80922
- onPointerDown: rn(i.onPointerDown, (_) => {
80916
+ onPointerDown: nn(i.onPointerDown, (_) => {
80923
80917
  m.current = _.pointerType;
80924
80918
  const E = _.target;
80925
80919
  E.hasPointerCapture(_.pointerId) && E.releasePointerCapture(_.pointerId), _.button === 0 && _.ctrlKey === !1 && _.pointerType === "mouse" && (A(_), _.preventDefault());
80926
80920
  }),
80927
- onKeyDown: rn(i.onKeyDown, (_) => {
80921
+ onKeyDown: nn(i.onKeyDown, (_) => {
80928
80922
  const E = b.current !== "";
80929
80923
  !(_.ctrlKey || _.altKey || _.metaKey) && _.key.length === 1 && x(_.key), !(E && _.key === " ") && W1e.includes(_.key) && (A(), _.preventDefault());
80930
80924
  })
@@ -81005,9 +80999,9 @@ var Pl = 10, [Ez, Xf] = r0(Bp), eTe = "SelectContentImpl", Dz = N.forwardRef(
81005
80999
  }, [I]), MF();
81006
81000
  const ve = N.useCallback(
81007
81001
  (Ne) => {
81008
- const [Fe, ...We] = se().map((Ve) => Ve.ref.current), [Ye] = We.slice(-1), at = document.activeElement;
81002
+ const [Be, ...We] = se().map((Ve) => Ve.ref.current), [Ye] = We.slice(-1), at = document.activeElement;
81009
81003
  for (const Ve of Ne)
81010
- if (Ve === at || (Ve == null || Ve.scrollIntoView({ block: "nearest" }), Ve === Fe && B && (B.scrollTop = 0), Ve === Ye && B && (B.scrollTop = B.scrollHeight), Ve == null || Ve.focus(), document.activeElement !== at)) return;
81004
+ if (Ve === at || (Ve == null || Ve.scrollIntoView({ block: "nearest" }), Ve === Be && B && (B.scrollTop = 0), Ve === Ye && B && (B.scrollTop = B.scrollHeight), Ve == null || Ve.focus(), document.activeElement !== at)) return;
81011
81005
  },
81012
81006
  [se, B]
81013
81007
  ), ge = N.useCallback(
@@ -81021,17 +81015,17 @@ var Pl = 10, [Ez, Xf] = r0(Bp), eTe = "SelectContentImpl", Dz = N.forwardRef(
81021
81015
  N.useEffect(() => {
81022
81016
  if (I) {
81023
81017
  let Ne = { x: 0, y: 0 };
81024
- const Fe = (Ye) => {
81018
+ const Be = (Ye) => {
81025
81019
  var at, Ve;
81026
81020
  Ne = {
81027
81021
  x: Math.abs(Math.round(Ye.pageX) - (((at = ie.current) == null ? void 0 : at.x) ?? 0)),
81028
81022
  y: Math.abs(Math.round(Ye.pageY) - (((Ve = ie.current) == null ? void 0 : Ve.y) ?? 0))
81029
81023
  };
81030
81024
  }, We = (Ye) => {
81031
- Ne.x <= 10 && Ne.y <= 10 ? Ye.preventDefault() : I.contains(Ye.target) || Z(!1), document.removeEventListener("pointermove", Fe), ie.current = null;
81025
+ Ne.x <= 10 && Ne.y <= 10 ? Ye.preventDefault() : I.contains(Ye.target) || Z(!1), document.removeEventListener("pointermove", Be), ie.current = null;
81032
81026
  };
81033
- return ie.current !== null && (document.addEventListener("pointermove", Fe), document.addEventListener("pointerup", We, { capture: !0, once: !0 })), () => {
81034
- document.removeEventListener("pointermove", Fe), document.removeEventListener("pointerup", We, { capture: !0 });
81027
+ return ie.current !== null && (document.addEventListener("pointermove", Be), document.addEventListener("pointerup", We, { capture: !0, once: !0 })), () => {
81028
+ document.removeEventListener("pointermove", Be), document.removeEventListener("pointerup", We, { capture: !0 });
81035
81029
  };
81036
81030
  }
81037
81031
  }, [I, Z, ie]), N.useEffect(() => {
@@ -81041,18 +81035,18 @@ var Pl = 10, [Ez, Xf] = r0(Bp), eTe = "SelectContentImpl", Dz = N.forwardRef(
81041
81035
  };
81042
81036
  }, [Z]);
81043
81037
  const [ee, ue] = qz((Ne) => {
81044
- const Fe = se().filter((at) => !at.disabled), We = Fe.find((at) => at.ref.current === document.activeElement), Ye = Wz(Fe, Ne, We);
81038
+ const Be = se().filter((at) => !at.disabled), We = Be.find((at) => at.ref.current === document.activeElement), Ye = Wz(Be, Ne, We);
81045
81039
  Ye && setTimeout(() => Ye.ref.current.focus());
81046
81040
  }), Te = N.useCallback(
81047
- (Ne, Fe, We) => {
81041
+ (Ne, Be, We) => {
81048
81042
  const Ye = !ye.current && !We;
81049
- (M.value !== void 0 && M.value === Fe || Ye) && (j(Ne), Ye && (ye.current = !0));
81043
+ (M.value !== void 0 && M.value === Be || Ye) && (j(Ne), Ye && (ye.current = !0));
81050
81044
  },
81051
81045
  [M.value]
81052
81046
  ), Ce = N.useCallback(() => I == null ? void 0 : I.focus(), [I]), Pe = N.useCallback(
81053
- (Ne, Fe, We) => {
81047
+ (Ne, Be, We) => {
81054
81048
  const Ye = !ye.current && !We;
81055
- (M.value !== void 0 && M.value === Fe || Ye) && ne(Ne);
81049
+ (M.value !== void 0 && M.value === Be || Ye) && ne(Ne);
81056
81050
  },
81057
81051
  [M.value]
81058
81052
  ), He = r === "popper" ? IR : Az, Ze = He === IR ? {
@@ -81091,9 +81085,9 @@ var Pl = 10, [Ez, Xf] = r0(Bp), eTe = "SelectContentImpl", Dz = N.forwardRef(
81091
81085
  onMountAutoFocus: (Ne) => {
81092
81086
  Ne.preventDefault();
81093
81087
  },
81094
- onUnmountAutoFocus: rn(i, (Ne) => {
81095
- var Fe;
81096
- (Fe = M.trigger) == null || Fe.focus({ preventScroll: !0 }), Ne.preventDefault();
81088
+ onUnmountAutoFocus: nn(i, (Ne) => {
81089
+ var Be;
81090
+ (Be = M.trigger) == null || Be.focus({ preventScroll: !0 }), Ne.preventDefault();
81097
81091
  }),
81098
81092
  children: /* @__PURE__ */ z(
81099
81093
  mz,
@@ -81124,9 +81118,9 @@ var Pl = 10, [Ez, Xf] = r0(Bp), eTe = "SelectContentImpl", Dz = N.forwardRef(
81124
81118
  outline: "none",
81125
81119
  ...P.style
81126
81120
  },
81127
- onKeyDown: rn(P.onKeyDown, (Ne) => {
81128
- const Fe = Ne.ctrlKey || Ne.altKey || Ne.metaKey;
81129
- if (Ne.key === "Tab" && Ne.preventDefault(), !Fe && Ne.key.length === 1 && ue(Ne.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(Ne.key)) {
81121
+ onKeyDown: nn(P.onKeyDown, (Ne) => {
81122
+ const Be = Ne.ctrlKey || Ne.altKey || Ne.metaKey;
81123
+ if (Ne.key === "Tab" && Ne.preventDefault(), !Be && Ne.key.length === 1 && ue(Ne.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(Ne.key)) {
81130
81124
  let Ye = se().filter((at) => !at.disabled).map((at) => at.ref.current);
81131
81125
  if (["ArrowUp", "End"].includes(Ne.key) && (Ye = Ye.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(Ne.key)) {
81132
81126
  const at = Ne.target, Ve = Ye.indexOf(at);
@@ -81168,15 +81162,15 @@ var tTe = "SelectItemAlignedPosition", Az = N.forwardRef((t, e) => {
81168
81162
  ]);
81169
81163
  c.style.minWidth = wt + "px", c.style.right = yn + "px";
81170
81164
  }
81171
- const ne = x(), se = window.innerHeight - Pl * 2, re = _.scrollHeight, ce = window.getComputedStyle(p), ye = parseInt(ce.borderTopWidth, 10), ve = parseInt(ce.paddingTop, 10), ge = parseInt(ce.borderBottomWidth, 10), Z = parseInt(ce.paddingBottom, 10), ie = ye + ve + re + Z + ge, ee = Math.min(E.offsetHeight * 5, ie), ue = window.getComputedStyle(_), Te = parseInt(ue.paddingTop, 10), Ce = parseInt(ue.paddingBottom, 10), Pe = G.top + G.height / 2 - Pl, He = se - Pe, Ze = E.offsetHeight / 2, Ne = E.offsetTop + Ze, Fe = ye + ve + Ne, We = ie - Fe;
81172
- if (Fe <= Pe) {
81165
+ const ne = x(), se = window.innerHeight - Pl * 2, re = _.scrollHeight, ce = window.getComputedStyle(p), ye = parseInt(ce.borderTopWidth, 10), ve = parseInt(ce.paddingTop, 10), ge = parseInt(ce.borderBottomWidth, 10), Z = parseInt(ce.paddingBottom, 10), ie = ye + ve + re + Z + ge, ee = Math.min(E.offsetHeight * 5, ie), ue = window.getComputedStyle(_), Te = parseInt(ue.paddingTop, 10), Ce = parseInt(ue.paddingBottom, 10), Pe = G.top + G.height / 2 - Pl, He = se - Pe, Ze = E.offsetHeight / 2, Ne = E.offsetTop + Ze, Be = ye + ve + Ne, We = ie - Be;
81166
+ if (Be <= Pe) {
81173
81167
  const at = ne.length > 0 && E === ne[ne.length - 1].ref.current;
81174
81168
  c.style.bottom = "0px";
81175
81169
  const Ve = p.clientHeight - _.offsetTop - _.offsetHeight, _t = Math.max(
81176
81170
  He,
81177
81171
  Ze + // viewport might have padding bottom, include it to avoid a scrollable viewport
81178
81172
  (at ? Ce : 0) + Ve + ge
81179
- ), wt = Fe + _t;
81173
+ ), wt = Be + _t;
81180
81174
  c.style.height = wt + "px";
81181
81175
  } else {
81182
81176
  const at = ne.length > 0 && E === ne[0].ref.current;
@@ -81186,7 +81180,7 @@ var tTe = "SelectItemAlignedPosition", Az = N.forwardRef((t, e) => {
81186
81180
  ye + _.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
81187
81181
  (at ? Te : 0) + Ze
81188
81182
  ) + We;
81189
- c.style.height = _t + "px", _.scrollTop = Fe - Pe + _.offsetTop;
81183
+ c.style.height = _t + "px", _.scrollTop = Be - Pe + _.offsetTop;
81190
81184
  }
81191
81185
  c.style.margin = `${Pl}px 0`, c.style.minHeight = ee + "px", c.style.maxHeight = se + "px", r == null || r(), requestAnimationFrame(() => S.current = !0);
81192
81186
  }
@@ -81313,7 +81307,7 @@ var [rTe, fO] = r0(Bp, {}), LR = "SelectViewport", Rz = N.forwardRef(
81313
81307
  overflow: "hidden auto",
81314
81308
  ...i.style
81315
81309
  },
81316
- onScroll: rn(i.onScroll, (p) => {
81310
+ onScroll: nn(i.onScroll, (p) => {
81317
81311
  const m = p.currentTarget, { contentWrapper: b, shouldExpandOnScrollRef: x } = l;
81318
81312
  if (x != null && x.current && b) {
81319
81313
  const S = Math.abs(h.current - m.scrollTop);
@@ -81399,26 +81393,26 @@ var Tx = "SelectItem", [aTe, Nz] = r0(Tx), Iz = N.forwardRef(
81399
81393
  tabIndex: i ? void 0 : -1,
81400
81394
  ...l,
81401
81395
  ref: A,
81402
- onFocus: rn(l.onFocus, () => S(!0)),
81403
- onBlur: rn(l.onBlur, () => S(!1)),
81404
- onClick: rn(l.onClick, () => {
81396
+ onFocus: nn(l.onFocus, () => S(!0)),
81397
+ onBlur: nn(l.onBlur, () => S(!1)),
81398
+ onClick: nn(l.onClick, () => {
81405
81399
  E.current !== "mouse" && P();
81406
81400
  }),
81407
- onPointerUp: rn(l.onPointerUp, () => {
81401
+ onPointerUp: nn(l.onPointerUp, () => {
81408
81402
  E.current === "mouse" && P();
81409
81403
  }),
81410
- onPointerDown: rn(l.onPointerDown, (M) => {
81404
+ onPointerDown: nn(l.onPointerDown, (M) => {
81411
81405
  E.current = M.pointerType;
81412
81406
  }),
81413
- onPointerMove: rn(l.onPointerMove, (M) => {
81407
+ onPointerMove: nn(l.onPointerMove, (M) => {
81414
81408
  var I;
81415
81409
  E.current = M.pointerType, i ? (I = h.onItemLeave) == null || I.call(h) : E.current === "mouse" && M.currentTarget.focus({ preventScroll: !0 });
81416
81410
  }),
81417
- onPointerLeave: rn(l.onPointerLeave, (M) => {
81411
+ onPointerLeave: nn(l.onPointerLeave, (M) => {
81418
81412
  var I;
81419
81413
  M.currentTarget === document.activeElement && ((I = h.onItemLeave) == null || I.call(h));
81420
81414
  }),
81421
- onKeyDown: rn(l.onKeyDown, (M) => {
81415
+ onKeyDown: nn(l.onKeyDown, (M) => {
81422
81416
  var $;
81423
81417
  (($ = h.searchRef) == null ? void 0 : $.current) !== "" && M.key === " " || (G1e.includes(M.key) && P(), M.key === " " && M.preventDefault());
81424
81418
  })
@@ -81522,14 +81516,14 @@ var $z = N.forwardRef((t, e) => {
81522
81516
  ...i,
81523
81517
  ref: e,
81524
81518
  style: { flexShrink: 0, ...i.style },
81525
- onPointerDown: rn(i.onPointerDown, () => {
81519
+ onPointerDown: nn(i.onPointerDown, () => {
81526
81520
  l.current === null && (l.current = window.setInterval(r, 50));
81527
81521
  }),
81528
- onPointerMove: rn(i.onPointerMove, () => {
81522
+ onPointerMove: nn(i.onPointerMove, () => {
81529
81523
  var p;
81530
81524
  (p = a.onItemLeave) == null || p.call(a), l.current === null && (l.current = window.setInterval(r, 50));
81531
81525
  }),
81532
- onPointerLeave: rn(i.onPointerLeave, () => {
81526
+ onPointerLeave: nn(i.onPointerLeave, () => {
81533
81527
  h();
81534
81528
  })
81535
81529
  }