@versini/sassysaint 6.1.0 → 6.2.0
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.CVKf39VG.js → App.D4e44Rzs.js} +345 -329
- package/dist/chunks/{HeaderToolbar.VQAMrnVQ.js → HeaderToolbar.tIMWuB4m.js} +348 -322
- package/dist/chunks/{MarkdownWithExtra.CEPqANDe.js → MarkdownWithExtra.D7xk9RRF.js} +2 -2
- package/dist/chunks/{MessageAssistant.DZZ26s7B.js → MessageAssistant.CNnXZvb4.js} +3 -3
- package/dist/chunks/{index.DUNIGQ5_.js → index.CUiqvVTR.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e, Fragment as z } from "react/jsx-runtime";
|
|
2
|
-
import { g as
|
|
3
|
-
import { i as me, useServerCapabilities as
|
|
4
|
-
import At, { useRef as S, useState as
|
|
2
|
+
import { g as V, un as F, R as B, CARDS as N, renderDataAsList as de, pluralize as ue, ABOUT_TITLE as Qe, INFINITE_SCROLL_LIMIT as Se, INFINITE_SCROLL_THRESHOLD as ve, LOCAL_STORAGE_PREFIX as ke, LOCAL_STORAGE_SORT as Je, Y as oe, ACTION_RESET as Ze, ACTION_RESTORE as et, ACTION_SORT as Ae, LOCAL_STORAGE_SEARCH as tt, HISTORY_TITLE as rt, ye as be, C as X, ACTION_SEARCH as nt, debounce as at, M as ot, L as q, j as O, l as Ie, durationFormatter as st, PROFILE_TITLE as lt, PROMPTS_DESCRIPTION as ct, DEFAULT_AI_ENGINE as it, LOCAL_STORAGE_CHAT_DETAILS as dt, SETTINGS_TITLE as ut, ENGINE_OPENAI as W, ENGINE_ANTHROPIC as ee, APP_NAME as mt, getCurrentGeoLocation as ht, LOG_OUT as _e } from "./index.CUiqvVTR.js";
|
|
3
|
+
import { i as me, useServerCapabilities as ft, Ie as ce, HistoryContext as Me, E as Ce, ConfirmationPanel as Pe, ge as pt, he as gt, ue as ge, le as P, ye as yt, me as bt, p as xt, z as kt, be as Ct, serviceCall as se, SERVICE_TYPES as le, f as te, AppContext as Oe, useChatsHistory as Et, useUserChatStats as Tt, useUserPreferences as ze, m as Nt, _e as wt, me$1 as St, R as re, P as vt } from "./App.D4e44Rzs.js";
|
|
4
|
+
import At, { useRef as S, useState as C, useContext as he, useCallback as Be, useEffect as H, Fragment as It, useLayoutEffect as ne, useMemo as He, useId as _t, useReducer as Rt } from "react";
|
|
5
5
|
import y from "clsx";
|
|
6
6
|
const Lt = ({
|
|
7
7
|
className: t,
|
|
@@ -10,7 +10,7 @@ const Lt = ({
|
|
|
10
10
|
monotone: n,
|
|
11
11
|
...r
|
|
12
12
|
}) => /* @__PURE__ */ i(
|
|
13
|
-
|
|
13
|
+
V,
|
|
14
14
|
{
|
|
15
15
|
defaultViewBox: "0 0 512 512",
|
|
16
16
|
size: "size-5",
|
|
@@ -36,7 +36,7 @@ const Lt = ({
|
|
|
36
36
|
monotone: n,
|
|
37
37
|
...r
|
|
38
38
|
}) => /* @__PURE__ */ i(
|
|
39
|
-
|
|
39
|
+
V,
|
|
40
40
|
{
|
|
41
41
|
defaultViewBox: "0 0 448 512",
|
|
42
42
|
size: "size-5",
|
|
@@ -55,14 +55,14 @@ const Lt = ({
|
|
|
55
55
|
/* @__PURE__ */ e("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 32 32 32h384c17.7 0 32-14.3 32-32s-14.3-32-32-32h-96l-7.2-14.3C307.4 6.8 296.3 0 284.2 0z" })
|
|
56
56
|
]
|
|
57
57
|
}
|
|
58
|
-
),
|
|
58
|
+
), Pt = ({
|
|
59
59
|
className: t,
|
|
60
60
|
viewBox: a,
|
|
61
61
|
title: o,
|
|
62
62
|
monotone: n,
|
|
63
63
|
...r
|
|
64
64
|
}) => /* @__PURE__ */ i(
|
|
65
|
-
|
|
65
|
+
V,
|
|
66
66
|
{
|
|
67
67
|
defaultViewBox: "0 0 512 512",
|
|
68
68
|
size: "size-5",
|
|
@@ -81,14 +81,14 @@ const Lt = ({
|
|
|
81
81
|
/* @__PURE__ */ e("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" })
|
|
82
82
|
]
|
|
83
83
|
}
|
|
84
|
-
),
|
|
84
|
+
), Ot = ({
|
|
85
85
|
className: t,
|
|
86
86
|
viewBox: a,
|
|
87
87
|
title: o,
|
|
88
88
|
monotone: n,
|
|
89
89
|
...r
|
|
90
90
|
}) => /* @__PURE__ */ i(
|
|
91
|
-
|
|
91
|
+
V,
|
|
92
92
|
{
|
|
93
93
|
defaultViewBox: "0 0 512 512",
|
|
94
94
|
size: "size-5",
|
|
@@ -114,7 +114,7 @@ const Lt = ({
|
|
|
114
114
|
monotone: n,
|
|
115
115
|
...r
|
|
116
116
|
}) => /* @__PURE__ */ i(
|
|
117
|
-
|
|
117
|
+
V,
|
|
118
118
|
{
|
|
119
119
|
defaultViewBox: "0 0 576 512",
|
|
120
120
|
size: "size-5",
|
|
@@ -140,7 +140,7 @@ const Lt = ({
|
|
|
140
140
|
monotone: n,
|
|
141
141
|
...r
|
|
142
142
|
}) => /* @__PURE__ */ i(
|
|
143
|
-
|
|
143
|
+
V,
|
|
144
144
|
{
|
|
145
145
|
defaultViewBox: "0 0 512 512",
|
|
146
146
|
size: "size-5",
|
|
@@ -166,7 +166,7 @@ const Lt = ({
|
|
|
166
166
|
monotone: n,
|
|
167
167
|
...r
|
|
168
168
|
}) => /* @__PURE__ */ e(
|
|
169
|
-
|
|
169
|
+
V,
|
|
170
170
|
{
|
|
171
171
|
defaultViewBox: "0 0 448 512",
|
|
172
172
|
size: "size-5",
|
|
@@ -183,7 +183,7 @@ const Lt = ({
|
|
|
183
183
|
monotone: n,
|
|
184
184
|
...r
|
|
185
185
|
}) => /* @__PURE__ */ i(
|
|
186
|
-
|
|
186
|
+
V,
|
|
187
187
|
{
|
|
188
188
|
defaultViewBox: "0 0 512 512",
|
|
189
189
|
size: "size-5",
|
|
@@ -203,11 +203,11 @@ const Lt = ({
|
|
|
203
203
|
]
|
|
204
204
|
}
|
|
205
205
|
), $t = () => {
|
|
206
|
-
const { getAccessToken: t } =
|
|
206
|
+
const { getAccessToken: t } = F(), a = me(), o = me(), {
|
|
207
207
|
data: n,
|
|
208
208
|
error: r,
|
|
209
|
-
isLoading:
|
|
210
|
-
} =
|
|
209
|
+
isLoading: c
|
|
210
|
+
} = ft({
|
|
211
211
|
getAccessToken: t
|
|
212
212
|
}), s = (n == null ? void 0 : n.plugins) || [], d = (n == null ? void 0 : n.version) || "", u = (n == null ? void 0 : n.models) || [];
|
|
213
213
|
return /* @__PURE__ */ i(z, { children: [
|
|
@@ -217,20 +217,20 @@ const Lt = ({
|
|
|
217
217
|
header: N.ABOUT.TITLE_CLIENT,
|
|
218
218
|
className: "prose-dark dark:prose-lighter",
|
|
219
219
|
children: de(a, {
|
|
220
|
-
[N.ABOUT.VERSION]: "6.
|
|
221
|
-
[N.ABOUT.BUILD_TIMESTAMP]: "01/23/2025
|
|
220
|
+
[N.ABOUT.VERSION]: "6.2.0",
|
|
221
|
+
[N.ABOUT.BUILD_TIMESTAMP]: "01/23/2025 12:23 PM EST"
|
|
222
222
|
})
|
|
223
223
|
}
|
|
224
224
|
) }),
|
|
225
|
-
r ||
|
|
225
|
+
r || c ? null : /* @__PURE__ */ e(
|
|
226
226
|
B,
|
|
227
227
|
{
|
|
228
228
|
header: N.ABOUT.TITLE_SERVER,
|
|
229
229
|
className: "prose-dark dark:prose-lighter",
|
|
230
230
|
children: de(o, {
|
|
231
231
|
[N.ABOUT.VERSION]: d,
|
|
232
|
-
[ue(N.ABOUT.ENGINE, u.length)]: /* @__PURE__ */ e(z, { children: u.map((
|
|
233
|
-
[ue(N.ABOUT.PLUGIN, s.length)]: /* @__PURE__ */ e(z, { children: s.map((
|
|
232
|
+
[ue(N.ABOUT.ENGINE, u.length)]: /* @__PURE__ */ e(z, { children: u.map((f) => /* @__PURE__ */ e("div", { className: "text-right", children: f }, f)) }),
|
|
233
|
+
[ue(N.ABOUT.PLUGIN, s.length)]: /* @__PURE__ */ e(z, { children: s.map((f) => /* @__PURE__ */ e("div", { className: "text-right", children: f }, f)) })
|
|
234
234
|
})
|
|
235
235
|
}
|
|
236
236
|
)
|
|
@@ -238,11 +238,11 @@ const Lt = ({
|
|
|
238
238
|
}, Vt = ({
|
|
239
239
|
open: t,
|
|
240
240
|
onOpenChange: a
|
|
241
|
-
}) => /* @__PURE__ */ e(
|
|
241
|
+
}) => /* @__PURE__ */ e(ce, { open: t, onOpenChange: a, title: Qe, children: /* @__PURE__ */ e($t, {}) }), Ft = async (t, a, o, n) => {
|
|
242
242
|
try {
|
|
243
|
-
const r = await
|
|
243
|
+
const r = await se({
|
|
244
244
|
accessToken: n,
|
|
245
|
-
type:
|
|
245
|
+
type: le.GET_CHAT,
|
|
246
246
|
params: {
|
|
247
247
|
id: t.id
|
|
248
248
|
}
|
|
@@ -267,19 +267,19 @@ const Lt = ({
|
|
|
267
267
|
mutate: n
|
|
268
268
|
}) => {
|
|
269
269
|
var A;
|
|
270
|
-
const { user: r, getAccessToken:
|
|
270
|
+
const { user: r, getAccessToken: c } = F(), s = S(null), d = S({
|
|
271
271
|
id: 0,
|
|
272
272
|
timestamp: "",
|
|
273
273
|
message: ""
|
|
274
|
-
}), [u,
|
|
274
|
+
}), [u, f] = C(!1), [p, b] = C(
|
|
275
275
|
Se + ve
|
|
276
|
-
), { state: x, dispatch:
|
|
276
|
+
), { state: x, dispatch: l } = he(Me), [, h] = Ce({
|
|
277
277
|
key: ke + Je,
|
|
278
278
|
initialValue: x.sortDirection
|
|
279
279
|
}), T = (m) => {
|
|
280
280
|
switch (x.sortDirection) {
|
|
281
281
|
case te.ASC:
|
|
282
|
-
|
|
282
|
+
h(te.DESC), l({
|
|
283
283
|
type: Ae,
|
|
284
284
|
payload: {
|
|
285
285
|
sortedCell: m,
|
|
@@ -288,7 +288,7 @@ const Lt = ({
|
|
|
288
288
|
});
|
|
289
289
|
break;
|
|
290
290
|
default:
|
|
291
|
-
|
|
291
|
+
h(te.ASC), l({
|
|
292
292
|
type: Ae,
|
|
293
293
|
payload: {
|
|
294
294
|
sortedCell: m,
|
|
@@ -297,12 +297,12 @@ const Lt = ({
|
|
|
297
297
|
});
|
|
298
298
|
break;
|
|
299
299
|
}
|
|
300
|
-
},
|
|
300
|
+
}, E = async () => {
|
|
301
301
|
const m = d.current;
|
|
302
302
|
try {
|
|
303
|
-
await
|
|
304
|
-
accessToken: await
|
|
305
|
-
type:
|
|
303
|
+
await se({
|
|
304
|
+
accessToken: await c(),
|
|
305
|
+
type: le.DELETE_CHAT,
|
|
306
306
|
params: {
|
|
307
307
|
userId: (r == null ? void 0 : r.username) || "",
|
|
308
308
|
id: m.id
|
|
@@ -311,9 +311,9 @@ const Lt = ({
|
|
|
311
311
|
} catch {
|
|
312
312
|
}
|
|
313
313
|
}, g = Be((m) => {
|
|
314
|
-
m[0].isIntersecting && b((
|
|
314
|
+
m[0].isIntersecting && b((I) => I + Se);
|
|
315
315
|
}, []);
|
|
316
|
-
return
|
|
316
|
+
return H(() => {
|
|
317
317
|
const m = {
|
|
318
318
|
// root: null,
|
|
319
319
|
rootMargin: "20px"
|
|
@@ -321,11 +321,11 @@ const Lt = ({
|
|
|
321
321
|
s.current && w.observe(s.current);
|
|
322
322
|
}), /* @__PURE__ */ i(z, { children: [
|
|
323
323
|
/* @__PURE__ */ i(
|
|
324
|
-
|
|
324
|
+
Pe,
|
|
325
325
|
{
|
|
326
326
|
showConfirmation: u,
|
|
327
|
-
setShowConfirmation:
|
|
328
|
-
action:
|
|
327
|
+
setShowConfirmation: f,
|
|
328
|
+
action: E,
|
|
329
329
|
customStrings: {
|
|
330
330
|
confirmAction: "Delete",
|
|
331
331
|
cancelAction: "Cancel",
|
|
@@ -348,9 +348,9 @@ const Lt = ({
|
|
|
348
348
|
]
|
|
349
349
|
}
|
|
350
350
|
),
|
|
351
|
-
/* @__PURE__ */ i(
|
|
351
|
+
/* @__PURE__ */ i(pt, { stickyHeader: !0, stickyFooter: !0, compact: !0, children: [
|
|
352
352
|
/* @__PURE__ */ e(gt, { children: /* @__PURE__ */ i(ge, { children: [
|
|
353
|
-
/* @__PURE__ */ e(
|
|
353
|
+
/* @__PURE__ */ e(P, { className: "sr-only", children: "Row" }),
|
|
354
354
|
/* @__PURE__ */ e(
|
|
355
355
|
yt,
|
|
356
356
|
{
|
|
@@ -365,18 +365,18 @@ const Lt = ({
|
|
|
365
365
|
children: "Date"
|
|
366
366
|
}
|
|
367
367
|
),
|
|
368
|
-
/* @__PURE__ */ e(
|
|
369
|
-
/* @__PURE__ */ e(
|
|
370
|
-
/* @__PURE__ */ e(
|
|
368
|
+
/* @__PURE__ */ e(P, { className: "text-xs sm:text-sm", children: "First message" }),
|
|
369
|
+
/* @__PURE__ */ e(P, { className: "text-xs sm:text-sm", children: "Model" }),
|
|
370
|
+
/* @__PURE__ */ e(P, { className: "text-xs sm:text-sm text-right", children: "Actions" })
|
|
371
371
|
] }) }),
|
|
372
|
-
/* @__PURE__ */ e(bt, { children: t.slice(0,
|
|
373
|
-
var
|
|
374
|
-
return ((
|
|
375
|
-
w ===
|
|
372
|
+
/* @__PURE__ */ e(bt, { children: t.slice(0, p).map((m, w) => {
|
|
373
|
+
var I, D;
|
|
374
|
+
return ((I = m == null ? void 0 : m.messages) == null ? void 0 : I.length) > 0 ? /* @__PURE__ */ i(It, { children: [
|
|
375
|
+
w === p - ve && /* @__PURE__ */ e("tr", { ref: s }),
|
|
376
376
|
/* @__PURE__ */ i(ge, { children: [
|
|
377
|
-
/* @__PURE__ */ e(
|
|
377
|
+
/* @__PURE__ */ e(P, { children: w + 1 }),
|
|
378
378
|
/* @__PURE__ */ e(
|
|
379
|
-
|
|
379
|
+
P,
|
|
380
380
|
{
|
|
381
381
|
component: "th",
|
|
382
382
|
scope: "row",
|
|
@@ -385,17 +385,17 @@ const Lt = ({
|
|
|
385
385
|
}
|
|
386
386
|
),
|
|
387
387
|
/* @__PURE__ */ e(
|
|
388
|
-
|
|
388
|
+
P,
|
|
389
389
|
{
|
|
390
390
|
className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
|
|
391
391
|
style: {
|
|
392
392
|
wordBreak: "break-word"
|
|
393
393
|
},
|
|
394
|
-
children: m.messages.length > 0 ? (
|
|
394
|
+
children: m.messages.length > 0 ? (D = m.messages[0]) == null ? void 0 : D.content : ""
|
|
395
395
|
}
|
|
396
396
|
),
|
|
397
397
|
/* @__PURE__ */ i(
|
|
398
|
-
|
|
398
|
+
P,
|
|
399
399
|
{
|
|
400
400
|
component: "th",
|
|
401
401
|
scope: "row",
|
|
@@ -407,16 +407,16 @@ const Lt = ({
|
|
|
407
407
|
]
|
|
408
408
|
}
|
|
409
409
|
),
|
|
410
|
-
/* @__PURE__ */ i(
|
|
410
|
+
/* @__PURE__ */ i(P, { align: "right", children: [
|
|
411
411
|
/* @__PURE__ */ e(
|
|
412
|
-
|
|
412
|
+
oe,
|
|
413
413
|
{
|
|
414
414
|
className: "mr-2",
|
|
415
415
|
focusMode: "alt-system",
|
|
416
416
|
noBorder: !0,
|
|
417
417
|
label: "Restore chat",
|
|
418
418
|
onClick: async () => {
|
|
419
|
-
const L = await
|
|
419
|
+
const L = await c();
|
|
420
420
|
Ft(
|
|
421
421
|
m,
|
|
422
422
|
a,
|
|
@@ -428,7 +428,7 @@ const Lt = ({
|
|
|
428
428
|
}
|
|
429
429
|
),
|
|
430
430
|
/* @__PURE__ */ e(
|
|
431
|
-
|
|
431
|
+
oe,
|
|
432
432
|
{
|
|
433
433
|
focusMode: "alt-system",
|
|
434
434
|
noBorder: !0,
|
|
@@ -439,7 +439,7 @@ const Lt = ({
|
|
|
439
439
|
id: m.id,
|
|
440
440
|
timestamp: m.timestamp,
|
|
441
441
|
message: m.messages.length > 0 ? (L = m.messages[0]) == null ? void 0 : L.content : ""
|
|
442
|
-
},
|
|
442
|
+
}, f(!u);
|
|
443
443
|
},
|
|
444
444
|
children: /* @__PURE__ */ e("div", { className: "text-red-400", children: /* @__PURE__ */ e(Mt, { size: "size-3", monotone: !0 }) })
|
|
445
445
|
}
|
|
@@ -448,7 +448,7 @@ const Lt = ({
|
|
|
448
448
|
] })
|
|
449
449
|
] }, `${N.HISTORY.TITLE}-${m.id}-${w}`) : null;
|
|
450
450
|
}) }),
|
|
451
|
-
/* @__PURE__ */ e(
|
|
451
|
+
/* @__PURE__ */ e(Ct, { children: /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(P, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: ue(
|
|
452
452
|
`${t.length} chat`,
|
|
453
453
|
t.length
|
|
454
454
|
) }) }) }) })
|
|
@@ -458,7 +458,7 @@ const Lt = ({
|
|
|
458
458
|
open: t,
|
|
459
459
|
onOpenChange: a
|
|
460
460
|
}) => {
|
|
461
|
-
const { getAccessToken: o, user: n } =
|
|
461
|
+
const { getAccessToken: o, user: n } = F(), { state: r, dispatch: c } = he(Oe), { state: s, dispatch: d } = he(Me), { data: u, mutate: f } = Et({
|
|
462
462
|
keys: [
|
|
463
463
|
n == null ? void 0 : n.username,
|
|
464
464
|
s.searchString,
|
|
@@ -466,22 +466,22 @@ const Lt = ({
|
|
|
466
466
|
(r == null ? void 0 : r.lastTriggeredTimestamp) || 0
|
|
467
467
|
],
|
|
468
468
|
getAccessToken: o
|
|
469
|
-
}),
|
|
469
|
+
}), p = S(null), [, b] = Ce({
|
|
470
470
|
key: ke + tt,
|
|
471
471
|
initialValue: s.searchString
|
|
472
|
-
}), [x,
|
|
473
|
-
|
|
474
|
-
u &&
|
|
472
|
+
}), [x, l] = C([]);
|
|
473
|
+
H(() => {
|
|
474
|
+
u && l(u);
|
|
475
475
|
}, [u]);
|
|
476
|
-
const
|
|
476
|
+
const h = async (g) => {
|
|
477
477
|
b(g), d({
|
|
478
478
|
type: nt,
|
|
479
479
|
payload: { searchString: g }
|
|
480
480
|
});
|
|
481
481
|
}, T = at((g) => {
|
|
482
|
-
|
|
482
|
+
h(g.target.value.trim());
|
|
483
483
|
}, 500);
|
|
484
|
-
return /* @__PURE__ */ e(
|
|
484
|
+
return /* @__PURE__ */ e(ce, { open: t, onOpenChange: a, title: rt, children: /* @__PURE__ */ i(z, { children: [
|
|
485
485
|
/* @__PURE__ */ e("form", { autoComplete: "off", onSubmit: async (g) => {
|
|
486
486
|
g.preventDefault();
|
|
487
487
|
}, children: /* @__PURE__ */ e(
|
|
@@ -490,7 +490,7 @@ const Lt = ({
|
|
|
490
490
|
autoCapitalize: "off",
|
|
491
491
|
autoComplete: "off",
|
|
492
492
|
autoCorrect: "off",
|
|
493
|
-
ref:
|
|
493
|
+
ref: p,
|
|
494
494
|
defaultValue: s.searchString,
|
|
495
495
|
focusMode: "light",
|
|
496
496
|
mode: "dark",
|
|
@@ -510,7 +510,7 @@ const Lt = ({
|
|
|
510
510
|
size: "small",
|
|
511
511
|
onClick: () => {
|
|
512
512
|
var g;
|
|
513
|
-
|
|
513
|
+
h(""), (g = p.current) != null && g.value && (p.current.value = "", p.current.focus());
|
|
514
514
|
},
|
|
515
515
|
children: "Reset"
|
|
516
516
|
}
|
|
@@ -521,22 +521,22 @@ const Lt = ({
|
|
|
521
521
|
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2 sm:flex-row max-h-[60vh] min-h-[60vh]", children: /* @__PURE__ */ e(
|
|
522
522
|
Gt,
|
|
523
523
|
{
|
|
524
|
-
mutate:
|
|
524
|
+
mutate: f,
|
|
525
525
|
filteredHistory: x,
|
|
526
|
-
dispatch:
|
|
526
|
+
dispatch: c,
|
|
527
527
|
onOpenChange: a
|
|
528
528
|
}
|
|
529
529
|
) })
|
|
530
530
|
] }) });
|
|
531
531
|
}, Yt = ({ stats: t }) => {
|
|
532
|
-
const { isAuthenticated: a, user: o, registeringForPasskey: n, authenticationType: r } =
|
|
532
|
+
const { isAuthenticated: a, user: o, registeringForPasskey: n, authenticationType: r } = F(), c = me(), s = me(), d = (o == null ? void 0 : o.username) || "";
|
|
533
533
|
return a && d ? /* @__PURE__ */ i(z, { children: [
|
|
534
534
|
/* @__PURE__ */ e(
|
|
535
535
|
B,
|
|
536
536
|
{
|
|
537
537
|
header: N.PREFERENCES.TITLE,
|
|
538
538
|
className: "prose-dark dark:prose-lighter",
|
|
539
|
-
children: de(
|
|
539
|
+
children: de(c, {
|
|
540
540
|
[N.PREFERENCES.NAME]: d,
|
|
541
541
|
[N.PREFERENCES.EMAIL]: (o == null ? void 0 : o.email) || ""
|
|
542
542
|
})
|
|
@@ -547,13 +547,13 @@ const Lt = ({
|
|
|
547
547
|
{
|
|
548
548
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
549
549
|
header: /* @__PURE__ */ e("h2", { className: "m-0", children: /* @__PURE__ */ i(q, { columnGap: 3, alignVertical: "center", children: [
|
|
550
|
-
/* @__PURE__ */ e(
|
|
551
|
-
/* @__PURE__ */ e(
|
|
550
|
+
/* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(Ie, { size: "size-8" }) }),
|
|
551
|
+
/* @__PURE__ */ e(O, { children: /* @__PURE__ */ e("div", { children: N.PREFERENCES.PASSKEY_TITLE }) })
|
|
552
552
|
] }) }),
|
|
553
553
|
children: [
|
|
554
554
|
/* @__PURE__ */ e("p", { children: N.PREFERENCES.PASSKEY_INSTRUCTIONS }),
|
|
555
555
|
/* @__PURE__ */ e(
|
|
556
|
-
|
|
556
|
+
oe,
|
|
557
557
|
{
|
|
558
558
|
size: "small",
|
|
559
559
|
className: "mt-2",
|
|
@@ -583,15 +583,15 @@ const Lt = ({
|
|
|
583
583
|
open: t,
|
|
584
584
|
onOpenChange: a
|
|
585
585
|
}) => {
|
|
586
|
-
const { getAccessToken: o, user: n } =
|
|
586
|
+
const { getAccessToken: o, user: n } = F(), {
|
|
587
587
|
data: r,
|
|
588
|
-
error:
|
|
588
|
+
error: c,
|
|
589
589
|
isLoading: s
|
|
590
590
|
} = Tt({
|
|
591
591
|
keys: [n == null ? void 0 : n.username],
|
|
592
592
|
getAccessToken: o
|
|
593
593
|
});
|
|
594
|
-
return
|
|
594
|
+
return c || s ? null : /* @__PURE__ */ e(ce, { open: t, onOpenChange: a, title: lt, children: /* @__PURE__ */ e(Yt, { stats: r }) });
|
|
595
595
|
};
|
|
596
596
|
/*!
|
|
597
597
|
@versini/ui-textarea v3.0.10
|
|
@@ -609,7 +609,7 @@ try {
|
|
|
609
609
|
const De = "av-text-area", Kt = "av-text-area-wrapper", ye = "av-text-area-helper-text", Wt = "av-text-area__control--right", Xt = "av-text-area__control--left";
|
|
610
610
|
function qt() {
|
|
611
611
|
const t = S(!1);
|
|
612
|
-
return
|
|
612
|
+
return H(() => (t.current = !0, () => {
|
|
613
613
|
t.current = !1;
|
|
614
614
|
}), []), Be(() => t.current, []);
|
|
615
615
|
}
|
|
@@ -632,13 +632,13 @@ const Jt = {
|
|
|
632
632
|
right: 0
|
|
633
633
|
};
|
|
634
634
|
function Re(t) {
|
|
635
|
-
const a = qt(), o = S(0), n = S(null), [r,
|
|
635
|
+
const a = qt(), o = S(0), n = S(null), [r, c] = C(Jt), s = He(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
|
|
636
636
|
const u = d[0];
|
|
637
637
|
u && (cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
|
|
638
|
-
n.current && a() &&
|
|
638
|
+
n.current && a() && c(u.contentRect);
|
|
639
639
|
}));
|
|
640
640
|
}), [a]);
|
|
641
|
-
return
|
|
641
|
+
return H(() => (n.current && (s == null || s.observe(n.current, t)), () => {
|
|
642
642
|
s == null || s.disconnect(), o.current && cancelAnimationFrame(o.current);
|
|
643
643
|
}), [s, t]), [n, r];
|
|
644
644
|
}
|
|
@@ -650,16 +650,16 @@ function Zt({
|
|
|
650
650
|
},
|
|
651
651
|
initialControlledDelay: r = 0
|
|
652
652
|
}) {
|
|
653
|
-
const [
|
|
653
|
+
const [c, s] = C(!1), [d, u] = C(
|
|
654
654
|
a !== void 0 ? a : o
|
|
655
|
-
),
|
|
656
|
-
u(
|
|
655
|
+
), f = (p) => {
|
|
656
|
+
u(p), n == null || n(p);
|
|
657
657
|
};
|
|
658
|
-
return
|
|
659
|
-
(async () => t !== void 0 && !
|
|
660
|
-
(
|
|
658
|
+
return H(() => {
|
|
659
|
+
(async () => t !== void 0 && !c && r > 0 && (await new Promise(
|
|
660
|
+
(p) => setTimeout(p, r)
|
|
661
661
|
), s(!0)))();
|
|
662
|
-
}, [t, r,
|
|
662
|
+
}, [t, r, c]), t !== void 0 ? !c && r > 0 ? ["", n, !0] : [t, n, !0] : [d, f, !1];
|
|
663
663
|
}
|
|
664
664
|
function er(t) {
|
|
665
665
|
const a = _t();
|
|
@@ -725,20 +725,20 @@ const $e = "SET_ANNOUNCEMENT", Ve = "CLEAR_ANNOUNCEMENT", tr = {
|
|
|
725
725
|
announcementDelay: o,
|
|
726
726
|
clearAnnouncementDelay: n,
|
|
727
727
|
clearAnnouncementTimeoutRef: r,
|
|
728
|
-
onAnnouncementClear:
|
|
728
|
+
onAnnouncementClear: c,
|
|
729
729
|
dispatch: s
|
|
730
730
|
}) => {
|
|
731
731
|
clearTimeout(a.current), o ? a.current = setTimeout(Le, o, {
|
|
732
732
|
children: t,
|
|
733
733
|
clearAnnouncementDelay: n,
|
|
734
734
|
clearAnnouncementTimeoutRef: r,
|
|
735
|
-
onAnnouncementClear:
|
|
735
|
+
onAnnouncementClear: c,
|
|
736
736
|
dispatch: s
|
|
737
737
|
}) : Le({
|
|
738
738
|
children: t,
|
|
739
739
|
clearAnnouncementDelay: n,
|
|
740
740
|
clearAnnouncementTimeoutRef: r,
|
|
741
|
-
onAnnouncementClear:
|
|
741
|
+
onAnnouncementClear: c,
|
|
742
742
|
dispatch: s
|
|
743
743
|
});
|
|
744
744
|
};
|
|
@@ -748,40 +748,40 @@ function or({
|
|
|
748
748
|
politeness: o,
|
|
749
749
|
role: n = null,
|
|
750
750
|
announcementDelay: r,
|
|
751
|
-
clearAnnouncementDelay:
|
|
751
|
+
clearAnnouncementDelay: c,
|
|
752
752
|
onAnnouncementClear: s,
|
|
753
753
|
visible: d,
|
|
754
754
|
...u
|
|
755
755
|
}) {
|
|
756
|
-
const
|
|
756
|
+
const f = S(null), p = S(null), [b, x] = Rt(rr, {
|
|
757
757
|
announcement: null
|
|
758
758
|
});
|
|
759
|
-
let
|
|
760
|
-
typeof
|
|
759
|
+
let l = o;
|
|
760
|
+
typeof l > "u" && (l = n ? tr[n] : "assertive"), H(() => {
|
|
761
761
|
ar({
|
|
762
|
-
announcementTimeoutRef:
|
|
762
|
+
announcementTimeoutRef: f,
|
|
763
763
|
announcementDelay: r,
|
|
764
764
|
children: t,
|
|
765
|
-
clearAnnouncementDelay:
|
|
766
|
-
clearAnnouncementTimeoutRef:
|
|
765
|
+
clearAnnouncementDelay: c,
|
|
766
|
+
clearAnnouncementTimeoutRef: p,
|
|
767
767
|
onAnnouncementClear: s,
|
|
768
768
|
dispatch: x
|
|
769
769
|
});
|
|
770
770
|
}, [
|
|
771
771
|
t,
|
|
772
772
|
r,
|
|
773
|
-
|
|
773
|
+
c,
|
|
774
774
|
s
|
|
775
775
|
]);
|
|
776
|
-
const
|
|
776
|
+
const h = y(a, {
|
|
777
777
|
"sr-only": !d
|
|
778
778
|
});
|
|
779
779
|
return /* @__PURE__ */ e(
|
|
780
780
|
"div",
|
|
781
781
|
{
|
|
782
|
-
"aria-live":
|
|
782
|
+
"aria-live": l,
|
|
783
783
|
...n && { role: n },
|
|
784
|
-
className:
|
|
784
|
+
className: h,
|
|
785
785
|
...u,
|
|
786
786
|
children: b.announcement
|
|
787
787
|
}
|
|
@@ -826,7 +826,7 @@ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
826
826
|
error: o,
|
|
827
827
|
mode: n,
|
|
828
828
|
leftElement: r,
|
|
829
|
-
rightElement:
|
|
829
|
+
rightElement: c
|
|
830
830
|
}) => {
|
|
831
831
|
if (a)
|
|
832
832
|
return "";
|
|
@@ -834,14 +834,14 @@ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
834
834
|
return y(
|
|
835
835
|
"transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
|
|
836
836
|
{
|
|
837
|
-
"translate-x-[12px]":
|
|
837
|
+
"translate-x-[12px]": c === !0 && !r || !c && !r
|
|
838
838
|
}
|
|
839
839
|
);
|
|
840
840
|
if (!o)
|
|
841
841
|
return y(
|
|
842
842
|
"absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
|
|
843
843
|
{
|
|
844
|
-
"translate-x-[12px]":
|
|
844
|
+
"translate-x-[12px]": c === !0 && !r || !c && !r,
|
|
845
845
|
"text-copy-medium": n === "dark",
|
|
846
846
|
"text-copy-dark": n === "light",
|
|
847
847
|
"text-copy-dark dark:text-copy-medium": n === "system",
|
|
@@ -852,7 +852,7 @@ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
852
852
|
return y(
|
|
853
853
|
"absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
|
|
854
854
|
{
|
|
855
|
-
"translate-x-[12px]":
|
|
855
|
+
"translate-x-[12px]": c === !0 && !r || !c && !r,
|
|
856
856
|
"text-copy-medium": n === "dark",
|
|
857
857
|
"text-copy-error-dark": n === "light",
|
|
858
858
|
"text-copy-error-dark dark:text-copy-error-light": n === "system",
|
|
@@ -892,13 +892,13 @@ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
892
892
|
raw: o,
|
|
893
893
|
focusMode: n,
|
|
894
894
|
disabled: r,
|
|
895
|
-
noBorder:
|
|
895
|
+
noBorder: c,
|
|
896
896
|
error: s,
|
|
897
897
|
mode: d,
|
|
898
898
|
leftElement: u,
|
|
899
|
-
rightElement:
|
|
899
|
+
rightElement: f
|
|
900
900
|
}) => {
|
|
901
|
-
const
|
|
901
|
+
const p = o ? t : y(
|
|
902
902
|
"relative flex w-full flex-col justify-center",
|
|
903
903
|
Kt,
|
|
904
904
|
t
|
|
@@ -909,33 +909,33 @@ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
909
909
|
lr({ mode: d }),
|
|
910
910
|
cr({ focusMode: n }),
|
|
911
911
|
ir({
|
|
912
|
-
noBorder:
|
|
912
|
+
noBorder: c,
|
|
913
913
|
error: s
|
|
914
914
|
}),
|
|
915
915
|
{
|
|
916
916
|
"disabled:cursor-not-allowed disabled:opacity-50": r
|
|
917
917
|
}
|
|
918
|
-
), x = o ? void 0 : "sr-only",
|
|
918
|
+
), x = o ? void 0 : "sr-only", l = dr({
|
|
919
919
|
disabled: r,
|
|
920
920
|
raw: o,
|
|
921
921
|
error: s,
|
|
922
922
|
mode: d,
|
|
923
|
-
rightElement:
|
|
923
|
+
rightElement: f,
|
|
924
924
|
leftElement: u
|
|
925
|
-
}),
|
|
925
|
+
}), h = ur({
|
|
926
926
|
error: s,
|
|
927
927
|
raw: o,
|
|
928
928
|
mode: d,
|
|
929
929
|
disabled: r
|
|
930
|
-
}), T = o ? void 0 : y(Wt, "absolute"),
|
|
930
|
+
}), T = o ? void 0 : y(Wt, "absolute"), E = o ? void 0 : y(Xt, "absolute");
|
|
931
931
|
return {
|
|
932
|
-
wrapper:
|
|
932
|
+
wrapper: p,
|
|
933
933
|
textArea: b,
|
|
934
934
|
accessibleLabel: x,
|
|
935
|
-
visibleLabel:
|
|
936
|
-
helperText:
|
|
935
|
+
visibleLabel: l,
|
|
936
|
+
helperText: h,
|
|
937
937
|
rightElement: T,
|
|
938
|
-
leftElement:
|
|
938
|
+
leftElement: E
|
|
939
939
|
};
|
|
940
940
|
}, hr = ({
|
|
941
941
|
scrollHeight: t,
|
|
@@ -943,14 +943,14 @@ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
943
943
|
currentLabelOffset: o = 0,
|
|
944
944
|
currentHelperTextOffset: n = 0
|
|
945
945
|
}) => {
|
|
946
|
-
let r,
|
|
946
|
+
let r, c;
|
|
947
947
|
if (t > 0 && t !== a) {
|
|
948
948
|
const s = t - a, d = Math.abs(s / 24);
|
|
949
|
-
r = o + -1 * Math.sign(s) * (12 * d),
|
|
949
|
+
r = o + -1 * Math.sign(s) * (12 * d), c = n + Math.sign(s) * (12 * d);
|
|
950
950
|
}
|
|
951
951
|
return {
|
|
952
952
|
labelOffset: r,
|
|
953
|
-
helperTextOffset:
|
|
953
|
+
helperTextOffset: c,
|
|
954
954
|
scrollHeight: t
|
|
955
955
|
};
|
|
956
956
|
}, xe = At.forwardRef(
|
|
@@ -960,29 +960,29 @@ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
960
960
|
label: o,
|
|
961
961
|
error: n = !1,
|
|
962
962
|
raw: r = !1,
|
|
963
|
-
className:
|
|
963
|
+
className: c,
|
|
964
964
|
textAreaClassName: s,
|
|
965
965
|
mode: d = "system",
|
|
966
966
|
focusMode: u = "system",
|
|
967
|
-
value:
|
|
968
|
-
defaultValue:
|
|
967
|
+
value: f,
|
|
968
|
+
defaultValue: p,
|
|
969
969
|
disabled: b = !1,
|
|
970
970
|
noBorder: x = !1,
|
|
971
|
-
labelId:
|
|
972
|
-
helperText:
|
|
971
|
+
labelId: l,
|
|
972
|
+
helperText: h = "",
|
|
973
973
|
helperTextOnFocus: T = !1,
|
|
974
|
-
rightElement:
|
|
974
|
+
rightElement: E,
|
|
975
975
|
leftElement: g,
|
|
976
976
|
onChange: A,
|
|
977
977
|
onFocus: m,
|
|
978
978
|
onBlur: w,
|
|
979
|
-
...
|
|
980
|
-
},
|
|
979
|
+
...I
|
|
980
|
+
}, D) => {
|
|
981
981
|
var L;
|
|
982
|
-
const
|
|
983
|
-
!!(!T &&
|
|
984
|
-
), Ye = `${a} error, ${
|
|
985
|
-
className:
|
|
982
|
+
const _ = S(null), ie = Qt([D, _]), [k, R] = Re(), [Q, G] = Re(), K = S(80), U = S(-25), M = S(null), J = S(30), Z = S(null), Y = er({ id: t, prefix: `${De}-` }), [Ee, Fe] = C(0), [Te, Ge] = C(0), [Ue, Ne] = C(
|
|
983
|
+
!!(!T && h)
|
|
984
|
+
), Ye = `${a} error, ${h}`, j = mr({
|
|
985
|
+
className: c,
|
|
986
986
|
textAreaClassName: s,
|
|
987
987
|
error: n,
|
|
988
988
|
raw: r,
|
|
@@ -990,12 +990,12 @@ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
990
990
|
disabled: b,
|
|
991
991
|
noBorder: x,
|
|
992
992
|
mode: d,
|
|
993
|
-
rightElement: !!
|
|
993
|
+
rightElement: !!E,
|
|
994
994
|
leftElement: !!g
|
|
995
|
-
}), [
|
|
996
|
-
value:
|
|
995
|
+
}), [$, je] = Zt({
|
|
996
|
+
value: f,
|
|
997
997
|
initialControlledDelay: 20,
|
|
998
|
-
defaultValue:
|
|
998
|
+
defaultValue: p,
|
|
999
999
|
onChange: (v) => {
|
|
1000
1000
|
A && A({
|
|
1001
1001
|
target: {
|
|
@@ -1006,51 +1006,51 @@ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
1006
1006
|
}), Ke = (v) => {
|
|
1007
1007
|
je(v.target.value);
|
|
1008
1008
|
}, We = (v) => {
|
|
1009
|
-
T &&
|
|
1009
|
+
T && h && Ne(!0), m && m(v);
|
|
1010
1010
|
}, Xe = (v) => {
|
|
1011
|
-
T &&
|
|
1011
|
+
T && h && !$ && Ne(!1), w && w(v);
|
|
1012
1012
|
};
|
|
1013
1013
|
return ne(() => {
|
|
1014
|
-
|
|
1015
|
-
}, [
|
|
1016
|
-
|
|
1017
|
-
}, [
|
|
1018
|
-
r ||
|
|
1019
|
-
}, [
|
|
1014
|
+
R && R.width && Fe(R.width + 18 + 10);
|
|
1015
|
+
}, [R]), ne(() => {
|
|
1016
|
+
G && G.width && Ge(G.width + 18 + 10);
|
|
1017
|
+
}, [G]), ne(() => {
|
|
1018
|
+
r || _ && _.current && $ !== void 0 && (_.current.style.height = "inherit", _.current.style.height = _.current.scrollHeight + "px");
|
|
1019
|
+
}, [$, r]), ne(() => {
|
|
1020
1020
|
r || setTimeout(() => {
|
|
1021
1021
|
var v;
|
|
1022
1022
|
(v = M == null ? void 0 : M.current) == null || v.style.setProperty(
|
|
1023
1023
|
"--av-text-area-wrapper-transition",
|
|
1024
|
-
|
|
1024
|
+
$ ? "none" : "all 0.2s ease-out"
|
|
1025
1025
|
);
|
|
1026
1026
|
}, 0);
|
|
1027
|
-
}, [
|
|
1027
|
+
}, [$, r]), ne(() => {
|
|
1028
1028
|
var v, we;
|
|
1029
|
-
if (!r &&
|
|
1030
|
-
const { labelOffset:
|
|
1031
|
-
scrollHeight:
|
|
1029
|
+
if (!r && _ && _.current && $ !== void 0) {
|
|
1030
|
+
const { labelOffset: fe, helperTextOffset: pe, scrollHeight: qe } = hr({
|
|
1031
|
+
scrollHeight: _.current.scrollHeight,
|
|
1032
1032
|
currentHeight: K.current,
|
|
1033
|
-
currentLabelOffset:
|
|
1033
|
+
currentLabelOffset: U.current,
|
|
1034
1034
|
currentHelperTextOffset: J.current
|
|
1035
1035
|
});
|
|
1036
|
-
|
|
1036
|
+
fe && (U.current = fe, (v = M == null ? void 0 : M.current) == null || v.style.setProperty(
|
|
1037
1037
|
"--av-text-area-label",
|
|
1038
|
-
`${pe}px`
|
|
1039
|
-
)), fe && (J.current = fe, (we = Z == null ? void 0 : Z.current) == null || we.style.setProperty(
|
|
1040
|
-
"--av-text-area-helper-text",
|
|
1041
1038
|
`${fe}px`
|
|
1039
|
+
)), pe && (J.current = pe, (we = Z == null ? void 0 : Z.current) == null || we.style.setProperty(
|
|
1040
|
+
"--av-text-area-helper-text",
|
|
1041
|
+
`${pe}px`
|
|
1042
1042
|
)), K.current = qe || K.current;
|
|
1043
1043
|
}
|
|
1044
|
-
}, [
|
|
1044
|
+
}, [$, r]), G.width > 0 && ((L = M == null ? void 0 : M.current) == null || L.style.setProperty(
|
|
1045
1045
|
"--tw-translate-x",
|
|
1046
|
-
`${12 +
|
|
1047
|
-
)), /* @__PURE__ */ i("div", { className:
|
|
1046
|
+
`${12 + G.width + 5}px`
|
|
1047
|
+
)), /* @__PURE__ */ i("div", { className: j.wrapper, children: [
|
|
1048
1048
|
/* @__PURE__ */ e(
|
|
1049
1049
|
"label",
|
|
1050
1050
|
{
|
|
1051
|
-
htmlFor:
|
|
1052
|
-
id:
|
|
1053
|
-
className:
|
|
1051
|
+
htmlFor: Y,
|
|
1052
|
+
id: l,
|
|
1053
|
+
className: j.accessibleLabel,
|
|
1054
1054
|
children: o
|
|
1055
1055
|
}
|
|
1056
1056
|
),
|
|
@@ -1058,35 +1058,35 @@ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
1058
1058
|
"div",
|
|
1059
1059
|
{
|
|
1060
1060
|
ref: Q,
|
|
1061
|
-
className:
|
|
1061
|
+
className: j.leftElement,
|
|
1062
1062
|
children: g
|
|
1063
1063
|
}
|
|
1064
1064
|
),
|
|
1065
1065
|
/* @__PURE__ */ e(
|
|
1066
1066
|
"textarea",
|
|
1067
1067
|
{
|
|
1068
|
-
ref:
|
|
1069
|
-
id:
|
|
1068
|
+
ref: ie,
|
|
1069
|
+
id: Y,
|
|
1070
1070
|
name: a,
|
|
1071
1071
|
disabled: b,
|
|
1072
1072
|
placeholder: r ? void 0 : " ",
|
|
1073
|
-
className:
|
|
1073
|
+
className: j.textArea,
|
|
1074
1074
|
rows: 1,
|
|
1075
|
-
...
|
|
1075
|
+
...h && { "aria-describedby": `${Y}-helper` },
|
|
1076
1076
|
...n && { "aria-invalid": "true" },
|
|
1077
|
-
...
|
|
1078
|
-
...g && !
|
|
1079
|
-
...
|
|
1077
|
+
...E && !g && !r && { style: { paddingRight: Ee } },
|
|
1078
|
+
...g && !E && !r && { style: { paddingLeft: Te } },
|
|
1079
|
+
...E && g && !r && {
|
|
1080
1080
|
style: {
|
|
1081
|
-
paddingRight:
|
|
1081
|
+
paddingRight: Ee,
|
|
1082
1082
|
paddingLeft: Te
|
|
1083
1083
|
}
|
|
1084
1084
|
},
|
|
1085
|
-
value:
|
|
1085
|
+
value: $,
|
|
1086
1086
|
onChange: Ke,
|
|
1087
1087
|
onFocus: We,
|
|
1088
1088
|
onBlur: Xe,
|
|
1089
|
-
...
|
|
1089
|
+
...I
|
|
1090
1090
|
}
|
|
1091
1091
|
),
|
|
1092
1092
|
!r && /* @__PURE__ */ e(
|
|
@@ -1094,8 +1094,8 @@ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
1094
1094
|
{
|
|
1095
1095
|
ref: M,
|
|
1096
1096
|
"aria-hidden": !0,
|
|
1097
|
-
htmlFor:
|
|
1098
|
-
className: `${
|
|
1097
|
+
htmlFor: Y,
|
|
1098
|
+
className: `${j.visibleLabel}`,
|
|
1099
1099
|
children: o
|
|
1100
1100
|
}
|
|
1101
1101
|
),
|
|
@@ -1103,20 +1103,20 @@ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
1103
1103
|
"div",
|
|
1104
1104
|
{
|
|
1105
1105
|
ref: Z,
|
|
1106
|
-
id: `${
|
|
1107
|
-
className:
|
|
1108
|
-
children:
|
|
1106
|
+
id: `${Y}-helper`,
|
|
1107
|
+
className: j.helperText,
|
|
1108
|
+
children: h
|
|
1109
1109
|
}
|
|
1110
1110
|
),
|
|
1111
|
-
|
|
1111
|
+
E && /* @__PURE__ */ e(
|
|
1112
1112
|
"div",
|
|
1113
1113
|
{
|
|
1114
1114
|
ref: k,
|
|
1115
|
-
className:
|
|
1116
|
-
children:
|
|
1115
|
+
className: j.rightElement,
|
|
1116
|
+
children: E
|
|
1117
1117
|
}
|
|
1118
1118
|
),
|
|
1119
|
-
n &&
|
|
1119
|
+
n && h && /* @__PURE__ */ e(or, { politeness: "polite", clearAnnouncementDelay: 500, children: Ye })
|
|
1120
1120
|
] });
|
|
1121
1121
|
}
|
|
1122
1122
|
);
|
|
@@ -1134,7 +1134,7 @@ try {
|
|
|
1134
1134
|
});
|
|
1135
1135
|
} catch {
|
|
1136
1136
|
}
|
|
1137
|
-
const
|
|
1137
|
+
const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr = ({
|
|
1138
1138
|
focusMode: t
|
|
1139
1139
|
}) => y(
|
|
1140
1140
|
"peer-focus:outline",
|
|
@@ -1182,11 +1182,11 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1182
1182
|
"text-copy-lighter": t === "dark",
|
|
1183
1183
|
"text-copy-lighter dark:text-copy-dark": t === "alt-system",
|
|
1184
1184
|
"text-copy-dark dark:text-copy-lighter": t === "system"
|
|
1185
|
-
}),
|
|
1186
|
-
|
|
1185
|
+
}), Cr = ({ className: t }) => y(
|
|
1186
|
+
fr,
|
|
1187
1187
|
"relative flex cursor-pointer items-center",
|
|
1188
1188
|
t
|
|
1189
|
-
),
|
|
1189
|
+
), Er = ({
|
|
1190
1190
|
mode: t,
|
|
1191
1191
|
focusMode: a,
|
|
1192
1192
|
labelHidden: o,
|
|
@@ -1194,7 +1194,7 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1194
1194
|
noBorder: r
|
|
1195
1195
|
}) => ({
|
|
1196
1196
|
toggle: y(
|
|
1197
|
-
|
|
1197
|
+
pr(),
|
|
1198
1198
|
xr({ mode: t, noBorder: r }),
|
|
1199
1199
|
gr({ focusMode: a }),
|
|
1200
1200
|
br(),
|
|
@@ -1202,82 +1202,87 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1202
1202
|
),
|
|
1203
1203
|
label: kr({ mode: t, labelHidden: o }),
|
|
1204
1204
|
input: "peer sr-only",
|
|
1205
|
-
wrapper:
|
|
1206
|
-
}),
|
|
1205
|
+
wrapper: Cr({ className: n })
|
|
1206
|
+
}), ae = ({
|
|
1207
1207
|
checked: t = !1,
|
|
1208
1208
|
onChange: a,
|
|
1209
1209
|
label: o,
|
|
1210
1210
|
labelHidden: n = !1,
|
|
1211
1211
|
name: r,
|
|
1212
|
-
mode:
|
|
1212
|
+
mode: c = "system",
|
|
1213
1213
|
focusMode: s = "system",
|
|
1214
1214
|
className: d,
|
|
1215
1215
|
noBorder: u = !1
|
|
1216
1216
|
}) => {
|
|
1217
|
-
const
|
|
1218
|
-
mode:
|
|
1217
|
+
const f = Er({
|
|
1218
|
+
mode: c,
|
|
1219
1219
|
focusMode: s,
|
|
1220
1220
|
labelHidden: n,
|
|
1221
1221
|
className: d,
|
|
1222
1222
|
noBorder: u
|
|
1223
|
-
}),
|
|
1223
|
+
}), p = (b) => {
|
|
1224
1224
|
a == null || a(b.target.checked);
|
|
1225
1225
|
};
|
|
1226
|
-
return /* @__PURE__ */ i("label", { className:
|
|
1226
|
+
return /* @__PURE__ */ i("label", { className: f.wrapper, children: [
|
|
1227
1227
|
/* @__PURE__ */ e(
|
|
1228
1228
|
"input",
|
|
1229
1229
|
{
|
|
1230
1230
|
name: r,
|
|
1231
1231
|
checked: t,
|
|
1232
1232
|
type: "checkbox",
|
|
1233
|
-
className:
|
|
1234
|
-
onChange:
|
|
1233
|
+
className: f.input,
|
|
1234
|
+
onChange: p
|
|
1235
1235
|
}
|
|
1236
1236
|
),
|
|
1237
|
-
/* @__PURE__ */ e("div", { className:
|
|
1238
|
-
/* @__PURE__ */ e("span", { className:
|
|
1237
|
+
/* @__PURE__ */ e("div", { className: f.toggle }),
|
|
1238
|
+
/* @__PURE__ */ e("span", { className: f.label, children: o })
|
|
1239
1239
|
] });
|
|
1240
1240
|
}, Tr = ({
|
|
1241
1241
|
open: t,
|
|
1242
1242
|
onOpenChange: a
|
|
1243
1243
|
}) => {
|
|
1244
|
-
const { getAccessToken: o, user: n } =
|
|
1244
|
+
const { getAccessToken: o, user: n } = F(), {
|
|
1245
1245
|
data: r,
|
|
1246
|
-
error:
|
|
1246
|
+
error: c,
|
|
1247
1247
|
isLoading: s,
|
|
1248
1248
|
mutate: d
|
|
1249
1249
|
} = ze({
|
|
1250
1250
|
keys: [n == null ? void 0 : n.username],
|
|
1251
|
-
getAccessToken: o
|
|
1252
|
-
|
|
1251
|
+
getAccessToken: o,
|
|
1252
|
+
isPaused: !0
|
|
1253
|
+
}), [u, f] = C({
|
|
1253
1254
|
prompts: []
|
|
1254
|
-
}),
|
|
1255
|
-
slot:
|
|
1256
|
-
checked:
|
|
1255
|
+
}), p = ({
|
|
1256
|
+
slot: l,
|
|
1257
|
+
checked: h,
|
|
1257
1258
|
label: T,
|
|
1258
|
-
content:
|
|
1259
|
+
content: E,
|
|
1260
|
+
privateChat: g = !1
|
|
1259
1261
|
}) => {
|
|
1260
|
-
|
|
1261
|
-
const
|
|
1262
|
-
slot:
|
|
1262
|
+
f((A) => {
|
|
1263
|
+
const m = A.prompts, w = {
|
|
1264
|
+
slot: l,
|
|
1263
1265
|
label: T,
|
|
1264
|
-
content:
|
|
1265
|
-
enabled:
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
...
|
|
1272
|
-
prompts: [...
|
|
1266
|
+
content: E,
|
|
1267
|
+
enabled: h,
|
|
1268
|
+
privateChat: g
|
|
1269
|
+
};
|
|
1270
|
+
console.info(`==> [${Date.now()}] : `, w);
|
|
1271
|
+
const I = m.findIndex((D) => D.slot === l);
|
|
1272
|
+
return I === -1 ? {
|
|
1273
|
+
...A,
|
|
1274
|
+
prompts: [...m, { ...w, slot: l }]
|
|
1275
|
+
} : (m[I] = w, {
|
|
1276
|
+
...A,
|
|
1277
|
+
prompts: [...m]
|
|
1273
1278
|
});
|
|
1274
1279
|
});
|
|
1275
|
-
}, b = async (
|
|
1276
|
-
|
|
1280
|
+
}, b = async (l) => {
|
|
1281
|
+
l.preventDefault();
|
|
1277
1282
|
try {
|
|
1278
|
-
await
|
|
1283
|
+
await se({
|
|
1279
1284
|
accessToken: await o(),
|
|
1280
|
-
type:
|
|
1285
|
+
type: le.SET_USER_PREFERENCES,
|
|
1281
1286
|
params: {
|
|
1282
1287
|
user: n == null ? void 0 : n.username,
|
|
1283
1288
|
tags: u.prompts
|
|
@@ -1288,10 +1293,12 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1288
1293
|
}, x = () => {
|
|
1289
1294
|
d({ ...r }), a(!1);
|
|
1290
1295
|
};
|
|
1291
|
-
return
|
|
1292
|
-
r != null && r.tags &&
|
|
1293
|
-
}, [r]),
|
|
1294
|
-
|
|
1296
|
+
return H(() => {
|
|
1297
|
+
r != null && r.tags && f({ prompts: r.tags });
|
|
1298
|
+
}, [r]), H(() => {
|
|
1299
|
+
console.info(`==> [${Date.now()}] localPrompts: `, u);
|
|
1300
|
+
}, [u]), c || s ? null : /* @__PURE__ */ i(
|
|
1301
|
+
ce,
|
|
1295
1302
|
{
|
|
1296
1303
|
open: t,
|
|
1297
1304
|
onOpenChange: x,
|
|
@@ -1303,7 +1310,7 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1303
1310
|
alignHorizontal: "flex-end",
|
|
1304
1311
|
className: "pb-8 sm:pb-0",
|
|
1305
1312
|
children: [
|
|
1306
|
-
/* @__PURE__ */ e(
|
|
1313
|
+
/* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
|
|
1307
1314
|
X,
|
|
1308
1315
|
{
|
|
1309
1316
|
mode: "dark",
|
|
@@ -1313,14 +1320,14 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1313
1320
|
children: "Cancel"
|
|
1314
1321
|
}
|
|
1315
1322
|
) }),
|
|
1316
|
-
/* @__PURE__ */ e(
|
|
1323
|
+
/* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
|
|
1317
1324
|
X,
|
|
1318
1325
|
{
|
|
1319
1326
|
mode: "dark",
|
|
1320
1327
|
variant: "danger",
|
|
1321
1328
|
focusMode: "light",
|
|
1322
|
-
onClick: async (
|
|
1323
|
-
a(!1), await b(
|
|
1329
|
+
onClick: async (l) => {
|
|
1330
|
+
a(!1), await b(l);
|
|
1324
1331
|
},
|
|
1325
1332
|
children: "Save"
|
|
1326
1333
|
}
|
|
@@ -1330,67 +1337,86 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1330
1337
|
),
|
|
1331
1338
|
children: [
|
|
1332
1339
|
/* @__PURE__ */ e("p", { children: ct }),
|
|
1333
|
-
u.prompts && u.prompts.map((
|
|
1340
|
+
u.prompts && u.prompts.map((l) => /* @__PURE__ */ i(
|
|
1334
1341
|
B,
|
|
1335
1342
|
{
|
|
1336
|
-
header: `Prompt ${
|
|
1343
|
+
header: `Prompt ${l.slot + 1}`,
|
|
1337
1344
|
className: "prose-dark dark:prose-lighter mb-2",
|
|
1338
1345
|
children: [
|
|
1339
1346
|
/* @__PURE__ */ i(q, { className: "mt-8 mb-6", columnGap: 2, rowGap: 6, children: [
|
|
1340
|
-
/* @__PURE__ */ e(
|
|
1347
|
+
/* @__PURE__ */ e(O, { span: 12, children: /* @__PURE__ */ e(
|
|
1341
1348
|
be,
|
|
1342
1349
|
{
|
|
1343
1350
|
label: "Label",
|
|
1344
|
-
name: `prompt${
|
|
1345
|
-
value:
|
|
1346
|
-
onChange: (
|
|
1347
|
-
|
|
1348
|
-
slot:
|
|
1349
|
-
checked:
|
|
1350
|
-
label:
|
|
1351
|
-
content:
|
|
1351
|
+
name: `prompt${l.slot}-label`,
|
|
1352
|
+
value: l.label,
|
|
1353
|
+
onChange: (h) => {
|
|
1354
|
+
p({
|
|
1355
|
+
slot: l.slot,
|
|
1356
|
+
checked: l.enabled,
|
|
1357
|
+
label: h.target.value,
|
|
1358
|
+
content: l.content
|
|
1352
1359
|
});
|
|
1353
1360
|
}
|
|
1354
1361
|
}
|
|
1355
1362
|
) }),
|
|
1356
|
-
/* @__PURE__ */ e(
|
|
1363
|
+
/* @__PURE__ */ e(O, { span: 12, children: /* @__PURE__ */ e(
|
|
1357
1364
|
be,
|
|
1358
1365
|
{
|
|
1359
1366
|
label: "Content",
|
|
1360
|
-
name: `prompt${
|
|
1361
|
-
value:
|
|
1362
|
-
onChange: (
|
|
1363
|
-
|
|
1364
|
-
slot:
|
|
1365
|
-
checked:
|
|
1366
|
-
label:
|
|
1367
|
-
content:
|
|
1367
|
+
name: `prompt${l.slot}-content`,
|
|
1368
|
+
value: l.content,
|
|
1369
|
+
onChange: (h) => {
|
|
1370
|
+
p({
|
|
1371
|
+
slot: l.slot,
|
|
1372
|
+
checked: l.enabled,
|
|
1373
|
+
label: l.label,
|
|
1374
|
+
content: h.target.value
|
|
1368
1375
|
});
|
|
1369
1376
|
}
|
|
1370
1377
|
}
|
|
1371
1378
|
) })
|
|
1372
1379
|
] }),
|
|
1373
1380
|
/* @__PURE__ */ e(
|
|
1374
|
-
|
|
1381
|
+
ae,
|
|
1375
1382
|
{
|
|
1376
1383
|
className: "mt-2",
|
|
1377
1384
|
noBorder: !0,
|
|
1378
1385
|
label: "Enabled",
|
|
1379
|
-
name:
|
|
1380
|
-
onChange: (
|
|
1381
|
-
|
|
1382
|
-
slot:
|
|
1383
|
-
checked:
|
|
1384
|
-
label:
|
|
1385
|
-
content:
|
|
1386
|
+
name: l.slot.toString(),
|
|
1387
|
+
onChange: (h) => {
|
|
1388
|
+
p({
|
|
1389
|
+
slot: l.slot,
|
|
1390
|
+
checked: h,
|
|
1391
|
+
label: l.label,
|
|
1392
|
+
content: l.content
|
|
1393
|
+
});
|
|
1394
|
+
},
|
|
1395
|
+
checked: l.enabled
|
|
1396
|
+
}
|
|
1397
|
+
),
|
|
1398
|
+
/* @__PURE__ */ e(
|
|
1399
|
+
ae,
|
|
1400
|
+
{
|
|
1401
|
+
className: "mt-2",
|
|
1402
|
+
noBorder: !0,
|
|
1403
|
+
label: "Temporary Chat",
|
|
1404
|
+
name: `private-${l.slot.toString()}`,
|
|
1405
|
+
onChange: (h) => {
|
|
1406
|
+
p({
|
|
1407
|
+
slot: l.slot,
|
|
1408
|
+
checked: l.enabled,
|
|
1409
|
+
label: l.label,
|
|
1410
|
+
content: l.content,
|
|
1411
|
+
privateChat: h
|
|
1386
1412
|
});
|
|
1387
1413
|
},
|
|
1388
|
-
checked:
|
|
1414
|
+
checked: l.privateChat
|
|
1389
1415
|
}
|
|
1390
1416
|
)
|
|
1391
1417
|
]
|
|
1392
1418
|
},
|
|
1393
|
-
`prompt-slot-${
|
|
1419
|
+
`prompt-slot-${l.slot}`
|
|
1394
1420
|
))
|
|
1395
1421
|
]
|
|
1396
1422
|
}
|
|
@@ -1399,76 +1425,76 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1399
1425
|
open: t,
|
|
1400
1426
|
onOpenChange: a
|
|
1401
1427
|
}) => {
|
|
1402
|
-
const { getAccessToken: o, user: n } =
|
|
1428
|
+
const { getAccessToken: o, user: n } = F(), {
|
|
1403
1429
|
data: r,
|
|
1404
|
-
error:
|
|
1430
|
+
error: c,
|
|
1405
1431
|
isLoading: s,
|
|
1406
1432
|
mutate: d
|
|
1407
1433
|
} = ze({
|
|
1408
1434
|
keys: [n == null ? void 0 : n.username],
|
|
1409
1435
|
getAccessToken: o
|
|
1410
|
-
}), [u,
|
|
1436
|
+
}), [u, f] = C(!1), [p, b] = C({
|
|
1411
1437
|
loadingLocation: !1
|
|
1412
|
-
}), [x,
|
|
1438
|
+
}), [x, l] = C(""), [h, T] = C(""), [E, g] = C(it), [A, m] = Ce({
|
|
1413
1439
|
key: ke + dt,
|
|
1414
1440
|
initialValue: !1
|
|
1415
1441
|
}), w = (k) => {
|
|
1416
1442
|
m(k);
|
|
1417
|
-
},
|
|
1443
|
+
}, I = async (k) => {
|
|
1418
1444
|
k.preventDefault();
|
|
1419
1445
|
try {
|
|
1420
|
-
await
|
|
1446
|
+
await se({
|
|
1421
1447
|
accessToken: await o(),
|
|
1422
|
-
type:
|
|
1448
|
+
type: le.SET_USER_PREFERENCES,
|
|
1423
1449
|
params: {
|
|
1424
1450
|
user: n == null ? void 0 : n.username,
|
|
1425
1451
|
instructions: x,
|
|
1426
|
-
location:
|
|
1427
|
-
engine:
|
|
1452
|
+
location: h,
|
|
1453
|
+
engine: E
|
|
1428
1454
|
}
|
|
1429
1455
|
}), d(), b({
|
|
1430
1456
|
loadingLocation: !1
|
|
1431
1457
|
});
|
|
1432
1458
|
} catch {
|
|
1433
1459
|
}
|
|
1434
|
-
},
|
|
1460
|
+
}, D = async () => {
|
|
1435
1461
|
b({
|
|
1436
1462
|
loadingLocation: !0
|
|
1437
1463
|
}), T("...");
|
|
1438
1464
|
try {
|
|
1439
|
-
const k = Date.now(),
|
|
1465
|
+
const k = Date.now(), R = await ht(), Q = await se({
|
|
1440
1466
|
accessToken: await o(),
|
|
1441
|
-
type:
|
|
1467
|
+
type: le.GET_LOCATION,
|
|
1442
1468
|
params: {
|
|
1443
|
-
latitude:
|
|
1444
|
-
longitude:
|
|
1469
|
+
latitude: R.latitude,
|
|
1470
|
+
longitude: R.longitude
|
|
1445
1471
|
}
|
|
1446
1472
|
}), K = Date.now() - k;
|
|
1447
|
-
if (K < 2e3 && await new Promise((
|
|
1448
|
-
const { city:
|
|
1473
|
+
if (K < 2e3 && await new Promise((U) => setTimeout(U, 2e3 - K)), Q.status === 200) {
|
|
1474
|
+
const { city: U, state: M, country: J, displayName: Z } = Q.data, Y = U && M && J ? `${U}, ${M}, ${J}` : Z;
|
|
1449
1475
|
b({
|
|
1450
1476
|
loadingLocation: !1
|
|
1451
|
-
}), T(
|
|
1477
|
+
}), T(Y);
|
|
1452
1478
|
} else
|
|
1453
1479
|
b({
|
|
1454
1480
|
loadingLocation: !1
|
|
1455
1481
|
});
|
|
1456
1482
|
} catch {
|
|
1457
1483
|
}
|
|
1458
|
-
}, L = (k,
|
|
1459
|
-
g(k ?
|
|
1460
|
-
},
|
|
1461
|
-
|
|
1462
|
-
},
|
|
1484
|
+
}, L = (k, R) => {
|
|
1485
|
+
g(k ? R : R === W ? ee : W);
|
|
1486
|
+
}, _ = () => {
|
|
1487
|
+
f(!u);
|
|
1488
|
+
}, ie = () => {
|
|
1463
1489
|
d({ ...r }), a(!1);
|
|
1464
1490
|
};
|
|
1465
|
-
return
|
|
1466
|
-
r != null && r.instructions &&
|
|
1467
|
-
}, [r]),
|
|
1468
|
-
|
|
1491
|
+
return H(() => {
|
|
1492
|
+
r != null && r.instructions && l(r.instructions), r != null && r.location && T(r.location), r != null && r.engine && g(r.engine);
|
|
1493
|
+
}, [r]), c || s ? null : /* @__PURE__ */ e(
|
|
1494
|
+
ce,
|
|
1469
1495
|
{
|
|
1470
1496
|
open: t,
|
|
1471
|
-
onOpenChange:
|
|
1497
|
+
onOpenChange: ie,
|
|
1472
1498
|
title: ut,
|
|
1473
1499
|
footer: /* @__PURE__ */ i(
|
|
1474
1500
|
q,
|
|
@@ -1477,24 +1503,24 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1477
1503
|
alignHorizontal: "flex-end",
|
|
1478
1504
|
className: "pb-8 sm:pb-0",
|
|
1479
1505
|
children: [
|
|
1480
|
-
/* @__PURE__ */ e(
|
|
1506
|
+
/* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
|
|
1481
1507
|
X,
|
|
1482
1508
|
{
|
|
1483
1509
|
mode: "dark",
|
|
1484
1510
|
variant: "secondary",
|
|
1485
1511
|
focusMode: "light",
|
|
1486
|
-
onClick:
|
|
1512
|
+
onClick: ie,
|
|
1487
1513
|
children: "Cancel"
|
|
1488
1514
|
}
|
|
1489
1515
|
) }),
|
|
1490
|
-
/* @__PURE__ */ e(
|
|
1516
|
+
/* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
|
|
1491
1517
|
X,
|
|
1492
1518
|
{
|
|
1493
1519
|
mode: "dark",
|
|
1494
1520
|
variant: "danger",
|
|
1495
1521
|
focusMode: "light",
|
|
1496
1522
|
onClick: async (k) => {
|
|
1497
|
-
a(!1), await
|
|
1523
|
+
a(!1), await I(k);
|
|
1498
1524
|
},
|
|
1499
1525
|
children: "Save"
|
|
1500
1526
|
}
|
|
@@ -1503,7 +1529,7 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1503
1529
|
}
|
|
1504
1530
|
),
|
|
1505
1531
|
children: /* @__PURE__ */ i(z, { children: [
|
|
1506
|
-
u && /* @__PURE__ */ e(Tr, { open: u, onOpenChange:
|
|
1532
|
+
u && /* @__PURE__ */ e(Tr, { open: u, onOpenChange: f }),
|
|
1507
1533
|
/* @__PURE__ */ i(
|
|
1508
1534
|
B,
|
|
1509
1535
|
{
|
|
@@ -1512,29 +1538,29 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1512
1538
|
children: [
|
|
1513
1539
|
/* @__PURE__ */ e("p", { className: "text-sm", children: "Select the AI engine that will be used to generate responses." }),
|
|
1514
1540
|
/* @__PURE__ */ e(
|
|
1515
|
-
|
|
1541
|
+
ae,
|
|
1516
1542
|
{
|
|
1517
1543
|
noBorder: !0,
|
|
1518
1544
|
label: W,
|
|
1519
1545
|
name: W,
|
|
1520
1546
|
onChange: (k) => L(k, W),
|
|
1521
|
-
checked:
|
|
1547
|
+
checked: E === W
|
|
1522
1548
|
}
|
|
1523
1549
|
),
|
|
1524
1550
|
/* @__PURE__ */ e(
|
|
1525
|
-
|
|
1551
|
+
ae,
|
|
1526
1552
|
{
|
|
1527
1553
|
className: "mt-2",
|
|
1528
1554
|
noBorder: !0,
|
|
1529
1555
|
label: ee,
|
|
1530
1556
|
name: ee,
|
|
1531
1557
|
onChange: (k) => L(k, ee),
|
|
1532
|
-
checked:
|
|
1558
|
+
checked: E === ee
|
|
1533
1559
|
}
|
|
1534
1560
|
),
|
|
1535
1561
|
/* @__PURE__ */ e("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.' }),
|
|
1536
1562
|
/* @__PURE__ */ e(
|
|
1537
|
-
|
|
1563
|
+
ae,
|
|
1538
1564
|
{
|
|
1539
1565
|
className: "mt-2",
|
|
1540
1566
|
noBorder: !0,
|
|
@@ -1546,11 +1572,11 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1546
1572
|
),
|
|
1547
1573
|
/* @__PURE__ */ e("h3", { className: "border-b-2 border-slate-400", children: "Prompts" }),
|
|
1548
1574
|
/* @__PURE__ */ e(
|
|
1549
|
-
|
|
1575
|
+
oe,
|
|
1550
1576
|
{
|
|
1551
1577
|
className: "mt-2",
|
|
1552
1578
|
size: "small",
|
|
1553
|
-
onClick:
|
|
1579
|
+
onClick: _,
|
|
1554
1580
|
labelLeft: "Edit Custom Prompts",
|
|
1555
1581
|
children: /* @__PURE__ */ e(Nt, { size: "size-3", monotone: !0 })
|
|
1556
1582
|
}
|
|
@@ -1580,7 +1606,7 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1580
1606
|
label: "Custom Instructions",
|
|
1581
1607
|
value: x,
|
|
1582
1608
|
onChange: (k) => {
|
|
1583
|
-
|
|
1609
|
+
l(k.target.value);
|
|
1584
1610
|
},
|
|
1585
1611
|
helperText: "Press ENTER to add a new line."
|
|
1586
1612
|
}
|
|
@@ -1601,7 +1627,7 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1601
1627
|
mode: "alt-system",
|
|
1602
1628
|
name: "location",
|
|
1603
1629
|
label: "Location",
|
|
1604
|
-
value:
|
|
1630
|
+
value: h,
|
|
1605
1631
|
onChange: (k) => {
|
|
1606
1632
|
T(k.target.value);
|
|
1607
1633
|
},
|
|
@@ -1614,9 +1640,9 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1614
1640
|
className: "mt-2",
|
|
1615
1641
|
size: "small",
|
|
1616
1642
|
noBorder: !0,
|
|
1617
|
-
disabled:
|
|
1618
|
-
onClick:
|
|
1619
|
-
children:
|
|
1643
|
+
disabled: p.loadingLocation,
|
|
1644
|
+
onClick: D,
|
|
1645
|
+
children: p.loadingLocation ? "Detecting..." : "Auto-detect"
|
|
1620
1646
|
}
|
|
1621
1647
|
)
|
|
1622
1648
|
]
|
|
@@ -1626,22 +1652,22 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1626
1652
|
}
|
|
1627
1653
|
);
|
|
1628
1654
|
}, _r = () => {
|
|
1629
|
-
const { logout: t } =
|
|
1655
|
+
const { logout: t } = F(), { state: a } = he(Oe), [o, n] = C(!1), [r, c] = C(!1), [s, d] = C(!1), [u, f] = C(!1), [p, b] = C(!1), x = () => {
|
|
1630
1656
|
n(!o);
|
|
1631
|
-
},
|
|
1632
|
-
|
|
1633
|
-
},
|
|
1657
|
+
}, l = () => {
|
|
1658
|
+
c(!r);
|
|
1659
|
+
}, h = () => {
|
|
1634
1660
|
d(!s);
|
|
1635
1661
|
}, T = () => {
|
|
1636
|
-
|
|
1637
|
-
},
|
|
1638
|
-
b(!
|
|
1662
|
+
f(!u);
|
|
1663
|
+
}, E = () => {
|
|
1664
|
+
b(!p);
|
|
1639
1665
|
};
|
|
1640
1666
|
return /* @__PURE__ */ i(z, { children: [
|
|
1641
1667
|
/* @__PURE__ */ e(
|
|
1642
|
-
|
|
1668
|
+
Pe,
|
|
1643
1669
|
{
|
|
1644
|
-
showConfirmation:
|
|
1670
|
+
showConfirmation: p,
|
|
1645
1671
|
setShowConfirmation: b,
|
|
1646
1672
|
action: t,
|
|
1647
1673
|
customStrings: {
|
|
@@ -1653,10 +1679,10 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1653
1679
|
}
|
|
1654
1680
|
),
|
|
1655
1681
|
/* @__PURE__ */ e(jt, { open: o, onOpenChange: n }),
|
|
1656
|
-
/* @__PURE__ */ e(Nr, { open: r, onOpenChange:
|
|
1682
|
+
/* @__PURE__ */ e(Nr, { open: r, onOpenChange: c }),
|
|
1657
1683
|
s && /* @__PURE__ */ e(Ut, { open: s, onOpenChange: d }),
|
|
1658
|
-
/* @__PURE__ */ e(Vt, { open: u, onOpenChange:
|
|
1659
|
-
/* @__PURE__ */ e("div", { className: "bg-slate-900 py-4 px-4 rounded-t-md", children: /* @__PURE__ */ e(q, { alignHorizontal: "flex-end", alignVertical: "center", children: /* @__PURE__ */ e(
|
|
1684
|
+
/* @__PURE__ */ e(Vt, { open: u, onOpenChange: f }),
|
|
1685
|
+
/* @__PURE__ */ e("div", { className: "bg-slate-900 py-4 px-4 rounded-t-md", children: /* @__PURE__ */ e(q, { alignHorizontal: "flex-end", alignVertical: "center", children: /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
|
|
1660
1686
|
wt,
|
|
1661
1687
|
{
|
|
1662
1688
|
label: "Profile, Settings, etc.",
|
|
@@ -1667,7 +1693,7 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1667
1693
|
{
|
|
1668
1694
|
mode: "dark",
|
|
1669
1695
|
focusMode: "light",
|
|
1670
|
-
trigger: /* @__PURE__ */ e(
|
|
1696
|
+
trigger: /* @__PURE__ */ e(oe, { label: "Settings", children: /* @__PURE__ */ e(Ht, {}) }),
|
|
1671
1697
|
defaultPlacement: "bottom-end",
|
|
1672
1698
|
children: [
|
|
1673
1699
|
/* @__PURE__ */ e(
|
|
@@ -1682,7 +1708,7 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1682
1708
|
re,
|
|
1683
1709
|
{
|
|
1684
1710
|
label: "Settings",
|
|
1685
|
-
onClick:
|
|
1711
|
+
onClick: l,
|
|
1686
1712
|
icon: /* @__PURE__ */ e(Dt, {})
|
|
1687
1713
|
}
|
|
1688
1714
|
),
|
|
@@ -1690,8 +1716,8 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1690
1716
|
re,
|
|
1691
1717
|
{
|
|
1692
1718
|
label: "History",
|
|
1693
|
-
onClick:
|
|
1694
|
-
icon: /* @__PURE__ */ e(
|
|
1719
|
+
onClick: h,
|
|
1720
|
+
icon: /* @__PURE__ */ e(Pt, {})
|
|
1695
1721
|
}
|
|
1696
1722
|
),
|
|
1697
1723
|
/* @__PURE__ */ e(
|
|
@@ -1699,7 +1725,7 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1699
1725
|
{
|
|
1700
1726
|
label: "About",
|
|
1701
1727
|
onClick: T,
|
|
1702
|
-
icon: /* @__PURE__ */ e(
|
|
1728
|
+
icon: /* @__PURE__ */ e(Ot, {})
|
|
1703
1729
|
}
|
|
1704
1730
|
),
|
|
1705
1731
|
a && a.id && !a.isComponent && /* @__PURE__ */ i(z, { children: [
|
|
@@ -1708,7 +1734,7 @@ const pr = "av-toggle", fr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1708
1734
|
re,
|
|
1709
1735
|
{
|
|
1710
1736
|
label: "Log out",
|
|
1711
|
-
onClick:
|
|
1737
|
+
onClick: E,
|
|
1712
1738
|
icon: /* @__PURE__ */ e("div", { className: "text-red-700", children: /* @__PURE__ */ e(Lt, { monotone: !0 }) })
|
|
1713
1739
|
}
|
|
1714
1740
|
)
|