@versini/sassysaint 5.5.22 → 5.5.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/App.CpMFbCku.js +4133 -0
- package/dist/chunks/{HeaderToolbar.BGU_AqIy.js → HeaderToolbar.BlpFAHv2.js} +2379 -2482
- package/dist/chunks/{MarkdownWithExtra.AvaIS-YD.js → MarkdownWithExtra.8drtC5Zg.js} +2 -2
- package/dist/chunks/{MessageAssistant.CBCztfay.js → MessageAssistant.TBLReeCB.js} +24 -24
- package/dist/chunks/{index.DCj2DcOk.js → index.-EILV3b7.js} +37 -39
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
- package/dist/chunks/App.DFYxrY2K.js +0 -3472
|
@@ -0,0 +1,4133 @@
|
|
|
1
|
+
import { jsxs as I, jsx as d, Fragment as yt } from "react/jsx-runtime";
|
|
2
|
+
import { g as bt, ACTION_RESTORE as $r, ACTION_MESSAGE as xe, ROLE_ASSISTANT as we, ACTION_RESET as rr, ACTION_MODEL as ar, ACTION_STREAMING as nr, ACTION_SORT as Mr, ACTION_SEARCH as Dr, ACTION_RESET_PROMPT as or, ACTION_TOGGLE_PROMPT as sr, DEFAULT_AI_ENGINE as Se, P as ir, un as Me, ROLE_SYSTEM as Vr, ROLE_INTERNAL as vt, ROLE_HIDDEN as zr, STATS_SEPARATOR as Bt, CLIPBOARD_PROMPT as $t, TYPE_QUESTION as Ur, C as cr, SEND as Pr, ERROR_MESSAGE as Hr, ROLE_USER as nt, L as Fr, j as Gr, isLastMessageFromRole as Wr, getMessageContaintWrapperClass as jr, Logo as qr, getMainPaddingClass as Mt, r as Kr, LOCAL_STORAGE_PREFIX as Dt, LOCAL_STORAGE_SEARCH as Jr, LOCAL_STORAGE_SORT as Yr } from "./index.-EILV3b7.js";
|
|
3
|
+
import c from "clsx";
|
|
4
|
+
import $, { useRef as S, useEffect as L, useCallback as Z, useSyncExternalStore as Xr, useState as G, useMemo as De, useContext as P, useLayoutEffect as fe, useId as Qr, useReducer as Be, createContext as Zr, useDebugValue as ea, lazy as lr, Suspense as ot } from "react";
|
|
5
|
+
const ta = ({
|
|
6
|
+
className: e,
|
|
7
|
+
viewBox: t,
|
|
8
|
+
title: r,
|
|
9
|
+
monotone: a,
|
|
10
|
+
...n
|
|
11
|
+
}) => /* @__PURE__ */ I(
|
|
12
|
+
bt,
|
|
13
|
+
{
|
|
14
|
+
defaultViewBox: "0 0 448 512",
|
|
15
|
+
size: "size-5",
|
|
16
|
+
viewBox: t,
|
|
17
|
+
className: e,
|
|
18
|
+
title: r || "Add",
|
|
19
|
+
...n,
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ d("path", { className: "fa-secondary", opacity: a ? "1" : "0.4", d: "" }),
|
|
22
|
+
/* @__PURE__ */ d(
|
|
23
|
+
"path",
|
|
24
|
+
{
|
|
25
|
+
className: "fa-primary",
|
|
26
|
+
d: "M248 72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 160L40 232c-13.3 0-24 10.7-24 24s10.7 24 24 24l160 0 0 160c0 13.3 10.7 24 24 24s24-10.7 24-24l0-160 160 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-160 0 0-160z"
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
), ra = ({
|
|
32
|
+
className: e,
|
|
33
|
+
viewBox: t,
|
|
34
|
+
title: r,
|
|
35
|
+
monotone: a,
|
|
36
|
+
...n
|
|
37
|
+
}) => /* @__PURE__ */ d(
|
|
38
|
+
bt,
|
|
39
|
+
{
|
|
40
|
+
defaultViewBox: "0 0 384 512",
|
|
41
|
+
size: "size-5",
|
|
42
|
+
viewBox: t,
|
|
43
|
+
className: e,
|
|
44
|
+
title: r || "Close",
|
|
45
|
+
...n,
|
|
46
|
+
children: /* @__PURE__ */ d("path", { d: "M345 137c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-119 119L73 103c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l119 119L39 375c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l119-119L311 409c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-119-119L345 137z" })
|
|
47
|
+
}
|
|
48
|
+
), aa = ({
|
|
49
|
+
className: e,
|
|
50
|
+
viewBox: t,
|
|
51
|
+
title: r,
|
|
52
|
+
monotone: a,
|
|
53
|
+
...n
|
|
54
|
+
}) => /* @__PURE__ */ d(
|
|
55
|
+
bt,
|
|
56
|
+
{
|
|
57
|
+
defaultViewBox: "0 0 384 512",
|
|
58
|
+
size: "size-5",
|
|
59
|
+
viewBox: t,
|
|
60
|
+
className: e,
|
|
61
|
+
title: r || "Down",
|
|
62
|
+
...n,
|
|
63
|
+
children: /* @__PURE__ */ d("path", { d: "M174.6 472.6c4.5 4.7 10.8 7.4 17.4 7.4s12.8-2.7 17.4-7.4l168-176c9.2-9.6 8.8-24.8-.8-33.9s-24.8-8.8-33.9 .8L216 396.1 216 56c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 340.1L41.4 263.4c-9.2-9.6-24.3-9.9-33.9-.8s-9.9 24.3-.8 33.9l168 176z" })
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
/*!
|
|
67
|
+
@versini/ui-header v3.0.0
|
|
68
|
+
© 2025 gizmette.com
|
|
69
|
+
*/
|
|
70
|
+
try {
|
|
71
|
+
window.__VERSINI_UI_HEADER__ || (window.__VERSINI_UI_HEADER__ = {
|
|
72
|
+
version: "3.0.0",
|
|
73
|
+
buildTime: "01/03/2025 10:45 AM EST",
|
|
74
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
75
|
+
license: "MIT"
|
|
76
|
+
});
|
|
77
|
+
} catch {
|
|
78
|
+
}
|
|
79
|
+
const na = "av-header", oa = ({
|
|
80
|
+
children: e,
|
|
81
|
+
className: t,
|
|
82
|
+
raw: r = !1,
|
|
83
|
+
mode: a = "system",
|
|
84
|
+
noColors: n = !1,
|
|
85
|
+
sticky: o = !1,
|
|
86
|
+
noBorder: s = !1,
|
|
87
|
+
noMargin: i = !1,
|
|
88
|
+
noPadding: l = !1
|
|
89
|
+
}) => {
|
|
90
|
+
const h = c(
|
|
91
|
+
na,
|
|
92
|
+
{
|
|
93
|
+
"border-border-accent": a === "dark" && !r && !n && !s,
|
|
94
|
+
"border-border-medium": a === "light" && !r && !n && !s,
|
|
95
|
+
"border-border-accent dark:border-border-medium": a === "alt-system" && !r && !n && !s,
|
|
96
|
+
"border-border-medium dark:border-border-accent": a === "system" && !r && !n && !s,
|
|
97
|
+
"border-b-4": !r && !s,
|
|
98
|
+
"border-transparent": !r && n,
|
|
99
|
+
"bg-surface-dark": a === "dark" && !r && !n,
|
|
100
|
+
"bg-surface-light": a === "light" && !r && !n,
|
|
101
|
+
"bg-surface-dark dark:bg-surface-light": a === "alt-system" && !r && !n,
|
|
102
|
+
"bg-surface-light dark:bg-surface-dark": a === "system" && !r && !n,
|
|
103
|
+
"sticky top-0 z-50": o
|
|
104
|
+
},
|
|
105
|
+
t
|
|
106
|
+
), f = c({
|
|
107
|
+
"mt-0": !i,
|
|
108
|
+
"p-2": !l,
|
|
109
|
+
"flex flex-col w-full md:mx-auto md:max-w-4xl": !r
|
|
110
|
+
});
|
|
111
|
+
return /* @__PURE__ */ d("header", { className: h, children: /* @__PURE__ */ d("div", { className: f, children: e }) });
|
|
112
|
+
};
|
|
113
|
+
function sa(e) {
|
|
114
|
+
const t = e.toLowerCase().split("+").map((o) => o.trim()), r = {
|
|
115
|
+
alt: t.includes("alt"),
|
|
116
|
+
ctrl: t.includes("ctrl"),
|
|
117
|
+
meta: t.includes("meta"),
|
|
118
|
+
mod: t.includes("mod"),
|
|
119
|
+
shift: t.includes("shift")
|
|
120
|
+
}, a = ["alt", "ctrl", "meta", "shift", "mod"], n = t.find((o) => !a.includes(o));
|
|
121
|
+
return {
|
|
122
|
+
...r,
|
|
123
|
+
key: n
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function ia(e, t) {
|
|
127
|
+
const { alt: r, ctrl: a, meta: n, mod: o, shift: s, key: i } = e, { altKey: l, ctrlKey: h, metaKey: f, shiftKey: g, key: u } = t;
|
|
128
|
+
if (r !== l)
|
|
129
|
+
return !1;
|
|
130
|
+
if (o) {
|
|
131
|
+
if (!h && !f)
|
|
132
|
+
return !1;
|
|
133
|
+
} else if (a !== h || n !== f)
|
|
134
|
+
return !1;
|
|
135
|
+
return s !== g ? !1 : !!(i && (u.toLowerCase() === i.toLowerCase() || t.code.replace("Key", "").toLowerCase() === i.toLowerCase()));
|
|
136
|
+
}
|
|
137
|
+
function ca(e) {
|
|
138
|
+
return (t) => ia(sa(e), t);
|
|
139
|
+
}
|
|
140
|
+
function la(e) {
|
|
141
|
+
return (t) => {
|
|
142
|
+
const r = "nativeEvent" in t ? t.nativeEvent : t;
|
|
143
|
+
e.forEach(([a, n, o = { preventDefault: !0 }]) => {
|
|
144
|
+
ca(a)(r) && (o.preventDefault && t.preventDefault(), n(r));
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
function da() {
|
|
149
|
+
const e = S(!1);
|
|
150
|
+
return L(() => (e.current = !0, () => {
|
|
151
|
+
e.current = !1;
|
|
152
|
+
}), []), Z(() => e.current, []);
|
|
153
|
+
}
|
|
154
|
+
function dr(e, t) {
|
|
155
|
+
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
|
156
|
+
}
|
|
157
|
+
const Vt = (e, t) => {
|
|
158
|
+
const r = JSON.stringify(
|
|
159
|
+
typeof t == "function" ? t() : t
|
|
160
|
+
);
|
|
161
|
+
window.localStorage.setItem(e, r), dr(e, r);
|
|
162
|
+
}, ua = (e) => {
|
|
163
|
+
window.localStorage.removeItem(e), dr(e, null);
|
|
164
|
+
}, zt = (e) => window.localStorage.getItem(e), ma = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
165
|
+
function Ut({
|
|
166
|
+
key: e,
|
|
167
|
+
initialValue: t
|
|
168
|
+
}) {
|
|
169
|
+
const r = Xr(ma, () => zt(e)), a = Z(
|
|
170
|
+
(s) => {
|
|
171
|
+
try {
|
|
172
|
+
const i = typeof s == "function" ? s(JSON.parse(r)) : s;
|
|
173
|
+
i == null ? ua(e) : Vt(e, i);
|
|
174
|
+
} catch (i) {
|
|
175
|
+
console.warn(i);
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
[e, r]
|
|
179
|
+
), n = Z(() => {
|
|
180
|
+
a(t);
|
|
181
|
+
}, [t, a]), o = Z(() => {
|
|
182
|
+
a(null);
|
|
183
|
+
}, [a]);
|
|
184
|
+
return L(() => {
|
|
185
|
+
try {
|
|
186
|
+
zt(e) === null && typeof t < "u" && Vt(e, t);
|
|
187
|
+
} catch (s) {
|
|
188
|
+
console.warn(s);
|
|
189
|
+
}
|
|
190
|
+
}, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
|
|
191
|
+
}
|
|
192
|
+
const ga = {
|
|
193
|
+
x: 0,
|
|
194
|
+
y: 0,
|
|
195
|
+
width: 0,
|
|
196
|
+
height: 0,
|
|
197
|
+
top: 0,
|
|
198
|
+
left: 0,
|
|
199
|
+
bottom: 0,
|
|
200
|
+
right: 0
|
|
201
|
+
};
|
|
202
|
+
function ha(e) {
|
|
203
|
+
const t = da(), r = S(0), a = S(null), [n, o] = G(ga), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
|
204
|
+
const l = i[0];
|
|
205
|
+
l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
206
|
+
a.current && t() && o(l.contentRect);
|
|
207
|
+
}));
|
|
208
|
+
}), [t]);
|
|
209
|
+
return L(() => (a.current && (s == null || s.observe(a.current, e)), () => {
|
|
210
|
+
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
211
|
+
}), [s, e]), [a, n];
|
|
212
|
+
}
|
|
213
|
+
/*!
|
|
214
|
+
@versini/ui-table v3.0.4
|
|
215
|
+
© 2025 gizmette.com
|
|
216
|
+
*/
|
|
217
|
+
try {
|
|
218
|
+
window.__VERSINI_UI_TABLE__ || (window.__VERSINI_UI_TABLE__ = {
|
|
219
|
+
version: "3.0.4",
|
|
220
|
+
buildTime: "01/04/2025 04:09 PM EST",
|
|
221
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
222
|
+
license: "MIT"
|
|
223
|
+
});
|
|
224
|
+
} catch {
|
|
225
|
+
}
|
|
226
|
+
const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
|
|
227
|
+
ASC: "asc",
|
|
228
|
+
DESC: "desc"
|
|
229
|
+
}, fa = ({
|
|
230
|
+
mode: e,
|
|
231
|
+
className: t,
|
|
232
|
+
wrapperClassName: r,
|
|
233
|
+
stickyHeader: a,
|
|
234
|
+
stickyFooter: n
|
|
235
|
+
}) => ({
|
|
236
|
+
wrapper: c(
|
|
237
|
+
"not-prose relative w-full rounded-lg shadow-md",
|
|
238
|
+
{
|
|
239
|
+
"overflow-x-auto": !a && !n,
|
|
240
|
+
"overflow-y-scroll": a || n,
|
|
241
|
+
"bg-surface-darker": e === "dark" || e === "system",
|
|
242
|
+
"bg-surface-light": e === "light" || e === "alt-system",
|
|
243
|
+
"dark:bg-surface-light": e === "system",
|
|
244
|
+
"dark:bg-surface-darker": e === "alt-system",
|
|
245
|
+
"text-copy-light": e === "dark",
|
|
246
|
+
"text-copy-dark": e === "light",
|
|
247
|
+
"text-copy-light dark:text-copy-dark": e === "system",
|
|
248
|
+
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
249
|
+
},
|
|
250
|
+
r
|
|
251
|
+
),
|
|
252
|
+
table: c("my-0 w-full text-left text-sm", t, {
|
|
253
|
+
"text-copy-light": e === "dark",
|
|
254
|
+
"text-copy-dark": e === "light",
|
|
255
|
+
"text-copy-light dark:text-copy-dark": e === "system",
|
|
256
|
+
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
257
|
+
}),
|
|
258
|
+
caption: c("py-2 text-sm font-bold", {
|
|
259
|
+
"text-copy-light": e === "dark",
|
|
260
|
+
"text-copy-dark": e === "light",
|
|
261
|
+
"text-copy-light dark:text-copy-dark": e === "system",
|
|
262
|
+
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
263
|
+
})
|
|
264
|
+
}), pa = ({
|
|
265
|
+
className: e,
|
|
266
|
+
stickyHeader: t,
|
|
267
|
+
mode: r
|
|
268
|
+
}) => c(
|
|
269
|
+
{
|
|
270
|
+
"sticky top-0 z-10": t,
|
|
271
|
+
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": t && r === "dark",
|
|
272
|
+
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": t && r === "system",
|
|
273
|
+
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": t && r === "light",
|
|
274
|
+
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": t && r === "alt-system"
|
|
275
|
+
},
|
|
276
|
+
e
|
|
277
|
+
), ya = ({
|
|
278
|
+
className: e,
|
|
279
|
+
stickyFooter: t,
|
|
280
|
+
mode: r
|
|
281
|
+
}) => c(
|
|
282
|
+
{
|
|
283
|
+
"sticky bottom-0 z-10": t,
|
|
284
|
+
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": t && r === "dark",
|
|
285
|
+
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": t && r === "system",
|
|
286
|
+
"shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": t && r === "light",
|
|
287
|
+
"shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": t && r === "alt-system"
|
|
288
|
+
},
|
|
289
|
+
e
|
|
290
|
+
), ba = ({
|
|
291
|
+
mode: e,
|
|
292
|
+
className: t,
|
|
293
|
+
cellWrapper: r
|
|
294
|
+
}) => r === Ve || r === kt ? c(
|
|
295
|
+
{
|
|
296
|
+
"bg-table-head-dark": e === "dark" || e === "system",
|
|
297
|
+
"bg-table-head-light": e === "light" || e === "alt-system",
|
|
298
|
+
"dark:bg-table-head-light": e === "system",
|
|
299
|
+
"dark:bg-table-head-dark": e === "alt-system"
|
|
300
|
+
},
|
|
301
|
+
t
|
|
302
|
+
) : c(
|
|
303
|
+
"border-b last:border-0",
|
|
304
|
+
{
|
|
305
|
+
"border-table-dark": e === "dark" || e === "system",
|
|
306
|
+
"odd:bg-table-dark-odd even:bg-table-dark-even": r === ye && e === "dark",
|
|
307
|
+
"border-table-light": e === "light" || e === "alt-system",
|
|
308
|
+
"odd:bg-table-light-odd even:bg-table-light-even": r === ye && e === "light",
|
|
309
|
+
"dark:border-table-light": e === "system",
|
|
310
|
+
"odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": r === ye && e === "system",
|
|
311
|
+
"dark:border-table-dark": e === "alt-system",
|
|
312
|
+
"odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": r === ye && e === "alt-system"
|
|
313
|
+
},
|
|
314
|
+
t
|
|
315
|
+
), va = ({
|
|
316
|
+
cellWrapper: e,
|
|
317
|
+
className: t,
|
|
318
|
+
compact: r,
|
|
319
|
+
mode: a,
|
|
320
|
+
align: n
|
|
321
|
+
}) => ({
|
|
322
|
+
alignClasses: c({
|
|
323
|
+
"flex justify-start text-left": n === "left",
|
|
324
|
+
"flex justify-center text-center": n === "center",
|
|
325
|
+
"flex justify-end text-right": n === "right"
|
|
326
|
+
}),
|
|
327
|
+
mainClasses: c(
|
|
328
|
+
{
|
|
329
|
+
"text-copy-light": a === "dark" || a === "system",
|
|
330
|
+
"text-copy-dark": a === "light" || a === "alt-system",
|
|
331
|
+
"dark:text-copy-dark": a === "system",
|
|
332
|
+
"dark:text-copy-light": a === "alt-system",
|
|
333
|
+
"px-4 py-3": !r && (e === Ve || e === kt),
|
|
334
|
+
"p-4": !r && e === ye,
|
|
335
|
+
"px-2 py-1.5": r
|
|
336
|
+
},
|
|
337
|
+
t
|
|
338
|
+
)
|
|
339
|
+
}), ka = ({
|
|
340
|
+
buttonClassName: e
|
|
341
|
+
}) => c("rounded-none text-sm", e), Pt = "av-button", _t = "icon", ur = "button", st = "link", _a = ({
|
|
342
|
+
type: e,
|
|
343
|
+
size: t,
|
|
344
|
+
labelRight: r,
|
|
345
|
+
labelLeft: a,
|
|
346
|
+
align: n
|
|
347
|
+
}) => {
|
|
348
|
+
const o = "max-h-8 py-0 px-2", s = "max-h-9 py-1 px-3", i = "max-h-12 py-2 px-4";
|
|
349
|
+
switch (e) {
|
|
350
|
+
case ur:
|
|
351
|
+
case st:
|
|
352
|
+
return c({
|
|
353
|
+
[o]: t === "small",
|
|
354
|
+
[s]: t === "medium",
|
|
355
|
+
[i]: t === "large"
|
|
356
|
+
});
|
|
357
|
+
case _t:
|
|
358
|
+
return c("inline-flex items-center", {
|
|
359
|
+
"justify-center": n === "center",
|
|
360
|
+
"justify-start": n === "left",
|
|
361
|
+
"justify-end": n === "right",
|
|
362
|
+
"h-6 w-6 p-0": t === "small" && !(r || a),
|
|
363
|
+
"h-6 px-2": t === "small" && (r || a),
|
|
364
|
+
"h-8 w-8 p-1": t === "medium" && !(r || a),
|
|
365
|
+
"h-8 px-3": t === "medium" && (r || a),
|
|
366
|
+
"h-12 w-12 p-2": t === "large" && !(r || a),
|
|
367
|
+
"h-12 px-4": t === "large" && (r || a)
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
}, Ea = ({
|
|
371
|
+
type: e,
|
|
372
|
+
size: t,
|
|
373
|
+
labelRight: r,
|
|
374
|
+
labelLeft: a
|
|
375
|
+
}) => {
|
|
376
|
+
const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
|
|
377
|
+
switch (e) {
|
|
378
|
+
case ur:
|
|
379
|
+
case st:
|
|
380
|
+
return c({
|
|
381
|
+
"text-center": e === st,
|
|
382
|
+
[n]: t === "small",
|
|
383
|
+
[o]: t === "medium",
|
|
384
|
+
[s]: t === "large"
|
|
385
|
+
});
|
|
386
|
+
case _t:
|
|
387
|
+
return c({
|
|
388
|
+
[n]: t === "small" && (r || a),
|
|
389
|
+
[o]: t === "medium" && (r || a),
|
|
390
|
+
[s]: t === "large" && (r || a)
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
}, xa = ({
|
|
394
|
+
mode: e,
|
|
395
|
+
noBackground: t,
|
|
396
|
+
noTruncate: r,
|
|
397
|
+
variant: a
|
|
398
|
+
}) => {
|
|
399
|
+
if (t)
|
|
400
|
+
return "not-prose";
|
|
401
|
+
if (a === "primary")
|
|
402
|
+
return c("not-prose", {
|
|
403
|
+
truncate: !r,
|
|
404
|
+
"text-copy-light": e === "dark" || e === "system",
|
|
405
|
+
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
406
|
+
"dark:text-copy-lighter": e === "system",
|
|
407
|
+
"dark:text-copy-light": e === "alt-system"
|
|
408
|
+
});
|
|
409
|
+
if (a === "secondary")
|
|
410
|
+
return c("not-prose", {
|
|
411
|
+
truncate: !r,
|
|
412
|
+
"text-copy-light": e === "light" || e === "system",
|
|
413
|
+
"text-copy-lighter": e === "dark" || e === "alt-system",
|
|
414
|
+
"dark:text-copy-lighter": e === "alt-system",
|
|
415
|
+
"dark:text-copy-light": e === "system"
|
|
416
|
+
});
|
|
417
|
+
if (a === "danger")
|
|
418
|
+
return c("not-prose", {
|
|
419
|
+
truncate: !r,
|
|
420
|
+
"text-copy-light": e === "dark" || e === "system",
|
|
421
|
+
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
422
|
+
"dark:text-copy-lighter": e === "system",
|
|
423
|
+
"dark:text-copy-light": e === "alt-system"
|
|
424
|
+
});
|
|
425
|
+
if (a === "selected")
|
|
426
|
+
return c("not-prose text-copy-lighter", {
|
|
427
|
+
truncate: !r
|
|
428
|
+
});
|
|
429
|
+
}, wa = ({
|
|
430
|
+
mode: e,
|
|
431
|
+
noBackground: t,
|
|
432
|
+
variant: r
|
|
433
|
+
}) => {
|
|
434
|
+
if (!t) {
|
|
435
|
+
if (r === "primary")
|
|
436
|
+
return c({
|
|
437
|
+
"bg-action-dark": e === "dark",
|
|
438
|
+
"bg-action-light": e === "light",
|
|
439
|
+
"bg-action-dark dark:bg-action-light": e === "system",
|
|
440
|
+
"bg-action-light dark:bg-action-dark": e === "alt-system"
|
|
441
|
+
});
|
|
442
|
+
if (r === "secondary")
|
|
443
|
+
return c({
|
|
444
|
+
"bg-action-dark": e === "light",
|
|
445
|
+
"bg-action-light": e === "dark",
|
|
446
|
+
"bg-action-dark dark:bg-action-light": e === "alt-system",
|
|
447
|
+
"bg-action-light dark:bg-action-dark": e === "system"
|
|
448
|
+
});
|
|
449
|
+
if (r === "danger")
|
|
450
|
+
return c({
|
|
451
|
+
"bg-action-danger-dark": e === "dark",
|
|
452
|
+
"bg-action-danger-light": e === "light",
|
|
453
|
+
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
454
|
+
"bg-action-danger-light dark:bg-action-danger-dark": e === "alt-system"
|
|
455
|
+
});
|
|
456
|
+
if (r === "selected")
|
|
457
|
+
return "bg-action-selected-dark";
|
|
458
|
+
}
|
|
459
|
+
}, Sa = ({
|
|
460
|
+
radius: e
|
|
461
|
+
}) => c({
|
|
462
|
+
"rounded-full": e === "large",
|
|
463
|
+
"rounded-md": e === "medium",
|
|
464
|
+
"rounded-sm": e === "small"
|
|
465
|
+
}), Ta = ({
|
|
466
|
+
mode: e,
|
|
467
|
+
disabled: t,
|
|
468
|
+
variant: r
|
|
469
|
+
}) => {
|
|
470
|
+
if (t)
|
|
471
|
+
return "";
|
|
472
|
+
if (r === "primary")
|
|
473
|
+
return c("hover:text-copy-light-hover", {
|
|
474
|
+
"hover:bg-action-dark-hover": e === "dark",
|
|
475
|
+
"hover:bg-action-light-hover": e === "light",
|
|
476
|
+
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
477
|
+
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
478
|
+
});
|
|
479
|
+
if (r === "secondary")
|
|
480
|
+
return c("hover:text-copy-light-hover", {
|
|
481
|
+
"hover:bg-action-dark-hover": e === "light",
|
|
482
|
+
"hover:bg-action-light-hover": e === "dark",
|
|
483
|
+
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
484
|
+
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
485
|
+
});
|
|
486
|
+
if (r === "danger")
|
|
487
|
+
return c("hover:text-copy-light-hover", {
|
|
488
|
+
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
489
|
+
"hover:bg-action-danger-light-hover": e === "light",
|
|
490
|
+
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
491
|
+
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
492
|
+
});
|
|
493
|
+
if (r === "selected")
|
|
494
|
+
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
495
|
+
}, Na = ({
|
|
496
|
+
mode: e,
|
|
497
|
+
disabled: t,
|
|
498
|
+
variant: r
|
|
499
|
+
}) => {
|
|
500
|
+
if (t)
|
|
501
|
+
return "";
|
|
502
|
+
if (r === "primary")
|
|
503
|
+
return c("active:text-copy-light-active", {
|
|
504
|
+
"active:bg-action-dark-active": e === "dark",
|
|
505
|
+
"active:bg-action-light-active": e === "light",
|
|
506
|
+
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
507
|
+
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
508
|
+
});
|
|
509
|
+
if (r === "secondary")
|
|
510
|
+
return c("active:text-copy-light-active", {
|
|
511
|
+
"active:bg-action-dark-active": e === "light",
|
|
512
|
+
"active:bg-action-light-active": e === "dark",
|
|
513
|
+
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
514
|
+
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
515
|
+
});
|
|
516
|
+
if (r === "danger")
|
|
517
|
+
return c("active:text-copy-lighter-active", {
|
|
518
|
+
"active:bg-action-danger-dark-active": e === "dark",
|
|
519
|
+
"active:bg-action-danger-light-active": e === "light",
|
|
520
|
+
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
521
|
+
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
522
|
+
});
|
|
523
|
+
if (r === "selected")
|
|
524
|
+
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
525
|
+
}, Ra = ({
|
|
526
|
+
mode: e,
|
|
527
|
+
noBorder: t,
|
|
528
|
+
variant: r
|
|
529
|
+
}) => {
|
|
530
|
+
if (t)
|
|
531
|
+
return "border border-transparent";
|
|
532
|
+
if (r === "primary")
|
|
533
|
+
return c("border", {
|
|
534
|
+
"border-border-dark": e === "dark",
|
|
535
|
+
"border-border-accent": e === "light",
|
|
536
|
+
"border-border-dark dark:border-border-accent": e === "system",
|
|
537
|
+
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
538
|
+
});
|
|
539
|
+
if (r === "secondary")
|
|
540
|
+
return c("border", {
|
|
541
|
+
"border-border-dark": e === "light",
|
|
542
|
+
"border-border-accent": e === "dark",
|
|
543
|
+
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
544
|
+
"border-border-accent dark:border-border-dark": e === "system"
|
|
545
|
+
});
|
|
546
|
+
if (r === "danger")
|
|
547
|
+
return c("border", {
|
|
548
|
+
"border-border-danger-dark": e === "dark",
|
|
549
|
+
"border-border-danger-medium": e === "light",
|
|
550
|
+
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
551
|
+
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
552
|
+
});
|
|
553
|
+
if (r === "selected")
|
|
554
|
+
return "border border-border-selected-dark";
|
|
555
|
+
}, Ca = ({
|
|
556
|
+
focusMode: e
|
|
557
|
+
}) => c("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
558
|
+
"focus:outline-focus-dark": e === "dark",
|
|
559
|
+
"focus:outline-focus-light": e === "light",
|
|
560
|
+
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
561
|
+
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
562
|
+
}), Ia = ({
|
|
563
|
+
type: e,
|
|
564
|
+
className: t,
|
|
565
|
+
raw: r,
|
|
566
|
+
mode: a,
|
|
567
|
+
focusMode: n,
|
|
568
|
+
disabled: o,
|
|
569
|
+
fullWidth: s,
|
|
570
|
+
size: i,
|
|
571
|
+
noBorder: l,
|
|
572
|
+
labelRight: h,
|
|
573
|
+
labelLeft: f,
|
|
574
|
+
noBackground: g,
|
|
575
|
+
variant: u,
|
|
576
|
+
noTruncate: m,
|
|
577
|
+
align: y,
|
|
578
|
+
radius: b
|
|
579
|
+
}) => (u || (u = "primary"), r ? c(Pt, t) : c(
|
|
580
|
+
Pt,
|
|
581
|
+
xa({
|
|
582
|
+
mode: a,
|
|
583
|
+
variant: u,
|
|
584
|
+
noBackground: g,
|
|
585
|
+
noTruncate: m
|
|
586
|
+
}),
|
|
587
|
+
wa({ mode: a, noBackground: g, variant: u }),
|
|
588
|
+
Sa({ radius: b }),
|
|
589
|
+
_a({
|
|
590
|
+
type: e,
|
|
591
|
+
size: i,
|
|
592
|
+
labelRight: h,
|
|
593
|
+
labelLeft: f,
|
|
594
|
+
align: y
|
|
595
|
+
}),
|
|
596
|
+
Ea({ type: e, size: i, labelRight: h, labelLeft: f }),
|
|
597
|
+
Ra({ mode: a, variant: u, noBorder: l }),
|
|
598
|
+
Ca({ focusMode: n }),
|
|
599
|
+
Ta({ mode: a, variant: u, disabled: o }),
|
|
600
|
+
Na({ mode: a, variant: u, disabled: o }),
|
|
601
|
+
{
|
|
602
|
+
"w-full": s,
|
|
603
|
+
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
604
|
+
},
|
|
605
|
+
t
|
|
606
|
+
)), Aa = (e, t, r) => {
|
|
607
|
+
var a;
|
|
608
|
+
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
609
|
+
}, mr = $.forwardRef((e, t) => {
|
|
610
|
+
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
611
|
+
return /* @__PURE__ */ d(
|
|
612
|
+
"button",
|
|
613
|
+
{
|
|
614
|
+
ref: t,
|
|
615
|
+
onClick: (o) => {
|
|
616
|
+
Aa(o, a, r);
|
|
617
|
+
},
|
|
618
|
+
...n
|
|
619
|
+
}
|
|
620
|
+
);
|
|
621
|
+
});
|
|
622
|
+
mr.displayName = "BaseButton";
|
|
623
|
+
/*!
|
|
624
|
+
@versini/ui-button v4.0.3
|
|
625
|
+
© 2025 gizmette.com
|
|
626
|
+
*/
|
|
627
|
+
try {
|
|
628
|
+
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
629
|
+
version: "4.0.3",
|
|
630
|
+
buildTime: "01/04/2025 04:09 PM EST",
|
|
631
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
632
|
+
license: "MIT"
|
|
633
|
+
});
|
|
634
|
+
} catch {
|
|
635
|
+
}
|
|
636
|
+
const gr = $.forwardRef(
|
|
637
|
+
({
|
|
638
|
+
children: e,
|
|
639
|
+
disabled: t = !1,
|
|
640
|
+
mode: r = "system",
|
|
641
|
+
focusMode: a = "system",
|
|
642
|
+
fullWidth: n = !1,
|
|
643
|
+
className: o,
|
|
644
|
+
type: s = "button",
|
|
645
|
+
raw: i = !1,
|
|
646
|
+
noBorder: l = !1,
|
|
647
|
+
"aria-label": h,
|
|
648
|
+
label: f,
|
|
649
|
+
size: g = "medium",
|
|
650
|
+
labelRight: u,
|
|
651
|
+
labelLeft: m,
|
|
652
|
+
noBackground: y = !1,
|
|
653
|
+
align: b = "center",
|
|
654
|
+
active: k = !1,
|
|
655
|
+
radius: p = "large",
|
|
656
|
+
...N
|
|
657
|
+
}, A) => {
|
|
658
|
+
const R = Ia({
|
|
659
|
+
type: _t,
|
|
660
|
+
mode: r,
|
|
661
|
+
focusMode: a,
|
|
662
|
+
fullWidth: n,
|
|
663
|
+
disabled: t,
|
|
664
|
+
raw: i,
|
|
665
|
+
className: o,
|
|
666
|
+
noBorder: l,
|
|
667
|
+
size: g,
|
|
668
|
+
labelRight: u,
|
|
669
|
+
labelLeft: m,
|
|
670
|
+
noBackground: y,
|
|
671
|
+
align: b,
|
|
672
|
+
radius: p
|
|
673
|
+
}), E = c({
|
|
674
|
+
"text-copy-accent-dark": r === "light" && !i,
|
|
675
|
+
"text-copy-light": r === "dark" && !i,
|
|
676
|
+
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
677
|
+
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
678
|
+
}), C = k ? c(
|
|
679
|
+
"relative",
|
|
680
|
+
"focus-within:static",
|
|
681
|
+
"focus-within:after:border-transparent",
|
|
682
|
+
"after:absolute",
|
|
683
|
+
"after:content-['']",
|
|
684
|
+
"after:border-b-2",
|
|
685
|
+
"after:bottom-[-4px]",
|
|
686
|
+
"after:left-0",
|
|
687
|
+
"after:right-0",
|
|
688
|
+
{
|
|
689
|
+
"after:border-table-dark": r === "dark",
|
|
690
|
+
"after:border-table-light": r === "light",
|
|
691
|
+
"after:border-table-dark dark:after:border-table-light": r === "system",
|
|
692
|
+
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
693
|
+
}
|
|
694
|
+
) : "";
|
|
695
|
+
return /* @__PURE__ */ d("div", { className: C, children: /* @__PURE__ */ I(
|
|
696
|
+
mr,
|
|
697
|
+
{
|
|
698
|
+
ref: A,
|
|
699
|
+
className: R,
|
|
700
|
+
disabled: t,
|
|
701
|
+
type: s,
|
|
702
|
+
"aria-label": h || f,
|
|
703
|
+
...N,
|
|
704
|
+
children: [
|
|
705
|
+
m && /* @__PURE__ */ d("span", { className: "pr-2", children: m }),
|
|
706
|
+
/* @__PURE__ */ d("div", { className: E, children: e }),
|
|
707
|
+
u && /* @__PURE__ */ d("span", { className: "pl-2", children: u })
|
|
708
|
+
]
|
|
709
|
+
}
|
|
710
|
+
) });
|
|
711
|
+
}
|
|
712
|
+
);
|
|
713
|
+
gr.displayName = "ButtonSort";
|
|
714
|
+
const Et = ({
|
|
715
|
+
children: e,
|
|
716
|
+
fill: t,
|
|
717
|
+
viewBox: r,
|
|
718
|
+
className: a,
|
|
719
|
+
defaultViewBox: n,
|
|
720
|
+
size: o,
|
|
721
|
+
title: s,
|
|
722
|
+
semantic: i = !1,
|
|
723
|
+
...l
|
|
724
|
+
}) => {
|
|
725
|
+
const h = c(o, a);
|
|
726
|
+
return /* @__PURE__ */ I(yt, { children: [
|
|
727
|
+
/* @__PURE__ */ d(
|
|
728
|
+
"svg",
|
|
729
|
+
{
|
|
730
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
731
|
+
className: h,
|
|
732
|
+
viewBox: r || n,
|
|
733
|
+
fill: t || "currentColor",
|
|
734
|
+
role: "img",
|
|
735
|
+
"aria-hidden": !i,
|
|
736
|
+
focusable: !1,
|
|
737
|
+
...l,
|
|
738
|
+
children: e
|
|
739
|
+
}
|
|
740
|
+
),
|
|
741
|
+
s && i && /* @__PURE__ */ d("span", { className: "sr-only", children: s })
|
|
742
|
+
] });
|
|
743
|
+
};
|
|
744
|
+
/*!
|
|
745
|
+
@versini/ui-svgicon v4.0.0
|
|
746
|
+
© 2025 gizmette.com
|
|
747
|
+
*/
|
|
748
|
+
try {
|
|
749
|
+
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
750
|
+
version: "4.0.0",
|
|
751
|
+
buildTime: "01/04/2025 04:09 PM EST",
|
|
752
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
753
|
+
license: "MIT"
|
|
754
|
+
});
|
|
755
|
+
} catch {
|
|
756
|
+
}
|
|
757
|
+
const Oa = ({
|
|
758
|
+
className: e,
|
|
759
|
+
viewBox: t,
|
|
760
|
+
title: r,
|
|
761
|
+
monotone: a,
|
|
762
|
+
...n
|
|
763
|
+
}) => /* @__PURE__ */ I(
|
|
764
|
+
Et,
|
|
765
|
+
{
|
|
766
|
+
defaultViewBox: "0 0 576 512",
|
|
767
|
+
size: "size-5",
|
|
768
|
+
viewBox: t,
|
|
769
|
+
className: e,
|
|
770
|
+
title: r || "Sort",
|
|
771
|
+
...n,
|
|
772
|
+
children: [
|
|
773
|
+
/* @__PURE__ */ d(
|
|
774
|
+
"path",
|
|
775
|
+
{
|
|
776
|
+
className: "fa-secondary",
|
|
777
|
+
opacity: a ? "1" : "0.4",
|
|
778
|
+
d: "M297.4 137.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L384 141.3 384 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7 41.4 41.4c12.5 12.5 32.8 12.5 45.3 0c6.2-6.2 9.4-14.4 9.4-22.6s-3.1-16.4-9.4-22.6l-96-96C432.4 35.1 424.2 32 416 32s-16.4 3.1-22.6 9.4l-96 96z"
|
|
779
|
+
}
|
|
780
|
+
),
|
|
781
|
+
/* @__PURE__ */ d(
|
|
782
|
+
"path",
|
|
783
|
+
{
|
|
784
|
+
className: "fa-primary",
|
|
785
|
+
d: "M137.4 470.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 370.7 192 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L86.6 329.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96z"
|
|
786
|
+
}
|
|
787
|
+
)
|
|
788
|
+
]
|
|
789
|
+
}
|
|
790
|
+
), La = ({
|
|
791
|
+
className: e,
|
|
792
|
+
viewBox: t,
|
|
793
|
+
title: r,
|
|
794
|
+
monotone: a,
|
|
795
|
+
...n
|
|
796
|
+
}) => /* @__PURE__ */ I(
|
|
797
|
+
Et,
|
|
798
|
+
{
|
|
799
|
+
defaultViewBox: "0 0 576 512",
|
|
800
|
+
size: "size-5",
|
|
801
|
+
viewBox: t,
|
|
802
|
+
className: e,
|
|
803
|
+
title: r || "Sort Down",
|
|
804
|
+
...n,
|
|
805
|
+
children: [
|
|
806
|
+
/* @__PURE__ */ d(
|
|
807
|
+
"path",
|
|
808
|
+
{
|
|
809
|
+
className: "fa-secondary",
|
|
810
|
+
opacity: a ? "1" : "0.4",
|
|
811
|
+
d: "M288 64c0-17.7 14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L320 96c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32z"
|
|
812
|
+
}
|
|
813
|
+
),
|
|
814
|
+
/* @__PURE__ */ d(
|
|
815
|
+
"path",
|
|
816
|
+
{
|
|
817
|
+
className: "fa-primary",
|
|
818
|
+
d: "M128 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L160 365.7 160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 301.7L63.6 330.4c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96C110.5 476.2 119 480 128 480z"
|
|
819
|
+
}
|
|
820
|
+
)
|
|
821
|
+
]
|
|
822
|
+
}
|
|
823
|
+
), Ba = ({
|
|
824
|
+
className: e,
|
|
825
|
+
viewBox: t,
|
|
826
|
+
title: r,
|
|
827
|
+
monotone: a,
|
|
828
|
+
...n
|
|
829
|
+
}) => /* @__PURE__ */ I(
|
|
830
|
+
Et,
|
|
831
|
+
{
|
|
832
|
+
defaultViewBox: "0 0 576 512",
|
|
833
|
+
size: "size-5",
|
|
834
|
+
viewBox: t,
|
|
835
|
+
className: e,
|
|
836
|
+
title: r || "Sort Up",
|
|
837
|
+
...n,
|
|
838
|
+
children: [
|
|
839
|
+
/* @__PURE__ */ d(
|
|
840
|
+
"path",
|
|
841
|
+
{
|
|
842
|
+
className: "fa-secondary",
|
|
843
|
+
opacity: a ? "1" : "0.4",
|
|
844
|
+
d: "M288 64c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-224 0c-17.7 0-32-14.3-32-32z"
|
|
845
|
+
}
|
|
846
|
+
),
|
|
847
|
+
/* @__PURE__ */ d(
|
|
848
|
+
"path",
|
|
849
|
+
{
|
|
850
|
+
className: "fa-primary",
|
|
851
|
+
d: "M128 32c9 0 17.5 3.8 23.6 10.4l88 96c11.9 13 11.1 33.3-2 45.2s-33.3 11.1-45.2-2L160 146.3 160 448c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-301.7L63.6 181.6c-11.9 13-32.2 13.9-45.2 2s-13.9-32.2-2-45.2l88-96C110.5 35.8 119 32 128 32z"
|
|
852
|
+
}
|
|
853
|
+
)
|
|
854
|
+
]
|
|
855
|
+
}
|
|
856
|
+
);
|
|
857
|
+
/*!
|
|
858
|
+
@versini/ui-icons v4.2.0
|
|
859
|
+
© 2025 gizmette.com
|
|
860
|
+
*/
|
|
861
|
+
try {
|
|
862
|
+
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
863
|
+
version: "4.2.0",
|
|
864
|
+
buildTime: "01/04/2025 04:09 PM EST",
|
|
865
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
866
|
+
license: "MIT"
|
|
867
|
+
});
|
|
868
|
+
} catch {
|
|
869
|
+
}
|
|
870
|
+
const be = $.createContext({
|
|
871
|
+
mode: "light",
|
|
872
|
+
cellWrapper: "thead",
|
|
873
|
+
stickyHeader: !1,
|
|
874
|
+
stickyFooter: !1,
|
|
875
|
+
compact: !1
|
|
876
|
+
}), Wo = ({
|
|
877
|
+
children: e,
|
|
878
|
+
mode: t = "system",
|
|
879
|
+
caption: r,
|
|
880
|
+
compact: a,
|
|
881
|
+
summary: n,
|
|
882
|
+
className: o,
|
|
883
|
+
wrapperClassName: s,
|
|
884
|
+
maxHeight: i,
|
|
885
|
+
stickyHeader: l,
|
|
886
|
+
stickyFooter: h,
|
|
887
|
+
...f
|
|
888
|
+
}) => {
|
|
889
|
+
const g = fa({
|
|
890
|
+
mode: t,
|
|
891
|
+
className: o,
|
|
892
|
+
wrapperClassName: s,
|
|
893
|
+
stickyHeader: l,
|
|
894
|
+
stickyFooter: h
|
|
895
|
+
});
|
|
896
|
+
return /* @__PURE__ */ d(
|
|
897
|
+
be.Provider,
|
|
898
|
+
{
|
|
899
|
+
value: { mode: t, stickyHeader: l, stickyFooter: h, compact: a },
|
|
900
|
+
children: /* @__PURE__ */ d(
|
|
901
|
+
"div",
|
|
902
|
+
{
|
|
903
|
+
className: g.wrapper,
|
|
904
|
+
...i && {
|
|
905
|
+
style: { maxHeight: i }
|
|
906
|
+
},
|
|
907
|
+
children: /* @__PURE__ */ I("table", { className: g.table, summary: n, ...f, children: [
|
|
908
|
+
r && /* @__PURE__ */ d("caption", { className: g.caption, children: r }),
|
|
909
|
+
e
|
|
910
|
+
] })
|
|
911
|
+
}
|
|
912
|
+
)
|
|
913
|
+
}
|
|
914
|
+
);
|
|
915
|
+
}, jo = ({
|
|
916
|
+
children: e,
|
|
917
|
+
className: t,
|
|
918
|
+
...r
|
|
919
|
+
}) => {
|
|
920
|
+
const a = P(be);
|
|
921
|
+
a.cellWrapper = Ve;
|
|
922
|
+
const n = pa({
|
|
923
|
+
className: t,
|
|
924
|
+
mode: a.mode,
|
|
925
|
+
stickyHeader: a.stickyHeader
|
|
926
|
+
});
|
|
927
|
+
return /* @__PURE__ */ d("thead", { className: n, ...r, children: e });
|
|
928
|
+
}, qo = ({
|
|
929
|
+
children: e,
|
|
930
|
+
className: t,
|
|
931
|
+
...r
|
|
932
|
+
}) => {
|
|
933
|
+
const a = P(be);
|
|
934
|
+
a.cellWrapper = kt;
|
|
935
|
+
const n = ya({
|
|
936
|
+
className: t,
|
|
937
|
+
mode: a.mode,
|
|
938
|
+
stickyFooter: a.stickyFooter
|
|
939
|
+
});
|
|
940
|
+
return /* @__PURE__ */ d("tfoot", { className: n, ...r, children: e });
|
|
941
|
+
}, Ko = ({ children: e, ...t }) => {
|
|
942
|
+
const r = P(be);
|
|
943
|
+
return r.cellWrapper = ye, /* @__PURE__ */ d("tbody", { ...t, children: e });
|
|
944
|
+
}, Jo = ({
|
|
945
|
+
children: e,
|
|
946
|
+
className: t,
|
|
947
|
+
...r
|
|
948
|
+
}) => {
|
|
949
|
+
const a = P(be), n = ba({
|
|
950
|
+
mode: a.mode,
|
|
951
|
+
cellWrapper: a.cellWrapper,
|
|
952
|
+
className: t
|
|
953
|
+
});
|
|
954
|
+
return /* @__PURE__ */ d("tr", { className: n, ...r, children: e });
|
|
955
|
+
}, $a = ({
|
|
956
|
+
children: e,
|
|
957
|
+
component: t,
|
|
958
|
+
className: r,
|
|
959
|
+
align: a,
|
|
960
|
+
...n
|
|
961
|
+
}) => {
|
|
962
|
+
const o = P(be), s = t || (o.cellWrapper === Ve ? "th" : "td"), { mainClasses: i, alignClasses: l } = va({
|
|
963
|
+
cellWrapper: o.cellWrapper,
|
|
964
|
+
className: r,
|
|
965
|
+
mode: o.mode,
|
|
966
|
+
compact: o.compact,
|
|
967
|
+
align: a
|
|
968
|
+
});
|
|
969
|
+
return a ? /* @__PURE__ */ d(s, { className: i, ...n, children: /* @__PURE__ */ d("div", { className: l, children: e }) }) : /* @__PURE__ */ d(s, { className: i, ...n, children: e });
|
|
970
|
+
}, Yo = ({
|
|
971
|
+
align: e,
|
|
972
|
+
children: t,
|
|
973
|
+
buttonClassName: r,
|
|
974
|
+
className: a,
|
|
975
|
+
component: n,
|
|
976
|
+
focusMode: o = "alt-system",
|
|
977
|
+
mode: s = "alt-system",
|
|
978
|
+
onClick: i,
|
|
979
|
+
sortDirection: l,
|
|
980
|
+
sortedCell: h,
|
|
981
|
+
cellId: f,
|
|
982
|
+
...g
|
|
983
|
+
}) => {
|
|
984
|
+
const u = ka({ buttonClassName: r });
|
|
985
|
+
return /* @__PURE__ */ d(
|
|
986
|
+
$a,
|
|
987
|
+
{
|
|
988
|
+
component: n,
|
|
989
|
+
className: a,
|
|
990
|
+
role: "columnheader",
|
|
991
|
+
"aria-sort": l === Ee.ASC && h === f ? "ascending" : l === Ee.DESC && h === f ? "descending" : "other",
|
|
992
|
+
...g,
|
|
993
|
+
children: /* @__PURE__ */ d(
|
|
994
|
+
gr,
|
|
995
|
+
{
|
|
996
|
+
active: h === f,
|
|
997
|
+
className: u,
|
|
998
|
+
onClick: i,
|
|
999
|
+
align: e,
|
|
1000
|
+
noBorder: !0,
|
|
1001
|
+
focusMode: o,
|
|
1002
|
+
mode: s,
|
|
1003
|
+
fullWidth: !0,
|
|
1004
|
+
labelRight: t,
|
|
1005
|
+
children: l === Ee.ASC && h === f ? /* @__PURE__ */ d(Ba, { className: "size-4", monotone: !0 }) : l === Ee.DESC && h === f ? /* @__PURE__ */ d(La, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ d(Oa, { className: "size-4", monotone: !0 })
|
|
1006
|
+
}
|
|
1007
|
+
)
|
|
1008
|
+
}
|
|
1009
|
+
);
|
|
1010
|
+
}, D = [];
|
|
1011
|
+
for (let e = 0; e < 256; ++e)
|
|
1012
|
+
D.push((e + 256).toString(16).slice(1));
|
|
1013
|
+
function Ma(e, t = 0) {
|
|
1014
|
+
return (D[e[t + 0]] + D[e[t + 1]] + D[e[t + 2]] + D[e[t + 3]] + "-" + D[e[t + 4]] + D[e[t + 5]] + "-" + D[e[t + 6]] + D[e[t + 7]] + "-" + D[e[t + 8]] + D[e[t + 9]] + "-" + D[e[t + 10]] + D[e[t + 11]] + D[e[t + 12]] + D[e[t + 13]] + D[e[t + 14]] + D[e[t + 15]]).toLowerCase();
|
|
1015
|
+
}
|
|
1016
|
+
let Ke;
|
|
1017
|
+
const Da = new Uint8Array(16);
|
|
1018
|
+
function Va() {
|
|
1019
|
+
if (!Ke) {
|
|
1020
|
+
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
1021
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1022
|
+
Ke = crypto.getRandomValues.bind(crypto);
|
|
1023
|
+
}
|
|
1024
|
+
return Ke(Da);
|
|
1025
|
+
}
|
|
1026
|
+
const za = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ht = { randomUUID: za };
|
|
1027
|
+
function xt(e, t, r) {
|
|
1028
|
+
if (Ht.randomUUID && !t && !e)
|
|
1029
|
+
return Ht.randomUUID();
|
|
1030
|
+
e = e || {};
|
|
1031
|
+
const a = e.random || (e.rng || Va)();
|
|
1032
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ma(a);
|
|
1033
|
+
}
|
|
1034
|
+
const Ua = (e, t) => {
|
|
1035
|
+
if ((t == null ? void 0 : t.type) === $r) {
|
|
1036
|
+
const r = t.payload.messages.map((a) => ({
|
|
1037
|
+
message: {
|
|
1038
|
+
role: a.role,
|
|
1039
|
+
content: a.content,
|
|
1040
|
+
name: a.name,
|
|
1041
|
+
processingTime: a.processingTime
|
|
1042
|
+
}
|
|
1043
|
+
}));
|
|
1044
|
+
return {
|
|
1045
|
+
id: t.payload.id,
|
|
1046
|
+
model: t.payload.model,
|
|
1047
|
+
usage: t.payload.usage,
|
|
1048
|
+
isComponent: e.isComponent,
|
|
1049
|
+
messages: r,
|
|
1050
|
+
engine: e.engine,
|
|
1051
|
+
prompts: e.prompts
|
|
1052
|
+
};
|
|
1053
|
+
}
|
|
1054
|
+
if ((t == null ? void 0 : t.type) === xe) {
|
|
1055
|
+
const r = t.payload.message.role, a = t.payload.message.content, n = t.payload.message.name, o = t.payload.message.processingTime, s = t.payload.message.messageId;
|
|
1056
|
+
if (r !== "") {
|
|
1057
|
+
const i = {
|
|
1058
|
+
role: r,
|
|
1059
|
+
content: a,
|
|
1060
|
+
name: n,
|
|
1061
|
+
processingTime: o,
|
|
1062
|
+
messageId: s
|
|
1063
|
+
};
|
|
1064
|
+
if (r === we) {
|
|
1065
|
+
const l = e.messages.findIndex(
|
|
1066
|
+
(h) => h.message.messageId === s
|
|
1067
|
+
);
|
|
1068
|
+
if (l !== -1) {
|
|
1069
|
+
const h = e.messages.map((f, g) => g === l ? {
|
|
1070
|
+
message: {
|
|
1071
|
+
...f.message,
|
|
1072
|
+
content: `${f.message.content}${a}`,
|
|
1073
|
+
processingTime: o,
|
|
1074
|
+
name: n
|
|
1075
|
+
}
|
|
1076
|
+
} : f);
|
|
1077
|
+
return {
|
|
1078
|
+
id: e.id,
|
|
1079
|
+
model: e.model,
|
|
1080
|
+
usage: e.usage,
|
|
1081
|
+
isComponent: e.isComponent,
|
|
1082
|
+
messages: h,
|
|
1083
|
+
engine: e.engine,
|
|
1084
|
+
prompts: e.prompts
|
|
1085
|
+
};
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
return {
|
|
1089
|
+
id: e.id,
|
|
1090
|
+
model: e.model,
|
|
1091
|
+
engine: e.engine,
|
|
1092
|
+
prompts: e.prompts,
|
|
1093
|
+
usage: e.usage,
|
|
1094
|
+
isComponent: e.isComponent,
|
|
1095
|
+
messages: [
|
|
1096
|
+
...e.messages,
|
|
1097
|
+
{
|
|
1098
|
+
message: i
|
|
1099
|
+
}
|
|
1100
|
+
]
|
|
1101
|
+
};
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
return (t == null ? void 0 : t.type) === rr ? {
|
|
1105
|
+
id: xt(),
|
|
1106
|
+
model: e.model,
|
|
1107
|
+
engine: e.engine,
|
|
1108
|
+
usage: 0,
|
|
1109
|
+
messages: [],
|
|
1110
|
+
isComponent: e.isComponent,
|
|
1111
|
+
prompts: e.prompts
|
|
1112
|
+
} : (t == null ? void 0 : t.type) === ar ? {
|
|
1113
|
+
id: e.id,
|
|
1114
|
+
model: t.payload.model,
|
|
1115
|
+
engine: e.engine,
|
|
1116
|
+
prompts: e.prompts,
|
|
1117
|
+
usage: t.payload.usage,
|
|
1118
|
+
messages: e.messages,
|
|
1119
|
+
isComponent: e.isComponent
|
|
1120
|
+
} : (t == null ? void 0 : t.type) === nr ? {
|
|
1121
|
+
...e,
|
|
1122
|
+
streaming: t.payload.streaming
|
|
1123
|
+
} : e;
|
|
1124
|
+
}, Pa = (e, t) => {
|
|
1125
|
+
switch (t == null ? void 0 : t.type) {
|
|
1126
|
+
case Dr:
|
|
1127
|
+
return {
|
|
1128
|
+
searchString: t.payload.searchString,
|
|
1129
|
+
sortedCell: e.sortedCell,
|
|
1130
|
+
sortDirection: e.sortDirection
|
|
1131
|
+
};
|
|
1132
|
+
case Mr:
|
|
1133
|
+
return {
|
|
1134
|
+
searchString: e.searchString,
|
|
1135
|
+
sortedCell: t.payload.sortedCell,
|
|
1136
|
+
sortDirection: t.payload.sortDirection
|
|
1137
|
+
};
|
|
1138
|
+
default:
|
|
1139
|
+
return e;
|
|
1140
|
+
}
|
|
1141
|
+
}, Ha = (e, t) => {
|
|
1142
|
+
switch (t == null ? void 0 : t.type) {
|
|
1143
|
+
case sr:
|
|
1144
|
+
return {
|
|
1145
|
+
prompt: t.payload.prompt
|
|
1146
|
+
};
|
|
1147
|
+
case or:
|
|
1148
|
+
return {
|
|
1149
|
+
prompt: ""
|
|
1150
|
+
};
|
|
1151
|
+
default:
|
|
1152
|
+
return e;
|
|
1153
|
+
}
|
|
1154
|
+
}, ve = $.createContext({
|
|
1155
|
+
state: {
|
|
1156
|
+
id: "",
|
|
1157
|
+
model: Se,
|
|
1158
|
+
engine: Se,
|
|
1159
|
+
usage: 0,
|
|
1160
|
+
messages: [],
|
|
1161
|
+
isComponent: !1,
|
|
1162
|
+
prompts: []
|
|
1163
|
+
},
|
|
1164
|
+
dispatch: () => {
|
|
1165
|
+
},
|
|
1166
|
+
serverStats: {
|
|
1167
|
+
version: "",
|
|
1168
|
+
models: [],
|
|
1169
|
+
plugins: [],
|
|
1170
|
+
engines: []
|
|
1171
|
+
}
|
|
1172
|
+
}), Fa = $.createContext({
|
|
1173
|
+
state: { searchString: "", sortedCell: "", sortDirection: "" },
|
|
1174
|
+
dispatch: () => {
|
|
1175
|
+
}
|
|
1176
|
+
}), wt = $.createContext({
|
|
1177
|
+
state: { prompt: "" },
|
|
1178
|
+
dispatch: () => {
|
|
1179
|
+
}
|
|
1180
|
+
});
|
|
1181
|
+
/*!
|
|
1182
|
+
@versini/ui-textarea v3.0.0
|
|
1183
|
+
© 2025 gizmette.com
|
|
1184
|
+
*/
|
|
1185
|
+
try {
|
|
1186
|
+
window.__VERSINI_UI_TEXTAREA__ || (window.__VERSINI_UI_TEXTAREA__ = {
|
|
1187
|
+
version: "3.0.0",
|
|
1188
|
+
buildTime: "01/03/2025 10:45 AM EST",
|
|
1189
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
1190
|
+
license: "MIT"
|
|
1191
|
+
});
|
|
1192
|
+
} catch {
|
|
1193
|
+
}
|
|
1194
|
+
const hr = "av-text-area", Ga = "av-text-area-wrapper", Je = "av-text-area-helper-text", Wa = "av-text-area__control--right", ja = "av-text-area__control--left";
|
|
1195
|
+
function qa() {
|
|
1196
|
+
const e = S(!1);
|
|
1197
|
+
return L(() => (e.current = !0, () => {
|
|
1198
|
+
e.current = !1;
|
|
1199
|
+
}), []), Z(() => e.current, []);
|
|
1200
|
+
}
|
|
1201
|
+
function Ka(e) {
|
|
1202
|
+
return De(() => e.every((t) => t == null) ? () => {
|
|
1203
|
+
} : (t) => {
|
|
1204
|
+
e.forEach((r) => {
|
|
1205
|
+
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
1206
|
+
});
|
|
1207
|
+
}, e);
|
|
1208
|
+
}
|
|
1209
|
+
const Ja = {
|
|
1210
|
+
x: 0,
|
|
1211
|
+
y: 0,
|
|
1212
|
+
width: 0,
|
|
1213
|
+
height: 0,
|
|
1214
|
+
top: 0,
|
|
1215
|
+
left: 0,
|
|
1216
|
+
bottom: 0,
|
|
1217
|
+
right: 0
|
|
1218
|
+
};
|
|
1219
|
+
function Ft(e) {
|
|
1220
|
+
const t = qa(), r = S(0), a = S(null), [n, o] = G(Ja), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
|
|
1221
|
+
const l = i[0];
|
|
1222
|
+
l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
1223
|
+
a.current && t() && o(l.contentRect);
|
|
1224
|
+
}));
|
|
1225
|
+
}), [t]);
|
|
1226
|
+
return L(() => (a.current && (s == null || s.observe(a.current, e)), () => {
|
|
1227
|
+
s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
1228
|
+
}), [s, e]), [a, n];
|
|
1229
|
+
}
|
|
1230
|
+
function Ya({
|
|
1231
|
+
value: e,
|
|
1232
|
+
defaultValue: t,
|
|
1233
|
+
finalValue: r,
|
|
1234
|
+
onChange: a = () => {
|
|
1235
|
+
},
|
|
1236
|
+
initialControlledDelay: n = 0
|
|
1237
|
+
}) {
|
|
1238
|
+
const [o, s] = G(!1), [i, l] = G(
|
|
1239
|
+
t !== void 0 ? t : r
|
|
1240
|
+
), h = (f) => {
|
|
1241
|
+
l(f), a == null || a(f);
|
|
1242
|
+
};
|
|
1243
|
+
return L(() => {
|
|
1244
|
+
(async () => e !== void 0 && !o && n > 0 && (await new Promise(
|
|
1245
|
+
(f) => setTimeout(f, n)
|
|
1246
|
+
), s(!0)))();
|
|
1247
|
+
}, [e, n, o]), e !== void 0 ? !o && n > 0 ? ["", a, !0] : [e, a, !0] : [i, h, !1];
|
|
1248
|
+
}
|
|
1249
|
+
function Xa(e) {
|
|
1250
|
+
const t = Qr();
|
|
1251
|
+
if (!e)
|
|
1252
|
+
return t;
|
|
1253
|
+
if (typeof e == "number" || typeof e == "string")
|
|
1254
|
+
return `${e}${t}`;
|
|
1255
|
+
if (typeof e == "object") {
|
|
1256
|
+
const { id: r, prefix: a = "" } = e;
|
|
1257
|
+
return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
const fr = "SET_ANNOUNCEMENT", pr = "CLEAR_ANNOUNCEMENT", Qa = {
|
|
1261
|
+
alert: null,
|
|
1262
|
+
alertdialog: null,
|
|
1263
|
+
log: "polite",
|
|
1264
|
+
marquee: null,
|
|
1265
|
+
progressbar: null,
|
|
1266
|
+
status: "polite",
|
|
1267
|
+
timer: "assertive"
|
|
1268
|
+
}, Za = (e, t) => {
|
|
1269
|
+
switch (t == null ? void 0 : t.type) {
|
|
1270
|
+
case fr:
|
|
1271
|
+
return {
|
|
1272
|
+
...e,
|
|
1273
|
+
announcement: t.payload
|
|
1274
|
+
};
|
|
1275
|
+
case pr:
|
|
1276
|
+
return {
|
|
1277
|
+
...e,
|
|
1278
|
+
announcement: null
|
|
1279
|
+
};
|
|
1280
|
+
default:
|
|
1281
|
+
return e;
|
|
1282
|
+
}
|
|
1283
|
+
}, en = ({
|
|
1284
|
+
onAnnouncementClear: e,
|
|
1285
|
+
dispatch: t
|
|
1286
|
+
}) => {
|
|
1287
|
+
t({
|
|
1288
|
+
type: pr
|
|
1289
|
+
}), typeof e == "function" && e();
|
|
1290
|
+
}, Gt = ({
|
|
1291
|
+
children: e,
|
|
1292
|
+
clearAnnouncementDelay: t,
|
|
1293
|
+
clearAnnouncementTimeoutRef: r,
|
|
1294
|
+
onAnnouncementClear: a,
|
|
1295
|
+
dispatch: n
|
|
1296
|
+
}) => {
|
|
1297
|
+
clearTimeout(r.current), e !== null && n({
|
|
1298
|
+
type: fr,
|
|
1299
|
+
payload: e
|
|
1300
|
+
}), t && (r.current = setTimeout(
|
|
1301
|
+
() => en({
|
|
1302
|
+
onAnnouncementClear: a,
|
|
1303
|
+
dispatch: n
|
|
1304
|
+
}),
|
|
1305
|
+
t
|
|
1306
|
+
));
|
|
1307
|
+
}, tn = ({
|
|
1308
|
+
children: e,
|
|
1309
|
+
announcementTimeoutRef: t,
|
|
1310
|
+
announcementDelay: r,
|
|
1311
|
+
clearAnnouncementDelay: a,
|
|
1312
|
+
clearAnnouncementTimeoutRef: n,
|
|
1313
|
+
onAnnouncementClear: o,
|
|
1314
|
+
dispatch: s
|
|
1315
|
+
}) => {
|
|
1316
|
+
clearTimeout(t.current), r ? t.current = setTimeout(Gt, r, {
|
|
1317
|
+
children: e,
|
|
1318
|
+
clearAnnouncementDelay: a,
|
|
1319
|
+
clearAnnouncementTimeoutRef: n,
|
|
1320
|
+
onAnnouncementClear: o,
|
|
1321
|
+
dispatch: s
|
|
1322
|
+
}) : Gt({
|
|
1323
|
+
children: e,
|
|
1324
|
+
clearAnnouncementDelay: a,
|
|
1325
|
+
clearAnnouncementTimeoutRef: n,
|
|
1326
|
+
onAnnouncementClear: o,
|
|
1327
|
+
dispatch: s
|
|
1328
|
+
});
|
|
1329
|
+
};
|
|
1330
|
+
function rn({
|
|
1331
|
+
children: e,
|
|
1332
|
+
className: t,
|
|
1333
|
+
politeness: r,
|
|
1334
|
+
role: a = null,
|
|
1335
|
+
announcementDelay: n,
|
|
1336
|
+
clearAnnouncementDelay: o,
|
|
1337
|
+
onAnnouncementClear: s,
|
|
1338
|
+
visible: i,
|
|
1339
|
+
...l
|
|
1340
|
+
}) {
|
|
1341
|
+
const h = S(null), f = S(null), [g, u] = Be(Za, {
|
|
1342
|
+
announcement: null
|
|
1343
|
+
});
|
|
1344
|
+
let m = r;
|
|
1345
|
+
typeof m > "u" && (m = a ? Qa[a] : "assertive"), L(() => {
|
|
1346
|
+
tn({
|
|
1347
|
+
announcementTimeoutRef: h,
|
|
1348
|
+
announcementDelay: n,
|
|
1349
|
+
children: e,
|
|
1350
|
+
clearAnnouncementDelay: o,
|
|
1351
|
+
clearAnnouncementTimeoutRef: f,
|
|
1352
|
+
onAnnouncementClear: s,
|
|
1353
|
+
dispatch: u
|
|
1354
|
+
});
|
|
1355
|
+
}, [
|
|
1356
|
+
e,
|
|
1357
|
+
n,
|
|
1358
|
+
o,
|
|
1359
|
+
s
|
|
1360
|
+
]);
|
|
1361
|
+
const y = c(t, {
|
|
1362
|
+
"sr-only": !i
|
|
1363
|
+
});
|
|
1364
|
+
return /* @__PURE__ */ d(
|
|
1365
|
+
"div",
|
|
1366
|
+
{
|
|
1367
|
+
"aria-live": m,
|
|
1368
|
+
...a && { role: a },
|
|
1369
|
+
className: y,
|
|
1370
|
+
...l,
|
|
1371
|
+
children: g.announcement
|
|
1372
|
+
}
|
|
1373
|
+
);
|
|
1374
|
+
}
|
|
1375
|
+
/*!
|
|
1376
|
+
@versini/ui-liveregion v1.3.0
|
|
1377
|
+
© 2025 gizmette.com
|
|
1378
|
+
*/
|
|
1379
|
+
try {
|
|
1380
|
+
window.__VERSINI_UI_LIVEREGION__ || (window.__VERSINI_UI_LIVEREGION__ = {
|
|
1381
|
+
version: "1.3.0",
|
|
1382
|
+
buildTime: "01/03/2025 10:45 AM EST",
|
|
1383
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
1384
|
+
license: "MIT"
|
|
1385
|
+
});
|
|
1386
|
+
} catch {
|
|
1387
|
+
}
|
|
1388
|
+
const an = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", nn = ({ mode: e }) => c({
|
|
1389
|
+
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
1390
|
+
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
1391
|
+
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
1392
|
+
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
1393
|
+
}), on = ({
|
|
1394
|
+
focusMode: e
|
|
1395
|
+
}) => c("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
1396
|
+
"focus:outline-focus-dark": e === "dark",
|
|
1397
|
+
"focus:outline-focus-light": e === "light",
|
|
1398
|
+
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
1399
|
+
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
1400
|
+
}), sn = ({
|
|
1401
|
+
noBorder: e,
|
|
1402
|
+
error: t
|
|
1403
|
+
}) => c("border-2", {
|
|
1404
|
+
"border-border-dark": !e && !t,
|
|
1405
|
+
"focus:border-border-dark": !e && t,
|
|
1406
|
+
"border-border-error-dark": !e && t,
|
|
1407
|
+
"border-transparent": e
|
|
1408
|
+
}), cn = ({
|
|
1409
|
+
disabled: e,
|
|
1410
|
+
raw: t,
|
|
1411
|
+
error: r,
|
|
1412
|
+
mode: a,
|
|
1413
|
+
leftElement: n,
|
|
1414
|
+
rightElement: o
|
|
1415
|
+
}) => {
|
|
1416
|
+
if (t)
|
|
1417
|
+
return "";
|
|
1418
|
+
if (e)
|
|
1419
|
+
return c(
|
|
1420
|
+
"transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
|
|
1421
|
+
{
|
|
1422
|
+
"translate-x-[12px]": o === !0 && !n || !o && !n
|
|
1423
|
+
}
|
|
1424
|
+
);
|
|
1425
|
+
if (!r)
|
|
1426
|
+
return c(
|
|
1427
|
+
"absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
|
|
1428
|
+
{
|
|
1429
|
+
"translate-x-[12px]": o === !0 && !n || !o && !n,
|
|
1430
|
+
"text-copy-medium": a === "dark",
|
|
1431
|
+
"text-copy-dark": a === "light",
|
|
1432
|
+
"text-copy-dark dark:text-copy-medium": a === "system",
|
|
1433
|
+
"text-copy-medium dark:text-copy-dark": a === "alt-system"
|
|
1434
|
+
}
|
|
1435
|
+
);
|
|
1436
|
+
if (r)
|
|
1437
|
+
return c(
|
|
1438
|
+
"absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
|
|
1439
|
+
{
|
|
1440
|
+
"translate-x-[12px]": o === !0 && !n || !o && !n,
|
|
1441
|
+
"text-copy-medium": a === "dark",
|
|
1442
|
+
"text-copy-error-dark": a === "light",
|
|
1443
|
+
"text-copy-error-dark dark:text-copy-error-light": a === "system",
|
|
1444
|
+
"text-copy-medium dark:text-copy-error-dark": a === "alt-system"
|
|
1445
|
+
}
|
|
1446
|
+
);
|
|
1447
|
+
}, ln = ({
|
|
1448
|
+
error: e,
|
|
1449
|
+
raw: t,
|
|
1450
|
+
mode: r,
|
|
1451
|
+
disabled: a
|
|
1452
|
+
}) => {
|
|
1453
|
+
if (t)
|
|
1454
|
+
return "";
|
|
1455
|
+
if (a)
|
|
1456
|
+
return c(
|
|
1457
|
+
Je,
|
|
1458
|
+
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
1459
|
+
);
|
|
1460
|
+
if (!e)
|
|
1461
|
+
return c(Je, "absolute px-2 font-medium", {
|
|
1462
|
+
"text-copy-medium": r === "dark",
|
|
1463
|
+
"text-copy-dark": r === "light",
|
|
1464
|
+
"text-copy-dark dark:text-copy-medium": r === "system",
|
|
1465
|
+
"text-copy-medium dark:text-copy-dark": r === "alt-system"
|
|
1466
|
+
});
|
|
1467
|
+
if (e)
|
|
1468
|
+
return c(Je, "absolute px-2 font-medium", {
|
|
1469
|
+
"text-copy-error-light": r === "dark",
|
|
1470
|
+
"text-copy-error-dark": r === "light",
|
|
1471
|
+
"text-copy-error-dark dark:text-copy-error-light": r === "system",
|
|
1472
|
+
"dark:text-copy-error-dark text-copy-error-light": r === "alt-system"
|
|
1473
|
+
});
|
|
1474
|
+
}, dn = ({
|
|
1475
|
+
className: e,
|
|
1476
|
+
textAreaClassName: t,
|
|
1477
|
+
raw: r,
|
|
1478
|
+
focusMode: a,
|
|
1479
|
+
disabled: n,
|
|
1480
|
+
noBorder: o,
|
|
1481
|
+
error: s,
|
|
1482
|
+
mode: i,
|
|
1483
|
+
leftElement: l,
|
|
1484
|
+
rightElement: h
|
|
1485
|
+
}) => {
|
|
1486
|
+
const f = r ? e : c(
|
|
1487
|
+
"relative flex w-full flex-col justify-center",
|
|
1488
|
+
Ga,
|
|
1489
|
+
e
|
|
1490
|
+
), g = r ? c(t) : c(
|
|
1491
|
+
hr,
|
|
1492
|
+
t,
|
|
1493
|
+
an(),
|
|
1494
|
+
nn({ mode: i }),
|
|
1495
|
+
on({ focusMode: a }),
|
|
1496
|
+
sn({
|
|
1497
|
+
noBorder: o,
|
|
1498
|
+
error: s
|
|
1499
|
+
}),
|
|
1500
|
+
{
|
|
1501
|
+
"disabled:cursor-not-allowed disabled:opacity-50": n
|
|
1502
|
+
}
|
|
1503
|
+
), u = r ? void 0 : "sr-only", m = cn({
|
|
1504
|
+
disabled: n,
|
|
1505
|
+
raw: r,
|
|
1506
|
+
error: s,
|
|
1507
|
+
mode: i,
|
|
1508
|
+
rightElement: h,
|
|
1509
|
+
leftElement: l
|
|
1510
|
+
}), y = ln({
|
|
1511
|
+
error: s,
|
|
1512
|
+
raw: r,
|
|
1513
|
+
mode: i,
|
|
1514
|
+
disabled: n
|
|
1515
|
+
}), b = r ? void 0 : c(Wa, "absolute"), k = r ? void 0 : c(ja, "absolute");
|
|
1516
|
+
return {
|
|
1517
|
+
wrapper: f,
|
|
1518
|
+
textArea: g,
|
|
1519
|
+
accessibleLabel: u,
|
|
1520
|
+
visibleLabel: m,
|
|
1521
|
+
helperText: y,
|
|
1522
|
+
rightElement: b,
|
|
1523
|
+
leftElement: k
|
|
1524
|
+
};
|
|
1525
|
+
}, un = ({
|
|
1526
|
+
scrollHeight: e,
|
|
1527
|
+
currentHeight: t,
|
|
1528
|
+
currentLabelOffset: r = 0,
|
|
1529
|
+
currentHelperTextOffset: a = 0
|
|
1530
|
+
}) => {
|
|
1531
|
+
let n, o;
|
|
1532
|
+
if (e > 0 && e !== t) {
|
|
1533
|
+
const s = e - t, i = Math.abs(s / 24);
|
|
1534
|
+
n = r + -1 * Math.sign(s) * (12 * i), o = a + Math.sign(s) * (12 * i);
|
|
1535
|
+
}
|
|
1536
|
+
return {
|
|
1537
|
+
labelOffset: n,
|
|
1538
|
+
helperTextOffset: o,
|
|
1539
|
+
scrollHeight: e
|
|
1540
|
+
};
|
|
1541
|
+
}, yr = $.forwardRef(
|
|
1542
|
+
({
|
|
1543
|
+
id: e,
|
|
1544
|
+
name: t,
|
|
1545
|
+
label: r,
|
|
1546
|
+
error: a = !1,
|
|
1547
|
+
raw: n = !1,
|
|
1548
|
+
className: o,
|
|
1549
|
+
textAreaClassName: s,
|
|
1550
|
+
mode: i = "system",
|
|
1551
|
+
focusMode: l = "system",
|
|
1552
|
+
value: h,
|
|
1553
|
+
defaultValue: f,
|
|
1554
|
+
disabled: g = !1,
|
|
1555
|
+
noBorder: u = !1,
|
|
1556
|
+
labelId: m,
|
|
1557
|
+
helperText: y = "",
|
|
1558
|
+
helperTextOnFocus: b = !1,
|
|
1559
|
+
rightElement: k,
|
|
1560
|
+
leftElement: p,
|
|
1561
|
+
onChange: N,
|
|
1562
|
+
onFocus: A,
|
|
1563
|
+
onBlur: R,
|
|
1564
|
+
...E
|
|
1565
|
+
}, C) => {
|
|
1566
|
+
var ee;
|
|
1567
|
+
const x = S(null), oe = Ka([C, x]), [H, W] = Ft(), [te, B] = Ft(), j = S(80), me = S(-25), q = S(null), ke = S(30), K = S(null), se = Xa({ id: e, prefix: `${hr}-` }), [Ne, ie] = G(0), [re, pe] = G(0), [Re, ge] = G(
|
|
1568
|
+
!!(!b && y)
|
|
1569
|
+
), Ce = `${t} error, ${y}`, J = dn({
|
|
1570
|
+
className: o,
|
|
1571
|
+
textAreaClassName: s,
|
|
1572
|
+
error: a,
|
|
1573
|
+
raw: n,
|
|
1574
|
+
focusMode: l,
|
|
1575
|
+
disabled: g,
|
|
1576
|
+
noBorder: u,
|
|
1577
|
+
mode: i,
|
|
1578
|
+
rightElement: !!k,
|
|
1579
|
+
leftElement: !!p
|
|
1580
|
+
}), [Y, We] = Ya({
|
|
1581
|
+
value: h,
|
|
1582
|
+
initialControlledDelay: 20,
|
|
1583
|
+
defaultValue: f,
|
|
1584
|
+
onChange: (v) => {
|
|
1585
|
+
N && N({
|
|
1586
|
+
target: {
|
|
1587
|
+
value: v
|
|
1588
|
+
}
|
|
1589
|
+
});
|
|
1590
|
+
}
|
|
1591
|
+
}), he = (v) => {
|
|
1592
|
+
We(v.target.value);
|
|
1593
|
+
}, Ie = (v) => {
|
|
1594
|
+
b && y && ge(!0), A && A(v);
|
|
1595
|
+
}, w = (v) => {
|
|
1596
|
+
b && y && !Y && ge(!1), R && R(v);
|
|
1597
|
+
};
|
|
1598
|
+
return fe(() => {
|
|
1599
|
+
W && W.width && ie(W.width + 18 + 10);
|
|
1600
|
+
}, [W]), fe(() => {
|
|
1601
|
+
B && B.width && pe(B.width + 18 + 10);
|
|
1602
|
+
}, [B]), fe(() => {
|
|
1603
|
+
n || x && x.current && Y !== void 0 && (x.current.style.height = "inherit", x.current.style.height = x.current.scrollHeight + "px");
|
|
1604
|
+
}, [Y, n]), fe(() => {
|
|
1605
|
+
n || setTimeout(() => {
|
|
1606
|
+
var v;
|
|
1607
|
+
(v = q == null ? void 0 : q.current) == null || v.style.setProperty(
|
|
1608
|
+
"--av-text-area-wrapper-transition",
|
|
1609
|
+
Y ? "none" : "all 0.2s ease-out"
|
|
1610
|
+
);
|
|
1611
|
+
}, 0);
|
|
1612
|
+
}, [Y, n]), fe(() => {
|
|
1613
|
+
var v, O;
|
|
1614
|
+
if (!n && x && x.current && Y !== void 0) {
|
|
1615
|
+
const { labelOffset: T, helperTextOffset: U, scrollHeight: ce } = un({
|
|
1616
|
+
scrollHeight: x.current.scrollHeight,
|
|
1617
|
+
currentHeight: j.current,
|
|
1618
|
+
currentLabelOffset: me.current,
|
|
1619
|
+
currentHelperTextOffset: ke.current
|
|
1620
|
+
});
|
|
1621
|
+
T && (me.current = T, (v = q == null ? void 0 : q.current) == null || v.style.setProperty(
|
|
1622
|
+
"--av-text-area-label",
|
|
1623
|
+
`${T}px`
|
|
1624
|
+
)), U && (ke.current = U, (O = K == null ? void 0 : K.current) == null || O.style.setProperty(
|
|
1625
|
+
"--av-text-area-helper-text",
|
|
1626
|
+
`${U}px`
|
|
1627
|
+
)), j.current = ce || j.current;
|
|
1628
|
+
}
|
|
1629
|
+
}, [Y, n]), B.width > 0 && ((ee = q == null ? void 0 : q.current) == null || ee.style.setProperty(
|
|
1630
|
+
"--tw-translate-x",
|
|
1631
|
+
`${12 + B.width + 5}px`
|
|
1632
|
+
)), /* @__PURE__ */ I("div", { className: J.wrapper, children: [
|
|
1633
|
+
/* @__PURE__ */ d(
|
|
1634
|
+
"label",
|
|
1635
|
+
{
|
|
1636
|
+
htmlFor: se,
|
|
1637
|
+
id: m,
|
|
1638
|
+
className: J.accessibleLabel,
|
|
1639
|
+
children: r
|
|
1640
|
+
}
|
|
1641
|
+
),
|
|
1642
|
+
p && /* @__PURE__ */ d(
|
|
1643
|
+
"div",
|
|
1644
|
+
{
|
|
1645
|
+
ref: te,
|
|
1646
|
+
className: J.leftElement,
|
|
1647
|
+
children: p
|
|
1648
|
+
}
|
|
1649
|
+
),
|
|
1650
|
+
/* @__PURE__ */ d(
|
|
1651
|
+
"textarea",
|
|
1652
|
+
{
|
|
1653
|
+
ref: oe,
|
|
1654
|
+
id: se,
|
|
1655
|
+
name: t,
|
|
1656
|
+
disabled: g,
|
|
1657
|
+
placeholder: n ? void 0 : " ",
|
|
1658
|
+
className: J.textArea,
|
|
1659
|
+
rows: 1,
|
|
1660
|
+
...y && { "aria-describedby": `${se}-helper` },
|
|
1661
|
+
...a && { "aria-invalid": "true" },
|
|
1662
|
+
...k && !p && !n && { style: { paddingRight: Ne } },
|
|
1663
|
+
...p && !k && !n && { style: { paddingLeft: re } },
|
|
1664
|
+
...k && p && !n && {
|
|
1665
|
+
style: {
|
|
1666
|
+
paddingRight: Ne,
|
|
1667
|
+
paddingLeft: re
|
|
1668
|
+
}
|
|
1669
|
+
},
|
|
1670
|
+
value: Y,
|
|
1671
|
+
onChange: he,
|
|
1672
|
+
onFocus: Ie,
|
|
1673
|
+
onBlur: w,
|
|
1674
|
+
...E
|
|
1675
|
+
}
|
|
1676
|
+
),
|
|
1677
|
+
!n && /* @__PURE__ */ d(
|
|
1678
|
+
"label",
|
|
1679
|
+
{
|
|
1680
|
+
ref: q,
|
|
1681
|
+
"aria-hidden": !0,
|
|
1682
|
+
htmlFor: se,
|
|
1683
|
+
className: `${J.visibleLabel}`,
|
|
1684
|
+
children: r
|
|
1685
|
+
}
|
|
1686
|
+
),
|
|
1687
|
+
Re && /* @__PURE__ */ d(
|
|
1688
|
+
"div",
|
|
1689
|
+
{
|
|
1690
|
+
ref: K,
|
|
1691
|
+
id: `${se}-helper`,
|
|
1692
|
+
className: J.helperText,
|
|
1693
|
+
children: y
|
|
1694
|
+
}
|
|
1695
|
+
),
|
|
1696
|
+
k && /* @__PURE__ */ d(
|
|
1697
|
+
"div",
|
|
1698
|
+
{
|
|
1699
|
+
ref: H,
|
|
1700
|
+
className: J.rightElement,
|
|
1701
|
+
children: k
|
|
1702
|
+
}
|
|
1703
|
+
),
|
|
1704
|
+
a && y && /* @__PURE__ */ d(rn, { politeness: "polite", clearAnnouncementDelay: 500, children: Ce })
|
|
1705
|
+
] });
|
|
1706
|
+
}
|
|
1707
|
+
);
|
|
1708
|
+
yr.displayName = "TextArea";
|
|
1709
|
+
const le = {
|
|
1710
|
+
GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
|
|
1711
|
+
location(latitude: $latitude, longitude: $longitude) {
|
|
1712
|
+
country
|
|
1713
|
+
state
|
|
1714
|
+
city
|
|
1715
|
+
displayName
|
|
1716
|
+
}
|
|
1717
|
+
}`,
|
|
1718
|
+
GET_CHATS: `query GetChats(
|
|
1719
|
+
$user: String!,
|
|
1720
|
+
$searchString: String,
|
|
1721
|
+
$limit: Float,
|
|
1722
|
+
$direction: String,
|
|
1723
|
+
$truncateSize: Float) {
|
|
1724
|
+
chats(
|
|
1725
|
+
user: $user,
|
|
1726
|
+
searchString: $searchString,
|
|
1727
|
+
limit: $limit,
|
|
1728
|
+
direction: $direction,
|
|
1729
|
+
truncateSize: $truncateSize) {
|
|
1730
|
+
timestamp
|
|
1731
|
+
id
|
|
1732
|
+
model
|
|
1733
|
+
messages {
|
|
1734
|
+
content
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
}`,
|
|
1738
|
+
GET_CHATS_STATS: `query GetChatsStats($user: String!) {
|
|
1739
|
+
chatsStats(user: $user) {
|
|
1740
|
+
totalChats
|
|
1741
|
+
averageProcessingTimes
|
|
1742
|
+
}
|
|
1743
|
+
}`,
|
|
1744
|
+
GET_CHAT: `query GetChatById($id: String!) {
|
|
1745
|
+
chatById(id: $id) {
|
|
1746
|
+
model
|
|
1747
|
+
usage
|
|
1748
|
+
messages {
|
|
1749
|
+
content
|
|
1750
|
+
role
|
|
1751
|
+
name
|
|
1752
|
+
processingTime
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
}`,
|
|
1756
|
+
DELETE_CHAT: `mutation DeleteChat(
|
|
1757
|
+
$id: String!,
|
|
1758
|
+
$userId: String!) {
|
|
1759
|
+
deleteChat(
|
|
1760
|
+
id: $id,
|
|
1761
|
+
user: $userId) {
|
|
1762
|
+
id
|
|
1763
|
+
}
|
|
1764
|
+
}`,
|
|
1765
|
+
GET_SERVER_CAPABILITIES: `query GetServerCapabilities {
|
|
1766
|
+
getServerCapabilities {
|
|
1767
|
+
version
|
|
1768
|
+
models
|
|
1769
|
+
plugins
|
|
1770
|
+
engines
|
|
1771
|
+
runningMode
|
|
1772
|
+
}
|
|
1773
|
+
}`,
|
|
1774
|
+
GET_USER_PREFERENCES: `query GetUserPreferences($user: String!) {
|
|
1775
|
+
getUserPreferences(user: $user) {
|
|
1776
|
+
instructions
|
|
1777
|
+
location
|
|
1778
|
+
engine
|
|
1779
|
+
tags {
|
|
1780
|
+
enabled
|
|
1781
|
+
slot
|
|
1782
|
+
label
|
|
1783
|
+
content
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
}`,
|
|
1787
|
+
SET_USER_PREFERENCES: `mutation SetUserPreferences(
|
|
1788
|
+
$user: String!,
|
|
1789
|
+
$instructions: String,
|
|
1790
|
+
$location: String,
|
|
1791
|
+
$engine: String,
|
|
1792
|
+
$tags: [TagIn]) {
|
|
1793
|
+
setUserPreferences(
|
|
1794
|
+
user: $user,
|
|
1795
|
+
instructions: $instructions,
|
|
1796
|
+
location: $location,
|
|
1797
|
+
engine: $engine,
|
|
1798
|
+
tags: $tags)
|
|
1799
|
+
}`
|
|
1800
|
+
}, ze = {
|
|
1801
|
+
GET_LOCATION: {
|
|
1802
|
+
schema: le.GET_LOCATION,
|
|
1803
|
+
method: "location"
|
|
1804
|
+
},
|
|
1805
|
+
GET_CHATS: {
|
|
1806
|
+
schema: le.GET_CHATS,
|
|
1807
|
+
method: "chats"
|
|
1808
|
+
},
|
|
1809
|
+
GET_CHATS_STATS: {
|
|
1810
|
+
schema: le.GET_CHATS_STATS,
|
|
1811
|
+
method: "chatsStats"
|
|
1812
|
+
},
|
|
1813
|
+
GET_CHAT: {
|
|
1814
|
+
schema: le.GET_CHAT,
|
|
1815
|
+
method: "chatById"
|
|
1816
|
+
},
|
|
1817
|
+
DELETE_CHAT: {
|
|
1818
|
+
schema: le.DELETE_CHAT,
|
|
1819
|
+
method: "deleteChat"
|
|
1820
|
+
},
|
|
1821
|
+
GET_SERVER_CAPABILITIES: {
|
|
1822
|
+
schema: le.GET_SERVER_CAPABILITIES,
|
|
1823
|
+
method: "getServerCapabilities"
|
|
1824
|
+
},
|
|
1825
|
+
GET_USER_PREFERENCES: {
|
|
1826
|
+
schema: le.GET_USER_PREFERENCES,
|
|
1827
|
+
method: "getUserPreferences"
|
|
1828
|
+
},
|
|
1829
|
+
SET_USER_PREFERENCES: {
|
|
1830
|
+
schema: le.SET_USER_PREFERENCES,
|
|
1831
|
+
method: "setUserPreferences"
|
|
1832
|
+
}
|
|
1833
|
+
}, br = process.env.PUBLIC_SASSY_API_SERVER_URL, mn = async ({
|
|
1834
|
+
query: e,
|
|
1835
|
+
data: t,
|
|
1836
|
+
headers: r = {}
|
|
1837
|
+
}) => await fetch(`${br}/graphql`, {
|
|
1838
|
+
method: "POST",
|
|
1839
|
+
credentials: "include",
|
|
1840
|
+
headers: {
|
|
1841
|
+
...r,
|
|
1842
|
+
"Content-Type": "application/json",
|
|
1843
|
+
Accept: "application/json"
|
|
1844
|
+
},
|
|
1845
|
+
body: JSON.stringify({
|
|
1846
|
+
query: e,
|
|
1847
|
+
variables: t
|
|
1848
|
+
})
|
|
1849
|
+
}), gn = async ({
|
|
1850
|
+
accessToken: e,
|
|
1851
|
+
type: t,
|
|
1852
|
+
params: r = {}
|
|
1853
|
+
}) => {
|
|
1854
|
+
const a = t != null && t.data ? t.data(r) : r;
|
|
1855
|
+
try {
|
|
1856
|
+
const n = `Bearer ${e}`, o = await mn({
|
|
1857
|
+
headers: {
|
|
1858
|
+
authorization: n
|
|
1859
|
+
},
|
|
1860
|
+
query: t.schema,
|
|
1861
|
+
data: a
|
|
1862
|
+
});
|
|
1863
|
+
if (o.status !== 200)
|
|
1864
|
+
return { status: o.status, data: [] };
|
|
1865
|
+
const { data: s, errors: i } = await o.json();
|
|
1866
|
+
return {
|
|
1867
|
+
status: o.status,
|
|
1868
|
+
data: s[t.method],
|
|
1869
|
+
errors: i
|
|
1870
|
+
};
|
|
1871
|
+
} catch (n) {
|
|
1872
|
+
return console.error(n), { status: 500, data: [] };
|
|
1873
|
+
}
|
|
1874
|
+
}, hn = async ({
|
|
1875
|
+
accessToken: e,
|
|
1876
|
+
name: t,
|
|
1877
|
+
data: r,
|
|
1878
|
+
method: a = "POST"
|
|
1879
|
+
}) => {
|
|
1880
|
+
const n = `Bearer ${e}`;
|
|
1881
|
+
return await fetch(`${br}/api/${t}`, {
|
|
1882
|
+
method: a,
|
|
1883
|
+
credentials: "include",
|
|
1884
|
+
headers: {
|
|
1885
|
+
"Content-Type": "application/json",
|
|
1886
|
+
authorization: n
|
|
1887
|
+
},
|
|
1888
|
+
body: JSON.stringify(r)
|
|
1889
|
+
});
|
|
1890
|
+
}, fn = ({
|
|
1891
|
+
mode: e = "light",
|
|
1892
|
+
focusMode: t = "light",
|
|
1893
|
+
radius: r = "small"
|
|
1894
|
+
}) => {
|
|
1895
|
+
const { state: a, dispatch: n } = P(ve), o = S(null), s = S(!1), i = (l) => {
|
|
1896
|
+
l.preventDefault(), n({
|
|
1897
|
+
type: rr
|
|
1898
|
+
});
|
|
1899
|
+
};
|
|
1900
|
+
return L(() => {
|
|
1901
|
+
var l;
|
|
1902
|
+
(a == null ? void 0 : a.streaming) === !0 && !s.current && o.current && (s.current = !0, o.current.focus()), (a == null ? void 0 : a.streaming) === !1 && (s.current = !1, (l = o.current) == null || l.blur());
|
|
1903
|
+
}, [a]), /* @__PURE__ */ d(
|
|
1904
|
+
ir,
|
|
1905
|
+
{
|
|
1906
|
+
noBorder: !0,
|
|
1907
|
+
radius: r,
|
|
1908
|
+
mode: e,
|
|
1909
|
+
focusMode: t,
|
|
1910
|
+
ref: o,
|
|
1911
|
+
onClick: i,
|
|
1912
|
+
children: a != null && a.streaming ? /* @__PURE__ */ d(ra, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ d(ta, { size: "size-4", monotone: !0 })
|
|
1913
|
+
}
|
|
1914
|
+
);
|
|
1915
|
+
}, $e = (e, t) => {
|
|
1916
|
+
e({
|
|
1917
|
+
type: nr,
|
|
1918
|
+
payload: {
|
|
1919
|
+
streaming: t
|
|
1920
|
+
}
|
|
1921
|
+
});
|
|
1922
|
+
}, Wt = (e) => {
|
|
1923
|
+
$e(e, !1), e({
|
|
1924
|
+
type: xe,
|
|
1925
|
+
payload: {
|
|
1926
|
+
message: {
|
|
1927
|
+
role: vt,
|
|
1928
|
+
content: Hr
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
});
|
|
1932
|
+
}, pn = () => {
|
|
1933
|
+
const { state: e, dispatch: t } = P(ve), { state: r, dispatch: a } = P(wt), [n, o] = G(""), { getAccessToken: s, user: i } = Me(), l = S(null), h = S(
|
|
1934
|
+
null
|
|
1935
|
+
);
|
|
1936
|
+
L(() => {
|
|
1937
|
+
(async () => {
|
|
1938
|
+
var u;
|
|
1939
|
+
if (!e || e.messages.length === 0) {
|
|
1940
|
+
(u = h == null ? void 0 : h.current) == null || u.cancel();
|
|
1941
|
+
return;
|
|
1942
|
+
}
|
|
1943
|
+
const g = e.messages[e.messages.length - 1];
|
|
1944
|
+
if (!(e.messages.length === 0 || g.message.role === we || g.message.role === Vr || g.message.role === vt || g.message.role === zr))
|
|
1945
|
+
try {
|
|
1946
|
+
const m = await hn({
|
|
1947
|
+
accessToken: await s(),
|
|
1948
|
+
name: "generate",
|
|
1949
|
+
data: {
|
|
1950
|
+
messages: e.messages,
|
|
1951
|
+
model: e.engine || Se,
|
|
1952
|
+
user: (i == null ? void 0 : i.username) || "",
|
|
1953
|
+
id: e.id,
|
|
1954
|
+
usage: e.usage
|
|
1955
|
+
}
|
|
1956
|
+
});
|
|
1957
|
+
if (m && m.ok) {
|
|
1958
|
+
const y = xt();
|
|
1959
|
+
h.current = m.body.getReader();
|
|
1960
|
+
const b = new TextDecoder();
|
|
1961
|
+
for (; ; ) {
|
|
1962
|
+
$e(t, !0);
|
|
1963
|
+
const { done: k, value: p } = await h.current.read();
|
|
1964
|
+
if (k) {
|
|
1965
|
+
$e(t, !1);
|
|
1966
|
+
break;
|
|
1967
|
+
}
|
|
1968
|
+
const N = b.decode(p, { stream: !0 }), A = N.indexOf(Bt);
|
|
1969
|
+
if (A !== -1) {
|
|
1970
|
+
const R = N.substring(0, A), E = JSON.parse(
|
|
1971
|
+
N.substring(A + Bt.length)
|
|
1972
|
+
);
|
|
1973
|
+
t({
|
|
1974
|
+
type: ar,
|
|
1975
|
+
payload: {
|
|
1976
|
+
model: E.model,
|
|
1977
|
+
usage: E.usage
|
|
1978
|
+
}
|
|
1979
|
+
}), t({
|
|
1980
|
+
type: xe,
|
|
1981
|
+
payload: {
|
|
1982
|
+
message: {
|
|
1983
|
+
content: R,
|
|
1984
|
+
role: we,
|
|
1985
|
+
messageId: y,
|
|
1986
|
+
processingTime: E.processingTime,
|
|
1987
|
+
name: E.name
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
}), $e(t, !1);
|
|
1991
|
+
break;
|
|
1992
|
+
} else
|
|
1993
|
+
t({
|
|
1994
|
+
type: xe,
|
|
1995
|
+
payload: {
|
|
1996
|
+
message: {
|
|
1997
|
+
content: N,
|
|
1998
|
+
role: we,
|
|
1999
|
+
messageId: y
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
});
|
|
2003
|
+
}
|
|
2004
|
+
} else
|
|
2005
|
+
Wt(t);
|
|
2006
|
+
} catch (m) {
|
|
2007
|
+
console.error(m), Wt(t);
|
|
2008
|
+
}
|
|
2009
|
+
})();
|
|
2010
|
+
}, [e == null ? void 0 : e.messages]);
|
|
2011
|
+
const f = async (g) => {
|
|
2012
|
+
g.preventDefault(), t({
|
|
2013
|
+
type: xe,
|
|
2014
|
+
payload: {
|
|
2015
|
+
message: {
|
|
2016
|
+
role: nt,
|
|
2017
|
+
content: n
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
}), o("");
|
|
2021
|
+
};
|
|
2022
|
+
return L(() => {
|
|
2023
|
+
if (r.prompt !== "") {
|
|
2024
|
+
const g = r.prompt.endsWith(":") && !r.prompt.endsWith(": ") ? r.prompt + " " : r.prompt;
|
|
2025
|
+
g.indexOf($t) !== -1 ? navigator.clipboard.readText().then((m) => {
|
|
2026
|
+
o(g.replace($t, m));
|
|
2027
|
+
}) : o(g), l.current && l.current.focus(), a({
|
|
2028
|
+
type: or
|
|
2029
|
+
});
|
|
2030
|
+
}
|
|
2031
|
+
}, [r, a]), L(() => {
|
|
2032
|
+
e && e.usage === 0 && e.messages.length === 0 && l.current && l.current.focus();
|
|
2033
|
+
}, [e]), /* @__PURE__ */ d(yt, { children: /* @__PURE__ */ d("form", { className: "mt-2", onSubmit: f, children: /* @__PURE__ */ d(
|
|
2034
|
+
yr,
|
|
2035
|
+
{
|
|
2036
|
+
mode: "dark",
|
|
2037
|
+
focusMode: "light",
|
|
2038
|
+
ref: l,
|
|
2039
|
+
name: "chat-input",
|
|
2040
|
+
label: Ur,
|
|
2041
|
+
helperText: "Press ENTER to add a new line",
|
|
2042
|
+
helperTextOnFocus: !0,
|
|
2043
|
+
required: !0,
|
|
2044
|
+
value: n,
|
|
2045
|
+
onChange: (g) => o(g.target.value),
|
|
2046
|
+
onKeyDown: la([["mod+Enter", f]]),
|
|
2047
|
+
leftElement: /* @__PURE__ */ d(fn, {}),
|
|
2048
|
+
rightElement: /* @__PURE__ */ d(
|
|
2049
|
+
cr,
|
|
2050
|
+
{
|
|
2051
|
+
disabled: e == null ? void 0 : e.streaming,
|
|
2052
|
+
noBorder: !0,
|
|
2053
|
+
type: "submit",
|
|
2054
|
+
mode: "light",
|
|
2055
|
+
focusMode: "light",
|
|
2056
|
+
children: Pr
|
|
2057
|
+
}
|
|
2058
|
+
)
|
|
2059
|
+
}
|
|
2060
|
+
) }) });
|
|
2061
|
+
};
|
|
2062
|
+
var Ae = { exports: {} }, Ye = {};
|
|
2063
|
+
/**
|
|
2064
|
+
* @license React
|
|
2065
|
+
* use-sync-external-store-shim.production.js
|
|
2066
|
+
*
|
|
2067
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2068
|
+
*
|
|
2069
|
+
* This source code is licensed under the MIT license found in the
|
|
2070
|
+
* LICENSE file in the root directory of this source tree.
|
|
2071
|
+
*/
|
|
2072
|
+
var jt;
|
|
2073
|
+
function yn() {
|
|
2074
|
+
if (jt) return Ye;
|
|
2075
|
+
jt = 1;
|
|
2076
|
+
var e = $;
|
|
2077
|
+
function t(g, u) {
|
|
2078
|
+
return g === u && (g !== 0 || 1 / g === 1 / u) || g !== g && u !== u;
|
|
2079
|
+
}
|
|
2080
|
+
var r = typeof Object.is == "function" ? Object.is : t, a = e.useState, n = e.useEffect, o = e.useLayoutEffect, s = e.useDebugValue;
|
|
2081
|
+
function i(g, u) {
|
|
2082
|
+
var m = u(), y = a({ inst: { value: m, getSnapshot: u } }), b = y[0].inst, k = y[1];
|
|
2083
|
+
return o(
|
|
2084
|
+
function() {
|
|
2085
|
+
b.value = m, b.getSnapshot = u, l(b) && k({ inst: b });
|
|
2086
|
+
},
|
|
2087
|
+
[g, m, u]
|
|
2088
|
+
), n(
|
|
2089
|
+
function() {
|
|
2090
|
+
return l(b) && k({ inst: b }), g(function() {
|
|
2091
|
+
l(b) && k({ inst: b });
|
|
2092
|
+
});
|
|
2093
|
+
},
|
|
2094
|
+
[g]
|
|
2095
|
+
), s(m), m;
|
|
2096
|
+
}
|
|
2097
|
+
function l(g) {
|
|
2098
|
+
var u = g.getSnapshot;
|
|
2099
|
+
g = g.value;
|
|
2100
|
+
try {
|
|
2101
|
+
var m = u();
|
|
2102
|
+
return !r(g, m);
|
|
2103
|
+
} catch {
|
|
2104
|
+
return !0;
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
function h(g, u) {
|
|
2108
|
+
return u();
|
|
2109
|
+
}
|
|
2110
|
+
var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? h : i;
|
|
2111
|
+
return Ye.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : f, Ye;
|
|
2112
|
+
}
|
|
2113
|
+
var Xe = {};
|
|
2114
|
+
/**
|
|
2115
|
+
* @license React
|
|
2116
|
+
* use-sync-external-store-shim.development.js
|
|
2117
|
+
*
|
|
2118
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2119
|
+
*
|
|
2120
|
+
* This source code is licensed under the MIT license found in the
|
|
2121
|
+
* LICENSE file in the root directory of this source tree.
|
|
2122
|
+
*/
|
|
2123
|
+
var qt;
|
|
2124
|
+
function bn() {
|
|
2125
|
+
return qt || (qt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
2126
|
+
function e(m, y) {
|
|
2127
|
+
return m === y && (m !== 0 || 1 / m === 1 / y) || m !== m && y !== y;
|
|
2128
|
+
}
|
|
2129
|
+
function t(m, y) {
|
|
2130
|
+
f || n.startTransition === void 0 || (f = !0, console.error(
|
|
2131
|
+
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
2132
|
+
));
|
|
2133
|
+
var b = y();
|
|
2134
|
+
if (!g) {
|
|
2135
|
+
var k = y();
|
|
2136
|
+
o(b, k) || (console.error(
|
|
2137
|
+
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
2138
|
+
), g = !0);
|
|
2139
|
+
}
|
|
2140
|
+
k = s({
|
|
2141
|
+
inst: { value: b, getSnapshot: y }
|
|
2142
|
+
});
|
|
2143
|
+
var p = k[0].inst, N = k[1];
|
|
2144
|
+
return l(
|
|
2145
|
+
function() {
|
|
2146
|
+
p.value = b, p.getSnapshot = y, r(p) && N({ inst: p });
|
|
2147
|
+
},
|
|
2148
|
+
[m, b, y]
|
|
2149
|
+
), i(
|
|
2150
|
+
function() {
|
|
2151
|
+
return r(p) && N({ inst: p }), m(function() {
|
|
2152
|
+
r(p) && N({ inst: p });
|
|
2153
|
+
});
|
|
2154
|
+
},
|
|
2155
|
+
[m]
|
|
2156
|
+
), h(b), b;
|
|
2157
|
+
}
|
|
2158
|
+
function r(m) {
|
|
2159
|
+
var y = m.getSnapshot;
|
|
2160
|
+
m = m.value;
|
|
2161
|
+
try {
|
|
2162
|
+
var b = y();
|
|
2163
|
+
return !o(m, b);
|
|
2164
|
+
} catch {
|
|
2165
|
+
return !0;
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
function a(m, y) {
|
|
2169
|
+
return y();
|
|
2170
|
+
}
|
|
2171
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
2172
|
+
var n = $, o = typeof Object.is == "function" ? Object.is : e, s = n.useState, i = n.useEffect, l = n.useLayoutEffect, h = n.useDebugValue, f = !1, g = !1, u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? a : t;
|
|
2173
|
+
Xe.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : u, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
2174
|
+
}()), Xe;
|
|
2175
|
+
}
|
|
2176
|
+
var Kt;
|
|
2177
|
+
function vn() {
|
|
2178
|
+
return Kt || (Kt = 1, process.env.NODE_ENV === "production" ? Ae.exports = /* @__PURE__ */ yn() : Ae.exports = /* @__PURE__ */ bn()), Ae.exports;
|
|
2179
|
+
}
|
|
2180
|
+
var kn = /* @__PURE__ */ vn(), Jt = Object.prototype.hasOwnProperty;
|
|
2181
|
+
function it(e, t) {
|
|
2182
|
+
var r, a;
|
|
2183
|
+
if (e === t) return !0;
|
|
2184
|
+
if (e && t && (r = e.constructor) === t.constructor) {
|
|
2185
|
+
if (r === Date) return e.getTime() === t.getTime();
|
|
2186
|
+
if (r === RegExp) return e.toString() === t.toString();
|
|
2187
|
+
if (r === Array) {
|
|
2188
|
+
if ((a = e.length) === t.length)
|
|
2189
|
+
for (; a-- && it(e[a], t[a]); ) ;
|
|
2190
|
+
return a === -1;
|
|
2191
|
+
}
|
|
2192
|
+
if (!r || typeof e == "object") {
|
|
2193
|
+
a = 0;
|
|
2194
|
+
for (r in e)
|
|
2195
|
+
if (Jt.call(e, r) && ++a && !Jt.call(t, r) || !(r in t) || !it(e[r], t[r])) return !1;
|
|
2196
|
+
return Object.keys(t).length === a;
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
return e !== e && t !== t;
|
|
2200
|
+
}
|
|
2201
|
+
const X = /* @__PURE__ */ new WeakMap(), de = () => {
|
|
2202
|
+
}, z = (
|
|
2203
|
+
/*#__NOINLINE__*/
|
|
2204
|
+
de()
|
|
2205
|
+
), ct = Object, _ = (e) => e === z, Q = (e) => typeof e == "function", ue = (e, t) => ({
|
|
2206
|
+
...e,
|
|
2207
|
+
...t
|
|
2208
|
+
}), vr = (e) => Q(e.then), Qe = {}, Oe = {}, St = "undefined", Ue = typeof window != St, lt = typeof document != St, _n = () => Ue && typeof window.requestAnimationFrame != St, kr = (e, t) => {
|
|
2209
|
+
const r = X.get(e);
|
|
2210
|
+
return [
|
|
2211
|
+
// Getter
|
|
2212
|
+
() => !_(t) && e.get(t) || Qe,
|
|
2213
|
+
// Setter
|
|
2214
|
+
(a) => {
|
|
2215
|
+
if (!_(t)) {
|
|
2216
|
+
const n = e.get(t);
|
|
2217
|
+
t in Oe || (Oe[t] = n), r[5](t, ue(n, a), n || Qe);
|
|
2218
|
+
}
|
|
2219
|
+
},
|
|
2220
|
+
// Subscriber
|
|
2221
|
+
r[6],
|
|
2222
|
+
// Get server cache snapshot
|
|
2223
|
+
() => !_(t) && t in Oe ? Oe[t] : !_(t) && e.get(t) || Qe
|
|
2224
|
+
];
|
|
2225
|
+
};
|
|
2226
|
+
let dt = !0;
|
|
2227
|
+
const En = () => dt, [ut, mt] = Ue && window.addEventListener ? [
|
|
2228
|
+
window.addEventListener.bind(window),
|
|
2229
|
+
window.removeEventListener.bind(window)
|
|
2230
|
+
] : [
|
|
2231
|
+
de,
|
|
2232
|
+
de
|
|
2233
|
+
], xn = () => {
|
|
2234
|
+
const e = lt && document.visibilityState;
|
|
2235
|
+
return _(e) || e !== "hidden";
|
|
2236
|
+
}, wn = (e) => (lt && document.addEventListener("visibilitychange", e), ut("focus", e), () => {
|
|
2237
|
+
lt && document.removeEventListener("visibilitychange", e), mt("focus", e);
|
|
2238
|
+
}), Sn = (e) => {
|
|
2239
|
+
const t = () => {
|
|
2240
|
+
dt = !0, e();
|
|
2241
|
+
}, r = () => {
|
|
2242
|
+
dt = !1;
|
|
2243
|
+
};
|
|
2244
|
+
return ut("online", t), ut("offline", r), () => {
|
|
2245
|
+
mt("online", t), mt("offline", r);
|
|
2246
|
+
};
|
|
2247
|
+
}, Tn = {
|
|
2248
|
+
isOnline: En,
|
|
2249
|
+
isVisible: xn
|
|
2250
|
+
}, Nn = {
|
|
2251
|
+
initFocus: wn,
|
|
2252
|
+
initReconnect: Sn
|
|
2253
|
+
}, Yt = !$.useId, Te = !Ue || "Deno" in globalThis, Rn = (e) => _n() ? window.requestAnimationFrame(e) : setTimeout(e, 1), Ze = Te ? L : fe, et = typeof navigator < "u" && navigator.connection, Xt = !Te && et && ([
|
|
2254
|
+
"slow-2g",
|
|
2255
|
+
"2g"
|
|
2256
|
+
].includes(et.effectiveType) || et.saveData), Le = /* @__PURE__ */ new WeakMap(), tt = (e, t) => ct.prototype.toString.call(e) === `[object ${t}]`;
|
|
2257
|
+
let Cn = 0;
|
|
2258
|
+
const gt = (e) => {
|
|
2259
|
+
const t = typeof e, r = tt(e, "Date"), a = tt(e, "RegExp"), n = tt(e, "Object");
|
|
2260
|
+
let o, s;
|
|
2261
|
+
if (ct(e) === e && !r && !a) {
|
|
2262
|
+
if (o = Le.get(e), o) return o;
|
|
2263
|
+
if (o = ++Cn + "~", Le.set(e, o), Array.isArray(e)) {
|
|
2264
|
+
for (o = "@", s = 0; s < e.length; s++)
|
|
2265
|
+
o += gt(e[s]) + ",";
|
|
2266
|
+
Le.set(e, o);
|
|
2267
|
+
}
|
|
2268
|
+
if (n) {
|
|
2269
|
+
o = "#";
|
|
2270
|
+
const i = ct.keys(e).sort();
|
|
2271
|
+
for (; !_(s = i.pop()); )
|
|
2272
|
+
_(e[s]) || (o += s + ":" + gt(e[s]) + ",");
|
|
2273
|
+
Le.set(e, o);
|
|
2274
|
+
}
|
|
2275
|
+
} else
|
|
2276
|
+
o = r ? e.toJSON() : t == "symbol" ? e.toString() : t == "string" ? JSON.stringify(e) : "" + e;
|
|
2277
|
+
return o;
|
|
2278
|
+
}, Pe = (e) => {
|
|
2279
|
+
if (Q(e))
|
|
2280
|
+
try {
|
|
2281
|
+
e = e();
|
|
2282
|
+
} catch {
|
|
2283
|
+
e = "";
|
|
2284
|
+
}
|
|
2285
|
+
const t = e;
|
|
2286
|
+
return e = typeof e == "string" ? e : (Array.isArray(e) ? e.length : e) ? gt(e) : "", [
|
|
2287
|
+
e,
|
|
2288
|
+
t
|
|
2289
|
+
];
|
|
2290
|
+
};
|
|
2291
|
+
let In = 0;
|
|
2292
|
+
const ht = () => ++In, _r = 0, Er = 1, xr = 2, An = 3;
|
|
2293
|
+
var _e = {
|
|
2294
|
+
__proto__: null,
|
|
2295
|
+
ERROR_REVALIDATE_EVENT: An,
|
|
2296
|
+
FOCUS_EVENT: _r,
|
|
2297
|
+
MUTATE_EVENT: xr,
|
|
2298
|
+
RECONNECT_EVENT: Er
|
|
2299
|
+
};
|
|
2300
|
+
async function wr(...e) {
|
|
2301
|
+
const [t, r, a, n] = e, o = ue({
|
|
2302
|
+
populateCache: !0,
|
|
2303
|
+
throwOnError: !0
|
|
2304
|
+
}, typeof n == "boolean" ? {
|
|
2305
|
+
revalidate: n
|
|
2306
|
+
} : n || {});
|
|
2307
|
+
let s = o.populateCache;
|
|
2308
|
+
const i = o.rollbackOnError;
|
|
2309
|
+
let l = o.optimisticData;
|
|
2310
|
+
const h = (u) => typeof i == "function" ? i(u) : i !== !1, f = o.throwOnError;
|
|
2311
|
+
if (Q(r)) {
|
|
2312
|
+
const u = r, m = [], y = t.keys();
|
|
2313
|
+
for (const b of y)
|
|
2314
|
+
// Skip the special useSWRInfinite and useSWRSubscription keys.
|
|
2315
|
+
!/^\$(inf|sub)\$/.test(b) && u(t.get(b)._k) && m.push(b);
|
|
2316
|
+
return Promise.all(m.map(g));
|
|
2317
|
+
}
|
|
2318
|
+
return g(r);
|
|
2319
|
+
async function g(u) {
|
|
2320
|
+
const [m] = Pe(u);
|
|
2321
|
+
if (!m) return;
|
|
2322
|
+
const [y, b] = kr(t, m), [k, p, N, A] = X.get(t), R = () => {
|
|
2323
|
+
const B = k[m];
|
|
2324
|
+
return (Q(o.revalidate) ? o.revalidate(y().data, u) : o.revalidate !== !1) && (delete N[m], delete A[m], B && B[0]) ? B[0](xr).then(() => y().data) : y().data;
|
|
2325
|
+
};
|
|
2326
|
+
if (e.length < 3)
|
|
2327
|
+
return R();
|
|
2328
|
+
let E = a, C;
|
|
2329
|
+
const ee = ht();
|
|
2330
|
+
p[m] = [
|
|
2331
|
+
ee,
|
|
2332
|
+
0
|
|
2333
|
+
];
|
|
2334
|
+
const x = !_(l), oe = y(), H = oe.data, W = oe._c, te = _(W) ? H : W;
|
|
2335
|
+
if (x && (l = Q(l) ? l(te, H) : l, b({
|
|
2336
|
+
data: l,
|
|
2337
|
+
_c: te
|
|
2338
|
+
})), Q(E))
|
|
2339
|
+
try {
|
|
2340
|
+
E = E(te);
|
|
2341
|
+
} catch (B) {
|
|
2342
|
+
C = B;
|
|
2343
|
+
}
|
|
2344
|
+
if (E && vr(E))
|
|
2345
|
+
if (E = await E.catch((B) => {
|
|
2346
|
+
C = B;
|
|
2347
|
+
}), ee !== p[m][0]) {
|
|
2348
|
+
if (C) throw C;
|
|
2349
|
+
return E;
|
|
2350
|
+
} else C && x && h(C) && (s = !0, b({
|
|
2351
|
+
data: te,
|
|
2352
|
+
_c: z
|
|
2353
|
+
}));
|
|
2354
|
+
if (s && !C)
|
|
2355
|
+
if (Q(s)) {
|
|
2356
|
+
const B = s(E, te);
|
|
2357
|
+
b({
|
|
2358
|
+
data: B,
|
|
2359
|
+
error: z,
|
|
2360
|
+
_c: z
|
|
2361
|
+
});
|
|
2362
|
+
} else
|
|
2363
|
+
b({
|
|
2364
|
+
data: E,
|
|
2365
|
+
error: z,
|
|
2366
|
+
_c: z
|
|
2367
|
+
});
|
|
2368
|
+
if (p[m][1] = ht(), Promise.resolve(R()).then(() => {
|
|
2369
|
+
b({
|
|
2370
|
+
_c: z
|
|
2371
|
+
});
|
|
2372
|
+
}), C) {
|
|
2373
|
+
if (f) throw C;
|
|
2374
|
+
return;
|
|
2375
|
+
}
|
|
2376
|
+
return E;
|
|
2377
|
+
}
|
|
2378
|
+
}
|
|
2379
|
+
const Qt = (e, t) => {
|
|
2380
|
+
for (const r in e)
|
|
2381
|
+
e[r][0] && e[r][0](t);
|
|
2382
|
+
}, On = (e, t) => {
|
|
2383
|
+
if (!X.has(e)) {
|
|
2384
|
+
const r = ue(Nn, t), a = {}, n = wr.bind(z, e);
|
|
2385
|
+
let o = de;
|
|
2386
|
+
const s = {}, i = (f, g) => {
|
|
2387
|
+
const u = s[f] || [];
|
|
2388
|
+
return s[f] = u, u.push(g), () => u.splice(u.indexOf(g), 1);
|
|
2389
|
+
}, l = (f, g, u) => {
|
|
2390
|
+
e.set(f, g);
|
|
2391
|
+
const m = s[f];
|
|
2392
|
+
if (m)
|
|
2393
|
+
for (const y of m)
|
|
2394
|
+
y(g, u);
|
|
2395
|
+
}, h = () => {
|
|
2396
|
+
if (!X.has(e) && (X.set(e, [
|
|
2397
|
+
a,
|
|
2398
|
+
{},
|
|
2399
|
+
{},
|
|
2400
|
+
{},
|
|
2401
|
+
n,
|
|
2402
|
+
l,
|
|
2403
|
+
i
|
|
2404
|
+
]), !Te)) {
|
|
2405
|
+
const f = r.initFocus(setTimeout.bind(z, Qt.bind(z, a, _r))), g = r.initReconnect(setTimeout.bind(z, Qt.bind(z, a, Er)));
|
|
2406
|
+
o = () => {
|
|
2407
|
+
f && f(), g && g(), X.delete(e);
|
|
2408
|
+
};
|
|
2409
|
+
}
|
|
2410
|
+
};
|
|
2411
|
+
return h(), [
|
|
2412
|
+
e,
|
|
2413
|
+
n,
|
|
2414
|
+
h,
|
|
2415
|
+
o
|
|
2416
|
+
];
|
|
2417
|
+
}
|
|
2418
|
+
return [
|
|
2419
|
+
e,
|
|
2420
|
+
X.get(e)[4]
|
|
2421
|
+
];
|
|
2422
|
+
}, Ln = (e, t, r, a, n) => {
|
|
2423
|
+
const o = r.errorRetryCount, s = n.retryCount, i = ~~((Math.random() + 0.5) * (1 << (s < 8 ? s : 8))) * r.errorRetryInterval;
|
|
2424
|
+
!_(o) && s > o || setTimeout(a, i, n);
|
|
2425
|
+
}, Bn = it, [Tt, $n] = On(/* @__PURE__ */ new Map()), Mn = ue(
|
|
2426
|
+
{
|
|
2427
|
+
// events
|
|
2428
|
+
onLoadingSlow: de,
|
|
2429
|
+
onSuccess: de,
|
|
2430
|
+
onError: de,
|
|
2431
|
+
onErrorRetry: Ln,
|
|
2432
|
+
onDiscarded: de,
|
|
2433
|
+
// switches
|
|
2434
|
+
revalidateOnFocus: !0,
|
|
2435
|
+
revalidateOnReconnect: !0,
|
|
2436
|
+
revalidateIfStale: !0,
|
|
2437
|
+
shouldRetryOnError: !0,
|
|
2438
|
+
// timeouts
|
|
2439
|
+
errorRetryInterval: Xt ? 1e4 : 5e3,
|
|
2440
|
+
focusThrottleInterval: 5 * 1e3,
|
|
2441
|
+
dedupingInterval: 2 * 1e3,
|
|
2442
|
+
loadingTimeout: Xt ? 5e3 : 3e3,
|
|
2443
|
+
// providers
|
|
2444
|
+
compare: Bn,
|
|
2445
|
+
isPaused: () => !1,
|
|
2446
|
+
cache: Tt,
|
|
2447
|
+
mutate: $n,
|
|
2448
|
+
fallback: {}
|
|
2449
|
+
},
|
|
2450
|
+
// use web preset by default
|
|
2451
|
+
Tn
|
|
2452
|
+
), Dn = (e, t) => {
|
|
2453
|
+
const r = ue(e, t);
|
|
2454
|
+
if (t) {
|
|
2455
|
+
const { use: a, fallback: n } = e, { use: o, fallback: s } = t;
|
|
2456
|
+
a && o && (r.use = a.concat(o)), n && s && (r.fallback = ue(n, s));
|
|
2457
|
+
}
|
|
2458
|
+
return r;
|
|
2459
|
+
}, Vn = Zr({}), zn = "$inf$", Sr = Ue && window.__SWR_DEVTOOLS_USE__, Un = Sr ? window.__SWR_DEVTOOLS_USE__ : [], Pn = () => {
|
|
2460
|
+
Sr && (window.__SWR_DEVTOOLS_REACT__ = $);
|
|
2461
|
+
}, Hn = (e) => Q(e[1]) ? [
|
|
2462
|
+
e[0],
|
|
2463
|
+
e[1],
|
|
2464
|
+
e[2] || {}
|
|
2465
|
+
] : [
|
|
2466
|
+
e[0],
|
|
2467
|
+
null,
|
|
2468
|
+
(e[1] === null ? e[2] : e[1]) || {}
|
|
2469
|
+
], Fn = () => ue(Mn, P(Vn)), Gn = (e, t) => {
|
|
2470
|
+
const [r, a] = Pe(e), [, , , n] = X.get(Tt);
|
|
2471
|
+
if (n[r]) return n[r];
|
|
2472
|
+
const o = t(a);
|
|
2473
|
+
return n[r] = o, o;
|
|
2474
|
+
}, Wn = (e) => (t, r, a) => e(t, r && ((...o) => {
|
|
2475
|
+
const [s] = Pe(t), [, , , i] = X.get(Tt);
|
|
2476
|
+
if (s.startsWith(zn))
|
|
2477
|
+
return r(...o);
|
|
2478
|
+
const l = i[s];
|
|
2479
|
+
return _(l) ? r(...o) : (delete i[s], l);
|
|
2480
|
+
}), a), jn = Un.concat(Wn), qn = (e) => function(...r) {
|
|
2481
|
+
const a = Fn(), [n, o, s] = Hn(r), i = Dn(a, s);
|
|
2482
|
+
let l = e;
|
|
2483
|
+
const { use: h } = i, f = (h || []).concat(jn);
|
|
2484
|
+
for (let g = f.length; g--; )
|
|
2485
|
+
l = f[g](l);
|
|
2486
|
+
return l(n, o || i.fetcher || null, i);
|
|
2487
|
+
}, Kn = (e, t, r) => {
|
|
2488
|
+
const a = t[e] || (t[e] = []);
|
|
2489
|
+
return a.push(r), () => {
|
|
2490
|
+
const n = a.indexOf(r);
|
|
2491
|
+
n >= 0 && (a[n] = a[a.length - 1], a.pop());
|
|
2492
|
+
};
|
|
2493
|
+
};
|
|
2494
|
+
Pn();
|
|
2495
|
+
const rt = $.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax
|
|
2496
|
+
// and emitting an error.
|
|
2497
|
+
// We assume that this is only for the `use(thenable)` case, not `use(context)`.
|
|
2498
|
+
// https://github.com/facebook/react/blob/aed00dacfb79d17c53218404c52b1c7aa59c4a89/packages/react-server/src/ReactFizzThenable.js#L45
|
|
2499
|
+
((e) => {
|
|
2500
|
+
switch (e.status) {
|
|
2501
|
+
case "pending":
|
|
2502
|
+
throw e;
|
|
2503
|
+
case "fulfilled":
|
|
2504
|
+
return e.value;
|
|
2505
|
+
case "rejected":
|
|
2506
|
+
throw e.reason;
|
|
2507
|
+
default:
|
|
2508
|
+
throw e.status = "pending", e.then((t) => {
|
|
2509
|
+
e.status = "fulfilled", e.value = t;
|
|
2510
|
+
}, (t) => {
|
|
2511
|
+
e.status = "rejected", e.reason = t;
|
|
2512
|
+
}), e;
|
|
2513
|
+
}
|
|
2514
|
+
}), at = {
|
|
2515
|
+
dedupe: !0
|
|
2516
|
+
}, Jn = (e, t, r) => {
|
|
2517
|
+
const { cache: a, compare: n, suspense: o, fallbackData: s, revalidateOnMount: i, revalidateIfStale: l, refreshInterval: h, refreshWhenHidden: f, refreshWhenOffline: g, keepPreviousData: u } = r, [m, y, b, k] = X.get(a), [p, N] = Pe(e), A = S(!1), R = S(!1), E = S(p), C = S(t), ee = S(r), x = () => ee.current, oe = () => x().isVisible() && x().isOnline(), [H, W, te, B] = kr(a, p), j = S({}).current, me = _(s) ? _(r.fallback) ? z : r.fallback[p] : s, q = (w, v) => {
|
|
2518
|
+
for (const O in j) {
|
|
2519
|
+
const T = O;
|
|
2520
|
+
if (T === "data") {
|
|
2521
|
+
if (!n(w[T], v[T]) && (!_(w[T]) || !n(ge, v[T])))
|
|
2522
|
+
return !1;
|
|
2523
|
+
} else if (v[T] !== w[T])
|
|
2524
|
+
return !1;
|
|
2525
|
+
}
|
|
2526
|
+
return !0;
|
|
2527
|
+
}, ke = De(() => {
|
|
2528
|
+
const w = !p || !t ? !1 : _(i) ? x().isPaused() || o ? !1 : l !== !1 : i, v = (V) => {
|
|
2529
|
+
const ae = ue(V);
|
|
2530
|
+
return delete ae._k, w ? {
|
|
2531
|
+
isValidating: !0,
|
|
2532
|
+
isLoading: !0,
|
|
2533
|
+
...ae
|
|
2534
|
+
} : ae;
|
|
2535
|
+
}, O = H(), T = B(), U = v(O), ce = O === T ? U : v(T);
|
|
2536
|
+
let M = U;
|
|
2537
|
+
return [
|
|
2538
|
+
() => {
|
|
2539
|
+
const V = v(H());
|
|
2540
|
+
return q(V, M) ? (M.data = V.data, M.isLoading = V.isLoading, M.isValidating = V.isValidating, M.error = V.error, M) : (M = V, V);
|
|
2541
|
+
},
|
|
2542
|
+
() => ce
|
|
2543
|
+
];
|
|
2544
|
+
}, [
|
|
2545
|
+
a,
|
|
2546
|
+
p
|
|
2547
|
+
]), K = kn.useSyncExternalStore(Z(
|
|
2548
|
+
(w) => te(p, (v, O) => {
|
|
2549
|
+
q(O, v) || w();
|
|
2550
|
+
}),
|
|
2551
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2552
|
+
[
|
|
2553
|
+
a,
|
|
2554
|
+
p
|
|
2555
|
+
]
|
|
2556
|
+
), ke[0], ke[1]), se = !A.current, Ne = m[p] && m[p].length > 0, ie = K.data, re = _(ie) ? me && vr(me) ? rt(me) : me : ie, pe = K.error, Re = S(re), ge = u ? _(ie) ? Re.current : ie : re, Ce = Ne && !_(pe) ? !1 : se && !_(i) ? i : x().isPaused() ? !1 : o ? _(re) ? !1 : l : _(re) || l, J = !!(p && t && se && Ce), Y = _(K.isValidating) ? J : K.isValidating, We = _(K.isLoading) ? J : K.isLoading, he = Z(
|
|
2557
|
+
async (w) => {
|
|
2558
|
+
const v = C.current;
|
|
2559
|
+
if (!p || !v || R.current || x().isPaused())
|
|
2560
|
+
return !1;
|
|
2561
|
+
let O, T, U = !0;
|
|
2562
|
+
const ce = w || {}, M = !b[p] || !ce.dedupe, V = () => Yt ? !R.current && p === E.current && A.current : p === E.current, ae = {
|
|
2563
|
+
isValidating: !1,
|
|
2564
|
+
isLoading: !1
|
|
2565
|
+
}, At = () => {
|
|
2566
|
+
W(ae);
|
|
2567
|
+
}, Ot = () => {
|
|
2568
|
+
const F = b[p];
|
|
2569
|
+
F && F[1] === T && delete b[p];
|
|
2570
|
+
}, Lt = {
|
|
2571
|
+
isValidating: !0
|
|
2572
|
+
};
|
|
2573
|
+
_(H().data) && (Lt.isLoading = !0);
|
|
2574
|
+
try {
|
|
2575
|
+
if (M && (W(Lt), r.loadingTimeout && _(H().data) && setTimeout(() => {
|
|
2576
|
+
U && V() && x().onLoadingSlow(p, r);
|
|
2577
|
+
}, r.loadingTimeout), b[p] = [
|
|
2578
|
+
v(N),
|
|
2579
|
+
ht()
|
|
2580
|
+
]), [O, T] = b[p], O = await O, M && setTimeout(Ot, r.dedupingInterval), !b[p] || b[p][1] !== T)
|
|
2581
|
+
return M && V() && x().onDiscarded(p), !1;
|
|
2582
|
+
ae.error = z;
|
|
2583
|
+
const F = y[p];
|
|
2584
|
+
if (!_(F) && // case 1
|
|
2585
|
+
(T <= F[0] || // case 2
|
|
2586
|
+
T <= F[1] || // case 3
|
|
2587
|
+
F[1] === 0))
|
|
2588
|
+
return At(), M && V() && x().onDiscarded(p), !1;
|
|
2589
|
+
const ne = H().data;
|
|
2590
|
+
ae.data = n(ne, O) ? ne : O, M && V() && x().onSuccess(O, p, r);
|
|
2591
|
+
} catch (F) {
|
|
2592
|
+
Ot();
|
|
2593
|
+
const ne = x(), { shouldRetryOnError: je } = ne;
|
|
2594
|
+
ne.isPaused() || (ae.error = F, M && V() && (ne.onError(F, p, ne), (je === !0 || Q(je) && je(F)) && (!x().revalidateOnFocus || !x().revalidateOnReconnect || oe()) && ne.onErrorRetry(F, p, ne, (Br) => {
|
|
2595
|
+
const qe = m[p];
|
|
2596
|
+
qe && qe[0] && qe[0](_e.ERROR_REVALIDATE_EVENT, Br);
|
|
2597
|
+
}, {
|
|
2598
|
+
retryCount: (ce.retryCount || 0) + 1,
|
|
2599
|
+
dedupe: !0
|
|
2600
|
+
})));
|
|
2601
|
+
}
|
|
2602
|
+
return U = !1, At(), !0;
|
|
2603
|
+
},
|
|
2604
|
+
// `setState` is immutable, and `eventsCallback`, `fnArg`, and
|
|
2605
|
+
// `keyValidating` are depending on `key`, so we can exclude them from
|
|
2606
|
+
// the deps array.
|
|
2607
|
+
//
|
|
2608
|
+
// FIXME:
|
|
2609
|
+
// `fn` and `config` might be changed during the lifecycle,
|
|
2610
|
+
// but they might be changed every render like this.
|
|
2611
|
+
// `useSWR('key', () => fetch('/api/'), { suspense: true })`
|
|
2612
|
+
// So we omit the values from the deps array
|
|
2613
|
+
// even though it might cause unexpected behaviors.
|
|
2614
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2615
|
+
[
|
|
2616
|
+
p,
|
|
2617
|
+
a
|
|
2618
|
+
]
|
|
2619
|
+
), Ie = Z(
|
|
2620
|
+
// Use callback to make sure `keyRef.current` returns latest result every time
|
|
2621
|
+
(...w) => wr(a, E.current, ...w),
|
|
2622
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2623
|
+
[]
|
|
2624
|
+
);
|
|
2625
|
+
if (Ze(() => {
|
|
2626
|
+
C.current = t, ee.current = r, _(ie) || (Re.current = ie);
|
|
2627
|
+
}), Ze(() => {
|
|
2628
|
+
if (!p) return;
|
|
2629
|
+
const w = he.bind(z, at);
|
|
2630
|
+
let v = 0;
|
|
2631
|
+
const T = Kn(p, m, (U, ce = {}) => {
|
|
2632
|
+
if (U == _e.FOCUS_EVENT) {
|
|
2633
|
+
const M = Date.now();
|
|
2634
|
+
x().revalidateOnFocus && M > v && oe() && (v = M + x().focusThrottleInterval, w());
|
|
2635
|
+
} else if (U == _e.RECONNECT_EVENT)
|
|
2636
|
+
x().revalidateOnReconnect && oe() && w();
|
|
2637
|
+
else {
|
|
2638
|
+
if (U == _e.MUTATE_EVENT)
|
|
2639
|
+
return he();
|
|
2640
|
+
if (U == _e.ERROR_REVALIDATE_EVENT)
|
|
2641
|
+
return he(ce);
|
|
2642
|
+
}
|
|
2643
|
+
});
|
|
2644
|
+
return R.current = !1, E.current = p, A.current = !0, W({
|
|
2645
|
+
_k: N
|
|
2646
|
+
}), Ce && (_(re) || Te ? w() : Rn(w)), () => {
|
|
2647
|
+
R.current = !0, T();
|
|
2648
|
+
};
|
|
2649
|
+
}, [
|
|
2650
|
+
p
|
|
2651
|
+
]), Ze(() => {
|
|
2652
|
+
let w;
|
|
2653
|
+
function v() {
|
|
2654
|
+
const T = Q(h) ? h(H().data) : h;
|
|
2655
|
+
T && w !== -1 && (w = setTimeout(O, T));
|
|
2656
|
+
}
|
|
2657
|
+
function O() {
|
|
2658
|
+
!H().error && (f || x().isVisible()) && (g || x().isOnline()) ? he(at).then(v) : v();
|
|
2659
|
+
}
|
|
2660
|
+
return v(), () => {
|
|
2661
|
+
w && (clearTimeout(w), w = -1);
|
|
2662
|
+
};
|
|
2663
|
+
}, [
|
|
2664
|
+
h,
|
|
2665
|
+
f,
|
|
2666
|
+
g,
|
|
2667
|
+
p
|
|
2668
|
+
]), ea(ge), o && _(re) && p) {
|
|
2669
|
+
if (!Yt && Te)
|
|
2670
|
+
throw new Error("Fallback data is required when using Suspense in SSR.");
|
|
2671
|
+
C.current = t, ee.current = r, R.current = !1;
|
|
2672
|
+
const w = k[p];
|
|
2673
|
+
if (!_(w)) {
|
|
2674
|
+
const v = Ie(w);
|
|
2675
|
+
rt(v);
|
|
2676
|
+
}
|
|
2677
|
+
if (_(pe)) {
|
|
2678
|
+
const v = he(at);
|
|
2679
|
+
_(ge) || (v.status = "fulfilled", v.value = !0), rt(v);
|
|
2680
|
+
} else
|
|
2681
|
+
throw pe;
|
|
2682
|
+
}
|
|
2683
|
+
return {
|
|
2684
|
+
mutate: Ie,
|
|
2685
|
+
get data() {
|
|
2686
|
+
return j.data = !0, ge;
|
|
2687
|
+
},
|
|
2688
|
+
get error() {
|
|
2689
|
+
return j.error = !0, pe;
|
|
2690
|
+
},
|
|
2691
|
+
get isValidating() {
|
|
2692
|
+
return j.isValidating = !0, Y;
|
|
2693
|
+
},
|
|
2694
|
+
get isLoading() {
|
|
2695
|
+
return j.isLoading = !0, We;
|
|
2696
|
+
}
|
|
2697
|
+
};
|
|
2698
|
+
}, Yn = qn(Jn), He = ({
|
|
2699
|
+
fetcher: e,
|
|
2700
|
+
scope: t,
|
|
2701
|
+
keys: r,
|
|
2702
|
+
swrOptions: a,
|
|
2703
|
+
getAccessToken: n
|
|
2704
|
+
}) => {
|
|
2705
|
+
const { data: o, error: s, isLoading: i, mutate: l } = Yn(
|
|
2706
|
+
[t, ...r],
|
|
2707
|
+
(h) => e(h, n),
|
|
2708
|
+
{ ...a }
|
|
2709
|
+
);
|
|
2710
|
+
return { data: o, error: s, isLoading: i, mutate: l };
|
|
2711
|
+
}, Fe = async ({
|
|
2712
|
+
getAccessToken: e,
|
|
2713
|
+
type: t,
|
|
2714
|
+
params: r
|
|
2715
|
+
}) => {
|
|
2716
|
+
const a = await e(), n = await gn({
|
|
2717
|
+
accessToken: a,
|
|
2718
|
+
type: t,
|
|
2719
|
+
params: r
|
|
2720
|
+
});
|
|
2721
|
+
if (n.status === 200 && n.errors === void 0)
|
|
2722
|
+
return n.data;
|
|
2723
|
+
throw new Error("An error occurred while fetching the data.");
|
|
2724
|
+
}, Xn = async ([e, t], r) => Fe({
|
|
2725
|
+
getAccessToken: r,
|
|
2726
|
+
type: ze.GET_USER_PREFERENCES,
|
|
2727
|
+
params: {
|
|
2728
|
+
user: t
|
|
2729
|
+
}
|
|
2730
|
+
}), Qn = ({
|
|
2731
|
+
keys: e,
|
|
2732
|
+
getAccessToken: t
|
|
2733
|
+
}) => He({
|
|
2734
|
+
fetcher: Xn,
|
|
2735
|
+
scope: "/preferences",
|
|
2736
|
+
keys: e,
|
|
2737
|
+
swrOptions: { keepPreviousData: !0 },
|
|
2738
|
+
getAccessToken: t
|
|
2739
|
+
}), Zn = async ([e, t], r) => Fe({
|
|
2740
|
+
getAccessToken: r,
|
|
2741
|
+
type: ze.GET_CHATS_STATS,
|
|
2742
|
+
params: {
|
|
2743
|
+
user: t
|
|
2744
|
+
}
|
|
2745
|
+
}), Xo = ({
|
|
2746
|
+
keys: e,
|
|
2747
|
+
getAccessToken: t
|
|
2748
|
+
}) => He({
|
|
2749
|
+
fetcher: Zn,
|
|
2750
|
+
scope: "/stats",
|
|
2751
|
+
keys: e,
|
|
2752
|
+
getAccessToken: t
|
|
2753
|
+
}), Tr = async ([e, t, r, a], n) => Fe({
|
|
2754
|
+
getAccessToken: n,
|
|
2755
|
+
type: ze.GET_CHATS,
|
|
2756
|
+
params: {
|
|
2757
|
+
user: t,
|
|
2758
|
+
searchString: r,
|
|
2759
|
+
direction: a,
|
|
2760
|
+
limit: 1,
|
|
2761
|
+
truncateSize: 100
|
|
2762
|
+
}
|
|
2763
|
+
}), Qo = ({
|
|
2764
|
+
keys: e,
|
|
2765
|
+
getAccessToken: t
|
|
2766
|
+
}) => He({
|
|
2767
|
+
fetcher: Tr,
|
|
2768
|
+
scope: "/history",
|
|
2769
|
+
keys: e,
|
|
2770
|
+
getAccessToken: t,
|
|
2771
|
+
swrOptions: {
|
|
2772
|
+
keepPreviousData: !0,
|
|
2773
|
+
dedupingInterval: 1e4
|
|
2774
|
+
}
|
|
2775
|
+
}), Zo = ({
|
|
2776
|
+
keys: e,
|
|
2777
|
+
getAccessToken: t
|
|
2778
|
+
}) => {
|
|
2779
|
+
Gn(["/history", ...e], (r) => Tr(r, t));
|
|
2780
|
+
}, eo = async ([e], t) => Fe({
|
|
2781
|
+
getAccessToken: t,
|
|
2782
|
+
type: ze.GET_SERVER_CAPABILITIES
|
|
2783
|
+
}), es = ({
|
|
2784
|
+
keys: e,
|
|
2785
|
+
getAccessToken: t
|
|
2786
|
+
}) => He({
|
|
2787
|
+
fetcher: eo,
|
|
2788
|
+
scope: "/capabilities",
|
|
2789
|
+
keys: e,
|
|
2790
|
+
getAccessToken: t
|
|
2791
|
+
}), to = () => {
|
|
2792
|
+
const { dispatch: e } = P(wt), { getAccessToken: t, user: r } = Me(), {
|
|
2793
|
+
data: a,
|
|
2794
|
+
error: n,
|
|
2795
|
+
isLoading: o
|
|
2796
|
+
} = Qn({
|
|
2797
|
+
keys: [r == null ? void 0 : r.username],
|
|
2798
|
+
getAccessToken: t
|
|
2799
|
+
}), s = "mt-2 flex justify-center rounded-md", i = (l, h) => {
|
|
2800
|
+
l.preventDefault(), e({
|
|
2801
|
+
type: sr,
|
|
2802
|
+
payload: {
|
|
2803
|
+
prompt: h
|
|
2804
|
+
}
|
|
2805
|
+
});
|
|
2806
|
+
};
|
|
2807
|
+
return n || o ? null : /* @__PURE__ */ d(Fr, { alignHorizontal: "center", columnGap: 2, children: a && a.tags && a.tags.map((l) => l.enabled && l.label && l.content && /* @__PURE__ */ d(Gr, { children: /* @__PURE__ */ d("div", { className: s, children: /* @__PURE__ */ d(
|
|
2808
|
+
cr,
|
|
2809
|
+
{
|
|
2810
|
+
noBorder: !0,
|
|
2811
|
+
mode: "dark",
|
|
2812
|
+
focusMode: "light",
|
|
2813
|
+
size: "small",
|
|
2814
|
+
onClick: (h) => i(h, l.content),
|
|
2815
|
+
children: l.label
|
|
2816
|
+
}
|
|
2817
|
+
) }) }, `prompt-button-${l.slot}`)) });
|
|
2818
|
+
}, ro = () => {
|
|
2819
|
+
const { state: e } = P(ve), t = S(!1), r = window.innerWidth < 403, [a, n] = G(
|
|
2820
|
+
r ? "bottom-10" : "top-[245px]"
|
|
2821
|
+
);
|
|
2822
|
+
return L(() => {
|
|
2823
|
+
r || e && (!t.current && e.streaming && n("bottom-10"), t.current = !!e.streaming);
|
|
2824
|
+
}, [e, r]), L(() => {
|
|
2825
|
+
r || (e && e.messages.length === 0 && n("top-[245px]"), e && !e.streaming && e.messages.length > 0 && n("bottom-10"));
|
|
2826
|
+
}, [e, r]), /* @__PURE__ */ I(
|
|
2827
|
+
"footer",
|
|
2828
|
+
{
|
|
2829
|
+
className: c(
|
|
2830
|
+
"md:mx-auto md:max-w-4xl w-11/12 fixed left-1/2 transform -translate-x-1/2 z-1000",
|
|
2831
|
+
a
|
|
2832
|
+
),
|
|
2833
|
+
children: [
|
|
2834
|
+
/* @__PURE__ */ d(to, {}),
|
|
2835
|
+
/* @__PURE__ */ d(pn, {})
|
|
2836
|
+
]
|
|
2837
|
+
}
|
|
2838
|
+
);
|
|
2839
|
+
};
|
|
2840
|
+
/*!
|
|
2841
|
+
@versini/ui-bubble v3.0.4
|
|
2842
|
+
© 2025 gizmette.com
|
|
2843
|
+
*/
|
|
2844
|
+
try {
|
|
2845
|
+
window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
|
|
2846
|
+
version: "3.0.4",
|
|
2847
|
+
buildTime: "01/04/2025 07:31 PM EST",
|
|
2848
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
2849
|
+
license: "MIT"
|
|
2850
|
+
});
|
|
2851
|
+
} catch {
|
|
2852
|
+
}
|
|
2853
|
+
const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link", no = ({
|
|
2854
|
+
type: e,
|
|
2855
|
+
size: t,
|
|
2856
|
+
labelRight: r,
|
|
2857
|
+
labelLeft: a,
|
|
2858
|
+
align: n
|
|
2859
|
+
}) => {
|
|
2860
|
+
const o = "max-h-8 py-0 px-2", s = "max-h-9 py-1 px-3", i = "max-h-12 py-2 px-4";
|
|
2861
|
+
switch (e) {
|
|
2862
|
+
case Nr:
|
|
2863
|
+
case ft:
|
|
2864
|
+
return c({
|
|
2865
|
+
[o]: t === "small",
|
|
2866
|
+
[s]: t === "medium",
|
|
2867
|
+
[i]: t === "large"
|
|
2868
|
+
});
|
|
2869
|
+
case Ge:
|
|
2870
|
+
return c("inline-flex items-center", {
|
|
2871
|
+
"justify-center": n === "center",
|
|
2872
|
+
"justify-start": n === "left",
|
|
2873
|
+
"justify-end": n === "right",
|
|
2874
|
+
"h-6 w-6 p-0": t === "small" && !(r || a),
|
|
2875
|
+
"h-6 px-2": t === "small" && (r || a),
|
|
2876
|
+
"h-8 w-8 p-1": t === "medium" && !(r || a),
|
|
2877
|
+
"h-8 px-3": t === "medium" && (r || a),
|
|
2878
|
+
"h-12 w-12 p-2": t === "large" && !(r || a),
|
|
2879
|
+
"h-12 px-4": t === "large" && (r || a)
|
|
2880
|
+
});
|
|
2881
|
+
}
|
|
2882
|
+
}, oo = ({
|
|
2883
|
+
type: e,
|
|
2884
|
+
size: t,
|
|
2885
|
+
labelRight: r,
|
|
2886
|
+
labelLeft: a
|
|
2887
|
+
}) => {
|
|
2888
|
+
const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
|
|
2889
|
+
switch (e) {
|
|
2890
|
+
case Nr:
|
|
2891
|
+
case ft:
|
|
2892
|
+
return c({
|
|
2893
|
+
"text-center": e === ft,
|
|
2894
|
+
[n]: t === "small",
|
|
2895
|
+
[o]: t === "medium",
|
|
2896
|
+
[s]: t === "large"
|
|
2897
|
+
});
|
|
2898
|
+
case Ge:
|
|
2899
|
+
return c({
|
|
2900
|
+
[n]: t === "small" && (r || a),
|
|
2901
|
+
[o]: t === "medium" && (r || a),
|
|
2902
|
+
[s]: t === "large" && (r || a)
|
|
2903
|
+
});
|
|
2904
|
+
}
|
|
2905
|
+
}, so = ({
|
|
2906
|
+
mode: e,
|
|
2907
|
+
noBackground: t,
|
|
2908
|
+
noTruncate: r,
|
|
2909
|
+
variant: a
|
|
2910
|
+
}) => {
|
|
2911
|
+
if (t)
|
|
2912
|
+
return "not-prose";
|
|
2913
|
+
if (a === "primary")
|
|
2914
|
+
return c("not-prose", {
|
|
2915
|
+
truncate: !r,
|
|
2916
|
+
"text-copy-light": e === "dark" || e === "system",
|
|
2917
|
+
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
2918
|
+
"dark:text-copy-lighter": e === "system",
|
|
2919
|
+
"dark:text-copy-light": e === "alt-system"
|
|
2920
|
+
});
|
|
2921
|
+
if (a === "secondary")
|
|
2922
|
+
return c("not-prose", {
|
|
2923
|
+
truncate: !r,
|
|
2924
|
+
"text-copy-light": e === "light" || e === "system",
|
|
2925
|
+
"text-copy-lighter": e === "dark" || e === "alt-system",
|
|
2926
|
+
"dark:text-copy-lighter": e === "alt-system",
|
|
2927
|
+
"dark:text-copy-light": e === "system"
|
|
2928
|
+
});
|
|
2929
|
+
if (a === "danger")
|
|
2930
|
+
return c("not-prose", {
|
|
2931
|
+
truncate: !r,
|
|
2932
|
+
"text-copy-light": e === "dark" || e === "system",
|
|
2933
|
+
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
2934
|
+
"dark:text-copy-lighter": e === "system",
|
|
2935
|
+
"dark:text-copy-light": e === "alt-system"
|
|
2936
|
+
});
|
|
2937
|
+
if (a === "selected")
|
|
2938
|
+
return c("not-prose text-copy-lighter", {
|
|
2939
|
+
truncate: !r
|
|
2940
|
+
});
|
|
2941
|
+
}, io = ({
|
|
2942
|
+
mode: e,
|
|
2943
|
+
noBackground: t,
|
|
2944
|
+
variant: r
|
|
2945
|
+
}) => {
|
|
2946
|
+
if (!t) {
|
|
2947
|
+
if (r === "primary")
|
|
2948
|
+
return c({
|
|
2949
|
+
"bg-action-dark": e === "dark",
|
|
2950
|
+
"bg-action-light": e === "light",
|
|
2951
|
+
"bg-action-dark dark:bg-action-light": e === "system",
|
|
2952
|
+
"bg-action-light dark:bg-action-dark": e === "alt-system"
|
|
2953
|
+
});
|
|
2954
|
+
if (r === "secondary")
|
|
2955
|
+
return c({
|
|
2956
|
+
"bg-action-dark": e === "light",
|
|
2957
|
+
"bg-action-light": e === "dark",
|
|
2958
|
+
"bg-action-dark dark:bg-action-light": e === "alt-system",
|
|
2959
|
+
"bg-action-light dark:bg-action-dark": e === "system"
|
|
2960
|
+
});
|
|
2961
|
+
if (r === "danger")
|
|
2962
|
+
return c({
|
|
2963
|
+
"bg-action-danger-dark": e === "dark",
|
|
2964
|
+
"bg-action-danger-light": e === "light",
|
|
2965
|
+
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
2966
|
+
"bg-action-danger-light dark:bg-action-danger-dark": e === "alt-system"
|
|
2967
|
+
});
|
|
2968
|
+
if (r === "selected")
|
|
2969
|
+
return "bg-action-selected-dark";
|
|
2970
|
+
}
|
|
2971
|
+
}, co = ({
|
|
2972
|
+
radius: e
|
|
2973
|
+
}) => c({
|
|
2974
|
+
"rounded-full": e === "large",
|
|
2975
|
+
"rounded-md": e === "medium",
|
|
2976
|
+
"rounded-sm": e === "small"
|
|
2977
|
+
}), lo = ({
|
|
2978
|
+
mode: e,
|
|
2979
|
+
disabled: t,
|
|
2980
|
+
variant: r
|
|
2981
|
+
}) => {
|
|
2982
|
+
if (t)
|
|
2983
|
+
return "";
|
|
2984
|
+
if (r === "primary")
|
|
2985
|
+
return c("hover:text-copy-light-hover", {
|
|
2986
|
+
"hover:bg-action-dark-hover": e === "dark",
|
|
2987
|
+
"hover:bg-action-light-hover": e === "light",
|
|
2988
|
+
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
2989
|
+
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
2990
|
+
});
|
|
2991
|
+
if (r === "secondary")
|
|
2992
|
+
return c("hover:text-copy-light-hover", {
|
|
2993
|
+
"hover:bg-action-dark-hover": e === "light",
|
|
2994
|
+
"hover:bg-action-light-hover": e === "dark",
|
|
2995
|
+
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
2996
|
+
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
2997
|
+
});
|
|
2998
|
+
if (r === "danger")
|
|
2999
|
+
return c("hover:text-copy-light-hover", {
|
|
3000
|
+
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
3001
|
+
"hover:bg-action-danger-light-hover": e === "light",
|
|
3002
|
+
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
3003
|
+
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
3004
|
+
});
|
|
3005
|
+
if (r === "selected")
|
|
3006
|
+
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
3007
|
+
}, uo = ({
|
|
3008
|
+
mode: e,
|
|
3009
|
+
disabled: t,
|
|
3010
|
+
variant: r
|
|
3011
|
+
}) => {
|
|
3012
|
+
if (t)
|
|
3013
|
+
return "";
|
|
3014
|
+
if (r === "primary")
|
|
3015
|
+
return c("active:text-copy-light-active", {
|
|
3016
|
+
"active:bg-action-dark-active": e === "dark",
|
|
3017
|
+
"active:bg-action-light-active": e === "light",
|
|
3018
|
+
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
3019
|
+
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
3020
|
+
});
|
|
3021
|
+
if (r === "secondary")
|
|
3022
|
+
return c("active:text-copy-light-active", {
|
|
3023
|
+
"active:bg-action-dark-active": e === "light",
|
|
3024
|
+
"active:bg-action-light-active": e === "dark",
|
|
3025
|
+
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
3026
|
+
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
3027
|
+
});
|
|
3028
|
+
if (r === "danger")
|
|
3029
|
+
return c("active:text-copy-lighter-active", {
|
|
3030
|
+
"active:bg-action-danger-dark-active": e === "dark",
|
|
3031
|
+
"active:bg-action-danger-light-active": e === "light",
|
|
3032
|
+
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
3033
|
+
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
3034
|
+
});
|
|
3035
|
+
if (r === "selected")
|
|
3036
|
+
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
3037
|
+
}, mo = ({
|
|
3038
|
+
mode: e,
|
|
3039
|
+
noBorder: t,
|
|
3040
|
+
variant: r
|
|
3041
|
+
}) => {
|
|
3042
|
+
if (t)
|
|
3043
|
+
return "border border-transparent";
|
|
3044
|
+
if (r === "primary")
|
|
3045
|
+
return c("border", {
|
|
3046
|
+
"border-border-dark": e === "dark",
|
|
3047
|
+
"border-border-accent": e === "light",
|
|
3048
|
+
"border-border-dark dark:border-border-accent": e === "system",
|
|
3049
|
+
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
3050
|
+
});
|
|
3051
|
+
if (r === "secondary")
|
|
3052
|
+
return c("border", {
|
|
3053
|
+
"border-border-dark": e === "light",
|
|
3054
|
+
"border-border-accent": e === "dark",
|
|
3055
|
+
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
3056
|
+
"border-border-accent dark:border-border-dark": e === "system"
|
|
3057
|
+
});
|
|
3058
|
+
if (r === "danger")
|
|
3059
|
+
return c("border", {
|
|
3060
|
+
"border-border-danger-dark": e === "dark",
|
|
3061
|
+
"border-border-danger-medium": e === "light",
|
|
3062
|
+
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
3063
|
+
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
3064
|
+
});
|
|
3065
|
+
if (r === "selected")
|
|
3066
|
+
return "border border-border-selected-dark";
|
|
3067
|
+
}, go = ({
|
|
3068
|
+
focusMode: e
|
|
3069
|
+
}) => c("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
3070
|
+
"focus:outline-focus-dark": e === "dark",
|
|
3071
|
+
"focus:outline-focus-light": e === "light",
|
|
3072
|
+
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
3073
|
+
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
3074
|
+
}), Rr = ({
|
|
3075
|
+
type: e,
|
|
3076
|
+
className: t,
|
|
3077
|
+
raw: r,
|
|
3078
|
+
mode: a,
|
|
3079
|
+
focusMode: n,
|
|
3080
|
+
disabled: o,
|
|
3081
|
+
fullWidth: s,
|
|
3082
|
+
size: i,
|
|
3083
|
+
noBorder: l,
|
|
3084
|
+
labelRight: h,
|
|
3085
|
+
labelLeft: f,
|
|
3086
|
+
noBackground: g,
|
|
3087
|
+
variant: u,
|
|
3088
|
+
noTruncate: m,
|
|
3089
|
+
align: y,
|
|
3090
|
+
radius: b
|
|
3091
|
+
}) => (u || (u = "primary"), r ? c(Zt, t) : c(
|
|
3092
|
+
Zt,
|
|
3093
|
+
so({
|
|
3094
|
+
mode: a,
|
|
3095
|
+
variant: u,
|
|
3096
|
+
noBackground: g,
|
|
3097
|
+
noTruncate: m
|
|
3098
|
+
}),
|
|
3099
|
+
io({ mode: a, noBackground: g, variant: u }),
|
|
3100
|
+
co({ radius: b }),
|
|
3101
|
+
no({
|
|
3102
|
+
type: e,
|
|
3103
|
+
size: i,
|
|
3104
|
+
labelRight: h,
|
|
3105
|
+
labelLeft: f,
|
|
3106
|
+
align: y
|
|
3107
|
+
}),
|
|
3108
|
+
oo({ type: e, size: i, labelRight: h, labelLeft: f }),
|
|
3109
|
+
mo({ mode: a, variant: u, noBorder: l }),
|
|
3110
|
+
go({ focusMode: n }),
|
|
3111
|
+
lo({ mode: a, variant: u, disabled: o }),
|
|
3112
|
+
uo({ mode: a, variant: u, disabled: o }),
|
|
3113
|
+
{
|
|
3114
|
+
"w-full": s,
|
|
3115
|
+
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
3116
|
+
},
|
|
3117
|
+
t
|
|
3118
|
+
)), ho = (e, t, r) => {
|
|
3119
|
+
var a;
|
|
3120
|
+
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
3121
|
+
}, Nt = $.forwardRef((e, t) => {
|
|
3122
|
+
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
3123
|
+
return /* @__PURE__ */ d(
|
|
3124
|
+
"button",
|
|
3125
|
+
{
|
|
3126
|
+
ref: t,
|
|
3127
|
+
onClick: (o) => {
|
|
3128
|
+
ho(o, a, r);
|
|
3129
|
+
},
|
|
3130
|
+
...n
|
|
3131
|
+
}
|
|
3132
|
+
);
|
|
3133
|
+
});
|
|
3134
|
+
Nt.displayName = "BaseButton";
|
|
3135
|
+
const Cr = $.forwardRef(
|
|
3136
|
+
({
|
|
3137
|
+
children: e,
|
|
3138
|
+
disabled: t = !1,
|
|
3139
|
+
mode: r = "system",
|
|
3140
|
+
focusMode: a = "system",
|
|
3141
|
+
fullWidth: n = !1,
|
|
3142
|
+
className: o,
|
|
3143
|
+
type: s = "button",
|
|
3144
|
+
raw: i = !1,
|
|
3145
|
+
noBorder: l = !1,
|
|
3146
|
+
"aria-label": h,
|
|
3147
|
+
label: f,
|
|
3148
|
+
size: g = "medium",
|
|
3149
|
+
labelRight: u,
|
|
3150
|
+
labelLeft: m,
|
|
3151
|
+
noBackground: y = !1,
|
|
3152
|
+
align: b = "center",
|
|
3153
|
+
radius: k = "large",
|
|
3154
|
+
variant: p = "primary",
|
|
3155
|
+
...N
|
|
3156
|
+
}, A) => {
|
|
3157
|
+
const R = Rr({
|
|
3158
|
+
type: Ge,
|
|
3159
|
+
mode: r,
|
|
3160
|
+
focusMode: a,
|
|
3161
|
+
fullWidth: n,
|
|
3162
|
+
disabled: t,
|
|
3163
|
+
raw: i,
|
|
3164
|
+
className: o,
|
|
3165
|
+
noBorder: l,
|
|
3166
|
+
size: g,
|
|
3167
|
+
labelRight: u,
|
|
3168
|
+
labelLeft: m,
|
|
3169
|
+
noBackground: y,
|
|
3170
|
+
align: b,
|
|
3171
|
+
radius: k,
|
|
3172
|
+
variant: p
|
|
3173
|
+
}), E = c({
|
|
3174
|
+
"text-copy-accent-dark": r === "light" && !i,
|
|
3175
|
+
"text-copy-light": r === "dark" && !i,
|
|
3176
|
+
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
3177
|
+
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
3178
|
+
});
|
|
3179
|
+
return /* @__PURE__ */ I(
|
|
3180
|
+
Nt,
|
|
3181
|
+
{
|
|
3182
|
+
ref: A,
|
|
3183
|
+
className: R,
|
|
3184
|
+
disabled: t,
|
|
3185
|
+
type: s,
|
|
3186
|
+
"aria-label": h || f,
|
|
3187
|
+
...N,
|
|
3188
|
+
children: [
|
|
3189
|
+
m && /* @__PURE__ */ d("span", { className: "pr-2", children: m }),
|
|
3190
|
+
/* @__PURE__ */ d("div", { className: E, children: e }),
|
|
3191
|
+
u && /* @__PURE__ */ d("span", { className: "pl-2", children: u })
|
|
3192
|
+
]
|
|
3193
|
+
}
|
|
3194
|
+
);
|
|
3195
|
+
}
|
|
3196
|
+
);
|
|
3197
|
+
Cr.displayName = "ButtonIcon";
|
|
3198
|
+
/*!
|
|
3199
|
+
@versini/ui-button v4.0.3
|
|
3200
|
+
© 2025 gizmette.com
|
|
3201
|
+
*/
|
|
3202
|
+
try {
|
|
3203
|
+
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
3204
|
+
version: "4.0.3",
|
|
3205
|
+
buildTime: "01/04/2025 07:31 PM EST",
|
|
3206
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
3207
|
+
license: "MIT"
|
|
3208
|
+
});
|
|
3209
|
+
} catch {
|
|
3210
|
+
}
|
|
3211
|
+
const fo = $.forwardRef(
|
|
3212
|
+
({
|
|
3213
|
+
children: e,
|
|
3214
|
+
disabled: t = !1,
|
|
3215
|
+
mode: r = "system",
|
|
3216
|
+
focusMode: a = "system",
|
|
3217
|
+
fullWidth: n = !1,
|
|
3218
|
+
className: o,
|
|
3219
|
+
type: s = "button",
|
|
3220
|
+
raw: i = !1,
|
|
3221
|
+
noBorder: l = !1,
|
|
3222
|
+
"aria-label": h,
|
|
3223
|
+
label: f,
|
|
3224
|
+
size: g = "medium",
|
|
3225
|
+
labelRight: u,
|
|
3226
|
+
labelLeft: m,
|
|
3227
|
+
noBackground: y = !1,
|
|
3228
|
+
align: b = "center",
|
|
3229
|
+
active: k = !1,
|
|
3230
|
+
radius: p = "large",
|
|
3231
|
+
...N
|
|
3232
|
+
}, A) => {
|
|
3233
|
+
const R = Rr({
|
|
3234
|
+
type: Ge,
|
|
3235
|
+
mode: r,
|
|
3236
|
+
focusMode: a,
|
|
3237
|
+
fullWidth: n,
|
|
3238
|
+
disabled: t,
|
|
3239
|
+
raw: i,
|
|
3240
|
+
className: o,
|
|
3241
|
+
noBorder: l,
|
|
3242
|
+
size: g,
|
|
3243
|
+
labelRight: u,
|
|
3244
|
+
labelLeft: m,
|
|
3245
|
+
noBackground: y,
|
|
3246
|
+
align: b,
|
|
3247
|
+
radius: p
|
|
3248
|
+
}), E = c({
|
|
3249
|
+
"text-copy-accent-dark": r === "light" && !i,
|
|
3250
|
+
"text-copy-light": r === "dark" && !i,
|
|
3251
|
+
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
3252
|
+
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
3253
|
+
}), C = k ? c(
|
|
3254
|
+
"relative",
|
|
3255
|
+
"focus-within:static",
|
|
3256
|
+
"focus-within:after:border-transparent",
|
|
3257
|
+
"after:absolute",
|
|
3258
|
+
"after:content-['']",
|
|
3259
|
+
"after:border-b-2",
|
|
3260
|
+
"after:bottom-[-4px]",
|
|
3261
|
+
"after:left-0",
|
|
3262
|
+
"after:right-0",
|
|
3263
|
+
{
|
|
3264
|
+
"after:border-table-dark": r === "dark",
|
|
3265
|
+
"after:border-table-light": r === "light",
|
|
3266
|
+
"after:border-table-dark dark:after:border-table-light": r === "system",
|
|
3267
|
+
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
3268
|
+
}
|
|
3269
|
+
) : "";
|
|
3270
|
+
return /* @__PURE__ */ d("div", { className: C, children: /* @__PURE__ */ I(
|
|
3271
|
+
Nt,
|
|
3272
|
+
{
|
|
3273
|
+
ref: A,
|
|
3274
|
+
className: R,
|
|
3275
|
+
disabled: t,
|
|
3276
|
+
type: s,
|
|
3277
|
+
"aria-label": h || f,
|
|
3278
|
+
...N,
|
|
3279
|
+
children: [
|
|
3280
|
+
m && /* @__PURE__ */ d("span", { className: "pr-2", children: m }),
|
|
3281
|
+
/* @__PURE__ */ d("div", { className: E, children: e }),
|
|
3282
|
+
u && /* @__PURE__ */ d("span", { className: "pl-2", children: u })
|
|
3283
|
+
]
|
|
3284
|
+
}
|
|
3285
|
+
) });
|
|
3286
|
+
}
|
|
3287
|
+
);
|
|
3288
|
+
fo.displayName = "ButtonSort";
|
|
3289
|
+
const Ir = ({
|
|
3290
|
+
children: e,
|
|
3291
|
+
fill: t,
|
|
3292
|
+
viewBox: r,
|
|
3293
|
+
className: a,
|
|
3294
|
+
defaultViewBox: n,
|
|
3295
|
+
size: o,
|
|
3296
|
+
title: s,
|
|
3297
|
+
semantic: i = !1,
|
|
3298
|
+
...l
|
|
3299
|
+
}) => {
|
|
3300
|
+
const h = c(o, a);
|
|
3301
|
+
return /* @__PURE__ */ I(yt, { children: [
|
|
3302
|
+
/* @__PURE__ */ d(
|
|
3303
|
+
"svg",
|
|
3304
|
+
{
|
|
3305
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3306
|
+
className: h,
|
|
3307
|
+
viewBox: r || n,
|
|
3308
|
+
fill: t || "currentColor",
|
|
3309
|
+
role: "img",
|
|
3310
|
+
"aria-hidden": !i,
|
|
3311
|
+
focusable: !1,
|
|
3312
|
+
...l,
|
|
3313
|
+
children: e
|
|
3314
|
+
}
|
|
3315
|
+
),
|
|
3316
|
+
s && i && /* @__PURE__ */ d("span", { className: "sr-only", children: s })
|
|
3317
|
+
] });
|
|
3318
|
+
};
|
|
3319
|
+
/*!
|
|
3320
|
+
@versini/ui-svgicon v4.0.0
|
|
3321
|
+
© 2025 gizmette.com
|
|
3322
|
+
*/
|
|
3323
|
+
try {
|
|
3324
|
+
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
3325
|
+
version: "4.0.0",
|
|
3326
|
+
buildTime: "01/04/2025 07:31 PM EST",
|
|
3327
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
3328
|
+
license: "MIT"
|
|
3329
|
+
});
|
|
3330
|
+
} catch {
|
|
3331
|
+
}
|
|
3332
|
+
const po = ({
|
|
3333
|
+
className: e,
|
|
3334
|
+
viewBox: t,
|
|
3335
|
+
title: r,
|
|
3336
|
+
monotone: a,
|
|
3337
|
+
...n
|
|
3338
|
+
}) => /* @__PURE__ */ I(
|
|
3339
|
+
Ir,
|
|
3340
|
+
{
|
|
3341
|
+
defaultViewBox: "0 0 448 512",
|
|
3342
|
+
size: "size-5",
|
|
3343
|
+
viewBox: t,
|
|
3344
|
+
className: e,
|
|
3345
|
+
title: r || "Copied",
|
|
3346
|
+
...n,
|
|
3347
|
+
children: [
|
|
3348
|
+
/* @__PURE__ */ d(
|
|
3349
|
+
"path",
|
|
3350
|
+
{
|
|
3351
|
+
className: "fa-secondary",
|
|
3352
|
+
opacity: "0.4",
|
|
3353
|
+
d: "M0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96zM104 256c0-6.1 2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l47 47c37-37 74-74 111-111c4.7-4.7 10.8-7 17-7s12.3 2.3 17 7c2.3 2.3 4.1 5 5.3 7.9c.6 1.5 1 2.9 1.3 4.4c.2 1.1 .3 2.2 .3 2.2c.1 1.2 .1 1.2 .1 2.5c-.1 1.5-.1 1.9-.1 2.3c-.1 .7-.2 1.5-.3 2.2c-.3 1.5-.7 3-1.3 4.4c-1.2 2.9-2.9 5.6-5.3 7.9c-42.7 42.7-85.3 85.3-128 128c-4.7 4.7-10.8 7-17 7s-12.3-2.3-17-7c-21.3-21.3-42.7-42.7-64-64c-4.7-4.7-7-10.8-7-17z"
|
|
3354
|
+
}
|
|
3355
|
+
),
|
|
3356
|
+
/* @__PURE__ */ d(
|
|
3357
|
+
"path",
|
|
3358
|
+
{
|
|
3359
|
+
className: "fa-primary",
|
|
3360
|
+
d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z"
|
|
3361
|
+
}
|
|
3362
|
+
)
|
|
3363
|
+
]
|
|
3364
|
+
}
|
|
3365
|
+
), yo = ({
|
|
3366
|
+
className: e,
|
|
3367
|
+
viewBox: t,
|
|
3368
|
+
title: r,
|
|
3369
|
+
monotone: a,
|
|
3370
|
+
...n
|
|
3371
|
+
}) => /* @__PURE__ */ d(
|
|
3372
|
+
Ir,
|
|
3373
|
+
{
|
|
3374
|
+
defaultViewBox: "0 0 512 512",
|
|
3375
|
+
size: "size-5",
|
|
3376
|
+
viewBox: t,
|
|
3377
|
+
className: e,
|
|
3378
|
+
title: r || "Copy",
|
|
3379
|
+
...n,
|
|
3380
|
+
children: /* @__PURE__ */ d("path", { d: "M64 464l224 0c8.8 0 16-7.2 16-16l0-64 48 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64l64 0 0 48-64 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zM224 304l224 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16L224 48c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zm-64-16l0-224c0-35.3 28.7-64 64-64L448 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-224 0c-35.3 0-64-28.7-64-64z" })
|
|
3381
|
+
}
|
|
3382
|
+
);
|
|
3383
|
+
/*!
|
|
3384
|
+
@versini/ui-icons v4.2.0
|
|
3385
|
+
© 2025 gizmette.com
|
|
3386
|
+
*/
|
|
3387
|
+
try {
|
|
3388
|
+
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
3389
|
+
version: "4.2.0",
|
|
3390
|
+
buildTime: "01/04/2025 07:31 PM EST",
|
|
3391
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
3392
|
+
license: "MIT"
|
|
3393
|
+
});
|
|
3394
|
+
} catch {
|
|
3395
|
+
}
|
|
3396
|
+
const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
|
|
3397
|
+
"lg:max-w-3xl": e === "left"
|
|
3398
|
+
}), vo = ({ kind: e }) => c({
|
|
3399
|
+
"bg-surface-lighter dark:bg-surface-dark": e === "left",
|
|
3400
|
+
"bg-surface-accent": e === "right"
|
|
3401
|
+
}), ko = ({ kind: e }) => c(
|
|
3402
|
+
"prose prose-dark dark:prose-lighter prose-p:my-3 prose-blockquote:my-3 prose-ol:my-3 prose-ul:my-3 prose-ul:prose-li:marker:text-black",
|
|
3403
|
+
{
|
|
3404
|
+
"text-copy-lighter": e === "right"
|
|
3405
|
+
}
|
|
3406
|
+
), _o = ({ kind: e }) => c("rounded-b-xl", {
|
|
3407
|
+
"rounded-tr-xl": e === "left",
|
|
3408
|
+
"rounded-tl-xl": e === "right"
|
|
3409
|
+
}), Eo = ({
|
|
3410
|
+
kind: e,
|
|
3411
|
+
className: t
|
|
3412
|
+
}) => {
|
|
3413
|
+
const r = c(
|
|
3414
|
+
ao,
|
|
3415
|
+
"flex items-start",
|
|
3416
|
+
{
|
|
3417
|
+
"flex-row-reverse": e === "right"
|
|
3418
|
+
},
|
|
3419
|
+
t
|
|
3420
|
+
), a = c(
|
|
3421
|
+
"flex flex-col empty:hidden",
|
|
3422
|
+
bo({ kind: e }),
|
|
3423
|
+
ko({ kind: e }),
|
|
3424
|
+
vo({ kind: e }),
|
|
3425
|
+
_o({ kind: e })
|
|
3426
|
+
), n = "pr-2 pt-1 text-end text-xs text-copy-light", o = c("flex flex-col-reverse gap-2 sm:flex-row", {
|
|
3427
|
+
"ml-2": e === "left",
|
|
3428
|
+
"mr-2": e === "right"
|
|
3429
|
+
});
|
|
3430
|
+
return {
|
|
3431
|
+
wrapper: r,
|
|
3432
|
+
main: a,
|
|
3433
|
+
footer: n,
|
|
3434
|
+
copyButton: o
|
|
3435
|
+
};
|
|
3436
|
+
}, xo = ({
|
|
3437
|
+
children: e,
|
|
3438
|
+
kind: t = "left",
|
|
3439
|
+
className: r,
|
|
3440
|
+
footer: a,
|
|
3441
|
+
rawFooter: n,
|
|
3442
|
+
copyToClipboard: o,
|
|
3443
|
+
copyToClipboardFocusMode: s = "system",
|
|
3444
|
+
copyToClipboardMode: i = "system"
|
|
3445
|
+
}) => {
|
|
3446
|
+
const [l, h] = G(!1), f = Eo({ kind: t, className: r }), g = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), u = () => {
|
|
3447
|
+
h(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
|
|
3448
|
+
};
|
|
3449
|
+
return L(() => {
|
|
3450
|
+
let m;
|
|
3451
|
+
return l && (m = window.setTimeout(() => {
|
|
3452
|
+
h(!1);
|
|
3453
|
+
}, 3e3)), () => {
|
|
3454
|
+
clearTimeout(m);
|
|
3455
|
+
};
|
|
3456
|
+
}, [l]), /* @__PURE__ */ I("div", { className: f.wrapper, children: [
|
|
3457
|
+
/* @__PURE__ */ I("div", { children: [
|
|
3458
|
+
/* @__PURE__ */ d("div", { className: f.main, children: e }),
|
|
3459
|
+
a && Object.keys(a).map((m) => a[m] ? /* @__PURE__ */ d("div", { className: "prose-p:m-0", children: /* @__PURE__ */ I("p", { className: f.footer, children: [
|
|
3460
|
+
m,
|
|
3461
|
+
": ",
|
|
3462
|
+
a[m]
|
|
3463
|
+
] }) }, `-${m}`) : null),
|
|
3464
|
+
n && n
|
|
3465
|
+
] }),
|
|
3466
|
+
g && /* @__PURE__ */ d("div", { className: f.copyButton, children: /* @__PURE__ */ d(
|
|
3467
|
+
Cr,
|
|
3468
|
+
{
|
|
3469
|
+
noBorder: !0,
|
|
3470
|
+
noBackground: !0,
|
|
3471
|
+
size: "small",
|
|
3472
|
+
mode: i,
|
|
3473
|
+
focusMode: s,
|
|
3474
|
+
label: l ? "Copied to clipboard" : "Copy to clipboard",
|
|
3475
|
+
onClick: u,
|
|
3476
|
+
disabled: l,
|
|
3477
|
+
children: l ? /* @__PURE__ */ d(po, { size: "size-3" }) : /* @__PURE__ */ d(yo, { size: "size-3" })
|
|
3478
|
+
}
|
|
3479
|
+
) })
|
|
3480
|
+
] });
|
|
3481
|
+
}, er = "av-button", Rt = "icon", Ct = "button", pt = "link", wo = ({
|
|
3482
|
+
type: e,
|
|
3483
|
+
size: t,
|
|
3484
|
+
labelRight: r,
|
|
3485
|
+
labelLeft: a,
|
|
3486
|
+
align: n
|
|
3487
|
+
}) => {
|
|
3488
|
+
const o = "max-h-8 py-0 px-2", s = "max-h-9 py-1 px-3", i = "max-h-12 py-2 px-4";
|
|
3489
|
+
switch (e) {
|
|
3490
|
+
case Ct:
|
|
3491
|
+
case pt:
|
|
3492
|
+
return c({
|
|
3493
|
+
[o]: t === "small",
|
|
3494
|
+
[s]: t === "medium",
|
|
3495
|
+
[i]: t === "large"
|
|
3496
|
+
});
|
|
3497
|
+
case Rt:
|
|
3498
|
+
return c("inline-flex items-center", {
|
|
3499
|
+
"justify-center": n === "center",
|
|
3500
|
+
"justify-start": n === "left",
|
|
3501
|
+
"justify-end": n === "right",
|
|
3502
|
+
"h-6 w-6 p-0": t === "small" && !(r || a),
|
|
3503
|
+
"h-6 px-2": t === "small" && (r || a),
|
|
3504
|
+
"h-8 w-8 p-1": t === "medium" && !(r || a),
|
|
3505
|
+
"h-8 px-3": t === "medium" && (r || a),
|
|
3506
|
+
"h-12 w-12 p-2": t === "large" && !(r || a),
|
|
3507
|
+
"h-12 px-4": t === "large" && (r || a)
|
|
3508
|
+
});
|
|
3509
|
+
}
|
|
3510
|
+
}, So = ({
|
|
3511
|
+
type: e,
|
|
3512
|
+
size: t,
|
|
3513
|
+
labelRight: r,
|
|
3514
|
+
labelLeft: a
|
|
3515
|
+
}) => {
|
|
3516
|
+
const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
|
|
3517
|
+
switch (e) {
|
|
3518
|
+
case Ct:
|
|
3519
|
+
case pt:
|
|
3520
|
+
return c({
|
|
3521
|
+
"text-center": e === pt,
|
|
3522
|
+
[n]: t === "small",
|
|
3523
|
+
[o]: t === "medium",
|
|
3524
|
+
[s]: t === "large"
|
|
3525
|
+
});
|
|
3526
|
+
case Rt:
|
|
3527
|
+
return c({
|
|
3528
|
+
[n]: t === "small" && (r || a),
|
|
3529
|
+
[o]: t === "medium" && (r || a),
|
|
3530
|
+
[s]: t === "large" && (r || a)
|
|
3531
|
+
});
|
|
3532
|
+
}
|
|
3533
|
+
}, To = ({
|
|
3534
|
+
mode: e,
|
|
3535
|
+
noBackground: t,
|
|
3536
|
+
noTruncate: r,
|
|
3537
|
+
variant: a
|
|
3538
|
+
}) => {
|
|
3539
|
+
if (t)
|
|
3540
|
+
return "not-prose";
|
|
3541
|
+
if (a === "primary")
|
|
3542
|
+
return c("not-prose", {
|
|
3543
|
+
truncate: !r,
|
|
3544
|
+
"text-copy-light": e === "dark" || e === "system",
|
|
3545
|
+
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
3546
|
+
"dark:text-copy-lighter": e === "system",
|
|
3547
|
+
"dark:text-copy-light": e === "alt-system"
|
|
3548
|
+
});
|
|
3549
|
+
if (a === "secondary")
|
|
3550
|
+
return c("not-prose", {
|
|
3551
|
+
truncate: !r,
|
|
3552
|
+
"text-copy-light": e === "light" || e === "system",
|
|
3553
|
+
"text-copy-lighter": e === "dark" || e === "alt-system",
|
|
3554
|
+
"dark:text-copy-lighter": e === "alt-system",
|
|
3555
|
+
"dark:text-copy-light": e === "system"
|
|
3556
|
+
});
|
|
3557
|
+
if (a === "danger")
|
|
3558
|
+
return c("not-prose", {
|
|
3559
|
+
truncate: !r,
|
|
3560
|
+
"text-copy-light": e === "dark" || e === "system",
|
|
3561
|
+
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
3562
|
+
"dark:text-copy-lighter": e === "system",
|
|
3563
|
+
"dark:text-copy-light": e === "alt-system"
|
|
3564
|
+
});
|
|
3565
|
+
if (a === "selected")
|
|
3566
|
+
return c("not-prose text-copy-lighter", {
|
|
3567
|
+
truncate: !r
|
|
3568
|
+
});
|
|
3569
|
+
}, No = ({
|
|
3570
|
+
mode: e,
|
|
3571
|
+
noBackground: t,
|
|
3572
|
+
variant: r
|
|
3573
|
+
}) => {
|
|
3574
|
+
if (!t) {
|
|
3575
|
+
if (r === "primary")
|
|
3576
|
+
return c({
|
|
3577
|
+
"bg-action-dark": e === "dark",
|
|
3578
|
+
"bg-action-light": e === "light",
|
|
3579
|
+
"bg-action-dark dark:bg-action-light": e === "system",
|
|
3580
|
+
"bg-action-light dark:bg-action-dark": e === "alt-system"
|
|
3581
|
+
});
|
|
3582
|
+
if (r === "secondary")
|
|
3583
|
+
return c({
|
|
3584
|
+
"bg-action-dark": e === "light",
|
|
3585
|
+
"bg-action-light": e === "dark",
|
|
3586
|
+
"bg-action-dark dark:bg-action-light": e === "alt-system",
|
|
3587
|
+
"bg-action-light dark:bg-action-dark": e === "system"
|
|
3588
|
+
});
|
|
3589
|
+
if (r === "danger")
|
|
3590
|
+
return c({
|
|
3591
|
+
"bg-action-danger-dark": e === "dark",
|
|
3592
|
+
"bg-action-danger-light": e === "light",
|
|
3593
|
+
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
3594
|
+
"bg-action-danger-light dark:bg-action-danger-dark": e === "alt-system"
|
|
3595
|
+
});
|
|
3596
|
+
if (r === "selected")
|
|
3597
|
+
return "bg-action-selected-dark";
|
|
3598
|
+
}
|
|
3599
|
+
}, Ro = ({
|
|
3600
|
+
radius: e
|
|
3601
|
+
}) => c({
|
|
3602
|
+
"rounded-full": e === "large",
|
|
3603
|
+
"rounded-md": e === "medium",
|
|
3604
|
+
"rounded-sm": e === "small"
|
|
3605
|
+
}), Co = ({
|
|
3606
|
+
mode: e,
|
|
3607
|
+
disabled: t,
|
|
3608
|
+
variant: r
|
|
3609
|
+
}) => {
|
|
3610
|
+
if (t)
|
|
3611
|
+
return "";
|
|
3612
|
+
if (r === "primary")
|
|
3613
|
+
return c("hover:text-copy-light-hover", {
|
|
3614
|
+
"hover:bg-action-dark-hover": e === "dark",
|
|
3615
|
+
"hover:bg-action-light-hover": e === "light",
|
|
3616
|
+
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
3617
|
+
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
3618
|
+
});
|
|
3619
|
+
if (r === "secondary")
|
|
3620
|
+
return c("hover:text-copy-light-hover", {
|
|
3621
|
+
"hover:bg-action-dark-hover": e === "light",
|
|
3622
|
+
"hover:bg-action-light-hover": e === "dark",
|
|
3623
|
+
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
3624
|
+
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
3625
|
+
});
|
|
3626
|
+
if (r === "danger")
|
|
3627
|
+
return c("hover:text-copy-light-hover", {
|
|
3628
|
+
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
3629
|
+
"hover:bg-action-danger-light-hover": e === "light",
|
|
3630
|
+
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
3631
|
+
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
3632
|
+
});
|
|
3633
|
+
if (r === "selected")
|
|
3634
|
+
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
3635
|
+
}, Io = ({
|
|
3636
|
+
mode: e,
|
|
3637
|
+
disabled: t,
|
|
3638
|
+
variant: r
|
|
3639
|
+
}) => {
|
|
3640
|
+
if (t)
|
|
3641
|
+
return "";
|
|
3642
|
+
if (r === "primary")
|
|
3643
|
+
return c("active:text-copy-light-active", {
|
|
3644
|
+
"active:bg-action-dark-active": e === "dark",
|
|
3645
|
+
"active:bg-action-light-active": e === "light",
|
|
3646
|
+
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
3647
|
+
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
3648
|
+
});
|
|
3649
|
+
if (r === "secondary")
|
|
3650
|
+
return c("active:text-copy-light-active", {
|
|
3651
|
+
"active:bg-action-dark-active": e === "light",
|
|
3652
|
+
"active:bg-action-light-active": e === "dark",
|
|
3653
|
+
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
3654
|
+
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
3655
|
+
});
|
|
3656
|
+
if (r === "danger")
|
|
3657
|
+
return c("active:text-copy-lighter-active", {
|
|
3658
|
+
"active:bg-action-danger-dark-active": e === "dark",
|
|
3659
|
+
"active:bg-action-danger-light-active": e === "light",
|
|
3660
|
+
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
3661
|
+
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
3662
|
+
});
|
|
3663
|
+
if (r === "selected")
|
|
3664
|
+
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
3665
|
+
}, Ao = ({
|
|
3666
|
+
mode: e,
|
|
3667
|
+
noBorder: t,
|
|
3668
|
+
variant: r
|
|
3669
|
+
}) => {
|
|
3670
|
+
if (t)
|
|
3671
|
+
return "border border-transparent";
|
|
3672
|
+
if (r === "primary")
|
|
3673
|
+
return c("border", {
|
|
3674
|
+
"border-border-dark": e === "dark",
|
|
3675
|
+
"border-border-accent": e === "light",
|
|
3676
|
+
"border-border-dark dark:border-border-accent": e === "system",
|
|
3677
|
+
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
3678
|
+
});
|
|
3679
|
+
if (r === "secondary")
|
|
3680
|
+
return c("border", {
|
|
3681
|
+
"border-border-dark": e === "light",
|
|
3682
|
+
"border-border-accent": e === "dark",
|
|
3683
|
+
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
3684
|
+
"border-border-accent dark:border-border-dark": e === "system"
|
|
3685
|
+
});
|
|
3686
|
+
if (r === "danger")
|
|
3687
|
+
return c("border", {
|
|
3688
|
+
"border-border-danger-dark": e === "dark",
|
|
3689
|
+
"border-border-danger-medium": e === "light",
|
|
3690
|
+
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
3691
|
+
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
3692
|
+
});
|
|
3693
|
+
if (r === "selected")
|
|
3694
|
+
return "border border-border-selected-dark";
|
|
3695
|
+
}, Oo = ({
|
|
3696
|
+
focusMode: e
|
|
3697
|
+
}) => c("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
3698
|
+
"focus:outline-focus-dark": e === "dark",
|
|
3699
|
+
"focus:outline-focus-light": e === "light",
|
|
3700
|
+
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
3701
|
+
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
3702
|
+
}), Ar = ({
|
|
3703
|
+
type: e,
|
|
3704
|
+
className: t,
|
|
3705
|
+
raw: r,
|
|
3706
|
+
mode: a,
|
|
3707
|
+
focusMode: n,
|
|
3708
|
+
disabled: o,
|
|
3709
|
+
fullWidth: s,
|
|
3710
|
+
size: i,
|
|
3711
|
+
noBorder: l,
|
|
3712
|
+
labelRight: h,
|
|
3713
|
+
labelLeft: f,
|
|
3714
|
+
noBackground: g,
|
|
3715
|
+
variant: u,
|
|
3716
|
+
noTruncate: m,
|
|
3717
|
+
align: y,
|
|
3718
|
+
radius: b
|
|
3719
|
+
}) => (u || (u = "primary"), r ? c(er, t) : c(
|
|
3720
|
+
er,
|
|
3721
|
+
To({
|
|
3722
|
+
mode: a,
|
|
3723
|
+
variant: u,
|
|
3724
|
+
noBackground: g,
|
|
3725
|
+
noTruncate: m
|
|
3726
|
+
}),
|
|
3727
|
+
No({ mode: a, noBackground: g, variant: u }),
|
|
3728
|
+
Ro({ radius: b }),
|
|
3729
|
+
wo({
|
|
3730
|
+
type: e,
|
|
3731
|
+
size: i,
|
|
3732
|
+
labelRight: h,
|
|
3733
|
+
labelLeft: f,
|
|
3734
|
+
align: y
|
|
3735
|
+
}),
|
|
3736
|
+
So({ type: e, size: i, labelRight: h, labelLeft: f }),
|
|
3737
|
+
Ao({ mode: a, variant: u, noBorder: l }),
|
|
3738
|
+
Oo({ focusMode: n }),
|
|
3739
|
+
Co({ mode: a, variant: u, disabled: o }),
|
|
3740
|
+
Io({ mode: a, variant: u, disabled: o }),
|
|
3741
|
+
{
|
|
3742
|
+
"w-full": s,
|
|
3743
|
+
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
3744
|
+
},
|
|
3745
|
+
t
|
|
3746
|
+
)), Lo = (e, t, r) => {
|
|
3747
|
+
var a;
|
|
3748
|
+
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
3749
|
+
}, It = $.forwardRef((e, t) => {
|
|
3750
|
+
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
3751
|
+
return /* @__PURE__ */ d(
|
|
3752
|
+
"button",
|
|
3753
|
+
{
|
|
3754
|
+
ref: t,
|
|
3755
|
+
onClick: (o) => {
|
|
3756
|
+
Lo(o, a, r);
|
|
3757
|
+
},
|
|
3758
|
+
...n
|
|
3759
|
+
}
|
|
3760
|
+
);
|
|
3761
|
+
});
|
|
3762
|
+
It.displayName = "BaseButton";
|
|
3763
|
+
const Or = $.forwardRef(
|
|
3764
|
+
({
|
|
3765
|
+
children: e,
|
|
3766
|
+
disabled: t = !1,
|
|
3767
|
+
mode: r = "system",
|
|
3768
|
+
focusMode: a = "system",
|
|
3769
|
+
fullWidth: n = !1,
|
|
3770
|
+
className: o,
|
|
3771
|
+
size: s = "medium",
|
|
3772
|
+
raw: i = !1,
|
|
3773
|
+
noBorder: l = !1,
|
|
3774
|
+
variant: h = "primary",
|
|
3775
|
+
noTruncate: f = !1,
|
|
3776
|
+
radius: g = "large",
|
|
3777
|
+
...u
|
|
3778
|
+
}, m) => {
|
|
3779
|
+
const y = Ar({
|
|
3780
|
+
type: Ct,
|
|
3781
|
+
mode: r,
|
|
3782
|
+
focusMode: a,
|
|
3783
|
+
fullWidth: n,
|
|
3784
|
+
disabled: t,
|
|
3785
|
+
raw: i,
|
|
3786
|
+
className: o,
|
|
3787
|
+
size: s,
|
|
3788
|
+
noBorder: l,
|
|
3789
|
+
variant: h,
|
|
3790
|
+
noTruncate: f,
|
|
3791
|
+
radius: g
|
|
3792
|
+
});
|
|
3793
|
+
return /* @__PURE__ */ d(
|
|
3794
|
+
It,
|
|
3795
|
+
{
|
|
3796
|
+
ref: m,
|
|
3797
|
+
className: y,
|
|
3798
|
+
disabled: t,
|
|
3799
|
+
...u,
|
|
3800
|
+
children: e
|
|
3801
|
+
}
|
|
3802
|
+
);
|
|
3803
|
+
}
|
|
3804
|
+
);
|
|
3805
|
+
Or.displayName = "Button";
|
|
3806
|
+
/*!
|
|
3807
|
+
@versini/ui-button v4.0.3
|
|
3808
|
+
© 2025 gizmette.com
|
|
3809
|
+
*/
|
|
3810
|
+
try {
|
|
3811
|
+
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
3812
|
+
version: "4.0.3",
|
|
3813
|
+
buildTime: "01/04/2025 04:09 PM EST",
|
|
3814
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
3815
|
+
license: "MIT"
|
|
3816
|
+
});
|
|
3817
|
+
} catch {
|
|
3818
|
+
}
|
|
3819
|
+
const Bo = $.forwardRef(
|
|
3820
|
+
({
|
|
3821
|
+
children: e,
|
|
3822
|
+
disabled: t = !1,
|
|
3823
|
+
mode: r = "system",
|
|
3824
|
+
focusMode: a = "system",
|
|
3825
|
+
fullWidth: n = !1,
|
|
3826
|
+
className: o,
|
|
3827
|
+
type: s = "button",
|
|
3828
|
+
raw: i = !1,
|
|
3829
|
+
noBorder: l = !1,
|
|
3830
|
+
"aria-label": h,
|
|
3831
|
+
label: f,
|
|
3832
|
+
size: g = "medium",
|
|
3833
|
+
labelRight: u,
|
|
3834
|
+
labelLeft: m,
|
|
3835
|
+
noBackground: y = !1,
|
|
3836
|
+
align: b = "center",
|
|
3837
|
+
active: k = !1,
|
|
3838
|
+
radius: p = "large",
|
|
3839
|
+
...N
|
|
3840
|
+
}, A) => {
|
|
3841
|
+
const R = Ar({
|
|
3842
|
+
type: Rt,
|
|
3843
|
+
mode: r,
|
|
3844
|
+
focusMode: a,
|
|
3845
|
+
fullWidth: n,
|
|
3846
|
+
disabled: t,
|
|
3847
|
+
raw: i,
|
|
3848
|
+
className: o,
|
|
3849
|
+
noBorder: l,
|
|
3850
|
+
size: g,
|
|
3851
|
+
labelRight: u,
|
|
3852
|
+
labelLeft: m,
|
|
3853
|
+
noBackground: y,
|
|
3854
|
+
align: b,
|
|
3855
|
+
radius: p
|
|
3856
|
+
}), E = c({
|
|
3857
|
+
"text-copy-accent-dark": r === "light" && !i,
|
|
3858
|
+
"text-copy-light": r === "dark" && !i,
|
|
3859
|
+
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !i,
|
|
3860
|
+
"text-copy-light dark:text-copy-accent-dark": r === "system" && !i
|
|
3861
|
+
}), C = k ? c(
|
|
3862
|
+
"relative",
|
|
3863
|
+
"focus-within:static",
|
|
3864
|
+
"focus-within:after:border-transparent",
|
|
3865
|
+
"after:absolute",
|
|
3866
|
+
"after:content-['']",
|
|
3867
|
+
"after:border-b-2",
|
|
3868
|
+
"after:bottom-[-4px]",
|
|
3869
|
+
"after:left-0",
|
|
3870
|
+
"after:right-0",
|
|
3871
|
+
{
|
|
3872
|
+
"after:border-table-dark": r === "dark",
|
|
3873
|
+
"after:border-table-light": r === "light",
|
|
3874
|
+
"after:border-table-dark dark:after:border-table-light": r === "system",
|
|
3875
|
+
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
3876
|
+
}
|
|
3877
|
+
) : "";
|
|
3878
|
+
return /* @__PURE__ */ d("div", { className: C, children: /* @__PURE__ */ I(
|
|
3879
|
+
It,
|
|
3880
|
+
{
|
|
3881
|
+
ref: A,
|
|
3882
|
+
className: R,
|
|
3883
|
+
disabled: t,
|
|
3884
|
+
type: s,
|
|
3885
|
+
"aria-label": h || f,
|
|
3886
|
+
...N,
|
|
3887
|
+
children: [
|
|
3888
|
+
m && /* @__PURE__ */ d("span", { className: "pr-2", children: m }),
|
|
3889
|
+
/* @__PURE__ */ d("div", { className: E, children: e }),
|
|
3890
|
+
u && /* @__PURE__ */ d("span", { className: "pl-2", children: u })
|
|
3891
|
+
]
|
|
3892
|
+
}
|
|
3893
|
+
) });
|
|
3894
|
+
}
|
|
3895
|
+
);
|
|
3896
|
+
Bo.displayName = "ButtonSort";
|
|
3897
|
+
const $o = 200, Mo = ({
|
|
3898
|
+
string: e,
|
|
3899
|
+
idealLength: t = $o
|
|
3900
|
+
}) => {
|
|
3901
|
+
if (e.length <= t)
|
|
3902
|
+
return { string: e, isTruncated: !1 };
|
|
3903
|
+
if (e.charAt(t) === " ")
|
|
3904
|
+
return { string: e.slice(0, t), isTruncated: !0 };
|
|
3905
|
+
const r = e.slice(t).search(" ");
|
|
3906
|
+
return {
|
|
3907
|
+
string: e.slice(0, t + r),
|
|
3908
|
+
isTruncated: !0
|
|
3909
|
+
};
|
|
3910
|
+
}, Do = ({
|
|
3911
|
+
children: e,
|
|
3912
|
+
length: t = 200,
|
|
3913
|
+
mode: r = "system",
|
|
3914
|
+
focusMode: a = "system"
|
|
3915
|
+
}) => {
|
|
3916
|
+
const [n, o] = G(!1);
|
|
3917
|
+
if (typeof e != "string")
|
|
3918
|
+
return e;
|
|
3919
|
+
const { string: s, isTruncated: i } = Mo({
|
|
3920
|
+
string: e,
|
|
3921
|
+
idealLength: t
|
|
3922
|
+
});
|
|
3923
|
+
return /* @__PURE__ */ I("span", { style: { wordBreak: "break-word" }, children: [
|
|
3924
|
+
n ? e : s,
|
|
3925
|
+
i && /* @__PURE__ */ d(
|
|
3926
|
+
Or,
|
|
3927
|
+
{
|
|
3928
|
+
mode: r,
|
|
3929
|
+
focusMode: a,
|
|
3930
|
+
className: "ml-2",
|
|
3931
|
+
size: "small",
|
|
3932
|
+
onClick: (l) => {
|
|
3933
|
+
l.preventDefault(), o(!n);
|
|
3934
|
+
},
|
|
3935
|
+
children: n ? "less..." : "more..."
|
|
3936
|
+
}
|
|
3937
|
+
)
|
|
3938
|
+
] });
|
|
3939
|
+
};
|
|
3940
|
+
/*!
|
|
3941
|
+
@versini/ui-truncate v3.0.3
|
|
3942
|
+
© 2025 gizmette.com
|
|
3943
|
+
*/
|
|
3944
|
+
try {
|
|
3945
|
+
window.__VERSINI_UI_TRUNCATE__ || (window.__VERSINI_UI_TRUNCATE__ = {
|
|
3946
|
+
version: "3.0.3",
|
|
3947
|
+
buildTime: "01/04/2025 04:09 PM EST",
|
|
3948
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
3949
|
+
license: "MIT"
|
|
3950
|
+
});
|
|
3951
|
+
} catch {
|
|
3952
|
+
}
|
|
3953
|
+
const tr = lr(
|
|
3954
|
+
() => import(
|
|
3955
|
+
/* webpackChunkName: "LazyMessageAssistant" */
|
|
3956
|
+
"./MessageAssistant.TBLReeCB.js"
|
|
3957
|
+
).then((e) => e.MessageAssistant)
|
|
3958
|
+
), Vo = () => {
|
|
3959
|
+
const { state: e } = P(ve);
|
|
3960
|
+
return /* @__PURE__ */ I("div", { className: "space-y-6 mt-2", children: [
|
|
3961
|
+
e && e.messages.length > 0 && e.messages.map((t, r) => {
|
|
3962
|
+
const { role: a, content: n, name: o, processingTime: s } = t.message;
|
|
3963
|
+
return (a === we || a === vt) && n ? /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(tr, { name: o, processingTime: s, children: n }) }, `${r}-${a}`) : a === nt && n ? /* @__PURE__ */ d(
|
|
3964
|
+
xo,
|
|
3965
|
+
{
|
|
3966
|
+
kind: "right",
|
|
3967
|
+
copyToClipboard: n,
|
|
3968
|
+
copyToClipboardFocusMode: "light",
|
|
3969
|
+
children: /* @__PURE__ */ d(Do, { mode: "light", focusMode: "light", children: n })
|
|
3970
|
+
},
|
|
3971
|
+
`${r}-${a}`
|
|
3972
|
+
) : null;
|
|
3973
|
+
}),
|
|
3974
|
+
Wr(nt, e) && /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(tr, { loading: !0 }) })
|
|
3975
|
+
] });
|
|
3976
|
+
}, zo = () => {
|
|
3977
|
+
const { isAuthenticated: e } = Me(), { state: t } = P(ve), [r, a] = G(!1), [n, o] = ha(), s = jr({
|
|
3978
|
+
isAuthenticated: e,
|
|
3979
|
+
extraClass: "rounded-b-md"
|
|
3980
|
+
}), i = S(!1), l = Z(() => {
|
|
3981
|
+
const f = n.current;
|
|
3982
|
+
if (f) {
|
|
3983
|
+
const { scrollHeight: g, clientHeight: u, scrollTop: m } = f, y = g - u - m;
|
|
3984
|
+
f.scrollBy({
|
|
3985
|
+
top: y,
|
|
3986
|
+
behavior: "smooth"
|
|
3987
|
+
});
|
|
3988
|
+
}
|
|
3989
|
+
}, [n]), h = Z(() => {
|
|
3990
|
+
const f = n.current;
|
|
3991
|
+
if (f) {
|
|
3992
|
+
const { scrollTop: g, scrollHeight: u, clientHeight: m } = f, y = u > m, b = g + m >= u - 1;
|
|
3993
|
+
a(y && !b);
|
|
3994
|
+
}
|
|
3995
|
+
}, [n]);
|
|
3996
|
+
return fe(() => {
|
|
3997
|
+
o && o.width && t && !t.streaming && h();
|
|
3998
|
+
}, [o, t, h]), L(() => {
|
|
3999
|
+
const f = n.current;
|
|
4000
|
+
if (f)
|
|
4001
|
+
return f.addEventListener("scroll", h), () => f.removeEventListener("scroll", h);
|
|
4002
|
+
}, [h, n]), L(() => {
|
|
4003
|
+
t && t.streaming && h();
|
|
4004
|
+
}, [t, h]), L(() => {
|
|
4005
|
+
t && (!i.current && t.streaming && l(), i.current = !!t.streaming);
|
|
4006
|
+
}, [t, l]), /* @__PURE__ */ I("div", { className: s, ref: n, children: [
|
|
4007
|
+
r && /* @__PURE__ */ d("div", { className: "bottom-44 z-40 fixed left-1/2 transform -translate-x-1/2", children: /* @__PURE__ */ d(
|
|
4008
|
+
ir,
|
|
4009
|
+
{
|
|
4010
|
+
className: c(
|
|
4011
|
+
"dark:bg-slate-50 dark:hover:bg-slate-300 dark:active:bg-slate-400",
|
|
4012
|
+
"bg-slate-500 hover:bg-slate-600 active:bg-slate-700"
|
|
4013
|
+
),
|
|
4014
|
+
noBorder: !0,
|
|
4015
|
+
size: "medium",
|
|
4016
|
+
mode: "dark",
|
|
4017
|
+
onClick: l,
|
|
4018
|
+
children: /* @__PURE__ */ d(
|
|
4019
|
+
aa,
|
|
4020
|
+
{
|
|
4021
|
+
monotone: !0,
|
|
4022
|
+
size: "size-4",
|
|
4023
|
+
className: "dark:text-copy-dark text-copy-lighter"
|
|
4024
|
+
}
|
|
4025
|
+
)
|
|
4026
|
+
}
|
|
4027
|
+
) }),
|
|
4028
|
+
/* @__PURE__ */ d(qr, {}),
|
|
4029
|
+
e && /* @__PURE__ */ d(Vo, {})
|
|
4030
|
+
] });
|
|
4031
|
+
}, Uo = lr(
|
|
4032
|
+
() => import(
|
|
4033
|
+
/* webpackChunkName: "LazyHeader" */
|
|
4034
|
+
"./HeaderToolbar.BlpFAHv2.js"
|
|
4035
|
+
)
|
|
4036
|
+
);
|
|
4037
|
+
function Lr({ isComponent: e = !1 }) {
|
|
4038
|
+
const { isAuthenticated: t } = Me(), [r] = Ut({
|
|
4039
|
+
key: Dt + Jr,
|
|
4040
|
+
initialValue: ""
|
|
4041
|
+
}), [a] = Ut({
|
|
4042
|
+
key: Dt + Yr,
|
|
4043
|
+
initialValue: Ee.ASC
|
|
4044
|
+
}), [n, o] = Be(Ua, {
|
|
4045
|
+
id: xt(),
|
|
4046
|
+
model: Se,
|
|
4047
|
+
engine: Se,
|
|
4048
|
+
usage: 0,
|
|
4049
|
+
messages: [],
|
|
4050
|
+
prompts: [],
|
|
4051
|
+
isComponent: e
|
|
4052
|
+
}), [s, i] = Be(Pa, {
|
|
4053
|
+
searchString: r,
|
|
4054
|
+
sortedCell: "timestamp",
|
|
4055
|
+
sortDirection: a
|
|
4056
|
+
}), [l, h] = Be(Ha, {
|
|
4057
|
+
prompt: ""
|
|
4058
|
+
});
|
|
4059
|
+
return L(() => {
|
|
4060
|
+
var g;
|
|
4061
|
+
(g = document.getElementById("logo")) == null || g.classList.add("fadeOut"), setTimeout(() => {
|
|
4062
|
+
var u;
|
|
4063
|
+
(u = document.getElementById("root")) == null || u.classList.replace("app-hidden", "fadeIn");
|
|
4064
|
+
}, 500);
|
|
4065
|
+
}), /* @__PURE__ */ d(ve.Provider, { value: { state: n, dispatch: o }, children: /* @__PURE__ */ d(
|
|
4066
|
+
Fa.Provider,
|
|
4067
|
+
{
|
|
4068
|
+
value: {
|
|
4069
|
+
state: s,
|
|
4070
|
+
dispatch: i
|
|
4071
|
+
},
|
|
4072
|
+
children: /* @__PURE__ */ I(
|
|
4073
|
+
wt.Provider,
|
|
4074
|
+
{
|
|
4075
|
+
value: { state: l, dispatch: h },
|
|
4076
|
+
children: [
|
|
4077
|
+
/* @__PURE__ */ d(
|
|
4078
|
+
oa,
|
|
4079
|
+
{
|
|
4080
|
+
noColors: !0,
|
|
4081
|
+
noMargin: !0,
|
|
4082
|
+
noPadding: !0,
|
|
4083
|
+
noBorder: !0,
|
|
4084
|
+
className: Mt({
|
|
4085
|
+
extraClass: "mt-5"
|
|
4086
|
+
}),
|
|
4087
|
+
children: t && /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("div", {}), children: /* @__PURE__ */ d(Uo, {}) })
|
|
4088
|
+
}
|
|
4089
|
+
),
|
|
4090
|
+
/* @__PURE__ */ d(
|
|
4091
|
+
Kr,
|
|
4092
|
+
{
|
|
4093
|
+
className: Mt({
|
|
4094
|
+
extraClass: "max-h-[calc(100svh_-_250px)]"
|
|
4095
|
+
}),
|
|
4096
|
+
noMargin: !0,
|
|
4097
|
+
noPadding: !0,
|
|
4098
|
+
children: /* @__PURE__ */ d(zo, {})
|
|
4099
|
+
}
|
|
4100
|
+
),
|
|
4101
|
+
/* @__PURE__ */ d(ro, {})
|
|
4102
|
+
]
|
|
4103
|
+
}
|
|
4104
|
+
)
|
|
4105
|
+
}
|
|
4106
|
+
) });
|
|
4107
|
+
}
|
|
4108
|
+
Lr.displayName = "App";
|
|
4109
|
+
const ts = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Lr }, Symbol.toStringTag, { value: "Module" }));
|
|
4110
|
+
export {
|
|
4111
|
+
ts as App,
|
|
4112
|
+
ve as AppContext,
|
|
4113
|
+
Ut as E,
|
|
4114
|
+
Fa as HistoryContext,
|
|
4115
|
+
fn as NewChatButton,
|
|
4116
|
+
yr as Pe,
|
|
4117
|
+
ze as SERVICE_TYPES,
|
|
4118
|
+
qo as be,
|
|
4119
|
+
Ee as f,
|
|
4120
|
+
Wo as ge,
|
|
4121
|
+
jo as he,
|
|
4122
|
+
$a as ie,
|
|
4123
|
+
xo as le,
|
|
4124
|
+
Ko as me,
|
|
4125
|
+
gn as serviceCall,
|
|
4126
|
+
Jo as ue,
|
|
4127
|
+
Qo as useChatsHistory,
|
|
4128
|
+
Zo as usePreloadChatsHistory,
|
|
4129
|
+
es as useServerCapabilities,
|
|
4130
|
+
Xo as useUserChatStats,
|
|
4131
|
+
Qn as useUserPreferences,
|
|
4132
|
+
Yo as ye
|
|
4133
|
+
};
|