bonsaif-ui 0.1.149 → 0.1.150

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
1
  "use client";
2
- import mt, { useRef as oe, useState as z, useEffect as me, createContext as Qc, useLayoutEffect as _a, useContext as Jc, isValidElement as Xo, Children as ed, useMemo as Re, useCallback as be, forwardRef as Go, cloneElement as td, useId as Fa, useSyncExternalStore as rd } from "react";
2
+ import mt, { useRef as oe, useState as z, useEffect as me, createContext as Qc, useLayoutEffect as _a, useContext as Jc, isValidElement as Go, Children as ed, useMemo as Re, useCallback as be, forwardRef as Zo, cloneElement as td, useId as Fa, useSyncExternalStore as rd } from "react";
3
3
  import { jsx as r, jsxs as c, Fragment as qe } from "react/jsx-runtime";
4
- import { HiMagnifyingGlass as Rr, HiXMark as ot, HiInformationCircle as ka, HiExclamationCircle as cs, HiExclamationTriangle as Zo, HiCheckCircle as nd, HiChevronLeft as Zt, HiChevronDown as kt, HiChevronRight as qt, HiCalendarDays as pr, HiCheck as Pt, HiCog6Tooth as Ea, HiChevronUp as Sn, HiChevronUpDown as ad, HiFunnel as od, HiEllipsisVertical as id, HiMinus as Qo, HiTableCells as Jo, HiDocumentText as ds, HiCommandLine as ld, HiClock as Io, HiTrash as us, HiArrowDownTray as sd, HiInbox as ms, HiClipboardDocument as cd, HiLink as fs, HiPencil as bs, HiArrowUpTray as dd, HiDocument as ud, HiArrowsPointingIn as ps, HiPlus as md, HiH2 as fd, HiH3 as bd, HiArrowsPointingOut as pd, HiListBullet as _o, HiNumberedList as hd, HiArrowUturnLeft as gd, HiArrowUturnRight as xd, HiArrowTurnUpLeft as vd, HiArrowTurnDownRight as yd, HiBars3BottomLeft as wd, HiBars3CenterLeft as Nd, HiBars3BottomRight as kd, HiBars3 as hs, HiLinkSlash as Ed, HiPhoto as Sd, HiOutlinePaintBrush as Cd, HiNoSymbol as $d, HiLockClosed as Td, HiHome as Sa, HiArrowRightOnRectangle as Md, HiShieldCheck as mo, HiBriefcase as Ad, HiUsers as Yi, HiBell as Ld, HiUser as Dd, HiClipboardDocumentList as Rd, HiBuildingOffice2 as Od, HiRectangleGroup as Bd, HiTicket as Id, HiChartBar as _d } from "react-icons/hi2";
4
+ import { HiMagnifyingGlass as Rr, HiXMark as ot, HiInformationCircle as ka, HiExclamationCircle as cs, HiExclamationTriangle as Qo, HiCheckCircle as nd, HiChevronLeft as Zt, HiChevronDown as kt, HiChevronRight as qt, HiCalendarDays as pr, HiCheck as Pt, HiCog6Tooth as Ea, HiChevronUp as Sn, HiChevronUpDown as ad, HiFunnel as od, HiEllipsisVertical as id, HiMinus as Jo, HiTableCells as ei, HiDocumentText as ds, HiCommandLine as ld, HiClock as _o, HiTrash as us, HiArrowDownTray as sd, HiInbox as ms, HiClipboardDocument as cd, HiLink as fs, HiPencil as bs, HiArrowUpTray as dd, HiDocument as ud, HiArrowsPointingIn as ps, HiPlus as md, HiH2 as fd, HiH3 as bd, HiArrowsPointingOut as pd, HiListBullet as Fo, HiNumberedList as hd, HiArrowUturnLeft as gd, HiArrowUturnRight as xd, HiArrowTurnUpLeft as vd, HiArrowTurnDownRight as yd, HiBars3BottomLeft as wd, HiBars3CenterLeft as Nd, HiBars3BottomRight as kd, HiBars3 as hs, HiLinkSlash as Ed, HiPhoto as Sd, HiOutlinePaintBrush as Cd, HiNoSymbol as $d, HiLockClosed as Td, HiHome as Sa, HiArrowRightOnRectangle as Md, HiShieldCheck as fo, HiBriefcase as Ad, HiUsers as Yi, HiBell as Ld, HiUser as Dd, HiClipboardDocumentList as Rd, HiBuildingOffice2 as Od, HiRectangleGroup as Bd, HiTicket as Id, HiChartBar as _d } from "react-icons/hi2";
5
5
  import { createPortal as Et } from "react-dom";
6
6
  import { Tooltip as Fd, ReferenceArea as Hd, Brush as Pd, ResponsiveContainer as nn, LineChart as zd, CartesianGrid as Rn, XAxis as Qr, YAxis as Jr, Legend as Ha, Line as gs, AreaChart as jd, Area as Wd, BarChart as xs, Bar as Ca, PieChart as qd, Pie as Ud, Cell as vs, Sector as Vd, ComposedChart as Yd } from "recharts";
7
- import { OverlayScrollbars as fo } from "overlayscrollbars";
7
+ import { OverlayScrollbars as bo } from "overlayscrollbars";
8
8
  import { toast as Kd, Toaster as Xd } from "sonner";
9
9
  import { toast as eg } from "sonner";
10
10
  import { OverlayScrollbarsComponent as Ki } from "overlayscrollbars-react";
11
- import { DayPicker as ei } from "react-day-picker";
11
+ import { DayPicker as ti } from "react-day-picker";
12
12
  import "react-day-picker/dist/style.css";
13
13
  import { FiSave as Gd } from "react-icons/fi";
