@versini/sassysaint 5.5.12 → 5.5.14
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.CNyYloEL.js → App.BXK1QFQt.js} +213 -199
- package/dist/chunks/{HeaderToolbar.Bq1bArQC.js → HeaderToolbar.CtdlihAx.js} +1003 -978
- package/dist/chunks/{MarkdownWithExtra.CFyPsO_C.js → MarkdownWithExtra.Cc0-hpHV.js} +8 -8
- package/dist/chunks/{MessageAssistant.BihILyCE.js → MessageAssistant.DsLk7_4F.js} +6 -6
- package/dist/chunks/{index.B7w6LJPp.js → index.Dx036nZH.js} +51 -49
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +4 -4
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { g as
|
|
3
|
-
import { AppContext as ve, HistoryContext as
|
|
1
|
+
import { jsx as o, jsxs as y, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import { g as L, R as O, CARDS as S, renderDataAsList as he, pluralize as ge, ABOUT_TITLE as Vt, L as q, j as M, C as H, un as Q, INFINITE_SCROLL_LIMIT as De, INFINITE_SCROLL_THRESHOLD as Fe, LOCAL_STORAGE_PREFIX as ce, LOCAL_STORAGE_SORT as Dt, P as J, ACTION_RESET as Je, ACTION_RESTORE as Ft, ACTION_SORT as He, LOCAL_STORAGE_SEARCH as Ht, ye as Ie, ACTION_SEARCH as Gt, debounce as Ut, HISTORY_TITLE as jt, M as Wt, z as Ge, durationFormatter as Kt, PROFILE_TITLE as Yt, TAGS_DESCRIPTION as qt, ACTION_SET_TAGS as Zt, DEFAULT_AI_ENGINE as me, LOCAL_STORAGE_ENGINE_TOGGLE as et, LOCAL_STORAGE_CHAT_DETAILS as Qt, SETTINGS_TITLE as Xt, ENGINE_OPENAI as ne, ENGINE_ANTHROPIC as X, APP_NAME as Jt, ACTION_ENGINE as tt, getCurrentGeoLocation as er, LOG_OUT as Ue } from "./index.Dx036nZH.js";
|
|
3
|
+
import { AppContext as ve, HistoryContext as rt, E as le, ge as tr, he as rr, ue as Ne, le as B, ye as or, me as ar, be as nr, serviceCall as $, SERVICE_TYPES as V, f as K, TagsContext as sr, Pe as je, NewChatButton as ir } from "./App.BXK1QFQt.js";
|
|
4
4
|
import * as g from "react";
|
|
5
|
-
import
|
|
5
|
+
import I, { useId as ze, forwardRef as ot, useState as R, useRef as Z, useContext as D, useEffect as F, useCallback as cr, Fragment as lr } from "react";
|
|
6
6
|
import w from "clsx";
|
|
7
|
-
import { useFloatingTree as
|
|
8
|
-
const
|
|
7
|
+
import { useFloatingTree as at, useFloatingNodeId as dr, useListItem as nt, useFloating as st, offset as ur, flip as mr, shift as hr, autoUpdate as gr, useClick as it, useRole as ct, useDismiss as lt, useListNavigation as fr, useTypeahead as pr, useInteractions as dt, useMergeRefs as Le, FloatingNode as br, FloatingList as vr, FloatingPortal as ut, FloatingFocusManager as mt, FloatingTree as yr, FloatingOverlay as kr } from "@floating-ui/react";
|
|
8
|
+
const ht = ({
|
|
9
9
|
className: e,
|
|
10
10
|
viewBox: t,
|
|
11
11
|
title: r,
|
|
12
12
|
monotone: a,
|
|
13
13
|
...n
|
|
14
14
|
}) => /* @__PURE__ */ o(
|
|
15
|
-
|
|
15
|
+
L,
|
|
16
16
|
{
|
|
17
17
|
defaultViewBox: "0 0 256 176",
|
|
18
18
|
size: "size-5",
|
|
@@ -22,14 +22,14 @@ const ut = ({
|
|
|
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
|
+
), wr = ({
|
|
26
26
|
className: e,
|
|
27
27
|
viewBox: t,
|
|
28
28
|
title: r,
|
|
29
29
|
monotone: a,
|
|
30
30
|
...n
|
|
31
|
-
}) => /* @__PURE__ */
|
|
32
|
-
|
|
31
|
+
}) => /* @__PURE__ */ y(
|
|
32
|
+
L,
|
|
33
33
|
{
|
|
34
34
|
defaultViewBox: "0 0 512 512",
|
|
35
35
|
size: "size-5",
|
|
@@ -48,14 +48,14 @@ const ut = ({
|
|
|
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
|
+
), xr = ({
|
|
52
52
|
className: e,
|
|
53
53
|
viewBox: t,
|
|
54
54
|
title: r,
|
|
55
55
|
monotone: a,
|
|
56
56
|
...n
|
|
57
|
-
}) => /* @__PURE__ */
|
|
58
|
-
|
|
57
|
+
}) => /* @__PURE__ */ y(
|
|
58
|
+
L,
|
|
59
59
|
{
|
|
60
60
|
defaultViewBox: "0 0 448 512",
|
|
61
61
|
size: "size-5",
|
|
@@ -74,14 +74,14 @@ const ut = ({
|
|
|
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
|
+
), Cr = ({
|
|
78
78
|
className: e,
|
|
79
79
|
viewBox: t,
|
|
80
80
|
title: r,
|
|
81
81
|
monotone: a,
|
|
82
82
|
...n
|
|
83
|
-
}) => /* @__PURE__ */
|
|
84
|
-
|
|
83
|
+
}) => /* @__PURE__ */ y(
|
|
84
|
+
L,
|
|
85
85
|
{
|
|
86
86
|
defaultViewBox: "0 0 512 512",
|
|
87
87
|
size: "size-5",
|
|
@@ -100,14 +100,14 @@ const ut = ({
|
|
|
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
|
+
), Nr = ({
|
|
104
104
|
className: e,
|
|
105
105
|
viewBox: t,
|
|
106
106
|
title: r,
|
|
107
107
|
monotone: a,
|
|
108
108
|
...n
|
|
109
|
-
}) => /* @__PURE__ */
|
|
110
|
-
|
|
109
|
+
}) => /* @__PURE__ */ y(
|
|
110
|
+
L,
|
|
111
111
|
{
|
|
112
112
|
defaultViewBox: "0 0 512 512",
|
|
113
113
|
size: "size-5",
|
|
@@ -126,14 +126,14 @@ const ut = ({
|
|
|
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
|
+
), Tr = ({
|
|
130
130
|
className: e,
|
|
131
131
|
viewBox: t,
|
|
132
132
|
title: r,
|
|
133
133
|
monotone: a,
|
|
134
134
|
...n
|
|
135
|
-
}) => /* @__PURE__ */
|
|
136
|
-
|
|
135
|
+
}) => /* @__PURE__ */ y(
|
|
136
|
+
L,
|
|
137
137
|
{
|
|
138
138
|
defaultViewBox: "0 0 512 512",
|
|
139
139
|
size: "size-5",
|
|
@@ -152,14 +152,14 @@ const ut = ({
|
|
|
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
|
+
), gt = ({
|
|
156
156
|
className: e,
|
|
157
157
|
viewBox: t,
|
|
158
158
|
title: r,
|
|
159
159
|
monotone: a,
|
|
160
160
|
...n
|
|
161
161
|
}) => /* @__PURE__ */ o(
|
|
162
|
-
|
|
162
|
+
L,
|
|
163
163
|
{
|
|
164
164
|
defaultViewBox: "0 0 24 24",
|
|
165
165
|
size: "size-5",
|
|
@@ -175,14 +175,14 @@ const ut = ({
|
|
|
175
175
|
}
|
|
176
176
|
)
|
|
177
177
|
}
|
|
178
|
-
),
|
|
178
|
+
), Ir = ({
|
|
179
179
|
className: e,
|
|
180
180
|
viewBox: t,
|
|
181
181
|
title: r,
|
|
182
182
|
monotone: a,
|
|
183
183
|
...n
|
|
184
|
-
}) => /* @__PURE__ */
|
|
185
|
-
|
|
184
|
+
}) => /* @__PURE__ */ y(
|
|
185
|
+
L,
|
|
186
186
|
{
|
|
187
187
|
defaultViewBox: "0 0 576 512",
|
|
188
188
|
size: "size-5",
|
|
@@ -201,14 +201,14 @@ const ut = ({
|
|
|
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
|
+
), Er = ({
|
|
205
205
|
className: e,
|
|
206
206
|
viewBox: t,
|
|
207
207
|
title: r,
|
|
208
208
|
monotone: a,
|
|
209
209
|
...n
|
|
210
|
-
}) => /* @__PURE__ */
|
|
211
|
-
|
|
210
|
+
}) => /* @__PURE__ */ y(
|
|
211
|
+
L,
|
|
212
212
|
{
|
|
213
213
|
defaultViewBox: "0 0 512 512",
|
|
214
214
|
size: "size-5",
|
|
@@ -227,14 +227,14 @@ const ut = ({
|
|
|
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
|
+
), _r = ({
|
|
231
231
|
className: e,
|
|
232
232
|
viewBox: t,
|
|
233
233
|
title: r,
|
|
234
234
|
monotone: a,
|
|
235
235
|
...n
|
|
236
236
|
}) => /* @__PURE__ */ o(
|
|
237
|
-
|
|
237
|
+
L,
|
|
238
238
|
{
|
|
239
239
|
defaultViewBox: "0 0 448 512",
|
|
240
240
|
size: "size-5",
|
|
@@ -244,14 +244,14 @@ const ut = ({
|
|
|
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
|
+
), Sr = ({
|
|
248
248
|
className: e,
|
|
249
249
|
viewBox: t,
|
|
250
250
|
title: r,
|
|
251
251
|
monotone: a,
|
|
252
252
|
...n
|
|
253
|
-
}) => /* @__PURE__ */
|
|
254
|
-
|
|
253
|
+
}) => /* @__PURE__ */ y(
|
|
254
|
+
L,
|
|
255
255
|
{
|
|
256
256
|
defaultViewBox: "0 0 512 512",
|
|
257
257
|
size: "size-5",
|
|
@@ -281,7 +281,7 @@ const ut = ({
|
|
|
281
281
|
function fe(e) {
|
|
282
282
|
return ze();
|
|
283
283
|
}
|
|
284
|
-
const
|
|
284
|
+
const Ee = g.createContext({
|
|
285
285
|
getItemProps: () => ({}),
|
|
286
286
|
activeIndex: null,
|
|
287
287
|
/* v8 ignore next 2 */
|
|
@@ -290,7 +290,7 @@ const Ie = g.createContext({
|
|
|
290
290
|
setHasFocusInside: () => {
|
|
291
291
|
},
|
|
292
292
|
isOpen: !1
|
|
293
|
-
}),
|
|
293
|
+
}), We = (e) => {
|
|
294
294
|
if (typeof e == "string")
|
|
295
295
|
return e;
|
|
296
296
|
if (typeof e == "function")
|
|
@@ -301,53 +301,53 @@ const Ie = g.createContext({
|
|
|
301
301
|
return t.displayName || t.name || "Component";
|
|
302
302
|
}
|
|
303
303
|
return "Element";
|
|
304
|
-
},
|
|
304
|
+
}, ft = ot(
|
|
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: s = "system",
|
|
312
|
+
focusMode: i = "system",
|
|
313
313
|
...c
|
|
314
|
-
},
|
|
315
|
-
const [
|
|
316
|
-
nodeId:
|
|
317
|
-
open:
|
|
314
|
+
}, u) => {
|
|
315
|
+
const [d, l] = R(!1), [f, b] = R(!1), [v, h] = R(null), p = Z([]), k = Z([]), x = D(Ee), C = at(), m = dr(), N = nt(), { floatingStyles: E, refs: A, context: _ } = st({
|
|
316
|
+
nodeId: m,
|
|
317
|
+
open: d,
|
|
318
318
|
onOpenChange: (ae) => {
|
|
319
|
-
|
|
319
|
+
l(ae), n == null || n(ae);
|
|
320
320
|
},
|
|
321
321
|
placement: a,
|
|
322
322
|
strategy: "fixed",
|
|
323
|
-
middleware: [
|
|
324
|
-
whileElementsMounted:
|
|
325
|
-
}),
|
|
323
|
+
middleware: [ur({ mainAxis: 10 }), mr(), hr()],
|
|
324
|
+
whileElementsMounted: gr
|
|
325
|
+
}), T = it(_, {
|
|
326
326
|
event: "mousedown",
|
|
327
327
|
toggle: !0,
|
|
328
328
|
ignoreMouse: !1
|
|
329
|
-
}),
|
|
330
|
-
listRef:
|
|
331
|
-
activeIndex:
|
|
329
|
+
}), G = ct(_, { role: "menu" }), U = lt(_, { bubbles: !0 }), j = fr(_, {
|
|
330
|
+
listRef: p,
|
|
331
|
+
activeIndex: v,
|
|
332
332
|
nested: !1,
|
|
333
333
|
onNavigate: h,
|
|
334
334
|
loop: !0
|
|
335
|
-
}), re =
|
|
336
|
-
listRef:
|
|
337
|
-
onMatch:
|
|
338
|
-
activeIndex:
|
|
339
|
-
}), { getReferenceProps: oe, getFloatingProps: Ce, getItemProps: P } =
|
|
335
|
+
}), re = pr(_, {
|
|
336
|
+
listRef: k,
|
|
337
|
+
onMatch: d ? h : void 0,
|
|
338
|
+
activeIndex: v
|
|
339
|
+
}), { getReferenceProps: oe, getFloatingProps: Ce, getItemProps: P } = dt([T, G, U, j, re]), Ve = We(e) === "Button" || We(e) === "ButtonIcon", Ot = Ve ? {
|
|
340
340
|
noInternalClick: Ve,
|
|
341
|
-
focusMode:
|
|
342
|
-
mode:
|
|
343
|
-
} : {},
|
|
341
|
+
focusMode: i,
|
|
342
|
+
mode: s
|
|
343
|
+
} : {}, $t = I.cloneElement(
|
|
344
344
|
e,
|
|
345
345
|
{
|
|
346
|
-
...
|
|
346
|
+
...Ot,
|
|
347
347
|
"aria-label": r,
|
|
348
|
-
"data-open":
|
|
348
|
+
"data-open": d ? "" : void 0,
|
|
349
349
|
"data-focus-inside": f ? "" : void 0,
|
|
350
|
-
ref: Le([
|
|
350
|
+
ref: Le([A.setReference, N.ref, u]),
|
|
351
351
|
...oe(
|
|
352
352
|
x.getItemProps({
|
|
353
353
|
...c
|
|
@@ -355,42 +355,42 @@ const Ie = g.createContext({
|
|
|
355
355
|
)
|
|
356
356
|
}
|
|
357
357
|
);
|
|
358
|
-
return
|
|
358
|
+
return F(() => {
|
|
359
359
|
if (!C)
|
|
360
360
|
return;
|
|
361
361
|
function ae() {
|
|
362
|
-
|
|
362
|
+
l(!1), n == null || n(!1);
|
|
363
363
|
}
|
|
364
364
|
return C.events.on("click", ae), () => {
|
|
365
365
|
C.events.off("click", ae);
|
|
366
366
|
};
|
|
367
|
-
}, [C, n]),
|
|
368
|
-
|
|
369
|
-
}, [C,
|
|
370
|
-
|
|
367
|
+
}, [C, n]), F(() => {
|
|
368
|
+
d && C && C.events.emit("menuopen", { nodeId: m });
|
|
369
|
+
}, [C, d, m]), /* @__PURE__ */ y(br, { id: m, children: [
|
|
370
|
+
$t,
|
|
371
371
|
/* @__PURE__ */ o(
|
|
372
|
-
|
|
372
|
+
Ee.Provider,
|
|
373
373
|
{
|
|
374
374
|
value: {
|
|
375
|
-
activeIndex:
|
|
375
|
+
activeIndex: v,
|
|
376
376
|
setActiveIndex: h,
|
|
377
377
|
getItemProps: P,
|
|
378
|
-
setHasFocusInside:
|
|
379
|
-
isOpen:
|
|
378
|
+
setHasFocusInside: b,
|
|
379
|
+
isOpen: d
|
|
380
380
|
},
|
|
381
|
-
children: /* @__PURE__ */ o(
|
|
382
|
-
|
|
381
|
+
children: /* @__PURE__ */ o(vr, { elementsRef: p, labelsRef: k, children: d && /* @__PURE__ */ o(ut, { children: /* @__PURE__ */ o(
|
|
382
|
+
mt,
|
|
383
383
|
{
|
|
384
|
-
context:
|
|
384
|
+
context: _,
|
|
385
385
|
modal: !1,
|
|
386
386
|
initialFocus: 0,
|
|
387
387
|
returnFocus: !0,
|
|
388
388
|
children: /* @__PURE__ */ o(
|
|
389
389
|
"div",
|
|
390
390
|
{
|
|
391
|
-
ref:
|
|
391
|
+
ref: A.setFloating,
|
|
392
392
|
className: "rounded-md bg-surface-light p-4 shadow-sm shadow-border-dark outline-none sm:p-2",
|
|
393
|
-
style:
|
|
393
|
+
style: E,
|
|
394
394
|
...Ce(),
|
|
395
395
|
children: t
|
|
396
396
|
}
|
|
@@ -401,125 +401,125 @@ const Ie = g.createContext({
|
|
|
401
401
|
)
|
|
402
402
|
] });
|
|
403
403
|
}
|
|
404
|
-
), _e =
|
|
404
|
+
), _e = ot((e, t) => /* @__PURE__ */ o(yr, { children: /* @__PURE__ */ o(ft, { ...e, ref: t }) }));
|
|
405
405
|
_e.displayName = "Menu";
|
|
406
|
-
|
|
407
|
-
const
|
|
406
|
+
ft.displayName = "MenuComponent";
|
|
407
|
+
const W = g.forwardRef(
|
|
408
408
|
({
|
|
409
409
|
label: e,
|
|
410
410
|
disabled: t,
|
|
411
411
|
icon: r,
|
|
412
412
|
raw: a = !1,
|
|
413
413
|
children: n,
|
|
414
|
-
ignoreClick:
|
|
415
|
-
...
|
|
414
|
+
ignoreClick: s = !1,
|
|
415
|
+
...i
|
|
416
416
|
}, c) => {
|
|
417
|
-
let
|
|
418
|
-
const
|
|
417
|
+
let u = "";
|
|
418
|
+
const d = g.useContext(Ee), l = nt({ label: t ? null : e }), f = at(), b = Le([l.ref, c]);
|
|
419
419
|
return a && n ? /* @__PURE__ */ o(
|
|
420
420
|
"div",
|
|
421
421
|
{
|
|
422
422
|
role: "menuitem",
|
|
423
|
-
...
|
|
424
|
-
onClick(
|
|
423
|
+
...d.getItemProps({
|
|
424
|
+
onClick(v) {
|
|
425
425
|
var h;
|
|
426
|
-
|
|
426
|
+
s || ((h = i.onClick) == null || h.call(i, v), f == null || f.events.emit("click"));
|
|
427
427
|
}
|
|
428
428
|
}),
|
|
429
429
|
children: n
|
|
430
430
|
}
|
|
431
|
-
) : (r && (
|
|
431
|
+
) : (r && (u = "pl-2"), /* @__PURE__ */ y(
|
|
432
432
|
"button",
|
|
433
433
|
{
|
|
434
|
-
...
|
|
435
|
-
ref:
|
|
434
|
+
...i,
|
|
435
|
+
ref: b,
|
|
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",
|
|
438
438
|
tabIndex: 0,
|
|
439
439
|
disabled: t,
|
|
440
|
-
...
|
|
441
|
-
onClick(
|
|
440
|
+
...d.getItemProps({
|
|
441
|
+
onClick(v) {
|
|
442
442
|
var h;
|
|
443
|
-
|
|
443
|
+
s || ((h = i.onClick) == null || h.call(i, v), f == null || f.events.emit("click"));
|
|
444
444
|
},
|
|
445
|
-
onFocus(
|
|
445
|
+
onFocus(v) {
|
|
446
446
|
var h;
|
|
447
|
-
(h =
|
|
447
|
+
(h = i.onFocus) == null || h.call(i, v), d.setHasFocusInside(!0);
|
|
448
448
|
}
|
|
449
449
|
}),
|
|
450
450
|
children: [
|
|
451
451
|
r,
|
|
452
|
-
e && /* @__PURE__ */ o("span", { className:
|
|
452
|
+
e && /* @__PURE__ */ o("span", { className: u, children: e })
|
|
453
453
|
]
|
|
454
454
|
}
|
|
455
455
|
));
|
|
456
456
|
}
|
|
457
457
|
);
|
|
458
|
-
|
|
459
|
-
const
|
|
458
|
+
W.displayName = "MenuItem";
|
|
459
|
+
const Rr = ({ 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 Mr = "av-togglegroup", Ar = "av-togglegroup-item-wrapper", zr = "av-togglegroup-item";
|
|
490
|
+
function Be(e, t = []) {
|
|
491
491
|
let r = [];
|
|
492
|
-
function a(
|
|
493
|
-
const c = g.createContext(
|
|
494
|
-
r = [...r,
|
|
495
|
-
const
|
|
496
|
-
var p;
|
|
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
|
-
};
|
|
500
|
-
l.displayName = i + "Provider";
|
|
501
|
-
function u(f, p) {
|
|
492
|
+
function a(s, i) {
|
|
493
|
+
const c = g.createContext(i), u = r.length;
|
|
494
|
+
r = [...r, i];
|
|
495
|
+
const d = (f) => {
|
|
502
496
|
var b;
|
|
503
|
-
const h = ((b =
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
497
|
+
const { scope: v, children: h, ...p } = f, k = ((b = v == null ? void 0 : v[e]) == null ? void 0 : b[u]) || c, x = g.useMemo(() => p, Object.values(p));
|
|
498
|
+
return /* @__PURE__ */ o(k.Provider, { value: x, children: h });
|
|
499
|
+
};
|
|
500
|
+
d.displayName = s + "Provider";
|
|
501
|
+
function l(f, b) {
|
|
502
|
+
var v;
|
|
503
|
+
const h = ((v = b == null ? void 0 : b[e]) == null ? void 0 : v[u]) || c, p = g.useContext(h);
|
|
504
|
+
if (p) return p;
|
|
505
|
+
if (i !== void 0) return i;
|
|
506
|
+
throw new Error(`\`${f}\` must be used within \`${s}\``);
|
|
507
507
|
}
|
|
508
|
-
return [
|
|
508
|
+
return [d, l];
|
|
509
509
|
}
|
|
510
510
|
const n = () => {
|
|
511
|
-
const
|
|
512
|
-
return function(
|
|
513
|
-
const c = (
|
|
511
|
+
const s = r.map((i) => g.createContext(i));
|
|
512
|
+
return function(i) {
|
|
513
|
+
const c = (i == null ? void 0 : i[e]) || s;
|
|
514
514
|
return g.useMemo(
|
|
515
|
-
() => ({ [`__scope${e}`]: { ...
|
|
516
|
-
[
|
|
515
|
+
() => ({ [`__scope${e}`]: { ...i, [e]: c } }),
|
|
516
|
+
[i, c]
|
|
517
517
|
);
|
|
518
518
|
};
|
|
519
519
|
};
|
|
520
|
-
return n.scopeName = e, [a,
|
|
520
|
+
return n.scopeName = e, [a, Lr(n, ...t)];
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function Lr(...e) {
|
|
523
523
|
const t = e[0];
|
|
524
524
|
if (e.length === 1) return t;
|
|
525
525
|
const r = () => {
|
|
@@ -528,44 +528,44 @@ function Rr(...e) {
|
|
|
528
528
|
scopeName: n.scopeName
|
|
529
529
|
}));
|
|
530
530
|
return function(n) {
|
|
531
|
-
const
|
|
532
|
-
const
|
|
533
|
-
return { ...
|
|
531
|
+
const s = a.reduce((i, { useScope: c, scopeName: u }) => {
|
|
532
|
+
const d = c(n)[`__scope${u}`];
|
|
533
|
+
return { ...i, ...d };
|
|
534
534
|
}, {});
|
|
535
|
-
return g.useMemo(() => ({ [`__scope${t.scopeName}`]:
|
|
535
|
+
return g.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
536
536
|
};
|
|
537
537
|
};
|
|
538
538
|
return r.scopeName = t.scopeName, r;
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function Ke(e, t) {
|
|
541
541
|
if (typeof e == "function")
|
|
542
542
|
return e(t);
|
|
543
543
|
e != null && (e.current = t);
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function pt(...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 s = Ke(n, t);
|
|
550
|
+
return !r && typeof s == "function" && (r = !0), s;
|
|
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 s = a[n];
|
|
556
|
+
typeof s == "function" ? s() : Ke(e[n], null);
|
|
557
557
|
}
|
|
558
558
|
};
|
|
559
559
|
};
|
|
560
560
|
}
|
|
561
561
|
function Se(...e) {
|
|
562
|
-
return g.useCallback(
|
|
562
|
+
return g.useCallback(pt(...e), e);
|
|
563
563
|
}
|
|
564
564
|
var pe = g.forwardRef((e, t) => {
|
|
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(
|
|
565
|
+
const { children: r, ...a } = e, n = g.Children.toArray(r), s = n.find(Pr);
|
|
566
|
+
if (s) {
|
|
567
|
+
const i = s.props.children, c = n.map((u) => u === s ? g.Children.count(i) > 1 ? g.Children.only(null) : g.isValidElement(i) ? i.props.children : null : u);
|
|
568
|
+
return /* @__PURE__ */ o(Re, { ...a, ref: t, children: g.isValidElement(i) ? g.cloneElement(i, void 0, c) : null });
|
|
569
569
|
}
|
|
570
570
|
return /* @__PURE__ */ o(Re, { ...a, ref: t, children: r });
|
|
571
571
|
});
|
|
@@ -573,36 +573,36 @@ 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 = $r(r);
|
|
577
577
|
return g.cloneElement(r, {
|
|
578
|
-
...
|
|
578
|
+
...Or(a, r.props),
|
|
579
579
|
// @ts-ignore
|
|
580
|
-
ref: t ?
|
|
580
|
+
ref: t ? pt(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 Br = ({ children: e }) => /* @__PURE__ */ o(z, { children: e });
|
|
587
|
+
function Pr(e) {
|
|
588
|
+
return g.isValidElement(e) && e.type === Br;
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function Or(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], s = t[a];
|
|
594
|
+
/^on[A-Z]/.test(a) ? n && s ? r[a] = (...i) => {
|
|
595
|
+
s(...i), n(...i);
|
|
596
|
+
} : n && (r[a] = n) : a === "style" ? r[a] = { ...n, ...s } : a === "className" && (r[a] = [n, s].filter(Boolean).join(" "));
|
|
597
597
|
}
|
|
598
598
|
return { ...e, ...r };
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function $r(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 Vr = [
|
|
606
606
|
"a",
|
|
607
607
|
"button",
|
|
608
608
|
"div",
|
|
@@ -619,69 +619,69 @@ var Pr = [
|
|
|
619
619
|
"span",
|
|
620
620
|
"svg",
|
|
621
621
|
"ul"
|
|
622
|
-
], de =
|
|
622
|
+
], de = Vr.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: s, ...i } = a, c = s ? pe : t;
|
|
625
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ o(c, { ...i, 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 Dr(e) {
|
|
636
|
+
const t = e + "CollectionProvider", [r, a] = Be(t), [n, s] = 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: x, collectionRef:
|
|
639
|
+
), i = (v) => {
|
|
640
|
+
const { scope: h, children: p } = v, k = I.useRef(null), x = I.useRef(/* @__PURE__ */ new Map()).current;
|
|
641
|
+
return /* @__PURE__ */ o(n, { scope: h, itemMap: x, collectionRef: k, children: p });
|
|
642
642
|
};
|
|
643
|
-
|
|
644
|
-
const c = e + "CollectionSlot",
|
|
645
|
-
(
|
|
646
|
-
const { scope:
|
|
647
|
-
return /* @__PURE__ */ o(pe, { ref: C, children:
|
|
643
|
+
i.displayName = t;
|
|
644
|
+
const c = e + "CollectionSlot", u = I.forwardRef(
|
|
645
|
+
(v, h) => {
|
|
646
|
+
const { scope: p, children: k } = v, x = s(c, p), C = Se(h, x.collectionRef);
|
|
647
|
+
return /* @__PURE__ */ o(pe, { ref: C, children: k });
|
|
648
648
|
}
|
|
649
649
|
);
|
|
650
|
-
|
|
651
|
-
const
|
|
652
|
-
(
|
|
653
|
-
const { scope:
|
|
654
|
-
return
|
|
650
|
+
u.displayName = c;
|
|
651
|
+
const d = e + "CollectionItemSlot", l = "data-radix-collection-item", f = I.forwardRef(
|
|
652
|
+
(v, h) => {
|
|
653
|
+
const { scope: p, children: k, ...x } = v, C = I.useRef(null), m = Se(h, C), N = s(d, p);
|
|
654
|
+
return I.useEffect(() => (N.itemMap.set(C, { ref: C, ...x }), () => void N.itemMap.delete(C))), /* @__PURE__ */ o(pe, { [l]: "", ref: m, children: k });
|
|
655
655
|
}
|
|
656
656
|
);
|
|
657
|
-
f.displayName =
|
|
658
|
-
function
|
|
659
|
-
const h =
|
|
660
|
-
return
|
|
661
|
-
const
|
|
662
|
-
if (!
|
|
663
|
-
const
|
|
657
|
+
f.displayName = d;
|
|
658
|
+
function b(v) {
|
|
659
|
+
const h = s(e + "CollectionConsumer", v);
|
|
660
|
+
return I.useCallback(() => {
|
|
661
|
+
const p = h.collectionRef.current;
|
|
662
|
+
if (!p) return [];
|
|
663
|
+
const k = Array.from(p.querySelectorAll(`[${l}]`));
|
|
664
664
|
return Array.from(h.itemMap.values()).sort(
|
|
665
|
-
(x, C) =>
|
|
665
|
+
(x, C) => k.indexOf(x.ref.current) - k.indexOf(C.ref.current)
|
|
666
666
|
);
|
|
667
667
|
}, [h.collectionRef, h.itemMap]);
|
|
668
668
|
}
|
|
669
669
|
return [
|
|
670
|
-
{ Provider:
|
|
671
|
-
|
|
670
|
+
{ Provider: i, Slot: u, ItemSlot: f },
|
|
671
|
+
b,
|
|
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 Fr = globalThis != null && globalThis.document ? g.useLayoutEffect : () => {
|
|
676
|
+
}, Hr = g.useId || (() => {
|
|
677
|
+
}), Gr = 0;
|
|
678
|
+
function Ur(e) {
|
|
679
|
+
const [t, r] = g.useState(Hr());
|
|
680
|
+
return Fr(() => {
|
|
681
|
+
r((a) => a ?? String(Gr++));
|
|
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,158 +696,158 @@ function ye({
|
|
|
696
696
|
onChange: r = () => {
|
|
697
697
|
}
|
|
698
698
|
}) {
|
|
699
|
-
const [a, n] =
|
|
700
|
-
(
|
|
701
|
-
if (
|
|
702
|
-
const
|
|
703
|
-
|
|
699
|
+
const [a, n] = jr({ defaultProp: t, onChange: r }), s = e !== void 0, i = s ? e : a, c = Pe(r), u = g.useCallback(
|
|
700
|
+
(d) => {
|
|
701
|
+
if (s) {
|
|
702
|
+
const l = typeof d == "function" ? d(e) : d;
|
|
703
|
+
l !== e && c(l);
|
|
704
704
|
} else
|
|
705
|
-
n(
|
|
705
|
+
n(d);
|
|
706
706
|
},
|
|
707
|
-
[
|
|
707
|
+
[s, e, n, c]
|
|
708
708
|
);
|
|
709
|
-
return [
|
|
709
|
+
return [i, u];
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function jr({
|
|
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), s = Pe(t);
|
|
716
716
|
return g.useEffect(() => {
|
|
717
|
-
n.current !== a && (
|
|
718
|
-
}, [a, n,
|
|
717
|
+
n.current !== a && (s(a), n.current = a);
|
|
718
|
+
}, [a, n, s]), r;
|
|
719
719
|
}
|
|
720
|
-
var
|
|
721
|
-
function
|
|
722
|
-
const t = g.useContext(
|
|
720
|
+
var Wr = g.createContext(void 0);
|
|
721
|
+
function bt(e) {
|
|
722
|
+
const t = g.useContext(Wr);
|
|
723
723
|
return e || t || "ltr";
|
|
724
724
|
}
|
|
725
|
-
var Te = "rovingFocusGroup.onEntryFocus",
|
|
725
|
+
var Te = "rovingFocusGroup.onEntryFocus", Kr = { bubbles: !1, cancelable: !0 }, ke = "RovingFocusGroup", [Me, vt, Yr] = Dr(ke), [qr, yt] = Be(
|
|
726
726
|
ke,
|
|
727
|
-
[
|
|
728
|
-
), [
|
|
729
|
-
(e, t) => /* @__PURE__ */ o(Me.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ o(Me.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ o(
|
|
727
|
+
[Yr]
|
|
728
|
+
), [Zr, Qr] = qr(ke), kt = g.forwardRef(
|
|
729
|
+
(e, t) => /* @__PURE__ */ o(Me.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ o(Me.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ o(Xr, { ...e, ref: t }) }) })
|
|
730
730
|
);
|
|
731
|
-
|
|
732
|
-
var
|
|
731
|
+
kt.displayName = ke;
|
|
732
|
+
var Xr = 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: s,
|
|
738
|
+
currentTabStopId: i,
|
|
739
739
|
defaultCurrentTabStopId: c,
|
|
740
|
-
onCurrentTabStopIdChange:
|
|
741
|
-
onEntryFocus:
|
|
742
|
-
preventScrollOnEntryFocus:
|
|
740
|
+
onCurrentTabStopIdChange: u,
|
|
741
|
+
onEntryFocus: d,
|
|
742
|
+
preventScrollOnEntryFocus: l = !1,
|
|
743
743
|
...f
|
|
744
|
-
} = e,
|
|
745
|
-
prop:
|
|
744
|
+
} = e, b = g.useRef(null), v = Se(t, b), h = bt(s), [p = null, k] = ye({
|
|
745
|
+
prop: i,
|
|
746
746
|
defaultProp: c,
|
|
747
|
-
onChange:
|
|
748
|
-
}), [x, C] = g.useState(!1),
|
|
747
|
+
onChange: u
|
|
748
|
+
}), [x, C] = g.useState(!1), m = Pe(d), N = vt(r), E = g.useRef(!1), [A, _] = g.useState(0);
|
|
749
749
|
return g.useEffect(() => {
|
|
750
|
-
const
|
|
751
|
-
if (
|
|
752
|
-
return
|
|
753
|
-
}, [
|
|
754
|
-
|
|
750
|
+
const T = b.current;
|
|
751
|
+
if (T)
|
|
752
|
+
return T.addEventListener(Te, m), () => T.removeEventListener(Te, m);
|
|
753
|
+
}, [m]), /* @__PURE__ */ o(
|
|
754
|
+
Zr,
|
|
755
755
|
{
|
|
756
756
|
scope: r,
|
|
757
757
|
orientation: a,
|
|
758
758
|
dir: h,
|
|
759
759
|
loop: n,
|
|
760
|
-
currentTabStopId:
|
|
760
|
+
currentTabStopId: p,
|
|
761
761
|
onItemFocus: g.useCallback(
|
|
762
|
-
(
|
|
763
|
-
[
|
|
762
|
+
(T) => k(T),
|
|
763
|
+
[k]
|
|
764
764
|
),
|
|
765
765
|
onItemShiftTab: g.useCallback(() => C(!0), []),
|
|
766
766
|
onFocusableItemAdd: g.useCallback(
|
|
767
|
-
() =>
|
|
767
|
+
() => _((T) => T + 1),
|
|
768
768
|
[]
|
|
769
769
|
),
|
|
770
770
|
onFocusableItemRemove: g.useCallback(
|
|
771
|
-
() =>
|
|
771
|
+
() => _((T) => T - 1),
|
|
772
772
|
[]
|
|
773
773
|
),
|
|
774
774
|
children: /* @__PURE__ */ o(
|
|
775
775
|
de.div,
|
|
776
776
|
{
|
|
777
|
-
tabIndex: x ||
|
|
777
|
+
tabIndex: x || A === 0 ? -1 : 0,
|
|
778
778
|
"data-orientation": a,
|
|
779
779
|
...f,
|
|
780
|
-
ref:
|
|
780
|
+
ref: v,
|
|
781
781
|
style: { outline: "none", ...e.style },
|
|
782
|
-
onMouseDown:
|
|
783
|
-
|
|
782
|
+
onMouseDown: Y(e.onMouseDown, () => {
|
|
783
|
+
E.current = !0;
|
|
784
784
|
}),
|
|
785
|
-
onFocus:
|
|
786
|
-
const
|
|
787
|
-
if (
|
|
788
|
-
const
|
|
789
|
-
if (
|
|
790
|
-
const
|
|
785
|
+
onFocus: Y(e.onFocus, (T) => {
|
|
786
|
+
const G = !E.current;
|
|
787
|
+
if (T.target === T.currentTarget && G && !x) {
|
|
788
|
+
const U = new CustomEvent(Te, Kr);
|
|
789
|
+
if (T.currentTarget.dispatchEvent(U), !U.defaultPrevented) {
|
|
790
|
+
const j = N().filter((P) => P.focusable), re = j.find((P) => P.active), oe = j.find((P) => P.id === p), Ce = [re, oe, ...j].filter(
|
|
791
791
|
Boolean
|
|
792
792
|
).map((P) => P.ref.current);
|
|
793
|
-
|
|
793
|
+
Ct(Ce, l);
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
|
-
|
|
796
|
+
E.current = !1;
|
|
797
797
|
}),
|
|
798
|
-
onBlur:
|
|
798
|
+
onBlur: Y(e.onBlur, () => C(!1))
|
|
799
799
|
}
|
|
800
800
|
)
|
|
801
801
|
}
|
|
802
802
|
);
|
|
803
|
-
}),
|
|
803
|
+
}), wt = "RovingFocusGroupItem", xt = 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: s,
|
|
810
|
+
...i
|
|
811
|
+
} = e, c = Ur(), u = s || c, d = Qr(wt, r), l = d.currentTabStopId === u, f = vt(r), { onFocusableItemAdd: b, onFocusableItemRemove: v } = d;
|
|
812
812
|
return g.useEffect(() => {
|
|
813
813
|
if (a)
|
|
814
|
-
return
|
|
815
|
-
}, [a,
|
|
814
|
+
return b(), () => v();
|
|
815
|
+
}, [a, b, v]), /* @__PURE__ */ o(
|
|
816
816
|
Me.ItemSlot,
|
|
817
817
|
{
|
|
818
818
|
scope: r,
|
|
819
|
-
id:
|
|
819
|
+
id: u,
|
|
820
820
|
focusable: a,
|
|
821
821
|
active: n,
|
|
822
822
|
children: /* @__PURE__ */ o(
|
|
823
823
|
de.span,
|
|
824
824
|
{
|
|
825
|
-
tabIndex:
|
|
826
|
-
"data-orientation":
|
|
827
|
-
...
|
|
825
|
+
tabIndex: l ? 0 : -1,
|
|
826
|
+
"data-orientation": d.orientation,
|
|
827
|
+
...i,
|
|
828
828
|
ref: t,
|
|
829
|
-
onMouseDown:
|
|
830
|
-
a ?
|
|
829
|
+
onMouseDown: Y(e.onMouseDown, (h) => {
|
|
830
|
+
a ? d.onItemFocus(u) : h.preventDefault();
|
|
831
831
|
}),
|
|
832
|
-
onFocus:
|
|
833
|
-
onKeyDown:
|
|
832
|
+
onFocus: Y(e.onFocus, () => d.onItemFocus(u)),
|
|
833
|
+
onKeyDown: Y(e.onKeyDown, (h) => {
|
|
834
834
|
if (h.key === "Tab" && h.shiftKey) {
|
|
835
|
-
|
|
835
|
+
d.onItemShiftTab();
|
|
836
836
|
return;
|
|
837
837
|
}
|
|
838
838
|
if (h.target !== h.currentTarget) return;
|
|
839
|
-
const
|
|
840
|
-
if (
|
|
839
|
+
const p = to(h, d.orientation, d.dir);
|
|
840
|
+
if (p !== void 0) {
|
|
841
841
|
if (h.metaKey || h.ctrlKey || h.altKey || h.shiftKey) return;
|
|
842
842
|
h.preventDefault();
|
|
843
|
-
let
|
|
844
|
-
if (
|
|
845
|
-
else if (
|
|
846
|
-
|
|
847
|
-
const x =
|
|
848
|
-
|
|
843
|
+
let k = f().filter((x) => x.focusable).map((x) => x.ref.current);
|
|
844
|
+
if (p === "last") k.reverse();
|
|
845
|
+
else if (p === "prev" || p === "next") {
|
|
846
|
+
p === "prev" && k.reverse();
|
|
847
|
+
const x = k.indexOf(h.currentTarget);
|
|
848
|
+
k = d.loop ? ro(k, x + 1) : k.slice(x + 1);
|
|
849
849
|
}
|
|
850
|
-
setTimeout(() =>
|
|
850
|
+
setTimeout(() => Ct(k));
|
|
851
851
|
}
|
|
852
852
|
})
|
|
853
853
|
}
|
|
@@ -856,8 +856,8 @@ var Yr = g.forwardRef((e, t) => {
|
|
|
856
856
|
);
|
|
857
857
|
}
|
|
858
858
|
);
|
|
859
|
-
|
|
860
|
-
var
|
|
859
|
+
xt.displayName = wt;
|
|
860
|
+
var Jr = {
|
|
861
861
|
ArrowLeft: "prev",
|
|
862
862
|
ArrowUp: "prev",
|
|
863
863
|
ArrowRight: "next",
|
|
@@ -867,24 +867,24 @@ var qr = {
|
|
|
867
867
|
PageDown: "last",
|
|
868
868
|
End: "last"
|
|
869
869
|
};
|
|
870
|
-
function
|
|
870
|
+
function eo(e, t) {
|
|
871
871
|
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
872
872
|
}
|
|
873
|
-
function
|
|
874
|
-
const a =
|
|
873
|
+
function to(e, t, r) {
|
|
874
|
+
const a = eo(e.key, r);
|
|
875
875
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(a)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(a)))
|
|
876
|
-
return
|
|
876
|
+
return Jr[a];
|
|
877
877
|
}
|
|
878
|
-
function
|
|
878
|
+
function Ct(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 ro(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 oo = kt, ao = xt, no = "Toggle", Nt = g.forwardRef((e, t) => {
|
|
887
|
+
const { pressed: r, defaultPressed: a = !1, onPressedChange: n, ...s } = e, [i = !1, c] = ye({
|
|
888
888
|
prop: r,
|
|
889
889
|
onChange: n,
|
|
890
890
|
defaultProp: a
|
|
@@ -893,159 +893,159 @@ var Jr = vt, eo = kt, to = "Toggle", xt = g.forwardRef((e, t) => {
|
|
|
893
893
|
de.button,
|
|
894
894
|
{
|
|
895
895
|
type: "button",
|
|
896
|
-
"aria-pressed":
|
|
897
|
-
"data-state":
|
|
896
|
+
"aria-pressed": i,
|
|
897
|
+
"data-state": i ? "on" : "off",
|
|
898
898
|
"data-disabled": e.disabled ? "" : void 0,
|
|
899
|
-
...
|
|
899
|
+
...s,
|
|
900
900
|
ref: t,
|
|
901
|
-
onClick:
|
|
902
|
-
e.disabled || c(!
|
|
901
|
+
onClick: Y(e.onClick, () => {
|
|
902
|
+
e.disabled || c(!i);
|
|
903
903
|
})
|
|
904
904
|
}
|
|
905
905
|
);
|
|
906
906
|
});
|
|
907
|
-
|
|
908
|
-
var ee = "ToggleGroup", [
|
|
909
|
-
|
|
910
|
-
]),
|
|
907
|
+
Nt.displayName = no;
|
|
908
|
+
var ee = "ToggleGroup", [Tt, ma] = Be(ee, [
|
|
909
|
+
yt
|
|
910
|
+
]), It = yt(), Oe = I.forwardRef((e, t) => {
|
|
911
911
|
const { type: r, ...a } = e;
|
|
912
912
|
if (r === "single")
|
|
913
|
-
return /* @__PURE__ */ o(
|
|
913
|
+
return /* @__PURE__ */ o(so, { ...a, ref: t });
|
|
914
914
|
if (r === "multiple")
|
|
915
|
-
return /* @__PURE__ */ o(
|
|
915
|
+
return /* @__PURE__ */ o(io, { ...a, ref: t });
|
|
916
916
|
throw new Error(`Missing prop \`type\` expected on \`${ee}\``);
|
|
917
917
|
});
|
|
918
|
-
|
|
919
|
-
var [
|
|
918
|
+
Oe.displayName = ee;
|
|
919
|
+
var [Et, _t] = Tt(ee), so = I.forwardRef((e, t) => {
|
|
920
920
|
const {
|
|
921
921
|
value: r,
|
|
922
922
|
defaultValue: a,
|
|
923
923
|
onValueChange: n = () => {
|
|
924
924
|
},
|
|
925
|
-
...
|
|
926
|
-
} = e, [
|
|
925
|
+
...s
|
|
926
|
+
} = e, [i, c] = ye({
|
|
927
927
|
prop: r,
|
|
928
928
|
defaultProp: a,
|
|
929
929
|
onChange: n
|
|
930
930
|
});
|
|
931
931
|
return /* @__PURE__ */ o(
|
|
932
|
-
|
|
932
|
+
Et,
|
|
933
933
|
{
|
|
934
934
|
scope: e.__scopeToggleGroup,
|
|
935
935
|
type: "single",
|
|
936
|
-
value:
|
|
936
|
+
value: i ? [i] : [],
|
|
937
937
|
onItemActivate: c,
|
|
938
|
-
onItemDeactivate:
|
|
939
|
-
children: /* @__PURE__ */ o(
|
|
938
|
+
onItemDeactivate: I.useCallback(() => c(""), [c]),
|
|
939
|
+
children: /* @__PURE__ */ o(St, { ...s, ref: t })
|
|
940
940
|
}
|
|
941
941
|
);
|
|
942
|
-
}),
|
|
942
|
+
}), io = I.forwardRef((e, t) => {
|
|
943
943
|
const {
|
|
944
944
|
value: r,
|
|
945
945
|
defaultValue: a,
|
|
946
946
|
onValueChange: n = () => {
|
|
947
947
|
},
|
|
948
|
-
...
|
|
949
|
-
} = e, [
|
|
948
|
+
...s
|
|
949
|
+
} = e, [i = [], c] = ye({
|
|
950
950
|
prop: r,
|
|
951
951
|
defaultProp: a,
|
|
952
952
|
onChange: n
|
|
953
|
-
}),
|
|
954
|
-
(
|
|
953
|
+
}), u = I.useCallback(
|
|
954
|
+
(l) => c((f = []) => [...f, l]),
|
|
955
955
|
[c]
|
|
956
|
-
),
|
|
957
|
-
(
|
|
956
|
+
), d = I.useCallback(
|
|
957
|
+
(l) => c((f = []) => f.filter((b) => b !== l)),
|
|
958
958
|
[c]
|
|
959
959
|
);
|
|
960
960
|
return /* @__PURE__ */ o(
|
|
961
|
-
|
|
961
|
+
Et,
|
|
962
962
|
{
|
|
963
963
|
scope: e.__scopeToggleGroup,
|
|
964
964
|
type: "multiple",
|
|
965
|
-
value:
|
|
966
|
-
onItemActivate:
|
|
967
|
-
onItemDeactivate:
|
|
968
|
-
children: /* @__PURE__ */ o(
|
|
965
|
+
value: i,
|
|
966
|
+
onItemActivate: u,
|
|
967
|
+
onItemDeactivate: d,
|
|
968
|
+
children: /* @__PURE__ */ o(St, { ...s, ref: t })
|
|
969
969
|
}
|
|
970
970
|
);
|
|
971
971
|
});
|
|
972
|
-
|
|
973
|
-
var [
|
|
972
|
+
Oe.displayName = ee;
|
|
973
|
+
var [co, lo] = Tt(ee), St = I.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: s,
|
|
980
|
+
dir: i,
|
|
981
981
|
loop: c = !0,
|
|
982
|
-
...
|
|
983
|
-
} = e,
|
|
984
|
-
return /* @__PURE__ */ o(
|
|
985
|
-
|
|
982
|
+
...u
|
|
983
|
+
} = e, d = It(r), l = bt(i), f = { role: "group", dir: l, ...u };
|
|
984
|
+
return /* @__PURE__ */ o(co, { scope: r, rovingFocus: n, disabled: a, children: n ? /* @__PURE__ */ o(
|
|
985
|
+
oo,
|
|
986
986
|
{
|
|
987
987
|
asChild: !0,
|
|
988
|
-
...
|
|
989
|
-
orientation:
|
|
990
|
-
dir:
|
|
988
|
+
...d,
|
|
989
|
+
orientation: s,
|
|
990
|
+
dir: l,
|
|
991
991
|
loop: c,
|
|
992
992
|
children: /* @__PURE__ */ o(de.div, { ...f, ref: t })
|
|
993
993
|
}
|
|
994
994
|
) : /* @__PURE__ */ o(de.div, { ...f, ref: t }) });
|
|
995
995
|
}
|
|
996
|
-
), be = "ToggleGroupItem",
|
|
996
|
+
), be = "ToggleGroupItem", Rt = I.forwardRef(
|
|
997
997
|
(e, t) => {
|
|
998
|
-
const r =
|
|
998
|
+
const r = _t(be, e.__scopeToggleGroup), a = lo(be, e.__scopeToggleGroup), n = It(e.__scopeToggleGroup), s = r.value.includes(e.value), i = a.disabled || e.disabled, c = { ...e, pressed: s, disabled: i }, u = I.useRef(null);
|
|
999
999
|
return a.rovingFocus ? /* @__PURE__ */ o(
|
|
1000
|
-
|
|
1000
|
+
ao,
|
|
1001
1001
|
{
|
|
1002
1002
|
asChild: !0,
|
|
1003
1003
|
...n,
|
|
1004
|
-
focusable: !
|
|
1005
|
-
active:
|
|
1006
|
-
ref:
|
|
1007
|
-
children: /* @__PURE__ */ o(
|
|
1004
|
+
focusable: !i,
|
|
1005
|
+
active: s,
|
|
1006
|
+
ref: u,
|
|
1007
|
+
children: /* @__PURE__ */ o(Ye, { ...c, ref: t })
|
|
1008
1008
|
}
|
|
1009
|
-
) : /* @__PURE__ */ o(
|
|
1009
|
+
) : /* @__PURE__ */ o(Ye, { ...c, ref: t });
|
|
1010
1010
|
}
|
|
1011
1011
|
);
|
|
1012
|
-
|
|
1013
|
-
var
|
|
1012
|
+
Rt.displayName = be;
|
|
1013
|
+
var Ye = I.forwardRef(
|
|
1014
1014
|
(e, t) => {
|
|
1015
|
-
const { __scopeToggleGroup: r, value: a, ...n } = e,
|
|
1015
|
+
const { __scopeToggleGroup: r, value: a, ...n } = e, s = _t(be, r), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, c = s.type === "single" ? i : void 0;
|
|
1016
1016
|
return /* @__PURE__ */ o(
|
|
1017
|
-
|
|
1017
|
+
Nt,
|
|
1018
1018
|
{
|
|
1019
1019
|
...c,
|
|
1020
1020
|
...n,
|
|
1021
1021
|
ref: t,
|
|
1022
|
-
onPressedChange: (
|
|
1023
|
-
|
|
1022
|
+
onPressedChange: (u) => {
|
|
1023
|
+
u ? s.onItemActivate(a) : s.onItemDeactivate(a);
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
1026
1026
|
);
|
|
1027
1027
|
}
|
|
1028
|
-
),
|
|
1029
|
-
const
|
|
1028
|
+
), uo = Oe, mo = Rt;
|
|
1029
|
+
const Mt = I.createContext({
|
|
1030
1030
|
size: "medium",
|
|
1031
1031
|
focusMode: "system",
|
|
1032
1032
|
mode: "system"
|
|
1033
|
-
}),
|
|
1033
|
+
}), ho = ({ 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
|
+
}), go = ({ 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
|
+
}), fo = ({ 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
|
+
}), po = ({ mode: e }) => w(
|
|
1048
|
+
Ar,
|
|
1049
1049
|
"px-1",
|
|
1050
1050
|
"relative",
|
|
1051
1051
|
"border-r",
|
|
@@ -1058,26 +1058,26 @@ const St = E.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
|
+
), bo = ({
|
|
1062
1062
|
focusMode: e,
|
|
1063
1063
|
mode: t,
|
|
1064
1064
|
size: r
|
|
1065
1065
|
}) => ({
|
|
1066
|
-
wrapperClass:
|
|
1066
|
+
wrapperClass: po({ mode: t }),
|
|
1067
1067
|
itemClass: w(
|
|
1068
|
-
|
|
1068
|
+
zr,
|
|
1069
1069
|
"flex items-center justify-center bg-transparent",
|
|
1070
1070
|
"rounded-sm",
|
|
1071
1071
|
"transition duration-200 ease",
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1072
|
+
fo({ size: r }),
|
|
1073
|
+
ho({ focusMode: e }),
|
|
1074
|
+
go({ mode: t })
|
|
1075
1075
|
)
|
|
1076
|
-
}),
|
|
1076
|
+
}), vo = ({
|
|
1077
1077
|
mode: e,
|
|
1078
1078
|
className: t
|
|
1079
1079
|
}) => w(
|
|
1080
|
-
|
|
1080
|
+
Mr,
|
|
1081
1081
|
"inline-flex p-1",
|
|
1082
1082
|
"rounded-sm",
|
|
1083
1083
|
{
|
|
@@ -1087,75 +1087,75 @@ const St = E.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
|
+
), yo = ({
|
|
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: s = "system",
|
|
1097
|
+
size: i = "medium",
|
|
1098
1098
|
defaultValue: c,
|
|
1099
|
-
className:
|
|
1100
|
-
...
|
|
1099
|
+
className: u,
|
|
1100
|
+
...d
|
|
1101
1101
|
}) => {
|
|
1102
|
-
const
|
|
1103
|
-
return /* @__PURE__ */ o(
|
|
1104
|
-
|
|
1102
|
+
const l = vo({ mode: n, className: u }), f = { size: i, focusMode: s, mode: n };
|
|
1103
|
+
return /* @__PURE__ */ o(Mt.Provider, { value: f, children: /* @__PURE__ */ o(
|
|
1104
|
+
uo,
|
|
1105
1105
|
{
|
|
1106
1106
|
disabled: a,
|
|
1107
|
-
className:
|
|
1107
|
+
className: l,
|
|
1108
1108
|
value: t,
|
|
1109
1109
|
defaultValue: c,
|
|
1110
1110
|
onValueChange: r,
|
|
1111
|
-
...
|
|
1111
|
+
...d,
|
|
1112
1112
|
type: "single",
|
|
1113
1113
|
children: e
|
|
1114
1114
|
}
|
|
1115
1115
|
) });
|
|
1116
|
-
},
|
|
1117
|
-
const { size: r, focusMode: a, mode: n } =
|
|
1116
|
+
}, ko = ({ value: e, disabled: t }) => {
|
|
1117
|
+
const { size: r, focusMode: a, mode: n } = D(Mt), { itemClass: s, wrapperClass: i } = bo({
|
|
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: i, children: /* @__PURE__ */ o(
|
|
1123
|
+
mo,
|
|
1124
1124
|
{
|
|
1125
1125
|
disabled: t,
|
|
1126
|
-
className:
|
|
1126
|
+
className: s,
|
|
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 qe = "av-messagebox", Ze = "av-panel", Qe = "av-button", we = "icon", At = "button", Ae = "link", wo = ({
|
|
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 s = "max-h-8 py-0 px-2", i = "max-h-9 py-1 px-3", c = "max-h-12 py-2 px-4";
|
|
1153
1153
|
switch (e) {
|
|
1154
|
-
case
|
|
1154
|
+
case At:
|
|
1155
1155
|
case Ae:
|
|
1156
1156
|
return w({
|
|
1157
|
-
[
|
|
1158
|
-
[
|
|
1157
|
+
[s]: t === "small",
|
|
1158
|
+
[i]: t === "medium",
|
|
1159
1159
|
[c]: t === "large"
|
|
1160
1160
|
});
|
|
1161
1161
|
case we:
|
|
@@ -1171,30 +1171,30 @@ const Ke = "av-messagebox", Ye = "av-panel", qe = "av-button", we = "icon", Rt =
|
|
|
1171
1171
|
"h-12 px-4": t === "large" && (r || a)
|
|
1172
1172
|
});
|
|
1173
1173
|
}
|
|
1174
|
-
},
|
|
1174
|
+
}, xo = ({
|
|
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", s = "text-base font-medium", i = "text-lg font-medium";
|
|
1181
1181
|
switch (e) {
|
|
1182
|
-
case
|
|
1182
|
+
case At:
|
|
1183
1183
|
case Ae:
|
|
1184
1184
|
return w({
|
|
1185
1185
|
"text-center": e === Ae,
|
|
1186
1186
|
[n]: t === "small",
|
|
1187
|
-
[
|
|
1188
|
-
[
|
|
1187
|
+
[s]: t === "medium",
|
|
1188
|
+
[i]: t === "large"
|
|
1189
1189
|
});
|
|
1190
1190
|
case we:
|
|
1191
1191
|
return w({
|
|
1192
1192
|
[n]: t === "small" && (r || a),
|
|
1193
|
-
[
|
|
1194
|
-
[
|
|
1193
|
+
[s]: t === "medium" && (r || a),
|
|
1194
|
+
[i]: t === "large" && (r || a)
|
|
1195
1195
|
});
|
|
1196
1196
|
}
|
|
1197
|
-
},
|
|
1197
|
+
}, Co = ({
|
|
1198
1198
|
mode: e,
|
|
1199
1199
|
noBackground: t,
|
|
1200
1200
|
noTruncate: r,
|
|
@@ -1234,7 +1234,7 @@ const Ke = "av-messagebox", Ye = "av-panel", qe = "av-button", we = "icon", Rt =
|
|
|
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
|
+
}, No = ({
|
|
1238
1238
|
mode: e,
|
|
1239
1239
|
noBackground: t,
|
|
1240
1240
|
variant: r
|
|
@@ -1264,13 +1264,13 @@ const Ke = "av-messagebox", Ye = "av-panel", qe = "av-button", we = "icon", Rt =
|
|
|
1264
1264
|
if (r === "selected")
|
|
1265
1265
|
return "bg-action-selected-dark";
|
|
1266
1266
|
}
|
|
1267
|
-
},
|
|
1267
|
+
}, To = ({
|
|
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
|
+
}), Io = ({
|
|
1274
1274
|
mode: e,
|
|
1275
1275
|
disabled: t,
|
|
1276
1276
|
variant: r
|
|
@@ -1300,7 +1300,7 @@ const Ke = "av-messagebox", Ye = "av-panel", qe = "av-button", we = "icon", Rt =
|
|
|
1300
1300
|
});
|
|
1301
1301
|
if (r === "selected")
|
|
1302
1302
|
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
1303
|
-
},
|
|
1303
|
+
}, Eo = ({
|
|
1304
1304
|
mode: e,
|
|
1305
1305
|
disabled: t,
|
|
1306
1306
|
variant: r
|
|
@@ -1330,7 +1330,7 @@ const Ke = "av-messagebox", Ye = "av-panel", qe = "av-button", we = "icon", Rt =
|
|
|
1330
1330
|
});
|
|
1331
1331
|
if (r === "selected")
|
|
1332
1332
|
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
1333
|
-
},
|
|
1333
|
+
}, _o = ({
|
|
1334
1334
|
mode: e,
|
|
1335
1335
|
noBorder: t,
|
|
1336
1336
|
variant: r
|
|
@@ -1360,193 +1360,193 @@ const Ke = "av-messagebox", Ye = "av-panel", qe = "av-button", we = "icon", Rt =
|
|
|
1360
1360
|
});
|
|
1361
1361
|
if (r === "selected")
|
|
1362
1362
|
return "border border-border-selected-dark";
|
|
1363
|
-
},
|
|
1363
|
+
}, So = ({
|
|
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
|
+
}), zt = ({
|
|
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: s,
|
|
1377
|
+
fullWidth: i,
|
|
1378
1378
|
size: c,
|
|
1379
|
-
noBorder:
|
|
1380
|
-
labelRight:
|
|
1381
|
-
labelLeft:
|
|
1379
|
+
noBorder: u,
|
|
1380
|
+
labelRight: d,
|
|
1381
|
+
labelLeft: l,
|
|
1382
1382
|
noBackground: f,
|
|
1383
|
-
variant:
|
|
1384
|
-
noTruncate:
|
|
1383
|
+
variant: b,
|
|
1384
|
+
noTruncate: v,
|
|
1385
1385
|
align: h,
|
|
1386
|
-
radius:
|
|
1387
|
-
}) => (
|
|
1388
|
-
|
|
1389
|
-
|
|
1386
|
+
radius: p
|
|
1387
|
+
}) => (b || (b = "primary"), r ? w(Qe, t) : w(
|
|
1388
|
+
Qe,
|
|
1389
|
+
Co({
|
|
1390
1390
|
mode: a,
|
|
1391
|
-
variant:
|
|
1391
|
+
variant: b,
|
|
1392
1392
|
noBackground: f,
|
|
1393
|
-
noTruncate:
|
|
1393
|
+
noTruncate: v
|
|
1394
1394
|
}),
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1395
|
+
No({ mode: a, noBackground: f, variant: b }),
|
|
1396
|
+
To({ radius: p }),
|
|
1397
|
+
wo({
|
|
1398
1398
|
type: e,
|
|
1399
1399
|
size: c,
|
|
1400
|
-
labelRight:
|
|
1401
|
-
labelLeft:
|
|
1400
|
+
labelRight: d,
|
|
1401
|
+
labelLeft: l,
|
|
1402
1402
|
align: h
|
|
1403
1403
|
}),
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1404
|
+
xo({ type: e, size: c, labelRight: d, labelLeft: l }),
|
|
1405
|
+
_o({ mode: a, variant: b, noBorder: u }),
|
|
1406
|
+
So({ focusMode: n }),
|
|
1407
|
+
Io({ mode: a, variant: b, disabled: s }),
|
|
1408
|
+
Eo({ mode: a, variant: b, disabled: s }),
|
|
1409
1409
|
{
|
|
1410
|
-
"w-full":
|
|
1411
|
-
"disabled:cursor-not-allowed disabled:opacity-50":
|
|
1410
|
+
"w-full": i,
|
|
1411
|
+
"disabled:cursor-not-allowed disabled:opacity-50": s
|
|
1412
1412
|
},
|
|
1413
1413
|
t
|
|
1414
|
-
)),
|
|
1414
|
+
)), Ro = (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
|
+
}, $e = I.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: (s) => {
|
|
1424
|
+
Ro(s, a, r);
|
|
1425
1425
|
},
|
|
1426
1426
|
...n
|
|
1427
1427
|
}
|
|
1428
1428
|
);
|
|
1429
1429
|
});
|
|
1430
|
-
|
|
1431
|
-
const
|
|
1430
|
+
$e.displayName = "BaseButton";
|
|
1431
|
+
const Lt = I.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: s,
|
|
1439
|
+
type: i = "button",
|
|
1440
1440
|
raw: c = !1,
|
|
1441
|
-
noBorder:
|
|
1442
|
-
"aria-label":
|
|
1443
|
-
label:
|
|
1441
|
+
noBorder: u = !1,
|
|
1442
|
+
"aria-label": d,
|
|
1443
|
+
label: l,
|
|
1444
1444
|
size: f = "medium",
|
|
1445
|
-
labelRight:
|
|
1446
|
-
labelLeft:
|
|
1445
|
+
labelRight: b,
|
|
1446
|
+
labelLeft: v,
|
|
1447
1447
|
noBackground: h = !1,
|
|
1448
|
-
align:
|
|
1449
|
-
radius:
|
|
1448
|
+
align: p = "center",
|
|
1449
|
+
radius: k = "large",
|
|
1450
1450
|
variant: x = "primary",
|
|
1451
1451
|
...C
|
|
1452
|
-
},
|
|
1453
|
-
const
|
|
1452
|
+
}, m) => {
|
|
1453
|
+
const N = zt({
|
|
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:
|
|
1461
|
-
noBorder:
|
|
1460
|
+
className: s,
|
|
1461
|
+
noBorder: u,
|
|
1462
1462
|
size: f,
|
|
1463
|
-
labelRight:
|
|
1464
|
-
labelLeft:
|
|
1463
|
+
labelRight: b,
|
|
1464
|
+
labelLeft: v,
|
|
1465
1465
|
noBackground: h,
|
|
1466
|
-
align:
|
|
1467
|
-
radius:
|
|
1466
|
+
align: p,
|
|
1467
|
+
radius: k,
|
|
1468
1468
|
variant: x
|
|
1469
|
-
}),
|
|
1469
|
+
}), E = 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
|
-
return /* @__PURE__ */
|
|
1476
|
-
|
|
1475
|
+
return /* @__PURE__ */ y(
|
|
1476
|
+
$e,
|
|
1477
1477
|
{
|
|
1478
|
-
ref:
|
|
1479
|
-
className:
|
|
1478
|
+
ref: m,
|
|
1479
|
+
className: N,
|
|
1480
1480
|
disabled: t,
|
|
1481
|
-
type:
|
|
1482
|
-
"aria-label":
|
|
1481
|
+
type: i,
|
|
1482
|
+
"aria-label": d || l,
|
|
1483
1483
|
...C,
|
|
1484
1484
|
children: [
|
|
1485
|
-
|
|
1486
|
-
/* @__PURE__ */ o("div", { className:
|
|
1487
|
-
|
|
1485
|
+
v && /* @__PURE__ */ o("span", { className: "pr-2", children: v }),
|
|
1486
|
+
/* @__PURE__ */ o("div", { className: E, children: e }),
|
|
1487
|
+
b && /* @__PURE__ */ o("span", { className: "pl-2", children: b })
|
|
1488
1488
|
]
|
|
1489
1489
|
}
|
|
1490
1490
|
);
|
|
1491
1491
|
}
|
|
1492
1492
|
);
|
|
1493
|
-
|
|
1493
|
+
Lt.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 Mo = I.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: s,
|
|
1515
|
+
type: i = "button",
|
|
1516
1516
|
raw: c = !1,
|
|
1517
|
-
noBorder:
|
|
1518
|
-
"aria-label":
|
|
1519
|
-
label:
|
|
1517
|
+
noBorder: u = !1,
|
|
1518
|
+
"aria-label": d,
|
|
1519
|
+
label: l,
|
|
1520
1520
|
size: f = "medium",
|
|
1521
|
-
labelRight:
|
|
1522
|
-
labelLeft:
|
|
1521
|
+
labelRight: b,
|
|
1522
|
+
labelLeft: v,
|
|
1523
1523
|
noBackground: h = !1,
|
|
1524
|
-
align:
|
|
1525
|
-
active:
|
|
1524
|
+
align: p = "center",
|
|
1525
|
+
active: k = !1,
|
|
1526
1526
|
radius: x = "large",
|
|
1527
1527
|
...C
|
|
1528
|
-
},
|
|
1529
|
-
const
|
|
1528
|
+
}, m) => {
|
|
1529
|
+
const N = zt({
|
|
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:
|
|
1537
|
-
noBorder:
|
|
1536
|
+
className: s,
|
|
1537
|
+
noBorder: u,
|
|
1538
1538
|
size: f,
|
|
1539
|
-
labelRight:
|
|
1540
|
-
labelLeft:
|
|
1539
|
+
labelRight: b,
|
|
1540
|
+
labelLeft: v,
|
|
1541
1541
|
noBackground: h,
|
|
1542
|
-
align:
|
|
1542
|
+
align: p,
|
|
1543
1543
|
radius: x
|
|
1544
|
-
}),
|
|
1544
|
+
}), E = 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
|
+
}), A = k ? w(
|
|
1550
1550
|
"relative",
|
|
1551
1551
|
"focus-within:static",
|
|
1552
1552
|
"focus-within:after:border-transparent",
|
|
@@ -1563,76 +1563,76 @@ const Io = E.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: A, children: /* @__PURE__ */ y(
|
|
1567
|
+
$e,
|
|
1568
1568
|
{
|
|
1569
|
-
ref:
|
|
1570
|
-
className:
|
|
1569
|
+
ref: m,
|
|
1570
|
+
className: N,
|
|
1571
1571
|
disabled: t,
|
|
1572
|
-
type:
|
|
1573
|
-
"aria-label":
|
|
1572
|
+
type: i,
|
|
1573
|
+
"aria-label": d || l,
|
|
1574
1574
|
...C,
|
|
1575
1575
|
children: [
|
|
1576
|
-
|
|
1577
|
-
/* @__PURE__ */ o("div", { className:
|
|
1578
|
-
|
|
1576
|
+
v && /* @__PURE__ */ o("span", { className: "pr-2", children: v }),
|
|
1577
|
+
/* @__PURE__ */ o("div", { className: E, children: e }),
|
|
1578
|
+
b && /* @__PURE__ */ o("span", { className: "pl-2", children: b })
|
|
1579
1579
|
]
|
|
1580
1580
|
}
|
|
1581
1581
|
) });
|
|
1582
1582
|
}
|
|
1583
1583
|
);
|
|
1584
|
-
|
|
1585
|
-
const
|
|
1584
|
+
Mo.displayName = "ButtonSort";
|
|
1585
|
+
const Ao = ({
|
|
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: s,
|
|
1592
|
+
title: i,
|
|
1593
1593
|
semantic: c = !1,
|
|
1594
|
-
...
|
|
1594
|
+
...u
|
|
1595
1595
|
}) => {
|
|
1596
|
-
const
|
|
1597
|
-
return /* @__PURE__ */
|
|
1596
|
+
const d = w(s, a);
|
|
1597
|
+
return /* @__PURE__ */ y(z, { children: [
|
|
1598
1598
|
/* @__PURE__ */ o(
|
|
1599
1599
|
"svg",
|
|
1600
1600
|
{
|
|
1601
1601
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1602
|
-
className:
|
|
1602
|
+
className: d,
|
|
1603
1603
|
viewBox: r || n,
|
|
1604
1604
|
fill: t || "currentColor",
|
|
1605
1605
|
role: "img",
|
|
1606
1606
|
"aria-hidden": !c,
|
|
1607
1607
|
focusable: !1,
|
|
1608
|
-
...
|
|
1608
|
+
...u,
|
|
1609
1609
|
children: e
|
|
1610
1610
|
}
|
|
1611
1611
|
),
|
|
1612
|
-
|
|
1612
|
+
i && c && /* @__PURE__ */ o("span", { className: "sr-only", children: i })
|
|
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 zo = ({
|
|
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
|
+
Ao,
|
|
1636
1636
|
{
|
|
1637
1637
|
defaultViewBox: "0 0 384 512",
|
|
1638
1638
|
size: "size-5",
|
|
@@ -1644,115 +1644,115 @@ const So = ({
|
|
|
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 Bt = g.createContext(null);
|
|
1660
|
+
function Lo({
|
|
1661
1661
|
initialOpen: e = !1,
|
|
1662
1662
|
open: t,
|
|
1663
1663
|
onOpenChange: r
|
|
1664
1664
|
} = {}) {
|
|
1665
|
-
const [a, n] = g.useState(e), [
|
|
1666
|
-
open:
|
|
1667
|
-
onOpenChange:
|
|
1668
|
-
}),
|
|
1665
|
+
const [a, n] = g.useState(e), [s, i] = g.useState(), [c, u] = g.useState(), d = t ?? a, l = r ?? n, f = st({
|
|
1666
|
+
open: d,
|
|
1667
|
+
onOpenChange: l
|
|
1668
|
+
}), b = f.context, v = it(b, {
|
|
1669
1669
|
enabled: t == null
|
|
1670
|
-
}), h =
|
|
1670
|
+
}), h = lt(b, {
|
|
1671
1671
|
outsidePress: !1,
|
|
1672
1672
|
outsidePressEvent: "mousedown"
|
|
1673
|
-
}),
|
|
1673
|
+
}), p = ct(b), k = dt([v, h, p]);
|
|
1674
1674
|
return g.useMemo(
|
|
1675
1675
|
() => ({
|
|
1676
|
-
open:
|
|
1677
|
-
setOpen:
|
|
1678
|
-
...
|
|
1676
|
+
open: d,
|
|
1677
|
+
setOpen: l,
|
|
1678
|
+
...k,
|
|
1679
1679
|
...f,
|
|
1680
|
-
labelId:
|
|
1680
|
+
labelId: s,
|
|
1681
1681
|
descriptionId: c,
|
|
1682
|
-
setLabelId:
|
|
1683
|
-
setDescriptionId:
|
|
1682
|
+
setLabelId: i,
|
|
1683
|
+
setDescriptionId: u
|
|
1684
1684
|
}),
|
|
1685
|
-
[
|
|
1685
|
+
[d, l, k, f, s, c]
|
|
1686
1686
|
);
|
|
1687
1687
|
}
|
|
1688
1688
|
const xe = () => {
|
|
1689
|
-
const e = g.useContext(
|
|
1689
|
+
const e = g.useContext(Bt);
|
|
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 Bo({
|
|
1695
1695
|
children: e,
|
|
1696
1696
|
...t
|
|
1697
1697
|
}) {
|
|
1698
|
-
const r =
|
|
1699
|
-
return /* @__PURE__ */ o(
|
|
1698
|
+
const r = Lo(t);
|
|
1699
|
+
return /* @__PURE__ */ o(Bt.Provider, { value: r, children: e });
|
|
1700
1700
|
}
|
|
1701
|
-
const
|
|
1701
|
+
const Po = g.forwardRef(function(e, t) {
|
|
1702
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: s, ...i } = e, c = w("grid place-items-center", {
|
|
1706
|
+
[`${s}`]: s,
|
|
1707
|
+
"bg-black sm:bg-black/[.8]": !s
|
|
1708
1708
|
});
|
|
1709
|
-
return /* @__PURE__ */ o(
|
|
1709
|
+
return /* @__PURE__ */ o(ut, { children: /* @__PURE__ */ o(kr, { className: c, lockScroll: !0, children: /* @__PURE__ */ o(mt, { 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(i),
|
|
1716
|
+
children: i.children
|
|
1717
1717
|
}
|
|
1718
1718
|
) }) }) });
|
|
1719
|
-
}),
|
|
1719
|
+
}), Oo = g.forwardRef(function({ children: e, ...t }, r) {
|
|
1720
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
|
-
}),
|
|
1722
|
+
}), $o = g.forwardRef(function({ children: e, ...t }, r) {
|
|
1723
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 } = xe(), { trigger: a, className: n, ...
|
|
1725
|
+
}), Vo = g.forwardRef(function(e, t) {
|
|
1726
|
+
const { setOpen: r } = xe(), { trigger: a, className: n, ...s } = e, i = 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: i,
|
|
1730
|
+
...s
|
|
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", ue = "messagebox",
|
|
1746
|
+
const se = "panel", ue = "messagebox", Do = ({
|
|
1747
1747
|
className: e,
|
|
1748
1748
|
kind: t,
|
|
1749
1749
|
borderMode: r
|
|
1750
1750
|
}) => ({
|
|
1751
1751
|
main: w("prose prose-lighter flex flex-col bg-surface-medium", {
|
|
1752
|
-
[`${
|
|
1753
|
-
[`${
|
|
1754
|
-
[`${
|
|
1755
|
-
[`${
|
|
1752
|
+
[`${Ze} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === se,
|
|
1753
|
+
[`${Ze} w-full sm:w-[95%] md:max-w-2xl`]: t === se && !e,
|
|
1754
|
+
[`${qe} rounded-lg border-2`]: t === ue,
|
|
1755
|
+
[`${qe} 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,
|
|
@@ -1769,70 +1769,70 @@ const se = "panel", ue = "messagebox", Bo = ({
|
|
|
1769
1769
|
title: r,
|
|
1770
1770
|
children: a,
|
|
1771
1771
|
footer: n,
|
|
1772
|
-
borderMode:
|
|
1773
|
-
kind:
|
|
1772
|
+
borderMode: s = "light",
|
|
1773
|
+
kind: i = se,
|
|
1774
1774
|
className: c
|
|
1775
1775
|
}) => {
|
|
1776
|
-
const
|
|
1777
|
-
return
|
|
1778
|
-
e && (document.title =
|
|
1779
|
-
}), [r, e]), /* @__PURE__ */ o(
|
|
1780
|
-
/* @__PURE__ */
|
|
1776
|
+
const u = Z(""), d = Do({ className: c, kind: i, borderMode: s });
|
|
1777
|
+
return F(() => (e && (u.current = document.title, document.title = `${r} | ${u.current}`), () => {
|
|
1778
|
+
e && (document.title = u.current);
|
|
1779
|
+
}), [r, e]), /* @__PURE__ */ o(z, { children: e && /* @__PURE__ */ o(Bo, { open: e, onOpenChange: t, children: /* @__PURE__ */ y(Po, { className: d.main, children: [
|
|
1780
|
+
/* @__PURE__ */ y("div", { className: "flex flex-row-reverse items-center justify-between", children: [
|
|
1781
1781
|
/* @__PURE__ */ o(
|
|
1782
|
-
|
|
1782
|
+
Vo,
|
|
1783
1783
|
{
|
|
1784
|
-
className:
|
|
1784
|
+
className: d.close,
|
|
1785
1785
|
trigger: /* @__PURE__ */ o(
|
|
1786
|
-
|
|
1786
|
+
Lt,
|
|
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(zo, {})
|
|
1793
1793
|
}
|
|
1794
1794
|
)
|
|
1795
1795
|
}
|
|
1796
1796
|
),
|
|
1797
|
-
/* @__PURE__ */ o(
|
|
1797
|
+
/* @__PURE__ */ o(Oo, { className: d.header, children: r })
|
|
1798
1798
|
] }),
|
|
1799
|
-
/* @__PURE__ */ o(
|
|
1800
|
-
n && /* @__PURE__ */ o("div", { className:
|
|
1799
|
+
/* @__PURE__ */ o($o, { className: d.content, children: a }),
|
|
1800
|
+
n && /* @__PURE__ */ o("div", { className: d.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 = fe(),
|
|
1804
|
-
return /* @__PURE__ */
|
|
1802
|
+
}, Fo = ({ 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(), s = fe();
|
|
1804
|
+
return /* @__PURE__ */ y(z, { children: [
|
|
1805
1805
|
/* @__PURE__ */ o("div", { className: "mb-4", children: /* @__PURE__ */ o(
|
|
1806
|
-
|
|
1806
|
+
O,
|
|
1807
1807
|
{
|
|
1808
|
-
header:
|
|
1808
|
+
header: S.ABOUT.TITLE_CLIENT,
|
|
1809
1809
|
className: "prose-dark dark:prose-lighter",
|
|
1810
1810
|
children: he(n, {
|
|
1811
|
-
[
|
|
1812
|
-
[
|
|
1811
|
+
[S.ABOUT.VERSION]: "5.19.0",
|
|
1812
|
+
[S.ABOUT.BUILD_TIMESTAMP]: "01/03/2025 07:36 PM EST"
|
|
1813
1813
|
})
|
|
1814
1814
|
}
|
|
1815
1815
|
) }),
|
|
1816
1816
|
/* @__PURE__ */ o(
|
|
1817
|
-
|
|
1817
|
+
O,
|
|
1818
1818
|
{
|
|
1819
|
-
header:
|
|
1819
|
+
header: S.ABOUT.TITLE_SERVER,
|
|
1820
1820
|
className: "prose-dark dark:prose-lighter",
|
|
1821
|
-
children: he(
|
|
1822
|
-
[
|
|
1823
|
-
[ge(
|
|
1824
|
-
[ge(
|
|
1821
|
+
children: he(s, {
|
|
1822
|
+
[S.ABOUT.VERSION]: r,
|
|
1823
|
+
[ge(S.ABOUT.ENGINE, a.length)]: /* @__PURE__ */ o(z, { children: a.map((i) => /* @__PURE__ */ o("div", { className: "text-right", children: i }, i)) }),
|
|
1824
|
+
[ge(S.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */ o(z, { children: t.map((i) => /* @__PURE__ */ o("div", { className: "text-right", children: i }, i)) })
|
|
1825
1825
|
})
|
|
1826
1826
|
}
|
|
1827
1827
|
)
|
|
1828
1828
|
] });
|
|
1829
|
-
},
|
|
1829
|
+
}, Ho = ({
|
|
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 } = D(ve);
|
|
1834
|
+
return /* @__PURE__ */ o(te, { open: e, onOpenChange: t, title: Vt, children: /* @__PURE__ */ o(Fo, { stats: r }) });
|
|
1835
|
+
}, Pt = ({
|
|
1836
1836
|
showConfirmation: e,
|
|
1837
1837
|
setShowConfirmation: t,
|
|
1838
1838
|
action: r,
|
|
@@ -1845,7 +1845,7 @@ const se = "panel", ue = "messagebox", Bo = ({
|
|
|
1845
1845
|
open: e,
|
|
1846
1846
|
onOpenChange: t,
|
|
1847
1847
|
title: n.title,
|
|
1848
|
-
footer: /* @__PURE__ */
|
|
1848
|
+
footer: /* @__PURE__ */ y(q, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
|
1849
1849
|
/* @__PURE__ */ o(M, { children: /* @__PURE__ */ o(
|
|
1850
1850
|
H,
|
|
1851
1851
|
{
|
|
@@ -1873,19 +1873,19 @@ const se = "panel", ue = "messagebox", Bo = ({
|
|
|
1873
1873
|
] }),
|
|
1874
1874
|
children: a
|
|
1875
1875
|
}
|
|
1876
|
-
),
|
|
1876
|
+
), Go = async (e, t, r, a) => {
|
|
1877
1877
|
try {
|
|
1878
1878
|
const n = await $({
|
|
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: Je
|
|
1887
1887
|
}), t({
|
|
1888
|
-
type:
|
|
1888
|
+
type: Ft,
|
|
1889
1889
|
payload: {
|
|
1890
1890
|
id: e.id,
|
|
1891
1891
|
model: n.data.model,
|
|
@@ -1895,67 +1895,77 @@ const se = "panel", ue = "messagebox", Bo = ({
|
|
|
1895
1895
|
}), r(!1));
|
|
1896
1896
|
} catch {
|
|
1897
1897
|
}
|
|
1898
|
-
},
|
|
1898
|
+
}, Uo = ({
|
|
1899
1899
|
filteredHistory: e,
|
|
1900
1900
|
setFilteredHistory: t,
|
|
1901
1901
|
dispatch: r,
|
|
1902
1902
|
onOpenChange: a
|
|
1903
1903
|
}) => {
|
|
1904
|
-
var
|
|
1905
|
-
const { user: n, getAccessToken:
|
|
1904
|
+
var C;
|
|
1905
|
+
const { user: n, getAccessToken: s } = Q(), i = Z(null), c = Z({
|
|
1906
1906
|
id: 0,
|
|
1907
1907
|
timestamp: "",
|
|
1908
1908
|
message: ""
|
|
1909
|
-
}), [
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1909
|
+
}), [u, d] = R(!1), [l, f] = R(
|
|
1910
|
+
De + Fe
|
|
1911
|
+
), { state: b, dispatch: v } = D(rt), [, h] = le({
|
|
1912
|
+
key: ce + Dt,
|
|
1913
|
+
initialValue: b.sortDirection
|
|
1914
|
+
}), p = (m) => {
|
|
1915
|
+
switch (b.sortDirection) {
|
|
1916
|
+
case K.ASC:
|
|
1917
|
+
h(K.DESC), v({
|
|
1918
|
+
type: He,
|
|
1917
1919
|
payload: {
|
|
1918
|
-
sortedCell:
|
|
1919
|
-
sortDirection:
|
|
1920
|
+
sortedCell: m,
|
|
1921
|
+
sortDirection: K.DESC
|
|
1920
1922
|
}
|
|
1921
1923
|
});
|
|
1922
1924
|
break;
|
|
1923
1925
|
default:
|
|
1924
|
-
|
|
1925
|
-
type:
|
|
1926
|
+
h(K.ASC), v({
|
|
1927
|
+
type: He,
|
|
1926
1928
|
payload: {
|
|
1927
|
-
sortedCell:
|
|
1928
|
-
sortDirection:
|
|
1929
|
+
sortedCell: m,
|
|
1930
|
+
sortDirection: K.ASC
|
|
1929
1931
|
}
|
|
1930
1932
|
});
|
|
1931
1933
|
break;
|
|
1932
1934
|
}
|
|
1933
|
-
}
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1935
|
+
}, k = async () => {
|
|
1936
|
+
const m = c.current;
|
|
1937
|
+
try {
|
|
1938
|
+
const N = await $({
|
|
1939
|
+
accessToken: await s(),
|
|
1940
|
+
type: V.DELETE_CHAT,
|
|
1941
|
+
params: {
|
|
1942
|
+
userId: (n == null ? void 0 : n.username) || "",
|
|
1943
|
+
id: m.id,
|
|
1944
|
+
limit: 1,
|
|
1945
|
+
searchString: b.searchString,
|
|
1946
|
+
direction: b.sortDirection,
|
|
1947
|
+
truncateSize: 100
|
|
1948
|
+
}
|
|
1949
|
+
});
|
|
1950
|
+
N.status === 200 && t({ data: N.data });
|
|
1951
|
+
} catch {
|
|
1952
|
+
}
|
|
1953
|
+
}, x = cr((m) => {
|
|
1954
|
+
m[0].isIntersecting && f((E) => E + De);
|
|
1955
|
+
}, []);
|
|
1956
|
+
return F(() => {
|
|
1957
|
+
const m = {
|
|
1958
|
+
// root: null,
|
|
1959
|
+
rootMargin: "20px"
|
|
1960
|
+
}, N = new IntersectionObserver(x, m);
|
|
1961
|
+
i.current && N.observe(i.current);
|
|
1962
|
+
}), /* @__PURE__ */ y(z, { children: [
|
|
1963
|
+
/* @__PURE__ */ y(
|
|
1964
|
+
Pt,
|
|
1937
1965
|
{
|
|
1938
|
-
showConfirmation:
|
|
1939
|
-
setShowConfirmation:
|
|
1940
|
-
action:
|
|
1941
|
-
const d = s.current;
|
|
1942
|
-
try {
|
|
1943
|
-
const v = await $({
|
|
1944
|
-
accessToken: await i(),
|
|
1945
|
-
type: O.DELETE_CHAT,
|
|
1946
|
-
params: {
|
|
1947
|
-
userId: (n == null ? void 0 : n.username) || "",
|
|
1948
|
-
id: d.id,
|
|
1949
|
-
limit: 1,
|
|
1950
|
-
searchString: l.searchString,
|
|
1951
|
-
direction: l.sortDirection,
|
|
1952
|
-
truncateSize: 100
|
|
1953
|
-
}
|
|
1954
|
-
});
|
|
1955
|
-
v.status === 200 && t({ data: v.data });
|
|
1956
|
-
} catch {
|
|
1957
|
-
}
|
|
1958
|
-
},
|
|
1966
|
+
showConfirmation: u,
|
|
1967
|
+
setShowConfirmation: d,
|
|
1968
|
+
action: k,
|
|
1959
1969
|
customStrings: {
|
|
1960
1970
|
confirmAction: "Delete",
|
|
1961
1971
|
cancelAction: "Cancel",
|
|
@@ -1963,114 +1973,129 @@ const se = "panel", ue = "messagebox", Bo = ({
|
|
|
1963
1973
|
},
|
|
1964
1974
|
children: [
|
|
1965
1975
|
/* @__PURE__ */ o("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
|
|
1966
|
-
/* @__PURE__ */
|
|
1967
|
-
/* @__PURE__ */
|
|
1976
|
+
/* @__PURE__ */ y("ul", { className: "m-0", children: [
|
|
1977
|
+
/* @__PURE__ */ y("li", { children: [
|
|
1968
1978
|
"Timestamp:",
|
|
1969
1979
|
" ",
|
|
1970
|
-
/* @__PURE__ */ o("span", { className: "text-lg", children:
|
|
1980
|
+
/* @__PURE__ */ o("span", { className: "text-lg", children: c.current && c.current.timestamp })
|
|
1971
1981
|
] }),
|
|
1972
|
-
/* @__PURE__ */
|
|
1982
|
+
/* @__PURE__ */ y("li", { children: [
|
|
1973
1983
|
"First message:",
|
|
1974
1984
|
" ",
|
|
1975
|
-
/* @__PURE__ */ o("span", { className: "text-lg", children: (
|
|
1985
|
+
/* @__PURE__ */ o("span", { className: "text-lg", children: (C = c.current) == null ? void 0 : C.message })
|
|
1976
1986
|
] })
|
|
1977
1987
|
] })
|
|
1978
1988
|
]
|
|
1979
1989
|
}
|
|
1980
1990
|
),
|
|
1981
|
-
/* @__PURE__ */
|
|
1982
|
-
|
|
1991
|
+
/* @__PURE__ */ y(
|
|
1992
|
+
tr,
|
|
1983
1993
|
{
|
|
1984
1994
|
stickyHeader: !0,
|
|
1985
1995
|
stickyFooter: !0,
|
|
1986
1996
|
compact: !0,
|
|
1987
1997
|
wrapperClassName: "max-h-[60vh] min-h-[60vh]",
|
|
1988
1998
|
children: [
|
|
1989
|
-
/* @__PURE__ */ o(
|
|
1999
|
+
/* @__PURE__ */ o(rr, { children: /* @__PURE__ */ y(Ne, { children: [
|
|
2000
|
+
/* @__PURE__ */ o(B, { className: "sr-only", children: "Row" }),
|
|
1990
2001
|
/* @__PURE__ */ o(
|
|
1991
|
-
|
|
2002
|
+
or,
|
|
1992
2003
|
{
|
|
1993
2004
|
buttonClassName: "text-xs sm:text-sm",
|
|
1994
2005
|
cellId: "timestamp",
|
|
1995
2006
|
align: "left",
|
|
1996
|
-
sortDirection:
|
|
1997
|
-
sortedCell:
|
|
2007
|
+
sortDirection: b.sortDirection,
|
|
2008
|
+
sortedCell: b.sortedCell,
|
|
1998
2009
|
onClick: () => {
|
|
1999
2010
|
p("timestamp");
|
|
2000
2011
|
},
|
|
2001
2012
|
children: "Date"
|
|
2002
2013
|
}
|
|
2003
2014
|
),
|
|
2004
|
-
/* @__PURE__ */ o(
|
|
2005
|
-
/* @__PURE__ */ o(
|
|
2006
|
-
/* @__PURE__ */ o(
|
|
2015
|
+
/* @__PURE__ */ o(B, { className: "text-xs sm:text-sm", children: "First message" }),
|
|
2016
|
+
/* @__PURE__ */ o(B, { className: "text-xs sm:text-sm", children: "Model" }),
|
|
2017
|
+
/* @__PURE__ */ o(B, { className: "text-xs sm:text-sm text-right", children: "Actions" })
|
|
2007
2018
|
] }) }),
|
|
2008
|
-
/* @__PURE__ */ o(
|
|
2009
|
-
var
|
|
2010
|
-
return ((
|
|
2011
|
-
/* @__PURE__ */ o(
|
|
2012
|
-
|
|
2013
|
-
{
|
|
2014
|
-
component: "th",
|
|
2015
|
-
scope: "row",
|
|
2016
|
-
className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
|
|
2017
|
-
children: d.timestamp
|
|
2018
|
-
}
|
|
2019
|
-
),
|
|
2020
|
-
/* @__PURE__ */ o(
|
|
2021
|
-
D,
|
|
2022
|
-
{
|
|
2023
|
-
className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
|
|
2024
|
-
style: {
|
|
2025
|
-
wordBreak: "break-word"
|
|
2026
|
-
},
|
|
2027
|
-
children: d.messages.length > 0 ? (C = d.messages[0]) == null ? void 0 : C.content : ""
|
|
2028
|
-
}
|
|
2029
|
-
),
|
|
2030
|
-
/* @__PURE__ */ o(D, { component: "th", scope: "row", className: "text-gray-400", children: /* @__PURE__ */ k(F, { alignHorizontal: "center", children: [
|
|
2031
|
-
d.model && d.model.startsWith("claude") && /* @__PURE__ */ o(ut, { size: "size-4 sm:size-5" }),
|
|
2032
|
-
d.model && d.model.startsWith("gpt") && /* @__PURE__ */ o(mt, { size: "size-4 sm:size-5" })
|
|
2033
|
-
] }) }),
|
|
2034
|
-
/* @__PURE__ */ o(D, { className: "px-2", children: /* @__PURE__ */ k("div", { className: "flex justify-end gap-2", children: [
|
|
2019
|
+
/* @__PURE__ */ o(ar, { children: e.data.slice(0, l).map((m, N) => {
|
|
2020
|
+
var E, A;
|
|
2021
|
+
return ((E = m == null ? void 0 : m.messages) == null ? void 0 : E.length) > 0 ? /* @__PURE__ */ y(lr, { children: [
|
|
2022
|
+
N === l - Fe && /* @__PURE__ */ o("tr", { ref: i }),
|
|
2023
|
+
/* @__PURE__ */ y(Ne, { children: [
|
|
2024
|
+
/* @__PURE__ */ o(B, { children: N + 1 }),
|
|
2035
2025
|
/* @__PURE__ */ o(
|
|
2036
|
-
|
|
2026
|
+
B,
|
|
2037
2027
|
{
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
const y = await i();
|
|
2043
|
-
Vo(
|
|
2044
|
-
d,
|
|
2045
|
-
r,
|
|
2046
|
-
a,
|
|
2047
|
-
y
|
|
2048
|
-
);
|
|
2049
|
-
},
|
|
2050
|
-
children: /* @__PURE__ */ o(Cr, { size: "size-3", monotone: !0 })
|
|
2028
|
+
component: "th",
|
|
2029
|
+
scope: "row",
|
|
2030
|
+
className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
|
|
2031
|
+
children: m.timestamp
|
|
2051
2032
|
}
|
|
2052
2033
|
),
|
|
2053
2034
|
/* @__PURE__ */ o(
|
|
2054
|
-
|
|
2035
|
+
B,
|
|
2055
2036
|
{
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
onClick: () => {
|
|
2060
|
-
var y;
|
|
2061
|
-
s.current = {
|
|
2062
|
-
id: d.id,
|
|
2063
|
-
timestamp: d.timestamp,
|
|
2064
|
-
message: d.messages.length > 0 ? (y = d.messages[0]) == null ? void 0 : y.content : ""
|
|
2065
|
-
}, m(!c);
|
|
2037
|
+
className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
|
|
2038
|
+
style: {
|
|
2039
|
+
wordBreak: "break-word"
|
|
2066
2040
|
},
|
|
2067
|
-
children:
|
|
2041
|
+
children: m.messages.length > 0 ? (A = m.messages[0]) == null ? void 0 : A.content : ""
|
|
2068
2042
|
}
|
|
2069
|
-
)
|
|
2070
|
-
|
|
2071
|
-
|
|
2043
|
+
),
|
|
2044
|
+
/* @__PURE__ */ y(
|
|
2045
|
+
B,
|
|
2046
|
+
{
|
|
2047
|
+
component: "th",
|
|
2048
|
+
scope: "row",
|
|
2049
|
+
className: "text-gray-400",
|
|
2050
|
+
align: "center",
|
|
2051
|
+
children: [
|
|
2052
|
+
m.model && m.model.startsWith("claude") && /* @__PURE__ */ o(ht, { size: "size-4 sm:size-5" }),
|
|
2053
|
+
m.model && m.model.startsWith("gpt") && /* @__PURE__ */ o(gt, { size: "size-4 sm:size-5" })
|
|
2054
|
+
]
|
|
2055
|
+
}
|
|
2056
|
+
),
|
|
2057
|
+
/* @__PURE__ */ y(B, { align: "right", children: [
|
|
2058
|
+
/* @__PURE__ */ o(
|
|
2059
|
+
J,
|
|
2060
|
+
{
|
|
2061
|
+
className: "mr-2",
|
|
2062
|
+
focusMode: "alt-system",
|
|
2063
|
+
noBorder: !0,
|
|
2064
|
+
label: "Restore chat",
|
|
2065
|
+
onClick: async () => {
|
|
2066
|
+
const _ = await s();
|
|
2067
|
+
Go(
|
|
2068
|
+
m,
|
|
2069
|
+
r,
|
|
2070
|
+
a,
|
|
2071
|
+
_
|
|
2072
|
+
);
|
|
2073
|
+
},
|
|
2074
|
+
children: /* @__PURE__ */ o(Er, { size: "size-3", monotone: !0 })
|
|
2075
|
+
}
|
|
2076
|
+
),
|
|
2077
|
+
/* @__PURE__ */ o(
|
|
2078
|
+
J,
|
|
2079
|
+
{
|
|
2080
|
+
focusMode: "alt-system",
|
|
2081
|
+
noBorder: !0,
|
|
2082
|
+
label: "Delete chat",
|
|
2083
|
+
onClick: () => {
|
|
2084
|
+
var _;
|
|
2085
|
+
c.current = {
|
|
2086
|
+
id: m.id,
|
|
2087
|
+
timestamp: m.timestamp,
|
|
2088
|
+
message: m.messages.length > 0 ? (_ = m.messages[0]) == null ? void 0 : _.content : ""
|
|
2089
|
+
}, d(!u);
|
|
2090
|
+
},
|
|
2091
|
+
children: /* @__PURE__ */ o("div", { className: "text-red-400", children: /* @__PURE__ */ o(xr, { size: "size-3", monotone: !0 }) })
|
|
2092
|
+
}
|
|
2093
|
+
)
|
|
2094
|
+
] })
|
|
2095
|
+
] })
|
|
2096
|
+
] }, `${S.HISTORY.TITLE}-${m.id}-${N}`) : null;
|
|
2072
2097
|
}) }),
|
|
2073
|
-
/* @__PURE__ */ o(
|
|
2098
|
+
/* @__PURE__ */ o(nr, { children: /* @__PURE__ */ o(Ne, { children: /* @__PURE__ */ o(B, { colSpan: 1e3, children: /* @__PURE__ */ o("div", { children: ge(
|
|
2074
2099
|
`${e.data.length} chat`,
|
|
2075
2100
|
e.data.length
|
|
2076
2101
|
) }) }) }) })
|
|
@@ -2078,18 +2103,18 @@ const se = "panel", ue = "messagebox", Bo = ({
|
|
|
2078
2103
|
}
|
|
2079
2104
|
)
|
|
2080
2105
|
] });
|
|
2081
|
-
},
|
|
2106
|
+
}, Xe = async ({
|
|
2082
2107
|
searchString: e,
|
|
2083
2108
|
username: t,
|
|
2084
2109
|
accessToken: r,
|
|
2085
|
-
direction: a =
|
|
2110
|
+
direction: a = K.ASC
|
|
2086
2111
|
}) => {
|
|
2087
2112
|
if (!t)
|
|
2088
2113
|
return [];
|
|
2089
2114
|
try {
|
|
2090
2115
|
const n = await $({
|
|
2091
2116
|
accessToken: r,
|
|
2092
|
-
type:
|
|
2117
|
+
type: V.GET_CHATS,
|
|
2093
2118
|
params: {
|
|
2094
2119
|
userId: t,
|
|
2095
2120
|
searchString: e,
|
|
@@ -2104,63 +2129,63 @@ const se = "panel", ue = "messagebox", Bo = ({
|
|
|
2104
2129
|
return [];
|
|
2105
2130
|
}
|
|
2106
2131
|
return [];
|
|
2107
|
-
},
|
|
2108
|
-
const { isAuthenticated: t, getAccessToken: r, user: a } =
|
|
2109
|
-
key: ce +
|
|
2132
|
+
}, jo = ({ onOpenChange: e }) => {
|
|
2133
|
+
const { isAuthenticated: t, getAccessToken: r, user: a } = Q(), n = Z(null), s = Z(!1), { dispatch: i } = D(ve), { state: c, dispatch: u } = D(rt), [, d] = le({
|
|
2134
|
+
key: ce + Ht,
|
|
2110
2135
|
initialValue: c.searchString
|
|
2111
|
-
}), [
|
|
2136
|
+
}), [l, f] = R({
|
|
2112
2137
|
data: [],
|
|
2113
2138
|
sortedDirection: c.sortDirection
|
|
2114
|
-
}),
|
|
2115
|
-
const
|
|
2116
|
-
searchString:
|
|
2139
|
+
}), b = async (p) => {
|
|
2140
|
+
const k = await r(), x = await Xe({
|
|
2141
|
+
searchString: p,
|
|
2117
2142
|
username: a == null ? void 0 : a.username,
|
|
2118
|
-
accessToken:
|
|
2143
|
+
accessToken: k,
|
|
2119
2144
|
direction: c.sortDirection
|
|
2120
2145
|
});
|
|
2121
2146
|
f({
|
|
2122
2147
|
data: x,
|
|
2123
2148
|
sortedDirection: c.sortDirection
|
|
2124
|
-
}),
|
|
2125
|
-
type:
|
|
2126
|
-
payload: { searchString:
|
|
2149
|
+
}), d(p), u({
|
|
2150
|
+
type: Gt,
|
|
2151
|
+
payload: { searchString: p }
|
|
2127
2152
|
});
|
|
2128
|
-
},
|
|
2129
|
-
p
|
|
2130
|
-
}, 500), h = async (
|
|
2131
|
-
|
|
2153
|
+
}, v = Ut((p) => {
|
|
2154
|
+
b(p.target.value);
|
|
2155
|
+
}, 500), h = async (p) => {
|
|
2156
|
+
p.preventDefault();
|
|
2132
2157
|
};
|
|
2133
|
-
return
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
const
|
|
2158
|
+
return F(() => {
|
|
2159
|
+
s.current || (async () => {
|
|
2160
|
+
s.current = !0;
|
|
2161
|
+
const p = await r(), k = await Xe({
|
|
2137
2162
|
searchString: c.searchString,
|
|
2138
2163
|
username: a == null ? void 0 : a.username,
|
|
2139
|
-
accessToken:
|
|
2164
|
+
accessToken: p,
|
|
2140
2165
|
direction: c.sortDirection
|
|
2141
2166
|
});
|
|
2142
2167
|
f({
|
|
2143
|
-
data:
|
|
2168
|
+
data: k,
|
|
2144
2169
|
sortedDirection: c.sortDirection
|
|
2145
2170
|
});
|
|
2146
2171
|
})();
|
|
2147
|
-
}),
|
|
2148
|
-
if (c.sortDirection !==
|
|
2149
|
-
const
|
|
2172
|
+
}), F(() => {
|
|
2173
|
+
if (c.sortDirection !== l.sortedDirection) {
|
|
2174
|
+
const p = [...l.data].sort((k, x) => {
|
|
2150
2175
|
if (c.sortedCell === "timestamp") {
|
|
2151
|
-
const C = new Date(
|
|
2152
|
-
return c.sortDirection ===
|
|
2176
|
+
const C = new Date(k[c.sortedCell]).getTime(), m = new Date(x[c.sortedCell]).getTime();
|
|
2177
|
+
return c.sortDirection === K.ASC ? C - m : m - C;
|
|
2153
2178
|
}
|
|
2154
2179
|
return 0;
|
|
2155
2180
|
});
|
|
2156
2181
|
f({
|
|
2157
|
-
data:
|
|
2182
|
+
data: p,
|
|
2158
2183
|
sortedDirection: c.sortDirection
|
|
2159
2184
|
});
|
|
2160
2185
|
}
|
|
2161
|
-
}, [
|
|
2186
|
+
}, [l, c]), t ? l && l.data && /* @__PURE__ */ y(z, { children: [
|
|
2162
2187
|
/* @__PURE__ */ o("form", { autoComplete: "off", onSubmit: h, children: /* @__PURE__ */ o(
|
|
2163
|
-
|
|
2188
|
+
Ie,
|
|
2164
2189
|
{
|
|
2165
2190
|
autoCapitalize: "off",
|
|
2166
2191
|
autoComplete: "off",
|
|
@@ -2171,7 +2196,7 @@ const se = "panel", ue = "messagebox", Bo = ({
|
|
|
2171
2196
|
mode: "dark",
|
|
2172
2197
|
name: "Search",
|
|
2173
2198
|
label: "Search",
|
|
2174
|
-
onChange:
|
|
2199
|
+
onChange: v,
|
|
2175
2200
|
className: "mt-2 mb-2",
|
|
2176
2201
|
...c.searchString && {
|
|
2177
2202
|
rightElement: /* @__PURE__ */ o(
|
|
@@ -2184,8 +2209,8 @@ const se = "panel", ue = "messagebox", Bo = ({
|
|
|
2184
2209
|
noBorder: !0,
|
|
2185
2210
|
size: "small",
|
|
2186
2211
|
onClick: () => {
|
|
2187
|
-
var
|
|
2188
|
-
|
|
2212
|
+
var p;
|
|
2213
|
+
b(""), (p = n.current) != null && p.value && (n.current.value = "", n.current.focus());
|
|
2189
2214
|
},
|
|
2190
2215
|
children: "Reset"
|
|
2191
2216
|
}
|
|
@@ -2194,107 +2219,107 @@ const se = "panel", ue = "messagebox", Bo = ({
|
|
|
2194
2219
|
}
|
|
2195
2220
|
) }),
|
|
2196
2221
|
/* @__PURE__ */ o("div", { className: "flex flex-col gap-2 sm:flex-row", children: /* @__PURE__ */ o(
|
|
2197
|
-
|
|
2222
|
+
Uo,
|
|
2198
2223
|
{
|
|
2199
|
-
filteredHistory:
|
|
2224
|
+
filteredHistory: l,
|
|
2200
2225
|
setFilteredHistory: f,
|
|
2201
|
-
dispatch:
|
|
2226
|
+
dispatch: i,
|
|
2202
2227
|
onOpenChange: e
|
|
2203
2228
|
}
|
|
2204
2229
|
) })
|
|
2205
2230
|
] }) : null;
|
|
2206
|
-
},
|
|
2231
|
+
}, Wo = ({
|
|
2207
2232
|
open: e,
|
|
2208
2233
|
onOpenChange: t
|
|
2209
|
-
}) => /* @__PURE__ */ o(te, { open: e, onOpenChange: t, title:
|
|
2210
|
-
const { isAuthenticated: t, user: r, registeringForPasskey: a, authenticationType: n } =
|
|
2211
|
-
return t && c ? /* @__PURE__ */
|
|
2234
|
+
}) => /* @__PURE__ */ o(te, { open: e, onOpenChange: t, title: jt, children: /* @__PURE__ */ o(jo, { onOpenChange: t }) }), Ko = ({ stats: e }) => {
|
|
2235
|
+
const { isAuthenticated: t, user: r, registeringForPasskey: a, authenticationType: n } = Q(), s = fe(), i = fe(), c = (r == null ? void 0 : r.username) || "";
|
|
2236
|
+
return t && c ? /* @__PURE__ */ y(z, { children: [
|
|
2212
2237
|
/* @__PURE__ */ o(
|
|
2213
|
-
|
|
2238
|
+
O,
|
|
2214
2239
|
{
|
|
2215
|
-
header:
|
|
2240
|
+
header: S.PREFERENCES.TITLE,
|
|
2216
2241
|
className: "prose-dark dark:prose-lighter",
|
|
2217
|
-
children: he(
|
|
2218
|
-
[
|
|
2219
|
-
[
|
|
2242
|
+
children: he(s, {
|
|
2243
|
+
[S.PREFERENCES.NAME]: c,
|
|
2244
|
+
[S.PREFERENCES.EMAIL]: (r == null ? void 0 : r.email) || ""
|
|
2220
2245
|
})
|
|
2221
2246
|
}
|
|
2222
2247
|
),
|
|
2223
|
-
n !==
|
|
2224
|
-
|
|
2248
|
+
n !== Wt.PASSKEY && /* @__PURE__ */ y(
|
|
2249
|
+
O,
|
|
2225
2250
|
{
|
|
2226
2251
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
2227
|
-
header: /* @__PURE__ */ o("h2", { className: "m-0", children: /* @__PURE__ */
|
|
2228
|
-
/* @__PURE__ */ o(M, { children: /* @__PURE__ */ o(
|
|
2229
|
-
/* @__PURE__ */ o(M, { children: /* @__PURE__ */ o("div", { children:
|
|
2252
|
+
header: /* @__PURE__ */ o("h2", { className: "m-0", children: /* @__PURE__ */ y(q, { columnGap: 3, alignVertical: "center", children: [
|
|
2253
|
+
/* @__PURE__ */ o(M, { children: /* @__PURE__ */ o(Ge, { size: "size-8" }) }),
|
|
2254
|
+
/* @__PURE__ */ o(M, { children: /* @__PURE__ */ o("div", { children: S.PREFERENCES.PASSKEY_TITLE }) })
|
|
2230
2255
|
] }) }),
|
|
2231
2256
|
children: [
|
|
2232
|
-
/* @__PURE__ */ o("p", { children:
|
|
2257
|
+
/* @__PURE__ */ o("p", { children: S.PREFERENCES.PASSKEY_INSTRUCTIONS }),
|
|
2233
2258
|
/* @__PURE__ */ o(
|
|
2234
|
-
|
|
2259
|
+
J,
|
|
2235
2260
|
{
|
|
2236
2261
|
size: "small",
|
|
2237
2262
|
className: "mt-2",
|
|
2238
2263
|
onClick: a,
|
|
2239
|
-
labelLeft:
|
|
2240
|
-
children: /* @__PURE__ */ o(
|
|
2264
|
+
labelLeft: S.PREFERENCES.PASSKEY_BUTTON,
|
|
2265
|
+
children: /* @__PURE__ */ o(Ge, { size: "size-5", monotone: !0 })
|
|
2241
2266
|
}
|
|
2242
2267
|
)
|
|
2243
2268
|
]
|
|
2244
2269
|
}
|
|
2245
2270
|
),
|
|
2246
2271
|
/* @__PURE__ */ o(
|
|
2247
|
-
|
|
2272
|
+
O,
|
|
2248
2273
|
{
|
|
2249
|
-
header:
|
|
2274
|
+
header: S.MAIN_STATISTICS.TITLE,
|
|
2250
2275
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
2251
|
-
children: he(
|
|
2252
|
-
[ge(
|
|
2253
|
-
[
|
|
2276
|
+
children: he(i, {
|
|
2277
|
+
[ge(S.MAIN_STATISTICS.TOTAL, e.totalChats)]: e.totalChats,
|
|
2278
|
+
[S.MAIN_STATISTICS.PROCESSING_TIME]: Kt(
|
|
2254
2279
|
e.averageProcessingTimes
|
|
2255
2280
|
)
|
|
2256
2281
|
})
|
|
2257
2282
|
}
|
|
2258
2283
|
)
|
|
2259
2284
|
] }) : null;
|
|
2260
|
-
},
|
|
2285
|
+
}, Yo = ({
|
|
2261
2286
|
open: e,
|
|
2262
2287
|
onOpenChange: t
|
|
2263
2288
|
}) => {
|
|
2264
|
-
const [r, a] =
|
|
2289
|
+
const [r, a] = R({
|
|
2265
2290
|
averageProcessingTimes: 0,
|
|
2266
2291
|
totalChats: 0
|
|
2267
|
-
}), { getAccessToken: n, user:
|
|
2268
|
-
return
|
|
2269
|
-
!e || !
|
|
2292
|
+
}), { getAccessToken: n, user: s } = Q();
|
|
2293
|
+
return F(() => {
|
|
2294
|
+
!e || !s || (async () => {
|
|
2270
2295
|
try {
|
|
2271
|
-
const
|
|
2296
|
+
const i = await $({
|
|
2272
2297
|
accessToken: await n(),
|
|
2273
|
-
type:
|
|
2298
|
+
type: V.GET_CHATS_STATS,
|
|
2274
2299
|
params: {
|
|
2275
|
-
userId:
|
|
2300
|
+
userId: s.username
|
|
2276
2301
|
}
|
|
2277
2302
|
});
|
|
2278
|
-
|
|
2303
|
+
i.status === 200 && a(i.data);
|
|
2279
2304
|
} catch {
|
|
2280
2305
|
}
|
|
2281
2306
|
})();
|
|
2282
|
-
}, [e, n,
|
|
2307
|
+
}, [e, n, s]), /* @__PURE__ */ o(te, { open: e, onOpenChange: t, title: Yt, children: /* @__PURE__ */ o(Ko, { stats: r }) });
|
|
2283
2308
|
};
|
|
2284
2309
|
/*!
|
|
2285
|
-
@versini/ui-toggle
|
|
2310
|
+
@versini/ui-toggle v3.0.0
|
|
2286
2311
|
© 2025 gizmette.com
|
|
2287
2312
|
*/
|
|
2288
2313
|
try {
|
|
2289
2314
|
window.__VERSINI_UI_TOGGLE__ || (window.__VERSINI_UI_TOGGLE__ = {
|
|
2290
|
-
version: "
|
|
2291
|
-
buildTime: "01/
|
|
2315
|
+
version: "3.0.0",
|
|
2316
|
+
buildTime: "01/03/2025 10:45 AM EST",
|
|
2292
2317
|
homepage: "https://github.com/aversini/ui-components",
|
|
2293
2318
|
license: "MIT"
|
|
2294
2319
|
});
|
|
2295
2320
|
} catch {
|
|
2296
2321
|
}
|
|
2297
|
-
const
|
|
2322
|
+
const qo = "av-toggle", Zo = () => w("peer", "h-6", "w-11", "rounded-full"), Qo = ({
|
|
2298
2323
|
focusMode: e
|
|
2299
2324
|
}) => w(
|
|
2300
2325
|
"peer-focus:outline",
|
|
@@ -2306,14 +2331,14 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2306
2331
|
"peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
|
|
2307
2332
|
"peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
|
|
2308
2333
|
}
|
|
2309
|
-
),
|
|
2334
|
+
), Xo = () => w(
|
|
2310
2335
|
"peer-checked:after:translate-x-full",
|
|
2311
2336
|
// background color when checked
|
|
2312
2337
|
"peer-checked:bg-violet-500",
|
|
2313
2338
|
// knob circle and border color when checked
|
|
2314
2339
|
"peer-checked:after:bg-white",
|
|
2315
2340
|
"peer-checked:after:border-white"
|
|
2316
|
-
),
|
|
2341
|
+
), Jo = () => w(
|
|
2317
2342
|
"after:left-[2px]",
|
|
2318
2343
|
"after:top-[2px]",
|
|
2319
2344
|
"after:border",
|
|
@@ -2325,7 +2350,7 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2325
2350
|
"after:rounded-full",
|
|
2326
2351
|
"after:transition-all",
|
|
2327
2352
|
"after:content-['']"
|
|
2328
|
-
),
|
|
2353
|
+
), ea = ({
|
|
2329
2354
|
mode: e,
|
|
2330
2355
|
noBorder: t
|
|
2331
2356
|
}) => w({
|
|
@@ -2334,7 +2359,7 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2334
2359
|
"border-border-light bg-surface-darker": e === "dark",
|
|
2335
2360
|
"border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
|
|
2336
2361
|
"border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
|
|
2337
|
-
}),
|
|
2362
|
+
}), ta = ({
|
|
2338
2363
|
mode: e,
|
|
2339
2364
|
labelHidden: t
|
|
2340
2365
|
}) => t ? "sr-only" : w("ml-2 text-sm", {
|
|
@@ -2342,11 +2367,11 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2342
2367
|
"text-copy-lighter": e === "dark",
|
|
2343
2368
|
"text-copy-lighter dark:text-copy-dark": e === "alt-system",
|
|
2344
2369
|
"text-copy-dark dark:text-copy-lighter": e === "system"
|
|
2345
|
-
}),
|
|
2346
|
-
|
|
2370
|
+
}), ra = ({ className: e }) => w(
|
|
2371
|
+
qo,
|
|
2347
2372
|
"relative flex cursor-pointer items-center",
|
|
2348
2373
|
e
|
|
2349
|
-
),
|
|
2374
|
+
), oa = ({
|
|
2350
2375
|
mode: e,
|
|
2351
2376
|
focusMode: t,
|
|
2352
2377
|
labelHidden: r,
|
|
@@ -2354,103 +2379,103 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2354
2379
|
noBorder: n
|
|
2355
2380
|
}) => ({
|
|
2356
2381
|
toggle: w(
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2382
|
+
Zo(),
|
|
2383
|
+
ea({ mode: e, noBorder: n }),
|
|
2384
|
+
Qo({ focusMode: t }),
|
|
2385
|
+
Jo(),
|
|
2386
|
+
Xo()
|
|
2362
2387
|
),
|
|
2363
|
-
label:
|
|
2388
|
+
label: ta({ mode: e, labelHidden: r }),
|
|
2364
2389
|
input: "peer sr-only",
|
|
2365
|
-
wrapper:
|
|
2390
|
+
wrapper: ra({ className: a })
|
|
2366
2391
|
}), ie = ({
|
|
2367
2392
|
checked: e = !1,
|
|
2368
2393
|
onChange: t,
|
|
2369
2394
|
label: r,
|
|
2370
2395
|
labelHidden: a = !1,
|
|
2371
2396
|
name: n,
|
|
2372
|
-
mode:
|
|
2373
|
-
focusMode:
|
|
2397
|
+
mode: s = "system",
|
|
2398
|
+
focusMode: i = "system",
|
|
2374
2399
|
className: c,
|
|
2375
|
-
noBorder:
|
|
2400
|
+
noBorder: u = !1
|
|
2376
2401
|
}) => {
|
|
2377
|
-
const
|
|
2378
|
-
mode:
|
|
2379
|
-
focusMode:
|
|
2402
|
+
const d = oa({
|
|
2403
|
+
mode: s,
|
|
2404
|
+
focusMode: i,
|
|
2380
2405
|
labelHidden: a,
|
|
2381
2406
|
className: c,
|
|
2382
|
-
noBorder:
|
|
2383
|
-
}),
|
|
2407
|
+
noBorder: u
|
|
2408
|
+
}), l = (f) => {
|
|
2384
2409
|
t == null || t(f.target.checked);
|
|
2385
2410
|
};
|
|
2386
|
-
return /* @__PURE__ */
|
|
2411
|
+
return /* @__PURE__ */ y("label", { className: d.wrapper, children: [
|
|
2387
2412
|
/* @__PURE__ */ o(
|
|
2388
2413
|
"input",
|
|
2389
2414
|
{
|
|
2390
2415
|
name: n,
|
|
2391
2416
|
checked: e,
|
|
2392
2417
|
type: "checkbox",
|
|
2393
|
-
className:
|
|
2394
|
-
onChange:
|
|
2418
|
+
className: d.input,
|
|
2419
|
+
onChange: l
|
|
2395
2420
|
}
|
|
2396
2421
|
),
|
|
2397
|
-
/* @__PURE__ */ o("div", { className:
|
|
2398
|
-
/* @__PURE__ */ o("span", { className:
|
|
2422
|
+
/* @__PURE__ */ o("div", { className: d.toggle }),
|
|
2423
|
+
/* @__PURE__ */ o("span", { className: d.label, children: r })
|
|
2399
2424
|
] });
|
|
2400
|
-
},
|
|
2425
|
+
}, aa = ({
|
|
2401
2426
|
open: e,
|
|
2402
2427
|
onOpenChange: t
|
|
2403
2428
|
}) => {
|
|
2404
|
-
const { state: r, dispatch: a } =
|
|
2429
|
+
const { state: r, dispatch: a } = D(sr), { getAccessToken: n, user: s } = Q(), [i, c] = R({
|
|
2405
2430
|
tags: [...r.tags]
|
|
2406
|
-
}),
|
|
2407
|
-
slot:
|
|
2431
|
+
}), u = ({
|
|
2432
|
+
slot: l,
|
|
2408
2433
|
checked: f,
|
|
2409
|
-
label:
|
|
2410
|
-
content:
|
|
2434
|
+
label: b,
|
|
2435
|
+
content: v
|
|
2411
2436
|
}) => {
|
|
2412
2437
|
c((h) => {
|
|
2413
|
-
const
|
|
2414
|
-
slot:
|
|
2415
|
-
label:
|
|
2416
|
-
content:
|
|
2438
|
+
const p = h.tags, k = {
|
|
2439
|
+
slot: l,
|
|
2440
|
+
label: b,
|
|
2441
|
+
content: v,
|
|
2417
2442
|
enabled: f
|
|
2418
|
-
}, x =
|
|
2443
|
+
}, x = p.findIndex((C) => C.slot === l);
|
|
2419
2444
|
return x === -1 ? {
|
|
2420
2445
|
...h,
|
|
2421
|
-
tags: [...
|
|
2422
|
-
} : (
|
|
2446
|
+
tags: [...p, { ...k, slot: l }]
|
|
2447
|
+
} : (p[x] = k, {
|
|
2423
2448
|
...h,
|
|
2424
|
-
tags: [...
|
|
2449
|
+
tags: [...p]
|
|
2425
2450
|
});
|
|
2426
2451
|
});
|
|
2427
|
-
},
|
|
2428
|
-
|
|
2452
|
+
}, d = async (l) => {
|
|
2453
|
+
l.preventDefault();
|
|
2429
2454
|
try {
|
|
2430
2455
|
await $({
|
|
2431
2456
|
accessToken: await n(),
|
|
2432
|
-
type:
|
|
2457
|
+
type: V.SET_USER_PREFERENCES,
|
|
2433
2458
|
params: {
|
|
2434
|
-
user:
|
|
2435
|
-
tags:
|
|
2459
|
+
user: s == null ? void 0 : s.username,
|
|
2460
|
+
tags: i.tags
|
|
2436
2461
|
}
|
|
2437
2462
|
}), a({
|
|
2438
|
-
type:
|
|
2463
|
+
type: Zt,
|
|
2439
2464
|
payload: {
|
|
2440
|
-
tags:
|
|
2465
|
+
tags: i.tags
|
|
2441
2466
|
}
|
|
2442
2467
|
});
|
|
2443
2468
|
} catch {
|
|
2444
2469
|
}
|
|
2445
2470
|
};
|
|
2446
|
-
return /* @__PURE__ */
|
|
2471
|
+
return /* @__PURE__ */ y(
|
|
2447
2472
|
te,
|
|
2448
2473
|
{
|
|
2449
2474
|
open: e,
|
|
2450
2475
|
onOpenChange: t,
|
|
2451
2476
|
title: "Tags",
|
|
2452
|
-
footer: /* @__PURE__ */
|
|
2453
|
-
|
|
2477
|
+
footer: /* @__PURE__ */ y(
|
|
2478
|
+
q,
|
|
2454
2479
|
{
|
|
2455
2480
|
columnGap: 2,
|
|
2456
2481
|
alignHorizontal: "flex-end",
|
|
@@ -2474,8 +2499,8 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2474
2499
|
mode: "dark",
|
|
2475
2500
|
variant: "danger",
|
|
2476
2501
|
focusMode: "light",
|
|
2477
|
-
onClick: async (
|
|
2478
|
-
t(!1), await l
|
|
2502
|
+
onClick: async (l) => {
|
|
2503
|
+
t(!1), await d(l);
|
|
2479
2504
|
},
|
|
2480
2505
|
children: "Save"
|
|
2481
2506
|
}
|
|
@@ -2484,41 +2509,41 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2484
2509
|
}
|
|
2485
2510
|
),
|
|
2486
2511
|
children: [
|
|
2487
|
-
/* @__PURE__ */ o("p", { children:
|
|
2488
|
-
|
|
2489
|
-
|
|
2512
|
+
/* @__PURE__ */ o("p", { children: qt }),
|
|
2513
|
+
i.tags && i.tags.map((l) => /* @__PURE__ */ y(
|
|
2514
|
+
O,
|
|
2490
2515
|
{
|
|
2491
|
-
header: `Tag ${
|
|
2516
|
+
header: `Tag ${l.slot + 1}`,
|
|
2492
2517
|
className: "prose-dark dark:prose-lighter mb-2",
|
|
2493
2518
|
children: [
|
|
2494
|
-
/* @__PURE__ */
|
|
2519
|
+
/* @__PURE__ */ y(q, { className: "mt-8 mb-6", columnGap: 2, rowGap: 6, children: [
|
|
2495
2520
|
/* @__PURE__ */ o(M, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ o(
|
|
2496
|
-
|
|
2521
|
+
Ie,
|
|
2497
2522
|
{
|
|
2498
2523
|
label: "Label",
|
|
2499
|
-
name: `tag${
|
|
2500
|
-
value:
|
|
2524
|
+
name: `tag${l.slot}-label`,
|
|
2525
|
+
value: l.label,
|
|
2501
2526
|
onChange: (f) => {
|
|
2502
|
-
|
|
2503
|
-
slot:
|
|
2504
|
-
checked:
|
|
2527
|
+
u({
|
|
2528
|
+
slot: l.slot,
|
|
2529
|
+
checked: l.enabled,
|
|
2505
2530
|
label: f.target.value,
|
|
2506
|
-
content:
|
|
2531
|
+
content: l.content
|
|
2507
2532
|
});
|
|
2508
2533
|
}
|
|
2509
2534
|
}
|
|
2510
2535
|
) }),
|
|
2511
2536
|
/* @__PURE__ */ o(M, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ o(
|
|
2512
|
-
|
|
2537
|
+
Ie,
|
|
2513
2538
|
{
|
|
2514
2539
|
label: "Content",
|
|
2515
|
-
name: `tag${
|
|
2516
|
-
value:
|
|
2540
|
+
name: `tag${l.slot}-content`,
|
|
2541
|
+
value: l.content,
|
|
2517
2542
|
onChange: (f) => {
|
|
2518
|
-
|
|
2519
|
-
slot:
|
|
2520
|
-
checked:
|
|
2521
|
-
label:
|
|
2543
|
+
u({
|
|
2544
|
+
slot: l.slot,
|
|
2545
|
+
checked: l.enabled,
|
|
2546
|
+
label: l.label,
|
|
2522
2547
|
content: f.target.value
|
|
2523
2548
|
});
|
|
2524
2549
|
}
|
|
@@ -2531,49 +2556,49 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2531
2556
|
className: "mt-2",
|
|
2532
2557
|
noBorder: !0,
|
|
2533
2558
|
label: "Enabled",
|
|
2534
|
-
name:
|
|
2559
|
+
name: l.slot.toString(),
|
|
2535
2560
|
onChange: (f) => {
|
|
2536
|
-
|
|
2537
|
-
slot:
|
|
2561
|
+
u({
|
|
2562
|
+
slot: l.slot,
|
|
2538
2563
|
checked: f,
|
|
2539
|
-
label:
|
|
2540
|
-
content:
|
|
2564
|
+
label: l.label,
|
|
2565
|
+
content: l.content
|
|
2541
2566
|
});
|
|
2542
2567
|
},
|
|
2543
|
-
checked:
|
|
2568
|
+
checked: l.enabled
|
|
2544
2569
|
}
|
|
2545
2570
|
)
|
|
2546
2571
|
]
|
|
2547
2572
|
},
|
|
2548
|
-
`tag-slot-${
|
|
2573
|
+
`tag-slot-${l.slot}`
|
|
2549
2574
|
))
|
|
2550
2575
|
]
|
|
2551
2576
|
}
|
|
2552
2577
|
);
|
|
2553
|
-
},
|
|
2578
|
+
}, na = ({
|
|
2554
2579
|
open: e,
|
|
2555
2580
|
onOpenChange: t
|
|
2556
2581
|
}) => {
|
|
2557
|
-
const { dispatch: r } =
|
|
2582
|
+
const { dispatch: r } = D(ve), { getAccessToken: a, user: n } = Q(), [s, i] = R(!1), [c, u] = R({
|
|
2558
2583
|
loaded: !1,
|
|
2559
2584
|
instructions: "",
|
|
2560
2585
|
loadingLocation: !1,
|
|
2561
2586
|
location: "",
|
|
2562
2587
|
engine: me
|
|
2563
|
-
}), [
|
|
2564
|
-
key: ce +
|
|
2588
|
+
}), [d, l] = le({
|
|
2589
|
+
key: ce + et,
|
|
2565
2590
|
initialValue: !1
|
|
2566
|
-
}), [f,
|
|
2567
|
-
key: ce +
|
|
2591
|
+
}), [f, b] = le({
|
|
2592
|
+
key: ce + Qt,
|
|
2568
2593
|
initialValue: !1
|
|
2569
|
-
}),
|
|
2570
|
-
|
|
2571
|
-
}, h = async (
|
|
2572
|
-
|
|
2594
|
+
}), v = (m) => {
|
|
2595
|
+
b(m);
|
|
2596
|
+
}, h = async (m) => {
|
|
2597
|
+
m.preventDefault();
|
|
2573
2598
|
try {
|
|
2574
2599
|
await $({
|
|
2575
2600
|
accessToken: await a(),
|
|
2576
|
-
type:
|
|
2601
|
+
type: V.SET_USER_PREFERENCES,
|
|
2577
2602
|
params: {
|
|
2578
2603
|
user: n == null ? void 0 : n.username,
|
|
2579
2604
|
instructions: c.instructions,
|
|
@@ -2581,61 +2606,61 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2581
2606
|
engine: c.engine
|
|
2582
2607
|
}
|
|
2583
2608
|
}), r({
|
|
2584
|
-
type:
|
|
2609
|
+
type: tt,
|
|
2585
2610
|
payload: {
|
|
2586
2611
|
engine: c.engine
|
|
2587
2612
|
}
|
|
2588
2613
|
});
|
|
2589
2614
|
} catch {
|
|
2590
2615
|
}
|
|
2591
|
-
},
|
|
2592
|
-
|
|
2593
|
-
...
|
|
2616
|
+
}, p = async () => {
|
|
2617
|
+
u((m) => ({
|
|
2618
|
+
...m,
|
|
2594
2619
|
location: "...",
|
|
2595
2620
|
loadingLocation: !0
|
|
2596
2621
|
}));
|
|
2597
2622
|
try {
|
|
2598
|
-
const
|
|
2623
|
+
const m = Date.now(), N = await er(), E = await $({
|
|
2599
2624
|
accessToken: await a(),
|
|
2600
|
-
type:
|
|
2625
|
+
type: V.GET_LOCATION,
|
|
2601
2626
|
params: {
|
|
2602
|
-
latitude:
|
|
2603
|
-
longitude:
|
|
2627
|
+
latitude: N.latitude,
|
|
2628
|
+
longitude: N.longitude
|
|
2604
2629
|
}
|
|
2605
|
-
}),
|
|
2606
|
-
if (
|
|
2607
|
-
const { city:
|
|
2608
|
-
|
|
2630
|
+
}), _ = Date.now() - m;
|
|
2631
|
+
if (_ < 2e3 && await new Promise((T) => setTimeout(T, 2e3 - _)), E.status === 200) {
|
|
2632
|
+
const { city: T, state: G, country: U, displayName: j } = E.data, re = T && G && U ? `${T}, ${G}, ${U}` : j;
|
|
2633
|
+
u((oe) => ({
|
|
2609
2634
|
...oe,
|
|
2610
2635
|
loaded: !0,
|
|
2611
2636
|
location: re,
|
|
2612
2637
|
loadingLocation: !1
|
|
2613
2638
|
}));
|
|
2614
2639
|
} else
|
|
2615
|
-
|
|
2616
|
-
...
|
|
2640
|
+
u((T) => ({
|
|
2641
|
+
...T,
|
|
2617
2642
|
loaded: !0,
|
|
2618
2643
|
location: "",
|
|
2619
2644
|
loadingLocation: !1
|
|
2620
2645
|
}));
|
|
2621
2646
|
} catch {
|
|
2622
2647
|
}
|
|
2623
|
-
},
|
|
2624
|
-
|
|
2625
|
-
...
|
|
2626
|
-
engine:
|
|
2648
|
+
}, k = (m) => {
|
|
2649
|
+
u((N) => ({
|
|
2650
|
+
...N,
|
|
2651
|
+
engine: m ? ne : X
|
|
2627
2652
|
}));
|
|
2628
|
-
}, x = (
|
|
2629
|
-
|
|
2630
|
-
...
|
|
2631
|
-
engine:
|
|
2653
|
+
}, x = (m) => {
|
|
2654
|
+
u((N) => ({
|
|
2655
|
+
...N,
|
|
2656
|
+
engine: m ? X : ne
|
|
2632
2657
|
}));
|
|
2633
2658
|
}, C = () => {
|
|
2634
|
-
|
|
2659
|
+
i(!s);
|
|
2635
2660
|
};
|
|
2636
|
-
return
|
|
2661
|
+
return F(() => {
|
|
2637
2662
|
if (!e || !n) {
|
|
2638
|
-
|
|
2663
|
+
u({
|
|
2639
2664
|
loaded: !1,
|
|
2640
2665
|
loadingLocation: !1,
|
|
2641
2666
|
instructions: "",
|
|
@@ -2646,19 +2671,19 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2646
2671
|
}
|
|
2647
2672
|
(async () => {
|
|
2648
2673
|
try {
|
|
2649
|
-
const
|
|
2674
|
+
const m = await $({
|
|
2650
2675
|
accessToken: await a(),
|
|
2651
|
-
type:
|
|
2676
|
+
type: V.GET_USER_PREFERENCES,
|
|
2652
2677
|
params: {
|
|
2653
2678
|
user: n.username
|
|
2654
2679
|
}
|
|
2655
2680
|
});
|
|
2656
|
-
|
|
2657
|
-
...
|
|
2681
|
+
m.status === 200 && u((N) => ({
|
|
2682
|
+
...N,
|
|
2658
2683
|
loaded: !0,
|
|
2659
|
-
instructions:
|
|
2660
|
-
location:
|
|
2661
|
-
engine:
|
|
2684
|
+
instructions: m.data.instructions || "",
|
|
2685
|
+
location: m.data.location || "",
|
|
2686
|
+
engine: m.data.engine || me
|
|
2662
2687
|
}));
|
|
2663
2688
|
} catch {
|
|
2664
2689
|
}
|
|
@@ -2668,9 +2693,9 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2668
2693
|
{
|
|
2669
2694
|
open: e,
|
|
2670
2695
|
onOpenChange: t,
|
|
2671
|
-
title:
|
|
2672
|
-
footer: /* @__PURE__ */
|
|
2673
|
-
|
|
2696
|
+
title: Xt,
|
|
2697
|
+
footer: /* @__PURE__ */ y(
|
|
2698
|
+
q,
|
|
2674
2699
|
{
|
|
2675
2700
|
columnGap: 2,
|
|
2676
2701
|
alignHorizontal: "flex-end",
|
|
@@ -2694,8 +2719,8 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2694
2719
|
mode: "dark",
|
|
2695
2720
|
variant: "danger",
|
|
2696
2721
|
focusMode: "light",
|
|
2697
|
-
onClick: async (
|
|
2698
|
-
t(!1), await h(
|
|
2722
|
+
onClick: async (m) => {
|
|
2723
|
+
t(!1), await h(m);
|
|
2699
2724
|
},
|
|
2700
2725
|
children: "Save"
|
|
2701
2726
|
}
|
|
@@ -2703,12 +2728,12 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2703
2728
|
]
|
|
2704
2729
|
}
|
|
2705
2730
|
),
|
|
2706
|
-
children: /* @__PURE__ */
|
|
2707
|
-
|
|
2708
|
-
/* @__PURE__ */
|
|
2709
|
-
|
|
2731
|
+
children: /* @__PURE__ */ y(z, { children: [
|
|
2732
|
+
s && /* @__PURE__ */ o(aa, { open: s, onOpenChange: i }),
|
|
2733
|
+
/* @__PURE__ */ y(
|
|
2734
|
+
O,
|
|
2710
2735
|
{
|
|
2711
|
-
header:
|
|
2736
|
+
header: S.SETTINGS_ENGINE.TITLE,
|
|
2712
2737
|
className: "prose-dark dark:prose-lighter",
|
|
2713
2738
|
children: [
|
|
2714
2739
|
/* @__PURE__ */ o("p", { className: "text-xs", children: "Select the AI engine that will be used to generate responses." }),
|
|
@@ -2718,7 +2743,7 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2718
2743
|
noBorder: !0,
|
|
2719
2744
|
label: ne,
|
|
2720
2745
|
name: ne,
|
|
2721
|
-
onChange:
|
|
2746
|
+
onChange: k,
|
|
2722
2747
|
checked: c.engine === ne
|
|
2723
2748
|
}
|
|
2724
2749
|
),
|
|
@@ -2727,10 +2752,10 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2727
2752
|
{
|
|
2728
2753
|
className: "mt-2",
|
|
2729
2754
|
noBorder: !0,
|
|
2730
|
-
label:
|
|
2731
|
-
name:
|
|
2755
|
+
label: X,
|
|
2756
|
+
name: X,
|
|
2732
2757
|
onChange: x,
|
|
2733
|
-
checked: c.engine ===
|
|
2758
|
+
checked: c.engine === X
|
|
2734
2759
|
}
|
|
2735
2760
|
),
|
|
2736
2761
|
/* @__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." }),
|
|
@@ -2741,8 +2766,8 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2741
2766
|
noBorder: !0,
|
|
2742
2767
|
label: "Show Quick Engine Toggle Menu",
|
|
2743
2768
|
name: "show-toggle-engine-menu",
|
|
2744
|
-
onChange:
|
|
2745
|
-
checked:
|
|
2769
|
+
onChange: l,
|
|
2770
|
+
checked: d
|
|
2746
2771
|
}
|
|
2747
2772
|
),
|
|
2748
2773
|
/* @__PURE__ */ o("p", { className: "text-xs", children: "This option adds individual statistics for each messages under their respective bubbles, such as processing time, model name, and more." }),
|
|
@@ -2753,37 +2778,37 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2753
2778
|
noBorder: !0,
|
|
2754
2779
|
label: "Show Message Statistics",
|
|
2755
2780
|
name: "show-message-statistics",
|
|
2756
|
-
onChange:
|
|
2781
|
+
onChange: v,
|
|
2757
2782
|
checked: f
|
|
2758
2783
|
}
|
|
2759
2784
|
),
|
|
2760
2785
|
/* @__PURE__ */ o("h3", { className: "border-b-2 border-slate-400", children: "Tags" }),
|
|
2761
2786
|
/* @__PURE__ */ o(
|
|
2762
|
-
|
|
2787
|
+
J,
|
|
2763
2788
|
{
|
|
2764
2789
|
className: "mt-2",
|
|
2765
2790
|
size: "small",
|
|
2766
2791
|
onClick: C,
|
|
2767
2792
|
labelLeft: "Edit Custom Tags",
|
|
2768
|
-
children: /* @__PURE__ */ o(
|
|
2793
|
+
children: /* @__PURE__ */ o(Cr, { size: "size-3", monotone: !0 })
|
|
2769
2794
|
}
|
|
2770
2795
|
)
|
|
2771
2796
|
]
|
|
2772
2797
|
}
|
|
2773
2798
|
),
|
|
2774
|
-
/* @__PURE__ */
|
|
2775
|
-
|
|
2799
|
+
/* @__PURE__ */ y(
|
|
2800
|
+
O,
|
|
2776
2801
|
{
|
|
2777
2802
|
header: "Custom Instructions",
|
|
2778
2803
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
2779
2804
|
children: [
|
|
2780
|
-
/* @__PURE__ */
|
|
2805
|
+
/* @__PURE__ */ y("p", { children: [
|
|
2781
2806
|
"What would you like ",
|
|
2782
|
-
/* @__PURE__ */ o("em", { children:
|
|
2807
|
+
/* @__PURE__ */ o("em", { children: Jt }),
|
|
2783
2808
|
" to know about you to provide better responses?"
|
|
2784
2809
|
] }),
|
|
2785
2810
|
/* @__PURE__ */ o(
|
|
2786
|
-
|
|
2811
|
+
je,
|
|
2787
2812
|
{
|
|
2788
2813
|
mode: "alt-system",
|
|
2789
2814
|
autoCapitalize: "off",
|
|
@@ -2792,11 +2817,11 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2792
2817
|
name: "customInstructions",
|
|
2793
2818
|
label: "Custom Instructions",
|
|
2794
2819
|
value: c.instructions,
|
|
2795
|
-
onChange: (
|
|
2796
|
-
|
|
2797
|
-
...
|
|
2820
|
+
onChange: (m) => {
|
|
2821
|
+
u((N) => ({
|
|
2822
|
+
...N,
|
|
2798
2823
|
loaded: !0,
|
|
2799
|
-
instructions:
|
|
2824
|
+
instructions: m.target.value
|
|
2800
2825
|
}));
|
|
2801
2826
|
},
|
|
2802
2827
|
helperText: "Press ENTER to add a new line."
|
|
@@ -2805,25 +2830,25 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2805
2830
|
]
|
|
2806
2831
|
}
|
|
2807
2832
|
),
|
|
2808
|
-
/* @__PURE__ */
|
|
2809
|
-
|
|
2833
|
+
/* @__PURE__ */ y(
|
|
2834
|
+
O,
|
|
2810
2835
|
{
|
|
2811
2836
|
header: "Location",
|
|
2812
2837
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
2813
2838
|
children: [
|
|
2814
2839
|
/* @__PURE__ */ o("p", { children: "You can share your location to receive customized responses based on your area." }),
|
|
2815
2840
|
/* @__PURE__ */ o(
|
|
2816
|
-
|
|
2841
|
+
je,
|
|
2817
2842
|
{
|
|
2818
2843
|
mode: "alt-system",
|
|
2819
2844
|
name: "location",
|
|
2820
2845
|
label: "Location",
|
|
2821
2846
|
value: c.location,
|
|
2822
|
-
onChange: (
|
|
2823
|
-
|
|
2824
|
-
...
|
|
2847
|
+
onChange: (m) => {
|
|
2848
|
+
u((N) => ({
|
|
2849
|
+
...N,
|
|
2825
2850
|
loaded: !0,
|
|
2826
|
-
location:
|
|
2851
|
+
location: m.target.value
|
|
2827
2852
|
}));
|
|
2828
2853
|
},
|
|
2829
2854
|
helperText: "Enter your location or press auto-detect."
|
|
@@ -2836,7 +2861,7 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2836
2861
|
size: "small",
|
|
2837
2862
|
noBorder: !0,
|
|
2838
2863
|
disabled: c.loadingLocation,
|
|
2839
|
-
onClick:
|
|
2864
|
+
onClick: p,
|
|
2840
2865
|
children: c.loadingLocation ? "Detecting..." : "Auto-detect"
|
|
2841
2866
|
}
|
|
2842
2867
|
)
|
|
@@ -2846,133 +2871,133 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2846
2871
|
] })
|
|
2847
2872
|
}
|
|
2848
2873
|
);
|
|
2849
|
-
},
|
|
2850
|
-
const { state: e, dispatch: t, serverStats: r } =
|
|
2851
|
-
key: ce +
|
|
2874
|
+
}, ha = () => {
|
|
2875
|
+
const { state: e, dispatch: t, serverStats: r } = D(ve), [a, n] = R((e == null ? void 0 : e.engine) || me), [s, i] = R(!1), [c, u] = R(!1), [d, l] = R(!1), [f, b] = R(!1), [v, h] = R(!1), [p] = le({
|
|
2876
|
+
key: ce + et,
|
|
2852
2877
|
initialValue: !1
|
|
2853
|
-
}), { logout:
|
|
2854
|
-
|
|
2855
|
-
},
|
|
2856
|
-
|
|
2857
|
-
},
|
|
2858
|
-
|
|
2859
|
-
},
|
|
2860
|
-
|
|
2861
|
-
},
|
|
2862
|
-
h(!
|
|
2878
|
+
}), { logout: k, getAccessToken: x, user: C } = Q(), m = () => {
|
|
2879
|
+
i(!s);
|
|
2880
|
+
}, N = () => {
|
|
2881
|
+
u(!c);
|
|
2882
|
+
}, E = () => {
|
|
2883
|
+
l(!d);
|
|
2884
|
+
}, A = () => {
|
|
2885
|
+
b(!f);
|
|
2886
|
+
}, _ = () => {
|
|
2887
|
+
h(!v);
|
|
2863
2888
|
};
|
|
2864
|
-
return
|
|
2889
|
+
return F(() => {
|
|
2865
2890
|
e && e.engine && e.engine !== a && n(e.engine);
|
|
2866
|
-
}, [e, a]), /* @__PURE__ */
|
|
2891
|
+
}, [e, a]), /* @__PURE__ */ y(z, { children: [
|
|
2867
2892
|
/* @__PURE__ */ o(
|
|
2868
|
-
|
|
2893
|
+
Pt,
|
|
2869
2894
|
{
|
|
2870
|
-
showConfirmation:
|
|
2895
|
+
showConfirmation: v,
|
|
2871
2896
|
setShowConfirmation: h,
|
|
2872
|
-
action:
|
|
2897
|
+
action: k,
|
|
2873
2898
|
customStrings: {
|
|
2874
|
-
confirmAction:
|
|
2899
|
+
confirmAction: Ue,
|
|
2875
2900
|
cancelAction: "Cancel",
|
|
2876
|
-
title:
|
|
2901
|
+
title: Ue
|
|
2877
2902
|
},
|
|
2878
2903
|
children: /* @__PURE__ */ o("p", { children: "Are you sure you want to log out?" })
|
|
2879
2904
|
}
|
|
2880
2905
|
),
|
|
2881
|
-
/* @__PURE__ */ o(
|
|
2882
|
-
/* @__PURE__ */ o(
|
|
2883
|
-
/* @__PURE__ */ o(
|
|
2884
|
-
/* @__PURE__ */ o(
|
|
2885
|
-
/* @__PURE__ */ o("div", { className: "bg-slate-900 py-4 px-4 rounded-t-md", children: /* @__PURE__ */
|
|
2886
|
-
/* @__PURE__ */ o(M, { children: /* @__PURE__ */ o(
|
|
2887
|
-
/* @__PURE__ */ o(M, { children: /* @__PURE__ */
|
|
2888
|
-
|
|
2906
|
+
/* @__PURE__ */ o(Yo, { open: s, onOpenChange: i }),
|
|
2907
|
+
/* @__PURE__ */ o(na, { open: c, onOpenChange: u }),
|
|
2908
|
+
/* @__PURE__ */ o(Wo, { open: d, onOpenChange: l }),
|
|
2909
|
+
/* @__PURE__ */ o(Ho, { open: f, onOpenChange: b }),
|
|
2910
|
+
/* @__PURE__ */ o("div", { className: "bg-slate-900 py-4 px-4 rounded-t-md", children: /* @__PURE__ */ y(q, { alignHorizontal: "space-between", alignVertical: "center", children: [
|
|
2911
|
+
/* @__PURE__ */ o(M, { children: /* @__PURE__ */ o(ir, { mode: "dark", radius: "large" }) }),
|
|
2912
|
+
/* @__PURE__ */ o(M, { children: /* @__PURE__ */ y(q, { children: [
|
|
2913
|
+
p && r && /* @__PURE__ */ o(M, { children: /* @__PURE__ */ o(
|
|
2889
2914
|
_e,
|
|
2890
2915
|
{
|
|
2891
2916
|
mode: "dark",
|
|
2892
2917
|
focusMode: "light",
|
|
2893
|
-
trigger: /* @__PURE__ */ o(
|
|
2918
|
+
trigger: /* @__PURE__ */ o(J, { className: "mr-2", children: e && e.engine === X ? /* @__PURE__ */ o(ht, {}) : /* @__PURE__ */ o(gt, {}) }),
|
|
2894
2919
|
defaultPlacement: "bottom-start",
|
|
2895
|
-
children: /* @__PURE__ */ o(
|
|
2896
|
-
|
|
2920
|
+
children: /* @__PURE__ */ o(W, { raw: !0, ignoreClick: !0, children: /* @__PURE__ */ o(
|
|
2921
|
+
yo,
|
|
2897
2922
|
{
|
|
2898
2923
|
size: "small",
|
|
2899
2924
|
mode: "dark",
|
|
2900
2925
|
focusMode: "light",
|
|
2901
2926
|
value: a,
|
|
2902
|
-
onValueChange: async (
|
|
2903
|
-
if (
|
|
2927
|
+
onValueChange: async (T) => {
|
|
2928
|
+
if (T)
|
|
2904
2929
|
try {
|
|
2905
2930
|
await $({
|
|
2906
2931
|
accessToken: await x(),
|
|
2907
|
-
type:
|
|
2932
|
+
type: V.SET_USER_PREFERENCES,
|
|
2908
2933
|
params: {
|
|
2909
2934
|
user: C == null ? void 0 : C.username,
|
|
2910
|
-
engine:
|
|
2935
|
+
engine: T
|
|
2911
2936
|
}
|
|
2912
2937
|
}), t({
|
|
2913
|
-
type:
|
|
2938
|
+
type: tt,
|
|
2914
2939
|
payload: {
|
|
2915
|
-
engine:
|
|
2940
|
+
engine: T
|
|
2916
2941
|
}
|
|
2917
2942
|
}), t({
|
|
2918
|
-
type:
|
|
2943
|
+
type: Je
|
|
2919
2944
|
});
|
|
2920
2945
|
} catch {
|
|
2921
2946
|
}
|
|
2922
2947
|
},
|
|
2923
|
-
children: r && r.engines.map((
|
|
2948
|
+
children: r && r.engines.map((T) => /* @__PURE__ */ o(ko, { value: T }, T))
|
|
2924
2949
|
}
|
|
2925
2950
|
) })
|
|
2926
2951
|
}
|
|
2927
2952
|
) }),
|
|
2928
|
-
/* @__PURE__ */ o(M, { children: /* @__PURE__ */
|
|
2953
|
+
/* @__PURE__ */ o(M, { children: /* @__PURE__ */ y(
|
|
2929
2954
|
_e,
|
|
2930
2955
|
{
|
|
2931
2956
|
mode: "dark",
|
|
2932
2957
|
focusMode: "light",
|
|
2933
|
-
trigger: /* @__PURE__ */ o(
|
|
2958
|
+
trigger: /* @__PURE__ */ o(J, { children: /* @__PURE__ */ o(_r, {}) }),
|
|
2934
2959
|
defaultPlacement: "bottom-end",
|
|
2935
2960
|
children: [
|
|
2936
2961
|
/* @__PURE__ */ o(
|
|
2937
|
-
|
|
2962
|
+
W,
|
|
2938
2963
|
{
|
|
2939
2964
|
label: "Profile",
|
|
2940
|
-
onClick:
|
|
2941
|
-
icon: /* @__PURE__ */ o(
|
|
2965
|
+
onClick: m,
|
|
2966
|
+
icon: /* @__PURE__ */ o(Ir, {})
|
|
2942
2967
|
}
|
|
2943
2968
|
),
|
|
2944
2969
|
/* @__PURE__ */ o(
|
|
2945
|
-
|
|
2970
|
+
W,
|
|
2946
2971
|
{
|
|
2947
2972
|
label: "Settings",
|
|
2948
|
-
onClick:
|
|
2949
|
-
icon: /* @__PURE__ */ o(
|
|
2973
|
+
onClick: N,
|
|
2974
|
+
icon: /* @__PURE__ */ o(Sr, {})
|
|
2950
2975
|
}
|
|
2951
2976
|
),
|
|
2952
2977
|
/* @__PURE__ */ o(
|
|
2953
|
-
|
|
2978
|
+
W,
|
|
2954
2979
|
{
|
|
2955
2980
|
label: "History",
|
|
2956
|
-
onClick:
|
|
2957
|
-
icon: /* @__PURE__ */ o(
|
|
2981
|
+
onClick: E,
|
|
2982
|
+
icon: /* @__PURE__ */ o(Nr, {})
|
|
2958
2983
|
}
|
|
2959
2984
|
),
|
|
2960
2985
|
/* @__PURE__ */ o(
|
|
2961
|
-
|
|
2986
|
+
W,
|
|
2962
2987
|
{
|
|
2963
2988
|
label: "About",
|
|
2964
|
-
onClick:
|
|
2965
|
-
icon: /* @__PURE__ */ o(
|
|
2989
|
+
onClick: A,
|
|
2990
|
+
icon: /* @__PURE__ */ o(Tr, {})
|
|
2966
2991
|
}
|
|
2967
2992
|
),
|
|
2968
|
-
e && e.id && !e.isComponent && /* @__PURE__ */
|
|
2969
|
-
/* @__PURE__ */ o(
|
|
2993
|
+
e && e.id && !e.isComponent && /* @__PURE__ */ y(z, { children: [
|
|
2994
|
+
/* @__PURE__ */ o(Rr, {}),
|
|
2970
2995
|
/* @__PURE__ */ o(
|
|
2971
|
-
|
|
2996
|
+
W,
|
|
2972
2997
|
{
|
|
2973
2998
|
label: "Log out",
|
|
2974
|
-
onClick:
|
|
2975
|
-
icon: /* @__PURE__ */ o("div", { className: "text-red-700", children: /* @__PURE__ */ o(
|
|
2999
|
+
onClick: _,
|
|
3000
|
+
icon: /* @__PURE__ */ o("div", { className: "text-red-700", children: /* @__PURE__ */ o(wr, { monotone: !0 }) })
|
|
2976
3001
|
}
|
|
2977
3002
|
)
|
|
2978
3003
|
] })
|
|
@@ -2984,5 +3009,5 @@ const jo = "av-toggle", Wo = () => w("peer", "h-6", "w-11", "rounded-full"), Ko
|
|
|
2984
3009
|
] });
|
|
2985
3010
|
};
|
|
2986
3011
|
export {
|
|
2987
|
-
|
|
3012
|
+
ha as default
|
|
2988
3013
|
};
|