@ioai/lerobot-studio 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
- import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, K as c, M as l, N as u, O as d, P as f, S as p, T as m, U as h, V as g, W as _, _ as v, a as y, b, c as x, ft as S, g as C, gt as w, h as T, ht as E, i as D, j as O, k as ee, l as te, lt as ne, m as k, mt as A, n as re, o as j, p as ie, pt as M, r as ae, s as N, st as oe, t as se, v as ce, w as P, x as F, y as I } from "./react-window-B1KnRC6j.js";
2
- import { r as L, t as le } from "./workerManager-D6ovn2ln.js";
3
- import * as ue from "react";
4
- import R, { Suspense as de, createContext as fe, memo as pe, useCallback as z, useContext as me, useEffect as B, useMemo as V, useRef as H, useState as U } from "react";
5
- import { Fragment as he, jsx as W, jsxs as G } from "react/jsx-runtime";
6
- import ge from "react-dom";
1
+ import { A as e, C as t, D as n, E as r, F as i, G as a, H as o, I as s, K as c, M as l, N as u, O as d, P as f, S as p, T as m, U as h, V as g, W as _, _ as v, _t as y, a as b, b as x, c as S, ct as C, g as w, gt as T, h as E, ht as D, i as O, j as ee, k as te, l as ne, mt as k, n as A, o as re, p as j, pt as ie, q as M, r as ae, s as N, t as oe, ut as se, v as P, w as F, x as ce, y as le } from "./react-window-BIZRp3dx.js";
2
+ import { r as I, t as ue } from "./workerManager-D6ovn2ln.js";
3
+ import * as de from "react";
4
+ import L, { Suspense as fe, createContext as pe, memo as me, useCallback as R, useContext as he, useEffect as z, useMemo as B, useRef as V, useState as H } from "react";
5
+ import { Fragment as ge, jsx as U, jsxs as W } from "react/jsx-runtime";
6
+ import _e from "react-dom";
7
7
  //#region node_modules/@zip.js/zip.js/lib/core/constants.js
8
- var _e = 4294967295, ve = 65535, ye = 33639248, be = 39169, xe = 21589, Se = 28789, Ce = 25461, we = 6534, Te = 30837, Ee = 30805, De = 2048, Oe = 61440, ke = 16384, Ae = 2048, je = 1024, Me = Infinity, Ne = "undefined", Pe = "function", Fe = /* @__PURE__ */ new Uint8Array(), Ie = 64, Le = 2;
8
+ var ve = 4294967295, ye = 65535, be = 33639248, xe = 39169, G = 21589, Se = 28789, Ce = 25461, we = 6534, Te = 30837, Ee = 30805, De = 2048, Oe = 61440, ke = 16384, Ae = 2048, je = 1024, Me = Infinity, Ne = "undefined", Pe = "function", Fe = /* @__PURE__ */ new Uint8Array(), Ie = 64, Le = 2;
9
9
  try {
10
10
  typeof navigator < "u" && navigator.hardwareConcurrency && (Le = navigator.hardwareConcurrency);
11
11
  } catch {}
@@ -1504,16 +1504,16 @@ var si = "filename", ci = "rawFilename", li = "comment", ui = "rawComment", di =
1504
1504
  xi.forEach((t) => this[t] = e[t]);
1505
1505
  }
1506
1506
  }, Ci = "filenameEncoding", wi = "commentEncoding", Ti = "extractPrependedData", Ei = "extractAppendedData", Di = "password", Oi = "rawPassword", ki = "passThrough", Ai = "signal", ji = "checkPasswordOnly", Mi = "checkOverlappingEntryOnly", Ni = "checkOverlappingEntry", Pi = "checkAmbiguity", Fi = "useWebWorkers", Ii = "useCompressionStream", Li = "transferStreams", Ri = "strictness", zi = "maxAppendedDataSize", Bi = "strict", Vi = "balanced", Hi = "tolerant", Ui = "File format is not recognized", Wi = "End of central directory not found", Gi = "End of Zip64 central directory locator not found", Ki = "Central directory header not found", qi = "Local file header not found", Ji = "Zip64 extra field not found", Yi = "File contains encrypted entry", Xi = "Encryption method not supported", Zi = "Compression method not supported", Qi = "Split zip file", $i = "Overlapping entry found", ea = "Ambiguous archive", ta = "utf-8", na = "UTF8", ra = "cp437", ia = 9 | De, aa = [
1507
- [di, _e],
1508
- [fi, _e],
1509
- [pi, _e],
1510
- [mi, ve]
1507
+ [di, ve],
1508
+ [fi, ve],
1509
+ [pi, ve],
1510
+ [mi, ye]
1511
1511
  ], oa = {
1512
- [ve]: {
1512
+ [ye]: {
1513
1513
  getValue: Y,
1514
1514
  bytes: 4
1515
1515
  },
1516
- [_e]: {
1516
+ [ve]: {
1517
1517
  getValue: Ia,
1518
1518
  bytes: 8
1519
1519
  }
@@ -1556,8 +1556,8 @@ var si = "filename", ci = "rawFilename", li = "comment", ui = "rawComment", di =
1556
1556
  if (E.length < 4) throw Error(Ui);
1557
1557
  let e = w - d - (n.lastDiskOffset || 0);
1558
1558
  if (f != e && v == g) {
1559
- let t = Y(D, T) != ye;
1560
- if (!t && e >= 0 && e + 4 <= n.size && (t = Y(X(await K(n, e, 4, v)), 0) == ye), t) {
1559
+ let t = Y(D, T) != be;
1560
+ if (!t && e >= 0 && e + 4 <= n.size && (t = Y(X(await K(n, e, 4, v)), 0) == be), t) {
1561
1561
  let t = f;
1562
1562
  f = e, f > t && (b += f - t), E = await K(n, f, d, v), D = X(E);
1563
1563
  }
@@ -1601,30 +1601,30 @@ var si = "filename", ci = "rawFilename", li = "comment", ui = "rawComment", di =
1601
1601
  filename: M,
1602
1602
  comment: ae
1603
1603
  }), ua(o, o, D, T + 6), o.offset += b, x = Math.min(o.offset, x), a && (ne.has(o.filename) && (k = !0), ne.add(o.filename));
1604
- let N = o.externalFileAttributes >> 16 & ve;
1604
+ let N = o.externalFileAttributes >> 16 & ye;
1605
1605
  o.unixMode === void 0 && N & 16877 && (o.unixMode = N);
1606
- let oe = !!(o.unixMode & Ae), se = !!(o.unixMode & je), ce = !!(o.unixMode & 512), P = o.unixMode === void 0 ? p && !!(N & 73) : !!(o.unixMode & 73), F = o.unixMode !== void 0 && (o.unixMode & 61440) == 16384, I = (N & Oe) == ke;
1606
+ let oe = !!(o.unixMode & Ae), se = !!(o.unixMode & je), P = !!(o.unixMode & 512), F = o.unixMode === void 0 ? p && !!(N & 73) : !!(o.unixMode & 73), ce = o.unixMode !== void 0 && (o.unixMode & 61440) == 16384, le = (N & Oe) == ke;
1607
1607
  Object.assign(o, {
1608
1608
  setuid: oe,
1609
1609
  setgid: se,
1610
- sticky: ce,
1610
+ sticky: P,
1611
1611
  unixExternalUpper: N,
1612
1612
  internalFileAttribute: o.internalFileAttributes,
1613
1613
  externalFileAttribute: o.externalFileAttributes,
1614
- executable: P,
1615
- directory: F || I || f && O.directory || o.filename.endsWith("/") && !o.uncompressedSize,
1614
+ executable: F,
1615
+ directory: ce || le || f && O.directory || o.filename.endsWith("/") && !o.uncompressedSize,
1616
1616
  zipCrypto: o.encrypted && !o.extraFieldAES
1617
1617
  });
1618
- let L = new Si(o);
1619
- L.getData = (e, n) => o.getData(e, L, t.readRanges, n), L.arrayBuffer = async (e) => {
1620
- let n = new TransformStream(), [r] = await Promise.all([new Response(n.readable).arrayBuffer(), o.getData(n, L, t.readRanges, e)]);
1618
+ let I = new Si(o);
1619
+ I.getData = (e, n) => o.getData(e, I, t.readRanges, n), I.arrayBuffer = async (e) => {
1620
+ let n = new TransformStream(), [r] = await Promise.all([new Response(n.readable).arrayBuffer(), o.getData(n, I, t.readRanges, e)]);
1621
1621
  return r;
1622
1622
  }, T = g;
1623
- let { onprogress: le } = e;
1624
- if (le) try {
1625
- await le(i + 1, y, new Si(o));
1623
+ let { onprogress: ue } = e;
1624
+ if (ue) try {
1625
+ await ue(i + 1, y, new Si(o));
1626
1626
  } catch {}
1627
- yield L;
1627
+ yield I;
1628
1628
  }
1629
1629
  a && T != C && Ma("trailing central directory data"), k && Ma("duplicate filename"), a && (b || y && x > 0) && Ma("prepended data");
1630
1630
  let A = q(t, e, Ti), re = q(t, e, Ei);
@@ -1669,9 +1669,9 @@ var si = "filename", ci = "rawFilename", li = "comment", ui = "rawComment", di =
1669
1669
  chunkSize: He(f)
1670
1670
  }), ie = q(i, r, Ai), M = q(i, r, ji), ae = q(i, r, Ni), N = q(i, r, Mi);
1671
1671
  N && (ae = !0);
1672
- let { onstart: oe, onprogress: se, onend: ce } = r, P = d == 9, F = q(i, r, Ii);
1673
- P && (F = !1);
1674
- let I = {
1672
+ let { onstart: oe, onprogress: se, onend: P } = r, F = d == 9, ce = q(i, r, Ii);
1673
+ F && (ce = !1);
1674
+ let le = {
1675
1675
  options: {
1676
1676
  codecType: An,
1677
1677
  password: S,
@@ -1685,9 +1685,9 @@ var si = "filename", ci = "rawFilename", li = "comment", ui = "rawComment", di =
1685
1685
  compressed: d != 0 && !w,
1686
1686
  encrypted: ne,
1687
1687
  useWebWorkers: q(i, r, Fi),
1688
- useCompressionStream: F,
1688
+ useCompressionStream: ce,
1689
1689
  transferStreams: q(i, r, Li),
1690
- deflate64: P,
1690
+ deflate64: F,
1691
1691
  checkPasswordOnly: M
1692
1692
  },
1693
1693
  config: f,
@@ -1696,7 +1696,7 @@ var si = "filename", ci = "rawFilename", li = "comment", ui = "rawComment", di =
1696
1696
  size: re,
1697
1697
  onstart: oe,
1698
1698
  onprogress: se,
1699
- onend: ce
1699
+ onend: P
1700
1700
  }
1701
1701
  };
1702
1702
  ae && await va({
@@ -1713,22 +1713,22 @@ var si = "filename", ci = "rawFilename", li = "comment", ui = "rawComment", di =
1713
1713
  extraFieldZip64: u || y.extraFieldZip64,
1714
1714
  readRanges: n
1715
1715
  });
1716
- let L;
1716
+ let I;
1717
1717
  try {
1718
1718
  if (!N) {
1719
- M && (e = new WritableStream()), e = new ei(e), await ni(e, w ? _ : g), {writable: L} = e;
1719
+ M && (e = new WritableStream()), e = new ei(e), await ni(e, w ? _ : g), {writable: I} = e;
1720
1720
  let { outputSize: t } = await sr({
1721
1721
  readable: j,
1722
- writable: L
1723
- }, I);
1722
+ writable: I
1723
+ }, le);
1724
1724
  if (e.size += t, t != (w ? _ : g)) throw Error(ln);
1725
1725
  }
1726
1726
  } catch (t) {
1727
1727
  if (t.outputSize !== void 0 && (e.size += t.outputSize), !M || t.message != "zipjs-abort-check-password") throw t;
1728
1728
  } finally {
1729
- !q(i, r, "preventClose") && L && !L.locked && await L.getWriter().close();
1729
+ !q(i, r, "preventClose") && I && !I.locked && await I.getWriter().close();
1730
1730
  }
1731
- return M || N ? void 0 : e.getData ? e.getData() : L;
1731
+ return M || N ? void 0 : e.getData ? e.getData() : I;
1732
1732
  }
1733
1733
  };
