bonsaif-ui 0.1.50 → 0.1.52

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,5 +1,5 @@
1
1
  "use client";
2
- import je, { useRef as le, useState as D, useEffect as Q, createContext as Do, useLayoutEffect as Bo, useContext as Oo, isValidElement as cn, Children as Io, useMemo as at, useCallback as we, forwardRef as ga, cloneElement as Ro, useId as Ho, useSyncExternalStore as jo } from "react";
2
+ import je, { useRef as le, useState as B, useEffect as Q, createContext as Do, useLayoutEffect as Bo, useContext as Oo, isValidElement as cn, Children as Io, useMemo as at, useCallback as we, forwardRef as ga, cloneElement as Ro, useId as Ho, useSyncExternalStore as jo } from "react";
3
3
  import { jsx as t, jsxs as l, Fragment as Re } from "react/jsx-runtime";
4
4
  import { HiMagnifyingGlass as xt, HiXMark as Ie, HiInformationCircle as rn, HiExclamationCircle as ya, HiExclamationTriangle as dn, HiCheckCircle as zo, HiChevronLeft as Tt, HiChevronDown as Xe, HiChevronRight as st, HiCalendarDays as nn, HiCheck as Ue, HiClipboardDocument as Fo, HiLink as wa, HiCog6Tooth as Sr, HiChevronUp as Yr, HiChevronUpDown as _o, HiFunnel as Po, HiEllipsisVertical as Wo, HiMinus as Na, HiTableCells as qo, HiDocumentText as ka, HiCommandLine as Uo, HiClock as qn, HiTrash as Ca, HiArrowDownTray as Ko, HiPencil as Vo, HiInbox as Sa, HiArrowUpTray as Yo, HiDocument as Go, HiH2 as Xo, HiH3 as Zo, HiArrowsPointingIn as Jo, HiArrowsPointingOut as Qo, HiArrowUturnLeft as el, HiArrowUturnRight as tl, HiListBullet as an, HiNumberedList as rl, HiArrowTurnUpLeft as nl, HiArrowTurnDownRight as al, HiBars3BottomLeft as ol, HiBars3CenterLeft as ll, HiBars3BottomRight as il, HiBars3 as Ea, HiLinkSlash as sl, HiPhoto as cl, HiOutlinePaintBrush as dl, HiNoSymbol as ul, HiLockClosed as ml, HiHome as Er, HiArrowRightOnRectangle as bl, HiShieldCheck as Gr, HiBriefcase as fl, HiUsers as Un, HiBell as pl, HiUser as hl, HiClipboardDocumentList as vl, HiBuildingOffice2 as xl, HiRectangleGroup as gl, HiTicket as yl, HiChartBar as wl } from "react-icons/hi2";
5
5
  import { createPortal as Ze } from "react-dom";
