bonsaif-ui 0.1.6 → 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 +9 -0
- package/dist/bonsaif-ui.js +1006 -966
- 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 +4 -2
- package/dist/components/ui/Button.d.ts.map +1 -1
- package/dist/components/ui/ButtonChromeContext.d.ts +7 -0
- package/dist/components/ui/ButtonChromeContext.d.ts.map +1 -0
- package/dist/components/ui/DataTable.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/bonsaif-ui.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
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
|
|
4
|
-
import { HiMagnifyingGlass as
|
|
5
|
-
import { OverlayScrollbars as vt } from "overlayscrollbars";
|
|
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";
|
|
6
5
|
import { createPortal as Ke } from "react-dom";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { OverlayScrollbars as yt } from "overlayscrollbars";
|
|
7
|
+
import { MdDragIndicator as Nr } from "react-icons/md";
|
|
8
|
+
import { OverlayScrollbarsComponent as wt } from "overlayscrollbars-react";
|
|
9
|
+
import { DayPicker as kr, useDayPicker as Sr } from "react-day-picker";
|
|
10
10
|
import "react-day-picker/dist/style.css";
|
|
11
|
-
import { FiSave as
|
|
12
|
-
import { Toaster as
|
|
13
|
-
function
|
|
11
|
+
import { FiSave as Cr } from "react-icons/fi";
|
|
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 Rn({
|
|
|
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,
|
|
@@ -41,25 +41,25 @@ function Nr({
|
|
|
41
41
|
size: p = "default",
|
|
42
42
|
inputTabIndex: d
|
|
43
43
|
}) {
|
|
44
|
-
const h = re(null), [N,
|
|
45
|
-
|
|
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
|
+
H(() => {
|
|
46
46
|
var c;
|
|
47
|
-
s && (
|
|
47
|
+
s && (S(!0), (c = h.current) == null || c.focus());
|
|
48
48
|
}, [s]);
|
|
49
|
-
const
|
|
49
|
+
const v = () => {
|
|
50
50
|
var c;
|
|
51
|
-
|
|
51
|
+
S(!0), (c = h.current) == null || c.focus();
|
|
52
52
|
};
|
|
53
53
|
return /* @__PURE__ */ i(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
|
-
className: `relative flex-shrink-0 overflow-visible transition-[width] duration-200 ease-out ${
|
|
56
|
+
className: `relative flex-shrink-0 overflow-visible transition-[width] duration-200 ease-out ${b ? a || "w-full" : "w-28"}`,
|
|
57
57
|
onMouseDown: (c) => {
|
|
58
|
-
|
|
58
|
+
b || (c.preventDefault(), v());
|
|
59
59
|
},
|
|
60
60
|
children: [
|
|
61
61
|
/* @__PURE__ */ t(
|
|
62
|
-
|
|
62
|
+
Je,
|
|
63
63
|
{
|
|
64
64
|
className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 pointer-events-none transition-colors duration-200",
|
|
65
65
|
style: { color: "var(--text-muted)" }
|
|
@@ -77,18 +77,18 @@ function Nr({
|
|
|
77
77
|
onKeyDown: (c) => {
|
|
78
78
|
c.key === "Escape" && (f == null || f());
|
|
79
79
|
},
|
|
80
|
-
placeholder:
|
|
81
|
-
className: `${m} w-full py-0 text-sm placeholder:text-[var(--text-muted)] focus:outline-none transition-all duration-200 ${
|
|
80
|
+
placeholder: b ? n : "Buscar",
|
|
81
|
+
className: `${m} w-full py-0 text-sm placeholder:text-[var(--text-muted)] focus:outline-none transition-all duration-200 ${b ? "pl-9 pr-9" : "cursor-pointer pl-9 pr-3"}`,
|
|
82
82
|
style: {
|
|
83
83
|
background: "var(--bg-card)",
|
|
84
84
|
border: "1px solid var(--border)",
|
|
85
85
|
color: "var(--text-main)"
|
|
86
86
|
},
|
|
87
87
|
onFocus: (c) => {
|
|
88
|
-
|
|
88
|
+
S(!0), c.currentTarget.style.borderColor = "var(--primary)", c.currentTarget.style.boxShadow = "0 0 0 3px rgba(59,130,246,0.12)";
|
|
89
89
|
},
|
|
90
90
|
onBlur: (c) => {
|
|
91
|
-
|
|
91
|
+
S(!1), c.currentTarget.style.borderColor = "var(--border)", c.currentTarget.style.boxShadow = "none";
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
),
|
|
@@ -100,77 +100,209 @@ function Nr({
|
|
|
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
|
]
|
|
107
107
|
}
|
|
108
108
|
);
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
const zt = Qt({});
|
|
111
|
+
function Mr(e) {
|
|
112
|
+
var a;
|
|
113
|
+
const r = Array.from(
|
|
114
|
+
e.querySelectorAll("*")
|
|
115
|
+
).filter(
|
|
116
|
+
(s) => {
|
|
117
|
+
var u;
|
|
118
|
+
return s.scrollWidth > s.clientWidth && !!((u = s.textContent) != null && u.trim()) && s.tagName.toLowerCase() !== "svg" && !s.closest("svg");
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
return (e.scrollWidth > e.clientWidth || r.length > 0) && (((a = r[0]) == null ? void 0 : a.textContent) ?? e.textContent ?? "").trim() || null;
|
|
122
|
+
}
|
|
123
|
+
function ut({
|
|
124
|
+
children: e,
|
|
125
|
+
content: r,
|
|
126
|
+
onlyWhenOverflow: n = !1,
|
|
127
|
+
className: a = "",
|
|
128
|
+
style: s,
|
|
129
|
+
as: u = "div"
|
|
130
|
+
}) {
|
|
131
|
+
const f = re(null), p = re(null), [d, h] = D(null), [N, S] = D("");
|
|
132
|
+
H(() => {
|
|
133
|
+
const v = f.current;
|
|
134
|
+
v && (v.querySelectorAll("[title]").forEach((c) => {
|
|
135
|
+
const y = c.getAttribute("title");
|
|
136
|
+
y && (c.getAttribute("aria-label") || c.setAttribute("aria-label", y), c.removeAttribute("title"));
|
|
137
|
+
}), v.querySelectorAll("svg title").forEach((c) => c.remove()));
|
|
138
|
+
}), er(() => {
|
|
139
|
+
if (!d) return;
|
|
140
|
+
const v = p.current;
|
|
141
|
+
if (!v) return;
|
|
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
|
+
x: C,
|
|
148
|
+
y: M
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
}, [d]);
|
|
152
|
+
const b = (v, c) => {
|
|
153
|
+
const y = f.current;
|
|
154
|
+
if (y) {
|
|
155
|
+
if (n) {
|
|
156
|
+
const T = Mr(y);
|
|
157
|
+
if (!T) return;
|
|
158
|
+
S(T);
|
|
159
|
+
}
|
|
160
|
+
!n && !r || h({ mouseX: v, mouseY: c, x: v + 14, y: c + 14 });
|
|
161
|
+
}
|
|
162
|
+
}, m = n ? N : r;
|
|
163
|
+
return /* @__PURE__ */ i(we, { children: [
|
|
164
|
+
/* @__PURE__ */ t(
|
|
165
|
+
u,
|
|
166
|
+
{
|
|
167
|
+
ref: (v) => {
|
|
168
|
+
f.current = v;
|
|
169
|
+
},
|
|
170
|
+
className: a,
|
|
171
|
+
style: s,
|
|
172
|
+
onMouseEnter: (v) => b(v.clientX, v.clientY),
|
|
173
|
+
onMouseMove: (v) => {
|
|
174
|
+
d && b(v.clientX, v.clientY);
|
|
175
|
+
},
|
|
176
|
+
onMouseLeave: () => h(null),
|
|
177
|
+
children: e
|
|
178
|
+
}
|
|
179
|
+
),
|
|
180
|
+
d && m ? Ke(
|
|
181
|
+
/* @__PURE__ */ t(
|
|
182
|
+
"div",
|
|
183
|
+
{
|
|
184
|
+
ref: p,
|
|
185
|
+
role: "tooltip",
|
|
186
|
+
style: {
|
|
187
|
+
position: "fixed",
|
|
188
|
+
top: d.y,
|
|
189
|
+
left: d.x,
|
|
190
|
+
zIndex: 9999,
|
|
191
|
+
background: "var(--bg-card)",
|
|
192
|
+
border: "1px solid var(--border)",
|
|
193
|
+
borderRadius: 6,
|
|
194
|
+
padding: "5px 10px",
|
|
195
|
+
fontSize: 12,
|
|
196
|
+
color: "var(--text-main)",
|
|
197
|
+
boxShadow: "0 4px 16px rgba(0,0,0,0.35)",
|
|
198
|
+
pointerEvents: "none",
|
|
199
|
+
maxWidth: "min(420px, calc(100vw - 24px))",
|
|
200
|
+
whiteSpace: "normal",
|
|
201
|
+
lineHeight: 1.6,
|
|
202
|
+
overflowWrap: "anywhere"
|
|
203
|
+
},
|
|
204
|
+
children: m
|
|
205
|
+
}
|
|
206
|
+
),
|
|
207
|
+
document.body
|
|
208
|
+
) : null
|
|
209
|
+
] });
|
|
210
|
+
}
|
|
211
|
+
function Nt(e) {
|
|
111
212
|
if (e !== void 0)
|
|
112
213
|
return typeof e == "number" ? `${e}px` : e;
|
|
113
214
|
}
|
|
114
|
-
const
|
|
215
|
+
const Br = "inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap leading-none font-medium transition-all duration-150 focus:outline-none disabled:opacity-50 rounded-lg", Tr = {
|
|
115
216
|
primary: "border border-[var(--border)] text-[var(--text-main)] hover:border-[var(--border)] hover:bg-[var(--bg-input)] active:scale-[0.98] transition-colors",
|
|
116
217
|
secondary: "border border-[var(--border)] text-[var(--text-main)] hover:border-[var(--border)] hover:bg-[var(--bg-input)] active:scale-[0.98] transition-colors",
|
|
117
218
|
danger: "border border-[var(--border)] text-[var(--danger)] hover:border-[var(--danger)] hover:bg-[var(--danger-bg)] active:scale-[0.98] transition-colors",
|
|
118
219
|
ghost: "text-[var(--text-secondary)] hover:opacity-70",
|
|
119
|
-
icon: "
|
|
120
|
-
},
|
|
220
|
+
icon: "text-[var(--text-muted)] hover:text-[var(--primary)] hover:bg-primary/5"
|
|
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
|
+
xs: "h-8 px-2.5 text-xs",
|
|
121
223
|
sm: "h-9 px-3.5 text-xs",
|
|
122
224
|
md: "h-11 px-4 text-sm",
|
|
123
225
|
lg: "h-12 px-5 text-sm font-semibold"
|
|
124
|
-
},
|
|
226
|
+
}, Ar = {
|
|
227
|
+
xs: "h-8 w-8",
|
|
228
|
+
sm: "h-9 w-9",
|
|
229
|
+
md: "h-10 w-10",
|
|
230
|
+
lg: "h-11 w-11"
|
|
231
|
+
}, Ir = {
|
|
125
232
|
primary: { background: "var(--bg-card)" },
|
|
126
233
|
secondary: { background: "var(--bg-card)" },
|
|
127
234
|
danger: { background: "var(--bg-card)" },
|
|
128
235
|
ghost: {},
|
|
129
236
|
icon: {}
|
|
130
237
|
};
|
|
238
|
+
function ct(e) {
|
|
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
|
+
}
|
|
241
|
+
function Pr(e) {
|
|
242
|
+
return rr.toArray(e).find(It) ?? null;
|
|
243
|
+
}
|
|
131
244
|
function xe({
|
|
132
245
|
variant: e = "primary",
|
|
133
246
|
size: r = "md",
|
|
134
247
|
loading: n = !1,
|
|
135
248
|
icon: a,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
249
|
+
tooltip: s,
|
|
250
|
+
iconOnly: u,
|
|
251
|
+
height: f,
|
|
252
|
+
padding: p,
|
|
253
|
+
children: d,
|
|
254
|
+
className: h = "",
|
|
255
|
+
disabled: N,
|
|
256
|
+
style: S,
|
|
257
|
+
...b
|
|
143
258
|
}) {
|
|
144
|
-
const
|
|
145
|
-
return /* @__PURE__ */ i(
|
|
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(
|
|
146
260
|
"button",
|
|
147
261
|
{
|
|
148
|
-
...
|
|
262
|
+
...b,
|
|
263
|
+
title: B,
|
|
264
|
+
"aria-label": $,
|
|
149
265
|
"data-variant": e,
|
|
150
|
-
"data-size":
|
|
151
|
-
"data-icon":
|
|
152
|
-
disabled:
|
|
153
|
-
className: `${
|
|
266
|
+
"data-size": T,
|
|
267
|
+
"data-icon": j ? "true" : void 0,
|
|
268
|
+
disabled: N || n,
|
|
269
|
+
className: `${Br} ${P ? Lr : Tr[e]} ${j ? Ar[T] : Dr[T]} ${c && !j ? "px-2.5" : ""} ${h}`,
|
|
154
270
|
style: {
|
|
155
|
-
|
|
156
|
-
height:
|
|
157
|
-
padding:
|
|
158
|
-
...
|
|
271
|
+
...Ir[e],
|
|
272
|
+
height: Nt(f),
|
|
273
|
+
padding: Nt(p),
|
|
274
|
+
...S,
|
|
275
|
+
...P ? {
|
|
276
|
+
width: "32px",
|
|
277
|
+
height: "32px",
|
|
278
|
+
padding: 0,
|
|
279
|
+
background: "var(--bg-card)",
|
|
280
|
+
borderRadius: "8px"
|
|
281
|
+
} : null
|
|
159
282
|
},
|
|
160
283
|
children: [
|
|
161
|
-
n ? /* @__PURE__ */ t("span", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) :
|
|
162
|
-
|
|
284
|
+
n ? /* @__PURE__ */ t("span", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : _,
|
|
285
|
+
!v && d
|
|
163
286
|
]
|
|
164
287
|
}
|
|
165
288
|
);
|
|
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;
|
|
166
298
|
}
|
|
167
|
-
function
|
|
299
|
+
function zr({
|
|
168
300
|
variant: e = "page",
|
|
169
301
|
title: r = "Cargando...",
|
|
170
302
|
rows: n = 6,
|
|
171
303
|
children: a
|
|
172
304
|
}) {
|
|
173
|
-
return e === "table" ? /* @__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: [
|
|
174
306
|
/* @__PURE__ */ t("div", { className: "h-9 w-9 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--primary)]" }),
|
|
175
307
|
/* @__PURE__ */ i("div", { children: [
|
|
176
308
|
/* @__PURE__ */ t("p", { className: "text-sm font-semibold text-[var(--text-main)]", children: r }),
|
|
@@ -178,7 +310,7 @@ function Er({
|
|
|
178
310
|
] })
|
|
179
311
|
] }) });
|
|
180
312
|
}
|
|
181
|
-
function
|
|
313
|
+
function jr({ rows: e }) {
|
|
182
314
|
return /* @__PURE__ */ t("div", { className: "space-y-4", children: Array.from({ length: Math.max(2, Math.min(e, 4)) }).map(
|
|
183
315
|
(r, n) => /* @__PURE__ */ i(
|
|
184
316
|
"section",
|
|
@@ -197,7 +329,7 @@ function Mr({ rows: e }) {
|
|
|
197
329
|
] })
|
|
198
330
|
] }),
|
|
199
331
|
/* @__PURE__ */ t(
|
|
200
|
-
|
|
332
|
+
jt,
|
|
201
333
|
{
|
|
202
334
|
rows: n === 0 ? e : Math.max(3, e - 2),
|
|
203
335
|
compact: !0
|
|
@@ -209,7 +341,7 @@ function Mr({ rows: e }) {
|
|
|
209
341
|
)
|
|
210
342
|
) });
|
|
211
343
|
}
|
|
212
|
-
function
|
|
344
|
+
function _r({ rows: e }) {
|
|
213
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(
|
|
214
346
|
"div",
|
|
215
347
|
{
|
|
@@ -223,7 +355,7 @@ function Br({ rows: e }) {
|
|
|
223
355
|
n
|
|
224
356
|
)) });
|
|
225
357
|
}
|
|
226
|
-
function
|
|
358
|
+
function jt({
|
|
227
359
|
rows: e,
|
|
228
360
|
compact: r = !1
|
|
229
361
|
}) {
|
|
@@ -256,32 +388,32 @@ function At({
|
|
|
256
388
|
))
|
|
257
389
|
] });
|
|
258
390
|
}
|
|
259
|
-
function
|
|
391
|
+
function _t(e) {
|
|
260
392
|
const r = e.split("/").filter(Boolean);
|
|
261
393
|
return (r[r.length - 1] ?? e).replace(/^lv_/, "").split(/[-_]/).filter(Boolean).map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ");
|
|
262
394
|
}
|
|
263
|
-
function
|
|
395
|
+
function kt(e) {
|
|
264
396
|
return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim();
|
|
265
397
|
}
|
|
266
|
-
function
|
|
398
|
+
function Rr(e) {
|
|
267
399
|
return [
|
|
268
400
|
e.label,
|
|
269
|
-
|
|
401
|
+
_t(e.service),
|
|
270
402
|
e.description,
|
|
271
403
|
e.service
|
|
272
404
|
].filter(Boolean).join(" ");
|
|
273
405
|
}
|
|
274
|
-
function
|
|
406
|
+
function Hr(e) {
|
|
275
407
|
return typeof e == "function" ? e : e.default;
|
|
276
408
|
}
|
|
277
|
-
function
|
|
409
|
+
function Wr(e, r) {
|
|
278
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: [
|
|
279
411
|
/* @__PURE__ */ t("p", { className: "text-sm font-semibold text-[var(--text-main)]", children: "No se pudo cargar este modulo" }),
|
|
280
412
|
/* @__PURE__ */ t("p", { className: "mt-1 text-xs text-[var(--text-muted)]", children: e.message }),
|
|
281
413
|
/* @__PURE__ */ t(xe, { className: "mt-4", height: 36, padding: "0 14px", onClick: r, children: "Reintentar" })
|
|
282
414
|
] }) });
|
|
283
415
|
}
|
|
284
|
-
function
|
|
416
|
+
function Zn({
|
|
285
417
|
parentPanel: e,
|
|
286
418
|
parentPanelComponent: r,
|
|
287
419
|
renderParentPanel: n,
|
|
@@ -293,66 +425,66 @@ function Hn({
|
|
|
293
425
|
activeService: d,
|
|
294
426
|
initialService: h,
|
|
295
427
|
onActiveServiceChange: N,
|
|
296
|
-
canAccess:
|
|
297
|
-
keepAlive:
|
|
428
|
+
canAccess: S,
|
|
429
|
+
keepAlive: b = !0,
|
|
298
430
|
title: m,
|
|
299
|
-
subtitle:
|
|
431
|
+
subtitle: v,
|
|
300
432
|
emptyState: c,
|
|
301
433
|
loadingState: y,
|
|
302
|
-
errorState:
|
|
303
|
-
renderTabLabel:
|
|
304
|
-
searchableTabs:
|
|
305
|
-
tabsSearchThreshold:
|
|
306
|
-
tabsSearchPlaceholder:
|
|
434
|
+
errorState: T = Wr,
|
|
435
|
+
renderTabLabel: j,
|
|
436
|
+
searchableTabs: P = "auto",
|
|
437
|
+
tabsSearchThreshold: C = 6,
|
|
438
|
+
tabsSearchPlaceholder: M = "Buscar modulo...",
|
|
307
439
|
tabsSearchValue: B,
|
|
308
|
-
onTabsSearchChange:
|
|
309
|
-
emptySearchState:
|
|
440
|
+
onTabsSearchChange: $,
|
|
441
|
+
emptySearchState: _,
|
|
310
442
|
showTabCount: E = !0,
|
|
311
|
-
className:
|
|
312
|
-
parentClassName:
|
|
313
|
-
contentClassName:
|
|
314
|
-
tabsClassName:
|
|
443
|
+
className: L = "",
|
|
444
|
+
parentClassName: I = "",
|
|
445
|
+
contentClassName: J = "",
|
|
446
|
+
tabsClassName: W = ""
|
|
315
447
|
}) {
|
|
316
448
|
var ve;
|
|
317
449
|
const F = ze(
|
|
318
450
|
() => u.filter(
|
|
319
|
-
(
|
|
451
|
+
(x) => !x.hidden && ((S == null ? void 0 : S(x, s)) ?? !0)
|
|
320
452
|
),
|
|
321
|
-
[
|
|
453
|
+
[S, s, u]
|
|
322
454
|
), V = (ve = F.find(
|
|
323
|
-
(
|
|
324
|
-
)) == null ? void 0 : ve.service, [Q, o] =
|
|
455
|
+
(x) => !x.disabled
|
|
456
|
+
)) == null ? void 0 : ve.service, [Q, o] = D(
|
|
325
457
|
h ?? V ?? ""
|
|
326
|
-
), [w, U] =
|
|
327
|
-
(
|
|
328
|
-
) : F, [
|
|
329
|
-
|
|
330
|
-
!
|
|
331
|
-
}, [V,
|
|
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)
|
|
460
|
+
) : F, [k, F]), oe = d ?? Q, z = F.find((x) => x.service === oe) ?? F.find((x) => !x.disabled);
|
|
461
|
+
H(() => {
|
|
462
|
+
!z && V && o(V);
|
|
463
|
+
}, [V, z]), H(() => {
|
|
332
464
|
pe.current = Y;
|
|
333
465
|
}, [Y]);
|
|
334
|
-
const ke = (
|
|
335
|
-
|
|
336
|
-
}, Re = (
|
|
337
|
-
B === void 0 && ce(
|
|
338
|
-
}, Qe = (
|
|
339
|
-
const
|
|
466
|
+
const ke = (x) => {
|
|
467
|
+
x.disabled || (d || o(x.service), N == null || N(x.service, x));
|
|
468
|
+
}, Re = (x) => {
|
|
469
|
+
B === void 0 && ce(x), $ == null || $(x);
|
|
470
|
+
}, Qe = (x, ee) => {
|
|
471
|
+
const Z = ae.filter((le) => !le.disabled), ye = Z.findIndex(
|
|
340
472
|
(le) => le.service === ee.service
|
|
341
473
|
);
|
|
342
|
-
ye < 0 || ((
|
|
343
|
-
|
|
344
|
-
)),
|
|
474
|
+
ye < 0 || ((x.key === "ArrowRight" || x.key === "ArrowDown") && (x.preventDefault(), ke(Z[(ye + 1) % Z.length])), (x.key === "ArrowLeft" || x.key === "ArrowUp") && (x.preventDefault(), ke(
|
|
475
|
+
Z[(ye - 1 + Z.length) % Z.length]
|
|
476
|
+
)), x.key === "Home" && (x.preventDefault(), ke(Z[0])), x.key === "End" && (x.preventDefault(), ke(Z[Z.length - 1])));
|
|
345
477
|
}, me = st(() => {
|
|
346
|
-
if (!
|
|
347
|
-
const
|
|
348
|
-
if (ee != null && ee.loading || ee != null && ee.component &&
|
|
349
|
-
const
|
|
350
|
-
if (!
|
|
478
|
+
if (!z) return;
|
|
479
|
+
const x = z.service, ee = pe.current[x];
|
|
480
|
+
if (ee != null && ee.loading || ee != null && ee.component && b) return;
|
|
481
|
+
const Z = (f == null ? void 0 : f[x]) ?? p;
|
|
482
|
+
if (!Z) {
|
|
351
483
|
X((le) => ({
|
|
352
484
|
...le,
|
|
353
|
-
[
|
|
485
|
+
[x]: {
|
|
354
486
|
loading: !1,
|
|
355
|
-
error: new Error(`No module loader found for service "${
|
|
487
|
+
error: new Error(`No module loader found for service "${x}".`)
|
|
356
488
|
}
|
|
357
489
|
}));
|
|
358
490
|
return;
|
|
@@ -360,32 +492,32 @@ function Hn({
|
|
|
360
492
|
const ye = ++he.current;
|
|
361
493
|
X((le) => ({
|
|
362
494
|
...le,
|
|
363
|
-
[
|
|
364
|
-
})),
|
|
365
|
-
if (ye !== he.current && !
|
|
366
|
-
const De =
|
|
495
|
+
[x]: { ...le[x], loading: !0, error: void 0 }
|
|
496
|
+
})), Z(z, s).then((le) => {
|
|
497
|
+
if (ye !== he.current && !b) return;
|
|
498
|
+
const De = Hr(le);
|
|
367
499
|
X((Ce) => ({
|
|
368
500
|
...Ce,
|
|
369
|
-
[
|
|
501
|
+
[x]: { component: De, loading: !1 }
|
|
370
502
|
}));
|
|
371
503
|
}).catch((le) => {
|
|
372
504
|
const De = le instanceof Error ? le : new Error(String(le));
|
|
373
505
|
X((Ce) => ({
|
|
374
506
|
...Ce,
|
|
375
|
-
[
|
|
507
|
+
[x]: { ...Ce[x], loading: !1, error: De }
|
|
376
508
|
}));
|
|
377
509
|
});
|
|
378
|
-
}, [s,
|
|
379
|
-
|
|
380
|
-
const He =
|
|
381
|
-
|
|
510
|
+
}, [s, b, p, f, z]);
|
|
511
|
+
H(me, [me]);
|
|
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) => {
|
|
513
|
+
z && U((ee) => ({
|
|
382
514
|
...ee,
|
|
383
|
-
[
|
|
515
|
+
[z.service]: x
|
|
384
516
|
}));
|
|
385
517
|
}, Le = () => {
|
|
386
|
-
|
|
387
|
-
...
|
|
388
|
-
[
|
|
518
|
+
z && U((x) => ({
|
|
519
|
+
...x,
|
|
520
|
+
[z.service]: null
|
|
389
521
|
}));
|
|
390
522
|
}, Fe = {
|
|
391
523
|
context: s,
|
|
@@ -393,54 +525,54 @@ function Hn({
|
|
|
393
525
|
links: u,
|
|
394
526
|
visibleLinks: F,
|
|
395
527
|
filteredLinks: ae,
|
|
396
|
-
selectedLink:
|
|
397
|
-
selectedService:
|
|
528
|
+
selectedLink: z,
|
|
529
|
+
selectedService: z == null ? void 0 : z.service,
|
|
398
530
|
activeItemId: He,
|
|
399
531
|
tabsSearch: de,
|
|
400
532
|
onSelectService: ke,
|
|
401
|
-
onOpenDetail:
|
|
533
|
+
onOpenDetail: Be,
|
|
402
534
|
onBackToList: Le
|
|
403
535
|
}, Se = n ? n(Fe) : r ? /* @__PURE__ */ t(r, { ...Fe }) : e;
|
|
404
536
|
return /* @__PURE__ */ i(
|
|
405
537
|
"section",
|
|
406
538
|
{
|
|
407
|
-
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}`,
|
|
408
540
|
children: [
|
|
409
541
|
/* @__PURE__ */ t(
|
|
410
542
|
"aside",
|
|
411
543
|
{
|
|
412
|
-
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}`,
|
|
413
545
|
children: Se
|
|
414
546
|
}
|
|
415
547
|
),
|
|
416
548
|
/* @__PURE__ */ i(
|
|
417
549
|
"div",
|
|
418
550
|
{
|
|
419
|
-
className: `relative min-w-0 overflow-visible rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${
|
|
551
|
+
className: `relative min-w-0 overflow-visible rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${J}`,
|
|
420
552
|
children: [
|
|
421
|
-
(m ||
|
|
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: [
|
|
422
554
|
/* @__PURE__ */ i("div", { className: "min-w-0", children: [
|
|
423
555
|
m && /* @__PURE__ */ t("h2", { className: "truncate text-sm font-semibold text-[var(--text-main)]", children: m }),
|
|
424
|
-
|
|
556
|
+
v && /* @__PURE__ */ t("p", { className: "mt-1 line-clamp-2 text-xs text-[var(--text-muted)]", children: v })
|
|
425
557
|
] }),
|
|
426
|
-
(
|
|
558
|
+
(R || E) && /* @__PURE__ */ i("div", { className: "flex min-w-0 flex-shrink-0 items-center justify-end gap-2", children: [
|
|
427
559
|
E && /* @__PURE__ */ i("span", { className: "hidden text-xs font-semibold text-[var(--text-muted)] transition-opacity duration-200 sm:inline", children: [
|
|
428
560
|
ae.length,
|
|
429
561
|
" / ",
|
|
430
562
|
F.length
|
|
431
563
|
] }),
|
|
432
|
-
|
|
564
|
+
R && /* @__PURE__ */ i(we, { children: [
|
|
433
565
|
/* @__PURE__ */ t(
|
|
434
566
|
"div",
|
|
435
567
|
{
|
|
436
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"}`,
|
|
437
569
|
"aria-hidden": !ne,
|
|
438
570
|
children: /* @__PURE__ */ t(
|
|
439
|
-
|
|
571
|
+
Or,
|
|
440
572
|
{
|
|
441
573
|
value: de,
|
|
442
574
|
onChange: Re,
|
|
443
|
-
placeholder:
|
|
575
|
+
placeholder: M,
|
|
444
576
|
className: "w-full",
|
|
445
577
|
autoFocus: ne,
|
|
446
578
|
forceExpanded: !0,
|
|
@@ -458,10 +590,10 @@ function Hn({
|
|
|
458
590
|
"aria-label": ne ? "Cerrar busqueda" : "Buscar tabs",
|
|
459
591
|
"aria-expanded": ne,
|
|
460
592
|
onClick: () => {
|
|
461
|
-
ne && de && Re(""), Ne((
|
|
593
|
+
ne && de && Re(""), Ne((x) => !x);
|
|
462
594
|
},
|
|
463
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)]"}`,
|
|
464
|
-
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" }) })
|
|
465
597
|
}
|
|
466
598
|
)
|
|
467
599
|
] })
|
|
@@ -472,43 +604,43 @@ function Hn({
|
|
|
472
604
|
{
|
|
473
605
|
role: "tablist",
|
|
474
606
|
"aria-label": m ?? "Modulos relacionados",
|
|
475
|
-
className: `flex gap-1 overflow-x-auto border-b border-[var(--border)] bg-[var(--bg-input)] px-2 py-1.5 transition-colors duration-200 ${
|
|
476
|
-
children: ae.length > 0 ? ae.map((
|
|
477
|
-
const ee =
|
|
607
|
+
className: `flex gap-1 overflow-x-auto border-b border-[var(--border)] bg-[var(--bg-input)] px-2 py-1.5 transition-colors duration-200 ${W}`,
|
|
608
|
+
children: ae.length > 0 ? ae.map((x) => {
|
|
609
|
+
const ee = x.service === (z == null ? void 0 : z.service);
|
|
478
610
|
return /* @__PURE__ */ t(
|
|
479
611
|
"button",
|
|
480
612
|
{
|
|
481
613
|
type: "button",
|
|
482
614
|
role: "tab",
|
|
483
615
|
"aria-selected": ee,
|
|
484
|
-
disabled:
|
|
485
|
-
onClick: () => ke(
|
|
486
|
-
onKeyDown: (
|
|
616
|
+
disabled: x.disabled,
|
|
617
|
+
onClick: () => ke(x),
|
|
618
|
+
onKeyDown: (Z) => Qe(Z, x),
|
|
487
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)]"}`,
|
|
488
|
-
children:
|
|
489
|
-
|
|
490
|
-
/* @__PURE__ */ t("span", { children:
|
|
491
|
-
|
|
620
|
+
children: j ? j(x, ee) : /* @__PURE__ */ i(we, { children: [
|
|
621
|
+
x.icon,
|
|
622
|
+
/* @__PURE__ */ t("span", { children: x.label ?? _t(x.service) }),
|
|
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 })
|
|
492
624
|
] })
|
|
493
625
|
},
|
|
494
|
-
|
|
626
|
+
x.service
|
|
495
627
|
);
|
|
496
|
-
}) : /* @__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." })
|
|
497
629
|
}
|
|
498
630
|
),
|
|
499
|
-
(
|
|
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 }),
|
|
500
632
|
/* @__PURE__ */ i("div", { className: "min-h-[420px] p-4", children: [
|
|
501
|
-
!
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
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." })),
|
|
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),
|
|
636
|
+
z && We && !(ie != null && ie.loading) && !(ie != null && ie.error) && /* @__PURE__ */ t(
|
|
505
637
|
We,
|
|
506
638
|
{
|
|
507
639
|
context: s,
|
|
508
640
|
parent: a,
|
|
509
|
-
link:
|
|
641
|
+
link: z,
|
|
510
642
|
activeItemId: He,
|
|
511
|
-
onOpenDetail:
|
|
643
|
+
onOpenDetail: Be,
|
|
512
644
|
onBackToList: Le
|
|
513
645
|
}
|
|
514
646
|
)
|
|
@@ -520,7 +652,7 @@ function Hn({
|
|
|
520
652
|
}
|
|
521
653
|
);
|
|
522
654
|
}
|
|
523
|
-
const
|
|
655
|
+
const Rt = [
|
|
524
656
|
"Enero",
|
|
525
657
|
"Febrero",
|
|
526
658
|
"Marzo",
|
|
@@ -533,7 +665,7 @@ const It = [
|
|
|
533
665
|
"Octubre",
|
|
534
666
|
"Noviembre",
|
|
535
667
|
"Diciembre"
|
|
536
|
-
],
|
|
668
|
+
], Fr = [
|
|
537
669
|
"Ene",
|
|
538
670
|
"Feb",
|
|
539
671
|
"Mar",
|
|
@@ -546,41 +678,41 @@ const It = [
|
|
|
546
678
|
"Oct",
|
|
547
679
|
"Nov",
|
|
548
680
|
"Dic"
|
|
549
|
-
],
|
|
550
|
-
function
|
|
681
|
+
], Ur = ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sá"], nt = 6;
|
|
682
|
+
function dt(e, r, n) {
|
|
551
683
|
return `${e}-${String(r).padStart(2, "0")}-${String(n).padStart(2, "0")}`;
|
|
552
684
|
}
|
|
553
|
-
function
|
|
685
|
+
function Yr() {
|
|
554
686
|
const e = /* @__PURE__ */ new Date();
|
|
555
|
-
return
|
|
687
|
+
return dt(e.getFullYear(), e.getMonth() + 1, e.getDate());
|
|
556
688
|
}
|
|
557
|
-
function
|
|
689
|
+
function Ht(e) {
|
|
558
690
|
const [r, n, a] = e.split("-").map(Number);
|
|
559
691
|
return { year: r, month: n, day: a };
|
|
560
692
|
}
|
|
561
|
-
function
|
|
693
|
+
function qr(e) {
|
|
562
694
|
if (!e) return "Seleccionar fecha";
|
|
563
|
-
const { year: r, month: n, day: a } =
|
|
564
|
-
return !r || !n || !a ? "Seleccionar fecha" : `${String(a).padStart(2, "0")} ${
|
|
695
|
+
const { year: r, month: n, day: a } = Ht(e);
|
|
696
|
+
return !r || !n || !a ? "Seleccionar fecha" : `${String(a).padStart(2, "0")} ${Rt[n - 1]} ${r}`;
|
|
565
697
|
}
|
|
566
|
-
function
|
|
698
|
+
function Jn({
|
|
567
699
|
value: e,
|
|
568
700
|
onChange: r,
|
|
569
701
|
minDate: n,
|
|
570
702
|
displayMode: a = "inline"
|
|
571
703
|
}) {
|
|
572
|
-
const s =
|
|
704
|
+
const s = Yr(), f = Ht(e || s), p = a === "popover", [d, h] = D(!1), N = re(null), [S, b] = D({
|
|
573
705
|
horizontal: "left",
|
|
574
706
|
vertical: "bottom"
|
|
575
|
-
}), [m,
|
|
576
|
-
|
|
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(() => {
|
|
577
709
|
if (!p || !d || !N.current) return;
|
|
578
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;
|
|
579
|
-
|
|
711
|
+
b({
|
|
580
712
|
horizontal: X && te ? "right" : "left",
|
|
581
713
|
vertical: ce && ne ? "top" : "bottom"
|
|
582
714
|
});
|
|
583
|
-
}, [p, d]),
|
|
715
|
+
}, [p, d]), H(() => {
|
|
584
716
|
if (!p || !d) return;
|
|
585
717
|
function o(U) {
|
|
586
718
|
N.current && (N.current.contains(U.target) || h(!1));
|
|
@@ -592,20 +724,20 @@ function Wn({
|
|
|
592
724
|
document.removeEventListener("mousedown", o), document.removeEventListener("keydown", w);
|
|
593
725
|
};
|
|
594
726
|
}, [p, d]);
|
|
595
|
-
function
|
|
596
|
-
c === 1 ? (
|
|
727
|
+
function _() {
|
|
728
|
+
c === 1 ? (v((o) => o - 1), y(12)) : y((o) => o - 1);
|
|
597
729
|
}
|
|
598
730
|
function E() {
|
|
599
|
-
c === 12 ? (
|
|
731
|
+
c === 12 ? (v((o) => o + 1), y(1)) : y((o) => o + 1);
|
|
600
732
|
}
|
|
601
|
-
const
|
|
602
|
-
...Array(
|
|
603
|
-
...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)
|
|
604
736
|
];
|
|
605
|
-
for (;
|
|
606
|
-
const
|
|
737
|
+
for (; J.length < nt * 7; ) J.push(null);
|
|
738
|
+
const W = J.slice(0, nt * 7);
|
|
607
739
|
function F(o) {
|
|
608
|
-
const w =
|
|
740
|
+
const w = dt(m, c, o);
|
|
609
741
|
n && w < n || (r(w), p && h(!1));
|
|
610
742
|
}
|
|
611
743
|
const V = {
|
|
@@ -639,12 +771,12 @@ function Wn({
|
|
|
639
771
|
padding: "10px 12px",
|
|
640
772
|
borderBottom: "1px solid var(--border)"
|
|
641
773
|
},
|
|
642
|
-
children:
|
|
774
|
+
children: T === "days" ? /* @__PURE__ */ i(we, { children: [
|
|
643
775
|
/* @__PURE__ */ t(
|
|
644
776
|
"button",
|
|
645
777
|
{
|
|
646
778
|
type: "button",
|
|
647
|
-
onClick:
|
|
779
|
+
onClick: _,
|
|
648
780
|
style: V,
|
|
649
781
|
title: "Mes anterior",
|
|
650
782
|
children: /* @__PURE__ */ t(je, { size: 16 })
|
|
@@ -655,7 +787,7 @@ function Wn({
|
|
|
655
787
|
{
|
|
656
788
|
type: "button",
|
|
657
789
|
onClick: () => {
|
|
658
|
-
|
|
790
|
+
j("years"), M(0);
|
|
659
791
|
},
|
|
660
792
|
style: {
|
|
661
793
|
background: "none",
|
|
@@ -671,7 +803,7 @@ function Wn({
|
|
|
671
803
|
padding: "2px 6px"
|
|
672
804
|
},
|
|
673
805
|
children: [
|
|
674
|
-
|
|
806
|
+
Rt[c - 1],
|
|
675
807
|
" ",
|
|
676
808
|
m,
|
|
677
809
|
/* @__PURE__ */ t(_e, { size: 13, style: { color: "var(--text-muted)" } })
|
|
@@ -693,7 +825,7 @@ function Wn({
|
|
|
693
825
|
"button",
|
|
694
826
|
{
|
|
695
827
|
type: "button",
|
|
696
|
-
onClick: () =>
|
|
828
|
+
onClick: () => M((o) => o - P),
|
|
697
829
|
style: V,
|
|
698
830
|
children: /* @__PURE__ */ t(je, { size: 16 })
|
|
699
831
|
}
|
|
@@ -702,7 +834,7 @@ function Wn({
|
|
|
702
834
|
"button",
|
|
703
835
|
{
|
|
704
836
|
type: "button",
|
|
705
|
-
onClick: () =>
|
|
837
|
+
onClick: () => j("days"),
|
|
706
838
|
style: {
|
|
707
839
|
background: "none",
|
|
708
840
|
border: "none",
|
|
@@ -714,9 +846,9 @@ function Wn({
|
|
|
714
846
|
padding: "2px 6px"
|
|
715
847
|
},
|
|
716
848
|
children: [
|
|
717
|
-
|
|
849
|
+
$[0],
|
|
718
850
|
" – ",
|
|
719
|
-
|
|
851
|
+
$[$.length - 1]
|
|
720
852
|
]
|
|
721
853
|
}
|
|
722
854
|
),
|
|
@@ -724,7 +856,7 @@ function Wn({
|
|
|
724
856
|
"button",
|
|
725
857
|
{
|
|
726
858
|
type: "button",
|
|
727
|
-
onClick: () =>
|
|
859
|
+
onClick: () => M((o) => o + P),
|
|
728
860
|
style: V,
|
|
729
861
|
children: /* @__PURE__ */ t(Te, { size: 16 })
|
|
730
862
|
}
|
|
@@ -732,7 +864,7 @@ function Wn({
|
|
|
732
864
|
] })
|
|
733
865
|
}
|
|
734
866
|
),
|
|
735
|
-
|
|
867
|
+
T === "years" && /* @__PURE__ */ i("div", { style: { padding: "8px 10px 10px" }, children: [
|
|
736
868
|
/* @__PURE__ */ t(
|
|
737
869
|
"div",
|
|
738
870
|
{
|
|
@@ -742,7 +874,7 @@ function Wn({
|
|
|
742
874
|
gap: 3,
|
|
743
875
|
marginBottom: 8
|
|
744
876
|
},
|
|
745
|
-
children:
|
|
877
|
+
children: Fr.map((o, w) => {
|
|
746
878
|
const U = w + 1 === c;
|
|
747
879
|
return /* @__PURE__ */ t(
|
|
748
880
|
"button",
|
|
@@ -780,14 +912,14 @@ function Wn({
|
|
|
780
912
|
gridTemplateColumns: "repeat(4,1fr)",
|
|
781
913
|
gap: 3
|
|
782
914
|
},
|
|
783
|
-
children:
|
|
915
|
+
children: $.map((o) => {
|
|
784
916
|
const w = o === m;
|
|
785
917
|
return /* @__PURE__ */ t(
|
|
786
918
|
"button",
|
|
787
919
|
{
|
|
788
920
|
type: "button",
|
|
789
921
|
onClick: () => {
|
|
790
|
-
|
|
922
|
+
v(o), j("days");
|
|
791
923
|
},
|
|
792
924
|
style: {
|
|
793
925
|
border: "none",
|
|
@@ -809,7 +941,7 @@ function Wn({
|
|
|
809
941
|
}
|
|
810
942
|
)
|
|
811
943
|
] }),
|
|
812
|
-
|
|
944
|
+
T === "days" && /* @__PURE__ */ i(we, { children: [
|
|
813
945
|
/* @__PURE__ */ t(
|
|
814
946
|
"div",
|
|
815
947
|
{
|
|
@@ -818,7 +950,7 @@ function Wn({
|
|
|
818
950
|
gridTemplateColumns: "repeat(7,1fr)",
|
|
819
951
|
padding: "6px 8px 0"
|
|
820
952
|
},
|
|
821
|
-
children:
|
|
953
|
+
children: Ur.map((o) => /* @__PURE__ */ t(
|
|
822
954
|
"div",
|
|
823
955
|
{
|
|
824
956
|
style: {
|
|
@@ -845,10 +977,10 @@ function Wn({
|
|
|
845
977
|
padding: "4px 8px 10px",
|
|
846
978
|
gap: 2
|
|
847
979
|
},
|
|
848
|
-
children:
|
|
980
|
+
children: W.map((o, w) => {
|
|
849
981
|
if (o === null)
|
|
850
982
|
return /* @__PURE__ */ t("div", { style: { aspectRatio: "1" } }, w);
|
|
851
|
-
const U =
|
|
983
|
+
const U = dt(m, c, o), Y = U === e, X = U === s, te = !!(n && U < n);
|
|
852
984
|
return /* @__PURE__ */ t(
|
|
853
985
|
"button",
|
|
854
986
|
{
|
|
@@ -895,7 +1027,7 @@ function Wn({
|
|
|
895
1027
|
children: [
|
|
896
1028
|
/* @__PURE__ */ i("span", { className: "inline-flex items-center gap-2 min-w-0", children: [
|
|
897
1029
|
/* @__PURE__ */ t(lt, { className: "w-4 h-4 text-[var(--text-muted)]" }),
|
|
898
|
-
/* @__PURE__ */ t("span", { className: "truncate", children:
|
|
1030
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: qr(e) })
|
|
899
1031
|
] }),
|
|
900
1032
|
/* @__PURE__ */ t(
|
|
901
1033
|
_e,
|
|
@@ -911,19 +1043,19 @@ function Wn({
|
|
|
911
1043
|
{
|
|
912
1044
|
className: "absolute z-50",
|
|
913
1045
|
style: {
|
|
914
|
-
...
|
|
915
|
-
...
|
|
1046
|
+
...S.horizontal === "left" ? { left: 0 } : { right: 0 },
|
|
1047
|
+
...S.vertical === "bottom" ? { top: "calc(100% + 8px)" } : { bottom: "calc(100% + 8px)" }
|
|
916
1048
|
},
|
|
917
1049
|
children: Q
|
|
918
1050
|
}
|
|
919
1051
|
)
|
|
920
1052
|
] }) : Q;
|
|
921
1053
|
}
|
|
922
|
-
function
|
|
1054
|
+
function St(e) {
|
|
923
1055
|
if (e !== void 0)
|
|
924
1056
|
return typeof e == "number" ? `${e}px` : e;
|
|
925
1057
|
}
|
|
926
|
-
function
|
|
1058
|
+
function Wt({
|
|
927
1059
|
value: e,
|
|
928
1060
|
onChange: r,
|
|
929
1061
|
options: n,
|
|
@@ -935,18 +1067,18 @@ function jt({
|
|
|
935
1067
|
height: d = 44,
|
|
936
1068
|
padding: h = "0 12px",
|
|
937
1069
|
searchable: N = !0,
|
|
938
|
-
minOptionsForSearch:
|
|
1070
|
+
minOptionsForSearch: S = 6
|
|
939
1071
|
}) {
|
|
940
|
-
const [
|
|
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(
|
|
941
1073
|
(o) => {
|
|
942
1074
|
var w;
|
|
943
|
-
return o.label.toLowerCase().includes(
|
|
1075
|
+
return o.label.toLowerCase().includes(v.toLowerCase()) || ((w = o.sublabel) == null ? void 0 : w.toLowerCase().includes(v.toLowerCase()));
|
|
944
1076
|
}
|
|
945
|
-
) : n,
|
|
1077
|
+
) : n, W = st(() => {
|
|
946
1078
|
const o = B.current;
|
|
947
1079
|
if (!o) return;
|
|
948
|
-
const w = o.getBoundingClientRect(), U =
|
|
949
|
-
|
|
1080
|
+
const w = o.getBoundingClientRect(), U = L ? 272 : 212, Y = window.innerHeight - w.bottom, X = Y < U && w.top > Y;
|
|
1081
|
+
M({
|
|
950
1082
|
position: "fixed",
|
|
951
1083
|
left: w.left,
|
|
952
1084
|
top: X ? void 0 : w.bottom + 4,
|
|
@@ -954,26 +1086,26 @@ function jt({
|
|
|
954
1086
|
width: w.width,
|
|
955
1087
|
zIndex: 9999
|
|
956
1088
|
});
|
|
957
|
-
}, [
|
|
958
|
-
|
|
959
|
-
if (!
|
|
1089
|
+
}, [L]);
|
|
1090
|
+
H(() => P(!0), []), H(() => {
|
|
1091
|
+
if (!b) return;
|
|
960
1092
|
function o(w) {
|
|
961
1093
|
var Y, X;
|
|
962
1094
|
const U = w.target;
|
|
963
|
-
!((Y = B.current) != null && Y.contains(U)) && !((X =
|
|
1095
|
+
!((Y = B.current) != null && Y.contains(U)) && !((X = $.current) != null && X.contains(U)) && (m(!1), c(""));
|
|
964
1096
|
}
|
|
965
1097
|
return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
|
|
966
|
-
}, [
|
|
967
|
-
|
|
1098
|
+
}, [b]), H(() => {
|
|
1099
|
+
b && (T(-1), W(), L && setTimeout(() => {
|
|
968
1100
|
var o;
|
|
969
|
-
return (o =
|
|
1101
|
+
return (o = _.current) == null ? void 0 : o.focus();
|
|
970
1102
|
}, 0));
|
|
971
|
-
}, [
|
|
972
|
-
if (
|
|
973
|
-
return window.addEventListener("resize",
|
|
974
|
-
window.removeEventListener("resize",
|
|
1103
|
+
}, [b, L, W]), H(() => {
|
|
1104
|
+
if (b)
|
|
1105
|
+
return window.addEventListener("resize", W), window.addEventListener("scroll", W, !0), () => {
|
|
1106
|
+
window.removeEventListener("resize", W), window.removeEventListener("scroll", W, !0);
|
|
975
1107
|
};
|
|
976
|
-
}, [
|
|
1108
|
+
}, [b, W]), H(() => {
|
|
977
1109
|
if (y < 0 || !E.current) return;
|
|
978
1110
|
const o = E.current.children[y];
|
|
979
1111
|
o == null || o.scrollIntoView({ block: "nearest" });
|
|
@@ -985,31 +1117,31 @@ function jt({
|
|
|
985
1117
|
[r]
|
|
986
1118
|
);
|
|
987
1119
|
function V(o) {
|
|
988
|
-
if (!
|
|
1120
|
+
if (!b) {
|
|
989
1121
|
(o.key === "Enter" || o.key === " " || o.key === "ArrowDown") && (o.preventDefault(), m(!0));
|
|
990
1122
|
return;
|
|
991
1123
|
}
|
|
992
|
-
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));
|
|
993
1125
|
}
|
|
994
1126
|
const Q = /* @__PURE__ */ i(
|
|
995
1127
|
"div",
|
|
996
1128
|
{
|
|
997
|
-
ref:
|
|
1129
|
+
ref: $,
|
|
998
1130
|
className: "rounded-xl shadow-xl overflow-hidden",
|
|
999
1131
|
style: {
|
|
1000
|
-
|
|
1132
|
+
...C,
|
|
1001
1133
|
background: "var(--bg-card)",
|
|
1002
1134
|
border: "1px solid var(--border)"
|
|
1003
1135
|
},
|
|
1004
1136
|
children: [
|
|
1005
|
-
|
|
1137
|
+
L && /* @__PURE__ */ i(
|
|
1006
1138
|
"div",
|
|
1007
1139
|
{
|
|
1008
1140
|
className: "flex items-center gap-2 px-3 py-2",
|
|
1009
1141
|
style: { borderBottom: "1px solid var(--border)" },
|
|
1010
1142
|
children: [
|
|
1011
1143
|
/* @__PURE__ */ t(
|
|
1012
|
-
|
|
1144
|
+
Je,
|
|
1013
1145
|
{
|
|
1014
1146
|
className: "w-3.5 h-3.5 flex-shrink-0",
|
|
1015
1147
|
style: { color: "var(--text-muted)" }
|
|
@@ -1018,17 +1150,17 @@ function jt({
|
|
|
1018
1150
|
/* @__PURE__ */ t(
|
|
1019
1151
|
"input",
|
|
1020
1152
|
{
|
|
1021
|
-
ref:
|
|
1022
|
-
value:
|
|
1153
|
+
ref: _,
|
|
1154
|
+
value: v,
|
|
1023
1155
|
onChange: (o) => {
|
|
1024
|
-
c(o.target.value),
|
|
1156
|
+
c(o.target.value), T(-1);
|
|
1025
1157
|
},
|
|
1026
1158
|
placeholder: "Buscar…",
|
|
1027
1159
|
className: "min-w-0 flex-1 text-sm bg-transparent outline-none",
|
|
1028
1160
|
style: { color: "var(--text-main)" }
|
|
1029
1161
|
}
|
|
1030
1162
|
),
|
|
1031
|
-
|
|
1163
|
+
v && /* @__PURE__ */ t(
|
|
1032
1164
|
"button",
|
|
1033
1165
|
{
|
|
1034
1166
|
type: "button",
|
|
@@ -1036,7 +1168,7 @@ function jt({
|
|
|
1036
1168
|
o.preventDefault(), c("");
|
|
1037
1169
|
},
|
|
1038
1170
|
children: /* @__PURE__ */ t(
|
|
1039
|
-
|
|
1171
|
+
$e,
|
|
1040
1172
|
{
|
|
1041
1173
|
className: "w-3.5 h-3.5",
|
|
1042
1174
|
style: { color: "var(--text-muted)" }
|
|
@@ -1054,7 +1186,7 @@ function jt({
|
|
|
1054
1186
|
role: "listbox",
|
|
1055
1187
|
className: "overflow-y-auto",
|
|
1056
1188
|
style: {
|
|
1057
|
-
maxHeight:
|
|
1189
|
+
maxHeight: L ? 220 : 180,
|
|
1058
1190
|
scrollbarWidth: "thin",
|
|
1059
1191
|
scrollbarColor: "var(--border) transparent",
|
|
1060
1192
|
overscrollBehavior: "contain"
|
|
@@ -1068,7 +1200,7 @@ function jt({
|
|
|
1068
1200
|
onMouseDown: (o) => {
|
|
1069
1201
|
o.preventDefault(), F("");
|
|
1070
1202
|
},
|
|
1071
|
-
onMouseEnter: () =>
|
|
1203
|
+
onMouseEnter: () => T(-1),
|
|
1072
1204
|
className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
|
|
1073
1205
|
style: {
|
|
1074
1206
|
background: y === -1 ? "var(--bg-hover)" : "transparent",
|
|
@@ -1078,7 +1210,7 @@ function jt({
|
|
|
1078
1210
|
children: s
|
|
1079
1211
|
}
|
|
1080
1212
|
),
|
|
1081
|
-
|
|
1213
|
+
J.map((o, w) => {
|
|
1082
1214
|
const Y = w === y, X = o.value === e;
|
|
1083
1215
|
return /* @__PURE__ */ i(
|
|
1084
1216
|
"li",
|
|
@@ -1088,7 +1220,7 @@ function jt({
|
|
|
1088
1220
|
onMouseDown: (te) => {
|
|
1089
1221
|
te.preventDefault(), o.disabled || F(o.value);
|
|
1090
1222
|
},
|
|
1091
|
-
onMouseEnter: () => !o.disabled &&
|
|
1223
|
+
onMouseEnter: () => !o.disabled && T(w),
|
|
1092
1224
|
className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
|
|
1093
1225
|
style: {
|
|
1094
1226
|
background: Y ? "var(--bg-hover)" : X ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
|
|
@@ -1128,7 +1260,7 @@ function jt({
|
|
|
1128
1260
|
o.value
|
|
1129
1261
|
);
|
|
1130
1262
|
}),
|
|
1131
|
-
|
|
1263
|
+
J.length === 0 && /* @__PURE__ */ t(
|
|
1132
1264
|
"li",
|
|
1133
1265
|
{
|
|
1134
1266
|
className: "px-3 py-4 text-sm text-center",
|
|
@@ -1158,36 +1290,36 @@ function jt({
|
|
|
1158
1290
|
onClick: () => !u && m((o) => !o),
|
|
1159
1291
|
className: "flex w-full items-center gap-2 rounded-lg text-left text-sm transition-colors focus:outline-none",
|
|
1160
1292
|
style: {
|
|
1161
|
-
height:
|
|
1162
|
-
padding:
|
|
1293
|
+
height: St(d),
|
|
1294
|
+
padding: St(h),
|
|
1163
1295
|
background: "var(--bg-input)",
|
|
1164
|
-
color:
|
|
1165
|
-
border:
|
|
1296
|
+
color: I ? "var(--text-main)" : "var(--text-muted)",
|
|
1297
|
+
border: b ? "1px solid var(--primary)" : "1px solid var(--border)",
|
|
1166
1298
|
opacity: u ? 0.5 : 1,
|
|
1167
1299
|
cursor: u ? "not-allowed" : "pointer"
|
|
1168
1300
|
},
|
|
1169
1301
|
"aria-haspopup": "listbox",
|
|
1170
|
-
"aria-expanded":
|
|
1302
|
+
"aria-expanded": b,
|
|
1171
1303
|
children: [
|
|
1172
|
-
(
|
|
1304
|
+
(I == null ? void 0 : I.color) && /* @__PURE__ */ t(
|
|
1173
1305
|
"span",
|
|
1174
1306
|
{
|
|
1175
1307
|
className: "flex-shrink-0 w-2.5 h-2.5 rounded-full",
|
|
1176
|
-
style: { background:
|
|
1308
|
+
style: { background: I.color }
|
|
1177
1309
|
}
|
|
1178
1310
|
),
|
|
1179
|
-
/* @__PURE__ */ t("span", { className: "min-w-0 flex flex-1 items-baseline gap-1 overflow-hidden", children:
|
|
1180
|
-
/* @__PURE__ */ t("span", { className: "truncate", children:
|
|
1181
|
-
|
|
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(
|
|
1182
1314
|
"span",
|
|
1183
1315
|
{
|
|
1184
1316
|
className: "min-w-0 flex-shrink truncate",
|
|
1185
1317
|
style: { color: "var(--text-muted)", fontSize: 12 },
|
|
1186
|
-
children:
|
|
1318
|
+
children: I.sublabel
|
|
1187
1319
|
}
|
|
1188
1320
|
)
|
|
1189
1321
|
] }) : /* @__PURE__ */ t("span", { className: "truncate", children: a }) }),
|
|
1190
|
-
|
|
1322
|
+
I && s ? /* @__PURE__ */ t(
|
|
1191
1323
|
"span",
|
|
1192
1324
|
{
|
|
1193
1325
|
role: "button",
|
|
@@ -1197,7 +1329,7 @@ function jt({
|
|
|
1197
1329
|
},
|
|
1198
1330
|
className: "flex-shrink-0 rounded-full p-0.5 transition-colors hover:bg-black/10",
|
|
1199
1331
|
style: { color: "var(--text-muted)" },
|
|
1200
|
-
children: /* @__PURE__ */ t(
|
|
1332
|
+
children: /* @__PURE__ */ t($e, { className: "w-3 h-3" })
|
|
1201
1333
|
}
|
|
1202
1334
|
) : /* @__PURE__ */ t(
|
|
1203
1335
|
_e,
|
|
@@ -1205,14 +1337,14 @@ function jt({
|
|
|
1205
1337
|
className: "flex-shrink-0 w-4 h-4 transition-transform",
|
|
1206
1338
|
style: {
|
|
1207
1339
|
color: "var(--text-muted)",
|
|
1208
|
-
transform:
|
|
1340
|
+
transform: b ? "rotate(180deg)" : "rotate(0deg)"
|
|
1209
1341
|
}
|
|
1210
1342
|
}
|
|
1211
1343
|
)
|
|
1212
1344
|
]
|
|
1213
1345
|
}
|
|
1214
1346
|
),
|
|
1215
|
-
|
|
1347
|
+
b && j && Ke(Q, document.body)
|
|
1216
1348
|
]
|
|
1217
1349
|
}
|
|
1218
1350
|
);
|
|
@@ -1221,7 +1353,7 @@ function Ge(e) {
|
|
|
1221
1353
|
if (e !== void 0)
|
|
1222
1354
|
return typeof e == "number" ? `${e}px` : e;
|
|
1223
1355
|
}
|
|
1224
|
-
function
|
|
1356
|
+
function Kn({
|
|
1225
1357
|
value: e,
|
|
1226
1358
|
onChange: r,
|
|
1227
1359
|
placeholder: n = "Buscar...",
|
|
@@ -1232,7 +1364,7 @@ function Fn({
|
|
|
1232
1364
|
}) {
|
|
1233
1365
|
return /* @__PURE__ */ i("div", { className: `relative ${a}`, children: [
|
|
1234
1366
|
/* @__PURE__ */ t(
|
|
1235
|
-
|
|
1367
|
+
Je,
|
|
1236
1368
|
{
|
|
1237
1369
|
className: "absolute top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[var(--text-muted)] pointer-events-none",
|
|
1238
1370
|
style: { left: Ge(f) }
|
|
@@ -1251,7 +1383,7 @@ function Fn({
|
|
|
1251
1383
|
)
|
|
1252
1384
|
] });
|
|
1253
1385
|
}
|
|
1254
|
-
function
|
|
1386
|
+
function Qn({
|
|
1255
1387
|
value: e,
|
|
1256
1388
|
onChange: r,
|
|
1257
1389
|
options: n,
|
|
@@ -1264,7 +1396,7 @@ function Un({
|
|
|
1264
1396
|
searchable: h = !0
|
|
1265
1397
|
}) {
|
|
1266
1398
|
const N = s ? n.map(
|
|
1267
|
-
(
|
|
1399
|
+
(S, b) => b === 0 && !S.color ? { ...S, sublabel: S.sublabel ?? void 0 } : S
|
|
1268
1400
|
) : n;
|
|
1269
1401
|
return /* @__PURE__ */ i("div", { className: `relative ${u}`, children: [
|
|
1270
1402
|
s && /* @__PURE__ */ t(
|
|
@@ -1276,7 +1408,7 @@ function Un({
|
|
|
1276
1408
|
}
|
|
1277
1409
|
),
|
|
1278
1410
|
/* @__PURE__ */ t(
|
|
1279
|
-
|
|
1411
|
+
Wt,
|
|
1280
1412
|
{
|
|
1281
1413
|
value: e,
|
|
1282
1414
|
onChange: r,
|
|
@@ -1291,7 +1423,7 @@ function Un({
|
|
|
1291
1423
|
)
|
|
1292
1424
|
] });
|
|
1293
1425
|
}
|
|
1294
|
-
const
|
|
1426
|
+
const Gr = {
|
|
1295
1427
|
sm: "24rem",
|
|
1296
1428
|
md: "28rem",
|
|
1297
1429
|
lg: "32rem",
|
|
@@ -1300,7 +1432,7 @@ const zr = {
|
|
|
1300
1432
|
"4xl": "56rem",
|
|
1301
1433
|
"5xl": "64rem"
|
|
1302
1434
|
}, qe = 180;
|
|
1303
|
-
function
|
|
1435
|
+
function Xr({
|
|
1304
1436
|
open: e,
|
|
1305
1437
|
onClose: r,
|
|
1306
1438
|
title: n,
|
|
@@ -1312,53 +1444,53 @@ function jr({
|
|
|
1312
1444
|
size: d = "md",
|
|
1313
1445
|
maxWidth: h,
|
|
1314
1446
|
zIndex: N = 1e3,
|
|
1315
|
-
closeOnBackdrop:
|
|
1316
|
-
closeOnEscape:
|
|
1447
|
+
closeOnBackdrop: S = !0,
|
|
1448
|
+
closeOnEscape: b = !0,
|
|
1317
1449
|
showCloseButton: m = !0,
|
|
1318
|
-
placement:
|
|
1450
|
+
placement: v = "center",
|
|
1319
1451
|
bodyClassName: c = "px-6 py-5",
|
|
1320
1452
|
panelClassName: y = "",
|
|
1321
|
-
backdropClassName:
|
|
1322
|
-
contentClassName:
|
|
1323
|
-
ariaLabel:
|
|
1324
|
-
frameless:
|
|
1453
|
+
backdropClassName: T = "bg-black/50 backdrop-blur-sm",
|
|
1454
|
+
contentClassName: j = "p-4",
|
|
1455
|
+
ariaLabel: P,
|
|
1456
|
+
frameless: C = !1
|
|
1325
1457
|
}) {
|
|
1326
|
-
const [
|
|
1327
|
-
if (
|
|
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(
|
|
1328
1460
|
() => B(!1),
|
|
1329
1461
|
qe + 40
|
|
1330
1462
|
)), () => {
|
|
1331
1463
|
E.current && clearTimeout(E.current);
|
|
1332
|
-
}), [e]),
|
|
1464
|
+
}), [e]), H(() => {
|
|
1333
1465
|
if (e)
|
|
1334
1466
|
return document.body.style.overflow = "hidden", () => {
|
|
1335
1467
|
document.body.style.overflow = "";
|
|
1336
1468
|
};
|
|
1337
|
-
}, [e]),
|
|
1338
|
-
if (!e || !
|
|
1469
|
+
}, [e]), H(() => {
|
|
1470
|
+
if (!e || !b) return;
|
|
1339
1471
|
const V = (Q) => {
|
|
1340
1472
|
Q.key === "Escape" && r();
|
|
1341
1473
|
};
|
|
1342
1474
|
return window.addEventListener("keydown", V), () => window.removeEventListener("keydown", V);
|
|
1343
|
-
}, [
|
|
1344
|
-
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)";
|
|
1345
1477
|
return Ke(
|
|
1346
1478
|
/* @__PURE__ */ i(
|
|
1347
1479
|
"div",
|
|
1348
1480
|
{
|
|
1349
1481
|
role: "dialog",
|
|
1350
1482
|
"aria-modal": "true",
|
|
1351
|
-
"aria-label":
|
|
1352
|
-
className: `fixed inset-0 flex ${
|
|
1483
|
+
"aria-label": P ?? n,
|
|
1484
|
+
className: `fixed inset-0 flex ${J} ${j}`,
|
|
1353
1485
|
style: { zIndex: N },
|
|
1354
1486
|
children: [
|
|
1355
1487
|
/* @__PURE__ */ t(
|
|
1356
1488
|
"div",
|
|
1357
1489
|
{
|
|
1358
|
-
className: `absolute inset-0 ${
|
|
1359
|
-
onClick:
|
|
1490
|
+
className: `absolute inset-0 ${T}`,
|
|
1491
|
+
onClick: S ? r : void 0,
|
|
1360
1492
|
style: {
|
|
1361
|
-
opacity:
|
|
1493
|
+
opacity: $ ? 1 : 0,
|
|
1362
1494
|
transition: `opacity ${qe}ms ease`
|
|
1363
1495
|
}
|
|
1364
1496
|
}
|
|
@@ -1366,18 +1498,18 @@ function jr({
|
|
|
1366
1498
|
/* @__PURE__ */ i(
|
|
1367
1499
|
"div",
|
|
1368
1500
|
{
|
|
1369
|
-
className: `relative z-10 flex max-h-[92dvh] w-full flex-col overflow-hidden ${
|
|
1501
|
+
className: `relative z-10 flex max-h-[92dvh] w-full flex-col overflow-hidden ${C ? "shadow-none" : "shadow-2xl"} ${W} ${y}`,
|
|
1370
1502
|
style: {
|
|
1371
|
-
maxWidth:
|
|
1372
|
-
background:
|
|
1373
|
-
border:
|
|
1374
|
-
opacity:
|
|
1503
|
+
maxWidth: I,
|
|
1504
|
+
background: C ? "transparent" : "var(--bg-card)",
|
|
1505
|
+
border: C ? "none" : "1px solid var(--border)",
|
|
1506
|
+
opacity: $ ? 1 : 0,
|
|
1375
1507
|
transform: F,
|
|
1376
1508
|
transition: `opacity ${qe}ms ease, transform ${qe}ms ease`
|
|
1377
1509
|
},
|
|
1378
1510
|
onClick: (V) => V.stopPropagation(),
|
|
1379
1511
|
children: [
|
|
1380
|
-
|
|
1512
|
+
L && /* @__PURE__ */ i(
|
|
1381
1513
|
"div",
|
|
1382
1514
|
{
|
|
1383
1515
|
className: "flex flex-shrink-0 items-center justify-between gap-3 px-6 py-4",
|
|
@@ -1406,7 +1538,7 @@ function jr({
|
|
|
1406
1538
|
] }),
|
|
1407
1539
|
/* @__PURE__ */ i("div", { className: "flex flex-shrink-0 items-center gap-2", children: [
|
|
1408
1540
|
u,
|
|
1409
|
-
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" }) })
|
|
1410
1542
|
] })
|
|
1411
1543
|
]
|
|
1412
1544
|
}
|
|
@@ -1429,7 +1561,7 @@ function jr({
|
|
|
1429
1561
|
document.body
|
|
1430
1562
|
);
|
|
1431
1563
|
}
|
|
1432
|
-
const
|
|
1564
|
+
const Vr = {
|
|
1433
1565
|
danger: {
|
|
1434
1566
|
iconBg: "rgba(239,68,68,0.12)",
|
|
1435
1567
|
iconColor: "var(--danger)",
|
|
@@ -1449,7 +1581,7 @@ const _r = {
|
|
|
1449
1581
|
btnColor: "#fff"
|
|
1450
1582
|
}
|
|
1451
1583
|
};
|
|
1452
|
-
function
|
|
1584
|
+
function ea({
|
|
1453
1585
|
open: e,
|
|
1454
1586
|
title: r,
|
|
1455
1587
|
description: n,
|
|
@@ -1459,9 +1591,9 @@ function Yn({
|
|
|
1459
1591
|
onConfirm: f,
|
|
1460
1592
|
onCancel: p
|
|
1461
1593
|
}) {
|
|
1462
|
-
const d =
|
|
1594
|
+
const d = Vr[u];
|
|
1463
1595
|
return /* @__PURE__ */ i(
|
|
1464
|
-
|
|
1596
|
+
Xr,
|
|
1465
1597
|
{
|
|
1466
1598
|
open: e,
|
|
1467
1599
|
onClose: p,
|
|
@@ -1480,7 +1612,7 @@ function Yn({
|
|
|
1480
1612
|
className: "absolute right-3 top-3 h-7 w-7 hover:opacity-70",
|
|
1481
1613
|
style: { color: "var(--text-muted)" },
|
|
1482
1614
|
"aria-label": "Cancelar",
|
|
1483
|
-
children: /* @__PURE__ */ t(
|
|
1615
|
+
children: /* @__PURE__ */ t($e, { className: "h-4 w-4" })
|
|
1484
1616
|
}
|
|
1485
1617
|
),
|
|
1486
1618
|
/* @__PURE__ */ t(
|
|
@@ -1491,7 +1623,7 @@ function Yn({
|
|
|
1491
1623
|
background: d.iconBg
|
|
1492
1624
|
},
|
|
1493
1625
|
children: /* @__PURE__ */ t(
|
|
1494
|
-
|
|
1626
|
+
ar,
|
|
1495
1627
|
{
|
|
1496
1628
|
className: "h-5 w-5",
|
|
1497
1629
|
style: { color: d.iconColor }
|
|
@@ -1538,82 +1670,82 @@ function Yn({
|
|
|
1538
1670
|
}
|
|
1539
1671
|
);
|
|
1540
1672
|
}
|
|
1541
|
-
function
|
|
1673
|
+
function Ft(e) {
|
|
1542
1674
|
const r = document.createElement("textarea");
|
|
1543
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);
|
|
1544
1676
|
}
|
|
1545
|
-
async function
|
|
1677
|
+
async function Zr(e) {
|
|
1546
1678
|
var r;
|
|
1547
1679
|
if ((r = navigator.clipboard) != null && r.writeText) {
|
|
1548
1680
|
await navigator.clipboard.writeText(e);
|
|
1549
1681
|
return;
|
|
1550
1682
|
}
|
|
1551
|
-
|
|
1683
|
+
Ft(e);
|
|
1552
1684
|
}
|
|
1553
|
-
function
|
|
1685
|
+
function Jr(e) {
|
|
1554
1686
|
return typeof e == "function" ? e() : e;
|
|
1555
1687
|
}
|
|
1556
|
-
function
|
|
1688
|
+
function Kr({
|
|
1557
1689
|
value: e,
|
|
1558
1690
|
resetDelay: r = 2e3,
|
|
1559
1691
|
title: n,
|
|
1560
1692
|
copiedTitle: a = "Copiado",
|
|
1561
1693
|
copiedLabel: s,
|
|
1562
|
-
icon: u = /* @__PURE__ */ t(
|
|
1563
|
-
copiedIcon: f = /* @__PURE__ */ t(
|
|
1694
|
+
icon: u = /* @__PURE__ */ t(ir, { className: "h-3.5 w-3.5" }),
|
|
1695
|
+
copiedIcon: f = /* @__PURE__ */ t(Pt, { className: "h-3.5 w-3.5" }),
|
|
1564
1696
|
stopPropagation: p = !0,
|
|
1565
1697
|
onCopied: d,
|
|
1566
1698
|
onCopyError: h,
|
|
1567
1699
|
className: N = "",
|
|
1568
|
-
style:
|
|
1569
|
-
children:
|
|
1700
|
+
style: S,
|
|
1701
|
+
children: b,
|
|
1570
1702
|
onClick: m,
|
|
1571
|
-
type:
|
|
1703
|
+
type: v = "button",
|
|
1572
1704
|
...c
|
|
1573
1705
|
}) {
|
|
1574
|
-
const [y,
|
|
1575
|
-
|
|
1576
|
-
|
|
1706
|
+
const [y, T] = D(!1), j = re(null);
|
|
1707
|
+
H(() => () => {
|
|
1708
|
+
j.current && window.clearTimeout(j.current);
|
|
1577
1709
|
}, []);
|
|
1578
|
-
function
|
|
1579
|
-
|
|
1580
|
-
|
|
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;
|
|
1581
1713
|
}, r);
|
|
1582
1714
|
}
|
|
1583
|
-
async function
|
|
1584
|
-
var
|
|
1585
|
-
if (p &&
|
|
1586
|
-
const B =
|
|
1715
|
+
async function C(M) {
|
|
1716
|
+
var $;
|
|
1717
|
+
if (p && M.stopPropagation(), m == null || m(M), M.defaultPrevented) return;
|
|
1718
|
+
const B = Jr(e);
|
|
1587
1719
|
if (B)
|
|
1588
1720
|
try {
|
|
1589
|
-
await
|
|
1590
|
-
} catch (
|
|
1721
|
+
await Zr(B), P(B);
|
|
1722
|
+
} catch (_) {
|
|
1591
1723
|
try {
|
|
1592
|
-
|
|
1724
|
+
Ft(B), P(B);
|
|
1593
1725
|
} catch (E) {
|
|
1594
1726
|
h == null || h(E, B);
|
|
1595
1727
|
return;
|
|
1596
1728
|
}
|
|
1597
|
-
(
|
|
1729
|
+
($ = navigator.clipboard) != null && $.writeText || h == null || h(_, B);
|
|
1598
1730
|
}
|
|
1599
1731
|
}
|
|
1600
1732
|
return /* @__PURE__ */ i(
|
|
1601
1733
|
"button",
|
|
1602
1734
|
{
|
|
1603
1735
|
...c,
|
|
1604
|
-
type:
|
|
1605
|
-
onClick:
|
|
1736
|
+
type: v,
|
|
1737
|
+
onClick: C,
|
|
1606
1738
|
title: y ? a : n,
|
|
1607
1739
|
"aria-label": c["aria-label"] ?? (y ? a : n),
|
|
1608
1740
|
"data-copied": y ? "true" : void 0,
|
|
1609
|
-
className: `relative inline-flex h-7 shrink-0 items-center justify-center rounded-md transition-all duration-200 ${
|
|
1741
|
+
className: `relative inline-flex h-7 shrink-0 items-center justify-center rounded-md transition-all duration-200 ${b ? "min-w-7 px-2" : "w-7"} ${N}`,
|
|
1610
1742
|
style: {
|
|
1611
1743
|
cursor: "pointer",
|
|
1612
1744
|
background: y ? "rgba(22,163,74,0.15)" : "transparent",
|
|
1613
1745
|
border: y ? "1px solid rgba(22,163,74,0.4)" : "1px solid transparent",
|
|
1614
1746
|
color: y ? "#16a34a" : "var(--text-muted)",
|
|
1615
1747
|
boxShadow: y ? "0 0 0 3px rgba(22,163,74,0.12)" : "none",
|
|
1616
|
-
...
|
|
1748
|
+
...S
|
|
1617
1749
|
},
|
|
1618
1750
|
children: [
|
|
1619
1751
|
/* @__PURE__ */ t(
|
|
@@ -1624,145 +1756,45 @@ function Wr({
|
|
|
1624
1756
|
children: y ? f : u
|
|
1625
1757
|
}
|
|
1626
1758
|
),
|
|
1627
|
-
|
|
1759
|
+
b && /* @__PURE__ */ t("span", { className: "ml-2 text-xs font-medium", children: y ? s ?? b : b })
|
|
1628
1760
|
]
|
|
1629
1761
|
}
|
|
1630
1762
|
);
|
|
1631
1763
|
}
|
|
1632
|
-
function
|
|
1764
|
+
function Qr(e, r) {
|
|
1633
1765
|
const n = typeof e == "function" ? e() : e;
|
|
1634
1766
|
return r ? r(n) : n;
|
|
1635
1767
|
}
|
|
1636
|
-
function
|
|
1768
|
+
function ta({
|
|
1637
1769
|
url: e,
|
|
1638
1770
|
resolveUrl: r,
|
|
1639
1771
|
title: n = "Copiar link",
|
|
1640
1772
|
copiedTitle: a = "Link copiado",
|
|
1641
|
-
icon: s = /* @__PURE__ */ t(
|
|
1773
|
+
icon: s = /* @__PURE__ */ t(or, { className: "h-3.5 w-3.5" }),
|
|
1642
1774
|
...u
|
|
1643
1775
|
}) {
|
|
1644
1776
|
return /* @__PURE__ */ t(
|
|
1645
|
-
|
|
1777
|
+
Kr,
|
|
1646
1778
|
{
|
|
1647
1779
|
...u,
|
|
1648
|
-
value: () =>
|
|
1780
|
+
value: () => Qr(e, r),
|
|
1649
1781
|
title: n,
|
|
1650
1782
|
copiedTitle: a,
|
|
1651
1783
|
icon: s
|
|
1652
1784
|
}
|
|
1653
1785
|
);
|
|
1654
1786
|
}
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
const r = Array.from(
|
|
1658
|
-
e.querySelectorAll("*")
|
|
1659
|
-
).filter(
|
|
1660
|
-
(s) => {
|
|
1661
|
-
var u;
|
|
1662
|
-
return s.scrollWidth > s.clientWidth && !!((u = s.textContent) != null && u.trim()) && s.tagName.toLowerCase() !== "svg" && !s.closest("svg");
|
|
1663
|
-
}
|
|
1664
|
-
);
|
|
1665
|
-
return (e.scrollWidth > e.clientWidth || r.length > 0) && (((a = r[0]) == null ? void 0 : a.textContent) ?? e.textContent ?? "").trim() || null;
|
|
1666
|
-
}
|
|
1667
|
-
function Rt({
|
|
1668
|
-
children: e,
|
|
1669
|
-
content: r,
|
|
1670
|
-
onlyWhenOverflow: n = !1,
|
|
1671
|
-
className: a = "",
|
|
1672
|
-
style: s,
|
|
1673
|
-
as: u = "div"
|
|
1674
|
-
}) {
|
|
1675
|
-
const f = re(null), p = re(null), [d, h] = T(null), [N, k] = T("");
|
|
1676
|
-
_(() => {
|
|
1677
|
-
const g = f.current;
|
|
1678
|
-
g && (g.querySelectorAll("[title]").forEach((c) => {
|
|
1679
|
-
const y = c.getAttribute("title");
|
|
1680
|
-
y && (c.getAttribute("aria-label") || c.setAttribute("aria-label", y), c.removeAttribute("title"));
|
|
1681
|
-
}), g.querySelectorAll("svg title").forEach((c) => c.remove()));
|
|
1682
|
-
}), Jt(() => {
|
|
1683
|
-
if (!d) return;
|
|
1684
|
-
const g = p.current;
|
|
1685
|
-
if (!g) return;
|
|
1686
|
-
const c = 12, y = 14, L = g.getBoundingClientRect(), W = window.innerWidth - L.width - c, z = window.innerHeight - L.height - c;
|
|
1687
|
-
let $ = d.mouseX + y, D = d.mouseY + y;
|
|
1688
|
-
$ > W && ($ = d.mouseX - L.width - y), D > z && (D = d.mouseY - L.height - y), $ = Math.min(Math.max(c, $), Math.max(c, W)), D = Math.min(Math.max(c, D), Math.max(c, z)), (Math.abs($ - d.x) > 0.5 || Math.abs(D - d.y) > 0.5) && h(
|
|
1689
|
-
(B) => B && {
|
|
1690
|
-
...B,
|
|
1691
|
-
x: $,
|
|
1692
|
-
y: D
|
|
1693
|
-
}
|
|
1694
|
-
);
|
|
1695
|
-
}, [d]);
|
|
1696
|
-
const v = (g, c) => {
|
|
1697
|
-
const y = f.current;
|
|
1698
|
-
if (y) {
|
|
1699
|
-
if (n) {
|
|
1700
|
-
const L = Ur(y);
|
|
1701
|
-
if (!L) return;
|
|
1702
|
-
k(L);
|
|
1703
|
-
}
|
|
1704
|
-
!n && !r || h({ mouseX: g, mouseY: c, x: g + 14, y: c + 14 });
|
|
1705
|
-
}
|
|
1706
|
-
}, m = n ? N : r;
|
|
1707
|
-
return /* @__PURE__ */ i(we, { children: [
|
|
1708
|
-
/* @__PURE__ */ t(
|
|
1709
|
-
u,
|
|
1710
|
-
{
|
|
1711
|
-
ref: (g) => {
|
|
1712
|
-
f.current = g;
|
|
1713
|
-
},
|
|
1714
|
-
className: a,
|
|
1715
|
-
style: s,
|
|
1716
|
-
onMouseEnter: (g) => v(g.clientX, g.clientY),
|
|
1717
|
-
onMouseMove: (g) => {
|
|
1718
|
-
d && v(g.clientX, g.clientY);
|
|
1719
|
-
},
|
|
1720
|
-
onMouseLeave: () => h(null),
|
|
1721
|
-
children: e
|
|
1722
|
-
}
|
|
1723
|
-
),
|
|
1724
|
-
d && m ? Ke(
|
|
1725
|
-
/* @__PURE__ */ t(
|
|
1726
|
-
"div",
|
|
1727
|
-
{
|
|
1728
|
-
ref: p,
|
|
1729
|
-
role: "tooltip",
|
|
1730
|
-
style: {
|
|
1731
|
-
position: "fixed",
|
|
1732
|
-
top: d.y,
|
|
1733
|
-
left: d.x,
|
|
1734
|
-
zIndex: 9999,
|
|
1735
|
-
background: "var(--bg-card)",
|
|
1736
|
-
border: "1px solid var(--border)",
|
|
1737
|
-
borderRadius: 6,
|
|
1738
|
-
padding: "5px 10px",
|
|
1739
|
-
fontSize: 12,
|
|
1740
|
-
color: "var(--text-main)",
|
|
1741
|
-
boxShadow: "0 4px 16px rgba(0,0,0,0.35)",
|
|
1742
|
-
pointerEvents: "none",
|
|
1743
|
-
maxWidth: "min(420px, calc(100vw - 24px))",
|
|
1744
|
-
whiteSpace: "normal",
|
|
1745
|
-
lineHeight: 1.6,
|
|
1746
|
-
overflowWrap: "anywhere"
|
|
1747
|
-
},
|
|
1748
|
-
children: m
|
|
1749
|
-
}
|
|
1750
|
-
),
|
|
1751
|
-
document.body
|
|
1752
|
-
) : null
|
|
1753
|
-
] });
|
|
1754
|
-
}
|
|
1755
|
-
const Yr = "[&_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";
|
|
1756
|
-
function Pe(e) {
|
|
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";
|
|
1788
|
+
function Ie(e) {
|
|
1757
1789
|
if (!e) return 150;
|
|
1758
1790
|
const r = parseInt(e, 10);
|
|
1759
1791
|
return isNaN(r) || r <= 0 ? 150 : r;
|
|
1760
1792
|
}
|
|
1761
|
-
function
|
|
1793
|
+
function Me(e, r) {
|
|
1762
1794
|
const n = e.minWidth ?? 80, a = e.maxWidth ?? 1 / 0;
|
|
1763
1795
|
return Math.min(a, Math.max(n, r));
|
|
1764
1796
|
}
|
|
1765
|
-
function
|
|
1797
|
+
function tn(e, r) {
|
|
1766
1798
|
if (r <= 7) return Array.from({ length: r }, (a, s) => s + 1);
|
|
1767
1799
|
const n = [1];
|
|
1768
1800
|
e > 3 && n.push("...");
|
|
@@ -1770,13 +1802,13 @@ function qr(e, r) {
|
|
|
1770
1802
|
n.push(a);
|
|
1771
1803
|
return e < r - 2 && n.push("..."), n.push(r), n;
|
|
1772
1804
|
}
|
|
1773
|
-
function
|
|
1805
|
+
function Ct({
|
|
1774
1806
|
children: e,
|
|
1775
1807
|
className: r = "",
|
|
1776
1808
|
style: n
|
|
1777
1809
|
}) {
|
|
1778
1810
|
return /* @__PURE__ */ t(
|
|
1779
|
-
|
|
1811
|
+
ut,
|
|
1780
1812
|
{
|
|
1781
1813
|
onlyWhenOverflow: !0,
|
|
1782
1814
|
className: r,
|
|
@@ -1791,7 +1823,7 @@ function kt({
|
|
|
1791
1823
|
}
|
|
1792
1824
|
);
|
|
1793
1825
|
}
|
|
1794
|
-
function
|
|
1826
|
+
function ra({
|
|
1795
1827
|
columns: e,
|
|
1796
1828
|
data: r,
|
|
1797
1829
|
getRowId: n,
|
|
@@ -1803,69 +1835,69 @@ function Gn({
|
|
|
1803
1835
|
selected: d,
|
|
1804
1836
|
onToggleOne: h,
|
|
1805
1837
|
onToggleAll: N,
|
|
1806
|
-
highlightSelected:
|
|
1807
|
-
rowClassName:
|
|
1838
|
+
highlightSelected: S = !0,
|
|
1839
|
+
rowClassName: b,
|
|
1808
1840
|
getRowCategory: m,
|
|
1809
|
-
stickyHeader:
|
|
1841
|
+
stickyHeader: v = !0,
|
|
1810
1842
|
pageSize: c = 25,
|
|
1811
1843
|
pageSizeOptions: y = [25, 50, 100],
|
|
1812
|
-
pageSizeSelectWidth:
|
|
1813
|
-
pageSizeSelectHeight:
|
|
1814
|
-
pageSizeSelectPadding:
|
|
1815
|
-
totalRows:
|
|
1816
|
-
page:
|
|
1844
|
+
pageSizeSelectWidth: T = 62,
|
|
1845
|
+
pageSizeSelectHeight: j = 30,
|
|
1846
|
+
pageSizeSelectPadding: P = "0 7px",
|
|
1847
|
+
totalRows: C,
|
|
1848
|
+
page: M,
|
|
1817
1849
|
onPageChange: B,
|
|
1818
|
-
onPageSizeChange:
|
|
1819
|
-
storageKey:
|
|
1850
|
+
onPageSizeChange: $,
|
|
1851
|
+
storageKey: _,
|
|
1820
1852
|
stickyFirstColumn: E = !1,
|
|
1821
|
-
bottomOffset:
|
|
1822
|
-
compact:
|
|
1823
|
-
restrictHeight:
|
|
1824
|
-
minTableWidth:
|
|
1853
|
+
bottomOffset: L = 0,
|
|
1854
|
+
compact: I = !0,
|
|
1855
|
+
restrictHeight: J = !0,
|
|
1856
|
+
minTableWidth: W
|
|
1825
1857
|
}) {
|
|
1826
|
-
const F = e.map((l) => l.key).join(","), [V, Q] =
|
|
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(
|
|
1827
1859
|
void 0
|
|
1828
|
-
), [ce, ne] =
|
|
1829
|
-
|
|
1830
|
-
const
|
|
1860
|
+
), [ce, ne] = D(!1);
|
|
1861
|
+
H(() => {
|
|
1862
|
+
const g = c !== !1 ? 32 : 0, O = 12;
|
|
1831
1863
|
function A() {
|
|
1832
1864
|
if (ne(window.innerWidth < 640), !Y.current) return;
|
|
1833
1865
|
const G = Y.current.getBoundingClientRect().top;
|
|
1834
1866
|
te(
|
|
1835
1867
|
Math.max(
|
|
1836
1868
|
120,
|
|
1837
|
-
window.innerHeight - G -
|
|
1869
|
+
window.innerHeight - G - g - O - L
|
|
1838
1870
|
)
|
|
1839
1871
|
);
|
|
1840
1872
|
}
|
|
1841
1873
|
return A(), window.addEventListener("resize", A), () => window.removeEventListener("resize", A);
|
|
1842
|
-
}, [a, c,
|
|
1843
|
-
const [Ne, pe] =
|
|
1874
|
+
}, [a, c, L]);
|
|
1875
|
+
const [Ne, pe] = D(
|
|
1844
1876
|
() => e.map((l) => l.key)
|
|
1845
|
-
), [he, de] =
|
|
1877
|
+
), [he, de] = D(
|
|
1846
1878
|
() => Object.fromEntries(
|
|
1847
|
-
e.map((l) => [l.key,
|
|
1879
|
+
e.map((l) => [l.key, Me(l, Ie(l.width))])
|
|
1848
1880
|
)
|
|
1849
1881
|
);
|
|
1850
|
-
|
|
1851
|
-
const l = e.map((
|
|
1852
|
-
if (!
|
|
1882
|
+
H(() => {
|
|
1883
|
+
const l = e.map((O) => O.key);
|
|
1884
|
+
if (!_) {
|
|
1853
1885
|
pe(l), w.current = !1, Q(!0);
|
|
1854
1886
|
return;
|
|
1855
1887
|
}
|
|
1856
|
-
let
|
|
1888
|
+
let g = !1;
|
|
1857
1889
|
return w.current = !1, Q(!1), fetch(
|
|
1858
|
-
`/api/user/preferences/datatables?key=${encodeURIComponent(
|
|
1890
|
+
`/api/user/preferences/datatables?key=${encodeURIComponent(_)}`,
|
|
1859
1891
|
{ cache: "no-store" }
|
|
1860
|
-
).then((
|
|
1892
|
+
).then((O) => O.ok ? O.json() : null).then((O) => {
|
|
1861
1893
|
var Ue, Ye;
|
|
1862
|
-
if (
|
|
1863
|
-
const A = (Ue =
|
|
1864
|
-
e.map((fe) => [fe.key,
|
|
1865
|
-
), K = ((Ye =
|
|
1894
|
+
if (g) return;
|
|
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(
|
|
1866
1898
|
e.map((fe) => [
|
|
1867
1899
|
fe.key,
|
|
1868
|
-
|
|
1900
|
+
Me(fe, K[fe.key] ?? Oe[fe.key])
|
|
1869
1901
|
])
|
|
1870
1902
|
);
|
|
1871
1903
|
pe(be), de(se), o.current = JSON.stringify({
|
|
@@ -1873,144 +1905,144 @@ function Gn({
|
|
|
1873
1905
|
columnWidths: se
|
|
1874
1906
|
}), w.current = !0;
|
|
1875
1907
|
}).catch(() => {
|
|
1876
|
-
if (!
|
|
1908
|
+
if (!g) {
|
|
1877
1909
|
pe(l);
|
|
1878
|
-
const
|
|
1910
|
+
const O = Object.fromEntries(
|
|
1879
1911
|
e.map((A) => [
|
|
1880
1912
|
A.key,
|
|
1881
|
-
|
|
1913
|
+
Me(A, Ie(A.width))
|
|
1882
1914
|
])
|
|
1883
1915
|
);
|
|
1884
|
-
de(
|
|
1916
|
+
de(O), o.current = JSON.stringify({
|
|
1885
1917
|
columnOrder: l,
|
|
1886
|
-
columnWidths:
|
|
1918
|
+
columnWidths: O
|
|
1887
1919
|
}), w.current = !0;
|
|
1888
1920
|
}
|
|
1889
1921
|
}).finally(() => {
|
|
1890
|
-
|
|
1922
|
+
g || Q(!0);
|
|
1891
1923
|
}), () => {
|
|
1892
|
-
|
|
1924
|
+
g = !0;
|
|
1893
1925
|
};
|
|
1894
|
-
}, [
|
|
1895
|
-
if (!
|
|
1926
|
+
}, [_, F, e]), H(() => {
|
|
1927
|
+
if (!_ || !V || !w.current) return;
|
|
1896
1928
|
const l = {
|
|
1897
1929
|
columnOrder: Ne,
|
|
1898
1930
|
columnWidths: he
|
|
1899
|
-
},
|
|
1900
|
-
if (
|
|
1901
|
-
const
|
|
1931
|
+
}, g = JSON.stringify(l);
|
|
1932
|
+
if (g === o.current) return;
|
|
1933
|
+
const O = window.setTimeout(() => {
|
|
1902
1934
|
fetch("/api/user/preferences/datatables", {
|
|
1903
1935
|
method: "PATCH",
|
|
1904
1936
|
headers: { "Content-Type": "application/json" },
|
|
1905
|
-
body: JSON.stringify({ key:
|
|
1937
|
+
body: JSON.stringify({ key: _, settings: l })
|
|
1906
1938
|
}).then((A) => {
|
|
1907
|
-
A.ok && (o.current =
|
|
1939
|
+
A.ok && (o.current = g);
|
|
1908
1940
|
}).catch(() => {
|
|
1909
1941
|
});
|
|
1910
1942
|
}, 300);
|
|
1911
|
-
return () => window.clearTimeout(
|
|
1912
|
-
}, [Ne, he,
|
|
1943
|
+
return () => window.clearTimeout(O);
|
|
1944
|
+
}, [Ne, he, _, V]), H(() => {
|
|
1913
1945
|
pe((l) => {
|
|
1914
|
-
const
|
|
1915
|
-
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];
|
|
1916
1948
|
});
|
|
1917
1949
|
}, [F, e]);
|
|
1918
|
-
const
|
|
1919
|
-
|
|
1950
|
+
const k = Ne.map((l) => e.find((g) => g.key === l)).filter((l) => !!l);
|
|
1951
|
+
H(() => {
|
|
1920
1952
|
de((l) => {
|
|
1921
|
-
const
|
|
1922
|
-
e.map((
|
|
1953
|
+
const g = Object.fromEntries(
|
|
1954
|
+
e.map((O) => [O.key, Me(O, Ie(O.width))])
|
|
1923
1955
|
);
|
|
1924
1956
|
return Object.fromEntries(
|
|
1925
|
-
e.map((
|
|
1926
|
-
|
|
1927
|
-
|
|
1957
|
+
e.map((O) => [
|
|
1958
|
+
O.key,
|
|
1959
|
+
Me(O, l[O.key] ?? g[O.key])
|
|
1928
1960
|
])
|
|
1929
1961
|
);
|
|
1930
1962
|
});
|
|
1931
1963
|
}, [F, e]);
|
|
1932
|
-
const
|
|
1933
|
-
|
|
1934
|
-
function l(
|
|
1935
|
-
const A =
|
|
1964
|
+
const R = re(null);
|
|
1965
|
+
H(() => {
|
|
1966
|
+
function l(O) {
|
|
1967
|
+
const A = R.current;
|
|
1936
1968
|
if (!A) return;
|
|
1937
|
-
const G =
|
|
1969
|
+
const G = O.clientX - A.startX, ue = e.find((be) => be.key === A.colKey);
|
|
1938
1970
|
ue && de((be) => ({
|
|
1939
1971
|
...be,
|
|
1940
|
-
[A.colKey]:
|
|
1972
|
+
[A.colKey]: Me(ue, A.startWidth + G)
|
|
1941
1973
|
}));
|
|
1942
1974
|
}
|
|
1943
|
-
function
|
|
1944
|
-
|
|
1975
|
+
function g() {
|
|
1976
|
+
R.current && (R.current = null, document.body.style.cursor = "", document.body.style.userSelect = "");
|
|
1945
1977
|
}
|
|
1946
|
-
return document.addEventListener("pointermove", l), document.addEventListener("pointerup",
|
|
1947
|
-
document.removeEventListener("pointermove", l), document.removeEventListener("pointerup",
|
|
1978
|
+
return document.addEventListener("pointermove", l), document.addEventListener("pointerup", g), () => {
|
|
1979
|
+
document.removeEventListener("pointermove", l), document.removeEventListener("pointerup", g);
|
|
1948
1980
|
};
|
|
1949
1981
|
}, [e]);
|
|
1950
|
-
const q = re(null), [ae, oe] =
|
|
1951
|
-
function
|
|
1952
|
-
q.current = l,
|
|
1982
|
+
const q = re(null), [ae, oe] = D(null);
|
|
1983
|
+
function z(l, g) {
|
|
1984
|
+
q.current = l, g.dataTransfer.effectAllowed = "move";
|
|
1953
1985
|
}
|
|
1954
|
-
function ke(l,
|
|
1955
|
-
|
|
1986
|
+
function ke(l, g) {
|
|
1987
|
+
g.preventDefault(), g.dataTransfer.dropEffect = "move", ae !== l && oe(l);
|
|
1956
1988
|
}
|
|
1957
|
-
function Re(l,
|
|
1958
|
-
|
|
1959
|
-
const
|
|
1960
|
-
|
|
1961
|
-
const G = [...A], [ue] = G.splice(
|
|
1989
|
+
function Re(l, g) {
|
|
1990
|
+
g.preventDefault();
|
|
1991
|
+
const O = q.current;
|
|
1992
|
+
O !== null && O !== l && pe((A) => {
|
|
1993
|
+
const G = [...A], [ue] = G.splice(O, 1);
|
|
1962
1994
|
return G.splice(l, 0, ue), G;
|
|
1963
1995
|
}), q.current = null, oe(null);
|
|
1964
1996
|
}
|
|
1965
1997
|
function Qe() {
|
|
1966
1998
|
q.current = null, oe(null);
|
|
1967
1999
|
}
|
|
1968
|
-
const [me, He] =
|
|
2000
|
+
const [me, He] = D(null);
|
|
1969
2001
|
function ie(l) {
|
|
1970
2002
|
l.sortKey && He(
|
|
1971
|
-
(
|
|
2003
|
+
(g) => (g == null ? void 0 : g.key) === l.key ? { key: l.key, dir: g.dir === "asc" ? "desc" : "asc" } : { key: l.key, dir: "asc" }
|
|
1972
2004
|
);
|
|
1973
2005
|
}
|
|
1974
|
-
const [We,
|
|
2006
|
+
const [We, Be] = D(1), [Le, Fe] = D(
|
|
1975
2007
|
c === !1 ? 0 : c
|
|
1976
2008
|
);
|
|
1977
|
-
|
|
1978
|
-
|
|
2009
|
+
H(() => {
|
|
2010
|
+
Be(1);
|
|
1979
2011
|
}, [r]);
|
|
1980
|
-
const Se = !!(B &&
|
|
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(() => {
|
|
1981
2013
|
if (!me) return r;
|
|
1982
|
-
const l = e.find((
|
|
1983
|
-
return l != null && l.sortKey ? [...r].sort((
|
|
1984
|
-
const A =
|
|
2014
|
+
const l = e.find((g) => g.key === me.key && g.sortKey);
|
|
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;
|
|
1985
2017
|
return me.dir === "asc" ? ue : -ue;
|
|
1986
2018
|
}) : r;
|
|
1987
|
-
}, [r, me, e]),
|
|
2019
|
+
}, [r, me, e]), mt = ge.useMemo(() => {
|
|
1988
2020
|
if (Se || !ve) return Ce;
|
|
1989
|
-
const l = (
|
|
2021
|
+
const l = (x - 1) * ee;
|
|
1990
2022
|
return Ce.slice(l, l + ee);
|
|
1991
|
-
}, [Ce, Se, ve,
|
|
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;
|
|
1992
2024
|
function tt(l) {
|
|
1993
|
-
const
|
|
1994
|
-
Se ? B(
|
|
2025
|
+
const g = Math.max(1, Math.min(l, et));
|
|
2026
|
+
Se ? B(g) : Be(g);
|
|
1995
2027
|
}
|
|
1996
|
-
function
|
|
1997
|
-
Fe(l), Se ? (
|
|
2028
|
+
function Zt(l) {
|
|
2029
|
+
Fe(l), Se ? ($(l), B(1)) : Be(1), $ && $(l);
|
|
1998
2030
|
}
|
|
1999
|
-
const
|
|
2000
|
-
function
|
|
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);
|
|
2032
|
+
function pt(l) {
|
|
2001
2033
|
return l ? typeof l == "string" ? { key: l, label: l } : l : null;
|
|
2002
2034
|
}
|
|
2003
|
-
const
|
|
2035
|
+
const ht = () => /* @__PURE__ */ i(
|
|
2004
2036
|
"tr",
|
|
2005
2037
|
{
|
|
2006
2038
|
style: {
|
|
2007
2039
|
background: "color-mix(in srgb, var(--bg-input) 72%, transparent)"
|
|
2008
2040
|
},
|
|
2009
2041
|
children: [
|
|
2010
|
-
|
|
2042
|
+
Z && /* @__PURE__ */ t(
|
|
2011
2043
|
"th",
|
|
2012
2044
|
{
|
|
2013
|
-
className: `${
|
|
2045
|
+
className: `${I ? "px-2 py-1.5" : "px-3 py-2.5"} w-10`,
|
|
2014
2046
|
style: E ? {
|
|
2015
2047
|
position: "sticky",
|
|
2016
2048
|
left: 0,
|
|
@@ -2038,12 +2070,12 @@ function Gn({
|
|
|
2038
2070
|
)
|
|
2039
2071
|
}
|
|
2040
2072
|
),
|
|
2041
|
-
|
|
2042
|
-
const
|
|
2073
|
+
k.map((l, g) => {
|
|
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;
|
|
2043
2075
|
return /* @__PURE__ */ i(
|
|
2044
2076
|
"th",
|
|
2045
2077
|
{
|
|
2046
|
-
className: `group select-none ${
|
|
2078
|
+
className: `group select-none ${Oe ? "text-left" : ft(l.align)}`,
|
|
2047
2079
|
style: {
|
|
2048
2080
|
...G ? {
|
|
2049
2081
|
position: "sticky",
|
|
@@ -2059,16 +2091,16 @@ function Gn({
|
|
|
2059
2091
|
borderBottom: "2px solid var(--border)",
|
|
2060
2092
|
borderRight: "1px solid var(--border)"
|
|
2061
2093
|
},
|
|
2062
|
-
color:
|
|
2094
|
+
color: O ? "var(--primary)" : "var(--text-muted)",
|
|
2063
2095
|
whiteSpace: "nowrap",
|
|
2064
2096
|
transition: "color 0.15s",
|
|
2065
2097
|
borderLeft: ue ? "2px solid var(--primary)" : "2px solid transparent",
|
|
2066
2098
|
cursor: A ? "pointer" : "default",
|
|
2067
2099
|
// Padding: room for grip icon left, resize handle right
|
|
2068
|
-
padding:
|
|
2100
|
+
padding: I ? "5px 24px 5px 6px" : "7px 28px 7px 6px"
|
|
2069
2101
|
},
|
|
2070
|
-
onDragOver: (K) => ke(
|
|
2071
|
-
onDrop: (K) => Re(
|
|
2102
|
+
onDragOver: (K) => ke(g, K),
|
|
2103
|
+
onDrop: (K) => Re(g, K),
|
|
2072
2104
|
onClick: A ? () => ie(l) : void 0,
|
|
2073
2105
|
children: [
|
|
2074
2106
|
/* @__PURE__ */ t(
|
|
@@ -2076,7 +2108,7 @@ function Gn({
|
|
|
2076
2108
|
{
|
|
2077
2109
|
draggable: !0,
|
|
2078
2110
|
onDragStart: (K) => {
|
|
2079
|
-
K.stopPropagation(),
|
|
2111
|
+
K.stopPropagation(), z(g, K);
|
|
2080
2112
|
},
|
|
2081
2113
|
onDragEnd: (K) => {
|
|
2082
2114
|
K.stopPropagation(), Qe();
|
|
@@ -2089,24 +2121,24 @@ function Gn({
|
|
|
2089
2121
|
color: "var(--text-muted)",
|
|
2090
2122
|
verticalAlign: "middle"
|
|
2091
2123
|
},
|
|
2092
|
-
children: /* @__PURE__ */ t(
|
|
2124
|
+
children: /* @__PURE__ */ t(Nr, { size: 15 })
|
|
2093
2125
|
}
|
|
2094
2126
|
),
|
|
2095
2127
|
/* @__PURE__ */ t(
|
|
2096
|
-
|
|
2128
|
+
Ct,
|
|
2097
2129
|
{
|
|
2098
2130
|
className: "inline-block max-w-full align-middle",
|
|
2099
2131
|
style: {
|
|
2100
2132
|
width: "calc(100% - 22px)",
|
|
2101
|
-
textAlign:
|
|
2133
|
+
textAlign: Oe ? "left" : l.align === "center" ? "center" : l.align === "right" ? "right" : "left"
|
|
2102
2134
|
},
|
|
2103
2135
|
children: /* @__PURE__ */ i(
|
|
2104
2136
|
"span",
|
|
2105
2137
|
{
|
|
2106
|
-
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"}`,
|
|
2107
2139
|
children: [
|
|
2108
2140
|
/* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: l.header }),
|
|
2109
|
-
A && /* @__PURE__ */ t("span", { className: "flex-shrink-0 opacity-60", children:
|
|
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" }) })
|
|
2110
2142
|
]
|
|
2111
2143
|
}
|
|
2112
2144
|
)
|
|
@@ -2119,7 +2151,7 @@ function Gn({
|
|
|
2119
2151
|
"aria-orientation": "vertical",
|
|
2120
2152
|
title: "Arrastrar para redimensionar",
|
|
2121
2153
|
onPointerDown: (K) => {
|
|
2122
|
-
K.preventDefault(), K.stopPropagation(),
|
|
2154
|
+
K.preventDefault(), K.stopPropagation(), R.current = {
|
|
2123
2155
|
colKey: l.key,
|
|
2124
2156
|
startX: K.clientX,
|
|
2125
2157
|
startWidth: he[l.key] ?? 150
|
|
@@ -2149,34 +2181,34 @@ function Gn({
|
|
|
2149
2181
|
})
|
|
2150
2182
|
]
|
|
2151
2183
|
}
|
|
2152
|
-
),
|
|
2184
|
+
), bt = () => {
|
|
2153
2185
|
if (!ve || a) return null;
|
|
2154
|
-
const l =
|
|
2186
|
+
const l = tn(x, et);
|
|
2155
2187
|
return /* @__PURE__ */ i(
|
|
2156
2188
|
"div",
|
|
2157
2189
|
{
|
|
2158
|
-
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"}`,
|
|
2159
2191
|
style: { borderColor: "var(--border)", background: "var(--bg-input)" },
|
|
2160
2192
|
children: [
|
|
2161
2193
|
/* @__PURE__ */ i("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2162
|
-
/* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: Ae === 0 ? "0 filas" : `${
|
|
2194
|
+
/* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: Ae === 0 ? "0 filas" : `${Xt}–${Vt} de ${Ae}` }),
|
|
2163
2195
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
|
|
2164
2196
|
/* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: "Filas:" }),
|
|
2165
2197
|
/* @__PURE__ */ t(
|
|
2166
|
-
|
|
2198
|
+
Wt,
|
|
2167
2199
|
{
|
|
2168
2200
|
value: String(ee),
|
|
2169
|
-
onChange: (
|
|
2170
|
-
options: y.map((
|
|
2171
|
-
value: String(
|
|
2172
|
-
label: String(
|
|
2201
|
+
onChange: (g) => Zt(Number(g)),
|
|
2202
|
+
options: y.map((g) => ({
|
|
2203
|
+
value: String(g),
|
|
2204
|
+
label: String(g)
|
|
2173
2205
|
})),
|
|
2174
2206
|
placeholder: "Filas",
|
|
2175
2207
|
searchable: !1,
|
|
2176
|
-
height:
|
|
2177
|
-
padding:
|
|
2208
|
+
height: j,
|
|
2209
|
+
padding: P,
|
|
2178
2210
|
className: "shrink-0 [&>button]:rounded-md [&>button]:text-xs [&_svg]:h-3.5 [&_svg]:w-3.5",
|
|
2179
|
-
style: { width:
|
|
2211
|
+
style: { width: T }
|
|
2180
2212
|
}
|
|
2181
2213
|
)
|
|
2182
2214
|
] })
|
|
@@ -2185,41 +2217,41 @@ function Gn({
|
|
|
2185
2217
|
/* @__PURE__ */ t(
|
|
2186
2218
|
"button",
|
|
2187
2219
|
{
|
|
2188
|
-
disabled:
|
|
2189
|
-
onClick: () => tt(
|
|
2220
|
+
disabled: x <= 1,
|
|
2221
|
+
onClick: () => tt(x - 1),
|
|
2190
2222
|
className: "rounded p-0.5 transition-colors disabled:opacity-30",
|
|
2191
2223
|
style: { color: "var(--text-muted)", background: "transparent" },
|
|
2192
2224
|
children: /* @__PURE__ */ t(je, { className: "h-3.5 w-3.5" })
|
|
2193
2225
|
}
|
|
2194
2226
|
),
|
|
2195
2227
|
l.map(
|
|
2196
|
-
(
|
|
2228
|
+
(g, O) => g === "..." ? /* @__PURE__ */ t(
|
|
2197
2229
|
"span",
|
|
2198
2230
|
{
|
|
2199
2231
|
className: "px-1",
|
|
2200
2232
|
style: { color: "var(--text-muted)" },
|
|
2201
2233
|
children: "…"
|
|
2202
2234
|
},
|
|
2203
|
-
`e${
|
|
2235
|
+
`e${O}`
|
|
2204
2236
|
) : /* @__PURE__ */ t(
|
|
2205
2237
|
"button",
|
|
2206
2238
|
{
|
|
2207
|
-
onClick: () => tt(
|
|
2239
|
+
onClick: () => tt(g),
|
|
2208
2240
|
className: "h-5 w-5 rounded text-[11px] font-medium transition-colors",
|
|
2209
2241
|
style: {
|
|
2210
|
-
background:
|
|
2211
|
-
color:
|
|
2242
|
+
background: g === x ? "var(--primary)" : "transparent",
|
|
2243
|
+
color: g === x ? "var(--primary-fg)" : "var(--text-muted)"
|
|
2212
2244
|
},
|
|
2213
|
-
children:
|
|
2245
|
+
children: g
|
|
2214
2246
|
},
|
|
2215
|
-
|
|
2247
|
+
g
|
|
2216
2248
|
)
|
|
2217
2249
|
),
|
|
2218
2250
|
/* @__PURE__ */ t(
|
|
2219
2251
|
"button",
|
|
2220
2252
|
{
|
|
2221
|
-
disabled:
|
|
2222
|
-
onClick: () => tt(
|
|
2253
|
+
disabled: x >= et,
|
|
2254
|
+
onClick: () => tt(x + 1),
|
|
2223
2255
|
className: "rounded p-0.5 transition-colors disabled:opacity-30",
|
|
2224
2256
|
style: { color: "var(--text-muted)", background: "transparent" },
|
|
2225
2257
|
children: /* @__PURE__ */ t(Te, { className: "h-3.5 w-3.5" })
|
|
@@ -2243,12 +2275,12 @@ function Gn({
|
|
|
2243
2275
|
ref: Y,
|
|
2244
2276
|
className: "min-w-0 max-w-full overflow-hidden rounded-t-xl",
|
|
2245
2277
|
children: /* @__PURE__ */ t(
|
|
2246
|
-
|
|
2278
|
+
wt,
|
|
2247
2279
|
{
|
|
2248
2280
|
options: { scrollbars: { autoHide: "leave", autoHideDelay: 200 } },
|
|
2249
2281
|
className: "w-full",
|
|
2250
2282
|
style: {
|
|
2251
|
-
maxHeight:
|
|
2283
|
+
maxHeight: J ? X : void 0,
|
|
2252
2284
|
maxWidth: "100%"
|
|
2253
2285
|
},
|
|
2254
2286
|
defer: !0,
|
|
@@ -2259,14 +2291,14 @@ function Gn({
|
|
|
2259
2291
|
style: {
|
|
2260
2292
|
tableLayout: "fixed",
|
|
2261
2293
|
width: "100%",
|
|
2262
|
-
minWidth:
|
|
2294
|
+
minWidth: W ?? "max-content",
|
|
2263
2295
|
borderCollapse: "separate",
|
|
2264
2296
|
borderSpacing: 0
|
|
2265
2297
|
},
|
|
2266
2298
|
children: [
|
|
2267
2299
|
/* @__PURE__ */ i("colgroup", { children: [
|
|
2268
|
-
|
|
2269
|
-
|
|
2300
|
+
Z && /* @__PURE__ */ t("col", { style: { width: 40 } }),
|
|
2301
|
+
k.map((l) => /* @__PURE__ */ t(
|
|
2270
2302
|
"col",
|
|
2271
2303
|
{
|
|
2272
2304
|
style: { width: he[l.key] ?? 150 }
|
|
@@ -2277,31 +2309,31 @@ function Gn({
|
|
|
2277
2309
|
/* @__PURE__ */ t(
|
|
2278
2310
|
"thead",
|
|
2279
2311
|
{
|
|
2280
|
-
style:
|
|
2312
|
+
style: v ? {
|
|
2281
2313
|
position: "sticky",
|
|
2282
2314
|
top: 0,
|
|
2283
2315
|
zIndex: 10,
|
|
2284
2316
|
backdropFilter: "blur(14px)",
|
|
2285
2317
|
WebkitBackdropFilter: "blur(14px)"
|
|
2286
2318
|
} : void 0,
|
|
2287
|
-
children:
|
|
2319
|
+
children: ht()
|
|
2288
2320
|
}
|
|
2289
2321
|
),
|
|
2290
|
-
/* @__PURE__ */ t("tbody", { children: Array.from({ length: s }).map((l,
|
|
2291
|
-
|
|
2322
|
+
/* @__PURE__ */ t("tbody", { children: Array.from({ length: s }).map((l, g) => /* @__PURE__ */ i("tr", { children: [
|
|
2323
|
+
Z && /* @__PURE__ */ t(
|
|
2292
2324
|
"td",
|
|
2293
2325
|
{
|
|
2294
|
-
className: `${
|
|
2326
|
+
className: `${I ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
|
|
2295
2327
|
style: {
|
|
2296
2328
|
borderBottom: "1px solid var(--border)",
|
|
2297
2329
|
borderRight: "1px solid var(--border)"
|
|
2298
2330
|
}
|
|
2299
2331
|
}
|
|
2300
2332
|
),
|
|
2301
|
-
|
|
2333
|
+
k.map((O, A) => /* @__PURE__ */ t(
|
|
2302
2334
|
"td",
|
|
2303
2335
|
{
|
|
2304
|
-
className:
|
|
2336
|
+
className: I ? "px-2 py-1.5" : "px-3 py-2",
|
|
2305
2337
|
style: E && !ce && A === 0 ? {
|
|
2306
2338
|
position: "sticky",
|
|
2307
2339
|
left: ye,
|
|
@@ -2321,15 +2353,15 @@ function Gn({
|
|
|
2321
2353
|
className: "h-3.5 rounded-full animate-pulse",
|
|
2322
2354
|
style: {
|
|
2323
2355
|
background: "var(--border)",
|
|
2324
|
-
width: `${U(
|
|
2356
|
+
width: `${U(g, A)}%`,
|
|
2325
2357
|
minWidth: 32
|
|
2326
2358
|
}
|
|
2327
2359
|
}
|
|
2328
2360
|
)
|
|
2329
2361
|
},
|
|
2330
|
-
|
|
2362
|
+
O.key
|
|
2331
2363
|
))
|
|
2332
|
-
] },
|
|
2364
|
+
] }, g)) })
|
|
2333
2365
|
]
|
|
2334
2366
|
}
|
|
2335
2367
|
)
|
|
@@ -2337,7 +2369,7 @@ function Gn({
|
|
|
2337
2369
|
)
|
|
2338
2370
|
}
|
|
2339
2371
|
),
|
|
2340
|
-
|
|
2372
|
+
bt()
|
|
2341
2373
|
]
|
|
2342
2374
|
}
|
|
2343
2375
|
) : !a && r.length === 0 ? /* @__PURE__ */ i("div", { className: "py-20 flex flex-col items-center gap-3", children: [
|
|
@@ -2355,12 +2387,12 @@ function Gn({
|
|
|
2355
2387
|
ref: Y,
|
|
2356
2388
|
className: "min-w-0 max-w-full overflow-hidden rounded-t-xl",
|
|
2357
2389
|
children: /* @__PURE__ */ t(
|
|
2358
|
-
|
|
2390
|
+
wt,
|
|
2359
2391
|
{
|
|
2360
2392
|
options: { scrollbars: { autoHide: "leave", autoHideDelay: 200 } },
|
|
2361
2393
|
className: "w-full",
|
|
2362
2394
|
style: {
|
|
2363
|
-
maxHeight:
|
|
2395
|
+
maxHeight: J ? X : void 0,
|
|
2364
2396
|
maxWidth: "100%"
|
|
2365
2397
|
},
|
|
2366
2398
|
defer: !0,
|
|
@@ -2371,14 +2403,14 @@ function Gn({
|
|
|
2371
2403
|
style: {
|
|
2372
2404
|
tableLayout: "fixed",
|
|
2373
2405
|
width: "100%",
|
|
2374
|
-
minWidth:
|
|
2406
|
+
minWidth: W ?? "max-content",
|
|
2375
2407
|
borderCollapse: "separate",
|
|
2376
2408
|
borderSpacing: 0
|
|
2377
2409
|
},
|
|
2378
2410
|
children: [
|
|
2379
2411
|
/* @__PURE__ */ i("colgroup", { children: [
|
|
2380
|
-
|
|
2381
|
-
|
|
2412
|
+
Z && /* @__PURE__ */ t("col", { style: { width: 40 } }),
|
|
2413
|
+
k.map((l) => /* @__PURE__ */ t(
|
|
2382
2414
|
"col",
|
|
2383
2415
|
{
|
|
2384
2416
|
style: { width: he[l.key] ?? 150 }
|
|
@@ -2389,24 +2421,26 @@ function Gn({
|
|
|
2389
2421
|
/* @__PURE__ */ t(
|
|
2390
2422
|
"thead",
|
|
2391
2423
|
{
|
|
2392
|
-
style:
|
|
2424
|
+
style: v ? {
|
|
2393
2425
|
position: "sticky",
|
|
2394
2426
|
top: 0,
|
|
2395
2427
|
zIndex: 10,
|
|
2396
2428
|
backdropFilter: "blur(14px)",
|
|
2397
2429
|
WebkitBackdropFilter: "blur(14px)"
|
|
2398
2430
|
} : void 0,
|
|
2399
|
-
children:
|
|
2431
|
+
children: ht()
|
|
2400
2432
|
}
|
|
2401
2433
|
),
|
|
2402
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
2403
|
-
const
|
|
2434
|
+
/* @__PURE__ */ t("tbody", { children: mt.map((l, g) => {
|
|
2435
|
+
const O = n(l), A = pt(m == null ? void 0 : m(l)), G = g > 0 ? pt(
|
|
2436
|
+
m == null ? void 0 : m(mt[g - 1])
|
|
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)";
|
|
2404
2438
|
return /* @__PURE__ */ i(ge.Fragment, { children: [
|
|
2405
2439
|
ue && /* @__PURE__ */ t("tr", { className: A.className ?? "", children: /* @__PURE__ */ t(
|
|
2406
2440
|
"td",
|
|
2407
2441
|
{
|
|
2408
|
-
colSpan:
|
|
2409
|
-
className:
|
|
2442
|
+
colSpan: Kt,
|
|
2443
|
+
className: I ? "px-2 py-2" : "px-3 py-3",
|
|
2410
2444
|
style: {
|
|
2411
2445
|
background: "color-mix(in srgb, var(--primary) 8%, var(--bg-input))",
|
|
2412
2446
|
borderBottom: "1px solid var(--border)",
|
|
@@ -2421,8 +2455,8 @@ function Gn({
|
|
|
2421
2455
|
/* @__PURE__ */ i(
|
|
2422
2456
|
"tr",
|
|
2423
2457
|
{
|
|
2424
|
-
onClick:
|
|
2425
|
-
className: `transition-colors ${
|
|
2458
|
+
onClick: Oe ? () => p(l) : void 0,
|
|
2459
|
+
className: `transition-colors ${Oe ? "cursor-pointer" : ""} ${b ? b(l) : ""}`,
|
|
2426
2460
|
style: {
|
|
2427
2461
|
"--dt-row-bg": K,
|
|
2428
2462
|
"--dt-sticky-bg": K,
|
|
@@ -2434,7 +2468,7 @@ function Gn({
|
|
|
2434
2468
|
"var(--bg-hover)"
|
|
2435
2469
|
), se.currentTarget.style.setProperty(
|
|
2436
2470
|
"--dt-sticky-bg",
|
|
2437
|
-
|
|
2471
|
+
Jt
|
|
2438
2472
|
));
|
|
2439
2473
|
},
|
|
2440
2474
|
onMouseLeave: (se) => {
|
|
@@ -2444,10 +2478,10 @@ function Gn({
|
|
|
2444
2478
|
);
|
|
2445
2479
|
},
|
|
2446
2480
|
children: [
|
|
2447
|
-
|
|
2481
|
+
Z && /* @__PURE__ */ t(
|
|
2448
2482
|
"td",
|
|
2449
2483
|
{
|
|
2450
|
-
className: `${
|
|
2484
|
+
className: `${I ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
|
|
2451
2485
|
style: E ? {
|
|
2452
2486
|
position: "sticky",
|
|
2453
2487
|
left: 0,
|
|
@@ -2459,7 +2493,7 @@ function Gn({
|
|
|
2459
2493
|
borderRight: "1px solid var(--border)"
|
|
2460
2494
|
},
|
|
2461
2495
|
onClick: (se) => {
|
|
2462
|
-
se.stopPropagation(), h(
|
|
2496
|
+
se.stopPropagation(), h(O);
|
|
2463
2497
|
},
|
|
2464
2498
|
children: /* @__PURE__ */ t(
|
|
2465
2499
|
"input",
|
|
@@ -2467,18 +2501,18 @@ function Gn({
|
|
|
2467
2501
|
type: "checkbox",
|
|
2468
2502
|
checked: be,
|
|
2469
2503
|
onClick: (se) => se.stopPropagation(),
|
|
2470
|
-
onChange: () => h(
|
|
2504
|
+
onChange: () => h(O),
|
|
2471
2505
|
className: "rounded cursor-pointer accent-[var(--primary)]"
|
|
2472
2506
|
}
|
|
2473
2507
|
)
|
|
2474
2508
|
}
|
|
2475
2509
|
),
|
|
2476
|
-
|
|
2510
|
+
k.map((se, Ue) => {
|
|
2477
2511
|
const Ye = E && !ce && Ue === 0;
|
|
2478
2512
|
return /* @__PURE__ */ t(
|
|
2479
2513
|
"td",
|
|
2480
2514
|
{
|
|
2481
|
-
className: `${
|
|
2515
|
+
className: `${I ? "px-2 py-1.5" : "px-3 py-2"} ${en} ${ft(se.align)} ${se.className ?? ""}`,
|
|
2482
2516
|
style: {
|
|
2483
2517
|
overflow: "hidden",
|
|
2484
2518
|
whiteSpace: "nowrap",
|
|
@@ -2494,7 +2528,7 @@ function Gn({
|
|
|
2494
2528
|
borderRight: "1px solid var(--border)"
|
|
2495
2529
|
}
|
|
2496
2530
|
},
|
|
2497
|
-
children: /* @__PURE__ */ t(
|
|
2531
|
+
children: /* @__PURE__ */ t(Ct, { children: se.cell(l) })
|
|
2498
2532
|
},
|
|
2499
2533
|
se.key
|
|
2500
2534
|
);
|
|
@@ -2502,7 +2536,7 @@ function Gn({
|
|
|
2502
2536
|
]
|
|
2503
2537
|
}
|
|
2504
2538
|
)
|
|
2505
|
-
] },
|
|
2539
|
+
] }, O);
|
|
2506
2540
|
}) })
|
|
2507
2541
|
]
|
|
2508
2542
|
}
|
|
@@ -2511,22 +2545,22 @@ function Gn({
|
|
|
2511
2545
|
)
|
|
2512
2546
|
}
|
|
2513
2547
|
),
|
|
2514
|
-
|
|
2548
|
+
bt()
|
|
2515
2549
|
]
|
|
2516
2550
|
}
|
|
2517
2551
|
);
|
|
2518
2552
|
}
|
|
2519
|
-
function
|
|
2553
|
+
function Pe(e) {
|
|
2520
2554
|
return e ? /* @__PURE__ */ new Date(`${e}T12:00:00`) : void 0;
|
|
2521
2555
|
}
|
|
2522
|
-
function
|
|
2556
|
+
function Et(e) {
|
|
2523
2557
|
return e.toISOString().slice(0, 10);
|
|
2524
2558
|
}
|
|
2525
|
-
function
|
|
2559
|
+
function rn({
|
|
2526
2560
|
calendarMonth: e,
|
|
2527
2561
|
displayIndex: r
|
|
2528
2562
|
}) {
|
|
2529
|
-
const { previousMonth: n, nextMonth: a, goToMonth: s, months: u, labels: f, formatters: p } =
|
|
2563
|
+
const { previousMonth: n, nextMonth: a, goToMonth: s, months: u, labels: f, formatters: p } = Sr(), d = !!n && r === 0, h = !!a && r === u.length - 1;
|
|
2530
2564
|
return /* @__PURE__ */ i(
|
|
2531
2565
|
"div",
|
|
2532
2566
|
{
|
|
@@ -2591,10 +2625,10 @@ function Gr({
|
|
|
2591
2625
|
}
|
|
2592
2626
|
);
|
|
2593
2627
|
}
|
|
2594
|
-
function
|
|
2628
|
+
function nn(e) {
|
|
2595
2629
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
2596
2630
|
}
|
|
2597
|
-
function
|
|
2631
|
+
function na({
|
|
2598
2632
|
startDate: e,
|
|
2599
2633
|
endDate: r,
|
|
2600
2634
|
onChange: n,
|
|
@@ -2606,13 +2640,13 @@ function Xn({
|
|
|
2606
2640
|
endLabel: d = "Regreso"
|
|
2607
2641
|
}) {
|
|
2608
2642
|
const h = {
|
|
2609
|
-
from:
|
|
2610
|
-
to:
|
|
2611
|
-
}, N =
|
|
2612
|
-
|
|
2643
|
+
from: Pe(e),
|
|
2644
|
+
to: Pe(r)
|
|
2645
|
+
}, N = Pe(a), [S, b] = D(
|
|
2646
|
+
Pe(s || e)
|
|
2613
2647
|
);
|
|
2614
|
-
return
|
|
2615
|
-
|
|
2648
|
+
return H(() => {
|
|
2649
|
+
b(Pe(s || e));
|
|
2616
2650
|
}, [s, e]), /* @__PURE__ */ i("div", { children: [
|
|
2617
2651
|
/* @__PURE__ */ t(
|
|
2618
2652
|
"div",
|
|
@@ -2627,22 +2661,22 @@ function Xn({
|
|
|
2627
2661
|
padding: "10px 8px"
|
|
2628
2662
|
},
|
|
2629
2663
|
children: /* @__PURE__ */ t(
|
|
2630
|
-
|
|
2664
|
+
kr,
|
|
2631
2665
|
{
|
|
2632
2666
|
mode: "range",
|
|
2633
2667
|
selected: h,
|
|
2634
|
-
month:
|
|
2635
|
-
onMonthChange:
|
|
2668
|
+
month: S,
|
|
2669
|
+
onMonthChange: b,
|
|
2636
2670
|
onSelect: (m) => {
|
|
2637
|
-
const
|
|
2638
|
-
n({ startDate:
|
|
2671
|
+
const v = m != null && m.from ? Et(m.from) : e, c = m != null && m.to ? Et(m.to) : "";
|
|
2672
|
+
n({ startDate: v, endDate: c });
|
|
2639
2673
|
},
|
|
2640
2674
|
numberOfMonths: u,
|
|
2641
2675
|
hideNavigation: !0,
|
|
2642
2676
|
disabled: N ? { before: N } : void 0,
|
|
2643
2677
|
showOutsideDays: !1,
|
|
2644
2678
|
components: {
|
|
2645
|
-
MonthCaption:
|
|
2679
|
+
MonthCaption: rn
|
|
2646
2680
|
},
|
|
2647
2681
|
className: "text-sm",
|
|
2648
2682
|
classNames: {
|
|
@@ -2734,7 +2768,7 @@ function Xn({
|
|
|
2734
2768
|
}
|
|
2735
2769
|
},
|
|
2736
2770
|
formatters: {
|
|
2737
|
-
formatCaption: (m) =>
|
|
2771
|
+
formatCaption: (m) => nn(
|
|
2738
2772
|
new Intl.DateTimeFormat("es-MX", {
|
|
2739
2773
|
month: "long",
|
|
2740
2774
|
year: "numeric"
|
|
@@ -2781,7 +2815,7 @@ function Xn({
|
|
|
2781
2815
|
)
|
|
2782
2816
|
] });
|
|
2783
2817
|
}
|
|
2784
|
-
function
|
|
2818
|
+
function aa({
|
|
2785
2819
|
open: e,
|
|
2786
2820
|
onClose: r,
|
|
2787
2821
|
title: n,
|
|
@@ -2793,15 +2827,15 @@ function Vn({
|
|
|
2793
2827
|
confirmDisabled: d = !1,
|
|
2794
2828
|
headerActions: h,
|
|
2795
2829
|
bodyClassName: N = "flex-1 overflow-y-auto px-6 py-5",
|
|
2796
|
-
width:
|
|
2797
|
-
children:
|
|
2830
|
+
width: S = 440,
|
|
2831
|
+
children: b
|
|
2798
2832
|
}) {
|
|
2799
|
-
const [m,
|
|
2800
|
-
return
|
|
2801
|
-
|
|
2802
|
-
}, []),
|
|
2833
|
+
const [m, v] = D(!1);
|
|
2834
|
+
return H(() => {
|
|
2835
|
+
v(!0);
|
|
2836
|
+
}, []), H(() => (document.body.style.overflow = e ? "hidden" : "", () => {
|
|
2803
2837
|
document.body.style.overflow = "";
|
|
2804
|
-
}), [e]),
|
|
2838
|
+
}), [e]), H(() => {
|
|
2805
2839
|
if (!e) return;
|
|
2806
2840
|
const c = (y) => {
|
|
2807
2841
|
y.key === "Escape" && r();
|
|
@@ -2826,7 +2860,7 @@ function Vn({
|
|
|
2826
2860
|
{
|
|
2827
2861
|
className: `absolute inset-y-0 right-0 flex flex-col shadow-2xl transition-transform duration-300 ${e ? "translate-x-0" : "translate-x-full"}`,
|
|
2828
2862
|
style: {
|
|
2829
|
-
width: `min(100vw, ${
|
|
2863
|
+
width: `min(100vw, ${S}px)`,
|
|
2830
2864
|
background: "var(--bg-card)",
|
|
2831
2865
|
borderLeft: "1px solid var(--border)"
|
|
2832
2866
|
},
|
|
@@ -2838,7 +2872,7 @@ function Vn({
|
|
|
2838
2872
|
style: { borderBottom: "1px solid var(--border)" },
|
|
2839
2873
|
children: [
|
|
2840
2874
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
2841
|
-
/* @__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" }) }),
|
|
2842
2876
|
s && /* @__PURE__ */ t("div", { className: "flex-shrink-0", children: s }),
|
|
2843
2877
|
/* @__PURE__ */ i("div", { className: "min-w-0", children: [
|
|
2844
2878
|
/* @__PURE__ */ t(
|
|
@@ -2877,7 +2911,7 @@ function Vn({
|
|
|
2877
2911
|
{
|
|
2878
2912
|
variant: "primary",
|
|
2879
2913
|
size: "sm",
|
|
2880
|
-
icon: /* @__PURE__ */ t(
|
|
2914
|
+
icon: /* @__PURE__ */ t(Cr, { className: "w-4 h-4" }),
|
|
2881
2915
|
onClick: f,
|
|
2882
2916
|
loading: p,
|
|
2883
2917
|
disabled: d,
|
|
@@ -2889,7 +2923,7 @@ function Vn({
|
|
|
2889
2923
|
]
|
|
2890
2924
|
}
|
|
2891
2925
|
),
|
|
2892
|
-
/* @__PURE__ */ t("div", { "data-drawer-scroll": "true", className: N, children:
|
|
2926
|
+
/* @__PURE__ */ t("div", { "data-drawer-scroll": "true", className: N, children: b })
|
|
2893
2927
|
]
|
|
2894
2928
|
}
|
|
2895
2929
|
)
|
|
@@ -2899,23 +2933,23 @@ function Vn({
|
|
|
2899
2933
|
document.body
|
|
2900
2934
|
) : null;
|
|
2901
2935
|
}
|
|
2902
|
-
var
|
|
2936
|
+
var Ut = {
|
|
2903
2937
|
color: void 0,
|
|
2904
2938
|
size: void 0,
|
|
2905
2939
|
className: void 0,
|
|
2906
2940
|
style: void 0,
|
|
2907
2941
|
attr: void 0
|
|
2908
|
-
},
|
|
2909
|
-
function
|
|
2942
|
+
}, $t = ge.createContext && /* @__PURE__ */ ge.createContext(Ut), an = ["attr", "size", "title"];
|
|
2943
|
+
function on(e, r) {
|
|
2910
2944
|
if (e == null) return {};
|
|
2911
|
-
var n, a, s =
|
|
2945
|
+
var n, a, s = sn(e, r);
|
|
2912
2946
|
if (Object.getOwnPropertySymbols) {
|
|
2913
2947
|
var u = Object.getOwnPropertySymbols(e);
|
|
2914
2948
|
for (a = 0; a < u.length; a++) n = u[a], r.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (s[n] = e[n]);
|
|
2915
2949
|
}
|
|
2916
2950
|
return s;
|
|
2917
2951
|
}
|
|
2918
|
-
function
|
|
2952
|
+
function sn(e, r) {
|
|
2919
2953
|
if (e == null) return {};
|
|
2920
2954
|
var n = {};
|
|
2921
2955
|
for (var a in e) if ({}.hasOwnProperty.call(e, a)) {
|
|
@@ -2933,7 +2967,7 @@ function Ve() {
|
|
|
2933
2967
|
return e;
|
|
2934
2968
|
}, Ve.apply(null, arguments);
|
|
2935
2969
|
}
|
|
2936
|
-
function
|
|
2970
|
+
function Ot(e, r) {
|
|
2937
2971
|
var n = Object.keys(e);
|
|
2938
2972
|
if (Object.getOwnPropertySymbols) {
|
|
2939
2973
|
var a = Object.getOwnPropertySymbols(e);
|
|
@@ -2943,25 +2977,25 @@ function $t(e, r) {
|
|
|
2943
2977
|
}
|
|
2944
2978
|
return n;
|
|
2945
2979
|
}
|
|
2946
|
-
function
|
|
2980
|
+
function Ze(e) {
|
|
2947
2981
|
for (var r = 1; r < arguments.length; r++) {
|
|
2948
2982
|
var n = arguments[r] != null ? arguments[r] : {};
|
|
2949
|
-
r % 2 ?
|
|
2950
|
-
|
|
2951
|
-
}) : 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) {
|
|
2952
2986
|
Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(n, a));
|
|
2953
2987
|
});
|
|
2954
2988
|
}
|
|
2955
2989
|
return e;
|
|
2956
2990
|
}
|
|
2957
|
-
function
|
|
2958
|
-
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;
|
|
2959
2993
|
}
|
|
2960
|
-
function
|
|
2961
|
-
var r =
|
|
2994
|
+
function cn(e) {
|
|
2995
|
+
var r = dn(e, "string");
|
|
2962
2996
|
return typeof r == "symbol" ? r : r + "";
|
|
2963
2997
|
}
|
|
2964
|
-
function
|
|
2998
|
+
function dn(e, r) {
|
|
2965
2999
|
if (typeof e != "object" || !e) return e;
|
|
2966
3000
|
var n = e[Symbol.toPrimitive];
|
|
2967
3001
|
if (n !== void 0) {
|
|
@@ -2971,30 +3005,30 @@ function en(e, r) {
|
|
|
2971
3005
|
}
|
|
2972
3006
|
return (r === "string" ? String : Number)(e);
|
|
2973
3007
|
}
|
|
2974
|
-
function
|
|
2975
|
-
return e && e.map((r, n) => /* @__PURE__ */ ge.createElement(r.tag,
|
|
3008
|
+
function Yt(e) {
|
|
3009
|
+
return e && e.map((r, n) => /* @__PURE__ */ ge.createElement(r.tag, Ze({
|
|
2976
3010
|
key: n
|
|
2977
|
-
}, r.attr),
|
|
3011
|
+
}, r.attr), Yt(r.child)));
|
|
2978
3012
|
}
|
|
2979
|
-
function
|
|
2980
|
-
return (r) => /* @__PURE__ */ ge.createElement(
|
|
2981
|
-
attr:
|
|
2982
|
-
}, r),
|
|
3013
|
+
function qt(e) {
|
|
3014
|
+
return (r) => /* @__PURE__ */ ge.createElement(un, Ve({
|
|
3015
|
+
attr: Ze({}, e.attr)
|
|
3016
|
+
}, r), Yt(e.child));
|
|
2983
3017
|
}
|
|
2984
|
-
function
|
|
3018
|
+
function un(e) {
|
|
2985
3019
|
var r = (n) => {
|
|
2986
3020
|
var {
|
|
2987
3021
|
attr: a,
|
|
2988
3022
|
size: s,
|
|
2989
3023
|
title: u
|
|
2990
|
-
} = e, f =
|
|
3024
|
+
} = e, f = on(e, an), p = s || n.size || "1em", d;
|
|
2991
3025
|
return n.className && (d = n.className), e.className && (d = (d ? d + " " : "") + e.className), /* @__PURE__ */ ge.createElement("svg", Ve({
|
|
2992
3026
|
stroke: "currentColor",
|
|
2993
3027
|
fill: "currentColor",
|
|
2994
3028
|
strokeWidth: "0"
|
|
2995
3029
|
}, n.attr, a, f, {
|
|
2996
3030
|
className: d,
|
|
2997
|
-
style:
|
|
3031
|
+
style: Ze(Ze({
|
|
2998
3032
|
color: e.color || n.color
|
|
2999
3033
|
}, n.style), e.style),
|
|
3000
3034
|
height: p,
|
|
@@ -3002,13 +3036,13 @@ function tn(e) {
|
|
|
3002
3036
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3003
3037
|
}), u && /* @__PURE__ */ ge.createElement("title", null, u), e.children);
|
|
3004
3038
|
};
|
|
3005
|
-
return
|
|
3039
|
+
return $t !== void 0 ? /* @__PURE__ */ ge.createElement($t.Consumer, null, (n) => r(n)) : r(Ut);
|
|
3006
3040
|
}
|
|
3007
|
-
function
|
|
3008
|
-
return
|
|
3041
|
+
function mn(e) {
|
|
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);
|
|
3009
3043
|
}
|
|
3010
|
-
function
|
|
3011
|
-
return
|
|
3044
|
+
function fn(e) {
|
|
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);
|
|
3012
3046
|
}
|
|
3013
3047
|
function at({
|
|
3014
3048
|
className: e = "",
|
|
@@ -3022,7 +3056,7 @@ function at({
|
|
|
3022
3056
|
}
|
|
3023
3057
|
);
|
|
3024
3058
|
}
|
|
3025
|
-
function
|
|
3059
|
+
function ia({
|
|
3026
3060
|
label: e,
|
|
3027
3061
|
containerClassName: r = "",
|
|
3028
3062
|
helperText: n,
|
|
@@ -3034,24 +3068,24 @@ function Jn({
|
|
|
3034
3068
|
required: d,
|
|
3035
3069
|
...h
|
|
3036
3070
|
}) {
|
|
3037
|
-
const [N,
|
|
3038
|
-
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,
|
|
3039
3073
|
color: N ? "var(--primary)" : "var(--text-muted)",
|
|
3040
|
-
fontSize:
|
|
3041
|
-
fontWeight:
|
|
3042
|
-
textTransform:
|
|
3043
|
-
},
|
|
3044
|
-
var
|
|
3045
|
-
|
|
3046
|
-
},
|
|
3047
|
-
var
|
|
3048
|
-
|
|
3049
|
-
},
|
|
3074
|
+
fontSize: T ? 11 : 14,
|
|
3075
|
+
fontWeight: T ? 600 : 400,
|
|
3076
|
+
textTransform: T ? "uppercase" : "none"
|
|
3077
|
+
}, P = (B) => {
|
|
3078
|
+
var $;
|
|
3079
|
+
S(!0), ($ = h.onFocus) == null || $.call(h, B);
|
|
3080
|
+
}, C = (B) => {
|
|
3081
|
+
var $;
|
|
3082
|
+
S(!1), ($ = h.onBlur) == null || $.call(h, B);
|
|
3083
|
+
}, M = v ? /* @__PURE__ */ i(
|
|
3050
3084
|
"button",
|
|
3051
3085
|
{
|
|
3052
3086
|
type: "button",
|
|
3053
|
-
"aria-label":
|
|
3054
|
-
"aria-pressed":
|
|
3087
|
+
"aria-label": b ? "Ocultar contraseña" : "Mostrar contraseña",
|
|
3088
|
+
"aria-pressed": b,
|
|
3055
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",
|
|
3056
3090
|
tabIndex: -1,
|
|
3057
3091
|
onClick: () => m((B) => !B),
|
|
@@ -3060,16 +3094,16 @@ function Jn({
|
|
|
3060
3094
|
"span",
|
|
3061
3095
|
{
|
|
3062
3096
|
"aria-hidden": "true",
|
|
3063
|
-
className: `absolute inset-0 flex items-center justify-center transition-[opacity,transform] duration-200 ease-out ${
|
|
3064
|
-
children: /* @__PURE__ */ t(
|
|
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"}`,
|
|
3098
|
+
children: /* @__PURE__ */ t(mn, { className: "h-[18px] w-[18px]" })
|
|
3065
3099
|
}
|
|
3066
3100
|
),
|
|
3067
3101
|
/* @__PURE__ */ t(
|
|
3068
3102
|
"span",
|
|
3069
3103
|
{
|
|
3070
3104
|
"aria-hidden": "true",
|
|
3071
|
-
className: `absolute inset-0 flex items-center justify-center transition-[opacity,transform] duration-200 ease-out ${
|
|
3072
|
-
children: /* @__PURE__ */ t(
|
|
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"}`,
|
|
3106
|
+
children: /* @__PURE__ */ t(fn, { className: "h-[18px] w-[18px]" })
|
|
3073
3107
|
}
|
|
3074
3108
|
)
|
|
3075
3109
|
]
|
|
@@ -3086,16 +3120,16 @@ function Jn({
|
|
|
3086
3120
|
placeholder: " ",
|
|
3087
3121
|
"aria-invalid": !!a || h["aria-invalid"],
|
|
3088
3122
|
"data-has-value": y ? "true" : void 0,
|
|
3089
|
-
className: `h-12 w-full pt-5 ${
|
|
3090
|
-
onFocus:
|
|
3091
|
-
onBlur:
|
|
3123
|
+
className: `h-12 w-full pt-5 ${v ? "pr-10" : ""} ${p}`,
|
|
3124
|
+
onFocus: P,
|
|
3125
|
+
onBlur: C
|
|
3092
3126
|
}
|
|
3093
3127
|
),
|
|
3094
3128
|
/* @__PURE__ */ i(
|
|
3095
3129
|
"span",
|
|
3096
3130
|
{
|
|
3097
3131
|
className: "pointer-events-none absolute left-3 transition-all duration-150",
|
|
3098
|
-
style:
|
|
3132
|
+
style: j,
|
|
3099
3133
|
children: [
|
|
3100
3134
|
e,
|
|
3101
3135
|
d && /* @__PURE__ */ t("span", { className: "ml-1 text-[var(--danger)]", children: "*" })
|
|
@@ -3106,11 +3140,11 @@ function Jn({
|
|
|
3106
3140
|
"span",
|
|
3107
3141
|
{
|
|
3108
3142
|
className: "absolute right-2 transition-all duration-150",
|
|
3109
|
-
style: { top:
|
|
3143
|
+
style: { top: T ? 8 : 15 },
|
|
3110
3144
|
children: s
|
|
3111
3145
|
}
|
|
3112
3146
|
),
|
|
3113
|
-
|
|
3147
|
+
M
|
|
3114
3148
|
] }),
|
|
3115
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
|
|
3116
3150
|
] }) : /* @__PURE__ */ i("label", { className: `flex flex-col gap-2 ${r}`, children: [
|
|
@@ -3119,7 +3153,7 @@ function Jn({
|
|
|
3119
3153
|
d && /* @__PURE__ */ t("span", { className: "text-[var(--danger)]", children: "*" }),
|
|
3120
3154
|
s && /* @__PURE__ */ t("span", { className: "ml-auto normal-case", children: s })
|
|
3121
3155
|
] }),
|
|
3122
|
-
|
|
3156
|
+
v ? /* @__PURE__ */ i("span", { className: "relative block", children: [
|
|
3123
3157
|
/* @__PURE__ */ t(
|
|
3124
3158
|
at,
|
|
3125
3159
|
{
|
|
@@ -3128,11 +3162,11 @@ function Jn({
|
|
|
3128
3162
|
required: d,
|
|
3129
3163
|
"aria-invalid": !!a || h["aria-invalid"],
|
|
3130
3164
|
className: `w-full pr-10 ${p}`,
|
|
3131
|
-
onFocus:
|
|
3132
|
-
onBlur:
|
|
3165
|
+
onFocus: P,
|
|
3166
|
+
onBlur: C
|
|
3133
3167
|
}
|
|
3134
3168
|
),
|
|
3135
|
-
|
|
3169
|
+
M
|
|
3136
3170
|
] }) : /* @__PURE__ */ t(
|
|
3137
3171
|
at,
|
|
3138
3172
|
{
|
|
@@ -3145,10 +3179,10 @@ function Jn({
|
|
|
3145
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
|
|
3146
3180
|
] });
|
|
3147
3181
|
}
|
|
3148
|
-
function
|
|
3182
|
+
function Ee(...e) {
|
|
3149
3183
|
return e.filter(Boolean).join(" ");
|
|
3150
3184
|
}
|
|
3151
|
-
function
|
|
3185
|
+
function oa({
|
|
3152
3186
|
steps: e,
|
|
3153
3187
|
activeStepId: r,
|
|
3154
3188
|
initialStepId: n,
|
|
@@ -3160,59 +3194,59 @@ function Zn({
|
|
|
3160
3194
|
allowBackNavigation: d = !0,
|
|
3161
3195
|
showFooter: h = !0,
|
|
3162
3196
|
previousLabel: N = "Anterior",
|
|
3163
|
-
nextLabel:
|
|
3164
|
-
blockedNextLabel:
|
|
3197
|
+
nextLabel: S = "Siguiente",
|
|
3198
|
+
blockedNextLabel: b = "Completa este paso",
|
|
3165
3199
|
className: m = "",
|
|
3166
|
-
headerClassName:
|
|
3200
|
+
headerClassName: v = "",
|
|
3167
3201
|
contentClassName: c = "",
|
|
3168
3202
|
footerClassName: y = ""
|
|
3169
3203
|
}) {
|
|
3170
3204
|
var de;
|
|
3171
|
-
const
|
|
3172
|
-
n ??
|
|
3173
|
-
), [
|
|
3205
|
+
const T = ((de = e[0]) == null ? void 0 : de.id) ?? "", [j, P] = D(
|
|
3206
|
+
n ?? T
|
|
3207
|
+
), [C, M] = D(
|
|
3174
3208
|
s
|
|
3175
|
-
), B = r ??
|
|
3176
|
-
() => new Set(
|
|
3177
|
-
[
|
|
3209
|
+
), B = r ?? j, $ = a ?? C, _ = ze(
|
|
3210
|
+
() => new Set($),
|
|
3211
|
+
[$]
|
|
3178
3212
|
), E = Math.max(
|
|
3179
3213
|
0,
|
|
3180
|
-
e.findIndex((
|
|
3181
|
-
),
|
|
3182
|
-
a ||
|
|
3183
|
-
},
|
|
3184
|
-
const
|
|
3185
|
-
|
|
3186
|
-
}, F = (
|
|
3187
|
-
const
|
|
3188
|
-
return !
|
|
3189
|
-
}, o = (
|
|
3190
|
-
const
|
|
3191
|
-
return
|
|
3192
|
-
}, w = (
|
|
3193
|
-
const
|
|
3194
|
-
if (
|
|
3195
|
-
if (!Q(
|
|
3196
|
-
const q = V(
|
|
3197
|
-
return q && (p == null || p(e[
|
|
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);
|
|
3217
|
+
}, W = (k) => {
|
|
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);
|
|
3223
|
+
}, o = (k) => {
|
|
3224
|
+
const R = e.findIndex((q) => q.id === k);
|
|
3225
|
+
return R >= 0 && Q(R);
|
|
3226
|
+
}, w = (k) => {
|
|
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;
|
|
3198
3232
|
}
|
|
3199
|
-
return
|
|
3200
|
-
}, U = (
|
|
3201
|
-
!
|
|
3202
|
-
}, Y = (
|
|
3203
|
-
if (!
|
|
3204
|
-
const
|
|
3205
|
-
const oe = e.findIndex((
|
|
3206
|
-
return oe >= 0 && oe <
|
|
3233
|
+
return W(k), !0;
|
|
3234
|
+
}, U = (k = L == null ? void 0 : L.id) => {
|
|
3235
|
+
!k || _.has(k) || J([...$, k]);
|
|
3236
|
+
}, Y = (k = L == null ? void 0 : L.id) => {
|
|
3237
|
+
if (!k) return;
|
|
3238
|
+
const R = e.findIndex((ae) => ae.id === k), q = $.filter((ae) => {
|
|
3239
|
+
const oe = e.findIndex((z) => z.id === ae);
|
|
3240
|
+
return oe >= 0 && oe < R;
|
|
3207
3241
|
});
|
|
3208
|
-
|
|
3242
|
+
J(q), R >= 0 && E > R && W(k);
|
|
3209
3243
|
}, X = () => E <= 0 ? !1 : w(e[E - 1].id), te = () => {
|
|
3210
|
-
const
|
|
3211
|
-
return
|
|
3244
|
+
const k = e[E + 1];
|
|
3245
|
+
return k ? w(k.id) : !1;
|
|
3212
3246
|
}, ce = {
|
|
3213
|
-
activeStep:
|
|
3247
|
+
activeStep: L,
|
|
3214
3248
|
activeIndex: E,
|
|
3215
|
-
completedStepIds:
|
|
3249
|
+
completedStepIds: $,
|
|
3216
3250
|
isCompleted: F,
|
|
3217
3251
|
isUnlocked: o,
|
|
3218
3252
|
completeStep: U,
|
|
@@ -3221,12 +3255,12 @@ function Zn({
|
|
|
3221
3255
|
goNext: te,
|
|
3222
3256
|
goPrevious: X
|
|
3223
3257
|
};
|
|
3224
|
-
if (!
|
|
3225
|
-
const ne = e[E + 1], Ne = E > 0, pe = ne ? o(ne.id) : !1, he = typeof
|
|
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;
|
|
3226
3260
|
return /* @__PURE__ */ i(
|
|
3227
3261
|
"section",
|
|
3228
3262
|
{
|
|
3229
|
-
className:
|
|
3263
|
+
className: Ee(
|
|
3230
3264
|
"overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-card)]",
|
|
3231
3265
|
m
|
|
3232
3266
|
),
|
|
@@ -3234,16 +3268,16 @@ function Zn({
|
|
|
3234
3268
|
/* @__PURE__ */ i(
|
|
3235
3269
|
"div",
|
|
3236
3270
|
{
|
|
3237
|
-
className:
|
|
3271
|
+
className: Ee(
|
|
3238
3272
|
"border-b border-[var(--border)] bg-[var(--bg-input)]",
|
|
3239
|
-
|
|
3273
|
+
v
|
|
3240
3274
|
),
|
|
3241
3275
|
children: [
|
|
3242
3276
|
/* @__PURE__ */ t("div", { className: "relative h-1 overflow-hidden bg-[var(--border)]/55", children: /* @__PURE__ */ t(
|
|
3243
3277
|
"div",
|
|
3244
3278
|
{
|
|
3245
3279
|
className: "h-full rounded-r-full bg-[var(--primary)] transition-[width] duration-500 ease-out",
|
|
3246
|
-
style: { width: `${
|
|
3280
|
+
style: { width: `${I}%` }
|
|
3247
3281
|
}
|
|
3248
3282
|
) }),
|
|
3249
3283
|
/* @__PURE__ */ t(
|
|
@@ -3253,8 +3287,8 @@ function Zn({
|
|
|
3253
3287
|
style: {
|
|
3254
3288
|
gridTemplateColumns: `repeat(${e.length}, minmax(0, 1fr))`
|
|
3255
3289
|
},
|
|
3256
|
-
children: e.map((
|
|
3257
|
-
const q =
|
|
3290
|
+
children: e.map((k, R) => {
|
|
3291
|
+
const q = k.id === L.id, ae = F(k.id), oe = Q(R), z = V(R);
|
|
3258
3292
|
return /* @__PURE__ */ i(
|
|
3259
3293
|
"button",
|
|
3260
3294
|
{
|
|
@@ -3262,9 +3296,9 @@ function Zn({
|
|
|
3262
3296
|
disabled: !oe,
|
|
3263
3297
|
"aria-current": q ? "step" : void 0,
|
|
3264
3298
|
"aria-disabled": !oe,
|
|
3265
|
-
title: !oe &&
|
|
3266
|
-
onClick: () => w(
|
|
3267
|
-
className:
|
|
3299
|
+
title: !oe && z ? `Completa ${z.title}` : k.title,
|
|
3300
|
+
onClick: () => w(k.id),
|
|
3301
|
+
className: Ee(
|
|
3268
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",
|
|
3269
3303
|
q && "border-[var(--primary)] bg-[var(--bg-card)] shadow-sm",
|
|
3270
3304
|
ae && !q && "border-[var(--primary)]/35 bg-[var(--bg-card)]",
|
|
@@ -3275,7 +3309,7 @@ function Zn({
|
|
|
3275
3309
|
/* @__PURE__ */ t(
|
|
3276
3310
|
"span",
|
|
3277
3311
|
{
|
|
3278
|
-
className:
|
|
3312
|
+
className: Ee(
|
|
3279
3313
|
"absolute inset-x-0 top-0 h-0.5 origin-left scale-x-0 bg-[var(--primary)] transition-transform duration-300",
|
|
3280
3314
|
q && "scale-x-100"
|
|
3281
3315
|
)
|
|
@@ -3285,38 +3319,38 @@ function Zn({
|
|
|
3285
3319
|
/* @__PURE__ */ t(
|
|
3286
3320
|
"span",
|
|
3287
3321
|
{
|
|
3288
|
-
className:
|
|
3322
|
+
className: Ee(
|
|
3289
3323
|
"grid h-7 w-7 shrink-0 place-items-center rounded-full border text-xs font-bold transition-all duration-200",
|
|
3290
3324
|
q && "border-[var(--primary)] bg-[var(--primary)] text-[var(--primary-fg)]",
|
|
3291
3325
|
ae && !q && "border-[var(--primary)] bg-[var(--primary)]/12 text-[var(--primary)]",
|
|
3292
3326
|
!ae && !q && oe && "border-[var(--border)] text-[var(--text-muted)]",
|
|
3293
3327
|
!oe && "border-[var(--border)] text-[var(--text-muted)]"
|
|
3294
3328
|
),
|
|
3295
|
-
children: ae ? /* @__PURE__ */ t(
|
|
3329
|
+
children: ae ? /* @__PURE__ */ t(Pt, { className: "h-4 w-4" }) : oe ? R + 1 : /* @__PURE__ */ t(cr, { className: "h-3.5 w-3.5" })
|
|
3296
3330
|
}
|
|
3297
3331
|
),
|
|
3298
3332
|
/* @__PURE__ */ i("span", { className: "min-w-0 flex-1", children: [
|
|
3299
3333
|
/* @__PURE__ */ i(
|
|
3300
3334
|
"span",
|
|
3301
3335
|
{
|
|
3302
|
-
className:
|
|
3336
|
+
className: Ee(
|
|
3303
3337
|
"block truncate text-xs font-semibold transition-colors duration-200",
|
|
3304
3338
|
q ? "text-[var(--text-main)]" : "text-[var(--text-secondary)]"
|
|
3305
3339
|
),
|
|
3306
3340
|
children: [
|
|
3307
|
-
|
|
3341
|
+
R + 1,
|
|
3308
3342
|
". ",
|
|
3309
|
-
|
|
3343
|
+
k.title
|
|
3310
3344
|
]
|
|
3311
3345
|
}
|
|
3312
3346
|
),
|
|
3313
|
-
|
|
3347
|
+
k.description && /* @__PURE__ */ t("span", { className: "mt-1 block truncate text-[11px] text-[var(--text-muted)]", children: k.description })
|
|
3314
3348
|
] }),
|
|
3315
|
-
|
|
3349
|
+
k.badge && /* @__PURE__ */ t("span", { className: "shrink-0", children: k.badge })
|
|
3316
3350
|
] })
|
|
3317
3351
|
]
|
|
3318
3352
|
},
|
|
3319
|
-
|
|
3353
|
+
k.id
|
|
3320
3354
|
);
|
|
3321
3355
|
})
|
|
3322
3356
|
}
|
|
@@ -3327,18 +3361,18 @@ function Zn({
|
|
|
3327
3361
|
/* @__PURE__ */ t(
|
|
3328
3362
|
"div",
|
|
3329
3363
|
{
|
|
3330
|
-
className:
|
|
3364
|
+
className: Ee(
|
|
3331
3365
|
"min-h-72 animate-[stepWizardIn_220ms_ease-out] p-5",
|
|
3332
3366
|
c
|
|
3333
3367
|
),
|
|
3334
3368
|
children: he
|
|
3335
3369
|
},
|
|
3336
|
-
|
|
3370
|
+
L.id
|
|
3337
3371
|
),
|
|
3338
3372
|
h && /* @__PURE__ */ i(
|
|
3339
3373
|
"div",
|
|
3340
3374
|
{
|
|
3341
|
-
className:
|
|
3375
|
+
className: Ee(
|
|
3342
3376
|
"flex flex-wrap items-center justify-between gap-3 border-t border-[var(--border)] bg-[var(--bg-input)] px-4 py-3",
|
|
3343
3377
|
y
|
|
3344
3378
|
),
|
|
@@ -3364,7 +3398,7 @@ function Zn({
|
|
|
3364
3398
|
] }),
|
|
3365
3399
|
/* @__PURE__ */ t("span", { className: "h-1 w-1 rounded-full bg-[var(--border)]" }),
|
|
3366
3400
|
/* @__PURE__ */ i("span", { children: [
|
|
3367
|
-
|
|
3401
|
+
$.length,
|
|
3368
3402
|
" completados"
|
|
3369
3403
|
] })
|
|
3370
3404
|
] }),
|
|
@@ -3376,7 +3410,7 @@ function Zn({
|
|
|
3376
3410
|
icon: /* @__PURE__ */ t(Te, {}),
|
|
3377
3411
|
disabled: !ne || !pe,
|
|
3378
3412
|
onClick: te,
|
|
3379
|
-
children: ne && !pe ?
|
|
3413
|
+
children: ne && !pe ? b : S
|
|
3380
3414
|
}
|
|
3381
3415
|
)
|
|
3382
3416
|
]
|
|
@@ -3386,7 +3420,7 @@ function Zn({
|
|
|
3386
3420
|
}
|
|
3387
3421
|
);
|
|
3388
3422
|
}
|
|
3389
|
-
const
|
|
3423
|
+
const pn = {
|
|
3390
3424
|
xs: {
|
|
3391
3425
|
width: 28,
|
|
3392
3426
|
height: 16,
|
|
@@ -3400,7 +3434,7 @@ const an = {
|
|
|
3400
3434
|
padding: 2
|
|
3401
3435
|
}
|
|
3402
3436
|
};
|
|
3403
|
-
function
|
|
3437
|
+
function sa({
|
|
3404
3438
|
checked: e,
|
|
3405
3439
|
disabled: r,
|
|
3406
3440
|
onCheckedChange: n,
|
|
@@ -3408,7 +3442,7 @@ function Kn({
|
|
|
3408
3442
|
className: s = "",
|
|
3409
3443
|
...u
|
|
3410
3444
|
}) {
|
|
3411
|
-
const f =
|
|
3445
|
+
const f = pn[a], p = e ? f.width - f.thumb - f.padding * 2 : 0;
|
|
3412
3446
|
return /* @__PURE__ */ t(
|
|
3413
3447
|
"button",
|
|
3414
3448
|
{
|
|
@@ -3442,11 +3476,11 @@ function Kn({
|
|
|
3442
3476
|
}
|
|
3443
3477
|
);
|
|
3444
3478
|
}
|
|
3445
|
-
const
|
|
3479
|
+
const Mt = [
|
|
3446
3480
|
".sidebar-scroll",
|
|
3447
3481
|
"[data-overlay-scroll='true']"
|
|
3448
3482
|
].join(",");
|
|
3449
|
-
function
|
|
3483
|
+
function hn(e) {
|
|
3450
3484
|
if (!(e instanceof HTMLElement) || e.dataset.overlayScroll === "false" || e.closest("[data-overlayscrollbars]") || e.matches("textarea,input,select,[contenteditable='true']"))
|
|
3451
3485
|
return !1;
|
|
3452
3486
|
const r = window.getComputedStyle(e);
|
|
@@ -3456,33 +3490,33 @@ function on(e) {
|
|
|
3456
3490
|
r.overflowY
|
|
3457
3491
|
].join(" ").match(/auto|scroll/) || e.clientWidth === 0 && e.clientHeight === 0);
|
|
3458
3492
|
}
|
|
3459
|
-
function
|
|
3493
|
+
function Gt(e) {
|
|
3460
3494
|
return e.classList.contains("sidebar-scroll");
|
|
3461
3495
|
}
|
|
3462
|
-
function
|
|
3463
|
-
|
|
3496
|
+
function Bt(e) {
|
|
3497
|
+
Gt(e) && e.querySelectorAll(".os-scrollbar-horizontal").forEach((r) => {
|
|
3464
3498
|
r.style.display = "none", r.style.height = "0", r.style.pointerEvents = "none";
|
|
3465
3499
|
});
|
|
3466
3500
|
}
|
|
3467
|
-
function
|
|
3468
|
-
return
|
|
3501
|
+
function bn() {
|
|
3502
|
+
return H(() => {
|
|
3469
3503
|
const e = /* @__PURE__ */ new WeakMap();
|
|
3470
3504
|
let r = 0;
|
|
3471
3505
|
const n = () => {
|
|
3472
|
-
r = 0, document.querySelectorAll(
|
|
3473
|
-
if (!
|
|
3474
|
-
if (
|
|
3475
|
-
|
|
3506
|
+
r = 0, document.querySelectorAll(Mt).forEach((u) => {
|
|
3507
|
+
if (!hn(u)) return;
|
|
3508
|
+
if (yt(u)) {
|
|
3509
|
+
Bt(u);
|
|
3476
3510
|
return;
|
|
3477
3511
|
}
|
|
3478
|
-
const p =
|
|
3479
|
-
overflow:
|
|
3512
|
+
const p = yt(u, {
|
|
3513
|
+
overflow: Gt(u) ? { x: "hidden", y: "scroll" } : void 0,
|
|
3480
3514
|
scrollbars: {
|
|
3481
3515
|
autoHide: "leave",
|
|
3482
3516
|
autoHideDelay: 180
|
|
3483
3517
|
}
|
|
3484
3518
|
});
|
|
3485
|
-
|
|
3519
|
+
Bt(u), e.set(u, p);
|
|
3486
3520
|
});
|
|
3487
3521
|
}, a = () => {
|
|
3488
3522
|
r || (r = window.requestAnimationFrame(n));
|
|
@@ -3495,20 +3529,20 @@ function sn() {
|
|
|
3495
3529
|
attributes: !0,
|
|
3496
3530
|
attributeFilter: ["class", "data-overlay-scroll"]
|
|
3497
3531
|
}), window.addEventListener("resize", a), () => {
|
|
3498
|
-
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) => {
|
|
3499
3533
|
var f;
|
|
3500
3534
|
u instanceof HTMLElement && ((f = e.get(u)) == null || f.destroy());
|
|
3501
3535
|
});
|
|
3502
3536
|
};
|
|
3503
3537
|
}, []), null;
|
|
3504
3538
|
}
|
|
3505
|
-
const
|
|
3539
|
+
const xn = {
|
|
3506
3540
|
xs: { wh: "w-5 h-5", text: "text-[8px]" },
|
|
3507
3541
|
sm: { wh: "w-7 h-7", text: "text-[11px]" },
|
|
3508
3542
|
md: { wh: "w-9 h-9", text: "text-sm" },
|
|
3509
3543
|
lg: { wh: "w-12 h-12", text: "text-base" },
|
|
3510
3544
|
xl: { wh: "w-16 h-16", text: "text-xl" }
|
|
3511
|
-
},
|
|
3545
|
+
}, Tt = [
|
|
3512
3546
|
"bg-indigo-500",
|
|
3513
3547
|
"bg-blue-500",
|
|
3514
3548
|
"bg-emerald-500",
|
|
@@ -3517,30 +3551,30 @@ const ln = {
|
|
|
3517
3551
|
"bg-teal-500",
|
|
3518
3552
|
"bg-rose-500",
|
|
3519
3553
|
"bg-cyan-500"
|
|
3520
|
-
],
|
|
3554
|
+
], vn = {
|
|
3521
3555
|
xs: "text-xs",
|
|
3522
3556
|
sm: "text-sm",
|
|
3523
3557
|
md: "text-base",
|
|
3524
3558
|
lg: "text-lg"
|
|
3525
|
-
},
|
|
3559
|
+
}, gn = "bonsaif.bot", yn = "Bonsaif Bot", wn = {
|
|
3526
3560
|
xs: "p-0.5",
|
|
3527
3561
|
sm: "p-1",
|
|
3528
3562
|
md: "p-1.5",
|
|
3529
3563
|
lg: "p-2",
|
|
3530
3564
|
xl: "p-2.5"
|
|
3531
3565
|
};
|
|
3532
|
-
function
|
|
3566
|
+
function Lt(e) {
|
|
3533
3567
|
return typeof e == "string" ? e.trim() : "";
|
|
3534
3568
|
}
|
|
3535
|
-
function
|
|
3569
|
+
function Nn(e) {
|
|
3536
3570
|
let r = 0;
|
|
3537
3571
|
for (const n of e) r = r * 31 + n.charCodeAt(0) & 65535;
|
|
3538
|
-
return
|
|
3572
|
+
return Tt[r % Tt.length];
|
|
3539
3573
|
}
|
|
3540
|
-
function
|
|
3541
|
-
return e ===
|
|
3574
|
+
function kn(e, r) {
|
|
3575
|
+
return e === gn || r === yn;
|
|
3542
3576
|
}
|
|
3543
|
-
function
|
|
3577
|
+
function Sn({
|
|
3544
3578
|
userId: e,
|
|
3545
3579
|
username: r,
|
|
3546
3580
|
name: n,
|
|
@@ -3552,56 +3586,56 @@ function hn({
|
|
|
3552
3586
|
wrapperClassName: d = "",
|
|
3553
3587
|
labelClassName: h = "",
|
|
3554
3588
|
labelSize: N = "xs",
|
|
3555
|
-
avatarVersion:
|
|
3556
|
-
className:
|
|
3589
|
+
avatarVersion: S = 0,
|
|
3590
|
+
className: b = "",
|
|
3557
3591
|
style: m
|
|
3558
3592
|
}) {
|
|
3559
|
-
var
|
|
3560
|
-
const [
|
|
3561
|
-
|
|
3593
|
+
var W;
|
|
3594
|
+
const [v, c] = D(!1), y = typeof e == "string" && e.trim() && e !== "undefined" && e !== "null" ? e.trim() : "";
|
|
3595
|
+
H(() => {
|
|
3562
3596
|
c(!1);
|
|
3563
|
-
}, [y,
|
|
3564
|
-
const { wh:
|
|
3597
|
+
}, [y, S]);
|
|
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 = {
|
|
3565
3599
|
xs: 20,
|
|
3566
3600
|
sm: 28,
|
|
3567
3601
|
md: 36,
|
|
3568
3602
|
lg: 48,
|
|
3569
3603
|
xl: 64
|
|
3570
|
-
}[a],
|
|
3604
|
+
}[a], L = B ? /* @__PURE__ */ t(
|
|
3571
3605
|
"span",
|
|
3572
3606
|
{
|
|
3573
|
-
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}`,
|
|
3574
3608
|
style: m,
|
|
3575
3609
|
children: /* @__PURE__ */ t(
|
|
3576
3610
|
"img",
|
|
3577
3611
|
{
|
|
3578
|
-
src: `${
|
|
3579
|
-
alt:
|
|
3612
|
+
src: `${M}/favicon.svg`,
|
|
3613
|
+
alt: P,
|
|
3580
3614
|
width: E,
|
|
3581
3615
|
height: E,
|
|
3582
3616
|
className: "h-full w-full object-contain"
|
|
3583
3617
|
}
|
|
3584
3618
|
)
|
|
3585
3619
|
}
|
|
3586
|
-
) :
|
|
3620
|
+
) : $ && !v ? /* @__PURE__ */ t(
|
|
3587
3621
|
"img",
|
|
3588
3622
|
{
|
|
3589
|
-
src:
|
|
3590
|
-
alt:
|
|
3623
|
+
src: $,
|
|
3624
|
+
alt: P,
|
|
3591
3625
|
width: E,
|
|
3592
3626
|
height: E,
|
|
3593
|
-
className: `${
|
|
3627
|
+
className: `${T} rounded-full object-cover flex-shrink-0 ${b}`,
|
|
3594
3628
|
style: m,
|
|
3595
3629
|
onError: () => c(!0)
|
|
3596
3630
|
},
|
|
3597
|
-
`${y}-${
|
|
3631
|
+
`${y}-${S}`
|
|
3598
3632
|
) : /* @__PURE__ */ t(
|
|
3599
3633
|
"span",
|
|
3600
3634
|
{
|
|
3601
|
-
className: `${
|
|
3635
|
+
className: `${T} ${Nn(P)} ${j} rounded-full flex items-center justify-center font-black text-white uppercase flex-shrink-0 ${b}`,
|
|
3602
3636
|
style: m,
|
|
3603
|
-
title:
|
|
3604
|
-
children:
|
|
3637
|
+
title: P,
|
|
3638
|
+
children: C
|
|
3605
3639
|
}
|
|
3606
3640
|
);
|
|
3607
3641
|
if (s)
|
|
@@ -3610,39 +3644,39 @@ function hn({
|
|
|
3610
3644
|
{
|
|
3611
3645
|
className: `inline-flex min-w-0 items-center gap-2 ${d}`,
|
|
3612
3646
|
children: [
|
|
3613
|
-
|
|
3647
|
+
L,
|
|
3614
3648
|
/* @__PURE__ */ t(
|
|
3615
3649
|
"span",
|
|
3616
3650
|
{
|
|
3617
|
-
className: `min-w-0 truncate ${
|
|
3618
|
-
title:
|
|
3619
|
-
children:
|
|
3651
|
+
className: `min-w-0 truncate ${vn[N]} font-medium text-[var(--text-main)] ${h}`,
|
|
3652
|
+
title: P,
|
|
3653
|
+
children: P
|
|
3620
3654
|
}
|
|
3621
3655
|
)
|
|
3622
3656
|
]
|
|
3623
3657
|
}
|
|
3624
3658
|
);
|
|
3625
|
-
const
|
|
3626
|
-
return
|
|
3627
|
-
|
|
3659
|
+
const I = u ?? !0, J = f ?? P;
|
|
3660
|
+
return I && J ? /* @__PURE__ */ t(
|
|
3661
|
+
ut,
|
|
3628
3662
|
{
|
|
3629
3663
|
as: "span",
|
|
3630
|
-
content:
|
|
3664
|
+
content: J,
|
|
3631
3665
|
className: `inline-flex flex-shrink-0 ${d}`,
|
|
3632
|
-
children:
|
|
3666
|
+
children: L
|
|
3633
3667
|
}
|
|
3634
|
-
) :
|
|
3668
|
+
) : L;
|
|
3635
3669
|
}
|
|
3636
|
-
function
|
|
3670
|
+
function Cn({ href: e, className: r, children: n }) {
|
|
3637
3671
|
return /* @__PURE__ */ t("a", { href: e, className: r, children: n });
|
|
3638
3672
|
}
|
|
3639
|
-
function
|
|
3673
|
+
function En(e) {
|
|
3640
3674
|
return e.reduce((r, n) => {
|
|
3641
3675
|
const a = n.section ?? "Principal";
|
|
3642
3676
|
return r[a] = [...r[a] ?? [], n], r;
|
|
3643
3677
|
}, {});
|
|
3644
3678
|
}
|
|
3645
|
-
function
|
|
3679
|
+
function $n({
|
|
3646
3680
|
children: e,
|
|
3647
3681
|
navItems: r = [],
|
|
3648
3682
|
currentPath: n = typeof window > "u" ? "/" : window.location.pathname,
|
|
@@ -3652,19 +3686,19 @@ function vn({
|
|
|
3652
3686
|
header: f,
|
|
3653
3687
|
footer: p,
|
|
3654
3688
|
onLogout: d,
|
|
3655
|
-
LinkComponent: h =
|
|
3689
|
+
LinkComponent: h = Cn
|
|
3656
3690
|
}) {
|
|
3657
|
-
const [N,
|
|
3691
|
+
const [N, S] = D(!1), b = En(r);
|
|
3658
3692
|
return /* @__PURE__ */ i("div", { className: "min-h-screen bg-[var(--bg-main)] text-[var(--text-main)]", children: [
|
|
3659
|
-
/* @__PURE__ */ t(
|
|
3693
|
+
/* @__PURE__ */ t(bn, {}),
|
|
3660
3694
|
/* @__PURE__ */ t(
|
|
3661
3695
|
"button",
|
|
3662
3696
|
{
|
|
3663
3697
|
type: "button",
|
|
3664
3698
|
"aria-label": "Abrir navegación",
|
|
3665
3699
|
className: "fixed left-3 top-3 z-50 inline-flex h-9 w-9 items-center justify-center rounded-md border border-white/10 bg-black/70 text-white lg:hidden",
|
|
3666
|
-
onClick: () =>
|
|
3667
|
-
children: /* @__PURE__ */ t(
|
|
3700
|
+
onClick: () => S(!0),
|
|
3701
|
+
children: /* @__PURE__ */ t(dr, { className: "h-5 w-5" })
|
|
3668
3702
|
}
|
|
3669
3703
|
),
|
|
3670
3704
|
N && /* @__PURE__ */ t(
|
|
@@ -3673,7 +3707,7 @@ function vn({
|
|
|
3673
3707
|
type: "button",
|
|
3674
3708
|
"aria-label": "Cerrar navegación",
|
|
3675
3709
|
className: "fixed inset-0 z-40 bg-black/45 lg:hidden",
|
|
3676
|
-
onClick: () =>
|
|
3710
|
+
onClick: () => S(!1)
|
|
3677
3711
|
}
|
|
3678
3712
|
),
|
|
3679
3713
|
/* @__PURE__ */ i(
|
|
@@ -3690,8 +3724,8 @@ function vn({
|
|
|
3690
3724
|
type: "button",
|
|
3691
3725
|
"aria-label": "Cerrar navegación",
|
|
3692
3726
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-white/70 hover:bg-white/10 lg:hidden",
|
|
3693
|
-
onClick: () =>
|
|
3694
|
-
children: /* @__PURE__ */ t(
|
|
3727
|
+
onClick: () => S(!1),
|
|
3728
|
+
children: /* @__PURE__ */ t($e, { className: "h-5 w-5" })
|
|
3695
3729
|
}
|
|
3696
3730
|
)
|
|
3697
3731
|
] }),
|
|
@@ -3700,12 +3734,12 @@ function vn({
|
|
|
3700
3734
|
{
|
|
3701
3735
|
className: "sidebar-scroll min-h-0 flex-1 overflow-y-auto px-3 py-4",
|
|
3702
3736
|
"data-overlay-scroll": "true",
|
|
3703
|
-
children: Object.entries(
|
|
3737
|
+
children: Object.entries(b).map(([m, v]) => /* @__PURE__ */ i("div", { className: "mb-5", children: [
|
|
3704
3738
|
/* @__PURE__ */ i("div", { className: "mb-2 flex items-center gap-2 px-2 text-[11px] font-semibold uppercase tracking-wide text-white/35", children: [
|
|
3705
3739
|
/* @__PURE__ */ t(_e, { className: "h-3.5 w-3.5" }),
|
|
3706
3740
|
m
|
|
3707
3741
|
] }),
|
|
3708
|
-
/* @__PURE__ */ t("div", { className: "space-y-1", children:
|
|
3742
|
+
/* @__PURE__ */ t("div", { className: "space-y-1", children: v.map((c) => {
|
|
3709
3743
|
const y = n === c.href || n.startsWith(`${c.href}/`);
|
|
3710
3744
|
return /* @__PURE__ */ i(
|
|
3711
3745
|
h,
|
|
@@ -3726,7 +3760,7 @@ function vn({
|
|
|
3726
3760
|
/* @__PURE__ */ i("div", { className: "border-t border-white/10 p-3", children: [
|
|
3727
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: [
|
|
3728
3762
|
/* @__PURE__ */ t(
|
|
3729
|
-
|
|
3763
|
+
Sn,
|
|
3730
3764
|
{
|
|
3731
3765
|
name: a.initials ?? a.name ?? a.email ?? "Usuario",
|
|
3732
3766
|
size: "md"
|
|
@@ -3744,7 +3778,7 @@ function vn({
|
|
|
3744
3778
|
className: "w-full justify-start text-white hover:bg-white/10",
|
|
3745
3779
|
onClick: d,
|
|
3746
3780
|
children: [
|
|
3747
|
-
/* @__PURE__ */ t(
|
|
3781
|
+
/* @__PURE__ */ t(ur, { className: "h-4 w-4" }),
|
|
3748
3782
|
" Salir"
|
|
3749
3783
|
]
|
|
3750
3784
|
}
|
|
@@ -3760,7 +3794,7 @@ function vn({
|
|
|
3760
3794
|
] })
|
|
3761
3795
|
] });
|
|
3762
3796
|
}
|
|
3763
|
-
const
|
|
3797
|
+
const On = {
|
|
3764
3798
|
dashboard: "Dashboard",
|
|
3765
3799
|
tickets: "Tickets",
|
|
3766
3800
|
teams: "Equipos",
|
|
@@ -3784,29 +3818,29 @@ const gn = {
|
|
|
3784
3818
|
"security-incidents": "Incidentes",
|
|
3785
3819
|
"guard-schedule": "Guardias"
|
|
3786
3820
|
}, it = {
|
|
3787
|
-
dashboard: /* @__PURE__ */ t(
|
|
3788
|
-
tickets: /* @__PURE__ */ t(
|
|
3789
|
-
teams: /* @__PURE__ */ t(
|
|
3790
|
-
projects: /* @__PURE__ */ t(
|
|
3791
|
-
clients: /* @__PURE__ */ t(
|
|
3792
|
-
surveys: /* @__PURE__ */ t(
|
|
3793
|
-
profile: /* @__PURE__ */ t(
|
|
3794
|
-
settings: /* @__PURE__ */ t(
|
|
3795
|
-
notifications: /* @__PURE__ */ t(
|
|
3796
|
-
changelog: /* @__PURE__ */ t(
|
|
3821
|
+
dashboard: /* @__PURE__ */ t(wr, { className: "h-5 w-5" }),
|
|
3822
|
+
tickets: /* @__PURE__ */ t(yr, { className: "h-5 w-5" }),
|
|
3823
|
+
teams: /* @__PURE__ */ t(gt, { className: "h-5 w-5" }),
|
|
3824
|
+
projects: /* @__PURE__ */ t(gr, { className: "h-5 w-5" }),
|
|
3825
|
+
clients: /* @__PURE__ */ t(vr, { className: "h-5 w-5" }),
|
|
3826
|
+
surveys: /* @__PURE__ */ t(xr, { className: "h-5 w-5" }),
|
|
3827
|
+
profile: /* @__PURE__ */ t(br, { className: "h-5 w-5" }),
|
|
3828
|
+
settings: /* @__PURE__ */ t(vt, { className: "h-5 w-5" }),
|
|
3829
|
+
notifications: /* @__PURE__ */ t(hr, { className: "h-5 w-5" }),
|
|
3830
|
+
changelog: /* @__PURE__ */ t(pr, { className: "h-5 w-5" }),
|
|
3797
3831
|
admin: /* @__PURE__ */ t(rt, { className: "h-5 w-5" }),
|
|
3798
|
-
users: /* @__PURE__ */ t(
|
|
3832
|
+
users: /* @__PURE__ */ t(gt, { className: "h-5 w-5" }),
|
|
3799
3833
|
roles: /* @__PURE__ */ t(rt, { className: "h-5 w-5" }),
|
|
3800
|
-
menus: /* @__PURE__ */ t(
|
|
3834
|
+
menus: /* @__PURE__ */ t(vt, { className: "h-5 w-5" }),
|
|
3801
3835
|
guards: /* @__PURE__ */ t(lt, { className: "h-5 w-5" }),
|
|
3802
3836
|
vacations: /* @__PURE__ */ t(lt, { className: "h-5 w-5" }),
|
|
3803
|
-
audit: /* @__PURE__ */ t(
|
|
3804
|
-
positions: /* @__PURE__ */ t(
|
|
3805
|
-
ranks: /* @__PURE__ */ t(
|
|
3806
|
-
"email-inbox": /* @__PURE__ */ t(
|
|
3837
|
+
audit: /* @__PURE__ */ t(xt, { className: "h-5 w-5" }),
|
|
3838
|
+
positions: /* @__PURE__ */ t(fr, { className: "h-5 w-5" }),
|
|
3839
|
+
ranks: /* @__PURE__ */ t(xt, { className: "h-5 w-5" }),
|
|
3840
|
+
"email-inbox": /* @__PURE__ */ t(mr, { className: "h-5 w-5" }),
|
|
3807
3841
|
"security-incidents": /* @__PURE__ */ t(rt, { className: "h-5 w-5" })
|
|
3808
3842
|
};
|
|
3809
|
-
function
|
|
3843
|
+
function Mn({
|
|
3810
3844
|
href: e,
|
|
3811
3845
|
className: r,
|
|
3812
3846
|
style: n,
|
|
@@ -3814,17 +3848,17 @@ function yn({
|
|
|
3814
3848
|
}) {
|
|
3815
3849
|
return /* @__PURE__ */ t("a", { href: e, className: r, style: n, children: a });
|
|
3816
3850
|
}
|
|
3817
|
-
function
|
|
3851
|
+
function Bn(e) {
|
|
3818
3852
|
return e.split("-").map((r) => r.charAt(0).toUpperCase() + r.slice(1)).join(" ");
|
|
3819
3853
|
}
|
|
3820
|
-
function
|
|
3854
|
+
function Tn(e) {
|
|
3821
3855
|
return /^\d+$/.test(e) || /^[a-f0-9]{8,}$/i.test(e);
|
|
3822
3856
|
}
|
|
3823
|
-
function
|
|
3857
|
+
function Ln(e) {
|
|
3824
3858
|
const r = e.split("/").filter(Boolean);
|
|
3825
3859
|
if (r.length === 0 || r.length === 1 && r[0] === "dashboard")
|
|
3826
3860
|
return [];
|
|
3827
|
-
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);
|
|
3828
3862
|
return [{ label: "Inicio", href: "/" }, { label: u }];
|
|
3829
3863
|
}
|
|
3830
3864
|
function ot(e) {
|
|
@@ -3832,14 +3866,14 @@ function ot(e) {
|
|
|
3832
3866
|
":scope > [data-overlayscrollbars-viewport]"
|
|
3833
3867
|
));
|
|
3834
3868
|
}
|
|
3835
|
-
function
|
|
3869
|
+
function Dn(e) {
|
|
3836
3870
|
const r = e.split("/").filter(Boolean), n = r[r.length - 1];
|
|
3837
3871
|
if (!n) return /* @__PURE__ */ t(Xe, { className: "h-5 w-5" });
|
|
3838
3872
|
if (it[n]) return it[n];
|
|
3839
3873
|
const a = r.length > 1 ? r[r.length - 2] : "";
|
|
3840
3874
|
return it[a] ?? /* @__PURE__ */ t(Xe, { className: "h-5 w-5" });
|
|
3841
3875
|
}
|
|
3842
|
-
function
|
|
3876
|
+
function la({
|
|
3843
3877
|
title: e,
|
|
3844
3878
|
subtitle: r,
|
|
3845
3879
|
action: n,
|
|
@@ -3851,42 +3885,42 @@ function Qn({
|
|
|
3851
3885
|
currentPath: d = typeof window > "u" ? "/" : window.location.pathname,
|
|
3852
3886
|
showBreadcrumbs: h = !0,
|
|
3853
3887
|
contained: N = !1,
|
|
3854
|
-
LinkComponent:
|
|
3888
|
+
LinkComponent: S = Mn
|
|
3855
3889
|
}) {
|
|
3856
|
-
const
|
|
3857
|
-
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(() => {
|
|
3858
3892
|
if (N) {
|
|
3859
|
-
|
|
3893
|
+
v(!1);
|
|
3860
3894
|
return;
|
|
3861
3895
|
}
|
|
3862
|
-
let
|
|
3863
|
-
const
|
|
3864
|
-
const
|
|
3896
|
+
let C = null, M = 0, B = 0;
|
|
3897
|
+
const $ = () => {
|
|
3898
|
+
const L = b.current, I = document.querySelector(
|
|
3865
3899
|
"[data-app-scroll='true']"
|
|
3866
3900
|
);
|
|
3867
|
-
return (
|
|
3901
|
+
return (L == null ? void 0 : L.closest(".os-viewport")) ?? (L == null ? void 0 : L.closest(
|
|
3868
3902
|
"[data-overlayscrollbars-viewport]"
|
|
3869
|
-
)) ?? ot(
|
|
3870
|
-
},
|
|
3871
|
-
const
|
|
3872
|
-
|
|
3903
|
+
)) ?? ot(I) ?? I ?? window;
|
|
3904
|
+
}, _ = () => {
|
|
3905
|
+
const L = C && C !== window ? C.scrollTop : window.scrollY;
|
|
3906
|
+
v((I) => I ? L > 24 : L > 72);
|
|
3873
3907
|
}, E = () => {
|
|
3874
|
-
|
|
3908
|
+
C == null || C.removeEventListener("scroll", _), C = $(), C.addEventListener("scroll", _, { passive: !0 }), _();
|
|
3875
3909
|
};
|
|
3876
|
-
return E(),
|
|
3877
|
-
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", _);
|
|
3878
3912
|
};
|
|
3879
|
-
}, [N]),
|
|
3913
|
+
}, [N]), H(() => {
|
|
3880
3914
|
if (N) {
|
|
3881
3915
|
y(null);
|
|
3882
3916
|
return;
|
|
3883
3917
|
}
|
|
3884
|
-
let
|
|
3885
|
-
const
|
|
3886
|
-
const
|
|
3918
|
+
let C = 0;
|
|
3919
|
+
const M = [], B = () => {
|
|
3920
|
+
const W = b.current, F = W == null ? void 0 : W.parentElement, V = document.querySelector(
|
|
3887
3921
|
"[data-app-scroll='true']"
|
|
3888
3922
|
), Q = ot(V) ?? V;
|
|
3889
|
-
if (!
|
|
3923
|
+
if (!W || !F || !Q) {
|
|
3890
3924
|
y(null);
|
|
3891
3925
|
return;
|
|
3892
3926
|
}
|
|
@@ -3897,25 +3931,25 @@ function Qn({
|
|
|
3897
3931
|
y(
|
|
3898
3932
|
(ce) => ce && ce.marginLeft === te.marginLeft && ce.width === te.width ? ce : te
|
|
3899
3933
|
);
|
|
3900
|
-
},
|
|
3901
|
-
window.cancelAnimationFrame(
|
|
3934
|
+
}, $ = () => {
|
|
3935
|
+
window.cancelAnimationFrame(C), C = window.requestAnimationFrame(B);
|
|
3902
3936
|
};
|
|
3903
|
-
|
|
3904
|
-
const
|
|
3937
|
+
$(), window.addEventListener("resize", $);
|
|
3938
|
+
const _ = new ResizeObserver($), E = b.current, L = E == null ? void 0 : E.parentElement, I = document.querySelector(
|
|
3905
3939
|
"[data-app-scroll='true']"
|
|
3906
|
-
),
|
|
3907
|
-
return [
|
|
3908
|
-
|
|
3909
|
-
}),
|
|
3910
|
-
window.cancelAnimationFrame(
|
|
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));
|
|
3911
3945
|
};
|
|
3912
3946
|
}, [N]), /* @__PURE__ */ t(
|
|
3913
3947
|
"div",
|
|
3914
3948
|
{
|
|
3915
|
-
ref:
|
|
3949
|
+
ref: b,
|
|
3916
3950
|
"data-page-header": "true",
|
|
3917
3951
|
"data-compact": m ? "true" : "false",
|
|
3918
|
-
className: `sticky top-0 z-30 overflow-visible py-0 transition-[background-color,box-shadow,border-color] duration-300 ease-out ${N ? "mb-0 flex-shrink-0" : "mb-
|
|
3952
|
+
className: `sticky top-0 z-30 overflow-visible py-0 transition-[background-color,box-shadow,border-color] duration-300 ease-out ${N ? "mb-0 flex-shrink-0" : "mb-4 sm:mb-0"} ${u}`,
|
|
3919
3953
|
style: {
|
|
3920
3954
|
...c ? { marginLeft: c.marginLeft, width: c.width } : null,
|
|
3921
3955
|
background: N ? "var(--bg-card)" : m ? "var(--bg-main)" : "color-mix(in srgb, var(--bg-main) 44%, transparent)",
|
|
@@ -3927,14 +3961,14 @@ function Qn({
|
|
|
3927
3961
|
children: /* @__PURE__ */ i(
|
|
3928
3962
|
"div",
|
|
3929
3963
|
{
|
|
3930
|
-
className: `flex flex-wrap items-center justify-between px-4 pt-0.5 transition-[gap,min-height,padding] duration-300 ease-out ${m ? "min-h-
|
|
3964
|
+
className: `flex flex-wrap items-center justify-between px-4 pt-0.5 transition-[gap,min-height,padding] duration-300 ease-out ${m ? "min-h-9 gap-2 sm:min-h-10 sm:gap-2.5" : "min-h-10 gap-2.5 sm:min-h-11 sm:gap-3"} ${f}`,
|
|
3931
3965
|
children: [
|
|
3932
3966
|
/* @__PURE__ */ i(
|
|
3933
3967
|
"div",
|
|
3934
3968
|
{
|
|
3935
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"}`,
|
|
3936
3970
|
children: [
|
|
3937
|
-
|
|
3971
|
+
P && /* @__PURE__ */ t(
|
|
3938
3972
|
"nav",
|
|
3939
3973
|
{
|
|
3940
3974
|
"aria-label": "Breadcrumb",
|
|
@@ -3942,28 +3976,28 @@ function Qn({
|
|
|
3942
3976
|
children: /* @__PURE__ */ t(
|
|
3943
3977
|
"ol",
|
|
3944
3978
|
{
|
|
3945
|
-
className: `flex flex-wrap items-center gap-1.5 leading-none transition-[font-size,line-height] duration-300 ease-out ${m ? "text-[10px]
|
|
3946
|
-
children:
|
|
3947
|
-
const B =
|
|
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]"}`,
|
|
3980
|
+
children: T.map((C, M) => {
|
|
3981
|
+
const B = M === T.length - 1;
|
|
3948
3982
|
return /* @__PURE__ */ i(
|
|
3949
3983
|
"li",
|
|
3950
3984
|
{
|
|
3951
3985
|
className: "flex min-w-0 items-center gap-1.5",
|
|
3952
3986
|
children: [
|
|
3953
|
-
|
|
3987
|
+
M > 0 && /* @__PURE__ */ t(
|
|
3954
3988
|
Te,
|
|
3955
3989
|
{
|
|
3956
3990
|
className: "h-3.5 w-3.5 transition-[color,transform] duration-300 ease-out",
|
|
3957
3991
|
style: { color: "var(--text-muted)" }
|
|
3958
3992
|
}
|
|
3959
3993
|
),
|
|
3960
|
-
|
|
3961
|
-
|
|
3994
|
+
C.href && !B ? /* @__PURE__ */ t(
|
|
3995
|
+
S,
|
|
3962
3996
|
{
|
|
3963
|
-
href:
|
|
3997
|
+
href: C.href,
|
|
3964
3998
|
className: "truncate transition-colors duration-300 hover:underline",
|
|
3965
3999
|
style: { color: "var(--text-muted)" },
|
|
3966
|
-
children:
|
|
4000
|
+
children: C.label
|
|
3967
4001
|
}
|
|
3968
4002
|
) : /* @__PURE__ */ t(
|
|
3969
4003
|
"span",
|
|
@@ -3973,12 +4007,12 @@ function Qn({
|
|
|
3973
4007
|
style: {
|
|
3974
4008
|
color: B ? "var(--text-main)" : "var(--text-muted)"
|
|
3975
4009
|
},
|
|
3976
|
-
children:
|
|
4010
|
+
children: C.label
|
|
3977
4011
|
}
|
|
3978
4012
|
)
|
|
3979
4013
|
]
|
|
3980
4014
|
},
|
|
3981
|
-
`${
|
|
4015
|
+
`${C.label}-${M}`
|
|
3982
4016
|
);
|
|
3983
4017
|
})
|
|
3984
4018
|
}
|
|
@@ -3993,11 +4027,11 @@ function Qn({
|
|
|
3993
4027
|
/* @__PURE__ */ t(
|
|
3994
4028
|
"span",
|
|
3995
4029
|
{
|
|
3996
|
-
className: `flex-shrink-0 transition-[color,transform,opacity] duration-300 ease-out ${m ? "scale-
|
|
4030
|
+
className: `flex-shrink-0 transition-[color,transform,opacity] duration-300 ease-out ${m ? "scale-75 opacity-80" : "scale-90 opacity-100"}`,
|
|
3997
4031
|
style: {
|
|
3998
|
-
color:
|
|
4032
|
+
color: P ? "var(--text-secondary)" : "var(--text-muted)"
|
|
3999
4033
|
},
|
|
4000
|
-
children:
|
|
4034
|
+
children: j
|
|
4001
4035
|
}
|
|
4002
4036
|
),
|
|
4003
4037
|
/* @__PURE__ */ i(
|
|
@@ -4009,7 +4043,7 @@ function Qn({
|
|
|
4009
4043
|
/* @__PURE__ */ t(
|
|
4010
4044
|
"h1",
|
|
4011
4045
|
{
|
|
4012
|
-
className: `truncate font-bold tracking-tight transition-[font-size,line-height,color] duration-300 ease-out ${m ? "text-
|
|
4046
|
+
className: `truncate font-bold tracking-tight transition-[font-size,line-height,color] duration-300 ease-out ${m ? "text-base sm:text-lg" : "text-lg sm:text-xl"}`,
|
|
4013
4047
|
style: { color: "var(--text-main)" },
|
|
4014
4048
|
children: e
|
|
4015
4049
|
}
|
|
@@ -4018,7 +4052,7 @@ function Qn({
|
|
|
4018
4052
|
"p",
|
|
4019
4053
|
{
|
|
4020
4054
|
"aria-hidden": m,
|
|
4021
|
-
className: `overflow-hidden text-
|
|
4055
|
+
className: `overflow-hidden text-xs transition-[max-height,opacity,transform,margin] duration-300 ease-out ${m ? "mt-0 max-h-0 -translate-y-1 opacity-0" : "mt-0.5 max-h-5 translate-y-0 opacity-100"}`,
|
|
4022
4056
|
style: { color: "var(--text-muted)" },
|
|
4023
4057
|
children: r
|
|
4024
4058
|
}
|
|
@@ -4043,8 +4077,14 @@ function Qn({
|
|
|
4043
4077
|
n && /* @__PURE__ */ t(
|
|
4044
4078
|
"div",
|
|
4045
4079
|
{
|
|
4046
|
-
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-
|
|
4047
|
-
children:
|
|
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"}`,
|
|
4081
|
+
children: /* @__PURE__ */ t(
|
|
4082
|
+
zt.Provider,
|
|
4083
|
+
{
|
|
4084
|
+
value: { compact: !0, iconOnly: !0, headerAction: !0 },
|
|
4085
|
+
children: n
|
|
4086
|
+
}
|
|
4087
|
+
)
|
|
4048
4088
|
}
|
|
4049
4089
|
)
|
|
4050
4090
|
]
|
|
@@ -4053,20 +4093,20 @@ function Qn({
|
|
|
4053
4093
|
}
|
|
4054
4094
|
);
|
|
4055
4095
|
}
|
|
4056
|
-
function
|
|
4096
|
+
function ca({
|
|
4057
4097
|
children: e,
|
|
4058
4098
|
currentPath: r = typeof window > "u" ? "/" : window.location.pathname,
|
|
4059
4099
|
publicRoutes: n = ["/", "/login", "/reset-password"],
|
|
4060
4100
|
...a
|
|
4061
4101
|
}) {
|
|
4062
|
-
return n.includes(r) ? /* @__PURE__ */ t(we, { children: e }) : /* @__PURE__ */ t(
|
|
4102
|
+
return n.includes(r) ? /* @__PURE__ */ t(we, { children: e }) : /* @__PURE__ */ t($n, { currentPath: r, ...a, children: e });
|
|
4063
4103
|
}
|
|
4064
|
-
function
|
|
4104
|
+
function Dt() {
|
|
4065
4105
|
if (typeof window > "u") return "system";
|
|
4066
4106
|
const e = localStorage.getItem("theme");
|
|
4067
4107
|
return e === "light" || e === "dark" ? e : e === "system" ? "system" : document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
4068
4108
|
}
|
|
4069
|
-
function
|
|
4109
|
+
function An(e, r, n) {
|
|
4070
4110
|
try {
|
|
4071
4111
|
const a = new URL(e), s = a.searchParams.get("callbackUrl");
|
|
4072
4112
|
if (s) {
|
|
@@ -4081,17 +4121,17 @@ function Cn(e, r, n) {
|
|
|
4081
4121
|
return e;
|
|
4082
4122
|
}
|
|
4083
4123
|
}
|
|
4084
|
-
function
|
|
4124
|
+
function da({
|
|
4085
4125
|
name: e,
|
|
4086
4126
|
src: r,
|
|
4087
4127
|
projectKey: n
|
|
4088
4128
|
}) {
|
|
4089
|
-
const [a, s] =
|
|
4090
|
-
() =>
|
|
4129
|
+
const [a, s] = D(
|
|
4130
|
+
() => Dt()
|
|
4091
4131
|
), u = re(null);
|
|
4092
|
-
|
|
4132
|
+
H(() => {
|
|
4093
4133
|
const d = new MutationObserver(
|
|
4094
|
-
() => s(
|
|
4134
|
+
() => s(Dt())
|
|
4095
4135
|
);
|
|
4096
4136
|
return d.observe(document.documentElement, {
|
|
4097
4137
|
attributes: !0,
|
|
@@ -4099,7 +4139,7 @@ function ta({
|
|
|
4099
4139
|
}), () => d.disconnect();
|
|
4100
4140
|
}, []);
|
|
4101
4141
|
const f = ze(
|
|
4102
|
-
() =>
|
|
4142
|
+
() => An(r, a, n),
|
|
4103
4143
|
[n, r, a]
|
|
4104
4144
|
), p = ze(() => {
|
|
4105
4145
|
try {
|
|
@@ -4108,13 +4148,13 @@ function ta({
|
|
|
4108
4148
|
return "";
|
|
4109
4149
|
}
|
|
4110
4150
|
}, [f]);
|
|
4111
|
-
return
|
|
4151
|
+
return H(() => {
|
|
4112
4152
|
if (!n) return;
|
|
4113
4153
|
const d = n;
|
|
4114
4154
|
function h(N) {
|
|
4115
|
-
var m,
|
|
4155
|
+
var m, v, c;
|
|
4116
4156
|
if (N.source !== ((m = u.current) == null ? void 0 : m.contentWindow) || p && N.origin !== p) return;
|
|
4117
|
-
if (((
|
|
4157
|
+
if (((v = N.data) == null ? void 0 : v.type) === "prime-microservice:overlay") {
|
|
4118
4158
|
window.dispatchEvent(
|
|
4119
4159
|
new CustomEvent("prime-auth:microservice-overlay", {
|
|
4120
4160
|
detail: { active: !!N.data.active }
|
|
@@ -4123,10 +4163,10 @@ function ta({
|
|
|
4123
4163
|
return;
|
|
4124
4164
|
}
|
|
4125
4165
|
if (((c = N.data) == null ? void 0 : c.type) !== "prime-microservice:navigation") return;
|
|
4126
|
-
const
|
|
4127
|
-
if (!
|
|
4128
|
-
const
|
|
4129
|
-
`${window.location.pathname}${window.location.search}${window.location.hash}` !==
|
|
4166
|
+
const S = N.data.path;
|
|
4167
|
+
if (!S || !S.startsWith("/") || S.startsWith("//")) return;
|
|
4168
|
+
const b = `/apps/${encodeURIComponent(d)}${S}`;
|
|
4169
|
+
`${window.location.pathname}${window.location.search}${window.location.hash}` !== b && (window.history.replaceState(window.history.state, "", b), window.dispatchEvent(
|
|
4130
4170
|
new CustomEvent("prime-auth:microservice-navigation")
|
|
4131
4171
|
));
|
|
4132
4172
|
}
|
|
@@ -4150,9 +4190,9 @@ function ta({
|
|
|
4150
4190
|
}
|
|
4151
4191
|
) });
|
|
4152
4192
|
}
|
|
4153
|
-
function
|
|
4154
|
-
const [e, r] =
|
|
4155
|
-
return
|
|
4193
|
+
function ua() {
|
|
4194
|
+
const [e, r] = D(""), [n, a] = D(!1), [s, u] = D({ width: 96, height: 96 });
|
|
4195
|
+
return H(() => {
|
|
4156
4196
|
let f = !1;
|
|
4157
4197
|
return fetch("/api/microservices/prime-suite/chat-url", { cache: "no-store" }).then((p) => p.ok ? p.json() : null).then((p) => {
|
|
4158
4198
|
!f && (p != null && p.src) && r(p.src);
|
|
@@ -4160,14 +4200,14 @@ function ra() {
|
|
|
4160
4200
|
}), () => {
|
|
4161
4201
|
f = !0;
|
|
4162
4202
|
};
|
|
4163
|
-
}, []),
|
|
4203
|
+
}, []), H(() => {
|
|
4164
4204
|
const f = (p) => {
|
|
4165
4205
|
var h;
|
|
4166
4206
|
if (((h = p.data) == null ? void 0 : h.type) !== "prime-suite-chat:state") return;
|
|
4167
4207
|
const d = !!p.data.active;
|
|
4168
4208
|
a(d), u({
|
|
4169
|
-
width:
|
|
4170
|
-
height:
|
|
4209
|
+
width: At(p.data.width, 96, 720),
|
|
4210
|
+
height: At(p.data.height, 96, 560)
|
|
4171
4211
|
});
|
|
4172
4212
|
};
|
|
4173
4213
|
return window.addEventListener("message", f), () => window.removeEventListener("message", f);
|
|
@@ -4188,11 +4228,11 @@ function ra() {
|
|
|
4188
4228
|
}
|
|
4189
4229
|
) : null;
|
|
4190
4230
|
}
|
|
4191
|
-
function
|
|
4231
|
+
function At(e, r, n) {
|
|
4192
4232
|
const a = typeof e == "number" && Number.isFinite(e) ? e : r;
|
|
4193
4233
|
return Math.max(r, Math.min(n, Math.ceil(a)));
|
|
4194
4234
|
}
|
|
4195
|
-
function
|
|
4235
|
+
function In(e) {
|
|
4196
4236
|
const r = document.documentElement, n = new MutationObserver(e);
|
|
4197
4237
|
n.observe(r, { attributes: !0, attributeFilter: ["class"] });
|
|
4198
4238
|
const a = window.matchMedia("(prefers-color-scheme: dark)");
|
|
@@ -4200,50 +4240,50 @@ function $n(e) {
|
|
|
4200
4240
|
n.disconnect(), a.removeEventListener("change", e);
|
|
4201
4241
|
};
|
|
4202
4242
|
}
|
|
4203
|
-
function
|
|
4243
|
+
function Pn() {
|
|
4204
4244
|
const e = localStorage.getItem("theme") || "system", r = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
4205
4245
|
return document.documentElement.classList.contains("dark") || e === "dark" || e === "system" && r ? "dark" : "light";
|
|
4206
4246
|
}
|
|
4207
|
-
function
|
|
4247
|
+
function zn() {
|
|
4208
4248
|
return "light";
|
|
4209
4249
|
}
|
|
4210
|
-
function
|
|
4211
|
-
const e =
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4250
|
+
function ma() {
|
|
4251
|
+
const e = nr(
|
|
4252
|
+
In,
|
|
4253
|
+
Pn,
|
|
4254
|
+
zn
|
|
4215
4255
|
);
|
|
4216
|
-
return /* @__PURE__ */ t(
|
|
4256
|
+
return /* @__PURE__ */ t(Er, { position: "bottom-center", theme: e, richColors: !0, closeButton: !0 });
|
|
4217
4257
|
}
|
|
4218
4258
|
export {
|
|
4219
|
-
|
|
4220
|
-
|
|
4259
|
+
$n as AuthShell,
|
|
4260
|
+
Vn as BonsaifButton,
|
|
4221
4261
|
xe as Button,
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
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,
|
|
4277
|
+
ut as MouseTooltip,
|
|
4278
|
+
la as PageHeader,
|
|
4279
|
+
Or as PageSearchInput,
|
|
4280
|
+
ca as PrimeAuthRouteShell,
|
|
4281
|
+
ma as PrimeAuthToaster,
|
|
4282
|
+
ua as PrimeSuiteChatFrame,
|
|
4283
|
+
Wt as SearchableSelect,
|
|
4284
|
+
oa as StepWizard,
|
|
4245
4285
|
at as TextInput,
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4286
|
+
sa as Toggle,
|
|
4287
|
+
Sn as UserAvatar,
|
|
4288
|
+
$r as cn
|
|
4249
4289
|
};
|