@versini/sassysaint 8.46.0 → 8.47.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.Dn5w_I40.js → AboutChangelog.CrPmttGh.js} +2 -2
- package/dist/chunks/{AboutEntry.B5i-spF2.js → AboutEntry.CW6LSgBo.js} +7 -7
- package/dist/chunks/{App.BRLXTPuI.js → App.P8VuaklL.js} +3255 -4024
- package/dist/chunks/{Chart.CMXUufSF.js → Chart.v46ZrHpO.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.C8s8IJji.js → ChatBubbleAssistant.Dm3w8aPQ.js} +10 -10
- package/dist/chunks/{ChatHistoryTable.DSIpfU3W.js → ChatHistoryTable.DiXFgbUY.js} +25 -25
- package/dist/chunks/{HistoryEntry.2bNTf4-u.js → HistoryEntry.8-r_XaOl.js} +22 -22
- package/dist/chunks/{LNWAZHJI.BmS0H8zm.js → LNWAZHJI.ucCV8_lF.js} +1 -1
- package/dist/chunks/{ProfileEntry.Dn_Yvyfp.js → ProfileEntry.Db0i4H1-.js} +2 -2
- package/dist/chunks/{SettingsEntry.C3v0uw1a.js → SettingsEntry.DiEffW-W.js} +267 -265
- package/dist/chunks/{UsageEntry.DvPh7Q08.js → UsageEntry.DTwtBL3G.js} +8 -8
- package/dist/chunks/{index.DGWKv05_.js → index.B6LTE4XZ.js} +2 -2
- package/dist/chunks/{index.BIiKYak6.js → index.BdOUWeMA.js} +1 -1
- package/dist/chunks/{index.ihPfo4Pu.js → index.D6DtPtKF.js} +1 -1
- package/dist/chunks/{index.DFaB5gt5.js → index.DAma765y.js} +1 -1
- package/dist/chunks/{index.CZTwv4Z4.js → index.DxRpe0Fx.js} +2906 -2043
- package/dist/chunks/{index.BJOyhdWZ.js → index.WoNpwqiR.js} +3 -3
- package/dist/chunks/{index.CDYuHLT5.js → index.ihYh1tax.js} +1 -1
- package/dist/chunks/{useMarkdown.x-5Fhdu8.js → useMarkdown.CrlE9bFj.js} +6 -6
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
@@ -1,9 +1,9 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { o as
|
3
|
-
import {
|
4
|
-
import
|
1
|
+
import { jsxs as m, jsx as a, Fragment as pe } from "react/jsx-runtime";
|
2
|
+
import { o as ge, h as ie, i as ye, x as be, n as xe, useUserPreferences as ke, pe as we, getCacheInfo as Ne, isServiceWorkerEnabled as Ee, SETTINGS_TITLE as Te, S as V, CARDS as R, de as ve, C as se, PROMPTS_DESCRIPTION as Se, L as Ce, j as de, getCurrentGeoLocation as Ie, mutateCall as ue, handleServiceWorkerToggle as _e, SERVICE_TYPES as me } from "./index.DxRpe0Fx.js";
|
3
|
+
import { useCapability as Le, se as Me } from "./App.P8VuaklL.js";
|
4
|
+
import Oe, { useState as f, useEffect as ne, useRef as W, useLayoutEffect as Y, useCallback as Pe } from "react";
|
5
5
|
import c from "clsx";
|
6
|
-
function
|
6
|
+
function Ae({
|
7
7
|
value: e,
|
8
8
|
defaultValue: s,
|
9
9
|
finalValue: o,
|
@@ -11,30 +11,30 @@ function Me({
|
|
11
11
|
},
|
12
12
|
initialControlledDelay: r = 0
|
13
13
|
}) {
|
14
|
-
const [n,
|
14
|
+
const [n, d] = f(!1), [h, x] = f(
|
15
15
|
s !== void 0 ? s : o
|
16
|
-
), k = (
|
17
|
-
x(
|
16
|
+
), k = (u) => {
|
17
|
+
x(u), l?.(u);
|
18
18
|
};
|
19
19
|
return ne(() => {
|
20
20
|
(async () => e !== void 0 && !n && r > 0 && (await new Promise(
|
21
|
-
(
|
22
|
-
),
|
21
|
+
(u) => setTimeout(u, r)
|
22
|
+
), d(!0)))();
|
23
23
|
}, [e, r, n]), e !== void 0 ? !n && r > 0 ? ["", l, !0] : [e, l, !0] : [h, k, !1];
|
24
24
|
}
|
25
|
-
const fe = "av-text-area",
|
25
|
+
const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helper-text", Be = "av-text-area__control--right", De = "av-text-area__control--left", Ge = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", He = ({ mode: e }) => c({
|
26
26
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
27
27
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
28
28
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
29
29
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
30
|
-
}),
|
30
|
+
}), Ue = ({
|
31
31
|
focusMode: e
|
32
32
|
}) => c("focus:outline focus:outline-2 focus:outline-offset-2", {
|
33
33
|
"focus:outline-focus-dark": e === "dark",
|
34
34
|
"focus:outline-focus-light": e === "light",
|
35
35
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
36
36
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
37
|
-
}),
|
37
|
+
}), $e = ({
|
38
38
|
noBorder: e,
|
39
39
|
error: s
|
40
40
|
}) => c("border-2", {
|
@@ -42,7 +42,7 @@ const fe = "av-text-area", Pe = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
42
42
|
"focus:border-border-dark": !e && s,
|
43
43
|
"border-border-error-dark": !e && s,
|
44
44
|
"border-transparent": e
|
45
|
-
}),
|
45
|
+
}), Ve = ({
|
46
46
|
disabled: e,
|
47
47
|
raw: s,
|
48
48
|
error: o,
|
@@ -81,7 +81,7 @@ const fe = "av-text-area", Pe = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
81
81
|
"text-copy-medium dark:text-copy-error-dark": l === "alt-system"
|
82
82
|
}
|
83
83
|
);
|
84
|
-
},
|
84
|
+
}, We = ({
|
85
85
|
error: e,
|
86
86
|
raw: s,
|
87
87
|
mode: o,
|
@@ -108,58 +108,58 @@ const fe = "av-text-area", Pe = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
108
108
|
"text-copy-error-dark dark:text-copy-error-light": o === "system",
|
109
109
|
"dark:text-copy-error-dark text-copy-error-light": o === "alt-system"
|
110
110
|
});
|
111
|
-
},
|
111
|
+
}, ze = ({
|
112
112
|
className: e,
|
113
113
|
textAreaClassName: s,
|
114
114
|
raw: o,
|
115
115
|
focusMode: l,
|
116
116
|
disabled: r,
|
117
117
|
noBorder: n,
|
118
|
-
error:
|
118
|
+
error: d,
|
119
119
|
mode: h,
|
120
120
|
leftElement: x,
|
121
121
|
rightElement: k
|
122
122
|
}) => {
|
123
|
-
const
|
123
|
+
const u = o ? e : c(
|
124
124
|
"relative flex w-full flex-col justify-center",
|
125
|
-
|
125
|
+
Re,
|
126
126
|
e
|
127
|
-
),
|
127
|
+
), v = o ? c(s) : c(
|
128
128
|
fe,
|
129
129
|
s,
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
130
|
+
Ge(),
|
131
|
+
He({ mode: h }),
|
132
|
+
Ue({ focusMode: l }),
|
133
|
+
$e({
|
134
134
|
noBorder: n,
|
135
|
-
error:
|
135
|
+
error: d
|
136
136
|
}),
|
137
137
|
{
|
138
138
|
"disabled:cursor-not-allowed disabled:opacity-50": r
|
139
139
|
}
|
140
|
-
),
|
140
|
+
), I = o ? void 0 : "sr-only", D = Ve({
|
141
141
|
disabled: r,
|
142
142
|
raw: o,
|
143
|
-
error:
|
143
|
+
error: d,
|
144
144
|
mode: h,
|
145
145
|
rightElement: k,
|
146
146
|
leftElement: x
|
147
|
-
}), y =
|
148
|
-
error:
|
147
|
+
}), y = We({
|
148
|
+
error: d,
|
149
149
|
raw: o,
|
150
150
|
mode: h,
|
151
151
|
disabled: r
|
152
|
-
}),
|
152
|
+
}), _ = o ? void 0 : c(Be, "absolute"), w = o ? void 0 : c(De, "absolute");
|
153
153
|
return {
|
154
|
-
wrapper:
|
155
|
-
textArea:
|
156
|
-
accessibleLabel:
|
154
|
+
wrapper: u,
|
155
|
+
textArea: v,
|
156
|
+
accessibleLabel: I,
|
157
157
|
visibleLabel: D,
|
158
158
|
helperText: y,
|
159
|
-
rightElement:
|
159
|
+
rightElement: _,
|
160
160
|
leftElement: w
|
161
161
|
};
|
162
|
-
},
|
162
|
+
}, Fe = ({
|
163
163
|
scrollHeight: e,
|
164
164
|
currentHeight: s,
|
165
165
|
currentLabelOffset: o = 0,
|
@@ -167,15 +167,15 @@ const fe = "av-text-area", Pe = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
167
167
|
}) => {
|
168
168
|
let r, n;
|
169
169
|
if (e > 0 && e !== s) {
|
170
|
-
const
|
171
|
-
r = o + -1 * Math.sign(
|
170
|
+
const d = e - s, h = Math.abs(d / 24);
|
171
|
+
r = o + -1 * Math.sign(d) * (12 * h), n = l + Math.sign(d) * (12 * h);
|
172
172
|
}
|
173
173
|
return {
|
174
174
|
labelOffset: r,
|
175
175
|
helperTextOffset: n,
|
176
176
|
scrollHeight: e
|
177
177
|
};
|
178
|
-
}, ce =
|
178
|
+
}, ce = Oe.forwardRef(
|
179
179
|
({
|
180
180
|
id: e,
|
181
181
|
name: s,
|
@@ -183,159 +183,159 @@ const fe = "av-text-area", Pe = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
183
183
|
error: l = !1,
|
184
184
|
raw: r = !1,
|
185
185
|
className: n,
|
186
|
-
textAreaClassName:
|
186
|
+
textAreaClassName: d,
|
187
187
|
mode: h = "system",
|
188
188
|
focusMode: x = "system",
|
189
189
|
value: k,
|
190
|
-
defaultValue:
|
191
|
-
disabled:
|
192
|
-
noBorder:
|
190
|
+
defaultValue: u,
|
191
|
+
disabled: v = !1,
|
192
|
+
noBorder: I = !1,
|
193
193
|
labelId: D,
|
194
194
|
helperText: y = "",
|
195
|
-
helperTextOnFocus:
|
195
|
+
helperTextOnFocus: _ = !1,
|
196
196
|
rightElement: w,
|
197
|
-
leftElement:
|
198
|
-
onChange:
|
197
|
+
leftElement: S,
|
198
|
+
onChange: z,
|
199
199
|
onFocus: L,
|
200
|
-
onBlur:
|
201
|
-
...
|
202
|
-
},
|
203
|
-
const p =
|
204
|
-
!!(!
|
205
|
-
),
|
200
|
+
onBlur: F,
|
201
|
+
...G
|
202
|
+
}, X) => {
|
203
|
+
const p = W(null), q = ge([X, p]), [J, M] = ie(), [K, C] = ie(), H = W(80), Q = W(-25), U = W(null), Z = W(30), ee = W(null), O = ye({ id: e, prefix: `${fe}-` }), [re, te] = f(0), [$, ae] = f(0), [t, i] = f(
|
204
|
+
!!(!_ && y)
|
205
|
+
), P = `${s} error, ${y}`, N = ze({
|
206
206
|
className: n,
|
207
|
-
textAreaClassName:
|
207
|
+
textAreaClassName: d,
|
208
208
|
error: l,
|
209
209
|
raw: r,
|
210
210
|
focusMode: x,
|
211
|
-
disabled:
|
212
|
-
noBorder:
|
211
|
+
disabled: v,
|
212
|
+
noBorder: I,
|
213
213
|
mode: h,
|
214
214
|
rightElement: !!w,
|
215
|
-
leftElement: !!
|
216
|
-
}), [
|
215
|
+
leftElement: !!S
|
216
|
+
}), [g, E] = Ae({
|
217
217
|
value: k,
|
218
218
|
initialControlledDelay: 20,
|
219
|
-
defaultValue:
|
220
|
-
onChange: (
|
221
|
-
|
219
|
+
defaultValue: u,
|
220
|
+
onChange: (b) => {
|
221
|
+
z && z({
|
222
222
|
target: {
|
223
|
-
value:
|
223
|
+
value: b
|
224
224
|
}
|
225
225
|
});
|
226
226
|
}
|
227
|
-
}),
|
228
|
-
|
229
|
-
},
|
230
|
-
|
231
|
-
},
|
232
|
-
|
227
|
+
}), T = (b) => {
|
228
|
+
E(b.target.value);
|
229
|
+
}, A = (b) => {
|
230
|
+
_ && y && i(!0), L && L(b);
|
231
|
+
}, j = (b) => {
|
232
|
+
_ && y && !g && i(!1), F && F(b);
|
233
233
|
};
|
234
|
-
return
|
235
|
-
M && M.width &&
|
236
|
-
}, [M]),
|
237
|
-
|
238
|
-
}, [
|
239
|
-
r || p && p.current &&
|
240
|
-
}, [
|
234
|
+
return Y(() => {
|
235
|
+
M && M.width && te(M.width + 18 + 10);
|
236
|
+
}, [M]), Y(() => {
|
237
|
+
C && C.width && ae(C.width + 18 + 10);
|
238
|
+
}, [C]), Y(() => {
|
239
|
+
r || p && p.current && g !== void 0 && (p.current.style.height = "inherit", p.current.style.height = p.current.scrollHeight + "px");
|
240
|
+
}, [g, r]), Y(() => {
|
241
241
|
r || setTimeout(() => {
|
242
|
-
|
242
|
+
U?.current?.style.setProperty(
|
243
243
|
"--av-text-area-wrapper-transition",
|
244
|
-
|
244
|
+
g ? "none" : "all 0.2s ease-out"
|
245
245
|
);
|
246
246
|
}, 0);
|
247
|
-
}, [
|
248
|
-
if (!r && p && p.current &&
|
249
|
-
const { labelOffset:
|
247
|
+
}, [g, r]), Y(() => {
|
248
|
+
if (!r && p && p.current && g !== void 0) {
|
249
|
+
const { labelOffset: b, helperTextOffset: oe, scrollHeight: he } = Fe({
|
250
250
|
scrollHeight: p.current.scrollHeight,
|
251
|
-
currentHeight:
|
252
|
-
currentLabelOffset:
|
253
|
-
currentHelperTextOffset:
|
251
|
+
currentHeight: H.current,
|
252
|
+
currentLabelOffset: Q.current,
|
253
|
+
currentHelperTextOffset: Z.current
|
254
254
|
});
|
255
|
-
|
255
|
+
b && (Q.current = b, U?.current?.style.setProperty(
|
256
256
|
"--av-text-area-label",
|
257
|
-
`${
|
258
|
-
)), oe && (
|
257
|
+
`${b}px`
|
258
|
+
)), oe && (Z.current = oe, ee?.current?.style.setProperty(
|
259
259
|
"--av-text-area-helper-text",
|
260
260
|
`${oe}px`
|
261
|
-
)),
|
261
|
+
)), H.current = he || H.current;
|
262
262
|
}
|
263
|
-
}, [
|
263
|
+
}, [g, r]), C.width > 0 && U?.current?.style.setProperty(
|
264
264
|
"--tw-translate-x",
|
265
|
-
`${12 +
|
266
|
-
), /* @__PURE__ */
|
265
|
+
`${12 + C.width + 5}px`
|
266
|
+
), /* @__PURE__ */ m("div", { className: N.wrapper, children: [
|
267
267
|
/* @__PURE__ */ a(
|
268
268
|
"label",
|
269
269
|
{
|
270
|
-
htmlFor:
|
270
|
+
htmlFor: O,
|
271
271
|
id: D,
|
272
|
-
className:
|
272
|
+
className: N.accessibleLabel,
|
273
273
|
children: o
|
274
274
|
}
|
275
275
|
),
|
276
|
-
|
276
|
+
S && /* @__PURE__ */ a(
|
277
277
|
"div",
|
278
278
|
{
|
279
|
-
ref:
|
280
|
-
className:
|
281
|
-
children:
|
279
|
+
ref: K,
|
280
|
+
className: N.leftElement,
|
281
|
+
children: S
|
282
282
|
}
|
283
283
|
),
|
284
284
|
/* @__PURE__ */ a(
|
285
285
|
"textarea",
|
286
286
|
{
|
287
|
-
ref:
|
288
|
-
id:
|
287
|
+
ref: q,
|
288
|
+
id: O,
|
289
289
|
name: s,
|
290
|
-
disabled:
|
290
|
+
disabled: v,
|
291
291
|
placeholder: r ? void 0 : " ",
|
292
|
-
className:
|
292
|
+
className: N.textArea,
|
293
293
|
rows: 1,
|
294
|
-
...y && { "aria-describedby": `${
|
294
|
+
...y && { "aria-describedby": `${O}-helper` },
|
295
295
|
...l && { "aria-invalid": "true" },
|
296
|
-
...w && !
|
297
|
-
...
|
298
|
-
...w &&
|
296
|
+
...w && !S && !r && { style: { paddingRight: re } },
|
297
|
+
...S && !w && !r && { style: { paddingLeft: $ } },
|
298
|
+
...w && S && !r && {
|
299
299
|
style: {
|
300
|
-
paddingRight:
|
301
|
-
paddingLeft:
|
300
|
+
paddingRight: re,
|
301
|
+
paddingLeft: $
|
302
302
|
}
|
303
303
|
},
|
304
|
-
value:
|
305
|
-
onChange:
|
306
|
-
onFocus:
|
307
|
-
onBlur:
|
308
|
-
...
|
304
|
+
value: g,
|
305
|
+
onChange: T,
|
306
|
+
onFocus: A,
|
307
|
+
onBlur: j,
|
308
|
+
...G
|
309
309
|
}
|
310
310
|
),
|
311
311
|
!r && /* @__PURE__ */ a(
|
312
312
|
"label",
|
313
313
|
{
|
314
|
-
ref:
|
314
|
+
ref: U,
|
315
315
|
"aria-hidden": !0,
|
316
|
-
htmlFor:
|
317
|
-
className: `${
|
316
|
+
htmlFor: O,
|
317
|
+
className: `${N.visibleLabel}`,
|
318
318
|
children: o
|
319
319
|
}
|
320
320
|
),
|
321
|
-
|
321
|
+
t && /* @__PURE__ */ a(
|
322
322
|
"div",
|
323
323
|
{
|
324
|
-
ref:
|
325
|
-
id: `${
|
326
|
-
className:
|
324
|
+
ref: ee,
|
325
|
+
id: `${O}-helper`,
|
326
|
+
className: N.helperText,
|
327
327
|
children: y
|
328
328
|
}
|
329
329
|
),
|
330
330
|
w && /* @__PURE__ */ a(
|
331
331
|
"div",
|
332
332
|
{
|
333
|
-
ref:
|
334
|
-
className:
|
333
|
+
ref: J,
|
334
|
+
className: N.rightElement,
|
335
335
|
children: w
|
336
336
|
}
|
337
337
|
),
|
338
|
-
l && y && /* @__PURE__ */ a(
|
338
|
+
l && y && /* @__PURE__ */ a(be, { politeness: "polite", clearAnnouncementDelay: 500, children: P })
|
339
339
|
] });
|
340
340
|
}
|
341
341
|
);
|
@@ -353,7 +353,7 @@ try {
|
|
353
353
|
});
|
354
354
|
} catch {
|
355
355
|
}
|
356
|
-
const
|
356
|
+
const je = "av-toggle", Ye = ({ narrow: e }) => c(
|
357
357
|
"peer",
|
358
358
|
"rounded-full",
|
359
359
|
{
|
@@ -362,7 +362,7 @@ const We = "av-toggle", ze = ({ narrow: e }) => c(
|
|
362
362
|
},
|
363
363
|
// Smooth background/border transition when toggling
|
364
364
|
"transition-colors duration-300 ease-in-out motion-reduce:transition-none"
|
365
|
-
),
|
365
|
+
), Xe = ({
|
366
366
|
focusMode: e
|
367
367
|
}) => c(
|
368
368
|
"peer-focus:outline",
|
@@ -374,7 +374,7 @@ const We = "av-toggle", ze = ({ narrow: e }) => c(
|
|
374
374
|
"peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
|
375
375
|
"peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
|
376
376
|
}
|
377
|
-
),
|
377
|
+
), qe = ({ narrow: e }) => c(
|
378
378
|
{
|
379
379
|
"peer-checked:after:translate-x-full": !e,
|
380
380
|
"peer-checked:after:translate-x-4": e
|
@@ -384,7 +384,7 @@ const We = "av-toggle", ze = ({ narrow: e }) => c(
|
|
384
384
|
// knob circle and border color when checked
|
385
385
|
"peer-checked:after:bg-white",
|
386
386
|
"peer-checked:after:border-white"
|
387
|
-
),
|
387
|
+
), Je = ({ narrow: e }) => c(
|
388
388
|
"after:left-[2px]",
|
389
389
|
"after:top-[2px]",
|
390
390
|
"after:border",
|
@@ -400,7 +400,7 @@ const We = "av-toggle", ze = ({ narrow: e }) => c(
|
|
400
400
|
// Narrow toggle knob (oval)
|
401
401
|
" after:h-4 after:w-7": e
|
402
402
|
}
|
403
|
-
),
|
403
|
+
), Ke = ({
|
404
404
|
mode: e,
|
405
405
|
noBorder: s
|
406
406
|
}) => c({
|
@@ -409,7 +409,7 @@ const We = "av-toggle", ze = ({ narrow: e }) => c(
|
|
409
409
|
"border-border-light bg-surface-darker": e === "dark",
|
410
410
|
"border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
|
411
411
|
"border-border-medium bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
|
412
|
-
}),
|
412
|
+
}), Qe = ({
|
413
413
|
mode: e,
|
414
414
|
labelHidden: s
|
415
415
|
}) => s ? "sr-only" : c("ml-2 text-sm", {
|
@@ -417,11 +417,11 @@ const We = "av-toggle", ze = ({ narrow: e }) => c(
|
|
417
417
|
"text-copy-lighter": e === "dark",
|
418
418
|
"text-copy-lighter dark:text-copy-dark": e === "alt-system",
|
419
419
|
"text-copy-dark dark:text-copy-lighter": e === "system"
|
420
|
-
}),
|
421
|
-
|
420
|
+
}), Ze = ({ className: e }) => c(
|
421
|
+
je,
|
422
422
|
"relative flex cursor-pointer items-center",
|
423
423
|
e
|
424
|
-
),
|
424
|
+
), er = ({
|
425
425
|
mode: e,
|
426
426
|
focusMode: s,
|
427
427
|
labelHidden: o,
|
@@ -430,15 +430,15 @@ const We = "av-toggle", ze = ({ narrow: e }) => c(
|
|
430
430
|
narrow: n
|
431
431
|
}) => ({
|
432
432
|
toggle: c(
|
433
|
-
ze({ narrow: n }),
|
434
|
-
Xe({ mode: e, noBorder: r }),
|
435
|
-
je({ focusMode: s }),
|
436
433
|
Ye({ narrow: n }),
|
437
|
-
|
434
|
+
Ke({ mode: e, noBorder: r }),
|
435
|
+
Xe({ focusMode: s }),
|
436
|
+
Je({ narrow: n }),
|
437
|
+
qe({ narrow: n })
|
438
438
|
),
|
439
|
-
label:
|
439
|
+
label: Qe({ mode: e, labelHidden: o }),
|
440
440
|
input: "peer sr-only",
|
441
|
-
wrapper:
|
441
|
+
wrapper: Ze({ className: l })
|
442
442
|
}), B = ({
|
443
443
|
checked: e = !1,
|
444
444
|
onChange: s,
|
@@ -446,34 +446,34 @@ const We = "av-toggle", ze = ({ narrow: e }) => c(
|
|
446
446
|
labelHidden: l = !1,
|
447
447
|
name: r,
|
448
448
|
mode: n = "system",
|
449
|
-
focusMode:
|
449
|
+
focusMode: d = "system",
|
450
450
|
className: h,
|
451
451
|
noBorder: x = !1,
|
452
452
|
narrow: k = !1
|
453
453
|
}) => {
|
454
|
-
const
|
454
|
+
const u = er({
|
455
455
|
mode: n,
|
456
|
-
focusMode:
|
456
|
+
focusMode: d,
|
457
457
|
labelHidden: l,
|
458
458
|
className: h,
|
459
459
|
noBorder: x,
|
460
460
|
narrow: k
|
461
|
-
}),
|
462
|
-
s?.(
|
461
|
+
}), v = (I) => {
|
462
|
+
s?.(I.target.checked);
|
463
463
|
};
|
464
|
-
return /* @__PURE__ */
|
464
|
+
return /* @__PURE__ */ m("label", { className: u.wrapper, children: [
|
465
465
|
/* @__PURE__ */ a(
|
466
466
|
"input",
|
467
467
|
{
|
468
468
|
name: r,
|
469
469
|
checked: e,
|
470
470
|
type: "checkbox",
|
471
|
-
className:
|
472
|
-
onChange:
|
471
|
+
className: u.input,
|
472
|
+
onChange: v
|
473
473
|
}
|
474
474
|
),
|
475
|
-
/* @__PURE__ */ a("div", { className:
|
476
|
-
/* @__PURE__ */ a("span", { className:
|
475
|
+
/* @__PURE__ */ a("div", { className: u.toggle }),
|
476
|
+
/* @__PURE__ */ a("span", { className: u.label, children: o })
|
477
477
|
] });
|
478
478
|
};
|
479
479
|
/*!
|
@@ -489,30 +489,30 @@ try {
|
|
489
489
|
});
|
490
490
|
} catch {
|
491
491
|
}
|
492
|
-
const
|
492
|
+
const lr = ({
|
493
493
|
open: e,
|
494
494
|
onOpenChange: s
|
495
495
|
}) => {
|
496
|
-
const { getAccessToken: o, user: l } =
|
496
|
+
const { getAccessToken: o, user: l } = xe(), {
|
497
497
|
data: r,
|
498
498
|
isSuccess: n,
|
499
|
-
refetch:
|
500
|
-
} =
|
499
|
+
refetch: d
|
500
|
+
} = ke({
|
501
501
|
user: l?.username,
|
502
502
|
getAccessToken: o
|
503
503
|
}), [h, x] = f({
|
504
504
|
loadingLocation: !1
|
505
|
-
}), [k,
|
505
|
+
}), [k, u] = f({
|
506
506
|
prompts: []
|
507
|
-
}), [
|
508
|
-
|
509
|
-
},
|
507
|
+
}), [v, I] = f(""), [D, y] = f(""), [_, w] = f(!1), [S, z] = f(!1), [L, F] = f(!1), [G, X] = f(!1), [p, q] = f(null), [J, M] = f(!1), [K, C] = f(!1), H = Le(we.TOOL.MEMORIES), Q = (t) => {
|
508
|
+
C(t);
|
509
|
+
}, U = (t) => {
|
510
510
|
w(t);
|
511
|
-
},
|
512
|
-
|
513
|
-
},
|
514
|
-
|
515
|
-
},
|
511
|
+
}, Z = (t) => {
|
512
|
+
H && z(t);
|
513
|
+
}, ee = (t) => {
|
514
|
+
X(t);
|
515
|
+
}, O = async (t) => {
|
516
516
|
t.preventDefault();
|
517
517
|
try {
|
518
518
|
await ue({
|
@@ -520,73 +520,73 @@ const ar = ({
|
|
520
520
|
type: me.SET_USER_PREFERENCES,
|
521
521
|
params: {
|
522
522
|
user: l?.username,
|
523
|
-
instructions:
|
523
|
+
instructions: v,
|
524
524
|
location: D,
|
525
525
|
provider: r?.provider,
|
526
526
|
tags: k.prompts,
|
527
|
-
sendOnEnter:
|
528
|
-
useMemory:
|
529
|
-
showDetails:
|
527
|
+
sendOnEnter: _,
|
528
|
+
useMemory: S,
|
529
|
+
showDetails: K
|
530
530
|
}
|
531
|
-
}),
|
531
|
+
}), G !== L && (await _e(G), F(G)), d(), x({
|
532
532
|
loadingLocation: !1
|
533
533
|
});
|
534
534
|
} catch {
|
535
535
|
}
|
536
|
-
},
|
536
|
+
}, re = async () => {
|
537
537
|
x({
|
538
538
|
loadingLocation: !0
|
539
539
|
}), y("...");
|
540
540
|
try {
|
541
|
-
const t = Date.now(),
|
541
|
+
const t = Date.now(), i = await Ie(), P = await ue({
|
542
542
|
accessToken: await o(),
|
543
543
|
type: me.GET_LOCATION,
|
544
544
|
params: {
|
545
|
-
latitude:
|
546
|
-
longitude:
|
545
|
+
latitude: i.latitude,
|
546
|
+
longitude: i.longitude
|
547
547
|
}
|
548
|
-
}),
|
549
|
-
if (
|
550
|
-
const { city:
|
548
|
+
}), g = Date.now() - t;
|
549
|
+
if (g < 2e3 && await new Promise((E) => setTimeout(E, 2e3 - g)), P.status === 200) {
|
550
|
+
const { city: E, state: T, country: A, displayName: j } = P.data, b = E && T && A ? `${E}, ${T}, ${A}` : j;
|
551
551
|
x({
|
552
552
|
loadingLocation: !1
|
553
|
-
}), y(
|
553
|
+
}), y(b);
|
554
554
|
} else
|
555
555
|
x({
|
556
556
|
loadingLocation: !1
|
557
557
|
});
|
558
558
|
} catch {
|
559
559
|
}
|
560
|
-
},
|
561
|
-
|
562
|
-
},
|
560
|
+
}, te = () => {
|
561
|
+
d(), s(!1);
|
562
|
+
}, $ = ({
|
563
563
|
enabled: t = !1,
|
564
|
-
privateChat:
|
565
|
-
clipboardAccess:
|
566
|
-
...
|
564
|
+
privateChat: i = !1,
|
565
|
+
clipboardAccess: P = !1,
|
566
|
+
...N
|
567
567
|
}) => {
|
568
|
-
|
569
|
-
const
|
570
|
-
...
|
568
|
+
u((g) => {
|
569
|
+
const E = g.prompts, T = {
|
570
|
+
...N,
|
571
571
|
enabled: t,
|
572
|
-
privateChat:
|
573
|
-
clipboardAccess:
|
572
|
+
privateChat: i,
|
573
|
+
clipboardAccess: P
|
574
574
|
};
|
575
|
-
|
576
|
-
const A =
|
575
|
+
P ? T.content = T.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : T.content = T.content.replace(/{{clipboard}}/g, "");
|
576
|
+
const A = E.findIndex((j) => j.slot === N.slot);
|
577
577
|
return A === -1 ? {
|
578
|
-
...
|
579
|
-
prompts: [...
|
580
|
-
} : (
|
581
|
-
...
|
582
|
-
prompts: [...
|
578
|
+
...g,
|
579
|
+
prompts: [...E, { ...T }]
|
580
|
+
} : (E[A] = T, {
|
581
|
+
...g,
|
582
|
+
prompts: [...E]
|
583
583
|
});
|
584
584
|
});
|
585
|
-
},
|
585
|
+
}, ae = Pe(async () => {
|
586
586
|
try {
|
587
587
|
M(!0);
|
588
|
-
const t = await
|
589
|
-
|
588
|
+
const t = await Ne();
|
589
|
+
q(t);
|
590
590
|
} catch {
|
591
591
|
} finally {
|
592
592
|
M(!1);
|
@@ -595,21 +595,21 @@ const ar = ({
|
|
595
595
|
return ne(() => {
|
596
596
|
if (!r)
|
597
597
|
return;
|
598
|
-
r.instructions &&
|
599
|
-
const t =
|
600
|
-
|
598
|
+
r.instructions && I(r.instructions), r.location && y(r.location), r.tags && u({ prompts: r.tags }), r.sendOnEnter !== void 0 && w(r.sendOnEnter), r.useMemory !== void 0 && z(r.useMemory), r.showDetails !== void 0 && C(r.showDetails);
|
599
|
+
const t = Ee();
|
600
|
+
F(t), X(t);
|
601
601
|
}, [r]), ne(() => {
|
602
|
-
L ?
|
603
|
-
}, [L,
|
604
|
-
|
602
|
+
L ? ae() : q(null);
|
603
|
+
}, [L, ae]), n ? /* @__PURE__ */ m(
|
604
|
+
Me,
|
605
605
|
{
|
606
606
|
open: e,
|
607
|
-
onOpenChange:
|
608
|
-
title:
|
607
|
+
onOpenChange: te,
|
608
|
+
title: Te,
|
609
609
|
animation: !0,
|
610
610
|
animationType: "fade",
|
611
|
-
footer: /* @__PURE__ */
|
612
|
-
|
611
|
+
footer: /* @__PURE__ */ m(
|
612
|
+
Ce,
|
613
613
|
{
|
614
614
|
columnGap: 2,
|
615
615
|
alignHorizontal: "flex-end",
|
@@ -622,7 +622,7 @@ const ar = ({
|
|
622
622
|
variant: "secondary",
|
623
623
|
focusMode: "light",
|
624
624
|
noBorder: !0,
|
625
|
-
onClick:
|
625
|
+
onClick: te,
|
626
626
|
children: "Cancel"
|
627
627
|
}
|
628
628
|
) }),
|
@@ -632,7 +632,7 @@ const ar = ({
|
|
632
632
|
mode: "dark",
|
633
633
|
focusMode: "light",
|
634
634
|
onClick: async (t) => {
|
635
|
-
s(!1), await
|
635
|
+
s(!1), await O(t);
|
636
636
|
},
|
637
637
|
children: "Save"
|
638
638
|
}
|
@@ -641,14 +641,14 @@ const ar = ({
|
|
641
641
|
}
|
642
642
|
),
|
643
643
|
children: [
|
644
|
-
/* @__PURE__ */
|
645
|
-
|
644
|
+
/* @__PURE__ */ m(
|
645
|
+
V,
|
646
646
|
{
|
647
|
-
header:
|
647
|
+
header: R.SETTINGS_DETAILS.TITLE,
|
648
648
|
className: "prose-dark dark:prose-lighter",
|
649
649
|
noBorder: !0,
|
650
650
|
children: [
|
651
|
-
/* @__PURE__ */ a("p", { className: "text-sm", children:
|
651
|
+
/* @__PURE__ */ a("p", { className: "text-sm", children: R.SETTINGS_DETAILS.DETAILS }),
|
652
652
|
/* @__PURE__ */ a(
|
653
653
|
B,
|
654
654
|
{
|
@@ -656,11 +656,11 @@ const ar = ({
|
|
656
656
|
className: "mt-2",
|
657
657
|
label: "Show Message Statistics",
|
658
658
|
name: "show-message-statistics",
|
659
|
-
onChange:
|
660
|
-
checked:
|
659
|
+
onChange: Q,
|
660
|
+
checked: K
|
661
661
|
}
|
662
662
|
),
|
663
|
-
/* @__PURE__ */ a("p", { className: "text-sm mt-5", children:
|
663
|
+
/* @__PURE__ */ a("p", { className: "text-sm mt-5", children: R.SETTINGS_DETAILS.SEND_ON_ENTER }),
|
664
664
|
/* @__PURE__ */ a(
|
665
665
|
B,
|
666
666
|
{
|
@@ -668,35 +668,37 @@ const ar = ({
|
|
668
668
|
className: "mt-2",
|
669
669
|
label: "Send Message on Enter",
|
670
670
|
name: "send-message-on-enter",
|
671
|
-
onChange:
|
672
|
-
checked:
|
671
|
+
onChange: U,
|
672
|
+
checked: _
|
673
673
|
}
|
674
674
|
),
|
675
|
-
/* @__PURE__ */
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
675
|
+
H && /* @__PURE__ */ m(pe, { children: [
|
676
|
+
/* @__PURE__ */ a("p", { className: "text-sm mt-5", children: R.SETTINGS_DETAILS.USE_MEMORY }),
|
677
|
+
/* @__PURE__ */ a(
|
678
|
+
B,
|
679
|
+
{
|
680
|
+
narrow: !0,
|
681
|
+
className: "mt-2",
|
682
|
+
label: "Use Memory",
|
683
|
+
name: "use-memory",
|
684
|
+
onChange: Z,
|
685
|
+
checked: S
|
686
|
+
}
|
687
|
+
)
|
688
|
+
] })
|
687
689
|
]
|
688
690
|
}
|
689
691
|
),
|
690
|
-
/* @__PURE__ */
|
691
|
-
|
692
|
+
/* @__PURE__ */ m(
|
693
|
+
V,
|
692
694
|
{
|
693
695
|
header: "Custom Instructions",
|
694
696
|
className: "prose-dark dark:prose-lighter mt-4",
|
695
697
|
noBorder: !0,
|
696
698
|
children: [
|
697
|
-
/* @__PURE__ */
|
699
|
+
/* @__PURE__ */ m("p", { className: "text-sm", children: [
|
698
700
|
"What would you like ",
|
699
|
-
/* @__PURE__ */ a("em", { children:
|
701
|
+
/* @__PURE__ */ a("em", { children: ve }),
|
700
702
|
" to know about you to provide better responses?"
|
701
703
|
] }),
|
702
704
|
/* @__PURE__ */ a(
|
@@ -708,9 +710,9 @@ const ar = ({
|
|
708
710
|
autoCorrect: "off",
|
709
711
|
name: "customInstructions",
|
710
712
|
label: "Custom Instructions",
|
711
|
-
value:
|
713
|
+
value: v,
|
712
714
|
onChange: (t) => {
|
713
|
-
|
715
|
+
I(t.target.value);
|
714
716
|
},
|
715
717
|
helperText: "Press ENTER to add a new line."
|
716
718
|
}
|
@@ -718,8 +720,8 @@ const ar = ({
|
|
718
720
|
]
|
719
721
|
}
|
720
722
|
),
|
721
|
-
/* @__PURE__ */
|
722
|
-
|
723
|
+
/* @__PURE__ */ m(
|
724
|
+
V,
|
723
725
|
{
|
724
726
|
header: "Location",
|
725
727
|
className: "prose-dark dark:prose-lighter mt-4",
|
@@ -747,23 +749,23 @@ const ar = ({
|
|
747
749
|
noBorder: !0,
|
748
750
|
variant: "secondary",
|
749
751
|
disabled: h.loadingLocation,
|
750
|
-
onClick:
|
752
|
+
onClick: re,
|
751
753
|
children: h.loadingLocation ? "Detecting..." : "Auto-detect"
|
752
754
|
}
|
753
755
|
)
|
754
756
|
]
|
755
757
|
}
|
756
758
|
),
|
757
|
-
/* @__PURE__ */
|
758
|
-
|
759
|
+
/* @__PURE__ */ m(
|
760
|
+
V,
|
759
761
|
{
|
760
|
-
header:
|
762
|
+
header: R.SETTINGS_PROMPTS.TITLE,
|
761
763
|
className: "prose-dark dark:prose-lighter mt-4",
|
762
764
|
noBorder: !0,
|
763
765
|
children: [
|
764
|
-
/* @__PURE__ */ a("p", { className: "text-sm", children:
|
765
|
-
k.prompts && k.prompts.slice(0, 3).map((t) => /* @__PURE__ */
|
766
|
-
|
766
|
+
/* @__PURE__ */ a("p", { className: "text-sm", children: Se }),
|
767
|
+
k.prompts && k.prompts.slice(0, 3).map((t) => /* @__PURE__ */ m(
|
768
|
+
V,
|
767
769
|
{
|
768
770
|
mode: "dark",
|
769
771
|
noBorder: !0,
|
@@ -781,10 +783,10 @@ const ar = ({
|
|
781
783
|
noBorder: !0,
|
782
784
|
label: "Enabled",
|
783
785
|
name: t.slot.toString(),
|
784
|
-
onChange: (
|
785
|
-
|
786
|
+
onChange: (i) => {
|
787
|
+
$({
|
786
788
|
...t,
|
787
|
-
enabled:
|
789
|
+
enabled: i
|
788
790
|
});
|
789
791
|
},
|
790
792
|
checked: t.enabled
|
@@ -800,10 +802,10 @@ const ar = ({
|
|
800
802
|
noBorder: !0,
|
801
803
|
label: "Private Chat",
|
802
804
|
name: `private-${t.slot.toString()}`,
|
803
|
-
onChange: (
|
804
|
-
|
805
|
+
onChange: (i) => {
|
806
|
+
$({
|
805
807
|
...t,
|
806
|
-
privateChat:
|
808
|
+
privateChat: i
|
807
809
|
});
|
808
810
|
},
|
809
811
|
checked: t.privateChat
|
@@ -819,10 +821,10 @@ const ar = ({
|
|
819
821
|
noBorder: !0,
|
820
822
|
label: "Use Clipboard",
|
821
823
|
name: `clipboard-${t.slot.toString()}`,
|
822
|
-
onChange: (
|
823
|
-
|
824
|
+
onChange: (i) => {
|
825
|
+
$({
|
824
826
|
...t,
|
825
|
-
clipboardAccess:
|
827
|
+
clipboardAccess: i
|
826
828
|
});
|
827
829
|
},
|
828
830
|
checked: t.clipboardAccess
|
@@ -835,14 +837,14 @@ const ar = ({
|
|
835
837
|
]
|
836
838
|
}
|
837
839
|
),
|
838
|
-
/* @__PURE__ */
|
839
|
-
|
840
|
+
/* @__PURE__ */ m(
|
841
|
+
V,
|
840
842
|
{
|
841
|
-
header:
|
843
|
+
header: R.SETTINGS_CACHING.TITLE,
|
842
844
|
className: "prose-dark dark:prose-lighter mt-4 ",
|
843
845
|
noBorder: !0,
|
844
846
|
children: [
|
845
|
-
/* @__PURE__ */ a("p", { className: "text-sm", children:
|
847
|
+
/* @__PURE__ */ a("p", { className: "text-sm", children: R.SETTINGS_CACHING.DESCRIPTION }),
|
846
848
|
/* @__PURE__ */ a(
|
847
849
|
B,
|
848
850
|
{
|
@@ -850,32 +852,32 @@ const ar = ({
|
|
850
852
|
className: "mt-2",
|
851
853
|
label: "Enable Assets Caching",
|
852
854
|
name: "enable-service-worker",
|
853
|
-
onChange:
|
854
|
-
checked:
|
855
|
+
onChange: ee,
|
856
|
+
checked: G
|
855
857
|
}
|
856
858
|
),
|
857
|
-
L && /* @__PURE__ */
|
859
|
+
L && /* @__PURE__ */ m("div", { className: "mt-4 p-3 border border-dashed border-neutral-700 dark:border-neutral-400 rounded @container/optimizations", children: [
|
858
860
|
/* @__PURE__ */ a("h3", { className: "m-0 mb-2 text-xs uppercase opacity-70", children: "Cache Info" }),
|
859
|
-
p ? /* @__PURE__ */
|
860
|
-
/* @__PURE__ */
|
861
|
+
p ? /* @__PURE__ */ m("div", { className: "text-xs space-y-2", children: [
|
862
|
+
/* @__PURE__ */ m("p", { className: "m-0", children: [
|
861
863
|
"Version: ",
|
862
864
|
/* @__PURE__ */ a("strong", { children: p.version })
|
863
865
|
] }),
|
864
|
-
/* @__PURE__ */
|
866
|
+
/* @__PURE__ */ m("p", { className: "m-0", children: [
|
865
867
|
"Total Items: ",
|
866
868
|
/* @__PURE__ */ a("strong", { children: p.totalItems })
|
867
869
|
] }),
|
868
|
-
p.caches.map((t) => /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("ul", { className: "not-prose font-mono mt-2 list-none w-[95cqw]", children: t.urls.map((
|
870
|
+
p.caches.map((t) => /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("ul", { className: "not-prose font-mono mt-2 list-none w-[95cqw]", children: t.urls.map((i) => /* @__PURE__ */ a(
|
869
871
|
"li",
|
870
872
|
{
|
871
873
|
className: "truncate text-xs text-copy-dark dark:text-copy-light overflow-hidden text-ellipsis",
|
872
|
-
title:
|
873
|
-
children: new URL(
|
874
|
+
title: i,
|
875
|
+
children: new URL(i).pathname
|
874
876
|
},
|
875
|
-
|
877
|
+
i
|
876
878
|
)) }) }, t.name)),
|
877
|
-
p.totalItems === 0 && !
|
878
|
-
] }) : /* @__PURE__ */ a("p", { className: "text-xs opacity-70 m-0", children:
|
879
|
+
p.totalItems === 0 && !J && /* @__PURE__ */ a("p", { className: "italic m-0 opacity-70", children: "No cached assets yet." })
|
880
|
+
] }) : /* @__PURE__ */ a("p", { className: "text-xs opacity-70 m-0", children: J ? "Loading cache info..." : "No cache info available." })
|
879
881
|
] })
|
880
882
|
]
|
881
883
|
}
|
@@ -885,5 +887,5 @@ const ar = ({
|
|
885
887
|
) : null;
|
886
888
|
};
|
887
889
|
export {
|
888
|
-
|
890
|
+
lr as SettingsPanel
|
889
891
|
};
|