l-min-components 1.8.342 → 1.8.344

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,5 +1,5 @@
1
1
  import J, { useEffect as r1, useState as P, useCallback as m, useMemo as G1, useRef as $ } from "react";
2
- import { j as g, a as t, i as Z } from "./axiosConfig-a2dc7c1f.js";
2
+ import { j as g, a as t, i as y } from "./axiosConfig-a2dc7c1f.js";
3
3
  if (typeof z1 > "u")
4
4
  var z1 = window;
5
5
  var A1 = {
@@ -42,7 +42,7 @@ function G(e) {
42
42
  }
43
43
  function q1(e) {
44
44
  var i = function(n) {
45
- var r = e.attr, h = e.size, a = e.title, f = W1(e, ["attr", "size", "title"]), w = h || n.size || "1em", v;
45
+ var r = e.attr, h = e.size, a = e.title, f = W1(e, ["attr", "size", "title"]), u = h || n.size || "1em", v;
46
46
  return n.className && (v = n.className), e.className && (v = (v ? v + " " : "") + e.className), J.createElement("svg", W({
47
47
  stroke: "currentColor",
48
48
  fill: "currentColor",
@@ -52,8 +52,8 @@ function q1(e) {
52
52
  style: W(W({
53
53
  color: e.color || n.color
54
54
  }, n.style), e.style),
55
- height: w,
56
- width: w,
55
+ height: u,
56
+ width: u,
57
57
  xmlns: "http://www.w3.org/2000/svg"
58
58
  }), a && J.createElement("title", null, a), e.children);
59
59
  };
@@ -375,67 +375,77 @@ const g1 = window.location.hostname.includes("staging") || window.location.hostn
375
375
  r1(() => {
376
376
  i && r(i);
377
377
  }, [i]);
378
- const [n, r] = P(i ?? "en"), [h, a] = P({}), [f, w] = P(!0), v = m(
379
- (y, x = {}) => i6(h[y] || y, x),
378
+ const [n, r] = P(i ?? "en"), [h, a] = P({}), [f, u] = P(!0), v = m(
379
+ (Z, A = {}) => i6(h[Z] || Z, A),
380
380
  [h]
381
381
  ), T = async () => {
382
- const y = Date.now(), x = window.translationCache.master;
383
- if (x && x.data && x.expires > y)
384
- return x.data;
382
+ const Z = Date.now(), A = window.translationCache.master;
383
+ if (A && A.data && A.expires > Z)
384
+ return A.data;
385
385
  try {
386
- const A = await fetch(
387
- `${e6}${window.location.hostname.includes("staging") ? `${n == null ? void 0 : n.toUpperCase()}/qFpINMa05DrgUgzO0PEboReejximpq2r3VL2AmFZAwIq6fTN3A.json` : `${n == null ? void 0 : n.toUpperCase()}/qFpINMa05DrgUgzO0PEboReejximpq2r3VL2AmFZAwIq6fTN3A.json`}`
386
+ const x = await fetch(
387
+ `${e6}${window.location.hostname.includes("staging") || window.location.hostname.includes("localhost") ? `${n == null ? void 0 : n.toUpperCase()}/qFpINMa05DrgUgzO0PEboReejximpq2r3VL2AmFZAwIq6fTN3A.json` : `${n == null ? void 0 : n.toUpperCase()}/qFpINMa05DrgUgzO0PEboReejximpq2r3VL2AmFZAwIq6fTN3A.json`}`
388
388
  );
389
- if (!A.ok)
390
- throw new Error(`Failed to fetch translations: ${A.status}`);
391
- const M = await A.json();
392
- return console.log(M, "MASTER"), window.translationCache.master = {
393
- data: M,
394
- timestamp: y,
395
- expires: y + t6
396
- }, M;
397
- } catch (A) {
398
- if (console.error("Failed to fetch master translations:", A), x && x.data)
399
- return x.data;
400
- throw A;
389
+ if (!x.ok)
390
+ throw new Error(`Failed to fetch translations: ${x.status}`);
391
+ const k = await x.json();
392
+ return console.log(k, "MASTER"), window.translationCache.master = {
393
+ data: k,
394
+ timestamp: Z,
395
+ expires: Z + t6
396
+ }, k;
397
+ } catch (x) {
398
+ if (console.error("Failed to fetch master translations:", x), A && A.data)
399
+ return A.data;
400
+ throw x;
401
401
  }
402
- }, j = (y, x, A) => {
403
- const M = {}, I = A.toUpperCase();
404
- return x.forEach((S) => {
405
- if (y[S] && y[S][I]) {
406
- const F = y[S][I];
407
- M[S] = F.trim() || S;
402
+ }, j = (Z, A, x) => {
403
+ const k = {}, I = x.toUpperCase();
404
+ return A.forEach((S) => {
405
+ if (Z[S] && Z[S][I]) {
406
+ const F = Z[S][I];
407
+ k[S] = F.trim() || S;
408
408
  } else
409
- M[S] = S;
410
- }), M;
411
- }, K = async (y, x) => {
412
- if (!x || x.length === 0) {
413
- w(!1);
409
+ k[S] = S;
410
+ }), k;
411
+ }, K = async (Z, A) => {
412
+ if (!A || A.length === 0) {
413
+ u(!1);
414
+ return;
415
+ }
416
+ if ((Z == null ? void 0 : Z.toLowerCase()) === "en") {
417
+ const x = {};
418
+ A.forEach((k) => {
419
+ x[k] = k;
420
+ }), a((k) => ({
421
+ ...k,
422
+ ...x
423
+ })), u(!1);
414
424
  return;
415
425
  }
416
426
  try {
417
- const A = await T(), M = j(
418
- A,
427
+ const x = await T(), k = j(
419
428
  x,
420
- y
429
+ A,
430
+ Z
421
431
  );
422
432
  a((I) => ({
423
433
  ...I,
424
- ...M
425
- })), w(!1);
426
- } catch (A) {
427
- console.error("Failed to load translations:", A);
428
- const M = {};
429
- x.forEach((I) => {
430
- M[I] = I;
434
+ ...k
435
+ })), u(!1);
436
+ } catch (x) {
437
+ console.error("Failed to load translations:", x);
438
+ const k = {};
439
+ A.forEach((I) => {
440
+ k[I] = I;
431
441
  }), a((I) => ({
432
442
  ...I,
433
- ...M
434
- })), w(!1);
443
+ ...k
444
+ })), u(!1);
435
445
  }
436
446
  };
437
447
  return r1(() => {
438
- e && e.length > 0 ? K(n, e) : w(!1);
448
+ e && e.length > 0 ? K(n, e) : u(!1);
439
449
  }, [n]), {
440
450
  defaultLang: n,
441
451
  setDefaultLang: r,
@@ -443,7 +453,7 @@ const g1 = window.location.hostname.includes("staging") || window.location.hostn
443
453
  translations: h,
444
454
  findText: v,
445
455
  isTranslationsLoading: f,
446
- setIsTranslationsLoading: w
456
+ setIsTranslationsLoading: u
447
457
  };
448
458
  };
449
459
  function i6(e, i) {
@@ -453,13 +463,13 @@ const d7 = n6;
453
463
  function C7(e) {
454
464
  return G({ tag: "svg", attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M143 352.3L7 216.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.2 9.4-24.4 9.4-33.8 0z" } }] })(e);
455
465
  }
456
- function u7(e) {
466
+ function w7(e) {
457
467
  return G({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z" } }] })(e);
458
468
  }
459
469
  function o6(e) {
460
470
  return G({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z" } }] })(e);
461
471
  }
462
- function w7(e) {
472
+ function u7(e) {
463
473
  return G({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z" } }] })(e);
464
474
  }
465
475
  function f7(e) {
@@ -1072,7 +1082,7 @@ const l6 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAAvCAYAAABzJ5OsAA
1072
1082
  )
1073
1083
  ]
1074
1084
  }
1075
- ), u6 = ({ width: e, height: i, fill: n }) => /* @__PURE__ */ t(
1085
+ ), w6 = ({ width: e, height: i, fill: n }) => /* @__PURE__ */ t(
1076
1086
  "svg",
1077
1087
  {
1078
1088
  xmlns: "http://www.w3.org/2000/svg",
@@ -1090,7 +1100,7 @@ const l6 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAAvCAYAAABzJ5OsAA
1090
1100
  }
1091
1101
  )
1092
1102
  }
1093
- ), w6 = ({ width: e, height: i, fill: n }) => /* @__PURE__ */ t(
1103
+ ), u6 = ({ width: e, height: i, fill: n }) => /* @__PURE__ */ t(
1094
1104
  "svg",
1095
1105
  {
1096
1106
  xmlns: "http://www.w3.org/2000/svg",
@@ -1564,8 +1574,8 @@ const l6 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAAvCAYAAABzJ5OsAA
1564
1574
  },
1565
1575
  {
1566
1576
  path: "/personal/addons",
1567
- icon: /* @__PURE__ */ t(u6, {}),
1568
- iconActive: /* @__PURE__ */ t(w6, {}),
1577
+ icon: /* @__PURE__ */ t(w6, {}),
1578
+ iconActive: /* @__PURE__ */ t(u6, {}),
1569
1579
  text: "Add on",
1570
1580
  disabled: !0
1571
1581
  }
@@ -1607,13 +1617,13 @@ function C1(e, i = 500) {
1607
1617
  return () => clearInterval(h);
1608
1618
  }, [e, i, n]), n;
1609
1619
  }
1610
- const L6 = 5 * 1024 * 1024, u1 = (e) => {
1620
+ const L6 = 5 * 1024 * 1024, w1 = (e) => {
1611
1621
  if (!e)
1612
1622
  return "";
1613
1623
  const i = String(e).toLowerCase();
1614
1624
  return i.startsWith("instructor") ? "instructor" : i === "enterprise" ? "enterprise" : i === "personal" || i === "student" ? "personal" : i;
1615
1625
  }, m6 = (e, i) => {
1616
- const n = u1(e);
1626
+ const n = w1(e);
1617
1627
  return n === "instructor" ? i ? `/instructor/${i}/files/` : "/instructor/files/" : n === "enterprise" ? "/enterprise/files/" : "/files/";
1618
1628
  }, k6 = (e = "") => e.startsWith("/") ? e.slice(1) : e, U = (e = {}, i) => i ? {
1619
1629
  ...e,
@@ -1647,11 +1657,11 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
1647
1657
  const a = r.part_number ?? h + 1, f = (a - 1) * n;
1648
1658
  if (f >= e.size)
1649
1659
  throw new Error("partSize does not match file size for uploadUrls.");
1650
- const w = Math.min(f + n, e.size);
1660
+ const u = Math.min(f + n, e.size);
1651
1661
  return {
1652
1662
  partNumber: a,
1653
1663
  url: r.url,
1654
- body: e.slice(f, w)
1664
+ body: e.slice(f, u)
1655
1665
  };
1656
1666
  });
1657
1667
  }, V6 = async ({
@@ -1662,25 +1672,25 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
1662
1672
  parts: h
1663
1673
  }) => {
1664
1674
  const a = h || M6({ file: e, uploadUrls: i, partSize: n }), f = [];
1665
- for (const w of a) {
1675
+ for (const u of a) {
1666
1676
  const { etag: v } = await j1({
1667
- url: w.url,
1668
- file: w.body,
1677
+ url: u.url,
1678
+ file: u.body,
1669
1679
  headers: r,
1670
1680
  method: "PUT"
1671
1681
  });
1672
1682
  v || console.warn(
1673
- `Part ${w.partNumber}: ETag header not exposed. CORS should include 'ETag' in Access-Control-Expose-Headers.`
1683
+ `Part ${u.partNumber}: ETag header not exposed. CORS should include 'ETag' in Access-Control-Expose-Headers.`
1674
1684
  ), f.push({
1675
1685
  ETag: v,
1676
- PartNumber: w.partNumber
1686
+ PartNumber: u.partNumber
1677
1687
  });
1678
1688
  }
1679
1689
  return f;
1680
1690
  }, H6 = (e = {}) => {
1681
1691
  const i = C1("defaultAccountType"), n = C1("defaultAccountID"), r = C1("affiliateAccount"), h = G1(
1682
1692
  () => ({
1683
- accountType: u1(
1693
+ accountType: w1(
1684
1694
  e.accountType || i
1685
1695
  ),
1686
1696
  accountId: e.accountId || n,
@@ -1697,7 +1707,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
1697
1707
  ]
1698
1708
  ), a = m(
1699
1709
  (c = {}) => ({
1700
- accountType: u1(
1710
+ accountType: w1(
1701
1711
  c.accountType || h.accountType
1702
1712
  ),
1703
1713
  accountId: c.accountId || h.accountId,
@@ -1713,7 +1723,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
1713
1723
  )}`;
1714
1724
  },
1715
1725
  [a]
1716
- ), w = m(
1726
+ ), u = m(
1717
1727
  (c, C) => `${f(C)}${c}/`,
1718
1728
  [f]
1719
1729
  ), v = m(
@@ -1727,86 +1737,86 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
1727
1737
  [f]
1728
1738
  ), K = m(
1729
1739
  async (c, { context: C, config: d } = {}) => {
1730
- const u = a(C), p = f(u);
1731
- return Z.post(p, c, U(d, u.accountId));
1740
+ const w = a(C), p = f(w);
1741
+ return y.post(p, c, U(d, w.accountId));
1732
1742
  },
1733
1743
  [f, a]
1734
- ), y = m(
1744
+ ), Z = m(
1735
1745
  async ({ params: c, context: C, config: d } = {}) => {
1736
- const u = a(C), p = f(u), k = {
1746
+ const w = a(C), p = f(w), M = {
1737
1747
  ...d || {},
1738
1748
  params: {
1739
1749
  ...c || {},
1740
1750
  ...(d == null ? void 0 : d.params) || {}
1741
1751
  }
1742
1752
  };
1743
- return Z.get(p, U(k, u.accountId));
1753
+ return y.get(p, U(M, w.accountId));
1744
1754
  },
1745
1755
  [f, a]
1746
- ), x = m(
1756
+ ), A = m(
1747
1757
  async (c, { context: C, config: d } = {}) => {
1748
- const u = a(C);
1749
- return Z.get(
1750
- w(c, u),
1751
- U(d, u.accountId)
1758
+ const w = a(C);
1759
+ return y.get(
1760
+ u(c, w),
1761
+ U(d, w.accountId)
1752
1762
  );
1753
1763
  },
1754
- [w, a]
1755
- ), A = m(
1756
- async (c, C, { context: d, config: u } = {}) => {
1764
+ [u, a]
1765
+ ), x = m(
1766
+ async (c, C, { context: d, config: w } = {}) => {
1757
1767
  const p = a(d);
1758
- return Z.patch(
1759
- w(c, p),
1768
+ return y.patch(
1769
+ u(c, p),
1760
1770
  C,
1761
- U(u, p.accountId)
1771
+ U(w, p.accountId)
1762
1772
  );
1763
1773
  },
1764
- [w, a]
1765
- ), M = m(
1774
+ [u, a]
1775
+ ), k = m(
1766
1776
  async (c, { context: C, config: d } = {}) => {
1767
- const u = a(C);
1768
- return Z.delete(
1769
- w(c, u),
1770
- U(d, u.accountId)
1777
+ const w = a(C);
1778
+ return y.delete(
1779
+ u(c, w),
1780
+ U(d, w.accountId)
1771
1781
  );
1772
1782
  },
1773
- [w, a]
1783
+ [u, a]
1774
1784
  ), I = m(
1775
- async (c, C, { context: d, config: u } = {}) => {
1776
- const p = a(d), k = `${w(c, p)}presign_upload_urls/`;
1777
- return Z.post(k, C, U(u, p.accountId));
1785
+ async (c, C, { context: d, config: w } = {}) => {
1786
+ const p = a(d), M = `${u(c, p)}presign_upload_urls/`;
1787
+ return y.post(M, C, U(w, p.accountId));
1778
1788
  },
1779
- [w, a]
1789
+ [u, a]
1780
1790
  ), S = m(
1781
- async (c, C, { context: d, config: u } = {}) => {
1782
- const p = a(d), k = `${w(c, p)}confirm_upload/`;
1783
- return Z.post(k, C, U(u, p.accountId));
1791
+ async (c, C, { context: d, config: w } = {}) => {
1792
+ const p = a(d), M = `${u(c, p)}confirm_upload/`;
1793
+ return y.post(M, C, U(w, p.accountId));
1784
1794
  },
1785
- [w, a]
1795
+ [u, a]
1786
1796
  ), F = m(
1787
1797
  async (c, { context: C, config: d } = {}) => {
1788
- const u = a(C);
1789
- return Z.get(
1790
- v(c, u),
1791
- U(d, u.accountId)
1798
+ const w = a(C);
1799
+ return y.get(
1800
+ v(c, w),
1801
+ U(d, w.accountId)
1792
1802
  );
1793
1803
  },
1794
1804
  [v, a]
1795
1805
  ), s1 = m(
1796
1806
  async (c, { context: C, config: d } = {}) => {
1797
- const u = a(C);
1798
- return Z.get(
1799
- j(c, u),
1800
- U(d, u.accountId)
1807
+ const w = a(C);
1808
+ return y.get(
1809
+ j(c, w),
1810
+ U(d, w.accountId)
1801
1811
  );
1802
1812
  },
1803
1813
  [j, a]
1804
1814
  ), q = m(
1805
- async (c, C, { context: d, config: u } = {}) => {
1815
+ async (c, C, { context: d, config: w } = {}) => {
1806
1816
  const p = a(d);
1807
- return Z.get(
1817
+ return y.get(
1808
1818
  T(c, C, p),
1809
- U(u, p.accountId)
1819
+ U(w, p.accountId)
1810
1820
  );
1811
1821
  },
1812
1822
  [T, a]
@@ -1814,8 +1824,8 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
1814
1824
  async (c, { context: C, preferHls: d } = {}) => {
1815
1825
  if (!c)
1816
1826
  return null;
1817
- const u = a(C), p = v(c, u), k = {
1818
- ...U({}, u.accountId),
1827
+ const w = a(C), p = v(c, w), M = {
1828
+ ...U({}, w.accountId),
1819
1829
  maxRedirects: 5
1820
1830
  };
1821
1831
  let V = null;
@@ -1824,18 +1834,18 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
1824
1834
  return ((N = o == null ? void 0 : o.request) == null ? void 0 : N.responseURL) || ((R = l == null ? void 0 : l.request) == null ? void 0 : R.responseURL) || ((D = o == null ? void 0 : o.headers) == null ? void 0 : D.location) || ((X = (z = l == null ? void 0 : l.response) == null ? void 0 : z.headers) == null ? void 0 : X.location) || null;
1825
1835
  };
1826
1836
  if (d) {
1827
- const o = T(c, "index.m3u8", u);
1837
+ const o = T(c, "index.m3u8", w);
1828
1838
  try {
1829
- return await Z.get(o, k), `${Z.defaults.baseURL || ""}${o}`;
1839
+ return await y.get(o, M), `${y.defaults.baseURL || ""}${o}`;
1830
1840
  } catch (l) {
1831
1841
  V = l;
1832
1842
  }
1833
1843
  }
1834
1844
  try {
1835
- const o = await Z.get(p, {
1836
- ...k,
1845
+ const o = await y.get(p, {
1846
+ ...M,
1837
1847
  headers: {
1838
- ...k.headers || {},
1848
+ ...M.headers || {},
1839
1849
  Range: "bytes=0-0"
1840
1850
  }
1841
1851
  }), l = s(o);
@@ -1848,7 +1858,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
1848
1858
  return l;
1849
1859
  }
1850
1860
  try {
1851
- const o = await Z.get(p, k), l = s(o);
1861
+ const o = await y.get(p, M), l = s(o);
1852
1862
  if (l)
1853
1863
  return l;
1854
1864
  } catch (o) {
@@ -1864,17 +1874,17 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
1864
1874
  async (c, { context: C } = {}) => {
1865
1875
  if (!c)
1866
1876
  return null;
1867
- const d = a(C), u = j(c, d), p = {
1877
+ const d = a(C), w = j(c, d), p = {
1868
1878
  ...U({}, d.accountId),
1869
1879
  maxRedirects: 5
1870
1880
  };
1871
- let k = null;
1881
+ let M = null;
1872
1882
  const V = (s, o) => {
1873
1883
  var l, N, R, D, z;
1874
1884
  return ((l = s == null ? void 0 : s.request) == null ? void 0 : l.responseURL) || ((N = o == null ? void 0 : o.request) == null ? void 0 : N.responseURL) || ((R = s == null ? void 0 : s.headers) == null ? void 0 : R.location) || ((z = (D = o == null ? void 0 : o.response) == null ? void 0 : D.headers) == null ? void 0 : z.location) || null;
1875
1885
  };
1876
1886
  try {
1877
- const s = await Z.get(u, {
1887
+ const s = await y.get(w, {
1878
1888
  ...p,
1879
1889
  headers: {
1880
1890
  ...p.headers || {},
@@ -1884,65 +1894,65 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
1884
1894
  if (o)
1885
1895
  return o;
1886
1896
  } catch (s) {
1887
- k = s;
1897
+ M = s;
1888
1898
  const o = V(null, s);
1889
1899
  if (o)
1890
1900
  return o;
1891
1901
  }
1892
1902
  try {
1893
- const s = await Z.get(u, p), o = V(s);
1903
+ const s = await y.get(w, p), o = V(s);
1894
1904
  if (o)
1895
1905
  return o;
1896
1906
  } catch (s) {
1897
- k = s;
1907
+ M = s;
1898
1908
  const o = V(null, s);
1899
1909
  if (o)
1900
1910
  return o;
1901
1911
  }
1902
- return k && console.error("Failed to resolve download URL:", k), null;
1912
+ return M && console.error("Failed to resolve download URL:", M), null;
1903
1913
  },
1904
1914
  [j, a]
1905
- ), O = m(
1915
+ ), E = m(
1906
1916
  (c, C) => {
1907
- const d = a(C), u = v(c, d);
1908
- return `${Z.defaults.baseURL || ""}${u}`;
1917
+ const d = a(C), w = v(c, d);
1918
+ return `${y.defaults.baseURL || ""}${w}`;
1909
1919
  },
1910
1920
  [v, a]
1911
1921
  ), b = m(
1912
1922
  (c, C) => {
1913
- const d = a(C), u = j(c, d);
1914
- return `${Z.defaults.baseURL || ""}${u}`;
1923
+ const d = a(C), w = j(c, d);
1924
+ return `${y.defaults.baseURL || ""}${w}`;
1915
1925
  },
1916
1926
  [j, a]
1917
- ), E = m(
1927
+ ), O = m(
1918
1928
  async ({ category: c, context: C, config: d } = {}) => {
1919
- const u = a(C), p = `${f(u)}download-all-deletable-files/`, k = {
1929
+ const w = a(C), p = `${f(w)}download-all-deletable-files/`, M = {
1920
1930
  ...d || {},
1921
1931
  params: {
1922
1932
  ...c ? { category: c } : {},
1923
1933
  ...(d == null ? void 0 : d.params) || {}
1924
1934
  }
1925
1935
  };
1926
- return Z.get(p, U(k, u.accountId));
1936
+ return y.get(p, U(M, w.accountId));
1927
1937
  },
1928
1938
  [f, a]
1929
1939
  ), L = m(
1930
1940
  async (c, { context: C, config: d } = {}) => {
1931
1941
  if (!c || !Array.isArray(c) || c.length === 0)
1932
1942
  throw new Error("downloadFiles requires a non-empty array of file IDs.");
1933
- const u = a(C), p = `${f(u)}download-files/`;
1934
- return Z.post(p, { ids: c }, U(d, u.accountId));
1943
+ const w = a(C), p = `${f(w)}download-files/`;
1944
+ return y.post(p, { ids: c }, U(d, w.accountId));
1935
1945
  },
1936
1946
  [f, a]
1937
1947
  ), H = m((c, C) => {
1938
1948
  const d = document.createElement("a");
1939
1949
  d.href = c, C && (d.download = C), d.target = "_blank", document.body.appendChild(d), d.click(), document.body.removeChild(d);
1940
1950
  }, []), Q = m(
1941
- async (c, { filenames: C = {}, context: d, config: u } = {}) => {
1942
- var k;
1951
+ async (c, { filenames: C = {}, context: d, config: w } = {}) => {
1952
+ var M;
1943
1953
  const p = { success: [], failed: [] };
1944
1954
  try {
1945
- const V = await L(c, { context: d, config: u }), s = ((k = V == null ? void 0 : V.data) == null ? void 0 : k.results) || [];
1955
+ const V = await L(c, { context: d, config: w }), s = ((M = V == null ? void 0 : V.data) == null ? void 0 : M.results) || [];
1946
1956
  for (const l of s)
1947
1957
  try {
1948
1958
  H(l.url, C[l.id]), p.success.push(l.id);
@@ -1959,11 +1969,11 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
1959
1969
  },
1960
1970
  [L, H]
1961
1971
  ), _ = m(
1962
- async ({ category: c, filenames: C = {}, context: d, config: u } = {}) => {
1963
- var k;
1972
+ async ({ category: c, filenames: C = {}, context: d, config: w } = {}) => {
1973
+ var M;
1964
1974
  const p = { success: [], failed: [] };
1965
1975
  try {
1966
- const V = await E({ category: c, context: d, config: u }), s = ((k = V == null ? void 0 : V.data) == null ? void 0 : k.results) || [];
1976
+ const V = await O({ category: c, context: d, config: w }), s = ((M = V == null ? void 0 : V.data) == null ? void 0 : M.results) || [];
1967
1977
  for (const o of s)
1968
1978
  try {
1969
1979
  H(o.url, C[o.id]), p.success.push(o.id);
@@ -1975,25 +1985,25 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
1975
1985
  }
1976
1986
  return p;
1977
1987
  },
1978
- [E, H]
1988
+ [O, H]
1979
1989
  );
1980
1990
  return {
1981
1991
  // Context
1982
1992
  context: h,
1983
1993
  // URL builders
1984
1994
  getBasePath: f,
1985
- buildFileUrl: w,
1995
+ buildFileUrl: u,
1986
1996
  buildStreamUrl: v,
1987
1997
  buildStreamPathUrl: T,
1988
1998
  buildDownloadUrl: j,
1989
- buildStreamUrlWithAccount: O,
1999
+ buildStreamUrlWithAccount: E,
1990
2000
  buildDownloadUrlWithAccount: b,
1991
2001
  // CRUD operations
1992
2002
  createFiles: K,
1993
- listFiles: y,
1994
- getFile: x,
1995
- updateFile: A,
1996
- deleteFile: M,
2003
+ listFiles: Z,
2004
+ getFile: A,
2005
+ updateFile: x,
2006
+ deleteFile: k,
1997
2007
  // Upload operations
1998
2008
  presignUploadUrls: I,
1999
2009
  confirmUpload: S,
@@ -2006,13 +2016,13 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
2006
2016
  resolvePresignedUrl: B,
2007
2017
  resolveDownloadUrl: Y,
2008
2018
  // V2 Bulk download operations
2009
- downloadAllDeletableFiles: E,
2019
+ downloadAllDeletableFiles: O,
2010
2020
  downloadFiles: L,
2011
2021
  bulkDownloadFiles: Q,
2012
2022
  bulkDownloadDeletableFiles: _,
2013
2023
  triggerBrowserDownload: H
2014
2024
  };
2015
- }, k7 = H6, w1 = ({ width: e, height: i, fill: n }) => /* @__PURE__ */ g(
2025
+ }, k7 = H6, u1 = ({ width: e, height: i, fill: n }) => /* @__PURE__ */ g(
2016
2026
  "svg",
2017
2027
  {
2018
2028
  xmlns: "http://www.w3.org/2000/svg",
@@ -2602,7 +2612,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
2602
2612
  }
2603
2613
  )
2604
2614
  }
2605
- ), O6 = () => /* @__PURE__ */ g(
2615
+ ), E6 = () => /* @__PURE__ */ g(
2606
2616
  "svg",
2607
2617
  {
2608
2618
  width: "24",
@@ -2629,7 +2639,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
2629
2639
  ) }) })
2630
2640
  ]
2631
2641
  }
2632
- ), E6 = () => /* @__PURE__ */ g(
2642
+ ), O6 = () => /* @__PURE__ */ g(
2633
2643
  "svg",
2634
2644
  {
2635
2645
  width: "24",
@@ -3112,7 +3122,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
3112
3122
  }
3113
3123
  )
3114
3124
  }
3115
- ), O1 = {
3125
+ ), E1 = {
3116
3126
  path: null,
3117
3127
  icon: /* @__PURE__ */ t(Q6, {}),
3118
3128
  iconActive: /* @__PURE__ */ t($6, {}),
@@ -3153,7 +3163,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
3153
3163
  routes: [
3154
3164
  {
3155
3165
  path: "/dashboard",
3156
- icon: /* @__PURE__ */ t(w1, {}),
3166
+ icon: /* @__PURE__ */ t(u1, {}),
3157
3167
  iconActive: /* @__PURE__ */ t(f1, {}),
3158
3168
  text: "Dashboard",
3159
3169
  hasNotification: !1,
@@ -3214,7 +3224,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
3214
3224
  optionType: null,
3215
3225
  routes: [
3216
3226
  {
3217
- ...O1,
3227
+ ...E1,
3218
3228
  dropdownItems: [
3219
3229
  {
3220
3230
  path: "/admins",
@@ -3247,7 +3257,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
3247
3257
  routes: [
3248
3258
  {
3249
3259
  path: "/dashboard",
3250
- icon: /* @__PURE__ */ t(w1, {}),
3260
+ icon: /* @__PURE__ */ t(u1, {}),
3251
3261
  iconActive: /* @__PURE__ */ t(f1, {}),
3252
3262
  text: "Dashboard",
3253
3263
  hasNotification: !1,
@@ -3370,7 +3380,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
3370
3380
  },
3371
3381
  {
3372
3382
  optionType: null,
3373
- routes: [O1]
3383
+ routes: [E1]
3374
3384
  }
3375
3385
  ], H7 = [
3376
3386
  {
@@ -3378,7 +3388,7 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
3378
3388
  routes: [
3379
3389
  {
3380
3390
  path: "/dashboard",
3381
- icon: /* @__PURE__ */ t(w1, {}),
3391
+ icon: /* @__PURE__ */ t(u1, {}),
3382
3392
  iconActive: /* @__PURE__ */ t(f1, {}),
3383
3393
  text: "Dashboard",
3384
3394
  hasNotification: !1,
@@ -3481,8 +3491,8 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
3481
3491
  },
3482
3492
  {
3483
3493
  path: "/security",
3484
- icon: /* @__PURE__ */ t(O6, {}),
3485
- iconActive: /* @__PURE__ */ t(E6, {}),
3494
+ icon: /* @__PURE__ */ t(E6, {}),
3495
+ iconActive: /* @__PURE__ */ t(O6, {}),
3486
3496
  text: "Security",
3487
3497
  hasNotification: !1,
3488
3498
  hasDropdown: !1
@@ -3572,19 +3582,19 @@ const L6 = 5 * 1024 * 1024, u1 = (e) => {
3572
3582
  o1[4]
3573
3583
  ], Z7 = [o1[4]];
3574
3584
  function r7(e, i = {}) {
3575
- const n = e.numberOfChannels, r = e.sampleRate, h = 1, a = 16, f = n === 2 ? l7(e.getChannelData(0), e.getChannelData(1)) : e.getChannelData(0), w = s7(
3585
+ const n = e.numberOfChannels, r = e.sampleRate, h = 1, a = 16, f = n === 2 ? l7(e.getChannelData(0), e.getChannelData(1)) : e.getChannelData(0), u = s7(
3576
3586
  f,
3577
3587
  h,
3578
3588
  r,
3579
3589
  n,
3580
3590
  a
3581
3591
  );
3582
- return new Blob([w], {
3592
+ return new Blob([u], {
3583
3593
  type: "audio/wav"
3584
3594
  });
3585
3595
  }
3586
3596
  function s7(e, i, n, r, h) {
3587
- const a = h / 8, f = r * a, w = new ArrayBuffer(44 + e.length * a), v = new DataView(w);
3597
+ const a = h / 8, f = r * a, u = new ArrayBuffer(44 + e.length * a), v = new DataView(u);
3588
3598
  return i1(v, 0, "RIFF"), v.setUint32(4, 36 + e.length * a, !0), i1(v, 8, "WAVE"), i1(v, 12, "fmt "), v.setUint32(16, 16, !0), v.setUint16(20, i, !0), v.setUint16(22, r, !0), v.setUint32(24, n, !0), v.setUint32(28, n * f, !0), v.setUint16(32, f, !0), v.setUint16(34, h, !0), i1(v, 36, "data"), v.setUint32(40, e.length * a, !0), a7(v, 44, e), v;
3589
3599
  }
3590
3600
  function a7(e, i, n) {
@@ -3612,7 +3622,7 @@ function A7(e) {
3612
3622
  onError: h,
3613
3623
  onStreamReady: a,
3614
3624
  config: f
3615
- } = e || {}, [w, v] = P("idle"), [T, j] = P(0), [K, y] = P([]), [x, A] = P(null), [M, I] = P(""), [S, F] = P(null), [s1, q] = P(!1), B = $(null), Y = $([]), O = $(null), b = $(null), E = $(null), L = m(
3625
+ } = e || {}, [u, v] = P("idle"), [T, j] = P(0), [K, Z] = P([]), [A, x] = P(null), [k, I] = P(""), [S, F] = P(null), [s1, q] = P(!1), B = $(null), Y = $([]), E = $(null), b = $(null), O = $(null), L = m(
3616
3626
  (s) => {
3617
3627
  v((o) => (o !== s && (i == null || i({
3618
3628
  newState: s,
@@ -3639,7 +3649,7 @@ function A7(e) {
3639
3649
  const s = await navigator.mediaDevices.getUserMedia({
3640
3650
  audio: !0
3641
3651
  });
3642
- if (E.current = s, !b.current)
3652
+ if (O.current = s, !b.current)
3643
3653
  try {
3644
3654
  b.current = new (window.AudioContext || window.webkitAudioContext)();
3645
3655
  } catch (o) {
@@ -3655,26 +3665,26 @@ function A7(e) {
3655
3665
  ) : H("Error accessing microphone.", s), L("permissionDenied"), !1;
3656
3666
  }
3657
3667
  }, [H, L]), _ = () => {
3658
- O.current && clearInterval(O.current), O.current = setInterval(() => {
3668
+ E.current && clearInterval(E.current), E.current = setInterval(() => {
3659
3669
  j((s) => {
3660
3670
  const o = s + 1;
3661
3671
  return n == null || n(o), o;
3662
3672
  });
3663
3673
  }, 1e3);
3664
3674
  }, c = () => {
3665
- O.current && clearInterval(O.current), O.current = null;
3675
+ E.current && clearInterval(E.current), E.current = null;
3666
3676
  }, C = () => {
3667
3677
  c(), j(0), n == null || n(0);
3668
3678
  }, d = m(() => {
3669
3679
  var s;
3670
- B.current && B.current.state !== "inactive" && B.current.stop(), (s = E.current) == null || s.getTracks().forEach((o) => o.stop()), E.current = null, M && URL.revokeObjectURL(M), I(""), A(null), y([]), Y.current = [], C(), F(null), L("permissionNeeded"), navigator.mediaDevices && navigator.mediaDevices.getUserMedia ? (q(!0), navigator.permissions && navigator.permissions.query ? navigator.permissions.query({
3680
+ B.current && B.current.state !== "inactive" && B.current.stop(), (s = O.current) == null || s.getTracks().forEach((o) => o.stop()), O.current = null, k && URL.revokeObjectURL(k), I(""), x(null), Z([]), Y.current = [], C(), F(null), L("permissionNeeded"), navigator.mediaDevices && navigator.mediaDevices.getUserMedia ? (q(!0), navigator.permissions && navigator.permissions.query ? navigator.permissions.query({
3671
3681
  name: "microphone"
3672
3682
  }).then((o) => {
3673
3683
  o.state === "granted" ? L("ready") : o.state === "denied" ? (L("permissionDenied"), F(
3674
3684
  (l) => l || "Microphone permission is denied."
3675
3685
  )) : L("permissionNeeded");
3676
3686
  }).catch(() => L("permissionNeeded")) : L("permissionNeeded")) : (q(!1), L("permissionDenied"), F("MediaDevices API not supported on this browser."));
3677
- }, [M, L]);
3687
+ }, [k, L]);
3678
3688
  r1(() => {
3679
3689
  if (q(
3680
3690
  !!(navigator.mediaDevices && navigator.mediaDevices.getUserMedia)
@@ -3709,22 +3719,22 @@ function A7(e) {
3709
3719
  s = l, o(), l.onchange = o;
3710
3720
  }).catch(() => L("permissionNeeded")), () => {
3711
3721
  var l, N, R;
3712
- O.current && clearInterval(O.current), M && URL.revokeObjectURL(M), (l = E.current) == null || l.getTracks().forEach((D) => D.stop()), (R = (N = B.current) == null ? void 0 : N.stream) == null || R.getTracks().forEach((D) => D.stop()), s && (s.onchange = null);
3722
+ E.current && clearInterval(E.current), k && URL.revokeObjectURL(k), (l = O.current) == null || l.getTracks().forEach((D) => D.stop()), (R = (N = B.current) == null ? void 0 : N.stream) == null || R.getTracks().forEach((D) => D.stop()), s && (s.onchange = null);
3713
3723
  };
3714
3724
  }, []);
3715
- const u = m(async () => {
3725
+ const w = m(async () => {
3716
3726
  if (!["ready", "finished", "idle", "permissionNeeded"].includes(
3717
- w
3727
+ u
3718
3728
  )) {
3719
- H(`Cannot start recording in state: ${w}`);
3729
+ H(`Cannot start recording in state: ${u}`);
3720
3730
  return;
3721
3731
  }
3722
- F(null), A(null), M && (URL.revokeObjectURL(M), I("")), Y.current = [], y([]), C();
3723
- let s = E.current;
3732
+ F(null), x(null), k && (URL.revokeObjectURL(k), I("")), Y.current = [], Z([]), C();
3733
+ let s = O.current;
3724
3734
  if (!s || s.getAudioTracks().every((o) => o.readyState === "ended")) {
3725
3735
  if (!await Q())
3726
3736
  return;
3727
- s = E.current;
3737
+ s = O.current;
3728
3738
  }
3729
3739
  if (!s) {
3730
3740
  H("Microphone stream not available."), L("permissionDenied");
@@ -3762,7 +3772,7 @@ function A7(e) {
3762
3772
  var R;
3763
3773
  L("processing");
3764
3774
  const l = [...Y.current];
3765
- y(l);
3775
+ Z(l);
3766
3776
  const N = new Blob(l, {
3767
3777
  type: ((R = B.current) == null ? void 0 : R.mimeType) || "audio/webm"
3768
3778
  });
@@ -3780,9 +3790,9 @@ function A7(e) {
3780
3790
  }
3781
3791
  try {
3782
3792
  const D = await N.arrayBuffer(), z = await b.current.decodeAudioData(D), X = r7(z);
3783
- A(X);
3784
- const E1 = URL.createObjectURL(X);
3785
- I(E1), r == null || r({
3793
+ x(X);
3794
+ const O1 = URL.createObjectURL(X);
3795
+ I(O1), r == null || r({
3786
3796
  wavBlob: X,
3787
3797
  audioChunks: l,
3788
3798
  duration: T
@@ -3793,7 +3803,7 @@ function A7(e) {
3793
3803
  D
3794
3804
  );
3795
3805
  const z = URL.createObjectURL(N);
3796
- I(z), A(null), r == null || r({
3806
+ I(z), x(null), r == null || r({
3797
3807
  wavBlob: null,
3798
3808
  audioChunks: l,
3799
3809
  duration: T
@@ -3806,8 +3816,8 @@ function A7(e) {
3806
3816
  H("Failed to start recording.", o);
3807
3817
  }
3808
3818
  }, [
3809
- w,
3810
- M,
3819
+ u,
3820
+ k,
3811
3821
  Q,
3812
3822
  a,
3813
3823
  f,
@@ -3817,26 +3827,26 @@ function A7(e) {
3817
3827
  T
3818
3828
  ]), p = m(() => {
3819
3829
  var s;
3820
- w === "recording" && ((s = B.current) == null ? void 0 : s.state) === "recording" && (B.current.pause(), L("paused"), c());
3821
- }, [w, L]), k = m(() => {
3830
+ u === "recording" && ((s = B.current) == null ? void 0 : s.state) === "recording" && (B.current.pause(), L("paused"), c());
3831
+ }, [u, L]), M = m(() => {
3822
3832
  var s;
3823
- w === "paused" && ((s = B.current) == null ? void 0 : s.state) === "paused" && (B.current.resume(), L("recording"), _());
3824
- }, [w, L]), V = m(async () => {
3833
+ u === "paused" && ((s = B.current) == null ? void 0 : s.state) === "paused" && (B.current.resume(), L("recording"), _());
3834
+ }, [u, L]), V = m(async () => {
3825
3835
  var s, o;
3826
- (w === "recording" || w === "paused") && ((s = B.current) == null ? void 0 : s.state) !== "inactive" && (L("stopping"), (o = B.current) == null || o.stop(), c());
3827
- }, [w, L]);
3836
+ (u === "recording" || u === "paused") && ((s = B.current) == null ? void 0 : s.state) !== "inactive" && (L("stopping"), (o = B.current) == null || o.stop(), c());
3837
+ }, [u, L]);
3828
3838
  return {
3829
- recordingState: w,
3839
+ recordingState: u,
3830
3840
  duration: T,
3831
3841
  audioChunks: K,
3832
- finalWavBlob: x,
3833
- audioURL: M,
3842
+ finalWavBlob: A,
3843
+ audioURL: k,
3834
3844
  errorMessage: S,
3835
3845
  isMicrophoneAvailable: s1,
3836
3846
  actions: {
3837
- start: u,
3847
+ start: w,
3838
3848
  pause: p,
3839
- resume: k,
3849
+ resume: M,
3840
3850
  stop: V,
3841
3851
  requestPermission: Q,
3842
3852
  reset: d
@@ -3875,7 +3885,7 @@ export {
3875
3885
  Y6 as U,
3876
3886
  N1 as a,
3877
3887
  T1 as b,
3878
- u7 as c,
3888
+ w7 as c,
3879
3889
  C1 as d,
3880
3890
  k7 as e,
3881
3891
  C7 as f,
@@ -3888,11 +3898,11 @@ export {
3888
3898
  Z7 as m,
3889
3899
  x7 as n,
3890
3900
  o1 as o,
3891
- w7 as p,
3901
+ u7 as p,
3892
3902
  y7 as q,
3893
3903
  A7 as r,
3894
3904
  m7 as s,
3895
- w1 as t,
3905
+ u1 as t,
3896
3906
  d7 as u,
3897
3907
  f1 as v,
3898
3908
  F1 as w,
@@ -3900,4 +3910,4 @@ export {
3900
3910
  n7 as y,
3901
3911
  o7 as z
3902
3912
  };
3903
- //# sourceMappingURL=useCustomNavigate-e4a9b439.js.map
3913
+ //# sourceMappingURL=useCustomNavigate-cbfd6f87.js.map