bonsaif-ui 0.1.47 → 0.1.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bonsaif-ui.js +327 -321
- package/dist/bonsaif-ui.umd.cjs +3 -3
- package/dist/components/ui/DataSheets.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/bonsaif-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import je, { useRef as le, useState as
|
|
2
|
+
import je, { useRef as le, useState as A, 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), [
|
|
44
|
+
const p = le(null), [h, x] = A(!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";
|
|
45
45
|
Q(() => {
|
|
46
46
|
var k;
|
|
47
47
|
i && ((k = p.current) == null || k.focus());
|
|
@@ -53,9 +53,9 @@ function El({
|
|
|
53
53
|
return /* @__PURE__ */ l(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
|
-
className: `relative min-w-0 max-w-full flex-shrink-0 overflow-visible transition-[width] duration-200 ease-out ${
|
|
56
|
+
className: `relative min-w-0 max-w-full flex-shrink-0 overflow-visible transition-[width] duration-200 ease-out ${v ? S : "w-24 sm:w-28"}`,
|
|
57
57
|
onMouseDown: (k) => {
|
|
58
|
-
|
|
58
|
+
v || (k.preventDefault(), w());
|
|
59
59
|
},
|
|
60
60
|
children: [
|
|
61
61
|
/* @__PURE__ */ t(
|
|
@@ -80,12 +80,12 @@ function El({
|
|
|
80
80
|
onKeyDown: (k) => {
|
|
81
81
|
k.key === "Escape" && (u == null || u());
|
|
82
82
|
},
|
|
83
|
-
placeholder:
|
|
84
|
-
className: `${L} w-full py-0 text-sm leading-none placeholder:text-[var(--text-muted)] focus:outline-none transition-all duration-200 ${
|
|
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"}`,
|
|
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)",
|
|
88
|
-
paddingRight:
|
|
88
|
+
paddingRight: v ? "calc(var(--page-header-control-padding-x, 14px) + 18px)" : "var(--page-header-control-padding-x, 14px)",
|
|
89
89
|
background: "color-mix(in srgb, var(--bg-card) 86%, transparent)",
|
|
90
90
|
border: "1px solid var(--border)",
|
|
91
91
|
color: "var(--text-main)"
|
|
@@ -157,12 +157,12 @@ function Ut({
|
|
|
157
157
|
className: m = "",
|
|
158
158
|
tooltipClassName: f = "",
|
|
159
159
|
style: p,
|
|
160
|
-
tooltipStyle:
|
|
160
|
+
tooltipStyle: h,
|
|
161
161
|
as: x = "div"
|
|
162
162
|
}) {
|
|
163
|
-
const
|
|
163
|
+
const v = le(null), L = le(null), S = le(null), w = le(!1), [k, O] = A(null), [ee, z] = A("");
|
|
164
164
|
Q(() => {
|
|
165
|
-
const E =
|
|
165
|
+
const E = v.current;
|
|
166
166
|
E && (E.querySelectorAll("[title]").forEach((R) => {
|
|
167
167
|
const U = R.getAttribute("title");
|
|
168
168
|
U && (R.getAttribute("aria-label") || R.setAttribute("aria-label", U), R.removeAttribute("title"));
|
|
@@ -172,21 +172,21 @@ function Ut({
|
|
|
172
172
|
const E = L.current;
|
|
173
173
|
if (!E) return;
|
|
174
174
|
const R = 12, U = 14, _ = E.getBoundingClientRect(), oe = window.innerWidth - _.width - R, W = window.innerHeight - _.height - R;
|
|
175
|
-
let s = k.mouseX + U, y = k.mouseY + U,
|
|
176
|
-
if (!i &&
|
|
177
|
-
const B =
|
|
178
|
-
c === "top" ? (s = ne - _.width / 2, y = B.top - _.height - U, j = _.height - 1) : c === "left" ? (s = B.left - _.width - U, y = ce - _.height / 2,
|
|
175
|
+
let s = k.mouseX + U, y = k.mouseY + U, D, j;
|
|
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, y = B.top - _.height - U, j = _.height - 1) : c === "left" ? (s = B.left - _.width - U, y = ce - _.height / 2, D = _.width - 1) : c === "right" ? (s = B.right + U, y = ce - _.height / 2, D = -7) : (s = ne - _.width / 2, y = B.bottom + U, j = -7);
|
|
179
179
|
}
|
|
180
|
-
if (i && (s > oe && (s = k.mouseX - _.width - U), y > W && (y = k.mouseY - _.height - U)), s = Math.min(Math.max(R, s), Math.max(R, oe)), y = Math.min(Math.max(R, y), Math.max(R, W)), !i &&
|
|
181
|
-
const B =
|
|
182
|
-
c === "top" || c === "bottom" ?
|
|
180
|
+
if (i && (s > oe && (s = k.mouseX - _.width - U), y > W && (y = k.mouseY - _.height - U)), s = Math.min(Math.max(R, s), Math.max(R, oe)), y = Math.min(Math.max(R, y), Math.max(R, 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" ? D = Math.min(Math.max(14, ne - s), _.width - 14) : j = Math.min(Math.max(14, ce - y), _.height - 14);
|
|
183
183
|
}
|
|
184
|
-
(Math.abs(s - k.x) > 0.5 || Math.abs(y - k.y) > 0.5 ||
|
|
184
|
+
(Math.abs(s - k.x) > 0.5 || Math.abs(y - k.y) > 0.5 || D !== k.arrowX || j !== k.arrowY) && O(
|
|
185
185
|
(B) => B && {
|
|
186
186
|
...B,
|
|
187
187
|
x: s,
|
|
188
188
|
y,
|
|
189
|
-
arrowX:
|
|
189
|
+
arrowX: D,
|
|
190
190
|
arrowY: j
|
|
191
191
|
}
|
|
192
192
|
);
|
|
@@ -195,7 +195,7 @@ function Ut({
|
|
|
195
195
|
S.current && (window.clearTimeout(S.current), S.current = null);
|
|
196
196
|
}, T = (E, R) => {
|
|
197
197
|
if (!$l() || w.current) return;
|
|
198
|
-
const U =
|
|
198
|
+
const U = v.current;
|
|
199
199
|
if (U && !hr(U)) {
|
|
200
200
|
if (n) {
|
|
201
201
|
const _ = Ll(U);
|
|
@@ -205,7 +205,7 @@ function Ut({
|
|
|
205
205
|
!n && !r || O({ mouseX: E, mouseY: R, x: E + 14, y: R + 14 });
|
|
206
206
|
}
|
|
207
207
|
}, q = () => {
|
|
208
|
-
const E =
|
|
208
|
+
const E = v.current;
|
|
209
209
|
if (!E) return;
|
|
210
210
|
const R = E.getBoundingClientRect();
|
|
211
211
|
T(R.left + R.width / 2, R.bottom);
|
|
@@ -224,7 +224,7 @@ function Ut({
|
|
|
224
224
|
};
|
|
225
225
|
Q(() => {
|
|
226
226
|
if (!k) return;
|
|
227
|
-
if (hr(
|
|
227
|
+
if (hr(v.current)) {
|
|
228
228
|
O(null);
|
|
229
229
|
return;
|
|
230
230
|
}
|
|
@@ -233,7 +233,7 @@ function Ut({
|
|
|
233
233
|
};
|
|
234
234
|
document.addEventListener("pointerdown", R, !0), document.addEventListener("click", R, !0), document.addEventListener("scroll", E, !0), window.addEventListener("blur", E), document.addEventListener("visibilitychange", E), document.addEventListener("keydown", E, !0);
|
|
235
235
|
const U = new MutationObserver(() => {
|
|
236
|
-
hr(
|
|
236
|
+
hr(v.current) && O(null);
|
|
237
237
|
});
|
|
238
238
|
return U.observe(document.body, {
|
|
239
239
|
childList: !0,
|
|
@@ -260,7 +260,7 @@ function Ut({
|
|
|
260
260
|
x,
|
|
261
261
|
{
|
|
262
262
|
ref: (E) => {
|
|
263
|
-
|
|
263
|
+
v.current = E;
|
|
264
264
|
},
|
|
265
265
|
className: m,
|
|
266
266
|
style: p,
|
|
@@ -280,7 +280,7 @@ function Ut({
|
|
|
280
280
|
children: e
|
|
281
281
|
}
|
|
282
282
|
),
|
|
283
|
-
k && J && !hr(
|
|
283
|
+
k && J && !hr(v.current) ? Ze(
|
|
284
284
|
/* @__PURE__ */ l(
|
|
285
285
|
"div",
|
|
286
286
|
{
|
|
@@ -306,7 +306,7 @@ function Ut({
|
|
|
306
306
|
whiteSpace: "normal",
|
|
307
307
|
lineHeight: 1.6,
|
|
308
308
|
overflowWrap: "anywhere",
|
|
309
|
-
...
|
|
309
|
+
...h
|
|
310
310
|
},
|
|
311
311
|
children: [
|
|
312
312
|
u && /* @__PURE__ */ t(
|
|
@@ -317,11 +317,11 @@ function Ut({
|
|
|
317
317
|
position: "absolute",
|
|
318
318
|
width: 12,
|
|
319
319
|
height: 12,
|
|
320
|
-
background: (
|
|
321
|
-
borderLeft: c === "right" ? (
|
|
322
|
-
borderTop: c === "bottom" || c === "right" ? (
|
|
323
|
-
borderRight: c === "left" ? (
|
|
324
|
-
borderBottom: c === "top" || c === "left" ? (
|
|
320
|
+
background: (h == null ? void 0 : h.background) ?? "var(--bg-card)",
|
|
321
|
+
borderLeft: c === "right" ? (h == null ? void 0 : h.border) ?? "1px solid var(--border)" : void 0,
|
|
322
|
+
borderTop: c === "bottom" || c === "right" ? (h == null ? void 0 : h.border) ?? "1px solid var(--border)" : void 0,
|
|
323
|
+
borderRight: c === "left" ? (h == null ? void 0 : h.border) ?? "1px solid var(--border)" : void 0,
|
|
324
|
+
borderBottom: c === "top" || c === "left" ? (h == null ? void 0 : h.border) ?? "1px solid var(--border)" : void 0,
|
|
325
325
|
transform: "rotate(45deg)",
|
|
326
326
|
left: k.arrowX === void 0 ? void 0 : k.arrowX - 6,
|
|
327
327
|
top: k.arrowY === void 0 ? void 0 : k.arrowY - 6,
|
|
@@ -381,20 +381,20 @@ function Be({
|
|
|
381
381
|
padding: m,
|
|
382
382
|
children: f,
|
|
383
383
|
className: p = "",
|
|
384
|
-
disabled:
|
|
384
|
+
disabled: h,
|
|
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), T = i ??
|
|
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), T = i ?? v.title ?? v["aria-label"] ?? (S ? Y : void 0), q = T ? void 0 : v.title, Z = v["aria-label"] ?? (typeof T == "string" ? T : Y || void 0), te = n ? null : a ?? (S ? Il(f) : null), P = /* @__PURE__ */ l(
|
|
389
389
|
"button",
|
|
390
390
|
{
|
|
391
|
-
...
|
|
391
|
+
...v,
|
|
392
392
|
title: q,
|
|
393
393
|
"aria-label": Z,
|
|
394
394
|
"data-variant": e,
|
|
395
395
|
"data-size": O,
|
|
396
396
|
"data-icon": ee ? "true" : void 0,
|
|
397
|
-
disabled:
|
|
397
|
+
disabled: h || n,
|
|
398
398
|
className: `${Ml} ${z ? Al : Tl[e]} ${ee ? Bl[O] : Dl[O]} ${w && !ee ? "px-2.5" : ""} ${p}`,
|
|
399
399
|
style: {
|
|
400
400
|
...Ol[e],
|
|
@@ -569,9 +569,9 @@ function Ks({
|
|
|
569
569
|
loadModule: m,
|
|
570
570
|
activeService: f,
|
|
571
571
|
initialService: p,
|
|
572
|
-
onActiveServiceChange:
|
|
572
|
+
onActiveServiceChange: h,
|
|
573
573
|
canAccess: x,
|
|
574
|
-
keepAlive:
|
|
574
|
+
keepAlive: v = !0,
|
|
575
575
|
title: L,
|
|
576
576
|
subtitle: S,
|
|
577
577
|
emptyState: w,
|
|
@@ -598,18 +598,18 @@ 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] =
|
|
601
|
+
)) == null ? void 0 : qe.service, [oe, W] = A(
|
|
602
602
|
p ?? _ ?? ""
|
|
603
|
-
), [s, y] =
|
|
603
|
+
), [s, y] = A({}), [D, j] = A({}), [B, ne] = A(""), [ce, pe] = A(!1), $ = le(D), ie = le(0), I = q ?? B, M = Xn(I), G = z === !0 || z === "auto" && U.length >= Y, V = G && I.trim().length > 0, re = at(() => M ? U.filter(
|
|
604
604
|
(ae) => Xn(zl(ae)).includes(M)
|
|
605
605
|
) : U, [M, 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 =
|
|
610
|
-
}, [
|
|
609
|
+
$.current = D;
|
|
610
|
+
}, [D]);
|
|
611
611
|
const g = (ae) => {
|
|
612
|
-
ae.disabled || (f || W(ae.service),
|
|
612
|
+
ae.disabled || (f || W(ae.service), h == null || h(ae.service, ae));
|
|
613
613
|
}, H = (ae) => {
|
|
614
614
|
q === void 0 && ne(ae), Z == null || Z(ae);
|
|
615
615
|
}, ue = (ae, Me) => {
|
|
@@ -622,7 +622,7 @@ function Ks({
|
|
|
622
622
|
}, be = we(() => {
|
|
623
623
|
if (!se) return;
|
|
624
624
|
const ae = se.service, Me = $.current[ae];
|
|
625
|
-
if (Me != null && Me.loading || Me != null && Me.component &&
|
|
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
628
|
j((De) => ({
|
|
@@ -639,7 +639,7 @@ function Ks({
|
|
|
639
639
|
...De,
|
|
640
640
|
[ae]: { ...De[ae], loading: !0, error: void 0 }
|
|
641
641
|
})), Te(se, i).then((De) => {
|
|
642
|
-
if (_e !== ie.current && !
|
|
642
|
+
if (_e !== ie.current && !v) return;
|
|
643
643
|
const et = Fl(De);
|
|
644
644
|
j((Fe) => ({
|
|
645
645
|
...Fe,
|
|
@@ -652,9 +652,9 @@ function Ks({
|
|
|
652
652
|
[ae]: { ...Fe[ae], loading: !1, error: et }
|
|
653
653
|
}));
|
|
654
654
|
});
|
|
655
|
-
}, [i,
|
|
655
|
+
}, [i, v, m, u, se]);
|
|
656
656
|
Q(be, [be]);
|
|
657
|
-
const Se = se ? s[se.service] ?? null : null, he = se ?
|
|
657
|
+
const Se = se ? s[se.service] ?? null : null, he = se ? D[se.service] : void 0, Ee = he == null ? void 0 : he.component, ke = (ae) => {
|
|
658
658
|
se && y((Me) => ({
|
|
659
659
|
...Me,
|
|
660
660
|
[se.service]: ae
|
|
@@ -919,21 +919,21 @@ 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] =
|
|
922
|
+
const i = Ul(), u = Da(e || i), m = a === "popover", [f, p] = A(!1), h = le(null), [x, v] = A({
|
|
923
923
|
horizontal: "left",
|
|
924
924
|
vertical: "bottom"
|
|
925
|
-
}), [L, S] =
|
|
925
|
+
}), [L, S] = A(u.year), [w, k] = A(u.month), [O, ee] = A("days"), z = 16, [Y, T] = A(0), q = L - 7 + Y, Z = Array.from({ length: z }, (W, s) => q + s);
|
|
926
926
|
Q(() => {
|
|
927
|
-
if (!m || !f || !
|
|
928
|
-
const W =
|
|
929
|
-
|
|
927
|
+
if (!m || !f || !h.current) return;
|
|
928
|
+
const W = h.current.getBoundingClientRect(), s = 8, y = 280, D = 340, j = W.left + y > window.innerWidth - s, B = W.right - y >= s, ne = W.bottom + 8 + D > window.innerHeight - s, ce = W.top - 8 - D >= s;
|
|
929
|
+
v({
|
|
930
930
|
horizontal: j && B ? "right" : "left",
|
|
931
931
|
vertical: ne && ce ? "top" : "bottom"
|
|
932
932
|
});
|
|
933
933
|
}, [m, f]), Q(() => {
|
|
934
934
|
if (!m || !f) return;
|
|
935
935
|
function W(y) {
|
|
936
|
-
|
|
936
|
+
h.current && (h.current.contains(y.target) || p(!1));
|
|
937
937
|
}
|
|
938
938
|
function s(y) {
|
|
939
939
|
y.key === "Escape" && p(!1);
|
|
@@ -1198,7 +1198,7 @@ function Ys({
|
|
|
1198
1198
|
children: R.map((W, s) => {
|
|
1199
1199
|
if (W === null)
|
|
1200
1200
|
return /* @__PURE__ */ t("div", { style: { aspectRatio: "1" } }, s);
|
|
1201
|
-
const y = ln(L, w, W),
|
|
1201
|
+
const y = ln(L, w, W), D = y === e, j = y === i, B = !!(n && y < n);
|
|
1202
1202
|
return /* @__PURE__ */ t(
|
|
1203
1203
|
"button",
|
|
1204
1204
|
{
|
|
@@ -1211,11 +1211,11 @@ function Ys({
|
|
|
1211
1211
|
border: "none",
|
|
1212
1212
|
cursor: B ? "not-allowed" : "pointer",
|
|
1213
1213
|
fontSize: 12,
|
|
1214
|
-
fontWeight:
|
|
1215
|
-
background:
|
|
1216
|
-
color:
|
|
1214
|
+
fontWeight: D || j ? 700 : 400,
|
|
1215
|
+
background: D ? "var(--primary)" : "transparent",
|
|
1216
|
+
color: D ? "var(--primary-fg, #ffffff)" : B ? "var(--text-muted)" : "var(--text-main)",
|
|
1217
1217
|
opacity: B ? 0.4 : 1,
|
|
1218
|
-
outline: j && !
|
|
1218
|
+
outline: j && !D ? "2px solid var(--primary)" : "none",
|
|
1219
1219
|
outlineOffset: "-2px"
|
|
1220
1220
|
},
|
|
1221
1221
|
children: W
|
|
@@ -1229,7 +1229,7 @@ function Ys({
|
|
|
1229
1229
|
]
|
|
1230
1230
|
}
|
|
1231
1231
|
);
|
|
1232
|
-
return m ? /* @__PURE__ */ l("div", { ref:
|
|
1232
|
+
return m ? /* @__PURE__ */ l("div", { ref: h, className: "relative w-full", children: [
|
|
1233
1233
|
/* @__PURE__ */ l(
|
|
1234
1234
|
"button",
|
|
1235
1235
|
{
|
|
@@ -1290,7 +1290,7 @@ const sn = ga(function({
|
|
|
1290
1290
|
containerClassName: m = "",
|
|
1291
1291
|
disabled: f,
|
|
1292
1292
|
...p
|
|
1293
|
-
},
|
|
1293
|
+
}, h) {
|
|
1294
1294
|
const x = le(null);
|
|
1295
1295
|
return Q(() => {
|
|
1296
1296
|
x.current && (x.current.indeterminate = c);
|
|
@@ -1304,8 +1304,8 @@ const sn = ga(function({
|
|
|
1304
1304
|
"input",
|
|
1305
1305
|
{
|
|
1306
1306
|
...p,
|
|
1307
|
-
ref: (
|
|
1308
|
-
x.current =
|
|
1307
|
+
ref: (v) => {
|
|
1308
|
+
x.current = v, Yl(h, v);
|
|
1309
1309
|
},
|
|
1310
1310
|
type: "checkbox",
|
|
1311
1311
|
disabled: f,
|
|
@@ -1351,14 +1351,14 @@ function Oa({
|
|
|
1351
1351
|
stopPropagation: m = !0,
|
|
1352
1352
|
onCopied: f,
|
|
1353
1353
|
onCopyError: p,
|
|
1354
|
-
className:
|
|
1354
|
+
className: h = "",
|
|
1355
1355
|
style: x,
|
|
1356
|
-
children:
|
|
1356
|
+
children: v,
|
|
1357
1357
|
onClick: L,
|
|
1358
1358
|
type: S = "button",
|
|
1359
1359
|
...w
|
|
1360
1360
|
}) {
|
|
1361
|
-
const [k, O] =
|
|
1361
|
+
const [k, O] = A(!1), ee = le(null);
|
|
1362
1362
|
Q(() => () => {
|
|
1363
1363
|
ee.current && window.clearTimeout(ee.current);
|
|
1364
1364
|
}, []);
|
|
@@ -1393,7 +1393,7 @@ function Oa({
|
|
|
1393
1393
|
title: k ? a : n,
|
|
1394
1394
|
"aria-label": w["aria-label"] ?? (k ? a : n),
|
|
1395
1395
|
"data-copied": k ? "true" : void 0,
|
|
1396
|
-
className: `relative inline-flex h-7 shrink-0 items-center justify-center gap-1.5 rounded-md transition-all duration-200 ${
|
|
1396
|
+
className: `relative inline-flex h-7 shrink-0 items-center justify-center gap-1.5 rounded-md transition-all duration-200 ${v ? "min-w-7 px-2" : "w-7"} ${h}`,
|
|
1397
1397
|
style: {
|
|
1398
1398
|
cursor: "pointer",
|
|
1399
1399
|
background: k ? "rgba(22,163,74,0.15)" : "var(--bg-card)",
|
|
@@ -1411,7 +1411,7 @@ function Oa({
|
|
|
1411
1411
|
children: k ? u : c
|
|
1412
1412
|
}
|
|
1413
1413
|
),
|
|
1414
|
-
|
|
1414
|
+
v && /* @__PURE__ */ t("span", { className: "text-xs font-semibold leading-none", children: k ? i ?? v : v })
|
|
1415
1415
|
]
|
|
1416
1416
|
}
|
|
1417
1417
|
);
|
|
@@ -1501,20 +1501,20 @@ function At({
|
|
|
1501
1501
|
placeholder: m = "Seleccionar…",
|
|
1502
1502
|
emptyLabel: f,
|
|
1503
1503
|
disabled: p = !1,
|
|
1504
|
-
className:
|
|
1504
|
+
className: h = "",
|
|
1505
1505
|
style: x,
|
|
1506
|
-
dropdownMinWidth:
|
|
1506
|
+
dropdownMinWidth: v,
|
|
1507
1507
|
height: L = 40,
|
|
1508
1508
|
padding: S = "0 10px",
|
|
1509
1509
|
searchable: w = !0,
|
|
1510
1510
|
minOptionsForSearch: k = 6
|
|
1511
1511
|
}) {
|
|
1512
|
-
const [O, ee] =
|
|
1512
|
+
const [O, ee] = A(!1), [z, Y] = A(""), [T, q] = A(-1), [Z, te] = A(!1), [P, X] = A({}), J = le(null), E = le(null), R = le(null), U = le(null), _ = w && n.length >= k, oe = n.find((I) => I.value === e) ?? null, W = c === "ghost", s = a === "error" ? "var(--danger)" : O ? "var(--primary)" : "var(--border)", y = _ && z.trim() ? n.filter(
|
|
1513
1513
|
(I) => {
|
|
1514
1514
|
var M;
|
|
1515
1515
|
return I.label.toLowerCase().includes(z.toLowerCase()) || ((M = I.sublabel) == null ? void 0 : M.toLowerCase().includes(z.toLowerCase()));
|
|
1516
1516
|
}
|
|
1517
|
-
) : n,
|
|
1517
|
+
) : n, D = we(() => {
|
|
1518
1518
|
const I = J.current;
|
|
1519
1519
|
if (!I) return;
|
|
1520
1520
|
const M = I.getBoundingClientRect(), G = _ ? 272 : 212, V = window.innerHeight - M.bottom, re = V < G && M.top > V;
|
|
@@ -1524,10 +1524,10 @@ function At({
|
|
|
1524
1524
|
top: re ? void 0 : M.bottom + 4,
|
|
1525
1525
|
bottom: re ? window.innerHeight - M.top + 4 : void 0,
|
|
1526
1526
|
width: M.width,
|
|
1527
|
-
minWidth: Zr(
|
|
1527
|
+
minWidth: Zr(v),
|
|
1528
1528
|
zIndex: 9999
|
|
1529
1529
|
});
|
|
1530
|
-
}, [
|
|
1530
|
+
}, [v, _]);
|
|
1531
1531
|
Q(() => te(!0), []), Q(() => {
|
|
1532
1532
|
if (!O) return;
|
|
1533
1533
|
function I(M) {
|
|
@@ -1537,16 +1537,16 @@ function At({
|
|
|
1537
1537
|
}
|
|
1538
1538
|
return document.addEventListener("mousedown", I), () => document.removeEventListener("mousedown", I);
|
|
1539
1539
|
}, [O]), Q(() => {
|
|
1540
|
-
O && (q(-1),
|
|
1540
|
+
O && (q(-1), D(), _ && setTimeout(() => {
|
|
1541
1541
|
var I;
|
|
1542
1542
|
return (I = R.current) == null ? void 0 : I.focus();
|
|
1543
1543
|
}, 0));
|
|
1544
|
-
}, [O, _,
|
|
1544
|
+
}, [O, _, D]), Q(() => {
|
|
1545
1545
|
if (O)
|
|
1546
|
-
return window.addEventListener("resize",
|
|
1547
|
-
window.removeEventListener("resize",
|
|
1546
|
+
return window.addEventListener("resize", D), window.addEventListener("scroll", D, !0), () => {
|
|
1547
|
+
window.removeEventListener("resize", D), window.removeEventListener("scroll", D, !0);
|
|
1548
1548
|
};
|
|
1549
|
-
}, [O,
|
|
1549
|
+
}, [O, D]), Q(() => {
|
|
1550
1550
|
if (T < 0 || !U.current) return;
|
|
1551
1551
|
const I = U.current.children[T];
|
|
1552
1552
|
I == null || I.scrollIntoView({ block: "nearest" });
|
|
@@ -1751,7 +1751,7 @@ function At({
|
|
|
1751
1751
|
"div",
|
|
1752
1752
|
{
|
|
1753
1753
|
ref: J,
|
|
1754
|
-
className: `relative ${
|
|
1754
|
+
className: `relative ${h || "w-full"}`,
|
|
1755
1755
|
style: x,
|
|
1756
1756
|
children: [
|
|
1757
1757
|
/* @__PURE__ */ l(
|
|
@@ -1868,8 +1868,8 @@ function Zs({
|
|
|
1868
1868
|
iconLeft: f = 10,
|
|
1869
1869
|
searchable: p = !0
|
|
1870
1870
|
}) {
|
|
1871
|
-
const
|
|
1872
|
-
(x,
|
|
1871
|
+
const h = i ? n.map(
|
|
1872
|
+
(x, v) => v === 0 && !x.color ? { ...x, sublabel: x.sublabel ?? void 0 } : x
|
|
1873
1873
|
) : n;
|
|
1874
1874
|
return /* @__PURE__ */ l("div", { className: `relative ${c}`, children: [
|
|
1875
1875
|
i && /* @__PURE__ */ t(
|
|
@@ -1885,7 +1885,7 @@ function Zs({
|
|
|
1885
1885
|
{
|
|
1886
1886
|
value: e,
|
|
1887
1887
|
onChange: r,
|
|
1888
|
-
options:
|
|
1888
|
+
options: h,
|
|
1889
1889
|
placeholder: a,
|
|
1890
1890
|
searchable: p,
|
|
1891
1891
|
minOptionsForSearch: 5,
|
|
@@ -1916,9 +1916,9 @@ function Ia({
|
|
|
1916
1916
|
children: m,
|
|
1917
1917
|
size: f = "md",
|
|
1918
1918
|
maxWidth: p,
|
|
1919
|
-
zIndex:
|
|
1919
|
+
zIndex: h = 1e3,
|
|
1920
1920
|
closeOnBackdrop: x = !0,
|
|
1921
|
-
closeOnEscape:
|
|
1921
|
+
closeOnEscape: v = !0,
|
|
1922
1922
|
showCloseButton: L = !0,
|
|
1923
1923
|
placement: S = "center",
|
|
1924
1924
|
bodyClassName: w = "px-6 py-5",
|
|
@@ -1929,7 +1929,7 @@ function Ia({
|
|
|
1929
1929
|
frameless: Y = !1,
|
|
1930
1930
|
disabled: T = !1
|
|
1931
1931
|
}) {
|
|
1932
|
-
const [q, Z] =
|
|
1932
|
+
const [q, Z] = A(!1), [te, P] = A(!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
|
|
@@ -1941,12 +1941,12 @@ function Ia({
|
|
|
1941
1941
|
document.body.style.overflow = "";
|
|
1942
1942
|
};
|
|
1943
1943
|
}, [e]), Q(() => {
|
|
1944
|
-
if (!e || !
|
|
1944
|
+
if (!e || !v) return;
|
|
1945
1945
|
const oe = (W) => {
|
|
1946
1946
|
W.key === "Escape" && r();
|
|
1947
1947
|
};
|
|
1948
1948
|
return window.addEventListener("keydown", oe), () => window.removeEventListener("keydown", oe);
|
|
1949
|
-
}, [
|
|
1949
|
+
}, [v, r, e]), !q) return null;
|
|
1950
1950
|
const J = n || a || i || c || L, E = p ?? Zl[f], R = 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(
|
|
@@ -1957,7 +1957,7 @@ function Ia({
|
|
|
1957
1957
|
"data-bonsaif-overlay": "true",
|
|
1958
1958
|
"aria-label": z ?? n,
|
|
1959
1959
|
className: `fixed inset-0 flex ${R} ${ee}`,
|
|
1960
|
-
style: { zIndex:
|
|
1960
|
+
style: { zIndex: h },
|
|
1961
1961
|
children: [
|
|
1962
1962
|
/* @__PURE__ */ t(
|
|
1963
1963
|
"div",
|
|
@@ -2380,15 +2380,15 @@ function fi(e, r, n) {
|
|
|
2380
2380
|
case "bottom10": {
|
|
2381
2381
|
const p = n.map((x) => ({ value: x, number: qt(x) })).filter(
|
|
2382
2382
|
(x) => x.number !== null
|
|
2383
|
-
).sort((x,
|
|
2383
|
+
).sort((x, v) => x.number - v.number).map((x) => x.value);
|
|
2384
2384
|
return (r.operator === "top10" ? p.slice(-10) : p.slice(0, 10)).includes(e);
|
|
2385
2385
|
}
|
|
2386
2386
|
case "aboveAverage":
|
|
2387
2387
|
case "belowAverage": {
|
|
2388
2388
|
const f = n.map(qt).filter((x) => x !== null);
|
|
2389
2389
|
if (f.length === 0) return !1;
|
|
2390
|
-
const p = f.reduce((x,
|
|
2391
|
-
return
|
|
2390
|
+
const p = f.reduce((x, v) => x + v, 0) / f.length, h = qt(e);
|
|
2391
|
+
return h === null ? !1 : r.operator === "aboveAverage" ? h > p : h < p;
|
|
2392
2392
|
}
|
|
2393
2393
|
default:
|
|
2394
2394
|
return !0;
|
|
@@ -2426,9 +2426,9 @@ function pi({
|
|
|
2426
2426
|
initialEmptyDelay: m = 450,
|
|
2427
2427
|
onRowClick: f,
|
|
2428
2428
|
renderExpandedRow: p,
|
|
2429
|
-
getRowCanExpand:
|
|
2429
|
+
getRowCanExpand: h,
|
|
2430
2430
|
expandedRowIds: x,
|
|
2431
|
-
defaultExpandedRowIds:
|
|
2431
|
+
defaultExpandedRowIds: v = [],
|
|
2432
2432
|
onExpandedRowIdsChange: L,
|
|
2433
2433
|
expandOnRowClick: S = !1,
|
|
2434
2434
|
selected: w,
|
|
@@ -2452,7 +2452,7 @@ function pi({
|
|
|
2452
2452
|
bottomOffset: W = 0,
|
|
2453
2453
|
compact: s = !0,
|
|
2454
2454
|
restrictHeight: y = !0,
|
|
2455
|
-
maxHeight:
|
|
2455
|
+
maxHeight: D,
|
|
2456
2456
|
minTableWidth: j,
|
|
2457
2457
|
enableColumnVisibility: B = !0,
|
|
2458
2458
|
enableColumnFilters: ne = !0,
|
|
@@ -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] =
|
|
2483
|
+
const [Te, _e] = A(
|
|
2484
2484
|
!_ || !ze
|
|
2485
|
-
), De = le(null), et = le(!_), Fe = ce !== void 0, [Va, Dt] =
|
|
2485
|
+
), De = le(null), et = le(!_), Fe = ce !== void 0, [Va, Dt] = A(() => pt(pe, e)), Pe = pt(
|
|
2486
2486
|
Fe ? ce : Va,
|
|
2487
2487
|
e
|
|
2488
|
-
), [ot, Kt] =
|
|
2488
|
+
), [ot, Kt] = A(!1), [ct, Ya] = A("filter"), [Bt, Vt] = A(
|
|
2489
2489
|
null
|
|
2490
|
-
), [mn, bn] =
|
|
2490
|
+
), [mn, bn] = A(""), [We, Ot] = A({}), [Ke, Yt] = A({}), Tr = x !== void 0, [fn, Ga] = A(v), It = M !== void 0, [Xa, Ar] = A(G), tt = It ? M : Xa, [Gt, Xt] = A(tt), [rt, dt] = A(!1), [pn, gt] = A(!1), [hn, yt] = A(!1), [Rt, Ht] = A([]), Dr = le(null), vn = le(null), Br = le(null), [Za, Ja] = A(
|
|
2491
2491
|
{}
|
|
2492
|
-
), [Qa, eo] =
|
|
2492
|
+
), [Qa, eo] = A(
|
|
2493
2493
|
{}
|
|
2494
|
-
), [jt, Zt] =
|
|
2494
|
+
), [jt, Zt] = A(!1), Or = le(null), Jt = le(null), [to, ro] = A(
|
|
2495
2495
|
{}
|
|
2496
|
-
), xn = le(null), Qt = le(null), [Ir, gn] =
|
|
2496
|
+
), xn = le(null), Qt = le(null), [Ir, gn] = A(
|
|
2497
2497
|
r.length > 0 || a || m === !1
|
|
2498
|
-
), yn = (o, d) => 50 + (o * 17 + d * 13 + 7) % 40, lt = le(null), [no, ao] =
|
|
2498
|
+
), yn = (o, d) => 50 + (o * 17 + d * 13 + 7) % 40, lt = le(null), [no, ao] = A(
|
|
2499
2499
|
void 0
|
|
2500
|
-
), [wn, oo] =
|
|
2500
|
+
), [wn, oo] = A(0), [Rr, lo] = A(!1);
|
|
2501
2501
|
Q(() => {
|
|
2502
2502
|
function o() {
|
|
2503
2503
|
lo(window.innerWidth < 640);
|
|
2504
2504
|
}
|
|
2505
|
-
if (!y ||
|
|
2505
|
+
if (!y || D !== 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, y,
|
|
2520
|
-
const Nn = y ?
|
|
2519
|
+
}, [a, q, W, y, D]);
|
|
2520
|
+
const Nn = y ? D ?? 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] =
|
|
2540
|
+
const [wt, zt] = A(
|
|
2541
2541
|
() => e.map((o) => o.key)
|
|
2542
|
-
), [Nt, Ft] =
|
|
2542
|
+
), [Nt, Ft] = A(
|
|
2543
2543
|
() => Object.fromEntries(
|
|
2544
2544
|
e.map((o) => [o.key, nt(o, ft(o.width))])
|
|
2545
2545
|
)
|
|
2546
|
-
), [$e, kt] =
|
|
2546
|
+
), [$e, kt] = A(null), [io, er] = A(1), [tr, Hr] = A(
|
|
2547
2547
|
q === !1 ? 0 : q
|
|
2548
2548
|
);
|
|
2549
2549
|
Q(() => {
|
|
@@ -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] =
|
|
2948
|
+
const or = le(null), [An, Pr] = A(null);
|
|
2949
2949
|
function xo(o, d) {
|
|
2950
2950
|
or.current = wt.indexOf(o), d.dataTransfer.effectAllowed = "move";
|
|
2951
2951
|
}
|
|
@@ -4485,7 +4485,7 @@ ${C}`, K = new Blob(["\uFEFF" + b], {
|
|
|
4485
4485
|
/* @__PURE__ */ t("div", { role: "rowgroup", children: Bn.map((o, d) => {
|
|
4486
4486
|
const C = n(o), b = jn(Y == null ? void 0 : Y(o)), K = d > 0 ? jn(
|
|
4487
4487
|
Y == null ? void 0 : Y(Bn[d - 1])
|
|
4488
|
-
) : null, N = b && b.key !== (K == null ? void 0 : K.key), de = Ge && w.has(C), F = Ct ? (
|
|
4488
|
+
) : null, N = b && b.key !== (K == null ? void 0 : K.key), de = Ge && w.has(C), F = Ct ? (h == null ? void 0 : h(o)) ?? !0 : !1, Le = F && Dn.has(C), Ce = !!f || S && F, ve = de && ee ? "color-mix(in srgb, var(--primary) 8%, var(--bg-card))" : d % 2 === 1 ? "color-mix(in srgb, var(--bg-input) 30%, var(--bg-card))" : "var(--bg-card)";
|
|
4489
4489
|
return /* @__PURE__ */ l(je.Fragment, { children: [
|
|
4490
4490
|
N && /* @__PURE__ */ t(
|
|
4491
4491
|
"div",
|
|
@@ -4718,10 +4718,10 @@ function gi({
|
|
|
4718
4718
|
onCommit: a,
|
|
4719
4719
|
onCancel: i
|
|
4720
4720
|
}) {
|
|
4721
|
-
const [c, u] =
|
|
4721
|
+
const [c, u] = A(e), m = le(null), f = (n == null ? void 0 : n.preset) === "date", p = f ? "date" : r === "number" ? "number" : "text";
|
|
4722
4722
|
return Q(() => {
|
|
4723
|
-
var
|
|
4724
|
-
(
|
|
4723
|
+
var h, x;
|
|
4724
|
+
(h = m.current) == null || h.focus(), f || (x = m.current) == null || x.select();
|
|
4725
4725
|
}, [f]), /* @__PURE__ */ t(
|
|
4726
4726
|
"input",
|
|
4727
4727
|
{
|
|
@@ -4729,12 +4729,12 @@ function gi({
|
|
|
4729
4729
|
type: p,
|
|
4730
4730
|
value: c,
|
|
4731
4731
|
maxLength: n == null ? void 0 : n.maxLength,
|
|
4732
|
-
onChange: (
|
|
4732
|
+
onChange: (h) => u(h.target.value),
|
|
4733
4733
|
onBlur: () => a(c),
|
|
4734
|
-
onKeyDown: (
|
|
4735
|
-
|
|
4734
|
+
onKeyDown: (h) => {
|
|
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
|
},
|
|
4737
|
-
onClick: (
|
|
4737
|
+
onClick: (h) => h.stopPropagation(),
|
|
4738
4738
|
className: "w-full min-w-0 border-0 bg-transparent p-0 text-sm text-[var(--text-main)] outline-none"
|
|
4739
4739
|
}
|
|
4740
4740
|
);
|
|
@@ -4746,27 +4746,33 @@ function yi({
|
|
|
4746
4746
|
onCommit: a,
|
|
4747
4747
|
onCancel: i
|
|
4748
4748
|
}) {
|
|
4749
|
-
const c = le(null);
|
|
4749
|
+
const c = le(null), [u, m] = A(e);
|
|
4750
4750
|
return Q(() => {
|
|
4751
4751
|
if (n) return;
|
|
4752
|
-
const
|
|
4753
|
-
var
|
|
4754
|
-
(
|
|
4752
|
+
const f = setTimeout(() => {
|
|
4753
|
+
var p, h;
|
|
4754
|
+
(h = (p = c.current) == null ? void 0 : p.querySelector("button")) == null || h.click();
|
|
4755
4755
|
}, 0);
|
|
4756
|
-
return () => clearTimeout(
|
|
4756
|
+
return () => clearTimeout(f);
|
|
4757
4757
|
}, [n]), /* @__PURE__ */ t(
|
|
4758
4758
|
"div",
|
|
4759
4759
|
{
|
|
4760
4760
|
ref: c,
|
|
4761
4761
|
className: "w-full",
|
|
4762
|
-
|
|
4763
|
-
|
|
4762
|
+
tabIndex: -1,
|
|
4763
|
+
onKeyDown: (f) => {
|
|
4764
|
+
f.key === "Escape" && (f.stopPropagation(), i()), f.key === "Enter" && (f.preventDefault(), f.stopPropagation(), a(u));
|
|
4764
4765
|
},
|
|
4765
4766
|
children: /* @__PURE__ */ t(
|
|
4766
4767
|
At,
|
|
4767
4768
|
{
|
|
4768
|
-
value:
|
|
4769
|
-
onChange:
|
|
4769
|
+
value: u,
|
|
4770
|
+
onChange: (f) => {
|
|
4771
|
+
m(f), setTimeout(() => {
|
|
4772
|
+
var p;
|
|
4773
|
+
return (p = c.current) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
4774
|
+
}, 0);
|
|
4775
|
+
},
|
|
4770
4776
|
options: r,
|
|
4771
4777
|
disabled: n,
|
|
4772
4778
|
placeholder: n ? "Cargando…" : "Seleccionar…",
|
|
@@ -4798,45 +4804,45 @@ function ec({
|
|
|
4798
4804
|
readOnly: i = !1,
|
|
4799
4805
|
...c
|
|
4800
4806
|
}) {
|
|
4801
|
-
const [u, m] =
|
|
4807
|
+
const [u, m] = A(r), f = le(null);
|
|
4802
4808
|
Q(() => {
|
|
4803
4809
|
f.current || m(r);
|
|
4804
4810
|
}, [r]);
|
|
4805
|
-
const [p,
|
|
4811
|
+
const [p, h] = A(null);
|
|
4806
4812
|
f.current = p;
|
|
4807
|
-
const [x,
|
|
4813
|
+
const [x, v] = A(null), L = le(null);
|
|
4808
4814
|
L.current = x;
|
|
4809
|
-
const [S, w] =
|
|
4815
|
+
const [S, w] = A({}), [k, O] = A({}), [ee, z] = A({}), Y = le(/* @__PURE__ */ new Set()), T = le(null);
|
|
4810
4816
|
Q(() => {
|
|
4811
4817
|
var s;
|
|
4812
4818
|
(s = T.current) == null || s.focus({ preventScroll: !0 });
|
|
4813
4819
|
}, []);
|
|
4814
4820
|
const q = e.map((s) => {
|
|
4815
|
-
var y,
|
|
4816
|
-
return `${s.key}:${((j = (
|
|
4821
|
+
var y, D, j;
|
|
4822
|
+
return `${s.key}:${((j = (D = (y = s.editable) == null ? void 0 : y.select) == null ? void 0 : D.options) == null ? void 0 : j.length) ?? -1}`;
|
|
4817
4823
|
}).join("|");
|
|
4818
4824
|
Q(() => {
|
|
4819
4825
|
e.forEach((s) => {
|
|
4820
4826
|
var j, B;
|
|
4821
4827
|
const y = (B = (j = s.editable) == null ? void 0 : j.select) == null ? void 0 : B.options;
|
|
4822
4828
|
if (!y) return;
|
|
4823
|
-
const
|
|
4824
|
-
(!Y.current.has(s.key) || (
|
|
4829
|
+
const D = k[s.key];
|
|
4830
|
+
(!Y.current.has(s.key) || (D == null ? void 0 : D.length) === 0 && y.length > 0) && (Y.current.add(s.key), O((ne) => ({ ...ne, [s.key]: y })));
|
|
4825
4831
|
});
|
|
4826
4832
|
}, [q]);
|
|
4827
4833
|
const Z = we(
|
|
4828
4834
|
async (s, y) => {
|
|
4829
4835
|
if (Y.current.has(s)) return;
|
|
4830
4836
|
Y.current.add(s);
|
|
4831
|
-
const { url:
|
|
4832
|
-
if (!(!
|
|
4837
|
+
const { url: D, fetchOptions: j } = y.select ?? {};
|
|
4838
|
+
if (!(!D && !j)) {
|
|
4833
4839
|
z((B) => ({ ...B, [s]: !0 }));
|
|
4834
4840
|
try {
|
|
4835
4841
|
let B = [];
|
|
4836
4842
|
if (j)
|
|
4837
4843
|
B = await j();
|
|
4838
|
-
else if (
|
|
4839
|
-
const ne = await fetch(
|
|
4844
|
+
else if (D) {
|
|
4845
|
+
const ne = await fetch(D);
|
|
4840
4846
|
if (!ne.ok) throw new Error("fetch failed");
|
|
4841
4847
|
B = await ne.json();
|
|
4842
4848
|
}
|
|
@@ -4861,7 +4867,7 @@ function ec({
|
|
|
4861
4867
|
E.current = i, Q(() => {
|
|
4862
4868
|
if (e.length > 0 && r.length > 0) {
|
|
4863
4869
|
const s = e.find((y) => y.selectable !== !1);
|
|
4864
|
-
s &&
|
|
4870
|
+
s && v({ rowId: n(r[0]), colKey: s.key });
|
|
4865
4871
|
}
|
|
4866
4872
|
}, []), Q(() => {
|
|
4867
4873
|
if (!x) return;
|
|
@@ -4871,8 +4877,8 @@ function ec({
|
|
|
4871
4877
|
`[data-cell-id="${x.rowId}:${x.colKey}"]`
|
|
4872
4878
|
);
|
|
4873
4879
|
if (!y) return;
|
|
4874
|
-
const
|
|
4875
|
-
y.style.scrollMarginTop = `${(
|
|
4880
|
+
const D = s.querySelector('[role="rowgroup"]');
|
|
4881
|
+
y.style.scrollMarginTop = `${(D == null ? void 0 : D.offsetHeight) ?? 0}px`;
|
|
4876
4882
|
const j = s.querySelector('[role="row"]');
|
|
4877
4883
|
let B = 0;
|
|
4878
4884
|
j && j.querySelectorAll('[role="cell"], [role="columnheader"]').forEach((ne) => {
|
|
@@ -4882,11 +4888,11 @@ function ec({
|
|
|
4882
4888
|
const R = we(
|
|
4883
4889
|
(s) => {
|
|
4884
4890
|
var B;
|
|
4885
|
-
const y = J.current,
|
|
4891
|
+
const y = J.current, D = /* @__PURE__ */ new Set(), j = [];
|
|
4886
4892
|
(B = T.current) == null || B.querySelectorAll("[data-cell-id]").forEach((ne) => {
|
|
4887
4893
|
const ce = ne.dataset.cellId.split(":")[0];
|
|
4888
|
-
|
|
4889
|
-
}),
|
|
4894
|
+
D.has(ce) || (D.add(ce), j.push(ce));
|
|
4895
|
+
}), v((ne) => {
|
|
4890
4896
|
if (!ne) return ne;
|
|
4891
4897
|
const ce = y.findIndex((I) => I.key === ne.colKey), pe = j.indexOf(ne.rowId);
|
|
4892
4898
|
let $ = ce, ie = pe;
|
|
@@ -4907,18 +4913,18 @@ function ec({
|
|
|
4907
4913
|
[]
|
|
4908
4914
|
), U = we(() => {
|
|
4909
4915
|
const s = f.current;
|
|
4910
|
-
|
|
4916
|
+
h(null), s && v(s), setTimeout(() => {
|
|
4911
4917
|
var y;
|
|
4912
4918
|
return (y = T.current) == null ? void 0 : y.focus({ preventScroll: !0 });
|
|
4913
4919
|
}, 0);
|
|
4914
4920
|
}, []), _ = we(
|
|
4915
|
-
async (s, y,
|
|
4921
|
+
async (s, y, D) => {
|
|
4916
4922
|
var se;
|
|
4917
4923
|
const j = J.current.find((g) => g.key === y);
|
|
4918
4924
|
if (!(j != null && j.editable)) return;
|
|
4919
|
-
const { field: B, type: ne, mask: ce, validate: pe } = j.editable, $ = ne === "number" ?
|
|
4925
|
+
const { field: B, type: ne, mask: ce, validate: pe } = j.editable, $ = ne === "number" ? D === "" ? null : Number(D) : D;
|
|
4920
4926
|
if (ce) {
|
|
4921
|
-
const g = vi(
|
|
4927
|
+
const g = vi(D, ce);
|
|
4922
4928
|
if (g) {
|
|
4923
4929
|
w((H) => ({ ...H, [`${s}:${y}`]: g }));
|
|
4924
4930
|
return;
|
|
@@ -4934,12 +4940,12 @@ function ec({
|
|
|
4934
4940
|
const ie = X.current, I = te.current.find((g) => ie(g) === s);
|
|
4935
4941
|
if (!I) return;
|
|
4936
4942
|
const M = I[B];
|
|
4937
|
-
|
|
4943
|
+
h(null), w((g) => {
|
|
4938
4944
|
const H = { ...g };
|
|
4939
4945
|
return delete H[`${s}:${y}`], H;
|
|
4940
4946
|
});
|
|
4941
4947
|
const G = te.current, V = G.findIndex((g) => ie(g) === s), re = G[Math.min(G.length - 1, V + 1)];
|
|
4942
|
-
if (
|
|
4948
|
+
if (v({ rowId: ie(re), colKey: y }), setTimeout(() => {
|
|
4943
4949
|
var g;
|
|
4944
4950
|
return (g = T.current) == null ? void 0 : g.focus({ preventScroll: !0 });
|
|
4945
4951
|
}, 0), String(M ?? "") === String($ ?? "")) return;
|
|
@@ -4990,7 +4996,7 @@ function ec({
|
|
|
4990
4996
|
break;
|
|
4991
4997
|
case "Enter": {
|
|
4992
4998
|
const j = J.current.find((B) => B.key === y.colKey);
|
|
4993
|
-
j != null && j.editable && !E.current ? (
|
|
4999
|
+
j != null && j.editable && !E.current ? (h(y), j.editable.type === "select" && !Y.current.has(y.colKey) && Z(y.colKey, j.editable)) : R("down");
|
|
4994
5000
|
break;
|
|
4995
5001
|
}
|
|
4996
5002
|
}
|
|
@@ -4998,7 +5004,7 @@ function ec({
|
|
|
4998
5004
|
[R, Z]
|
|
4999
5005
|
), W = at(() => e.map((s) => {
|
|
5000
5006
|
if (!s.editable || i) {
|
|
5001
|
-
const { editable:
|
|
5007
|
+
const { editable: D, selectable: j, ...B } = s;
|
|
5002
5008
|
if (s.selectable === !1)
|
|
5003
5009
|
return { ...B, disableRowClick: !0 };
|
|
5004
5010
|
const ne = B.cell;
|
|
@@ -5016,7 +5022,7 @@ function ec({
|
|
|
5016
5022
|
className: "absolute inset-0 z-10 cursor-default",
|
|
5017
5023
|
onClick: () => {
|
|
5018
5024
|
var ie;
|
|
5019
|
-
|
|
5025
|
+
v({ rowId: pe, colKey: s.key }), (ie = T.current) == null || ie.focus({ preventScroll: !0 });
|
|
5020
5026
|
}
|
|
5021
5027
|
}
|
|
5022
5028
|
),
|
|
@@ -5038,10 +5044,10 @@ function ec({
|
|
|
5038
5044
|
// Make the cell a positioned ancestor so the absolute edit overlay works
|
|
5039
5045
|
className: `relative ${s.className ?? ""}`.trim(),
|
|
5040
5046
|
disableRowClick: !0,
|
|
5041
|
-
cell: (
|
|
5042
|
-
const j = n(
|
|
5047
|
+
cell: (D) => {
|
|
5048
|
+
const j = n(D), 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}`], $ = D[y.field], ie = String($ ?? ""), I = () => {
|
|
5043
5049
|
var G;
|
|
5044
|
-
|
|
5050
|
+
v({ rowId: j, colKey: B }), h({ rowId: j, colKey: B }), (G = T.current) == null || G.focus({ preventScroll: !0 }), y.type === "select" && !Y.current.has(B) && Z(B, y);
|
|
5045
5051
|
};
|
|
5046
5052
|
if (ne) {
|
|
5047
5053
|
const G = y.type === "select" ? /* @__PURE__ */ t(
|
|
@@ -5073,7 +5079,7 @@ function ec({
|
|
|
5073
5079
|
}
|
|
5074
5080
|
);
|
|
5075
5081
|
}
|
|
5076
|
-
const M = s.cell(
|
|
5082
|
+
const M = s.cell(D);
|
|
5077
5083
|
return /* @__PURE__ */ l(Re, { children: [
|
|
5078
5084
|
/* @__PURE__ */ t(
|
|
5079
5085
|
"span",
|
|
@@ -5226,11 +5232,11 @@ function tc({
|
|
|
5226
5232
|
const p = {
|
|
5227
5233
|
from: Wt(e),
|
|
5228
5234
|
to: Wt(r)
|
|
5229
|
-
},
|
|
5235
|
+
}, h = Wt(a), [x, v] = A(
|
|
5230
5236
|
Wt(i || e)
|
|
5231
5237
|
);
|
|
5232
5238
|
return Q(() => {
|
|
5233
|
-
|
|
5239
|
+
v(Wt(i || e));
|
|
5234
5240
|
}, [i, e]), /* @__PURE__ */ l("div", { children: [
|
|
5235
5241
|
/* @__PURE__ */ t(
|
|
5236
5242
|
"div",
|
|
@@ -5250,14 +5256,14 @@ function tc({
|
|
|
5250
5256
|
mode: "range",
|
|
5251
5257
|
selected: p,
|
|
5252
5258
|
month: x,
|
|
5253
|
-
onMonthChange:
|
|
5259
|
+
onMonthChange: v,
|
|
5254
5260
|
onSelect: (L) => {
|
|
5255
5261
|
const S = L != null && L.from ? ea(L.from) : e, w = L != null && L.to ? ea(L.to) : "";
|
|
5256
5262
|
n({ startDate: S, endDate: w });
|
|
5257
5263
|
},
|
|
5258
5264
|
numberOfMonths: c,
|
|
5259
5265
|
hideNavigation: !0,
|
|
5260
|
-
disabled:
|
|
5266
|
+
disabled: h ? { before: h } : void 0,
|
|
5261
5267
|
showOutsideDays: !1,
|
|
5262
5268
|
components: {
|
|
5263
5269
|
MonthCaption: Ni
|
|
@@ -5417,7 +5423,7 @@ function rc({
|
|
|
5417
5423
|
menuClassName: u = "",
|
|
5418
5424
|
onOpenChange: m
|
|
5419
5425
|
}) {
|
|
5420
|
-
const [f, p] =
|
|
5426
|
+
const [f, p] = A(!1), [h, x] = A(!1), [v, L] = A({}), S = le(null), w = le(null), k = we(
|
|
5421
5427
|
(T) => {
|
|
5422
5428
|
p(T), m == null || m(T);
|
|
5423
5429
|
},
|
|
@@ -5462,7 +5468,7 @@ function rc({
|
|
|
5462
5468
|
role: "menu",
|
|
5463
5469
|
"data-bonsaif-overlay": "true",
|
|
5464
5470
|
className: `overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-1 shadow-xl ${u}`,
|
|
5465
|
-
style:
|
|
5471
|
+
style: v,
|
|
5466
5472
|
children: r.map((T) => /* @__PURE__ */ l("div", { children: [
|
|
5467
5473
|
T.separatorBefore && /* @__PURE__ */ t("div", { className: "my-1 border-t border-[var(--border)]" }),
|
|
5468
5474
|
/* @__PURE__ */ l(
|
|
@@ -5503,7 +5509,7 @@ function rc({
|
|
|
5503
5509
|
className: `inline-flex ${i ? "pointer-events-none opacity-60" : ""} ${c}`,
|
|
5504
5510
|
children: [
|
|
5505
5511
|
z,
|
|
5506
|
-
|
|
5512
|
+
h && Y ? Ze(Y, document.body) : null
|
|
5507
5513
|
]
|
|
5508
5514
|
}
|
|
5509
5515
|
);
|
|
@@ -5520,9 +5526,9 @@ function nc({
|
|
|
5520
5526
|
loading: m = !1,
|
|
5521
5527
|
confirmDisabled: f = !1,
|
|
5522
5528
|
headerActions: p,
|
|
5523
|
-
bodyClassName:
|
|
5529
|
+
bodyClassName: h = "flex-1 overflow-y-auto px-6 py-5",
|
|
5524
5530
|
width: x = 440,
|
|
5525
|
-
hasUnsavedChanges:
|
|
5531
|
+
hasUnsavedChanges: v = !1,
|
|
5526
5532
|
unsavedChangesTitle: L = "Descartar cambios",
|
|
5527
5533
|
unsavedChangesDescription: S = "Hay cambios sin guardar. Si cierras el drawer se perderán.",
|
|
5528
5534
|
unsavedChangesConfirmLabel: w = "Descartar",
|
|
@@ -5531,7 +5537,7 @@ function nc({
|
|
|
5531
5537
|
disabled: ee = !1,
|
|
5532
5538
|
children: z
|
|
5533
5539
|
}) {
|
|
5534
|
-
const [Y, T] =
|
|
5540
|
+
const [Y, T] = A(!1), [q, Z] = A(!1), [te, P] = A(!1), X = we(() => {
|
|
5535
5541
|
Z(!0), requestAnimationFrame(() => {
|
|
5536
5542
|
requestAnimationFrame(() => P(!0));
|
|
5537
5543
|
});
|
|
@@ -5541,12 +5547,12 @@ function nc({
|
|
|
5541
5547
|
Ei
|
|
5542
5548
|
);
|
|
5543
5549
|
}, []), E = we(() => {
|
|
5544
|
-
if (
|
|
5550
|
+
if (v) {
|
|
5545
5551
|
X();
|
|
5546
5552
|
return;
|
|
5547
5553
|
}
|
|
5548
5554
|
r();
|
|
5549
|
-
}, [
|
|
5555
|
+
}, [v, r, X]), R = we(() => {
|
|
5550
5556
|
P(!1), Z(!1), O == null || O(), r();
|
|
5551
5557
|
}, [r, O]);
|
|
5552
5558
|
return Q(() => {
|
|
@@ -5648,7 +5654,7 @@ function nc({
|
|
|
5648
5654
|
]
|
|
5649
5655
|
}
|
|
5650
5656
|
),
|
|
5651
|
-
/* @__PURE__ */ t("div", { "data-drawer-scroll": "true", className:
|
|
5657
|
+
/* @__PURE__ */ t("div", { "data-drawer-scroll": "true", className: h, children: z })
|
|
5652
5658
|
]
|
|
5653
5659
|
}
|
|
5654
5660
|
),
|
|
@@ -5973,11 +5979,11 @@ function Wa({
|
|
|
5973
5979
|
floatingLabel: m = !1,
|
|
5974
5980
|
showPasswordToggle: f = !0,
|
|
5975
5981
|
nativeValidation: p = !1,
|
|
5976
|
-
className:
|
|
5982
|
+
className: h = "",
|
|
5977
5983
|
required: x,
|
|
5978
|
-
...
|
|
5984
|
+
...v
|
|
5979
5985
|
}) {
|
|
5980
|
-
const [L, S] =
|
|
5986
|
+
const [L, S] = A(() => !!v.autoFocus), [w, k] = A(!1), O = v.type === "password" && f, ee = O && w ? "text" : v.type, z = !!a, Y = z && i !== "tooltip", T = z && i !== "inline", q = p ? x : void 0, Z = z ? "border-[var(--danger)] focus:border-[var(--danger)]" : "", te = T ? 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 = {
|
|
5981
5987
|
top: X ? 7 : 12,
|
|
5982
5988
|
color: L ? "var(--primary)" : "var(--text-muted)",
|
|
5983
5989
|
fontSize: X ? 10 : 13,
|
|
@@ -5985,10 +5991,10 @@ function Wa({
|
|
|
5985
5991
|
textTransform: X ? "uppercase" : "none"
|
|
5986
5992
|
}, E = (oe) => {
|
|
5987
5993
|
var W;
|
|
5988
|
-
S(!0), (W =
|
|
5994
|
+
S(!0), (W = v.onFocus) == null || W.call(v, oe);
|
|
5989
5995
|
}, R = (oe) => {
|
|
5990
5996
|
var W;
|
|
5991
|
-
S(!1), (W =
|
|
5997
|
+
S(!1), (W = v.onBlur) == null || W.call(v, oe);
|
|
5992
5998
|
}, U = O ? /* @__PURE__ */ l(
|
|
5993
5999
|
"button",
|
|
5994
6000
|
{
|
|
@@ -6040,13 +6046,13 @@ function Wa({
|
|
|
6040
6046
|
/* @__PURE__ */ t(
|
|
6041
6047
|
Jr,
|
|
6042
6048
|
{
|
|
6043
|
-
...
|
|
6049
|
+
...v,
|
|
6044
6050
|
type: ee,
|
|
6045
6051
|
required: q,
|
|
6046
6052
|
placeholder: " ",
|
|
6047
|
-
"aria-invalid": z ||
|
|
6053
|
+
"aria-invalid": z || v["aria-invalid"],
|
|
6048
6054
|
"data-has-value": P ? "true" : void 0,
|
|
6049
|
-
className: `h-11 w-full pt-5 ${te} ${Z} ${
|
|
6055
|
+
className: `h-11 w-full pt-5 ${te} ${Z} ${h}`,
|
|
6050
6056
|
onFocus: E,
|
|
6051
6057
|
onBlur: R
|
|
6052
6058
|
}
|
|
@@ -6084,11 +6090,11 @@ function Wa({
|
|
|
6084
6090
|
/* @__PURE__ */ t(
|
|
6085
6091
|
Jr,
|
|
6086
6092
|
{
|
|
6087
|
-
...
|
|
6093
|
+
...v,
|
|
6088
6094
|
type: ee,
|
|
6089
6095
|
required: q,
|
|
6090
|
-
"aria-invalid": z ||
|
|
6091
|
-
className: `w-full ${te} ${Z} ${
|
|
6096
|
+
"aria-invalid": z || v["aria-invalid"],
|
|
6097
|
+
className: `w-full ${te} ${Z} ${h}`,
|
|
6092
6098
|
onFocus: E,
|
|
6093
6099
|
onBlur: R
|
|
6094
6100
|
}
|
|
@@ -6099,10 +6105,10 @@ function Wa({
|
|
|
6099
6105
|
/* @__PURE__ */ t(
|
|
6100
6106
|
Jr,
|
|
6101
6107
|
{
|
|
6102
|
-
...
|
|
6108
|
+
...v,
|
|
6103
6109
|
required: q,
|
|
6104
|
-
"aria-invalid": z ||
|
|
6105
|
-
className: `w-full ${te} ${Z} ${
|
|
6110
|
+
"aria-invalid": z || v["aria-invalid"],
|
|
6111
|
+
className: `w-full ${te} ${Z} ${h}`
|
|
6106
6112
|
}
|
|
6107
6113
|
),
|
|
6108
6114
|
_
|
|
@@ -6125,9 +6131,9 @@ function bc({
|
|
|
6125
6131
|
onChange: f,
|
|
6126
6132
|
...p
|
|
6127
6133
|
}) {
|
|
6128
|
-
const [
|
|
6134
|
+
const [h, x] = A(
|
|
6129
6135
|
() => oa(m)
|
|
6130
|
-
),
|
|
6136
|
+
), v = u !== void 0 ? oa(u) : h, L = n && v.length > 0 && !ja(v) ? a : void 0;
|
|
6131
6137
|
return /* @__PURE__ */ t(
|
|
6132
6138
|
Wa,
|
|
6133
6139
|
{
|
|
@@ -6210,9 +6216,9 @@ function pc({
|
|
|
6210
6216
|
onRejectedFiles: m,
|
|
6211
6217
|
multiple: f = !1,
|
|
6212
6218
|
maxFiles: p,
|
|
6213
|
-
appendFiles:
|
|
6219
|
+
appendFiles: h = !1,
|
|
6214
6220
|
showFileList: x = !0,
|
|
6215
|
-
clearable:
|
|
6221
|
+
clearable: v = !0,
|
|
6216
6222
|
browseLabel: L = "Buscar archivos",
|
|
6217
6223
|
dropLabel: S = "Suelta los archivos aqui",
|
|
6218
6224
|
emptyLabel: w = "Arrastra y suelta archivos",
|
|
@@ -6229,14 +6235,14 @@ function pc({
|
|
|
6229
6235
|
required: X,
|
|
6230
6236
|
...J
|
|
6231
6237
|
}) {
|
|
6232
|
-
const E = Ho(), R = Z ?? E, U = le(null), [_, oe] =
|
|
6238
|
+
const E = Ho(), R = Z ?? E, U = le(null), [_, oe] = A(!1), [W, s] = A(c), y = i ?? W, D = !!n, j = v && y.length > 0 && !P, B = (re, me) => {
|
|
6233
6239
|
i === void 0 && s(re), u == null || u(re, me);
|
|
6234
6240
|
}, ne = (re, me) => {
|
|
6235
6241
|
const se = re.filter(
|
|
6236
6242
|
(be) => la(be, te)
|
|
6237
6243
|
), g = re.filter(
|
|
6238
6244
|
(be) => !la(be, te)
|
|
6239
|
-
), H =
|
|
6245
|
+
), H = h ? [...y, ...se] : se, ue = Wi(H, f, p);
|
|
6240
6246
|
g.length > 0 && (m == null || m(g)), B(ue, me);
|
|
6241
6247
|
}, ce = () => {
|
|
6242
6248
|
var re;
|
|
@@ -6273,7 +6279,7 @@ function pc({
|
|
|
6273
6279
|
multiple: f,
|
|
6274
6280
|
disabled: P,
|
|
6275
6281
|
required: X && y.length === 0,
|
|
6276
|
-
"aria-invalid":
|
|
6282
|
+
"aria-invalid": D || J["aria-invalid"],
|
|
6277
6283
|
className: "sr-only",
|
|
6278
6284
|
onChange: pe
|
|
6279
6285
|
}
|
|
@@ -6285,8 +6291,8 @@ function pc({
|
|
|
6285
6291
|
tabIndex: P ? -1 : 0,
|
|
6286
6292
|
"aria-controls": R,
|
|
6287
6293
|
"aria-disabled": P || void 0,
|
|
6288
|
-
"aria-invalid":
|
|
6289
|
-
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)]" :
|
|
6294
|
+
"aria-invalid": D || void 0,
|
|
6295
|
+
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)]" : D ? "border-[var(--danger)]" : "border-[var(--border)]"} ${P ? "cursor-not-allowed opacity-60" : "hover:border-[var(--primary)] hover:bg-[var(--bg-input)]"} ${Y} ${q}`,
|
|
6290
6296
|
onClick: ce,
|
|
6291
6297
|
onDragOver: $,
|
|
6292
6298
|
onDragLeave: ie,
|
|
@@ -6374,9 +6380,9 @@ function hc({
|
|
|
6374
6380
|
onSave: f,
|
|
6375
6381
|
onChange: p
|
|
6376
6382
|
}) {
|
|
6377
|
-
const [
|
|
6383
|
+
const [h, x] = A(
|
|
6378
6384
|
() => e.map((z) => ({ key: !1, type: "", ...z }))
|
|
6379
|
-
), [
|
|
6385
|
+
), [v, L] = A(""), [S, w] = A(""), k = we(
|
|
6380
6386
|
(z, Y) => {
|
|
6381
6387
|
x((T) => {
|
|
6382
6388
|
const q = T.map((Z, te) => te === z ? { ...Z, ...Y } : Z);
|
|
@@ -6385,15 +6391,15 @@ function hc({
|
|
|
6385
6391
|
},
|
|
6386
6392
|
[p]
|
|
6387
6393
|
), O = we(() => {
|
|
6388
|
-
f == null || f(
|
|
6389
|
-
}, [
|
|
6394
|
+
f == null || f(h);
|
|
6395
|
+
}, [h, f]), ee = we(() => {
|
|
6390
6396
|
var q;
|
|
6391
|
-
const z =
|
|
6397
|
+
const z = v.trim();
|
|
6392
6398
|
if (!z) {
|
|
6393
6399
|
w("Ingresa un nombre de campo.");
|
|
6394
6400
|
return;
|
|
6395
6401
|
}
|
|
6396
|
-
if (
|
|
6402
|
+
if (h.some(
|
|
6397
6403
|
(Z) => Z.name.toLowerCase() === z.toLowerCase()
|
|
6398
6404
|
)) {
|
|
6399
6405
|
w("Ese campo ya existe en el arreglo.");
|
|
@@ -6408,7 +6414,7 @@ function hc({
|
|
|
6408
6414
|
const te = [...Z, T];
|
|
6409
6415
|
return p == null || p(te), te;
|
|
6410
6416
|
}), L(""), w("");
|
|
6411
|
-
}, [n,
|
|
6417
|
+
}, [n, h, v, p]);
|
|
6412
6418
|
return /* @__PURE__ */ l(
|
|
6413
6419
|
"div",
|
|
6414
6420
|
{
|
|
@@ -6447,7 +6453,7 @@ function hc({
|
|
|
6447
6453
|
}
|
|
6448
6454
|
),
|
|
6449
6455
|
/* @__PURE__ */ l("div", { className: "max-h-[420px] overflow-y-auto", children: [
|
|
6450
|
-
|
|
6456
|
+
h.map((z, Y) => /* @__PURE__ */ l(
|
|
6451
6457
|
"div",
|
|
6452
6458
|
{
|
|
6453
6459
|
className: "grid grid-cols-[1fr_80px_1fr] items-center gap-4 border-b px-6 py-3 last:border-0 hover:bg-[var(--bg-input)] transition-colors",
|
|
@@ -6487,7 +6493,7 @@ function hc({
|
|
|
6487
6493
|
},
|
|
6488
6494
|
z.name
|
|
6489
6495
|
)),
|
|
6490
|
-
|
|
6496
|
+
h.length === 0 && /* @__PURE__ */ t(
|
|
6491
6497
|
"p",
|
|
6492
6498
|
{
|
|
6493
6499
|
className: "px-6 py-8 text-center text-sm",
|
|
@@ -6508,7 +6514,7 @@ function hc({
|
|
|
6508
6514
|
"input",
|
|
6509
6515
|
{
|
|
6510
6516
|
type: "text",
|
|
6511
|
-
value:
|
|
6517
|
+
value: v,
|
|
6512
6518
|
onChange: (z) => {
|
|
6513
6519
|
L(z.currentTarget.value), S && w("");
|
|
6514
6520
|
},
|
|
@@ -6593,13 +6599,13 @@ function vc({
|
|
|
6593
6599
|
height: m = 40,
|
|
6594
6600
|
padding: f = "6px 10px",
|
|
6595
6601
|
searchable: p = !0,
|
|
6596
|
-
minOptionsForSearch:
|
|
6602
|
+
minOptionsForSearch: h = 6,
|
|
6597
6603
|
maxVisibleValues: x = 2,
|
|
6598
|
-
truncateSelectedValues:
|
|
6604
|
+
truncateSelectedValues: v = !0,
|
|
6599
6605
|
emptyText: L = "Sin resultados",
|
|
6600
6606
|
clearLabel: S = "Limpiar seleccion"
|
|
6601
6607
|
}) {
|
|
6602
|
-
const [w, k] =
|
|
6608
|
+
const [w, k] = A(!1), [O, ee] = A(""), [z, Y] = A(0), [T, q] = A(!1), [Z, te] = A({}), P = le(null), X = le(null), J = le(null), E = le(null), R = p && n.length >= h, U = at(() => new Set(e), [e]), _ = at(
|
|
6603
6609
|
() => n.filter(($) => U.has($.value)),
|
|
6604
6610
|
[n, U]
|
|
6605
6611
|
), oe = x === "all" ? _.length : x, W = _.slice(0, oe), s = Math.max(
|
|
@@ -6610,7 +6616,7 @@ function vc({
|
|
|
6610
6616
|
var ie;
|
|
6611
6617
|
return $.label.toLowerCase().includes(O.toLowerCase()) || ((ie = $.sublabel) == null ? void 0 : ie.toLowerCase().includes(O.toLowerCase()));
|
|
6612
6618
|
}
|
|
6613
|
-
) : n,
|
|
6619
|
+
) : n, D = we(() => {
|
|
6614
6620
|
const $ = P.current;
|
|
6615
6621
|
if (!$) return;
|
|
6616
6622
|
const ie = $.getBoundingClientRect(), I = R ? 304 : 244, M = window.innerHeight - ie.bottom, G = M < I && ie.top > M;
|
|
@@ -6645,16 +6651,16 @@ function vc({
|
|
|
6645
6651
|
}
|
|
6646
6652
|
return document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $);
|
|
6647
6653
|
}, [w]), Q(() => {
|
|
6648
|
-
w && (Y(0),
|
|
6654
|
+
w && (Y(0), D(), R && setTimeout(() => {
|
|
6649
6655
|
var $;
|
|
6650
6656
|
return ($ = J.current) == null ? void 0 : $.focus();
|
|
6651
6657
|
}, 0));
|
|
6652
|
-
}, [w, R,
|
|
6658
|
+
}, [w, R, D]), Q(() => {
|
|
6653
6659
|
if (w)
|
|
6654
|
-
return window.addEventListener("resize",
|
|
6655
|
-
window.removeEventListener("resize",
|
|
6660
|
+
return window.addEventListener("resize", D), window.addEventListener("scroll", D, !0), () => {
|
|
6661
|
+
window.removeEventListener("resize", D), window.removeEventListener("scroll", D, !0);
|
|
6656
6662
|
};
|
|
6657
|
-
}, [w,
|
|
6663
|
+
}, [w, D]), Q(() => {
|
|
6658
6664
|
if (z < 0 || !E.current) return;
|
|
6659
6665
|
const $ = E.current.children[z];
|
|
6660
6666
|
$ == null || $.scrollIntoView({ block: "nearest" });
|
|
@@ -6870,7 +6876,7 @@ function vc({
|
|
|
6870
6876
|
W.map(($) => /* @__PURE__ */ l(
|
|
6871
6877
|
"span",
|
|
6872
6878
|
{
|
|
6873
|
-
className: `inline-flex items-center gap-1 rounded-md border px-1.5 py-0.5 text-xs font-semibold ${
|
|
6879
|
+
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"}`,
|
|
6874
6880
|
style: {
|
|
6875
6881
|
background: "var(--bg-card)",
|
|
6876
6882
|
borderColor: "var(--border)",
|
|
@@ -6887,7 +6893,7 @@ function vc({
|
|
|
6887
6893
|
/* @__PURE__ */ t(
|
|
6888
6894
|
"span",
|
|
6889
6895
|
{
|
|
6890
|
-
className:
|
|
6896
|
+
className: v ? "truncate" : "break-words",
|
|
6891
6897
|
children: $.label
|
|
6892
6898
|
}
|
|
6893
6899
|
)
|
|
@@ -6980,13 +6986,13 @@ function gc({
|
|
|
6980
6986
|
}
|
|
6981
6987
|
),
|
|
6982
6988
|
f.map(
|
|
6983
|
-
(p,
|
|
6989
|
+
(p, h) => p === "..." ? /* @__PURE__ */ t(
|
|
6984
6990
|
"span",
|
|
6985
6991
|
{
|
|
6986
6992
|
className: "flex h-8 min-w-8 items-center justify-center text-xs font-semibold text-[var(--text-muted)]",
|
|
6987
6993
|
children: "..."
|
|
6988
6994
|
},
|
|
6989
|
-
`ellipsis-${
|
|
6995
|
+
`ellipsis-${h}`
|
|
6990
6996
|
) : /* @__PURE__ */ t(
|
|
6991
6997
|
"button",
|
|
6992
6998
|
{
|
|
@@ -7247,9 +7253,9 @@ function yc({
|
|
|
7247
7253
|
defaultValue: m,
|
|
7248
7254
|
onChange: f,
|
|
7249
7255
|
countryCode: p,
|
|
7250
|
-
defaultCountryCode:
|
|
7256
|
+
defaultCountryCode: h = "+1",
|
|
7251
7257
|
onCountryCodeChange: x,
|
|
7252
|
-
allowedCountryCodes:
|
|
7258
|
+
allowedCountryCodes: v,
|
|
7253
7259
|
countryCodeOptions: L,
|
|
7254
7260
|
countryCodePlaceholder: S = "Codigo",
|
|
7255
7261
|
countryCodeClassName: w = "",
|
|
@@ -7269,21 +7275,21 @@ function yc({
|
|
|
7269
7275
|
...R
|
|
7270
7276
|
}) {
|
|
7271
7277
|
var re;
|
|
7272
|
-
const [U, _] =
|
|
7278
|
+
const [U, _] = A(
|
|
7273
7279
|
() => sa(m)
|
|
7274
|
-
), [oe, W] =
|
|
7275
|
-
() => Nr(
|
|
7280
|
+
), [oe, W] = A(
|
|
7281
|
+
() => Nr(h)
|
|
7276
7282
|
), s = at(() => {
|
|
7277
|
-
const me = L ?? Yi, se =
|
|
7283
|
+
const me = L ?? Yi, se = v == null ? void 0 : v.map(Nr);
|
|
7278
7284
|
return se != null && se.length ? me.filter((g) => se.includes(g.value)) : me;
|
|
7279
|
-
}, [
|
|
7285
|
+
}, [v, L]), y = ((re = s[0]) == null ? void 0 : re.value) ?? "+1", D = s.some(
|
|
7280
7286
|
(me) => me.value === Nr(p ?? oe)
|
|
7281
|
-
) ? Nr(p ?? oe) : y, j = u !== void 0 ? sa(u) : U, B = `${
|
|
7287
|
+
) ? Nr(p ?? oe) : y, j = u !== void 0 ? sa(u) : U, B = `${D} ${j}`.trim(), ne = n && j.length > 0 && !za(B) ? a : void 0, ce = c ?? ne, pe = !!ce, $ = pe && i !== "tooltip", ie = pe && i !== "inline", I = pe ? "border-[var(--danger)] focus-within:border-[var(--danger)]" : "border-[var(--border)] focus-within:border-[var(--primary)]", M = (me) => {
|
|
7282
7288
|
const se = me.currentTarget.value;
|
|
7283
7289
|
u === void 0 && _(se), O == null || O(se, {
|
|
7284
|
-
countryCode:
|
|
7290
|
+
countryCode: D,
|
|
7285
7291
|
nationalNumber: se,
|
|
7286
|
-
fullNumber: `${
|
|
7292
|
+
fullNumber: `${D} ${se}`.trim()
|
|
7287
7293
|
}), f == null || f(me);
|
|
7288
7294
|
}, G = (me) => {
|
|
7289
7295
|
p === void 0 && W(me), x == null || x(me), O == null || O(j, {
|
|
@@ -7323,7 +7329,7 @@ function yc({
|
|
|
7323
7329
|
/* @__PURE__ */ t(
|
|
7324
7330
|
At,
|
|
7325
7331
|
{
|
|
7326
|
-
value:
|
|
7332
|
+
value: D,
|
|
7327
7333
|
onChange: G,
|
|
7328
7334
|
options: s,
|
|
7329
7335
|
placeholder: S,
|
|
@@ -7385,14 +7391,14 @@ function wc({
|
|
|
7385
7391
|
{
|
|
7386
7392
|
className: c === "horizontal" ? "flex flex-wrap gap-2" : "flex flex-col gap-2",
|
|
7387
7393
|
children: n.map((p) => {
|
|
7388
|
-
const
|
|
7394
|
+
const h = p.value === e, x = u || p.disabled;
|
|
7389
7395
|
return /* @__PURE__ */ l(
|
|
7390
7396
|
"label",
|
|
7391
7397
|
{
|
|
7392
7398
|
className: `inline-flex min-w-0 items-start gap-2 rounded-lg border px-2.5 py-1.5 transition-colors ${x ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-[var(--bg-input)]"} ${f}`,
|
|
7393
7399
|
style: {
|
|
7394
|
-
borderColor:
|
|
7395
|
-
background:
|
|
7400
|
+
borderColor: h ? "color-mix(in srgb, var(--primary) 48%, var(--border))" : "var(--border)",
|
|
7401
|
+
background: h ? "color-mix(in srgb, var(--primary) 8%, transparent)" : "var(--bg-card)"
|
|
7396
7402
|
},
|
|
7397
7403
|
children: [
|
|
7398
7404
|
/* @__PURE__ */ l("span", { className: "relative mt-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full border border-[var(--border)] bg-[var(--bg-input)]", children: [
|
|
@@ -7402,7 +7408,7 @@ function wc({
|
|
|
7402
7408
|
type: "radio",
|
|
7403
7409
|
name: a,
|
|
7404
7410
|
value: p.value,
|
|
7405
|
-
checked:
|
|
7411
|
+
checked: h,
|
|
7406
7412
|
disabled: x,
|
|
7407
7413
|
onChange: () => r(p.value),
|
|
7408
7414
|
className: "absolute inset-0 opacity-0"
|
|
@@ -7411,7 +7417,7 @@ function wc({
|
|
|
7411
7417
|
/* @__PURE__ */ t(
|
|
7412
7418
|
"span",
|
|
7413
7419
|
{
|
|
7414
|
-
className: `h-2 w-2 rounded-full transition ${
|
|
7420
|
+
className: `h-2 w-2 rounded-full transition ${h ? "scale-100 opacity-100" : "scale-50 opacity-0"}`,
|
|
7415
7421
|
style: { background: "var(--primary)" }
|
|
7416
7422
|
}
|
|
7417
7423
|
)
|
|
@@ -7469,7 +7475,7 @@ function Nc({
|
|
|
7469
7475
|
placeholder: n = "Escribe algo...",
|
|
7470
7476
|
minHeight: a = "80px"
|
|
7471
7477
|
}) {
|
|
7472
|
-
const i = le(null), c = le(null), u = le(null), m = le(!1), f = le(e ?? ""), p = le(r), [
|
|
7478
|
+
const i = le(null), c = le(null), u = le(null), m = le(!1), f = le(e ?? ""), p = le(r), [h, x] = A(() => !e || e.trim() === ""), [v, L] = A(/* @__PURE__ */ new Set()), [S, w] = A(null), [k, O] = A(""), [ee, z] = A(""), [Y, T] = A(""), [q, Z] = A(""), [te, P] = A(!1), X = we(
|
|
7473
7479
|
() => m.current ? c.current : i.current,
|
|
7474
7480
|
[]
|
|
7475
7481
|
);
|
|
@@ -7573,7 +7579,7 @@ function Nc({
|
|
|
7573
7579
|
}, y = () => {
|
|
7574
7580
|
const g = window.getSelection();
|
|
7575
7581
|
g && u.current && (g.removeAllRanges(), g.addRange(u.current));
|
|
7576
|
-
},
|
|
7582
|
+
}, D = (g) => {
|
|
7577
7583
|
if (s(), g === "link") {
|
|
7578
7584
|
const H = window.getSelection();
|
|
7579
7585
|
z(
|
|
@@ -7662,7 +7668,7 @@ function Nc({
|
|
|
7662
7668
|
return;
|
|
7663
7669
|
}
|
|
7664
7670
|
}
|
|
7665
|
-
S || (g.ctrlKey || g.metaKey) && (g.key === "b" && (g.preventDefault(), _("bold")), g.key === "i" && (g.preventDefault(), _("italic")), g.key === "u" && (g.preventDefault(), _("underline")), g.key === "k" && (g.preventDefault(),
|
|
7671
|
+
S || (g.ctrlKey || g.metaKey) && (g.key === "b" && (g.preventDefault(), _("bold")), g.key === "i" && (g.preventDefault(), _("italic")), g.key === "u" && (g.preventDefault(), _("underline")), g.key === "k" && (g.preventDefault(), D("link")));
|
|
7666
7672
|
}, G = () => /* @__PURE__ */ t(
|
|
7667
7673
|
"div",
|
|
7668
7674
|
{
|
|
@@ -7670,7 +7676,7 @@ function Nc({
|
|
|
7670
7676
|
style: { background: "var(--border)" }
|
|
7671
7677
|
}
|
|
7672
7678
|
), V = (g, H, ue, be, Se) => {
|
|
7673
|
-
const he = Se ?? (
|
|
7679
|
+
const he = Se ?? (v.has(ue) || ue === "__link" && S === "link" || ue === "__img" && S === "image");
|
|
7674
7680
|
return /* @__PURE__ */ t(
|
|
7675
7681
|
"button",
|
|
7676
7682
|
{
|
|
@@ -7850,28 +7856,28 @@ function Nc({
|
|
|
7850
7856
|
"Parrafo",
|
|
7851
7857
|
"__paragraph",
|
|
7852
7858
|
() => oe("p"),
|
|
7853
|
-
|
|
7859
|
+
v.has("formatBlock:p") || v.has("formatBlock:div")
|
|
7854
7860
|
),
|
|
7855
7861
|
V(
|
|
7856
7862
|
/* @__PURE__ */ t(Xo, { className: "h-4 w-4" }),
|
|
7857
7863
|
"Titulo 2",
|
|
7858
7864
|
"__h2",
|
|
7859
7865
|
() => oe("h2"),
|
|
7860
|
-
|
|
7866
|
+
v.has("formatBlock:h2")
|
|
7861
7867
|
),
|
|
7862
7868
|
V(
|
|
7863
7869
|
/* @__PURE__ */ t(Zo, { className: "h-4 w-4" }),
|
|
7864
7870
|
"Titulo 3",
|
|
7865
7871
|
"__h3",
|
|
7866
7872
|
() => oe("h3"),
|
|
7867
|
-
|
|
7873
|
+
v.has("formatBlock:h3")
|
|
7868
7874
|
),
|
|
7869
7875
|
V(
|
|
7870
7876
|
/* @__PURE__ */ t("span", { style: { fontSize: "13px", lineHeight: 1 }, children: "“" }),
|
|
7871
7877
|
"Cita",
|
|
7872
7878
|
"__quote",
|
|
7873
7879
|
() => oe("blockquote"),
|
|
7874
|
-
|
|
7880
|
+
v.has("formatBlock:blockquote")
|
|
7875
7881
|
),
|
|
7876
7882
|
G(),
|
|
7877
7883
|
V(/* @__PURE__ */ t("b", { children: "B" }), "Negrita (Ctrl+B)", "bold"),
|
|
@@ -7944,7 +7950,7 @@ function Nc({
|
|
|
7944
7950
|
/* @__PURE__ */ t(wa, { className: "h-4 w-4" }),
|
|
7945
7951
|
"Insertar enlace (Ctrl+K)",
|
|
7946
7952
|
"__link",
|
|
7947
|
-
() =>
|
|
7953
|
+
() => D("link")
|
|
7948
7954
|
),
|
|
7949
7955
|
V(
|
|
7950
7956
|
/* @__PURE__ */ t(sl, { className: "h-4 w-4" }),
|
|
@@ -7955,7 +7961,7 @@ function Nc({
|
|
|
7955
7961
|
/* @__PURE__ */ t(cl, { className: "h-4 w-4" }),
|
|
7956
7962
|
"Insertar imagen",
|
|
7957
7963
|
"__img",
|
|
7958
|
-
() =>
|
|
7964
|
+
() => D("image")
|
|
7959
7965
|
),
|
|
7960
7966
|
V(
|
|
7961
7967
|
/* @__PURE__ */ t(Na, { className: "h-4 w-4" }),
|
|
@@ -8013,7 +8019,7 @@ function Nc({
|
|
|
8013
8019
|
onPaste: pe,
|
|
8014
8020
|
onMouseDown: re,
|
|
8015
8021
|
"data-placeholder": n,
|
|
8016
|
-
className: `rich-editor px-3 py-2 text-sm focus:outline-none${
|
|
8022
|
+
className: `rich-editor px-3 py-2 text-sm focus:outline-none${h ? " is-empty" : ""}`,
|
|
8017
8023
|
style: {
|
|
8018
8024
|
color: "var(--text-main)",
|
|
8019
8025
|
background: "var(--bg-input)",
|
|
@@ -8055,7 +8061,7 @@ function Nc({
|
|
|
8055
8061
|
onPaste: pe,
|
|
8056
8062
|
onMouseDown: re,
|
|
8057
8063
|
"data-placeholder": n,
|
|
8058
|
-
className: `rich-editor min-h-0 flex-1 overflow-y-auto px-8 py-6 text-sm focus:outline-none${
|
|
8064
|
+
className: `rich-editor min-h-0 flex-1 overflow-y-auto px-8 py-6 text-sm focus:outline-none${h ? " is-empty" : ""}`,
|
|
8059
8065
|
style: {
|
|
8060
8066
|
color: "var(--text-main)",
|
|
8061
8067
|
background: "var(--bg-card)",
|
|
@@ -8224,12 +8230,12 @@ function Sc({
|
|
|
8224
8230
|
ariaLabel: m = "Cambiar estado",
|
|
8225
8231
|
title: f = "Cambiar estado",
|
|
8226
8232
|
className: p,
|
|
8227
|
-
selectClassName:
|
|
8233
|
+
selectClassName: h,
|
|
8228
8234
|
menuClassName: x,
|
|
8229
|
-
optionClassName:
|
|
8235
|
+
optionClassName: v,
|
|
8230
8236
|
spinnerClassName: L
|
|
8231
8237
|
}) {
|
|
8232
|
-
const [S, w] =
|
|
8238
|
+
const [S, w] = A(!1), [k, O] = A(!1), [ee, z] = A(-1), [Y, T] = A({}), q = le(null), Z = le(null), te = le(null), P = r.find((s) => s.value === e) ?? r[0], X = {
|
|
8233
8239
|
...P != null && P.tone ? da[P.tone] : void 0,
|
|
8234
8240
|
...P == null ? void 0 : P.style
|
|
8235
8241
|
}, J = i || c || r.length === 0, E = (s) => {
|
|
@@ -8239,16 +8245,16 @@ function Sc({
|
|
|
8239
8245
|
}, []), U = we(() => {
|
|
8240
8246
|
const s = q.current;
|
|
8241
8247
|
if (!s) return;
|
|
8242
|
-
const y = s.getBoundingClientRect(),
|
|
8243
|
-
Math.max(8, y.left + y.width / 2 -
|
|
8244
|
-
window.innerWidth -
|
|
8248
|
+
const y = s.getBoundingClientRect(), D = Math.max(y.width, rs[a]), j = Math.min(Math.max(r.length, 1) * 38 + 12, 260), B = window.innerHeight - y.bottom, ne = B < j && y.top > B, ce = Math.min(
|
|
8249
|
+
Math.max(8, y.left + y.width / 2 - D / 2),
|
|
8250
|
+
window.innerWidth - D - 8
|
|
8245
8251
|
);
|
|
8246
8252
|
T({
|
|
8247
8253
|
position: "fixed",
|
|
8248
8254
|
left: ce,
|
|
8249
8255
|
top: ne ? void 0 : y.bottom + 6,
|
|
8250
8256
|
bottom: ne ? window.innerHeight - y.top + 6 : void 0,
|
|
8251
|
-
width:
|
|
8257
|
+
width: D,
|
|
8252
8258
|
zIndex: 9999
|
|
8253
8259
|
});
|
|
8254
8260
|
}, [r.length, a]), _ = we(
|
|
@@ -8266,8 +8272,8 @@ function Sc({
|
|
|
8266
8272
|
if (!S) return;
|
|
8267
8273
|
function s(y) {
|
|
8268
8274
|
var j, B;
|
|
8269
|
-
const
|
|
8270
|
-
!((j = q.current) != null && j.contains(
|
|
8275
|
+
const D = y.target;
|
|
8276
|
+
!((j = q.current) != null && j.contains(D)) && !((B = Z.current) != null && B.contains(D)) && R();
|
|
8271
8277
|
}
|
|
8272
8278
|
return document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s);
|
|
8273
8279
|
}, [R, S]), Q(() => {
|
|
@@ -8335,7 +8341,7 @@ function Sc({
|
|
|
8335
8341
|
overscrollBehavior: "contain"
|
|
8336
8342
|
},
|
|
8337
8343
|
children: r.map((s, y) => {
|
|
8338
|
-
const
|
|
8344
|
+
const D = s.value === e, j = y === ee, B = {
|
|
8339
8345
|
...s.tone ? da[s.tone] : void 0,
|
|
8340
8346
|
...s.style
|
|
8341
8347
|
};
|
|
@@ -8344,7 +8350,7 @@ function Sc({
|
|
|
8344
8350
|
{
|
|
8345
8351
|
type: "button",
|
|
8346
8352
|
role: "option",
|
|
8347
|
-
"aria-selected":
|
|
8353
|
+
"aria-selected": D,
|
|
8348
8354
|
disabled: s.disabled,
|
|
8349
8355
|
onMouseEnter: () => !s.disabled && z(y),
|
|
8350
8356
|
onMouseDown: (ne) => {
|
|
@@ -8353,16 +8359,16 @@ function Sc({
|
|
|
8353
8359
|
className: ht(
|
|
8354
8360
|
"flex w-full items-center gap-2 rounded-lg font-medium text-left transition-colors disabled:cursor-not-allowed disabled:opacity-45",
|
|
8355
8361
|
ns[a],
|
|
8356
|
-
|
|
8357
|
-
|
|
8362
|
+
D ? s.className : void 0,
|
|
8363
|
+
v
|
|
8358
8364
|
),
|
|
8359
8365
|
style: {
|
|
8360
|
-
...
|
|
8361
|
-
background:
|
|
8362
|
-
color:
|
|
8366
|
+
...D ? B : void 0,
|
|
8367
|
+
background: D ? B.background ?? "color-mix(in srgb, var(--primary) 12%, transparent)" : j ? "var(--bg-hover)" : "transparent",
|
|
8368
|
+
color: D ? B.color ?? "var(--primary)" : "var(--text-main)"
|
|
8363
8369
|
},
|
|
8364
8370
|
children: [
|
|
8365
|
-
/* @__PURE__ */ t("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center", children:
|
|
8371
|
+
/* @__PURE__ */ t("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center", children: D ? /* @__PURE__ */ t(Ue, { className: "h-4 w-4" }) : null }),
|
|
8366
8372
|
/* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate", children: s.label })
|
|
8367
8373
|
]
|
|
8368
8374
|
},
|
|
@@ -8396,7 +8402,7 @@ function Sc({
|
|
|
8396
8402
|
"inline-flex items-center rounded-full border border-transparent font-medium leading-none outline-none transition-colors hover:border-current focus:border-current disabled:cursor-wait disabled:opacity-70",
|
|
8397
8403
|
es[a],
|
|
8398
8404
|
P == null ? void 0 : P.className,
|
|
8399
|
-
|
|
8405
|
+
h
|
|
8400
8406
|
),
|
|
8401
8407
|
style: X,
|
|
8402
8408
|
children: /* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: (P == null ? void 0 : P.label) ?? e })
|
|
@@ -8439,7 +8445,7 @@ function Ec({
|
|
|
8439
8445
|
listClassName: m = "",
|
|
8440
8446
|
panelClassName: f = ""
|
|
8441
8447
|
}) {
|
|
8442
|
-
const p = e.find((S) => !S.disabled) ?? e[0],
|
|
8448
|
+
const p = e.find((S) => !S.disabled) ?? e[0], h = r ?? n ?? (p == null ? void 0 : p.id), x = e.find((S) => S.id === h) ?? p, v = (S) => {
|
|
8443
8449
|
S.disabled || a == null || a(S.id);
|
|
8444
8450
|
};
|
|
8445
8451
|
return /* @__PURE__ */ l("div", { className: u, children: [
|
|
@@ -8454,9 +8460,9 @@ function Ec({
|
|
|
8454
8460
|
const k = w.findIndex(
|
|
8455
8461
|
(O) => O.id === x.id
|
|
8456
8462
|
);
|
|
8457
|
-
(S.key === "ArrowRight" || S.key === "ArrowDown") && (S.preventDefault(),
|
|
8463
|
+
(S.key === "ArrowRight" || S.key === "ArrowDown") && (S.preventDefault(), v(w[(k + 1) % w.length])), (S.key === "ArrowLeft" || S.key === "ArrowUp") && (S.preventDefault(), v(
|
|
8458
8464
|
w[(k - 1 + w.length) % w.length]
|
|
8459
|
-
)), S.key === "Home" && (S.preventDefault(),
|
|
8465
|
+
)), S.key === "Home" && (S.preventDefault(), v(w[0])), S.key === "End" && (S.preventDefault(), v(w[w.length - 1]));
|
|
8460
8466
|
},
|
|
8461
8467
|
className: `flex min-w-0 gap-1 overflow-x-auto ${c === "underline" ? "border-b border-[var(--border)]" : "rounded-lg border border-[var(--border)] bg-[var(--bg-input)] p-1"} ${m}`,
|
|
8462
8468
|
children: e.map((S) => {
|
|
@@ -8471,7 +8477,7 @@ function Ec({
|
|
|
8471
8477
|
id: `${S.id}-tab`,
|
|
8472
8478
|
disabled: S.disabled,
|
|
8473
8479
|
tabIndex: w ? 0 : -1,
|
|
8474
|
-
onClick: () =>
|
|
8480
|
+
onClick: () => v(S),
|
|
8475
8481
|
className: `inline-flex min-h-8 shrink-0 items-center justify-center gap-1.5 whitespace-nowrap px-2.5 text-sm font-semibold transition-colors focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 ${c === "underline" ? "border-b-2" : "rounded-md border"}`,
|
|
8476
8482
|
style: {
|
|
8477
8483
|
color: w ? "var(--primary)" : "var(--text-muted)",
|
|
@@ -8515,18 +8521,18 @@ function $c({
|
|
|
8515
8521
|
onBlockedStep: m,
|
|
8516
8522
|
allowBackNavigation: f = !0,
|
|
8517
8523
|
showFooter: p = !0,
|
|
8518
|
-
previousLabel:
|
|
8524
|
+
previousLabel: h = "Anterior",
|
|
8519
8525
|
nextLabel: x = "Siguiente",
|
|
8520
|
-
blockedNextLabel:
|
|
8526
|
+
blockedNextLabel: v = "Completa este paso",
|
|
8521
8527
|
className: L = "",
|
|
8522
8528
|
headerClassName: S = "",
|
|
8523
8529
|
contentClassName: w = "",
|
|
8524
8530
|
footerClassName: k = ""
|
|
8525
8531
|
}) {
|
|
8526
8532
|
var I;
|
|
8527
|
-
const O = ((I = e[0]) == null ? void 0 : I.id) ?? "", [ee, z] =
|
|
8533
|
+
const O = ((I = e[0]) == null ? void 0 : I.id) ?? "", [ee, z] = A(
|
|
8528
8534
|
n ?? O
|
|
8529
|
-
), [Y, T] =
|
|
8535
|
+
), [Y, T] = A(
|
|
8530
8536
|
i
|
|
8531
8537
|
), q = r ?? ee, Z = a ?? Y, te = at(
|
|
8532
8538
|
() => new Set(Z),
|
|
@@ -8555,7 +8561,7 @@ function $c({
|
|
|
8555
8561
|
return R(M), !0;
|
|
8556
8562
|
}, y = (M = X == null ? void 0 : X.id) => {
|
|
8557
8563
|
!M || te.has(M) || E([...Z, M]);
|
|
8558
|
-
},
|
|
8564
|
+
}, D = (M = X == null ? void 0 : X.id) => {
|
|
8559
8565
|
if (!M) return;
|
|
8560
8566
|
const G = e.findIndex((re) => re.id === M), V = Z.filter((re) => {
|
|
8561
8567
|
const me = e.findIndex((se) => se.id === re);
|
|
@@ -8572,7 +8578,7 @@ function $c({
|
|
|
8572
8578
|
isCompleted: U,
|
|
8573
8579
|
isUnlocked: W,
|
|
8574
8580
|
completeStep: y,
|
|
8575
|
-
uncompleteStep:
|
|
8581
|
+
uncompleteStep: D,
|
|
8576
8582
|
goToStep: s,
|
|
8577
8583
|
goNext: B,
|
|
8578
8584
|
goPrevious: j
|
|
@@ -8708,7 +8714,7 @@ function $c({
|
|
|
8708
8714
|
icon: /* @__PURE__ */ t(Tt, {}),
|
|
8709
8715
|
disabled: !pe,
|
|
8710
8716
|
onClick: j,
|
|
8711
|
-
children:
|
|
8717
|
+
children: h
|
|
8712
8718
|
}
|
|
8713
8719
|
),
|
|
8714
8720
|
/* @__PURE__ */ l("div", { className: "flex items-center gap-3 text-xs text-[var(--text-muted)]", children: [
|
|
@@ -8732,7 +8738,7 @@ function $c({
|
|
|
8732
8738
|
icon: /* @__PURE__ */ t(st, {}),
|
|
8733
8739
|
disabled: !ce || !$,
|
|
8734
8740
|
onClick: B,
|
|
8735
|
-
children: ce && !$ ?
|
|
8741
|
+
children: ce && !$ ? v : x
|
|
8736
8742
|
}
|
|
8737
8743
|
)
|
|
8738
8744
|
]
|
|
@@ -8775,9 +8781,9 @@ const ss = ga(
|
|
|
8775
8781
|
maxRows: m,
|
|
8776
8782
|
showCount: f = !1,
|
|
8777
8783
|
maxCount: p,
|
|
8778
|
-
status:
|
|
8784
|
+
status: h = "default",
|
|
8779
8785
|
icon: x,
|
|
8780
|
-
action:
|
|
8786
|
+
action: v,
|
|
8781
8787
|
style: L,
|
|
8782
8788
|
value: S,
|
|
8783
8789
|
defaultValue: w,
|
|
@@ -8785,7 +8791,7 @@ const ss = ga(
|
|
|
8785
8791
|
onInput: O,
|
|
8786
8792
|
...ee
|
|
8787
8793
|
}, z) {
|
|
8788
|
-
const Y = le(null), T = is(S, w), q = p ?? k, Z = !!(x ||
|
|
8794
|
+
const Y = le(null), T = is(S, w), q = p ?? k, Z = !!(x || v || f), te = h === "error" ? "var(--danger)" : h === "success" ? "#16a34a" : "var(--border)", P = {
|
|
8789
8795
|
...L ?? {},
|
|
8790
8796
|
...u ? { minHeight: `${u * 24 + 18}px` } : null,
|
|
8791
8797
|
...m ? { maxHeight: `${m * 24 + 18}px` } : null
|
|
@@ -8804,18 +8810,18 @@ const ss = ga(
|
|
|
8804
8810
|
value: S,
|
|
8805
8811
|
defaultValue: w,
|
|
8806
8812
|
maxLength: k,
|
|
8807
|
-
"aria-invalid":
|
|
8813
|
+
"aria-invalid": h === "error" || ee["aria-invalid"],
|
|
8808
8814
|
onInput: (E) => {
|
|
8809
8815
|
X(), O == null || O(E);
|
|
8810
8816
|
},
|
|
8811
8817
|
style: { ...P, borderColor: te },
|
|
8812
|
-
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" : ""} ${
|
|
8818
|
+
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}`
|
|
8813
8819
|
}
|
|
8814
8820
|
);
|
|
8815
8821
|
return Z ? /* @__PURE__ */ l("span", { className: `relative block ${n}`, children: [
|
|
8816
8822
|
x && /* @__PURE__ */ t("span", { className: "pointer-events-none absolute left-2.5 top-2.5 flex h-4 w-4 items-center justify-center text-[var(--text-muted)]", children: x }),
|
|
8817
8823
|
J,
|
|
8818
|
-
|
|
8824
|
+
v && /* @__PURE__ */ t("span", { className: "absolute right-2 top-2 flex items-center justify-center", children: v }),
|
|
8819
8825
|
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: [
|
|
8820
8826
|
T,
|
|
8821
8827
|
q ? `/${q}` : ""
|
|
@@ -9023,13 +9029,13 @@ function ys({
|
|
|
9023
9029
|
fallbackLabel: m = "Usuario",
|
|
9024
9030
|
wrapperClassName: f = "",
|
|
9025
9031
|
labelClassName: p = "",
|
|
9026
|
-
labelSize:
|
|
9032
|
+
labelSize: h = "xs",
|
|
9027
9033
|
avatarVersion: x = 0,
|
|
9028
|
-
className:
|
|
9034
|
+
className: v = "",
|
|
9029
9035
|
style: L
|
|
9030
9036
|
}) {
|
|
9031
9037
|
var U;
|
|
9032
|
-
const [S, w] =
|
|
9038
|
+
const [S, w] = A(!1), k = typeof e == "string" && e.trim() && e !== "undefined" && e !== "null" ? e.trim() : "";
|
|
9033
9039
|
Q(() => {
|
|
9034
9040
|
w(!1);
|
|
9035
9041
|
}, [k, x]);
|
|
@@ -9042,7 +9048,7 @@ function ys({
|
|
|
9042
9048
|
}[a], J = q ? /* @__PURE__ */ t(
|
|
9043
9049
|
"span",
|
|
9044
9050
|
{
|
|
9045
|
-
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 ${
|
|
9051
|
+
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}`,
|
|
9046
9052
|
style: L,
|
|
9047
9053
|
children: /* @__PURE__ */ t(
|
|
9048
9054
|
"img",
|
|
@@ -9062,7 +9068,7 @@ function ys({
|
|
|
9062
9068
|
alt: z,
|
|
9063
9069
|
width: X,
|
|
9064
9070
|
height: X,
|
|
9065
|
-
className: `${O} rounded-full object-cover flex-shrink-0 ${
|
|
9071
|
+
className: `${O} rounded-full object-cover flex-shrink-0 ${v}`,
|
|
9066
9072
|
style: L,
|
|
9067
9073
|
onError: () => w(!0)
|
|
9068
9074
|
},
|
|
@@ -9070,7 +9076,7 @@ function ys({
|
|
|
9070
9076
|
) : /* @__PURE__ */ t(
|
|
9071
9077
|
"span",
|
|
9072
9078
|
{
|
|
9073
|
-
className: `${O} ${vs(z)} ${ee} rounded-full flex items-center justify-center font-black text-white uppercase flex-shrink-0 ${
|
|
9079
|
+
className: `${O} ${vs(z)} ${ee} rounded-full flex items-center justify-center font-black text-white uppercase flex-shrink-0 ${v}`,
|
|
9074
9080
|
style: L,
|
|
9075
9081
|
title: z,
|
|
9076
9082
|
children: Y
|
|
@@ -9086,7 +9092,7 @@ function ys({
|
|
|
9086
9092
|
/* @__PURE__ */ t(
|
|
9087
9093
|
"span",
|
|
9088
9094
|
{
|
|
9089
|
-
className: `min-w-0 truncate ${bs[
|
|
9095
|
+
className: `min-w-0 truncate ${bs[h]} font-medium text-[var(--text-main)] ${p}`,
|
|
9090
9096
|
title: z,
|
|
9091
9097
|
children: z
|
|
9092
9098
|
}
|
|
@@ -9126,7 +9132,7 @@ function ks({
|
|
|
9126
9132
|
onLogout: f,
|
|
9127
9133
|
LinkComponent: p = ws
|
|
9128
9134
|
}) {
|
|
9129
|
-
const [
|
|
9135
|
+
const [h, x] = A(!1), v = Ns(r);
|
|
9130
9136
|
return /* @__PURE__ */ l("div", { className: "min-h-screen bg-[var(--bg-main)] text-[var(--text-main)]", children: [
|
|
9131
9137
|
/* @__PURE__ */ t(us, {}),
|
|
9132
9138
|
/* @__PURE__ */ t(
|
|
@@ -9139,7 +9145,7 @@ function ks({
|
|
|
9139
9145
|
children: /* @__PURE__ */ t(Ea, { className: "h-5 w-5" })
|
|
9140
9146
|
}
|
|
9141
9147
|
),
|
|
9142
|
-
|
|
9148
|
+
h && /* @__PURE__ */ t(
|
|
9143
9149
|
"button",
|
|
9144
9150
|
{
|
|
9145
9151
|
type: "button",
|
|
@@ -9151,7 +9157,7 @@ function ks({
|
|
|
9151
9157
|
/* @__PURE__ */ l(
|
|
9152
9158
|
"aside",
|
|
9153
9159
|
{
|
|
9154
|
-
className: `fixed inset-y-0 left-0 z-50 flex w-72 flex-col bg-[#071716] text-white shadow-2xl transition-transform duration-200 lg:translate-x-0 ${
|
|
9160
|
+
className: `fixed inset-y-0 left-0 z-50 flex w-72 flex-col bg-[#071716] text-white shadow-2xl transition-transform duration-200 lg:translate-x-0 ${h ? "translate-x-0" : "-translate-x-full"}`,
|
|
9155
9161
|
children: [
|
|
9156
9162
|
/* @__PURE__ */ l("div", { className: "flex h-16 items-center gap-3 border-b border-white/10 px-4", children: [
|
|
9157
9163
|
/* @__PURE__ */ t("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-white/10 text-white", children: c ?? /* @__PURE__ */ t(Er, { className: "h-5 w-5" }) }),
|
|
@@ -9172,7 +9178,7 @@ function ks({
|
|
|
9172
9178
|
{
|
|
9173
9179
|
className: "sidebar-scroll min-h-0 flex-1 overflow-y-auto px-3 py-4",
|
|
9174
9180
|
"data-overlay-scroll": "true",
|
|
9175
|
-
children: Object.entries(
|
|
9181
|
+
children: Object.entries(v).map(([L, S]) => /* @__PURE__ */ l("div", { className: "mb-5", children: [
|
|
9176
9182
|
/* @__PURE__ */ l("div", { className: "mb-2 flex items-center gap-2 px-2 text-[11px] font-semibold uppercase tracking-wide text-white/35", children: [
|
|
9177
9183
|
/* @__PURE__ */ t(Xe, { className: "h-3.5 w-3.5" }),
|
|
9178
9184
|
L
|
|
@@ -9340,22 +9346,22 @@ function Tc({
|
|
|
9340
9346
|
breadcrumbs: m,
|
|
9341
9347
|
currentPath: f,
|
|
9342
9348
|
showBreadcrumbs: p = !0,
|
|
9343
|
-
contained:
|
|
9349
|
+
contained: h = !1,
|
|
9344
9350
|
LinkComponent: x = Ss
|
|
9345
9351
|
}) {
|
|
9346
|
-
const
|
|
9352
|
+
const v = le(null), [L, S] = A(!1), [w, k] = A(f ?? "/"), [O, ee] = A(() => ha()), [z, Y] = A(null), T = f ?? w, q = m ?? Ls(T), Z = i ?? Ms(T), te = p && !O && q.length > 1, P = !te;
|
|
9347
9353
|
Q(() => {
|
|
9348
9354
|
f || k(window.location.pathname);
|
|
9349
9355
|
}, [f]), Q(() => {
|
|
9350
9356
|
ee(ha());
|
|
9351
9357
|
}, []), Q(() => {
|
|
9352
|
-
if (
|
|
9358
|
+
if (h) {
|
|
9353
9359
|
S(!1);
|
|
9354
9360
|
return;
|
|
9355
9361
|
}
|
|
9356
9362
|
let J = null, E = 0, R = 0;
|
|
9357
9363
|
const U = () => {
|
|
9358
|
-
const W =
|
|
9364
|
+
const W = v.current, s = document.querySelector(
|
|
9359
9365
|
"[data-app-scroll='true']"
|
|
9360
9366
|
);
|
|
9361
9367
|
return (W == null ? void 0 : W.closest(".os-viewport")) ?? (W == null ? void 0 : W.closest(
|
|
@@ -9370,17 +9376,17 @@ function Tc({
|
|
|
9370
9376
|
return oe(), E = window.requestAnimationFrame(oe), R = window.setTimeout(oe, 120), () => {
|
|
9371
9377
|
window.cancelAnimationFrame(E), window.clearTimeout(R), J == null || J.removeEventListener("scroll", _);
|
|
9372
9378
|
};
|
|
9373
|
-
}, [
|
|
9374
|
-
if (
|
|
9379
|
+
}, [h]), Q(() => {
|
|
9380
|
+
if (h) {
|
|
9375
9381
|
Y(null);
|
|
9376
9382
|
return;
|
|
9377
9383
|
}
|
|
9378
9384
|
let J = 0;
|
|
9379
9385
|
const E = [], R = () => {
|
|
9380
|
-
const
|
|
9386
|
+
const D = v.current, j = D == null ? void 0 : D.parentElement, B = document.querySelector(
|
|
9381
9387
|
"[data-app-scroll='true']"
|
|
9382
9388
|
), ne = tn(B) ?? B;
|
|
9383
|
-
if (!
|
|
9389
|
+
if (!D || !j || !ne) {
|
|
9384
9390
|
Y(null);
|
|
9385
9391
|
return;
|
|
9386
9392
|
}
|
|
@@ -9395,33 +9401,33 @@ function Tc({
|
|
|
9395
9401
|
window.cancelAnimationFrame(J), J = window.requestAnimationFrame(R);
|
|
9396
9402
|
};
|
|
9397
9403
|
U(), window.addEventListener("resize", U);
|
|
9398
|
-
const _ = new ResizeObserver(U), oe =
|
|
9404
|
+
const _ = new ResizeObserver(U), oe = v.current, W = oe == null ? void 0 : oe.parentElement, s = document.querySelector(
|
|
9399
9405
|
"[data-app-scroll='true']"
|
|
9400
9406
|
), y = tn(s) ?? s;
|
|
9401
|
-
return [W, s, y].forEach((
|
|
9402
|
-
|
|
9407
|
+
return [W, s, y].forEach((D) => {
|
|
9408
|
+
D && _.observe(D);
|
|
9403
9409
|
}), E.push(window.setTimeout(U, 120)), E.push(window.setTimeout(U, 280)), () => {
|
|
9404
|
-
window.cancelAnimationFrame(J), window.removeEventListener("resize", U), _.disconnect(), E.forEach((
|
|
9410
|
+
window.cancelAnimationFrame(J), window.removeEventListener("resize", U), _.disconnect(), E.forEach((D) => window.clearTimeout(D));
|
|
9405
9411
|
};
|
|
9406
|
-
}, [
|
|
9412
|
+
}, [h]);
|
|
9407
9413
|
const X = {
|
|
9408
9414
|
...z ? { marginLeft: z.marginLeft, width: z.width } : null,
|
|
9409
9415
|
"--page-header-control-height": L ? "34px" : "40px",
|
|
9410
9416
|
"--page-header-control-padding-x": L ? "10px" : "14px",
|
|
9411
9417
|
"--page-header-control-icon-left": L ? "10px" : "12px",
|
|
9412
|
-
background:
|
|
9418
|
+
background: h ? "var(--bg-card)" : L ? "color-mix(in srgb, var(--bg-main) 82%, transparent)" : "color-mix(in srgb, var(--bg-main) 58%, transparent)",
|
|
9413
9419
|
backdropFilter: "saturate(1.25) blur(18px)",
|
|
9414
9420
|
WebkitBackdropFilter: "saturate(1.25) blur(18px)",
|
|
9415
|
-
borderBottom:
|
|
9421
|
+
borderBottom: h || L ? "1px solid var(--border)" : "1px solid transparent",
|
|
9416
9422
|
boxShadow: L ? "0 10px 28px rgba(12, 54, 53, 0.12)" : "none"
|
|
9417
9423
|
};
|
|
9418
9424
|
return /* @__PURE__ */ t(
|
|
9419
9425
|
"div",
|
|
9420
9426
|
{
|
|
9421
|
-
ref:
|
|
9427
|
+
ref: v,
|
|
9422
9428
|
"data-page-header": "true",
|
|
9423
9429
|
"data-compact": L ? "true" : "false",
|
|
9424
|
-
className: `sticky top-0 z-30 overflow-visible py-0 transition-[background-color,box-shadow,border-color] duration-300 ease-out ${
|
|
9430
|
+
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}`,
|
|
9425
9431
|
style: X,
|
|
9426
9432
|
children: /* @__PURE__ */ l(
|
|
9427
9433
|
"div",
|
|
@@ -9591,7 +9597,7 @@ function Dc({
|
|
|
9591
9597
|
src: r,
|
|
9592
9598
|
projectKey: n
|
|
9593
9599
|
}) {
|
|
9594
|
-
const [a, i] =
|
|
9600
|
+
const [a, i] = A("system"), c = le(null);
|
|
9595
9601
|
Q(() => {
|
|
9596
9602
|
i(va());
|
|
9597
9603
|
const f = new MutationObserver(
|
|
@@ -9615,22 +9621,22 @@ function Dc({
|
|
|
9615
9621
|
return Q(() => {
|
|
9616
9622
|
if (!n) return;
|
|
9617
9623
|
const f = n;
|
|
9618
|
-
function p(
|
|
9624
|
+
function p(h) {
|
|
9619
9625
|
var L, S, w;
|
|
9620
|
-
if (
|
|
9621
|
-
if (((S =
|
|
9626
|
+
if (h.source !== ((L = c.current) == null ? void 0 : L.contentWindow) || m && h.origin !== m) return;
|
|
9627
|
+
if (((S = h.data) == null ? void 0 : S.type) === "prime-microservice:overlay") {
|
|
9622
9628
|
window.dispatchEvent(
|
|
9623
9629
|
new CustomEvent("prime-auth:microservice-overlay", {
|
|
9624
|
-
detail: { active: !!
|
|
9630
|
+
detail: { active: !!h.data.active }
|
|
9625
9631
|
})
|
|
9626
9632
|
);
|
|
9627
9633
|
return;
|
|
9628
9634
|
}
|
|
9629
|
-
if (((w =
|
|
9630
|
-
const x =
|
|
9635
|
+
if (((w = h.data) == null ? void 0 : w.type) !== "prime-microservice:navigation") return;
|
|
9636
|
+
const x = h.data.path;
|
|
9631
9637
|
if (!x || !x.startsWith("/") || x.startsWith("//")) return;
|
|
9632
|
-
const
|
|
9633
|
-
`${window.location.pathname}${window.location.search}${window.location.hash}` !==
|
|
9638
|
+
const v = `/apps/${encodeURIComponent(f)}${x}`;
|
|
9639
|
+
`${window.location.pathname}${window.location.search}${window.location.hash}` !== v && (window.history.replaceState(window.history.state, "", v), window.dispatchEvent(
|
|
9634
9640
|
new CustomEvent("prime-auth:microservice-navigation")
|
|
9635
9641
|
));
|
|
9636
9642
|
}
|
|
@@ -9655,7 +9661,7 @@ function Dc({
|
|
|
9655
9661
|
) });
|
|
9656
9662
|
}
|
|
9657
9663
|
function Bc() {
|
|
9658
|
-
const [e, r] =
|
|
9664
|
+
const [e, r] = A(""), [n, a] = A(!1), [i, c] = A({ width: 96, height: 96 });
|
|
9659
9665
|
return Q(() => {
|
|
9660
9666
|
let u = !1;
|
|
9661
9667
|
return fetch("/api/microservices/prime-suite/chat-url", { cache: "no-store" }).then((m) => m.ok ? m.json() : null).then((m) => {
|
|
@@ -9722,11 +9728,11 @@ function Oc({
|
|
|
9722
9728
|
return /* @__PURE__ */ t(Nl, { position: e, theme: r, richColors: !0, closeButton: !0 });
|
|
9723
9729
|
}
|
|
9724
9730
|
function Ic(e) {
|
|
9725
|
-
const [r, n] =
|
|
9731
|
+
const [r, n] = A({}), [a, i] = A(!1), c = we(
|
|
9726
9732
|
(p) => a || r[p] ? e[p] : void 0,
|
|
9727
9733
|
[e, a, r]
|
|
9728
9734
|
), u = we((p) => {
|
|
9729
|
-
n((
|
|
9735
|
+
n((h) => ({ ...h, [p]: !0 }));
|
|
9730
9736
|
}, []), m = we(() => {
|
|
9731
9737
|
i(!0);
|
|
9732
9738
|
}, []), f = we(() => {
|