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