@salilvnair/dui 1.0.17 → 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)", B = _ || 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",
@@ -1181,7 +1181,7 @@ function Qv({
1181
1181
  {
1182
1182
  type: "button",
1183
1183
  disabled: c,
1184
- onClick: () => !c && f((L) => !L),
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, B] = z(!1), L = Ue(e === "default" ? void 0 : e, { width: v, borderRadius: k, color: w, fontStyle: S }), D = r || "var(--color-accent, var(--color-primary))", P = n ? L.borderRadius : "0px", T = c ?? a, O = d ? null : s ?? l, W = i ? "var(--color-error)" : E ? D : "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: L.height,
1246
- width: L.width !== "auto" ? L.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,8 +1254,8 @@ const Or = yo(
1254
1254
  } : {
1255
1255
  display: "inline-flex",
1256
1256
  alignItems: "center",
1257
- height: L.height,
1258
- width: L.width !== "auto" ? L.width : void 0,
1257
+ height: M.height,
1258
+ width: M.width !== "auto" ? M.width : void 0,
1259
1259
  borderRadius: P,
1260
1260
  border: `1px solid ${W}`,
1261
1261
  background: "var(--color-input-bg)",
@@ -1265,7 +1265,7 @@ const Or = yo(
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: L.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" : L.paddingX,
1278
- paddingRight: d || O ? "6px" : L.paddingX,
1279
- fontSize: L.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)" : L.color || "var(--color-text-primary)",
1284
- fontStyle: L.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: L.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
1304
  onClick: () => B((G) => !G),
1305
1305
  style: {
1306
- paddingRight: L.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 = () => {
@@ -1531,7 +1531,7 @@ function Mn({
1531
1531
  }, [b]);
1532
1532
  const B = se((T) => {
1533
1533
  r(T), y(!1);
1534
- }, [r]), L = (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));
@@ -1556,7 +1556,7 @@ function Mn({
1556
1556
  "data-testid": t,
1557
1557
  className: `relative inline-block ${g}`,
1558
1558
  style: { width: h, ...f },
1559
- onKeyDown: L,
1559
+ onKeyDown: M,
1560
1560
  children: [
1561
1561
  /* @__PURE__ */ x(
1562
1562
  "button",
@@ -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))", B = Math.max(Math.round(parseFloat(E.fontSize) * 1.2 * 10) / 10, 16), L = 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 = 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));
@@ -2061,7 +2061,7 @@ function t1({
2061
2061
  style: {
2062
2062
  height: "100%",
2063
2063
  width: "100%",
2064
- padding: `${L}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.
@@ -2089,7 +2089,7 @@ function t1({
2089
2089
  ghost: Ot,
2090
2090
  style: {
2091
2091
  border: "none",
2092
- padding: `${L}px ${E.paddingX}`,
2092
+ padding: `${M}px ${E.paddingX}`,
2093
2093
  fontSize: E.fontSize,
2094
2094
  lineHeight: `${B}px`
2095
2095
  }
@@ -2243,7 +2243,7 @@ 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((P) => P.value === n), N = se(() => {
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
2247
  const P = v.current;
2248
2248
  if (!P) return;
2249
2249
  const O = P.querySelectorAll("button[data-seg]")[E];
@@ -2272,7 +2272,7 @@ function n1({
2272
2272
  if (!T.length) return;
2273
2273
  const O = T.findIndex((W) => W.value === n);
2274
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, L = m ? "4px" : y.borderRadius, D = a === "pointy" ? L : `calc(${L} + ${B}px)`;
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
  {
@@ -2336,7 +2336,7 @@ function n1({
2336
2336
  left: k.left,
2337
2337
  width: k.width,
2338
2338
  height: `calc(100% - ${B * 2}px)`,
2339
- borderRadius: L,
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)`,
@@ -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();
@@ -2777,7 +2777,7 @@ function l1({
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 L = 0; L < E.length && S + L < i; L++) N[S + L] = E[L];
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
2783
  (B = h.current[R]) == null || B.focus();
@@ -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, B, 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
3466
  const D = new Set(R);
3467
- D.has(L) ? D.delete(L) : D.add(L), B(D);
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 = () => {
@@ -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);
@@ -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", B = R ? "width" : "height", L = R ? "min(560px, 92vw)" : "min(60vh, 720px)", D = /* @__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 }) })
@@ -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
- [B]: k !== void 0 ? `${k}px` : typeof i == "number" ? `${i}px` : i ?? L,
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
@@ -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(() => {
@@ -4869,7 +4869,7 @@ function O1({
4869
4869
  cursor: n ? "text" : void 0
4870
4870
  },
4871
4871
  children: N.map((R, B) => {
4872
- const L = B === N.length - 1, D = R.collapse;
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
4874
  D ? /* @__PURE__ */ o(
4875
4875
  "button",
@@ -4887,7 +4887,7 @@ function O1({
4887
4887
  },
4888
4888
  children: /* @__PURE__ */ o(ho, { size: 13 })
4889
4889
  }
4890
- ) : e && !L ? /* @__PURE__ */ o(
4890
+ ) : e && !M ? /* @__PURE__ */ o(
4891
4891
  "button",
4892
4892
  {
4893
4893
  type: "button",
@@ -4907,12 +4907,12 @@ function O1({
4907
4907
  children: R.label
4908
4908
  }
4909
4909
  ) : /* @__PURE__ */ o("span", { style: {
4910
- color: L ? "var(--color-text-primary)" : g,
4911
- fontWeight: L ? 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
- !L && /* @__PURE__ */ o(
4915
+ !M && /* @__PURE__ */ o(
4916
4916
  Pe,
4917
4917
  {
4918
4918
  size: 11,
@@ -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,14 +5612,14 @@ 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 L = E.getBoundingClientRect();
5622
- N.style.top = `${L.bottom + 4}px`, N.style.left = `${Math.min(L.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
5625
  const B = requestAnimationFrame(R);
@@ -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();
@@ -5728,7 +5728,7 @@ function tw({
5728
5728
  if (!m) return;
5729
5729
  const I = (E) => {
5730
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((L) => L.label === y)) == null ? void 0 : B.value) ?? y));
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
5734
  }, [m, l, y, r, e]);
@@ -5833,7 +5833,7 @@ function rw({
5833
5833
  className: a = "",
5834
5834
  style: l
5835
5835
  }) {
5836
- 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]);
5837
5837
  return /* @__PURE__ */ o(
5838
5838
  "div",
5839
5839
  {
@@ -6042,7 +6042,7 @@ function sw({
6042
6042
  className: a = "",
6043
6043
  style: l
6044
6044
  }) {
6045
- 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);
6046
6046
  U(() => {
6047
6047
  var b, y;
6048
6048
  d && (g(t), (b = f.current) == null || b.focus(), (y = f.current) == null || y.select());
@@ -6110,7 +6110,7 @@ function Vm({
6110
6110
  label: c = "Columns",
6111
6111
  icon: s
6112
6112
  }) {
6113
- 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);
6114
6114
  U(() => {
6115
6115
  if (!u || !g.current || !f.current) return;
6116
6116
  const b = g.current.getBoundingClientRect();
@@ -6518,14 +6518,14 @@ function hw({
6518
6518
  className: p = "",
6519
6519
  style: g
6520
6520
  }) {
6521
- 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) => {
6522
6522
  if (l) return;
6523
6523
  S.target.setPointerCapture(S.pointerId);
6524
6524
  const _ = (E) => {
6525
6525
  const N = h.current;
6526
6526
  if (!N) return;
6527
- const R = N.getBoundingClientRect(), B = Math.min(1, Math.max(0, (E.clientX - R.left) / R.width)), L = y(r + B * (i - r));
6528
- n(w === "lo" ? [Math.min(L, b), b] : [m, Math.max(L, 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)]);
6529
6529
  }, I = () => {
6530
6530
  window.removeEventListener("pointermove", _), window.removeEventListener("pointerup", I);
6531
6531
  };
@@ -6702,7 +6702,7 @@ function vw({
6702
6702
  className: s = "",
6703
6703
  style: d
6704
6704
  }) {
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 = 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 = () => {
6706
6706
  i || (m([]), f(!0), requestAnimationFrame(() => {
6707
6707
  var w;
6708
6708
  return (w = b.current) == null ? void 0 : w.focus();
@@ -6797,7 +6797,7 @@ function kw({
6797
6797
  className: u = "",
6798
6798
  style: p
6799
6799
  }) {
6800
- 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 = () => {
6801
6801
  e.trim() && r();
6802
6802
  };
6803
6803
  return /* @__PURE__ */ x(
@@ -6924,7 +6924,7 @@ function Iw({
6924
6924
  color: i,
6925
6925
  className: a = ""
6926
6926
  }) {
6927
- 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;
6928
6928
  return U(() => {
6929
6929
  if (!s || !u.current || !p.current) return;
6930
6930
  const f = u.current.getBoundingClientRect();
@@ -7935,7 +7935,7 @@ function tk({
7935
7935
  className: d = "",
7936
7936
  style: u
7937
7937
  }) {
7938
- 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);
7939
7939
  return U(() => {
7940
7940
  if (!f || !m.current || !b.current) return;
7941
7941
  const v = m.current.getBoundingClientRect();
@@ -8186,7 +8186,7 @@ function ak({
8186
8186
  className: a = "",
8187
8187
  style: l
8188
8188
  }) {
8189
- 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) => {
8190
8190
  d.current = { startX: f.clientX, startY: f.clientY, origX: e.x, origY: e.y, dragging: !0 }, f.target.setPointerCapture(f.pointerId);
8191
8191
  }, p = (f) => {
8192
8192
  if (!d.current.dragging || !s.current) return;
@@ -8245,7 +8245,7 @@ function lk({
8245
8245
  className: r = "",
8246
8246
  style: i
8247
8247
  }) {
8248
- 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);
8249
8249
  U(() => {
8250
8250
  const v = c.current;
8251
8251
  if (!v) return;
@@ -8329,7 +8329,7 @@ function sk({
8329
8329
  className: r = "",
8330
8330
  style: i
8331
8331
  }) {
8332
- 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);
8333
8333
  U(() => {
8334
8334
  const m = l.current;
8335
8335
  if (!m) return;
@@ -8929,7 +8929,7 @@ function mx({
8929
8929
  className: a,
8930
8930
  style: l
8931
8931
  }) {
8932
- const c = M(null), [s, d] = z(null);
8932
+ const c = L(null), [s, d] = z(null);
8933
8933
  U(() => {
8934
8934
  if (n !== void 0) return;
8935
8935
  const p = c.current;
@@ -9069,7 +9069,7 @@ function uk({
9069
9069
  className: _ = "",
9070
9070
  style: I
9071
9071
  }) {
9072
- 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);
9073
9073
  U(() => {
9074
9074
  var O;
9075
9075
  if (!a) return;
@@ -9084,9 +9084,9 @@ function uk({
9084
9084
  });
9085
9085
  return () => cancelAnimationFrame(T);
9086
9086
  }, [a, t]);
9087
- const B = M(void 0);
9087
+ const B = L(void 0);
9088
9088
  a && (B.current = a);
9089
- const L = {
9089
+ const M = {
9090
9090
  fontSize: 9,
9091
9091
  fontWeight: 600,
9092
9092
  letterSpacing: ".07em",
@@ -9107,9 +9107,9 @@ function uk({
9107
9107
  padding: "5px 12px 6px",
9108
9108
  borderBottom: "1px solid var(--color-surface-border)"
9109
9109
  }, children: [
9110
- /* @__PURE__ */ o("span", { style: { ...L, flex: 1, minWidth: 0 }, children: "name" }),
9111
- l && /* @__PURE__ */ o("span", { style: { ...L, width: 88, textAlign: "right" }, children: "size" }),
9112
- c && /* @__PURE__ */ o("span", { style: { ...L, 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" }),
9113
9113
  d.length > 0 && /* @__PURE__ */ o("span", { style: { width: d.length * (s ? 21 : 29) } })
9114
9114
  ] }),
9115
9115
  /* @__PURE__ */ x(
@@ -9406,7 +9406,7 @@ function fk({
9406
9406
  className: r = "",
9407
9407
  style: i
9408
9408
  }) {
9409
- 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);
9410
9410
  U(() => {
9411
9411
  const b = c.current;
9412
9412
  if (!b) return;
@@ -9569,7 +9569,7 @@ function xk({
9569
9569
  className: r = "",
9570
9570
  style: i
9571
9571
  }) {
9572
- 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) => {
9573
9573
  if (!l) return;
9574
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);
9575
9575
  if (_ < 0) return;
@@ -10557,7 +10557,7 @@ function Mx() {
10557
10557
  return ie;
10558
10558
  }).map((ge) => `(${ge})`).join(F);
10559
10559
  }
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]+)", L = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", D = (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 = {}) => {
10561
10561
  const F = /^#![ ]*\//;
10562
10562
  return C.binary && (C.begin = m(
10563
10563
  F,
@@ -10730,7 +10730,7 @@ function Mx() {
10730
10730
  PHRASAL_WORDS_MODE: W,
10731
10731
  QUOTE_STRING_MODE: O,
10732
10732
  REGEXP_MODE: he,
10733
- RE_STARTERS_RE: L,
10733
+ RE_STARTERS_RE: M,
10734
10734
  SHEBANG: D,
10735
10735
  TITLE_MODE: Ae,
10736
10736
  UNDERSCORE_IDENT_RE: E,
@@ -11817,13 +11817,13 @@ function rn(t) {
11817
11817
  match: /\b[A-Z][A-Z_0-9]+\b/,
11818
11818
  className: "variable.constant"
11819
11819
  };
11820
- function L($) {
11820
+ function M($) {
11821
11821
  return e.concat("(?!", $.join("|"), ")");
11822
11822
  }
11823
11823
  const D = {
11824
11824
  match: e.concat(
11825
11825
  /\b/,
11826
- L([
11826
+ M([
11827
11827
  ...Ja,
11828
11828
  "super",
11829
11829
  "import"
@@ -12472,13 +12472,13 @@ function Wx(t) {
12472
12472
  match: /\b[A-Z][A-Z_0-9]+\b/,
12473
12473
  className: "variable.constant"
12474
12474
  };
12475
- function L($) {
12475
+ function M($) {
12476
12476
  return e.concat("(?!", $.join("|"), ")");
12477
12477
  }
12478
12478
  const D = {
12479
12479
  match: e.concat(
12480
12480
  /\b/,
12481
- L([
12481
+ M([
12482
12482
  ...ol,
12483
12483
  "super",
12484
12484
  "import"
@@ -16852,7 +16852,7 @@ function Ak({
16852
16852
  className: a = "",
16853
16853
  style: l
16854
16854
  }) {
16855
- 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) => {
16856
16856
  var b;
16857
16857
  const h = (b = u.current) == null ? void 0 : b.getBoundingClientRect();
16858
16858
  if (!h) return;
@@ -16893,7 +16893,7 @@ function Mk({
16893
16893
  className: a = "",
16894
16894
  style: l
16895
16895
  }) {
16896
- 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 });
16897
16897
  U(() => {
16898
16898
  if (!e || u || t.length <= 1) return;
16899
16899
  const m = setInterval(() => d((b) => (b + 1) % t.length), n);
@@ -18780,7 +18780,7 @@ function Fk({
18780
18780
  }) {
18781
18781
  const [f, h] = z("rich"), m = r ?? f, b = (T) => {
18782
18782
  i == null || i(T), r || h(T);
18783
- }, 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 = () => {
18784
18784
  const T = _.trim(), O = w;
18785
18785
  if (S(null), I(""), !T || !O) return;
18786
18786
  const W = y.current;
@@ -18805,7 +18805,7 @@ function Fk({
18805
18805
  const B = se(() => {
18806
18806
  const T = y.current;
18807
18807
  T && n(pi(T.innerHTML));
18808
- }, [n]), L = se(() => {
18808
+ }, [n]), M = se(() => {
18809
18809
  var W;
18810
18810
  const T = window.getSelection();
18811
18811
  let O = T == null ? void 0 : T.anchorNode;
@@ -18834,7 +18834,7 @@ function Fk({
18834
18834
  !1,
18835
18835
  '<ul data-task="1"><li><input type="checkbox" disabled /> item</li></ul><p><br></p>'
18836
18836
  ) : T.startsWith("formatBlock:") ? document.execCommand("formatBlock", !1, T.slice(12)) : document.execCommand(T);
18837
- B(), L();
18837
+ B(), M();
18838
18838
  }
18839
18839
  }, P = s;
18840
18840
  return /* @__PURE__ */ x("div", { "data-testid": t, className: `dui_mde ${p}`, style: g, children: [
@@ -18937,8 +18937,8 @@ function Fk({
18937
18937
  "data-placeholder": a,
18938
18938
  onInput: B,
18939
18939
  onBlur: B,
18940
- onKeyUp: L,
18941
- onMouseUp: L
18940
+ onKeyUp: M,
18941
+ onMouseUp: M
18942
18942
  }
18943
18943
  ) : /* @__PURE__ */ o(
18944
18944
  "textarea",
@@ -19018,7 +19018,7 @@ function Uk({
19018
19018
  className: u = "",
19019
19019
  style: p
19020
19020
  }) {
19021
- 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(() => {
19022
19022
  if (h === null) return [];
19023
19023
  const w = h.toLowerCase();
19024
19024
  return r.filter((S) => S.label.toLowerCase().includes(w)).slice(0, 6);
@@ -19146,7 +19146,7 @@ function Xk({
19146
19146
  className: c = "",
19147
19147
  style: s
19148
19148
  }) {
19149
- 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);
19150
19150
  return U(() => {
19151
19151
  const f = g.current, h = performance.now();
19152
19152
  let m = 0;
@@ -19170,7 +19170,7 @@ function Kk({
19170
19170
  className: a = "",
19171
19171
  style: l
19172
19172
  }) {
19173
- 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 });
19174
19174
  return /* @__PURE__ */ o(
19175
19175
  "button",
19176
19176
  {
@@ -19210,7 +19210,7 @@ function jk({
19210
19210
  className: r = "",
19211
19211
  style: i
19212
19212
  }) {
19213
- 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 });
19214
19214
  return /* @__PURE__ */ o(
19215
19215
  "div",
19216
19216
  {
@@ -19306,7 +19306,7 @@ function Zk({
19306
19306
  className: a = "",
19307
19307
  style: l
19308
19308
  }) {
19309
- const c = M(null), [s, d] = z(!1);
19309
+ const c = L(null), [s, d] = z(!1);
19310
19310
  return U(() => {
19311
19311
  const u = c.current;
19312
19312
  if (!u) return;
@@ -19477,7 +19477,7 @@ function nS({
19477
19477
  className: a = "",
19478
19478
  style: l
19479
19479
  }) {
19480
- 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);
19481
19481
  return U(() => {
19482
19482
  p(d.current), d.current = s.length;
19483
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: [
@@ -19542,7 +19542,7 @@ function oS({
19542
19542
  className: d = "",
19543
19543
  style: u
19544
19544
  }) {
19545
- 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) => {
19546
19546
  const N = E / v * a, R = l - (I - m) / y * l;
19547
19547
  return `${N},${R}`;
19548
19548
  }).join(" "), w = (I) => {
@@ -19598,7 +19598,7 @@ function Vy(t, e) {
19598
19598
  return a;
19599
19599
  }
19600
19600
  function iS({ text: t, size: e, className: n = "", style: r }) {
19601
- 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);
19602
19602
  return zn(() => {
19603
19603
  const u = c.current;
19604
19604
  if (!u) return;
@@ -19759,19 +19759,19 @@ function cS({
19759
19759
  className: d = "",
19760
19760
  style: u
19761
19761
  }) {
19762
- 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) => {
19763
19763
  var W;
19764
19764
  const N = (W = m.current) == null ? void 0 : W.getBoundingClientRect();
19765
19765
  if (!N) return e;
19766
19766
  const R = N.left + N.width / 2, B = N.top + N.height / 2;
19767
- let L = Math.atan2(E - B, I - R) * 180 / Math.PI + 90;
19768
- L > 180 && (L -= 360);
19769
- const P = (Math.min(qn, Math.max(Wt, L)) - Wt) / (qn - Wt), T = n + P * (r - n), O = (r - n) / i;
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;
19770
19770
  return Math.round(T / O) * O;
19771
19771
  }, _ = (I) => {
19772
19772
  const E = (R) => {
19773
- const B = S(R.clientX, R.clientY), L = Math.round((B - n) / (r - n) * i);
19774
- L !== v.current && (v.current = L, y(!0), setTimeout(() => y(!1), 140)), a(B);
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);
19775
19775
  };
19776
19776
  E(I.nativeEvent);
19777
19777
  const N = () => {
@@ -19843,7 +19843,7 @@ function dS({
19843
19843
  className: l = "",
19844
19844
  style: c
19845
19845
  }) {
19846
- 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 = () => {
19847
19847
  f.current = performance.now();
19848
19848
  const b = (y) => {
19849
19849
  const v = Math.min(1, (y - f.current) / r);
@@ -19949,7 +19949,7 @@ function pS({
19949
19949
  className: l = "",
19950
19950
  style: c
19951
19951
  }) {
19952
- 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) => {
19953
19953
  p.current = !0, g.current = b.clientX;
19954
19954
  const y = (k) => {
19955
19955
  p.current && u(k.clientX - g.current);
@@ -20054,7 +20054,7 @@ function hS({
20054
20054
  className: n = "",
20055
20055
  style: r
20056
20056
  }) {
20057
- 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);
20058
20058
  return /* @__PURE__ */ x(
20059
20059
  "div",
20060
20060
  {
@@ -20250,7 +20250,7 @@ function yS({
20250
20250
  className: c = "",
20251
20251
  style: s
20252
20252
  }) {
20253
- 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)";
20254
20254
  return U(() => {
20255
20255
  u.current.forEach((h) => {
20256
20256
  if (!h) return;
@@ -20286,7 +20286,7 @@ function vS({
20286
20286
  className: s = "",
20287
20287
  style: d
20288
20288
  }) {
20289
- 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) => {
20290
20290
  var v;
20291
20291
  const b = (v = p.current) == null ? void 0 : v.getBoundingClientRect();
20292
20292
  if (!b) return;
@@ -20369,7 +20369,7 @@ function jy({
20369
20369
  activeColor: p,
20370
20370
  fontStyle: g
20371
20371
  }) {
20372
- 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 });
20373
20373
  zn(() => {
20374
20374
  if (!h.current) return;
20375
20375
  const k = h.current.querySelector(`[data-tab="${n}"]`);
@@ -20852,18 +20852,18 @@ function AS({
20852
20852
  height: h,
20853
20853
  className: m = ""
20854
20854
  }) {
20855
- 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, B] = z(null), L = M(null), D = ($, 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) => {
20856
20856
  if (!$.preview) return;
20857
- L.current && clearTimeout(L.current);
20857
+ M.current && clearTimeout(M.current);
20858
20858
  const H = A.getBoundingClientRect();
20859
- L.current = setTimeout(() => {
20859
+ M.current = setTimeout(() => {
20860
20860
  B({ id: $.id, x: H.left + H.width / 2, y: H.bottom + 6 });
20861
20861
  }, 350);
20862
20862
  }, P = () => {
20863
- L.current && clearTimeout(L.current), L.current = null, B(null);
20863
+ M.current && clearTimeout(M.current), M.current = null, B(null);
20864
20864
  };
20865
20865
  U(() => () => {
20866
- L.current && clearTimeout(L.current);
20866
+ M.current && clearTimeout(M.current);
20867
20867
  }, []);
20868
20868
  const T = R ? e.find(($) => $.id === R.id) : void 0, O = se(() => {
20869
20869
  const $ = S.current;
@@ -21126,7 +21126,7 @@ function MS({
21126
21126
  className: l,
21127
21127
  style: c
21128
21128
  }) {
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 = 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);
21130
21130
  return U(() => {
21131
21131
  const b = f.current[s];
21132
21132
  b && m({ left: b.offsetLeft, width: b.offsetWidth });
@@ -21270,7 +21270,7 @@ function DS({
21270
21270
  rowClassName: a = "",
21271
21271
  style: l
21272
21272
  }) {
21273
- 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) => {
21274
21274
  h.preventDefault(), c != null && c !== m && e(c, m), s(null), u(null);
21275
21275
  };
21276
21276
  return /* @__PURE__ */ o(ve, { children: t.map((h, m) => /* @__PURE__ */ x(
@@ -21328,7 +21328,7 @@ function OS({
21328
21328
  emptyText: a = "No matching commands",
21329
21329
  accentColor: l
21330
21330
  }) {
21331
- 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(() => {
21332
21332
  const b = c.trim().toLowerCase();
21333
21333
  return b ? r.map((v) => {
21334
21334
  if (![v.label, v.hint ?? "", ...v.keywords ?? []].join(" ").toLowerCase().includes(b)) return null;
@@ -22117,7 +22117,7 @@ function FS({
22117
22117
  onWikiOpen: d,
22118
22118
  width: u = 320
22119
22119
  }) {
22120
- const p = M(null), [g, f] = z({
22120
+ const p = L(null), [g, f] = z({
22121
22121
  top: -9999,
22122
22122
  left: -9999,
22123
22123
  visible: !1
@@ -22248,11 +22248,11 @@ function HS({
22248
22248
  style: b,
22249
22249
  className: y = ""
22250
22250
  }) {
22251
- const [v, k] = z(i ?? r), [w, S] = z(!1), [_, I] = z(!1), E = M(null), N = M(null), R = M(!1), B = M(!1), L = M(null), D = t === "horizontal", P = 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 || _;
22252
22252
  U(() => {
22253
22253
  i !== void 0 && k(i);
22254
22254
  }, [i]);
22255
- const O = i !== void 0 ? i : v, W = w && L.current != null ? L.current : O, $ = (X) => {
22255
+ const O = i !== void 0 ? i : v, W = w && M.current != null ? M.current : O, $ = (X) => {
22256
22256
  X.preventDefault(), X.target.setPointerCapture(X.pointerId), R.current = !0, B.current = !1, S(!0);
22257
22257
  }, A = (X) => {
22258
22258
  if (!R.current || !E.current) return;
@@ -22261,13 +22261,13 @@ function HS({
22261
22261
  ke,
22262
22262
  Math.min(100 - Ce, xe / V * 100)
22263
22263
  );
22264
- L.current = Te, N.current && (D ? 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);
22265
22265
  }, H = (X) => {
22266
22266
  if (X.target.releasePointerCapture(X.pointerId), R.current = !1, S(!1), !B.current)
22267
22267
  g == null || g();
22268
22268
  else {
22269
- const pe = L.current ?? v;
22270
- L.current = null, k(pe), p == null || p(pe);
22269
+ const pe = M.current ?? v;
22270
+ M.current = null, k(pe), p == null || p(pe);
22271
22271
  }
22272
22272
  }, G = () => {
22273
22273
  k(r), u == null || u(r), p == null || p(r);
@@ -22394,7 +22394,7 @@ function US({
22394
22394
  className: a = "",
22395
22395
  style: l
22396
22396
  }) {
22397
- 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) => {
22398
22398
  m.preventDefault(), m.stopPropagation(), m.target.setPointerCapture(m.pointerId), p.current = { startY: m.clientY, startHeight: c };
22399
22399
  }, [c]), f = se((m) => {
22400
22400
  if (!p.current) return;
@@ -22627,7 +22627,7 @@ function KS({
22627
22627
  }, _ = h ? [...e].sort((D, P) => {
22628
22628
  const T = D[h], O = P[h], W = String(T ?? "").localeCompare(String(O ?? ""));
22629
22629
  return b ? W : -W;
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], L = !!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;
22631
22631
  return /* @__PURE__ */ x(
22632
22632
  "div",
22633
22633
  {
@@ -22646,7 +22646,7 @@ function KS({
22646
22646
  // of its real ~170-214px content height) — instead of the page
22647
22647
  // scrolling normally like every other settings panel. Refusing to
22648
22648
  // shrink here restores that normal behavior.
22649
- ...L ? {} : { maxHeight: u, display: "flex", flexDirection: "column", flexShrink: 0 }
22649
+ ...M ? {} : { maxHeight: u, display: "flex", flexDirection: "column", flexShrink: 0 }
22650
22650
  },
22651
22651
  children: [
22652
22652
  /* @__PURE__ */ x("div", { style: {
@@ -22686,7 +22686,7 @@ function KS({
22686
22686
  D.key
22687
22687
  ))
22688
22688
  ] }),
22689
- /* @__PURE__ */ o("div", { style: L ? {} : { flex: "1 1 auto", overflowY: "auto" }, children: _.length === 0 ? /* @__PURE__ */ o(p0, { title: a, message: l, compact: !0 }) : _.map((D, P) => {
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
22690
  const T = String(D[n] ?? P), O = v.has(T), W = c && P % 2 === 1 ? "var(--color-table-stripe)" : "transparent";
22691
22691
  return /* @__PURE__ */ x(
22692
22692
  "div",
@@ -22860,7 +22860,7 @@ function jS({
22860
22860
  className: u,
22861
22861
  style: p
22862
22862
  }) {
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 = 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) => {
22864
22864
  var R;
22865
22865
  const E = (R = k.current) == null ? void 0 : R.getBoundingClientRect();
22866
22866
  if (!E || E.width === 0) return;
@@ -23581,7 +23581,7 @@ function o_({
23581
23581
  className: b = "",
23582
23582
  style: y
23583
23583
  }) {
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, L = 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) => {
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
23585
  B || w(X), l == null || l(X);
23586
23586
  }, te = (X) => {
23587
23587
  _((pe) => {
@@ -23599,18 +23599,18 @@ function o_({
23599
23599
  });
23600
23600
  }, he = (X, pe = 0) => {
23601
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;
23602
- if (Ce && L)
23602
+ if (Ce && M)
23603
23603
  return /* @__PURE__ */ o("div", { children: (X.children ?? []).map((oe) => he(oe, pe)) }, X.id);
23604
23604
  const j = /* @__PURE__ */ x(
23605
23605
  "div",
23606
23606
  {
23607
- title: L ? X.label : void 0,
23607
+ title: M ? X.label : void 0,
23608
23608
  onClick: () => Ce ? de(X) : n == null ? void 0 : n(X.id),
23609
23609
  "data-nav-id": X.id,
23610
23610
  role: Ce ? "button" : void 0,
23611
23611
  "aria-expanded": Ce ? Te : void 0,
23612
23612
  className: `dui_side-nav__item${V ? " dui_side-nav__item--active" : ""}${Ce ? " dui_side-nav__item--branch" : ""}`,
23613
- style: L ? {
23613
+ style: M ? {
23614
23614
  display: "flex",
23615
23615
  alignItems: "center",
23616
23616
  justifyContent: "center",
@@ -23641,9 +23641,9 @@ function o_({
23641
23641
  justifyContent: "center",
23642
23642
  width: v.iconSize,
23643
23643
  /* A branch's pages sit a step below it: the icon a little smaller… */
23644
- ...pe > 0 && !L ? { transform: "scale(0.86)", opacity: V ? 1 : 0.9 } : {}
23644
+ ...pe > 0 && !M ? { transform: "scale(0.86)", opacity: V ? 1 : 0.9 } : {}
23645
23645
  }, children: X.icon }),
23646
- !L && /* @__PURE__ */ x(ve, { children: [
23646
+ !M && /* @__PURE__ */ x(ve, { children: [
23647
23647
  /* @__PURE__ */ o("span", { style: {
23648
23648
  /* …and the name a pixel smaller. */
23649
23649
  flex: 1,
@@ -23686,7 +23686,7 @@ function o_({
23686
23686
  }, Ae = (X) => {
23687
23687
  var Ce;
23688
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 ?? [];
23689
- return L ? /* @__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: [
23690
23690
  /* @__PURE__ */ x(
23691
23691
  "button",
23692
23692
  {
@@ -23740,8 +23740,8 @@ function o_({
23740
23740
  {
23741
23741
  className: b,
23742
23742
  style: {
23743
- width: L ? d : u ? "100%" : s,
23744
- minWidth: L ? d : u ? void 0 : s,
23743
+ width: M ? d : u ? "100%" : s,
23744
+ minWidth: M ? d : u ? void 0 : s,
23745
23745
  height: "100%",
23746
23746
  display: "flex",
23747
23747
  flexDirection: "column",
@@ -23752,7 +23752,7 @@ function o_({
23752
23752
  ...y
23753
23753
  },
23754
23754
  children: [
23755
- g && !L && /* @__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: {
23756
23756
  display: "flex",
23757
23757
  alignItems: "center",
23758
23758
  gap: 6,
@@ -23817,7 +23817,7 @@ function o_({
23817
23817
  /* @__PURE__ */ x("div", { style: {
23818
23818
  flex: 1,
23819
23819
  overflowY: "auto",
23820
- padding: L ? "4px 4px 16px" : "4px 6px 16px"
23820
+ padding: M ? "4px 4px 16px" : "4px 6px 16px"
23821
23821
  }, children: [
23822
23822
  A.map(Ee),
23823
23823
  T && H === 0 && /* @__PURE__ */ o("div", { style: {
@@ -23837,7 +23837,7 @@ function o_({
23837
23837
  "button",
23838
23838
  {
23839
23839
  type: "button",
23840
- onClick: () => G(!L),
23840
+ onClick: () => G(!M),
23841
23841
  className: "dui_side-nav__collapse-btn",
23842
23842
  style: {
23843
23843
  display: "flex",
@@ -23852,8 +23852,8 @@ function o_({
23852
23852
  color: "var(--color-text-muted)",
23853
23853
  cursor: "pointer"
23854
23854
  },
23855
- title: L ? "Expand sidebar" : "Collapse sidebar",
23856
- children: L ? /* @__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 })
23857
23857
  }
23858
23858
  ) })
23859
23859
  ]
@@ -23949,7 +23949,7 @@ function Ml({
23949
23949
  getItemId: N,
23950
23950
  onItemDragStart: R,
23951
23951
  onItemDragOver: B,
23952
- onItemDrop: L,
23952
+ onItemDrop: M,
23953
23953
  inlineCreate: D,
23954
23954
  onInlineCreateCommit: P,
23955
23955
  onInlineCreateCancel: T,
@@ -23957,7 +23957,7 @@ function Ml({
23957
23957
  onRenameDone: W
23958
23958
  }) {
23959
23959
  var j, oe, q, be, Re;
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 = 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);
23961
23961
  U(() => {
23962
23962
  O === t.id && p && (Z(t.label), G(!0), setTimeout(() => {
23963
23963
  var ee;
@@ -24091,7 +24091,7 @@ function Ml({
24091
24091
  getItemId: N,
24092
24092
  onItemDragStart: R,
24093
24093
  onItemDragOver: B,
24094
- onItemDrop: L,
24094
+ onItemDrop: M,
24095
24095
  inlineCreate: D,
24096
24096
  onInlineCreateCommit: P,
24097
24097
  onInlineCreateCancel: T
@@ -24115,7 +24115,7 @@ function Ml({
24115
24115
  onDragStart: R,
24116
24116
  onDragOver: B,
24117
24117
  onDragLeave: S,
24118
- onDrop: L,
24118
+ onDrop: M,
24119
24119
  onDragEnd: I
24120
24120
  },
24121
24121
  Xe
@@ -24178,7 +24178,7 @@ function i_({
24178
24178
  renamingNodeId: R,
24179
24179
  onRenameDone: B
24180
24180
  }) {
24181
- const [L, D] = z(a ?? /* @__PURE__ */ new Set()), P = l ?? L, T = se((q) => {
24181
+ const [M, D] = z(a ?? /* @__PURE__ */ new Set()), P = l ?? M, T = se((q) => {
24182
24182
  if (c) {
24183
24183
  c(q);
24184
24184
  return;
@@ -24889,7 +24889,7 @@ function c_({
24889
24889
  className: l = "",
24890
24890
  style: c
24891
24891
  }) {
24892
- 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;
24893
24893
  return zn(() => {
24894
24894
  const m = u.current;
24895
24895
  m && (m.style.transition = "none", m.style.height = r ? "auto" : "0px", m.style.overflow = "hidden", requestAnimationFrame(() => {
@@ -25011,7 +25011,7 @@ function d_({
25011
25011
  disabled: l = !1,
25012
25012
  className: c = ""
25013
25013
  }) {
25014
- 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) => {
25015
25015
  const b = m.trim();
25016
25016
  !b || e.includes(b) || !p || (n([...e, b]), d(""));
25017
25017
  }, f = (m) => {
@@ -25127,7 +25127,7 @@ function u_({
25127
25127
  className: l = ""
25128
25128
  }) {
25129
25129
  var S, _;
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 = 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) => {
25131
25131
  if (!f) return;
25132
25132
  const E = m.current - I.clientY, N = Math.max(n, Math.min(r, b.current + E));
25133
25133
  u(N);
@@ -25259,7 +25259,7 @@ const U0 = {
25259
25259
  "bottom-center": { bottom: 16, left: "50%", transform: "translateX(-50%)" }
25260
25260
  };
25261
25261
  function V0({ toast: t, onDismiss: e }) {
25262
- const n = U0[t.variant], r = M(void 0);
25262
+ const n = U0[t.variant], r = L(void 0);
25263
25263
  return U(() => {
25264
25264
  const i = t.duration ?? 4e3;
25265
25265
  return i > 0 && (r.current = setTimeout(() => e(t.id), i)), () => {
@@ -25334,7 +25334,7 @@ function p_({ toasts: t, onDismiss: e, position: n = "bottom-right" }) {
25334
25334
  );
25335
25335
  }
25336
25336
  function f_() {
25337
- const t = M([]), e = M([]), n = (l) => (e.current.push(l), () => {
25337
+ const t = L([]), e = L([]), n = (l) => (e.current.push(l), () => {
25338
25338
  e.current = e.current.filter((c) => c !== l);
25339
25339
  }), r = () => e.current.forEach((l) => l([...t.current]));
25340
25340
  return { subscribe: n, toast: (l, c, s, d) => {
@@ -25719,7 +25719,7 @@ function j0({ text: t }) {
25719
25719
  }, children: n }, r) : /* @__PURE__ */ o("span", { children: n }, r)) });
25720
25720
  }
25721
25721
  function Y0({ value: t, onChange: e, accent: n, minHeight: r = 220 }) {
25722
- 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(() => {
25723
25723
  i.current && a.current && (a.current.scrollTop = i.current.scrollTop, a.current.scrollLeft = i.current.scrollLeft);
25724
25724
  }, []), d = (t + `
25725
25725
  `).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(
@@ -26369,10 +26369,10 @@ function v_({
26369
26369
  maxSuggestions: b = 8,
26370
26370
  suggestionZIndex: y = 1e4
26371
26371
  }) {
26372
- const v = e.length > 0, k = M(null), [w, S] = z(!1), [_, I] = z(-1), [E, N] = z(!1), [R, B] = z({ top: 0, left: 0, width: 0 }), L = 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(() => {
26373
26373
  const O = (p ?? []).map(Z0).filter((A) => A.value.trim()), W = e.trim().toLowerCase();
26374
26374
  return (W ? O.filter((A) => A.value.toLowerCase().includes(W) && A.value !== e) : O).slice(0, b);
26375
- }, [p, e, b]), D = w && !E && L.length > 0;
26375
+ }, [p, e, b]), D = w && !E && M.length > 0;
26376
26376
  U(() => {
26377
26377
  if (!D) return;
26378
26378
  const O = () => {
@@ -26384,7 +26384,7 @@ function v_({
26384
26384
  return O(), window.addEventListener("scroll", O, { passive: !0, capture: !0 }), window.addEventListener("resize", O, { passive: !0 }), () => {
26385
26385
  window.removeEventListener("scroll", O, { capture: !0 }), window.removeEventListener("resize", O);
26386
26386
  };
26387
- }, [D, L.length]), U(() => {
26387
+ }, [D, M.length]), U(() => {
26388
26388
  I(-1), N(!1);
26389
26389
  }, [e]);
26390
26390
  const P = (O) => {
@@ -26411,7 +26411,7 @@ function v_({
26411
26411
  const W = O.key === "ArrowDown" ? 1 : -1;
26412
26412
  I(($) => {
26413
26413
  const A = $ + W;
26414
- return A < 0 ? L.length - 1 : A >= L.length ? 0 : A;
26414
+ return A < 0 ? M.length - 1 : A >= M.length ? 0 : A;
26415
26415
  });
26416
26416
  return;
26417
26417
  }
@@ -26421,7 +26421,7 @@ function v_({
26421
26421
  }
26422
26422
  if (O.key === "Enter") {
26423
26423
  if (O.preventDefault(), D && _ >= 0) {
26424
- P(L[_].value);
26424
+ P(M[_].value);
26425
26425
  return;
26426
26426
  }
26427
26427
  r == null || r(e);
@@ -26534,7 +26534,7 @@ function v_({
26534
26534
  }
26535
26535
  )
26536
26536
  ] }),
26537
- /* @__PURE__ */ o("div", { style: { padding: "4px 3px 3px", maxHeight: 280, overflowY: "auto" }, children: L.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(
26538
26538
  "div",
26539
26539
  {
26540
26540
  role: "option",
@@ -27229,7 +27229,7 @@ function T_({
27229
27229
  className: l = ""
27230
27230
  }) {
27231
27231
  var _;
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 = 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) => {
27233
27233
  const E = I.target.value;
27234
27234
  if (E === "" || E === "0") {
27235
27235
  n(0);
@@ -27359,7 +27359,7 @@ function $_({
27359
27359
  size: l = "md",
27360
27360
  accentColor: c
27361
27361
  }) {
27362
- 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)";
27363
27363
  U(() => {
27364
27364
  if (!s) return;
27365
27365
  const E = (N) => {
@@ -27541,7 +27541,7 @@ function iv({
27541
27541
  style: h,
27542
27542
  className: m = ""
27543
27543
  }) {
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 = M(null), _ = M(!1), I = M(null), E = M(Fa()), N = M(!1), [R, B] = z(!1), [L, 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))";
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))";
27545
27545
  U(() => {
27546
27546
  const j = S.current;
27547
27547
  j && (j.innerHTML = Et(e), I.current = e, E.current.reset(e, e.length));
@@ -27662,12 +27662,12 @@ function iv({
27662
27662
  _.current = !1, xe();
27663
27663
  },
27664
27664
  "data-testid": t,
27665
- className: `dui_highlighted-input__editor${s ? " opacity-60" : ""}${d && !L ? " dui_highlighted-input__editor--masked" : ""}`,
27665
+ className: `dui_highlighted-input__editor${s ? " opacity-60" : ""}${d && !M ? " dui_highlighted-input__editor--masked" : ""}`,
27666
27666
  style: {
27667
27667
  height: y,
27668
27668
  // Not in React's CSS types; a real property in every Chromium,
27669
27669
  // which is the only engine a VS Code webview runs in.
27670
- ...d && !L ? { WebkitTextSecurity: "disc" } : {},
27670
+ ...d && !M ? { WebkitTextSecurity: "disc" } : {},
27671
27671
  paddingRight: d ? 30 : void 0,
27672
27672
  lineHeight: `${v}px`,
27673
27673
  paddingTop: k,
@@ -27684,7 +27684,7 @@ function iv({
27684
27684
  tabIndex: -1,
27685
27685
  onMouseDown: (j) => j.preventDefault(),
27686
27686
  onClick: () => D((j) => !j),
27687
- title: L ? "Hide value" : "Show value",
27687
+ title: M ? "Hide value" : "Show value",
27688
27688
  style: {
27689
27689
  position: "absolute",
27690
27690
  right: 8,
@@ -27700,7 +27700,7 @@ function iv({
27700
27700
  },
27701
27701
  onMouseEnter: (j) => j.currentTarget.style.color = "var(--color-text-primary)",
27702
27702
  onMouseLeave: (j) => j.currentTarget.style.color = "var(--color-text-muted)",
27703
- children: L ? /* @__PURE__ */ o(cn, { size: 14 }) : /* @__PURE__ */ o(dn, { size: 14 })
27703
+ children: M ? /* @__PURE__ */ o(cn, { size: 14 }) : /* @__PURE__ */ o(dn, { size: 14 })
27704
27704
  }
27705
27705
  ),
27706
27706
  /* @__PURE__ */ o(
@@ -27793,7 +27793,7 @@ function av({
27793
27793
  onConfirm: a,
27794
27794
  onCancel: l
27795
27795
  }) {
27796
- const c = M(null);
27796
+ const c = L(null);
27797
27797
  return U(() => {
27798
27798
  var d;
27799
27799
  (d = c.current) == null || d.focus();
@@ -28112,7 +28112,7 @@ function Mi({
28112
28112
  onEnabledChange: y,
28113
28113
  onRemove: v
28114
28114
  }) {
28115
- const [k, w] = z(!1), [S, _] = z(""), [I, E] = z(-1), [N, R] = z(!1), [B, L] = z(""), [D, P] = 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(
28116
28116
  (V) => V.toLowerCase().includes((S || e).toLowerCase()) && V.toLowerCase() !== e.toLowerCase()
28117
28117
  ).slice(0, 8) : [], te = g && !a && N && e ? (H[e.toLowerCase()] || []).filter(
28118
28118
  (V) => V.toLowerCase().includes((B || n).toLowerCase()) && V.toLowerCase() !== n.toLowerCase()
@@ -28133,7 +28133,7 @@ function Mi({
28133
28133
  const he = se((V) => {
28134
28134
  h == null || h(V), w(!1), _(""), E(-1);
28135
28135
  }, [h]), Ae = se((V) => {
28136
- m == null || m(V), R(!1), L(""), P(-1);
28136
+ m == null || m(V), R(!1), M(""), P(-1);
28137
28137
  }, [m]), Ee = se((V, xe) => {
28138
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;
28139
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)));
@@ -28211,7 +28211,7 @@ function Mi({
28211
28211
  placeholder: (p == null ? void 0 : p.value) ?? "Value",
28212
28212
  size: f,
28213
28213
  onChange: (V) => {
28214
- m == null || m(V), L(V), P(-1);
28214
+ m == null || m(V), M(V), P(-1);
28215
28215
  },
28216
28216
  onKeyDown: (V) => Ee(V, "val"),
28217
28217
  onBlur: () => setTimeout(() => {
@@ -28231,10 +28231,10 @@ function Mi({
28231
28231
  style: { width: "100%", ...a ? pe : {} },
28232
28232
  color: a ? "var(--color-text-secondary)" : void 0,
28233
28233
  onChange: (V) => {
28234
- m == null || m(V.target.value), L(V.target.value), P(-1);
28234
+ m == null || m(V.target.value), M(V.target.value), P(-1);
28235
28235
  },
28236
28236
  onFocus: () => {
28237
- R(!0), L(n), P(-1);
28237
+ R(!0), M(n), P(-1);
28238
28238
  },
28239
28239
  onBlur: () => setTimeout(() => {
28240
28240
  R(!1), P(-1);
@@ -28363,10 +28363,10 @@ function A_({
28363
28363
  pinnedTopRows: m,
28364
28364
  onPinnedRemove: b
28365
28365
  }) {
28366
- 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) => {
28367
28367
  const te = [...e];
28368
28368
  te[A] = { ...te[A], [H]: G }, n(te);
28369
- }, B = () => n([...e, wn()]), L = (A) => {
28369
+ }, B = () => n([...e, wn()]), M = (A) => {
28370
28370
  const H = [...e];
28371
28371
  H.splice(A, 0, wn()), n(H);
28372
28372
  }, D = (A) => {
@@ -28503,7 +28503,7 @@ function A_({
28503
28503
  onRemove: () => D(H)
28504
28504
  }
28505
28505
  ) }),
28506
- /* @__PURE__ */ o(dv, { onInsert: () => L(H + 1), accentColor: p })
28506
+ /* @__PURE__ */ o(dv, { onInsert: () => M(H + 1), accentColor: p })
28507
28507
  ] }, A.id)) })
28508
28508
  ] }),
28509
28509
  k && /* @__PURE__ */ o(
@@ -28534,7 +28534,7 @@ function pv() {
28534
28534
  );
28535
28535
  }
28536
28536
  function fv({ seg: t, dims: e, accent: n, disabled: r }) {
28537
- 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 = () => {
28538
28538
  if (r) return;
28539
28539
  const f = l.current;
28540
28540
  if (!f) return;
@@ -28777,41 +28777,41 @@ function L_({
28777
28777
  onReset: f,
28778
28778
  resetTitle: h = "Reset view"
28779
28779
  }) {
28780
- const m = M(null), b = M({
28780
+ const m = L(null), b = L({
28781
28781
  dragging: !1,
28782
28782
  startX: 0,
28783
28783
  startY: 0,
28784
28784
  originLeft: 0,
28785
28785
  originTop: 0
28786
- }), 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) => {
28787
28787
  p === void 0 && k(R), g == null || g(R);
28788
28788
  }, [p, g]), _ = se((R) => {
28789
28789
  const B = b.current;
28790
28790
  if (!B.dragging || !m.current) return;
28791
- const L = R.clientX - B.startX, D = c === "x" ? 0 : R.clientY - B.startY;
28792
- (Math.abs(L) > 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 + L)), O = Math.max(0, Math.min(window.innerHeight - P.offsetHeight, B.originTop + D));
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
28794
  P.style.left = `${T}px`, P.style.top = `${O}px`, P.style.transform = "none";
28795
28795
  }, [c]), I = se((R) => {
28796
28796
  const B = b.current;
28797
28797
  if (B.dragging) {
28798
28798
  if (B.dragging = !1, document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", I), m.current) {
28799
- const L = m.current.getBoundingClientRect();
28800
- a == null || a(L.left, L.top);
28799
+ const M = m.current.getBoundingClientRect();
28800
+ a == null || a(M.left, M.top);
28801
28801
  }
28802
28802
  w && !y.current && S(!1), R.stopPropagation();
28803
28803
  }
28804
28804
  }, [_, a, w, S]), E = se((R) => {
28805
28805
  if (!m.current) return;
28806
28806
  R.preventDefault();
28807
- const B = m.current, L = B.getBoundingClientRect();
28807
+ const B = m.current, M = B.getBoundingClientRect();
28808
28808
  y.current = !1, b.current = {
28809
28809
  dragging: !0,
28810
28810
  startX: R.clientX,
28811
28811
  startY: R.clientY,
28812
- originLeft: L.left,
28813
- originTop: L.top
28814
- }, B.style.position = "fixed", B.style.left = `${L.left}px`, B.style.top = `${L.top}px`, B.style.transform = "none", B.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);
28815
28815
  }, [_, I]);
28816
28816
  U(() => () => {
28817
28817
  document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", I);
@@ -30762,7 +30762,7 @@ function Iv(t) {
30762
30762
  });
30763
30763
  }
30764
30764
  function W_({ content: t, className: e = "", style: n }) {
30765
- const r = M(null), i = ue(() => kv(t), [t]), a = se(() => {
30765
+ const r = L(null), i = ue(() => kv(t), [t]), a = se(() => {
30766
30766
  r.current && Iv(r.current);
30767
30767
  }, []);
30768
30768
  return U(() => {
@@ -30795,7 +30795,7 @@ function F_({
30795
30795
  className: c = "",
30796
30796
  style: s
30797
30797
  }) {
30798
- 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) => {
30799
30799
  const _ = [...e];
30800
30800
  _[w] = { ..._[w], ...S }, n(_);
30801
30801
  }, h = (w) => {
@@ -30813,14 +30813,14 @@ function F_({
30813
30813
  }
30814
30814
  const E = _.map((B) => B.name), N = _.map((B) => B.type || "application/octet-stream"), R = [];
30815
30815
  for (const B of _) {
30816
- const L = await new Promise((D) => {
30816
+ const M = await new Promise((D) => {
30817
30817
  const P = new FileReader();
30818
30818
  P.onload = () => {
30819
30819
  const T = P.result;
30820
30820
  D(T.includes(",") ? T.split(",")[1] : T);
30821
30821
  }, P.readAsDataURL(B);
30822
30822
  });
30823
- R.push(L);
30823
+ R.push(M);
30824
30824
  }
30825
30825
  f(w, { fileNames: E, value: E.join(", "), fileData: R, fileMimeTypes: N });
30826
30826
  }, y = (w) => {
@@ -31046,12 +31046,12 @@ function Rv({
31046
31046
  accent: i,
31047
31047
  disabled: a
31048
31048
  }) {
31049
- 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((_) => {
31050
31050
  const I = p.current, E = _ + m / 2;
31051
31051
  for (let N = 0; N < I.length; N++) {
31052
31052
  const R = I[N];
31053
31053
  if (!R) continue;
31054
- const L = (b + N * e + e / 2 - E) / e, D = Math.abs(L), P = Jt(1 - D * 0.38, 0.15, 1), T = Jt(1 - D * 0.14, 0.68, 1), O = Jt(L * 24, -58, 58);
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
31055
  R.style.opacity = String(P), R.style.transform = `perspective(700px) rotateX(${O}deg) scale(${T})`;
31056
31056
  }
31057
31057
  }, [e, m, b]), k = se((_, I) => {
@@ -31233,7 +31233,7 @@ function Hi({
31233
31233
  fontSize: a
31234
31234
  }) {
31235
31235
  var g;
31236
- 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);
31237
31237
  U(() => {
31238
31238
  if (!l || !s.current || !d.current) return;
31239
31239
  const f = s.current, h = d.current, m = () => {
@@ -31326,7 +31326,7 @@ function Co({
31326
31326
  className: g = "",
31327
31327
  style: f
31328
31328
  }) {
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 : [], L = 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(($) => {
31330
31330
  if (e === "single")
31331
31331
  return typeof n == "string" && kn($, dt(n)) ? "selected" : "none";
31332
31332
  if (e === "range") {
@@ -31400,7 +31400,7 @@ function Co({
31400
31400
  /* @__PURE__ */ x("div", { className: `dui_calendar__grid dui_calendar__grid--${k}`, children: [
31401
31401
  Nv.map(($, A) => /* @__PURE__ */ o("div", { className: "dui_calendar__weekday", style: { width: h.cellSize, fontSize: h.fontSize }, children: $ }, A)),
31402
31402
  E.map(($, A) => {
31403
- const H = $.getMonth() !== y.getMonth(), G = L($), 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(L(E[A - 1])), Ee = he && A % 7 !== 6 && de(L(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;
31404
31404
  return /* @__PURE__ */ x("div", { className: "dui_calendar__cell", style: { height: h.cellSize }, children: [
31405
31405
  he && /* @__PURE__ */ o(
31406
31406
  "span",
@@ -31470,7 +31470,7 @@ function U_({
31470
31470
  className: p = "",
31471
31471
  style: g
31472
31472
  }) {
31473
- 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))";
31474
31474
  return U(() => {
31475
31475
  if (!f || !m.current || !b.current) return;
31476
31476
  const k = m.current, w = b.current, S = () => {
@@ -31485,8 +31485,8 @@ function U_({
31485
31485
  }, [f]), U(() => {
31486
31486
  if (!f) return;
31487
31487
  const k = (w) => {
31488
- var S, _;
31489
- (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);
31490
31490
  };
31491
31491
  return document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
31492
31492
  }, [f]), /* @__PURE__ */ x("div", { "data-testid": t, className: `relative inline-block ${p}`, style: g, children: [
@@ -31632,7 +31632,7 @@ function V_({
31632
31632
  className: f = "",
31633
31633
  style: h
31634
31634
  }) {
31635
- 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);
31636
31636
  return U(() => {
31637
31637
  if (!m || !y.current || !v.current) return;
31638
31638
  const I = y.current, E = v.current, N = () => {
@@ -31647,8 +31647,8 @@ function V_({
31647
31647
  }, [m]), U(() => {
31648
31648
  if (!m) return;
31649
31649
  const I = (E) => {
31650
- var N, R;
31651
- (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);
31652
31652
  };
31653
31653
  return document.addEventListener("mousedown", I), () => document.removeEventListener("mousedown", I);
31654
31654
  }, [m]), /* @__PURE__ */ x("div", { "data-testid": t, className: `relative inline-block ${f}`, style: h, children: [
@@ -31986,15 +31986,15 @@ function Y_({
31986
31986
  className: u = "",
31987
31987
  style: p
31988
31988
  }) {
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 = 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(
31990
31990
  t ? typeof t == "number" ? t : t.getTime() : Date.now() + (e ?? 60) * 1e3
31991
- ), 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);
31992
31992
  U(() => {
31993
31993
  if (d) return;
31994
31994
  let R;
31995
31995
  const B = () => {
31996
- const L = Math.max(0, v.current - Date.now());
31997
- if (_(L), L <= 0) {
31996
+ const M = Math.max(0, v.current - Date.now());
31997
+ if (_(M), M <= 0) {
31998
31998
  I.current || (I.current = !0, n == null || n());
31999
31999
  return;
32000
32000
  }