@versini/sassysaint 5.5.11 → 5.5.13
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.CbBMiVHr.js → App.CgE9Asbd.js} +217 -192
- package/dist/chunks/{HeaderToolbar.CmGmS7yq.js → HeaderToolbar.C26uPJv0.js} +784 -805
- package/dist/chunks/{MarkdownWithExtra.bpTOaT-U.js → MarkdownWithExtra.wbV_UGsm.js} +8 -8
- package/dist/chunks/{MessageAssistant.C_sIDCZ4.js → MessageAssistant.CKmbS3S7.js} +6 -6
- package/dist/chunks/{index.CTyCRIB4.js → index.UQ480MwW.js} +66 -88
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +4 -4
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as o, jsxs as k, Fragment as M } from "react/jsx-runtime";
|
|
2
|
-
import { g as z, R as
|
|
3
|
-
import { AppContext as
|
|
2
|
+
import { g as z, R as P, CARDS as I, renderDataAsList as he, pluralize as ge, ABOUT_TITLE as Ot, L as q, j as A, C as H, un as Z, LOCAL_STORAGE_PREFIX as ce, LOCAL_STORAGE_SORT as Vt, P as X, ACTION_RESET as Qe, ACTION_RESTORE as $t, ACTION_SORT as De, LOCAL_STORAGE_SEARCH as Dt, ye as Ee, ACTION_SEARCH as Ht, debounce as Ft, HISTORY_TITLE as Gt, M as Ut, z as He, durationFormatter as jt, PROFILE_TITLE as Wt, TAGS_DESCRIPTION as Kt, ACTION_SET_TAGS as Yt, DEFAULT_AI_ENGINE as me, LOCAL_STORAGE_ENGINE_TOGGLE as Xe, LOCAL_STORAGE_CHAT_DETAILS as qt, SETTINGS_TITLE as Zt, ENGINE_OPENAI as ne, ENGINE_ANTHROPIC as Q, APP_NAME as Qt, ACTION_ENGINE as Je, getCurrentGeoLocation as Xt, LOG_OUT as Fe } from "./index.UQ480MwW.js";
|
|
3
|
+
import { AppContext as ve, HistoryContext as et, E as le, ge as Jt, he as er, ue as Ne, ye as tr, le as D, me as rr, be as or, serviceCall as O, SERVICE_TYPES as V, f as K, TagsContext as ar, Pe as Ge, NewChatButton as nr } from "./App.CgE9Asbd.js";
|
|
4
4
|
import * as g from "react";
|
|
5
|
-
import
|
|
5
|
+
import E, { useId as ze, forwardRef as tt, useState as _, useRef as J, useContext as $, useEffect as F } from "react";
|
|
6
6
|
import w from "clsx";
|
|
7
|
-
import { useFloatingTree as
|
|
8
|
-
const
|
|
7
|
+
import { useFloatingTree as rt, useFloatingNodeId as sr, useListItem as ot, useFloating as at, offset as ir, flip as cr, shift as lr, autoUpdate as dr, useClick as nt, useRole as st, useDismiss as it, useListNavigation as ur, useTypeahead as mr, useInteractions as ct, useMergeRefs as Le, FloatingNode as hr, FloatingList as gr, FloatingPortal as lt, FloatingFocusManager as dt, FloatingTree as fr, FloatingOverlay as pr } from "@floating-ui/react";
|
|
8
|
+
const ut = ({
|
|
9
9
|
className: e,
|
|
10
10
|
viewBox: t,
|
|
11
11
|
title: r,
|
|
@@ -22,7 +22,7 @@ const mt = ({
|
|
|
22
22
|
...n,
|
|
23
23
|
children: /* @__PURE__ */ o("path", { d: "m147.487 0l70.081 175.78H256L185.919 0zM66.183 106.221l23.98-61.774l23.98 61.774zM70.07 0L0 175.78h39.18l14.33-36.914h73.308l14.328 36.914h39.179L110.255 0z" })
|
|
24
24
|
}
|
|
25
|
-
),
|
|
25
|
+
), br = ({
|
|
26
26
|
className: e,
|
|
27
27
|
viewBox: t,
|
|
28
28
|
title: r,
|
|
@@ -48,7 +48,7 @@ const mt = ({
|
|
|
48
48
|
/* @__PURE__ */ o("path", { d: "M32 0H192c17.7 0 32 14.3 32 32s-14.3 32-32 32H109.3L342.6 297.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L64 109.3V192c0 17.7-14.3 32-32 32s-32-14.3-32-32V32C0 14.3 14.3 0 32 0z" })
|
|
49
49
|
]
|
|
50
50
|
}
|
|
51
|
-
),
|
|
51
|
+
), vr = ({
|
|
52
52
|
className: e,
|
|
53
53
|
viewBox: t,
|
|
54
54
|
title: r,
|
|
@@ -74,7 +74,7 @@ const mt = ({
|
|
|
74
74
|
/* @__PURE__ */ o("path", { d: "M163.8 0c-12.1 0-23.2 6.8-28.6 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8z" })
|
|
75
75
|
]
|
|
76
76
|
}
|
|
77
|
-
),
|
|
77
|
+
), yr = ({
|
|
78
78
|
className: e,
|
|
79
79
|
viewBox: t,
|
|
80
80
|
title: r,
|
|
@@ -100,7 +100,7 @@ const mt = ({
|
|
|
100
100
|
/* @__PURE__ */ o("path", { d: "M392.4 21.7L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0zM339.7 74.3L172.4 241.7c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3z" })
|
|
101
101
|
]
|
|
102
102
|
}
|
|
103
|
-
),
|
|
103
|
+
), kr = ({
|
|
104
104
|
className: e,
|
|
105
105
|
viewBox: t,
|
|
106
106
|
title: r,
|
|
@@ -126,7 +126,7 @@ const mt = ({
|
|
|
126
126
|
/* @__PURE__ */ o("path", { d: "M256 128c13.3 0 24 10.7 24 24v94.1l65 65c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-72-72c-4.5-4.5-7-10.6-7-17V152c0-13.3 10.7-24 24-24z" })
|
|
127
127
|
]
|
|
128
128
|
}
|
|
129
|
-
),
|
|
129
|
+
), wr = ({
|
|
130
130
|
className: e,
|
|
131
131
|
viewBox: t,
|
|
132
132
|
title: r,
|
|
@@ -152,7 +152,7 @@ const mt = ({
|
|
|
152
152
|
/* @__PURE__ */ o("path", { d: "M256 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM192 248c0-13.3 10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h24V272H216c-13.3 0-24-10.7-24-24z" })
|
|
153
153
|
]
|
|
154
154
|
}
|
|
155
|
-
),
|
|
155
|
+
), mt = ({
|
|
156
156
|
className: e,
|
|
157
157
|
viewBox: t,
|
|
158
158
|
title: r,
|
|
@@ -175,7 +175,7 @@ const mt = ({
|
|
|
175
175
|
}
|
|
176
176
|
)
|
|
177
177
|
}
|
|
178
|
-
),
|
|
178
|
+
), xr = ({
|
|
179
179
|
className: e,
|
|
180
180
|
viewBox: t,
|
|
181
181
|
title: r,
|
|
@@ -201,7 +201,7 @@ const mt = ({
|
|
|
201
201
|
/* @__PURE__ */ o("path", { d: "M176 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16H272c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80H144z" })
|
|
202
202
|
]
|
|
203
203
|
}
|
|
204
|
-
),
|
|
204
|
+
), Cr = ({
|
|
205
205
|
className: e,
|
|
206
206
|
viewBox: t,
|
|
207
207
|
title: r,
|
|
@@ -227,7 +227,7 @@ const mt = ({
|
|
|
227
227
|
/* @__PURE__ */ o("path", { d: "M64 128c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64H64zm32 64H288c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32z" })
|
|
228
228
|
]
|
|
229
229
|
}
|
|
230
|
-
),
|
|
230
|
+
), Nr = ({
|
|
231
231
|
className: e,
|
|
232
232
|
viewBox: t,
|
|
233
233
|
title: r,
|
|
@@ -244,7 +244,7 @@ const mt = ({
|
|
|
244
244
|
...n,
|
|
245
245
|
children: /* @__PURE__ */ o("path", { d: "M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z" })
|
|
246
246
|
}
|
|
247
|
-
),
|
|
247
|
+
), Tr = ({
|
|
248
248
|
className: e,
|
|
249
249
|
viewBox: t,
|
|
250
250
|
title: r,
|
|
@@ -278,7 +278,7 @@ const mt = ({
|
|
|
278
278
|
]
|
|
279
279
|
}
|
|
280
280
|
);
|
|
281
|
-
function
|
|
281
|
+
function fe(e) {
|
|
282
282
|
return ze();
|
|
283
283
|
}
|
|
284
284
|
const Ie = g.createContext({
|
|
@@ -301,85 +301,85 @@ const Ie = g.createContext({
|
|
|
301
301
|
return t.displayName || t.name || "Component";
|
|
302
302
|
}
|
|
303
303
|
return "Element";
|
|
304
|
-
},
|
|
304
|
+
}, ht = tt(
|
|
305
305
|
({
|
|
306
306
|
trigger: e,
|
|
307
307
|
children: t,
|
|
308
308
|
label: r = "Open menu",
|
|
309
309
|
defaultPlacement: a = "bottom-start",
|
|
310
310
|
onOpenChange: n,
|
|
311
|
-
mode:
|
|
312
|
-
focusMode:
|
|
311
|
+
mode: i = "system",
|
|
312
|
+
focusMode: s = "system",
|
|
313
313
|
...c
|
|
314
314
|
}, m) => {
|
|
315
|
-
const [l,
|
|
315
|
+
const [l, u] = _(!1), [f, p] = _(!1), [b, h] = _(null), d = J([]), v = J([]), x = $(Ie), C = rt(), y = sr(), T = ot(), { floatingStyles: S, refs: L, context: R } = at({
|
|
316
316
|
nodeId: y,
|
|
317
317
|
open: l,
|
|
318
318
|
onOpenChange: (ae) => {
|
|
319
|
-
|
|
319
|
+
u(ae), n == null || n(ae);
|
|
320
320
|
},
|
|
321
321
|
placement: a,
|
|
322
322
|
strategy: "fixed",
|
|
323
|
-
middleware: [
|
|
324
|
-
whileElementsMounted:
|
|
325
|
-
}),
|
|
323
|
+
middleware: [ir({ mainAxis: 10 }), cr(), lr()],
|
|
324
|
+
whileElementsMounted: dr
|
|
325
|
+
}), N = nt(R, {
|
|
326
326
|
event: "mousedown",
|
|
327
327
|
toggle: !0,
|
|
328
328
|
ignoreMouse: !1
|
|
329
|
-
}),
|
|
330
|
-
listRef:
|
|
329
|
+
}), G = st(R, { role: "menu" }), U = it(R, { bubbles: !0 }), j = ur(R, {
|
|
330
|
+
listRef: d,
|
|
331
331
|
activeIndex: b,
|
|
332
332
|
nested: !1,
|
|
333
333
|
onNavigate: h,
|
|
334
334
|
loop: !0
|
|
335
|
-
}), re =
|
|
335
|
+
}), re = mr(R, {
|
|
336
336
|
listRef: v,
|
|
337
337
|
onMatch: l ? h : void 0,
|
|
338
338
|
activeIndex: b
|
|
339
|
-
}), { getReferenceProps: oe, getFloatingProps:
|
|
340
|
-
noInternalClick:
|
|
341
|
-
focusMode:
|
|
342
|
-
mode:
|
|
343
|
-
} : {},
|
|
339
|
+
}), { getReferenceProps: oe, getFloatingProps: Ce, getItemProps: B } = ct([N, G, U, j, re]), $e = Ue(e) === "Button" || Ue(e) === "ButtonIcon", Bt = $e ? {
|
|
340
|
+
noInternalClick: $e,
|
|
341
|
+
focusMode: s,
|
|
342
|
+
mode: i
|
|
343
|
+
} : {}, Pt = E.cloneElement(
|
|
344
344
|
e,
|
|
345
345
|
{
|
|
346
346
|
...Bt,
|
|
347
347
|
"aria-label": r,
|
|
348
348
|
"data-open": l ? "" : void 0,
|
|
349
349
|
"data-focus-inside": f ? "" : void 0,
|
|
350
|
-
ref: Le([
|
|
350
|
+
ref: Le([L.setReference, T.ref, m]),
|
|
351
351
|
...oe(
|
|
352
|
-
|
|
352
|
+
x.getItemProps({
|
|
353
353
|
...c
|
|
354
354
|
})
|
|
355
355
|
)
|
|
356
356
|
}
|
|
357
357
|
);
|
|
358
|
-
return
|
|
359
|
-
if (!
|
|
358
|
+
return F(() => {
|
|
359
|
+
if (!C)
|
|
360
360
|
return;
|
|
361
361
|
function ae() {
|
|
362
|
-
|
|
362
|
+
u(!1), n == null || n(!1);
|
|
363
363
|
}
|
|
364
|
-
return
|
|
365
|
-
|
|
364
|
+
return C.events.on("click", ae), () => {
|
|
365
|
+
C.events.off("click", ae);
|
|
366
366
|
};
|
|
367
|
-
}, [
|
|
368
|
-
l &&
|
|
369
|
-
}, [
|
|
370
|
-
|
|
367
|
+
}, [C, n]), F(() => {
|
|
368
|
+
l && C && C.events.emit("menuopen", { nodeId: y });
|
|
369
|
+
}, [C, l, y]), /* @__PURE__ */ k(hr, { id: y, children: [
|
|
370
|
+
Pt,
|
|
371
371
|
/* @__PURE__ */ o(
|
|
372
372
|
Ie.Provider,
|
|
373
373
|
{
|
|
374
374
|
value: {
|
|
375
375
|
activeIndex: b,
|
|
376
376
|
setActiveIndex: h,
|
|
377
|
-
getItemProps:
|
|
377
|
+
getItemProps: B,
|
|
378
378
|
setHasFocusInside: p,
|
|
379
379
|
isOpen: l
|
|
380
380
|
},
|
|
381
|
-
children: /* @__PURE__ */ o(
|
|
382
|
-
|
|
381
|
+
children: /* @__PURE__ */ o(gr, { elementsRef: d, labelsRef: v, children: l && /* @__PURE__ */ o(lt, { children: /* @__PURE__ */ o(
|
|
382
|
+
dt,
|
|
383
383
|
{
|
|
384
384
|
context: R,
|
|
385
385
|
modal: !1,
|
|
@@ -388,10 +388,10 @@ const Ie = g.createContext({
|
|
|
388
388
|
children: /* @__PURE__ */ o(
|
|
389
389
|
"div",
|
|
390
390
|
{
|
|
391
|
-
ref:
|
|
391
|
+
ref: L.setFloating,
|
|
392
392
|
className: "rounded-md bg-surface-light p-4 shadow-sm shadow-border-dark outline-none sm:p-2",
|
|
393
|
-
style:
|
|
394
|
-
...
|
|
393
|
+
style: S,
|
|
394
|
+
...Ce(),
|
|
395
395
|
children: t
|
|
396
396
|
}
|
|
397
397
|
)
|
|
@@ -401,9 +401,9 @@ const Ie = g.createContext({
|
|
|
401
401
|
)
|
|
402
402
|
] });
|
|
403
403
|
}
|
|
404
|
-
),
|
|
405
|
-
|
|
406
|
-
|
|
404
|
+
), _e = tt((e, t) => /* @__PURE__ */ o(fr, { children: /* @__PURE__ */ o(ht, { ...e, ref: t }) }));
|
|
405
|
+
_e.displayName = "Menu";
|
|
406
|
+
ht.displayName = "MenuComponent";
|
|
407
407
|
const W = g.forwardRef(
|
|
408
408
|
({
|
|
409
409
|
label: e,
|
|
@@ -411,11 +411,11 @@ const W = g.forwardRef(
|
|
|
411
411
|
icon: r,
|
|
412
412
|
raw: a = !1,
|
|
413
413
|
children: n,
|
|
414
|
-
ignoreClick:
|
|
415
|
-
...
|
|
414
|
+
ignoreClick: i = !1,
|
|
415
|
+
...s
|
|
416
416
|
}, c) => {
|
|
417
417
|
let m = "";
|
|
418
|
-
const l = g.useContext(Ie),
|
|
418
|
+
const l = g.useContext(Ie), u = ot({ label: t ? null : e }), f = rt(), p = Le([u.ref, c]);
|
|
419
419
|
return a && n ? /* @__PURE__ */ o(
|
|
420
420
|
"div",
|
|
421
421
|
{
|
|
@@ -423,7 +423,7 @@ const W = g.forwardRef(
|
|
|
423
423
|
...l.getItemProps({
|
|
424
424
|
onClick(b) {
|
|
425
425
|
var h;
|
|
426
|
-
|
|
426
|
+
i || ((h = s.onClick) == null || h.call(s, b), f == null || f.events.emit("click"));
|
|
427
427
|
}
|
|
428
428
|
}),
|
|
429
429
|
children: n
|
|
@@ -431,7 +431,7 @@ const W = g.forwardRef(
|
|
|
431
431
|
) : (r && (m = "pl-2"), /* @__PURE__ */ k(
|
|
432
432
|
"button",
|
|
433
433
|
{
|
|
434
|
-
...
|
|
434
|
+
...s,
|
|
435
435
|
ref: p,
|
|
436
436
|
role: "menuitem",
|
|
437
437
|
className: "m-0 flex w-full rounded-md border border-transparent bg-none px-2 py-2 text-left text-base outline-none focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline disabled:cursor-not-allowed disabled:text-copy-medium sm:py-1",
|
|
@@ -440,11 +440,11 @@ const W = g.forwardRef(
|
|
|
440
440
|
...l.getItemProps({
|
|
441
441
|
onClick(b) {
|
|
442
442
|
var h;
|
|
443
|
-
|
|
443
|
+
i || ((h = s.onClick) == null || h.call(s, b), f == null || f.events.emit("click"));
|
|
444
444
|
},
|
|
445
445
|
onFocus(b) {
|
|
446
446
|
var h;
|
|
447
|
-
(h =
|
|
447
|
+
(h = s.onFocus) == null || h.call(s, b), l.setHasFocusInside(!0);
|
|
448
448
|
}
|
|
449
449
|
}),
|
|
450
450
|
children: [
|
|
@@ -456,70 +456,70 @@ const W = g.forwardRef(
|
|
|
456
456
|
}
|
|
457
457
|
);
|
|
458
458
|
W.displayName = "MenuItem";
|
|
459
|
-
const
|
|
459
|
+
const Er = ({ className: e, ...t }) => {
|
|
460
460
|
const r = w(e, "my-1 border-t border-border-medium");
|
|
461
461
|
return /* @__PURE__ */ o("div", { className: r, ...t });
|
|
462
462
|
};
|
|
463
463
|
/*!
|
|
464
|
-
@versini/ui-menu
|
|
464
|
+
@versini/ui-menu v3.0.0
|
|
465
465
|
© 2025 gizmette.com
|
|
466
466
|
*/
|
|
467
467
|
try {
|
|
468
468
|
window.__VERSINI_UI_MENU__ || (window.__VERSINI_UI_MENU__ = {
|
|
469
|
-
version: "
|
|
470
|
-
buildTime: "01/
|
|
469
|
+
version: "3.0.0",
|
|
470
|
+
buildTime: "01/03/2025 10:45 AM EST",
|
|
471
471
|
homepage: "https://github.com/aversini/ui-components",
|
|
472
472
|
license: "MIT"
|
|
473
473
|
});
|
|
474
474
|
} catch {
|
|
475
475
|
}
|
|
476
476
|
/*!
|
|
477
|
-
@versini/ui-togglegroup
|
|
477
|
+
@versini/ui-togglegroup v3.0.0
|
|
478
478
|
© 2025 gizmette.com
|
|
479
479
|
*/
|
|
480
480
|
try {
|
|
481
481
|
window.__VERSINI_UI_TOGGLEGROUP__ || (window.__VERSINI_UI_TOGGLEGROUP__ = {
|
|
482
|
-
version: "
|
|
483
|
-
buildTime: "01/
|
|
482
|
+
version: "3.0.0",
|
|
483
|
+
buildTime: "01/03/2025 10:45 AM EST",
|
|
484
484
|
homepage: "https://github.com/aversini/ui-components",
|
|
485
485
|
license: "MIT"
|
|
486
486
|
});
|
|
487
487
|
} catch {
|
|
488
488
|
}
|
|
489
|
-
const
|
|
490
|
-
function
|
|
489
|
+
const Ir = "av-togglegroup", _r = "av-togglegroup-item-wrapper", Sr = "av-togglegroup-item";
|
|
490
|
+
function Be(e, t = []) {
|
|
491
491
|
let r = [];
|
|
492
|
-
function a(
|
|
493
|
-
const c = g.createContext(
|
|
494
|
-
r = [...r,
|
|
492
|
+
function a(i, s) {
|
|
493
|
+
const c = g.createContext(s), m = r.length;
|
|
494
|
+
r = [...r, s];
|
|
495
495
|
const l = (f) => {
|
|
496
496
|
var p;
|
|
497
|
-
const { scope: b, children: h, ...
|
|
498
|
-
return /* @__PURE__ */ o(v.Provider, { value:
|
|
497
|
+
const { scope: b, children: h, ...d } = f, v = ((p = b == null ? void 0 : b[e]) == null ? void 0 : p[m]) || c, x = g.useMemo(() => d, Object.values(d));
|
|
498
|
+
return /* @__PURE__ */ o(v.Provider, { value: x, children: h });
|
|
499
499
|
};
|
|
500
|
-
l.displayName =
|
|
501
|
-
function
|
|
500
|
+
l.displayName = i + "Provider";
|
|
501
|
+
function u(f, p) {
|
|
502
502
|
var b;
|
|
503
|
-
const h = ((b = p == null ? void 0 : p[e]) == null ? void 0 : b[m]) || c,
|
|
504
|
-
if (
|
|
505
|
-
if (
|
|
506
|
-
throw new Error(`\`${f}\` must be used within \`${
|
|
503
|
+
const h = ((b = p == null ? void 0 : p[e]) == null ? void 0 : b[m]) || c, d = g.useContext(h);
|
|
504
|
+
if (d) return d;
|
|
505
|
+
if (s !== void 0) return s;
|
|
506
|
+
throw new Error(`\`${f}\` must be used within \`${i}\``);
|
|
507
507
|
}
|
|
508
|
-
return [l,
|
|
508
|
+
return [l, u];
|
|
509
509
|
}
|
|
510
510
|
const n = () => {
|
|
511
|
-
const
|
|
512
|
-
return function(
|
|
513
|
-
const c = (
|
|
511
|
+
const i = r.map((s) => g.createContext(s));
|
|
512
|
+
return function(s) {
|
|
513
|
+
const c = (s == null ? void 0 : s[e]) || i;
|
|
514
514
|
return g.useMemo(
|
|
515
|
-
() => ({ [`__scope${e}`]: { ...
|
|
516
|
-
[
|
|
515
|
+
() => ({ [`__scope${e}`]: { ...s, [e]: c } }),
|
|
516
|
+
[s, c]
|
|
517
517
|
);
|
|
518
518
|
};
|
|
519
519
|
};
|
|
520
|
-
return n.scopeName = e, [a,
|
|
520
|
+
return n.scopeName = e, [a, Rr(n, ...t)];
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function Rr(...e) {
|
|
523
523
|
const t = e[0];
|
|
524
524
|
if (e.length === 1) return t;
|
|
525
525
|
const r = () => {
|
|
@@ -528,11 +528,11 @@ function Pr(...e) {
|
|
|
528
528
|
scopeName: n.scopeName
|
|
529
529
|
}));
|
|
530
530
|
return function(n) {
|
|
531
|
-
const
|
|
531
|
+
const i = a.reduce((s, { useScope: c, scopeName: m }) => {
|
|
532
532
|
const l = c(n)[`__scope${m}`];
|
|
533
|
-
return { ...
|
|
533
|
+
return { ...s, ...l };
|
|
534
534
|
}, {});
|
|
535
|
-
return g.useMemo(() => ({ [`__scope${t.scopeName}`]:
|
|
535
|
+
return g.useMemo(() => ({ [`__scope${t.scopeName}`]: i }), [i]);
|
|
536
536
|
};
|
|
537
537
|
};
|
|
538
538
|
return r.scopeName = t.scopeName, r;
|
|
@@ -542,67 +542,67 @@ function je(e, t) {
|
|
|
542
542
|
return e(t);
|
|
543
543
|
e != null && (e.current = t);
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function gt(...e) {
|
|
546
546
|
return (t) => {
|
|
547
547
|
let r = !1;
|
|
548
548
|
const a = e.map((n) => {
|
|
549
|
-
const
|
|
550
|
-
return !r && typeof
|
|
549
|
+
const i = je(n, t);
|
|
550
|
+
return !r && typeof i == "function" && (r = !0), i;
|
|
551
551
|
});
|
|
552
552
|
if (r)
|
|
553
553
|
return () => {
|
|
554
554
|
for (let n = 0; n < a.length; n++) {
|
|
555
|
-
const
|
|
556
|
-
typeof
|
|
555
|
+
const i = a[n];
|
|
556
|
+
typeof i == "function" ? i() : je(e[n], null);
|
|
557
557
|
}
|
|
558
558
|
};
|
|
559
559
|
};
|
|
560
560
|
}
|
|
561
|
-
function
|
|
562
|
-
return g.useCallback(
|
|
561
|
+
function Se(...e) {
|
|
562
|
+
return g.useCallback(gt(...e), e);
|
|
563
563
|
}
|
|
564
|
-
var
|
|
565
|
-
const { children: r, ...a } = e, n = g.Children.toArray(r),
|
|
566
|
-
if (
|
|
567
|
-
const
|
|
568
|
-
return /* @__PURE__ */ o(Re, { ...a, ref: t, children: g.isValidElement(
|
|
564
|
+
var pe = g.forwardRef((e, t) => {
|
|
565
|
+
const { children: r, ...a } = e, n = g.Children.toArray(r), i = n.find(Mr);
|
|
566
|
+
if (i) {
|
|
567
|
+
const s = i.props.children, c = n.map((m) => m === i ? g.Children.count(s) > 1 ? g.Children.only(null) : g.isValidElement(s) ? s.props.children : null : m);
|
|
568
|
+
return /* @__PURE__ */ o(Re, { ...a, ref: t, children: g.isValidElement(s) ? g.cloneElement(s, void 0, c) : null });
|
|
569
569
|
}
|
|
570
570
|
return /* @__PURE__ */ o(Re, { ...a, ref: t, children: r });
|
|
571
571
|
});
|
|
572
|
-
|
|
572
|
+
pe.displayName = "Slot";
|
|
573
573
|
var Re = g.forwardRef((e, t) => {
|
|
574
574
|
const { children: r, ...a } = e;
|
|
575
575
|
if (g.isValidElement(r)) {
|
|
576
|
-
const n =
|
|
576
|
+
const n = Lr(r);
|
|
577
577
|
return g.cloneElement(r, {
|
|
578
|
-
|
|
578
|
+
...zr(a, r.props),
|
|
579
579
|
// @ts-ignore
|
|
580
|
-
ref: t ?
|
|
580
|
+
ref: t ? gt(t, n) : n
|
|
581
581
|
});
|
|
582
582
|
}
|
|
583
583
|
return g.Children.count(r) > 1 ? g.Children.only(null) : null;
|
|
584
584
|
});
|
|
585
585
|
Re.displayName = "SlotClone";
|
|
586
|
-
var
|
|
587
|
-
function
|
|
588
|
-
return g.isValidElement(e) && e.type ===
|
|
586
|
+
var Ar = ({ children: e }) => /* @__PURE__ */ o(M, { children: e });
|
|
587
|
+
function Mr(e) {
|
|
588
|
+
return g.isValidElement(e) && e.type === Ar;
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function zr(e, t) {
|
|
591
591
|
const r = { ...t };
|
|
592
592
|
for (const a in t) {
|
|
593
|
-
const n = e[a],
|
|
594
|
-
/^on[A-Z]/.test(a) ? n &&
|
|
595
|
-
|
|
596
|
-
} : n && (r[a] = n) : a === "style" ? r[a] = { ...n, ...
|
|
593
|
+
const n = e[a], i = t[a];
|
|
594
|
+
/^on[A-Z]/.test(a) ? n && i ? r[a] = (...s) => {
|
|
595
|
+
i(...s), n(...s);
|
|
596
|
+
} : n && (r[a] = n) : a === "style" ? r[a] = { ...n, ...i } : a === "className" && (r[a] = [n, i].filter(Boolean).join(" "));
|
|
597
597
|
}
|
|
598
598
|
return { ...e, ...r };
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function Lr(e) {
|
|
601
601
|
var t, r;
|
|
602
602
|
let a = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, n = a && "isReactWarning" in a && a.isReactWarning;
|
|
603
603
|
return n ? e.ref : (a = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = a && "isReactWarning" in a && a.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
604
604
|
}
|
|
605
|
-
var
|
|
605
|
+
var Br = [
|
|
606
606
|
"a",
|
|
607
607
|
"button",
|
|
608
608
|
"div",
|
|
@@ -619,69 +619,69 @@ var Vr = [
|
|
|
619
619
|
"span",
|
|
620
620
|
"svg",
|
|
621
621
|
"ul"
|
|
622
|
-
],
|
|
622
|
+
], de = Br.reduce((e, t) => {
|
|
623
623
|
const r = g.forwardRef((a, n) => {
|
|
624
|
-
const { asChild:
|
|
625
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ o(c, { ...
|
|
624
|
+
const { asChild: i, ...s } = a, c = i ? pe : t;
|
|
625
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ o(c, { ...s, ref: n });
|
|
626
626
|
});
|
|
627
627
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
628
628
|
}, {});
|
|
629
|
-
function
|
|
629
|
+
function Y(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
|
|
630
630
|
return function(a) {
|
|
631
631
|
if (e == null || e(a), r === !1 || !a.defaultPrevented)
|
|
632
632
|
return t == null ? void 0 : t(a);
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
|
-
function
|
|
636
|
-
const t = e + "CollectionProvider", [r, a] =
|
|
635
|
+
function Pr(e) {
|
|
636
|
+
const t = e + "CollectionProvider", [r, a] = Be(t), [n, i] = r(
|
|
637
637
|
t,
|
|
638
638
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
639
|
-
),
|
|
640
|
-
const { scope: h, children:
|
|
641
|
-
return /* @__PURE__ */ o(n, { scope: h, itemMap:
|
|
639
|
+
), s = (b) => {
|
|
640
|
+
const { scope: h, children: d } = b, v = E.useRef(null), x = E.useRef(/* @__PURE__ */ new Map()).current;
|
|
641
|
+
return /* @__PURE__ */ o(n, { scope: h, itemMap: x, collectionRef: v, children: d });
|
|
642
642
|
};
|
|
643
|
-
|
|
644
|
-
const c = e + "CollectionSlot", m =
|
|
643
|
+
s.displayName = t;
|
|
644
|
+
const c = e + "CollectionSlot", m = E.forwardRef(
|
|
645
645
|
(b, h) => {
|
|
646
|
-
const { scope:
|
|
647
|
-
return /* @__PURE__ */ o(
|
|
646
|
+
const { scope: d, children: v } = b, x = i(c, d), C = Se(h, x.collectionRef);
|
|
647
|
+
return /* @__PURE__ */ o(pe, { ref: C, children: v });
|
|
648
648
|
}
|
|
649
649
|
);
|
|
650
650
|
m.displayName = c;
|
|
651
|
-
const l = e + "CollectionItemSlot",
|
|
651
|
+
const l = e + "CollectionItemSlot", u = "data-radix-collection-item", f = E.forwardRef(
|
|
652
652
|
(b, h) => {
|
|
653
|
-
const { scope:
|
|
654
|
-
return
|
|
653
|
+
const { scope: d, children: v, ...x } = b, C = E.useRef(null), y = Se(h, C), T = i(l, d);
|
|
654
|
+
return E.useEffect(() => (T.itemMap.set(C, { ref: C, ...x }), () => void T.itemMap.delete(C))), /* @__PURE__ */ o(pe, { [u]: "", ref: y, children: v });
|
|
655
655
|
}
|
|
656
656
|
);
|
|
657
657
|
f.displayName = l;
|
|
658
658
|
function p(b) {
|
|
659
|
-
const h =
|
|
660
|
-
return
|
|
661
|
-
const
|
|
662
|
-
if (!
|
|
663
|
-
const v = Array.from(
|
|
659
|
+
const h = i(e + "CollectionConsumer", b);
|
|
660
|
+
return E.useCallback(() => {
|
|
661
|
+
const d = h.collectionRef.current;
|
|
662
|
+
if (!d) return [];
|
|
663
|
+
const v = Array.from(d.querySelectorAll(`[${u}]`));
|
|
664
664
|
return Array.from(h.itemMap.values()).sort(
|
|
665
|
-
(
|
|
665
|
+
(x, C) => v.indexOf(x.ref.current) - v.indexOf(C.ref.current)
|
|
666
666
|
);
|
|
667
667
|
}, [h.collectionRef, h.itemMap]);
|
|
668
668
|
}
|
|
669
669
|
return [
|
|
670
|
-
{ Provider:
|
|
670
|
+
{ Provider: s, Slot: m, ItemSlot: f },
|
|
671
671
|
p,
|
|
672
672
|
a
|
|
673
673
|
];
|
|
674
674
|
}
|
|
675
|
-
var
|
|
676
|
-
},
|
|
677
|
-
}),
|
|
678
|
-
function
|
|
679
|
-
const [t, r] = g.useState(
|
|
680
|
-
return
|
|
681
|
-
r((a) => a ?? String(
|
|
675
|
+
var Or = globalThis != null && globalThis.document ? g.useLayoutEffect : () => {
|
|
676
|
+
}, Vr = g.useId || (() => {
|
|
677
|
+
}), $r = 0;
|
|
678
|
+
function Dr(e) {
|
|
679
|
+
const [t, r] = g.useState(Vr());
|
|
680
|
+
return Or(() => {
|
|
681
|
+
r((a) => a ?? String($r++));
|
|
682
682
|
}, [e]), t ? `radix-${t}` : "";
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function Pe(e) {
|
|
685
685
|
const t = g.useRef(e);
|
|
686
686
|
return g.useEffect(() => {
|
|
687
687
|
t.current = e;
|
|
@@ -696,119 +696,119 @@ function ye({
|
|
|
696
696
|
onChange: r = () => {
|
|
697
697
|
}
|
|
698
698
|
}) {
|
|
699
|
-
const [a, n] =
|
|
699
|
+
const [a, n] = Hr({ defaultProp: t, onChange: r }), i = e !== void 0, s = i ? e : a, c = Pe(r), m = g.useCallback(
|
|
700
700
|
(l) => {
|
|
701
|
-
if (
|
|
702
|
-
const
|
|
703
|
-
|
|
701
|
+
if (i) {
|
|
702
|
+
const u = typeof l == "function" ? l(e) : l;
|
|
703
|
+
u !== e && c(u);
|
|
704
704
|
} else
|
|
705
705
|
n(l);
|
|
706
706
|
},
|
|
707
|
-
[
|
|
707
|
+
[i, e, n, c]
|
|
708
708
|
);
|
|
709
|
-
return [
|
|
709
|
+
return [s, m];
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function Hr({
|
|
712
712
|
defaultProp: e,
|
|
713
713
|
onChange: t
|
|
714
714
|
}) {
|
|
715
|
-
const r = g.useState(e), [a] = r, n = g.useRef(a),
|
|
715
|
+
const r = g.useState(e), [a] = r, n = g.useRef(a), i = Pe(t);
|
|
716
716
|
return g.useEffect(() => {
|
|
717
|
-
n.current !== a && (
|
|
718
|
-
}, [a, n,
|
|
717
|
+
n.current !== a && (i(a), n.current = a);
|
|
718
|
+
}, [a, n, i]), r;
|
|
719
719
|
}
|
|
720
|
-
var
|
|
721
|
-
function
|
|
722
|
-
const t = g.useContext(
|
|
720
|
+
var Fr = g.createContext(void 0);
|
|
721
|
+
function ft(e) {
|
|
722
|
+
const t = g.useContext(Fr);
|
|
723
723
|
return e || t || "ltr";
|
|
724
724
|
}
|
|
725
|
-
var
|
|
725
|
+
var Te = "rovingFocusGroup.onEntryFocus", Gr = { bubbles: !1, cancelable: !0 }, ke = "RovingFocusGroup", [Ae, pt, Ur] = Pr(ke), [jr, bt] = Be(
|
|
726
726
|
ke,
|
|
727
|
-
[
|
|
728
|
-
), [
|
|
729
|
-
(e, t) => /* @__PURE__ */ o(Ae.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ o(Ae.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ o(
|
|
727
|
+
[Ur]
|
|
728
|
+
), [Wr, Kr] = jr(ke), vt = g.forwardRef(
|
|
729
|
+
(e, t) => /* @__PURE__ */ o(Ae.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ o(Ae.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ o(Yr, { ...e, ref: t }) }) })
|
|
730
730
|
);
|
|
731
|
-
|
|
732
|
-
var
|
|
731
|
+
vt.displayName = ke;
|
|
732
|
+
var Yr = g.forwardRef((e, t) => {
|
|
733
733
|
const {
|
|
734
734
|
__scopeRovingFocusGroup: r,
|
|
735
735
|
orientation: a,
|
|
736
736
|
loop: n = !1,
|
|
737
|
-
dir:
|
|
738
|
-
currentTabStopId:
|
|
737
|
+
dir: i,
|
|
738
|
+
currentTabStopId: s,
|
|
739
739
|
defaultCurrentTabStopId: c,
|
|
740
740
|
onCurrentTabStopIdChange: m,
|
|
741
741
|
onEntryFocus: l,
|
|
742
|
-
preventScrollOnEntryFocus:
|
|
742
|
+
preventScrollOnEntryFocus: u = !1,
|
|
743
743
|
...f
|
|
744
|
-
} = e, p = g.useRef(null), b =
|
|
745
|
-
prop:
|
|
744
|
+
} = e, p = g.useRef(null), b = Se(t, p), h = ft(i), [d = null, v] = ye({
|
|
745
|
+
prop: s,
|
|
746
746
|
defaultProp: c,
|
|
747
747
|
onChange: m
|
|
748
|
-
}), [
|
|
748
|
+
}), [x, C] = g.useState(!1), y = Pe(l), T = pt(r), S = g.useRef(!1), [L, R] = g.useState(0);
|
|
749
749
|
return g.useEffect(() => {
|
|
750
|
-
const
|
|
751
|
-
if (
|
|
752
|
-
return
|
|
750
|
+
const N = p.current;
|
|
751
|
+
if (N)
|
|
752
|
+
return N.addEventListener(Te, y), () => N.removeEventListener(Te, y);
|
|
753
753
|
}, [y]), /* @__PURE__ */ o(
|
|
754
|
-
|
|
754
|
+
Wr,
|
|
755
755
|
{
|
|
756
756
|
scope: r,
|
|
757
757
|
orientation: a,
|
|
758
758
|
dir: h,
|
|
759
759
|
loop: n,
|
|
760
|
-
currentTabStopId:
|
|
760
|
+
currentTabStopId: d,
|
|
761
761
|
onItemFocus: g.useCallback(
|
|
762
|
-
(
|
|
762
|
+
(N) => v(N),
|
|
763
763
|
[v]
|
|
764
764
|
),
|
|
765
|
-
onItemShiftTab: g.useCallback(() =>
|
|
765
|
+
onItemShiftTab: g.useCallback(() => C(!0), []),
|
|
766
766
|
onFocusableItemAdd: g.useCallback(
|
|
767
|
-
() => R((
|
|
767
|
+
() => R((N) => N + 1),
|
|
768
768
|
[]
|
|
769
769
|
),
|
|
770
770
|
onFocusableItemRemove: g.useCallback(
|
|
771
|
-
() => R((
|
|
771
|
+
() => R((N) => N - 1),
|
|
772
772
|
[]
|
|
773
773
|
),
|
|
774
774
|
children: /* @__PURE__ */ o(
|
|
775
|
-
|
|
775
|
+
de.div,
|
|
776
776
|
{
|
|
777
|
-
tabIndex:
|
|
777
|
+
tabIndex: x || L === 0 ? -1 : 0,
|
|
778
778
|
"data-orientation": a,
|
|
779
779
|
...f,
|
|
780
780
|
ref: b,
|
|
781
781
|
style: { outline: "none", ...e.style },
|
|
782
|
-
onMouseDown:
|
|
783
|
-
|
|
782
|
+
onMouseDown: Y(e.onMouseDown, () => {
|
|
783
|
+
S.current = !0;
|
|
784
784
|
}),
|
|
785
|
-
onFocus:
|
|
786
|
-
const
|
|
787
|
-
if (
|
|
788
|
-
const
|
|
789
|
-
if (
|
|
790
|
-
const
|
|
785
|
+
onFocus: Y(e.onFocus, (N) => {
|
|
786
|
+
const G = !S.current;
|
|
787
|
+
if (N.target === N.currentTarget && G && !x) {
|
|
788
|
+
const U = new CustomEvent(Te, Gr);
|
|
789
|
+
if (N.currentTarget.dispatchEvent(U), !U.defaultPrevented) {
|
|
790
|
+
const j = T().filter((B) => B.focusable), re = j.find((B) => B.active), oe = j.find((B) => B.id === d), Ce = [re, oe, ...j].filter(
|
|
791
791
|
Boolean
|
|
792
|
-
).map((
|
|
793
|
-
|
|
792
|
+
).map((B) => B.ref.current);
|
|
793
|
+
wt(Ce, u);
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
|
-
|
|
796
|
+
S.current = !1;
|
|
797
797
|
}),
|
|
798
|
-
onBlur:
|
|
798
|
+
onBlur: Y(e.onBlur, () => C(!1))
|
|
799
799
|
}
|
|
800
800
|
)
|
|
801
801
|
}
|
|
802
802
|
);
|
|
803
|
-
}),
|
|
803
|
+
}), yt = "RovingFocusGroupItem", kt = g.forwardRef(
|
|
804
804
|
(e, t) => {
|
|
805
805
|
const {
|
|
806
806
|
__scopeRovingFocusGroup: r,
|
|
807
807
|
focusable: a = !0,
|
|
808
808
|
active: n = !1,
|
|
809
|
-
tabStopId:
|
|
810
|
-
...
|
|
811
|
-
} = e, c =
|
|
809
|
+
tabStopId: i,
|
|
810
|
+
...s
|
|
811
|
+
} = e, c = Dr(), m = i || c, l = Kr(yt, r), u = l.currentTabStopId === m, f = pt(r), { onFocusableItemAdd: p, onFocusableItemRemove: b } = l;
|
|
812
812
|
return g.useEffect(() => {
|
|
813
813
|
if (a)
|
|
814
814
|
return p(), () => b();
|
|
@@ -820,34 +820,34 @@ var Jr = g.forwardRef((e, t) => {
|
|
|
820
820
|
focusable: a,
|
|
821
821
|
active: n,
|
|
822
822
|
children: /* @__PURE__ */ o(
|
|
823
|
-
|
|
823
|
+
de.span,
|
|
824
824
|
{
|
|
825
|
-
tabIndex:
|
|
825
|
+
tabIndex: u ? 0 : -1,
|
|
826
826
|
"data-orientation": l.orientation,
|
|
827
|
-
...
|
|
827
|
+
...s,
|
|
828
828
|
ref: t,
|
|
829
|
-
onMouseDown:
|
|
829
|
+
onMouseDown: Y(e.onMouseDown, (h) => {
|
|
830
830
|
a ? l.onItemFocus(m) : h.preventDefault();
|
|
831
831
|
}),
|
|
832
|
-
onFocus:
|
|
833
|
-
onKeyDown:
|
|
832
|
+
onFocus: Y(e.onFocus, () => l.onItemFocus(m)),
|
|
833
|
+
onKeyDown: Y(e.onKeyDown, (h) => {
|
|
834
834
|
if (h.key === "Tab" && h.shiftKey) {
|
|
835
835
|
l.onItemShiftTab();
|
|
836
836
|
return;
|
|
837
837
|
}
|
|
838
838
|
if (h.target !== h.currentTarget) return;
|
|
839
|
-
const
|
|
840
|
-
if (
|
|
839
|
+
const d = Qr(h, l.orientation, l.dir);
|
|
840
|
+
if (d !== void 0) {
|
|
841
841
|
if (h.metaKey || h.ctrlKey || h.altKey || h.shiftKey) return;
|
|
842
842
|
h.preventDefault();
|
|
843
|
-
let v = f().filter((
|
|
844
|
-
if (
|
|
845
|
-
else if (
|
|
846
|
-
|
|
847
|
-
const
|
|
848
|
-
v = l.loop ?
|
|
843
|
+
let v = f().filter((x) => x.focusable).map((x) => x.ref.current);
|
|
844
|
+
if (d === "last") v.reverse();
|
|
845
|
+
else if (d === "prev" || d === "next") {
|
|
846
|
+
d === "prev" && v.reverse();
|
|
847
|
+
const x = v.indexOf(h.currentTarget);
|
|
848
|
+
v = l.loop ? Xr(v, x + 1) : v.slice(x + 1);
|
|
849
849
|
}
|
|
850
|
-
setTimeout(() =>
|
|
850
|
+
setTimeout(() => wt(v));
|
|
851
851
|
}
|
|
852
852
|
})
|
|
853
853
|
}
|
|
@@ -856,8 +856,8 @@ var Jr = g.forwardRef((e, t) => {
|
|
|
856
856
|
);
|
|
857
857
|
}
|
|
858
858
|
);
|
|
859
|
-
|
|
860
|
-
var
|
|
859
|
+
kt.displayName = yt;
|
|
860
|
+
var qr = {
|
|
861
861
|
ArrowLeft: "prev",
|
|
862
862
|
ArrowUp: "prev",
|
|
863
863
|
ArrowRight: "next",
|
|
@@ -867,185 +867,185 @@ var eo = {
|
|
|
867
867
|
PageDown: "last",
|
|
868
868
|
End: "last"
|
|
869
869
|
};
|
|
870
|
-
function
|
|
870
|
+
function Zr(e, t) {
|
|
871
871
|
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
872
872
|
}
|
|
873
|
-
function
|
|
874
|
-
const a =
|
|
873
|
+
function Qr(e, t, r) {
|
|
874
|
+
const a = Zr(e.key, r);
|
|
875
875
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(a)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(a)))
|
|
876
|
-
return
|
|
876
|
+
return qr[a];
|
|
877
877
|
}
|
|
878
|
-
function
|
|
878
|
+
function wt(e, t = !1) {
|
|
879
879
|
const r = document.activeElement;
|
|
880
880
|
for (const a of e)
|
|
881
881
|
if (a === r || (a.focus({ preventScroll: t }), document.activeElement !== r)) return;
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function Xr(e, t) {
|
|
884
884
|
return e.map((r, a) => e[(t + a) % e.length]);
|
|
885
885
|
}
|
|
886
|
-
var
|
|
887
|
-
const { pressed: r, defaultPressed: a = !1, onPressedChange: n, ...
|
|
886
|
+
var Jr = vt, eo = kt, to = "Toggle", xt = g.forwardRef((e, t) => {
|
|
887
|
+
const { pressed: r, defaultPressed: a = !1, onPressedChange: n, ...i } = e, [s = !1, c] = ye({
|
|
888
888
|
prop: r,
|
|
889
889
|
onChange: n,
|
|
890
890
|
defaultProp: a
|
|
891
891
|
});
|
|
892
892
|
return /* @__PURE__ */ o(
|
|
893
|
-
|
|
893
|
+
de.button,
|
|
894
894
|
{
|
|
895
895
|
type: "button",
|
|
896
|
-
"aria-pressed":
|
|
897
|
-
"data-state":
|
|
896
|
+
"aria-pressed": s,
|
|
897
|
+
"data-state": s ? "on" : "off",
|
|
898
898
|
"data-disabled": e.disabled ? "" : void 0,
|
|
899
|
-
...
|
|
899
|
+
...i,
|
|
900
900
|
ref: t,
|
|
901
|
-
onClick:
|
|
902
|
-
e.disabled || c(!
|
|
901
|
+
onClick: Y(e.onClick, () => {
|
|
902
|
+
e.disabled || c(!s);
|
|
903
903
|
})
|
|
904
904
|
}
|
|
905
905
|
);
|
|
906
906
|
});
|
|
907
|
-
|
|
908
|
-
var ee = "ToggleGroup", [Ct,
|
|
909
|
-
|
|
910
|
-
]),
|
|
907
|
+
xt.displayName = to;
|
|
908
|
+
var ee = "ToggleGroup", [Ct, ca] = Be(ee, [
|
|
909
|
+
bt
|
|
910
|
+
]), Nt = bt(), Oe = E.forwardRef((e, t) => {
|
|
911
911
|
const { type: r, ...a } = e;
|
|
912
912
|
if (r === "single")
|
|
913
|
-
return /* @__PURE__ */ o(
|
|
913
|
+
return /* @__PURE__ */ o(ro, { ...a, ref: t });
|
|
914
914
|
if (r === "multiple")
|
|
915
|
-
return /* @__PURE__ */ o(
|
|
915
|
+
return /* @__PURE__ */ o(oo, { ...a, ref: t });
|
|
916
916
|
throw new Error(`Missing prop \`type\` expected on \`${ee}\``);
|
|
917
917
|
});
|
|
918
918
|
Oe.displayName = ee;
|
|
919
|
-
var [
|
|
919
|
+
var [Tt, Et] = Ct(ee), ro = E.forwardRef((e, t) => {
|
|
920
920
|
const {
|
|
921
921
|
value: r,
|
|
922
922
|
defaultValue: a,
|
|
923
923
|
onValueChange: n = () => {
|
|
924
924
|
},
|
|
925
|
-
...
|
|
926
|
-
} = e, [
|
|
925
|
+
...i
|
|
926
|
+
} = e, [s, c] = ye({
|
|
927
927
|
prop: r,
|
|
928
928
|
defaultProp: a,
|
|
929
929
|
onChange: n
|
|
930
930
|
});
|
|
931
931
|
return /* @__PURE__ */ o(
|
|
932
|
-
|
|
932
|
+
Tt,
|
|
933
933
|
{
|
|
934
934
|
scope: e.__scopeToggleGroup,
|
|
935
935
|
type: "single",
|
|
936
|
-
value:
|
|
936
|
+
value: s ? [s] : [],
|
|
937
937
|
onItemActivate: c,
|
|
938
|
-
onItemDeactivate:
|
|
939
|
-
children: /* @__PURE__ */ o(
|
|
938
|
+
onItemDeactivate: E.useCallback(() => c(""), [c]),
|
|
939
|
+
children: /* @__PURE__ */ o(It, { ...i, ref: t })
|
|
940
940
|
}
|
|
941
941
|
);
|
|
942
|
-
}),
|
|
942
|
+
}), oo = E.forwardRef((e, t) => {
|
|
943
943
|
const {
|
|
944
944
|
value: r,
|
|
945
945
|
defaultValue: a,
|
|
946
946
|
onValueChange: n = () => {
|
|
947
947
|
},
|
|
948
|
-
...
|
|
949
|
-
} = e, [
|
|
948
|
+
...i
|
|
949
|
+
} = e, [s = [], c] = ye({
|
|
950
950
|
prop: r,
|
|
951
951
|
defaultProp: a,
|
|
952
952
|
onChange: n
|
|
953
|
-
}), m =
|
|
954
|
-
(
|
|
953
|
+
}), m = E.useCallback(
|
|
954
|
+
(u) => c((f = []) => [...f, u]),
|
|
955
955
|
[c]
|
|
956
|
-
), l =
|
|
957
|
-
(
|
|
956
|
+
), l = E.useCallback(
|
|
957
|
+
(u) => c((f = []) => f.filter((p) => p !== u)),
|
|
958
958
|
[c]
|
|
959
959
|
);
|
|
960
960
|
return /* @__PURE__ */ o(
|
|
961
|
-
|
|
961
|
+
Tt,
|
|
962
962
|
{
|
|
963
963
|
scope: e.__scopeToggleGroup,
|
|
964
964
|
type: "multiple",
|
|
965
|
-
value:
|
|
965
|
+
value: s,
|
|
966
966
|
onItemActivate: m,
|
|
967
967
|
onItemDeactivate: l,
|
|
968
|
-
children: /* @__PURE__ */ o(
|
|
968
|
+
children: /* @__PURE__ */ o(It, { ...i, ref: t })
|
|
969
969
|
}
|
|
970
970
|
);
|
|
971
971
|
});
|
|
972
972
|
Oe.displayName = ee;
|
|
973
|
-
var [
|
|
973
|
+
var [ao, no] = Ct(ee), It = E.forwardRef(
|
|
974
974
|
(e, t) => {
|
|
975
975
|
const {
|
|
976
976
|
__scopeToggleGroup: r,
|
|
977
977
|
disabled: a = !1,
|
|
978
978
|
rovingFocus: n = !0,
|
|
979
|
-
orientation:
|
|
980
|
-
dir:
|
|
979
|
+
orientation: i,
|
|
980
|
+
dir: s,
|
|
981
981
|
loop: c = !0,
|
|
982
982
|
...m
|
|
983
|
-
} = e, l =
|
|
984
|
-
return /* @__PURE__ */ o(
|
|
985
|
-
|
|
983
|
+
} = e, l = Nt(r), u = ft(s), f = { role: "group", dir: u, ...m };
|
|
984
|
+
return /* @__PURE__ */ o(ao, { scope: r, rovingFocus: n, disabled: a, children: n ? /* @__PURE__ */ o(
|
|
985
|
+
Jr,
|
|
986
986
|
{
|
|
987
987
|
asChild: !0,
|
|
988
988
|
...l,
|
|
989
|
-
orientation:
|
|
990
|
-
dir:
|
|
989
|
+
orientation: i,
|
|
990
|
+
dir: u,
|
|
991
991
|
loop: c,
|
|
992
|
-
children: /* @__PURE__ */ o(
|
|
992
|
+
children: /* @__PURE__ */ o(de.div, { ...f, ref: t })
|
|
993
993
|
}
|
|
994
|
-
) : /* @__PURE__ */ o(
|
|
994
|
+
) : /* @__PURE__ */ o(de.div, { ...f, ref: t }) });
|
|
995
995
|
}
|
|
996
|
-
),
|
|
996
|
+
), be = "ToggleGroupItem", _t = E.forwardRef(
|
|
997
997
|
(e, t) => {
|
|
998
|
-
const r =
|
|
998
|
+
const r = Et(be, e.__scopeToggleGroup), a = no(be, e.__scopeToggleGroup), n = Nt(e.__scopeToggleGroup), i = r.value.includes(e.value), s = a.disabled || e.disabled, c = { ...e, pressed: i, disabled: s }, m = E.useRef(null);
|
|
999
999
|
return a.rovingFocus ? /* @__PURE__ */ o(
|
|
1000
|
-
|
|
1000
|
+
eo,
|
|
1001
1001
|
{
|
|
1002
1002
|
asChild: !0,
|
|
1003
1003
|
...n,
|
|
1004
|
-
focusable: !
|
|
1005
|
-
active:
|
|
1004
|
+
focusable: !s,
|
|
1005
|
+
active: i,
|
|
1006
1006
|
ref: m,
|
|
1007
|
-
children: /* @__PURE__ */ o(
|
|
1007
|
+
children: /* @__PURE__ */ o(We, { ...c, ref: t })
|
|
1008
1008
|
}
|
|
1009
|
-
) : /* @__PURE__ */ o(
|
|
1009
|
+
) : /* @__PURE__ */ o(We, { ...c, ref: t });
|
|
1010
1010
|
}
|
|
1011
1011
|
);
|
|
1012
|
-
_t.displayName =
|
|
1013
|
-
var
|
|
1012
|
+
_t.displayName = be;
|
|
1013
|
+
var We = E.forwardRef(
|
|
1014
1014
|
(e, t) => {
|
|
1015
|
-
const { __scopeToggleGroup: r, value: a, ...n } = e,
|
|
1015
|
+
const { __scopeToggleGroup: r, value: a, ...n } = e, i = Et(be, r), s = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, c = i.type === "single" ? s : void 0;
|
|
1016
1016
|
return /* @__PURE__ */ o(
|
|
1017
|
-
|
|
1017
|
+
xt,
|
|
1018
1018
|
{
|
|
1019
1019
|
...c,
|
|
1020
1020
|
...n,
|
|
1021
1021
|
ref: t,
|
|
1022
1022
|
onPressedChange: (m) => {
|
|
1023
|
-
m ?
|
|
1023
|
+
m ? i.onItemActivate(a) : i.onItemDeactivate(a);
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
1026
1026
|
);
|
|
1027
1027
|
}
|
|
1028
|
-
),
|
|
1029
|
-
const
|
|
1028
|
+
), so = Oe, io = _t;
|
|
1029
|
+
const St = E.createContext({
|
|
1030
1030
|
size: "medium",
|
|
1031
1031
|
focusMode: "system",
|
|
1032
1032
|
mode: "system"
|
|
1033
|
-
}),
|
|
1033
|
+
}), co = ({ focusMode: e }) => w("focus:outline", "focus:outline-2", "focus:outline-offset", {
|
|
1034
1034
|
"focus:outline-focus-light": e === "light",
|
|
1035
1035
|
"focus:outline-focus-dark": e === "dark",
|
|
1036
1036
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
1037
1037
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
1038
|
-
}),
|
|
1038
|
+
}), lo = ({ mode: e }) => w({
|
|
1039
1039
|
"data-[state=on]:bg-surface-medium": e === "dark",
|
|
1040
1040
|
"data-[state=on]:bg-surface-lightest": e === "light",
|
|
1041
1041
|
"data-[state=on]:bg-surface-lightest dark:data-[state=on]:bg-surface-medium": e === "system",
|
|
1042
1042
|
"data-[state=on]:bg-surface-medium dark:data-[state=on]:bg-surface-lightest": e === "alt-system"
|
|
1043
|
-
}),
|
|
1043
|
+
}), uo = ({ size: e }) => w({
|
|
1044
1044
|
"h-5 px-2": e === "small",
|
|
1045
1045
|
"h-6 px-3": e === "medium",
|
|
1046
1046
|
"h-7 px-4": e === "large"
|
|
1047
|
-
}),
|
|
1048
|
-
|
|
1047
|
+
}), mo = ({ mode: e }) => w(
|
|
1048
|
+
_r,
|
|
1049
1049
|
"px-1",
|
|
1050
1050
|
"relative",
|
|
1051
1051
|
"border-r",
|
|
@@ -1058,26 +1058,26 @@ const Rt = I.createContext({
|
|
|
1058
1058
|
"border-surface-light dark:border-surface-darker": e === "system",
|
|
1059
1059
|
"border-surface-darker dark:border-surface-light": e === "alt-system"
|
|
1060
1060
|
}
|
|
1061
|
-
),
|
|
1061
|
+
), ho = ({
|
|
1062
1062
|
focusMode: e,
|
|
1063
1063
|
mode: t,
|
|
1064
1064
|
size: r
|
|
1065
1065
|
}) => ({
|
|
1066
|
-
wrapperClass:
|
|
1066
|
+
wrapperClass: mo({ mode: t }),
|
|
1067
1067
|
itemClass: w(
|
|
1068
|
-
|
|
1068
|
+
Sr,
|
|
1069
1069
|
"flex items-center justify-center bg-transparent",
|
|
1070
1070
|
"rounded-sm",
|
|
1071
1071
|
"transition duration-200 ease",
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1072
|
+
uo({ size: r }),
|
|
1073
|
+
co({ focusMode: e }),
|
|
1074
|
+
lo({ mode: t })
|
|
1075
1075
|
)
|
|
1076
|
-
}),
|
|
1076
|
+
}), go = ({
|
|
1077
1077
|
mode: e,
|
|
1078
1078
|
className: t
|
|
1079
1079
|
}) => w(
|
|
1080
|
-
|
|
1080
|
+
Ir,
|
|
1081
1081
|
"inline-flex p-1",
|
|
1082
1082
|
"rounded-sm",
|
|
1083
1083
|
{
|
|
@@ -1087,24 +1087,24 @@ const Rt = I.createContext({
|
|
|
1087
1087
|
"bg-surface-darker text-copy-lighter dark:bg-surface-light dark:text-copy-dark": e === "alt-system"
|
|
1088
1088
|
},
|
|
1089
1089
|
t
|
|
1090
|
-
),
|
|
1090
|
+
), fo = ({
|
|
1091
1091
|
children: e,
|
|
1092
1092
|
value: t,
|
|
1093
1093
|
onValueChange: r,
|
|
1094
1094
|
disabled: a,
|
|
1095
1095
|
mode: n = "system",
|
|
1096
|
-
focusMode:
|
|
1097
|
-
size:
|
|
1096
|
+
focusMode: i = "system",
|
|
1097
|
+
size: s = "medium",
|
|
1098
1098
|
defaultValue: c,
|
|
1099
1099
|
className: m,
|
|
1100
1100
|
...l
|
|
1101
1101
|
}) => {
|
|
1102
|
-
const
|
|
1103
|
-
return /* @__PURE__ */ o(
|
|
1104
|
-
|
|
1102
|
+
const u = go({ mode: n, className: m }), f = { size: s, focusMode: i, mode: n };
|
|
1103
|
+
return /* @__PURE__ */ o(St.Provider, { value: f, children: /* @__PURE__ */ o(
|
|
1104
|
+
so,
|
|
1105
1105
|
{
|
|
1106
1106
|
disabled: a,
|
|
1107
|
-
className:
|
|
1107
|
+
className: u,
|
|
1108
1108
|
value: t,
|
|
1109
1109
|
defaultValue: c,
|
|
1110
1110
|
onValueChange: r,
|
|
@@ -1113,49 +1113,49 @@ const Rt = I.createContext({
|
|
|
1113
1113
|
children: e
|
|
1114
1114
|
}
|
|
1115
1115
|
) });
|
|
1116
|
-
},
|
|
1117
|
-
const { size: r, focusMode: a, mode: n } =
|
|
1116
|
+
}, po = ({ value: e, disabled: t }) => {
|
|
1117
|
+
const { size: r, focusMode: a, mode: n } = $(St), { itemClass: i, wrapperClass: s } = ho({
|
|
1118
1118
|
focusMode: a,
|
|
1119
1119
|
mode: n,
|
|
1120
1120
|
size: r
|
|
1121
1121
|
});
|
|
1122
|
-
return /* @__PURE__ */ o("div", { className:
|
|
1123
|
-
|
|
1122
|
+
return /* @__PURE__ */ o("div", { className: s, children: /* @__PURE__ */ o(
|
|
1123
|
+
io,
|
|
1124
1124
|
{
|
|
1125
1125
|
disabled: t,
|
|
1126
|
-
className:
|
|
1126
|
+
className: i,
|
|
1127
1127
|
value: e,
|
|
1128
1128
|
children: e
|
|
1129
1129
|
}
|
|
1130
1130
|
) });
|
|
1131
1131
|
};
|
|
1132
1132
|
/*!
|
|
1133
|
-
@versini/ui-panel v1.
|
|
1133
|
+
@versini/ui-panel v1.3.0
|
|
1134
1134
|
© 2025 gizmette.com
|
|
1135
1135
|
*/
|
|
1136
1136
|
try {
|
|
1137
1137
|
window.__VERSINI_UI_PANEL__ || (window.__VERSINI_UI_PANEL__ = {
|
|
1138
|
-
version: "1.
|
|
1139
|
-
buildTime: "01/
|
|
1138
|
+
version: "1.3.0",
|
|
1139
|
+
buildTime: "01/03/2025 10:45 AM EST",
|
|
1140
1140
|
homepage: "https://github.com/aversini/ui-components",
|
|
1141
1141
|
license: "MIT"
|
|
1142
1142
|
});
|
|
1143
1143
|
} catch {
|
|
1144
1144
|
}
|
|
1145
|
-
const
|
|
1145
|
+
const Ke = "av-messagebox", Ye = "av-panel", qe = "av-button", we = "icon", Rt = "button", Me = "link", bo = ({
|
|
1146
1146
|
type: e,
|
|
1147
1147
|
size: t,
|
|
1148
1148
|
labelRight: r,
|
|
1149
1149
|
labelLeft: a,
|
|
1150
1150
|
align: n
|
|
1151
1151
|
}) => {
|
|
1152
|
-
const
|
|
1152
|
+
const i = "max-h-8 py-0 px-2", s = "max-h-9 py-1 px-3", c = "max-h-12 py-2 px-4";
|
|
1153
1153
|
switch (e) {
|
|
1154
|
-
case
|
|
1154
|
+
case Rt:
|
|
1155
1155
|
case Me:
|
|
1156
1156
|
return w({
|
|
1157
|
-
[
|
|
1158
|
-
[
|
|
1157
|
+
[i]: t === "small",
|
|
1158
|
+
[s]: t === "medium",
|
|
1159
1159
|
[c]: t === "large"
|
|
1160
1160
|
});
|
|
1161
1161
|
case we:
|
|
@@ -1171,30 +1171,30 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", we = "icon", At =
|
|
|
1171
1171
|
"h-12 px-4": t === "large" && (r || a)
|
|
1172
1172
|
});
|
|
1173
1173
|
}
|
|
1174
|
-
},
|
|
1174
|
+
}, vo = ({
|
|
1175
1175
|
type: e,
|
|
1176
1176
|
size: t,
|
|
1177
1177
|
labelRight: r,
|
|
1178
1178
|
labelLeft: a
|
|
1179
1179
|
}) => {
|
|
1180
|
-
const n = "text-sm font-medium",
|
|
1180
|
+
const n = "text-sm font-medium", i = "text-base font-medium", s = "text-lg font-medium";
|
|
1181
1181
|
switch (e) {
|
|
1182
|
-
case
|
|
1182
|
+
case Rt:
|
|
1183
1183
|
case Me:
|
|
1184
1184
|
return w({
|
|
1185
1185
|
"text-center": e === Me,
|
|
1186
1186
|
[n]: t === "small",
|
|
1187
|
-
[
|
|
1188
|
-
[
|
|
1187
|
+
[i]: t === "medium",
|
|
1188
|
+
[s]: t === "large"
|
|
1189
1189
|
});
|
|
1190
1190
|
case we:
|
|
1191
1191
|
return w({
|
|
1192
1192
|
[n]: t === "small" && (r || a),
|
|
1193
|
-
[
|
|
1194
|
-
[
|
|
1193
|
+
[i]: t === "medium" && (r || a),
|
|
1194
|
+
[s]: t === "large" && (r || a)
|
|
1195
1195
|
});
|
|
1196
1196
|
}
|
|
1197
|
-
},
|
|
1197
|
+
}, yo = ({
|
|
1198
1198
|
mode: e,
|
|
1199
1199
|
noBackground: t,
|
|
1200
1200
|
noTruncate: r,
|
|
@@ -1234,7 +1234,7 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", we = "icon", At =
|
|
|
1234
1234
|
"text-copy-light dark:text-copy-lighter": e === "system",
|
|
1235
1235
|
"text-copy-lighter dark:text-copy-light": e === "alt-system"
|
|
1236
1236
|
});
|
|
1237
|
-
},
|
|
1237
|
+
}, ko = ({
|
|
1238
1238
|
mode: e,
|
|
1239
1239
|
noBackground: t,
|
|
1240
1240
|
variant: r
|
|
@@ -1264,13 +1264,13 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", we = "icon", At =
|
|
|
1264
1264
|
if (r === "selected")
|
|
1265
1265
|
return "bg-action-selected-dark";
|
|
1266
1266
|
}
|
|
1267
|
-
},
|
|
1267
|
+
}, wo = ({
|
|
1268
1268
|
radius: e
|
|
1269
1269
|
}) => w({
|
|
1270
1270
|
"rounded-full": e === "large",
|
|
1271
1271
|
"rounded-md": e === "medium",
|
|
1272
1272
|
"rounded-sm": e === "small"
|
|
1273
|
-
}),
|
|
1273
|
+
}), xo = ({
|
|
1274
1274
|
mode: e,
|
|
1275
1275
|
disabled: t,
|
|
1276
1276
|
variant: r
|
|
@@ -1300,7 +1300,7 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", we = "icon", At =
|
|
|
1300
1300
|
});
|
|
1301
1301
|
if (r === "selected")
|
|
1302
1302
|
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
1303
|
-
},
|
|
1303
|
+
}, Co = ({
|
|
1304
1304
|
mode: e,
|
|
1305
1305
|
disabled: t,
|
|
1306
1306
|
variant: r
|
|
@@ -1330,7 +1330,7 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", we = "icon", At =
|
|
|
1330
1330
|
});
|
|
1331
1331
|
if (r === "selected")
|
|
1332
1332
|
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
1333
|
-
},
|
|
1333
|
+
}, No = ({
|
|
1334
1334
|
mode: e,
|
|
1335
1335
|
noBorder: t,
|
|
1336
1336
|
variant: r
|
|
@@ -1360,193 +1360,193 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", we = "icon", At =
|
|
|
1360
1360
|
});
|
|
1361
1361
|
if (r === "selected")
|
|
1362
1362
|
return "border border-border-selected-dark";
|
|
1363
|
-
},
|
|
1363
|
+
}, To = ({
|
|
1364
1364
|
focusMode: e
|
|
1365
1365
|
}) => w("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
1366
1366
|
"focus:outline-focus-dark": e === "dark",
|
|
1367
1367
|
"focus:outline-focus-light": e === "light",
|
|
1368
1368
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
1369
1369
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
1370
|
-
}),
|
|
1370
|
+
}), At = ({
|
|
1371
1371
|
type: e,
|
|
1372
1372
|
className: t,
|
|
1373
1373
|
raw: r,
|
|
1374
1374
|
mode: a,
|
|
1375
1375
|
focusMode: n,
|
|
1376
|
-
disabled:
|
|
1377
|
-
fullWidth:
|
|
1376
|
+
disabled: i,
|
|
1377
|
+
fullWidth: s,
|
|
1378
1378
|
size: c,
|
|
1379
1379
|
noBorder: m,
|
|
1380
1380
|
labelRight: l,
|
|
1381
|
-
labelLeft:
|
|
1381
|
+
labelLeft: u,
|
|
1382
1382
|
noBackground: f,
|
|
1383
1383
|
variant: p,
|
|
1384
1384
|
noTruncate: b,
|
|
1385
1385
|
align: h,
|
|
1386
|
-
radius:
|
|
1386
|
+
radius: d
|
|
1387
1387
|
}) => (p || (p = "primary"), r ? w(qe, t) : w(
|
|
1388
1388
|
qe,
|
|
1389
|
-
|
|
1389
|
+
yo({
|
|
1390
1390
|
mode: a,
|
|
1391
1391
|
variant: p,
|
|
1392
1392
|
noBackground: f,
|
|
1393
1393
|
noTruncate: b
|
|
1394
1394
|
}),
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1395
|
+
ko({ mode: a, noBackground: f, variant: p }),
|
|
1396
|
+
wo({ radius: d }),
|
|
1397
|
+
bo({
|
|
1398
1398
|
type: e,
|
|
1399
1399
|
size: c,
|
|
1400
1400
|
labelRight: l,
|
|
1401
|
-
labelLeft:
|
|
1401
|
+
labelLeft: u,
|
|
1402
1402
|
align: h
|
|
1403
1403
|
}),
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1404
|
+
vo({ type: e, size: c, labelRight: l, labelLeft: u }),
|
|
1405
|
+
No({ mode: a, variant: p, noBorder: m }),
|
|
1406
|
+
To({ focusMode: n }),
|
|
1407
|
+
xo({ mode: a, variant: p, disabled: i }),
|
|
1408
|
+
Co({ mode: a, variant: p, disabled: i }),
|
|
1409
1409
|
{
|
|
1410
|
-
"w-full":
|
|
1411
|
-
"disabled:cursor-not-allowed disabled:opacity-50":
|
|
1410
|
+
"w-full": s,
|
|
1411
|
+
"disabled:cursor-not-allowed disabled:opacity-50": i
|
|
1412
1412
|
},
|
|
1413
1413
|
t
|
|
1414
|
-
)),
|
|
1414
|
+
)), Eo = (e, t, r) => {
|
|
1415
1415
|
var a;
|
|
1416
1416
|
!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);
|
|
1417
|
-
},
|
|
1417
|
+
}, Ve = E.forwardRef((e, t) => {
|
|
1418
1418
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
1419
1419
|
return /* @__PURE__ */ o(
|
|
1420
1420
|
"button",
|
|
1421
1421
|
{
|
|
1422
1422
|
ref: t,
|
|
1423
|
-
onClick: (
|
|
1424
|
-
|
|
1423
|
+
onClick: (i) => {
|
|
1424
|
+
Eo(i, a, r);
|
|
1425
1425
|
},
|
|
1426
1426
|
...n
|
|
1427
1427
|
}
|
|
1428
1428
|
);
|
|
1429
1429
|
});
|
|
1430
|
-
|
|
1431
|
-
const
|
|
1430
|
+
Ve.displayName = "BaseButton";
|
|
1431
|
+
const Mt = E.forwardRef(
|
|
1432
1432
|
({
|
|
1433
1433
|
children: e,
|
|
1434
1434
|
disabled: t = !1,
|
|
1435
1435
|
mode: r = "system",
|
|
1436
1436
|
focusMode: a = "system",
|
|
1437
1437
|
fullWidth: n = !1,
|
|
1438
|
-
className:
|
|
1439
|
-
type:
|
|
1438
|
+
className: i,
|
|
1439
|
+
type: s = "button",
|
|
1440
1440
|
raw: c = !1,
|
|
1441
1441
|
noBorder: m = !1,
|
|
1442
1442
|
"aria-label": l,
|
|
1443
|
-
label:
|
|
1443
|
+
label: u,
|
|
1444
1444
|
size: f = "medium",
|
|
1445
1445
|
labelRight: p,
|
|
1446
1446
|
labelLeft: b,
|
|
1447
1447
|
noBackground: h = !1,
|
|
1448
|
-
align:
|
|
1448
|
+
align: d = "center",
|
|
1449
1449
|
radius: v = "large",
|
|
1450
|
-
variant:
|
|
1451
|
-
...
|
|
1450
|
+
variant: x = "primary",
|
|
1451
|
+
...C
|
|
1452
1452
|
}, y) => {
|
|
1453
|
-
const
|
|
1453
|
+
const T = At({
|
|
1454
1454
|
type: we,
|
|
1455
1455
|
mode: r,
|
|
1456
1456
|
focusMode: a,
|
|
1457
1457
|
fullWidth: n,
|
|
1458
1458
|
disabled: t,
|
|
1459
1459
|
raw: c,
|
|
1460
|
-
className:
|
|
1460
|
+
className: i,
|
|
1461
1461
|
noBorder: m,
|
|
1462
1462
|
size: f,
|
|
1463
1463
|
labelRight: p,
|
|
1464
1464
|
labelLeft: b,
|
|
1465
1465
|
noBackground: h,
|
|
1466
|
-
align:
|
|
1466
|
+
align: d,
|
|
1467
1467
|
radius: v,
|
|
1468
|
-
variant:
|
|
1469
|
-
}),
|
|
1468
|
+
variant: x
|
|
1469
|
+
}), S = w({
|
|
1470
1470
|
"text-copy-accent-dark": r === "light" && !c,
|
|
1471
1471
|
"text-copy-light": r === "dark" && !c,
|
|
1472
1472
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !c,
|
|
1473
1473
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !c
|
|
1474
1474
|
});
|
|
1475
1475
|
return /* @__PURE__ */ k(
|
|
1476
|
-
|
|
1476
|
+
Ve,
|
|
1477
1477
|
{
|
|
1478
1478
|
ref: y,
|
|
1479
|
-
className:
|
|
1479
|
+
className: T,
|
|
1480
1480
|
disabled: t,
|
|
1481
|
-
type:
|
|
1482
|
-
"aria-label": l ||
|
|
1483
|
-
...
|
|
1481
|
+
type: s,
|
|
1482
|
+
"aria-label": l || u,
|
|
1483
|
+
...C,
|
|
1484
1484
|
children: [
|
|
1485
1485
|
b && /* @__PURE__ */ o("span", { className: "pr-2", children: b }),
|
|
1486
|
-
/* @__PURE__ */ o("div", { className:
|
|
1486
|
+
/* @__PURE__ */ o("div", { className: S, children: e }),
|
|
1487
1487
|
p && /* @__PURE__ */ o("span", { className: "pl-2", children: p })
|
|
1488
1488
|
]
|
|
1489
1489
|
}
|
|
1490
1490
|
);
|
|
1491
1491
|
}
|
|
1492
1492
|
);
|
|
1493
|
-
|
|
1493
|
+
Mt.displayName = "ButtonIcon";
|
|
1494
1494
|
/*!
|
|
1495
|
-
@versini/ui-button
|
|
1495
|
+
@versini/ui-button v4.0.0
|
|
1496
1496
|
© 2025 gizmette.com
|
|
1497
1497
|
*/
|
|
1498
1498
|
try {
|
|
1499
1499
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
1500
|
-
version: "
|
|
1501
|
-
buildTime: "01/
|
|
1500
|
+
version: "4.0.0",
|
|
1501
|
+
buildTime: "01/03/2025 10:45 AM EST",
|
|
1502
1502
|
homepage: "https://github.com/aversini/ui-components",
|
|
1503
1503
|
license: "MIT"
|
|
1504
1504
|
});
|
|
1505
1505
|
} catch {
|
|
1506
1506
|
}
|
|
1507
|
-
const
|
|
1507
|
+
const Io = E.forwardRef(
|
|
1508
1508
|
({
|
|
1509
1509
|
children: e,
|
|
1510
1510
|
disabled: t = !1,
|
|
1511
1511
|
mode: r = "system",
|
|
1512
1512
|
focusMode: a = "system",
|
|
1513
1513
|
fullWidth: n = !1,
|
|
1514
|
-
className:
|
|
1515
|
-
type:
|
|
1514
|
+
className: i,
|
|
1515
|
+
type: s = "button",
|
|
1516
1516
|
raw: c = !1,
|
|
1517
1517
|
noBorder: m = !1,
|
|
1518
1518
|
"aria-label": l,
|
|
1519
|
-
label:
|
|
1519
|
+
label: u,
|
|
1520
1520
|
size: f = "medium",
|
|
1521
1521
|
labelRight: p,
|
|
1522
1522
|
labelLeft: b,
|
|
1523
1523
|
noBackground: h = !1,
|
|
1524
|
-
align:
|
|
1524
|
+
align: d = "center",
|
|
1525
1525
|
active: v = !1,
|
|
1526
|
-
radius:
|
|
1527
|
-
...
|
|
1526
|
+
radius: x = "large",
|
|
1527
|
+
...C
|
|
1528
1528
|
}, y) => {
|
|
1529
|
-
const
|
|
1529
|
+
const T = At({
|
|
1530
1530
|
type: we,
|
|
1531
1531
|
mode: r,
|
|
1532
1532
|
focusMode: a,
|
|
1533
1533
|
fullWidth: n,
|
|
1534
1534
|
disabled: t,
|
|
1535
1535
|
raw: c,
|
|
1536
|
-
className:
|
|
1536
|
+
className: i,
|
|
1537
1537
|
noBorder: m,
|
|
1538
1538
|
size: f,
|
|
1539
1539
|
labelRight: p,
|
|
1540
1540
|
labelLeft: b,
|
|
1541
1541
|
noBackground: h,
|
|
1542
|
-
align:
|
|
1543
|
-
radius:
|
|
1544
|
-
}),
|
|
1542
|
+
align: d,
|
|
1543
|
+
radius: x
|
|
1544
|
+
}), S = w({
|
|
1545
1545
|
"text-copy-accent-dark": r === "light" && !c,
|
|
1546
1546
|
"text-copy-light": r === "dark" && !c,
|
|
1547
1547
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !c,
|
|
1548
1548
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !c
|
|
1549
|
-
}),
|
|
1549
|
+
}), L = v ? w(
|
|
1550
1550
|
"relative",
|
|
1551
1551
|
"focus-within:static",
|
|
1552
1552
|
"focus-within:after:border-transparent",
|
|
@@ -1563,37 +1563,37 @@ const Mo = I.forwardRef(
|
|
|
1563
1563
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
1564
1564
|
}
|
|
1565
1565
|
) : "";
|
|
1566
|
-
return /* @__PURE__ */ o("div", { className:
|
|
1567
|
-
|
|
1566
|
+
return /* @__PURE__ */ o("div", { className: L, children: /* @__PURE__ */ k(
|
|
1567
|
+
Ve,
|
|
1568
1568
|
{
|
|
1569
1569
|
ref: y,
|
|
1570
|
-
className:
|
|
1570
|
+
className: T,
|
|
1571
1571
|
disabled: t,
|
|
1572
|
-
type:
|
|
1573
|
-
"aria-label": l ||
|
|
1574
|
-
...
|
|
1572
|
+
type: s,
|
|
1573
|
+
"aria-label": l || u,
|
|
1574
|
+
...C,
|
|
1575
1575
|
children: [
|
|
1576
1576
|
b && /* @__PURE__ */ o("span", { className: "pr-2", children: b }),
|
|
1577
|
-
/* @__PURE__ */ o("div", { className:
|
|
1577
|
+
/* @__PURE__ */ o("div", { className: S, children: e }),
|
|
1578
1578
|
p && /* @__PURE__ */ o("span", { className: "pl-2", children: p })
|
|
1579
1579
|
]
|
|
1580
1580
|
}
|
|
1581
1581
|
) });
|
|
1582
1582
|
}
|
|
1583
1583
|
);
|
|
1584
|
-
|
|
1585
|
-
const
|
|
1584
|
+
Io.displayName = "ButtonSort";
|
|
1585
|
+
const _o = ({
|
|
1586
1586
|
children: e,
|
|
1587
1587
|
fill: t,
|
|
1588
1588
|
viewBox: r,
|
|
1589
1589
|
className: a,
|
|
1590
1590
|
defaultViewBox: n,
|
|
1591
|
-
size:
|
|
1592
|
-
title:
|
|
1591
|
+
size: i,
|
|
1592
|
+
title: s,
|
|
1593
1593
|
semantic: c = !1,
|
|
1594
1594
|
...m
|
|
1595
1595
|
}) => {
|
|
1596
|
-
const l = w(
|
|
1596
|
+
const l = w(i, a);
|
|
1597
1597
|
return /* @__PURE__ */ k(M, { children: [
|
|
1598
1598
|
/* @__PURE__ */ o(
|
|
1599
1599
|
"svg",
|
|
@@ -1609,30 +1609,30 @@ const zo = ({
|
|
|
1609
1609
|
children: e
|
|
1610
1610
|
}
|
|
1611
1611
|
),
|
|
1612
|
-
|
|
1612
|
+
s && c && /* @__PURE__ */ o("span", { className: "sr-only", children: s })
|
|
1613
1613
|
] });
|
|
1614
1614
|
};
|
|
1615
1615
|
/*!
|
|
1616
|
-
@versini/ui-svgicon
|
|
1616
|
+
@versini/ui-svgicon v4.0.0
|
|
1617
1617
|
© 2025 gizmette.com
|
|
1618
1618
|
*/
|
|
1619
1619
|
try {
|
|
1620
1620
|
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
1621
|
-
version: "
|
|
1622
|
-
buildTime: "01/
|
|
1621
|
+
version: "4.0.0",
|
|
1622
|
+
buildTime: "01/03/2025 10:45 AM EST",
|
|
1623
1623
|
homepage: "https://github.com/aversini/ui-components",
|
|
1624
1624
|
license: "MIT"
|
|
1625
1625
|
});
|
|
1626
1626
|
} catch {
|
|
1627
1627
|
}
|
|
1628
|
-
const
|
|
1628
|
+
const So = ({
|
|
1629
1629
|
className: e,
|
|
1630
1630
|
viewBox: t,
|
|
1631
1631
|
title: r,
|
|
1632
1632
|
monotone: a,
|
|
1633
1633
|
...n
|
|
1634
1634
|
}) => /* @__PURE__ */ o(
|
|
1635
|
-
|
|
1635
|
+
_o,
|
|
1636
1636
|
{
|
|
1637
1637
|
defaultViewBox: "0 0 384 512",
|
|
1638
1638
|
size: "size-5",
|
|
@@ -1644,106 +1644,106 @@ const Lo = ({
|
|
|
1644
1644
|
}
|
|
1645
1645
|
);
|
|
1646
1646
|
/*!
|
|
1647
|
-
@versini/ui-icons
|
|
1647
|
+
@versini/ui-icons v4.0.0
|
|
1648
1648
|
© 2025 gizmette.com
|
|
1649
1649
|
*/
|
|
1650
1650
|
try {
|
|
1651
1651
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
1652
|
-
version: "
|
|
1653
|
-
buildTime: "01/
|
|
1652
|
+
version: "4.0.0",
|
|
1653
|
+
buildTime: "01/03/2025 10:45 AM EST",
|
|
1654
1654
|
homepage: "https://github.com/aversini/ui-components",
|
|
1655
1655
|
license: "MIT"
|
|
1656
1656
|
});
|
|
1657
1657
|
} catch {
|
|
1658
1658
|
}
|
|
1659
|
-
const
|
|
1660
|
-
function
|
|
1659
|
+
const zt = g.createContext(null);
|
|
1660
|
+
function Ro({
|
|
1661
1661
|
initialOpen: e = !1,
|
|
1662
1662
|
open: t,
|
|
1663
1663
|
onOpenChange: r
|
|
1664
1664
|
} = {}) {
|
|
1665
|
-
const [a, n] = g.useState(e), [
|
|
1665
|
+
const [a, n] = g.useState(e), [i, s] = g.useState(), [c, m] = g.useState(), l = t ?? a, u = r ?? n, f = at({
|
|
1666
1666
|
open: l,
|
|
1667
|
-
onOpenChange:
|
|
1668
|
-
}), p = f.context, b =
|
|
1667
|
+
onOpenChange: u
|
|
1668
|
+
}), p = f.context, b = nt(p, {
|
|
1669
1669
|
enabled: t == null
|
|
1670
|
-
}), h =
|
|
1670
|
+
}), h = it(p, {
|
|
1671
1671
|
outsidePress: !1,
|
|
1672
1672
|
outsidePressEvent: "mousedown"
|
|
1673
|
-
}),
|
|
1673
|
+
}), d = st(p), v = ct([b, h, d]);
|
|
1674
1674
|
return g.useMemo(
|
|
1675
1675
|
() => ({
|
|
1676
1676
|
open: l,
|
|
1677
|
-
setOpen:
|
|
1677
|
+
setOpen: u,
|
|
1678
1678
|
...v,
|
|
1679
1679
|
...f,
|
|
1680
|
-
labelId:
|
|
1680
|
+
labelId: i,
|
|
1681
1681
|
descriptionId: c,
|
|
1682
|
-
setLabelId:
|
|
1682
|
+
setLabelId: s,
|
|
1683
1683
|
setDescriptionId: m
|
|
1684
1684
|
}),
|
|
1685
|
-
[l,
|
|
1685
|
+
[l, u, v, f, i, c]
|
|
1686
1686
|
);
|
|
1687
1687
|
}
|
|
1688
|
-
const
|
|
1689
|
-
const e = g.useContext(
|
|
1688
|
+
const xe = () => {
|
|
1689
|
+
const e = g.useContext(zt);
|
|
1690
1690
|
if (e == null)
|
|
1691
1691
|
throw new Error("Modal components must be wrapped in <Modal />");
|
|
1692
1692
|
return e;
|
|
1693
1693
|
};
|
|
1694
|
-
function
|
|
1694
|
+
function Ao({
|
|
1695
1695
|
children: e,
|
|
1696
1696
|
...t
|
|
1697
1697
|
}) {
|
|
1698
|
-
const r =
|
|
1699
|
-
return /* @__PURE__ */ o(
|
|
1698
|
+
const r = Ro(t);
|
|
1699
|
+
return /* @__PURE__ */ o(zt.Provider, { value: r, children: e });
|
|
1700
1700
|
}
|
|
1701
|
-
const
|
|
1702
|
-
const { context: r, ...a } =
|
|
1701
|
+
const Mo = g.forwardRef(function(e, t) {
|
|
1702
|
+
const { context: r, ...a } = xe(), n = Le([a.refs.setFloating, t]);
|
|
1703
1703
|
if (!r.open)
|
|
1704
1704
|
return null;
|
|
1705
|
-
const { overlayBackground:
|
|
1706
|
-
[`${
|
|
1707
|
-
"bg-black sm:bg-black/[.8]": !
|
|
1705
|
+
const { overlayBackground: i, ...s } = e, c = w("grid place-items-center", {
|
|
1706
|
+
[`${i}`]: i,
|
|
1707
|
+
"bg-black sm:bg-black/[.8]": !i
|
|
1708
1708
|
});
|
|
1709
|
-
return /* @__PURE__ */ o(
|
|
1709
|
+
return /* @__PURE__ */ o(lt, { children: /* @__PURE__ */ o(pr, { className: c, lockScroll: !0, children: /* @__PURE__ */ o(dt, { context: r, children: /* @__PURE__ */ o(
|
|
1710
1710
|
"div",
|
|
1711
1711
|
{
|
|
1712
1712
|
ref: n,
|
|
1713
1713
|
"aria-labelledby": a.labelId,
|
|
1714
1714
|
"aria-describedby": a.descriptionId,
|
|
1715
|
-
...a.getFloatingProps(
|
|
1716
|
-
children:
|
|
1715
|
+
...a.getFloatingProps(s),
|
|
1716
|
+
children: s.children
|
|
1717
1717
|
}
|
|
1718
1718
|
) }) }) });
|
|
1719
|
-
}),
|
|
1720
|
-
const { setLabelId: a } =
|
|
1719
|
+
}), zo = g.forwardRef(function({ children: e, ...t }, r) {
|
|
1720
|
+
const { setLabelId: a } = xe(), n = ze();
|
|
1721
1721
|
return g.useLayoutEffect(() => (a(n), () => a(void 0)), [n, a]), /* @__PURE__ */ o("h1", { ...t, ref: r, id: n, children: e });
|
|
1722
|
-
}),
|
|
1723
|
-
const { setDescriptionId: a } =
|
|
1722
|
+
}), Lo = g.forwardRef(function({ children: e, ...t }, r) {
|
|
1723
|
+
const { setDescriptionId: a } = xe(), n = ze();
|
|
1724
1724
|
return g.useLayoutEffect(() => (a(n), () => a(void 0)), [n, a]), /* @__PURE__ */ o("div", { ...t, ref: r, id: n, children: e });
|
|
1725
|
-
}),
|
|
1726
|
-
const { setOpen: r } =
|
|
1725
|
+
}), Bo = g.forwardRef(function(e, t) {
|
|
1726
|
+
const { setOpen: r } = xe(), { trigger: a, className: n, ...i } = e, s = g.useCallback(() => r(!1), [r]);
|
|
1727
1727
|
return /* @__PURE__ */ o("div", { className: n, children: g.cloneElement(a, {
|
|
1728
1728
|
ref: t,
|
|
1729
|
-
onClick:
|
|
1730
|
-
...
|
|
1729
|
+
onClick: s,
|
|
1730
|
+
...i
|
|
1731
1731
|
}) });
|
|
1732
1732
|
});
|
|
1733
1733
|
/*!
|
|
1734
|
-
@versini/ui-modal v1.
|
|
1734
|
+
@versini/ui-modal v1.2.0
|
|
1735
1735
|
© 2025 gizmette.com
|
|
1736
1736
|
*/
|
|
1737
1737
|
try {
|
|
1738
1738
|
window.__VERSINI_UI_MODAL__ || (window.__VERSINI_UI_MODAL__ = {
|
|
1739
|
-
version: "1.
|
|
1740
|
-
buildTime: "01/
|
|
1739
|
+
version: "1.2.0",
|
|
1740
|
+
buildTime: "01/03/2025 10:45 AM EST",
|
|
1741
1741
|
homepage: "https://github.com/aversini/ui-components",
|
|
1742
1742
|
license: "MIT"
|
|
1743
1743
|
});
|
|
1744
1744
|
} catch {
|
|
1745
1745
|
}
|
|
1746
|
-
const se = "panel",
|
|
1746
|
+
const se = "panel", ue = "messagebox", Po = ({
|
|
1747
1747
|
className: e,
|
|
1748
1748
|
kind: t,
|
|
1749
1749
|
borderMode: r
|
|
@@ -1751,13 +1751,13 @@ const se = "panel", fe = "messagebox", Fo = ({
|
|
|
1751
1751
|
main: w("prose prose-lighter flex flex-col bg-surface-medium", {
|
|
1752
1752
|
[`${Ye} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === se,
|
|
1753
1753
|
[`${Ye} w-full sm:w-[95%] md:max-w-2xl`]: t === se && !e,
|
|
1754
|
-
[`${
|
|
1755
|
-
[`${
|
|
1754
|
+
[`${Ke} rounded-lg border-2`]: t === ue,
|
|
1755
|
+
[`${Ke} w-[95%] sm:w-[50%] md:max-w-2xl`]: t === ue && !e,
|
|
1756
1756
|
[`${e}`]: !!e,
|
|
1757
1757
|
"sm:border-border-dark": r === "dark" && t === se,
|
|
1758
1758
|
"sm:border-border-accent": r === "light" && t === se,
|
|
1759
|
-
"border-border-dark": r === "dark" && t ===
|
|
1760
|
-
"border-border-accent": r === "light" && t ===
|
|
1759
|
+
"border-border-dark": r === "dark" && t === ue,
|
|
1760
|
+
"border-border-accent": r === "light" && t === ue
|
|
1761
1761
|
}),
|
|
1762
1762
|
content: "flex flex-col py-2 sm:py-4 sm:px-4 px-2 overflow-y-auto",
|
|
1763
1763
|
footer: "flex flex-grow flex-col sm:p-4 p-2",
|
|
@@ -1769,70 +1769,70 @@ const se = "panel", fe = "messagebox", Fo = ({
|
|
|
1769
1769
|
title: r,
|
|
1770
1770
|
children: a,
|
|
1771
1771
|
footer: n,
|
|
1772
|
-
borderMode:
|
|
1773
|
-
kind:
|
|
1772
|
+
borderMode: i = "light",
|
|
1773
|
+
kind: s = se,
|
|
1774
1774
|
className: c
|
|
1775
1775
|
}) => {
|
|
1776
|
-
const m = J(""), l =
|
|
1777
|
-
return
|
|
1776
|
+
const m = J(""), l = Po({ className: c, kind: s, borderMode: i });
|
|
1777
|
+
return F(() => (e && (m.current = document.title, document.title = `${r} | ${m.current}`), () => {
|
|
1778
1778
|
e && (document.title = m.current);
|
|
1779
|
-
}), [r, e]), /* @__PURE__ */ o(M, { children: e && /* @__PURE__ */ o(
|
|
1779
|
+
}), [r, e]), /* @__PURE__ */ o(M, { children: e && /* @__PURE__ */ o(Ao, { open: e, onOpenChange: t, children: /* @__PURE__ */ k(Mo, { className: l.main, children: [
|
|
1780
1780
|
/* @__PURE__ */ k("div", { className: "flex flex-row-reverse items-center justify-between", children: [
|
|
1781
1781
|
/* @__PURE__ */ o(
|
|
1782
|
-
|
|
1782
|
+
Bo,
|
|
1783
1783
|
{
|
|
1784
1784
|
className: l.close,
|
|
1785
1785
|
trigger: /* @__PURE__ */ o(
|
|
1786
|
-
|
|
1786
|
+
Mt,
|
|
1787
1787
|
{
|
|
1788
1788
|
mode: "dark",
|
|
1789
1789
|
focusMode: "light",
|
|
1790
1790
|
noBorder: !0,
|
|
1791
1791
|
label: "Close",
|
|
1792
|
-
children: /* @__PURE__ */ o(
|
|
1792
|
+
children: /* @__PURE__ */ o(So, {})
|
|
1793
1793
|
}
|
|
1794
1794
|
)
|
|
1795
1795
|
}
|
|
1796
1796
|
),
|
|
1797
|
-
/* @__PURE__ */ o(
|
|
1797
|
+
/* @__PURE__ */ o(zo, { className: l.header, children: r })
|
|
1798
1798
|
] }),
|
|
1799
|
-
/* @__PURE__ */ o(
|
|
1799
|
+
/* @__PURE__ */ o(Lo, { className: l.content, children: a }),
|
|
1800
1800
|
n && /* @__PURE__ */ o("div", { className: l.footer, children: n })
|
|
1801
1801
|
] }) }) });
|
|
1802
|
-
},
|
|
1803
|
-
const t = (e == null ? void 0 : e.plugins) || [], r = (e == null ? void 0 : e.version) || "", a = (e == null ? void 0 : e.models) || [], n =
|
|
1802
|
+
}, Oo = ({ stats: e }) => {
|
|
1803
|
+
const t = (e == null ? void 0 : e.plugins) || [], r = (e == null ? void 0 : e.version) || "", a = (e == null ? void 0 : e.models) || [], n = fe(), i = fe();
|
|
1804
1804
|
return /* @__PURE__ */ k(M, { children: [
|
|
1805
1805
|
/* @__PURE__ */ o("div", { className: "mb-4", children: /* @__PURE__ */ o(
|
|
1806
|
-
|
|
1806
|
+
P,
|
|
1807
1807
|
{
|
|
1808
|
-
header:
|
|
1808
|
+
header: I.ABOUT.TITLE_CLIENT,
|
|
1809
1809
|
className: "prose-dark dark:prose-lighter",
|
|
1810
|
-
children:
|
|
1811
|
-
[
|
|
1812
|
-
[
|
|
1810
|
+
children: he(n, {
|
|
1811
|
+
[I.ABOUT.VERSION]: "5.18.4",
|
|
1812
|
+
[I.ABOUT.BUILD_TIMESTAMP]: "01/03/2025 03:03 PM EST"
|
|
1813
1813
|
})
|
|
1814
1814
|
}
|
|
1815
1815
|
) }),
|
|
1816
1816
|
/* @__PURE__ */ o(
|
|
1817
|
-
|
|
1817
|
+
P,
|
|
1818
1818
|
{
|
|
1819
|
-
header:
|
|
1819
|
+
header: I.ABOUT.TITLE_SERVER,
|
|
1820
1820
|
className: "prose-dark dark:prose-lighter",
|
|
1821
|
-
children:
|
|
1822
|
-
[
|
|
1823
|
-
[
|
|
1824
|
-
[
|
|
1821
|
+
children: he(i, {
|
|
1822
|
+
[I.ABOUT.VERSION]: r,
|
|
1823
|
+
[ge(I.ABOUT.ENGINE, a.length)]: /* @__PURE__ */ o(M, { children: a.map((s) => /* @__PURE__ */ o("div", { className: "text-right", children: s }, s)) }),
|
|
1824
|
+
[ge(I.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */ o(M, { children: t.map((s) => /* @__PURE__ */ o("div", { className: "text-right", children: s }, s)) })
|
|
1825
1825
|
})
|
|
1826
1826
|
}
|
|
1827
1827
|
)
|
|
1828
1828
|
] });
|
|
1829
|
-
},
|
|
1829
|
+
}, Vo = ({
|
|
1830
1830
|
open: e,
|
|
1831
1831
|
onOpenChange: t
|
|
1832
1832
|
}) => {
|
|
1833
|
-
const { serverStats: r } =
|
|
1834
|
-
return /* @__PURE__ */ o(te, { open: e, onOpenChange: t, title:
|
|
1835
|
-
},
|
|
1833
|
+
const { serverStats: r } = $(ve);
|
|
1834
|
+
return /* @__PURE__ */ o(te, { open: e, onOpenChange: t, title: Ot, children: /* @__PURE__ */ o(Oo, { stats: r }) });
|
|
1835
|
+
}, Lt = ({
|
|
1836
1836
|
showConfirmation: e,
|
|
1837
1837
|
setShowConfirmation: t,
|
|
1838
1838
|
action: r,
|
|
@@ -1845,9 +1845,9 @@ const se = "panel", fe = "messagebox", Fo = ({
|
|
|
1845
1845
|
open: e,
|
|
1846
1846
|
onOpenChange: t,
|
|
1847
1847
|
title: n.title,
|
|
1848
|
-
footer: /* @__PURE__ */ k(
|
|
1848
|
+
footer: /* @__PURE__ */ k(q, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
|
1849
1849
|
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
|
|
1850
|
-
|
|
1850
|
+
H,
|
|
1851
1851
|
{
|
|
1852
1852
|
mode: "dark",
|
|
1853
1853
|
variant: "secondary",
|
|
@@ -1859,7 +1859,7 @@ const se = "panel", fe = "messagebox", Fo = ({
|
|
|
1859
1859
|
}
|
|
1860
1860
|
) }),
|
|
1861
1861
|
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
|
|
1862
|
-
|
|
1862
|
+
H,
|
|
1863
1863
|
{
|
|
1864
1864
|
mode: "dark",
|
|
1865
1865
|
variant: "danger",
|
|
@@ -1873,19 +1873,19 @@ const se = "panel", fe = "messagebox", Fo = ({
|
|
|
1873
1873
|
] }),
|
|
1874
1874
|
children: a
|
|
1875
1875
|
}
|
|
1876
|
-
),
|
|
1876
|
+
), $o = async (e, t, r, a) => {
|
|
1877
1877
|
try {
|
|
1878
|
-
const n = await
|
|
1878
|
+
const n = await O({
|
|
1879
1879
|
accessToken: a,
|
|
1880
|
-
type:
|
|
1880
|
+
type: V.GET_CHAT,
|
|
1881
1881
|
params: {
|
|
1882
1882
|
id: e.id
|
|
1883
1883
|
}
|
|
1884
1884
|
});
|
|
1885
1885
|
n.status === 200 && (t({
|
|
1886
|
-
type:
|
|
1886
|
+
type: Qe
|
|
1887
1887
|
}), t({
|
|
1888
|
-
type:
|
|
1888
|
+
type: $t,
|
|
1889
1889
|
payload: {
|
|
1890
1890
|
id: e.id,
|
|
1891
1891
|
model: n.data.model,
|
|
@@ -1895,37 +1895,37 @@ const se = "panel", fe = "messagebox", Fo = ({
|
|
|
1895
1895
|
}), r(!1));
|
|
1896
1896
|
} catch {
|
|
1897
1897
|
}
|
|
1898
|
-
},
|
|
1898
|
+
}, Do = ({
|
|
1899
1899
|
filteredHistory: e,
|
|
1900
1900
|
setFilteredHistory: t,
|
|
1901
1901
|
dispatch: r,
|
|
1902
1902
|
onOpenChange: a
|
|
1903
1903
|
}) => {
|
|
1904
1904
|
var h;
|
|
1905
|
-
const { user: n, getAccessToken:
|
|
1905
|
+
const { user: n, getAccessToken: i } = Z(), s = J({
|
|
1906
1906
|
id: 0,
|
|
1907
1907
|
timestamp: "",
|
|
1908
1908
|
message: ""
|
|
1909
|
-
}), [c, m] =
|
|
1910
|
-
key:
|
|
1909
|
+
}), [c, m] = _(!1), { state: l, dispatch: u } = $(et), [, f] = le({
|
|
1910
|
+
key: ce + Vt,
|
|
1911
1911
|
initialValue: l.sortDirection
|
|
1912
|
-
}), p = (
|
|
1912
|
+
}), p = (d) => {
|
|
1913
1913
|
switch (l.sortDirection) {
|
|
1914
|
-
case
|
|
1915
|
-
f(
|
|
1916
|
-
type:
|
|
1914
|
+
case K.ASC:
|
|
1915
|
+
f(K.DESC), u({
|
|
1916
|
+
type: De,
|
|
1917
1917
|
payload: {
|
|
1918
|
-
sortedCell:
|
|
1919
|
-
sortDirection:
|
|
1918
|
+
sortedCell: d,
|
|
1919
|
+
sortDirection: K.DESC
|
|
1920
1920
|
}
|
|
1921
1921
|
});
|
|
1922
1922
|
break;
|
|
1923
1923
|
default:
|
|
1924
|
-
f(
|
|
1925
|
-
type:
|
|
1924
|
+
f(K.ASC), u({
|
|
1925
|
+
type: De,
|
|
1926
1926
|
payload: {
|
|
1927
|
-
sortedCell:
|
|
1928
|
-
sortDirection:
|
|
1927
|
+
sortedCell: d,
|
|
1928
|
+
sortDirection: K.ASC
|
|
1929
1929
|
}
|
|
1930
1930
|
});
|
|
1931
1931
|
break;
|
|
@@ -1933,19 +1933,19 @@ const se = "panel", fe = "messagebox", Fo = ({
|
|
|
1933
1933
|
};
|
|
1934
1934
|
return /* @__PURE__ */ k(M, { children: [
|
|
1935
1935
|
/* @__PURE__ */ k(
|
|
1936
|
-
|
|
1936
|
+
Lt,
|
|
1937
1937
|
{
|
|
1938
1938
|
showConfirmation: c,
|
|
1939
1939
|
setShowConfirmation: m,
|
|
1940
1940
|
action: async () => {
|
|
1941
|
-
const
|
|
1941
|
+
const d = s.current;
|
|
1942
1942
|
try {
|
|
1943
|
-
const v = await
|
|
1944
|
-
accessToken: await
|
|
1945
|
-
type:
|
|
1943
|
+
const v = await O({
|
|
1944
|
+
accessToken: await i(),
|
|
1945
|
+
type: V.DELETE_CHAT,
|
|
1946
1946
|
params: {
|
|
1947
1947
|
userId: (n == null ? void 0 : n.username) || "",
|
|
1948
|
-
id:
|
|
1948
|
+
id: d.id,
|
|
1949
1949
|
limit: 1,
|
|
1950
1950
|
searchString: l.searchString,
|
|
1951
1951
|
direction: l.sortDirection,
|
|
@@ -1967,28 +1967,28 @@ const se = "panel", fe = "messagebox", Fo = ({
|
|
|
1967
1967
|
/* @__PURE__ */ k("li", { children: [
|
|
1968
1968
|
"Timestamp:",
|
|
1969
1969
|
" ",
|
|
1970
|
-
/* @__PURE__ */ o("span", { className: "text-lg", children:
|
|
1970
|
+
/* @__PURE__ */ o("span", { className: "text-lg", children: s.current && s.current.timestamp })
|
|
1971
1971
|
] }),
|
|
1972
1972
|
/* @__PURE__ */ k("li", { children: [
|
|
1973
1973
|
"First message:",
|
|
1974
1974
|
" ",
|
|
1975
|
-
/* @__PURE__ */ o("span", { className: "text-lg", children: (h =
|
|
1975
|
+
/* @__PURE__ */ o("span", { className: "text-lg", children: (h = s.current) == null ? void 0 : h.message })
|
|
1976
1976
|
] })
|
|
1977
1977
|
] })
|
|
1978
1978
|
]
|
|
1979
1979
|
}
|
|
1980
1980
|
),
|
|
1981
1981
|
/* @__PURE__ */ k(
|
|
1982
|
-
|
|
1982
|
+
Jt,
|
|
1983
1983
|
{
|
|
1984
1984
|
stickyHeader: !0,
|
|
1985
1985
|
stickyFooter: !0,
|
|
1986
1986
|
compact: !0,
|
|
1987
1987
|
wrapperClassName: "max-h-[60vh] min-h-[60vh]",
|
|
1988
1988
|
children: [
|
|
1989
|
-
/* @__PURE__ */ o(
|
|
1989
|
+
/* @__PURE__ */ o(er, { children: /* @__PURE__ */ k(Ne, { children: [
|
|
1990
1990
|
/* @__PURE__ */ o(
|
|
1991
|
-
|
|
1991
|
+
tr,
|
|
1992
1992
|
{
|
|
1993
1993
|
buttonClassName: "text-xs sm:text-sm",
|
|
1994
1994
|
cellId: "timestamp",
|
|
@@ -2001,76 +2001,81 @@ const se = "panel", fe = "messagebox", Fo = ({
|
|
|
2001
2001
|
children: "Date"
|
|
2002
2002
|
}
|
|
2003
2003
|
),
|
|
2004
|
-
/* @__PURE__ */ o(
|
|
2005
|
-
/* @__PURE__ */ o(
|
|
2006
|
-
/* @__PURE__ */ o(
|
|
2004
|
+
/* @__PURE__ */ o(D, { className: "text-xs sm:text-sm", children: "First message" }),
|
|
2005
|
+
/* @__PURE__ */ o(D, { className: "text-xs sm:text-sm", children: "Model" }),
|
|
2006
|
+
/* @__PURE__ */ o(D, { className: "text-xs sm:text-sm text-right", children: "Actions" })
|
|
2007
2007
|
] }) }),
|
|
2008
|
-
/* @__PURE__ */ o(
|
|
2009
|
-
var
|
|
2010
|
-
return ((
|
|
2008
|
+
/* @__PURE__ */ o(rr, { children: e.data.map((d, v) => {
|
|
2009
|
+
var x, C;
|
|
2010
|
+
return ((x = d == null ? void 0 : d.messages) == null ? void 0 : x.length) > 0 ? /* @__PURE__ */ k(Ne, { children: [
|
|
2011
2011
|
/* @__PURE__ */ o(
|
|
2012
|
-
|
|
2012
|
+
D,
|
|
2013
2013
|
{
|
|
2014
2014
|
component: "th",
|
|
2015
2015
|
scope: "row",
|
|
2016
2016
|
className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
|
|
2017
|
-
children:
|
|
2017
|
+
children: d.timestamp
|
|
2018
2018
|
}
|
|
2019
2019
|
),
|
|
2020
2020
|
/* @__PURE__ */ o(
|
|
2021
|
-
|
|
2021
|
+
D,
|
|
2022
2022
|
{
|
|
2023
2023
|
className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
|
|
2024
2024
|
style: {
|
|
2025
2025
|
wordBreak: "break-word"
|
|
2026
2026
|
},
|
|
2027
|
-
children:
|
|
2027
|
+
children: d.messages.length > 0 ? (C = d.messages[0]) == null ? void 0 : C.content : ""
|
|
2028
|
+
}
|
|
2029
|
+
),
|
|
2030
|
+
/* @__PURE__ */ k(
|
|
2031
|
+
D,
|
|
2032
|
+
{
|
|
2033
|
+
component: "th",
|
|
2034
|
+
scope: "row",
|
|
2035
|
+
className: "text-gray-400",
|
|
2036
|
+
align: "center",
|
|
2037
|
+
children: [
|
|
2038
|
+
d.model && d.model.startsWith("claude") && /* @__PURE__ */ o(ut, { size: "size-4 sm:size-5" }),
|
|
2039
|
+
d.model && d.model.startsWith("gpt") && /* @__PURE__ */ o(mt, { size: "size-4 sm:size-5" })
|
|
2040
|
+
]
|
|
2028
2041
|
}
|
|
2029
2042
|
),
|
|
2030
|
-
/* @__PURE__ */
|
|
2031
|
-
u.model && u.model.startsWith("claude") && /* @__PURE__ */ o(mt, { size: "size-4 sm:size-5" }),
|
|
2032
|
-
u.model && u.model.startsWith("gpt") && /* @__PURE__ */ o(ht, { size: "size-4 sm:size-5" })
|
|
2033
|
-
] }) }),
|
|
2034
|
-
/* @__PURE__ */ o(V, { className: "px-2", children: /* @__PURE__ */ k("div", { className: "flex justify-end gap-2", children: [
|
|
2043
|
+
/* @__PURE__ */ k(D, { align: "right", children: [
|
|
2035
2044
|
/* @__PURE__ */ o(
|
|
2036
|
-
|
|
2045
|
+
X,
|
|
2037
2046
|
{
|
|
2047
|
+
className: "mr-2",
|
|
2038
2048
|
focusMode: "alt-system",
|
|
2039
2049
|
noBorder: !0,
|
|
2040
2050
|
label: "Restore chat",
|
|
2041
2051
|
onClick: async () => {
|
|
2042
|
-
const y = await
|
|
2043
|
-
|
|
2044
|
-
u,
|
|
2045
|
-
r,
|
|
2046
|
-
a,
|
|
2047
|
-
y
|
|
2048
|
-
);
|
|
2052
|
+
const y = await i();
|
|
2053
|
+
$o(d, r, a, y);
|
|
2049
2054
|
},
|
|
2050
|
-
children: /* @__PURE__ */ o(
|
|
2055
|
+
children: /* @__PURE__ */ o(Cr, { size: "size-3", monotone: !0 })
|
|
2051
2056
|
}
|
|
2052
2057
|
),
|
|
2053
2058
|
/* @__PURE__ */ o(
|
|
2054
|
-
|
|
2059
|
+
X,
|
|
2055
2060
|
{
|
|
2056
2061
|
focusMode: "alt-system",
|
|
2057
2062
|
noBorder: !0,
|
|
2058
2063
|
label: "Delete chat",
|
|
2059
2064
|
onClick: () => {
|
|
2060
2065
|
var y;
|
|
2061
|
-
|
|
2062
|
-
id:
|
|
2063
|
-
timestamp:
|
|
2064
|
-
message:
|
|
2066
|
+
s.current = {
|
|
2067
|
+
id: d.id,
|
|
2068
|
+
timestamp: d.timestamp,
|
|
2069
|
+
message: d.messages.length > 0 ? (y = d.messages[0]) == null ? void 0 : y.content : ""
|
|
2065
2070
|
}, m(!c);
|
|
2066
2071
|
},
|
|
2067
|
-
children: /* @__PURE__ */ o("div", { className: "text-red-400", children: /* @__PURE__ */ o(
|
|
2072
|
+
children: /* @__PURE__ */ o("div", { className: "text-red-400", children: /* @__PURE__ */ o(vr, { size: "size-3", monotone: !0 }) })
|
|
2068
2073
|
}
|
|
2069
2074
|
)
|
|
2070
|
-
] })
|
|
2071
|
-
] }, `${
|
|
2075
|
+
] })
|
|
2076
|
+
] }, `${I.HISTORY.TITLE}-${d.id}-${v}`) : null;
|
|
2072
2077
|
}) }),
|
|
2073
|
-
/* @__PURE__ */ o(
|
|
2078
|
+
/* @__PURE__ */ o(or, { children: /* @__PURE__ */ o(Ne, { children: /* @__PURE__ */ o(D, { colSpan: 4, children: /* @__PURE__ */ o("div", { children: ge(
|
|
2074
2079
|
`${e.data.length} chat`,
|
|
2075
2080
|
e.data.length
|
|
2076
2081
|
) }) }) }) })
|
|
@@ -2078,18 +2083,18 @@ const se = "panel", fe = "messagebox", Fo = ({
|
|
|
2078
2083
|
}
|
|
2079
2084
|
)
|
|
2080
2085
|
] });
|
|
2081
|
-
},
|
|
2086
|
+
}, Ze = async ({
|
|
2082
2087
|
searchString: e,
|
|
2083
2088
|
username: t,
|
|
2084
2089
|
accessToken: r,
|
|
2085
|
-
direction: a =
|
|
2090
|
+
direction: a = K.ASC
|
|
2086
2091
|
}) => {
|
|
2087
2092
|
if (!t)
|
|
2088
2093
|
return [];
|
|
2089
2094
|
try {
|
|
2090
|
-
const n = await
|
|
2095
|
+
const n = await O({
|
|
2091
2096
|
accessToken: r,
|
|
2092
|
-
type:
|
|
2097
|
+
type: V.GET_CHATS,
|
|
2093
2098
|
params: {
|
|
2094
2099
|
userId: t,
|
|
2095
2100
|
searchString: e,
|
|
@@ -2104,39 +2109,39 @@ const se = "panel", fe = "messagebox", Fo = ({
|
|
|
2104
2109
|
return [];
|
|
2105
2110
|
}
|
|
2106
2111
|
return [];
|
|
2107
|
-
},
|
|
2108
|
-
const { isAuthenticated: t, getAccessToken: r, user: a } =
|
|
2109
|
-
key:
|
|
2112
|
+
}, Ho = ({ onOpenChange: e }) => {
|
|
2113
|
+
const { isAuthenticated: t, getAccessToken: r, user: a } = Z(), n = J(null), i = J(!1), { dispatch: s } = $(ve), { state: c, dispatch: m } = $(et), [, l] = le({
|
|
2114
|
+
key: ce + Dt,
|
|
2110
2115
|
initialValue: c.searchString
|
|
2111
|
-
}), [
|
|
2116
|
+
}), [u, f] = _({
|
|
2112
2117
|
data: [],
|
|
2113
2118
|
sortedDirection: c.sortDirection
|
|
2114
|
-
}), p = async (
|
|
2115
|
-
const v = await r(),
|
|
2116
|
-
searchString:
|
|
2119
|
+
}), p = async (d) => {
|
|
2120
|
+
const v = await r(), x = await Ze({
|
|
2121
|
+
searchString: d,
|
|
2117
2122
|
username: a == null ? void 0 : a.username,
|
|
2118
2123
|
accessToken: v,
|
|
2119
2124
|
direction: c.sortDirection
|
|
2120
2125
|
});
|
|
2121
2126
|
f({
|
|
2122
|
-
data:
|
|
2127
|
+
data: x,
|
|
2123
2128
|
sortedDirection: c.sortDirection
|
|
2124
|
-
}), l(
|
|
2129
|
+
}), l(d), m({
|
|
2125
2130
|
type: Ht,
|
|
2126
|
-
payload: { searchString:
|
|
2131
|
+
payload: { searchString: d }
|
|
2127
2132
|
});
|
|
2128
|
-
}, b =
|
|
2129
|
-
p(
|
|
2130
|
-
}, 500), h = async (
|
|
2131
|
-
|
|
2133
|
+
}, b = Ft((d) => {
|
|
2134
|
+
p(d.target.value);
|
|
2135
|
+
}, 500), h = async (d) => {
|
|
2136
|
+
d.preventDefault();
|
|
2132
2137
|
};
|
|
2133
|
-
return
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
const
|
|
2138
|
+
return F(() => {
|
|
2139
|
+
i.current || (async () => {
|
|
2140
|
+
i.current = !0;
|
|
2141
|
+
const d = await r(), v = await Ze({
|
|
2137
2142
|
searchString: c.searchString,
|
|
2138
2143
|
username: a == null ? void 0 : a.username,
|
|
2139
|
-
accessToken:
|
|
2144
|
+
accessToken: d,
|
|
2140
2145
|
direction: c.sortDirection
|
|
2141
2146
|
});
|
|
2142
2147
|
f({
|
|
@@ -2144,21 +2149,21 @@ const se = "panel", fe = "messagebox", Fo = ({
|
|
|
2144
2149
|
sortedDirection: c.sortDirection
|
|
2145
2150
|
});
|
|
2146
2151
|
})();
|
|
2147
|
-
}),
|
|
2148
|
-
if (c.sortDirection !==
|
|
2149
|
-
const
|
|
2152
|
+
}), F(() => {
|
|
2153
|
+
if (c.sortDirection !== u.sortedDirection) {
|
|
2154
|
+
const d = [...u.data].sort((v, x) => {
|
|
2150
2155
|
if (c.sortedCell === "timestamp") {
|
|
2151
|
-
const
|
|
2152
|
-
return c.sortDirection ===
|
|
2156
|
+
const C = new Date(v[c.sortedCell]).getTime(), y = new Date(x[c.sortedCell]).getTime();
|
|
2157
|
+
return c.sortDirection === K.ASC ? C - y : y - C;
|
|
2153
2158
|
}
|
|
2154
2159
|
return 0;
|
|
2155
2160
|
});
|
|
2156
2161
|
f({
|
|
2157
|
-
data:
|
|
2162
|
+
data: d,
|
|
2158
2163
|
sortedDirection: c.sortDirection
|
|
2159
2164
|
});
|
|
2160
2165
|
}
|
|
2161
|
-
}, [
|
|
2166
|
+
}, [u, c]), t ? u && u.data && /* @__PURE__ */ k(M, { children: [
|
|
2162
2167
|
/* @__PURE__ */ o("form", { autoComplete: "off", onSubmit: h, children: /* @__PURE__ */ o(
|
|
2163
2168
|
Ee,
|
|
2164
2169
|
{
|
|
@@ -2175,7 +2180,7 @@ const se = "panel", fe = "messagebox", Fo = ({
|
|
|
2175
2180
|
className: "mt-2 mb-2",
|
|
2176
2181
|
...c.searchString && {
|
|
2177
2182
|
rightElement: /* @__PURE__ */ o(
|
|
2178
|
-
|
|
2183
|
+
H,
|
|
2179
2184
|
{
|
|
2180
2185
|
type: "button",
|
|
2181
2186
|
disabled: !c.searchString,
|
|
@@ -2184,8 +2189,8 @@ const se = "panel", fe = "messagebox", Fo = ({
|
|
|
2184
2189
|
noBorder: !0,
|
|
2185
2190
|
size: "small",
|
|
2186
2191
|
onClick: () => {
|
|
2187
|
-
var
|
|
2188
|
-
p(""), (
|
|
2192
|
+
var d;
|
|
2193
|
+
p(""), (d = n.current) != null && d.value && (n.current.value = "", n.current.focus());
|
|
2189
2194
|
},
|
|
2190
2195
|
children: "Reset"
|
|
2191
2196
|
}
|
|
@@ -2194,133 +2199,107 @@ const se = "panel", fe = "messagebox", Fo = ({
|
|
|
2194
2199
|
}
|
|
2195
2200
|
) }),
|
|
2196
2201
|
/* @__PURE__ */ o("div", { className: "flex flex-col gap-2 sm:flex-row", children: /* @__PURE__ */ o(
|
|
2197
|
-
|
|
2202
|
+
Do,
|
|
2198
2203
|
{
|
|
2199
|
-
filteredHistory:
|
|
2204
|
+
filteredHistory: u,
|
|
2200
2205
|
setFilteredHistory: f,
|
|
2201
|
-
dispatch:
|
|
2206
|
+
dispatch: s,
|
|
2202
2207
|
onOpenChange: e
|
|
2203
2208
|
}
|
|
2204
2209
|
) })
|
|
2205
2210
|
] }) : null;
|
|
2206
|
-
},
|
|
2211
|
+
}, Fo = ({
|
|
2207
2212
|
open: e,
|
|
2208
2213
|
onOpenChange: t
|
|
2209
|
-
}) => /* @__PURE__ */ o(te, { open: e, onOpenChange: t, title:
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
const t = e.filter(
|
|
2213
|
-
(r) => {
|
|
2214
|
-
var a, n;
|
|
2215
|
-
return ((a = r == null ? void 0 : r.message) == null ? void 0 : a.role) === Yt && typeof ((n = r == null ? void 0 : r.message) == null ? void 0 : n.processingTime) == "number";
|
|
2216
|
-
}
|
|
2217
|
-
).map((r) => r.message.processingTime);
|
|
2218
|
-
return qt({
|
|
2219
|
-
data: t,
|
|
2220
|
-
formatter: Yo
|
|
2221
|
-
});
|
|
2222
|
-
}, Xo = ({ stats: e }) => {
|
|
2223
|
-
const { isAuthenticated: t, user: r, registeringForPasskey: a, authenticationType: n } = X(), { state: s } = P(ge), i = Xt - Number(s == null ? void 0 : s.usage), c = de(), m = de(), l = de(), d = (r == null ? void 0 : r.username) || "";
|
|
2224
|
-
return t && d ? /* @__PURE__ */ k(M, { children: [
|
|
2214
|
+
}) => /* @__PURE__ */ o(te, { open: e, onOpenChange: t, title: Gt, children: /* @__PURE__ */ o(Ho, { onOpenChange: t }) }), Go = ({ stats: e }) => {
|
|
2215
|
+
const { isAuthenticated: t, user: r, registeringForPasskey: a, authenticationType: n } = Z(), i = fe(), s = fe(), c = (r == null ? void 0 : r.username) || "";
|
|
2216
|
+
return t && c ? /* @__PURE__ */ k(M, { children: [
|
|
2225
2217
|
/* @__PURE__ */ o(
|
|
2226
|
-
|
|
2218
|
+
P,
|
|
2227
2219
|
{
|
|
2228
|
-
header:
|
|
2220
|
+
header: I.PREFERENCES.TITLE,
|
|
2229
2221
|
className: "prose-dark dark:prose-lighter",
|
|
2230
|
-
children:
|
|
2231
|
-
[
|
|
2232
|
-
[
|
|
2222
|
+
children: he(i, {
|
|
2223
|
+
[I.PREFERENCES.NAME]: c,
|
|
2224
|
+
[I.PREFERENCES.EMAIL]: (r == null ? void 0 : r.email) || ""
|
|
2233
2225
|
})
|
|
2234
2226
|
}
|
|
2235
2227
|
),
|
|
2236
|
-
n !==
|
|
2237
|
-
|
|
2228
|
+
n !== Ut.PASSKEY && /* @__PURE__ */ k(
|
|
2229
|
+
P,
|
|
2238
2230
|
{
|
|
2239
2231
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
2240
|
-
header: /* @__PURE__ */ o("h2", { className: "m-0", children: /* @__PURE__ */ k(
|
|
2241
|
-
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
|
|
2242
|
-
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o("div", { children:
|
|
2232
|
+
header: /* @__PURE__ */ o("h2", { className: "m-0", children: /* @__PURE__ */ k(q, { columnGap: 3, alignVertical: "center", children: [
|
|
2233
|
+
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(He, { size: "size-8" }) }),
|
|
2234
|
+
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o("div", { children: I.PREFERENCES.PASSKEY_TITLE }) })
|
|
2243
2235
|
] }) }),
|
|
2244
2236
|
children: [
|
|
2245
|
-
/* @__PURE__ */ o("p", { children:
|
|
2237
|
+
/* @__PURE__ */ o("p", { children: I.PREFERENCES.PASSKEY_INSTRUCTIONS }),
|
|
2246
2238
|
/* @__PURE__ */ o(
|
|
2247
|
-
|
|
2239
|
+
X,
|
|
2248
2240
|
{
|
|
2249
2241
|
size: "small",
|
|
2250
2242
|
className: "mt-2",
|
|
2251
2243
|
onClick: a,
|
|
2252
|
-
labelLeft:
|
|
2253
|
-
children: /* @__PURE__ */ o(
|
|
2244
|
+
labelLeft: I.PREFERENCES.PASSKEY_BUTTON,
|
|
2245
|
+
children: /* @__PURE__ */ o(He, { size: "size-5", monotone: !0 })
|
|
2254
2246
|
}
|
|
2255
2247
|
)
|
|
2256
2248
|
]
|
|
2257
2249
|
}
|
|
2258
2250
|
),
|
|
2259
2251
|
/* @__PURE__ */ o(
|
|
2260
|
-
|
|
2261
|
-
{
|
|
2262
|
-
header: E.CURRENT_STATISTICS.TITLE,
|
|
2263
|
-
className: "prose-dark dark:prose-lighter mt-4",
|
|
2264
|
-
children: ce(m, {
|
|
2265
|
-
[E.CURRENT_STATISTICS.MODEL_NAME]: (s == null ? void 0 : s.model) || le,
|
|
2266
|
-
[E.CURRENT_STATISTICS.TOKENS_USED]: s == null ? void 0 : s.usage,
|
|
2267
|
-
[E.CURRENT_STATISTICS.REMAINING_TOKENS]: Kt.format(i),
|
|
2268
|
-
[E.CURRENT_STATISTICS.PROCESSING_TIME]: qo(s == null ? void 0 : s.messages)
|
|
2269
|
-
})
|
|
2270
|
-
}
|
|
2271
|
-
),
|
|
2272
|
-
/* @__PURE__ */ o(
|
|
2273
|
-
L,
|
|
2252
|
+
P,
|
|
2274
2253
|
{
|
|
2275
|
-
header:
|
|
2254
|
+
header: I.MAIN_STATISTICS.TITLE,
|
|
2276
2255
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
2277
|
-
children:
|
|
2278
|
-
[
|
|
2279
|
-
[
|
|
2256
|
+
children: he(s, {
|
|
2257
|
+
[ge(I.MAIN_STATISTICS.TOTAL, e.totalChats)]: e.totalChats,
|
|
2258
|
+
[I.MAIN_STATISTICS.PROCESSING_TIME]: jt(
|
|
2280
2259
|
e.averageProcessingTimes
|
|
2281
2260
|
)
|
|
2282
2261
|
})
|
|
2283
2262
|
}
|
|
2284
2263
|
)
|
|
2285
2264
|
] }) : null;
|
|
2286
|
-
},
|
|
2265
|
+
}, Uo = ({
|
|
2287
2266
|
open: e,
|
|
2288
2267
|
onOpenChange: t
|
|
2289
2268
|
}) => {
|
|
2290
|
-
const [r, a] =
|
|
2269
|
+
const [r, a] = _({
|
|
2291
2270
|
averageProcessingTimes: 0,
|
|
2292
2271
|
totalChats: 0
|
|
2293
|
-
}), { getAccessToken: n, user:
|
|
2294
|
-
return
|
|
2295
|
-
!e || !
|
|
2272
|
+
}), { getAccessToken: n, user: i } = Z();
|
|
2273
|
+
return F(() => {
|
|
2274
|
+
!e || !i || (async () => {
|
|
2296
2275
|
try {
|
|
2297
|
-
const
|
|
2276
|
+
const s = await O({
|
|
2298
2277
|
accessToken: await n(),
|
|
2299
|
-
type:
|
|
2278
|
+
type: V.GET_CHATS_STATS,
|
|
2300
2279
|
params: {
|
|
2301
|
-
userId:
|
|
2280
|
+
userId: i.username
|
|
2302
2281
|
}
|
|
2303
2282
|
});
|
|
2304
|
-
|
|
2283
|
+
s.status === 200 && a(s.data);
|
|
2305
2284
|
} catch {
|
|
2306
2285
|
}
|
|
2307
2286
|
})();
|
|
2308
|
-
}, [e, n,
|
|
2287
|
+
}, [e, n, i]), /* @__PURE__ */ o(te, { open: e, onOpenChange: t, title: Wt, children: /* @__PURE__ */ o(Go, { stats: r }) });
|
|
2309
2288
|
};
|
|
2310
2289
|
/*!
|
|
2311
|
-
@versini/ui-toggle
|
|
2290
|
+
@versini/ui-toggle v3.0.0
|
|
2312
2291
|
© 2025 gizmette.com
|
|
2313
2292
|
*/
|
|
2314
2293
|
try {
|
|
2315
2294
|
window.__VERSINI_UI_TOGGLE__ || (window.__VERSINI_UI_TOGGLE__ = {
|
|
2316
|
-
version: "
|
|
2317
|
-
buildTime: "01/
|
|
2295
|
+
version: "3.0.0",
|
|
2296
|
+
buildTime: "01/03/2025 10:45 AM EST",
|
|
2318
2297
|
homepage: "https://github.com/aversini/ui-components",
|
|
2319
2298
|
license: "MIT"
|
|
2320
2299
|
});
|
|
2321
2300
|
} catch {
|
|
2322
2301
|
}
|
|
2323
|
-
const
|
|
2302
|
+
const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko = ({
|
|
2324
2303
|
focusMode: e
|
|
2325
2304
|
}) => w(
|
|
2326
2305
|
"peer-focus:outline",
|
|
@@ -2332,14 +2311,14 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2332
2311
|
"peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
|
|
2333
2312
|
"peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
|
|
2334
2313
|
}
|
|
2335
|
-
),
|
|
2314
|
+
), Yo = () => w(
|
|
2336
2315
|
"peer-checked:after:translate-x-full",
|
|
2337
2316
|
// background color when checked
|
|
2338
2317
|
"peer-checked:bg-violet-500",
|
|
2339
2318
|
// knob circle and border color when checked
|
|
2340
2319
|
"peer-checked:after:bg-white",
|
|
2341
2320
|
"peer-checked:after:border-white"
|
|
2342
|
-
),
|
|
2321
|
+
), qo = () => w(
|
|
2343
2322
|
"after:left-[2px]",
|
|
2344
2323
|
"after:top-[2px]",
|
|
2345
2324
|
"after:border",
|
|
@@ -2351,7 +2330,7 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2351
2330
|
"after:rounded-full",
|
|
2352
2331
|
"after:transition-all",
|
|
2353
2332
|
"after:content-['']"
|
|
2354
|
-
),
|
|
2333
|
+
), Zo = ({
|
|
2355
2334
|
mode: e,
|
|
2356
2335
|
noBorder: t
|
|
2357
2336
|
}) => w({
|
|
@@ -2360,7 +2339,7 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2360
2339
|
"border-border-light bg-surface-darker": e === "dark",
|
|
2361
2340
|
"border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
|
|
2362
2341
|
"border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
|
|
2363
|
-
}),
|
|
2342
|
+
}), Qo = ({
|
|
2364
2343
|
mode: e,
|
|
2365
2344
|
labelHidden: t
|
|
2366
2345
|
}) => t ? "sr-only" : w("ml-2 text-sm", {
|
|
@@ -2368,11 +2347,11 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2368
2347
|
"text-copy-lighter": e === "dark",
|
|
2369
2348
|
"text-copy-lighter dark:text-copy-dark": e === "alt-system",
|
|
2370
2349
|
"text-copy-dark dark:text-copy-lighter": e === "system"
|
|
2371
|
-
}),
|
|
2372
|
-
|
|
2350
|
+
}), Xo = ({ className: e }) => w(
|
|
2351
|
+
jo,
|
|
2373
2352
|
"relative flex cursor-pointer items-center",
|
|
2374
2353
|
e
|
|
2375
|
-
),
|
|
2354
|
+
), Jo = ({
|
|
2376
2355
|
mode: e,
|
|
2377
2356
|
focusMode: t,
|
|
2378
2357
|
labelHidden: r,
|
|
@@ -2380,33 +2359,33 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2380
2359
|
noBorder: n
|
|
2381
2360
|
}) => ({
|
|
2382
2361
|
toggle: w(
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2362
|
+
Wo(),
|
|
2363
|
+
Zo({ mode: e, noBorder: n }),
|
|
2364
|
+
Ko({ focusMode: t }),
|
|
2365
|
+
qo(),
|
|
2366
|
+
Yo()
|
|
2388
2367
|
),
|
|
2389
|
-
label:
|
|
2368
|
+
label: Qo({ mode: e, labelHidden: r }),
|
|
2390
2369
|
input: "peer sr-only",
|
|
2391
|
-
wrapper:
|
|
2370
|
+
wrapper: Xo({ className: a })
|
|
2392
2371
|
}), ie = ({
|
|
2393
2372
|
checked: e = !1,
|
|
2394
2373
|
onChange: t,
|
|
2395
2374
|
label: r,
|
|
2396
2375
|
labelHidden: a = !1,
|
|
2397
2376
|
name: n,
|
|
2398
|
-
mode:
|
|
2399
|
-
focusMode:
|
|
2377
|
+
mode: i = "system",
|
|
2378
|
+
focusMode: s = "system",
|
|
2400
2379
|
className: c,
|
|
2401
2380
|
noBorder: m = !1
|
|
2402
2381
|
}) => {
|
|
2403
|
-
const l =
|
|
2404
|
-
mode:
|
|
2405
|
-
focusMode:
|
|
2382
|
+
const l = Jo({
|
|
2383
|
+
mode: i,
|
|
2384
|
+
focusMode: s,
|
|
2406
2385
|
labelHidden: a,
|
|
2407
2386
|
className: c,
|
|
2408
2387
|
noBorder: m
|
|
2409
|
-
}),
|
|
2388
|
+
}), u = (f) => {
|
|
2410
2389
|
t == null || t(f.target.checked);
|
|
2411
2390
|
};
|
|
2412
2391
|
return /* @__PURE__ */ k("label", { className: l.wrapper, children: [
|
|
@@ -2417,53 +2396,53 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2417
2396
|
checked: e,
|
|
2418
2397
|
type: "checkbox",
|
|
2419
2398
|
className: l.input,
|
|
2420
|
-
onChange:
|
|
2399
|
+
onChange: u
|
|
2421
2400
|
}
|
|
2422
2401
|
),
|
|
2423
2402
|
/* @__PURE__ */ o("div", { className: l.toggle }),
|
|
2424
2403
|
/* @__PURE__ */ o("span", { className: l.label, children: r })
|
|
2425
2404
|
] });
|
|
2426
|
-
},
|
|
2405
|
+
}, ea = ({
|
|
2427
2406
|
open: e,
|
|
2428
2407
|
onOpenChange: t
|
|
2429
2408
|
}) => {
|
|
2430
|
-
const { state: r, dispatch: a } =
|
|
2409
|
+
const { state: r, dispatch: a } = $(ar), { getAccessToken: n, user: i } = Z(), [s, c] = _({
|
|
2431
2410
|
tags: [...r.tags]
|
|
2432
2411
|
}), m = ({
|
|
2433
|
-
slot:
|
|
2412
|
+
slot: u,
|
|
2434
2413
|
checked: f,
|
|
2435
2414
|
label: p,
|
|
2436
2415
|
content: b
|
|
2437
2416
|
}) => {
|
|
2438
2417
|
c((h) => {
|
|
2439
|
-
const
|
|
2440
|
-
slot:
|
|
2418
|
+
const d = h.tags, v = {
|
|
2419
|
+
slot: u,
|
|
2441
2420
|
label: p,
|
|
2442
2421
|
content: b,
|
|
2443
2422
|
enabled: f
|
|
2444
|
-
},
|
|
2445
|
-
return
|
|
2423
|
+
}, x = d.findIndex((C) => C.slot === u);
|
|
2424
|
+
return x === -1 ? {
|
|
2446
2425
|
...h,
|
|
2447
|
-
tags: [...
|
|
2448
|
-
} : (
|
|
2426
|
+
tags: [...d, { ...v, slot: u }]
|
|
2427
|
+
} : (d[x] = v, {
|
|
2449
2428
|
...h,
|
|
2450
|
-
tags: [...
|
|
2429
|
+
tags: [...d]
|
|
2451
2430
|
});
|
|
2452
2431
|
});
|
|
2453
|
-
}, l = async (
|
|
2454
|
-
|
|
2432
|
+
}, l = async (u) => {
|
|
2433
|
+
u.preventDefault();
|
|
2455
2434
|
try {
|
|
2456
|
-
await
|
|
2435
|
+
await O({
|
|
2457
2436
|
accessToken: await n(),
|
|
2458
|
-
type:
|
|
2437
|
+
type: V.SET_USER_PREFERENCES,
|
|
2459
2438
|
params: {
|
|
2460
|
-
user:
|
|
2461
|
-
tags:
|
|
2439
|
+
user: i == null ? void 0 : i.username,
|
|
2440
|
+
tags: s.tags
|
|
2462
2441
|
}
|
|
2463
2442
|
}), a({
|
|
2464
|
-
type:
|
|
2443
|
+
type: Yt,
|
|
2465
2444
|
payload: {
|
|
2466
|
-
tags:
|
|
2445
|
+
tags: s.tags
|
|
2467
2446
|
}
|
|
2468
2447
|
});
|
|
2469
2448
|
} catch {
|
|
@@ -2476,14 +2455,14 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2476
2455
|
onOpenChange: t,
|
|
2477
2456
|
title: "Tags",
|
|
2478
2457
|
footer: /* @__PURE__ */ k(
|
|
2479
|
-
|
|
2458
|
+
q,
|
|
2480
2459
|
{
|
|
2481
2460
|
columnGap: 2,
|
|
2482
2461
|
alignHorizontal: "flex-end",
|
|
2483
2462
|
className: "pb-8 sm:pb-0",
|
|
2484
2463
|
children: [
|
|
2485
2464
|
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
|
|
2486
|
-
|
|
2465
|
+
H,
|
|
2487
2466
|
{
|
|
2488
2467
|
mode: "dark",
|
|
2489
2468
|
variant: "secondary",
|
|
@@ -2495,13 +2474,13 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2495
2474
|
}
|
|
2496
2475
|
) }),
|
|
2497
2476
|
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
|
|
2498
|
-
|
|
2477
|
+
H,
|
|
2499
2478
|
{
|
|
2500
2479
|
mode: "dark",
|
|
2501
2480
|
variant: "danger",
|
|
2502
2481
|
focusMode: "light",
|
|
2503
|
-
onClick: async (
|
|
2504
|
-
t(!1), await l(
|
|
2482
|
+
onClick: async (u) => {
|
|
2483
|
+
t(!1), await l(u);
|
|
2505
2484
|
},
|
|
2506
2485
|
children: "Save"
|
|
2507
2486
|
}
|
|
@@ -2510,26 +2489,26 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2510
2489
|
}
|
|
2511
2490
|
),
|
|
2512
2491
|
children: [
|
|
2513
|
-
/* @__PURE__ */ o("p", { children:
|
|
2514
|
-
|
|
2515
|
-
|
|
2492
|
+
/* @__PURE__ */ o("p", { children: Kt }),
|
|
2493
|
+
s.tags && s.tags.map((u) => /* @__PURE__ */ k(
|
|
2494
|
+
P,
|
|
2516
2495
|
{
|
|
2517
|
-
header: `Tag ${
|
|
2496
|
+
header: `Tag ${u.slot + 1}`,
|
|
2518
2497
|
className: "prose-dark dark:prose-lighter mb-2",
|
|
2519
2498
|
children: [
|
|
2520
|
-
/* @__PURE__ */ k(
|
|
2499
|
+
/* @__PURE__ */ k(q, { className: "mt-8 mb-6", columnGap: 2, rowGap: 6, children: [
|
|
2521
2500
|
/* @__PURE__ */ o(A, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ o(
|
|
2522
2501
|
Ee,
|
|
2523
2502
|
{
|
|
2524
2503
|
label: "Label",
|
|
2525
|
-
name: `tag${
|
|
2526
|
-
value:
|
|
2504
|
+
name: `tag${u.slot}-label`,
|
|
2505
|
+
value: u.label,
|
|
2527
2506
|
onChange: (f) => {
|
|
2528
2507
|
m({
|
|
2529
|
-
slot:
|
|
2530
|
-
checked:
|
|
2508
|
+
slot: u.slot,
|
|
2509
|
+
checked: u.enabled,
|
|
2531
2510
|
label: f.target.value,
|
|
2532
|
-
content:
|
|
2511
|
+
content: u.content
|
|
2533
2512
|
});
|
|
2534
2513
|
}
|
|
2535
2514
|
}
|
|
@@ -2538,13 +2517,13 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2538
2517
|
Ee,
|
|
2539
2518
|
{
|
|
2540
2519
|
label: "Content",
|
|
2541
|
-
name: `tag${
|
|
2542
|
-
value:
|
|
2520
|
+
name: `tag${u.slot}-content`,
|
|
2521
|
+
value: u.content,
|
|
2543
2522
|
onChange: (f) => {
|
|
2544
2523
|
m({
|
|
2545
|
-
slot:
|
|
2546
|
-
checked:
|
|
2547
|
-
label:
|
|
2524
|
+
slot: u.slot,
|
|
2525
|
+
checked: u.enabled,
|
|
2526
|
+
label: u.label,
|
|
2548
2527
|
content: f.target.value
|
|
2549
2528
|
});
|
|
2550
2529
|
}
|
|
@@ -2557,49 +2536,49 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2557
2536
|
className: "mt-2",
|
|
2558
2537
|
noBorder: !0,
|
|
2559
2538
|
label: "Enabled",
|
|
2560
|
-
name:
|
|
2539
|
+
name: u.slot.toString(),
|
|
2561
2540
|
onChange: (f) => {
|
|
2562
2541
|
m({
|
|
2563
|
-
slot:
|
|
2542
|
+
slot: u.slot,
|
|
2564
2543
|
checked: f,
|
|
2565
|
-
label:
|
|
2566
|
-
content:
|
|
2544
|
+
label: u.label,
|
|
2545
|
+
content: u.content
|
|
2567
2546
|
});
|
|
2568
2547
|
},
|
|
2569
|
-
checked:
|
|
2548
|
+
checked: u.enabled
|
|
2570
2549
|
}
|
|
2571
2550
|
)
|
|
2572
2551
|
]
|
|
2573
2552
|
},
|
|
2574
|
-
`tag-slot-${
|
|
2553
|
+
`tag-slot-${u.slot}`
|
|
2575
2554
|
))
|
|
2576
2555
|
]
|
|
2577
2556
|
}
|
|
2578
2557
|
);
|
|
2579
|
-
},
|
|
2558
|
+
}, ta = ({
|
|
2580
2559
|
open: e,
|
|
2581
2560
|
onOpenChange: t
|
|
2582
2561
|
}) => {
|
|
2583
|
-
const { dispatch: r } =
|
|
2562
|
+
const { dispatch: r } = $(ve), { getAccessToken: a, user: n } = Z(), [i, s] = _(!1), [c, m] = _({
|
|
2584
2563
|
loaded: !1,
|
|
2585
2564
|
instructions: "",
|
|
2586
2565
|
loadingLocation: !1,
|
|
2587
2566
|
location: "",
|
|
2588
|
-
engine:
|
|
2589
|
-
}), [l,
|
|
2590
|
-
key:
|
|
2567
|
+
engine: me
|
|
2568
|
+
}), [l, u] = le({
|
|
2569
|
+
key: ce + Xe,
|
|
2591
2570
|
initialValue: !1
|
|
2592
|
-
}), [f, p] =
|
|
2593
|
-
key:
|
|
2571
|
+
}), [f, p] = le({
|
|
2572
|
+
key: ce + qt,
|
|
2594
2573
|
initialValue: !1
|
|
2595
2574
|
}), b = (y) => {
|
|
2596
2575
|
p(y);
|
|
2597
2576
|
}, h = async (y) => {
|
|
2598
2577
|
y.preventDefault();
|
|
2599
2578
|
try {
|
|
2600
|
-
await
|
|
2579
|
+
await O({
|
|
2601
2580
|
accessToken: await a(),
|
|
2602
|
-
type:
|
|
2581
|
+
type: V.SET_USER_PREFERENCES,
|
|
2603
2582
|
params: {
|
|
2604
2583
|
user: n == null ? void 0 : n.username,
|
|
2605
2584
|
instructions: c.instructions,
|
|
@@ -2607,30 +2586,30 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2607
2586
|
engine: c.engine
|
|
2608
2587
|
}
|
|
2609
2588
|
}), r({
|
|
2610
|
-
type:
|
|
2589
|
+
type: Je,
|
|
2611
2590
|
payload: {
|
|
2612
2591
|
engine: c.engine
|
|
2613
2592
|
}
|
|
2614
2593
|
});
|
|
2615
2594
|
} catch {
|
|
2616
2595
|
}
|
|
2617
|
-
},
|
|
2596
|
+
}, d = async () => {
|
|
2618
2597
|
m((y) => ({
|
|
2619
2598
|
...y,
|
|
2620
2599
|
location: "...",
|
|
2621
2600
|
loadingLocation: !0
|
|
2622
2601
|
}));
|
|
2623
2602
|
try {
|
|
2624
|
-
const y = Date.now(),
|
|
2603
|
+
const y = Date.now(), T = await Xt(), S = await O({
|
|
2625
2604
|
accessToken: await a(),
|
|
2626
|
-
type:
|
|
2605
|
+
type: V.GET_LOCATION,
|
|
2627
2606
|
params: {
|
|
2628
|
-
latitude:
|
|
2629
|
-
longitude:
|
|
2607
|
+
latitude: T.latitude,
|
|
2608
|
+
longitude: T.longitude
|
|
2630
2609
|
}
|
|
2631
2610
|
}), R = Date.now() - y;
|
|
2632
|
-
if (R < 2e3 && await new Promise((
|
|
2633
|
-
const { city:
|
|
2611
|
+
if (R < 2e3 && await new Promise((N) => setTimeout(N, 2e3 - R)), S.status === 200) {
|
|
2612
|
+
const { city: N, state: G, country: U, displayName: j } = S.data, re = N && G && U ? `${N}, ${G}, ${U}` : j;
|
|
2634
2613
|
m((oe) => ({
|
|
2635
2614
|
...oe,
|
|
2636
2615
|
loaded: !0,
|
|
@@ -2638,8 +2617,8 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2638
2617
|
loadingLocation: !1
|
|
2639
2618
|
}));
|
|
2640
2619
|
} else
|
|
2641
|
-
m((
|
|
2642
|
-
...
|
|
2620
|
+
m((N) => ({
|
|
2621
|
+
...N,
|
|
2643
2622
|
loaded: !0,
|
|
2644
2623
|
location: "",
|
|
2645
2624
|
loadingLocation: !1
|
|
@@ -2647,44 +2626,44 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2647
2626
|
} catch {
|
|
2648
2627
|
}
|
|
2649
2628
|
}, v = (y) => {
|
|
2650
|
-
m((
|
|
2651
|
-
...
|
|
2652
|
-
engine: y ? ne :
|
|
2629
|
+
m((T) => ({
|
|
2630
|
+
...T,
|
|
2631
|
+
engine: y ? ne : Q
|
|
2653
2632
|
}));
|
|
2654
|
-
},
|
|
2655
|
-
m((
|
|
2656
|
-
...
|
|
2657
|
-
engine: y ?
|
|
2633
|
+
}, x = (y) => {
|
|
2634
|
+
m((T) => ({
|
|
2635
|
+
...T,
|
|
2636
|
+
engine: y ? Q : ne
|
|
2658
2637
|
}));
|
|
2659
|
-
},
|
|
2660
|
-
|
|
2638
|
+
}, C = () => {
|
|
2639
|
+
s(!i);
|
|
2661
2640
|
};
|
|
2662
|
-
return
|
|
2641
|
+
return F(() => {
|
|
2663
2642
|
if (!e || !n) {
|
|
2664
2643
|
m({
|
|
2665
2644
|
loaded: !1,
|
|
2666
2645
|
loadingLocation: !1,
|
|
2667
2646
|
instructions: "",
|
|
2668
2647
|
location: "",
|
|
2669
|
-
engine:
|
|
2648
|
+
engine: me
|
|
2670
2649
|
});
|
|
2671
2650
|
return;
|
|
2672
2651
|
}
|
|
2673
2652
|
(async () => {
|
|
2674
2653
|
try {
|
|
2675
|
-
const y = await
|
|
2654
|
+
const y = await O({
|
|
2676
2655
|
accessToken: await a(),
|
|
2677
|
-
type:
|
|
2656
|
+
type: V.GET_USER_PREFERENCES,
|
|
2678
2657
|
params: {
|
|
2679
2658
|
user: n.username
|
|
2680
2659
|
}
|
|
2681
2660
|
});
|
|
2682
|
-
y.status === 200 && m((
|
|
2683
|
-
...
|
|
2661
|
+
y.status === 200 && m((T) => ({
|
|
2662
|
+
...T,
|
|
2684
2663
|
loaded: !0,
|
|
2685
2664
|
instructions: y.data.instructions || "",
|
|
2686
2665
|
location: y.data.location || "",
|
|
2687
|
-
engine: y.data.engine ||
|
|
2666
|
+
engine: y.data.engine || me
|
|
2688
2667
|
}));
|
|
2689
2668
|
} catch {
|
|
2690
2669
|
}
|
|
@@ -2694,16 +2673,16 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2694
2673
|
{
|
|
2695
2674
|
open: e,
|
|
2696
2675
|
onOpenChange: t,
|
|
2697
|
-
title:
|
|
2676
|
+
title: Zt,
|
|
2698
2677
|
footer: /* @__PURE__ */ k(
|
|
2699
|
-
|
|
2678
|
+
q,
|
|
2700
2679
|
{
|
|
2701
2680
|
columnGap: 2,
|
|
2702
2681
|
alignHorizontal: "flex-end",
|
|
2703
2682
|
className: "pb-8 sm:pb-0",
|
|
2704
2683
|
children: [
|
|
2705
2684
|
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
|
|
2706
|
-
|
|
2685
|
+
H,
|
|
2707
2686
|
{
|
|
2708
2687
|
mode: "dark",
|
|
2709
2688
|
variant: "secondary",
|
|
@@ -2715,7 +2694,7 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2715
2694
|
}
|
|
2716
2695
|
) }),
|
|
2717
2696
|
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
|
|
2718
|
-
|
|
2697
|
+
H,
|
|
2719
2698
|
{
|
|
2720
2699
|
mode: "dark",
|
|
2721
2700
|
variant: "danger",
|
|
@@ -2730,11 +2709,11 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2730
2709
|
}
|
|
2731
2710
|
),
|
|
2732
2711
|
children: /* @__PURE__ */ k(M, { children: [
|
|
2733
|
-
|
|
2712
|
+
i && /* @__PURE__ */ o(ea, { open: i, onOpenChange: s }),
|
|
2734
2713
|
/* @__PURE__ */ k(
|
|
2735
|
-
|
|
2714
|
+
P,
|
|
2736
2715
|
{
|
|
2737
|
-
header:
|
|
2716
|
+
header: I.SETTINGS_ENGINE.TITLE,
|
|
2738
2717
|
className: "prose-dark dark:prose-lighter",
|
|
2739
2718
|
children: [
|
|
2740
2719
|
/* @__PURE__ */ o("p", { className: "text-xs", children: "Select the AI engine that will be used to generate responses." }),
|
|
@@ -2753,10 +2732,10 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2753
2732
|
{
|
|
2754
2733
|
className: "mt-2",
|
|
2755
2734
|
noBorder: !0,
|
|
2756
|
-
label:
|
|
2757
|
-
name:
|
|
2758
|
-
onChange:
|
|
2759
|
-
checked: c.engine ===
|
|
2735
|
+
label: Q,
|
|
2736
|
+
name: Q,
|
|
2737
|
+
onChange: x,
|
|
2738
|
+
checked: c.engine === Q
|
|
2760
2739
|
}
|
|
2761
2740
|
),
|
|
2762
2741
|
/* @__PURE__ */ o("p", { className: "text-xs", children: "This option introduces a new menu at the top of the screen, enabling you to quickly switch between engines." }),
|
|
@@ -2767,7 +2746,7 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2767
2746
|
noBorder: !0,
|
|
2768
2747
|
label: "Show Quick Engine Toggle Menu",
|
|
2769
2748
|
name: "show-toggle-engine-menu",
|
|
2770
|
-
onChange:
|
|
2749
|
+
onChange: u,
|
|
2771
2750
|
checked: l
|
|
2772
2751
|
}
|
|
2773
2752
|
),
|
|
@@ -2785,27 +2764,27 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2785
2764
|
),
|
|
2786
2765
|
/* @__PURE__ */ o("h3", { className: "border-b-2 border-slate-400", children: "Tags" }),
|
|
2787
2766
|
/* @__PURE__ */ o(
|
|
2788
|
-
|
|
2767
|
+
X,
|
|
2789
2768
|
{
|
|
2790
2769
|
className: "mt-2",
|
|
2791
2770
|
size: "small",
|
|
2792
|
-
onClick:
|
|
2771
|
+
onClick: C,
|
|
2793
2772
|
labelLeft: "Edit Custom Tags",
|
|
2794
|
-
children: /* @__PURE__ */ o(
|
|
2773
|
+
children: /* @__PURE__ */ o(yr, { size: "size-3", monotone: !0 })
|
|
2795
2774
|
}
|
|
2796
2775
|
)
|
|
2797
2776
|
]
|
|
2798
2777
|
}
|
|
2799
2778
|
),
|
|
2800
2779
|
/* @__PURE__ */ k(
|
|
2801
|
-
|
|
2780
|
+
P,
|
|
2802
2781
|
{
|
|
2803
2782
|
header: "Custom Instructions",
|
|
2804
2783
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
2805
2784
|
children: [
|
|
2806
2785
|
/* @__PURE__ */ k("p", { children: [
|
|
2807
2786
|
"What would you like ",
|
|
2808
|
-
/* @__PURE__ */ o("em", { children:
|
|
2787
|
+
/* @__PURE__ */ o("em", { children: Qt }),
|
|
2809
2788
|
" to know about you to provide better responses?"
|
|
2810
2789
|
] }),
|
|
2811
2790
|
/* @__PURE__ */ o(
|
|
@@ -2819,8 +2798,8 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2819
2798
|
label: "Custom Instructions",
|
|
2820
2799
|
value: c.instructions,
|
|
2821
2800
|
onChange: (y) => {
|
|
2822
|
-
m((
|
|
2823
|
-
...
|
|
2801
|
+
m((T) => ({
|
|
2802
|
+
...T,
|
|
2824
2803
|
loaded: !0,
|
|
2825
2804
|
instructions: y.target.value
|
|
2826
2805
|
}));
|
|
@@ -2832,7 +2811,7 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2832
2811
|
}
|
|
2833
2812
|
),
|
|
2834
2813
|
/* @__PURE__ */ k(
|
|
2835
|
-
|
|
2814
|
+
P,
|
|
2836
2815
|
{
|
|
2837
2816
|
header: "Location",
|
|
2838
2817
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
@@ -2846,8 +2825,8 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2846
2825
|
label: "Location",
|
|
2847
2826
|
value: c.location,
|
|
2848
2827
|
onChange: (y) => {
|
|
2849
|
-
m((
|
|
2850
|
-
...
|
|
2828
|
+
m((T) => ({
|
|
2829
|
+
...T,
|
|
2851
2830
|
loaded: !0,
|
|
2852
2831
|
location: y.target.value
|
|
2853
2832
|
}));
|
|
@@ -2856,13 +2835,13 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2856
2835
|
}
|
|
2857
2836
|
),
|
|
2858
2837
|
/* @__PURE__ */ o(
|
|
2859
|
-
|
|
2838
|
+
H,
|
|
2860
2839
|
{
|
|
2861
2840
|
className: "mt-2",
|
|
2862
2841
|
size: "small",
|
|
2863
2842
|
noBorder: !0,
|
|
2864
2843
|
disabled: c.loadingLocation,
|
|
2865
|
-
onClick:
|
|
2844
|
+
onClick: d,
|
|
2866
2845
|
children: c.loadingLocation ? "Detecting..." : "Auto-detect"
|
|
2867
2846
|
}
|
|
2868
2847
|
)
|
|
@@ -2872,91 +2851,91 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2872
2851
|
] })
|
|
2873
2852
|
}
|
|
2874
2853
|
);
|
|
2875
|
-
},
|
|
2876
|
-
const { state: e, dispatch: t, serverStats: r } =
|
|
2877
|
-
key:
|
|
2854
|
+
}, la = () => {
|
|
2855
|
+
const { state: e, dispatch: t, serverStats: r } = $(ve), [a, n] = _((e == null ? void 0 : e.engine) || me), [i, s] = _(!1), [c, m] = _(!1), [l, u] = _(!1), [f, p] = _(!1), [b, h] = _(!1), [d] = le({
|
|
2856
|
+
key: ce + Xe,
|
|
2878
2857
|
initialValue: !1
|
|
2879
|
-
}), { logout: v, getAccessToken:
|
|
2880
|
-
|
|
2881
|
-
},
|
|
2858
|
+
}), { logout: v, getAccessToken: x, user: C } = Z(), y = () => {
|
|
2859
|
+
s(!i);
|
|
2860
|
+
}, T = () => {
|
|
2882
2861
|
m(!c);
|
|
2883
|
-
},
|
|
2884
|
-
|
|
2885
|
-
},
|
|
2862
|
+
}, S = () => {
|
|
2863
|
+
u(!l);
|
|
2864
|
+
}, L = () => {
|
|
2886
2865
|
p(!f);
|
|
2887
2866
|
}, R = () => {
|
|
2888
2867
|
h(!b);
|
|
2889
2868
|
};
|
|
2890
|
-
return
|
|
2869
|
+
return F(() => {
|
|
2891
2870
|
e && e.engine && e.engine !== a && n(e.engine);
|
|
2892
2871
|
}, [e, a]), /* @__PURE__ */ k(M, { children: [
|
|
2893
2872
|
/* @__PURE__ */ o(
|
|
2894
|
-
|
|
2873
|
+
Lt,
|
|
2895
2874
|
{
|
|
2896
2875
|
showConfirmation: b,
|
|
2897
2876
|
setShowConfirmation: h,
|
|
2898
2877
|
action: v,
|
|
2899
2878
|
customStrings: {
|
|
2900
|
-
confirmAction:
|
|
2879
|
+
confirmAction: Fe,
|
|
2901
2880
|
cancelAction: "Cancel",
|
|
2902
|
-
title:
|
|
2881
|
+
title: Fe
|
|
2903
2882
|
},
|
|
2904
2883
|
children: /* @__PURE__ */ o("p", { children: "Are you sure you want to log out?" })
|
|
2905
2884
|
}
|
|
2906
2885
|
),
|
|
2907
|
-
/* @__PURE__ */ o(
|
|
2908
|
-
/* @__PURE__ */ o(
|
|
2909
|
-
/* @__PURE__ */ o(
|
|
2910
|
-
/* @__PURE__ */ o(
|
|
2911
|
-
/* @__PURE__ */ o("div", { className: "bg-slate-900 py-4 px-4 rounded-t-md", children: /* @__PURE__ */ k(
|
|
2912
|
-
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
|
|
2913
|
-
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ k(
|
|
2914
|
-
|
|
2915
|
-
|
|
2886
|
+
/* @__PURE__ */ o(Uo, { open: i, onOpenChange: s }),
|
|
2887
|
+
/* @__PURE__ */ o(ta, { open: c, onOpenChange: m }),
|
|
2888
|
+
/* @__PURE__ */ o(Fo, { open: l, onOpenChange: u }),
|
|
2889
|
+
/* @__PURE__ */ o(Vo, { open: f, onOpenChange: p }),
|
|
2890
|
+
/* @__PURE__ */ o("div", { className: "bg-slate-900 py-4 px-4 rounded-t-md", children: /* @__PURE__ */ k(q, { alignHorizontal: "space-between", alignVertical: "center", children: [
|
|
2891
|
+
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(nr, { mode: "dark", radius: "large" }) }),
|
|
2892
|
+
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ k(q, { children: [
|
|
2893
|
+
d && r && /* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
|
|
2894
|
+
_e,
|
|
2916
2895
|
{
|
|
2917
2896
|
mode: "dark",
|
|
2918
2897
|
focusMode: "light",
|
|
2919
|
-
trigger: /* @__PURE__ */ o(
|
|
2898
|
+
trigger: /* @__PURE__ */ o(X, { className: "mr-2", children: e && e.engine === Q ? /* @__PURE__ */ o(ut, {}) : /* @__PURE__ */ o(mt, {}) }),
|
|
2920
2899
|
defaultPlacement: "bottom-start",
|
|
2921
2900
|
children: /* @__PURE__ */ o(W, { raw: !0, ignoreClick: !0, children: /* @__PURE__ */ o(
|
|
2922
|
-
|
|
2901
|
+
fo,
|
|
2923
2902
|
{
|
|
2924
2903
|
size: "small",
|
|
2925
2904
|
mode: "dark",
|
|
2926
2905
|
focusMode: "light",
|
|
2927
2906
|
value: a,
|
|
2928
|
-
onValueChange: async (
|
|
2929
|
-
if (
|
|
2907
|
+
onValueChange: async (N) => {
|
|
2908
|
+
if (N)
|
|
2930
2909
|
try {
|
|
2931
|
-
await
|
|
2932
|
-
accessToken: await
|
|
2933
|
-
type:
|
|
2910
|
+
await O({
|
|
2911
|
+
accessToken: await x(),
|
|
2912
|
+
type: V.SET_USER_PREFERENCES,
|
|
2934
2913
|
params: {
|
|
2935
|
-
user:
|
|
2936
|
-
engine:
|
|
2914
|
+
user: C == null ? void 0 : C.username,
|
|
2915
|
+
engine: N
|
|
2937
2916
|
}
|
|
2938
2917
|
}), t({
|
|
2939
|
-
type:
|
|
2918
|
+
type: Je,
|
|
2940
2919
|
payload: {
|
|
2941
|
-
engine:
|
|
2920
|
+
engine: N
|
|
2942
2921
|
}
|
|
2943
2922
|
}), t({
|
|
2944
|
-
type:
|
|
2923
|
+
type: Qe
|
|
2945
2924
|
});
|
|
2946
2925
|
} catch {
|
|
2947
2926
|
}
|
|
2948
2927
|
},
|
|
2949
|
-
children: r && r.engines.map((
|
|
2928
|
+
children: r && r.engines.map((N) => /* @__PURE__ */ o(po, { value: N }, N))
|
|
2950
2929
|
}
|
|
2951
2930
|
) })
|
|
2952
2931
|
}
|
|
2953
2932
|
) }),
|
|
2954
2933
|
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ k(
|
|
2955
|
-
|
|
2934
|
+
_e,
|
|
2956
2935
|
{
|
|
2957
2936
|
mode: "dark",
|
|
2958
2937
|
focusMode: "light",
|
|
2959
|
-
trigger: /* @__PURE__ */ o(
|
|
2938
|
+
trigger: /* @__PURE__ */ o(X, { children: /* @__PURE__ */ o(Nr, {}) }),
|
|
2960
2939
|
defaultPlacement: "bottom-end",
|
|
2961
2940
|
children: [
|
|
2962
2941
|
/* @__PURE__ */ o(
|
|
@@ -2964,41 +2943,41 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
2964
2943
|
{
|
|
2965
2944
|
label: "Profile",
|
|
2966
2945
|
onClick: y,
|
|
2967
|
-
icon: /* @__PURE__ */ o(
|
|
2946
|
+
icon: /* @__PURE__ */ o(xr, {})
|
|
2968
2947
|
}
|
|
2969
2948
|
),
|
|
2970
2949
|
/* @__PURE__ */ o(
|
|
2971
2950
|
W,
|
|
2972
2951
|
{
|
|
2973
2952
|
label: "Settings",
|
|
2974
|
-
onClick:
|
|
2975
|
-
icon: /* @__PURE__ */ o(
|
|
2953
|
+
onClick: T,
|
|
2954
|
+
icon: /* @__PURE__ */ o(Tr, {})
|
|
2976
2955
|
}
|
|
2977
2956
|
),
|
|
2978
2957
|
/* @__PURE__ */ o(
|
|
2979
2958
|
W,
|
|
2980
2959
|
{
|
|
2981
2960
|
label: "History",
|
|
2982
|
-
onClick:
|
|
2983
|
-
icon: /* @__PURE__ */ o(
|
|
2961
|
+
onClick: S,
|
|
2962
|
+
icon: /* @__PURE__ */ o(kr, {})
|
|
2984
2963
|
}
|
|
2985
2964
|
),
|
|
2986
2965
|
/* @__PURE__ */ o(
|
|
2987
2966
|
W,
|
|
2988
2967
|
{
|
|
2989
2968
|
label: "About",
|
|
2990
|
-
onClick:
|
|
2991
|
-
icon: /* @__PURE__ */ o(
|
|
2969
|
+
onClick: L,
|
|
2970
|
+
icon: /* @__PURE__ */ o(wr, {})
|
|
2992
2971
|
}
|
|
2993
2972
|
),
|
|
2994
2973
|
e && e.id && !e.isComponent && /* @__PURE__ */ k(M, { children: [
|
|
2995
|
-
/* @__PURE__ */ o(
|
|
2974
|
+
/* @__PURE__ */ o(Er, {}),
|
|
2996
2975
|
/* @__PURE__ */ o(
|
|
2997
2976
|
W,
|
|
2998
2977
|
{
|
|
2999
2978
|
label: "Log out",
|
|
3000
2979
|
onClick: R,
|
|
3001
|
-
icon: /* @__PURE__ */ o("div", { className: "text-red-700", children: /* @__PURE__ */ o(
|
|
2980
|
+
icon: /* @__PURE__ */ o("div", { className: "text-red-700", children: /* @__PURE__ */ o(br, { monotone: !0 }) })
|
|
3002
2981
|
}
|
|
3003
2982
|
)
|
|
3004
2983
|
] })
|
|
@@ -3010,5 +2989,5 @@ const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea
|
|
|
3010
2989
|
] });
|
|
3011
2990
|
};
|
|
3012
2991
|
export {
|
|
3013
|
-
|
|
2992
|
+
la as default
|
|
3014
2993
|
};
|