@versini/sassysaint 5.4.13 → 5.4.15
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/{LazyApp.DNOGYuzJ.js → LazyApp.CmWxSgb_.js} +398 -387
- package/dist/chunks/{LazyHeader.oCAx75zT.js → LazyHeader.CmyI3orp.js} +123 -117
- package/dist/chunks/{LazyMarkdownWithExtra.F2tZ4gOI.js → LazyMarkdownWithExtra.bTU0zWSE.js} +747 -739
- package/dist/chunks/{LazyMessageAssistant.L4L_m5nw.js → LazyMessageAssistant.BkIqe55j.js} +11 -11
- package/dist/chunks/{index.CxzLMGVa.js → index.D8QVMbN9.js} +764 -855
- package/dist/chunks/{index.Ck3nAtox.js → index.Dn9p043U.js} +339 -303
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { g as we, ACTION_RESTORE as Ne, ACTION_MESSAGE as S, ROLE_ASSISTANT as E, ACTION_RESET as ie, ACTION_MODEL as de, ACTION_ENGINE as
|
|
3
|
-
import {
|
|
4
|
-
import C, {
|
|
1
|
+
import { jsx as s, jsxs as v, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import { g as we, ACTION_RESTORE as Ne, ACTION_MESSAGE as S, ROLE_ASSISTANT as E, ACTION_RESET as ie, ACTION_MODEL as de, ACTION_ENGINE as se, ACTION_STREAMING as ne, ACTION_SORT as Ie, ACTION_SEARCH as Ee, ACTION_SET_TAGS as le, ACTION_RESET_TAGS as ce, ACTION_TOGGLE_TAG as ge, ROLE_INTERNAL as H, ROLE_USER as G, isLastMessageFromRole as me, un as z, getMessageContaintWrapperClass as Ce, MessagesContainerHeader as Se, ROLE_SYSTEM as Re, ROLE_HIDDEN as Be, DEFAULT_AI_ENGINE as M, STATS_SEPARATOR as Y, CLIPBOARD_TAG as q, TYPE_QUESTION as Ae, C as ue, SEND as Me, ERROR_MESSAGE as Le, L as Oe, j as ze, O as Ue, TOOLBOX as X, _ as Ve, LOCAL_STORAGE_PREFIX as J, LOCAL_STORAGE_SEARCH as De, LOCAL_STORAGE_SORT as $e } from "./index.D8QVMbN9.js";
|
|
3
|
+
import { AppContext as U, TagsContext as j, restCall as Ge, Le as He, serviceCall as he, SERVICE_TYPES as be, h as je, E as Q, HistoryContext as Pe, f as We } from "./index.Dn9p043U.js";
|
|
4
|
+
import C, { useState as A, useEffect as _, lazy as Fe, useContext as R, Suspense as Z, useRef as B, useReducer as D } from "react";
|
|
5
5
|
import d from "clsx";
|
|
6
|
-
const
|
|
6
|
+
const Ke = ({
|
|
7
7
|
className: e,
|
|
8
8
|
viewBox: t,
|
|
9
9
|
title: r,
|
|
10
10
|
monotone: a,
|
|
11
11
|
...o
|
|
12
|
-
}) => /* @__PURE__ */
|
|
12
|
+
}) => /* @__PURE__ */ s(
|
|
13
13
|
we,
|
|
14
14
|
{
|
|
15
15
|
defaultViewBox: "0 0 384 512",
|
|
@@ -18,10 +18,10 @@ const Ye = ({
|
|
|
18
18
|
className: e,
|
|
19
19
|
title: r || "Close",
|
|
20
20
|
...o,
|
|
21
|
-
children: /* @__PURE__ */
|
|
21
|
+
children: /* @__PURE__ */ s("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4z" })
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
|
-
function
|
|
24
|
+
function Ye(e) {
|
|
25
25
|
const t = e.toLowerCase().split("+").map((i) => i.trim()), r = {
|
|
26
26
|
alt: t.includes("alt"),
|
|
27
27
|
ctrl: t.includes("ctrl"),
|
|
@@ -34,53 +34,53 @@ function qe(e) {
|
|
|
34
34
|
key: o
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const { alt: r, ctrl: a, meta: o, mod: i, shift: g, key:
|
|
39
|
-
if (r !==
|
|
37
|
+
function qe(e, t) {
|
|
38
|
+
const { alt: r, ctrl: a, meta: o, mod: i, shift: g, key: l } = e, { altKey: m, ctrlKey: u, metaKey: b, shiftKey: h, key: c } = t;
|
|
39
|
+
if (r !== m)
|
|
40
40
|
return !1;
|
|
41
41
|
if (i) {
|
|
42
|
-
if (!
|
|
42
|
+
if (!u && !b)
|
|
43
43
|
return !1;
|
|
44
|
-
} else if (a !==
|
|
44
|
+
} else if (a !== u || o !== b)
|
|
45
45
|
return !1;
|
|
46
|
-
return g !== h ? !1 : !!(
|
|
46
|
+
return g !== h ? !1 : !!(l && (c.toLowerCase() === l.toLowerCase() || t.code.replace("Key", "").toLowerCase() === l.toLowerCase()));
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return (t) =>
|
|
48
|
+
function Xe(e) {
|
|
49
|
+
return (t) => qe(Ye(e), t);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Je(e) {
|
|
52
52
|
return (t) => {
|
|
53
53
|
const r = "nativeEvent" in t ? t.nativeEvent : t;
|
|
54
54
|
e.forEach(([a, o, i = { preventDefault: !0 }]) => {
|
|
55
|
-
|
|
55
|
+
Xe(a)(r) && (i.preventDefault && t.preventDefault(), o(r));
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
const y = [];
|
|
60
60
|
for (let e = 0; e < 256; ++e)
|
|
61
61
|
y.push((e + 256).toString(16).slice(1));
|
|
62
|
-
function
|
|
62
|
+
function Qe(e, t = 0) {
|
|
63
63
|
return (y[e[t + 0]] + y[e[t + 1]] + y[e[t + 2]] + y[e[t + 3]] + "-" + y[e[t + 4]] + y[e[t + 5]] + "-" + y[e[t + 6]] + y[e[t + 7]] + "-" + y[e[t + 8]] + y[e[t + 9]] + "-" + y[e[t + 10]] + y[e[t + 11]] + y[e[t + 12]] + y[e[t + 13]] + y[e[t + 14]] + y[e[t + 15]]).toLowerCase();
|
|
64
64
|
}
|
|
65
65
|
let $;
|
|
66
|
-
const
|
|
67
|
-
function
|
|
66
|
+
const Ze = new Uint8Array(16);
|
|
67
|
+
function et() {
|
|
68
68
|
if (!$) {
|
|
69
69
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
70
70
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
71
71
|
$ = crypto.getRandomValues.bind(crypto);
|
|
72
72
|
}
|
|
73
|
-
return $(
|
|
73
|
+
return $(Ze);
|
|
74
74
|
}
|
|
75
|
-
const
|
|
76
|
-
function
|
|
75
|
+
const tt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ee = { randomUUID: tt };
|
|
76
|
+
function P(e, t, r) {
|
|
77
77
|
if (ee.randomUUID && !t && !e)
|
|
78
78
|
return ee.randomUUID();
|
|
79
79
|
e = e || {};
|
|
80
|
-
const a = e.random || (e.rng ||
|
|
81
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
80
|
+
const a = e.random || (e.rng || et)();
|
|
81
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Qe(a);
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const rt = (e, t) => {
|
|
84
84
|
if ((t == null ? void 0 : t.type) === Ne) {
|
|
85
85
|
const r = t.payload.messages.map((a) => ({
|
|
86
86
|
message: {
|
|
@@ -103,7 +103,7 @@ const at = (e, t) => {
|
|
|
103
103
|
if ((t == null ? void 0 : t.type) === S) {
|
|
104
104
|
const r = t.payload.message.role, a = t.payload.message.content, o = t.payload.message.name, i = t.payload.message.processingTime, g = t.payload.message.messageId;
|
|
105
105
|
if (r !== "") {
|
|
106
|
-
const
|
|
106
|
+
const l = {
|
|
107
107
|
role: r,
|
|
108
108
|
content: a,
|
|
109
109
|
name: o,
|
|
@@ -111,11 +111,11 @@ const at = (e, t) => {
|
|
|
111
111
|
messageId: g
|
|
112
112
|
};
|
|
113
113
|
if (r === E) {
|
|
114
|
-
const
|
|
115
|
-
(
|
|
114
|
+
const m = e.messages.findIndex(
|
|
115
|
+
(u) => u.message.messageId === g
|
|
116
116
|
);
|
|
117
|
-
if (
|
|
118
|
-
const
|
|
117
|
+
if (m !== -1) {
|
|
118
|
+
const u = e.messages.map((b, h) => h === m ? {
|
|
119
119
|
message: {
|
|
120
120
|
...b.message,
|
|
121
121
|
content: `${b.message.content}${a}`,
|
|
@@ -128,7 +128,7 @@ const at = (e, t) => {
|
|
|
128
128
|
model: e.model,
|
|
129
129
|
usage: e.usage,
|
|
130
130
|
isComponent: e.isComponent,
|
|
131
|
-
messages:
|
|
131
|
+
messages: u,
|
|
132
132
|
engine: e.engine,
|
|
133
133
|
tags: e.tags
|
|
134
134
|
};
|
|
@@ -144,14 +144,14 @@ const at = (e, t) => {
|
|
|
144
144
|
messages: [
|
|
145
145
|
...e.messages,
|
|
146
146
|
{
|
|
147
|
-
message:
|
|
147
|
+
message: l
|
|
148
148
|
}
|
|
149
149
|
]
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
return (t == null ? void 0 : t.type) === ie ? {
|
|
154
|
-
id:
|
|
154
|
+
id: P(),
|
|
155
155
|
model: e.model,
|
|
156
156
|
engine: e.engine,
|
|
157
157
|
usage: 0,
|
|
@@ -166,14 +166,14 @@ const at = (e, t) => {
|
|
|
166
166
|
usage: t.payload.usage,
|
|
167
167
|
messages: e.messages,
|
|
168
168
|
isComponent: e.isComponent
|
|
169
|
-
} : (t == null ? void 0 : t.type) ===
|
|
169
|
+
} : (t == null ? void 0 : t.type) === se ? {
|
|
170
170
|
...e,
|
|
171
171
|
engine: t.payload.engine
|
|
172
|
-
} : (t == null ? void 0 : t.type) ===
|
|
172
|
+
} : (t == null ? void 0 : t.type) === ne ? {
|
|
173
173
|
...e,
|
|
174
174
|
streaming: t.payload.streaming
|
|
175
175
|
} : e;
|
|
176
|
-
},
|
|
176
|
+
}, at = (e, t) => {
|
|
177
177
|
switch (t == null ? void 0 : t.type) {
|
|
178
178
|
case Ee:
|
|
179
179
|
return {
|
|
@@ -190,19 +190,19 @@ const at = (e, t) => {
|
|
|
190
190
|
default:
|
|
191
191
|
return e;
|
|
192
192
|
}
|
|
193
|
-
},
|
|
193
|
+
}, ot = (e, t) => {
|
|
194
194
|
switch (t == null ? void 0 : t.type) {
|
|
195
195
|
case ge:
|
|
196
196
|
return {
|
|
197
197
|
tags: e.tags,
|
|
198
198
|
tag: t.payload.tag
|
|
199
199
|
};
|
|
200
|
-
case
|
|
200
|
+
case ce:
|
|
201
201
|
return {
|
|
202
202
|
tags: e.tags,
|
|
203
203
|
tag: ""
|
|
204
204
|
};
|
|
205
|
-
case
|
|
205
|
+
case le:
|
|
206
206
|
return {
|
|
207
207
|
tags: t.payload.tags,
|
|
208
208
|
tag: ""
|
|
@@ -210,112 +210,40 @@ const at = (e, t) => {
|
|
|
210
210
|
default:
|
|
211
211
|
return e;
|
|
212
212
|
}
|
|
213
|
-
}, dt = () => {
|
|
214
|
-
const { dispatch: e, state: t } = R(z), { dispatch: r, state: a } = R(H), { getAccessToken: o, user: i } = U(), [g, c] = M({
|
|
215
|
-
loaded: !1
|
|
216
|
-
}), u = "mt-2 flex justify-center rounded-md", m = B(null), b = B(!1), h = (s) => {
|
|
217
|
-
s.preventDefault(), e({
|
|
218
|
-
type: ie
|
|
219
|
-
});
|
|
220
|
-
};
|
|
221
|
-
_(() => {
|
|
222
|
-
var s;
|
|
223
|
-
(t == null ? void 0 : t.streaming) === !0 && !b.current && m.current && (b.current = !0, m.current.focus()), (t == null ? void 0 : t.streaming) === !1 && (b.current = !1, (s = m.current) == null || s.blur());
|
|
224
|
-
}, [t]);
|
|
225
|
-
const l = (s, p) => {
|
|
226
|
-
s.preventDefault(), r({
|
|
227
|
-
type: ge,
|
|
228
|
-
payload: {
|
|
229
|
-
tag: p
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
};
|
|
233
|
-
return _(() => {
|
|
234
|
-
if (!i) {
|
|
235
|
-
c({
|
|
236
|
-
loaded: !1
|
|
237
|
-
});
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
240
|
-
g.loaded || (async () => {
|
|
241
|
-
try {
|
|
242
|
-
const s = await he({
|
|
243
|
-
accessToken: await o(),
|
|
244
|
-
type: be.GET_USER_PREFERENCES,
|
|
245
|
-
params: {
|
|
246
|
-
user: i.username
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
s.status === 200 && (r({
|
|
250
|
-
type: ce,
|
|
251
|
-
payload: {
|
|
252
|
-
tags: s.data.tags || []
|
|
253
|
-
}
|
|
254
|
-
}), c({
|
|
255
|
-
loaded: !0
|
|
256
|
-
}));
|
|
257
|
-
} catch {
|
|
258
|
-
}
|
|
259
|
-
})();
|
|
260
|
-
}, [i]), /* @__PURE__ */ v(O, { children: [
|
|
261
|
-
/* @__PURE__ */ n(Ce, { alignHorizontal: "center", columnGap: 2, children: g && g.loaded && a.tags && a.tags.map((s) => s.enabled && s.label && s.content && /* @__PURE__ */ n(Se, { children: /* @__PURE__ */ n("div", { className: u, children: /* @__PURE__ */ n(
|
|
262
|
-
ue,
|
|
263
|
-
{
|
|
264
|
-
noBorder: !0,
|
|
265
|
-
mode: "dark",
|
|
266
|
-
focusMode: "light",
|
|
267
|
-
size: "small",
|
|
268
|
-
onClick: (p) => l(p, s.content),
|
|
269
|
-
children: s.label
|
|
270
|
-
}
|
|
271
|
-
) }) }, `tag-button-${s.slot}`)) }),
|
|
272
|
-
me(E, t) && /* @__PURE__ */ n("div", { className: u, children: /* @__PURE__ */ n(
|
|
273
|
-
Re,
|
|
274
|
-
{
|
|
275
|
-
noBorder: !0,
|
|
276
|
-
mode: "dark",
|
|
277
|
-
focusMode: "light",
|
|
278
|
-
ref: m,
|
|
279
|
-
onClick: h,
|
|
280
|
-
labelRight: t != null && t.streaming ? Y.ACTION_WHILE_STREAMING.content : Y.ACTION_WHILE_NOT_STREAMING.content,
|
|
281
|
-
children: t != null && t.streaming ? /* @__PURE__ */ n(Ye, { size: "size-4" }) : /* @__PURE__ */ n(Pe, { size: "size-4" })
|
|
282
|
-
}
|
|
283
|
-
) })
|
|
284
|
-
] });
|
|
285
213
|
};
|
|
286
214
|
/*!
|
|
287
|
-
@versini/ui-bubble v2.0.
|
|
215
|
+
@versini/ui-bubble v2.0.11
|
|
288
216
|
© 2024 gizmette.com
|
|
289
217
|
*/
|
|
290
218
|
try {
|
|
291
219
|
window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
|
|
292
|
-
version: "2.0.
|
|
293
|
-
buildTime: "12/
|
|
220
|
+
version: "2.0.11",
|
|
221
|
+
buildTime: "12/31/2024 09:02 AM EST",
|
|
294
222
|
homepage: "https://github.com/aversini/ui-components",
|
|
295
223
|
license: "MIT"
|
|
296
224
|
});
|
|
297
225
|
} catch {
|
|
298
226
|
}
|
|
299
|
-
const
|
|
227
|
+
const it = "av-bubble", te = "av-button", W = "icon", dt = "button", st = "link", nt = ({
|
|
300
228
|
type: e,
|
|
301
229
|
size: t,
|
|
302
230
|
labelRight: r,
|
|
303
231
|
labelLeft: a,
|
|
304
232
|
align: o
|
|
305
233
|
}) => {
|
|
306
|
-
const i = "text-sm font-medium max-h-8 py-0", g = "text-base font-medium max-h-9 py-1",
|
|
234
|
+
const i = "text-sm font-medium max-h-8 py-0 px-2", g = "text-base font-medium max-h-9 py-1 px-3", l = "text-lg font-medium max-h-12 py-2 px-4";
|
|
307
235
|
switch (e) {
|
|
308
|
-
case
|
|
309
|
-
return d(
|
|
236
|
+
case dt:
|
|
237
|
+
return d({
|
|
310
238
|
[i]: t === "small",
|
|
311
239
|
[g]: t === "medium",
|
|
312
|
-
[
|
|
240
|
+
[l]: t === "large"
|
|
313
241
|
});
|
|
314
|
-
case
|
|
315
|
-
return d("
|
|
242
|
+
case st:
|
|
243
|
+
return d("text-center", {
|
|
316
244
|
[i]: t === "small",
|
|
317
245
|
[g]: t === "medium",
|
|
318
|
-
[
|
|
246
|
+
[l]: t === "large"
|
|
319
247
|
});
|
|
320
248
|
case W:
|
|
321
249
|
return d("inline-flex items-center", {
|
|
@@ -323,14 +251,14 @@ const nt = "av-bubble", te = "av-button", W = "icon", st = "button", ct = "link"
|
|
|
323
251
|
"justify-start": o === "left",
|
|
324
252
|
"justify-end": o === "right",
|
|
325
253
|
"h-6 w-6 p-0": t === "small" && !(r || a),
|
|
326
|
-
"h-6 px-
|
|
254
|
+
"h-6 px-2 text-sm font-medium": t === "small" && (r || a),
|
|
327
255
|
"h-8 w-8 p-1": t === "medium" && !(r || a),
|
|
328
|
-
"h-8 px-
|
|
256
|
+
"h-8 px-3 text-base font-medium": t === "medium" && (r || a),
|
|
329
257
|
"h-12 w-12 p-2": t === "large" && !(r || a),
|
|
330
258
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
331
259
|
});
|
|
332
260
|
}
|
|
333
|
-
},
|
|
261
|
+
}, lt = ({
|
|
334
262
|
mode: e,
|
|
335
263
|
noBackground: t,
|
|
336
264
|
noTruncate: r,
|
|
@@ -387,7 +315,7 @@ const nt = "av-bubble", te = "av-button", W = "icon", st = "button", ct = "link"
|
|
|
387
315
|
"bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
|
|
388
316
|
"bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
|
|
389
317
|
});
|
|
390
|
-
},
|
|
318
|
+
}, ct = ({
|
|
391
319
|
mode: e,
|
|
392
320
|
disabled: t,
|
|
393
321
|
variant: r
|
|
@@ -422,7 +350,7 @@ const nt = "av-bubble", te = "av-button", W = "icon", st = "button", ct = "link"
|
|
|
422
350
|
"hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
|
|
423
351
|
"hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
|
|
424
352
|
});
|
|
425
|
-
},
|
|
353
|
+
}, gt = ({
|
|
426
354
|
mode: e,
|
|
427
355
|
disabled: t,
|
|
428
356
|
variant: r
|
|
@@ -457,7 +385,7 @@ const nt = "av-bubble", te = "av-button", W = "icon", st = "button", ct = "link"
|
|
|
457
385
|
"active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
|
|
458
386
|
"active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
|
|
459
387
|
});
|
|
460
|
-
},
|
|
388
|
+
}, mt = ({
|
|
461
389
|
mode: e,
|
|
462
390
|
noBorder: t,
|
|
463
391
|
variant: r
|
|
@@ -492,7 +420,7 @@ const nt = "av-bubble", te = "av-button", W = "icon", st = "button", ct = "link"
|
|
|
492
420
|
"border-border-selected-dark dark:border-border-selected-medium": e === "system",
|
|
493
421
|
"border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
|
|
494
422
|
});
|
|
495
|
-
},
|
|
423
|
+
}, ut = ({
|
|
496
424
|
focusMode: e
|
|
497
425
|
}) => d("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
498
426
|
"focus:outline-focus-dark": e === "dark",
|
|
@@ -507,45 +435,51 @@ const nt = "av-bubble", te = "av-button", W = "icon", st = "button", ct = "link"
|
|
|
507
435
|
focusMode: o,
|
|
508
436
|
disabled: i,
|
|
509
437
|
fullWidth: g,
|
|
510
|
-
size:
|
|
511
|
-
noBorder:
|
|
512
|
-
labelRight:
|
|
438
|
+
size: l,
|
|
439
|
+
noBorder: m,
|
|
440
|
+
labelRight: u,
|
|
513
441
|
labelLeft: b,
|
|
514
442
|
noBackground: h,
|
|
515
|
-
variant:
|
|
516
|
-
noTruncate:
|
|
443
|
+
variant: c,
|
|
444
|
+
noTruncate: n,
|
|
517
445
|
align: p,
|
|
518
446
|
radius: f
|
|
519
|
-
}) => (
|
|
447
|
+
}) => (c || (c = "primary"), r ? d(te, t) : d(
|
|
520
448
|
te,
|
|
521
|
-
|
|
449
|
+
lt({
|
|
522
450
|
mode: a,
|
|
523
|
-
variant:
|
|
451
|
+
variant: c,
|
|
524
452
|
noBackground: h,
|
|
525
|
-
noTruncate:
|
|
453
|
+
noTruncate: n,
|
|
526
454
|
radius: f
|
|
527
455
|
}),
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
456
|
+
nt({
|
|
457
|
+
type: e,
|
|
458
|
+
size: l,
|
|
459
|
+
labelRight: u,
|
|
460
|
+
labelLeft: b,
|
|
461
|
+
align: p
|
|
462
|
+
}),
|
|
463
|
+
mt({ mode: a, variant: c, noBorder: m }),
|
|
464
|
+
ut({ focusMode: o }),
|
|
465
|
+
ct({ mode: a, variant: c, disabled: i }),
|
|
466
|
+
gt({ mode: a, variant: c, disabled: i }),
|
|
533
467
|
{
|
|
534
468
|
"w-full": g,
|
|
535
469
|
"disabled:cursor-not-allowed disabled:opacity-50": i
|
|
536
470
|
},
|
|
537
471
|
t
|
|
538
|
-
)),
|
|
472
|
+
)), ht = (e, t, r) => {
|
|
539
473
|
var a;
|
|
540
474
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
541
475
|
}, F = C.forwardRef((e, t) => {
|
|
542
476
|
const { onClick: r, noInternalClick: a = !1, ...o } = e;
|
|
543
|
-
return /* @__PURE__ */
|
|
477
|
+
return /* @__PURE__ */ s(
|
|
544
478
|
"button",
|
|
545
479
|
{
|
|
546
480
|
ref: t,
|
|
547
481
|
onClick: (i) => {
|
|
548
|
-
|
|
482
|
+
ht(i, a, r);
|
|
549
483
|
},
|
|
550
484
|
...o
|
|
551
485
|
}
|
|
@@ -561,13 +495,13 @@ const ye = C.forwardRef(
|
|
|
561
495
|
fullWidth: o = !1,
|
|
562
496
|
className: i,
|
|
563
497
|
type: g = "button",
|
|
564
|
-
raw:
|
|
565
|
-
noBorder:
|
|
566
|
-
"aria-label":
|
|
498
|
+
raw: l = !1,
|
|
499
|
+
noBorder: m = !1,
|
|
500
|
+
"aria-label": u,
|
|
567
501
|
label: b,
|
|
568
502
|
size: h = "medium",
|
|
569
|
-
labelRight:
|
|
570
|
-
labelLeft:
|
|
503
|
+
labelRight: c,
|
|
504
|
+
labelLeft: n,
|
|
571
505
|
noBackground: p = !1,
|
|
572
506
|
align: f = "center",
|
|
573
507
|
radius: w = "large",
|
|
@@ -579,20 +513,20 @@ const ye = C.forwardRef(
|
|
|
579
513
|
focusMode: a,
|
|
580
514
|
fullWidth: o,
|
|
581
515
|
disabled: t,
|
|
582
|
-
raw:
|
|
516
|
+
raw: l,
|
|
583
517
|
className: i,
|
|
584
|
-
noBorder:
|
|
518
|
+
noBorder: m,
|
|
585
519
|
size: h,
|
|
586
|
-
labelRight:
|
|
587
|
-
labelLeft:
|
|
520
|
+
labelRight: c,
|
|
521
|
+
labelLeft: n,
|
|
588
522
|
noBackground: p,
|
|
589
523
|
align: f,
|
|
590
524
|
radius: w
|
|
591
525
|
}), I = d({
|
|
592
|
-
"text-copy-accent-dark": r === "light" && !
|
|
593
|
-
"text-copy-light": r === "dark" && !
|
|
594
|
-
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !
|
|
595
|
-
"text-copy-light dark:text-copy-accent-dark": r === "system" && !
|
|
526
|
+
"text-copy-accent-dark": r === "light" && !l,
|
|
527
|
+
"text-copy-light": r === "dark" && !l,
|
|
528
|
+
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !l,
|
|
529
|
+
"text-copy-light dark:text-copy-accent-dark": r === "system" && !l
|
|
596
530
|
});
|
|
597
531
|
return /* @__PURE__ */ v(
|
|
598
532
|
F,
|
|
@@ -601,12 +535,12 @@ const ye = C.forwardRef(
|
|
|
601
535
|
className: x,
|
|
602
536
|
disabled: t,
|
|
603
537
|
type: g,
|
|
604
|
-
"aria-label":
|
|
538
|
+
"aria-label": u || b,
|
|
605
539
|
...N,
|
|
606
540
|
children: [
|
|
607
|
-
|
|
608
|
-
/* @__PURE__ */
|
|
609
|
-
|
|
541
|
+
n && /* @__PURE__ */ s("span", { className: "pr-2", children: n }),
|
|
542
|
+
/* @__PURE__ */ s("div", { className: I, children: e }),
|
|
543
|
+
c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
|
|
610
544
|
]
|
|
611
545
|
}
|
|
612
546
|
);
|
|
@@ -614,19 +548,19 @@ const ye = C.forwardRef(
|
|
|
614
548
|
);
|
|
615
549
|
ye.displayName = "ButtonIcon";
|
|
616
550
|
/*!
|
|
617
|
-
@versini/ui-button v3.0
|
|
551
|
+
@versini/ui-button v3.2.0
|
|
618
552
|
© 2024 gizmette.com
|
|
619
553
|
*/
|
|
620
554
|
try {
|
|
621
555
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
622
|
-
version: "3.0
|
|
623
|
-
buildTime: "12/
|
|
556
|
+
version: "3.2.0",
|
|
557
|
+
buildTime: "12/31/2024 09:01 AM EST",
|
|
624
558
|
homepage: "https://github.com/aversini/ui-components",
|
|
625
559
|
license: "MIT"
|
|
626
560
|
});
|
|
627
561
|
} catch {
|
|
628
562
|
}
|
|
629
|
-
const
|
|
563
|
+
const bt = C.forwardRef(
|
|
630
564
|
({
|
|
631
565
|
children: e,
|
|
632
566
|
disabled: t = !1,
|
|
@@ -635,13 +569,13 @@ const yt = C.forwardRef(
|
|
|
635
569
|
fullWidth: o = !1,
|
|
636
570
|
className: i,
|
|
637
571
|
type: g = "button",
|
|
638
|
-
raw:
|
|
639
|
-
noBorder:
|
|
640
|
-
"aria-label":
|
|
572
|
+
raw: l = !1,
|
|
573
|
+
noBorder: m = !1,
|
|
574
|
+
"aria-label": u,
|
|
641
575
|
label: b,
|
|
642
576
|
size: h = "medium",
|
|
643
|
-
labelRight:
|
|
644
|
-
labelLeft:
|
|
577
|
+
labelRight: c,
|
|
578
|
+
labelLeft: n,
|
|
645
579
|
noBackground: p = !1,
|
|
646
580
|
align: f = "center",
|
|
647
581
|
active: w = !1,
|
|
@@ -654,20 +588,20 @@ const yt = C.forwardRef(
|
|
|
654
588
|
focusMode: a,
|
|
655
589
|
fullWidth: o,
|
|
656
590
|
disabled: t,
|
|
657
|
-
raw:
|
|
591
|
+
raw: l,
|
|
658
592
|
className: i,
|
|
659
|
-
noBorder:
|
|
593
|
+
noBorder: m,
|
|
660
594
|
size: h,
|
|
661
|
-
labelRight:
|
|
662
|
-
labelLeft:
|
|
595
|
+
labelRight: c,
|
|
596
|
+
labelLeft: n,
|
|
663
597
|
noBackground: p,
|
|
664
598
|
align: f,
|
|
665
599
|
radius: N
|
|
666
600
|
}), T = d({
|
|
667
|
-
"text-copy-accent-dark": r === "light" && !
|
|
668
|
-
"text-copy-light": r === "dark" && !
|
|
669
|
-
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !
|
|
670
|
-
"text-copy-light dark:text-copy-accent-dark": r === "system" && !
|
|
601
|
+
"text-copy-accent-dark": r === "light" && !l,
|
|
602
|
+
"text-copy-light": r === "dark" && !l,
|
|
603
|
+
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !l,
|
|
604
|
+
"text-copy-light dark:text-copy-accent-dark": r === "system" && !l
|
|
671
605
|
}), V = w ? d(
|
|
672
606
|
"relative",
|
|
673
607
|
"focus-within:static",
|
|
@@ -685,25 +619,25 @@ const yt = C.forwardRef(
|
|
|
685
619
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
686
620
|
}
|
|
687
621
|
) : "";
|
|
688
|
-
return /* @__PURE__ */
|
|
622
|
+
return /* @__PURE__ */ s("div", { className: V, children: /* @__PURE__ */ v(
|
|
689
623
|
F,
|
|
690
624
|
{
|
|
691
625
|
ref: x,
|
|
692
626
|
className: I,
|
|
693
627
|
disabled: t,
|
|
694
628
|
type: g,
|
|
695
|
-
"aria-label":
|
|
629
|
+
"aria-label": u || b,
|
|
696
630
|
...k,
|
|
697
631
|
children: [
|
|
698
|
-
|
|
699
|
-
/* @__PURE__ */
|
|
700
|
-
|
|
632
|
+
n && /* @__PURE__ */ s("span", { className: "pr-2", children: n }),
|
|
633
|
+
/* @__PURE__ */ s("div", { className: T, children: e }),
|
|
634
|
+
c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
|
|
701
635
|
]
|
|
702
636
|
}
|
|
703
637
|
) });
|
|
704
638
|
}
|
|
705
639
|
);
|
|
706
|
-
|
|
640
|
+
bt.displayName = "ButtonSort";
|
|
707
641
|
const fe = ({
|
|
708
642
|
children: e,
|
|
709
643
|
fill: t,
|
|
@@ -712,42 +646,42 @@ const fe = ({
|
|
|
712
646
|
defaultViewBox: o,
|
|
713
647
|
size: i,
|
|
714
648
|
title: g,
|
|
715
|
-
semantic:
|
|
716
|
-
...
|
|
649
|
+
semantic: l = !1,
|
|
650
|
+
...m
|
|
717
651
|
}) => {
|
|
718
|
-
const
|
|
652
|
+
const u = d(i, a);
|
|
719
653
|
return /* @__PURE__ */ v(O, { children: [
|
|
720
|
-
/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ s(
|
|
721
655
|
"svg",
|
|
722
656
|
{
|
|
723
657
|
xmlns: "http://www.w3.org/2000/svg",
|
|
724
|
-
className:
|
|
658
|
+
className: u,
|
|
725
659
|
viewBox: r || o,
|
|
726
660
|
fill: t || "currentColor",
|
|
727
661
|
role: "img",
|
|
728
|
-
"aria-hidden": !
|
|
662
|
+
"aria-hidden": !l,
|
|
729
663
|
focusable: !1,
|
|
730
|
-
...
|
|
664
|
+
...m,
|
|
731
665
|
children: e
|
|
732
666
|
}
|
|
733
667
|
),
|
|
734
|
-
g &&
|
|
668
|
+
g && l && /* @__PURE__ */ s("span", { className: "sr-only", children: g })
|
|
735
669
|
] });
|
|
736
670
|
};
|
|
737
671
|
/*!
|
|
738
|
-
@versini/ui-svgicon v3.0.
|
|
672
|
+
@versini/ui-svgicon v3.0.2
|
|
739
673
|
© 2024 gizmette.com
|
|
740
674
|
*/
|
|
741
675
|
try {
|
|
742
676
|
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
743
|
-
version: "3.0.
|
|
744
|
-
buildTime: "12/
|
|
677
|
+
version: "3.0.2",
|
|
678
|
+
buildTime: "12/31/2024 09:01 AM EST",
|
|
745
679
|
homepage: "https://github.com/aversini/ui-components",
|
|
746
680
|
license: "MIT"
|
|
747
681
|
});
|
|
748
682
|
} catch {
|
|
749
683
|
}
|
|
750
|
-
const
|
|
684
|
+
const pt = ({
|
|
751
685
|
className: e,
|
|
752
686
|
viewBox: t,
|
|
753
687
|
title: r,
|
|
@@ -763,23 +697,23 @@ const ft = ({
|
|
|
763
697
|
title: r || "Copied",
|
|
764
698
|
...o,
|
|
765
699
|
children: [
|
|
766
|
-
/* @__PURE__ */
|
|
700
|
+
/* @__PURE__ */ s(
|
|
767
701
|
"path",
|
|
768
702
|
{
|
|
769
703
|
opacity: "0.4",
|
|
770
704
|
d: "M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"
|
|
771
705
|
}
|
|
772
706
|
),
|
|
773
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ s("path", { d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z" })
|
|
774
708
|
]
|
|
775
709
|
}
|
|
776
|
-
),
|
|
710
|
+
), yt = ({
|
|
777
711
|
className: e,
|
|
778
712
|
viewBox: t,
|
|
779
713
|
title: r,
|
|
780
714
|
monotone: a,
|
|
781
715
|
...o
|
|
782
|
-
}) => /* @__PURE__ */
|
|
716
|
+
}) => /* @__PURE__ */ s(
|
|
783
717
|
fe,
|
|
784
718
|
{
|
|
785
719
|
defaultViewBox: "0 0 512 512",
|
|
@@ -788,39 +722,39 @@ const ft = ({
|
|
|
788
722
|
className: e,
|
|
789
723
|
title: r || "Copy",
|
|
790
724
|
...o,
|
|
791
|
-
children: /* @__PURE__ */
|
|
725
|
+
children: /* @__PURE__ */ s("path", { d: "M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z" })
|
|
792
726
|
}
|
|
793
727
|
);
|
|
794
728
|
/*!
|
|
795
|
-
@versini/ui-icons v3.0.
|
|
729
|
+
@versini/ui-icons v3.0.2
|
|
796
730
|
© 2024 gizmette.com
|
|
797
731
|
*/
|
|
798
732
|
try {
|
|
799
733
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
800
|
-
version: "3.0.
|
|
801
|
-
buildTime: "12/
|
|
734
|
+
version: "3.0.2",
|
|
735
|
+
buildTime: "12/31/2024 09:01 AM EST",
|
|
802
736
|
homepage: "https://github.com/aversini/ui-components",
|
|
803
737
|
license: "MIT"
|
|
804
738
|
});
|
|
805
739
|
} catch {
|
|
806
740
|
}
|
|
807
|
-
const
|
|
741
|
+
const ft = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", vt = ({ kind: e }) => d({
|
|
808
742
|
"bg-surface-lighter dark:bg-surface-dark": e === "left",
|
|
809
743
|
"bg-surface-accent": e === "right"
|
|
810
|
-
}),
|
|
744
|
+
}), kt = ({ kind: e }) => d(
|
|
811
745
|
"prose prose-dark dark:prose-lighter prose-p:my-3 prose-blockquote:my-3 prose-ol:my-3 prose-ul:my-3 prose-ul:prose-li:marker:text-black",
|
|
812
746
|
{
|
|
813
747
|
"text-copy-lighter": e === "right"
|
|
814
748
|
}
|
|
815
|
-
),
|
|
749
|
+
), xt = ({ kind: e }) => d("rounded-b-xl", {
|
|
816
750
|
"rounded-tr-xl": e === "left",
|
|
817
751
|
"rounded-tl-xl": e === "right"
|
|
818
|
-
}),
|
|
752
|
+
}), Tt = ({
|
|
819
753
|
kind: e,
|
|
820
754
|
className: t
|
|
821
755
|
}) => {
|
|
822
756
|
const r = d(
|
|
823
|
-
|
|
757
|
+
it,
|
|
824
758
|
"flex items-start",
|
|
825
759
|
{
|
|
826
760
|
"flex-row-reverse": e === "right"
|
|
@@ -828,10 +762,10 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
828
762
|
t
|
|
829
763
|
), a = d(
|
|
830
764
|
"flex flex-col empty:hidden",
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
765
|
+
ft(),
|
|
766
|
+
kt({ kind: e }),
|
|
767
|
+
vt({ kind: e }),
|
|
768
|
+
xt({ kind: e })
|
|
835
769
|
), o = "pr-2 pt-1 text-end text-xs text-copy-light", i = d("flex flex-col-reverse gap-2 sm:flex-row", {
|
|
836
770
|
"ml-2": e === "left",
|
|
837
771
|
"mr-2": e === "right"
|
|
@@ -842,7 +776,7 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
842
776
|
footer: o,
|
|
843
777
|
copyButton: i
|
|
844
778
|
};
|
|
845
|
-
},
|
|
779
|
+
}, _t = ({
|
|
846
780
|
children: e,
|
|
847
781
|
kind: t = "left",
|
|
848
782
|
className: r,
|
|
@@ -850,63 +784,63 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
850
784
|
rawFooter: o,
|
|
851
785
|
copyToClipboard: i,
|
|
852
786
|
copyToClipboardFocusMode: g = "system",
|
|
853
|
-
copyToClipboardMode:
|
|
787
|
+
copyToClipboardMode: l = "system"
|
|
854
788
|
}) => {
|
|
855
|
-
const [
|
|
856
|
-
|
|
789
|
+
const [m, u] = A(!1), b = Tt({ kind: t, className: r }), h = !!i && (typeof i == "function" || typeof i == "string" || typeof e == "string"), c = () => {
|
|
790
|
+
u(!0), typeof i == "function" ? i(e) : typeof i == "string" ? navigator.clipboard.writeText(i) : typeof e == "string" && navigator.clipboard.writeText(e);
|
|
857
791
|
};
|
|
858
792
|
return _(() => {
|
|
859
|
-
let
|
|
860
|
-
return
|
|
861
|
-
|
|
793
|
+
let n;
|
|
794
|
+
return m && (n = window.setTimeout(() => {
|
|
795
|
+
u(!1);
|
|
862
796
|
}, 3e3)), () => {
|
|
863
|
-
clearTimeout(
|
|
797
|
+
clearTimeout(n);
|
|
864
798
|
};
|
|
865
|
-
}, [
|
|
799
|
+
}, [m]), /* @__PURE__ */ v("div", { className: b.wrapper, children: [
|
|
866
800
|
/* @__PURE__ */ v("div", { children: [
|
|
867
|
-
/* @__PURE__ */
|
|
868
|
-
a && Object.keys(a).map((
|
|
869
|
-
|
|
801
|
+
/* @__PURE__ */ s("div", { className: b.main, children: e }),
|
|
802
|
+
a && Object.keys(a).map((n) => a[n] ? /* @__PURE__ */ s("div", { className: "prose-p:m-0", children: /* @__PURE__ */ v("p", { className: b.footer, children: [
|
|
803
|
+
n,
|
|
870
804
|
": ",
|
|
871
|
-
a[
|
|
872
|
-
] }) }, `-${
|
|
805
|
+
a[n]
|
|
806
|
+
] }) }, `-${n}`) : null),
|
|
873
807
|
o && o
|
|
874
808
|
] }),
|
|
875
|
-
h && /* @__PURE__ */
|
|
809
|
+
h && /* @__PURE__ */ s("div", { className: b.copyButton, children: /* @__PURE__ */ s(
|
|
876
810
|
ye,
|
|
877
811
|
{
|
|
878
812
|
noBorder: !0,
|
|
879
813
|
noBackground: !0,
|
|
880
814
|
size: "small",
|
|
881
|
-
mode:
|
|
815
|
+
mode: l,
|
|
882
816
|
focusMode: g,
|
|
883
|
-
label:
|
|
884
|
-
onClick:
|
|
885
|
-
disabled:
|
|
886
|
-
children:
|
|
817
|
+
label: m ? "Copied to clipboard" : "Copy to clipboard",
|
|
818
|
+
onClick: c,
|
|
819
|
+
disabled: m,
|
|
820
|
+
children: m ? /* @__PURE__ */ s(pt, { size: "size-3" }) : /* @__PURE__ */ s(yt, { size: "size-3" })
|
|
887
821
|
}
|
|
888
822
|
) })
|
|
889
823
|
] });
|
|
890
|
-
}, re = "av-button", ve = "icon", ke = "button",
|
|
824
|
+
}, re = "av-button", ve = "icon", ke = "button", wt = "link", Nt = ({
|
|
891
825
|
type: e,
|
|
892
826
|
size: t,
|
|
893
827
|
labelRight: r,
|
|
894
828
|
labelLeft: a,
|
|
895
829
|
align: o
|
|
896
830
|
}) => {
|
|
897
|
-
const i = "text-sm font-medium max-h-8 py-0", g = "text-base font-medium max-h-9 py-1",
|
|
831
|
+
const i = "text-sm font-medium max-h-8 py-0 px-2", g = "text-base font-medium max-h-9 py-1 px-3", l = "text-lg font-medium max-h-12 py-2 px-4";
|
|
898
832
|
switch (e) {
|
|
899
833
|
case ke:
|
|
900
|
-
return d(
|
|
834
|
+
return d({
|
|
901
835
|
[i]: t === "small",
|
|
902
836
|
[g]: t === "medium",
|
|
903
|
-
[
|
|
837
|
+
[l]: t === "large"
|
|
904
838
|
});
|
|
905
|
-
case
|
|
906
|
-
return d("
|
|
839
|
+
case wt:
|
|
840
|
+
return d("text-center", {
|
|
907
841
|
[i]: t === "small",
|
|
908
842
|
[g]: t === "medium",
|
|
909
|
-
[
|
|
843
|
+
[l]: t === "large"
|
|
910
844
|
});
|
|
911
845
|
case ve:
|
|
912
846
|
return d("inline-flex items-center", {
|
|
@@ -914,14 +848,14 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
914
848
|
"justify-start": o === "left",
|
|
915
849
|
"justify-end": o === "right",
|
|
916
850
|
"h-6 w-6 p-0": t === "small" && !(r || a),
|
|
917
|
-
"h-6 px-
|
|
851
|
+
"h-6 px-2 text-sm font-medium": t === "small" && (r || a),
|
|
918
852
|
"h-8 w-8 p-1": t === "medium" && !(r || a),
|
|
919
|
-
"h-8 px-
|
|
853
|
+
"h-8 px-3 text-base font-medium": t === "medium" && (r || a),
|
|
920
854
|
"h-12 w-12 p-2": t === "large" && !(r || a),
|
|
921
855
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
922
856
|
});
|
|
923
857
|
}
|
|
924
|
-
},
|
|
858
|
+
}, It = ({
|
|
925
859
|
mode: e,
|
|
926
860
|
noBackground: t,
|
|
927
861
|
noTruncate: r,
|
|
@@ -978,7 +912,7 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
978
912
|
"bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
|
|
979
913
|
"bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
|
|
980
914
|
});
|
|
981
|
-
},
|
|
915
|
+
}, Et = ({
|
|
982
916
|
mode: e,
|
|
983
917
|
disabled: t,
|
|
984
918
|
variant: r
|
|
@@ -1013,7 +947,7 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
1013
947
|
"hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
|
|
1014
948
|
"hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
|
|
1015
949
|
});
|
|
1016
|
-
},
|
|
950
|
+
}, Ct = ({
|
|
1017
951
|
mode: e,
|
|
1018
952
|
disabled: t,
|
|
1019
953
|
variant: r
|
|
@@ -1048,7 +982,7 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
1048
982
|
"active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
|
|
1049
983
|
"active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
|
|
1050
984
|
});
|
|
1051
|
-
},
|
|
985
|
+
}, St = ({
|
|
1052
986
|
mode: e,
|
|
1053
987
|
noBorder: t,
|
|
1054
988
|
variant: r
|
|
@@ -1083,7 +1017,7 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
1083
1017
|
"border-border-selected-dark dark:border-border-selected-medium": e === "system",
|
|
1084
1018
|
"border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
|
|
1085
1019
|
});
|
|
1086
|
-
},
|
|
1020
|
+
}, Rt = ({
|
|
1087
1021
|
focusMode: e
|
|
1088
1022
|
}) => d("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
1089
1023
|
"focus:outline-focus-dark": e === "dark",
|
|
@@ -1098,45 +1032,51 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
1098
1032
|
focusMode: o,
|
|
1099
1033
|
disabled: i,
|
|
1100
1034
|
fullWidth: g,
|
|
1101
|
-
size:
|
|
1102
|
-
noBorder:
|
|
1103
|
-
labelRight:
|
|
1035
|
+
size: l,
|
|
1036
|
+
noBorder: m,
|
|
1037
|
+
labelRight: u,
|
|
1104
1038
|
labelLeft: b,
|
|
1105
1039
|
noBackground: h,
|
|
1106
|
-
variant:
|
|
1107
|
-
noTruncate:
|
|
1040
|
+
variant: c,
|
|
1041
|
+
noTruncate: n,
|
|
1108
1042
|
align: p,
|
|
1109
1043
|
radius: f
|
|
1110
|
-
}) => (
|
|
1044
|
+
}) => (c || (c = "primary"), r ? d(re, t) : d(
|
|
1111
1045
|
re,
|
|
1112
|
-
|
|
1046
|
+
It({
|
|
1113
1047
|
mode: a,
|
|
1114
|
-
variant:
|
|
1048
|
+
variant: c,
|
|
1115
1049
|
noBackground: h,
|
|
1116
|
-
noTruncate:
|
|
1050
|
+
noTruncate: n,
|
|
1117
1051
|
radius: f
|
|
1118
1052
|
}),
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1053
|
+
Nt({
|
|
1054
|
+
type: e,
|
|
1055
|
+
size: l,
|
|
1056
|
+
labelRight: u,
|
|
1057
|
+
labelLeft: b,
|
|
1058
|
+
align: p
|
|
1059
|
+
}),
|
|
1060
|
+
St({ mode: a, variant: c, noBorder: m }),
|
|
1061
|
+
Rt({ focusMode: o }),
|
|
1062
|
+
Et({ mode: a, variant: c, disabled: i }),
|
|
1063
|
+
Ct({ mode: a, variant: c, disabled: i }),
|
|
1124
1064
|
{
|
|
1125
1065
|
"w-full": g,
|
|
1126
1066
|
"disabled:cursor-not-allowed disabled:opacity-50": i
|
|
1127
1067
|
},
|
|
1128
1068
|
t
|
|
1129
|
-
)),
|
|
1069
|
+
)), Bt = (e, t, r) => {
|
|
1130
1070
|
var a;
|
|
1131
1071
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
1132
1072
|
}, K = C.forwardRef((e, t) => {
|
|
1133
1073
|
const { onClick: r, noInternalClick: a = !1, ...o } = e;
|
|
1134
|
-
return /* @__PURE__ */
|
|
1074
|
+
return /* @__PURE__ */ s(
|
|
1135
1075
|
"button",
|
|
1136
1076
|
{
|
|
1137
1077
|
ref: t,
|
|
1138
1078
|
onClick: (i) => {
|
|
1139
|
-
|
|
1079
|
+
Bt(i, a, r);
|
|
1140
1080
|
},
|
|
1141
1081
|
...o
|
|
1142
1082
|
}
|
|
@@ -1152,34 +1092,34 @@ const Te = C.forwardRef(
|
|
|
1152
1092
|
fullWidth: o = !1,
|
|
1153
1093
|
className: i,
|
|
1154
1094
|
size: g = "medium",
|
|
1155
|
-
raw:
|
|
1156
|
-
noBorder:
|
|
1157
|
-
variant:
|
|
1095
|
+
raw: l = !1,
|
|
1096
|
+
noBorder: m = !1,
|
|
1097
|
+
variant: u = "primary",
|
|
1158
1098
|
noTruncate: b = !1,
|
|
1159
1099
|
radius: h = "large",
|
|
1160
|
-
...
|
|
1161
|
-
},
|
|
1100
|
+
...c
|
|
1101
|
+
}, n) => {
|
|
1162
1102
|
const p = xe({
|
|
1163
1103
|
type: ke,
|
|
1164
1104
|
mode: r,
|
|
1165
1105
|
focusMode: a,
|
|
1166
1106
|
fullWidth: o,
|
|
1167
1107
|
disabled: t,
|
|
1168
|
-
raw:
|
|
1108
|
+
raw: l,
|
|
1169
1109
|
className: i,
|
|
1170
1110
|
size: g,
|
|
1171
|
-
noBorder:
|
|
1172
|
-
variant:
|
|
1111
|
+
noBorder: m,
|
|
1112
|
+
variant: u,
|
|
1173
1113
|
noTruncate: b,
|
|
1174
1114
|
radius: h
|
|
1175
1115
|
});
|
|
1176
|
-
return /* @__PURE__ */
|
|
1116
|
+
return /* @__PURE__ */ s(
|
|
1177
1117
|
K,
|
|
1178
1118
|
{
|
|
1179
|
-
ref:
|
|
1119
|
+
ref: n,
|
|
1180
1120
|
className: p,
|
|
1181
1121
|
disabled: t,
|
|
1182
|
-
...
|
|
1122
|
+
...c,
|
|
1183
1123
|
children: e
|
|
1184
1124
|
}
|
|
1185
1125
|
);
|
|
@@ -1187,19 +1127,19 @@ const Te = C.forwardRef(
|
|
|
1187
1127
|
);
|
|
1188
1128
|
Te.displayName = "Button";
|
|
1189
1129
|
/*!
|
|
1190
|
-
@versini/ui-button v3.0
|
|
1130
|
+
@versini/ui-button v3.2.0
|
|
1191
1131
|
© 2024 gizmette.com
|
|
1192
1132
|
*/
|
|
1193
1133
|
try {
|
|
1194
1134
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
1195
|
-
version: "3.0
|
|
1196
|
-
buildTime: "12/
|
|
1135
|
+
version: "3.2.0",
|
|
1136
|
+
buildTime: "12/31/2024 09:01 AM EST",
|
|
1197
1137
|
homepage: "https://github.com/aversini/ui-components",
|
|
1198
1138
|
license: "MIT"
|
|
1199
1139
|
});
|
|
1200
1140
|
} catch {
|
|
1201
1141
|
}
|
|
1202
|
-
const
|
|
1142
|
+
const At = C.forwardRef(
|
|
1203
1143
|
({
|
|
1204
1144
|
children: e,
|
|
1205
1145
|
disabled: t = !1,
|
|
@@ -1208,13 +1148,13 @@ const Lt = C.forwardRef(
|
|
|
1208
1148
|
fullWidth: o = !1,
|
|
1209
1149
|
className: i,
|
|
1210
1150
|
type: g = "button",
|
|
1211
|
-
raw:
|
|
1212
|
-
noBorder:
|
|
1213
|
-
"aria-label":
|
|
1151
|
+
raw: l = !1,
|
|
1152
|
+
noBorder: m = !1,
|
|
1153
|
+
"aria-label": u,
|
|
1214
1154
|
label: b,
|
|
1215
1155
|
size: h = "medium",
|
|
1216
|
-
labelRight:
|
|
1217
|
-
labelLeft:
|
|
1156
|
+
labelRight: c,
|
|
1157
|
+
labelLeft: n,
|
|
1218
1158
|
noBackground: p = !1,
|
|
1219
1159
|
align: f = "center",
|
|
1220
1160
|
active: w = !1,
|
|
@@ -1227,20 +1167,20 @@ const Lt = C.forwardRef(
|
|
|
1227
1167
|
focusMode: a,
|
|
1228
1168
|
fullWidth: o,
|
|
1229
1169
|
disabled: t,
|
|
1230
|
-
raw:
|
|
1170
|
+
raw: l,
|
|
1231
1171
|
className: i,
|
|
1232
|
-
noBorder:
|
|
1172
|
+
noBorder: m,
|
|
1233
1173
|
size: h,
|
|
1234
|
-
labelRight:
|
|
1235
|
-
labelLeft:
|
|
1174
|
+
labelRight: c,
|
|
1175
|
+
labelLeft: n,
|
|
1236
1176
|
noBackground: p,
|
|
1237
1177
|
align: f,
|
|
1238
1178
|
radius: N
|
|
1239
1179
|
}), T = d({
|
|
1240
|
-
"text-copy-accent-dark": r === "light" && !
|
|
1241
|
-
"text-copy-light": r === "dark" && !
|
|
1242
|
-
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !
|
|
1243
|
-
"text-copy-light dark:text-copy-accent-dark": r === "system" && !
|
|
1180
|
+
"text-copy-accent-dark": r === "light" && !l,
|
|
1181
|
+
"text-copy-light": r === "dark" && !l,
|
|
1182
|
+
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !l,
|
|
1183
|
+
"text-copy-light dark:text-copy-accent-dark": r === "system" && !l
|
|
1244
1184
|
}), V = w ? d(
|
|
1245
1185
|
"relative",
|
|
1246
1186
|
"focus-within:static",
|
|
@@ -1258,28 +1198,28 @@ const Lt = C.forwardRef(
|
|
|
1258
1198
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
1259
1199
|
}
|
|
1260
1200
|
) : "";
|
|
1261
|
-
return /* @__PURE__ */
|
|
1201
|
+
return /* @__PURE__ */ s("div", { className: V, children: /* @__PURE__ */ v(
|
|
1262
1202
|
K,
|
|
1263
1203
|
{
|
|
1264
1204
|
ref: x,
|
|
1265
1205
|
className: I,
|
|
1266
1206
|
disabled: t,
|
|
1267
1207
|
type: g,
|
|
1268
|
-
"aria-label":
|
|
1208
|
+
"aria-label": u || b,
|
|
1269
1209
|
...k,
|
|
1270
1210
|
children: [
|
|
1271
|
-
|
|
1272
|
-
/* @__PURE__ */
|
|
1273
|
-
|
|
1211
|
+
n && /* @__PURE__ */ s("span", { className: "pr-2", children: n }),
|
|
1212
|
+
/* @__PURE__ */ s("div", { className: T, children: e }),
|
|
1213
|
+
c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
|
|
1274
1214
|
]
|
|
1275
1215
|
}
|
|
1276
1216
|
) });
|
|
1277
1217
|
}
|
|
1278
1218
|
);
|
|
1279
|
-
|
|
1280
|
-
const
|
|
1219
|
+
At.displayName = "ButtonSort";
|
|
1220
|
+
const Mt = 200, Lt = ({
|
|
1281
1221
|
string: e,
|
|
1282
|
-
idealLength: t =
|
|
1222
|
+
idealLength: t = Mt
|
|
1283
1223
|
}) => {
|
|
1284
1224
|
if (e.length <= t)
|
|
1285
1225
|
return { string: e, isTruncated: !1 };
|
|
@@ -1290,30 +1230,30 @@ const Ot = 200, zt = ({
|
|
|
1290
1230
|
string: e.slice(0, t + r),
|
|
1291
1231
|
isTruncated: !0
|
|
1292
1232
|
};
|
|
1293
|
-
},
|
|
1233
|
+
}, Ot = ({
|
|
1294
1234
|
children: e,
|
|
1295
1235
|
length: t = 200,
|
|
1296
1236
|
mode: r = "system",
|
|
1297
1237
|
focusMode: a = "system"
|
|
1298
1238
|
}) => {
|
|
1299
|
-
const [o, i] =
|
|
1239
|
+
const [o, i] = A(!1);
|
|
1300
1240
|
if (typeof e != "string")
|
|
1301
1241
|
return e;
|
|
1302
|
-
const { string: g, isTruncated:
|
|
1242
|
+
const { string: g, isTruncated: l } = Lt({
|
|
1303
1243
|
string: e,
|
|
1304
1244
|
idealLength: t
|
|
1305
1245
|
});
|
|
1306
1246
|
return /* @__PURE__ */ v("span", { style: { wordBreak: "break-word" }, children: [
|
|
1307
1247
|
o ? e : g,
|
|
1308
|
-
|
|
1248
|
+
l && /* @__PURE__ */ s(
|
|
1309
1249
|
Te,
|
|
1310
1250
|
{
|
|
1311
1251
|
mode: r,
|
|
1312
1252
|
focusMode: a,
|
|
1313
1253
|
className: "ml-2",
|
|
1314
1254
|
size: "small",
|
|
1315
|
-
onClick: (
|
|
1316
|
-
|
|
1255
|
+
onClick: (m) => {
|
|
1256
|
+
m.preventDefault(), i(!o);
|
|
1317
1257
|
},
|
|
1318
1258
|
children: o ? "less..." : "more..."
|
|
1319
1259
|
}
|
|
@@ -1321,51 +1261,57 @@ const Ot = 200, zt = ({
|
|
|
1321
1261
|
] });
|
|
1322
1262
|
};
|
|
1323
1263
|
/*!
|
|
1324
|
-
@versini/ui-truncate v2.0.
|
|
1264
|
+
@versini/ui-truncate v2.0.8
|
|
1325
1265
|
© 2024 gizmette.com
|
|
1326
1266
|
*/
|
|
1327
1267
|
try {
|
|
1328
1268
|
window.__VERSINI_UI_TRUNCATE__ || (window.__VERSINI_UI_TRUNCATE__ = {
|
|
1329
|
-
version: "2.0.
|
|
1330
|
-
buildTime: "12/
|
|
1269
|
+
version: "2.0.8",
|
|
1270
|
+
buildTime: "12/31/2024 09:01 AM EST",
|
|
1331
1271
|
homepage: "https://github.com/aversini/ui-components",
|
|
1332
1272
|
license: "MIT"
|
|
1333
1273
|
});
|
|
1334
1274
|
} catch {
|
|
1335
1275
|
}
|
|
1336
|
-
const ae =
|
|
1276
|
+
const ae = Fe(
|
|
1337
1277
|
() => import(
|
|
1338
1278
|
/* webpackChunkName: "LazyMessageAssistant" */
|
|
1339
|
-
"./LazyMessageAssistant.
|
|
1279
|
+
"./LazyMessageAssistant.BkIqe55j.js"
|
|
1340
1280
|
).then((e) => e.LazyMessageAssistant)
|
|
1341
|
-
),
|
|
1342
|
-
const { state: e } = R(
|
|
1281
|
+
), zt = () => {
|
|
1282
|
+
const { state: e } = R(U);
|
|
1343
1283
|
return /* @__PURE__ */ v(O, { children: [
|
|
1344
1284
|
e && e.messages.length > 0 && e.messages.map((t, r) => {
|
|
1345
1285
|
const { role: a, content: o, name: i, processingTime: g } = t.message;
|
|
1346
|
-
return (a === E || a ===
|
|
1286
|
+
return (a === E || a === H) && o ? /* @__PURE__ */ s(Z, { fallback: /* @__PURE__ */ s("span", {}), children: /* @__PURE__ */ s(
|
|
1347
1287
|
ae,
|
|
1348
1288
|
{
|
|
1349
1289
|
name: i,
|
|
1350
1290
|
processingTime: g,
|
|
1351
1291
|
children: o
|
|
1352
1292
|
}
|
|
1353
|
-
) }, `${r}-${a}`) : a === G && o ? /* @__PURE__ */
|
|
1354
|
-
|
|
1293
|
+
) }, `${r}-${a}`) : a === G && o ? /* @__PURE__ */ s(
|
|
1294
|
+
_t,
|
|
1355
1295
|
{
|
|
1356
1296
|
kind: "right",
|
|
1357
1297
|
copyToClipboard: o,
|
|
1358
1298
|
copyToClipboardFocusMode: "light",
|
|
1359
|
-
children: /* @__PURE__ */
|
|
1299
|
+
children: /* @__PURE__ */ s(Ot, { mode: "light", focusMode: "light", children: o })
|
|
1360
1300
|
},
|
|
1361
1301
|
`${r}-${a}`
|
|
1362
1302
|
) : null;
|
|
1363
1303
|
}),
|
|
1364
|
-
me(G, e) && /* @__PURE__ */
|
|
1304
|
+
me(G, e) && /* @__PURE__ */ s(Z, { fallback: /* @__PURE__ */ s("span", {}), children: /* @__PURE__ */ s(ae, { loading: !0 }) })
|
|
1365
1305
|
] });
|
|
1306
|
+
}, Ut = () => {
|
|
1307
|
+
const { isAuthenticated: e } = z(), t = Ce(e);
|
|
1308
|
+
return /* @__PURE__ */ s(O, { children: /* @__PURE__ */ v("div", { className: t, children: [
|
|
1309
|
+
/* @__PURE__ */ s(Se, {}),
|
|
1310
|
+
/* @__PURE__ */ s(zt, {})
|
|
1311
|
+
] }) });
|
|
1366
1312
|
}, L = (e, t) => {
|
|
1367
1313
|
e({
|
|
1368
|
-
type:
|
|
1314
|
+
type: ne,
|
|
1369
1315
|
payload: {
|
|
1370
1316
|
streaming: t
|
|
1371
1317
|
}
|
|
@@ -1375,51 +1321,51 @@ const ae = Ke(
|
|
|
1375
1321
|
type: S,
|
|
1376
1322
|
payload: {
|
|
1377
1323
|
message: {
|
|
1378
|
-
role:
|
|
1379
|
-
content:
|
|
1324
|
+
role: H,
|
|
1325
|
+
content: Le
|
|
1380
1326
|
}
|
|
1381
1327
|
}
|
|
1382
1328
|
});
|
|
1383
|
-
},
|
|
1384
|
-
const { state: e, dispatch: t } = R(
|
|
1329
|
+
}, Vt = () => {
|
|
1330
|
+
const { state: e, dispatch: t } = R(U), { state: r, dispatch: a } = R(j), [o, i] = A(""), { getAccessToken: g, user: l } = z(), m = B(null), u = B(
|
|
1385
1331
|
null
|
|
1386
1332
|
);
|
|
1387
1333
|
_(() => {
|
|
1388
1334
|
(async () => {
|
|
1389
|
-
var
|
|
1335
|
+
var c;
|
|
1390
1336
|
if (!e || e.messages.length === 0) {
|
|
1391
|
-
(
|
|
1337
|
+
(c = u == null ? void 0 : u.current) == null || c.cancel();
|
|
1392
1338
|
return;
|
|
1393
1339
|
}
|
|
1394
1340
|
const h = e.messages[e.messages.length - 1];
|
|
1395
|
-
if (!(e.messages.length === 0 || h.message.role === E || h.message.role ===
|
|
1341
|
+
if (!(e.messages.length === 0 || h.message.role === E || h.message.role === Re || h.message.role === H || h.message.role === Be))
|
|
1396
1342
|
try {
|
|
1397
|
-
const
|
|
1343
|
+
const n = await Ge({
|
|
1398
1344
|
accessToken: await g(),
|
|
1399
1345
|
name: "generate",
|
|
1400
1346
|
data: {
|
|
1401
1347
|
messages: e.messages,
|
|
1402
|
-
model: e.engine ||
|
|
1403
|
-
user: (
|
|
1348
|
+
model: e.engine || M,
|
|
1349
|
+
user: (l == null ? void 0 : l.username) || "",
|
|
1404
1350
|
id: e.id,
|
|
1405
1351
|
usage: e.usage
|
|
1406
1352
|
}
|
|
1407
1353
|
});
|
|
1408
|
-
if (
|
|
1409
|
-
const p =
|
|
1410
|
-
|
|
1354
|
+
if (n && n.ok) {
|
|
1355
|
+
const p = P();
|
|
1356
|
+
u.current = n.body.getReader();
|
|
1411
1357
|
const f = new TextDecoder();
|
|
1412
1358
|
for (; ; ) {
|
|
1413
1359
|
L(t, !0);
|
|
1414
|
-
const { done: w, value: N } = await
|
|
1360
|
+
const { done: w, value: N } = await u.current.read();
|
|
1415
1361
|
if (w) {
|
|
1416
1362
|
L(t, !1);
|
|
1417
1363
|
break;
|
|
1418
1364
|
}
|
|
1419
|
-
const k = f.decode(N, { stream: !0 }), x = k.indexOf(
|
|
1365
|
+
const k = f.decode(N, { stream: !0 }), x = k.indexOf(Y);
|
|
1420
1366
|
if (x !== -1) {
|
|
1421
1367
|
const I = k.substring(0, x), T = JSON.parse(
|
|
1422
|
-
k.substring(x +
|
|
1368
|
+
k.substring(x + Y.length)
|
|
1423
1369
|
);
|
|
1424
1370
|
t({
|
|
1425
1371
|
type: de,
|
|
@@ -1454,8 +1400,8 @@ const ae = Ke(
|
|
|
1454
1400
|
}
|
|
1455
1401
|
} else
|
|
1456
1402
|
oe(t);
|
|
1457
|
-
} catch (
|
|
1458
|
-
console.error(
|
|
1403
|
+
} catch (n) {
|
|
1404
|
+
console.error(n), oe(t);
|
|
1459
1405
|
}
|
|
1460
1406
|
})();
|
|
1461
1407
|
}, [e == null ? void 0 : e.messages]);
|
|
@@ -1473,20 +1419,20 @@ const ae = Ke(
|
|
|
1473
1419
|
return _(() => {
|
|
1474
1420
|
if (r.tag !== "") {
|
|
1475
1421
|
const h = r.tag.endsWith(":") && !r.tag.endsWith(": ") ? r.tag + " " : r.tag;
|
|
1476
|
-
h.indexOf(
|
|
1477
|
-
i(h.replace(
|
|
1478
|
-
}) : i(h),
|
|
1479
|
-
type:
|
|
1422
|
+
h.indexOf(q) !== -1 ? navigator.clipboard.readText().then((n) => {
|
|
1423
|
+
i(h.replace(q, n));
|
|
1424
|
+
}) : i(h), m.current && m.current.focus(), a({
|
|
1425
|
+
type: ce
|
|
1480
1426
|
});
|
|
1481
1427
|
}
|
|
1482
1428
|
}, [r, a]), _(() => {
|
|
1483
|
-
e && e.usage === 0 && e.messages.length === 0 &&
|
|
1484
|
-
}, [e]), /* @__PURE__ */
|
|
1485
|
-
|
|
1429
|
+
e && e.usage === 0 && e.messages.length === 0 && m.current && m.current.focus();
|
|
1430
|
+
}, [e]), /* @__PURE__ */ s("form", { className: "mt-2", onSubmit: b, children: /* @__PURE__ */ s(
|
|
1431
|
+
He,
|
|
1486
1432
|
{
|
|
1487
1433
|
mode: "dark",
|
|
1488
1434
|
focusMode: "light",
|
|
1489
|
-
ref:
|
|
1435
|
+
ref: m,
|
|
1490
1436
|
name: "chat-input",
|
|
1491
1437
|
label: Ae,
|
|
1492
1438
|
helperText: "Press ENTER to add a new line",
|
|
@@ -1494,8 +1440,8 @@ const ae = Ke(
|
|
|
1494
1440
|
required: !0,
|
|
1495
1441
|
value: o,
|
|
1496
1442
|
onChange: (h) => i(h.target.value),
|
|
1497
|
-
onKeyDown:
|
|
1498
|
-
rightElement: /* @__PURE__ */
|
|
1443
|
+
onKeyDown: Je([["mod+Enter", b]]),
|
|
1444
|
+
rightElement: /* @__PURE__ */ s(
|
|
1499
1445
|
ue,
|
|
1500
1446
|
{
|
|
1501
1447
|
disabled: e == null ? void 0 : e.streaming,
|
|
@@ -1503,53 +1449,115 @@ const ae = Ke(
|
|
|
1503
1449
|
type: "submit",
|
|
1504
1450
|
mode: "light",
|
|
1505
1451
|
focusMode: "light",
|
|
1506
|
-
children:
|
|
1452
|
+
children: Me
|
|
1507
1453
|
}
|
|
1508
1454
|
)
|
|
1509
1455
|
}
|
|
1510
1456
|
) });
|
|
1511
|
-
},
|
|
1512
|
-
const {
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1457
|
+
}, Dt = () => {
|
|
1458
|
+
const { dispatch: e, state: t } = R(U), { dispatch: r, state: a } = R(j), { getAccessToken: o, user: i } = z(), [g, l] = A({
|
|
1459
|
+
loaded: !1
|
|
1460
|
+
}), m = "mt-2 flex justify-center rounded-md", u = B(null), b = B(!1), h = (n) => {
|
|
1461
|
+
n.preventDefault(), e({
|
|
1462
|
+
type: ie
|
|
1463
|
+
});
|
|
1464
|
+
};
|
|
1465
|
+
_(() => {
|
|
1466
|
+
var n;
|
|
1467
|
+
(t == null ? void 0 : t.streaming) === !0 && !b.current && u.current && (b.current = !0, u.current.focus()), (t == null ? void 0 : t.streaming) === !1 && (b.current = !1, (n = u.current) == null || n.blur());
|
|
1468
|
+
}, [t]);
|
|
1469
|
+
const c = (n, p) => {
|
|
1470
|
+
n.preventDefault(), r({
|
|
1471
|
+
type: ge,
|
|
1472
|
+
payload: {
|
|
1473
|
+
tag: p
|
|
1474
|
+
}
|
|
1475
|
+
});
|
|
1476
|
+
};
|
|
1477
|
+
return _(() => {
|
|
1478
|
+
if (!i) {
|
|
1479
|
+
l({
|
|
1480
|
+
loaded: !1
|
|
1481
|
+
});
|
|
1482
|
+
return;
|
|
1483
|
+
}
|
|
1484
|
+
g.loaded || (async () => {
|
|
1485
|
+
try {
|
|
1486
|
+
const n = await he({
|
|
1487
|
+
accessToken: await o(),
|
|
1488
|
+
type: be.GET_USER_PREFERENCES,
|
|
1489
|
+
params: {
|
|
1490
|
+
user: i.username
|
|
1491
|
+
}
|
|
1492
|
+
});
|
|
1493
|
+
n.status === 200 && (r({
|
|
1494
|
+
type: le,
|
|
1495
|
+
payload: {
|
|
1496
|
+
tags: n.data.tags || []
|
|
1497
|
+
}
|
|
1498
|
+
}), l({
|
|
1499
|
+
loaded: !0
|
|
1500
|
+
}));
|
|
1501
|
+
} catch {
|
|
1502
|
+
}
|
|
1503
|
+
})();
|
|
1504
|
+
}, [i]), /* @__PURE__ */ v(O, { children: [
|
|
1505
|
+
/* @__PURE__ */ s(Oe, { alignHorizontal: "center", columnGap: 2, children: g && g.loaded && a.tags && a.tags.map((n) => n.enabled && n.label && n.content && /* @__PURE__ */ s(ze, { children: /* @__PURE__ */ s("div", { className: m, children: /* @__PURE__ */ s(
|
|
1506
|
+
ue,
|
|
1507
|
+
{
|
|
1508
|
+
noBorder: !0,
|
|
1509
|
+
mode: "dark",
|
|
1510
|
+
focusMode: "light",
|
|
1511
|
+
size: "small",
|
|
1512
|
+
onClick: (p) => c(p, n.content),
|
|
1513
|
+
children: n.label
|
|
1514
|
+
}
|
|
1515
|
+
) }) }, `tag-button-${n.slot}`)) }),
|
|
1516
|
+
me(E, t) && /* @__PURE__ */ s("div", { className: m, children: /* @__PURE__ */ s(
|
|
1517
|
+
Ue,
|
|
1518
|
+
{
|
|
1519
|
+
noBorder: !0,
|
|
1520
|
+
mode: "dark",
|
|
1521
|
+
focusMode: "light",
|
|
1522
|
+
ref: u,
|
|
1523
|
+
onClick: h,
|
|
1524
|
+
labelRight: t != null && t.streaming ? X.ACTION_WHILE_STREAMING.content : X.ACTION_WHILE_NOT_STREAMING.content,
|
|
1525
|
+
children: t != null && t.streaming ? /* @__PURE__ */ s(Ke, { size: "size-4" }) : /* @__PURE__ */ s(je, { size: "size-4" })
|
|
1526
|
+
}
|
|
1527
|
+
) })
|
|
1520
1528
|
] });
|
|
1521
1529
|
};
|
|
1522
1530
|
function _e({ isComponent: e = !1 }) {
|
|
1523
|
-
const t = B(!1), { getAccessToken: r, user: a } =
|
|
1524
|
-
key: J +
|
|
1531
|
+
const t = B(!1), { getAccessToken: r, user: a } = z(), [o] = Q({
|
|
1532
|
+
key: J + De,
|
|
1525
1533
|
initialValue: ""
|
|
1526
1534
|
}), [i] = Q({
|
|
1527
|
-
key: J +
|
|
1528
|
-
initialValue:
|
|
1529
|
-
}), [g,
|
|
1530
|
-
id:
|
|
1531
|
-
model:
|
|
1532
|
-
engine:
|
|
1535
|
+
key: J + $e,
|
|
1536
|
+
initialValue: We.ASC
|
|
1537
|
+
}), [g, l] = D(rt, {
|
|
1538
|
+
id: P(),
|
|
1539
|
+
model: M,
|
|
1540
|
+
engine: M,
|
|
1533
1541
|
usage: 0,
|
|
1534
1542
|
messages: [],
|
|
1535
1543
|
tags: [],
|
|
1536
1544
|
isComponent: e
|
|
1537
|
-
}), [
|
|
1545
|
+
}), [m, u] = D(at, {
|
|
1538
1546
|
searchString: o,
|
|
1539
1547
|
sortedCell: "timestamp",
|
|
1540
1548
|
sortDirection: i
|
|
1541
|
-
}), [b, h] = D(
|
|
1549
|
+
}), [b, h] = D(ot, {
|
|
1542
1550
|
tag: "",
|
|
1543
1551
|
tags: []
|
|
1544
|
-
}), [
|
|
1552
|
+
}), [c, n] = A({
|
|
1545
1553
|
version: "",
|
|
1546
1554
|
models: [],
|
|
1547
1555
|
plugins: [],
|
|
1548
|
-
engine:
|
|
1556
|
+
engine: M,
|
|
1549
1557
|
engines: []
|
|
1550
1558
|
});
|
|
1551
1559
|
return _(() => {
|
|
1552
|
-
|
|
1560
|
+
c.version !== "" || t.current || (async () => {
|
|
1553
1561
|
try {
|
|
1554
1562
|
t.current = !0;
|
|
1555
1563
|
const p = await he({
|
|
@@ -1559,8 +1567,8 @@ function _e({ isComponent: e = !1 }) {
|
|
|
1559
1567
|
user: a == null ? void 0 : a.username
|
|
1560
1568
|
}
|
|
1561
1569
|
});
|
|
1562
|
-
t.current = !1, p.status === 200 && (
|
|
1563
|
-
type:
|
|
1570
|
+
t.current = !1, p.status === 200 && (n(p.data), l({
|
|
1571
|
+
type: se,
|
|
1564
1572
|
payload: {
|
|
1565
1573
|
engine: p.data.engine
|
|
1566
1574
|
}
|
|
@@ -1568,26 +1576,29 @@ function _e({ isComponent: e = !1 }) {
|
|
|
1568
1576
|
} catch {
|
|
1569
1577
|
}
|
|
1570
1578
|
})();
|
|
1571
|
-
}, [
|
|
1579
|
+
}, [c, r, a]), _(() => {
|
|
1572
1580
|
var p;
|
|
1573
1581
|
(p = document.getElementById("logo")) == null || p.classList.add("fadeOut"), setTimeout(() => {
|
|
1574
1582
|
var f;
|
|
1575
1583
|
(f = document.getElementById("root")) == null || f.classList.replace("app-hidden", "fadeIn");
|
|
1576
1584
|
}, 500);
|
|
1577
|
-
}), /* @__PURE__ */
|
|
1578
|
-
|
|
1585
|
+
}), /* @__PURE__ */ s(U.Provider, { value: { state: g, dispatch: l, serverStats: c }, children: /* @__PURE__ */ s(
|
|
1586
|
+
Pe.Provider,
|
|
1579
1587
|
{
|
|
1580
1588
|
value: {
|
|
1581
|
-
state:
|
|
1582
|
-
dispatch:
|
|
1589
|
+
state: m,
|
|
1590
|
+
dispatch: u
|
|
1583
1591
|
},
|
|
1584
1592
|
children: /* @__PURE__ */ v(
|
|
1585
|
-
|
|
1593
|
+
j.Provider,
|
|
1586
1594
|
{
|
|
1587
1595
|
value: { state: b, dispatch: h },
|
|
1588
1596
|
children: [
|
|
1589
|
-
/* @__PURE__ */
|
|
1590
|
-
/* @__PURE__ */
|
|
1597
|
+
/* @__PURE__ */ s(Ve, { className: "max-h-[calc(100svh_-_203px)]", children: /* @__PURE__ */ s(Ut, {}) }),
|
|
1598
|
+
/* @__PURE__ */ v("div", { className: "md:mx-auto md:max-w-4xl w-11/12 fixed bottom-10 left-1/2 transform -translate-x-1/2 z-1000", children: [
|
|
1599
|
+
/* @__PURE__ */ s(Dt, {}),
|
|
1600
|
+
/* @__PURE__ */ s(Vt, {})
|
|
1601
|
+
] })
|
|
1591
1602
|
]
|
|
1592
1603
|
}
|
|
1593
1604
|
)
|
|
@@ -1595,8 +1606,8 @@ function _e({ isComponent: e = !1 }) {
|
|
|
1595
1606
|
) });
|
|
1596
1607
|
}
|
|
1597
1608
|
_e.displayName = "App";
|
|
1598
|
-
const
|
|
1609
|
+
const Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: _e }, Symbol.toStringTag, { value: "Module" }));
|
|
1599
1610
|
export {
|
|
1600
|
-
|
|
1601
|
-
|
|
1611
|
+
Wt as LazyApp,
|
|
1612
|
+
_t as ae
|
|
1602
1613
|
};
|