@versini/sassysaint 5.5.30 → 5.5.32
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.QCfXzAXM.js → App.Df2lQC7R.js} +1745 -1751
- package/dist/chunks/HeaderToolbar.ClkzdP_R.js +2508 -0
- package/dist/chunks/{MarkdownWithExtra.BVNZoiYp.js → MarkdownWithExtra.Dtxi1OCx.js} +6 -6
- package/dist/chunks/{MessageAssistant.CXsF442E.js → MessageAssistant.BCLp8Epo.js} +3 -3
- package/dist/chunks/{index.DbjZmArX.js → index.kTiw0vKw.js} +31 -31
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
- package/dist/chunks/HeaderToolbar.0JOe_Vgi.js +0 -2305
|
@@ -0,0 +1,2508 @@
|
|
|
1
|
+
import { jsxs as h, jsx as a, Fragment as M } from "react/jsx-runtime";
|
|
2
|
+
import { g as D, un as G, R as $, CARDS as C, renderDataAsList as he, pluralize as ge, ABOUT_TITLE as ht, L as X, j as A, C as F, INFINITE_SCROLL_LIMIT as Be, INFINITE_SCROLL_THRESHOLD as Oe, LOCAL_STORAGE_PREFIX as _e, LOCAL_STORAGE_SORT as gt, P as le, ACTION_RESET as pt, ACTION_RESTORE as ft, ACTION_SORT as Pe, LOCAL_STORAGE_SEARCH as bt, HISTORY_TITLE as yt, ye as Ee, ACTION_SEARCH as kt, debounce as vt, M as xt, z as $e, durationFormatter as Nt, PROFILE_TITLE as wt, PROMPTS_DESCRIPTION as Et, DEFAULT_AI_ENGINE as Ct, LOCAL_STORAGE_CHAT_DETAILS as Tt, SETTINGS_TITLE as _t, ENGINE_OPENAI as Q, ENGINE_ANTHROPIC as re, APP_NAME as It, getCurrentGeoLocation as St, LOG_OUT as De } from "./index.kTiw0vKw.js";
|
|
3
|
+
import { i as pe, useServerCapabilities as Lt, HistoryContext as je, E as Ie, ge as At, he as Rt, ue as Ne, ie as P, ye as zt, me as Mt, p as Bt, i$1 as Ot, be as Pt, serviceCall as ce, SERVICE_TYPES as ie, f as ae, AppContext as We, useChatsHistory as $t, useUserChatStats as Dt, useUserPreferences as Ye, me$1 as Vt, R as oe, P as Ht } from "./App.Df2lQC7R.js";
|
|
4
|
+
import * as S from "react";
|
|
5
|
+
import be, { useId as Se, useRef as _, useEffect as V, useState as w, useContext as fe, useCallback as Ke, Fragment as Ut, useLayoutEffect as ne, useMemo as Xe, useReducer as Ft } from "react";
|
|
6
|
+
import m from "clsx";
|
|
7
|
+
import { useMergeRefs as Gt, FloatingPortal as jt, FloatingOverlay as Wt, FloatingFocusManager as Yt, useFloating as Kt, useClick as Xt, useDismiss as qt, useRole as Qt, useInteractions as Jt } from "@floating-ui/react";
|
|
8
|
+
const Zt = ({
|
|
9
|
+
className: e,
|
|
10
|
+
viewBox: r,
|
|
11
|
+
title: t,
|
|
12
|
+
monotone: o,
|
|
13
|
+
...n
|
|
14
|
+
}) => /* @__PURE__ */ h(
|
|
15
|
+
D,
|
|
16
|
+
{
|
|
17
|
+
defaultViewBox: "0 0 512 512",
|
|
18
|
+
size: "size-5",
|
|
19
|
+
viewBox: r,
|
|
20
|
+
className: e,
|
|
21
|
+
title: t || "Back",
|
|
22
|
+
...n,
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ a(
|
|
25
|
+
"path",
|
|
26
|
+
{
|
|
27
|
+
className: "fa-secondary",
|
|
28
|
+
opacity: o ? "1" : "0.4",
|
|
29
|
+
d: "M66.6 320c0 1.8 .1 3.5 .4 5.3C84.9 431.3 177 512 288 512c123.7 0 224-100.3 224-224c0-111-80.7-203.1-186.7-220.9c-1.8-.3-3.6-.4-5.3-.4c-15.3 0-28.9 11.1-31.5 26.7c-2.9 17.4 8.8 33.9 26.3 36.9C390.4 142.9 448 208.8 448 288c0 88.4-71.6 160-160 160c-79.2 0-145.1-57.6-157.8-133.3c-2.9-17.4-19.4-29.2-36.9-26.3c-15.6 2.6-26.7 16.2-26.7 31.5z"
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ a(
|
|
33
|
+
"path",
|
|
34
|
+
{
|
|
35
|
+
className: "fa-primary",
|
|
36
|
+
d: "M32 0L192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-82.7 0L342.6 297.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L64 109.3 64 192c0 17.7-14.3 32-32 32s-32-14.3-32-32L0 32C0 14.3 14.3 0 32 0z"
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
), er = ({
|
|
42
|
+
className: e,
|
|
43
|
+
viewBox: r,
|
|
44
|
+
title: t,
|
|
45
|
+
monotone: o,
|
|
46
|
+
...n
|
|
47
|
+
}) => /* @__PURE__ */ h(
|
|
48
|
+
D,
|
|
49
|
+
{
|
|
50
|
+
defaultViewBox: "0 0 448 512",
|
|
51
|
+
size: "size-5",
|
|
52
|
+
viewBox: r,
|
|
53
|
+
className: e,
|
|
54
|
+
title: t || "Delete",
|
|
55
|
+
...n,
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ a(
|
|
58
|
+
"path",
|
|
59
|
+
{
|
|
60
|
+
className: "fa-secondary",
|
|
61
|
+
opacity: o ? "1" : "0.4",
|
|
62
|
+
d: "M32 96l0 352c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-352L32 96zm80 80c0-8.8 7.2-16 16-16s16 7.2 16 16l0 224c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-224zm96 0c0-8.8 7.2-16 16-16s16 7.2 16 16l0 224c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-224zm96 0c0-8.8 7.2-16 16-16s16 7.2 16 16l0 224c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-224z"
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ a(
|
|
66
|
+
"path",
|
|
67
|
+
{
|
|
68
|
+
className: "fa-primary",
|
|
69
|
+
d: "M163.8 0c-12.1 0-23.2 6.8-28.6 17.7L128 32 32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0-7.2-14.3C307.4 6.8 296.3 0 284.2 0L163.8 0z"
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
), tr = ({
|
|
75
|
+
className: e,
|
|
76
|
+
viewBox: r,
|
|
77
|
+
title: t,
|
|
78
|
+
monotone: o,
|
|
79
|
+
...n
|
|
80
|
+
}) => /* @__PURE__ */ h(
|
|
81
|
+
D,
|
|
82
|
+
{
|
|
83
|
+
defaultViewBox: "0 0 512 512",
|
|
84
|
+
size: "size-5",
|
|
85
|
+
viewBox: r,
|
|
86
|
+
className: e,
|
|
87
|
+
title: t || "Edit",
|
|
88
|
+
...n,
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ a(
|
|
91
|
+
"path",
|
|
92
|
+
{
|
|
93
|
+
className: "fa-secondary",
|
|
94
|
+
opacity: o ? "1" : "0.4",
|
|
95
|
+
d: "M0 160c0-53 43-96 96-96l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0c-17.7 0-32 14.3-32 32l0 256c0 17.7 14.3 32 32 32l256 0c17.7 0 32-14.3 32-32l0-96c0-17.7 14.3-32 32-32s32 14.3 32 32l0 96c0 53-43 96-96 96L96 512c-53 0-96-43-96-96L0 160z"
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
/* @__PURE__ */ a(
|
|
99
|
+
"path",
|
|
100
|
+
{
|
|
101
|
+
className: "fa-primary",
|
|
102
|
+
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"
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
), rr = ({
|
|
108
|
+
className: e,
|
|
109
|
+
viewBox: r,
|
|
110
|
+
title: t,
|
|
111
|
+
monotone: o,
|
|
112
|
+
...n
|
|
113
|
+
}) => /* @__PURE__ */ h(
|
|
114
|
+
D,
|
|
115
|
+
{
|
|
116
|
+
defaultViewBox: "0 0 512 512",
|
|
117
|
+
size: "size-5",
|
|
118
|
+
viewBox: r,
|
|
119
|
+
className: e,
|
|
120
|
+
title: t || "History",
|
|
121
|
+
...n,
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ a(
|
|
124
|
+
"path",
|
|
125
|
+
{
|
|
126
|
+
className: "fa-secondary",
|
|
127
|
+
opacity: o ? "1" : "0.4",
|
|
128
|
+
d: "M0 57.9L0 168c0 13.3 10.7 24 24 24l110.1 0c21.4 0 32.1-25.9 17-41l-30.8-30.8C155 85.5 203 64 256 64c106 0 192 86 192 192s-86 192-192 192c-40.8 0-78.6-12.7-109.7-34.4c-14.5-10.1-34.4-6.6-44.6 7.9s-6.6 34.4 7.9 44.6C151.2 495 201.7 512 256 512c141.4 0 256-114.6 256-256S397.4 0 256 0C185.3 0 121.3 28.7 75 75L41 41C25.9 25.9 0 36.6 0 57.9z"
|
|
129
|
+
}
|
|
130
|
+
),
|
|
131
|
+
/* @__PURE__ */ a(
|
|
132
|
+
"path",
|
|
133
|
+
{
|
|
134
|
+
className: "fa-primary",
|
|
135
|
+
d: "M256 128c13.3 0 24 10.7 24 24l0 94.1 65 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-17l0-104c0-13.3 10.7-24 24-24z"
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
), ar = ({
|
|
141
|
+
className: e,
|
|
142
|
+
viewBox: r,
|
|
143
|
+
title: t,
|
|
144
|
+
monotone: o,
|
|
145
|
+
...n
|
|
146
|
+
}) => /* @__PURE__ */ h(
|
|
147
|
+
D,
|
|
148
|
+
{
|
|
149
|
+
defaultViewBox: "0 0 512 512",
|
|
150
|
+
size: "size-5",
|
|
151
|
+
viewBox: r,
|
|
152
|
+
className: e,
|
|
153
|
+
title: t || "Info",
|
|
154
|
+
...n,
|
|
155
|
+
children: [
|
|
156
|
+
/* @__PURE__ */ a(
|
|
157
|
+
"path",
|
|
158
|
+
{
|
|
159
|
+
className: "fa-secondary",
|
|
160
|
+
opacity: "0.4",
|
|
161
|
+
d: "M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zm192-8c0-13.3 10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-64-24 0c-13.3 0-24-10.7-24-24zm96-88a32 32 0 1 1 -64 0 32 32 0 1 1 64 0z"
|
|
162
|
+
}
|
|
163
|
+
),
|
|
164
|
+
/* @__PURE__ */ a(
|
|
165
|
+
"path",
|
|
166
|
+
{
|
|
167
|
+
className: "fa-primary",
|
|
168
|
+
d: "M256 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM192 248c0-13.3 10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l24 0 0-64-24 0c-13.3 0-24-10.7-24-24z"
|
|
169
|
+
}
|
|
170
|
+
)
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
), or = ({
|
|
174
|
+
className: e,
|
|
175
|
+
viewBox: r,
|
|
176
|
+
title: t,
|
|
177
|
+
monotone: o,
|
|
178
|
+
...n
|
|
179
|
+
}) => /* @__PURE__ */ h(
|
|
180
|
+
D,
|
|
181
|
+
{
|
|
182
|
+
defaultViewBox: "0 0 576 512",
|
|
183
|
+
size: "size-5",
|
|
184
|
+
viewBox: r,
|
|
185
|
+
className: e,
|
|
186
|
+
title: t || "Profile",
|
|
187
|
+
...n,
|
|
188
|
+
children: [
|
|
189
|
+
/* @__PURE__ */ a(
|
|
190
|
+
"path",
|
|
191
|
+
{
|
|
192
|
+
className: "fa-secondary",
|
|
193
|
+
opacity: "0.4",
|
|
194
|
+
d: "M0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32C28.7 32 0 60.7 0 96zM64 368c0-44.2 35.8-80 80-80l64 0c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16L80 384c-8.8 0-16-7.2-16-16zM240 192a64 64 0 1 1 -128 0 64 64 0 1 1 128 0zm112-16c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16l128 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-128 0c-8.8 0-16-7.2-16-16z"
|
|
195
|
+
}
|
|
196
|
+
),
|
|
197
|
+
/* @__PURE__ */ a(
|
|
198
|
+
"path",
|
|
199
|
+
{
|
|
200
|
+
className: "fa-primary",
|
|
201
|
+
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 16l192 0c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80l-64 0z"
|
|
202
|
+
}
|
|
203
|
+
)
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
), nr = ({
|
|
207
|
+
className: e,
|
|
208
|
+
viewBox: r,
|
|
209
|
+
title: t,
|
|
210
|
+
monotone: o,
|
|
211
|
+
...n
|
|
212
|
+
}) => /* @__PURE__ */ h(
|
|
213
|
+
D,
|
|
214
|
+
{
|
|
215
|
+
defaultViewBox: "0 0 512 512",
|
|
216
|
+
size: "size-5",
|
|
217
|
+
viewBox: r,
|
|
218
|
+
className: e,
|
|
219
|
+
title: t || "Restore",
|
|
220
|
+
...n,
|
|
221
|
+
children: [
|
|
222
|
+
/* @__PURE__ */ a(
|
|
223
|
+
"path",
|
|
224
|
+
{
|
|
225
|
+
className: "fa-secondary",
|
|
226
|
+
opacity: o ? "1" : "0.4",
|
|
227
|
+
d: "M128 80l0 16 64 0 0-16c0-8.8 7.2-16 16-16l224 0c8.8 0 16 7.2 16 16l0 224c0 8.8-7.2 16-16 16l-16 0 0 64 16 0c44.2 0 80-35.8 80-80l0-224c0-44.2-35.8-80-80-80L208 0c-44.2 0-80 35.8-80 80z"
|
|
228
|
+
}
|
|
229
|
+
),
|
|
230
|
+
/* @__PURE__ */ a(
|
|
231
|
+
"path",
|
|
232
|
+
{
|
|
233
|
+
className: "fa-primary",
|
|
234
|
+
d: "M64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64L64 128zm32 64l192 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L96 256c-17.7 0-32-14.3-32-32s14.3-32 32-32z"
|
|
235
|
+
}
|
|
236
|
+
)
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
), sr = ({
|
|
240
|
+
className: e,
|
|
241
|
+
viewBox: r,
|
|
242
|
+
title: t,
|
|
243
|
+
monotone: o,
|
|
244
|
+
...n
|
|
245
|
+
}) => /* @__PURE__ */ a(
|
|
246
|
+
D,
|
|
247
|
+
{
|
|
248
|
+
defaultViewBox: "0 0 448 512",
|
|
249
|
+
size: "size-5",
|
|
250
|
+
viewBox: r,
|
|
251
|
+
className: e,
|
|
252
|
+
title: t || "Settings",
|
|
253
|
+
...n,
|
|
254
|
+
children: /* @__PURE__ */ a("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" })
|
|
255
|
+
}
|
|
256
|
+
), lr = ({
|
|
257
|
+
className: e,
|
|
258
|
+
viewBox: r,
|
|
259
|
+
title: t,
|
|
260
|
+
monotone: o,
|
|
261
|
+
...n
|
|
262
|
+
}) => /* @__PURE__ */ h(
|
|
263
|
+
D,
|
|
264
|
+
{
|
|
265
|
+
defaultViewBox: "0 0 512 512",
|
|
266
|
+
size: "size-5",
|
|
267
|
+
viewBox: r,
|
|
268
|
+
className: e,
|
|
269
|
+
title: t || "Sliders",
|
|
270
|
+
...n,
|
|
271
|
+
children: [
|
|
272
|
+
/* @__PURE__ */ a(
|
|
273
|
+
"path",
|
|
274
|
+
{
|
|
275
|
+
className: "fa-secondary",
|
|
276
|
+
opacity: o ? "1" : "0.4",
|
|
277
|
+
d: "M0 96C0 78.3 14.3 64 32 64l86.7 0c-2.1 4.9-3.8 10.1-4.9 15.4c-.6 2.7-1 5.4-1.3 8.2c-.1 1.4-.3 2.8-.3 4.2s-.1 2.8-.1 4.2c0 11.4 2.4 22.2 6.7 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l246.7 0c-2.1 4.9-3.8 10.1-4.9 15.4c-.6 2.7-1 5.4-1.3 8.2c-.1 1.4-.3 2.8-.3 4.2s-.1 2.8-.1 4.2c0 11.4 2.4 22.2 6.7 32L32 288c-17.7 0-32-14.3-32-32zM0 416c0-17.7 14.3-32 32-32l54.7 0c-2.1 4.9-3.8 10.1-4.9 15.4c-.6 2.7-1 5.4-1.3 8.2c-.1 1.4-.3 2.8-.3 4.2s-.1 2.8-.1 4.2c0 11.4 2.4 22.2 6.7 32L32 448c-17.7 0-32-14.3-32-32zm233.3-32L480 384c17.7 0 32 14.3 32 32s-14.3 32-32 32l-246.7 0c2.1-4.9 3.8-10.1 4.9-15.4c.6-2.7 1-5.4 1.3-8.2c.1-1.4 .3-2.8 .3-4.2s.1-2.8 .1-4.2c0-11.4-2.4-22.2-6.7-32zm32-320L480 64c17.7 0 32 14.3 32 32s-14.3 32-32 32l-214.7 0c2.1-4.9 3.8-10.1 4.9-15.4c.6-2.7 1-5.4 1.3-8.2c.1-1.4 .3-2.8 .3-4.2s.1-2.8 .1-4.2c0-11.4-2.4-22.2-6.7-32zm160 160l54.7 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-54.7 0c2.1-4.9 3.8-10.1 4.9-15.4c.6-2.7 1-5.4 1.3-8.2c.1-1.4 .3-2.8 .3-4.2s.1-2.8 .1-4.2c0-11.4-2.4-22.2-6.7-32z"
|
|
278
|
+
}
|
|
279
|
+
),
|
|
280
|
+
/* @__PURE__ */ a(
|
|
281
|
+
"path",
|
|
282
|
+
{
|
|
283
|
+
className: "fa-primary",
|
|
284
|
+
d: "M128 416a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm112 0A80 80 0 1 0 80 416a80 80 0 1 0 160 0zm80-160a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm112 0a80 80 0 1 0 -160 0 80 80 0 1 0 160 0zM192 128a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0-112a80 80 0 1 0 0 160 80 80 0 1 0 0-160z"
|
|
285
|
+
}
|
|
286
|
+
)
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
);
|
|
290
|
+
/*!
|
|
291
|
+
@versini/ui-panel v1.3.7
|
|
292
|
+
© 2025 gizmette.com
|
|
293
|
+
*/
|
|
294
|
+
try {
|
|
295
|
+
window.__VERSINI_UI_PANEL__ || (window.__VERSINI_UI_PANEL__ = {
|
|
296
|
+
version: "1.3.7",
|
|
297
|
+
buildTime: "01/13/2025 05:57 AM EST",
|
|
298
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
299
|
+
license: "MIT"
|
|
300
|
+
});
|
|
301
|
+
} catch {
|
|
302
|
+
}
|
|
303
|
+
const Ve = "av-messagebox", He = "av-panel", Ue = "av-button", ye = "icon", qe = "button", Ce = "link", cr = ({
|
|
304
|
+
type: e,
|
|
305
|
+
size: r,
|
|
306
|
+
labelRight: t,
|
|
307
|
+
labelLeft: o,
|
|
308
|
+
align: n
|
|
309
|
+
}) => {
|
|
310
|
+
const s = "max-h-8 py-0 px-2", l = "max-h-9 h-8 px-3", c = "max-h-12 py-2 px-4";
|
|
311
|
+
switch (e) {
|
|
312
|
+
case qe:
|
|
313
|
+
case Ce:
|
|
314
|
+
return m({
|
|
315
|
+
[s]: r === "small",
|
|
316
|
+
[l]: r === "medium",
|
|
317
|
+
[c]: r === "large"
|
|
318
|
+
});
|
|
319
|
+
case ye:
|
|
320
|
+
return m("inline-flex items-center", {
|
|
321
|
+
"justify-center": n === "center",
|
|
322
|
+
"justify-start": n === "left",
|
|
323
|
+
"justify-end": n === "right",
|
|
324
|
+
"h-6 w-6 p-0": r === "small" && !(t || o),
|
|
325
|
+
"h-6 px-2": r === "small" && (t || o),
|
|
326
|
+
"h-8 w-8 p-1": r === "medium" && !(t || o),
|
|
327
|
+
"h-8 px-3": r === "medium" && (t || o),
|
|
328
|
+
"h-12 w-12 p-2": r === "large" && !(t || o),
|
|
329
|
+
"h-12 px-4": r === "large" && (t || o)
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
}, ir = ({
|
|
333
|
+
type: e,
|
|
334
|
+
size: r,
|
|
335
|
+
labelRight: t,
|
|
336
|
+
labelLeft: o
|
|
337
|
+
}) => {
|
|
338
|
+
const n = "text-sm font-medium", s = "text-base font-medium", l = "text-lg font-medium";
|
|
339
|
+
switch (e) {
|
|
340
|
+
case qe:
|
|
341
|
+
case Ce:
|
|
342
|
+
return m({
|
|
343
|
+
"text-center": e === Ce,
|
|
344
|
+
[n]: r === "small",
|
|
345
|
+
[s]: r === "medium",
|
|
346
|
+
[l]: r === "large"
|
|
347
|
+
});
|
|
348
|
+
case ye:
|
|
349
|
+
return m({
|
|
350
|
+
[n]: r === "small" && (t || o),
|
|
351
|
+
[s]: r === "medium" && (t || o),
|
|
352
|
+
[l]: r === "large" && (t || o)
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
}, dr = ({
|
|
356
|
+
mode: e,
|
|
357
|
+
noBackground: r,
|
|
358
|
+
noTruncate: t,
|
|
359
|
+
variant: o
|
|
360
|
+
}) => {
|
|
361
|
+
if (r)
|
|
362
|
+
return "not-prose";
|
|
363
|
+
if (o === "primary")
|
|
364
|
+
return m("not-prose", {
|
|
365
|
+
truncate: !t,
|
|
366
|
+
"text-copy-light": e === "dark" || e === "system",
|
|
367
|
+
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
368
|
+
"dark:text-copy-lighter": e === "system",
|
|
369
|
+
"dark:text-copy-light": e === "alt-system"
|
|
370
|
+
});
|
|
371
|
+
if (o === "secondary")
|
|
372
|
+
return m("not-prose", {
|
|
373
|
+
truncate: !t,
|
|
374
|
+
"text-copy-light": e === "light" || e === "system",
|
|
375
|
+
"text-copy-lighter": e === "dark" || e === "alt-system",
|
|
376
|
+
"dark:text-copy-lighter": e === "alt-system",
|
|
377
|
+
"dark:text-copy-light": e === "system"
|
|
378
|
+
});
|
|
379
|
+
if (o === "danger")
|
|
380
|
+
return m("not-prose", {
|
|
381
|
+
truncate: !t,
|
|
382
|
+
"text-copy-light": e === "dark" || e === "system",
|
|
383
|
+
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
384
|
+
"dark:text-copy-lighter": e === "system",
|
|
385
|
+
"dark:text-copy-light": e === "alt-system"
|
|
386
|
+
});
|
|
387
|
+
if (o === "selected")
|
|
388
|
+
return m("not-prose text-copy-lighter", {
|
|
389
|
+
truncate: !t
|
|
390
|
+
});
|
|
391
|
+
}, mr = ({
|
|
392
|
+
mode: e,
|
|
393
|
+
noBackground: r,
|
|
394
|
+
variant: t
|
|
395
|
+
}) => {
|
|
396
|
+
if (!r) {
|
|
397
|
+
if (t === "primary")
|
|
398
|
+
return m({
|
|
399
|
+
"bg-action-dark": e === "dark",
|
|
400
|
+
"bg-action-light": e === "light",
|
|
401
|
+
"bg-action-dark dark:bg-action-light": e === "system",
|
|
402
|
+
"bg-action-light dark:bg-action-dark": e === "alt-system"
|
|
403
|
+
});
|
|
404
|
+
if (t === "secondary")
|
|
405
|
+
return m({
|
|
406
|
+
"bg-action-dark": e === "light",
|
|
407
|
+
"bg-action-light": e === "dark",
|
|
408
|
+
"bg-action-dark dark:bg-action-light": e === "alt-system",
|
|
409
|
+
"bg-action-light dark:bg-action-dark": e === "system"
|
|
410
|
+
});
|
|
411
|
+
if (t === "danger")
|
|
412
|
+
return m({
|
|
413
|
+
"bg-action-danger-dark": e === "dark",
|
|
414
|
+
"bg-action-danger-light": e === "light",
|
|
415
|
+
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
416
|
+
"bg-action-danger-light dark:bg-action-danger-dark": e === "alt-system"
|
|
417
|
+
});
|
|
418
|
+
if (t === "selected")
|
|
419
|
+
return "bg-action-selected-dark";
|
|
420
|
+
}
|
|
421
|
+
}, ur = ({
|
|
422
|
+
radius: e
|
|
423
|
+
}) => m({
|
|
424
|
+
"rounded-full": e === "large",
|
|
425
|
+
"rounded-md": e === "medium",
|
|
426
|
+
"rounded-sm": e === "small"
|
|
427
|
+
}), hr = ({
|
|
428
|
+
mode: e,
|
|
429
|
+
disabled: r,
|
|
430
|
+
variant: t
|
|
431
|
+
}) => {
|
|
432
|
+
if (r)
|
|
433
|
+
return "";
|
|
434
|
+
if (t === "primary")
|
|
435
|
+
return m("hover:text-copy-light-hover", {
|
|
436
|
+
"hover:bg-action-dark-hover": e === "dark",
|
|
437
|
+
"hover:bg-action-light-hover": e === "light",
|
|
438
|
+
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
439
|
+
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
440
|
+
});
|
|
441
|
+
if (t === "secondary")
|
|
442
|
+
return m("hover:text-copy-light-hover", {
|
|
443
|
+
"hover:bg-action-dark-hover": e === "light",
|
|
444
|
+
"hover:bg-action-light-hover": e === "dark",
|
|
445
|
+
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
446
|
+
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
447
|
+
});
|
|
448
|
+
if (t === "danger")
|
|
449
|
+
return m("hover:text-copy-light-hover", {
|
|
450
|
+
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
451
|
+
"hover:bg-action-danger-light-hover": e === "light",
|
|
452
|
+
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
453
|
+
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
454
|
+
});
|
|
455
|
+
if (t === "selected")
|
|
456
|
+
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
457
|
+
}, gr = ({
|
|
458
|
+
mode: e,
|
|
459
|
+
disabled: r,
|
|
460
|
+
variant: t
|
|
461
|
+
}) => {
|
|
462
|
+
if (r)
|
|
463
|
+
return "";
|
|
464
|
+
if (t === "primary")
|
|
465
|
+
return m("active:text-copy-light-active", {
|
|
466
|
+
"active:bg-action-dark-active": e === "dark",
|
|
467
|
+
"active:bg-action-light-active": e === "light",
|
|
468
|
+
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
469
|
+
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
470
|
+
});
|
|
471
|
+
if (t === "secondary")
|
|
472
|
+
return m("active:text-copy-light-active", {
|
|
473
|
+
"active:bg-action-dark-active": e === "light",
|
|
474
|
+
"active:bg-action-light-active": e === "dark",
|
|
475
|
+
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
476
|
+
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
477
|
+
});
|
|
478
|
+
if (t === "danger")
|
|
479
|
+
return m("active:text-copy-lighter-active", {
|
|
480
|
+
"active:bg-action-danger-dark-active": e === "dark",
|
|
481
|
+
"active:bg-action-danger-light-active": e === "light",
|
|
482
|
+
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
483
|
+
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
484
|
+
});
|
|
485
|
+
if (t === "selected")
|
|
486
|
+
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
487
|
+
}, pr = ({
|
|
488
|
+
mode: e,
|
|
489
|
+
noBorder: r,
|
|
490
|
+
variant: t
|
|
491
|
+
}) => {
|
|
492
|
+
if (r)
|
|
493
|
+
return "border border-transparent";
|
|
494
|
+
if (t === "primary")
|
|
495
|
+
return m("border", {
|
|
496
|
+
"border-border-dark": e === "dark",
|
|
497
|
+
"border-border-accent": e === "light",
|
|
498
|
+
"border-border-dark dark:border-border-accent": e === "system",
|
|
499
|
+
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
500
|
+
});
|
|
501
|
+
if (t === "secondary")
|
|
502
|
+
return m("border", {
|
|
503
|
+
"border-border-dark": e === "light",
|
|
504
|
+
"border-border-accent": e === "dark",
|
|
505
|
+
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
506
|
+
"border-border-accent dark:border-border-dark": e === "system"
|
|
507
|
+
});
|
|
508
|
+
if (t === "danger")
|
|
509
|
+
return m("border", {
|
|
510
|
+
"border-border-danger-dark": e === "dark",
|
|
511
|
+
"border-border-danger-medium": e === "light",
|
|
512
|
+
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
513
|
+
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
514
|
+
});
|
|
515
|
+
if (t === "selected")
|
|
516
|
+
return "border border-border-selected-dark";
|
|
517
|
+
}, fr = ({
|
|
518
|
+
focusMode: e
|
|
519
|
+
}) => m("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
520
|
+
"focus:outline-focus-dark": e === "dark",
|
|
521
|
+
"focus:outline-focus-light": e === "light",
|
|
522
|
+
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
523
|
+
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
524
|
+
}), Qe = ({
|
|
525
|
+
type: e,
|
|
526
|
+
className: r,
|
|
527
|
+
raw: t,
|
|
528
|
+
mode: o,
|
|
529
|
+
focusMode: n,
|
|
530
|
+
disabled: s,
|
|
531
|
+
fullWidth: l,
|
|
532
|
+
size: c,
|
|
533
|
+
noBorder: u,
|
|
534
|
+
labelRight: d,
|
|
535
|
+
labelLeft: p,
|
|
536
|
+
noBackground: k,
|
|
537
|
+
variant: g,
|
|
538
|
+
noTruncate: i,
|
|
539
|
+
align: f,
|
|
540
|
+
radius: v
|
|
541
|
+
}) => (g || (g = "primary"), t ? m(Ue, r) : m(
|
|
542
|
+
Ue,
|
|
543
|
+
dr({
|
|
544
|
+
mode: o,
|
|
545
|
+
variant: g,
|
|
546
|
+
noBackground: k,
|
|
547
|
+
noTruncate: i
|
|
548
|
+
}),
|
|
549
|
+
mr({ mode: o, noBackground: k, variant: g }),
|
|
550
|
+
ur({ radius: v }),
|
|
551
|
+
cr({
|
|
552
|
+
type: e,
|
|
553
|
+
size: c,
|
|
554
|
+
labelRight: d,
|
|
555
|
+
labelLeft: p,
|
|
556
|
+
align: f
|
|
557
|
+
}),
|
|
558
|
+
ir({ type: e, size: c, labelRight: d, labelLeft: p }),
|
|
559
|
+
pr({ mode: o, variant: g, noBorder: u }),
|
|
560
|
+
fr({ focusMode: n }),
|
|
561
|
+
hr({ mode: o, variant: g, disabled: s }),
|
|
562
|
+
gr({ mode: o, variant: g, disabled: s }),
|
|
563
|
+
{
|
|
564
|
+
"w-full": l,
|
|
565
|
+
"disabled:cursor-not-allowed disabled:opacity-50": s
|
|
566
|
+
},
|
|
567
|
+
r
|
|
568
|
+
)), br = (e, r, t) => {
|
|
569
|
+
var o;
|
|
570
|
+
!r && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((o = e == null ? void 0 : e.currentTarget) == null ? void 0 : o.focus) == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
|
|
571
|
+
}, Le = be.forwardRef((e, r) => {
|
|
572
|
+
const { onClick: t, noInternalClick: o = !1, ...n } = e;
|
|
573
|
+
return /* @__PURE__ */ a(
|
|
574
|
+
"button",
|
|
575
|
+
{
|
|
576
|
+
ref: r,
|
|
577
|
+
onClick: (s) => {
|
|
578
|
+
br(s, o, t);
|
|
579
|
+
},
|
|
580
|
+
...n
|
|
581
|
+
}
|
|
582
|
+
);
|
|
583
|
+
});
|
|
584
|
+
Le.displayName = "BaseButton";
|
|
585
|
+
const Je = be.forwardRef(
|
|
586
|
+
({
|
|
587
|
+
children: e,
|
|
588
|
+
disabled: r = !1,
|
|
589
|
+
mode: t = "system",
|
|
590
|
+
focusMode: o = "system",
|
|
591
|
+
fullWidth: n = !1,
|
|
592
|
+
className: s,
|
|
593
|
+
type: l = "button",
|
|
594
|
+
raw: c = !1,
|
|
595
|
+
noBorder: u = !1,
|
|
596
|
+
"aria-label": d,
|
|
597
|
+
label: p,
|
|
598
|
+
size: k = "medium",
|
|
599
|
+
labelRight: g,
|
|
600
|
+
labelLeft: i,
|
|
601
|
+
noBackground: f = !1,
|
|
602
|
+
align: v = "center",
|
|
603
|
+
radius: y = "large",
|
|
604
|
+
variant: x = "primary",
|
|
605
|
+
...T
|
|
606
|
+
}, b) => {
|
|
607
|
+
const E = Qe({
|
|
608
|
+
type: ye,
|
|
609
|
+
mode: t,
|
|
610
|
+
focusMode: o,
|
|
611
|
+
fullWidth: n,
|
|
612
|
+
disabled: r,
|
|
613
|
+
raw: c,
|
|
614
|
+
className: s,
|
|
615
|
+
noBorder: u,
|
|
616
|
+
size: k,
|
|
617
|
+
labelRight: g,
|
|
618
|
+
labelLeft: i,
|
|
619
|
+
noBackground: f,
|
|
620
|
+
align: v,
|
|
621
|
+
radius: y,
|
|
622
|
+
variant: x
|
|
623
|
+
}), I = m({
|
|
624
|
+
"text-copy-accent-dark": (t === "light" || t === "alt-system") && !c,
|
|
625
|
+
"text-copy-light": (t === "dark" || t === "system") && !c,
|
|
626
|
+
"dark:text-copy-light": t === "alt-system" && !c,
|
|
627
|
+
"dark:text-copy-accent-dark": t === "system" && !c
|
|
628
|
+
});
|
|
629
|
+
return /* @__PURE__ */ h(
|
|
630
|
+
Le,
|
|
631
|
+
{
|
|
632
|
+
ref: b,
|
|
633
|
+
className: E,
|
|
634
|
+
disabled: r,
|
|
635
|
+
type: l,
|
|
636
|
+
"aria-label": d || p,
|
|
637
|
+
...T,
|
|
638
|
+
children: [
|
|
639
|
+
i && /* @__PURE__ */ a("span", { className: "pr-2", children: i }),
|
|
640
|
+
/* @__PURE__ */ a("div", { className: I, children: e }),
|
|
641
|
+
g && /* @__PURE__ */ a("span", { className: "pl-2", children: g })
|
|
642
|
+
]
|
|
643
|
+
}
|
|
644
|
+
);
|
|
645
|
+
}
|
|
646
|
+
);
|
|
647
|
+
Je.displayName = "ButtonIcon";
|
|
648
|
+
/*!
|
|
649
|
+
@versini/ui-button v4.0.7
|
|
650
|
+
© 2025 gizmette.com
|
|
651
|
+
*/
|
|
652
|
+
try {
|
|
653
|
+
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
654
|
+
version: "4.0.7",
|
|
655
|
+
buildTime: "01/13/2025 05:57 AM EST",
|
|
656
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
657
|
+
license: "MIT"
|
|
658
|
+
});
|
|
659
|
+
} catch {
|
|
660
|
+
}
|
|
661
|
+
const yr = be.forwardRef(
|
|
662
|
+
({
|
|
663
|
+
children: e,
|
|
664
|
+
disabled: r = !1,
|
|
665
|
+
mode: t = "system",
|
|
666
|
+
focusMode: o = "system",
|
|
667
|
+
fullWidth: n = !1,
|
|
668
|
+
className: s,
|
|
669
|
+
type: l = "button",
|
|
670
|
+
raw: c = !1,
|
|
671
|
+
noBorder: u = !1,
|
|
672
|
+
"aria-label": d,
|
|
673
|
+
label: p,
|
|
674
|
+
size: k = "medium",
|
|
675
|
+
labelRight: g,
|
|
676
|
+
labelLeft: i,
|
|
677
|
+
noBackground: f = !1,
|
|
678
|
+
align: v = "center",
|
|
679
|
+
active: y = !1,
|
|
680
|
+
radius: x = "large",
|
|
681
|
+
...T
|
|
682
|
+
}, b) => {
|
|
683
|
+
const E = Qe({
|
|
684
|
+
type: ye,
|
|
685
|
+
mode: t,
|
|
686
|
+
focusMode: o,
|
|
687
|
+
fullWidth: n,
|
|
688
|
+
disabled: r,
|
|
689
|
+
raw: c,
|
|
690
|
+
className: s,
|
|
691
|
+
noBorder: u,
|
|
692
|
+
size: k,
|
|
693
|
+
labelRight: g,
|
|
694
|
+
labelLeft: i,
|
|
695
|
+
noBackground: f,
|
|
696
|
+
align: v,
|
|
697
|
+
radius: x
|
|
698
|
+
}), I = m({
|
|
699
|
+
"text-copy-accent-dark": t === "light" && !c,
|
|
700
|
+
"text-copy-light": t === "dark" && !c,
|
|
701
|
+
"text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !c,
|
|
702
|
+
"text-copy-light dark:text-copy-accent-dark": t === "system" && !c
|
|
703
|
+
}), H = y ? m(
|
|
704
|
+
"relative",
|
|
705
|
+
"focus-within:static",
|
|
706
|
+
"focus-within:after:border-transparent",
|
|
707
|
+
"after:absolute",
|
|
708
|
+
"after:content-['']",
|
|
709
|
+
"after:border-b-2",
|
|
710
|
+
"after:bottom-[-4px]",
|
|
711
|
+
"after:left-0",
|
|
712
|
+
"after:right-0",
|
|
713
|
+
{
|
|
714
|
+
"after:border-table-dark": t === "dark",
|
|
715
|
+
"after:border-table-light": t === "light",
|
|
716
|
+
"after:border-table-dark dark:after:border-table-light": t === "system",
|
|
717
|
+
"after:border-table-light dark:after:border-table-dark": t === "alt-system"
|
|
718
|
+
}
|
|
719
|
+
) : "";
|
|
720
|
+
return /* @__PURE__ */ a("div", { className: H, children: /* @__PURE__ */ h(
|
|
721
|
+
Le,
|
|
722
|
+
{
|
|
723
|
+
ref: b,
|
|
724
|
+
className: E,
|
|
725
|
+
disabled: r,
|
|
726
|
+
type: l,
|
|
727
|
+
"aria-label": d || p,
|
|
728
|
+
...T,
|
|
729
|
+
children: [
|
|
730
|
+
i && /* @__PURE__ */ a("span", { className: "pr-2", children: i }),
|
|
731
|
+
/* @__PURE__ */ a("div", { className: I, children: e }),
|
|
732
|
+
g && /* @__PURE__ */ a("span", { className: "pl-2", children: g })
|
|
733
|
+
]
|
|
734
|
+
}
|
|
735
|
+
) });
|
|
736
|
+
}
|
|
737
|
+
);
|
|
738
|
+
yr.displayName = "ButtonSort";
|
|
739
|
+
const kr = ({
|
|
740
|
+
children: e,
|
|
741
|
+
fill: r,
|
|
742
|
+
viewBox: t,
|
|
743
|
+
className: o,
|
|
744
|
+
defaultViewBox: n,
|
|
745
|
+
size: s,
|
|
746
|
+
title: l,
|
|
747
|
+
semantic: c = !1,
|
|
748
|
+
...u
|
|
749
|
+
}) => {
|
|
750
|
+
const d = m(s, o);
|
|
751
|
+
return /* @__PURE__ */ h(M, { children: [
|
|
752
|
+
/* @__PURE__ */ a(
|
|
753
|
+
"svg",
|
|
754
|
+
{
|
|
755
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
756
|
+
className: d,
|
|
757
|
+
viewBox: t || n,
|
|
758
|
+
fill: r || "currentColor",
|
|
759
|
+
role: "img",
|
|
760
|
+
"aria-hidden": !c,
|
|
761
|
+
focusable: !1,
|
|
762
|
+
...u,
|
|
763
|
+
children: e
|
|
764
|
+
}
|
|
765
|
+
),
|
|
766
|
+
l && c && /* @__PURE__ */ a("span", { className: "sr-only", children: l })
|
|
767
|
+
] });
|
|
768
|
+
};
|
|
769
|
+
/*!
|
|
770
|
+
@versini/ui-svgicon v4.0.1
|
|
771
|
+
© 2025 gizmette.com
|
|
772
|
+
*/
|
|
773
|
+
try {
|
|
774
|
+
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
775
|
+
version: "4.0.1",
|
|
776
|
+
buildTime: "01/13/2025 05:57 AM EST",
|
|
777
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
778
|
+
license: "MIT"
|
|
779
|
+
});
|
|
780
|
+
} catch {
|
|
781
|
+
}
|
|
782
|
+
const vr = ({
|
|
783
|
+
className: e,
|
|
784
|
+
viewBox: r,
|
|
785
|
+
title: t,
|
|
786
|
+
monotone: o,
|
|
787
|
+
...n
|
|
788
|
+
}) => /* @__PURE__ */ a(
|
|
789
|
+
kr,
|
|
790
|
+
{
|
|
791
|
+
defaultViewBox: "0 0 384 512",
|
|
792
|
+
size: "size-5",
|
|
793
|
+
viewBox: r,
|
|
794
|
+
className: e,
|
|
795
|
+
title: t || "Close",
|
|
796
|
+
...n,
|
|
797
|
+
children: /* @__PURE__ */ a("path", { d: "M345 137c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-119 119L73 103c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l119 119L39 375c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l119-119L311 409c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-119-119L345 137z" })
|
|
798
|
+
}
|
|
799
|
+
);
|
|
800
|
+
/*!
|
|
801
|
+
@versini/ui-icons v4.4.0
|
|
802
|
+
© 2025 gizmette.com
|
|
803
|
+
*/
|
|
804
|
+
try {
|
|
805
|
+
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
806
|
+
version: "4.4.0",
|
|
807
|
+
buildTime: "01/13/2025 05:57 AM EST",
|
|
808
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
809
|
+
license: "MIT"
|
|
810
|
+
});
|
|
811
|
+
} catch {
|
|
812
|
+
}
|
|
813
|
+
const Ze = S.createContext(null);
|
|
814
|
+
function xr({
|
|
815
|
+
initialOpen: e = !1,
|
|
816
|
+
open: r,
|
|
817
|
+
onOpenChange: t
|
|
818
|
+
} = {}) {
|
|
819
|
+
const [o, n] = S.useState(e), [s, l] = S.useState(), [c, u] = S.useState(), d = r ?? o, p = t ?? n, k = Kt({
|
|
820
|
+
open: d,
|
|
821
|
+
onOpenChange: p
|
|
822
|
+
}), g = k.context, i = Xt(g, {
|
|
823
|
+
enabled: r == null
|
|
824
|
+
}), f = qt(g, {
|
|
825
|
+
outsidePress: !1,
|
|
826
|
+
outsidePressEvent: "mousedown"
|
|
827
|
+
}), v = Qt(g), y = Jt([i, f, v]);
|
|
828
|
+
return S.useMemo(
|
|
829
|
+
() => ({
|
|
830
|
+
open: d,
|
|
831
|
+
setOpen: p,
|
|
832
|
+
...y,
|
|
833
|
+
...k,
|
|
834
|
+
labelId: s,
|
|
835
|
+
descriptionId: c,
|
|
836
|
+
setLabelId: l,
|
|
837
|
+
setDescriptionId: u
|
|
838
|
+
}),
|
|
839
|
+
[d, p, y, k, s, c]
|
|
840
|
+
);
|
|
841
|
+
}
|
|
842
|
+
const ke = () => {
|
|
843
|
+
const e = S.useContext(Ze);
|
|
844
|
+
if (e == null)
|
|
845
|
+
throw new Error("Modal components must be wrapped in <Modal />");
|
|
846
|
+
return e;
|
|
847
|
+
};
|
|
848
|
+
function Nr({
|
|
849
|
+
children: e,
|
|
850
|
+
...r
|
|
851
|
+
}) {
|
|
852
|
+
const t = xr(r);
|
|
853
|
+
return /* @__PURE__ */ a(Ze.Provider, { value: t, children: e });
|
|
854
|
+
}
|
|
855
|
+
const wr = S.forwardRef(function(e, r) {
|
|
856
|
+
const { context: t, ...o } = ke(), n = Gt([o.refs.setFloating, r]);
|
|
857
|
+
if (!t.open)
|
|
858
|
+
return null;
|
|
859
|
+
const { overlayBackground: s, ...l } = e, c = m("grid place-items-center", {
|
|
860
|
+
[`${s}`]: s,
|
|
861
|
+
"bg-black sm:bg-black/[.8]": !s
|
|
862
|
+
});
|
|
863
|
+
return /* @__PURE__ */ a(jt, { children: /* @__PURE__ */ a(Wt, { className: c, lockScroll: !0, children: /* @__PURE__ */ a(Yt, { context: t, children: /* @__PURE__ */ a(
|
|
864
|
+
"div",
|
|
865
|
+
{
|
|
866
|
+
ref: n,
|
|
867
|
+
"aria-labelledby": o.labelId,
|
|
868
|
+
"aria-describedby": o.descriptionId,
|
|
869
|
+
...o.getFloatingProps(l),
|
|
870
|
+
children: l.children
|
|
871
|
+
}
|
|
872
|
+
) }) }) });
|
|
873
|
+
}), Er = S.forwardRef(function({ children: e, ...r }, t) {
|
|
874
|
+
const { setLabelId: o } = ke(), n = Se();
|
|
875
|
+
return S.useLayoutEffect(() => (o(n), () => o(void 0)), [n, o]), /* @__PURE__ */ a("h1", { ...r, ref: t, id: n, children: e });
|
|
876
|
+
}), Cr = S.forwardRef(function({ children: e, ...r }, t) {
|
|
877
|
+
const { setDescriptionId: o } = ke(), n = Se();
|
|
878
|
+
return S.useLayoutEffect(() => (o(n), () => o(void 0)), [n, o]), /* @__PURE__ */ a("div", { ...r, ref: t, id: n, children: e });
|
|
879
|
+
}), Tr = S.forwardRef(function(e, r) {
|
|
880
|
+
const { setOpen: t } = ke(), { trigger: o, className: n, ...s } = e, l = S.useCallback(() => t(!1), [t]);
|
|
881
|
+
return /* @__PURE__ */ a("div", { className: n, children: S.cloneElement(o, {
|
|
882
|
+
ref: r,
|
|
883
|
+
onClick: l,
|
|
884
|
+
...s
|
|
885
|
+
}) });
|
|
886
|
+
});
|
|
887
|
+
/*!
|
|
888
|
+
@versini/ui-modal v1.2.1
|
|
889
|
+
© 2025 gizmette.com
|
|
890
|
+
*/
|
|
891
|
+
try {
|
|
892
|
+
window.__VERSINI_UI_MODAL__ || (window.__VERSINI_UI_MODAL__ = {
|
|
893
|
+
version: "1.2.1",
|
|
894
|
+
buildTime: "01/13/2025 05:57 AM EST",
|
|
895
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
896
|
+
license: "MIT"
|
|
897
|
+
});
|
|
898
|
+
} catch {
|
|
899
|
+
}
|
|
900
|
+
const se = "panel", me = "messagebox", _r = ({
|
|
901
|
+
className: e,
|
|
902
|
+
kind: r,
|
|
903
|
+
borderMode: t
|
|
904
|
+
}) => ({
|
|
905
|
+
main: m("prose prose-lighter flex flex-col bg-surface-medium", {
|
|
906
|
+
[`${He} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: r === se,
|
|
907
|
+
[`${He} w-full sm:w-[95%] md:max-w-2xl`]: r === se && !e,
|
|
908
|
+
[`${Ve} rounded-lg border-2`]: r === me,
|
|
909
|
+
[`${Ve} w-[95%] sm:w-[50%] md:max-w-2xl`]: r === me && !e,
|
|
910
|
+
[`${e}`]: !!e,
|
|
911
|
+
"sm:border-border-dark": t === "dark" && r === se,
|
|
912
|
+
"sm:border-border-accent": t === "light" && r === se,
|
|
913
|
+
"border-border-dark": t === "dark" && r === me,
|
|
914
|
+
"border-border-accent": t === "light" && r === me
|
|
915
|
+
}),
|
|
916
|
+
content: "flex flex-col py-2 sm:py-4 sm:px-4 px-2 overflow-y-auto",
|
|
917
|
+
footer: "flex flex-grow flex-col sm:p-4 p-2",
|
|
918
|
+
header: "sm:p-4 mb-0 p-2",
|
|
919
|
+
close: "sm:p-4 p-2"
|
|
920
|
+
}), J = ({
|
|
921
|
+
open: e,
|
|
922
|
+
onOpenChange: r,
|
|
923
|
+
title: t,
|
|
924
|
+
children: o,
|
|
925
|
+
footer: n,
|
|
926
|
+
borderMode: s = "light",
|
|
927
|
+
kind: l = se,
|
|
928
|
+
className: c
|
|
929
|
+
}) => {
|
|
930
|
+
const u = _(""), d = _r({ className: c, kind: l, borderMode: s });
|
|
931
|
+
return V(() => (e && (u.current = document.title, document.title = `${t} | ${u.current}`), () => {
|
|
932
|
+
e && (document.title = u.current);
|
|
933
|
+
}), [t, e]), /* @__PURE__ */ a(M, { children: e && /* @__PURE__ */ a(Nr, { open: e, onOpenChange: r, children: /* @__PURE__ */ h(wr, { className: d.main, children: [
|
|
934
|
+
/* @__PURE__ */ h("div", { className: "flex flex-row-reverse items-center justify-between", children: [
|
|
935
|
+
/* @__PURE__ */ a(
|
|
936
|
+
Tr,
|
|
937
|
+
{
|
|
938
|
+
className: d.close,
|
|
939
|
+
trigger: /* @__PURE__ */ a(
|
|
940
|
+
Je,
|
|
941
|
+
{
|
|
942
|
+
mode: "dark",
|
|
943
|
+
focusMode: "light",
|
|
944
|
+
noBorder: !0,
|
|
945
|
+
label: "Close",
|
|
946
|
+
children: /* @__PURE__ */ a(vr, {})
|
|
947
|
+
}
|
|
948
|
+
)
|
|
949
|
+
}
|
|
950
|
+
),
|
|
951
|
+
/* @__PURE__ */ a(Er, { className: d.header, children: t })
|
|
952
|
+
] }),
|
|
953
|
+
/* @__PURE__ */ a(Cr, { className: d.content, children: o }),
|
|
954
|
+
n && /* @__PURE__ */ a("div", { className: d.footer, children: n })
|
|
955
|
+
] }) }) });
|
|
956
|
+
}, Ir = () => {
|
|
957
|
+
const { getAccessToken: e } = G(), r = pe(), t = pe(), {
|
|
958
|
+
data: o,
|
|
959
|
+
error: n,
|
|
960
|
+
isLoading: s
|
|
961
|
+
} = Lt({
|
|
962
|
+
getAccessToken: e
|
|
963
|
+
}), l = (o == null ? void 0 : o.plugins) || [], c = (o == null ? void 0 : o.version) || "", u = (o == null ? void 0 : o.models) || [];
|
|
964
|
+
return /* @__PURE__ */ h(M, { children: [
|
|
965
|
+
/* @__PURE__ */ a("div", { className: "mb-4", children: /* @__PURE__ */ a(
|
|
966
|
+
$,
|
|
967
|
+
{
|
|
968
|
+
header: C.ABOUT.TITLE_CLIENT,
|
|
969
|
+
className: "prose-dark dark:prose-lighter",
|
|
970
|
+
children: he(r, {
|
|
971
|
+
[C.ABOUT.VERSION]: "5.20.1",
|
|
972
|
+
[C.ABOUT.BUILD_TIMESTAMP]: "01/13/2025 11:30 AM EST"
|
|
973
|
+
})
|
|
974
|
+
}
|
|
975
|
+
) }),
|
|
976
|
+
n || s ? null : /* @__PURE__ */ a(
|
|
977
|
+
$,
|
|
978
|
+
{
|
|
979
|
+
header: C.ABOUT.TITLE_SERVER,
|
|
980
|
+
className: "prose-dark dark:prose-lighter",
|
|
981
|
+
children: he(t, {
|
|
982
|
+
[C.ABOUT.VERSION]: c,
|
|
983
|
+
[ge(C.ABOUT.ENGINE, u.length)]: /* @__PURE__ */ a(M, { children: u.map((d) => /* @__PURE__ */ a("div", { className: "text-right", children: d }, d)) }),
|
|
984
|
+
[ge(C.ABOUT.PLUGIN, l.length)]: /* @__PURE__ */ a(M, { children: l.map((d) => /* @__PURE__ */ a("div", { className: "text-right", children: d }, d)) })
|
|
985
|
+
})
|
|
986
|
+
}
|
|
987
|
+
)
|
|
988
|
+
] });
|
|
989
|
+
}, Sr = ({
|
|
990
|
+
open: e,
|
|
991
|
+
onOpenChange: r
|
|
992
|
+
}) => /* @__PURE__ */ a(J, { open: e, onOpenChange: r, title: ht, children: /* @__PURE__ */ a(Ir, {}) }), et = ({
|
|
993
|
+
showConfirmation: e,
|
|
994
|
+
setShowConfirmation: r,
|
|
995
|
+
action: t,
|
|
996
|
+
children: o,
|
|
997
|
+
customStrings: n
|
|
998
|
+
}) => /* @__PURE__ */ a(
|
|
999
|
+
J,
|
|
1000
|
+
{
|
|
1001
|
+
kind: "messagebox",
|
|
1002
|
+
open: e,
|
|
1003
|
+
onOpenChange: r,
|
|
1004
|
+
title: n.title,
|
|
1005
|
+
footer: /* @__PURE__ */ h(X, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
|
1006
|
+
/* @__PURE__ */ a(A, { children: /* @__PURE__ */ a(
|
|
1007
|
+
F,
|
|
1008
|
+
{
|
|
1009
|
+
mode: "dark",
|
|
1010
|
+
variant: "secondary",
|
|
1011
|
+
focusMode: "light",
|
|
1012
|
+
onClick: () => {
|
|
1013
|
+
r(!1);
|
|
1014
|
+
},
|
|
1015
|
+
children: n.cancelAction
|
|
1016
|
+
}
|
|
1017
|
+
) }),
|
|
1018
|
+
/* @__PURE__ */ a(A, { children: /* @__PURE__ */ a(
|
|
1019
|
+
F,
|
|
1020
|
+
{
|
|
1021
|
+
mode: "dark",
|
|
1022
|
+
variant: "danger",
|
|
1023
|
+
focusMode: "light",
|
|
1024
|
+
onClick: () => {
|
|
1025
|
+
r(!1), t();
|
|
1026
|
+
},
|
|
1027
|
+
children: n.confirmAction
|
|
1028
|
+
}
|
|
1029
|
+
) })
|
|
1030
|
+
] }),
|
|
1031
|
+
children: o
|
|
1032
|
+
}
|
|
1033
|
+
), Lr = async (e, r, t, o) => {
|
|
1034
|
+
try {
|
|
1035
|
+
const n = await ce({
|
|
1036
|
+
accessToken: o,
|
|
1037
|
+
type: ie.GET_CHAT,
|
|
1038
|
+
params: {
|
|
1039
|
+
id: e.id
|
|
1040
|
+
}
|
|
1041
|
+
});
|
|
1042
|
+
n.status === 200 && (r({
|
|
1043
|
+
type: pt
|
|
1044
|
+
}), r({
|
|
1045
|
+
type: ft,
|
|
1046
|
+
payload: {
|
|
1047
|
+
id: e.id,
|
|
1048
|
+
model: n.data.model,
|
|
1049
|
+
usage: n.data.usage,
|
|
1050
|
+
messages: n.data.messages
|
|
1051
|
+
}
|
|
1052
|
+
}), t(!1));
|
|
1053
|
+
} catch {
|
|
1054
|
+
}
|
|
1055
|
+
}, Ar = ({
|
|
1056
|
+
filteredHistory: e,
|
|
1057
|
+
dispatch: r,
|
|
1058
|
+
onOpenChange: t,
|
|
1059
|
+
mutate: o
|
|
1060
|
+
}) => {
|
|
1061
|
+
var T;
|
|
1062
|
+
const { user: n, getAccessToken: s } = G(), l = _(null), c = _({
|
|
1063
|
+
id: 0,
|
|
1064
|
+
timestamp: "",
|
|
1065
|
+
message: ""
|
|
1066
|
+
}), [u, d] = w(!1), [p, k] = w(
|
|
1067
|
+
Be + Oe
|
|
1068
|
+
), { state: g, dispatch: i } = fe(je), [, f] = Ie({
|
|
1069
|
+
key: _e + gt,
|
|
1070
|
+
initialValue: g.sortDirection
|
|
1071
|
+
}), v = (b) => {
|
|
1072
|
+
switch (g.sortDirection) {
|
|
1073
|
+
case ae.ASC:
|
|
1074
|
+
f(ae.DESC), i({
|
|
1075
|
+
type: Pe,
|
|
1076
|
+
payload: {
|
|
1077
|
+
sortedCell: b,
|
|
1078
|
+
sortDirection: ae.DESC
|
|
1079
|
+
}
|
|
1080
|
+
});
|
|
1081
|
+
break;
|
|
1082
|
+
default:
|
|
1083
|
+
f(ae.ASC), i({
|
|
1084
|
+
type: Pe,
|
|
1085
|
+
payload: {
|
|
1086
|
+
sortedCell: b,
|
|
1087
|
+
sortDirection: ae.ASC
|
|
1088
|
+
}
|
|
1089
|
+
});
|
|
1090
|
+
break;
|
|
1091
|
+
}
|
|
1092
|
+
}, y = async () => {
|
|
1093
|
+
const b = c.current;
|
|
1094
|
+
try {
|
|
1095
|
+
await ce({
|
|
1096
|
+
accessToken: await s(),
|
|
1097
|
+
type: ie.DELETE_CHAT,
|
|
1098
|
+
params: {
|
|
1099
|
+
userId: (n == null ? void 0 : n.username) || "",
|
|
1100
|
+
id: b.id
|
|
1101
|
+
}
|
|
1102
|
+
}), o();
|
|
1103
|
+
} catch {
|
|
1104
|
+
}
|
|
1105
|
+
}, x = Ke((b) => {
|
|
1106
|
+
b[0].isIntersecting && k((I) => I + Be);
|
|
1107
|
+
}, []);
|
|
1108
|
+
return V(() => {
|
|
1109
|
+
const b = {
|
|
1110
|
+
// root: null,
|
|
1111
|
+
rootMargin: "20px"
|
|
1112
|
+
}, E = new IntersectionObserver(x, b);
|
|
1113
|
+
l.current && E.observe(l.current);
|
|
1114
|
+
}), /* @__PURE__ */ h(M, { children: [
|
|
1115
|
+
/* @__PURE__ */ h(
|
|
1116
|
+
et,
|
|
1117
|
+
{
|
|
1118
|
+
showConfirmation: u,
|
|
1119
|
+
setShowConfirmation: d,
|
|
1120
|
+
action: y,
|
|
1121
|
+
customStrings: {
|
|
1122
|
+
confirmAction: "Delete",
|
|
1123
|
+
cancelAction: "Cancel",
|
|
1124
|
+
title: "Delete chat"
|
|
1125
|
+
},
|
|
1126
|
+
children: [
|
|
1127
|
+
/* @__PURE__ */ a("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
|
|
1128
|
+
/* @__PURE__ */ h("ul", { className: "m-0", children: [
|
|
1129
|
+
/* @__PURE__ */ h("li", { children: [
|
|
1130
|
+
"Timestamp:",
|
|
1131
|
+
" ",
|
|
1132
|
+
/* @__PURE__ */ a("span", { className: "text-lg", children: c.current && c.current.timestamp })
|
|
1133
|
+
] }),
|
|
1134
|
+
/* @__PURE__ */ h("li", { children: [
|
|
1135
|
+
"First message:",
|
|
1136
|
+
" ",
|
|
1137
|
+
/* @__PURE__ */ a("span", { className: "text-lg", children: (T = c.current) == null ? void 0 : T.message })
|
|
1138
|
+
] })
|
|
1139
|
+
] })
|
|
1140
|
+
]
|
|
1141
|
+
}
|
|
1142
|
+
),
|
|
1143
|
+
/* @__PURE__ */ h(At, { stickyHeader: !0, stickyFooter: !0, compact: !0, children: [
|
|
1144
|
+
/* @__PURE__ */ a(Rt, { children: /* @__PURE__ */ h(Ne, { children: [
|
|
1145
|
+
/* @__PURE__ */ a(P, { className: "sr-only", children: "Row" }),
|
|
1146
|
+
/* @__PURE__ */ a(
|
|
1147
|
+
zt,
|
|
1148
|
+
{
|
|
1149
|
+
buttonClassName: "text-xs sm:text-sm",
|
|
1150
|
+
cellId: "timestamp",
|
|
1151
|
+
align: "left",
|
|
1152
|
+
sortDirection: g.sortDirection,
|
|
1153
|
+
sortedCell: g.sortedCell,
|
|
1154
|
+
onClick: () => {
|
|
1155
|
+
v("timestamp");
|
|
1156
|
+
},
|
|
1157
|
+
children: "Date"
|
|
1158
|
+
}
|
|
1159
|
+
),
|
|
1160
|
+
/* @__PURE__ */ a(P, { className: "text-xs sm:text-sm", children: "First message" }),
|
|
1161
|
+
/* @__PURE__ */ a(P, { className: "text-xs sm:text-sm", children: "Model" }),
|
|
1162
|
+
/* @__PURE__ */ a(P, { className: "text-xs sm:text-sm text-right", children: "Actions" })
|
|
1163
|
+
] }) }),
|
|
1164
|
+
/* @__PURE__ */ a(Mt, { children: e.slice(0, p).map((b, E) => {
|
|
1165
|
+
var I, H;
|
|
1166
|
+
return ((I = b == null ? void 0 : b.messages) == null ? void 0 : I.length) > 0 ? /* @__PURE__ */ h(Ut, { children: [
|
|
1167
|
+
E === p - Oe && /* @__PURE__ */ a("tr", { ref: l }),
|
|
1168
|
+
/* @__PURE__ */ h(Ne, { children: [
|
|
1169
|
+
/* @__PURE__ */ a(P, { children: E + 1 }),
|
|
1170
|
+
/* @__PURE__ */ a(
|
|
1171
|
+
P,
|
|
1172
|
+
{
|
|
1173
|
+
component: "th",
|
|
1174
|
+
scope: "row",
|
|
1175
|
+
className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
|
|
1176
|
+
children: b.timestamp.split(",")[0]
|
|
1177
|
+
}
|
|
1178
|
+
),
|
|
1179
|
+
/* @__PURE__ */ a(
|
|
1180
|
+
P,
|
|
1181
|
+
{
|
|
1182
|
+
className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
|
|
1183
|
+
style: {
|
|
1184
|
+
wordBreak: "break-word"
|
|
1185
|
+
},
|
|
1186
|
+
children: b.messages.length > 0 ? (H = b.messages[0]) == null ? void 0 : H.content : ""
|
|
1187
|
+
}
|
|
1188
|
+
),
|
|
1189
|
+
/* @__PURE__ */ h(
|
|
1190
|
+
P,
|
|
1191
|
+
{
|
|
1192
|
+
component: "th",
|
|
1193
|
+
scope: "row",
|
|
1194
|
+
className: "text-gray-400",
|
|
1195
|
+
align: "center",
|
|
1196
|
+
children: [
|
|
1197
|
+
b.model && b.model.startsWith("claude") && /* @__PURE__ */ a(Bt, { size: "size-4 sm:size-5" }),
|
|
1198
|
+
b.model && b.model.startsWith("gpt") && /* @__PURE__ */ a(Ot, { size: "size-4 sm:size-5" })
|
|
1199
|
+
]
|
|
1200
|
+
}
|
|
1201
|
+
),
|
|
1202
|
+
/* @__PURE__ */ h(P, { align: "right", children: [
|
|
1203
|
+
/* @__PURE__ */ a(
|
|
1204
|
+
le,
|
|
1205
|
+
{
|
|
1206
|
+
className: "mr-2",
|
|
1207
|
+
focusMode: "alt-system",
|
|
1208
|
+
noBorder: !0,
|
|
1209
|
+
label: "Restore chat",
|
|
1210
|
+
onClick: async () => {
|
|
1211
|
+
const B = await s();
|
|
1212
|
+
Lr(
|
|
1213
|
+
b,
|
|
1214
|
+
r,
|
|
1215
|
+
t,
|
|
1216
|
+
B
|
|
1217
|
+
);
|
|
1218
|
+
},
|
|
1219
|
+
children: /* @__PURE__ */ a(nr, { size: "size-3", monotone: !0 })
|
|
1220
|
+
}
|
|
1221
|
+
),
|
|
1222
|
+
/* @__PURE__ */ a(
|
|
1223
|
+
le,
|
|
1224
|
+
{
|
|
1225
|
+
focusMode: "alt-system",
|
|
1226
|
+
noBorder: !0,
|
|
1227
|
+
label: "Delete chat",
|
|
1228
|
+
onClick: () => {
|
|
1229
|
+
var B;
|
|
1230
|
+
c.current = {
|
|
1231
|
+
id: b.id,
|
|
1232
|
+
timestamp: b.timestamp,
|
|
1233
|
+
message: b.messages.length > 0 ? (B = b.messages[0]) == null ? void 0 : B.content : ""
|
|
1234
|
+
}, d(!u);
|
|
1235
|
+
},
|
|
1236
|
+
children: /* @__PURE__ */ a("div", { className: "text-red-400", children: /* @__PURE__ */ a(er, { size: "size-3", monotone: !0 }) })
|
|
1237
|
+
}
|
|
1238
|
+
)
|
|
1239
|
+
] })
|
|
1240
|
+
] })
|
|
1241
|
+
] }, `${C.HISTORY.TITLE}-${b.id}-${E}`) : null;
|
|
1242
|
+
}) }),
|
|
1243
|
+
/* @__PURE__ */ a(Pt, { children: /* @__PURE__ */ a(Ne, { children: /* @__PURE__ */ a(P, { colSpan: 1e3, children: /* @__PURE__ */ a("div", { children: ge(
|
|
1244
|
+
`${e.length} chat`,
|
|
1245
|
+
e.length
|
|
1246
|
+
) }) }) }) })
|
|
1247
|
+
] })
|
|
1248
|
+
] });
|
|
1249
|
+
}, Rr = ({
|
|
1250
|
+
open: e,
|
|
1251
|
+
onOpenChange: r
|
|
1252
|
+
}) => {
|
|
1253
|
+
const { getAccessToken: t, user: o } = G(), { dispatch: n } = fe(We), { state: s, dispatch: l } = fe(je), { data: c, mutate: u } = $t({
|
|
1254
|
+
keys: [
|
|
1255
|
+
o == null ? void 0 : o.username,
|
|
1256
|
+
s.searchString,
|
|
1257
|
+
s.sortDirection
|
|
1258
|
+
],
|
|
1259
|
+
getAccessToken: t
|
|
1260
|
+
}), d = _(null), [, p] = Ie({
|
|
1261
|
+
key: _e + bt,
|
|
1262
|
+
initialValue: s.searchString
|
|
1263
|
+
}), [k, g] = w([]);
|
|
1264
|
+
V(() => {
|
|
1265
|
+
c && g(c);
|
|
1266
|
+
}, [c]);
|
|
1267
|
+
const i = async (y) => {
|
|
1268
|
+
p(y), l({
|
|
1269
|
+
type: kt,
|
|
1270
|
+
payload: { searchString: y }
|
|
1271
|
+
});
|
|
1272
|
+
}, f = vt((y) => {
|
|
1273
|
+
i(y.target.value.trim());
|
|
1274
|
+
}, 500);
|
|
1275
|
+
return /* @__PURE__ */ a(J, { open: e, onOpenChange: r, title: yt, children: /* @__PURE__ */ h(M, { children: [
|
|
1276
|
+
/* @__PURE__ */ a("form", { autoComplete: "off", onSubmit: async (y) => {
|
|
1277
|
+
y.preventDefault();
|
|
1278
|
+
}, children: /* @__PURE__ */ a(
|
|
1279
|
+
Ee,
|
|
1280
|
+
{
|
|
1281
|
+
autoCapitalize: "off",
|
|
1282
|
+
autoComplete: "off",
|
|
1283
|
+
autoCorrect: "off",
|
|
1284
|
+
ref: d,
|
|
1285
|
+
defaultValue: s.searchString,
|
|
1286
|
+
focusMode: "light",
|
|
1287
|
+
mode: "dark",
|
|
1288
|
+
name: "Search",
|
|
1289
|
+
label: "Search",
|
|
1290
|
+
onChange: f,
|
|
1291
|
+
className: "mt-2 mb-2",
|
|
1292
|
+
...s.searchString && {
|
|
1293
|
+
rightElement: /* @__PURE__ */ a(
|
|
1294
|
+
F,
|
|
1295
|
+
{
|
|
1296
|
+
type: "button",
|
|
1297
|
+
disabled: !s.searchString,
|
|
1298
|
+
mode: "light",
|
|
1299
|
+
focusMode: "light",
|
|
1300
|
+
noBorder: !0,
|
|
1301
|
+
size: "small",
|
|
1302
|
+
onClick: () => {
|
|
1303
|
+
var y;
|
|
1304
|
+
i(""), (y = d.current) != null && y.value && (d.current.value = "", d.current.focus());
|
|
1305
|
+
},
|
|
1306
|
+
children: "Reset"
|
|
1307
|
+
}
|
|
1308
|
+
)
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
) }),
|
|
1312
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col gap-2 sm:flex-row max-h-[60vh] min-h-[60vh]", children: /* @__PURE__ */ a(
|
|
1313
|
+
Ar,
|
|
1314
|
+
{
|
|
1315
|
+
mutate: u,
|
|
1316
|
+
filteredHistory: k,
|
|
1317
|
+
dispatch: n,
|
|
1318
|
+
onOpenChange: r
|
|
1319
|
+
}
|
|
1320
|
+
) })
|
|
1321
|
+
] }) });
|
|
1322
|
+
}, zr = ({ stats: e }) => {
|
|
1323
|
+
const { isAuthenticated: r, user: t, registeringForPasskey: o, authenticationType: n } = G(), s = pe(), l = pe(), c = (t == null ? void 0 : t.username) || "";
|
|
1324
|
+
return r && c ? /* @__PURE__ */ h(M, { children: [
|
|
1325
|
+
/* @__PURE__ */ a(
|
|
1326
|
+
$,
|
|
1327
|
+
{
|
|
1328
|
+
header: C.PREFERENCES.TITLE,
|
|
1329
|
+
className: "prose-dark dark:prose-lighter",
|
|
1330
|
+
children: he(s, {
|
|
1331
|
+
[C.PREFERENCES.NAME]: c,
|
|
1332
|
+
[C.PREFERENCES.EMAIL]: (t == null ? void 0 : t.email) || ""
|
|
1333
|
+
})
|
|
1334
|
+
}
|
|
1335
|
+
),
|
|
1336
|
+
n !== xt.PASSKEY && /* @__PURE__ */ h(
|
|
1337
|
+
$,
|
|
1338
|
+
{
|
|
1339
|
+
className: "prose-dark dark:prose-lighter mt-4",
|
|
1340
|
+
header: /* @__PURE__ */ a("h2", { className: "m-0", children: /* @__PURE__ */ h(X, { columnGap: 3, alignVertical: "center", children: [
|
|
1341
|
+
/* @__PURE__ */ a(A, { children: /* @__PURE__ */ a($e, { size: "size-8" }) }),
|
|
1342
|
+
/* @__PURE__ */ a(A, { children: /* @__PURE__ */ a("div", { children: C.PREFERENCES.PASSKEY_TITLE }) })
|
|
1343
|
+
] }) }),
|
|
1344
|
+
children: [
|
|
1345
|
+
/* @__PURE__ */ a("p", { children: C.PREFERENCES.PASSKEY_INSTRUCTIONS }),
|
|
1346
|
+
/* @__PURE__ */ a(
|
|
1347
|
+
le,
|
|
1348
|
+
{
|
|
1349
|
+
size: "small",
|
|
1350
|
+
className: "mt-2",
|
|
1351
|
+
onClick: o,
|
|
1352
|
+
labelLeft: C.PREFERENCES.PASSKEY_BUTTON,
|
|
1353
|
+
children: /* @__PURE__ */ a($e, { size: "size-5", monotone: !0 })
|
|
1354
|
+
}
|
|
1355
|
+
)
|
|
1356
|
+
]
|
|
1357
|
+
}
|
|
1358
|
+
),
|
|
1359
|
+
/* @__PURE__ */ a(
|
|
1360
|
+
$,
|
|
1361
|
+
{
|
|
1362
|
+
header: C.MAIN_STATISTICS.TITLE,
|
|
1363
|
+
className: "prose-dark dark:prose-lighter mt-4",
|
|
1364
|
+
children: he(l, {
|
|
1365
|
+
[ge(C.MAIN_STATISTICS.TOTAL, e.totalChats)]: e.totalChats,
|
|
1366
|
+
[C.MAIN_STATISTICS.PROCESSING_TIME]: Nt(
|
|
1367
|
+
e.averageProcessingTimes
|
|
1368
|
+
)
|
|
1369
|
+
})
|
|
1370
|
+
}
|
|
1371
|
+
)
|
|
1372
|
+
] }) : null;
|
|
1373
|
+
}, Mr = ({
|
|
1374
|
+
open: e,
|
|
1375
|
+
onOpenChange: r
|
|
1376
|
+
}) => {
|
|
1377
|
+
const { getAccessToken: t, user: o } = G(), {
|
|
1378
|
+
data: n,
|
|
1379
|
+
error: s,
|
|
1380
|
+
isLoading: l
|
|
1381
|
+
} = Dt({
|
|
1382
|
+
keys: [o == null ? void 0 : o.username],
|
|
1383
|
+
getAccessToken: t
|
|
1384
|
+
});
|
|
1385
|
+
return s || l ? null : /* @__PURE__ */ a(J, { open: e, onOpenChange: r, title: wt, children: /* @__PURE__ */ a(zr, { stats: n }) });
|
|
1386
|
+
};
|
|
1387
|
+
/*!
|
|
1388
|
+
@versini/ui-textarea v3.0.1
|
|
1389
|
+
© 2025 gizmette.com
|
|
1390
|
+
*/
|
|
1391
|
+
try {
|
|
1392
|
+
window.__VERSINI_UI_TEXTAREA__ || (window.__VERSINI_UI_TEXTAREA__ = {
|
|
1393
|
+
version: "3.0.1",
|
|
1394
|
+
buildTime: "01/06/2025 08:00 PM EST",
|
|
1395
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
1396
|
+
license: "MIT"
|
|
1397
|
+
});
|
|
1398
|
+
} catch {
|
|
1399
|
+
}
|
|
1400
|
+
const tt = "av-text-area", Br = "av-text-area-wrapper", we = "av-text-area-helper-text", Or = "av-text-area__control--right", Pr = "av-text-area__control--left";
|
|
1401
|
+
function $r() {
|
|
1402
|
+
const e = _(!1);
|
|
1403
|
+
return V(() => (e.current = !0, () => {
|
|
1404
|
+
e.current = !1;
|
|
1405
|
+
}), []), Ke(() => e.current, []);
|
|
1406
|
+
}
|
|
1407
|
+
function Dr(e) {
|
|
1408
|
+
return Xe(() => e.every((r) => r == null) ? () => {
|
|
1409
|
+
} : (r) => {
|
|
1410
|
+
e.forEach((t) => {
|
|
1411
|
+
typeof t == "function" ? t(r) : t != null && (t.current = r);
|
|
1412
|
+
});
|
|
1413
|
+
}, e);
|
|
1414
|
+
}
|
|
1415
|
+
const Vr = {
|
|
1416
|
+
x: 0,
|
|
1417
|
+
y: 0,
|
|
1418
|
+
width: 0,
|
|
1419
|
+
height: 0,
|
|
1420
|
+
top: 0,
|
|
1421
|
+
left: 0,
|
|
1422
|
+
bottom: 0,
|
|
1423
|
+
right: 0
|
|
1424
|
+
};
|
|
1425
|
+
function Fe(e) {
|
|
1426
|
+
const r = $r(), t = _(0), o = _(null), [n, s] = w(Vr), l = Xe(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
|
|
1427
|
+
const u = c[0];
|
|
1428
|
+
u && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
|
|
1429
|
+
o.current && r() && s(u.contentRect);
|
|
1430
|
+
}));
|
|
1431
|
+
}), [r]);
|
|
1432
|
+
return V(() => (o.current && (l == null || l.observe(o.current, e)), () => {
|
|
1433
|
+
l == null || l.disconnect(), t.current && cancelAnimationFrame(t.current);
|
|
1434
|
+
}), [l, e]), [o, n];
|
|
1435
|
+
}
|
|
1436
|
+
function Hr({
|
|
1437
|
+
value: e,
|
|
1438
|
+
defaultValue: r,
|
|
1439
|
+
finalValue: t,
|
|
1440
|
+
onChange: o = () => {
|
|
1441
|
+
},
|
|
1442
|
+
initialControlledDelay: n = 0
|
|
1443
|
+
}) {
|
|
1444
|
+
const [s, l] = w(!1), [c, u] = w(
|
|
1445
|
+
r !== void 0 ? r : t
|
|
1446
|
+
), d = (p) => {
|
|
1447
|
+
u(p), o == null || o(p);
|
|
1448
|
+
};
|
|
1449
|
+
return V(() => {
|
|
1450
|
+
(async () => e !== void 0 && !s && n > 0 && (await new Promise(
|
|
1451
|
+
(p) => setTimeout(p, n)
|
|
1452
|
+
), l(!0)))();
|
|
1453
|
+
}, [e, n, s]), e !== void 0 ? !s && n > 0 ? ["", o, !0] : [e, o, !0] : [c, d, !1];
|
|
1454
|
+
}
|
|
1455
|
+
function Ur(e) {
|
|
1456
|
+
const r = Se();
|
|
1457
|
+
if (!e)
|
|
1458
|
+
return r;
|
|
1459
|
+
if (typeof e == "number" || typeof e == "string")
|
|
1460
|
+
return `${e}${r}`;
|
|
1461
|
+
if (typeof e == "object") {
|
|
1462
|
+
const { id: t, prefix: o = "" } = e;
|
|
1463
|
+
return typeof t == "number" || typeof t == "string" ? `${o}${t}` : `${o}${r}`;
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
const rt = "SET_ANNOUNCEMENT", at = "CLEAR_ANNOUNCEMENT", Fr = {
|
|
1467
|
+
alert: null,
|
|
1468
|
+
alertdialog: null,
|
|
1469
|
+
log: "polite",
|
|
1470
|
+
marquee: null,
|
|
1471
|
+
progressbar: null,
|
|
1472
|
+
status: "polite",
|
|
1473
|
+
timer: "assertive"
|
|
1474
|
+
}, Gr = (e, r) => {
|
|
1475
|
+
switch (r == null ? void 0 : r.type) {
|
|
1476
|
+
case rt:
|
|
1477
|
+
return {
|
|
1478
|
+
...e,
|
|
1479
|
+
announcement: r.payload
|
|
1480
|
+
};
|
|
1481
|
+
case at:
|
|
1482
|
+
return {
|
|
1483
|
+
...e,
|
|
1484
|
+
announcement: null
|
|
1485
|
+
};
|
|
1486
|
+
default:
|
|
1487
|
+
return e;
|
|
1488
|
+
}
|
|
1489
|
+
}, jr = ({
|
|
1490
|
+
onAnnouncementClear: e,
|
|
1491
|
+
dispatch: r
|
|
1492
|
+
}) => {
|
|
1493
|
+
r({
|
|
1494
|
+
type: at
|
|
1495
|
+
}), typeof e == "function" && e();
|
|
1496
|
+
}, Ge = ({
|
|
1497
|
+
children: e,
|
|
1498
|
+
clearAnnouncementDelay: r,
|
|
1499
|
+
clearAnnouncementTimeoutRef: t,
|
|
1500
|
+
onAnnouncementClear: o,
|
|
1501
|
+
dispatch: n
|
|
1502
|
+
}) => {
|
|
1503
|
+
clearTimeout(t.current), e !== null && n({
|
|
1504
|
+
type: rt,
|
|
1505
|
+
payload: e
|
|
1506
|
+
}), r && (t.current = setTimeout(
|
|
1507
|
+
() => jr({
|
|
1508
|
+
onAnnouncementClear: o,
|
|
1509
|
+
dispatch: n
|
|
1510
|
+
}),
|
|
1511
|
+
r
|
|
1512
|
+
));
|
|
1513
|
+
}, Wr = ({
|
|
1514
|
+
children: e,
|
|
1515
|
+
announcementTimeoutRef: r,
|
|
1516
|
+
announcementDelay: t,
|
|
1517
|
+
clearAnnouncementDelay: o,
|
|
1518
|
+
clearAnnouncementTimeoutRef: n,
|
|
1519
|
+
onAnnouncementClear: s,
|
|
1520
|
+
dispatch: l
|
|
1521
|
+
}) => {
|
|
1522
|
+
clearTimeout(r.current), t ? r.current = setTimeout(Ge, t, {
|
|
1523
|
+
children: e,
|
|
1524
|
+
clearAnnouncementDelay: o,
|
|
1525
|
+
clearAnnouncementTimeoutRef: n,
|
|
1526
|
+
onAnnouncementClear: s,
|
|
1527
|
+
dispatch: l
|
|
1528
|
+
}) : Ge({
|
|
1529
|
+
children: e,
|
|
1530
|
+
clearAnnouncementDelay: o,
|
|
1531
|
+
clearAnnouncementTimeoutRef: n,
|
|
1532
|
+
onAnnouncementClear: s,
|
|
1533
|
+
dispatch: l
|
|
1534
|
+
});
|
|
1535
|
+
};
|
|
1536
|
+
function Yr({
|
|
1537
|
+
children: e,
|
|
1538
|
+
className: r,
|
|
1539
|
+
politeness: t,
|
|
1540
|
+
role: o = null,
|
|
1541
|
+
announcementDelay: n,
|
|
1542
|
+
clearAnnouncementDelay: s,
|
|
1543
|
+
onAnnouncementClear: l,
|
|
1544
|
+
visible: c,
|
|
1545
|
+
...u
|
|
1546
|
+
}) {
|
|
1547
|
+
const d = _(null), p = _(null), [k, g] = Ft(Gr, {
|
|
1548
|
+
announcement: null
|
|
1549
|
+
});
|
|
1550
|
+
let i = t;
|
|
1551
|
+
typeof i > "u" && (i = o ? Fr[o] : "assertive"), V(() => {
|
|
1552
|
+
Wr({
|
|
1553
|
+
announcementTimeoutRef: d,
|
|
1554
|
+
announcementDelay: n,
|
|
1555
|
+
children: e,
|
|
1556
|
+
clearAnnouncementDelay: s,
|
|
1557
|
+
clearAnnouncementTimeoutRef: p,
|
|
1558
|
+
onAnnouncementClear: l,
|
|
1559
|
+
dispatch: g
|
|
1560
|
+
});
|
|
1561
|
+
}, [
|
|
1562
|
+
e,
|
|
1563
|
+
n,
|
|
1564
|
+
s,
|
|
1565
|
+
l
|
|
1566
|
+
]);
|
|
1567
|
+
const f = m(r, {
|
|
1568
|
+
"sr-only": !c
|
|
1569
|
+
});
|
|
1570
|
+
return /* @__PURE__ */ a(
|
|
1571
|
+
"div",
|
|
1572
|
+
{
|
|
1573
|
+
"aria-live": i,
|
|
1574
|
+
...o && { role: o },
|
|
1575
|
+
className: f,
|
|
1576
|
+
...u,
|
|
1577
|
+
children: k.announcement
|
|
1578
|
+
}
|
|
1579
|
+
);
|
|
1580
|
+
}
|
|
1581
|
+
/*!
|
|
1582
|
+
@versini/ui-liveregion v1.3.1
|
|
1583
|
+
© 2025 gizmette.com
|
|
1584
|
+
*/
|
|
1585
|
+
try {
|
|
1586
|
+
window.__VERSINI_UI_LIVEREGION__ || (window.__VERSINI_UI_LIVEREGION__ = {
|
|
1587
|
+
version: "1.3.1",
|
|
1588
|
+
buildTime: "01/06/2025 08:00 PM EST",
|
|
1589
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
1590
|
+
license: "MIT"
|
|
1591
|
+
});
|
|
1592
|
+
} catch {
|
|
1593
|
+
}
|
|
1594
|
+
const Kr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", Xr = ({ mode: e }) => m({
|
|
1595
|
+
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
1596
|
+
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
1597
|
+
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
1598
|
+
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
1599
|
+
}), qr = ({
|
|
1600
|
+
focusMode: e
|
|
1601
|
+
}) => m("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
1602
|
+
"focus:outline-focus-dark": e === "dark",
|
|
1603
|
+
"focus:outline-focus-light": e === "light",
|
|
1604
|
+
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
1605
|
+
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
1606
|
+
}), Qr = ({
|
|
1607
|
+
noBorder: e,
|
|
1608
|
+
error: r
|
|
1609
|
+
}) => m("border-2", {
|
|
1610
|
+
"border-border-dark": !e && !r,
|
|
1611
|
+
"focus:border-border-dark": !e && r,
|
|
1612
|
+
"border-border-error-dark": !e && r,
|
|
1613
|
+
"border-transparent": e
|
|
1614
|
+
}), Jr = ({
|
|
1615
|
+
disabled: e,
|
|
1616
|
+
raw: r,
|
|
1617
|
+
error: t,
|
|
1618
|
+
mode: o,
|
|
1619
|
+
leftElement: n,
|
|
1620
|
+
rightElement: s
|
|
1621
|
+
}) => {
|
|
1622
|
+
if (r)
|
|
1623
|
+
return "";
|
|
1624
|
+
if (e)
|
|
1625
|
+
return m(
|
|
1626
|
+
"transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
|
|
1627
|
+
{
|
|
1628
|
+
"translate-x-[12px]": s === !0 && !n || !s && !n
|
|
1629
|
+
}
|
|
1630
|
+
);
|
|
1631
|
+
if (!t)
|
|
1632
|
+
return m(
|
|
1633
|
+
"absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
|
|
1634
|
+
{
|
|
1635
|
+
"translate-x-[12px]": s === !0 && !n || !s && !n,
|
|
1636
|
+
"text-copy-medium": o === "dark",
|
|
1637
|
+
"text-copy-dark": o === "light",
|
|
1638
|
+
"text-copy-dark dark:text-copy-medium": o === "system",
|
|
1639
|
+
"text-copy-medium dark:text-copy-dark": o === "alt-system"
|
|
1640
|
+
}
|
|
1641
|
+
);
|
|
1642
|
+
if (t)
|
|
1643
|
+
return m(
|
|
1644
|
+
"absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
|
|
1645
|
+
{
|
|
1646
|
+
"translate-x-[12px]": s === !0 && !n || !s && !n,
|
|
1647
|
+
"text-copy-medium": o === "dark",
|
|
1648
|
+
"text-copy-error-dark": o === "light",
|
|
1649
|
+
"text-copy-error-dark dark:text-copy-error-light": o === "system",
|
|
1650
|
+
"text-copy-medium dark:text-copy-error-dark": o === "alt-system"
|
|
1651
|
+
}
|
|
1652
|
+
);
|
|
1653
|
+
}, Zr = ({
|
|
1654
|
+
error: e,
|
|
1655
|
+
raw: r,
|
|
1656
|
+
mode: t,
|
|
1657
|
+
disabled: o
|
|
1658
|
+
}) => {
|
|
1659
|
+
if (r)
|
|
1660
|
+
return "";
|
|
1661
|
+
if (o)
|
|
1662
|
+
return m(
|
|
1663
|
+
we,
|
|
1664
|
+
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
1665
|
+
);
|
|
1666
|
+
if (!e)
|
|
1667
|
+
return m(we, "absolute px-2 font-medium", {
|
|
1668
|
+
"text-copy-medium": t === "dark",
|
|
1669
|
+
"text-copy-dark": t === "light",
|
|
1670
|
+
"text-copy-dark dark:text-copy-medium": t === "system",
|
|
1671
|
+
"text-copy-medium dark:text-copy-dark": t === "alt-system"
|
|
1672
|
+
});
|
|
1673
|
+
if (e)
|
|
1674
|
+
return m(we, "absolute px-2 font-medium", {
|
|
1675
|
+
"text-copy-error-light": t === "dark",
|
|
1676
|
+
"text-copy-error-dark": t === "light",
|
|
1677
|
+
"text-copy-error-dark dark:text-copy-error-light": t === "system",
|
|
1678
|
+
"dark:text-copy-error-dark text-copy-error-light": t === "alt-system"
|
|
1679
|
+
});
|
|
1680
|
+
}, ea = ({
|
|
1681
|
+
className: e,
|
|
1682
|
+
textAreaClassName: r,
|
|
1683
|
+
raw: t,
|
|
1684
|
+
focusMode: o,
|
|
1685
|
+
disabled: n,
|
|
1686
|
+
noBorder: s,
|
|
1687
|
+
error: l,
|
|
1688
|
+
mode: c,
|
|
1689
|
+
leftElement: u,
|
|
1690
|
+
rightElement: d
|
|
1691
|
+
}) => {
|
|
1692
|
+
const p = t ? e : m(
|
|
1693
|
+
"relative flex w-full flex-col justify-center",
|
|
1694
|
+
Br,
|
|
1695
|
+
e
|
|
1696
|
+
), k = t ? m(r) : m(
|
|
1697
|
+
tt,
|
|
1698
|
+
r,
|
|
1699
|
+
Kr(),
|
|
1700
|
+
Xr({ mode: c }),
|
|
1701
|
+
qr({ focusMode: o }),
|
|
1702
|
+
Qr({
|
|
1703
|
+
noBorder: s,
|
|
1704
|
+
error: l
|
|
1705
|
+
}),
|
|
1706
|
+
{
|
|
1707
|
+
"disabled:cursor-not-allowed disabled:opacity-50": n
|
|
1708
|
+
}
|
|
1709
|
+
), g = t ? void 0 : "sr-only", i = Jr({
|
|
1710
|
+
disabled: n,
|
|
1711
|
+
raw: t,
|
|
1712
|
+
error: l,
|
|
1713
|
+
mode: c,
|
|
1714
|
+
rightElement: d,
|
|
1715
|
+
leftElement: u
|
|
1716
|
+
}), f = Zr({
|
|
1717
|
+
error: l,
|
|
1718
|
+
raw: t,
|
|
1719
|
+
mode: c,
|
|
1720
|
+
disabled: n
|
|
1721
|
+
}), v = t ? void 0 : m(Or, "absolute"), y = t ? void 0 : m(Pr, "absolute");
|
|
1722
|
+
return {
|
|
1723
|
+
wrapper: p,
|
|
1724
|
+
textArea: k,
|
|
1725
|
+
accessibleLabel: g,
|
|
1726
|
+
visibleLabel: i,
|
|
1727
|
+
helperText: f,
|
|
1728
|
+
rightElement: v,
|
|
1729
|
+
leftElement: y
|
|
1730
|
+
};
|
|
1731
|
+
}, ta = ({
|
|
1732
|
+
scrollHeight: e,
|
|
1733
|
+
currentHeight: r,
|
|
1734
|
+
currentLabelOffset: t = 0,
|
|
1735
|
+
currentHelperTextOffset: o = 0
|
|
1736
|
+
}) => {
|
|
1737
|
+
let n, s;
|
|
1738
|
+
if (e > 0 && e !== r) {
|
|
1739
|
+
const l = e - r, c = Math.abs(l / 24);
|
|
1740
|
+
n = t + -1 * Math.sign(l) * (12 * c), s = o + Math.sign(l) * (12 * c);
|
|
1741
|
+
}
|
|
1742
|
+
return {
|
|
1743
|
+
labelOffset: n,
|
|
1744
|
+
helperTextOffset: s,
|
|
1745
|
+
scrollHeight: e
|
|
1746
|
+
};
|
|
1747
|
+
}, Te = be.forwardRef(
|
|
1748
|
+
({
|
|
1749
|
+
id: e,
|
|
1750
|
+
name: r,
|
|
1751
|
+
label: t,
|
|
1752
|
+
error: o = !1,
|
|
1753
|
+
raw: n = !1,
|
|
1754
|
+
className: s,
|
|
1755
|
+
textAreaClassName: l,
|
|
1756
|
+
mode: c = "system",
|
|
1757
|
+
focusMode: u = "system",
|
|
1758
|
+
value: d,
|
|
1759
|
+
defaultValue: p,
|
|
1760
|
+
disabled: k = !1,
|
|
1761
|
+
noBorder: g = !1,
|
|
1762
|
+
labelId: i,
|
|
1763
|
+
helperText: f = "",
|
|
1764
|
+
helperTextOnFocus: v = !1,
|
|
1765
|
+
rightElement: y,
|
|
1766
|
+
leftElement: x,
|
|
1767
|
+
onChange: T,
|
|
1768
|
+
onFocus: b,
|
|
1769
|
+
onBlur: E,
|
|
1770
|
+
...I
|
|
1771
|
+
}, H) => {
|
|
1772
|
+
var B;
|
|
1773
|
+
const R = _(null), de = Dr([H, R]), [N, z] = Fe(), [Z, j] = Fe(), q = _(80), W = _(-25), O = _(null), ee = _(30), te = _(null), Y = Ur({ id: e, prefix: `${tt}-` }), [Ae, ot] = w(0), [Re, nt] = w(0), [st, ze] = w(
|
|
1774
|
+
!!(!v && f)
|
|
1775
|
+
), lt = `${r} error, ${f}`, K = ea({
|
|
1776
|
+
className: s,
|
|
1777
|
+
textAreaClassName: l,
|
|
1778
|
+
error: o,
|
|
1779
|
+
raw: n,
|
|
1780
|
+
focusMode: u,
|
|
1781
|
+
disabled: k,
|
|
1782
|
+
noBorder: g,
|
|
1783
|
+
mode: c,
|
|
1784
|
+
rightElement: !!y,
|
|
1785
|
+
leftElement: !!x
|
|
1786
|
+
}), [U, ct] = Hr({
|
|
1787
|
+
value: d,
|
|
1788
|
+
initialControlledDelay: 20,
|
|
1789
|
+
defaultValue: p,
|
|
1790
|
+
onChange: (L) => {
|
|
1791
|
+
T && T({
|
|
1792
|
+
target: {
|
|
1793
|
+
value: L
|
|
1794
|
+
}
|
|
1795
|
+
});
|
|
1796
|
+
}
|
|
1797
|
+
}), it = (L) => {
|
|
1798
|
+
ct(L.target.value);
|
|
1799
|
+
}, dt = (L) => {
|
|
1800
|
+
v && f && ze(!0), b && b(L);
|
|
1801
|
+
}, mt = (L) => {
|
|
1802
|
+
v && f && !U && ze(!1), E && E(L);
|
|
1803
|
+
};
|
|
1804
|
+
return ne(() => {
|
|
1805
|
+
z && z.width && ot(z.width + 18 + 10);
|
|
1806
|
+
}, [z]), ne(() => {
|
|
1807
|
+
j && j.width && nt(j.width + 18 + 10);
|
|
1808
|
+
}, [j]), ne(() => {
|
|
1809
|
+
n || R && R.current && U !== void 0 && (R.current.style.height = "inherit", R.current.style.height = R.current.scrollHeight + "px");
|
|
1810
|
+
}, [U, n]), ne(() => {
|
|
1811
|
+
n || setTimeout(() => {
|
|
1812
|
+
var L;
|
|
1813
|
+
(L = O == null ? void 0 : O.current) == null || L.style.setProperty(
|
|
1814
|
+
"--av-text-area-wrapper-transition",
|
|
1815
|
+
U ? "none" : "all 0.2s ease-out"
|
|
1816
|
+
);
|
|
1817
|
+
}, 0);
|
|
1818
|
+
}, [U, n]), ne(() => {
|
|
1819
|
+
var L, Me;
|
|
1820
|
+
if (!n && R && R.current && U !== void 0) {
|
|
1821
|
+
const { labelOffset: ve, helperTextOffset: xe, scrollHeight: ut } = ta({
|
|
1822
|
+
scrollHeight: R.current.scrollHeight,
|
|
1823
|
+
currentHeight: q.current,
|
|
1824
|
+
currentLabelOffset: W.current,
|
|
1825
|
+
currentHelperTextOffset: ee.current
|
|
1826
|
+
});
|
|
1827
|
+
ve && (W.current = ve, (L = O == null ? void 0 : O.current) == null || L.style.setProperty(
|
|
1828
|
+
"--av-text-area-label",
|
|
1829
|
+
`${ve}px`
|
|
1830
|
+
)), xe && (ee.current = xe, (Me = te == null ? void 0 : te.current) == null || Me.style.setProperty(
|
|
1831
|
+
"--av-text-area-helper-text",
|
|
1832
|
+
`${xe}px`
|
|
1833
|
+
)), q.current = ut || q.current;
|
|
1834
|
+
}
|
|
1835
|
+
}, [U, n]), j.width > 0 && ((B = O == null ? void 0 : O.current) == null || B.style.setProperty(
|
|
1836
|
+
"--tw-translate-x",
|
|
1837
|
+
`${12 + j.width + 5}px`
|
|
1838
|
+
)), /* @__PURE__ */ h("div", { className: K.wrapper, children: [
|
|
1839
|
+
/* @__PURE__ */ a(
|
|
1840
|
+
"label",
|
|
1841
|
+
{
|
|
1842
|
+
htmlFor: Y,
|
|
1843
|
+
id: i,
|
|
1844
|
+
className: K.accessibleLabel,
|
|
1845
|
+
children: t
|
|
1846
|
+
}
|
|
1847
|
+
),
|
|
1848
|
+
x && /* @__PURE__ */ a(
|
|
1849
|
+
"div",
|
|
1850
|
+
{
|
|
1851
|
+
ref: Z,
|
|
1852
|
+
className: K.leftElement,
|
|
1853
|
+
children: x
|
|
1854
|
+
}
|
|
1855
|
+
),
|
|
1856
|
+
/* @__PURE__ */ a(
|
|
1857
|
+
"textarea",
|
|
1858
|
+
{
|
|
1859
|
+
ref: de,
|
|
1860
|
+
id: Y,
|
|
1861
|
+
name: r,
|
|
1862
|
+
disabled: k,
|
|
1863
|
+
placeholder: n ? void 0 : " ",
|
|
1864
|
+
className: K.textArea,
|
|
1865
|
+
rows: 1,
|
|
1866
|
+
...f && { "aria-describedby": `${Y}-helper` },
|
|
1867
|
+
...o && { "aria-invalid": "true" },
|
|
1868
|
+
...y && !x && !n && { style: { paddingRight: Ae } },
|
|
1869
|
+
...x && !y && !n && { style: { paddingLeft: Re } },
|
|
1870
|
+
...y && x && !n && {
|
|
1871
|
+
style: {
|
|
1872
|
+
paddingRight: Ae,
|
|
1873
|
+
paddingLeft: Re
|
|
1874
|
+
}
|
|
1875
|
+
},
|
|
1876
|
+
value: U,
|
|
1877
|
+
onChange: it,
|
|
1878
|
+
onFocus: dt,
|
|
1879
|
+
onBlur: mt,
|
|
1880
|
+
...I
|
|
1881
|
+
}
|
|
1882
|
+
),
|
|
1883
|
+
!n && /* @__PURE__ */ a(
|
|
1884
|
+
"label",
|
|
1885
|
+
{
|
|
1886
|
+
ref: O,
|
|
1887
|
+
"aria-hidden": !0,
|
|
1888
|
+
htmlFor: Y,
|
|
1889
|
+
className: `${K.visibleLabel}`,
|
|
1890
|
+
children: t
|
|
1891
|
+
}
|
|
1892
|
+
),
|
|
1893
|
+
st && /* @__PURE__ */ a(
|
|
1894
|
+
"div",
|
|
1895
|
+
{
|
|
1896
|
+
ref: te,
|
|
1897
|
+
id: `${Y}-helper`,
|
|
1898
|
+
className: K.helperText,
|
|
1899
|
+
children: f
|
|
1900
|
+
}
|
|
1901
|
+
),
|
|
1902
|
+
y && /* @__PURE__ */ a(
|
|
1903
|
+
"div",
|
|
1904
|
+
{
|
|
1905
|
+
ref: N,
|
|
1906
|
+
className: K.rightElement,
|
|
1907
|
+
children: y
|
|
1908
|
+
}
|
|
1909
|
+
),
|
|
1910
|
+
o && f && /* @__PURE__ */ a(Yr, { politeness: "polite", clearAnnouncementDelay: 500, children: lt })
|
|
1911
|
+
] });
|
|
1912
|
+
}
|
|
1913
|
+
);
|
|
1914
|
+
Te.displayName = "TextArea";
|
|
1915
|
+
/*!
|
|
1916
|
+
@versini/ui-toggle v3.0.1
|
|
1917
|
+
© 2025 gizmette.com
|
|
1918
|
+
*/
|
|
1919
|
+
try {
|
|
1920
|
+
window.__VERSINI_UI_TOGGLE__ || (window.__VERSINI_UI_TOGGLE__ = {
|
|
1921
|
+
version: "3.0.1",
|
|
1922
|
+
buildTime: "01/06/2025 08:00 PM EST",
|
|
1923
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
1924
|
+
license: "MIT"
|
|
1925
|
+
});
|
|
1926
|
+
} catch {
|
|
1927
|
+
}
|
|
1928
|
+
const ra = "av-toggle", aa = () => m("peer", "h-6", "w-11", "rounded-full"), oa = ({
|
|
1929
|
+
focusMode: e
|
|
1930
|
+
}) => m(
|
|
1931
|
+
"peer-focus:outline",
|
|
1932
|
+
"peer-focus:outline-2",
|
|
1933
|
+
"peer-focus:outline-offset-2",
|
|
1934
|
+
{
|
|
1935
|
+
"peer-focus:outline-focus-dark": e === "dark",
|
|
1936
|
+
"peer-focus:outline-focus-light": e === "light",
|
|
1937
|
+
"peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
|
|
1938
|
+
"peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
|
|
1939
|
+
}
|
|
1940
|
+
), na = () => m(
|
|
1941
|
+
"peer-checked:after:translate-x-full",
|
|
1942
|
+
// background color when checked
|
|
1943
|
+
"peer-checked:bg-violet-500",
|
|
1944
|
+
// knob circle and border color when checked
|
|
1945
|
+
"peer-checked:after:bg-white",
|
|
1946
|
+
"peer-checked:after:border-white"
|
|
1947
|
+
), sa = () => m(
|
|
1948
|
+
"after:left-[2px]",
|
|
1949
|
+
"after:top-[2px]",
|
|
1950
|
+
"after:border",
|
|
1951
|
+
"after:border-surface-light dark:after:border-surface-medium",
|
|
1952
|
+
"after:bg-surface-light dark:after:bg-surface-medium",
|
|
1953
|
+
"after:absolute",
|
|
1954
|
+
"after:h-5",
|
|
1955
|
+
"after:w-5",
|
|
1956
|
+
"after:rounded-full",
|
|
1957
|
+
"after:transition-all",
|
|
1958
|
+
"after:content-['']"
|
|
1959
|
+
), la = ({
|
|
1960
|
+
mode: e,
|
|
1961
|
+
noBorder: r
|
|
1962
|
+
}) => m({
|
|
1963
|
+
border: !r,
|
|
1964
|
+
"border-border-dark bg-surface-medium": e === "light",
|
|
1965
|
+
"border-border-light bg-surface-darker": e === "dark",
|
|
1966
|
+
"border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
|
|
1967
|
+
"border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
|
|
1968
|
+
}), ca = ({
|
|
1969
|
+
mode: e,
|
|
1970
|
+
labelHidden: r
|
|
1971
|
+
}) => r ? "sr-only" : m("ml-2 text-sm", {
|
|
1972
|
+
"text-copy-dark": e === "light",
|
|
1973
|
+
"text-copy-lighter": e === "dark",
|
|
1974
|
+
"text-copy-lighter dark:text-copy-dark": e === "alt-system",
|
|
1975
|
+
"text-copy-dark dark:text-copy-lighter": e === "system"
|
|
1976
|
+
}), ia = ({ className: e }) => m(
|
|
1977
|
+
ra,
|
|
1978
|
+
"relative flex cursor-pointer items-center",
|
|
1979
|
+
e
|
|
1980
|
+
), da = ({
|
|
1981
|
+
mode: e,
|
|
1982
|
+
focusMode: r,
|
|
1983
|
+
labelHidden: t,
|
|
1984
|
+
className: o,
|
|
1985
|
+
noBorder: n
|
|
1986
|
+
}) => ({
|
|
1987
|
+
toggle: m(
|
|
1988
|
+
aa(),
|
|
1989
|
+
la({ mode: e, noBorder: n }),
|
|
1990
|
+
oa({ focusMode: r }),
|
|
1991
|
+
sa(),
|
|
1992
|
+
na()
|
|
1993
|
+
),
|
|
1994
|
+
label: ca({ mode: e, labelHidden: t }),
|
|
1995
|
+
input: "peer sr-only",
|
|
1996
|
+
wrapper: ia({ className: o })
|
|
1997
|
+
}), ue = ({
|
|
1998
|
+
checked: e = !1,
|
|
1999
|
+
onChange: r,
|
|
2000
|
+
label: t,
|
|
2001
|
+
labelHidden: o = !1,
|
|
2002
|
+
name: n,
|
|
2003
|
+
mode: s = "system",
|
|
2004
|
+
focusMode: l = "system",
|
|
2005
|
+
className: c,
|
|
2006
|
+
noBorder: u = !1
|
|
2007
|
+
}) => {
|
|
2008
|
+
const d = da({
|
|
2009
|
+
mode: s,
|
|
2010
|
+
focusMode: l,
|
|
2011
|
+
labelHidden: o,
|
|
2012
|
+
className: c,
|
|
2013
|
+
noBorder: u
|
|
2014
|
+
}), p = (k) => {
|
|
2015
|
+
r == null || r(k.target.checked);
|
|
2016
|
+
};
|
|
2017
|
+
return /* @__PURE__ */ h("label", { className: d.wrapper, children: [
|
|
2018
|
+
/* @__PURE__ */ a(
|
|
2019
|
+
"input",
|
|
2020
|
+
{
|
|
2021
|
+
name: n,
|
|
2022
|
+
checked: e,
|
|
2023
|
+
type: "checkbox",
|
|
2024
|
+
className: d.input,
|
|
2025
|
+
onChange: p
|
|
2026
|
+
}
|
|
2027
|
+
),
|
|
2028
|
+
/* @__PURE__ */ a("div", { className: d.toggle }),
|
|
2029
|
+
/* @__PURE__ */ a("span", { className: d.label, children: t })
|
|
2030
|
+
] });
|
|
2031
|
+
}, ma = ({
|
|
2032
|
+
open: e,
|
|
2033
|
+
onOpenChange: r
|
|
2034
|
+
}) => {
|
|
2035
|
+
const { getAccessToken: t, user: o } = G(), {
|
|
2036
|
+
data: n,
|
|
2037
|
+
error: s,
|
|
2038
|
+
isLoading: l,
|
|
2039
|
+
mutate: c
|
|
2040
|
+
} = Ye({
|
|
2041
|
+
keys: [o == null ? void 0 : o.username],
|
|
2042
|
+
getAccessToken: t
|
|
2043
|
+
}), [u, d] = w({
|
|
2044
|
+
prompts: []
|
|
2045
|
+
}), p = ({
|
|
2046
|
+
slot: i,
|
|
2047
|
+
checked: f,
|
|
2048
|
+
label: v,
|
|
2049
|
+
content: y
|
|
2050
|
+
}) => {
|
|
2051
|
+
d((x) => {
|
|
2052
|
+
const T = x.prompts, b = {
|
|
2053
|
+
slot: i,
|
|
2054
|
+
label: v,
|
|
2055
|
+
content: y,
|
|
2056
|
+
enabled: f
|
|
2057
|
+
}, E = T.findIndex((I) => I.slot === i);
|
|
2058
|
+
return E === -1 ? {
|
|
2059
|
+
...x,
|
|
2060
|
+
prompts: [...T, { ...b, slot: i }]
|
|
2061
|
+
} : (T[E] = b, {
|
|
2062
|
+
...x,
|
|
2063
|
+
prompts: [...T]
|
|
2064
|
+
});
|
|
2065
|
+
});
|
|
2066
|
+
}, k = async (i) => {
|
|
2067
|
+
i.preventDefault();
|
|
2068
|
+
try {
|
|
2069
|
+
await ce({
|
|
2070
|
+
accessToken: await t(),
|
|
2071
|
+
type: ie.SET_USER_PREFERENCES,
|
|
2072
|
+
params: {
|
|
2073
|
+
user: o == null ? void 0 : o.username,
|
|
2074
|
+
tags: u.prompts
|
|
2075
|
+
}
|
|
2076
|
+
});
|
|
2077
|
+
} catch {
|
|
2078
|
+
}
|
|
2079
|
+
}, g = () => {
|
|
2080
|
+
c({ ...n }), r(!1);
|
|
2081
|
+
};
|
|
2082
|
+
return V(() => {
|
|
2083
|
+
n != null && n.tags && d({ prompts: n.tags });
|
|
2084
|
+
}, [n]), s || l ? null : /* @__PURE__ */ h(
|
|
2085
|
+
J,
|
|
2086
|
+
{
|
|
2087
|
+
open: e,
|
|
2088
|
+
onOpenChange: g,
|
|
2089
|
+
title: "Prompts",
|
|
2090
|
+
footer: /* @__PURE__ */ h(
|
|
2091
|
+
X,
|
|
2092
|
+
{
|
|
2093
|
+
columnGap: 2,
|
|
2094
|
+
alignHorizontal: "flex-end",
|
|
2095
|
+
className: "pb-8 sm:pb-0",
|
|
2096
|
+
children: [
|
|
2097
|
+
/* @__PURE__ */ a(A, { children: /* @__PURE__ */ a(
|
|
2098
|
+
F,
|
|
2099
|
+
{
|
|
2100
|
+
mode: "dark",
|
|
2101
|
+
variant: "secondary",
|
|
2102
|
+
focusMode: "light",
|
|
2103
|
+
onClick: g,
|
|
2104
|
+
children: "Cancel"
|
|
2105
|
+
}
|
|
2106
|
+
) }),
|
|
2107
|
+
/* @__PURE__ */ a(A, { children: /* @__PURE__ */ a(
|
|
2108
|
+
F,
|
|
2109
|
+
{
|
|
2110
|
+
mode: "dark",
|
|
2111
|
+
variant: "danger",
|
|
2112
|
+
focusMode: "light",
|
|
2113
|
+
onClick: async (i) => {
|
|
2114
|
+
r(!1), await k(i);
|
|
2115
|
+
},
|
|
2116
|
+
children: "Save"
|
|
2117
|
+
}
|
|
2118
|
+
) })
|
|
2119
|
+
]
|
|
2120
|
+
}
|
|
2121
|
+
),
|
|
2122
|
+
children: [
|
|
2123
|
+
/* @__PURE__ */ a("p", { children: Et }),
|
|
2124
|
+
u.prompts && u.prompts.map((i) => /* @__PURE__ */ h(
|
|
2125
|
+
$,
|
|
2126
|
+
{
|
|
2127
|
+
header: `Prompt ${i.slot + 1}`,
|
|
2128
|
+
className: "prose-dark dark:prose-lighter mb-2",
|
|
2129
|
+
children: [
|
|
2130
|
+
/* @__PURE__ */ h(X, { className: "mt-8 mb-6", columnGap: 2, rowGap: 6, children: [
|
|
2131
|
+
/* @__PURE__ */ a(A, { span: 12, children: /* @__PURE__ */ a(
|
|
2132
|
+
Ee,
|
|
2133
|
+
{
|
|
2134
|
+
label: "Label",
|
|
2135
|
+
name: `prompt${i.slot}-label`,
|
|
2136
|
+
value: i.label,
|
|
2137
|
+
onChange: (f) => {
|
|
2138
|
+
p({
|
|
2139
|
+
slot: i.slot,
|
|
2140
|
+
checked: i.enabled,
|
|
2141
|
+
label: f.target.value,
|
|
2142
|
+
content: i.content
|
|
2143
|
+
});
|
|
2144
|
+
}
|
|
2145
|
+
}
|
|
2146
|
+
) }),
|
|
2147
|
+
/* @__PURE__ */ a(A, { span: 12, children: /* @__PURE__ */ a(
|
|
2148
|
+
Ee,
|
|
2149
|
+
{
|
|
2150
|
+
label: "Content",
|
|
2151
|
+
name: `prompt${i.slot}-content`,
|
|
2152
|
+
value: i.content,
|
|
2153
|
+
onChange: (f) => {
|
|
2154
|
+
p({
|
|
2155
|
+
slot: i.slot,
|
|
2156
|
+
checked: i.enabled,
|
|
2157
|
+
label: i.label,
|
|
2158
|
+
content: f.target.value
|
|
2159
|
+
});
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
) })
|
|
2163
|
+
] }),
|
|
2164
|
+
/* @__PURE__ */ a(
|
|
2165
|
+
ue,
|
|
2166
|
+
{
|
|
2167
|
+
className: "mt-2",
|
|
2168
|
+
noBorder: !0,
|
|
2169
|
+
label: "Enabled",
|
|
2170
|
+
name: i.slot.toString(),
|
|
2171
|
+
onChange: (f) => {
|
|
2172
|
+
p({
|
|
2173
|
+
slot: i.slot,
|
|
2174
|
+
checked: f,
|
|
2175
|
+
label: i.label,
|
|
2176
|
+
content: i.content
|
|
2177
|
+
});
|
|
2178
|
+
},
|
|
2179
|
+
checked: i.enabled
|
|
2180
|
+
}
|
|
2181
|
+
)
|
|
2182
|
+
]
|
|
2183
|
+
},
|
|
2184
|
+
`prompt-slot-${i.slot}`
|
|
2185
|
+
))
|
|
2186
|
+
]
|
|
2187
|
+
}
|
|
2188
|
+
);
|
|
2189
|
+
}, ua = ({
|
|
2190
|
+
open: e,
|
|
2191
|
+
onOpenChange: r
|
|
2192
|
+
}) => {
|
|
2193
|
+
const { getAccessToken: t, user: o } = G(), {
|
|
2194
|
+
data: n,
|
|
2195
|
+
error: s,
|
|
2196
|
+
isLoading: l,
|
|
2197
|
+
mutate: c
|
|
2198
|
+
} = Ye({
|
|
2199
|
+
keys: [o == null ? void 0 : o.username],
|
|
2200
|
+
getAccessToken: t
|
|
2201
|
+
}), [u, d] = w(!1), [p, k] = w({
|
|
2202
|
+
loadingLocation: !1
|
|
2203
|
+
}), [g, i] = w(""), [f, v] = w(""), [y, x] = w(Ct), [T, b] = Ie({
|
|
2204
|
+
key: _e + Tt,
|
|
2205
|
+
initialValue: !1
|
|
2206
|
+
}), E = (N) => {
|
|
2207
|
+
b(N);
|
|
2208
|
+
}, I = async (N) => {
|
|
2209
|
+
N.preventDefault();
|
|
2210
|
+
try {
|
|
2211
|
+
await ce({
|
|
2212
|
+
accessToken: await t(),
|
|
2213
|
+
type: ie.SET_USER_PREFERENCES,
|
|
2214
|
+
params: {
|
|
2215
|
+
user: o == null ? void 0 : o.username,
|
|
2216
|
+
instructions: g,
|
|
2217
|
+
location: f,
|
|
2218
|
+
engine: y
|
|
2219
|
+
}
|
|
2220
|
+
}), c(), k({
|
|
2221
|
+
loadingLocation: !1
|
|
2222
|
+
});
|
|
2223
|
+
} catch {
|
|
2224
|
+
}
|
|
2225
|
+
}, H = async () => {
|
|
2226
|
+
k({
|
|
2227
|
+
loadingLocation: !0
|
|
2228
|
+
}), v("...");
|
|
2229
|
+
try {
|
|
2230
|
+
const N = Date.now(), z = await St(), Z = await ce({
|
|
2231
|
+
accessToken: await t(),
|
|
2232
|
+
type: ie.GET_LOCATION,
|
|
2233
|
+
params: {
|
|
2234
|
+
latitude: z.latitude,
|
|
2235
|
+
longitude: z.longitude
|
|
2236
|
+
}
|
|
2237
|
+
}), q = Date.now() - N;
|
|
2238
|
+
if (q < 2e3 && await new Promise((W) => setTimeout(W, 2e3 - q)), Z.status === 200) {
|
|
2239
|
+
const { city: W, state: O, country: ee, displayName: te } = Z.data, Y = W && O && ee ? `${W}, ${O}, ${ee}` : te;
|
|
2240
|
+
k({
|
|
2241
|
+
loadingLocation: !1
|
|
2242
|
+
}), v(Y);
|
|
2243
|
+
} else
|
|
2244
|
+
k({
|
|
2245
|
+
loadingLocation: !1
|
|
2246
|
+
});
|
|
2247
|
+
} catch {
|
|
2248
|
+
}
|
|
2249
|
+
}, B = (N, z) => {
|
|
2250
|
+
x(N ? z : z === Q ? re : Q);
|
|
2251
|
+
}, R = () => {
|
|
2252
|
+
d(!u);
|
|
2253
|
+
}, de = () => {
|
|
2254
|
+
c({ ...n }), r(!1);
|
|
2255
|
+
};
|
|
2256
|
+
return V(() => {
|
|
2257
|
+
n != null && n.instructions && i(n.instructions), n != null && n.location && v(n.location), n != null && n.engine && x(n.engine);
|
|
2258
|
+
}, [n]), s || l ? null : /* @__PURE__ */ a(
|
|
2259
|
+
J,
|
|
2260
|
+
{
|
|
2261
|
+
open: e,
|
|
2262
|
+
onOpenChange: de,
|
|
2263
|
+
title: _t,
|
|
2264
|
+
footer: /* @__PURE__ */ h(
|
|
2265
|
+
X,
|
|
2266
|
+
{
|
|
2267
|
+
columnGap: 2,
|
|
2268
|
+
alignHorizontal: "flex-end",
|
|
2269
|
+
className: "pb-8 sm:pb-0",
|
|
2270
|
+
children: [
|
|
2271
|
+
/* @__PURE__ */ a(A, { children: /* @__PURE__ */ a(
|
|
2272
|
+
F,
|
|
2273
|
+
{
|
|
2274
|
+
mode: "dark",
|
|
2275
|
+
variant: "secondary",
|
|
2276
|
+
focusMode: "light",
|
|
2277
|
+
onClick: de,
|
|
2278
|
+
children: "Cancel"
|
|
2279
|
+
}
|
|
2280
|
+
) }),
|
|
2281
|
+
/* @__PURE__ */ a(A, { children: /* @__PURE__ */ a(
|
|
2282
|
+
F,
|
|
2283
|
+
{
|
|
2284
|
+
mode: "dark",
|
|
2285
|
+
variant: "danger",
|
|
2286
|
+
focusMode: "light",
|
|
2287
|
+
onClick: async (N) => {
|
|
2288
|
+
r(!1), await I(N);
|
|
2289
|
+
},
|
|
2290
|
+
children: "Save"
|
|
2291
|
+
}
|
|
2292
|
+
) })
|
|
2293
|
+
]
|
|
2294
|
+
}
|
|
2295
|
+
),
|
|
2296
|
+
children: /* @__PURE__ */ h(M, { children: [
|
|
2297
|
+
u && /* @__PURE__ */ a(ma, { open: u, onOpenChange: d }),
|
|
2298
|
+
/* @__PURE__ */ h(
|
|
2299
|
+
$,
|
|
2300
|
+
{
|
|
2301
|
+
header: C.SETTINGS_ENGINE.TITLE,
|
|
2302
|
+
className: "prose-dark dark:prose-lighter",
|
|
2303
|
+
children: [
|
|
2304
|
+
/* @__PURE__ */ a("p", { className: "text-sm", children: "Select the AI engine that will be used to generate responses." }),
|
|
2305
|
+
/* @__PURE__ */ a(
|
|
2306
|
+
ue,
|
|
2307
|
+
{
|
|
2308
|
+
noBorder: !0,
|
|
2309
|
+
label: Q,
|
|
2310
|
+
name: Q,
|
|
2311
|
+
onChange: (N) => B(N, Q),
|
|
2312
|
+
checked: y === Q
|
|
2313
|
+
}
|
|
2314
|
+
),
|
|
2315
|
+
/* @__PURE__ */ a(
|
|
2316
|
+
ue,
|
|
2317
|
+
{
|
|
2318
|
+
className: "mt-2",
|
|
2319
|
+
noBorder: !0,
|
|
2320
|
+
label: re,
|
|
2321
|
+
name: re,
|
|
2322
|
+
onChange: (N) => B(N, re),
|
|
2323
|
+
checked: y === re
|
|
2324
|
+
}
|
|
2325
|
+
),
|
|
2326
|
+
/* @__PURE__ */ a("p", { className: "text-sm", children: 'This "Show Message Statistics" option adds individual statistics for each messages under their respective bubbles, such as processing time, model name, and more.' }),
|
|
2327
|
+
/* @__PURE__ */ a(
|
|
2328
|
+
ue,
|
|
2329
|
+
{
|
|
2330
|
+
className: "mt-2",
|
|
2331
|
+
noBorder: !0,
|
|
2332
|
+
label: "Show Message Statistics",
|
|
2333
|
+
name: "show-message-statistics",
|
|
2334
|
+
onChange: E,
|
|
2335
|
+
checked: T
|
|
2336
|
+
}
|
|
2337
|
+
),
|
|
2338
|
+
/* @__PURE__ */ a("h3", { className: "border-b-2 border-slate-400", children: "Prompts" }),
|
|
2339
|
+
/* @__PURE__ */ a(
|
|
2340
|
+
le,
|
|
2341
|
+
{
|
|
2342
|
+
className: "mt-2",
|
|
2343
|
+
size: "small",
|
|
2344
|
+
onClick: R,
|
|
2345
|
+
labelLeft: "Edit Custom Prompts",
|
|
2346
|
+
children: /* @__PURE__ */ a(tr, { size: "size-3", monotone: !0 })
|
|
2347
|
+
}
|
|
2348
|
+
)
|
|
2349
|
+
]
|
|
2350
|
+
}
|
|
2351
|
+
),
|
|
2352
|
+
/* @__PURE__ */ h(
|
|
2353
|
+
$,
|
|
2354
|
+
{
|
|
2355
|
+
header: "Custom Instructions",
|
|
2356
|
+
className: "prose-dark dark:prose-lighter mt-4",
|
|
2357
|
+
children: [
|
|
2358
|
+
/* @__PURE__ */ h("p", { className: "text-sm", children: [
|
|
2359
|
+
"What would you like ",
|
|
2360
|
+
/* @__PURE__ */ a("em", { children: It }),
|
|
2361
|
+
" to know about you to provide better responses?"
|
|
2362
|
+
] }),
|
|
2363
|
+
/* @__PURE__ */ a(
|
|
2364
|
+
Te,
|
|
2365
|
+
{
|
|
2366
|
+
mode: "alt-system",
|
|
2367
|
+
autoCapitalize: "off",
|
|
2368
|
+
autoComplete: "off",
|
|
2369
|
+
autoCorrect: "off",
|
|
2370
|
+
name: "customInstructions",
|
|
2371
|
+
label: "Custom Instructions",
|
|
2372
|
+
value: g,
|
|
2373
|
+
onChange: (N) => {
|
|
2374
|
+
i(N.target.value);
|
|
2375
|
+
},
|
|
2376
|
+
helperText: "Press ENTER to add a new line."
|
|
2377
|
+
}
|
|
2378
|
+
)
|
|
2379
|
+
]
|
|
2380
|
+
}
|
|
2381
|
+
),
|
|
2382
|
+
/* @__PURE__ */ h(
|
|
2383
|
+
$,
|
|
2384
|
+
{
|
|
2385
|
+
header: "Location",
|
|
2386
|
+
className: "prose-dark dark:prose-lighter mt-4",
|
|
2387
|
+
children: [
|
|
2388
|
+
/* @__PURE__ */ a("p", { className: "text-sm", children: "You can share your location to receive customized responses based on your area." }),
|
|
2389
|
+
/* @__PURE__ */ a(
|
|
2390
|
+
Te,
|
|
2391
|
+
{
|
|
2392
|
+
mode: "alt-system",
|
|
2393
|
+
name: "location",
|
|
2394
|
+
label: "Location",
|
|
2395
|
+
value: f,
|
|
2396
|
+
onChange: (N) => {
|
|
2397
|
+
v(N.target.value);
|
|
2398
|
+
},
|
|
2399
|
+
helperText: "Enter your location or press auto-detect."
|
|
2400
|
+
}
|
|
2401
|
+
),
|
|
2402
|
+
/* @__PURE__ */ a(
|
|
2403
|
+
F,
|
|
2404
|
+
{
|
|
2405
|
+
className: "mt-2",
|
|
2406
|
+
size: "small",
|
|
2407
|
+
noBorder: !0,
|
|
2408
|
+
disabled: p.loadingLocation,
|
|
2409
|
+
onClick: H,
|
|
2410
|
+
children: p.loadingLocation ? "Detecting..." : "Auto-detect"
|
|
2411
|
+
}
|
|
2412
|
+
)
|
|
2413
|
+
]
|
|
2414
|
+
}
|
|
2415
|
+
)
|
|
2416
|
+
] })
|
|
2417
|
+
}
|
|
2418
|
+
);
|
|
2419
|
+
}, ka = () => {
|
|
2420
|
+
const { logout: e } = G(), { state: r } = fe(We), [t, o] = w(!1), [n, s] = w(!1), [l, c] = w(!1), [u, d] = w(!1), [p, k] = w(!1), g = () => {
|
|
2421
|
+
o(!t);
|
|
2422
|
+
}, i = () => {
|
|
2423
|
+
s(!n);
|
|
2424
|
+
}, f = () => {
|
|
2425
|
+
c(!l);
|
|
2426
|
+
}, v = () => {
|
|
2427
|
+
d(!u);
|
|
2428
|
+
}, y = () => {
|
|
2429
|
+
k(!p);
|
|
2430
|
+
};
|
|
2431
|
+
return /* @__PURE__ */ h(M, { children: [
|
|
2432
|
+
/* @__PURE__ */ a(
|
|
2433
|
+
et,
|
|
2434
|
+
{
|
|
2435
|
+
showConfirmation: p,
|
|
2436
|
+
setShowConfirmation: k,
|
|
2437
|
+
action: e,
|
|
2438
|
+
customStrings: {
|
|
2439
|
+
confirmAction: De,
|
|
2440
|
+
cancelAction: "Cancel",
|
|
2441
|
+
title: De
|
|
2442
|
+
},
|
|
2443
|
+
children: /* @__PURE__ */ a("p", { children: "Are you sure you want to log out?" })
|
|
2444
|
+
}
|
|
2445
|
+
),
|
|
2446
|
+
/* @__PURE__ */ a(Mr, { open: t, onOpenChange: o }),
|
|
2447
|
+
/* @__PURE__ */ a(ua, { open: n, onOpenChange: s }),
|
|
2448
|
+
l && /* @__PURE__ */ a(Rr, { open: l, onOpenChange: c }),
|
|
2449
|
+
/* @__PURE__ */ a(Sr, { open: u, onOpenChange: d }),
|
|
2450
|
+
/* @__PURE__ */ a("div", { className: "bg-slate-900 py-4 px-4 rounded-t-md", children: /* @__PURE__ */ a(X, { alignHorizontal: "flex-end", alignVertical: "center", children: /* @__PURE__ */ a(A, { children: /* @__PURE__ */ a(X, { children: /* @__PURE__ */ a(A, { children: /* @__PURE__ */ h(
|
|
2451
|
+
Vt,
|
|
2452
|
+
{
|
|
2453
|
+
mode: "dark",
|
|
2454
|
+
focusMode: "light",
|
|
2455
|
+
trigger: /* @__PURE__ */ a(le, { children: /* @__PURE__ */ a(sr, {}) }),
|
|
2456
|
+
defaultPlacement: "bottom-end",
|
|
2457
|
+
children: [
|
|
2458
|
+
/* @__PURE__ */ a(
|
|
2459
|
+
oe,
|
|
2460
|
+
{
|
|
2461
|
+
label: "Profile",
|
|
2462
|
+
onClick: g,
|
|
2463
|
+
icon: /* @__PURE__ */ a(or, {})
|
|
2464
|
+
}
|
|
2465
|
+
),
|
|
2466
|
+
/* @__PURE__ */ a(
|
|
2467
|
+
oe,
|
|
2468
|
+
{
|
|
2469
|
+
label: "Settings",
|
|
2470
|
+
onClick: i,
|
|
2471
|
+
icon: /* @__PURE__ */ a(lr, {})
|
|
2472
|
+
}
|
|
2473
|
+
),
|
|
2474
|
+
/* @__PURE__ */ a(
|
|
2475
|
+
oe,
|
|
2476
|
+
{
|
|
2477
|
+
label: "History",
|
|
2478
|
+
onClick: f,
|
|
2479
|
+
icon: /* @__PURE__ */ a(rr, {})
|
|
2480
|
+
}
|
|
2481
|
+
),
|
|
2482
|
+
/* @__PURE__ */ a(
|
|
2483
|
+
oe,
|
|
2484
|
+
{
|
|
2485
|
+
label: "About",
|
|
2486
|
+
onClick: v,
|
|
2487
|
+
icon: /* @__PURE__ */ a(ar, {})
|
|
2488
|
+
}
|
|
2489
|
+
),
|
|
2490
|
+
r && r.id && !r.isComponent && /* @__PURE__ */ h(M, { children: [
|
|
2491
|
+
/* @__PURE__ */ a(Ht, {}),
|
|
2492
|
+
/* @__PURE__ */ a(
|
|
2493
|
+
oe,
|
|
2494
|
+
{
|
|
2495
|
+
label: "Log out",
|
|
2496
|
+
onClick: y,
|
|
2497
|
+
icon: /* @__PURE__ */ a("div", { className: "text-red-700", children: /* @__PURE__ */ a(Zt, { monotone: !0 }) })
|
|
2498
|
+
}
|
|
2499
|
+
)
|
|
2500
|
+
] })
|
|
2501
|
+
]
|
|
2502
|
+
}
|
|
2503
|
+
) }) }) }) }) })
|
|
2504
|
+
] });
|
|
2505
|
+
};
|
|
2506
|
+
export {
|
|
2507
|
+
ka as default
|
|
2508
|
+
};
|