1734
1734
  function la(e, t, n) {
@@ -1770,7 +1770,7 @@ function ua(e, t, n, r, i) {
1770
1770
  d && (fa(d, si, ci, t, e), t.extraFieldUnicodePath = d);
1771
1771
  let f = o.get(Ce);
1772
1772
  f && (fa(f, li, ui, t, e), t.extraFieldUnicodeComment = f);
1773
- let p = o.get(be);
1773
+ let p = o.get(xe);
1774
1774
  p && p.data.length >= 7 ? (pa(p, t, l), t.extraFieldAES = p) : t.compressionMethod = l;
1775
1775
  let m = o.get(10);
1776
1776
  m && (ma(m, t), t.extraFieldNTFS = m);
@@ -1780,7 +1780,7 @@ function ua(e, t, n, r, i) {
1780
1780
  let e = o.get(Te);
1781
1781
  e && (ha(e, t, !0), t.extraFieldInfoZip = e);
1782
1782
  }
1783
- let g = o.get(xe);
1783
+ let g = o.get(G);
1784
1784
  g && (_a(g, t, i), t.extraFieldExtendedTimestamp = g);
1785
1785
  let _ = o.get(we);
1786
1786
  _ && (t.extraFieldUSDZ = _);
@@ -1909,11 +1909,11 @@ function ya(e, t) {
1909
1909
  return e === void 0 ? t ? Bi : Vi : e;
1910
1910
  }
1911
1911
  function ba(e, t) {
1912
- return e === void 0 ? t == "strict" ? 0 : t == "tolerant" ? Infinity : ve : e;
1912
+ return e === void 0 ? t == "strict" ? 0 : t == "tolerant" ? Infinity : ye : e;
1913
1913
  }
1914
1914
  var xa = 64, Sa = 0, Ca = 1, wa = 2;
1915
1915
  async function Ta(e, t, n) {
1916
- let { size: r } = e, i = Math.min(r, 22 + ve), a = { count: xa }, o, s, c = 0;
1916
+ let { size: r } = e, i = Math.min(r, 22 + ye), a = { count: xa }, o, s, c = 0;
1917
1917
  for await (let [n, l, u, d, f] of Da(e, i)) {
1918
1918
  let i = J(n, d + 20);
1919
1919
  if (f + 22 + i == r) {
@@ -1929,7 +1929,7 @@ async function Ta(e, t, n) {
1929
1929
  };
1930
1930
  }
1931
1931
  async function Ea(e, t, n) {
1932
- let { size: r } = e, i = Math.min(r, t == Infinity ? r : 22 + ve + t), a, o;
1932
+ let { size: r } = e, i = Math.min(r, t == Infinity ? r : 22 + ye + t), a, o;
1933
1933
  for await (let [t, s, c, l, u] of Da(e, i)) {
1934
1934
  let i = Oa(c, l, u);
1935
1935
  a ||= i;
@@ -1980,7 +1980,7 @@ function q(e, t, n) {
1980
1980
  return t[n] === void 0 ? e.options[n] : t[n];
1981
1981
  }
1982
1982
  function Na(e) {
1983
- let t = (e & 4294901760) >> 16, n = e & ve;
1983
+ let t = (e & 4294901760) >> 16, n = e & ye;
1984
1984
  try {
1985
1985
  return new Date(1980 + ((t & 65024) >> 9), ((t & 480) >> 5) - 1, t & 31, (n & 63488) >> 11, (n & 2016) >> 5, (n & 31) * 2, 0);
1986
1986
  } catch {}
@@ -2609,11 +2609,11 @@ var So = /*#__PURE__*/ yo(bo, 9, 1), Co = /*#__PURE__*/ yo(xo, 5, 1), wo = funct
2609
2609
  var D = N - 257, se = so[D];
2610
2610
  oe = To(e, d, (1 << se) - 1) + po[D], d += se;
2611
2611
  }
2612
- var ce = m[Eo(e, d) & M], P = ce >> 4;
2613
- ce || Ao(3), d += ce & 15;
2614
- var j = go[P];
2615
- if (P > 3) {
2616
- var se = co[P];
2612
+ var P = m[Eo(e, d) & M], F = P >> 4;
2613
+ P || Ao(3), d += P & 15;
2614
+ var j = go[F];
2615
+ if (F > 3) {
2616
+ var se = co[F];
2617
2617
  j += Eo(e, d) & (1 << se) - 1, d += se;
2618
2618
  }
2619
2619
  if (d > _) {
@@ -2621,12 +2621,12 @@ var So = /*#__PURE__*/ yo(bo, 9, 1), Co = /*#__PURE__*/ yo(xo, 5, 1), wo = funct
2621
2621
  break;
2622
2622
  }
2623
2623
  s && l(f + 131072);
2624
- var F = f + oe;
2624
+ var ce = f + oe;
2625
2625
  if (f < j) {
2626
- var I = a - j, L = Math.min(j, F);
2627
- for (I + f < 0 && Ao(3); f < L; ++f) n[f] = r[I + f];
2626
+ var le = a - j, I = Math.min(j, ce);
2627
+ for (le + f < 0 && Ao(3); f < I; ++f) n[f] = r[le + f];
2628
2628
  }
2629
- for (; f < F; ++f) n[f] = n[f - j];
2629
+ for (; f < ce; ++f) n[f] = n[f - j];
2630
2630
  }
2631
2631
  }
2632
2632
  t.l = p, t.p = ae, t.b = f, t.f = u, p && (u = 1, t.m = h, t.d = m, t.n = g);
@@ -3543,27 +3543,136 @@ function vs(e) {
3543
3543
  }
3544
3544
  }
3545
3545
  //#endregion
3546
+ //#region src/platform/datasource/RemoteManifestDataSource.ts
3547
+ function ys(e) {
3548
+ let t = e.replace(/\\/g, "/");
3549
+ return t = t.replace(/^\.\/+/, ""), t = t.replace(/\/{2,}/g, "/"), t = t.replace(/^\/+/, ""), t;
3550
+ }
3551
+ var bs = class {
3552
+ entryMap = /* @__PURE__ */ new Map();
3553
+ limits;
3554
+ constructor(e, t) {
3555
+ if (this.limits = Ro(t), e.length > this.limits.maxManifestEntries) throw new $("ENTRY_COUNT_LIMIT", "Manifest contains too many entries", {
3556
+ count: e.length,
3557
+ limit: this.limits.maxManifestEntries
3558
+ });
3559
+ let n = 0;
3560
+ for (let t of e) {
3561
+ let e = zo(t.logicalPath, this.limits);
3562
+ if (this.entryMap.has(e)) throw new $("DUPLICATE_PATH", "Manifest contains a duplicate path", { path: e });
3563
+ if (xs(t.presignedUrl, this.limits, e), t.sizeBytes != null && (!Number.isSafeInteger(t.sizeBytes) || t.sizeBytes < 0)) throw new $("MANIFEST_INVALID", "Manifest entry has an invalid size", {
3564
+ path: e,
3565
+ size: t.sizeBytes
3566
+ });
3567
+ if (t.sizeBytes != null) {
3568
+ if (t.sizeBytes > this.limits.maxManifestEntryBytes) throw new $("ENTRY_SIZE_LIMIT", "Manifest entry exceeds the size limit", {
3569
+ path: e,
3570
+ size: t.sizeBytes,
3571
+ limit: this.limits.maxManifestEntryBytes
3572
+ });
3573
+ if (n += t.sizeBytes, !Number.isSafeInteger(n) || n > this.limits.maxManifestTotalBytes) throw new $("TOTAL_SIZE_LIMIT", "Manifest exceeds the total size limit", {
3574
+ total: n,
3575
+ limit: this.limits.maxManifestTotalBytes
3576
+ });
3577
+ }
3578
+ this.entryMap.set(e, t);
3579
+ }
3580
+ }
3581
+ async exists(e) {
3582
+ return this.entryMap.has(ys(e));
3583
+ }
3584
+ async listPaths() {
3585
+ return [...this.entryMap.keys()];
3586
+ }
3587
+ async readText(e) {
3588
+ return new TextDecoder().decode(await this.readBytes(e));
3589
+ }
3590
+ async readBytes(e, t) {
3591
+ let n = this.getEntry(e), r = n.presignedUrl;
3592
+ Vo(e, n.sizeBytes ?? void 0, this.limits);
3593
+ let i = await fetch(r);
3594
+ if (!i.ok) throw Error(`HTTP ${i.status} fetching ${e}`);
3595
+ let a = i.headers.get("content-length"), o = a ? Number(a) : void 0;
3596
+ if (o !== void 0 && (!Number.isSafeInteger(o) || o < 0)) throw new $("MANIFEST_INVALID", "Response has an invalid content length", {
3597
+ path: e,
3598
+ contentLength: a
3599
+ });
3600
+ if (Vo(e, o, this.limits), !i.body) throw Error(`HTTP response has no readable body fetching ${e}`);
3601
+ let s = i.body.getReader(), c = [], l = 0;
3602
+ for (t?.({
3603
+ phase: "download",
3604
+ loaded: 0,
3605
+ total: o,
3606
+ message: e
3607
+ });;) {
3608
+ let { done: n, value: r } = await s.read();
3609
+ if (n) break;
3610
+ if (l += r.byteLength, l > this.limits.maxMaterializedBytes) throw await s.cancel(), new $("MATERIALIZED_SIZE_LIMIT", "Remote file exceeded the in-memory size limit while downloading", {
3611
+ path: e,
3612
+ loaded: l,
3613
+ limit: this.limits.maxMaterializedBytes
3614
+ });
3615
+ c.push(r), t?.({
3616
+ phase: "download",
3617
+ loaded: l,
3618
+ total: o,
3619
+ message: e
3620
+ });
3621
+ }
3622
+ let u = new Uint8Array(l), d = 0;
3623
+ for (let e of c) u.set(e, d), d += e.byteLength;
3624
+ return u;
3625
+ }
3626
+ async getObjectUrl(e) {
3627
+ return this.getUrl(e);
3628
+ }
3629
+ clear() {}
3630
+ invalidateObjectUrl(e) {}
3631
+ getUrl(e) {
3632
+ return this.getEntry(e).presignedUrl;
3633
+ }
3634
+ getEntry(e) {
3635
+ let t = this.entryMap.get(ys(e));
3636
+ if (!t) throw Error(`File not found in manifest: ${e}`);
3637
+ return t;
3638
+ }
3639
+ };
3640
+ function xs(e, t, n) {
3641
+ if (!e || e.length > t.maxManifestUrlLength) throw new $("URL_INVALID", "Manifest URL is empty or too long", {
3642
+ path: n,
3643
+ urlLength: e?.length ?? 0,
3644
+ limit: t.maxManifestUrlLength
3645
+ });
3646
+ try {
3647
+ let t = new URL(e);
3648
+ if (t.protocol !== "http:" && t.protocol !== "https:") throw Error("unsupported protocol");
3649
+ if (!t.hostname || t.username || t.password) throw Error("invalid authority");
3650
+ } catch {
3651
+ throw new $("URL_INVALID", "Manifest URL must be an HTTP(S) URL", { path: n });
3652
+ }
3653
+ }
3654
+ //#endregion
3546
3655
  //#region node_modules/@radix-ui/react-separator/dist/index.mjs
3547
- var ys = Object.defineProperty, bs = (e, t) => ys(e, "name", {
3656
+ var Ss = Object.defineProperty, Cs = (e, t) => Ss(e, "name", {
3548
3657
  value: t,
3549
3658
  configurable: !0
3550
- }), xs = "horizontal", Ss = ["horizontal", "vertical"], Cs = /* @__PURE__ */ ue.forwardRef(/* @__PURE__ */ bs(function(e, t) {
3551
- let { decorative: n, orientation: r = xs, ...i } = e, a = ws(r) ? r : xs, o = n ? { role: "none" } : {
3659
+ }), ws = "horizontal", Ts = ["horizontal", "vertical"], Es = /* @__PURE__ */ de.forwardRef(/* @__PURE__ */ Cs(function(e, t) {
3660
+ let { decorative: n, orientation: r = ws, ...i } = e, a = Ds(r) ? r : ws, o = n ? { role: "none" } : {
3552
3661
  "aria-orientation": a === "vertical" ? a : void 0,
3553
3662
  role: "separator"
3554
3663
  };
3555
- return /* @__PURE__ */ W(oe.div, {
3664
+ return /* @__PURE__ */ U(C.div, {
3556
3665
  "data-orientation": a,
3557
3666
  ...o,
3558
3667
  ...i,
3559
3668
  ref: t
3560
3669
  });
3561
3670
  }, "Separator"));
3562
- function ws(e) {
3563
- return Ss.includes(e);
3671
+ function Ds(e) {
3672
+ return Ts.includes(e);
3564
3673
  }
3565
- bs(ws, "isValidOrientation");
3566
- var Ts = Cs, Es = a("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3", {
3674
+ Cs(Ds, "isValidOrientation");
3675
+ var Os = Es, ks = s("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3", {
3567
3676
  variants: { variant: {
3568
3677
  default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
3569
3678
  secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
@@ -3574,30 +3683,30 @@ var Ts = Cs, Es = a("inline-flex w-fit shrink-0 items-center justify-center gap-
3574
3683
  } },
3575
3684
  defaultVariants: { variant: "default" }
3576
3685
  });
3577
- function Ds({ className: e, variant: t = "default", asChild: n = !1, ...r }) {
3578
- return /* @__PURE__ */ W(n ? ne : "span", {
3686
+ function As({ className: e, variant: t = "default", asChild: n = !1, ...r }) {
3687
+ return /* @__PURE__ */ U(n ? se : "span", {
3579
3688
  "data-slot": "badge",
3580
3689
  "data-variant": t,
3581
- className: A(Es({ variant: t }), e),
3690
+ className: D(ks({ variant: t }), e),
3582
3691
  ...r
3583
3692
  });
3584
3693
  }
3585
- var Os = u("arrow-left", [["path", {
3694
+ var js = f("arrow-left", [["path", {
3586
3695
  d: "m12 19-7-7 7-7",
3587
3696
  key: "1l729n"
3588
3697
  }], ["path", {
3589
3698
  d: "M19 12H5",
3590
3699
  key: "x3x0zl"
3591
- }]]), ks = u("check-check", [["path", {
3700
+ }]]), Ms = f("check-check", [["path", {
3592
3701
  d: "M18 6 7 17l-5-5",
3593
3702
  key: "116fxf"
3594
3703
  }], ["path", {
3595
3704
  d: "m22 10-7.5 7.5L13 16",
3596
3705
  key: "ke71qq"
3597
- }]]), As = u("chevron-left", [["path", {
3706
+ }]]), Ns = f("chevron-left", [["path", {
3598
3707
  d: "m15 18-6-6 6-6",
3599
3708
  key: "1wnfg3"
3600
- }]]), js = u("circle-alert", [
3709
+ }]]), Ps = f("circle-alert", [
3601
3710
  ["circle", {
3602
3711
  cx: "12",
3603
3712
  cy: "12",
@@ -3618,7 +3727,7 @@ var Os = u("arrow-left", [["path", {
3618
3727
  y2: "16",
3619
3728
  key: "4dfq90"
3620
3729
  }]
3621
- ]), Ms = u("circle-check", [["circle", {
3730
+ ]), Fs = f("circle-check", [["circle", {
3622
3731
  cx: "12",
3623
3732
  cy: "12",
3624
3733
  r: "10",
@@ -3626,13 +3735,13 @@ var Os = u("arrow-left", [["path", {
3626
3735
  }], ["path", {
3627
3736
  d: "m9 12 2 2 4-4",
3628
3737
  key: "dzmm74"
3629
- }]]), Ns = u("house", [["path", {
3738
+ }]]), Is = f("house", [["path", {
3630
3739
  d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",
3631
3740
  key: "5wwlr5"
3632
3741
  }], ["path", {
3633
3742
  d: "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",
3634
3743
  key: "r6nss1"
3635
- }]]), Ps = u("info", [
3744
+ }]]), Ls = f("info", [
3636
3745
  ["circle", {
3637
3746
  cx: "12",
3638
3747
  cy: "12",
@@ -3647,7 +3756,7 @@ var Os = u("arrow-left", [["path", {
3647
3756
  d: "M12 8h.01",
3648
3757
  key: "e9boi3"
3649
3758
  }]
3650
- ]), Fs = u("octagon-x", [
3759
+ ]), Rs = f("octagon-x", [
3651
3760
  ["path", {
3652
3761
  d: "m15 9-6 6",
3653
3762
  key: "1uzhvr"
@@ -3660,13 +3769,13 @@ var Os = u("arrow-left", [["path", {
3660
3769
  d: "m9 9 6 6",
3661
3770
  key: "z0biqf"
3662
3771
  }]
3663
- ]), Is = u("pencil", [["path", {
3772
+ ]), zs = f("pencil", [["path", {
3664
3773
  d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
3665
3774
  key: "1a8usu"
3666
3775
  }], ["path", {
3667
3776
  d: "m15 5 4 4",
3668
3777
  key: "1mk7zo"
3669
- }]]), Ls = u("repeat-1", [
3778
+ }]]), Bs = f("repeat-1", [
3670
3779
  ["path", {
3671
3780
  d: "m17 2 4 4-4 4",
3672
3781
  key: "nntrym"
@@ -3687,7 +3796,7 @@ var Os = u("arrow-left", [["path", {
3687
3796
  d: "M11 10h1v4",
3688
3797
  key: "70cz1p"
3689
3798
  }]
3690
- ]), Rs = u("repeat", [
3799
+ ]), Vs = f("repeat", [
3691
3800
  ["path", {
3692
3801
  d: "m17 2 4 4-4 4",
3693
3802
  key: "nntrym"
@@ -3704,7 +3813,7 @@ var Os = u("arrow-left", [["path", {
3704
3813
  d: "M21 13v1a4 4 0 0 1-4 4H3",
3705
3814
  key: "1rx37r"
3706
3815
  }]
3707
- ]), zs = u("shuffle", [
3816
+ ]), Hs = f("shuffle", [
3708
3817
  ["path", {
3709
3818
  d: "m18 14 4 4-4 4",
3710
3819
  key: "10pe0f"
@@ -3725,7 +3834,7 @@ var Os = u("arrow-left", [["path", {
3725
3834
  d: "M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",
3726
3835
  key: "os18l9"
3727
3836
  }]
3728
- ]), Bs = u("sliders-horizontal", [
3837
+ ]), Us = f("sliders-horizontal", [
3729
3838
  ["path", {
3730
3839
  d: "M10 5H3",
3731
3840
  key: "1qgfaw"
@@ -3762,20 +3871,20 @@ var Os = u("arrow-left", [["path", {
3762
3871
  d: "M8 12H3",
3763
3872
  key: "a7s4jb"
3764
3873
  }]
3765
- ]), Vs = u("square-check-big", [["path", {
3874
+ ]), Ws = f("square-check-big", [["path", {
3766
3875
  d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",
3767
3876
  key: "2acyp4"
3768
3877
  }], ["path", {
3769
3878
  d: "m9 11 3 3L22 4",
3770
3879
  key: "1pflzl"
3771
- }]]), Hs = u("square", [["rect", {
3880
+ }]]), Gs = f("square", [["rect", {
3772
3881
  width: "18",
3773
3882
  height: "18",
3774
3883
  x: "3",
3775
3884
  y: "3",
3776
3885
  rx: "2",
3777
3886
  key: "afitv7"
3778
- }]]), Us = u("trash-2", [
3887
+ }]]), Ks = f("trash-2", [
3779
3888
  ["path", {
3780
3889
  d: "M10 11v6",
3781
3890
  key: "nco0om"
@@ -3796,7 +3905,7 @@ var Os = u("arrow-left", [["path", {
3796
3905
  d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
3797
3906
  key: "e791ji"
3798
3907
  }]
3799
- ]), Ws = u("undo-2", [["path", {
3908
+ ]), qs = f("undo-2", [["path", {
3800
3909
  d: "M9 14 4 9l5-5",
3801
3910
  key: "102s5s"
3802
3911
  }], ["path", {
@@ -3805,38 +3914,38 @@ var Os = u("arrow-left", [["path", {
3805
3914
  }]]);
3806
3915
  //#endregion
3807
3916
  //#region src/ui/components/ui/dialog.tsx
3808
- function Gs({ ...e }) {
3809
- return /* @__PURE__ */ W(t, {
3917
+ function Js({ ...e }) {
3918
+ return /* @__PURE__ */ U(g, {
3810
3919
  "data-slot": "dialog",
3811
3920
  ...e
3812
3921
  });
3813
3922
  }
3814
- function Ks({ container: e, ...t }) {
3815
- let n = M();
3816
- return /* @__PURE__ */ W(o, {
3923
+ function Ys({ container: e, ...t }) {
3924
+ let n = k();
3925
+ return /* @__PURE__ */ U(c, {
3817
3926
  "data-slot": "dialog-portal",
3818
3927
  container: e ?? n,
3819
3928
  ...t
3820
3929
  });
3821
3930
  }
3822
- function qs({ className: e, ...t }) {
3823
- return /* @__PURE__ */ W(_, {
3931
+ function Xs({ className: e, ...t }) {
3932
+ return /* @__PURE__ */ U(a, {
3824
3933
  "data-slot": "dialog-overlay",
3825
- className: A("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", e),
3934
+ className: D("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", e),
3826
3935
  ...t
3827
3936
  });
3828
3937
  }
3829
- function Js({ className: e, children: t, showCloseButton: n = !0, ...r }) {
3830
- return /* @__PURE__ */ G(Ks, {
3938
+ function Zs({ className: e, children: n, showCloseButton: r = !0, ...i }) {
3939
+ return /* @__PURE__ */ W(Ys, {
3831
3940
  "data-slot": "dialog-portal",
3832
- children: [/* @__PURE__ */ W(qs, {}), /* @__PURE__ */ G(s, {
3941
+ children: [/* @__PURE__ */ U(Xs, {}), /* @__PURE__ */ W(h, {
3833
3942
  "data-slot": "dialog-content",
3834
- className: A("fixed top-[50vh] left-[50vw] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 text-foreground shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg", e),
3835
- ...r,
3836
- children: [t, n && /* @__PURE__ */ G(g, {
3943
+ className: D("fixed top-[50vh] left-[50vw] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 text-foreground shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg", e),
3944
+ ...i,
3945
+ children: [n, r && /* @__PURE__ */ W(o, {
3837
3946
  "data-slot": "dialog-close",
3838
3947
  className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
3839
- children: [/* @__PURE__ */ W(p, {}), /* @__PURE__ */ W("span", {
3948
+ children: [/* @__PURE__ */ U(t, {}), /* @__PURE__ */ U("span", {
3840
3949
  className: "sr-only",
3841
3950
  children: "Close"
3842
3951
  })]
@@ -3844,55 +3953,55 @@ function Js({ className: e, children: t, showCloseButton: n = !0, ...r }) {
3844
3953
  })]
3845
3954
  });
3846
3955
  }
3847
- function Ys({ className: e, ...t }) {
3848
- return /* @__PURE__ */ W("div", {
3956
+ function Qs({ className: e, ...t }) {
3957
+ return /* @__PURE__ */ U("div", {
3849
3958
  "data-slot": "dialog-header",
3850
- className: A("flex flex-col gap-2 text-center sm:text-left", e),
3959
+ className: D("flex flex-col gap-2 text-center sm:text-left", e),
3851
3960
  ...t
3852
3961
  });
3853
3962
  }
3854
- function Xs({ className: e, showCloseButton: t = !1, children: n, ...r }) {
3855
- return /* @__PURE__ */ G("div", {
3963
+ function $s({ className: e, showCloseButton: t = !1, children: n, ...r }) {
3964
+ return /* @__PURE__ */ W("div", {
3856
3965
  "data-slot": "dialog-footer",
3857
- className: A("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
3966
+ className: D("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
3858
3967
  ...r,
3859
- children: [n, t && /* @__PURE__ */ W(g, {
3968
+ children: [n, t && /* @__PURE__ */ U(o, {
3860
3969
  asChild: !0,
3861
- children: /* @__PURE__ */ W(f, {
3970
+ children: /* @__PURE__ */ U(i, {
3862
3971
  variant: "outline",
3863
3972
  children: "Close"
3864
3973
  })
3865
3974
  })]
3866
3975
  });
3867
3976
  }
3868
- function Zs({ className: e, ...t }) {
3869
- return /* @__PURE__ */ W(c, {
3977
+ function ec({ className: e, ...t }) {
3978
+ return /* @__PURE__ */ U(M, {
3870
3979
  "data-slot": "dialog-title",
3871
- className: A("text-lg leading-none font-semibold text-foreground", e),
3980
+ className: D("text-lg leading-none font-semibold text-foreground", e),
3872
3981
  ...t
3873
3982
  });
3874
3983
  }
3875
- function Qs({ className: e, ...t }) {
3876
- return /* @__PURE__ */ W(h, {
3984
+ function tc({ className: e, ...t }) {
3985
+ return /* @__PURE__ */ U(_, {
3877
3986
  "data-slot": "dialog-description",
3878
- className: A("text-sm text-muted-foreground", e),
3987
+ className: D("text-sm text-muted-foreground", e),
3879
3988
  ...t
3880
3989
  });
3881
3990
  }
3882
3991
  //#endregion
3883
3992
  //#region src/ui/components/ui/separator.tsx
3884
- function $s({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }) {
3885
- return /* @__PURE__ */ W(Ts, {
3993
+ function nc({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }) {
3994
+ return /* @__PURE__ */ U(Os, {
3886
3995
  "data-slot": "separator",
3887
3996
  decorative: n,
3888
3997
  orientation: t,
3889
- className: A("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", e),
3998
+ className: D("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", e),
3890
3999
  ...r
3891
4000
  });
3892
4001
  }
3893
4002
  //#endregion
3894
4003
  //#region node_modules/next-themes/dist/index.mjs
3895
- var ec = (e, t, n, r, i, a, o, s) => {
4004
+ var rc = (e, t, n, r, i, a, o, s) => {
3896
4005
  let c = document.documentElement, l = ["light", "dark"];
3897
4006
  function u(t) {
3898
4007
  (Array.isArray(e) ? e : [e]).forEach((e) => {
@@ -3911,11 +4020,11 @@ var ec = (e, t, n, r, i, a, o, s) => {
3911
4020
  let e = localStorage.getItem(t) || n;
3912
4021
  u(o && e === "system" ? f() : e);
3913
4022
  } catch {}
3914
- }, tc = ue.createContext(void 0), nc = {
4023
+ }, ic = de.createContext(void 0), ac = {
3915
4024
  setTheme: (e) => {},
3916
4025
  themes: []
3917
- }, rc = () => ue.useContext(tc) ?? nc;
3918
- ue.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: r, enableColorScheme: i, defaultTheme: a, value: o, themes: s, nonce: c, scriptProps: l }) => {
4026
+ }, oc = () => de.useContext(ic) ?? ac;
4027
+ de.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: r, enableColorScheme: i, defaultTheme: a, value: o, themes: s, nonce: c, scriptProps: l }) => {
3919
4028
  let u = JSON.stringify([
3920
4029
  n,
3921
4030
  t,
@@ -3926,75 +4035,75 @@ ue.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: r, enableC
3926
4035
  r,
3927
4036
  i
3928
4037
  ]).slice(1, -1);
3929
- return ue.createElement("script", {
4038
+ return de.createElement("script", {
3930
4039
  ...l,
3931
4040
  suppressHydrationWarning: !0,
3932
4041
  nonce: typeof window > "u" ? c : "",
3933
- dangerouslySetInnerHTML: { __html: `(${ec.toString()})(${u})` }
4042
+ dangerouslySetInnerHTML: { __html: `(${rc.toString()})(${u})` }
3934
4043
  });
3935
4044
  });
3936
4045
  //#endregion
3937
4046
  //#region node_modules/sonner/dist/index.mjs
3938
- function ic(e) {
4047
+ function sc(e) {
3939
4048
  if (!e || typeof document > "u") return;
3940
4049
  let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
3941
4050
  n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
3942
4051
  }
3943
- var ac = (e) => {
4052
+ var cc = (e) => {
3944
4053
  switch (e) {
3945
- case "success": return cc;
3946
- case "info": return uc;
3947
- case "warning": return lc;
3948
- case "error": return dc;
4054
+ case "success": return dc;
4055
+ case "info": return pc;
4056
+ case "warning": return fc;
4057
+ case "error": return mc;
3949
4058
  default: return null;
3950
4059
  }
3951
- }, oc = Array(12).fill(0), sc = ({ visible: e, className: t }) => /*#__PURE__*/ R.createElement("div", {
4060
+ }, lc = Array(12).fill(0), uc = ({ visible: e, className: t }) => /*#__PURE__*/ L.createElement("div", {
3952
4061
  className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "),
3953
4062
  "data-visible": e
3954
- }, /*#__PURE__*/ R.createElement("div", { className: "sonner-spinner" }, oc.map((e, t) => /*#__PURE__*/ R.createElement("div", {
4063
+ }, /*#__PURE__*/ L.createElement("div", { className: "sonner-spinner" }, lc.map((e, t) => /*#__PURE__*/ L.createElement("div", {
3955
4064
  className: "sonner-loading-bar",
3956
4065
  key: `spinner-bar-${t}`
3957
- })))), cc = /*#__PURE__*/ R.createElement("svg", {
4066
+ })))), dc = /*#__PURE__*/ L.createElement("svg", {
3958
4067
  xmlns: "http://www.w3.org/2000/svg",
3959
4068
  viewBox: "0 0 20 20",
3960
4069
  fill: "currentColor",
3961
4070
  height: "20",
3962
4071
  width: "20"
3963
- }, /*#__PURE__*/ R.createElement("path", {
4072
+ }, /*#__PURE__*/ L.createElement("path", {
3964
4073
  fillRule: "evenodd",
3965
4074
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
3966
4075
  clipRule: "evenodd"
3967
- })), lc = /*#__PURE__*/ R.createElement("svg", {
4076
+ })), fc = /*#__PURE__*/ L.createElement("svg", {
3968
4077
  xmlns: "http://www.w3.org/2000/svg",
3969
4078
  viewBox: "0 0 24 24",
3970
4079
  fill: "currentColor",
3971
4080
  height: "20",
3972
4081
  width: "20"
3973
- }, /*#__PURE__*/ R.createElement("path", {
4082
+ }, /*#__PURE__*/ L.createElement("path", {
3974
4083
  fillRule: "evenodd",
3975
4084
  d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
3976
4085
  clipRule: "evenodd"
3977
- })), uc = /*#__PURE__*/ R.createElement("svg", {
4086
+ })), pc = /*#__PURE__*/ L.createElement("svg", {
3978
4087
  xmlns: "http://www.w3.org/2000/svg",
3979
4088
  viewBox: "0 0 20 20",
3980
4089
  fill: "currentColor",
3981
4090
  height: "20",
3982
4091
  width: "20"
3983
- }, /*#__PURE__*/ R.createElement("path", {
4092
+ }, /*#__PURE__*/ L.createElement("path", {
3984
4093
  fillRule: "evenodd",
3985
4094
  d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
3986
4095
  clipRule: "evenodd"
3987
- })), dc = /*#__PURE__*/ R.createElement("svg", {
4096
+ })), mc = /*#__PURE__*/ L.createElement("svg", {
3988
4097
  xmlns: "http://www.w3.org/2000/svg",
3989
4098
  viewBox: "0 0 20 20",
3990
4099
  fill: "currentColor",
3991
4100
  height: "20",
3992
4101
  width: "20"
3993
- }, /*#__PURE__*/ R.createElement("path", {
4102
+ }, /*#__PURE__*/ L.createElement("path", {
3994
4103
  fillRule: "evenodd",
3995
4104
  d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
3996
4105
  clipRule: "evenodd"
3997
- })), fc = /*#__PURE__*/ R.createElement("svg", {
4106
+ })), hc = /*#__PURE__*/ L.createElement("svg", {
3998
4107
  xmlns: "http://www.w3.org/2000/svg",
3999
4108
  width: "12",
4000
4109
  height: "12",
@@ -4004,25 +4113,25 @@ var ac = (e) => {
4004
4113
  strokeWidth: "1.5",
4005
4114
  strokeLinecap: "round",
4006
4115
  strokeLinejoin: "round"
4007
- }, /*#__PURE__*/ R.createElement("line", {
4116
+ }, /*#__PURE__*/ L.createElement("line", {
4008
4117
  x1: "18",
4009
4118
  y1: "6",
4010
4119
  x2: "6",
4011
4120
  y2: "18"
4012
- }), /*#__PURE__*/ R.createElement("line", {
4121
+ }), /*#__PURE__*/ L.createElement("line", {
4013
4122
  x1: "6",
4014
4123
  y1: "6",
4015
4124
  x2: "18",
4016
4125
  y2: "18"
4017
- })), pc = () => {
4018
- let [e, t] = R.useState(document.hidden);
4019
- return R.useEffect(() => {
4126
+ })), gc = () => {
4127
+ let [e, t] = L.useState(document.hidden);
4128
+ return L.useEffect(() => {
4020
4129
  let e = () => {
4021
4130
  t(document.hidden);
4022
4131
  };
4023
4132
  return document.addEventListener("visibilitychange", e), () => window.removeEventListener("visibilitychange", e);
4024
4133
  }, []), e;
4025
- }, mc = 1, hc = new class {
4134
+ }, _c = 1, vc = new class {
4026
4135
  constructor() {
4027
4136
  this.subscribe = (e) => (this.subscribers.push(e), () => {
4028
4137
  let t = this.subscribers.indexOf(e);
@@ -4032,7 +4141,7 @@ var ac = (e) => {
4032
4141
  }, this.addToast = (e) => {
4033
4142
  this.publish(e), this.toasts = [...this.toasts, e];
4034
4143
  }, this.create = (e) => {
4035
- let { message: t, ...n } = e, r = typeof e?.id == "number" || e.id?.length > 0 ? e.id : mc++, i = this.toasts.find((e) => e.id === r), a = e.dismissible === void 0 || e.dismissible;
4144
+ let { message: t, ...n } = e, r = typeof e?.id == "number" || e.id?.length > 0 ? e.id : _c++, i = this.toasts.find((e) => e.id === r), a = e.dismissible === void 0 || e.dismissible;
4036
4145
  return this.dismissedToasts.has(r) && this.dismissedToasts.delete(r), i ? this.toasts = this.toasts.map((n) => n.id === r ? (this.publish({
4037
4146
  ...n,
4038
4147
  ...e,
@@ -4092,14 +4201,14 @@ var ac = (e) => {
4092
4201
  description: typeof t.description == "function" ? void 0 : t.description
4093
4202
  }));
4094
4203
  let r = Promise.resolve(e instanceof Function ? e() : e), i = n !== void 0, a, o = r.then(async (e) => {
4095
- if (a = ["resolve", e], R.isValidElement(e)) i = !1, this.create({
4204
+ if (a = ["resolve", e], L.isValidElement(e)) i = !1, this.create({
4096
4205
  id: n,
4097
4206
  type: "default",
4098
4207
  message: e
4099
4208
  });
4100
- else if (_c(e) && !e.ok) {
4209
+ else if (bc(e) && !e.ok) {
4101
4210
  i = !1;
4102
- let r = typeof t.error == "function" ? await t.error(`HTTP error! status: ${e.status}`) : t.error, a = typeof t.description == "function" ? await t.description(`HTTP error! status: ${e.status}`) : t.description, o = typeof r == "object" && !R.isValidElement(r) ? r : { message: r };
4211
+ let r = typeof t.error == "function" ? await t.error(`HTTP error! status: ${e.status}`) : t.error, a = typeof t.description == "function" ? await t.description(`HTTP error! status: ${e.status}`) : t.description, o = typeof r == "object" && !L.isValidElement(r) ? r : { message: r };
4103
4212
  this.create({
4104
4213
  id: n,
4105
4214
  type: "error",
@@ -4108,7 +4217,7 @@ var ac = (e) => {
4108
4217
  });
4109
4218
  } else if (e instanceof Error) {
4110
4219
  i = !1;
4111
- let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !R.isValidElement(r) ? r : { message: r };
4220
+ let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !L.isValidElement(r) ? r : { message: r };
4112
4221
  this.create({
4113
4222
  id: n,
4114
4223
  type: "error",
@@ -4117,7 +4226,7 @@ var ac = (e) => {
4117
4226
  });
4118
4227
  } else if (t.success !== void 0) {
4119
4228
  i = !1;
4120
- let r = typeof t.success == "function" ? await t.success(e) : t.success, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !R.isValidElement(r) ? r : { message: r };
4229
+ let r = typeof t.success == "function" ? await t.success(e) : t.success, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !L.isValidElement(r) ? r : { message: r };
4121
4230
  this.create({
4122
4231
  id: n,
4123
4232
  type: "success",
@@ -4128,7 +4237,7 @@ var ac = (e) => {
4128
4237
  }).catch(async (e) => {
4129
4238
  if (a = ["reject", e], t.error !== void 0) {
4130
4239
  i = !1;
4131
- let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !R.isValidElement(r) ? r : { message: r };
4240
+ let r = typeof t.error == "function" ? await t.error(e) : t.error, a = typeof t.description == "function" ? await t.description(e) : t.description, o = typeof r == "object" && !L.isValidElement(r) ? r : { message: r };
4132
4241
  this.create({
4133
4242
  id: n,
4134
4243
  type: "error",
@@ -4141,7 +4250,7 @@ var ac = (e) => {
4141
4250
  }), s = () => new Promise((e, t) => o.then(() => a[0] === "reject" ? t(a[1]) : e(a[1])).catch(t));
4142
4251
  return typeof n != "string" && typeof n != "number" ? { unwrap: s } : Object.assign(n, { unwrap: s });
4143
4252
  }, this.custom = (e, t) => {
4144
- let n = t?.id || mc++;
4253
+ let n = t?.id || _c++;
4145
4254
  return this.create({
4146
4255
  jsx: e(n),
4147
4256
  id: n,
@@ -4149,61 +4258,61 @@ var ac = (e) => {
4149
4258
  }), n;
4150
4259
  }, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
4151
4260
  }
4152
- }(), gc = (e, t) => {
4153
- let n = t?.id || mc++;
4154
- return hc.addToast({
4261
+ }(), yc = (e, t) => {
4262
+ let n = t?.id || _c++;
4263
+ return vc.addToast({
4155
4264
  title: e,
4156
4265
  ...t,
4157
4266
  id: n
4158
4267
  }), n;
4159
- }, _c = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", vc = Object.assign(gc, {
4160
- success: hc.success,
4161
- info: hc.info,
4162
- warning: hc.warning,
4163
- error: hc.error,
4164
- custom: hc.custom,
4165
- message: hc.message,
4166
- promise: hc.promise,
4167
- dismiss: hc.dismiss,
4168
- loading: hc.loading
4268
+ }, bc = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", xc = Object.assign(yc, {
4269
+ success: vc.success,
4270
+ info: vc.info,
4271
+ warning: vc.warning,
4272
+ error: vc.error,
4273
+ custom: vc.custom,
4274
+ message: vc.message,
4275
+ promise: vc.promise,
4276
+ dismiss: vc.dismiss,
4277
+ loading: vc.loading
4169
4278
  }, {
4170
- getHistory: () => hc.toasts,
4171
- getToasts: () => hc.getActiveToasts()
4279
+ getHistory: () => vc.toasts,
4280
+ getToasts: () => vc.getActiveToasts()
4172
4281
  });
4173
- ic("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
4174
- function yc(e) {
4282
+ sc("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
4283
+ function Sc(e) {
4175
4284
  return e.label !== void 0;
4176
4285
  }
4177
- var bc = 3, xc = "24px", Sc = "16px", Cc = 4e3, wc = 356, Tc = 14, Ec = 45, Dc = 200;
4178
- function Oc(...e) {
4286
+ var Cc = 3, wc = "24px", Tc = "16px", Ec = 4e3, Dc = 356, Oc = 14, kc = 45, Ac = 200;
4287
+ function jc(...e) {
4179
4288
  return e.filter(Boolean).join(" ");
4180
4289
  }
4181
- function kc(e) {
4290
+ function Mc(e) {
4182
4291
  let [t, n] = e.split("-"), r = [];
4183
4292
  return t && r.push(t), n && r.push(n), r;
4184
4293
  }
4185
- var Ac = (e) => {
4186
- let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: l, expanded: u, removeToast: d, defaultRichColors: f, closeButton: p, style: m, cancelButtonStyle: h, actionButtonStyle: g, className: _ = "", descriptionClassName: v = "", duration: y, position: b, gap: x, expandByDefault: S, classNames: C, icons: w, closeButtonAriaLabel: T = "Close toast" } = e, [E, D] = R.useState(null), [O, ee] = R.useState(null), [te, ne] = R.useState(!1), [k, A] = R.useState(!1), [re, j] = R.useState(!1), [ie, M] = R.useState(!1), [ae, N] = R.useState(!1), [oe, se] = R.useState(0), [ce, P] = R.useState(0), F = R.useRef(n.duration || y || Cc), I = R.useRef(null), L = R.useRef(null), le = c === 0, ue = c + 1 <= o, de = n.type, fe = n.dismissible !== !1, pe = n.className || "", z = n.descriptionClassName || "", me = R.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), B = R.useMemo(() => n.closeButton ?? p, [n.closeButton, p]), V = R.useMemo(() => n.duration || y || Cc, [n.duration, y]), H = R.useRef(0), U = R.useRef(0), he = R.useRef(0), W = R.useRef(null), [G, ge] = b.split("-"), _e = R.useMemo(() => s.reduce((e, t, n) => n >= me ? e : e + t.height, 0), [s, me]), ve = pc(), ye = n.invert || t, be = de === "loading";
4187
- U.current = R.useMemo(() => me * x + _e, [me, _e]), R.useEffect(() => {
4188
- F.current = V;
4189
- }, [V]), R.useEffect(() => {
4294
+ var Nc = (e) => {
4295
+ let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: l, expanded: u, removeToast: d, defaultRichColors: f, closeButton: p, style: m, cancelButtonStyle: h, actionButtonStyle: g, className: _ = "", descriptionClassName: v = "", duration: y, position: b, gap: x, expandByDefault: S, classNames: C, icons: w, closeButtonAriaLabel: T = "Close toast" } = e, [E, D] = L.useState(null), [O, ee] = L.useState(null), [te, ne] = L.useState(!1), [k, A] = L.useState(!1), [re, j] = L.useState(!1), [ie, M] = L.useState(!1), [ae, N] = L.useState(!1), [oe, se] = L.useState(0), [P, F] = L.useState(0), ce = L.useRef(n.duration || y || Ec), le = L.useRef(null), I = L.useRef(null), ue = c === 0, de = c + 1 <= o, fe = n.type, pe = n.dismissible !== !1, me = n.className || "", R = n.descriptionClassName || "", he = L.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), z = L.useMemo(() => n.closeButton ?? p, [n.closeButton, p]), B = L.useMemo(() => n.duration || y || Ec, [n.duration, y]), V = L.useRef(0), H = L.useRef(0), ge = L.useRef(0), U = L.useRef(null), [W, _e] = b.split("-"), ve = L.useMemo(() => s.reduce((e, t, n) => n >= he ? e : e + t.height, 0), [s, he]), ye = gc(), be = n.invert || t, xe = fe === "loading";
4296
+ H.current = L.useMemo(() => he * x + ve, [he, ve]), L.useEffect(() => {
4297
+ ce.current = B;
4298
+ }, [B]), L.useEffect(() => {
4190
4299
  ne(!0);
4191
- }, []), R.useEffect(() => {
4192
- let e = L.current;
4300
+ }, []), L.useEffect(() => {
4301
+ let e = I.current;
4193
4302
  if (e) {
4194
4303
  let t = e.getBoundingClientRect().height;
4195
- return P(t), a((e) => [{
4304
+ return F(t), a((e) => [{
4196
4305
  toastId: n.id,
4197
4306
  height: t,
4198
4307
  position: n.position
4199
4308
  }, ...e]), () => a((e) => e.filter((e) => e.toastId !== n.id));
4200
4309
  }
4201
- }, [a, n.id]), R.useLayoutEffect(() => {
4310
+ }, [a, n.id]), L.useLayoutEffect(() => {
4202
4311
  if (!te) return;
4203
- let e = L.current, t = e.style.height;
4312
+ let e = I.current, t = e.style.height;
4204
4313
  e.style.height = "auto";
4205
4314
  let r = e.getBoundingClientRect().height;
4206
- e.style.height = t, P(r), a((e) => e.find((e) => e.toastId === n.id) ? e.map((e) => e.toastId === n.id ? {
4315
+ e.style.height = t, F(r), a((e) => e.find((e) => e.toastId === n.id) ? e.map((e) => e.toastId === n.id ? {
4207
4316
  ...e,
4208
4317
  height: r
4209
4318
  } : e) : [{
@@ -4221,52 +4330,52 @@ var Ac = (e) => {
4221
4330
  n.action,
4222
4331
  n.cancel
4223
4332
  ]);
4224
- let xe = R.useCallback(() => {
4225
- A(!0), se(U.current), a((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
4333
+ let G = L.useCallback(() => {
4334
+ A(!0), se(H.current), a((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
4226
4335
  d(n);
4227
- }, Dc);
4336
+ }, Ac);
4228
4337
  }, [
4229
4338
  n,
4230
4339
  d,
4231
4340
  a,
4232
- U
4341
+ H
4233
4342
  ]);
4234
- R.useEffect(() => {
4235
- if (n.promise && de === "loading" || n.duration === Infinity || n.type === "loading") return;
4343
+ L.useEffect(() => {
4344
+ if (n.promise && fe === "loading" || n.duration === Infinity || n.type === "loading") return;
4236
4345
  let e;
4237
- return u || i || ve ? (() => {
4238
- if (he.current < H.current) {
4239
- let e = (/* @__PURE__ */ new Date()).getTime() - H.current;
4240
- F.current -= e;
4346
+ return u || i || ye ? (() => {
4347
+ if (ge.current < V.current) {
4348
+ let e = (/* @__PURE__ */ new Date()).getTime() - V.current;
4349
+ ce.current -= e;
4241
4350
  }
4242
- he.current = (/* @__PURE__ */ new Date()).getTime();
4243
- })() : F.current !== Infinity && (H.current = (/* @__PURE__ */ new Date()).getTime(), e = setTimeout(() => {
4244
- n.onAutoClose == null || n.onAutoClose.call(n, n), xe();
4245
- }, F.current)), () => clearTimeout(e);
4351
+ ge.current = (/* @__PURE__ */ new Date()).getTime();
4352
+ })() : ce.current !== Infinity && (V.current = (/* @__PURE__ */ new Date()).getTime(), e = setTimeout(() => {
4353
+ n.onAutoClose == null || n.onAutoClose.call(n, n), G();
4354
+ }, ce.current)), () => clearTimeout(e);
4246
4355
  }, [
4247
4356
  u,
4248
4357
  i,
4249
4358
  n,
4250
- de,
4251
- ve,
4252
- xe
4253
- ]), R.useEffect(() => {
4254
- n.delete && (xe(), n.onDismiss == null || n.onDismiss.call(n, n));
4255
- }, [xe, n.delete]);
4359
+ fe,
4360
+ ye,
4361
+ G
4362
+ ]), L.useEffect(() => {
4363
+ n.delete && (G(), n.onDismiss == null || n.onDismiss.call(n, n));
4364
+ }, [G, n.delete]);
4256
4365
  function Se() {
4257
- return w?.loading ? /*#__PURE__*/ R.createElement("div", {
4258
- className: Oc(C?.loader, n?.classNames?.loader, "sonner-loader"),
4259
- "data-visible": de === "loading"
4260
- }, w.loading) : /*#__PURE__*/ R.createElement(sc, {
4261
- className: Oc(C?.loader, n?.classNames?.loader),
4262
- visible: de === "loading"
4366
+ return w?.loading ? /*#__PURE__*/ L.createElement("div", {
4367
+ className: jc(C?.loader, n?.classNames?.loader, "sonner-loader"),
4368
+ "data-visible": fe === "loading"
4369
+ }, w.loading) : /*#__PURE__*/ L.createElement(uc, {
4370
+ className: jc(C?.loader, n?.classNames?.loader),
4371
+ visible: fe === "loading"
4263
4372
  });
4264
4373
  }
4265
- let Ce = n.icon || w?.[de] || ac(de);
4266
- return /*#__PURE__*/ R.createElement("li", {
4374
+ let Ce = n.icon || w?.[fe] || cc(fe);
4375
+ return /*#__PURE__*/ L.createElement("li", {
4267
4376
  tabIndex: 0,
4268
- ref: L,
4269
- className: Oc(_, pe, C?.toast, n?.classNames?.toast, C?.default, C?.[de], n?.classNames?.[de]),
4377
+ ref: I,
4378
+ className: jc(_, me, C?.toast, n?.classNames?.toast, C?.default, C?.[fe], n?.classNames?.[fe]),
4270
4379
  "data-sonner-toast": "",
4271
4380
  "data-rich-colors": n.richColors ?? f,
4272
4381
  "data-styled": !(n.jsx || n.unstyled || r),
@@ -4274,15 +4383,15 @@ var Ac = (e) => {
4274
4383
  "data-promise": !!n.promise,
4275
4384
  "data-swiped": ae,
4276
4385
  "data-removed": k,
4277
- "data-visible": ue,
4278
- "data-y-position": G,
4279
- "data-x-position": ge,
4386
+ "data-visible": de,
4387
+ "data-y-position": W,
4388
+ "data-x-position": _e,
4280
4389
  "data-index": c,
4281
- "data-front": le,
4390
+ "data-front": ue,
4282
4391
  "data-swiping": re,
4283
- "data-dismissible": fe,
4284
- "data-type": de,
4285
- "data-invert": ye,
4392
+ "data-dismissible": pe,
4393
+ "data-type": fe,
4394
+ "data-invert": be,
4286
4395
  "data-swipe-out": ie,
4287
4396
  "data-swipe-direction": O,
4288
4397
  "data-expanded": !!(u || S && te),
@@ -4291,35 +4400,35 @@ var Ac = (e) => {
4291
4400
  "--index": c,
4292
4401
  "--toasts-before": c,
4293
4402
  "--z-index": l.length - c,
4294
- "--offset": `${k ? oe : U.current}px`,
4295
- "--initial-height": S ? "auto" : `${ce}px`,
4403
+ "--offset": `${k ? oe : H.current}px`,
4404
+ "--initial-height": S ? "auto" : `${P}px`,
4296
4405
  ...m,
4297
4406
  ...n.style
4298
4407
  },
4299
4408
  onDragEnd: () => {
4300
- j(!1), D(null), W.current = null;
4409
+ j(!1), D(null), U.current = null;
4301
4410
  },
4302
4411
  onPointerDown: (e) => {
4303
- e.button !== 2 && (be || !fe || (I.current = /* @__PURE__ */ new Date(), se(U.current), e.target.setPointerCapture(e.pointerId), e.target.tagName !== "BUTTON" && (j(!0), W.current = {
4412
+ e.button !== 2 && (xe || !pe || (le.current = /* @__PURE__ */ new Date(), se(H.current), e.target.setPointerCapture(e.pointerId), e.target.tagName !== "BUTTON" && (j(!0), U.current = {
4304
4413
  x: e.clientX,
4305
4414
  y: e.clientY
4306
4415
  })));
4307
4416
  },
4308
4417
  onPointerUp: () => {
4309
- if (ie || !fe) return;
4310
- W.current = null;
4311
- let e = Number(L.current?.style.getPropertyValue("--swipe-amount-x").replace("px", "") || 0), t = Number(L.current?.style.getPropertyValue("--swipe-amount-y").replace("px", "") || 0), r = (/* @__PURE__ */ new Date()).getTime() - I.current?.getTime(), i = E === "x" ? e : t, a = Math.abs(i) / r;
4312
- if (Math.abs(i) >= Ec || a > .11) {
4313
- se(U.current), n.onDismiss == null || n.onDismiss.call(n, n), ee(E === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), xe(), M(!0);
4418
+ if (ie || !pe) return;
4419
+ U.current = null;
4420
+ let e = Number(I.current?.style.getPropertyValue("--swipe-amount-x").replace("px", "") || 0), t = Number(I.current?.style.getPropertyValue("--swipe-amount-y").replace("px", "") || 0), r = (/* @__PURE__ */ new Date()).getTime() - le.current?.getTime(), i = E === "x" ? e : t, a = Math.abs(i) / r;
4421
+ if (Math.abs(i) >= kc || a > .11) {
4422
+ se(H.current), n.onDismiss == null || n.onDismiss.call(n, n), ee(E === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), G(), M(!0);
4314
4423
  return;
4315
4424
  }
4316
4425
  var o, s;
4317
- (o = L.current) == null || o.style.setProperty("--swipe-amount-x", "0px"), (s = L.current) == null || s.style.setProperty("--swipe-amount-y", "0px"), N(!1), j(!1), D(null);
4426
+ (o = I.current) == null || o.style.setProperty("--swipe-amount-x", "0px"), (s = I.current) == null || s.style.setProperty("--swipe-amount-y", "0px"), N(!1), j(!1), D(null);
4318
4427
  },
4319
4428
  onPointerMove: (t) => {
4320
4429
  var n, r;
4321
- if (!W.current || !fe || window.getSelection()?.toString().length > 0) return;
4322
- let i = t.clientY - W.current.y, a = t.clientX - W.current.x, o = e.swipeDirections ?? kc(b);
4430
+ if (!U.current || !pe || window.getSelection()?.toString().length > 0) return;
4431
+ let i = t.clientY - U.current.y, a = t.clientX - U.current.x, o = e.swipeDirections ?? Mc(b);
4323
4432
  !E && (Math.abs(a) > 1 || Math.abs(i) > 1) && D(Math.abs(a) > Math.abs(i) ? "x" : "y");
4324
4433
  let s = {
4325
4434
  x: 0,
@@ -4336,55 +4445,55 @@ var Ac = (e) => {
4336
4445
  let e = a * c(a);
4337
4446
  s.x = Math.abs(e) < Math.abs(a) ? e : a;
4338
4447
  }
4339
- (Math.abs(s.x) > 0 || Math.abs(s.y) > 0) && N(!0), (n = L.current) == null || n.style.setProperty("--swipe-amount-x", `${s.x}px`), (r = L.current) == null || r.style.setProperty("--swipe-amount-y", `${s.y}px`);
4448
+ (Math.abs(s.x) > 0 || Math.abs(s.y) > 0) && N(!0), (n = I.current) == null || n.style.setProperty("--swipe-amount-x", `${s.x}px`), (r = I.current) == null || r.style.setProperty("--swipe-amount-y", `${s.y}px`);
4340
4449
  }
4341
- }, B && !n.jsx && de !== "loading" ? /*#__PURE__*/ R.createElement("button", {
4450
+ }, z && !n.jsx && fe !== "loading" ? /*#__PURE__*/ L.createElement("button", {
4342
4451
  "aria-label": T,
4343
- "data-disabled": be,
4452
+ "data-disabled": xe,
4344
4453
  "data-close-button": !0,
4345
- onClick: be || !fe ? () => {} : () => {
4346
- xe(), n.onDismiss == null || n.onDismiss.call(n, n);
4454
+ onClick: xe || !pe ? () => {} : () => {
4455
+ G(), n.onDismiss == null || n.onDismiss.call(n, n);
4347
4456
  },
4348
- className: Oc(C?.closeButton, n?.classNames?.closeButton)
4349
- }, w?.close ?? fc) : null, (de || n.icon || n.promise) && n.icon !== null && (w?.[de] !== null || n.icon) ? /*#__PURE__*/ R.createElement("div", {
4457
+ className: jc(C?.closeButton, n?.classNames?.closeButton)
4458
+ }, w?.close ?? hc) : null, (fe || n.icon || n.promise) && n.icon !== null && (w?.[fe] !== null || n.icon) ? /*#__PURE__*/ L.createElement("div", {
4350
4459
  "data-icon": "",
4351
- className: Oc(C?.icon, n?.classNames?.icon)
4352
- }, n.promise || n.type === "loading" && !n.icon ? n.icon || Se() : null, n.type === "loading" ? null : Ce) : null, /*#__PURE__*/ R.createElement("div", {
4460
+ className: jc(C?.icon, n?.classNames?.icon)
4461
+ }, n.promise || n.type === "loading" && !n.icon ? n.icon || Se() : null, n.type === "loading" ? null : Ce) : null, /*#__PURE__*/ L.createElement("div", {
4353
4462
  "data-content": "",
4354
- className: Oc(C?.content, n?.classNames?.content)
4355
- }, /*#__PURE__*/ R.createElement("div", {
4463
+ className: jc(C?.content, n?.classNames?.content)
4464
+ }, /*#__PURE__*/ L.createElement("div", {
4356
4465
  "data-title": "",
4357
- className: Oc(C?.title, n?.classNames?.title)
4358
- }, n.jsx ? n.jsx : typeof n.title == "function" ? n.title() : n.title), n.description ? /*#__PURE__*/ R.createElement("div", {
4466
+ className: jc(C?.title, n?.classNames?.title)
4467
+ }, n.jsx ? n.jsx : typeof n.title == "function" ? n.title() : n.title), n.description ? /*#__PURE__*/ L.createElement("div", {
4359
4468
  "data-description": "",
4360
- className: Oc(v, z, C?.description, n?.classNames?.description)
4361
- }, typeof n.description == "function" ? n.description() : n.description) : null), /*#__PURE__*/ R.isValidElement(n.cancel) ? n.cancel : n.cancel && yc(n.cancel) ? /*#__PURE__*/ R.createElement("button", {
4469
+ className: jc(v, R, C?.description, n?.classNames?.description)
4470
+ }, typeof n.description == "function" ? n.description() : n.description) : null), /*#__PURE__*/ L.isValidElement(n.cancel) ? n.cancel : n.cancel && Sc(n.cancel) ? /*#__PURE__*/ L.createElement("button", {
4362
4471
  "data-button": !0,
4363
4472
  "data-cancel": !0,
4364
4473
  style: n.cancelButtonStyle || h,
4365
4474
  onClick: (e) => {
4366
- yc(n.cancel) && fe && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e), xe());
4475
+ Sc(n.cancel) && pe && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e), G());
4367
4476
  },
4368
- className: Oc(C?.cancelButton, n?.classNames?.cancelButton)
4369
- }, n.cancel.label) : null, /*#__PURE__*/ R.isValidElement(n.action) ? n.action : n.action && yc(n.action) ? /*#__PURE__*/ R.createElement("button", {
4477
+ className: jc(C?.cancelButton, n?.classNames?.cancelButton)
4478
+ }, n.cancel.label) : null, /*#__PURE__*/ L.isValidElement(n.action) ? n.action : n.action && Sc(n.action) ? /*#__PURE__*/ L.createElement("button", {
4370
4479
  "data-button": !0,
4371
4480
  "data-action": !0,
4372
4481
  style: n.actionButtonStyle || g,
4373
4482
  onClick: (e) => {
4374
- yc(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), !e.defaultPrevented && xe());
4483
+ Sc(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), !e.defaultPrevented && G());
4375
4484
  },
4376
- className: Oc(C?.actionButton, n?.classNames?.actionButton)
4485
+ className: jc(C?.actionButton, n?.classNames?.actionButton)
4377
4486
  }, n.action.label) : null);
4378
4487
  };
4379
- function jc() {
4488
+ function Pc() {
4380
4489
  if (typeof window > "u" || typeof document > "u") return "ltr";
4381
4490
  let e = document.documentElement.getAttribute("dir");
4382
4491
  return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
4383
4492
  }
4384
- function Mc(e, t) {
4493
+ function Fc(e, t) {
4385
4494
  let n = {};
4386
4495
  return [e, t].forEach((e, t) => {
4387
- let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ? Sc : xc;
4496
+ let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ? Tc : wc;
4388
4497
  function o(e) {
4389
4498
  [
4390
4499
  "top",
@@ -4405,11 +4514,11 @@ function Mc(e, t) {
4405
4514
  }) : o(a);
4406
4515
  }), n;
4407
4516
  }
4408
- var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4409
- let { id: n, invert: r, position: i = "bottom-right", hotkey: a = ["altKey", "KeyT"], expand: o, closeButton: s, className: c, offset: l, mobileOffset: u, theme: d = "light", richColors: f, duration: p, style: m, visibleToasts: h = bc, toastOptions: g, dir: _ = jc(), gap: v = Tc, icons: y, containerAriaLabel: b = "Notifications" } = e, [x, S] = R.useState([]), C = R.useMemo(() => n ? x.filter((e) => e.toasterId === n) : x.filter((e) => !e.toasterId), [x, n]), w = R.useMemo(() => Array.from(new Set([i].concat(C.filter((e) => e.position).map((e) => e.position)))), [C, i]), [T, E] = R.useState([]), [D, O] = R.useState(!1), [ee, te] = R.useState(!1), [ne, k] = R.useState(d === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : d), A = R.useRef(null), re = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), j = R.useRef(null), ie = R.useRef(!1), M = R.useCallback((e) => {
4410
- S((t) => (t.find((t) => t.id === e.id)?.delete || hc.dismiss(e.id), t.filter(({ id: t }) => t !== e.id)));
4517
+ var Ic = /*#__PURE__*/ L.forwardRef(function(e, t) {
4518
+ let { id: n, invert: r, position: i = "bottom-right", hotkey: a = ["altKey", "KeyT"], expand: o, closeButton: s, className: c, offset: l, mobileOffset: u, theme: d = "light", richColors: f, duration: p, style: m, visibleToasts: h = Cc, toastOptions: g, dir: _ = Pc(), gap: v = Oc, icons: y, containerAriaLabel: b = "Notifications" } = e, [x, S] = L.useState([]), C = L.useMemo(() => n ? x.filter((e) => e.toasterId === n) : x.filter((e) => !e.toasterId), [x, n]), w = L.useMemo(() => Array.from(new Set([i].concat(C.filter((e) => e.position).map((e) => e.position)))), [C, i]), [T, E] = L.useState([]), [D, O] = L.useState(!1), [ee, te] = L.useState(!1), [ne, k] = L.useState(d === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : d), A = L.useRef(null), re = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), j = L.useRef(null), ie = L.useRef(!1), M = L.useCallback((e) => {
4519
+ S((t) => (t.find((t) => t.id === e.id)?.delete || vc.dismiss(e.id), t.filter(({ id: t }) => t !== e.id)));
4411
4520
  }, []);
4412
- return R.useEffect(() => hc.subscribe((e) => {
4521
+ return L.useEffect(() => vc.subscribe((e) => {
4413
4522
  if (e.dismiss) {
4414
4523
  requestAnimationFrame(() => {
4415
4524
  S((t) => t.map((t) => t.id === e.id ? {
@@ -4420,7 +4529,7 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4420
4529
  return;
4421
4530
  }
4422
4531
  setTimeout(() => {
4423
- ge.flushSync(() => {
4532
+ _e.flushSync(() => {
4424
4533
  S((t) => {
4425
4534
  let n = t.findIndex((t) => t.id === e.id);
4426
4535
  return n === -1 ? [e, ...t] : [
@@ -4434,7 +4543,7 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4434
4543
  });
4435
4544
  });
4436
4545
  });
4437
- }), [x]), R.useEffect(() => {
4546
+ }), [x]), L.useEffect(() => {
4438
4547
  if (d !== "system") {
4439
4548
  k(d);
4440
4549
  return;
@@ -4454,9 +4563,9 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4454
4563
  }
4455
4564
  });
4456
4565
  }
4457
- }, [d]), R.useEffect(() => {
4566
+ }, [d]), L.useEffect(() => {
4458
4567
  x.length <= 1 && O(!1);
4459
- }, [x]), R.useEffect(() => {
4568
+ }, [x]), L.useEffect(() => {
4460
4569
  let e = (e) => {
4461
4570
  if (a.every((t) => e[t] || e.code === t)) {
4462
4571
  var t;
@@ -4465,11 +4574,11 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4465
4574
  e.code === "Escape" && (document.activeElement === A.current || A.current?.contains(document.activeElement)) && O(!1);
4466
4575
  };
4467
4576
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
4468
- }, [a]), R.useEffect(() => {
4577
+ }, [a]), L.useEffect(() => {
4469
4578
  if (A.current) return () => {
4470
4579
  j.current && (j.current.focus({ preventScroll: !0 }), j.current = null, ie.current = !1);
4471
4580
  };
4472
- }, [A.current]), /*#__PURE__*/ R.createElement("section", {
4581
+ }, [A.current]), /*#__PURE__*/ L.createElement("section", {
4473
4582
  ref: t,
4474
4583
  "aria-label": `${b} ${re}`,
4475
4584
  tabIndex: -1,
@@ -4479,9 +4588,9 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4479
4588
  suppressHydrationWarning: !0
4480
4589
  }, w.map((t, n) => {
4481
4590
  let [i, a] = t.split("-");
4482
- return C.length ? /*#__PURE__*/ R.createElement("ol", {
4591
+ return C.length ? /*#__PURE__*/ L.createElement("ol", {
4483
4592
  key: t,
4484
- dir: _ === "auto" ? jc() : _,
4593
+ dir: _ === "auto" ? Pc() : _,
4485
4594
  tabIndex: -1,
4486
4595
  ref: A,
4487
4596
  className: c,
@@ -4491,10 +4600,10 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4491
4600
  "data-x-position": a,
4492
4601
  style: {
4493
4602
  "--front-toast-height": `${T[0]?.height || 0}px`,
4494
- "--width": `${wc}px`,
4603
+ "--width": `${Dc}px`,
4495
4604
  "--gap": `${v}px`,
4496
4605
  ...m,
4497
- ...Mc(l, u)
4606
+ ...Fc(l, u)
4498
4607
  },
4499
4608
  onBlur: (e) => {
4500
4609
  ie.current && !e.currentTarget.contains(e.relatedTarget) && (ie.current = !1, j.current &&= (j.current.focus({ preventScroll: !0 }), null));
@@ -4512,7 +4621,7 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4512
4621
  e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || te(!0);
4513
4622
  },
4514
4623
  onPointerUp: () => te(!1)
4515
- }, C.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ R.createElement(Ac, {
4624
+ }, C.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ L.createElement(Nc, {
4516
4625
  key: n.id,
4517
4626
  icons: y,
4518
4627
  index: i,
@@ -4542,17 +4651,17 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4542
4651
  swipeDirections: e.swipeDirections
4543
4652
  }))) : null;
4544
4653
  }));
4545
- }), Pc = ({ ...e }) => {
4546
- let { theme: t = "system" } = rc();
4547
- return /* @__PURE__ */ W(Nc, {
4654
+ }), Lc = ({ ...e }) => {
4655
+ let { theme: t = "system" } = oc();
4656
+ return /* @__PURE__ */ U(Ic, {
4548
4657
  theme: t,
4549
4658
  className: "toaster group",
4550
4659
  icons: {
4551
- success: /* @__PURE__ */ W(Ms, { className: "size-4" }),
4552
- info: /* @__PURE__ */ W(Ps, { className: "size-4" }),
4553
- warning: /* @__PURE__ */ W(n, { className: "size-4" }),
4554
- error: /* @__PURE__ */ W(Fs, { className: "size-4" }),
4555
- loading: /* @__PURE__ */ W(d, { className: "size-4 animate-spin" })
4660
+ success: /* @__PURE__ */ U(Fs, { className: "size-4" }),
4661
+ info: /* @__PURE__ */ U(Ls, { className: "size-4" }),
4662
+ warning: /* @__PURE__ */ U(F, { className: "size-4" }),
4663
+ error: /* @__PURE__ */ U(Rs, { className: "size-4" }),
4664
+ loading: /* @__PURE__ */ U(te, { className: "size-4 animate-spin" })
4556
4665
  },
4557
4666
  style: {
4558
4667
  "--normal-bg": "var(--popover)",
@@ -4565,24 +4674,24 @@ var Nc = /*#__PURE__*/ R.forwardRef(function(e, t) {
4565
4674
  };
4566
4675
  //#endregion
4567
4676
  //#region src/ui/components/ui/textarea.tsx
4568
- function Fc({ className: e, ...t }) {
4569
- return /* @__PURE__ */ W("textarea", {
4677
+ function Rc({ className: e, ...t }) {
4678
+ return /* @__PURE__ */ U("textarea", {
4570
4679
  "data-slot": "textarea",
4571
- className: A("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40", e),
4680
+ className: D("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40", e),
4572
4681
  ...t
4573
4682
  });
4574
4683
  }
4575
4684
  //#endregion
4576
4685
  //#region src/platform/datasource/remotePreflight.ts
4577
- var Ic = 220;
4578
- function Lc(e) {
4686
+ var zc = 220, Bc = 2e4;
4687
+ function Vc(e) {
4579
4688
  let t = e.trim();
4580
- return t ? t.length > Ic ? `${t.slice(0, Ic)}…` : t : "";
4689
+ return t ? t.length > zc ? `${t.slice(0, zc)}…` : t : "";
4581
4690
  }
4582
- function Rc(e, t) {
4691
+ function Hc(e, t) {
4583
4692
  return `Content-Range: ${e.trim() || "(empty)"}; Accept-Ranges: ${t.trim() || "(empty)"}`;
4584
4693
  }
4585
- var zc = {
4694
+ var Uc = {
4586
4695
  range_http: "Range preflight failed: expected HTTP 206 (Partial Content), actual {actualStatus}.",
4587
4696
  range_headers: "Range not supported: expected Accept-Ranges: bytes or a bytes Content-Range; actual: {headerSummary}.",
4588
4697
  full_download_too_large: "This server does not support Range requests and the complete archive exceeds the safe download limit.",
@@ -4590,17 +4699,17 @@ var zc = {
4590
4699
  network: "Network or authentication failed: {detail}.",
4591
4700
  unknown: "Preflight failed: {detail}."
4592
4701
  };
4593
- function Bc(e, t) {
4702
+ function Wc(e, t) {
4594
4703
  let n = `dialogs.remoteArchive.error.${t.code}`, r = {};
4595
- return t.actualStatus !== void 0 && (r.actualStatus = t.actualStatus), t.headerSummary && (r.headerSummary = t.headerSummary), t.detail && (r.detail = t.detail), e(n, zc[t.code], r);
4704
+ return t.actualStatus !== void 0 && (r.actualStatus = t.actualStatus), t.headerSummary && (r.headerSummary = t.headerSummary), t.detail && (r.detail = t.detail), e(n, Uc[t.code], r);
4596
4705
  }
4597
- function Vc(e) {
4706
+ function Gc(e) {
4598
4707
  let t = e.get("content-length");
4599
4708
  if (!t) return;
4600
4709
  let n = Number(t);
4601
4710
  return Number.isSafeInteger(n) && n >= 0 ? n : void 0;
4602
4711
  }
4603
- async function Hc(e, t) {
4712
+ async function Kc(e, t) {
4604
4713
  if (!e.body) return /* @__PURE__ */ new Uint8Array();
4605
4714
  let n = e.body.getReader(), r = [], i = 0;
4606
4715
  try {
@@ -4617,10 +4726,10 @@ async function Hc(e, t) {
4617
4726
  for (let e of r) a.set(e, o), o += e.byteLength;
4618
4727
  return a;
4619
4728
  }
4620
- function Uc(e, t, n) {
4729
+ function qc(e, t, n) {
4621
4730
  return hs(n) || ms(t) || fs(e);
4622
4731
  }
4623
- function Wc() {
4732
+ function Jc() {
4624
4733
  return {
4625
4734
  ok: !1,
4626
4735
  kind: "unknown",
@@ -4630,52 +4739,100 @@ function Wc() {
4630
4739
  }
4631
4740
  };
4632
4741
  }
4633
- async function Gc(e) {
4742
+ function Yc(e) {
4743
+ if (e instanceof DOMException && (e.name === "TimeoutError" || e.name === "AbortError")) return !0;
4744
+ let t = String(e?.message || e).toLowerCase();
4745
+ return t.includes("timeout") || t.includes("timed out") || t.includes("aborted");
4746
+ }
4747
+ function Xc(e) {
4748
+ let t = new AbortController(), n = setTimeout(() => {
4749
+ t.abort();
4750
+ }, e);
4751
+ return {
4752
+ signal: t.signal,
4753
+ cancel: () => clearTimeout(n)
4754
+ };
4755
+ }
4756
+ async function Zc(e) {
4757
+ let t;
4758
+ try {
4759
+ let n = new URL(e);
4760
+ if (n.protocol !== "https:") return {
4761
+ ok: !1,
4762
+ kind: "network",
4763
+ failure: {
4764
+ code: "network",
4765
+ detail: "Blocked insecure HTTP archive URL; use HTTPS"
4766
+ }
4767
+ };
4768
+ t = n.toString();
4769
+ } catch {
4770
+ return {
4771
+ ok: !1,
4772
+ kind: "unknown",
4773
+ failure: {
4774
+ code: "unknown",
4775
+ detail: "Invalid archive URL"
4776
+ }
4777
+ };
4778
+ }
4779
+ let { signal: n, cancel: r } = Xc(Bc);
4634
4780
  try {
4635
- let t = await fetch(e, { headers: { Range: "bytes=0-511" } }), n = Vc(t.headers);
4636
- if (t.status === 200) {
4637
- if (n !== void 0 && n > 2147483648) return await t.body?.cancel().catch(() => void 0), {
4781
+ let r = await fetch(t, {
4782
+ headers: { Range: "bytes=0-511" },
4783
+ signal: n
4784
+ }), i = Gc(r.headers);
4785
+ if (r.status === 200) {
4786
+ if (i !== void 0 && i > 2147483648) return await r.body?.cancel().catch(() => void 0), {
4638
4787
  ok: !1,
4639
4788
  kind: "range",
4640
4789
  failure: {
4641
4790
  code: "full_download_too_large",
4642
- actualStatus: t.status
4791
+ actualStatus: r.status
4643
4792
  }
4644
4793
  };
4645
- let r = await Hc(t, 512), i = Uc(e, t.headers, r);
4646
- return i ? {
4794
+ let t = await Kc(r, 512), n = qc(e, r.headers, t);
4795
+ return n ? {
4647
4796
  ok: !0,
4648
- kind: i,
4797
+ kind: n,
4649
4798
  accessMode: "full",
4650
- contentLength: n
4651
- } : Wc();
4799
+ contentLength: i
4800
+ } : Jc();
4652
4801
  }
4653
- if (t.status !== 206) return {
4802
+ if (r.status !== 206) return {
4654
4803
  ok: !1,
4655
4804
  kind: "range",
4656
4805
  failure: {
4657
4806
  code: "range_http",
4658
- actualStatus: t.status
4807
+ actualStatus: r.status
4659
4808
  }
4660
4809
  };
4661
- let r = t.headers.get("content-range") || "", i = t.headers.get("accept-ranges") || "";
4662
- if (!r.toLowerCase().startsWith("bytes ") && !i.toLowerCase().includes("bytes")) return {
4810
+ let a = r.headers.get("content-range") || "", o = r.headers.get("accept-ranges") || "";
4811
+ if (!a.toLowerCase().startsWith("bytes ") && !o.toLowerCase().includes("bytes")) return {
4663
4812
  ok: !1,
4664
4813
  kind: "range",
4665
4814
  failure: {
4666
4815
  code: "range_headers",
4667
- headerSummary: Rc(r, i)
4816
+ headerSummary: Hc(a, o)
4668
4817
  }
4669
4818
  };
4670
- let a = await Hc(t, 512), o = Uc(e, t.headers, a);
4671
- return o ? {
4819
+ let s = await Kc(r, 512), c = qc(e, r.headers, s);
4820
+ return c ? {
4672
4821
  ok: !0,
4673
- kind: o,
4822
+ kind: c,
4674
4823
  accessMode: "range",
4675
- contentLength: n
4676
- } : Wc();
4824
+ contentLength: i
4825
+ } : Jc();
4677
4826
  } catch (e) {
4678
- let t = Lc(e.message || String(e)), n = t.toLowerCase();
4827
+ if (Yc(e)) return {
4828
+ ok: !1,
4829
+ kind: "network",
4830
+ failure: {
4831
+ code: "network",
4832
+ detail: `Preflight timed out after ${Bc / 1e3}s`
4833
+ }
4834
+ };
4835
+ let t = Vc(e.message || String(e)), n = t.toLowerCase();
4679
4836
  return n.includes("cors") ? {
4680
4837
  ok: !1,
4681
4838
  kind: "cors",
@@ -4698,48 +4855,50 @@ async function Gc(e) {
4698
4855
  detail: t || "Unknown error"
4699
4856
  }
4700
4857
  };
4858
+ } finally {
4859
+ r();
4701
4860
  }
4702
4861
  }
4703
4862
  //#endregion
4704
4863
  //#region src/core/playback/episodeLoadPlan.ts
4705
- function Kc(e) {
4864
+ function Qc(e) {
4706
4865
  if (!e?.dtype) return !1;
4707
4866
  let t = e.dtype.toLowerCase();
4708
4867
  return t.includes("float") || t.includes("int") || t.includes("double") || t.includes("decimal");
4709
4868
  }
4710
- function qc(e) {
4869
+ function $c(e) {
4711
4870
  return e === "observation" || e.startsWith("observation.") || e === "action" || e.startsWith("action.");
4712
4871
  }
4713
- function Jc(e) {
4872
+ function el(e) {
4714
4873
  let t = /* @__PURE__ */ new Set(["timestamp"]);
4715
4874
  return Object.entries(e.features).forEach(([e, n]) => {
4716
- qc(e) && Kc(n) && t.add(e);
4875
+ $c(e) && Qc(n) && t.add(e);
4717
4876
  }), Array.from(t);
4718
4877
  }
4719
- function Yc(e, t) {
4878
+ function tl(e, t) {
4720
4879
  let n = e.timestamp, r = n ? Array.from(n.values.slice(0, n.rows), (e, n) => Number.isFinite(e) ? e : n / Math.max(1, t)) : [], i = r.length || Object.values(e).reduce((e, t) => Math.max(e, t.rows), 0);
4721
4880
  return Array.from({ length: i }, (e, n) => ({
4722
4881
  frame_index: n,
4723
4882
  timestamp: r[n] ?? n / Math.max(1, t)
4724
4883
  }));
4725
4884
  }
4726
- function Xc(e, t) {
4885
+ function nl(e, t) {
4727
4886
  return e.find((e) => !t.has(e.episode_index))?.episode_index ?? null;
4728
4887
  }
4729
4888
  //#endregion
4730
4889
  //#region src/core/playback/playbackAutoplay.ts
4731
- function Zc(e) {
4890
+ function rl(e) {
4732
4891
  return e.totalFrames <= 0 || e.isLoading || e.isPlaying || e.userPaused ? !1 : e.lastAutoPlayId !== e.currentId;
4733
4892
  }
4734
4893
  //#endregion
4735
4894
  //#region src/core/utils/episodeKeyboard.ts
4736
- var Qc = (e) => e === "Enter";
4895
+ var il = (e) => e === "Enter";
4737
4896
  //#endregion
4738
4897
  //#region src/platform/services/ParquetImageService.ts
4739
- function $c() {
4898
+ function al() {
4740
4899
  return `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
4741
4900
  }
4742
- var el = class {
4901
+ var ol = class {
4743
4902
  worker = null;
4744
4903
  rawWorker = null;
4745
4904
  dataSource = null;
@@ -4762,7 +4921,7 @@ var el = class {
4762
4921
  }
4763
4922
  async getWorker() {
4764
4923
  if (this.assertActive(), !this.worker) {
4765
- let { remote: e, raw: t } = le();
4924
+ let { remote: e, raw: t } = ue();
4766
4925
  this.worker = e, this.rawWorker = t, this.bindRawWorkerMessages(t), await this.worker.init(), this.assertActive();
4767
4926
  }
4768
4927
  return this.worker;
@@ -4815,7 +4974,7 @@ var el = class {
4815
4974
  }
4816
4975
  async preloadEpisode(e, t, n, r, i) {
4817
4976
  this.assertActive(), await this.getWorker(), this.currentPreloadKey = r;
4818
- let a = $c(), o = new Promise((e, t) => {
4977
+ let a = al(), o = new Promise((e, t) => {
4819
4978
  this.pendingPreloadCallbacks.set(a, {
4820
4979
  resolve: e,
4821
4980
  reject: t,
@@ -4833,7 +4992,7 @@ var el = class {
4833
4992
  }
4834
4993
  async getFrameBitmap(e, t, n) {
4835
4994
  if (this.disposed || !this.rawWorker) return null;
4836
- let r = $c(), i = new Promise((e, t) => {
4995
+ let r = al(), i = new Promise((e, t) => {
4837
4996
  this.pendingBitmapCallbacks.set(r, {
4838
4997
  resolve: e,
4839
4998
  reject: t
@@ -4933,18 +5092,18 @@ var el = class {
4933
5092
  try {
4934
5093
  await this.worker.clearCache();
4935
5094
  } catch {}
4936
- L(this.worker), this.worker = null, this.rawWorker = null;
5095
+ I(this.worker), this.worker = null, this.rawWorker = null;
4937
5096
  }
4938
5097
  });
4939
5098
  }
4940
5099
  };
4941
- function tl() {
4942
- return new el();
5100
+ function sl() {
5101
+ return new ol();
4943
5102
  }
4944
- new el();
5103
+ new ol();
4945
5104
  //#endregion
4946
5105
  //#region src/platform/utils/storage.ts
4947
- var nl = {
5106
+ var cl = {
4948
5107
  getItem(e) {
4949
5108
  if (typeof window > "u") return null;
4950
5109
  try {
@@ -4986,9 +5145,9 @@ var nl = {
4986
5145
  return console.error(`[safeStorage] Failed to stringify JSON for "${e}":`, t), !1;
4987
5146
  }
4988
5147
  }
4989
- }, rl = ({ children: e, controlledTheme: t, rootElement: n }) => {
4990
- let r = t !== void 0, [i, a] = U(() => r ? t : nl.getItem("theme") || "system"), o = r ? t : i, [s, c] = U(() => o === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : o);
4991
- return B(() => {
5148
+ }, ll = ({ children: e, controlledTheme: t, rootElement: n }) => {
5149
+ let r = t !== void 0, [i, a] = H(() => r ? t : cl.getItem("theme") || "system"), o = r ? t : i, [s, c] = H(() => o === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : o);
5150
+ return z(() => {
4992
5151
  let e = () => {
4993
5152
  let e;
4994
5153
  e = o === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : o, c(e), n && n.classList.toggle("dark", e === "dark");
@@ -4999,18 +5158,18 @@ var nl = {
4999
5158
  let t = window.matchMedia("(prefers-color-scheme: dark)");
5000
5159
  return t.addEventListener("change", e), () => t.removeEventListener("change", e);
5001
5160
  }
5002
- }, [o, n]), /* @__PURE__ */ W(k.Provider, {
5161
+ }, [o, n]), /* @__PURE__ */ U(E.Provider, {
5003
5162
  value: {
5004
5163
  theme: o,
5005
5164
  setTheme: (e) => {
5006
- a(e), r || nl.setItem("theme", e);
5165
+ a(e), r || cl.setItem("theme", e);
5007
5166
  },
5008
5167
  resolvedTheme: s
5009
5168
  },
5010
5169
  children: e
5011
5170
  });
5012
- }, il = fe(null), al = ({ children: e }) => {
5013
- let [t, n] = U([]), r = z((e) => {
5171
+ }, ul = pe(null), dl = ({ children: e }) => {
5172
+ let [t, n] = H([]), r = R((e) => {
5014
5173
  n((t) => {
5015
5174
  let n = t.findIndex((t) => t.id === e.id);
5016
5175
  if (n === -1) return [...t, e];
@@ -5020,18 +5179,18 @@ var nl = {
5020
5179
  ...e
5021
5180
  }, r;
5022
5181
  });
5023
- }, []), i = z((e) => {
5182
+ }, []), i = R((e) => {
5024
5183
  n((t) => t.map((t) => t.id === e ? {
5025
5184
  ...t,
5026
5185
  phase: "ready"
5027
5186
  } : t));
5028
- }, []), a = z((e, t) => {
5187
+ }, []), a = R((e, t) => {
5029
5188
  n((n) => n.map((n) => n.id === e ? {
5030
5189
  ...n,
5031
5190
  phase: "error",
5032
5191
  error: t
5033
5192
  } : n));
5034
- }, []), o = z(() => n([]), []), s = V(() => ({
5193
+ }, []), o = R(() => n([]), []), s = B(() => ({
5035
5194
  tasks: t,
5036
5195
  upsertTask: r,
5037
5196
  completeTask: i,
@@ -5044,49 +5203,49 @@ var nl = {
5044
5203
  a,
5045
5204
  o
5046
5205
  ]);
5047
- return /* @__PURE__ */ W(il.Provider, {
5206
+ return /* @__PURE__ */ U(ul.Provider, {
5048
5207
  value: s,
5049
5208
  children: e
5050
5209
  });
5051
- }, ol = () => {
5052
- let e = me(il);
5210
+ }, fl = () => {
5211
+ let e = he(ul);
5053
5212
  if (!e) throw Error("useLoading must be used within LoadingProvider");
5054
5213
  return e;
5055
- }, sl = fe(null), cl = ({ children: e }) => {
5056
- let t = z((e, t = "info", n = 3e3) => {
5214
+ }, pl = pe(null), ml = ({ children: e }) => {
5215
+ let t = R((e, t = "info", n = 3e3) => {
5057
5216
  let r = { duration: n };
5058
5217
  switch (t) {
5059
5218
  case "success":
5060
- vc.success(e, r);
5219
+ xc.success(e, r);
5061
5220
  break;
5062
5221
  case "error":
5063
- vc.error(e, r);
5222
+ xc.error(e, r);
5064
5223
  break;
5065
5224
  case "warning":
5066
- vc.warning(e, r);
5225
+ xc.warning(e, r);
5067
5226
  break;
5068
- default: vc.info(e, r);
5227
+ default: xc.info(e, r);
5069
5228
  }
5070
- }, []), n = z((e) => {
5071
- e ? vc.dismiss(e) : vc.dismiss();
5072
- }, []), r = V(() => ({
5229
+ }, []), n = R((e) => {
5230
+ e ? xc.dismiss(e) : xc.dismiss();
5231
+ }, []), r = B(() => ({
5073
5232
  showToast: t,
5074
5233
  dismissToast: n
5075
5234
  }), [t, n]);
5076
- return /* @__PURE__ */ W(sl.Provider, {
5235
+ return /* @__PURE__ */ U(pl.Provider, {
5077
5236
  value: r,
5078
5237
  children: e
5079
5238
  });
5080
5239
  };
5081
5240
  //#endregion
5082
5241
  //#region src/react/contexts/versionMutationPolicy.ts
5083
- function ll(e) {
5242
+ function hl(e) {
5084
5243
  if (e?.status !== "supported") {
5085
5244
  let t = e?.normalizedVersion ?? "unknown", n = e?.status ?? "unavailable";
5086
5245
  throw Error(`Episode mutations are disabled for LeRobot ${t} (${n}); the dataset is immutable`);
5087
5246
  }
5088
5247
  }
5089
- function ul(e) {
5248
+ function gl(e) {
5090
5249
  return {
5091
5250
  tasks: [e],
5092
5251
  task_index: void 0
@@ -5094,38 +5253,38 @@ function ul(e) {
5094
5253
  }
5095
5254
  //#endregion
5096
5255
  //#region src/react/contexts/useEpisodeView.ts
5097
- function dl(e, t) {
5256
+ function _l(e, t) {
5098
5257
  let n = t.get(e.episode_index);
5099
5258
  return n ? {
5100
5259
  ...e,
5101
5260
  ...n
5102
5261
  } : e;
5103
5262
  }
5104
- function fl(e, t, n) {
5105
- return e.filter((e) => !t.has(e.episode_index)).map((e) => dl(e, n));
5263
+ function vl(e, t, n) {
5264
+ return e.filter((e) => !t.has(e.episode_index)).map((e) => _l(e, n));
5106
5265
  }
5107
- function pl(e, t) {
5266
+ function yl(e, t) {
5108
5267
  return t.size === 0 ? e : e.filter((e) => t.has(e.episode_index));
5109
5268
  }
5110
- function ml(e, t) {
5269
+ function bl(e, t) {
5111
5270
  let n = new Set(e);
5112
5271
  return n.has(t) ? n.delete(t) : n.add(t), n;
5113
5272
  }
5114
- function hl({ episodes: e, versionCapability: t }) {
5115
- let [n, r] = U(() => /* @__PURE__ */ new Map()), [i, a] = U(() => /* @__PURE__ */ new Set()), [o, s] = U(() => /* @__PURE__ */ new Set()), c = z((n, i) => {
5116
- ll(t), r((t) => {
5273
+ function xl({ episodes: e, versionCapability: t }) {
5274
+ let [n, r] = H(() => /* @__PURE__ */ new Map()), [i, a] = H(() => /* @__PURE__ */ new Set()), [o, s] = H(() => /* @__PURE__ */ new Set()), c = R((n, i) => {
5275
+ hl(t), r((t) => {
5117
5276
  if (!e.some((e) => e.episode_index === n)) return t;
5118
5277
  let r = new Map(t);
5119
- return r.set(n, ul(i)), r;
5278
+ return r.set(n, gl(i)), r;
5120
5279
  });
5121
- }, [e, t]), l = z((e) => {
5122
- ll(t), a((t) => new Set(t).add(e));
5123
- }, [t]), u = z((e) => {
5124
- ll(t), a((t) => {
5280
+ }, [e, t]), l = R((e) => {
5281
+ hl(t), a((t) => new Set(t).add(e));
5282
+ }, [t]), u = R((e) => {
5283
+ hl(t), a((t) => {
5125
5284
  let n = new Set(t);
5126
5285
  return n.delete(e), n;
5127
5286
  });
5128
- }, [t]), d = z((e) => dl(e, n), [n]), f = V(() => fl(e, i, n), [
5287
+ }, [t]), d = R((e) => _l(e, n), [n]), f = B(() => vl(e, i, n), [
5129
5288
  e,
5130
5289
  i,
5131
5290
  n
@@ -5138,25 +5297,25 @@ function hl({ episodes: e, versionCapability: t }) {
5138
5297
  selectedEpisodeIndices: o,
5139
5298
  setSelectedEpisodeIndices: s,
5140
5299
  effectiveEpisodes: f,
5141
- episodesForExport: V(() => pl(f, o), [f, o]),
5300
+ episodesForExport: B(() => yl(f, o), [f, o]),
5142
5301
  editEpisodeTask: c,
5143
5302
  deleteEpisode: l,
5144
5303
  restoreEpisode: u,
5145
5304
  getEffectiveEpisode: d,
5146
- toggleEpisodeSelection: z((e) => {
5147
- s((t) => ml(t, e));
5305
+ toggleEpisodeSelection: R((e) => {
5306
+ s((t) => bl(t, e));
5148
5307
  }, []),
5149
- selectAllInList: z((e) => {
5308
+ selectAllInList: R((e) => {
5150
5309
  s(new Set(e));
5151
5310
  }, []),
5152
- clearEpisodeSelection: z(() => {
5311
+ clearEpisodeSelection: R(() => {
5153
5312
  s(/* @__PURE__ */ new Set());
5154
5313
  }, [])
5155
5314
  };
5156
5315
  }
5157
5316
  //#endregion
5158
5317
  //#region src/react/contexts/useFeatureSubscriptions.ts
5159
- function gl(e) {
5318
+ function Sl(e) {
5160
5319
  let t = [];
5161
5320
  for (let n = 0; n < e.rows; n++) {
5162
5321
  let r = n * e.width;
@@ -5164,10 +5323,10 @@ function gl(e) {
5164
5323
  }
5165
5324
  return t;
5166
5325
  }
5167
- function _l(e) {
5326
+ function Cl(e) {
5168
5327
  return e?.dtype === "image" || e?.dtype === "video";
5169
5328
  }
5170
- var vl = class {
5329
+ var wl = class {
5171
5330
  subscriptions = {};
5172
5331
  pending = /* @__PURE__ */ new Set();
5173
5332
  loading = /* @__PURE__ */ new Set();
@@ -5180,13 +5339,13 @@ var vl = class {
5180
5339
  subscribe(e) {
5181
5340
  this.subscriptions[e] = (this.subscriptions[e] ?? 0) + 1;
5182
5341
  let t = this.options.getSnapshot();
5183
- return _l(t.info?.features[e]) || this.subscriptions[e] === 1 && t.featureData[e] === void 0 && (this.pending.add(e), this.ensureScheduled()), Promise.resolve();
5342
+ return Cl(t.info?.features[e]) || this.subscriptions[e] === 1 && t.featureData[e] === void 0 && (this.pending.add(e), this.ensureScheduled()), Promise.resolve();
5184
5343
  }
5185
5344
  unsubscribe(e) {
5186
5345
  (this.subscriptions[e] ?? 0) > 0 && --this.subscriptions[e];
5187
5346
  }
5188
5347
  getSubscribedFeatureNames(e) {
5189
- return Object.entries(this.subscriptions).filter(([t, n]) => n > 0 && !_l(e.features[t])).map(([e]) => e);
5348
+ return Object.entries(this.subscriptions).filter(([t, n]) => n > 0 && !Cl(e.features[t])).map(([e]) => e);
5190
5349
  }
5191
5350
  clearPending() {
5192
5351
  this.generation += 1, this.pending.clear(), this.loading.clear(), this.timer !== null && ((this.options.cancel ?? window.clearTimeout)(this.timer), this.timer = null);
@@ -5201,7 +5360,7 @@ var vl = class {
5201
5360
  this.pending.clear();
5202
5361
  return;
5203
5362
  }
5204
- let n = Array.from(this.pending).filter((e) => this.loading.has(e) || t.featureData[e] !== void 0 ? !1 : !_l(t.info?.features[e]));
5363
+ let n = Array.from(this.pending).filter((e) => this.loading.has(e) || t.featureData[e] !== void 0 ? !1 : !Cl(t.info?.features[e]));
5205
5364
  if (n.length === 0) {
5206
5365
  this.pending.clear();
5207
5366
  return;
@@ -5212,7 +5371,7 @@ var vl = class {
5212
5371
  let r = {}, i = [];
5213
5372
  n.forEach((e) => {
5214
5373
  let n = t.chartData[e];
5215
- n ? r[e] = gl(n) : i.push(e);
5374
+ n ? r[e] = Sl(n) : i.push(e);
5216
5375
  }), Object.keys(r).length > 0 && this.options.getSnapshot().episodeIndex === t.episodeIndex && this.options.onFeatureData(r);
5217
5376
  try {
5218
5377
  if (i.length > 0) {
@@ -5231,8 +5390,8 @@ var vl = class {
5231
5390
  }, 0));
5232
5391
  }
5233
5392
  };
5234
- function yl({ selectedEpisodeIndex: e, dataLoader: t, info: n, chartData: r, featureData: i, setFeatureData: a }) {
5235
- let o = H({
5393
+ function Tl({ selectedEpisodeIndex: e, dataLoader: t, info: n, chartData: r, featureData: i, setFeatureData: a }) {
5394
+ let o = V({
5236
5395
  episodeIndex: e,
5237
5396
  loader: t,
5238
5397
  info: n,
@@ -5246,30 +5405,30 @@ function yl({ selectedEpisodeIndex: e, dataLoader: t, info: n, chartData: r, fea
5246
5405
  chartData: r,
5247
5406
  featureData: i
5248
5407
  };
5249
- let s = H(null);
5250
- return s.current ||= new vl({
5408
+ let s = V(null);
5409
+ return s.current ||= new wl({
5251
5410
  getSnapshot: () => o.current,
5252
5411
  onFeatureData: (e) => a((t) => ({
5253
5412
  ...t,
5254
5413
  ...e
5255
5414
  })),
5256
5415
  onError: (e, t) => console.error(e, t)
5257
- }), B(() => {
5416
+ }), z(() => {
5258
5417
  s.current?.clearPending();
5259
- }, [e]), B(() => () => s.current?.dispose(), []), {
5260
- subscribeFeature: z((e) => s.current.subscribe(e), []),
5261
- unsubscribeFeature: z((e) => {
5418
+ }, [e]), z(() => () => s.current?.dispose(), []), {
5419
+ subscribeFeature: R((e) => s.current.subscribe(e), []),
5420
+ unsubscribeFeature: R((e) => {
5262
5421
  s.current.unsubscribe(e);
5263
5422
  }, []),
5264
- clearPendingFeatureLoads: z(() => {
5423
+ clearPendingFeatureLoads: R(() => {
5265
5424
  s.current.clearPending();
5266
5425
  }, []),
5267
- getSubscribedFeatureNames: z((e) => s.current.getSubscribedFeatureNames(e), [])
5426
+ getSubscribedFeatureNames: R((e) => s.current.getSubscribedFeatureNames(e), [])
5268
5427
  };
5269
5428
  }
5270
5429
  //#endregion
5271
5430
  //#region src/react/services/PlaybackEngine.ts
5272
- var bl = class {
5431
+ var El = class {
5273
5432
  animationFrameId = null;
5274
5433
  timerId = null;
5275
5434
  lastTickTime = 0;
@@ -5344,7 +5503,7 @@ var bl = class {
5344
5503
  }
5345
5504
  this.scheduleNextTick(e, n);
5346
5505
  };
5347
- }, xl = class {
5506
+ }, Dl = class {
5348
5507
  target = null;
5349
5508
  toggleOnce = !1;
5350
5509
  requestSet(e) {
@@ -5360,46 +5519,46 @@ var bl = class {
5360
5519
  } else this.toggleOnce && (this.toggleOnce = !1, t());
5361
5520
  }
5362
5521
  };
5363
- function Sl({ isBusy: e, frameCount: t, frameIndexRef: n, notifyFrameSubscribers: r, fps: i, playbackSpeed: a, playbackMode: o, episodes: s, selectedEpisodeIndex: c, deletedEpisodes: l, selectEpisodeRef: u }) {
5364
- let [d, f] = U(0), [p, m] = U(!1), h = H(new xl());
5365
- B(() => {
5522
+ function Ol({ isBusy: e, frameCount: t, frameIndexRef: n, notifyFrameSubscribers: r, fps: i, playbackSpeed: a, playbackMode: o, episodes: s, selectedEpisodeIndex: c, deletedEpisodes: l, selectEpisodeRef: u }) {
5523
+ let [d, f] = H(0), [p, m] = H(!1), h = V(new Dl());
5524
+ z(() => {
5366
5525
  let e = () => {
5367
5526
  document.hidden && m(!1);
5368
5527
  };
5369
5528
  return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
5370
5529
  }, []);
5371
- let g = z((e) => {
5530
+ let g = R((e) => {
5372
5531
  e < 0 || e >= t || (n.current = e, p || f(e), r(e));
5373
5532
  }, [
5374
5533
  t,
5375
5534
  n,
5376
5535
  p,
5377
5536
  r
5378
- ]), _ = z(() => {
5537
+ ]), _ = R(() => {
5379
5538
  if (e) {
5380
5539
  h.current.requestToggle();
5381
5540
  return;
5382
5541
  }
5383
5542
  m((e) => !e);
5384
- }, [e]), v = z((t) => {
5543
+ }, [e]), v = R((t) => {
5385
5544
  if (e) {
5386
5545
  h.current.requestSet(t);
5387
5546
  return;
5388
5547
  }
5389
5548
  m(t);
5390
5549
  }, [e]);
5391
- B(() => {
5550
+ z(() => {
5392
5551
  e || h.current.flush(m, () => m((e) => !e));
5393
5552
  }, [e]);
5394
- let y = z((t) => {
5553
+ let y = R((t) => {
5395
5554
  e || g(n.current + t);
5396
5555
  }, [
5397
5556
  n,
5398
5557
  e,
5399
5558
  g
5400
- ]), b = H(null);
5401
- return B(() => {
5402
- let e = new bl({
5559
+ ]), b = V(null);
5560
+ return z(() => {
5561
+ let e = new El({
5403
5562
  getFrameIndex: () => n.current,
5404
5563
  setFrameIndexSilent: (e) => {
5405
5564
  n.current = e;
@@ -5430,7 +5589,7 @@ function Sl({ isBusy: e, frameCount: t, frameIndexRef: n, notifyFrameSubscribers
5430
5589
  l,
5431
5590
  u,
5432
5591
  r
5433
- ]), B(() => {
5592
+ ]), z(() => {
5434
5593
  let r = b.current;
5435
5594
  if (r) return p && t > 0 && !e ? r.start() : (r.stop(), !p && n.current !== d && f(n.current)), () => r.stop();
5436
5595
  }, [
@@ -5452,7 +5611,7 @@ function Sl({ isBusy: e, frameCount: t, frameIndexRef: n, notifyFrameSubscribers
5452
5611
  }
5453
5612
  //#endregion
5454
5613
  //#region src/react/contexts/LeRobotProvider.tsx
5455
- function Cl(e) {
5614
+ function kl(e) {
5456
5615
  let t = {};
5457
5616
  for (let [n, r] of Object.entries(e.features)) if (r && r.names && Array.isArray(r.names)) if (r.names.some((e) => Array.isArray(e))) {
5458
5617
  let e = r.names.flat(2).filter((e) => typeof e == "string");
@@ -5473,22 +5632,22 @@ function Cl(e) {
5473
5632
  features: t
5474
5633
  };
5475
5634
  }
5476
- var wl = ({ children: e }) => {
5477
- let [t, n] = U(null), r = H(null), [i, a] = U(() => {
5478
- let e = tl();
5635
+ var Al = ({ children: e }) => {
5636
+ let [t, n] = H(null), r = V(null), [i, a] = H(() => {
5637
+ let e = sl();
5479
5638
  return r.current = e, e;
5480
- }), [o, s] = U(null), [c, l] = U([]), [u, d] = U({}), [f, p] = U(null), [m, h] = U([]), [g, _] = U({}), [v, b] = U({}), [x, S] = U(!1), [C, w] = U(null), [T, E] = U("sequential"), [O, ee] = U(1), [te, ne] = U(null), [k, A] = U(!1), { upsertTask: M, completeTask: N, failTask: oe, clear: se, tasks: ce } = ol(), P = x || !!ce.find((e) => e.phase !== "ready" && e.phase !== "idle" && e.phase !== "error"), F = t?.getVersionCapability() ?? null, I = F?.status === "read-only", { modifiedEpisodes: L, setModifiedEpisodes: le, deletedEpisodes: ue, setDeletedEpisodes: R, selectedEpisodeIndices: de, setSelectedEpisodeIndices: fe, effectiveEpisodes: pe, episodesForExport: me, editEpisodeTask: he, deleteEpisode: G, restoreEpisode: ge, getEffectiveEpisode: _e, toggleEpisodeSelection: ve, selectAllInList: ye, clearEpisodeSelection: be } = hl({
5639
+ }), [o, s] = H(null), [c, l] = H([]), [u, d] = H({}), [f, p] = H(null), [m, h] = H([]), [g, _] = H({}), [v, y] = H({}), [x, S] = H(!1), [C, w] = H(null), [T, E] = H("sequential"), [D, ee] = H(1), [te, ne] = H(null), [k, ie] = H(!1), { upsertTask: M, completeTask: N, failTask: oe, clear: se, tasks: P } = fl(), F = x || !!P.find((e) => e.phase !== "ready" && e.phase !== "idle" && e.phase !== "error"), ce = t?.getVersionCapability() ?? null, le = ce?.status === "read-only", { modifiedEpisodes: I, setModifiedEpisodes: ue, deletedEpisodes: de, setDeletedEpisodes: L, selectedEpisodeIndices: fe, setSelectedEpisodeIndices: pe, effectiveEpisodes: me, episodesForExport: he, editEpisodeTask: ge, deleteEpisode: W, restoreEpisode: _e, getEffectiveEpisode: ve, toggleEpisodeSelection: ye, selectAllInList: be, clearEpisodeSelection: xe } = xl({
5481
5640
  episodes: c,
5482
- versionCapability: F
5483
- }), xe = H(null), Se = H(null), Ce = H(/* @__PURE__ */ new Set()), we = H(!1), Te = H(0), Ee = H(0), De = H(/* @__PURE__ */ new Set()), Oe = H(async () => !1);
5484
- B(() => () => {
5485
- xe.current && xe.current.dispose().catch((e) => console.warn("Unmount dispose error:", e)), r.current?.dispose().catch((e) => console.warn("Unmount image dispose error:", e));
5641
+ versionCapability: ce
5642
+ }), G = V(null), Se = V(null), Ce = V(/* @__PURE__ */ new Set()), we = V(!1), Te = V(0), Ee = V(0), De = V(/* @__PURE__ */ new Set()), Oe = V(async () => !1);
5643
+ z(() => () => {
5644
+ G.current && G.current.dispose().catch((e) => console.warn("Unmount dispose error:", e)), r.current?.dispose().catch((e) => console.warn("Unmount image dispose error:", e));
5486
5645
  }, []);
5487
- let ke = H(null), Ae = z((e) => (De.current.add(e), queueMicrotask(() => {
5646
+ let ke = V(null), Ae = R((e) => (De.current.add(e), queueMicrotask(() => {
5488
5647
  De.current.has(e) && e(Ee.current);
5489
5648
  }), () => {
5490
5649
  De.current.delete(e);
5491
- }), []), je = z(() => Ee.current, []), Me = z((e) => {
5650
+ }), []), je = R(() => Ee.current, []), Me = R((e) => {
5492
5651
  De.current.forEach((t) => {
5493
5652
  try {
5494
5653
  t(e);
@@ -5496,29 +5655,29 @@ var wl = ({ children: e }) => {
5496
5655
  console.error("Frame subscriber error:", e);
5497
5656
  }
5498
5657
  });
5499
- }, []), { subscribeFeature: Ne, unsubscribeFeature: Pe, clearPendingFeatureLoads: Fe, getSubscribedFeatureNames: Ie } = yl({
5658
+ }, []), { subscribeFeature: Ne, unsubscribeFeature: Pe, clearPendingFeatureLoads: Fe, getSubscribedFeatureNames: Ie } = Tl({
5500
5659
  selectedEpisodeIndex: f,
5501
5660
  dataLoader: t,
5502
5661
  info: o,
5503
5662
  chartData: g,
5504
5663
  featureData: v,
5505
- setFeatureData: b
5506
- }), { currentFrameIndex: Le, setCurrentFrameIndex: Re, isPlaying: ze, setIsPlaying: Be, setFrameIndex: Ve, togglePlay: He, setPlaying: Ue, seek: We } = Sl({
5507
- isBusy: P,
5664
+ setFeatureData: y
5665
+ }), { currentFrameIndex: Le, setCurrentFrameIndex: Re, isPlaying: ze, setIsPlaying: Be, setFrameIndex: Ve, togglePlay: He, setPlaying: Ue, seek: We } = Ol({
5666
+ isBusy: F,
5508
5667
  frameCount: m.length,
5509
5668
  frameIndexRef: Ee,
5510
5669
  notifyFrameSubscribers: Me,
5511
5670
  fps: o?.fps,
5512
- playbackSpeed: O,
5671
+ playbackSpeed: D,
5513
5672
  playbackMode: T,
5514
5673
  episodes: c,
5515
5674
  selectedEpisodeIndex: f,
5516
- deletedEpisodes: ue,
5675
+ deletedEpisodes: de,
5517
5676
  selectEpisodeRef: Oe
5518
- }), Ge = z(async () => {
5677
+ }), Ge = R(async () => {
5519
5678
  Te.current += 1;
5520
5679
  try {
5521
- xe.current && await xe.current.dispose();
5680
+ G.current && await G.current.dispose();
5522
5681
  } catch (e) {
5523
5682
  console.warn("Failed to dispose previous loader", e);
5524
5683
  }
@@ -5527,19 +5686,19 @@ var wl = ({ children: e }) => {
5527
5686
  } catch (e) {
5528
5687
  console.warn("Failed to dispose previous image service", e);
5529
5688
  }
5530
- let e = tl();
5531
- r.current = e, a(e), xe.current = null, Se.current = null, Ce.current.clear(), we.current = !1, n(null), s(null), l([]), d({}), le(/* @__PURE__ */ new Map()), R(/* @__PURE__ */ new Set()), p(null), fe(/* @__PURE__ */ new Set()), h([]), _({}), b({}), Re(0), Ee.current = 0, Me(0), Fe(), Be(!1), w(null), se(), ne(null), A(!1);
5689
+ let e = sl();
5690
+ r.current = e, a(e), G.current = null, Se.current = null, Ce.current.clear(), we.current = !1, n(null), s(null), l([]), d({}), ue(/* @__PURE__ */ new Map()), L(/* @__PURE__ */ new Set()), p(null), pe(/* @__PURE__ */ new Set()), h([]), _({}), y({}), Re(0), Ee.current = 0, Me(0), Fe(), Be(!1), w(null), se(), ne(null), ie(!1);
5532
5691
  }, [
5533
5692
  Me,
5534
5693
  se,
5535
5694
  Fe,
5536
- le,
5537
- R,
5538
- fe,
5695
+ ue,
5696
+ L,
5697
+ pe,
5539
5698
  Re,
5540
5699
  Be
5541
- ]), Ke = z(async (e) => {
5542
- if (Se.current === e && (xe.current || we.current)) return;
5700
+ ]), Ke = R(async (e) => {
5701
+ if (Se.current === e && (G.current || we.current)) return;
5543
5702
  if (Ce.current.has(e)) {
5544
5703
  console.log("Skipping initialization for previously failed source");
5545
5704
  return;
@@ -5554,13 +5713,13 @@ var wl = ({ children: e }) => {
5554
5713
  });
5555
5714
  let o = null;
5556
5715
  try {
5557
- if (xe.current && await xe.current.dispose(), t !== Te.current) return;
5558
- xe.current = null, n(null), s(null), l([]), d({}), le(/* @__PURE__ */ new Map()), R(/* @__PURE__ */ new Set()), p(null), h([]), _({}), b({}), Re(0), Ee.current = 0, Me(0), Be(!1), Se.current = e;
5716
+ if (G.current && await G.current.dispose(), t !== Te.current) return;
5717
+ G.current = null, n(null), s(null), l([]), d({}), ue(/* @__PURE__ */ new Map()), L(/* @__PURE__ */ new Set()), p(null), h([]), _({}), y({}), Re(0), Ee.current = 0, Me(0), Be(!1), Se.current = e;
5559
5718
  let c = "getDirectoryHandle" in e ? new es(e) : e;
5560
5719
  await r.current?.dispose();
5561
- let u = tl();
5720
+ let u = sl();
5562
5721
  u.setDataSource(c), r.current = u, a(u);
5563
- let { LeRobotDataLoader: f } = await import("./LeRobotDataLoader-DYBXb4dz.js");
5722
+ let { LeRobotDataLoader: f } = await import("./LeRobotDataLoader-B8wZijIi.js");
5564
5723
  o = new f(c), M({
5565
5724
  id: i,
5566
5725
  phase: "read",
@@ -5572,8 +5731,8 @@ var wl = ({ children: e }) => {
5572
5731
  return;
5573
5732
  }
5574
5733
  let g = o.getEpisodes();
5575
- xe.current = o, n(o), ne(o.getValidationReport());
5576
- let v = Cl(m);
5734
+ G.current = o, n(o), ne(o.getValidationReport());
5735
+ let v = kl(m);
5577
5736
  s(v), l(g), d(o.getTasks()), N(i), Ce.current.delete(e);
5578
5737
  } catch (n) {
5579
5738
  if (t !== Te.current) {
@@ -5584,7 +5743,7 @@ var wl = ({ children: e }) => {
5584
5743
  let r = n instanceof Error ? n.message : "Unknown error during initialization";
5585
5744
  w(r), oe(i, r);
5586
5745
  let a = o?.getValidationReport?.() ?? null;
5587
- a?.items?.length && (ne(a), A(!0));
5746
+ a?.items?.length && (ne(a), ie(!0));
5588
5747
  } finally {
5589
5748
  t === Te.current && (we.current = !1, S(!1));
5590
5749
  }
@@ -5593,11 +5752,11 @@ var wl = ({ children: e }) => {
5593
5752
  N,
5594
5753
  oe,
5595
5754
  Me,
5596
- le,
5597
- R,
5755
+ ue,
5756
+ L,
5598
5757
  Re,
5599
5758
  Be
5600
- ]), qe = z(async (e) => {
5759
+ ]), qe = R(async (e) => {
5601
5760
  if (!t || !o) return !1;
5602
5761
  S(!0), Be(!1), w(null);
5603
5762
  let n = "lerobot-select-episode";
@@ -5605,13 +5764,13 @@ var wl = ({ children: e }) => {
5605
5764
  id: n,
5606
5765
  phase: "read",
5607
5766
  message: `Loading episode ${e}...`
5608
- }), p(e), Re(0), Ee.current = 0, Me(0), _({}), b({}), ke.current = e;
5767
+ }), p(e), Re(0), Ee.current = 0, Me(0), _({}), y({}), ke.current = e;
5609
5768
  try {
5610
5769
  let n = t.getEpisodeDataPath(e)?.path ?? null;
5611
5770
  n && !t.isFileBytesCached(n) && await t.releaseParsedCaches(), i.clearPreload();
5612
5771
  } catch {}
5613
5772
  try {
5614
- let r = Jc(o);
5773
+ let r = el(o);
5615
5774
  M({
5616
5775
  id: n,
5617
5776
  phase: "read",
@@ -5624,22 +5783,22 @@ var wl = ({ children: e }) => {
5624
5783
  phase: "render",
5625
5784
  message: "Processing charts..."
5626
5785
  });
5627
- let s = Yc(a, o.fps ?? 30);
5786
+ let s = tl(a, o.fps ?? 30);
5628
5787
  h(s), ke.current === e && _(a);
5629
5788
  let c = Ie(o);
5630
5789
  if (c.length > 0) {
5631
5790
  let n = {}, r = [];
5632
5791
  c.forEach((e) => {
5633
- e in a ? n[e] = gl(a[e]) : r.push(e);
5792
+ e in a ? n[e] = Sl(a[e]) : r.push(e);
5634
5793
  });
5635
5794
  let i = r.length > 0 ? await t.loadFeatureData(e, r) : {};
5636
- ke.current === e && b({
5795
+ ke.current === e && y({
5637
5796
  ...n,
5638
5797
  ...i
5639
5798
  });
5640
5799
  }
5641
5800
  if (N(n), ke.current === e) {
5642
- let n = ie(o);
5801
+ let n = j(o);
5643
5802
  if (n.length > 0) {
5644
5803
  let r = t.getEpisodeDataPath(e);
5645
5804
  if (r) {
@@ -5676,25 +5835,25 @@ var wl = ({ children: e }) => {
5676
5835
  Be
5677
5836
  ]);
5678
5837
  Oe.current = qe;
5679
- let Je = z(() => {
5838
+ let Je = R(() => {
5680
5839
  w(null), Ce.current.clear();
5681
5840
  }, []);
5682
- B(() => {
5683
- if (f !== null && ue.has(f) && t && o && !x) {
5684
- let e = c.find((e) => !ue.has(e.episode_index));
5685
- e ? qe(e.episode_index) : (p(null), h([]), _({}), b({}));
5841
+ z(() => {
5842
+ if (f !== null && de.has(f) && t && o && !x) {
5843
+ let e = c.find((e) => !de.has(e.episode_index));
5844
+ e ? qe(e.episode_index) : (p(null), h([]), _({}), y({}));
5686
5845
  }
5687
5846
  }, [
5688
- ue,
5847
+ de,
5689
5848
  f,
5690
5849
  c,
5691
5850
  t,
5692
5851
  o,
5693
5852
  x,
5694
5853
  qe
5695
- ]), B(() => {
5854
+ ]), z(() => {
5696
5855
  if (f !== null || !t || !o || x || c.length === 0) return;
5697
- let e = Xc(c, ue);
5856
+ let e = nl(c, de);
5698
5857
  if (e === null) return;
5699
5858
  let n = window.setTimeout(() => {
5700
5859
  qe(e);
@@ -5706,13 +5865,13 @@ var wl = ({ children: e }) => {
5706
5865
  o,
5707
5866
  x,
5708
5867
  c,
5709
- ue,
5868
+ de,
5710
5869
  qe
5711
5870
  ]);
5712
- let Ye = V(() => ({
5871
+ let Ye = B(() => ({
5713
5872
  info: o,
5714
- versionCapability: F,
5715
- isReadOnly: I,
5873
+ versionCapability: ce,
5874
+ isReadOnly: le,
5716
5875
  featureData: v,
5717
5876
  subscribeFeature: Ne,
5718
5877
  unsubscribeFeature: Pe,
@@ -5730,8 +5889,8 @@ var wl = ({ children: e }) => {
5730
5889
  isLoading: x
5731
5890
  }), [
5732
5891
  o,
5733
- F,
5734
- I,
5892
+ ce,
5893
+ le,
5735
5894
  v,
5736
5895
  Ne,
5737
5896
  Pe,
@@ -5747,45 +5906,45 @@ var wl = ({ children: e }) => {
5747
5906
  Je,
5748
5907
  C,
5749
5908
  x
5750
- ]), Xe = V(() => ({
5909
+ ]), Xe = B(() => ({
5751
5910
  selectedEpisodeIndex: f,
5752
- selectedEpisodeIndices: de,
5753
- toggleEpisodeSelection: ve,
5754
- setSelectedEpisodeIndices: fe,
5755
- selectAllInList: ye,
5756
- clearEpisodeSelection: be,
5757
- deletedEpisodes: ue,
5758
- modifiedEpisodes: L,
5759
- effectiveEpisodes: pe,
5760
- episodesForExport: me,
5761
- editEpisodeTask: he,
5762
- deleteEpisode: G,
5763
- restoreEpisode: ge,
5764
- getEffectiveEpisode: _e,
5911
+ selectedEpisodeIndices: fe,
5912
+ toggleEpisodeSelection: ye,
5913
+ setSelectedEpisodeIndices: pe,
5914
+ selectAllInList: be,
5915
+ clearEpisodeSelection: xe,
5916
+ deletedEpisodes: de,
5917
+ modifiedEpisodes: I,
5918
+ effectiveEpisodes: me,
5919
+ episodesForExport: he,
5920
+ editEpisodeTask: ge,
5921
+ deleteEpisode: W,
5922
+ restoreEpisode: _e,
5923
+ getEffectiveEpisode: ve,
5765
5924
  selectEpisode: qe
5766
5925
  }), [
5767
5926
  f,
5768
- de,
5769
- ve,
5770
5927
  fe,
5771
5928
  ye,
5772
- be,
5773
- ue,
5774
- L,
5775
5929
  pe,
5930
+ be,
5931
+ xe,
5932
+ de,
5933
+ I,
5776
5934
  me,
5777
5935
  he,
5778
- G,
5779
5936
  ge,
5937
+ W,
5780
5938
  _e,
5939
+ ve,
5781
5940
  qe
5782
- ]), Ze = V(() => ({
5941
+ ]), Ze = B(() => ({
5783
5942
  currentFrames: m,
5784
5943
  chartData: g,
5785
5944
  currentFrameIndex: Le,
5786
5945
  isPlaying: ze,
5787
5946
  playbackMode: T,
5788
- playbackSpeed: O,
5947
+ playbackSpeed: D,
5789
5948
  setFrameIndex: Ve,
5790
5949
  togglePlay: He,
5791
5950
  setPlaying: Ue,
@@ -5798,15 +5957,15 @@ var wl = ({ children: e }) => {
5798
5957
  Le,
5799
5958
  ze,
5800
5959
  T,
5801
- O,
5960
+ D,
5802
5961
  Ve,
5803
5962
  He,
5804
5963
  Ue,
5805
5964
  We
5806
- ]), Qe = V(() => ({
5965
+ ]), Qe = B(() => ({
5807
5966
  healthDialogOpen: k,
5808
- setHealthDialogOpen: A
5809
- }), [k]), $e = V(() => ({
5967
+ setHealthDialogOpen: ie
5968
+ }), [k]), $e = B(() => ({
5810
5969
  ...Ye,
5811
5970
  ...Xe,
5812
5971
  ...Ze,
@@ -5817,15 +5976,15 @@ var wl = ({ children: e }) => {
5817
5976
  Ze,
5818
5977
  Qe
5819
5978
  ]);
5820
- return /* @__PURE__ */ W(re.Provider, {
5979
+ return /* @__PURE__ */ U(A.Provider, {
5821
5980
  value: $e,
5822
- children: /* @__PURE__ */ W(ae.Provider, {
5981
+ children: /* @__PURE__ */ U(ae.Provider, {
5823
5982
  value: Ye,
5824
- children: /* @__PURE__ */ W(y.Provider, {
5983
+ children: /* @__PURE__ */ U(b.Provider, {
5825
5984
  value: Xe,
5826
- children: /* @__PURE__ */ W(D.Provider, {
5985
+ children: /* @__PURE__ */ U(O.Provider, {
5827
5986
  value: Ze,
5828
- children: /* @__PURE__ */ W(j.Provider, {
5987
+ children: /* @__PURE__ */ U(re.Provider, {
5829
5988
  value: Qe,
5830
5989
  children: e
5831
5990
  })
@@ -5833,9 +5992,9 @@ var wl = ({ children: e }) => {
5833
5992
  })
5834
5993
  })
5835
5994
  });
5836
- }, Tl = () => {
5837
- let { resolvedTheme: e } = T();
5838
- return /* @__PURE__ */ W(Pc, {
5995
+ }, jl = () => {
5996
+ let { resolvedTheme: e } = w();
5997
+ return /* @__PURE__ */ U(Lc, {
5839
5998
  theme: e,
5840
5999
  position: "top-center",
5841
6000
  richColors: !0,
@@ -5844,36 +6003,36 @@ var wl = ({ children: e }) => {
5844
6003
  };
5845
6004
  //#endregion
5846
6005
  //#region src/react/components/LeRobotStudioProvider.tsx
5847
- function El({ theme: e, children: t, showToaster: n, portalContainer: r }) {
5848
- return /* @__PURE__ */ W(S, {
6006
+ function Ml({ theme: e, children: t, showToaster: n, portalContainer: r }) {
6007
+ return /* @__PURE__ */ U(ie, {
5849
6008
  container: r,
5850
- children: /* @__PURE__ */ W(rl, {
6009
+ children: /* @__PURE__ */ U(ll, {
5851
6010
  controlledTheme: e,
5852
6011
  rootElement: r,
5853
- children: /* @__PURE__ */ W(al, { children: /* @__PURE__ */ W(wl, { children: /* @__PURE__ */ W(cl, { children: /* @__PURE__ */ G(ce, {
6012
+ children: /* @__PURE__ */ U(dl, { children: /* @__PURE__ */ U(Al, { children: /* @__PURE__ */ U(ml, { children: /* @__PURE__ */ W(le, {
5854
6013
  delay: 200,
5855
- children: [t, n ? /* @__PURE__ */ W(Tl, {}) : null]
6014
+ children: [t, n ? /* @__PURE__ */ U(jl, {}) : null]
5856
6015
  }) }) }) })
5857
6016
  })
5858
6017
  });
5859
6018
  }
5860
- var Dl = ({ theme: e, language: t, className: n, children: r, showToaster: i = !0, wrapRoot: a = !0 }) => {
5861
- let [o, s] = U(null);
5862
- return /* @__PURE__ */ W(w, {
6019
+ var Nl = ({ theme: e, language: t, className: n, children: r, showToaster: i = !0, wrapRoot: a = !0 }) => {
6020
+ let [o, s] = H(null);
6021
+ return /* @__PURE__ */ U(y, {
5863
6022
  forcedLanguage: t,
5864
- children: a ? /* @__PURE__ */ W("div", {
6023
+ children: a ? /* @__PURE__ */ U("div", {
5865
6024
  ref: s,
5866
- className: A("lerobot-root h-full w-full relative bg-background text-foreground", n),
5867
- children: /* @__PURE__ */ W(El, {
6025
+ className: D("lerobot-root h-full w-full relative bg-background text-foreground", n),
6026
+ children: /* @__PURE__ */ U(Ml, {
5868
6027
  theme: e,
5869
6028
  showToaster: i,
5870
6029
  portalContainer: o,
5871
6030
  children: r
5872
6031
  })
5873
- }) : /* @__PURE__ */ W("div", {
6032
+ }) : /* @__PURE__ */ U("div", {
5874
6033
  ref: s,
5875
- className: A("lerobot-root h-full w-full bg-background text-foreground", n),
5876
- children: /* @__PURE__ */ W(El, {
6034
+ className: D("lerobot-root h-full w-full bg-background text-foreground", n),
6035
+ children: /* @__PURE__ */ U(Ml, {
5877
6036
  theme: e,
5878
6037
  showToaster: i,
5879
6038
  portalContainer: o,
@@ -5881,119 +6040,119 @@ var Dl = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
5881
6040
  })
5882
6041
  })
5883
6042
  });
5884
- }, Ol = ({ open: e, onOpenChange: t, episode: n, onSave: r }) => {
5885
- let { t: i } = E(), [a, o] = U("");
5886
- return B(() => {
6043
+ }, Pl = ({ open: e, onOpenChange: t, episode: n, onSave: r }) => {
6044
+ let { t: a } = T(), [o, s] = H("");
6045
+ return z(() => {
5887
6046
  if (!n) return;
5888
6047
  let e = n.tasks && n.tasks.length > 0 && n.tasks[0] || "";
5889
- o(e);
5890
- }, [n]), /* @__PURE__ */ W(Gs, {
6048
+ s(e);
6049
+ }, [n]), /* @__PURE__ */ U(Js, {
5891
6050
  open: !!(e && n),
5892
6051
  onOpenChange: t,
5893
- children: /* @__PURE__ */ G(Js, {
6052
+ children: /* @__PURE__ */ W(Zs, {
5894
6053
  className: "sm:max-w-md",
5895
- children: [/* @__PURE__ */ G(Ys, { children: [/* @__PURE__ */ W(Zs, { children: i("editTask.title", "Edit Episode Task") }), /* @__PURE__ */ W(Qs, {
6054
+ children: [/* @__PURE__ */ W(Qs, { children: [/* @__PURE__ */ U(ec, { children: a("editTask.title", "Edit Episode Task") }), /* @__PURE__ */ U(tc, {
5896
6055
  className: "sr-only",
5897
- children: i("editTask.a11yDescription", "Edit the task description for the selected episode.")
5898
- })] }), n ? /* @__PURE__ */ G(he, { children: [/* @__PURE__ */ G("div", {
6056
+ children: a("editTask.a11yDescription", "Edit the task description for the selected episode.")
6057
+ })] }), n ? /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ W("div", {
5899
6058
  className: "space-y-4 py-2",
5900
- children: [/* @__PURE__ */ G("div", {
6059
+ children: [/* @__PURE__ */ W("div", {
5901
6060
  className: "space-y-2",
5902
- children: [/* @__PURE__ */ W("label", {
6061
+ children: [/* @__PURE__ */ U("label", {
5903
6062
  className: "text-sm font-medium text-muted-foreground",
5904
- children: i("editTask.episodeIndex", "Episode Index")
5905
- }), /* @__PURE__ */ W(F, {
6063
+ children: a("editTask.episodeIndex", "Episode Index")
6064
+ }), /* @__PURE__ */ U(p, {
5906
6065
  value: n.episode_index,
5907
6066
  disabled: !0,
5908
6067
  className: "bg-muted"
5909
6068
  })]
5910
- }), /* @__PURE__ */ G("div", {
6069
+ }), /* @__PURE__ */ W("div", {
5911
6070
  className: "space-y-2",
5912
- children: [/* @__PURE__ */ W("label", {
6071
+ children: [/* @__PURE__ */ U("label", {
5913
6072
  className: "text-sm font-medium text-muted-foreground",
5914
- children: i("editTask.taskDescription", "Task Description")
5915
- }), /* @__PURE__ */ W(Fc, {
5916
- value: a,
5917
- onChange: (e) => o(e.target.value),
5918
- placeholder: i("editTask.taskPlaceholder", "Enter task description..."),
6073
+ children: a("editTask.taskDescription", "Task Description")
6074
+ }), /* @__PURE__ */ U(Rc, {
6075
+ value: o,
6076
+ onChange: (e) => s(e.target.value),
6077
+ placeholder: a("editTask.taskPlaceholder", "Enter task description..."),
5919
6078
  rows: 4,
5920
6079
  className: "resize-none"
5921
6080
  })]
5922
6081
  })]
5923
- }), /* @__PURE__ */ G(Xs, { children: [/* @__PURE__ */ W(f, {
6082
+ }), /* @__PURE__ */ W($s, { children: [/* @__PURE__ */ U(i, {
5924
6083
  variant: "outline",
5925
6084
  onClick: () => t(!1),
5926
- children: i("common.cancel", "Cancel")
5927
- }), /* @__PURE__ */ W(f, {
6085
+ children: a("common.cancel", "Cancel")
6086
+ }), /* @__PURE__ */ U(i, {
5928
6087
  onClick: () => {
5929
6088
  if (n == null) return;
5930
- let e = a.trim();
6089
+ let e = o.trim();
5931
6090
  r(n.episode_index, e || ""), t(!1);
5932
6091
  },
5933
- children: i("editTask.save", "Save")
6092
+ children: a("editTask.save", "Save")
5934
6093
  })] })] }) : null]
5935
6094
  })
5936
6095
  });
5937
- }, kl = ({ totalCount: e, editMode: t, multiSelectMode: n, isReadOnly: r, onToggleEditMode: i, onToggleMultiSelectMode: a }) => {
5938
- let { t: o } = E();
5939
- return /* @__PURE__ */ G("div", {
6096
+ }, Fl = ({ totalCount: e, editMode: t, multiSelectMode: n, isReadOnly: r, onToggleEditMode: a, onToggleMultiSelectMode: o }) => {
6097
+ let { t: s } = T();
6098
+ return /* @__PURE__ */ W("div", {
5940
6099
  className: "flex min-w-0 flex-wrap items-center justify-between gap-2 overflow-hidden",
5941
- children: [/* @__PURE__ */ G("h2", {
6100
+ children: [/* @__PURE__ */ W("h2", {
5942
6101
  className: "flex min-w-0 items-center gap-1 text-sm text-muted-foreground overflow-hidden",
5943
- children: [e != null && /* @__PURE__ */ W("span", { children: e }), /* @__PURE__ */ W("span", { children: "Episodes" })]
5944
- }), !r && /* @__PURE__ */ G("div", {
6102
+ children: [e != null && /* @__PURE__ */ U("span", { children: e }), /* @__PURE__ */ U("span", { children: "Episodes" })]
6103
+ }), !r && /* @__PURE__ */ W("div", {
5945
6104
  className: "flex min-w-0 flex-wrap items-center gap-1 overflow-hidden",
5946
- children: [/* @__PURE__ */ W(f, {
6105
+ children: [/* @__PURE__ */ U(i, {
5947
6106
  variant: n ? "secondary" : "ghost",
5948
6107
  size: "sm",
5949
- className: A("h-7 shrink-0 px-1 text-xs font-medium", n ? "text-pink-400 hover:text-pink-700" : "text-muted-foreground hover:text-foreground"),
5950
- onClick: a,
5951
- title: o("sidebar.multiSelect", "Select"),
5952
- children: n ? /* @__PURE__ */ G(he, { children: [/* @__PURE__ */ W(l, { className: "h-3 w-3 shrink-0" }), o("sidebar.multiSelect", "Select")] }) : /* @__PURE__ */ G(he, { children: [/* @__PURE__ */ W(Vs, { className: "h-3 w-3 shrink-0" }), o("sidebar.multiSelect", "Select")] })
5953
- }), /* @__PURE__ */ W(f, {
6108
+ className: D("h-7 shrink-0 px-1 text-xs font-medium", n ? "text-pink-400 hover:text-pink-700" : "text-muted-foreground hover:text-foreground"),
6109
+ onClick: o,
6110
+ title: s("sidebar.multiSelect", "Select"),
6111
+ children: n ? /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U(u, { className: "h-3 w-3 shrink-0" }), s("sidebar.multiSelect", "Select")] }) : /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U(Ws, { className: "h-3 w-3 shrink-0" }), s("sidebar.multiSelect", "Select")] })
6112
+ }), /* @__PURE__ */ U(i, {
5954
6113
  variant: t ? "secondary" : "ghost",
5955
6114
  size: "sm",
5956
- className: A("h-7 shrink-0 px-1 text-xs font-medium", t ? "text-pink-400 hover:text-pink-700" : "text-muted-foreground hover:text-foreground"),
5957
- onClick: i,
5958
- title: t ? o("sidebar.exitEditMode", "Done editing") : o("sidebar.enterEditMode", "Edit episodes"),
5959
- children: t ? /* @__PURE__ */ G(he, { children: [/* @__PURE__ */ W(l, { className: "mr-1 h-3 w-3 shrink-0" }), o("sidebar.done", "Done")] }) : /* @__PURE__ */ G(he, { children: [/* @__PURE__ */ W(Is, { className: "mr-1 h-3 w-3 shrink-0" }), o("sidebar.edit", "Edit")] })
6115
+ className: D("h-7 shrink-0 px-1 text-xs font-medium", t ? "text-pink-400 hover:text-pink-700" : "text-muted-foreground hover:text-foreground"),
6116
+ onClick: a,
6117
+ title: t ? s("sidebar.exitEditMode", "Done editing") : s("sidebar.enterEditMode", "Edit episodes"),
6118
+ children: t ? /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U(u, { className: "mr-1 h-3 w-3 shrink-0" }), s("sidebar.done", "Done")] }) : /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U(zs, { className: "mr-1 h-3 w-3 shrink-0" }), s("sidebar.edit", "Edit")] })
5960
6119
  })]
5961
6120
  })]
5962
6121
  });
5963
- }, Al = ({ searchTerm: e, showAdvanced: t, onSearchTermChange: n, onToggleAdvanced: r }) => {
5964
- let { t: i } = E();
5965
- return /* @__PURE__ */ G("div", {
6122
+ }, Il = ({ searchTerm: e, showAdvanced: t, onSearchTermChange: n, onToggleAdvanced: r }) => {
6123
+ let { t: a } = T();
6124
+ return /* @__PURE__ */ W("div", {
5966
6125
  className: "group relative flex min-w-0 items-center gap-1 overflow-hidden",
5967
- children: [/* @__PURE__ */ G("div", {
6126
+ children: [/* @__PURE__ */ W("div", {
5968
6127
  className: "relative min-w-0 flex-1 basis-0",
5969
- children: [/* @__PURE__ */ W(P, {
6128
+ children: [/* @__PURE__ */ U(m, {
5970
6129
  className: "absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground/40 transition-colors group-focus-within:text-primary/50",
5971
6130
  "aria-hidden": !0
5972
- }), /* @__PURE__ */ W(F, {
5973
- placeholder: i("sidebar.searchPlaceholder"),
6131
+ }), /* @__PURE__ */ U(p, {
6132
+ placeholder: a("sidebar.searchPlaceholder"),
5974
6133
  className: "h-9 min-w-0 w-full border-transparent bg-muted/50 pl-9 text-xs placeholder:text-muted-foreground/40",
5975
6134
  value: e,
5976
6135
  onChange: (e) => n(e.target.value),
5977
- "aria-label": i("sidebar.searchPlaceholder")
6136
+ "aria-label": a("sidebar.searchPlaceholder")
5978
6137
  })]
5979
- }), /* @__PURE__ */ W(f, {
6138
+ }), /* @__PURE__ */ U(i, {
5980
6139
  variant: t ? "secondary" : "ghost",
5981
6140
  size: "sm",
5982
- className: A("h-9 w-9 shrink-0 p-0", t && "text-primary"),
6141
+ className: D("h-9 w-9 shrink-0 p-0", t && "text-primary"),
5983
6142
  onClick: r,
5984
- title: i("sidebar.advanced", "Advanced"),
5985
- children: /* @__PURE__ */ W(Bs, {
6143
+ title: a("sidebar.advanced", "Advanced"),
6144
+ children: /* @__PURE__ */ U(Us, {
5986
6145
  className: "h-3.5 w-3.5",
5987
6146
  "aria-hidden": !0
5988
6147
  })
5989
6148
  })]
5990
6149
  });
5991
- }, jl = ({ durationMin: e, durationMax: t, onDurationMinChange: n, onDurationMaxChange: r }) => {
5992
- let { t: i } = E();
5993
- return /* @__PURE__ */ G("div", {
6150
+ }, Ll = ({ durationMin: e, durationMax: t, onDurationMinChange: n, onDurationMaxChange: r }) => {
6151
+ let { t: i } = T();
6152
+ return /* @__PURE__ */ W("div", {
5994
6153
  className: "flex min-w-0 items-center gap-2 overflow-hidden",
5995
6154
  children: [
5996
- /* @__PURE__ */ W(F, {
6155
+ /* @__PURE__ */ U(p, {
5997
6156
  type: "number",
5998
6157
  placeholder: i("sidebar.filterByDuration"),
5999
6158
  className: "h-8 min-w-0 flex-1 basis-0 border border-border bg-muted/50 px-2 text-xs",
@@ -6004,11 +6163,11 @@ var Dl = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
6004
6163
  step: .1,
6005
6164
  "aria-label": i("sidebar.filterByDuration")
6006
6165
  }),
6007
- /* @__PURE__ */ W("span", {
6166
+ /* @__PURE__ */ U("span", {
6008
6167
  className: "shrink-0 text-xs text-muted-foreground",
6009
6168
  children: "-"
6010
6169
  }),
6011
- /* @__PURE__ */ W(F, {
6170
+ /* @__PURE__ */ U(p, {
6012
6171
  type: "number",
6013
6172
  className: "h-8 min-w-0 flex-1 basis-0 border border-border bg-muted/50 px-2 text-xs",
6014
6173
  value: t,
@@ -6019,159 +6178,159 @@ var Dl = ({ theme: e, language: t, className: n, children: r, showToaster: i = !
6019
6178
  })
6020
6179
  ]
6021
6180
  });
6022
- }, Ml = ({ selectedCount: e, selectedDeletedCount: t, selectedNonDeletedCount: n, onSelectAll: r, onClearSelection: i, onBulkEdit: a, onBulkDelete: o, onBulkRestore: s }) => {
6023
- let { t: c } = E();
6024
- return /* @__PURE__ */ G("div", {
6181
+ }, Rl = ({ selectedCount: e, selectedDeletedCount: n, selectedNonDeletedCount: r, onSelectAll: a, onClearSelection: o, onBulkEdit: s, onBulkDelete: c, onBulkRestore: l }) => {
6182
+ let { t: u } = T();
6183
+ return /* @__PURE__ */ W("div", {
6025
6184
  className: "flex min-w-0 flex-wrap items-center gap-1 overflow-hidden",
6026
6185
  children: [
6027
- /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6028
- render: /* @__PURE__ */ W(f, {
6186
+ /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
6187
+ render: /* @__PURE__ */ U(i, {
6029
6188
  variant: "ghost",
6030
6189
  size: "icon",
6031
6190
  className: "h-8 w-8 shrink-0",
6032
- onClick: r
6191
+ onClick: a
6033
6192
  }),
6034
- children: /* @__PURE__ */ W(ks, { className: "h-3.5 w-3.5" })
6035
- }), /* @__PURE__ */ W(v, {
6193
+ children: /* @__PURE__ */ U(Ms, { className: "h-3.5 w-3.5" })
6194
+ }), /* @__PURE__ */ U(P, {
6036
6195
  side: "bottom",
6037
- children: c("sidebar.selectAll")
6196
+ children: u("sidebar.selectAll")
6038
6197
  })] }),
6039
- /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6040
- render: /* @__PURE__ */ W(f, {
6198
+ /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
6199
+ render: /* @__PURE__ */ U(i, {
6041
6200
  variant: "ghost",
6042
6201
  size: "icon",
6043
6202
  className: "h-8 w-8 shrink-0",
6044
- onClick: i
6203
+ onClick: o
6045
6204
  }),
6046
- children: /* @__PURE__ */ W(p, { className: "h-3.5 w-3.5" })
6047
- }), /* @__PURE__ */ W(v, {
6205
+ children: /* @__PURE__ */ U(t, { className: "h-3.5 w-3.5" })
6206
+ }), /* @__PURE__ */ U(P, {
6048
6207
  side: "bottom",
6049
- children: c("sidebar.clearSelection")
6208
+ children: u("sidebar.clearSelection")
6050
6209
  })] }),
6051
- /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6052
- render: /* @__PURE__ */ W(f, {
6210
+ /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
6211
+ render: /* @__PURE__ */ U(i, {
6053
6212
  disabled: e === 0,
6054
6213
  variant: "ghost",
6055
6214
  size: "icon",
6056
6215
  className: "h-8 w-8 shrink-0",
6057
- onClick: a
6216
+ onClick: s
6058
6217
  }),
6059
- children: /* @__PURE__ */ W(Is, { className: "h-3.5 w-3.5" })
6060
- }), /* @__PURE__ */ W(v, {
6218
+ children: /* @__PURE__ */ U(zs, { className: "h-3.5 w-3.5" })
6219
+ }), /* @__PURE__ */ U(P, {
6061
6220
  side: "bottom",
6062
- children: c("sidebar.bulkEdit")
6221
+ children: u("sidebar.bulkEdit")
6063
6222
  })] }),
6064
- n > 0 && /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6065
- render: /* @__PURE__ */ W(f, {
6223
+ r > 0 && /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
6224
+ render: /* @__PURE__ */ U(i, {
6066
6225
  variant: "ghost",
6067
6226
  size: "icon",
6068
6227
  className: "h-8 w-8 shrink-0 text-destructive hover:text-destructive",
6069
- onClick: o
6228
+ onClick: c
6070
6229
  }),
6071
- children: /* @__PURE__ */ W(Us, { className: "h-3.5 w-3.5" })
6072
- }), /* @__PURE__ */ W(v, {
6230
+ children: /* @__PURE__ */ U(Ks, { className: "h-3.5 w-3.5" })
6231
+ }), /* @__PURE__ */ U(P, {
6073
6232
  side: "bottom",
6074
- children: c("sidebar.bulkDelete")
6233
+ children: u("sidebar.bulkDelete")
6075
6234
  })] }),
6076
- t > 0 && /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6077
- render: /* @__PURE__ */ W(f, {
6235
+ n > 0 && /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
6236
+ render: /* @__PURE__ */ U(i, {
6078
6237
  disabled: e === 0,
6079
6238
  variant: "ghost",
6080
6239
  size: "icon",
6081
6240
  className: "h-8 w-8 shrink-0",
6082
- onClick: s
6241
+ onClick: l
6083
6242
  }),
6084
- children: /* @__PURE__ */ W(Ws, { className: "h-3.5 w-3.5" })
6085
- }), /* @__PURE__ */ W(v, {
6243
+ children: /* @__PURE__ */ U(qs, { className: "h-3.5 w-3.5" })
6244
+ }), /* @__PURE__ */ U(P, {
6086
6245
  side: "bottom",
6087
- children: c("sidebar.bulkRestore")
6246
+ children: u("sidebar.bulkRestore")
6088
6247
  })] }),
6089
- e > 0 && /* @__PURE__ */ W("span", {
6248
+ e > 0 && /* @__PURE__ */ U("span", {
6090
6249
  className: "ml-auto min-w-0 flex-1 truncate text-right text-xs text-muted-foreground",
6091
- children: c("sidebar.selectedCount", { count: e })
6250
+ children: u("sidebar.selectedCount", { count: e })
6092
6251
  })
6093
6252
  ]
6094
6253
  });
6095
- }, Nl = ({ episode: e, taskDescription: t, formattedDuration: n, isDeleted: r, isSelected: i, isChecked: a, isLoading: o, multiSelectMode: s, showActions: c, onRowClick: l, onToggleSelection: u, onEdit: d, onDelete: p, onRestore: m }) => {
6096
- let { t: h } = E(), g = !r && !o, _ = !r && i, v = !r && !i && a;
6097
- return /* @__PURE__ */ G("div", {
6098
- className: A("group relative flex w-full min-w-0 flex-col overflow-hidden border-b border-border/30 text-left transition-colors", r && "bg-muted/30 opacity-60", _ && "bg-accent text-foreground", v && "bg-muted/60 text-muted-foreground", !r && !i && !a && "bg-transparent text-muted-foreground/80 hover:bg-accent/50 hover:text-foreground"),
6099
- children: [/* @__PURE__ */ G("div", {
6254
+ }, zl = ({ episode: e, taskDescription: t, formattedDuration: n, isDeleted: r, isSelected: a, isChecked: o, isLoading: s, multiSelectMode: c, showActions: l, onRowClick: u, onToggleSelection: d, onEdit: f, onDelete: p, onRestore: m }) => {
6255
+ let { t: h } = T(), g = !r && !s, _ = !r && a, v = !r && !a && o;
6256
+ return /* @__PURE__ */ W("div", {
6257
+ className: D("group relative flex w-full min-w-0 flex-col overflow-hidden border-b border-border/30 text-left transition-colors", r && "bg-muted/30 opacity-60", _ && "bg-accent text-foreground", v && "bg-muted/60 text-muted-foreground", !r && !a && !o && "bg-transparent text-muted-foreground/80 hover:bg-accent/50 hover:text-foreground"),
6258
+ children: [/* @__PURE__ */ W("div", {
6100
6259
  role: "button",
6101
6260
  tabIndex: g ? 0 : -1,
6102
- className: A("flex w-full px-3 py-2.5 min-w-0 flex-1 overflow-hidden rounded-sm text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60", s ? "flex-row items-start gap-2" : "flex-col"),
6103
- onClick: () => g && l(),
6261
+ className: D("flex w-full px-3 py-2.5 min-w-0 flex-1 overflow-hidden rounded-sm text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60", c ? "flex-row items-start gap-2" : "flex-col"),
6262
+ onClick: () => g && u(),
6104
6263
  onKeyDown: (e) => {
6105
- g && Qc(e.key) && (e.preventDefault(), l());
6264
+ g && il(e.key) && (e.preventDefault(), u());
6106
6265
  },
6107
6266
  "aria-label": h("sidebar.selectEpisode", { index: e.episode_index }),
6108
6267
  "aria-current": _ ? "true" : void 0,
6109
6268
  "aria-disabled": !g,
6110
6269
  title: h("sidebar.selectEpisode", { index: e.episode_index }),
6111
6270
  children: [
6112
- s && /* @__PURE__ */ W("span", {
6271
+ c && /* @__PURE__ */ U("span", {
6113
6272
  className: "mt-0.5 shrink-0",
6114
6273
  onClick: (e) => e.stopPropagation(),
6115
- children: /* @__PURE__ */ W("button", {
6274
+ children: /* @__PURE__ */ U("button", {
6116
6275
  type: "button",
6117
6276
  className: "rounded border-0 bg-transparent p-0.5 hover:bg-muted/50",
6118
- onClick: u,
6119
- "aria-label": a ? h("sidebar.deselectEpisode", "Deselect episode") : h("sidebar.selectEpisodeForBulk", "Select episode"),
6120
- title: a ? h("sidebar.deselectEpisode", "Deselect episode") : h("sidebar.selectEpisodeForBulk", "Select episode"),
6121
- children: a ? /* @__PURE__ */ W(Vs, { className: "h-4 w-4 text-primary" }) : /* @__PURE__ */ W(Hs, { className: "h-4 w-4 text-muted-foreground" })
6277
+ onClick: d,
6278
+ "aria-label": o ? h("sidebar.deselectEpisode", "Deselect episode") : h("sidebar.selectEpisodeForBulk", "Select episode"),
6279
+ title: o ? h("sidebar.deselectEpisode", "Deselect episode") : h("sidebar.selectEpisodeForBulk", "Select episode"),
6280
+ children: o ? /* @__PURE__ */ U(Ws, { className: "h-4 w-4 text-primary" }) : /* @__PURE__ */ U(Gs, { className: "h-4 w-4 text-muted-foreground" })
6122
6281
  })
6123
6282
  }),
6124
- _ && /* @__PURE__ */ W("div", { className: "absolute bottom-2 left-0 top-2 w-1 rounded-r-full bg-primary" }),
6125
- /* @__PURE__ */ G("div", {
6283
+ _ && /* @__PURE__ */ U("div", { className: "absolute bottom-2 left-0 top-2 w-1 rounded-r-full bg-primary" }),
6284
+ /* @__PURE__ */ W("div", {
6126
6285
  className: "flex min-w-0 flex-1 flex-col overflow-hidden",
6127
- children: [/* @__PURE__ */ G("div", {
6286
+ children: [/* @__PURE__ */ W("div", {
6128
6287
  className: "mb-1 flex min-w-0 items-center justify-between gap-2 overflow-hidden",
6129
- children: [/* @__PURE__ */ G(Ds, {
6288
+ children: [/* @__PURE__ */ W(As, {
6130
6289
  variant: _ ? "default" : "outline",
6131
- className: A("h-4 shrink-0 px-1.5 font-mono text-[10px] font-medium transition-colors", _ ? "border-transparent bg-primary text-primary-foreground" : v ? "border-border/60 bg-muted text-foreground/80" : "opacity-70"),
6290
+ className: D("h-4 shrink-0 px-1.5 font-mono text-[10px] font-medium transition-colors", _ ? "border-transparent bg-primary text-primary-foreground" : v ? "border-border/60 bg-muted text-foreground/80" : "opacity-70"),
6132
6291
  children: ["# ", e.episode_index]
6133
- }), /* @__PURE__ */ W("span", {
6134
- className: A("min-w-0 truncate font-mono text-[11px] transition-colors", _ ? "font-medium text-foreground/80" : v ? "text-foreground/80" : "text-muted-foreground"),
6292
+ }), /* @__PURE__ */ U("span", {
6293
+ className: D("min-w-0 truncate font-mono text-[11px] transition-colors", _ ? "font-medium text-foreground/80" : v ? "text-foreground/80" : "text-muted-foreground"),
6135
6294
  title: n,
6136
6295
  children: n
6137
6296
  })]
6138
- }), /* @__PURE__ */ W("span", {
6139
- className: A("block truncate text-xs font-normal leading-snug transition-colors", _ ? "font-medium text-foreground" : v ? "text-foreground" : "text-muted-foreground"),
6297
+ }), /* @__PURE__ */ U("span", {
6298
+ className: D("block truncate text-xs font-normal leading-snug transition-colors", _ ? "font-medium text-foreground" : v ? "text-foreground" : "text-muted-foreground"),
6140
6299
  title: t,
6141
6300
  children: t
6142
6301
  })]
6143
6302
  })
6144
6303
  ]
6145
- }), c && !s && /* @__PURE__ */ W("div", {
6304
+ }), l && !c && /* @__PURE__ */ U("div", {
6146
6305
  className: "mx-2 mt-1 flex shrink-0 items-center gap-0.5",
6147
6306
  onClick: (e) => e.stopPropagation(),
6148
- children: r ? /* @__PURE__ */ W(f, {
6307
+ children: r ? /* @__PURE__ */ U(i, {
6149
6308
  size: "sm",
6150
6309
  variant: "ghost",
6151
6310
  className: "h-8 px-2 text-muted-foreground hover:text-foreground",
6152
6311
  onClick: m,
6153
6312
  title: h("sidebar.restoreEpisode", "Restore episode"),
6154
- children: /* @__PURE__ */ W(Ws, { className: "h-3.5 w-3.5" })
6155
- }) : /* @__PURE__ */ G(he, { children: [/* @__PURE__ */ W(f, {
6313
+ children: /* @__PURE__ */ U(qs, { className: "h-3.5 w-3.5" })
6314
+ }) : /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U(i, {
6156
6315
  size: "sm",
6157
6316
  variant: "ghost",
6158
6317
  className: "h-8 px-2 text-muted-foreground hover:text-foreground",
6159
- onClick: d,
6318
+ onClick: f,
6160
6319
  title: h("sidebar.editTask", "Edit task"),
6161
- children: /* @__PURE__ */ W(Is, { className: "h-3.5 w-3.5" })
6162
- }), /* @__PURE__ */ W(f, {
6320
+ children: /* @__PURE__ */ U(zs, { className: "h-3.5 w-3.5" })
6321
+ }), /* @__PURE__ */ U(i, {
6163
6322
  size: "sm",
6164
6323
  variant: "ghost",
6165
6324
  className: "h-8 px-2 text-muted-foreground hover:bg-destructive/10 hover:text-destructive",
6166
6325
  onClick: p,
6167
6326
  title: h("sidebar.deleteEpisode", "Delete episode"),
6168
- children: /* @__PURE__ */ W(Us, { className: "h-3.5 w-3.5" })
6327
+ children: /* @__PURE__ */ U(Ks, { className: "h-3.5 w-3.5" })
6169
6328
  })] })
6170
6329
  })]
6171
6330
  });
6172
6331
  };
6173
- function Pl({ item: e, isLoading: t, multiSelectMode: n, editMode: r, onRowClick: i, onToggleSelection: a, onEdit: o, onDelete: s, onRestore: c }) {
6174
- return /* @__PURE__ */ W(Nl, {
6332
+ function Bl({ item: e, isLoading: t, multiSelectMode: n, editMode: r, onRowClick: i, onToggleSelection: a, onEdit: o, onDelete: s, onRestore: c }) {
6333
+ return /* @__PURE__ */ U(zl, {
6175
6334
  episode: e.episode,
6176
6335
  taskDescription: e.taskDescription,
6177
6336
  formattedDuration: e.formattedDuration,
@@ -6188,23 +6347,23 @@ function Pl({ item: e, isLoading: t, multiSelectMode: n, editMode: r, onRowClick
6188
6347
  onRestore: (t) => c(e.episode.episode_index, t)
6189
6348
  });
6190
6349
  }
6191
- function Fl({ ariaAttributes: e, index: t, style: n, filteredEpisodes: r, ...i }) {
6350
+ function Vl({ ariaAttributes: e, index: t, style: n, filteredEpisodes: r, ...i }) {
6192
6351
  let a = r[t];
6193
- return /* @__PURE__ */ W("div", {
6352
+ return /* @__PURE__ */ U("div", {
6194
6353
  ...e,
6195
6354
  style: n,
6196
6355
  className: "overflow-hidden",
6197
- children: /* @__PURE__ */ W(Pl, {
6356
+ children: /* @__PURE__ */ U(Bl, {
6198
6357
  item: a,
6199
6358
  ...i
6200
6359
  })
6201
6360
  });
6202
6361
  }
6203
- function Il(e, t) {
6362
+ function Hl(e, t) {
6204
6363
  return t.filteredEpisodes[e].episode.episode_index;
6205
6364
  }
6206
- var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelectMode: i, editMode: a, onRowClick: o, onToggleSelection: s, onEdit: c, onDelete: l, onRestore: u }) => {
6207
- let { t: d } = E(), f = V(() => ({
6365
+ var Ul = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelectMode: i, editMode: a, onRowClick: o, onToggleSelection: s, onEdit: c, onDelete: l, onRestore: u }) => {
6366
+ let { t: d } = T(), f = B(() => ({
6208
6367
  filteredEpisodes: n,
6209
6368
  isLoading: r,
6210
6369
  multiSelectMode: i,
@@ -6224,52 +6383,63 @@ var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
6224
6383
  c,
6225
6384
  l,
6226
6385
  u
6227
- ]);
6228
- return e ? /* @__PURE__ */ G("div", {
6229
- className: "flex h-full flex-col items-center justify-center space-y-2 p-4 text-center",
6230
- children: [
6231
- /* @__PURE__ */ W(js, { className: "h-8 w-8 text-destructive/70" }),
6232
- /* @__PURE__ */ W("p", {
6233
- className: "text-sm font-medium text-destructive",
6234
- children: d("sidebar.errorLoading")
6235
- }),
6236
- /* @__PURE__ */ W("p", {
6237
- className: "max-w-full break-words text-xs text-muted-foreground",
6238
- children: e
6239
- })
6240
- ]
6241
- }) : n.length === 0 ? /* @__PURE__ */ W("div", {
6242
- className: "flex h-full items-center justify-center p-4 text-center text-muted-foreground",
6243
- children: t && t.length === 0 ? d("sidebar.emptyNoDataset") : d("sidebar.emptyNoMatch")
6244
- }) : n.length >= 100 ? /* @__PURE__ */ W(se, {
6245
- rowCount: n.length,
6246
- rowHeight: a && !i ? 102 : 61,
6247
- rowComponent: Fl,
6248
- rowProps: f,
6249
- rowKey: Il,
6250
- overscanCount: 4,
6251
- className: "flex-1 min-h-0 w-full min-w-0 overflow-x-hidden",
6252
- style: {
6253
- height: "100%",
6254
- width: "100%"
6255
- },
6256
- "aria-label": d("sidebar.episodesTitle")
6257
- }) : /* @__PURE__ */ W(b, {
6258
- className: "flex-1 min-h-0 w-full min-w-0",
6386
+ ]), p = e ? /* @__PURE__ */ U("div", {
6387
+ className: "shrink-0 border-b border-destructive/20 bg-destructive/5 px-3 py-2",
6259
6388
  children: /* @__PURE__ */ W("div", {
6260
- className: "w-full min-w-0 overflow-x-hidden",
6261
- children: n.map((e) => /* @__PURE__ */ W(Pl, {
6262
- item: e,
6263
- ...f
6264
- }, e.episode.episode_index))
6389
+ className: "flex items-start gap-2",
6390
+ children: [/* @__PURE__ */ U(Ps, { className: "mt-0.5 h-4 w-4 shrink-0 text-destructive/70" }), /* @__PURE__ */ W("div", {
6391
+ className: "min-w-0 space-y-0.5",
6392
+ children: [/* @__PURE__ */ U("p", {
6393
+ className: "text-sm font-medium text-destructive",
6394
+ children: d("sidebar.errorLoading")
6395
+ }), /* @__PURE__ */ U("p", {
6396
+ className: "max-w-full break-words text-xs text-muted-foreground",
6397
+ children: e
6398
+ })]
6399
+ })]
6265
6400
  })
6401
+ }) : null;
6402
+ return n.length === 0 ? /* @__PURE__ */ W("div", {
6403
+ className: "flex h-full min-h-0 flex-col",
6404
+ children: [p, /* @__PURE__ */ U("div", {
6405
+ className: "flex flex-1 items-center justify-center p-4 text-center text-muted-foreground",
6406
+ children: t && t.length === 0 ? d("sidebar.emptyNoDataset") : d("sidebar.emptyNoMatch")
6407
+ })]
6408
+ }) : n.length >= 100 ? /* @__PURE__ */ W("div", {
6409
+ className: "flex h-full min-h-0 flex-col",
6410
+ children: [p, /* @__PURE__ */ U(oe, {
6411
+ rowCount: n.length,
6412
+ rowHeight: a && !i ? 102 : 61,
6413
+ rowComponent: Vl,
6414
+ rowProps: f,
6415
+ rowKey: Hl,
6416
+ overscanCount: 4,
6417
+ className: "flex-1 min-h-0 w-full min-w-0 overflow-x-hidden",
6418
+ style: {
6419
+ height: "100%",
6420
+ width: "100%"
6421
+ },
6422
+ "aria-label": d("sidebar.episodesTitle")
6423
+ })]
6424
+ }) : /* @__PURE__ */ W("div", {
6425
+ className: "flex h-full min-h-0 flex-col",
6426
+ children: [p, /* @__PURE__ */ U(ce, {
6427
+ className: "flex-1 min-h-0 w-full min-w-0",
6428
+ children: /* @__PURE__ */ U("div", {
6429
+ className: "w-full min-w-0 overflow-x-hidden",
6430
+ children: n.map((e) => /* @__PURE__ */ U(Bl, {
6431
+ item: e,
6432
+ ...f
6433
+ }, e.episode.episode_index))
6434
+ })
6435
+ })]
6266
6436
  });
6267
- }, Rl = () => {
6268
- let { t: e } = E(), { episodes: t, tasks: n, isLoading: r, error: i, info: a, versionCapability: o, isReadOnly: s } = N(), { selectEpisode: c, selectedEpisodeIndex: l, selectedEpisodeIndices: u, toggleEpisodeSelection: d, selectAllInList: p, clearEpisodeSelection: m, deletedEpisodes: h, getEffectiveEpisode: g, editEpisodeTask: _, deleteEpisode: v, restoreEpisode: y } = te(), [b, x] = U(""), [S, C] = U(!1), [w, T] = U(!1), [D, O] = U(""), [ee, ne] = U(""), [k, A] = U(!1), [re, j] = U(null), [ie, M] = U(!1), [ae, oe] = U(!1), [se, ce] = U(""), P = s || !!(a && o?.status !== "supported");
6269
- B(() => {
6270
- P && (C(!1), T(!1), A(!1), oe(!1), m());
6271
- }, [P, m]);
6272
- let F = V(() => {
6437
+ }, Wl = () => {
6438
+ let { t: e } = T(), { episodes: t, tasks: n, isLoading: r, error: a, info: o, versionCapability: s, isReadOnly: c } = N(), { selectEpisode: l, selectedEpisodeIndex: u, selectedEpisodeIndices: d, toggleEpisodeSelection: f, selectAllInList: p, clearEpisodeSelection: m, deletedEpisodes: h, getEffectiveEpisode: g, editEpisodeTask: _, deleteEpisode: v, restoreEpisode: y } = ne(), [b, x] = H(""), [S, C] = H(!1), [w, E] = H(!1), [D, O] = H(""), [ee, te] = H(""), [k, A] = H(!1), [re, j] = H(null), [ie, M] = H(!1), [ae, oe] = H(!1), [se, P] = H(""), F = c || !!(o && s?.status !== "supported");
6439
+ z(() => {
6440
+ F && (C(!1), E(!1), A(!1), oe(!1), m());
6441
+ }, [F, m]);
6442
+ let ce = B(() => {
6273
6443
  if (!t) return [];
6274
6444
  let e = t;
6275
6445
  if (b.trim()) {
@@ -6279,150 +6449,150 @@ var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
6279
6449
  return String(e.episode_index).includes(t) || a.toLowerCase().includes(t) || Array.isArray(r.tasks) && r.tasks.some((e) => e.toLowerCase().includes(t));
6280
6450
  });
6281
6451
  }
6282
- let r = a?.fps ?? 30, i = D === "" ? void 0 : parseFloat(D), o = ee === "" ? void 0 : parseFloat(ee);
6283
- return i != null && !Number.isNaN(i) && (e = e.filter((e) => (e.length ?? 0) / r >= i)), o != null && !Number.isNaN(o) && (e = e.filter((e) => (e.length ?? 0) / r <= o)), e;
6452
+ let r = o?.fps ?? 30, i = D === "" ? void 0 : parseFloat(D), a = ee === "" ? void 0 : parseFloat(ee);
6453
+ return i != null && !Number.isNaN(i) && (e = e.filter((e) => (e.length ?? 0) / r >= i)), a != null && !Number.isNaN(a) && (e = e.filter((e) => (e.length ?? 0) / r <= a)), e;
6284
6454
  }, [
6285
6455
  t,
6286
6456
  n,
6287
6457
  b,
6288
6458
  D,
6289
6459
  ee,
6290
- a?.fps,
6460
+ o?.fps,
6291
6461
  g
6292
- ]), I = (e, t) => {
6293
- e.stopPropagation(), !P && (j(g(t)), A(!0));
6294
- }, L = (e, t) => {
6295
- e.stopPropagation(), !P && v(t);
6296
- }, le = (e, t) => {
6297
- e.stopPropagation(), !P && y(t);
6298
- }, ue = (e) => {
6299
- h.has(e.episode_index) || (w ? d(e.episode_index) : c(e.episode_index));
6300
- }, R = V(() => F.filter((e) => u.has(e.episode_index)), [F, u]), de = V(() => R.filter((e) => h.has(e.episode_index)), [R, h]), fe = V(() => R.filter((e) => !h.has(e.episode_index)), [R, h]), pe = () => {
6301
- if (P) return;
6462
+ ]), le = (e, t) => {
6463
+ e.stopPropagation(), !F && (j(g(t)), A(!0));
6464
+ }, I = (e, t) => {
6465
+ e.stopPropagation(), !F && v(t);
6466
+ }, ue = (e, t) => {
6467
+ e.stopPropagation(), !F && y(t);
6468
+ }, de = (e) => {
6469
+ h.has(e.episode_index) || (w ? f(e.episode_index) : l(e.episode_index));
6470
+ }, L = B(() => ce.filter((e) => d.has(e.episode_index)), [ce, d]), fe = B(() => L.filter((e) => h.has(e.episode_index)), [L, h]), pe = B(() => L.filter((e) => !h.has(e.episode_index)), [L, h]), me = () => {
6471
+ if (F) return;
6302
6472
  let e = se.trim();
6303
- R.forEach((t) => _(t.episode_index, e || "")), oe(!1), ce("");
6304
- }, z = V(() => {
6305
- let t = a?.fps || 30;
6306
- return F.map((r) => {
6473
+ L.forEach((t) => _(t.episode_index, e || "")), oe(!1), P("");
6474
+ }, R = B(() => {
6475
+ let t = o?.fps || 30;
6476
+ return ce.map((r) => {
6307
6477
  let i = g(r), a = (r.length || 0) / t, o = Math.floor(a / 60), s = Math.floor(a % 60);
6308
6478
  return {
6309
6479
  episode: r,
6310
6480
  taskDescription: (i.tasks && i.tasks.length > 0 ? String(i.tasks[0]) : n[i.task_index || 0]) || e("sidebar.noDescription"),
6311
6481
  formattedDuration: `${o.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`,
6312
6482
  isDeleted: h.has(r.episode_index),
6313
- isSelected: l === r.episode_index,
6314
- isChecked: u.has(r.episode_index)
6483
+ isSelected: u === r.episode_index,
6484
+ isChecked: d.has(r.episode_index)
6315
6485
  };
6316
6486
  });
6317
6487
  }, [
6318
- F,
6488
+ ce,
6319
6489
  g,
6320
- a?.fps,
6490
+ o?.fps,
6321
6491
  n,
6322
6492
  e,
6323
6493
  h,
6324
- l,
6325
- u
6494
+ u,
6495
+ d
6326
6496
  ]);
6327
- return /* @__PURE__ */ G("div", {
6497
+ return /* @__PURE__ */ W("div", {
6328
6498
  className: "flex h-full min-h-0 w-full min-w-0 flex-col overflow-hidden bg-background",
6329
6499
  children: [
6330
- /* @__PURE__ */ G("div", {
6500
+ /* @__PURE__ */ W("div", {
6331
6501
  className: "shrink-0 space-y-3 border-b px-3 pt-0 pb-2 min-w-0 overflow-x-hidden",
6332
6502
  children: [
6333
- /* @__PURE__ */ W(kl, {
6503
+ /* @__PURE__ */ U(Fl, {
6334
6504
  totalCount: t?.length,
6335
6505
  editMode: S,
6336
6506
  multiSelectMode: w,
6337
- isReadOnly: P,
6507
+ isReadOnly: F,
6338
6508
  onToggleEditMode: () => C((e) => !e),
6339
6509
  onToggleMultiSelectMode: () => {
6340
- T((e) => !e), w && m();
6510
+ E((e) => !e), w && m();
6341
6511
  }
6342
6512
  }),
6343
- P && o && /* @__PURE__ */ W("p", {
6513
+ F && s && /* @__PURE__ */ U("p", {
6344
6514
  className: "rounded-md border border-border/60 bg-muted/40 px-2 py-1.5 text-xs text-muted-foreground",
6345
- children: e("sidebar.readOnlyVersion", { version: o.normalizedVersion ?? a?.codebase_version ?? "unknown" })
6515
+ children: e("sidebar.readOnlyVersion", { version: s.normalizedVersion ?? o?.codebase_version ?? "unknown" })
6346
6516
  }),
6347
- /* @__PURE__ */ W(Al, {
6517
+ /* @__PURE__ */ U(Il, {
6348
6518
  searchTerm: b,
6349
6519
  showAdvanced: ie,
6350
6520
  onSearchTermChange: x,
6351
6521
  onToggleAdvanced: () => M((e) => !e)
6352
6522
  }),
6353
- ie && /* @__PURE__ */ W(jl, {
6523
+ ie && /* @__PURE__ */ U(Ll, {
6354
6524
  durationMin: D,
6355
6525
  durationMax: ee,
6356
6526
  onDurationMinChange: O,
6357
- onDurationMaxChange: ne
6527
+ onDurationMaxChange: te
6358
6528
  }),
6359
- !P && w && /* @__PURE__ */ W(Ml, {
6360
- selectedCount: u.size,
6361
- selectedDeletedCount: de.length,
6362
- selectedNonDeletedCount: fe.length,
6363
- onSelectAll: () => p(F.map((e) => e.episode_index)),
6529
+ !F && w && /* @__PURE__ */ U(Rl, {
6530
+ selectedCount: d.size,
6531
+ selectedDeletedCount: fe.length,
6532
+ selectedNonDeletedCount: pe.length,
6533
+ onSelectAll: () => p(ce.map((e) => e.episode_index)),
6364
6534
  onClearSelection: m,
6365
6535
  onBulkEdit: () => oe(!0),
6366
- onBulkDelete: () => fe.forEach((e) => v(e.episode_index)),
6367
- onBulkRestore: () => de.forEach((e) => y(e.episode_index))
6536
+ onBulkDelete: () => pe.forEach((e) => v(e.episode_index)),
6537
+ onBulkRestore: () => fe.forEach((e) => y(e.episode_index))
6368
6538
  })
6369
6539
  ]
6370
6540
  }),
6371
- /* @__PURE__ */ W("div", {
6541
+ /* @__PURE__ */ U("div", {
6372
6542
  className: "flex flex-1 min-h-0 min-w-0 flex-col overflow-hidden",
6373
- children: /* @__PURE__ */ W(Ll, {
6374
- error: i,
6543
+ children: /* @__PURE__ */ U(Ul, {
6544
+ error: a,
6375
6545
  episodes: t,
6376
- filteredEpisodes: z,
6546
+ filteredEpisodes: R,
6377
6547
  isLoading: r,
6378
- multiSelectMode: !P && w,
6379
- editMode: !P && S,
6380
- onRowClick: ue,
6548
+ multiSelectMode: !F && w,
6549
+ editMode: !F && S,
6550
+ onRowClick: de,
6381
6551
  onToggleSelection: (e, t) => {
6382
- t.preventDefault(), t.stopPropagation(), d(e.episode_index);
6552
+ t.preventDefault(), t.stopPropagation(), f(e.episode_index);
6383
6553
  },
6384
- onEdit: (e, t) => I(t, e),
6385
- onDelete: (e, t) => L(t, e),
6386
- onRestore: (e, t) => le(t, e)
6554
+ onEdit: (e, t) => le(t, e),
6555
+ onDelete: (e, t) => I(t, e),
6556
+ onRestore: (e, t) => ue(t, e)
6387
6557
  })
6388
6558
  }),
6389
- !P && /* @__PURE__ */ W(Ol, {
6559
+ !F && /* @__PURE__ */ U(Pl, {
6390
6560
  open: k,
6391
6561
  onOpenChange: A,
6392
6562
  episode: re,
6393
6563
  onSave: _
6394
6564
  }, re?.episode_index ?? "edit-dialog"),
6395
- !P && /* @__PURE__ */ W(Gs, {
6565
+ !F && /* @__PURE__ */ U(Js, {
6396
6566
  open: ae,
6397
6567
  onOpenChange: oe,
6398
- children: /* @__PURE__ */ G(Js, {
6568
+ children: /* @__PURE__ */ W(Zs, {
6399
6569
  className: "sm:max-w-md",
6400
6570
  children: [
6401
- /* @__PURE__ */ W(Ys, { children: /* @__PURE__ */ W(Zs, { children: e("sidebar.bulkEdit", "Edit task") }) }),
6402
- /* @__PURE__ */ G("div", {
6571
+ /* @__PURE__ */ U(Qs, { children: /* @__PURE__ */ U(ec, { children: e("sidebar.bulkEdit", "Edit task") }) }),
6572
+ /* @__PURE__ */ W("div", {
6403
6573
  className: "py-2",
6404
- children: [/* @__PURE__ */ G("p", {
6574
+ children: [/* @__PURE__ */ W("p", {
6405
6575
  className: "mb-2 text-xs text-muted-foreground",
6406
6576
  children: [
6407
- e("sidebar.selectedCount", { count: R.length }),
6577
+ e("sidebar.selectedCount", { count: L.length }),
6408
6578
  " -",
6409
6579
  " ",
6410
6580
  e("editTask.taskDescription")
6411
6581
  ]
6412
- }), /* @__PURE__ */ W(Fc, {
6582
+ }), /* @__PURE__ */ U(Rc, {
6413
6583
  value: se,
6414
- onChange: (e) => ce(e.target.value),
6584
+ onChange: (e) => P(e.target.value),
6415
6585
  placeholder: e("editTask.taskPlaceholder", "Enter task description..."),
6416
6586
  rows: 3,
6417
6587
  className: "resize-none"
6418
6588
  })]
6419
6589
  }),
6420
- /* @__PURE__ */ G(Xs, { children: [/* @__PURE__ */ W(f, {
6590
+ /* @__PURE__ */ W($s, { children: [/* @__PURE__ */ U(i, {
6421
6591
  variant: "outline",
6422
6592
  onClick: () => oe(!1),
6423
6593
  children: e("common.cancel", "Cancel")
6424
- }), /* @__PURE__ */ W(f, {
6425
- onClick: pe,
6594
+ }), /* @__PURE__ */ U(i, {
6595
+ onClick: me,
6426
6596
  children: e("editTask.save", "Save")
6427
6597
  })] })
6428
6598
  ]
@@ -6430,20 +6600,20 @@ var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
6430
6600
  })
6431
6601
  ]
6432
6602
  });
6433
- }, zl = (e = !0) => {
6434
- let t = M(), { episodes: n, getFrameIndex: r, isLoading: i } = N(), { selectedEpisodeIndex: a, selectEpisode: o } = te(), { setFrameIndex: s, togglePlay: c, currentFrames: l } = x(), u = H(e), d = H(n), f = H(a), p = H(l), m = H(i);
6435
- B(() => {
6603
+ }, Gl = (e = !0) => {
6604
+ let t = k(), { episodes: n, getFrameIndex: r, isLoading: i } = N(), { selectedEpisodeIndex: a, selectEpisode: o } = ne(), { setFrameIndex: s, togglePlay: c, currentFrames: l } = S(), u = V(e), d = V(n), f = V(a), p = V(l), m = V(i);
6605
+ z(() => {
6436
6606
  u.current = e;
6437
- }, [e]), B(() => {
6607
+ }, [e]), z(() => {
6438
6608
  d.current = n;
6439
- }, [n]), B(() => {
6609
+ }, [n]), z(() => {
6440
6610
  f.current = a;
6441
- }, [a]), B(() => {
6611
+ }, [a]), z(() => {
6442
6612
  p.current = l;
6443
- }, [l]), B(() => {
6613
+ }, [l]), z(() => {
6444
6614
  m.current = i;
6445
6615
  }, [i]);
6446
- let h = z((e) => {
6616
+ let h = R((e) => {
6447
6617
  if (!u.current || m.current) return;
6448
6618
  let n = e.target;
6449
6619
  if (!t?.contains(n)) return;
@@ -6518,46 +6688,46 @@ var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
6518
6688
  r,
6519
6689
  t
6520
6690
  ]);
6521
- B(() => {
6691
+ z(() => {
6522
6692
  if (e) return window.addEventListener("keydown", h), () => {
6523
6693
  window.removeEventListener("keydown", h);
6524
6694
  };
6525
6695
  }, [e, h]);
6526
- }, Bl = ({ children: e, minWidth: t = 200, maxWidth: n = 600, defaultWidth: r = 256, onWidthChange: i, className: a = "" }) => {
6527
- let [o, s] = U(r), [c, l] = U(!1), u = H(null), d = H(null), f = H(!1), p = H(0), m = H(r), h = H(null), g = H(t), _ = H(n), v = H(i), y = z(() => {
6696
+ }, Kl = ({ children: e, minWidth: t = 200, maxWidth: n = 600, defaultWidth: r = 256, onWidthChange: i, className: a = "" }) => {
6697
+ let [o, s] = H(r), [c, l] = H(!1), u = V(null), d = V(null), f = V(!1), p = V(0), m = V(r), h = V(null), g = V(t), _ = V(n), v = V(i), y = R(() => {
6528
6698
  let e = Math.max(g.current, window.innerWidth - 320);
6529
6699
  return Math.min(_.current, e);
6530
6700
  }, [320]);
6531
- B(() => {
6701
+ z(() => {
6532
6702
  g.current = t, _.current = n, v.current = i;
6533
6703
  }, [
6534
6704
  t,
6535
6705
  n,
6536
6706
  i
6537
6707
  ]);
6538
- let b = z((e) => {
6708
+ let b = R((e) => {
6539
6709
  !f.current || !u.current || (h.current !== null && cancelAnimationFrame(h.current), h.current = requestAnimationFrame(() => {
6540
6710
  let t = e.clientX - p.current, n = y(), r = Math.max(g.current, Math.min(n, m.current + t));
6541
6711
  u.current && (u.current.style.width = `${r}px`), s(r), v.current?.(r);
6542
6712
  }));
6543
- }, [y]), x = z(() => {
6713
+ }, [y]), x = R(() => {
6544
6714
  f.current && (f.current = !1, l(!1), document.body.style.cursor = "", document.body.style.userSelect = "", u.current && (u.current.style.transition = ""), d.current && (d.current.style.transition = ""), h.current !== null && (cancelAnimationFrame(h.current), h.current = null));
6545
- }, []), S = z((e) => {
6715
+ }, []), S = R((e) => {
6546
6716
  e.preventDefault(), e.stopPropagation(), f.current = !0, l(!0), p.current = e.clientX, m.current = o, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none", u.current && (u.current.style.transition = "none"), d.current && (d.current.style.transition = "none");
6547
6717
  }, [o]);
6548
- return B(() => (c && (document.addEventListener("mousemove", b, { passive: !0 }), document.addEventListener("mouseup", x)), () => {
6718
+ return z(() => (c && (document.addEventListener("mousemove", b, { passive: !0 }), document.addEventListener("mouseup", x)), () => {
6549
6719
  document.removeEventListener("mousemove", b), document.removeEventListener("mouseup", x), h.current !== null && cancelAnimationFrame(h.current), f.current && (document.body.style.cursor = "", document.body.style.userSelect = "");
6550
6720
  }), [
6551
6721
  c,
6552
6722
  b,
6553
6723
  x
6554
- ]), B(() => {
6724
+ ]), z(() => {
6555
6725
  let e = () => {
6556
6726
  let e = y();
6557
6727
  o > e && (s(e), u.current && (u.current.style.width = `${e}px`), v.current?.(e));
6558
6728
  };
6559
6729
  return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
6560
- }, [o, y]), /* @__PURE__ */ G(he, { children: [/* @__PURE__ */ W("div", {
6730
+ }, [o, y]), /* @__PURE__ */ W(ge, { children: [/* @__PURE__ */ U("div", {
6561
6731
  ref: u,
6562
6732
  className: `flex h-full min-w-0 shrink-0 flex-col overflow-x-hidden border-r bg-background ${a}`,
6563
6733
  style: {
@@ -6567,31 +6737,31 @@ var Ll = ({ error: e, episodes: t, filteredEpisodes: n, isLoading: r, multiSelec
6567
6737
  transition: "width 0.2s ease-out"
6568
6738
  },
6569
6739
  children: e
6570
- }), /* @__PURE__ */ W("div", {
6740
+ }), /* @__PURE__ */ U("div", {
6571
6741
  ref: d,
6572
6742
  className: `relative z-10 flex w-1 shrink-0 cursor-col-resize items-center justify-center bg-border transition-colors duration-200 hover:bg-primary/30 ${c ? "bg-primary/60" : ""}`,
6573
6743
  onMouseDown: S,
6574
6744
  style: { cursor: "col-resize" },
6575
- children: /* @__PURE__ */ W("div", { className: "absolute inset-y-0 left-0 w-4" })
6745
+ children: /* @__PURE__ */ U("div", { className: "absolute inset-y-0 left-0 w-4" })
6576
6746
  })] });
6577
- }, Vl = 16, Hl = 250;
6578
- function Ul(e) {
6579
- return `calc(${(Math.max(0, Math.min(1, e)) * 100).toFixed(4)}% - ${Vl / 2}px)`;
6747
+ }, ql = 16, Jl = 250;
6748
+ function Yl(e) {
6749
+ return `calc(${(Math.max(0, Math.min(1, e)) * 100).toFixed(4)}% - ${ql / 2}px)`;
6580
6750
  }
6581
- function Wl(e) {
6751
+ function Xl(e) {
6582
6752
  let t = Math.floor(e / 60), n = Math.floor(e % 60), r = Math.floor(e % 1 * 100);
6583
6753
  return `${t}:${n.toString().padStart(2, "0")}.${r.toString().padStart(2, "0")}`;
6584
6754
  }
6585
- var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFrameIndex: i, isDisabled: a, setFrameIndex: o, getFrameIndex: s, subscribeFrameIndex: c }) => {
6586
- let { t: l } = E(), u = H(null), d = H(null), f = H(null), p = H(null), m = H(null), h = H(!1), g = H(0), _ = H(null), v = z((n) => e[n]?.timestamp === void 0 ? n / t : e[n].timestamp, [e, t]), y = z((e) => {
6755
+ var Zl = me(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFrameIndex: i, isDisabled: a, setFrameIndex: o, getFrameIndex: s, subscribeFrameIndex: c }) => {
6756
+ let { t: l } = T(), u = V(null), d = V(null), f = V(null), p = V(null), m = V(null), h = V(!1), g = V(0), _ = V(null), v = R((n) => e[n]?.timestamp === void 0 ? n / t : e[n].timestamp, [e, t]), y = R((e) => {
6587
6757
  let t = Math.max(0, Math.min(1, e));
6588
- f.current && (f.current.style.transform = `scaleX(${t})`), p.current && (p.current.style.left = Ul(t));
6589
- }, []), b = z((e) => {
6758
+ f.current && (f.current.style.transform = `scaleX(${t})`), p.current && (p.current.style.left = Yl(t));
6759
+ }, []), b = R((e) => {
6590
6760
  m.current && m.current.classList.toggle("cursor-grabbing", e), p.current && p.current.classList.toggle("shadow-md", e);
6591
- }, []), x = z((e) => {
6761
+ }, []), x = R((e) => {
6592
6762
  m.current && (m.current.setAttribute("aria-valuenow", String(e)), m.current.setAttribute("aria-valuetext", l("playback.a11y.valuetext", {
6593
- time: Wl(v(e)),
6594
- totalTime: Wl(r),
6763
+ time: Xl(v(e)),
6764
+ totalTime: Xl(r),
6595
6765
  frame: e,
6596
6766
  totalFrames: n
6597
6767
  })));
@@ -6600,26 +6770,26 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
6600
6770
  l,
6601
6771
  n,
6602
6772
  r
6603
- ]), S = z((e, t) => {
6604
- u.current && (u.current.textContent = Wl(v(e))), d.current && (d.current.textContent = String(e)), y(n > 0 ? e / Math.max(1, n - 1) : 0), t && (x(e), g.current = Date.now());
6773
+ ]), S = R((e, t) => {
6774
+ u.current && (u.current.textContent = Xl(v(e))), d.current && (d.current.textContent = String(e)), y(n > 0 ? e / Math.max(1, n - 1) : 0), t && (x(e), g.current = Date.now());
6605
6775
  }, [
6606
6776
  v,
6607
6777
  n,
6608
6778
  x,
6609
6779
  y
6610
- ]), C = z((e, t = !0) => {
6780
+ ]), C = R((e, t = !0) => {
6611
6781
  o(e), S(e, t);
6612
- }, [o, S]), w = z((e) => {
6782
+ }, [o, S]), w = R((e) => {
6613
6783
  if (n === 0) return;
6614
6784
  let t = Math.round(Math.max(0, Math.min(1, e)) * (n - 1));
6615
6785
  C(t);
6616
- }, [C, n]), T = z((e) => {
6786
+ }, [C, n]), E = R((e) => {
6617
6787
  if (!m.current || n === 0) return;
6618
6788
  let t = m.current.getBoundingClientRect();
6619
6789
  if (t.width <= 0) return;
6620
6790
  let r = (e - t.left) / t.width;
6621
6791
  w(r);
6622
- }, [w, n]), D = z((e) => {
6792
+ }, [w, n]), D = R((e) => {
6623
6793
  if (a || n === 0) return;
6624
6794
  let t = s(), r = null;
6625
6795
  switch (e.key) {
@@ -6646,11 +6816,11 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
6646
6816
  s,
6647
6817
  a,
6648
6818
  n
6649
- ]), O = z((e) => {
6819
+ ]), O = R((e) => {
6650
6820
  if (!m.current || a || n === 0) return;
6651
- _.current?.(), h.current = !0, b(!0), m.current.setPointerCapture(e.pointerId), T(e.clientX);
6821
+ _.current?.(), h.current = !0, b(!0), m.current.setPointerCapture(e.pointerId), E(e.clientX);
6652
6822
  let t = (e) => {
6653
- h.current && T(e.clientX);
6823
+ h.current && E(e.clientX);
6654
6824
  }, r = () => {
6655
6825
  window.removeEventListener("pointermove", t), window.removeEventListener("pointerup", i), window.removeEventListener("pointercancel", i), _.current = null;
6656
6826
  }, i = (e) => {
@@ -6661,25 +6831,25 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
6661
6831
  a,
6662
6832
  n,
6663
6833
  b,
6664
- T
6834
+ E
6665
6835
  ]);
6666
- B(() => {
6836
+ z(() => {
6667
6837
  let e = n > 0 ? Math.min(s(), n - 1) : 0;
6668
6838
  S(e, !0);
6669
6839
  }, [
6670
6840
  s,
6671
6841
  S,
6672
6842
  n
6673
- ]), B(() => c((e) => {
6843
+ ]), z(() => c((e) => {
6674
6844
  if (h.current) return;
6675
- let t = Date.now() - g.current >= Hl;
6845
+ let t = Date.now() - g.current >= Jl;
6676
6846
  S(e, t);
6677
- }), [c, S]), B(() => () => {
6847
+ }), [c, S]), z(() => () => {
6678
6848
  _.current?.();
6679
6849
  }, []);
6680
- let ee = V(() => Wl(v(i)), [v, i]), te = V(() => l("playback.a11y.valuetext", {
6681
- time: Wl(v(i)),
6682
- totalTime: Wl(r),
6850
+ let ee = B(() => Xl(v(i)), [v, i]), te = B(() => l("playback.a11y.valuetext", {
6851
+ time: Xl(v(i)),
6852
+ totalTime: Xl(r),
6683
6853
  frame: i,
6684
6854
  totalFrames: n
6685
6855
  }), [
@@ -6689,16 +6859,16 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
6689
6859
  n,
6690
6860
  r
6691
6861
  ]), ne = "text-xs font-mono font-semibold tabular-nums whitespace-nowrap text-foreground", k = "text-[10px] font-mono tabular-nums text-muted-foreground";
6692
- return /* @__PURE__ */ G("div", {
6862
+ return /* @__PURE__ */ W("div", {
6693
6863
  className: "flex-1 flex flex-col justify-center gap-1.5 px-2",
6694
- children: [/* @__PURE__ */ G("div", {
6864
+ children: [/* @__PURE__ */ W("div", {
6695
6865
  className: "flex items-end justify-between gap-4",
6696
- children: [/* @__PURE__ */ W("div", {
6866
+ children: [/* @__PURE__ */ U("div", {
6697
6867
  className: "flex min-w-0 flex-col justify-end",
6698
- children: /* @__PURE__ */ G("div", {
6868
+ children: /* @__PURE__ */ W("div", {
6699
6869
  className: "flex items-baseline gap-1.5",
6700
6870
  title: l("playback.progress"),
6701
- children: [/* @__PURE__ */ W("span", {
6871
+ children: [/* @__PURE__ */ U("span", {
6702
6872
  ref: u,
6703
6873
  className: ne,
6704
6874
  style: {
@@ -6706,17 +6876,17 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
6706
6876
  display: "inline-block"
6707
6877
  },
6708
6878
  children: ee
6709
- }), /* @__PURE__ */ G("span", {
6879
+ }), /* @__PURE__ */ W("span", {
6710
6880
  className: k,
6711
- children: ["/ ", Wl(r)]
6881
+ children: ["/ ", Xl(r)]
6712
6882
  })]
6713
6883
  })
6714
- }), /* @__PURE__ */ W("div", {
6884
+ }), /* @__PURE__ */ U("div", {
6715
6885
  className: "flex min-w-[96px] flex-col items-end justify-end",
6716
- children: /* @__PURE__ */ G("div", {
6886
+ children: /* @__PURE__ */ W("div", {
6717
6887
  className: "flex items-baseline gap-1.5",
6718
6888
  title: l("units.frame"),
6719
- children: [/* @__PURE__ */ W("span", {
6889
+ children: [/* @__PURE__ */ U("span", {
6720
6890
  ref: d,
6721
6891
  className: ne,
6722
6892
  style: {
@@ -6725,13 +6895,13 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
6725
6895
  textAlign: "right"
6726
6896
  },
6727
6897
  children: i
6728
- }), /* @__PURE__ */ G("span", {
6898
+ }), /* @__PURE__ */ W("span", {
6729
6899
  className: k,
6730
6900
  children: ["/ ", n]
6731
6901
  })]
6732
6902
  })
6733
6903
  })]
6734
- }), /* @__PURE__ */ G("div", {
6904
+ }), /* @__PURE__ */ W("div", {
6735
6905
  ref: m,
6736
6906
  className: "relative h-1.5 w-full cursor-pointer rounded-full bg-primary/20 touch-none",
6737
6907
  onPointerDown: O,
@@ -6744,7 +6914,7 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
6744
6914
  "aria-valuemax": Math.max(0, n - 1),
6745
6915
  "aria-valuenow": i,
6746
6916
  "aria-valuetext": te,
6747
- children: [/* @__PURE__ */ W("div", {
6917
+ children: [/* @__PURE__ */ U("div", {
6748
6918
  ref: f,
6749
6919
  className: "absolute h-full rounded-full bg-primary pointer-events-none",
6750
6920
  style: {
@@ -6752,50 +6922,50 @@ var Gl = pe(({ currentFrames: e, fps: t, totalFrames: n, totalTime: r, initialFr
6752
6922
  transform: `scaleX(${n > 1 ? i / (n - 1) : 0})`,
6753
6923
  transformOrigin: "left center"
6754
6924
  }
6755
- }), /* @__PURE__ */ W("div", {
6925
+ }), /* @__PURE__ */ U("div", {
6756
6926
  ref: p,
6757
6927
  className: "absolute left-0 top-1/2 h-4 w-4 rounded-full border border-primary/50 bg-background transition-shadow will-change-transform hover:shadow-md",
6758
6928
  style: {
6759
- left: Ul(n > 1 ? i / (n - 1) : 0),
6929
+ left: Yl(n > 1 ? i / (n - 1) : 0),
6760
6930
  transform: "translateY(-50%)"
6761
6931
  }
6762
6932
  })]
6763
6933
  })]
6764
6934
  });
6765
6935
  });
6766
- Gl.displayName = "PlaybackProgressSlider";
6936
+ Zl.displayName = "PlaybackProgressSlider";
6767
6937
  //#endregion
6768
6938
  //#region src/react/components/Playback/PlaybackBar.tsx
6769
- var Kl = () => {
6770
- let { t: e } = E(), { currentFrames: t, currentFrameIndex: n, setFrameIndex: a, isPlaying: o, setPlaying: s, playbackMode: c, setPlaybackMode: l, playbackSpeed: u, setPlaybackSpeed: d } = x(), { info: p, subscribeFrameIndex: m, getFrameIndex: h, isLoading: g } = N(), { selectedEpisodeIndex: _ } = te(), { tasks: y } = ol(), b = y.find((e) => e.phase !== "ready" && e.phase !== "idle" && e.phase !== "error"), S = t.length, w = p?.fps || 30, T = H(null), D = H(!1);
6771
- B(() => {
6772
- let e = `${_}-${S}`;
6773
- Zc({
6774
- totalFrames: S,
6775
- isLoading: g,
6939
+ var Ql = () => {
6940
+ let { t: e } = T(), { currentFrames: t, currentFrameIndex: r, setFrameIndex: a, isPlaying: o, setPlaying: s, playbackMode: c, setPlaybackMode: u, playbackSpeed: f, setPlaybackSpeed: p } = S(), { info: m, subscribeFrameIndex: h, getFrameIndex: g, isLoading: _ } = N(), { selectedEpisodeIndex: y } = ne(), { tasks: b } = fl(), C = b.find((e) => e.phase !== "ready" && e.phase !== "idle" && e.phase !== "error"), w = t.length, E = m?.fps || 30, D = V(null), O = V(!1);
6941
+ z(() => {
6942
+ let e = `${y}-${w}`;
6943
+ rl({
6944
+ totalFrames: w,
6945
+ isLoading: _,
6776
6946
  isPlaying: o,
6777
- userPaused: D.current,
6947
+ userPaused: O.current,
6778
6948
  currentId: e,
6779
- lastAutoPlayId: T.current
6780
- }) && (T.current = e, s(!0));
6949
+ lastAutoPlayId: D.current
6950
+ }) && (D.current = e, s(!0));
6781
6951
  }, [
6782
- S,
6783
- g,
6952
+ w,
6953
+ _,
6784
6954
  o,
6785
6955
  s,
6786
- _
6787
- ]), B(() => {
6788
- D.current = !1;
6789
- }, [_]), B(() => {
6790
- g && (T.current = null);
6791
- }, [g]);
6956
+ y
6957
+ ]), z(() => {
6958
+ O.current = !1;
6959
+ }, [y]), z(() => {
6960
+ _ && (D.current = null);
6961
+ }, [_]);
6792
6962
  let ee = () => {
6793
- l(c === "sequential" ? "shuffle" : c === "shuffle" ? "loop" : "sequential");
6794
- }, ne = () => {
6963
+ u(c === "sequential" ? "shuffle" : c === "shuffle" ? "loop" : "sequential");
6964
+ }, te = () => {
6795
6965
  switch (c) {
6796
- case "loop": return /* @__PURE__ */ W(Ls, { className: "h-4 w-4" });
6797
- case "shuffle": return /* @__PURE__ */ W(zs, { className: "h-4 w-4" });
6798
- case "sequential": return /* @__PURE__ */ W(Rs, { className: "h-4 w-4" });
6966
+ case "loop": return /* @__PURE__ */ U(Bs, { className: "h-4 w-4" });
6967
+ case "shuffle": return /* @__PURE__ */ U(Hs, { className: "h-4 w-4" });
6968
+ case "sequential": return /* @__PURE__ */ U(Vs, { className: "h-4 w-4" });
6799
6969
  }
6800
6970
  }, k = [
6801
6971
  .25,
@@ -6804,478 +6974,478 @@ var Kl = () => {
6804
6974
  2,
6805
6975
  4
6806
6976
  ], A = () => {
6807
- let e = k.indexOf(u), t = k[(e + 1) % k.length];
6808
- d(t);
6977
+ let e = k.indexOf(f), t = k[(e + 1) % k.length];
6978
+ p(t);
6809
6979
  }, re = () => {
6810
6980
  switch (c) {
6811
6981
  case "loop": return e("playback.mode.loop");
6812
6982
  case "shuffle": return e("playback.mode.shuffle");
6813
6983
  case "sequential": return e("playback.mode.sequential");
6814
6984
  }
6815
- }, j = V(() => S === 0 ? 0 : t[S - 1]?.timestamp === void 0 ? S / w : t[S - 1].timestamp, [
6816
- S,
6985
+ }, j = B(() => w === 0 ? 0 : t[w - 1]?.timestamp === void 0 ? w / E : t[w - 1].timestamp, [
6986
+ w,
6817
6987
  t,
6818
- w
6819
- ]), ie = z(() => {
6988
+ E
6989
+ ]), ie = R(() => {
6820
6990
  let e = !o;
6821
- D.current = !e, s(e);
6991
+ O.current = !e, s(e);
6822
6992
  }, [o, s]);
6823
- return S === 0 && !g && !b ? /* @__PURE__ */ W("div", {
6993
+ return w === 0 && !_ && !C ? /* @__PURE__ */ U("div", {
6824
6994
  className: "h-16 border-t bg-background/50 px-6 flex items-center justify-center text-muted-foreground italic text-sm",
6825
6995
  children: e("playback.noData")
6826
- }) : g || b ? /* @__PURE__ */ G("div", {
6996
+ }) : _ || C ? /* @__PURE__ */ W("div", {
6827
6997
  className: "h-16 border-t bg-background text-foreground px-4 flex items-center gap-4 animate-pulse motion-reduce:animate-none pointer-events-none opacity-60",
6828
6998
  role: "status",
6829
6999
  "aria-live": "polite",
6830
- "aria-label": b?.message || e("common.loading"),
7000
+ "aria-label": C?.message || e("common.loading"),
6831
7001
  children: [
6832
- /* @__PURE__ */ G("div", {
7002
+ /* @__PURE__ */ W("div", {
6833
7003
  className: "flex items-center gap-1",
6834
7004
  children: [
6835
- /* @__PURE__ */ W("div", { className: "h-8 w-8 rounded bg-muted" }),
6836
- /* @__PURE__ */ W("div", { className: "h-8 w-12 rounded bg-muted" }),
6837
- /* @__PURE__ */ W("div", { className: "h-8 w-8 rounded bg-muted" }),
6838
- /* @__PURE__ */ W("div", { className: "h-9 w-9 rounded-full bg-muted" }),
6839
- /* @__PURE__ */ W("div", { className: "h-8 w-8 rounded bg-muted" })
7005
+ /* @__PURE__ */ U("div", { className: "h-8 w-8 rounded bg-muted" }),
7006
+ /* @__PURE__ */ U("div", { className: "h-8 w-12 rounded bg-muted" }),
7007
+ /* @__PURE__ */ U("div", { className: "h-8 w-8 rounded bg-muted" }),
7008
+ /* @__PURE__ */ U("div", { className: "h-9 w-9 rounded-full bg-muted" }),
7009
+ /* @__PURE__ */ U("div", { className: "h-8 w-8 rounded bg-muted" })
6840
7010
  ]
6841
7011
  }),
6842
- /* @__PURE__ */ W($s, {
7012
+ /* @__PURE__ */ U(nc, {
6843
7013
  orientation: "vertical",
6844
7014
  className: "h-8 mx-2 bg-border"
6845
7015
  }),
6846
- /* @__PURE__ */ G("div", {
7016
+ /* @__PURE__ */ W("div", {
6847
7017
  className: "flex-1 flex flex-col justify-center gap-2",
6848
- children: [/* @__PURE__ */ G("div", {
7018
+ children: [/* @__PURE__ */ W("div", {
6849
7019
  className: "flex justify-between",
6850
- children: [/* @__PURE__ */ W("div", { className: "h-3 w-24 bg-muted rounded" }), /* @__PURE__ */ W("div", { className: "h-3 w-16 bg-muted rounded" })]
6851
- }), /* @__PURE__ */ W("div", { className: "h-1.5 w-full bg-muted rounded-full" })]
7020
+ children: [/* @__PURE__ */ U("div", { className: "h-3 w-24 bg-muted rounded" }), /* @__PURE__ */ U("div", { className: "h-3 w-16 bg-muted rounded" })]
7021
+ }), /* @__PURE__ */ U("div", { className: "h-1.5 w-full bg-muted rounded-full" })]
6852
7022
  }),
6853
- /* @__PURE__ */ W($s, {
7023
+ /* @__PURE__ */ U(nc, {
6854
7024
  orientation: "vertical",
6855
7025
  className: "h-8 mx-2 bg-border"
6856
7026
  }),
6857
- /* @__PURE__ */ G("div", {
7027
+ /* @__PURE__ */ W("div", {
6858
7028
  className: "flex items-center gap-4",
6859
- children: [/* @__PURE__ */ W("div", { className: "h-8 w-12 bg-muted rounded" }), /* @__PURE__ */ W("div", { className: "h-8 w-16 bg-muted rounded" })]
7029
+ children: [/* @__PURE__ */ U("div", { className: "h-8 w-12 bg-muted rounded" }), /* @__PURE__ */ U("div", { className: "h-8 w-16 bg-muted rounded" })]
6860
7030
  })
6861
7031
  ]
6862
- }) : /* @__PURE__ */ G("div", {
7032
+ }) : /* @__PURE__ */ W("div", {
6863
7033
  className: "h-16 border-t bg-background text-foreground px-4 flex items-center gap-4",
6864
7034
  children: [
6865
- /* @__PURE__ */ G("div", {
7035
+ /* @__PURE__ */ W("div", {
6866
7036
  className: "flex items-center gap-1",
6867
7037
  children: [
6868
- /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6869
- render: /* @__PURE__ */ W(f, {
7038
+ /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
7039
+ render: /* @__PURE__ */ U(i, {
6870
7040
  variant: "ghost",
6871
7041
  size: "icon",
6872
7042
  className: `h-8 w-8 ${c === "sequential" ? "text-muted-foreground" : "text-primary"} hover:text-foreground`,
6873
7043
  onClick: ee,
6874
- disabled: g,
7044
+ disabled: _,
6875
7045
  "aria-label": e("playback.mode.toggle")
6876
7046
  }),
6877
- children: ne()
6878
- }), /* @__PURE__ */ W(v, { children: re() })] }),
6879
- /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ G(I, {
6880
- render: /* @__PURE__ */ W(f, {
7047
+ children: te()
7048
+ }), /* @__PURE__ */ U(P, { children: re() })] }),
7049
+ /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ W(x, {
7050
+ render: /* @__PURE__ */ U(i, {
6881
7051
  variant: "ghost",
6882
7052
  size: "sm",
6883
7053
  className: "h-8 px-2 font-mono text-xs",
6884
7054
  onClick: A,
6885
- disabled: g || S === 0,
7055
+ disabled: _ || w === 0,
6886
7056
  "aria-label": e("playback.speed")
6887
7057
  }),
6888
- children: [u, "x"]
6889
- }), /* @__PURE__ */ W(v, { children: e("playback.speed") })] }),
6890
- /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6891
- render: /* @__PURE__ */ W(f, {
7058
+ children: [f, "x"]
7059
+ }), /* @__PURE__ */ U(P, { children: e("playback.speed") })] }),
7060
+ /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
7061
+ render: /* @__PURE__ */ U(i, {
6892
7062
  variant: "ghost",
6893
7063
  size: "icon",
6894
7064
  className: "h-8 w-8",
6895
- onClick: () => a(Math.max(0, h() - 1)),
6896
- disabled: g,
7065
+ onClick: () => a(Math.max(0, g() - 1)),
7066
+ disabled: _,
6897
7067
  "aria-label": e("panels.keyboardShortcuts.prevFrame.action")
6898
7068
  }),
6899
- children: /* @__PURE__ */ W(As, { className: "h-4 w-4" })
6900
- }), /* @__PURE__ */ W(v, { children: e("panels.keyboardShortcuts.prevFrame.action") })] }),
6901
- /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6902
- render: /* @__PURE__ */ W(f, {
7069
+ children: /* @__PURE__ */ U(Ns, { className: "h-4 w-4" })
7070
+ }), /* @__PURE__ */ U(P, { children: e("panels.keyboardShortcuts.prevFrame.action") })] }),
7071
+ /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
7072
+ render: /* @__PURE__ */ U(i, {
6903
7073
  variant: "default",
6904
7074
  size: "icon",
6905
7075
  className: "h-9 w-9 rounded-full transition-all",
6906
7076
  onClick: ie,
6907
- disabled: g || S === 0,
7077
+ disabled: _ || w === 0,
6908
7078
  "aria-label": e("panels.keyboardShortcuts.playPause.action")
6909
7079
  }),
6910
- children: o ? /* @__PURE__ */ W(r, { className: "h-4 w-4" }) : /* @__PURE__ */ W(i, { className: "h-4 w-4 fill-current" })
6911
- }), /* @__PURE__ */ W(v, { children: e("panels.keyboardShortcuts.playPause.action") })] }),
6912
- /* @__PURE__ */ G(C, { children: [/* @__PURE__ */ W(I, {
6913
- render: /* @__PURE__ */ W(f, {
7080
+ children: o ? /* @__PURE__ */ U(d, { className: "h-4 w-4" }) : /* @__PURE__ */ U(n, { className: "h-4 w-4 fill-current" })
7081
+ }), /* @__PURE__ */ U(P, { children: e("panels.keyboardShortcuts.playPause.action") })] }),
7082
+ /* @__PURE__ */ W(v, { children: [/* @__PURE__ */ U(x, {
7083
+ render: /* @__PURE__ */ U(i, {
6914
7084
  variant: "ghost",
6915
7085
  size: "icon",
6916
7086
  className: "h-8 w-8",
6917
- onClick: () => a(Math.min(S - 1, h() + 1)),
6918
- disabled: g,
7087
+ onClick: () => a(Math.min(w - 1, g() + 1)),
7088
+ disabled: _,
6919
7089
  "aria-label": e("panels.keyboardShortcuts.nextFrame.action")
6920
7090
  }),
6921
- children: /* @__PURE__ */ W(O, { className: "h-4 w-4" })
6922
- }), /* @__PURE__ */ W(v, { children: e("panels.keyboardShortcuts.nextFrame.action") })] })
7091
+ children: /* @__PURE__ */ U(l, { className: "h-4 w-4" })
7092
+ }), /* @__PURE__ */ U(P, { children: e("panels.keyboardShortcuts.nextFrame.action") })] })
6923
7093
  ]
6924
7094
  }),
6925
- /* @__PURE__ */ W($s, {
7095
+ /* @__PURE__ */ U(nc, {
6926
7096
  orientation: "vertical",
6927
7097
  className: "h-8 mx-2 bg-border"
6928
7098
  }),
6929
- /* @__PURE__ */ W(Gl, {
7099
+ /* @__PURE__ */ U(Zl, {
6930
7100
  currentFrames: t,
6931
- fps: w,
6932
- totalFrames: S,
7101
+ fps: E,
7102
+ totalFrames: w,
6933
7103
  totalTime: j,
6934
- initialFrameIndex: n,
6935
- isDisabled: g || !!b,
7104
+ initialFrameIndex: r,
7105
+ isDisabled: _ || !!C,
6936
7106
  setFrameIndex: a,
6937
- getFrameIndex: h,
6938
- subscribeFrameIndex: m
7107
+ getFrameIndex: g,
7108
+ subscribeFrameIndex: h
6939
7109
  }),
6940
- /* @__PURE__ */ W($s, {
7110
+ /* @__PURE__ */ U(nc, {
6941
7111
  orientation: "vertical",
6942
7112
  className: "h-8 mx-2 bg-border"
6943
7113
  }),
6944
- /* @__PURE__ */ G("div", {
7114
+ /* @__PURE__ */ W("div", {
6945
7115
  className: "flex items-center gap-4 pr-2",
6946
- children: [/* @__PURE__ */ G("div", {
7116
+ children: [/* @__PURE__ */ W("div", {
6947
7117
  className: "flex flex-col items-end",
6948
- children: [/* @__PURE__ */ W("span", {
7118
+ children: [/* @__PURE__ */ U("span", {
6949
7119
  className: "text-[9px] font-bold text-muted-foreground/60 uppercase tracking-wider",
6950
7120
  children: e("playback.meta.fps")
6951
- }), /* @__PURE__ */ W(Ds, {
7121
+ }), /* @__PURE__ */ U(As, {
6952
7122
  variant: "secondary",
6953
7123
  className: "text-[10px] h-4.5 px-1 py-0 font-mono",
6954
- children: w
7124
+ children: E
6955
7125
  })]
6956
- }), /* @__PURE__ */ G("div", {
7126
+ }), /* @__PURE__ */ W("div", {
6957
7127
  className: "flex flex-col items-end min-w-[60px]",
6958
- children: [/* @__PURE__ */ W("span", {
7128
+ children: [/* @__PURE__ */ U("span", {
6959
7129
  className: "text-[9px] font-bold text-muted-foreground/60 uppercase tracking-wider",
6960
7130
  children: e("playback.meta.version")
6961
- }), /* @__PURE__ */ W("span", {
7131
+ }), /* @__PURE__ */ U("span", {
6962
7132
  className: "text-[10px] font-mono text-foreground/80",
6963
- children: p?.codebase_version || "N/A"
7133
+ children: m?.codebase_version || "N/A"
6964
7134
  })]
6965
7135
  })]
6966
7136
  })
6967
7137
  ]
6968
7138
  });
6969
- }, ql = ({ title: t, message: n, onRetry: r, errorDetail: i }) => {
6970
- let { t: a } = E(), { reset: o } = N(), [s, c] = U(!1);
6971
- return /* @__PURE__ */ G("div", {
7139
+ }, $l = ({ title: e, message: t, onRetry: n, errorDetail: a }) => {
7140
+ let { t: o } = T(), { reset: s } = N(), [c, l] = H(!1);
7141
+ return /* @__PURE__ */ W("div", {
6972
7142
  className: "flex flex-col items-center justify-center p-8 text-center max-w-md mx-auto h-full space-y-6",
6973
7143
  role: "alert",
6974
7144
  "aria-live": "assertive",
6975
7145
  children: [
6976
- /* @__PURE__ */ W("div", {
7146
+ /* @__PURE__ */ U("div", {
6977
7147
  className: "bg-destructive/10 p-4 rounded-full",
6978
- children: /* @__PURE__ */ W(js, { className: "h-12 w-12 text-destructive" })
7148
+ children: /* @__PURE__ */ U(Ps, { className: "h-12 w-12 text-destructive" })
6979
7149
  }),
6980
- /* @__PURE__ */ G("div", {
7150
+ /* @__PURE__ */ W("div", {
6981
7151
  className: "space-y-2",
6982
- children: [/* @__PURE__ */ W("h3", {
7152
+ children: [/* @__PURE__ */ U("h3", {
6983
7153
  className: "text-xl font-bold text-foreground",
6984
- children: t || a("common.error")
6985
- }), /* @__PURE__ */ W("p", {
7154
+ children: e || o("common.error")
7155
+ }), /* @__PURE__ */ U("p", {
6986
7156
  className: "text-muted-foreground",
6987
- children: n || a("errors.generic")
7157
+ children: t || o("errors.generic")
6988
7158
  })]
6989
7159
  }),
6990
- i && /* @__PURE__ */ G("div", {
7160
+ a && /* @__PURE__ */ W("div", {
6991
7161
  className: "w-full bg-muted/50 rounded-lg p-3 text-left overflow-hidden",
6992
- children: [/* @__PURE__ */ G("div", {
7162
+ children: [/* @__PURE__ */ W("div", {
6993
7163
  className: "flex justify-between items-center mb-2",
6994
- children: [/* @__PURE__ */ W("span", {
7164
+ children: [/* @__PURE__ */ U("span", {
6995
7165
  className: "text-[10px] font-bold text-muted-foreground uppercase tracking-wider",
6996
- children: a("errors.details")
6997
- }), /* @__PURE__ */ W(f, {
7166
+ children: o("errors.details")
7167
+ }), /* @__PURE__ */ U(i, {
6998
7168
  variant: "ghost",
6999
7169
  size: "icon",
7000
7170
  className: "h-6 w-6",
7001
7171
  onClick: () => {
7002
- i && (navigator.clipboard.writeText(i), c(!0), setTimeout(() => c(!1), 2e3));
7172
+ a && (navigator.clipboard.writeText(a), l(!0), setTimeout(() => l(!1), 2e3));
7003
7173
  },
7004
- "aria-label": s ? a("common.copied", "Copied") : a("common.copy"),
7005
- title: a("common.copy"),
7006
- children: s ? /* @__PURE__ */ W(l, { className: "h-3 w-3 text-green-500" }) : /* @__PURE__ */ W(e, { className: "h-3 w-3" })
7174
+ "aria-label": c ? o("common.copied", "Copied") : o("common.copy"),
7175
+ title: o("common.copy"),
7176
+ children: c ? /* @__PURE__ */ U(u, { className: "h-3 w-3 text-green-500" }) : /* @__PURE__ */ U(ee, { className: "h-3 w-3" })
7007
7177
  })]
7008
- }), /* @__PURE__ */ W("pre", {
7178
+ }), /* @__PURE__ */ U("pre", {
7009
7179
  className: "text-xs font-mono text-muted-foreground break-all whitespace-pre-wrap max-h-32 overflow-y-auto",
7010
- children: i
7180
+ children: a
7011
7181
  })]
7012
7182
  }),
7013
- /* @__PURE__ */ G("div", {
7183
+ /* @__PURE__ */ W("div", {
7014
7184
  className: "flex flex-wrap items-center justify-center gap-3 w-full",
7015
- children: [r && /* @__PURE__ */ G(f, {
7016
- onClick: r,
7185
+ children: [n && /* @__PURE__ */ W(i, {
7186
+ onClick: n,
7017
7187
  variant: "default",
7018
7188
  className: "gap-2",
7019
- children: [/* @__PURE__ */ W(m, { className: "h-4 w-4" }), a("common.retry")]
7020
- }), /* @__PURE__ */ G(f, {
7021
- onClick: o,
7189
+ children: [/* @__PURE__ */ U(r, { className: "h-4 w-4" }), o("common.retry")]
7190
+ }), /* @__PURE__ */ W(i, {
7191
+ onClick: s,
7022
7192
  variant: "outline",
7023
7193
  className: "gap-2",
7024
- children: [/* @__PURE__ */ W(Ns, { className: "h-4 w-4" }), a("navbar.goHome")]
7194
+ children: [/* @__PURE__ */ U(Is, { className: "h-4 w-4" }), o("navbar.goHome")]
7025
7195
  })]
7026
7196
  })
7027
7197
  ]
7028
7198
  });
7029
- }, Jl = R.lazy(async () => ({ default: (await import("./DockviewLayout-DjLrI3Yt.js")).DockviewLayout }));
7030
- function Yl({ showSidebar: e = !0, showPlaybackBar: t = !0, className: n, sidebar: r, emptyState: i, sidebarHeader: a, showToaster: o = !0, onRetry: s }) {
7031
- let { t: c } = E(), { episodes: l, info: u, clearError: d, error: f } = N(), { tasks: p } = ol(), m = u !== null && l.length > 0, h = m && e && !!r, g = p.find((e) => e.phase !== "ready" && e.phase !== "idle" && e.phase !== "error"), _ = p.find((e) => e.phase === "error"), v = s ?? (() => {
7199
+ }, eu = L.lazy(async () => ({ default: (await import("./DockviewLayout-DeRL52Yo.js")).DockviewLayout }));
7200
+ function tu({ showSidebar: e = !0, showPlaybackBar: t = !0, className: n, sidebar: r, emptyState: i, sidebarHeader: a, showToaster: o = !0, onRetry: s }) {
7201
+ let { t: c } = T(), { episodes: l, info: u, clearError: d, error: f } = N(), { tasks: p } = fl(), m = u !== null && l.length > 0, h = m && e && !!r, g = p.find((e) => e.phase !== "ready" && e.phase !== "idle" && e.phase !== "error"), _ = p.find((e) => e.phase === "error"), v = s ?? (() => {
7032
7202
  d();
7033
7203
  });
7034
- return /* @__PURE__ */ G("div", {
7035
- className: A("flex flex-col h-full w-full overflow-hidden", n),
7036
- children: [/* @__PURE__ */ G("div", {
7204
+ return /* @__PURE__ */ W("div", {
7205
+ className: D("flex flex-col h-full w-full overflow-hidden", n),
7206
+ children: [/* @__PURE__ */ W("div", {
7037
7207
  className: "flex flex-1 overflow-hidden",
7038
- children: [h && /* @__PURE__ */ G(Bl, {
7208
+ children: [h && /* @__PURE__ */ W(Kl, {
7039
7209
  defaultWidth: 256,
7040
7210
  minWidth: 200,
7041
7211
  maxWidth: 600,
7042
7212
  className: "min-w-0 overflow-hidden",
7043
- children: [a, /* @__PURE__ */ W("div", {
7213
+ children: [a, /* @__PURE__ */ U("div", {
7044
7214
  className: "flex flex-1 min-h-0 flex-col overflow-hidden",
7045
7215
  children: r
7046
7216
  })]
7047
- }), /* @__PURE__ */ G("div", {
7217
+ }), /* @__PURE__ */ W("div", {
7048
7218
  className: "flex-1 flex flex-col min-w-0",
7049
- children: [/* @__PURE__ */ W("div", {
7050
- className: "flex-1 overflow-hidden relative",
7051
- children: u ? /* @__PURE__ */ G(he, { children: [f ? /* @__PURE__ */ W("div", {
7219
+ children: [/* @__PURE__ */ U("div", {
7220
+ className: "flex-1 min-w-0 min-h-0 overflow-hidden relative",
7221
+ children: u ? /* @__PURE__ */ W(ge, { children: [f ? /* @__PURE__ */ U("div", {
7052
7222
  className: "absolute inset-x-0 top-0 z-10 px-3 py-2 text-xs bg-destructive/10 text-destructive border-b border-destructive/20",
7053
7223
  children: f
7054
- }) : null, /* @__PURE__ */ W(de, {
7055
- fallback: /* @__PURE__ */ W("div", {
7224
+ }) : null, /* @__PURE__ */ U(fe, {
7225
+ fallback: /* @__PURE__ */ U("div", {
7056
7226
  className: "w-full h-full flex items-center justify-center text-muted-foreground bg-background/50 backdrop-blur-sm z-50",
7057
7227
  role: "status",
7058
7228
  "aria-live": "polite",
7059
- children: /* @__PURE__ */ G("div", {
7229
+ children: /* @__PURE__ */ W("div", {
7060
7230
  className: "flex flex-col items-center gap-4",
7061
- children: [/* @__PURE__ */ G("div", {
7231
+ children: [/* @__PURE__ */ W("div", {
7062
7232
  className: "flex items-center gap-3",
7063
- children: [/* @__PURE__ */ W("div", {
7233
+ children: [/* @__PURE__ */ U("div", {
7064
7234
  className: "h-5 w-5 border-2 border-primary border-t-transparent rounded-full animate-spin motion-reduce:animate-none",
7065
7235
  "aria-hidden": !0
7066
- }), /* @__PURE__ */ W("span", {
7236
+ }), /* @__PURE__ */ U("span", {
7067
7237
  className: "text-sm font-medium",
7068
7238
  children: c("common.loadingLayout")
7069
7239
  })]
7070
- }), /* @__PURE__ */ W("p", {
7240
+ }), /* @__PURE__ */ U("p", {
7071
7241
  className: "text-xs text-muted-foreground",
7072
7242
  children: c("common.firstLoadNote")
7073
7243
  })]
7074
7244
  })
7075
7245
  }),
7076
- children: /* @__PURE__ */ W(Jl, {})
7077
- })] }) : g ? /* @__PURE__ */ W("div", {
7246
+ children: /* @__PURE__ */ U(eu, {})
7247
+ })] }) : g ? /* @__PURE__ */ U("div", {
7078
7248
  className: "w-full h-full flex items-center justify-center text-muted-foreground",
7079
7249
  role: "status",
7080
7250
  "aria-live": "polite",
7081
- children: /* @__PURE__ */ G("div", {
7251
+ children: /* @__PURE__ */ W("div", {
7082
7252
  className: "flex flex-col items-center gap-4 max-w-md text-center px-6",
7083
- children: [/* @__PURE__ */ W("div", {
7253
+ children: [/* @__PURE__ */ U("div", {
7084
7254
  className: "h-10 w-10 border-4 border-primary border-t-transparent rounded-full animate-spin motion-reduce:animate-none",
7085
7255
  "aria-hidden": !0
7086
- }), /* @__PURE__ */ G("div", {
7256
+ }), /* @__PURE__ */ W("div", {
7087
7257
  className: "space-y-2",
7088
- children: [/* @__PURE__ */ W("h3", {
7258
+ children: [/* @__PURE__ */ U("h3", {
7089
7259
  className: "text-lg font-semibold text-foreground",
7090
7260
  children: c(`loading.phase.${g.phase}`)
7091
- }), /* @__PURE__ */ W("p", {
7261
+ }), /* @__PURE__ */ U("p", {
7092
7262
  className: "text-sm text-muted-foreground animate-pulse motion-reduce:animate-none",
7093
7263
  children: g.message || c("common.loading")
7094
7264
  })]
7095
7265
  })]
7096
7266
  })
7097
- }) : _ ? /* @__PURE__ */ W(ql, {
7267
+ }) : _ ? /* @__PURE__ */ U($l, {
7098
7268
  title: c("common.error"),
7099
7269
  message: c("errors.loadFailed"),
7100
7270
  errorDetail: _.error || void 0,
7101
7271
  onRetry: v
7102
- }) : i ?? /* @__PURE__ */ W("div", {
7272
+ }) : i ?? /* @__PURE__ */ U("div", {
7103
7273
  className: "w-full h-full flex items-center justify-center text-muted-foreground",
7104
7274
  role: "status",
7105
7275
  "aria-live": "polite",
7106
- children: /* @__PURE__ */ W("div", {
7276
+ children: /* @__PURE__ */ U("div", {
7107
7277
  className: "text-center",
7108
- children: /* @__PURE__ */ W("p", { children: c("common.loading") })
7278
+ children: /* @__PURE__ */ U("p", { children: c("common.loading") })
7109
7279
  })
7110
7280
  })
7111
- }), t && m && /* @__PURE__ */ W(Kl, {})]
7281
+ }), t && m && /* @__PURE__ */ U(Ql, {})]
7112
7282
  })]
7113
- }), o ? /* @__PURE__ */ W(Tl, {}) : null]
7283
+ }), o ? /* @__PURE__ */ U(jl, {}) : null]
7114
7284
  });
7115
7285
  }
7116
7286
  //#endregion
7117
7287
  //#region src/react/components/LeRobotViewer.tsx
7118
- function Xl({ dataSource: e, showSidebar: t = !0, showPlaybackBar: n = !0, onFatalError: r, enableKeyboardShortcuts: i = !0, onBack: a, onExport: o }) {
7119
- let { t: s } = E(), { initialize: c, error: l, isLoading: u, clearError: d } = N();
7120
- zl(i);
7121
- let p = H(null), [m, h] = U(null), [g, _] = U(null), [v, y] = U(!1), b = H(null), x = V(() => g ?? (l ? {
7288
+ function nu({ dataSource: t, showSidebar: n = !0, showPlaybackBar: r = !0, onFatalError: a, enableKeyboardShortcuts: o = !0, onBack: s, onExport: c }) {
7289
+ let { t: l } = T(), { initialize: u, error: d, isLoading: f, clearError: p } = N();
7290
+ Gl(o);
7291
+ let m = V(null), [h, g] = H(null), [_, v] = H(null), [y, b] = H(!1), x = V(null), S = B(() => _ ?? (d ? {
7122
7292
  code: "DATASET_LOAD_FAILED",
7123
- message: l,
7293
+ message: d,
7124
7294
  recoverable: !0
7125
- } : null), [l, g]), S = (e) => {
7295
+ } : null), [d, _]), C = (e) => {
7126
7296
  try {
7127
7297
  return new URL(e, window.location.href).toString();
7128
7298
  } catch {
7129
7299
  return e;
7130
7300
  }
7131
7301
  };
7132
- B(() => {
7133
- let t = !1;
7134
- return d(), (async () => {
7135
- if (_(null), y(!1), typeof e != "string") {
7136
- h(e);
7302
+ z(() => {
7303
+ let e = !1;
7304
+ return p(), (async () => {
7305
+ if (v(null), b(!1), typeof t != "string") {
7306
+ g(t);
7137
7307
  return;
7138
7308
  }
7139
- let n = e.trim();
7309
+ let n = t.trim();
7140
7310
  if (!n) {
7141
- h(null), _({
7311
+ g(null), v({
7142
7312
  code: "INVALID_DATA_SOURCE",
7143
- message: `${s("common.error")}: empty dataSource url`,
7313
+ message: `${l("common.error")}: empty dataSource url`,
7144
7314
  recoverable: !1
7145
7315
  });
7146
7316
  return;
7147
7317
  }
7148
- let r = S(n);
7149
- y(!0);
7318
+ let r = C(n);
7319
+ b(!0);
7150
7320
  try {
7151
- let e = await Gc(r);
7152
- if (!e.ok) {
7153
- h(null), _({
7321
+ let t = await Zc(r);
7322
+ if (!t.ok) {
7323
+ g(null), v({
7154
7324
  code: "REMOTE_SOURCE_UNAVAILABLE",
7155
- message: Bc(s, e.failure),
7325
+ message: Wc(l, t.failure),
7156
7326
  recoverable: !0
7157
7327
  });
7158
7328
  return;
7159
7329
  }
7160
- let n = fs(r) || e.kind;
7330
+ let n = fs(r) || t.kind;
7161
7331
  if (!n) {
7162
- h(null), _({
7332
+ g(null), v({
7163
7333
  code: "UNSUPPORTED_ARCHIVE",
7164
- message: s("validation.unsupportedFormat"),
7334
+ message: l("validation.unsupportedFormat"),
7165
7335
  recoverable: !1
7166
7336
  });
7167
7337
  return;
7168
7338
  }
7169
- if (t) return;
7170
- h(gs(r, void 0, n, { accessMode: e.accessMode }));
7171
- } catch (e) {
7172
- if (t) return;
7173
- let n = e instanceof Error ? e.message : String(e);
7174
- h(null), _({
7339
+ if (e) return;
7340
+ g(gs(r, void 0, n, { accessMode: t.accessMode }));
7341
+ } catch (t) {
7342
+ if (e) return;
7343
+ let n = t instanceof Error ? t.message : String(t);
7344
+ g(null), v({
7175
7345
  code: "REMOTE_SOURCE_UNAVAILABLE",
7176
7346
  message: n,
7177
7347
  recoverable: !0,
7178
- cause: e
7348
+ cause: t
7179
7349
  });
7180
7350
  } finally {
7181
- t || y(!1);
7351
+ e || b(!1);
7182
7352
  }
7183
7353
  })(), () => {
7184
- t = !0;
7354
+ e = !0;
7185
7355
  };
7186
7356
  }, [
7187
- e,
7188
- s,
7189
- d
7190
- ]), B(() => {
7191
- m && p.current !== m && (p.current = m, c(m));
7192
- }, [m, c]), B(() => {
7193
- x || (b.current = null);
7194
- }, [x]), B(() => {
7195
- if (!r || !x) return;
7196
- let e = `${x.code}:${x.message}`;
7197
- b.current !== e && (b.current = e, r(x));
7198
- }, [x, r]);
7199
- let C = z(() => {
7200
- if (d(), p.current = null, _(null), m) {
7201
- p.current = m, c(m);
7357
+ t,
7358
+ l,
7359
+ p
7360
+ ]), z(() => {
7361
+ h && m.current !== h && (m.current = h, u(h));
7362
+ }, [h, u]), z(() => {
7363
+ S || (x.current = null);
7364
+ }, [S]), z(() => {
7365
+ if (!a || !S) return;
7366
+ let e = `${S.code}:${S.message}`;
7367
+ x.current !== e && (x.current = e, a(S));
7368
+ }, [S, a]);
7369
+ let w = R(() => {
7370
+ if (p(), m.current = null, v(null), h) {
7371
+ m.current = h, u(h);
7202
7372
  return;
7203
7373
  }
7204
- h(null), typeof e != "string" && h(e);
7374
+ g(null), typeof t != "string" && g(t);
7205
7375
  }, [
7206
- d,
7207
- m,
7208
- c,
7209
- e
7376
+ p,
7377
+ h,
7378
+ u,
7379
+ t
7210
7380
  ]);
7211
- if (r && x) return null;
7212
- let w = a || o ? /* @__PURE__ */ G("div", {
7381
+ if (a && S) return null;
7382
+ let E = s || c ? /* @__PURE__ */ W("div", {
7213
7383
  className: "flex flex-row items-center justify-between gap-2 h-9 px-2 border-b border-border/30 bg-background/50 backdrop-blur-sm",
7214
- children: [a ? /* @__PURE__ */ G(f, {
7384
+ children: [s ? /* @__PURE__ */ W(i, {
7215
7385
  variant: "ghost",
7216
7386
  size: "sm",
7217
7387
  className: "h-8 shrink-0 justify-start gap-1.5 rounded-md hover:bg-accent/60 hover:text-foreground transition-all duration-200",
7218
- onClick: a,
7219
- "aria-label": s("common.back"),
7220
- title: s("common.back"),
7221
- children: [/* @__PURE__ */ W(Os, { className: "h-4 w-4 text-muted-foreground hover:text-foreground transition-colors shrink-0" }), /* @__PURE__ */ W("span", {
7388
+ onClick: s,
7389
+ "aria-label": l("common.back"),
7390
+ title: l("common.back"),
7391
+ children: [/* @__PURE__ */ U(js, { className: "h-4 w-4 text-muted-foreground hover:text-foreground transition-colors shrink-0" }), /* @__PURE__ */ U("span", {
7222
7392
  className: "text-xs font-medium truncate",
7223
- children: s("common.back")
7393
+ children: l("common.back")
7224
7394
  })]
7225
- }) : /* @__PURE__ */ W("span", {
7395
+ }) : /* @__PURE__ */ U("span", {
7226
7396
  className: "flex-1 min-w-0",
7227
7397
  "aria-hidden": !0
7228
- }), o ? /* @__PURE__ */ G(f, {
7398
+ }), c ? /* @__PURE__ */ W(i, {
7229
7399
  variant: "ghost",
7230
7400
  size: "sm",
7231
7401
  className: "h-8 shrink-0 justify-end gap-1.5 rounded-md hover:bg-accent/60 hover:text-foreground transition-all duration-200",
7232
- onClick: o,
7233
- "aria-label": s("navbar.export", "Export"),
7234
- title: s("navbar.export", "Export"),
7235
- children: [/* @__PURE__ */ W(ee, { className: "h-4 w-4 text-muted-foreground hover:text-foreground transition-colors shrink-0" }), /* @__PURE__ */ W("span", {
7402
+ onClick: c,
7403
+ "aria-label": l("navbar.export", "Export"),
7404
+ title: l("navbar.export", "Export"),
7405
+ children: [/* @__PURE__ */ U(e, { className: "h-4 w-4 text-muted-foreground hover:text-foreground transition-colors shrink-0" }), /* @__PURE__ */ U("span", {
7236
7406
  className: "text-xs font-medium truncate",
7237
- children: s("navbar.export", "Export")
7407
+ children: l("navbar.export", "Export")
7238
7408
  })]
7239
- }) : /* @__PURE__ */ W("span", {
7409
+ }) : /* @__PURE__ */ U("span", {
7240
7410
  className: "flex-1 min-w-0",
7241
7411
  "aria-hidden": !0
7242
7412
  })]
7243
- }) : null, T = x ? /* @__PURE__ */ W(ql, {
7244
- title: s("common.error"),
7245
- message: s("errors.loadFailed"),
7246
- errorDetail: x.message,
7247
- onRetry: C
7248
- }) : /* @__PURE__ */ W("div", {
7413
+ }) : null, D = S ? /* @__PURE__ */ U($l, {
7414
+ title: l("common.error"),
7415
+ message: l("errors.loadFailed"),
7416
+ errorDetail: S.message,
7417
+ onRetry: w
7418
+ }) : /* @__PURE__ */ U("div", {
7249
7419
  className: "w-full h-full flex items-center justify-center text-muted-foreground",
7250
7420
  role: "status",
7251
7421
  "aria-live": "polite",
7252
- children: /* @__PURE__ */ G("div", {
7422
+ children: /* @__PURE__ */ W("div", {
7253
7423
  className: "flex items-center gap-3",
7254
- children: [/* @__PURE__ */ W("div", {
7424
+ children: [/* @__PURE__ */ U("div", {
7255
7425
  className: "h-5 w-5 border-2 border-primary border-t-transparent rounded-full animate-spin motion-reduce:animate-none",
7256
7426
  "aria-hidden": !0
7257
- }), /* @__PURE__ */ W("span", {
7427
+ }), /* @__PURE__ */ U("span", {
7258
7428
  className: "text-sm",
7259
- children: s(v || u ? "common.initializing" : "common.loading")
7429
+ children: l(y || f ? "common.initializing" : "common.loading")
7260
7430
  })]
7261
7431
  })
7262
7432
  });
7263
- return /* @__PURE__ */ W(Yl, {
7264
- showSidebar: t,
7265
- showPlaybackBar: n,
7433
+ return /* @__PURE__ */ U(tu, {
7434
+ showSidebar: n,
7435
+ showPlaybackBar: r,
7266
7436
  showToaster: !1,
7267
- sidebar: /* @__PURE__ */ W(Rl, {}),
7268
- sidebarHeader: w,
7269
- emptyState: T,
7270
- onRetry: C
7437
+ sidebar: /* @__PURE__ */ U(Wl, {}),
7438
+ sidebarHeader: E,
7439
+ emptyState: D,
7440
+ onRetry: w
7271
7441
  });
7272
7442
  }
7273
- var Zl = ({ dataSource: e, theme: t, language: n, showSidebar: r = !0, showPlaybackBar: i = !0, className: a, onFatalError: o, enableKeyboardShortcuts: s = !0, onBack: c, onExport: l }) => /* @__PURE__ */ W(Dl, {
7443
+ var ru = ({ dataSource: e, theme: t, language: n, showSidebar: r = !0, showPlaybackBar: i = !0, className: a, onFatalError: o, enableKeyboardShortcuts: s = !0, onBack: c, onExport: l }) => /* @__PURE__ */ U(Nl, {
7274
7444
  theme: t,
7275
7445
  language: n,
7276
7446
  className: a,
7277
7447
  showToaster: !0,
7278
- children: /* @__PURE__ */ W(Xl, {
7448
+ children: /* @__PURE__ */ U(nu, {
7279
7449
  dataSource: e,
7280
7450
  showSidebar: r,
7281
7451
  showPlaybackBar: i,
@@ -7287,11 +7457,14 @@ var Zl = ({ dataSource: e, theme: t, language: n, showSidebar: r = !0, showPlayb
7287
7457
  });
7288
7458
  //#endregion
7289
7459
  //#region src/react/public-api.ts
7290
- function Ql(e) {
7460
+ function iu(e) {
7291
7461
  return _s(e);
7292
7462
  }
7293
- function $l(e) {
7463
+ function au(e) {
7294
7464
  return gs(e);
7295
7465
  }
7466
+ function ou(e) {
7467
+ return new bs(e);
7468
+ }
7296
7469
  //#endregion
7297
- export { Zl as LeRobotViewer, Ql as createArchiveDataSourceFromFile, $l as createArchiveDataSourceFromUrl };
7470
+ export { ru as LeRobotViewer, iu as createArchiveDataSourceFromFile, au as createArchiveDataSourceFromUrl, ou as createRemoteManifestDataSource };