14
14
  function Lr(...e) {
@@ -175,16 +175,16 @@ function ir({
175
175
  const Y = 12, P = 14, le = D.getBoundingClientRect(), G = window.innerWidth - le.width - Y, fe = window.innerHeight - le.height - Y;
176
176
  let I = g.mouseX + P, q = g.mouseY + P, ne, M;
177
177
  if (!o && m.current) {
178
- const H = m.current.getBoundingClientRect(), ce = H.left + H.width / 2, R = H.top + H.height / 2;
179
- i === "top" ? (I = ce - le.width / 2, q = H.top - le.height - P, M = le.height - 1) : i === "left" ? (I = H.left - le.width - P, q = R - le.height / 2, ne = le.width - 1) : i === "right" ? (I = H.right + P, q = R - le.height / 2, ne = -7) : (I = ce - le.width / 2, q = H.bottom + P, M = -7);
178
+ const F = m.current.getBoundingClientRect(), ce = F.left + F.width / 2, R = F.top + F.height / 2;
179
+ i === "top" ? (I = ce - le.width / 2, q = F.top - le.height - P, M = le.height - 1) : i === "left" ? (I = F.left - le.width - P, q = R - le.height / 2, ne = le.width - 1) : i === "right" ? (I = F.right + P, q = R - le.height / 2, ne = -7) : (I = ce - le.width / 2, q = F.bottom + P, M = -7);
180
180
  }
181
181
  if (o && (I > G && (I = g.mouseX - le.width - P), q > fe && (q = g.mouseY - le.height - P)), I = Math.min(Math.max(Y, I), Math.max(Y, G)), q = Math.min(Math.max(Y, q), Math.max(Y, fe)), !o && m.current) {
182
- const H = m.current.getBoundingClientRect(), ce = H.left + H.width / 2, R = H.top + H.height / 2;
182
+ const F = m.current.getBoundingClientRect(), ce = F.left + F.width / 2, R = F.top + F.height / 2;
183
183
  i === "top" || i === "bottom" ? ne = Math.min(Math.max(14, ce - I), le.width - 14) : M = Math.min(Math.max(14, R - q), le.height - 14);
184
184
  }
185
185
  (Math.abs(I - g.x) > 0.5 || Math.abs(q - g.y) > 0.5 || ne !== g.arrowX || M !== g.arrowY) && A(
186
- (H) => H && {
187
- ...H,
186
+ (F) => F && {
187
+ ...F,
188
188
  x: I,
189
189
  y: q,
190
190
  arrowX: ne,
@@ -365,11 +365,11 @@ const eu = "inline-flex shrink-0 items-center justify-center gap-2 whitespace-no
365
365
  ghost: {},
366
366
  icon: {}
367
367
  };
368
- function Fo(e) {
369
- return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(Fo).join(" ").trim() : Xo(e) ? Fo(e.props.children) : "";
368
+ function Ho(e) {
369
+ return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(Ho).join(" ").trim() : Go(e) ? Ho(e.props.children) : "";
370
370
  }
371
371
  function iu(e) {
372
- return ed.toArray(e).find(Xo) ?? null;
372
+ return ed.toArray(e).find(Go) ?? null;
373
373
  }
374
374
  function tt({
375
375
  variant: e = "primary",
@@ -386,7 +386,7 @@ function tt({
386
386
  style: f,
387
387
  ...m
388
388
  }) {
389
- const h = Jc(ys), x = i ?? h.iconOnly ?? e === "icon", w = h.compact ?? !1, g = h.headerAction ?? !1, A = g && t === "md" ? "sm" : w && !g && t === "md" ? "xs" : t, S = e === "icon" || x, T = g && S, O = Fo(d), C = o ?? m.title ?? m["aria-label"] ?? (x ? O : void 0), y = C ? void 0 : m.title, $ = m["aria-label"] ?? (typeof C == "string" ? C : O || void 0), k = n ? null : a ?? (x ? iu(d) : null), _ = /* @__PURE__ */ c(
389
+ const h = Jc(ys), x = i ?? h.iconOnly ?? e === "icon", w = h.compact ?? !1, g = h.headerAction ?? !1, A = g && t === "md" ? "sm" : w && !g && t === "md" ? "xs" : t, S = e === "icon" || x, T = g && S, O = Ho(d), C = o ?? m.title ?? m["aria-label"] ?? (x ? O : void 0), y = C ? void 0 : m.title, $ = m["aria-label"] ?? (typeof C == "string" ? C : O || void 0), k = n ? null : a ?? (x ? iu(d) : null), _ = /* @__PURE__ */ c(
390
390
  "button",
391
391
  {
392
392
  ...m,
@@ -434,7 +434,7 @@ function tt({
434
434
  const Nt = {
435
435
  background: "color-mix(in srgb, var(--text-muted) 26%, var(--bg-input))"
436
436
  };
437
- function ti({
437
+ function ri({
438
438
  rows: e = 8,
439
439
  columns: t = 7,
440
440
  showToolbar: n = !0,
@@ -629,7 +629,7 @@ function cu({
629
629
  className: u = ""
630
630
  }) {
631
631
  if (e === "table")
632
- return /* @__PURE__ */ r(ti, { rows: l, columns: s, className: u });
632
+ return /* @__PURE__ */ r(ri, { rows: l, columns: s, className: u });
633
633
  if (e === "sections") return /* @__PURE__ */ r(du, { rows: l });
634
634
  if (e === "cards") return /* @__PURE__ */ r(uu, { rows: l });
635
635
  const b = o || (typeof t == "string" ? t : "Aplicación"), f = i === "bare", m = /* @__PURE__ */ c(
@@ -686,7 +686,7 @@ function cu({
686
686
  );
687
687
  }
688
688
  function du({ rows: e }) {
689
- return /* @__PURE__ */ r(ti, { rows: e, columns: 7 });
689
+ return /* @__PURE__ */ r(ri, { rows: e, columns: 7 });
690
690
  }
691
691
  function uu({ rows: e }) {
692
692
  return /* @__PURE__ */ r("div", { className: "grid gap-3 md:grid-cols-2 xl:grid-cols-3", children: Array.from({ length: e }).map((t, n) => /* @__PURE__ */ c(
@@ -787,7 +787,7 @@ function Rp({
787
787
  (re) => !re.disabled
788
788
  )) == null ? void 0 : Te.service, [G, fe] = z(
789
789
  u ?? le ?? ""
790
- ), [I, q] = z({}), [ne, M] = z({}), [H, ce] = z(""), [R, ae] = z(!1), K = oe(ne), W = oe(0), ie = y ?? H, E = Zi(ie), Q = T === !0 || T === "auto" && P.length >= O, J = Q && ie.trim().length > 0, Z = Re(() => E ? P.filter(
790
+ ), [I, q] = z({}), [ne, M] = z({}), [F, ce] = z(""), [R, ae] = z(!1), K = oe(ne), W = oe(0), ie = y ?? F, E = Zi(ie), Q = T === !0 || T === "auto" && P.length >= O, J = Q && ie.trim().length > 0, Z = Re(() => E ? P.filter(
791
791
  (re) => Zi(mu(re)).includes(E)
792
792
  ) : P, [E, P]), v = d ?? G, N = P.find((re) => re.service === v) ?? P.find((re) => !re.disabled);
793
793
  me(() => {
@@ -806,7 +806,7 @@ function Rp({
806
806
  Ye < 0 || ((re.key === "ArrowRight" || re.key === "ArrowDown") && (re.preventDefault(), ee(_e[(Ye + 1) % _e.length])), (re.key === "ArrowLeft" || re.key === "ArrowUp") && (re.preventDefault(), ee(
807
807
  _e[(Ye - 1 + _e.length) % _e.length]
808
808
  )), re.key === "Home" && (re.preventDefault(), ee(_e[0])), re.key === "End" && (re.preventDefault(), ee(_e[_e.length - 1])));
809
- }, xe = be(() => {
809
+ }, ve = be(() => {
810
810
  if (!N) return;
811
811
  const re = N.service, Oe = K.current[re];
812
812
  if (Oe != null && Oe.loading || Oe != null && Oe.component && m) return;
@@ -840,8 +840,8 @@ function Rp({
840
840
  }));
841
841
  });
842
842
  }, [o, m, s, l, N]);
843
- me(xe, [xe]);
844
- const Ce = N ? I[N.service] ?? null : null, Le = N ? ne[N.service] : void 0, vt = Le == null ? void 0 : Le.component, St = (re) => {
843
+ me(ve, [ve]);
844
+ const Ce = N ? I[N.service] ?? null : null, Ae = N ? ne[N.service] : void 0, vt = Ae == null ? void 0 : Ae.component, St = (re) => {
845
845
  N && q((Oe) => ({
846
846
  ...Oe,
847
847
  [N.service]: re
@@ -963,9 +963,9 @@ function Rp({
963
963
  (N == null ? void 0 : N.description) && /* @__PURE__ */ r("div", { className: "border-b border-[var(--border)] px-4 py-2 text-xs text-[var(--text-muted)]", children: N.description }),
964
964
  /* @__PURE__ */ c("div", { className: "min-h-[420px] p-4", children: [
965
965
  !N && (w ?? /* @__PURE__ */ r("div", { className: "flex min-h-[220px] items-center justify-center rounded-lg border border-dashed border-[var(--border)] text-sm text-[var(--text-muted)]", children: "No hay modulos disponibles." })),
966
- N && (Le == null ? void 0 : Le.loading) && (g ?? /* @__PURE__ */ r(cu, { title: "Cargando modulo..." })),
967
- N && (Le == null ? void 0 : Le.error) && A(Le.error, xe),
968
- N && vt && !(Le != null && Le.loading) && !(Le != null && Le.error) && /* @__PURE__ */ r(
966
+ N && (Ae == null ? void 0 : Ae.loading) && (g ?? /* @__PURE__ */ r(cu, { title: "Cargando modulo..." })),
967
+ N && (Ae == null ? void 0 : Ae.error) && A(Ae.error, ve),
968
+ N && vt && !(Ae != null && Ae.loading) && !(Ae != null && Ae.error) && /* @__PURE__ */ r(
969
969
  vt,
970
970
  {
971
971
  context: o,
@@ -1001,7 +1001,7 @@ const pu = {
1001
1001
  color: "#b45309",
1002
1002
  background: "rgba(245, 158, 11, 0.12)",
1003
1003
  border: "rgba(245, 158, 11, 0.26)",
1004
- icon: /* @__PURE__ */ r(Zo, { className: "h-5 w-5" })
1004
+ icon: /* @__PURE__ */ r(Qo, { className: "h-5 w-5" })
1005
1005
  },
1006
1006
  danger: {
1007
1007
  color: "var(--danger)",
@@ -1084,24 +1084,24 @@ const ks = [
1084
1084
  "Nov",
1085
1085
  "Dic"
1086
1086
  ], gu = ["lu", "ma", "mi", "ju", "vi", "sá", "do"], Qi = 6;
1087
- function Ho(e, t, n) {
1087
+ function Po(e, t, n) {
1088
1088
  return `${e}-${String(t).padStart(2, "0")}-${String(n).padStart(2, "0")}`;
1089
1089
  }
1090
1090
  function xu() {
1091
1091
  const e = /* @__PURE__ */ new Date();
1092
- return Ho(e.getFullYear(), e.getMonth() + 1, e.getDate());
1092
+ return Po(e.getFullYear(), e.getMonth() + 1, e.getDate());
1093
1093
  }
1094
- function ri(e) {
1094
+ function ni(e) {
1095
1095
  const [t, n, a] = e.split("-").map(Number);
1096
1096
  return { year: t, month: n, day: a };
1097
1097
  }
1098
1098
  function vu(e) {
1099
1099
  if (!e) return "Seleccionar fecha";
1100
- const { year: t, month: n, day: a } = ri(e);
1100
+ const { year: t, month: n, day: a } = ni(e);
1101
1101
  return !t || !n || !a ? "Seleccionar fecha" : `${String(a).padStart(2, "0")} ${ks[n - 1]} ${t}`;
1102
1102
  }
1103
1103
  function Ji(e) {
1104
- const { year: t, month: n, day: a } = ri(e);
1104
+ const { year: t, month: n, day: a } = ni(e);
1105
1105
  if (!t || !n || !a) return !1;
1106
1106
  const o = new Date(t, n - 1, a).getDay();
1107
1107
  return o === 0 || o === 6;
@@ -1114,15 +1114,15 @@ function Bp({
1114
1114
  displayMode: o = "inline",
1115
1115
  className: i = ""
1116
1116
  }) {
1117
- const l = xu(), d = ri(e || l), u = o === "popover", [b, f] = z(!1), m = oe(null), [h, x] = z({
1117
+ const l = xu(), d = ni(e || l), u = o === "popover", [b, f] = z(!1), m = oe(null), [h, x] = z({
1118
1118
  horizontal: "left",
1119
1119
  vertical: "bottom"
1120
1120
  }), [w, g] = z(d.year), [A, S] = z(d.month), [T, O] = z("days"), C = 16, [y, $] = z(0), k = w - 7 + y, _ = Array.from({ length: C }, (I, q) => k + q);
1121
1121
  me(() => {
1122
1122
  if (!u || !b || !m.current) return;
1123
- const I = m.current.getBoundingClientRect(), q = 8, ne = 280, M = 340, H = I.left + ne > window.innerWidth - q, ce = I.right - ne >= q, R = I.bottom + 8 + M > window.innerHeight - q, ae = I.top - 8 - M >= q;
1123
+ const I = m.current.getBoundingClientRect(), q = 8, ne = 280, M = 340, F = I.left + ne > window.innerWidth - q, ce = I.right - ne >= q, R = I.bottom + 8 + M > window.innerHeight - q, ae = I.top - 8 - M >= q;
1124
1124
  x({
1125
- horizontal: H && ce ? "right" : "left",
1125
+ horizontal: F && ce ? "right" : "left",
1126
1126
  vertical: R && ae ? "top" : "bottom"
1127
1127
  });
1128
1128
  }, [u, b]), me(() => {
@@ -1150,7 +1150,7 @@ function Bp({
1150
1150
  for (; P.length < Qi * 7; ) P.push(null);
1151
1151
  const le = P.slice(0, Qi * 7);
1152
1152
  function G(I) {
1153
- const q = Ho(w, A, I);
1153
+ const q = Po(w, A, I);
1154
1154
  n && q < n || a && Ji(q) || (t(q), u && f(!1));
1155
1155
  }
1156
1156
  const fe = /* @__PURE__ */ r("div", { className: `bonsaif-calendar bonsaif-calendar-picker ${i}`.trim(), children: /* @__PURE__ */ c("div", { className: "bonsaif-cal-shell", children: [
@@ -1268,11 +1268,11 @@ function Bp({
1268
1268
  },
1269
1269
  q
1270
1270
  );
1271
- const ne = Ho(w, A, I), M = ne === e, H = ne === l, ce = !!(n && ne < n) || a && Ji(ne);
1271
+ const ne = Po(w, A, I), M = ne === e, F = ne === l, ce = !!(n && ne < n) || a && Ji(ne);
1272
1272
  return /* @__PURE__ */ r(
1273
1273
  "div",
1274
1274
  {
1275
- className: `bonsaif-multi-day${M ? " bonsaif-multi-day-selected" : ""}${H ? " bonsaif-multi-day-today" : ""}${ce ? " bonsaif-multi-day-disabled" : ""}`,
1275
+ className: `bonsaif-multi-day${M ? " bonsaif-multi-day-selected" : ""}${F ? " bonsaif-multi-day-today" : ""}${ce ? " bonsaif-multi-day-disabled" : ""}`,
1276
1276
  children: /* @__PURE__ */ r(
1277
1277
  "button",
1278
1278
  {
@@ -1353,17 +1353,17 @@ function hr({
1353
1353
  }
1354
1354
  );
1355
1355
  }
1356
- function bo(e) {
1356
+ function po(e) {
1357
1357
  if (e !== void 0)
1358
1358
  return typeof e == "number" ? `${e}px` : e;
1359
1359
  }
1360
- function po(e) {
1360
+ function ho(e) {
1361
1361
  return e.normalize("NFD").replace(new RegExp("\\p{M}", "gu"), "").toLowerCase();
1362
1362
  }
1363
1363
  function yu(e, t) {
1364
1364
  if (!t.trim()) return !0;
1365
- const n = po(t);
1366
- return po(e.label).includes(n) || !!(e.sublabel && po(e.sublabel).includes(n));
1365
+ const n = ho(t);
1366
+ return ho(e.label).includes(n) || !!(e.sublabel && ho(e.sublabel).includes(n));
1367
1367
  }
1368
1368
  function en({
1369
1369
  value: e,
@@ -1395,7 +1395,7 @@ function en({
1395
1395
  top: v ? void 0 : Q.bottom + 4,
1396
1396
  bottom: v ? window.innerHeight - Q.top + 4 : void 0,
1397
1397
  width: Q.width,
1398
- minWidth: bo(m),
1398
+ minWidth: po(m),
1399
1399
  zIndex: h
1400
1400
  });
1401
1401
  }, [m, h, G]);
@@ -1422,7 +1422,7 @@ function en({
1422
1422
  const E = le.current.children[y];
1423
1423
  E == null || E.scrollIntoView({ block: "nearest" });
1424
1424
  }, [y]);
1425
- const H = be(
1425
+ const F = be(
1426
1426
  (E) => {
1427
1427
  t(E), T(!1), C("");
1428
1428
  },
@@ -1435,8 +1435,8 @@ function en({
1435
1435
  ae.current = y;
1436
1436
  const K = oe(d);
1437
1437
  K.current = d;
1438
- const W = oe(H);
1439
- W.current = H, me(() => {
1438
+ const W = oe(F);
1439
+ W.current = F, me(() => {
1440
1440
  function E(Q) {
1441
1441
  var N, ee;
1442
1442
  const J = document.activeElement, Z = ((N = D.current) == null ? void 0 : N.contains(J)) ?? !1, v = ((ee = Y.current) == null ? void 0 : ee.contains(J)) ?? !1;
@@ -1542,7 +1542,7 @@ function en({
1542
1542
  role: "option",
1543
1543
  "aria-selected": e === "",
1544
1544
  onMouseDown: (E) => {
1545
- E.preventDefault(), H("");
1545
+ E.preventDefault(), F("");
1546
1546
  },
1547
1547
  onMouseEnter: () => $(-1),
1548
1548
  className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
@@ -1562,7 +1562,7 @@ function en({
1562
1562
  role: "option",
1563
1563
  "aria-selected": v,
1564
1564
  onMouseDown: (N) => {
1565
- N.preventDefault(), E.disabled || H(E.value);
1565
+ N.preventDefault(), E.disabled || F(E.value);
1566
1566
  },
1567
1567
  onMouseEnter: () => !E.disabled && $(Q),
1568
1568
  className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
@@ -1633,8 +1633,8 @@ function en({
1633
1633
  onClick: () => !u && T((E) => !E),
1634
1634
  className: "flex w-full items-center gap-2 rounded-lg text-left text-sm transition-colors focus:outline-none",
1635
1635
  style: {
1636
- height: bo(x),
1637
- padding: bo(w),
1636
+ height: po(x),
1637
+ padding: po(w),
1638
1638
  background: I ? "transparent" : "var(--bg-input)",
1639
1639
  color: fe ? "var(--text-main)" : "var(--text-muted)",
1640
1640
  border: I ? "1px solid transparent" : `1px solid ${q}`,
@@ -1669,7 +1669,7 @@ function en({
1669
1669
  role: "button",
1670
1670
  tabIndex: -1,
1671
1671
  onMouseDown: (E) => {
1672
- E.preventDefault(), E.stopPropagation(), H("");
1672
+ E.preventDefault(), E.stopPropagation(), F("");
1673
1673
  },
1674
1674
  className: "flex-shrink-0 rounded-full p-0.5 transition-colors hover:bg-black/10",
1675
1675
  style: { color: "var(--text-muted)" },
@@ -1704,7 +1704,7 @@ function Nu(e, t) {
1704
1704
  }
1705
1705
  e && (e.current = t);
1706
1706
  }
1707
- const Po = Go(function({
1707
+ const zo = Zo(function({
1708
1708
  label: t,
1709
1709
  description: n,
1710
1710
  error: a,
@@ -1917,7 +1917,7 @@ function al(...e) {
1917
1917
  {}
1918
1918
  );
1919
1919
  }
1920
- function ho(e, t, n) {
1920
+ function go(e, t, n) {
1921
1921
  return typeof e != "number" || e <= 0 ? n : kn(t).includes(e) ? e : n;
1922
1922
  }
1923
1923
  function bn(e) {
@@ -1973,7 +1973,7 @@ function Ou(e) {
1973
1973
  function Dr(e) {
1974
1974
  return e.key === "actions" || e.key === "acciones" ? !0 : typeof e.header == "string" && e.header.trim().toLowerCase() === "acciones";
1975
1975
  }
1976
- function zo(e) {
1976
+ function jo(e) {
1977
1977
  return e.sticky === !0;
1978
1978
  }
1979
1979
  function ol(e) {
@@ -2005,7 +2005,7 @@ function ca(e, t) {
2005
2005
  return a;
2006
2006
  }
2007
2007
  function mr(e, t) {
2008
- const n = t.filter(zo).map((l) => l.key);
2008
+ const n = t.filter(jo).map((l) => l.key);
2009
2009
  if (n.length === 0) return e;
2010
2010
  const a = new Set(n), o = n.filter((l) => e.includes(l)), i = e.filter((l) => !a.has(l));
2011
2011
  return [...o, ...i];
@@ -2165,7 +2165,7 @@ function Cs({
2165
2165
  compact: q = !0,
2166
2166
  restrictHeight: ne = !0,
2167
2167
  maxHeight: M,
2168
- minTableWidth: H,
2168
+ minTableWidth: F,
2169
2169
  enableColumnVisibility: ce = !0,
2170
2170
  enableColumnFilters: R = !0,
2171
2171
  hiddenColumnKeys: ae,
@@ -2182,9 +2182,9 @@ rol IN (admin, employee)`,
2182
2182
  bqlQuickFilters: ee = [],
2183
2183
  bqlExamples: ue = [],
2184
2184
  bqlSuggestions: te = [],
2185
- bqlActiveFilters: xe,
2185
+ bqlActiveFilters: ve,
2186
2186
  bqlError: Ce,
2187
- onQueryChange: Le,
2187
+ onQueryChange: Ae,
2188
2188
  persistState: vt,
2189
2189
  onPreferencesReady: St,
2190
2190
  enableExport: it = !1,
@@ -2212,37 +2212,37 @@ rol IN (admin, employee)`,
2212
2212
  Hn.current = $;
2213
2213
  const Pn = oe(k);
2214
2214
  Pn.current = k;
2215
- const fc = Array.isArray(k) ? k.join(",") : "", Ya = oe(null), pi = oe(null), Ka = oe(null), hi = oe(0), [bc, pc] = z(
2215
+ const fc = Array.isArray(k) ? k.join(",") : "", Ya = oe(null), hi = oe(null), Ka = oe(null), gi = oe(0), [bc, pc] = z(
2216
2216
  {}
2217
2217
  ), [hc, gc] = z(
2218
2218
  {}
2219
2219
  ), [cn, zn] = z(!1), Xa = oe(null), jn = oe(null), [xc, vc] = z(
2220
2220
  {}
2221
- ), gi = oe(null), Wn = oe(null), [Ga, xi] = z(
2221
+ ), xi = oe(null), Wn = oe(null), [Ga, vi] = z(
2222
2222
  t.length > 0 || a || s === !1
2223
- ), vi = (p, L) => 50 + (p * 17 + L * 13 + 7) % 40, cr = oe(null), [yc, wc] = z(
2223
+ ), yi = (p, L) => 50 + (p * 17 + L * 13 + 7) % 40, cr = oe(null), [yc, wc] = z(
2224
2224
  void 0
2225
- ), [yi, Nc] = z(0), [kc, Ec] = z(!1);
2225
+ ), [wi, Nc] = z(0), [kc, Ec] = z(!1);
2226
2226
  me(() => {
2227
2227
  function p() {
2228
2228
  Ec(window.innerWidth < 640);
2229
2229
  }
2230
2230
  if (!ne || M !== void 0)
2231
2231
  return p(), window.addEventListener("resize", p), () => window.removeEventListener("resize", p);
2232
- const X = $ !== !1 ? 48 : 0, F = 12;
2232
+ const X = $ !== !1 ? 48 : 0, H = 12;
2233
2233
  function se() {
2234
2234
  if (p(), !cr.current) return;
2235
- const ve = cr.current.getBoundingClientRect().top;
2235
+ const xe = cr.current.getBoundingClientRect().top;
2236
2236
  wc(
2237
2237
  Math.max(
2238
2238
  120,
2239
- window.innerHeight - ve - X - F - I
2239
+ window.innerHeight - xe - X - H - I
2240
2240
  )
2241
2241
  );
2242
2242
  }
2243
2243
  return se(), window.addEventListener("resize", se), () => window.removeEventListener("resize", se);
2244
2244
  }, [a, $, I, ne, M]);
2245
- const wi = ne ? M ?? yc : void 0;
2245
+ const Ni = ne ? M ?? yc : void 0;
2246
2246
  me(() => {
2247
2247
  const p = cr.current;
2248
2248
  if (!p) return;
@@ -2253,12 +2253,12 @@ rol IN (admin, employee)`,
2253
2253
  return X.observe(p), () => X.disconnect();
2254
2254
  }, [a, Je, t.length]), me(() => {
2255
2255
  if (s === !1 || a || t.length > 0) {
2256
- xi(!0);
2256
+ vi(!0);
2257
2257
  return;
2258
2258
  }
2259
2259
  if (Ga) return;
2260
2260
  const p = window.setTimeout(() => {
2261
- xi(!0);
2261
+ vi(!0);
2262
2262
  }, s);
2263
2263
  return () => window.clearTimeout(p);
2264
2264
  }, [t.length, s, Ga, a]);
@@ -2275,8 +2275,8 @@ rol IN (admin, employee)`,
2275
2275
  $ === !1 ? 0 : $
2276
2276
  );
2277
2277
  me(() => {
2278
- var De;
2279
- const p = Ue.current, L = He.current, X = p.map(($e) => $e.key), F = new Set(X), se = () => {
2278
+ var Le;
2279
+ const p = Ue.current, L = He.current, X = p.map(($e) => $e.key), H = new Set(X), se = () => {
2280
2280
  var $e;
2281
2281
  ye.current || (ye.current = !0, ($e = Fe.current) == null || $e.call(Fe));
2282
2282
  };
@@ -2289,12 +2289,12 @@ rol IN (admin, employee)`,
2289
2289
  ), pe.current = !1, ct(!0), se();
2290
2290
  return;
2291
2291
  }
2292
- let ve = !1;
2292
+ let xe = !1;
2293
2293
  const Me = Pe.current === G;
2294
2294
  Me || (pe.current = !1, ct(!1), ye.current = !1);
2295
- const Ae = sa(G);
2296
- if (nl(Ae) && !Me) {
2297
- const $e = Ae, Ee = kn(
2295
+ const De = sa(G);
2296
+ if (nl(De) && !Me) {
2297
+ const $e = De, Ee = kn(
2298
2298
  Pn.current ?? Nn()
2299
2299
  ), Se = Hn.current, $r = Se === !1 ? 0 : Se, ur = re.layout ? $e == null ? void 0 : $e.columnOrder : void 0, Tr = Array.isArray(ur) ? ur.filter((Xe) => X.includes(Xe)) : [], Mr = mr(
2300
2300
  Tr.length > 0 ? ca(Tr, X) : X,
@@ -2314,21 +2314,21 @@ rol IN (admin, employee)`,
2314
2314
  p
2315
2315
  );
2316
2316
  if (re.layout && (Ir(Mr), _r(fn)), ze || dt(zr), re.filters && (lr(
2317
- pn($e == null ? void 0 : $e.filters, F)
2317
+ pn($e == null ? void 0 : $e.filters, H)
2318
2318
  ), It(
2319
2319
  hn(
2320
2320
  $e == null ? void 0 : $e.conditionFilters,
2321
- F
2321
+ H
2322
2322
  )
2323
2323
  )), re.sort) {
2324
2324
  const Xe = bn($e == null ? void 0 : $e.sort) ? $e.sort : null;
2325
- Er(Xe && F.has(Xe.key) ? Xe : null);
2325
+ Er(Xe && H.has(Xe.key) ? Xe : null);
2326
2326
  }
2327
2327
  if (re.bql) {
2328
2328
  if (er.current !== G) {
2329
2329
  er.current = G;
2330
2330
  const Xe = typeof ($e == null ? void 0 : $e.bql) == "string" ? $e.bql : J;
2331
- B ? (De = Yt.current) == null || De.call(Yt, Xe) : ge(Xe);
2331
+ B ? (Le = Yt.current) == null || Le.call(Yt, Xe) : ge(Xe);
2332
2332
  }
2333
2333
  _t(
2334
2334
  Array.isArray($e == null ? void 0 : $e.bqlHistory) ? $e.bqlHistory.filter(
@@ -2337,7 +2337,7 @@ rol IN (admin, employee)`,
2337
2337
  );
2338
2338
  }
2339
2339
  re.pagination && Vt.current !== G && (Vt.current = G, Vn(
2340
- ho(
2340
+ go(
2341
2341
  $e == null ? void 0 : $e.pageSize,
2342
2342
  Ee,
2343
2343
  $r
@@ -2353,7 +2353,7 @@ rol IN (admin, employee)`,
2353
2353
  signal: nt.signal
2354
2354
  }).then(($e) => $e.ok ? $e.json() : null).then(($e) => {
2355
2355
  var Vi;
2356
- if (ve) return;
2356
+ if (xe) return;
2357
2357
  const Ee = sa(G), Se = al(
2358
2358
  nl($e == null ? void 0 : $e.settings) ? $e == null ? void 0 : $e.settings : null,
2359
2359
  Ee
@@ -2377,15 +2377,15 @@ rol IN (admin, employee)`,
2377
2377
  p
2378
2378
  );
2379
2379
  if (re.layout && (Ir(Pr), _r(Xe)), ze || dt(jr), re.filters && (lr(
2380
- pn(Se == null ? void 0 : Se.filters, F)
2380
+ pn(Se == null ? void 0 : Se.filters, H)
2381
2381
  ), It(
2382
2382
  hn(
2383
2383
  Se == null ? void 0 : Se.conditionFilters,
2384
- F
2384
+ H
2385
2385
  )
2386
2386
  )), re.sort) {
2387
2387
  const lt = bn(Se == null ? void 0 : Se.sort) ? Se.sort : null;
2388
- Er(lt && F.has(lt.key) ? lt : null);
2388
+ Er(lt && H.has(lt.key) ? lt : null);
2389
2389
  }
2390
2390
  if (re.bql) {
2391
2391
  if (er.current !== G) {
@@ -2400,7 +2400,7 @@ rol IN (admin, employee)`,
2400
2400
  );
2401
2401
  }
2402
2402
  let Qe;
2403
- re.pagination && (Qe = ho(
2403
+ re.pagination && (Qe = go(
2404
2404
  Se == null ? void 0 : Se.pageSize,
2405
2405
  $r,
2406
2406
  Tr
@@ -2408,10 +2408,10 @@ rol IN (admin, employee)`,
2408
2408
  columnOrder: Pr,
2409
2409
  columnWidths: Xe,
2410
2410
  hiddenColumnKeys: jr,
2411
- filters: pn(Se == null ? void 0 : Se.filters, F),
2411
+ filters: pn(Se == null ? void 0 : Se.filters, H),
2412
2412
  conditionFilters: hn(
2413
2413
  Se == null ? void 0 : Se.conditionFilters,
2414
- F
2414
+ H
2415
2415
  ),
2416
2416
  sort: bn(Se == null ? void 0 : Se.sort) ? Se.sort : null,
2417
2417
  bql: typeof (Se == null ? void 0 : Se.bql) == "string" ? Se.bql : "",
@@ -2420,7 +2420,7 @@ rol IN (admin, employee)`,
2420
2420
  }), pe.current = !0;
2421
2421
  }).catch(() => {
2422
2422
  var $e;
2423
- if (!ve) {
2423
+ if (!xe) {
2424
2424
  const Ee = sa(G), Se = kn(
2425
2425
  Pn.current ?? Nn()
2426
2426
  ), $r = Hn.current, ur = $r === !1 ? 0 : $r, Tr = re.layout ? Ee == null ? void 0 : Ee.columnOrder : void 0, Mr = Array.isArray(Tr) ? Tr.filter((Qe) => X.includes(Qe)) : [], Ar = mr(
@@ -2443,16 +2443,16 @@ rol IN (admin, employee)`,
2443
2443
  p
2444
2444
  );
2445
2445
  if (ze || dt(Xe), re.filters && (lr(
2446
- pn(Ee == null ? void 0 : Ee.filters, F)
2446
+ pn(Ee == null ? void 0 : Ee.filters, H)
2447
2447
  ), It(
2448
2448
  hn(
2449
2449
  Ee == null ? void 0 : Ee.conditionFilters,
2450
- F
2450
+ H
2451
2451
  )
2452
2452
  )), re.sort) {
2453
2453
  const Qe = bn(Ee == null ? void 0 : Ee.sort) ? Ee.sort : null;
2454
2454
  Er(
2455
- Qe && F.has(Qe.key) ? Qe : null
2455
+ Qe && H.has(Qe.key) ? Qe : null
2456
2456
  );
2457
2457
  }
2458
2458
  if (re.bql) {
@@ -2468,7 +2468,7 @@ rol IN (admin, employee)`,
2468
2468
  );
2469
2469
  }
2470
2470
  let jr;
2471
- re.pagination && (jr = ho(
2471
+ re.pagination && (jr = go(
2472
2472
  Ee == null ? void 0 : Ee.pageSize,
2473
2473
  Se,
2474
2474
  ur
@@ -2478,11 +2478,11 @@ rol IN (admin, employee)`,
2478
2478
  hiddenColumnKeys: Xe,
2479
2479
  filters: pn(
2480
2480
  Ee == null ? void 0 : Ee.filters,
2481
- F
2481
+ H
2482
2482
  ),
2483
2483
  conditionFilters: hn(
2484
2484
  Ee == null ? void 0 : Ee.conditionFilters,
2485
- F
2485
+ H
2486
2486
  ),
2487
2487
  sort: bn(Ee == null ? void 0 : Ee.sort) ? Ee.sort : null,
2488
2488
  bql: typeof (Ee == null ? void 0 : Ee.bql) == "string" ? Ee.bql : "",
@@ -2491,9 +2491,9 @@ rol IN (admin, employee)`,
2491
2491
  }), pe.current = !0;
2492
2492
  }
2493
2493
  }).finally(() => {
2494
- window.clearTimeout(we), ve || (Pe.current = G, ct(!0), se());
2494
+ window.clearTimeout(we), xe || (Pe.current = G, ct(!0), se());
2495
2495
  }), () => {
2496
- ve = !0, nt.abort(), window.clearTimeout(we);
2496
+ xe = !0, nt.abort(), window.clearTimeout(we);
2497
2497
  };
2498
2498
  }, [
2499
2499
  G,
@@ -2513,12 +2513,12 @@ rol IN (admin, employee)`,
2513
2513
  if (!G || !Je || !Oe || !pe.current) return;
2514
2514
  const p = {};
2515
2515
  re.layout && (p.columnOrder = Br, p.columnWidths = kr, p.hiddenColumnKeys = Ke), re.filters && (p.filters = xt, p.conditionFilters = Tt), re.sort && (p.sort = Ze), re.bql && (p.bql = he, p.bqlHistory = Mt), re.pagination && $ !== !1 && (p.pageSize = Un);
2516
- const L = sa(G), X = al(L, p), F = JSON.stringify(X);
2517
- if (F === Ct.current) return;
2518
- Du(G, X), Ct.current = F;
2516
+ const L = sa(G), X = al(L, p), H = JSON.stringify(X);
2517
+ if (H === Ct.current) return;
2518
+ Du(G, X), Ct.current = H;
2519
2519
  const se = window.setTimeout(() => {
2520
- const ve = tl() ?? "/api/user/preferences/datatables";
2521
- fetch(ve, {
2520
+ const xe = tl() ?? "/api/user/preferences/datatables";
2521
+ fetch(xe, {
2522
2522
  method: "PATCH",
2523
2523
  headers: { "Content-Type": "application/json" },
2524
2524
  body: JSON.stringify({ key: G, settings: X })
@@ -2555,34 +2555,39 @@ rol IN (admin, employee)`,
2555
2555
  );
2556
2556
  });
2557
2557
  }, [_e, e]);
2558
- const Ni = mr(Br, e).map((p) => e.find((L) => L.key === p)).filter((p) => !!p), At = Ni.filter(
2558
+ const ki = mr(Br, e).map((p) => e.find((L) => L.key === p)).filter((p) => !!p), At = ki.filter(
2559
2559
  (p) => !Ke.includes(p.key)
2560
- ), ki = e.some(zo), Cc = Object.keys(xt).length, $c = Object.keys(Tt).length, Za = Cc + $c;
2561
- function Ei(p) {
2560
+ ), Ei = e.some(jo), Cc = Object.keys(xt).length, $c = Object.keys(Tt).length, Za = Cc + $c;
2561
+ function Si(p) {
2562
2562
  const L = /* @__PURE__ */ new Set();
2563
- return t.reduce((X, F) => {
2564
- const se = da(p, F);
2563
+ return t.reduce((X, H) => {
2564
+ const se = da(p, H);
2565
2565
  return !se || L.has(se) || (L.add(se), X.push({ value: se, label: se })), X;
2566
2566
  }, []);
2567
2567
  }
2568
2568
  function Tc() {
2569
2569
  const p = e.find((L) => L.key === Jt);
2570
- return p ? Ei(p) : [];
2570
+ return p ? Si(p) : [];
2571
2571
  }
2572
2572
  function Mc(p) {
2573
- return !!(R && !Dr(p) && (p.filterValue || p.sortKey || Ei(p).length > 0));
2573
+ return !!(R && !Dr(p) && (p.filterValue || p.sortKey || Si(p).length > 0));
2574
2574
  }
2575
- function Si(p, L) {
2575
+ function Qa(p, L) {
2576
2576
  lr((X) => {
2577
- const F = { ...X };
2578
- return F[p] = L, F;
2577
+ const H = { ...X };
2578
+ return H[p] = L, H;
2579
2579
  });
2580
2580
  }
2581
- function Ac(p, L, X, F) {
2582
- const se = xt[p] ?? [], ve = F ? se : X.filter((Ae) => Ae !== L), Me = F ? se.includes(L) ? se.filter((Ae) => Ae !== L) : [...se, L] : ve;
2583
- Me.length === X.length ? Qa(p) : Si(p, Me);
2581
+ function Ac(p, L, X, H) {
2582
+ const se = xt[p] ?? [];
2583
+ if (!H) {
2584
+ Qa(p, [L]);
2585
+ return;
2586
+ }
2587
+ const xe = se.includes(L) ? se.filter((Me) => Me !== L) : [...se, L];
2588
+ xe.length === 0 || xe.length === X.length ? Ja(p) : Qa(p, xe);
2584
2589
  }
2585
- function Qa(p) {
2590
+ function Ja(p) {
2586
2591
  lr((L) => {
2587
2592
  const X = { ...L };
2588
2593
  return delete X[p], X;
@@ -2590,8 +2595,8 @@ rol IN (admin, employee)`,
2590
2595
  }
2591
2596
  function Yn(p, L) {
2592
2597
  It((X) => {
2593
- const F = { ...X };
2594
- return L ? F[p] = L : delete F[p], F;
2598
+ const H = { ...X };
2599
+ return L ? H[p] = L : delete H[p], H;
2595
2600
  });
2596
2601
  }
2597
2602
  function Ci(p) {
@@ -2606,7 +2611,7 @@ rol IN (admin, employee)`,
2606
2611
  function $i(p) {
2607
2612
  const L = p.trim();
2608
2613
  ke(L), (Z == null ? void 0 : Z(L)) !== !1 && (B || ge(L), Be(!1), et(!1), yt(!1), L && _t(
2609
- (F) => [L, ...F.filter((se) => se !== L)].slice(
2614
+ (H) => [L, ...H.filter((se) => se !== L)].slice(
2610
2615
  0,
2611
2616
  Cu
2612
2617
  )
@@ -2615,22 +2620,22 @@ rol IN (admin, employee)`,
2615
2620
  function Ti() {
2616
2621
  ke(""), Dc(""), Be(!1), et(!1), yt(!1);
2617
2622
  }
2618
- function Ja(p, L) {
2623
+ function eo(p, L) {
2619
2624
  ke(p), L && (L.style.height = "auto", L.style.height = `${Math.min(L.scrollHeight, 180)}px`);
2620
2625
  }
2621
2626
  function Kn(p) {
2622
2627
  const L = p.trim();
2623
2628
  if (!L) return;
2624
- hi.current = Date.now() + 500;
2625
- const X = Ne.replace(/\s+$/u, ""), F = X.length === 0 ? L : X.split(`
2629
+ gi.current = Date.now() + 500;
2630
+ const X = Ne.replace(/\s+$/u, ""), H = X.length === 0 ? L : X.split(`
2626
2631
  `).map((se) => se.trim()).includes(L) ? X : `${X}
2627
2632
  ${L}`;
2628
- Ja(F, Ka.current ?? void 0), requestAnimationFrame(() => {
2633
+ eo(H, Ka.current ?? void 0), requestAnimationFrame(() => {
2629
2634
  const se = Ka.current;
2630
2635
  if (!se) return;
2631
2636
  se.focus();
2632
- const ve = se.value.length;
2633
- se.setSelectionRange(ve, ve), Ja(se.value, se);
2637
+ const xe = se.value.length;
2638
+ se.setSelectionRange(xe, xe), eo(se.value, se);
2634
2639
  });
2635
2640
  }
2636
2641
  me(() => {
@@ -2639,10 +2644,10 @@ ${L}`;
2639
2644
  const Xn = mt.useCallback(() => {
2640
2645
  const p = Ya.current;
2641
2646
  if (!p) return;
2642
- const L = p.getBoundingClientRect(), X = 12, F = 8, se = Math.min(780, Math.max(320, window.innerWidth - 32)), ve = Math.max(
2647
+ const L = p.getBoundingClientRect(), X = 12, H = 8, se = Math.min(780, Math.max(320, window.innerWidth - 32)), xe = Math.max(
2643
2648
  X,
2644
2649
  window.innerWidth - se - X
2645
- ), Me = Math.min(Math.max(X, L.left), ve), Ae = L.bottom + F, Ve = window.innerHeight - L.top + F, Ge = window.innerHeight - Ae - X, wt = L.top - X - F, nt = Ge < 280 && wt > Ge, we = Math.max(
2650
+ ), Me = Math.min(Math.max(X, L.left), xe), De = L.bottom + H, Ve = window.innerHeight - L.top + H, Ge = window.innerHeight - De - X, wt = L.top - X - H, nt = Ge < 280 && wt > Ge, we = Math.max(
2646
2651
  240,
2647
2652
  nt ? wt : Ge
2648
2653
  );
@@ -2650,7 +2655,7 @@ ${L}`;
2650
2655
  position: "fixed",
2651
2656
  zIndex: 1e4,
2652
2657
  left: Me,
2653
- top: nt ? void 0 : Ae,
2658
+ top: nt ? void 0 : De,
2654
2659
  bottom: nt ? Ve : void 0,
2655
2660
  width: se,
2656
2661
  maxWidth: "calc(100vw - 24px)",
@@ -2660,14 +2665,14 @@ ${L}`;
2660
2665
  }, []);
2661
2666
  me(() => {
2662
2667
  if (!Ie) return;
2663
- function p(F) {
2664
- var ve, Me;
2665
- if (Date.now() < hi.current) return;
2666
- const se = F.target;
2667
- (ve = Ya.current) != null && ve.contains(se) || (Me = pi.current) != null && Me.contains(se) || (Be(!1), et(!1), yt(!1));
2668
+ function p(H) {
2669
+ var xe, Me;
2670
+ if (Date.now() < gi.current) return;
2671
+ const se = H.target;
2672
+ (xe = Ya.current) != null && xe.contains(se) || (Me = hi.current) != null && Me.contains(se) || (Be(!1), et(!1), yt(!1));
2668
2673
  }
2669
- function L(F) {
2670
- F.key === "Escape" && (Be(!1), et(!1), yt(!1));
2674
+ function L(H) {
2675
+ H.key === "Escape" && (Be(!1), et(!1), yt(!1));
2671
2676
  }
2672
2677
  function X() {
2673
2678
  Xn();
@@ -2688,10 +2693,10 @@ ${L}`;
2688
2693
  function Oc() {
2689
2694
  Mi([]);
2690
2695
  }
2691
- const eo = mt.useCallback(
2696
+ const to = mt.useCallback(
2692
2697
  (p = Wn.current) => {
2693
2698
  if (!p) return;
2694
- const L = p.getBoundingClientRect(), X = Math.min(292, Math.max(240, window.innerWidth - 16)), F = Math.max(8, window.innerWidth - X - 8), se = Math.min(Math.max(8, L.right - X), F), ve = window.innerHeight - L.bottom, Me = L.bottom + 6, Ae = window.innerHeight - L.top + 6, Ge = ve < 360 && L.top > ve ? void 0 : Me, wt = Ge === void 0 ? Ae : void 0, nt = Math.max(
2699
+ const L = p.getBoundingClientRect(), X = Math.min(292, Math.max(240, window.innerWidth - 16)), H = Math.max(8, window.innerWidth - X - 8), se = Math.min(Math.max(8, L.right - X), H), xe = window.innerHeight - L.bottom, Me = L.bottom + 6, De = window.innerHeight - L.top + 6, Ge = xe < 360 && L.top > xe ? void 0 : Me, wt = Ge === void 0 ? De : void 0, nt = Math.max(
2695
2700
  220,
2696
2701
  Ge === void 0 ? L.top - 16 : window.innerHeight - Me - 8
2697
2702
  ), we = {
@@ -2711,31 +2716,31 @@ ${L}`;
2711
2716
  );
2712
2717
  function Ai(p, L, X = null) {
2713
2718
  p.preventDefault(), p.stopPropagation();
2714
- const F = Wn.current === p.currentTarget && ut === L && Jt === X;
2715
- if (rt && F) {
2719
+ const H = Wn.current === p.currentTarget && ut === L && Jt === X;
2720
+ if (rt && H) {
2716
2721
  ft(!1), Nr(null);
2717
2722
  return;
2718
2723
  }
2719
- Wn.current = p.currentTarget, wr(L), Nr(X), We(""), eo(p.currentTarget), ft(!0);
2724
+ Wn.current = p.currentTarget, wr(L), Nr(X), We(""), to(p.currentTarget), ft(!0);
2720
2725
  }
2721
2726
  function Bc(p) {
2722
2727
  if (Dr(p)) return;
2723
2728
  const L = cr.current;
2724
2729
  if (!L) return;
2725
- const F = Array.from(
2730
+ const H = Array.from(
2726
2731
  L.querySelectorAll("[data-dt-column-key]")
2727
- ).filter((se) => se.dataset.dtColumnKey === p.key).reduce((se, ve) => {
2728
- const Me = ve.querySelector(
2732
+ ).filter((se) => se.dataset.dtColumnKey === p.key).reduce((se, xe) => {
2733
+ const Me = xe.querySelector(
2729
2734
  "[data-dt-autofit-content]"
2730
- ), Ae = Me ? Me.scrollWidth : Math.max(ve.scrollWidth, ve.offsetWidth);
2735
+ ), De = Me ? Me.scrollWidth : Math.max(xe.scrollWidth, xe.offsetWidth);
2731
2736
  return Math.max(
2732
2737
  se,
2733
- Math.ceil(Ae + Ou(ve))
2738
+ Math.ceil(De + Ou(xe))
2734
2739
  );
2735
2740
  }, 0);
2736
- F <= 0 || _r((se) => ({
2741
+ H <= 0 || _r((se) => ({
2737
2742
  ...se,
2738
- [p.key]: Lt(p, F + 12)
2743
+ [p.key]: Lt(p, H + 12)
2739
2744
  }));
2740
2745
  }
2741
2746
  me(() => {
@@ -2755,30 +2760,30 @@ ${L}`;
2755
2760
  (p) => fr(p, e)
2756
2761
  );
2757
2762
  }, [_e, e, ze]), me(() => {
2758
- function p(F) {
2759
- var Me, Ae;
2760
- const se = F.target, ve = F.target;
2761
- ve != null && ve.closest("[data-bonsaif-select-dropdown='true']") || !((Me = gi.current) != null && Me.contains(se)) && !((Ae = Wn.current) != null && Ae.contains(se)) && (ft(!1), Nr(null));
2763
+ function p(H) {
2764
+ var Me, De;
2765
+ const se = H.target, xe = H.target;
2766
+ xe != null && xe.closest("[data-bonsaif-select-dropdown='true']") || !((Me = xi.current) != null && Me.contains(se)) && !((De = Wn.current) != null && De.contains(se)) && (ft(!1), Nr(null));
2762
2767
  }
2763
- function L(F) {
2764
- F.key === "Escape" && (ft(!1), Nr(null));
2768
+ function L(H) {
2769
+ H.key === "Escape" && (ft(!1), Nr(null));
2765
2770
  }
2766
2771
  function X() {
2767
- eo();
2772
+ to();
2768
2773
  }
2769
2774
  return rt && (document.addEventListener("mousedown", p), window.addEventListener("keydown", L), window.addEventListener("resize", X), window.addEventListener("scroll", X, !0)), () => {
2770
2775
  document.removeEventListener("mousedown", p), window.removeEventListener("keydown", L), window.removeEventListener("resize", X), window.removeEventListener("scroll", X, !0);
2771
2776
  };
2772
- }, [rt, eo]);
2777
+ }, [rt, to]);
2773
2778
  const dn = oe(null);
2774
2779
  me(() => {
2775
2780
  function p(X) {
2776
- const F = dn.current;
2777
- if (!F) return;
2778
- const se = X.clientX - F.startX, ve = e.find((Me) => Me.key === F.colKey);
2779
- ve && _r((Me) => ({
2781
+ const H = dn.current;
2782
+ if (!H) return;
2783
+ const se = X.clientX - H.startX, xe = e.find((Me) => Me.key === H.colKey);
2784
+ xe && _r((Me) => ({
2780
2785
  ...Me,
2781
- [F.colKey]: Lt(ve, F.startWidth + se)
2786
+ [H.colKey]: Lt(xe, H.startWidth + se)
2782
2787
  }));
2783
2788
  }
2784
2789
  function L() {
@@ -2788,9 +2793,9 @@ ${L}`;
2788
2793
  document.removeEventListener("pointermove", p), document.removeEventListener("pointerup", L);
2789
2794
  };
2790
2795
  }, [e]);
2791
- const un = oe(null), [Li, to] = z(null);
2796
+ const un = oe(null), [Li, ro] = z(null);
2792
2797
  function Ic(p, L) {
2793
- const X = e.find((F) => F.key === p);
2798
+ const X = e.find((H) => H.key === p);
2794
2799
  if (!X || !ol(X)) {
2795
2800
  L.preventDefault();
2796
2801
  return;
@@ -2800,18 +2805,18 @@ ${L}`;
2800
2805
  function _c(p, L) {
2801
2806
  L.preventDefault(), L.dataTransfer.dropEffect = "move";
2802
2807
  const X = Br.indexOf(p);
2803
- Li !== X && to(X);
2808
+ Li !== X && ro(X);
2804
2809
  }
2805
2810
  function Fc(p, L) {
2806
2811
  L.preventDefault();
2807
- const X = un.current, F = Br.indexOf(p);
2808
- X !== null && X !== F && Ir((se) => {
2809
- const ve = [...se], [Me] = ve.splice(X, 1);
2810
- return ve.splice(F, 0, Me), mr(ve, e);
2811
- }), un.current = null, to(null);
2812
+ const X = un.current, H = Br.indexOf(p);
2813
+ X !== null && X !== H && Ir((se) => {
2814
+ const xe = [...se], [Me] = xe.splice(X, 1);
2815
+ return xe.splice(H, 0, Me), mr(xe, e);
2816
+ }), un.current = null, ro(null);
2812
2817
  }
2813
2818
  function Hc() {
2814
- un.current = null, to(null);
2819
+ un.current = null, ro(null);
2815
2820
  }
2816
2821
  function Pc(p) {
2817
2822
  p.sortKey && Er(
@@ -2823,12 +2828,12 @@ ${L}`;
2823
2828
  }, [t]), me(() => {
2824
2829
  qn(1);
2825
2830
  }, [Tt, xt]);
2826
- const Kt = !!(P && le), dr = $ !== !1, ro = mt.useMemo(
2831
+ const Kt = !!(P && le), dr = $ !== !1, no = mt.useMemo(
2827
2832
  () => kn(
2828
2833
  k ?? Nn()
2829
2834
  ),
2830
2835
  [k]
2831
- ), pt = Kt ? Y ?? 1 : Sc, Di = dr && Un < 1 ? typeof $ == "number" && $ > 0 ? $ : ro[0] ?? 25 : Un, Xt = Kt || dr ? Di : t.length, Ft = !!w && !!g && !!A, no = mt.useMemo(
2836
+ ), pt = Kt ? Y ?? 1 : Sc, Di = dr && Un < 1 ? typeof $ == "number" && $ > 0 ? $ : no[0] ?? 25 : Un, Xt = Kt || dr ? Di : t.length, Ft = !!w && !!g && !!A, ao = mt.useMemo(
2832
2837
  () => S ? t.filter((p) => S(p)) : t,
2833
2838
  [t, S]
2834
2839
  ), Fr = !!u, Ri = mt.useMemo(
@@ -2836,28 +2841,28 @@ ${L}`;
2836
2841
  ln ? Array.from(f ?? []) : sn
2837
2842
  ),
2838
2843
  [ln, f, sn]
2839
- ), zc = (Fr ? 40 : 0) + (Ft ? 40 : 0), ao = !kc && (ki || fe), Gn = (() => {
2840
- if (!ao) return {};
2844
+ ), zc = (Fr ? 40 : 0) + (Ft ? 40 : 0), oo = !kc && (Ei || fe), Gn = (() => {
2845
+ if (!oo) return {};
2841
2846
  let p = zc;
2842
2847
  const L = {};
2843
- return At.forEach((X, F) => {
2844
- (zo(X) || !ki && fe && F === 0) && (L[X.key] = p, p += kr[X.key] ?? Lt(X, rr(X.width)));
2848
+ return At.forEach((X, H) => {
2849
+ (jo(X) || !Ei && fe && H === 0) && (L[X.key] = p, p += kr[X.key] ?? Lt(X, rr(X.width)));
2845
2850
  }), L;
2846
- })(), oo = Object.keys(Gn), io = oo.length > 0 ? oo[oo.length - 1] : null, Oi = Ft && no.length > 0 && no.every((p) => w.has(n(p))), jc = Ft && w.size > 0 && no.some((p) => w.has(n(p))) && !Oi, Zn = mt.useMemo(() => {
2851
+ })(), io = Object.keys(Gn), lo = io.length > 0 ? io[io.length - 1] : null, Oi = Ft && ao.length > 0 && ao.every((p) => w.has(n(p))), jc = Ft && w.size > 0 && ao.some((p) => w.has(n(p))) && !Oi, Zn = mt.useMemo(() => {
2847
2852
  if (Kt) return t;
2848
2853
  const p = Object.entries(xt), L = Object.entries(Tt);
2849
2854
  return p.length === 0 && L.length === 0 ? t : t.filter(
2850
- (X) => p.every(([F, se]) => {
2851
- const ve = e.find((Me) => Me.key === F);
2852
- return ve ? se.includes(da(ve, X)) : !0;
2853
- }) && L.every(([F, se]) => {
2854
- const ve = e.find((Ae) => Ae.key === F);
2855
- if (!ve) return !0;
2855
+ (X) => p.every(([H, se]) => {
2856
+ const xe = e.find((Me) => Me.key === H);
2857
+ return xe ? se.includes(da(xe, X)) : !0;
2858
+ }) && L.every(([H, se]) => {
2859
+ const xe = e.find((De) => De.key === H);
2860
+ if (!xe) return !0;
2856
2861
  const Me = t.map(
2857
- (Ae) => da(ve, Ae)
2862
+ (De) => da(xe, De)
2858
2863
  );
2859
2864
  return _u(
2860
- da(ve, X),
2865
+ da(xe, X),
2861
2866
  se,
2862
2867
  Me
2863
2868
  );
@@ -2867,17 +2872,17 @@ ${L}`;
2867
2872
  if (!Ze) return Zn;
2868
2873
  const p = e.find((L) => L.key === Ze.key && L.sortKey);
2869
2874
  return p != null && p.sortKey ? [...Zn].sort((L, X) => {
2870
- const F = L[p.sortKey], se = X[p.sortKey], ve = F === se ? 0 : F == null ? 1 : se == null || F < se ? -1 : 1;
2871
- return Ze.dir === "asc" ? ve : -ve;
2875
+ const H = L[p.sortKey], se = X[p.sortKey], xe = H === se ? 0 : H == null ? 1 : se == null || H < se ? -1 : 1;
2876
+ return Ze.dir === "asc" ? xe : -xe;
2872
2877
  }) : Zn;
2873
2878
  }, [Zn, Ze, e]), Bi = mt.useMemo(() => {
2874
2879
  if (Kt || !dr) return Sr;
2875
2880
  const p = (pt - 1) * Xt;
2876
2881
  return Sr.slice(p, p + Xt);
2877
- }, [Sr, Kt, dr, pt, Xt]), tr = Kt ? D ?? t.length : Sr.length, lo = dr ? Math.max(1, Math.ceil(tr / Xt)) : 1, Wc = Math.min(...ro), qc = dr && (tr > Xt || tr > Wc), Uc = dr ? (pt - 1) * Xt + 1 : 1, Vc = dr ? Math.min(pt * Xt, tr) : tr;
2878
- function so(p) {
2882
+ }, [Sr, Kt, dr, pt, Xt]), tr = Kt ? D ?? t.length : Sr.length, so = dr ? Math.max(1, Math.ceil(tr / Xt)) : 1, Wc = Math.min(...no), qc = dr && (tr > Xt || tr > Wc), Uc = dr ? (pt - 1) * Xt + 1 : 1, Vc = dr ? Math.min(pt * Xt, tr) : tr;
2883
+ function co(p) {
2879
2884
  if (a) return;
2880
- const L = Math.max(1, Math.min(p, lo));
2885
+ const L = Math.max(1, Math.min(p, so));
2881
2886
  Kt ? P(L) : qn(L);
2882
2887
  }
2883
2888
  function Yc(p) {
@@ -2890,7 +2895,7 @@ ${L}`;
2890
2895
  ln || Fn(X), h == null || h(X);
2891
2896
  }
2892
2897
  me(() => {
2893
- Le == null || Le({
2898
+ Ae == null || Ae({
2894
2899
  bql: he,
2895
2900
  filters: xt,
2896
2901
  conditionFilters: Tt,
@@ -2907,12 +2912,12 @@ ${L}`;
2907
2912
  pt,
2908
2913
  Xt,
2909
2914
  Ke,
2910
- Le
2915
+ Ae
2911
2916
  ]);
2912
- const _i = (p) => p === "center" ? "justify-center text-center" : p === "right" ? "justify-end text-right" : "justify-start text-left", Kc = "color-mix(in srgb, var(--primary) 6%, var(--bg-card))", co = "linear-gradient(180deg, color-mix(in srgb, var(--bg-input) 90%, var(--bg-card)) 0%, color-mix(in srgb, var(--bg-input) 70%, var(--bg-card)) 100%)", je = "color-mix(in srgb, var(--border) 62%, var(--bg-card))", Cr = "color-mix(in srgb, var(--primary) 24%, var(--border))", Qn = `inset 0 0 0 1px ${je}`, Fi = At.reduce(
2917
+ const _i = (p) => p === "center" ? "justify-center text-center" : p === "right" ? "justify-end text-right" : "justify-start text-left", Kc = "color-mix(in srgb, var(--primary) 6%, var(--bg-card))", uo = "linear-gradient(180deg, color-mix(in srgb, var(--bg-input) 90%, var(--bg-card)) 0%, color-mix(in srgb, var(--bg-input) 70%, var(--bg-card)) 100%)", je = "color-mix(in srgb, var(--border) 62%, var(--bg-card))", Cr = "color-mix(in srgb, var(--primary) 24%, var(--border))", Qn = `inset 0 0 0 1px ${je}`, Fi = At.reduce(
2913
2918
  (p, L) => p + (kr[L.key] ?? rr(L.width)),
2914
2919
  (Fr ? 40 : 0) + (Ft ? 40 : 0)
2915
- ), Hi = typeof H == "number" ? H : typeof H == "string" ? Number(((Ui = H.match(/^(\d+(?:\.\d+)?)px$/)) == null ? void 0 : Ui[1]) ?? NaN) : NaN, mn = Number.isFinite(Hi) ? Math.max(Fi, Hi, yi) : Math.max(Fi, yi), Jn = H ?? mn, Hr = `${Fr ? "40px " : ""}${Ft ? "40px " : ""}${At.map((p) => `${kr[p.key] ?? rr(p.width)}px`).join(" ")}`;
2920
+ ), Hi = typeof F == "number" ? F : typeof F == "string" ? Number(((Ui = F.match(/^(\d+(?:\.\d+)?)px$/)) == null ? void 0 : Ui[1]) ?? NaN) : NaN, mn = Number.isFinite(Hi) ? Math.max(Fi, Hi, wi) : Math.max(Fi, wi), Jn = F ?? mn, Hr = `${Fr ? "40px " : ""}${Ft ? "40px " : ""}${At.map((p) => `${kr[p.key] ?? rr(p.width)}px`).join(" ")}`;
2916
2921
  me(() => {
2917
2922
  Ze && Ke.includes(Ze.key) && Er(null);
2918
2923
  }, [Ke, Ze]);
@@ -2926,7 +2931,7 @@ ${L}`;
2926
2931
  className: "grid",
2927
2932
  style: {
2928
2933
  gridTemplateColumns: Hr,
2929
- background: co,
2934
+ background: uo,
2930
2935
  borderBottom: `1px solid ${Cr}`
2931
2936
  },
2932
2937
  children: [
@@ -2946,11 +2951,11 @@ ${L}`;
2946
2951
  {
2947
2952
  role: "columnheader",
2948
2953
  className: `${q ? "px-2 py-1.5" : "px-3 py-2.5"} flex w-10 items-center justify-center`,
2949
- style: ao ? {
2954
+ style: oo ? {
2950
2955
  position: "sticky",
2951
2956
  left: 0,
2952
2957
  zIndex: 12,
2953
- background: co,
2958
+ background: uo,
2954
2959
  backdropFilter: "blur(14px)",
2955
2960
  WebkitBackdropFilter: "blur(14px)",
2956
2961
  boxShadow: `inset 0 -1px 0 ${Cr}`,
@@ -2960,7 +2965,7 @@ ${L}`;
2960
2965
  borderRight: `1px solid ${je}`
2961
2966
  },
2962
2967
  children: /* @__PURE__ */ r(
2963
- Po,
2968
+ zo,
2964
2969
  {
2965
2970
  size: "sm",
2966
2971
  checked: Oi,
@@ -2974,7 +2979,7 @@ ${L}`;
2974
2979
  }
2975
2980
  ),
2976
2981
  At.map((p, L) => {
2977
- const X = (Ze == null ? void 0 : Ze.key) === p.key, F = !!p.sortKey, se = Dr(p), ve = Gn[p.key], Me = ve !== void 0, Ae = p.key === io, Ve = ol(p), Ge = Li === L, nt = (kr[p.key] ?? rr(p.width)) < 120, we = Object.prototype.hasOwnProperty.call(xt, p.key) || Object.prototype.hasOwnProperty.call(Tt, p.key);
2982
+ const X = (Ze == null ? void 0 : Ze.key) === p.key, H = !!p.sortKey, se = Dr(p), xe = Gn[p.key], Me = xe !== void 0, De = p.key === lo, Ve = ol(p), Ge = Li === L, nt = (kr[p.key] ?? rr(p.width)) < 120, we = Object.prototype.hasOwnProperty.call(xt, p.key) || Object.prototype.hasOwnProperty.call(Tt, p.key);
2978
2983
  return /* @__PURE__ */ c(
2979
2984
  "div",
2980
2985
  {
@@ -2984,12 +2989,12 @@ ${L}`;
2984
2989
  style: {
2985
2990
  ...Me ? {
2986
2991
  position: "sticky",
2987
- left: ve,
2992
+ left: xe,
2988
2993
  zIndex: 12,
2989
- background: co,
2994
+ background: uo,
2990
2995
  backdropFilter: "blur(14px)",
2991
2996
  WebkitBackdropFilter: "blur(14px)",
2992
- boxShadow: Ae ? `3px 0 6px -2px rgba(0,0,0,0.10), inset 0 -1px 0 ${Cr}` : `inset 0 -1px 0 ${Cr}`,
2997
+ boxShadow: De ? `3px 0 6px -2px rgba(0,0,0,0.10), inset 0 -1px 0 ${Cr}` : `inset 0 -1px 0 ${Cr}`,
2993
2998
  borderRight: `1px solid ${je}`
2994
2999
  } : {
2995
3000
  position: "relative",
@@ -3003,10 +3008,10 @@ ${L}`;
3003
3008
  cursor: "default",
3004
3009
  padding: se ? q ? "7px 6px" : "9px 8px" : q ? "8px 6px 10px" : "10px 8px 12px"
3005
3010
  },
3006
- onDragOver: (De) => {
3007
- (Ve || un.current !== null) && _c(p.key, De);
3011
+ onDragOver: (Le) => {
3012
+ (Ve || un.current !== null) && _c(p.key, Le);
3008
3013
  },
3009
- onDrop: (De) => Fc(p.key, De),
3014
+ onDrop: (Le) => Fc(p.key, Le),
3010
3015
  children: [
3011
3016
  /* @__PURE__ */ c(
3012
3017
  "div",
@@ -3017,13 +3022,13 @@ ${L}`;
3017
3022
  "span",
3018
3023
  {
3019
3024
  draggable: !0,
3020
- onDragStart: (De) => {
3021
- De.stopPropagation(), Ic(p.key, De);
3025
+ onDragStart: (Le) => {
3026
+ Le.stopPropagation(), Ic(p.key, Le);
3022
3027
  },
3023
- onDragEnd: (De) => {
3024
- De.stopPropagation(), Hc();
3028
+ onDragEnd: (Le) => {
3029
+ Le.stopPropagation(), Hc();
3025
3030
  },
3026
- onClick: (De) => De.stopPropagation(),
3031
+ onClick: (Le) => Le.stopPropagation(),
3027
3032
  title: "Arrastrar para mover columna",
3028
3033
  "aria-label": "Arrastrar para mover columna",
3029
3034
  className: `absolute left-0 top-0 z-10 inline-flex h-full w-3 shrink-0 rounded-sm transition-colors duration-150 hover:bg-[var(--primary)]/15 ${Ge ? "bg-[var(--primary)]/20" : ""}`,
@@ -3046,14 +3051,14 @@ ${L}`;
3046
3051
  children: /* @__PURE__ */ r("span", { className: "min-w-0 truncate", children: p.header })
3047
3052
  }
3048
3053
  ) }),
3049
- F && /* @__PURE__ */ r(
3054
+ H && /* @__PURE__ */ r(
3050
3055
  "button",
3051
3056
  {
3052
3057
  type: "button",
3053
3058
  "aria-label": `Ordenar por ${String(p.header)}`,
3054
3059
  title: "Ordenar",
3055
- onClick: (De) => {
3056
- De.stopPropagation(), Pc(p);
3060
+ onClick: (Le) => {
3061
+ Le.stopPropagation(), Pc(p);
3057
3062
  },
3058
3063
  "data-dt-sort-button": !0,
3059
3064
  className: `absolute -bottom-2 left-1/2 z-20 inline-flex h-4 w-4 -translate-x-1/2 items-center justify-center rounded-full bg-[var(--primary)] text-[var(--primary-fg)] shadow-[0_1px_3px_rgba(15,23,42,0.22)] transition-[opacity,transform] duration-150 hover:scale-105 focus:scale-105 focus:opacity-100 focus:outline-none ${X ? "opacity-100" : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"}`,
@@ -3069,7 +3074,7 @@ ${L}`;
3069
3074
  "aria-expanded": rt && Jt === p.key,
3070
3075
  "aria-label": `Filtrar ${String(p.header)}`,
3071
3076
  title: "Filtrar",
3072
- onClick: (De) => Ai(De, "filter", p.key),
3077
+ onClick: (Le) => Ai(Le, "filter", p.key),
3073
3078
  className: `inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-sm bg-transparent text-[var(--text-muted)] opacity-0 transition-[opacity,color,background-color] duration-150 hover:bg-[var(--bg-card)] hover:text-[var(--primary)] focus:bg-[var(--bg-card)] focus:text-[var(--primary)] focus:opacity-100 group-hover:opacity-100 ${rt && ut === "filter" && Jt === p.key ? "bg-[var(--bg-card)] text-[var(--primary)] opacity-100" : we ? "text-[var(--primary)] opacity-100" : ""}`,
3074
3079
  children: we ? /* @__PURE__ */ r(od, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(id, { className: "h-3.5 w-3.5" })
3075
3080
  }
@@ -3083,17 +3088,17 @@ ${L}`;
3083
3088
  role: "separator",
3084
3089
  "aria-orientation": "vertical",
3085
3090
  title: "Arrastrar para redimensionar. Doble click para autoajustar",
3086
- onPointerDown: (De) => {
3087
- De.preventDefault(), De.stopPropagation(), dn.current = {
3091
+ onPointerDown: (Le) => {
3092
+ Le.preventDefault(), Le.stopPropagation(), dn.current = {
3088
3093
  colKey: p.key,
3089
- startX: De.clientX,
3094
+ startX: Le.clientX,
3090
3095
  startWidth: kr[p.key] ?? 150
3091
3096
  }, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
3092
3097
  },
3093
- onDoubleClick: (De) => {
3094
- De.preventDefault(), De.stopPropagation(), dn.current = null, document.body.style.cursor = "", document.body.style.userSelect = "", Bc(p);
3098
+ onDoubleClick: (Le) => {
3099
+ Le.preventDefault(), Le.stopPropagation(), dn.current = null, document.body.style.cursor = "", document.body.style.userSelect = "", Bc(p);
3095
3100
  },
3096
- onClick: (De) => De.stopPropagation(),
3101
+ onClick: (Le) => Le.stopPropagation(),
3097
3102
  className: "absolute top-0 flex h-full items-center justify-center opacity-0 transition-opacity duration-200 hover:opacity-100",
3098
3103
  style: {
3099
3104
  right: 0,
@@ -3152,18 +3157,18 @@ ${L}`;
3152
3157
  if (!rt || typeof document > "u" || ut === "visibility" && !ce || ut === "filter" && !R) return null;
3153
3158
  const p = e.find(
3154
3159
  (we) => we.key === Jt
3155
- ), L = Tc(), X = p ? Object.prototype.hasOwnProperty.call(xt, p.key) : !1, F = p ? Tt[p.key] : void 0, se = Pa.find(
3156
- (we) => we.value === (F == null ? void 0 : F.operator)
3157
- ), ve = p ? xt[p.key] ?? [] : [], Me = $t.trim().toLowerCase(), Ae = Me ? L.filter(
3160
+ ), L = Tc(), X = p ? Object.prototype.hasOwnProperty.call(xt, p.key) : !1, H = p ? Tt[p.key] : void 0, se = Pa.find(
3161
+ (we) => we.value === (H == null ? void 0 : H.operator)
3162
+ ), xe = p ? xt[p.key] ?? [] : [], Me = $t.trim().toLowerCase(), De = Me ? L.filter(
3158
3163
  (we) => we.label.toLowerCase().includes(Me)
3159
- ) : L, Ve = p && L.length > 0 && (!X || ve.length === L.length), Ge = p && X && ve.length > 0 && ve.length < L.length, wt = Ke.length, nt = () => {
3160
- p && (Qa(p.key), Ci(p.key));
3164
+ ) : L, Ve = p && L.length > 0 && (!X || xe.length === L.length), Ge = p && X && xe.length > 0 && xe.length < L.length, wt = Ke.length, nt = () => {
3165
+ p && (Ja(p.key), Ci(p.key));
3161
3166
  };
3162
3167
  return Et(
3163
3168
  /* @__PURE__ */ r(
3164
3169
  "div",
3165
3170
  {
3166
- ref: gi,
3171
+ ref: xi,
3167
3172
  role: "menu",
3168
3173
  className: "overflow-hidden rounded-lg border p-1 shadow-xl",
3169
3174
  style: {
@@ -3185,14 +3190,14 @@ ${L}`;
3185
3190
  }
3186
3191
  )
3187
3192
  ] }),
3188
- /* @__PURE__ */ r("div", { className: "max-h-72 overflow-auto py-1", children: Ni.map((we) => {
3189
- const De = !Ke.includes(we.key), Ee = !(we.hideable !== !1) || De && At.length <= 1;
3193
+ /* @__PURE__ */ r("div", { className: "max-h-72 overflow-auto py-1", children: ki.map((we) => {
3194
+ const Le = !Ke.includes(we.key), Ee = !(we.hideable !== !1) || Le && At.length <= 1;
3190
3195
  return /* @__PURE__ */ c(
3191
3196
  "button",
3192
3197
  {
3193
3198
  type: "button",
3194
3199
  role: "menuitemcheckbox",
3195
- "aria-checked": De,
3200
+ "aria-checked": Le,
3196
3201
  disabled: Ee,
3197
3202
  onClick: () => Rc(we.key),
3198
3203
  className: "flex w-full min-w-0 items-center gap-2 rounded-md px-2.5 py-1.5 text-left transition-colors hover:bg-[var(--bg-input)] disabled:cursor-not-allowed disabled:opacity-50",
@@ -3203,11 +3208,11 @@ ${L}`;
3203
3208
  {
3204
3209
  className: "flex h-4 w-4 shrink-0 items-center justify-center rounded border",
3205
3210
  style: {
3206
- borderColor: De ? "var(--primary)" : "var(--border)",
3207
- background: De ? "var(--primary)" : "var(--bg-input)",
3211
+ borderColor: Le ? "var(--primary)" : "var(--border)",
3212
+ background: Le ? "var(--primary)" : "var(--bg-input)",
3208
3213
  color: "var(--primary-fg)"
3209
3214
  },
3210
- children: De && /* @__PURE__ */ r(Pt, { className: "h-3 w-3" })
3215
+ children: Le && /* @__PURE__ */ r(Pt, { className: "h-3 w-3" })
3211
3216
  }
3212
3217
  ),
3213
3218
  /* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate text-sm", children: we.header })
@@ -3227,7 +3232,7 @@ ${L}`;
3227
3232
  {
3228
3233
  type: "button",
3229
3234
  onClick: nt,
3230
- disabled: !X && !F,
3235
+ disabled: !X && !H,
3231
3236
  className: "rounded px-1.5 py-0.5 text-xs font-medium text-[var(--primary)] transition-colors hover:bg-[var(--bg-input)] disabled:opacity-40",
3232
3237
  children: "Limpiar"
3233
3238
  }
@@ -3272,7 +3277,7 @@ ${L}`;
3272
3277
  /* @__PURE__ */ r(
3273
3278
  en,
3274
3279
  {
3275
- value: (F == null ? void 0 : F.operator) ?? "",
3280
+ value: (H == null ? void 0 : H.operator) ?? "",
3276
3281
  onChange: (we) => {
3277
3282
  if (!we) {
3278
3283
  Ci(p.key);
@@ -3280,8 +3285,8 @@ ${L}`;
3280
3285
  }
3281
3286
  Yn(p.key, {
3282
3287
  operator: we,
3283
- value: (F == null ? void 0 : F.value) ?? "",
3284
- valueTo: (F == null ? void 0 : F.valueTo) ?? ""
3288
+ value: (H == null ? void 0 : H.value) ?? "",
3289
+ valueTo: (H == null ? void 0 : H.valueTo) ?? ""
3285
3290
  });
3286
3291
  },
3287
3292
  options: Su,
@@ -3298,14 +3303,14 @@ ${L}`;
3298
3303
  (se == null ? void 0 : se.valueMode) !== "none" ? /* @__PURE__ */ r(
3299
3304
  "input",
3300
3305
  {
3301
- value: (F == null ? void 0 : F.value) ?? "",
3306
+ value: (H == null ? void 0 : H.value) ?? "",
3302
3307
  onChange: (we) => {
3303
- F && Yn(p.key, {
3304
- ...F,
3308
+ H && Yn(p.key, {
3309
+ ...H,
3305
3310
  value: we.target.value
3306
3311
  });
3307
3312
  },
3308
- disabled: !F,
3313
+ disabled: !H,
3309
3314
  placeholder: "Valor",
3310
3315
  className: "min-w-0 rounded-md border px-2 py-1.5 text-sm outline-none transition-colors placeholder:text-[var(--text-muted)] focus:border-[var(--primary)] disabled:opacity-50",
3311
3316
  style: {
@@ -3329,10 +3334,10 @@ ${L}`;
3329
3334
  (se == null ? void 0 : se.valueMode) === "between" && /* @__PURE__ */ r(
3330
3335
  "input",
3331
3336
  {
3332
- value: (F == null ? void 0 : F.valueTo) ?? "",
3337
+ value: (H == null ? void 0 : H.valueTo) ?? "",
3333
3338
  onChange: (we) => {
3334
- F && Yn(p.key, {
3335
- ...F,
3339
+ H && Yn(p.key, {
3340
+ ...H,
3336
3341
  valueTo: we.target.value
3337
3342
  });
3338
3343
  },
@@ -3384,7 +3389,7 @@ ${L}`;
3384
3389
  role: "menuitemcheckbox",
3385
3390
  "aria-checked": Ge ? "mixed" : !!Ve,
3386
3391
  onClick: () => {
3387
- p && (Ve && !X ? Si(p.key, []) : Qa(p.key));
3392
+ p && (Ve && !X ? Qa(p.key, []) : Ja(p.key));
3388
3393
  },
3389
3394
  className: "flex w-full min-w-0 items-center gap-2 rounded-md px-2.5 py-1.5 text-left transition-colors hover:bg-[var(--bg-input)]",
3390
3395
  style: { color: "var(--text-main)" },
@@ -3399,7 +3404,7 @@ ${L}`;
3399
3404
  color: "var(--primary-fg)"
3400
3405
  },
3401
3406
  children: [
3402
- Ge && /* @__PURE__ */ r(Qo, { className: "h-3 w-3" }),
3407
+ Ge && /* @__PURE__ */ r(Jo, { className: "h-3 w-3" }),
3403
3408
  Ve && !Ge && /* @__PURE__ */ r(Pt, { className: "h-3 w-3" })
3404
3409
  ]
3405
3410
  }
@@ -3408,14 +3413,14 @@ ${L}`;
3408
3413
  ]
3409
3414
  }
3410
3415
  ),
3411
- Ae.map((we) => {
3412
- const De = !X || ve.includes(we.value);
3416
+ De.map((we) => {
3417
+ const Le = !X || xe.includes(we.value);
3413
3418
  return /* @__PURE__ */ c(
3414
3419
  "button",
3415
3420
  {
3416
3421
  type: "button",
3417
3422
  role: "menuitemcheckbox",
3418
- "aria-checked": De,
3423
+ "aria-checked": Le,
3419
3424
  onClick: () => Ac(
3420
3425
  p.key,
3421
3426
  we.value,
@@ -3430,11 +3435,11 @@ ${L}`;
3430
3435
  {
3431
3436
  className: "flex h-4 w-4 shrink-0 items-center justify-center rounded border",
3432
3437
  style: {
3433
- borderColor: De ? "var(--primary)" : "var(--border)",
3434
- background: De ? "var(--primary)" : "var(--bg-input)",
3438
+ borderColor: Le ? "var(--primary)" : "var(--border)",
3439
+ background: Le ? "var(--primary)" : "var(--bg-input)",
3435
3440
  color: "var(--primary-fg)"
3436
3441
  },
3437
- children: De && /* @__PURE__ */ r(Pt, { className: "h-3 w-3" })
3442
+ children: Le && /* @__PURE__ */ r(Pt, { className: "h-3 w-3" })
3438
3443
  }
3439
3444
  ),
3440
3445
  /* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate text-sm", children: we.label })
@@ -3443,7 +3448,7 @@ ${L}`;
3443
3448
  we.value
3444
3449
  );
3445
3450
  }),
3446
- Ae.length === 0 && /* @__PURE__ */ r("div", { className: "px-3 py-3 text-sm text-[var(--text-muted)]", children: "Sin valores" })
3451
+ De.length === 0 && /* @__PURE__ */ r("div", { className: "px-3 py-3 text-sm text-[var(--text-muted)]", children: "Sin valores" })
3447
3452
  ]
3448
3453
  }
3449
3454
  )
@@ -3479,23 +3484,23 @@ ${L}`;
3479
3484
  ), Sr;
3480
3485
  }
3481
3486
  function Xc() {
3482
- const p = At.filter((Ve) => !Dr(Ve)), L = Wi(), X = p.map((Ve) => ji(Gr(Ve.header))).join(","), F = L.map(
3487
+ const p = At.filter((Ve) => !Dr(Ve)), L = Wi(), X = p.map((Ve) => ji(Gr(Ve.header))).join(","), H = L.map(
3483
3488
  (Ve) => p.map((Ge) => ji(zi(Ge, Ve))).join(",")
3484
3489
  ).join(`
3485
3490
  `), se = `${X}
3486
- ${F}`, ve = new Blob(["\uFEFF" + se], {
3491
+ ${H}`, xe = new Blob(["\uFEFF" + se], {
3487
3492
  type: "text/csv;charset=utf-8;"
3488
- }), Me = URL.createObjectURL(ve), Ae = document.createElement("a");
3489
- Ae.href = Me, Ae.download = `${st}.csv`, document.body.appendChild(Ae), Ae.click(), document.body.removeChild(Ae), URL.revokeObjectURL(Me);
3493
+ }), Me = URL.createObjectURL(xe), De = document.createElement("a");
3494
+ De.href = Me, De.download = `${st}.csv`, document.body.appendChild(De), De.click(), document.body.removeChild(De), URL.revokeObjectURL(Me);
3490
3495
  }
3491
3496
  function Gc() {
3492
- const p = At.filter((Ae) => !Dr(Ae)), L = Wi(), X = p.map(
3493
- (Ae) => ra(Gr(Ae.header))
3497
+ const p = At.filter((De) => !Dr(De)), L = Wi(), X = p.map(
3498
+ (De) => ra(Gr(De.header))
3494
3499
  ), se = L.map(
3495
- (Ae) => p.map((Ve) => ra(zi(Ve, Ae)))
3500
+ (De) => p.map((Ve) => ra(zi(Ve, De)))
3496
3501
  ).map(
3497
- (Ae) => `<tr>${Ae.map((Ve) => `<td>${Ve}</td>`).join("")}</tr>`
3498
- ).join(""), ve = `<!DOCTYPE html>
3502
+ (De) => `<tr>${De.map((Ve) => `<td>${Ve}</td>`).join("")}</tr>`
3503
+ ).join(""), xe = `<!DOCTYPE html>
3499
3504
  <html lang="es"><head><meta charset="utf-8"><title>${ra(st)}</title>
3500
3505
  <style>
3501
3506
  body{font-family:system-ui,sans-serif;font-size:11px;margin:20px;color:#111}
@@ -3509,11 +3514,11 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3509
3514
  </style></head><body>
3510
3515
  <h3>${ra(st)}</h3>
3511
3516
  <p>${L.length} registros · ${(/* @__PURE__ */ new Date()).toLocaleDateString("es")}</p>
3512
- <table><thead><tr>${X.map((Ae) => `<th>${Ae}</th>`).join("")}</tr></thead>
3517
+ <table><thead><tr>${X.map((De) => `<th>${De}</th>`).join("")}</tr></thead>
3513
3518
  <tbody>${se}</tbody></table>
3514
3519
  <script>window.onload=()=>{window.print()}<\/script>
3515
3520
  </body></html>`, Me = window.open("", "_blank");
3516
- Me && (Me.document.write(ve), Me.document.close());
3521
+ Me && (Me.document.write(xe), Me.document.close());
3517
3522
  }
3518
3523
  const na = () => !it || !cn ? null : Et(
3519
3524
  /* @__PURE__ */ c(
@@ -3542,7 +3547,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3542
3547
  (async () => (de ? await de() : Xc(), zn(!1)))();
3543
3548
  },
3544
3549
  children: [
3545
- /* @__PURE__ */ r(Jo, { className: "h-4 w-4 shrink-0 text-emerald-500" }),
3550
+ /* @__PURE__ */ r(ei, { className: "h-4 w-4 shrink-0 text-emerald-500" }),
3546
3551
  "Descargar CSV / Excel"
3547
3552
  ]
3548
3553
  }
@@ -3568,8 +3573,8 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3568
3573
  ),
3569
3574
  document.body
3570
3575
  ), aa = () => {
3571
- const p = E && he.trim().length > 0, L = xe != null && xe.length ? xe : p ? [{ key: "bql", label: "BQL", value: he }] : [], X = te.filter((F) => {
3572
- const se = F.trim();
3576
+ const p = E && he.trim().length > 0, L = ve != null && ve.length ? ve : p ? [{ key: "bql", label: "BQL", value: he }] : [], X = te.filter((H) => {
3577
+ const se = H.trim();
3573
3578
  return se ? !new Set(
3574
3579
  Ne.split(`
3575
3580
  `).map((Me) => Me.trim()).filter(Boolean)
@@ -3630,7 +3635,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3630
3635
  ),
3631
3636
  /* @__PURE__ */ r("span", { className: "hidden truncate text-xs text-[var(--text-muted)] sm:inline", children: v }),
3632
3637
  L.length > 0 && /* @__PURE__ */ c("div", { className: "hidden min-w-0 items-center gap-1.5 overflow-hidden lg:flex", children: [
3633
- L.slice(0, 3).map((F) => /* @__PURE__ */ c(
3638
+ L.slice(0, 3).map((H) => /* @__PURE__ */ c(
3634
3639
  "span",
3635
3640
  {
3636
3641
  className: "inline-flex max-w-44 items-center gap-1 truncate rounded-full px-2 py-1 text-xs font-medium",
@@ -3641,13 +3646,13 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3641
3646
  },
3642
3647
  children: [
3643
3648
  /* @__PURE__ */ c("span", { className: "text-[var(--text-muted)]", children: [
3644
- F.label,
3649
+ H.label,
3645
3650
  ":"
3646
3651
  ] }),
3647
- /* @__PURE__ */ r("span", { className: "truncate", children: F.value })
3652
+ /* @__PURE__ */ r("span", { className: "truncate", children: H.value })
3648
3653
  ]
3649
3654
  },
3650
- F.key
3655
+ H.key
3651
3656
  )),
3652
3657
  L.length > 3 && /* @__PURE__ */ c("span", { className: "text-xs text-[var(--text-muted)]", children: [
3653
3658
  "+",
@@ -3669,7 +3674,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3669
3674
  /* @__PURE__ */ c(
3670
3675
  "div",
3671
3676
  {
3672
- ref: pi,
3677
+ ref: hi,
3673
3678
  className: "flex flex-col gap-3 rounded-lg p-3 shadow-2xl",
3674
3679
  style: {
3675
3680
  ...bc,
@@ -3678,7 +3683,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3678
3683
  },
3679
3684
  children: [
3680
3685
  /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-1.5", children: [
3681
- ee.map((F) => /* @__PURE__ */ c(
3686
+ ee.map((H) => /* @__PURE__ */ c(
3682
3687
  "button",
3683
3688
  {
3684
3689
  type: "button",
@@ -3686,7 +3691,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3686
3691
  se.preventDefault(), se.stopPropagation();
3687
3692
  },
3688
3693
  onClick: (se) => {
3689
- se.preventDefault(), se.stopPropagation(), Kn(F.bql);
3694
+ se.preventDefault(), se.stopPropagation(), Kn(H.bql);
3690
3695
  },
3691
3696
  className: "inline-flex h-7 items-center gap-1.5 rounded-md border px-2.5 text-xs font-semibold transition-colors hover:border-[var(--primary)] hover:text-[var(--primary)]",
3692
3697
  style: {
@@ -3695,17 +3700,17 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3695
3700
  color: "var(--text-secondary)"
3696
3701
  },
3697
3702
  children: [
3698
- F.icon,
3699
- F.label
3703
+ H.icon,
3704
+ H.label
3700
3705
  ]
3701
3706
  },
3702
- F.label
3707
+ H.label
3703
3708
  )),
3704
3709
  ue.length > 0 && /* @__PURE__ */ c(
3705
3710
  "button",
3706
3711
  {
3707
3712
  type: "button",
3708
- onClick: () => et((F) => !F),
3713
+ onClick: () => et((H) => !H),
3709
3714
  className: "inline-flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-[var(--text-muted)] transition-colors hover:bg-[var(--bg-input)] hover:text-[var(--primary)]",
3710
3715
  "aria-expanded": bt,
3711
3716
  children: [
@@ -3718,11 +3723,11 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3718
3723
  "button",
3719
3724
  {
3720
3725
  type: "button",
3721
- onClick: () => yt((F) => !F),
3726
+ onClick: () => yt((H) => !H),
3722
3727
  className: "inline-flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-[var(--text-muted)] transition-colors hover:bg-[var(--bg-input)] hover:text-[var(--primary)]",
3723
3728
  "aria-expanded": sr,
3724
3729
  children: [
3725
- /* @__PURE__ */ r(Io, { className: "h-3.5 w-3.5" }),
3730
+ /* @__PURE__ */ r(_o, { className: "h-3.5 w-3.5" }),
3726
3731
  "Historial"
3727
3732
  ]
3728
3733
  }
@@ -3743,9 +3748,9 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3743
3748
  ref: Ka,
3744
3749
  value: Ne,
3745
3750
  rows: 3,
3746
- onChange: (F) => Ja(F.target.value, F.target),
3747
- onKeyDown: (F) => {
3748
- F.key === "Enter" && !F.shiftKey && (F.preventDefault(), $i(Ne)), F.key === "Escape" && Be(!1);
3751
+ onChange: (H) => eo(H.target.value, H.target),
3752
+ onKeyDown: (H) => {
3753
+ H.key === "Enter" && !H.shiftKey && (H.preventDefault(), $i(Ne)), H.key === "Escape" && Be(!1);
3749
3754
  },
3750
3755
  placeholder: N,
3751
3756
  autoComplete: "off",
@@ -3764,7 +3769,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3764
3769
  }
3765
3770
  }
3766
3771
  ),
3767
- X.length > 0 && /* @__PURE__ */ r("div", { className: "border-t border-[var(--border)] bg-[var(--bg-card)]", children: X.map((F) => /* @__PURE__ */ r(
3772
+ X.length > 0 && /* @__PURE__ */ r("div", { className: "border-t border-[var(--border)] bg-[var(--bg-card)]", children: X.map((H) => /* @__PURE__ */ r(
3768
3773
  "button",
3769
3774
  {
3770
3775
  type: "button",
@@ -3772,15 +3777,15 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3772
3777
  se.preventDefault(), se.stopPropagation();
3773
3778
  },
3774
3779
  onClick: (se) => {
3775
- se.preventDefault(), se.stopPropagation(), Kn(F);
3780
+ se.preventDefault(), se.stopPropagation(), Kn(H);
3776
3781
  },
3777
3782
  className: "block w-full px-4 py-2 text-left text-xs transition-colors hover:bg-[var(--bg-hover)] hover:text-[var(--primary)]",
3778
3783
  style: {
3779
3784
  fontFamily: "'SF Mono', 'Fira Code', 'Consolas', monospace"
3780
3785
  },
3781
- children: F
3786
+ children: H
3782
3787
  },
3783
- F
3788
+ H
3784
3789
  )) })
3785
3790
  ]
3786
3791
  }
@@ -3796,7 +3801,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3796
3801
  children: Ce ?? (p ? `${L.length || 1} filtro${(L.length || 1) === 1 ? "" : "s"} activo${(L.length || 1) === 1 ? "" : "s"}` : "Enter aplica la consulta. Shift + Enter agrega linea.")
3797
3802
  }
3798
3803
  ),
3799
- L.map((F) => /* @__PURE__ */ c(
3804
+ L.map((H) => /* @__PURE__ */ c(
3800
3805
  "span",
3801
3806
  {
3802
3807
  className: "inline-flex max-w-56 items-center gap-1 truncate rounded-full px-2 py-1 text-xs font-medium",
@@ -3807,19 +3812,19 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3807
3812
  },
3808
3813
  children: [
3809
3814
  /* @__PURE__ */ c("span", { className: "text-[var(--text-muted)]", children: [
3810
- F.label,
3815
+ H.label,
3811
3816
  ":"
3812
3817
  ] }),
3813
- /* @__PURE__ */ r("span", { className: "truncate", children: F.value })
3818
+ /* @__PURE__ */ r("span", { className: "truncate", children: H.value })
3814
3819
  ]
3815
3820
  },
3816
- F.key
3821
+ H.key
3817
3822
  ))
3818
3823
  ] }),
3819
3824
  sr && Mt.length > 0 && /* @__PURE__ */ c("div", { className: "overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-input)]", children: [
3820
3825
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between border-b border-[var(--border)] px-3 py-2", children: [
3821
3826
  /* @__PURE__ */ c("span", { className: "flex items-center gap-1.5 text-xs font-semibold text-[var(--text-secondary)]", children: [
3822
- /* @__PURE__ */ r(Io, { className: "h-3.5 w-3.5" }),
3827
+ /* @__PURE__ */ r(_o, { className: "h-3.5 w-3.5" }),
3823
3828
  "Historial"
3824
3829
  ] }),
3825
3830
  /* @__PURE__ */ c(
@@ -3837,7 +3842,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3837
3842
  }
3838
3843
  )
3839
3844
  ] }),
3840
- Mt.map((F) => /* @__PURE__ */ c(
3845
+ Mt.map((H) => /* @__PURE__ */ c(
3841
3846
  "div",
3842
3847
  {
3843
3848
  className: "group flex items-center gap-2 border-b border-[var(--border)] px-3 py-2 last:border-b-0",
@@ -3850,10 +3855,10 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3850
3855
  se.preventDefault(), se.stopPropagation();
3851
3856
  },
3852
3857
  onClick: (se) => {
3853
- se.preventDefault(), se.stopPropagation(), Kn(F);
3858
+ se.preventDefault(), se.stopPropagation(), Kn(H);
3854
3859
  },
3855
3860
  className: "min-w-0 flex-1 text-left",
3856
- children: /* @__PURE__ */ r("code", { className: "block truncate text-xs text-[var(--primary)]", children: F })
3861
+ children: /* @__PURE__ */ r("code", { className: "block truncate text-xs text-[var(--primary)]", children: H })
3857
3862
  }
3858
3863
  ),
3859
3864
  /* @__PURE__ */ r(
@@ -3861,7 +3866,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3861
3866
  {
3862
3867
  type: "button",
3863
3868
  onClick: () => _t(
3864
- (se) => se.filter((ve) => ve !== F)
3869
+ (se) => se.filter((xe) => xe !== H)
3865
3870
  ),
3866
3871
  className: "rounded p-1 text-[var(--text-muted)] opacity-0 transition-opacity group-hover:opacity-100",
3867
3872
  children: /* @__PURE__ */ r(ot, { className: "h-3.5 w-3.5" })
@@ -3869,10 +3874,10 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3869
3874
  )
3870
3875
  ]
3871
3876
  },
3872
- F
3877
+ H
3873
3878
  ))
3874
3879
  ] }),
3875
- bt && ue.length > 0 && /* @__PURE__ */ r("div", { className: "grid gap-2 sm:grid-cols-2 lg:grid-cols-3", children: ue.map((F) => /* @__PURE__ */ c(
3880
+ bt && ue.length > 0 && /* @__PURE__ */ r("div", { className: "grid gap-2 sm:grid-cols-2 lg:grid-cols-3", children: ue.map((H) => /* @__PURE__ */ c(
3876
3881
  "button",
3877
3882
  {
3878
3883
  type: "button",
@@ -3880,15 +3885,15 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3880
3885
  se.preventDefault(), se.stopPropagation();
3881
3886
  },
3882
3887
  onClick: (se) => {
3883
- se.preventDefault(), se.stopPropagation(), Kn(F.bql), et(!1);
3888
+ se.preventDefault(), se.stopPropagation(), Kn(H.bql), et(!1);
3884
3889
  },
3885
3890
  className: "rounded-lg border border-[var(--border)] bg-[var(--bg-input)] p-2 text-left transition-colors hover:border-[var(--primary)]",
3886
3891
  children: [
3887
- /* @__PURE__ */ r("code", { className: "block truncate text-xs text-[var(--primary)]", children: F.bql }),
3888
- F.description && /* @__PURE__ */ r("span", { className: "mt-1 block text-xs text-[var(--text-muted)]", children: F.description })
3892
+ /* @__PURE__ */ r("code", { className: "block truncate text-xs text-[var(--primary)]", children: H.bql }),
3893
+ H.description && /* @__PURE__ */ r("span", { className: "mt-1 block text-xs text-[var(--text-muted)]", children: H.description })
3889
3894
  ]
3890
3895
  },
3891
- F.bql
3896
+ H.bql
3892
3897
  )) }),
3893
3898
  /* @__PURE__ */ c("div", { className: "flex items-center justify-end gap-2 border-t border-[var(--border)] pt-3", children: [
3894
3899
  p && /* @__PURE__ */ c(
@@ -3936,11 +3941,11 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3936
3941
  title: "Exportar datos",
3937
3942
  onClick: () => {
3938
3943
  var se;
3939
- const F = (se = jn.current) == null ? void 0 : se.getBoundingClientRect();
3940
- F && vc({
3941
- top: F.bottom + 4,
3942
- right: window.innerWidth - F.right
3943
- }), zn((ve) => !ve);
3944
+ const H = (se = jn.current) == null ? void 0 : se.getBoundingClientRect();
3945
+ H && vc({
3946
+ top: H.bottom + 4,
3947
+ right: window.innerWidth - H.right
3948
+ }), zn((xe) => !xe);
3944
3949
  },
3945
3950
  className: `inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-[var(--text-muted)] transition-colors hover:bg-[var(--bg-card)] hover:text-[var(--primary)] focus:bg-[var(--bg-card)] focus:text-[var(--primary)] ${cn ? "bg-[var(--bg-card)] text-[var(--primary)]" : ""}`,
3946
3951
  children: /* @__PURE__ */ r(sd, { className: "h-4 w-4" })
@@ -3954,7 +3959,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3954
3959
  "aria-expanded": rt && ut === "visibility",
3955
3960
  "aria-label": ie,
3956
3961
  title: ie,
3957
- onClick: (F) => Ai(F, "visibility"),
3962
+ onClick: (H) => Ai(H, "visibility"),
3958
3963
  className: `inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-[var(--text-muted)] transition-colors hover:bg-[var(--bg-card)] hover:text-[var(--primary)] focus:bg-[var(--bg-card)] focus:text-[var(--primary)] ${rt && ut === "visibility" ? "bg-[var(--bg-card)] text-[var(--primary)]" : ""}`,
3959
3964
  children: /* @__PURE__ */ r(Ea, { className: "h-4 w-4" })
3960
3965
  }
@@ -3964,7 +3969,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3964
3969
  );
3965
3970
  }, qi = () => {
3966
3971
  if (!qc) return null;
3967
- const p = Bu(pt, lo);
3972
+ const p = Bu(pt, so);
3968
3973
  return /* @__PURE__ */ c(
3969
3974
  "div",
3970
3975
  {
@@ -3981,7 +3986,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
3981
3986
  {
3982
3987
  value: String(Xt),
3983
3988
  onChange: (L) => Yc(Number(L)),
3984
- options: ro.map((L) => ({
3989
+ options: no.map((L) => ({
3985
3990
  value: String(L),
3986
3991
  label: String(L)
3987
3992
  })),
@@ -4001,7 +4006,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
4001
4006
  "button",
4002
4007
  {
4003
4008
  disabled: a || pt <= 1,
4004
- onClick: () => so(pt - 1),
4009
+ onClick: () => co(pt - 1),
4005
4010
  onMouseEnter: (L) => {
4006
4011
  L.currentTarget.disabled || (L.currentTarget.style.background = "color-mix(in srgb, var(--primary) 14%, var(--bg-card))", L.currentTarget.style.color = "var(--primary)");
4007
4012
  },
@@ -4026,12 +4031,12 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
4026
4031
  "button",
4027
4032
  {
4028
4033
  disabled: a,
4029
- onClick: () => so(L),
4030
- onMouseEnter: (F) => {
4031
- F.currentTarget.disabled || L === pt || (F.currentTarget.style.background = "color-mix(in srgb, var(--primary) 14%, var(--bg-card))", F.currentTarget.style.color = "var(--primary)");
4034
+ onClick: () => co(L),
4035
+ onMouseEnter: (H) => {
4036
+ H.currentTarget.disabled || L === pt || (H.currentTarget.style.background = "color-mix(in srgb, var(--primary) 14%, var(--bg-card))", H.currentTarget.style.color = "var(--primary)");
4032
4037
  },
4033
- onMouseLeave: (F) => {
4034
- F.currentTarget.style.background = L === pt ? "var(--primary)" : "transparent", F.currentTarget.style.color = L === pt ? "var(--primary-fg)" : "var(--text-muted)";
4038
+ onMouseLeave: (H) => {
4039
+ H.currentTarget.style.background = L === pt ? "var(--primary)" : "transparent", H.currentTarget.style.color = L === pt ? "var(--primary-fg)" : "var(--text-muted)";
4035
4040
  },
4036
4041
  className: "h-5 w-5 cursor-pointer rounded text-[11px] font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-60",
4037
4042
  style: {
@@ -4046,8 +4051,8 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
4046
4051
  /* @__PURE__ */ r(
4047
4052
  "button",
4048
4053
  {
4049
- disabled: a || pt >= lo,
4050
- onClick: () => so(pt + 1),
4054
+ disabled: a || pt >= so,
4055
+ onClick: () => co(pt + 1),
4051
4056
  onMouseEnter: (L) => {
4052
4057
  L.currentTarget.disabled || (L.currentTarget.style.background = "color-mix(in srgb, var(--primary) 14%, var(--bg-card))", L.currentTarget.style.color = "var(--primary)");
4053
4058
  },
@@ -4120,7 +4125,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
4120
4125
  },
4121
4126
  "select-cell"
4122
4127
  ),
4123
- At.map((X, F) => /* @__PURE__ */ r(
4128
+ At.map((X, H) => /* @__PURE__ */ r(
4124
4129
  "div",
4125
4130
  {
4126
4131
  role: "cell",
@@ -4135,7 +4140,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
4135
4140
  className: "h-3.5 rounded-full animate-pulse",
4136
4141
  style: {
4137
4142
  background: "var(--border)",
4138
- width: `${vi(L, F)}%`,
4143
+ width: `${yi(L, H)}%`,
4139
4144
  minWidth: 32
4140
4145
  }
4141
4146
  }
@@ -4153,9 +4158,9 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
4153
4158
  ) })
4154
4159
  ]
4155
4160
  }
4156
- ), uo = "min-w-0 max-w-full overflow-hidden";
4161
+ ), mo = "min-w-0 max-w-full overflow-hidden";
4157
4162
  return G && Oe && !Je ? /* @__PURE__ */ r(
4158
- ti,
4163
+ ri,
4159
4164
  {
4160
4165
  rows: o,
4161
4166
  columns: Math.max(4, At.length || 7)
@@ -4169,13 +4174,13 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
4169
4174
  ta(),
4170
4175
  na(),
4171
4176
  aa(),
4172
- /* @__PURE__ */ r("div", { ref: cr, className: uo, children: /* @__PURE__ */ r(
4177
+ /* @__PURE__ */ r("div", { ref: cr, className: mo, children: /* @__PURE__ */ r(
4173
4178
  Ki,
4174
4179
  {
4175
4180
  options: { scrollbars: { autoHide: "leave", autoHideDelay: 200 } },
4176
4181
  className: "w-full",
4177
4182
  style: {
4178
- maxHeight: wi,
4183
+ maxHeight: Ni,
4179
4184
  maxWidth: "100%"
4180
4185
  },
4181
4186
  defer: !0,
@@ -4225,15 +4230,15 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
4225
4230
  },
4226
4231
  "select-cell"
4227
4232
  ),
4228
- At.map((X, F) => {
4229
- const se = Gn[X.key], ve = se !== void 0, Me = X.key === io;
4233
+ At.map((X, H) => {
4234
+ const se = Gn[X.key], xe = se !== void 0, Me = X.key === lo;
4230
4235
  return /* @__PURE__ */ r(
4231
4236
  "div",
4232
4237
  {
4233
4238
  role: "cell",
4234
4239
  "data-dt-column-key": X.key,
4235
4240
  className: q ? "px-2 py-1.5" : "px-3 py-2",
4236
- style: ve ? {
4241
+ style: xe ? {
4237
4242
  position: "sticky",
4238
4243
  left: se,
4239
4244
  zIndex: 1,
@@ -4252,7 +4257,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
4252
4257
  className: "h-3.5 rounded-full animate-pulse",
4253
4258
  style: {
4254
4259
  background: "var(--border)",
4255
- width: `${vi(L, F)}%`,
4260
+ width: `${yi(L, H)}%`,
4256
4261
  minWidth: 32
4257
4262
  }
4258
4263
  }
@@ -4282,7 +4287,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
4282
4287
  ta(),
4283
4288
  na(),
4284
4289
  aa(),
4285
- /* @__PURE__ */ r("div", { ref: cr, className: uo, children: /* @__PURE__ */ r(
4290
+ /* @__PURE__ */ r("div", { ref: cr, className: mo, children: /* @__PURE__ */ r(
4286
4291
  "div",
4287
4292
  {
4288
4293
  role: "table",
@@ -4351,13 +4356,13 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
4351
4356
  ta(),
4352
4357
  na(),
4353
4358
  aa(),
4354
- /* @__PURE__ */ r("div", { ref: cr, className: uo, children: /* @__PURE__ */ r(
4359
+ /* @__PURE__ */ r("div", { ref: cr, className: mo, children: /* @__PURE__ */ r(
4355
4360
  Ki,
4356
4361
  {
4357
4362
  options: { scrollbars: { autoHide: "leave", autoHideDelay: 200 } },
4358
4363
  className: "w-full",
4359
4364
  style: {
4360
- maxHeight: wi,
4365
+ maxHeight: Ni,
4361
4366
  maxWidth: "100%"
4362
4367
  },
4363
4368
  defer: !0,
@@ -4386,15 +4391,15 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
4386
4391
  }
4387
4392
  ),
4388
4393
  /* @__PURE__ */ r("div", { role: "rowgroup", children: Bi.map((p, L) => {
4389
- const X = n(p), F = Pi(C == null ? void 0 : C(p)), se = L > 0 ? Pi(
4394
+ const X = n(p), H = Pi(C == null ? void 0 : C(p)), se = L > 0 ? Pi(
4390
4395
  C == null ? void 0 : C(Bi[L - 1])
4391
- ) : null, ve = F && F.key !== (se == null ? void 0 : se.key), Me = Ft && w.has(X), Ae = Ft && (!S || S(p)), Ve = Fr ? (b == null ? void 0 : b(p)) ?? !0 : !1, Ge = Ve && Ri.has(X), wt = !!d || x && Ve, nt = Me && T ? "color-mix(in srgb, var(--primary) 8%, var(--bg-card))" : L % 2 === 1 ? "color-mix(in srgb, var(--bg-input) 30%, var(--bg-card))" : "var(--bg-card)";
4396
+ ) : null, xe = H && H.key !== (se == null ? void 0 : se.key), Me = Ft && w.has(X), De = Ft && (!S || S(p)), Ve = Fr ? (b == null ? void 0 : b(p)) ?? !0 : !1, Ge = Ve && Ri.has(X), wt = !!d || x && Ve, nt = Me && T ? "color-mix(in srgb, var(--primary) 8%, var(--bg-card))" : L % 2 === 1 ? "color-mix(in srgb, var(--bg-input) 30%, var(--bg-card))" : "var(--bg-card)";
4392
4397
  return /* @__PURE__ */ c(mt.Fragment, { children: [
4393
- ve && /* @__PURE__ */ r(
4398
+ xe && /* @__PURE__ */ r(
4394
4399
  "div",
4395
4400
  {
4396
4401
  role: "row",
4397
- className: `grid ${F.className ?? ""}`,
4402
+ className: `grid ${H.className ?? ""}`,
4398
4403
  style: { gridTemplateColumns: Hr },
4399
4404
  children: /* @__PURE__ */ r(
4400
4405
  "div",
@@ -4408,8 +4413,8 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
4408
4413
  borderRight: `1px solid ${je}`
4409
4414
  },
4410
4415
  children: /* @__PURE__ */ r("div", { className: "flex min-w-0 items-center justify-between gap-3", children: /* @__PURE__ */ c("div", { className: "min-w-0", children: [
4411
- /* @__PURE__ */ r("div", { className: "truncate text-xs font-semibold uppercase tracking-wider text-[var(--text-main)]", children: F.label }),
4412
- F.description && /* @__PURE__ */ r("div", { className: "mt-0.5 truncate text-xs text-[var(--text-muted)]", children: F.description })
4416
+ /* @__PURE__ */ r("div", { className: "truncate text-xs font-semibold uppercase tracking-wider text-[var(--text-main)]", children: H.label }),
4417
+ H.description && /* @__PURE__ */ r("div", { className: "mt-0.5 truncate text-xs text-[var(--text-muted)]", children: H.description })
4413
4418
  ] }) })
4414
4419
  }
4415
4420
  )
@@ -4420,8 +4425,8 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
4420
4425
  {
4421
4426
  role: "row",
4422
4427
  onClick: wt ? (we) => {
4423
- const De = we.target;
4424
- if (!(De != null && De.closest(
4428
+ const Le = we.target;
4429
+ if (!(Le != null && Le.closest(
4425
4430
  '[data-dt-disable-row-click="true"]'
4426
4431
  ))) {
4427
4432
  if (x && Ve) {
@@ -4485,7 +4490,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
4485
4490
  {
4486
4491
  role: "cell",
4487
4492
  className: `${q ? "px-2 py-1.5" : "px-3 py-2"} flex w-10 items-center justify-center`,
4488
- style: ao ? {
4493
+ style: oo ? {
4489
4494
  position: "sticky",
4490
4495
  left: 0,
4491
4496
  zIndex: 3,
@@ -4496,27 +4501,27 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
4496
4501
  borderRight: `1px solid ${je}`
4497
4502
  },
4498
4503
  onClick: (we) => {
4499
- we.stopPropagation(), Ae && g(X);
4504
+ we.stopPropagation(), De && g(X);
4500
4505
  },
4501
4506
  children: /* @__PURE__ */ r(
4502
- Po,
4507
+ zo,
4503
4508
  {
4504
4509
  size: "sm",
4505
4510
  checked: Me,
4506
- disabled: !Ae,
4507
- "aria-label": Ae ? "Seleccionar fila" : "Fila no seleccionable",
4511
+ disabled: !De,
4512
+ "aria-label": De ? "Seleccionar fila" : "Fila no seleccionable",
4508
4513
  containerClassName: "items-center",
4509
- className: Ae ? "cursor-pointer" : "cursor-not-allowed opacity-50",
4514
+ className: De ? "cursor-pointer" : "cursor-not-allowed opacity-50",
4510
4515
  onClick: (we) => we.stopPropagation(),
4511
4516
  onChange: () => {
4512
- Ae && g(X);
4517
+ De && g(X);
4513
4518
  }
4514
4519
  }
4515
4520
  )
4516
4521
  }
4517
4522
  ),
4518
4523
  At.map((we) => {
4519
- const De = Gn[we.key], $e = De !== void 0, Ee = we.key === io, Se = Dr(we);
4524
+ const Le = Gn[we.key], $e = Le !== void 0, Ee = we.key === lo, Se = Dr(we);
4520
4525
  return /* @__PURE__ */ r(
4521
4526
  "div",
4522
4527
  {
@@ -4529,7 +4534,7 @@ ${F}`, ve = new Blob(["\uFEFF" + se], {
4529
4534
  whiteSpace: "nowrap",
4530
4535
  ...$e ? {
4531
4536
  position: "sticky",
4532
- left: De,
4537
+ left: Le,
4533
4538
  zIndex: 3,
4534
4539
  background: "var(--dt-sticky-bg)",
4535
4540
  boxShadow: Ee ? `3px 0 6px -2px rgba(0,0,0,0.10), inset 0 -1px 0 ${je}` : `inset 0 -1px 0 ${je}`,
@@ -4592,7 +4597,7 @@ const Fu = {
4592
4597
  md: "min-h-[220px] p-6",
4593
4598
  lg: "min-h-[300px] p-8"
4594
4599
  };
4595
- function go({
4600
+ function xo({
4596
4601
  title: e = "Sin resultados",
4597
4602
  description: t,
4598
4603
  icon: n = /* @__PURE__ */ r(ms, { className: "h-5 w-5" }),
@@ -4647,11 +4652,11 @@ function Hu(e) {
4647
4652
  const t = e.getDay();
4648
4653
  return t === 0 || t === 6;
4649
4654
  }
4650
- function ni(e) {
4655
+ function ai(e) {
4651
4656
  return e.filter((t) => !Hu(t));
4652
4657
  }
4653
4658
  function Pu(e) {
4654
- return ni(Ts(e));
4659
+ return ai(Ts(e));
4655
4660
  }
4656
4661
  function Pp(e) {
4657
4662
  const t = tn(e), n = t.getDay();
@@ -4668,7 +4673,7 @@ function Ms(e) {
4668
4673
  return t;
4669
4674
  }
4670
4675
  function zu(e) {
4671
- return Ms(e).map(ni);
4676
+ return Ms(e).map(ai);
4672
4677
  }
4673
4678
  function ju(e, t, n, a) {
4674
4679
  return e.getTime() <= a.getTime() && t.getTime() >= n.getTime();
@@ -4977,14 +4982,14 @@ function zp({
4977
4982
  className: fe = "",
4978
4983
  showToolbar: I = !0
4979
4984
  }) {
4980
- const q = b ?? (f ? [...Yu] : [...Vu]), ne = f ? 5 : 7, M = f ? "grid grid-cols-5" : "grid grid-cols-7", H = Re(
4985
+ const q = b ?? (f ? [...Yu] : [...Vu]), ne = f ? 5 : 7, M = f ? "grid grid-cols-5" : "grid grid-cols-7", F = Re(
4981
4986
  () => ($ ?? []).map((de) => de.label),
4982
4987
  [$]
4983
4988
  ), [ce, R] = z(
4984
- () => j ?? H
4989
+ () => j ?? F
4985
4990
  ), ae = Re(
4986
- () => _ ?? (H.length > 0 ? ce : []),
4987
- [_, H.length, ce]
4991
+ () => _ ?? (F.length > 0 ? ce : []),
4992
+ [_, F.length, ce]
4988
4993
  ), K = Re(
4989
4994
  () => new Set(ae),
4990
4995
  [ae]
@@ -4993,8 +4998,8 @@ function zp({
4993
4998
  }, ie = (de) => {
4994
4999
  k && (K.has(de) ? W(ae.filter((Te) => Te !== de)) : W([...ae, de]));
4995
5000
  }, E = Re(() => {
4996
- if (!k || H.length === 0) return e;
4997
- const de = new Set(H);
5001
+ if (!k || F.length === 0) return e;
5002
+ const de = new Set(F);
4998
5003
  return e.filter((Te) => {
4999
5004
  const re = (D == null ? void 0 : D(Te)) ?? Te.status;
5000
5005
  return !re || !de.has(re) ? !0 : K.has(re);
@@ -5002,7 +5007,7 @@ function zp({
5002
5007
  }, [
5003
5008
  e,
5004
5009
  k,
5005
- H,
5010
+ F,
5006
5011
  K,
5007
5012
  D
5008
5013
  ]), Q = Re(
@@ -5010,7 +5015,7 @@ function zp({
5010
5015
  [E, s]
5011
5016
  ), J = Re(() => {
5012
5017
  const de = sl(t);
5013
- return f ? ni(de) : de;
5018
+ return f ? ai(de) : de;
5014
5019
  }, [t, f]), Z = Re(() => {
5015
5020
  const de = sl(t);
5016
5021
  return f ? zu(de) : Ms(de);
@@ -5020,13 +5025,13 @@ function zp({
5020
5025
  ), N = nr(t), ee = Q[N] ?? [], ue = Re(
5021
5026
  () => cl(E, v, s),
5022
5027
  [E, v, s]
5023
- ), te = Re(() => ue.length === 0 ? 1 : Math.max(...ue.map((de) => de.lane)) + 1, [ue]), xe = Re(
5028
+ ), te = Re(() => ue.length === 0 ? 1 : Math.max(...ue.map((de) => de.lane)) + 1, [ue]), ve = Re(
5024
5029
  () => Z.map((de) => {
5025
5030
  const Te = cl(E, de, s), re = Te.length === 0 ? 0 : Math.max(...Te.map((Oe) => Oe.lane)) + 1;
5026
5031
  return { days: de, bars: Te, laneCount: re };
5027
5032
  }),
5028
5033
  [Z, E, s]
5029
- ), Ce = 36, Le = 38, vt = Re(() => {
5034
+ ), Ce = 36, Ae = 38, vt = Re(() => {
5030
5035
  const de = i === "month" ? J : i === "week" ? v : [t], Te = [];
5031
5036
  for (const re of de) {
5032
5037
  const Oe = nr(re), _e = Q[Oe] ?? [];
@@ -5149,7 +5154,7 @@ function zp({
5149
5154
  {
5150
5155
  value: "table",
5151
5156
  label: "Tabla",
5152
- icon: /* @__PURE__ */ r(Jo, { className: "h-4 w-4" })
5157
+ icon: /* @__PURE__ */ r(ei, { className: "h-4 w-4" })
5153
5158
  }
5154
5159
  ]
5155
5160
  }
@@ -5287,7 +5292,7 @@ function zp({
5287
5292
  ...A
5288
5293
  }
5289
5294
  ) : /* @__PURE__ */ r(
5290
- go,
5295
+ xo,
5291
5296
  {
5292
5297
  icon: /* @__PURE__ */ r(pr, { className: "h-5 w-5" }),
5293
5298
  title: C,
@@ -5418,15 +5423,15 @@ function zp({
5418
5423
  ))
5419
5424
  }
5420
5425
  ),
5421
- xe.map(({ days: de, bars: Te, laneCount: re }, Oe) => {
5422
- const _e = Math.min(re, d), Ye = Math.max(0, re - d), Ue = Ce + Math.max(1, _e) * Le + (Ye > 0 ? 20 : 8) + 8;
5426
+ ve.map(({ days: de, bars: Te, laneCount: re }, Oe) => {
5427
+ const _e = Math.min(re, d), Ye = Math.max(0, re - d), Ue = Ce + Math.max(1, _e) * Ae + (Ye > 0 ? 20 : 8) + 8;
5423
5428
  return /* @__PURE__ */ c(
5424
5429
  "div",
5425
5430
  {
5426
5431
  className: "relative",
5427
5432
  style: {
5428
5433
  minHeight: Ue,
5429
- borderBottom: Oe < xe.length - 1 ? "1px solid var(--border)" : void 0
5434
+ borderBottom: Oe < ve.length - 1 ? "1px solid var(--border)" : void 0
5430
5435
  },
5431
5436
  children: [
5432
5437
  /* @__PURE__ */ r("div", { className: M, style: { minHeight: Ue }, children: de.map((He) => {
@@ -5484,8 +5489,8 @@ function zp({
5484
5489
  const Je = {
5485
5490
  left: `calc(${He.colStart / ne * 100}% + 4px)`,
5486
5491
  width: `calc(${He.colSpan / ne * 100}% - 8px)`,
5487
- top: 2 + He.lane * Le,
5488
- height: Le - 6,
5492
+ top: 2 + He.lane * Ae,
5493
+ height: Ae - 6,
5489
5494
  pointerEvents: "auto"
5490
5495
  };
5491
5496
  return h ? /* @__PURE__ */ r(
@@ -5522,7 +5527,7 @@ function zp({
5522
5527
  className: "absolute text-[11px] font-semibold",
5523
5528
  style: {
5524
5529
  left: 8,
5525
- top: 2 + _e * Le,
5530
+ top: 2 + _e * Ae,
5526
5531
  color: "var(--text-muted)"
5527
5532
  },
5528
5533
  children: [
@@ -5688,7 +5693,7 @@ function zp({
5688
5693
  ) : null,
5689
5694
  a === "calendar" && i === "day" ? ee.length > 0 || O ? /* @__PURE__ */ c("div", { className: "space-y-3", children: [
5690
5695
  O && ee.length === 0 ? /* @__PURE__ */ r(
5691
- go,
5696
+ xo,
5692
5697
  {
5693
5698
  icon: /* @__PURE__ */ r(pr, { className: "h-5 w-5" }),
5694
5699
  title: "Cargando…",
@@ -5706,7 +5711,7 @@ function zp({
5706
5711
  )
5707
5712
  )
5708
5713
  ] }) : /* @__PURE__ */ r(
5709
- go,
5714
+ xo,
5710
5715
  {
5711
5716
  icon: /* @__PURE__ */ r(pr, { className: "h-5 w-5" }),
5712
5717
  title: C,
@@ -6164,7 +6169,7 @@ function Up({
6164
6169
  className: "mt-0.5 flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-xl",
6165
6170
  style: { background: u.iconBg },
6166
6171
  children: /* @__PURE__ */ r(
6167
- Zo,
6172
+ Qo,
6168
6173
  {
6169
6174
  className: "h-5 w-5",
6170
6175
  style: { color: u.iconColor }
@@ -6368,7 +6373,7 @@ const dm = {
6368
6373
  outlineOffset: "-2px",
6369
6374
  borderRadius: "4px",
6370
6375
  background: "color-mix(in srgb, var(--primary) 5%, var(--bg-card))"
6371
- }, xo = {
6376
+ }, vo = {
6372
6377
  outline: "2px solid var(--primary)",
6373
6378
  outlineOffset: "-2px",
6374
6379
  borderRadius: "4px"
@@ -6395,28 +6400,28 @@ function Yp({
6395
6400
  {}
6396
6401
  ), $ = oe(/* @__PURE__ */ new Set()), k = oe(null);
6397
6402
  me(() => {
6398
- var H;
6403
+ var F;
6399
6404
  const M = document.activeElement;
6400
- (!M || M === document.body) && ((H = k.current) == null || H.focus({ preventScroll: !0 }));
6405
+ (!M || M === document.body) && ((F = k.current) == null || F.focus({ preventScroll: !0 }));
6401
6406
  }, []);
6402
6407
  const _ = e.map((M) => {
6403
- var H, ce, R;
6404
- return `${M.key}:${((R = (ce = (H = M.editable) == null ? void 0 : H.select) == null ? void 0 : ce.options) == null ? void 0 : R.length) ?? -1}`;
6408
+ var F, ce, R;
6409
+ return `${M.key}:${((R = (ce = (F = M.editable) == null ? void 0 : F.select) == null ? void 0 : ce.options) == null ? void 0 : R.length) ?? -1}`;
6405
6410
  }).join("|");
6406
6411
  me(() => {
6407
6412
  e.forEach((M) => {
6408
6413
  var R, ae;
6409
- const H = (ae = (R = M.editable) == null ? void 0 : R.select) == null ? void 0 : ae.options;
6410
- if (!H) return;
6414
+ const F = (ae = (R = M.editable) == null ? void 0 : R.select) == null ? void 0 : ae.options;
6415
+ if (!F) return;
6411
6416
  const ce = T[M.key];
6412
- (!$.current.has(M.key) || (ce == null ? void 0 : ce.length) === 0 && H.length > 0) && ($.current.add(M.key), O((K) => ({ ...K, [M.key]: H })));
6417
+ (!$.current.has(M.key) || (ce == null ? void 0 : ce.length) === 0 && F.length > 0) && ($.current.add(M.key), O((K) => ({ ...K, [M.key]: F })));
6413
6418
  });
6414
6419
  }, [_]);
6415
6420
  const j = be(
6416
- async (M, H) => {
6421
+ async (M, F) => {
6417
6422
  if ($.current.has(M)) return;
6418
6423
  $.current.add(M);
6419
- const { url: ce, fetchOptions: R } = H.select ?? {};
6424
+ const { url: ce, fetchOptions: R } = F.select ?? {};
6420
6425
  if (!(!ce && !R)) {
6421
6426
  y((ae) => ({ ...ae, [M]: !0 }));
6422
6427
  try {
@@ -6448,19 +6453,19 @@ function Yp({
6448
6453
  const le = oe(o);
6449
6454
  le.current = o, me(() => {
6450
6455
  if (e.length > 0 && t.length > 0) {
6451
- const M = e.find((H) => H.selectable !== !1);
6456
+ const M = e.find((F) => F.selectable !== !1);
6452
6457
  M && m({ rowId: n(t[0]), colKey: M.key });
6453
6458
  }
6454
6459
  }, []), me(() => {
6455
6460
  if (!f) return;
6456
6461
  const M = k.current;
6457
6462
  if (!M) return;
6458
- const H = M.querySelector(
6463
+ const F = M.querySelector(
6459
6464
  `[data-cell-id="${f.rowId}:${f.colKey}"]`
6460
6465
  );
6461
- if (!H) return;
6466
+ if (!F) return;
6462
6467
  const ce = M.querySelector('[role="rowgroup"]');
6463
- H.style.scrollMarginTop = `${(ce == null ? void 0 : ce.offsetHeight) ?? 0}px`;
6468
+ F.style.scrollMarginTop = `${(ce == null ? void 0 : ce.offsetHeight) ?? 0}px`;
6464
6469
  const R = M.querySelector('[role="row"]');
6465
6470
  let ae = 0;
6466
6471
  R && R.querySelectorAll('[role="cell"], [role="columnheader"]').forEach((K) => {
@@ -6468,80 +6473,80 @@ function Yp({
6468
6473
  ae,
6469
6474
  parseFloat(K.style.left) + K.offsetWidth
6470
6475
  ));
6471
- }), H.style.scrollMarginLeft = `${ae}px`, H.scrollIntoView({ block: "nearest", inline: "nearest" });
6476
+ }), F.style.scrollMarginLeft = `${ae}px`, F.scrollIntoView({ block: "nearest", inline: "nearest" });
6472
6477
  }, [f]);
6473
6478
  const G = be((M) => {
6474
6479
  var ae;
6475
- const H = P.current, ce = /* @__PURE__ */ new Set(), R = [];
6480
+ const F = P.current, ce = /* @__PURE__ */ new Set(), R = [];
6476
6481
  (ae = k.current) == null || ae.querySelectorAll("[data-cell-id]").forEach((K) => {
6477
6482
  const W = K.dataset.cellId.split(":")[0];
6478
6483
  ce.has(W) || (ce.add(W), R.push(W));
6479
6484
  }), m((K) => {
6480
6485
  if (!K) return K;
6481
- const W = H.findIndex((J) => J.key === K.colKey), ie = R.indexOf(K.rowId);
6486
+ const W = F.findIndex((J) => J.key === K.colKey), ie = R.indexOf(K.rowId);
6482
6487
  let E = W, Q = ie;
6483
6488
  if (M === "up") Q = Math.max(0, ie - 1);
6484
6489
  else if (M === "down")
6485
6490
  Q = Math.min(R.length - 1, ie + 1);
6486
6491
  else if (M === "left") {
6487
6492
  let J = W - 1;
6488
- for (; J >= 0 && H[J].selectable === !1; )
6493
+ for (; J >= 0 && F[J].selectable === !1; )
6489
6494
  J--;
6490
6495
  J >= 0 && (E = J);
6491
6496
  } else if (M === "right") {
6492
6497
  let J = W + 1;
6493
- for (; J < H.length && H[J].selectable === !1; )
6498
+ for (; J < F.length && F[J].selectable === !1; )
6494
6499
  J++;
6495
- J < H.length && (E = J);
6500
+ J < F.length && (E = J);
6496
6501
  }
6497
- return E === W && Q === ie ? K : { rowId: R[Q], colKey: H[E].key };
6502
+ return E === W && Q === ie ? K : { rowId: R[Q], colKey: F[E].key };
6498
6503
  });
6499
6504
  }, []), fe = be((M = !0) => {
6500
- const H = d.current;
6501
- b(null), H && m(H), M && setTimeout(() => {
6505
+ const F = d.current;
6506
+ b(null), F && m(F), M && setTimeout(() => {
6502
6507
  var ce;
6503
6508
  return (ce = k.current) == null ? void 0 : ce.focus({ preventScroll: !0 });
6504
6509
  }, 0);
6505
6510
  }, []), I = be(
6506
- async (M, H, ce) => {
6511
+ async (M, F, ce) => {
6507
6512
  var te;
6508
- const R = P.current.find((xe) => xe.key === H);
6513
+ const R = P.current.find((ve) => ve.key === F);
6509
6514
  if (!(R != null && R.editable)) return;
6510
6515
  const { field: ae, type: K, mask: W, validate: ie } = R.editable, E = K === "number" ? ce === "" ? null : Number(ce) : ce;
6511
6516
  if (W) {
6512
- const xe = im(ce, W);
6513
- if (xe) {
6517
+ const ve = im(ce, W);
6518
+ if (ve) {
6514
6519
  w((Ce) => ({
6515
6520
  ...Ce,
6516
- [`${M}:${H}`]: xe
6521
+ [`${M}:${F}`]: ve
6517
6522
  }));
6518
6523
  return;
6519
6524
  }
6520
6525
  }
6521
6526
  if (ie) {
6522
- const xe = ie(E);
6523
- if (xe) {
6524
- w((Ce) => ({ ...Ce, [`${M}:${H}`]: xe }));
6527
+ const ve = ie(E);
6528
+ if (ve) {
6529
+ w((Ce) => ({ ...Ce, [`${M}:${F}`]: ve }));
6525
6530
  return;
6526
6531
  }
6527
6532
  }
6528
- const Q = Y.current, J = U.current.find((xe) => Q(xe) === M);
6533
+ const Q = Y.current, J = U.current.find((ve) => Q(ve) === M);
6529
6534
  if (!J) return;
6530
6535
  const Z = J[ae];
6531
- b(null), w((xe) => {
6532
- const Ce = { ...xe };
6533
- return delete Ce[`${M}:${H}`], Ce;
6536
+ b(null), w((ve) => {
6537
+ const Ce = { ...ve };
6538
+ return delete Ce[`${M}:${F}`], Ce;
6534
6539
  });
6535
- const v = U.current, N = v.findIndex((xe) => Q(xe) === M), ee = v[Math.min(v.length - 1, N + 1)];
6536
- if (m({ rowId: Q(ee), colKey: H }), setTimeout(() => {
6537
- var Ce, Le;
6538
- const xe = document.activeElement;
6539
- (!xe || xe === document.body || (Ce = k.current) != null && Ce.contains(xe)) && ((Le = k.current) == null || Le.focus({ preventScroll: !0 }));
6540
+ const v = U.current, N = v.findIndex((ve) => Q(ve) === M), ee = v[Math.min(v.length - 1, N + 1)];
6541
+ if (m({ rowId: Q(ee), colKey: F }), setTimeout(() => {
6542
+ var Ce, Ae;
6543
+ const ve = document.activeElement;
6544
+ (!ve || ve === document.body || (Ce = k.current) != null && Ce.contains(ve)) && ((Ae = k.current) == null || Ae.focus({ preventScroll: !0 }));
6540
6545
  }, 0), String(Z ?? "") === String(E ?? "")) return;
6541
6546
  const ue = { ...J, [ae]: E };
6542
6547
  s(
6543
- (xe) => xe.map((Ce) => Q(Ce) === M ? ue : Ce)
6544
- ), A({ rowId: M, colKey: H });
6548
+ (ve) => ve.map((Ce) => Q(Ce) === M ? ue : Ce)
6549
+ ), A({ rowId: M, colKey: F });
6545
6550
  try {
6546
6551
  await ((te = D.current) == null ? void 0 : te.call(D, {
6547
6552
  row: J,
@@ -6552,10 +6557,10 @@ function Yp({
6552
6557
  }));
6553
6558
  } catch {
6554
6559
  s(
6555
- (xe) => xe.map((Ce) => Q(Ce) === M ? J : Ce)
6556
- ), w((xe) => ({
6557
- ...xe,
6558
- [`${M}:${H}`]: "Error al guardar. Intenta de nuevo."
6560
+ (ve) => ve.map((Ce) => Q(Ce) === M ? J : Ce)
6561
+ ), w((ve) => ({
6562
+ ...ve,
6563
+ [`${M}:${F}`]: "Error al guardar. Intenta de nuevo."
6559
6564
  }));
6560
6565
  } finally {
6561
6566
  A(null);
@@ -6569,8 +6574,8 @@ function Yp({
6569
6574
  return;
6570
6575
  }
6571
6576
  if (d.current) return;
6572
- const H = h.current;
6573
- if (!(!H || ![
6577
+ const F = h.current;
6578
+ if (!(!F || ![
6574
6579
  "ArrowUp",
6575
6580
  "ArrowDown",
6576
6581
  "ArrowLeft",
@@ -6596,8 +6601,8 @@ function Yp({
6596
6601
  G(M.shiftKey ? "left" : "right");
6597
6602
  break;
6598
6603
  case "Enter": {
6599
- const R = P.current.find((ae) => ae.key === H.colKey);
6600
- R != null && R.editable && !le.current ? (b(H), R.editable.type === "select" && !$.current.has(H.colKey) && j(H.colKey, R.editable)) : G("down");
6604
+ const R = P.current.find((ae) => ae.key === F.colKey);
6605
+ R != null && R.editable && !le.current ? (b(F), R.editable.type === "select" && !$.current.has(F.colKey) && j(F.colKey, R.editable)) : G("down");
6601
6606
  break;
6602
6607
  }
6603
6608
  }
@@ -6631,7 +6636,7 @@ function Yp({
6631
6636
  "div",
6632
6637
  {
6633
6638
  className: "pointer-events-none absolute inset-0 z-20",
6634
- style: xo
6639
+ style: vo
6635
6640
  }
6636
6641
  ),
6637
6642
  /* @__PURE__ */ r("span", { className: "relative z-0 pointer-events-none", children: R(ae) })
@@ -6639,19 +6644,19 @@ function Yp({
6639
6644
  }
6640
6645
  };
6641
6646
  }
6642
- const H = M.editable;
6647
+ const F = M.editable;
6643
6648
  return {
6644
6649
  ...M,
6645
6650
  // Make the cell a positioned ancestor so the absolute edit overlay works
6646
6651
  className: `relative ${M.className ?? ""}`.trim(),
6647
6652
  disableRowClick: !0,
6648
6653
  cell: (ce) => {
6649
- const R = n(ce), ae = M.key, K = (u == null ? void 0 : u.rowId) === R && (u == null ? void 0 : u.colKey) === ae, W = (f == null ? void 0 : f.rowId) === R && (f == null ? void 0 : f.colKey) === ae, ie = x[`${R}:${ae}`], E = (g == null ? void 0 : g.rowId) === R && (g == null ? void 0 : g.colKey) === ae, Q = ce[H.field], J = String(Q ?? ""), Z = () => {
6654
+ const R = n(ce), ae = M.key, K = (u == null ? void 0 : u.rowId) === R && (u == null ? void 0 : u.colKey) === ae, W = (f == null ? void 0 : f.rowId) === R && (f == null ? void 0 : f.colKey) === ae, ie = x[`${R}:${ae}`], E = (g == null ? void 0 : g.rowId) === R && (g == null ? void 0 : g.colKey) === ae, Q = ce[F.field], J = String(Q ?? ""), Z = () => {
6650
6655
  var N;
6651
- S.current || (m({ rowId: R, colKey: ae }), b({ rowId: R, colKey: ae }), (N = k.current) == null || N.focus({ preventScroll: !0 }), H.type === "select" && !$.current.has(ae) && j(ae, H));
6656
+ S.current || (m({ rowId: R, colKey: ae }), b({ rowId: R, colKey: ae }), (N = k.current) == null || N.focus({ preventScroll: !0 }), F.type === "select" && !$.current.has(ae) && j(ae, F));
6652
6657
  };
6653
6658
  if (K) {
6654
- const N = H.type === "select" ? /* @__PURE__ */ r(
6659
+ const N = F.type === "select" ? /* @__PURE__ */ r(
6655
6660
  cm,
6656
6661
  {
6657
6662
  initialValue: J,
@@ -6664,8 +6669,8 @@ function Yp({
6664
6669
  sm,
6665
6670
  {
6666
6671
  initialValue: J,
6667
- type: H.type ?? "text",
6668
- mask: H.mask,
6672
+ type: F.type ?? "text",
6673
+ mask: F.mask,
6669
6674
  onCommit: (ee) => I(R, ae, ee),
6670
6675
  onCancel: fe
6671
6676
  }
@@ -6694,14 +6699,14 @@ function Yp({
6694
6699
  "div",
6695
6700
  {
6696
6701
  className: "pointer-events-none absolute inset-0 z-20",
6697
- style: xo
6702
+ style: vo
6698
6703
  }
6699
6704
  ),
6700
6705
  E && /* @__PURE__ */ c(
6701
6706
  "div",
6702
6707
  {
6703
6708
  className: "pointer-events-none absolute inset-0 z-20 flex items-center gap-1.5 bg-[var(--bg-card)]/80 px-2",
6704
- style: xo,
6709
+ style: vo,
6705
6710
  children: [
6706
6711
  /* @__PURE__ */ r(
6707
6712
  "span",
@@ -6743,8 +6748,8 @@ function Yp({
6743
6748
  tabIndex: 0,
6744
6749
  onKeyDown: q,
6745
6750
  onBlur: (M) => {
6746
- var H;
6747
- (H = k.current) != null && H.contains(M.relatedTarget) || setTimeout(() => {
6751
+ var F;
6752
+ (F = k.current) != null && F.contains(M.relatedTarget) || setTimeout(() => {
6748
6753
  var R, ae;
6749
6754
  const ce = document.activeElement;
6750
6755
  ce && ((R = ce.closest) != null && R.call(
@@ -6785,19 +6790,19 @@ function um(e) {
6785
6790
  const t = new Set(e.map(Wt));
6786
6791
  return Array.from(t).sort();
6787
6792
  }
6788
- function ai(e) {
6793
+ function oi(e) {
6789
6794
  return new Intl.DateTimeFormat("es-MX", { weekday: "short" }).format(e);
6790
6795
  }
6791
6796
  function Os(e) {
6792
6797
  const t = ht(e);
6793
6798
  if (!t) return e;
6794
- const n = ai(t).replace(/\.$/u, "").replace(/^\w/u, (o) => o.toUpperCase()), a = new Intl.DateTimeFormat("es-MX", { month: "short" }).format(t).replace(/\.$/u, "").toLowerCase();
6799
+ const n = oi(t).replace(/\.$/u, "").replace(/^\w/u, (o) => o.toUpperCase()), a = new Intl.DateTimeFormat("es-MX", { month: "short" }).format(t).replace(/\.$/u, "").toLowerCase();
6795
6800
  return `${n} - ${t.getDate()} ${a} ${t.getFullYear()}`;
6796
6801
  }
6797
- const mm = { dayOfWeek: [0, 6] }, oi = { weekend: mm }, ii = {
6802
+ const mm = { dayOfWeek: [0, 6] }, ii = { weekend: mm }, li = {
6798
6803
  weekend: "bonsaif-weekend"
6799
6804
  };
6800
- function li({
6805
+ function si({
6801
6806
  children: e,
6802
6807
  className: t = "",
6803
6808
  ...n
@@ -6919,7 +6924,7 @@ function Kp({
6919
6924
  )
6920
6925
  ] }),
6921
6926
  /* @__PURE__ */ r(
6922
- ei,
6927
+ ti,
6923
6928
  {
6924
6929
  mode: "range",
6925
6930
  selected: f,
@@ -6934,9 +6939,9 @@ function Kp({
6934
6939
  weekStartsOn: 1,
6935
6940
  disabled: m ? { before: m } : void 0,
6936
6941
  showOutsideDays: !1,
6937
- modifiers: oi,
6938
- modifiersClassNames: ii,
6939
- components: { DayButton: pm, Weekday: li },
6942
+ modifiers: ii,
6943
+ modifiersClassNames: li,
6944
+ components: { DayButton: pm, Weekday: si },
6940
6945
  classNames: {
6941
6946
  root: "bonsaif-range-daypicker w-full",
6942
6947
  months: S,
@@ -6962,7 +6967,7 @@ function Kp({
6962
6967
  T
6963
6968
  )
6964
6969
  )} ${T.getFullYear()}`,
6965
- formatWeekdayName: ai
6970
+ formatWeekdayName: oi
6966
6971
  }
6967
6972
  }
6968
6973
  )
@@ -7197,7 +7202,7 @@ function Xp({
7197
7202
  }), P = Re(() => {
7198
7203
  if (h) return !0;
7199
7204
  const M = [];
7200
- return g && M.push({ before: g }), A && M.push({ after: A }), o && M.push((H) => o(Wt(H))), M.length > 0 ? M : void 0;
7205
+ return g && M.push({ before: g }), A && M.push({ after: A }), o && M.push((F) => o(Wt(F))), M.length > 0 ? M : void 0;
7201
7206
  }, [h, o, A, g]), le = be(
7202
7207
  (M) => /* @__PURE__ */ r(
7203
7208
  Bs,
@@ -7302,7 +7307,7 @@ function Xp({
7302
7307
  k === "week" ? " · Botón semana completa" : ""
7303
7308
  ] }),
7304
7309
  k === "month" ? /* @__PURE__ */ r(
7305
- ei,
7310
+ ti,
7306
7311
  {
7307
7312
  mode: "multiple",
7308
7313
  required: !1,
@@ -7315,13 +7320,13 @@ function Xp({
7315
7320
  showOutsideDays: !1,
7316
7321
  weekStartsOn: 1,
7317
7322
  showWeekNumber: s,
7318
- onWeekNumberClick: (M, H) => {
7319
- Y(H);
7323
+ onWeekNumberClick: (M, F) => {
7324
+ Y(F);
7320
7325
  },
7321
7326
  disabled: P,
7322
7327
  className: "bonsaif-multi-daypicker",
7323
- modifiers: oi,
7324
- modifiersClassNames: ii,
7328
+ modifiers: ii,
7329
+ modifiersClassNames: li,
7325
7330
  classNames: {
7326
7331
  root: "bonsaif-multi-daypicker",
7327
7332
  months: "bonsaif-multi-months",
@@ -7340,9 +7345,9 @@ function Xp({
7340
7345
  disabled: "bonsaif-multi-day-disabled",
7341
7346
  hidden: "bonsaif-multi-day-hidden"
7342
7347
  },
7343
- components: { DayButton: le, Weekday: li },
7348
+ components: { DayButton: le, Weekday: si },
7344
7349
  formatters: {
7345
- formatWeekdayName: ai
7350
+ formatWeekdayName: oi
7346
7351
  }
7347
7352
  }
7348
7353
  ) : /* @__PURE__ */ c("div", { className: "bonsaif-week-view", children: [
@@ -7350,7 +7355,7 @@ function Xp({
7350
7355
  weekday: "short"
7351
7356
  }).format(M) }, `h-${Wt(M)}`)) }),
7352
7357
  /* @__PURE__ */ r("div", { className: "bonsaif-week-view-days", children: G.map((M) => {
7353
- const H = Wt(M), ce = w.has(H), R = h || (n ? H < n : !1) || (a ? H > a : !1) || !!(o != null && o(H)), ae = H === Wt(/* @__PURE__ */ new Date());
7358
+ const F = Wt(M), ce = w.has(F), R = h || (n ? F < n : !1) || (a ? F > a : !1) || !!(o != null && o(F)), ae = F === Wt(/* @__PURE__ */ new Date());
7354
7359
  return /* @__PURE__ */ r(
7355
7360
  "div",
7356
7361
  {
@@ -7374,7 +7379,7 @@ function Xp({
7374
7379
  }
7375
7380
  )
7376
7381
  },
7377
- H
7382
+ F
7378
7383
  );
7379
7384
  }) }),
7380
7385
  /* @__PURE__ */ r(
@@ -7401,7 +7406,7 @@ function Xp({
7401
7406
  type: "button",
7402
7407
  className: "bonsaif-cal-chip",
7403
7408
  disabled: h,
7404
- onClick: () => t == null ? void 0 : t(e.filter((H) => H !== M)),
7409
+ onClick: () => t == null ? void 0 : t(e.filter((F) => F !== M)),
7405
7410
  title: `Quitar ${M}`,
7406
7411
  children: [
7407
7412
  Os(M),
@@ -7507,7 +7512,7 @@ function Gp({
7507
7512
  }).format(_)
7508
7513
  ) }),
7509
7514
  /* @__PURE__ */ r(
7510
- ei,
7515
+ ti,
7511
7516
  {
7512
7517
  mode: "multiple",
7513
7518
  required: !1,
@@ -7523,8 +7528,8 @@ function Gp({
7523
7528
  weekStartsOn: 1,
7524
7529
  disabled: $,
7525
7530
  className: "bonsaif-year-month-picker",
7526
- modifiers: oi,
7527
- modifiersClassNames: ii,
7531
+ modifiers: ii,
7532
+ modifiersClassNames: li,
7528
7533
  classNames: {
7529
7534
  root: "bonsaif-year-month-picker",
7530
7535
  months: "bonsaif-year-month-months",
@@ -7541,7 +7546,7 @@ function Gp({
7541
7546
  disabled: "bonsaif-year-day-disabled",
7542
7547
  hidden: "bonsaif-year-day-hidden"
7543
7548
  },
7544
- components: { DayButton: C, Weekday: li },
7549
+ components: { DayButton: C, Weekday: si },
7545
7550
  formatters: {
7546
7551
  formatWeekdayName: (j) => new Intl.DateTimeFormat("es-MX", {
7547
7552
  weekday: "narrow"
@@ -7636,7 +7641,7 @@ function Zp({
7636
7641
  }, [d, g, A]);
7637
7642
  const S = (C) => {
7638
7643
  o || (C.key === "Enter" || C.key === " ") && (C.preventDefault(), g(!d));
7639
- }, T = Xo(e) ? td(e, {
7644
+ }, T = Go(e) ? td(e, {
7640
7645
  onClick: () => {
7641
7646
  o || (gl(), g(!d));
7642
7647
  }
@@ -7916,7 +7921,7 @@ function Qp({
7916
7921
  className: "mb-4 flex h-11 w-11 items-center justify-center rounded-xl",
7917
7922
  style: { background: "var(--warning-bg, #fff7ed)" },
7918
7923
  children: /* @__PURE__ */ r(
7919
- Zo,
7924
+ Qo,
7920
7925
  {
7921
7926
  className: "h-5 w-5",
7922
7927
  style: { color: "var(--warning, #d97706)" }
@@ -8126,7 +8131,7 @@ function js(e) {
8126
8131
  key: n
8127
8132
  }, t.attr), js(t.child)));
8128
8133
  }
8129
- function si(e) {
8134
+ function ci(e) {
8130
8135
  return (t) => /* @__PURE__ */ mt.createElement(Dm, Ta({
8131
8136
  attr: Ma({}, e.attr)
8132
8137
  }, t), js(e.child));
@@ -8155,13 +8160,13 @@ function Dm(e) {
8155
8160
  return vl !== void 0 ? /* @__PURE__ */ mt.createElement(vl.Consumer, null, (n) => t(n)) : t(zs);
8156
8161
  }
8157
8162
  function Ws(e) {
8158
- return si({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z" }, child: [] }] })(e);
8163
+ return ci({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z" }, child: [] }] })(e);
8159
8164
  }
8160
8165
  function Rm(e) {
8161
- return si({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z" }, child: [] }] })(e);
8166
+ return ci({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z" }, child: [] }] })(e);
8162
8167
  }
8163
8168
  function Om(e) {
8164
- return si({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M228,175a8,8,0,0,1-10.92-3l-19-33.2A123.23,123.23,0,0,1,162,155.46l5.87,35.22a8,8,0,0,1-6.58,9.21A8.4,8.4,0,0,1,160,200a8,8,0,0,1-7.88-6.69l-5.77-34.58a133.06,133.06,0,0,1-36.68,0l-5.77,34.58A8,8,0,0,1,96,200a8.4,8.4,0,0,1-1.32-.11,8,8,0,0,1-6.58-9.21L94,155.46a123.23,123.23,0,0,1-36.06-16.69L39,172A8,8,0,1,1,25.06,164l20-35a153.47,153.47,0,0,1-19.3-20A8,8,0,1,1,38.22,99c16.6,20.54,45.64,45,89.78,45s73.18-24.49,89.78-45A8,8,0,1,1,230.22,109a153.47,153.47,0,0,1-19.3,20l20,35A8,8,0,0,1,228,175Z" }, child: [] }] })(e);
8169
+ return ci({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M228,175a8,8,0,0,1-10.92-3l-19-33.2A123.23,123.23,0,0,1,162,155.46l5.87,35.22a8,8,0,0,1-6.58,9.21A8.4,8.4,0,0,1,160,200a8,8,0,0,1-7.88-6.69l-5.77-34.58a133.06,133.06,0,0,1-36.68,0l-5.77,34.58A8,8,0,0,1,96,200a8.4,8.4,0,0,1-1.32-.11,8,8,0,0,1-6.58-9.21L94,155.46a123.23,123.23,0,0,1-36.06-16.69L39,172A8,8,0,1,1,25.06,164l20-35a153.47,153.47,0,0,1-19.3-20A8,8,0,1,1,38.22,99c16.6,20.54,45.64,45,89.78,45s73.18-24.49,89.78-45A8,8,0,1,1,230.22,109a153.47,153.47,0,0,1-19.3,20l20,35A8,8,0,0,1,228,175Z" }, child: [] }] })(e);
8165
8170
  }
8166
8171
  function On({
8167
8172
  content: e,
@@ -8194,7 +8199,7 @@ function Bn({
8194
8199
  }) {
8195
8200
  return e ? /* @__PURE__ */ r("span", { className: "text-xs font-medium normal-case text-[var(--danger)]", children: e }) : t && n !== "tooltip" ? /* @__PURE__ */ r("span", { className: "text-xs font-medium normal-case text-[var(--text-muted)]", children: t }) : null;
8196
8201
  }
8197
- function vo({
8202
+ function yo({
8198
8203
  className: e = "",
8199
8204
  ...t
8200
8205
  }) {
@@ -8290,7 +8295,7 @@ function qs({
8290
8295
  return d ? /* @__PURE__ */ c("label", { className: `flex flex-col gap-2 ${t}`, children: [
8291
8296
  /* @__PURE__ */ c("span", { className: "relative block", children: [
8292
8297
  /* @__PURE__ */ r(
8293
- vo,
8298
+ yo,
8294
8299
  {
8295
8300
  ...h,
8296
8301
  type: T,
@@ -8335,7 +8340,7 @@ function qs({
8335
8340
  ] }),
8336
8341
  S ? /* @__PURE__ */ c("span", { className: "relative block", children: [
8337
8342
  /* @__PURE__ */ r(
8338
- vo,
8343
+ yo,
8339
8344
  {
8340
8345
  ...h,
8341
8346
  type: T,
@@ -8350,7 +8355,7 @@ function qs({
8350
8355
  G
8351
8356
  ] }) : /* @__PURE__ */ c("span", { className: "relative block", children: [
8352
8357
  /* @__PURE__ */ r(
8353
- vo,
8358
+ yo,
8354
8359
  {
8355
8360
  ...h,
8356
8361
  required: k,
@@ -8451,14 +8456,14 @@ function ch({
8451
8456
  required: U,
8452
8457
  ...D
8453
8458
  }) {
8454
- const Y = Fa(), P = k ?? Y, le = oe(null), [G, fe] = z(!1), [I, q] = z(l), ne = i ?? I, M = !!a, H = !!t && n === "tooltip" && !M, ce = h && ne.length > 0 && !j, R = (N, ee) => {
8459
+ const Y = Fa(), P = k ?? Y, le = oe(null), [G, fe] = z(!1), [I, q] = z(l), ne = i ?? I, M = !!a, F = !!t && n === "tooltip" && !M, ce = h && ne.length > 0 && !j, R = (N, ee) => {
8455
8460
  i === void 0 && q(N), s == null || s(N, ee);
8456
8461
  }, ae = (N, ee) => {
8457
8462
  const ue = N.filter(
8458
- (Le) => Nl(Le, _)
8463
+ (Ae) => Nl(Ae, _)
8459
8464
  ), te = N.filter(
8460
- (Le) => !Nl(Le, _)
8461
- ), xe = f ? [...ne, ...ue] : ue, Ce = _m(xe, u, b);
8465
+ (Ae) => !Nl(Ae, _)
8466
+ ), ve = f ? [...ne, ...ue] : ue, Ce = _m(ve, u, b);
8462
8467
  te.length > 0 && (d == null || d(te)), R(Ce, ee);
8463
8468
  }, K = () => {
8464
8469
  var N;
@@ -8479,10 +8484,10 @@ function ch({
8479
8484
  R([]);
8480
8485
  };
8481
8486
  return /* @__PURE__ */ c("div", { className: `flex flex-col gap-2 ${O}`, children: [
8482
- (e || o || H) && /* @__PURE__ */ c("div", { className: "inline-flex items-center gap-1 text-xs font-semibold uppercase text-[var(--text-muted)]", children: [
8487
+ (e || o || F) && /* @__PURE__ */ c("div", { className: "inline-flex items-center gap-1 text-xs font-semibold uppercase text-[var(--text-muted)]", children: [
8483
8488
  e && /* @__PURE__ */ r("span", { children: e }),
8484
8489
  U && /* @__PURE__ */ r("span", { className: "text-[var(--danger)]", children: "*" }),
8485
- H ? /* @__PURE__ */ r(On, { content: t }) : null,
8490
+ F ? /* @__PURE__ */ r(On, { content: t }) : null,
8486
8491
  o && /* @__PURE__ */ r("span", { className: "ml-auto normal-case", children: o })
8487
8492
  ] }),
8488
8493
  /* @__PURE__ */ r(
@@ -8692,7 +8697,7 @@ function dh({
8692
8697
  }
8693
8698
  ),
8694
8699
  /* @__PURE__ */ r("div", { className: "flex justify-center", children: /* @__PURE__ */ r(
8695
- Po,
8700
+ zo,
8696
8701
  {
8697
8702
  size: "sm",
8698
8703
  checked: T.key ?? !1,
@@ -8785,7 +8790,7 @@ function dh({
8785
8790
  }
8786
8791
  );
8787
8792
  }
8788
- function ci({
8793
+ function di({
8789
8794
  label: e,
8790
8795
  children: t,
8791
8796
  helperText: n,
@@ -8839,14 +8844,14 @@ function Pm(e, t) {
8839
8844
  }
8840
8845
  ), !0;
8841
8846
  }
8842
- const Ht = 260, qr = 420, yo = 380, Gt = "cubic-bezier(0.22, 1, 0.36, 1)", zm = "cubic-bezier(0.16, 1, 0.3, 1)", wo = "cubic-bezier(0.22, 1, 0.36, 1)", jm = "cubic-bezier(0.22, 1, 0.36, 1)", Wm = 8, qm = 1, Um = 1.25, jo = {
8847
+ const Ht = 260, qr = 420, wo = 380, Gt = "cubic-bezier(0.22, 1, 0.36, 1)", zm = "cubic-bezier(0.16, 1, 0.3, 1)", No = "cubic-bezier(0.22, 1, 0.36, 1)", jm = "cubic-bezier(0.22, 1, 0.36, 1)", Wm = 8, qm = 1, Um = 1.25, Wo = {
8843
8848
  background: "color-mix(in srgb, var(--bg-card) 90%, transparent)",
8844
8849
  border: "1px solid var(--border)",
8845
8850
  boxShadow: "0 10px 28px color-mix(in srgb, var(--bg-main) 28%, transparent), inset 0 1px 0 color-mix(in srgb, var(--bg-card) 55%, transparent)",
8846
8851
  color: "var(--text-main)",
8847
8852
  backdropFilter: "blur(12px)",
8848
8853
  WebkitBackdropFilter: "blur(12px)"
8849
- }, Vm = "color-mix(in srgb, var(--bg-card) 88%, var(--primary) 12%)", No = 10;
8854
+ }, Vm = "color-mix(in srgb, var(--bg-card) 88%, var(--primary) 12%)", ko = 10;
8850
8855
  function vn(e, t, n) {
8851
8856
  return Math.min(n, Math.max(t, e));
8852
8857
  }
@@ -8884,7 +8889,7 @@ function Ur({
8884
8889
  },
8885
8890
  className: "inline-flex items-center justify-center rounded-full disabled:cursor-not-allowed disabled:opacity-35",
8886
8891
  style: {
8887
- ...jo,
8892
+ ...Wo,
8888
8893
  width: i,
8889
8894
  height: i,
8890
8895
  transition: "background 160ms ease, transform 160ms cubic-bezier(0.22, 1, 0.36, 1), opacity 160ms ease"
@@ -8894,7 +8899,7 @@ function Ur({
8894
8899
  },
8895
8900
  onMouseLeave: (l) => {
8896
8901
  l.currentTarget.style.background = String(
8897
- jo.background ?? ""
8902
+ Wo.background ?? ""
8898
8903
  ), l.currentTarget.style.transform = "scale(1)";
8899
8904
  },
8900
8905
  onMouseDown: (l) => {
@@ -8938,7 +8943,7 @@ function Km({
8938
8943
  scale: 1,
8939
8944
  animate: !1,
8940
8945
  enabled: !1
8941
- }), [le, G] = z(!1), fe = oe(null), I = oe(null), q = oe(null), ne = oe(null), M = oe(null), H = oe(!1), ce = oe(!1), R = oe(null), ae = oe(null), K = oe(null), W = oe(null), ie = oe(null), E = oe(a ?? 0), Q = a ?? C, J = n.length === 0 ? 0 : vn(Q, 0, Math.max(0, n.length - 1)), Z = n[J], v = n.length > 1, N = Math.max(s, l), ee = x && v, ue = be(
8946
+ }), [le, G] = z(!1), fe = oe(null), I = oe(null), q = oe(null), ne = oe(null), M = oe(null), F = oe(!1), ce = oe(!1), R = oe(null), ae = oe(null), K = oe(null), W = oe(null), ie = oe(null), E = oe(a ?? 0), Q = a ?? C, J = n.length === 0 ? 0 : vn(Q, 0, Math.max(0, n.length - 1)), Z = n[J], v = n.length > 1, N = Math.max(s, l), ee = x && v, ue = be(
8942
8947
  (pe) => {
8943
8948
  if (n.length === 0) return;
8944
8949
  const ye = n.length - 1, Fe = h ? (pe % n.length + n.length) % n.length : vn(pe, 0, ye);
@@ -8947,7 +8952,7 @@ function Km({
8947
8952
  [a, h, o, n.length]
8948
8953
  ), te = be(() => {
8949
8954
  k(1), j({ x: 0, y: 0 });
8950
- }, []), xe = be(
8955
+ }, []), ve = be(
8951
8956
  (pe, ye) => {
8952
8957
  if (ye <= s + 1e-3) return { x: 0, y: 0 };
8953
8958
  const Fe = W.current, Pe = ie.current;
@@ -8960,10 +8965,10 @@ function Km({
8960
8965
  },
8961
8966
  [s]
8962
8967
  ), Ce = be(() => {
8963
- S(!1), P({ dx: 0, dy: 0, scale: 1, animate: !1, enabled: !1 }), ne.current = null, M.current = null, H.current = !1, ce.current = !1, R.current && (clearTimeout(R.current), R.current = null);
8964
- }, []), Le = be(() => {
8965
- if (H.current) return;
8966
- H.current = !0, O(!1), te();
8968
+ S(!1), P({ dx: 0, dy: 0, scale: 1, animate: !1, enabled: !1 }), ne.current = null, M.current = null, F.current = !1, ce.current = !1, R.current && (clearTimeout(R.current), R.current = null);
8969
+ }, []), Ae = be(() => {
8970
+ if (F.current) return;
8971
+ F.current = !0, O(!1), te();
8967
8972
  const pe = ne.current, ye = pe != null && M.current != null && M.current === J;
8968
8973
  if (pe && ye) {
8969
8974
  q.current != null && cancelAnimationFrame(q.current), q.current = requestAnimationFrame(() => {
@@ -8995,15 +9000,15 @@ function Km({
8995
9000
  }
8996
9001
  P({ dx: 0, dy: 0, scale: 1, animate: !1, enabled: !1 }), fe.current && clearTimeout(fe.current), fe.current = setTimeout(Ce, Ht + 40);
8997
9002
  }, [Ce, te, J]);
8998
- me(() => (e ? (fe.current && clearTimeout(fe.current), R.current && (clearTimeout(R.current), R.current = null), H.current = !1, ce.current = !1, ne.current = Ym(i), M.current = ne.current != null ? a ?? C : null, S(!0), O(!1), ne.current ? P({ dx: 0, dy: 0, scale: 1, animate: !1, enabled: !0 }) : (M.current = null, requestAnimationFrame(
9003
+ me(() => (e ? (fe.current && clearTimeout(fe.current), R.current && (clearTimeout(R.current), R.current = null), F.current = !1, ce.current = !1, ne.current = Ym(i), M.current = ne.current != null ? a ?? C : null, S(!0), O(!1), ne.current ? P({ dx: 0, dy: 0, scale: 1, animate: !1, enabled: !0 }) : (M.current = null, requestAnimationFrame(
8999
9004
  () => requestAnimationFrame(() => {
9000
9005
  O(!0), P({ dx: 0, dy: 0, scale: 1, animate: !1, enabled: !1 });
9001
9006
  })
9002
- ))) : A && Le(), () => {
9007
+ ))) : A && Ae(), () => {
9003
9008
  fe.current && clearTimeout(fe.current), q.current != null && cancelAnimationFrame(q.current);
9004
9009
  }), [e]);
9005
9010
  const vt = be(() => {
9006
- if (!e || H.current || ce.current) return;
9011
+ if (!e || F.current || ce.current) return;
9007
9012
  const pe = ne.current, ye = ie.current;
9008
9013
  if (!pe || !ye) {
9009
9014
  pe || (O(!0), ce.current = !0);
@@ -9042,7 +9047,7 @@ function Km({
9042
9047
  _a(() => {
9043
9048
  !A || !e || !ne.current || ce.current || vt();
9044
9049
  }, [A, e, vt]), me(() => {
9045
- !e || H.current || M.current != null && M.current !== J && P(
9050
+ !e || F.current || M.current != null && M.current !== J && P(
9046
9051
  (pe) => pe.enabled ? { dx: 0, dy: 0, scale: 1, animate: !1, enabled: !1 } : pe
9047
9052
  );
9048
9053
  }, [e, J]), me(() => {
@@ -9115,11 +9120,11 @@ function Km({
9115
9120
  };
9116
9121
  } else
9117
9122
  rt = { x: Ke.x * gt, y: Ke.y * gt };
9118
- return xe(rt, ze);
9123
+ return ve(rt, ze);
9119
9124
  }), ze);
9120
9125
  });
9121
9126
  },
9122
- [xe, s, N]
9127
+ [ve, s, N]
9123
9128
  ), st = be(() => {
9124
9129
  it($ * d);
9125
9130
  }, [it, $, d]), de = be(() => {
@@ -9168,7 +9173,7 @@ function Km({
9168
9173
  }, Oe = (pe) => {
9169
9174
  const ye = ae.current;
9170
9175
  !ye || ye.pointerId !== pe.pointerId || j(
9171
- xe(
9176
+ ve(
9172
9177
  {
9173
9178
  x: ye.originX + (pe.clientX - ye.startX),
9174
9179
  y: ye.originY + (pe.clientY - ye.startY)
@@ -9265,9 +9270,9 @@ function Km({
9265
9270
  filter: U.blur ? `blur(${U.blur}px)` : "blur(0px)",
9266
9271
  transform: `translate3d(${U.x}px, 0, 0) scale(${U.scale})`,
9267
9272
  transition: U.animate ? [
9268
- `opacity ${yo}ms ${wo}`,
9269
- `transform ${yo}ms ${wo}`,
9270
- `filter ${yo}ms ${wo}`
9273
+ `opacity ${wo}ms ${No}`,
9274
+ `transform ${wo}ms ${No}`,
9275
+ `filter ${wo}ms ${No}`
9271
9276
  ].join(", ") : "none"
9272
9277
  },
9273
9278
  children: /* @__PURE__ */ r(
@@ -9299,7 +9304,7 @@ function Km({
9299
9304
  className: "block max-h-[min(78vh,820px)] max-w-[min(86vw,1100px)] object-contain",
9300
9305
  style: {
9301
9306
  display: "block",
9302
- borderRadius: No,
9307
+ borderRadius: ko,
9303
9308
  imageRendering: $ > 2.5 ? "pixelated" : "auto"
9304
9309
  },
9305
9310
  onLoad: () => {
@@ -9332,7 +9337,7 @@ function Km({
9332
9337
  "span",
9333
9338
  {
9334
9339
  className: "rounded-full px-3 py-1.5 text-xs font-semibold tracking-wide",
9335
- style: jo,
9340
+ style: Wo,
9336
9341
  children: [
9337
9342
  J + 1,
9338
9343
  " / ",
@@ -9348,7 +9353,7 @@ function Km({
9348
9353
  label: "Alejar",
9349
9354
  onClick: de,
9350
9355
  disabled: $ <= s + 1e-3,
9351
- children: /* @__PURE__ */ r(Qo, { className: "h-5 w-5" })
9356
+ children: /* @__PURE__ */ r(Jo, { className: "h-5 w-5" })
9352
9357
  }
9353
9358
  ),
9354
9359
  /* @__PURE__ */ r(
@@ -9452,7 +9457,7 @@ function Km({
9452
9457
  style: {
9453
9458
  width: 56,
9454
9459
  height: 42,
9455
- borderRadius: No,
9460
+ borderRadius: ko,
9456
9461
  opacity: Fe ? 1 : 0.42,
9457
9462
  transition: `opacity 180ms ${Gt}`
9458
9463
  },
@@ -9463,7 +9468,7 @@ function Km({
9463
9468
  alt: "",
9464
9469
  draggable: !1,
9465
9470
  className: "h-full w-full object-cover",
9466
- style: { borderRadius: No }
9471
+ style: { borderRadius: ko }
9467
9472
  }
9468
9473
  )
9469
9474
  },
@@ -9545,13 +9550,13 @@ function Sl(e, t) {
9545
9550
  const n = new Set(t);
9546
9551
  return e.every((a) => n.has(a));
9547
9552
  }
9548
- function ko(e) {
9553
+ function Eo(e) {
9549
9554
  return e.normalize("NFD").replace(new RegExp("\\p{M}", "gu"), "").toLowerCase();
9550
9555
  }
9551
9556
  function Xm(e, t) {
9552
9557
  if (!t) return !0;
9553
- const n = ko(t);
9554
- return ko(e.label).includes(n) || !!(e.sublabel && ko(e.sublabel).includes(n));
9558
+ const n = Eo(t);
9559
+ return Eo(e.label).includes(n) || !!(e.sublabel && Eo(e.sublabel).includes(n));
9555
9560
  }
9556
9561
  function mh({
9557
9562
  value: e,
@@ -9586,7 +9591,7 @@ function mh({
9586
9591
  }, [fe, e]), q = f === "all" ? I.length : f, ne = I.slice(0, q), M = Math.max(
9587
9592
  0,
9588
9593
  I.length - ne.length
9589
- ), H = h && I.length > 1, ce = /* @__PURE__ */ c("div", { className: "flex max-w-[280px] flex-col gap-1.5 py-0.5", children: [
9594
+ ), F = h && I.length > 1, ce = /* @__PURE__ */ c("div", { className: "flex max-w-[280px] flex-col gap-1.5 py-0.5", children: [
9590
9595
  /* @__PURE__ */ c(
9591
9596
  "div",
9592
9597
  {
@@ -9980,7 +9985,7 @@ function mh({
9980
9985
  }
9981
9986
  )
9982
9987
  ] });
9983
- return H ? /* @__PURE__ */ r(
9988
+ return F ? /* @__PURE__ */ r(
9984
9989
  ir,
9985
9990
  {
9986
9991
  as: "span",
@@ -10361,7 +10366,7 @@ function ph({
10361
10366
  return ue != null && ue.length ? ee.filter((te) => ue.includes(te.value)) : ee;
10362
10367
  }, [m, h]), ne = ((N = q[0]) == null ? void 0 : N.value) ?? "+1", M = q.some(
10363
10368
  (ee) => ee.value === ma(u ?? fe)
10364
- ) ? ma(u ?? fe) : ne, H = l !== void 0 ? Cl(l) : le, ce = `${M} ${H}`.trim(), R = n && H.length > 0 && !Ps(ce) ? a : void 0, ae = i ?? R, K = !!ae, W = K && o !== "tooltip", ie = K && o !== "inline", E = !!O && C === "tooltip" && !W, Q = K ? "border-[var(--danger)] focus-within:border-[var(--danger)]" : "border-[var(--border)] focus-within:border-[var(--primary)]", J = (ee) => {
10369
+ ) ? ma(u ?? fe) : ne, F = l !== void 0 ? Cl(l) : le, ce = `${M} ${F}`.trim(), R = n && F.length > 0 && !Ps(ce) ? a : void 0, ae = i ?? R, K = !!ae, W = K && o !== "tooltip", ie = K && o !== "inline", E = !!O && C === "tooltip" && !W, Q = K ? "border-[var(--danger)] focus-within:border-[var(--danger)]" : "border-[var(--border)] focus-within:border-[var(--primary)]", J = (ee) => {
10365
10370
  const ue = ee.currentTarget.value;
10366
10371
  l === void 0 && G(ue), A == null || A(ue, {
10367
10372
  countryCode: M,
@@ -10369,10 +10374,10 @@ function ph({
10369
10374
  fullNumber: `${M} ${ue}`.trim()
10370
10375
  }), d == null || d(ee);
10371
10376
  }, Z = (ee) => {
10372
- u === void 0 && I(ee), f == null || f(ee), A == null || A(H, {
10377
+ u === void 0 && I(ee), f == null || f(ee), A == null || A(F, {
10373
10378
  countryCode: ee,
10374
- nationalNumber: H,
10375
- fullNumber: `${ee} ${H}`.trim()
10379
+ nationalNumber: F,
10380
+ fullNumber: `${ee} ${F}`.trim()
10376
10381
  });
10377
10382
  }, v = ie ? /* @__PURE__ */ r(
10378
10383
  ir,
@@ -10583,7 +10588,7 @@ const sf = /* @__PURE__ */ new Set([
10583
10588
  "th",
10584
10589
  "td",
10585
10590
  "caption"
10586
- ]), Aa = (e, t, n) => Math.min(n, Math.max(t, Math.round(e) || t)), rn = 12, La = 8, Wo = (e, t, n) => {
10591
+ ]), Aa = (e, t, n) => Math.min(n, Math.max(t, Math.round(e) || t)), rn = 12, La = 8, qo = (e, t, n) => {
10587
10592
  const a = za(n), o = e.insertRow(t);
10588
10593
  for (let i = 0; i < a; i += 1) {
10589
10594
  const l = o.insertCell(-1);
@@ -10597,12 +10602,12 @@ const sf = /* @__PURE__ */ new Set([
10597
10602
  if (!a) return null;
10598
10603
  if (a.tagName === "THEAD") {
10599
10604
  const i = e.tBodies[0] ?? e.createTBody();
10600
- return i.rows.length >= rn ? null : Wo(i, 0, e);
10605
+ return i.rows.length >= rn ? null : qo(i, 0, e);
10601
10606
  }
10602
10607
  if (a.tagName === "TBODY" && a.rows.length >= rn)
10603
10608
  return null;
10604
10609
  const o = Array.from(a.rows).indexOf(n);
10605
- return Wo(a, o + 1, e);
10610
+ return qo(a, o + 1, e);
10606
10611
  }, cf = (e, t) => {
10607
10612
  var o;
10608
10613
  const n = e.rows[t];
@@ -10660,7 +10665,7 @@ const sf = /* @__PURE__ */ new Set([
10660
10665
  case "table-delete":
10661
10666
  return t.remove(), !0;
10662
10667
  case "table-row-add": {
10663
- const i = Number.isFinite(n) ? Us(t, n) : qo(t);
10668
+ const i = Number.isFinite(n) ? Us(t, n) : Uo(t);
10664
10669
  return i && ya(i, o, !0), !!i;
10665
10670
  }
10666
10671
  case "table-row-del":
@@ -10704,13 +10709,13 @@ const sf = /* @__PURE__ */ new Set([
10704
10709
  a.selectNodeContents(e), a.collapse(n);
10705
10710
  const o = window.getSelection();
10706
10711
  o == null || o.removeAllRanges(), o == null || o.addRange(a);
10707
- }, qo = (e) => {
10712
+ }, Uo = (e) => {
10708
10713
  const t = ff(e);
10709
10714
  if (t.length >= rn) return null;
10710
10715
  const n = t[t.length - 1];
10711
10716
  if (!n) {
10712
10717
  const a = e.tBodies[0] ?? e.createTBody();
10713
- return Wo(a, 0, e);
10718
+ return qo(a, 0, e);
10714
10719
  }
10715
10720
  return Us(
10716
10721
  e,
@@ -10719,7 +10724,7 @@ const sf = /* @__PURE__ */ new Set([
10719
10724
  }, hf = (e) => {
10720
10725
  const t = za(e) - 1;
10721
10726
  return t < 0 ? !1 : Vs(e, t);
10722
- }, Eo = (e) => {
10727
+ }, So = (e) => {
10723
10728
  Ks(e);
10724
10729
  }, gf = (e, t, n) => {
10725
10730
  const a = Aa(e, 1, rn), o = Aa(t, 1, La), i = n ? `<thead><tr>${Array.from(
@@ -10979,7 +10984,7 @@ const sf = /* @__PURE__ */ new Set([
10979
10984
  return i(o), o.querySelectorAll("pre").forEach((l) => {
10980
10985
  if (l.closest(".rich-code-wrap")) return;
10981
10986
  const s = l.textContent ?? "", d = a.createElement("div");
10982
- d.innerHTML = di(s, !1);
10987
+ d.innerHTML = ui(s, !1);
10983
10988
  const u = d.querySelector(".rich-code-wrap");
10984
10989
  u && l.replaceWith(u);
10985
10990
  }), o.querySelectorAll("p, h2, h3, li").forEach((l) => {
@@ -10997,16 +11002,16 @@ const sf = /* @__PURE__ */ new Set([
10997
11002
  d.remove();
10998
11003
  }
10999
11004
  }), o.innerHTML.replace(/<!--[\s\S]*?-->/g, "").replace(/&nbsp;/gi, " ").replace(/(<br\s*\/?>\s*){3,}/gi, "<br><br>").replace(/<p>(?:\s|<br\s*\/?>)*<\/p>/gi, "").trim();
11000
- }, So = (e) => Kr(e).replace(/\r\n?/g, `
11001
- `).split(/\n{2,}/).map((t) => `<p>${t.replace(/\n/g, "<br>") || "<br>"}</p>`).join(""), di = (e, t = !0) => lf(e, Kr, t), $n = (e) => {
11005
+ }, Co = (e) => Kr(e).replace(/\r\n?/g, `
11006
+ `).split(/\n{2,}/).map((t) => `<p>${t.replace(/\n/g, "<br>") || "<br>"}</p>`).join(""), ui = (e, t = !0) => lf(e, Kr, t), $n = (e) => {
11002
11007
  const t = e.replace(/\r\n?/g, `
11003
11008
  `);
11004
- if (!/```/.test(t)) return So(e);
11009
+ if (!/```/.test(t)) return Co(e);
11005
11010
  const n = [], a = /```(?:[\w-]*\n)?([\s\S]*?)```/g;
11006
11011
  let o = 0, i;
11007
11012
  for (; (i = a.exec(t)) !== null; )
11008
- i.index > o && n.push(So(t.slice(o, i.index))), n.push(di(i[1] ?? "")), o = a.lastIndex;
11009
- return o < t.length && n.push(So(t.slice(o))), n.join("");
11013
+ i.index > o && n.push(Co(t.slice(o, i.index))), n.push(ui(i[1] ?? "")), o = a.lastIndex;
11014
+ return o < t.length && n.push(Co(t.slice(o))), n.join("");
11010
11015
  }, Dl = /```[\s\S]+?```/, Df = (e) => {
11011
11016
  const t = (e.textContent ?? "").replace(/\u00a0/g, " ");
11012
11017
  if (!e.querySelector(".rich-code-wrap") && t.includes("```") && Dl.test(t)) {
@@ -11034,7 +11039,7 @@ const sf = /* @__PURE__ */ new Set([
11034
11039
  }
11035
11040
  }
11036
11041
  return n;
11037
- }, Rf = (e) => new RegExp("\\p{L}", "u").test(e), Co = (e, t) => {
11042
+ }, Rf = (e) => new RegExp("\\p{L}", "u").test(e), $o = (e, t) => {
11038
11043
  const n = e.trim();
11039
11044
  return !n || !Rf(n) ? !1 : t === "uppercase" ? n === n.toLocaleUpperCase() : t === "lowercase" ? n === n.toLocaleLowerCase() : n === Gs(n);
11040
11045
  }, Rl = (e) => {
@@ -11078,7 +11083,7 @@ function Zs({
11078
11083
  () => document,
11079
11084
  []
11080
11085
  ), b = oe(null), f = oe(null), m = oe(/* @__PURE__ */ new Map()), h = oe(null), x = oe(!1), w = oe(e ?? ""), g = oe(t), A = oe(() => {
11081
- }), S = oe(!1), [T, O] = z(() => !e || e.trim() === ""), [C, y] = z(/* @__PURE__ */ new Set()), [$, k] = z(null), [_, j] = z(""), [U, D] = z(""), [Y, P] = z(""), [le, G] = z(""), [fe, I] = z(3), [q, ne] = z(3), [M, H] = z(!0), [ce, R] = z(!1), [ae, K] = z(
11086
+ }), S = oe(!1), [T, O] = z(() => !e || e.trim() === ""), [C, y] = z(/* @__PURE__ */ new Set()), [$, k] = z(null), [_, j] = z(""), [U, D] = z(""), [Y, P] = z(""), [le, G] = z(""), [fe, I] = z(3), [q, ne] = z(3), [M, F] = z(!0), [ce, R] = z(!1), [ae, K] = z(
11082
11087
  i === "full"
11083
11088
  ), [W, ie] = z(null), [E, Q] = z(null), J = oe(null), Z = oe(!1), v = oe(null), N = be(
11084
11089
  () => x.current ? f.current : b.current,
@@ -11106,7 +11111,7 @@ function Zs({
11106
11111
  );
11107
11112
  V.forEach((he) => {
11108
11113
  he.innerHTML !== B && (he.innerHTML = B);
11109
- }), O(!B || B.trim() === ""), V.forEach((he) => Eo(he));
11114
+ }), O(!B || B.trim() === ""), V.forEach((he) => So(he));
11110
11115
  const ge = V.map((he) => Rl(he));
11111
11116
  return () => ge.forEach((he) => he());
11112
11117
  }, [e]), me(() => {
@@ -11123,7 +11128,7 @@ function Zs({
11123
11128
  V = requestAnimationFrame(Ie);
11124
11129
  return;
11125
11130
  }
11126
- Be.innerHTML !== w.current && (Be.innerHTML = w.current), B = Rl(Be), Eo(Be), O(((bt = Be.textContent) == null ? void 0 : bt.trim()) === ""), ge = setTimeout(() => Be.focus(), 60);
11131
+ Be.innerHTML !== w.current && (Be.innerHTML = w.current), B = Rl(Be), So(Be), O(((bt = Be.textContent) == null ? void 0 : bt.trim()) === ""), ge = setTimeout(() => Be.focus(), 60);
11127
11132
  };
11128
11133
  V = requestAnimationFrame(Ie);
11129
11134
  } else {
@@ -11162,7 +11167,7 @@ function Zs({
11162
11167
  } catch {
11163
11168
  }
11164
11169
  const ge = ee();
11165
- Co(ge, "uppercase") && V.add("__upper"), Co(ge, "lowercase") && V.add("__lower"), Co(ge, "capitalize") && V.add("__cap");
11170
+ $o(ge, "uppercase") && V.add("__upper"), $o(ge, "lowercase") && V.add("__lower"), $o(ge, "capitalize") && V.add("__cap");
11166
11171
  try {
11167
11172
  const he = window.getSelection();
11168
11173
  let Ne = (he == null ? void 0 : he.anchorNode) ?? null;
@@ -11176,15 +11181,15 @@ function Zs({
11176
11181
  B && (Df(B), w.current = fa(B), S.current = !0, g.current(w.current), O(((V = B.textContent) == null ? void 0 : V.trim()) === ""));
11177
11182
  };
11178
11183
  A.current = te;
11179
- const xe = be(() => {
11184
+ const ve = be(() => {
11180
11185
  v.current && (clearTimeout(v.current), v.current = null), J.current && (Ys(J.current), J.current = null), Z.current = !1, ie(null), Q(null);
11181
11186
  }, []), Ce = be(() => {
11182
11187
  v.current && (clearTimeout(v.current), v.current = null);
11183
- }, []), Le = be(() => {
11188
+ }, []), Ae = be(() => {
11184
11189
  Ce(), v.current = setTimeout(() => {
11185
- Z.current || xe();
11190
+ Z.current || ve();
11186
11191
  }, 280);
11187
- }, [Ce, xe]);
11192
+ }, [Ce, ve]);
11188
11193
  me(
11189
11194
  () => () => {
11190
11195
  v.current && clearTimeout(v.current);
@@ -11195,13 +11200,13 @@ function Zs({
11195
11200
  (B) => {
11196
11201
  const V = J.current;
11197
11202
  if (!V || !V.isConnected) {
11198
- xe();
11203
+ ve();
11199
11204
  return;
11200
11205
  }
11201
11206
  const ge = (W == null ? void 0 : W.rowIndex) ?? (E == null ? void 0 : E.rowIndex) ?? -1, he = (W == null ? void 0 : W.colIndex) ?? (E == null ? void 0 : E.colIndex) ?? -1;
11202
- mf(B, V, ge, he, N()), xe(), A.current(), ue();
11207
+ mf(B, V, ge, he, N()), ve(), A.current(), ue();
11203
11208
  },
11204
- [N, xe, ue, E, W]
11209
+ [N, ve, ue, E, W]
11205
11210
  ), St = be(
11206
11211
  (B) => {
11207
11212
  if (E) return;
@@ -11212,12 +11217,12 @@ function Zs({
11212
11217
  }
11213
11218
  const he = ge.closest("td, th");
11214
11219
  if (!he || !V.contains(he)) {
11215
- Le();
11220
+ Ae();
11216
11221
  return;
11217
11222
  }
11218
11223
  const Ne = he.closest("tr"), ke = he.closest("table");
11219
11224
  if (!Ne || !ke || !V.contains(ke)) {
11220
- Le();
11225
+ Ae();
11221
11226
  return;
11222
11227
  }
11223
11228
  Ce(), ke.classList.add("rich-table"), J.current = ke, $l(
@@ -11232,7 +11237,7 @@ function Zs({
11232
11237
  )
11233
11238
  );
11234
11239
  },
11235
- [Ce, Le, E]
11240
+ [Ce, Ae, E]
11236
11241
  ), it = be(
11237
11242
  (B) => {
11238
11243
  const V = B.relatedTarget;
@@ -11240,9 +11245,9 @@ function Zs({
11240
11245
  Ce();
11241
11246
  return;
11242
11247
  }
11243
- Le();
11248
+ Ae();
11244
11249
  },
11245
- [Ce, Le]
11250
+ [Ce, Ae]
11246
11251
  ), st = be(
11247
11252
  (B) => {
11248
11253
  const V = B.currentTarget, he = B.target.closest("td, th");
@@ -11262,11 +11267,11 @@ function Zs({
11262
11267
  );
11263
11268
  me(() => {
11264
11269
  if (!W && !E) return;
11265
- const B = () => Le();
11270
+ const B = () => Ae();
11266
11271
  return window.addEventListener("scroll", B, !0), window.addEventListener("resize", B), () => {
11267
11272
  window.removeEventListener("scroll", B, !0), window.removeEventListener("resize", B);
11268
11273
  };
11269
- }, [Le, E, W]), me(() => {
11274
+ }, [Ae, E, W]), me(() => {
11270
11275
  if (!E) return;
11271
11276
  const B = (V) => {
11272
11277
  const ge = V.target;
@@ -11301,7 +11306,7 @@ function Zs({
11301
11306
  V && !V.isCollapsed ? V.toString() : ""
11302
11307
  ), j("");
11303
11308
  }
11304
- B === "image" && (P(""), G("")), B === "table" && (I(3), ne(3), H(!0)), k(B);
11309
+ B === "image" && (P(""), G("")), B === "table" && (I(3), ne(3), F(!0)), k(B);
11305
11310
  }, He = () => {
11306
11311
  var he;
11307
11312
  if (!_.trim()) return;
@@ -11333,7 +11338,7 @@ function Zs({
11333
11338
  u().execCommand(
11334
11339
  "insertHTML",
11335
11340
  !1,
11336
- di(V)
11341
+ ui(V)
11337
11342
  ), te();
11338
11343
  }, ye = (B, V = 1200, ge = 1200, he = 0.72) => new Promise((Ne, ke) => {
11339
11344
  const Ie = new FileReader();
@@ -11367,7 +11372,7 @@ function Zs({
11367
11372
  });
11368
11373
  Pe.current = (B) => {
11369
11374
  const V = N();
11370
- V && (Fe(V), u().execCommand("insertHTML", !1, B), Eo(V), V.querySelectorAll("p").forEach((ge) => {
11375
+ V && (Fe(V), u().execCommand("insertHTML", !1, B), So(V), V.querySelectorAll("p").forEach((ge) => {
11371
11376
  !(ge.textContent ?? "").replace(/[\u00a0\s]+/g, "") && !ge.querySelector("img, hr, table") && ge.remove();
11372
11377
  }), te(), ue());
11373
11378
  };
@@ -11468,7 +11473,7 @@ function Zs({
11468
11473
  const Be = bf(Ie), bt = Be.indexOf(Ne), et = bt >= 0 ? Be[bt + 1] : null;
11469
11474
  if (et) ya(et, ke, !0);
11470
11475
  else if (Al(Ne, Ie)) {
11471
- const sr = qo(Ie);
11476
+ const sr = Uo(Ie);
11472
11477
  sr && ya(sr, ke, !0);
11473
11478
  }
11474
11479
  te(), ue();
@@ -11481,7 +11486,7 @@ function Zs({
11481
11486
  const he = window.getSelection(), Ne = Ml((he == null ? void 0 : he.anchorNode) ?? null), ke = N(), Ie = Tl(Ne);
11482
11487
  if (Ne && Ie && (ke != null && ke.contains(Ne)) && Al(Ne, Ie) && pf(Ne)) {
11483
11488
  B.preventDefault();
11484
- const Be = qo(Ie);
11489
+ const Be = Uo(Ie);
11485
11490
  Be && ya(Be, ke, !0), te(), ue();
11486
11491
  return;
11487
11492
  }
@@ -11542,7 +11547,7 @@ function Zs({
11542
11547
  }, lr = () => {
11543
11548
  Ce(), Z.current = !0;
11544
11549
  }, Tt = () => {
11545
- Z.current = !1, Le();
11550
+ Z.current = !1, Ae();
11546
11551
  }, It = (B, V, ge, he = !1) => /* @__PURE__ */ r(
11547
11552
  "button",
11548
11553
  {
@@ -11778,7 +11783,7 @@ function Zs({
11778
11783
  {
11779
11784
  type: "checkbox",
11780
11785
  checked: M,
11781
- onChange: (V) => H(V.target.checked)
11786
+ onChange: (V) => F(V.target.checked)
11782
11787
  }
11783
11788
  ),
11784
11789
  "Encabezado"
@@ -11909,7 +11914,7 @@ function Zs({
11909
11914
  We(/* @__PURE__ */ r("i", { children: "I" }), "Cursiva (Ctrl+I)", "italic"),
11910
11915
  We(/* @__PURE__ */ r("u", { children: "U" }), "Subrayado (Ctrl+U)", "underline"),
11911
11916
  We(
11912
- /* @__PURE__ */ r(_o, { className: "h-4 w-4" }),
11917
+ /* @__PURE__ */ r(Fo, { className: "h-4 w-4" }),
11913
11918
  "Lista sin orden",
11914
11919
  "insertUnorderedList"
11915
11920
  ),
@@ -12037,13 +12042,13 @@ function Zs({
12037
12042
  () => Ue("image")
12038
12043
  ),
12039
12044
  We(
12040
- /* @__PURE__ */ r(Jo, { className: "h-4 w-4" }),
12045
+ /* @__PURE__ */ r(ei, { className: "h-4 w-4" }),
12041
12046
  "Insertar tabla",
12042
12047
  "__table",
12043
12048
  () => Ue("table")
12044
12049
  ),
12045
12050
  We(
12046
- /* @__PURE__ */ r(Qo, { className: "h-4 w-4" }),
12051
+ /* @__PURE__ */ r(Jo, { className: "h-4 w-4" }),
12047
12052
  "Insertar separador",
12048
12053
  "__divider",
12049
12054
  Oe
@@ -12167,7 +12172,7 @@ function Zs({
12167
12172
  )
12168
12173
  ] });
12169
12174
  }
12170
- const Qs = "[a-zA-Z0-9._@-]+", Uo = new RegExp(`@(${Qs})`, "g"), Of = /[a-zA-Z0-9._@-]/, Tn = /* @__PURE__ */ new Set([
12175
+ const Qs = "[a-zA-Z0-9._@-]+", Vo = new RegExp(`@(${Qs})`, "g"), Of = /[a-zA-Z0-9._@-]/, Tn = /* @__PURE__ */ new Set([
12171
12176
  " ",
12172
12177
  `
12173
12178
  `,
@@ -12290,9 +12295,9 @@ function tc(e) {
12290
12295
  for (; (i = o.exec(e)) !== null; )
12291
12296
  a(i[1] ?? "");
12292
12297
  const l = Ff(e);
12293
- Uo.lastIndex = 0;
12298
+ Vo.lastIndex = 0;
12294
12299
  let s;
12295
- for (; (s = Uo.exec(l)) !== null; )
12300
+ for (; (s = Vo.exec(l)) !== null; )
12296
12301
  a(s[1] ?? "");
12297
12302
  return n;
12298
12303
  }
@@ -12336,7 +12341,7 @@ function rc(e) {
12336
12341
  return t && t.nodeType === Node.ELEMENT_NODE && ((n = t.classList) != null && n.contains("mention-chip")) ? " " : !t || t.nodeType === Node.ELEMENT_NODE && t.tagName === "BR" ? " " : " ";
12337
12342
  }
12338
12343
  function zf(e) {
12339
- return !e || !/@/.test(e) ? e : e.replace(Uo, (t, n, a, o) => {
12344
+ return !e || !/@/.test(e) ? e : e.replace(Vo, (t, n, a, o) => {
12340
12345
  const i = o.slice(0, a), l = i.lastIndexOf("<"), s = i.lastIndexOf(">");
12341
12346
  if (l > s) return t;
12342
12347
  const d = (n ?? "").toLowerCase(), u = o[a + t.length] ?? "";
@@ -12390,7 +12395,7 @@ const jf = /* @__PURE__ */ new Set([
12390
12395
  function Bl(e, t) {
12391
12396
  return jf.has(e.tagName) && e !== t;
12392
12397
  }
12393
- function ui(e, t) {
12398
+ function mi(e, t) {
12394
12399
  let n = "", a, o, i = !1;
12395
12400
  const l = (m, h) => {
12396
12401
  if (i || !(t != null && t.domPoint)) return;
@@ -12435,13 +12440,13 @@ function ui(e, t) {
12435
12440
  return { plain: n, locate: a, domOffset: o };
12436
12441
  }
12437
12442
  function ac(e) {
12438
- return ui(e).plain;
12443
+ return mi(e).plain;
12439
12444
  }
12440
12445
  function Ln(e, t) {
12441
- return t < 0 ? null : ui(e, { locatePlain: t }).locate ?? null;
12446
+ return t < 0 ? null : mi(e, { locatePlain: t }).locate ?? null;
12442
12447
  }
12443
- function Vo(e, t, n) {
12444
- return e !== t && !e.contains(t) ? -1 : ui(e, { domPoint: { container: t, offset: n } }).domOffset ?? -1;
12448
+ function Yo(e, t, n) {
12449
+ return e !== t && !e.contains(t) ? -1 : mi(e, { domPoint: { container: t, offset: n } }).domOffset ?? -1;
12445
12450
  }
12446
12451
  function Wf(e, t) {
12447
12452
  const { triggerIndex: n, caretIndex: a, username: o } = t;
@@ -12457,7 +12462,7 @@ function Wf(e, t) {
12457
12462
  b.className = "mention-chip", b.setAttribute("data-username", o.toLowerCase()), t.userId && b.setAttribute("data-userid", String(t.userId)), b.contentEditable = "false", b.textContent = u, b.title = `@${o}`;
12458
12463
  const f = s.createTextNode(" "), m = s.createDocumentFragment();
12459
12464
  m.append(b, f), d.insertNode(m), Da(e), nc(b);
12460
- const h = s.defaultView, x = h == null ? void 0 : h.getSelection(), w = x != null && x.rangeCount ? Vo(
12465
+ const h = s.defaultView, x = h == null ? void 0 : h.getSelection(), w = x != null && x.rangeCount ? Yo(
12461
12466
  e,
12462
12467
  x.getRangeAt(0).startContainer,
12463
12468
  x.getRangeAt(0).startOffset
@@ -12496,7 +12501,7 @@ function En(e = document) {
12496
12501
  n.classList.remove("is-selected");
12497
12502
  });
12498
12503
  }
12499
- function Yo(e) {
12504
+ function Ko(e) {
12500
12505
  var a;
12501
12506
  const t = (a = e.ownerDocument.defaultView) == null ? void 0 : a.getSelection();
12502
12507
  e.querySelectorAll(".mention-chip").forEach((o) => {
@@ -12516,7 +12521,7 @@ function Vf(e) {
12516
12521
  const t = e.ownerDocument, n = (o = t.defaultView) == null ? void 0 : o.getSelection();
12517
12522
  if (!n) return;
12518
12523
  const a = t.createRange();
12519
- a.selectNodeContents(e), n.removeAllRanges(), n.addRange(a), Yo(e);
12524
+ a.selectNodeContents(e), n.removeAllRanges(), n.addRange(a), Ko(e);
12520
12525
  }
12521
12526
  function Yf(e) {
12522
12527
  const t = e.cloneContents();
@@ -12529,7 +12534,7 @@ function Kf(e) {
12529
12534
  const n = t.getRangeAt(0);
12530
12535
  return e.contains(n.commonAncestorContainer) ? (n.deleteContents(), En(e), !0) : !1;
12531
12536
  }
12532
- function $o(e) {
12537
+ function To(e) {
12533
12538
  var b, f;
12534
12539
  const t = e.ownerDocument, n = e.parentNode;
12535
12540
  if (!n) return;
@@ -12633,7 +12638,7 @@ function Il(e) {
12633
12638
  }
12634
12639
  }) : [];
12635
12640
  }
12636
- const To = 420, ha = 6, ic = 260, Zf = /* @__PURE__ */ new Set([
12641
+ const Mo = 420, ha = 6, ic = 260, Zf = /* @__PURE__ */ new Set([
12637
12642
  "ArrowDown",
12638
12643
  "ArrowUp",
12639
12644
  "Enter",
@@ -12666,18 +12671,18 @@ function tb(e) {
12666
12671
  8,
12667
12672
  Math.min(e.left, window.innerWidth - ic - 8)
12668
12673
  ), n = window.innerHeight - e.bottom - ha - 8, a = e.top - ha - 8;
12669
- return n < Math.min(To, 180) && a > n ? {
12674
+ return n < Math.min(Mo, 180) && a > n ? {
12670
12675
  left: t,
12671
12676
  bottom: window.innerHeight - e.top + ha,
12672
12677
  maxHeight: Math.min(
12673
- To,
12678
+ Mo,
12674
12679
  Math.max(120, a)
12675
12680
  )
12676
12681
  } : {
12677
12682
  left: t,
12678
12683
  top: e.bottom + ha,
12679
12684
  maxHeight: Math.min(
12680
- To,
12685
+ Mo,
12681
12686
  Math.max(120, n)
12682
12687
  )
12683
12688
  };
@@ -12768,7 +12773,7 @@ function rb({
12768
12773
  $(null);
12769
12774
  return;
12770
12775
  }
12771
- const Q = Vo(
12776
+ const Q = Yo(
12772
12777
  W,
12773
12778
  E.startContainer,
12774
12779
  E.startOffset
@@ -12799,7 +12804,7 @@ function rb({
12799
12804
  };
12800
12805
  return ee && ee.query === ue.query && ee.top === ue.top && ee.bottom === ue.bottom && ee.left === ue.left && ee.maxHeight === ue.maxHeight ? ee : ue;
12801
12806
  });
12802
- }, [ne]), H = be(
12807
+ }, [ne]), F = be(
12803
12808
  (W) => {
12804
12809
  t(W), M();
12805
12810
  },
@@ -12821,7 +12826,7 @@ function rb({
12821
12826
  const Q = window.getSelection();
12822
12827
  if (Q && Q.rangeCount > 0) {
12823
12828
  const ee = Q.getRangeAt(0);
12824
- ie.contains(ee.startContainer) && (E = Vo(
12829
+ ie.contains(ee.startContainer) && (E = Yo(
12825
12830
  ie,
12826
12831
  ee.startContainer,
12827
12832
  ee.startOffset
@@ -12860,7 +12865,7 @@ function rb({
12860
12865
  const ue = Array.from(
12861
12866
  ee.querySelectorAll(".mention-chip")
12862
12867
  ), te = [...ue].reverse().find(
12863
- (xe) => xe.getAttribute("data-username") === N
12868
+ (ve) => ve.getAttribute("data-username") === N
12864
12869
  ) ?? ue[ue.length - 1];
12865
12870
  if (te) {
12866
12871
  nc(te);
@@ -12942,18 +12947,18 @@ function rb({
12942
12947
  const te = Il(N);
12943
12948
  if (te.length > 0) {
12944
12949
  v.preventDefault(), v.stopPropagation();
12945
- for (const Ce of te) $o(Ce);
12950
+ for (const Ce of te) To(Ce);
12946
12951
  En(N), W(N);
12947
12952
  return;
12948
12953
  }
12949
12954
  if (v.key === "Backspace") {
12950
12955
  const Ce = Xf(N);
12951
12956
  if (!Ce) return;
12952
- v.preventDefault(), v.stopPropagation(), $o(Ce), En(N), W(N);
12957
+ v.preventDefault(), v.stopPropagation(), To(Ce), En(N), W(N);
12953
12958
  return;
12954
12959
  }
12955
- const xe = Gf(N);
12956
- xe && (v.preventDefault(), v.stopPropagation(), $o(xe), En(N), W(N));
12960
+ const ve = Gf(N);
12961
+ ve && (v.preventDefault(), v.stopPropagation(), To(ve), En(N), W(N));
12957
12962
  }, E = (v) => {
12958
12963
  const N = ne();
12959
12964
  if (!N) return;
@@ -12975,15 +12980,15 @@ function rb({
12975
12980
  const ee = Math.abs(v.clientX - N.x), ue = Math.abs(v.clientY - N.y);
12976
12981
  (ee > _l || ue > _l) && (C.current = null);
12977
12982
  }, J = (v) => {
12978
- var xe;
12983
+ var ve;
12979
12984
  const N = ne(), ee = C.current;
12980
12985
  if (C.current = null, !N || !ee) return;
12981
12986
  const ue = v.target;
12982
- if (!(ue instanceof Element) || !N.contains(ue) || !((xe = ue.closest(".mention-chip")) != null && xe.isSameNode(ee.chip))) return;
12987
+ if (!(ue instanceof Element) || !N.contains(ue) || !((ve = ue.closest(".mention-chip")) != null && ve.isSameNode(ee.chip))) return;
12983
12988
  const te = window.getSelection();
12984
12989
  if (te) {
12985
12990
  if (!te.isCollapsed) {
12986
- Yo(N);
12991
+ Ko(N);
12987
12992
  return;
12988
12993
  }
12989
12994
  N.focus(), Uf(ee.chip);
@@ -12992,7 +12997,7 @@ function rb({
12992
12997
  const v = ne();
12993
12998
  if (!v) return;
12994
12999
  const N = window.getSelection();
12995
- !N || N.rangeCount === 0 || !N.anchorNode || !v.contains(N.anchorNode) || !N.focusNode || !v.contains(N.focusNode) || Yo(v);
13000
+ !N || N.rangeCount === 0 || !N.anchorNode || !v.contains(N.anchorNode) || !N.focusNode || !v.contains(N.focusNode) || Ko(v);
12996
13001
  };
12997
13002
  return document.addEventListener("keydown", ie, !0), document.addEventListener("mousedown", E, !0), document.addEventListener("mousemove", Q, !0), document.addEventListener("mouseup", J, !0), document.addEventListener("selectionchange", Z), () => {
12998
13003
  document.removeEventListener("keydown", ie, !0), document.removeEventListener("mousedown", E, !0), document.removeEventListener("mousemove", Q, !0), document.removeEventListener("mouseup", J, !0), document.removeEventListener("selectionchange", Z);
@@ -13074,7 +13079,7 @@ function rb({
13074
13079
  Zs,
13075
13080
  {
13076
13081
  value: ae,
13077
- onChange: H,
13082
+ onChange: F,
13078
13083
  placeholder: i,
13079
13084
  minHeight: o,
13080
13085
  instanceId: h,
@@ -13298,7 +13303,7 @@ function Nh({
13298
13303
  }, []), P = be(() => {
13299
13304
  const I = y.current;
13300
13305
  if (!I) return;
13301
- const q = I.getBoundingClientRect(), ne = Math.max(q.width, lb[a]), M = Math.min(Math.max(t.length, 1) * 38 + 12, 260), H = window.innerHeight - q.bottom, ce = H < M && q.top > H, R = Math.min(
13306
+ const q = I.getBoundingClientRect(), ne = Math.max(q.width, lb[a]), M = Math.min(Math.max(t.length, 1) * 38 + 12, 260), F = window.innerHeight - q.bottom, ce = F < M && q.top > F, R = Math.min(
13302
13307
  Math.max(8, q.left + q.width / 2 - ne / 2),
13303
13308
  window.innerWidth - ne - 8
13304
13309
  );
@@ -13324,9 +13329,9 @@ function Nh({
13324
13329
  }, [x, t, P, e]), me(() => {
13325
13330
  if (!x) return;
13326
13331
  function I(q) {
13327
- var M, H;
13332
+ var M, F;
13328
13333
  const ne = q.target;
13329
- !((M = y.current) != null && M.contains(ne)) && !((H = $.current) != null && H.contains(ne)) && Y();
13334
+ !((M = y.current) != null && M.contains(ne)) && !((F = $.current) != null && F.contains(ne)) && Y();
13330
13335
  }
13331
13336
  return document.addEventListener("mousedown", I), () => document.removeEventListener("mousedown", I);
13332
13337
  }, [Y, x]), me(() => {
@@ -13394,7 +13399,7 @@ function Nh({
13394
13399
  overscrollBehavior: "contain"
13395
13400
  },
13396
13401
  children: t.map((I, q) => {
13397
- const ne = I.value === e, M = q === S, H = {
13402
+ const ne = I.value === e, M = q === S, F = {
13398
13403
  ...I.tone ? Hl[I.tone] : void 0,
13399
13404
  ...I.style
13400
13405
  };
@@ -13416,9 +13421,9 @@ function Nh({
13416
13421
  m
13417
13422
  ),
13418
13423
  style: {
13419
- ...ne ? H : void 0,
13420
- background: ne ? H.background ?? "color-mix(in srgb, var(--primary) 12%, transparent)" : M ? "var(--bg-hover)" : "transparent",
13421
- color: ne ? H.color ?? "var(--primary)" : "var(--text-main)"
13424
+ ...ne ? F : void 0,
13425
+ background: ne ? F.background ?? "color-mix(in srgb, var(--primary) 12%, transparent)" : M ? "var(--bg-hover)" : "transparent",
13426
+ color: ne ? F.color ?? "var(--primary)" : "var(--text-main)"
13422
13427
  },
13423
13428
  children: [
13424
13429
  /* @__PURE__ */ r("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center", children: ne ? /* @__PURE__ */ r(Pt, { className: "h-4 w-4" }) : null }),
@@ -13621,7 +13626,7 @@ function Eh({
13621
13626
  return v >= 0 && v < Q;
13622
13627
  });
13623
13628
  D(J), Q >= 0 && _ > Q && Y(E);
13624
- }, M = () => _ <= 0 ? !1 : I(e[_ - 1].id), H = () => {
13629
+ }, M = () => _ <= 0 ? !1 : I(e[_ - 1].id), F = () => {
13625
13630
  const E = e[_ + 1];
13626
13631
  return E ? I(E.id) : !1;
13627
13632
  }, ce = {
@@ -13633,7 +13638,7 @@ function Eh({
13633
13638
  completeStep: q,
13634
13639
  uncompleteStep: ne,
13635
13640
  goToStep: I,
13636
- goNext: H,
13641
+ goNext: F,
13637
13642
  goPrevious: M
13638
13643
  };
13639
13644
  if (!j) return null;
@@ -13790,7 +13795,7 @@ function Eh({
13790
13795
  padding: "0 14px",
13791
13796
  icon: /* @__PURE__ */ r(qt, {}),
13792
13797
  disabled: !R || !K,
13793
- onClick: H,
13798
+ onClick: F,
13794
13799
  children: R && !K ? m : f
13795
13800
  }
13796
13801
  )
@@ -13827,7 +13832,7 @@ function Pl(e, t) {
13827
13832
  const { lineHeight: n, paddingY: a, borderY: o } = ub(e);
13828
13833
  return Math.ceil(t * n + a + o);
13829
13834
  }
13830
- const mb = Go(
13835
+ const mb = Zo(
13831
13836
  function({
13832
13837
  className: t = "",
13833
13838
  size: n = "md",
@@ -13892,7 +13897,7 @@ function Sh({
13892
13897
  ...u
13893
13898
  }) {
13894
13899
  return /* @__PURE__ */ r(
13895
- ci,
13900
+ di,
13896
13901
  {
13897
13902
  label: e,
13898
13903
  required: l,
@@ -13935,7 +13940,7 @@ function pb(e, t) {
13935
13940
  function hb(e, t) {
13936
13941
  return e !== void 0 ? String(e).length : t !== void 0 ? String(t).length : 0;
13937
13942
  }
13938
- const gb = Go(
13943
+ const gb = Zo(
13939
13944
  function({
13940
13945
  className: t = "",
13941
13946
  wrapperClassName: n = "",
@@ -14007,7 +14012,7 @@ function Ch({
14007
14012
  ...u
14008
14013
  }) {
14009
14014
  return /* @__PURE__ */ r(
14010
- ci,
14015
+ di,
14011
14016
  {
14012
14017
  label: e,
14013
14018
  required: l,
@@ -14050,7 +14055,7 @@ function xb(e) {
14050
14055
  return zl[e % zl.length];
14051
14056
  }
14052
14057
  let vb = 0;
14053
- function Mo() {
14058
+ function Ao() {
14054
14059
  return ++vb;
14055
14060
  }
14056
14061
  function jl(e, t) {
@@ -14088,7 +14093,7 @@ function $h({
14088
14093
  }) {
14089
14094
  const w = e !== void 0, g = !!h, A = !!f && m === "tooltip" && !g, [S, T] = z(
14090
14095
  () => (t ?? []).map((Z, v) => ({
14091
- id: Mo(),
14096
+ id: Ao(),
14092
14097
  value: Z.trim(),
14093
14098
  colorIndex: v
14094
14099
  }))
@@ -14096,7 +14101,7 @@ function $h({
14096
14101
  me(() => {
14097
14102
  w && T((Z) => {
14098
14103
  const v = e ?? [], N = new Map(Z.map((ee) => [ee.value, ee]));
14099
- return v.map((ee, ue) => N.get(ee) ?? { id: Mo(), value: ee, colorIndex: ue });
14104
+ return v.map((ee, ue) => N.get(ee) ?? { id: Ao(), value: ee, colorIndex: ue });
14100
14105
  });
14101
14106
  }, [w, e]);
14102
14107
  const O = S, [C, y] = z(""), [$, k] = z(null), [_, j] = z(""), [U, D] = z(!1), [Y, P] = z(!1), le = oe(null), G = oe(null), fe = oe(null);
@@ -14115,7 +14120,7 @@ function $h({
14115
14120
  ee = !0;
14116
14121
  break;
14117
14122
  }
14118
- if (!d && v.some((xe) => xe.value.toLowerCase() === te.toLowerCase())) {
14123
+ if (!d && v.some((ve) => ve.value.toLowerCase() === te.toLowerCase())) {
14119
14124
  ee = !0;
14120
14125
  continue;
14121
14126
  }
@@ -14125,7 +14130,7 @@ function $h({
14125
14130
  }
14126
14131
  v = [
14127
14132
  ...v,
14128
- { id: Mo(), value: te, colorIndex: v.length }
14133
+ { id: Ao(), value: te, colorIndex: v.length }
14129
14134
  ], N = !0;
14130
14135
  }
14131
14136
  }
@@ -14134,14 +14139,14 @@ function $h({
14134
14139
  function M(Z) {
14135
14140
  return ne([Z]);
14136
14141
  }
14137
- function H(Z) {
14142
+ function F(Z) {
14138
14143
  const v = O.filter((N) => N.id !== Z);
14139
14144
  q(v.map((N, ee) => ({ ...N, colorIndex: ee })));
14140
14145
  }
14141
14146
  function ce(Z, v) {
14142
14147
  const N = v.trim();
14143
14148
  if (k(null), j(""), !N) {
14144
- H(Z);
14149
+ F(Z);
14145
14150
  return;
14146
14151
  }
14147
14152
  if (!(!d && O.some(
@@ -14168,7 +14173,7 @@ function $h({
14168
14173
  if (Z.key === "Backspace" && C === "" && O.length > 0) {
14169
14174
  Z.preventDefault();
14170
14175
  const v = O[O.length - 1];
14171
- H(v.id);
14176
+ F(v.id);
14172
14177
  }
14173
14178
  }
14174
14179
  function K(Z, v) {
@@ -14288,7 +14293,7 @@ function $h({
14288
14293
  disabled: o,
14289
14294
  tabIndex: -1,
14290
14295
  onClick: (N) => {
14291
- N.stopPropagation(), H(Z.id);
14296
+ N.stopPropagation(), F(Z.id);
14292
14297
  },
14293
14298
  className: "flex h-4 w-4 flex-shrink-0 items-center justify-center rounded opacity-60 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none",
14294
14299
  children: /* @__PURE__ */ r(ot, { className: "h-3.5 w-3.5" })
@@ -14330,7 +14335,7 @@ const Nb = /^(\d{1,2}):(\d{2})(?::(\d{2}))?$/;
14330
14335
  function at(e) {
14331
14336
  return String(e).padStart(2, "0");
14332
14337
  }
14333
- function Ko(e, t = Xr()) {
14338
+ function Xo(e, t = Xr()) {
14334
14339
  const n = e.trim();
14335
14340
  if (!n) return t;
14336
14341
  const a = n.match(Nb);
@@ -14360,7 +14365,7 @@ function yn(e) {
14360
14365
  };
14361
14366
  }
14362
14367
  function kb(e, t) {
14363
- const n = (t == null ? void 0 : t.use12Hour) ?? !1, a = (t == null ? void 0 : t.showSeconds) ?? !0, o = Ko(e);
14368
+ const n = (t == null ? void 0 : t.use12Hour) ?? !1, a = (t == null ? void 0 : t.showSeconds) ?? !0, o = Xo(e);
14364
14369
  if (n) {
14365
14370
  const i = wa(o), l = `${i.hour12}:${at(i.minute)}`;
14366
14371
  return `${a ? `${l}:${at(i.second)}` : l} ${i.meridiem}`;
@@ -14378,12 +14383,12 @@ function Xr() {
14378
14383
  function Eb(e = !0) {
14379
14384
  return Mn(Xr(), e);
14380
14385
  }
14381
- function Ao(e, t) {
14386
+ function Lo(e, t) {
14382
14387
  const n = [];
14383
14388
  for (let a = e; a <= t; a += 1) n.push(a);
14384
14389
  return n;
14385
14390
  }
14386
- const Dt = 36, mi = 5, Wl = Math.floor(mi / 2), Sb = 52, Cb = 48, ar = 18;
14391
+ const Dt = 36, fi = 5, Wl = Math.floor(fi / 2), Sb = 52, Cb = 48, ar = 18;
14387
14392
  function ql(e) {
14388
14393
  return e * Dt;
14389
14394
  }
@@ -14508,7 +14513,7 @@ function ga({
14508
14513
  w.current = window.setTimeout(() => {
14509
14514
  R === a.current && fe();
14510
14515
  }, 100);
14511
- }, q = "absolute left-0 right-0 z-40 flex items-center justify-center border-0 bg-transparent p-0 transition-opacity duration-150 hover:opacity-80 focus:outline-none", ne = Dt * mi, M = ne + ar * 2, H = y !== "" ? y : null, ce = H !== null;
14516
+ }, q = "absolute left-0 right-0 z-40 flex items-center justify-center border-0 bg-transparent p-0 transition-opacity duration-150 hover:opacity-80 focus:outline-none", ne = Dt * fi, M = ne + ar * 2, F = y !== "" ? y : null, ce = F !== null;
14512
14517
  return /* @__PURE__ */ c(
14513
14518
  "div",
14514
14519
  {
@@ -14516,7 +14521,7 @@ function ga({
14516
14521
  role: "spinbutton",
14517
14522
  tabIndex: u ? 0 : -1,
14518
14523
  "aria-label": l,
14519
- "aria-valuetext": H ?? t,
14524
+ "aria-valuetext": F ?? t,
14520
14525
  "aria-valuenow": d ? void 0 : Number(t),
14521
14526
  onFocus: b,
14522
14527
  onMouseDown: () => b == null ? void 0 : b(),
@@ -14590,7 +14595,7 @@ function ga({
14590
14595
  })
14591
14596
  }
14592
14597
  ),
14593
- H !== null ? /* @__PURE__ */ r(
14598
+ F !== null ? /* @__PURE__ */ r(
14594
14599
  "div",
14595
14600
  {
14596
14601
  className: "pointer-events-none absolute inset-x-0 z-50 flex items-center justify-center tabular-nums font-semibold leading-none",
@@ -14601,7 +14606,7 @@ function ga({
14601
14606
  fontSize: 16,
14602
14607
  background: "var(--bg-card)"
14603
14608
  },
14604
- children: H
14609
+ children: F
14605
14610
  }
14606
14611
  ) : null,
14607
14612
  /* @__PURE__ */ r(
@@ -14652,7 +14657,7 @@ function Tb({
14652
14657
  onConfirm: d,
14653
14658
  className: u = ""
14654
14659
  }) {
14655
- const b = l === "popover", f = b || !d, m = $b({ use12Hour: n, hour12: a }), h = oe(e), x = Ko(e, Xr()), w = wa(x), [g, A] = z(
14660
+ const b = l === "popover", f = b || !d, m = $b({ use12Hour: n, hour12: a }), h = oe(e), x = Xo(e, Xr()), w = wa(x), [g, A] = z(
14656
14661
  at(m ? w.hour12 : x.hour24)
14657
14662
  ), [S, T] = z(at(x.minute)), [O, C] = z(at(x.second)), [y, $] = z(w.meridiem), [k, _] = z(0), j = oe(0), U = oe(!1), D = oe({
14658
14663
  hour: null,
@@ -14664,8 +14669,8 @@ function Tb({
14664
14669
  return o && te.push("second"), m && te.push("meridiem"), te;
14665
14670
  }, [m, o]), G = be(
14666
14671
  (te) => {
14667
- P((xe) => {
14668
- const Ce = le.indexOf(xe);
14672
+ P((ve) => {
14673
+ const Ce = le.indexOf(ve);
14669
14674
  return le[(Ce + te + le.length) % le.length];
14670
14675
  });
14671
14676
  },
@@ -14680,16 +14685,16 @@ function Tb({
14680
14685
  }, []), me(() => {
14681
14686
  if (e === h.current) return;
14682
14687
  h.current = e;
14683
- const te = Ko(e, Xr()), xe = wa(te);
14684
- A(at(m ? xe.hour12 : te.hour24)), T(at(te.minute)), C(at(te.second)), $(xe.meridiem);
14688
+ const te = Xo(e, Xr()), ve = wa(te);
14689
+ A(at(m ? ve.hour12 : te.hour24)), T(at(te.minute)), C(at(te.second)), $(ve.meridiem);
14685
14690
  }, [m, e]);
14686
14691
  const fe = Re(
14687
- () => (m ? Ao(1, 12) : Ao(0, 23)).map(
14692
+ () => (m ? Lo(1, 12) : Lo(0, 23)).map(
14688
14693
  (te) => at(te)
14689
14694
  ),
14690
14695
  [m]
14691
14696
  ), I = Re(
14692
- () => Ao(0, 59).map((te) => at(te)),
14697
+ () => Lo(0, 59).map((te) => at(te)),
14693
14698
  []
14694
14699
  ), q = I, ne = Re(() => ["AM", "PM"], []), M = be(() => m ? yn({
14695
14700
  hour12: Number(g),
@@ -14700,17 +14705,17 @@ function Tb({
14700
14705
  hour24: Number(g),
14701
14706
  minute: Number(S),
14702
14707
  second: Number(O)
14703
- }, [g, m, y, S, O]), H = be(
14708
+ }, [g, m, y, S, O]), F = be(
14704
14709
  (te) => {
14705
14710
  if (U.current) return;
14706
- const xe = Mn(te, o);
14707
- h.current = xe, t(xe);
14711
+ const ve = Mn(te, o);
14712
+ h.current = ve, t(ve);
14708
14713
  },
14709
14714
  [t, o]
14710
14715
  ), ce = be(() => {
14711
- H(M());
14712
- }, [M, H]), R = (te) => {
14713
- A(te), f && H(
14716
+ F(M());
14717
+ }, [M, F]), R = (te) => {
14718
+ A(te), f && F(
14714
14719
  m ? yn({
14715
14720
  hour12: Number(te),
14716
14721
  minute: Number(S),
@@ -14723,7 +14728,7 @@ function Tb({
14723
14728
  }
14724
14729
  );
14725
14730
  }, ae = (te) => {
14726
- T(te), f && H(
14731
+ T(te), f && F(
14727
14732
  m ? yn({
14728
14733
  hour12: Number(g),
14729
14734
  minute: Number(te),
@@ -14736,7 +14741,7 @@ function Tb({
14736
14741
  }
14737
14742
  );
14738
14743
  }, K = (te) => {
14739
- C(te), f && H(
14744
+ C(te), f && F(
14740
14745
  m ? yn({
14741
14746
  hour12: Number(g),
14742
14747
  minute: Number(S),
@@ -14749,7 +14754,7 @@ function Tb({
14749
14754
  }
14750
14755
  );
14751
14756
  }, W = (te) => {
14752
- $(te), f && H(
14757
+ $(te), f && F(
14753
14758
  yn({
14754
14759
  hour12: Number(g),
14755
14760
  minute: Number(S),
@@ -14759,8 +14764,8 @@ function Tb({
14759
14764
  );
14760
14765
  }, ie = be(() => (j.current += 1, _(j.current), j.current), []), E = be(
14761
14766
  (te) => {
14762
- const xe = wa(te), Ce = Mn(te, o);
14763
- h.current = Ce, A(at(m ? xe.hour12 : te.hour24)), T(at(te.minute)), C(at(te.second)), $(xe.meridiem), t(Ce);
14767
+ const ve = wa(te), Ce = Mn(te, o);
14768
+ h.current = Ce, A(at(m ? ve.hour12 : te.hour24)), T(at(te.minute)), C(at(te.second)), $(ve.meridiem), t(Ce);
14764
14769
  },
14765
14770
  [m, t, o]
14766
14771
  ), Q = () => {
@@ -14770,7 +14775,7 @@ function Tb({
14770
14775
  });
14771
14776
  }, J = () => {
14772
14777
  ce(), d == null || d();
14773
- }, Z = Dt * mi, v = Z + ar * 2, N = ar + Z / 2 - Dt / 2, ee = /* @__PURE__ */ r("div", { className: "relative px-4 py-2", children: /* @__PURE__ */ c(
14778
+ }, Z = Dt * fi, v = Z + ar * 2, N = ar + Z / 2 - Dt / 2, ee = /* @__PURE__ */ r("div", { className: "relative px-4 py-2", children: /* @__PURE__ */ c(
14774
14779
  "div",
14775
14780
  {
14776
14781
  className: "relative mx-auto",
@@ -15023,7 +15028,7 @@ function Th({
15023
15028
  },
15024
15029
  children: [
15025
15030
  /* @__PURE__ */ c("span", { className: "inline-flex min-w-0 items-center gap-2", children: [
15026
- /* @__PURE__ */ r(Io, { className: "h-4 w-4 shrink-0 text-[var(--text-muted)]" }),
15031
+ /* @__PURE__ */ r(_o, { className: "h-4 w-4 shrink-0 text-[var(--text-muted)]" }),
15027
15032
  /* @__PURE__ */ r("span", { className: "truncate", children: k || s })
15028
15033
  ] }),
15029
15034
  A ? /* @__PURE__ */ r(
@@ -15047,7 +15052,7 @@ function Th({
15047
15052
  }
15048
15053
  );
15049
15054
  return /* @__PURE__ */ r(
15050
- ci,
15055
+ di,
15051
15056
  {
15052
15057
  label: e,
15053
15058
  required: b,
@@ -15172,7 +15177,7 @@ function Ob() {
15172
15177
  const n = () => {
15173
15178
  t = 0, document.querySelectorAll(Yl).forEach((i) => {
15174
15179
  if (!(i instanceof HTMLElement)) return;
15175
- if (fo(i)) {
15180
+ if (bo(i)) {
15176
15181
  Kl(i);
15177
15182
  return;
15178
15183
  }
@@ -15183,13 +15188,13 @@ function Ob() {
15183
15188
  autoHide: "leave",
15184
15189
  autoHideDelay: 180
15185
15190
  }
15186
- }, d = Rb(i), u = d ? fo(
15191
+ }, d = Rb(i), u = d ? bo(
15187
15192
  {
15188
15193
  target: i,
15189
15194
  elements: { viewport: d }
15190
15195
  },
15191
15196
  s
15192
- ) : fo(i, s);
15197
+ ) : bo(i, s);
15193
15198
  Kl(i), e.set(i, u);
15194
15199
  });
15195
15200
  }, a = () => {
@@ -15262,7 +15267,7 @@ function Bb(e) {
15262
15267
  "chat-widget"
15263
15268
  ])).has(a[0].toLowerCase()) ? "" : gr(`/${a[0]}`);
15264
15269
  }
15265
- const Lo = "primeSuiteAppUrl", Ib = {
15270
+ const Do = "primeSuiteAppUrl", Ib = {
15266
15271
  xs: { wh: "w-5 h-5", text: "text-[8px]" },
15267
15272
  sm: { wh: "w-7 h-7", text: "text-[11px]" },
15268
15273
  md: { wh: "w-9 h-9", text: "text-sm" },
@@ -15308,9 +15313,9 @@ function zb(e) {
15308
15313
  if (t) return t;
15309
15314
  if (typeof window > "u") return "";
15310
15315
  try {
15311
- const l = new URLSearchParams(window.location.search).get(Lo) || "";
15312
- l && window.sessionStorage.setItem(Lo, l);
15313
- const s = window.sessionStorage.getItem(Lo) || "", d = l || s;
15316
+ const l = new URLSearchParams(window.location.search).get(Do) || "";
15317
+ l && window.sessionStorage.setItem(Do, l);
15318
+ const s = window.sessionStorage.getItem(Do) || "", d = l || s;
15314
15319
  if (d) {
15315
15320
  const u = Xl(d);
15316
15321
  if (u && !/^\/admin(\/|$)/i.test(u)) return u;
@@ -15584,7 +15589,7 @@ const Jl = "bonsaif-ui:prime-auth-sso", Gb = {
15584
15589
  "email-inbox": "Buzones",
15585
15590
  "security-incidents": "Incidentes",
15586
15591
  "guard-schedule": "Guardias"
15587
- }, Do = {
15592
+ }, Ro = {
15588
15593
  dashboard: /* @__PURE__ */ r(_d, { className: "h-5 w-5" }),
15589
15594
  tickets: /* @__PURE__ */ r(Id, { className: "h-5 w-5" }),
15590
15595
  teams: /* @__PURE__ */ r(Yi, { className: "h-5 w-5" }),
@@ -15595,17 +15600,17 @@ const Jl = "bonsaif-ui:prime-auth-sso", Gb = {
15595
15600
  settings: /* @__PURE__ */ r(Ea, { className: "h-5 w-5" }),
15596
15601
  notifications: /* @__PURE__ */ r(Ld, { className: "h-5 w-5" }),
15597
15602
  changelog: /* @__PURE__ */ r(ds, { className: "h-5 w-5" }),
15598
- admin: /* @__PURE__ */ r(mo, { className: "h-5 w-5" }),
15603
+ admin: /* @__PURE__ */ r(fo, { className: "h-5 w-5" }),
15599
15604
  users: /* @__PURE__ */ r(Yi, { className: "h-5 w-5" }),
15600
- roles: /* @__PURE__ */ r(mo, { className: "h-5 w-5" }),
15605
+ roles: /* @__PURE__ */ r(fo, { className: "h-5 w-5" }),
15601
15606
  menus: /* @__PURE__ */ r(Ea, { className: "h-5 w-5" }),
15602
15607
  guards: /* @__PURE__ */ r(pr, { className: "h-5 w-5" }),
15603
15608
  vacations: /* @__PURE__ */ r(pr, { className: "h-5 w-5" }),
15604
- audit: /* @__PURE__ */ r(_o, { className: "h-5 w-5" }),
15609
+ audit: /* @__PURE__ */ r(Fo, { className: "h-5 w-5" }),
15605
15610
  positions: /* @__PURE__ */ r(Ad, { className: "h-5 w-5" }),
15606
- ranks: /* @__PURE__ */ r(_o, { className: "h-5 w-5" }),
15611
+ ranks: /* @__PURE__ */ r(Fo, { className: "h-5 w-5" }),
15607
15612
  "email-inbox": /* @__PURE__ */ r(ms, { className: "h-5 w-5" }),
15608
- "security-incidents": /* @__PURE__ */ r(mo, { className: "h-5 w-5" })
15613
+ "security-incidents": /* @__PURE__ */ r(fo, { className: "h-5 w-5" })
15609
15614
  };
15610
15615
  function Zb(e) {
15611
15616
  return e.split("-").map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join(" ");
@@ -15620,7 +15625,7 @@ function Jb(e) {
15620
15625
  const n = decodeURIComponent(t[t.length - 1]), a = t.length > 1 ? decodeURIComponent(t[t.length - 2]) : void 0, o = Qb(n) && a ? a : n, i = Gb[o] ?? Zb(o);
15621
15626
  return [{ label: "Inicio", href: "/" }, { label: i }];
15622
15627
  }
15623
- function Ro(e) {
15628
+ function Oo(e) {
15624
15629
  return (e == null ? void 0 : e.querySelector(":scope > .os-viewport")) ?? (e == null ? void 0 : e.querySelector(
15625
15630
  ":scope > [data-overlayscrollbars-viewport]"
15626
15631
  ));
@@ -15628,9 +15633,9 @@ function Ro(e) {
15628
15633
  function ep(e) {
15629
15634
  const t = e.split("/").filter(Boolean), n = t[t.length - 1];
15630
15635
  if (!n) return /* @__PURE__ */ r(Sa, { className: "h-5 w-5" });
15631
- if (Do[n]) return Do[n];
15636
+ if (Ro[n]) return Ro[n];
15632
15637
  const a = t.length > 1 ? t[t.length - 2] : "";
15633
- return Do[a] ?? /* @__PURE__ */ r(Sa, { className: "h-5 w-5" });
15638
+ return Ro[a] ?? /* @__PURE__ */ r(Sa, { className: "h-5 w-5" });
15634
15639
  }
15635
15640
  function tp(e) {
15636
15641
  return e.includes("primeAuthOrigin") || e.includes("primeAuthProjectKey");
@@ -15680,7 +15685,7 @@ function Ah({
15680
15685
  );
15681
15686
  return (G == null ? void 0 : G.closest(".os-viewport")) ?? (G == null ? void 0 : G.closest(
15682
15687
  "[data-overlayscrollbars-viewport]"
15683
- )) ?? Ro(fe) ?? fe ?? window;
15688
+ )) ?? Oo(fe) ?? fe ?? window;
15684
15689
  }, P = () => {
15685
15690
  const G = j && j !== window ? j.scrollTop : window.scrollY;
15686
15691
  h((fe) => fe ? G > 24 : G > 72);
@@ -15699,12 +15704,12 @@ function Ah({
15699
15704
  const U = [], D = () => {
15700
15705
  const q = f.current, ne = q == null ? void 0 : q.parentElement, M = document.querySelector(
15701
15706
  "[data-app-scroll='true']"
15702
- ), H = Ro(M) ?? M;
15703
- if (!q || !ne || !H) {
15707
+ ), F = Oo(M) ?? M;
15708
+ if (!q || !ne || !F) {
15704
15709
  T(null);
15705
15710
  return;
15706
15711
  }
15707
- const ce = ne.getBoundingClientRect(), R = window.getComputedStyle(ne), ae = H.getBoundingClientRect(), K = H instanceof HTMLElement && H.clientWidth > 0 ? H.clientWidth : ae.width, W = ce.left + parseFloat(R.paddingLeft || "0"), ie = {
15712
+ const ce = ne.getBoundingClientRect(), R = window.getComputedStyle(ne), ae = F.getBoundingClientRect(), K = F instanceof HTMLElement && F.clientWidth > 0 ? F.clientWidth : ae.width, W = ce.left + parseFloat(R.paddingLeft || "0"), ie = {
15708
15713
  marginLeft: Math.round(ae.left - W),
15709
15714
  width: Math.round(K)
15710
15715
  };
@@ -15717,7 +15722,7 @@ function Ah({
15717
15722
  Y(), window.addEventListener("resize", Y);
15718
15723
  const P = new ResizeObserver(Y), le = f.current, G = le == null ? void 0 : le.parentElement, fe = document.querySelector(
15719
15724
  "[data-app-scroll='true']"
15720
- ), I = Ro(fe) ?? fe;
15725
+ ), I = Oo(fe) ?? fe;
15721
15726
  return [G, fe, I].forEach((q) => {
15722
15727
  q && P.observe(q);
15723
15728
  }), U.push(window.setTimeout(Y, 120)), U.push(window.setTimeout(Y, 280)), () => {
@@ -16064,16 +16069,16 @@ function an(e) {
16064
16069
  const t = typeof e == "number" ? e : Number(e);
16065
16070
  return Number.isFinite(t) ? t : null;
16066
16071
  }
16067
- const Oo = {
16072
+ const Bo = {
16068
16073
  warning: 70,
16069
16074
  danger: 90
16070
16075
  };
16071
- function fi(e, t = Oo) {
16072
- const n = t.warning ?? Oo.warning, a = t.danger ?? Oo.danger;
16076
+ function bi(e, t = Bo) {
16077
+ const n = t.warning ?? Bo.warning, a = t.danger ?? Bo.danger;
16073
16078
  return e >= a ? "danger" : e >= n ? "warning" : e <= 0 ? "primary" : "success";
16074
16079
  }
16075
16080
  function Ba(e, t) {
16076
- return or(fi(e, t));
16081
+ return or(bi(e, t));
16077
16082
  }
16078
16083
  function An(e, t = 0) {
16079
16084
  return Number.isFinite(e) ? `${e.toFixed(t)}%` : "—";
@@ -16511,7 +16516,7 @@ function Ih({
16511
16516
  }
16512
16517
  );
16513
16518
  }
16514
- function bi({
16519
+ function pi({
16515
16520
  data: e,
16516
16521
  xKey: t,
16517
16522
  series: n,
@@ -17664,7 +17669,7 @@ function Wh({
17664
17669
  }
17665
17670
  );
17666
17671
  }
17667
- const Vr = 135 * Math.PI / 180, Bo = 270 * Math.PI / 180;
17672
+ const Vr = 135 * Math.PI / 180, Io = 270 * Math.PI / 180;
17668
17673
  function qh({
17669
17674
  value: e,
17670
17675
  min: t = 0,
@@ -17700,13 +17705,13 @@ function qh({
17700
17705
  let fe = 0, I = 0;
17701
17706
  C((M) => (I = M, M));
17702
17707
  const q = performance.now(), ne = (M) => {
17703
- const H = Math.min(1, (M - q) / x), ce = 1 - (1 - H) ** 3;
17704
- C(I + (T - I) * ce), H < 1 && (fe = requestAnimationFrame(ne));
17708
+ const F = Math.min(1, (M - q) / x), ce = 1 - (1 - F) ** 3;
17709
+ C(I + (T - I) * ce), F < 1 && (fe = requestAnimationFrame(ne));
17705
17710
  };
17706
17711
  return fe = requestAnimationFrame(ne), () => cancelAnimationFrame(fe);
17707
17712
  }, [T, x, i, l]), i) return /* @__PURE__ */ r(Ot, { height: a });
17708
17713
  if (l) return /* @__PURE__ */ r(Bt, { height: a, text: s });
17709
- const y = 100, $ = 108, k = 72, _ = f ?? xp(e, n, b, m), j = t + O * S, U = ss(y, $, k, Vr, Vr + Bo), D = Vr + Math.max(1e-3, O) * Bo, Y = ss(y, $, k, Vr, D), P = Ia(y, $, k, Vr), le = Ia(y, $, k, Vr + Bo);
17714
+ const y = 100, $ = 108, k = 72, _ = f ?? xp(e, n, b, m), j = t + O * S, U = ss(y, $, k, Vr, Vr + Io), D = Vr + Math.max(1e-3, O) * Io, Y = ss(y, $, k, Vr, D), P = Ia(y, $, k, Vr), le = Ia(y, $, k, Vr + Io);
17710
17715
  return /* @__PURE__ */ r(
17711
17716
  "div",
17712
17717
  {
@@ -18049,7 +18054,7 @@ function Vh({
18049
18054
  ], g = t ?? Zr(e, a) ?? Zr(e, ((C = w[0]) == null ? void 0 : C.key) ?? a), A = !d && (!e.length || g === null);
18050
18055
  if (d) return /* @__PURE__ */ r(Ot, { height: l });
18051
18056
  if (A) return /* @__PURE__ */ r(Bt, { height: l, text: u });
18052
- const S = Math.min(100, Math.max(0, g ?? 0)), T = fi(S, m), O = Ba(S, m);
18057
+ const S = Math.min(100, Math.max(0, g ?? 0)), T = bi(S, m), O = Ba(S, m);
18053
18058
  return /* @__PURE__ */ c(
18054
18059
  "div",
18055
18060
  {
@@ -18083,7 +18088,7 @@ function Vh({
18083
18088
  )
18084
18089
  ] }),
18085
18090
  /* @__PURE__ */ r(
18086
- bi,
18091
+ pi,
18087
18092
  {
18088
18093
  data: e,
18089
18094
  xKey: n,
@@ -18125,7 +18130,7 @@ function Yh({
18125
18130
  const w = t > 0 ? t : 1, g = Math.min(100, Math.max(0, e / w * 100)), A = !d && !(Number.isFinite(e) && Number.isFinite(t) && t > 0);
18126
18131
  if (d) return /* @__PURE__ */ r(Ot, { height: l });
18127
18132
  if (A) return /* @__PURE__ */ r(Bt, { height: l, text: u });
18128
- const S = fi(g, m), T = Ba(g, m), O = Math.max(0, t - e), C = a.length > 0 ? Zr(a, i) ?? g : g, y = Ba(C, m), $ = b && a.length > 1 ? Math.max(100, l - 110) : 0;
18133
+ const S = bi(g, m), T = Ba(g, m), O = Math.max(0, t - e), C = a.length > 0 ? Zr(a, i) ?? g : g, y = Ba(C, m), $ = b && a.length > 1 ? Math.max(100, l - 110) : 0;
18129
18134
  return /* @__PURE__ */ c(
18130
18135
  "div",
18131
18136
  {
@@ -18215,7 +18220,7 @@ function Yh({
18215
18220
  )
18216
18221
  ] }),
18217
18222
  b && a.length > 1 ? /* @__PURE__ */ r(
18218
- bi,
18223
+ pi,
18219
18224
  {
18220
18225
  data: a,
18221
18226
  xKey: o,
@@ -18344,7 +18349,7 @@ function Kh({
18344
18349
  }
18345
18350
  ),
18346
18351
  /* @__PURE__ */ r("div", { className: "bonsaif-network-plot relative z-0", children: /* @__PURE__ */ r(
18347
- bi,
18352
+ pi,
18348
18353
  {
18349
18354
  data: e,
18350
18355
  xKey: t,
@@ -18462,7 +18467,7 @@ function Zh(e) {
18462
18467
  }
18463
18468
  export {
18464
18469
  Op as Alert,
18465
- bi as AreaChart,
18470
+ pi as AreaChart,
18466
18471
  Xb as AuthShell,
18467
18472
  mb as AutoGrowTextarea,
18468
18473
  Sh as AutoGrowTextareaField,
@@ -18474,7 +18479,7 @@ export {
18474
18479
  Oa as CHART_PALETTE,
18475
18480
  Bp as CalendarPicker,
18476
18481
  Bh as ChartCard,
18477
- Po as Checkbox,
18482
+ zo as Checkbox,
18478
18483
  jp as CodeBlock,
18479
18484
  zh as ComboChart,
18480
18485
  qp as CompactFilterSelect,
@@ -18491,13 +18496,13 @@ export {
18491
18496
  Zp as DropdownMenu,
18492
18497
  Rp as DynamicDetailTabs,
18493
18498
  sh as EmailField,
18494
- go as EmptyState,
18499
+ xo as EmptyState,
18495
18500
  zp as EventCalendar,
18496
18501
  Bn as FieldHelperFooter,
18497
18502
  On as FieldLabelInfo,
18498
18503
  dh as FieldLayoutEditor,
18499
18504
  ch as FileUpload,
18500
- ci as FormField,
18505
+ di as FormField,
18501
18506
  Wh as FunnelChart,
18502
18507
  qh as GaugeChart,
18503
18508
  Ob as GlobalScrollbars,
@@ -18530,10 +18535,10 @@ export {
18530
18535
  wh as StatusBadge,
18531
18536
  Nh as StatusSelect,
18532
18537
  Eh as StepWizard,
18533
- ti as TableSkeleton,
18538
+ ri as TableSkeleton,
18534
18539
  kh as Tabs,
18535
18540
  $h as TagInput,
18536
- vo as TextInput,
18541
+ yo as TextInput,
18537
18542
  gb as Textarea,
18538
18543
  Ch as TextareaField,
18539
18544
  Th as TimeField,
@@ -18561,7 +18566,7 @@ export {
18561
18566
  Da as ensureMentionChipTrailingSpaces,
18562
18567
  tc as extractMentionUsernames,
18563
18568
  xh as filterSelfMentions,
18564
- ni as filterWorkdays,
18569
+ ai as filterWorkdays,
18565
18570
  Gf as findMentionChipAfterCaret,
18566
18571
  Xf as findMentionChipBeforeCaret,
18567
18572
  Il as findMentionChipsInSelection,
@@ -18573,7 +18578,7 @@ export {
18573
18578
  tl as getDataTablePreferencesEndpoint,
18574
18579
  ac as getEditorPlainText,
18575
18580
  sl as getMonthGrid,
18576
- Vo as getPlainTextOffset,
18581
+ Yo as getPlainTextOffset,
18577
18582
  Ts as getWeekDays,
18578
18583
  Pu as getWorkWeekDays,
18579
18584
  Wu as groupItemsByDay,
@@ -18601,7 +18606,7 @@ export {
18601
18606
  nc as placeCaretAfterMentionChip,
18602
18607
  qf as placeCaretAtTextOffset,
18603
18608
  rc as preferredMentionSpacer,
18604
- $o as removeMentionChip,
18609
+ To as removeMentionChip,
18605
18610
  Jp as required,
18606
18611
  Fp as resetBonsaifUIConfig,
18607
18612
  gh as resolveMentions,
@@ -18613,13 +18618,13 @@ export {
18613
18618
  Yf as selectionIncludesNonChipText,
18614
18619
  ip as seriesColor,
18615
18620
  Hp as setBonsaifDataTablePreferencesEndpoint,
18616
- Yo as syncMentionChipSelectionHighlight,
18621
+ Ko as syncMentionChipSelectionHighlight,
18617
18622
  nr as toDateKey,
18618
18623
  Pp as toNearestWorkday,
18619
18624
  eg as toast,
18620
18625
  or as toneColor,
18621
18626
  Ba as usageColor,
18622
- fi as usageTone,
18627
+ bi as usageTone,
18623
18628
  Zh as useValidationVisibility,
18624
18629
  lh as validateForm
18625
18630
  };