@salilvnair/dui 1.0.16 → 1.0.17

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
@@ -1120,7 +1120,7 @@ function Qv({
1120
1120
  className: u = "",
1121
1121
  align: p = "auto"
1122
1122
  }) {
1123
- const [g, f] = z(!1), h = M(null), m = l || "var(--color-primary)", b = je(r === "default" ? void 0 : r), y = b.height, v = b.fontSize, k = b.paddingX, w = i ? b.borderRadius : "0px", S = c || s, _ = n === "primary", I = n === "danger", E = _ ? "var(--color-btn-primary-text, #fff)" : I ? "var(--color-btn-danger-text, #fff)" : "var(--color-text-primary)", N = _ ? m : I ? "var(--color-error)" : n === "ghost" ? "transparent" : "var(--color-surface-hover)", R = _ || I || n === "ghost" ? "1px solid transparent" : "1px solid var(--color-surface-border)", P = _ || I ? "rgba(0,0,0,0.12)" : "var(--color-surface-active)";
1123
+ const [g, f] = z(!1), h = 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)";
1124
1124
  return /* @__PURE__ */ x(ve, { children: [
1125
1125
  /* @__PURE__ */ x(
1126
1126
  "div",
@@ -1137,7 +1137,7 @@ function Qv({
1137
1137
  color: E,
1138
1138
  padding: 0,
1139
1139
  transition: "background 120ms",
1140
- "--dui-hover-btn-bg": P
1140
+ "--dui-hover-btn-bg": B
1141
1141
  },
1142
1142
  children: [
1143
1143
  /* @__PURE__ */ x(
@@ -1181,7 +1181,7 @@ function Qv({
1181
1181
  {
1182
1182
  type: "button",
1183
1183
  disabled: c,
1184
- onClick: () => !c && f((D) => !D),
1184
+ onClick: () => !c && f((L) => !L),
1185
1185
  className: "dui_dropdown-button__chevron",
1186
1186
  style: {
1187
1187
  height: "100%",
@@ -1239,11 +1239,11 @@ const Or = yo(
1239
1239
  fontStyle: S,
1240
1240
  ..._
1241
1241
  }, I) {
1242
- const [E, N] = z(!1), [R, P] = z(!1), D = Ue(e === "default" ? void 0 : e, { width: v, borderRadius: k, color: w, fontStyle: S }), L = r || "var(--color-accent, var(--color-primary))", B = n ? D.borderRadius : "0px", T = c ?? a, O = d ? null : s ?? l, W = i ? "var(--color-error)" : E ? L : "var(--color-input-border)", $ = p ? {
1242
+ const [E, N] = z(!1), [R, B] = z(!1), 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 ? {
1243
1243
  display: "inline-flex",
1244
1244
  alignItems: "center",
1245
- height: D.height,
1246
- width: D.width !== "auto" ? D.width : void 0,
1245
+ height: L.height,
1246
+ width: L.width !== "auto" ? L.width : void 0,
1247
1247
  border: "none",
1248
1248
  // When naked + error: red bottom underline so the error state is visible
1249
1249
  borderBottom: i ? "1px solid color-mix(in srgb, var(--color-error) 60%, transparent)" : "none",
@@ -1254,18 +1254,18 @@ const Or = yo(
1254
1254
  } : {
1255
1255
  display: "inline-flex",
1256
1256
  alignItems: "center",
1257
- height: D.height,
1258
- width: D.width !== "auto" ? D.width : void 0,
1259
- borderRadius: B,
1257
+ height: L.height,
1258
+ width: L.width !== "auto" ? L.width : void 0,
1259
+ borderRadius: P,
1260
1260
  border: `1px solid ${W}`,
1261
1261
  background: "var(--color-input-bg)",
1262
1262
  transition: "border-color 140ms, box-shadow 140ms",
1263
- boxShadow: E ? `0 0 0 2px color-mix(in srgb, ${L} 20%, transparent)` : "none",
1263
+ boxShadow: E ? `0 0 0 2px color-mix(in srgb, ${D} 20%, transparent)` : "none",
1264
1264
  overflow: "hidden",
1265
1265
  ...g
1266
1266
  }, A = d ? R ? "text" : "password" : y ?? "text", H = R ? (u == null ? void 0 : u.shown) ?? /* @__PURE__ */ o(cn, { size: 14 }) : (u == null ? void 0 : u.hidden) ?? /* @__PURE__ */ o(dn, { size: 14 });
1267
1267
  return /* @__PURE__ */ x("div", { style: $, className: h, children: [
1268
- T && /* @__PURE__ */ o("span", { style: { paddingLeft: D.paddingX, display: "flex", alignItems: "center", color: p && i ? "var(--color-error)" : "var(--color-text-muted)", flexShrink: 0, transition: "color 140ms" }, children: T }),
1268
+ T && /* @__PURE__ */ o("span", { style: { paddingLeft: L.paddingX, display: "flex", alignItems: "center", color: p && i ? "var(--color-error)" : "var(--color-text-muted)", flexShrink: 0, transition: "color 140ms" }, children: T }),
1269
1269
  /* @__PURE__ */ o(
1270
1270
  "input",
1271
1271
  {
@@ -1274,14 +1274,14 @@ const Or = yo(
1274
1274
  style: {
1275
1275
  flex: 1,
1276
1276
  height: "100%",
1277
- paddingLeft: T ? "6px" : D.paddingX,
1278
- paddingRight: d || O ? "6px" : D.paddingX,
1279
- fontSize: D.fontSize,
1277
+ paddingLeft: T ? "6px" : L.paddingX,
1278
+ paddingRight: d || O ? "6px" : L.paddingX,
1279
+ fontSize: L.fontSize,
1280
1280
  background: "transparent",
1281
1281
  border: "none",
1282
1282
  outline: "none",
1283
- color: p && i ? "var(--color-error)" : D.color || "var(--color-text-primary)",
1284
- fontStyle: D.fontStyle,
1283
+ color: p && i ? "var(--color-error)" : L.color || "var(--color-text-primary)",
1284
+ fontStyle: L.fontStyle,
1285
1285
  minWidth: 0,
1286
1286
  fontFamily: "inherit",
1287
1287
  caretColor: p && i ? "var(--color-error)" : void 0,
@@ -1296,14 +1296,14 @@ const Or = yo(
1296
1296
  ..._
1297
1297
  }
1298
1298
  ),
1299
- O && /* @__PURE__ */ o("span", { style: { paddingRight: D.paddingX, display: "flex", alignItems: "center", color: "var(--color-text-muted)", flexShrink: 0 }, children: O }),
1299
+ O && /* @__PURE__ */ o("span", { style: { paddingRight: L.paddingX, display: "flex", alignItems: "center", color: "var(--color-text-muted)", flexShrink: 0 }, children: O }),
1300
1300
  d && /* @__PURE__ */ o(
1301
1301
  "button",
1302
1302
  {
1303
1303
  type: "button",
1304
- onClick: () => P((G) => !G),
1304
+ onClick: () => B((G) => !G),
1305
1305
  style: {
1306
- paddingRight: D.paddingX,
1306
+ paddingRight: L.paddingX,
1307
1307
  display: "flex",
1308
1308
  alignItems: "center",
1309
1309
  background: "none",
@@ -1529,9 +1529,9 @@ function Mn({
1529
1529
  };
1530
1530
  return document.addEventListener("mousedown", T), () => document.removeEventListener("mousedown", T);
1531
1531
  }, [b]);
1532
- const P = se((T) => {
1532
+ const B = se((T) => {
1533
1533
  r(T), y(!1);
1534
- }, [r]), D = (T) => {
1534
+ }, [r]), L = (T) => {
1535
1535
  if (p) return;
1536
1536
  if (!b) {
1537
1537
  (T.key === "Enter" || T.key === " " || T.key === "ArrowDown") && (T.preventDefault(), y(!0));
@@ -1540,23 +1540,23 @@ function Mn({
1540
1540
  const O = e.filter(($) => !$.isHeader).findIndex(($) => $.value === n), W = e.filter(($) => !$.isHeader);
1541
1541
  switch (T.key) {
1542
1542
  case "ArrowDown":
1543
- T.preventDefault(), P(W[(O + 1) % W.length].value);
1543
+ T.preventDefault(), B(W[(O + 1) % W.length].value);
1544
1544
  break;
1545
1545
  case "ArrowUp":
1546
- T.preventDefault(), P(W[(O - 1 + W.length) % W.length].value);
1546
+ T.preventDefault(), B(W[(O - 1 + W.length) % W.length].value);
1547
1547
  break;
1548
1548
  case "Escape":
1549
1549
  y(!1);
1550
1550
  break;
1551
1551
  }
1552
- }, L = b || v ? E : "var(--color-input-border)", B = b || v ? `0 0 0 2px color-mix(in srgb, ${E} 20%, transparent)` : "none";
1552
+ }, D = b || v ? E : "var(--color-input-border)", P = b || v ? `0 0 0 2px color-mix(in srgb, ${E} 20%, transparent)` : "none";
1553
1553
  return /* @__PURE__ */ x(
1554
1554
  "div",
1555
1555
  {
1556
1556
  "data-testid": t,
1557
1557
  className: `relative inline-block ${g}`,
1558
1558
  style: { width: h, ...f },
1559
- onKeyDown: D,
1559
+ onKeyDown: L,
1560
1560
  children: [
1561
1561
  /* @__PURE__ */ x(
1562
1562
  "button",
@@ -1578,12 +1578,12 @@ function Mn({
1578
1578
  paddingRight: I.paddingX,
1579
1579
  fontSize: I.fontSize,
1580
1580
  background: "var(--color-input-bg)",
1581
- border: `1px solid ${L}`,
1581
+ border: `1px solid ${D}`,
1582
1582
  borderRadius: N,
1583
1583
  color: R ? "var(--color-text-primary)" : "var(--color-text-muted)",
1584
1584
  cursor: p ? "default" : "pointer",
1585
1585
  transition: "border-color 140ms, box-shadow 140ms",
1586
- boxShadow: B,
1586
+ boxShadow: P,
1587
1587
  opacity: p ? 0.5 : 1,
1588
1588
  fontFamily: "inherit",
1589
1589
  fontWeight: 500,
@@ -1634,7 +1634,7 @@ function Mn({
1634
1634
  {
1635
1635
  role: "option",
1636
1636
  "aria-selected": T.value === n,
1637
- onClick: () => P(T.value),
1637
+ onClick: () => B(T.value),
1638
1638
  className: `dui_select__option${T.value === n ? " dui_select__option--selected" : ""}`,
1639
1639
  style: {
1640
1640
  display: "flex",
@@ -1829,7 +1829,7 @@ function t1({
1829
1829
  fontStyle: w,
1830
1830
  className: S = ""
1831
1831
  }) {
1832
- const _ = Ie(), I = c ?? _.size, E = Ue(c, { width: y, borderRadius: v, color: k, fontStyle: w }), N = u ?? sm[I], R = d ?? "var(--color-accent, var(--color-primary))", P = Math.max(Math.round(parseFloat(E.fontSize) * 1.2 * 10) / 10, 16), D = Math.max(0, (parseFloat(E.height) - 2 - P) / 2), [L, B] = z(!1), [T, O] = z(!1), [W, $] = z(!1), [A, H] = z(-1), [G, te] = z(!1), Z = M(null), de = M(null), he = M(null), Ae = M(!1), Ee = M(!1), X = M(!1), pe = M(null), V = M(Fa()), { caret: xe, syncCaret: ke, setCaret: Ce } = Ua(he, i.length), [Te, at] = z({ top: 0, left: 0, width: 0 }), [tt, j] = z({ top: 0, left: 0, width: 0 }), oe = n.find((K) => K.value === e), q = (oe == null ? void 0 : oe.color) ?? "var(--color-text-primary)";
1832
+ const _ = Ie(), I = c ?? _.size, E = Ue(c, { width: y, borderRadius: v, color: k, fontStyle: w }), N = u ?? sm[I], R = d ?? "var(--color-accent, var(--color-primary))", B = Math.max(Math.round(parseFloat(E.fontSize) * 1.2 * 10) / 10, 16), 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)";
1833
1833
  U(() => {
1834
1834
  const K = he.current;
1835
1835
  K && (K.innerHTML = Et(i), pe.current = i, V.current.reset(i, i.length));
@@ -1867,17 +1867,17 @@ function t1({
1867
1867
  const K = de.current;
1868
1868
  if (!K) return;
1869
1869
  const ae = K.getBoundingClientRect();
1870
- at({ top: ae.bottom + 4, left: ae.left, width: Math.max(ae.width, 120) }), B((we) => !we);
1870
+ at({ top: ae.bottom + 4, left: ae.left, width: Math.max(ae.width, 120) }), P((we) => !we);
1871
1871
  };
1872
1872
  U(() => {
1873
- if (!L) return;
1873
+ if (!D) return;
1874
1874
  const K = (ae) => {
1875
1875
  const we = ae.target;
1876
- !we.closest("[data-stiv-method]") && !we.closest("[data-stiv-trigger]") && B(!1);
1876
+ !we.closest("[data-stiv-method]") && !we.closest("[data-stiv-trigger]") && P(!1);
1877
1877
  };
1878
1878
  return document.addEventListener("mousedown", K), () => document.removeEventListener("mousedown", K);
1879
- }, [L]), U(() => {
1880
- if (!L) return;
1879
+ }, [D]), U(() => {
1880
+ if (!D) return;
1881
1881
  const K = () => {
1882
1882
  const ae = de.current;
1883
1883
  if (!ae) return;
@@ -1887,7 +1887,7 @@ function t1({
1887
1887
  return window.addEventListener("scroll", K, { passive: !0, capture: !0 }), window.addEventListener("resize", K, { passive: !0 }), () => {
1888
1888
  window.removeEventListener("scroll", K, { capture: !0 }), window.removeEventListener("resize", K);
1889
1889
  };
1890
- }, [L]), U(() => {
1890
+ }, [D]), U(() => {
1891
1891
  if (!Ae.current)
1892
1892
  if ((Ye.length > 0 || Qe.length > 0) && T) {
1893
1893
  const K = he.current;
@@ -1952,7 +1952,7 @@ function t1({
1952
1952
  }
1953
1953
  }
1954
1954
  h == null || h(K);
1955
- }, Bn = T || L ? R : "var(--color-input-border)";
1955
+ }, Bn = T || D ? R : "var(--color-input-border)";
1956
1956
  return /* @__PURE__ */ x(ve, { children: [
1957
1957
  /* @__PURE__ */ x(
1958
1958
  "div",
@@ -2003,7 +2003,7 @@ function t1({
2003
2003
  style: {
2004
2004
  flexShrink: 0,
2005
2005
  color: "var(--color-text-muted)",
2006
- transform: L ? "rotate(180deg)" : "rotate(0deg)",
2006
+ transform: D ? "rotate(180deg)" : "rotate(0deg)",
2007
2007
  transition: "transform 150ms ease"
2008
2008
  }
2009
2009
  }
@@ -2061,7 +2061,7 @@ function t1({
2061
2061
  style: {
2062
2062
  height: "100%",
2063
2063
  width: "100%",
2064
- padding: `${D}px ${E.paddingX}`,
2064
+ padding: `${L}px ${E.paddingX}`,
2065
2065
  boxSizing: "border-box",
2066
2066
  // display/align-content live in SelectTextInputView.css (block, never flex)
2067
2067
  // so they can carry an @supports fallback — see the note there.
@@ -2071,7 +2071,7 @@ function t1({
2071
2071
  // An explicit small line-height, never the field height: a full-height line
2072
2072
  // box would make the selection highlight and caret span the whole field.
2073
2073
  // Paired with editorPadY above, which is what actually centres it.
2074
- lineHeight: `${P}px`,
2074
+ lineHeight: `${B}px`,
2075
2075
  color: E.color ?? "var(--color-text-primary)",
2076
2076
  fontFamily: "inherit",
2077
2077
  fontStyle: E.fontStyle,
@@ -2089,9 +2089,9 @@ function t1({
2089
2089
  ghost: Ot,
2090
2090
  style: {
2091
2091
  border: "none",
2092
- padding: `${D}px ${E.paddingX}`,
2092
+ padding: `${L}px ${E.paddingX}`,
2093
2093
  fontSize: E.fontSize,
2094
- lineHeight: `${P}px`
2094
+ lineHeight: `${B}px`
2095
2095
  }
2096
2096
  }
2097
2097
  )
@@ -2099,7 +2099,7 @@ function t1({
2099
2099
  ]
2100
2100
  }
2101
2101
  ),
2102
- L && Se(
2102
+ D && Se(
2103
2103
  /* @__PURE__ */ o(
2104
2104
  "div",
2105
2105
  {
@@ -2124,7 +2124,7 @@ function t1({
2124
2124
  "div",
2125
2125
  {
2126
2126
  onMouseDown: (we) => {
2127
- we.preventDefault(), r(K.value), B(!1);
2127
+ we.preventDefault(), r(K.value), P(!1);
2128
2128
  },
2129
2129
  className: `dui_select-text__option${ae ? " dui_select-text__option--selected" : ""}`,
2130
2130
  style: {
@@ -2243,36 +2243,36 @@ function n1({
2243
2243
  className: f = "",
2244
2244
  style: h
2245
2245
  }) {
2246
- const m = p === "compact", b = d ?? um[a], y = Sr(i, { width: s, borderRadius: b, color: u }), v = M(null), [k, w] = z({ left: 0, width: 0 }), [S, _] = z(!1), I = M(!1), E = e.findIndex((B) => B.value === n), N = se(() => {
2247
- const B = v.current;
2248
- if (!B) return;
2249
- const O = B.querySelectorAll("button[data-seg]")[E];
2246
+ const m = p === "compact", b = d ?? um[a], y = Sr(i, { width: s, borderRadius: b, color: u }), v = M(null), [k, w] = z({ left: 0, width: 0 }), [S, _] = z(!1), I = M(!1), E = e.findIndex((P) => P.value === n), N = se(() => {
2247
+ const P = v.current;
2248
+ if (!P) return;
2249
+ const O = P.querySelectorAll("button[data-seg]")[E];
2250
2250
  O && w({ left: O.offsetLeft, width: O.offsetWidth });
2251
2251
  }, [E]);
2252
2252
  U(() => {
2253
2253
  if (N(), I.current) {
2254
2254
  _(!0);
2255
- const B = setTimeout(() => _(!1), 360);
2256
- return () => clearTimeout(B);
2255
+ const P = setTimeout(() => _(!1), 360);
2256
+ return () => clearTimeout(P);
2257
2257
  }
2258
2258
  I.current = !0;
2259
2259
  }, [n, E, e.length]), U(() => {
2260
- const B = v.current;
2261
- if (B) {
2260
+ const P = v.current;
2261
+ if (P) {
2262
2262
  if (typeof ResizeObserver < "u") {
2263
2263
  const T = new ResizeObserver(() => N());
2264
- return T.observe(B), () => T.disconnect();
2264
+ return T.observe(P), () => T.disconnect();
2265
2265
  }
2266
2266
  return window.addEventListener("resize", N), () => window.removeEventListener("resize", N);
2267
2267
  }
2268
2268
  }, [N]);
2269
- const R = se((B) => {
2269
+ const R = se((P) => {
2270
2270
  if (g) return;
2271
2271
  const T = e.filter((W) => !W.disabled);
2272
2272
  if (!T.length) return;
2273
2273
  const O = T.findIndex((W) => W.value === n);
2274
- B.key === "ArrowRight" ? (B.preventDefault(), r(T[(O + 1) % T.length].value)) : B.key === "ArrowLeft" && (B.preventDefault(), r(T[(O - 1 + T.length) % T.length].value));
2275
- }, [g, e, n, r]), P = m ? 2 : 3, D = m ? "4px" : y.borderRadius, L = a === "pointy" ? D : `calc(${D} + ${P}px)`;
2274
+ P.key === "ArrowRight" ? (P.preventDefault(), r(T[(O + 1) % T.length].value)) : P.key === "ArrowLeft" && (P.preventDefault(), r(T[(O - 1 + T.length) % T.length].value));
2275
+ }, [g, e, n, r]), B = m ? 2 : 3, L = m ? "4px" : y.borderRadius, D = a === "pointy" ? L : `calc(${L} + ${B}px)`;
2276
2276
  return /* @__PURE__ */ x(
2277
2277
  "div",
2278
2278
  {
@@ -2286,8 +2286,8 @@ function n1({
2286
2286
  display: "inline-flex",
2287
2287
  position: "relative",
2288
2288
  height: m ? 26 : y.height,
2289
- padding: P,
2290
- borderRadius: L,
2289
+ padding: B,
2290
+ borderRadius: D,
2291
2291
  // Recessed, not raised. `--color-input-bg` is the token for a surface
2292
2292
  // the UI is cut into; falling back to the panel keeps it sane in
2293
2293
  // themes that do not define one.
@@ -2332,11 +2332,11 @@ function n1({
2332
2332
  className: `dui_segctrl__indicator${S ? " dui_segctrl__indicator--bounce" : ""}`,
2333
2333
  style: {
2334
2334
  position: "absolute",
2335
- top: P,
2335
+ top: B,
2336
2336
  left: k.left,
2337
2337
  width: k.width,
2338
- height: `calc(100% - ${P * 2}px)`,
2339
- borderRadius: D,
2338
+ height: `calc(100% - ${B * 2}px)`,
2339
+ borderRadius: L,
2340
2340
  // Translucent accent wash + hairline, not a solid block — the
2341
2341
  // active segment should read as highlighted, not glow like a CTA.
2342
2342
  backgroundColor: `color-mix(in srgb, ${l} 22%, transparent)`,
@@ -2346,8 +2346,8 @@ function n1({
2346
2346
  }
2347
2347
  }
2348
2348
  ),
2349
- e.map((B) => {
2350
- const T = B.value === n;
2349
+ e.map((P) => {
2350
+ const T = P.value === n;
2351
2351
  return /* @__PURE__ */ x(
2352
2352
  "button",
2353
2353
  {
@@ -2355,8 +2355,8 @@ function n1({
2355
2355
  type: "button",
2356
2356
  role: "tab",
2357
2357
  "aria-selected": T,
2358
- disabled: B.disabled,
2359
- onClick: () => !B.disabled && B.value !== n && r(B.value),
2358
+ disabled: P.disabled,
2359
+ onClick: () => !P.disabled && P.value !== n && r(P.value),
2360
2360
  className: "dui_segctrl__seg",
2361
2361
  style: {
2362
2362
  display: "flex",
@@ -2373,8 +2373,8 @@ function n1({
2373
2373
  // Accent-tinted label on the translucent indicator — readable on
2374
2374
  // both themes without the white-on-solid-accent glare.
2375
2375
  color: T ? l : y.color ?? "var(--color-text-secondary)",
2376
- cursor: B.disabled ? "not-allowed" : "pointer",
2377
- opacity: B.disabled ? 0.35 : 1,
2376
+ cursor: P.disabled ? "not-allowed" : "pointer",
2377
+ opacity: P.disabled ? 0.35 : 1,
2378
2378
  position: "relative",
2379
2379
  zIndex: 1,
2380
2380
  // Flex items default to `min-width: auto`, which resolves to
@@ -2390,7 +2390,7 @@ function n1({
2390
2390
  userSelect: "none"
2391
2391
  },
2392
2392
  children: [
2393
- B.icon,
2393
+ P.icon,
2394
2394
  /* @__PURE__ */ o(
2395
2395
  "span",
2396
2396
  {
@@ -2400,12 +2400,12 @@ function n1({
2400
2400
  whiteSpace: "nowrap",
2401
2401
  minWidth: 0
2402
2402
  },
2403
- children: B.label
2403
+ children: P.label
2404
2404
  }
2405
2405
  )
2406
2406
  ]
2407
2407
  },
2408
- B.value
2408
+ P.value
2409
2409
  );
2410
2410
  })
2411
2411
  ]
@@ -2772,15 +2772,15 @@ function l1({
2772
2772
  var I, E, N;
2773
2773
  _.key === "Backspace" ? (m[S] ? y(S, "") : S > 0 && ((I = h.current[S - 1]) == null || I.focus(), y(S - 1, "")), _.preventDefault()) : _.key === "ArrowLeft" && S > 0 ? (E = h.current[S - 1]) == null || E.focus() : _.key === "ArrowRight" && S < i - 1 && ((N = h.current[S + 1]) == null || N.focus());
2774
2774
  }, w = (S, _) => {
2775
- var P;
2775
+ var B;
2776
2776
  _.preventDefault();
2777
2777
  const I = _.clipboardData.getData("text"), E = a ? I.replace(/[^0-9]/g, "") : I;
2778
2778
  if (!E) return;
2779
2779
  const N = m.slice();
2780
- for (let D = 0; D < E.length && S + D < i; D++) N[S + D] = E[D];
2780
+ for (let L = 0; L < E.length && S + L < i; L++) N[S + L] = E[L];
2781
2781
  b(N.join(""));
2782
2782
  const R = Math.min(S + E.length, i - 1);
2783
- (P = h.current[R]) == null || P.focus();
2783
+ (B = h.current[R]) == null || B.focus();
2784
2784
  };
2785
2785
  return /* @__PURE__ */ o("div", { "data-testid": t, className: u, style: { display: "flex", gap: g.gap, ...p }, children: m.map((S, _) => /* @__PURE__ */ o(
2786
2786
  "input",
@@ -3462,9 +3462,9 @@ function h1({
3462
3462
  className: u = "",
3463
3463
  style: p
3464
3464
  }) {
3465
- const g = vt(l, { borderRadius: c, color: s }), f = s ?? "var(--color-primary)", [h, m] = z(/* @__PURE__ */ new Set()), [b, y] = z(/* @__PURE__ */ new Set()), v = new Set(n), k = e.filter((R) => !v.has(R.value)), w = e.filter((R) => v.has(R.value)), S = (R, P, D) => {
3466
- const L = new Set(R);
3467
- L.has(D) ? L.delete(D) : L.add(D), P(L);
3465
+ const g = vt(l, { borderRadius: c, color: s }), f = s ?? "var(--color-primary)", [h, m] = z(/* @__PURE__ */ new Set()), [b, y] = z(/* @__PURE__ */ new Set()), v = new Set(n), k = e.filter((R) => !v.has(R.value)), w = e.filter((R) => v.has(R.value)), S = (R, B, L) => {
3466
+ const D = new Set(R);
3467
+ D.has(L) ? D.delete(L) : D.add(L), B(D);
3468
3468
  }, _ = () => {
3469
3469
  r([...n, ...Array.from(h)]), m(/* @__PURE__ */ new Set());
3470
3470
  }, I = () => {
@@ -4155,8 +4155,8 @@ function E1({
4155
4155
  }, [e, r, a]), U(() => {
4156
4156
  if (!e) return;
4157
4157
  const h = (b) => {
4158
- var y;
4159
- r != null && r.contains(b.target) || (y = p.current) != null && y.contains(b.target) || n();
4158
+ var y, v, k;
4159
+ r != null && r.contains(b.target) || (y = p.current) != null && y.contains(b.target) || (k = (v = b.target) == null ? void 0 : v.closest) != null && k.call(v, ".dui_combobox__menu, .dui_select__menu") || n();
4160
4160
  }, m = (b) => {
4161
4161
  b.key === "Escape" && n();
4162
4162
  };
@@ -4372,21 +4372,21 @@ function N1({
4372
4372
  }
4373
4373
  if (!I) return;
4374
4374
  h(0), _(!0);
4375
- const B = window.setTimeout(() => {
4375
+ const P = window.setTimeout(() => {
4376
4376
  E(!1), _(!1);
4377
4377
  }, Am);
4378
- return () => window.clearTimeout(B);
4378
+ return () => window.clearTimeout(P);
4379
4379
  }, [e, I]), U(() => {
4380
4380
  if (!I) return;
4381
- const B = (T) => {
4381
+ const P = (T) => {
4382
4382
  T.key === "Escape" && n();
4383
4383
  };
4384
- return document.addEventListener("keydown", B), () => document.removeEventListener("keydown", B);
4384
+ return document.addEventListener("keydown", P), () => document.removeEventListener("keydown", P);
4385
4385
  }, [I, n]);
4386
- const N = se((B) => {
4387
- if (!s || B.button !== 0) return;
4388
- B.preventDefault();
4389
- const T = { x: B.clientX, y: B.clientY, at: Date.now() };
4386
+ const N = se((P) => {
4387
+ if (!s || P.button !== 0) return;
4388
+ P.preventDefault();
4389
+ const T = { x: P.clientX, y: P.clientY, at: Date.now() };
4390
4390
  b(!0);
4391
4391
  const O = g.current ? mn(r) === "x" ? g.current.offsetWidth : g.current.offsetHeight : 0, W = Im(r), $ = () => mn(r) === "x" ? window.innerWidth : window.innerHeight, A = (G) => {
4392
4392
  const te = G.clientX - T.x, Z = G.clientY - T.y, de = Wr(W, te, Z);
@@ -4403,7 +4403,7 @@ function N1({
4403
4403
  window.addEventListener("pointermove", A), window.addEventListener("pointerup", H), window.addEventListener("pointercancel", H);
4404
4404
  }, [r, s, n]);
4405
4405
  if (!I) return null;
4406
- const R = mn(r) === "x", P = R ? "width" : "height", D = R ? "min(560px, 92vw)" : "min(60vh, 720px)", L = /* @__PURE__ */ x(ve, { children: [
4406
+ const R = mn(r) === "x", B = R ? "width" : "height", L = R ? "min(560px, 92vw)" : "min(60vh, 720px)", D = /* @__PURE__ */ x(ve, { children: [
4407
4407
  l ?? (a !== void 0 && /* @__PURE__ */ x("div", { className: "dui_sheet__head", children: [
4408
4408
  /* @__PURE__ */ o("span", { className: "dui_sheet__title", children: a }),
4409
4409
  /* @__PURE__ */ o("button", { type: "button", className: "dui_sheet__x", onClick: n, "aria-label": "Close", children: /* @__PURE__ */ o(Ze, { size: 14 }) })
@@ -4417,8 +4417,8 @@ function N1({
4417
4417
  {
4418
4418
  "data-testid": t,
4419
4419
  className: `dui_sheet__backdrop dui_sheet__backdrop--${r}` + (S ? " dui_sheet__backdrop--closing" : ""),
4420
- onPointerDown: d ? (B) => {
4421
- B.target === B.currentTarget && n();
4420
+ onPointerDown: d ? (P) => {
4421
+ P.target === P.currentTarget && n();
4422
4422
  } : void 0,
4423
4423
  children: /* @__PURE__ */ x(
4424
4424
  "div",
@@ -4430,7 +4430,7 @@ function N1({
4430
4430
  style: {
4431
4431
  /* What the handle was pulled to wins over what the caller asked for
4432
4432
  — it is the reader saying how much room this needs. */
4433
- [P]: k !== void 0 ? `${k}px` : typeof i == "number" ? `${i}px` : i ?? D,
4433
+ [B]: k !== void 0 ? `${k}px` : typeof i == "number" ? `${i}px` : i ?? L,
4434
4434
  /* Only while it is being held or springing back — at rest this is
4435
4435
  empty so the keyframes own the transform. */
4436
4436
  transform: zm(r, f) || void 0
@@ -4446,7 +4446,7 @@ function N1({
4446
4446
  children: /* @__PURE__ */ o("i", {})
4447
4447
  }
4448
4448
  ),
4449
- R ? /* @__PURE__ */ o("div", { className: "dui_sheet__body--side", children: L }) : L
4449
+ R ? /* @__PURE__ */ o("div", { className: "dui_sheet__body--side", children: D }) : D
4450
4450
  ]
4451
4451
  }
4452
4452
  )
@@ -4868,10 +4868,10 @@ function O1({
4868
4868
  fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
4869
4869
  cursor: n ? "text" : void 0
4870
4870
  },
4871
- children: N.map((R, P) => {
4872
- const D = P === N.length - 1, L = R.collapse;
4871
+ children: N.map((R, B) => {
4872
+ const L = B === N.length - 1, D = R.collapse;
4873
4873
  return /* @__PURE__ */ x("span", { style: { display: "flex", alignItems: "center", gap: 4, minWidth: 0 }, children: [
4874
- L ? /* @__PURE__ */ o(
4874
+ D ? /* @__PURE__ */ o(
4875
4875
  "button",
4876
4876
  {
4877
4877
  type: "button",
@@ -4887,7 +4887,7 @@ function O1({
4887
4887
  },
4888
4888
  children: /* @__PURE__ */ o(ho, { size: 13 })
4889
4889
  }
4890
- ) : e && !D ? /* @__PURE__ */ o(
4890
+ ) : e && !L ? /* @__PURE__ */ o(
4891
4891
  "button",
4892
4892
  {
4893
4893
  type: "button",
@@ -4907,19 +4907,19 @@ function O1({
4907
4907
  children: R.label
4908
4908
  }
4909
4909
  ) : /* @__PURE__ */ o("span", { style: {
4910
- color: D ? "var(--color-text-primary)" : g,
4911
- fontWeight: D ? 700 : 500,
4910
+ color: L ? "var(--color-text-primary)" : g,
4911
+ fontWeight: L ? 700 : 500,
4912
4912
  whiteSpace: "nowrap",
4913
4913
  padding: "1px 3px"
4914
4914
  }, children: R.label }),
4915
- !D && /* @__PURE__ */ o(
4915
+ !L && /* @__PURE__ */ o(
4916
4916
  Pe,
4917
4917
  {
4918
4918
  size: 11,
4919
4919
  style: { color: "var(--color-text-muted)", opacity: 0.55, flexShrink: 0 }
4920
4920
  }
4921
4921
  )
4922
- ] }, `${R.path}-${P}`);
4922
+ ] }, `${R.path}-${B}`);
4923
4923
  })
4924
4924
  }
4925
4925
  );
@@ -5618,17 +5618,17 @@ function ew({
5618
5618
  }, [h, n]), U(() => {
5619
5619
  if (!h || !v.current || !k.current) return;
5620
5620
  const E = v.current, N = k.current, R = () => {
5621
- const D = E.getBoundingClientRect();
5622
- N.style.top = `${D.bottom + 4}px`, N.style.left = `${Math.min(D.left, window.innerWidth - N.offsetWidth - 8)}px`;
5621
+ const L = E.getBoundingClientRect();
5622
+ N.style.top = `${L.bottom + 4}px`, N.style.left = `${Math.min(L.left, window.innerWidth - N.offsetWidth - 8)}px`;
5623
5623
  };
5624
5624
  R();
5625
- const P = requestAnimationFrame(R);
5626
- return () => cancelAnimationFrame(P);
5625
+ const B = requestAnimationFrame(R);
5626
+ return () => cancelAnimationFrame(B);
5627
5627
  }, [h, b]), U(() => {
5628
5628
  if (!h) return;
5629
5629
  const E = (N) => {
5630
- var R, P;
5631
- (R = v.current) != null && R.contains(N.target) || (P = k.current) != null && P.contains(N.target) || m(!1);
5630
+ var R, B;
5631
+ (R = v.current) != null && R.contains(N.target) || (B = k.current) != null && B.contains(N.target) || m(!1);
5632
5632
  };
5633
5633
  return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
5634
5634
  }, [h]);
@@ -5674,14 +5674,14 @@ function ew({
5674
5674
  ),
5675
5675
  h && Se(
5676
5676
  /* @__PURE__ */ o("div", { ref: k, className: "dui_cascader__menu", style: { position: "fixed", zIndex: 99999 }, children: w.map((E, N) => /* @__PURE__ */ o("div", { className: "dui_cascader__column", children: E.map((R) => {
5677
- const P = b[N] === R.value;
5677
+ const B = b[N] === R.value;
5678
5678
  return /* @__PURE__ */ x(
5679
5679
  "button",
5680
5680
  {
5681
5681
  type: "button",
5682
- className: `dui_cascader__item${P ? " dui_cascader__item--active" : ""}`,
5682
+ className: `dui_cascader__item${B ? " dui_cascader__item--active" : ""}`,
5683
5683
  onClick: () => _(N, R),
5684
- style: { fontSize: g.fontSize, color: P ? f : "var(--color-text-primary)" },
5684
+ style: { fontSize: g.fontSize, color: B ? f : "var(--color-text-primary)" },
5685
5685
  children: [
5686
5686
  R.label,
5687
5687
  R.children && /* @__PURE__ */ o(Pe, { size: 11, style: { marginLeft: "auto", opacity: 0.5 } })
@@ -5718,8 +5718,8 @@ function tw({
5718
5718
  U(() => {
5719
5719
  if (!m || !k.current || !w.current) return;
5720
5720
  const I = k.current, E = w.current, N = () => {
5721
- const P = I.getBoundingClientRect();
5722
- E.style.top = `${P.bottom + 4}px`, E.style.left = `${P.left}px`, E.style.minWidth = `${P.width}px`;
5721
+ const B = I.getBoundingClientRect();
5722
+ E.style.top = `${B.bottom + 4}px`, E.style.left = `${B.left}px`, E.style.minWidth = `${B.width}px`;
5723
5723
  };
5724
5724
  N();
5725
5725
  const R = requestAnimationFrame(N);
@@ -5727,11 +5727,11 @@ function tw({
5727
5727
  }, [m, S.length]), U(() => {
5728
5728
  if (!m) return;
5729
5729
  const I = (E) => {
5730
- var N, R;
5731
- (N = k.current) != null && N.contains(E.target) || (R = w.current) != null && R.contains(E.target) || (b(!1), l && r(y));
5730
+ var N, R, B;
5731
+ (N = k.current) != null && N.contains(E.target) || (R = w.current) != null && R.contains(E.target) || (b(!1), l && r(((B = e.find((L) => L.label === y)) == null ? void 0 : B.value) ?? y));
5732
5732
  };
5733
5733
  return document.addEventListener("mousedown", I), () => document.removeEventListener("mousedown", I);
5734
- }, [m, l, y, r]);
5734
+ }, [m, l, y, r, e]);
5735
5735
  const _ = (I) => {
5736
5736
  v(I.label), r(I.value), b(!1);
5737
5737
  };
@@ -5765,14 +5765,17 @@ function tw({
5765
5765
  }
5766
5766
  ),
5767
5767
  m && S.length > 0 && Se(
5768
- /* @__PURE__ */ o("div", { ref: w, className: "dui_combobox__menu", style: { position: "fixed", zIndex: 99999 }, children: S.map((I) => /* @__PURE__ */ o(
5768
+ /* @__PURE__ */ o("div", { ref: w, className: "dui_combobox__menu", style: { position: "fixed", zIndex: 99999 }, children: S.map((I) => /* @__PURE__ */ x(
5769
5769
  "button",
5770
5770
  {
5771
5771
  type: "button",
5772
5772
  className: "dui_combobox__item",
5773
5773
  onClick: () => _(I),
5774
- style: { fontSize: f.fontSize },
5775
- children: I.label
5774
+ style: { fontSize: f.fontSize, display: "flex", alignItems: "center", gap: 12 },
5775
+ children: [
5776
+ /* @__PURE__ */ o("span", { style: { flex: 1, minWidth: 0, overflow: "hidden", textOverflow: "ellipsis" }, children: I.label }),
5777
+ I.hint && /* @__PURE__ */ o("span", { style: { flexShrink: 0, opacity: 0.6, fontVariantNumeric: "tabular-nums" }, children: I.hint })
5778
+ ]
5776
5779
  },
5777
5780
  I.value
5778
5781
  )) }),
@@ -6521,8 +6524,8 @@ function hw({
6521
6524
  const _ = (E) => {
6522
6525
  const N = h.current;
6523
6526
  if (!N) return;
6524
- const R = N.getBoundingClientRect(), P = Math.min(1, Math.max(0, (E.clientX - R.left) / R.width)), D = y(r + P * (i - r));
6525
- n(w === "lo" ? [Math.min(D, b), b] : [m, Math.max(D, m)]);
6527
+ const R = N.getBoundingClientRect(), B = Math.min(1, Math.max(0, (E.clientX - R.left) / R.width)), L = y(r + B * (i - r));
6528
+ n(w === "lo" ? [Math.min(L, b), b] : [m, Math.max(L, m)]);
6526
6529
  }, I = () => {
6527
6530
  window.removeEventListener("pointermove", _), window.removeEventListener("pointerup", I);
6528
6531
  };
@@ -9070,20 +9073,20 @@ function uk({
9070
9073
  U(() => {
9071
9074
  var O;
9072
9075
  if (!a) return;
9073
- const L = R.current;
9074
- if (!L) return;
9075
- const B = typeof window < "u" && ((O = window.matchMedia) == null ? void 0 : O.call(window, "(prefers-reduced-motion: reduce)").matches), T = requestAnimationFrame(() => {
9076
- L.scrollIntoView({
9077
- behavior: B ? "auto" : "smooth",
9076
+ const D = R.current;
9077
+ if (!D) return;
9078
+ const P = typeof window < "u" && ((O = window.matchMedia) == null ? void 0 : O.call(window, "(prefers-reduced-motion: reduce)").matches), T = requestAnimationFrame(() => {
9079
+ D.scrollIntoView({
9080
+ behavior: P ? "auto" : "smooth",
9078
9081
  block: "nearest",
9079
9082
  inline: "nearest"
9080
9083
  });
9081
9084
  });
9082
9085
  return () => cancelAnimationFrame(T);
9083
9086
  }, [a, t]);
9084
- const P = M(void 0);
9085
- a && (P.current = a);
9086
- const D = {
9087
+ const B = M(void 0);
9088
+ a && (B.current = a);
9089
+ const L = {
9087
9090
  fontSize: 9,
9088
9091
  fontWeight: 600,
9089
9092
  letterSpacing: ".07em",
@@ -9104,9 +9107,9 @@ function uk({
9104
9107
  padding: "5px 12px 6px",
9105
9108
  borderBottom: "1px solid var(--color-surface-border)"
9106
9109
  }, children: [
9107
- /* @__PURE__ */ o("span", { style: { ...D, flex: 1, minWidth: 0 }, children: "name" }),
9108
- l && /* @__PURE__ */ o("span", { style: { ...D, width: 88, textAlign: "right" }, children: "size" }),
9109
- c && /* @__PURE__ */ o("span", { style: { ...D, width: 132, textAlign: "right" }, children: "modified" }),
9110
+ /* @__PURE__ */ o("span", { style: { ...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
9113
  d.length > 0 && /* @__PURE__ */ o("span", { style: { width: d.length * (s ? 21 : 29) } })
9111
9114
  ] }),
9112
9115
  /* @__PURE__ */ x(
@@ -9120,8 +9123,8 @@ function uk({
9120
9123
  display: "flex",
9121
9124
  flexDirection: "column"
9122
9125
  },
9123
- onContextMenu: r ? (L) => {
9124
- L.target.closest("[data-file-row]") || (L.preventDefault(), r(L));
9126
+ onContextMenu: r ? (D) => {
9127
+ D.target.closest("[data-file-row]") || (D.preventDefault(), r(D));
9125
9128
  } : void 0,
9126
9129
  children: [
9127
9130
  p && /* @__PURE__ */ x(
@@ -9202,19 +9205,19 @@ function uk({
9202
9205
  color: "var(--color-text-muted)",
9203
9206
  fontSize: E.fontSize
9204
9207
  }, children: b }),
9205
- t.map((L) => {
9206
- const B = !!L.disabledReason, T = L.kind === "dir", O = L.id === g, W = L.id === a, $ = d.filter((A) => !A.show || A.show(L));
9208
+ t.map((D) => {
9209
+ const P = !!D.disabledReason, T = D.kind === "dir", O = D.id === g, W = D.id === a, $ = d.filter((A) => !A.show || A.show(D));
9207
9210
  return /* @__PURE__ */ x(
9208
9211
  "div",
9209
9212
  {
9210
9213
  "data-file-row": "",
9211
9214
  ref: W ? R : void 0,
9212
- onClick: !B && i ? () => i(L) : void 0,
9213
- onDoubleClick: !B && e ? () => e(L) : void 0,
9215
+ onClick: !P && i ? () => i(D) : void 0,
9216
+ onDoubleClick: !P && e ? () => e(D) : void 0,
9214
9217
  onContextMenu: n ? (A) => {
9215
- A.preventDefault(), i == null || i(L), n(L, A);
9218
+ A.preventDefault(), i == null || i(D), n(D, A);
9216
9219
  } : void 0,
9217
- title: L.disabledReason ?? L.name,
9220
+ title: D.disabledReason ?? D.name,
9218
9221
  style: {
9219
9222
  display: "flex",
9220
9223
  alignItems: "center",
@@ -9230,9 +9233,9 @@ function uk({
9230
9233
  // A row that responds to a click has to look like it will.
9231
9234
  // The default text caret says "select this string" and is the
9232
9235
  // single most common reason a list feels dead.
9233
- cursor: B ? "default" : i || e ? "pointer" : "default",
9234
- opacity: B ? 0.62 : 1,
9235
- transition: L.id === P.current ? "background .5s ease, box-shadow .5s ease" : "background .12s ease, box-shadow .12s ease",
9236
+ cursor: P ? "default" : i || e ? "pointer" : "default",
9237
+ opacity: P ? 0.62 : 1,
9238
+ transition: D.id === B.current ? "background .5s ease, box-shadow .5s ease" : "background .12s ease, box-shadow .12s ease",
9236
9239
  userSelect: "none"
9237
9240
  },
9238
9241
  children: [
@@ -9246,13 +9249,13 @@ function uk({
9246
9249
  /* @__PURE__ */ o("span", { style: {
9247
9250
  display: "flex",
9248
9251
  flexShrink: 0,
9249
- color: W ? xn : Ix(L)
9250
- }, children: B ? /* @__PURE__ */ o($n, { size: 14 }) : T ? /* @__PURE__ */ o(xr, { size: 14 }) : L.kind === "link" ? /* @__PURE__ */ o(yr, { size: 14 }) : /* @__PURE__ */ o(mr, { size: 14 }) }),
9251
- T && !B && e ? /* @__PURE__ */ o(
9252
+ color: W ? xn : Ix(D)
9253
+ }, children: P ? /* @__PURE__ */ o($n, { size: 14 }) : T ? /* @__PURE__ */ o(xr, { size: 14 }) : D.kind === "link" ? /* @__PURE__ */ o(yr, { size: 14 }) : /* @__PURE__ */ o(mr, { size: 14 }) }),
9254
+ T && !P && e ? /* @__PURE__ */ o(
9252
9255
  "button",
9253
9256
  {
9254
9257
  type: "button",
9255
- onClick: () => e(L),
9258
+ onClick: () => e(D),
9256
9259
  style: {
9257
9260
  border: "none",
9258
9261
  background: "transparent",
@@ -9268,28 +9271,28 @@ function uk({
9268
9271
  textOverflow: "ellipsis",
9269
9272
  whiteSpace: "nowrap"
9270
9273
  },
9271
- children: L.name
9274
+ children: D.name
9272
9275
  }
9273
9276
  ) : /* @__PURE__ */ o("span", { style: {
9274
9277
  fontFamily: "ui-monospace, monospace",
9275
9278
  fontSize: s ? 10 : E.fontSize,
9276
- color: W ? Hr : B ? "var(--color-text-muted)" : "var(--color-text-primary)",
9279
+ color: W ? Hr : P ? "var(--color-text-muted)" : "var(--color-text-primary)",
9277
9280
  fontWeight: W ? 600 : void 0,
9278
9281
  minWidth: 0,
9279
9282
  overflow: "hidden",
9280
9283
  textOverflow: "ellipsis",
9281
9284
  whiteSpace: "nowrap"
9282
- }, children: Sx(L.name, f, W ? xn : void 0) }),
9283
- L.linkTarget && /* @__PURE__ */ x("span", { style: {
9285
+ }, children: Sx(D.name, f, W ? xn : void 0) }),
9286
+ D.linkTarget && /* @__PURE__ */ x("span", { style: {
9284
9287
  fontFamily: "ui-monospace, monospace",
9285
9288
  fontSize: E.fontSize,
9286
9289
  color: W ? xn : "var(--color-text-muted)",
9287
9290
  whiteSpace: "nowrap"
9288
9291
  }, children: [
9289
9292
  "→ ",
9290
- L.linkTarget
9293
+ D.linkTarget
9291
9294
  ] }),
9292
- L.badge && /* @__PURE__ */ o(_x, { text: L.badge, tone: L.badgeTone, dense: s })
9295
+ D.badge && /* @__PURE__ */ o(_x, { text: D.badge, tone: D.badgeTone, dense: s })
9293
9296
  ] }),
9294
9297
  l && /* @__PURE__ */ o("span", { style: {
9295
9298
  width: 88,
@@ -9299,7 +9302,7 @@ function uk({
9299
9302
  fontSize: E.fontSize,
9300
9303
  fontVariantNumeric: "tabular-nums",
9301
9304
  color: W ? Hr : "var(--color-text-secondary)"
9302
- }, children: L.detail ?? (T ? "—" : kx(L.size)) }),
9305
+ }, children: D.detail ?? (T ? "—" : kx(D.size)) }),
9303
9306
  c && /* @__PURE__ */ o("span", { style: {
9304
9307
  width: 132,
9305
9308
  textAlign: "right",
@@ -9308,7 +9311,7 @@ function uk({
9308
9311
  fontSize: E.fontSize,
9309
9312
  fontVariantNumeric: "tabular-nums",
9310
9313
  color: W ? xn : "var(--color-text-muted)"
9311
- }, children: L.modified ?? "—" }),
9314
+ }, children: D.modified ?? "—" }),
9312
9315
  d.length > 0 && /* @__PURE__ */ o("span", { style: {
9313
9316
  width: d.length * (s ? 21 : 29),
9314
9317
  flexShrink: 0,
@@ -9321,8 +9324,8 @@ function uk({
9321
9324
  type: "button",
9322
9325
  title: A.label,
9323
9326
  "aria-label": A.label,
9324
- disabled: B,
9325
- onClick: () => u == null ? void 0 : u(A.id, L),
9327
+ disabled: P,
9328
+ onClick: () => u == null ? void 0 : u(A.id, D),
9326
9329
  style: {
9327
9330
  display: "grid",
9328
9331
  placeItems: "center",
@@ -9330,7 +9333,7 @@ function uk({
9330
9333
  height: s ? 16 : 20,
9331
9334
  borderRadius: s ? 3 : 5,
9332
9335
  padding: 0,
9333
- cursor: B ? "default" : "pointer",
9336
+ cursor: P ? "default" : "pointer",
9334
9337
  color: nr[A.tone ?? "neutral"],
9335
9338
  /*
9336
9339
  Dense rows drop the button chrome entirely.
@@ -9351,7 +9354,7 @@ function uk({
9351
9354
  )) })
9352
9355
  ]
9353
9356
  },
9354
- L.id
9357
+ D.id
9355
9358
  );
9356
9359
  })
9357
9360
  ]
@@ -10554,7 +10557,7 @@ function Mx() {
10554
10557
  return ie;
10555
10558
  }).map((ge) => `(${ge})`).join(F);
10556
10559
  }
10557
- const _ = /\b\B/, I = "[a-zA-Z]\\w*", E = "[a-zA-Z_]\\w*", N = "\\b\\d+(\\.\\d+)?", R = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", P = "\\b(0b[01]+)", D = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", L = (C = {}) => {
10560
+ const _ = /\b\B/, I = "[a-zA-Z]\\w*", E = "[a-zA-Z_]\\w*", N = "\\b\\d+(\\.\\d+)?", R = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", B = "\\b(0b[01]+)", L = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", D = (C = {}) => {
10558
10561
  const F = /^#![ ]*\//;
10559
10562
  return C.binary && (C.begin = m(
10560
10563
  F,
@@ -10571,7 +10574,7 @@ function Mx() {
10571
10574
  Q.index !== 0 && ge.ignoreMatch();
10572
10575
  }
10573
10576
  }, C);
10574
- }, B = {
10577
+ }, P = {
10575
10578
  begin: "\\\\[\\s\\S]",
10576
10579
  relevance: 0
10577
10580
  }, T = {
@@ -10579,13 +10582,13 @@ function Mx() {
10579
10582
  begin: "'",
10580
10583
  end: "'",
10581
10584
  illegal: "\\n",
10582
- contains: [B]
10585
+ contains: [P]
10583
10586
  }, O = {
10584
10587
  scope: "string",
10585
10588
  begin: '"',
10586
10589
  end: '"',
10587
10590
  illegal: "\\n",
10588
- contains: [B]
10591
+ contains: [P]
10589
10592
  }, W = {
10590
10593
  begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
10591
10594
  }, $ = function(C, F, Q = {}) {
@@ -10664,19 +10667,19 @@ function Mx() {
10664
10667
  relevance: 0
10665
10668
  }, de = {
10666
10669
  scope: "number",
10667
- begin: P,
10670
+ begin: B,
10668
10671
  relevance: 0
10669
10672
  }, he = {
10670
10673
  scope: "regexp",
10671
10674
  begin: /\/(?=[^/\n]*\/)/,
10672
10675
  end: /\/[gimuy]*/,
10673
10676
  contains: [
10674
- B,
10677
+ P,
10675
10678
  {
10676
10679
  begin: /\[/,
10677
10680
  end: /\]/,
10678
10681
  relevance: 0,
10679
- contains: [B]
10682
+ contains: [P]
10680
10683
  }
10681
10684
  ]
10682
10685
  }, Ae = {
@@ -10695,9 +10698,9 @@ function Mx() {
10695
10698
  var V = /* @__PURE__ */ Object.freeze({
10696
10699
  __proto__: null,
10697
10700
  APOS_STRING_MODE: T,
10698
- BACKSLASH_ESCAPE: B,
10701
+ BACKSLASH_ESCAPE: P,
10699
10702
  BINARY_NUMBER_MODE: de,
10700
- BINARY_NUMBER_RE: P,
10703
+ BINARY_NUMBER_RE: B,
10701
10704
  COMMENT: $,
10702
10705
  C_BLOCK_COMMENT_MODE: H,
10703
10706
  C_LINE_COMMENT_MODE: A,
@@ -10727,8 +10730,8 @@ function Mx() {
10727
10730
  PHRASAL_WORDS_MODE: W,
10728
10731
  QUOTE_STRING_MODE: O,
10729
10732
  REGEXP_MODE: he,
10730
- RE_STARTERS_RE: D,
10731
- SHEBANG: L,
10733
+ RE_STARTERS_RE: L,
10734
+ SHEBANG: D,
10732
10735
  TITLE_MODE: Ae,
10733
10736
  UNDERSCORE_IDENT_RE: E,
10734
10737
  UNDERSCORE_TITLE_MODE: Ee
@@ -11809,18 +11812,18 @@ function rn(t) {
11809
11812
  label: "func.def",
11810
11813
  contains: [_],
11811
11814
  illegal: /%/
11812
- }, P = {
11815
+ }, B = {
11813
11816
  relevance: 0,
11814
11817
  match: /\b[A-Z][A-Z_0-9]+\b/,
11815
11818
  className: "variable.constant"
11816
11819
  };
11817
- function D($) {
11820
+ function L($) {
11818
11821
  return e.concat("(?!", $.join("|"), ")");
11819
11822
  }
11820
- const L = {
11823
+ const D = {
11821
11824
  match: e.concat(
11822
11825
  /\b/,
11823
- D([
11826
+ L([
11824
11827
  ...Ja,
11825
11828
  "super",
11826
11829
  "import"
@@ -11830,7 +11833,7 @@ function rn(t) {
11830
11833
  ),
11831
11834
  className: "title.function",
11832
11835
  relevance: 0
11833
- }, B = {
11836
+ }, P = {
11834
11837
  begin: e.concat(/\./, e.lookahead(
11835
11838
  e.concat(r, /(?![0-9A-Za-z$_(])/)
11836
11839
  )),
@@ -12007,7 +12010,7 @@ function rn(t) {
12007
12010
  match: /\.\.\./,
12008
12011
  relevance: 0
12009
12012
  },
12010
- B,
12013
+ P,
12011
12014
  // hack: prevents detection of keywords in some circumstances
12012
12015
  // .keyword()
12013
12016
  // $keyword = x
@@ -12020,8 +12023,8 @@ function rn(t) {
12020
12023
  className: { 1: "title.function" },
12021
12024
  contains: [_]
12022
12025
  },
12023
- L,
12024
- P,
12026
+ D,
12027
+ B,
12025
12028
  I,
12026
12029
  T,
12027
12030
  {
@@ -12464,18 +12467,18 @@ function Wx(t) {
12464
12467
  label: "func.def",
12465
12468
  contains: [_],
12466
12469
  illegal: /%/
12467
- }, P = {
12470
+ }, B = {
12468
12471
  relevance: 0,
12469
12472
  match: /\b[A-Z][A-Z_0-9]+\b/,
12470
12473
  className: "variable.constant"
12471
12474
  };
12472
- function D($) {
12475
+ function L($) {
12473
12476
  return e.concat("(?!", $.join("|"), ")");
12474
12477
  }
12475
- const L = {
12478
+ const D = {
12476
12479
  match: e.concat(
12477
12480
  /\b/,
12478
- D([
12481
+ L([
12479
12482
  ...ol,
12480
12483
  "super",
12481
12484
  "import"
@@ -12485,7 +12488,7 @@ function Wx(t) {
12485
12488
  ),
12486
12489
  className: "title.function",
12487
12490
  relevance: 0
12488
- }, B = {
12491
+ }, P = {
12489
12492
  begin: e.concat(/\./, e.lookahead(
12490
12493
  e.concat(r, /(?![0-9A-Za-z$_(])/)
12491
12494
  )),
@@ -12662,7 +12665,7 @@ function Wx(t) {
12662
12665
  match: /\.\.\./,
12663
12666
  relevance: 0
12664
12667
  },
12665
- B,
12668
+ P,
12666
12669
  // hack: prevents detection of keywords in some circumstances
12667
12670
  // .keyword()
12668
12671
  // $keyword = x
@@ -12675,8 +12678,8 @@ function Wx(t) {
12675
12678
  className: { 1: "title.function" },
12676
12679
  contains: [_]
12677
12680
  },
12678
- L,
12679
- P,
12681
+ D,
12682
+ B,
12680
12683
  I,
12681
12684
  T,
12682
12685
  {
@@ -18786,7 +18789,7 @@ function Fk({
18786
18789
  const $ = window.getSelection();
18787
18790
  $ == null || $.removeAllRanges(), $ == null || $.addRange(E.current);
18788
18791
  }
18789
- O === "link" ? document.execCommand("createLink", !1, T) : document.execCommand("insertHTML", !1, `<img src="${Py(T)}" alt="" />`), P();
18792
+ O === "link" ? document.execCommand("createLink", !1, T) : document.execCommand("insertHTML", !1, `<img src="${Py(T)}" alt="" />`), B();
18790
18793
  }
18791
18794
  }, R = ue(() => {
18792
18795
  try {
@@ -18799,10 +18802,10 @@ function Fk({
18799
18802
  const T = y.current;
18800
18803
  !T || m !== "rich" || pi(T.innerHTML).trim() !== (e || "").trim() && (T.innerHTML = R);
18801
18804
  }, [R, m, e]);
18802
- const P = se(() => {
18805
+ const B = se(() => {
18803
18806
  const T = y.current;
18804
18807
  T && n(pi(T.innerHTML));
18805
- }, [n]), D = se(() => {
18808
+ }, [n]), L = se(() => {
18806
18809
  var W;
18807
18810
  const T = window.getSelection();
18808
18811
  let O = T == null ? void 0 : T.anchorNode;
@@ -18815,7 +18818,7 @@ function Fk({
18815
18818
  O = O.parentElement;
18816
18819
  }
18817
18820
  k("p");
18818
- }, []), L = (T) => {
18821
+ }, []), D = (T) => {
18819
18822
  if (s) return;
18820
18823
  const O = y.current;
18821
18824
  if (O) {
@@ -18831,9 +18834,9 @@ function Fk({
18831
18834
  !1,
18832
18835
  '<ul data-task="1"><li><input type="checkbox" disabled /> item</li></ul><p><br></p>'
18833
18836
  ) : T.startsWith("formatBlock:") ? document.execCommand("formatBlock", !1, T.slice(12)) : document.execCommand(T);
18834
- P(), D();
18837
+ B(), L();
18835
18838
  }
18836
- }, B = s;
18839
+ }, P = s;
18837
18840
  return /* @__PURE__ */ x("div", { "data-testid": t, className: `dui_mde ${p}`, style: g, children: [
18838
18841
  /* @__PURE__ */ x("div", { className: "dui_mde__toolbar", children: [
18839
18842
  m === "rich" && /* @__PURE__ */ x(ve, { children: [
@@ -18844,9 +18847,9 @@ function Fk({
18844
18847
  value: v,
18845
18848
  options: Ly,
18846
18849
  accentColor: u,
18847
- disabled: B,
18850
+ disabled: P,
18848
18851
  onChange: (T) => {
18849
- k(T), L(`formatBlock:${T}`);
18852
+ k(T), D(`formatBlock:${T}`);
18850
18853
  },
18851
18854
  style: { minWidth: 108 }
18852
18855
  }
@@ -18859,9 +18862,9 @@ function Fk({
18859
18862
  className: "dui_mde__btn",
18860
18863
  title: T.label,
18861
18864
  "aria-label": T.label,
18862
- disabled: B,
18865
+ disabled: P,
18863
18866
  onMouseDown: (O) => {
18864
- O.preventDefault(), L(T.cmd);
18867
+ O.preventDefault(), D(T.cmd);
18865
18868
  },
18866
18869
  children: /* @__PURE__ */ o(T.Icon, { size: 13 })
18867
18870
  },
@@ -18932,10 +18935,10 @@ function Fk({
18932
18935
  contentEditable: !s,
18933
18936
  suppressContentEditableWarning: !0,
18934
18937
  "data-placeholder": a,
18935
- onInput: P,
18936
- onBlur: P,
18937
- onKeyUp: D,
18938
- onMouseUp: D
18938
+ onInput: B,
18939
+ onBlur: B,
18940
+ onKeyUp: L,
18941
+ onMouseUp: L
18939
18942
  }
18940
18943
  ) : /* @__PURE__ */ o(
18941
18944
  "textarea",
@@ -19760,15 +19763,15 @@ function cS({
19760
19763
  var W;
19761
19764
  const N = (W = m.current) == null ? void 0 : W.getBoundingClientRect();
19762
19765
  if (!N) return e;
19763
- const R = N.left + N.width / 2, P = N.top + N.height / 2;
19764
- let D = Math.atan2(E - P, I - R) * 180 / Math.PI + 90;
19765
- D > 180 && (D -= 360);
19766
- const B = (Math.min(qn, Math.max(Wt, D)) - Wt) / (qn - Wt), T = n + B * (r - n), O = (r - n) / i;
19766
+ const R = N.left + N.width / 2, B = N.top + N.height / 2;
19767
+ let 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
19770
  return Math.round(T / O) * O;
19768
19771
  }, _ = (I) => {
19769
19772
  const E = (R) => {
19770
- const P = S(R.clientX, R.clientY), D = Math.round((P - n) / (r - n) * i);
19771
- D !== v.current && (v.current = D, y(!0), setTimeout(() => y(!1), 140)), a(P);
19773
+ const B = S(R.clientX, R.clientY), L = Math.round((B - n) / (r - n) * i);
19774
+ L !== v.current && (v.current = L, y(!0), setTimeout(() => y(!1), 140)), a(B);
19772
19775
  };
19773
19776
  E(I.nativeEvent);
19774
19777
  const N = () => {
@@ -20849,18 +20852,18 @@ function AS({
20849
20852
  height: h,
20850
20853
  className: m = ""
20851
20854
  }) {
20852
- const b = Ie(), y = f ?? b.size, v = h ?? lt.nav[y], k = Oe[y], w = zt[y], S = M(null), [_, I] = z(!1), [E, N] = z(!1), [R, P] = z(null), D = M(null), L = ($, A) => {
20855
+ const b = Ie(), y = f ?? b.size, v = h ?? lt.nav[y], k = Oe[y], w = zt[y], S = M(null), [_, I] = z(!1), [E, N] = z(!1), [R, B] = z(null), L = M(null), D = ($, A) => {
20853
20856
  if (!$.preview) return;
20854
- D.current && clearTimeout(D.current);
20857
+ L.current && clearTimeout(L.current);
20855
20858
  const H = A.getBoundingClientRect();
20856
- D.current = setTimeout(() => {
20857
- P({ id: $.id, x: H.left + H.width / 2, y: H.bottom + 6 });
20859
+ L.current = setTimeout(() => {
20860
+ B({ id: $.id, x: H.left + H.width / 2, y: H.bottom + 6 });
20858
20861
  }, 350);
20859
- }, B = () => {
20860
- D.current && clearTimeout(D.current), D.current = null, P(null);
20862
+ }, P = () => {
20863
+ L.current && clearTimeout(L.current), L.current = null, B(null);
20861
20864
  };
20862
20865
  U(() => () => {
20863
- D.current && clearTimeout(D.current);
20866
+ L.current && clearTimeout(L.current);
20864
20867
  }, []);
20865
20868
  const T = R ? e.find(($) => $.id === R.id) : void 0, O = se(() => {
20866
20869
  const $ = S.current;
@@ -20952,13 +20955,13 @@ function AS({
20952
20955
  background: A ? `color-mix(in srgb, ${H} 5%, transparent)` : "transparent"
20953
20956
  },
20954
20957
  onClick: () => {
20955
- B(), r($.id);
20958
+ P(), r($.id);
20956
20959
  },
20957
20960
  onContextMenu: (Z) => {
20958
20961
  Z.preventDefault(), l == null || l($.id, Z);
20959
20962
  },
20960
- onMouseEnter: (Z) => L($, Z.currentTarget),
20961
- onMouseLeave: B,
20963
+ onMouseEnter: (Z) => D($, Z.currentTarget),
20964
+ onMouseLeave: P,
20962
20965
  children: [
20963
20966
  A && /* @__PURE__ */ o("div", { style: {
20964
20967
  position: "absolute",
@@ -22245,30 +22248,30 @@ function HS({
22245
22248
  style: b,
22246
22249
  className: y = ""
22247
22250
  }) {
22248
- const [v, k] = z(i ?? r), [w, S] = z(!1), [_, I] = z(!1), E = M(null), N = M(null), R = M(!1), P = M(!1), D = M(null), L = t === "horizontal", B = d || "var(--color-primary)", T = w || _;
22251
+ const [v, k] = z(i ?? r), [w, S] = z(!1), [_, I] = z(!1), E = M(null), N = M(null), R = M(!1), B = M(!1), L = M(null), D = t === "horizontal", P = d || "var(--color-primary)", T = w || _;
22249
22252
  U(() => {
22250
22253
  i !== void 0 && k(i);
22251
22254
  }, [i]);
22252
- const O = i !== void 0 ? i : v, W = w && D.current != null ? D.current : O, $ = (X) => {
22253
- X.preventDefault(), X.target.setPointerCapture(X.pointerId), R.current = !0, P.current = !1, S(!0);
22255
+ const O = i !== void 0 ? i : v, W = w && L.current != null ? L.current : O, $ = (X) => {
22256
+ X.preventDefault(), X.target.setPointerCapture(X.pointerId), R.current = !0, B.current = !1, S(!0);
22254
22257
  }, A = (X) => {
22255
22258
  if (!R.current || !E.current) return;
22256
- P.current = !0;
22257
- const pe = E.current.getBoundingClientRect(), V = L ? pe.width : pe.height, xe = L ? X.clientX - pe.left : X.clientY - pe.top, ke = c ?? a / V * 100, Ce = s ?? l / V * 100, Te = Math.max(
22259
+ B.current = !0;
22260
+ const pe = E.current.getBoundingClientRect(), V = D ? pe.width : pe.height, xe = D ? X.clientX - pe.left : X.clientY - pe.top, ke = c ?? a / V * 100, Ce = s ?? l / V * 100, Te = Math.max(
22258
22261
  ke,
22259
22262
  Math.min(100 - Ce, xe / V * 100)
22260
22263
  );
22261
- D.current = Te, N.current && (L ? N.current.style.width = `${Te}%` : N.current.style.height = `${Te}%`), u == null || u(Te);
22264
+ L.current = Te, N.current && (D ? N.current.style.width = `${Te}%` : N.current.style.height = `${Te}%`), u == null || u(Te);
22262
22265
  }, H = (X) => {
22263
- if (X.target.releasePointerCapture(X.pointerId), R.current = !1, S(!1), !P.current)
22266
+ if (X.target.releasePointerCapture(X.pointerId), R.current = !1, S(!1), !B.current)
22264
22267
  g == null || g();
22265
22268
  else {
22266
- const pe = D.current ?? v;
22267
- D.current = null, k(pe), p == null || p(pe);
22269
+ const pe = L.current ?? v;
22270
+ L.current = null, k(pe), p == null || p(pe);
22268
22271
  }
22269
22272
  }, G = () => {
22270
22273
  k(r), u == null || u(r), p == null || p(r);
22271
- }, te = h && m === "first", Z = h && m === "second", de = L ? {
22274
+ }, te = h && m === "first", Z = h && m === "second", de = D ? {
22272
22275
  width: Z ? "100%" : `${W}%`,
22273
22276
  minWidth: Z ? 0 : a,
22274
22277
  height: "100%",
@@ -22280,13 +22283,13 @@ function HS({
22280
22283
  width: "100%",
22281
22284
  overflow: "hidden",
22282
22285
  transition: w ? "none" : `height 180ms ${Gr}`
22283
- }, he = L ? { flex: 1, minWidth: te ? 0 : l, height: "100%", overflow: "hidden" } : {
22286
+ }, he = D ? { flex: 1, minWidth: te ? 0 : l, height: "100%", overflow: "hidden" } : {
22284
22287
  flex: 1,
22285
22288
  minHeight: te ? 0 : l,
22286
22289
  width: "100%",
22287
22290
  overflow: "hidden",
22288
22291
  transition: w ? "none" : `all 180ms ${Gr}`
22289
- }, Ae = L ? 3 : T ? 80 : 44, Ee = L ? T ? 80 : 44 : 3;
22292
+ }, Ae = D ? 3 : T ? 80 : 44, Ee = D ? T ? 80 : 44 : 3;
22290
22293
  return /* @__PURE__ */ x(
22291
22294
  "div",
22292
22295
  {
@@ -22294,7 +22297,7 @@ function HS({
22294
22297
  className: y,
22295
22298
  style: {
22296
22299
  display: "flex",
22297
- flexDirection: L ? "row" : "column",
22300
+ flexDirection: D ? "row" : "column",
22298
22301
  width: "100%",
22299
22302
  height: "100%",
22300
22303
  overflow: "hidden",
@@ -22309,9 +22312,9 @@ function HS({
22309
22312
  display: h ? "none" : void 0,
22310
22313
  flexShrink: 0,
22311
22314
  // 8px: the line is 1px, and a 1px drag target is a frustration.
22312
- width: L ? 8 : "100%",
22313
- height: L ? "100%" : 8,
22314
- cursor: L ? "col-resize" : "row-resize",
22315
+ width: D ? 8 : "100%",
22316
+ height: D ? "100%" : 8,
22317
+ cursor: D ? "col-resize" : "row-resize",
22315
22318
  position: "relative",
22316
22319
  userSelect: "none",
22317
22320
  zIndex: 10
@@ -22329,8 +22332,8 @@ function HS({
22329
22332
  {
22330
22333
  style: {
22331
22334
  position: "absolute",
22332
- ...L ? { left: "50%", top: 0, bottom: 0, width: 1, transform: "translateX(-50%)" } : { top: "50%", left: 0, right: 0, height: 1, transform: "translateY(-50%)" },
22333
- background: T ? `color-mix(in srgb, ${B} 55%, transparent)` : "var(--color-surface-border)",
22335
+ ...D ? { left: "50%", top: 0, bottom: 0, width: 1, transform: "translateX(-50%)" } : { top: "50%", left: 0, right: 0, height: 1, transform: "translateY(-50%)" },
22336
+ background: T ? `color-mix(in srgb, ${P} 55%, transparent)` : "var(--color-surface-border)",
22334
22337
  transition: "background 150ms ease",
22335
22338
  pointerEvents: "none"
22336
22339
  }
@@ -22347,8 +22350,8 @@ function HS({
22347
22350
  width: Ae,
22348
22351
  height: Ee,
22349
22352
  borderRadius: 9999,
22350
- background: T ? B : `color-mix(in srgb, ${B} 50%, var(--color-surface-border))`,
22351
- transition: `${L ? "height" : "width"} 150ms ease, background 150ms ease`,
22353
+ background: T ? P : `color-mix(in srgb, ${P} 50%, var(--color-surface-border))`,
22354
+ transition: `${D ? "height" : "width"} 150ms ease, background 150ms ease`,
22352
22355
  pointerEvents: "none"
22353
22356
  }
22354
22357
  }
@@ -22358,7 +22361,7 @@ function HS({
22358
22361
  {
22359
22362
  style: {
22360
22363
  position: "absolute",
22361
- ...L ? { left: "calc(100% + 4px)", top: "50%", transform: "translateY(-50%)" } : { left: "50%", top: "calc(100% + 4px)", transform: "translateX(-50%)" },
22364
+ ...D ? { left: "calc(100% + 4px)", top: "50%", transform: "translateY(-50%)" } : { left: "50%", top: "calc(100% + 4px)", transform: "translateX(-50%)" },
22362
22365
  background: "var(--color-surface)",
22363
22366
  color: "var(--color-text-primary)",
22364
22367
  fontSize: 11,
@@ -22614,17 +22617,17 @@ function KS({
22614
22617
  maxHeight: u,
22615
22618
  className: p = ""
22616
22619
  }) {
22617
- const g = Ie(), f = s ? "sm" : d ?? g.size, [h, m] = z(null), [b, y] = z(!0), [v, k] = z(/* @__PURE__ */ new Set()), w = (L) => {
22618
- L.sortable && (h === L.key ? y((B) => !B) : (m(L.key), y(!0)));
22619
- }, S = (L, B) => {
22620
- B.stopPropagation(), k((T) => {
22620
+ const g = Ie(), f = s ? "sm" : d ?? g.size, [h, m] = z(null), [b, y] = z(!0), [v, k] = z(/* @__PURE__ */ new Set()), w = (D) => {
22621
+ D.sortable && (h === D.key ? y((P) => !P) : (m(D.key), y(!0)));
22622
+ }, S = (D, P) => {
22623
+ P.stopPropagation(), k((T) => {
22621
22624
  const O = new Set(T);
22622
- return O.has(L) ? O.delete(L) : O.add(L), O;
22625
+ return O.has(D) ? O.delete(D) : O.add(D), O;
22623
22626
  });
22624
- }, _ = h ? [...e].sort((L, B) => {
22625
- const T = L[h], O = B[h], W = String(T ?? "").localeCompare(String(O ?? ""));
22627
+ }, _ = h ? [...e].sort((D, P) => {
22628
+ const T = D[h], O = P[h], W = String(T ?? "").localeCompare(String(O ?? ""));
22626
22629
  return b ? W : -W;
22627
- }) : e, E = (i ? "28px " : "") + t.map((L) => typeof L.width == "number" ? `${L.width}px` : L.width ?? "1fr").join(" "), N = lt.table[f], R = `${Math.round((N - 16) / 2)}px 12px`, P = Oe[f], D = !!i;
22630
+ }) : e, E = (i ? "28px " : "") + t.map((D) => typeof D.width == "number" ? `${D.width}px` : D.width ?? "1fr").join(" "), N = lt.table[f], R = `${Math.round((N - 16) / 2)}px 12px`, B = Oe[f], L = !!i;
22628
22631
  return /* @__PURE__ */ x(
22629
22632
  "div",
22630
22633
  {
@@ -22643,7 +22646,7 @@ function KS({
22643
22646
  // of its real ~170-214px content height) — instead of the page
22644
22647
  // scrolling normally like every other settings panel. Refusing to
22645
22648
  // shrink here restores that normal behavior.
22646
- ...D ? {} : { maxHeight: u, display: "flex", flexDirection: "column", flexShrink: 0 }
22649
+ ...L ? {} : { maxHeight: u, display: "flex", flexDirection: "column", flexShrink: 0 }
22647
22650
  },
22648
22651
  children: [
22649
22652
  /* @__PURE__ */ x("div", { style: {
@@ -22654,10 +22657,10 @@ function KS({
22654
22657
  flexShrink: 0
22655
22658
  }, children: [
22656
22659
  i && /* @__PURE__ */ o("div", {}),
22657
- t.map((L) => /* @__PURE__ */ x(
22660
+ t.map((D) => /* @__PURE__ */ x(
22658
22661
  "div",
22659
22662
  {
22660
- onClick: () => w(L),
22663
+ onClick: () => w(D),
22661
22664
  style: {
22662
22665
  padding: R,
22663
22666
  fontSize: "10px",
@@ -22665,37 +22668,37 @@ function KS({
22665
22668
  textTransform: "uppercase",
22666
22669
  letterSpacing: "0.06em",
22667
22670
  color: "var(--color-text-muted)",
22668
- cursor: L.sortable ? "pointer" : "default",
22671
+ cursor: D.sortable ? "pointer" : "default",
22669
22672
  display: "flex",
22670
22673
  alignItems: "center",
22671
22674
  // text-align has no effect on a flex item — justify-content is
22672
22675
  // the actual axis-alignment property for a flex container's
22673
22676
  // children, which is what col.align needs to drive here.
22674
- justifyContent: L.align === "right" ? "flex-end" : L.align === "center" ? "center" : "flex-start",
22677
+ justifyContent: D.align === "right" ? "flex-end" : D.align === "center" ? "center" : "flex-start",
22675
22678
  gap: "4px",
22676
22679
  userSelect: "none"
22677
22680
  },
22678
22681
  children: [
22679
- L.label,
22680
- L.sortable && h === L.key && (b ? /* @__PURE__ */ o(rt, { size: 10 }) : /* @__PURE__ */ o(Pe, { size: 10, style: { transform: "rotate(-90deg)" } }))
22682
+ D.label,
22683
+ D.sortable && h === D.key && (b ? /* @__PURE__ */ o(rt, { size: 10 }) : /* @__PURE__ */ o(Pe, { size: 10, style: { transform: "rotate(-90deg)" } }))
22681
22684
  ]
22682
22685
  },
22683
- L.key
22686
+ D.key
22684
22687
  ))
22685
22688
  ] }),
22686
- /* @__PURE__ */ o("div", { style: D ? {} : { flex: "1 1 auto", overflowY: "auto" }, children: _.length === 0 ? /* @__PURE__ */ o(p0, { title: a, message: l, compact: !0 }) : _.map((L, B) => {
22687
- const T = String(L[n] ?? B), O = v.has(T), W = c && B % 2 === 1 ? "var(--color-table-stripe)" : "transparent";
22689
+ /* @__PURE__ */ o("div", { style: L ? {} : { flex: "1 1 auto", overflowY: "auto" }, children: _.length === 0 ? /* @__PURE__ */ o(p0, { title: a, message: l, compact: !0 }) : _.map((D, P) => {
22690
+ const T = String(D[n] ?? P), O = v.has(T), W = c && P % 2 === 1 ? "var(--color-table-stripe)" : "transparent";
22688
22691
  return /* @__PURE__ */ x(
22689
22692
  "div",
22690
22693
  {
22691
22694
  style: {
22692
- borderBottom: B < _.length - 1 ? "1px solid var(--color-surface-border)" : "none"
22695
+ borderBottom: P < _.length - 1 ? "1px solid var(--color-surface-border)" : "none"
22693
22696
  },
22694
22697
  children: [
22695
22698
  /* @__PURE__ */ x(
22696
22699
  "div",
22697
22700
  {
22698
- onClick: () => r == null ? void 0 : r(L),
22701
+ onClick: () => r == null ? void 0 : r(D),
22699
22702
  className: `dui_data-table__row${r || i ? " dui_data-table__row--clickable" : ""}`,
22700
22703
  style: {
22701
22704
  display: "grid",
@@ -22733,7 +22736,7 @@ function KS({
22733
22736
  {
22734
22737
  style: {
22735
22738
  padding: R,
22736
- fontSize: P,
22739
+ fontSize: B,
22737
22740
  color: "var(--color-text-secondary)",
22738
22741
  display: "flex",
22739
22742
  alignItems: "center",
@@ -22745,7 +22748,7 @@ function KS({
22745
22748
  whiteSpace: "nowrap",
22746
22749
  textOverflow: "ellipsis"
22747
22750
  },
22748
- children: $.renderCell ? $.renderCell(L, L[$.key]) : /* @__PURE__ */ o("span", { style: { overflow: "hidden", textOverflow: "ellipsis" }, children: String(L[$.key] ?? "—") })
22751
+ children: $.renderCell ? $.renderCell(D, D[$.key]) : /* @__PURE__ */ o("span", { style: { overflow: "hidden", textOverflow: "ellipsis" }, children: String(D[$.key] ?? "—") })
22749
22752
  },
22750
22753
  $.key
22751
22754
  ))
@@ -22755,7 +22758,7 @@ function KS({
22755
22758
  i && O && /* @__PURE__ */ o("div", { style: {
22756
22759
  background: "color-mix(in srgb, var(--color-text-primary) 3%, transparent)",
22757
22760
  borderTop: "1px solid var(--color-surface-border)"
22758
- }, children: i(L) })
22761
+ }, children: i(D) })
22759
22762
  ]
22760
22763
  },
22761
22764
  T
@@ -23578,8 +23581,8 @@ function o_({
23578
23581
  className: b = "",
23579
23582
  style: y
23580
23583
  }) {
23581
- const v = An(m), [k, w] = z(i), [S, _] = z(() => c !== void 0 ? new Set(c) : new Set(t.filter((X) => X.isGroup).map((X) => X.id))), [I, E] = z(""), [N, R] = z(() => /* @__PURE__ */ new Set()), P = a !== void 0, D = P ? a : k, L = p || "var(--color-primary)", B = I.trim(), T = B.length > 0, O = parseInt(v.itemHeight, 10), W = Math.max(O - 6, 24), $ = ue(() => eo(t), [t]), A = ue(() => no(t, B), [t, B]), H = ue(() => eo(A), [A]), G = (X) => {
23582
- P || w(X), l == null || l(X);
23584
+ const v = An(m), [k, w] = z(i), [S, _] = z(() => c !== void 0 ? new Set(c) : new Set(t.filter((X) => X.isGroup).map((X) => X.id))), [I, E] = z(""), [N, R] = z(() => /* @__PURE__ */ new Set()), B = a !== void 0, 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) => {
23585
+ B || w(X), l == null || l(X);
23583
23586
  }, te = (X) => {
23584
23587
  _((pe) => {
23585
23588
  const V = new Set(pe);
@@ -23596,18 +23599,18 @@ function o_({
23596
23599
  });
23597
23600
  }, he = (X, pe = 0) => {
23598
23601
  const V = X.id === e, xe = p ? `color-mix(in srgb, ${p} 18%, transparent)` : "var(--color-sidenav-active-bg)", ke = p ?? "var(--color-sidenav-active-text)", Ce = No(X), Te = Ce && Z(X), at = Ce && !V && to(X, e), tt = pe * $0;
23599
- if (Ce && D)
23602
+ if (Ce && L)
23600
23603
  return /* @__PURE__ */ o("div", { children: (X.children ?? []).map((oe) => he(oe, pe)) }, X.id);
23601
23604
  const j = /* @__PURE__ */ x(
23602
23605
  "div",
23603
23606
  {
23604
- title: D ? X.label : void 0,
23607
+ title: L ? X.label : void 0,
23605
23608
  onClick: () => Ce ? de(X) : n == null ? void 0 : n(X.id),
23606
23609
  "data-nav-id": X.id,
23607
23610
  role: Ce ? "button" : void 0,
23608
23611
  "aria-expanded": Ce ? Te : void 0,
23609
23612
  className: `dui_side-nav__item${V ? " dui_side-nav__item--active" : ""}${Ce ? " dui_side-nav__item--branch" : ""}`,
23610
- style: D ? {
23613
+ style: L ? {
23611
23614
  display: "flex",
23612
23615
  alignItems: "center",
23613
23616
  justifyContent: "center",
@@ -23638,9 +23641,9 @@ function o_({
23638
23641
  justifyContent: "center",
23639
23642
  width: v.iconSize,
23640
23643
  /* A branch's pages sit a step below it: the icon a little smaller… */
23641
- ...pe > 0 && !D ? { transform: "scale(0.86)", opacity: V ? 1 : 0.9 } : {}
23644
+ ...pe > 0 && !L ? { transform: "scale(0.86)", opacity: V ? 1 : 0.9 } : {}
23642
23645
  }, children: X.icon }),
23643
- !D && /* @__PURE__ */ x(ve, { children: [
23646
+ !L && /* @__PURE__ */ x(ve, { children: [
23644
23647
  /* @__PURE__ */ o("span", { style: {
23645
23648
  /* …and the name a pixel smaller. */
23646
23649
  flex: 1,
@@ -23654,8 +23657,8 @@ function o_({
23654
23657
  fontSize: "10px",
23655
23658
  padding: "1px 5px",
23656
23659
  borderRadius: 99,
23657
- background: `color-mix(in srgb, ${L} 15%, transparent)`,
23658
- color: L,
23660
+ background: `color-mix(in srgb, ${D} 15%, transparent)`,
23661
+ color: D,
23659
23662
  fontWeight: 600,
23660
23663
  flexShrink: 0
23661
23664
  }, children: X.badge }),
@@ -23683,7 +23686,7 @@ function o_({
23683
23686
  }, Ae = (X) => {
23684
23687
  var Ce;
23685
23688
  const pe = S.has(X.id), V = ((Ce = X.children) == null ? void 0 : Ce.length) ?? 0, xe = T ? V : X.count ?? V, ke = X.children ?? [];
23686
- return D ? /* @__PURE__ */ o("div", { style: { marginBottom: 8 }, children: ke.map((Te) => he(Te)) }, X.id) : /* @__PURE__ */ x("div", { style: { marginBottom: 4 }, children: [
23689
+ return L ? /* @__PURE__ */ o("div", { style: { marginBottom: 8 }, children: ke.map((Te) => he(Te)) }, X.id) : /* @__PURE__ */ x("div", { style: { marginBottom: 4 }, children: [
23687
23690
  /* @__PURE__ */ x(
23688
23691
  "button",
23689
23692
  {
@@ -23737,8 +23740,8 @@ function o_({
23737
23740
  {
23738
23741
  className: b,
23739
23742
  style: {
23740
- width: D ? d : u ? "100%" : s,
23741
- minWidth: D ? d : u ? void 0 : s,
23743
+ width: L ? d : u ? "100%" : s,
23744
+ minWidth: L ? d : u ? void 0 : s,
23742
23745
  height: "100%",
23743
23746
  display: "flex",
23744
23747
  flexDirection: "column",
@@ -23749,7 +23752,7 @@ function o_({
23749
23752
  ...y
23750
23753
  },
23751
23754
  children: [
23752
- g && !D && /* @__PURE__ */ o("div", { style: { padding: "10px 10px 8px", flexShrink: 0 }, children: /* @__PURE__ */ x("div", { style: {
23755
+ g && !L && /* @__PURE__ */ o("div", { style: { padding: "10px 10px 8px", flexShrink: 0 }, children: /* @__PURE__ */ x("div", { style: {
23753
23756
  display: "flex",
23754
23757
  alignItems: "center",
23755
23758
  gap: 6,
@@ -23814,7 +23817,7 @@ function o_({
23814
23817
  /* @__PURE__ */ x("div", { style: {
23815
23818
  flex: 1,
23816
23819
  overflowY: "auto",
23817
- padding: D ? "4px 4px 16px" : "4px 6px 16px"
23820
+ padding: L ? "4px 4px 16px" : "4px 6px 16px"
23818
23821
  }, children: [
23819
23822
  A.map(Ee),
23820
23823
  T && H === 0 && /* @__PURE__ */ o("div", { style: {
@@ -23824,7 +23827,7 @@ function o_({
23824
23827
  textAlign: "center"
23825
23828
  }, children: h })
23826
23829
  ] }),
23827
- r && !P && /* @__PURE__ */ o("div", { style: {
23830
+ r && !B && /* @__PURE__ */ o("div", { style: {
23828
23831
  borderTop: "1px solid var(--color-panel-border)",
23829
23832
  display: "flex",
23830
23833
  alignItems: "center",
@@ -23834,7 +23837,7 @@ function o_({
23834
23837
  "button",
23835
23838
  {
23836
23839
  type: "button",
23837
- onClick: () => G(!D),
23840
+ onClick: () => G(!L),
23838
23841
  className: "dui_side-nav__collapse-btn",
23839
23842
  style: {
23840
23843
  display: "flex",
@@ -23849,8 +23852,8 @@ function o_({
23849
23852
  color: "var(--color-text-muted)",
23850
23853
  cursor: "pointer"
23851
23854
  },
23852
- title: D ? "Expand sidebar" : "Collapse sidebar",
23853
- children: D ? /* @__PURE__ */ o(_a, { size: 14 }) : /* @__PURE__ */ o(Sa, { size: 14 })
23855
+ title: L ? "Expand sidebar" : "Collapse sidebar",
23856
+ children: L ? /* @__PURE__ */ o(_a, { size: 14 }) : /* @__PURE__ */ o(Sa, { size: 14 })
23854
23857
  }
23855
23858
  ) })
23856
23859
  ]
@@ -23945,10 +23948,10 @@ function Ml({
23945
23948
  enableItemDrag: E,
23946
23949
  getItemId: N,
23947
23950
  onItemDragStart: R,
23948
- onItemDragOver: P,
23949
- onItemDrop: D,
23950
- inlineCreate: L,
23951
- onInlineCreateCommit: B,
23951
+ onItemDragOver: B,
23952
+ onItemDrop: L,
23953
+ inlineCreate: D,
23954
+ onInlineCreateCommit: P,
23952
23955
  onInlineCreateCancel: T,
23953
23956
  renamingNodeId: O,
23954
23957
  onRenameDone: W
@@ -24048,12 +24051,12 @@ function Ml({
24048
24051
  ),
24049
24052
  /* @__PURE__ */ o(En, { show: V === "after" && !$, color: A }),
24050
24053
  $ && /* @__PURE__ */ x("div", { style: { marginLeft: e > 0 ? 12 : 0, borderLeft: e > 0 ? "1px solid var(--color-surface-border)" : "none" }, children: [
24051
- (L == null ? void 0 : L.parentId) === t.id && /* @__PURE__ */ o(
24054
+ (D == null ? void 0 : D.parentId) === t.id && /* @__PURE__ */ o(
24052
24055
  Al,
24053
24056
  {
24054
24057
  depth: e + 1,
24055
24058
  indentPx: f,
24056
- onCommit: (ee) => B == null ? void 0 : B(t.id, ee),
24059
+ onCommit: (ee) => P == null ? void 0 : P(t.id, ee),
24057
24060
  onCancel: () => T == null ? void 0 : T()
24058
24061
  }
24059
24062
  ),
@@ -24087,10 +24090,10 @@ function Ml({
24087
24090
  enableItemDrag: E,
24088
24091
  getItemId: N,
24089
24092
  onItemDragStart: R,
24090
- onItemDragOver: P,
24091
- onItemDrop: D,
24092
- inlineCreate: L,
24093
- onInlineCreateCommit: B,
24093
+ onItemDragOver: B,
24094
+ onItemDrop: L,
24095
+ inlineCreate: D,
24096
+ onInlineCreateCommit: P,
24094
24097
  onInlineCreateCancel: T
24095
24098
  },
24096
24099
  ee.id
@@ -24110,9 +24113,9 @@ function Ml({
24110
24113
  accentColor: g,
24111
24114
  renderItem: u,
24112
24115
  onDragStart: R,
24113
- onDragOver: P,
24116
+ onDragOver: B,
24114
24117
  onDragLeave: S,
24115
- onDrop: D,
24118
+ onDrop: L,
24116
24119
  onDragEnd: I
24117
24120
  },
24118
24121
  Xe
@@ -24173,14 +24176,14 @@ function i_({
24173
24176
  onInlineCreateCommit: E,
24174
24177
  onInlineCreateCancel: N,
24175
24178
  renamingNodeId: R,
24176
- onRenameDone: P
24179
+ onRenameDone: B
24177
24180
  }) {
24178
- const [D, L] = z(a ?? /* @__PURE__ */ new Set()), B = l ?? D, T = se((q) => {
24181
+ const [L, D] = z(a ?? /* @__PURE__ */ new Set()), P = l ?? L, T = se((q) => {
24179
24182
  if (c) {
24180
24183
  c(q);
24181
24184
  return;
24182
24185
  }
24183
- L((be) => {
24186
+ D((be) => {
24184
24187
  const Re = new Set(be);
24185
24188
  return Re.has(q) ? Re.delete(q) : Re.add(q), Re;
24186
24189
  });
@@ -24234,7 +24237,7 @@ function i_({
24234
24237
  if (t.length === 0 && !I)
24235
24238
  return /* @__PURE__ */ o("div", { style: { padding: "24px 12px", textAlign: "center", fontSize: 12, color: "var(--color-text-muted)" }, children: g });
24236
24239
  const oe = {
24237
- expandedIds: B,
24240
+ expandedIds: P,
24238
24241
  toggleExpand: T,
24239
24242
  folderActions: n,
24240
24243
  onFolderClick: u,
@@ -24264,7 +24267,7 @@ function i_({
24264
24267
  onInlineCreateCommit: E,
24265
24268
  onInlineCreateCancel: N,
24266
24269
  renamingNodeId: R,
24267
- onRenameDone: P
24270
+ onRenameDone: B
24268
24271
  };
24269
24272
  return /* @__PURE__ */ x("div", { className: f, children: [
24270
24273
  (I == null ? void 0 : I.parentId) === null && /* @__PURE__ */ o(
@@ -26366,25 +26369,25 @@ function v_({
26366
26369
  maxSuggestions: b = 8,
26367
26370
  suggestionZIndex: y = 1e4
26368
26371
  }) {
26369
- const v = e.length > 0, k = M(null), [w, S] = z(!1), [_, I] = z(-1), [E, N] = z(!1), [R, P] = z({ top: 0, left: 0, width: 0 }), D = ue(() => {
26372
+ const v = e.length > 0, k = M(null), [w, S] = z(!1), [_, I] = z(-1), [E, N] = z(!1), [R, B] = z({ top: 0, left: 0, width: 0 }), L = ue(() => {
26370
26373
  const O = (p ?? []).map(Z0).filter((A) => A.value.trim()), W = e.trim().toLowerCase();
26371
26374
  return (W ? O.filter((A) => A.value.toLowerCase().includes(W) && A.value !== e) : O).slice(0, b);
26372
- }, [p, e, b]), L = w && !E && D.length > 0;
26375
+ }, [p, e, b]), D = w && !E && L.length > 0;
26373
26376
  U(() => {
26374
- if (!L) return;
26377
+ if (!D) return;
26375
26378
  const O = () => {
26376
26379
  const W = k.current;
26377
26380
  if (!W) return;
26378
26381
  const $ = W.getBoundingClientRect();
26379
- P({ top: $.bottom + 4, left: $.left, width: $.width });
26382
+ B({ top: $.bottom + 4, left: $.left, width: $.width });
26380
26383
  };
26381
26384
  return O(), window.addEventListener("scroll", O, { passive: !0, capture: !0 }), window.addEventListener("resize", O, { passive: !0 }), () => {
26382
26385
  window.removeEventListener("scroll", O, { capture: !0 }), window.removeEventListener("resize", O);
26383
26386
  };
26384
- }, [L, D.length]), U(() => {
26387
+ }, [D, L.length]), U(() => {
26385
26388
  I(-1), N(!1);
26386
26389
  }, [e]);
26387
- const B = (O) => {
26390
+ const P = (O) => {
26388
26391
  I(-1), N(!0), f ? f(O) : (n(O), r == null || r(O));
26389
26392
  };
26390
26393
  return /* @__PURE__ */ x("div", { ref: k, style: { position: "relative", width: c }, children: [
@@ -26403,22 +26406,22 @@ function v_({
26403
26406
  },
26404
26407
  onBlur: () => window.setTimeout(() => S(!1), 90),
26405
26408
  onKeyDown: (O) => {
26406
- if (L && (O.key === "ArrowDown" || O.key === "ArrowUp")) {
26409
+ if (D && (O.key === "ArrowDown" || O.key === "ArrowUp")) {
26407
26410
  O.preventDefault();
26408
26411
  const W = O.key === "ArrowDown" ? 1 : -1;
26409
26412
  I(($) => {
26410
26413
  const A = $ + W;
26411
- return A < 0 ? D.length - 1 : A >= D.length ? 0 : A;
26414
+ return A < 0 ? L.length - 1 : A >= L.length ? 0 : A;
26412
26415
  });
26413
26416
  return;
26414
26417
  }
26415
- if (O.key === "Escape" && L) {
26418
+ if (O.key === "Escape" && D) {
26416
26419
  O.preventDefault(), O.stopPropagation(), I(-1), N(!0);
26417
26420
  return;
26418
26421
  }
26419
26422
  if (O.key === "Enter") {
26420
- if (O.preventDefault(), L && _ >= 0) {
26421
- B(D[_].value);
26423
+ if (O.preventDefault(), D && _ >= 0) {
26424
+ P(L[_].value);
26422
26425
  return;
26423
26426
  }
26424
26427
  r == null || r(e);
@@ -26456,7 +26459,7 @@ function v_({
26456
26459
  ] }) : void 0
26457
26460
  }
26458
26461
  ),
26459
- L && Se(
26462
+ D && Se(
26460
26463
  /* @__PURE__ */ x(
26461
26464
  "div",
26462
26465
  {
@@ -26531,13 +26534,13 @@ function v_({
26531
26534
  }
26532
26535
  )
26533
26536
  ] }),
26534
- /* @__PURE__ */ o("div", { style: { padding: "4px 3px 3px", maxHeight: 280, overflowY: "auto" }, children: D.map((O, W) => /* @__PURE__ */ x(
26537
+ /* @__PURE__ */ o("div", { style: { padding: "4px 3px 3px", maxHeight: 280, overflowY: "auto" }, children: L.map((O, W) => /* @__PURE__ */ x(
26535
26538
  "div",
26536
26539
  {
26537
26540
  role: "option",
26538
26541
  "aria-selected": W === _,
26539
26542
  onMouseDown: ($) => {
26540
- $.preventDefault(), B(O.value);
26543
+ $.preventDefault(), P(O.value);
26541
26544
  },
26542
26545
  onMouseEnter: () => I(W),
26543
26546
  style: {
@@ -27244,8 +27247,8 @@ function T_({
27244
27247
  U(() => {
27245
27248
  if (!u) return;
27246
27249
  const I = (N) => {
27247
- var R, P;
27248
- !((R = h.current) != null && R.contains(N.target)) && !((P = m.current) != null && P.contains(N.target)) && p(!1);
27250
+ var R, B;
27251
+ !((R = h.current) != null && R.contains(N.target)) && !((B = m.current) != null && B.contains(N.target)) && p(!1);
27249
27252
  }, E = () => p(!1);
27250
27253
  return document.addEventListener("mousedown", I), document.addEventListener("scroll", E, !0), () => {
27251
27254
  document.removeEventListener("mousedown", I), document.removeEventListener("scroll", E, !0);
@@ -27360,8 +27363,8 @@ function $_({
27360
27363
  U(() => {
27361
27364
  if (!s) return;
27362
27365
  const E = (N) => {
27363
- var R, P;
27364
- (R = g.current) != null && R.contains(N.target) || (P = f.current) != null && P.contains(N.target) || d(!1);
27366
+ var R, B;
27367
+ (R = g.current) != null && R.contains(N.target) || (B = f.current) != null && B.contains(N.target) || d(!1);
27365
27368
  };
27366
27369
  return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
27367
27370
  }, [s]), U(() => {
@@ -27538,7 +27541,7 @@ function iv({
27538
27541
  style: h,
27539
27542
  className: m = ""
27540
27543
  }) {
27541
- const b = Ue(p), y = g ?? parseInt(b.height, 10), v = Math.max(Math.round(13 * 1.2 * 10) / 10, 16), k = Math.max(0, (y - 2 - v) / 2), w = f ?? b.borderRadius, S = M(null), _ = M(!1), I = M(null), E = M(Fa()), N = M(!1), [R, P] = z(!1), [D, L] = z(!1), [B, T] = z(!1), [O, W] = z(0), [$, A] = z({ top: 0, left: 0, width: 0 }), H = u || "var(--color-accent, var(--color-primary))";
27544
+ const b = Ue(p), y = g ?? parseInt(b.height, 10), v = Math.max(Math.round(13 * 1.2 * 10) / 10, 16), k = Math.max(0, (y - 2 - v) / 2), w = f ?? b.borderRadius, S = 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))";
27542
27545
  U(() => {
27543
27546
  const j = S.current;
27544
27547
  j && (j.innerHTML = Et(e), I.current = e, E.current.reset(e, e.length));
@@ -27553,13 +27556,13 @@ function iv({
27553
27556
  const q = S.current;
27554
27557
  q && (q.innerHTML = Et(j), nn(q, Math.min(oe, j.length)), I.current = j, n(j));
27555
27558
  }, [n]), { caret: te, syncCaret: Z, setCaret: de } = Ua(S, e.length), he = Va(e, te, l), Ae = e.slice(0, Math.min(te, e.length)).toLowerCase(), Ee = ue(
27556
- () => R && !B ? he.matches : [],
27557
- [R, B, he]
27559
+ () => R && !P ? he.matches : [],
27560
+ [R, P, he]
27558
27561
  ), X = ue(() => {
27559
- if (!R || B || !c.length) return [];
27562
+ if (!R || P || !c.length) return [];
27560
27563
  const j = c.filter((oe, q) => c.findIndex((be) => be.url === oe.url) === q);
27561
27564
  return Ae.trim() ? j.filter((oe) => oe.url.toLowerCase().includes(Ae) || oe.name.toLowerCase().includes(Ae)).slice(0, 8) : j.slice(0, 8);
27562
- }, [Ae, R, B, c]), pe = R && !B ? he.ghost : "";
27565
+ }, [Ae, R, P, c]), pe = R && !P ? he.ghost : "";
27563
27566
  U(() => {
27564
27567
  W(0);
27565
27568
  }, [Ee.length, X.length, e]), U(() => {
@@ -27575,7 +27578,7 @@ function iv({
27575
27578
  const ee = document.createRange();
27576
27579
  ee.selectNodeContents(oe), ee.collapse(!1), (q = window.getSelection()) == null || q.removeAllRanges(), (be = window.getSelection()) == null || be.addRange(ee);
27577
27580
  }
27578
- I.current = j, n(j), P(!1), (Re = S.current) == null || Re.focus();
27581
+ I.current = j, n(j), B(!1), (Re = S.current) == null || Re.focus();
27579
27582
  }, xe = se(() => {
27580
27583
  if (_.current) return;
27581
27584
  const j = S.current;
@@ -27630,7 +27633,7 @@ function iv({
27630
27633
  j.preventDefault();
27631
27634
  const oe = j.clipboardData.getData("text/plain");
27632
27635
  document.execCommand("insertText", !1, oe);
27633
- }, tt = R && !B && (Ee.length > 0 || X.length > 0);
27636
+ }, tt = R && !P && (Ee.length > 0 || X.length > 0);
27634
27637
  return /* @__PURE__ */ x("div", { className: `dui_highlighted-input ${m}`, style: h, children: [
27635
27638
  !e && !R && a && /* @__PURE__ */ o("span", { className: "dui_highlighted-input__placeholder", style: { lineHeight: `${y}px` }, children: a }),
27636
27639
  /* @__PURE__ */ o(
@@ -27647,10 +27650,10 @@ function iv({
27647
27650
  onMouseUp: Z,
27648
27651
  onPaste: at,
27649
27652
  onFocus: () => {
27650
- P(!0), T(!1), Z();
27653
+ B(!0), T(!1), Z();
27651
27654
  },
27652
27655
  onBlur: () => {
27653
- setTimeout(() => P(!1), 150), i == null || i();
27656
+ setTimeout(() => B(!1), 150), i == null || i();
27654
27657
  },
27655
27658
  onCompositionStart: () => {
27656
27659
  _.current = !0;
@@ -27659,12 +27662,12 @@ function iv({
27659
27662
  _.current = !1, xe();
27660
27663
  },
27661
27664
  "data-testid": t,
27662
- className: `dui_highlighted-input__editor${s ? " opacity-60" : ""}${d && !D ? " dui_highlighted-input__editor--masked" : ""}`,
27665
+ className: `dui_highlighted-input__editor${s ? " opacity-60" : ""}${d && !L ? " dui_highlighted-input__editor--masked" : ""}`,
27663
27666
  style: {
27664
27667
  height: y,
27665
27668
  // Not in React's CSS types; a real property in every Chromium,
27666
27669
  // which is the only engine a VS Code webview runs in.
27667
- ...d && !D ? { WebkitTextSecurity: "disc" } : {},
27670
+ ...d && !L ? { WebkitTextSecurity: "disc" } : {},
27668
27671
  paddingRight: d ? 30 : void 0,
27669
27672
  lineHeight: `${v}px`,
27670
27673
  paddingTop: k,
@@ -27680,8 +27683,8 @@ function iv({
27680
27683
  type: "button",
27681
27684
  tabIndex: -1,
27682
27685
  onMouseDown: (j) => j.preventDefault(),
27683
- onClick: () => L((j) => !j),
27684
- title: D ? "Hide value" : "Show value",
27686
+ onClick: () => D((j) => !j),
27687
+ title: L ? "Hide value" : "Show value",
27685
27688
  style: {
27686
27689
  position: "absolute",
27687
27690
  right: 8,
@@ -27697,7 +27700,7 @@ function iv({
27697
27700
  },
27698
27701
  onMouseEnter: (j) => j.currentTarget.style.color = "var(--color-text-primary)",
27699
27702
  onMouseLeave: (j) => j.currentTarget.style.color = "var(--color-text-muted)",
27700
- children: D ? /* @__PURE__ */ o(cn, { size: 14 }) : /* @__PURE__ */ o(dn, { size: 14 })
27703
+ children: L ? /* @__PURE__ */ o(cn, { size: 14 }) : /* @__PURE__ */ o(dn, { size: 14 })
27701
27704
  }
27702
27705
  ),
27703
27706
  /* @__PURE__ */ o(
@@ -28109,10 +28112,10 @@ function Mi({
28109
28112
  onEnabledChange: y,
28110
28113
  onRemove: v
28111
28114
  }) {
28112
- const [k, w] = z(!1), [S, _] = z(""), [I, E] = z(-1), [N, R] = z(!1), [P, D] = z(""), [L, B] = z(-1), T = M(null), O = M(null), W = M(null), $ = M(null), A = c || s && sv.includes(e.toLowerCase()), H = cv, G = g && !a && k ? lv.filter(
28115
+ const [k, w] = z(!1), [S, _] = z(""), [I, E] = z(-1), [N, R] = z(!1), [B, 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(
28113
28116
  (V) => V.toLowerCase().includes((S || e).toLowerCase()) && V.toLowerCase() !== e.toLowerCase()
28114
28117
  ).slice(0, 8) : [], te = g && !a && N && e ? (H[e.toLowerCase()] || []).filter(
28115
- (V) => V.toLowerCase().includes((P || n).toLowerCase()) && V.toLowerCase() !== n.toLowerCase()
28118
+ (V) => V.toLowerCase().includes((B || n).toLowerCase()) && V.toLowerCase() !== n.toLowerCase()
28116
28119
  ).slice(0, 8) : [], Z = k && G.length > 0, de = N && te.length > 0;
28117
28120
  U(() => {
28118
28121
  if (!Z) return;
@@ -28130,11 +28133,11 @@ function Mi({
28130
28133
  const he = se((V) => {
28131
28134
  h == null || h(V), w(!1), _(""), E(-1);
28132
28135
  }, [h]), Ae = se((V) => {
28133
- m == null || m(V), R(!1), D(""), B(-1);
28136
+ m == null || m(V), R(!1), L(""), P(-1);
28134
28137
  }, [m]), Ee = se((V, xe) => {
28135
- const ke = xe === "key", Ce = ke ? Z : de, Te = ke ? G : te, at = ke ? I : L, tt = ke ? E : B, j = ke ? he : Ae, oe = ke ? w : R;
28138
+ const ke = xe === "key", Ce = ke ? Z : de, Te = ke ? G : te, at = ke ? I : D, tt = ke ? E : P, j = ke ? he : Ae, oe = ke ? w : R;
28136
28139
  Ce && (V.key === "ArrowDown" ? (V.preventDefault(), tt((q) => (q + 1) % Te.length)) : V.key === "ArrowUp" ? (V.preventDefault(), tt((q) => q <= 0 ? Te.length - 1 : q - 1)) : V.key === "Enter" && at >= 0 ? (V.preventDefault(), j(Te[at])) : V.key === "Escape" && (oe(!1), tt(-1)));
28137
- }, [Z, de, G, te, I, L, he, Ae]), X = u ? "grid-cols-[32px_1fr_1fr_1fr_32px]" : "grid-cols-[32px_1fr_1fr_32px]", pe = {
28140
+ }, [Z, de, G, te, I, D, he, Ae]), X = u ? "grid-cols-[32px_1fr_1fr_1fr_32px]" : "grid-cols-[32px_1fr_1fr_32px]", pe = {
28138
28141
  border: "1px dashed var(--color-input-border)",
28139
28142
  background: "color-mix(in srgb, var(--color-text-primary) 3%, transparent)",
28140
28143
  boxShadow: "none"
@@ -28208,11 +28211,11 @@ function Mi({
28208
28211
  placeholder: (p == null ? void 0 : p.value) ?? "Value",
28209
28212
  size: f,
28210
28213
  onChange: (V) => {
28211
- m == null || m(V), D(V), B(-1);
28214
+ m == null || m(V), L(V), P(-1);
28212
28215
  },
28213
28216
  onKeyDown: (V) => Ee(V, "val"),
28214
28217
  onBlur: () => setTimeout(() => {
28215
- R(!1), B(-1);
28218
+ R(!1), P(-1);
28216
28219
  }, 150),
28217
28220
  style: { width: "100%" }
28218
28221
  }
@@ -28228,13 +28231,13 @@ function Mi({
28228
28231
  style: { width: "100%", ...a ? pe : {} },
28229
28232
  color: a ? "var(--color-text-secondary)" : void 0,
28230
28233
  onChange: (V) => {
28231
- m == null || m(V.target.value), D(V.target.value), B(-1);
28234
+ m == null || m(V.target.value), L(V.target.value), P(-1);
28232
28235
  },
28233
28236
  onFocus: () => {
28234
- R(!0), D(n), B(-1);
28237
+ R(!0), L(n), P(-1);
28235
28238
  },
28236
28239
  onBlur: () => setTimeout(() => {
28237
- R(!1), B(-1);
28240
+ R(!1), P(-1);
28238
28241
  }, 150),
28239
28242
  onKeyDown: (V) => Ee(V, "val"),
28240
28243
  tabIndex: a ? -1 : void 0
@@ -28244,11 +28247,11 @@ function Mi({
28244
28247
  "button",
28245
28248
  {
28246
28249
  type: "button",
28247
- className: Ai(xe === L),
28250
+ className: Ai(xe === D),
28248
28251
  onMouseDown: (ke) => {
28249
28252
  ke.preventDefault(), Ae(V);
28250
28253
  },
28251
- onMouseEnter: () => B(xe),
28254
+ onMouseEnter: () => P(xe),
28252
28255
  children: V
28253
28256
  },
28254
28257
  V
@@ -28363,16 +28366,16 @@ function A_({
28363
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) => {
28364
28367
  const te = [...e];
28365
28368
  te[A] = { ...te[A], [H]: G }, n(te);
28366
- }, P = () => n([...e, wn()]), D = (A) => {
28369
+ }, B = () => n([...e, wn()]), L = (A) => {
28367
28370
  const H = [...e];
28368
28371
  H.splice(A, 0, wn()), n(H);
28369
- }, L = (A) => {
28372
+ }, D = (A) => {
28370
28373
  if (e.length <= 1) {
28371
28374
  n([wn()]);
28372
28375
  return;
28373
28376
  }
28374
28377
  n(e.filter((H, G) => G !== A));
28375
- }, B = () => e.filter((A) => A.key || A.value).map((A) => `${A.enabled ? "" : "# "}${A.key}: ${A.value}`).join(`
28378
+ }, P = () => e.filter((A) => A.key || A.value).map((A) => `${A.enabled ? "" : "# "}${A.key}: ${A.value}`).join(`
28376
28379
  `), T = (A) => {
28377
28380
  const H = A.split(`
28378
28381
  `).map((G) => {
@@ -28444,12 +28447,12 @@ function A_({
28444
28447
  size: "md",
28445
28448
  tooltip: "Add new row",
28446
28449
  style: { "--hover-color": E, "--hover-bg": `color-mix(in srgb, ${E} 8%, transparent)` },
28447
- onClick: P
28450
+ onClick: B
28448
28451
  }
28449
28452
  )
28450
28453
  ] })
28451
28454
  ] }),
28452
- y ? /* @__PURE__ */ o(uv, { defaultValue: B(), onChangeRef: I, accentColor: p }) : /* @__PURE__ */ x(ve, { children: [
28455
+ y ? /* @__PURE__ */ o(uv, { defaultValue: P(), onChangeRef: I, accentColor: p }) : /* @__PURE__ */ x(ve, { children: [
28453
28456
  /* @__PURE__ */ x("div", { className: `grid ${$} gap-2 px-1 mb-1.5 items-center`, children: [
28454
28457
  /* @__PURE__ */ o("div", {}),
28455
28458
  /* @__PURE__ */ o("div", { className: "text-[var(--color-text-muted)] font-medium text-[10px] uppercase tracking-wide px-2.5", children: u || "Key" }),
@@ -28497,10 +28500,10 @@ function A_({
28497
28500
  onValueChange: (G) => R(H, "value", G),
28498
28501
  onDescriptionChange: (G) => R(H, "description", G),
28499
28502
  onEnabledChange: (G) => R(H, "enabled", G),
28500
- onRemove: () => L(H)
28503
+ onRemove: () => D(H)
28501
28504
  }
28502
28505
  ) }),
28503
- /* @__PURE__ */ o(dv, { onInsert: () => D(H + 1), accentColor: p })
28506
+ /* @__PURE__ */ o(dv, { onInsert: () => L(H + 1), accentColor: p })
28504
28507
  ] }, A.id)) })
28505
28508
  ] }),
28506
28509
  k && /* @__PURE__ */ o(
@@ -28783,32 +28786,32 @@ function L_({
28783
28786
  }), y = M(!1), [v, k] = z(u), w = p ?? v, S = se((R) => {
28784
28787
  p === void 0 && k(R), g == null || g(R);
28785
28788
  }, [p, g]), _ = se((R) => {
28786
- const P = b.current;
28787
- if (!P.dragging || !m.current) return;
28788
- const D = R.clientX - P.startX, L = c === "x" ? 0 : R.clientY - P.startY;
28789
- (Math.abs(D) > 3 || Math.abs(L) > 3) && (y.current = !0);
28790
- const B = m.current, T = Math.max(0, Math.min(window.innerWidth - B.offsetWidth, P.originLeft + D)), O = Math.max(0, Math.min(window.innerHeight - B.offsetHeight, P.originTop + L));
28791
- B.style.left = `${T}px`, B.style.top = `${O}px`, B.style.transform = "none";
28789
+ const B = b.current;
28790
+ if (!B.dragging || !m.current) return;
28791
+ const 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));
28794
+ P.style.left = `${T}px`, P.style.top = `${O}px`, P.style.transform = "none";
28792
28795
  }, [c]), I = se((R) => {
28793
- const P = b.current;
28794
- if (P.dragging) {
28795
- if (P.dragging = !1, document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", I), m.current) {
28796
- const D = m.current.getBoundingClientRect();
28797
- a == null || a(D.left, D.top);
28796
+ const B = b.current;
28797
+ if (B.dragging) {
28798
+ if (B.dragging = !1, document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", I), m.current) {
28799
+ const L = m.current.getBoundingClientRect();
28800
+ a == null || a(L.left, L.top);
28798
28801
  }
28799
28802
  w && !y.current && S(!1), R.stopPropagation();
28800
28803
  }
28801
28804
  }, [_, a, w, S]), E = se((R) => {
28802
28805
  if (!m.current) return;
28803
28806
  R.preventDefault();
28804
- const P = m.current, D = P.getBoundingClientRect();
28807
+ const B = m.current, L = B.getBoundingClientRect();
28805
28808
  y.current = !1, b.current = {
28806
28809
  dragging: !0,
28807
28810
  startX: R.clientX,
28808
28811
  startY: R.clientY,
28809
- originLeft: D.left,
28810
- originTop: D.top
28811
- }, P.style.position = "fixed", P.style.left = `${D.left}px`, P.style.top = `${D.top}px`, P.style.transform = "none", P.style.zIndex = "9999", document.addEventListener("mousemove", _), document.addEventListener("mouseup", I);
28812
+ originLeft: 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
28815
  }, [_, I]);
28813
28816
  U(() => () => {
28814
28817
  document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", I);
@@ -28872,18 +28875,18 @@ function L_({
28872
28875
  }
28873
28876
  ),
28874
28877
  t.map((R) => {
28875
- const P = R.dotColor !== void 0 || R.label !== void 0;
28878
+ const B = R.dotColor !== void 0 || R.label !== void 0;
28876
28879
  return /* @__PURE__ */ x("div", { style: { display: "contents" }, children: [
28877
28880
  R.separator && /* @__PURE__ */ o("div", { className: "dui_hud__sep" }),
28878
28881
  /* @__PURE__ */ x(
28879
28882
  "button",
28880
28883
  {
28881
28884
  type: "button",
28882
- className: `dui_hud__btn${P ? " dui_hud__btn--legend" : R.active ? " dui_hud__btn--active" : ""}`,
28885
+ className: `dui_hud__btn${B ? " dui_hud__btn--legend" : R.active ? " dui_hud__btn--active" : ""}`,
28883
28886
  onClick: R.onClick,
28884
28887
  disabled: R.disabled,
28885
28888
  title: R.title,
28886
- style: P ? {
28889
+ style: B ? {
28887
28890
  // disabled must win over the active/inactive dim —
28888
28891
  // this inline style previously only branched on
28889
28892
  // `active`, so a disabled-but-active legend item (e.g.
@@ -30808,23 +30811,23 @@ function F_({
30808
30811
  r(I.id, _);
30809
30812
  return;
30810
30813
  }
30811
- const E = _.map((P) => P.name), N = _.map((P) => P.type || "application/octet-stream"), R = [];
30812
- for (const P of _) {
30813
- const D = await new Promise((L) => {
30814
- const B = new FileReader();
30815
- B.onload = () => {
30816
- const T = B.result;
30817
- L(T.includes(",") ? T.split(",")[1] : T);
30818
- }, B.readAsDataURL(P);
30814
+ const E = _.map((B) => B.name), N = _.map((B) => B.type || "application/octet-stream"), R = [];
30815
+ for (const B of _) {
30816
+ const L = await new Promise((D) => {
30817
+ const P = new FileReader();
30818
+ P.onload = () => {
30819
+ const T = P.result;
30820
+ D(T.includes(",") ? T.split(",")[1] : T);
30821
+ }, P.readAsDataURL(B);
30819
30822
  });
30820
- R.push(D);
30823
+ R.push(L);
30821
30824
  }
30822
30825
  f(w, { fileNames: E, value: E.join(", "), fileData: R, fileMimeTypes: N });
30823
30826
  }, y = (w) => {
30824
30827
  var S;
30825
30828
  if (!(!w.fileData || !w.fileNames))
30826
30829
  for (let _ = 0; _ < w.fileData.length; _++) {
30827
- const I = ((S = w.fileMimeTypes) == null ? void 0 : S[_]) || "application/octet-stream", E = new Blob([Uint8Array.from(atob(w.fileData[_]), (P) => P.charCodeAt(0))], { type: I }), N = URL.createObjectURL(E), R = document.createElement("a");
30830
+ const I = ((S = w.fileMimeTypes) == null ? void 0 : S[_]) || "application/octet-stream", E = new Blob([Uint8Array.from(atob(w.fileData[_]), (B) => B.charCodeAt(0))], { type: I }), N = URL.createObjectURL(E), R = document.createElement("a");
30828
30831
  R.href = N, R.download = w.fileNames[_] || "file", R.click(), URL.revokeObjectURL(N);
30829
30832
  }
30830
30833
  }, v = e.some((w) => w.key || w.value), k = {
@@ -31048,8 +31051,8 @@ function Rv({
31048
31051
  for (let N = 0; N < I.length; N++) {
31049
31052
  const R = I[N];
31050
31053
  if (!R) continue;
31051
- const D = (b + N * e + e / 2 - E) / e, L = Math.abs(D), B = Jt(1 - L * 0.38, 0.15, 1), T = Jt(1 - L * 0.14, 0.68, 1), O = Jt(D * 24, -58, 58);
31052
- R.style.opacity = String(B), R.style.transform = `perspective(700px) rotateX(${O}deg) scale(${T})`;
31054
+ const 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);
31055
+ R.style.opacity = String(P), R.style.transform = `perspective(700px) rotateX(${O}deg) scale(${T})`;
31053
31056
  }
31054
31057
  }, [e, m, b]), k = se((_, I) => {
31055
31058
  const E = u.current;
@@ -31323,15 +31326,15 @@ function Co({
31323
31326
  className: g = "",
31324
31327
  style: f
31325
31328
  }) {
31326
- const h = wo(s, { width: d, borderRadius: u, color: p }), m = p ?? "var(--color-primary)", b = ue(() => e === "single" && typeof n == "string" ? dt(n) : e === "range" && Array.isArray(n) && typeof n[0] == "string" || e === "multi" && Array.isArray(n) && n.length && typeof n[0] == "string" ? dt(n[0]) : /* @__PURE__ */ new Date(), []), [y, v] = z(Wl(b)), [k, w] = z("right"), S = i ? dt(i) : void 0, _ = a ? dt(a) : void 0, I = se(($) => !!(S && $ < S || _ && $ > _ || l != null && l($)), [S, _, l]), E = ue(() => Av(y), [y]), N = /* @__PURE__ */ new Date(), R = e === "range" && Array.isArray(n) ? n : [null, null], P = e === "multi" && Array.isArray(n) ? n : [], D = se(($) => {
31329
+ const h = wo(s, { width: d, borderRadius: u, color: p }), m = p ?? "var(--color-primary)", b = ue(() => e === "single" && typeof n == "string" ? dt(n) : e === "range" && Array.isArray(n) && typeof n[0] == "string" || e === "multi" && Array.isArray(n) && n.length && typeof n[0] == "string" ? dt(n[0]) : /* @__PURE__ */ new Date(), []), [y, v] = z(Wl(b)), [k, w] = z("right"), S = i ? dt(i) : void 0, _ = a ? dt(a) : void 0, I = se(($) => !!(S && $ < S || _ && $ > _ || l != null && l($)), [S, _, l]), E = ue(() => Av(y), [y]), N = /* @__PURE__ */ new Date(), R = e === "range" && Array.isArray(n) ? n : [null, null], B = e === "multi" && Array.isArray(n) ? n : [], L = se(($) => {
31327
31330
  if (e === "single")
31328
31331
  return typeof n == "string" && kn($, dt(n)) ? "selected" : "none";
31329
31332
  if (e === "range") {
31330
31333
  const [A, H] = R;
31331
31334
  return A && kn($, dt(A)) ? "range-start" : H && kn($, dt(H)) ? "range-end" : A && H && $ > dt(A) && $ < dt(H) ? "in-range" : "none";
31332
31335
  }
31333
- return P.some((A) => kn($, dt(A))) ? "selected" : "none";
31334
- }, [e, n, R, P]), L = se(($) => {
31336
+ return B.some((A) => kn($, dt(A))) ? "selected" : "none";
31337
+ }, [e, n, R, B]), D = se(($) => {
31335
31338
  if (I($)) return;
31336
31339
  const A = Tv($);
31337
31340
  if (e === "single")
@@ -31340,10 +31343,10 @@ function Co({
31340
31343
  const [H, G] = R;
31341
31344
  !H || H && G ? r([A, null]) : dt(H) > $ ? r([A, H]) : r([H, A]);
31342
31345
  } else {
31343
- const H = P.includes(A);
31344
- r(H ? P.filter((G) => G !== A) : [...P, A]);
31346
+ const H = B.includes(A);
31347
+ r(H ? B.filter((G) => G !== A) : [...B, A]);
31345
31348
  }
31346
- }, [e, r, I, R, P]), B = ($) => {
31349
+ }, [e, r, I, R, B]), P = ($) => {
31347
31350
  w($ > 0 ? "right" : "left"), v((A) => $v(A, $));
31348
31351
  }, T = ue(() => Cv.map(($, A) => ({ value: String(A), label: $ })), []), O = y.getFullYear(), W = ue(() => Array.from({ length: 121 }, ($, A) => {
31349
31352
  const H = O - 60 + A;
@@ -31390,14 +31393,14 @@ function Co({
31390
31393
  )
31391
31394
  ] }),
31392
31395
  /* @__PURE__ */ x("div", { style: { display: "flex", gap: 2 }, children: [
31393
- /* @__PURE__ */ o("button", { type: "button", className: "dui_calendar__nav", onClick: () => B(-1), "aria-label": "Previous month", children: /* @__PURE__ */ o(Rt, { size: h.cellSize * 0.4 }) }),
31394
- /* @__PURE__ */ o("button", { type: "button", className: "dui_calendar__nav", onClick: () => B(1), "aria-label": "Next month", children: /* @__PURE__ */ o(Pe, { size: h.cellSize * 0.4 }) })
31396
+ /* @__PURE__ */ o("button", { type: "button", className: "dui_calendar__nav", onClick: () => P(-1), "aria-label": "Previous month", children: /* @__PURE__ */ o(Rt, { size: h.cellSize * 0.4 }) }),
31397
+ /* @__PURE__ */ o("button", { type: "button", className: "dui_calendar__nav", onClick: () => P(1), "aria-label": "Next month", children: /* @__PURE__ */ o(Pe, { size: h.cellSize * 0.4 }) })
31395
31398
  ] })
31396
31399
  ] }),
31397
31400
  /* @__PURE__ */ x("div", { className: `dui_calendar__grid dui_calendar__grid--${k}`, children: [
31398
31401
  Nv.map(($, A) => /* @__PURE__ */ o("div", { className: "dui_calendar__weekday", style: { width: h.cellSize, fontSize: h.fontSize }, children: $ }, A)),
31399
31402
  E.map(($, A) => {
31400
- const H = $.getMonth() !== y.getMonth(), G = D($), te = I($), Z = kn($, N), de = (pe) => pe === "in-range" || pe === "range-start" || pe === "range-end", he = c === "block" && de(G), Ae = he && A % 7 !== 0 && de(D(E[A - 1])), Ee = he && A % 7 !== 6 && de(D(E[A + 1])), X = h.cellSize / 2;
31403
+ const H = $.getMonth() !== y.getMonth(), G = 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;
31401
31404
  return /* @__PURE__ */ x("div", { className: "dui_calendar__cell", style: { height: h.cellSize }, children: [
31402
31405
  he && /* @__PURE__ */ o(
31403
31406
  "span",
@@ -31421,7 +31424,7 @@ function Co({
31421
31424
  {
31422
31425
  type: "button",
31423
31426
  disabled: te,
31424
- onClick: () => L($),
31427
+ onClick: () => D($),
31425
31428
  className: [
31426
31429
  "dui_calendar__day",
31427
31430
  H && "dui_calendar__day--outside",
@@ -31633,8 +31636,8 @@ function V_({
31633
31636
  return U(() => {
31634
31637
  if (!m || !y.current || !v.current) return;
31635
31638
  const I = y.current, E = v.current, N = () => {
31636
- const P = I.getBoundingClientRect();
31637
- E.style.top = `${P.bottom + 6}px`, E.style.left = `${Math.min(P.left, window.innerWidth - E.offsetWidth - 8)}px`;
31639
+ const B = I.getBoundingClientRect();
31640
+ E.style.top = `${B.bottom + 6}px`, E.style.left = `${Math.min(B.left, window.innerWidth - E.offsetWidth - 8)}px`;
31638
31641
  };
31639
31642
  N();
31640
31643
  const R = requestAnimationFrame(N);
@@ -31989,15 +31992,15 @@ function Y_({
31989
31992
  U(() => {
31990
31993
  if (d) return;
31991
31994
  let R;
31992
- const P = () => {
31993
- const D = Math.max(0, v.current - Date.now());
31994
- if (_(D), D <= 0) {
31995
+ const B = () => {
31996
+ const L = Math.max(0, v.current - Date.now());
31997
+ if (_(L), L <= 0) {
31995
31998
  I.current || (I.current = !0, n == null || n());
31996
31999
  return;
31997
32000
  }
31998
- R = requestAnimationFrame(P);
32001
+ R = requestAnimationFrame(B);
31999
32002
  };
32000
- return R = requestAnimationFrame(P), () => cancelAnimationFrame(R);
32003
+ return R = requestAnimationFrame(B), () => cancelAnimationFrame(R);
32001
32004
  }, [d, n]);
32002
32005
  const E = 1 - Math.min(1, S / w.current), N = y * (1 - E);
32003
32006
  return /* @__PURE__ */ x(