@versini/sassysaint 8.42.2 → 8.44.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.BkNkL6XT.js → AboutChangelog.B9LDoNtc.js} +2 -2
- package/dist/chunks/{AboutEntry.BkheS22s.js → AboutEntry.B9jJEb9d.js} +5 -5
- package/dist/chunks/{App.LB-VjAKc.js → App.DIYzQxf_.js} +3514 -3367
- package/dist/chunks/{Chart.C5bHgMnj.js → Chart.CNuG058Z.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.DDE6wagx.js → ChatBubbleAssistant.Bk5qyJ52.js} +3 -3
- package/dist/chunks/{HistoryEntry.Bwb54pyq.js → HistoryEntry.CgDZa06o.js} +2 -2
- package/dist/chunks/{LNWAZHJI.CsMjKeDy.js → LNWAZHJI.BXAtUUVV.js} +1 -1
- package/dist/chunks/{ProfileEntry.C68D2YNq.js → ProfileEntry.DRBuYvRq.js} +2 -2
- package/dist/chunks/{SettingsEntry.Cz8kWB5X.js → SettingsEntry.htXx4sa8.js} +224 -195
- package/dist/chunks/{UsageEntry.BPnFpida.js → UsageEntry.QI6K99tl.js} +3 -3
- package/dist/chunks/{index.Cuvb46-v.js → index.BrgPbG33.js} +1 -1
- package/dist/chunks/{index.BelZuQjs.js → index.C3Pr02EG.js} +216 -214
- package/dist/chunks/{index.DVMqsazP.js → index.QerkiBRb.js} +1 -1
- package/dist/chunks/{index.5cZ0mkHb.js → index.ZNvM4on8.js} +3 -3
- package/dist/chunks/{index.BMH9B-L4.js → index.ZgKBnAUj.js} +2 -2
- package/dist/chunks/{index.DXEgUSxs.js → index.w9lF8AKT.js} +1 -1
- package/dist/chunks/{useMarkdown.FF5vDuZM.js → useMarkdown.Sw6-WRjC.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 +4 -4
@@ -1,11 +1,11 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { n as ke, LOCAL_STORAGE_PREFIX as xe, LOCAL_STORAGE_SERVICE_WORKER as Ee, isServiceWorkerEnabled as Te, SETTINGS_TITLE as
|
3
|
-
import { useUserPreferences as Ie, E as Ae, tt as Le, mutateCall as se, SERVICE_TYPES as le } from "./App.
|
4
|
-
import Re, { useRef as
|
1
|
+
import { jsxs as N, jsx as l } from "react/jsx-runtime";
|
2
|
+
import { n as ke, LOCAL_STORAGE_PREFIX as xe, LOCAL_STORAGE_SERVICE_WORKER as Ee, isServiceWorkerEnabled as Te, SETTINGS_TITLE as we, S as $, CARDS as P, Oe as Ne, C as re, PROMPTS_DESCRIPTION as ve, L as _e, j as ne, getCurrentGeoLocation as Ce, handleServiceWorkerToggle as Se } from "./index.C3Pr02EG.js";
|
3
|
+
import { useUserPreferences as Ie, E as Ae, tt as Le, mutateCall as se, SERVICE_TYPES as le } from "./App.DIYzQxf_.js";
|
4
|
+
import Re, { useRef as v, useState as h, 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
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
7
|
function He() {
|
8
|
-
const e =
|
8
|
+
const e = v(!1);
|
9
9
|
return X(() => (e.current = !0, () => {
|
10
10
|
e.current = !1;
|
11
11
|
}), []), De(() => e.current, []);
|
@@ -18,7 +18,7 @@ function Ue(e) {
|
|
18
18
|
});
|
19
19
|
}, [...e]);
|
20
20
|
}
|
21
|
-
const
|
21
|
+
const $e = {
|
22
22
|
x: 0,
|
23
23
|
y: 0,
|
24
24
|
width: 0,
|
@@ -29,17 +29,17 @@ const Ve = {
|
|
29
29
|
right: 0
|
30
30
|
};
|
31
31
|
function ce(e) {
|
32
|
-
const a = He(), r =
|
33
|
-
const
|
34
|
-
|
35
|
-
o.current && a() &&
|
32
|
+
const a = He(), r = v(0), o = v(null), [t, s] = h($e), c = de(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
|
33
|
+
const m = d[0];
|
34
|
+
m && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
35
|
+
o.current && a() && s(m.contentRect);
|
36
36
|
}));
|
37
37
|
}), [a]);
|
38
38
|
return X(() => (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 Ve({
|
43
43
|
value: e,
|
44
44
|
defaultValue: a,
|
45
45
|
finalValue: r,
|
@@ -47,16 +47,16 @@ function $e({
|
|
47
47
|
},
|
48
48
|
initialControlledDelay: t = 0
|
49
49
|
}) {
|
50
|
-
const [
|
50
|
+
const [s, c] = h(!1), [d, m] = h(
|
51
51
|
a !== void 0 ? a : r
|
52
|
-
),
|
53
|
-
u
|
52
|
+
), g = (u) => {
|
53
|
+
m(u), o?.(u);
|
54
54
|
};
|
55
55
|
return X(() => {
|
56
|
-
(async () => e !== void 0 && !
|
57
|
-
(
|
56
|
+
(async () => e !== void 0 && !s && t > 0 && (await new Promise(
|
57
|
+
(u) => setTimeout(u, t)
|
58
58
|
), c(!0)))();
|
59
|
-
}, [e, t,
|
59
|
+
}, [e, t, s]), e !== void 0 ? !s && t > 0 ? ["", o, !0] : [e, o, !0] : [d, g, !1];
|
60
60
|
}
|
61
61
|
function Fe(e) {
|
62
62
|
const a = Me();
|
@@ -122,20 +122,20 @@ const me = "SET_ANNOUNCEMENT", fe = "CLEAR_ANNOUNCEMENT", We = {
|
|
122
122
|
announcementDelay: r,
|
123
123
|
clearAnnouncementDelay: o,
|
124
124
|
clearAnnouncementTimeoutRef: t,
|
125
|
-
onAnnouncementClear:
|
125
|
+
onAnnouncementClear: s,
|
126
126
|
dispatch: c
|
127
127
|
}) => {
|
128
128
|
clearTimeout(a.current), r ? a.current = setTimeout(ie, r, {
|
129
129
|
children: e,
|
130
130
|
clearAnnouncementDelay: o,
|
131
131
|
clearAnnouncementTimeoutRef: t,
|
132
|
-
onAnnouncementClear:
|
132
|
+
onAnnouncementClear: s,
|
133
133
|
dispatch: c
|
134
134
|
}) : ie({
|
135
135
|
children: e,
|
136
136
|
clearAnnouncementDelay: o,
|
137
137
|
clearAnnouncementTimeoutRef: t,
|
138
|
-
onAnnouncementClear:
|
138
|
+
onAnnouncementClear: s,
|
139
139
|
dispatch: c
|
140
140
|
});
|
141
141
|
};
|
@@ -145,41 +145,41 @@ function Ye({
|
|
145
145
|
politeness: r,
|
146
146
|
role: o = null,
|
147
147
|
announcementDelay: t,
|
148
|
-
clearAnnouncementDelay:
|
148
|
+
clearAnnouncementDelay: s,
|
149
149
|
onAnnouncementClear: c,
|
150
150
|
visible: d,
|
151
|
-
...
|
151
|
+
...m
|
152
152
|
}) {
|
153
|
-
const
|
153
|
+
const g = v(null), u = v(null), [b, _] = Oe(ze, {
|
154
154
|
announcement: null
|
155
155
|
});
|
156
|
-
let
|
157
|
-
typeof
|
156
|
+
let C = r;
|
157
|
+
typeof C > "u" && (C = o ? We[o] : "assertive"), X(() => {
|
158
158
|
Xe({
|
159
|
-
announcementTimeoutRef:
|
159
|
+
announcementTimeoutRef: g,
|
160
160
|
announcementDelay: t,
|
161
161
|
children: e,
|
162
|
-
clearAnnouncementDelay:
|
163
|
-
clearAnnouncementTimeoutRef:
|
162
|
+
clearAnnouncementDelay: s,
|
163
|
+
clearAnnouncementTimeoutRef: u,
|
164
164
|
onAnnouncementClear: c,
|
165
|
-
dispatch:
|
165
|
+
dispatch: _
|
166
166
|
});
|
167
167
|
}, [
|
168
168
|
e,
|
169
169
|
t,
|
170
|
-
|
170
|
+
s,
|
171
171
|
c
|
172
172
|
]);
|
173
173
|
const f = i(a, {
|
174
174
|
"sr-only": !d
|
175
175
|
});
|
176
|
-
return /* @__PURE__ */
|
176
|
+
return /* @__PURE__ */ l(
|
177
177
|
"div",
|
178
178
|
{
|
179
|
-
"aria-live":
|
179
|
+
"aria-live": C,
|
180
180
|
...o && { role: o },
|
181
181
|
className: f,
|
182
|
-
...
|
182
|
+
...m,
|
183
183
|
children: b.announcement
|
184
184
|
}
|
185
185
|
);
|
@@ -197,12 +197,12 @@ 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", Je = ({ 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
|
+
}), Ke = ({
|
206
206
|
focusMode: e
|
207
207
|
}) => i("focus:outline focus:outline-2 focus:outline-offset-2", {
|
208
208
|
"focus:outline-focus-dark": e === "dark",
|
@@ -223,7 +223,7 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
223
223
|
error: r,
|
224
224
|
mode: o,
|
225
225
|
leftElement: t,
|
226
|
-
rightElement:
|
226
|
+
rightElement: s
|
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]": s === !0 && !t || !s && !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]": s === !0 && !t || !s && !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,7 +249,7 @@ 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]": s === !0 && !t || !s && !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",
|
@@ -289,13 +289,13 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
289
289
|
raw: r,
|
290
290
|
focusMode: o,
|
291
291
|
disabled: t,
|
292
|
-
noBorder:
|
292
|
+
noBorder: s,
|
293
293
|
error: c,
|
294
294
|
mode: d,
|
295
|
-
leftElement:
|
296
|
-
rightElement:
|
295
|
+
leftElement: m,
|
296
|
+
rightElement: g
|
297
297
|
}) => {
|
298
|
-
const
|
298
|
+
const u = r ? e : i(
|
299
299
|
"relative flex w-full flex-col justify-center",
|
300
300
|
Pe,
|
301
301
|
e
|
@@ -303,22 +303,22 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
303
303
|
ue,
|
304
304
|
a,
|
305
305
|
qe(),
|
306
|
-
|
307
|
-
|
306
|
+
Je({ mode: d }),
|
307
|
+
Ke({ focusMode: o }),
|
308
308
|
Ze({
|
309
|
-
noBorder:
|
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
|
+
), _ = r ? void 0 : "sr-only", C = Qe({
|
316
316
|
disabled: t,
|
317
317
|
raw: r,
|
318
318
|
error: c,
|
319
319
|
mode: d,
|
320
|
-
rightElement:
|
321
|
-
leftElement:
|
320
|
+
rightElement: g,
|
321
|
+
leftElement: m
|
322
322
|
}), f = et({
|
323
323
|
error: c,
|
324
324
|
raw: r,
|
@@ -326,10 +326,10 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
326
326
|
disabled: t
|
327
327
|
}), I = r ? void 0 : i(Be, "absolute"), k = r ? void 0 : i(Ge, "absolute");
|
328
328
|
return {
|
329
|
-
wrapper:
|
329
|
+
wrapper: u,
|
330
330
|
textArea: b,
|
331
|
-
accessibleLabel:
|
332
|
-
visibleLabel:
|
331
|
+
accessibleLabel: _,
|
332
|
+
visibleLabel: C,
|
333
333
|
helperText: f,
|
334
334
|
rightElement: I,
|
335
335
|
leftElement: k
|
@@ -340,14 +340,14 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
340
340
|
currentLabelOffset: r = 0,
|
341
341
|
currentHelperTextOffset: o = 0
|
342
342
|
}) => {
|
343
|
-
let t,
|
343
|
+
let t, s;
|
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), s = o + Math.sign(c) * (12 * d);
|
347
347
|
}
|
348
348
|
return {
|
349
349
|
labelOffset: t,
|
350
|
-
helperTextOffset:
|
350
|
+
helperTextOffset: s,
|
351
351
|
scrollHeight: e
|
352
352
|
};
|
353
353
|
}, oe = Re.forwardRef(
|
@@ -357,54 +357,54 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
357
357
|
label: r,
|
358
358
|
error: o = !1,
|
359
359
|
raw: t = !1,
|
360
|
-
className:
|
360
|
+
className: s,
|
361
361
|
textAreaClassName: c,
|
362
362
|
mode: d = "system",
|
363
|
-
focusMode:
|
364
|
-
value:
|
365
|
-
defaultValue:
|
363
|
+
focusMode: m = "system",
|
364
|
+
value: g,
|
365
|
+
defaultValue: u,
|
366
366
|
disabled: b = !1,
|
367
|
-
noBorder:
|
368
|
-
labelId:
|
367
|
+
noBorder: _ = !1,
|
368
|
+
labelId: C,
|
369
369
|
helperText: f = "",
|
370
370
|
helperTextOnFocus: I = !1,
|
371
371
|
rightElement: k,
|
372
|
-
leftElement:
|
373
|
-
onChange:
|
372
|
+
leftElement: S,
|
373
|
+
onChange: V,
|
374
374
|
onFocus: Y,
|
375
375
|
onBlur: F,
|
376
376
|
...q
|
377
|
-
},
|
378
|
-
const x =
|
377
|
+
}, J) => {
|
378
|
+
const x = v(null), K = Ue([J, x]), [Z, G] = ce(), [Q, A] = ce(), W = v(80), z = v(-25), L = v(null), n = v(30), p = v(null), E = Fe({ id: e, prefix: `${ue}-` }), [H, R] = h(0), [y, T] = h(0), [O, U] = h(
|
379
379
|
!!(!I && f)
|
380
380
|
), ee = `${a} error, ${f}`, D = tt({
|
381
|
-
className:
|
381
|
+
className: s,
|
382
382
|
textAreaClassName: c,
|
383
383
|
error: o,
|
384
384
|
raw: t,
|
385
|
-
focusMode:
|
385
|
+
focusMode: m,
|
386
386
|
disabled: b,
|
387
|
-
noBorder:
|
387
|
+
noBorder: _,
|
388
388
|
mode: d,
|
389
389
|
rightElement: !!k,
|
390
|
-
leftElement: !!
|
391
|
-
}), [M, pe] =
|
392
|
-
value:
|
390
|
+
leftElement: !!S
|
391
|
+
}), [M, pe] = Ve({
|
392
|
+
value: g,
|
393
393
|
initialControlledDelay: 20,
|
394
|
-
defaultValue:
|
395
|
-
onChange: (
|
396
|
-
|
394
|
+
defaultValue: u,
|
395
|
+
onChange: (w) => {
|
396
|
+
V && V({
|
397
397
|
target: {
|
398
|
-
value:
|
398
|
+
value: w
|
399
399
|
}
|
400
400
|
});
|
401
401
|
}
|
402
|
-
}), he = (
|
403
|
-
pe(
|
404
|
-
}, ge = (
|
405
|
-
I && f && U(!0), Y && Y(
|
406
|
-
}, ye = (
|
407
|
-
I && f && !M && U(!1), F && F(
|
402
|
+
}), he = (w) => {
|
403
|
+
pe(w.target.value);
|
404
|
+
}, ge = (w) => {
|
405
|
+
I && f && U(!0), Y && Y(w);
|
406
|
+
}, ye = (w) => {
|
407
|
+
I && f && !M && U(!1), F && F(w);
|
408
408
|
};
|
409
409
|
return j(() => {
|
410
410
|
G && G.width && R(G.width + 18 + 10);
|
@@ -421,16 +421,16 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
421
421
|
}, 0);
|
422
422
|
}, [M, t]), j(() => {
|
423
423
|
if (!t && x && x.current && M !== void 0) {
|
424
|
-
const { labelOffset:
|
424
|
+
const { labelOffset: w, helperTextOffset: te, scrollHeight: be } = rt({
|
425
425
|
scrollHeight: x.current.scrollHeight,
|
426
426
|
currentHeight: W.current,
|
427
427
|
currentLabelOffset: z.current,
|
428
428
|
currentHelperTextOffset: n.current
|
429
429
|
});
|
430
|
-
|
430
|
+
w && (z.current = w, L?.current?.style.setProperty(
|
431
431
|
"--av-text-area-label",
|
432
|
-
`${
|
433
|
-
)), te && (n.current = te,
|
432
|
+
`${w}px`
|
433
|
+
)), te && (n.current = te, p?.current?.style.setProperty(
|
434
434
|
"--av-text-area-helper-text",
|
435
435
|
`${te}px`
|
436
436
|
)), W.current = be || W.current;
|
@@ -438,28 +438,28 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
438
438
|
}, [M, t]), A.width > 0 && L?.current?.style.setProperty(
|
439
439
|
"--tw-translate-x",
|
440
440
|
`${12 + A.width + 5}px`
|
441
|
-
), /* @__PURE__ */
|
442
|
-
/* @__PURE__ */
|
441
|
+
), /* @__PURE__ */ N("div", { className: D.wrapper, children: [
|
442
|
+
/* @__PURE__ */ l(
|
443
443
|
"label",
|
444
444
|
{
|
445
445
|
htmlFor: E,
|
446
|
-
id:
|
446
|
+
id: C,
|
447
447
|
className: D.accessibleLabel,
|
448
448
|
children: r
|
449
449
|
}
|
450
450
|
),
|
451
|
-
|
451
|
+
S && /* @__PURE__ */ l(
|
452
452
|
"div",
|
453
453
|
{
|
454
454
|
ref: Q,
|
455
455
|
className: D.leftElement,
|
456
|
-
children:
|
456
|
+
children: S
|
457
457
|
}
|
458
458
|
),
|
459
|
-
/* @__PURE__ */
|
459
|
+
/* @__PURE__ */ l(
|
460
460
|
"textarea",
|
461
461
|
{
|
462
|
-
ref:
|
462
|
+
ref: K,
|
463
463
|
id: E,
|
464
464
|
name: a,
|
465
465
|
disabled: b,
|
@@ -468,9 +468,9 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
468
468
|
rows: 1,
|
469
469
|
...f && { "aria-describedby": `${E}-helper` },
|
470
470
|
...o && { "aria-invalid": "true" },
|
471
|
-
...k && !
|
472
|
-
...
|
473
|
-
...k &&
|
471
|
+
...k && !S && !t && { style: { paddingRight: H } },
|
472
|
+
...S && !k && !t && { style: { paddingLeft: y } },
|
473
|
+
...k && S && !t && {
|
474
474
|
style: {
|
475
475
|
paddingRight: H,
|
476
476
|
paddingLeft: y
|
@@ -483,7 +483,7 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
483
483
|
...q
|
484
484
|
}
|
485
485
|
),
|
486
|
-
!t && /* @__PURE__ */
|
486
|
+
!t && /* @__PURE__ */ l(
|
487
487
|
"label",
|
488
488
|
{
|
489
489
|
ref: L,
|
@@ -493,16 +493,16 @@ const qe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
493
493
|
children: r
|
494
494
|
}
|
495
495
|
),
|
496
|
-
O && /* @__PURE__ */
|
496
|
+
O && /* @__PURE__ */ l(
|
497
497
|
"div",
|
498
498
|
{
|
499
|
-
ref:
|
499
|
+
ref: p,
|
500
500
|
id: `${E}-helper`,
|
501
501
|
className: D.helperText,
|
502
502
|
children: f
|
503
503
|
}
|
504
504
|
),
|
505
|
-
k && /* @__PURE__ */
|
505
|
+
k && /* @__PURE__ */ l(
|
506
506
|
"div",
|
507
507
|
{
|
508
508
|
ref: Z,
|
@@ -510,7 +510,7 @@ const qe = () => "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__ */
|
513
|
+
o && f && /* @__PURE__ */ l(Ye, { politeness: "polite", clearAnnouncementDelay: 500, children: ee })
|
514
514
|
] });
|
515
515
|
}
|
516
516
|
);
|
@@ -528,7 +528,16 @@ try {
|
|
528
528
|
});
|
529
529
|
} catch {
|
530
530
|
}
|
531
|
-
const at = "av-toggle", ot = (
|
531
|
+
const at = "av-toggle", ot = ({ narrow: e }) => i(
|
532
|
+
"peer",
|
533
|
+
"rounded-full",
|
534
|
+
{
|
535
|
+
"h-6 w-11": !e,
|
536
|
+
"h-5 w-12": e
|
537
|
+
},
|
538
|
+
// Smooth background/border transition when toggling
|
539
|
+
"transition-colors duration-300 ease-in-out motion-reduce:transition-none"
|
540
|
+
), nt = ({
|
532
541
|
focusMode: e
|
533
542
|
}) => i(
|
534
543
|
"peer-focus:outline",
|
@@ -540,25 +549,32 @@ const at = "av-toggle", ot = () => i("peer", "h-6", "w-11", "rounded-full"), nt
|
|
540
549
|
"peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
|
541
550
|
"peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
|
542
551
|
}
|
543
|
-
), st = () => i(
|
544
|
-
|
552
|
+
), st = ({ narrow: e }) => i(
|
553
|
+
{
|
554
|
+
"peer-checked:after:translate-x-full": !e,
|
555
|
+
"peer-checked:after:translate-x-4": e
|
556
|
+
},
|
545
557
|
// background color when checked
|
546
558
|
"peer-checked:bg-action-light",
|
547
559
|
// knob circle and border color when checked
|
548
560
|
"peer-checked:after:bg-white",
|
549
561
|
"peer-checked:after:border-white"
|
550
|
-
), lt = () => i(
|
562
|
+
), lt = ({ narrow: e }) => i(
|
551
563
|
"after:left-[2px]",
|
552
564
|
"after:top-[2px]",
|
553
565
|
"after:border",
|
554
566
|
"after:border-surface-light dark:after:border-surface-medium",
|
555
567
|
"after:bg-surface-light dark:after:bg-surface-medium",
|
556
568
|
"after:absolute",
|
557
|
-
"after:
|
558
|
-
"after:
|
569
|
+
"after:transition-all after:duration-300 after:ease-in-out after:motion-reduce:transition-none after:will-change-transform",
|
570
|
+
"after:content-['']",
|
559
571
|
"after:rounded-full",
|
560
|
-
|
561
|
-
|
572
|
+
{
|
573
|
+
// Normal toggle knob (circle)
|
574
|
+
"after:h-5 after:w-5": !e,
|
575
|
+
// Narrow toggle knob (oval)
|
576
|
+
" after:h-4 after:w-7": e
|
577
|
+
}
|
562
578
|
), ct = ({
|
563
579
|
mode: e,
|
564
580
|
noBorder: a
|
@@ -585,14 +601,15 @@ const at = "av-toggle", ot = () => i("peer", "h-6", "w-11", "rounded-full"), nt
|
|
585
601
|
focusMode: a,
|
586
602
|
labelHidden: r,
|
587
603
|
className: o,
|
588
|
-
noBorder: t
|
604
|
+
noBorder: t,
|
605
|
+
narrow: s
|
589
606
|
}) => ({
|
590
607
|
toggle: i(
|
591
|
-
ot(),
|
608
|
+
ot({ narrow: s }),
|
592
609
|
ct({ mode: e, noBorder: t }),
|
593
610
|
nt({ focusMode: a }),
|
594
|
-
lt(),
|
595
|
-
st()
|
611
|
+
lt({ narrow: s }),
|
612
|
+
st({ narrow: s })
|
596
613
|
),
|
597
614
|
label: it({ mode: e, labelHidden: r }),
|
598
615
|
input: "peer sr-only",
|
@@ -603,43 +620,45 @@ const at = "av-toggle", ot = () => i("peer", "h-6", "w-11", "rounded-full"), nt
|
|
603
620
|
label: r,
|
604
621
|
labelHidden: o = !1,
|
605
622
|
name: t,
|
606
|
-
mode:
|
623
|
+
mode: s = "system",
|
607
624
|
focusMode: c = "system",
|
608
625
|
className: d,
|
609
|
-
noBorder:
|
626
|
+
noBorder: m = !1,
|
627
|
+
narrow: g = !1
|
610
628
|
}) => {
|
611
|
-
const
|
612
|
-
mode:
|
629
|
+
const u = ut({
|
630
|
+
mode: s,
|
613
631
|
focusMode: c,
|
614
632
|
labelHidden: o,
|
615
633
|
className: d,
|
616
|
-
noBorder:
|
617
|
-
|
618
|
-
|
634
|
+
noBorder: m,
|
635
|
+
narrow: g
|
636
|
+
}), b = (_) => {
|
637
|
+
a?.(_.target.checked);
|
619
638
|
};
|
620
|
-
return /* @__PURE__ */
|
621
|
-
/* @__PURE__ */
|
639
|
+
return /* @__PURE__ */ N("label", { className: u.wrapper, children: [
|
640
|
+
/* @__PURE__ */ l(
|
622
641
|
"input",
|
623
642
|
{
|
624
643
|
name: t,
|
625
644
|
checked: e,
|
626
645
|
type: "checkbox",
|
627
|
-
className:
|
628
|
-
onChange:
|
646
|
+
className: u.input,
|
647
|
+
onChange: b
|
629
648
|
}
|
630
649
|
),
|
631
|
-
/* @__PURE__ */
|
632
|
-
/* @__PURE__ */
|
650
|
+
/* @__PURE__ */ l("div", { className: u.toggle }),
|
651
|
+
/* @__PURE__ */ l("span", { className: u.label, children: r })
|
633
652
|
] });
|
634
653
|
};
|
635
654
|
/*!
|
636
|
-
@versini/ui-toggle v4.0
|
655
|
+
@versini/ui-toggle v4.1.0
|
637
656
|
© 2025 gizmette.com
|
638
657
|
*/
|
639
658
|
try {
|
640
659
|
window.__VERSINI_UI_TOGGLE__ || (window.__VERSINI_UI_TOGGLE__ = {
|
641
|
-
version: "4.0
|
642
|
-
buildTime: "08/
|
660
|
+
version: "4.1.0",
|
661
|
+
buildTime: "08/28/2025 02:32 PM EDT",
|
643
662
|
homepage: "https://github.com/aversini/ui-components",
|
644
663
|
license: "MIT"
|
645
664
|
});
|
@@ -651,24 +670,24 @@ const yt = ({
|
|
651
670
|
}) => {
|
652
671
|
const { getAccessToken: r, user: o } = ke(), {
|
653
672
|
data: t,
|
654
|
-
isSuccess:
|
673
|
+
isSuccess: s,
|
655
674
|
refetch: c
|
656
675
|
} = Ie({
|
657
676
|
user: o?.username,
|
658
677
|
getAccessToken: r
|
659
|
-
}), [d,
|
678
|
+
}), [d, m] = h({
|
660
679
|
loadingLocation: !1
|
661
|
-
}), [
|
680
|
+
}), [g, u] = h({
|
662
681
|
prompts: []
|
663
|
-
}), [b,
|
682
|
+
}), [b, _] = h(""), [C, f] = h(""), [I, k] = h(!1), [S, V] = h(!1), [Y, F] = h(!1), [q, J] = h(!1), [, x] = Ae({
|
664
683
|
key: xe + Ee,
|
665
684
|
initialValue: !1
|
666
|
-
}),
|
667
|
-
|
685
|
+
}), K = (n) => {
|
686
|
+
J(n);
|
668
687
|
}, Z = (n) => {
|
669
688
|
k(n);
|
670
689
|
}, G = (n) => {
|
671
|
-
|
690
|
+
V(n);
|
672
691
|
}, Q = async (n) => {
|
673
692
|
x(n), F(n), await Se(n);
|
674
693
|
}, A = async (n) => {
|
@@ -680,38 +699,38 @@ const yt = ({
|
|
680
699
|
params: {
|
681
700
|
user: o?.username,
|
682
701
|
instructions: b,
|
683
|
-
location:
|
702
|
+
location: C,
|
684
703
|
provider: t?.provider,
|
685
|
-
tags:
|
704
|
+
tags: g.prompts,
|
686
705
|
sendOnEnter: I,
|
687
|
-
useMemory:
|
706
|
+
useMemory: S,
|
688
707
|
showDetails: q
|
689
708
|
}
|
690
|
-
}), c(),
|
709
|
+
}), c(), m({
|
691
710
|
loadingLocation: !1
|
692
711
|
});
|
693
712
|
} catch {
|
694
713
|
}
|
695
714
|
}, W = async () => {
|
696
|
-
|
715
|
+
m({
|
697
716
|
loadingLocation: !0
|
698
717
|
}), f("...");
|
699
718
|
try {
|
700
|
-
const n = Date.now(),
|
719
|
+
const n = Date.now(), p = await Ce(), E = await se({
|
701
720
|
accessToken: await r(),
|
702
721
|
type: le.GET_LOCATION,
|
703
722
|
params: {
|
704
|
-
latitude:
|
705
|
-
longitude:
|
723
|
+
latitude: p.latitude,
|
724
|
+
longitude: p.longitude
|
706
725
|
}
|
707
726
|
}), R = Date.now() - n;
|
708
727
|
if (R < 2e3 && await new Promise((y) => setTimeout(y, 2e3 - R)), E.status === 200) {
|
709
728
|
const { city: y, state: T, country: O, displayName: U } = E.data, ee = y && T && O ? `${y}, ${T}, ${O}` : U;
|
710
|
-
|
729
|
+
m({
|
711
730
|
loadingLocation: !1
|
712
731
|
}), f(ee);
|
713
732
|
} else
|
714
|
-
|
733
|
+
m({
|
715
734
|
loadingLocation: !1
|
716
735
|
});
|
717
736
|
} catch {
|
@@ -720,15 +739,15 @@ const yt = ({
|
|
720
739
|
c(), a(!1);
|
721
740
|
}, L = ({
|
722
741
|
enabled: n = !1,
|
723
|
-
privateChat:
|
742
|
+
privateChat: p = !1,
|
724
743
|
clipboardAccess: E = !1,
|
725
744
|
...H
|
726
745
|
}) => {
|
727
|
-
|
746
|
+
u((R) => {
|
728
747
|
const y = R.prompts, T = {
|
729
748
|
...H,
|
730
749
|
enabled: n,
|
731
|
-
privateChat:
|
750
|
+
privateChat: p,
|
732
751
|
clipboardAccess: E
|
733
752
|
};
|
734
753
|
E ? T.content = T.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : T.content = T.content.replace(/{{clipboard}}/g, "");
|
@@ -743,23 +762,23 @@ const yt = ({
|
|
743
762
|
});
|
744
763
|
};
|
745
764
|
return X(() => {
|
746
|
-
t?.instructions &&
|
747
|
-
}, [t]),
|
765
|
+
t?.instructions && _(t.instructions), t?.location && f(t.location), t?.tags && u({ prompts: t.tags }), t?.sendOnEnter !== void 0 && k(t.sendOnEnter), t?.useMemory !== void 0 && V(t.useMemory), t?.showDetails !== void 0 && J(t.showDetails), F(Te());
|
766
|
+
}, [t]), s ? /* @__PURE__ */ N(
|
748
767
|
Le,
|
749
768
|
{
|
750
769
|
open: e,
|
751
770
|
onOpenChange: z,
|
752
|
-
title:
|
771
|
+
title: we,
|
753
772
|
animation: !0,
|
754
773
|
animationType: "fade",
|
755
|
-
footer: /* @__PURE__ */
|
774
|
+
footer: /* @__PURE__ */ N(
|
756
775
|
_e,
|
757
776
|
{
|
758
777
|
columnGap: 2,
|
759
778
|
alignHorizontal: "flex-end",
|
760
779
|
className: "pb-8 sm:pb-0",
|
761
780
|
children: [
|
762
|
-
/* @__PURE__ */
|
781
|
+
/* @__PURE__ */ l(ne, { children: /* @__PURE__ */ l(
|
763
782
|
re,
|
764
783
|
{
|
765
784
|
mode: "dark",
|
@@ -770,7 +789,7 @@ const yt = ({
|
|
770
789
|
children: "Cancel"
|
771
790
|
}
|
772
791
|
) }),
|
773
|
-
/* @__PURE__ */
|
792
|
+
/* @__PURE__ */ l(ne, { children: /* @__PURE__ */ l(
|
774
793
|
re,
|
775
794
|
{
|
776
795
|
mode: "dark",
|
@@ -785,28 +804,30 @@ const yt = ({
|
|
785
804
|
}
|
786
805
|
),
|
787
806
|
children: [
|
788
|
-
/* @__PURE__ */
|
789
|
-
|
807
|
+
/* @__PURE__ */ N(
|
808
|
+
$,
|
790
809
|
{
|
791
810
|
header: P.SETTINGS_DETAILS.TITLE,
|
792
811
|
className: "prose-dark dark:prose-lighter",
|
793
812
|
noBorder: !0,
|
794
813
|
children: [
|
795
|
-
/* @__PURE__ */
|
796
|
-
/* @__PURE__ */
|
814
|
+
/* @__PURE__ */ l("p", { className: "text-sm", children: P.SETTINGS_DETAILS.DETAILS }),
|
815
|
+
/* @__PURE__ */ l(
|
797
816
|
B,
|
798
817
|
{
|
818
|
+
narrow: !0,
|
799
819
|
className: "mt-2",
|
800
820
|
label: "Show Message Statistics",
|
801
821
|
name: "show-message-statistics",
|
802
|
-
onChange:
|
822
|
+
onChange: K,
|
803
823
|
checked: q
|
804
824
|
}
|
805
825
|
),
|
806
|
-
/* @__PURE__ */
|
807
|
-
/* @__PURE__ */
|
826
|
+
/* @__PURE__ */ l("p", { className: "text-sm mt-5", children: P.SETTINGS_DETAILS.SEND_ON_ENTER }),
|
827
|
+
/* @__PURE__ */ l(
|
808
828
|
B,
|
809
829
|
{
|
830
|
+
narrow: !0,
|
810
831
|
className: "mt-2",
|
811
832
|
label: "Send Message on Enter",
|
812
833
|
name: "send-message-on-enter",
|
@@ -814,33 +835,34 @@ const yt = ({
|
|
814
835
|
checked: I
|
815
836
|
}
|
816
837
|
),
|
817
|
-
/* @__PURE__ */
|
818
|
-
/* @__PURE__ */
|
838
|
+
/* @__PURE__ */ l("p", { className: "text-sm mt-5", children: P.SETTINGS_DETAILS.USE_MEMORY }),
|
839
|
+
/* @__PURE__ */ l(
|
819
840
|
B,
|
820
841
|
{
|
842
|
+
narrow: !0,
|
821
843
|
className: "mt-2",
|
822
844
|
label: "Use Memory",
|
823
845
|
name: "use-memory",
|
824
846
|
onChange: G,
|
825
|
-
checked:
|
847
|
+
checked: S
|
826
848
|
}
|
827
849
|
)
|
828
850
|
]
|
829
851
|
}
|
830
852
|
),
|
831
|
-
/* @__PURE__ */
|
832
|
-
|
853
|
+
/* @__PURE__ */ N(
|
854
|
+
$,
|
833
855
|
{
|
834
856
|
header: "Custom Instructions",
|
835
857
|
className: "prose-dark dark:prose-lighter mt-4",
|
836
858
|
noBorder: !0,
|
837
859
|
children: [
|
838
|
-
/* @__PURE__ */
|
860
|
+
/* @__PURE__ */ N("p", { className: "text-sm", children: [
|
839
861
|
"What would you like ",
|
840
|
-
/* @__PURE__ */
|
862
|
+
/* @__PURE__ */ l("em", { children: Ne }),
|
841
863
|
" to know about you to provide better responses?"
|
842
864
|
] }),
|
843
|
-
/* @__PURE__ */
|
865
|
+
/* @__PURE__ */ l(
|
844
866
|
oe,
|
845
867
|
{
|
846
868
|
mode: "alt-system",
|
@@ -851,7 +873,7 @@ const yt = ({
|
|
851
873
|
label: "Custom Instructions",
|
852
874
|
value: b,
|
853
875
|
onChange: (n) => {
|
854
|
-
|
876
|
+
_(n.target.value);
|
855
877
|
},
|
856
878
|
helperText: "Press ENTER to add a new line."
|
857
879
|
}
|
@@ -859,28 +881,28 @@ const yt = ({
|
|
859
881
|
]
|
860
882
|
}
|
861
883
|
),
|
862
|
-
/* @__PURE__ */
|
863
|
-
|
884
|
+
/* @__PURE__ */ N(
|
885
|
+
$,
|
864
886
|
{
|
865
887
|
header: "Location",
|
866
888
|
className: "prose-dark dark:prose-lighter mt-4",
|
867
889
|
noBorder: !0,
|
868
890
|
children: [
|
869
|
-
/* @__PURE__ */
|
870
|
-
/* @__PURE__ */
|
891
|
+
/* @__PURE__ */ l("p", { className: "text-sm", children: "You can share your location to receive customized responses based on your area." }),
|
892
|
+
/* @__PURE__ */ l(
|
871
893
|
oe,
|
872
894
|
{
|
873
895
|
mode: "alt-system",
|
874
896
|
name: "location",
|
875
897
|
label: "Location",
|
876
|
-
value:
|
898
|
+
value: C,
|
877
899
|
onChange: (n) => {
|
878
900
|
f(n.target.value);
|
879
901
|
},
|
880
902
|
helperText: "Enter your location or press auto-detect."
|
881
903
|
}
|
882
904
|
),
|
883
|
-
/* @__PURE__ */
|
905
|
+
/* @__PURE__ */ l(
|
884
906
|
re,
|
885
907
|
{
|
886
908
|
className: "mt-2",
|
@@ -895,17 +917,18 @@ const yt = ({
|
|
895
917
|
]
|
896
918
|
}
|
897
919
|
),
|
898
|
-
/* @__PURE__ */
|
899
|
-
|
920
|
+
/* @__PURE__ */ N(
|
921
|
+
$,
|
900
922
|
{
|
901
923
|
header: P.SETTINGS_CACHING.TITLE,
|
902
924
|
className: "prose-dark dark:prose-lighter mt-4",
|
903
925
|
noBorder: !0,
|
904
926
|
children: [
|
905
|
-
/* @__PURE__ */
|
906
|
-
/* @__PURE__ */
|
927
|
+
/* @__PURE__ */ l("p", { className: "text-sm", children: P.SETTINGS_CACHING.DESCRIPTION }),
|
928
|
+
/* @__PURE__ */ l(
|
907
929
|
B,
|
908
930
|
{
|
931
|
+
narrow: !0,
|
909
932
|
className: "mt-2",
|
910
933
|
label: "Enable Assets Caching",
|
911
934
|
name: "enable-service-worker",
|
@@ -916,69 +939,75 @@ const yt = ({
|
|
916
939
|
]
|
917
940
|
}
|
918
941
|
),
|
919
|
-
/* @__PURE__ */
|
920
|
-
|
942
|
+
/* @__PURE__ */ N(
|
943
|
+
$,
|
921
944
|
{
|
922
945
|
header: P.SETTINGS_PROMPTS.TITLE,
|
923
946
|
className: "prose-dark dark:prose-lighter mt-4",
|
924
947
|
noBorder: !0,
|
925
948
|
children: [
|
926
|
-
/* @__PURE__ */
|
927
|
-
|
928
|
-
|
949
|
+
/* @__PURE__ */ l("p", { className: "text-sm", children: ve }),
|
950
|
+
g.prompts && g.prompts.slice(0, 3).map((n) => /* @__PURE__ */ N(
|
951
|
+
$,
|
929
952
|
{
|
930
953
|
mode: "dark",
|
931
954
|
noBorder: !0,
|
932
955
|
header: n.label.replace("...", ""),
|
933
956
|
className: "prose-light mb-2",
|
934
957
|
children: [
|
935
|
-
/* @__PURE__ */
|
936
|
-
/* @__PURE__ */
|
958
|
+
/* @__PURE__ */ l("p", { className: "text-sm", children: n.description }),
|
959
|
+
/* @__PURE__ */ l(
|
937
960
|
B,
|
938
961
|
{
|
962
|
+
narrow: !0,
|
939
963
|
mode: "dark",
|
964
|
+
focusMode: "light",
|
940
965
|
className: "mt-2",
|
941
966
|
noBorder: !0,
|
942
967
|
label: "Enabled",
|
943
968
|
name: n.slot.toString(),
|
944
|
-
onChange: (
|
969
|
+
onChange: (p) => {
|
945
970
|
L({
|
946
971
|
...n,
|
947
|
-
enabled:
|
972
|
+
enabled: p
|
948
973
|
});
|
949
974
|
},
|
950
975
|
checked: n.enabled
|
951
976
|
}
|
952
977
|
),
|
953
|
-
/* @__PURE__ */
|
978
|
+
/* @__PURE__ */ l(
|
954
979
|
B,
|
955
980
|
{
|
981
|
+
narrow: !0,
|
956
982
|
mode: "dark",
|
983
|
+
focusMode: "light",
|
957
984
|
className: "mt-2",
|
958
985
|
noBorder: !0,
|
959
986
|
label: "Private Chat",
|
960
987
|
name: `private-${n.slot.toString()}`,
|
961
|
-
onChange: (
|
988
|
+
onChange: (p) => {
|
962
989
|
L({
|
963
990
|
...n,
|
964
|
-
privateChat:
|
991
|
+
privateChat: p
|
965
992
|
});
|
966
993
|
},
|
967
994
|
checked: n.privateChat
|
968
995
|
}
|
969
996
|
),
|
970
|
-
/* @__PURE__ */
|
997
|
+
/* @__PURE__ */ l(
|
971
998
|
B,
|
972
999
|
{
|
1000
|
+
narrow: !0,
|
973
1001
|
mode: "dark",
|
1002
|
+
focusMode: "light",
|
974
1003
|
className: "mt-2",
|
975
1004
|
noBorder: !0,
|
976
1005
|
label: "Use Clipboard",
|
977
1006
|
name: `clipboard-${n.slot.toString()}`,
|
978
|
-
onChange: (
|
1007
|
+
onChange: (p) => {
|
979
1008
|
L({
|
980
1009
|
...n,
|
981
|
-
clipboardAccess:
|
1010
|
+
clipboardAccess: p
|
982
1011
|
});
|
983
1012
|
},
|
984
1013
|
checked: n.clipboardAccess
|