@@ -41,7 +41,7 @@ function El({
41
41
  size: m = "default",
42
42
  inputTabIndex: f
43
43
  }) {
44
- const p = le(null), [h, x] = D(!1), v = c || h || e.trim().length > 0, L = m === "sm" ? "h-9 rounded-md" : "h-10 rounded-lg", S = a || "w-48 max-w-full sm:w-64 lg:w-72";
44
+ const p = le(null), [h, x] = B(!1), v = c || h || e.trim().length > 0, T = m === "sm" ? "h-9 rounded-md" : "h-10 rounded-lg", S = a || "w-48 max-w-full sm:w-64 lg:w-72";
45
45
  Q(() => {
46
46
  var k;
47
47
  i && ((k = p.current) == null || k.focus());
@@ -81,7 +81,7 @@ function El({
81
81
  k.key === "Escape" && (u == null || u());
82
82
  },
83
83
  placeholder: v ? n : "Buscar",
84
- className: `${L} w-full py-0 text-sm leading-none placeholder:text-[var(--text-muted)] focus:outline-none transition-all duration-200 ${v ? "pl-9 pr-8" : "cursor-pointer pl-9 pr-3"}`,
84
+ className: `${T} w-full py-0 text-sm leading-none placeholder:text-[var(--text-muted)] focus:outline-none transition-all duration-200 ${v ? "pl-9 pr-8" : "cursor-pointer pl-9 pr-3"}`,
85
85
  style: {
86
86
  height: `var(--page-header-control-height, ${m === "sm" ? "36px" : "40px"})`,
87
87
  paddingLeft: "calc(var(--page-header-control-icon-left, 12px) + 24px)",
@@ -160,40 +160,40 @@ function Ut({
160
160
  tooltipStyle: h,
161
161
  as: x = "div"
162
162
  }) {
163
- const v = le(null), L = le(null), S = le(null), w = le(!1), [k, O] = D(null), [ee, z] = D("");
163
+ const v = le(null), T = le(null), S = le(null), w = le(!1), [k, O] = B(null), [ee, z] = B("");
164
164
  Q(() => {
165
- const E = v.current;
166
- E && (E.querySelectorAll("[title]").forEach((H) => {
167
- const U = H.getAttribute("title");
168
- U && (H.getAttribute("aria-label") || H.setAttribute("aria-label", U), H.removeAttribute("title"));
169
- }), E.querySelectorAll("svg title").forEach((H) => H.remove()));
165
+ const L = v.current;
166
+ L && (L.querySelectorAll("[title]").forEach((j) => {
167
+ const U = j.getAttribute("title");
168
+ U && (j.getAttribute("aria-label") || j.setAttribute("aria-label", U), j.removeAttribute("title"));
169
+ }), L.querySelectorAll("svg title").forEach((j) => j.remove()));
170
170
  }), Bo(() => {
171
171
  if (!k) return;
172
- const E = L.current;
173
- if (!E) return;
174
- const H = 12, U = 14, _ = E.getBoundingClientRect(), oe = window.innerWidth - _.width - H, W = window.innerHeight - _.height - H;
175
- let s = k.mouseX + U, g = k.mouseY + U, T, j;
172
+ const L = T.current;
173
+ if (!L) return;
174
+ const j = 12, U = 14, _ = L.getBoundingClientRect(), oe = window.innerWidth - _.width - j, W = window.innerHeight - _.height - j;
175
+ let s = k.mouseX + U, g = k.mouseY + U, E, R;
176
176
  if (!i && v.current) {
177
- const B = v.current.getBoundingClientRect(), ne = B.left + B.width / 2, ce = B.top + B.height / 2;
178
- c === "top" ? (s = ne - _.width / 2, g = B.top - _.height - U, j = _.height - 1) : c === "left" ? (s = B.left - _.width - U, g = ce - _.height / 2, T = _.width - 1) : c === "right" ? (s = B.right + U, g = ce - _.height / 2, T = -7) : (s = ne - _.width / 2, g = B.bottom + U, j = -7);
177
+ const D = v.current.getBoundingClientRect(), ne = D.left + D.width / 2, ce = D.top + D.height / 2;
178
+ c === "top" ? (s = ne - _.width / 2, g = D.top - _.height - U, R = _.height - 1) : c === "left" ? (s = D.left - _.width - U, g = ce - _.height / 2, E = _.width - 1) : c === "right" ? (s = D.right + U, g = ce - _.height / 2, E = -7) : (s = ne - _.width / 2, g = D.bottom + U, R = -7);
179
179
  }
180
- if (i && (s > oe && (s = k.mouseX - _.width - U), g > W && (g = k.mouseY - _.height - U)), s = Math.min(Math.max(H, s), Math.max(H, oe)), g = Math.min(Math.max(H, g), Math.max(H, W)), !i && v.current) {
181
- const B = v.current.getBoundingClientRect(), ne = B.left + B.width / 2, ce = B.top + B.height / 2;
182
- c === "top" || c === "bottom" ? T = Math.min(Math.max(14, ne - s), _.width - 14) : j = Math.min(Math.max(14, ce - g), _.height - 14);
180
+ if (i && (s > oe && (s = k.mouseX - _.width - U), g > W && (g = k.mouseY - _.height - U)), s = Math.min(Math.max(j, s), Math.max(j, oe)), g = Math.min(Math.max(j, g), Math.max(j, W)), !i && v.current) {
181
+ const D = v.current.getBoundingClientRect(), ne = D.left + D.width / 2, ce = D.top + D.height / 2;
182
+ c === "top" || c === "bottom" ? E = Math.min(Math.max(14, ne - s), _.width - 14) : R = Math.min(Math.max(14, ce - g), _.height - 14);
183
183
  }
184
- (Math.abs(s - k.x) > 0.5 || Math.abs(g - k.y) > 0.5 || T !== k.arrowX || j !== k.arrowY) && O(
185
- (B) => B && {
186
- ...B,
184
+ (Math.abs(s - k.x) > 0.5 || Math.abs(g - k.y) > 0.5 || E !== k.arrowX || R !== k.arrowY) && O(
185
+ (D) => D && {
186
+ ...D,
187
187
  x: s,
188
188
  y: g,
189
- arrowX: T,
190
- arrowY: j
189
+ arrowX: E,
190
+ arrowY: R
191
191
  }
192
192
  );
193
193
  }, [i, c, k]);
194
194
  const Y = () => {
195
195
  S.current && (window.clearTimeout(S.current), S.current = null);
196
- }, M = (E, H) => {
196
+ }, $ = (L, j) => {
197
197
  if (!$l() || w.current) return;
198
198
  const U = v.current;
199
199
  if (U && !hr(U)) {
@@ -202,13 +202,13 @@ function Ut({
202
202
  if (!_) return;
203
203
  z(_);
204
204
  }
205
- !n && !r || O({ mouseX: E, mouseY: H, x: E + 14, y: H + 14 });
205
+ !n && !r || O({ mouseX: L, mouseY: j, x: L + 14, y: j + 14 });
206
206
  }
207
207
  }, q = () => {
208
- const E = v.current;
209
- if (!E) return;
210
- const H = E.getBoundingClientRect();
211
- M(H.left + H.width / 2, H.bottom);
208
+ const L = v.current;
209
+ if (!L) return;
210
+ const j = L.getBoundingClientRect();
211
+ $(j.left + j.width / 2, j.bottom);
212
212
  }, Z = () => {
213
213
  Y(), O(null);
214
214
  }, te = () => {
@@ -228,10 +228,10 @@ function Ut({
228
228
  O(null);
229
229
  return;
230
230
  }
231
- const E = () => O(null), H = () => {
231
+ const L = () => O(null), j = () => {
232
232
  pr(), w.current = !0, O(null);
233
233
  };
234
- document.addEventListener("pointerdown", H, !0), document.addEventListener("click", H, !0), document.addEventListener("scroll", E, !0), window.addEventListener("blur", E), document.addEventListener("visibilitychange", E), document.addEventListener("keydown", E, !0);
234
+ document.addEventListener("pointerdown", j, !0), document.addEventListener("click", j, !0), document.addEventListener("scroll", L, !0), window.addEventListener("blur", L), document.addEventListener("visibilitychange", L), document.addEventListener("keydown", L, !0);
235
235
  const U = new MutationObserver(() => {
236
236
  hr(v.current) && O(null);
237
237
  });
@@ -241,16 +241,16 @@ function Ut({
241
241
  attributes: !0,
242
242
  attributeFilter: ["role", "aria-modal", "aria-hidden", "class"]
243
243
  }), () => {
244
- document.removeEventListener("pointerdown", H, !0), document.removeEventListener("click", H, !0), document.removeEventListener("scroll", E, !0), window.removeEventListener("blur", E), document.removeEventListener("visibilitychange", E), document.removeEventListener("keydown", E, !0), U.disconnect();
244
+ document.removeEventListener("pointerdown", j, !0), document.removeEventListener("click", j, !0), document.removeEventListener("scroll", L, !0), window.removeEventListener("blur", L), document.removeEventListener("visibilitychange", L), document.removeEventListener("keydown", L, !0), U.disconnect();
245
245
  };
246
246
  }, [k]), Q(() => {
247
- const E = () => pr(), H = () => {
247
+ const L = () => pr(), j = () => {
248
248
  pr(), w.current = !0, O(null);
249
249
  };
250
- return document.addEventListener("pointerdown", E, !0), document.addEventListener("click", E, !0), document.addEventListener("keydown", E, !0), window.addEventListener(Yn, H), () => {
251
- document.removeEventListener("pointerdown", E, !0), document.removeEventListener("click", E, !0), document.removeEventListener("keydown", E, !0), window.removeEventListener(
250
+ return document.addEventListener("pointerdown", L, !0), document.addEventListener("click", L, !0), document.addEventListener("keydown", L, !0), window.addEventListener(Yn, j), () => {
251
+ document.removeEventListener("pointerdown", L, !0), document.removeEventListener("click", L, !0), document.removeEventListener("keydown", L, !0), window.removeEventListener(
252
252
  Yn,
253
- H
253
+ j
254
254
  );
255
255
  };
256
256
  }, []);
@@ -259,16 +259,16 @@ function Ut({
259
259
  /* @__PURE__ */ t(
260
260
  x,
261
261
  {
262
- ref: (E) => {
263
- v.current = E;
262
+ ref: (L) => {
263
+ v.current = L;
264
264
  },
265
265
  className: m,
266
266
  style: p,
267
- onMouseEnter: (E) => {
268
- Y(), X(), i ? M(E.clientX, E.clientY) : q();
267
+ onMouseEnter: (L) => {
268
+ Y(), X(), i ? $(L.clientX, L.clientY) : q();
269
269
  },
270
- onMouseMove: (E) => {
271
- k && i && M(E.clientX, E.clientY);
270
+ onMouseMove: (L) => {
271
+ k && i && $(L.clientX, L.clientY);
272
272
  },
273
273
  onMouseDown: P,
274
274
  onClick: P,
@@ -284,7 +284,7 @@ function Ut({
284
284
  /* @__PURE__ */ l(
285
285
  "div",
286
286
  {
287
- ref: L,
287
+ ref: T,
288
288
  role: "tooltip",
289
289
  className: f,
290
290
  onMouseEnter: a ? Y : void 0,
@@ -385,7 +385,7 @@ function Be({
385
385
  style: x,
386
386
  ...v
387
387
  }) {
388
- const L = Oo($a), S = c ?? L.iconOnly ?? e === "icon", w = L.compact ?? !1, k = L.headerAction ?? !1, O = k && r === "md" ? "sm" : w && !k && r === "md" ? "xs" : r, ee = e === "icon" || S, z = k && ee, Y = on(f), M = i ?? v.title ?? v["aria-label"] ?? (S ? Y : void 0), q = M ? void 0 : v.title, Z = v["aria-label"] ?? (typeof M == "string" ? M : Y || void 0), te = n ? null : a ?? (S ? Il(f) : null), P = /* @__PURE__ */ l(
388
+ const T = Oo($a), S = c ?? T.iconOnly ?? e === "icon", w = T.compact ?? !1, k = T.headerAction ?? !1, O = k && r === "md" ? "sm" : w && !k && r === "md" ? "xs" : r, ee = e === "icon" || S, z = k && ee, Y = on(f), $ = i ?? v.title ?? v["aria-label"] ?? (S ? Y : void 0), q = $ ? void 0 : v.title, Z = v["aria-label"] ?? (typeof $ == "string" ? $ : Y || void 0), te = n ? null : a ?? (S ? Il(f) : null), P = /* @__PURE__ */ l(
389
389
  "button",
390
390
  {
391
391
  ...v,
@@ -420,11 +420,11 @@ function Be({
420
420
  ]
421
421
  }
422
422
  );
423
- return M ? /* @__PURE__ */ t(
423
+ return $ ? /* @__PURE__ */ t(
424
424
  Ut,
425
425
  {
426
426
  as: "span",
427
- content: M,
427
+ content: $,
428
428
  className: "inline-flex shrink-0",
429
429
  children: P
430
430
  }
@@ -572,7 +572,7 @@ function Ks({
572
572
  onActiveServiceChange: h,
573
573
  canAccess: x,
574
574
  keepAlive: v = !0,
575
- title: L,
575
+ title: T,
576
576
  subtitle: S,
577
577
  emptyState: w,
578
578
  loadingState: k,
@@ -580,15 +580,15 @@ function Ks({
580
580
  renderTabLabel: ee,
581
581
  searchableTabs: z = "auto",
582
582
  tabsSearchThreshold: Y = 6,
583
- tabsSearchPlaceholder: M = "Buscar modulo...",
583
+ tabsSearchPlaceholder: $ = "Buscar modulo...",
584
584
  tabsSearchValue: q,
585
585
  onTabsSearchChange: Z,
586
586
  emptySearchState: te,
587
587
  showTabCount: P = !0,
588
588
  className: X = "",
589
589
  parentClassName: J = "",
590
- contentClassName: E = "",
591
- tabsClassName: H = ""
590
+ contentClassName: L = "",
591
+ tabsClassName: j = ""
592
592
  }) {
593
593
  var qe;
594
594
  const U = at(
@@ -598,16 +598,16 @@ function Ks({
598
598
  [x, i, c]
599
599
  ), _ = (qe = U.find(
600
600
  (ae) => !ae.disabled
601
- )) == null ? void 0 : qe.service, [oe, W] = D(
601
+ )) == null ? void 0 : qe.service, [oe, W] = B(
602
602
  p ?? _ ?? ""
603
- ), [s, g] = D({}), [T, j] = D({}), [B, ne] = D(""), [ce, pe] = D(!1), $ = le(T), ie = le(0), R = q ?? B, A = Xn(R), G = z === !0 || z === "auto" && U.length >= Y, V = G && R.trim().length > 0, re = at(() => A ? U.filter(
603
+ ), [s, g] = B({}), [E, R] = B({}), [D, ne] = B(""), [ce, pe] = B(!1), M = le(E), ie = le(0), H = q ?? D, A = Xn(H), G = z === !0 || z === "auto" && U.length >= Y, V = G && H.trim().length > 0, re = at(() => A ? U.filter(
604
604
  (ae) => Xn(zl(ae)).includes(A)
605
605
  ) : U, [A, U]), me = f ?? oe, se = U.find((ae) => ae.service === me) ?? U.find((ae) => !ae.disabled);
606
606
  Q(() => {
607
607
  !se && _ && W(_);
608
608
  }, [_, se]), Q(() => {
609
- $.current = T;
610
- }, [T]);
609
+ M.current = E;
610
+ }, [E]);
611
611
  const y = (ae) => {
612
612
  ae.disabled || (f || W(ae.service), h == null || h(ae.service, ae));
613
613
  }, I = (ae) => {
@@ -621,11 +621,11 @@ function Ks({
621
621
  )), ae.key === "Home" && (ae.preventDefault(), y(Te[0])), ae.key === "End" && (ae.preventDefault(), y(Te[Te.length - 1])));
622
622
  }, be = we(() => {
623
623
  if (!se) return;
624
- const ae = se.service, Me = $.current[ae];
624
+ const ae = se.service, Me = M.current[ae];
625
625
  if (Me != null && Me.loading || Me != null && Me.component && v) return;
626
626
  const Te = (u == null ? void 0 : u[ae]) ?? m;
627
627
  if (!Te) {
628
- j((De) => ({
628
+ R((De) => ({
629
629
  ...De,
630
630
  [ae]: {
631
631
  loading: !1,
@@ -635,26 +635,26 @@ function Ks({
635
635
  return;
636
636
  }
637
637
  const _e = ++ie.current;
638
- j((De) => ({
638
+ R((De) => ({
639
639
  ...De,
640
640
  [ae]: { ...De[ae], loading: !0, error: void 0 }
641
641
  })), Te(se, i).then((De) => {
642
642
  if (_e !== ie.current && !v) return;
643
643
  const et = Fl(De);
644
- j((Fe) => ({
644
+ R((Fe) => ({
645
645
  ...Fe,
646
646
  [ae]: { component: et, loading: !1 }
647
647
  }));
648
648
  }).catch((De) => {
649
649
  const et = De instanceof Error ? De : new Error(String(De));
650
- j((Fe) => ({
650
+ R((Fe) => ({
651
651
  ...Fe,
652
652
  [ae]: { ...Fe[ae], loading: !1, error: et }
653
653
  }));
654
654
  });
655
655
  }, [i, v, m, u, se]);
656
656
  Q(be, [be]);
657
- const Se = se ? s[se.service] ?? null : null, he = se ? T[se.service] : void 0, Ee = he == null ? void 0 : he.component, ke = (ae) => {
657
+ const Se = se ? s[se.service] ?? null : null, he = se ? E[se.service] : void 0, Ee = he == null ? void 0 : he.component, ke = (ae) => {
658
658
  se && g((Me) => ({
659
659
  ...Me,
660
660
  [se.service]: ae
@@ -673,7 +673,7 @@ function Ks({
673
673
  selectedLink: se,
674
674
  selectedService: se == null ? void 0 : se.service,
675
675
  activeItemId: Se,
676
- tabsSearch: R,
676
+ tabsSearch: H,
677
677
  onSelectService: y,
678
678
  onOpenDetail: ke,
679
679
  onBackToList: fe
@@ -693,11 +693,11 @@ function Ks({
693
693
  /* @__PURE__ */ l(
694
694
  "div",
695
695
  {
696
- className: `relative min-w-0 overflow-visible rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${E}`,
696
+ className: `relative min-w-0 overflow-visible rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${L}`,
697
697
  children: [
698
- (L || S || G || P) && /* @__PURE__ */ t("div", { className: "relative border-b border-[var(--border)] px-4 py-3", children: /* @__PURE__ */ l("div", { className: "flex min-w-0 items-start justify-between gap-3", children: [
698
+ (T || S || G || P) && /* @__PURE__ */ t("div", { className: "relative border-b border-[var(--border)] px-4 py-3", children: /* @__PURE__ */ l("div", { className: "flex min-w-0 items-start justify-between gap-3", children: [
699
699
  /* @__PURE__ */ l("div", { className: "min-w-0", children: [
700
- L && /* @__PURE__ */ t("h2", { className: "truncate text-sm font-semibold text-[var(--text-main)]", children: L }),
700
+ T && /* @__PURE__ */ t("h2", { className: "truncate text-sm font-semibold text-[var(--text-main)]", children: T }),
701
701
  S && /* @__PURE__ */ t("p", { className: "mt-1 line-clamp-2 text-xs text-[var(--text-muted)]", children: S })
702
702
  ] }),
703
703
  (G || P) && /* @__PURE__ */ l("div", { className: "flex min-w-0 flex-shrink-0 items-center justify-end gap-2", children: [
@@ -715,9 +715,9 @@ function Ks({
715
715
  children: /* @__PURE__ */ t(
716
716
  El,
717
717
  {
718
- value: R,
718
+ value: H,
719
719
  onChange: I,
720
- placeholder: M,
720
+ placeholder: $,
721
721
  className: "w-full",
722
722
  autoFocus: ce,
723
723
  forceExpanded: !0,
@@ -735,7 +735,7 @@ function Ks({
735
735
  "aria-label": ce ? "Cerrar busqueda" : "Buscar tabs",
736
736
  "aria-expanded": ce,
737
737
  onClick: () => {
738
- ce && R && I(""), pe((ae) => !ae);
738
+ ce && H && I(""), pe((ae) => !ae);
739
739
  },
740
740
  className: `inline-flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md border transition-all duration-200 hover:scale-[1.03] active:scale-95 ${ce || V ? "border-[var(--primary)] bg-[var(--bg-input)] text-[var(--text-main)] shadow-sm" : "border-[var(--border)] text-[var(--text-muted)] hover:bg-[var(--bg-input)] hover:text-[var(--text-main)]"}`,
741
741
  children: /* @__PURE__ */ t("span", { className: "grid h-4 w-4 place-items-center transition-transform duration-200", children: ce || V ? /* @__PURE__ */ t(Ie, { className: "h-4 w-4" }) : /* @__PURE__ */ t(xt, { className: "h-4 w-4" }) })
@@ -748,8 +748,8 @@ function Ks({
748
748
  "div",
749
749
  {
750
750
  role: "tablist",
751
- "aria-label": L ?? "Modulos relacionados",
752
- className: `flex gap-1 overflow-x-auto border-b border-[var(--border)] bg-[var(--bg-input)] px-2 py-1.5 transition-colors duration-200 ${H}`,
751
+ "aria-label": T ?? "Modulos relacionados",
752
+ className: `flex gap-1 overflow-x-auto border-b border-[var(--border)] bg-[var(--bg-input)] px-2 py-1.5 transition-colors duration-200 ${j}`,
753
753
  children: re.length > 0 ? re.map((ae) => {
754
754
  const Me = ae.service === (se == null ? void 0 : se.service);
755
755
  return /* @__PURE__ */ t(
@@ -919,15 +919,15 @@ function Ys({
919
919
  minDate: n,
920
920
  displayMode: a = "inline"
921
921
  }) {
922
- const i = Ul(), u = Da(e || i), m = a === "popover", [f, p] = D(!1), h = le(null), [x, v] = D({
922
+ const i = Ul(), u = Da(e || i), m = a === "popover", [f, p] = B(!1), h = le(null), [x, v] = B({
923
923
  horizontal: "left",
924
924
  vertical: "bottom"
925
- }), [L, S] = D(u.year), [w, k] = D(u.month), [O, ee] = D("days"), z = 16, [Y, M] = D(0), q = L - 7 + Y, Z = Array.from({ length: z }, (W, s) => q + s);
925
+ }), [T, S] = B(u.year), [w, k] = B(u.month), [O, ee] = B("days"), z = 16, [Y, $] = B(0), q = T - 7 + Y, Z = Array.from({ length: z }, (W, s) => q + s);
926
926
  Q(() => {
927
927
  if (!m || !f || !h.current) return;
928
- const W = h.current.getBoundingClientRect(), s = 8, g = 280, T = 340, j = W.left + g > window.innerWidth - s, B = W.right - g >= s, ne = W.bottom + 8 + T > window.innerHeight - s, ce = W.top - 8 - T >= s;
928
+ const W = h.current.getBoundingClientRect(), s = 8, g = 280, E = 340, R = W.left + g > window.innerWidth - s, D = W.right - g >= s, ne = W.bottom + 8 + E > window.innerHeight - s, ce = W.top - 8 - E >= s;
929
929
  v({
930
- horizontal: j && B ? "right" : "left",
930
+ horizontal: R && D ? "right" : "left",
931
931
  vertical: ne && ce ? "top" : "bottom"
932
932
  });
933
933
  }, [m, f]), Q(() => {
@@ -948,14 +948,14 @@ function Ys({
948
948
  function P() {
949
949
  w === 12 ? (S((W) => W + 1), k(1)) : k((W) => W + 1);
950
950
  }
951
- const X = new Date(L, w - 1, 1).getDay(), J = new Date(L, w, 0).getDate(), E = [
951
+ const X = new Date(T, w - 1, 1).getDay(), J = new Date(T, w, 0).getDate(), L = [
952
952
  ...Array(X).fill(null),
953
953
  ...Array.from({ length: J }, (W, s) => s + 1)
954
954
  ];
955
- for (; E.length < Xr * 7; ) E.push(null);
956
- const H = E.slice(0, Xr * 7);
955
+ for (; L.length < Xr * 7; ) L.push(null);
956
+ const j = L.slice(0, Xr * 7);
957
957
  function U(W) {
958
- const s = ln(L, w, W);
958
+ const s = ln(T, w, W);
959
959
  n && s < n || (r(s), m && p(!1));
960
960
  }
961
961
  const _ = {
@@ -1005,7 +1005,7 @@ function Ys({
1005
1005
  {
1006
1006
  type: "button",
1007
1007
  onClick: () => {
1008
- ee("years"), M(0);
1008
+ ee("years"), $(0);
1009
1009
  },
1010
1010
  style: {
1011
1011
  background: "none",
@@ -1023,7 +1023,7 @@ function Ys({
1023
1023
  children: [
1024
1024
  Aa[w - 1],
1025
1025
  " ",
1026
- L,
1026
+ T,
1027
1027
  /* @__PURE__ */ t(Xe, { size: 13, style: { color: "var(--text-muted)" } })
1028
1028
  ]
1029
1029
  }
@@ -1043,7 +1043,7 @@ function Ys({
1043
1043
  "button",
1044
1044
  {
1045
1045
  type: "button",
1046
- onClick: () => M((W) => W - z),
1046
+ onClick: () => $((W) => W - z),
1047
1047
  style: _,
1048
1048
  children: /* @__PURE__ */ t(Tt, { size: 16 })
1049
1049
  }
@@ -1074,7 +1074,7 @@ function Ys({
1074
1074
  "button",
1075
1075
  {
1076
1076
  type: "button",
1077
- onClick: () => M((W) => W + z),
1077
+ onClick: () => $((W) => W + z),
1078
1078
  style: _,
1079
1079
  children: /* @__PURE__ */ t(st, { size: 16 })
1080
1080
  }
@@ -1131,7 +1131,7 @@ function Ys({
1131
1131
  gap: 3
1132
1132
  },
1133
1133
  children: Z.map((W) => {
1134
- const s = W === L;
1134
+ const s = W === T;
1135
1135
  return /* @__PURE__ */ t(
1136
1136
  "button",
1137
1137
  {
@@ -1195,27 +1195,27 @@ function Ys({
1195
1195
  padding: "4px 8px 10px",
1196
1196
  gap: 2
1197
1197
  },
1198
- children: H.map((W, s) => {
1198
+ children: j.map((W, s) => {
1199
1199
  if (W === null)
1200
1200
  return /* @__PURE__ */ t("div", { style: { aspectRatio: "1" } }, s);
1201
- const g = ln(L, w, W), T = g === e, j = g === i, B = !!(n && g < n);
1201
+ const g = ln(T, w, W), E = g === e, R = g === i, D = !!(n && g < n);
1202
1202
  return /* @__PURE__ */ t(
1203
1203
  "button",
1204
1204
  {
1205
1205
  type: "button",
1206
- onClick: () => !B && U(W),
1206
+ onClick: () => !D && U(W),
1207
1207
  style: {
1208
1208
  width: "100%",
1209
1209
  aspectRatio: "1",
1210
1210
  borderRadius: 6,
1211
1211
  border: "none",
1212
- cursor: B ? "not-allowed" : "pointer",
1212
+ cursor: D ? "not-allowed" : "pointer",
1213
1213
  fontSize: 12,
1214
- fontWeight: T || j ? 700 : 400,
1215
- background: T ? "var(--primary)" : "transparent",
1216
- color: T ? "var(--primary-fg, #ffffff)" : B ? "var(--text-muted)" : "var(--text-main)",
1217
- opacity: B ? 0.4 : 1,
1218
- outline: j && !T ? "2px solid var(--primary)" : "none",
1214
+ fontWeight: E || R ? 700 : 400,
1215
+ background: E ? "var(--primary)" : "transparent",
1216
+ color: E ? "var(--primary-fg, #ffffff)" : D ? "var(--text-muted)" : "var(--text-main)",
1217
+ opacity: D ? 0.4 : 1,
1218
+ outline: R && !E ? "2px solid var(--primary)" : "none",
1219
1219
  outlineOffset: "-2px"
1220
1220
  },
1221
1221
  children: W
@@ -1354,22 +1354,22 @@ function Oa({
1354
1354
  className: h = "",
1355
1355
  style: x,
1356
1356
  children: v,
1357
- onClick: L,
1357
+ onClick: T,
1358
1358
  type: S = "button",
1359
1359
  ...w
1360
1360
  }) {
1361
- const [k, O] = D(!1), ee = le(null);
1361
+ const [k, O] = B(!1), ee = le(null);
1362
1362
  Q(() => () => {
1363
1363
  ee.current && window.clearTimeout(ee.current);
1364
1364
  }, []);
1365
- function z(M) {
1366
- O(!0), f == null || f(M), ee.current && window.clearTimeout(ee.current), ee.current = window.setTimeout(() => {
1365
+ function z($) {
1366
+ O(!0), f == null || f($), ee.current && window.clearTimeout(ee.current), ee.current = window.setTimeout(() => {
1367
1367
  O(!1), ee.current = null;
1368
1368
  }, r);
1369
1369
  }
1370
- async function Y(M) {
1370
+ async function Y($) {
1371
1371
  var Z;
1372
- if (m && M.stopPropagation(), L == null || L(M), M.defaultPrevented) return;
1372
+ if (m && $.stopPropagation(), T == null || T($), $.defaultPrevented) return;
1373
1373
  const q = Xl(e);
1374
1374
  if (q)
1375
1375
  try {
@@ -1504,20 +1504,20 @@ function At({
1504
1504
  className: h = "",
1505
1505
  style: x,
1506
1506
  dropdownMinWidth: v,
1507
- height: L = 40,
1507
+ height: T = 40,
1508
1508
  padding: S = "0 10px",
1509
1509
  searchable: w = !0,
1510
1510
  minOptionsForSearch: k = 6
1511
1511
  }) {
1512
- const [O, ee] = D(!1), [z, Y] = D(""), [M, q] = D(-1), [Z, te] = D(!1), [P, X] = D({}), J = le(null), E = le(null), H = le(null), U = le(null), _ = w && n.length >= k, oe = n.find((R) => R.value === e) ?? null, W = c === "ghost", s = a === "error" ? "var(--danger)" : O ? "var(--primary)" : "var(--border)", g = _ && z.trim() ? n.filter(
1513
- (R) => {
1512
+ const [O, ee] = B(!1), [z, Y] = B(""), [$, q] = B(-1), [Z, te] = B(!1), [P, X] = B({}), J = le(null), L = le(null), j = le(null), U = le(null), _ = w && n.length >= k, oe = n.find((H) => H.value === e) ?? null, W = c === "ghost", s = a === "error" ? "var(--danger)" : O ? "var(--primary)" : "var(--border)", g = _ && z.trim() ? n.filter(
1513
+ (H) => {
1514
1514
  var A;
1515
- return R.label.toLowerCase().includes(z.toLowerCase()) || ((A = R.sublabel) == null ? void 0 : A.toLowerCase().includes(z.toLowerCase()));
1515
+ return H.label.toLowerCase().includes(z.toLowerCase()) || ((A = H.sublabel) == null ? void 0 : A.toLowerCase().includes(z.toLowerCase()));
1516
1516
  }
1517
- ) : n, T = we(() => {
1518
- const R = J.current;
1519
- if (!R) return;
1520
- const A = R.getBoundingClientRect(), G = _ ? 272 : 212, V = window.innerHeight - A.bottom, re = V < G && A.top > V;
1517
+ ) : n, E = we(() => {
1518
+ const H = J.current;
1519
+ if (!H) return;
1520
+ const A = H.getBoundingClientRect(), G = _ ? 272 : 212, V = window.innerHeight - A.bottom, re = V < G && A.top > V;
1521
1521
  X({
1522
1522
  position: "fixed",
1523
1523
  left: A.left,
@@ -1530,47 +1530,47 @@ function At({
1530
1530
  }, [v, _]);
1531
1531
  Q(() => te(!0), []), Q(() => {
1532
1532
  if (!O) return;
1533
- function R(A) {
1533
+ function H(A) {
1534
1534
  var V, re;
1535
1535
  const G = A.target;
1536
- !((V = J.current) != null && V.contains(G)) && !((re = E.current) != null && re.contains(G)) && (ee(!1), Y(""));
1536
+ !((V = J.current) != null && V.contains(G)) && !((re = L.current) != null && re.contains(G)) && (ee(!1), Y(""));
1537
1537
  }
1538
- return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
1538
+ return document.addEventListener("mousedown", H), () => document.removeEventListener("mousedown", H);
1539
1539
  }, [O]), Q(() => {
1540
- O && (q(-1), T(), _ && setTimeout(() => {
1541
- var R;
1542
- return (R = H.current) == null ? void 0 : R.focus();
1540
+ O && (q(-1), E(), _ && setTimeout(() => {
1541
+ var H;
1542
+ return (H = j.current) == null ? void 0 : H.focus();
1543
1543
  }, 0));
1544
- }, [O, _, T]), Q(() => {
1544
+ }, [O, _, E]), Q(() => {
1545
1545
  if (O)
1546
- return window.addEventListener("resize", T), window.addEventListener("scroll", T, !0), () => {
1547
- window.removeEventListener("resize", T), window.removeEventListener("scroll", T, !0);
1546
+ return window.addEventListener("resize", E), window.addEventListener("scroll", E, !0), () => {
1547
+ window.removeEventListener("resize", E), window.removeEventListener("scroll", E, !0);
1548
1548
  };
1549
- }, [O, T]), Q(() => {
1550
- if (M < 0 || !U.current) return;
1551
- const R = U.current.children[M];
1552
- R == null || R.scrollIntoView({ block: "nearest" });
1553
- }, [M]);
1554
- const j = we(
1555
- (R) => {
1556
- r(R), ee(!1), Y("");
1549
+ }, [O, E]), Q(() => {
1550
+ if ($ < 0 || !U.current) return;
1551
+ const H = U.current.children[$];
1552
+ H == null || H.scrollIntoView({ block: "nearest" });
1553
+ }, [$]);
1554
+ const R = we(
1555
+ (H) => {
1556
+ r(H), ee(!1), Y("");
1557
1557
  },
1558
1558
  [r]
1559
- ), B = le(O);
1560
- B.current = O;
1559
+ ), D = le(O);
1560
+ D.current = O;
1561
1561
  const ne = le(g);
1562
1562
  ne.current = g;
1563
- const ce = le(M);
1564
- ce.current = M;
1563
+ const ce = le($);
1564
+ ce.current = $;
1565
1565
  const pe = le(f);
1566
1566
  pe.current = f;
1567
- const $ = le(j);
1568
- $.current = j, Q(() => {
1569
- function R(A) {
1567
+ const M = le(R);
1568
+ M.current = R, Q(() => {
1569
+ function H(A) {
1570
1570
  var me, se;
1571
- const G = document.activeElement, V = ((me = J.current) == null ? void 0 : me.contains(G)) ?? !1, re = ((se = E.current) == null ? void 0 : se.contains(G)) ?? !1;
1571
+ const G = document.activeElement, V = ((me = J.current) == null ? void 0 : me.contains(G)) ?? !1, re = ((se = L.current) == null ? void 0 : se.contains(G)) ?? !1;
1572
1572
  if (!(!V && !re)) {
1573
- if (!B.current) {
1573
+ if (!D.current) {
1574
1574
  (A.key === "Enter" || A.key === " " || A.key === "ArrowDown") && (A.preventDefault(), ee(!0));
1575
1575
  return;
1576
1576
  }
@@ -1584,7 +1584,7 @@ function At({
1584
1584
  case "Enter": {
1585
1585
  A.preventDefault();
1586
1586
  const y = ce.current, I = ne.current;
1587
- y === -1 && pe.current ? $.current("") : I[y] && !I[y].disabled && $.current(I[y].value);
1587
+ y === -1 && pe.current ? M.current("") : I[y] && !I[y].disabled && M.current(I[y].value);
1588
1588
  break;
1589
1589
  }
1590
1590
  case "Escape":
@@ -1593,12 +1593,12 @@ function At({
1593
1593
  }
1594
1594
  }
1595
1595
  }
1596
- return document.addEventListener("keydown", R), () => document.removeEventListener("keydown", R);
1596
+ return document.addEventListener("keydown", H), () => document.removeEventListener("keydown", H);
1597
1597
  }, []);
1598
1598
  const ie = /* @__PURE__ */ l(
1599
1599
  "div",
1600
1600
  {
1601
- ref: E,
1601
+ ref: L,
1602
1602
  "data-bonsaif-select-dropdown": "true",
1603
1603
  className: "rounded-xl shadow-xl overflow-hidden",
1604
1604
  style: {
@@ -1623,10 +1623,10 @@ function At({
1623
1623
  /* @__PURE__ */ t(
1624
1624
  "input",
1625
1625
  {
1626
- ref: H,
1626
+ ref: j,
1627
1627
  value: z,
1628
- onChange: (R) => {
1629
- Y(R.target.value), q(-1);
1628
+ onChange: (H) => {
1629
+ Y(H.target.value), q(-1);
1630
1630
  },
1631
1631
  placeholder: "Buscar…",
1632
1632
  className: "min-w-0 flex-1 text-sm bg-transparent outline-none",
@@ -1637,8 +1637,8 @@ function At({
1637
1637
  "button",
1638
1638
  {
1639
1639
  type: "button",
1640
- onMouseDown: (R) => {
1641
- R.preventDefault(), Y("");
1640
+ onMouseDown: (H) => {
1641
+ H.preventDefault(), Y("");
1642
1642
  },
1643
1643
  children: /* @__PURE__ */ t(
1644
1644
  Ie,
@@ -1670,67 +1670,67 @@ function At({
1670
1670
  {
1671
1671
  role: "option",
1672
1672
  "aria-selected": e === "",
1673
- onMouseDown: (R) => {
1674
- R.preventDefault(), j("");
1673
+ onMouseDown: (H) => {
1674
+ H.preventDefault(), R("");
1675
1675
  },
1676
1676
  onMouseEnter: () => q(-1),
1677
1677
  className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
1678
1678
  style: {
1679
- background: M === -1 && !z.trim() ? "var(--bg-hover)" : "transparent",
1679
+ background: $ === -1 && !z.trim() ? "var(--bg-hover)" : "transparent",
1680
1680
  color: "var(--text-muted)",
1681
1681
  fontStyle: "italic"
1682
1682
  },
1683
1683
  children: f
1684
1684
  }
1685
1685
  ),
1686
- g.map((R, A) => {
1687
- const V = A === M, re = R.value === e;
1686
+ g.map((H, A) => {
1687
+ const V = A === $, re = H.value === e;
1688
1688
  return /* @__PURE__ */ l(
1689
1689
  "li",
1690
1690
  {
1691
1691
  role: "option",
1692
1692
  "aria-selected": re,
1693
1693
  onMouseDown: (me) => {
1694
- me.preventDefault(), R.disabled || j(R.value);
1694
+ me.preventDefault(), H.disabled || R(H.value);
1695
1695
  },
1696
- onMouseEnter: () => !R.disabled && q(A),
1696
+ onMouseEnter: () => !H.disabled && q(A),
1697
1697
  className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
1698
1698
  style: {
1699
1699
  background: V ? "var(--bg-hover)" : re ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
1700
- color: R.disabled ? "var(--text-muted)" : "var(--text-main)",
1701
- cursor: R.disabled ? "not-allowed" : "pointer",
1700
+ color: H.disabled ? "var(--text-muted)" : "var(--text-main)",
1701
+ cursor: H.disabled ? "not-allowed" : "pointer",
1702
1702
  boxShadow: re ? "inset 2px 0 0 var(--primary)" : void 0
1703
1703
  },
1704
1704
  children: [
1705
- R.color && /* @__PURE__ */ t(
1705
+ H.color && /* @__PURE__ */ t(
1706
1706
  "span",
1707
1707
  {
1708
1708
  className: "flex-shrink-0 w-2.5 h-2.5 rounded-full",
1709
- style: { background: R.color }
1709
+ style: { background: H.color }
1710
1710
  }
1711
1711
  ),
1712
1712
  /* @__PURE__ */ l("span", { className: "min-w-0 flex flex-1 items-baseline gap-1 overflow-hidden", children: [
1713
- /* @__PURE__ */ t("span", { className: "truncate", children: R.label }),
1714
- R.sublabel && /* @__PURE__ */ t(
1713
+ /* @__PURE__ */ t("span", { className: "truncate", children: H.label }),
1714
+ H.sublabel && /* @__PURE__ */ t(
1715
1715
  "span",
1716
1716
  {
1717
1717
  className: "min-w-0 flex-shrink truncate",
1718
1718
  style: { color: "var(--text-muted)", fontSize: 12 },
1719
- children: R.sublabel
1719
+ children: H.sublabel
1720
1720
  }
1721
1721
  )
1722
1722
  ] }),
1723
- R.badge && /* @__PURE__ */ t(
1723
+ H.badge && /* @__PURE__ */ t(
1724
1724
  "span",
1725
1725
  {
1726
1726
  className: "text-xs flex-shrink-0",
1727
1727
  style: { color: "var(--text-muted)" },
1728
- children: R.badge
1728
+ children: H.badge
1729
1729
  }
1730
1730
  )
1731
1731
  ]
1732
1732
  },
1733
- R.value
1733
+ H.value
1734
1734
  );
1735
1735
  }),
1736
1736
  g.length === 0 && /* @__PURE__ */ t(
@@ -1759,10 +1759,10 @@ function At({
1759
1759
  {
1760
1760
  type: "button",
1761
1761
  disabled: p,
1762
- onClick: () => !p && ee((R) => !R),
1762
+ onClick: () => !p && ee((H) => !H),
1763
1763
  className: "flex w-full items-center gap-2 rounded-lg text-left text-sm transition-colors focus:outline-none",
1764
1764
  style: {
1765
- height: Zr(L),
1765
+ height: Zr(T),
1766
1766
  padding: Zr(S),
1767
1767
  background: W ? "transparent" : "var(--bg-input)",
1768
1768
  color: oe ? "var(--text-main)" : "var(--text-muted)",
@@ -1797,8 +1797,8 @@ function At({
1797
1797
  {
1798
1798
  role: "button",
1799
1799
  tabIndex: -1,
1800
- onMouseDown: (R) => {
1801
- R.preventDefault(), R.stopPropagation(), j("");
1800
+ onMouseDown: (H) => {
1801
+ H.preventDefault(), H.stopPropagation(), R("");
1802
1802
  },
1803
1803
  className: "flex-shrink-0 rounded-full p-0.5 transition-colors hover:bg-black/10",
1804
1804
  style: { color: "var(--text-muted)" },
@@ -1919,7 +1919,7 @@ function Ia({
1919
1919
  zIndex: h = 1e3,
1920
1920
  closeOnBackdrop: x = !0,
1921
1921
  closeOnEscape: v = !0,
1922
- showCloseButton: L = !0,
1922
+ showCloseButton: T = !0,
1923
1923
  placement: S = "center",
1924
1924
  bodyClassName: w = "px-6 py-5",
1925
1925
  panelClassName: k = "",
@@ -1927,9 +1927,9 @@ function Ia({
1927
1927
  contentClassName: ee = "p-4",
1928
1928
  ariaLabel: z,
1929
1929
  frameless: Y = !1,
1930
- disabled: M = !1
1930
+ disabled: $ = !1
1931
1931
  }) {
1932
- const [q, Z] = D(!1), [te, P] = D(!1), X = le(null);
1932
+ const [q, Z] = B(!1), [te, P] = B(!1), X = le(null);
1933
1933
  if (Q(() => (e ? (X.current && clearTimeout(X.current), Z(!0), requestAnimationFrame(() => requestAnimationFrame(() => P(!0)))) : (P(!1), X.current = setTimeout(
1934
1934
  () => Z(!1),
1935
1935
  vr + 40
@@ -1947,7 +1947,7 @@ function Ia({
1947
1947
  };
1948
1948
  return window.addEventListener("keydown", oe), () => window.removeEventListener("keydown", oe);
1949
1949
  }, [v, r, e]), !q) return null;
1950
- const J = n || a || i || c || L, E = p ?? Zl[f], H = S === "bottom-mobile" ? "items-end sm:items-center justify-center p-0 sm:p-4" : "items-center justify-center", U = S === "bottom-mobile" ? "rounded-t-2xl sm:rounded-2xl" : "rounded-2xl", _ = te ? "translateY(0) scale(1)" : S === "bottom-mobile" ? "translateY(16px) scale(0.98)" : "translateY(10px) scale(0.96)";
1950
+ const J = n || a || i || c || T, L = p ?? Zl[f], j = S === "bottom-mobile" ? "items-end sm:items-center justify-center p-0 sm:p-4" : "items-center justify-center", U = S === "bottom-mobile" ? "rounded-t-2xl sm:rounded-2xl" : "rounded-2xl", _ = te ? "translateY(0) scale(1)" : S === "bottom-mobile" ? "translateY(16px) scale(0.98)" : "translateY(10px) scale(0.96)";
1951
1951
  return Ze(
1952
1952
  /* @__PURE__ */ l(
1953
1953
  "div",
@@ -1956,7 +1956,7 @@ function Ia({
1956
1956
  "aria-modal": "true",
1957
1957
  "data-bonsaif-overlay": "true",
1958
1958
  "aria-label": z ?? n,
1959
- className: `fixed inset-0 flex ${H} ${ee}`,
1959
+ className: `fixed inset-0 flex ${j} ${ee}`,
1960
1960
  style: { zIndex: h },
1961
1961
  children: [
1962
1962
  /* @__PURE__ */ t(
@@ -1975,7 +1975,7 @@ function Ia({
1975
1975
  {
1976
1976
  className: `relative z-10 flex max-h-[92dvh] w-full flex-col overflow-hidden ${Y ? "shadow-none" : "shadow-2xl"} ${U} ${k}`,
1977
1977
  style: {
1978
- maxWidth: E,
1978
+ maxWidth: L,
1979
1979
  background: Y ? "transparent" : "var(--bg-card)",
1980
1980
  border: Y ? "none" : "1px solid var(--border)",
1981
1981
  opacity: te ? 1 : 0,
@@ -1984,7 +1984,7 @@ function Ia({
1984
1984
  },
1985
1985
  onClick: (oe) => oe.stopPropagation(),
1986
1986
  children: [
1987
- M && /* @__PURE__ */ t(
1987
+ $ && /* @__PURE__ */ t(
1988
1988
  "div",
1989
1989
  {
1990
1990
  className: "absolute inset-0 z-[1002] cursor-not-allowed rounded-2xl",
@@ -2023,7 +2023,7 @@ function Ia({
2023
2023
  ] }),
2024
2024
  /* @__PURE__ */ l("div", { className: "flex flex-shrink-0 items-center gap-2", children: [
2025
2025
  c,
2026
- L && /* @__PURE__ */ t(Be, { variant: "icon", onClick: r, title: "Cerrar", children: /* @__PURE__ */ t(Ie, { className: "h-5 w-5" }) })
2026
+ T && /* @__PURE__ */ t(Be, { variant: "icon", onClick: r, title: "Cerrar", children: /* @__PURE__ */ t(Ie, { className: "h-5 w-5" }) })
2027
2027
  ] })
2028
2028
  ]
2029
2029
  }
@@ -2429,7 +2429,7 @@ function pi({
2429
2429
  getRowCanExpand: h,
2430
2430
  expandedRowIds: x,
2431
2431
  defaultExpandedRowIds: v = [],
2432
- onExpandedRowIdsChange: L,
2432
+ onExpandedRowIdsChange: T,
2433
2433
  expandOnRowClick: S = !1,
2434
2434
  selected: w,
2435
2435
  onToggleOne: k,
@@ -2437,30 +2437,30 @@ function pi({
2437
2437
  highlightSelected: ee = !0,
2438
2438
  rowClassName: z,
2439
2439
  getRowCategory: Y,
2440
- stickyHeader: M = !0,
2440
+ stickyHeader: $ = !0,
2441
2441
  pageSize: q = 25,
2442
2442
  pageSizeOptions: Z = [25, 50, 100],
2443
2443
  pageSizeSelectWidth: te = 62,
2444
2444
  pageSizeSelectHeight: P = 30,
2445
2445
  pageSizeSelectPadding: X = "0 7px",
2446
2446
  totalRows: J,
2447
- page: E,
2448
- onPageChange: H,
2447
+ page: L,
2448
+ onPageChange: j,
2449
2449
  onPageSizeChange: U,
2450
2450
  storageKey: _,
2451
2451
  stickyFirstColumn: oe = !1,
2452
2452
  bottomOffset: W = 0,
2453
2453
  compact: s = !0,
2454
2454
  restrictHeight: g = !0,
2455
- maxHeight: T,
2456
- minTableWidth: j,
2457
- enableColumnVisibility: B = !0,
2455
+ maxHeight: E,
2456
+ minTableWidth: R,
2457
+ enableColumnVisibility: D = !0,
2458
2458
  enableColumnFilters: ne = !0,
2459
2459
  hiddenColumnKeys: ce,
2460
2460
  defaultHiddenColumnKeys: pe = li,
2461
- onHiddenColumnKeysChange: $,
2461
+ onHiddenColumnKeysChange: M,
2462
2462
  columnVisibilityLabel: ie = "Columnas",
2463
- enableBql: R = !1,
2463
+ enableBql: H = !1,
2464
2464
  bqlValue: A,
2465
2465
  defaultBqlValue: G = "",
2466
2466
  onBqlChange: V,
@@ -2480,29 +2480,29 @@ rol IN (admin, employee)`,
2480
2480
  var Wn;
2481
2481
  const fe = di(he), ze = Object.values(fe).some(Boolean), Qe = e.map((o) => o.key).join(","), qe = pe.join(","), ae = le(e), Me = le(pe);
2482
2482
  ae.current = e, Me.current = pe;
2483
- const [Te, _e] = D(
2483
+ const [Te, _e] = B(
2484
2484
  !_ || !ze
2485
- ), De = le(null), et = le(!_), Fe = ce !== void 0, [Va, Dt] = D(() => pt(pe, e)), Pe = pt(
2485
+ ), De = le(null), et = le(!_), Fe = ce !== void 0, [Va, Dt] = B(() => pt(pe, e)), Pe = pt(
2486
2486
  Fe ? ce : Va,
2487
2487
  e
2488
- ), [ot, Kt] = D(!1), [ct, Ya] = D("filter"), [Bt, Vt] = D(
2488
+ ), [ot, Kt] = B(!1), [ct, Ya] = B("filter"), [Bt, Vt] = B(
2489
2489
  null
2490
- ), [mn, bn] = D(""), [We, Ot] = D({}), [Ke, Yt] = D({}), Tr = x !== void 0, [fn, Ga] = D(v), It = A !== void 0, [Xa, Ar] = D(G), tt = It ? A : Xa, [Gt, Xt] = D(tt), [rt, dt] = D(!1), [pn, gt] = D(!1), [hn, yt] = D(!1), [Rt, Ht] = D([]), Dr = le(null), vn = le(null), Br = le(null), [Za, Ja] = D(
2490
+ ), [mn, bn] = B(""), [We, Ot] = B({}), [Ke, Yt] = B({}), Tr = x !== void 0, [fn, Ga] = B(v), It = A !== void 0, [Xa, Ar] = B(G), tt = It ? A : Xa, [Gt, Xt] = B(tt), [rt, dt] = B(!1), [pn, gt] = B(!1), [hn, yt] = B(!1), [Rt, Ht] = B([]), Dr = le(null), vn = le(null), Br = le(null), [Za, Ja] = B(
2491
2491
  {}
2492
- ), [Qa, eo] = D(
2492
+ ), [Qa, eo] = B(
2493
2493
  {}
2494
- ), [jt, Zt] = D(!1), Or = le(null), Jt = le(null), [to, ro] = D(
2494
+ ), [jt, Zt] = B(!1), Or = le(null), Jt = le(null), [to, ro] = B(
2495
2495
  {}
2496
- ), xn = le(null), Qt = le(null), [Ir, gn] = D(
2496
+ ), xn = le(null), Qt = le(null), [Ir, gn] = B(
2497
2497
  r.length > 0 || a || m === !1
2498
- ), yn = (o, d) => 50 + (o * 17 + d * 13 + 7) % 40, lt = le(null), [no, ao] = D(
2498
+ ), yn = (o, d) => 50 + (o * 17 + d * 13 + 7) % 40, lt = le(null), [no, ao] = B(
2499
2499
  void 0
2500
- ), [wn, oo] = D(0), [Rr, lo] = D(!1);
2500
+ ), [wn, oo] = B(0), [Rr, lo] = B(!1);
2501
2501
  Q(() => {
2502
2502
  function o() {
2503
2503
  lo(window.innerWidth < 640);
2504
2504
  }
2505
- if (!g || T !== void 0)
2505
+ if (!g || E !== void 0)
2506
2506
  return o(), window.addEventListener("resize", o), () => window.removeEventListener("resize", o);
2507
2507
  const C = q !== !1 ? 48 : 0, b = 12;
2508
2508
  function K() {
@@ -2516,8 +2516,8 @@ rol IN (admin, employee)`,
2516
2516
  );
2517
2517
  }
2518
2518
  return K(), window.addEventListener("resize", K), () => window.removeEventListener("resize", K);
2519
- }, [a, q, W, g, T]);
2520
- const Nn = g ? T ?? no : void 0;
2519
+ }, [a, q, W, g, E]);
2520
+ const Nn = g ? E ?? no : void 0;
2521
2521
  Q(() => {
2522
2522
  const o = lt.current;
2523
2523
  if (!o) return;
@@ -2537,13 +2537,13 @@ rol IN (admin, employee)`,
2537
2537
  }, m);
2538
2538
  return () => window.clearTimeout(o);
2539
2539
  }, [r.length, m, Ir, a]);
2540
- const [wt, zt] = D(
2540
+ const [wt, zt] = B(
2541
2541
  () => e.map((o) => o.key)
2542
- ), [Nt, Ft] = D(
2542
+ ), [Nt, Ft] = B(
2543
2543
  () => Object.fromEntries(
2544
2544
  e.map((o) => [o.key, nt(o, ft(o.width))])
2545
2545
  )
2546
- ), [$e, kt] = D(null), [io, er] = D(1), [tr, Hr] = D(
2546
+ ), [$e, kt] = B(null), [io, er] = B(1), [tr, Hr] = B(
2547
2547
  q === !1 ? 0 : q
2548
2548
  );
2549
2549
  Q(() => {
@@ -2835,7 +2835,7 @@ rol IN (admin, employee)`,
2835
2835
  }, [rt, ar]);
2836
2836
  function Mn(o) {
2837
2837
  const d = pt(o, e);
2838
- Fe || Dt(d), $ == null || $(d);
2838
+ Fe || Dt(d), M == null || M(d);
2839
2839
  }
2840
2840
  function po(o) {
2841
2841
  Mn(
@@ -2945,7 +2945,7 @@ rol IN (admin, employee)`,
2945
2945
  document.removeEventListener("pointermove", o), document.removeEventListener("pointerup", d);
2946
2946
  };
2947
2947
  }, [e]);
2948
- const or = le(null), [An, Pr] = D(null);
2948
+ const or = le(null), [An, Pr] = B(null);
2949
2949
  function xo(o, d) {
2950
2950
  or.current = wt.indexOf(o), d.dataTransfer.effectAllowed = "move";
2951
2951
  }
@@ -2975,7 +2975,7 @@ rol IN (admin, employee)`,
2975
2975
  }, [r]), Q(() => {
2976
2976
  er(1);
2977
2977
  }, [Ke, We]);
2978
- const ut = !!(H && U), mt = q !== !1, He = ut ? E ?? 1 : io, Ye = ut || mt ? tr : r.length, Ge = !!w && !!k && !!O, Ct = !!p, Dn = je.useMemo(
2978
+ const ut = !!(j && U), mt = q !== !1, He = ut ? L ?? 1 : io, Ye = ut || mt ? tr : r.length, Ge = !!w && !!k && !!O, Ct = !!p, Dn = je.useMemo(
2979
2979
  () => new Set(
2980
2980
  Tr ? Array.from(x ?? []) : fn
2981
2981
  ),
@@ -3014,16 +3014,16 @@ rol IN (admin, employee)`,
3014
3014
  function Ur(o) {
3015
3015
  if (a) return;
3016
3016
  const d = Math.max(1, Math.min(o, qr));
3017
- ut ? H(d) : er(d);
3017
+ ut ? j(d) : er(d);
3018
3018
  }
3019
3019
  function Lo(o) {
3020
- a || (Hr(o), ut ? (U(o), H(1)) : er(1), U && U(o));
3020
+ a || (Hr(o), ut ? (U(o), j(1)) : er(1), U && U(o));
3021
3021
  }
3022
3022
  function On(o) {
3023
3023
  const d = new Set(Dn);
3024
3024
  d.has(o) ? d.delete(o) : d.add(o);
3025
3025
  const C = Array.from(d);
3026
- Tr || Ga(C), L == null || L(C);
3026
+ Tr || Ga(C), T == null || T(C);
3027
3027
  }
3028
3028
  Q(() => {
3029
3029
  Se == null || Se({
@@ -3048,7 +3048,7 @@ rol IN (admin, employee)`,
3048
3048
  const In = (o) => o === "center" ? "text-center" : o === "right" ? "text-right" : "text-left", Mo = "color-mix(in srgb, var(--primary) 6%, var(--bg-card))", Kr = "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%)", ye = "color-mix(in srgb, var(--border) 62%, var(--bg-card))", Et = "color-mix(in srgb, var(--primary) 24%, var(--border))", ir = `inset 0 0 0 1px ${ye}`, Rn = Ve.reduce(
3049
3049
  (o, d) => o + (Nt[d.key] ?? ft(d.width)),
3050
3050
  (Ct ? 40 : 0) + (Ge ? 40 : 0)
3051
- ), Hn = typeof j == "number" ? j : typeof j == "string" ? Number(((Wn = j.match(/^(\d+(?:\.\d+)?)px$/)) == null ? void 0 : Wn[1]) ?? NaN) : NaN, Pt = Number.isFinite(Hn) ? Math.max(Rn, Hn, wn) : Math.max(Rn, wn), sr = j ?? Pt, $t = `${Ct ? "40px " : ""}${Ge ? "40px " : ""}${Ve.map((o) => `${Nt[o.key] ?? ft(o.width)}px`).join(" ")}`;
3051
+ ), Hn = typeof R == "number" ? R : typeof R == "string" ? Number(((Wn = R.match(/^(\d+(?:\.\d+)?)px$/)) == null ? void 0 : Wn[1]) ?? NaN) : NaN, Pt = Number.isFinite(Hn) ? Math.max(Rn, Hn, wn) : Math.max(Rn, wn), sr = R ?? Pt, $t = `${Ct ? "40px " : ""}${Ge ? "40px " : ""}${Ve.map((o) => `${Nt[o.key] ?? ft(o.width)}px`).join(" ")}`;
3052
3052
  Q(() => {
3053
3053
  $e && Pe.includes($e.key) && kt(null);
3054
3054
  }, [Pe, $e]);
@@ -3277,7 +3277,7 @@ rol IN (admin, employee)`,
3277
3277
  ]
3278
3278
  }
3279
3279
  ), dr = () => {
3280
- if (!ot || typeof document > "u" || ct === "visibility" && !B || ct === "filter" && !ne) return null;
3280
+ if (!ot || typeof document > "u" || ct === "visibility" && !D || ct === "filter" && !ne) return null;
3281
3281
  const o = e.find(
3282
3282
  (xe) => xe.key === Bt
3283
3283
  ), d = uo(), C = o ? Object.prototype.hasOwnProperty.call(We, o.key) : !1, b = o ? Ke[o.key] : void 0, K = Mr.find(
@@ -3691,8 +3691,8 @@ ${C}`, K = new Blob(["\uFEFF" + b], {
3691
3691
  ),
3692
3692
  document.body
3693
3693
  ), br = () => {
3694
- const o = R && tt.trim().length > 0, d = ue != null && ue.length ? ue : o ? [{ key: "bql", label: "BQL", value: tt }] : [], C = I.filter((b) => b.trim() && b !== Gt).slice(0, 8);
3695
- return !B && jr === 0 && !R && !Ee ? null : /* @__PURE__ */ l(
3694
+ const o = H && tt.trim().length > 0, d = ue != null && ue.length ? ue : o ? [{ key: "bql", label: "BQL", value: tt }] : [], C = I.filter((b) => b.trim() && b !== Gt).slice(0, 8);
3695
+ return !D && jr === 0 && !H && !Ee ? null : /* @__PURE__ */ l(
3696
3696
  "div",
3697
3697
  {
3698
3698
  className: "relative flex min-h-9 flex-wrap items-center justify-between gap-2 border-b rounded-t-lg px-2 py-1",
@@ -3712,7 +3712,7 @@ ${C}`, K = new Blob(["\uFEFF" + b], {
3712
3712
  ]
3713
3713
  }
3714
3714
  ),
3715
- R && /* @__PURE__ */ l(
3715
+ H && /* @__PURE__ */ l(
3716
3716
  "div",
3717
3717
  {
3718
3718
  ref: Dr,
@@ -4049,7 +4049,7 @@ ${C}`, K = new Blob(["\uFEFF" + b], {
4049
4049
  children: /* @__PURE__ */ t(Ko, { className: "h-4 w-4" })
4050
4050
  }
4051
4051
  ),
4052
- B && /* @__PURE__ */ t(
4052
+ D && /* @__PURE__ */ t(
4053
4053
  "button",
4054
4054
  {
4055
4055
  type: "button",
@@ -4190,7 +4190,7 @@ ${C}`, K = new Blob(["\uFEFF" + b], {
4190
4190
  "div",
4191
4191
  {
4192
4192
  role: "rowgroup",
4193
- style: M ? {
4193
+ style: $ ? {
4194
4194
  position: "sticky",
4195
4195
  top: 0,
4196
4196
  zIndex: 10,
@@ -4290,7 +4290,7 @@ ${C}`, K = new Blob(["\uFEFF" + b], {
4290
4290
  "div",
4291
4291
  {
4292
4292
  role: "rowgroup",
4293
- style: M ? {
4293
+ style: $ ? {
4294
4294
  position: "sticky",
4295
4295
  top: 0,
4296
4296
  zIndex: 10,
@@ -4392,7 +4392,7 @@ ${C}`, K = new Blob(["\uFEFF" + b], {
4392
4392
  "div",
4393
4393
  {
4394
4394
  role: "rowgroup",
4395
- style: M ? {
4395
+ style: $ ? {
4396
4396
  position: "sticky",
4397
4397
  top: 0,
4398
4398
  zIndex: 10,
@@ -4472,7 +4472,7 @@ ${C}`, K = new Blob(["\uFEFF" + b], {
4472
4472
  "div",
4473
4473
  {
4474
4474
  role: "rowgroup",
4475
- style: M ? {
4475
+ style: $ ? {
4476
4476
  position: "sticky",
4477
4477
  top: 0,
4478
4478
  zIndex: 10,
@@ -4718,7 +4718,7 @@ function gi({
4718
4718
  onCommit: a,
4719
4719
  onCancel: i
4720
4720
  }) {
4721
- const [c, u] = D(e), m = le(null), f = (n == null ? void 0 : n.preset) === "date", p = f ? "date" : r === "number" ? "number" : "text";
4721
+ const [c, u] = B(e), m = le(null), f = (n == null ? void 0 : n.preset) === "date", p = f ? "date" : r === "number" ? "number" : "text";
4722
4722
  return Q(() => {
4723
4723
  var h, x;
4724
4724
  (h = m.current) == null || h.focus(), f || (x = m.current) == null || x.select();
@@ -4730,7 +4730,7 @@ function gi({
4730
4730
  value: c,
4731
4731
  maxLength: n == null ? void 0 : n.maxLength,
4732
4732
  onChange: (h) => u(h.target.value),
4733
- onBlur: () => a(c),
4733
+ onBlur: () => i(),
4734
4734
  onKeyDown: (h) => {
4735
4735
  h.key === "Enter" && (h.preventDefault(), a(c)), h.key === "Escape" && (h.preventDefault(), i()), (n == null ? void 0 : n.preset) === "integer" && !h.ctrlKey && !h.metaKey && !xi.has(h.key) && !/^[\d-]$/.test(h.key) && h.preventDefault();
4736
4736
  },
@@ -4746,7 +4746,7 @@ function yi({
4746
4746
  onCommit: a,
4747
4747
  onCancel: i
4748
4748
  }) {
4749
- const c = le(null), [u, m] = D(e);
4749
+ const c = le(null), [u, m] = B(e);
4750
4750
  return Q(() => {
4751
4751
  if (n) return;
4752
4752
  const f = setTimeout(() => {
@@ -4804,54 +4804,54 @@ function ec({
4804
4804
  readOnly: i = !1,
4805
4805
  ...c
4806
4806
  }) {
4807
- const [u, m] = D(r), f = le(null);
4807
+ const [u, m] = B(r), f = le(null);
4808
4808
  Q(() => {
4809
4809
  f.current || m(r);
4810
4810
  }, [r]);
4811
- const [p, h] = D(null);
4811
+ const [p, h] = B(null);
4812
4812
  f.current = p;
4813
- const [x, v] = D(null), L = le(null);
4814
- L.current = x;
4815
- const [S, w] = D({}), [k, O] = D({}), [ee, z] = D({}), Y = le(/* @__PURE__ */ new Set()), M = le(null);
4813
+ const [x, v] = B(null), T = le(null);
4814
+ T.current = x;
4815
+ const [S, w] = B({}), [k, O] = B({}), [ee, z] = B({}), Y = le(/* @__PURE__ */ new Set()), $ = le(null);
4816
4816
  Q(() => {
4817
4817
  var g;
4818
4818
  const s = document.activeElement;
4819
- (!s || s === document.body) && ((g = M.current) == null || g.focus({ preventScroll: !0 }));
4819
+ (!s || s === document.body) && ((g = $.current) == null || g.focus({ preventScroll: !0 }));
4820
4820
  }, []);
4821
4821
  const q = e.map((s) => {
4822
- var g, T, j;
4823
- return `${s.key}:${((j = (T = (g = s.editable) == null ? void 0 : g.select) == null ? void 0 : T.options) == null ? void 0 : j.length) ?? -1}`;
4822
+ var g, E, R;
4823
+ return `${s.key}:${((R = (E = (g = s.editable) == null ? void 0 : g.select) == null ? void 0 : E.options) == null ? void 0 : R.length) ?? -1}`;
4824
4824
  }).join("|");
4825
4825
  Q(() => {
4826
4826
  e.forEach((s) => {
4827
- var j, B;
4828
- const g = (B = (j = s.editable) == null ? void 0 : j.select) == null ? void 0 : B.options;
4827
+ var R, D;
4828
+ const g = (D = (R = s.editable) == null ? void 0 : R.select) == null ? void 0 : D.options;
4829
4829
  if (!g) return;
4830
- const T = k[s.key];
4831
- (!Y.current.has(s.key) || (T == null ? void 0 : T.length) === 0 && g.length > 0) && (Y.current.add(s.key), O((ne) => ({ ...ne, [s.key]: g })));
4830
+ const E = k[s.key];
4831
+ (!Y.current.has(s.key) || (E == null ? void 0 : E.length) === 0 && g.length > 0) && (Y.current.add(s.key), O((ne) => ({ ...ne, [s.key]: g })));
4832
4832
  });
4833
4833
  }, [q]);
4834
4834
  const Z = we(
4835
4835
  async (s, g) => {
4836
4836
  if (Y.current.has(s)) return;
4837
4837
  Y.current.add(s);
4838
- const { url: T, fetchOptions: j } = g.select ?? {};
4839
- if (!(!T && !j)) {
4840
- z((B) => ({ ...B, [s]: !0 }));
4838
+ const { url: E, fetchOptions: R } = g.select ?? {};
4839
+ if (!(!E && !R)) {
4840
+ z((D) => ({ ...D, [s]: !0 }));
4841
4841
  try {
4842
- let B = [];
4843
- if (j)
4844
- B = await j();
4845
- else if (T) {
4846
- const ne = await fetch(T);
4842
+ let D = [];
4843
+ if (R)
4844
+ D = await R();
4845
+ else if (E) {
4846
+ const ne = await fetch(E);
4847
4847
  if (!ne.ok) throw new Error("fetch failed");
4848
- B = await ne.json();
4848
+ D = await ne.json();
4849
4849
  }
4850
- O((ne) => ({ ...ne, [s]: B }));
4850
+ O((ne) => ({ ...ne, [s]: D }));
4851
4851
  } catch {
4852
- O((B) => ({ ...B, [s]: [] }));
4852
+ O((D) => ({ ...D, [s]: [] }));
4853
4853
  } finally {
4854
- z((B) => ({ ...B, [s]: !1 }));
4854
+ z((D) => ({ ...D, [s]: !1 }));
4855
4855
  }
4856
4856
  }
4857
4857
  },
@@ -4864,83 +4864,83 @@ function ec({
4864
4864
  X.current = n;
4865
4865
  const J = le(e);
4866
4866
  J.current = e;
4867
- const E = le(i);
4868
- E.current = i, Q(() => {
4867
+ const L = le(i);
4868
+ L.current = i, Q(() => {
4869
4869
  if (e.length > 0 && r.length > 0) {
4870
4870
  const s = e.find((g) => g.selectable !== !1);
4871
4871
  s && v({ rowId: n(r[0]), colKey: s.key });
4872
4872
  }
4873
4873
  }, []), Q(() => {
4874
4874
  if (!x) return;
4875
- const s = M.current;
4875
+ const s = $.current;
4876
4876
  if (!s) return;
4877
4877
  const g = s.querySelector(
4878
4878
  `[data-cell-id="${x.rowId}:${x.colKey}"]`
4879
4879
  );
4880
4880
  if (!g) return;
4881
- const T = s.querySelector('[role="rowgroup"]');
4882
- g.style.scrollMarginTop = `${(T == null ? void 0 : T.offsetHeight) ?? 0}px`;
4883
- const j = s.querySelector('[role="row"]');
4884
- let B = 0;
4885
- j && j.querySelectorAll('[role="cell"], [role="columnheader"]').forEach((ne) => {
4886
- ne.style.position === "sticky" && ne.style.left !== "" && (B = Math.max(B, parseFloat(ne.style.left) + ne.offsetWidth));
4887
- }), g.style.scrollMarginLeft = `${B}px`, g.scrollIntoView({ block: "nearest", inline: "nearest" });
4881
+ const E = s.querySelector('[role="rowgroup"]');
4882
+ g.style.scrollMarginTop = `${(E == null ? void 0 : E.offsetHeight) ?? 0}px`;
4883
+ const R = s.querySelector('[role="row"]');
4884
+ let D = 0;
4885
+ R && R.querySelectorAll('[role="cell"], [role="columnheader"]').forEach((ne) => {
4886
+ ne.style.position === "sticky" && ne.style.left !== "" && (D = Math.max(D, parseFloat(ne.style.left) + ne.offsetWidth));
4887
+ }), g.style.scrollMarginLeft = `${D}px`, g.scrollIntoView({ block: "nearest", inline: "nearest" });
4888
4888
  }, [x]);
4889
- const H = we(
4889
+ const j = we(
4890
4890
  (s) => {
4891
- var B;
4892
- const g = J.current, T = /* @__PURE__ */ new Set(), j = [];
4893
- (B = M.current) == null || B.querySelectorAll("[data-cell-id]").forEach((ne) => {
4891
+ var D;
4892
+ const g = J.current, E = /* @__PURE__ */ new Set(), R = [];
4893
+ (D = $.current) == null || D.querySelectorAll("[data-cell-id]").forEach((ne) => {
4894
4894
  const ce = ne.dataset.cellId.split(":")[0];
4895
- T.has(ce) || (T.add(ce), j.push(ce));
4895
+ E.has(ce) || (E.add(ce), R.push(ce));
4896
4896
  }), v((ne) => {
4897
4897
  if (!ne) return ne;
4898
- const ce = g.findIndex((R) => R.key === ne.colKey), pe = j.indexOf(ne.rowId);
4899
- let $ = ce, ie = pe;
4898
+ const ce = g.findIndex((H) => H.key === ne.colKey), pe = R.indexOf(ne.rowId);
4899
+ let M = ce, ie = pe;
4900
4900
  if (s === "up") ie = Math.max(0, pe - 1);
4901
- else if (s === "down") ie = Math.min(j.length - 1, pe + 1);
4901
+ else if (s === "down") ie = Math.min(R.length - 1, pe + 1);
4902
4902
  else if (s === "left") {
4903
- let R = ce - 1;
4904
- for (; R >= 0 && g[R].selectable === !1; ) R--;
4905
- R >= 0 && ($ = R);
4903
+ let H = ce - 1;
4904
+ for (; H >= 0 && g[H].selectable === !1; ) H--;
4905
+ H >= 0 && (M = H);
4906
4906
  } else if (s === "right") {
4907
- let R = ce + 1;
4908
- for (; R < g.length && g[R].selectable === !1; ) R++;
4909
- R < g.length && ($ = R);
4907
+ let H = ce + 1;
4908
+ for (; H < g.length && g[H].selectable === !1; ) H++;
4909
+ H < g.length && (M = H);
4910
4910
  }
4911
- return $ === ce && ie === pe ? ne : { rowId: j[ie], colKey: g[$].key };
4911
+ return M === ce && ie === pe ? ne : { rowId: R[ie], colKey: g[M].key };
4912
4912
  });
4913
4913
  },
4914
4914
  []
4915
4915
  ), U = we((s = !0) => {
4916
4916
  const g = f.current;
4917
4917
  h(null), g && v(g), s && setTimeout(() => {
4918
- var T;
4919
- return (T = M.current) == null ? void 0 : T.focus({ preventScroll: !0 });
4918
+ var E;
4919
+ return (E = $.current) == null ? void 0 : E.focus({ preventScroll: !0 });
4920
4920
  }, 0);
4921
4921
  }, []), _ = we(
4922
- async (s, g, T) => {
4922
+ async (s, g, E) => {
4923
4923
  var se;
4924
- const j = J.current.find((y) => y.key === g);
4925
- if (!(j != null && j.editable)) return;
4926
- const { field: B, type: ne, mask: ce, validate: pe } = j.editable, $ = ne === "number" ? T === "" ? null : Number(T) : T;
4924
+ const R = J.current.find((y) => y.key === g);
4925
+ if (!(R != null && R.editable)) return;
4926
+ const { field: D, type: ne, mask: ce, validate: pe } = R.editable, M = ne === "number" ? E === "" ? null : Number(E) : E;
4927
4927
  if (ce) {
4928
- const y = vi(T, ce);
4928
+ const y = vi(E, ce);
4929
4929
  if (y) {
4930
4930
  w((I) => ({ ...I, [`${s}:${g}`]: y }));
4931
4931
  return;
4932
4932
  }
4933
4933
  }
4934
4934
  if (pe) {
4935
- const y = pe($);
4935
+ const y = pe(M);
4936
4936
  if (y) {
4937
4937
  w((I) => ({ ...I, [`${s}:${g}`]: y }));
4938
4938
  return;
4939
4939
  }
4940
4940
  }
4941
- const ie = X.current, R = te.current.find((y) => ie(y) === s);
4942
- if (!R) return;
4943
- const A = R[B];
4941
+ const ie = X.current, H = te.current.find((y) => ie(y) === s);
4942
+ if (!H) return;
4943
+ const A = H[D];
4944
4944
  h(null), w((y) => {
4945
4945
  const I = { ...y };
4946
4946
  return delete I[`${s}:${g}`], I;
@@ -4949,17 +4949,17 @@ function ec({
4949
4949
  if (v({ rowId: ie(re), colKey: g }), setTimeout(() => {
4950
4950
  var I, ue;
4951
4951
  const y = document.activeElement;
4952
- (!y || y === document.body || (I = M.current) != null && I.contains(y)) && ((ue = M.current) == null || ue.focus({ preventScroll: !0 }));
4953
- }, 0), String(A ?? "") === String($ ?? "")) return;
4954
- const me = { ...R, [B]: $ };
4952
+ (!y || y === document.body || (I = $.current) != null && I.contains(y)) && ((ue = $.current) == null || ue.focus({ preventScroll: !0 }));
4953
+ }, 0), String(A ?? "") === String(M ?? "")) return;
4954
+ const me = { ...H, [D]: M };
4955
4955
  m(
4956
4956
  (y) => y.map((I) => ie(I) === s ? me : I)
4957
4957
  );
4958
4958
  try {
4959
- await ((se = P.current) == null ? void 0 : se.call(P, { row: R, rowId: s, field: B, oldValue: A, newValue: $ }));
4959
+ await ((se = P.current) == null ? void 0 : se.call(P, { row: H, rowId: s, field: D, oldValue: A, newValue: M }));
4960
4960
  } catch {
4961
4961
  m(
4962
- (y) => y.map((I) => ie(I) === s ? R : I)
4962
+ (y) => y.map((I) => ie(I) === s ? H : I)
4963
4963
  ), w((y) => ({
4964
4964
  ...y,
4965
4965
  [`${s}:${g}`]: "Error al guardar. Intenta de nuevo."
@@ -4970,7 +4970,7 @@ function ec({
4970
4970
  ), oe = we(
4971
4971
  (s) => {
4972
4972
  if (f.current) return;
4973
- const g = L.current;
4973
+ const g = T.current;
4974
4974
  if (!(!g || ![
4975
4975
  "ArrowUp",
4976
4976
  "ArrowDown",
@@ -4982,40 +4982,40 @@ function ec({
4982
4982
  ].includes(s.key)))
4983
4983
  switch (s.preventDefault(), s.key) {
4984
4984
  case "ArrowUp":
4985
- H("up");
4985
+ j("up");
4986
4986
  break;
4987
4987
  case "ArrowDown":
4988
- H("down");
4988
+ j("down");
4989
4989
  break;
4990
4990
  case "ArrowLeft":
4991
- H("left");
4991
+ j("left");
4992
4992
  break;
4993
4993
  case "ArrowRight":
4994
- H("right");
4994
+ j("right");
4995
4995
  break;
4996
4996
  case "Tab":
4997
- H(s.shiftKey ? "left" : "right");
4997
+ j(s.shiftKey ? "left" : "right");
4998
4998
  break;
4999
4999
  case "Enter": {
5000
- const j = J.current.find((B) => B.key === g.colKey);
5001
- j != null && j.editable && !E.current ? (h(g), j.editable.type === "select" && !Y.current.has(g.colKey) && Z(g.colKey, j.editable)) : H("down");
5000
+ const R = J.current.find((D) => D.key === g.colKey);
5001
+ R != null && R.editable && !L.current ? (h(g), R.editable.type === "select" && !Y.current.has(g.colKey) && Z(g.colKey, R.editable)) : j("down");
5002
5002
  break;
5003
5003
  }
5004
5004
  }
5005
5005
  },
5006
- [H, Z]
5006
+ [j, Z]
5007
5007
  ), W = at(() => e.map((s) => {
5008
5008
  if (!s.editable || i) {
5009
- const { editable: T, selectable: j, ...B } = s;
5009
+ const { editable: E, selectable: R, ...D } = s;
5010
5010
  if (s.selectable === !1)
5011
- return { ...B, disableRowClick: !0 };
5012
- const ne = B.cell;
5011
+ return { ...D, disableRowClick: !0 };
5012
+ const ne = D.cell;
5013
5013
  return {
5014
- ...B,
5015
- className: `relative ${B.className ?? ""}`.trim(),
5014
+ ...D,
5015
+ className: `relative ${D.className ?? ""}`.trim(),
5016
5016
  disableRowClick: !0,
5017
5017
  cell: (ce) => {
5018
- const pe = n(ce), $ = (x == null ? void 0 : x.rowId) === pe && (x == null ? void 0 : x.colKey) === s.key;
5018
+ const pe = n(ce), M = (x == null ? void 0 : x.rowId) === pe && (x == null ? void 0 : x.colKey) === s.key;
5019
5019
  return /* @__PURE__ */ l(Re, { children: [
5020
5020
  /* @__PURE__ */ t(
5021
5021
  "span",
@@ -5024,11 +5024,11 @@ function ec({
5024
5024
  className: "absolute inset-0 z-10 cursor-default",
5025
5025
  onClick: () => {
5026
5026
  var ie;
5027
- v({ rowId: pe, colKey: s.key }), (ie = M.current) == null || ie.focus({ preventScroll: !0 });
5027
+ v({ rowId: pe, colKey: s.key }), (ie = $.current) == null || ie.focus({ preventScroll: !0 });
5028
5028
  }
5029
5029
  }
5030
5030
  ),
5031
- $ && /* @__PURE__ */ t(
5031
+ M && /* @__PURE__ */ t(
5032
5032
  "div",
5033
5033
  {
5034
5034
  className: "pointer-events-none absolute inset-0 z-20",
@@ -5046,19 +5046,19 @@ function ec({
5046
5046
  // Make the cell a positioned ancestor so the absolute edit overlay works
5047
5047
  className: `relative ${s.className ?? ""}`.trim(),
5048
5048
  disableRowClick: !0,
5049
- cell: (T) => {
5050
- const j = n(T), B = s.key, ne = (p == null ? void 0 : p.rowId) === j && (p == null ? void 0 : p.colKey) === B, ce = (x == null ? void 0 : x.rowId) === j && (x == null ? void 0 : x.colKey) === B, pe = S[`${j}:${B}`], $ = T[g.field], ie = String($ ?? ""), R = () => {
5049
+ cell: (E) => {
5050
+ const R = n(E), D = s.key, ne = (p == null ? void 0 : p.rowId) === R && (p == null ? void 0 : p.colKey) === D, ce = (x == null ? void 0 : x.rowId) === R && (x == null ? void 0 : x.colKey) === D, pe = S[`${R}:${D}`], M = E[g.field], ie = String(M ?? ""), H = () => {
5051
5051
  var G;
5052
- v({ rowId: j, colKey: B }), h({ rowId: j, colKey: B }), (G = M.current) == null || G.focus({ preventScroll: !0 }), g.type === "select" && !Y.current.has(B) && Z(B, g);
5052
+ v({ rowId: R, colKey: D }), h({ rowId: R, colKey: D }), (G = $.current) == null || G.focus({ preventScroll: !0 }), g.type === "select" && !Y.current.has(D) && Z(D, g);
5053
5053
  };
5054
5054
  if (ne) {
5055
5055
  const G = g.type === "select" ? /* @__PURE__ */ t(
5056
5056
  yi,
5057
5057
  {
5058
5058
  initialValue: ie,
5059
- options: k[B] ?? [],
5060
- loading: ee[B] ?? !1,
5061
- onCommit: (V) => _(j, B, V),
5059
+ options: k[D] ?? [],
5060
+ loading: ee[D] ?? !1,
5061
+ onCommit: (V) => _(R, D, V),
5062
5062
  onCancel: U
5063
5063
  }
5064
5064
  ) : /* @__PURE__ */ t(
@@ -5067,7 +5067,7 @@ function ec({
5067
5067
  initialValue: ie,
5068
5068
  type: g.type ?? "text",
5069
5069
  mask: g.mask,
5070
- onCommit: (V) => _(j, B, V),
5070
+ onCommit: (V) => _(R, D, V),
5071
5071
  onCancel: U
5072
5072
  }
5073
5073
  );
@@ -5081,14 +5081,14 @@ function ec({
5081
5081
  }
5082
5082
  );
5083
5083
  }
5084
- const A = s.cell(T);
5084
+ const A = s.cell(E);
5085
5085
  return /* @__PURE__ */ l(Re, { children: [
5086
5086
  /* @__PURE__ */ t(
5087
5087
  "span",
5088
5088
  {
5089
- "data-cell-id": `${j}:${B}`,
5089
+ "data-cell-id": `${R}:${D}`,
5090
5090
  className: "peer absolute inset-0 z-10 cursor-pointer",
5091
- onClick: R
5091
+ onClick: H
5092
5092
  }
5093
5093
  ),
5094
5094
  ce && /* @__PURE__ */ t(
@@ -5122,12 +5122,16 @@ function ec({
5122
5122
  return /* @__PURE__ */ t(
5123
5123
  "div",
5124
5124
  {
5125
- ref: M,
5125
+ ref: $,
5126
5126
  tabIndex: 0,
5127
5127
  onKeyDown: oe,
5128
5128
  onBlur: (s) => {
5129
5129
  var g;
5130
- (g = M.current) != null && g.contains(s.relatedTarget) || U(!1);
5130
+ (g = $.current) != null && g.contains(s.relatedTarget) || setTimeout(() => {
5131
+ var R, D;
5132
+ const E = document.activeElement;
5133
+ E && ((R = E.closest) != null && R.call(E, "[data-bonsaif-select-dropdown]")) || (D = $.current) != null && D.contains(E) || U(!1);
5134
+ }, 0);
5131
5135
  },
5132
5136
  style: { width: "100%", minWidth: 0, outline: "none" },
5133
5137
  children: /* @__PURE__ */ t(
@@ -5234,7 +5238,7 @@ function tc({
5234
5238
  const p = {
5235
5239
  from: Wt(e),
5236
5240
  to: Wt(r)
5237
- }, h = Wt(a), [x, v] = D(
5241
+ }, h = Wt(a), [x, v] = B(
5238
5242
  Wt(i || e)
5239
5243
  );
5240
5244
  return Q(() => {
@@ -5259,8 +5263,8 @@ function tc({
5259
5263
  selected: p,
5260
5264
  month: x,
5261
5265
  onMonthChange: v,
5262
- onSelect: (L) => {
5263
- const S = L != null && L.from ? ea(L.from) : e, w = L != null && L.to ? ea(L.to) : "";
5266
+ onSelect: (T) => {
5267
+ const S = T != null && T.from ? ea(T.from) : e, w = T != null && T.to ? ea(T.to) : "";
5264
5268
  n({ startDate: S, endDate: w });
5265
5269
  },
5266
5270
  numberOfMonths: c,
@@ -5360,15 +5364,15 @@ function tc({
5360
5364
  }
5361
5365
  },
5362
5366
  formatters: {
5363
- formatCaption: (L) => ki(
5367
+ formatCaption: (T) => ki(
5364
5368
  new Intl.DateTimeFormat("es-MX", {
5365
5369
  month: "long",
5366
5370
  year: "numeric"
5367
- }).format(L)
5371
+ }).format(T)
5368
5372
  ),
5369
- formatWeekdayName: (L) => new Intl.DateTimeFormat("es-MX", {
5373
+ formatWeekdayName: (T) => new Intl.DateTimeFormat("es-MX", {
5370
5374
  weekday: "short"
5371
- }).format(L)
5375
+ }).format(T)
5372
5376
  },
5373
5377
  labels: {
5374
5378
  labelMonthDropdown: () => "Mes",
@@ -5425,40 +5429,40 @@ function rc({
5425
5429
  menuClassName: u = "",
5426
5430
  onOpenChange: m
5427
5431
  }) {
5428
- const [f, p] = D(!1), [h, x] = D(!1), [v, L] = D({}), S = le(null), w = le(null), k = we(
5429
- (M) => {
5430
- p(M), m == null || m(M);
5432
+ const [f, p] = B(!1), [h, x] = B(!1), [v, T] = B({}), S = le(null), w = le(null), k = we(
5433
+ ($) => {
5434
+ p($), m == null || m($);
5431
5435
  },
5432
5436
  [m]
5433
5437
  ), O = we(() => {
5434
- const M = S.current;
5435
- if (!M) return;
5436
- const q = M.getBoundingClientRect(), Z = typeof a == "number" ? a : q.width, te = typeof a == "number" ? a : Math.max(q.width, 180), P = n === "end" ? Math.max(8, q.right - te) : Math.min(q.left, window.innerWidth - te - 8), X = window.innerHeight - q.bottom, J = X < 240 && q.top > X ? void 0 : q.bottom + 6, E = J === void 0 ? window.innerHeight - q.top + 6 : void 0;
5437
- L({
5438
+ const $ = S.current;
5439
+ if (!$) return;
5440
+ const q = $.getBoundingClientRect(), Z = typeof a == "number" ? a : q.width, te = typeof a == "number" ? a : Math.max(q.width, 180), P = n === "end" ? Math.max(8, q.right - te) : Math.min(q.left, window.innerWidth - te - 8), X = window.innerHeight - q.bottom, J = X < 240 && q.top > X ? void 0 : q.bottom + 6, L = J === void 0 ? window.innerHeight - q.top + 6 : void 0;
5441
+ T({
5438
5442
  position: "fixed",
5439
5443
  zIndex: 9999,
5440
5444
  left: P,
5441
5445
  top: J,
5442
- bottom: E,
5446
+ bottom: L,
5443
5447
  width: Si(typeof a == "number" ? Z : a)
5444
5448
  });
5445
5449
  }, [n, a]);
5446
5450
  Q(() => x(!0), []), Q(() => {
5447
5451
  if (!f) return;
5448
5452
  O();
5449
- const M = (Z) => {
5453
+ const $ = (Z) => {
5450
5454
  var P, X;
5451
5455
  const te = Z.target;
5452
5456
  !((P = S.current) != null && P.contains(te)) && !((X = w.current) != null && X.contains(te)) && k(!1);
5453
5457
  }, q = (Z) => {
5454
5458
  Z.key === "Escape" && k(!1);
5455
5459
  };
5456
- return document.addEventListener("mousedown", M), window.addEventListener("keydown", q), window.addEventListener("resize", O), window.addEventListener("scroll", O, !0), () => {
5457
- document.removeEventListener("mousedown", M), window.removeEventListener("keydown", q), window.removeEventListener("resize", O), window.removeEventListener("scroll", O, !0);
5460
+ return document.addEventListener("mousedown", $), window.addEventListener("keydown", q), window.addEventListener("resize", O), window.addEventListener("scroll", O, !0), () => {
5461
+ document.removeEventListener("mousedown", $), window.removeEventListener("keydown", q), window.removeEventListener("resize", O), window.removeEventListener("scroll", O, !0);
5458
5462
  };
5459
5463
  }, [f, k, O]);
5460
- const ee = (M) => {
5461
- i || (M.key === "Enter" || M.key === " ") && (M.preventDefault(), k(!f));
5464
+ const ee = ($) => {
5465
+ i || ($.key === "Enter" || $.key === " ") && ($.preventDefault(), k(!f));
5462
5466
  }, z = cn(e) ? Ro(e, {
5463
5467
  onClick: () => {
5464
5468
  i || (ta(), k(!f));
@@ -5471,32 +5475,32 @@ function rc({
5471
5475
  "data-bonsaif-overlay": "true",
5472
5476
  className: `overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-1 shadow-xl ${u}`,
5473
5477
  style: v,
5474
- children: r.map((M) => /* @__PURE__ */ l("div", { children: [
5475
- M.separatorBefore && /* @__PURE__ */ t("div", { className: "my-1 border-t border-[var(--border)]" }),
5478
+ children: r.map(($) => /* @__PURE__ */ l("div", { children: [
5479
+ $.separatorBefore && /* @__PURE__ */ t("div", { className: "my-1 border-t border-[var(--border)]" }),
5476
5480
  /* @__PURE__ */ l(
5477
5481
  "button",
5478
5482
  {
5479
5483
  type: "button",
5480
5484
  role: "menuitem",
5481
- disabled: M.disabled,
5485
+ disabled: $.disabled,
5482
5486
  onClick: () => {
5483
5487
  var q;
5484
- M.disabled || (ta(), (q = M.onSelect) == null || q.call(M), k(!1));
5488
+ $.disabled || (ta(), (q = $.onSelect) == null || q.call($), k(!1));
5485
5489
  },
5486
5490
  className: "flex w-full min-w-0 items-start 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",
5487
5491
  style: {
5488
- color: M.danger ? "var(--danger)" : "var(--text-main)"
5492
+ color: $.danger ? "var(--danger)" : "var(--text-main)"
5489
5493
  },
5490
5494
  children: [
5491
- M.icon && /* @__PURE__ */ t("span", { className: "mt-0.5 shrink-0", children: M.icon }),
5495
+ $.icon && /* @__PURE__ */ t("span", { className: "mt-0.5 shrink-0", children: $.icon }),
5492
5496
  /* @__PURE__ */ l("span", { className: "min-w-0 flex-1", children: [
5493
- /* @__PURE__ */ t("span", { className: "block truncate text-sm font-medium", children: M.label }),
5494
- M.description && /* @__PURE__ */ t("span", { className: "block truncate text-xs text-[var(--text-muted)]", children: M.description })
5497
+ /* @__PURE__ */ t("span", { className: "block truncate text-sm font-medium", children: $.label }),
5498
+ $.description && /* @__PURE__ */ t("span", { className: "block truncate text-xs text-[var(--text-muted)]", children: $.description })
5495
5499
  ] })
5496
5500
  ]
5497
5501
  }
5498
5502
  )
5499
- ] }, M.id))
5503
+ ] }, $.id))
5500
5504
  }
5501
5505
  ) : null;
5502
5506
  return /* @__PURE__ */ l(
@@ -5531,7 +5535,7 @@ function nc({
5531
5535
  bodyClassName: h = "flex-1 overflow-y-auto px-6 py-5",
5532
5536
  width: x = 440,
5533
5537
  hasUnsavedChanges: v = !1,
5534
- unsavedChangesTitle: L = "Descartar cambios",
5538
+ unsavedChangesTitle: T = "Descartar cambios",
5535
5539
  unsavedChangesDescription: S = "Hay cambios sin guardar. Si cierras el drawer se perderán.",
5536
5540
  unsavedChangesConfirmLabel: w = "Descartar",
5537
5541
  unsavedChangesCancelLabel: k = "Seguir editando",
@@ -5539,7 +5543,7 @@ function nc({
5539
5543
  disabled: ee = !1,
5540
5544
  children: z
5541
5545
  }) {
5542
- const [Y, M] = D(!1), [q, Z] = D(!1), [te, P] = D(!1), X = we(() => {
5546
+ const [Y, $] = B(!1), [q, Z] = B(!1), [te, P] = B(!1), X = we(() => {
5543
5547
  Z(!0), requestAnimationFrame(() => {
5544
5548
  requestAnimationFrame(() => P(!0));
5545
5549
  });
@@ -5548,17 +5552,17 @@ function nc({
5548
5552
  () => Z(!1),
5549
5553
  Ei
5550
5554
  );
5551
- }, []), E = we(() => {
5555
+ }, []), L = we(() => {
5552
5556
  if (v) {
5553
5557
  X();
5554
5558
  return;
5555
5559
  }
5556
5560
  r();
5557
- }, [v, r, X]), H = we(() => {
5561
+ }, [v, r, X]), j = we(() => {
5558
5562
  P(!1), Z(!1), O == null || O(), r();
5559
5563
  }, [r, O]);
5560
5564
  return Q(() => {
5561
- M(!0);
5565
+ $(!0);
5562
5566
  }, []), Q(() => (document.body.style.overflow = e ? "hidden" : "", e || (P(!1), Z(!1)), () => {
5563
5567
  document.body.style.overflow = "";
5564
5568
  }), [e]), Q(() => {
@@ -5569,11 +5573,11 @@ function nc({
5569
5573
  J();
5570
5574
  return;
5571
5575
  }
5572
- E();
5576
+ L();
5573
5577
  }
5574
5578
  };
5575
5579
  return window.addEventListener("keydown", U), () => window.removeEventListener("keydown", U);
5576
- }, [J, q, e, E]), Y ? Ze(
5580
+ }, [J, q, e, L]), Y ? Ze(
5577
5581
  /* @__PURE__ */ l(
5578
5582
  "div",
5579
5583
  {
@@ -5585,7 +5589,7 @@ function nc({
5585
5589
  "div",
5586
5590
  {
5587
5591
  className: `absolute inset-0 ${ra}`,
5588
- onClick: E
5592
+ onClick: L
5589
5593
  }
5590
5594
  ),
5591
5595
  /* @__PURE__ */ l(
@@ -5605,7 +5609,7 @@ function nc({
5605
5609
  style: { borderBottom: "1px solid var(--border)" },
5606
5610
  children: [
5607
5611
  /* @__PURE__ */ l("div", { className: "flex items-center gap-3 min-w-0", children: [
5608
- /* @__PURE__ */ t(Be, { variant: "icon", onClick: E, title: "Cerrar", children: /* @__PURE__ */ t(Ie, { className: "w-5 h-5" }) }),
5612
+ /* @__PURE__ */ t(Be, { variant: "icon", onClick: L, title: "Cerrar", children: /* @__PURE__ */ t(Ie, { className: "w-5 h-5" }) }),
5609
5613
  i && /* @__PURE__ */ t("div", { className: "flex-shrink-0", children: i }),
5610
5614
  /* @__PURE__ */ l("div", { className: "min-w-0", children: [
5611
5615
  /* @__PURE__ */ t(
@@ -5634,7 +5638,7 @@ function nc({
5634
5638
  {
5635
5639
  variant: "secondary",
5636
5640
  size: "sm",
5637
- onClick: E,
5641
+ onClick: L,
5638
5642
  style: { background: "var(--bg-input)" },
5639
5643
  children: "Cancelar"
5640
5644
  }
@@ -5675,7 +5679,7 @@ function nc({
5675
5679
  {
5676
5680
  role: "dialog",
5677
5681
  "aria-modal": "true",
5678
- "aria-label": L,
5682
+ "aria-label": T,
5679
5683
  className: "fixed inset-0 z-[1001] flex items-center justify-center p-4",
5680
5684
  children: [
5681
5685
  /* @__PURE__ */ t(
@@ -5724,7 +5728,7 @@ function nc({
5724
5728
  {
5725
5729
  className: "mb-1 text-base font-semibold",
5726
5730
  style: { color: "var(--text-main, #0f2f2c)" },
5727
- children: L
5731
+ children: T
5728
5732
  }
5729
5733
  ),
5730
5734
  /* @__PURE__ */ t(
@@ -5754,7 +5758,7 @@ function nc({
5754
5758
  Be,
5755
5759
  {
5756
5760
  variant: "secondary",
5757
- onClick: H,
5761
+ onClick: j,
5758
5762
  className: "flex-1 border",
5759
5763
  style: {
5760
5764
  background: "var(--warning, #d97706)",
@@ -5985,16 +5989,16 @@ function Wa({
5985
5989
  required: x,
5986
5990
  ...v
5987
5991
  }) {
5988
- const [L, S] = D(() => !!v.autoFocus), [w, k] = D(!1), O = v.type === "password" && f, ee = O && w ? "text" : v.type, z = !!a, Y = z && i !== "tooltip", M = z && i !== "inline", q = p ? x : void 0, Z = z ? "border-[var(--danger)] focus:border-[var(--danger)]" : "", te = M ? O ? "pr-20" : "pr-10" : O ? "pr-10" : "", P = v.value !== void 0 ? String(v.value).length > 0 : v.defaultValue !== void 0 && String(v.defaultValue).length > 0, X = L || P, J = {
5992
+ const [T, S] = B(() => !!v.autoFocus), [w, k] = B(!1), O = v.type === "password" && f, ee = O && w ? "text" : v.type, z = !!a, Y = z && i !== "tooltip", $ = z && i !== "inline", q = p ? x : void 0, Z = z ? "border-[var(--danger)] focus:border-[var(--danger)]" : "", te = $ ? O ? "pr-20" : "pr-10" : O ? "pr-10" : "", P = v.value !== void 0 ? String(v.value).length > 0 : v.defaultValue !== void 0 && String(v.defaultValue).length > 0, X = T || P, J = {
5989
5993
  top: X ? 7 : 12,
5990
- color: L ? "var(--primary)" : "var(--text-muted)",
5994
+ color: T ? "var(--primary)" : "var(--text-muted)",
5991
5995
  fontSize: X ? 10 : 13,
5992
5996
  fontWeight: X ? 600 : 400,
5993
5997
  textTransform: X ? "uppercase" : "none"
5994
- }, E = (oe) => {
5998
+ }, L = (oe) => {
5995
5999
  var W;
5996
6000
  S(!0), (W = v.onFocus) == null || W.call(v, oe);
5997
- }, H = (oe) => {
6001
+ }, j = (oe) => {
5998
6002
  var W;
5999
6003
  S(!1), (W = v.onBlur) == null || W.call(v, oe);
6000
6004
  }, U = O ? /* @__PURE__ */ l(
@@ -6025,7 +6029,7 @@ function Wa({
6025
6029
  )
6026
6030
  ]
6027
6031
  }
6028
- ) : null, _ = M ? /* @__PURE__ */ t(
6032
+ ) : null, _ = $ ? /* @__PURE__ */ t(
6029
6033
  Ut,
6030
6034
  {
6031
6035
  as: "span",
@@ -6055,8 +6059,8 @@ function Wa({
6055
6059
  "aria-invalid": z || v["aria-invalid"],
6056
6060
  "data-has-value": P ? "true" : void 0,
6057
6061
  className: `h-11 w-full pt-5 ${te} ${Z} ${h}`,
6058
- onFocus: E,
6059
- onBlur: H
6062
+ onFocus: L,
6063
+ onBlur: j
6060
6064
  }
6061
6065
  ),
6062
6066
  /* @__PURE__ */ l(
@@ -6097,8 +6101,8 @@ function Wa({
6097
6101
  required: q,
6098
6102
  "aria-invalid": z || v["aria-invalid"],
6099
6103
  className: `w-full ${te} ${Z} ${h}`,
6100
- onFocus: E,
6101
- onBlur: H
6104
+ onFocus: L,
6105
+ onBlur: j
6102
6106
  }
6103
6107
  ),
6104
6108
  _,
@@ -6133,9 +6137,9 @@ function bc({
6133
6137
  onChange: f,
6134
6138
  ...p
6135
6139
  }) {
6136
- const [h, x] = D(
6140
+ const [h, x] = B(
6137
6141
  () => oa(m)
6138
- ), v = u !== void 0 ? oa(u) : h, L = n && v.length > 0 && !ja(v) ? a : void 0;
6142
+ ), v = u !== void 0 ? oa(u) : h, T = n && v.length > 0 && !ja(v) ? a : void 0;
6139
6143
  return /* @__PURE__ */ t(
6140
6144
  Wa,
6141
6145
  {
@@ -6145,7 +6149,7 @@ function bc({
6145
6149
  type: "text",
6146
6150
  inputMode: r,
6147
6151
  autoComplete: e,
6148
- error: c ?? L,
6152
+ error: c ?? T,
6149
6153
  errorDisplay: i,
6150
6154
  onChange: (w) => {
6151
6155
  u === void 0 && x(w.currentTarget.value), f == null || f(w);
@@ -6221,7 +6225,7 @@ function pc({
6221
6225
  appendFiles: h = !1,
6222
6226
  showFileList: x = !0,
6223
6227
  clearable: v = !0,
6224
- browseLabel: L = "Buscar archivos",
6228
+ browseLabel: T = "Buscar archivos",
6225
6229
  dropLabel: S = "Suelta los archivos aqui",
6226
6230
  emptyLabel: w = "Arrastra y suelta archivos",
6227
6231
  emptyDescription: k = "o haz click para buscarlos en tu equipo",
@@ -6229,7 +6233,7 @@ function pc({
6229
6233
  size: ee = "md",
6230
6234
  containerClassName: z = "",
6231
6235
  dropzoneClassName: Y = "",
6232
- fileListClassName: M = "",
6236
+ fileListClassName: $ = "",
6233
6237
  className: q = "",
6234
6238
  id: Z,
6235
6239
  accept: te,
@@ -6237,7 +6241,7 @@ function pc({
6237
6241
  required: X,
6238
6242
  ...J
6239
6243
  }) {
6240
- const E = Ho(), H = Z ?? E, U = le(null), [_, oe] = D(!1), [W, s] = D(c), g = i ?? W, T = !!n, j = v && g.length > 0 && !P, B = (re, me) => {
6244
+ const L = Ho(), j = Z ?? L, U = le(null), [_, oe] = B(!1), [W, s] = B(c), g = i ?? W, E = !!n, R = v && g.length > 0 && !P, D = (re, me) => {
6241
6245
  i === void 0 && s(re), u == null || u(re, me);
6242
6246
  }, ne = (re, me) => {
6243
6247
  const se = re.filter(
@@ -6245,24 +6249,24 @@ function pc({
6245
6249
  ), y = re.filter(
6246
6250
  (be) => !la(be, te)
6247
6251
  ), I = h ? [...g, ...se] : se, ue = Wi(I, f, p);
6248
- y.length > 0 && (m == null || m(y)), B(ue, me);
6252
+ y.length > 0 && (m == null || m(y)), D(ue, me);
6249
6253
  }, ce = () => {
6250
6254
  var re;
6251
6255
  P || (re = U.current) == null || re.click();
6252
6256
  }, pe = (re) => {
6253
6257
  ne(Array.from(re.target.files ?? []), re), re.target.value = "";
6254
- }, $ = (re) => {
6258
+ }, M = (re) => {
6255
6259
  re.preventDefault(), P || oe(!0);
6256
6260
  }, ie = (re) => {
6257
6261
  re.currentTarget.contains(re.relatedTarget) || oe(!1);
6258
- }, R = (re) => {
6262
+ }, H = (re) => {
6259
6263
  re.preventDefault(), oe(!1), !P && ne(Array.from(re.dataTransfer.files), re);
6260
6264
  }, A = (re) => {
6261
6265
  re.key !== "Enter" && re.key !== " " || (re.preventDefault(), ce());
6262
6266
  }, G = (re) => {
6263
- B(g.filter((me, se) => se !== re));
6267
+ D(g.filter((me, se) => se !== re));
6264
6268
  }, V = () => {
6265
- B([]);
6269
+ D([]);
6266
6270
  };
6267
6271
  return /* @__PURE__ */ l("div", { className: `flex flex-col gap-2 ${z}`, children: [
6268
6272
  (e || a) && /* @__PURE__ */ l("div", { className: "inline-flex items-center gap-1 text-xs font-semibold uppercase text-[var(--text-muted)]", children: [
@@ -6275,13 +6279,13 @@ function pc({
6275
6279
  {
6276
6280
  ...J,
6277
6281
  ref: U,
6278
- id: H,
6282
+ id: j,
6279
6283
  type: "file",
6280
6284
  accept: te,
6281
6285
  multiple: f,
6282
6286
  disabled: P,
6283
6287
  required: X && g.length === 0,
6284
- "aria-invalid": T || J["aria-invalid"],
6288
+ "aria-invalid": E || J["aria-invalid"],
6285
6289
  className: "sr-only",
6286
6290
  onChange: pe
6287
6291
  }
@@ -6291,14 +6295,14 @@ function pc({
6291
6295
  {
6292
6296
  role: "button",
6293
6297
  tabIndex: P ? -1 : 0,
6294
- "aria-controls": H,
6298
+ "aria-controls": j,
6295
6299
  "aria-disabled": P || void 0,
6296
- "aria-invalid": T || void 0,
6297
- className: `flex cursor-pointer flex-col items-center justify-center gap-3 rounded-lg border border-dashed bg-[var(--bg-card)] text-center outline-none transition-colors focus:border-[var(--primary)] focus:bg-[var(--bg-input)] ${_i[ee]} ${_ ? "border-[var(--primary)] bg-[var(--bg-input)]" : T ? "border-[var(--danger)]" : "border-[var(--border)]"} ${P ? "cursor-not-allowed opacity-60" : "hover:border-[var(--primary)] hover:bg-[var(--bg-input)]"} ${Y} ${q}`,
6300
+ "aria-invalid": E || void 0,
6301
+ className: `flex cursor-pointer flex-col items-center justify-center gap-3 rounded-lg border border-dashed bg-[var(--bg-card)] text-center outline-none transition-colors focus:border-[var(--primary)] focus:bg-[var(--bg-input)] ${_i[ee]} ${_ ? "border-[var(--primary)] bg-[var(--bg-input)]" : E ? "border-[var(--danger)]" : "border-[var(--border)]"} ${P ? "cursor-not-allowed opacity-60" : "hover:border-[var(--primary)] hover:bg-[var(--bg-input)]"} ${Y} ${q}`,
6298
6302
  onClick: ce,
6299
- onDragOver: $,
6303
+ onDragOver: M,
6300
6304
  onDragLeave: ie,
6301
- onDrop: R,
6305
+ onDrop: H,
6302
6306
  onKeyDown: A,
6303
6307
  children: [
6304
6308
  /* @__PURE__ */ t("span", { className: "flex h-10 w-10 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-input)] text-[var(--text-muted)]", children: /* @__PURE__ */ t(Yo, { className: "h-5 w-5" }) }),
@@ -6306,18 +6310,18 @@ function pc({
6306
6310
  /* @__PURE__ */ t("span", { className: "block text-sm font-semibold text-[var(--text-main)]", children: _ ? S : w }),
6307
6311
  k && /* @__PURE__ */ t("span", { className: "block text-sm text-[var(--text-muted)]", children: k })
6308
6312
  ] }),
6309
- L && /* @__PURE__ */ t("span", { className: "inline-flex h-9 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] px-3 text-xs font-semibold text-[var(--text-main)] shadow-sm shadow-black/5 transition-colors", children: L })
6313
+ T && /* @__PURE__ */ t("span", { className: "inline-flex h-9 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] px-3 text-xs font-semibold text-[var(--text-main)] shadow-sm shadow-black/5 transition-colors", children: T })
6310
6314
  ]
6311
6315
  }
6312
6316
  ),
6313
6317
  x && g.length > 0 && /* @__PURE__ */ l(
6314
6318
  "div",
6315
6319
  {
6316
- className: `rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${M}`,
6320
+ className: `rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${$}`,
6317
6321
  children: [
6318
6322
  /* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3 border-b border-[var(--border)] px-3 py-2", children: [
6319
6323
  /* @__PURE__ */ t("span", { className: "text-xs font-semibold uppercase text-[var(--text-muted)]", children: O }),
6320
- j && /* @__PURE__ */ t(
6324
+ R && /* @__PURE__ */ t(
6321
6325
  "button",
6322
6326
  {
6323
6327
  type: "button",
@@ -6382,12 +6386,12 @@ function hc({
6382
6386
  onSave: f,
6383
6387
  onChange: p
6384
6388
  }) {
6385
- const [h, x] = D(
6389
+ const [h, x] = B(
6386
6390
  () => e.map((z) => ({ key: !1, type: "", ...z }))
6387
- ), [v, L] = D(""), [S, w] = D(""), k = we(
6391
+ ), [v, T] = B(""), [S, w] = B(""), k = we(
6388
6392
  (z, Y) => {
6389
- x((M) => {
6390
- const q = M.map((Z, te) => te === z ? { ...Z, ...Y } : Z);
6393
+ x(($) => {
6394
+ const q = $.map((Z, te) => te === z ? { ...Z, ...Y } : Z);
6391
6395
  return p == null || p(q), q;
6392
6396
  });
6393
6397
  },
@@ -6407,15 +6411,15 @@ function hc({
6407
6411
  w("Ese campo ya existe en el arreglo.");
6408
6412
  return;
6409
6413
  }
6410
- const M = {
6414
+ const $ = {
6411
6415
  name: z,
6412
6416
  key: !1,
6413
6417
  type: ((q = n[0]) == null ? void 0 : q.value) ?? ""
6414
6418
  };
6415
6419
  x((Z) => {
6416
- const te = [...Z, M];
6420
+ const te = [...Z, $];
6417
6421
  return p == null || p(te), te;
6418
- }), L(""), w("");
6422
+ }), T(""), w("");
6419
6423
  }, [n, h, v, p]);
6420
6424
  return /* @__PURE__ */ l(
6421
6425
  "div",
@@ -6474,7 +6478,7 @@ function hc({
6474
6478
  {
6475
6479
  size: "sm",
6476
6480
  checked: z.key ?? !1,
6477
- onChange: (M) => k(Y, { key: M.target.checked }),
6481
+ onChange: ($) => k(Y, { key: $.target.checked }),
6478
6482
  "aria-label": `${z.name} es clave`
6479
6483
  }
6480
6484
  ) }),
@@ -6482,7 +6486,7 @@ function hc({
6482
6486
  At,
6483
6487
  {
6484
6488
  value: z.type ?? "",
6485
- onChange: (M) => k(Y, { type: M }),
6489
+ onChange: ($) => k(Y, { type: $ }),
6486
6490
  options: n,
6487
6491
  placeholder: "—",
6488
6492
  emptyLabel: "—",
@@ -6518,7 +6522,7 @@ function hc({
6518
6522
  type: "text",
6519
6523
  value: v,
6520
6524
  onChange: (z) => {
6521
- L(z.currentTarget.value), S && w("");
6525
+ T(z.currentTarget.value), S && w("");
6522
6526
  },
6523
6527
  onKeyDown: (z) => {
6524
6528
  z.key === "Enter" && (z.preventDefault(), ee());
@@ -6604,24 +6608,24 @@ function vc({
6604
6608
  minOptionsForSearch: h = 6,
6605
6609
  maxVisibleValues: x = 2,
6606
6610
  truncateSelectedValues: v = !0,
6607
- emptyText: L = "Sin resultados",
6611
+ emptyText: T = "Sin resultados",
6608
6612
  clearLabel: S = "Limpiar seleccion"
6609
6613
  }) {
6610
- const [w, k] = D(!1), [O, ee] = D(""), [z, Y] = D(0), [M, q] = D(!1), [Z, te] = D({}), P = le(null), X = le(null), J = le(null), E = le(null), H = p && n.length >= h, U = at(() => new Set(e), [e]), _ = at(
6611
- () => n.filter(($) => U.has($.value)),
6614
+ const [w, k] = B(!1), [O, ee] = B(""), [z, Y] = B(0), [$, q] = B(!1), [Z, te] = B({}), P = le(null), X = le(null), J = le(null), L = le(null), j = p && n.length >= h, U = at(() => new Set(e), [e]), _ = at(
6615
+ () => n.filter((M) => U.has(M.value)),
6612
6616
  [n, U]
6613
6617
  ), oe = x === "all" ? _.length : x, W = _.slice(0, oe), s = Math.max(
6614
6618
  0,
6615
6619
  _.length - W.length
6616
- ), g = H && O.trim() ? n.filter(
6617
- ($) => {
6620
+ ), g = j && O.trim() ? n.filter(
6621
+ (M) => {
6618
6622
  var ie;
6619
- return $.label.toLowerCase().includes(O.toLowerCase()) || ((ie = $.sublabel) == null ? void 0 : ie.toLowerCase().includes(O.toLowerCase()));
6623
+ return M.label.toLowerCase().includes(O.toLowerCase()) || ((ie = M.sublabel) == null ? void 0 : ie.toLowerCase().includes(O.toLowerCase()));
6620
6624
  }
6621
- ) : n, T = we(() => {
6622
- const $ = P.current;
6623
- if (!$) return;
6624
- const ie = $.getBoundingClientRect(), R = H ? 304 : 244, A = window.innerHeight - ie.bottom, G = A < R && ie.top > A;
6625
+ ) : n, E = we(() => {
6626
+ const M = P.current;
6627
+ if (!M) return;
6628
+ const ie = M.getBoundingClientRect(), H = j ? 304 : 244, A = window.innerHeight - ie.bottom, G = A < H && ie.top > A;
6625
6629
  te({
6626
6630
  position: "fixed",
6627
6631
  left: ie.left,
@@ -6630,49 +6634,49 @@ function vc({
6630
6634
  width: ie.width,
6631
6635
  zIndex: 9999
6632
6636
  });
6633
- }, [H]), j = we(
6634
- ($) => {
6635
- Ki(e, $) || r($);
6637
+ }, [j]), R = we(
6638
+ (M) => {
6639
+ Ki(e, M) || r(M);
6636
6640
  },
6637
6641
  [r, e]
6638
- ), B = we(
6639
- ($) => {
6640
- const ie = n.find((A) => A.value === $);
6642
+ ), D = we(
6643
+ (M) => {
6644
+ const ie = n.find((A) => A.value === M);
6641
6645
  if (ie != null && ie.disabled) return;
6642
- const R = U.has($) ? e.filter((A) => A !== $) : [...e, $];
6643
- j(R);
6646
+ const H = U.has(M) ? e.filter((A) => A !== M) : [...e, M];
6647
+ R(H);
6644
6648
  },
6645
- [j, n, e, U]
6646
- ), ne = we(() => j([]), [j]);
6649
+ [R, n, e, U]
6650
+ ), ne = we(() => R([]), [R]);
6647
6651
  Q(() => q(!0), []), Q(() => {
6648
6652
  if (!w) return;
6649
- function $(ie) {
6653
+ function M(ie) {
6650
6654
  var A, G;
6651
- const R = ie.target;
6652
- !((A = P.current) != null && A.contains(R)) && !((G = X.current) != null && G.contains(R)) && (k(!1), ee(""));
6655
+ const H = ie.target;
6656
+ !((A = P.current) != null && A.contains(H)) && !((G = X.current) != null && G.contains(H)) && (k(!1), ee(""));
6653
6657
  }
6654
- return document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $);
6658
+ return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
6655
6659
  }, [w]), Q(() => {
6656
- w && (Y(0), T(), H && setTimeout(() => {
6657
- var $;
6658
- return ($ = J.current) == null ? void 0 : $.focus();
6660
+ w && (Y(0), E(), j && setTimeout(() => {
6661
+ var M;
6662
+ return (M = J.current) == null ? void 0 : M.focus();
6659
6663
  }, 0));
6660
- }, [w, H, T]), Q(() => {
6664
+ }, [w, j, E]), Q(() => {
6661
6665
  if (w)
6662
- return window.addEventListener("resize", T), window.addEventListener("scroll", T, !0), () => {
6663
- window.removeEventListener("resize", T), window.removeEventListener("scroll", T, !0);
6666
+ return window.addEventListener("resize", E), window.addEventListener("scroll", E, !0), () => {
6667
+ window.removeEventListener("resize", E), window.removeEventListener("scroll", E, !0);
6664
6668
  };
6665
- }, [w, T]), Q(() => {
6666
- if (z < 0 || !E.current) return;
6667
- const $ = E.current.children[z];
6668
- $ == null || $.scrollIntoView({ block: "nearest" });
6669
+ }, [w, E]), Q(() => {
6670
+ if (z < 0 || !L.current) return;
6671
+ const M = L.current.children[z];
6672
+ M == null || M.scrollIntoView({ block: "nearest" });
6669
6673
  }, [z]);
6670
- function ce($) {
6674
+ function ce(M) {
6671
6675
  if (!w) {
6672
- ($.key === "Enter" || $.key === " " || $.key === "ArrowDown") && ($.preventDefault(), k(!0));
6676
+ (M.key === "Enter" || M.key === " " || M.key === "ArrowDown") && (M.preventDefault(), k(!0));
6673
6677
  return;
6674
6678
  }
6675
- $.key === "Escape" && ($.preventDefault(), k(!1), ee("")), $.key === "ArrowDown" && ($.preventDefault(), Y((ie) => Math.min(ie + 1, g.length - 1))), $.key === "ArrowUp" && ($.preventDefault(), Y((ie) => Math.max(ie - 1, 0))), $.key === "Enter" && g[z] && ($.preventDefault(), B(g[z].value)), $.key === "Backspace" && !O && e.length && ($.preventDefault(), j(e.slice(0, -1)));
6679
+ M.key === "Escape" && (M.preventDefault(), k(!1), ee("")), M.key === "ArrowDown" && (M.preventDefault(), Y((ie) => Math.min(ie + 1, g.length - 1))), M.key === "ArrowUp" && (M.preventDefault(), Y((ie) => Math.max(ie - 1, 0))), M.key === "Enter" && g[z] && (M.preventDefault(), D(g[z].value)), M.key === "Backspace" && !O && e.length && (M.preventDefault(), R(e.slice(0, -1)));
6676
6680
  }
6677
6681
  const pe = /* @__PURE__ */ l(
6678
6682
  "div",
@@ -6685,7 +6689,7 @@ function vc({
6685
6689
  border: "1px solid var(--border)"
6686
6690
  },
6687
6691
  children: [
6688
- H && /* @__PURE__ */ l(
6692
+ j && /* @__PURE__ */ l(
6689
6693
  "div",
6690
6694
  {
6691
6695
  className: "flex items-center gap-2 px-3 py-2",
@@ -6703,8 +6707,8 @@ function vc({
6703
6707
  {
6704
6708
  ref: J,
6705
6709
  value: O,
6706
- onChange: ($) => {
6707
- ee($.target.value), Y(0);
6710
+ onChange: (M) => {
6711
+ ee(M.target.value), Y(0);
6708
6712
  },
6709
6713
  placeholder: "Buscar…",
6710
6714
  className: "min-w-0 flex-1 bg-transparent text-sm outline-none",
@@ -6715,8 +6719,8 @@ function vc({
6715
6719
  "button",
6716
6720
  {
6717
6721
  type: "button",
6718
- onMouseDown: ($) => {
6719
- $.preventDefault(), ee("");
6722
+ onMouseDown: (M) => {
6723
+ M.preventDefault(), ee("");
6720
6724
  },
6721
6725
  children: /* @__PURE__ */ t(
6722
6726
  Ie,
@@ -6747,8 +6751,8 @@ function vc({
6747
6751
  "button",
6748
6752
  {
6749
6753
  type: "button",
6750
- onMouseDown: ($) => {
6751
- $.preventDefault(), ne();
6754
+ onMouseDown: (M) => {
6755
+ M.preventDefault(), ne();
6752
6756
  },
6753
6757
  className: "font-semibold transition-colors hover:text-[var(--primary)]",
6754
6758
  children: S
@@ -6760,34 +6764,34 @@ function vc({
6760
6764
  /* @__PURE__ */ l(
6761
6765
  "ul",
6762
6766
  {
6763
- ref: E,
6767
+ ref: L,
6764
6768
  role: "listbox",
6765
6769
  "aria-multiselectable": "true",
6766
6770
  className: "overflow-y-auto",
6767
6771
  style: {
6768
- maxHeight: H ? 220 : 200,
6772
+ maxHeight: j ? 220 : 200,
6769
6773
  scrollbarWidth: "thin",
6770
6774
  scrollbarColor: "var(--border) transparent",
6771
6775
  overscrollBehavior: "contain"
6772
6776
  },
6773
6777
  children: [
6774
- g.map(($, ie) => {
6775
- const R = ie === z, A = U.has($.value);
6778
+ g.map((M, ie) => {
6779
+ const H = ie === z, A = U.has(M.value);
6776
6780
  return /* @__PURE__ */ l(
6777
6781
  "li",
6778
6782
  {
6779
6783
  role: "option",
6780
6784
  "aria-selected": A,
6781
6785
  onMouseDown: (G) => {
6782
- G.preventDefault(), B($.value);
6786
+ G.preventDefault(), D(M.value);
6783
6787
  },
6784
- onMouseEnter: () => !$.disabled && Y(ie),
6788
+ onMouseEnter: () => !M.disabled && Y(ie),
6785
6789
  className: "flex cursor-pointer items-center gap-2 px-3 py-2 text-sm transition-colors",
6786
6790
  style: {
6787
- background: R ? "var(--bg-hover)" : A ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
6788
- color: $.disabled ? "var(--text-muted)" : "var(--text-main)",
6789
- cursor: $.disabled ? "not-allowed" : "pointer",
6790
- opacity: $.disabled ? 0.58 : 1
6791
+ background: H ? "var(--bg-hover)" : A ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
6792
+ color: M.disabled ? "var(--text-muted)" : "var(--text-main)",
6793
+ cursor: M.disabled ? "not-allowed" : "pointer",
6794
+ opacity: M.disabled ? 0.58 : 1
6791
6795
  },
6792
6796
  children: [
6793
6797
  /* @__PURE__ */ t(
@@ -6802,35 +6806,35 @@ function vc({
6802
6806
  children: A && /* @__PURE__ */ t(Ue, { className: "h-3 w-3" })
6803
6807
  }
6804
6808
  ),
6805
- $.color && /* @__PURE__ */ t(
6809
+ M.color && /* @__PURE__ */ t(
6806
6810
  "span",
6807
6811
  {
6808
6812
  className: "h-2.5 w-2.5 flex-shrink-0 rounded-full",
6809
- style: { background: $.color }
6813
+ style: { background: M.color }
6810
6814
  }
6811
6815
  ),
6812
6816
  /* @__PURE__ */ l("span", { className: "flex min-w-0 flex-1 items-baseline gap-1 overflow-hidden", children: [
6813
- /* @__PURE__ */ t("span", { className: "truncate", children: $.label }),
6814
- $.sublabel && /* @__PURE__ */ t(
6817
+ /* @__PURE__ */ t("span", { className: "truncate", children: M.label }),
6818
+ M.sublabel && /* @__PURE__ */ t(
6815
6819
  "span",
6816
6820
  {
6817
6821
  className: "min-w-0 flex-shrink truncate",
6818
6822
  style: { color: "var(--text-muted)", fontSize: 12 },
6819
- children: $.sublabel
6823
+ children: M.sublabel
6820
6824
  }
6821
6825
  )
6822
6826
  ] }),
6823
- $.badge && /* @__PURE__ */ t(
6827
+ M.badge && /* @__PURE__ */ t(
6824
6828
  "span",
6825
6829
  {
6826
6830
  className: "flex-shrink-0 text-xs",
6827
6831
  style: { color: "var(--text-muted)" },
6828
- children: $.badge
6832
+ children: M.badge
6829
6833
  }
6830
6834
  )
6831
6835
  ]
6832
6836
  },
6833
- $.value
6837
+ M.value
6834
6838
  );
6835
6839
  }),
6836
6840
  g.length === 0 && /* @__PURE__ */ t(
@@ -6838,7 +6842,7 @@ function vc({
6838
6842
  {
6839
6843
  className: "px-3 py-4 text-center text-sm",
6840
6844
  style: { color: "var(--text-muted)" },
6841
- children: L
6845
+ children: T
6842
6846
  }
6843
6847
  )
6844
6848
  ]
@@ -6860,7 +6864,7 @@ function vc({
6860
6864
  {
6861
6865
  type: "button",
6862
6866
  disabled: i,
6863
- onClick: () => !i && k(($) => !$),
6867
+ onClick: () => !i && k((M) => !M),
6864
6868
  className: "flex w-full items-center gap-2 rounded-lg text-left text-sm transition-colors focus:outline-none",
6865
6869
  style: {
6866
6870
  minHeight: ia(m),
@@ -6875,7 +6879,7 @@ function vc({
6875
6879
  "aria-expanded": w,
6876
6880
  children: [
6877
6881
  /* @__PURE__ */ t("span", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-1.5 overflow-hidden", children: W.length ? /* @__PURE__ */ l(Re, { children: [
6878
- W.map(($) => /* @__PURE__ */ l(
6882
+ W.map((M) => /* @__PURE__ */ l(
6879
6883
  "span",
6880
6884
  {
6881
6885
  className: `inline-flex items-center gap-1 rounded-md border px-1.5 py-0.5 text-xs font-semibold ${v ? "max-w-[160px]" : "max-w-full whitespace-normal"}`,
@@ -6885,23 +6889,23 @@ function vc({
6885
6889
  color: "var(--text-main)"
6886
6890
  },
6887
6891
  children: [
6888
- $.color && /* @__PURE__ */ t(
6892
+ M.color && /* @__PURE__ */ t(
6889
6893
  "span",
6890
6894
  {
6891
6895
  className: "h-1.5 w-1.5 flex-shrink-0 rounded-full",
6892
- style: { background: $.color }
6896
+ style: { background: M.color }
6893
6897
  }
6894
6898
  ),
6895
6899
  /* @__PURE__ */ t(
6896
6900
  "span",
6897
6901
  {
6898
6902
  className: v ? "truncate" : "break-words",
6899
- children: $.label
6903
+ children: M.label
6900
6904
  }
6901
6905
  )
6902
6906
  ]
6903
6907
  },
6904
- $.value
6908
+ M.value
6905
6909
  )),
6906
6910
  s > 0 && /* @__PURE__ */ l(
6907
6911
  "span",
@@ -6924,8 +6928,8 @@ function vc({
6924
6928
  role: "button",
6925
6929
  tabIndex: -1,
6926
6930
  "aria-label": S,
6927
- onMouseDown: ($) => {
6928
- $.preventDefault(), $.stopPropagation(), ne();
6931
+ onMouseDown: (M) => {
6932
+ M.preventDefault(), M.stopPropagation(), ne();
6929
6933
  },
6930
6934
  className: "flex-shrink-0 rounded-full p-0.5 transition-colors hover:bg-black/10",
6931
6935
  style: { color: "var(--text-muted)" },
@@ -6944,7 +6948,7 @@ function vc({
6944
6948
  ]
6945
6949
  }
6946
6950
  ),
6947
- w && M && Ze(pe, document.body)
6951
+ w && $ && Ze(pe, document.body)
6948
6952
  ]
6949
6953
  }
6950
6954
  );
@@ -7258,7 +7262,7 @@ function yc({
7258
7262
  defaultCountryCode: h = "+1",
7259
7263
  onCountryCodeChange: x,
7260
7264
  allowedCountryCodes: v,
7261
- countryCodeOptions: L,
7265
+ countryCodeOptions: T,
7262
7266
  countryCodePlaceholder: S = "Codigo",
7263
7267
  countryCodeClassName: w = "",
7264
7268
  countryCodeWidth: k = 84,
@@ -7266,38 +7270,38 @@ function yc({
7266
7270
  label: ee,
7267
7271
  containerClassName: z = "",
7268
7272
  helperText: Y,
7269
- labelAction: M,
7273
+ labelAction: $,
7270
7274
  className: q = "",
7271
7275
  required: Z,
7272
7276
  disabled: te,
7273
7277
  floatingLabel: P,
7274
7278
  showPasswordToggle: X,
7275
7279
  nativeValidation: J,
7276
- errorTooltipLabel: E = "Error de validacion",
7277
- ...H
7280
+ errorTooltipLabel: L = "Error de validacion",
7281
+ ...j
7278
7282
  }) {
7279
7283
  var re;
7280
- const [U, _] = D(
7284
+ const [U, _] = B(
7281
7285
  () => sa(m)
7282
- ), [oe, W] = D(
7286
+ ), [oe, W] = B(
7283
7287
  () => Nr(h)
7284
7288
  ), s = at(() => {
7285
- const me = L ?? Yi, se = v == null ? void 0 : v.map(Nr);
7289
+ const me = T ?? Yi, se = v == null ? void 0 : v.map(Nr);
7286
7290
  return se != null && se.length ? me.filter((y) => se.includes(y.value)) : me;
7287
- }, [v, L]), g = ((re = s[0]) == null ? void 0 : re.value) ?? "+1", T = s.some(
7291
+ }, [v, T]), g = ((re = s[0]) == null ? void 0 : re.value) ?? "+1", E = s.some(
7288
7292
  (me) => me.value === Nr(p ?? oe)
7289
- ) ? Nr(p ?? oe) : g, j = u !== void 0 ? sa(u) : U, B = `${T} ${j}`.trim(), ne = n && j.length > 0 && !za(B) ? a : void 0, ce = c ?? ne, pe = !!ce, $ = pe && i !== "tooltip", ie = pe && i !== "inline", R = pe ? "border-[var(--danger)] focus-within:border-[var(--danger)]" : "border-[var(--border)] focus-within:border-[var(--primary)]", A = (me) => {
7293
+ ) ? Nr(p ?? oe) : g, R = u !== void 0 ? sa(u) : U, D = `${E} ${R}`.trim(), ne = n && R.length > 0 && !za(D) ? a : void 0, ce = c ?? ne, pe = !!ce, M = pe && i !== "tooltip", ie = pe && i !== "inline", H = pe ? "border-[var(--danger)] focus-within:border-[var(--danger)]" : "border-[var(--border)] focus-within:border-[var(--primary)]", A = (me) => {
7290
7294
  const se = me.currentTarget.value;
7291
7295
  u === void 0 && _(se), O == null || O(se, {
7292
- countryCode: T,
7296
+ countryCode: E,
7293
7297
  nationalNumber: se,
7294
- fullNumber: `${T} ${se}`.trim()
7298
+ fullNumber: `${E} ${se}`.trim()
7295
7299
  }), f == null || f(me);
7296
7300
  }, G = (me) => {
7297
- p === void 0 && W(me), x == null || x(me), O == null || O(j, {
7301
+ p === void 0 && W(me), x == null || x(me), O == null || O(R, {
7298
7302
  countryCode: me,
7299
- nationalNumber: j,
7300
- fullNumber: `${me} ${j}`.trim()
7303
+ nationalNumber: R,
7304
+ fullNumber: `${me} ${R}`.trim()
7301
7305
  });
7302
7306
  }, V = ie ? /* @__PURE__ */ t(
7303
7307
  Ut,
@@ -7310,7 +7314,7 @@ function yc({
7310
7314
  {
7311
7315
  tabIndex: 0,
7312
7316
  role: "img",
7313
- "aria-label": E,
7317
+ "aria-label": L,
7314
7318
  className: "flex h-full w-full items-center justify-center outline-none",
7315
7319
  children: /* @__PURE__ */ t(Pa, { className: "h-[18px] w-[18px]" })
7316
7320
  }
@@ -7321,17 +7325,17 @@ function yc({
7321
7325
  /* @__PURE__ */ l("span", { className: "inline-flex items-center gap-1 text-xs font-semibold uppercase text-[var(--text-muted)]", children: [
7322
7326
  /* @__PURE__ */ t("span", { children: ee }),
7323
7327
  Z && /* @__PURE__ */ t("span", { className: "text-[var(--danger)]", children: "*" }),
7324
- M && /* @__PURE__ */ t("span", { className: "ml-auto normal-case", children: M })
7328
+ $ && /* @__PURE__ */ t("span", { className: "ml-auto normal-case", children: $ })
7325
7329
  ] }),
7326
7330
  /* @__PURE__ */ l(
7327
7331
  "span",
7328
7332
  {
7329
- className: `flex h-10 min-w-0 items-center overflow-hidden rounded-lg border bg-[var(--bg-input)] transition-colors ${R}`,
7333
+ className: `flex h-10 min-w-0 items-center overflow-hidden rounded-lg border bg-[var(--bg-input)] transition-colors ${H}`,
7330
7334
  children: [
7331
7335
  /* @__PURE__ */ t(
7332
7336
  At,
7333
7337
  {
7334
- value: T,
7338
+ value: E,
7335
7339
  onChange: G,
7336
7340
  options: s,
7337
7341
  placeholder: S,
@@ -7353,7 +7357,7 @@ function yc({
7353
7357
  /* @__PURE__ */ t(
7354
7358
  "input",
7355
7359
  {
7356
- ...H,
7360
+ ...j,
7357
7361
  value: u,
7358
7362
  defaultValue: m,
7359
7363
  type: "tel",
@@ -7361,8 +7365,8 @@ function yc({
7361
7365
  autoComplete: e,
7362
7366
  disabled: te,
7363
7367
  required: void 0,
7364
- "aria-label": H["aria-label"] ?? (typeof ee == "string" ? ee : void 0),
7365
- "aria-invalid": pe || H["aria-invalid"],
7368
+ "aria-label": j["aria-label"] ?? (typeof ee == "string" ? ee : void 0),
7369
+ "aria-invalid": pe || j["aria-invalid"],
7366
7370
  className: `h-full w-full min-w-0 bg-transparent px-2 py-1.5 text-sm text-[var(--text-main)] outline-none placeholder:text-[var(--text-muted)] disabled:cursor-not-allowed disabled:opacity-60 ${ie ? "pr-10" : ""} ${q}`,
7367
7371
  onChange: A
7368
7372
  }
@@ -7372,7 +7376,7 @@ function yc({
7372
7376
  ]
7373
7377
  }
7374
7378
  ),
7375
- $ ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--danger)]", children: ce }) : Y ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--text-muted)]", children: Y }) : null
7379
+ M ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--danger)]", children: ce }) : Y ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--text-muted)]", children: Y }) : null
7376
7380
  ] });
7377
7381
  }
7378
7382
  function wc({
@@ -7477,7 +7481,7 @@ function Nc({
7477
7481
  placeholder: n = "Escribe algo...",
7478
7482
  minHeight: a = "80px"
7479
7483
  }) {
7480
- const i = le(null), c = le(null), u = le(null), m = le(!1), f = le(e ?? ""), p = le(r), [h, x] = D(() => !e || e.trim() === ""), [v, L] = D(/* @__PURE__ */ new Set()), [S, w] = D(null), [k, O] = D(""), [ee, z] = D(""), [Y, M] = D(""), [q, Z] = D(""), [te, P] = D(!1), X = we(
7484
+ const i = le(null), c = le(null), u = le(null), m = le(!1), f = le(e ?? ""), p = le(r), [h, x] = B(() => !e || e.trim() === ""), [v, T] = B(/* @__PURE__ */ new Set()), [S, w] = B(null), [k, O] = B(""), [ee, z] = B(""), [Y, $] = B(""), [q, Z] = B(""), [te, P] = B(!1), X = we(
7481
7485
  () => m.current ? c.current : i.current,
7482
7486
  []
7483
7487
  );
@@ -7527,7 +7531,7 @@ function Nc({
7527
7531
  I && cancelAnimationFrame(I), ue && clearTimeout(ue), y == null || y();
7528
7532
  };
7529
7533
  }, [te]);
7530
- const E = we(() => {
7534
+ const L = we(() => {
7531
7535
  const y = [
7532
7536
  "bold",
7533
7537
  "italic",
@@ -7556,8 +7560,8 @@ function Nc({
7556
7560
  return;
7557
7561
  }
7558
7562
  const ue = J();
7559
- Qr(ue, "uppercase") && I.add("__upper"), Qr(ue, "lowercase") && I.add("__lower"), Qr(ue, "capitalize") && I.add("__cap"), L(I);
7560
- }, [J]), H = () => {
7563
+ Qr(ue, "uppercase") && I.add("__upper"), Qr(ue, "lowercase") && I.add("__lower"), Qr(ue, "capitalize") && I.add("__cap"), T(I);
7564
+ }, [J]), j = () => {
7561
7565
  var I;
7562
7566
  const y = X();
7563
7567
  y && (f.current = y.innerHTML, p.current(f.current), x(((I = y.textContent) == null ? void 0 : I.trim()) === ""));
@@ -7569,27 +7573,27 @@ function Nc({
7569
7573
  P(!y);
7570
7574
  }, _ = (y, I) => {
7571
7575
  var ue;
7572
- (ue = X()) == null || ue.focus(), document.execCommand(y, !1, I), H(), E();
7576
+ (ue = X()) == null || ue.focus(), document.execCommand(y, !1, I), j(), L();
7573
7577
  }, oe = (y) => {
7574
7578
  _("formatBlock", y);
7575
7579
  }, W = () => {
7576
7580
  var y;
7577
- (y = X()) == null || y.focus(), document.execCommand("insertHTML", !1, "<hr><p><br></p>"), H(), E();
7581
+ (y = X()) == null || y.focus(), document.execCommand("insertHTML", !1, "<hr><p><br></p>"), j(), L();
7578
7582
  }, s = () => {
7579
7583
  const y = window.getSelection();
7580
7584
  y && y.rangeCount > 0 && (u.current = y.getRangeAt(0).cloneRange());
7581
7585
  }, g = () => {
7582
7586
  const y = window.getSelection();
7583
7587
  y && u.current && (y.removeAllRanges(), y.addRange(u.current));
7584
- }, T = (y) => {
7588
+ }, E = (y) => {
7585
7589
  if (s(), y === "link") {
7586
7590
  const I = window.getSelection();
7587
7591
  z(
7588
7592
  I && !I.isCollapsed ? I.toString() : ""
7589
7593
  ), O("");
7590
7594
  }
7591
- y === "image" && (M(""), Z("")), w(y);
7592
- }, j = () => {
7595
+ y === "image" && ($(""), Z("")), w(y);
7596
+ }, R = () => {
7593
7597
  var be;
7594
7598
  if (!k.trim()) return;
7595
7599
  g(), (be = X()) == null || be.focus();
@@ -7598,14 +7602,14 @@ function Nc({
7598
7602
  "insertHTML",
7599
7603
  !1,
7600
7604
  `<a href="${kr(k.trim())}" target="_blank" rel="noopener noreferrer" class="rich-link">${kr(ue)}</a>`
7601
- ), H(), w(null);
7602
- }, B = (y, I = "") => `<span class="rich-img-wrap" contenteditable="false"><img src="${kr(y)}" alt="${kr(I)}" class="rich-img" />${qa()}</span>`, ne = () => {
7605
+ ), j(), w(null);
7606
+ }, D = (y, I = "") => `<span class="rich-img-wrap" contenteditable="false"><img src="${kr(y)}" alt="${kr(I)}" class="rich-img" />${qa()}</span>`, ne = () => {
7603
7607
  var y;
7604
7608
  Y.trim() && (g(), (y = X()) == null || y.focus(), document.execCommand(
7605
7609
  "insertHTML",
7606
7610
  !1,
7607
- B(Y.trim(), q.trim())
7608
- ), H(), w(null));
7611
+ D(Y.trim(), q.trim())
7612
+ ), j(), w(null));
7609
7613
  }, ce = (y, I = 1200, ue = 1200, be = 0.72) => new Promise((Se, he) => {
7610
7614
  const Ee = new FileReader();
7611
7615
  Ee.onerror = he, Ee.onload = (ke) => {
@@ -7637,10 +7641,10 @@ function Nc({
7637
7641
  (he = X()) == null || he.focus(), document.execCommand(
7638
7642
  "insertHTML",
7639
7643
  !1,
7640
- B(Se, "imagen")
7641
- ), H();
7644
+ D(Se, "imagen")
7645
+ ), j();
7642
7646
  });
7643
- }, $ = (y) => {
7647
+ }, M = (y) => {
7644
7648
  const I = window.getSelection(), ue = X();
7645
7649
  if (!I || !ue || I.rangeCount === 0 || I.isCollapsed)
7646
7650
  return;
@@ -7654,11 +7658,11 @@ function Nc({
7654
7658
  const Ee = document.createTextNode(he);
7655
7659
  be.insertNode(Ee);
7656
7660
  const ke = document.createRange();
7657
- ke.setStart(Ee, 0), ke.setEnd(Ee, he.length), I.removeAllRanges(), I.addRange(ke), u.current = ke.cloneRange(), H(), E();
7661
+ ke.setStart(Ee, 0), ke.setEnd(Ee, he.length), I.removeAllRanges(), I.addRange(ke), u.current = ke.cloneRange(), j(), L();
7658
7662
  }, ie = () => {
7659
- s(), E();
7660
- }, R = () => {
7661
- H(), E();
7663
+ s(), L();
7664
+ }, H = () => {
7665
+ j(), L();
7662
7666
  }, A = (y) => {
7663
7667
  if (y.key === "Escape") {
7664
7668
  if (S) {
@@ -7670,7 +7674,7 @@ function Nc({
7670
7674
  return;
7671
7675
  }
7672
7676
  }
7673
- S || (y.ctrlKey || y.metaKey) && (y.key === "b" && (y.preventDefault(), _("bold")), y.key === "i" && (y.preventDefault(), _("italic")), y.key === "u" && (y.preventDefault(), _("underline")), y.key === "k" && (y.preventDefault(), T("link")));
7677
+ S || (y.ctrlKey || y.metaKey) && (y.key === "b" && (y.preventDefault(), _("bold")), y.key === "i" && (y.preventDefault(), _("italic")), y.key === "u" && (y.preventDefault(), _("underline")), y.key === "k" && (y.preventDefault(), E("link")));
7674
7678
  }, G = () => /* @__PURE__ */ t(
7675
7679
  "div",
7676
7680
  {
@@ -7701,7 +7705,7 @@ function Nc({
7701
7705
  if (I.closest("[data-action='delete-img']")) {
7702
7706
  y.preventDefault();
7703
7707
  const ue = I.closest(".rich-img-wrap");
7704
- ue && (ue.remove(), H());
7708
+ ue && (ue.remove(), j());
7705
7709
  }
7706
7710
  }, me = (y) => /* @__PURE__ */ l(Re, { children: [
7707
7711
  S === "link" && /* @__PURE__ */ l(
@@ -7718,7 +7722,7 @@ function Nc({
7718
7722
  value: k,
7719
7723
  onChange: (I) => O(I.target.value),
7720
7724
  onKeyDown: (I) => {
7721
- I.key === "Enter" && (I.preventDefault(), j()), I.key === "Escape" && w(null);
7725
+ I.key === "Enter" && (I.preventDefault(), R()), I.key === "Escape" && w(null);
7722
7726
  },
7723
7727
  placeholder: "https://...",
7724
7728
  className: "min-w-0 flex-1 rounded px-2 py-1 text-xs focus:outline-none",
@@ -7736,7 +7740,7 @@ function Nc({
7736
7740
  value: ee,
7737
7741
  onChange: (I) => z(I.target.value),
7738
7742
  onKeyDown: (I) => {
7739
- I.key === "Enter" && (I.preventDefault(), j()), I.key === "Escape" && w(null);
7743
+ I.key === "Enter" && (I.preventDefault(), R()), I.key === "Escape" && w(null);
7740
7744
  },
7741
7745
  placeholder: "Texto (opcional)",
7742
7746
  className: "w-32 rounded px-2 py-1 text-xs focus:outline-none",
@@ -7751,7 +7755,7 @@ function Nc({
7751
7755
  "button",
7752
7756
  {
7753
7757
  type: "button",
7754
- onClick: j,
7758
+ onClick: R,
7755
7759
  className: "rounded px-2.5 py-1 text-xs font-semibold text-white",
7756
7760
  style: { background: "var(--primary)" },
7757
7761
  children: "OK"
@@ -7782,7 +7786,7 @@ function Nc({
7782
7786
  autoFocus: !0,
7783
7787
  type: "url",
7784
7788
  value: Y,
7785
- onChange: (I) => M(I.target.value),
7789
+ onChange: (I) => $(I.target.value),
7786
7790
  onKeyDown: (I) => {
7787
7791
  I.key === "Enter" && (I.preventDefault(), ne()), I.key === "Escape" && w(null);
7788
7792
  },
@@ -7933,26 +7937,26 @@ function Nc({
7933
7937
  /* @__PURE__ */ t("span", { style: { fontSize: "10px" }, children: "AA" }),
7934
7938
  "Mayusculas",
7935
7939
  "__upper",
7936
- () => $("uppercase")
7940
+ () => M("uppercase")
7937
7941
  ),
7938
7942
  V(
7939
7943
  /* @__PURE__ */ t("span", { style: { fontSize: "10px" }, children: "aa" }),
7940
7944
  "Minusculas",
7941
7945
  "__lower",
7942
- () => $("lowercase")
7946
+ () => M("lowercase")
7943
7947
  ),
7944
7948
  V(
7945
7949
  /* @__PURE__ */ t("span", { style: { fontSize: "10px" }, children: "Aa" }),
7946
7950
  "Capitalizar",
7947
7951
  "__cap",
7948
- () => $("capitalize")
7952
+ () => M("capitalize")
7949
7953
  ),
7950
7954
  G(),
7951
7955
  V(
7952
7956
  /* @__PURE__ */ t(wa, { className: "h-4 w-4" }),
7953
7957
  "Insertar enlace (Ctrl+K)",
7954
7958
  "__link",
7955
- () => T("link")
7959
+ () => E("link")
7956
7960
  ),
7957
7961
  V(
7958
7962
  /* @__PURE__ */ t(sl, { className: "h-4 w-4" }),
@@ -7963,7 +7967,7 @@ function Nc({
7963
7967
  /* @__PURE__ */ t(cl, { className: "h-4 w-4" }),
7964
7968
  "Insertar imagen",
7965
7969
  "__img",
7966
- () => T("image")
7970
+ () => E("image")
7967
7971
  ),
7968
7972
  V(
7969
7973
  /* @__PURE__ */ t(Na, { className: "h-4 w-4" }),
@@ -8013,7 +8017,7 @@ function Nc({
8013
8017
  ref: i,
8014
8018
  contentEditable: !0,
8015
8019
  suppressContentEditableWarning: !0,
8016
- onInput: R,
8020
+ onInput: H,
8017
8021
  onKeyDown: A,
8018
8022
  onKeyUp: ie,
8019
8023
  onSelect: ie,
@@ -8055,7 +8059,7 @@ function Nc({
8055
8059
  ref: c,
8056
8060
  contentEditable: !0,
8057
8061
  suppressContentEditableWarning: !0,
8058
- onInput: R,
8062
+ onInput: H,
8059
8063
  onKeyDown: A,
8060
8064
  onKeyUp: ie,
8061
8065
  onSelect: ie,
@@ -8235,35 +8239,35 @@ function Sc({
8235
8239
  selectClassName: h,
8236
8240
  menuClassName: x,
8237
8241
  optionClassName: v,
8238
- spinnerClassName: L
8242
+ spinnerClassName: T
8239
8243
  }) {
8240
- const [S, w] = D(!1), [k, O] = D(!1), [ee, z] = D(-1), [Y, M] = D({}), q = le(null), Z = le(null), te = le(null), P = r.find((s) => s.value === e) ?? r[0], X = {
8244
+ const [S, w] = B(!1), [k, O] = B(!1), [ee, z] = B(-1), [Y, $] = B({}), q = le(null), Z = le(null), te = le(null), P = r.find((s) => s.value === e) ?? r[0], X = {
8241
8245
  ...P != null && P.tone ? da[P.tone] : void 0,
8242
8246
  ...P == null ? void 0 : P.style
8243
- }, J = i || c || r.length === 0, E = (s) => {
8247
+ }, J = i || c || r.length === 0, L = (s) => {
8244
8248
  u && s.stopPropagation();
8245
- }, H = we(() => {
8249
+ }, j = we(() => {
8246
8250
  w(!1), z(-1);
8247
8251
  }, []), U = we(() => {
8248
8252
  const s = q.current;
8249
8253
  if (!s) return;
8250
- const g = s.getBoundingClientRect(), T = Math.max(g.width, rs[a]), j = Math.min(Math.max(r.length, 1) * 38 + 12, 260), B = window.innerHeight - g.bottom, ne = B < j && g.top > B, ce = Math.min(
8251
- Math.max(8, g.left + g.width / 2 - T / 2),
8252
- window.innerWidth - T - 8
8254
+ const g = s.getBoundingClientRect(), E = Math.max(g.width, rs[a]), R = Math.min(Math.max(r.length, 1) * 38 + 12, 260), D = window.innerHeight - g.bottom, ne = D < R && g.top > D, ce = Math.min(
8255
+ Math.max(8, g.left + g.width / 2 - E / 2),
8256
+ window.innerWidth - E - 8
8253
8257
  );
8254
- M({
8258
+ $({
8255
8259
  position: "fixed",
8256
8260
  left: ce,
8257
8261
  top: ne ? void 0 : g.bottom + 6,
8258
8262
  bottom: ne ? window.innerHeight - g.top + 6 : void 0,
8259
- width: T,
8263
+ width: E,
8260
8264
  zIndex: 9999
8261
8265
  });
8262
8266
  }, [r.length, a]), _ = we(
8263
8267
  (s) => {
8264
- s.disabled || (n(s.value), H());
8268
+ s.disabled || (n(s.value), j());
8265
8269
  },
8266
- [H, n]
8270
+ [j, n]
8267
8271
  );
8268
8272
  Q(() => O(!0), []), Q(() => {
8269
8273
  if (!S) return;
@@ -8273,12 +8277,12 @@ function Sc({
8273
8277
  }, [S, r, U, e]), Q(() => {
8274
8278
  if (!S) return;
8275
8279
  function s(g) {
8276
- var j, B;
8277
- const T = g.target;
8278
- !((j = q.current) != null && j.contains(T)) && !((B = Z.current) != null && B.contains(T)) && H();
8280
+ var R, D;
8281
+ const E = g.target;
8282
+ !((R = q.current) != null && R.contains(E)) && !((D = Z.current) != null && D.contains(E)) && j();
8279
8283
  }
8280
8284
  return document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s);
8281
- }, [H, S]), Q(() => {
8285
+ }, [j, S]), Q(() => {
8282
8286
  if (S)
8283
8287
  return window.addEventListener("resize", U), window.addEventListener("scroll", U, !0), () => {
8284
8288
  window.removeEventListener("resize", U), window.removeEventListener("scroll", U, !0);
@@ -8295,7 +8299,7 @@ function Sc({
8295
8299
  return;
8296
8300
  }
8297
8301
  if (s.key === "Escape") {
8298
- s.preventDefault(), H();
8302
+ s.preventDefault(), j();
8299
8303
  return;
8300
8304
  }
8301
8305
  if (s.key === "ArrowDown") {
@@ -8329,9 +8333,9 @@ function Sc({
8329
8333
  borderColor: "var(--border)",
8330
8334
  color: "var(--text-main)"
8331
8335
  },
8332
- onClick: E,
8333
- onMouseDown: E,
8334
- onPointerDown: E,
8336
+ onClick: L,
8337
+ onMouseDown: L,
8338
+ onPointerDown: L,
8335
8339
  children: /* @__PURE__ */ t(
8336
8340
  "div",
8337
8341
  {
@@ -8343,7 +8347,7 @@ function Sc({
8343
8347
  overscrollBehavior: "contain"
8344
8348
  },
8345
8349
  children: r.map((s, g) => {
8346
- const T = s.value === e, j = g === ee, B = {
8350
+ const E = s.value === e, R = g === ee, D = {
8347
8351
  ...s.tone ? da[s.tone] : void 0,
8348
8352
  ...s.style
8349
8353
  };
@@ -8352,7 +8356,7 @@ function Sc({
8352
8356
  {
8353
8357
  type: "button",
8354
8358
  role: "option",
8355
- "aria-selected": T,
8359
+ "aria-selected": E,
8356
8360
  disabled: s.disabled,
8357
8361
  onMouseEnter: () => !s.disabled && z(g),
8358
8362
  onMouseDown: (ne) => {
@@ -8361,16 +8365,16 @@ function Sc({
8361
8365
  className: ht(
8362
8366
  "flex w-full items-center gap-2 rounded-lg font-medium text-left transition-colors disabled:cursor-not-allowed disabled:opacity-45",
8363
8367
  ns[a],
8364
- T ? s.className : void 0,
8368
+ E ? s.className : void 0,
8365
8369
  v
8366
8370
  ),
8367
8371
  style: {
8368
- ...T ? B : void 0,
8369
- background: T ? B.background ?? "color-mix(in srgb, var(--primary) 12%, transparent)" : j ? "var(--bg-hover)" : "transparent",
8370
- color: T ? B.color ?? "var(--primary)" : "var(--text-main)"
8372
+ ...E ? D : void 0,
8373
+ background: E ? D.background ?? "color-mix(in srgb, var(--primary) 12%, transparent)" : R ? "var(--bg-hover)" : "transparent",
8374
+ color: E ? D.color ?? "var(--primary)" : "var(--text-main)"
8371
8375
  },
8372
8376
  children: [
8373
- /* @__PURE__ */ t("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center", children: T ? /* @__PURE__ */ t(Ue, { className: "h-4 w-4" }) : null }),
8377
+ /* @__PURE__ */ t("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center", children: E ? /* @__PURE__ */ t(Ue, { className: "h-4 w-4" }) : null }),
8374
8378
  /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate", children: s.label })
8375
8379
  ]
8376
8380
  },
@@ -8387,8 +8391,8 @@ function Sc({
8387
8391
  ref: q,
8388
8392
  className: ht("relative inline-flex shrink-0 items-center", p),
8389
8393
  onKeyDown: oe,
8390
- onClick: E,
8391
- onPointerDown: E,
8394
+ onClick: L,
8395
+ onPointerDown: L,
8392
8396
  children: [
8393
8397
  /* @__PURE__ */ t(
8394
8398
  "button",
@@ -8427,7 +8431,7 @@ function Sc({
8427
8431
  "aria-hidden": "true",
8428
8432
  className: ht(
8429
8433
  "absolute -right-1 -top-1 h-2.5 w-2.5 rounded-full border border-current border-t-transparent animate-spin",
8430
- L
8434
+ T
8431
8435
  )
8432
8436
  }
8433
8437
  ),
@@ -8526,15 +8530,15 @@ function $c({
8526
8530
  previousLabel: h = "Anterior",
8527
8531
  nextLabel: x = "Siguiente",
8528
8532
  blockedNextLabel: v = "Completa este paso",
8529
- className: L = "",
8533
+ className: T = "",
8530
8534
  headerClassName: S = "",
8531
8535
  contentClassName: w = "",
8532
8536
  footerClassName: k = ""
8533
8537
  }) {
8534
- var R;
8535
- const O = ((R = e[0]) == null ? void 0 : R.id) ?? "", [ee, z] = D(
8538
+ var H;
8539
+ const O = ((H = e[0]) == null ? void 0 : H.id) ?? "", [ee, z] = B(
8536
8540
  n ?? O
8537
- ), [Y, M] = D(
8541
+ ), [Y, $] = B(
8538
8542
  i
8539
8543
  ), q = r ?? ee, Z = a ?? Y, te = at(
8540
8544
  () => new Set(Z),
@@ -8542,9 +8546,9 @@ function $c({
8542
8546
  ), P = Math.max(
8543
8547
  0,
8544
8548
  e.findIndex((A) => A.id === q)
8545
- ), X = e[P] ?? e[0], J = e.length <= 1 ? 100 : P / (e.length - 1) * 100, E = (A) => {
8546
- a || M(A), u == null || u(A);
8547
- }, H = (A) => {
8549
+ ), X = e[P] ?? e[0], J = e.length <= 1 ? 100 : P / (e.length - 1) * 100, L = (A) => {
8550
+ a || $(A), u == null || u(A);
8551
+ }, j = (A) => {
8548
8552
  const G = e.find((V) => V.id === A);
8549
8553
  G && (r || z(A), c == null || c(A, G));
8550
8554
  }, U = (A) => te.has(A), _ = (A) => e.slice(0, A).find((G) => !G.optional && !te.has(G.id)), oe = (A) => {
@@ -8560,17 +8564,17 @@ function $c({
8560
8564
  const V = _(G);
8561
8565
  return V && (m == null || m(e[G], V)), !1;
8562
8566
  }
8563
- return H(A), !0;
8567
+ return j(A), !0;
8564
8568
  }, g = (A = X == null ? void 0 : X.id) => {
8565
- !A || te.has(A) || E([...Z, A]);
8566
- }, T = (A = X == null ? void 0 : X.id) => {
8569
+ !A || te.has(A) || L([...Z, A]);
8570
+ }, E = (A = X == null ? void 0 : X.id) => {
8567
8571
  if (!A) return;
8568
8572
  const G = e.findIndex((re) => re.id === A), V = Z.filter((re) => {
8569
8573
  const me = e.findIndex((se) => se.id === re);
8570
8574
  return me >= 0 && me < G;
8571
8575
  });
8572
- E(V), G >= 0 && P > G && H(A);
8573
- }, j = () => P <= 0 ? !1 : s(e[P - 1].id), B = () => {
8576
+ L(V), G >= 0 && P > G && j(A);
8577
+ }, R = () => P <= 0 ? !1 : s(e[P - 1].id), D = () => {
8574
8578
  const A = e[P + 1];
8575
8579
  return A ? s(A.id) : !1;
8576
8580
  }, ne = {
@@ -8580,19 +8584,19 @@ function $c({
8580
8584
  isCompleted: U,
8581
8585
  isUnlocked: W,
8582
8586
  completeStep: g,
8583
- uncompleteStep: T,
8587
+ uncompleteStep: E,
8584
8588
  goToStep: s,
8585
- goNext: B,
8586
- goPrevious: j
8589
+ goNext: D,
8590
+ goPrevious: R
8587
8591
  };
8588
8592
  if (!X) return null;
8589
- const ce = e[P + 1], pe = P > 0, $ = ce ? W(ce.id) : !1, ie = typeof X.content == "function" ? X.content(ne) : X.content;
8593
+ const ce = e[P + 1], pe = P > 0, M = ce ? W(ce.id) : !1, ie = typeof X.content == "function" ? X.content(ne) : X.content;
8590
8594
  return /* @__PURE__ */ l(
8591
8595
  "section",
8592
8596
  {
8593
8597
  className: it(
8594
8598
  "overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-card)]",
8595
- L
8599
+ T
8596
8600
  ),
8597
8601
  children: [
8598
8602
  /* @__PURE__ */ l(
@@ -8715,7 +8719,7 @@ function $c({
8715
8719
  padding: "0 14px",
8716
8720
  icon: /* @__PURE__ */ t(Tt, {}),
8717
8721
  disabled: !pe,
8718
- onClick: j,
8722
+ onClick: R,
8719
8723
  children: h
8720
8724
  }
8721
8725
  ),
@@ -8738,9 +8742,9 @@ function $c({
8738
8742
  height: 38,
8739
8743
  padding: "0 14px",
8740
8744
  icon: /* @__PURE__ */ t(st, {}),
8741
- disabled: !ce || !$,
8742
- onClick: B,
8743
- children: ce && !$ ? v : x
8745
+ disabled: !ce || !M,
8746
+ onClick: D,
8747
+ children: ce && !M ? v : x
8744
8748
  }
8745
8749
  )
8746
8750
  ]
@@ -8786,35 +8790,35 @@ const ss = ga(
8786
8790
  status: h = "default",
8787
8791
  icon: x,
8788
8792
  action: v,
8789
- style: L,
8793
+ style: T,
8790
8794
  value: S,
8791
8795
  defaultValue: w,
8792
8796
  maxLength: k,
8793
8797
  onInput: O,
8794
8798
  ...ee
8795
8799
  }, z) {
8796
- const Y = le(null), M = is(S, w), q = p ?? k, Z = !!(x || v || f), te = h === "error" ? "var(--danger)" : h === "success" ? "#16a34a" : "var(--border)", P = {
8797
- ...L ?? {},
8800
+ const Y = le(null), $ = is(S, w), q = p ?? k, Z = !!(x || v || f), te = h === "error" ? "var(--danger)" : h === "success" ? "#16a34a" : "var(--border)", P = {
8801
+ ...T ?? {},
8798
8802
  ...u ? { minHeight: `${u * 24 + 18}px` } : null,
8799
8803
  ...m ? { maxHeight: `${m * 24 + 18}px` } : null
8800
8804
  }, X = () => {
8801
- const E = Y.current;
8802
- !E || !c || (E.style.height = "auto", E.style.height = `${E.scrollHeight}px`);
8805
+ const L = Y.current;
8806
+ !L || !c || (L.style.height = "auto", L.style.height = `${L.scrollHeight}px`);
8803
8807
  };
8804
8808
  Q(X, [c, S]);
8805
8809
  const J = /* @__PURE__ */ t(
8806
8810
  "textarea",
8807
8811
  {
8808
8812
  ...ee,
8809
- ref: (E) => {
8810
- Y.current = E, ls(z, E);
8813
+ ref: (L) => {
8814
+ Y.current = L, ls(z, L);
8811
8815
  },
8812
8816
  value: S,
8813
8817
  defaultValue: w,
8814
8818
  maxLength: k,
8815
8819
  "aria-invalid": h === "error" || ee["aria-invalid"],
8816
- onInput: (E) => {
8817
- X(), O == null || O(E);
8820
+ onInput: (L) => {
8821
+ X(), O == null || O(L);
8818
8822
  },
8819
8823
  style: { ...P, borderColor: te },
8820
8824
  className: `w-full rounded-lg border bg-[var(--bg-input)] text-[var(--text-main)] outline-none placeholder:text-[var(--text-muted)] transition-colors focus:border-[var(--primary)] disabled:cursor-not-allowed disabled:opacity-60 ${as[a]} ${os[c ? "none" : i]} ${x ? "pl-8" : ""} ${v ? "pr-10" : ""} ${r}`
@@ -8825,7 +8829,7 @@ const ss = ga(
8825
8829
  J,
8826
8830
  v && /* @__PURE__ */ t("span", { className: "absolute right-2 top-2 flex items-center justify-center", children: v }),
8827
8831
  f && /* @__PURE__ */ l("span", { className: "absolute bottom-1.5 right-2 rounded bg-[var(--bg-input)] px-1.5 text-[10px] font-semibold text-[var(--text-muted)]", children: [
8828
- M,
8832
+ $,
8829
8833
  q ? `/${q}` : ""
8830
8834
  ] })
8831
8835
  ] }) : J;
@@ -9034,14 +9038,14 @@ function ys({
9034
9038
  labelSize: h = "xs",
9035
9039
  avatarVersion: x = 0,
9036
9040
  className: v = "",
9037
- style: L
9041
+ style: T
9038
9042
  }) {
9039
9043
  var U;
9040
- const [S, w] = D(!1), k = typeof e == "string" && e.trim() && e !== "undefined" && e !== "null" ? e.trim() : "";
9044
+ const [S, w] = B(!1), k = typeof e == "string" && e.trim() && e !== "undefined" && e !== "null" ? e.trim() : "";
9041
9045
  Q(() => {
9042
9046
  w(!1);
9043
9047
  }, [k, x]);
9044
- const { wh: O, text: ee } = ms[a], z = fa(n) || fa(r) || m, Y = z.trim()[0] || "?", M = typeof process < "u" && ((U = process.env) == null ? void 0 : U.NEXT_PUBLIC_BASE_PATH) || "", q = xs(r, n), Z = gs(M, "/favicon.svg"), te = k ? `${M}/api/user/avatar/${k}${x ? `?v=${x}` : ""}` : "", X = {
9048
+ const { wh: O, text: ee } = ms[a], z = fa(n) || fa(r) || m, Y = z.trim()[0] || "?", $ = typeof process < "u" && ((U = process.env) == null ? void 0 : U.NEXT_PUBLIC_BASE_PATH) || "", q = xs(r, n), Z = gs($, "/favicon.svg"), te = k ? `${$}/api/user/avatar/${k}${x ? `?v=${x}` : ""}` : "", X = {
9045
9049
  xs: 20,
9046
9050
  sm: 28,
9047
9051
  md: 36,
@@ -9051,7 +9055,7 @@ function ys({
9051
9055
  "span",
9052
9056
  {
9053
9057
  className: `${O} ${hs[a]} rounded-full flex items-center justify-center bg-[#071f1a] ring-1 ring-emerald-400/35 shadow-[0_0_0_1px_rgba(255,255,255,0.06)] flex-shrink-0 ${v}`,
9054
- style: L,
9058
+ style: T,
9055
9059
  children: /* @__PURE__ */ t(
9056
9060
  "img",
9057
9061
  {
@@ -9071,7 +9075,7 @@ function ys({
9071
9075
  width: X,
9072
9076
  height: X,
9073
9077
  className: `${O} rounded-full object-cover flex-shrink-0 ${v}`,
9074
- style: L,
9078
+ style: T,
9075
9079
  onError: () => w(!0)
9076
9080
  },
9077
9081
  `${k}-${x}`
@@ -9079,7 +9083,7 @@ function ys({
9079
9083
  "span",
9080
9084
  {
9081
9085
  className: `${O} ${vs(z)} ${ee} rounded-full flex items-center justify-center font-black text-white uppercase flex-shrink-0 ${v}`,
9082
- style: L,
9086
+ style: T,
9083
9087
  title: z,
9084
9088
  children: Y
9085
9089
  }
@@ -9102,12 +9106,12 @@ function ys({
9102
9106
  ]
9103
9107
  }
9104
9108
  );
9105
- const E = c ?? !0, H = u ?? z;
9106
- return E && H ? /* @__PURE__ */ t(
9109
+ const L = c ?? !0, j = u ?? z;
9110
+ return L && j ? /* @__PURE__ */ t(
9107
9111
  Ut,
9108
9112
  {
9109
9113
  as: "span",
9110
- content: H,
9114
+ content: j,
9111
9115
  className: `inline-flex flex-shrink-0 ${f}`,
9112
9116
  children: J
9113
9117
  }
@@ -9134,7 +9138,7 @@ function ks({
9134
9138
  onLogout: f,
9135
9139
  LinkComponent: p = ws
9136
9140
  }) {
9137
- const [h, x] = D(!1), v = Ns(r);
9141
+ const [h, x] = B(!1), v = Ns(r);
9138
9142
  return /* @__PURE__ */ l("div", { className: "min-h-screen bg-[var(--bg-main)] text-[var(--text-main)]", children: [
9139
9143
  /* @__PURE__ */ t(us, {}),
9140
9144
  /* @__PURE__ */ t(
@@ -9180,10 +9184,10 @@ function ks({
9180
9184
  {
9181
9185
  className: "sidebar-scroll min-h-0 flex-1 overflow-y-auto px-3 py-4",
9182
9186
  "data-overlay-scroll": "true",
9183
- children: Object.entries(v).map(([L, S]) => /* @__PURE__ */ l("div", { className: "mb-5", children: [
9187
+ children: Object.entries(v).map(([T, S]) => /* @__PURE__ */ l("div", { className: "mb-5", children: [
9184
9188
  /* @__PURE__ */ l("div", { className: "mb-2 flex items-center gap-2 px-2 text-[11px] font-semibold uppercase tracking-wide text-white/35", children: [
9185
9189
  /* @__PURE__ */ t(Xe, { className: "h-3.5 w-3.5" }),
9186
- L
9190
+ T
9187
9191
  ] }),
9188
9192
  /* @__PURE__ */ t("div", { className: "space-y-1", children: S.map((w) => {
9189
9193
  const k = n === w.href || n.startsWith(`${w.href}/`);
@@ -9200,7 +9204,7 @@ function ks({
9200
9204
  w.href
9201
9205
  );
9202
9206
  }) })
9203
- ] }, L))
9207
+ ] }, T))
9204
9208
  }
9205
9209
  ),
9206
9210
  /* @__PURE__ */ l("div", { className: "border-t border-white/10 p-3", children: [
@@ -9351,7 +9355,7 @@ function Tc({
9351
9355
  contained: h = !1,
9352
9356
  LinkComponent: x = Ss
9353
9357
  }) {
9354
- const v = le(null), [L, S] = D(!1), [w, k] = D(f ?? "/"), [O, ee] = D(() => ha()), [z, Y] = D(null), M = f ?? w, q = m ?? Ls(M), Z = i ?? Ms(M), te = p && !O && q.length > 1, P = !te;
9358
+ const v = le(null), [T, S] = B(!1), [w, k] = B(f ?? "/"), [O, ee] = B(() => ha()), [z, Y] = B(null), $ = f ?? w, q = m ?? Ls($), Z = i ?? Ms($), te = p && !O && q.length > 1, P = !te;
9355
9359
  Q(() => {
9356
9360
  f || k(window.location.pathname);
9357
9361
  }, [f]), Q(() => {
@@ -9361,7 +9365,7 @@ function Tc({
9361
9365
  S(!1);
9362
9366
  return;
9363
9367
  }
9364
- let J = null, E = 0, H = 0;
9368
+ let J = null, L = 0, j = 0;
9365
9369
  const U = () => {
9366
9370
  const W = v.current, s = document.querySelector(
9367
9371
  "[data-app-scroll='true']"
@@ -9375,8 +9379,8 @@ function Tc({
9375
9379
  }, oe = () => {
9376
9380
  J == null || J.removeEventListener("scroll", _), J = U(), J.addEventListener("scroll", _, { passive: !0 }), _();
9377
9381
  };
9378
- return oe(), E = window.requestAnimationFrame(oe), H = window.setTimeout(oe, 120), () => {
9379
- window.cancelAnimationFrame(E), window.clearTimeout(H), J == null || J.removeEventListener("scroll", _);
9382
+ return oe(), L = window.requestAnimationFrame(oe), j = window.setTimeout(oe, 120), () => {
9383
+ window.cancelAnimationFrame(L), window.clearTimeout(j), J == null || J.removeEventListener("scroll", _);
9380
9384
  };
9381
9385
  }, [h]), Q(() => {
9382
9386
  if (h) {
@@ -9384,62 +9388,62 @@ function Tc({
9384
9388
  return;
9385
9389
  }
9386
9390
  let J = 0;
9387
- const E = [], H = () => {
9388
- const T = v.current, j = T == null ? void 0 : T.parentElement, B = document.querySelector(
9391
+ const L = [], j = () => {
9392
+ const E = v.current, R = E == null ? void 0 : E.parentElement, D = document.querySelector(
9389
9393
  "[data-app-scroll='true']"
9390
- ), ne = tn(B) ?? B;
9391
- if (!T || !j || !ne) {
9394
+ ), ne = tn(D) ?? D;
9395
+ if (!E || !R || !ne) {
9392
9396
  Y(null);
9393
9397
  return;
9394
9398
  }
9395
- const ce = j.getBoundingClientRect(), pe = window.getComputedStyle(j), $ = ne.getBoundingClientRect(), ie = ne instanceof HTMLElement && ne.clientWidth > 0 ? ne.clientWidth : $.width, R = ce.left + parseFloat(pe.paddingLeft || "0"), A = {
9396
- marginLeft: Math.round($.left - R),
9399
+ const ce = R.getBoundingClientRect(), pe = window.getComputedStyle(R), M = ne.getBoundingClientRect(), ie = ne instanceof HTMLElement && ne.clientWidth > 0 ? ne.clientWidth : M.width, H = ce.left + parseFloat(pe.paddingLeft || "0"), A = {
9400
+ marginLeft: Math.round(M.left - H),
9397
9401
  width: Math.round(ie)
9398
9402
  };
9399
9403
  Y(
9400
9404
  (G) => G && G.marginLeft === A.marginLeft && G.width === A.width ? G : A
9401
9405
  );
9402
9406
  }, U = () => {
9403
- window.cancelAnimationFrame(J), J = window.requestAnimationFrame(H);
9407
+ window.cancelAnimationFrame(J), J = window.requestAnimationFrame(j);
9404
9408
  };
9405
9409
  U(), window.addEventListener("resize", U);
9406
9410
  const _ = new ResizeObserver(U), oe = v.current, W = oe == null ? void 0 : oe.parentElement, s = document.querySelector(
9407
9411
  "[data-app-scroll='true']"
9408
9412
  ), g = tn(s) ?? s;
9409
- return [W, s, g].forEach((T) => {
9410
- T && _.observe(T);
9411
- }), E.push(window.setTimeout(U, 120)), E.push(window.setTimeout(U, 280)), () => {
9412
- window.cancelAnimationFrame(J), window.removeEventListener("resize", U), _.disconnect(), E.forEach((T) => window.clearTimeout(T));
9413
+ return [W, s, g].forEach((E) => {
9414
+ E && _.observe(E);
9415
+ }), L.push(window.setTimeout(U, 120)), L.push(window.setTimeout(U, 280)), () => {
9416
+ window.cancelAnimationFrame(J), window.removeEventListener("resize", U), _.disconnect(), L.forEach((E) => window.clearTimeout(E));
9413
9417
  };
9414
9418
  }, [h]);
9415
9419
  const X = {
9416
9420
  ...z ? { marginLeft: z.marginLeft, width: z.width } : null,
9417
- "--page-header-control-height": L ? "34px" : "40px",
9418
- "--page-header-control-padding-x": L ? "10px" : "14px",
9419
- "--page-header-control-icon-left": L ? "10px" : "12px",
9420
- background: h ? "var(--bg-card)" : L ? "color-mix(in srgb, var(--bg-main) 82%, transparent)" : "color-mix(in srgb, var(--bg-main) 58%, transparent)",
9421
+ "--page-header-control-height": T ? "34px" : "40px",
9422
+ "--page-header-control-padding-x": T ? "10px" : "14px",
9423
+ "--page-header-control-icon-left": T ? "10px" : "12px",
9424
+ background: h ? "var(--bg-card)" : T ? "color-mix(in srgb, var(--bg-main) 82%, transparent)" : "color-mix(in srgb, var(--bg-main) 58%, transparent)",
9421
9425
  backdropFilter: "saturate(1.25) blur(18px)",
9422
9426
  WebkitBackdropFilter: "saturate(1.25) blur(18px)",
9423
- borderBottom: h || L ? "1px solid var(--border)" : "1px solid transparent",
9424
- boxShadow: L ? "0 10px 28px rgba(12, 54, 53, 0.12)" : "none"
9427
+ borderBottom: h || T ? "1px solid var(--border)" : "1px solid transparent",
9428
+ boxShadow: T ? "0 10px 28px rgba(12, 54, 53, 0.12)" : "none"
9425
9429
  };
9426
9430
  return /* @__PURE__ */ t(
9427
9431
  "div",
9428
9432
  {
9429
9433
  ref: v,
9430
9434
  "data-page-header": "true",
9431
- "data-compact": L ? "true" : "false",
9435
+ "data-compact": T ? "true" : "false",
9432
9436
  className: `sticky top-0 z-30 overflow-visible py-0 transition-[background-color,box-shadow,border-color] duration-300 ease-out ${h ? "mb-0 flex-shrink-0" : "mb-4 sm:mb-0"} ${c}`,
9433
9437
  style: X,
9434
9438
  children: /* @__PURE__ */ l(
9435
9439
  "div",
9436
9440
  {
9437
- className: `flex flex-wrap items-center justify-between transition-[gap,min-height,padding] duration-300 ease-out ${L ? "min-h-8 gap-1.5 px-3 py-0 sm:min-h-9 sm:gap-2" : P ? "min-h-9 gap-2 px-4 py-0 sm:min-h-10 sm:gap-2.5" : "min-h-10 gap-2.5 px-4 pt-0.5 sm:min-h-11 sm:gap-3"} ${u}`,
9441
+ className: `flex flex-wrap items-center justify-between transition-[gap,min-height,padding] duration-300 ease-out ${T ? "min-h-8 gap-1.5 px-3 py-0 sm:min-h-9 sm:gap-2" : P ? "min-h-9 gap-2 px-4 py-0 sm:min-h-10 sm:gap-2.5" : "min-h-10 gap-2.5 px-4 pt-0.5 sm:min-h-11 sm:gap-3"} ${u}`,
9438
9442
  children: [
9439
9443
  /* @__PURE__ */ l(
9440
9444
  "div",
9441
9445
  {
9442
- className: `min-w-0 flex flex-1 flex-col justify-center transition-[gap,transform] duration-300 ease-out ${L || P ? "gap-1" : "gap-1.5 sm:gap-2"}`,
9446
+ className: `min-w-0 flex flex-1 flex-col justify-center transition-[gap,transform] duration-300 ease-out ${T || P ? "gap-1" : "gap-1.5 sm:gap-2"}`,
9443
9447
  children: [
9444
9448
  te && /* @__PURE__ */ t(
9445
9449
  "nav",
@@ -9449,22 +9453,22 @@ function Tc({
9449
9453
  children: /* @__PURE__ */ t(
9450
9454
  "ol",
9451
9455
  {
9452
- className: `flex flex-wrap items-center gap-1.5 leading-none transition-[font-size,line-height] duration-300 ease-out ${L ? "text-[10px]" : "text-[10px] sm:text-[11px]"}`,
9453
- children: q.map((J, E) => {
9454
- const H = E === q.length - 1;
9456
+ className: `flex flex-wrap items-center gap-1.5 leading-none transition-[font-size,line-height] duration-300 ease-out ${T ? "text-[10px]" : "text-[10px] sm:text-[11px]"}`,
9457
+ children: q.map((J, L) => {
9458
+ const j = L === q.length - 1;
9455
9459
  return /* @__PURE__ */ l(
9456
9460
  "li",
9457
9461
  {
9458
9462
  className: "flex min-w-0 items-center gap-1.5",
9459
9463
  children: [
9460
- E > 0 && /* @__PURE__ */ t(
9464
+ L > 0 && /* @__PURE__ */ t(
9461
9465
  st,
9462
9466
  {
9463
9467
  className: "h-3.5 w-3.5 transition-[color,transform] duration-300 ease-out",
9464
9468
  style: { color: "var(--text-muted)" }
9465
9469
  }
9466
9470
  ),
9467
- J.href && !H ? /* @__PURE__ */ t(
9471
+ J.href && !j ? /* @__PURE__ */ t(
9468
9472
  x,
9469
9473
  {
9470
9474
  href: J.href,
@@ -9475,17 +9479,17 @@ function Tc({
9475
9479
  ) : /* @__PURE__ */ t(
9476
9480
  "span",
9477
9481
  {
9478
- "aria-current": H ? "page" : void 0,
9479
- className: H ? "truncate font-semibold" : "truncate",
9482
+ "aria-current": j ? "page" : void 0,
9483
+ className: j ? "truncate font-semibold" : "truncate",
9480
9484
  style: {
9481
- color: H ? "var(--text-main)" : "var(--text-muted)"
9485
+ color: j ? "var(--text-main)" : "var(--text-muted)"
9482
9486
  },
9483
9487
  children: J.label
9484
9488
  }
9485
9489
  )
9486
9490
  ]
9487
9491
  },
9488
- `${J.label}-${E}`
9492
+ `${J.label}-${L}`
9489
9493
  );
9490
9494
  })
9491
9495
  }
@@ -9495,12 +9499,12 @@ function Tc({
9495
9499
  /* @__PURE__ */ l(
9496
9500
  "div",
9497
9501
  {
9498
- className: `flex min-w-0 items-center transition-[gap,transform] duration-300 ease-out ${L || P ? "gap-2" : "gap-2.5 sm:gap-3"}`,
9502
+ className: `flex min-w-0 items-center transition-[gap,transform] duration-300 ease-out ${T || P ? "gap-2" : "gap-2.5 sm:gap-3"}`,
9499
9503
  children: [
9500
9504
  /* @__PURE__ */ t(
9501
9505
  "span",
9502
9506
  {
9503
- className: `flex-shrink-0 transition-[color,transform,opacity] duration-300 ease-out ${L ? "scale-75 opacity-80" : "scale-90 opacity-100"}`,
9507
+ className: `flex-shrink-0 transition-[color,transform,opacity] duration-300 ease-out ${T ? "scale-75 opacity-80" : "scale-90 opacity-100"}`,
9504
9508
  style: {
9505
9509
  color: te ? "var(--text-secondary)" : "var(--text-muted)"
9506
9510
  },
@@ -9510,13 +9514,13 @@ function Tc({
9510
9514
  /* @__PURE__ */ l(
9511
9515
  "div",
9512
9516
  {
9513
- className: `flex min-w-0 flex-1 flex-wrap items-center transition-[gap] duration-300 ease-out ${L ? "gap-x-2 gap-y-1" : "gap-x-3 gap-y-2"}`,
9517
+ className: `flex min-w-0 flex-1 flex-wrap items-center transition-[gap] duration-300 ease-out ${T ? "gap-x-2 gap-y-1" : "gap-x-3 gap-y-2"}`,
9514
9518
  children: [
9515
9519
  /* @__PURE__ */ l("div", { className: "min-w-0 flex-shrink transition-[transform] duration-300 ease-out", children: [
9516
9520
  /* @__PURE__ */ t(
9517
9521
  "h1",
9518
9522
  {
9519
- className: `truncate font-bold tracking-tight transition-[font-size,line-height,color] duration-300 ease-out ${L ? "text-sm sm:text-base" : "text-lg sm:text-xl"}`,
9523
+ className: `truncate font-bold tracking-tight transition-[font-size,line-height,color] duration-300 ease-out ${T ? "text-sm sm:text-base" : "text-lg sm:text-xl"}`,
9520
9524
  style: { color: "var(--text-main)" },
9521
9525
  children: e
9522
9526
  }
@@ -9524,8 +9528,8 @@ function Tc({
9524
9528
  r && /* @__PURE__ */ t(
9525
9529
  "p",
9526
9530
  {
9527
- "aria-hidden": L,
9528
- className: `overflow-hidden text-xs transition-[max-height,opacity,transform,margin] duration-300 ease-out ${L ? "mt-0 max-h-0 -translate-y-1 opacity-0" : "mt-0.5 max-h-5 translate-y-0 opacity-100"}`,
9531
+ "aria-hidden": T,
9532
+ className: `overflow-hidden text-xs transition-[max-height,opacity,transform,margin] duration-300 ease-out ${T ? "mt-0 max-h-0 -translate-y-1 opacity-0" : "mt-0.5 max-h-5 translate-y-0 opacity-100"}`,
9529
9533
  style: { color: "var(--text-muted)" },
9530
9534
  children: r
9531
9535
  }
@@ -9534,7 +9538,7 @@ function Tc({
9534
9538
  a && /* @__PURE__ */ t(
9535
9539
  "div",
9536
9540
  {
9537
- className: `page-header-meta flex min-w-0 flex-1 basis-full items-center overflow-visible transition-[gap,opacity,transform] duration-300 ease-out sm:basis-auto ${L ? "translate-y-0 gap-1.5 opacity-95" : "gap-2 opacity-100"}`,
9541
+ className: `page-header-meta flex min-w-0 flex-1 basis-full items-center overflow-visible transition-[gap,opacity,transform] duration-300 ease-out sm:basis-auto ${T ? "translate-y-0 gap-1.5 opacity-95" : "gap-2 opacity-100"}`,
9538
9542
  children: a
9539
9543
  }
9540
9544
  )
@@ -9550,7 +9554,7 @@ function Tc({
9550
9554
  n && /* @__PURE__ */ t(
9551
9555
  "div",
9552
9556
  {
9553
- className: `page-header-actions ml-auto flex max-w-full flex-shrink-0 flex-wrap items-center justify-end self-center overflow-visible transition-[gap,min-height,opacity,transform] duration-300 ease-out ${L ? "min-h-9 gap-1 opacity-95" : "min-h-9 gap-1.5 opacity-100"}`,
9557
+ className: `page-header-actions ml-auto flex max-w-full flex-shrink-0 flex-wrap items-center justify-end self-center overflow-visible transition-[gap,min-height,opacity,transform] duration-300 ease-out ${T ? "min-h-9 gap-1 opacity-95" : "min-h-9 gap-1.5 opacity-100"}`,
9554
9558
  children: /* @__PURE__ */ t(
9555
9559
  $a.Provider,
9556
9560
  {
@@ -9599,7 +9603,7 @@ function Dc({
9599
9603
  src: r,
9600
9604
  projectKey: n
9601
9605
  }) {
9602
- const [a, i] = D("system"), c = le(null);
9606
+ const [a, i] = B("system"), c = le(null);
9603
9607
  Q(() => {
9604
9608
  i(va());
9605
9609
  const f = new MutationObserver(
@@ -9624,8 +9628,8 @@ function Dc({
9624
9628
  if (!n) return;
9625
9629
  const f = n;
9626
9630
  function p(h) {
9627
- var L, S, w;
9628
- if (h.source !== ((L = c.current) == null ? void 0 : L.contentWindow) || m && h.origin !== m) return;
9631
+ var T, S, w;
9632
+ if (h.source !== ((T = c.current) == null ? void 0 : T.contentWindow) || m && h.origin !== m) return;
9629
9633
  if (((S = h.data) == null ? void 0 : S.type) === "prime-microservice:overlay") {
9630
9634
  window.dispatchEvent(
9631
9635
  new CustomEvent("prime-auth:microservice-overlay", {
@@ -9663,7 +9667,7 @@ function Dc({
9663
9667
  ) });
9664
9668
  }
9665
9669
  function Bc() {
9666
- const [e, r] = D(""), [n, a] = D(!1), [i, c] = D({ width: 96, height: 96 });
9670
+ const [e, r] = B(""), [n, a] = B(!1), [i, c] = B({ width: 96, height: 96 });
9667
9671
  return Q(() => {
9668
9672
  let u = !1;
9669
9673
  return fetch("/api/microservices/prime-suite/chat-url", { cache: "no-store" }).then((m) => m.ok ? m.json() : null).then((m) => {
@@ -9730,7 +9734,7 @@ function Oc({
9730
9734
  return /* @__PURE__ */ t(Nl, { position: e, theme: r, richColors: !0, closeButton: !0 });
9731
9735
  }
9732
9736
  function Ic(e) {
9733
- const [r, n] = D({}), [a, i] = D(!1), c = we(
9737
+ const [r, n] = B({}), [a, i] = B(!1), c = we(
9734
9738
  (p) => a || r[p] ? e[p] : void 0,
9735
9739
  [e, a, r]
9736
9740
  ), u = we((p) => {