@salilvnair/dui 1.0.16 → 1.0.18

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
@@ -5,7 +5,7 @@ import { A as ds, a as us, b as ps, c as fs, d as gs, e as hs, f as bs, g as ms,
5
5
  import { jsxs as x, jsx as o, Fragment as ve } from "react/jsx-runtime";
6
6
  import { u as Ie, D as ft, a as Lt, b as Gt, c as zt, d as Oe, e as lt, r as Xt, f as et, g as Da, h as Tb, i as $b, j as Ab, k as Oa, l as Mb, m as Lb, n as Db, o as Ob, C as Ba, p as Pa, q as Bb, E as Pb, s as Wa, t as Wb, v as Fb } from "./chunks/doc-path-CS9-ZNht.js";
7
7
  import { w as Q_, x as J_, y as eI, z as tI, A as nI, B as rI, F as oI, G as iI } from "./chunks/doc-path-CS9-ZNht.js";
8
- import { useState as z, useRef as M, forwardRef as yo, useEffect as U, useCallback as se, useMemo as ue, useImperativeHandle as Hb, cloneElement as Ub, useLayoutEffect as zn, Fragment as Vb } from "react";
8
+ import { useState as z, useRef as L, forwardRef as yo, useEffect as U, useCallback as se, useMemo as ue, useImperativeHandle as Hb, cloneElement as Ub, useLayoutEffect as zn, Fragment as Vb } from "react";
9
9
  import { createPortal as Se } from "react-dom";
10
10
  import { u as Gb, g as Xb } from "./chunks/vis-runtime-DkpA8K_T.js";
11
11
  function Ue(t, e = {}) {
@@ -341,7 +341,7 @@ function qv({
341
341
  className: l = "",
342
342
  style: c
343
343
  }) {
344
- const s = je(n), [d, u] = z(!1), p = M(void 0), g = () => {
344
+ const s = je(n), [d, u] = z(!1), p = L(void 0), g = () => {
345
345
  if (a)
346
346
  try {
347
347
  navigator.clipboard.writeText(e), u(!0), clearTimeout(p.current), p.current = setTimeout(() => u(!1), 1500);
@@ -1120,7 +1120,7 @@ function Qv({
1120
1120
  className: u = "",
1121
1121
  align: p = "auto"
1122
1122
  }) {
1123
- const [g, f] = z(!1), h = M(null), m = l || "var(--color-primary)", b = je(r === "default" ? void 0 : r), y = b.height, v = b.fontSize, k = b.paddingX, w = i ? b.borderRadius : "0px", S = c || s, _ = n === "primary", I = n === "danger", E = _ ? "var(--color-btn-primary-text, #fff)" : I ? "var(--color-btn-danger-text, #fff)" : "var(--color-text-primary)", N = _ ? m : I ? "var(--color-error)" : n === "ghost" ? "transparent" : "var(--color-surface-hover)", R = _ || I || n === "ghost" ? "1px solid transparent" : "1px solid var(--color-surface-border)", P = _ || I ? "rgba(0,0,0,0.12)" : "var(--color-surface-active)";
1123
+ const [g, f] = z(!1), h = L(null), m = l || "var(--color-primary)", b = je(r === "default" ? void 0 : r), y = b.height, v = b.fontSize, k = b.paddingX, w = i ? b.borderRadius : "0px", S = c || s, _ = n === "primary", I = n === "danger", E = _ ? "var(--color-btn-primary-text, #fff)" : I ? "var(--color-btn-danger-text, #fff)" : "var(--color-text-primary)", N = _ ? m : I ? "var(--color-error)" : n === "ghost" ? "transparent" : "var(--color-surface-hover)", R = _ || I || n === "ghost" ? "1px solid transparent" : "1px solid var(--color-surface-border)", B = _ || I ? "rgba(0,0,0,0.12)" : "var(--color-surface-active)";
1124
1124
  return /* @__PURE__ */ x(ve, { children: [
1125
1125
  /* @__PURE__ */ x(
1126
1126
  "div",
@@ -1137,7 +1137,7 @@ function Qv({
1137
1137
  color: E,
1138
1138
  padding: 0,
1139
1139
  transition: "background 120ms",
1140
- "--dui-hover-btn-bg": P
1140
+ "--dui-hover-btn-bg": B
1141
1141
  },
1142
1142
  children: [
1143
1143
  /* @__PURE__ */ x(
@@ -1181,7 +1181,7 @@ function Qv({
1181
1181
  {
1182
1182
  type: "button",
1183
1183
  disabled: c,
1184
- onClick: () => !c && f((D) => !D),
1184
+ onClick: () => !c && f((M) => !M),
1185
1185
  className: "dui_dropdown-button__chevron",
1186
1186
  style: {
1187
1187
  height: "100%",
@@ -1239,11 +1239,11 @@ const Or = yo(
1239
1239
  fontStyle: S,
1240
1240
  ..._
1241
1241
  }, I) {
1242
- const [E, N] = z(!1), [R, P] = z(!1), D = Ue(e === "default" ? void 0 : e, { width: v, borderRadius: k, color: w, fontStyle: S }), L = r || "var(--color-accent, var(--color-primary))", B = n ? D.borderRadius : "0px", T = c ?? a, O = d ? null : s ?? l, W = i ? "var(--color-error)" : E ? L : "var(--color-input-border)", $ = p ? {
1242
+ const [E, N] = z(!1), [R, B] = z(!1), M = Ue(e === "default" ? void 0 : e, { width: v, borderRadius: k, color: w, fontStyle: S }), D = r || "var(--color-accent, var(--color-primary))", P = n ? M.borderRadius : "0px", T = c ?? a, O = d ? null : s ?? l, W = i ? "var(--color-error)" : E ? D : "var(--color-input-border)", $ = p ? {
1243
1243
  display: "inline-flex",
1244
1244
  alignItems: "center",
1245
- height: D.height,
1246
- width: D.width !== "auto" ? D.width : void 0,
1245
+ height: M.height,
1246
+ width: M.width !== "auto" ? M.width : void 0,
1247
1247
  border: "none",
1248
1248
  // When naked + error: red bottom underline so the error state is visible
1249
1249
  borderBottom: i ? "1px solid color-mix(in srgb, var(--color-error) 60%, transparent)" : "none",
@@ -1254,18 +1254,18 @@ const Or = yo(
1254
1254
  } : {
1255
1255
  display: "inline-flex",
1256
1256
  alignItems: "center",
1257
- height: D.height,
1258
- width: D.width !== "auto" ? D.width : void 0,
1259
- borderRadius: B,
1257
+ height: M.height,
1258
+ width: M.width !== "auto" ? M.width : void 0,
1259
+ borderRadius: P,
1260
1260
  border: `1px solid ${W}`,
1261
1261
  background: "var(--color-input-bg)",
1262
1262
  transition: "border-color 140ms, box-shadow 140ms",
1263
- boxShadow: E ? `0 0 0 2px color-mix(in srgb, ${L} 20%, transparent)` : "none",
1263
+ boxShadow: E ? `0 0 0 2px color-mix(in srgb, ${D} 20%, transparent)` : "none",
1264
1264
  overflow: "hidden",
1265
1265
  ...g
1266
1266
  }, A = d ? R ? "text" : "password" : y ?? "text", H = R ? (u == null ? void 0 : u.shown) ?? /* @__PURE__ */ o(cn, { size: 14 }) : (u == null ? void 0 : u.hidden) ?? /* @__PURE__ */ o(dn, { size: 14 });
1267
1267
  return /* @__PURE__ */ x("div", { style: $, className: h, children: [
1268
- T && /* @__PURE__ */ o("span", { style: { paddingLeft: D.paddingX, display: "flex", alignItems: "center", color: p && i ? "var(--color-error)" : "var(--color-text-muted)", flexShrink: 0, transition: "color 140ms" }, children: T }),
1268
+ T && /* @__PURE__ */ o("span", { style: { paddingLeft: M.paddingX, display: "flex", alignItems: "center", color: p && i ? "var(--color-error)" : "var(--color-text-muted)", flexShrink: 0, transition: "color 140ms" }, children: T }),
1269
1269
  /* @__PURE__ */ o(
1270
1270
  "input",
1271
1271
  {
@@ -1274,14 +1274,14 @@ const Or = yo(
1274
1274
  style: {
1275
1275
  flex: 1,
1276
1276
  height: "100%",
1277
- paddingLeft: T ? "6px" : D.paddingX,
1278
- paddingRight: d || O ? "6px" : D.paddingX,
1279
- fontSize: D.fontSize,
1277
+ paddingLeft: T ? "6px" : M.paddingX,
1278
+ paddingRight: d || O ? "6px" : M.paddingX,
1279
+ fontSize: M.fontSize,
1280
1280
  background: "transparent",
1281
1281
  border: "none",
1282
1282
  outline: "none",
1283
- color: p && i ? "var(--color-error)" : D.color || "var(--color-text-primary)",
1284
- fontStyle: D.fontStyle,
1283
+ color: p && i ? "var(--color-error)" : M.color || "var(--color-text-primary)",
1284
+ fontStyle: M.fontStyle,
1285
1285
  minWidth: 0,
1286
1286
  fontFamily: "inherit",
1287
1287
  caretColor: p && i ? "var(--color-error)" : void 0,
@@ -1296,14 +1296,14 @@ const Or = yo(
1296
1296
  ..._
1297
1297
  }
1298
1298
  ),
1299
- O && /* @__PURE__ */ o("span", { style: { paddingRight: D.paddingX, display: "flex", alignItems: "center", color: "var(--color-text-muted)", flexShrink: 0 }, children: O }),
1299
+ O && /* @__PURE__ */ o("span", { style: { paddingRight: M.paddingX, display: "flex", alignItems: "center", color: "var(--color-text-muted)", flexShrink: 0 }, children: O }),
1300
1300
  d && /* @__PURE__ */ o(
1301
1301
  "button",
1302
1302
  {
1303
1303
  type: "button",
1304
- onClick: () => P((G) => !G),
1304
+ onClick: () => B((G) => !G),
1305
1305
  style: {
1306
- paddingRight: D.paddingX,
1306
+ paddingRight: M.paddingX,
1307
1307
  display: "flex",
1308
1308
  alignItems: "center",
1309
1309
  background: "none",
@@ -1382,7 +1382,7 @@ function e1({
1382
1382
  tooltip: s = "Double-click to edit",
1383
1383
  style: d
1384
1384
  }) {
1385
- const [u, p] = z(!1), [g, f] = z(e), [h, m] = z(!1), b = M(null), y = c || "var(--color-accent, var(--color-primary))";
1385
+ const [u, p] = z(!1), [g, f] = z(e), [h, m] = z(!1), b = L(null), y = c || "var(--color-accent, var(--color-primary))";
1386
1386
  U(() => {
1387
1387
  u || f(e);
1388
1388
  }, [e, u]);
@@ -1504,7 +1504,7 @@ function Mn({
1504
1504
  width: h,
1505
1505
  borderRadius: m
1506
1506
  }) {
1507
- const [b, y] = z(!1), [v, k] = z(!1), w = M(null), S = M(null), _ = Jb(i), I = vt(_, { borderRadius: m }), E = u || "var(--color-accent, var(--color-primary))", N = s ? I.borderRadius : "0px", R = e.find((T) => T.value === n && !T.isHeader);
1507
+ const [b, y] = z(!1), [v, k] = z(!1), w = L(null), S = L(null), _ = Jb(i), I = vt(_, { borderRadius: m }), E = u || "var(--color-accent, var(--color-primary))", N = s ? I.borderRadius : "0px", R = e.find((T) => T.value === n && !T.isHeader);
1508
1508
  U(() => {
1509
1509
  if (!b || !w.current || !S.current) return;
1510
1510
  const T = w.current, O = S.current, W = () => {
@@ -1529,9 +1529,9 @@ function Mn({
1529
1529
  };
1530
1530
  return document.addEventListener("mousedown", T), () => document.removeEventListener("mousedown", T);
1531
1531
  }, [b]);
1532
- const P = se((T) => {
1532
+ const B = se((T) => {
1533
1533
  r(T), y(!1);
1534
- }, [r]), D = (T) => {
1534
+ }, [r]), M = (T) => {
1535
1535
  if (p) return;
1536
1536
  if (!b) {
1537
1537
  (T.key === "Enter" || T.key === " " || T.key === "ArrowDown") && (T.preventDefault(), y(!0));
@@ -1540,23 +1540,23 @@ function Mn({
1540
1540
  const O = e.filter(($) => !$.isHeader).findIndex(($) => $.value === n), W = e.filter(($) => !$.isHeader);
1541
1541
  switch (T.key) {
1542
1542
  case "ArrowDown":
1543
- T.preventDefault(), P(W[(O + 1) % W.length].value);
1543
+ T.preventDefault(), B(W[(O + 1) % W.length].value);
1544
1544
  break;
1545
1545
  case "ArrowUp":
1546
- T.preventDefault(), P(W[(O - 1 + W.length) % W.length].value);
1546
+ T.preventDefault(), B(W[(O - 1 + W.length) % W.length].value);
1547
1547
  break;
1548
1548
  case "Escape":
1549
1549
  y(!1);
1550
1550
  break;
1551
1551
  }
1552
- }, L = b || v ? E : "var(--color-input-border)", B = b || v ? `0 0 0 2px color-mix(in srgb, ${E} 20%, transparent)` : "none";
1552
+ }, D = b || v ? E : "var(--color-input-border)", P = b || v ? `0 0 0 2px color-mix(in srgb, ${E} 20%, transparent)` : "none";
1553
1553
  return /* @__PURE__ */ x(
1554
1554
  "div",
1555
1555
  {
1556
1556
  "data-testid": t,
1557
1557
  className: `relative inline-block ${g}`,
1558
1558
  style: { width: h, ...f },
1559
- onKeyDown: D,
1559
+ onKeyDown: M,
1560
1560
  children: [
1561
1561
  /* @__PURE__ */ x(
1562
1562
  "button",
@@ -1578,12 +1578,12 @@ function Mn({
1578
1578
  paddingRight: I.paddingX,
1579
1579
  fontSize: I.fontSize,
1580
1580
  background: "var(--color-input-bg)",
1581
- border: `1px solid ${L}`,
1581
+ border: `1px solid ${D}`,
1582
1582
  borderRadius: N,
1583
1583
  color: R ? "var(--color-text-primary)" : "var(--color-text-muted)",
1584
1584
  cursor: p ? "default" : "pointer",
1585
1585
  transition: "border-color 140ms, box-shadow 140ms",
1586
- boxShadow: B,
1586
+ boxShadow: P,
1587
1587
  opacity: p ? 0.5 : 1,
1588
1588
  fontFamily: "inherit",
1589
1589
  fontWeight: 500,
@@ -1634,7 +1634,7 @@ function Mn({
1634
1634
  {
1635
1635
  role: "option",
1636
1636
  "aria-selected": T.value === n,
1637
- onClick: () => P(T.value),
1637
+ onClick: () => B(T.value),
1638
1638
  className: `dui_select__option${T.value === n ? " dui_select__option--selected" : ""}`,
1639
1639
  style: {
1640
1640
  display: "flex",
@@ -1829,7 +1829,7 @@ function t1({
1829
1829
  fontStyle: w,
1830
1830
  className: S = ""
1831
1831
  }) {
1832
- const _ = Ie(), I = c ?? _.size, E = Ue(c, { width: y, borderRadius: v, color: k, fontStyle: w }), N = u ?? sm[I], R = d ?? "var(--color-accent, var(--color-primary))", P = Math.max(Math.round(parseFloat(E.fontSize) * 1.2 * 10) / 10, 16), D = Math.max(0, (parseFloat(E.height) - 2 - P) / 2), [L, B] = z(!1), [T, O] = z(!1), [W, $] = z(!1), [A, H] = z(-1), [G, te] = z(!1), Z = M(null), de = M(null), he = M(null), Ae = M(!1), Ee = M(!1), X = M(!1), pe = M(null), V = M(Fa()), { caret: xe, syncCaret: ke, setCaret: Ce } = Ua(he, i.length), [Te, at] = z({ top: 0, left: 0, width: 0 }), [tt, j] = z({ top: 0, left: 0, width: 0 }), oe = n.find((K) => K.value === e), q = (oe == null ? void 0 : oe.color) ?? "var(--color-text-primary)";
1832
+ const _ = Ie(), I = c ?? _.size, E = Ue(c, { width: y, borderRadius: v, color: k, fontStyle: w }), N = u ?? sm[I], R = d ?? "var(--color-accent, var(--color-primary))", B = Math.max(Math.round(parseFloat(E.fontSize) * 1.2 * 10) / 10, 16), M = Math.max(0, (parseFloat(E.height) - 2 - B) / 2), [D, P] = z(!1), [T, O] = z(!1), [W, $] = z(!1), [A, H] = z(-1), [G, te] = z(!1), Z = L(null), de = L(null), he = L(null), Ae = L(!1), Ee = L(!1), X = L(!1), pe = L(null), V = L(Fa()), { caret: xe, syncCaret: ke, setCaret: Ce } = Ua(he, i.length), [Te, at] = z({ top: 0, left: 0, width: 0 }), [tt, j] = z({ top: 0, left: 0, width: 0 }), oe = n.find((K) => K.value === e), q = (oe == null ? void 0 : oe.color) ?? "var(--color-text-primary)";
1833
1833
  U(() => {
1834
1834
  const K = he.current;
1835
1835
  K && (K.innerHTML = Et(i), pe.current = i, V.current.reset(i, i.length));
@@ -1867,17 +1867,17 @@ function t1({
1867
1867
  const K = de.current;
1868
1868
  if (!K) return;
1869
1869
  const ae = K.getBoundingClientRect();
1870
- at({ top: ae.bottom + 4, left: ae.left, width: Math.max(ae.width, 120) }), B((we) => !we);
1870
+ at({ top: ae.bottom + 4, left: ae.left, width: Math.max(ae.width, 120) }), P((we) => !we);
1871
1871
  };
1872
1872
  U(() => {
1873
- if (!L) return;
1873
+ if (!D) return;
1874
1874
  const K = (ae) => {
1875
1875
  const we = ae.target;
1876
- !we.closest("[data-stiv-method]") && !we.closest("[data-stiv-trigger]") && B(!1);
1876
+ !we.closest("[data-stiv-method]") && !we.closest("[data-stiv-trigger]") && P(!1);
1877
1877
  };
1878
1878
  return document.addEventListener("mousedown", K), () => document.removeEventListener("mousedown", K);
1879
- }, [L]), U(() => {
1880
- if (!L) return;
1879
+ }, [D]), U(() => {
1880
+ if (!D) return;
1881
1881
  const K = () => {
1882
1882
  const ae = de.current;
1883
1883
  if (!ae) return;
@@ -1887,7 +1887,7 @@ function t1({
1887
1887
  return window.addEventListener("scroll", K, { passive: !0, capture: !0 }), window.addEventListener("resize", K, { passive: !0 }), () => {
1888
1888
  window.removeEventListener("scroll", K, { capture: !0 }), window.removeEventListener("resize", K);
1889
1889
  };
1890
- }, [L]), U(() => {
1890
+ }, [D]), U(() => {
1891
1891
  if (!Ae.current)
1892
1892
  if ((Ye.length > 0 || Qe.length > 0) && T) {
1893
1893
  const K = he.current;
@@ -1952,7 +1952,7 @@ function t1({
1952
1952
  }
1953
1953
  }
1954
1954
  h == null || h(K);
1955
- }, Bn = T || L ? R : "var(--color-input-border)";
1955
+ }, Bn = T || D ? R : "var(--color-input-border)";
1956
1956
  return /* @__PURE__ */ x(ve, { children: [
1957
1957
  /* @__PURE__ */ x(
1958
1958
  "div",
@@ -2003,7 +2003,7 @@ function t1({
2003
2003
  style: {
2004
2004
  flexShrink: 0,
2005
2005
  color: "var(--color-text-muted)",
2006
- transform: L ? "rotate(180deg)" : "rotate(0deg)",
2006
+ transform: D ? "rotate(180deg)" : "rotate(0deg)",
2007
2007
  transition: "transform 150ms ease"
2008
2008
  }
2009
2009
  }
@@ -2061,7 +2061,7 @@ function t1({
2061
2061
  style: {
2062
2062
  height: "100%",
2063
2063
  width: "100%",
2064
- padding: `${D}px ${E.paddingX}`,
2064
+ padding: `${M}px ${E.paddingX}`,
2065
2065
  boxSizing: "border-box",
2066
2066
  // display/align-content live in SelectTextInputView.css (block, never flex)
2067
2067
  // so they can carry an @supports fallback — see the note there.
@@ -2071,7 +2071,7 @@ function t1({
2071
2071
  // An explicit small line-height, never the field height: a full-height line
2072
2072
  // box would make the selection highlight and caret span the whole field.
2073
2073
  // Paired with editorPadY above, which is what actually centres it.
2074
- lineHeight: `${P}px`,
2074
+ lineHeight: `${B}px`,
2075
2075
  color: E.color ?? "var(--color-text-primary)",
2076
2076
  fontFamily: "inherit",
2077
2077
  fontStyle: E.fontStyle,
@@ -2089,9 +2089,9 @@ function t1({
2089
2089
  ghost: Ot,
2090
2090
  style: {
2091
2091
  border: "none",
2092
- padding: `${D}px ${E.paddingX}`,
2092
+ padding: `${M}px ${E.paddingX}`,
2093
2093
  fontSize: E.fontSize,
2094
- lineHeight: `${P}px`
2094
+ lineHeight: `${B}px`
2095
2095
  }
2096
2096
  }
2097
2097
  )
@@ -2099,7 +2099,7 @@ function t1({
2099
2099
  ]
2100
2100
  }
2101
2101
  ),
2102
- L && Se(
2102
+ D && Se(
2103
2103
  /* @__PURE__ */ o(
2104
2104
  "div",
2105
2105
  {
@@ -2124,7 +2124,7 @@ function t1({
2124
2124
  "div",
2125
2125
  {
2126
2126
  onMouseDown: (we) => {
2127
- we.preventDefault(), r(K.value), B(!1);
2127
+ we.preventDefault(), r(K.value), P(!1);
2128
2128
  },
2129
2129
  className: `dui_select-text__option${ae ? " dui_select-text__option--selected" : ""}`,
2130
2130
  style: {
@@ -2243,36 +2243,36 @@ function n1({
2243
2243
  className: f = "",
2244
2244
  style: h
2245
2245
  }) {
2246
- const m = p === "compact", b = d ?? um[a], y = Sr(i, { width: s, borderRadius: b, color: u }), v = M(null), [k, w] = z({ left: 0, width: 0 }), [S, _] = z(!1), I = M(!1), E = e.findIndex((B) => B.value === n), N = se(() => {
2247
- const B = v.current;
2248
- if (!B) return;
2249
- const O = B.querySelectorAll("button[data-seg]")[E];
2246
+ const m = p === "compact", b = d ?? um[a], y = Sr(i, { width: s, borderRadius: b, color: u }), v = L(null), [k, w] = z({ left: 0, width: 0 }), [S, _] = z(!1), I = L(!1), E = e.findIndex((P) => P.value === n), N = se(() => {
2247
+ const P = v.current;
2248
+ if (!P) return;
2249
+ const O = P.querySelectorAll("button[data-seg]")[E];
2250
2250
  O && w({ left: O.offsetLeft, width: O.offsetWidth });
2251
2251
  }, [E]);
2252
2252
  U(() => {
2253
2253
  if (N(), I.current) {
2254
2254
  _(!0);
2255
- const B = setTimeout(() => _(!1), 360);
2256
- return () => clearTimeout(B);
2255
+ const P = setTimeout(() => _(!1), 360);
2256
+ return () => clearTimeout(P);
2257
2257
  }
2258
2258
  I.current = !0;
2259
2259
  }, [n, E, e.length]), U(() => {
2260
- const B = v.current;
2261
- if (B) {
2260
+ const P = v.current;
2261
+ if (P) {
2262
2262
  if (typeof ResizeObserver < "u") {
2263
2263
  const T = new ResizeObserver(() => N());
2264
- return T.observe(B), () => T.disconnect();
2264
+ return T.observe(P), () => T.disconnect();
2265
2265
  }
2266
2266
  return window.addEventListener("resize", N), () => window.removeEventListener("resize", N);
2267
2267
  }
2268
2268
  }, [N]);
2269
- const R = se((B) => {
2269
+ const R = se((P) => {
2270
2270
  if (g) return;
2271
2271
  const T = e.filter((W) => !W.disabled);
2272
2272
  if (!T.length) return;
2273
2273
  const O = T.findIndex((W) => W.value === n);
2274
- B.key === "ArrowRight" ? (B.preventDefault(), r(T[(O + 1) % T.length].value)) : B.key === "ArrowLeft" && (B.preventDefault(), r(T[(O - 1 + T.length) % T.length].value));
2275
- }, [g, e, n, r]), P = m ? 2 : 3, D = m ? "4px" : y.borderRadius, L = a === "pointy" ? D : `calc(${D} + ${P}px)`;
2274
+ P.key === "ArrowRight" ? (P.preventDefault(), r(T[(O + 1) % T.length].value)) : P.key === "ArrowLeft" && (P.preventDefault(), r(T[(O - 1 + T.length) % T.length].value));
2275
+ }, [g, e, n, r]), B = m ? 2 : 3, M = m ? "4px" : y.borderRadius, D = a === "pointy" ? M : `calc(${M} + ${B}px)`;
2276
2276
  return /* @__PURE__ */ x(
2277
2277
  "div",
2278
2278
  {
@@ -2286,8 +2286,8 @@ function n1({
2286
2286
  display: "inline-flex",
2287
2287
  position: "relative",
2288
2288
  height: m ? 26 : y.height,
2289
- padding: P,
2290
- borderRadius: L,
2289
+ padding: B,
2290
+ borderRadius: D,
2291
2291
  // Recessed, not raised. `--color-input-bg` is the token for a surface
2292
2292
  // the UI is cut into; falling back to the panel keeps it sane in
2293
2293
  // themes that do not define one.
@@ -2332,11 +2332,11 @@ function n1({
2332
2332
  className: `dui_segctrl__indicator${S ? " dui_segctrl__indicator--bounce" : ""}`,
2333
2333
  style: {
2334
2334
  position: "absolute",
2335
- top: P,
2335
+ top: B,
2336
2336
  left: k.left,
2337
2337
  width: k.width,
2338
- height: `calc(100% - ${P * 2}px)`,
2339
- borderRadius: D,
2338
+ height: `calc(100% - ${B * 2}px)`,
2339
+ borderRadius: M,
2340
2340
  // Translucent accent wash + hairline, not a solid block — the
2341
2341
  // active segment should read as highlighted, not glow like a CTA.
2342
2342
  backgroundColor: `color-mix(in srgb, ${l} 22%, transparent)`,
@@ -2346,8 +2346,8 @@ function n1({
2346
2346
  }
2347
2347
  }
2348
2348
  ),
2349
- e.map((B) => {
2350
- const T = B.value === n;
2349
+ e.map((P) => {
2350
+ const T = P.value === n;
2351
2351
  return /* @__PURE__ */ x(
2352
2352
  "button",
2353
2353
  {
@@ -2355,8 +2355,8 @@ function n1({
2355
2355
  type: "button",
2356
2356
  role: "tab",
2357
2357
  "aria-selected": T,
2358
- disabled: B.disabled,
2359
- onClick: () => !B.disabled && B.value !== n && r(B.value),
2358
+ disabled: P.disabled,
2359
+ onClick: () => !P.disabled && P.value !== n && r(P.value),
2360
2360
  className: "dui_segctrl__seg",
2361
2361
  style: {
2362
2362
  display: "flex",
@@ -2373,8 +2373,8 @@ function n1({
2373
2373
  // Accent-tinted label on the translucent indicator — readable on
2374
2374
  // both themes without the white-on-solid-accent glare.
2375
2375
  color: T ? l : y.color ?? "var(--color-text-secondary)",
2376
- cursor: B.disabled ? "not-allowed" : "pointer",
2377
- opacity: B.disabled ? 0.35 : 1,
2376
+ cursor: P.disabled ? "not-allowed" : "pointer",
2377
+ opacity: P.disabled ? 0.35 : 1,
2378
2378
  position: "relative",
2379
2379
  zIndex: 1,
2380
2380
  // Flex items default to `min-width: auto`, which resolves to
@@ -2390,7 +2390,7 @@ function n1({
2390
2390
  userSelect: "none"
2391
2391
  },
2392
2392
  children: [
2393
- B.icon,
2393
+ P.icon,
2394
2394
  /* @__PURE__ */ o(
2395
2395
  "span",
2396
2396
  {
@@ -2400,12 +2400,12 @@ function n1({
2400
2400
  whiteSpace: "nowrap",
2401
2401
  minWidth: 0
2402
2402
  },
2403
- children: B.label
2403
+ children: P.label
2404
2404
  }
2405
2405
  )
2406
2406
  ]
2407
2407
  },
2408
- B.value
2408
+ P.value
2409
2409
  );
2410
2410
  })
2411
2411
  ]
@@ -2754,7 +2754,7 @@ function l1({
2754
2754
  className: u = "",
2755
2755
  style: p
2756
2756
  }) {
2757
- const g = Ue(c, { borderRadius: s, color: d }), f = d ?? "var(--color-accent, var(--color-primary))", h = M([]), m = Array.from({ length: i }, (S, _) => e[_] ?? ""), b = (S) => {
2757
+ const g = Ue(c, { borderRadius: s, color: d }), f = d ?? "var(--color-accent, var(--color-primary))", h = L([]), m = Array.from({ length: i }, (S, _) => e[_] ?? ""), b = (S) => {
2758
2758
  n(S), S.length === i && !S.includes("") && (r == null || r(S));
2759
2759
  }, y = (S, _) => {
2760
2760
  const I = m.slice();
@@ -2772,15 +2772,15 @@ function l1({
2772
2772
  var I, E, N;
2773
2773
  _.key === "Backspace" ? (m[S] ? y(S, "") : S > 0 && ((I = h.current[S - 1]) == null || I.focus(), y(S - 1, "")), _.preventDefault()) : _.key === "ArrowLeft" && S > 0 ? (E = h.current[S - 1]) == null || E.focus() : _.key === "ArrowRight" && S < i - 1 && ((N = h.current[S + 1]) == null || N.focus());
2774
2774
  }, w = (S, _) => {
2775
- var P;
2775
+ var B;
2776
2776
  _.preventDefault();
2777
2777
  const I = _.clipboardData.getData("text"), E = a ? I.replace(/[^0-9]/g, "") : I;
2778
2778
  if (!E) return;
2779
2779
  const N = m.slice();
2780
- for (let D = 0; D < E.length && S + D < i; D++) N[S + D] = E[D];
2780
+ for (let M = 0; M < E.length && S + M < i; M++) N[S + M] = E[M];
2781
2781
  b(N.join(""));
2782
2782
  const R = Math.min(S + E.length, i - 1);
2783
- (P = h.current[R]) == null || P.focus();
2783
+ (B = h.current[R]) == null || B.focus();
2784
2784
  };
2785
2785
  return /* @__PURE__ */ o("div", { "data-testid": t, className: u, style: { display: "flex", gap: g.gap, ...p }, children: m.map((S, _) => /* @__PURE__ */ o(
2786
2786
  "input",
@@ -2935,7 +2935,7 @@ function c1({
2935
2935
  className: s = "",
2936
2936
  style: d
2937
2937
  }) {
2938
- const u = vt(a, { width: l, borderRadius: c }), [p, g] = z(!1), [f, h] = z(e), m = M(null), b = M(null);
2938
+ const u = vt(a, { width: l, borderRadius: c }), [p, g] = z(!1), [f, h] = z(e), m = L(null), b = L(null);
2939
2939
  U(() => h(e), [e]), U(() => {
2940
2940
  if (!p || !m.current || !b.current) return;
2941
2941
  const v = m.current, k = b.current, w = () => {
@@ -3037,7 +3037,7 @@ function d1({
3037
3037
  className: s = "",
3038
3038
  style: d
3039
3039
  }) {
3040
- const u = vt(i, { width: a, borderRadius: l, color: c }), p = c ?? "var(--color-primary)", [g, f] = z(!1), [h, m] = z(""), b = M(null), y = M(null), v = Pr.find((w) => w.name === e), k = ue(() => {
3040
+ const u = vt(i, { width: a, borderRadius: l, color: c }), p = c ?? "var(--color-primary)", [g, f] = z(!1), [h, m] = z(""), b = L(null), y = L(null), v = Pr.find((w) => w.name === e), k = ue(() => {
3041
3041
  const w = h.trim().toLowerCase();
3042
3042
  return w ? Pr.filter((S) => S.name.toLowerCase().includes(w)) : Pr;
3043
3043
  }, [h]);
@@ -3137,7 +3137,7 @@ function u1({
3137
3137
  className: s = "",
3138
3138
  style: d
3139
3139
  }) {
3140
- const u = vt(i, { width: a, borderRadius: l, color: c }), p = c ?? "var(--color-primary)", [g, f] = z(!1), [h, m] = z(""), b = M(null), y = M(null), v = ue(() => {
3140
+ const u = vt(i, { width: a, borderRadius: l, color: c }), p = c ?? "var(--color-primary)", [g, f] = z(!1), [h, m] = z(""), b = L(null), y = L(null), v = ue(() => {
3141
3141
  const k = h.trim().toLowerCase(), w = k ? Vo.filter((_) => _.category.toLowerCase().includes(k)) : Vo, S = /* @__PURE__ */ new Map();
3142
3142
  for (const _ of w)
3143
3143
  S.has(_.category) || S.set(_.category, []), S.get(_.category).push(_);
@@ -3235,7 +3235,7 @@ function p1({
3235
3235
  className: p = "",
3236
3236
  style: g
3237
3237
  }) {
3238
- const f = We(c, { borderRadius: d, color: u }), h = u ?? "var(--color-primary)", [m, b] = z(!1), y = M(null), v = (k) => {
3238
+ const f = We(c, { borderRadius: d, color: u }), h = u ?? "var(--color-primary)", [m, b] = z(!1), y = L(null), v = (k) => {
3239
3239
  !k || !k.length || n(Array.from(k));
3240
3240
  };
3241
3241
  return /* @__PURE__ */ x("div", { "data-testid": t, className: `dui_dropzone ${p}`, style: { width: s, ...g }, children: [
@@ -3297,7 +3297,7 @@ function f1({
3297
3297
  className: c = "",
3298
3298
  style: s
3299
3299
  }) {
3300
- const d = Ie(), u = a ?? d.size, p = l ?? d.activeColor ?? "var(--color-primary)", g = lt.card[u], f = M(null);
3300
+ const d = Ie(), u = a ?? d.size, p = l ?? d.activeColor ?? "var(--color-primary)", g = lt.card[u], f = L(null);
3301
3301
  return /* @__PURE__ */ x(
3302
3302
  "div",
3303
3303
  {
@@ -3462,9 +3462,9 @@ function h1({
3462
3462
  className: u = "",
3463
3463
  style: p
3464
3464
  }) {
3465
- const g = vt(l, { borderRadius: c, color: s }), f = s ?? "var(--color-primary)", [h, m] = z(/* @__PURE__ */ new Set()), [b, y] = z(/* @__PURE__ */ new Set()), v = new Set(n), k = e.filter((R) => !v.has(R.value)), w = e.filter((R) => v.has(R.value)), S = (R, P, D) => {
3466
- const L = new Set(R);
3467
- L.has(D) ? L.delete(D) : L.add(D), P(L);
3465
+ const g = vt(l, { borderRadius: c, color: s }), f = s ?? "var(--color-primary)", [h, m] = z(/* @__PURE__ */ new Set()), [b, y] = z(/* @__PURE__ */ new Set()), v = new Set(n), k = e.filter((R) => !v.has(R.value)), w = e.filter((R) => v.has(R.value)), S = (R, B, M) => {
3466
+ const D = new Set(R);
3467
+ D.has(M) ? D.delete(M) : D.add(M), B(D);
3468
3468
  }, _ = () => {
3469
3469
  r([...n, ...Array.from(h)]), m(/* @__PURE__ */ new Set());
3470
3470
  }, I = () => {
@@ -3731,7 +3731,7 @@ function x1({
3731
3731
  className: u = "",
3732
3732
  style: p
3733
3733
  }) {
3734
- const g = wt(l, { width: c, borderRadius: s, color: d }), f = d ?? "var(--color-primary)", h = M(null), m = () => {
3734
+ const g = wt(l, { width: c, borderRadius: s, color: d }), f = d ?? "var(--color-primary)", h = L(null), m = () => {
3735
3735
  h.current && clearTimeout(h.current);
3736
3736
  }, b = () => {
3737
3737
  m(), a > 0 && (h.current = setTimeout(n, a));
@@ -4086,7 +4086,7 @@ function _1({
4086
4086
  }
4087
4087
  const _m = ["#6366F1", "#22C55E", "#F59E0B", "#EF4444", "#EC4899", "#06B6D4"], I1 = yo(
4088
4088
  function({ colors: e = _m, particleCount: n = 80 }, r) {
4089
- const i = M(null), a = M([]), l = M(null);
4089
+ const i = L(null), a = L([]), l = L(null);
4090
4090
  return Hb(r, () => ({
4091
4091
  fire(c) {
4092
4092
  const s = i.current;
@@ -4139,7 +4139,7 @@ function E1({
4139
4139
  color: s,
4140
4140
  className: d = ""
4141
4141
  }) {
4142
- const u = Nt(l, { borderRadius: c, color: s }), p = M(null), [g, f] = z({ top: -9999, left: -9999 });
4142
+ const u = Nt(l, { borderRadius: c, color: s }), p = L(null), [g, f] = z({ top: -9999, left: -9999 });
4143
4143
  return U(() => {
4144
4144
  if (!e || !r || !p.current) return;
4145
4145
  const h = p.current, m = () => {
@@ -4155,8 +4155,8 @@ function E1({
4155
4155
  }, [e, r, a]), U(() => {
4156
4156
  if (!e) return;
4157
4157
  const h = (b) => {
4158
- var y;
4159
- r != null && r.contains(b.target) || (y = p.current) != null && y.contains(b.target) || n();
4158
+ var y, v, k;
4159
+ r != null && r.contains(b.target) || (y = p.current) != null && y.contains(b.target) || (k = (v = b.target) == null ? void 0 : v.closest) != null && k.call(v, ".dui_combobox__menu, .dui_select__menu") || n();
4160
4160
  }, m = (b) => {
4161
4161
  b.key === "Escape" && n();
4162
4162
  };
@@ -4196,7 +4196,7 @@ function R1({
4196
4196
  color: a,
4197
4197
  disabled: l = !1
4198
4198
  }) {
4199
- const c = Nt(i, { color: a }), [s, d] = z(!1), [u, p] = z({ top: -9999, left: -9999 }), g = M(null), f = M(null), h = M(null), m = () => {
4199
+ const c = Nt(i, { color: a }), [s, d] = z(!1), [u, p] = z({ top: -9999, left: -9999 }), g = L(null), f = L(null), h = L(null), m = () => {
4200
4200
  l || (h.current = setTimeout(() => d(!0), r));
4201
4201
  }, b = () => {
4202
4202
  h.current && clearTimeout(h.current), d(!1);
@@ -4363,7 +4363,7 @@ function N1({
4363
4363
  children: u,
4364
4364
  className: p = ""
4365
4365
  }) {
4366
- const g = M(null), [f, h] = z(0), [m, b] = z(!1), [y, v] = z(e), [k, w] = z(), [S, _] = z(!1), [I, E] = z(e);
4366
+ const g = L(null), [f, h] = z(0), [m, b] = z(!1), [y, v] = z(e), [k, w] = z(), [S, _] = z(!1), [I, E] = z(e);
4367
4367
  U(() => {
4368
4368
  if (e) {
4369
4369
  E(!0), _(!1), h(0), v(!0);
@@ -4372,21 +4372,21 @@ function N1({
4372
4372
  }
4373
4373
  if (!I) return;
4374
4374
  h(0), _(!0);
4375
- const B = window.setTimeout(() => {
4375
+ const P = window.setTimeout(() => {
4376
4376
  E(!1), _(!1);
4377
4377
  }, Am);
4378
- return () => window.clearTimeout(B);
4378
+ return () => window.clearTimeout(P);
4379
4379
  }, [e, I]), U(() => {
4380
4380
  if (!I) return;
4381
- const B = (T) => {
4381
+ const P = (T) => {
4382
4382
  T.key === "Escape" && n();
4383
4383
  };
4384
- return document.addEventListener("keydown", B), () => document.removeEventListener("keydown", B);
4384
+ return document.addEventListener("keydown", P), () => document.removeEventListener("keydown", P);
4385
4385
  }, [I, n]);
4386
- const N = se((B) => {
4387
- if (!s || B.button !== 0) return;
4388
- B.preventDefault();
4389
- const T = { x: B.clientX, y: B.clientY, at: Date.now() };
4386
+ const N = se((P) => {
4387
+ if (!s || P.button !== 0) return;
4388
+ P.preventDefault();
4389
+ const T = { x: P.clientX, y: P.clientY, at: Date.now() };
4390
4390
  b(!0);
4391
4391
  const O = g.current ? mn(r) === "x" ? g.current.offsetWidth : g.current.offsetHeight : 0, W = Im(r), $ = () => mn(r) === "x" ? window.innerWidth : window.innerHeight, A = (G) => {
4392
4392
  const te = G.clientX - T.x, Z = G.clientY - T.y, de = Wr(W, te, Z);
@@ -4403,7 +4403,7 @@ function N1({
4403
4403
  window.addEventListener("pointermove", A), window.addEventListener("pointerup", H), window.addEventListener("pointercancel", H);
4404
4404
  }, [r, s, n]);
4405
4405
  if (!I) return null;
4406
- const R = mn(r) === "x", P = R ? "width" : "height", D = R ? "min(560px, 92vw)" : "min(60vh, 720px)", L = /* @__PURE__ */ x(ve, { children: [
4406
+ const R = mn(r) === "x", B = R ? "width" : "height", M = R ? "min(560px, 92vw)" : "min(60vh, 720px)", D = /* @__PURE__ */ x(ve, { children: [
4407
4407
  l ?? (a !== void 0 && /* @__PURE__ */ x("div", { className: "dui_sheet__head", children: [
4408
4408
  /* @__PURE__ */ o("span", { className: "dui_sheet__title", children: a }),
4409
4409
  /* @__PURE__ */ o("button", { type: "button", className: "dui_sheet__x", onClick: n, "aria-label": "Close", children: /* @__PURE__ */ o(Ze, { size: 14 }) })
@@ -4417,8 +4417,8 @@ function N1({
4417
4417
  {
4418
4418
  "data-testid": t,
4419
4419
  className: `dui_sheet__backdrop dui_sheet__backdrop--${r}` + (S ? " dui_sheet__backdrop--closing" : ""),
4420
- onPointerDown: d ? (B) => {
4421
- B.target === B.currentTarget && n();
4420
+ onPointerDown: d ? (P) => {
4421
+ P.target === P.currentTarget && n();
4422
4422
  } : void 0,
4423
4423
  children: /* @__PURE__ */ x(
4424
4424
  "div",
@@ -4430,7 +4430,7 @@ function N1({
4430
4430
  style: {
4431
4431
  /* What the handle was pulled to wins over what the caller asked for
4432
4432
  — it is the reader saying how much room this needs. */
4433
- [P]: k !== void 0 ? `${k}px` : typeof i == "number" ? `${i}px` : i ?? D,
4433
+ [B]: k !== void 0 ? `${k}px` : typeof i == "number" ? `${i}px` : i ?? M,
4434
4434
  /* Only while it is being held or springing back — at rest this is
4435
4435
  empty so the keyframes own the transform. */
4436
4436
  transform: zm(r, f) || void 0
@@ -4446,7 +4446,7 @@ function N1({
4446
4446
  children: /* @__PURE__ */ o("i", {})
4447
4447
  }
4448
4448
  ),
4449
- R ? /* @__PURE__ */ o("div", { className: "dui_sheet__body--side", children: L }) : L
4449
+ R ? /* @__PURE__ */ o("div", { className: "dui_sheet__body--side", children: D }) : D
4450
4450
  ]
4451
4451
  }
4452
4452
  )
@@ -4507,7 +4507,7 @@ function T1({
4507
4507
  size: l,
4508
4508
  className: c = ""
4509
4509
  }) {
4510
- const s = Nt(l), d = M(null), u = M({ startY: 0, dy: 0, dragging: !1 }), [p, g] = z(0), [f, h] = z(!1);
4510
+ const s = Nt(l), d = L(null), u = L({ startY: 0, dy: 0, dragging: !1 }), [p, g] = z(0), [f, h] = z(!1);
4511
4511
  U(() => {
4512
4512
  e && (g(0), h(!1));
4513
4513
  }, [e]);
@@ -4712,7 +4712,7 @@ function L1({
4712
4712
  className: d = "",
4713
4713
  style: u
4714
4714
  }) {
4715
- const p = i ?? "var(--color-primary)", g = r === "up-left" ? 1 : -1, [f, h] = z(n), [m, b] = z(!1), y = M(null);
4715
+ const p = i ?? "var(--color-primary)", g = r === "up-left" ? 1 : -1, [f, h] = z(n), [m, b] = z(!1), y = L(null);
4716
4716
  return U(() => {
4717
4717
  if (y.current && clearTimeout(y.current), n) {
4718
4718
  h(!0), b(!1);
@@ -4800,7 +4800,7 @@ function O1({
4800
4800
  }) {
4801
4801
  const p = An(c, { activeColor: s }), g = p.activeColor ?? "var(--color-primary)", [f, h] = z(!1), m = i ?? f, b = (R) => {
4802
4802
  h(R), r == null || r(R);
4803
- }, [y, v] = z(t), [k, w] = z(!1), S = M(null);
4803
+ }, [y, v] = z(t), [k, w] = z(!1), S = L(null);
4804
4804
  U(() => {
4805
4805
  m || v(t);
4806
4806
  }, [t, m]), U(() => {
@@ -4868,10 +4868,10 @@ function O1({
4868
4868
  fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
4869
4869
  cursor: n ? "text" : void 0
4870
4870
  },
4871
- children: N.map((R, P) => {
4872
- const D = P === N.length - 1, L = R.collapse;
4871
+ children: N.map((R, B) => {
4872
+ const M = B === N.length - 1, D = R.collapse;
4873
4873
  return /* @__PURE__ */ x("span", { style: { display: "flex", alignItems: "center", gap: 4, minWidth: 0 }, children: [
4874
- L ? /* @__PURE__ */ o(
4874
+ D ? /* @__PURE__ */ o(
4875
4875
  "button",
4876
4876
  {
4877
4877
  type: "button",
@@ -4887,7 +4887,7 @@ function O1({
4887
4887
  },
4888
4888
  children: /* @__PURE__ */ o(ho, { size: 13 })
4889
4889
  }
4890
- ) : e && !D ? /* @__PURE__ */ o(
4890
+ ) : e && !M ? /* @__PURE__ */ o(
4891
4891
  "button",
4892
4892
  {
4893
4893
  type: "button",
@@ -4907,19 +4907,19 @@ function O1({
4907
4907
  children: R.label
4908
4908
  }
4909
4909
  ) : /* @__PURE__ */ o("span", { style: {
4910
- color: D ? "var(--color-text-primary)" : g,
4911
- fontWeight: D ? 700 : 500,
4910
+ color: M ? "var(--color-text-primary)" : g,
4911
+ fontWeight: M ? 700 : 500,
4912
4912
  whiteSpace: "nowrap",
4913
4913
  padding: "1px 3px"
4914
4914
  }, children: R.label }),
4915
- !D && /* @__PURE__ */ o(
4915
+ !M && /* @__PURE__ */ o(
4916
4916
  Pe,
4917
4917
  {
4918
4918
  size: 11,
4919
4919
  style: { color: "var(--color-text-muted)", opacity: 0.55, flexShrink: 0 }
4920
4920
  }
4921
4921
  )
4922
- ] }, `${R.path}-${P}`);
4922
+ ] }, `${R.path}-${B}`);
4923
4923
  })
4924
4924
  }
4925
4925
  );
@@ -5252,7 +5252,7 @@ function V1({
5252
5252
  className: r = "",
5253
5253
  style: i
5254
5254
  }) {
5255
- const a = M(null), [l, c] = z(!1);
5255
+ const a = L(null), [l, c] = z(!1);
5256
5256
  return U(() => {
5257
5257
  const s = a.current;
5258
5258
  if (!s) return;
@@ -5326,7 +5326,7 @@ function X1({
5326
5326
  className: r = "",
5327
5327
  style: i
5328
5328
  }) {
5329
- const a = it(n), l = M(null), [c, s] = z(!1);
5329
+ const a = it(n), l = L(null), [c, s] = z(!1);
5330
5330
  return U(() => {
5331
5331
  const d = l.current;
5332
5332
  if (!d) return;
@@ -5541,7 +5541,7 @@ function Fm({
5541
5541
  className: d = "",
5542
5542
  style: u
5543
5543
  }) {
5544
- const p = Be(c, { color: s }), [g, f] = z(a ? 0 : e), h = M(null);
5544
+ const p = Be(c, { color: s }), [g, f] = z(a ? 0 : e), h = L(null);
5545
5545
  return U(() => {
5546
5546
  if (!a) {
5547
5547
  f(e);
@@ -5612,23 +5612,23 @@ function ew({
5612
5612
  className: u = "",
5613
5613
  style: p
5614
5614
  }) {
5615
- const g = vt(l, { width: c, borderRadius: s, color: d }), f = d ?? "var(--color-accent, var(--color-primary))", [h, m] = z(!1), [b, y] = z(n), v = M(null), k = M(null);
5615
+ const g = vt(l, { width: c, borderRadius: s, color: d }), f = d ?? "var(--color-accent, var(--color-primary))", [h, m] = z(!1), [b, y] = z(n), v = L(null), k = L(null);
5616
5616
  U(() => {
5617
5617
  h && y(n);
5618
5618
  }, [h, n]), U(() => {
5619
5619
  if (!h || !v.current || !k.current) return;
5620
5620
  const E = v.current, N = k.current, R = () => {
5621
- const D = E.getBoundingClientRect();
5622
- N.style.top = `${D.bottom + 4}px`, N.style.left = `${Math.min(D.left, window.innerWidth - N.offsetWidth - 8)}px`;
5621
+ const M = E.getBoundingClientRect();
5622
+ N.style.top = `${M.bottom + 4}px`, N.style.left = `${Math.min(M.left, window.innerWidth - N.offsetWidth - 8)}px`;
5623
5623
  };
5624
5624
  R();
5625
- const P = requestAnimationFrame(R);
5626
- return () => cancelAnimationFrame(P);
5625
+ const B = requestAnimationFrame(R);
5626
+ return () => cancelAnimationFrame(B);
5627
5627
  }, [h, b]), U(() => {
5628
5628
  if (!h) return;
5629
5629
  const E = (N) => {
5630
- var R, P;
5631
- (R = v.current) != null && R.contains(N.target) || (P = k.current) != null && P.contains(N.target) || m(!1);
5630
+ var R, B;
5631
+ (R = v.current) != null && R.contains(N.target) || (B = k.current) != null && B.contains(N.target) || m(!1);
5632
5632
  };
5633
5633
  return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
5634
5634
  }, [h]);
@@ -5674,14 +5674,14 @@ function ew({
5674
5674
  ),
5675
5675
  h && Se(
5676
5676
  /* @__PURE__ */ o("div", { ref: k, className: "dui_cascader__menu", style: { position: "fixed", zIndex: 99999 }, children: w.map((E, N) => /* @__PURE__ */ o("div", { className: "dui_cascader__column", children: E.map((R) => {
5677
- const P = b[N] === R.value;
5677
+ const B = b[N] === R.value;
5678
5678
  return /* @__PURE__ */ x(
5679
5679
  "button",
5680
5680
  {
5681
5681
  type: "button",
5682
- className: `dui_cascader__item${P ? " dui_cascader__item--active" : ""}`,
5682
+ className: `dui_cascader__item${B ? " dui_cascader__item--active" : ""}`,
5683
5683
  onClick: () => _(N, R),
5684
- style: { fontSize: g.fontSize, color: P ? f : "var(--color-text-primary)" },
5684
+ style: { fontSize: g.fontSize, color: B ? f : "var(--color-text-primary)" },
5685
5685
  children: [
5686
5686
  R.label,
5687
5687
  R.children && /* @__PURE__ */ o(Pe, { size: 11, style: { marginLeft: "auto", opacity: 0.5 } })
@@ -5709,7 +5709,7 @@ function tw({
5709
5709
  className: p = "",
5710
5710
  style: g
5711
5711
  }) {
5712
- const f = vt(c, { width: s, borderRadius: d, color: u }), h = u ?? "var(--color-accent, var(--color-primary))", [m, b] = z(!1), [y, v] = z(n), k = M(null), w = M(null);
5712
+ const f = vt(c, { width: s, borderRadius: d, color: u }), h = u ?? "var(--color-accent, var(--color-primary))", [m, b] = z(!1), [y, v] = z(n), k = L(null), w = L(null);
5713
5713
  U(() => v(n), [n]);
5714
5714
  const S = ue(() => {
5715
5715
  const I = y.trim().toLowerCase();
@@ -5718,8 +5718,8 @@ function tw({
5718
5718
  U(() => {
5719
5719
  if (!m || !k.current || !w.current) return;
5720
5720
  const I = k.current, E = w.current, N = () => {
5721
- const P = I.getBoundingClientRect();
5722
- E.style.top = `${P.bottom + 4}px`, E.style.left = `${P.left}px`, E.style.minWidth = `${P.width}px`;
5721
+ const B = I.getBoundingClientRect();
5722
+ E.style.top = `${B.bottom + 4}px`, E.style.left = `${B.left}px`, E.style.minWidth = `${B.width}px`;
5723
5723
  };
5724
5724
  N();
5725
5725
  const R = requestAnimationFrame(N);
@@ -5727,11 +5727,11 @@ function tw({
5727
5727
  }, [m, S.length]), U(() => {
5728
5728
  if (!m) return;
5729
5729
  const I = (E) => {
5730
- var N, R;
5731
- (N = k.current) != null && N.contains(E.target) || (R = w.current) != null && R.contains(E.target) || (b(!1), l && r(y));
5730
+ var N, R, B;
5731
+ (N = k.current) != null && N.contains(E.target) || (R = w.current) != null && R.contains(E.target) || (b(!1), l && r(((B = e.find((M) => M.label === y)) == null ? void 0 : B.value) ?? y));
5732
5732
  };
5733
5733
  return document.addEventListener("mousedown", I), () => document.removeEventListener("mousedown", I);
5734
- }, [m, l, y, r]);
5734
+ }, [m, l, y, r, e]);
5735
5735
  const _ = (I) => {
5736
5736
  v(I.label), r(I.value), b(!1);
5737
5737
  };
@@ -5765,14 +5765,17 @@ function tw({
5765
5765
  }
5766
5766
  ),
5767
5767
  m && S.length > 0 && Se(
5768
- /* @__PURE__ */ o("div", { ref: w, className: "dui_combobox__menu", style: { position: "fixed", zIndex: 99999 }, children: S.map((I) => /* @__PURE__ */ o(
5768
+ /* @__PURE__ */ o("div", { ref: w, className: "dui_combobox__menu", style: { position: "fixed", zIndex: 99999 }, children: S.map((I) => /* @__PURE__ */ x(
5769
5769
  "button",
5770
5770
  {
5771
5771
  type: "button",
5772
5772
  className: "dui_combobox__item",
5773
5773
  onClick: () => _(I),
5774
- style: { fontSize: f.fontSize },
5775
- children: I.label
5774
+ style: { fontSize: f.fontSize, display: "flex", alignItems: "center", gap: 12 },
5775
+ children: [
5776
+ /* @__PURE__ */ o("span", { style: { flex: 1, minWidth: 0, overflow: "hidden", textOverflow: "ellipsis" }, children: I.label }),
5777
+ I.hint && /* @__PURE__ */ o("span", { style: { flexShrink: 0, opacity: 0.6, fontVariantNumeric: "tabular-nums" }, children: I.hint })
5778
+ ]
5776
5779
  },
5777
5780
  I.value
5778
5781
  )) }),
@@ -5830,7 +5833,7 @@ function rw({
5830
5833
  className: a = "",
5831
5834
  style: l
5832
5835
  }) {
5833
- const c = M(null), [s, d] = z(0), u = t.length * e, p = Math.max(0, Math.floor(s / e) - i), g = Math.min(t.length, Math.ceil((s + n) / e) + i), f = ue(() => t.slice(p, g), [t, p, g]);
5836
+ const c = L(null), [s, d] = z(0), u = t.length * e, p = Math.max(0, Math.floor(s / e) - i), g = Math.min(t.length, Math.ceil((s + n) / e) + i), f = ue(() => t.slice(p, g), [t, p, g]);
5834
5837
  return /* @__PURE__ */ o(
5835
5838
  "div",
5836
5839
  {
@@ -6039,7 +6042,7 @@ function sw({
6039
6042
  className: a = "",
6040
6043
  style: l
6041
6044
  }) {
6042
- const c = yt(n, { color: r }), s = r ?? "var(--color-primary)", [d, u] = z(!1), [p, g] = z(t), f = M(null);
6045
+ const c = yt(n, { color: r }), s = r ?? "var(--color-primary)", [d, u] = z(!1), [p, g] = z(t), f = L(null);
6043
6046
  U(() => {
6044
6047
  var b, y;
6045
6048
  d && (g(t), (b = f.current) == null || b.focus(), (y = f.current) == null || y.select());
@@ -6107,7 +6110,7 @@ function Vm({
6107
6110
  label: c = "Columns",
6108
6111
  icon: s
6109
6112
  }) {
6110
- const d = Kb(r, { color: i }), [u, p] = z(!1), g = M(null), f = M(null), h = new Set(e);
6113
+ const d = Kb(r, { color: i }), [u, p] = z(!1), g = L(null), f = L(null), h = new Set(e);
6111
6114
  U(() => {
6112
6115
  if (!u || !g.current || !f.current) return;
6113
6116
  const b = g.current.getBoundingClientRect();
@@ -6515,14 +6518,14 @@ function hw({
6515
6518
  className: p = "",
6516
6519
  style: g
6517
6520
  }) {
6518
- const f = s ?? "var(--color-primary)", h = M(null), [m, b] = e, y = (w) => Math.round(Math.min(i, Math.max(r, w)) / a) * a, v = (w) => (w - r) / (i - r) * 100, k = se((w) => (S) => {
6521
+ const f = s ?? "var(--color-primary)", h = L(null), [m, b] = e, y = (w) => Math.round(Math.min(i, Math.max(r, w)) / a) * a, v = (w) => (w - r) / (i - r) * 100, k = se((w) => (S) => {
6519
6522
  if (l) return;
6520
6523
  S.target.setPointerCapture(S.pointerId);
6521
6524
  const _ = (E) => {
6522
6525
  const N = h.current;
6523
6526
  if (!N) return;
6524
- const R = N.getBoundingClientRect(), P = Math.min(1, Math.max(0, (E.clientX - R.left) / R.width)), D = y(r + P * (i - r));
6525
- n(w === "lo" ? [Math.min(D, b), b] : [m, Math.max(D, m)]);
6527
+ const R = N.getBoundingClientRect(), B = Math.min(1, Math.max(0, (E.clientX - R.left) / R.width)), M = y(r + B * (i - r));
6528
+ n(w === "lo" ? [Math.min(M, b), b] : [m, Math.max(M, m)]);
6526
6529
  }, I = () => {
6527
6530
  window.removeEventListener("pointermove", _), window.removeEventListener("pointerup", I);
6528
6531
  };
@@ -6699,7 +6702,7 @@ function vw({
6699
6702
  className: s = "",
6700
6703
  style: d
6701
6704
  }) {
6702
- const u = Ue(a, { borderRadius: l, color: c }), p = c ?? "var(--color-accent, var(--color-primary))", [g, f] = z(!1), [h, m] = z([]), b = M(null), y = () => {
6705
+ const u = Ue(a, { borderRadius: l, color: c }), p = c ?? "var(--color-accent, var(--color-primary))", [g, f] = z(!1), [h, m] = z([]), b = L(null), y = () => {
6703
6706
  i || (m([]), f(!0), requestAnimationFrame(() => {
6704
6707
  var w;
6705
6708
  return (w = b.current) == null ? void 0 : w.focus();
@@ -6794,7 +6797,7 @@ function kw({
6794
6797
  className: u = "",
6795
6798
  style: p
6796
6799
  }) {
6797
- const g = Ue(c, { borderRadius: s, color: d }), f = d ?? "var(--color-accent, var(--color-primary))", h = M(null), m = () => {
6800
+ const g = Ue(c, { borderRadius: s, color: d }), f = d ?? "var(--color-accent, var(--color-primary))", h = L(null), m = () => {
6798
6801
  e.trim() && r();
6799
6802
  };
6800
6803
  return /* @__PURE__ */ x(
@@ -6921,7 +6924,7 @@ function Iw({
6921
6924
  color: i,
6922
6925
  className: a = ""
6923
6926
  }) {
6924
- const l = Nt(r, { color: i }), c = i ?? "var(--color-primary)", [s, d] = z(!1), u = M(null), p = M(null), g = e.filter((f) => !f.read).length;
6927
+ const l = Nt(r, { color: i }), c = i ?? "var(--color-primary)", [s, d] = z(!1), u = L(null), p = L(null), g = e.filter((f) => !f.read).length;
6925
6928
  return U(() => {
6926
6929
  if (!s || !u.current || !p.current) return;
6927
6930
  const f = u.current.getBoundingClientRect();
@@ -7932,7 +7935,7 @@ function tk({
7932
7935
  className: d = "",
7933
7936
  style: u
7934
7937
  }) {
7935
- const p = vt(a, { width: l, borderRadius: c, color: s }), g = s ?? "var(--color-primary)", [f, h] = z(!1), m = M(null), b = M(null), y = e.find((v) => v.value === n);
7938
+ const p = vt(a, { width: l, borderRadius: c, color: s }), g = s ?? "var(--color-primary)", [f, h] = z(!1), m = L(null), b = L(null), y = e.find((v) => v.value === n);
7936
7939
  return U(() => {
7937
7940
  if (!f || !m.current || !b.current) return;
7938
7941
  const v = m.current.getBoundingClientRect();
@@ -8183,7 +8186,7 @@ function ak({
8183
8186
  className: a = "",
8184
8187
  style: l
8185
8188
  }) {
8186
- const c = fn(void 0, { aspectRatio: r }), s = M(null), d = M({ startX: 0, startY: 0, origX: 0, origY: 0, dragging: !1 }), u = (f) => {
8189
+ const c = fn(void 0, { aspectRatio: r }), s = L(null), d = L({ startX: 0, startY: 0, origX: 0, origY: 0, dragging: !1 }), u = (f) => {
8187
8190
  d.current = { startX: f.clientX, startY: f.clientY, origX: e.x, origY: e.y, dragging: !0 }, f.target.setPointerCapture(f.pointerId);
8188
8191
  }, p = (f) => {
8189
8192
  if (!d.current.dragging || !s.current) return;
@@ -8242,7 +8245,7 @@ function lk({
8242
8245
  className: r = "",
8243
8246
  style: i
8244
8247
  }) {
8245
- const a = fn(void 0, { aspectRatio: 1.7777777777777777 }), l = n ?? "var(--color-primary)", c = M(null), [s, d] = z(!1), [u, p] = z(!1), [g, f] = z(0), [h, m] = z(0);
8248
+ const a = fn(void 0, { aspectRatio: 1.7777777777777777 }), l = n ?? "var(--color-primary)", c = L(null), [s, d] = z(!1), [u, p] = z(!1), [g, f] = z(0), [h, m] = z(0);
8246
8249
  U(() => {
8247
8250
  const v = c.current;
8248
8251
  if (!v) return;
@@ -8326,7 +8329,7 @@ function sk({
8326
8329
  className: r = "",
8327
8330
  style: i
8328
8331
  }) {
8329
- const a = n ?? "var(--color-primary)", l = M(null), [c, s] = z(!1), [d, u] = z(0), [p, g] = z(0);
8332
+ const a = n ?? "var(--color-primary)", l = L(null), [c, s] = z(!1), [d, u] = z(0), [p, g] = z(0);
8330
8333
  U(() => {
8331
8334
  const m = l.current;
8332
8335
  if (!m) return;
@@ -8926,7 +8929,7 @@ function mx({
8926
8929
  className: a,
8927
8930
  style: l
8928
8931
  }) {
8929
- const c = M(null), [s, d] = z(null);
8932
+ const c = L(null), [s, d] = z(null);
8930
8933
  U(() => {
8931
8934
  if (n !== void 0) return;
8932
8935
  const p = c.current;
@@ -9066,24 +9069,24 @@ function uk({
9066
9069
  className: _ = "",
9067
9070
  style: I
9068
9071
  }) {
9069
- const E = Be(w), N = S ?? "var(--color-primary)", R = M(null);
9072
+ const E = Be(w), N = S ?? "var(--color-primary)", R = L(null);
9070
9073
  U(() => {
9071
9074
  var O;
9072
9075
  if (!a) return;
9073
- const L = R.current;
9074
- if (!L) return;
9075
- const B = typeof window < "u" && ((O = window.matchMedia) == null ? void 0 : O.call(window, "(prefers-reduced-motion: reduce)").matches), T = requestAnimationFrame(() => {
9076
- L.scrollIntoView({
9077
- behavior: B ? "auto" : "smooth",
9076
+ const D = R.current;
9077
+ if (!D) return;
9078
+ const P = typeof window < "u" && ((O = window.matchMedia) == null ? void 0 : O.call(window, "(prefers-reduced-motion: reduce)").matches), T = requestAnimationFrame(() => {
9079
+ D.scrollIntoView({
9080
+ behavior: P ? "auto" : "smooth",
9078
9081
  block: "nearest",
9079
9082
  inline: "nearest"
9080
9083
  });
9081
9084
  });
9082
9085
  return () => cancelAnimationFrame(T);
9083
9086
  }, [a, t]);
9084
- const P = M(void 0);
9085
- a && (P.current = a);
9086
- const D = {
9087
+ const B = L(void 0);
9088
+ a && (B.current = a);
9089
+ const M = {
9087
9090
  fontSize: 9,
9088
9091
  fontWeight: 600,
9089
9092
  letterSpacing: ".07em",
@@ -9104,9 +9107,9 @@ function uk({
9104
9107
  padding: "5px 12px 6px",
9105
9108
  borderBottom: "1px solid var(--color-surface-border)"
9106
9109
  }, children: [
9107
- /* @__PURE__ */ o("span", { style: { ...D, flex: 1, minWidth: 0 }, children: "name" }),
9108
- l && /* @__PURE__ */ o("span", { style: { ...D, width: 88, textAlign: "right" }, children: "size" }),
9109
- c && /* @__PURE__ */ o("span", { style: { ...D, width: 132, textAlign: "right" }, children: "modified" }),
9110
+ /* @__PURE__ */ o("span", { style: { ...M, flex: 1, minWidth: 0 }, children: "name" }),
9111
+ l && /* @__PURE__ */ o("span", { style: { ...M, width: 88, textAlign: "right" }, children: "size" }),
9112
+ c && /* @__PURE__ */ o("span", { style: { ...M, width: 132, textAlign: "right" }, children: "modified" }),
9110
9113
  d.length > 0 && /* @__PURE__ */ o("span", { style: { width: d.length * (s ? 21 : 29) } })
9111
9114
  ] }),
9112
9115
  /* @__PURE__ */ x(
@@ -9120,8 +9123,8 @@ function uk({
9120
9123
  display: "flex",
9121
9124
  flexDirection: "column"
9122
9125
  },
9123
- onContextMenu: r ? (L) => {
9124
- L.target.closest("[data-file-row]") || (L.preventDefault(), r(L));
9126
+ onContextMenu: r ? (D) => {
9127
+ D.target.closest("[data-file-row]") || (D.preventDefault(), r(D));
9125
9128
  } : void 0,
9126
9129
  children: [
9127
9130
  p && /* @__PURE__ */ x(
@@ -9202,19 +9205,19 @@ function uk({
9202
9205
  color: "var(--color-text-muted)",
9203
9206
  fontSize: E.fontSize
9204
9207
  }, children: b }),
9205
- t.map((L) => {
9206
- const B = !!L.disabledReason, T = L.kind === "dir", O = L.id === g, W = L.id === a, $ = d.filter((A) => !A.show || A.show(L));
9208
+ t.map((D) => {
9209
+ const P = !!D.disabledReason, T = D.kind === "dir", O = D.id === g, W = D.id === a, $ = d.filter((A) => !A.show || A.show(D));
9207
9210
  return /* @__PURE__ */ x(
9208
9211
  "div",
9209
9212
  {
9210
9213
  "data-file-row": "",
9211
9214
  ref: W ? R : void 0,
9212
- onClick: !B && i ? () => i(L) : void 0,
9213
- onDoubleClick: !B && e ? () => e(L) : void 0,
9215
+ onClick: !P && i ? () => i(D) : void 0,
9216
+ onDoubleClick: !P && e ? () => e(D) : void 0,
9214
9217
  onContextMenu: n ? (A) => {
9215
- A.preventDefault(), i == null || i(L), n(L, A);
9218
+ A.preventDefault(), i == null || i(D), n(D, A);
9216
9219
  } : void 0,
9217
- title: L.disabledReason ?? L.name,
9220
+ title: D.disabledReason ?? D.name,
9218
9221
  style: {
9219
9222
  display: "flex",
9220
9223
  alignItems: "center",
@@ -9230,9 +9233,9 @@ function uk({
9230
9233
  // A row that responds to a click has to look like it will.
9231
9234
  // The default text caret says "select this string" and is the
9232
9235
  // single most common reason a list feels dead.
9233
- cursor: B ? "default" : i || e ? "pointer" : "default",
9234
- opacity: B ? 0.62 : 1,
9235
- transition: L.id === P.current ? "background .5s ease, box-shadow .5s ease" : "background .12s ease, box-shadow .12s ease",
9236
+ cursor: P ? "default" : i || e ? "pointer" : "default",
9237
+ opacity: P ? 0.62 : 1,
9238
+ transition: D.id === B.current ? "background .5s ease, box-shadow .5s ease" : "background .12s ease, box-shadow .12s ease",
9236
9239
  userSelect: "none"
9237
9240
  },
9238
9241
  children: [
@@ -9246,13 +9249,13 @@ function uk({
9246
9249
  /* @__PURE__ */ o("span", { style: {
9247
9250
  display: "flex",
9248
9251
  flexShrink: 0,
9249
- color: W ? xn : Ix(L)
9250
- }, children: B ? /* @__PURE__ */ o($n, { size: 14 }) : T ? /* @__PURE__ */ o(xr, { size: 14 }) : L.kind === "link" ? /* @__PURE__ */ o(yr, { size: 14 }) : /* @__PURE__ */ o(mr, { size: 14 }) }),
9251
- T && !B && e ? /* @__PURE__ */ o(
9252
+ color: W ? xn : Ix(D)
9253
+ }, children: P ? /* @__PURE__ */ o($n, { size: 14 }) : T ? /* @__PURE__ */ o(xr, { size: 14 }) : D.kind === "link" ? /* @__PURE__ */ o(yr, { size: 14 }) : /* @__PURE__ */ o(mr, { size: 14 }) }),
9254
+ T && !P && e ? /* @__PURE__ */ o(
9252
9255
  "button",
9253
9256
  {
9254
9257
  type: "button",
9255
- onClick: () => e(L),
9258
+ onClick: () => e(D),
9256
9259
  style: {
9257
9260
  border: "none",
9258
9261
  background: "transparent",
@@ -9268,28 +9271,28 @@ function uk({
9268
9271
  textOverflow: "ellipsis",
9269
9272
  whiteSpace: "nowrap"
9270
9273
  },
9271
- children: L.name
9274
+ children: D.name
9272
9275
  }
9273
9276
  ) : /* @__PURE__ */ o("span", { style: {
9274
9277
  fontFamily: "ui-monospace, monospace",
9275
9278
  fontSize: s ? 10 : E.fontSize,
9276
- color: W ? Hr : B ? "var(--color-text-muted)" : "var(--color-text-primary)",
9279
+ color: W ? Hr : P ? "var(--color-text-muted)" : "var(--color-text-primary)",
9277
9280
  fontWeight: W ? 600 : void 0,
9278
9281
  minWidth: 0,
9279
9282
  overflow: "hidden",
9280
9283
  textOverflow: "ellipsis",
9281
9284
  whiteSpace: "nowrap"
9282
- }, children: Sx(L.name, f, W ? xn : void 0) }),
9283
- L.linkTarget && /* @__PURE__ */ x("span", { style: {
9285
+ }, children: Sx(D.name, f, W ? xn : void 0) }),
9286
+ D.linkTarget && /* @__PURE__ */ x("span", { style: {
9284
9287
  fontFamily: "ui-monospace, monospace",
9285
9288
  fontSize: E.fontSize,
9286
9289
  color: W ? xn : "var(--color-text-muted)",
9287
9290
  whiteSpace: "nowrap"
9288
9291
  }, children: [
9289
9292
  "→ ",
9290
- L.linkTarget
9293
+ D.linkTarget
9291
9294
  ] }),
9292
- L.badge && /* @__PURE__ */ o(_x, { text: L.badge, tone: L.badgeTone, dense: s })
9295
+ D.badge && /* @__PURE__ */ o(_x, { text: D.badge, tone: D.badgeTone, dense: s })
9293
9296
  ] }),
9294
9297
  l && /* @__PURE__ */ o("span", { style: {
9295
9298
  width: 88,
@@ -9299,7 +9302,7 @@ function uk({
9299
9302
  fontSize: E.fontSize,
9300
9303
  fontVariantNumeric: "tabular-nums",
9301
9304
  color: W ? Hr : "var(--color-text-secondary)"
9302
- }, children: L.detail ?? (T ? "—" : kx(L.size)) }),
9305
+ }, children: D.detail ?? (T ? "—" : kx(D.size)) }),
9303
9306
  c && /* @__PURE__ */ o("span", { style: {
9304
9307
  width: 132,
9305
9308
  textAlign: "right",
@@ -9308,7 +9311,7 @@ function uk({
9308
9311
  fontSize: E.fontSize,
9309
9312
  fontVariantNumeric: "tabular-nums",
9310
9313
  color: W ? xn : "var(--color-text-muted)"
9311
- }, children: L.modified ?? "—" }),
9314
+ }, children: D.modified ?? "—" }),
9312
9315
  d.length > 0 && /* @__PURE__ */ o("span", { style: {
9313
9316
  width: d.length * (s ? 21 : 29),
9314
9317
  flexShrink: 0,
@@ -9321,8 +9324,8 @@ function uk({
9321
9324
  type: "button",
9322
9325
  title: A.label,
9323
9326
  "aria-label": A.label,
9324
- disabled: B,
9325
- onClick: () => u == null ? void 0 : u(A.id, L),
9327
+ disabled: P,
9328
+ onClick: () => u == null ? void 0 : u(A.id, D),
9326
9329
  style: {
9327
9330
  display: "grid",
9328
9331
  placeItems: "center",
@@ -9330,7 +9333,7 @@ function uk({
9330
9333
  height: s ? 16 : 20,
9331
9334
  borderRadius: s ? 3 : 5,
9332
9335
  padding: 0,
9333
- cursor: B ? "default" : "pointer",
9336
+ cursor: P ? "default" : "pointer",
9334
9337
  color: nr[A.tone ?? "neutral"],
9335
9338
  /*
9336
9339
  Dense rows drop the button chrome entirely.
@@ -9351,7 +9354,7 @@ function uk({
9351
9354
  )) })
9352
9355
  ]
9353
9356
  },
9354
- L.id
9357
+ D.id
9355
9358
  );
9356
9359
  })
9357
9360
  ]
@@ -9403,7 +9406,7 @@ function fk({
9403
9406
  className: r = "",
9404
9407
  style: i
9405
9408
  }) {
9406
- const a = fn(), l = e ?? "var(--color-text-primary)", c = M(null), s = M(!1), [d, u] = z(!0);
9409
+ const a = fn(), l = e ?? "var(--color-text-primary)", c = L(null), s = L(!1), [d, u] = z(!0);
9407
9410
  U(() => {
9408
9411
  const b = c.current;
9409
9412
  if (!b) return;
@@ -9566,7 +9569,7 @@ function xk({
9566
9569
  className: r = "",
9567
9570
  style: i
9568
9571
  }) {
9569
- const a = We(n), [l, c] = z(null), [s, d] = z(null), [u, p] = z(null), [g, f] = z(null), h = M(!1), m = M(!1), b = (v, k) => {
9572
+ const a = We(n), [l, c] = z(null), [s, d] = z(null), [u, p] = z(null), [g, f] = z(null), h = L(!1), m = L(!1), b = (v, k) => {
9570
9573
  if (!l) return;
9571
9574
  const w = t.map((R) => ({ ...R, cards: [...R.cards] })), S = w.find((R) => R.id === l.colId), _ = S.cards.findIndex((R) => R.id === l.cardId);
9572
9575
  if (_ < 0) return;
@@ -10554,7 +10557,7 @@ function Mx() {
10554
10557
  return ie;
10555
10558
  }).map((ge) => `(${ge})`).join(F);
10556
10559
  }
10557
- const _ = /\b\B/, I = "[a-zA-Z]\\w*", E = "[a-zA-Z_]\\w*", N = "\\b\\d+(\\.\\d+)?", R = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", P = "\\b(0b[01]+)", D = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", L = (C = {}) => {
10560
+ const _ = /\b\B/, I = "[a-zA-Z]\\w*", E = "[a-zA-Z_]\\w*", N = "\\b\\d+(\\.\\d+)?", R = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", B = "\\b(0b[01]+)", M = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", D = (C = {}) => {
10558
10561
  const F = /^#![ ]*\//;
10559
10562
  return C.binary && (C.begin = m(
10560
10563
  F,
@@ -10571,7 +10574,7 @@ function Mx() {
10571
10574
  Q.index !== 0 && ge.ignoreMatch();
10572
10575
  }
10573
10576
  }, C);
10574
- }, B = {
10577
+ }, P = {
10575
10578
  begin: "\\\\[\\s\\S]",
10576
10579
  relevance: 0
10577
10580
  }, T = {
@@ -10579,13 +10582,13 @@ function Mx() {
10579
10582
  begin: "'",
10580
10583
  end: "'",
10581
10584
  illegal: "\\n",
10582
- contains: [B]
10585
+ contains: [P]
10583
10586
  }, O = {
10584
10587
  scope: "string",
10585
10588
  begin: '"',
10586
10589
  end: '"',
10587
10590
  illegal: "\\n",
10588
- contains: [B]
10591
+ contains: [P]
10589
10592
  }, W = {
10590
10593
  begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
10591
10594
  }, $ = function(C, F, Q = {}) {
@@ -10664,19 +10667,19 @@ function Mx() {
10664
10667
  relevance: 0
10665
10668
  }, de = {
10666
10669
  scope: "number",
10667
- begin: P,
10670
+ begin: B,
10668
10671
  relevance: 0
10669
10672
  }, he = {
10670
10673
  scope: "regexp",
10671
10674
  begin: /\/(?=[^/\n]*\/)/,
10672
10675
  end: /\/[gimuy]*/,
10673
10676
  contains: [
10674
- B,
10677
+ P,
10675
10678
  {
10676
10679
  begin: /\[/,
10677
10680
  end: /\]/,
10678
10681
  relevance: 0,
10679
- contains: [B]
10682
+ contains: [P]
10680
10683
  }
10681
10684
  ]
10682
10685
  }, Ae = {
@@ -10695,9 +10698,9 @@ function Mx() {
10695
10698
  var V = /* @__PURE__ */ Object.freeze({
10696
10699
  __proto__: null,
10697
10700
  APOS_STRING_MODE: T,
10698
- BACKSLASH_ESCAPE: B,
10701
+ BACKSLASH_ESCAPE: P,
10699
10702
  BINARY_NUMBER_MODE: de,
10700
- BINARY_NUMBER_RE: P,
10703
+ BINARY_NUMBER_RE: B,
10701
10704
  COMMENT: $,
10702
10705
  C_BLOCK_COMMENT_MODE: H,
10703
10706
  C_LINE_COMMENT_MODE: A,
@@ -10727,8 +10730,8 @@ function Mx() {
10727
10730
  PHRASAL_WORDS_MODE: W,
10728
10731
  QUOTE_STRING_MODE: O,
10729
10732
  REGEXP_MODE: he,
10730
- RE_STARTERS_RE: D,
10731
- SHEBANG: L,
10733
+ RE_STARTERS_RE: M,
10734
+ SHEBANG: D,
10732
10735
  TITLE_MODE: Ae,
10733
10736
  UNDERSCORE_IDENT_RE: E,
10734
10737
  UNDERSCORE_TITLE_MODE: Ee
@@ -11809,18 +11812,18 @@ function rn(t) {
11809
11812
  label: "func.def",
11810
11813
  contains: [_],
11811
11814
  illegal: /%/
11812
- }, P = {
11815
+ }, B = {
11813
11816
  relevance: 0,
11814
11817
  match: /\b[A-Z][A-Z_0-9]+\b/,
11815
11818
  className: "variable.constant"
11816
11819
  };
11817
- function D($) {
11820
+ function M($) {
11818
11821
  return e.concat("(?!", $.join("|"), ")");
11819
11822
  }
11820
- const L = {
11823
+ const D = {
11821
11824
  match: e.concat(
11822
11825
  /\b/,
11823
- D([
11826
+ M([
11824
11827
  ...Ja,
11825
11828
  "super",
11826
11829
  "import"
@@ -11830,7 +11833,7 @@ function rn(t) {
11830
11833
  ),
11831
11834
  className: "title.function",
11832
11835
  relevance: 0
11833
- }, B = {
11836
+ }, P = {
11834
11837
  begin: e.concat(/\./, e.lookahead(
11835
11838
  e.concat(r, /(?![0-9A-Za-z$_(])/)
11836
11839
  )),
@@ -12007,7 +12010,7 @@ function rn(t) {
12007
12010
  match: /\.\.\./,
12008
12011
  relevance: 0
12009
12012
  },
12010
- B,
12013
+ P,
12011
12014
  // hack: prevents detection of keywords in some circumstances
12012
12015
  // .keyword()
12013
12016
  // $keyword = x
@@ -12020,8 +12023,8 @@ function rn(t) {
12020
12023
  className: { 1: "title.function" },
12021
12024
  contains: [_]
12022
12025
  },
12023
- L,
12024
- P,
12026
+ D,
12027
+ B,
12025
12028
  I,
12026
12029
  T,
12027
12030
  {
@@ -12464,18 +12467,18 @@ function Wx(t) {
12464
12467
  label: "func.def",
12465
12468
  contains: [_],
12466
12469
  illegal: /%/
12467
- }, P = {
12470
+ }, B = {
12468
12471
  relevance: 0,
12469
12472
  match: /\b[A-Z][A-Z_0-9]+\b/,
12470
12473
  className: "variable.constant"
12471
12474
  };
12472
- function D($) {
12475
+ function M($) {
12473
12476
  return e.concat("(?!", $.join("|"), ")");
12474
12477
  }
12475
- const L = {
12478
+ const D = {
12476
12479
  match: e.concat(
12477
12480
  /\b/,
12478
- D([
12481
+ M([
12479
12482
  ...ol,
12480
12483
  "super",
12481
12484
  "import"
@@ -12485,7 +12488,7 @@ function Wx(t) {
12485
12488
  ),
12486
12489
  className: "title.function",
12487
12490
  relevance: 0
12488
- }, B = {
12491
+ }, P = {
12489
12492
  begin: e.concat(/\./, e.lookahead(
12490
12493
  e.concat(r, /(?![0-9A-Za-z$_(])/)
12491
12494
  )),
@@ -12662,7 +12665,7 @@ function Wx(t) {
12662
12665
  match: /\.\.\./,
12663
12666
  relevance: 0
12664
12667
  },
12665
- B,
12668
+ P,
12666
12669
  // hack: prevents detection of keywords in some circumstances
12667
12670
  // .keyword()
12668
12671
  // $keyword = x
@@ -12675,8 +12678,8 @@ function Wx(t) {
12675
12678
  className: { 1: "title.function" },
12676
12679
  contains: [_]
12677
12680
  },
12678
- L,
12679
- P,
12681
+ D,
12682
+ B,
12680
12683
  I,
12681
12684
  T,
12682
12685
  {
@@ -16849,7 +16852,7 @@ function Ak({
16849
16852
  className: a = "",
16850
16853
  style: l
16851
16854
  }) {
16852
- const c = fn(), [s, d] = z(50), u = M(null), p = M(!1), g = (f) => {
16855
+ const c = fn(), [s, d] = z(50), u = L(null), p = L(!1), g = (f) => {
16853
16856
  var b;
16854
16857
  const h = (b = u.current) == null ? void 0 : b.getBoundingClientRect();
16855
16858
  if (!h) return;
@@ -16890,7 +16893,7 @@ function Mk({
16890
16893
  className: a = "",
16891
16894
  style: l
16892
16895
  }) {
16893
- const c = r ?? "var(--color-primary)", [s, d] = z(0), [u, p] = z(!1), g = M({ startX: 0, dragging: !1 });
16896
+ const c = r ?? "var(--color-primary)", [s, d] = z(0), [u, p] = z(!1), g = L({ startX: 0, dragging: !1 });
16894
16897
  U(() => {
16895
16898
  if (!e || u || t.length <= 1) return;
16896
16899
  const m = setInterval(() => d((b) => (b + 1) % t.length), n);
@@ -18777,7 +18780,7 @@ function Fk({
18777
18780
  }) {
18778
18781
  const [f, h] = z("rich"), m = r ?? f, b = (T) => {
18779
18782
  i == null || i(T), r || h(T);
18780
- }, y = M(null), [v, k] = z("p"), [w, S] = z(null), [_, I] = z(""), E = M(null), N = () => {
18783
+ }, y = L(null), [v, k] = z("p"), [w, S] = z(null), [_, I] = z(""), E = L(null), N = () => {
18781
18784
  const T = _.trim(), O = w;
18782
18785
  if (S(null), I(""), !T || !O) return;
18783
18786
  const W = y.current;
@@ -18786,7 +18789,7 @@ function Fk({
18786
18789
  const $ = window.getSelection();
18787
18790
  $ == null || $.removeAllRanges(), $ == null || $.addRange(E.current);
18788
18791
  }
18789
- O === "link" ? document.execCommand("createLink", !1, T) : document.execCommand("insertHTML", !1, `<img src="${Py(T)}" alt="" />`), P();
18792
+ O === "link" ? document.execCommand("createLink", !1, T) : document.execCommand("insertHTML", !1, `<img src="${Py(T)}" alt="" />`), B();
18790
18793
  }
18791
18794
  }, R = ue(() => {
18792
18795
  try {
@@ -18799,10 +18802,10 @@ function Fk({
18799
18802
  const T = y.current;
18800
18803
  !T || m !== "rich" || pi(T.innerHTML).trim() !== (e || "").trim() && (T.innerHTML = R);
18801
18804
  }, [R, m, e]);
18802
- const P = se(() => {
18805
+ const B = se(() => {
18803
18806
  const T = y.current;
18804
18807
  T && n(pi(T.innerHTML));
18805
- }, [n]), D = se(() => {
18808
+ }, [n]), M = se(() => {
18806
18809
  var W;
18807
18810
  const T = window.getSelection();
18808
18811
  let O = T == null ? void 0 : T.anchorNode;
@@ -18815,7 +18818,7 @@ function Fk({
18815
18818
  O = O.parentElement;
18816
18819
  }
18817
18820
  k("p");
18818
- }, []), L = (T) => {
18821
+ }, []), D = (T) => {
18819
18822
  if (s) return;
18820
18823
  const O = y.current;
18821
18824
  if (O) {
@@ -18831,9 +18834,9 @@ function Fk({
18831
18834
  !1,
18832
18835
  '<ul data-task="1"><li><input type="checkbox" disabled /> item</li></ul><p><br></p>'
18833
18836
  ) : T.startsWith("formatBlock:") ? document.execCommand("formatBlock", !1, T.slice(12)) : document.execCommand(T);
18834
- P(), D();
18837
+ B(), M();
18835
18838
  }
18836
- }, B = s;
18839
+ }, P = s;
18837
18840
  return /* @__PURE__ */ x("div", { "data-testid": t, className: `dui_mde ${p}`, style: g, children: [
18838
18841
  /* @__PURE__ */ x("div", { className: "dui_mde__toolbar", children: [
18839
18842
  m === "rich" && /* @__PURE__ */ x(ve, { children: [
@@ -18844,9 +18847,9 @@ function Fk({
18844
18847
  value: v,
18845
18848
  options: Ly,
18846
18849
  accentColor: u,
18847
- disabled: B,
18850
+ disabled: P,
18848
18851
  onChange: (T) => {
18849
- k(T), L(`formatBlock:${T}`);
18852
+ k(T), D(`formatBlock:${T}`);
18850
18853
  },
18851
18854
  style: { minWidth: 108 }
18852
18855
  }
@@ -18859,9 +18862,9 @@ function Fk({
18859
18862
  className: "dui_mde__btn",
18860
18863
  title: T.label,
18861
18864
  "aria-label": T.label,
18862
- disabled: B,
18865
+ disabled: P,
18863
18866
  onMouseDown: (O) => {
18864
- O.preventDefault(), L(T.cmd);
18867
+ O.preventDefault(), D(T.cmd);
18865
18868
  },
18866
18869
  children: /* @__PURE__ */ o(T.Icon, { size: 13 })
18867
18870
  },
@@ -18932,10 +18935,10 @@ function Fk({
18932
18935
  contentEditable: !s,
18933
18936
  suppressContentEditableWarning: !0,
18934
18937
  "data-placeholder": a,
18935
- onInput: P,
18936
- onBlur: P,
18937
- onKeyUp: D,
18938
- onMouseUp: D
18938
+ onInput: B,
18939
+ onBlur: B,
18940
+ onKeyUp: M,
18941
+ onMouseUp: M
18939
18942
  }
18940
18943
  ) : /* @__PURE__ */ o(
18941
18944
  "textarea",
@@ -19015,7 +19018,7 @@ function Uk({
19015
19018
  className: u = "",
19016
19019
  style: p
19017
19020
  }) {
19018
- const g = Ue(c, { borderRadius: s, color: d }), f = d ?? "var(--color-accent, var(--color-primary))", [h, m] = z(null), b = M(null), y = ue(() => {
19021
+ const g = Ue(c, { borderRadius: s, color: d }), f = d ?? "var(--color-accent, var(--color-primary))", [h, m] = z(null), b = L(null), y = ue(() => {
19019
19022
  if (h === null) return [];
19020
19023
  const w = h.toLowerCase();
19021
19024
  return r.filter((S) => S.label.toLowerCase().includes(w)).slice(0, 6);
@@ -19143,7 +19146,7 @@ function Xk({
19143
19146
  className: c = "",
19144
19147
  style: s
19145
19148
  }) {
19146
- const d = Be(a, { color: l }), [u, p] = z(0), g = M(0);
19149
+ const d = Be(a, { color: l }), [u, p] = z(0), g = L(0);
19147
19150
  return U(() => {
19148
19151
  const f = g.current, h = performance.now();
19149
19152
  let m = 0;
@@ -19167,7 +19170,7 @@ function Kk({
19167
19170
  className: a = "",
19168
19171
  style: l
19169
19172
  }) {
19170
- const c = je(r, { color: i }), s = i ?? "var(--color-primary)", d = M(null), [u, p] = z({ x: 0, y: 0 });
19173
+ const c = je(r, { color: i }), s = i ?? "var(--color-primary)", d = L(null), [u, p] = z({ x: 0, y: 0 });
19171
19174
  return /* @__PURE__ */ o(
19172
19175
  "button",
19173
19176
  {
@@ -19207,7 +19210,7 @@ function jk({
19207
19210
  className: r = "",
19208
19211
  style: i
19209
19212
  }) {
19210
- const a = We(n), l = M(null), [c, s] = z({ rx: 0, ry: 0 });
19213
+ const a = We(n), l = L(null), [c, s] = z({ rx: 0, ry: 0 });
19211
19214
  return /* @__PURE__ */ o(
19212
19215
  "div",
19213
19216
  {
@@ -19303,7 +19306,7 @@ function Zk({
19303
19306
  className: a = "",
19304
19307
  style: l
19305
19308
  }) {
19306
- const c = M(null), [s, d] = z(!1);
19309
+ const c = L(null), [s, d] = z(!1);
19307
19310
  return U(() => {
19308
19311
  const u = c.current;
19309
19312
  if (!u) return;
@@ -19474,7 +19477,7 @@ function nS({
19474
19477
  className: a = "",
19475
19478
  style: l
19476
19479
  }) {
19477
- const c = Be(r, { color: i }), s = t.length ? t.split(/(\s+)/).filter(Boolean) : [], d = M(0), [u, p] = z(0);
19480
+ const c = Be(r, { color: i }), s = t.length ? t.split(/(\s+)/).filter(Boolean) : [], d = L(0), [u, p] = z(0);
19478
19481
  return U(() => {
19479
19482
  p(d.current), d.current = s.length;
19480
19483
  }, [t]), e && s.length === 0 ? /* @__PURE__ */ o("span", { className: `dui_aistream__shimmer ${a}`, style: { fontSize: c.fontSize, fontWeight: 600, ...l }, children: "Thinking…" }) : /* @__PURE__ */ x("span", { className: a, style: { fontSize: c.fontSize, color: i ?? "var(--color-text-primary)", ...l }, children: [
@@ -19539,7 +19542,7 @@ function oS({
19539
19542
  className: d = "",
19540
19543
  style: u
19541
19544
  }) {
19542
- const p = Ue(s, { color: c }), g = c ?? "var(--color-primary)", f = M(null), h = t.map(r), m = Math.min(...h), y = Math.max(...h) - m || 1, v = Math.max(1, t.length - 1), k = h.map((I, E) => {
19545
+ const p = Ue(s, { color: c }), g = c ?? "var(--color-primary)", f = L(null), h = t.map(r), m = Math.min(...h), y = Math.max(...h) - m || 1, v = Math.max(1, t.length - 1), k = h.map((I, E) => {
19543
19546
  const N = E / v * a, R = l - (I - m) / y * l;
19544
19547
  return `${N},${R}`;
19545
19548
  }).join(" "), w = (I) => {
@@ -19595,7 +19598,7 @@ function Vy(t, e) {
19595
19598
  return a;
19596
19599
  }
19597
19600
  function iS({ text: t, size: e, className: n = "", style: r }) {
19598
- const i = Be(e), a = M(t.split(/(\s+)/).filter(Boolean)), l = M(/* @__PURE__ */ new Map()), c = M(null), s = t.split(/(\s+)/).filter(Boolean), d = Vy(a.current, s);
19601
+ const i = Be(e), a = L(t.split(/(\s+)/).filter(Boolean)), l = L(/* @__PURE__ */ new Map()), c = L(null), s = t.split(/(\s+)/).filter(Boolean), d = Vy(a.current, s);
19599
19602
  return zn(() => {
19600
19603
  const u = c.current;
19601
19604
  if (!u) return;
@@ -19756,19 +19759,19 @@ function cS({
19756
19759
  className: d = "",
19757
19760
  style: u
19758
19761
  }) {
19759
- const p = Ue(c, { color: s }), f = gi[c ?? "md"] ?? gi.md, h = s ?? "var(--color-primary)", m = M(null), [b, y] = z(!1), v = M(-1), k = (e - n) / (r - n), w = Wt + k * (qn - Wt), S = (I, E) => {
19762
+ const p = Ue(c, { color: s }), f = gi[c ?? "md"] ?? gi.md, h = s ?? "var(--color-primary)", m = L(null), [b, y] = z(!1), v = L(-1), k = (e - n) / (r - n), w = Wt + k * (qn - Wt), S = (I, E) => {
19760
19763
  var W;
19761
19764
  const N = (W = m.current) == null ? void 0 : W.getBoundingClientRect();
19762
19765
  if (!N) return e;
19763
- const R = N.left + N.width / 2, P = N.top + N.height / 2;
19764
- let D = Math.atan2(E - P, I - R) * 180 / Math.PI + 90;
19765
- D > 180 && (D -= 360);
19766
- const B = (Math.min(qn, Math.max(Wt, D)) - Wt) / (qn - Wt), T = n + B * (r - n), O = (r - n) / i;
19766
+ const R = N.left + N.width / 2, B = N.top + N.height / 2;
19767
+ let M = Math.atan2(E - B, I - R) * 180 / Math.PI + 90;
19768
+ M > 180 && (M -= 360);
19769
+ const P = (Math.min(qn, Math.max(Wt, M)) - Wt) / (qn - Wt), T = n + P * (r - n), O = (r - n) / i;
19767
19770
  return Math.round(T / O) * O;
19768
19771
  }, _ = (I) => {
19769
19772
  const E = (R) => {
19770
- const P = S(R.clientX, R.clientY), D = Math.round((P - n) / (r - n) * i);
19771
- D !== v.current && (v.current = D, y(!0), setTimeout(() => y(!1), 140)), a(P);
19773
+ const B = S(R.clientX, R.clientY), M = Math.round((B - n) / (r - n) * i);
19774
+ M !== v.current && (v.current = M, y(!0), setTimeout(() => y(!1), 140)), a(B);
19772
19775
  };
19773
19776
  E(I.nativeEvent);
19774
19777
  const N = () => {
@@ -19840,7 +19843,7 @@ function dS({
19840
19843
  className: l = "",
19841
19844
  style: c
19842
19845
  }) {
19843
- const s = je(i, { color: a }), d = a ?? "var(--color-error)", [u, p] = z(0), g = M(0), f = M(0), h = () => {
19846
+ const s = je(i, { color: a }), d = a ?? "var(--color-error)", [u, p] = z(0), g = L(0), f = L(0), h = () => {
19844
19847
  f.current = performance.now();
19845
19848
  const b = (y) => {
19846
19849
  const v = Math.min(1, (y - f.current) / r);
@@ -19946,7 +19949,7 @@ function pS({
19946
19949
  className: l = "",
19947
19950
  style: c
19948
19951
  }) {
19949
- const s = We(a), [d, u] = z(0), p = M(!1), g = M(0), f = t[0], h = t.slice(0, 3), m = (b) => {
19952
+ const s = We(a), [d, u] = z(0), p = L(!1), g = L(0), f = t[0], h = t.slice(0, 3), m = (b) => {
19950
19953
  p.current = !0, g.current = b.clientX;
19951
19954
  const y = (k) => {
19952
19955
  p.current && u(k.clientX - g.current);
@@ -20051,7 +20054,7 @@ function hS({
20051
20054
  className: n = "",
20052
20055
  style: r
20053
20056
  }) {
20054
- const i = We(e), a = M(null), [l, c] = z({ x: 50, y: 50 }), [s, d] = z(!1);
20057
+ const i = We(e), a = L(null), [l, c] = z({ x: 50, y: 50 }), [s, d] = z(!1);
20055
20058
  return /* @__PURE__ */ x(
20056
20059
  "div",
20057
20060
  {
@@ -20247,7 +20250,7 @@ function yS({
20247
20250
  className: c = "",
20248
20251
  style: s
20249
20252
  }) {
20250
- const d = Array.isArray(t) ? t : [t], u = M([]), [p, g] = z(!1), f = i ?? "var(--color-primary)";
20253
+ const d = Array.isArray(t) ? t : [t], u = L([]), [p, g] = z(!1), f = i ?? "var(--color-primary)";
20251
20254
  return U(() => {
20252
20255
  u.current.forEach((h) => {
20253
20256
  if (!h) return;
@@ -20283,7 +20286,7 @@ function vS({
20283
20286
  className: s = "",
20284
20287
  style: d
20285
20288
  }) {
20286
- const u = Ue(c), p = M(null), g = (e - n) / (r - n), f = (m) => {
20289
+ const u = Ue(c), p = L(null), g = (e - n) / (r - n), f = (m) => {
20287
20290
  var v;
20288
20291
  const b = (v = p.current) == null ? void 0 : v.getBoundingClientRect();
20289
20292
  if (!b) return;
@@ -20366,7 +20369,7 @@ function jy({
20366
20369
  activeColor: p,
20367
20370
  fontStyle: g
20368
20371
  }) {
20369
- const f = Sr(i, { width: s, borderRadius: d, color: u, activeColor: p, fontStyle: g }), h = M(null), [m, b] = z({ left: 0, width: 0 });
20372
+ const f = Sr(i, { width: s, borderRadius: d, color: u, activeColor: p, fontStyle: g }), h = L(null), [m, b] = z({ left: 0, width: 0 });
20370
20373
  zn(() => {
20371
20374
  if (!h.current) return;
20372
20375
  const k = h.current.querySelector(`[data-tab="${n}"]`);
@@ -20849,18 +20852,18 @@ function AS({
20849
20852
  height: h,
20850
20853
  className: m = ""
20851
20854
  }) {
20852
- const b = Ie(), y = f ?? b.size, v = h ?? lt.nav[y], k = Oe[y], w = zt[y], S = M(null), [_, I] = z(!1), [E, N] = z(!1), [R, P] = z(null), D = M(null), L = ($, A) => {
20855
+ const b = Ie(), y = f ?? b.size, v = h ?? lt.nav[y], k = Oe[y], w = zt[y], S = L(null), [_, I] = z(!1), [E, N] = z(!1), [R, B] = z(null), M = L(null), D = ($, A) => {
20853
20856
  if (!$.preview) return;
20854
- D.current && clearTimeout(D.current);
20857
+ M.current && clearTimeout(M.current);
20855
20858
  const H = A.getBoundingClientRect();
20856
- D.current = setTimeout(() => {
20857
- P({ id: $.id, x: H.left + H.width / 2, y: H.bottom + 6 });
20859
+ M.current = setTimeout(() => {
20860
+ B({ id: $.id, x: H.left + H.width / 2, y: H.bottom + 6 });
20858
20861
  }, 350);
20859
- }, B = () => {
20860
- D.current && clearTimeout(D.current), D.current = null, P(null);
20862
+ }, P = () => {
20863
+ M.current && clearTimeout(M.current), M.current = null, B(null);
20861
20864
  };
20862
20865
  U(() => () => {
20863
- D.current && clearTimeout(D.current);
20866
+ M.current && clearTimeout(M.current);
20864
20867
  }, []);
20865
20868
  const T = R ? e.find(($) => $.id === R.id) : void 0, O = se(() => {
20866
20869
  const $ = S.current;
@@ -20952,13 +20955,13 @@ function AS({
20952
20955
  background: A ? `color-mix(in srgb, ${H} 5%, transparent)` : "transparent"
20953
20956
  },
20954
20957
  onClick: () => {
20955
- B(), r($.id);
20958
+ P(), r($.id);
20956
20959
  },
20957
20960
  onContextMenu: (Z) => {
20958
20961
  Z.preventDefault(), l == null || l($.id, Z);
20959
20962
  },
20960
- onMouseEnter: (Z) => L($, Z.currentTarget),
20961
- onMouseLeave: B,
20963
+ onMouseEnter: (Z) => D($, Z.currentTarget),
20964
+ onMouseLeave: P,
20962
20965
  children: [
20963
20966
  A && /* @__PURE__ */ o("div", { style: {
20964
20967
  position: "absolute",
@@ -21123,7 +21126,7 @@ function MS({
21123
21126
  className: l,
21124
21127
  style: c
21125
21128
  }) {
21126
- const s = Math.max(0, e.findIndex((b) => b.id === n)), d = i ?? "var(--color-primary, rgba(99,102,241,1))", u = a === "pill", p = u ? 999 : 8, g = u ? 999 : 6, f = M([]), [h, m] = z(null);
21129
+ const s = Math.max(0, e.findIndex((b) => b.id === n)), d = i ?? "var(--color-primary, rgba(99,102,241,1))", u = a === "pill", p = u ? 999 : 8, g = u ? 999 : 6, f = L([]), [h, m] = z(null);
21127
21130
  return U(() => {
21128
21131
  const b = f.current[s];
21129
21132
  b && m({ left: b.offsetLeft, width: b.offsetWidth });
@@ -21267,7 +21270,7 @@ function DS({
21267
21270
  rowClassName: a = "",
21268
21271
  style: l
21269
21272
  }) {
21270
- const [c, s] = z(null), [d, u] = z(null), p = M(!1), g = n, f = (h, m) => {
21273
+ const [c, s] = z(null), [d, u] = z(null), p = L(!1), g = n, f = (h, m) => {
21271
21274
  h.preventDefault(), c != null && c !== m && e(c, m), s(null), u(null);
21272
21275
  };
21273
21276
  return /* @__PURE__ */ o(ve, { children: t.map((h, m) => /* @__PURE__ */ x(
@@ -21325,7 +21328,7 @@ function OS({
21325
21328
  emptyText: a = "No matching commands",
21326
21329
  accentColor: l
21327
21330
  }) {
21328
- const [c, s] = z(""), [d, u] = z(0), p = M(null), g = l || "var(--color-primary)", f = ue(() => {
21331
+ const [c, s] = z(""), [d, u] = z(0), p = L(null), g = l || "var(--color-primary)", f = ue(() => {
21329
21332
  const b = c.trim().toLowerCase();
21330
21333
  return b ? r.map((v) => {
21331
21334
  if (![v.label, v.hint ?? "", ...v.keywords ?? []].join(" ").toLowerCase().includes(b)) return null;
@@ -22114,7 +22117,7 @@ function FS({
22114
22117
  onWikiOpen: d,
22115
22118
  width: u = 320
22116
22119
  }) {
22117
- const p = M(null), [g, f] = z({
22120
+ const p = L(null), [g, f] = z({
22118
22121
  top: -9999,
22119
22122
  left: -9999,
22120
22123
  visible: !1
@@ -22245,30 +22248,30 @@ function HS({
22245
22248
  style: b,
22246
22249
  className: y = ""
22247
22250
  }) {
22248
- const [v, k] = z(i ?? r), [w, S] = z(!1), [_, I] = z(!1), E = M(null), N = M(null), R = M(!1), P = M(!1), D = M(null), L = t === "horizontal", B = d || "var(--color-primary)", T = w || _;
22251
+ const [v, k] = z(i ?? r), [w, S] = z(!1), [_, I] = z(!1), E = L(null), N = L(null), R = L(!1), B = L(!1), M = L(null), D = t === "horizontal", P = d || "var(--color-primary)", T = w || _;
22249
22252
  U(() => {
22250
22253
  i !== void 0 && k(i);
22251
22254
  }, [i]);
22252
- const O = i !== void 0 ? i : v, W = w && D.current != null ? D.current : O, $ = (X) => {
22253
- X.preventDefault(), X.target.setPointerCapture(X.pointerId), R.current = !0, P.current = !1, S(!0);
22255
+ const O = i !== void 0 ? i : v, W = w && M.current != null ? M.current : O, $ = (X) => {
22256
+ X.preventDefault(), X.target.setPointerCapture(X.pointerId), R.current = !0, B.current = !1, S(!0);
22254
22257
  }, A = (X) => {
22255
22258
  if (!R.current || !E.current) return;
22256
- P.current = !0;
22257
- const pe = E.current.getBoundingClientRect(), V = L ? pe.width : pe.height, xe = L ? X.clientX - pe.left : X.clientY - pe.top, ke = c ?? a / V * 100, Ce = s ?? l / V * 100, Te = Math.max(
22259
+ B.current = !0;
22260
+ const pe = E.current.getBoundingClientRect(), V = D ? pe.width : pe.height, xe = D ? X.clientX - pe.left : X.clientY - pe.top, ke = c ?? a / V * 100, Ce = s ?? l / V * 100, Te = Math.max(
22258
22261
  ke,
22259
22262
  Math.min(100 - Ce, xe / V * 100)
22260
22263
  );
22261
- D.current = Te, N.current && (L ? N.current.style.width = `${Te}%` : N.current.style.height = `${Te}%`), u == null || u(Te);
22264
+ M.current = Te, N.current && (D ? N.current.style.width = `${Te}%` : N.current.style.height = `${Te}%`), u == null || u(Te);
22262
22265
  }, H = (X) => {
22263
- if (X.target.releasePointerCapture(X.pointerId), R.current = !1, S(!1), !P.current)
22266
+ if (X.target.releasePointerCapture(X.pointerId), R.current = !1, S(!1), !B.current)
22264
22267
  g == null || g();
22265
22268
  else {
22266
- const pe = D.current ?? v;
22267
- D.current = null, k(pe), p == null || p(pe);
22269
+ const pe = M.current ?? v;
22270
+ M.current = null, k(pe), p == null || p(pe);
22268
22271
  }
22269
22272
  }, G = () => {
22270
22273
  k(r), u == null || u(r), p == null || p(r);
22271
- }, te = h && m === "first", Z = h && m === "second", de = L ? {
22274
+ }, te = h && m === "first", Z = h && m === "second", de = D ? {
22272
22275
  width: Z ? "100%" : `${W}%`,
22273
22276
  minWidth: Z ? 0 : a,
22274
22277
  height: "100%",
@@ -22280,13 +22283,13 @@ function HS({
22280
22283
  width: "100%",
22281
22284
  overflow: "hidden",
22282
22285
  transition: w ? "none" : `height 180ms ${Gr}`
22283
- }, he = L ? { flex: 1, minWidth: te ? 0 : l, height: "100%", overflow: "hidden" } : {
22286
+ }, he = D ? { flex: 1, minWidth: te ? 0 : l, height: "100%", overflow: "hidden" } : {
22284
22287
  flex: 1,
22285
22288
  minHeight: te ? 0 : l,
22286
22289
  width: "100%",
22287
22290
  overflow: "hidden",
22288
22291
  transition: w ? "none" : `all 180ms ${Gr}`
22289
- }, Ae = L ? 3 : T ? 80 : 44, Ee = L ? T ? 80 : 44 : 3;
22292
+ }, Ae = D ? 3 : T ? 80 : 44, Ee = D ? T ? 80 : 44 : 3;
22290
22293
  return /* @__PURE__ */ x(
22291
22294
  "div",
22292
22295
  {
@@ -22294,7 +22297,7 @@ function HS({
22294
22297
  className: y,
22295
22298
  style: {
22296
22299
  display: "flex",
22297
- flexDirection: L ? "row" : "column",
22300
+ flexDirection: D ? "row" : "column",
22298
22301
  width: "100%",
22299
22302
  height: "100%",
22300
22303
  overflow: "hidden",
@@ -22309,9 +22312,9 @@ function HS({
22309
22312
  display: h ? "none" : void 0,
22310
22313
  flexShrink: 0,
22311
22314
  // 8px: the line is 1px, and a 1px drag target is a frustration.
22312
- width: L ? 8 : "100%",
22313
- height: L ? "100%" : 8,
22314
- cursor: L ? "col-resize" : "row-resize",
22315
+ width: D ? 8 : "100%",
22316
+ height: D ? "100%" : 8,
22317
+ cursor: D ? "col-resize" : "row-resize",
22315
22318
  position: "relative",
22316
22319
  userSelect: "none",
22317
22320
  zIndex: 10
@@ -22329,8 +22332,8 @@ function HS({
22329
22332
  {
22330
22333
  style: {
22331
22334
  position: "absolute",
22332
- ...L ? { left: "50%", top: 0, bottom: 0, width: 1, transform: "translateX(-50%)" } : { top: "50%", left: 0, right: 0, height: 1, transform: "translateY(-50%)" },
22333
- background: T ? `color-mix(in srgb, ${B} 55%, transparent)` : "var(--color-surface-border)",
22335
+ ...D ? { left: "50%", top: 0, bottom: 0, width: 1, transform: "translateX(-50%)" } : { top: "50%", left: 0, right: 0, height: 1, transform: "translateY(-50%)" },
22336
+ background: T ? `color-mix(in srgb, ${P} 55%, transparent)` : "var(--color-surface-border)",
22334
22337
  transition: "background 150ms ease",
22335
22338
  pointerEvents: "none"
22336
22339
  }
@@ -22347,8 +22350,8 @@ function HS({
22347
22350
  width: Ae,
22348
22351
  height: Ee,
22349
22352
  borderRadius: 9999,
22350
- background: T ? B : `color-mix(in srgb, ${B} 50%, var(--color-surface-border))`,
22351
- transition: `${L ? "height" : "width"} 150ms ease, background 150ms ease`,
22353
+ background: T ? P : `color-mix(in srgb, ${P} 50%, var(--color-surface-border))`,
22354
+ transition: `${D ? "height" : "width"} 150ms ease, background 150ms ease`,
22352
22355
  pointerEvents: "none"
22353
22356
  }
22354
22357
  }
@@ -22358,7 +22361,7 @@ function HS({
22358
22361
  {
22359
22362
  style: {
22360
22363
  position: "absolute",
22361
- ...L ? { left: "calc(100% + 4px)", top: "50%", transform: "translateY(-50%)" } : { left: "50%", top: "calc(100% + 4px)", transform: "translateX(-50%)" },
22364
+ ...D ? { left: "calc(100% + 4px)", top: "50%", transform: "translateY(-50%)" } : { left: "50%", top: "calc(100% + 4px)", transform: "translateX(-50%)" },
22362
22365
  background: "var(--color-surface)",
22363
22366
  color: "var(--color-text-primary)",
22364
22367
  fontSize: 11,
@@ -22391,7 +22394,7 @@ function US({
22391
22394
  className: a = "",
22392
22395
  style: l
22393
22396
  }) {
22394
- const [c, s] = z(t), [d, u] = z(!1), p = M(null), g = se((m) => {
22397
+ const [c, s] = z(t), [d, u] = z(!1), p = L(null), g = se((m) => {
22395
22398
  m.preventDefault(), m.stopPropagation(), m.target.setPointerCapture(m.pointerId), p.current = { startY: m.clientY, startHeight: c };
22396
22399
  }, [c]), f = se((m) => {
22397
22400
  if (!p.current) return;
@@ -22614,17 +22617,17 @@ function KS({
22614
22617
  maxHeight: u,
22615
22618
  className: p = ""
22616
22619
  }) {
22617
- const g = Ie(), f = s ? "sm" : d ?? g.size, [h, m] = z(null), [b, y] = z(!0), [v, k] = z(/* @__PURE__ */ new Set()), w = (L) => {
22618
- L.sortable && (h === L.key ? y((B) => !B) : (m(L.key), y(!0)));
22619
- }, S = (L, B) => {
22620
- B.stopPropagation(), k((T) => {
22620
+ const g = Ie(), f = s ? "sm" : d ?? g.size, [h, m] = z(null), [b, y] = z(!0), [v, k] = z(/* @__PURE__ */ new Set()), w = (D) => {
22621
+ D.sortable && (h === D.key ? y((P) => !P) : (m(D.key), y(!0)));
22622
+ }, S = (D, P) => {
22623
+ P.stopPropagation(), k((T) => {
22621
22624
  const O = new Set(T);
22622
- return O.has(L) ? O.delete(L) : O.add(L), O;
22625
+ return O.has(D) ? O.delete(D) : O.add(D), O;
22623
22626
  });
22624
- }, _ = h ? [...e].sort((L, B) => {
22625
- const T = L[h], O = B[h], W = String(T ?? "").localeCompare(String(O ?? ""));
22627
+ }, _ = h ? [...e].sort((D, P) => {
22628
+ const T = D[h], O = P[h], W = String(T ?? "").localeCompare(String(O ?? ""));
22626
22629
  return b ? W : -W;
22627
- }) : e, E = (i ? "28px " : "") + t.map((L) => typeof L.width == "number" ? `${L.width}px` : L.width ?? "1fr").join(" "), N = lt.table[f], R = `${Math.round((N - 16) / 2)}px 12px`, P = Oe[f], D = !!i;
22630
+ }) : e, E = (i ? "28px " : "") + t.map((D) => typeof D.width == "number" ? `${D.width}px` : D.width ?? "1fr").join(" "), N = lt.table[f], R = `${Math.round((N - 16) / 2)}px 12px`, B = Oe[f], M = !!i;
22628
22631
  return /* @__PURE__ */ x(
22629
22632
  "div",
22630
22633
  {
@@ -22643,7 +22646,7 @@ function KS({
22643
22646
  // of its real ~170-214px content height) — instead of the page
22644
22647
  // scrolling normally like every other settings panel. Refusing to
22645
22648
  // shrink here restores that normal behavior.
22646
- ...D ? {} : { maxHeight: u, display: "flex", flexDirection: "column", flexShrink: 0 }
22649
+ ...M ? {} : { maxHeight: u, display: "flex", flexDirection: "column", flexShrink: 0 }
22647
22650
  },
22648
22651
  children: [
22649
22652
  /* @__PURE__ */ x("div", { style: {
@@ -22654,10 +22657,10 @@ function KS({
22654
22657
  flexShrink: 0
22655
22658
  }, children: [
22656
22659
  i && /* @__PURE__ */ o("div", {}),
22657
- t.map((L) => /* @__PURE__ */ x(
22660
+ t.map((D) => /* @__PURE__ */ x(
22658
22661
  "div",
22659
22662
  {
22660
- onClick: () => w(L),
22663
+ onClick: () => w(D),
22661
22664
  style: {
22662
22665
  padding: R,
22663
22666
  fontSize: "10px",
@@ -22665,37 +22668,37 @@ function KS({
22665
22668
  textTransform: "uppercase",
22666
22669
  letterSpacing: "0.06em",
22667
22670
  color: "var(--color-text-muted)",
22668
- cursor: L.sortable ? "pointer" : "default",
22671
+ cursor: D.sortable ? "pointer" : "default",
22669
22672
  display: "flex",
22670
22673
  alignItems: "center",
22671
22674
  // text-align has no effect on a flex item — justify-content is
22672
22675
  // the actual axis-alignment property for a flex container's
22673
22676
  // children, which is what col.align needs to drive here.
22674
- justifyContent: L.align === "right" ? "flex-end" : L.align === "center" ? "center" : "flex-start",
22677
+ justifyContent: D.align === "right" ? "flex-end" : D.align === "center" ? "center" : "flex-start",
22675
22678
  gap: "4px",
22676
22679
  userSelect: "none"
22677
22680
  },
22678
22681
  children: [
22679
- L.label,
22680
- L.sortable && h === L.key && (b ? /* @__PURE__ */ o(rt, { size: 10 }) : /* @__PURE__ */ o(Pe, { size: 10, style: { transform: "rotate(-90deg)" } }))
22682
+ D.label,
22683
+ D.sortable && h === D.key && (b ? /* @__PURE__ */ o(rt, { size: 10 }) : /* @__PURE__ */ o(Pe, { size: 10, style: { transform: "rotate(-90deg)" } }))
22681
22684
  ]
22682
22685
  },
22683
- L.key
22686
+ D.key
22684
22687
  ))
22685
22688
  ] }),
22686
- /* @__PURE__ */ o("div", { style: D ? {} : { flex: "1 1 auto", overflowY: "auto" }, children: _.length === 0 ? /* @__PURE__ */ o(p0, { title: a, message: l, compact: !0 }) : _.map((L, B) => {
22687
- const T = String(L[n] ?? B), O = v.has(T), W = c && B % 2 === 1 ? "var(--color-table-stripe)" : "transparent";
22689
+ /* @__PURE__ */ o("div", { style: M ? {} : { flex: "1 1 auto", overflowY: "auto" }, children: _.length === 0 ? /* @__PURE__ */ o(p0, { title: a, message: l, compact: !0 }) : _.map((D, P) => {
22690
+ const T = String(D[n] ?? P), O = v.has(T), W = c && P % 2 === 1 ? "var(--color-table-stripe)" : "transparent";
22688
22691
  return /* @__PURE__ */ x(
22689
22692
  "div",
22690
22693
  {
22691
22694
  style: {
22692
- borderBottom: B < _.length - 1 ? "1px solid var(--color-surface-border)" : "none"
22695
+ borderBottom: P < _.length - 1 ? "1px solid var(--color-surface-border)" : "none"
22693
22696
  },
22694
22697
  children: [
22695
22698
  /* @__PURE__ */ x(
22696
22699
  "div",
22697
22700
  {
22698
- onClick: () => r == null ? void 0 : r(L),
22701
+ onClick: () => r == null ? void 0 : r(D),
22699
22702
  className: `dui_data-table__row${r || i ? " dui_data-table__row--clickable" : ""}`,
22700
22703
  style: {
22701
22704
  display: "grid",
@@ -22733,7 +22736,7 @@ function KS({
22733
22736
  {
22734
22737
  style: {
22735
22738
  padding: R,
22736
- fontSize: P,
22739
+ fontSize: B,
22737
22740
  color: "var(--color-text-secondary)",
22738
22741
  display: "flex",
22739
22742
  alignItems: "center",
@@ -22745,7 +22748,7 @@ function KS({
22745
22748
  whiteSpace: "nowrap",
22746
22749
  textOverflow: "ellipsis"
22747
22750
  },
22748
- children: $.renderCell ? $.renderCell(L, L[$.key]) : /* @__PURE__ */ o("span", { style: { overflow: "hidden", textOverflow: "ellipsis" }, children: String(L[$.key] ?? "—") })
22751
+ children: $.renderCell ? $.renderCell(D, D[$.key]) : /* @__PURE__ */ o("span", { style: { overflow: "hidden", textOverflow: "ellipsis" }, children: String(D[$.key] ?? "—") })
22749
22752
  },
22750
22753
  $.key
22751
22754
  ))
@@ -22755,7 +22758,7 @@ function KS({
22755
22758
  i && O && /* @__PURE__ */ o("div", { style: {
22756
22759
  background: "color-mix(in srgb, var(--color-text-primary) 3%, transparent)",
22757
22760
  borderTop: "1px solid var(--color-surface-border)"
22758
- }, children: i(L) })
22761
+ }, children: i(D) })
22759
22762
  ]
22760
22763
  },
22761
22764
  T
@@ -22857,7 +22860,7 @@ function jS({
22857
22860
  className: u,
22858
22861
  style: p
22859
22862
  }) {
22860
- const g = ue(() => v0(t, e), [t, e]), f = ue(() => w0(g), [g]), h = `${Math.max(2, String(g.length).length)}ch`, [m, b] = z(50), [y, v] = z(!1), k = M(null), w = se((I) => {
22863
+ const g = ue(() => v0(t, e), [t, e]), f = ue(() => w0(g), [g]), h = `${Math.max(2, String(g.length).length)}ch`, [m, b] = z(50), [y, v] = z(!1), k = L(null), w = se((I) => {
22861
22864
  var R;
22862
22865
  const E = (R = k.current) == null ? void 0 : R.getBoundingClientRect();
22863
22866
  if (!E || E.width === 0) return;
@@ -23578,8 +23581,8 @@ function o_({
23578
23581
  className: b = "",
23579
23582
  style: y
23580
23583
  }) {
23581
- const v = An(m), [k, w] = z(i), [S, _] = z(() => c !== void 0 ? new Set(c) : new Set(t.filter((X) => X.isGroup).map((X) => X.id))), [I, E] = z(""), [N, R] = z(() => /* @__PURE__ */ new Set()), P = a !== void 0, D = P ? a : k, L = p || "var(--color-primary)", B = I.trim(), T = B.length > 0, O = parseInt(v.itemHeight, 10), W = Math.max(O - 6, 24), $ = ue(() => eo(t), [t]), A = ue(() => no(t, B), [t, B]), H = ue(() => eo(A), [A]), G = (X) => {
23582
- P || w(X), l == null || l(X);
23584
+ const v = An(m), [k, w] = z(i), [S, _] = z(() => c !== void 0 ? new Set(c) : new Set(t.filter((X) => X.isGroup).map((X) => X.id))), [I, E] = z(""), [N, R] = z(() => /* @__PURE__ */ new Set()), B = a !== void 0, M = B ? a : k, D = p || "var(--color-primary)", P = I.trim(), T = P.length > 0, O = parseInt(v.itemHeight, 10), W = Math.max(O - 6, 24), $ = ue(() => eo(t), [t]), A = ue(() => no(t, P), [t, P]), H = ue(() => eo(A), [A]), G = (X) => {
23585
+ B || w(X), l == null || l(X);
23583
23586
  }, te = (X) => {
23584
23587
  _((pe) => {
23585
23588
  const V = new Set(pe);
@@ -23596,18 +23599,18 @@ function o_({
23596
23599
  });
23597
23600
  }, he = (X, pe = 0) => {
23598
23601
  const V = X.id === e, xe = p ? `color-mix(in srgb, ${p} 18%, transparent)` : "var(--color-sidenav-active-bg)", ke = p ?? "var(--color-sidenav-active-text)", Ce = No(X), Te = Ce && Z(X), at = Ce && !V && to(X, e), tt = pe * $0;
23599
- if (Ce && D)
23602
+ if (Ce && M)
23600
23603
  return /* @__PURE__ */ o("div", { children: (X.children ?? []).map((oe) => he(oe, pe)) }, X.id);
23601
23604
  const j = /* @__PURE__ */ x(
23602
23605
  "div",
23603
23606
  {
23604
- title: D ? X.label : void 0,
23607
+ title: M ? X.label : void 0,
23605
23608
  onClick: () => Ce ? de(X) : n == null ? void 0 : n(X.id),
23606
23609
  "data-nav-id": X.id,
23607
23610
  role: Ce ? "button" : void 0,
23608
23611
  "aria-expanded": Ce ? Te : void 0,
23609
23612
  className: `dui_side-nav__item${V ? " dui_side-nav__item--active" : ""}${Ce ? " dui_side-nav__item--branch" : ""}`,
23610
- style: D ? {
23613
+ style: M ? {
23611
23614
  display: "flex",
23612
23615
  alignItems: "center",
23613
23616
  justifyContent: "center",
@@ -23638,9 +23641,9 @@ function o_({
23638
23641
  justifyContent: "center",
23639
23642
  width: v.iconSize,
23640
23643
  /* A branch's pages sit a step below it: the icon a little smaller… */
23641
- ...pe > 0 && !D ? { transform: "scale(0.86)", opacity: V ? 1 : 0.9 } : {}
23644
+ ...pe > 0 && !M ? { transform: "scale(0.86)", opacity: V ? 1 : 0.9 } : {}
23642
23645
  }, children: X.icon }),
23643
- !D && /* @__PURE__ */ x(ve, { children: [
23646
+ !M && /* @__PURE__ */ x(ve, { children: [
23644
23647
  /* @__PURE__ */ o("span", { style: {
23645
23648
  /* …and the name a pixel smaller. */
23646
23649
  flex: 1,
@@ -23654,8 +23657,8 @@ function o_({
23654
23657
  fontSize: "10px",
23655
23658
  padding: "1px 5px",
23656
23659
  borderRadius: 99,
23657
- background: `color-mix(in srgb, ${L} 15%, transparent)`,
23658
- color: L,
23660
+ background: `color-mix(in srgb, ${D} 15%, transparent)`,
23661
+ color: D,
23659
23662
  fontWeight: 600,
23660
23663
  flexShrink: 0
23661
23664
  }, children: X.badge }),
@@ -23683,7 +23686,7 @@ function o_({
23683
23686
  }, Ae = (X) => {
23684
23687
  var Ce;
23685
23688
  const pe = S.has(X.id), V = ((Ce = X.children) == null ? void 0 : Ce.length) ?? 0, xe = T ? V : X.count ?? V, ke = X.children ?? [];
23686
- return D ? /* @__PURE__ */ o("div", { style: { marginBottom: 8 }, children: ke.map((Te) => he(Te)) }, X.id) : /* @__PURE__ */ x("div", { style: { marginBottom: 4 }, children: [
23689
+ return M ? /* @__PURE__ */ o("div", { style: { marginBottom: 8 }, children: ke.map((Te) => he(Te)) }, X.id) : /* @__PURE__ */ x("div", { style: { marginBottom: 4 }, children: [
23687
23690
  /* @__PURE__ */ x(
23688
23691
  "button",
23689
23692
  {
@@ -23737,8 +23740,8 @@ function o_({
23737
23740
  {
23738
23741
  className: b,
23739
23742
  style: {
23740
- width: D ? d : u ? "100%" : s,
23741
- minWidth: D ? d : u ? void 0 : s,
23743
+ width: M ? d : u ? "100%" : s,
23744
+ minWidth: M ? d : u ? void 0 : s,
23742
23745
  height: "100%",
23743
23746
  display: "flex",
23744
23747
  flexDirection: "column",
@@ -23749,7 +23752,7 @@ function o_({
23749
23752
  ...y
23750
23753
  },
23751
23754
  children: [
23752
- g && !D && /* @__PURE__ */ o("div", { style: { padding: "10px 10px 8px", flexShrink: 0 }, children: /* @__PURE__ */ x("div", { style: {
23755
+ g && !M && /* @__PURE__ */ o("div", { style: { padding: "10px 10px 8px", flexShrink: 0 }, children: /* @__PURE__ */ x("div", { style: {
23753
23756
  display: "flex",
23754
23757
  alignItems: "center",
23755
23758
  gap: 6,
@@ -23814,7 +23817,7 @@ function o_({
23814
23817
  /* @__PURE__ */ x("div", { style: {
23815
23818
  flex: 1,
23816
23819
  overflowY: "auto",
23817
- padding: D ? "4px 4px 16px" : "4px 6px 16px"
23820
+ padding: M ? "4px 4px 16px" : "4px 6px 16px"
23818
23821
  }, children: [
23819
23822
  A.map(Ee),
23820
23823
  T && H === 0 && /* @__PURE__ */ o("div", { style: {
@@ -23824,7 +23827,7 @@ function o_({
23824
23827
  textAlign: "center"
23825
23828
  }, children: h })
23826
23829
  ] }),
23827
- r && !P && /* @__PURE__ */ o("div", { style: {
23830
+ r && !B && /* @__PURE__ */ o("div", { style: {
23828
23831
  borderTop: "1px solid var(--color-panel-border)",
23829
23832
  display: "flex",
23830
23833
  alignItems: "center",
@@ -23834,7 +23837,7 @@ function o_({
23834
23837
  "button",
23835
23838
  {
23836
23839
  type: "button",
23837
- onClick: () => G(!D),
23840
+ onClick: () => G(!M),
23838
23841
  className: "dui_side-nav__collapse-btn",
23839
23842
  style: {
23840
23843
  display: "flex",
@@ -23849,8 +23852,8 @@ function o_({
23849
23852
  color: "var(--color-text-muted)",
23850
23853
  cursor: "pointer"
23851
23854
  },
23852
- title: D ? "Expand sidebar" : "Collapse sidebar",
23853
- children: D ? /* @__PURE__ */ o(_a, { size: 14 }) : /* @__PURE__ */ o(Sa, { size: 14 })
23855
+ title: M ? "Expand sidebar" : "Collapse sidebar",
23856
+ children: M ? /* @__PURE__ */ o(_a, { size: 14 }) : /* @__PURE__ */ o(Sa, { size: 14 })
23854
23857
  }
23855
23858
  ) })
23856
23859
  ]
@@ -23945,16 +23948,16 @@ function Ml({
23945
23948
  enableItemDrag: E,
23946
23949
  getItemId: N,
23947
23950
  onItemDragStart: R,
23948
- onItemDragOver: P,
23949
- onItemDrop: D,
23950
- inlineCreate: L,
23951
- onInlineCreateCommit: B,
23951
+ onItemDragOver: B,
23952
+ onItemDrop: M,
23953
+ inlineCreate: D,
23954
+ onInlineCreateCommit: P,
23952
23955
  onInlineCreateCancel: T,
23953
23956
  renamingNodeId: O,
23954
23957
  onRenameDone: W
23955
23958
  }) {
23956
23959
  var j, oe, q, be, Re;
23957
- const $ = r.has(t.id), A = ((j = t.data) == null ? void 0 : j.color) || g, [H, G] = z(!1), [te, Z] = z(t.label), de = M(null);
23960
+ const $ = r.has(t.id), A = ((j = t.data) == null ? void 0 : j.color) || g, [H, G] = z(!1), [te, Z] = z(t.label), de = L(null);
23958
23961
  U(() => {
23959
23962
  O === t.id && p && (Z(t.label), G(!0), setTimeout(() => {
23960
23963
  var ee;
@@ -24048,12 +24051,12 @@ function Ml({
24048
24051
  ),
24049
24052
  /* @__PURE__ */ o(En, { show: V === "after" && !$, color: A }),
24050
24053
  $ && /* @__PURE__ */ x("div", { style: { marginLeft: e > 0 ? 12 : 0, borderLeft: e > 0 ? "1px solid var(--color-surface-border)" : "none" }, children: [
24051
- (L == null ? void 0 : L.parentId) === t.id && /* @__PURE__ */ o(
24054
+ (D == null ? void 0 : D.parentId) === t.id && /* @__PURE__ */ o(
24052
24055
  Al,
24053
24056
  {
24054
24057
  depth: e + 1,
24055
24058
  indentPx: f,
24056
- onCommit: (ee) => B == null ? void 0 : B(t.id, ee),
24059
+ onCommit: (ee) => P == null ? void 0 : P(t.id, ee),
24057
24060
  onCancel: () => T == null ? void 0 : T()
24058
24061
  }
24059
24062
  ),
@@ -24087,10 +24090,10 @@ function Ml({
24087
24090
  enableItemDrag: E,
24088
24091
  getItemId: N,
24089
24092
  onItemDragStart: R,
24090
- onItemDragOver: P,
24091
- onItemDrop: D,
24092
- inlineCreate: L,
24093
- onInlineCreateCommit: B,
24093
+ onItemDragOver: B,
24094
+ onItemDrop: M,
24095
+ inlineCreate: D,
24096
+ onInlineCreateCommit: P,
24094
24097
  onInlineCreateCancel: T
24095
24098
  },
24096
24099
  ee.id
@@ -24110,9 +24113,9 @@ function Ml({
24110
24113
  accentColor: g,
24111
24114
  renderItem: u,
24112
24115
  onDragStart: R,
24113
- onDragOver: P,
24116
+ onDragOver: B,
24114
24117
  onDragLeave: S,
24115
- onDrop: D,
24118
+ onDrop: M,
24116
24119
  onDragEnd: I
24117
24120
  },
24118
24121
  Xe
@@ -24173,14 +24176,14 @@ function i_({
24173
24176
  onInlineCreateCommit: E,
24174
24177
  onInlineCreateCancel: N,
24175
24178
  renamingNodeId: R,
24176
- onRenameDone: P
24179
+ onRenameDone: B
24177
24180
  }) {
24178
- const [D, L] = z(a ?? /* @__PURE__ */ new Set()), B = l ?? D, T = se((q) => {
24181
+ const [M, D] = z(a ?? /* @__PURE__ */ new Set()), P = l ?? M, T = se((q) => {
24179
24182
  if (c) {
24180
24183
  c(q);
24181
24184
  return;
24182
24185
  }
24183
- L((be) => {
24186
+ D((be) => {
24184
24187
  const Re = new Set(be);
24185
24188
  return Re.has(q) ? Re.delete(q) : Re.add(q), Re;
24186
24189
  });
@@ -24234,7 +24237,7 @@ function i_({
24234
24237
  if (t.length === 0 && !I)
24235
24238
  return /* @__PURE__ */ o("div", { style: { padding: "24px 12px", textAlign: "center", fontSize: 12, color: "var(--color-text-muted)" }, children: g });
24236
24239
  const oe = {
24237
- expandedIds: B,
24240
+ expandedIds: P,
24238
24241
  toggleExpand: T,
24239
24242
  folderActions: n,
24240
24243
  onFolderClick: u,
@@ -24264,7 +24267,7 @@ function i_({
24264
24267
  onInlineCreateCommit: E,
24265
24268
  onInlineCreateCancel: N,
24266
24269
  renamingNodeId: R,
24267
- onRenameDone: P
24270
+ onRenameDone: B
24268
24271
  };
24269
24272
  return /* @__PURE__ */ x("div", { className: f, children: [
24270
24273
  (I == null ? void 0 : I.parentId) === null && /* @__PURE__ */ o(
@@ -24886,7 +24889,7 @@ function c_({
24886
24889
  className: l = "",
24887
24890
  style: c
24888
24891
  }) {
24889
- const [s, d] = z(r), u = M(null), p = M(!0), g = e || "var(--color-primary)", f = n.filter((m) => m.enabled).length, h = a !== void 0;
24892
+ const [s, d] = z(r), u = L(null), p = L(!0), g = e || "var(--color-primary)", f = n.filter((m) => m.enabled).length, h = a !== void 0;
24890
24893
  return zn(() => {
24891
24894
  const m = u.current;
24892
24895
  m && (m.style.transition = "none", m.style.height = r ? "auto" : "0px", m.style.overflow = "hidden", requestAnimationFrame(() => {
@@ -25008,7 +25011,7 @@ function d_({
25008
25011
  disabled: l = !1,
25009
25012
  className: c = ""
25010
25013
  }) {
25011
- const [s, d] = z(""), u = M(null), p = !l && (!a || e.length < a), g = (m) => {
25014
+ const [s, d] = z(""), u = L(null), p = !l && (!a || e.length < a), g = (m) => {
25012
25015
  const b = m.trim();
25013
25016
  !b || e.includes(b) || !p || (n([...e, b]), d(""));
25014
25017
  }, f = (m) => {
@@ -25124,7 +25127,7 @@ function u_({
25124
25127
  className: l = ""
25125
25128
  }) {
25126
25129
  var S, _;
25127
- const [c, s] = z(((S = t[0]) == null ? void 0 : S.id) ?? ""), [d, u] = z(e), [p, g] = z(i), [f, h] = z(!1), m = M(0), b = M(e), y = a || "var(--color-primary)", v = se((I) => {
25130
+ const [c, s] = z(((S = t[0]) == null ? void 0 : S.id) ?? ""), [d, u] = z(e), [p, g] = z(i), [f, h] = z(!1), m = L(0), b = L(e), y = a || "var(--color-primary)", v = se((I) => {
25128
25131
  if (!f) return;
25129
25132
  const E = m.current - I.clientY, N = Math.max(n, Math.min(r, b.current + E));
25130
25133
  u(N);
@@ -25256,7 +25259,7 @@ const U0 = {
25256
25259
  "bottom-center": { bottom: 16, left: "50%", transform: "translateX(-50%)" }
25257
25260
  };
25258
25261
  function V0({ toast: t, onDismiss: e }) {
25259
- const n = U0[t.variant], r = M(void 0);
25262
+ const n = U0[t.variant], r = L(void 0);
25260
25263
  return U(() => {
25261
25264
  const i = t.duration ?? 4e3;
25262
25265
  return i > 0 && (r.current = setTimeout(() => e(t.id), i)), () => {
@@ -25331,7 +25334,7 @@ function p_({ toasts: t, onDismiss: e, position: n = "bottom-right" }) {
25331
25334
  );
25332
25335
  }
25333
25336
  function f_() {
25334
- const t = M([]), e = M([]), n = (l) => (e.current.push(l), () => {
25337
+ const t = L([]), e = L([]), n = (l) => (e.current.push(l), () => {
25335
25338
  e.current = e.current.filter((c) => c !== l);
25336
25339
  }), r = () => e.current.forEach((l) => l([...t.current]));
25337
25340
  return { subscribe: n, toast: (l, c, s, d) => {
@@ -25716,7 +25719,7 @@ function j0({ text: t }) {
25716
25719
  }, children: n }, r) : /* @__PURE__ */ o("span", { children: n }, r)) });
25717
25720
  }
25718
25721
  function Y0({ value: t, onChange: e, accent: n, minHeight: r = 220 }) {
25719
- const i = M(null), a = M(null), [l, c] = z(!1), s = se(() => {
25722
+ const i = L(null), a = L(null), [l, c] = z(!1), s = se(() => {
25720
25723
  i.current && a.current && (a.current.scrollTop = i.current.scrollTop, a.current.scrollLeft = i.current.scrollLeft);
25721
25724
  }, []), d = (t + `
25722
25725
  `).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(
@@ -26366,25 +26369,25 @@ function v_({
26366
26369
  maxSuggestions: b = 8,
26367
26370
  suggestionZIndex: y = 1e4
26368
26371
  }) {
26369
- const v = e.length > 0, k = M(null), [w, S] = z(!1), [_, I] = z(-1), [E, N] = z(!1), [R, P] = z({ top: 0, left: 0, width: 0 }), D = ue(() => {
26372
+ const v = e.length > 0, k = L(null), [w, S] = z(!1), [_, I] = z(-1), [E, N] = z(!1), [R, B] = z({ top: 0, left: 0, width: 0 }), M = ue(() => {
26370
26373
  const O = (p ?? []).map(Z0).filter((A) => A.value.trim()), W = e.trim().toLowerCase();
26371
26374
  return (W ? O.filter((A) => A.value.toLowerCase().includes(W) && A.value !== e) : O).slice(0, b);
26372
- }, [p, e, b]), L = w && !E && D.length > 0;
26375
+ }, [p, e, b]), D = w && !E && M.length > 0;
26373
26376
  U(() => {
26374
- if (!L) return;
26377
+ if (!D) return;
26375
26378
  const O = () => {
26376
26379
  const W = k.current;
26377
26380
  if (!W) return;
26378
26381
  const $ = W.getBoundingClientRect();
26379
- P({ top: $.bottom + 4, left: $.left, width: $.width });
26382
+ B({ top: $.bottom + 4, left: $.left, width: $.width });
26380
26383
  };
26381
26384
  return O(), window.addEventListener("scroll", O, { passive: !0, capture: !0 }), window.addEventListener("resize", O, { passive: !0 }), () => {
26382
26385
  window.removeEventListener("scroll", O, { capture: !0 }), window.removeEventListener("resize", O);
26383
26386
  };
26384
- }, [L, D.length]), U(() => {
26387
+ }, [D, M.length]), U(() => {
26385
26388
  I(-1), N(!1);
26386
26389
  }, [e]);
26387
- const B = (O) => {
26390
+ const P = (O) => {
26388
26391
  I(-1), N(!0), f ? f(O) : (n(O), r == null || r(O));
26389
26392
  };
26390
26393
  return /* @__PURE__ */ x("div", { ref: k, style: { position: "relative", width: c }, children: [
@@ -26403,22 +26406,22 @@ function v_({
26403
26406
  },
26404
26407
  onBlur: () => window.setTimeout(() => S(!1), 90),
26405
26408
  onKeyDown: (O) => {
26406
- if (L && (O.key === "ArrowDown" || O.key === "ArrowUp")) {
26409
+ if (D && (O.key === "ArrowDown" || O.key === "ArrowUp")) {
26407
26410
  O.preventDefault();
26408
26411
  const W = O.key === "ArrowDown" ? 1 : -1;
26409
26412
  I(($) => {
26410
26413
  const A = $ + W;
26411
- return A < 0 ? D.length - 1 : A >= D.length ? 0 : A;
26414
+ return A < 0 ? M.length - 1 : A >= M.length ? 0 : A;
26412
26415
  });
26413
26416
  return;
26414
26417
  }
26415
- if (O.key === "Escape" && L) {
26418
+ if (O.key === "Escape" && D) {
26416
26419
  O.preventDefault(), O.stopPropagation(), I(-1), N(!0);
26417
26420
  return;
26418
26421
  }
26419
26422
  if (O.key === "Enter") {
26420
- if (O.preventDefault(), L && _ >= 0) {
26421
- B(D[_].value);
26423
+ if (O.preventDefault(), D && _ >= 0) {
26424
+ P(M[_].value);
26422
26425
  return;
26423
26426
  }
26424
26427
  r == null || r(e);
@@ -26456,7 +26459,7 @@ function v_({
26456
26459
  ] }) : void 0
26457
26460
  }
26458
26461
  ),
26459
- L && Se(
26462
+ D && Se(
26460
26463
  /* @__PURE__ */ x(
26461
26464
  "div",
26462
26465
  {
@@ -26531,13 +26534,13 @@ function v_({
26531
26534
  }
26532
26535
  )
26533
26536
  ] }),
26534
- /* @__PURE__ */ o("div", { style: { padding: "4px 3px 3px", maxHeight: 280, overflowY: "auto" }, children: D.map((O, W) => /* @__PURE__ */ x(
26537
+ /* @__PURE__ */ o("div", { style: { padding: "4px 3px 3px", maxHeight: 280, overflowY: "auto" }, children: M.map((O, W) => /* @__PURE__ */ x(
26535
26538
  "div",
26536
26539
  {
26537
26540
  role: "option",
26538
26541
  "aria-selected": W === _,
26539
26542
  onMouseDown: ($) => {
26540
- $.preventDefault(), B(O.value);
26543
+ $.preventDefault(), P(O.value);
26541
26544
  },
26542
26545
  onMouseEnter: () => I(W),
26543
26546
  style: {
@@ -27226,7 +27229,7 @@ function T_({
27226
27229
  className: l = ""
27227
27230
  }) {
27228
27231
  var _;
27229
- const c = Ue(i), [s, d] = z(() => e === 0 ? "ms" : e >= 36e5 && e % 36e5 === 0 ? "hr" : e >= 6e4 && e % 6e4 === 0 ? "m" : e >= 1e3 && e % 1e3 === 0 ? "s" : "ms"), [u, p] = z(!1), [g, f] = z({ top: 0, left: 0 }), h = M(null), m = M(null), b = e === 0 ? "" : String(Math.round(e / Ti[s])), y = se((I) => {
27232
+ const c = Ue(i), [s, d] = z(() => e === 0 ? "ms" : e >= 36e5 && e % 36e5 === 0 ? "hr" : e >= 6e4 && e % 6e4 === 0 ? "m" : e >= 1e3 && e % 1e3 === 0 ? "s" : "ms"), [u, p] = z(!1), [g, f] = z({ top: 0, left: 0 }), h = L(null), m = L(null), b = e === 0 ? "" : String(Math.round(e / Ti[s])), y = se((I) => {
27230
27233
  const E = I.target.value;
27231
27234
  if (E === "" || E === "0") {
27232
27235
  n(0);
@@ -27244,8 +27247,8 @@ function T_({
27244
27247
  U(() => {
27245
27248
  if (!u) return;
27246
27249
  const I = (N) => {
27247
- var R, P;
27248
- !((R = h.current) != null && R.contains(N.target)) && !((P = m.current) != null && P.contains(N.target)) && p(!1);
27250
+ var R, B;
27251
+ !((R = h.current) != null && R.contains(N.target)) && !((B = m.current) != null && B.contains(N.target)) && p(!1);
27249
27252
  }, E = () => p(!1);
27250
27253
  return document.addEventListener("mousedown", I), document.addEventListener("scroll", E, !0), () => {
27251
27254
  document.removeEventListener("mousedown", I), document.removeEventListener("scroll", E, !0);
@@ -27356,12 +27359,12 @@ function $_({
27356
27359
  size: l = "md",
27357
27360
  accentColor: c
27358
27361
  }) {
27359
- const [s, d] = z(!1), [u, p] = z(-1), g = M(null), f = M(null), [h, m] = z({ top: 0, left: 0, minWidth: 0 }), b = je(l), y = c || (n === "danger" ? "var(--color-error)" : n === "primary" ? "var(--color-primary)" : "var(--color-surface-hover)"), v = n === "secondary" ? "var(--color-text-primary)" : n === "danger" ? "var(--color-btn-danger-text, #fff)" : "var(--color-btn-primary-text, #fff)", k = parseInt(b.height, 10), w = b.fontSize, S = n === "secondary" ? "var(--color-surface-border)" : "rgba(255,255,255,0.22)";
27362
+ const [s, d] = z(!1), [u, p] = z(-1), g = L(null), f = L(null), [h, m] = z({ top: 0, left: 0, minWidth: 0 }), b = je(l), y = c || (n === "danger" ? "var(--color-error)" : n === "primary" ? "var(--color-primary)" : "var(--color-surface-hover)"), v = n === "secondary" ? "var(--color-text-primary)" : n === "danger" ? "var(--color-btn-danger-text, #fff)" : "var(--color-btn-primary-text, #fff)", k = parseInt(b.height, 10), w = b.fontSize, S = n === "secondary" ? "var(--color-surface-border)" : "rgba(255,255,255,0.22)";
27360
27363
  U(() => {
27361
27364
  if (!s) return;
27362
27365
  const E = (N) => {
27363
- var R, P;
27364
- (R = g.current) != null && R.contains(N.target) || (P = f.current) != null && P.contains(N.target) || d(!1);
27366
+ var R, B;
27367
+ (R = g.current) != null && R.contains(N.target) || (B = f.current) != null && B.contains(N.target) || d(!1);
27365
27368
  };
27366
27369
  return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
27367
27370
  }, [s]), U(() => {
@@ -27538,7 +27541,7 @@ function iv({
27538
27541
  style: h,
27539
27542
  className: m = ""
27540
27543
  }) {
27541
- const b = Ue(p), y = g ?? parseInt(b.height, 10), v = Math.max(Math.round(13 * 1.2 * 10) / 10, 16), k = Math.max(0, (y - 2 - v) / 2), w = f ?? b.borderRadius, S = M(null), _ = M(!1), I = M(null), E = M(Fa()), N = M(!1), [R, P] = z(!1), [D, L] = z(!1), [B, T] = z(!1), [O, W] = z(0), [$, A] = z({ top: 0, left: 0, width: 0 }), H = u || "var(--color-accent, var(--color-primary))";
27544
+ const b = Ue(p), y = g ?? parseInt(b.height, 10), v = Math.max(Math.round(13 * 1.2 * 10) / 10, 16), k = Math.max(0, (y - 2 - v) / 2), w = f ?? b.borderRadius, S = L(null), _ = L(!1), I = L(null), E = L(Fa()), N = L(!1), [R, B] = z(!1), [M, D] = z(!1), [P, T] = z(!1), [O, W] = z(0), [$, A] = z({ top: 0, left: 0, width: 0 }), H = u || "var(--color-accent, var(--color-primary))";
27542
27545
  U(() => {
27543
27546
  const j = S.current;
27544
27547
  j && (j.innerHTML = Et(e), I.current = e, E.current.reset(e, e.length));
@@ -27553,13 +27556,13 @@ function iv({
27553
27556
  const q = S.current;
27554
27557
  q && (q.innerHTML = Et(j), nn(q, Math.min(oe, j.length)), I.current = j, n(j));
27555
27558
  }, [n]), { caret: te, syncCaret: Z, setCaret: de } = Ua(S, e.length), he = Va(e, te, l), Ae = e.slice(0, Math.min(te, e.length)).toLowerCase(), Ee = ue(
27556
- () => R && !B ? he.matches : [],
27557
- [R, B, he]
27559
+ () => R && !P ? he.matches : [],
27560
+ [R, P, he]
27558
27561
  ), X = ue(() => {
27559
- if (!R || B || !c.length) return [];
27562
+ if (!R || P || !c.length) return [];
27560
27563
  const j = c.filter((oe, q) => c.findIndex((be) => be.url === oe.url) === q);
27561
27564
  return Ae.trim() ? j.filter((oe) => oe.url.toLowerCase().includes(Ae) || oe.name.toLowerCase().includes(Ae)).slice(0, 8) : j.slice(0, 8);
27562
- }, [Ae, R, B, c]), pe = R && !B ? he.ghost : "";
27565
+ }, [Ae, R, P, c]), pe = R && !P ? he.ghost : "";
27563
27566
  U(() => {
27564
27567
  W(0);
27565
27568
  }, [Ee.length, X.length, e]), U(() => {
@@ -27575,7 +27578,7 @@ function iv({
27575
27578
  const ee = document.createRange();
27576
27579
  ee.selectNodeContents(oe), ee.collapse(!1), (q = window.getSelection()) == null || q.removeAllRanges(), (be = window.getSelection()) == null || be.addRange(ee);
27577
27580
  }
27578
- I.current = j, n(j), P(!1), (Re = S.current) == null || Re.focus();
27581
+ I.current = j, n(j), B(!1), (Re = S.current) == null || Re.focus();
27579
27582
  }, xe = se(() => {
27580
27583
  if (_.current) return;
27581
27584
  const j = S.current;
@@ -27630,7 +27633,7 @@ function iv({
27630
27633
  j.preventDefault();
27631
27634
  const oe = j.clipboardData.getData("text/plain");
27632
27635
  document.execCommand("insertText", !1, oe);
27633
- }, tt = R && !B && (Ee.length > 0 || X.length > 0);
27636
+ }, tt = R && !P && (Ee.length > 0 || X.length > 0);
27634
27637
  return /* @__PURE__ */ x("div", { className: `dui_highlighted-input ${m}`, style: h, children: [
27635
27638
  !e && !R && a && /* @__PURE__ */ o("span", { className: "dui_highlighted-input__placeholder", style: { lineHeight: `${y}px` }, children: a }),
27636
27639
  /* @__PURE__ */ o(
@@ -27647,10 +27650,10 @@ function iv({
27647
27650
  onMouseUp: Z,
27648
27651
  onPaste: at,
27649
27652
  onFocus: () => {
27650
- P(!0), T(!1), Z();
27653
+ B(!0), T(!1), Z();
27651
27654
  },
27652
27655
  onBlur: () => {
27653
- setTimeout(() => P(!1), 150), i == null || i();
27656
+ setTimeout(() => B(!1), 150), i == null || i();
27654
27657
  },
27655
27658
  onCompositionStart: () => {
27656
27659
  _.current = !0;
@@ -27659,12 +27662,12 @@ function iv({
27659
27662
  _.current = !1, xe();
27660
27663
  },
27661
27664
  "data-testid": t,
27662
- className: `dui_highlighted-input__editor${s ? " opacity-60" : ""}${d && !D ? " dui_highlighted-input__editor--masked" : ""}`,
27665
+ className: `dui_highlighted-input__editor${s ? " opacity-60" : ""}${d && !M ? " dui_highlighted-input__editor--masked" : ""}`,
27663
27666
  style: {
27664
27667
  height: y,
27665
27668
  // Not in React's CSS types; a real property in every Chromium,
27666
27669
  // which is the only engine a VS Code webview runs in.
27667
- ...d && !D ? { WebkitTextSecurity: "disc" } : {},
27670
+ ...d && !M ? { WebkitTextSecurity: "disc" } : {},
27668
27671
  paddingRight: d ? 30 : void 0,
27669
27672
  lineHeight: `${v}px`,
27670
27673
  paddingTop: k,
@@ -27680,8 +27683,8 @@ function iv({
27680
27683
  type: "button",
27681
27684
  tabIndex: -1,
27682
27685
  onMouseDown: (j) => j.preventDefault(),
27683
- onClick: () => L((j) => !j),
27684
- title: D ? "Hide value" : "Show value",
27686
+ onClick: () => D((j) => !j),
27687
+ title: M ? "Hide value" : "Show value",
27685
27688
  style: {
27686
27689
  position: "absolute",
27687
27690
  right: 8,
@@ -27697,7 +27700,7 @@ function iv({
27697
27700
  },
27698
27701
  onMouseEnter: (j) => j.currentTarget.style.color = "var(--color-text-primary)",
27699
27702
  onMouseLeave: (j) => j.currentTarget.style.color = "var(--color-text-muted)",
27700
- children: D ? /* @__PURE__ */ o(cn, { size: 14 }) : /* @__PURE__ */ o(dn, { size: 14 })
27703
+ children: M ? /* @__PURE__ */ o(cn, { size: 14 }) : /* @__PURE__ */ o(dn, { size: 14 })
27701
27704
  }
27702
27705
  ),
27703
27706
  /* @__PURE__ */ o(
@@ -27790,7 +27793,7 @@ function av({
27790
27793
  onConfirm: a,
27791
27794
  onCancel: l
27792
27795
  }) {
27793
- const c = M(null);
27796
+ const c = L(null);
27794
27797
  return U(() => {
27795
27798
  var d;
27796
27799
  (d = c.current) == null || d.focus();
@@ -28109,10 +28112,10 @@ function Mi({
28109
28112
  onEnabledChange: y,
28110
28113
  onRemove: v
28111
28114
  }) {
28112
- const [k, w] = z(!1), [S, _] = z(""), [I, E] = z(-1), [N, R] = z(!1), [P, D] = z(""), [L, B] = z(-1), T = M(null), O = M(null), W = M(null), $ = M(null), A = c || s && sv.includes(e.toLowerCase()), H = cv, G = g && !a && k ? lv.filter(
28115
+ const [k, w] = z(!1), [S, _] = z(""), [I, E] = z(-1), [N, R] = z(!1), [B, M] = z(""), [D, P] = z(-1), T = L(null), O = L(null), W = L(null), $ = L(null), A = c || s && sv.includes(e.toLowerCase()), H = cv, G = g && !a && k ? lv.filter(
28113
28116
  (V) => V.toLowerCase().includes((S || e).toLowerCase()) && V.toLowerCase() !== e.toLowerCase()
28114
28117
  ).slice(0, 8) : [], te = g && !a && N && e ? (H[e.toLowerCase()] || []).filter(
28115
- (V) => V.toLowerCase().includes((P || n).toLowerCase()) && V.toLowerCase() !== n.toLowerCase()
28118
+ (V) => V.toLowerCase().includes((B || n).toLowerCase()) && V.toLowerCase() !== n.toLowerCase()
28116
28119
  ).slice(0, 8) : [], Z = k && G.length > 0, de = N && te.length > 0;
28117
28120
  U(() => {
28118
28121
  if (!Z) return;
@@ -28130,11 +28133,11 @@ function Mi({
28130
28133
  const he = se((V) => {
28131
28134
  h == null || h(V), w(!1), _(""), E(-1);
28132
28135
  }, [h]), Ae = se((V) => {
28133
- m == null || m(V), R(!1), D(""), B(-1);
28136
+ m == null || m(V), R(!1), M(""), P(-1);
28134
28137
  }, [m]), Ee = se((V, xe) => {
28135
- const ke = xe === "key", Ce = ke ? Z : de, Te = ke ? G : te, at = ke ? I : L, tt = ke ? E : B, j = ke ? he : Ae, oe = ke ? w : R;
28138
+ const ke = xe === "key", Ce = ke ? Z : de, Te = ke ? G : te, at = ke ? I : D, tt = ke ? E : P, j = ke ? he : Ae, oe = ke ? w : R;
28136
28139
  Ce && (V.key === "ArrowDown" ? (V.preventDefault(), tt((q) => (q + 1) % Te.length)) : V.key === "ArrowUp" ? (V.preventDefault(), tt((q) => q <= 0 ? Te.length - 1 : q - 1)) : V.key === "Enter" && at >= 0 ? (V.preventDefault(), j(Te[at])) : V.key === "Escape" && (oe(!1), tt(-1)));
28137
- }, [Z, de, G, te, I, L, he, Ae]), X = u ? "grid-cols-[32px_1fr_1fr_1fr_32px]" : "grid-cols-[32px_1fr_1fr_32px]", pe = {
28140
+ }, [Z, de, G, te, I, D, he, Ae]), X = u ? "grid-cols-[32px_1fr_1fr_1fr_32px]" : "grid-cols-[32px_1fr_1fr_32px]", pe = {
28138
28141
  border: "1px dashed var(--color-input-border)",
28139
28142
  background: "color-mix(in srgb, var(--color-text-primary) 3%, transparent)",
28140
28143
  boxShadow: "none"
@@ -28208,11 +28211,11 @@ function Mi({
28208
28211
  placeholder: (p == null ? void 0 : p.value) ?? "Value",
28209
28212
  size: f,
28210
28213
  onChange: (V) => {
28211
- m == null || m(V), D(V), B(-1);
28214
+ m == null || m(V), M(V), P(-1);
28212
28215
  },
28213
28216
  onKeyDown: (V) => Ee(V, "val"),
28214
28217
  onBlur: () => setTimeout(() => {
28215
- R(!1), B(-1);
28218
+ R(!1), P(-1);
28216
28219
  }, 150),
28217
28220
  style: { width: "100%" }
28218
28221
  }
@@ -28228,13 +28231,13 @@ function Mi({
28228
28231
  style: { width: "100%", ...a ? pe : {} },
28229
28232
  color: a ? "var(--color-text-secondary)" : void 0,
28230
28233
  onChange: (V) => {
28231
- m == null || m(V.target.value), D(V.target.value), B(-1);
28234
+ m == null || m(V.target.value), M(V.target.value), P(-1);
28232
28235
  },
28233
28236
  onFocus: () => {
28234
- R(!0), D(n), B(-1);
28237
+ R(!0), M(n), P(-1);
28235
28238
  },
28236
28239
  onBlur: () => setTimeout(() => {
28237
- R(!1), B(-1);
28240
+ R(!1), P(-1);
28238
28241
  }, 150),
28239
28242
  onKeyDown: (V) => Ee(V, "val"),
28240
28243
  tabIndex: a ? -1 : void 0
@@ -28244,11 +28247,11 @@ function Mi({
28244
28247
  "button",
28245
28248
  {
28246
28249
  type: "button",
28247
- className: Ai(xe === L),
28250
+ className: Ai(xe === D),
28248
28251
  onMouseDown: (ke) => {
28249
28252
  ke.preventDefault(), Ae(V);
28250
28253
  },
28251
- onMouseEnter: () => B(xe),
28254
+ onMouseEnter: () => P(xe),
28252
28255
  children: V
28253
28256
  },
28254
28257
  V
@@ -28360,19 +28363,19 @@ function A_({
28360
28363
  pinnedTopRows: m,
28361
28364
  onPinnedRemove: b
28362
28365
  }) {
28363
- const [y, v] = z(!1), [k, w] = z(!1), [S, _] = z(!1), I = M(""), E = p || "var(--color-accent, var(--color-primary))", N = m && m.length > 0, R = (A, H, G) => {
28366
+ const [y, v] = z(!1), [k, w] = z(!1), [S, _] = z(!1), I = L(""), E = p || "var(--color-accent, var(--color-primary))", N = m && m.length > 0, R = (A, H, G) => {
28364
28367
  const te = [...e];
28365
28368
  te[A] = { ...te[A], [H]: G }, n(te);
28366
- }, P = () => n([...e, wn()]), D = (A) => {
28369
+ }, B = () => n([...e, wn()]), M = (A) => {
28367
28370
  const H = [...e];
28368
28371
  H.splice(A, 0, wn()), n(H);
28369
- }, L = (A) => {
28372
+ }, D = (A) => {
28370
28373
  if (e.length <= 1) {
28371
28374
  n([wn()]);
28372
28375
  return;
28373
28376
  }
28374
28377
  n(e.filter((H, G) => G !== A));
28375
- }, B = () => e.filter((A) => A.key || A.value).map((A) => `${A.enabled ? "" : "# "}${A.key}: ${A.value}`).join(`
28378
+ }, P = () => e.filter((A) => A.key || A.value).map((A) => `${A.enabled ? "" : "# "}${A.key}: ${A.value}`).join(`
28376
28379
  `), T = (A) => {
28377
28380
  const H = A.split(`
28378
28381
  `).map((G) => {
@@ -28444,12 +28447,12 @@ function A_({
28444
28447
  size: "md",
28445
28448
  tooltip: "Add new row",
28446
28449
  style: { "--hover-color": E, "--hover-bg": `color-mix(in srgb, ${E} 8%, transparent)` },
28447
- onClick: P
28450
+ onClick: B
28448
28451
  }
28449
28452
  )
28450
28453
  ] })
28451
28454
  ] }),
28452
- y ? /* @__PURE__ */ o(uv, { defaultValue: B(), onChangeRef: I, accentColor: p }) : /* @__PURE__ */ x(ve, { children: [
28455
+ y ? /* @__PURE__ */ o(uv, { defaultValue: P(), onChangeRef: I, accentColor: p }) : /* @__PURE__ */ x(ve, { children: [
28453
28456
  /* @__PURE__ */ x("div", { className: `grid ${$} gap-2 px-1 mb-1.5 items-center`, children: [
28454
28457
  /* @__PURE__ */ o("div", {}),
28455
28458
  /* @__PURE__ */ o("div", { className: "text-[var(--color-text-muted)] font-medium text-[10px] uppercase tracking-wide px-2.5", children: u || "Key" }),
@@ -28497,10 +28500,10 @@ function A_({
28497
28500
  onValueChange: (G) => R(H, "value", G),
28498
28501
  onDescriptionChange: (G) => R(H, "description", G),
28499
28502
  onEnabledChange: (G) => R(H, "enabled", G),
28500
- onRemove: () => L(H)
28503
+ onRemove: () => D(H)
28501
28504
  }
28502
28505
  ) }),
28503
- /* @__PURE__ */ o(dv, { onInsert: () => D(H + 1), accentColor: p })
28506
+ /* @__PURE__ */ o(dv, { onInsert: () => M(H + 1), accentColor: p })
28504
28507
  ] }, A.id)) })
28505
28508
  ] }),
28506
28509
  k && /* @__PURE__ */ o(
@@ -28531,7 +28534,7 @@ function pv() {
28531
28534
  );
28532
28535
  }
28533
28536
  function fv({ seg: t, dims: e, accent: n, disabled: r }) {
28534
- const [i, a] = z(!1), l = M(null), [c, s] = z({ top: 0, left: 0, width: 0 }), d = t.width ?? (e.height <= 26 ? 72 : e.height <= 34 ? 88 : 106), u = t.options.find((f) => f.value === t.value), p = (u == null ? void 0 : u.color) ?? "var(--color-text-primary)", g = () => {
28537
+ const [i, a] = z(!1), l = L(null), [c, s] = z({ top: 0, left: 0, width: 0 }), d = t.width ?? (e.height <= 26 ? 72 : e.height <= 34 ? 88 : 106), u = t.options.find((f) => f.value === t.value), p = (u == null ? void 0 : u.color) ?? "var(--color-text-primary)", g = () => {
28535
28538
  if (r) return;
28536
28539
  const f = l.current;
28537
28540
  if (!f) return;
@@ -28774,41 +28777,41 @@ function L_({
28774
28777
  onReset: f,
28775
28778
  resetTitle: h = "Reset view"
28776
28779
  }) {
28777
- const m = M(null), b = M({
28780
+ const m = L(null), b = L({
28778
28781
  dragging: !1,
28779
28782
  startX: 0,
28780
28783
  startY: 0,
28781
28784
  originLeft: 0,
28782
28785
  originTop: 0
28783
- }), y = M(!1), [v, k] = z(u), w = p ?? v, S = se((R) => {
28786
+ }), y = L(!1), [v, k] = z(u), w = p ?? v, S = se((R) => {
28784
28787
  p === void 0 && k(R), g == null || g(R);
28785
28788
  }, [p, g]), _ = se((R) => {
28786
- const P = b.current;
28787
- if (!P.dragging || !m.current) return;
28788
- const D = R.clientX - P.startX, L = c === "x" ? 0 : R.clientY - P.startY;
28789
- (Math.abs(D) > 3 || Math.abs(L) > 3) && (y.current = !0);
28790
- const B = m.current, T = Math.max(0, Math.min(window.innerWidth - B.offsetWidth, P.originLeft + D)), O = Math.max(0, Math.min(window.innerHeight - B.offsetHeight, P.originTop + L));
28791
- B.style.left = `${T}px`, B.style.top = `${O}px`, B.style.transform = "none";
28789
+ const B = b.current;
28790
+ if (!B.dragging || !m.current) return;
28791
+ const M = R.clientX - B.startX, D = c === "x" ? 0 : R.clientY - B.startY;
28792
+ (Math.abs(M) > 3 || Math.abs(D) > 3) && (y.current = !0);
28793
+ const P = m.current, T = Math.max(0, Math.min(window.innerWidth - P.offsetWidth, B.originLeft + M)), O = Math.max(0, Math.min(window.innerHeight - P.offsetHeight, B.originTop + D));
28794
+ P.style.left = `${T}px`, P.style.top = `${O}px`, P.style.transform = "none";
28792
28795
  }, [c]), I = se((R) => {
28793
- const P = b.current;
28794
- if (P.dragging) {
28795
- if (P.dragging = !1, document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", I), m.current) {
28796
- const D = m.current.getBoundingClientRect();
28797
- a == null || a(D.left, D.top);
28796
+ const B = b.current;
28797
+ if (B.dragging) {
28798
+ if (B.dragging = !1, document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", I), m.current) {
28799
+ const M = m.current.getBoundingClientRect();
28800
+ a == null || a(M.left, M.top);
28798
28801
  }
28799
28802
  w && !y.current && S(!1), R.stopPropagation();
28800
28803
  }
28801
28804
  }, [_, a, w, S]), E = se((R) => {
28802
28805
  if (!m.current) return;
28803
28806
  R.preventDefault();
28804
- const P = m.current, D = P.getBoundingClientRect();
28807
+ const B = m.current, M = B.getBoundingClientRect();
28805
28808
  y.current = !1, b.current = {
28806
28809
  dragging: !0,
28807
28810
  startX: R.clientX,
28808
28811
  startY: R.clientY,
28809
- originLeft: D.left,
28810
- originTop: D.top
28811
- }, P.style.position = "fixed", P.style.left = `${D.left}px`, P.style.top = `${D.top}px`, P.style.transform = "none", P.style.zIndex = "9999", document.addEventListener("mousemove", _), document.addEventListener("mouseup", I);
28812
+ originLeft: M.left,
28813
+ originTop: M.top
28814
+ }, B.style.position = "fixed", B.style.left = `${M.left}px`, B.style.top = `${M.top}px`, B.style.transform = "none", B.style.zIndex = "9999", document.addEventListener("mousemove", _), document.addEventListener("mouseup", I);
28812
28815
  }, [_, I]);
28813
28816
  U(() => () => {
28814
28817
  document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", I);
@@ -28872,18 +28875,18 @@ function L_({
28872
28875
  }
28873
28876
  ),
28874
28877
  t.map((R) => {
28875
- const P = R.dotColor !== void 0 || R.label !== void 0;
28878
+ const B = R.dotColor !== void 0 || R.label !== void 0;
28876
28879
  return /* @__PURE__ */ x("div", { style: { display: "contents" }, children: [
28877
28880
  R.separator && /* @__PURE__ */ o("div", { className: "dui_hud__sep" }),
28878
28881
  /* @__PURE__ */ x(
28879
28882
  "button",
28880
28883
  {
28881
28884
  type: "button",
28882
- className: `dui_hud__btn${P ? " dui_hud__btn--legend" : R.active ? " dui_hud__btn--active" : ""}`,
28885
+ className: `dui_hud__btn${B ? " dui_hud__btn--legend" : R.active ? " dui_hud__btn--active" : ""}`,
28883
28886
  onClick: R.onClick,
28884
28887
  disabled: R.disabled,
28885
28888
  title: R.title,
28886
- style: P ? {
28889
+ style: B ? {
28887
28890
  // disabled must win over the active/inactive dim —
28888
28891
  // this inline style previously only branched on
28889
28892
  // `active`, so a disabled-but-active legend item (e.g.
@@ -30759,7 +30762,7 @@ function Iv(t) {
30759
30762
  });
30760
30763
  }
30761
30764
  function W_({ content: t, className: e = "", style: n }) {
30762
- const r = M(null), i = ue(() => kv(t), [t]), a = se(() => {
30765
+ const r = L(null), i = ue(() => kv(t), [t]), a = se(() => {
30763
30766
  r.current && Iv(r.current);
30764
30767
  }, []);
30765
30768
  return U(() => {
@@ -30792,7 +30795,7 @@ function F_({
30792
30795
  className: c = "",
30793
30796
  style: s
30794
30797
  }) {
30795
- const [d, u] = z(!1), p = M(/* @__PURE__ */ new Map()), g = i || "var(--color-accent, var(--color-primary))", f = (w, S) => {
30798
+ const [d, u] = z(!1), p = L(/* @__PURE__ */ new Map()), g = i || "var(--color-accent, var(--color-primary))", f = (w, S) => {
30796
30799
  const _ = [...e];
30797
30800
  _[w] = { ..._[w], ...S }, n(_);
30798
30801
  }, h = (w) => {
@@ -30808,23 +30811,23 @@ function F_({
30808
30811
  r(I.id, _);
30809
30812
  return;
30810
30813
  }
30811
- const E = _.map((P) => P.name), N = _.map((P) => P.type || "application/octet-stream"), R = [];
30812
- for (const P of _) {
30813
- const D = await new Promise((L) => {
30814
- const B = new FileReader();
30815
- B.onload = () => {
30816
- const T = B.result;
30817
- L(T.includes(",") ? T.split(",")[1] : T);
30818
- }, B.readAsDataURL(P);
30814
+ const E = _.map((B) => B.name), N = _.map((B) => B.type || "application/octet-stream"), R = [];
30815
+ for (const B of _) {
30816
+ const M = await new Promise((D) => {
30817
+ const P = new FileReader();
30818
+ P.onload = () => {
30819
+ const T = P.result;
30820
+ D(T.includes(",") ? T.split(",")[1] : T);
30821
+ }, P.readAsDataURL(B);
30819
30822
  });
30820
- R.push(D);
30823
+ R.push(M);
30821
30824
  }
30822
30825
  f(w, { fileNames: E, value: E.join(", "), fileData: R, fileMimeTypes: N });
30823
30826
  }, y = (w) => {
30824
30827
  var S;
30825
30828
  if (!(!w.fileData || !w.fileNames))
30826
30829
  for (let _ = 0; _ < w.fileData.length; _++) {
30827
- const I = ((S = w.fileMimeTypes) == null ? void 0 : S[_]) || "application/octet-stream", E = new Blob([Uint8Array.from(atob(w.fileData[_]), (P) => P.charCodeAt(0))], { type: I }), N = URL.createObjectURL(E), R = document.createElement("a");
30830
+ const I = ((S = w.fileMimeTypes) == null ? void 0 : S[_]) || "application/octet-stream", E = new Blob([Uint8Array.from(atob(w.fileData[_]), (B) => B.charCodeAt(0))], { type: I }), N = URL.createObjectURL(E), R = document.createElement("a");
30828
30831
  R.href = N, R.download = w.fileNames[_] || "file", R.click(), URL.revokeObjectURL(N);
30829
30832
  }
30830
30833
  }, v = e.some((w) => w.key || w.value), k = {
@@ -31043,13 +31046,13 @@ function Rv({
31043
31046
  accent: i,
31044
31047
  disabled: a
31045
31048
  }) {
31046
- const { options: l, value: c, onChange: s, label: d } = t, u = M(null), p = M([]), g = M(null), f = M(null), h = M(!1), m = e * n, b = e * (n - 1) / 2, y = Math.max(0, l.findIndex((_) => _.value === c)), v = se((_) => {
31049
+ const { options: l, value: c, onChange: s, label: d } = t, u = L(null), p = L([]), g = L(null), f = L(null), h = L(!1), m = e * n, b = e * (n - 1) / 2, y = Math.max(0, l.findIndex((_) => _.value === c)), v = se((_) => {
31047
31050
  const I = p.current, E = _ + m / 2;
31048
31051
  for (let N = 0; N < I.length; N++) {
31049
31052
  const R = I[N];
31050
31053
  if (!R) continue;
31051
- const D = (b + N * e + e / 2 - E) / e, L = Math.abs(D), B = Jt(1 - L * 0.38, 0.15, 1), T = Jt(1 - L * 0.14, 0.68, 1), O = Jt(D * 24, -58, 58);
31052
- R.style.opacity = String(B), R.style.transform = `perspective(700px) rotateX(${O}deg) scale(${T})`;
31054
+ const M = (b + N * e + e / 2 - E) / e, D = Math.abs(M), P = Jt(1 - D * 0.38, 0.15, 1), T = Jt(1 - D * 0.14, 0.68, 1), O = Jt(M * 24, -58, 58);
31055
+ R.style.opacity = String(P), R.style.transform = `perspective(700px) rotateX(${O}deg) scale(${T})`;
31053
31056
  }
31054
31057
  }, [e, m, b]), k = se((_, I) => {
31055
31058
  const E = u.current;
@@ -31230,7 +31233,7 @@ function Hi({
31230
31233
  fontSize: a
31231
31234
  }) {
31232
31235
  var g;
31233
- const [l, c] = z(!1), s = M(null), d = M(null), u = M(null);
31236
+ const [l, c] = z(!1), s = L(null), d = L(null), u = L(null);
31234
31237
  U(() => {
31235
31238
  if (!l || !s.current || !d.current) return;
31236
31239
  const f = s.current, h = d.current, m = () => {
@@ -31323,15 +31326,15 @@ function Co({
31323
31326
  className: g = "",
31324
31327
  style: f
31325
31328
  }) {
31326
- const h = wo(s, { width: d, borderRadius: u, color: p }), m = p ?? "var(--color-primary)", b = ue(() => e === "single" && typeof n == "string" ? dt(n) : e === "range" && Array.isArray(n) && typeof n[0] == "string" || e === "multi" && Array.isArray(n) && n.length && typeof n[0] == "string" ? dt(n[0]) : /* @__PURE__ */ new Date(), []), [y, v] = z(Wl(b)), [k, w] = z("right"), S = i ? dt(i) : void 0, _ = a ? dt(a) : void 0, I = se(($) => !!(S && $ < S || _ && $ > _ || l != null && l($)), [S, _, l]), E = ue(() => Av(y), [y]), N = /* @__PURE__ */ new Date(), R = e === "range" && Array.isArray(n) ? n : [null, null], P = e === "multi" && Array.isArray(n) ? n : [], D = se(($) => {
31329
+ const h = wo(s, { width: d, borderRadius: u, color: p }), m = p ?? "var(--color-primary)", b = ue(() => e === "single" && typeof n == "string" ? dt(n) : e === "range" && Array.isArray(n) && typeof n[0] == "string" || e === "multi" && Array.isArray(n) && n.length && typeof n[0] == "string" ? dt(n[0]) : /* @__PURE__ */ new Date(), []), [y, v] = z(Wl(b)), [k, w] = z("right"), S = i ? dt(i) : void 0, _ = a ? dt(a) : void 0, I = se(($) => !!(S && $ < S || _ && $ > _ || l != null && l($)), [S, _, l]), E = ue(() => Av(y), [y]), N = /* @__PURE__ */ new Date(), R = e === "range" && Array.isArray(n) ? n : [null, null], B = e === "multi" && Array.isArray(n) ? n : [], M = se(($) => {
31327
31330
  if (e === "single")
31328
31331
  return typeof n == "string" && kn($, dt(n)) ? "selected" : "none";
31329
31332
  if (e === "range") {
31330
31333
  const [A, H] = R;
31331
31334
  return A && kn($, dt(A)) ? "range-start" : H && kn($, dt(H)) ? "range-end" : A && H && $ > dt(A) && $ < dt(H) ? "in-range" : "none";
31332
31335
  }
31333
- return P.some((A) => kn($, dt(A))) ? "selected" : "none";
31334
- }, [e, n, R, P]), L = se(($) => {
31336
+ return B.some((A) => kn($, dt(A))) ? "selected" : "none";
31337
+ }, [e, n, R, B]), D = se(($) => {
31335
31338
  if (I($)) return;
31336
31339
  const A = Tv($);
31337
31340
  if (e === "single")
@@ -31340,10 +31343,10 @@ function Co({
31340
31343
  const [H, G] = R;
31341
31344
  !H || H && G ? r([A, null]) : dt(H) > $ ? r([A, H]) : r([H, A]);
31342
31345
  } else {
31343
- const H = P.includes(A);
31344
- r(H ? P.filter((G) => G !== A) : [...P, A]);
31346
+ const H = B.includes(A);
31347
+ r(H ? B.filter((G) => G !== A) : [...B, A]);
31345
31348
  }
31346
- }, [e, r, I, R, P]), B = ($) => {
31349
+ }, [e, r, I, R, B]), P = ($) => {
31347
31350
  w($ > 0 ? "right" : "left"), v((A) => $v(A, $));
31348
31351
  }, T = ue(() => Cv.map(($, A) => ({ value: String(A), label: $ })), []), O = y.getFullYear(), W = ue(() => Array.from({ length: 121 }, ($, A) => {
31349
31352
  const H = O - 60 + A;
@@ -31390,14 +31393,14 @@ function Co({
31390
31393
  )
31391
31394
  ] }),
31392
31395
  /* @__PURE__ */ x("div", { style: { display: "flex", gap: 2 }, children: [
31393
- /* @__PURE__ */ o("button", { type: "button", className: "dui_calendar__nav", onClick: () => B(-1), "aria-label": "Previous month", children: /* @__PURE__ */ o(Rt, { size: h.cellSize * 0.4 }) }),
31394
- /* @__PURE__ */ o("button", { type: "button", className: "dui_calendar__nav", onClick: () => B(1), "aria-label": "Next month", children: /* @__PURE__ */ o(Pe, { size: h.cellSize * 0.4 }) })
31396
+ /* @__PURE__ */ o("button", { type: "button", className: "dui_calendar__nav", onClick: () => P(-1), "aria-label": "Previous month", children: /* @__PURE__ */ o(Rt, { size: h.cellSize * 0.4 }) }),
31397
+ /* @__PURE__ */ o("button", { type: "button", className: "dui_calendar__nav", onClick: () => P(1), "aria-label": "Next month", children: /* @__PURE__ */ o(Pe, { size: h.cellSize * 0.4 }) })
31395
31398
  ] })
31396
31399
  ] }),
31397
31400
  /* @__PURE__ */ x("div", { className: `dui_calendar__grid dui_calendar__grid--${k}`, children: [
31398
31401
  Nv.map(($, A) => /* @__PURE__ */ o("div", { className: "dui_calendar__weekday", style: { width: h.cellSize, fontSize: h.fontSize }, children: $ }, A)),
31399
31402
  E.map(($, A) => {
31400
- const H = $.getMonth() !== y.getMonth(), G = D($), te = I($), Z = kn($, N), de = (pe) => pe === "in-range" || pe === "range-start" || pe === "range-end", he = c === "block" && de(G), Ae = he && A % 7 !== 0 && de(D(E[A - 1])), Ee = he && A % 7 !== 6 && de(D(E[A + 1])), X = h.cellSize / 2;
31403
+ const H = $.getMonth() !== y.getMonth(), G = M($), te = I($), Z = kn($, N), de = (pe) => pe === "in-range" || pe === "range-start" || pe === "range-end", he = c === "block" && de(G), Ae = he && A % 7 !== 0 && de(M(E[A - 1])), Ee = he && A % 7 !== 6 && de(M(E[A + 1])), X = h.cellSize / 2;
31401
31404
  return /* @__PURE__ */ x("div", { className: "dui_calendar__cell", style: { height: h.cellSize }, children: [
31402
31405
  he && /* @__PURE__ */ o(
31403
31406
  "span",
@@ -31421,7 +31424,7 @@ function Co({
31421
31424
  {
31422
31425
  type: "button",
31423
31426
  disabled: te,
31424
- onClick: () => L($),
31427
+ onClick: () => D($),
31425
31428
  className: [
31426
31429
  "dui_calendar__day",
31427
31430
  H && "dui_calendar__day--outside",
@@ -31467,7 +31470,7 @@ function U_({
31467
31470
  className: p = "",
31468
31471
  style: g
31469
31472
  }) {
31470
- const [f, h] = z(!1), m = M(null), b = M(null), y = Ue(l, { width: c, borderRadius: s, color: d }), v = d ?? "var(--color-accent, var(--color-primary))";
31473
+ const [f, h] = z(!1), m = L(null), b = L(null), y = Ue(l, { width: c, borderRadius: s, color: d }), v = d ?? "var(--color-accent, var(--color-primary))";
31471
31474
  return U(() => {
31472
31475
  if (!f || !m.current || !b.current) return;
31473
31476
  const k = m.current, w = b.current, S = () => {
@@ -31482,8 +31485,8 @@ function U_({
31482
31485
  }, [f]), U(() => {
31483
31486
  if (!f) return;
31484
31487
  const k = (w) => {
31485
- var S, _;
31486
- (S = m.current) != null && S.contains(w.target) || (_ = b.current) != null && _.contains(w.target) || h(!1);
31488
+ var S, _, I, E;
31489
+ (S = m.current) != null && S.contains(w.target) || (_ = b.current) != null && _.contains(w.target) || (E = (I = w.target) == null ? void 0 : I.closest) != null && E.call(I, ".dui_calendar__dropdown") || h(!1);
31487
31490
  };
31488
31491
  return document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
31489
31492
  }, [f]), /* @__PURE__ */ x("div", { "data-testid": t, className: `relative inline-block ${p}`, style: g, children: [
@@ -31629,12 +31632,12 @@ function V_({
31629
31632
  className: f = "",
31630
31633
  style: h
31631
31634
  }) {
31632
- const [m, b] = z(!1), y = M(null), v = M(null), k = Ue(s, { width: d, borderRadius: u, color: p }), w = p ?? "var(--color-accent, var(--color-primary))", { date: S, time: _ } = Dv(e);
31635
+ const [m, b] = z(!1), y = L(null), v = L(null), k = Ue(s, { width: d, borderRadius: u, color: p }), w = p ?? "var(--color-accent, var(--color-primary))", { date: S, time: _ } = Dv(e);
31633
31636
  return U(() => {
31634
31637
  if (!m || !y.current || !v.current) return;
31635
31638
  const I = y.current, E = v.current, N = () => {
31636
- const P = I.getBoundingClientRect();
31637
- E.style.top = `${P.bottom + 6}px`, E.style.left = `${Math.min(P.left, window.innerWidth - E.offsetWidth - 8)}px`;
31639
+ const B = I.getBoundingClientRect();
31640
+ E.style.top = `${B.bottom + 6}px`, E.style.left = `${Math.min(B.left, window.innerWidth - E.offsetWidth - 8)}px`;
31638
31641
  };
31639
31642
  N();
31640
31643
  const R = requestAnimationFrame(N);
@@ -31644,8 +31647,8 @@ function V_({
31644
31647
  }, [m]), U(() => {
31645
31648
  if (!m) return;
31646
31649
  const I = (E) => {
31647
- var N, R;
31648
- (N = y.current) != null && N.contains(E.target) || (R = v.current) != null && R.contains(E.target) || b(!1);
31650
+ var N, R, B, M;
31651
+ (N = y.current) != null && N.contains(E.target) || (R = v.current) != null && R.contains(E.target) || (M = (B = E.target) == null ? void 0 : B.closest) != null && M.call(B, ".dui_calendar__dropdown") || b(!1);
31649
31652
  };
31650
31653
  return document.addEventListener("mousedown", I), () => document.removeEventListener("mousedown", I);
31651
31654
  }, [m]), /* @__PURE__ */ x("div", { "data-testid": t, className: `relative inline-block ${f}`, style: h, children: [
@@ -31983,21 +31986,21 @@ function Y_({
31983
31986
  className: u = "",
31984
31987
  style: p
31985
31988
  }) {
31986
- const g = wo(r, { width: a, borderRadius: l, color: c }), f = c ?? "var(--color-primary)", h = i ?? g.ringDiameter, m = Math.max(3, h * 0.07), b = (h - m) / 2, y = 2 * Math.PI * b, v = M(
31989
+ const g = wo(r, { width: a, borderRadius: l, color: c }), f = c ?? "var(--color-primary)", h = i ?? g.ringDiameter, m = Math.max(3, h * 0.07), b = (h - m) / 2, y = 2 * Math.PI * b, v = L(
31987
31990
  t ? typeof t == "number" ? t : t.getTime() : Date.now() + (e ?? 60) * 1e3
31988
- ), k = M(Date.now()), w = M(Math.max(1, v.current - k.current)), [S, _] = z(() => Math.max(0, v.current - Date.now())), I = M(!1);
31991
+ ), k = L(Date.now()), w = L(Math.max(1, v.current - k.current)), [S, _] = z(() => Math.max(0, v.current - Date.now())), I = L(!1);
31989
31992
  U(() => {
31990
31993
  if (d) return;
31991
31994
  let R;
31992
- const P = () => {
31993
- const D = Math.max(0, v.current - Date.now());
31994
- if (_(D), D <= 0) {
31995
+ const B = () => {
31996
+ const M = Math.max(0, v.current - Date.now());
31997
+ if (_(M), M <= 0) {
31995
31998
  I.current || (I.current = !0, n == null || n());
31996
31999
  return;
31997
32000
  }
31998
- R = requestAnimationFrame(P);
32001
+ R = requestAnimationFrame(B);
31999
32002
  };
32000
- return R = requestAnimationFrame(P), () => cancelAnimationFrame(R);
32003
+ return R = requestAnimationFrame(B), () => cancelAnimationFrame(R);
32001
32004
  }, [d, n]);
32002
32005
  const E = 1 - Math.min(1, S / w.current), N = y * (1 - E);
32003
32006
  return /* @__PURE__ */ x(