@versini/sassysaint 6.4.1 → 6.5.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.KB01Hp9h.js → App.BBj6mtsk.js} +1382 -1283
- package/dist/chunks/{MarkdownWithExtra.B4DWJPGx.js → MarkdownWithExtra.DKFJBJZg.js} +2 -2
- package/dist/chunks/{MessageAssistant.BGPVUtl5.js → MessageAssistant.DImrQoWb.js} +3 -3
- package/dist/chunks/{index.B2CHNioG.js → index.DLuWGDQG.js} +188 -191
- package/dist/chunks/{index.CfjkM26U.js → index.wt2DggdA.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
|
-
import { jsxs as i, jsx as e, Fragment as
|
|
2
|
-
import { f as V, un as
|
|
3
|
-
import { i as me, useServerCapabilities as ft, Ye as ce, HistoryContext as Me, E as Ce, ConfirmationPanel as Pe, Ue as pt, Pe as gt, Fe as ge, Me as
|
|
4
|
-
import At, { useRef as
|
|
1
|
+
import { jsxs as i, jsx as e, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import { f as V, un as $, R as z, CARDS as N, renderDataAsList as de, pluralize as ue, ABOUT_TITLE as Qe, INFINITE_SCROLL_LIMIT as we, INFINITE_SCROLL_THRESHOLD as ve, LOCAL_STORAGE_PREFIX as ke, LOCAL_STORAGE_SORT as Je, te as oe, ACTION_RESET as Ze, ACTION_RESTORE as et, ACTION_SORT as Ae, LOCAL_STORAGE_SEARCH as tt, HISTORY_TITLE as rt, fe as be, C as X, ACTION_SEARCH as nt, debounce as at, M as ot, L as q, j as P, 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.wt2DggdA.js";
|
|
3
|
+
import { i as me, useServerCapabilities as ft, Ye as ce, HistoryContext as Me, E as Ce, ConfirmationPanel as Pe, Ue as pt, Pe as gt, Fe as ge, Me as M, De as yt, We as bt, p as xt, z as kt, je as Ct, serviceCall as se, SERVICE_TYPES as le, B as te, AppContext as Oe, useChatsHistory as Et, useUserChatStats as Tt, useUserPreferences as ze, m as Nt, _e as St, me as wt, R as re, P as vt } from "./App.BBj6mtsk.js";
|
|
4
|
+
import At, { useRef as v, useState as C, useContext as he, useCallback as Be, useEffect as F, 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,
|
|
@@ -202,43 +202,43 @@ const Lt = ({
|
|
|
202
202
|
/* @__PURE__ */ e("path", { d: "M128 416a32 32 0 1 1 64 0 32 32 0 1 1-64 0m112 0a80 80 0 1 0-160 0 80 80 0 1 0 160 0m80-160a32 32 0 1 1 64 0 32 32 0 1 1-64 0m112 0a80 80 0 1 0-160 0 80 80 0 1 0 160 0M192 128a32 32 0 1 1 0-64 32 32 0 1 1 0 64m0-112a80 80 0 1 0 0 160 80 80 0 1 0 0-160" })
|
|
203
203
|
]
|
|
204
204
|
}
|
|
205
|
-
),
|
|
206
|
-
const { getAccessToken: t } =
|
|
205
|
+
), Vt = () => {
|
|
206
|
+
const { getAccessToken: t } = $(), a = me(), o = me(), {
|
|
207
207
|
data: n,
|
|
208
208
|
error: r,
|
|
209
209
|
isLoading: c
|
|
210
210
|
} = ft({
|
|
211
211
|
getAccessToken: t
|
|
212
|
-
}), s = (n == null ? void 0 : n.plugins) || [], d = (n == null ? void 0 : n.version) || "",
|
|
213
|
-
return /* @__PURE__ */ i(
|
|
212
|
+
}), s = (n == null ? void 0 : n.plugins) || [], d = (n == null ? void 0 : n.version) || "", m = (n == null ? void 0 : n.models) || [];
|
|
213
|
+
return /* @__PURE__ */ i(O, { children: [
|
|
214
214
|
/* @__PURE__ */ e("div", { className: "mb-4", children: /* @__PURE__ */ e(
|
|
215
|
-
|
|
215
|
+
z,
|
|
216
216
|
{
|
|
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/
|
|
220
|
+
[N.ABOUT.VERSION]: "6.5.0",
|
|
221
|
+
[N.ABOUT.BUILD_TIMESTAMP]: "01/29/2025 11:43 AM EST"
|
|
222
222
|
})
|
|
223
223
|
}
|
|
224
224
|
) }),
|
|
225
225
|
r || c ? null : /* @__PURE__ */ e(
|
|
226
|
-
|
|
226
|
+
z,
|
|
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,
|
|
233
|
-
[ue(N.ABOUT.PLUGIN, s.length)]: /* @__PURE__ */ e(
|
|
232
|
+
[ue(N.ABOUT.ENGINE, m.length)]: /* @__PURE__ */ e(O, { children: m.map((f) => /* @__PURE__ */ e("div", { className: "text-right", children: f }, f)) }),
|
|
233
|
+
[ue(N.ABOUT.PLUGIN, s.length)]: /* @__PURE__ */ e(O, { children: s.map((f) => /* @__PURE__ */ e("div", { className: "text-right", children: f }, f)) })
|
|
234
234
|
})
|
|
235
235
|
}
|
|
236
236
|
)
|
|
237
237
|
] });
|
|
238
|
-
},
|
|
238
|
+
}, $t = ({
|
|
239
239
|
open: t,
|
|
240
240
|
onOpenChange: a
|
|
241
|
-
}) => /* @__PURE__ */ e(ce, { open: t, onOpenChange: a, title: Qe, children: /* @__PURE__ */ e(
|
|
241
|
+
}) => /* @__PURE__ */ e(ce, { open: t, onOpenChange: a, title: Qe, children: /* @__PURE__ */ e(Vt, {}) }), Ft = async (t, a, o, n) => {
|
|
242
242
|
try {
|
|
243
243
|
const r = await se({
|
|
244
244
|
accessToken: n,
|
|
@@ -266,23 +266,23 @@ const Lt = ({
|
|
|
266
266
|
onOpenChange: o,
|
|
267
267
|
mutate: n
|
|
268
268
|
}) => {
|
|
269
|
-
var
|
|
270
|
-
const { user: r, getAccessToken: c } =
|
|
269
|
+
var I;
|
|
270
|
+
const { user: r, getAccessToken: c } = $(), s = v(null), d = v({
|
|
271
271
|
id: 0,
|
|
272
272
|
timestamp: "",
|
|
273
273
|
message: ""
|
|
274
|
-
}), [
|
|
275
|
-
|
|
274
|
+
}), [m, f] = C(!1), [p, b] = C(
|
|
275
|
+
we + ve
|
|
276
276
|
), { state: x, dispatch: l } = he(Me), [, h] = Ce({
|
|
277
277
|
key: ke + Je,
|
|
278
278
|
initialValue: x.sortDirection
|
|
279
|
-
}), T = (
|
|
279
|
+
}), T = (u) => {
|
|
280
280
|
switch (x.sortDirection) {
|
|
281
281
|
case te.ASC:
|
|
282
282
|
h(te.DESC), l({
|
|
283
283
|
type: Ae,
|
|
284
284
|
payload: {
|
|
285
|
-
sortedCell:
|
|
285
|
+
sortedCell: u,
|
|
286
286
|
sortDirection: te.DESC
|
|
287
287
|
}
|
|
288
288
|
});
|
|
@@ -291,39 +291,39 @@ const Lt = ({
|
|
|
291
291
|
h(te.ASC), l({
|
|
292
292
|
type: Ae,
|
|
293
293
|
payload: {
|
|
294
|
-
sortedCell:
|
|
294
|
+
sortedCell: u,
|
|
295
295
|
sortDirection: te.ASC
|
|
296
296
|
}
|
|
297
297
|
});
|
|
298
298
|
break;
|
|
299
299
|
}
|
|
300
300
|
}, E = async () => {
|
|
301
|
-
const
|
|
301
|
+
const u = d.current;
|
|
302
302
|
try {
|
|
303
303
|
await se({
|
|
304
304
|
accessToken: await c(),
|
|
305
305
|
type: le.DELETE_CHAT,
|
|
306
306
|
params: {
|
|
307
307
|
userId: (r == null ? void 0 : r.username) || "",
|
|
308
|
-
id:
|
|
308
|
+
id: u.id
|
|
309
309
|
}
|
|
310
310
|
}), n();
|
|
311
311
|
} catch {
|
|
312
312
|
}
|
|
313
|
-
}, g = Be((
|
|
314
|
-
|
|
313
|
+
}, g = Be((u) => {
|
|
314
|
+
u[0].isIntersecting && b((R) => R + we);
|
|
315
315
|
}, []);
|
|
316
|
-
return
|
|
317
|
-
const
|
|
316
|
+
return F(() => {
|
|
317
|
+
const u = {
|
|
318
318
|
// root: null,
|
|
319
319
|
rootMargin: "20px"
|
|
320
|
-
}, w = new IntersectionObserver(g,
|
|
320
|
+
}, w = new IntersectionObserver(g, u);
|
|
321
321
|
s.current && w.observe(s.current);
|
|
322
|
-
}), /* @__PURE__ */ i(
|
|
322
|
+
}), /* @__PURE__ */ i(O, { children: [
|
|
323
323
|
/* @__PURE__ */ i(
|
|
324
324
|
Pe,
|
|
325
325
|
{
|
|
326
|
-
showConfirmation:
|
|
326
|
+
showConfirmation: m,
|
|
327
327
|
setShowConfirmation: f,
|
|
328
328
|
action: E,
|
|
329
329
|
customStrings: {
|
|
@@ -342,7 +342,7 @@ const Lt = ({
|
|
|
342
342
|
/* @__PURE__ */ i("li", { children: [
|
|
343
343
|
"First message:",
|
|
344
344
|
" ",
|
|
345
|
-
/* @__PURE__ */ e("span", { className: "text-lg", children: (
|
|
345
|
+
/* @__PURE__ */ e("span", { className: "text-lg", children: (I = d.current) == null ? void 0 : I.message })
|
|
346
346
|
] })
|
|
347
347
|
] })
|
|
348
348
|
]
|
|
@@ -350,7 +350,7 @@ const Lt = ({
|
|
|
350
350
|
),
|
|
351
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(M, { className: "sr-only", children: "Row" }),
|
|
354
354
|
/* @__PURE__ */ e(
|
|
355
355
|
yt,
|
|
356
356
|
{
|
|
@@ -365,49 +365,50 @@ const Lt = ({
|
|
|
365
365
|
children: "Date"
|
|
366
366
|
}
|
|
367
367
|
),
|
|
368
|
-
/* @__PURE__ */ e(
|
|
369
|
-
/* @__PURE__ */ e(
|
|
370
|
-
/* @__PURE__ */ e(
|
|
368
|
+
/* @__PURE__ */ e(M, { className: "text-xs sm:text-sm", children: "Summary" }),
|
|
369
|
+
/* @__PURE__ */ e(M, { className: "text-xs sm:text-sm", children: "Model" }),
|
|
370
|
+
/* @__PURE__ */ e(M, { className: "text-xs sm:text-sm text-right", children: "Actions" })
|
|
371
371
|
] }) }),
|
|
372
|
-
/* @__PURE__ */ e(bt, { children: t.slice(0, p).map((
|
|
373
|
-
var
|
|
374
|
-
|
|
372
|
+
/* @__PURE__ */ e(bt, { children: t.slice(0, p).map((u, w) => {
|
|
373
|
+
var B, H;
|
|
374
|
+
const R = u.summary || (u.messages.length > 0 ? (B = u.messages[0]) == null ? void 0 : B.content : "");
|
|
375
|
+
return ((H = u == null ? void 0 : u.messages) == null ? void 0 : H.length) > 0 ? /* @__PURE__ */ i(It, { children: [
|
|
375
376
|
w === p - ve && /* @__PURE__ */ e("tr", { ref: s }),
|
|
376
377
|
/* @__PURE__ */ i(ge, { children: [
|
|
377
|
-
/* @__PURE__ */ e(
|
|
378
|
+
/* @__PURE__ */ e(M, { children: w + 1 }),
|
|
378
379
|
/* @__PURE__ */ e(
|
|
379
|
-
|
|
380
|
+
M,
|
|
380
381
|
{
|
|
381
382
|
component: "th",
|
|
382
383
|
scope: "row",
|
|
383
384
|
className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
|
|
384
|
-
children:
|
|
385
|
+
children: u.timestamp.split(",")[0]
|
|
385
386
|
}
|
|
386
387
|
),
|
|
387
388
|
/* @__PURE__ */ e(
|
|
388
|
-
|
|
389
|
+
M,
|
|
389
390
|
{
|
|
390
391
|
className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
|
|
391
392
|
style: {
|
|
392
393
|
wordBreak: "break-word"
|
|
393
394
|
},
|
|
394
|
-
children:
|
|
395
|
+
children: R
|
|
395
396
|
}
|
|
396
397
|
),
|
|
397
398
|
/* @__PURE__ */ i(
|
|
398
|
-
|
|
399
|
+
M,
|
|
399
400
|
{
|
|
400
401
|
component: "th",
|
|
401
402
|
scope: "row",
|
|
402
403
|
className: "text-gray-400",
|
|
403
404
|
align: "center",
|
|
404
405
|
children: [
|
|
405
|
-
|
|
406
|
-
|
|
406
|
+
u.model && u.model.startsWith("claude") && /* @__PURE__ */ e(xt, { size: "size-4 sm:size-5" }),
|
|
407
|
+
u.model && u.model.startsWith("gpt") && /* @__PURE__ */ e(kt, { size: "size-4 sm:size-5" })
|
|
407
408
|
]
|
|
408
409
|
}
|
|
409
410
|
),
|
|
410
|
-
/* @__PURE__ */ i(
|
|
411
|
+
/* @__PURE__ */ i(M, { align: "right", children: [
|
|
411
412
|
/* @__PURE__ */ e(
|
|
412
413
|
oe,
|
|
413
414
|
{
|
|
@@ -416,12 +417,12 @@ const Lt = ({
|
|
|
416
417
|
noBorder: !0,
|
|
417
418
|
label: "Restore chat",
|
|
418
419
|
onClick: async () => {
|
|
419
|
-
const
|
|
420
|
+
const S = await c();
|
|
420
421
|
Ft(
|
|
421
|
-
|
|
422
|
+
u,
|
|
422
423
|
a,
|
|
423
424
|
o,
|
|
424
|
-
|
|
425
|
+
S
|
|
425
426
|
);
|
|
426
427
|
},
|
|
427
428
|
children: /* @__PURE__ */ e(Bt, { size: "size-3", monotone: !0 })
|
|
@@ -434,21 +435,21 @@ const Lt = ({
|
|
|
434
435
|
noBorder: !0,
|
|
435
436
|
label: "Delete chat",
|
|
436
437
|
onClick: () => {
|
|
437
|
-
var
|
|
438
|
+
var S;
|
|
438
439
|
d.current = {
|
|
439
|
-
id:
|
|
440
|
-
timestamp:
|
|
441
|
-
message:
|
|
442
|
-
}, f(!
|
|
440
|
+
id: u.id,
|
|
441
|
+
timestamp: u.timestamp,
|
|
442
|
+
message: u.messages.length > 0 ? (S = u.messages[0]) == null ? void 0 : S.content : ""
|
|
443
|
+
}, f(!m);
|
|
443
444
|
},
|
|
444
445
|
children: /* @__PURE__ */ e("div", { className: "text-red-400", children: /* @__PURE__ */ e(Mt, { size: "size-3", monotone: !0 }) })
|
|
445
446
|
}
|
|
446
447
|
)
|
|
447
448
|
] })
|
|
448
449
|
] })
|
|
449
|
-
] }, `${N.HISTORY.TITLE}-${
|
|
450
|
+
] }, `${N.HISTORY.TITLE}-${u.id}-${w}`) : null;
|
|
450
451
|
}) }),
|
|
451
|
-
/* @__PURE__ */ e(Ct, { children: /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(
|
|
452
|
+
/* @__PURE__ */ e(Ct, { children: /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(M, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: ue(
|
|
452
453
|
`${t.length} chat`,
|
|
453
454
|
t.length
|
|
454
455
|
) }) }) }) })
|
|
@@ -458,7 +459,7 @@ const Lt = ({
|
|
|
458
459
|
open: t,
|
|
459
460
|
onOpenChange: a
|
|
460
461
|
}) => {
|
|
461
|
-
const { getAccessToken: o, user: n } =
|
|
462
|
+
const { getAccessToken: o, user: n } = $(), { state: r, dispatch: c } = he(Oe), { state: s, dispatch: d } = he(Me), { data: m, mutate: f } = Et({
|
|
462
463
|
keys: [
|
|
463
464
|
n == null ? void 0 : n.username,
|
|
464
465
|
s.searchString,
|
|
@@ -466,13 +467,13 @@ const Lt = ({
|
|
|
466
467
|
(r == null ? void 0 : r.lastTriggeredTimestamp) || 0
|
|
467
468
|
],
|
|
468
469
|
getAccessToken: o
|
|
469
|
-
}), p =
|
|
470
|
+
}), p = v(null), [, b] = Ce({
|
|
470
471
|
key: ke + tt,
|
|
471
472
|
initialValue: s.searchString
|
|
472
473
|
}), [x, l] = C([]);
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
}, [
|
|
474
|
+
F(() => {
|
|
475
|
+
m && l(m);
|
|
476
|
+
}, [m]);
|
|
476
477
|
const h = async (g) => {
|
|
477
478
|
b(g), d({
|
|
478
479
|
type: nt,
|
|
@@ -481,7 +482,7 @@ const Lt = ({
|
|
|
481
482
|
}, T = at((g) => {
|
|
482
483
|
h(g.target.value.trim());
|
|
483
484
|
}, 500);
|
|
484
|
-
return /* @__PURE__ */ e(ce, { open: t, onOpenChange: a, title: rt, children: /* @__PURE__ */ i(
|
|
485
|
+
return /* @__PURE__ */ e(ce, { open: t, onOpenChange: a, title: rt, children: /* @__PURE__ */ i(O, { children: [
|
|
485
486
|
/* @__PURE__ */ e("form", { autoComplete: "off", onSubmit: async (g) => {
|
|
486
487
|
g.preventDefault();
|
|
487
488
|
}, children: /* @__PURE__ */ e(
|
|
@@ -529,10 +530,10 @@ const Lt = ({
|
|
|
529
530
|
) })
|
|
530
531
|
] }) });
|
|
531
532
|
}, Yt = ({ stats: t }) => {
|
|
532
|
-
const { isAuthenticated: a, user: o, registeringForPasskey: n, authenticationType: r } =
|
|
533
|
-
return a && d ? /* @__PURE__ */ i(
|
|
533
|
+
const { isAuthenticated: a, user: o, registeringForPasskey: n, authenticationType: r } = $(), c = me(), s = me(), d = (o == null ? void 0 : o.username) || "";
|
|
534
|
+
return a && d ? /* @__PURE__ */ i(O, { children: [
|
|
534
535
|
/* @__PURE__ */ e(
|
|
535
|
-
|
|
536
|
+
z,
|
|
536
537
|
{
|
|
537
538
|
header: N.PREFERENCES.TITLE,
|
|
538
539
|
className: "prose-dark dark:prose-lighter",
|
|
@@ -543,12 +544,12 @@ const Lt = ({
|
|
|
543
544
|
}
|
|
544
545
|
),
|
|
545
546
|
r !== ot.PASSKEY && /* @__PURE__ */ i(
|
|
546
|
-
|
|
547
|
+
z,
|
|
547
548
|
{
|
|
548
549
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
549
550
|
header: /* @__PURE__ */ e("h2", { className: "m-0", children: /* @__PURE__ */ i(q, { columnGap: 3, alignVertical: "center", children: [
|
|
550
|
-
/* @__PURE__ */ e(
|
|
551
|
-
/* @__PURE__ */ e(
|
|
551
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(Ie, { size: "size-8" }) }),
|
|
552
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e("div", { children: N.PREFERENCES.PASSKEY_TITLE }) })
|
|
552
553
|
] }) }),
|
|
553
554
|
children: [
|
|
554
555
|
/* @__PURE__ */ e("p", { children: N.PREFERENCES.PASSKEY_INSTRUCTIONS }),
|
|
@@ -566,7 +567,7 @@ const Lt = ({
|
|
|
566
567
|
}
|
|
567
568
|
),
|
|
568
569
|
/* @__PURE__ */ e(
|
|
569
|
-
|
|
570
|
+
z,
|
|
570
571
|
{
|
|
571
572
|
header: N.MAIN_STATISTICS.TITLE,
|
|
572
573
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
@@ -583,7 +584,7 @@ const Lt = ({
|
|
|
583
584
|
open: t,
|
|
584
585
|
onOpenChange: a
|
|
585
586
|
}) => {
|
|
586
|
-
const { getAccessToken: o, user: n } =
|
|
587
|
+
const { getAccessToken: o, user: n } = $(), {
|
|
587
588
|
data: r,
|
|
588
589
|
error: c,
|
|
589
590
|
isLoading: s
|
|
@@ -608,8 +609,8 @@ try {
|
|
|
608
609
|
}
|
|
609
610
|
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
611
|
function qt() {
|
|
611
|
-
const t =
|
|
612
|
-
return
|
|
612
|
+
const t = v(!1);
|
|
613
|
+
return F(() => (t.current = !0, () => {
|
|
613
614
|
t.current = !1;
|
|
614
615
|
}), []), Be(() => t.current, []);
|
|
615
616
|
}
|
|
@@ -632,13 +633,13 @@ const Jt = {
|
|
|
632
633
|
right: 0
|
|
633
634
|
};
|
|
634
635
|
function Re(t) {
|
|
635
|
-
const a = qt(), o =
|
|
636
|
-
const
|
|
637
|
-
|
|
638
|
-
n.current && a() && c(
|
|
636
|
+
const a = qt(), o = v(0), n = v(null), [r, c] = C(Jt), s = He(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
|
|
637
|
+
const m = d[0];
|
|
638
|
+
m && (cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
|
|
639
|
+
n.current && a() && c(m.contentRect);
|
|
639
640
|
}));
|
|
640
641
|
}), [a]);
|
|
641
|
-
return
|
|
642
|
+
return F(() => (n.current && (s == null || s.observe(n.current, t)), () => {
|
|
642
643
|
s == null || s.disconnect(), o.current && cancelAnimationFrame(o.current);
|
|
643
644
|
}), [s, t]), [n, r];
|
|
644
645
|
}
|
|
@@ -650,12 +651,12 @@ function Zt({
|
|
|
650
651
|
},
|
|
651
652
|
initialControlledDelay: r = 0
|
|
652
653
|
}) {
|
|
653
|
-
const [c, s] = C(!1), [d,
|
|
654
|
+
const [c, s] = C(!1), [d, m] = C(
|
|
654
655
|
a !== void 0 ? a : o
|
|
655
656
|
), f = (p) => {
|
|
656
|
-
|
|
657
|
+
m(p), n == null || n(p);
|
|
657
658
|
};
|
|
658
|
-
return
|
|
659
|
+
return F(() => {
|
|
659
660
|
(async () => t !== void 0 && !c && r > 0 && (await new Promise(
|
|
660
661
|
(p) => setTimeout(p, r)
|
|
661
662
|
), s(!0)))();
|
|
@@ -672,7 +673,7 @@ function er(t) {
|
|
|
672
673
|
return typeof o == "number" || typeof o == "string" ? `${n}${o}` : `${n}${a}`;
|
|
673
674
|
}
|
|
674
675
|
}
|
|
675
|
-
const
|
|
676
|
+
const Ve = "SET_ANNOUNCEMENT", $e = "CLEAR_ANNOUNCEMENT", tr = {
|
|
676
677
|
alert: null,
|
|
677
678
|
alertdialog: null,
|
|
678
679
|
log: "polite",
|
|
@@ -682,12 +683,12 @@ const $e = "SET_ANNOUNCEMENT", Ve = "CLEAR_ANNOUNCEMENT", tr = {
|
|
|
682
683
|
timer: "assertive"
|
|
683
684
|
}, rr = (t, a) => {
|
|
684
685
|
switch (a == null ? void 0 : a.type) {
|
|
685
|
-
case
|
|
686
|
+
case Ve:
|
|
686
687
|
return {
|
|
687
688
|
...t,
|
|
688
689
|
announcement: a.payload
|
|
689
690
|
};
|
|
690
|
-
case
|
|
691
|
+
case $e:
|
|
691
692
|
return {
|
|
692
693
|
...t,
|
|
693
694
|
announcement: null
|
|
@@ -700,7 +701,7 @@ const $e = "SET_ANNOUNCEMENT", Ve = "CLEAR_ANNOUNCEMENT", tr = {
|
|
|
700
701
|
dispatch: a
|
|
701
702
|
}) => {
|
|
702
703
|
a({
|
|
703
|
-
type:
|
|
704
|
+
type: $e
|
|
704
705
|
}), typeof t == "function" && t();
|
|
705
706
|
}, Le = ({
|
|
706
707
|
children: t,
|
|
@@ -710,7 +711,7 @@ const $e = "SET_ANNOUNCEMENT", Ve = "CLEAR_ANNOUNCEMENT", tr = {
|
|
|
710
711
|
dispatch: r
|
|
711
712
|
}) => {
|
|
712
713
|
clearTimeout(o.current), t !== null && r({
|
|
713
|
-
type:
|
|
714
|
+
type: Ve,
|
|
714
715
|
payload: t
|
|
715
716
|
}), a && (o.current = setTimeout(
|
|
716
717
|
() => nr({
|
|
@@ -751,13 +752,13 @@ function or({
|
|
|
751
752
|
clearAnnouncementDelay: c,
|
|
752
753
|
onAnnouncementClear: s,
|
|
753
754
|
visible: d,
|
|
754
|
-
...
|
|
755
|
+
...m
|
|
755
756
|
}) {
|
|
756
|
-
const f =
|
|
757
|
+
const f = v(null), p = v(null), [b, x] = Rt(rr, {
|
|
757
758
|
announcement: null
|
|
758
759
|
});
|
|
759
760
|
let l = o;
|
|
760
|
-
typeof l > "u" && (l = n ? tr[n] : "assertive"),
|
|
761
|
+
typeof l > "u" && (l = n ? tr[n] : "assertive"), F(() => {
|
|
761
762
|
ar({
|
|
762
763
|
announcementTimeoutRef: f,
|
|
763
764
|
announcementDelay: r,
|
|
@@ -782,7 +783,7 @@ function or({
|
|
|
782
783
|
"aria-live": l,
|
|
783
784
|
...n && { role: n },
|
|
784
785
|
className: h,
|
|
785
|
-
...
|
|
786
|
+
...m,
|
|
786
787
|
children: b.announcement
|
|
787
788
|
}
|
|
788
789
|
);
|
|
@@ -895,7 +896,7 @@ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
895
896
|
noBorder: c,
|
|
896
897
|
error: s,
|
|
897
898
|
mode: d,
|
|
898
|
-
leftElement:
|
|
899
|
+
leftElement: m,
|
|
899
900
|
rightElement: f
|
|
900
901
|
}) => {
|
|
901
902
|
const p = o ? t : y(
|
|
@@ -921,7 +922,7 @@ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
921
922
|
error: s,
|
|
922
923
|
mode: d,
|
|
923
924
|
rightElement: f,
|
|
924
|
-
leftElement:
|
|
925
|
+
leftElement: m
|
|
925
926
|
}), h = ur({
|
|
926
927
|
error: s,
|
|
927
928
|
raw: o,
|
|
@@ -963,7 +964,7 @@ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
963
964
|
className: c,
|
|
964
965
|
textAreaClassName: s,
|
|
965
966
|
mode: d = "system",
|
|
966
|
-
focusMode:
|
|
967
|
+
focusMode: m = "system",
|
|
967
968
|
value: f,
|
|
968
969
|
defaultValue: p,
|
|
969
970
|
disabled: b = !1,
|
|
@@ -973,75 +974,75 @@ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
973
974
|
helperTextOnFocus: T = !1,
|
|
974
975
|
rightElement: E,
|
|
975
976
|
leftElement: g,
|
|
976
|
-
onChange:
|
|
977
|
-
onFocus:
|
|
977
|
+
onChange: I,
|
|
978
|
+
onFocus: u,
|
|
978
979
|
onBlur: w,
|
|
979
|
-
...
|
|
980
|
-
},
|
|
981
|
-
var
|
|
982
|
-
const
|
|
980
|
+
...R
|
|
981
|
+
}, B) => {
|
|
982
|
+
var H;
|
|
983
|
+
const S = v(null), ie = Qt([B, S]), [k, _] = Re(), [Q, G] = Re(), K = v(80), U = v(-25), L = v(null), J = v(30), Z = v(null), Y = er({ id: t, prefix: `${De}-` }), [Ee, Fe] = C(0), [Te, Ge] = C(0), [Ue, Ne] = C(
|
|
983
984
|
!!(!T && h)
|
|
984
985
|
), Ye = `${a} error, ${h}`, j = mr({
|
|
985
986
|
className: c,
|
|
986
987
|
textAreaClassName: s,
|
|
987
988
|
error: n,
|
|
988
989
|
raw: r,
|
|
989
|
-
focusMode:
|
|
990
|
+
focusMode: m,
|
|
990
991
|
disabled: b,
|
|
991
992
|
noBorder: x,
|
|
992
993
|
mode: d,
|
|
993
994
|
rightElement: !!E,
|
|
994
995
|
leftElement: !!g
|
|
995
|
-
}), [
|
|
996
|
+
}), [D, je] = Zt({
|
|
996
997
|
value: f,
|
|
997
998
|
initialControlledDelay: 20,
|
|
998
999
|
defaultValue: p,
|
|
999
|
-
onChange: (
|
|
1000
|
-
|
|
1000
|
+
onChange: (A) => {
|
|
1001
|
+
I && I({
|
|
1001
1002
|
target: {
|
|
1002
|
-
value:
|
|
1003
|
+
value: A
|
|
1003
1004
|
}
|
|
1004
1005
|
});
|
|
1005
1006
|
}
|
|
1006
|
-
}), Ke = (
|
|
1007
|
-
je(
|
|
1008
|
-
}, We = (
|
|
1009
|
-
T && h && Ne(!0),
|
|
1010
|
-
}, Xe = (
|
|
1011
|
-
T && h &&
|
|
1007
|
+
}), Ke = (A) => {
|
|
1008
|
+
je(A.target.value);
|
|
1009
|
+
}, We = (A) => {
|
|
1010
|
+
T && h && Ne(!0), u && u(A);
|
|
1011
|
+
}, Xe = (A) => {
|
|
1012
|
+
T && h && !D && Ne(!1), w && w(A);
|
|
1012
1013
|
};
|
|
1013
1014
|
return ne(() => {
|
|
1014
|
-
|
|
1015
|
-
}, [
|
|
1015
|
+
_ && _.width && Fe(_.width + 18 + 10);
|
|
1016
|
+
}, [_]), ne(() => {
|
|
1016
1017
|
G && G.width && Ge(G.width + 18 + 10);
|
|
1017
1018
|
}, [G]), ne(() => {
|
|
1018
|
-
r ||
|
|
1019
|
-
}, [
|
|
1019
|
+
r || S && S.current && D !== void 0 && (S.current.style.height = "inherit", S.current.style.height = S.current.scrollHeight + "px");
|
|
1020
|
+
}, [D, r]), ne(() => {
|
|
1020
1021
|
r || setTimeout(() => {
|
|
1021
|
-
var
|
|
1022
|
-
(
|
|
1022
|
+
var A;
|
|
1023
|
+
(A = L == null ? void 0 : L.current) == null || A.style.setProperty(
|
|
1023
1024
|
"--av-text-area-wrapper-transition",
|
|
1024
|
-
|
|
1025
|
+
D ? "none" : "all 0.2s ease-out"
|
|
1025
1026
|
);
|
|
1026
1027
|
}, 0);
|
|
1027
|
-
}, [
|
|
1028
|
-
var
|
|
1029
|
-
if (!r &&
|
|
1028
|
+
}, [D, r]), ne(() => {
|
|
1029
|
+
var A, Se;
|
|
1030
|
+
if (!r && S && S.current && D !== void 0) {
|
|
1030
1031
|
const { labelOffset: fe, helperTextOffset: pe, scrollHeight: qe } = hr({
|
|
1031
|
-
scrollHeight:
|
|
1032
|
+
scrollHeight: S.current.scrollHeight,
|
|
1032
1033
|
currentHeight: K.current,
|
|
1033
1034
|
currentLabelOffset: U.current,
|
|
1034
1035
|
currentHelperTextOffset: J.current
|
|
1035
1036
|
});
|
|
1036
|
-
fe && (U.current = fe, (
|
|
1037
|
+
fe && (U.current = fe, (A = L == null ? void 0 : L.current) == null || A.style.setProperty(
|
|
1037
1038
|
"--av-text-area-label",
|
|
1038
1039
|
`${fe}px`
|
|
1039
|
-
)), pe && (J.current = pe, (
|
|
1040
|
+
)), pe && (J.current = pe, (Se = Z == null ? void 0 : Z.current) == null || Se.style.setProperty(
|
|
1040
1041
|
"--av-text-area-helper-text",
|
|
1041
1042
|
`${pe}px`
|
|
1042
1043
|
)), K.current = qe || K.current;
|
|
1043
1044
|
}
|
|
1044
|
-
}, [
|
|
1045
|
+
}, [D, r]), G.width > 0 && ((H = L == null ? void 0 : L.current) == null || H.style.setProperty(
|
|
1045
1046
|
"--tw-translate-x",
|
|
1046
1047
|
`${12 + G.width + 5}px`
|
|
1047
1048
|
)), /* @__PURE__ */ i("div", { className: j.wrapper, children: [
|
|
@@ -1082,17 +1083,17 @@ const sr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
1082
1083
|
paddingLeft: Te
|
|
1083
1084
|
}
|
|
1084
1085
|
},
|
|
1085
|
-
value:
|
|
1086
|
+
value: D,
|
|
1086
1087
|
onChange: Ke,
|
|
1087
1088
|
onFocus: We,
|
|
1088
1089
|
onBlur: Xe,
|
|
1089
|
-
...
|
|
1090
|
+
...R
|
|
1090
1091
|
}
|
|
1091
1092
|
),
|
|
1092
1093
|
!r && /* @__PURE__ */ e(
|
|
1093
1094
|
"label",
|
|
1094
1095
|
{
|
|
1095
|
-
ref:
|
|
1096
|
+
ref: L,
|
|
1096
1097
|
"aria-hidden": !0,
|
|
1097
1098
|
htmlFor: Y,
|
|
1098
1099
|
className: `${j.visibleLabel}`,
|
|
@@ -1212,14 +1213,14 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1212
1213
|
mode: c = "system",
|
|
1213
1214
|
focusMode: s = "system",
|
|
1214
1215
|
className: d,
|
|
1215
|
-
noBorder:
|
|
1216
|
+
noBorder: m = !1
|
|
1216
1217
|
}) => {
|
|
1217
1218
|
const f = Er({
|
|
1218
1219
|
mode: c,
|
|
1219
1220
|
focusMode: s,
|
|
1220
1221
|
labelHidden: n,
|
|
1221
1222
|
className: d,
|
|
1222
|
-
noBorder:
|
|
1223
|
+
noBorder: m
|
|
1223
1224
|
}), p = (b) => {
|
|
1224
1225
|
a == null || a(b.target.checked);
|
|
1225
1226
|
};
|
|
@@ -1241,7 +1242,7 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1241
1242
|
open: t,
|
|
1242
1243
|
onOpenChange: a
|
|
1243
1244
|
}) => {
|
|
1244
|
-
const { getAccessToken: o, user: n } =
|
|
1245
|
+
const { getAccessToken: o, user: n } = $(), {
|
|
1245
1246
|
data: r,
|
|
1246
1247
|
error: c,
|
|
1247
1248
|
isLoading: s,
|
|
@@ -1250,7 +1251,7 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1250
1251
|
keys: [n == null ? void 0 : n.username],
|
|
1251
1252
|
getAccessToken: o,
|
|
1252
1253
|
isPaused: !0
|
|
1253
|
-
}), [
|
|
1254
|
+
}), [m, f] = C({
|
|
1254
1255
|
prompts: []
|
|
1255
1256
|
}), p = ({
|
|
1256
1257
|
slot: l,
|
|
@@ -1259,22 +1260,20 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1259
1260
|
content: E,
|
|
1260
1261
|
privateChat: g = !1
|
|
1261
1262
|
}) => {
|
|
1262
|
-
f((
|
|
1263
|
-
const
|
|
1263
|
+
f((I) => {
|
|
1264
|
+
const u = I.prompts, w = {
|
|
1264
1265
|
slot: l,
|
|
1265
1266
|
label: T,
|
|
1266
1267
|
content: E,
|
|
1267
1268
|
enabled: h,
|
|
1268
1269
|
privateChat: g
|
|
1269
|
-
};
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
...A,
|
|
1277
|
-
prompts: [...m]
|
|
1270
|
+
}, R = u.findIndex((B) => B.slot === l);
|
|
1271
|
+
return R === -1 ? {
|
|
1272
|
+
...I,
|
|
1273
|
+
prompts: [...u, { ...w, slot: l }]
|
|
1274
|
+
} : (u[R] = w, {
|
|
1275
|
+
...I,
|
|
1276
|
+
prompts: [...u]
|
|
1278
1277
|
});
|
|
1279
1278
|
});
|
|
1280
1279
|
}, b = async (l) => {
|
|
@@ -1285,7 +1284,7 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1285
1284
|
type: le.SET_USER_PREFERENCES,
|
|
1286
1285
|
params: {
|
|
1287
1286
|
user: n == null ? void 0 : n.username,
|
|
1288
|
-
tags:
|
|
1287
|
+
tags: m.prompts
|
|
1289
1288
|
}
|
|
1290
1289
|
});
|
|
1291
1290
|
} catch {
|
|
@@ -1293,11 +1292,9 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1293
1292
|
}, x = () => {
|
|
1294
1293
|
d({ ...r }), a(!1);
|
|
1295
1294
|
};
|
|
1296
|
-
return
|
|
1295
|
+
return F(() => {
|
|
1297
1296
|
r != null && r.tags && f({ prompts: r.tags });
|
|
1298
|
-
}, [r]),
|
|
1299
|
-
console.info(`==> [${Date.now()}] localPrompts: `, u);
|
|
1300
|
-
}, [u]), c || s ? null : /* @__PURE__ */ i(
|
|
1297
|
+
}, [r]), c || s ? null : /* @__PURE__ */ i(
|
|
1301
1298
|
ce,
|
|
1302
1299
|
{
|
|
1303
1300
|
open: t,
|
|
@@ -1310,7 +1307,7 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1310
1307
|
alignHorizontal: "flex-end",
|
|
1311
1308
|
className: "pb-8 sm:pb-0",
|
|
1312
1309
|
children: [
|
|
1313
|
-
/* @__PURE__ */ e(
|
|
1310
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
1314
1311
|
X,
|
|
1315
1312
|
{
|
|
1316
1313
|
mode: "dark",
|
|
@@ -1320,7 +1317,7 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1320
1317
|
children: "Cancel"
|
|
1321
1318
|
}
|
|
1322
1319
|
) }),
|
|
1323
|
-
/* @__PURE__ */ e(
|
|
1320
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
1324
1321
|
X,
|
|
1325
1322
|
{
|
|
1326
1323
|
mode: "dark",
|
|
@@ -1337,14 +1334,14 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1337
1334
|
),
|
|
1338
1335
|
children: [
|
|
1339
1336
|
/* @__PURE__ */ e("p", { children: ct }),
|
|
1340
|
-
|
|
1341
|
-
|
|
1337
|
+
m.prompts && m.prompts.map((l) => /* @__PURE__ */ i(
|
|
1338
|
+
z,
|
|
1342
1339
|
{
|
|
1343
1340
|
header: `Prompt ${l.slot + 1}`,
|
|
1344
1341
|
className: "prose-dark dark:prose-lighter mb-2",
|
|
1345
1342
|
children: [
|
|
1346
1343
|
/* @__PURE__ */ i(q, { className: "mt-8 mb-6", columnGap: 2, rowGap: 6, children: [
|
|
1347
|
-
/* @__PURE__ */ e(
|
|
1344
|
+
/* @__PURE__ */ e(P, { span: 12, children: /* @__PURE__ */ e(
|
|
1348
1345
|
be,
|
|
1349
1346
|
{
|
|
1350
1347
|
label: "Label",
|
|
@@ -1360,7 +1357,7 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1360
1357
|
}
|
|
1361
1358
|
}
|
|
1362
1359
|
) }),
|
|
1363
|
-
/* @__PURE__ */ e(
|
|
1360
|
+
/* @__PURE__ */ e(P, { span: 12, children: /* @__PURE__ */ e(
|
|
1364
1361
|
be,
|
|
1365
1362
|
{
|
|
1366
1363
|
label: "Content",
|
|
@@ -1425,7 +1422,7 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1425
1422
|
open: t,
|
|
1426
1423
|
onOpenChange: a
|
|
1427
1424
|
}) => {
|
|
1428
|
-
const { getAccessToken: o, user: n } =
|
|
1425
|
+
const { getAccessToken: o, user: n } = $(), {
|
|
1429
1426
|
data: r,
|
|
1430
1427
|
error: c,
|
|
1431
1428
|
isLoading: s,
|
|
@@ -1433,14 +1430,14 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1433
1430
|
} = ze({
|
|
1434
1431
|
keys: [n == null ? void 0 : n.username],
|
|
1435
1432
|
getAccessToken: o
|
|
1436
|
-
}), [
|
|
1433
|
+
}), [m, f] = C(!1), [p, b] = C({
|
|
1437
1434
|
loadingLocation: !1
|
|
1438
|
-
}), [x, l] = C(""), [h, T] = C(""), [E, g] = C(it), [
|
|
1435
|
+
}), [x, l] = C(""), [h, T] = C(""), [E, g] = C(it), [I, u] = Ce({
|
|
1439
1436
|
key: ke + dt,
|
|
1440
1437
|
initialValue: !1
|
|
1441
1438
|
}), w = (k) => {
|
|
1442
|
-
|
|
1443
|
-
},
|
|
1439
|
+
u(k);
|
|
1440
|
+
}, R = async (k) => {
|
|
1444
1441
|
k.preventDefault();
|
|
1445
1442
|
try {
|
|
1446
1443
|
await se({
|
|
@@ -1457,21 +1454,21 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1457
1454
|
});
|
|
1458
1455
|
} catch {
|
|
1459
1456
|
}
|
|
1460
|
-
},
|
|
1457
|
+
}, B = async () => {
|
|
1461
1458
|
b({
|
|
1462
1459
|
loadingLocation: !0
|
|
1463
1460
|
}), T("...");
|
|
1464
1461
|
try {
|
|
1465
|
-
const k = Date.now(),
|
|
1462
|
+
const k = Date.now(), _ = await ht(), Q = await se({
|
|
1466
1463
|
accessToken: await o(),
|
|
1467
1464
|
type: le.GET_LOCATION,
|
|
1468
1465
|
params: {
|
|
1469
|
-
latitude:
|
|
1470
|
-
longitude:
|
|
1466
|
+
latitude: _.latitude,
|
|
1467
|
+
longitude: _.longitude
|
|
1471
1468
|
}
|
|
1472
1469
|
}), K = Date.now() - k;
|
|
1473
1470
|
if (K < 2e3 && await new Promise((U) => setTimeout(U, 2e3 - K)), Q.status === 200) {
|
|
1474
|
-
const { city: U, state:
|
|
1471
|
+
const { city: U, state: L, country: J, displayName: Z } = Q.data, Y = U && L && J ? `${U}, ${L}, ${J}` : Z;
|
|
1475
1472
|
b({
|
|
1476
1473
|
loadingLocation: !1
|
|
1477
1474
|
}), T(Y);
|
|
@@ -1481,14 +1478,14 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1481
1478
|
});
|
|
1482
1479
|
} catch {
|
|
1483
1480
|
}
|
|
1484
|
-
},
|
|
1485
|
-
g(k ?
|
|
1486
|
-
},
|
|
1487
|
-
f(!
|
|
1481
|
+
}, H = (k, _) => {
|
|
1482
|
+
g(k ? _ : _ === W ? ee : W);
|
|
1483
|
+
}, S = () => {
|
|
1484
|
+
f(!m);
|
|
1488
1485
|
}, ie = () => {
|
|
1489
1486
|
d({ ...r }), a(!1);
|
|
1490
1487
|
};
|
|
1491
|
-
return
|
|
1488
|
+
return F(() => {
|
|
1492
1489
|
r != null && r.instructions && l(r.instructions), r != null && r.location && T(r.location), r != null && r.engine && g(r.engine);
|
|
1493
1490
|
}, [r]), c || s ? null : /* @__PURE__ */ e(
|
|
1494
1491
|
ce,
|
|
@@ -1503,7 +1500,7 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1503
1500
|
alignHorizontal: "flex-end",
|
|
1504
1501
|
className: "pb-8 sm:pb-0",
|
|
1505
1502
|
children: [
|
|
1506
|
-
/* @__PURE__ */ e(
|
|
1503
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
1507
1504
|
X,
|
|
1508
1505
|
{
|
|
1509
1506
|
mode: "dark",
|
|
@@ -1513,14 +1510,14 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1513
1510
|
children: "Cancel"
|
|
1514
1511
|
}
|
|
1515
1512
|
) }),
|
|
1516
|
-
/* @__PURE__ */ e(
|
|
1513
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
1517
1514
|
X,
|
|
1518
1515
|
{
|
|
1519
1516
|
mode: "dark",
|
|
1520
1517
|
variant: "danger",
|
|
1521
1518
|
focusMode: "light",
|
|
1522
1519
|
onClick: async (k) => {
|
|
1523
|
-
a(!1), await
|
|
1520
|
+
a(!1), await R(k);
|
|
1524
1521
|
},
|
|
1525
1522
|
children: "Save"
|
|
1526
1523
|
}
|
|
@@ -1528,10 +1525,10 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1528
1525
|
]
|
|
1529
1526
|
}
|
|
1530
1527
|
),
|
|
1531
|
-
children: /* @__PURE__ */ i(
|
|
1532
|
-
|
|
1528
|
+
children: /* @__PURE__ */ i(O, { children: [
|
|
1529
|
+
m && /* @__PURE__ */ e(Tr, { open: m, onOpenChange: f }),
|
|
1533
1530
|
/* @__PURE__ */ i(
|
|
1534
|
-
|
|
1531
|
+
z,
|
|
1535
1532
|
{
|
|
1536
1533
|
header: N.SETTINGS_ENGINE.TITLE,
|
|
1537
1534
|
className: "prose-dark dark:prose-lighter",
|
|
@@ -1543,7 +1540,7 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1543
1540
|
noBorder: !0,
|
|
1544
1541
|
label: W,
|
|
1545
1542
|
name: W,
|
|
1546
|
-
onChange: (k) =>
|
|
1543
|
+
onChange: (k) => H(k, W),
|
|
1547
1544
|
checked: E === W
|
|
1548
1545
|
}
|
|
1549
1546
|
),
|
|
@@ -1554,7 +1551,7 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1554
1551
|
noBorder: !0,
|
|
1555
1552
|
label: ee,
|
|
1556
1553
|
name: ee,
|
|
1557
|
-
onChange: (k) =>
|
|
1554
|
+
onChange: (k) => H(k, ee),
|
|
1558
1555
|
checked: E === ee
|
|
1559
1556
|
}
|
|
1560
1557
|
),
|
|
@@ -1567,7 +1564,7 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1567
1564
|
label: "Show Message Statistics",
|
|
1568
1565
|
name: "show-message-statistics",
|
|
1569
1566
|
onChange: w,
|
|
1570
|
-
checked:
|
|
1567
|
+
checked: I
|
|
1571
1568
|
}
|
|
1572
1569
|
),
|
|
1573
1570
|
/* @__PURE__ */ e("h3", { className: "border-b-2 border-slate-400", children: "Prompts" }),
|
|
@@ -1576,7 +1573,7 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1576
1573
|
{
|
|
1577
1574
|
className: "mt-2",
|
|
1578
1575
|
size: "small",
|
|
1579
|
-
onClick:
|
|
1576
|
+
onClick: S,
|
|
1580
1577
|
labelLeft: "Edit Custom Prompts",
|
|
1581
1578
|
children: /* @__PURE__ */ e(Nt, { size: "size-3", monotone: !0 })
|
|
1582
1579
|
}
|
|
@@ -1585,7 +1582,7 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1585
1582
|
}
|
|
1586
1583
|
),
|
|
1587
1584
|
/* @__PURE__ */ i(
|
|
1588
|
-
|
|
1585
|
+
z,
|
|
1589
1586
|
{
|
|
1590
1587
|
header: "Custom Instructions",
|
|
1591
1588
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
@@ -1615,7 +1612,7 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1615
1612
|
}
|
|
1616
1613
|
),
|
|
1617
1614
|
/* @__PURE__ */ i(
|
|
1618
|
-
|
|
1615
|
+
z,
|
|
1619
1616
|
{
|
|
1620
1617
|
header: "Location",
|
|
1621
1618
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
@@ -1641,7 +1638,7 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1641
1638
|
size: "small",
|
|
1642
1639
|
noBorder: !0,
|
|
1643
1640
|
disabled: p.loadingLocation,
|
|
1644
|
-
onClick:
|
|
1641
|
+
onClick: B,
|
|
1645
1642
|
children: p.loadingLocation ? "Detecting..." : "Auto-detect"
|
|
1646
1643
|
}
|
|
1647
1644
|
)
|
|
@@ -1652,18 +1649,18 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1652
1649
|
}
|
|
1653
1650
|
);
|
|
1654
1651
|
}, _r = () => {
|
|
1655
|
-
const { logout: t } =
|
|
1652
|
+
const { logout: t } = $(), { state: a } = he(Oe), [o, n] = C(!1), [r, c] = C(!1), [s, d] = C(!1), [m, f] = C(!1), [p, b] = C(!1), x = () => {
|
|
1656
1653
|
n(!o);
|
|
1657
1654
|
}, l = () => {
|
|
1658
1655
|
c(!r);
|
|
1659
1656
|
}, h = () => {
|
|
1660
1657
|
d(!s);
|
|
1661
1658
|
}, T = () => {
|
|
1662
|
-
f(!
|
|
1659
|
+
f(!m);
|
|
1663
1660
|
}, E = () => {
|
|
1664
1661
|
b(!p);
|
|
1665
1662
|
};
|
|
1666
|
-
return /* @__PURE__ */ i(
|
|
1663
|
+
return /* @__PURE__ */ i(O, { children: [
|
|
1667
1664
|
/* @__PURE__ */ e(
|
|
1668
1665
|
Pe,
|
|
1669
1666
|
{
|
|
@@ -1681,15 +1678,15 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1681
1678
|
/* @__PURE__ */ e(jt, { open: o, onOpenChange: n }),
|
|
1682
1679
|
/* @__PURE__ */ e(Nr, { open: r, onOpenChange: c }),
|
|
1683
1680
|
s && /* @__PURE__ */ e(Ut, { open: s, onOpenChange: d }),
|
|
1684
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
1686
|
-
|
|
1681
|
+
/* @__PURE__ */ e($t, { open: m, onOpenChange: f }),
|
|
1682
|
+
/* @__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(P, { children: /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
1683
|
+
St,
|
|
1687
1684
|
{
|
|
1688
1685
|
label: "Profile, Settings, etc.",
|
|
1689
1686
|
mode: "light",
|
|
1690
1687
|
placement: "left",
|
|
1691
1688
|
trigger: /* @__PURE__ */ i(
|
|
1692
|
-
|
|
1689
|
+
wt,
|
|
1693
1690
|
{
|
|
1694
1691
|
mode: "dark",
|
|
1695
1692
|
focusMode: "light",
|
|
@@ -1728,7 +1725,7 @@ const fr = "av-toggle", pr = () => y("peer", "h-6", "w-11", "rounded-full"), gr
|
|
|
1728
1725
|
icon: /* @__PURE__ */ e(Ot, {})
|
|
1729
1726
|
}
|
|
1730
1727
|
),
|
|
1731
|
-
a && a.id && !a.isComponent && /* @__PURE__ */ i(
|
|
1728
|
+
a && a.id && !a.isComponent && /* @__PURE__ */ i(O, { children: [
|
|
1732
1729
|
/* @__PURE__ */ e(vt, {}),
|
|
1733
1730
|
/* @__PURE__ */ e(
|
|
1734
1731
|
re,
|