@stackone/malachite 0.52.1 → 0.52.2

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.
package/dist/index.js CHANGED
@@ -3,11 +3,11 @@ var R5 = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
5
  var Br = (e, t, r) => t in e ? Er(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
6
- var X = (e, t, r) => Br(e, typeof t != "symbol" ? t + "" : t, r), He = (e, t, r) => t.has(e) || R5("Cannot " + r);
7
- var he = (e, t, r) => (He(e, t, "read from private field"), r ? r.call(e) : t.get(e)), je = (e, t, r) => t.has(e) ? R5("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), W5 = (e, t, r, a) => (He(e, t, "write to private field"), a ? a.call(e, r) : t.set(e, r), r), C1 = (e, t, r) => (He(e, t, "access private method"), r);
6
+ var $ = (e, t, r) => Br(e, typeof t != "symbol" ? t + "" : t, r), He = (e, t, r) => t.has(e) || R5("Cannot " + r);
7
+ var he = (e, t, r) => (He(e, t, "read from private field"), r ? r.call(e) : t.get(e)), je = (e, t, r) => t.has(e) ? R5("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), W5 = (e, t, r, a) => (He(e, t, "write to private field"), a ? a.call(e, r) : t.set(e, r), r), u1 = (e, t, r) => (He(e, t, "access private method"), r);
8
8
  import { jsx as l, jsxs as v, Fragment as w1 } from "react/jsx-runtime";
9
9
  import * as c from "react";
10
- import P1, { useState as H, useEffect as u1, useRef as U, useId as d2, forwardRef as s5, createElement as h2, Fragment as k1, useMemo as W1, createContext as I1, useContext as N1, useReducer as ae, useCallback as B1, useLayoutEffect as oe } from "react";
10
+ import P1, { useState as q, useEffect as g1, useRef as J, useId as d2, forwardRef as s5, createElement as h2, Fragment as k1, useMemo as W1, createContext as I1, useContext as N1, useReducer as ae, useCallback as B1, useLayoutEffect as oe } from "react";
11
11
  import { createPortal as le } from "react-dom";
12
12
  import { Controller as Vr } from "react-hook-form";
13
13
  const Mr = (e) => /* @__PURE__ */ c.createElement("svg", { width: 16, height: 17, viewBox: "0 0 16 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ c.createElement("g", { id: "Layer_2" }, /* @__PURE__ */ c.createElement("path", { id: "Vector", d: "M7.97085 15.0455C11.6019 15.0455 14.5454 12.1019 14.5454 8.47091C14.5454 4.83989 11.6019 1.89636 7.97085 1.89636C4.33983 1.89636 1.3963 4.83989 1.3963 8.47091C1.3963 12.1019 4.33983 15.0455 7.97085 15.0455Z", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ c.createElement("path", { id: "Vector_2", d: "M8.00038 8.33275C8.98043 8.33275 9.77492 7.53826 9.77492 6.55821C9.77492 5.57815 8.98043 4.78366 8.00038 4.78366C7.02032 4.78366 6.22583 5.57815 6.22583 6.55821C6.22583 7.53826 7.02032 8.33275 8.00038 8.33275Z", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ c.createElement("path", { id: "Vector_3", d: "M11.6796 10.3909C11.2758 9.78486 10.7287 9.28791 10.0867 8.94419C9.44472 8.60047 8.72779 8.42062 7.99958 8.42062C7.27137 8.42062 6.55444 8.60047 5.91245 8.94419C5.27047 9.28791 4.72331 9.78486 4.31958 10.3909", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }))), Ir = ({
@@ -1421,7 +1421,7 @@ const Mr = (e) => /* @__PURE__ */ c.createElement("svg", { width: 16, height: 17
1421
1421
  ...r
1422
1422
  };
1423
1423
  return /* @__PURE__ */ l(S7, { className: t, style: o, onClick: a });
1424
- }, r1 = {
1424
+ }, a1 = {
1425
1425
  AccountIcon: Ir,
1426
1426
  AccountsIcon: Zr,
1427
1427
  AddIcon: Nr,
@@ -1516,7 +1516,7 @@ const Mr = (e) => /* @__PURE__ */ c.createElement("svg", { width: 16, height: 17
1516
1516
  {
1517
1517
  "aria-hidden": "true",
1518
1518
  className: `shrink-0 flex items-center transition-colors ${e ? "text-[var(--malachite-text-primary)]" : "text-[var(--malachite-text-placeholder)] group-hover:text-[var(--malachite-text-primary)]"} ${r}`,
1519
- children: e ? /* @__PURE__ */ l(r1.TriangleDownIcon, { size: t }) : /* @__PURE__ */ l(r1.TriangleRightIcon, { size: t })
1519
+ children: e ? /* @__PURE__ */ l(a1.TriangleDownIcon, { size: t }) : /* @__PURE__ */ l(a1.TriangleRightIcon, { size: t })
1520
1520
  }
1521
1521
  ), ta = ({
1522
1522
  title: e,
@@ -1532,13 +1532,13 @@ const Mr = (e) => /* @__PURE__ */ c.createElement("svg", { width: 16, height: 17
1532
1532
  stickyTopOffset: C = 0,
1533
1533
  animate: p = !0
1534
1534
  }) => {
1535
- const [u, m] = H(n), b = s !== void 0 ? s : u, [x, A] = H(!1);
1536
- u1(() => {
1537
- b || A(!1);
1535
+ const [u, m] = q(n), b = s !== void 0 ? s : u, [x, k] = q(!1);
1536
+ g1(() => {
1537
+ b || k(!1);
1538
1538
  }, [b]);
1539
1539
  const w = () => {
1540
- const S = !b;
1541
- s === void 0 && m(S), i == null || i(S);
1540
+ const Z = !b;
1541
+ s === void 0 && m(Z), i == null || i(Z);
1542
1542
  }, y = ["flex flex-col w-full text-left", r].filter(Boolean).join(" "), V = [
1543
1543
  // `group` only when enabled, so the arrow doesn't darken on hover while disabled.
1544
1544
  d ? "" : "group",
@@ -1572,8 +1572,8 @@ const Mr = (e) => /* @__PURE__ */ c.createElement("svg", { width: 16, height: 17
1572
1572
  {
1573
1573
  className: "grid w-full transition-[grid-template-rows] duration-200 ease-in-out",
1574
1574
  style: { gridTemplateRows: b ? "1fr" : "0fr" },
1575
- onTransitionEnd: (S) => {
1576
- S.propertyName === "grid-template-rows" && b && A(!0);
1575
+ onTransitionEnd: (Z) => {
1576
+ Z.propertyName === "grid-template-rows" && b && k(!0);
1577
1577
  },
1578
1578
  children: /* @__PURE__ */ l("div", { className: x && b ? "overflow-visible" : "overflow-hidden", children: a && /* @__PURE__ */ l("div", { className: "border-b border-solid border-[var(--malachite-card-border)]", children: a }) })
1579
1579
  }
@@ -1599,29 +1599,29 @@ const Mr = (e) => /* @__PURE__ */ c.createElement("svg", { width: 16, height: 17
1599
1599
  maxWidth: s = "320px",
1600
1600
  fill: i = !1
1601
1601
  }) => {
1602
- const d = n || i ? { ...n ? N7 : {}, ...i ? L7 : {} } : void 0, [h, C] = H(!1), p = U(null), u = U(null), m = U(null), b = d2(), x = e != null && e !== "" && e !== !1, A = (Z) => {
1603
- Z.stopPropagation(), x && (p.current && clearTimeout(p.current), p.current = setTimeout(() => {
1602
+ const d = n || i ? { ...n ? N7 : {}, ...i ? L7 : {} } : void 0, [h, C] = q(!1), p = J(null), u = J(null), m = J(null), b = d2(), x = e != null && e !== "" && e !== !1, k = (S) => {
1603
+ S.stopPropagation(), x && (p.current && clearTimeout(p.current), p.current = setTimeout(() => {
1604
1604
  C(!0);
1605
1605
  }, r * 1e3));
1606
- }, w = (Z) => {
1607
- Z.stopPropagation(), p.current && clearTimeout(p.current), C(!1);
1606
+ }, w = (S) => {
1607
+ S.stopPropagation(), p.current && clearTimeout(p.current), C(!1);
1608
1608
  }, y = () => {
1609
1609
  x && (p.current && clearTimeout(p.current), C(!0));
1610
1610
  }, I = () => {
1611
1611
  p.current && clearTimeout(p.current), C(!1);
1612
- }, [, V] = H({});
1613
- u1(() => {
1614
- const Z = () => {
1612
+ }, [, V] = q({});
1613
+ g1(() => {
1614
+ const S = () => {
1615
1615
  h && V({});
1616
1616
  };
1617
- return window.addEventListener("scroll", Z, !0), window.addEventListener("resize", Z), () => {
1618
- p.current && clearTimeout(p.current), window.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", Z);
1617
+ return window.addEventListener("scroll", S, !0), window.addEventListener("resize", S), () => {
1618
+ p.current && clearTimeout(p.current), window.removeEventListener("scroll", S, !0), window.removeEventListener("resize", S);
1619
1619
  };
1620
1620
  }, [h]);
1621
1621
  const D = () => {
1622
1622
  if (!m.current)
1623
1623
  return { display: "none" };
1624
- const Z = m.current.getBoundingClientRect(), M = {
1624
+ const S = m.current.getBoundingClientRect(), M = {
1625
1625
  position: "fixed",
1626
1626
  zIndex: 2147483647,
1627
1627
  display: "flex",
@@ -1650,41 +1650,41 @@ const Mr = (e) => /* @__PURE__ */ c.createElement("svg", { width: 16, height: 17
1650
1650
  case "top":
1651
1651
  return {
1652
1652
  ...M,
1653
- top: Z.top - 8,
1654
- left: Z.left + Z.width / 2,
1653
+ top: S.top - 8,
1654
+ left: S.left + S.width / 2,
1655
1655
  transform: `translate(-50%, -100%) ${h ? "scale(1)" : "scale(0.95)"}`
1656
1656
  };
1657
1657
  case "bottom":
1658
1658
  return {
1659
1659
  ...M,
1660
- top: Z.bottom + 8,
1661
- left: Z.left + Z.width / 2,
1660
+ top: S.bottom + 8,
1661
+ left: S.left + S.width / 2,
1662
1662
  transform: `translateX(-50%) ${h ? "scale(1)" : "scale(0.95)"}`
1663
1663
  };
1664
1664
  case "left":
1665
1665
  return {
1666
1666
  ...M,
1667
- top: Z.top + Z.height / 2,
1668
- left: Z.left - 8,
1667
+ top: S.top + S.height / 2,
1668
+ left: S.left - 8,
1669
1669
  transform: `translate(-100%, -50%) ${h ? "scale(1)" : "scale(0.95)"}`
1670
1670
  };
1671
1671
  case "right":
1672
1672
  return {
1673
1673
  ...M,
1674
- top: Z.top + Z.height / 2,
1675
- left: Z.right + 8,
1674
+ top: S.top + S.height / 2,
1675
+ left: S.right + 8,
1676
1676
  transform: `translateY(-50%) ${h ? "scale(1)" : "scale(0.95)"}`
1677
1677
  };
1678
1678
  default:
1679
1679
  return {
1680
1680
  ...M,
1681
- top: Z.top - 8,
1682
- left: Z.left + Z.width / 2,
1681
+ top: S.top - 8,
1682
+ left: S.left + S.width / 2,
1683
1683
  transform: `translate(-50%, -100%) ${h ? "scale(1)" : "scale(0.95)"}`
1684
1684
  };
1685
1685
  }
1686
- }, S = x ? b : void 0, N = a || !P1.isValidElement(t) ? /* @__PURE__ */ l("span", { "aria-describedby": S, children: t }) : P1.cloneElement(t, {
1687
- "aria-describedby": [t.props["aria-describedby"], S].filter(Boolean).join(" ") || void 0
1686
+ }, Z = x ? b : void 0, L = a || !P1.isValidElement(t) ? /* @__PURE__ */ l("span", { "aria-describedby": Z, children: t }) : P1.cloneElement(t, {
1687
+ "aria-describedby": [t.props["aria-describedby"], Z].filter(Boolean).join(" ") || void 0
1688
1688
  });
1689
1689
  return /* @__PURE__ */ v(w1, { children: [
1690
1690
  /* @__PURE__ */ l(
@@ -1693,11 +1693,11 @@ const Mr = (e) => /* @__PURE__ */ c.createElement("svg", { width: 16, height: 17
1693
1693
  ref: m,
1694
1694
  className: "relative flex items-center",
1695
1695
  style: d,
1696
- onMouseEnter: A,
1696
+ onMouseEnter: k,
1697
1697
  onMouseLeave: w,
1698
1698
  onFocus: y,
1699
1699
  onBlur: I,
1700
- children: N
1700
+ children: L
1701
1701
  }
1702
1702
  ),
1703
1703
  x && le(
@@ -1829,10 +1829,10 @@ const Mr = (e) => /* @__PURE__ */ c.createElement("svg", { width: 16, height: 17
1829
1829
  className: m = "",
1830
1830
  ...b
1831
1831
  }, x) => {
1832
- const A = r ?? Q7(t), w = o || a, y = [
1832
+ const k = r ?? Q7(t), w = o || a, y = [
1833
1833
  "flex items-center justify-center",
1834
1834
  p ? "p-0" : D7(t),
1835
- R7(e, A),
1835
+ R7(e, k),
1836
1836
  i ? "w-full" : "",
1837
1837
  d ? "max-w-full" : "",
1838
1838
  w ? "cursor-not-allowed" : "",
@@ -1865,15 +1865,15 @@ function g2(e) {
1865
1865
  z1 = e;
1866
1866
  }
1867
1867
  var me = { exec: () => null };
1868
- function O(e, t = "") {
1868
+ function z(e, t = "") {
1869
1869
  let r = typeof e == "string" ? e : e.source, a = { replace: (o, n) => {
1870
1870
  let s = typeof n == "string" ? n : n.source;
1871
1871
  return s = s.replace(x1.caret, "$1"), r = r.replace(o, s), a;
1872
1872
  }, getRegex: () => new RegExp(r, t) };
1873
1873
  return a;
1874
1874
  }
1875
- var x1 = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}#`), htmlBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i") }, G7 = /^(?:[ \t]*(?:\n|$))+/, T7 = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Y7 = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, xe = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, H7 = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, C5 = /(?:[*+-]|\d{1,9}[.)])/, m2 = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, b2 = O(m2).replace(/bull/g, C5).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), j7 = O(m2).replace(/bull/g, C5).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), u5 = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, q7 = /^[^\n]+/, p5 = /(?!\s*\])(?:\\.|[^\[\]\\])+/, J7 = O(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", p5).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), U7 = O(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, C5).getRegex(), Qe = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", g5 = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, O7 = O("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", g5).replace("tag", Qe).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), f2 = O(u5).replace("hr", xe).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Qe).getRegex(), X7 = O(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", f2).getRegex(), m5 = { blockquote: X7, code: T7, def: J7, fences: Y7, heading: H7, hr: xe, html: O7, lheading: b2, list: U7, newline: G7, paragraph: f2, table: me, text: q7 }, G5 = O("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", xe).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Qe).getRegex(), z7 = { ...m5, lheading: j7, table: G5, paragraph: O(u5).replace("hr", xe).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", G5).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Qe).getRegex() }, $7 = { ...m5, html: O(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", g5).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: me, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: O(u5).replace("hr", xe).replace("heading", ` *#{1,6} *[^
1876
- ]`).replace("lheading", b2).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, _7 = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, e0 = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, w2 = /^( {2,}|\\)\n(?!\s*$)/, t0 = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Pe = /[\p{P}\p{S}]/u, b5 = /[\s\p{P}\p{S}]/u, v2 = /[^\s\p{P}\p{S}]/u, r0 = O(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, b5).getRegex(), x2 = /(?!~)[\p{P}\p{S}]/u, a0 = /(?!~)[\s\p{P}\p{S}]/u, o0 = /(?:[^\s\p{P}\p{S}]|~)/u, l0 = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, y2 = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, n0 = O(y2, "u").replace(/punct/g, Pe).getRegex(), i0 = O(y2, "u").replace(/punct/g, x2).getRegex(), A2 = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", c0 = O(A2, "gu").replace(/notPunctSpace/g, v2).replace(/punctSpace/g, b5).replace(/punct/g, Pe).getRegex(), s0 = O(A2, "gu").replace(/notPunctSpace/g, o0).replace(/punctSpace/g, a0).replace(/punct/g, x2).getRegex(), d0 = O("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, v2).replace(/punctSpace/g, b5).replace(/punct/g, Pe).getRegex(), h0 = O(/\\(punct)/, "gu").replace(/punct/g, Pe).getRegex(), C0 = O(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), u0 = O(g5).replace("(?:-->|$)", "-->").getRegex(), p0 = O("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", u0).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ne = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, g0 = O(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", Ne).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), k2 = O(/^!?\[(label)\]\[(ref)\]/).replace("label", Ne).replace("ref", p5).getRegex(), E2 = O(/^!?\[(ref)\](?:\[\])?/).replace("ref", p5).getRegex(), m0 = O("reflink|nolink(?!\\()", "g").replace("reflink", k2).replace("nolink", E2).getRegex(), f5 = { _backpedal: me, anyPunctuation: h0, autolink: C0, blockSkip: l0, br: w2, code: e0, del: me, emStrongLDelim: n0, emStrongRDelimAst: c0, emStrongRDelimUnd: d0, escape: _7, link: g0, nolink: E2, punctuation: r0, reflink: k2, reflinkSearch: m0, tag: p0, text: t0, url: me }, b0 = { ...f5, link: O(/^!?\[(label)\]\((.*?)\)/).replace("label", Ne).getRegex(), reflink: O(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ne).getRegex() }, e5 = { ...f5, emStrongRDelimAst: s0, emStrongLDelim: i0, url: O(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/, text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ }, f0 = { ...e5, br: O(w2).replace("{2,}", "*").getRegex(), text: O(e5.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, Ve = { normal: m5, gfm: z7, pedantic: $7 }, Ce = { normal: f5, gfm: e5, breaks: f0, pedantic: b0 }, w0 = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, T5 = (e) => w0[e];
1875
+ var x1 = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}#`), htmlBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i") }, G7 = /^(?:[ \t]*(?:\n|$))+/, T7 = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Y7 = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, xe = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, H7 = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, C5 = /(?:[*+-]|\d{1,9}[.)])/, m2 = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, b2 = z(m2).replace(/bull/g, C5).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), j7 = z(m2).replace(/bull/g, C5).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), u5 = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, q7 = /^[^\n]+/, p5 = /(?!\s*\])(?:\\.|[^\[\]\\])+/, J7 = z(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", p5).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), U7 = z(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, C5).getRegex(), Qe = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", g5 = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, O7 = z("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", g5).replace("tag", Qe).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), f2 = z(u5).replace("hr", xe).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Qe).getRegex(), X7 = z(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", f2).getRegex(), m5 = { blockquote: X7, code: T7, def: J7, fences: Y7, heading: H7, hr: xe, html: O7, lheading: b2, list: U7, newline: G7, paragraph: f2, table: me, text: q7 }, G5 = z("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", xe).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Qe).getRegex(), z7 = { ...m5, lheading: j7, table: G5, paragraph: z(u5).replace("hr", xe).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", G5).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Qe).getRegex() }, $7 = { ...m5, html: z(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", g5).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: me, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: z(u5).replace("hr", xe).replace("heading", ` *#{1,6} *[^
1876
+ ]`).replace("lheading", b2).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, _7 = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, e0 = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, w2 = /^( {2,}|\\)\n(?!\s*$)/, t0 = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Pe = /[\p{P}\p{S}]/u, b5 = /[\s\p{P}\p{S}]/u, v2 = /[^\s\p{P}\p{S}]/u, r0 = z(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, b5).getRegex(), x2 = /(?!~)[\p{P}\p{S}]/u, a0 = /(?!~)[\s\p{P}\p{S}]/u, o0 = /(?:[^\s\p{P}\p{S}]|~)/u, l0 = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, y2 = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, n0 = z(y2, "u").replace(/punct/g, Pe).getRegex(), i0 = z(y2, "u").replace(/punct/g, x2).getRegex(), A2 = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", c0 = z(A2, "gu").replace(/notPunctSpace/g, v2).replace(/punctSpace/g, b5).replace(/punct/g, Pe).getRegex(), s0 = z(A2, "gu").replace(/notPunctSpace/g, o0).replace(/punctSpace/g, a0).replace(/punct/g, x2).getRegex(), d0 = z("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, v2).replace(/punctSpace/g, b5).replace(/punct/g, Pe).getRegex(), h0 = z(/\\(punct)/, "gu").replace(/punct/g, Pe).getRegex(), C0 = z(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), u0 = z(g5).replace("(?:-->|$)", "-->").getRegex(), p0 = z("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", u0).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ne = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, g0 = z(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", Ne).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), k2 = z(/^!?\[(label)\]\[(ref)\]/).replace("label", Ne).replace("ref", p5).getRegex(), E2 = z(/^!?\[(ref)\](?:\[\])?/).replace("ref", p5).getRegex(), m0 = z("reflink|nolink(?!\\()", "g").replace("reflink", k2).replace("nolink", E2).getRegex(), f5 = { _backpedal: me, anyPunctuation: h0, autolink: C0, blockSkip: l0, br: w2, code: e0, del: me, emStrongLDelim: n0, emStrongRDelimAst: c0, emStrongRDelimUnd: d0, escape: _7, link: g0, nolink: E2, punctuation: r0, reflink: k2, reflinkSearch: m0, tag: p0, text: t0, url: me }, b0 = { ...f5, link: z(/^!?\[(label)\]\((.*?)\)/).replace("label", Ne).getRegex(), reflink: z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ne).getRegex() }, e5 = { ...f5, emStrongRDelimAst: s0, emStrongLDelim: i0, url: z(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/, text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ }, f0 = { ...e5, br: z(w2).replace("{2,}", "*").getRegex(), text: z(e5.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, Ve = { normal: m5, gfm: z7, pedantic: $7 }, Ce = { normal: f5, gfm: e5, breaks: f0, pedantic: b0 }, w0 = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, T5 = (e) => w0[e];
1877
1877
  function D1(e, t) {
1878
1878
  if (t) {
1879
1879
  if (x1.escapeTest.test(e)) return e.replace(x1.escapeReplace, T5);
@@ -1937,9 +1937,9 @@ function x0(e, t, r) {
1937
1937
  }
1938
1938
  var Le = class {
1939
1939
  constructor(e) {
1940
- X(this, "options");
1941
- X(this, "rules");
1942
- X(this, "lexer");
1940
+ $(this, "options");
1941
+ $(this, "rules");
1942
+ $(this, "lexer");
1943
1943
  this.options = e || z1;
1944
1944
  }
1945
1945
  space(e) {
@@ -2034,23 +2034,23 @@ ${C}` : C;
2034
2034
  `, e = e.substring(u.length + 1), d = !0), !d) {
2035
2035
  let w = this.rules.other.nextBulletRegex(b), y = this.rules.other.hrRegex(b), I = this.rules.other.fencesBeginRegex(b), V = this.rules.other.headingBeginRegex(b), D = this.rules.other.htmlBeginRegex(b);
2036
2036
  for (; e; ) {
2037
- let S = e.split(`
2038
- `, 1)[0], N;
2039
- if (u = S, this.options.pedantic ? (u = u.replace(this.rules.other.listReplaceNesting, " "), N = u) : N = u.replace(this.rules.other.tabCharGlobal, " "), I.test(u) || V.test(u) || D.test(u) || w.test(u) || y.test(u)) break;
2040
- if (N.search(this.rules.other.nonSpaceChar) >= b || !u.trim()) C += `
2041
- ` + N.slice(b);
2037
+ let Z = e.split(`
2038
+ `, 1)[0], L;
2039
+ if (u = Z, this.options.pedantic ? (u = u.replace(this.rules.other.listReplaceNesting, " "), L = u) : L = u.replace(this.rules.other.tabCharGlobal, " "), I.test(u) || V.test(u) || D.test(u) || w.test(u) || y.test(u)) break;
2040
+ if (L.search(this.rules.other.nonSpaceChar) >= b || !u.trim()) C += `
2041
+ ` + L.slice(b);
2042
2042
  else {
2043
2043
  if (m || p.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || I.test(p) || V.test(p) || y.test(p)) break;
2044
2044
  C += `
2045
2045
  ` + u;
2046
2046
  }
2047
- !m && !u.trim() && (m = !0), h += S + `
2048
- `, e = e.substring(S.length + 1), p = N.slice(b);
2047
+ !m && !u.trim() && (m = !0), h += Z + `
2048
+ `, e = e.substring(Z.length + 1), p = L.slice(b);
2049
2049
  }
2050
2050
  }
2051
2051
  o.loose || (s ? o.loose = !0 : this.rules.other.doubleBlankLine.test(h) && (s = !0));
2052
- let x = null, A;
2053
- this.options.gfm && (x = this.rules.other.listIsTask.exec(C), x && (A = x[0] !== "[ ] ", C = C.replace(this.rules.other.listReplaceTask, ""))), o.items.push({ type: "list_item", raw: h, task: !!x, checked: A, loose: !1, text: C, tokens: [] }), o.raw += h;
2052
+ let x = null, k;
2053
+ this.options.gfm && (x = this.rules.other.listIsTask.exec(C), x && (k = x[0] !== "[ ] ", C = C.replace(this.rules.other.listReplaceTask, ""))), o.items.push({ type: "list_item", raw: h, task: !!x, checked: k, loose: !1, text: C, tokens: [] }), o.raw += h;
2054
2054
  }
2055
2055
  let i = o.items.at(-1);
2056
2056
  if (i) i.raw = i.raw.trimEnd(), i.text = i.text.trimEnd();
@@ -2219,11 +2219,11 @@ ${C}` : C;
2219
2219
  }
2220
2220
  }, G1 = class t5 {
2221
2221
  constructor(t) {
2222
- X(this, "tokens");
2223
- X(this, "options");
2224
- X(this, "state");
2225
- X(this, "tokenizer");
2226
- X(this, "inlineQueue");
2222
+ $(this, "tokens");
2223
+ $(this, "options");
2224
+ $(this, "state");
2225
+ $(this, "tokenizer");
2226
+ $(this, "inlineQueue");
2227
2227
  this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || z1, this.options.tokenizer = this.options.tokenizer || new Le(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
2228
2228
  let r = { other: x1, block: Ve.normal, inline: Ce.normal };
2229
2229
  this.options.pedantic ? (r.block = Ve.pedantic, r.inline = Ce.pedantic) : this.options.gfm && (r.block = Ve.gfm, this.options.breaks ? r.inline = Ce.breaks : r.inline = Ce.gfm), this.tokenizer.rules = r;
@@ -2422,8 +2422,8 @@ ${C}` : C;
2422
2422
  }
2423
2423
  }, De = class {
2424
2424
  constructor(e) {
2425
- X(this, "options");
2426
- X(this, "parser");
2425
+ $(this, "options");
2426
+ $(this, "parser");
2427
2427
  this.options = e || z1;
2428
2428
  }
2429
2429
  space(e) {
@@ -2571,9 +2571,9 @@ ${e}</tr>
2571
2571
  }
2572
2572
  }, T1 = class r5 {
2573
2573
  constructor(t) {
2574
- X(this, "options");
2575
- X(this, "renderer");
2576
- X(this, "textRenderer");
2574
+ $(this, "options");
2575
+ $(this, "renderer");
2576
+ $(this, "textRenderer");
2577
2577
  this.options = t || z1, this.options.renderer = this.options.renderer || new De(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new w5();
2578
2578
  }
2579
2579
  static parse(t, r) {
@@ -2713,8 +2713,8 @@ ${e}</tr>
2713
2713
  }
2714
2714
  }, _e, Fe = (_e = class {
2715
2715
  constructor(e) {
2716
- X(this, "options");
2717
- X(this, "block");
2716
+ $(this, "options");
2717
+ $(this, "block");
2718
2718
  this.options = e || z1;
2719
2719
  }
2720
2720
  preprocess(e) {
@@ -2732,18 +2732,18 @@ ${e}</tr>
2732
2732
  provideParser() {
2733
2733
  return this.block ? T1.parse : T1.parseInline;
2734
2734
  }
2735
- }, X(_e, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _e), B2 = class {
2735
+ }, $(_e, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _e), B2 = class {
2736
2736
  constructor(...e) {
2737
- X(this, "defaults", h5());
2738
- X(this, "options", this.setOptions);
2739
- X(this, "parse", this.parseMarkdown(!0));
2740
- X(this, "parseInline", this.parseMarkdown(!1));
2741
- X(this, "Parser", T1);
2742
- X(this, "Renderer", De);
2743
- X(this, "TextRenderer", w5);
2744
- X(this, "Lexer", G1);
2745
- X(this, "Tokenizer", Le);
2746
- X(this, "Hooks", Fe);
2737
+ $(this, "defaults", h5());
2738
+ $(this, "options", this.setOptions);
2739
+ $(this, "parse", this.parseMarkdown(!0));
2740
+ $(this, "parseInline", this.parseMarkdown(!1));
2741
+ $(this, "Parser", T1);
2742
+ $(this, "Renderer", De);
2743
+ $(this, "TextRenderer", w5);
2744
+ $(this, "Lexer", G1);
2745
+ $(this, "Tokenizer", Le);
2746
+ $(this, "Hooks", Fe);
2747
2747
  this.use(...e);
2748
2748
  }
2749
2749
  walkTokens(e, t) {
@@ -2884,35 +2884,35 @@ Please report this to https://github.com/markedjs/marked.`, e) {
2884
2884
  };
2885
2885
  }
2886
2886
  }, O1 = new B2();
2887
- function e1(e, t) {
2887
+ function t1(e, t) {
2888
2888
  return O1.parse(e, t);
2889
2889
  }
2890
- e1.options = e1.setOptions = function(e) {
2891
- return O1.setOptions(e), e1.defaults = O1.defaults, g2(e1.defaults), e1;
2890
+ t1.options = t1.setOptions = function(e) {
2891
+ return O1.setOptions(e), t1.defaults = O1.defaults, g2(t1.defaults), t1;
2892
2892
  };
2893
- e1.getDefaults = h5;
2894
- e1.defaults = z1;
2895
- e1.use = function(...e) {
2896
- return O1.use(...e), e1.defaults = O1.defaults, g2(e1.defaults), e1;
2893
+ t1.getDefaults = h5;
2894
+ t1.defaults = z1;
2895
+ t1.use = function(...e) {
2896
+ return O1.use(...e), t1.defaults = O1.defaults, g2(t1.defaults), t1;
2897
2897
  };
2898
- e1.walkTokens = function(e, t) {
2898
+ t1.walkTokens = function(e, t) {
2899
2899
  return O1.walkTokens(e, t);
2900
2900
  };
2901
- e1.parseInline = O1.parseInline;
2902
- e1.Parser = T1;
2903
- e1.parser = T1.parse;
2904
- e1.Renderer = De;
2905
- e1.TextRenderer = w5;
2906
- e1.Lexer = G1;
2907
- e1.lexer = G1.lex;
2908
- e1.Tokenizer = Le;
2909
- e1.Hooks = Fe;
2910
- e1.parse = e1;
2911
- e1.options;
2912
- e1.setOptions;
2913
- e1.use;
2914
- e1.walkTokens;
2915
- e1.parseInline;
2901
+ t1.parseInline = O1.parseInline;
2902
+ t1.Parser = T1;
2903
+ t1.parser = T1.parse;
2904
+ t1.Renderer = De;
2905
+ t1.TextRenderer = w5;
2906
+ t1.Lexer = G1;
2907
+ t1.lexer = G1.lex;
2908
+ t1.Tokenizer = Le;
2909
+ t1.Hooks = Fe;
2910
+ t1.parse = t1;
2911
+ t1.options;
2912
+ t1.setOptions;
2913
+ t1.use;
2914
+ t1.walkTokens;
2915
+ t1.parseInline;
2916
2916
  T1.parse;
2917
2917
  G1.lex;
2918
2918
  const y0 = {
@@ -2931,7 +2931,7 @@ const y0 = {
2931
2931
  };
2932
2932
  var k0 = class {
2933
2933
  constructor(e) {
2934
- X(this, "renderer");
2934
+ $(this, "renderer");
2935
2935
  this.renderer = e.renderer;
2936
2936
  }
2937
2937
  parse(e) {
@@ -3027,17 +3027,17 @@ var k0 = class {
3027
3027
  });
3028
3028
  return this.renderer.elIdList.pop(), t;
3029
3029
  }
3030
- }, E0 = k0, j1, n1, m1, a5, s2, B0 = (s2 = class {
3030
+ }, E0 = k0, j1, n1, b1, a5, s2, B0 = (s2 = class {
3031
3031
  constructor(e = {}) {
3032
3032
  je(this, n1);
3033
- X(this, "elIdList", []);
3033
+ $(this, "elIdList", []);
3034
3034
  je(this, j1);
3035
3035
  const { renderer: t } = e;
3036
3036
  W5(this, j1, e), t && typeof t == "object" && Object.entries(t).forEach(([r, a]) => {
3037
3037
  const o = r, n = a;
3038
3038
  !this[o] || o === "elementId" || o === "elIdList" || typeof n != "function" || Object.defineProperty(this, o, {
3039
3039
  value(...s) {
3040
- return C1(this, n1, a5).call(this), n.apply(this, s);
3040
+ return u1(this, n1, a5).call(this), n.apply(this, s);
3041
3041
  },
3042
3042
  writable: !0,
3043
3043
  enumerable: !0,
@@ -3049,21 +3049,21 @@ var k0 = class {
3049
3049
  return this.elIdList.join("-");
3050
3050
  }
3051
3051
  heading(e, t) {
3052
- return C1(this, n1, m1).call(this, `h${t}`, e);
3052
+ return u1(this, n1, b1).call(this, `h${t}`, e);
3053
3053
  }
3054
3054
  paragraph(e) {
3055
- return C1(this, n1, m1).call(this, "p", e);
3055
+ return u1(this, n1, b1).call(this, "p", e);
3056
3056
  }
3057
3057
  link(e, t) {
3058
3058
  const r = J5(e, he(this, j1).baseURL), a = he(this, j1).openLinksInNewTab ? "_blank" : null;
3059
- return C1(this, n1, m1).call(this, "a", t, {
3059
+ return u1(this, n1, b1).call(this, "a", t, {
3060
3060
  href: r,
3061
3061
  target: a
3062
3062
  });
3063
3063
  }
3064
3064
  image(e, t, r = null) {
3065
3065
  const a = J5(e, he(this, j1).baseURL);
3066
- return C1(this, n1, m1).call(this, "img", null, {
3066
+ return u1(this, n1, b1).call(this, "img", null, {
3067
3067
  src: a,
3068
3068
  alt: t,
3069
3069
  title: r
@@ -3071,51 +3071,51 @@ var k0 = class {
3071
3071
  }
3072
3072
  codespan(e, t = null) {
3073
3073
  const r = t ? `${he(this, j1).langPrefix}${t}` : null;
3074
- return C1(this, n1, m1).call(this, "code", e, { className: r });
3074
+ return u1(this, n1, b1).call(this, "code", e, { className: r });
3075
3075
  }
3076
3076
  code(e, t) {
3077
- return C1(this, n1, m1).call(this, "pre", this.codespan(e, t));
3077
+ return u1(this, n1, b1).call(this, "pre", this.codespan(e, t));
3078
3078
  }
3079
3079
  blockquote(e) {
3080
- return C1(this, n1, m1).call(this, "blockquote", e);
3080
+ return u1(this, n1, b1).call(this, "blockquote", e);
3081
3081
  }
3082
3082
  list(e, t, r) {
3083
- return C1(this, n1, m1).call(this, t ? "ol" : "ul", e, t && r !== 1 ? { start: r } : {});
3083
+ return u1(this, n1, b1).call(this, t ? "ol" : "ul", e, t && r !== 1 ? { start: r } : {});
3084
3084
  }
3085
3085
  listItem(e) {
3086
- return C1(this, n1, m1).call(this, "li", e);
3086
+ return u1(this, n1, b1).call(this, "li", e);
3087
3087
  }
3088
3088
  checkbox(e) {
3089
- return C1(this, n1, m1).call(this, "input", null, {
3089
+ return u1(this, n1, b1).call(this, "input", null, {
3090
3090
  type: "checkbox",
3091
3091
  disabled: !0,
3092
3092
  checked: e
3093
3093
  });
3094
3094
  }
3095
3095
  table(e) {
3096
- return C1(this, n1, m1).call(this, "table", e);
3096
+ return u1(this, n1, b1).call(this, "table", e);
3097
3097
  }
3098
3098
  tableHeader(e) {
3099
- return C1(this, n1, m1).call(this, "thead", e);
3099
+ return u1(this, n1, b1).call(this, "thead", e);
3100
3100
  }
3101
3101
  tableBody(e) {
3102
- return C1(this, n1, m1).call(this, "tbody", e);
3102
+ return u1(this, n1, b1).call(this, "tbody", e);
3103
3103
  }
3104
3104
  tableRow(e) {
3105
- return C1(this, n1, m1).call(this, "tr", e);
3105
+ return u1(this, n1, b1).call(this, "tr", e);
3106
3106
  }
3107
3107
  tableCell(e, t) {
3108
3108
  const r = t.header ? "th" : "td";
3109
- return C1(this, n1, m1).call(this, r, e, { align: t.align });
3109
+ return u1(this, n1, b1).call(this, r, e, { align: t.align });
3110
3110
  }
3111
3111
  strong(e) {
3112
- return C1(this, n1, m1).call(this, "strong", e);
3112
+ return u1(this, n1, b1).call(this, "strong", e);
3113
3113
  }
3114
3114
  em(e) {
3115
- return C1(this, n1, m1).call(this, "em", e);
3115
+ return u1(this, n1, b1).call(this, "em", e);
3116
3116
  }
3117
3117
  del(e) {
3118
- return C1(this, n1, m1).call(this, "del", e);
3118
+ return u1(this, n1, b1).call(this, "del", e);
3119
3119
  }
3120
3120
  text(e) {
3121
3121
  return e;
@@ -3124,17 +3124,17 @@ var k0 = class {
3124
3124
  return e;
3125
3125
  }
3126
3126
  hr() {
3127
- return C1(this, n1, m1).call(this, "hr");
3127
+ return u1(this, n1, b1).call(this, "hr");
3128
3128
  }
3129
3129
  br() {
3130
- return C1(this, n1, m1).call(this, "br");
3130
+ return u1(this, n1, b1).call(this, "br");
3131
3131
  }
3132
- }, j1 = new WeakMap(), n1 = new WeakSet(), m1 = function(e, t = null, r = {}) {
3132
+ }, j1 = new WeakMap(), n1 = new WeakSet(), b1 = function(e, t = null, r = {}) {
3133
3133
  const a = {
3134
3134
  key: `marked-react-${this.elementId}`,
3135
3135
  suppressHydrationWarning: !0
3136
3136
  };
3137
- return C1(this, n1, a5).call(this), h2(e, {
3137
+ return u1(this, n1, a5).call(this), h2(e, {
3138
3138
  ...r,
3139
3139
  ...a
3140
3140
  }, t);
@@ -3426,7 +3426,7 @@ const M2 = ({
3426
3426
  isExpanded: n,
3427
3427
  onToggle: s
3428
3428
  }) => {
3429
- const i = !!o, [d, h] = H(!1), C = n !== void 0 ? n : d, p = () => {
3429
+ const i = !!o, [d, h] = q(!1), C = n !== void 0 ? n : d, p = () => {
3430
3430
  const w = !C;
3431
3431
  n === void 0 && h(w), s == null || s(w);
3432
3432
  }, u = {
@@ -3435,25 +3435,25 @@ const M2 = ({
3435
3435
  flexShrink: 0
3436
3436
  }, m = {
3437
3437
  info: /* @__PURE__ */ l(
3438
- r1.InfoCircleFilled,
3438
+ a1.InfoCircleFilled,
3439
3439
  {
3440
3440
  style: { ...u, color: "var(--malachite-alert-info-foreground)" }
3441
3441
  }
3442
3442
  ),
3443
3443
  success: /* @__PURE__ */ l(
3444
- r1.CheckCircleFilled,
3444
+ a1.CheckCircleFilled,
3445
3445
  {
3446
3446
  style: { ...u, color: "var(--malachite-alert-success-foreground)" }
3447
3447
  }
3448
3448
  ),
3449
3449
  error: /* @__PURE__ */ l(
3450
- r1.ErrorCircleFilled,
3450
+ a1.ErrorCircleFilled,
3451
3451
  {
3452
3452
  style: { ...u, color: "var(--malachite-alert-error-foreground)" }
3453
3453
  }
3454
3454
  ),
3455
3455
  warning: /* @__PURE__ */ l(
3456
- r1.WarningCircleFilled,
3456
+ a1.WarningCircleFilled,
3457
3457
  {
3458
3458
  style: { ...u, color: "var(--malachite-alert-warning-foreground)" }
3459
3459
  }
@@ -3474,7 +3474,7 @@ const M2 = ({
3474
3474
  "flex items-center justify-between w-full",
3475
3475
  i ? "gap-2 px-2.5 py-1" : "gap-2",
3476
3476
  i && C ? "rounded-t-[12px]" : i ? "rounded-[12px]" : ""
3477
- ].filter(Boolean).join(" "), A = ["w-full", "overflow-hidden"].filter(Boolean).join(" ");
3477
+ ].filter(Boolean).join(" "), k = ["w-full", "overflow-hidden"].filter(Boolean).join(" ");
3478
3478
  return i ? /* @__PURE__ */ v("div", { className: `${b} alert-expandable`, children: [
3479
3479
  /* @__PURE__ */ v("div", { className: x, children: [
3480
3480
  /* @__PURE__ */ v("div", { className: "flex-1 flex gap-2 items-center", children: [
@@ -3492,12 +3492,12 @@ const M2 = ({
3492
3492
  color: ye(e)
3493
3493
  },
3494
3494
  children: C ? /* @__PURE__ */ l(
3495
- r1.CaretUpIcon,
3495
+ a1.CaretUpIcon,
3496
3496
  {
3497
3497
  style: { minWidth: "13px", minHeight: "13px" }
3498
3498
  }
3499
3499
  ) : /* @__PURE__ */ l(
3500
- r1.CaretDownIcon,
3500
+ a1.CaretDownIcon,
3501
3501
  {
3502
3502
  style: { minWidth: "13px", minHeight: "13px" }
3503
3503
  }
@@ -3505,7 +3505,7 @@ const M2 = ({
3505
3505
  }
3506
3506
  ) })
3507
3507
  ] }),
3508
- C && /* @__PURE__ */ l(w1, { children: /* @__PURE__ */ l("div", { className: A, children: /* @__PURE__ */ l("div", { className: "bg-white rounded-[10px] shadow-[0px_1px_0px_0px_rgba(0,0,0,0.15)] border border-[#e8e8e8] border-solid mx-2 mb-2 max-h-[553px] overflow-y-auto", children: o }) }) })
3508
+ C && /* @__PURE__ */ l(w1, { children: /* @__PURE__ */ l("div", { className: k, children: /* @__PURE__ */ l("div", { className: "bg-white rounded-[10px] shadow-[0px_1px_0px_0px_rgba(0,0,0,0.15)] border border-[#e8e8e8] border-solid mx-2 mb-2 max-h-[553px] overflow-y-auto", children: o }) }) })
3509
3509
  ] }) : /* @__PURE__ */ v("div", { className: b, children: [
3510
3510
  m[e],
3511
3511
  /* @__PURE__ */ l("div", { className: "flex-1 flex items-center", children: /* @__PURE__ */ l("div", { className: "[&>div]:mb-0", children: /* @__PURE__ */ l(U5, { text: t, type: e }) }) })
@@ -3522,7 +3522,7 @@ const M2 = ({
3522
3522
  shape: a = "square",
3523
3523
  className: o = ""
3524
3524
  }) => {
3525
- const [n, s] = H(void 0), i = (t == null ? void 0 : t.trim()) ?? "", d = a === "circle" ? "50%" : `${Math.round(r * 0.25)}px`;
3525
+ const [n, s] = q(void 0), i = (t == null ? void 0 : t.trim()) ?? "", d = a === "circle" ? "50%" : `${Math.round(r * 0.25)}px`;
3526
3526
  return e && n !== e ? /* @__PURE__ */ l(
3527
3527
  "img",
3528
3528
  {
@@ -3657,7 +3657,7 @@ const M2 = ({
3657
3657
  !t && /* @__PURE__ */ l(Q1, { size: "xsmall", color: "dimmed", className: "ml-1", children: "(Optional)" })
3658
3658
  ] }),
3659
3659
  r && /* @__PURE__ */ l(U1, { text: r, placement: "right", children: /* @__PURE__ */ l(
3660
- r1.InfoFilledIcon,
3660
+ a1.InfoFilledIcon,
3661
3661
  {
3662
3662
  size: 14,
3663
3663
  className: "ml-1 -mt-[2px] text-[var(--malachite-text-dimmed)] cursor-help"
@@ -3719,20 +3719,20 @@ const M2 = ({
3719
3719
  footer: m,
3720
3720
  glassFooter: b = !1,
3721
3721
  className: x = "",
3722
- style: A = {},
3722
+ style: k = {},
3723
3723
  headerConfig: w = {}
3724
3724
  }) => {
3725
- const y = U(null), [I, V] = H(0);
3726
- u1(() => {
3725
+ const y = J(null), [I, V] = q(0);
3726
+ g1(() => {
3727
3727
  if (b && m && y.current) {
3728
- const L = new ResizeObserver((a1) => {
3729
- for (const $ of a1)
3730
- V($.contentRect.height);
3728
+ const Q = new ResizeObserver((T) => {
3729
+ for (const c1 of T)
3730
+ V(c1.contentRect.height);
3731
3731
  });
3732
- return L.observe(y.current), V(y.current.offsetHeight), () => L.disconnect();
3732
+ return Q.observe(y.current), V(y.current.offsetHeight), () => Q.disconnect();
3733
3733
  }
3734
3734
  }, [b, m]);
3735
- const S = [
3735
+ const Z = [
3736
3736
  "card-base",
3737
3737
  s ? "card-dimmed" : "",
3738
3738
  C === "rounded" ? "card-rounded" : "",
@@ -3740,16 +3740,16 @@ const M2 = ({
3740
3740
  u ? "flex flex-col" : "",
3741
3741
  a === "small" ? "text-sm" : "",
3742
3742
  x
3743
- ].filter(Boolean).join(" "), N = parseInt(r) || 20, M = {
3743
+ ].filter(Boolean).join(" "), L = parseInt(r) || 20, M = {
3744
3744
  padding: r,
3745
3745
  display: i ? "flex" : void 0,
3746
3746
  flexDirection: i,
3747
3747
  alignItems: d,
3748
3748
  ...u && { overflow: "auto", height: "100%" },
3749
3749
  ...b && m && I > 0 && {
3750
- paddingBottom: `${N + I + 10}px`
3750
+ paddingBottom: `${L + I + 10}px`
3751
3751
  }
3752
- }, F = {
3752
+ }, N = {
3753
3753
  width: o,
3754
3754
  minWidth: n,
3755
3755
  alignSelf: p,
@@ -3757,9 +3757,9 @@ const M2 = ({
3757
3757
  ...u && { height: u, display: "flex", flexDirection: "column" },
3758
3758
  ...b && m && { position: "relative" },
3759
3759
  overflow: "hidden",
3760
- ...A
3760
+ ...k
3761
3761
  };
3762
- return /* @__PURE__ */ v("div", { className: S, style: F, children: [
3762
+ return /* @__PURE__ */ v("div", { className: Z, style: N, children: [
3763
3763
  e && /* @__PURE__ */ l(
3764
3764
  "div",
3765
3765
  {
@@ -3884,8 +3884,8 @@ const M2 = ({
3884
3884
  colors: t = T0,
3885
3885
  className: r = ""
3886
3886
  }) => {
3887
- const a = U(null);
3888
- return u1(() => {
3887
+ const a = J(null);
3888
+ return g1(() => {
3889
3889
  const o = a.current;
3890
3890
  if (!o || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
3891
3891
  const n = Array.from({ length: e }, (s, i) => {
@@ -3971,7 +3971,7 @@ function f() {
3971
3971
  return e;
3972
3972
  }, f.apply(null, arguments);
3973
3973
  }
3974
- function Y(e, t) {
3974
+ function j(e, t) {
3975
3975
  if (e == null) return {};
3976
3976
  var r = {};
3977
3977
  for (var a in e) if ({}.hasOwnProperty.call(e, a)) {
@@ -4176,7 +4176,7 @@ var $0 = ["style"];
4176
4176
  function T2(e) {
4177
4177
  var {
4178
4178
  style: t
4179
- } = e, r = Y(e, $0), a = f({
4179
+ } = e, r = j(e, $0), a = f({
4180
4180
  cursor: "pointer",
4181
4181
  height: "1em",
4182
4182
  width: "1em",
@@ -4372,7 +4372,7 @@ var $1 = () => N1(B5), z2 = (e) => {
4372
4372
  initialState: r,
4373
4373
  initialTypes: a
4374
4374
  } = e, [o, n] = ae(l4, Object.assign({}, O2, r)), [s, i] = j0(), [d, h] = J0(), [C, p] = X0(), [u, m] = e4(), [b, x] = a4();
4375
- return u1(() => n(f({}, r)), [r]), /* @__PURE__ */ l(B5.Provider, {
4375
+ return g1(() => n(f({}, r)), [r]), /* @__PURE__ */ l(B5.Provider, {
4376
4376
  value: o,
4377
4377
  children: /* @__PURE__ */ l(X2.Provider, {
4378
4378
  value: n,
@@ -4413,12 +4413,12 @@ var i4 = ["isNumber", "value", "parentValue", "keyName", "keys"], c4 = ["as", "r
4413
4413
  parentValue: o,
4414
4414
  keyName: n,
4415
4415
  keys: s
4416
- } = e, i = Y(e, i4);
4416
+ } = e, i = j(e, i4);
4417
4417
  if (r) return null;
4418
4418
  var {
4419
4419
  as: d,
4420
4420
  render: h
4421
- } = t, C = Y(t, c4), p = d || "span", u = f({}, i, C), m = {
4421
+ } = t, C = j(t, c4), p = d || "span", u = f({}, i, C), m = {
4422
4422
  value: a,
4423
4423
  parentValue: o,
4424
4424
  keyName: n,
@@ -4433,7 +4433,7 @@ var ve = (e) => {
4433
4433
  } = E1(), r = f({}, (n4(e), e)), {
4434
4434
  as: a,
4435
4435
  render: o
4436
- } = t, n = Y(t, s4), s = a || "span", i = f({}, r, n), d = o && typeof o == "function" && o(i, {});
4436
+ } = t, n = j(t, s4), s = a || "span", i = f({}, r, n), d = o && typeof o == "function" && o(i, {});
4437
4437
  return d || /* @__PURE__ */ l(s, f({}, i));
4438
4438
  };
4439
4439
  ve.displayName = "JVR.ValueQuote";
@@ -4448,7 +4448,7 @@ var $2 = (e) => {
4448
4448
  } = E1(), {
4449
4449
  as: s,
4450
4450
  render: i
4451
- } = n, d = Y(n, d4), h = s || "span", C = i && typeof i == "function" && i(d, {
4451
+ } = n, d = j(n, d4), h = s || "span", C = i && typeof i == "function" && i(d, {
4452
4452
  value: t,
4453
4453
  parentValue: r,
4454
4454
  keyName: a,
@@ -4471,7 +4471,7 @@ var _2 = (e) => {
4471
4471
  as: C,
4472
4472
  style: p,
4473
4473
  render: u
4474
- } = t, m = Y(t, h4), b = C || "span", x = u && typeof u == "function", A = f({}, m, {
4474
+ } = t, m = j(t, h4), b = C || "span", x = u && typeof u == "function", k = f({}, m, {
4475
4475
  "data-expanded": h,
4476
4476
  style: f({}, p, o)
4477
4477
  }), w = {
@@ -4479,7 +4479,7 @@ var _2 = (e) => {
4479
4479
  parentValue: s,
4480
4480
  keyName: i,
4481
4481
  keys: d || (i ? [i] : [])
4482
- }, y = x && u(A, w);
4482
+ }, y = x && u(k, w);
4483
4483
  return y || /* @__PURE__ */ l(b, f({}, m, {
4484
4484
  style: f({}, p, o)
4485
4485
  }));
@@ -4505,14 +4505,14 @@ var et = (e) => {
4505
4505
  var {
4506
4506
  as: h,
4507
4507
  render: C
4508
- } = s, p = Y(s, C4), u = h || "span", m = C && typeof C == "function" && C(p, d);
4508
+ } = s, p = j(s, C4), u = h || "span", m = C && typeof C == "function" && C(p, d);
4509
4509
  return m || /* @__PURE__ */ l(u, f({}, p));
4510
4510
  }
4511
4511
  var {
4512
4512
  as: b,
4513
4513
  render: x
4514
- } = i, A = Y(i, u4), w = b || "span", y = x && typeof x == "function" && x(A, d);
4515
- return y || /* @__PURE__ */ l(w, f({}, A));
4514
+ } = i, k = j(i, u4), w = b || "span", y = x && typeof x == "function" && x(k, d);
4515
+ return y || /* @__PURE__ */ l(w, f({}, k));
4516
4516
  };
4517
4517
  et.displayName = "JVR.BracketsOpen";
4518
4518
  var V5 = (e) => {
@@ -4538,13 +4538,13 @@ var V5 = (e) => {
4538
4538
  var {
4539
4539
  as: C,
4540
4540
  render: p
4541
- } = d, u = Y(d, p4), m = C || "span", b = p && typeof p == "function" && p(u, i);
4541
+ } = d, u = j(d, p4), m = C || "span", b = p && typeof p == "function" && p(u, i);
4542
4542
  return b || /* @__PURE__ */ l(m, f({}, u));
4543
4543
  }
4544
4544
  var {
4545
4545
  as: x,
4546
- render: A
4547
- } = h, w = Y(h, g4), y = x || "span", I = A && typeof A == "function" && A(w, i);
4546
+ render: k
4547
+ } = h, w = j(h, g4), y = x || "span", I = k && typeof k == "function" && k(w, i);
4548
4548
  return I || /* @__PURE__ */ l(y, f({}, w));
4549
4549
  };
4550
4550
  V5.displayName = "JVR.BracketsClose";
@@ -4573,7 +4573,7 @@ var tt = (e) => {
4573
4573
  return null;
4574
4574
  var x = {
4575
4575
  paddingLeft: 4
4576
- }, A = {
4576
+ }, k = {
4577
4577
  keyName: r,
4578
4578
  value: a,
4579
4579
  keys: i,
@@ -4583,7 +4583,7 @@ var tt = (e) => {
4583
4583
  style: x,
4584
4584
  children: /* @__PURE__ */ l(V5, f({
4585
4585
  isBrackets: w || y
4586
- }, A, {
4586
+ }, k, {
4587
4587
  isVisiable: !0
4588
4588
  }))
4589
4589
  });
@@ -4611,7 +4611,7 @@ var m4 = ["as", "render"], b4 = ["as", "render"], f4 = ["as", "render"], w4 = ["
4611
4611
  var {
4612
4612
  as: s,
4613
4613
  render: i
4614
- } = a, d = Y(a, m4), h = i && typeof i == "function", C = h && i(d, {
4614
+ } = a, d = j(a, m4), h = i && typeof i == "function", C = h && i(d, {
4615
4615
  type: "type",
4616
4616
  value: t,
4617
4617
  keyName: r
@@ -4633,7 +4633,7 @@ var at = (e) => {
4633
4633
  var {
4634
4634
  as: s,
4635
4635
  render: i
4636
- } = a, d = Y(a, b4), h = i && typeof i == "function", C = h && i(d, {
4636
+ } = a, d = j(a, b4), h = i && typeof i == "function", C = h && i(d, {
4637
4637
  type: "type",
4638
4638
  value: t,
4639
4639
  keyName: r
@@ -4660,15 +4660,15 @@ var L1 = {
4660
4660
  } = $1(), {
4661
4661
  as: d,
4662
4662
  render: h
4663
- } = o, C = Y(o, f4), p = t, [u, m] = H(s && p.length > s);
4664
- u1(() => m(s && p.length > s), [s]);
4663
+ } = o, C = j(o, f4), p = t, [u, m] = q(s && p.length > s);
4664
+ g1(() => m(s && p.length > s), [s]);
4665
4665
  var b = d || "span", x = f({}, L1, o.style || {});
4666
4666
  s > 0 && (C.style = f({}, C.style, {
4667
4667
  cursor: p.length <= s ? "initial" : "pointer"
4668
4668
  }), p.length > s && (C.onClick = () => {
4669
4669
  m(!u);
4670
4670
  }));
4671
- var A = u ? "" + p.slice(0, s) + i : p, w = h && typeof h == "function", y = w && h(f({}, C, {
4671
+ var k = u ? "" + p.slice(0, s) + i : p, w = h && typeof h == "function", y = w && h(f({}, C, {
4672
4672
  style: x
4673
4673
  }), {
4674
4674
  type: "type",
@@ -4676,7 +4676,7 @@ var L1 = {
4676
4676
  keyName: r,
4677
4677
  keys: a
4678
4678
  }), I = u ? "w-rjv-value w-rjv-value-short" : "w-rjv-value", V = w && h(f({}, C, {
4679
- children: A,
4679
+ children: k,
4680
4680
  className: I
4681
4681
  }), {
4682
4682
  type: "value",
@@ -4690,7 +4690,7 @@ var L1 = {
4690
4690
  }))), V || /* @__PURE__ */ v(k1, {
4691
4691
  children: [/* @__PURE__ */ l(ve, {}), /* @__PURE__ */ l(b, f({}, C, {
4692
4692
  className: I,
4693
- children: A
4693
+ children: k
4694
4694
  })), /* @__PURE__ */ l(ve, {})]
4695
4695
  })]
4696
4696
  });
@@ -4707,7 +4707,7 @@ var lt = (e) => {
4707
4707
  } = i1(), {
4708
4708
  as: s,
4709
4709
  render: i
4710
- } = o, d = Y(o, w4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
4710
+ } = o, d = j(o, w4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
4711
4711
  style: C
4712
4712
  }), {
4713
4713
  type: "type",
@@ -4744,7 +4744,7 @@ var nt = (e) => {
4744
4744
  } = i1(), {
4745
4745
  as: s,
4746
4746
  render: i
4747
- } = o, d = Y(o, v4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
4747
+ } = o, d = j(o, v4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
4748
4748
  style: C
4749
4749
  }), {
4750
4750
  type: "type",
@@ -4781,7 +4781,7 @@ var it = (e) => {
4781
4781
  } = i1(), {
4782
4782
  as: s,
4783
4783
  render: i
4784
- } = o, d = Y(o, x4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
4784
+ } = o, d = j(o, x4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
4785
4785
  style: C
4786
4786
  }), {
4787
4787
  type: "type",
@@ -4818,7 +4818,7 @@ var ct = (e) => {
4818
4818
  } = i1(), {
4819
4819
  as: s,
4820
4820
  render: i
4821
- } = o, d = Y(o, y4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
4821
+ } = o, d = j(o, y4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
4822
4822
  style: C
4823
4823
  }), {
4824
4824
  type: "type",
@@ -4855,7 +4855,7 @@ var st = (e) => {
4855
4855
  } = i1(), {
4856
4856
  as: s,
4857
4857
  render: i
4858
- } = o, d = Y(o, A4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
4858
+ } = o, d = j(o, A4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
4859
4859
  style: C
4860
4860
  }), {
4861
4861
  type: "type",
@@ -4892,7 +4892,7 @@ var dt = (e) => {
4892
4892
  } = i1(), {
4893
4893
  as: s,
4894
4894
  render: i
4895
- } = o, d = Y(o, k4), h = s || "span", C = f({}, L1, o.style), p = i && typeof i == "function", u = p && i(f({}, d, {
4895
+ } = o, d = j(o, k4), h = s || "span", C = f({}, L1, o.style), p = i && typeof i == "function", u = p && i(f({}, d, {
4896
4896
  style: C
4897
4897
  }), {
4898
4898
  type: "type",
@@ -4932,7 +4932,7 @@ var ht = (e) => {
4932
4932
  } = i1(), {
4933
4933
  as: s,
4934
4934
  render: i
4935
- } = o, d = Y(o, E4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
4935
+ } = o, d = j(o, E4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
4936
4936
  style: C
4937
4937
  }), {
4938
4938
  type: "type",
@@ -4969,7 +4969,7 @@ var Ct = (e) => {
4969
4969
  } = i1(), {
4970
4970
  as: s,
4971
4971
  render: i
4972
- } = o, d = Y(o, B4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
4972
+ } = o, d = j(o, B4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
4973
4973
  style: C
4974
4974
  }), {
4975
4975
  type: "type",
@@ -5003,7 +5003,7 @@ var ut = (e) => {
5003
5003
  } = i1(), {
5004
5004
  as: s,
5005
5005
  render: i
5006
- } = o, d = Y(o, V4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
5006
+ } = o, d = j(o, V4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
5007
5007
  style: C
5008
5008
  }), {
5009
5009
  type: "type",
@@ -5037,7 +5037,7 @@ var pt = (e) => {
5037
5037
  } = i1(), {
5038
5038
  as: s,
5039
5039
  render: i
5040
- } = o, d = Y(o, M4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
5040
+ } = o, d = j(o, M4), h = s || "span", C = f({}, L1, o.style || {}), p = i && typeof i == "function", u = p && i(f({}, d, {
5041
5041
  style: C
5042
5042
  }), {
5043
5043
  type: "type",
@@ -5100,7 +5100,7 @@ function q1(e, t, r) {
5100
5100
  style: f({}, e.style, t.style),
5101
5101
  children: t.children || e.children
5102
5102
  });
5103
- u1(() => a({
5103
+ g1(() => a({
5104
5104
  [r]: n
5105
5105
  }), [t]);
5106
5106
  }
@@ -5110,7 +5110,7 @@ function V1(e, t, r) {
5110
5110
  style: f({}, e.style, t.style),
5111
5111
  children: t.children || e.children
5112
5112
  });
5113
- u1(() => a({
5113
+ g1(() => a({
5114
5114
  [r]: n
5115
5115
  }), [t]);
5116
5116
  }
@@ -5120,7 +5120,7 @@ function ce(e, t, r) {
5120
5120
  style: f({}, e.style, t.style),
5121
5121
  children: t.children || e.children
5122
5122
  });
5123
- u1(() => a({
5123
+ g1(() => a({
5124
5124
  [r]: n
5125
5125
  }), [t]);
5126
5126
  }
@@ -5145,7 +5145,7 @@ var bt = (e) => {
5145
5145
  } = S1(), {
5146
5146
  as: h,
5147
5147
  render: C
5148
- } = d, p = Y(d, S4);
5148
+ } = d, p = j(d, S4);
5149
5149
  p.style = f({}, p.style, i);
5150
5150
  var u = h || "span", m = C && typeof C == "function" && C(f({}, p, {
5151
5151
  children: t
@@ -5174,12 +5174,12 @@ var wt = (e) => {
5174
5174
  parentValue: a,
5175
5175
  keyName: o,
5176
5176
  keys: n
5177
- } = e, s = Y(e, Z4), {
5177
+ } = e, s = j(e, Z4), {
5178
5178
  Row: i = {}
5179
5179
  } = S1(), {
5180
5180
  as: d,
5181
5181
  render: h
5182
- } = i, C = Y(i, F4), p = d || "div", u = h && typeof h == "function" && h(f({}, s, C, {
5182
+ } = i, C = j(i, F4), p = d || "div", u = h && typeof h == "function" && h(f({}, s, C, {
5183
5183
  children: t
5184
5184
  }), {
5185
5185
  value: r,
@@ -5193,8 +5193,8 @@ var wt = (e) => {
5193
5193
  };
5194
5194
  wt.displayName = "JVR.RowComp";
5195
5195
  function N4(e) {
5196
- var t = U();
5197
- return u1(() => {
5196
+ var t = J();
5197
+ return g1(() => {
5198
5198
  t.current = e;
5199
5199
  }), t.current;
5200
5200
  }
@@ -5216,7 +5216,7 @@ function L4(e) {
5216
5216
  if (t !== o)
5217
5217
  return !0;
5218
5218
  }, [r, t]);
5219
- u1(() => {
5219
+ g1(() => {
5220
5220
  a && a.current && n && "animate" in a.current && a.current.animate([{
5221
5221
  backgroundColor: "var(--w-rjv-update-color, #ebcb8b)"
5222
5222
  }, {
@@ -5234,30 +5234,30 @@ var D4 = ["keyName", "value", "parentValue", "expandKey", "keys"], Q4 = ["as", "
5234
5234
  parentValue: a,
5235
5235
  expandKey: o,
5236
5236
  keys: n
5237
- } = e, s = Y(e, D4), {
5237
+ } = e, s = j(e, D4), {
5238
5238
  onCopied: i,
5239
5239
  enableClipboard: d
5240
- } = $1(), h = H0(), C = h[o], [p, u] = H(!1), {
5240
+ } = $1(), h = H0(), C = h[o], [p, u] = q(!1), {
5241
5241
  Copied: m = {}
5242
5242
  } = S1();
5243
5243
  if (d === !1 || !C) return null;
5244
5244
  var b = (D) => {
5245
5245
  D.stopPropagation();
5246
- var S = "";
5247
- typeof r == "number" && r === 1 / 0 ? S = "Infinity" : typeof r == "number" && isNaN(r) ? S = "NaN" : typeof r == "bigint" ? S = l5(r) : r instanceof Date ? S = r.toLocaleString() : S = JSON.stringify(r, (Z, M) => typeof M == "bigint" ? l5(M) : M, 2), i && i(S, r), u(!0);
5248
- var N = navigator.clipboard || {
5249
- writeText(Z) {
5250
- return new Promise((M, F) => {
5251
- var L = document.createElement("textarea");
5252
- L.style.position = "absolute", L.style.opacity = "0", L.style.left = "-99999999px", L.value = Z, document.body.appendChild(L), L.select(), document.execCommand("copy") ? M() : F(), L.remove();
5246
+ var Z = "";
5247
+ typeof r == "number" && r === 1 / 0 ? Z = "Infinity" : typeof r == "number" && isNaN(r) ? Z = "NaN" : typeof r == "bigint" ? Z = l5(r) : r instanceof Date ? Z = r.toLocaleString() : Z = JSON.stringify(r, (S, M) => typeof M == "bigint" ? l5(M) : M, 2), i && i(Z, r), u(!0);
5248
+ var L = navigator.clipboard || {
5249
+ writeText(S) {
5250
+ return new Promise((M, N) => {
5251
+ var Q = document.createElement("textarea");
5252
+ Q.style.position = "absolute", Q.style.opacity = "0", Q.style.left = "-99999999px", Q.value = S, document.body.appendChild(Q), Q.select(), document.execCommand("copy") ? M() : N(), Q.remove();
5253
5253
  });
5254
5254
  }
5255
5255
  };
5256
- N.writeText(S).then(() => {
5257
- var Z = setTimeout(() => {
5258
- u(!1), clearTimeout(Z);
5256
+ L.writeText(Z).then(() => {
5257
+ var S = setTimeout(() => {
5258
+ u(!1), clearTimeout(S);
5259
5259
  }, 3e3);
5260
- }).catch((Z) => {
5260
+ }).catch((S) => {
5261
5261
  });
5262
5262
  }, x = {
5263
5263
  style: {
@@ -5266,10 +5266,10 @@ var D4 = ["keyName", "value", "parentValue", "expandKey", "keys"], Q4 = ["as", "
5266
5266
  fill: p ? "var(--w-rjv-copied-success-color, #28a745)" : "var(--w-rjv-copied-color, currentColor)",
5267
5267
  onClick: b
5268
5268
  }, {
5269
- render: A
5270
- } = m, w = Y(m, Q4), y = f({}, w, s, x, {
5269
+ render: k
5270
+ } = m, w = j(m, Q4), y = f({}, w, s, x, {
5271
5271
  style: f({}, w.style, s.style, x.style)
5272
- }), I = A && typeof A == "function", V = I && A(f({}, y, {
5272
+ }), I = k && typeof k == "function", V = I && k(f({}, y, {
5273
5273
  "data-copied": p
5274
5274
  }), {
5275
5275
  value: r,
@@ -5293,7 +5293,7 @@ var D4 = ["keyName", "value", "parentValue", "expandKey", "keys"], Q4 = ["as", "
5293
5293
  };
5294
5294
  M5.displayName = "JVR.Copied";
5295
5295
  function vt() {
5296
- var e = U(null);
5296
+ var e = J(null);
5297
5297
  return e.current === null && (e.current = "custom-id-" + Math.random().toString(36).substr(2, 9)), e.current;
5298
5298
  }
5299
5299
  var xt = (e) => {
@@ -5318,13 +5318,13 @@ var xt = (e) => {
5318
5318
  });
5319
5319
  if (d[o] === void 0 && x || b)
5320
5320
  return null;
5321
- var A = Array.isArray(a), w = A ? Object.entries(a).map((I) => [Number(I[0]), I[1]]) : Object.entries(a);
5321
+ var k = Array.isArray(a), w = k ? Object.entries(a).map((I) => [Number(I[0]), I[1]]) : Object.entries(a);
5322
5322
  h && (w = h === !0 ? w.sort((I, V) => {
5323
- var [D] = I, [S] = V;
5324
- return typeof D == "string" && typeof S == "string" ? D.localeCompare(S) : 0;
5323
+ var [D] = I, [Z] = V;
5324
+ return typeof D == "string" && typeof Z == "string" ? D.localeCompare(Z) : 0;
5325
5325
  }) : w.sort((I, V) => {
5326
- var [D, S] = I, [N, Z] = V;
5327
- return typeof D == "string" && typeof N == "string" ? h(D, N, S, Z) : 0;
5326
+ var [D, Z] = I, [L, S] = V;
5327
+ return typeof D == "string" && typeof L == "string" ? h(D, L, Z, S) : 0;
5328
5328
  }));
5329
5329
  var y = {
5330
5330
  borderLeft: "var(--w-rjv-border-left-width, 1px) var(--w-rjv-line-style, solid) var(--w-rjv-line-color, #ebebeb)",
@@ -5335,12 +5335,12 @@ var xt = (e) => {
5335
5335
  className: "w-rjv-wrap",
5336
5336
  style: y,
5337
5337
  children: w.map((I, V) => {
5338
- var [D, S] = I;
5338
+ var [D, Z] = I;
5339
5339
  return /* @__PURE__ */ l(yt, {
5340
5340
  parentValue: a,
5341
5341
  keyName: D,
5342
5342
  keys: [...s, D],
5343
- value: S,
5343
+ value: Z,
5344
5344
  level: n
5345
5345
  }, V);
5346
5346
  })
@@ -5355,7 +5355,7 @@ var I5 = (e) => {
5355
5355
  value: o
5356
5356
  } = e, {
5357
5357
  highlightUpdates: n
5358
- } = $1(), s = typeof t == "number", i = U(null);
5358
+ } = $1(), s = typeof t == "number", i = J(null);
5359
5359
  L4({
5360
5360
  value: o,
5361
5361
  highlightUpdates: n,
@@ -5402,7 +5402,7 @@ var yt = (e) => {
5402
5402
  level: o + 1
5403
5403
  });
5404
5404
  }
5405
- var A = {
5405
+ var k = {
5406
5406
  onMouseEnter: () => s({
5407
5407
  [i]: !0
5408
5408
  }),
@@ -5416,7 +5416,7 @@ var yt = (e) => {
5416
5416
  keyName: t,
5417
5417
  keys: n,
5418
5418
  parentValue: a
5419
- }, A, {
5419
+ }, k, {
5420
5420
  children: [/* @__PURE__ */ l(I5, {
5421
5421
  keyName: t,
5422
5422
  value: r,
@@ -5447,12 +5447,12 @@ var kt = (e) => {
5447
5447
  var {
5448
5448
  value: t = {},
5449
5449
  keyName: r
5450
- } = e, a = Y(e, P4), {
5450
+ } = e, a = j(e, P4), {
5451
5451
  CountInfoExtra: o = {}
5452
5452
  } = S1(), {
5453
5453
  as: n,
5454
5454
  render: s
5455
- } = o, i = Y(o, K4);
5455
+ } = o, i = j(o, K4);
5456
5456
  if (!s && !i.children) return null;
5457
5457
  var d = n || "span", h = s && typeof s == "function", C = f({}, i, a), p = h && s(C, {
5458
5458
  value: t,
@@ -5472,7 +5472,7 @@ var Bt = (e) => {
5472
5472
  var {
5473
5473
  value: t = {},
5474
5474
  keyName: r
5475
- } = e, a = Y(e, R4), {
5475
+ } = e, a = j(e, R4), {
5476
5476
  displayObjectSize: o
5477
5477
  } = $1(), {
5478
5478
  CountInfo: n = {}
@@ -5481,7 +5481,7 @@ var Bt = (e) => {
5481
5481
  var {
5482
5482
  as: s,
5483
5483
  render: i
5484
- } = n, d = Y(n, W4), h = s || "span";
5484
+ } = n, d = j(n, W4), h = s || "span";
5485
5485
  d.style = f({}, d.style, e.style);
5486
5486
  var C = Object.keys(t).length;
5487
5487
  d.children || (d.children = C + " item" + (C === 1 ? "" : "s"));
@@ -5511,7 +5511,7 @@ var Mt = (e) => {
5511
5511
  } = S1(), {
5512
5512
  as: n,
5513
5513
  render: s
5514
- } = o, i = Y(o, G4), d = n || "span", h = s && typeof s == "function" && s(f({}, i, {
5514
+ } = o, i = j(o, G4), d = n || "span", h = s && typeof s == "function" && s(f({}, i, {
5515
5515
  "data-expanded": t
5516
5516
  }), {
5517
5517
  value: r,
@@ -5533,23 +5533,23 @@ var It = (e) => {
5533
5533
  onExpand: p,
5534
5534
  collapsed: u,
5535
5535
  shouldExpandNodeInitially: m
5536
- } = $1(), b = typeof u == "boolean" ? u : typeof u == "number" ? d > u : !1, x = (t = h[a]) != null ? t : b, A = m && m(x, {
5536
+ } = $1(), b = typeof u == "boolean" ? u : typeof u == "number" ? d > u : !1, x = (t = h[a]) != null ? t : b, k = m && m(x, {
5537
5537
  value: s,
5538
5538
  keys: o,
5539
5539
  level: d,
5540
5540
  keyName: r,
5541
5541
  parentValue: i
5542
5542
  });
5543
- h[a] === void 0 && m && (x = !!A);
5543
+ h[a] === void 0 && m && (x = !!k);
5544
5544
  var w = () => {
5545
- var L = {
5545
+ var Q = {
5546
5546
  expand: !x,
5547
5547
  value: s,
5548
5548
  keyid: a,
5549
5549
  keyName: r
5550
5550
  };
5551
- p && p(L), C({
5552
- [a]: L.expand
5551
+ p && p(Q), C({
5552
+ [a]: Q.expand
5553
5553
  });
5554
5554
  }, y = {
5555
5555
  display: "inline-flex",
@@ -5557,36 +5557,36 @@ var It = (e) => {
5557
5557
  }, I = {
5558
5558
  transform: "rotate(" + (x ? "-90" : "0") + "deg)",
5559
5559
  transition: "all 0.3s"
5560
- }, V = Object.keys(s).length, D = typeof s == "object", S = Array.isArray(s), N = s instanceof Set, Z = V !== 0 && (S || N || D), M = {
5560
+ }, V = Object.keys(s).length, D = typeof s == "object", Z = Array.isArray(s), L = s instanceof Set, S = V !== 0 && (Z || L || D), M = {
5561
5561
  style: y
5562
5562
  };
5563
- Z && (M.onClick = w);
5564
- var F = {
5563
+ S && (M.onClick = w);
5564
+ var N = {
5565
5565
  keyName: r,
5566
5566
  value: s,
5567
5567
  keys: o,
5568
5568
  parentValue: i
5569
5569
  };
5570
5570
  return /* @__PURE__ */ v("span", f({}, M, {
5571
- children: [Z && /* @__PURE__ */ l(_2, f({
5571
+ children: [S && /* @__PURE__ */ l(_2, f({
5572
5572
  style: I,
5573
5573
  expandKey: a
5574
- }, F)), (r || typeof r == "number") && /* @__PURE__ */ l(I5, f({}, F)), /* @__PURE__ */ l(rt, {
5574
+ }, N)), (r || typeof r == "number") && /* @__PURE__ */ l(I5, f({}, N)), /* @__PURE__ */ l(rt, {
5575
5575
  value: n,
5576
5576
  keyName: r
5577
5577
  }), /* @__PURE__ */ l(at, {
5578
5578
  value: n,
5579
5579
  keyName: r
5580
5580
  }), /* @__PURE__ */ l(et, f({
5581
- isBrackets: S || N
5582
- }, F)), /* @__PURE__ */ l(Mt, {
5581
+ isBrackets: Z || L
5582
+ }, N)), /* @__PURE__ */ l(Mt, {
5583
5583
  keyName: r,
5584
5584
  value: s,
5585
5585
  isExpanded: x
5586
5586
  }), /* @__PURE__ */ l(V5, f({
5587
- isVisiable: x || !Z,
5588
- isBrackets: S || N
5589
- }, F)), /* @__PURE__ */ l(Bt, {
5587
+ isVisiable: x || !S,
5588
+ isBrackets: Z || L
5589
+ }, N)), /* @__PURE__ */ l(Bt, {
5590
5590
  value: s,
5591
5591
  keyName: r
5592
5592
  }), /* @__PURE__ */ l(kt, {
@@ -5611,7 +5611,7 @@ var T4 = ["className", "children", "parentValue", "keyid", "level", "value", "in
5611
5611
  initialValue: s,
5612
5612
  keys: i,
5613
5613
  keyName: d
5614
- } = e, h = Y(e, T4), C = L2(), p = vt(), u = [r, "w-rjv-inner"].filter(Boolean).join(" "), m = {
5614
+ } = e, h = j(e, T4), C = L2(), p = vt(), u = [r, "w-rjv-inner"].filter(Boolean).join(" "), m = {
5615
5615
  onMouseEnter: () => C({
5616
5616
  [p]: !0
5617
5617
  }),
@@ -5803,7 +5803,7 @@ var zt = (e) => {
5803
5803
  return ce(t, e, "Copied"), null;
5804
5804
  };
5805
5805
  zt.displayName = "JVR.Copied";
5806
- var Y4 = ["className", "style", "value", "children", "collapsed", "shouldExpandNodeInitially", "indentWidth", "displayObjectSize", "shortenTextAfterLength", "stringEllipsis", "highlightUpdates", "enableClipboard", "displayDataTypes", "objectSortKeys", "onExpand", "onCopied"], z = /* @__PURE__ */ s5((e, t) => {
5806
+ var Y4 = ["className", "style", "value", "children", "collapsed", "shouldExpandNodeInitially", "indentWidth", "displayObjectSize", "shortenTextAfterLength", "stringEllipsis", "highlightUpdates", "enableClipboard", "displayDataTypes", "objectSortKeys", "onExpand", "onCopied"], _ = /* @__PURE__ */ s5((e, t) => {
5807
5807
  var {
5808
5808
  className: r = "",
5809
5809
  style: a,
@@ -5819,9 +5819,9 @@ var Y4 = ["className", "style", "value", "children", "collapsed", "shouldExpandN
5819
5819
  enableClipboard: m = !0,
5820
5820
  displayDataTypes: b = !0,
5821
5821
  objectSortKeys: x = !1,
5822
- onExpand: A,
5822
+ onExpand: k,
5823
5823
  onCopied: w
5824
- } = e, y = Y(e, Y4), I = f({
5824
+ } = e, y = j(e, Y4), I = f({
5825
5825
  lineHeight: 1.4,
5826
5826
  fontFamily: "var(--w-rjv-font-family, Menlo, monospace)",
5827
5827
  color: "var(--w-rjv-color, #002b36)",
@@ -5841,7 +5841,7 @@ var Y4 = ["className", "style", "value", "children", "collapsed", "shouldExpandN
5841
5841
  stringEllipsis: p,
5842
5842
  highlightUpdates: u,
5843
5843
  onCopied: w,
5844
- onExpand: A
5844
+ onExpand: k
5845
5845
  },
5846
5846
  initialTypes: {
5847
5847
  displayDataTypes: b
@@ -5855,34 +5855,34 @@ var Y4 = ["className", "style", "value", "children", "collapsed", "shouldExpandN
5855
5855
  })), n]
5856
5856
  });
5857
5857
  });
5858
- z.Bigint = Kt;
5859
- z.Date = Rt;
5860
- z.False = Wt;
5861
- z.Float = Gt;
5862
- z.Int = Tt;
5863
- z.Map = Yt;
5864
- z.Nan = Ht;
5865
- z.Null = jt;
5866
- z.Set = qt;
5867
- z.String = Jt;
5868
- z.True = Ut;
5869
- z.Undefined = Ot;
5870
- z.Url = Xt;
5871
- z.ValueQuote = Pt;
5872
- z.Arrow = Lt;
5873
- z.Colon = Dt;
5874
- z.Quote = Qt;
5875
- z.Ellipsis = Vt;
5876
- z.BraceLeft = St;
5877
- z.BraceRight = Zt;
5878
- z.BracketsLeft = Ft;
5879
- z.BracketsRight = Nt;
5880
- z.Copied = zt;
5881
- z.CountInfo = Et;
5882
- z.CountInfoExtra = At;
5883
- z.KeyName = mt;
5884
- z.Row = ft;
5885
- z.displayName = "JVR.JsonView";
5858
+ _.Bigint = Kt;
5859
+ _.Date = Rt;
5860
+ _.False = Wt;
5861
+ _.Float = Gt;
5862
+ _.Int = Tt;
5863
+ _.Map = Yt;
5864
+ _.Nan = Ht;
5865
+ _.Null = jt;
5866
+ _.Set = qt;
5867
+ _.String = Jt;
5868
+ _.True = Ut;
5869
+ _.Undefined = Ot;
5870
+ _.Url = Xt;
5871
+ _.ValueQuote = Pt;
5872
+ _.Arrow = Lt;
5873
+ _.Colon = Dt;
5874
+ _.Quote = Qt;
5875
+ _.Ellipsis = Vt;
5876
+ _.BraceLeft = St;
5877
+ _.BraceRight = Zt;
5878
+ _.BracketsLeft = Ft;
5879
+ _.BracketsRight = Nt;
5880
+ _.Copied = zt;
5881
+ _.CountInfo = Et;
5882
+ _.CountInfoExtra = At;
5883
+ _.KeyName = mt;
5884
+ _.Row = ft;
5885
+ _.displayName = "JVR.JsonView";
5886
5886
  const sa = ({
5887
5887
  code: e,
5888
5888
  json: t,
@@ -5904,7 +5904,7 @@ const sa = ({
5904
5904
  ...o
5905
5905
  },
5906
5906
  children: /* @__PURE__ */ l(
5907
- z,
5907
+ _,
5908
5908
  {
5909
5909
  value: t,
5910
5910
  style: {
@@ -6209,7 +6209,7 @@ const X5 = 8, J1 = 8, i5 = {
6209
6209
  },
6210
6210
  className: "flex items-center justify-center cursor-pointer",
6211
6211
  children: /* @__PURE__ */ l(
6212
- r1.CaretDownIcon,
6212
+ a1.CaretDownIcon,
6213
6213
  {
6214
6214
  size: 13,
6215
6215
  style: {
@@ -6268,7 +6268,7 @@ const X5 = 8, J1 = 8, i5 = {
6268
6268
  }
6269
6269
  ) }),
6270
6270
  /* @__PURE__ */ l("div", { className: "flex items-center justify-center shrink-0", children: /* @__PURE__ */ l(
6271
- r1.CaretDownIcon,
6271
+ a1.CaretDownIcon,
6272
6272
  {
6273
6273
  size: 13,
6274
6274
  style: {
@@ -6285,7 +6285,7 @@ const X5 = 8, J1 = 8, i5 = {
6285
6285
  );
6286
6286
  er.displayName = "DropdownTrigger";
6287
6287
  const U4 = ({ item: e, selected: t, onItemSelected: r }) => {
6288
- const [a, o] = H(!1), n = t ? "var(--malachite-success-background-glass, rgba(0, 175, 102, 0.08))" : a ? "var(--malachite-card-dimmed-background, rgb(247, 247, 247))" : "transparent", s = t ? "var(--malachite-text-success, rgb(2, 122, 66))" : "var(--malachite-text-primary, rgb(10, 10, 10))", i = e.rightSideTextVariant === "primary" ? "var(--malachite-text-right-side-text-primary, rgb(10, 10, 10))" : "var(--malachite-text-right-side-text-muted, rgb(123, 123, 123))", d = e.rightSideTextAlignment === "left" ? "flex-start" : "flex-end";
6288
+ const [a, o] = q(!1), n = t ? "var(--malachite-success-background-glass, rgba(0, 175, 102, 0.08))" : a ? "var(--malachite-card-dimmed-background, rgb(247, 247, 247))" : "transparent", s = t ? "var(--malachite-text-success, rgb(2, 122, 66))" : "var(--malachite-text-primary, rgb(10, 10, 10))", i = e.rightSideTextVariant === "primary" ? "var(--malachite-text-right-side-text-primary, rgb(10, 10, 10))" : "var(--malachite-text-right-side-text-muted, rgb(123, 123, 123))", d = e.rightSideTextAlignment === "left" ? "flex-start" : "flex-end";
6289
6289
  return /* @__PURE__ */ l(
6290
6290
  "div",
6291
6291
  {
@@ -6457,56 +6457,61 @@ const da = ({
6457
6457
  description: m,
6458
6458
  helperText: b,
6459
6459
  placeholder: x,
6460
- search: A = !1,
6460
+ search: k = !1,
6461
6461
  size: w = "medium"
6462
6462
  }) => {
6463
- const [y, I] = H(!1), [V, D] = H(
6463
+ const [y, I] = q(!1), [V, D] = q(
6464
6464
  e.find((K) => K.id === r)
6465
- );
6466
- u1(() => {
6467
- const K = e.find((G) => G.id === r);
6468
- D((G) => (G == null ? void 0 : G.id) === (K == null ? void 0 : K.id) ? G : K);
6465
+ ), Z = J(r);
6466
+ g1(() => {
6467
+ const K = Z.current !== r;
6468
+ Z.current = r, D((X) => {
6469
+ if (!K && X)
6470
+ return e.find((F) => F.id === X.id) ?? X;
6471
+ const A = e.find((F) => F.id === r);
6472
+ return (X == null ? void 0 : X.id) === (A == null ? void 0 : A.id) ? X : A;
6473
+ });
6469
6474
  }, [r, e]);
6470
- const [S, N] = H(""), Z = U(null), M = U(null), F = U(null), [L, a1] = H(null), $ = B1(() => {
6471
- var s1, E;
6472
- const K = M.current;
6475
+ const [L, S] = q(""), M = J(null), N = J(null), Q = J(null), [T, c1] = q(null), d1 = B1(() => {
6476
+ var E, G;
6477
+ const K = N.current;
6473
6478
  if (!K) return;
6474
- const G = K.getBoundingClientRect(), p1 = ((s1 = F.current) == null ? void 0 : s1.offsetWidth) || 180, k = ((E = F.current) == null ? void 0 : E.offsetHeight) ?? 0, Q = window.innerWidth - J1 * 2;
6475
- let T, P;
6479
+ const X = K.getBoundingClientRect(), A = ((E = Q.current) == null ? void 0 : E.offsetWidth) || 180, F = ((G = Q.current) == null ? void 0 : G.offsetHeight) ?? 0, W = window.innerWidth - J1 * 2;
6480
+ let P, U;
6476
6481
  if (w === "small") {
6477
- const R = Math.min(p1, Q), q = G.right - R, J = window.innerWidth - R - J1;
6478
- T = Math.max(J1, Math.min(q, J)), P = R;
6482
+ const Y = Math.min(A, W), O = X.right - Y, H = window.innerWidth - Y - J1;
6483
+ P = Math.max(J1, Math.min(O, H)), U = Y;
6479
6484
  } else {
6480
- P = Math.min(G.width, Q);
6481
- const R = window.innerWidth - P - J1;
6482
- T = Math.max(J1, Math.min(G.left, R));
6485
+ U = Math.min(X.width, W);
6486
+ const Y = window.innerWidth - U - J1;
6487
+ P = Math.max(J1, Math.min(X.left, Y));
6483
6488
  }
6484
- const t1 = window.innerHeight - G.bottom, _ = k > 0 && t1 < k + J1, c1 = _ ? G.top - k - X5 : G.bottom + X5;
6485
- a1({ top: c1, left: T, width: P, openUp: _ });
6489
+ const r1 = window.innerHeight - X.bottom, e1 = F > 0 && r1 < F + J1, p1 = e1 ? X.top - F - X5 : X.bottom + X5;
6490
+ c1({ top: p1, left: P, width: U, openUp: e1 });
6486
6491
  }, [w]);
6487
- u1(() => {
6492
+ g1(() => {
6488
6493
  if (!y) {
6489
- a1(null);
6494
+ c1(null);
6490
6495
  return;
6491
6496
  }
6492
- $();
6493
- const K = (k) => {
6494
- const Q = k.composedPath(), T = Z.current, P = F.current, t1 = !!T && Q.includes(T), _ = !!P && Q.includes(P);
6495
- !t1 && !_ && (I(!1), A && N(""));
6496
- }, G = (k) => {
6497
- k.key === "Escape" && (I(!1), A && N(""));
6498
- }, p1 = () => $();
6499
- return document.addEventListener("mousedown", K), document.addEventListener("keydown", G), window.addEventListener("scroll", p1, !0), window.addEventListener("resize", p1), () => {
6500
- document.removeEventListener("mousedown", K), document.removeEventListener("keydown", G), window.removeEventListener("scroll", p1, !0), window.removeEventListener("resize", p1);
6497
+ d1();
6498
+ const K = (F) => {
6499
+ const W = F.composedPath(), P = M.current, U = Q.current, r1 = !!P && W.includes(P), e1 = !!U && W.includes(U);
6500
+ !r1 && !e1 && (I(!1), k && S(""));
6501
+ }, X = (F) => {
6502
+ F.key === "Escape" && (I(!1), k && S(""));
6503
+ }, A = () => d1();
6504
+ return document.addEventListener("mousedown", K), document.addEventListener("keydown", X), window.addEventListener("scroll", A, !0), window.addEventListener("resize", A), () => {
6505
+ document.removeEventListener("mousedown", K), document.removeEventListener("keydown", X), window.removeEventListener("scroll", A, !0), window.removeEventListener("resize", A);
6501
6506
  };
6502
- }, [y, A, $]), oe(() => {
6503
- y && F.current && $();
6504
- }, [y, $]);
6505
- const f1 = (K) => {
6506
- D(K), I(!1), A && N(""), t == null || t(K == null ? void 0 : K.id);
6507
- }, o1 = (K, G) => {
6508
- const p1 = G.toLowerCase(), k = K.label.toLowerCase().includes(p1), Q = K.subtitle ? K.subtitle.toLowerCase().includes(p1) : !1, T = K.rightSideText ? K.rightSideText.toLowerCase().includes(p1) : !1;
6509
- return k || Q || T;
6507
+ }, [y, k, d1]), oe(() => {
6508
+ y && Q.current && d1();
6509
+ }, [y, d1]);
6510
+ const o1 = (K) => {
6511
+ D(K), I(!1), k && S(""), t == null || t(K == null ? void 0 : K.id);
6512
+ }, s1 = (K, X) => {
6513
+ const A = X.toLowerCase(), F = K.label.toLowerCase().includes(A), W = K.subtitle ? K.subtitle.toLowerCase().includes(A) : !1, P = K.rightSideText ? K.rightSideText.toLowerCase().includes(A) : !1;
6514
+ return F || W || P;
6510
6515
  };
6511
6516
  return /* @__PURE__ */ v(
6512
6517
  Ke,
@@ -6528,20 +6533,20 @@ const da = ({
6528
6533
  }
6529
6534
  ),
6530
6535
  children: [
6531
- /* @__PURE__ */ v("div", { ref: Z, className: "relative w-full", children: [
6536
+ /* @__PURE__ */ v("div", { ref: M, className: "relative w-full", children: [
6532
6537
  /* @__PURE__ */ l(
6533
6538
  er,
6534
6539
  {
6535
- ref: M,
6540
+ ref: N,
6536
6541
  isOpen: y,
6537
6542
  onClick: () => !a && I(!y),
6538
6543
  selectedItem: V,
6539
6544
  disabled: a,
6540
6545
  error: o,
6541
6546
  placeholder: x,
6542
- search: A,
6543
- searchQuery: S,
6544
- onSearchChange: N,
6547
+ search: k,
6548
+ searchQuery: L,
6549
+ onSearchChange: S,
6545
6550
  onFocusOpen: () => I(!0),
6546
6551
  size: w
6547
6552
  }
@@ -6550,20 +6555,20 @@ const da = ({
6550
6555
  /* @__PURE__ */ l(
6551
6556
  tr,
6552
6557
  {
6553
- ref: F,
6558
+ ref: Q,
6554
6559
  style: {
6555
6560
  position: "fixed",
6556
- top: (L == null ? void 0 : L.top) ?? 0,
6557
- left: (L == null ? void 0 : L.left) ?? 0,
6558
- width: w === "small" ? "auto" : L == null ? void 0 : L.width,
6561
+ top: (T == null ? void 0 : T.top) ?? 0,
6562
+ left: (T == null ? void 0 : T.left) ?? 0,
6563
+ width: w === "small" ? "auto" : T == null ? void 0 : T.width,
6559
6564
  maxWidth: w === "small" ? `calc(100vw - ${J1 * 2}px)` : void 0,
6560
6565
  // Hidden on first paint until measured (see the layout effect).
6561
- visibility: L ? "visible" : "hidden",
6562
- opacity: L ? 1 : 0,
6566
+ visibility: T ? "visible" : "hidden",
6567
+ opacity: T ? 1 : 0,
6563
6568
  zIndex: 2147483646
6564
6569
  },
6565
- items: A && S ? e.filter((K) => o1(K, S)) : e,
6566
- onItemSelected: f1,
6570
+ items: k && L ? e.filter((K) => s1(K, L)) : e,
6571
+ onItemSelected: o1,
6567
6572
  selectedItem: V,
6568
6573
  menuLoading: p
6569
6574
  }
@@ -6586,11 +6591,11 @@ const da = ({
6586
6591
  className: i = "",
6587
6592
  style: d
6588
6593
  }) => {
6589
- const [h, C] = H(!1), p = a === "small" ? "h-8" : "h-10", u = a === "small" ? 15 : 16, m = o === "muted", b = m ? "bg-[var(--malachite-card-border)]" : "bg-[var(--malachite-card-background)]", x = m ? "border-transparent" : "border-[var(--malachite-card-border)]", A = n ? "" : "hover:border-[var(--malachite-text-placeholder)]", w = m ? "text-[var(--malachite-text-secondary)]" : "text-[var(--malachite-text-placeholder)]", y = m ? "placeholder:text-[var(--malachite-text-secondary)]" : "placeholder:text-[var(--malachite-text-placeholder)]", I = m ? "none" : h ? "0px 1px 0px 0px rgba(0, 175, 102, 0.15)" : "0px 1px 1px 0px rgba(0, 0, 0, 0.15)";
6594
+ const [h, C] = q(!1), p = a === "small" ? "h-8" : "h-10", u = a === "small" ? 15 : 16, m = o === "muted", b = m ? "bg-[var(--malachite-card-border)]" : "bg-[var(--malachite-card-background)]", x = m ? "border-transparent" : "border-[var(--malachite-card-border)]", k = n ? "" : "hover:border-[var(--malachite-text-placeholder)]", w = m ? "text-[var(--malachite-text-secondary)]" : "text-[var(--malachite-text-placeholder)]", y = m ? "placeholder:text-[var(--malachite-text-secondary)]" : "placeholder:text-[var(--malachite-text-placeholder)]", I = m ? "none" : h ? "0px 1px 0px 0px rgba(0, 175, 102, 0.15)" : "0px 1px 1px 0px rgba(0, 0, 0, 0.15)";
6590
6595
  return /* @__PURE__ */ v(
6591
6596
  "div",
6592
6597
  {
6593
- className: `w-full ${b} border border-solid ${x} ${A} transition-colors rounded-[12px] flex items-center gap-[10px] px-[10px] ${p} ${n ? "opacity-60 cursor-not-allowed" : ""} ${i}`,
6598
+ className: `w-full ${b} border border-solid ${x} ${k} transition-colors rounded-[12px] flex items-center gap-[10px] px-[10px] ${p} ${n ? "opacity-60 cursor-not-allowed" : ""} ${i}`,
6594
6599
  style: {
6595
6600
  boxShadow: I,
6596
6601
  borderColor: h ? "var(--malachite-success-border-hover)" : void 0,
@@ -6684,31 +6689,31 @@ const da = ({
6684
6689
  onRemove: u,
6685
6690
  className: m = ""
6686
6691
  }) => {
6687
- const b = C ? { color: ye(C) } : void 0, x = U(null), A = U(null), [w, y] = H(!1), I = typeof e == "string" || typeof e == "number", V = B1((M) => {
6688
- var $;
6689
- if (($ = x.current) == null || $.disconnect(), x.current = null, A.current !== null && (cancelAnimationFrame(A.current), A.current = null), !M || typeof ResizeObserver > "u")
6692
+ const b = C ? { color: ye(C) } : void 0, x = J(null), k = J(null), [w, y] = q(!1), I = typeof e == "string" || typeof e == "number", V = B1((M) => {
6693
+ var c1;
6694
+ if ((c1 = x.current) == null || c1.disconnect(), x.current = null, k.current !== null && (cancelAnimationFrame(k.current), k.current = null), !M || typeof ResizeObserver > "u")
6690
6695
  return;
6691
- const F = () => {
6692
- A.current = null, M.clientWidth !== 0 && y((f1) => {
6696
+ const N = () => {
6697
+ k.current = null, M.clientWidth !== 0 && y((d1) => {
6693
6698
  const o1 = M.scrollWidth > M.clientWidth;
6694
- return f1 === o1 ? f1 : o1;
6699
+ return d1 === o1 ? d1 : o1;
6695
6700
  });
6696
- }, L = () => {
6697
- A.current === null && (A.current = requestAnimationFrame(F));
6701
+ }, Q = () => {
6702
+ k.current === null && (k.current = requestAnimationFrame(N));
6698
6703
  };
6699
- L();
6700
- const a1 = new ResizeObserver(L);
6701
- a1.observe(M), x.current = a1;
6704
+ Q();
6705
+ const T = new ResizeObserver(Q);
6706
+ T.observe(M), x.current = T;
6702
6707
  }, []), D = (M) => {
6703
6708
  a && (M.stopPropagation(), M.preventDefault(), a());
6704
- }, S = [
6709
+ }, Z = [
6705
6710
  O4(s),
6706
6711
  $4(t, i),
6707
6712
  n === "uppercase" ? "uppercase" : "normal-case",
6708
6713
  a ? "cursor-pointer" : `cursor-${p}`,
6709
6714
  I ? "min-w-0 max-w-full" : "",
6710
6715
  m
6711
- ].filter(Boolean).join(" "), N = _4(t, r, o, i), Z = /* @__PURE__ */ v("div", { className: S, onClick: D, style: N, children: [
6716
+ ].filter(Boolean).join(" "), L = _4(t, r, o, i), S = /* @__PURE__ */ v("div", { className: Z, onClick: D, style: L, children: [
6712
6717
  d && h === "left" && /* @__PURE__ */ l("span", { className: "mr-1 flex items-center", style: b, children: d }),
6713
6718
  I ? /* @__PURE__ */ l("span", { className: "flex items-center min-w-0", children: /* @__PURE__ */ l("span", { ref: V, className: "block min-w-0 truncate", children: e }, String(e)) }) : /* @__PURE__ */ l("span", { className: "flex items-center", children: e }),
6714
6719
  d && h === "right" && /* @__PURE__ */ l("span", { className: "ml-1 flex items-center", style: b, children: d }),
@@ -6725,7 +6730,7 @@ const da = ({
6725
6730
  }
6726
6731
  )
6727
6732
  ] });
6728
- return w ? /* @__PURE__ */ l(U1, { text: e, placement: "top", wrapChildren: !1, isShrinkable: !0, children: Z }) : Z;
6733
+ return w ? /* @__PURE__ */ l(U1, { text: e, placement: "top", wrapChildren: !1, isShrinkable: !0, children: S }) : S;
6729
6734
  }, qe = 8, t8 = 10, rr = "ArrowDown", ar = "ArrowUp", or = "Enter", r8 = "Backspace", a8 = "Escape", o8 = /* @__PURE__ */ new Set([rr, ar, or]), lr = P1.forwardRef(
6730
6735
  ({ triggerRole: e, disabled: t, children: r, ...a }, o) => e !== "button" ? /* @__PURE__ */ l(
6731
6736
  "div",
@@ -6765,122 +6770,122 @@ const Ca = ({
6765
6770
  label: m,
6766
6771
  name: b,
6767
6772
  description: x,
6768
- tooltip: A,
6773
+ tooltip: k,
6769
6774
  hint: w,
6770
6775
  required: y = !1,
6771
6776
  formControl: I,
6772
6777
  chips: V = !1,
6773
6778
  chipsRemovable: D = !0,
6774
- chipsMax: S = "auto",
6775
- inlineSearch: N = !1,
6776
- className: Z = "",
6779
+ chipsMax: Z = "auto",
6780
+ inlineSearch: L = !1,
6781
+ className: S = "",
6777
6782
  style: M
6778
6783
  }) => {
6779
- const F = d2(), L = `${F}-listbox`, a1 = (B) => `${F}-option-${B}`, [$, f1] = H(() => r ?? []), o1 = t !== void 0, K = o1 ? t : $, [G, p1] = H(!1), [k, Q] = H(
6784
+ const N = d2(), Q = `${N}-listbox`, T = (B) => `${N}-option-${B}`, [c1, d1] = q(() => r ?? []), o1 = t !== void 0, s1 = o1 ? t : c1, [K, X] = q(!1), [A, F] = q(
6780
6785
  null
6781
- ), [T, P] = H(""), [t1, _] = H(-1), c1 = U(null), s1 = U(null), E = U(null), R = U(null), q = U([]), J = W1(
6782
- () => e.filter((B) => K.includes(B.value)),
6783
- [e, K]
6784
- ), j = typeof S == "number" ? S : void 0, y1 = W1(() => {
6785
- const B = T.trim().toLowerCase();
6786
- return B ? e.filter((W) => (W.searchText ?? (typeof W.label == "string" ? W.label : "")).toLowerCase().includes(B)) : e;
6787
- }, [e, T]), Z1 = U(!1), Y1 = B1((B) => {
6786
+ ), [W, P] = q(""), [U, r1] = q(-1), e1 = J(null), p1 = J(null), E = J(null), G = J(null), Y = J([]), O = W1(
6787
+ () => e.filter((B) => s1.includes(B.value)),
6788
+ [e, s1]
6789
+ ), H = typeof Z == "number" ? Z : void 0, y1 = W1(() => {
6790
+ const B = W.trim().toLowerCase();
6791
+ return B ? e.filter((R) => (R.searchText ?? (typeof R.label == "string" ? R.label : "")).toLowerCase().includes(B)) : e;
6792
+ }, [e, W]), Z1 = J(!1), Y1 = B1((B) => {
6788
6793
  Z1.current = !0, P(B);
6789
6794
  }, []);
6790
- u1(() => {
6791
- Z1.current && (_(-1), Z1.current = !1);
6792
- }, [T]);
6793
- const se = N ? !1 : s ?? e.length > t8, d1 = B1(() => {
6795
+ g1(() => {
6796
+ Z1.current && (r1(-1), Z1.current = !1);
6797
+ }, [W]);
6798
+ const se = L ? !1 : s ?? e.length > t8, h1 = B1(() => {
6794
6799
  var H1, de;
6795
- const B = c1.current;
6800
+ const B = e1.current;
6796
6801
  if (!B) return;
6797
- const W = B.getBoundingClientRect(), h1 = ((H1 = E.current) == null ? void 0 : H1.offsetHeight) ?? 0, F1 = ((de = E.current) == null ? void 0 : de.offsetWidth) ?? W.width, A1 = W.left, g1 = window.innerWidth - F1 - qe, b1 = Math.max(qe, Math.min(A1, g1)), l1 = window.innerHeight - W.bottom, v1 = h1 > 0 && l1 < h1 + qe ? W.top - h1 - 4 : W.bottom + 4;
6798
- Q({ top: v1, left: b1, width: Math.max(W.width, h ?? 0) });
6802
+ const R = B.getBoundingClientRect(), C1 = ((H1 = E.current) == null ? void 0 : H1.offsetHeight) ?? 0, F1 = ((de = E.current) == null ? void 0 : de.offsetWidth) ?? R.width, A1 = R.left, m1 = window.innerWidth - F1 - qe, f1 = Math.max(qe, Math.min(A1, m1)), l1 = window.innerHeight - R.bottom, v1 = C1 > 0 && l1 < C1 + qe ? R.top - C1 - 4 : R.bottom + 4;
6803
+ F({ top: v1, left: f1, width: Math.max(R.width, h ?? 0) });
6799
6804
  }, [h]);
6800
- u1(() => {
6805
+ g1(() => {
6801
6806
  var F1;
6802
- if (!G) {
6803
- P(""), _(-1);
6807
+ if (!K) {
6808
+ P(""), r1(-1);
6804
6809
  return;
6805
6810
  }
6806
- d1(), N && ((F1 = s1.current) == null || F1.focus());
6807
- const B = () => d1(), W = (A1) => {
6808
- const g1 = A1.composedPath(), b1 = c1.current, l1 = E.current;
6809
- (!b1 || !g1.includes(b1)) && (!l1 || !g1.includes(l1)) && p1(!1);
6810
- }, h1 = (A1) => {
6811
- A1.key === a8 && p1(!1);
6811
+ h1(), L && ((F1 = p1.current) == null || F1.focus());
6812
+ const B = () => h1(), R = (A1) => {
6813
+ const m1 = A1.composedPath(), f1 = e1.current, l1 = E.current;
6814
+ (!f1 || !m1.includes(f1)) && (!l1 || !m1.includes(l1)) && X(!1);
6815
+ }, C1 = (A1) => {
6816
+ A1.key === a8 && X(!1);
6812
6817
  };
6813
- return window.addEventListener("scroll", B, !0), window.addEventListener("resize", B), document.addEventListener("mousedown", W), document.addEventListener("keydown", h1), () => {
6814
- window.removeEventListener("scroll", B, !0), window.removeEventListener("resize", B), document.removeEventListener("mousedown", W), document.removeEventListener("keydown", h1);
6818
+ return window.addEventListener("scroll", B, !0), window.addEventListener("resize", B), document.addEventListener("mousedown", R), document.addEventListener("keydown", C1), () => {
6819
+ window.removeEventListener("scroll", B, !0), window.removeEventListener("resize", B), document.removeEventListener("mousedown", R), document.removeEventListener("keydown", C1);
6815
6820
  };
6816
- }, [G, d1, N]), oe(() => {
6817
- G && E.current && d1();
6818
- }, [G, d1]);
6821
+ }, [K, h1, L]), oe(() => {
6822
+ K && E.current && h1();
6823
+ }, [K, h1]);
6819
6824
  const K1 = B1(
6820
6825
  (B) => {
6821
- o1 || f1(B), a == null || a(B);
6826
+ o1 || d1(B), a == null || a(B);
6822
6827
  },
6823
6828
  [o1, a]
6824
6829
  ), ke = B1(
6825
- (B) => e.some((W) => W.value === B && W.disabled),
6830
+ (B) => e.some((R) => R.value === B && R.disabled),
6826
6831
  [e]
6827
6832
  ), Te = B1(
6828
6833
  (B) => {
6829
- ke(B) || (K.includes(B) ? K1(K.filter((W) => W !== B)) : K1([...K, B]));
6834
+ ke(B) || (s1.includes(B) ? K1(s1.filter((R) => R !== B)) : K1([...s1, B]));
6830
6835
  },
6831
- [K, K1, ke]
6836
+ [s1, K1, ke]
6832
6837
  ), Ee = W1(
6833
6838
  () => new Set(e.filter((B) => B.disabled).map((B) => B.value)),
6834
6839
  [e]
6835
6840
  ), br = B1(
6836
6841
  (B) => {
6837
6842
  B.stopPropagation();
6838
- const W = K.filter((h1) => Ee.has(h1));
6839
- K1(W);
6843
+ const R = s1.filter((C1) => Ee.has(C1));
6844
+ K1(R);
6840
6845
  },
6841
- [K1, K, Ee]
6846
+ [K1, s1, Ee]
6842
6847
  ), D5 = B1(
6843
- (B, W) => {
6844
- W.stopPropagation(), !ke(B) && K1(K.filter((h1) => h1 !== B));
6848
+ (B, R) => {
6849
+ R.stopPropagation(), !ke(B) && K1(s1.filter((C1) => C1 !== B));
6845
6850
  },
6846
- [K, K1, ke]
6851
+ [s1, K1, ke]
6847
6852
  ), Be = B1(
6848
6853
  (B) => {
6849
6854
  if (!o8.has(B.key)) return;
6850
- if (B.preventDefault(), B.stopPropagation(), !G) {
6851
- p1(!0);
6855
+ if (B.preventDefault(), B.stopPropagation(), !K) {
6856
+ X(!0);
6852
6857
  return;
6853
6858
  }
6854
- const W = y1.length;
6855
- if (W === 0) return;
6856
- const h1 = (g1) => {
6859
+ const R = y1.length;
6860
+ if (R === 0) return;
6861
+ const C1 = (m1) => {
6857
6862
  requestAnimationFrame(() => {
6858
- const b1 = q.current[g1], l1 = R.current;
6859
- if (!b1 || !l1) return;
6860
- const v1 = b1.offsetTop, H1 = v1 + b1.offsetHeight, de = l1.scrollTop, kr = de + l1.clientHeight;
6863
+ const f1 = Y.current[m1], l1 = G.current;
6864
+ if (!f1 || !l1) return;
6865
+ const v1 = f1.offsetTop, H1 = v1 + f1.offsetHeight, de = l1.scrollTop, kr = de + l1.clientHeight;
6861
6866
  H1 > kr ? l1.scrollTo({
6862
6867
  top: H1 - l1.clientHeight,
6863
6868
  behavior: "smooth"
6864
6869
  }) : v1 < de && l1.scrollTo({ top: v1, behavior: "smooth" });
6865
6870
  });
6866
- }, F1 = (g1) => {
6867
- _((b1) => {
6871
+ }, F1 = (m1) => {
6872
+ r1((f1) => {
6868
6873
  var v1;
6869
- let l1 = b1;
6870
- for (let H1 = 0; H1 < W; H1++)
6871
- if (l1 = g1 === 1 ? l1 < W - 1 ? l1 + 1 : 0 : l1 > 0 ? l1 - 1 : W - 1, !((v1 = y1[l1]) != null && v1.disabled))
6872
- return h1(l1), l1;
6873
- return b1;
6874
+ let l1 = f1;
6875
+ for (let H1 = 0; H1 < R; H1++)
6876
+ if (l1 = m1 === 1 ? l1 < R - 1 ? l1 + 1 : 0 : l1 > 0 ? l1 - 1 : R - 1, !((v1 = y1[l1]) != null && v1.disabled))
6877
+ return C1(l1), l1;
6878
+ return f1;
6874
6879
  });
6875
6880
  }, A1 = () => {
6876
6881
  var l1;
6877
- if (t1 < 0 || t1 >= W || (l1 = y1[t1]) != null && l1.disabled) return;
6878
- const g1 = y1[t1].value;
6879
- Te(g1), P("");
6880
- const b1 = e.findIndex((v1) => v1.value === g1);
6881
- _(b1 >= 0 ? b1 : -1), h1(b1 >= 0 ? b1 : 0), requestAnimationFrame(() => {
6882
+ if (U < 0 || U >= R || (l1 = y1[U]) != null && l1.disabled) return;
6883
+ const m1 = y1[U].value;
6884
+ Te(m1), P("");
6885
+ const f1 = e.findIndex((v1) => v1.value === m1);
6886
+ r1(f1 >= 0 ? f1 : -1), C1(f1 >= 0 ? f1 : 0), requestAnimationFrame(() => {
6882
6887
  var v1;
6883
- return (v1 = s1.current) == null ? void 0 : v1.focus();
6888
+ return (v1 = p1.current) == null ? void 0 : v1.focus();
6884
6889
  });
6885
6890
  };
6886
6891
  switch (B.key) {
@@ -6895,98 +6900,98 @@ const Ca = ({
6895
6900
  break;
6896
6901
  }
6897
6902
  },
6898
- [G, y1, t1, Te, e]
6903
+ [K, y1, U, Te, e]
6899
6904
  ), Q5 = B1(
6900
6905
  (B) => {
6901
- if (B.key === r8 && T === "" && K.length > 0) {
6902
- B.preventDefault(), K1(K.slice(0, -1)), requestAnimationFrame(() => {
6903
- var W;
6904
- return (W = s1.current) == null ? void 0 : W.focus();
6906
+ if (B.key === r8 && W === "" && s1.length > 0) {
6907
+ B.preventDefault(), K1(s1.slice(0, -1)), requestAnimationFrame(() => {
6908
+ var R;
6909
+ return (R = p1.current) == null ? void 0 : R.focus();
6905
6910
  });
6906
6911
  return;
6907
6912
  }
6908
6913
  Be(B);
6909
6914
  },
6910
- [Be, T, K, K1]
6911
- ), fr = i === "small" ? "h-8" : "h-10", wr = typeof d == "number" ? `${d}px` : d, P5 = J.length > 0 && !C && !u, vr = _t({
6915
+ [Be, W, s1, K1]
6916
+ ), fr = i === "small" ? "h-8" : "h-10", wr = typeof d == "number" ? `${d}px` : d, P5 = O.length > 0 && !C && !u, vr = _t({
6912
6917
  disabled: C,
6913
6918
  error: p,
6914
- open: G,
6919
+ open: K,
6915
6920
  loading: u,
6916
- hasSelection: J.length > 0
6917
- }), Ye = W1(() => N ? /* @__PURE__ */ l(
6921
+ hasSelection: O.length > 0
6922
+ }), Ye = W1(() => L ? /* @__PURE__ */ l(
6918
6923
  "input",
6919
6924
  {
6920
- ref: s1,
6925
+ ref: p1,
6921
6926
  type: "text",
6922
- value: T,
6927
+ value: W,
6923
6928
  onChange: (B) => Y1(B.target.value),
6924
6929
  onKeyDown: Q5,
6925
- placeholder: J.length === 0 ? o : "",
6930
+ placeholder: O.length === 0 ? o : "",
6926
6931
  className: "flex-1 w-full min-w-[40px] border-none outline-none bg-transparent text-[13px] p-0 text-[var(--malachite-text-primary,rgb(10,10,10))]",
6927
6932
  onMouseDown: (B) => {
6928
6933
  B.preventDefault();
6929
6934
  }
6930
6935
  }
6931
6936
  ) : null, [
6932
- N,
6933
- T,
6937
+ L,
6938
+ W,
6934
6939
  Y1,
6935
6940
  Q5,
6936
- J.length,
6941
+ O.length,
6937
6942
  o
6938
6943
  ]), xr = W1(() => {
6939
- if (n && J.length > 0)
6940
- return n(J);
6941
- if (V && J.length > 0) {
6942
- const B = j != null ? J.slice(0, j) : J, W = J.length - B.length;
6944
+ if (n && O.length > 0)
6945
+ return n(O);
6946
+ if (V && O.length > 0) {
6947
+ const B = H != null ? O.slice(0, H) : O, R = O.length - B.length;
6943
6948
  return /* @__PURE__ */ v(
6944
6949
  "div",
6945
6950
  {
6946
6951
  className: "flex items-center gap-1 overflow-hidden min-w-0 flex-1",
6947
6952
  style: { flexWrap: "nowrap" },
6948
6953
  children: [
6949
- B.map((h1) => {
6950
- const F1 = Ee.has(h1.value);
6954
+ B.map((C1) => {
6955
+ const F1 = Ee.has(C1.value);
6951
6956
  return /* @__PURE__ */ l(
6952
6957
  e8,
6953
6958
  {
6954
- value: h1.label,
6959
+ value: C1.label,
6955
6960
  type: "default",
6956
6961
  textTransform: "none",
6957
- onRemove: D && !C && !F1 ? (A1) => D5(h1.value, A1) : void 0,
6962
+ onRemove: D && !C && !F1 ? (A1) => D5(C1.value, A1) : void 0,
6958
6963
  className: "shrink-0"
6959
6964
  },
6960
- h1.value
6965
+ C1.value
6961
6966
  );
6962
6967
  }),
6963
- W > 0 && /* @__PURE__ */ v("span", { className: "shrink-0 text-xs text-[var(--malachite-text-secondary,rgb(123,123,123))]", children: [
6968
+ R > 0 && /* @__PURE__ */ v("span", { className: "shrink-0 text-xs text-[var(--malachite-text-secondary,rgb(123,123,123))]", children: [
6964
6969
  "+",
6965
- W
6970
+ R
6966
6971
  ] }),
6967
6972
  Ye
6968
6973
  ]
6969
6974
  }
6970
6975
  );
6971
6976
  }
6972
- return N && J.length === 0 ? Ye : J.length === 0 ? /* @__PURE__ */ l("span", { className: "text-[var(--malachite-text-placeholder)]", children: o }) : J.length === 1 ? /* @__PURE__ */ l("span", { children: J[0].label }) : /* @__PURE__ */ l("span", { children: `${J.length} selected` });
6977
+ return L && O.length === 0 ? Ye : O.length === 0 ? /* @__PURE__ */ l("span", { className: "text-[var(--malachite-text-placeholder)]", children: o }) : O.length === 1 ? /* @__PURE__ */ l("span", { children: O[0].label }) : /* @__PURE__ */ l("span", { children: `${O.length} selected` });
6973
6978
  }, [
6974
- J,
6979
+ O,
6975
6980
  n,
6976
6981
  V,
6977
- j,
6982
+ H,
6978
6983
  D,
6979
6984
  C,
6980
6985
  D5,
6981
- N,
6986
+ L,
6982
6987
  Ye,
6983
6988
  o,
6984
6989
  Ee
6985
6990
  ]), yr = {
6986
6991
  position: "fixed",
6987
- top: (k == null ? void 0 : k.top) ?? 0,
6988
- left: (k == null ? void 0 : k.left) ?? 0,
6989
- minWidth: (k == null ? void 0 : k.width) ?? h ?? 180,
6992
+ top: (A == null ? void 0 : A.top) ?? 0,
6993
+ left: (A == null ? void 0 : A.left) ?? 0,
6994
+ minWidth: (A == null ? void 0 : A.width) ?? h ?? 180,
6990
6995
  maxWidth: 320,
6991
6996
  zIndex: 2147483646,
6992
6997
  background: "var(--malachite-card-background, rgb(255, 255, 255))",
@@ -6998,26 +7003,26 @@ const Ca = ({
6998
7003
  flexDirection: "column",
6999
7004
  gap: 4,
7000
7005
  maxHeight: 360,
7001
- visibility: k ? "visible" : "hidden",
7002
- opacity: k ? 1 : 0
7003
- }, Ar = !!(x || A || w || b || I || y), K5 = /* @__PURE__ */ v(w1, { children: [
7006
+ visibility: A ? "visible" : "hidden",
7007
+ opacity: A ? 1 : 0
7008
+ }, Ar = !!(x || k || w || b || I || y), K5 = /* @__PURE__ */ v(w1, { children: [
7004
7009
  /* @__PURE__ */ v("div", { className: "relative", style: { width: wr }, children: [
7005
7010
  /* @__PURE__ */ v(
7006
7011
  lr,
7007
7012
  {
7008
- ref: c1,
7009
- triggerRole: N ? "combobox" : V && D ? "group" : "button",
7013
+ ref: e1,
7014
+ triggerRole: L ? "combobox" : V && D ? "group" : "button",
7010
7015
  disabled: C || u,
7011
7016
  [n5]: "",
7012
7017
  "aria-haspopup": "listbox",
7013
- "aria-expanded": G,
7014
- "aria-controls": G ? L : void 0,
7015
- "aria-activedescendant": N && G && t1 >= 0 ? a1(t1) : void 0,
7018
+ "aria-expanded": K,
7019
+ "aria-controls": K ? Q : void 0,
7020
+ "aria-activedescendant": L && K && U >= 0 ? T(U) : void 0,
7016
7021
  "aria-label": m,
7017
7022
  "aria-invalid": p || void 0,
7018
7023
  "aria-busy": u || void 0,
7019
7024
  onClick: () => {
7020
- C || u || p1((B) => !B);
7025
+ C || u || X((B) => !B);
7021
7026
  },
7022
7027
  onKeyDown: Be,
7023
7028
  style: {
@@ -7025,12 +7030,12 @@ const Ca = ({
7025
7030
  ...vr,
7026
7031
  ...M
7027
7032
  },
7028
- className: `w-full ${fr} border border-solid rounded-[12px] flex items-center gap-[8px] px-[12px] text-[13px] font-normal text-[var(--malachite-text-primary)] ${C || u ? "cursor-not-allowed" : "cursor-pointer"} ${Z}`,
7033
+ className: `w-full ${fr} border border-solid rounded-[12px] flex items-center gap-[8px] px-[12px] text-[13px] font-normal text-[var(--malachite-text-primary)] ${C || u ? "cursor-not-allowed" : "cursor-pointer"} ${S}`,
7029
7034
  children: [
7030
7035
  /* @__PURE__ */ l(
7031
7036
  "span",
7032
7037
  {
7033
- className: `flex-1 min-w-0 text-left ${N ? "flex" : "truncate"} ${P5 ? "pr-[18px]" : ""}`,
7038
+ className: `flex-1 min-w-0 text-left ${L ? "flex" : "truncate"} ${P5 ? "pr-[18px]" : ""}`,
7034
7039
  children: xr
7035
7040
  }
7036
7041
  ),
@@ -7040,9 +7045,9 @@ const Ca = ({
7040
7045
  size: 13,
7041
7046
  className: "shrink-0",
7042
7047
  style: {
7043
- color: G ? "var(--malachite-text-primary, rgb(10, 10, 10))" : "var(--malachite-text-placeholder, rgb(187, 187, 187))",
7048
+ color: K ? "var(--malachite-text-primary, rgb(10, 10, 10))" : "var(--malachite-text-placeholder, rgb(187, 187, 187))",
7044
7049
  transition: "transform 0.2s ease, color 0.2s ease",
7045
- transform: G ? "rotate(180deg)" : "rotate(0deg)"
7050
+ transform: K ? "rotate(180deg)" : "rotate(0deg)"
7046
7051
  }
7047
7052
  }
7048
7053
  )
@@ -7060,12 +7065,12 @@ const Ca = ({
7060
7065
  }
7061
7066
  )
7062
7067
  ] }),
7063
- G && le(
7068
+ K && le(
7064
7069
  /* @__PURE__ */ v(
7065
7070
  "div",
7066
7071
  {
7067
7072
  ref: E,
7068
- id: L,
7073
+ id: Q,
7069
7074
  role: "listbox",
7070
7075
  "aria-multiselectable": "true",
7071
7076
  style: yr,
@@ -7098,7 +7103,7 @@ const Ca = ({
7098
7103
  "input",
7099
7104
  {
7100
7105
  type: "text",
7101
- value: T,
7106
+ value: W,
7102
7107
  onChange: (B) => Y1(B.target.value),
7103
7108
  onKeyDown: Be,
7104
7109
  placeholder: "Search",
@@ -7133,7 +7138,7 @@ const Ca = ({
7133
7138
  /* @__PURE__ */ l(
7134
7139
  "div",
7135
7140
  {
7136
- ref: R,
7141
+ ref: G,
7137
7142
  style: {
7138
7143
  display: "flex",
7139
7144
  flexDirection: "column",
@@ -7155,26 +7160,26 @@ const Ca = ({
7155
7160
  },
7156
7161
  children: "No results"
7157
7162
  }
7158
- ) : y1.map((B, W) => {
7159
- const h1 = K.includes(B.value), F1 = W === t1, A1 = !!B.disabled;
7163
+ ) : y1.map((B, R) => {
7164
+ const C1 = s1.includes(B.value), F1 = R === U, A1 = !!B.disabled;
7160
7165
  return /* @__PURE__ */ v(
7161
7166
  "button",
7162
7167
  {
7163
- id: a1(W),
7164
- ref: (g1) => {
7165
- q.current[W] = g1;
7168
+ id: T(R),
7169
+ ref: (m1) => {
7170
+ Y.current[R] = m1;
7166
7171
  },
7167
7172
  type: "button",
7168
7173
  role: "option",
7169
- "aria-selected": h1,
7174
+ "aria-selected": C1,
7170
7175
  "aria-disabled": A1 || void 0,
7171
7176
  onClick: () => {
7172
- var g1;
7173
- Te(B.value), P(""), (g1 = s1.current) == null || g1.focus();
7177
+ var m1;
7178
+ Te(B.value), P(""), (m1 = p1.current) == null || m1.focus();
7174
7179
  },
7175
- onMouseEnter: () => _(W),
7180
+ onMouseEnter: () => r1(R),
7176
7181
  onMouseLeave: () => {
7177
- t1 === W && _(-1);
7182
+ U === R && r1(-1);
7178
7183
  },
7179
7184
  style: {
7180
7185
  display: "flex",
@@ -7187,12 +7192,12 @@ const Ca = ({
7187
7192
  fontSize: 13,
7188
7193
  cursor: A1 ? "not-allowed" : "pointer",
7189
7194
  opacity: A1 ? 0.6 : 1,
7190
- color: h1 ? "var(--malachite-text-success, rgb(2, 122, 66))" : "var(--malachite-text-primary, rgb(10, 10, 10))",
7191
- background: F1 && !A1 ? "var(--malachite-card-dimmed-background, rgb(247, 247, 247))" : h1 ? "var(--malachite-success-background-glass, rgba(0, 175, 102, 0.08))" : "transparent"
7195
+ color: C1 ? "var(--malachite-text-success, rgb(2, 122, 66))" : "var(--malachite-text-primary, rgb(10, 10, 10))",
7196
+ background: F1 && !A1 ? "var(--malachite-card-dimmed-background, rgb(247, 247, 247))" : C1 ? "var(--malachite-success-background-glass, rgba(0, 175, 102, 0.08))" : "transparent"
7192
7197
  },
7193
7198
  children: [
7194
7199
  (() => {
7195
- const g1 = B.description ? B.descriptionMode ?? "icon" : null, b1 = g1 === "subtitle", l1 = /* @__PURE__ */ l("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: B.label });
7200
+ const m1 = B.description ? B.descriptionMode ?? "icon" : null, f1 = m1 === "subtitle", l1 = /* @__PURE__ */ l("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: B.label });
7196
7201
  return /* @__PURE__ */ v(
7197
7202
  "span",
7198
7203
  {
@@ -7200,12 +7205,12 @@ const Ca = ({
7200
7205
  flex: 1,
7201
7206
  minWidth: 0,
7202
7207
  display: "flex",
7203
- flexDirection: b1 ? "column" : "row",
7204
- alignItems: b1 ? "flex-start" : "center",
7205
- gap: b1 ? 2 : 6
7208
+ flexDirection: f1 ? "column" : "row",
7209
+ alignItems: f1 ? "flex-start" : "center",
7210
+ gap: f1 ? 2 : 6
7206
7211
  },
7207
7212
  children: [
7208
- g1 === "hover" ? /* @__PURE__ */ l(
7213
+ m1 === "hover" ? /* @__PURE__ */ l(
7209
7214
  U1,
7210
7215
  {
7211
7216
  text: B.description,
@@ -7214,7 +7219,7 @@ const Ca = ({
7214
7219
  children: l1
7215
7220
  }
7216
7221
  ) : l1,
7217
- g1 === "icon" && /* @__PURE__ */ l(
7222
+ m1 === "icon" && /* @__PURE__ */ l(
7218
7223
  U1,
7219
7224
  {
7220
7225
  text: B.description,
@@ -7234,7 +7239,7 @@ const Ca = ({
7234
7239
  )
7235
7240
  }
7236
7241
  ),
7237
- g1 === "subtitle" && /* @__PURE__ */ l(
7242
+ m1 === "subtitle" && /* @__PURE__ */ l(
7238
7243
  "span",
7239
7244
  {
7240
7245
  style: {
@@ -7275,7 +7280,7 @@ const Ca = ({
7275
7280
  {
7276
7281
  label: m,
7277
7282
  hint: w,
7278
- tooltip: A,
7283
+ tooltip: k,
7279
7284
  name: b ?? "",
7280
7285
  required: y,
7281
7286
  loading: u,
@@ -7301,8 +7306,8 @@ const ua = ({
7301
7306
  children: C,
7302
7307
  className: p = ""
7303
7308
  }) => {
7304
- const m = r ? ((A) => {
7305
- switch (A) {
7309
+ const m = r ? ((k) => {
7310
+ switch (k) {
7306
7311
  case "xsmall":
7307
7312
  return 8;
7308
7313
  case "small":
@@ -7611,14 +7616,14 @@ const fa = ({ count: e, label: t, className: r = "" }) => /* @__PURE__ */ v("div
7611
7616
  children: u,
7612
7617
  className: m = ""
7613
7618
  }) => {
7614
- const b = U(null), [x, A] = H(0);
7619
+ const b = J(null), [x, k] = q(0);
7615
7620
  return oe(() => {
7616
7621
  const w = b.current;
7617
7622
  if (!w) {
7618
- A(0);
7623
+ k(0);
7619
7624
  return;
7620
7625
  }
7621
- const y = () => A(w.offsetHeight);
7626
+ const y = () => k(w.offsetHeight);
7622
7627
  y();
7623
7628
  const I = new ResizeObserver(y);
7624
7629
  return I.observe(w), () => I.disconnect();
@@ -7636,7 +7641,7 @@ const fa = ({ count: e, label: t, className: r = "" }) => /* @__PURE__ */ v("div
7636
7641
  variant: "outline",
7637
7642
  size: "small",
7638
7643
  iconOnly: !0,
7639
- icon: /* @__PURE__ */ l(r1.ArrowLeftIcon, { size: 14 }),
7644
+ icon: /* @__PURE__ */ l(a1.ArrowLeftIcon, { size: 14 }),
7640
7645
  disabled: r,
7641
7646
  onClick: t,
7642
7647
  "aria-label": "Back",
@@ -7844,8 +7849,8 @@ const E8 = `
7844
7849
  }
7845
7850
  }
7846
7851
  `, xa = ({ children: e, className: t = "" }) => {
7847
- const [r, a] = H(null), o = U(null);
7848
- return u1(() => {
7852
+ const [r, a] = q(null), o = J(null);
7853
+ return g1(() => {
7849
7854
  if (console.log("[ShadowEscape] Component mounted, checking for Shadow DOM..."), nr(), !_5) {
7850
7855
  console.log("[ShadowEscape] Injecting form styles...");
7851
7856
  const n = document.createElement("style");
@@ -9234,8 +9239,8 @@ const R8 = () => {
9234
9239
  const r = document.createElement("style");
9235
9240
  r.id = l2, r.textContent = t, e.appendChild(r);
9236
9241
  }, Cr = ({ children: e, theme: t, hostStyle: r }) => {
9237
- const a = U(null), [o, n] = H(null);
9238
- return u1(() => {
9242
+ const a = J(null), [o, n] = q(null);
9243
+ return g1(() => {
9239
9244
  if (a.current && !o) {
9240
9245
  const s = a.current.shadowRoot;
9241
9246
  if (s) {
@@ -9245,7 +9250,7 @@ const R8 = () => {
9245
9250
  const i = a.current.attachShadow({ mode: "open" });
9246
9251
  n(i);
9247
9252
  }
9248
- }, [o]), u1(() => {
9253
+ }, [o]), g1(() => {
9249
9254
  if (!o)
9250
9255
  return;
9251
9256
  const s = R8();
@@ -9413,33 +9418,33 @@ const R8 = () => {
9413
9418
  variant: m = "default",
9414
9419
  defaultValue: b,
9415
9420
  disabled: x,
9416
- prefixValue: A,
9421
+ prefixValue: k,
9417
9422
  prefixSecondaryValue: w,
9418
9423
  ellipsis: y = !1,
9419
9424
  formControl: I,
9420
9425
  buttons: V,
9421
9426
  onCopyClick: D,
9422
- showCopyButton: S,
9423
- onChange: N,
9424
- onBlur: Z,
9427
+ showCopyButton: Z,
9428
+ onChange: L,
9429
+ onBlur: S,
9425
9430
  helperText: M,
9426
- showPasswordToggle: F = !0
9431
+ showPasswordToggle: N = !0
9427
9432
  }) => {
9428
- const [L, a1] = H(!1), [$, f1] = H(b || ""), [o1, K] = H(!1);
9429
- u1(() => {
9433
+ const [Q, T] = q(!1), [c1, d1] = q(b || ""), [o1, s1] = q(!1);
9434
+ g1(() => {
9430
9435
  if (o1) {
9431
9436
  const E = setTimeout(() => {
9432
- K(!1);
9437
+ s1(!1);
9433
9438
  }, 1e3);
9434
9439
  return () => clearTimeout(E);
9435
9440
  }
9436
9441
  }, [o1]);
9437
- const G = (E) => {
9438
- const R = E.target.value;
9439
- f1(R), N == null || N(R);
9440
- }, p1 = D ? () => {
9441
- $ && (navigator.clipboard.writeText($), K(!0), D());
9442
- } : void 0, k = (E) => {
9442
+ const K = (E) => {
9443
+ const G = E.target.value;
9444
+ d1(G), L == null || L(G);
9445
+ }, X = D ? () => {
9446
+ c1 && (navigator.clipboard.writeText(c1), s1(!0), D());
9447
+ } : void 0, A = (E) => {
9443
9448
  switch (E) {
9444
9449
  case "small":
9445
9450
  return "h-8 py-2 text-sm";
@@ -9450,13 +9455,13 @@ const R8 = () => {
9450
9455
  default:
9451
9456
  return "h-10 py-[10px] text-[15px] leading-[1.4]";
9452
9457
  }
9453
- }, Q = (E, R) => {
9458
+ }, F = (E, G) => {
9454
9459
  switch (E) {
9455
9460
  case "ghost":
9456
9461
  return {
9457
9462
  wrapper: [
9458
- R ? "border-0 border-b border-solid border-[var(--malachite-destructive-border)]" : "",
9459
- R ? "focus-within:border-[var(--malachite-destructive-border-hover)] hover:border-[var(--malachite-destructive-border-hover)]" : ""
9463
+ G ? "border-0 border-b border-solid border-[var(--malachite-destructive-border)]" : "",
9464
+ G ? "focus-within:border-[var(--malachite-destructive-border-hover)] hover:border-[var(--malachite-destructive-border-hover)]" : ""
9460
9465
  ],
9461
9466
  shadow: "shadow-none",
9462
9467
  borderRadius: "rounded-none"
@@ -9466,23 +9471,23 @@ const R8 = () => {
9466
9471
  return {
9467
9472
  wrapper: [
9468
9473
  "border border-solid",
9469
- R ? "border-[var(--malachite-destructive-border)]" : "border-[var(--malachite-card-border)]",
9470
- R ? "focus-within:border-[var(--malachite-destructive-border-hover)] hover:border-[var(--malachite-destructive-border-hover)]" : "focus-within:border-[var(--malachite-control-border-hover)] hover:border-[var(--malachite-control-border-hover)]"
9474
+ G ? "border-[var(--malachite-destructive-border)]" : "border-[var(--malachite-card-border)]",
9475
+ G ? "focus-within:border-[var(--malachite-destructive-border-hover)] hover:border-[var(--malachite-destructive-border-hover)]" : "focus-within:border-[var(--malachite-control-border-hover)] hover:border-[var(--malachite-control-border-hover)]"
9471
9476
  ],
9472
- shadow: R ? "shadow-error" : "shadow-default",
9477
+ shadow: G ? "shadow-error" : "shadow-default",
9473
9478
  borderRadius: "rounded-[12px]"
9474
9479
  };
9475
9480
  }
9476
- }, T = p === "password" ? L ? "text" : "password" : p, P = o || A || w, t1 = S ?? !!(p1 && x && $), _ = i || t1 || (V == null ? void 0 : V.length) || p === "password" && F, c1 = Q(m, i), s1 = [
9481
+ }, W = p === "password" ? Q ? "text" : "password" : p, P = o || k || w, U = Z ?? !!(X && x && c1), r1 = i || U || (V == null ? void 0 : V.length) || p === "password" && N, e1 = F(m, i), p1 = [
9477
9482
  "relative",
9478
9483
  "flex items-center",
9479
9484
  "w-full",
9480
- c1.borderRadius,
9485
+ e1.borderRadius,
9481
9486
  x ? "bg-[var(--malachite-card-dimmed-background)]" : "bg-[var(--malachite-card-background)]",
9482
9487
  "transition-colors duration-200 ease-in-out",
9483
- c1.shadow,
9484
- ...x ? [] : c1.wrapper,
9485
- k(u).split(" ").find((E) => E.startsWith("h-")) || "h-10"
9488
+ e1.shadow,
9489
+ ...x ? [] : e1.wrapper,
9490
+ A(u).split(" ").find((E) => E.startsWith("h-")) || "h-10"
9486
9491
  ].filter(Boolean).join(" ");
9487
9492
  return /* @__PURE__ */ v(
9488
9493
  Ke,
@@ -9497,11 +9502,11 @@ const R8 = () => {
9497
9502
  description: d,
9498
9503
  loadingComponent: /* @__PURE__ */ l(Z5, { size: u, helperText: !!M }),
9499
9504
  children: [
9500
- /* @__PURE__ */ v("div", { className: s1, children: [
9505
+ /* @__PURE__ */ v("div", { className: p1, children: [
9501
9506
  P && /* @__PURE__ */ l("div", { className: "flex items-center pl-3 pr-1 flex-shrink-0 pointer-events-none", children: /* @__PURE__ */ l(
9502
9507
  H8,
9503
9508
  {
9504
- prefixValue: A,
9509
+ prefixValue: k,
9505
9510
  prefixSecondaryValue: w,
9506
9511
  icon: o
9507
9512
  }
@@ -9509,35 +9514,35 @@ const R8 = () => {
9509
9514
  /* @__PURE__ */ l(
9510
9515
  "input",
9511
9516
  {
9512
- type: T,
9517
+ type: W,
9513
9518
  placeholder: a,
9514
- value: $,
9515
- onChange: G,
9516
- onBlur: Z,
9519
+ value: c1,
9520
+ onChange: K,
9521
+ onBlur: S,
9517
9522
  disabled: x || C,
9518
9523
  readOnly: C,
9519
9524
  autoComplete: "off",
9520
- className: `flex-1 bg-transparent border-none outline-none text-[var(--malachite-text-primary)] placeholder:text-[var(--malachite-text-placeholder)] disabled:text-[var(--malachite-text-primary)] disabled:cursor-not-allowed ${k(u).split(" ")} px-[16px] py-[12px] ${y ? "min-w-0 truncate" : ""}`,
9525
+ className: `flex-1 bg-transparent border-none outline-none text-[var(--malachite-text-primary)] placeholder:text-[var(--malachite-text-placeholder)] disabled:text-[var(--malachite-text-primary)] disabled:cursor-not-allowed ${A(u).split(" ")} px-[16px] py-[12px] ${y ? "min-w-0 truncate" : ""}`,
9521
9526
  name: n
9522
9527
  }
9523
9528
  ),
9524
- _ && /* @__PURE__ */ v(
9529
+ r1 && /* @__PURE__ */ v(
9525
9530
  "div",
9526
9531
  {
9527
- className: `flex items-center pl-1 flex-shrink-0 ${p === "password" && F ? "pr-0" : "pr-3"}`,
9532
+ className: `flex items-center pl-1 flex-shrink-0 ${p === "password" && N ? "pr-0" : "pr-3"}`,
9528
9533
  children: [
9529
9534
  /* @__PURE__ */ l(
9530
9535
  j8,
9531
9536
  {
9532
9537
  error: i,
9533
- defaultValue: $,
9534
- onCopyClick: p1,
9535
- showCopyButton: t1,
9538
+ defaultValue: c1,
9539
+ onCopyClick: X,
9540
+ showCopyButton: U,
9536
9541
  copied: o1,
9537
9542
  type: p,
9538
- showPassword: L,
9539
- showPasswordToggle: F,
9540
- onTogglePassword: () => a1(!L)
9543
+ showPassword: Q,
9544
+ showPasswordToggle: N,
9545
+ onTogglePassword: () => T(!Q)
9541
9546
  }
9542
9547
  ),
9543
9548
  /* @__PURE__ */ l(q8, { buttons: V })
@@ -9565,7 +9570,7 @@ const R8 = () => {
9565
9570
  onTogglePassword: d
9566
9571
  }) => /* @__PURE__ */ v("div", { className: "flex items-center gap-1", children: [
9567
9572
  e && /* @__PURE__ */ l("div", { className: "flex items-center justify-center w-5 h-5 flex-shrink-0", children: /* @__PURE__ */ l(
9568
- r1.InfoIcon,
9573
+ a1.InfoIcon,
9569
9574
  {
9570
9575
  size: 16,
9571
9576
  className: "text-[var(--malachite-destructive-foreground)]"
@@ -9578,22 +9583,22 @@ const R8 = () => {
9578
9583
  type: "button",
9579
9584
  className: "flex items-center justify-center w-5 h-5 hover:bg-[var(--malachite-primary-border)] rounded transition-colors flex-shrink-0 cursor-pointer",
9580
9585
  children: o ? /* @__PURE__ */ l(
9581
- r1.CheckCircleFilled,
9586
+ a1.CheckCircleFilled,
9582
9587
  {
9583
9588
  size: 16,
9584
9589
  style: { color: "var(--malachite-success-foreground)" }
9585
9590
  }
9586
- ) : /* @__PURE__ */ l(r1.CopyIcon, { size: 16 })
9591
+ ) : /* @__PURE__ */ l(a1.CopyIcon, { size: 16 })
9587
9592
  }
9588
9593
  ),
9589
9594
  n === "password" && i && /* @__PURE__ */ l(ne, { variant: "no-style", onClick: d, type: "button", size: "small", children: s ? /* @__PURE__ */ l(
9590
- r1.EyeClosedIcon,
9595
+ a1.EyeClosedIcon,
9591
9596
  {
9592
9597
  size: 16,
9593
9598
  style: { color: "var(--malachite-text-dimmed)" }
9594
9599
  }
9595
9600
  ) : /* @__PURE__ */ l(
9596
- r1.EyeIcon,
9601
+ a1.EyeIcon,
9597
9602
  {
9598
9603
  size: 16,
9599
9604
  style: { color: "var(--malachite-text-dimmed)" }
@@ -9630,21 +9635,21 @@ const R8 = () => {
9630
9635
  prefixValue: b,
9631
9636
  prefixSecondaryValue: x,
9632
9637
  // ellipsis = false,
9633
- formControl: A,
9638
+ formControl: k,
9634
9639
  buttons: w,
9635
9640
  onCopyClick: y,
9636
9641
  onChange: I,
9637
9642
  value: V,
9638
9643
  onBlur: D,
9639
- rows: S = 4,
9640
- maxLength: N,
9641
- resize: Z = "vertical"
9644
+ rows: Z = 4,
9645
+ maxLength: L,
9646
+ resize: S = "vertical"
9642
9647
  }) => {
9643
- const [M, F] = H(u || ""), L = V !== void 0 ? V : M, a1 = V !== void 0, $ = (k) => {
9644
- const Q = k.target.value;
9645
- a1 || F(Q), I == null || I(Q);
9646
- }, f1 = (k) => {
9647
- switch (k) {
9648
+ const [M, N] = q(u || ""), Q = V !== void 0 ? V : M, T = V !== void 0, c1 = (A) => {
9649
+ const F = A.target.value;
9650
+ T || N(F), I == null || I(F);
9651
+ }, d1 = (A) => {
9652
+ switch (A) {
9648
9653
  case "small":
9649
9654
  return "text-sm";
9650
9655
  case "medium":
@@ -9654,18 +9659,18 @@ const R8 = () => {
9654
9659
  default:
9655
9660
  return "text-[15px] leading-[1.4]";
9656
9661
  }
9657
- }, o1 = (k, Q) => {
9658
- const T = {
9662
+ }, o1 = (A, F) => {
9663
+ const W = {
9659
9664
  small: 20,
9660
9665
  medium: 22,
9661
9666
  large: 24
9662
- }[k], P = {
9667
+ }[A], P = {
9663
9668
  small: 16,
9664
9669
  medium: 24,
9665
9670
  large: 24
9666
- }[k];
9667
- return `${T * Q + P}px`;
9668
- }, K = o || b || x, G = i || y && m && L || (w == null ? void 0 : w.length);
9671
+ }[A];
9672
+ return `${W * F + P}px`;
9673
+ }, s1 = o || b || x, K = i || y && m && Q || (w == null ? void 0 : w.length);
9669
9674
  return /* @__PURE__ */ l(
9670
9675
  Ke,
9671
9676
  {
@@ -9675,11 +9680,11 @@ const R8 = () => {
9675
9680
  name: n,
9676
9681
  required: s,
9677
9682
  loading: h,
9678
- formControl: A,
9683
+ formControl: k,
9679
9684
  description: d,
9680
- loadingComponent: /* @__PURE__ */ l(J8, { size: p, rows: S }),
9685
+ loadingComponent: /* @__PURE__ */ l(J8, { size: p, rows: Z }),
9681
9686
  children: (() => {
9682
- const k = [
9687
+ const A = [
9683
9688
  "relative",
9684
9689
  "flex",
9685
9690
  "w-full",
@@ -9692,7 +9697,7 @@ const R8 = () => {
9692
9697
  i ? "shadow-error" : "shadow-default",
9693
9698
  i ? "border-[var(--malachite-destructive-border)]" : "border-[var(--malachite-card-border)]",
9694
9699
  i ? "focus-within:border-[var(--malachite-destructive-border-hover)] hover:border-[var(--malachite-destructive-border-hover)]" : "focus-within:border-[var(--malachite-control-border-hover)] hover:border-[var(--malachite-control-border-hover)]"
9695
- ].filter(Boolean).join(" "), Q = [
9700
+ ].filter(Boolean).join(" "), F = [
9696
9701
  "flex-1",
9697
9702
  "bg-transparent",
9698
9703
  "border-none",
@@ -9701,28 +9706,28 @@ const R8 = () => {
9701
9706
  "placeholder:text-[var(--malachite-text-placeholder)]",
9702
9707
  "disabled:text-[var(--malachite-text-dimmed)]",
9703
9708
  "disabled:cursor-not-allowed",
9704
- f1(p),
9709
+ d1(p),
9705
9710
  "px-[16px]",
9706
9711
  "py-[12px]",
9707
- Z === "none" ? "resize-none" : Z === "vertical" ? "resize-y" : Z === "horizontal" ? "resize-x" : "resize"
9708
- ].filter(Boolean).join(" "), T = /* @__PURE__ */ l(
9712
+ S === "none" ? "resize-none" : S === "vertical" ? "resize-y" : S === "horizontal" ? "resize-x" : "resize"
9713
+ ].filter(Boolean).join(" "), W = /* @__PURE__ */ l(
9709
9714
  "textarea",
9710
9715
  {
9711
9716
  placeholder: a,
9712
- value: m ? u : L,
9713
- onChange: $,
9717
+ value: m ? u : Q,
9718
+ onChange: c1,
9714
9719
  onBlur: D,
9715
9720
  disabled: m || !!b || !!x || C,
9716
9721
  readOnly: C,
9717
- rows: S,
9718
- maxLength: N,
9719
- style: { minHeight: o1(p, S) },
9720
- className: Q,
9722
+ rows: Z,
9723
+ maxLength: L,
9724
+ style: { minHeight: o1(p, Z) },
9725
+ className: F,
9721
9726
  name: n
9722
9727
  }
9723
9728
  );
9724
- return /* @__PURE__ */ v("div", { className: k, children: [
9725
- K && /* @__PURE__ */ l("div", { className: "flex pt-3 pl-3 pr-1 flex-shrink-0 pointer-events-none", children: /* @__PURE__ */ l(
9729
+ return /* @__PURE__ */ v("div", { className: A, children: [
9730
+ s1 && /* @__PURE__ */ l("div", { className: "flex pt-3 pl-3 pr-1 flex-shrink-0 pointer-events-none", children: /* @__PURE__ */ l(
9726
9731
  U8,
9727
9732
  {
9728
9733
  prefixValue: b,
@@ -9730,14 +9735,14 @@ const R8 = () => {
9730
9735
  icon: o
9731
9736
  }
9732
9737
  ) }),
9733
- T,
9734
- G && /* @__PURE__ */ v("div", { className: "flex pt-3 pl-1 pr-3 flex-shrink-0", children: [
9738
+ W,
9739
+ K && /* @__PURE__ */ v("div", { className: "flex pt-3 pl-1 pr-3 flex-shrink-0", children: [
9735
9740
  /* @__PURE__ */ l(
9736
9741
  O8,
9737
9742
  {
9738
9743
  error: i,
9739
9744
  disabled: m,
9740
- defaultValue: L,
9745
+ defaultValue: Q,
9741
9746
  onCopyClick: y
9742
9747
  }
9743
9748
  ),
@@ -9773,7 +9778,7 @@ const R8 = () => {
9773
9778
  t && /* @__PURE__ */ l("span", { className: "text-[15px] leading-[1.4] text-[var(--malachite-text-dimmed)] whitespace-nowrap", children: t })
9774
9779
  ] }), O8 = ({ error: e, disabled: t, defaultValue: r, onCopyClick: a }) => /* @__PURE__ */ v("div", { className: "flex items-start gap-1", children: [
9775
9780
  e && /* @__PURE__ */ l("div", { className: "flex items-center justify-center w-5 h-5 flex-shrink-0 mt-1", children: /* @__PURE__ */ l(
9776
- r1.InfoIcon,
9781
+ a1.InfoIcon,
9777
9782
  {
9778
9783
  size: 16,
9779
9784
  className: "text-[var(--malachite-destructive-foreground)]"
@@ -9787,7 +9792,7 @@ const R8 = () => {
9787
9792
  },
9788
9793
  type: "button",
9789
9794
  className: "flex items-center justify-center w-5 h-5 hover:bg-[var(--malachite-primary-border)] rounded transition-colors flex-shrink-0 mt-1",
9790
- children: /* @__PURE__ */ l(r1.CopyIcon, { size: 16 })
9795
+ children: /* @__PURE__ */ l(a1.CopyIcon, { size: 16 })
9791
9796
  }
9792
9797
  )
9793
9798
  ] }), X8 = ({ buttons: e }) => e != null && e.length ? /* @__PURE__ */ l("div", { className: "flex flex-col gap-1 mt-1", children: e.map((t) => /* @__PURE__ */ l(
@@ -9812,20 +9817,20 @@ const R8 = () => {
9812
9817
  placement: a = "top",
9813
9818
  className: o = ""
9814
9819
  }) => {
9815
- const n = U(null), [s, i] = H(!1), d = B1(() => {
9820
+ const n = J(null), [s, i] = q(!1), d = B1(() => {
9816
9821
  const h = n.current;
9817
9822
  if (!h)
9818
9823
  return;
9819
9824
  const C = h.scrollWidth > h.clientWidth;
9820
9825
  i((p) => p === C ? p : C);
9821
9826
  }, []);
9822
- return u1(() => {
9827
+ return g1(() => {
9823
9828
  const h = n.current;
9824
9829
  if (!h || typeof ResizeObserver > "u")
9825
9830
  return;
9826
9831
  const C = new ResizeObserver(d);
9827
9832
  return C.observe(h), () => C.disconnect();
9828
- }, [d]), u1(() => {
9833
+ }, [d]), g1(() => {
9829
9834
  d();
9830
9835
  }, [t, e, d]), /* @__PURE__ */ l(
9831
9836
  U1,
@@ -9868,9 +9873,9 @@ const R8 = () => {
9868
9873
  onChange: i,
9869
9874
  onShowSizeChange: d
9870
9875
  }) => {
9871
- const h = t > 0 ? t : 10, C = Math.max(1, Math.ceil(r / h)), p = Math.min(Math.max(1, e), C), [u, m] = H(""), b = (F) => {
9872
- const L = Math.min(Math.max(1, F), C);
9873
- L !== p && (i == null || i(L, h));
9876
+ const h = t > 0 ? t : 10, C = Math.max(1, Math.ceil(r / h)), p = Math.min(Math.max(1, e), C), [u, m] = q(""), b = (N) => {
9877
+ const Q = Math.min(Math.max(1, N), C);
9878
+ Q !== p && (i == null || i(Q, h));
9874
9879
  }, x = {
9875
9880
  minWidth: 32,
9876
9881
  height: 32,
@@ -9887,18 +9892,18 @@ const R8 = () => {
9887
9892
  cursor: "pointer",
9888
9893
  userSelect: "none",
9889
9894
  transition: "background-color 120ms ease, border-color 120ms ease, color 120ms ease"
9890
- }, A = (F) => ({
9895
+ }, k = (N) => ({
9891
9896
  ...x,
9892
9897
  width: 32,
9893
9898
  minWidth: 32,
9894
- color: F ? "var(--malachite-text-placeholder, rgb(187, 187, 187))" : "var(--malachite-text-primary, rgb(10, 10, 10))",
9895
- opacity: F ? 0.4 : 1,
9896
- cursor: F ? "not-allowed" : "pointer"
9897
- }), w = (F) => ({
9899
+ color: N ? "var(--malachite-text-placeholder, rgb(187, 187, 187))" : "var(--malachite-text-primary, rgb(10, 10, 10))",
9900
+ opacity: N ? 0.4 : 1,
9901
+ cursor: N ? "not-allowed" : "pointer"
9902
+ }), w = (N) => ({
9898
9903
  ...x,
9899
- border: F ? "1px solid var(--malachite-success-border, rgba(0, 175, 102, 0.2))" : "1px solid transparent",
9900
- color: F ? "var(--malachite-success-foreground, rgb(2, 122, 66))" : "var(--malachite-text-primary, rgb(10, 10, 10))",
9901
- background: F ? "var(--malachite-card-background, rgb(255, 255, 255))" : "transparent"
9904
+ border: N ? "1px solid var(--malachite-success-border, rgba(0, 175, 102, 0.2))" : "1px solid transparent",
9905
+ color: N ? "var(--malachite-success-foreground, rgb(2, 122, 66))" : "var(--malachite-text-primary, rgb(10, 10, 10))",
9906
+ background: N ? "var(--malachite-card-background, rgb(255, 255, 255))" : "transparent"
9902
9907
  }), y = {
9903
9908
  ...x,
9904
9909
  color: "var(--malachite-text-secondary, rgb(123, 123, 123))",
@@ -9932,9 +9937,9 @@ const R8 = () => {
9932
9937
  fontSize: 13,
9933
9938
  textAlign: "center",
9934
9939
  outline: "none"
9935
- }, D = r === 0 ? 0 : (p - 1) * h + 1, S = Math.min(p * h, r), N = n ? n(r, [D, S]) : `Total ${r.toLocaleString("en-US")} items`, Z = () => {
9936
- const F = parseInt(u, 10);
9937
- Number.isNaN(F) || (b(F), m(""));
9940
+ }, D = r === 0 ? 0 : (p - 1) * h + 1, Z = Math.min(p * h, r), L = n ? n(r, [D, Z]) : `Total ${r.toLocaleString("en-US")} items`, S = () => {
9941
+ const N = parseInt(u, 10);
9942
+ Number.isNaN(N) || (b(N), m(""));
9938
9943
  }, M = _8(p, C);
9939
9944
  return /* @__PURE__ */ v(
9940
9945
  "div",
@@ -9951,7 +9956,7 @@ const R8 = () => {
9951
9956
  color: "var(--malachite-text-primary, rgb(10, 10, 10))",
9952
9957
  marginRight: 4
9953
9958
  },
9954
- children: N
9959
+ children: L
9955
9960
  }
9956
9961
  ),
9957
9962
  /* @__PURE__ */ v("div", { className: "flex items-center gap-1", children: [
@@ -9962,22 +9967,22 @@ const R8 = () => {
9962
9967
  "aria-label": "Previous page",
9963
9968
  onClick: () => b(p - 1),
9964
9969
  disabled: p <= 1,
9965
- style: A(p <= 1),
9966
- children: /* @__PURE__ */ l(r1.CaretLeftIcon, { size: 12 })
9970
+ style: k(p <= 1),
9971
+ children: /* @__PURE__ */ l(a1.CaretLeftIcon, { size: 12 })
9967
9972
  }
9968
9973
  ),
9969
9974
  M.map(
9970
- (F, L) => F === "ellipsis" ? /* @__PURE__ */ l("span", { style: y, "aria-hidden": "true", children: "•••" }, `e-${L}`) : /* @__PURE__ */ l(
9975
+ (N, Q) => N === "ellipsis" ? /* @__PURE__ */ l("span", { style: y, "aria-hidden": "true", children: "•••" }, `e-${Q}`) : /* @__PURE__ */ l(
9971
9976
  "button",
9972
9977
  {
9973
9978
  type: "button",
9974
- "aria-label": `Page ${F}`,
9975
- "aria-current": F === p ? "page" : void 0,
9976
- onClick: () => b(F),
9977
- style: w(F === p),
9978
- children: F.toLocaleString("en-US")
9979
+ "aria-label": `Page ${N}`,
9980
+ "aria-current": N === p ? "page" : void 0,
9981
+ onClick: () => b(N),
9982
+ style: w(N === p),
9983
+ children: N.toLocaleString("en-US")
9979
9984
  },
9980
- F
9985
+ N
9981
9986
  )
9982
9987
  ),
9983
9988
  /* @__PURE__ */ l(
@@ -9987,8 +9992,8 @@ const R8 = () => {
9987
9992
  "aria-label": "Next page",
9988
9993
  onClick: () => b(p + 1),
9989
9994
  disabled: p >= C,
9990
- style: A(p >= C),
9991
- children: /* @__PURE__ */ l(r1.CaretRightIcon, { size: 12 })
9995
+ style: k(p >= C),
9996
+ children: /* @__PURE__ */ l(a1.CaretRightIcon, { size: 12 })
9992
9997
  }
9993
9998
  )
9994
9999
  ] }),
@@ -9997,15 +10002,15 @@ const R8 = () => {
9997
10002
  {
9998
10003
  "aria-label": "Page size",
9999
10004
  value: String(t),
10000
- onChange: (F) => {
10001
- const L = parseInt(F.target.value, 10);
10002
- Number.isNaN(L) || (d == null || d(p, L), i == null || i(p, L));
10005
+ onChange: (N) => {
10006
+ const Q = parseInt(N.target.value, 10);
10007
+ Number.isNaN(Q) || (d == null || d(p, Q), i == null || i(p, Q));
10003
10008
  },
10004
10009
  style: I,
10005
- children: s.map((F) => /* @__PURE__ */ v("option", { value: F, children: [
10006
- F,
10010
+ children: s.map((N) => /* @__PURE__ */ v("option", { value: N, children: [
10011
+ N,
10007
10012
  " / page"
10008
- ] }, F))
10013
+ ] }, N))
10009
10014
  }
10010
10015
  ),
10011
10016
  o && /* @__PURE__ */ v(
@@ -10026,11 +10031,11 @@ const R8 = () => {
10026
10031
  min: 1,
10027
10032
  max: C,
10028
10033
  value: u,
10029
- onChange: (F) => m(F.target.value),
10030
- onKeyDown: (F) => {
10031
- F.key === "Enter" && Z();
10034
+ onChange: (N) => m(N.target.value),
10035
+ onKeyDown: (N) => {
10036
+ N.key === "Enter" && S();
10032
10037
  },
10033
- onBlur: Z,
10038
+ onBlur: S,
10034
10039
  style: V
10035
10040
  }
10036
10041
  ),
@@ -10138,7 +10143,7 @@ const R8 = () => {
10138
10143
  }
10139
10144
  );
10140
10145
  const s = typeof e.title == "string" ? /* @__PURE__ */ l("p", { className: "font-medium text-[13px] text-[#0a0a0a] tracking-[0.13px] whitespace-nowrap truncate", children: e.title }) : e.title, i = /* @__PURE__ */ l(
10141
- r1.CaretDownIcon,
10146
+ a1.CaretDownIcon,
10142
10147
  {
10143
10148
  size: 13,
10144
10149
  className: `shrink-0 transition-transform ${t ? "text-[#0a0a0a]" : "text-[#bbb]"} ${t === "asc" ? "rotate-180" : ""}`
@@ -10211,172 +10216,172 @@ const R8 = () => {
10211
10216
  rowClassName: m,
10212
10217
  rowVariant: b,
10213
10218
  onRow: x,
10214
- onClickRow: A,
10219
+ onClickRow: k,
10215
10220
  rowSelection: w,
10216
10221
  pagination: y,
10217
10222
  className: I = "",
10218
10223
  style: V,
10219
10224
  stickyHeaderTop: D,
10220
- scrollX: S = !1,
10221
- rowSection: N,
10222
- renderSectionDivider: Z
10225
+ scrollX: Z = !1,
10226
+ rowSection: L,
10227
+ renderSectionDivider: S
10223
10228
  }) => {
10224
- const [M, F] = H(null), L = U(null), a1 = U(null), $ = (k, Q) => {
10225
- k && Q && Q.scrollLeft !== k.scrollLeft && (Q.scrollLeft = k.scrollLeft);
10226
- }, { sortedData: f1, sectionDividers: o1 } = W1(() => {
10227
- const k = (_) => {
10228
- if (!M) return _;
10229
- const c1 = e.find((E) => E.key === M.key);
10230
- if (!c1) return _;
10231
- if (typeof c1.sorter == "function") {
10232
- const E = [..._].sort(c1.sorter);
10229
+ const [M, N] = q(null), Q = J(null), T = J(null), c1 = (A, F) => {
10230
+ A && F && F.scrollLeft !== A.scrollLeft && (F.scrollLeft = A.scrollLeft);
10231
+ }, { sortedData: d1, sectionDividers: o1 } = W1(() => {
10232
+ const A = (r1) => {
10233
+ if (!M) return r1;
10234
+ const e1 = e.find((E) => E.key === M.key);
10235
+ if (!e1) return r1;
10236
+ if (typeof e1.sorter == "function") {
10237
+ const E = [...r1].sort(e1.sorter);
10233
10238
  return M.direction === "asc" ? E : E.reverse();
10234
10239
  }
10235
- const s1 = c1.dataIndex ?? M.key;
10236
- return [..._].sort((E, R) => {
10237
- const q = E[s1], J = R[s1];
10238
- return q < J ? M.direction === "asc" ? -1 : 1 : q > J ? M.direction === "asc" ? 1 : -1 : 0;
10240
+ const p1 = e1.dataIndex ?? M.key;
10241
+ return [...r1].sort((E, G) => {
10242
+ const Y = E[p1], O = G[p1];
10243
+ return Y < O ? M.direction === "asc" ? -1 : 1 : Y > O ? M.direction === "asc" ? 1 : -1 : 0;
10239
10244
  });
10240
10245
  };
10241
- if (!N)
10246
+ if (!L)
10242
10247
  return {
10243
- sortedData: k(t),
10248
+ sortedData: A(t),
10244
10249
  sectionDividers: /* @__PURE__ */ new Map()
10245
10250
  };
10246
- const Q = [], T = /* @__PURE__ */ new Map();
10247
- for (const _ of t) {
10248
- const c1 = N(_);
10249
- let s1 = T.get(c1);
10250
- s1 === void 0 && (s1 = Q.length, T.set(c1, s1), Q.push({ key: c1, records: [] })), Q[s1].records.push(_);
10251
- }
10252
- const P = [], t1 = /* @__PURE__ */ new Map();
10253
- for (const _ of Q) {
10254
- const c1 = k(_.records);
10255
- t1.set(P.length, { key: _.key, records: c1 }), P.push(...c1);
10256
- }
10257
- return { sortedData: P, sectionDividers: t1 };
10258
- }, [t, M, e, N]), K = (k) => {
10259
- F((Q) => (Q == null ? void 0 : Q.key) === k ? Q.direction === "asc" ? { key: k, direction: "desc" } : null : { key: k, direction: "asc" });
10260
- }, G = (k, Q) => typeof d == "function" ? d(k) : String(k[d] || Q);
10251
+ const F = [], W = /* @__PURE__ */ new Map();
10252
+ for (const r1 of t) {
10253
+ const e1 = L(r1);
10254
+ let p1 = W.get(e1);
10255
+ p1 === void 0 && (p1 = F.length, W.set(e1, p1), F.push({ key: e1, records: [] })), F[p1].records.push(r1);
10256
+ }
10257
+ const P = [], U = /* @__PURE__ */ new Map();
10258
+ for (const r1 of F) {
10259
+ const e1 = A(r1.records);
10260
+ U.set(P.length, { key: r1.key, records: e1 }), P.push(...e1);
10261
+ }
10262
+ return { sortedData: P, sectionDividers: U };
10263
+ }, [t, M, e, L]), s1 = (A) => {
10264
+ N((F) => (F == null ? void 0 : F.key) === A ? F.direction === "asc" ? { key: A, direction: "desc" } : null : { key: A, direction: "asc" });
10265
+ }, K = (A, F) => typeof d == "function" ? d(A) : String(A[d] || F);
10261
10266
  if (u === "detached") {
10262
- const k = {
10267
+ const A = {
10263
10268
  borderBottom: "1px solid var(--malachite-card-border, #e8e8e8)"
10264
- }, Q = S ? r9(e) : 0, T = S ? { minWidth: Q } : {}, P = {
10269
+ }, F = Z ? r9(e) : 0, W = Z ? { minWidth: F } : {}, P = {
10265
10270
  border: "1px solid var(--malachite-card-border, #e8e8e8)",
10266
10271
  borderRadius: 8,
10267
10272
  overflow: "hidden",
10268
- ...T
10269
- }, t1 = (E, R, q = !1) => {
10270
- const J = G(E, R), j = (x == null ? void 0 : x(E, R)) || {}, y1 = b == null ? void 0 : b(E, R), Z1 = A || j.onClick ? () => {
10271
- var d1;
10272
- A == null || A(E, R), (d1 = j.onClick) == null || d1.call(j, E, R);
10273
- } : void 0, Y1 = !!Z1, se = q ? {} : k;
10273
+ ...W
10274
+ }, U = (E, G, Y = !1) => {
10275
+ const O = K(E, G), H = (x == null ? void 0 : x(E, G)) || {}, y1 = b == null ? void 0 : b(E, G), Z1 = k || H.onClick ? () => {
10276
+ var h1;
10277
+ k == null || k(E, G), (h1 = H.onClick) == null || h1.call(H, E, G);
10278
+ } : void 0, Y1 = !!Z1, se = Y ? {} : A;
10274
10279
  return /* @__PURE__ */ l(
10275
10280
  "div",
10276
10281
  {
10277
10282
  className: `
10278
10283
  group bg-white flex min-h-10 items-stretch relative w-full
10279
10284
  ${Y1 ? "cursor-pointer hover:bg-[#fafafa]" : ""}
10280
- ${(m == null ? void 0 : m(E, R)) || ""}
10285
+ ${(m == null ? void 0 : m(E, G)) || ""}
10281
10286
  `,
10282
10287
  style: y1 ? {
10283
10288
  ...se,
10284
- ...T,
10289
+ ...W,
10285
10290
  backgroundColor: `var(--malachite-table-row-variant-${y1}-background)`
10286
- } : { ...se, ...T },
10291
+ } : { ...se, ...W },
10287
10292
  onClick: Z1,
10288
- onDoubleClick: j.onDoubleClick ? () => {
10289
- var d1;
10290
- return (d1 = j.onDoubleClick) == null ? void 0 : d1.call(j, E, R);
10293
+ onDoubleClick: H.onDoubleClick ? () => {
10294
+ var h1;
10295
+ return (h1 = H.onDoubleClick) == null ? void 0 : h1.call(H, E, G);
10291
10296
  } : void 0,
10292
- onContextMenu: j.onContextMenu ? () => {
10293
- var d1;
10294
- return (d1 = j.onContextMenu) == null ? void 0 : d1.call(j, E, R);
10297
+ onContextMenu: H.onContextMenu ? () => {
10298
+ var h1;
10299
+ return (h1 = H.onContextMenu) == null ? void 0 : h1.call(H, E, G);
10295
10300
  } : void 0,
10296
- onMouseEnter: j.onMouseEnter ? () => {
10297
- var d1;
10298
- return (d1 = j.onMouseEnter) == null ? void 0 : d1.call(j, E, R);
10301
+ onMouseEnter: H.onMouseEnter ? () => {
10302
+ var h1;
10303
+ return (h1 = H.onMouseEnter) == null ? void 0 : h1.call(H, E, G);
10299
10304
  } : void 0,
10300
- onMouseLeave: j.onMouseLeave ? () => {
10301
- var d1;
10302
- return (d1 = j.onMouseLeave) == null ? void 0 : d1.call(j, E, R);
10305
+ onMouseLeave: H.onMouseLeave ? () => {
10306
+ var h1;
10307
+ return (h1 = H.onMouseLeave) == null ? void 0 : h1.call(H, E, G);
10303
10308
  } : void 0,
10304
- children: e.map((d1) => /* @__PURE__ */ l(
10309
+ children: e.map((h1) => /* @__PURE__ */ l(
10305
10310
  c9,
10306
10311
  {
10307
- column: d1,
10312
+ column: h1,
10308
10313
  record: E,
10309
- index: R,
10314
+ index: G,
10310
10315
  size: C
10311
10316
  },
10312
- d1.key
10317
+ h1.key
10313
10318
  ))
10314
10319
  },
10315
- J
10320
+ O
10316
10321
  );
10317
- }, _ = (E, R = !1) => /* @__PURE__ */ l(
10322
+ }, r1 = (E, G = !1) => /* @__PURE__ */ l(
10318
10323
  "div",
10319
10324
  {
10320
10325
  className: "bg-white flex min-h-10 items-stretch w-full",
10321
- style: { ...R ? {} : k, ...T },
10322
- children: e.map((q) => (q.title === "" || q.title == null) && q.width !== void 0 ? /* @__PURE__ */ l(
10326
+ style: { ...G ? {} : A, ...W },
10327
+ children: e.map((Y) => (Y.title === "" || Y.title == null) && Y.width !== void 0 ? /* @__PURE__ */ l(
10323
10328
  "div",
10324
10329
  {
10325
10330
  className: "flex items-center justify-end shrink-0 overflow-clip px-4 py-3",
10326
- style: F5(q),
10331
+ style: F5(Y),
10327
10332
  children: /* @__PURE__ */ l("div", { className: "h-3 bg-gray-200 rounded animate-pulse w-2/5" })
10328
10333
  },
10329
- q.key
10334
+ Y.key
10330
10335
  ) : /* @__PURE__ */ l(
10331
10336
  "div",
10332
10337
  {
10333
10338
  className: "flex flex-[1_0_0] items-center min-w-0 overflow-clip px-4 py-3",
10334
- style: we(q),
10339
+ style: we(Y),
10335
10340
  children: /* @__PURE__ */ l("div", { className: "h-3 bg-gray-200 rounded animate-pulse w-3/5" })
10336
10341
  },
10337
- q.key
10342
+ Y.key
10338
10343
  ))
10339
10344
  },
10340
10345
  `skeleton-${E}`
10341
- ), c1 = i ? /* @__PURE__ */ l("div", { className: "flex min-h-10 items-stretch w-full", style: T, children: e.map((E) => /* @__PURE__ */ l(
10346
+ ), e1 = i ? /* @__PURE__ */ l("div", { className: "flex min-h-10 items-stretch w-full", style: W, children: e.map((E) => /* @__PURE__ */ l(
10342
10347
  i9,
10343
10348
  {
10344
10349
  column: E,
10345
10350
  sortDirection: (M == null ? void 0 : M.key) === E.key ? M.direction : null,
10346
- onSort: E.sorter ? () => K(E.key) : void 0
10351
+ onSort: E.sorter ? () => s1(E.key) : void 0
10347
10352
  },
10348
10353
  E.key
10349
- )) }) : null, s1 = D !== void 0 && i && !h;
10354
+ )) }) : null, p1 = D !== void 0 && i && !h;
10350
10355
  return /* @__PURE__ */ v("div", { className: `w-full ${I}`, style: V, children: [
10351
10356
  /* @__PURE__ */ v(
10352
10357
  "div",
10353
10358
  {
10354
- className: `bg-[#f7f7f7] flex flex-col items-start ${s1 ? "" : "overflow-clip"} p-[4px] relative rounded-[12px] w-full`,
10359
+ className: `bg-[#f7f7f7] flex flex-col items-start ${p1 ? "" : "overflow-clip"} p-[4px] relative rounded-[12px] w-full`,
10355
10360
  children: [
10356
10361
  i && /* @__PURE__ */ l(
10357
10362
  "div",
10358
10363
  {
10359
- ref: L,
10360
- onScroll: S ? () => $(L.current, a1.current) : void 0,
10364
+ ref: Q,
10365
+ onScroll: Z ? () => c1(Q.current, T.current) : void 0,
10361
10366
  style: {
10362
- ...s1 ? {
10367
+ ...p1 ? {
10363
10368
  position: "sticky",
10364
10369
  top: D,
10365
10370
  zIndex: 8,
10366
10371
  backgroundColor: "#f7f7f7",
10367
10372
  width: "100%"
10368
10373
  } : { width: "100%" },
10369
- ...S ? { overflowX: "auto", scrollbarWidth: "none" } : {}
10374
+ ...Z ? { overflowX: "auto", scrollbarWidth: "none" } : {}
10370
10375
  },
10371
- children: c1
10376
+ children: e1
10372
10377
  }
10373
10378
  ),
10374
10379
  /* @__PURE__ */ l(
10375
10380
  "div",
10376
10381
  {
10377
- ref: a1,
10378
- onScroll: S ? () => $(a1.current, L.current) : void 0,
10379
- className: `flex flex-col items-start ${S ? "overflow-x-auto" : "overflow-x-clip"} overflow-y-auto w-full`,
10382
+ ref: T,
10383
+ onScroll: Z ? () => c1(T.current, Q.current) : void 0,
10384
+ className: `flex flex-col items-start ${Z ? "overflow-x-auto" : "overflow-x-clip"} overflow-y-auto w-full`,
10380
10385
  style: {
10381
10386
  // Thin, transparent-track scrollbar — Firefox + modern Chromium
10382
10387
  // honor these; older Webkit falls back to the default scrollbar.
@@ -10395,42 +10400,42 @@ const R8 = () => {
10395
10400
  ] }) }) : r ? /* @__PURE__ */ l("div", { className: "flex flex-col w-full", style: P, children: (() => {
10396
10401
  const E = y != null && y.pageSize ? Math.min(y.pageSize, 10) : 5;
10397
10402
  return Array.from({ length: E }).map(
10398
- (R, q) => _(q, q === E - 1)
10403
+ (G, Y) => r1(Y, Y === E - 1)
10399
10404
  );
10400
- })() }) : f1.length === 0 ? /* @__PURE__ */ l("div", { className: "flex flex-col w-full", style: P, children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-center bg-white w-full py-12", children: /* @__PURE__ */ l("div", { className: "text-[var(--malachite-text-secondary)] text-[13px]", children: "No data" }) }) }) : (() => {
10401
- const E = (q, J, j) => /* @__PURE__ */ l(
10405
+ })() }) : d1.length === 0 ? /* @__PURE__ */ l("div", { className: "flex flex-col w-full", style: P, children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center justify-center bg-white w-full py-12", children: /* @__PURE__ */ l("div", { className: "text-[var(--malachite-text-secondary)] text-[13px]", children: "No data" }) }) }) : (() => {
10406
+ const E = (Y, O, H) => /* @__PURE__ */ l(
10402
10407
  "div",
10403
10408
  {
10404
10409
  className: "flex flex-col w-full",
10405
10410
  style: P,
10406
- children: q.map(
10407
- (y1, Z1) => t1(y1, J + Z1, Z1 === q.length - 1)
10411
+ children: Y.map(
10412
+ (y1, Z1) => U(y1, O + Z1, Z1 === Y.length - 1)
10408
10413
  )
10409
10414
  },
10410
- `section-card-${j}`
10415
+ `section-card-${H}`
10411
10416
  );
10412
10417
  if (o1.size === 0)
10413
- return E(f1, 0, "all");
10414
- const R = [...o1.keys()].sort((q, J) => q - J);
10415
- return R.map((q, J) => {
10416
- const j = o1.get(q);
10417
- if (!j)
10418
+ return E(d1, 0, "all");
10419
+ const G = [...o1.keys()].sort((Y, O) => Y - O);
10420
+ return G.map((Y, O) => {
10421
+ const H = o1.get(Y);
10422
+ if (!H)
10418
10423
  return null;
10419
- const y1 = J + 1 < R.length ? R[J + 1] : f1.length, Z1 = f1.slice(q, y1), Y1 = Z == null ? void 0 : Z(
10420
- j.key,
10421
- j.records
10424
+ const y1 = O + 1 < G.length ? G[O + 1] : d1.length, Z1 = d1.slice(Y, y1), Y1 = S == null ? void 0 : S(
10425
+ H.key,
10426
+ H.records
10422
10427
  );
10423
10428
  return /* @__PURE__ */ v(P1.Fragment, { children: [
10424
10429
  Y1 != null ? /* @__PURE__ */ l(
10425
10430
  "div",
10426
10431
  {
10427
10432
  className: "table-section-divider",
10428
- style: T,
10433
+ style: W,
10429
10434
  children: Y1
10430
10435
  }
10431
10436
  ) : null,
10432
- E(Z1, q, j.key)
10433
- ] }, `section-${j.key}`);
10437
+ E(Z1, Y, H.key)
10438
+ ] }, `section-${H.key}`);
10434
10439
  });
10435
10440
  })()
10436
10441
  }
@@ -10454,19 +10459,19 @@ const R8 = () => {
10454
10459
  )
10455
10460
  ] });
10456
10461
  }
10457
- const p1 = (k) => {
10458
- const Q = k.sorter, P = (M == null ? void 0 : M.key) === k.key ? M == null ? void 0 : M.direction : null, t1 = /* @__PURE__ */ v("div", { className: "flex items-center gap-2", children: [
10459
- /* @__PURE__ */ l("span", { children: k.title }),
10460
- Q && /* @__PURE__ */ v("div", { className: "flex flex-col", children: [
10462
+ const X = (A) => {
10463
+ const F = A.sorter, P = (M == null ? void 0 : M.key) === A.key ? M == null ? void 0 : M.direction : null, U = /* @__PURE__ */ v("div", { className: "flex items-center gap-2", children: [
10464
+ /* @__PURE__ */ l("span", { children: A.title }),
10465
+ F && /* @__PURE__ */ v("div", { className: "flex flex-col", children: [
10461
10466
  /* @__PURE__ */ l(
10462
- r1.CaretUpIcon,
10467
+ a1.CaretUpIcon,
10463
10468
  {
10464
10469
  size: 12,
10465
10470
  className: P === "asc" ? "text-blue-600" : "text-gray-400"
10466
10471
  }
10467
10472
  ),
10468
10473
  /* @__PURE__ */ l(
10469
- r1.CaretDownIcon,
10474
+ a1.CaretDownIcon,
10470
10475
  {
10471
10476
  size: 12,
10472
10477
  className: `-mt-1 ${P === "desc" ? "text-blue-600" : "text-gray-400"}`
@@ -10480,21 +10485,21 @@ const R8 = () => {
10480
10485
  className: `
10481
10486
  table-header table-cell px-4 py-3 text-left font-semibold border-0 first:rounded-tl-lg last:rounded-tr-lg
10482
10487
  ${fe(C)}
10483
- ${k.align === "center" ? "text-center" : "text-left"}
10484
- ${k.align === "right" ? "text-right" : ""}
10488
+ ${A.align === "center" ? "text-center" : "text-left"}
10489
+ ${A.align === "right" ? "text-right" : ""}
10485
10490
  `,
10486
- style: { width: k.width },
10487
- "aria-sort": Q ? l9(P) : void 0,
10488
- children: Q ? /* @__PURE__ */ l(
10491
+ style: { width: A.width },
10492
+ "aria-sort": F ? l9(P) : void 0,
10493
+ children: F ? /* @__PURE__ */ l(
10489
10494
  "button",
10490
10495
  {
10491
- ...pr(k.title, () => K(k.key)),
10496
+ ...pr(A.title, () => s1(A.key)),
10492
10497
  className: "flex w-full items-center cursor-pointer hover:opacity-80 appearance-none bg-transparent border-0 p-0 font-semibold text-inherit text-left",
10493
- children: t1
10498
+ children: U
10494
10499
  }
10495
- ) : t1
10500
+ ) : U
10496
10501
  },
10497
- k.key
10502
+ A.key
10498
10503
  );
10499
10504
  };
10500
10505
  return a ? /* @__PURE__ */ l("div", { className: "w-full", style: { ...V }, children: /* @__PURE__ */ l(
@@ -10505,22 +10510,22 @@ const R8 = () => {
10505
10510
  ...h ? { maxHeight: h } : {}
10506
10511
  },
10507
10512
  children: /* @__PURE__ */ v("table", { className: "w-full border-collapse rounded-lg overflow-hidden", children: [
10508
- i && /* @__PURE__ */ l("thead", { children: /* @__PURE__ */ l("tr", { children: e.map((k) => /* @__PURE__ */ l(
10513
+ i && /* @__PURE__ */ l("thead", { children: /* @__PURE__ */ l("tr", { children: e.map((A) => /* @__PURE__ */ l(
10509
10514
  "th",
10510
10515
  {
10511
10516
  className: `
10512
10517
  table-header table-cell px-4 py-3 text-left font-semibold border-0 first:rounded-tl-lg last:rounded-tr-lg
10513
10518
  ${s ? "table-cell-bordered table-cell-bordered-top" : ""}
10514
- ${s && k === e[0] ? "table-cell-bordered-left" : ""}
10515
- ${s && k === e[e.length - 1] ? "table-cell-bordered-right" : ""}
10519
+ ${s && A === e[0] ? "table-cell-bordered-left" : ""}
10520
+ ${s && A === e[e.length - 1] ? "table-cell-bordered-right" : ""}
10516
10521
  ${fe(C)}
10517
- ${k.align === "center" ? "text-center" : "text-left"}
10518
- ${k.align === "right" ? "text-right" : ""}
10522
+ ${A.align === "center" ? "text-center" : "text-left"}
10523
+ ${A.align === "right" ? "text-right" : ""}
10519
10524
  `,
10520
- style: { width: k.width },
10521
- children: /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ l("span", { children: k.title }) })
10525
+ style: { width: A.width },
10526
+ children: /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ l("span", { children: A.title }) })
10522
10527
  },
10523
- k.key
10528
+ A.key
10524
10529
  )) }) }),
10525
10530
  /* @__PURE__ */ l("tbody", { children: /* @__PURE__ */ l("tr", { children: /* @__PURE__ */ l(
10526
10531
  "td",
@@ -10528,7 +10533,7 @@ const R8 = () => {
10528
10533
  colSpan: e.length + (w ? 1 : 0),
10529
10534
  className: "px-4 py-12 text-center",
10530
10535
  children: /* @__PURE__ */ v("div", { className: "flex flex-col items-center justify-center", children: [
10531
- /* @__PURE__ */ l("div", { className: "table-error-icon w-12 h-12 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ l(r1.WarningTriangleIcon, { size: 24 }) }),
10536
+ /* @__PURE__ */ l("div", { className: "table-error-icon w-12 h-12 rounded-full flex items-center justify-center mb-4", children: /* @__PURE__ */ l(a1.WarningTriangleIcon, { size: 24 }) }),
10532
10537
  /* @__PURE__ */ l("div", { className: "table-error-title text-lg font-semibold mb-2", children: o }),
10533
10538
  /* @__PURE__ */ l("div", { className: "table-error-subtitle text-sm", children: n })
10534
10539
  ] })
@@ -10552,84 +10557,84 @@ const R8 = () => {
10552
10557
  children: /* @__PURE__ */ v(
10553
10558
  "table",
10554
10559
  {
10555
- className: `w-full ${p === "fixed" || e.some((k) => k.width) ? "table-fixed" : "table-auto"} ${s ? "border-separate table-bordered" : "border-collapse"} rounded-lg overflow-hidden`,
10560
+ className: `w-full ${p === "fixed" || e.some((A) => A.width) ? "table-fixed" : "table-auto"} ${s ? "border-separate table-bordered" : "border-collapse"} rounded-lg overflow-hidden`,
10556
10561
  style: { borderSpacing: "0" },
10557
10562
  children: [
10558
- i && /* @__PURE__ */ l("thead", { children: /* @__PURE__ */ l("tr", { children: e.map((k) => p1(k)) }) }),
10559
- /* @__PURE__ */ l("tbody", { children: r ? Array.from({ length: 5 }).map((k, Q) => /* @__PURE__ */ l(
10563
+ i && /* @__PURE__ */ l("thead", { children: /* @__PURE__ */ l("tr", { children: e.map((A) => X(A)) }) }),
10564
+ /* @__PURE__ */ l("tbody", { children: r ? Array.from({ length: 5 }).map((A, F) => /* @__PURE__ */ l(
10560
10565
  "tr",
10561
10566
  {
10562
10567
  className: `table-row ${s ? "table-row-bordered" : ""}`,
10563
- children: e.map((T) => /* @__PURE__ */ l(
10568
+ children: e.map((W) => /* @__PURE__ */ l(
10564
10569
  "td",
10565
10570
  {
10566
10571
  className: `table-cell px-4 py-3 text-left ${fe(C)}`,
10567
- style: { width: T.width },
10572
+ style: { width: W.width },
10568
10573
  children: /* @__PURE__ */ l("div", { className: "h-4 bg-gray-200 rounded animate-pulse" })
10569
10574
  },
10570
- T.key
10575
+ W.key
10571
10576
  ))
10572
10577
  },
10573
- Q
10574
- )) : f1.map((k, Q) => {
10575
- const T = G(k, Q), P = (x == null ? void 0 : x(k, Q)) || {}, t1 = b == null ? void 0 : b(k, Q), _ = Q === 0, c1 = Q === t.length - 1, s1 = t1 ? `var(--malachite-table-row-variant-${t1}-background)` : void 0;
10578
+ F
10579
+ )) : d1.map((A, F) => {
10580
+ const W = K(A, F), P = (x == null ? void 0 : x(A, F)) || {}, U = b == null ? void 0 : b(A, F), r1 = F === 0, e1 = F === t.length - 1, p1 = U ? `var(--malachite-table-row-variant-${U}-background)` : void 0;
10576
10581
  return /* @__PURE__ */ l(
10577
10582
  "tr",
10578
10583
  {
10579
10584
  className: `
10580
10585
  ${s ? "table-row-bordered" : "table-row hover:opacity-80"}
10581
- ${(m == null ? void 0 : m(k, Q)) || ""}
10582
- ${A || P.onClick ? "cursor-pointer" : ""}
10586
+ ${(m == null ? void 0 : m(A, F)) || ""}
10587
+ ${k || P.onClick ? "cursor-pointer" : ""}
10583
10588
  `,
10584
- onClick: A || P.onClick ? () => {
10589
+ onClick: k || P.onClick ? () => {
10585
10590
  var E;
10586
- A == null || A(k, Q), (E = P.onClick) == null || E.call(P, k, Q);
10591
+ k == null || k(A, F), (E = P.onClick) == null || E.call(P, A, F);
10587
10592
  } : void 0,
10588
10593
  onDoubleClick: P.onDoubleClick ? () => {
10589
10594
  var E;
10590
10595
  return (E = P.onDoubleClick) == null ? void 0 : E.call(
10591
10596
  P,
10592
- k,
10593
- Q
10597
+ A,
10598
+ F
10594
10599
  );
10595
10600
  } : void 0,
10596
10601
  onContextMenu: P.onContextMenu ? () => {
10597
10602
  var E;
10598
10603
  return (E = P.onContextMenu) == null ? void 0 : E.call(
10599
10604
  P,
10600
- k,
10601
- Q
10605
+ A,
10606
+ F
10602
10607
  );
10603
10608
  } : void 0,
10604
10609
  onMouseEnter: P.onMouseEnter ? () => {
10605
10610
  var E;
10606
- return (E = P.onMouseEnter) == null ? void 0 : E.call(P, k, Q);
10611
+ return (E = P.onMouseEnter) == null ? void 0 : E.call(P, A, F);
10607
10612
  } : void 0,
10608
10613
  onMouseLeave: P.onMouseLeave ? () => {
10609
10614
  var E;
10610
- return (E = P.onMouseLeave) == null ? void 0 : E.call(P, k, Q);
10615
+ return (E = P.onMouseLeave) == null ? void 0 : E.call(P, A, F);
10611
10616
  } : void 0,
10612
10617
  children: e.map((E) => {
10613
- const R = E === e[0], q = E === e[e.length - 1];
10618
+ const G = E === e[0], Y = E === e[e.length - 1];
10614
10619
  return /* @__PURE__ */ l(
10615
10620
  n9,
10616
10621
  {
10617
10622
  column: E,
10618
- record: k,
10619
- index: Q,
10623
+ record: A,
10624
+ index: F,
10620
10625
  size: C,
10621
10626
  bordered: s,
10622
- isFirstRow: _,
10623
- isLastRow: c1,
10624
- isFirstColumn: R,
10625
- isLastColumn: q,
10626
- variantBackground: s1
10627
+ isFirstRow: r1,
10628
+ isLastRow: e1,
10629
+ isFirstColumn: G,
10630
+ isLastColumn: Y,
10631
+ variantBackground: p1
10627
10632
  },
10628
10633
  E.key
10629
10634
  );
10630
10635
  })
10631
10636
  },
10632
- T
10637
+ W
10633
10638
  );
10634
10639
  }) })
10635
10640
  ]
@@ -10692,22 +10697,22 @@ const R8 = () => {
10692
10697
  minWidth: a = 180,
10693
10698
  size: o = "small"
10694
10699
  }) => {
10695
- const n = s9[o], [s, i] = H(!1), [d, h] = H(null), C = U(null), p = U(null), u = B1(() => {
10696
- var L, a1;
10700
+ const n = s9[o], [s, i] = q(!1), [d, h] = q(null), C = J(null), p = J(null), u = B1(() => {
10701
+ var Q, T;
10697
10702
  const w = C.current;
10698
10703
  if (!w)
10699
10704
  return;
10700
- const y = w.getBoundingClientRect(), I = ((L = p.current) == null ? void 0 : L.offsetWidth) || a, V = ((a1 = p.current) == null ? void 0 : a1.offsetHeight) || 0, D = 8, S = y.right - I, N = window.innerWidth - I - D, Z = Math.max(D, Math.min(S, N)), M = window.innerHeight - y.bottom, F = V > 0 && M < V + D ? y.top - V - 4 : y.bottom + 4;
10701
- h({ top: F, left: Z });
10705
+ const y = w.getBoundingClientRect(), I = ((Q = p.current) == null ? void 0 : Q.offsetWidth) || a, V = ((T = p.current) == null ? void 0 : T.offsetHeight) || 0, D = 8, Z = y.right - I, L = window.innerWidth - I - D, S = Math.max(D, Math.min(Z, L)), M = window.innerHeight - y.bottom, N = V > 0 && M < V + D ? y.top - V - 4 : y.bottom + 4;
10706
+ h({ top: N, left: S });
10702
10707
  }, [a]);
10703
- u1(() => {
10708
+ g1(() => {
10704
10709
  if (!s)
10705
10710
  return;
10706
10711
  u();
10707
10712
  const w = () => u(), y = (V) => {
10708
- var S, N;
10713
+ var Z, L;
10709
10714
  const D = V.target;
10710
- !((S = C.current) != null && S.contains(D)) && !((N = p.current) != null && N.contains(D)) && i(!1);
10715
+ !((Z = C.current) != null && Z.contains(D)) && !((L = p.current) != null && L.contains(D)) && i(!1);
10711
10716
  }, I = (V) => {
10712
10717
  V.key === "Escape" && i(!1);
10713
10718
  };
@@ -10750,7 +10755,7 @@ const R8 = () => {
10750
10755
  gap: 2,
10751
10756
  visibility: d ? "visible" : "hidden",
10752
10757
  opacity: d ? 1 : 0
10753
- }, A = (w) => w.type === "divider" ? {
10758
+ }, k = (w) => w.type === "divider" ? {
10754
10759
  height: 1,
10755
10760
  background: "var(--malachite-card-border, rgb(232, 232, 232))",
10756
10761
  margin: "4px 0"
@@ -10784,7 +10789,7 @@ const R8 = () => {
10784
10789
  },
10785
10790
  onMouseDown: (w) => w.stopPropagation(),
10786
10791
  style: b,
10787
- children: r ?? /* @__PURE__ */ l(r1.MoreHorizontalIcon, { size: n.icon })
10792
+ children: r ?? /* @__PURE__ */ l(a1.MoreHorizontalIcon, { size: n.icon })
10788
10793
  }
10789
10794
  ),
10790
10795
  s && le(
@@ -10797,7 +10802,7 @@ const R8 = () => {
10797
10802
  onMouseDown: (w) => w.stopPropagation(),
10798
10803
  onClick: (w) => w.stopPropagation(),
10799
10804
  children: e.map(
10800
- (w) => w.type === "divider" ? /* @__PURE__ */ l("div", { style: A(w) }, w.key) : /* @__PURE__ */ v(
10805
+ (w) => w.type === "divider" ? /* @__PURE__ */ l("div", { style: k(w) }, w.key) : /* @__PURE__ */ v(
10801
10806
  "button",
10802
10807
  {
10803
10808
  type: "button",
@@ -10811,7 +10816,7 @@ const R8 = () => {
10811
10816
  onMouseLeave: (y) => {
10812
10817
  y.currentTarget.style.background = "transparent";
10813
10818
  },
10814
- style: A(w),
10819
+ style: k(w),
10815
10820
  children: [
10816
10821
  w.label,
10817
10822
  w.icon && /* @__PURE__ */ l(
@@ -11030,7 +11035,7 @@ const R8 = () => {
11030
11035
  const h = b9[s], C = t ? h.paddingWithIcon : h.padding, p = v9[i], u = n && !o, m = u && !!d, b = m ? ` ${w9}` : "";
11031
11036
  let x;
11032
11037
  n ? a ? x = u ? `${p.selected}${b}` : p.selected : u ? x = `${p.base} ${p.hover}${b}` : x = p.base : x = f9;
11033
- const A = o ? "opacity-50 cursor-not-allowed pointer-events-none" : "", w = `${m9} ${h.text} ${C} ${x} ${A} ${r}`, y = t ? /* @__PURE__ */ l("span", { className: "inline-flex items-center justify-center w-4 h-4 shrink-0 [&>img]:max-w-full [&>img]:max-h-full [&>img]:object-contain", children: t }) : null;
11038
+ const k = o ? "opacity-50 cursor-not-allowed pointer-events-none" : "", w = `${m9} ${h.text} ${C} ${x} ${k} ${r}`, y = t ? /* @__PURE__ */ l("span", { className: "inline-flex items-center justify-center w-4 h-4 shrink-0 [&>img]:max-w-full [&>img]:max-h-full [&>img]:object-contain", children: t }) : null;
11034
11039
  return m ? /* @__PURE__ */ v("button", { type: "button", className: `${ie} ${w}`, onClick: d, children: [
11035
11040
  y,
11036
11041
  e
@@ -11215,7 +11220,7 @@ const M9 = () => {
11215
11220
  height: s,
11216
11221
  minWidth: i
11217
11222
  }) => {
11218
- const d = U(null);
11223
+ const d = J(null);
11219
11224
  return N5(d), /* @__PURE__ */ l(
11220
11225
  "span",
11221
11226
  {
@@ -11241,7 +11246,7 @@ const M9 = () => {
11241
11246
  height: n,
11242
11247
  minWidth: s
11243
11248
  }) => {
11244
- const i = U(null);
11249
+ const i = J(null);
11245
11250
  return N5(i), /* @__PURE__ */ l(
11246
11251
  "span",
11247
11252
  {
@@ -11264,7 +11269,7 @@ const M9 = () => {
11264
11269
  active: r = !0,
11265
11270
  className: a
11266
11271
  }) => {
11267
- const o = U(null);
11272
+ const o = J(null);
11268
11273
  N5(o);
11269
11274
  const n = typeof e == "number" ? e : E9[e];
11270
11275
  return /* @__PURE__ */ l(
@@ -11312,54 +11317,54 @@ const M9 = () => {
11312
11317
  className: o,
11313
11318
  renderOverflow: n
11314
11319
  }) => {
11315
- const s = U(null), [i, d] = H(0);
11320
+ const s = J(null), [i, d] = q(0);
11316
11321
  oe(() => {
11317
- var Z;
11322
+ var S;
11318
11323
  const C = s.current;
11319
11324
  if (!C)
11320
11325
  return;
11321
11326
  const p = C.getRootNode();
11322
11327
  (p instanceof Document || p instanceof ShadowRoot) && K9(p);
11323
11328
  const u = typeof ResizeObserver < "u", m = typeof MutationObserver < "u";
11324
- let b = null, x = !1, A = -1;
11329
+ let b = null, x = !1, k = -1;
11325
11330
  const w = () => {
11326
11331
  x || b !== null || (b = requestAnimationFrame(y));
11327
11332
  }, y = () => {
11328
11333
  if (b = null, x || s.current !== C)
11329
11334
  return;
11330
- const M = Array.from(C.children), F = !!n, L = F ? M[M.length - 1] ?? null : null, a1 = F ? M.slice(0, -1) : M;
11331
- for (const o1 of a1)
11335
+ const M = Array.from(C.children), N = !!n, Q = N ? M[M.length - 1] ?? null : null, T = N ? M.slice(0, -1) : M;
11336
+ for (const o1 of T)
11332
11337
  o1.removeAttribute(ge);
11333
- if (L && L.setAttribute(ge, ""), C.scrollWidth <= C.clientWidth) {
11334
- d((o1) => o1 === 0 ? o1 : 0), A = C.clientWidth;
11338
+ if (Q && Q.setAttribute(ge, ""), C.scrollWidth <= C.clientWidth) {
11339
+ d((o1) => o1 === 0 ? o1 : 0), k = C.clientWidth;
11335
11340
  return;
11336
11341
  }
11337
- L && L.removeAttribute(ge);
11338
- let $ = a1.length - 1;
11339
- for (; $ >= 0 && C.scrollWidth > C.clientWidth; )
11340
- a1[$].setAttribute(ge, ""), $ -= 1;
11341
- const f1 = a1.length - 1 - $;
11342
- d((o1) => o1 === f1 ? o1 : f1), A = C.clientWidth;
11342
+ Q && Q.removeAttribute(ge);
11343
+ let c1 = T.length - 1;
11344
+ for (; c1 >= 0 && C.scrollWidth > C.clientWidth; )
11345
+ T[c1].setAttribute(ge, ""), c1 -= 1;
11346
+ const d1 = T.length - 1 - c1;
11347
+ d((o1) => o1 === d1 ? o1 : d1), k = C.clientWidth;
11343
11348
  };
11344
11349
  y();
11345
11350
  const I = () => {
11346
- x || s.current === C && C.clientWidth === A || w();
11351
+ x || s.current === C && C.clientWidth === k || w();
11347
11352
  }, V = u ? new ResizeObserver(I) : null;
11348
11353
  V == null || V.observe(C);
11349
- const D = u ? new ResizeObserver(w) : null, S = () => {
11354
+ const D = u ? new ResizeObserver(w) : null, Z = () => {
11350
11355
  if (D) {
11351
11356
  D.disconnect();
11352
11357
  for (const M of Array.from(C.children))
11353
11358
  D.observe(M);
11354
11359
  }
11355
11360
  };
11356
- S();
11357
- const N = m ? new MutationObserver(() => {
11358
- S(), w();
11361
+ Z();
11362
+ const L = m ? new MutationObserver(() => {
11363
+ Z(), w();
11359
11364
  }) : null;
11360
- return N == null || N.observe(C, { childList: !0 }), typeof document < "u" && ((Z = document.fonts) != null && Z.ready) && document.fonts.ready.then(w).catch(() => {
11365
+ return L == null || L.observe(C, { childList: !0 }), typeof document < "u" && ((S = document.fonts) != null && S.ready) && document.fonts.ready.then(w).catch(() => {
11361
11366
  }), () => {
11362
- x = !0, b !== null && cancelAnimationFrame(b), V == null || V.disconnect(), D == null || D.disconnect(), N == null || N.disconnect();
11367
+ x = !0, b !== null && cancelAnimationFrame(b), V == null || V.disconnect(), D == null || D.disconnect(), L == null || L.disconnect();
11363
11368
  };
11364
11369
  }, [t, r, a]);
11365
11370
  const h = {
@@ -11510,7 +11515,7 @@ const M9 = () => {
11510
11515
  "aria-label": "Close",
11511
11516
  onClick: e,
11512
11517
  className: `flex cursor-pointer items-center justify-center border-0 bg-transparent p-0 transition-colors ${t}`,
11513
- children: /* @__PURE__ */ l(r1.DismissIcon, { size: 12 })
11518
+ children: /* @__PURE__ */ l(a1.DismissIcon, { size: 12 })
11514
11519
  }
11515
11520
  ), qa = ({
11516
11521
  left: e,
@@ -11615,7 +11620,7 @@ export {
11615
11620
  sa as CodeBlock,
11616
11621
  ia as Confetti,
11617
11622
  ca as ConnectionHeader,
11618
- r1 as CustomIcons,
11623
+ a1 as CustomIcons,
11619
11624
  Oa as DefinitionRow,
11620
11625
  ba as Divider,
11621
11626
  C8 as DividerVariant,