@versini/sassysaint 8.25.0 → 8.26.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.BAbCbCoR.js → AboutChangelog.CsXfRf4l.js} +2 -2
- package/dist/chunks/{AboutEntry.CCqQ0Ggh.js → AboutEntry.3vmmHPmH.js} +8 -8
- package/dist/chunks/{App._AgszNs-.js → App.DDDRpI9p.js} +138 -138
- package/dist/chunks/{Chart.KniauJPi.js → Chart.DfOWAu7_.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.CgnmkLWA.js → ChatBubbleAssistant.HIDiXPqt.js} +3 -3
- package/dist/chunks/{HistoryEntry.BsLCRi5A.js → HistoryEntry.DCLK_WA_.js} +103 -112
- package/dist/chunks/{I3HPI4QX.B6M64iYO.js → I3HPI4QX.ipWHlmzz.js} +1 -1
- package/dist/chunks/{ProfileEntry.Dw68Fulu.js → ProfileEntry.DGA1XuAX.js} +11 -20
- package/dist/chunks/{SettingsEntry.DK5ClUuQ.js → SettingsEntry.BWU8Hn98.js} +341 -316
- package/dist/chunks/UsageEntry.DEKx92R9.js +87 -0
- package/dist/chunks/{index.CZtrhwzu.js → index.2UAqQU1o.js} +1 -1
- package/dist/chunks/{index.DaB0udoY.js → index.BQn9mCZc.js} +3 -3
- package/dist/chunks/{index.DzKPIAXc.js → index.CJ4xsAr8.js} +1130 -1031
- package/dist/chunks/{index.DCay6ird.js → index.Cmth0wkr.js} +1 -1
- package/dist/chunks/{index.DiFp-IfK.js → index.DHfE_2wf.js} +1 -1
- package/dist/chunks/{index.BGnSFve0.js → index.DrAK4Hi5.js} +2 -2
- package/dist/chunks/{useMarkdown.Ba2Fkemy.js → useMarkdown.8NiQFgfl.js} +6 -6
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/chunks/UsageEntry.zFWoBow-.js +0 -96
@@ -1,24 +1,24 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { n as
|
3
|
-
import { useUserPreferences as
|
4
|
-
import
|
1
|
+
import { jsxs as N, jsx as l } from "react/jsx-runtime";
|
2
|
+
import { n as ve, LOCAL_STORAGE_PREFIX as se, LOCAL_STORAGE_CHAT_DETAILS as _e, LOCAL_STORAGE_SERVICE_WORKER as we, isServiceWorkerEnabled as Ce, isStandaloneMode as Se, SETTINGS_TITLE as Ie, S as U, CARDS as P, APP_NAME as Ae, C as ae, PROMPTS_DESCRIPTION as Re, L as Le, j as ce, getCurrentGeoLocation as Oe, handleServiceWorkerToggle as Me } from "./index.CJ4xsAr8.js";
|
3
|
+
import { useUserPreferences as De, E as ie, rr as Pe, mutateCall as de, SERVICE_TYPES as ue } from "./App.DDDRpI9p.js";
|
4
|
+
import Ge, { useRef as v, useState as y, useLayoutEffect as z, useMemo as pe, useEffect as j, useId as Be, useReducer as He, useCallback as Ve } from "react";
|
5
5
|
import i from "clsx";
|
6
|
-
const
|
7
|
-
function
|
8
|
-
const e =
|
9
|
-
return
|
6
|
+
const he = "av-text-area", Ue = "av-text-area-wrapper", oe = "av-text-area-helper-text", $e = "av-text-area__control--right", Fe = "av-text-area__control--left";
|
7
|
+
function We() {
|
8
|
+
const e = v(!1);
|
9
|
+
return j(() => (e.current = !0, () => {
|
10
10
|
e.current = !1;
|
11
|
-
}), []),
|
11
|
+
}), []), Ve(() => e.current, []);
|
12
12
|
}
|
13
|
-
function
|
14
|
-
return
|
13
|
+
function ze(e) {
|
14
|
+
return pe(() => e.every((r) => r == null) ? () => {
|
15
15
|
} : (r) => {
|
16
16
|
e.forEach((a) => {
|
17
17
|
typeof a == "function" ? a(r) : a != null && (a.current = r);
|
18
18
|
});
|
19
19
|
}, [...e]);
|
20
20
|
}
|
21
|
-
const
|
21
|
+
const je = {
|
22
22
|
x: 0,
|
23
23
|
y: 0,
|
24
24
|
width: 0,
|
@@ -28,18 +28,18 @@ const Fe = {
|
|
28
28
|
bottom: 0,
|
29
29
|
right: 0
|
30
30
|
};
|
31
|
-
function
|
32
|
-
const r =
|
33
|
-
const
|
34
|
-
|
35
|
-
o.current && r() && s(
|
31
|
+
function me(e) {
|
32
|
+
const r = We(), a = v(0), o = v(null), [t, s] = y(je), c = pe(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
|
33
|
+
const u = d[0];
|
34
|
+
u && (cancelAnimationFrame(a.current), a.current = requestAnimationFrame(() => {
|
35
|
+
o.current && r() && s(u.contentRect);
|
36
36
|
}));
|
37
37
|
}), [r]);
|
38
|
-
return
|
38
|
+
return j(() => (o.current && c?.observe(o.current, e), () => {
|
39
39
|
c?.disconnect(), a.current && cancelAnimationFrame(a.current);
|
40
40
|
}), [c, e]), [o, t];
|
41
41
|
}
|
42
|
-
function
|
42
|
+
function Xe({
|
43
43
|
value: e,
|
44
44
|
defaultValue: r,
|
45
45
|
finalValue: a,
|
@@ -47,19 +47,19 @@ function ze({
|
|
47
47
|
},
|
48
48
|
initialControlledDelay: t = 0
|
49
49
|
}) {
|
50
|
-
const [s, c] =
|
50
|
+
const [s, c] = y(!1), [d, u] = y(
|
51
51
|
r !== void 0 ? r : a
|
52
|
-
),
|
53
|
-
|
52
|
+
), m = (p) => {
|
53
|
+
u(p), o?.(p);
|
54
54
|
};
|
55
|
-
return
|
55
|
+
return j(() => {
|
56
56
|
(async () => e !== void 0 && !s && t > 0 && (await new Promise(
|
57
|
-
(
|
57
|
+
(p) => setTimeout(p, t)
|
58
58
|
), c(!0)))();
|
59
|
-
}, [e, t, s]), e !== void 0 ? !s && t > 0 ? ["", o, !0] : [e, o, !0] : [d,
|
59
|
+
}, [e, t, s]), e !== void 0 ? !s && t > 0 ? ["", o, !0] : [e, o, !0] : [d, m, !1];
|
60
60
|
}
|
61
|
-
function
|
62
|
-
const r =
|
61
|
+
function Ye(e) {
|
62
|
+
const r = Be();
|
63
63
|
if (!e)
|
64
64
|
return r;
|
65
65
|
if (typeof e == "number" || typeof e == "string")
|
@@ -69,7 +69,7 @@ function je(e) {
|
|
69
69
|
return typeof a == "number" || typeof a == "string" ? `${o}${a}` : `${o}${r}`;
|
70
70
|
}
|
71
71
|
}
|
72
|
-
const
|
72
|
+
const ge = "SET_ANNOUNCEMENT", ye = "CLEAR_ANNOUNCEMENT", qe = {
|
73
73
|
alert: null,
|
74
74
|
alertdialog: null,
|
75
75
|
log: "polite",
|
@@ -77,14 +77,14 @@ const me = "SET_ANNOUNCEMENT", fe = "CLEAR_ANNOUNCEMENT", Xe = {
|
|
77
77
|
progressbar: null,
|
78
78
|
status: "polite",
|
79
79
|
timer: "assertive"
|
80
|
-
},
|
80
|
+
}, Ke = (e, r) => {
|
81
81
|
switch (r?.type) {
|
82
|
-
case
|
82
|
+
case ge:
|
83
83
|
return {
|
84
84
|
...e,
|
85
85
|
announcement: r.payload
|
86
86
|
};
|
87
|
-
case
|
87
|
+
case ye:
|
88
88
|
return {
|
89
89
|
...e,
|
90
90
|
announcement: null
|
@@ -92,14 +92,14 @@ const me = "SET_ANNOUNCEMENT", fe = "CLEAR_ANNOUNCEMENT", Xe = {
|
|
92
92
|
default:
|
93
93
|
return e;
|
94
94
|
}
|
95
|
-
},
|
95
|
+
}, Qe = ({
|
96
96
|
onAnnouncementClear: e,
|
97
97
|
dispatch: r
|
98
98
|
}) => {
|
99
99
|
r({
|
100
|
-
type:
|
100
|
+
type: ye
|
101
101
|
}), typeof e == "function" && e();
|
102
|
-
},
|
102
|
+
}, fe = ({
|
103
103
|
children: e,
|
104
104
|
clearAnnouncementDelay: r,
|
105
105
|
clearAnnouncementTimeoutRef: a,
|
@@ -107,16 +107,16 @@ const me = "SET_ANNOUNCEMENT", fe = "CLEAR_ANNOUNCEMENT", Xe = {
|
|
107
107
|
dispatch: t
|
108
108
|
}) => {
|
109
109
|
clearTimeout(a.current), e !== null && t({
|
110
|
-
type:
|
110
|
+
type: ge,
|
111
111
|
payload: e
|
112
112
|
}), r && (a.current = setTimeout(
|
113
|
-
() =>
|
113
|
+
() => Qe({
|
114
114
|
onAnnouncementClear: o,
|
115
115
|
dispatch: t
|
116
116
|
}),
|
117
117
|
r
|
118
118
|
));
|
119
|
-
},
|
119
|
+
}, Je = ({
|
120
120
|
children: e,
|
121
121
|
announcementTimeoutRef: r,
|
122
122
|
announcementDelay: a,
|
@@ -125,13 +125,13 @@ const me = "SET_ANNOUNCEMENT", fe = "CLEAR_ANNOUNCEMENT", Xe = {
|
|
125
125
|
onAnnouncementClear: s,
|
126
126
|
dispatch: c
|
127
127
|
}) => {
|
128
|
-
clearTimeout(r.current), a ? r.current = setTimeout(
|
128
|
+
clearTimeout(r.current), a ? r.current = setTimeout(fe, a, {
|
129
129
|
children: e,
|
130
130
|
clearAnnouncementDelay: o,
|
131
131
|
clearAnnouncementTimeoutRef: t,
|
132
132
|
onAnnouncementClear: s,
|
133
133
|
dispatch: c
|
134
|
-
}) :
|
134
|
+
}) : fe({
|
135
135
|
children: e,
|
136
136
|
clearAnnouncementDelay: o,
|
137
137
|
clearAnnouncementTimeoutRef: t,
|
@@ -139,7 +139,7 @@ const me = "SET_ANNOUNCEMENT", fe = "CLEAR_ANNOUNCEMENT", Xe = {
|
|
139
139
|
dispatch: c
|
140
140
|
});
|
141
141
|
};
|
142
|
-
function
|
142
|
+
function Ze({
|
143
143
|
children: e,
|
144
144
|
className: r,
|
145
145
|
politeness: a,
|
@@ -148,21 +148,21 @@ function We({
|
|
148
148
|
clearAnnouncementDelay: s,
|
149
149
|
onAnnouncementClear: c,
|
150
150
|
visible: d,
|
151
|
-
...
|
151
|
+
...u
|
152
152
|
}) {
|
153
|
-
const
|
153
|
+
const m = v(null), p = v(null), [k, A] = He(Ke, {
|
154
154
|
announcement: null
|
155
155
|
});
|
156
156
|
let _ = a;
|
157
|
-
typeof _ > "u" && (_ = o ?
|
158
|
-
|
159
|
-
announcementTimeoutRef:
|
157
|
+
typeof _ > "u" && (_ = o ? qe[o] : "assertive"), j(() => {
|
158
|
+
Je({
|
159
|
+
announcementTimeoutRef: m,
|
160
160
|
announcementDelay: t,
|
161
161
|
children: e,
|
162
162
|
clearAnnouncementDelay: s,
|
163
|
-
clearAnnouncementTimeoutRef:
|
163
|
+
clearAnnouncementTimeoutRef: p,
|
164
164
|
onAnnouncementClear: c,
|
165
|
-
dispatch:
|
165
|
+
dispatch: A
|
166
166
|
});
|
167
167
|
}, [
|
168
168
|
e,
|
@@ -170,7 +170,7 @@ function We({
|
|
170
170
|
s,
|
171
171
|
c
|
172
172
|
]);
|
173
|
-
const
|
173
|
+
const f = i(r, {
|
174
174
|
"sr-only": !d
|
175
175
|
});
|
176
176
|
return /* @__PURE__ */ l(
|
@@ -178,9 +178,9 @@ function We({
|
|
178
178
|
{
|
179
179
|
"aria-live": _,
|
180
180
|
...o && { role: o },
|
181
|
-
className:
|
182
|
-
...
|
183
|
-
children:
|
181
|
+
className: f,
|
182
|
+
...u,
|
183
|
+
children: k.announcement
|
184
184
|
}
|
185
185
|
);
|
186
186
|
}
|
@@ -197,19 +197,19 @@ try {
|
|
197
197
|
});
|
198
198
|
} catch {
|
199
199
|
}
|
200
|
-
const
|
200
|
+
const et = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", tt = ({ 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
|
+
}), rt = ({
|
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
|
+
}), at = ({
|
213
213
|
noBorder: e,
|
214
214
|
error: r
|
215
215
|
}) => i("border-2", {
|
@@ -217,7 +217,7 @@ const Qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
217
217
|
"focus:border-border-dark": !e && r,
|
218
218
|
"border-border-error-dark": !e && r,
|
219
219
|
"border-transparent": e
|
220
|
-
}),
|
220
|
+
}), ot = ({
|
221
221
|
disabled: e,
|
222
222
|
raw: r,
|
223
223
|
error: a,
|
@@ -256,7 +256,7 @@ const Qe = () => "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
|
+
}, nt = ({
|
260
260
|
error: e,
|
261
261
|
raw: r,
|
262
262
|
mode: a,
|
@@ -266,24 +266,24 @@ const Qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
266
266
|
return "";
|
267
267
|
if (o)
|
268
268
|
return i(
|
269
|
-
|
269
|
+
oe,
|
270
270
|
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
271
271
|
);
|
272
272
|
if (!e)
|
273
|
-
return i(
|
273
|
+
return i(oe, "absolute px-2 font-medium", {
|
274
274
|
"text-copy-medium": a === "dark",
|
275
275
|
"text-copy-dark": a === "light",
|
276
276
|
"text-copy-dark dark:text-copy-medium": a === "system",
|
277
277
|
"text-copy-medium dark:text-copy-dark": a === "alt-system"
|
278
278
|
});
|
279
279
|
if (e)
|
280
|
-
return i(
|
280
|
+
return i(oe, "absolute px-2 font-medium", {
|
281
281
|
"text-copy-error-light": a === "dark",
|
282
282
|
"text-copy-error-dark": a === "light",
|
283
283
|
"text-copy-error-dark dark:text-copy-error-light": a === "system",
|
284
284
|
"dark:text-copy-error-dark text-copy-error-light": a === "alt-system"
|
285
285
|
});
|
286
|
-
},
|
286
|
+
}, lt = ({
|
287
287
|
className: e,
|
288
288
|
textAreaClassName: r,
|
289
289
|
raw: a,
|
@@ -292,49 +292,49 @@ const Qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
292
292
|
noBorder: s,
|
293
293
|
error: c,
|
294
294
|
mode: d,
|
295
|
-
leftElement:
|
296
|
-
rightElement:
|
295
|
+
leftElement: u,
|
296
|
+
rightElement: m
|
297
297
|
}) => {
|
298
|
-
const
|
298
|
+
const p = a ? e : i(
|
299
299
|
"relative flex w-full flex-col justify-center",
|
300
|
-
|
300
|
+
Ue,
|
301
301
|
e
|
302
|
-
),
|
303
|
-
|
302
|
+
), k = a ? i(r) : i(
|
303
|
+
he,
|
304
304
|
r,
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
305
|
+
et(),
|
306
|
+
tt({ mode: d }),
|
307
|
+
rt({ focusMode: o }),
|
308
|
+
at({
|
309
309
|
noBorder: s,
|
310
310
|
error: c
|
311
311
|
}),
|
312
312
|
{
|
313
313
|
"disabled:cursor-not-allowed disabled:opacity-50": t
|
314
314
|
}
|
315
|
-
),
|
315
|
+
), A = a ? void 0 : "sr-only", _ = ot({
|
316
316
|
disabled: t,
|
317
317
|
raw: a,
|
318
318
|
error: c,
|
319
319
|
mode: d,
|
320
|
-
rightElement:
|
321
|
-
leftElement:
|
322
|
-
}),
|
320
|
+
rightElement: m,
|
321
|
+
leftElement: u
|
322
|
+
}), f = nt({
|
323
323
|
error: c,
|
324
324
|
raw: a,
|
325
325
|
mode: d,
|
326
326
|
disabled: t
|
327
|
-
}),
|
327
|
+
}), R = a ? void 0 : i($e, "absolute"), x = a ? void 0 : i(Fe, "absolute");
|
328
328
|
return {
|
329
|
-
wrapper:
|
330
|
-
textArea:
|
331
|
-
accessibleLabel:
|
329
|
+
wrapper: p,
|
330
|
+
textArea: k,
|
331
|
+
accessibleLabel: A,
|
332
332
|
visibleLabel: _,
|
333
|
-
helperText:
|
334
|
-
rightElement:
|
335
|
-
leftElement:
|
333
|
+
helperText: f,
|
334
|
+
rightElement: R,
|
335
|
+
leftElement: x
|
336
336
|
};
|
337
|
-
},
|
337
|
+
}, st = ({
|
338
338
|
scrollHeight: e,
|
339
339
|
currentHeight: r,
|
340
340
|
currentLabelOffset: a = 0,
|
@@ -350,7 +350,7 @@ const Qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
350
350
|
helperTextOffset: s,
|
351
351
|
scrollHeight: e
|
352
352
|
};
|
353
|
-
},
|
353
|
+
}, ne = Ge.forwardRef(
|
354
354
|
({
|
355
355
|
id: e,
|
356
356
|
name: r,
|
@@ -360,164 +360,164 @@ const Qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
360
360
|
className: s,
|
361
361
|
textAreaClassName: c,
|
362
362
|
mode: d = "system",
|
363
|
-
focusMode:
|
364
|
-
value:
|
365
|
-
defaultValue:
|
366
|
-
disabled:
|
367
|
-
noBorder:
|
363
|
+
focusMode: u = "system",
|
364
|
+
value: m,
|
365
|
+
defaultValue: p,
|
366
|
+
disabled: k = !1,
|
367
|
+
noBorder: A = !1,
|
368
368
|
labelId: _,
|
369
|
-
helperText:
|
370
|
-
helperTextOnFocus:
|
371
|
-
rightElement:
|
372
|
-
leftElement:
|
373
|
-
onChange:
|
374
|
-
onFocus:
|
375
|
-
onBlur:
|
376
|
-
...
|
377
|
-
},
|
378
|
-
var
|
379
|
-
const
|
380
|
-
!!(!
|
381
|
-
),
|
369
|
+
helperText: f = "",
|
370
|
+
helperTextOnFocus: R = !1,
|
371
|
+
rightElement: x,
|
372
|
+
leftElement: w,
|
373
|
+
onChange: $,
|
374
|
+
onFocus: X,
|
375
|
+
onBlur: F,
|
376
|
+
...K
|
377
|
+
}, Q) => {
|
378
|
+
var Y;
|
379
|
+
const E = v(null), J = ze([Q, E]), [Z, B] = me(), [ee, L] = me(), H = v(80), V = v(-25), n = v(null), h = v(30), C = v(null), S = Ye({ id: e, prefix: `${he}-` }), [I, T] = y(0), [b, M] = y(0), [W, q] = y(
|
380
|
+
!!(!R && f)
|
381
|
+
), be = `${r} error, ${f}`, D = lt({
|
382
382
|
className: s,
|
383
383
|
textAreaClassName: c,
|
384
384
|
error: o,
|
385
385
|
raw: t,
|
386
|
-
focusMode:
|
387
|
-
disabled:
|
388
|
-
noBorder:
|
386
|
+
focusMode: u,
|
387
|
+
disabled: k,
|
388
|
+
noBorder: A,
|
389
389
|
mode: d,
|
390
|
-
rightElement: !!
|
391
|
-
leftElement: !!
|
392
|
-
}), [
|
393
|
-
value:
|
390
|
+
rightElement: !!x,
|
391
|
+
leftElement: !!w
|
392
|
+
}), [O, ke] = Xe({
|
393
|
+
value: m,
|
394
394
|
initialControlledDelay: 20,
|
395
|
-
defaultValue:
|
396
|
-
onChange: (
|
397
|
-
|
395
|
+
defaultValue: p,
|
396
|
+
onChange: (g) => {
|
397
|
+
$ && $({
|
398
398
|
target: {
|
399
|
-
value:
|
399
|
+
value: g
|
400
400
|
}
|
401
401
|
});
|
402
402
|
}
|
403
|
-
}),
|
404
|
-
|
405
|
-
},
|
406
|
-
|
407
|
-
},
|
408
|
-
|
403
|
+
}), xe = (g) => {
|
404
|
+
ke(g.target.value);
|
405
|
+
}, Ee = (g) => {
|
406
|
+
R && f && q(!0), X && X(g);
|
407
|
+
}, Te = (g) => {
|
408
|
+
R && f && !O && q(!1), F && F(g);
|
409
409
|
};
|
410
|
-
return
|
411
|
-
|
412
|
-
}, [
|
413
|
-
|
414
|
-
}, [
|
415
|
-
t ||
|
416
|
-
}, [
|
410
|
+
return z(() => {
|
411
|
+
B && B.width && T(B.width + 18 + 10);
|
412
|
+
}, [B]), z(() => {
|
413
|
+
L && L.width && M(L.width + 18 + 10);
|
414
|
+
}, [L]), z(() => {
|
415
|
+
t || E && E.current && O !== void 0 && (E.current.style.height = "inherit", E.current.style.height = E.current.scrollHeight + "px");
|
416
|
+
}, [O, t]), z(() => {
|
417
417
|
t || setTimeout(() => {
|
418
|
-
var
|
419
|
-
(
|
418
|
+
var g;
|
419
|
+
(g = n?.current) == null || g.style.setProperty(
|
420
420
|
"--av-text-area-wrapper-transition",
|
421
|
-
|
421
|
+
O ? "none" : "all 0.2s ease-out"
|
422
422
|
);
|
423
423
|
}, 0);
|
424
|
-
}, [
|
425
|
-
var
|
426
|
-
if (!t &&
|
427
|
-
const { labelOffset:
|
428
|
-
scrollHeight:
|
429
|
-
currentHeight:
|
430
|
-
currentLabelOffset:
|
431
|
-
currentHelperTextOffset:
|
424
|
+
}, [O, t]), z(() => {
|
425
|
+
var g, le;
|
426
|
+
if (!t && E && E.current && O !== void 0) {
|
427
|
+
const { labelOffset: te, helperTextOffset: re, scrollHeight: Ne } = st({
|
428
|
+
scrollHeight: E.current.scrollHeight,
|
429
|
+
currentHeight: H.current,
|
430
|
+
currentLabelOffset: V.current,
|
431
|
+
currentHelperTextOffset: h.current
|
432
432
|
});
|
433
|
-
|
433
|
+
te && (V.current = te, (g = n?.current) == null || g.style.setProperty(
|
434
434
|
"--av-text-area-label",
|
435
|
-
`${
|
436
|
-
)),
|
435
|
+
`${te}px`
|
436
|
+
)), re && (h.current = re, (le = C?.current) == null || le.style.setProperty(
|
437
437
|
"--av-text-area-helper-text",
|
438
|
-
`${
|
439
|
-
)),
|
438
|
+
`${re}px`
|
439
|
+
)), H.current = Ne || H.current;
|
440
440
|
}
|
441
|
-
}, [
|
441
|
+
}, [O, t]), L.width > 0 && ((Y = n?.current) == null || Y.style.setProperty(
|
442
442
|
"--tw-translate-x",
|
443
|
-
`${12 +
|
444
|
-
)), /* @__PURE__ */
|
443
|
+
`${12 + L.width + 5}px`
|
444
|
+
)), /* @__PURE__ */ N("div", { className: D.wrapper, children: [
|
445
445
|
/* @__PURE__ */ l(
|
446
446
|
"label",
|
447
447
|
{
|
448
|
-
htmlFor:
|
448
|
+
htmlFor: S,
|
449
449
|
id: _,
|
450
|
-
className:
|
450
|
+
className: D.accessibleLabel,
|
451
451
|
children: a
|
452
452
|
}
|
453
453
|
),
|
454
|
-
|
454
|
+
w && /* @__PURE__ */ l(
|
455
455
|
"div",
|
456
456
|
{
|
457
|
-
ref:
|
458
|
-
className:
|
459
|
-
children:
|
457
|
+
ref: ee,
|
458
|
+
className: D.leftElement,
|
459
|
+
children: w
|
460
460
|
}
|
461
461
|
),
|
462
462
|
/* @__PURE__ */ l(
|
463
463
|
"textarea",
|
464
464
|
{
|
465
|
-
ref:
|
466
|
-
id:
|
465
|
+
ref: J,
|
466
|
+
id: S,
|
467
467
|
name: r,
|
468
|
-
disabled:
|
468
|
+
disabled: k,
|
469
469
|
placeholder: t ? void 0 : " ",
|
470
|
-
className:
|
470
|
+
className: D.textArea,
|
471
471
|
rows: 1,
|
472
|
-
...
|
472
|
+
...f && { "aria-describedby": `${S}-helper` },
|
473
473
|
...o && { "aria-invalid": "true" },
|
474
|
-
...
|
475
|
-
...
|
476
|
-
...
|
474
|
+
...x && !w && !t && { style: { paddingRight: I } },
|
475
|
+
...w && !x && !t && { style: { paddingLeft: b } },
|
476
|
+
...x && w && !t && {
|
477
477
|
style: {
|
478
|
-
paddingRight:
|
479
|
-
paddingLeft:
|
478
|
+
paddingRight: I,
|
479
|
+
paddingLeft: b
|
480
480
|
}
|
481
481
|
},
|
482
|
-
value:
|
483
|
-
onChange:
|
484
|
-
onFocus:
|
485
|
-
onBlur:
|
486
|
-
...
|
482
|
+
value: O,
|
483
|
+
onChange: xe,
|
484
|
+
onFocus: Ee,
|
485
|
+
onBlur: Te,
|
486
|
+
...K
|
487
487
|
}
|
488
488
|
),
|
489
489
|
!t && /* @__PURE__ */ l(
|
490
490
|
"label",
|
491
491
|
{
|
492
|
-
ref:
|
492
|
+
ref: n,
|
493
493
|
"aria-hidden": !0,
|
494
|
-
htmlFor:
|
495
|
-
className: `${
|
494
|
+
htmlFor: S,
|
495
|
+
className: `${D.visibleLabel}`,
|
496
496
|
children: a
|
497
497
|
}
|
498
498
|
),
|
499
|
-
|
499
|
+
W && /* @__PURE__ */ l(
|
500
500
|
"div",
|
501
501
|
{
|
502
|
-
ref:
|
503
|
-
id: `${
|
504
|
-
className:
|
505
|
-
children:
|
502
|
+
ref: C,
|
503
|
+
id: `${S}-helper`,
|
504
|
+
className: D.helperText,
|
505
|
+
children: f
|
506
506
|
}
|
507
507
|
),
|
508
|
-
|
508
|
+
x && /* @__PURE__ */ l(
|
509
509
|
"div",
|
510
510
|
{
|
511
|
-
ref:
|
512
|
-
className:
|
513
|
-
children:
|
511
|
+
ref: Z,
|
512
|
+
className: D.rightElement,
|
513
|
+
children: x
|
514
514
|
}
|
515
515
|
),
|
516
|
-
o &&
|
516
|
+
o && f && /* @__PURE__ */ l(Ze, { politeness: "polite", clearAnnouncementDelay: 500, children: be })
|
517
517
|
] });
|
518
518
|
}
|
519
519
|
);
|
520
|
-
|
520
|
+
ne.displayName = "TextArea";
|
521
521
|
/*!
|
522
522
|
@versini/ui-textarea v4.0.5
|
523
523
|
© 2025 gizmette.com
|
@@ -531,7 +531,7 @@ try {
|
|
531
531
|
});
|
532
532
|
} catch {
|
533
533
|
}
|
534
|
-
const
|
534
|
+
const ct = "av-toggle", it = () => i("peer", "h-6", "w-11", "rounded-full"), dt = ({
|
535
535
|
focusMode: e
|
536
536
|
}) => i(
|
537
537
|
"peer-focus:outline",
|
@@ -543,14 +543,14 @@ const nt = "av-toggle", lt = () => i("peer", "h-6", "w-11", "rounded-full"), st
|
|
543
543
|
"peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
|
544
544
|
"peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
|
545
545
|
}
|
546
|
-
),
|
546
|
+
), ut = () => i(
|
547
547
|
"peer-checked:after:translate-x-full",
|
548
548
|
// background color when checked
|
549
549
|
"peer-checked:bg-violet-500",
|
550
550
|
// knob circle and border color when checked
|
551
551
|
"peer-checked:after:bg-white",
|
552
552
|
"peer-checked:after:border-white"
|
553
|
-
),
|
553
|
+
), mt = () => i(
|
554
554
|
"after:left-[2px]",
|
555
555
|
"after:top-[2px]",
|
556
556
|
"after:border",
|
@@ -562,7 +562,7 @@ const nt = "av-toggle", lt = () => i("peer", "h-6", "w-11", "rounded-full"), st
|
|
562
562
|
"after:rounded-full",
|
563
563
|
"after:transition-all",
|
564
564
|
"after:content-['']"
|
565
|
-
),
|
565
|
+
), ft = ({
|
566
566
|
mode: e,
|
567
567
|
noBorder: r
|
568
568
|
}) => i({
|
@@ -571,7 +571,7 @@ const nt = "av-toggle", lt = () => i("peer", "h-6", "w-11", "rounded-full"), st
|
|
571
571
|
"border-border-light bg-surface-darker": e === "dark",
|
572
572
|
"border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
|
573
573
|
"border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
|
574
|
-
}),
|
574
|
+
}), pt = ({
|
575
575
|
mode: e,
|
576
576
|
labelHidden: r
|
577
577
|
}) => r ? "sr-only" : i("ml-2 text-sm", {
|
@@ -579,11 +579,11 @@ const nt = "av-toggle", lt = () => i("peer", "h-6", "w-11", "rounded-full"), st
|
|
579
579
|
"text-copy-lighter": e === "dark",
|
580
580
|
"text-copy-lighter dark:text-copy-dark": e === "alt-system",
|
581
581
|
"text-copy-dark dark:text-copy-lighter": e === "system"
|
582
|
-
}),
|
583
|
-
|
582
|
+
}), ht = ({ className: e }) => i(
|
583
|
+
ct,
|
584
584
|
"relative flex cursor-pointer items-center",
|
585
585
|
e
|
586
|
-
),
|
586
|
+
), gt = ({
|
587
587
|
mode: e,
|
588
588
|
focusMode: r,
|
589
589
|
labelHidden: a,
|
@@ -591,16 +591,16 @@ const nt = "av-toggle", lt = () => i("peer", "h-6", "w-11", "rounded-full"), st
|
|
591
591
|
noBorder: t
|
592
592
|
}) => ({
|
593
593
|
toggle: i(
|
594
|
-
lt(),
|
595
|
-
dt({ mode: e, noBorder: t }),
|
596
|
-
st({ focusMode: r }),
|
597
594
|
it(),
|
598
|
-
|
595
|
+
ft({ mode: e, noBorder: t }),
|
596
|
+
dt({ focusMode: r }),
|
597
|
+
mt(),
|
598
|
+
ut()
|
599
599
|
),
|
600
|
-
label:
|
600
|
+
label: pt({ mode: e, labelHidden: a }),
|
601
601
|
input: "peer sr-only",
|
602
|
-
wrapper:
|
603
|
-
}),
|
602
|
+
wrapper: ht({ className: o })
|
603
|
+
}), G = ({
|
604
604
|
checked: e = !1,
|
605
605
|
onChange: r,
|
606
606
|
label: a,
|
@@ -609,30 +609,30 @@ const nt = "av-toggle", lt = () => i("peer", "h-6", "w-11", "rounded-full"), st
|
|
609
609
|
mode: s = "system",
|
610
610
|
focusMode: c = "system",
|
611
611
|
className: d,
|
612
|
-
noBorder:
|
612
|
+
noBorder: u = !1
|
613
613
|
}) => {
|
614
|
-
const
|
614
|
+
const m = gt({
|
615
615
|
mode: s,
|
616
616
|
focusMode: c,
|
617
617
|
labelHidden: o,
|
618
618
|
className: d,
|
619
|
-
noBorder:
|
620
|
-
}),
|
621
|
-
r?.(
|
619
|
+
noBorder: u
|
620
|
+
}), p = (k) => {
|
621
|
+
r?.(k.target.checked);
|
622
622
|
};
|
623
|
-
return /* @__PURE__ */
|
623
|
+
return /* @__PURE__ */ N("label", { className: m.wrapper, children: [
|
624
624
|
/* @__PURE__ */ l(
|
625
625
|
"input",
|
626
626
|
{
|
627
627
|
name: t,
|
628
628
|
checked: e,
|
629
629
|
type: "checkbox",
|
630
|
-
className:
|
631
|
-
onChange:
|
630
|
+
className: m.input,
|
631
|
+
onChange: p
|
632
632
|
}
|
633
633
|
),
|
634
|
-
/* @__PURE__ */ l("div", { className:
|
635
|
-
/* @__PURE__ */ l("span", { className:
|
634
|
+
/* @__PURE__ */ l("div", { className: m.toggle }),
|
635
|
+
/* @__PURE__ */ l("span", { className: m.label, children: a })
|
636
636
|
] });
|
637
637
|
};
|
638
638
|
/*!
|
@@ -648,134 +648,138 @@ try {
|
|
648
648
|
});
|
649
649
|
} catch {
|
650
650
|
}
|
651
|
-
const
|
651
|
+
const Tt = ({
|
652
652
|
open: e,
|
653
653
|
onOpenChange: r
|
654
654
|
}) => {
|
655
|
-
const { getAccessToken: a, user: o } =
|
655
|
+
const { getAccessToken: a, user: o } = ve(), {
|
656
656
|
data: t,
|
657
657
|
isSuccess: s,
|
658
658
|
refetch: c
|
659
|
-
} =
|
659
|
+
} = De({
|
660
660
|
user: o?.username,
|
661
661
|
getAccessToken: a
|
662
|
-
}), [d,
|
662
|
+
}), [d, u] = y({
|
663
663
|
loadingLocation: !1
|
664
|
-
}), [
|
664
|
+
}), [m, p] = y({
|
665
665
|
prompts: []
|
666
|
-
}), [
|
667
|
-
key:
|
666
|
+
}), [k, A] = y(""), [_, f] = y(""), [R, x] = y(!1), [w, $] = y(!1), [X, F] = y(!1), [K, Q] = ie({
|
667
|
+
key: se + _e,
|
668
|
+
initialValue: !1
|
669
|
+
}), [, Y] = ie({
|
670
|
+
key: se + we,
|
668
671
|
initialValue: !1
|
669
|
-
}),
|
670
|
-
|
671
|
-
},
|
672
|
-
|
673
|
-
},
|
674
|
-
|
675
|
-
},
|
672
|
+
}), E = (n) => {
|
673
|
+
Q(n);
|
674
|
+
}, J = (n) => {
|
675
|
+
x(n);
|
676
|
+
}, Z = (n) => {
|
677
|
+
$(n);
|
678
|
+
}, B = async (n) => {
|
679
|
+
Y(n), F(n), await Me(n);
|
680
|
+
}, ee = async (n) => {
|
676
681
|
n.preventDefault();
|
677
682
|
try {
|
678
|
-
await
|
683
|
+
await de({
|
679
684
|
accessToken: await a(),
|
680
|
-
type:
|
685
|
+
type: ue.SET_USER_PREFERENCES,
|
681
686
|
params: {
|
682
687
|
user: o?.username,
|
683
|
-
instructions:
|
688
|
+
instructions: k,
|
684
689
|
location: _,
|
685
690
|
provider: t?.provider,
|
686
|
-
tags:
|
687
|
-
sendOnEnter:
|
688
|
-
useMemory:
|
691
|
+
tags: m.prompts,
|
692
|
+
sendOnEnter: R,
|
693
|
+
useMemory: w
|
689
694
|
}
|
690
|
-
}), c(),
|
695
|
+
}), c(), u({
|
691
696
|
loadingLocation: !1
|
692
697
|
});
|
693
698
|
} catch {
|
694
699
|
}
|
695
|
-
},
|
696
|
-
|
700
|
+
}, L = async () => {
|
701
|
+
u({
|
697
702
|
loadingLocation: !0
|
698
|
-
}),
|
703
|
+
}), f("...");
|
699
704
|
try {
|
700
|
-
const n = Date.now(),
|
705
|
+
const n = Date.now(), h = await Oe(), C = await de({
|
701
706
|
accessToken: await a(),
|
702
|
-
type:
|
707
|
+
type: ue.GET_LOCATION,
|
703
708
|
params: {
|
704
|
-
latitude:
|
705
|
-
longitude:
|
709
|
+
latitude: h.latitude,
|
710
|
+
longitude: h.longitude
|
706
711
|
}
|
707
|
-
}),
|
708
|
-
if (
|
709
|
-
const { city:
|
710
|
-
|
712
|
+
}), I = Date.now() - n;
|
713
|
+
if (I < 2e3 && await new Promise((T) => setTimeout(T, 2e3 - I)), C.status === 200) {
|
714
|
+
const { city: T, state: b, country: M, displayName: W } = C.data, q = T && b && M ? `${T}, ${b}, ${M}` : W;
|
715
|
+
u({
|
711
716
|
loadingLocation: !1
|
712
|
-
}),
|
717
|
+
}), f(q);
|
713
718
|
} else
|
714
|
-
|
719
|
+
u({
|
715
720
|
loadingLocation: !1
|
716
721
|
});
|
717
722
|
} catch {
|
718
723
|
}
|
719
|
-
},
|
724
|
+
}, H = () => {
|
720
725
|
c(), r(!1);
|
721
|
-
},
|
726
|
+
}, V = ({
|
722
727
|
enabled: n = !1,
|
723
|
-
privateChat:
|
724
|
-
clipboardAccess:
|
725
|
-
...
|
728
|
+
privateChat: h = !1,
|
729
|
+
clipboardAccess: C = !1,
|
730
|
+
...S
|
726
731
|
}) => {
|
727
|
-
|
728
|
-
const
|
729
|
-
...
|
732
|
+
p((I) => {
|
733
|
+
const T = I.prompts, b = {
|
734
|
+
...S,
|
730
735
|
enabled: n,
|
731
|
-
privateChat:
|
732
|
-
clipboardAccess:
|
736
|
+
privateChat: h,
|
737
|
+
clipboardAccess: C
|
733
738
|
};
|
734
|
-
|
735
|
-
const
|
736
|
-
return
|
737
|
-
...
|
738
|
-
prompts: [...
|
739
|
-
} : (
|
740
|
-
...
|
741
|
-
prompts: [...
|
739
|
+
C ? b.content = b.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : b.content = b.content.replace(/{{clipboard}}/g, "");
|
740
|
+
const M = T.findIndex((W) => W.slot === S.slot);
|
741
|
+
return M === -1 ? {
|
742
|
+
...I,
|
743
|
+
prompts: [...T, { ...b }]
|
744
|
+
} : (T[M] = b, {
|
745
|
+
...I,
|
746
|
+
prompts: [...T]
|
742
747
|
});
|
743
748
|
});
|
744
749
|
};
|
745
|
-
return
|
746
|
-
t?.instructions &&
|
747
|
-
}, [t]), s ? /* @__PURE__ */
|
748
|
-
|
750
|
+
return j(() => {
|
751
|
+
t?.instructions && A(t.instructions), t?.location && f(t.location), t?.tags && p({ prompts: t.tags }), t?.sendOnEnter !== void 0 && x(t.sendOnEnter), t?.useMemory !== void 0 && $(t.useMemory), F(Ce());
|
752
|
+
}, [t]), s ? /* @__PURE__ */ N(
|
753
|
+
Pe,
|
749
754
|
{
|
750
|
-
animation: !Ie(),
|
751
755
|
open: e,
|
752
|
-
onOpenChange:
|
753
|
-
title:
|
754
|
-
footer: /* @__PURE__ */
|
755
|
-
|
756
|
+
onOpenChange: H,
|
757
|
+
title: Ie,
|
758
|
+
footer: /* @__PURE__ */ N(
|
759
|
+
Le,
|
756
760
|
{
|
757
761
|
columnGap: 2,
|
758
762
|
alignHorizontal: "flex-end",
|
759
763
|
className: "pb-8 sm:pb-0",
|
760
764
|
children: [
|
761
|
-
/* @__PURE__ */ l(
|
762
|
-
|
765
|
+
/* @__PURE__ */ l(ce, { children: /* @__PURE__ */ l(
|
766
|
+
ae,
|
763
767
|
{
|
764
768
|
mode: "dark",
|
765
769
|
variant: "secondary",
|
766
770
|
focusMode: "light",
|
767
|
-
onClick:
|
771
|
+
onClick: H,
|
768
772
|
children: "Cancel"
|
769
773
|
}
|
770
774
|
) }),
|
771
|
-
/* @__PURE__ */ l(
|
772
|
-
|
775
|
+
/* @__PURE__ */ l(ce, { children: /* @__PURE__ */ l(
|
776
|
+
ae,
|
773
777
|
{
|
774
778
|
mode: "dark",
|
775
779
|
variant: "danger",
|
776
780
|
focusMode: "light",
|
777
781
|
onClick: async (n) => {
|
778
|
-
r(!1), await
|
782
|
+
r(!1), await ee(n);
|
779
783
|
},
|
780
784
|
children: "Save"
|
781
785
|
}
|
@@ -784,64 +788,64 @@ const kt = ({
|
|
784
788
|
}
|
785
789
|
),
|
786
790
|
children: [
|
787
|
-
/* @__PURE__ */
|
788
|
-
|
791
|
+
/* @__PURE__ */ N(
|
792
|
+
U,
|
789
793
|
{
|
790
|
-
header:
|
794
|
+
header: P.SETTINGS_DETAILS.TITLE,
|
791
795
|
className: "prose-dark dark:prose-lighter",
|
792
796
|
children: [
|
793
|
-
/* @__PURE__ */ l("p", { className: "text-sm", children:
|
797
|
+
/* @__PURE__ */ l("p", { className: "text-sm", children: P.SETTINGS_DETAILS.DETAILS }),
|
794
798
|
/* @__PURE__ */ l(
|
795
|
-
|
799
|
+
G,
|
796
800
|
{
|
797
801
|
className: "mt-2",
|
798
802
|
noBorder: !0,
|
799
803
|
label: "Show Message Statistics",
|
800
804
|
name: "show-message-statistics",
|
801
|
-
onChange:
|
802
|
-
checked:
|
805
|
+
onChange: E,
|
806
|
+
checked: K
|
803
807
|
}
|
804
808
|
),
|
805
|
-
/* @__PURE__ */ l("p", { className: "text-sm mt-5", children:
|
809
|
+
/* @__PURE__ */ l("p", { className: "text-sm mt-5", children: P.SETTINGS_DETAILS.SEND_ON_ENTER }),
|
806
810
|
/* @__PURE__ */ l(
|
807
|
-
|
811
|
+
G,
|
808
812
|
{
|
809
813
|
className: "mt-2",
|
810
814
|
noBorder: !0,
|
811
815
|
label: "Send Message on Enter",
|
812
816
|
name: "send-message-on-enter",
|
813
|
-
onChange:
|
814
|
-
checked:
|
817
|
+
onChange: J,
|
818
|
+
checked: R
|
815
819
|
}
|
816
820
|
),
|
817
|
-
/* @__PURE__ */ l("p", { className: "text-sm mt-5", children:
|
821
|
+
/* @__PURE__ */ l("p", { className: "text-sm mt-5", children: P.SETTINGS_DETAILS.USE_MEMORY }),
|
818
822
|
/* @__PURE__ */ l(
|
819
|
-
|
823
|
+
G,
|
820
824
|
{
|
821
825
|
className: "mt-2",
|
822
826
|
noBorder: !0,
|
823
827
|
label: "Use Memory",
|
824
828
|
name: "use-memory",
|
825
|
-
onChange:
|
826
|
-
checked:
|
829
|
+
onChange: Z,
|
830
|
+
checked: w
|
827
831
|
}
|
828
832
|
)
|
829
833
|
]
|
830
834
|
}
|
831
835
|
),
|
832
|
-
/* @__PURE__ */
|
833
|
-
|
836
|
+
/* @__PURE__ */ N(
|
837
|
+
U,
|
834
838
|
{
|
835
839
|
header: "Custom Instructions",
|
836
840
|
className: "prose-dark dark:prose-lighter mt-4",
|
837
841
|
children: [
|
838
|
-
/* @__PURE__ */
|
842
|
+
/* @__PURE__ */ N("p", { className: "text-sm", children: [
|
839
843
|
"What would you like ",
|
840
|
-
/* @__PURE__ */ l("em", { children:
|
844
|
+
/* @__PURE__ */ l("em", { children: Ae }),
|
841
845
|
" to know about you to provide better responses?"
|
842
846
|
] }),
|
843
847
|
/* @__PURE__ */ l(
|
844
|
-
|
848
|
+
ne,
|
845
849
|
{
|
846
850
|
mode: "alt-system",
|
847
851
|
autoCapitalize: "off",
|
@@ -849,9 +853,9 @@ const kt = ({
|
|
849
853
|
autoCorrect: "off",
|
850
854
|
name: "customInstructions",
|
851
855
|
label: "Custom Instructions",
|
852
|
-
value:
|
856
|
+
value: k,
|
853
857
|
onChange: (n) => {
|
854
|
-
|
858
|
+
A(n.target.value);
|
855
859
|
},
|
856
860
|
helperText: "Press ENTER to add a new line."
|
857
861
|
}
|
@@ -859,42 +863,63 @@ const kt = ({
|
|
859
863
|
]
|
860
864
|
}
|
861
865
|
),
|
862
|
-
/* @__PURE__ */
|
866
|
+
/* @__PURE__ */ N(U, { header: "Location", className: "prose-dark dark:prose-lighter mt-4", children: [
|
863
867
|
/* @__PURE__ */ l("p", { className: "text-sm", children: "You can share your location to receive customized responses based on your area." }),
|
864
868
|
/* @__PURE__ */ l(
|
865
|
-
|
869
|
+
ne,
|
866
870
|
{
|
867
871
|
mode: "alt-system",
|
868
872
|
name: "location",
|
869
873
|
label: "Location",
|
870
874
|
value: _,
|
871
875
|
onChange: (n) => {
|
872
|
-
|
876
|
+
f(n.target.value);
|
873
877
|
},
|
874
878
|
helperText: "Enter your location or press auto-detect."
|
875
879
|
}
|
876
880
|
),
|
877
881
|
/* @__PURE__ */ l(
|
878
|
-
|
882
|
+
ae,
|
879
883
|
{
|
880
884
|
className: "mt-2",
|
881
885
|
size: "small",
|
882
886
|
noBorder: !0,
|
883
887
|
disabled: d.loadingLocation,
|
884
|
-
onClick:
|
888
|
+
onClick: L,
|
885
889
|
children: d.loadingLocation ? "Detecting..." : "Auto-detect"
|
886
890
|
}
|
887
891
|
)
|
888
892
|
] }),
|
889
|
-
/* @__PURE__ */
|
890
|
-
|
893
|
+
Se() && /* @__PURE__ */ N(
|
894
|
+
U,
|
891
895
|
{
|
892
|
-
header:
|
896
|
+
header: P.SETTINGS_CACHING.TITLE,
|
893
897
|
className: "prose-dark dark:prose-lighter mt-4",
|
894
898
|
children: [
|
895
|
-
/* @__PURE__ */ l("p", { className: "text-sm", children:
|
896
|
-
|
899
|
+
/* @__PURE__ */ l("p", { className: "text-sm", children: P.SETTINGS_CACHING.DESCRIPTION }),
|
900
|
+
/* @__PURE__ */ l(
|
897
901
|
G,
|
902
|
+
{
|
903
|
+
className: "mt-2",
|
904
|
+
noBorder: !0,
|
905
|
+
label: "Enable App Caching",
|
906
|
+
name: "enable-service-worker",
|
907
|
+
onChange: B,
|
908
|
+
checked: X
|
909
|
+
}
|
910
|
+
)
|
911
|
+
]
|
912
|
+
}
|
913
|
+
),
|
914
|
+
/* @__PURE__ */ N(
|
915
|
+
U,
|
916
|
+
{
|
917
|
+
header: P.SETTINGS_PROMPTS.TITLE,
|
918
|
+
className: "prose-dark dark:prose-lighter mt-4",
|
919
|
+
children: [
|
920
|
+
/* @__PURE__ */ l("p", { className: "text-sm", children: Re }),
|
921
|
+
m.prompts && m.prompts.slice(0, 3).map((n) => /* @__PURE__ */ N(
|
922
|
+
U,
|
898
923
|
{
|
899
924
|
mode: "dark",
|
900
925
|
noBorder: !0,
|
@@ -903,51 +928,51 @@ const kt = ({
|
|
903
928
|
children: [
|
904
929
|
/* @__PURE__ */ l("p", { className: "text-sm", children: n.description }),
|
905
930
|
/* @__PURE__ */ l(
|
906
|
-
|
931
|
+
G,
|
907
932
|
{
|
908
933
|
mode: "dark",
|
909
934
|
className: "mt-2",
|
910
935
|
noBorder: !0,
|
911
936
|
label: "Enabled",
|
912
937
|
name: n.slot.toString(),
|
913
|
-
onChange: (
|
914
|
-
|
938
|
+
onChange: (h) => {
|
939
|
+
V({
|
915
940
|
...n,
|
916
|
-
enabled:
|
941
|
+
enabled: h
|
917
942
|
});
|
918
943
|
},
|
919
944
|
checked: n.enabled
|
920
945
|
}
|
921
946
|
),
|
922
947
|
/* @__PURE__ */ l(
|
923
|
-
|
948
|
+
G,
|
924
949
|
{
|
925
950
|
mode: "dark",
|
926
951
|
className: "mt-2",
|
927
952
|
noBorder: !0,
|
928
953
|
label: "Private Chat",
|
929
954
|
name: `private-${n.slot.toString()}`,
|
930
|
-
onChange: (
|
931
|
-
|
955
|
+
onChange: (h) => {
|
956
|
+
V({
|
932
957
|
...n,
|
933
|
-
privateChat:
|
958
|
+
privateChat: h
|
934
959
|
});
|
935
960
|
},
|
936
961
|
checked: n.privateChat
|
937
962
|
}
|
938
963
|
),
|
939
964
|
/* @__PURE__ */ l(
|
940
|
-
|
965
|
+
G,
|
941
966
|
{
|
942
967
|
mode: "dark",
|
943
968
|
className: "mt-2",
|
944
969
|
noBorder: !0,
|
945
970
|
label: "Use Clipboard",
|
946
971
|
name: `clipboard-${n.slot.toString()}`,
|
947
|
-
onChange: (
|
948
|
-
|
972
|
+
onChange: (h) => {
|
973
|
+
V({
|
949
974
|
...n,
|
950
|
-
clipboardAccess:
|
975
|
+
clipboardAccess: h
|
951
976
|
});
|
952
977
|
},
|
953
978
|
checked: n.clipboardAccess
|
@@ -965,5 +990,5 @@ const kt = ({
|
|
965
990
|
) : null;
|
966
991
|
};
|
967
992
|
export {
|
968
|
-
|
993
|
+
Tt as SettingsPanel
|
969
994
|
};
|