@versini/sassysaint 8.40.3 → 8.42.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/{AboutChangelog.CpWB0KSl.js → AboutChangelog.C7gm-3NT.js} +2 -2
- package/dist/chunks/{AboutEntry.CFRVOVGC.js → AboutEntry.D_pgWP79.js} +5 -5
- package/dist/chunks/{App.DUrzgzJt.js → App.DXta-gvo.js} +13 -10
- package/dist/chunks/{Chart.DsLv5xF3.js → Chart.Cr3ZeKqI.js} +2 -2
- package/dist/chunks/ChatBubbleAssistant.BB76OqTX.js +75 -0
- package/dist/chunks/{HistoryEntry.duw6Q0XF.js → HistoryEntry.DsIdSYxb.js} +2 -2
- package/dist/chunks/{LNWAZHJI.4Z_lIpK9.js → LNWAZHJI.DxQWiZrX.js} +1 -1
- package/dist/chunks/{ProfileEntry.DUOiURqD.js → ProfileEntry.BAp-8Nf_.js} +2 -2
- package/dist/chunks/{SettingsEntry.CAip13LC.js → SettingsEntry.BHoKltw1.js} +117 -119
- package/dist/chunks/{UsageEntry.sTtPUqlM.js → UsageEntry.sYfwUlzO.js} +3 -3
- package/dist/chunks/{index.r_J9hnMj.js → index.BrP_4z_s.js} +1 -1
- package/dist/chunks/{index.BB7rVhbu.js → index.CQ3UIheu.js} +1 -1
- package/dist/chunks/{index.ByCJGvcI.js → index.DO75xJrQ.js} +63 -64
- package/dist/chunks/{index.B69Zty16.js → index.DQo8JXFc.js} +2 -2
- package/dist/chunks/{index.JZnR1h1J.js → index.DgujjZkc.js} +3 -3
- package/dist/chunks/{index.UBrBxIIE.js → index.uDv7Sbpj.js} +1 -1
- package/dist/chunks/{useMarkdown.DJi_yuGq.js → useMarkdown.ngn9Ceqg.js} +6 -6
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
- package/dist/chunks/ChatBubbleAssistant.Dbp5KO-Q.js +0 -75
@@ -1,24 +1,24 @@
|
|
1
1
|
import { jsxs as v, jsx as s } from "react/jsx-runtime";
|
2
|
-
import { n as
|
3
|
-
import { useUserPreferences as
|
4
|
-
import
|
2
|
+
import { n as ke, LOCAL_STORAGE_PREFIX as xe, LOCAL_STORAGE_SERVICE_WORKER as Ee, isServiceWorkerEnabled as Te, SETTINGS_TITLE as Ne, S as V, CARDS as P, pe as ve, C as re, PROMPTS_DESCRIPTION as we, L as _e, j as ne, getCurrentGeoLocation as Ce, handleServiceWorkerToggle as Se } from "./index.DO75xJrQ.js";
|
3
|
+
import { useUserPreferences as Ie, E as Ae, tt as Le, mutateCall as se, SERVICE_TYPES as le } from "./App.DXta-gvo.js";
|
4
|
+
import Re, { useRef as w, useState as g, useLayoutEffect as j, useMemo as de, useEffect as X, useId as Me, useReducer as Oe, useCallback as De } from "react";
|
5
5
|
import i from "clsx";
|
6
|
-
const
|
7
|
-
function
|
8
|
-
const e =
|
6
|
+
const ue = "av-text-area", Pe = "av-text-area-wrapper", ae = "av-text-area-helper-text", Be = "av-text-area__control--right", Ge = "av-text-area__control--left";
|
7
|
+
function He() {
|
8
|
+
const e = w(!1);
|
9
9
|
return X(() => (e.current = !0, () => {
|
10
10
|
e.current = !1;
|
11
|
-
}), []),
|
11
|
+
}), []), De(() => e.current, []);
|
12
12
|
}
|
13
|
-
function
|
14
|
-
return
|
13
|
+
function Ue(e) {
|
14
|
+
return de(() => e.every((a) => a == null) ? () => {
|
15
15
|
} : (a) => {
|
16
16
|
e.forEach((r) => {
|
17
17
|
typeof r == "function" ? r(a) : r != null && (r.current = a);
|
18
18
|
});
|
19
19
|
}, [...e]);
|
20
20
|
}
|
21
|
-
const
|
21
|
+
const Ve = {
|
22
22
|
x: 0,
|
23
23
|
y: 0,
|
24
24
|
width: 0,
|
@@ -28,8 +28,8 @@ const $e = {
|
|
28
28
|
bottom: 0,
|
29
29
|
right: 0
|
30
30
|
};
|
31
|
-
function
|
32
|
-
const a =
|
31
|
+
function ce(e) {
|
32
|
+
const a = He(), r = w(0), o = w(null), [t, l] = g(Ve), c = de(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
|
33
33
|
const u = d[0];
|
34
34
|
u && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
35
35
|
o.current && a() && l(u.contentRect);
|
@@ -39,7 +39,7 @@ function de(e) {
|
|
39
39
|
c?.disconnect(), r.current && cancelAnimationFrame(r.current);
|
40
40
|
}), [c, e]), [o, t];
|
41
41
|
}
|
42
|
-
function
|
42
|
+
function $e({
|
43
43
|
value: e,
|
44
44
|
defaultValue: a,
|
45
45
|
finalValue: r,
|
@@ -58,7 +58,7 @@ function Fe({
|
|
58
58
|
), c(!0)))();
|
59
59
|
}, [e, t, l]), e !== void 0 ? !l && t > 0 ? ["", o, !0] : [e, o, !0] : [d, m, !1];
|
60
60
|
}
|
61
|
-
function
|
61
|
+
function Fe(e) {
|
62
62
|
const a = Me();
|
63
63
|
if (!e)
|
64
64
|
return a;
|
@@ -69,7 +69,7 @@ function We(e) {
|
|
69
69
|
return typeof r == "number" || typeof r == "string" ? `${o}${r}` : `${o}${a}`;
|
70
70
|
}
|
71
71
|
}
|
72
|
-
const
|
72
|
+
const me = "SET_ANNOUNCEMENT", fe = "CLEAR_ANNOUNCEMENT", We = {
|
73
73
|
alert: null,
|
74
74
|
alertdialog: null,
|
75
75
|
log: "polite",
|
@@ -77,14 +77,14 @@ const pe = "SET_ANNOUNCEMENT", he = "CLEAR_ANNOUNCEMENT", ze = {
|
|
77
77
|
progressbar: null,
|
78
78
|
status: "polite",
|
79
79
|
timer: "assertive"
|
80
|
-
},
|
80
|
+
}, ze = (e, a) => {
|
81
81
|
switch (a?.type) {
|
82
|
-
case
|
82
|
+
case me:
|
83
83
|
return {
|
84
84
|
...e,
|
85
85
|
announcement: a.payload
|
86
86
|
};
|
87
|
-
case
|
87
|
+
case fe:
|
88
88
|
return {
|
89
89
|
...e,
|
90
90
|
announcement: null
|
@@ -92,14 +92,14 @@ const pe = "SET_ANNOUNCEMENT", he = "CLEAR_ANNOUNCEMENT", ze = {
|
|
92
92
|
default:
|
93
93
|
return e;
|
94
94
|
}
|
95
|
-
},
|
95
|
+
}, je = ({
|
96
96
|
onAnnouncementClear: e,
|
97
97
|
dispatch: a
|
98
98
|
}) => {
|
99
99
|
a({
|
100
|
-
type:
|
100
|
+
type: fe
|
101
101
|
}), typeof e == "function" && e();
|
102
|
-
},
|
102
|
+
}, ie = ({
|
103
103
|
children: e,
|
104
104
|
clearAnnouncementDelay: a,
|
105
105
|
clearAnnouncementTimeoutRef: r,
|
@@ -107,16 +107,16 @@ const pe = "SET_ANNOUNCEMENT", he = "CLEAR_ANNOUNCEMENT", ze = {
|
|
107
107
|
dispatch: t
|
108
108
|
}) => {
|
109
109
|
clearTimeout(r.current), e !== null && t({
|
110
|
-
type:
|
110
|
+
type: me,
|
111
111
|
payload: e
|
112
112
|
}), a && (r.current = setTimeout(
|
113
|
-
() =>
|
113
|
+
() => je({
|
114
114
|
onAnnouncementClear: o,
|
115
115
|
dispatch: t
|
116
116
|
}),
|
117
117
|
a
|
118
118
|
));
|
119
|
-
},
|
119
|
+
}, Xe = ({
|
120
120
|
children: e,
|
121
121
|
announcementTimeoutRef: a,
|
122
122
|
announcementDelay: r,
|
@@ -125,13 +125,13 @@ const pe = "SET_ANNOUNCEMENT", he = "CLEAR_ANNOUNCEMENT", ze = {
|
|
125
125
|
onAnnouncementClear: l,
|
126
126
|
dispatch: c
|
127
127
|
}) => {
|
128
|
-
clearTimeout(a.current), r ? a.current = setTimeout(
|
128
|
+
clearTimeout(a.current), r ? a.current = setTimeout(ie, r, {
|
129
129
|
children: e,
|
130
130
|
clearAnnouncementDelay: o,
|
131
131
|
clearAnnouncementTimeoutRef: t,
|
132
132
|
onAnnouncementClear: l,
|
133
133
|
dispatch: c
|
134
|
-
}) :
|
134
|
+
}) : ie({
|
135
135
|
children: e,
|
136
136
|
clearAnnouncementDelay: o,
|
137
137
|
clearAnnouncementTimeoutRef: t,
|
@@ -139,7 +139,7 @@ const pe = "SET_ANNOUNCEMENT", he = "CLEAR_ANNOUNCEMENT", ze = {
|
|
139
139
|
dispatch: c
|
140
140
|
});
|
141
141
|
};
|
142
|
-
function
|
142
|
+
function Ye({
|
143
143
|
children: e,
|
144
144
|
className: a,
|
145
145
|
politeness: r,
|
@@ -150,12 +150,12 @@ function qe({
|
|
150
150
|
visible: d,
|
151
151
|
...u
|
152
152
|
}) {
|
153
|
-
const m =
|
153
|
+
const m = w(null), p = w(null), [b, S] = Oe(ze, {
|
154
154
|
announcement: null
|
155
155
|
});
|
156
|
-
let
|
157
|
-
typeof
|
158
|
-
|
156
|
+
let _ = r;
|
157
|
+
typeof _ > "u" && (_ = o ? We[o] : "assertive"), X(() => {
|
158
|
+
Xe({
|
159
159
|
announcementTimeoutRef: m,
|
160
160
|
announcementDelay: t,
|
161
161
|
children: e,
|
@@ -176,7 +176,7 @@ function qe({
|
|
176
176
|
return /* @__PURE__ */ s(
|
177
177
|
"div",
|
178
178
|
{
|
179
|
-
"aria-live":
|
179
|
+
"aria-live": _,
|
180
180
|
...o && { role: o },
|
181
181
|
className: f,
|
182
182
|
...u,
|
@@ -197,19 +197,19 @@ try {
|
|
197
197
|
});
|
198
198
|
} catch {
|
199
199
|
}
|
200
|
-
const
|
200
|
+
const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", Ke = ({ mode: e }) => i({
|
201
201
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
202
202
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
203
203
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
204
204
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
205
|
-
}),
|
205
|
+
}), Je = ({
|
206
206
|
focusMode: e
|
207
207
|
}) => i("focus:outline focus:outline-2 focus:outline-offset-2", {
|
208
208
|
"focus:outline-focus-dark": e === "dark",
|
209
209
|
"focus:outline-focus-light": e === "light",
|
210
210
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
211
211
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
212
|
-
}),
|
212
|
+
}), Ze = ({
|
213
213
|
noBorder: e,
|
214
214
|
error: a
|
215
215
|
}) => i("border-2", {
|
@@ -217,7 +217,7 @@ const Ke = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
217
217
|
"focus:border-border-dark": !e && a,
|
218
218
|
"border-border-error-dark": !e && a,
|
219
219
|
"border-transparent": e
|
220
|
-
}),
|
220
|
+
}), Qe = ({
|
221
221
|
disabled: e,
|
222
222
|
raw: a,
|
223
223
|
error: r,
|
@@ -256,7 +256,7 @@ const Ke = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
256
256
|
"text-copy-medium dark:text-copy-error-dark": o === "alt-system"
|
257
257
|
}
|
258
258
|
);
|
259
|
-
},
|
259
|
+
}, et = ({
|
260
260
|
error: e,
|
261
261
|
raw: a,
|
262
262
|
mode: r,
|
@@ -283,7 +283,7 @@ const Ke = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
283
283
|
"text-copy-error-dark dark:text-copy-error-light": r === "system",
|
284
284
|
"dark:text-copy-error-dark text-copy-error-light": r === "alt-system"
|
285
285
|
});
|
286
|
-
},
|
286
|
+
}, tt = ({
|
287
287
|
className: e,
|
288
288
|
textAreaClassName: a,
|
289
289
|
raw: r,
|
@@ -297,44 +297,44 @@ const Ke = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
297
297
|
}) => {
|
298
298
|
const p = r ? e : i(
|
299
299
|
"relative flex w-full flex-col justify-center",
|
300
|
-
|
300
|
+
Pe,
|
301
301
|
e
|
302
302
|
), b = r ? i(a) : i(
|
303
|
-
|
303
|
+
ue,
|
304
304
|
a,
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
305
|
+
qe(),
|
306
|
+
Ke({ mode: d }),
|
307
|
+
Je({ focusMode: o }),
|
308
|
+
Ze({
|
309
309
|
noBorder: l,
|
310
310
|
error: c
|
311
311
|
}),
|
312
312
|
{
|
313
313
|
"disabled:cursor-not-allowed disabled:opacity-50": t
|
314
314
|
}
|
315
|
-
), S = r ? void 0 : "sr-only",
|
315
|
+
), S = r ? void 0 : "sr-only", _ = Qe({
|
316
316
|
disabled: t,
|
317
317
|
raw: r,
|
318
318
|
error: c,
|
319
319
|
mode: d,
|
320
320
|
rightElement: m,
|
321
321
|
leftElement: u
|
322
|
-
}), f =
|
322
|
+
}), f = et({
|
323
323
|
error: c,
|
324
324
|
raw: r,
|
325
325
|
mode: d,
|
326
326
|
disabled: t
|
327
|
-
}), I = r ? void 0 : i(
|
327
|
+
}), I = r ? void 0 : i(Be, "absolute"), k = r ? void 0 : i(Ge, "absolute");
|
328
328
|
return {
|
329
329
|
wrapper: p,
|
330
330
|
textArea: b,
|
331
331
|
accessibleLabel: S,
|
332
|
-
visibleLabel:
|
332
|
+
visibleLabel: _,
|
333
333
|
helperText: f,
|
334
334
|
rightElement: I,
|
335
335
|
leftElement: k
|
336
336
|
};
|
337
|
-
},
|
337
|
+
}, rt = ({
|
338
338
|
scrollHeight: e,
|
339
339
|
currentHeight: a,
|
340
340
|
currentLabelOffset: r = 0,
|
@@ -350,7 +350,7 @@ const Ke = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
350
350
|
helperTextOffset: l,
|
351
351
|
scrollHeight: e
|
352
352
|
};
|
353
|
-
}, oe =
|
353
|
+
}, oe = Re.forwardRef(
|
354
354
|
({
|
355
355
|
id: e,
|
356
356
|
name: a,
|
@@ -365,7 +365,7 @@ const Ke = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
365
365
|
defaultValue: p,
|
366
366
|
disabled: b = !1,
|
367
367
|
noBorder: S = !1,
|
368
|
-
labelId:
|
368
|
+
labelId: _,
|
369
369
|
helperText: f = "",
|
370
370
|
helperTextOnFocus: I = !1,
|
371
371
|
rightElement: k,
|
@@ -375,9 +375,9 @@ const Ke = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
375
375
|
onBlur: F,
|
376
376
|
...q
|
377
377
|
}, K) => {
|
378
|
-
const x =
|
378
|
+
const x = w(null), J = Ue([K, x]), [Z, G] = ce(), [Q, A] = ce(), W = w(80), z = w(-25), L = w(null), n = w(30), h = w(null), E = Fe({ id: e, prefix: `${ue}-` }), [H, R] = g(0), [y, T] = g(0), [O, U] = g(
|
379
379
|
!!(!I && f)
|
380
|
-
), ee = `${a} error, ${f}`, D =
|
380
|
+
), ee = `${a} error, ${f}`, D = tt({
|
381
381
|
className: l,
|
382
382
|
textAreaClassName: c,
|
383
383
|
error: o,
|
@@ -388,7 +388,7 @@ const Ke = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
388
388
|
mode: d,
|
389
389
|
rightElement: !!k,
|
390
390
|
leftElement: !!C
|
391
|
-
}), [
|
391
|
+
}), [M, pe] = $e({
|
392
392
|
value: m,
|
393
393
|
initialControlledDelay: 20,
|
394
394
|
defaultValue: p,
|
@@ -399,29 +399,29 @@ const Ke = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
399
399
|
}
|
400
400
|
});
|
401
401
|
}
|
402
|
-
}),
|
403
|
-
|
404
|
-
},
|
402
|
+
}), he = (N) => {
|
403
|
+
pe(N.target.value);
|
404
|
+
}, ge = (N) => {
|
405
405
|
I && f && U(!0), Y && Y(N);
|
406
|
-
},
|
407
|
-
I && f && !
|
406
|
+
}, ye = (N) => {
|
407
|
+
I && f && !M && U(!1), F && F(N);
|
408
408
|
};
|
409
409
|
return j(() => {
|
410
410
|
G && G.width && R(G.width + 18 + 10);
|
411
411
|
}, [G]), j(() => {
|
412
412
|
A && A.width && T(A.width + 18 + 10);
|
413
413
|
}, [A]), j(() => {
|
414
|
-
t || x && x.current &&
|
415
|
-
}, [
|
414
|
+
t || x && x.current && M !== void 0 && (x.current.style.height = "inherit", x.current.style.height = x.current.scrollHeight + "px");
|
415
|
+
}, [M, t]), j(() => {
|
416
416
|
t || setTimeout(() => {
|
417
417
|
L?.current?.style.setProperty(
|
418
418
|
"--av-text-area-wrapper-transition",
|
419
|
-
|
419
|
+
M ? "none" : "all 0.2s ease-out"
|
420
420
|
);
|
421
421
|
}, 0);
|
422
|
-
}, [
|
423
|
-
if (!t && x && x.current &&
|
424
|
-
const { labelOffset: N, helperTextOffset: te, scrollHeight:
|
422
|
+
}, [M, t]), j(() => {
|
423
|
+
if (!t && x && x.current && M !== void 0) {
|
424
|
+
const { labelOffset: N, helperTextOffset: te, scrollHeight: be } = rt({
|
425
425
|
scrollHeight: x.current.scrollHeight,
|
426
426
|
currentHeight: W.current,
|
427
427
|
currentLabelOffset: z.current,
|
@@ -433,9 +433,9 @@ const Ke = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
433
433
|
)), te && (n.current = te, h?.current?.style.setProperty(
|
434
434
|
"--av-text-area-helper-text",
|
435
435
|
`${te}px`
|
436
|
-
)), W.current =
|
436
|
+
)), W.current = be || W.current;
|
437
437
|
}
|
438
|
-
}, [
|
438
|
+
}, [M, t]), A.width > 0 && L?.current?.style.setProperty(
|
439
439
|
"--tw-translate-x",
|
440
440
|
`${12 + A.width + 5}px`
|
441
441
|
), /* @__PURE__ */ v("div", { className: D.wrapper, children: [
|
@@ -443,7 +443,7 @@ const Ke = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
443
443
|
"label",
|
444
444
|
{
|
445
445
|
htmlFor: E,
|
446
|
-
id:
|
446
|
+
id: _,
|
447
447
|
className: D.accessibleLabel,
|
448
448
|
children: r
|
449
449
|
}
|
@@ -476,10 +476,10 @@ const Ke = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
476
476
|
paddingLeft: y
|
477
477
|
}
|
478
478
|
},
|
479
|
-
value:
|
480
|
-
onChange:
|
481
|
-
onFocus:
|
482
|
-
onBlur:
|
479
|
+
value: M,
|
480
|
+
onChange: he,
|
481
|
+
onFocus: ge,
|
482
|
+
onBlur: ye,
|
483
483
|
...q
|
484
484
|
}
|
485
485
|
),
|
@@ -493,7 +493,7 @@ const Ke = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
493
493
|
children: r
|
494
494
|
}
|
495
495
|
),
|
496
|
-
|
496
|
+
O && /* @__PURE__ */ s(
|
497
497
|
"div",
|
498
498
|
{
|
499
499
|
ref: h,
|
@@ -510,7 +510,7 @@ const Ke = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
510
510
|
children: k
|
511
511
|
}
|
512
512
|
),
|
513
|
-
o && f && /* @__PURE__ */ s(
|
513
|
+
o && f && /* @__PURE__ */ s(Ye, { politeness: "polite", clearAnnouncementDelay: 500, children: ee })
|
514
514
|
] });
|
515
515
|
}
|
516
516
|
);
|
@@ -528,7 +528,7 @@ try {
|
|
528
528
|
});
|
529
529
|
} catch {
|
530
530
|
}
|
531
|
-
const
|
531
|
+
const at = "av-toggle", ot = () => i("peer", "h-6", "w-11", "rounded-full"), nt = ({
|
532
532
|
focusMode: e
|
533
533
|
}) => i(
|
534
534
|
"peer-focus:outline",
|
@@ -540,14 +540,14 @@ const ot = "av-toggle", nt = () => i("peer", "h-6", "w-11", "rounded-full"), st
|
|
540
540
|
"peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
|
541
541
|
"peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
|
542
542
|
}
|
543
|
-
),
|
543
|
+
), st = () => i(
|
544
544
|
"peer-checked:after:translate-x-full",
|
545
545
|
// background color when checked
|
546
546
|
"peer-checked:bg-action-light",
|
547
547
|
// knob circle and border color when checked
|
548
548
|
"peer-checked:after:bg-white",
|
549
549
|
"peer-checked:after:border-white"
|
550
|
-
),
|
550
|
+
), lt = () => i(
|
551
551
|
"after:left-[2px]",
|
552
552
|
"after:top-[2px]",
|
553
553
|
"after:border",
|
@@ -559,7 +559,7 @@ const ot = "av-toggle", nt = () => i("peer", "h-6", "w-11", "rounded-full"), st
|
|
559
559
|
"after:rounded-full",
|
560
560
|
"after:transition-all",
|
561
561
|
"after:content-['']"
|
562
|
-
),
|
562
|
+
), ct = ({
|
563
563
|
mode: e,
|
564
564
|
noBorder: a
|
565
565
|
}) => i({
|
@@ -568,7 +568,7 @@ const ot = "av-toggle", nt = () => i("peer", "h-6", "w-11", "rounded-full"), st
|
|
568
568
|
"border-border-light bg-surface-darker": e === "dark",
|
569
569
|
"border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
|
570
570
|
"border-border-medium bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
|
571
|
-
}),
|
571
|
+
}), it = ({
|
572
572
|
mode: e,
|
573
573
|
labelHidden: a
|
574
574
|
}) => a ? "sr-only" : i("ml-2 text-sm", {
|
@@ -576,11 +576,11 @@ const ot = "av-toggle", nt = () => i("peer", "h-6", "w-11", "rounded-full"), st
|
|
576
576
|
"text-copy-lighter": e === "dark",
|
577
577
|
"text-copy-lighter dark:text-copy-dark": e === "alt-system",
|
578
578
|
"text-copy-dark dark:text-copy-lighter": e === "system"
|
579
|
-
}),
|
580
|
-
|
579
|
+
}), dt = ({ className: e }) => i(
|
580
|
+
at,
|
581
581
|
"relative flex cursor-pointer items-center",
|
582
582
|
e
|
583
|
-
),
|
583
|
+
), ut = ({
|
584
584
|
mode: e,
|
585
585
|
focusMode: a,
|
586
586
|
labelHidden: r,
|
@@ -588,15 +588,15 @@ const ot = "av-toggle", nt = () => i("peer", "h-6", "w-11", "rounded-full"), st
|
|
588
588
|
noBorder: t
|
589
589
|
}) => ({
|
590
590
|
toggle: i(
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
591
|
+
ot(),
|
592
|
+
ct({ mode: e, noBorder: t }),
|
593
|
+
nt({ focusMode: a }),
|
594
|
+
lt(),
|
595
|
+
st()
|
596
596
|
),
|
597
|
-
label:
|
597
|
+
label: it({ mode: e, labelHidden: r }),
|
598
598
|
input: "peer sr-only",
|
599
|
-
wrapper:
|
599
|
+
wrapper: dt({ className: o })
|
600
600
|
}), B = ({
|
601
601
|
checked: e = !1,
|
602
602
|
onChange: a,
|
@@ -608,7 +608,7 @@ const ot = "av-toggle", nt = () => i("peer", "h-6", "w-11", "rounded-full"), st
|
|
608
608
|
className: d,
|
609
609
|
noBorder: u = !1
|
610
610
|
}) => {
|
611
|
-
const m =
|
611
|
+
const m = ut({
|
612
612
|
mode: l,
|
613
613
|
focusMode: c,
|
614
614
|
labelHidden: o,
|
@@ -645,26 +645,23 @@ try {
|
|
645
645
|
});
|
646
646
|
} catch {
|
647
647
|
}
|
648
|
-
const
|
648
|
+
const yt = ({
|
649
649
|
open: e,
|
650
650
|
onOpenChange: a
|
651
651
|
}) => {
|
652
|
-
const { getAccessToken: r, user: o } =
|
652
|
+
const { getAccessToken: r, user: o } = ke(), {
|
653
653
|
data: t,
|
654
654
|
isSuccess: l,
|
655
655
|
refetch: c
|
656
|
-
} =
|
656
|
+
} = Ie({
|
657
657
|
user: o?.username,
|
658
658
|
getAccessToken: r
|
659
659
|
}), [d, u] = g({
|
660
660
|
loadingLocation: !1
|
661
661
|
}), [m, p] = g({
|
662
662
|
prompts: []
|
663
|
-
}), [b, S] = g(""), [
|
664
|
-
key:
|
665
|
-
initialValue: !1
|
666
|
-
}), [, x] = le({
|
667
|
-
key: ne + Ne,
|
663
|
+
}), [b, S] = g(""), [_, f] = g(""), [I, k] = g(!1), [C, $] = g(!1), [Y, F] = g(!1), [q, K] = g(!1), [, x] = Ae({
|
664
|
+
key: xe + Ee,
|
668
665
|
initialValue: !1
|
669
666
|
}), J = (n) => {
|
670
667
|
K(n);
|
@@ -673,21 +670,22 @@ const bt = ({
|
|
673
670
|
}, G = (n) => {
|
674
671
|
$(n);
|
675
672
|
}, Q = async (n) => {
|
676
|
-
x(n), F(n), await
|
673
|
+
x(n), F(n), await Se(n);
|
677
674
|
}, A = async (n) => {
|
678
675
|
n.preventDefault();
|
679
676
|
try {
|
680
|
-
await
|
677
|
+
await se({
|
681
678
|
accessToken: await r(),
|
682
|
-
type:
|
679
|
+
type: le.SET_USER_PREFERENCES,
|
683
680
|
params: {
|
684
681
|
user: o?.username,
|
685
682
|
instructions: b,
|
686
|
-
location:
|
683
|
+
location: _,
|
687
684
|
provider: t?.provider,
|
688
685
|
tags: m.prompts,
|
689
686
|
sendOnEnter: I,
|
690
|
-
useMemory: C
|
687
|
+
useMemory: C,
|
688
|
+
showDetails: q
|
691
689
|
}
|
692
690
|
}), c(), u({
|
693
691
|
loadingLocation: !1
|
@@ -699,16 +697,16 @@ const bt = ({
|
|
699
697
|
loadingLocation: !0
|
700
698
|
}), f("...");
|
701
699
|
try {
|
702
|
-
const n = Date.now(), h = await
|
700
|
+
const n = Date.now(), h = await Ce(), E = await se({
|
703
701
|
accessToken: await r(),
|
704
|
-
type:
|
702
|
+
type: le.GET_LOCATION,
|
705
703
|
params: {
|
706
704
|
latitude: h.latitude,
|
707
705
|
longitude: h.longitude
|
708
706
|
}
|
709
707
|
}), R = Date.now() - n;
|
710
708
|
if (R < 2e3 && await new Promise((y) => setTimeout(y, 2e3 - R)), E.status === 200) {
|
711
|
-
const { city: y, state: T, country:
|
709
|
+
const { city: y, state: T, country: O, displayName: U } = E.data, ee = y && T && O ? `${y}, ${T}, ${O}` : U;
|
712
710
|
u({
|
713
711
|
loadingLocation: !1
|
714
712
|
}), f(ee);
|
@@ -734,34 +732,34 @@ const bt = ({
|
|
734
732
|
clipboardAccess: E
|
735
733
|
};
|
736
734
|
E ? T.content = T.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : T.content = T.content.replace(/{{clipboard}}/g, "");
|
737
|
-
const
|
738
|
-
return
|
735
|
+
const O = y.findIndex((U) => U.slot === H.slot);
|
736
|
+
return O === -1 ? {
|
739
737
|
...R,
|
740
738
|
prompts: [...y, { ...T }]
|
741
|
-
} : (y[
|
739
|
+
} : (y[O] = T, {
|
742
740
|
...R,
|
743
741
|
prompts: [...y]
|
744
742
|
});
|
745
743
|
});
|
746
744
|
};
|
747
745
|
return X(() => {
|
748
|
-
t?.instructions && S(t.instructions), t?.location && f(t.location), t?.tags && p({ prompts: t.tags }), t?.sendOnEnter !== void 0 && k(t.sendOnEnter), t?.useMemory !== void 0 && $(t.useMemory), F(
|
746
|
+
t?.instructions && S(t.instructions), t?.location && f(t.location), t?.tags && p({ prompts: t.tags }), t?.sendOnEnter !== void 0 && k(t.sendOnEnter), t?.useMemory !== void 0 && $(t.useMemory), t?.showDetails !== void 0 && K(t.showDetails), F(Te());
|
749
747
|
}, [t]), l ? /* @__PURE__ */ v(
|
750
|
-
|
748
|
+
Le,
|
751
749
|
{
|
752
750
|
open: e,
|
753
751
|
onOpenChange: z,
|
754
|
-
title:
|
752
|
+
title: Ne,
|
755
753
|
animation: !0,
|
756
754
|
animationType: "fade",
|
757
755
|
footer: /* @__PURE__ */ v(
|
758
|
-
|
756
|
+
_e,
|
759
757
|
{
|
760
758
|
columnGap: 2,
|
761
759
|
alignHorizontal: "flex-end",
|
762
760
|
className: "pb-8 sm:pb-0",
|
763
761
|
children: [
|
764
|
-
/* @__PURE__ */ s(
|
762
|
+
/* @__PURE__ */ s(ne, { children: /* @__PURE__ */ s(
|
765
763
|
re,
|
766
764
|
{
|
767
765
|
mode: "dark",
|
@@ -772,7 +770,7 @@ const bt = ({
|
|
772
770
|
children: "Cancel"
|
773
771
|
}
|
774
772
|
) }),
|
775
|
-
/* @__PURE__ */ s(
|
773
|
+
/* @__PURE__ */ s(ne, { children: /* @__PURE__ */ s(
|
776
774
|
re,
|
777
775
|
{
|
778
776
|
mode: "dark",
|
@@ -839,7 +837,7 @@ const bt = ({
|
|
839
837
|
children: [
|
840
838
|
/* @__PURE__ */ v("p", { className: "text-sm", children: [
|
841
839
|
"What would you like ",
|
842
|
-
/* @__PURE__ */ s("em", { children:
|
840
|
+
/* @__PURE__ */ s("em", { children: ve }),
|
843
841
|
" to know about you to provide better responses?"
|
844
842
|
] }),
|
845
843
|
/* @__PURE__ */ s(
|
@@ -875,7 +873,7 @@ const bt = ({
|
|
875
873
|
mode: "alt-system",
|
876
874
|
name: "location",
|
877
875
|
label: "Location",
|
878
|
-
value:
|
876
|
+
value: _,
|
879
877
|
onChange: (n) => {
|
880
878
|
f(n.target.value);
|
881
879
|
},
|
@@ -925,7 +923,7 @@ const bt = ({
|
|
925
923
|
className: "prose-dark dark:prose-lighter mt-4",
|
926
924
|
noBorder: !0,
|
927
925
|
children: [
|
928
|
-
/* @__PURE__ */ s("p", { className: "text-sm", children:
|
926
|
+
/* @__PURE__ */ s("p", { className: "text-sm", children: we }),
|
929
927
|
m.prompts && m.prompts.slice(0, 3).map((n) => /* @__PURE__ */ v(
|
930
928
|
V,
|
931
929
|
{
|
@@ -998,5 +996,5 @@ const bt = ({
|
|
998
996
|
) : null;
|
999
997
|
};
|
1000
998
|
export {
|
1001
|
-
|
999
|
+
yt as SettingsPanel
|
1002
1000
|
};
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
2
|
-
import { n as f, USAGE_TITLE as U, S as h, renderDataAsList as v, CARDS as n, L as E, j as L, C as m, pluralize as i } from "./index.
|
3
|
-
import { i as M, useUserChatStats as _, useChatsUsage as D, tt as z } from "./App.
|
2
|
+
import { n as f, USAGE_TITLE as U, S as h, renderDataAsList as v, CARDS as n, L as E, j as L, C as m, pluralize as i } from "./index.DO75xJrQ.js";
|
3
|
+
import { i as M, useUserChatStats as _, useChatsUsage as D, tt as z } from "./App.DXta-gvo.js";
|
4
4
|
import { useState as O, Suspense as P, lazy as B } from "react";
|
5
5
|
const t = [0, 3, 6, 9], j = B(() => import(
|
6
6
|
/* webpackChunkName: "LazyChart" */
|
7
|
-
"./Chart.
|
7
|
+
"./Chart.Cr3ZeKqI.js"
|
8
8
|
)), b = ({
|
9
9
|
open: S,
|
10
10
|
onOpenChange: I
|