bonsaif-ui 0.1.7 → 0.1.8
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/CHANGELOG.md +4 -0
- package/dist/bonsaif-ui.js +539 -518
- package/dist/bonsaif-ui.umd.cjs +1 -1
- package/dist/components/layout/PageHeader.d.ts.map +1 -1
- package/dist/components/ui/Button.d.ts.map +1 -1
- package/dist/components/ui/ButtonChromeContext.d.ts +1 -0
- package/dist/components/ui/ButtonChromeContext.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/bonsaif-ui.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as t, jsxs as i, Fragment as we } from "react/jsx-runtime";
|
|
3
|
-
import ge, { useRef as re, useState as D, useEffect as
|
|
4
|
-
import { HiMagnifyingGlass as Je, HiXMark as
|
|
3
|
+
import ge, { useRef as re, useState as D, useEffect as H, createContext as Qt, useLayoutEffect as er, useContext as tr, isValidElement as It, Children as rr, useMemo as ze, useCallback as st, useSyncExternalStore as nr } from "react";
|
|
4
|
+
import { HiMagnifyingGlass as Je, HiXMark as $e, HiChevronLeft as je, HiChevronDown as _e, HiChevronRight as Te, HiCalendarDays as lt, HiExclamationTriangle as ar, HiClipboardDocument as ir, HiCheck as Pt, HiLink as or, HiChevronUp as sr, HiChevronUpDown as lr, HiLockClosed as cr, HiBars3 as dr, HiHome as Xe, HiArrowRightOnRectangle as ur, HiShieldCheck as rt, HiInbox as mr, HiListBullet as xt, HiBriefcase as fr, HiCog6Tooth as vt, HiUsers as gt, HiDocumentText as pr, HiBell as hr, HiUser as br, HiClipboardDocumentList as xr, HiBuildingOffice2 as vr, HiRectangleGroup as gr, HiTicket as yr, HiChartBar as wr } from "react-icons/hi2";
|
|
5
5
|
import { createPortal as Ke } from "react-dom";
|
|
6
6
|
import { OverlayScrollbars as yt } from "overlayscrollbars";
|
|
7
7
|
import { MdDragIndicator as Nr } from "react-icons/md";
|
|
@@ -9,11 +9,11 @@ import { OverlayScrollbarsComponent as wt } from "overlayscrollbars-react";
|
|
|
9
9
|
import { DayPicker as kr, useDayPicker as Sr } from "react-day-picker";
|
|
10
10
|
import "react-day-picker/dist/style.css";
|
|
11
11
|
import { FiSave as Cr } from "react-icons/fi";
|
|
12
|
-
import { Toaster as
|
|
13
|
-
function
|
|
12
|
+
import { Toaster as Er } from "sonner";
|
|
13
|
+
function $r(...e) {
|
|
14
14
|
return e.filter(Boolean).join(" ");
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function Vn({
|
|
17
17
|
variant: e = "primary",
|
|
18
18
|
className: r,
|
|
19
19
|
type: n = "button",
|
|
@@ -23,14 +23,14 @@ function Xn({
|
|
|
23
23
|
return /* @__PURE__ */ t(
|
|
24
24
|
"button",
|
|
25
25
|
{
|
|
26
|
-
className:
|
|
26
|
+
className: $r("bonsaif-ui-button", `bonsaif-ui-button--${e}`, r),
|
|
27
27
|
type: n,
|
|
28
28
|
...s,
|
|
29
29
|
children: a
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Or({
|
|
34
34
|
value: e,
|
|
35
35
|
onChange: r,
|
|
36
36
|
placeholder: n,
|
|
@@ -42,7 +42,7 @@ function Mr({
|
|
|
42
42
|
inputTabIndex: d
|
|
43
43
|
}) {
|
|
44
44
|
const h = re(null), [N, S] = D(!1), b = u || N || e.trim().length > 0, m = p === "sm" ? "h-9 rounded-md" : "h-11 rounded-lg";
|
|
45
|
-
|
|
45
|
+
H(() => {
|
|
46
46
|
var c;
|
|
47
47
|
s && (S(!0), (c = h.current) == null || c.focus());
|
|
48
48
|
}, [s]);
|
|
@@ -100,7 +100,7 @@ function Mr({
|
|
|
100
100
|
className: "absolute right-2 top-1/2 flex !h-6 !w-6 -translate-y-1/2 items-center justify-center rounded-full !p-0 leading-none transition-colors hover:bg-black/5",
|
|
101
101
|
style: { color: "var(--text-muted)" },
|
|
102
102
|
"aria-label": "Limpiar búsqueda",
|
|
103
|
-
children: /* @__PURE__ */ t(
|
|
103
|
+
children: /* @__PURE__ */ t($e, { className: "h-3.5 w-3.5 flex-shrink-0" })
|
|
104
104
|
}
|
|
105
105
|
)
|
|
106
106
|
]
|
|
@@ -108,7 +108,7 @@ function Mr({
|
|
|
108
108
|
);
|
|
109
109
|
}
|
|
110
110
|
const zt = Qt({});
|
|
111
|
-
function
|
|
111
|
+
function Mr(e) {
|
|
112
112
|
var a;
|
|
113
113
|
const r = Array.from(
|
|
114
114
|
e.querySelectorAll("*")
|
|
@@ -129,7 +129,7 @@ function ut({
|
|
|
129
129
|
as: u = "div"
|
|
130
130
|
}) {
|
|
131
131
|
const f = re(null), p = re(null), [d, h] = D(null), [N, S] = D("");
|
|
132
|
-
|
|
132
|
+
H(() => {
|
|
133
133
|
const v = f.current;
|
|
134
134
|
v && (v.querySelectorAll("[title]").forEach((c) => {
|
|
135
135
|
const y = c.getAttribute("title");
|
|
@@ -139,13 +139,13 @@ function ut({
|
|
|
139
139
|
if (!d) return;
|
|
140
140
|
const v = p.current;
|
|
141
141
|
if (!v) return;
|
|
142
|
-
const c = 12, y = 14,
|
|
143
|
-
let C = d.mouseX + y,
|
|
144
|
-
C >
|
|
145
|
-
(
|
|
146
|
-
...
|
|
142
|
+
const c = 12, y = 14, T = v.getBoundingClientRect(), j = window.innerWidth - T.width - c, P = window.innerHeight - T.height - c;
|
|
143
|
+
let C = d.mouseX + y, M = d.mouseY + y;
|
|
144
|
+
C > j && (C = d.mouseX - T.width - y), M > P && (M = d.mouseY - T.height - y), C = Math.min(Math.max(c, C), Math.max(c, j)), M = Math.min(Math.max(c, M), Math.max(c, P)), (Math.abs(C - d.x) > 0.5 || Math.abs(M - d.y) > 0.5) && h(
|
|
145
|
+
(B) => B && {
|
|
146
|
+
...B,
|
|
147
147
|
x: C,
|
|
148
|
-
y:
|
|
148
|
+
y: M
|
|
149
149
|
}
|
|
150
150
|
);
|
|
151
151
|
}, [d]);
|
|
@@ -153,9 +153,9 @@ function ut({
|
|
|
153
153
|
const y = f.current;
|
|
154
154
|
if (y) {
|
|
155
155
|
if (n) {
|
|
156
|
-
const
|
|
157
|
-
if (!
|
|
158
|
-
S(
|
|
156
|
+
const T = Mr(y);
|
|
157
|
+
if (!T) return;
|
|
158
|
+
S(T);
|
|
159
159
|
}
|
|
160
160
|
!n && !r || h({ mouseX: v, mouseY: c, x: v + 14, y: c + 14 });
|
|
161
161
|
}
|
|
@@ -218,17 +218,17 @@ const Br = "inline-flex shrink-0 items-center justify-center gap-2 whitespace-no
|
|
|
218
218
|
danger: "border border-[var(--border)] text-[var(--danger)] hover:border-[var(--danger)] hover:bg-[var(--danger-bg)] active:scale-[0.98] transition-colors",
|
|
219
219
|
ghost: "text-[var(--text-secondary)] hover:opacity-70",
|
|
220
220
|
icon: "text-[var(--text-muted)] hover:text-[var(--primary)] hover:bg-primary/5"
|
|
221
|
-
}, Lr = {
|
|
221
|
+
}, Lr = "border border-[var(--border)] text-[var(--text-muted)] shadow-sm shadow-black/5 hover:border-[var(--border)] hover:bg-[var(--bg-input)] hover:text-[var(--primary)] active:scale-[0.98] transition-colors", Dr = {
|
|
222
222
|
xs: "h-8 px-2.5 text-xs",
|
|
223
223
|
sm: "h-9 px-3.5 text-xs",
|
|
224
224
|
md: "h-11 px-4 text-sm",
|
|
225
225
|
lg: "h-12 px-5 text-sm font-semibold"
|
|
226
|
-
},
|
|
226
|
+
}, Ar = {
|
|
227
227
|
xs: "h-8 w-8",
|
|
228
228
|
sm: "h-9 w-9",
|
|
229
229
|
md: "h-10 w-10",
|
|
230
230
|
lg: "h-11 w-11"
|
|
231
|
-
},
|
|
231
|
+
}, Ir = {
|
|
232
232
|
primary: { background: "var(--bg-card)" },
|
|
233
233
|
secondary: { background: "var(--bg-card)" },
|
|
234
234
|
danger: { background: "var(--bg-card)" },
|
|
@@ -238,7 +238,7 @@ const Br = "inline-flex shrink-0 items-center justify-center gap-2 whitespace-no
|
|
|
238
238
|
function ct(e) {
|
|
239
239
|
return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(ct).join(" ").trim() : It(e) ? ct(e.props.children) : "";
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function Pr(e) {
|
|
242
242
|
return rr.toArray(e).find(It) ?? null;
|
|
243
243
|
}
|
|
244
244
|
function xe({
|
|
@@ -256,38 +256,53 @@ function xe({
|
|
|
256
256
|
style: S,
|
|
257
257
|
...b
|
|
258
258
|
}) {
|
|
259
|
-
const m = tr(zt), v = u ?? m.iconOnly ?? e === "icon", c = m.compact ?? !1, y = c && r === "md" ? "xs" : r,
|
|
259
|
+
const m = tr(zt), v = u ?? m.iconOnly ?? e === "icon", c = m.compact ?? !1, y = m.headerAction ?? !1, T = c && r === "md" ? "xs" : r, j = e === "icon" || v, P = y && j, C = ct(d), M = s ?? b.title ?? b["aria-label"] ?? (v ? C : void 0), B = M ? void 0 : b.title, $ = b["aria-label"] ?? (typeof M == "string" ? M : C || void 0), _ = n ? null : a ?? (v ? Pr(d) : null), E = /* @__PURE__ */ i(
|
|
260
260
|
"button",
|
|
261
261
|
{
|
|
262
262
|
...b,
|
|
263
|
-
title:
|
|
264
|
-
"aria-label":
|
|
263
|
+
title: B,
|
|
264
|
+
"aria-label": $,
|
|
265
265
|
"data-variant": e,
|
|
266
|
-
"data-size":
|
|
267
|
-
"data-icon":
|
|
266
|
+
"data-size": T,
|
|
267
|
+
"data-icon": j ? "true" : void 0,
|
|
268
268
|
disabled: N || n,
|
|
269
|
-
className: `${Br} ${Tr[e]} ${
|
|
269
|
+
className: `${Br} ${P ? Lr : Tr[e]} ${j ? Ar[T] : Dr[T]} ${c && !j ? "px-2.5" : ""} ${h}`,
|
|
270
270
|
style: {
|
|
271
|
-
...
|
|
271
|
+
...Ir[e],
|
|
272
272
|
height: Nt(f),
|
|
273
273
|
padding: Nt(p),
|
|
274
|
-
...S
|
|
274
|
+
...S,
|
|
275
|
+
...P ? {
|
|
276
|
+
width: "32px",
|
|
277
|
+
height: "32px",
|
|
278
|
+
padding: 0,
|
|
279
|
+
background: "var(--bg-card)",
|
|
280
|
+
borderRadius: "8px"
|
|
281
|
+
} : null
|
|
275
282
|
},
|
|
276
283
|
children: [
|
|
277
|
-
n ? /* @__PURE__ */ t("span", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) :
|
|
284
|
+
n ? /* @__PURE__ */ t("span", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : _,
|
|
278
285
|
!v && d
|
|
279
286
|
]
|
|
280
287
|
}
|
|
281
288
|
);
|
|
282
|
-
return
|
|
289
|
+
return M ? /* @__PURE__ */ t(
|
|
290
|
+
ut,
|
|
291
|
+
{
|
|
292
|
+
as: "span",
|
|
293
|
+
content: M,
|
|
294
|
+
className: "inline-flex shrink-0",
|
|
295
|
+
children: E
|
|
296
|
+
}
|
|
297
|
+
) : E;
|
|
283
298
|
}
|
|
284
|
-
function
|
|
299
|
+
function zr({
|
|
285
300
|
variant: e = "page",
|
|
286
301
|
title: r = "Cargando...",
|
|
287
302
|
rows: n = 6,
|
|
288
303
|
children: a
|
|
289
304
|
}) {
|
|
290
|
-
return e === "table" ? /* @__PURE__ */ t(jt, { rows: n }) : e === "sections" ? /* @__PURE__ */ t(
|
|
305
|
+
return e === "table" ? /* @__PURE__ */ t(jt, { rows: n }) : e === "sections" ? /* @__PURE__ */ t(jr, { rows: n }) : e === "cards" ? /* @__PURE__ */ t(_r, { rows: n }) : /* @__PURE__ */ t("div", { className: "flex min-h-[240px] items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-6", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-center gap-3 text-center", children: [
|
|
291
306
|
/* @__PURE__ */ t("div", { className: "h-9 w-9 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--primary)]" }),
|
|
292
307
|
/* @__PURE__ */ i("div", { children: [
|
|
293
308
|
/* @__PURE__ */ t("p", { className: "text-sm font-semibold text-[var(--text-main)]", children: r }),
|
|
@@ -295,7 +310,7 @@ function Pr({
|
|
|
295
310
|
] })
|
|
296
311
|
] }) });
|
|
297
312
|
}
|
|
298
|
-
function
|
|
313
|
+
function jr({ rows: e }) {
|
|
299
314
|
return /* @__PURE__ */ t("div", { className: "space-y-4", children: Array.from({ length: Math.max(2, Math.min(e, 4)) }).map(
|
|
300
315
|
(r, n) => /* @__PURE__ */ i(
|
|
301
316
|
"section",
|
|
@@ -326,7 +341,7 @@ function zr({ rows: e }) {
|
|
|
326
341
|
)
|
|
327
342
|
) });
|
|
328
343
|
}
|
|
329
|
-
function
|
|
344
|
+
function _r({ rows: e }) {
|
|
330
345
|
return /* @__PURE__ */ t("div", { className: "grid gap-3 md:grid-cols-2 xl:grid-cols-3", children: Array.from({ length: e }).map((r, n) => /* @__PURE__ */ i(
|
|
331
346
|
"div",
|
|
332
347
|
{
|
|
@@ -380,7 +395,7 @@ function _t(e) {
|
|
|
380
395
|
function kt(e) {
|
|
381
396
|
return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim();
|
|
382
397
|
}
|
|
383
|
-
function
|
|
398
|
+
function Rr(e) {
|
|
384
399
|
return [
|
|
385
400
|
e.label,
|
|
386
401
|
_t(e.service),
|
|
@@ -388,17 +403,17 @@ function _r(e) {
|
|
|
388
403
|
e.service
|
|
389
404
|
].filter(Boolean).join(" ");
|
|
390
405
|
}
|
|
391
|
-
function
|
|
406
|
+
function Hr(e) {
|
|
392
407
|
return typeof e == "function" ? e : e.default;
|
|
393
408
|
}
|
|
394
|
-
function
|
|
409
|
+
function Wr(e, r) {
|
|
395
410
|
return /* @__PURE__ */ t("div", { className: "flex min-h-[220px] items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-6 text-center", children: /* @__PURE__ */ i("div", { className: "max-w-md", children: [
|
|
396
411
|
/* @__PURE__ */ t("p", { className: "text-sm font-semibold text-[var(--text-main)]", children: "No se pudo cargar este modulo" }),
|
|
397
412
|
/* @__PURE__ */ t("p", { className: "mt-1 text-xs text-[var(--text-muted)]", children: e.message }),
|
|
398
413
|
/* @__PURE__ */ t(xe, { className: "mt-4", height: 36, padding: "0 14px", onClick: r, children: "Reintentar" })
|
|
399
414
|
] }) });
|
|
400
415
|
}
|
|
401
|
-
function
|
|
416
|
+
function Zn({
|
|
402
417
|
parentPanel: e,
|
|
403
418
|
parentPanelComponent: r,
|
|
404
419
|
renderParentPanel: n,
|
|
@@ -416,17 +431,17 @@ function Vn({
|
|
|
416
431
|
subtitle: v,
|
|
417
432
|
emptyState: c,
|
|
418
433
|
loadingState: y,
|
|
419
|
-
errorState:
|
|
420
|
-
renderTabLabel:
|
|
421
|
-
searchableTabs:
|
|
434
|
+
errorState: T = Wr,
|
|
435
|
+
renderTabLabel: j,
|
|
436
|
+
searchableTabs: P = "auto",
|
|
422
437
|
tabsSearchThreshold: C = 6,
|
|
423
|
-
tabsSearchPlaceholder:
|
|
424
|
-
tabsSearchValue:
|
|
438
|
+
tabsSearchPlaceholder: M = "Buscar modulo...",
|
|
439
|
+
tabsSearchValue: B,
|
|
425
440
|
onTabsSearchChange: $,
|
|
426
|
-
emptySearchState:
|
|
427
|
-
showTabCount:
|
|
428
|
-
className:
|
|
429
|
-
parentClassName:
|
|
441
|
+
emptySearchState: _,
|
|
442
|
+
showTabCount: E = !0,
|
|
443
|
+
className: L = "",
|
|
444
|
+
parentClassName: I = "",
|
|
430
445
|
contentClassName: J = "",
|
|
431
446
|
tabsClassName: W = ""
|
|
432
447
|
}) {
|
|
@@ -440,18 +455,18 @@ function Vn({
|
|
|
440
455
|
(x) => !x.disabled
|
|
441
456
|
)) == null ? void 0 : ve.service, [Q, o] = D(
|
|
442
457
|
h ?? V ?? ""
|
|
443
|
-
), [w, U] = D({}), [Y, X] = D({}), [te, ce] = D(""), [ne, Ne] = D(!1), pe = re(Y), he = re(0), de =
|
|
444
|
-
(x) => kt(
|
|
458
|
+
), [w, U] = D({}), [Y, X] = D({}), [te, ce] = D(""), [ne, Ne] = D(!1), pe = re(Y), he = re(0), de = B ?? te, k = kt(de), R = P === !0 || P === "auto" && F.length >= C, q = R && de.trim().length > 0, ae = ze(() => k ? F.filter(
|
|
459
|
+
(x) => kt(Rr(x)).includes(k)
|
|
445
460
|
) : F, [k, F]), oe = d ?? Q, z = F.find((x) => x.service === oe) ?? F.find((x) => !x.disabled);
|
|
446
|
-
|
|
461
|
+
H(() => {
|
|
447
462
|
!z && V && o(V);
|
|
448
|
-
}, [V, z]),
|
|
463
|
+
}, [V, z]), H(() => {
|
|
449
464
|
pe.current = Y;
|
|
450
465
|
}, [Y]);
|
|
451
466
|
const ke = (x) => {
|
|
452
467
|
x.disabled || (d || o(x.service), N == null || N(x.service, x));
|
|
453
468
|
}, Re = (x) => {
|
|
454
|
-
|
|
469
|
+
B === void 0 && ce(x), $ == null || $(x);
|
|
455
470
|
}, Qe = (x, ee) => {
|
|
456
471
|
const Z = ae.filter((le) => !le.disabled), ye = Z.findIndex(
|
|
457
472
|
(le) => le.service === ee.service
|
|
@@ -480,7 +495,7 @@ function Vn({
|
|
|
480
495
|
[x]: { ...le[x], loading: !0, error: void 0 }
|
|
481
496
|
})), Z(z, s).then((le) => {
|
|
482
497
|
if (ye !== he.current && !b) return;
|
|
483
|
-
const De =
|
|
498
|
+
const De = Hr(le);
|
|
484
499
|
X((Ce) => ({
|
|
485
500
|
...Ce,
|
|
486
501
|
[x]: { component: De, loading: !1 }
|
|
@@ -493,7 +508,7 @@ function Vn({
|
|
|
493
508
|
}));
|
|
494
509
|
});
|
|
495
510
|
}, [s, b, p, f, z]);
|
|
496
|
-
|
|
511
|
+
H(me, [me]);
|
|
497
512
|
const He = z ? w[z.service] ?? null : null, ie = z ? Y[z.service] : void 0, We = ie == null ? void 0 : ie.component, Be = (x) => {
|
|
498
513
|
z && U((ee) => ({
|
|
499
514
|
...ee,
|
|
@@ -521,12 +536,12 @@ function Vn({
|
|
|
521
536
|
return /* @__PURE__ */ i(
|
|
522
537
|
"section",
|
|
523
538
|
{
|
|
524
|
-
className: `grid min-h-[520px] gap-4 lg:grid-cols-[minmax(260px,360px)_minmax(0,1fr)] ${
|
|
539
|
+
className: `grid min-h-[520px] gap-4 lg:grid-cols-[minmax(260px,360px)_minmax(0,1fr)] ${L}`,
|
|
525
540
|
children: [
|
|
526
541
|
/* @__PURE__ */ t(
|
|
527
542
|
"aside",
|
|
528
543
|
{
|
|
529
|
-
className: `min-w-0 rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-4 ${
|
|
544
|
+
className: `min-w-0 rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-4 ${I}`,
|
|
530
545
|
children: Se
|
|
531
546
|
}
|
|
532
547
|
),
|
|
@@ -535,29 +550,29 @@ function Vn({
|
|
|
535
550
|
{
|
|
536
551
|
className: `relative min-w-0 overflow-visible rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${J}`,
|
|
537
552
|
children: [
|
|
538
|
-
(m || v ||
|
|
553
|
+
(m || v || R || E) && /* @__PURE__ */ t("div", { className: "relative border-b border-[var(--border)] px-4 py-3", children: /* @__PURE__ */ i("div", { className: "flex min-w-0 items-start justify-between gap-3", children: [
|
|
539
554
|
/* @__PURE__ */ i("div", { className: "min-w-0", children: [
|
|
540
555
|
m && /* @__PURE__ */ t("h2", { className: "truncate text-sm font-semibold text-[var(--text-main)]", children: m }),
|
|
541
556
|
v && /* @__PURE__ */ t("p", { className: "mt-1 line-clamp-2 text-xs text-[var(--text-muted)]", children: v })
|
|
542
557
|
] }),
|
|
543
|
-
(
|
|
544
|
-
|
|
558
|
+
(R || E) && /* @__PURE__ */ i("div", { className: "flex min-w-0 flex-shrink-0 items-center justify-end gap-2", children: [
|
|
559
|
+
E && /* @__PURE__ */ i("span", { className: "hidden text-xs font-semibold text-[var(--text-muted)] transition-opacity duration-200 sm:inline", children: [
|
|
545
560
|
ae.length,
|
|
546
561
|
" / ",
|
|
547
562
|
F.length
|
|
548
563
|
] }),
|
|
549
|
-
|
|
564
|
+
R && /* @__PURE__ */ i(we, { children: [
|
|
550
565
|
/* @__PURE__ */ t(
|
|
551
566
|
"div",
|
|
552
567
|
{
|
|
553
568
|
className: `origin-right overflow-hidden transition-[width,opacity,transform] duration-200 ease-out ${ne ? "w-[min(20rem,44vw)] translate-x-0 opacity-100" : "w-0 translate-x-2 opacity-0"}`,
|
|
554
569
|
"aria-hidden": !ne,
|
|
555
570
|
children: /* @__PURE__ */ t(
|
|
556
|
-
|
|
571
|
+
Or,
|
|
557
572
|
{
|
|
558
573
|
value: de,
|
|
559
574
|
onChange: Re,
|
|
560
|
-
placeholder:
|
|
575
|
+
placeholder: M,
|
|
561
576
|
className: "w-full",
|
|
562
577
|
autoFocus: ne,
|
|
563
578
|
forceExpanded: !0,
|
|
@@ -578,7 +593,7 @@ function Vn({
|
|
|
578
593
|
ne && de && Re(""), Ne((x) => !x);
|
|
579
594
|
},
|
|
580
595
|
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 ${ne || q ? "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)]"}`,
|
|
581
|
-
children: /* @__PURE__ */ t("span", { className: "grid h-4 w-4 place-items-center transition-transform duration-200", children: ne || q ? /* @__PURE__ */ t(
|
|
596
|
+
children: /* @__PURE__ */ t("span", { className: "grid h-4 w-4 place-items-center transition-transform duration-200", children: ne || q ? /* @__PURE__ */ t($e, { className: "h-4 w-4" }) : /* @__PURE__ */ t(Je, { className: "h-4 w-4" }) })
|
|
582
597
|
}
|
|
583
598
|
)
|
|
584
599
|
] })
|
|
@@ -602,7 +617,7 @@ function Vn({
|
|
|
602
617
|
onClick: () => ke(x),
|
|
603
618
|
onKeyDown: (Z) => Qe(Z, x),
|
|
604
619
|
className: `inline-flex h-9 min-w-max items-center gap-2 rounded-md border px-3 text-xs font-semibold transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-50 ${ee ? "border-[var(--primary)] bg-[var(--bg-card)] text-[var(--text-main)] shadow-sm" : "border-transparent text-[var(--text-muted)] hover:bg-[var(--bg-card)] hover:text-[var(--text-main)]"}`,
|
|
605
|
-
children:
|
|
620
|
+
children: j ? j(x, ee) : /* @__PURE__ */ i(we, { children: [
|
|
606
621
|
x.icon,
|
|
607
622
|
/* @__PURE__ */ t("span", { children: x.label ?? _t(x.service) }),
|
|
608
623
|
x.badge && /* @__PURE__ */ t("span", { className: "rounded-full bg-[var(--bg-input)] px-1.5 py-0.5 text-[10px] text-[var(--text-muted)]", children: x.badge })
|
|
@@ -610,14 +625,14 @@ function Vn({
|
|
|
610
625
|
},
|
|
611
626
|
x.service
|
|
612
627
|
);
|
|
613
|
-
}) : /* @__PURE__ */ t("div", { className: "flex min-h-9 flex-1 items-center rounded-md border border-dashed border-[var(--border)] px-3 text-xs text-[var(--text-muted)]", children:
|
|
628
|
+
}) : /* @__PURE__ */ t("div", { className: "flex min-h-9 flex-1 items-center rounded-md border border-dashed border-[var(--border)] px-3 text-xs text-[var(--text-muted)]", children: _ ?? "No hay modulos que coincidan con la busqueda." })
|
|
614
629
|
}
|
|
615
630
|
),
|
|
616
631
|
(z == null ? void 0 : z.description) && /* @__PURE__ */ t("div", { className: "border-b border-[var(--border)] px-4 py-2 text-xs text-[var(--text-muted)]", children: z.description }),
|
|
617
632
|
/* @__PURE__ */ i("div", { className: "min-h-[420px] p-4", children: [
|
|
618
633
|
!z && (c ?? /* @__PURE__ */ t("div", { className: "flex min-h-[220px] items-center justify-center rounded-lg border border-dashed border-[var(--border)] text-sm text-[var(--text-muted)]", children: "No hay modulos disponibles." })),
|
|
619
|
-
z && (ie == null ? void 0 : ie.loading) && (y ?? /* @__PURE__ */ t(
|
|
620
|
-
z && (ie == null ? void 0 : ie.error) &&
|
|
634
|
+
z && (ie == null ? void 0 : ie.loading) && (y ?? /* @__PURE__ */ t(zr, { title: "Cargando modulo..." })),
|
|
635
|
+
z && (ie == null ? void 0 : ie.error) && T(ie.error, me),
|
|
621
636
|
z && We && !(ie != null && ie.loading) && !(ie != null && ie.error) && /* @__PURE__ */ t(
|
|
622
637
|
We,
|
|
623
638
|
{
|
|
@@ -650,7 +665,7 @@ const Rt = [
|
|
|
650
665
|
"Octubre",
|
|
651
666
|
"Noviembre",
|
|
652
667
|
"Diciembre"
|
|
653
|
-
],
|
|
668
|
+
], Fr = [
|
|
654
669
|
"Ene",
|
|
655
670
|
"Feb",
|
|
656
671
|
"Mar",
|
|
@@ -663,11 +678,11 @@ const Rt = [
|
|
|
663
678
|
"Oct",
|
|
664
679
|
"Nov",
|
|
665
680
|
"Dic"
|
|
666
|
-
],
|
|
681
|
+
], Ur = ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sá"], nt = 6;
|
|
667
682
|
function dt(e, r, n) {
|
|
668
683
|
return `${e}-${String(r).padStart(2, "0")}-${String(n).padStart(2, "0")}`;
|
|
669
684
|
}
|
|
670
|
-
function
|
|
685
|
+
function Yr() {
|
|
671
686
|
const e = /* @__PURE__ */ new Date();
|
|
672
687
|
return dt(e.getFullYear(), e.getMonth() + 1, e.getDate());
|
|
673
688
|
}
|
|
@@ -675,29 +690,29 @@ function Ht(e) {
|
|
|
675
690
|
const [r, n, a] = e.split("-").map(Number);
|
|
676
691
|
return { year: r, month: n, day: a };
|
|
677
692
|
}
|
|
678
|
-
function
|
|
693
|
+
function qr(e) {
|
|
679
694
|
if (!e) return "Seleccionar fecha";
|
|
680
695
|
const { year: r, month: n, day: a } = Ht(e);
|
|
681
696
|
return !r || !n || !a ? "Seleccionar fecha" : `${String(a).padStart(2, "0")} ${Rt[n - 1]} ${r}`;
|
|
682
697
|
}
|
|
683
|
-
function
|
|
698
|
+
function Jn({
|
|
684
699
|
value: e,
|
|
685
700
|
onChange: r,
|
|
686
701
|
minDate: n,
|
|
687
702
|
displayMode: a = "inline"
|
|
688
703
|
}) {
|
|
689
|
-
const s =
|
|
704
|
+
const s = Yr(), f = Ht(e || s), p = a === "popover", [d, h] = D(!1), N = re(null), [S, b] = D({
|
|
690
705
|
horizontal: "left",
|
|
691
706
|
vertical: "bottom"
|
|
692
|
-
}), [m, v] = D(f.year), [c, y] = D(f.month), [
|
|
693
|
-
|
|
707
|
+
}), [m, v] = D(f.year), [c, y] = D(f.month), [T, j] = D("days"), P = 16, [C, M] = D(0), B = m - 7 + C, $ = Array.from({ length: P }, (o, w) => B + w);
|
|
708
|
+
H(() => {
|
|
694
709
|
if (!p || !d || !N.current) return;
|
|
695
710
|
const o = N.current.getBoundingClientRect(), w = 8, U = 280, Y = 340, X = o.left + U > window.innerWidth - w, te = o.right - U >= w, ce = o.bottom + 8 + Y > window.innerHeight - w, ne = o.top - 8 - Y >= w;
|
|
696
711
|
b({
|
|
697
712
|
horizontal: X && te ? "right" : "left",
|
|
698
713
|
vertical: ce && ne ? "top" : "bottom"
|
|
699
714
|
});
|
|
700
|
-
}, [p, d]),
|
|
715
|
+
}, [p, d]), H(() => {
|
|
701
716
|
if (!p || !d) return;
|
|
702
717
|
function o(U) {
|
|
703
718
|
N.current && (N.current.contains(U.target) || h(!1));
|
|
@@ -709,15 +724,15 @@ function Zn({
|
|
|
709
724
|
document.removeEventListener("mousedown", o), document.removeEventListener("keydown", w);
|
|
710
725
|
};
|
|
711
726
|
}, [p, d]);
|
|
712
|
-
function
|
|
727
|
+
function _() {
|
|
713
728
|
c === 1 ? (v((o) => o - 1), y(12)) : y((o) => o - 1);
|
|
714
729
|
}
|
|
715
|
-
function
|
|
730
|
+
function E() {
|
|
716
731
|
c === 12 ? (v((o) => o + 1), y(1)) : y((o) => o + 1);
|
|
717
732
|
}
|
|
718
|
-
const
|
|
719
|
-
...Array(
|
|
720
|
-
...Array.from({ length:
|
|
733
|
+
const L = new Date(m, c - 1, 1).getDay(), I = new Date(m, c, 0).getDate(), J = [
|
|
734
|
+
...Array(L).fill(null),
|
|
735
|
+
...Array.from({ length: I }, (o, w) => w + 1)
|
|
721
736
|
];
|
|
722
737
|
for (; J.length < nt * 7; ) J.push(null);
|
|
723
738
|
const W = J.slice(0, nt * 7);
|
|
@@ -756,12 +771,12 @@ function Zn({
|
|
|
756
771
|
padding: "10px 12px",
|
|
757
772
|
borderBottom: "1px solid var(--border)"
|
|
758
773
|
},
|
|
759
|
-
children:
|
|
774
|
+
children: T === "days" ? /* @__PURE__ */ i(we, { children: [
|
|
760
775
|
/* @__PURE__ */ t(
|
|
761
776
|
"button",
|
|
762
777
|
{
|
|
763
778
|
type: "button",
|
|
764
|
-
onClick:
|
|
779
|
+
onClick: _,
|
|
765
780
|
style: V,
|
|
766
781
|
title: "Mes anterior",
|
|
767
782
|
children: /* @__PURE__ */ t(je, { size: 16 })
|
|
@@ -772,7 +787,7 @@ function Zn({
|
|
|
772
787
|
{
|
|
773
788
|
type: "button",
|
|
774
789
|
onClick: () => {
|
|
775
|
-
|
|
790
|
+
j("years"), M(0);
|
|
776
791
|
},
|
|
777
792
|
style: {
|
|
778
793
|
background: "none",
|
|
@@ -799,7 +814,7 @@ function Zn({
|
|
|
799
814
|
"button",
|
|
800
815
|
{
|
|
801
816
|
type: "button",
|
|
802
|
-
onClick:
|
|
817
|
+
onClick: E,
|
|
803
818
|
style: V,
|
|
804
819
|
title: "Mes siguiente",
|
|
805
820
|
children: /* @__PURE__ */ t(Te, { size: 16 })
|
|
@@ -810,7 +825,7 @@ function Zn({
|
|
|
810
825
|
"button",
|
|
811
826
|
{
|
|
812
827
|
type: "button",
|
|
813
|
-
onClick: () =>
|
|
828
|
+
onClick: () => M((o) => o - P),
|
|
814
829
|
style: V,
|
|
815
830
|
children: /* @__PURE__ */ t(je, { size: 16 })
|
|
816
831
|
}
|
|
@@ -819,7 +834,7 @@ function Zn({
|
|
|
819
834
|
"button",
|
|
820
835
|
{
|
|
821
836
|
type: "button",
|
|
822
|
-
onClick: () =>
|
|
837
|
+
onClick: () => j("days"),
|
|
823
838
|
style: {
|
|
824
839
|
background: "none",
|
|
825
840
|
border: "none",
|
|
@@ -841,7 +856,7 @@ function Zn({
|
|
|
841
856
|
"button",
|
|
842
857
|
{
|
|
843
858
|
type: "button",
|
|
844
|
-
onClick: () =>
|
|
859
|
+
onClick: () => M((o) => o + P),
|
|
845
860
|
style: V,
|
|
846
861
|
children: /* @__PURE__ */ t(Te, { size: 16 })
|
|
847
862
|
}
|
|
@@ -849,7 +864,7 @@ function Zn({
|
|
|
849
864
|
] })
|
|
850
865
|
}
|
|
851
866
|
),
|
|
852
|
-
|
|
867
|
+
T === "years" && /* @__PURE__ */ i("div", { style: { padding: "8px 10px 10px" }, children: [
|
|
853
868
|
/* @__PURE__ */ t(
|
|
854
869
|
"div",
|
|
855
870
|
{
|
|
@@ -859,7 +874,7 @@ function Zn({
|
|
|
859
874
|
gap: 3,
|
|
860
875
|
marginBottom: 8
|
|
861
876
|
},
|
|
862
|
-
children:
|
|
877
|
+
children: Fr.map((o, w) => {
|
|
863
878
|
const U = w + 1 === c;
|
|
864
879
|
return /* @__PURE__ */ t(
|
|
865
880
|
"button",
|
|
@@ -904,7 +919,7 @@ function Zn({
|
|
|
904
919
|
{
|
|
905
920
|
type: "button",
|
|
906
921
|
onClick: () => {
|
|
907
|
-
v(o),
|
|
922
|
+
v(o), j("days");
|
|
908
923
|
},
|
|
909
924
|
style: {
|
|
910
925
|
border: "none",
|
|
@@ -926,7 +941,7 @@ function Zn({
|
|
|
926
941
|
}
|
|
927
942
|
)
|
|
928
943
|
] }),
|
|
929
|
-
|
|
944
|
+
T === "days" && /* @__PURE__ */ i(we, { children: [
|
|
930
945
|
/* @__PURE__ */ t(
|
|
931
946
|
"div",
|
|
932
947
|
{
|
|
@@ -935,7 +950,7 @@ function Zn({
|
|
|
935
950
|
gridTemplateColumns: "repeat(7,1fr)",
|
|
936
951
|
padding: "6px 8px 0"
|
|
937
952
|
},
|
|
938
|
-
children:
|
|
953
|
+
children: Ur.map((o) => /* @__PURE__ */ t(
|
|
939
954
|
"div",
|
|
940
955
|
{
|
|
941
956
|
style: {
|
|
@@ -1012,7 +1027,7 @@ function Zn({
|
|
|
1012
1027
|
children: [
|
|
1013
1028
|
/* @__PURE__ */ i("span", { className: "inline-flex items-center gap-2 min-w-0", children: [
|
|
1014
1029
|
/* @__PURE__ */ t(lt, { className: "w-4 h-4 text-[var(--text-muted)]" }),
|
|
1015
|
-
/* @__PURE__ */ t("span", { className: "truncate", children:
|
|
1030
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: qr(e) })
|
|
1016
1031
|
] }),
|
|
1017
1032
|
/* @__PURE__ */ t(
|
|
1018
1033
|
_e,
|
|
@@ -1054,16 +1069,16 @@ function Wt({
|
|
|
1054
1069
|
searchable: N = !0,
|
|
1055
1070
|
minOptionsForSearch: S = 6
|
|
1056
1071
|
}) {
|
|
1057
|
-
const [b, m] = D(!1), [v, c] = D(""), [y,
|
|
1072
|
+
const [b, m] = D(!1), [v, c] = D(""), [y, T] = D(-1), [j, P] = D(!1), [C, M] = D({}), B = re(null), $ = re(null), _ = re(null), E = re(null), L = N && n.length >= S, I = n.find((o) => o.value === e) ?? null, J = L && v.trim() ? n.filter(
|
|
1058
1073
|
(o) => {
|
|
1059
1074
|
var w;
|
|
1060
1075
|
return o.label.toLowerCase().includes(v.toLowerCase()) || ((w = o.sublabel) == null ? void 0 : w.toLowerCase().includes(v.toLowerCase()));
|
|
1061
1076
|
}
|
|
1062
1077
|
) : n, W = st(() => {
|
|
1063
|
-
const o =
|
|
1078
|
+
const o = B.current;
|
|
1064
1079
|
if (!o) return;
|
|
1065
|
-
const w = o.getBoundingClientRect(), U =
|
|
1066
|
-
|
|
1080
|
+
const w = o.getBoundingClientRect(), U = L ? 272 : 212, Y = window.innerHeight - w.bottom, X = Y < U && w.top > Y;
|
|
1081
|
+
M({
|
|
1067
1082
|
position: "fixed",
|
|
1068
1083
|
left: w.left,
|
|
1069
1084
|
top: X ? void 0 : w.bottom + 4,
|
|
@@ -1071,28 +1086,28 @@ function Wt({
|
|
|
1071
1086
|
width: w.width,
|
|
1072
1087
|
zIndex: 9999
|
|
1073
1088
|
});
|
|
1074
|
-
}, [
|
|
1075
|
-
|
|
1089
|
+
}, [L]);
|
|
1090
|
+
H(() => P(!0), []), H(() => {
|
|
1076
1091
|
if (!b) return;
|
|
1077
1092
|
function o(w) {
|
|
1078
1093
|
var Y, X;
|
|
1079
1094
|
const U = w.target;
|
|
1080
|
-
!((Y =
|
|
1095
|
+
!((Y = B.current) != null && Y.contains(U)) && !((X = $.current) != null && X.contains(U)) && (m(!1), c(""));
|
|
1081
1096
|
}
|
|
1082
1097
|
return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
|
|
1083
|
-
}, [b]),
|
|
1084
|
-
b && (
|
|
1098
|
+
}, [b]), H(() => {
|
|
1099
|
+
b && (T(-1), W(), L && setTimeout(() => {
|
|
1085
1100
|
var o;
|
|
1086
|
-
return (o =
|
|
1101
|
+
return (o = _.current) == null ? void 0 : o.focus();
|
|
1087
1102
|
}, 0));
|
|
1088
|
-
}, [b,
|
|
1103
|
+
}, [b, L, W]), H(() => {
|
|
1089
1104
|
if (b)
|
|
1090
1105
|
return window.addEventListener("resize", W), window.addEventListener("scroll", W, !0), () => {
|
|
1091
1106
|
window.removeEventListener("resize", W), window.removeEventListener("scroll", W, !0);
|
|
1092
1107
|
};
|
|
1093
|
-
}, [b, W]),
|
|
1094
|
-
if (y < 0 || !
|
|
1095
|
-
const o =
|
|
1108
|
+
}, [b, W]), H(() => {
|
|
1109
|
+
if (y < 0 || !E.current) return;
|
|
1110
|
+
const o = E.current.children[y];
|
|
1096
1111
|
o == null || o.scrollIntoView({ block: "nearest" });
|
|
1097
1112
|
}, [y]);
|
|
1098
1113
|
const F = st(
|
|
@@ -1106,7 +1121,7 @@ function Wt({
|
|
|
1106
1121
|
(o.key === "Enter" || o.key === " " || o.key === "ArrowDown") && (o.preventDefault(), m(!0));
|
|
1107
1122
|
return;
|
|
1108
1123
|
}
|
|
1109
|
-
o.key === "Escape" ? (o.preventDefault(), m(!1), c("")) : o.key === "ArrowDown" ? (o.preventDefault(),
|
|
1124
|
+
o.key === "Escape" ? (o.preventDefault(), m(!1), c("")) : o.key === "ArrowDown" ? (o.preventDefault(), T((w) => Math.min(w + 1, J.length - 1))) : o.key === "ArrowUp" ? (o.preventDefault(), T((w) => Math.max(w - 1, s ? -1 : 0))) : o.key === "Enter" && (o.preventDefault(), y === -1 && s ? F("") : J[y] && F(J[y].value));
|
|
1110
1125
|
}
|
|
1111
1126
|
const Q = /* @__PURE__ */ i(
|
|
1112
1127
|
"div",
|
|
@@ -1119,7 +1134,7 @@ function Wt({
|
|
|
1119
1134
|
border: "1px solid var(--border)"
|
|
1120
1135
|
},
|
|
1121
1136
|
children: [
|
|
1122
|
-
|
|
1137
|
+
L && /* @__PURE__ */ i(
|
|
1123
1138
|
"div",
|
|
1124
1139
|
{
|
|
1125
1140
|
className: "flex items-center gap-2 px-3 py-2",
|
|
@@ -1135,10 +1150,10 @@ function Wt({
|
|
|
1135
1150
|
/* @__PURE__ */ t(
|
|
1136
1151
|
"input",
|
|
1137
1152
|
{
|
|
1138
|
-
ref:
|
|
1153
|
+
ref: _,
|
|
1139
1154
|
value: v,
|
|
1140
1155
|
onChange: (o) => {
|
|
1141
|
-
c(o.target.value),
|
|
1156
|
+
c(o.target.value), T(-1);
|
|
1142
1157
|
},
|
|
1143
1158
|
placeholder: "Buscar…",
|
|
1144
1159
|
className: "min-w-0 flex-1 text-sm bg-transparent outline-none",
|
|
@@ -1153,7 +1168,7 @@ function Wt({
|
|
|
1153
1168
|
o.preventDefault(), c("");
|
|
1154
1169
|
},
|
|
1155
1170
|
children: /* @__PURE__ */ t(
|
|
1156
|
-
|
|
1171
|
+
$e,
|
|
1157
1172
|
{
|
|
1158
1173
|
className: "w-3.5 h-3.5",
|
|
1159
1174
|
style: { color: "var(--text-muted)" }
|
|
@@ -1167,11 +1182,11 @@ function Wt({
|
|
|
1167
1182
|
/* @__PURE__ */ i(
|
|
1168
1183
|
"ul",
|
|
1169
1184
|
{
|
|
1170
|
-
ref:
|
|
1185
|
+
ref: E,
|
|
1171
1186
|
role: "listbox",
|
|
1172
1187
|
className: "overflow-y-auto",
|
|
1173
1188
|
style: {
|
|
1174
|
-
maxHeight:
|
|
1189
|
+
maxHeight: L ? 220 : 180,
|
|
1175
1190
|
scrollbarWidth: "thin",
|
|
1176
1191
|
scrollbarColor: "var(--border) transparent",
|
|
1177
1192
|
overscrollBehavior: "contain"
|
|
@@ -1185,7 +1200,7 @@ function Wt({
|
|
|
1185
1200
|
onMouseDown: (o) => {
|
|
1186
1201
|
o.preventDefault(), F("");
|
|
1187
1202
|
},
|
|
1188
|
-
onMouseEnter: () =>
|
|
1203
|
+
onMouseEnter: () => T(-1),
|
|
1189
1204
|
className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
|
|
1190
1205
|
style: {
|
|
1191
1206
|
background: y === -1 ? "var(--bg-hover)" : "transparent",
|
|
@@ -1205,7 +1220,7 @@ function Wt({
|
|
|
1205
1220
|
onMouseDown: (te) => {
|
|
1206
1221
|
te.preventDefault(), o.disabled || F(o.value);
|
|
1207
1222
|
},
|
|
1208
|
-
onMouseEnter: () => !o.disabled &&
|
|
1223
|
+
onMouseEnter: () => !o.disabled && T(w),
|
|
1209
1224
|
className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
|
|
1210
1225
|
style: {
|
|
1211
1226
|
background: Y ? "var(--bg-hover)" : X ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
|
|
@@ -1262,7 +1277,7 @@ function Wt({
|
|
|
1262
1277
|
return /* @__PURE__ */ i(
|
|
1263
1278
|
"div",
|
|
1264
1279
|
{
|
|
1265
|
-
ref:
|
|
1280
|
+
ref: B,
|
|
1266
1281
|
className: `relative ${f || "w-full"}`,
|
|
1267
1282
|
style: p,
|
|
1268
1283
|
onKeyDown: V,
|
|
@@ -1278,7 +1293,7 @@ function Wt({
|
|
|
1278
1293
|
height: St(d),
|
|
1279
1294
|
padding: St(h),
|
|
1280
1295
|
background: "var(--bg-input)",
|
|
1281
|
-
color:
|
|
1296
|
+
color: I ? "var(--text-main)" : "var(--text-muted)",
|
|
1282
1297
|
border: b ? "1px solid var(--primary)" : "1px solid var(--border)",
|
|
1283
1298
|
opacity: u ? 0.5 : 1,
|
|
1284
1299
|
cursor: u ? "not-allowed" : "pointer"
|
|
@@ -1286,25 +1301,25 @@ function Wt({
|
|
|
1286
1301
|
"aria-haspopup": "listbox",
|
|
1287
1302
|
"aria-expanded": b,
|
|
1288
1303
|
children: [
|
|
1289
|
-
(
|
|
1304
|
+
(I == null ? void 0 : I.color) && /* @__PURE__ */ t(
|
|
1290
1305
|
"span",
|
|
1291
1306
|
{
|
|
1292
1307
|
className: "flex-shrink-0 w-2.5 h-2.5 rounded-full",
|
|
1293
|
-
style: { background:
|
|
1308
|
+
style: { background: I.color }
|
|
1294
1309
|
}
|
|
1295
1310
|
),
|
|
1296
|
-
/* @__PURE__ */ t("span", { className: "min-w-0 flex flex-1 items-baseline gap-1 overflow-hidden", children:
|
|
1297
|
-
/* @__PURE__ */ t("span", { className: "truncate", children:
|
|
1298
|
-
|
|
1311
|
+
/* @__PURE__ */ t("span", { className: "min-w-0 flex flex-1 items-baseline gap-1 overflow-hidden", children: I ? /* @__PURE__ */ i(we, { children: [
|
|
1312
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: I.label }),
|
|
1313
|
+
I.sublabel && /* @__PURE__ */ t(
|
|
1299
1314
|
"span",
|
|
1300
1315
|
{
|
|
1301
1316
|
className: "min-w-0 flex-shrink truncate",
|
|
1302
1317
|
style: { color: "var(--text-muted)", fontSize: 12 },
|
|
1303
|
-
children:
|
|
1318
|
+
children: I.sublabel
|
|
1304
1319
|
}
|
|
1305
1320
|
)
|
|
1306
1321
|
] }) : /* @__PURE__ */ t("span", { className: "truncate", children: a }) }),
|
|
1307
|
-
|
|
1322
|
+
I && s ? /* @__PURE__ */ t(
|
|
1308
1323
|
"span",
|
|
1309
1324
|
{
|
|
1310
1325
|
role: "button",
|
|
@@ -1314,7 +1329,7 @@ function Wt({
|
|
|
1314
1329
|
},
|
|
1315
1330
|
className: "flex-shrink-0 rounded-full p-0.5 transition-colors hover:bg-black/10",
|
|
1316
1331
|
style: { color: "var(--text-muted)" },
|
|
1317
|
-
children: /* @__PURE__ */ t(
|
|
1332
|
+
children: /* @__PURE__ */ t($e, { className: "w-3 h-3" })
|
|
1318
1333
|
}
|
|
1319
1334
|
) : /* @__PURE__ */ t(
|
|
1320
1335
|
_e,
|
|
@@ -1329,7 +1344,7 @@ function Wt({
|
|
|
1329
1344
|
]
|
|
1330
1345
|
}
|
|
1331
1346
|
),
|
|
1332
|
-
b &&
|
|
1347
|
+
b && j && Ke(Q, document.body)
|
|
1333
1348
|
]
|
|
1334
1349
|
}
|
|
1335
1350
|
);
|
|
@@ -1338,7 +1353,7 @@ function Ge(e) {
|
|
|
1338
1353
|
if (e !== void 0)
|
|
1339
1354
|
return typeof e == "number" ? `${e}px` : e;
|
|
1340
1355
|
}
|
|
1341
|
-
function
|
|
1356
|
+
function Kn({
|
|
1342
1357
|
value: e,
|
|
1343
1358
|
onChange: r,
|
|
1344
1359
|
placeholder: n = "Buscar...",
|
|
@@ -1368,7 +1383,7 @@ function Jn({
|
|
|
1368
1383
|
)
|
|
1369
1384
|
] });
|
|
1370
1385
|
}
|
|
1371
|
-
function
|
|
1386
|
+
function Qn({
|
|
1372
1387
|
value: e,
|
|
1373
1388
|
onChange: r,
|
|
1374
1389
|
options: n,
|
|
@@ -1408,7 +1423,7 @@ function Kn({
|
|
|
1408
1423
|
)
|
|
1409
1424
|
] });
|
|
1410
1425
|
}
|
|
1411
|
-
const
|
|
1426
|
+
const Gr = {
|
|
1412
1427
|
sm: "24rem",
|
|
1413
1428
|
md: "28rem",
|
|
1414
1429
|
lg: "32rem",
|
|
@@ -1417,7 +1432,7 @@ const qr = {
|
|
|
1417
1432
|
"4xl": "56rem",
|
|
1418
1433
|
"5xl": "64rem"
|
|
1419
1434
|
}, qe = 180;
|
|
1420
|
-
function
|
|
1435
|
+
function Xr({
|
|
1421
1436
|
open: e,
|
|
1422
1437
|
onClose: r,
|
|
1423
1438
|
title: n,
|
|
@@ -1435,44 +1450,44 @@ function Gr({
|
|
|
1435
1450
|
placement: v = "center",
|
|
1436
1451
|
bodyClassName: c = "px-6 py-5",
|
|
1437
1452
|
panelClassName: y = "",
|
|
1438
|
-
backdropClassName:
|
|
1439
|
-
contentClassName:
|
|
1440
|
-
ariaLabel:
|
|
1453
|
+
backdropClassName: T = "bg-black/50 backdrop-blur-sm",
|
|
1454
|
+
contentClassName: j = "p-4",
|
|
1455
|
+
ariaLabel: P,
|
|
1441
1456
|
frameless: C = !1
|
|
1442
1457
|
}) {
|
|
1443
|
-
const [
|
|
1444
|
-
if (
|
|
1445
|
-
() =>
|
|
1458
|
+
const [M, B] = D(!1), [$, _] = D(!1), E = re(null);
|
|
1459
|
+
if (H(() => (e ? (E.current && clearTimeout(E.current), B(!0), requestAnimationFrame(() => requestAnimationFrame(() => _(!0)))) : (_(!1), E.current = setTimeout(
|
|
1460
|
+
() => B(!1),
|
|
1446
1461
|
qe + 40
|
|
1447
1462
|
)), () => {
|
|
1448
|
-
|
|
1449
|
-
}), [e]),
|
|
1463
|
+
E.current && clearTimeout(E.current);
|
|
1464
|
+
}), [e]), H(() => {
|
|
1450
1465
|
if (e)
|
|
1451
1466
|
return document.body.style.overflow = "hidden", () => {
|
|
1452
1467
|
document.body.style.overflow = "";
|
|
1453
1468
|
};
|
|
1454
|
-
}, [e]),
|
|
1469
|
+
}, [e]), H(() => {
|
|
1455
1470
|
if (!e || !b) return;
|
|
1456
1471
|
const V = (Q) => {
|
|
1457
1472
|
Q.key === "Escape" && r();
|
|
1458
1473
|
};
|
|
1459
1474
|
return window.addEventListener("keydown", V), () => window.removeEventListener("keydown", V);
|
|
1460
|
-
}, [b, r, e]), !
|
|
1461
|
-
const
|
|
1475
|
+
}, [b, r, e]), !M) return null;
|
|
1476
|
+
const L = n || a || s || u || m, I = h ?? Gr[d], J = v === "bottom-mobile" ? "items-end sm:items-center justify-center p-0 sm:p-4" : "items-center justify-center", W = v === "bottom-mobile" ? "rounded-t-2xl sm:rounded-2xl" : "rounded-2xl", F = $ ? "translateY(0) scale(1)" : v === "bottom-mobile" ? "translateY(16px) scale(0.98)" : "translateY(10px) scale(0.96)";
|
|
1462
1477
|
return Ke(
|
|
1463
1478
|
/* @__PURE__ */ i(
|
|
1464
1479
|
"div",
|
|
1465
1480
|
{
|
|
1466
1481
|
role: "dialog",
|
|
1467
1482
|
"aria-modal": "true",
|
|
1468
|
-
"aria-label":
|
|
1469
|
-
className: `fixed inset-0 flex ${J} ${
|
|
1483
|
+
"aria-label": P ?? n,
|
|
1484
|
+
className: `fixed inset-0 flex ${J} ${j}`,
|
|
1470
1485
|
style: { zIndex: N },
|
|
1471
1486
|
children: [
|
|
1472
1487
|
/* @__PURE__ */ t(
|
|
1473
1488
|
"div",
|
|
1474
1489
|
{
|
|
1475
|
-
className: `absolute inset-0 ${
|
|
1490
|
+
className: `absolute inset-0 ${T}`,
|
|
1476
1491
|
onClick: S ? r : void 0,
|
|
1477
1492
|
style: {
|
|
1478
1493
|
opacity: $ ? 1 : 0,
|
|
@@ -1485,7 +1500,7 @@ function Gr({
|
|
|
1485
1500
|
{
|
|
1486
1501
|
className: `relative z-10 flex max-h-[92dvh] w-full flex-col overflow-hidden ${C ? "shadow-none" : "shadow-2xl"} ${W} ${y}`,
|
|
1487
1502
|
style: {
|
|
1488
|
-
maxWidth:
|
|
1503
|
+
maxWidth: I,
|
|
1489
1504
|
background: C ? "transparent" : "var(--bg-card)",
|
|
1490
1505
|
border: C ? "none" : "1px solid var(--border)",
|
|
1491
1506
|
opacity: $ ? 1 : 0,
|
|
@@ -1494,7 +1509,7 @@ function Gr({
|
|
|
1494
1509
|
},
|
|
1495
1510
|
onClick: (V) => V.stopPropagation(),
|
|
1496
1511
|
children: [
|
|
1497
|
-
|
|
1512
|
+
L && /* @__PURE__ */ i(
|
|
1498
1513
|
"div",
|
|
1499
1514
|
{
|
|
1500
1515
|
className: "flex flex-shrink-0 items-center justify-between gap-3 px-6 py-4",
|
|
@@ -1523,7 +1538,7 @@ function Gr({
|
|
|
1523
1538
|
] }),
|
|
1524
1539
|
/* @__PURE__ */ i("div", { className: "flex flex-shrink-0 items-center gap-2", children: [
|
|
1525
1540
|
u,
|
|
1526
|
-
m && /* @__PURE__ */ t(xe, { variant: "icon", onClick: r, title: "Cerrar", children: /* @__PURE__ */ t(
|
|
1541
|
+
m && /* @__PURE__ */ t(xe, { variant: "icon", onClick: r, title: "Cerrar", children: /* @__PURE__ */ t($e, { className: "h-5 w-5" }) })
|
|
1527
1542
|
] })
|
|
1528
1543
|
]
|
|
1529
1544
|
}
|
|
@@ -1546,7 +1561,7 @@ function Gr({
|
|
|
1546
1561
|
document.body
|
|
1547
1562
|
);
|
|
1548
1563
|
}
|
|
1549
|
-
const
|
|
1564
|
+
const Vr = {
|
|
1550
1565
|
danger: {
|
|
1551
1566
|
iconBg: "rgba(239,68,68,0.12)",
|
|
1552
1567
|
iconColor: "var(--danger)",
|
|
@@ -1566,7 +1581,7 @@ const Xr = {
|
|
|
1566
1581
|
btnColor: "#fff"
|
|
1567
1582
|
}
|
|
1568
1583
|
};
|
|
1569
|
-
function
|
|
1584
|
+
function ea({
|
|
1570
1585
|
open: e,
|
|
1571
1586
|
title: r,
|
|
1572
1587
|
description: n,
|
|
@@ -1576,9 +1591,9 @@ function Qn({
|
|
|
1576
1591
|
onConfirm: f,
|
|
1577
1592
|
onCancel: p
|
|
1578
1593
|
}) {
|
|
1579
|
-
const d =
|
|
1594
|
+
const d = Vr[u];
|
|
1580
1595
|
return /* @__PURE__ */ i(
|
|
1581
|
-
|
|
1596
|
+
Xr,
|
|
1582
1597
|
{
|
|
1583
1598
|
open: e,
|
|
1584
1599
|
onClose: p,
|
|
@@ -1597,7 +1612,7 @@ function Qn({
|
|
|
1597
1612
|
className: "absolute right-3 top-3 h-7 w-7 hover:opacity-70",
|
|
1598
1613
|
style: { color: "var(--text-muted)" },
|
|
1599
1614
|
"aria-label": "Cancelar",
|
|
1600
|
-
children: /* @__PURE__ */ t(
|
|
1615
|
+
children: /* @__PURE__ */ t($e, { className: "h-4 w-4" })
|
|
1601
1616
|
}
|
|
1602
1617
|
),
|
|
1603
1618
|
/* @__PURE__ */ t(
|
|
@@ -1659,7 +1674,7 @@ function Ft(e) {
|
|
|
1659
1674
|
const r = document.createElement("textarea");
|
|
1660
1675
|
r.value = e, r.style.position = "fixed", r.style.opacity = "0", r.style.pointerEvents = "none", document.body.appendChild(r), r.select(), document.execCommand("copy"), document.body.removeChild(r);
|
|
1661
1676
|
}
|
|
1662
|
-
async function
|
|
1677
|
+
async function Zr(e) {
|
|
1663
1678
|
var r;
|
|
1664
1679
|
if ((r = navigator.clipboard) != null && r.writeText) {
|
|
1665
1680
|
await navigator.clipboard.writeText(e);
|
|
@@ -1667,10 +1682,10 @@ async function Vr(e) {
|
|
|
1667
1682
|
}
|
|
1668
1683
|
Ft(e);
|
|
1669
1684
|
}
|
|
1670
|
-
function
|
|
1685
|
+
function Jr(e) {
|
|
1671
1686
|
return typeof e == "function" ? e() : e;
|
|
1672
1687
|
}
|
|
1673
|
-
function
|
|
1688
|
+
function Kr({
|
|
1674
1689
|
value: e,
|
|
1675
1690
|
resetDelay: r = 2e3,
|
|
1676
1691
|
title: n,
|
|
@@ -1688,30 +1703,30 @@ function Jr({
|
|
|
1688
1703
|
type: v = "button",
|
|
1689
1704
|
...c
|
|
1690
1705
|
}) {
|
|
1691
|
-
const [y,
|
|
1692
|
-
|
|
1693
|
-
|
|
1706
|
+
const [y, T] = D(!1), j = re(null);
|
|
1707
|
+
H(() => () => {
|
|
1708
|
+
j.current && window.clearTimeout(j.current);
|
|
1694
1709
|
}, []);
|
|
1695
|
-
function
|
|
1696
|
-
|
|
1697
|
-
|
|
1710
|
+
function P(M) {
|
|
1711
|
+
T(!0), d == null || d(M), j.current && window.clearTimeout(j.current), j.current = window.setTimeout(() => {
|
|
1712
|
+
T(!1), j.current = null;
|
|
1698
1713
|
}, r);
|
|
1699
1714
|
}
|
|
1700
|
-
async function C(
|
|
1715
|
+
async function C(M) {
|
|
1701
1716
|
var $;
|
|
1702
|
-
if (p &&
|
|
1703
|
-
const
|
|
1704
|
-
if (
|
|
1717
|
+
if (p && M.stopPropagation(), m == null || m(M), M.defaultPrevented) return;
|
|
1718
|
+
const B = Jr(e);
|
|
1719
|
+
if (B)
|
|
1705
1720
|
try {
|
|
1706
|
-
await
|
|
1707
|
-
} catch (
|
|
1721
|
+
await Zr(B), P(B);
|
|
1722
|
+
} catch (_) {
|
|
1708
1723
|
try {
|
|
1709
|
-
Ft(
|
|
1710
|
-
} catch (
|
|
1711
|
-
h == null || h(
|
|
1724
|
+
Ft(B), P(B);
|
|
1725
|
+
} catch (E) {
|
|
1726
|
+
h == null || h(E, B);
|
|
1712
1727
|
return;
|
|
1713
1728
|
}
|
|
1714
|
-
($ = navigator.clipboard) != null && $.writeText || h == null || h(
|
|
1729
|
+
($ = navigator.clipboard) != null && $.writeText || h == null || h(_, B);
|
|
1715
1730
|
}
|
|
1716
1731
|
}
|
|
1717
1732
|
return /* @__PURE__ */ i(
|
|
@@ -1746,11 +1761,11 @@ function Jr({
|
|
|
1746
1761
|
}
|
|
1747
1762
|
);
|
|
1748
1763
|
}
|
|
1749
|
-
function
|
|
1764
|
+
function Qr(e, r) {
|
|
1750
1765
|
const n = typeof e == "function" ? e() : e;
|
|
1751
1766
|
return r ? r(n) : n;
|
|
1752
1767
|
}
|
|
1753
|
-
function
|
|
1768
|
+
function ta({
|
|
1754
1769
|
url: e,
|
|
1755
1770
|
resolveUrl: r,
|
|
1756
1771
|
title: n = "Copiar link",
|
|
@@ -1759,27 +1774,27 @@ function ea({
|
|
|
1759
1774
|
...u
|
|
1760
1775
|
}) {
|
|
1761
1776
|
return /* @__PURE__ */ t(
|
|
1762
|
-
|
|
1777
|
+
Kr,
|
|
1763
1778
|
{
|
|
1764
1779
|
...u,
|
|
1765
|
-
value: () =>
|
|
1780
|
+
value: () => Qr(e, r),
|
|
1766
1781
|
title: n,
|
|
1767
1782
|
copiedTitle: a,
|
|
1768
1783
|
icon: s
|
|
1769
1784
|
}
|
|
1770
1785
|
);
|
|
1771
1786
|
}
|
|
1772
|
-
const
|
|
1787
|
+
const en = "[&_button]:h-7 [&_button]:min-h-0 [&_button]:gap-1 [&_button]:px-2 [&_button]:text-xs [&_button_svg]:h-3.5 [&_button_svg]:w-3.5 [&_button[data-icon=true]]:w-7 [&_button[data-icon=true]]:px-0";
|
|
1773
1788
|
function Ie(e) {
|
|
1774
1789
|
if (!e) return 150;
|
|
1775
1790
|
const r = parseInt(e, 10);
|
|
1776
1791
|
return isNaN(r) || r <= 0 ? 150 : r;
|
|
1777
1792
|
}
|
|
1778
|
-
function
|
|
1793
|
+
function Me(e, r) {
|
|
1779
1794
|
const n = e.minWidth ?? 80, a = e.maxWidth ?? 1 / 0;
|
|
1780
1795
|
return Math.min(a, Math.max(n, r));
|
|
1781
1796
|
}
|
|
1782
|
-
function
|
|
1797
|
+
function tn(e, r) {
|
|
1783
1798
|
if (r <= 7) return Array.from({ length: r }, (a, s) => s + 1);
|
|
1784
1799
|
const n = [1];
|
|
1785
1800
|
e > 3 && n.push("...");
|
|
@@ -1808,7 +1823,7 @@ function Ct({
|
|
|
1808
1823
|
}
|
|
1809
1824
|
);
|
|
1810
1825
|
}
|
|
1811
|
-
function
|
|
1826
|
+
function ra({
|
|
1812
1827
|
columns: e,
|
|
1813
1828
|
data: r,
|
|
1814
1829
|
getRowId: n,
|
|
@@ -1826,63 +1841,63 @@ function ta({
|
|
|
1826
1841
|
stickyHeader: v = !0,
|
|
1827
1842
|
pageSize: c = 25,
|
|
1828
1843
|
pageSizeOptions: y = [25, 50, 100],
|
|
1829
|
-
pageSizeSelectWidth:
|
|
1830
|
-
pageSizeSelectHeight:
|
|
1831
|
-
pageSizeSelectPadding:
|
|
1844
|
+
pageSizeSelectWidth: T = 62,
|
|
1845
|
+
pageSizeSelectHeight: j = 30,
|
|
1846
|
+
pageSizeSelectPadding: P = "0 7px",
|
|
1832
1847
|
totalRows: C,
|
|
1833
|
-
page:
|
|
1834
|
-
onPageChange:
|
|
1848
|
+
page: M,
|
|
1849
|
+
onPageChange: B,
|
|
1835
1850
|
onPageSizeChange: $,
|
|
1836
|
-
storageKey:
|
|
1837
|
-
stickyFirstColumn:
|
|
1838
|
-
bottomOffset:
|
|
1839
|
-
compact:
|
|
1851
|
+
storageKey: _,
|
|
1852
|
+
stickyFirstColumn: E = !1,
|
|
1853
|
+
bottomOffset: L = 0,
|
|
1854
|
+
compact: I = !0,
|
|
1840
1855
|
restrictHeight: J = !0,
|
|
1841
1856
|
minTableWidth: W
|
|
1842
1857
|
}) {
|
|
1843
|
-
const F = e.map((l) => l.key).join(","), [V, Q] = D(!
|
|
1858
|
+
const F = e.map((l) => l.key).join(","), [V, Q] = D(!_), o = re(null), w = re(!_), U = (l, g) => 50 + (l * 17 + g * 13 + 7) % 40, Y = re(null), [X, te] = D(
|
|
1844
1859
|
void 0
|
|
1845
1860
|
), [ce, ne] = D(!1);
|
|
1846
|
-
|
|
1847
|
-
const g = c !== !1 ? 32 : 0,
|
|
1848
|
-
function
|
|
1861
|
+
H(() => {
|
|
1862
|
+
const g = c !== !1 ? 32 : 0, O = 12;
|
|
1863
|
+
function A() {
|
|
1849
1864
|
if (ne(window.innerWidth < 640), !Y.current) return;
|
|
1850
1865
|
const G = Y.current.getBoundingClientRect().top;
|
|
1851
1866
|
te(
|
|
1852
1867
|
Math.max(
|
|
1853
1868
|
120,
|
|
1854
|
-
window.innerHeight - G - g -
|
|
1869
|
+
window.innerHeight - G - g - O - L
|
|
1855
1870
|
)
|
|
1856
1871
|
);
|
|
1857
1872
|
}
|
|
1858
|
-
return
|
|
1859
|
-
}, [a, c,
|
|
1873
|
+
return A(), window.addEventListener("resize", A), () => window.removeEventListener("resize", A);
|
|
1874
|
+
}, [a, c, L]);
|
|
1860
1875
|
const [Ne, pe] = D(
|
|
1861
1876
|
() => e.map((l) => l.key)
|
|
1862
1877
|
), [he, de] = D(
|
|
1863
1878
|
() => Object.fromEntries(
|
|
1864
|
-
e.map((l) => [l.key,
|
|
1879
|
+
e.map((l) => [l.key, Me(l, Ie(l.width))])
|
|
1865
1880
|
)
|
|
1866
1881
|
);
|
|
1867
|
-
|
|
1868
|
-
const l = e.map((
|
|
1869
|
-
if (!
|
|
1882
|
+
H(() => {
|
|
1883
|
+
const l = e.map((O) => O.key);
|
|
1884
|
+
if (!_) {
|
|
1870
1885
|
pe(l), w.current = !1, Q(!0);
|
|
1871
1886
|
return;
|
|
1872
1887
|
}
|
|
1873
1888
|
let g = !1;
|
|
1874
1889
|
return w.current = !1, Q(!1), fetch(
|
|
1875
|
-
`/api/user/preferences/datatables?key=${encodeURIComponent(
|
|
1890
|
+
`/api/user/preferences/datatables?key=${encodeURIComponent(_)}`,
|
|
1876
1891
|
{ cache: "no-store" }
|
|
1877
|
-
).then((
|
|
1892
|
+
).then((O) => O.ok ? O.json() : null).then((O) => {
|
|
1878
1893
|
var Ue, Ye;
|
|
1879
1894
|
if (g) return;
|
|
1880
|
-
const
|
|
1881
|
-
e.map((fe) => [fe.key,
|
|
1882
|
-
), K = ((Ye =
|
|
1895
|
+
const A = (Ue = O == null ? void 0 : O.settings) == null ? void 0 : Ue.columnOrder, G = Array.isArray(A) ? A.filter((fe) => l.includes(fe)) : [], ue = l.filter((fe) => !G.includes(fe)), be = G.length > 0 ? [...G, ...ue] : l, Oe = Object.fromEntries(
|
|
1896
|
+
e.map((fe) => [fe.key, Me(fe, Ie(fe.width))])
|
|
1897
|
+
), K = ((Ye = O == null ? void 0 : O.settings) == null ? void 0 : Ye.columnWidths) ?? {}, se = Object.fromEntries(
|
|
1883
1898
|
e.map((fe) => [
|
|
1884
1899
|
fe.key,
|
|
1885
|
-
|
|
1900
|
+
Me(fe, K[fe.key] ?? Oe[fe.key])
|
|
1886
1901
|
])
|
|
1887
1902
|
);
|
|
1888
1903
|
pe(be), de(se), o.current = JSON.stringify({
|
|
@@ -1892,15 +1907,15 @@ function ta({
|
|
|
1892
1907
|
}).catch(() => {
|
|
1893
1908
|
if (!g) {
|
|
1894
1909
|
pe(l);
|
|
1895
|
-
const
|
|
1896
|
-
e.map((
|
|
1897
|
-
|
|
1898
|
-
|
|
1910
|
+
const O = Object.fromEntries(
|
|
1911
|
+
e.map((A) => [
|
|
1912
|
+
A.key,
|
|
1913
|
+
Me(A, Ie(A.width))
|
|
1899
1914
|
])
|
|
1900
1915
|
);
|
|
1901
|
-
de(
|
|
1916
|
+
de(O), o.current = JSON.stringify({
|
|
1902
1917
|
columnOrder: l,
|
|
1903
|
-
columnWidths:
|
|
1918
|
+
columnWidths: O
|
|
1904
1919
|
}), w.current = !0;
|
|
1905
1920
|
}
|
|
1906
1921
|
}).finally(() => {
|
|
@@ -1908,57 +1923,57 @@ function ta({
|
|
|
1908
1923
|
}), () => {
|
|
1909
1924
|
g = !0;
|
|
1910
1925
|
};
|
|
1911
|
-
}, [
|
|
1912
|
-
if (!
|
|
1926
|
+
}, [_, F, e]), H(() => {
|
|
1927
|
+
if (!_ || !V || !w.current) return;
|
|
1913
1928
|
const l = {
|
|
1914
1929
|
columnOrder: Ne,
|
|
1915
1930
|
columnWidths: he
|
|
1916
1931
|
}, g = JSON.stringify(l);
|
|
1917
1932
|
if (g === o.current) return;
|
|
1918
|
-
const
|
|
1933
|
+
const O = window.setTimeout(() => {
|
|
1919
1934
|
fetch("/api/user/preferences/datatables", {
|
|
1920
1935
|
method: "PATCH",
|
|
1921
1936
|
headers: { "Content-Type": "application/json" },
|
|
1922
|
-
body: JSON.stringify({ key:
|
|
1923
|
-
}).then((
|
|
1924
|
-
|
|
1937
|
+
body: JSON.stringify({ key: _, settings: l })
|
|
1938
|
+
}).then((A) => {
|
|
1939
|
+
A.ok && (o.current = g);
|
|
1925
1940
|
}).catch(() => {
|
|
1926
1941
|
});
|
|
1927
1942
|
}, 300);
|
|
1928
|
-
return () => window.clearTimeout(
|
|
1929
|
-
}, [Ne, he,
|
|
1943
|
+
return () => window.clearTimeout(O);
|
|
1944
|
+
}, [Ne, he, _, V]), H(() => {
|
|
1930
1945
|
pe((l) => {
|
|
1931
|
-
const g = e.map((G) => G.key),
|
|
1932
|
-
return [...
|
|
1946
|
+
const g = e.map((G) => G.key), O = l.filter((G) => g.includes(G)), A = g.filter((G) => !O.includes(G));
|
|
1947
|
+
return [...O, ...A];
|
|
1933
1948
|
});
|
|
1934
1949
|
}, [F, e]);
|
|
1935
1950
|
const k = Ne.map((l) => e.find((g) => g.key === l)).filter((l) => !!l);
|
|
1936
|
-
|
|
1951
|
+
H(() => {
|
|
1937
1952
|
de((l) => {
|
|
1938
1953
|
const g = Object.fromEntries(
|
|
1939
|
-
e.map((
|
|
1954
|
+
e.map((O) => [O.key, Me(O, Ie(O.width))])
|
|
1940
1955
|
);
|
|
1941
1956
|
return Object.fromEntries(
|
|
1942
|
-
e.map((
|
|
1943
|
-
|
|
1944
|
-
|
|
1957
|
+
e.map((O) => [
|
|
1958
|
+
O.key,
|
|
1959
|
+
Me(O, l[O.key] ?? g[O.key])
|
|
1945
1960
|
])
|
|
1946
1961
|
);
|
|
1947
1962
|
});
|
|
1948
1963
|
}, [F, e]);
|
|
1949
|
-
const
|
|
1950
|
-
|
|
1951
|
-
function l(
|
|
1952
|
-
const
|
|
1953
|
-
if (!
|
|
1954
|
-
const G =
|
|
1964
|
+
const R = re(null);
|
|
1965
|
+
H(() => {
|
|
1966
|
+
function l(O) {
|
|
1967
|
+
const A = R.current;
|
|
1968
|
+
if (!A) return;
|
|
1969
|
+
const G = O.clientX - A.startX, ue = e.find((be) => be.key === A.colKey);
|
|
1955
1970
|
ue && de((be) => ({
|
|
1956
1971
|
...be,
|
|
1957
|
-
[
|
|
1972
|
+
[A.colKey]: Me(ue, A.startWidth + G)
|
|
1958
1973
|
}));
|
|
1959
1974
|
}
|
|
1960
1975
|
function g() {
|
|
1961
|
-
|
|
1976
|
+
R.current && (R.current = null, document.body.style.cursor = "", document.body.style.userSelect = "");
|
|
1962
1977
|
}
|
|
1963
1978
|
return document.addEventListener("pointermove", l), document.addEventListener("pointerup", g), () => {
|
|
1964
1979
|
document.removeEventListener("pointermove", l), document.removeEventListener("pointerup", g);
|
|
@@ -1973,9 +1988,9 @@ function ta({
|
|
|
1973
1988
|
}
|
|
1974
1989
|
function Re(l, g) {
|
|
1975
1990
|
g.preventDefault();
|
|
1976
|
-
const
|
|
1977
|
-
|
|
1978
|
-
const G = [...
|
|
1991
|
+
const O = q.current;
|
|
1992
|
+
O !== null && O !== l && pe((A) => {
|
|
1993
|
+
const G = [...A], [ue] = G.splice(O, 1);
|
|
1979
1994
|
return G.splice(l, 0, ue), G;
|
|
1980
1995
|
}), q.current = null, oe(null);
|
|
1981
1996
|
}
|
|
@@ -1991,14 +2006,14 @@ function ta({
|
|
|
1991
2006
|
const [We, Be] = D(1), [Le, Fe] = D(
|
|
1992
2007
|
c === !1 ? 0 : c
|
|
1993
2008
|
);
|
|
1994
|
-
|
|
2009
|
+
H(() => {
|
|
1995
2010
|
Be(1);
|
|
1996
2011
|
}, [r]);
|
|
1997
|
-
const Se = !!(
|
|
2012
|
+
const Se = !!(B && $), ve = c !== !1, x = Se ? M ?? 1 : We, ee = Se || ve ? Le : r.length, Z = !!d && !!h && !!N, ye = Z ? 40 : 0, le = Z && r.length > 0 && d.size === r.length, De = Z && d.size > 0 && d.size < r.length, Ce = ge.useMemo(() => {
|
|
1998
2013
|
if (!me) return r;
|
|
1999
2014
|
const l = e.find((g) => g.key === me.key && g.sortKey);
|
|
2000
|
-
return l != null && l.sortKey ? [...r].sort((g,
|
|
2001
|
-
const
|
|
2015
|
+
return l != null && l.sortKey ? [...r].sort((g, O) => {
|
|
2016
|
+
const A = g[l.sortKey], G = O[l.sortKey], ue = A === G ? 0 : A == null ? 1 : G == null || A < G ? -1 : 1;
|
|
2002
2017
|
return me.dir === "asc" ? ue : -ue;
|
|
2003
2018
|
}) : r;
|
|
2004
2019
|
}, [r, me, e]), mt = ge.useMemo(() => {
|
|
@@ -2008,10 +2023,10 @@ function ta({
|
|
|
2008
2023
|
}, [Ce, Se, ve, x, ee]), Ae = C ?? r.length, et = ve ? Math.max(1, Math.ceil(Ae / ee)) : 1, Xt = ve ? (x - 1) * ee + 1 : 1, Vt = ve ? Math.min(x * ee, Ae) : Ae;
|
|
2009
2024
|
function tt(l) {
|
|
2010
2025
|
const g = Math.max(1, Math.min(l, et));
|
|
2011
|
-
Se ?
|
|
2026
|
+
Se ? B(g) : Be(g);
|
|
2012
2027
|
}
|
|
2013
2028
|
function Zt(l) {
|
|
2014
|
-
Fe(l), Se ? ($(l),
|
|
2029
|
+
Fe(l), Se ? ($(l), B(1)) : Be(1), $ && $(l);
|
|
2015
2030
|
}
|
|
2016
2031
|
const ft = (l) => l === "center" ? "text-center" : l === "right" ? "text-right" : "text-left", Jt = "color-mix(in srgb, var(--primary) 6%, var(--bg-card))", Kt = k.length + (Z ? 1 : 0);
|
|
2017
2032
|
function pt(l) {
|
|
@@ -2027,8 +2042,8 @@ function ta({
|
|
|
2027
2042
|
Z && /* @__PURE__ */ t(
|
|
2028
2043
|
"th",
|
|
2029
2044
|
{
|
|
2030
|
-
className: `${
|
|
2031
|
-
style:
|
|
2045
|
+
className: `${I ? "px-2 py-1.5" : "px-3 py-2.5"} w-10`,
|
|
2046
|
+
style: E ? {
|
|
2032
2047
|
position: "sticky",
|
|
2033
2048
|
left: 0,
|
|
2034
2049
|
zIndex: 12,
|
|
@@ -2056,11 +2071,11 @@ function ta({
|
|
|
2056
2071
|
}
|
|
2057
2072
|
),
|
|
2058
2073
|
k.map((l, g) => {
|
|
2059
|
-
const
|
|
2074
|
+
const O = (me == null ? void 0 : me.key) === l.key, A = !!l.sortKey, G = E && !ce && g === 0, ue = ae === g, Oe = (he[l.key] ?? Ie(l.width)) < 120;
|
|
2060
2075
|
return /* @__PURE__ */ i(
|
|
2061
2076
|
"th",
|
|
2062
2077
|
{
|
|
2063
|
-
className: `group select-none ${
|
|
2078
|
+
className: `group select-none ${Oe ? "text-left" : ft(l.align)}`,
|
|
2064
2079
|
style: {
|
|
2065
2080
|
...G ? {
|
|
2066
2081
|
position: "sticky",
|
|
@@ -2076,17 +2091,17 @@ function ta({
|
|
|
2076
2091
|
borderBottom: "2px solid var(--border)",
|
|
2077
2092
|
borderRight: "1px solid var(--border)"
|
|
2078
2093
|
},
|
|
2079
|
-
color:
|
|
2094
|
+
color: O ? "var(--primary)" : "var(--text-muted)",
|
|
2080
2095
|
whiteSpace: "nowrap",
|
|
2081
2096
|
transition: "color 0.15s",
|
|
2082
2097
|
borderLeft: ue ? "2px solid var(--primary)" : "2px solid transparent",
|
|
2083
|
-
cursor:
|
|
2098
|
+
cursor: A ? "pointer" : "default",
|
|
2084
2099
|
// Padding: room for grip icon left, resize handle right
|
|
2085
|
-
padding:
|
|
2100
|
+
padding: I ? "5px 24px 5px 6px" : "7px 28px 7px 6px"
|
|
2086
2101
|
},
|
|
2087
2102
|
onDragOver: (K) => ke(g, K),
|
|
2088
2103
|
onDrop: (K) => Re(g, K),
|
|
2089
|
-
onClick:
|
|
2104
|
+
onClick: A ? () => ie(l) : void 0,
|
|
2090
2105
|
children: [
|
|
2091
2106
|
/* @__PURE__ */ t(
|
|
2092
2107
|
"span",
|
|
@@ -2115,15 +2130,15 @@ function ta({
|
|
|
2115
2130
|
className: "inline-block max-w-full align-middle",
|
|
2116
2131
|
style: {
|
|
2117
2132
|
width: "calc(100% - 22px)",
|
|
2118
|
-
textAlign:
|
|
2133
|
+
textAlign: Oe ? "left" : l.align === "center" ? "center" : l.align === "right" ? "right" : "left"
|
|
2119
2134
|
},
|
|
2120
2135
|
children: /* @__PURE__ */ i(
|
|
2121
2136
|
"span",
|
|
2122
2137
|
{
|
|
2123
|
-
className: `inline-flex max-w-full items-center gap-1 font-semibold uppercase tracking-wider ${
|
|
2138
|
+
className: `inline-flex max-w-full items-center gap-1 font-semibold uppercase tracking-wider ${I ? "text-[11px]" : "text-xs"}`,
|
|
2124
2139
|
children: [
|
|
2125
2140
|
/* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: l.header }),
|
|
2126
|
-
|
|
2141
|
+
A && /* @__PURE__ */ t("span", { className: "flex-shrink-0 opacity-60", children: O ? me.dir === "asc" ? /* @__PURE__ */ t(sr, { className: "w-3 h-3" }) : /* @__PURE__ */ t(_e, { className: "w-3 h-3" }) : /* @__PURE__ */ t(lr, { className: "w-3 h-3 opacity-40" }) })
|
|
2127
2142
|
]
|
|
2128
2143
|
}
|
|
2129
2144
|
)
|
|
@@ -2136,7 +2151,7 @@ function ta({
|
|
|
2136
2151
|
"aria-orientation": "vertical",
|
|
2137
2152
|
title: "Arrastrar para redimensionar",
|
|
2138
2153
|
onPointerDown: (K) => {
|
|
2139
|
-
K.preventDefault(), K.stopPropagation(),
|
|
2154
|
+
K.preventDefault(), K.stopPropagation(), R.current = {
|
|
2140
2155
|
colKey: l.key,
|
|
2141
2156
|
startX: K.clientX,
|
|
2142
2157
|
startWidth: he[l.key] ?? 150
|
|
@@ -2168,11 +2183,11 @@ function ta({
|
|
|
2168
2183
|
}
|
|
2169
2184
|
), bt = () => {
|
|
2170
2185
|
if (!ve || a) return null;
|
|
2171
|
-
const l =
|
|
2186
|
+
const l = tn(x, et);
|
|
2172
2187
|
return /* @__PURE__ */ i(
|
|
2173
2188
|
"div",
|
|
2174
2189
|
{
|
|
2175
|
-
className: `grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-2 rounded-b-xl border-t text-xs select-none ${
|
|
2190
|
+
className: `grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-2 rounded-b-xl border-t text-xs select-none ${I ? "px-2 py-0.5" : "px-3 py-1"}`,
|
|
2176
2191
|
style: { borderColor: "var(--border)", background: "var(--bg-input)" },
|
|
2177
2192
|
children: [
|
|
2178
2193
|
/* @__PURE__ */ i("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
@@ -2190,10 +2205,10 @@ function ta({
|
|
|
2190
2205
|
})),
|
|
2191
2206
|
placeholder: "Filas",
|
|
2192
2207
|
searchable: !1,
|
|
2193
|
-
height:
|
|
2194
|
-
padding:
|
|
2208
|
+
height: j,
|
|
2209
|
+
padding: P,
|
|
2195
2210
|
className: "shrink-0 [&>button]:rounded-md [&>button]:text-xs [&_svg]:h-3.5 [&_svg]:w-3.5",
|
|
2196
|
-
style: { width:
|
|
2211
|
+
style: { width: T }
|
|
2197
2212
|
}
|
|
2198
2213
|
)
|
|
2199
2214
|
] })
|
|
@@ -2210,14 +2225,14 @@ function ta({
|
|
|
2210
2225
|
}
|
|
2211
2226
|
),
|
|
2212
2227
|
l.map(
|
|
2213
|
-
(g,
|
|
2228
|
+
(g, O) => g === "..." ? /* @__PURE__ */ t(
|
|
2214
2229
|
"span",
|
|
2215
2230
|
{
|
|
2216
2231
|
className: "px-1",
|
|
2217
2232
|
style: { color: "var(--text-muted)" },
|
|
2218
2233
|
children: "…"
|
|
2219
2234
|
},
|
|
2220
|
-
`e${
|
|
2235
|
+
`e${O}`
|
|
2221
2236
|
) : /* @__PURE__ */ t(
|
|
2222
2237
|
"button",
|
|
2223
2238
|
{
|
|
@@ -2308,18 +2323,18 @@ function ta({
|
|
|
2308
2323
|
Z && /* @__PURE__ */ t(
|
|
2309
2324
|
"td",
|
|
2310
2325
|
{
|
|
2311
|
-
className: `${
|
|
2326
|
+
className: `${I ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
|
|
2312
2327
|
style: {
|
|
2313
2328
|
borderBottom: "1px solid var(--border)",
|
|
2314
2329
|
borderRight: "1px solid var(--border)"
|
|
2315
2330
|
}
|
|
2316
2331
|
}
|
|
2317
2332
|
),
|
|
2318
|
-
k.map((
|
|
2333
|
+
k.map((O, A) => /* @__PURE__ */ t(
|
|
2319
2334
|
"td",
|
|
2320
2335
|
{
|
|
2321
|
-
className:
|
|
2322
|
-
style:
|
|
2336
|
+
className: I ? "px-2 py-1.5" : "px-3 py-2",
|
|
2337
|
+
style: E && !ce && A === 0 ? {
|
|
2323
2338
|
position: "sticky",
|
|
2324
2339
|
left: ye,
|
|
2325
2340
|
zIndex: 1,
|
|
@@ -2338,13 +2353,13 @@ function ta({
|
|
|
2338
2353
|
className: "h-3.5 rounded-full animate-pulse",
|
|
2339
2354
|
style: {
|
|
2340
2355
|
background: "var(--border)",
|
|
2341
|
-
width: `${U(g,
|
|
2356
|
+
width: `${U(g, A)}%`,
|
|
2342
2357
|
minWidth: 32
|
|
2343
2358
|
}
|
|
2344
2359
|
}
|
|
2345
2360
|
)
|
|
2346
2361
|
},
|
|
2347
|
-
|
|
2362
|
+
O.key
|
|
2348
2363
|
))
|
|
2349
2364
|
] }, g)) })
|
|
2350
2365
|
]
|
|
@@ -2417,31 +2432,31 @@ function ta({
|
|
|
2417
2432
|
}
|
|
2418
2433
|
),
|
|
2419
2434
|
/* @__PURE__ */ t("tbody", { children: mt.map((l, g) => {
|
|
2420
|
-
const
|
|
2435
|
+
const O = n(l), A = pt(m == null ? void 0 : m(l)), G = g > 0 ? pt(
|
|
2421
2436
|
m == null ? void 0 : m(mt[g - 1])
|
|
2422
|
-
) : null, ue =
|
|
2437
|
+
) : null, ue = A && A.key !== (G == null ? void 0 : G.key), be = Z && d.has(O), Oe = !!p, K = be && S ? "color-mix(in srgb, var(--primary) 8%, var(--bg-card))" : g % 2 === 1 ? "color-mix(in srgb, var(--bg-input) 50%, var(--bg-card))" : "var(--bg-card)";
|
|
2423
2438
|
return /* @__PURE__ */ i(ge.Fragment, { children: [
|
|
2424
|
-
ue && /* @__PURE__ */ t("tr", { className:
|
|
2439
|
+
ue && /* @__PURE__ */ t("tr", { className: A.className ?? "", children: /* @__PURE__ */ t(
|
|
2425
2440
|
"td",
|
|
2426
2441
|
{
|
|
2427
2442
|
colSpan: Kt,
|
|
2428
|
-
className:
|
|
2443
|
+
className: I ? "px-2 py-2" : "px-3 py-3",
|
|
2429
2444
|
style: {
|
|
2430
2445
|
background: "color-mix(in srgb, var(--primary) 8%, var(--bg-input))",
|
|
2431
2446
|
borderBottom: "1px solid var(--border)",
|
|
2432
2447
|
borderRight: "1px solid var(--border)"
|
|
2433
2448
|
},
|
|
2434
2449
|
children: /* @__PURE__ */ t("div", { className: "flex min-w-0 items-center justify-between gap-3", children: /* @__PURE__ */ i("div", { className: "min-w-0", children: [
|
|
2435
|
-
/* @__PURE__ */ t("div", { className: "truncate text-xs font-semibold uppercase tracking-wider text-[var(--text-main)]", children:
|
|
2436
|
-
|
|
2450
|
+
/* @__PURE__ */ t("div", { className: "truncate text-xs font-semibold uppercase tracking-wider text-[var(--text-main)]", children: A.label }),
|
|
2451
|
+
A.description && /* @__PURE__ */ t("div", { className: "mt-0.5 truncate text-xs text-[var(--text-muted)]", children: A.description })
|
|
2437
2452
|
] }) })
|
|
2438
2453
|
}
|
|
2439
2454
|
) }),
|
|
2440
2455
|
/* @__PURE__ */ i(
|
|
2441
2456
|
"tr",
|
|
2442
2457
|
{
|
|
2443
|
-
onClick:
|
|
2444
|
-
className: `transition-colors ${
|
|
2458
|
+
onClick: Oe ? () => p(l) : void 0,
|
|
2459
|
+
className: `transition-colors ${Oe ? "cursor-pointer" : ""} ${b ? b(l) : ""}`,
|
|
2445
2460
|
style: {
|
|
2446
2461
|
"--dt-row-bg": K,
|
|
2447
2462
|
"--dt-sticky-bg": K,
|
|
@@ -2466,8 +2481,8 @@ function ta({
|
|
|
2466
2481
|
Z && /* @__PURE__ */ t(
|
|
2467
2482
|
"td",
|
|
2468
2483
|
{
|
|
2469
|
-
className: `${
|
|
2470
|
-
style:
|
|
2484
|
+
className: `${I ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
|
|
2485
|
+
style: E ? {
|
|
2471
2486
|
position: "sticky",
|
|
2472
2487
|
left: 0,
|
|
2473
2488
|
zIndex: 3,
|
|
@@ -2478,7 +2493,7 @@ function ta({
|
|
|
2478
2493
|
borderRight: "1px solid var(--border)"
|
|
2479
2494
|
},
|
|
2480
2495
|
onClick: (se) => {
|
|
2481
|
-
se.stopPropagation(), h(
|
|
2496
|
+
se.stopPropagation(), h(O);
|
|
2482
2497
|
},
|
|
2483
2498
|
children: /* @__PURE__ */ t(
|
|
2484
2499
|
"input",
|
|
@@ -2486,18 +2501,18 @@ function ta({
|
|
|
2486
2501
|
type: "checkbox",
|
|
2487
2502
|
checked: be,
|
|
2488
2503
|
onClick: (se) => se.stopPropagation(),
|
|
2489
|
-
onChange: () => h(
|
|
2504
|
+
onChange: () => h(O),
|
|
2490
2505
|
className: "rounded cursor-pointer accent-[var(--primary)]"
|
|
2491
2506
|
}
|
|
2492
2507
|
)
|
|
2493
2508
|
}
|
|
2494
2509
|
),
|
|
2495
2510
|
k.map((se, Ue) => {
|
|
2496
|
-
const Ye =
|
|
2511
|
+
const Ye = E && !ce && Ue === 0;
|
|
2497
2512
|
return /* @__PURE__ */ t(
|
|
2498
2513
|
"td",
|
|
2499
2514
|
{
|
|
2500
|
-
className: `${
|
|
2515
|
+
className: `${I ? "px-2 py-1.5" : "px-3 py-2"} ${en} ${ft(se.align)} ${se.className ?? ""}`,
|
|
2501
2516
|
style: {
|
|
2502
2517
|
overflow: "hidden",
|
|
2503
2518
|
whiteSpace: "nowrap",
|
|
@@ -2521,7 +2536,7 @@ function ta({
|
|
|
2521
2536
|
]
|
|
2522
2537
|
}
|
|
2523
2538
|
)
|
|
2524
|
-
] },
|
|
2539
|
+
] }, O);
|
|
2525
2540
|
}) })
|
|
2526
2541
|
]
|
|
2527
2542
|
}
|
|
@@ -2538,10 +2553,10 @@ function ta({
|
|
|
2538
2553
|
function Pe(e) {
|
|
2539
2554
|
return e ? /* @__PURE__ */ new Date(`${e}T12:00:00`) : void 0;
|
|
2540
2555
|
}
|
|
2541
|
-
function
|
|
2556
|
+
function Et(e) {
|
|
2542
2557
|
return e.toISOString().slice(0, 10);
|
|
2543
2558
|
}
|
|
2544
|
-
function
|
|
2559
|
+
function rn({
|
|
2545
2560
|
calendarMonth: e,
|
|
2546
2561
|
displayIndex: r
|
|
2547
2562
|
}) {
|
|
@@ -2610,10 +2625,10 @@ function tn({
|
|
|
2610
2625
|
}
|
|
2611
2626
|
);
|
|
2612
2627
|
}
|
|
2613
|
-
function
|
|
2628
|
+
function nn(e) {
|
|
2614
2629
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
2615
2630
|
}
|
|
2616
|
-
function
|
|
2631
|
+
function na({
|
|
2617
2632
|
startDate: e,
|
|
2618
2633
|
endDate: r,
|
|
2619
2634
|
onChange: n,
|
|
@@ -2630,7 +2645,7 @@ function ra({
|
|
|
2630
2645
|
}, N = Pe(a), [S, b] = D(
|
|
2631
2646
|
Pe(s || e)
|
|
2632
2647
|
);
|
|
2633
|
-
return
|
|
2648
|
+
return H(() => {
|
|
2634
2649
|
b(Pe(s || e));
|
|
2635
2650
|
}, [s, e]), /* @__PURE__ */ i("div", { children: [
|
|
2636
2651
|
/* @__PURE__ */ t(
|
|
@@ -2653,7 +2668,7 @@ function ra({
|
|
|
2653
2668
|
month: S,
|
|
2654
2669
|
onMonthChange: b,
|
|
2655
2670
|
onSelect: (m) => {
|
|
2656
|
-
const v = m != null && m.from ?
|
|
2671
|
+
const v = m != null && m.from ? Et(m.from) : e, c = m != null && m.to ? Et(m.to) : "";
|
|
2657
2672
|
n({ startDate: v, endDate: c });
|
|
2658
2673
|
},
|
|
2659
2674
|
numberOfMonths: u,
|
|
@@ -2661,7 +2676,7 @@ function ra({
|
|
|
2661
2676
|
disabled: N ? { before: N } : void 0,
|
|
2662
2677
|
showOutsideDays: !1,
|
|
2663
2678
|
components: {
|
|
2664
|
-
MonthCaption:
|
|
2679
|
+
MonthCaption: rn
|
|
2665
2680
|
},
|
|
2666
2681
|
className: "text-sm",
|
|
2667
2682
|
classNames: {
|
|
@@ -2753,7 +2768,7 @@ function ra({
|
|
|
2753
2768
|
}
|
|
2754
2769
|
},
|
|
2755
2770
|
formatters: {
|
|
2756
|
-
formatCaption: (m) =>
|
|
2771
|
+
formatCaption: (m) => nn(
|
|
2757
2772
|
new Intl.DateTimeFormat("es-MX", {
|
|
2758
2773
|
month: "long",
|
|
2759
2774
|
year: "numeric"
|
|
@@ -2800,7 +2815,7 @@ function ra({
|
|
|
2800
2815
|
)
|
|
2801
2816
|
] });
|
|
2802
2817
|
}
|
|
2803
|
-
function
|
|
2818
|
+
function aa({
|
|
2804
2819
|
open: e,
|
|
2805
2820
|
onClose: r,
|
|
2806
2821
|
title: n,
|
|
@@ -2816,11 +2831,11 @@ function na({
|
|
|
2816
2831
|
children: b
|
|
2817
2832
|
}) {
|
|
2818
2833
|
const [m, v] = D(!1);
|
|
2819
|
-
return
|
|
2834
|
+
return H(() => {
|
|
2820
2835
|
v(!0);
|
|
2821
|
-
}, []),
|
|
2836
|
+
}, []), H(() => (document.body.style.overflow = e ? "hidden" : "", () => {
|
|
2822
2837
|
document.body.style.overflow = "";
|
|
2823
|
-
}), [e]),
|
|
2838
|
+
}), [e]), H(() => {
|
|
2824
2839
|
if (!e) return;
|
|
2825
2840
|
const c = (y) => {
|
|
2826
2841
|
y.key === "Escape" && r();
|
|
@@ -2857,7 +2872,7 @@ function na({
|
|
|
2857
2872
|
style: { borderBottom: "1px solid var(--border)" },
|
|
2858
2873
|
children: [
|
|
2859
2874
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
2860
|
-
/* @__PURE__ */ t(xe, { variant: "icon", onClick: r, title: "Cerrar", children: /* @__PURE__ */ t(
|
|
2875
|
+
/* @__PURE__ */ t(xe, { variant: "icon", onClick: r, title: "Cerrar", children: /* @__PURE__ */ t($e, { className: "w-5 h-5" }) }),
|
|
2861
2876
|
s && /* @__PURE__ */ t("div", { className: "flex-shrink-0", children: s }),
|
|
2862
2877
|
/* @__PURE__ */ i("div", { className: "min-w-0", children: [
|
|
2863
2878
|
/* @__PURE__ */ t(
|
|
@@ -2924,17 +2939,17 @@ var Ut = {
|
|
|
2924
2939
|
className: void 0,
|
|
2925
2940
|
style: void 0,
|
|
2926
2941
|
attr: void 0
|
|
2927
|
-
},
|
|
2928
|
-
function
|
|
2942
|
+
}, $t = ge.createContext && /* @__PURE__ */ ge.createContext(Ut), an = ["attr", "size", "title"];
|
|
2943
|
+
function on(e, r) {
|
|
2929
2944
|
if (e == null) return {};
|
|
2930
|
-
var n, a, s =
|
|
2945
|
+
var n, a, s = sn(e, r);
|
|
2931
2946
|
if (Object.getOwnPropertySymbols) {
|
|
2932
2947
|
var u = Object.getOwnPropertySymbols(e);
|
|
2933
2948
|
for (a = 0; a < u.length; a++) n = u[a], r.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (s[n] = e[n]);
|
|
2934
2949
|
}
|
|
2935
2950
|
return s;
|
|
2936
2951
|
}
|
|
2937
|
-
function
|
|
2952
|
+
function sn(e, r) {
|
|
2938
2953
|
if (e == null) return {};
|
|
2939
2954
|
var n = {};
|
|
2940
2955
|
for (var a in e) if ({}.hasOwnProperty.call(e, a)) {
|
|
@@ -2952,7 +2967,7 @@ function Ve() {
|
|
|
2952
2967
|
return e;
|
|
2953
2968
|
}, Ve.apply(null, arguments);
|
|
2954
2969
|
}
|
|
2955
|
-
function
|
|
2970
|
+
function Ot(e, r) {
|
|
2956
2971
|
var n = Object.keys(e);
|
|
2957
2972
|
if (Object.getOwnPropertySymbols) {
|
|
2958
2973
|
var a = Object.getOwnPropertySymbols(e);
|
|
@@ -2965,22 +2980,22 @@ function Mt(e, r) {
|
|
|
2965
2980
|
function Ze(e) {
|
|
2966
2981
|
for (var r = 1; r < arguments.length; r++) {
|
|
2967
2982
|
var n = arguments[r] != null ? arguments[r] : {};
|
|
2968
|
-
r % 2 ?
|
|
2969
|
-
|
|
2970
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2983
|
+
r % 2 ? Ot(Object(n), !0).forEach(function(a) {
|
|
2984
|
+
ln(e, a, n[a]);
|
|
2985
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ot(Object(n)).forEach(function(a) {
|
|
2971
2986
|
Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(n, a));
|
|
2972
2987
|
});
|
|
2973
2988
|
}
|
|
2974
2989
|
return e;
|
|
2975
2990
|
}
|
|
2976
|
-
function
|
|
2977
|
-
return (r =
|
|
2991
|
+
function ln(e, r, n) {
|
|
2992
|
+
return (r = cn(r)) in e ? Object.defineProperty(e, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = n, e;
|
|
2978
2993
|
}
|
|
2979
|
-
function
|
|
2980
|
-
var r =
|
|
2994
|
+
function cn(e) {
|
|
2995
|
+
var r = dn(e, "string");
|
|
2981
2996
|
return typeof r == "symbol" ? r : r + "";
|
|
2982
2997
|
}
|
|
2983
|
-
function
|
|
2998
|
+
function dn(e, r) {
|
|
2984
2999
|
if (typeof e != "object" || !e) return e;
|
|
2985
3000
|
var n = e[Symbol.toPrimitive];
|
|
2986
3001
|
if (n !== void 0) {
|
|
@@ -2996,17 +3011,17 @@ function Yt(e) {
|
|
|
2996
3011
|
}, r.attr), Yt(r.child)));
|
|
2997
3012
|
}
|
|
2998
3013
|
function qt(e) {
|
|
2999
|
-
return (r) => /* @__PURE__ */ ge.createElement(
|
|
3014
|
+
return (r) => /* @__PURE__ */ ge.createElement(un, Ve({
|
|
3000
3015
|
attr: Ze({}, e.attr)
|
|
3001
3016
|
}, r), Yt(e.child));
|
|
3002
3017
|
}
|
|
3003
|
-
function
|
|
3018
|
+
function un(e) {
|
|
3004
3019
|
var r = (n) => {
|
|
3005
3020
|
var {
|
|
3006
3021
|
attr: a,
|
|
3007
3022
|
size: s,
|
|
3008
3023
|
title: u
|
|
3009
|
-
} = e, f =
|
|
3024
|
+
} = e, f = on(e, an), p = s || n.size || "1em", d;
|
|
3010
3025
|
return n.className && (d = n.className), e.className && (d = (d ? d + " " : "") + e.className), /* @__PURE__ */ ge.createElement("svg", Ve({
|
|
3011
3026
|
stroke: "currentColor",
|
|
3012
3027
|
fill: "currentColor",
|
|
@@ -3021,12 +3036,12 @@ function dn(e) {
|
|
|
3021
3036
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3022
3037
|
}), u && /* @__PURE__ */ ge.createElement("title", null, u), e.children);
|
|
3023
3038
|
};
|
|
3024
|
-
return
|
|
3039
|
+
return $t !== void 0 ? /* @__PURE__ */ ge.createElement($t.Consumer, null, (n) => r(n)) : r(Ut);
|
|
3025
3040
|
}
|
|
3026
|
-
function
|
|
3041
|
+
function mn(e) {
|
|
3027
3042
|
return qt({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z" }, child: [] }] })(e);
|
|
3028
3043
|
}
|
|
3029
|
-
function
|
|
3044
|
+
function fn(e) {
|
|
3030
3045
|
return qt({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M228,175a8,8,0,0,1-10.92-3l-19-33.2A123.23,123.23,0,0,1,162,155.46l5.87,35.22a8,8,0,0,1-6.58,9.21A8.4,8.4,0,0,1,160,200a8,8,0,0,1-7.88-6.69l-5.77-34.58a133.06,133.06,0,0,1-36.68,0l-5.77,34.58A8,8,0,0,1,96,200a8.4,8.4,0,0,1-1.32-.11,8,8,0,0,1-6.58-9.21L94,155.46a123.23,123.23,0,0,1-36.06-16.69L39,172A8,8,0,1,1,25.06,164l20-35a153.47,153.47,0,0,1-19.3-20A8,8,0,1,1,38.22,99c16.6,20.54,45.64,45,89.78,45s73.18-24.49,89.78-45A8,8,0,1,1,230.22,109a153.47,153.47,0,0,1-19.3,20l20,35A8,8,0,0,1,228,175Z" }, child: [] }] })(e);
|
|
3031
3046
|
}
|
|
3032
3047
|
function at({
|
|
@@ -3041,7 +3056,7 @@ function at({
|
|
|
3041
3056
|
}
|
|
3042
3057
|
);
|
|
3043
3058
|
}
|
|
3044
|
-
function
|
|
3059
|
+
function ia({
|
|
3045
3060
|
label: e,
|
|
3046
3061
|
containerClassName: r = "",
|
|
3047
3062
|
helperText: n,
|
|
@@ -3053,19 +3068,19 @@ function aa({
|
|
|
3053
3068
|
required: d,
|
|
3054
3069
|
...h
|
|
3055
3070
|
}) {
|
|
3056
|
-
const [N, S] = D(() => !!h.autoFocus), [b, m] = D(!1), v = h.type === "password" && f, c = v && b ? "text" : h.type, y = h.value !== void 0 ? String(h.value).length > 0 : h.defaultValue !== void 0 && String(h.defaultValue).length > 0,
|
|
3057
|
-
top:
|
|
3071
|
+
const [N, S] = D(() => !!h.autoFocus), [b, m] = D(!1), v = h.type === "password" && f, c = v && b ? "text" : h.type, y = h.value !== void 0 ? String(h.value).length > 0 : h.defaultValue !== void 0 && String(h.defaultValue).length > 0, T = N || y, j = {
|
|
3072
|
+
top: T ? 8 : 15,
|
|
3058
3073
|
color: N ? "var(--primary)" : "var(--text-muted)",
|
|
3059
|
-
fontSize:
|
|
3060
|
-
fontWeight:
|
|
3061
|
-
textTransform:
|
|
3062
|
-
},
|
|
3074
|
+
fontSize: T ? 11 : 14,
|
|
3075
|
+
fontWeight: T ? 600 : 400,
|
|
3076
|
+
textTransform: T ? "uppercase" : "none"
|
|
3077
|
+
}, P = (B) => {
|
|
3063
3078
|
var $;
|
|
3064
|
-
S(!0), ($ = h.onFocus) == null || $.call(h,
|
|
3065
|
-
}, C = (
|
|
3079
|
+
S(!0), ($ = h.onFocus) == null || $.call(h, B);
|
|
3080
|
+
}, C = (B) => {
|
|
3066
3081
|
var $;
|
|
3067
|
-
S(!1), ($ = h.onBlur) == null || $.call(h,
|
|
3068
|
-
},
|
|
3082
|
+
S(!1), ($ = h.onBlur) == null || $.call(h, B);
|
|
3083
|
+
}, M = v ? /* @__PURE__ */ i(
|
|
3069
3084
|
"button",
|
|
3070
3085
|
{
|
|
3071
3086
|
type: "button",
|
|
@@ -3073,14 +3088,14 @@ function aa({
|
|
|
3073
3088
|
"aria-pressed": b,
|
|
3074
3089
|
className: "absolute right-2.5 top-1/2 flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-md text-[var(--text-muted)] transition-colors duration-200 hover:text-[var(--primary)] focus:outline-none",
|
|
3075
3090
|
tabIndex: -1,
|
|
3076
|
-
onClick: () => m((
|
|
3091
|
+
onClick: () => m((B) => !B),
|
|
3077
3092
|
children: [
|
|
3078
3093
|
/* @__PURE__ */ t(
|
|
3079
3094
|
"span",
|
|
3080
3095
|
{
|
|
3081
3096
|
"aria-hidden": "true",
|
|
3082
3097
|
className: `absolute inset-0 flex items-center justify-center transition-[opacity,transform] duration-200 ease-out ${b ? "scale-y-0 rotate-[-8deg] opacity-0" : "scale-y-100 rotate-0 opacity-100"}`,
|
|
3083
|
-
children: /* @__PURE__ */ t(
|
|
3098
|
+
children: /* @__PURE__ */ t(mn, { className: "h-[18px] w-[18px]" })
|
|
3084
3099
|
}
|
|
3085
3100
|
),
|
|
3086
3101
|
/* @__PURE__ */ t(
|
|
@@ -3088,7 +3103,7 @@ function aa({
|
|
|
3088
3103
|
{
|
|
3089
3104
|
"aria-hidden": "true",
|
|
3090
3105
|
className: `absolute inset-0 flex items-center justify-center transition-[opacity,transform] duration-200 ease-out ${b ? "scale-y-100 rotate-0 opacity-100" : "scale-y-0 rotate-[8deg] opacity-0"}`,
|
|
3091
|
-
children: /* @__PURE__ */ t(
|
|
3106
|
+
children: /* @__PURE__ */ t(fn, { className: "h-[18px] w-[18px]" })
|
|
3092
3107
|
}
|
|
3093
3108
|
)
|
|
3094
3109
|
]
|
|
@@ -3106,7 +3121,7 @@ function aa({
|
|
|
3106
3121
|
"aria-invalid": !!a || h["aria-invalid"],
|
|
3107
3122
|
"data-has-value": y ? "true" : void 0,
|
|
3108
3123
|
className: `h-12 w-full pt-5 ${v ? "pr-10" : ""} ${p}`,
|
|
3109
|
-
onFocus:
|
|
3124
|
+
onFocus: P,
|
|
3110
3125
|
onBlur: C
|
|
3111
3126
|
}
|
|
3112
3127
|
),
|
|
@@ -3114,7 +3129,7 @@ function aa({
|
|
|
3114
3129
|
"span",
|
|
3115
3130
|
{
|
|
3116
3131
|
className: "pointer-events-none absolute left-3 transition-all duration-150",
|
|
3117
|
-
style:
|
|
3132
|
+
style: j,
|
|
3118
3133
|
children: [
|
|
3119
3134
|
e,
|
|
3120
3135
|
d && /* @__PURE__ */ t("span", { className: "ml-1 text-[var(--danger)]", children: "*" })
|
|
@@ -3125,11 +3140,11 @@ function aa({
|
|
|
3125
3140
|
"span",
|
|
3126
3141
|
{
|
|
3127
3142
|
className: "absolute right-2 transition-all duration-150",
|
|
3128
|
-
style: { top:
|
|
3143
|
+
style: { top: T ? 8 : 15 },
|
|
3129
3144
|
children: s
|
|
3130
3145
|
}
|
|
3131
3146
|
),
|
|
3132
|
-
|
|
3147
|
+
M
|
|
3133
3148
|
] }),
|
|
3134
3149
|
a ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--danger)]", children: a }) : n ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--text-muted)]", children: n }) : null
|
|
3135
3150
|
] }) : /* @__PURE__ */ i("label", { className: `flex flex-col gap-2 ${r}`, children: [
|
|
@@ -3147,11 +3162,11 @@ function aa({
|
|
|
3147
3162
|
required: d,
|
|
3148
3163
|
"aria-invalid": !!a || h["aria-invalid"],
|
|
3149
3164
|
className: `w-full pr-10 ${p}`,
|
|
3150
|
-
onFocus:
|
|
3165
|
+
onFocus: P,
|
|
3151
3166
|
onBlur: C
|
|
3152
3167
|
}
|
|
3153
3168
|
),
|
|
3154
|
-
|
|
3169
|
+
M
|
|
3155
3170
|
] }) : /* @__PURE__ */ t(
|
|
3156
3171
|
at,
|
|
3157
3172
|
{
|
|
@@ -3164,10 +3179,10 @@ function aa({
|
|
|
3164
3179
|
a ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--danger)]", children: a }) : n ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--text-muted)]", children: n }) : null
|
|
3165
3180
|
] });
|
|
3166
3181
|
}
|
|
3167
|
-
function
|
|
3182
|
+
function Ee(...e) {
|
|
3168
3183
|
return e.filter(Boolean).join(" ");
|
|
3169
3184
|
}
|
|
3170
|
-
function
|
|
3185
|
+
function oa({
|
|
3171
3186
|
steps: e,
|
|
3172
3187
|
activeStepId: r,
|
|
3173
3188
|
initialStepId: n,
|
|
@@ -3187,50 +3202,50 @@ function ia({
|
|
|
3187
3202
|
footerClassName: y = ""
|
|
3188
3203
|
}) {
|
|
3189
3204
|
var de;
|
|
3190
|
-
const
|
|
3191
|
-
n ??
|
|
3192
|
-
), [C,
|
|
3205
|
+
const T = ((de = e[0]) == null ? void 0 : de.id) ?? "", [j, P] = D(
|
|
3206
|
+
n ?? T
|
|
3207
|
+
), [C, M] = D(
|
|
3193
3208
|
s
|
|
3194
|
-
),
|
|
3209
|
+
), B = r ?? j, $ = a ?? C, _ = ze(
|
|
3195
3210
|
() => new Set($),
|
|
3196
3211
|
[$]
|
|
3197
|
-
),
|
|
3212
|
+
), E = Math.max(
|
|
3198
3213
|
0,
|
|
3199
|
-
e.findIndex((k) => k.id ===
|
|
3200
|
-
),
|
|
3201
|
-
a ||
|
|
3214
|
+
e.findIndex((k) => k.id === B)
|
|
3215
|
+
), L = e[E] ?? e[0], I = e.length <= 1 ? 100 : E / (e.length - 1) * 100, J = (k) => {
|
|
3216
|
+
a || M(k), f == null || f(k);
|
|
3202
3217
|
}, W = (k) => {
|
|
3203
|
-
const
|
|
3204
|
-
|
|
3205
|
-
}, F = (k) =>
|
|
3206
|
-
const
|
|
3207
|
-
return !
|
|
3218
|
+
const R = e.find((q) => q.id === k);
|
|
3219
|
+
R && (r || P(k), u == null || u(k, R));
|
|
3220
|
+
}, F = (k) => _.has(k), V = (k) => e.slice(0, k).find((R) => !R.optional && !_.has(R.id)), Q = (k) => {
|
|
3221
|
+
const R = e[k];
|
|
3222
|
+
return !R || R.disabled ? !1 : k === E || d && k < E ? !0 : !V(k);
|
|
3208
3223
|
}, o = (k) => {
|
|
3209
|
-
const
|
|
3210
|
-
return
|
|
3224
|
+
const R = e.findIndex((q) => q.id === k);
|
|
3225
|
+
return R >= 0 && Q(R);
|
|
3211
3226
|
}, w = (k) => {
|
|
3212
|
-
const
|
|
3213
|
-
if (
|
|
3214
|
-
if (!Q(
|
|
3215
|
-
const q = V(
|
|
3216
|
-
return q && (p == null || p(e[
|
|
3227
|
+
const R = e.findIndex((q) => q.id === k);
|
|
3228
|
+
if (R < 0) return !1;
|
|
3229
|
+
if (!Q(R)) {
|
|
3230
|
+
const q = V(R);
|
|
3231
|
+
return q && (p == null || p(e[R], q)), !1;
|
|
3217
3232
|
}
|
|
3218
3233
|
return W(k), !0;
|
|
3219
|
-
}, U = (k =
|
|
3220
|
-
!k ||
|
|
3221
|
-
}, Y = (k =
|
|
3234
|
+
}, U = (k = L == null ? void 0 : L.id) => {
|
|
3235
|
+
!k || _.has(k) || J([...$, k]);
|
|
3236
|
+
}, Y = (k = L == null ? void 0 : L.id) => {
|
|
3222
3237
|
if (!k) return;
|
|
3223
|
-
const
|
|
3238
|
+
const R = e.findIndex((ae) => ae.id === k), q = $.filter((ae) => {
|
|
3224
3239
|
const oe = e.findIndex((z) => z.id === ae);
|
|
3225
|
-
return oe >= 0 && oe <
|
|
3240
|
+
return oe >= 0 && oe < R;
|
|
3226
3241
|
});
|
|
3227
|
-
J(q),
|
|
3228
|
-
}, X = () =>
|
|
3229
|
-
const k = e[
|
|
3242
|
+
J(q), R >= 0 && E > R && W(k);
|
|
3243
|
+
}, X = () => E <= 0 ? !1 : w(e[E - 1].id), te = () => {
|
|
3244
|
+
const k = e[E + 1];
|
|
3230
3245
|
return k ? w(k.id) : !1;
|
|
3231
3246
|
}, ce = {
|
|
3232
|
-
activeStep:
|
|
3233
|
-
activeIndex:
|
|
3247
|
+
activeStep: L,
|
|
3248
|
+
activeIndex: E,
|
|
3234
3249
|
completedStepIds: $,
|
|
3235
3250
|
isCompleted: F,
|
|
3236
3251
|
isUnlocked: o,
|
|
@@ -3240,12 +3255,12 @@ function ia({
|
|
|
3240
3255
|
goNext: te,
|
|
3241
3256
|
goPrevious: X
|
|
3242
3257
|
};
|
|
3243
|
-
if (!
|
|
3244
|
-
const ne = e[
|
|
3258
|
+
if (!L) return null;
|
|
3259
|
+
const ne = e[E + 1], Ne = E > 0, pe = ne ? o(ne.id) : !1, he = typeof L.content == "function" ? L.content(ce) : L.content;
|
|
3245
3260
|
return /* @__PURE__ */ i(
|
|
3246
3261
|
"section",
|
|
3247
3262
|
{
|
|
3248
|
-
className:
|
|
3263
|
+
className: Ee(
|
|
3249
3264
|
"overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-card)]",
|
|
3250
3265
|
m
|
|
3251
3266
|
),
|
|
@@ -3253,7 +3268,7 @@ function ia({
|
|
|
3253
3268
|
/* @__PURE__ */ i(
|
|
3254
3269
|
"div",
|
|
3255
3270
|
{
|
|
3256
|
-
className:
|
|
3271
|
+
className: Ee(
|
|
3257
3272
|
"border-b border-[var(--border)] bg-[var(--bg-input)]",
|
|
3258
3273
|
v
|
|
3259
3274
|
),
|
|
@@ -3262,7 +3277,7 @@ function ia({
|
|
|
3262
3277
|
"div",
|
|
3263
3278
|
{
|
|
3264
3279
|
className: "h-full rounded-r-full bg-[var(--primary)] transition-[width] duration-500 ease-out",
|
|
3265
|
-
style: { width: `${
|
|
3280
|
+
style: { width: `${I}%` }
|
|
3266
3281
|
}
|
|
3267
3282
|
) }),
|
|
3268
3283
|
/* @__PURE__ */ t(
|
|
@@ -3272,8 +3287,8 @@ function ia({
|
|
|
3272
3287
|
style: {
|
|
3273
3288
|
gridTemplateColumns: `repeat(${e.length}, minmax(0, 1fr))`
|
|
3274
3289
|
},
|
|
3275
|
-
children: e.map((k,
|
|
3276
|
-
const q = k.id ===
|
|
3290
|
+
children: e.map((k, R) => {
|
|
3291
|
+
const q = k.id === L.id, ae = F(k.id), oe = Q(R), z = V(R);
|
|
3277
3292
|
return /* @__PURE__ */ i(
|
|
3278
3293
|
"button",
|
|
3279
3294
|
{
|
|
@@ -3283,7 +3298,7 @@ function ia({
|
|
|
3283
3298
|
"aria-disabled": !oe,
|
|
3284
3299
|
title: !oe && z ? `Completa ${z.title}` : k.title,
|
|
3285
3300
|
onClick: () => w(k.id),
|
|
3286
|
-
className:
|
|
3301
|
+
className: Ee(
|
|
3287
3302
|
"group relative min-h-16 min-w-0 overflow-hidden rounded-md border p-3 text-left transition-all duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--primary)]/35 disabled:cursor-not-allowed",
|
|
3288
3303
|
q && "border-[var(--primary)] bg-[var(--bg-card)] shadow-sm",
|
|
3289
3304
|
ae && !q && "border-[var(--primary)]/35 bg-[var(--bg-card)]",
|
|
@@ -3294,7 +3309,7 @@ function ia({
|
|
|
3294
3309
|
/* @__PURE__ */ t(
|
|
3295
3310
|
"span",
|
|
3296
3311
|
{
|
|
3297
|
-
className:
|
|
3312
|
+
className: Ee(
|
|
3298
3313
|
"absolute inset-x-0 top-0 h-0.5 origin-left scale-x-0 bg-[var(--primary)] transition-transform duration-300",
|
|
3299
3314
|
q && "scale-x-100"
|
|
3300
3315
|
)
|
|
@@ -3304,26 +3319,26 @@ function ia({
|
|
|
3304
3319
|
/* @__PURE__ */ t(
|
|
3305
3320
|
"span",
|
|
3306
3321
|
{
|
|
3307
|
-
className:
|
|
3322
|
+
className: Ee(
|
|
3308
3323
|
"grid h-7 w-7 shrink-0 place-items-center rounded-full border text-xs font-bold transition-all duration-200",
|
|
3309
3324
|
q && "border-[var(--primary)] bg-[var(--primary)] text-[var(--primary-fg)]",
|
|
3310
3325
|
ae && !q && "border-[var(--primary)] bg-[var(--primary)]/12 text-[var(--primary)]",
|
|
3311
3326
|
!ae && !q && oe && "border-[var(--border)] text-[var(--text-muted)]",
|
|
3312
3327
|
!oe && "border-[var(--border)] text-[var(--text-muted)]"
|
|
3313
3328
|
),
|
|
3314
|
-
children: ae ? /* @__PURE__ */ t(Pt, { className: "h-4 w-4" }) : oe ?
|
|
3329
|
+
children: ae ? /* @__PURE__ */ t(Pt, { className: "h-4 w-4" }) : oe ? R + 1 : /* @__PURE__ */ t(cr, { className: "h-3.5 w-3.5" })
|
|
3315
3330
|
}
|
|
3316
3331
|
),
|
|
3317
3332
|
/* @__PURE__ */ i("span", { className: "min-w-0 flex-1", children: [
|
|
3318
3333
|
/* @__PURE__ */ i(
|
|
3319
3334
|
"span",
|
|
3320
3335
|
{
|
|
3321
|
-
className:
|
|
3336
|
+
className: Ee(
|
|
3322
3337
|
"block truncate text-xs font-semibold transition-colors duration-200",
|
|
3323
3338
|
q ? "text-[var(--text-main)]" : "text-[var(--text-secondary)]"
|
|
3324
3339
|
),
|
|
3325
3340
|
children: [
|
|
3326
|
-
|
|
3341
|
+
R + 1,
|
|
3327
3342
|
". ",
|
|
3328
3343
|
k.title
|
|
3329
3344
|
]
|
|
@@ -3346,18 +3361,18 @@ function ia({
|
|
|
3346
3361
|
/* @__PURE__ */ t(
|
|
3347
3362
|
"div",
|
|
3348
3363
|
{
|
|
3349
|
-
className:
|
|
3364
|
+
className: Ee(
|
|
3350
3365
|
"min-h-72 animate-[stepWizardIn_220ms_ease-out] p-5",
|
|
3351
3366
|
c
|
|
3352
3367
|
),
|
|
3353
3368
|
children: he
|
|
3354
3369
|
},
|
|
3355
|
-
|
|
3370
|
+
L.id
|
|
3356
3371
|
),
|
|
3357
3372
|
h && /* @__PURE__ */ i(
|
|
3358
3373
|
"div",
|
|
3359
3374
|
{
|
|
3360
|
-
className:
|
|
3375
|
+
className: Ee(
|
|
3361
3376
|
"flex flex-wrap items-center justify-between gap-3 border-t border-[var(--border)] bg-[var(--bg-input)] px-4 py-3",
|
|
3362
3377
|
y
|
|
3363
3378
|
),
|
|
@@ -3377,7 +3392,7 @@ function ia({
|
|
|
3377
3392
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-3 text-xs text-[var(--text-muted)]", children: [
|
|
3378
3393
|
/* @__PURE__ */ i("span", { children: [
|
|
3379
3394
|
"Paso ",
|
|
3380
|
-
|
|
3395
|
+
E + 1,
|
|
3381
3396
|
" de ",
|
|
3382
3397
|
e.length
|
|
3383
3398
|
] }),
|
|
@@ -3405,7 +3420,7 @@ function ia({
|
|
|
3405
3420
|
}
|
|
3406
3421
|
);
|
|
3407
3422
|
}
|
|
3408
|
-
const
|
|
3423
|
+
const pn = {
|
|
3409
3424
|
xs: {
|
|
3410
3425
|
width: 28,
|
|
3411
3426
|
height: 16,
|
|
@@ -3419,7 +3434,7 @@ const fn = {
|
|
|
3419
3434
|
padding: 2
|
|
3420
3435
|
}
|
|
3421
3436
|
};
|
|
3422
|
-
function
|
|
3437
|
+
function sa({
|
|
3423
3438
|
checked: e,
|
|
3424
3439
|
disabled: r,
|
|
3425
3440
|
onCheckedChange: n,
|
|
@@ -3427,7 +3442,7 @@ function oa({
|
|
|
3427
3442
|
className: s = "",
|
|
3428
3443
|
...u
|
|
3429
3444
|
}) {
|
|
3430
|
-
const f =
|
|
3445
|
+
const f = pn[a], p = e ? f.width - f.thumb - f.padding * 2 : 0;
|
|
3431
3446
|
return /* @__PURE__ */ t(
|
|
3432
3447
|
"button",
|
|
3433
3448
|
{
|
|
@@ -3461,11 +3476,11 @@ function oa({
|
|
|
3461
3476
|
}
|
|
3462
3477
|
);
|
|
3463
3478
|
}
|
|
3464
|
-
const
|
|
3479
|
+
const Mt = [
|
|
3465
3480
|
".sidebar-scroll",
|
|
3466
3481
|
"[data-overlay-scroll='true']"
|
|
3467
3482
|
].join(",");
|
|
3468
|
-
function
|
|
3483
|
+
function hn(e) {
|
|
3469
3484
|
if (!(e instanceof HTMLElement) || e.dataset.overlayScroll === "false" || e.closest("[data-overlayscrollbars]") || e.matches("textarea,input,select,[contenteditable='true']"))
|
|
3470
3485
|
return !1;
|
|
3471
3486
|
const r = window.getComputedStyle(e);
|
|
@@ -3483,13 +3498,13 @@ function Bt(e) {
|
|
|
3483
3498
|
r.style.display = "none", r.style.height = "0", r.style.pointerEvents = "none";
|
|
3484
3499
|
});
|
|
3485
3500
|
}
|
|
3486
|
-
function
|
|
3487
|
-
return
|
|
3501
|
+
function bn() {
|
|
3502
|
+
return H(() => {
|
|
3488
3503
|
const e = /* @__PURE__ */ new WeakMap();
|
|
3489
3504
|
let r = 0;
|
|
3490
3505
|
const n = () => {
|
|
3491
|
-
r = 0, document.querySelectorAll(
|
|
3492
|
-
if (!
|
|
3506
|
+
r = 0, document.querySelectorAll(Mt).forEach((u) => {
|
|
3507
|
+
if (!hn(u)) return;
|
|
3493
3508
|
if (yt(u)) {
|
|
3494
3509
|
Bt(u);
|
|
3495
3510
|
return;
|
|
@@ -3514,14 +3529,14 @@ function hn() {
|
|
|
3514
3529
|
attributes: !0,
|
|
3515
3530
|
attributeFilter: ["class", "data-overlay-scroll"]
|
|
3516
3531
|
}), window.addEventListener("resize", a), () => {
|
|
3517
|
-
r && window.cancelAnimationFrame(r), s.disconnect(), window.removeEventListener("resize", a), document.querySelectorAll(
|
|
3532
|
+
r && window.cancelAnimationFrame(r), s.disconnect(), window.removeEventListener("resize", a), document.querySelectorAll(Mt).forEach((u) => {
|
|
3518
3533
|
var f;
|
|
3519
3534
|
u instanceof HTMLElement && ((f = e.get(u)) == null || f.destroy());
|
|
3520
3535
|
});
|
|
3521
3536
|
};
|
|
3522
3537
|
}, []), null;
|
|
3523
3538
|
}
|
|
3524
|
-
const
|
|
3539
|
+
const xn = {
|
|
3525
3540
|
xs: { wh: "w-5 h-5", text: "text-[8px]" },
|
|
3526
3541
|
sm: { wh: "w-7 h-7", text: "text-[11px]" },
|
|
3527
3542
|
md: { wh: "w-9 h-9", text: "text-sm" },
|
|
@@ -3536,12 +3551,12 @@ const bn = {
|
|
|
3536
3551
|
"bg-teal-500",
|
|
3537
3552
|
"bg-rose-500",
|
|
3538
3553
|
"bg-cyan-500"
|
|
3539
|
-
],
|
|
3554
|
+
], vn = {
|
|
3540
3555
|
xs: "text-xs",
|
|
3541
3556
|
sm: "text-sm",
|
|
3542
3557
|
md: "text-base",
|
|
3543
3558
|
lg: "text-lg"
|
|
3544
|
-
},
|
|
3559
|
+
}, gn = "bonsaif.bot", yn = "Bonsaif Bot", wn = {
|
|
3545
3560
|
xs: "p-0.5",
|
|
3546
3561
|
sm: "p-1",
|
|
3547
3562
|
md: "p-1.5",
|
|
@@ -3551,15 +3566,15 @@ const bn = {
|
|
|
3551
3566
|
function Lt(e) {
|
|
3552
3567
|
return typeof e == "string" ? e.trim() : "";
|
|
3553
3568
|
}
|
|
3554
|
-
function
|
|
3569
|
+
function Nn(e) {
|
|
3555
3570
|
let r = 0;
|
|
3556
3571
|
for (const n of e) r = r * 31 + n.charCodeAt(0) & 65535;
|
|
3557
3572
|
return Tt[r % Tt.length];
|
|
3558
3573
|
}
|
|
3559
|
-
function
|
|
3560
|
-
return e ===
|
|
3574
|
+
function kn(e, r) {
|
|
3575
|
+
return e === gn || r === yn;
|
|
3561
3576
|
}
|
|
3562
|
-
function
|
|
3577
|
+
function Sn({
|
|
3563
3578
|
userId: e,
|
|
3564
3579
|
username: r,
|
|
3565
3580
|
name: n,
|
|
@@ -3577,27 +3592,27 @@ function kn({
|
|
|
3577
3592
|
}) {
|
|
3578
3593
|
var W;
|
|
3579
3594
|
const [v, c] = D(!1), y = typeof e == "string" && e.trim() && e !== "undefined" && e !== "null" ? e.trim() : "";
|
|
3580
|
-
|
|
3595
|
+
H(() => {
|
|
3581
3596
|
c(!1);
|
|
3582
3597
|
}, [y, S]);
|
|
3583
|
-
const { wh:
|
|
3598
|
+
const { wh: T, text: j } = xn[a], P = Lt(n) || Lt(r) || p, C = P.trim()[0] || "?", M = typeof process < "u" && ((W = process.env) == null ? void 0 : W.NEXT_PUBLIC_BASE_PATH) || "", B = kn(r, n), $ = y ? `${M}/api/user/avatar/${y}${S ? `?v=${S}` : ""}` : "", E = {
|
|
3584
3599
|
xs: 20,
|
|
3585
3600
|
sm: 28,
|
|
3586
3601
|
md: 36,
|
|
3587
3602
|
lg: 48,
|
|
3588
3603
|
xl: 64
|
|
3589
|
-
}[a],
|
|
3604
|
+
}[a], L = B ? /* @__PURE__ */ t(
|
|
3590
3605
|
"span",
|
|
3591
3606
|
{
|
|
3592
|
-
className: `${
|
|
3607
|
+
className: `${T} ${wn[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 ${b}`,
|
|
3593
3608
|
style: m,
|
|
3594
3609
|
children: /* @__PURE__ */ t(
|
|
3595
3610
|
"img",
|
|
3596
3611
|
{
|
|
3597
|
-
src: `${
|
|
3598
|
-
alt:
|
|
3599
|
-
width:
|
|
3600
|
-
height:
|
|
3612
|
+
src: `${M}/favicon.svg`,
|
|
3613
|
+
alt: P,
|
|
3614
|
+
width: E,
|
|
3615
|
+
height: E,
|
|
3601
3616
|
className: "h-full w-full object-contain"
|
|
3602
3617
|
}
|
|
3603
3618
|
)
|
|
@@ -3606,10 +3621,10 @@ function kn({
|
|
|
3606
3621
|
"img",
|
|
3607
3622
|
{
|
|
3608
3623
|
src: $,
|
|
3609
|
-
alt:
|
|
3610
|
-
width:
|
|
3611
|
-
height:
|
|
3612
|
-
className: `${
|
|
3624
|
+
alt: P,
|
|
3625
|
+
width: E,
|
|
3626
|
+
height: E,
|
|
3627
|
+
className: `${T} rounded-full object-cover flex-shrink-0 ${b}`,
|
|
3613
3628
|
style: m,
|
|
3614
3629
|
onError: () => c(!0)
|
|
3615
3630
|
},
|
|
@@ -3617,9 +3632,9 @@ function kn({
|
|
|
3617
3632
|
) : /* @__PURE__ */ t(
|
|
3618
3633
|
"span",
|
|
3619
3634
|
{
|
|
3620
|
-
className: `${
|
|
3635
|
+
className: `${T} ${Nn(P)} ${j} rounded-full flex items-center justify-center font-black text-white uppercase flex-shrink-0 ${b}`,
|
|
3621
3636
|
style: m,
|
|
3622
|
-
title:
|
|
3637
|
+
title: P,
|
|
3623
3638
|
children: C
|
|
3624
3639
|
}
|
|
3625
3640
|
);
|
|
@@ -3629,33 +3644,33 @@ function kn({
|
|
|
3629
3644
|
{
|
|
3630
3645
|
className: `inline-flex min-w-0 items-center gap-2 ${d}`,
|
|
3631
3646
|
children: [
|
|
3632
|
-
|
|
3647
|
+
L,
|
|
3633
3648
|
/* @__PURE__ */ t(
|
|
3634
3649
|
"span",
|
|
3635
3650
|
{
|
|
3636
|
-
className: `min-w-0 truncate ${
|
|
3637
|
-
title:
|
|
3638
|
-
children:
|
|
3651
|
+
className: `min-w-0 truncate ${vn[N]} font-medium text-[var(--text-main)] ${h}`,
|
|
3652
|
+
title: P,
|
|
3653
|
+
children: P
|
|
3639
3654
|
}
|
|
3640
3655
|
)
|
|
3641
3656
|
]
|
|
3642
3657
|
}
|
|
3643
3658
|
);
|
|
3644
|
-
const
|
|
3645
|
-
return
|
|
3659
|
+
const I = u ?? !0, J = f ?? P;
|
|
3660
|
+
return I && J ? /* @__PURE__ */ t(
|
|
3646
3661
|
ut,
|
|
3647
3662
|
{
|
|
3648
3663
|
as: "span",
|
|
3649
3664
|
content: J,
|
|
3650
3665
|
className: `inline-flex flex-shrink-0 ${d}`,
|
|
3651
|
-
children:
|
|
3666
|
+
children: L
|
|
3652
3667
|
}
|
|
3653
|
-
) :
|
|
3668
|
+
) : L;
|
|
3654
3669
|
}
|
|
3655
|
-
function
|
|
3670
|
+
function Cn({ href: e, className: r, children: n }) {
|
|
3656
3671
|
return /* @__PURE__ */ t("a", { href: e, className: r, children: n });
|
|
3657
3672
|
}
|
|
3658
|
-
function
|
|
3673
|
+
function En(e) {
|
|
3659
3674
|
return e.reduce((r, n) => {
|
|
3660
3675
|
const a = n.section ?? "Principal";
|
|
3661
3676
|
return r[a] = [...r[a] ?? [], n], r;
|
|
@@ -3671,11 +3686,11 @@ function $n({
|
|
|
3671
3686
|
header: f,
|
|
3672
3687
|
footer: p,
|
|
3673
3688
|
onLogout: d,
|
|
3674
|
-
LinkComponent: h =
|
|
3689
|
+
LinkComponent: h = Cn
|
|
3675
3690
|
}) {
|
|
3676
|
-
const [N, S] = D(!1), b =
|
|
3691
|
+
const [N, S] = D(!1), b = En(r);
|
|
3677
3692
|
return /* @__PURE__ */ i("div", { className: "min-h-screen bg-[var(--bg-main)] text-[var(--text-main)]", children: [
|
|
3678
|
-
/* @__PURE__ */ t(
|
|
3693
|
+
/* @__PURE__ */ t(bn, {}),
|
|
3679
3694
|
/* @__PURE__ */ t(
|
|
3680
3695
|
"button",
|
|
3681
3696
|
{
|
|
@@ -3710,7 +3725,7 @@ function $n({
|
|
|
3710
3725
|
"aria-label": "Cerrar navegación",
|
|
3711
3726
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-white/70 hover:bg-white/10 lg:hidden",
|
|
3712
3727
|
onClick: () => S(!1),
|
|
3713
|
-
children: /* @__PURE__ */ t(
|
|
3728
|
+
children: /* @__PURE__ */ t($e, { className: "h-5 w-5" })
|
|
3714
3729
|
}
|
|
3715
3730
|
)
|
|
3716
3731
|
] }),
|
|
@@ -3745,7 +3760,7 @@ function $n({
|
|
|
3745
3760
|
/* @__PURE__ */ i("div", { className: "border-t border-white/10 p-3", children: [
|
|
3746
3761
|
a && /* @__PURE__ */ i("div", { className: "mb-3 flex min-w-0 items-center gap-3 rounded-lg bg-white/[0.04] p-2", children: [
|
|
3747
3762
|
/* @__PURE__ */ t(
|
|
3748
|
-
|
|
3763
|
+
Sn,
|
|
3749
3764
|
{
|
|
3750
3765
|
name: a.initials ?? a.name ?? a.email ?? "Usuario",
|
|
3751
3766
|
size: "md"
|
|
@@ -3779,7 +3794,7 @@ function $n({
|
|
|
3779
3794
|
] })
|
|
3780
3795
|
] });
|
|
3781
3796
|
}
|
|
3782
|
-
const
|
|
3797
|
+
const On = {
|
|
3783
3798
|
dashboard: "Dashboard",
|
|
3784
3799
|
tickets: "Tickets",
|
|
3785
3800
|
teams: "Equipos",
|
|
@@ -3833,17 +3848,17 @@ function Mn({
|
|
|
3833
3848
|
}) {
|
|
3834
3849
|
return /* @__PURE__ */ t("a", { href: e, className: r, style: n, children: a });
|
|
3835
3850
|
}
|
|
3836
|
-
function
|
|
3851
|
+
function Bn(e) {
|
|
3837
3852
|
return e.split("-").map((r) => r.charAt(0).toUpperCase() + r.slice(1)).join(" ");
|
|
3838
3853
|
}
|
|
3839
|
-
function
|
|
3854
|
+
function Tn(e) {
|
|
3840
3855
|
return /^\d+$/.test(e) || /^[a-f0-9]{8,}$/i.test(e);
|
|
3841
3856
|
}
|
|
3842
|
-
function
|
|
3857
|
+
function Ln(e) {
|
|
3843
3858
|
const r = e.split("/").filter(Boolean);
|
|
3844
3859
|
if (r.length === 0 || r.length === 1 && r[0] === "dashboard")
|
|
3845
3860
|
return [];
|
|
3846
|
-
const n = decodeURIComponent(r[r.length - 1]), a = r.length > 1 ? decodeURIComponent(r[r.length - 2]) : void 0, s =
|
|
3861
|
+
const n = decodeURIComponent(r[r.length - 1]), a = r.length > 1 ? decodeURIComponent(r[r.length - 2]) : void 0, s = Tn(n) && a ? a : n, u = On[s] ?? Bn(s);
|
|
3847
3862
|
return [{ label: "Inicio", href: "/" }, { label: u }];
|
|
3848
3863
|
}
|
|
3849
3864
|
function ot(e) {
|
|
@@ -3851,14 +3866,14 @@ function ot(e) {
|
|
|
3851
3866
|
":scope > [data-overlayscrollbars-viewport]"
|
|
3852
3867
|
));
|
|
3853
3868
|
}
|
|
3854
|
-
function
|
|
3869
|
+
function Dn(e) {
|
|
3855
3870
|
const r = e.split("/").filter(Boolean), n = r[r.length - 1];
|
|
3856
3871
|
if (!n) return /* @__PURE__ */ t(Xe, { className: "h-5 w-5" });
|
|
3857
3872
|
if (it[n]) return it[n];
|
|
3858
3873
|
const a = r.length > 1 ? r[r.length - 2] : "";
|
|
3859
3874
|
return it[a] ?? /* @__PURE__ */ t(Xe, { className: "h-5 w-5" });
|
|
3860
3875
|
}
|
|
3861
|
-
function
|
|
3876
|
+
function la({
|
|
3862
3877
|
title: e,
|
|
3863
3878
|
subtitle: r,
|
|
3864
3879
|
action: n,
|
|
@@ -3872,36 +3887,36 @@ function sa({
|
|
|
3872
3887
|
contained: N = !1,
|
|
3873
3888
|
LinkComponent: S = Mn
|
|
3874
3889
|
}) {
|
|
3875
|
-
const b = re(null), [m, v] = D(!1), [c, y] = D(null),
|
|
3876
|
-
return
|
|
3890
|
+
const b = re(null), [m, v] = D(!1), [c, y] = D(null), T = p ?? Ln(d), j = s ?? Dn(d), P = h && T.length > 1;
|
|
3891
|
+
return H(() => {
|
|
3877
3892
|
if (N) {
|
|
3878
3893
|
v(!1);
|
|
3879
3894
|
return;
|
|
3880
3895
|
}
|
|
3881
|
-
let C = null,
|
|
3896
|
+
let C = null, M = 0, B = 0;
|
|
3882
3897
|
const $ = () => {
|
|
3883
|
-
const
|
|
3898
|
+
const L = b.current, I = document.querySelector(
|
|
3884
3899
|
"[data-app-scroll='true']"
|
|
3885
3900
|
);
|
|
3886
|
-
return (
|
|
3901
|
+
return (L == null ? void 0 : L.closest(".os-viewport")) ?? (L == null ? void 0 : L.closest(
|
|
3887
3902
|
"[data-overlayscrollbars-viewport]"
|
|
3888
|
-
)) ?? ot(
|
|
3889
|
-
},
|
|
3890
|
-
const
|
|
3891
|
-
v((
|
|
3892
|
-
},
|
|
3893
|
-
C == null || C.removeEventListener("scroll",
|
|
3903
|
+
)) ?? ot(I) ?? I ?? window;
|
|
3904
|
+
}, _ = () => {
|
|
3905
|
+
const L = C && C !== window ? C.scrollTop : window.scrollY;
|
|
3906
|
+
v((I) => I ? L > 24 : L > 72);
|
|
3907
|
+
}, E = () => {
|
|
3908
|
+
C == null || C.removeEventListener("scroll", _), C = $(), C.addEventListener("scroll", _, { passive: !0 }), _();
|
|
3894
3909
|
};
|
|
3895
|
-
return
|
|
3896
|
-
window.cancelAnimationFrame(
|
|
3910
|
+
return E(), M = window.requestAnimationFrame(E), B = window.setTimeout(E, 120), () => {
|
|
3911
|
+
window.cancelAnimationFrame(M), window.clearTimeout(B), C == null || C.removeEventListener("scroll", _);
|
|
3897
3912
|
};
|
|
3898
|
-
}, [N]),
|
|
3913
|
+
}, [N]), H(() => {
|
|
3899
3914
|
if (N) {
|
|
3900
3915
|
y(null);
|
|
3901
3916
|
return;
|
|
3902
3917
|
}
|
|
3903
3918
|
let C = 0;
|
|
3904
|
-
const
|
|
3919
|
+
const M = [], B = () => {
|
|
3905
3920
|
const W = b.current, F = W == null ? void 0 : W.parentElement, V = document.querySelector(
|
|
3906
3921
|
"[data-app-scroll='true']"
|
|
3907
3922
|
), Q = ot(V) ?? V;
|
|
@@ -3917,16 +3932,16 @@ function sa({
|
|
|
3917
3932
|
(ce) => ce && ce.marginLeft === te.marginLeft && ce.width === te.width ? ce : te
|
|
3918
3933
|
);
|
|
3919
3934
|
}, $ = () => {
|
|
3920
|
-
window.cancelAnimationFrame(C), C = window.requestAnimationFrame(
|
|
3935
|
+
window.cancelAnimationFrame(C), C = window.requestAnimationFrame(B);
|
|
3921
3936
|
};
|
|
3922
3937
|
$(), window.addEventListener("resize", $);
|
|
3923
|
-
const
|
|
3938
|
+
const _ = new ResizeObserver($), E = b.current, L = E == null ? void 0 : E.parentElement, I = document.querySelector(
|
|
3924
3939
|
"[data-app-scroll='true']"
|
|
3925
|
-
), J = ot(
|
|
3926
|
-
return [
|
|
3927
|
-
W &&
|
|
3928
|
-
}),
|
|
3929
|
-
window.cancelAnimationFrame(C), window.removeEventListener("resize", $),
|
|
3940
|
+
), J = ot(I) ?? I;
|
|
3941
|
+
return [L, I, J].forEach((W) => {
|
|
3942
|
+
W && _.observe(W);
|
|
3943
|
+
}), M.push(window.setTimeout($, 120)), M.push(window.setTimeout($, 280)), () => {
|
|
3944
|
+
window.cancelAnimationFrame(C), window.removeEventListener("resize", $), _.disconnect(), M.forEach((W) => window.clearTimeout(W));
|
|
3930
3945
|
};
|
|
3931
3946
|
}, [N]), /* @__PURE__ */ t(
|
|
3932
3947
|
"div",
|
|
@@ -3953,7 +3968,7 @@ function sa({
|
|
|
3953
3968
|
{
|
|
3954
3969
|
className: `min-w-0 flex flex-1 flex-col justify-center transition-[gap,transform] duration-300 ease-out ${m ? "gap-1" : "gap-1.5 sm:gap-2"}`,
|
|
3955
3970
|
children: [
|
|
3956
|
-
|
|
3971
|
+
P && /* @__PURE__ */ t(
|
|
3957
3972
|
"nav",
|
|
3958
3973
|
{
|
|
3959
3974
|
"aria-label": "Breadcrumb",
|
|
@@ -3962,21 +3977,21 @@ function sa({
|
|
|
3962
3977
|
"ol",
|
|
3963
3978
|
{
|
|
3964
3979
|
className: `flex flex-wrap items-center gap-1.5 leading-none transition-[font-size,line-height] duration-300 ease-out ${m ? "text-[10px]" : "text-[10px] sm:text-[11px]"}`,
|
|
3965
|
-
children:
|
|
3966
|
-
const
|
|
3980
|
+
children: T.map((C, M) => {
|
|
3981
|
+
const B = M === T.length - 1;
|
|
3967
3982
|
return /* @__PURE__ */ i(
|
|
3968
3983
|
"li",
|
|
3969
3984
|
{
|
|
3970
3985
|
className: "flex min-w-0 items-center gap-1.5",
|
|
3971
3986
|
children: [
|
|
3972
|
-
|
|
3987
|
+
M > 0 && /* @__PURE__ */ t(
|
|
3973
3988
|
Te,
|
|
3974
3989
|
{
|
|
3975
3990
|
className: "h-3.5 w-3.5 transition-[color,transform] duration-300 ease-out",
|
|
3976
3991
|
style: { color: "var(--text-muted)" }
|
|
3977
3992
|
}
|
|
3978
3993
|
),
|
|
3979
|
-
C.href && !
|
|
3994
|
+
C.href && !B ? /* @__PURE__ */ t(
|
|
3980
3995
|
S,
|
|
3981
3996
|
{
|
|
3982
3997
|
href: C.href,
|
|
@@ -3987,17 +4002,17 @@ function sa({
|
|
|
3987
4002
|
) : /* @__PURE__ */ t(
|
|
3988
4003
|
"span",
|
|
3989
4004
|
{
|
|
3990
|
-
"aria-current":
|
|
3991
|
-
className:
|
|
4005
|
+
"aria-current": B ? "page" : void 0,
|
|
4006
|
+
className: B ? "truncate font-semibold" : "truncate",
|
|
3992
4007
|
style: {
|
|
3993
|
-
color:
|
|
4008
|
+
color: B ? "var(--text-main)" : "var(--text-muted)"
|
|
3994
4009
|
},
|
|
3995
4010
|
children: C.label
|
|
3996
4011
|
}
|
|
3997
4012
|
)
|
|
3998
4013
|
]
|
|
3999
4014
|
},
|
|
4000
|
-
`${C.label}-${
|
|
4015
|
+
`${C.label}-${M}`
|
|
4001
4016
|
);
|
|
4002
4017
|
})
|
|
4003
4018
|
}
|
|
@@ -4014,9 +4029,9 @@ function sa({
|
|
|
4014
4029
|
{
|
|
4015
4030
|
className: `flex-shrink-0 transition-[color,transform,opacity] duration-300 ease-out ${m ? "scale-75 opacity-80" : "scale-90 opacity-100"}`,
|
|
4016
4031
|
style: {
|
|
4017
|
-
color:
|
|
4032
|
+
color: P ? "var(--text-secondary)" : "var(--text-muted)"
|
|
4018
4033
|
},
|
|
4019
|
-
children:
|
|
4034
|
+
children: j
|
|
4020
4035
|
}
|
|
4021
4036
|
),
|
|
4022
4037
|
/* @__PURE__ */ i(
|
|
@@ -4063,7 +4078,13 @@ function sa({
|
|
|
4063
4078
|
"div",
|
|
4064
4079
|
{
|
|
4065
4080
|
className: `page-header-actions flex flex-shrink-0 items-center self-center overflow-visible transition-[gap,min-height,opacity,transform] duration-300 ease-out ${m ? "min-h-8 gap-1 opacity-95" : "min-h-9 gap-1.5 opacity-100"}`,
|
|
4066
|
-
children: /* @__PURE__ */ t(
|
|
4081
|
+
children: /* @__PURE__ */ t(
|
|
4082
|
+
zt.Provider,
|
|
4083
|
+
{
|
|
4084
|
+
value: { compact: !0, iconOnly: !0, headerAction: !0 },
|
|
4085
|
+
children: n
|
|
4086
|
+
}
|
|
4087
|
+
)
|
|
4067
4088
|
}
|
|
4068
4089
|
)
|
|
4069
4090
|
]
|
|
@@ -4072,7 +4093,7 @@ function sa({
|
|
|
4072
4093
|
}
|
|
4073
4094
|
);
|
|
4074
4095
|
}
|
|
4075
|
-
function
|
|
4096
|
+
function ca({
|
|
4076
4097
|
children: e,
|
|
4077
4098
|
currentPath: r = typeof window > "u" ? "/" : window.location.pathname,
|
|
4078
4099
|
publicRoutes: n = ["/", "/login", "/reset-password"],
|
|
@@ -4085,7 +4106,7 @@ function Dt() {
|
|
|
4085
4106
|
const e = localStorage.getItem("theme");
|
|
4086
4107
|
return e === "light" || e === "dark" ? e : e === "system" ? "system" : document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
4087
4108
|
}
|
|
4088
|
-
function
|
|
4109
|
+
function An(e, r, n) {
|
|
4089
4110
|
try {
|
|
4090
4111
|
const a = new URL(e), s = a.searchParams.get("callbackUrl");
|
|
4091
4112
|
if (s) {
|
|
@@ -4100,7 +4121,7 @@ function Dn(e, r, n) {
|
|
|
4100
4121
|
return e;
|
|
4101
4122
|
}
|
|
4102
4123
|
}
|
|
4103
|
-
function
|
|
4124
|
+
function da({
|
|
4104
4125
|
name: e,
|
|
4105
4126
|
src: r,
|
|
4106
4127
|
projectKey: n
|
|
@@ -4108,7 +4129,7 @@ function ca({
|
|
|
4108
4129
|
const [a, s] = D(
|
|
4109
4130
|
() => Dt()
|
|
4110
4131
|
), u = re(null);
|
|
4111
|
-
|
|
4132
|
+
H(() => {
|
|
4112
4133
|
const d = new MutationObserver(
|
|
4113
4134
|
() => s(Dt())
|
|
4114
4135
|
);
|
|
@@ -4118,7 +4139,7 @@ function ca({
|
|
|
4118
4139
|
}), () => d.disconnect();
|
|
4119
4140
|
}, []);
|
|
4120
4141
|
const f = ze(
|
|
4121
|
-
() =>
|
|
4142
|
+
() => An(r, a, n),
|
|
4122
4143
|
[n, r, a]
|
|
4123
4144
|
), p = ze(() => {
|
|
4124
4145
|
try {
|
|
@@ -4127,7 +4148,7 @@ function ca({
|
|
|
4127
4148
|
return "";
|
|
4128
4149
|
}
|
|
4129
4150
|
}, [f]);
|
|
4130
|
-
return
|
|
4151
|
+
return H(() => {
|
|
4131
4152
|
if (!n) return;
|
|
4132
4153
|
const d = n;
|
|
4133
4154
|
function h(N) {
|
|
@@ -4169,9 +4190,9 @@ function ca({
|
|
|
4169
4190
|
}
|
|
4170
4191
|
) });
|
|
4171
4192
|
}
|
|
4172
|
-
function
|
|
4193
|
+
function ua() {
|
|
4173
4194
|
const [e, r] = D(""), [n, a] = D(!1), [s, u] = D({ width: 96, height: 96 });
|
|
4174
|
-
return
|
|
4195
|
+
return H(() => {
|
|
4175
4196
|
let f = !1;
|
|
4176
4197
|
return fetch("/api/microservices/prime-suite/chat-url", { cache: "no-store" }).then((p) => p.ok ? p.json() : null).then((p) => {
|
|
4177
4198
|
!f && (p != null && p.src) && r(p.src);
|
|
@@ -4179,7 +4200,7 @@ function da() {
|
|
|
4179
4200
|
}), () => {
|
|
4180
4201
|
f = !0;
|
|
4181
4202
|
};
|
|
4182
|
-
}, []),
|
|
4203
|
+
}, []), H(() => {
|
|
4183
4204
|
const f = (p) => {
|
|
4184
4205
|
var h;
|
|
4185
4206
|
if (((h = p.data) == null ? void 0 : h.type) !== "prime-suite-chat:state") return;
|
|
@@ -4211,7 +4232,7 @@ function At(e, r, n) {
|
|
|
4211
4232
|
const a = typeof e == "number" && Number.isFinite(e) ? e : r;
|
|
4212
4233
|
return Math.max(r, Math.min(n, Math.ceil(a)));
|
|
4213
4234
|
}
|
|
4214
|
-
function
|
|
4235
|
+
function In(e) {
|
|
4215
4236
|
const r = document.documentElement, n = new MutationObserver(e);
|
|
4216
4237
|
n.observe(r, { attributes: !0, attributeFilter: ["class"] });
|
|
4217
4238
|
const a = window.matchMedia("(prefers-color-scheme: dark)");
|
|
@@ -4219,50 +4240,50 @@ function An(e) {
|
|
|
4219
4240
|
n.disconnect(), a.removeEventListener("change", e);
|
|
4220
4241
|
};
|
|
4221
4242
|
}
|
|
4222
|
-
function
|
|
4243
|
+
function Pn() {
|
|
4223
4244
|
const e = localStorage.getItem("theme") || "system", r = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
4224
4245
|
return document.documentElement.classList.contains("dark") || e === "dark" || e === "system" && r ? "dark" : "light";
|
|
4225
4246
|
}
|
|
4226
|
-
function
|
|
4247
|
+
function zn() {
|
|
4227
4248
|
return "light";
|
|
4228
4249
|
}
|
|
4229
|
-
function
|
|
4250
|
+
function ma() {
|
|
4230
4251
|
const e = nr(
|
|
4231
|
-
An,
|
|
4232
4252
|
In,
|
|
4233
|
-
Pn
|
|
4253
|
+
Pn,
|
|
4254
|
+
zn
|
|
4234
4255
|
);
|
|
4235
|
-
return /* @__PURE__ */ t(
|
|
4256
|
+
return /* @__PURE__ */ t(Er, { position: "bottom-center", theme: e, richColors: !0, closeButton: !0 });
|
|
4236
4257
|
}
|
|
4237
4258
|
export {
|
|
4238
4259
|
$n as AuthShell,
|
|
4239
|
-
|
|
4260
|
+
Vn as BonsaifButton,
|
|
4240
4261
|
xe as Button,
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4262
|
+
Jn as CalendarPicker,
|
|
4263
|
+
Qn as CompactFilterSelect,
|
|
4264
|
+
Kn as CompactSearchInput,
|
|
4265
|
+
ea as ConfirmDialog,
|
|
4266
|
+
Kr as CopyButton,
|
|
4267
|
+
ta as CopyLinkButton,
|
|
4268
|
+
ra as DataTable,
|
|
4269
|
+
na as DateRangePicker,
|
|
4270
|
+
aa as Drawer,
|
|
4271
|
+
Zn as DynamicDetailTabs,
|
|
4272
|
+
bn as GlobalScrollbars,
|
|
4273
|
+
ia as InputField,
|
|
4274
|
+
zr as LoadingState,
|
|
4275
|
+
da as MicroserviceFrame,
|
|
4276
|
+
Xr as Modal,
|
|
4256
4277
|
ut as MouseTooltip,
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4278
|
+
la as PageHeader,
|
|
4279
|
+
Or as PageSearchInput,
|
|
4280
|
+
ca as PrimeAuthRouteShell,
|
|
4281
|
+
ma as PrimeAuthToaster,
|
|
4282
|
+
ua as PrimeSuiteChatFrame,
|
|
4262
4283
|
Wt as SearchableSelect,
|
|
4263
|
-
|
|
4284
|
+
oa as StepWizard,
|
|
4264
4285
|
at as TextInput,
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4286
|
+
sa as Toggle,
|
|
4287
|
+
Sn as UserAvatar,
|
|
4288
|
+
$r as cn
|
|
4268
4289
|
};
|