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