@versini/sassysaint 8.44.3 → 8.45.1
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.BdZzSUba.js → AboutChangelog.BcZ_t0GJ.js} +2 -2
- package/dist/chunks/{AboutEntry.DzSi7ibC.js → AboutEntry.CM9v8Use.js} +6 -6
- package/dist/chunks/{App.DDTKqerX.js → App.DuT94v-y.js} +1760 -1753
- package/dist/chunks/{Chart.PHloGZi7.js → Chart.DWH1W2PS.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.DxGv-_Rb.js → ChatBubbleAssistant.BCYTQSu_.js} +3 -3
- package/dist/chunks/{ChatHistoryTable.DnkLt1Je.js → ChatHistoryTable.D41Yr90v.js} +2 -2
- package/dist/chunks/{HistoryEntry.De2vGpPR.js → HistoryEntry.BcyOwxN9.js} +3 -3
- package/dist/chunks/{LNWAZHJI.DBPRjK8f.js → LNWAZHJI.DuCb1xij.js} +1 -1
- package/dist/chunks/{ProfileEntry.B9ur9Dzf.js → ProfileEntry.56sQII3J.js} +2 -2
- package/dist/chunks/{SettingsEntry.DeQAT_-t.js → SettingsEntry.BcIoX32W.js} +400 -365
- package/dist/chunks/{UsageEntry.BmEHDYHp.js → UsageEntry.BEYYLBtG.js} +3 -3
- package/dist/chunks/{index.C1S2cFkO.js → index.BQssJX2O.js} +2 -2
- package/dist/chunks/{index.B8EJY2WR.js → index.BwP0kG4H.js} +1 -1
- package/dist/chunks/{index.DI9PexVP.js → index.C2zACTA7.js} +1 -1
- package/dist/chunks/{index.CsbwtA6h.js → index.CChT-aSg.js} +1 -1
- package/dist/chunks/{index.CrwhT53o.js → index.Cal0mNNL.js} +3 -3
- package/dist/chunks/{index.CvN58Fp8.js → index.Cgt3oTZg.js} +1 -1
- package/dist/chunks/{index.DNSGhajh.js → index.DiDmMMwR.js} +1443 -1393
- package/dist/chunks/{useMarkdown.CujEnDtN.js → useMarkdown.Bdci3-9i.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
@@ -1,24 +1,24 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { n as
|
3
|
-
import { useUserPreferences as
|
4
|
-
import
|
1
|
+
import { jsxs as b, jsx as s } from "react/jsx-runtime";
|
2
|
+
import { n as xe, getCacheInfo as we, isServiceWorkerEnabled as Ne, SETTINGS_TITLE as Te, S as H, CARDS as P, Oe as Ee, C as se, PROMPTS_DESCRIPTION as ve, L as Ce, j as ie, getCurrentGeoLocation as Ie, handleServiceWorkerToggle as _e } from "./index.DiDmMMwR.js";
|
3
|
+
import { useUserPreferences as Se, tt as Ae, mutateCall as de, SERVICE_TYPES as ue } from "./App.DuT94v-y.js";
|
4
|
+
import Le, { useRef as v, useState as p, useLayoutEffect as J, useMemo as he, useEffect as $, useId as Me, useReducer as Re, useCallback as pe } from "react";
|
5
5
|
import i from "clsx";
|
6
|
-
const
|
7
|
-
function
|
6
|
+
const ge = "av-text-area", De = "av-text-area-wrapper", le = "av-text-area-helper-text", Oe = "av-text-area__control--right", Pe = "av-text-area__control--left";
|
7
|
+
function Be() {
|
8
8
|
const e = v(!1);
|
9
|
-
return
|
9
|
+
return $(() => (e.current = !0, () => {
|
10
10
|
e.current = !1;
|
11
|
-
}), []),
|
11
|
+
}), []), pe(() => e.current, []);
|
12
12
|
}
|
13
|
-
function
|
14
|
-
return
|
13
|
+
function Ge(e) {
|
14
|
+
return he(() => 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 Ue = {
|
22
22
|
x: 0,
|
23
23
|
y: 0,
|
24
24
|
width: 0,
|
@@ -28,18 +28,18 @@ const $e = {
|
|
28
28
|
bottom: 0,
|
29
29
|
right: 0
|
30
30
|
};
|
31
|
-
function
|
32
|
-
const a =
|
33
|
-
const
|
34
|
-
|
35
|
-
o.current && a() &&
|
31
|
+
function me(e) {
|
32
|
+
const a = Be(), r = v(0), o = v(null), [t, l] = p(Ue), c = he(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
|
33
|
+
const f = d[0];
|
34
|
+
f && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
35
|
+
o.current && a() && l(f.contentRect);
|
36
36
|
}));
|
37
37
|
}), [a]);
|
38
|
-
return
|
38
|
+
return $(() => (o.current && c?.observe(o.current, e), () => {
|
39
39
|
c?.disconnect(), r.current && cancelAnimationFrame(r.current);
|
40
40
|
}), [c, e]), [o, t];
|
41
41
|
}
|
42
|
-
function
|
42
|
+
function He({
|
43
43
|
value: e,
|
44
44
|
defaultValue: a,
|
45
45
|
finalValue: r,
|
@@ -47,18 +47,18 @@ function Ve({
|
|
47
47
|
},
|
48
48
|
initialControlledDelay: t = 0
|
49
49
|
}) {
|
50
|
-
const [
|
50
|
+
const [l, c] = p(!1), [d, f] = p(
|
51
51
|
a !== void 0 ? a : r
|
52
|
-
),
|
53
|
-
|
52
|
+
), x = (u) => {
|
53
|
+
f(u), o?.(u);
|
54
54
|
};
|
55
|
-
return
|
56
|
-
(async () => e !== void 0 && !
|
55
|
+
return $(() => {
|
56
|
+
(async () => e !== void 0 && !l && t > 0 && (await new Promise(
|
57
57
|
(u) => setTimeout(u, t)
|
58
58
|
), c(!0)))();
|
59
|
-
}, [e, t,
|
59
|
+
}, [e, t, l]), e !== void 0 ? !l && t > 0 ? ["", o, !0] : [e, o, !0] : [d, x, !1];
|
60
60
|
}
|
61
|
-
function
|
61
|
+
function $e(e) {
|
62
62
|
const a = Me();
|
63
63
|
if (!e)
|
64
64
|
return a;
|
@@ -69,7 +69,7 @@ function Fe(e) {
|
|
69
69
|
return typeof r == "number" || typeof r == "string" ? `${o}${r}` : `${o}${a}`;
|
70
70
|
}
|
71
71
|
}
|
72
|
-
const
|
72
|
+
const ye = "SET_ANNOUNCEMENT", be = "CLEAR_ANNOUNCEMENT", Ve = {
|
73
73
|
alert: null,
|
74
74
|
alertdialog: null,
|
75
75
|
log: "polite",
|
@@ -77,14 +77,14 @@ const me = "SET_ANNOUNCEMENT", fe = "CLEAR_ANNOUNCEMENT", We = {
|
|
77
77
|
progressbar: null,
|
78
78
|
status: "polite",
|
79
79
|
timer: "assertive"
|
80
|
-
},
|
80
|
+
}, Fe = (e, a) => {
|
81
81
|
switch (a?.type) {
|
82
|
-
case
|
82
|
+
case ye:
|
83
83
|
return {
|
84
84
|
...e,
|
85
85
|
announcement: a.payload
|
86
86
|
};
|
87
|
-
case
|
87
|
+
case be:
|
88
88
|
return {
|
89
89
|
...e,
|
90
90
|
announcement: null
|
@@ -92,14 +92,14 @@ const me = "SET_ANNOUNCEMENT", fe = "CLEAR_ANNOUNCEMENT", We = {
|
|
92
92
|
default:
|
93
93
|
return e;
|
94
94
|
}
|
95
|
-
},
|
95
|
+
}, ze = ({
|
96
96
|
onAnnouncementClear: e,
|
97
97
|
dispatch: a
|
98
98
|
}) => {
|
99
99
|
a({
|
100
|
-
type:
|
100
|
+
type: be
|
101
101
|
}), typeof e == "function" && e();
|
102
|
-
},
|
102
|
+
}, fe = ({
|
103
103
|
children: e,
|
104
104
|
clearAnnouncementDelay: a,
|
105
105
|
clearAnnouncementTimeoutRef: r,
|
@@ -107,80 +107,80 @@ const me = "SET_ANNOUNCEMENT", fe = "CLEAR_ANNOUNCEMENT", We = {
|
|
107
107
|
dispatch: t
|
108
108
|
}) => {
|
109
109
|
clearTimeout(r.current), e !== null && t({
|
110
|
-
type:
|
110
|
+
type: ye,
|
111
111
|
payload: e
|
112
112
|
}), a && (r.current = setTimeout(
|
113
|
-
() =>
|
113
|
+
() => ze({
|
114
114
|
onAnnouncementClear: o,
|
115
115
|
dispatch: t
|
116
116
|
}),
|
117
117
|
a
|
118
118
|
));
|
119
|
-
},
|
119
|
+
}, We = ({
|
120
120
|
children: e,
|
121
121
|
announcementTimeoutRef: a,
|
122
122
|
announcementDelay: r,
|
123
123
|
clearAnnouncementDelay: o,
|
124
124
|
clearAnnouncementTimeoutRef: t,
|
125
|
-
onAnnouncementClear:
|
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(fe, r, {
|
129
129
|
children: e,
|
130
130
|
clearAnnouncementDelay: o,
|
131
131
|
clearAnnouncementTimeoutRef: t,
|
132
|
-
onAnnouncementClear:
|
132
|
+
onAnnouncementClear: l,
|
133
133
|
dispatch: c
|
134
|
-
}) :
|
134
|
+
}) : fe({
|
135
135
|
children: e,
|
136
136
|
clearAnnouncementDelay: o,
|
137
137
|
clearAnnouncementTimeoutRef: t,
|
138
|
-
onAnnouncementClear:
|
138
|
+
onAnnouncementClear: l,
|
139
139
|
dispatch: c
|
140
140
|
});
|
141
141
|
};
|
142
|
-
function
|
142
|
+
function je({
|
143
143
|
children: e,
|
144
144
|
className: a,
|
145
145
|
politeness: r,
|
146
146
|
role: o = null,
|
147
147
|
announcementDelay: t,
|
148
|
-
clearAnnouncementDelay:
|
148
|
+
clearAnnouncementDelay: l,
|
149
149
|
onAnnouncementClear: c,
|
150
150
|
visible: d,
|
151
|
-
...
|
151
|
+
...f
|
152
152
|
}) {
|
153
|
-
const
|
153
|
+
const x = v(null), u = v(null), [w, C] = Re(Fe, {
|
154
154
|
announcement: null
|
155
155
|
});
|
156
|
-
let
|
157
|
-
typeof
|
158
|
-
|
159
|
-
announcementTimeoutRef:
|
156
|
+
let I = r;
|
157
|
+
typeof I > "u" && (I = o ? Ve[o] : "assertive"), $(() => {
|
158
|
+
We({
|
159
|
+
announcementTimeoutRef: x,
|
160
160
|
announcementDelay: t,
|
161
161
|
children: e,
|
162
|
-
clearAnnouncementDelay:
|
162
|
+
clearAnnouncementDelay: l,
|
163
163
|
clearAnnouncementTimeoutRef: u,
|
164
164
|
onAnnouncementClear: c,
|
165
|
-
dispatch:
|
165
|
+
dispatch: C
|
166
166
|
});
|
167
167
|
}, [
|
168
168
|
e,
|
169
169
|
t,
|
170
|
-
|
170
|
+
l,
|
171
171
|
c
|
172
172
|
]);
|
173
|
-
const
|
173
|
+
const g = i(a, {
|
174
174
|
"sr-only": !d
|
175
175
|
});
|
176
|
-
return /* @__PURE__ */
|
176
|
+
return /* @__PURE__ */ s(
|
177
177
|
"div",
|
178
178
|
{
|
179
|
-
"aria-live":
|
179
|
+
"aria-live": I,
|
180
180
|
...o && { role: o },
|
181
|
-
className:
|
182
|
-
...
|
183
|
-
children:
|
181
|
+
className: g,
|
182
|
+
...f,
|
183
|
+
children: w.announcement
|
184
184
|
}
|
185
185
|
);
|
186
186
|
}
|
@@ -197,19 +197,19 @@ try {
|
|
197
197
|
});
|
198
198
|
} catch {
|
199
199
|
}
|
200
|
-
const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7",
|
200
|
+
const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", Ye = ({ 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
|
+
}), Xe = ({
|
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
|
+
}), Je = ({
|
213
213
|
noBorder: e,
|
214
214
|
error: a
|
215
215
|
}) => i("border-2", {
|
@@ -217,13 +217,13 @@ const qe = () => "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
|
+
}), Ze = ({
|
221
221
|
disabled: e,
|
222
222
|
raw: a,
|
223
223
|
error: r,
|
224
224
|
mode: o,
|
225
225
|
leftElement: t,
|
226
|
-
rightElement:
|
226
|
+
rightElement: l
|
227
227
|
}) => {
|
228
228
|
if (a)
|
229
229
|
return "";
|
@@ -231,14 +231,14 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
231
231
|
return i(
|
232
232
|
"transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
|
233
233
|
{
|
234
|
-
"translate-x-[12px]":
|
234
|
+
"translate-x-[12px]": l === !0 && !t || !l && !t
|
235
235
|
}
|
236
236
|
);
|
237
237
|
if (!r)
|
238
238
|
return i(
|
239
239
|
"absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
|
240
240
|
{
|
241
|
-
"translate-x-[12px]":
|
241
|
+
"translate-x-[12px]": l === !0 && !t || !l && !t,
|
242
242
|
"text-copy-medium": o === "dark",
|
243
243
|
"text-copy-dark": o === "light",
|
244
244
|
"text-copy-dark dark:text-copy-medium": o === "system",
|
@@ -249,14 +249,14 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
249
249
|
return i(
|
250
250
|
"absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
|
251
251
|
{
|
252
|
-
"translate-x-[12px]":
|
252
|
+
"translate-x-[12px]": l === !0 && !t || !l && !t,
|
253
253
|
"text-copy-medium": o === "dark",
|
254
254
|
"text-copy-error-dark": o === "light",
|
255
255
|
"text-copy-error-dark dark:text-copy-error-light": o === "system",
|
256
256
|
"text-copy-medium dark:text-copy-error-dark": o === "alt-system"
|
257
257
|
}
|
258
258
|
);
|
259
|
-
},
|
259
|
+
}, Ke = ({
|
260
260
|
error: e,
|
261
261
|
raw: a,
|
262
262
|
mode: r,
|
@@ -266,255 +266,255 @@ 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
|
+
le,
|
270
270
|
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
271
271
|
);
|
272
272
|
if (!e)
|
273
|
-
return i(
|
273
|
+
return i(le, "absolute px-2 font-medium", {
|
274
274
|
"text-copy-medium": r === "dark",
|
275
275
|
"text-copy-dark": r === "light",
|
276
276
|
"text-copy-dark dark:text-copy-medium": r === "system",
|
277
277
|
"text-copy-medium dark:text-copy-dark": r === "alt-system"
|
278
278
|
});
|
279
279
|
if (e)
|
280
|
-
return i(
|
280
|
+
return i(le, "absolute px-2 font-medium", {
|
281
281
|
"text-copy-error-light": r === "dark",
|
282
282
|
"text-copy-error-dark": r === "light",
|
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
|
+
}, Qe = ({
|
287
287
|
className: e,
|
288
288
|
textAreaClassName: a,
|
289
289
|
raw: r,
|
290
290
|
focusMode: o,
|
291
291
|
disabled: t,
|
292
|
-
noBorder:
|
292
|
+
noBorder: l,
|
293
293
|
error: c,
|
294
294
|
mode: d,
|
295
|
-
leftElement:
|
296
|
-
rightElement:
|
295
|
+
leftElement: f,
|
296
|
+
rightElement: x
|
297
297
|
}) => {
|
298
298
|
const u = r ? e : i(
|
299
299
|
"relative flex w-full flex-col justify-center",
|
300
|
-
|
300
|
+
De,
|
301
301
|
e
|
302
|
-
),
|
303
|
-
|
302
|
+
), w = r ? i(a) : i(
|
303
|
+
ge,
|
304
304
|
a,
|
305
305
|
qe(),
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
noBorder:
|
306
|
+
Ye({ mode: d }),
|
307
|
+
Xe({ focusMode: o }),
|
308
|
+
Je({
|
309
|
+
noBorder: l,
|
310
310
|
error: c
|
311
311
|
}),
|
312
312
|
{
|
313
313
|
"disabled:cursor-not-allowed disabled:opacity-50": t
|
314
314
|
}
|
315
|
-
),
|
315
|
+
), C = r ? void 0 : "sr-only", I = Ze({
|
316
316
|
disabled: t,
|
317
317
|
raw: r,
|
318
318
|
error: c,
|
319
319
|
mode: d,
|
320
|
-
rightElement:
|
321
|
-
leftElement:
|
322
|
-
}),
|
320
|
+
rightElement: x,
|
321
|
+
leftElement: f
|
322
|
+
}), g = Ke({
|
323
323
|
error: c,
|
324
324
|
raw: r,
|
325
325
|
mode: d,
|
326
326
|
disabled: t
|
327
|
-
}),
|
327
|
+
}), A = r ? void 0 : i(Oe, "absolute"), N = r ? void 0 : i(Pe, "absolute");
|
328
328
|
return {
|
329
329
|
wrapper: u,
|
330
|
-
textArea:
|
331
|
-
accessibleLabel:
|
332
|
-
visibleLabel:
|
333
|
-
helperText:
|
334
|
-
rightElement:
|
335
|
-
leftElement:
|
330
|
+
textArea: w,
|
331
|
+
accessibleLabel: C,
|
332
|
+
visibleLabel: I,
|
333
|
+
helperText: g,
|
334
|
+
rightElement: A,
|
335
|
+
leftElement: N
|
336
336
|
};
|
337
|
-
},
|
337
|
+
}, et = ({
|
338
338
|
scrollHeight: e,
|
339
339
|
currentHeight: a,
|
340
340
|
currentLabelOffset: r = 0,
|
341
341
|
currentHelperTextOffset: o = 0
|
342
342
|
}) => {
|
343
|
-
let t,
|
343
|
+
let t, l;
|
344
344
|
if (e > 0 && e !== a) {
|
345
345
|
const c = e - a, d = Math.abs(c / 24);
|
346
|
-
t = r + -1 * Math.sign(c) * (12 * d),
|
346
|
+
t = r + -1 * Math.sign(c) * (12 * d), l = o + Math.sign(c) * (12 * d);
|
347
347
|
}
|
348
348
|
return {
|
349
349
|
labelOffset: t,
|
350
|
-
helperTextOffset:
|
350
|
+
helperTextOffset: l,
|
351
351
|
scrollHeight: e
|
352
352
|
};
|
353
|
-
},
|
353
|
+
}, ce = Le.forwardRef(
|
354
354
|
({
|
355
355
|
id: e,
|
356
356
|
name: a,
|
357
357
|
label: r,
|
358
358
|
error: o = !1,
|
359
359
|
raw: t = !1,
|
360
|
-
className:
|
360
|
+
className: l,
|
361
361
|
textAreaClassName: c,
|
362
362
|
mode: d = "system",
|
363
|
-
focusMode:
|
364
|
-
value:
|
363
|
+
focusMode: f = "system",
|
364
|
+
value: x,
|
365
365
|
defaultValue: u,
|
366
|
-
disabled:
|
367
|
-
noBorder:
|
368
|
-
labelId:
|
369
|
-
helperText:
|
370
|
-
helperTextOnFocus:
|
371
|
-
rightElement:
|
372
|
-
leftElement:
|
366
|
+
disabled: w = !1,
|
367
|
+
noBorder: C = !1,
|
368
|
+
labelId: I,
|
369
|
+
helperText: g = "",
|
370
|
+
helperTextOnFocus: A = !1,
|
371
|
+
rightElement: N,
|
372
|
+
leftElement: _,
|
373
373
|
onChange: V,
|
374
|
-
onFocus:
|
374
|
+
onFocus: M,
|
375
375
|
onBlur: F,
|
376
|
-
...
|
377
|
-
},
|
378
|
-
const
|
379
|
-
!!(!
|
380
|
-
),
|
381
|
-
className:
|
376
|
+
...G
|
377
|
+
}, Z) => {
|
378
|
+
const y = v(null), K = Ge([Z, y]), [Q, R] = me(), [ee, S] = me(), z = v(80), te = v(-25), U = v(null), re = v(30), ae = v(null), D = $e({ id: e, prefix: `${ge}-` }), [W, j] = p(0), [q, n] = p(0), [h, L] = p(
|
379
|
+
!!(!A && g)
|
380
|
+
), Y = `${a} error, ${g}`, k = Qe({
|
381
|
+
className: l,
|
382
382
|
textAreaClassName: c,
|
383
383
|
error: o,
|
384
384
|
raw: t,
|
385
|
-
focusMode:
|
386
|
-
disabled:
|
387
|
-
noBorder:
|
385
|
+
focusMode: f,
|
386
|
+
disabled: w,
|
387
|
+
noBorder: C,
|
388
388
|
mode: d,
|
389
|
-
rightElement: !!
|
390
|
-
leftElement: !!
|
391
|
-
}), [
|
392
|
-
value:
|
389
|
+
rightElement: !!N,
|
390
|
+
leftElement: !!_
|
391
|
+
}), [m, T] = He({
|
392
|
+
value: x,
|
393
393
|
initialControlledDelay: 20,
|
394
394
|
defaultValue: u,
|
395
|
-
onChange: (
|
395
|
+
onChange: (E) => {
|
396
396
|
V && V({
|
397
397
|
target: {
|
398
|
-
value:
|
398
|
+
value: E
|
399
399
|
}
|
400
400
|
});
|
401
401
|
}
|
402
|
-
}),
|
403
|
-
|
404
|
-
},
|
405
|
-
|
406
|
-
},
|
407
|
-
|
402
|
+
}), O = (E) => {
|
403
|
+
T(E.target.value);
|
404
|
+
}, X = (E) => {
|
405
|
+
A && g && L(!0), M && M(E);
|
406
|
+
}, oe = (E) => {
|
407
|
+
A && g && !m && L(!1), F && F(E);
|
408
408
|
};
|
409
|
-
return
|
410
|
-
|
411
|
-
}, [
|
412
|
-
|
413
|
-
}, [
|
414
|
-
t ||
|
415
|
-
}, [
|
409
|
+
return J(() => {
|
410
|
+
R && R.width && j(R.width + 18 + 10);
|
411
|
+
}, [R]), J(() => {
|
412
|
+
S && S.width && n(S.width + 18 + 10);
|
413
|
+
}, [S]), J(() => {
|
414
|
+
t || y && y.current && m !== void 0 && (y.current.style.height = "inherit", y.current.style.height = y.current.scrollHeight + "px");
|
415
|
+
}, [m, t]), J(() => {
|
416
416
|
t || setTimeout(() => {
|
417
|
-
|
417
|
+
U?.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 &&
|
424
|
-
const { labelOffset:
|
425
|
-
scrollHeight:
|
426
|
-
currentHeight:
|
427
|
-
currentLabelOffset:
|
428
|
-
currentHelperTextOffset:
|
422
|
+
}, [m, t]), J(() => {
|
423
|
+
if (!t && y && y.current && m !== void 0) {
|
424
|
+
const { labelOffset: E, helperTextOffset: ne, scrollHeight: ke } = et({
|
425
|
+
scrollHeight: y.current.scrollHeight,
|
426
|
+
currentHeight: z.current,
|
427
|
+
currentLabelOffset: te.current,
|
428
|
+
currentHelperTextOffset: re.current
|
429
429
|
});
|
430
|
-
|
430
|
+
E && (te.current = E, U?.current?.style.setProperty(
|
431
431
|
"--av-text-area-label",
|
432
|
-
`${
|
433
|
-
)),
|
432
|
+
`${E}px`
|
433
|
+
)), ne && (re.current = ne, ae?.current?.style.setProperty(
|
434
434
|
"--av-text-area-helper-text",
|
435
|
-
`${
|
436
|
-
)),
|
435
|
+
`${ne}px`
|
436
|
+
)), z.current = ke || z.current;
|
437
437
|
}
|
438
|
-
}, [
|
438
|
+
}, [m, t]), S.width > 0 && U?.current?.style.setProperty(
|
439
439
|
"--tw-translate-x",
|
440
|
-
`${12 +
|
441
|
-
), /* @__PURE__ */
|
442
|
-
/* @__PURE__ */
|
440
|
+
`${12 + S.width + 5}px`
|
441
|
+
), /* @__PURE__ */ b("div", { className: k.wrapper, children: [
|
442
|
+
/* @__PURE__ */ s(
|
443
443
|
"label",
|
444
444
|
{
|
445
|
-
htmlFor:
|
446
|
-
id:
|
447
|
-
className:
|
445
|
+
htmlFor: D,
|
446
|
+
id: I,
|
447
|
+
className: k.accessibleLabel,
|
448
448
|
children: r
|
449
449
|
}
|
450
450
|
),
|
451
|
-
|
451
|
+
_ && /* @__PURE__ */ s(
|
452
452
|
"div",
|
453
453
|
{
|
454
|
-
ref:
|
455
|
-
className:
|
456
|
-
children:
|
454
|
+
ref: ee,
|
455
|
+
className: k.leftElement,
|
456
|
+
children: _
|
457
457
|
}
|
458
458
|
),
|
459
|
-
/* @__PURE__ */
|
459
|
+
/* @__PURE__ */ s(
|
460
460
|
"textarea",
|
461
461
|
{
|
462
462
|
ref: K,
|
463
|
-
id:
|
463
|
+
id: D,
|
464
464
|
name: a,
|
465
|
-
disabled:
|
465
|
+
disabled: w,
|
466
466
|
placeholder: t ? void 0 : " ",
|
467
|
-
className:
|
467
|
+
className: k.textArea,
|
468
468
|
rows: 1,
|
469
|
-
...
|
469
|
+
...g && { "aria-describedby": `${D}-helper` },
|
470
470
|
...o && { "aria-invalid": "true" },
|
471
|
-
...
|
472
|
-
...
|
473
|
-
...
|
471
|
+
...N && !_ && !t && { style: { paddingRight: W } },
|
472
|
+
..._ && !N && !t && { style: { paddingLeft: q } },
|
473
|
+
...N && _ && !t && {
|
474
474
|
style: {
|
475
|
-
paddingRight:
|
476
|
-
paddingLeft:
|
475
|
+
paddingRight: W,
|
476
|
+
paddingLeft: q
|
477
477
|
}
|
478
478
|
},
|
479
|
-
value:
|
480
|
-
onChange:
|
481
|
-
onFocus:
|
482
|
-
onBlur:
|
483
|
-
...
|
479
|
+
value: m,
|
480
|
+
onChange: O,
|
481
|
+
onFocus: X,
|
482
|
+
onBlur: oe,
|
483
|
+
...G
|
484
484
|
}
|
485
485
|
),
|
486
|
-
!t && /* @__PURE__ */
|
486
|
+
!t && /* @__PURE__ */ s(
|
487
487
|
"label",
|
488
488
|
{
|
489
|
-
ref:
|
489
|
+
ref: U,
|
490
490
|
"aria-hidden": !0,
|
491
|
-
htmlFor:
|
492
|
-
className: `${
|
491
|
+
htmlFor: D,
|
492
|
+
className: `${k.visibleLabel}`,
|
493
493
|
children: r
|
494
494
|
}
|
495
495
|
),
|
496
|
-
|
496
|
+
h && /* @__PURE__ */ s(
|
497
497
|
"div",
|
498
498
|
{
|
499
|
-
ref:
|
500
|
-
id: `${
|
501
|
-
className:
|
502
|
-
children:
|
499
|
+
ref: ae,
|
500
|
+
id: `${D}-helper`,
|
501
|
+
className: k.helperText,
|
502
|
+
children: g
|
503
503
|
}
|
504
504
|
),
|
505
|
-
|
505
|
+
N && /* @__PURE__ */ s(
|
506
506
|
"div",
|
507
507
|
{
|
508
|
-
ref:
|
509
|
-
className:
|
510
|
-
children:
|
508
|
+
ref: Q,
|
509
|
+
className: k.rightElement,
|
510
|
+
children: N
|
511
511
|
}
|
512
512
|
),
|
513
|
-
o &&
|
513
|
+
o && g && /* @__PURE__ */ s(je, { politeness: "polite", clearAnnouncementDelay: 500, children: Y })
|
514
514
|
] });
|
515
515
|
}
|
516
516
|
);
|
517
|
-
|
517
|
+
ce.displayName = "TextArea";
|
518
518
|
/*!
|
519
519
|
@versini/ui-textarea v4.0.11
|
520
520
|
© 2025 gizmette.com
|
@@ -528,7 +528,7 @@ try {
|
|
528
528
|
});
|
529
529
|
} catch {
|
530
530
|
}
|
531
|
-
const
|
531
|
+
const tt = "av-toggle", rt = ({ narrow: e }) => i(
|
532
532
|
"peer",
|
533
533
|
"rounded-full",
|
534
534
|
{
|
@@ -537,7 +537,7 @@ const at = "av-toggle", ot = ({ narrow: e }) => i(
|
|
537
537
|
},
|
538
538
|
// Smooth background/border transition when toggling
|
539
539
|
"transition-colors duration-300 ease-in-out motion-reduce:transition-none"
|
540
|
-
),
|
540
|
+
), at = ({
|
541
541
|
focusMode: e
|
542
542
|
}) => i(
|
543
543
|
"peer-focus:outline",
|
@@ -549,7 +549,7 @@ const at = "av-toggle", ot = ({ narrow: e }) => i(
|
|
549
549
|
"peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
|
550
550
|
"peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
|
551
551
|
}
|
552
|
-
),
|
552
|
+
), ot = ({ narrow: e }) => i(
|
553
553
|
{
|
554
554
|
"peer-checked:after:translate-x-full": !e,
|
555
555
|
"peer-checked:after:translate-x-4": e
|
@@ -559,7 +559,7 @@ const at = "av-toggle", ot = ({ narrow: e }) => i(
|
|
559
559
|
// knob circle and border color when checked
|
560
560
|
"peer-checked:after:bg-white",
|
561
561
|
"peer-checked:after:border-white"
|
562
|
-
),
|
562
|
+
), nt = ({ narrow: e }) => i(
|
563
563
|
"after:left-[2px]",
|
564
564
|
"after:top-[2px]",
|
565
565
|
"after:border",
|
@@ -575,7 +575,7 @@ const at = "av-toggle", ot = ({ narrow: e }) => i(
|
|
575
575
|
// Narrow toggle knob (oval)
|
576
576
|
" after:h-4 after:w-7": e
|
577
577
|
}
|
578
|
-
),
|
578
|
+
), st = ({
|
579
579
|
mode: e,
|
580
580
|
noBorder: a
|
581
581
|
}) => i({
|
@@ -584,7 +584,7 @@ const at = "av-toggle", ot = ({ narrow: e }) => i(
|
|
584
584
|
"border-border-light bg-surface-darker": e === "dark",
|
585
585
|
"border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
|
586
586
|
"border-border-medium bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
|
587
|
-
}),
|
587
|
+
}), lt = ({
|
588
588
|
mode: e,
|
589
589
|
labelHidden: a
|
590
590
|
}) => a ? "sr-only" : i("ml-2 text-sm", {
|
@@ -592,63 +592,63 @@ const at = "av-toggle", ot = ({ narrow: e }) => i(
|
|
592
592
|
"text-copy-lighter": e === "dark",
|
593
593
|
"text-copy-lighter dark:text-copy-dark": e === "alt-system",
|
594
594
|
"text-copy-dark dark:text-copy-lighter": e === "system"
|
595
|
-
}),
|
596
|
-
|
595
|
+
}), ct = ({ className: e }) => i(
|
596
|
+
tt,
|
597
597
|
"relative flex cursor-pointer items-center",
|
598
598
|
e
|
599
|
-
),
|
599
|
+
), it = ({
|
600
600
|
mode: e,
|
601
601
|
focusMode: a,
|
602
602
|
labelHidden: r,
|
603
603
|
className: o,
|
604
604
|
noBorder: t,
|
605
|
-
narrow:
|
605
|
+
narrow: l
|
606
606
|
}) => ({
|
607
607
|
toggle: i(
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
608
|
+
rt({ narrow: l }),
|
609
|
+
st({ mode: e, noBorder: t }),
|
610
|
+
at({ focusMode: a }),
|
611
|
+
nt({ narrow: l }),
|
612
|
+
ot({ narrow: l })
|
613
613
|
),
|
614
|
-
label:
|
614
|
+
label: lt({ mode: e, labelHidden: r }),
|
615
615
|
input: "peer sr-only",
|
616
|
-
wrapper:
|
616
|
+
wrapper: ct({ className: o })
|
617
617
|
}), B = ({
|
618
618
|
checked: e = !1,
|
619
619
|
onChange: a,
|
620
620
|
label: r,
|
621
621
|
labelHidden: o = !1,
|
622
622
|
name: t,
|
623
|
-
mode:
|
623
|
+
mode: l = "system",
|
624
624
|
focusMode: c = "system",
|
625
625
|
className: d,
|
626
|
-
noBorder:
|
627
|
-
narrow:
|
626
|
+
noBorder: f = !1,
|
627
|
+
narrow: x = !1
|
628
628
|
}) => {
|
629
|
-
const u =
|
630
|
-
mode:
|
629
|
+
const u = it({
|
630
|
+
mode: l,
|
631
631
|
focusMode: c,
|
632
632
|
labelHidden: o,
|
633
633
|
className: d,
|
634
|
-
noBorder:
|
635
|
-
narrow:
|
636
|
-
}),
|
637
|
-
a?.(
|
634
|
+
noBorder: f,
|
635
|
+
narrow: x
|
636
|
+
}), w = (C) => {
|
637
|
+
a?.(C.target.checked);
|
638
638
|
};
|
639
|
-
return /* @__PURE__ */
|
640
|
-
/* @__PURE__ */
|
639
|
+
return /* @__PURE__ */ b("label", { className: u.wrapper, children: [
|
640
|
+
/* @__PURE__ */ s(
|
641
641
|
"input",
|
642
642
|
{
|
643
643
|
name: t,
|
644
644
|
checked: e,
|
645
645
|
type: "checkbox",
|
646
646
|
className: u.input,
|
647
|
-
onChange:
|
647
|
+
onChange: w
|
648
648
|
}
|
649
649
|
),
|
650
|
-
/* @__PURE__ */
|
651
|
-
/* @__PURE__ */
|
650
|
+
/* @__PURE__ */ s("div", { className: u.toggle }),
|
651
|
+
/* @__PURE__ */ s("span", { className: u.label, children: r })
|
652
652
|
] });
|
653
653
|
};
|
654
654
|
/*!
|
@@ -664,138 +664,150 @@ try {
|
|
664
664
|
});
|
665
665
|
} catch {
|
666
666
|
}
|
667
|
-
const
|
667
|
+
const pt = ({
|
668
668
|
open: e,
|
669
669
|
onOpenChange: a
|
670
670
|
}) => {
|
671
|
-
const { getAccessToken: r, user: o } =
|
671
|
+
const { getAccessToken: r, user: o } = xe(), {
|
672
672
|
data: t,
|
673
|
-
isSuccess:
|
673
|
+
isSuccess: l,
|
674
674
|
refetch: c
|
675
|
-
} =
|
675
|
+
} = Se({
|
676
676
|
user: o?.username,
|
677
677
|
getAccessToken: r
|
678
|
-
}), [d,
|
678
|
+
}), [d, f] = p({
|
679
679
|
loadingLocation: !1
|
680
|
-
}), [
|
680
|
+
}), [x, u] = p({
|
681
681
|
prompts: []
|
682
|
-
}), [
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
}, Z = (n) => {
|
688
|
-
k(n);
|
689
|
-
}, G = (n) => {
|
682
|
+
}), [w, C] = p(""), [I, g] = p(""), [A, N] = p(!1), [_, V] = p(!1), [M, F] = p(!1), [G, Z] = p(!1), [y, K] = p(null), [Q, R] = p(!1), [ee, S] = p(!1), z = (n) => {
|
683
|
+
S(n);
|
684
|
+
}, te = (n) => {
|
685
|
+
N(n);
|
686
|
+
}, U = (n) => {
|
690
687
|
V(n);
|
691
|
-
},
|
692
|
-
|
693
|
-
},
|
688
|
+
}, re = (n) => {
|
689
|
+
Z(n);
|
690
|
+
}, ae = async (n) => {
|
694
691
|
n.preventDefault();
|
695
692
|
try {
|
696
|
-
await
|
693
|
+
await de({
|
697
694
|
accessToken: await r(),
|
698
|
-
type:
|
695
|
+
type: ue.SET_USER_PREFERENCES,
|
699
696
|
params: {
|
700
697
|
user: o?.username,
|
701
|
-
instructions:
|
702
|
-
location:
|
698
|
+
instructions: w,
|
699
|
+
location: I,
|
703
700
|
provider: t?.provider,
|
704
|
-
tags:
|
705
|
-
sendOnEnter:
|
706
|
-
useMemory:
|
707
|
-
showDetails:
|
701
|
+
tags: x.prompts,
|
702
|
+
sendOnEnter: A,
|
703
|
+
useMemory: _,
|
704
|
+
showDetails: ee
|
708
705
|
}
|
709
|
-
}), c(),
|
706
|
+
}), G !== M && (await _e(G), F(G)), c(), f({
|
710
707
|
loadingLocation: !1
|
711
708
|
});
|
712
709
|
} catch {
|
713
710
|
}
|
714
|
-
},
|
715
|
-
|
711
|
+
}, D = async () => {
|
712
|
+
f({
|
716
713
|
loadingLocation: !0
|
717
|
-
}),
|
714
|
+
}), g("...");
|
718
715
|
try {
|
719
|
-
const n = Date.now(),
|
716
|
+
const n = Date.now(), h = await Ie(), L = await de({
|
720
717
|
accessToken: await r(),
|
721
|
-
type:
|
718
|
+
type: ue.GET_LOCATION,
|
722
719
|
params: {
|
723
|
-
latitude:
|
724
|
-
longitude:
|
720
|
+
latitude: h.latitude,
|
721
|
+
longitude: h.longitude
|
725
722
|
}
|
726
|
-
}),
|
727
|
-
if (
|
728
|
-
const { city:
|
729
|
-
|
723
|
+
}), k = Date.now() - n;
|
724
|
+
if (k < 2e3 && await new Promise((m) => setTimeout(m, 2e3 - k)), L.status === 200) {
|
725
|
+
const { city: m, state: T, country: O, displayName: X } = L.data, oe = m && T && O ? `${m}, ${T}, ${O}` : X;
|
726
|
+
f({
|
730
727
|
loadingLocation: !1
|
731
|
-
}),
|
728
|
+
}), g(oe);
|
732
729
|
} else
|
733
|
-
|
730
|
+
f({
|
734
731
|
loadingLocation: !1
|
735
732
|
});
|
736
733
|
} catch {
|
737
734
|
}
|
738
|
-
},
|
735
|
+
}, W = () => {
|
739
736
|
c(), a(!1);
|
740
|
-
},
|
737
|
+
}, j = ({
|
741
738
|
enabled: n = !1,
|
742
|
-
privateChat:
|
743
|
-
clipboardAccess:
|
744
|
-
...
|
739
|
+
privateChat: h = !1,
|
740
|
+
clipboardAccess: L = !1,
|
741
|
+
...Y
|
745
742
|
}) => {
|
746
|
-
u((
|
747
|
-
const
|
748
|
-
...
|
743
|
+
u((k) => {
|
744
|
+
const m = k.prompts, T = {
|
745
|
+
...Y,
|
749
746
|
enabled: n,
|
750
|
-
privateChat:
|
751
|
-
clipboardAccess:
|
747
|
+
privateChat: h,
|
748
|
+
clipboardAccess: L
|
752
749
|
};
|
753
|
-
|
754
|
-
const O =
|
750
|
+
L ? T.content = T.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : T.content = T.content.replace(/{{clipboard}}/g, "");
|
751
|
+
const O = m.findIndex((X) => X.slot === Y.slot);
|
755
752
|
return O === -1 ? {
|
756
|
-
...
|
757
|
-
prompts: [...
|
758
|
-
} : (
|
759
|
-
...
|
760
|
-
prompts: [...
|
753
|
+
...k,
|
754
|
+
prompts: [...m, { ...T }]
|
755
|
+
} : (m[O] = T, {
|
756
|
+
...k,
|
757
|
+
prompts: [...m]
|
761
758
|
});
|
762
759
|
});
|
763
|
-
}
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
760
|
+
}, q = pe(async () => {
|
761
|
+
try {
|
762
|
+
R(!0);
|
763
|
+
const n = await we();
|
764
|
+
K(n);
|
765
|
+
} catch {
|
766
|
+
} finally {
|
767
|
+
R(!1);
|
768
|
+
}
|
769
|
+
}, []);
|
770
|
+
return $(() => {
|
771
|
+
if (!t)
|
772
|
+
return;
|
773
|
+
t.instructions && C(t.instructions), t.location && g(t.location), t.tags && u({ prompts: t.tags }), t.sendOnEnter !== void 0 && N(t.sendOnEnter), t.useMemory !== void 0 && V(t.useMemory), t.showDetails !== void 0 && S(t.showDetails);
|
774
|
+
const n = Ne();
|
775
|
+
F(n), Z(n);
|
776
|
+
}, [t]), $(() => {
|
777
|
+
M ? q() : K(null);
|
778
|
+
}, [M, q]), l ? /* @__PURE__ */ b(
|
779
|
+
Ae,
|
768
780
|
{
|
769
781
|
open: e,
|
770
|
-
onOpenChange:
|
771
|
-
title:
|
782
|
+
onOpenChange: W,
|
783
|
+
title: Te,
|
772
784
|
animation: !0,
|
773
785
|
animationType: "fade",
|
774
|
-
footer: /* @__PURE__ */
|
775
|
-
|
786
|
+
footer: /* @__PURE__ */ b(
|
787
|
+
Ce,
|
776
788
|
{
|
777
789
|
columnGap: 2,
|
778
790
|
alignHorizontal: "flex-end",
|
779
791
|
className: "pb-8 sm:pb-0",
|
780
792
|
children: [
|
781
|
-
/* @__PURE__ */
|
782
|
-
|
793
|
+
/* @__PURE__ */ s(ie, { children: /* @__PURE__ */ s(
|
794
|
+
se,
|
783
795
|
{
|
784
796
|
mode: "dark",
|
785
797
|
variant: "secondary",
|
786
798
|
focusMode: "light",
|
787
799
|
noBorder: !0,
|
788
|
-
onClick:
|
800
|
+
onClick: W,
|
789
801
|
children: "Cancel"
|
790
802
|
}
|
791
803
|
) }),
|
792
|
-
/* @__PURE__ */
|
793
|
-
|
804
|
+
/* @__PURE__ */ s(ie, { children: /* @__PURE__ */ s(
|
805
|
+
se,
|
794
806
|
{
|
795
807
|
mode: "dark",
|
796
808
|
focusMode: "light",
|
797
809
|
onClick: async (n) => {
|
798
|
-
a(!1), await
|
810
|
+
a(!1), await ae(n);
|
799
811
|
},
|
800
812
|
children: "Save"
|
801
813
|
}
|
@@ -804,66 +816,66 @@ const yt = ({
|
|
804
816
|
}
|
805
817
|
),
|
806
818
|
children: [
|
807
|
-
/* @__PURE__ */
|
808
|
-
|
819
|
+
/* @__PURE__ */ b(
|
820
|
+
H,
|
809
821
|
{
|
810
822
|
header: P.SETTINGS_DETAILS.TITLE,
|
811
823
|
className: "prose-dark dark:prose-lighter",
|
812
824
|
noBorder: !0,
|
813
825
|
children: [
|
814
|
-
/* @__PURE__ */
|
815
|
-
/* @__PURE__ */
|
826
|
+
/* @__PURE__ */ s("p", { className: "text-sm", children: P.SETTINGS_DETAILS.DETAILS }),
|
827
|
+
/* @__PURE__ */ s(
|
816
828
|
B,
|
817
829
|
{
|
818
830
|
narrow: !0,
|
819
831
|
className: "mt-2",
|
820
832
|
label: "Show Message Statistics",
|
821
833
|
name: "show-message-statistics",
|
822
|
-
onChange:
|
823
|
-
checked:
|
834
|
+
onChange: z,
|
835
|
+
checked: ee
|
824
836
|
}
|
825
837
|
),
|
826
|
-
/* @__PURE__ */
|
827
|
-
/* @__PURE__ */
|
838
|
+
/* @__PURE__ */ s("p", { className: "text-sm mt-5", children: P.SETTINGS_DETAILS.SEND_ON_ENTER }),
|
839
|
+
/* @__PURE__ */ s(
|
828
840
|
B,
|
829
841
|
{
|
830
842
|
narrow: !0,
|
831
843
|
className: "mt-2",
|
832
844
|
label: "Send Message on Enter",
|
833
845
|
name: "send-message-on-enter",
|
834
|
-
onChange:
|
835
|
-
checked:
|
846
|
+
onChange: te,
|
847
|
+
checked: A
|
836
848
|
}
|
837
849
|
),
|
838
|
-
/* @__PURE__ */
|
839
|
-
/* @__PURE__ */
|
850
|
+
/* @__PURE__ */ s("p", { className: "text-sm mt-5", children: P.SETTINGS_DETAILS.USE_MEMORY }),
|
851
|
+
/* @__PURE__ */ s(
|
840
852
|
B,
|
841
853
|
{
|
842
854
|
narrow: !0,
|
843
855
|
className: "mt-2",
|
844
856
|
label: "Use Memory",
|
845
857
|
name: "use-memory",
|
846
|
-
onChange:
|
847
|
-
checked:
|
858
|
+
onChange: U,
|
859
|
+
checked: _
|
848
860
|
}
|
849
861
|
)
|
850
862
|
]
|
851
863
|
}
|
852
864
|
),
|
853
|
-
/* @__PURE__ */
|
854
|
-
|
865
|
+
/* @__PURE__ */ b(
|
866
|
+
H,
|
855
867
|
{
|
856
868
|
header: "Custom Instructions",
|
857
869
|
className: "prose-dark dark:prose-lighter mt-4",
|
858
870
|
noBorder: !0,
|
859
871
|
children: [
|
860
|
-
/* @__PURE__ */
|
872
|
+
/* @__PURE__ */ b("p", { className: "text-sm", children: [
|
861
873
|
"What would you like ",
|
862
|
-
/* @__PURE__ */
|
874
|
+
/* @__PURE__ */ s("em", { children: Ee }),
|
863
875
|
" to know about you to provide better responses?"
|
864
876
|
] }),
|
865
|
-
/* @__PURE__ */
|
866
|
-
|
877
|
+
/* @__PURE__ */ s(
|
878
|
+
ce,
|
867
879
|
{
|
868
880
|
mode: "alt-system",
|
869
881
|
autoCapitalize: "off",
|
@@ -871,9 +883,9 @@ const yt = ({
|
|
871
883
|
autoCorrect: "off",
|
872
884
|
name: "customInstructions",
|
873
885
|
label: "Custom Instructions",
|
874
|
-
value:
|
886
|
+
value: w,
|
875
887
|
onChange: (n) => {
|
876
|
-
|
888
|
+
C(n.target.value);
|
877
889
|
},
|
878
890
|
helperText: "Press ENTER to add a new line."
|
879
891
|
}
|
@@ -881,82 +893,60 @@ const yt = ({
|
|
881
893
|
]
|
882
894
|
}
|
883
895
|
),
|
884
|
-
/* @__PURE__ */
|
885
|
-
|
896
|
+
/* @__PURE__ */ b(
|
897
|
+
H,
|
886
898
|
{
|
887
899
|
header: "Location",
|
888
900
|
className: "prose-dark dark:prose-lighter mt-4",
|
889
901
|
noBorder: !0,
|
890
902
|
children: [
|
891
|
-
/* @__PURE__ */
|
892
|
-
/* @__PURE__ */
|
893
|
-
|
903
|
+
/* @__PURE__ */ s("p", { className: "text-sm", children: "You can share your location to receive customized responses based on your area." }),
|
904
|
+
/* @__PURE__ */ s(
|
905
|
+
ce,
|
894
906
|
{
|
895
907
|
mode: "alt-system",
|
896
908
|
name: "location",
|
897
909
|
label: "Location",
|
898
|
-
value:
|
910
|
+
value: I,
|
899
911
|
onChange: (n) => {
|
900
|
-
|
912
|
+
g(n.target.value);
|
901
913
|
},
|
902
914
|
helperText: "Enter your location or press auto-detect."
|
903
915
|
}
|
904
916
|
),
|
905
|
-
/* @__PURE__ */
|
906
|
-
|
917
|
+
/* @__PURE__ */ s(
|
918
|
+
se,
|
907
919
|
{
|
908
920
|
className: "mt-2",
|
909
921
|
size: "small",
|
910
922
|
noBorder: !0,
|
911
923
|
variant: "secondary",
|
912
924
|
disabled: d.loadingLocation,
|
913
|
-
onClick:
|
925
|
+
onClick: D,
|
914
926
|
children: d.loadingLocation ? "Detecting..." : "Auto-detect"
|
915
927
|
}
|
916
928
|
)
|
917
929
|
]
|
918
930
|
}
|
919
931
|
),
|
920
|
-
/* @__PURE__ */
|
921
|
-
|
922
|
-
{
|
923
|
-
header: P.SETTINGS_CACHING.TITLE,
|
924
|
-
className: "prose-dark dark:prose-lighter mt-4",
|
925
|
-
noBorder: !0,
|
926
|
-
children: [
|
927
|
-
/* @__PURE__ */ l("p", { className: "text-sm", children: P.SETTINGS_CACHING.DESCRIPTION }),
|
928
|
-
/* @__PURE__ */ l(
|
929
|
-
B,
|
930
|
-
{
|
931
|
-
narrow: !0,
|
932
|
-
className: "mt-2",
|
933
|
-
label: "Enable Assets Caching",
|
934
|
-
name: "enable-service-worker",
|
935
|
-
onChange: Q,
|
936
|
-
checked: Y
|
937
|
-
}
|
938
|
-
)
|
939
|
-
]
|
940
|
-
}
|
941
|
-
),
|
942
|
-
/* @__PURE__ */ N(
|
943
|
-
$,
|
932
|
+
/* @__PURE__ */ b(
|
933
|
+
H,
|
944
934
|
{
|
945
935
|
header: P.SETTINGS_PROMPTS.TITLE,
|
946
936
|
className: "prose-dark dark:prose-lighter mt-4",
|
947
937
|
noBorder: !0,
|
948
938
|
children: [
|
949
|
-
/* @__PURE__ */
|
950
|
-
|
951
|
-
|
939
|
+
/* @__PURE__ */ s("p", { className: "text-sm", children: ve }),
|
940
|
+
x.prompts && x.prompts.slice(0, 3).map((n) => /* @__PURE__ */ b(
|
941
|
+
H,
|
952
942
|
{
|
953
943
|
mode: "dark",
|
954
944
|
noBorder: !0,
|
955
945
|
header: n.label.replace("...", ""),
|
956
946
|
className: "prose-light mb-2",
|
957
947
|
children: [
|
958
|
-
/* @__PURE__ */
|
959
|
-
/* @__PURE__ */
|
948
|
+
/* @__PURE__ */ s("p", { className: "text-sm", children: n.description }),
|
949
|
+
/* @__PURE__ */ s(
|
960
950
|
B,
|
961
951
|
{
|
962
952
|
narrow: !0,
|
@@ -966,16 +956,16 @@ const yt = ({
|
|
966
956
|
noBorder: !0,
|
967
957
|
label: "Enabled",
|
968
958
|
name: n.slot.toString(),
|
969
|
-
onChange: (
|
970
|
-
|
959
|
+
onChange: (h) => {
|
960
|
+
j({
|
971
961
|
...n,
|
972
|
-
enabled:
|
962
|
+
enabled: h
|
973
963
|
});
|
974
964
|
},
|
975
965
|
checked: n.enabled
|
976
966
|
}
|
977
967
|
),
|
978
|
-
/* @__PURE__ */
|
968
|
+
/* @__PURE__ */ s(
|
979
969
|
B,
|
980
970
|
{
|
981
971
|
narrow: !0,
|
@@ -985,16 +975,16 @@ const yt = ({
|
|
985
975
|
noBorder: !0,
|
986
976
|
label: "Private Chat",
|
987
977
|
name: `private-${n.slot.toString()}`,
|
988
|
-
onChange: (
|
989
|
-
|
978
|
+
onChange: (h) => {
|
979
|
+
j({
|
990
980
|
...n,
|
991
|
-
privateChat:
|
981
|
+
privateChat: h
|
992
982
|
});
|
993
983
|
},
|
994
984
|
checked: n.privateChat
|
995
985
|
}
|
996
986
|
),
|
997
|
-
/* @__PURE__ */
|
987
|
+
/* @__PURE__ */ s(
|
998
988
|
B,
|
999
989
|
{
|
1000
990
|
narrow: !0,
|
@@ -1004,10 +994,10 @@ const yt = ({
|
|
1004
994
|
noBorder: !0,
|
1005
995
|
label: "Use Clipboard",
|
1006
996
|
name: `clipboard-${n.slot.toString()}`,
|
1007
|
-
onChange: (
|
1008
|
-
|
997
|
+
onChange: (h) => {
|
998
|
+
j({
|
1009
999
|
...n,
|
1010
|
-
clipboardAccess:
|
1000
|
+
clipboardAccess: h
|
1011
1001
|
});
|
1012
1002
|
},
|
1013
1003
|
checked: n.clipboardAccess
|
@@ -1019,11 +1009,56 @@ const yt = ({
|
|
1019
1009
|
))
|
1020
1010
|
]
|
1021
1011
|
}
|
1012
|
+
),
|
1013
|
+
/* @__PURE__ */ b(
|
1014
|
+
H,
|
1015
|
+
{
|
1016
|
+
header: P.SETTINGS_CACHING.TITLE,
|
1017
|
+
className: "prose-dark dark:prose-lighter mt-4 ",
|
1018
|
+
noBorder: !0,
|
1019
|
+
children: [
|
1020
|
+
/* @__PURE__ */ s("p", { className: "text-sm", children: P.SETTINGS_CACHING.DESCRIPTION }),
|
1021
|
+
/* @__PURE__ */ s(
|
1022
|
+
B,
|
1023
|
+
{
|
1024
|
+
narrow: !0,
|
1025
|
+
className: "mt-2",
|
1026
|
+
label: "Enable Assets Caching",
|
1027
|
+
name: "enable-service-worker",
|
1028
|
+
onChange: re,
|
1029
|
+
checked: G
|
1030
|
+
}
|
1031
|
+
),
|
1032
|
+
M && /* @__PURE__ */ b("div", { className: "mt-4 p-3 border border-dashed border-neutral-700 dark:border-neutral-400 rounded @container/optimizations", children: [
|
1033
|
+
/* @__PURE__ */ s("h3", { className: "m-0 mb-2 text-xs uppercase opacity-70", children: "Cache Info" }),
|
1034
|
+
y ? /* @__PURE__ */ b("div", { className: "text-xs space-y-2", children: [
|
1035
|
+
/* @__PURE__ */ b("p", { className: "m-0", children: [
|
1036
|
+
"Version: ",
|
1037
|
+
/* @__PURE__ */ s("strong", { children: y.version })
|
1038
|
+
] }),
|
1039
|
+
/* @__PURE__ */ b("p", { className: "m-0", children: [
|
1040
|
+
"Total Items: ",
|
1041
|
+
/* @__PURE__ */ s("strong", { children: y.totalItems })
|
1042
|
+
] }),
|
1043
|
+
y.caches.map((n) => /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("ul", { className: "not-prose font-mono mt-2 list-none w-[95cqw]", children: n.urls.map((h) => /* @__PURE__ */ s(
|
1044
|
+
"li",
|
1045
|
+
{
|
1046
|
+
className: "truncate text-xs text-copy-dark dark:text-copy-light overflow-hidden text-ellipsis",
|
1047
|
+
title: h,
|
1048
|
+
children: new URL(h).pathname
|
1049
|
+
},
|
1050
|
+
h
|
1051
|
+
)) }) }, n.name)),
|
1052
|
+
y.totalItems === 0 && !Q && /* @__PURE__ */ s("p", { className: "italic m-0 opacity-70", children: "No cached assets yet." })
|
1053
|
+
] }) : /* @__PURE__ */ s("p", { className: "text-xs opacity-70 m-0", children: Q ? "Loading cache info..." : "No cache info available." })
|
1054
|
+
] })
|
1055
|
+
]
|
1056
|
+
}
|
1022
1057
|
)
|
1023
1058
|
]
|
1024
1059
|
}
|
1025
1060
|
) : null;
|
1026
1061
|
};
|
1027
1062
|
export {
|
1028
|
-
|
1063
|
+
pt as SettingsPanel
|
1029
1064
|
};
|