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