teodor-new-chat-ui 2.0.20 → 2.0.22
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/index.esm.js +266 -257
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -111,14 +111,14 @@ const Nd = (e, t, n, { allOwnKeys: r } = {}) => (an(t, (o, s) => {
|
|
|
111
111
|
for (; t-- > 0; )
|
|
112
112
|
n[t] = e[t];
|
|
113
113
|
return n;
|
|
114
|
-
}, Od = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && go(Uint8Array)),
|
|
114
|
+
}, Od = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && go(Uint8Array)), kd = (e, t) => {
|
|
115
115
|
const r = (e && e[Xn]).call(e);
|
|
116
116
|
let o;
|
|
117
117
|
for (; (o = r.next()) && !o.done; ) {
|
|
118
118
|
const s = o.value;
|
|
119
119
|
t.call(e, s[0], s[1]);
|
|
120
120
|
}
|
|
121
|
-
},
|
|
121
|
+
}, Md = (e, t) => {
|
|
122
122
|
let n;
|
|
123
123
|
const r = [];
|
|
124
124
|
for (; (n = e.exec(t)) !== null; )
|
|
@@ -225,8 +225,8 @@ const Wd = (e) => {
|
|
|
225
225
|
kindOfTest: Be,
|
|
226
226
|
endsWith: _d,
|
|
227
227
|
toArray: Id,
|
|
228
|
-
forEachEntry:
|
|
229
|
-
matchAll:
|
|
228
|
+
forEachEntry: kd,
|
|
229
|
+
matchAll: Md,
|
|
230
230
|
isHTMLForm: Dd,
|
|
231
231
|
hasOwnProperty: as,
|
|
232
232
|
hasOwnProp: as,
|
|
@@ -1239,7 +1239,7 @@ const Ia = (e) => {
|
|
|
1239
1239
|
onUploadProgress: I,
|
|
1240
1240
|
responseType: N,
|
|
1241
1241
|
headers: L,
|
|
1242
|
-
withCredentials:
|
|
1242
|
+
withCredentials: k = "same-origin",
|
|
1243
1243
|
fetchOptions: D
|
|
1244
1244
|
} = Ia(m), j = t || fetch;
|
|
1245
1245
|
N = N ? (N + "").toLowerCase() : "text";
|
|
@@ -1263,7 +1263,7 @@ const Ia = (e) => {
|
|
|
1263
1263
|
w = hs(O.body, ms, $, z);
|
|
1264
1264
|
}
|
|
1265
1265
|
}
|
|
1266
|
-
S.isString(
|
|
1266
|
+
S.isString(k) || (k = k ? "include" : "omit");
|
|
1267
1267
|
const F = s && "credentials" in n.prototype, G = {
|
|
1268
1268
|
...D,
|
|
1269
1269
|
signal: K,
|
|
@@ -1271,7 +1271,7 @@ const Ia = (e) => {
|
|
|
1271
1271
|
headers: L.normalize().toJSON(),
|
|
1272
1272
|
body: w,
|
|
1273
1273
|
duplex: "half",
|
|
1274
|
-
credentials: F ?
|
|
1274
|
+
credentials: F ? k : void 0
|
|
1275
1275
|
};
|
|
1276
1276
|
W = s && new n(h, G);
|
|
1277
1277
|
let T = await (s ? j(W, D) : j(h, G));
|
|
@@ -1342,7 +1342,7 @@ S.forEach(Gr, (e, t) => {
|
|
|
1342
1342
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1343
1343
|
}
|
|
1344
1344
|
});
|
|
1345
|
-
const ws = (e) => `- ${e}`,
|
|
1345
|
+
const ws = (e) => `- ${e}`, kf = (e) => S.isFunction(e) || e === null || e === !1, ka = {
|
|
1346
1346
|
getAdapter: (e, t) => {
|
|
1347
1347
|
e = S.isArray(e) ? e : [e];
|
|
1348
1348
|
const { length: n } = e;
|
|
@@ -1351,7 +1351,7 @@ const ws = (e) => `- ${e}`, Mf = (e) => S.isFunction(e) || e === null || e === !
|
|
|
1351
1351
|
for (let a = 0; a < n; a++) {
|
|
1352
1352
|
r = e[a];
|
|
1353
1353
|
let i;
|
|
1354
|
-
if (o = r, !
|
|
1354
|
+
if (o = r, !kf(r) && (o = Gr[(i = String(r)).toLowerCase()], o === void 0))
|
|
1355
1355
|
throw new ee(`Unknown adapter '${i}'`);
|
|
1356
1356
|
if (o && (S.isFunction(o) || (o = o.get(t))))
|
|
1357
1357
|
break;
|
|
@@ -1381,7 +1381,7 @@ function ys(e) {
|
|
|
1381
1381
|
return Nr(e), e.headers = Te.from(e.headers), e.data = Rr.call(
|
|
1382
1382
|
e,
|
|
1383
1383
|
e.transformRequest
|
|
1384
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1384
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), ka.getAdapter(e.adapter || cn.adapter, e)(e).then(function(r) {
|
|
1385
1385
|
return Nr(e), r.data = Rr.call(
|
|
1386
1386
|
e,
|
|
1387
1387
|
e.transformResponse,
|
|
@@ -1395,7 +1395,7 @@ function ys(e) {
|
|
|
1395
1395
|
), r.response.headers = Te.from(r.response.headers))), Promise.reject(r);
|
|
1396
1396
|
});
|
|
1397
1397
|
}
|
|
1398
|
-
const
|
|
1398
|
+
const Ma = "1.12.2", Qn = {};
|
|
1399
1399
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1400
1400
|
Qn[e] = function(r) {
|
|
1401
1401
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
@@ -1404,7 +1404,7 @@ const ka = "1.12.2", Qn = {};
|
|
|
1404
1404
|
const xs = {};
|
|
1405
1405
|
Qn.transitional = function(t, n, r) {
|
|
1406
1406
|
function o(s, a) {
|
|
1407
|
-
return "[Axios v" +
|
|
1407
|
+
return "[Axios v" + Ma + "] Transitional option '" + s + "'" + a + (r ? ". " + r : "");
|
|
1408
1408
|
}
|
|
1409
1409
|
return (s, a, i) => {
|
|
1410
1410
|
if (t === !1)
|
|
@@ -1423,7 +1423,7 @@ Qn.transitional = function(t, n, r) {
|
|
|
1423
1423
|
Qn.spelling = function(t) {
|
|
1424
1424
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1425
1425
|
};
|
|
1426
|
-
function
|
|
1426
|
+
function Mf(e, t, n) {
|
|
1427
1427
|
if (typeof e != "object")
|
|
1428
1428
|
throw new ee("options must be an object", ee.ERR_BAD_OPTION_VALUE);
|
|
1429
1429
|
const r = Object.keys(e);
|
|
@@ -1441,7 +1441,7 @@ function kf(e, t, n) {
|
|
|
1441
1441
|
}
|
|
1442
1442
|
}
|
|
1443
1443
|
const En = {
|
|
1444
|
-
assertOptions:
|
|
1444
|
+
assertOptions: Mf,
|
|
1445
1445
|
validators: Qn
|
|
1446
1446
|
}, He = En.validators;
|
|
1447
1447
|
let dt = class {
|
|
@@ -1728,7 +1728,7 @@ me.Axios = dt;
|
|
|
1728
1728
|
me.CanceledError = Ft;
|
|
1729
1729
|
me.CancelToken = Df;
|
|
1730
1730
|
me.isCancel = Aa;
|
|
1731
|
-
me.VERSION =
|
|
1731
|
+
me.VERSION = Ma;
|
|
1732
1732
|
me.toFormData = Zn;
|
|
1733
1733
|
me.AxiosError = ee;
|
|
1734
1734
|
me.Cancel = me.CanceledError;
|
|
@@ -1740,7 +1740,7 @@ me.isAxiosError = Ff;
|
|
|
1740
1740
|
me.mergeConfig = ft;
|
|
1741
1741
|
me.AxiosHeaders = Te;
|
|
1742
1742
|
me.formToJSON = (e) => Ta(S.isHTMLForm(e) ? new FormData(e) : e);
|
|
1743
|
-
me.getAdapter =
|
|
1743
|
+
me.getAdapter = ka.getAdapter;
|
|
1744
1744
|
me.HttpStatusCode = qr;
|
|
1745
1745
|
me.default = me;
|
|
1746
1746
|
const {
|
|
@@ -1952,7 +1952,7 @@ function Hf(e = {}) {
|
|
|
1952
1952
|
m.current && (m.current.abort(), m.current = null), i(!0), f(null), e.autoAppendAssistant !== !1 && p("");
|
|
1953
1953
|
const I = new AbortController();
|
|
1954
1954
|
return m.current = I, (async () => {
|
|
1955
|
-
var
|
|
1955
|
+
var k, D, j, K;
|
|
1956
1956
|
const N = (() => {
|
|
1957
1957
|
var W;
|
|
1958
1958
|
try {
|
|
@@ -1978,7 +1978,7 @@ function Hf(e = {}) {
|
|
|
1978
1978
|
if (r)
|
|
1979
1979
|
W = { Authorization: `Bearer ${r}` };
|
|
1980
1980
|
else if (typeof window < "u") {
|
|
1981
|
-
const P = window.__AUTH_TOKEN__, _ = ((
|
|
1981
|
+
const P = window.__AUTH_TOKEN__, _ = ((k = window.localStorage) == null ? void 0 : k.getItem("authToken")) || null;
|
|
1982
1982
|
let O = null;
|
|
1983
1983
|
try {
|
|
1984
1984
|
const $ = (D = window.localStorage) == null ? void 0 : D.getItem("chat-settings");
|
|
@@ -2279,16 +2279,16 @@ function Rn({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2279
2279
|
o && L.current !== o && (L.current = o, D(o).catch(() => {
|
|
2280
2280
|
}));
|
|
2281
2281
|
}, [o]);
|
|
2282
|
-
const
|
|
2282
|
+
const k = rt(null), D = Ce(
|
|
2283
2283
|
async (_, O, X) => {
|
|
2284
2284
|
var $;
|
|
2285
|
-
if (
|
|
2286
|
-
|
|
2285
|
+
if (k.current !== _) {
|
|
2286
|
+
k.current = _;
|
|
2287
2287
|
try {
|
|
2288
2288
|
const z = O ?? (($ = (await s.listCheckpoints(_)).checkpoints.slice().sort((ae, V) => new Date(V.createdAt).getTime() - new Date(ae.createdAt).getTime())[0]) == null ? void 0 : $.checkpointId), le = await s.getMessages({ threadId: _, checkpointId: z, checkpointNs: X });
|
|
2289
2289
|
I(_), h(le.messages);
|
|
2290
2290
|
} finally {
|
|
2291
|
-
|
|
2291
|
+
k.current = null;
|
|
2292
2292
|
}
|
|
2293
2293
|
}
|
|
2294
2294
|
},
|
|
@@ -2305,10 +2305,19 @@ function Rn({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2305
2305
|
const _ = B.current;
|
|
2306
2306
|
if (B.current = a, _ && !a && C) {
|
|
2307
2307
|
const O = m.lastCheckpointId ?? void 0;
|
|
2308
|
-
|
|
2309
|
-
|
|
2308
|
+
(async () => {
|
|
2309
|
+
try {
|
|
2310
|
+
const X = await s.getMessages({ threadId: C, checkpointId: O });
|
|
2311
|
+
h(X.messages);
|
|
2312
|
+
} catch {
|
|
2313
|
+
}
|
|
2314
|
+
try {
|
|
2315
|
+
await N();
|
|
2316
|
+
} catch {
|
|
2317
|
+
}
|
|
2318
|
+
})();
|
|
2310
2319
|
}
|
|
2311
|
-
}, [a, C, m.lastCheckpointId, s, h]);
|
|
2320
|
+
}, [a, C, m.lastCheckpointId, s, h, N]);
|
|
2312
2321
|
const q = Ce(async (_) => {
|
|
2313
2322
|
const O = await s.createThread(_);
|
|
2314
2323
|
return await N(), await D(O.threadId), O.threadId;
|
|
@@ -2879,12 +2888,12 @@ function gp({
|
|
|
2879
2888
|
onRegenerate: I,
|
|
2880
2889
|
onEditFromCheckpoint: N,
|
|
2881
2890
|
onCancelEdit: L,
|
|
2882
|
-
onCopy:
|
|
2891
|
+
onCopy: k
|
|
2883
2892
|
}) {
|
|
2884
2893
|
const [D, j] = ce(!1), [K, W] = ce(!1), [B, q] = ce(!1), [F, G] = ce(!1), T = u === "phone" || u === "half-screen", P = e.role, _ = P === "tool", O = nt(() => bp(e.content), [e.content]), X = nt(() => Cp(e.content), [e.content]), $ = nt(() => e.content.filter((Y) => Y.type === "image_url"), [e.content]), z = nt(() => e.content.filter((Y) => Y.type === "file"), [e.content]), le = Np(O, n ? r : 0), ae = async () => {
|
|
2885
2894
|
try {
|
|
2886
2895
|
const Y = _ ? St(e.content) : O;
|
|
2887
|
-
await navigator.clipboard.writeText(Y), j(!0), setTimeout(() => j(!1), 2e3),
|
|
2896
|
+
await navigator.clipboard.writeText(Y), j(!0), setTimeout(() => j(!1), 2e3), k == null || k(Y);
|
|
2888
2897
|
} catch (Y) {
|
|
2889
2898
|
console.error("Failed to copy:", Y);
|
|
2890
2899
|
}
|
|
@@ -2965,21 +2974,21 @@ function gp({
|
|
|
2965
2974
|
return /* @__PURE__ */ c(Tp, { data: he });
|
|
2966
2975
|
}
|
|
2967
2976
|
if (_ && X.name === "get_issues") {
|
|
2968
|
-
const te = e.content.find((
|
|
2977
|
+
const te = e.content.find((M) => M.type === "tool_result"), he = (te == null ? void 0 : te.output) ?? St(e.content), ve = Ga(he);
|
|
2969
2978
|
if (ve) return /* @__PURE__ */ c(Ap, { issues: ve });
|
|
2970
2979
|
}
|
|
2971
2980
|
if (_ && !B) {
|
|
2972
2981
|
const te = St(e.content).slice(0, 80).replace(/\s+/g, " ");
|
|
2973
|
-
return /* @__PURE__ */ c("div", { className: A("text-xs font-mono opacity-70 flex items-center justify-between gap-2", T && "text-[10px]"), children: /* @__PURE__ */ R("span", { className: "truncate max-w-full", children: [
|
|
2982
|
+
return /* @__PURE__ */ c("div", { className: A("text-xs font-mono opacity-70 flex items-center justify-between gap-2 text-current", T && "text-[10px]"), children: /* @__PURE__ */ R("span", { className: "truncate max-w-full text-current", children: [
|
|
2974
2983
|
te,
|
|
2975
2984
|
te.length >= 80 ? "…" : ""
|
|
2976
2985
|
] }) });
|
|
2977
2986
|
}
|
|
2978
2987
|
if (_ && f) {
|
|
2979
2988
|
const te = St(e.content), he = te.length > d;
|
|
2980
|
-
return /* @__PURE__ */ c(As, { open: K, onOpenChange: W, children: /* @__PURE__ */ R("div", { className: "font-mono text-sm", children: [
|
|
2981
|
-
/* @__PURE__ */ c("pre", { className: A("whitespace-pre-wrap break-words", T && "text-xs"), children: he && !K ? te.substring(0, d) + "..." : te }),
|
|
2982
|
-
he && /* @__PURE__ */ c(Ps, { asChild: !0, children: /* @__PURE__ */ c(fe, { variant: "ghost", size: "sm", className: "h-6 text-xs", children: K ? /* @__PURE__ */ R(De, { children: [
|
|
2989
|
+
return /* @__PURE__ */ c(As, { open: K, onOpenChange: W, children: /* @__PURE__ */ R("div", { className: "font-mono text-sm text-current", children: [
|
|
2990
|
+
/* @__PURE__ */ c("pre", { className: A("whitespace-pre-wrap break-words text-current", T && "text-xs"), children: he && !K ? te.substring(0, d) + "..." : te }),
|
|
2991
|
+
he && /* @__PURE__ */ c(Ps, { asChild: !0, children: /* @__PURE__ */ c(fe, { variant: "ghost", size: "sm", className: "h-6 text-xs text-current", children: K ? /* @__PURE__ */ R(De, { children: [
|
|
2983
2992
|
/* @__PURE__ */ c(Wt, { className: "h-3 w-3 mr-1" }),
|
|
2984
2993
|
"Show less"
|
|
2985
2994
|
] }) : /* @__PURE__ */ R(De, { children: [
|
|
@@ -2995,7 +3004,7 @@ function gp({
|
|
|
2995
3004
|
if (te && vp(te))
|
|
2996
3005
|
return /* @__PURE__ */ c(gn, { content: te.trim() });
|
|
2997
3006
|
const he = St(e.content);
|
|
2998
|
-
return /* @__PURE__ */ c("div", { className: "font-mono text-sm", children: /* @__PURE__ */ c("pre", { className: A("whitespace-pre-wrap break-words", T && "text-xs"), children: he }) });
|
|
3007
|
+
return /* @__PURE__ */ c("div", { className: "font-mono text-sm text-current", children: /* @__PURE__ */ c("pre", { className: A("whitespace-pre-wrap break-words text-current", T && "text-xs"), children: he }) });
|
|
2999
3008
|
}
|
|
3000
3009
|
const Y = $.length > 0 && P !== "tool", ge = z.length > 0 && P !== "tool";
|
|
3001
3010
|
return /* @__PURE__ */ R("div", { children: [
|
|
@@ -3012,11 +3021,11 @@ function gp({
|
|
|
3012
3021
|
const he = O.trim();
|
|
3013
3022
|
if (he.length > g)
|
|
3014
3023
|
return /* @__PURE__ */ R(As, { open: F, onOpenChange: G, children: [
|
|
3015
|
-
/* @__PURE__ */ c("div", { className: A("text-sm", T && "text-xs"), children: F ? /* @__PURE__ */ c(gn, { content: he }) : /* @__PURE__ */ R("pre", { className: A("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0", T && "text-xs"), children: [
|
|
3024
|
+
/* @__PURE__ */ c("div", { className: A("text-sm text-current dark:text-primary-foreground", T && "text-xs"), children: F ? /* @__PURE__ */ c(gn, { content: he }) : /* @__PURE__ */ R("pre", { className: A("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-current dark:text-primary-foreground", T && "text-xs"), children: [
|
|
3016
3025
|
he.substring(0, g),
|
|
3017
3026
|
"..."
|
|
3018
3027
|
] }) }),
|
|
3019
|
-
/* @__PURE__ */ c(Ps, { asChild: !0, children: /* @__PURE__ */ c(fe, { variant: "ghost", size: "sm", className: "h-6 text-xs", children: F ? /* @__PURE__ */ R(De, { children: [
|
|
3028
|
+
/* @__PURE__ */ c(Ps, { asChild: !0, children: /* @__PURE__ */ c(fe, { variant: "ghost", size: "sm", className: "h-6 text-xs text-current dark:!text-primary-foreground", children: F ? /* @__PURE__ */ R(De, { children: [
|
|
3020
3029
|
/* @__PURE__ */ c(Wt, { className: "h-3 w-3 mr-1" }),
|
|
3021
3030
|
" Show less"
|
|
3022
3031
|
] }) : /* @__PURE__ */ R(De, { children: [
|
|
@@ -3037,19 +3046,19 @@ function gp({
|
|
|
3037
3046
|
] })
|
|
3038
3047
|
] }, he)) }),
|
|
3039
3048
|
ge && /* @__PURE__ */ c("div", { className: "mt-2 flex flex-wrap gap-2", children: z.map((te, he) => {
|
|
3040
|
-
const ve = te,
|
|
3049
|
+
const ve = te, M = ve.name || "file";
|
|
3041
3050
|
return /* @__PURE__ */ R(
|
|
3042
3051
|
"a",
|
|
3043
3052
|
{
|
|
3044
3053
|
href: ve.url,
|
|
3045
|
-
download:
|
|
3054
|
+
download: M,
|
|
3046
3055
|
target: "_blank",
|
|
3047
3056
|
rel: "noreferrer",
|
|
3048
3057
|
className: "inline-flex items-center gap-2 bg-gray-100 border border-gray-200 rounded px-2 py-1 text-xs hover:bg-gray-200",
|
|
3049
|
-
title:
|
|
3058
|
+
title: M,
|
|
3050
3059
|
children: [
|
|
3051
3060
|
/* @__PURE__ */ c("span", { className: "inline-block w-1.5 h-1.5 rounded-full bg-gray-400" }),
|
|
3052
|
-
/* @__PURE__ */ c("span", { className: "truncate max-w-[180px]", children:
|
|
3061
|
+
/* @__PURE__ */ c("span", { className: "truncate max-w-[180px]", children: M })
|
|
3053
3062
|
]
|
|
3054
3063
|
},
|
|
3055
3064
|
he
|
|
@@ -3074,7 +3083,7 @@ function gp({
|
|
|
3074
3083
|
Ha,
|
|
3075
3084
|
{
|
|
3076
3085
|
variant: "outline",
|
|
3077
|
-
className: A("text-xs flex items-center gap-1 cursor-pointer", T && "text-xs h-4"),
|
|
3086
|
+
className: A("text-xs flex items-center gap-1 cursor-pointer text-current", T && "text-xs h-4"),
|
|
3078
3087
|
onClick: () => q((Y) => !Y),
|
|
3079
3088
|
children: [
|
|
3080
3089
|
/* @__PURE__ */ c("span", { children: X.name }),
|
|
@@ -3082,7 +3091,7 @@ function gp({
|
|
|
3082
3091
|
]
|
|
3083
3092
|
}
|
|
3084
3093
|
),
|
|
3085
|
-
_ && !X.name && /* @__PURE__ */ c(fe, { variant: "ghost", size: "sm", className: "h-6 px-1", onClick: () => q((Y) => !Y), children: /* @__PURE__ */ R("span", { className: "text-xs flex items-center gap-1", children: [
|
|
3094
|
+
_ && !X.name && /* @__PURE__ */ c(fe, { variant: "ghost", size: "sm", className: "h-6 px-1 text-current", onClick: () => q((Y) => !Y), children: /* @__PURE__ */ R("span", { className: "text-xs flex items-center gap-1", children: [
|
|
3086
3095
|
"Tool Output ",
|
|
3087
3096
|
B ? /* @__PURE__ */ c(Wt, { className: "h-3 w-3" }) : /* @__PURE__ */ c(Tt, { className: "h-3 w-3" })
|
|
3088
3097
|
] }) })
|
|
@@ -3104,7 +3113,7 @@ function gp({
|
|
|
3104
3113
|
variant: "ghost",
|
|
3105
3114
|
size: "sm",
|
|
3106
3115
|
onClick: ae,
|
|
3107
|
-
className: A("h-6 w-6 p-0 hover:bg-background/50", T && "h-5 w-5"),
|
|
3116
|
+
className: A("h-6 w-6 p-0 hover:bg-background/50 text-current", T && "h-5 w-5"),
|
|
3108
3117
|
children: /* @__PURE__ */ c(ns, { className: A(D ? "text-success" : "", T ? "h-3 w-3" : "h-4 w-4") })
|
|
3109
3118
|
}
|
|
3110
3119
|
),
|
|
@@ -3114,7 +3123,7 @@ function gp({
|
|
|
3114
3123
|
variant: "ghost",
|
|
3115
3124
|
size: "sm",
|
|
3116
3125
|
onClick: V,
|
|
3117
|
-
className: A("h-6 w-6 p-0 hover:bg-background/50", T && "h-5 w-5"),
|
|
3126
|
+
className: A("h-6 w-6 p-0 hover:bg-background/50 text-current", T && "h-5 w-5"),
|
|
3118
3127
|
children: /* @__PURE__ */ c(rs, { className: A(T ? "h-3 w-3" : "h-4 w-4") })
|
|
3119
3128
|
}
|
|
3120
3129
|
),
|
|
@@ -3124,7 +3133,7 @@ function gp({
|
|
|
3124
3133
|
variant: "ghost",
|
|
3125
3134
|
size: "sm",
|
|
3126
3135
|
onClick: oe,
|
|
3127
|
-
className: A("h-6 w-6 p-0 hover:bg-background/50", T && "h-5 w-5"),
|
|
3136
|
+
className: A("h-6 w-6 p-0 hover:bg-background/50 text-current", T && "h-5 w-5"),
|
|
3128
3137
|
children: /* @__PURE__ */ c(Wr, { className: A(T ? "h-3 w-3" : "h-4 w-4") })
|
|
3129
3138
|
}
|
|
3130
3139
|
)
|
|
@@ -3160,7 +3169,7 @@ function gp({
|
|
|
3160
3169
|
{
|
|
3161
3170
|
variant: "ghost",
|
|
3162
3171
|
size: "sm",
|
|
3163
|
-
className: "h-6 w-6 p-0",
|
|
3172
|
+
className: "h-6 w-6 p-0 text-current",
|
|
3164
3173
|
disabled: !y.canGoBack,
|
|
3165
3174
|
onClick: () => x == null ? void 0 : x(),
|
|
3166
3175
|
title: "Go back to previous branch",
|
|
@@ -3172,7 +3181,7 @@ function gp({
|
|
|
3172
3181
|
{
|
|
3173
3182
|
variant: "ghost",
|
|
3174
3183
|
size: "sm",
|
|
3175
|
-
className: "h-6 w-6 p-0",
|
|
3184
|
+
className: "h-6 w-6 p-0 text-current",
|
|
3176
3185
|
disabled: !y.canGoForward,
|
|
3177
3186
|
onClick: () => E == null ? void 0 : E(),
|
|
3178
3187
|
title: "Go forward to next branch",
|
|
@@ -3196,7 +3205,7 @@ function gp({
|
|
|
3196
3205
|
variant: "ghost",
|
|
3197
3206
|
size: "sm",
|
|
3198
3207
|
onClick: ae,
|
|
3199
|
-
className: A("h-6 w-6 p-0 hover:bg-background/50", T && "h-5 w-5"),
|
|
3208
|
+
className: A("h-6 w-6 p-0 hover:bg-background/50 text-current", T && "h-5 w-5"),
|
|
3200
3209
|
children: /* @__PURE__ */ c(ns, { className: A(D ? "text-success" : "", T ? "h-3 w-3" : "h-4 w-4") })
|
|
3201
3210
|
}
|
|
3202
3211
|
),
|
|
@@ -3206,7 +3215,7 @@ function gp({
|
|
|
3206
3215
|
variant: "ghost",
|
|
3207
3216
|
size: "sm",
|
|
3208
3217
|
onClick: V,
|
|
3209
|
-
className: A("h-6 w-6 p-0 hover:bg-background/50", T && "h-5 w-5"),
|
|
3218
|
+
className: A("h-6 w-6 p-0 hover:bg-background/50 text-current", T && "h-5 w-5"),
|
|
3210
3219
|
children: /* @__PURE__ */ c(rs, { className: A(T ? "h-3 w-3" : "h-4 w-4") })
|
|
3211
3220
|
}
|
|
3212
3221
|
),
|
|
@@ -3216,7 +3225,7 @@ function gp({
|
|
|
3216
3225
|
variant: "ghost",
|
|
3217
3226
|
size: "sm",
|
|
3218
3227
|
onClick: oe,
|
|
3219
|
-
className: A("h-6 w-6 p-0 hover:bg-background/50", T && "h-5 w-5"),
|
|
3228
|
+
className: A("h-6 w-6 p-0 hover:bg-background/50 text-current", T && "h-5 w-5"),
|
|
3220
3229
|
children: /* @__PURE__ */ c(Wr, { className: A(T ? "h-3 w-3" : "h-4 w-4") })
|
|
3221
3230
|
}
|
|
3222
3231
|
)
|
|
@@ -3519,7 +3528,7 @@ function ye(e) {
|
|
|
3519
3528
|
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
3520
3529
|
}, []);
|
|
3521
3530
|
}
|
|
3522
|
-
function
|
|
3531
|
+
function kp(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
3523
3532
|
const n = ye(e);
|
|
3524
3533
|
l.useEffect(() => {
|
|
3525
3534
|
const r = (o) => {
|
|
@@ -3528,7 +3537,7 @@ function Mp(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
3528
3537
|
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
3529
3538
|
}, [n, t]);
|
|
3530
3539
|
}
|
|
3531
|
-
var
|
|
3540
|
+
var Mp = "DismissableLayer", Yr = "dismissableLayer.update", Dp = "dismissableLayer.pointerDownOutside", Lp = "dismissableLayer.focusOutside", Is, qa = l.createContext({
|
|
3532
3541
|
layers: /* @__PURE__ */ new Set(),
|
|
3533
3542
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
3534
3543
|
branches: /* @__PURE__ */ new Set()
|
|
@@ -3543,13 +3552,13 @@ var kp = "DismissableLayer", Yr = "dismissableLayer.update", Dp = "dismissableLa
|
|
|
3543
3552
|
onDismiss: i,
|
|
3544
3553
|
...u
|
|
3545
3554
|
} = e, f = l.useContext(qa), [d, p] = l.useState(null), g = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, v] = l.useState({}), m = ne(t, (N) => p(N)), h = Array.from(f.layers), [b] = [...f.layersWithOutsidePointerEventsDisabled].slice(-1), w = h.indexOf(b), y = d ? h.indexOf(d) : -1, x = f.layersWithOutsidePointerEventsDisabled.size > 0, E = y >= w, C = Bp((N) => {
|
|
3546
|
-
const L = N.target,
|
|
3547
|
-
!E ||
|
|
3555
|
+
const L = N.target, k = [...f.branches].some((D) => D.contains(L));
|
|
3556
|
+
!E || k || (o == null || o(N), a == null || a(N), N.defaultPrevented || i == null || i());
|
|
3548
3557
|
}, g), I = Up((N) => {
|
|
3549
3558
|
const L = N.target;
|
|
3550
3559
|
[...f.branches].some((D) => D.contains(L)) || (s == null || s(N), a == null || a(N), N.defaultPrevented || i == null || i());
|
|
3551
3560
|
}, g);
|
|
3552
|
-
return
|
|
3561
|
+
return kp((N) => {
|
|
3553
3562
|
y === f.layers.size - 1 && (r == null || r(N), !N.defaultPrevented && i && (N.preventDefault(), i()));
|
|
3554
3563
|
}, g), l.useEffect(() => {
|
|
3555
3564
|
if (d)
|
|
@@ -3580,7 +3589,7 @@ var kp = "DismissableLayer", Yr = "dismissableLayer.update", Dp = "dismissableLa
|
|
|
3580
3589
|
);
|
|
3581
3590
|
}
|
|
3582
3591
|
);
|
|
3583
|
-
ln.displayName =
|
|
3592
|
+
ln.displayName = Mp;
|
|
3584
3593
|
var Fp = "DismissableLayerBranch", $p = l.forwardRef((e, t) => {
|
|
3585
3594
|
const n = l.useContext(qa), r = l.useRef(null), o = ne(t, r);
|
|
3586
3595
|
return l.useEffect(() => {
|
|
@@ -3648,16 +3657,16 @@ var _r = 0;
|
|
|
3648
3657
|
function Eo() {
|
|
3649
3658
|
l.useEffect(() => {
|
|
3650
3659
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
3651
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ??
|
|
3660
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? ks()), document.body.insertAdjacentElement("beforeend", e[1] ?? ks()), _r++, () => {
|
|
3652
3661
|
_r === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), _r--;
|
|
3653
3662
|
};
|
|
3654
3663
|
}, []);
|
|
3655
3664
|
}
|
|
3656
|
-
function
|
|
3665
|
+
function ks() {
|
|
3657
3666
|
const e = document.createElement("span");
|
|
3658
3667
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
3659
3668
|
}
|
|
3660
|
-
var Ir = "focusScope.autoFocusOnMount", Or = "focusScope.autoFocusOnUnmount",
|
|
3669
|
+
var Ir = "focusScope.autoFocusOnMount", Or = "focusScope.autoFocusOnUnmount", Ms = { bubbles: !1, cancelable: !0 }, zp = "FocusScope", nr = l.forwardRef((e, t) => {
|
|
3661
3670
|
const {
|
|
3662
3671
|
loop: n = !1,
|
|
3663
3672
|
trapped: r = !1,
|
|
@@ -3699,12 +3708,12 @@ var Ir = "focusScope.autoFocusOnMount", Or = "focusScope.autoFocusOnUnmount", ks
|
|
|
3699
3708
|
Ls.add(v);
|
|
3700
3709
|
const h = document.activeElement;
|
|
3701
3710
|
if (!i.contains(h)) {
|
|
3702
|
-
const w = new CustomEvent(Ir,
|
|
3711
|
+
const w = new CustomEvent(Ir, Ms);
|
|
3703
3712
|
i.addEventListener(Ir, f), i.dispatchEvent(w), w.defaultPrevented || (Hp(Gp(Ya(i)), { select: !0 }), document.activeElement === h && et(i));
|
|
3704
3713
|
}
|
|
3705
3714
|
return () => {
|
|
3706
3715
|
i.removeEventListener(Ir, f), setTimeout(() => {
|
|
3707
|
-
const w = new CustomEvent(Or,
|
|
3716
|
+
const w = new CustomEvent(Or, Ms);
|
|
3708
3717
|
i.addEventListener(Or, d), i.dispatchEvent(w), w.defaultPrevented || et(h ?? document.body, { select: !0 }), i.removeEventListener(Or, d), Ls.remove(v);
|
|
3709
3718
|
}, 0);
|
|
3710
3719
|
};
|
|
@@ -4070,7 +4079,7 @@ const ah = (e) => ({
|
|
|
4070
4079
|
}, v = To(o), m = No(v), h = await a.getDimensions(f), b = v === "y", w = b ? "top" : "left", y = b ? "bottom" : "right", x = b ? "clientHeight" : "clientWidth", E = s.reference[m] + s.reference[v] - g[v] - s.floating[m], C = g[v] - s.reference[v], I = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(f));
|
|
4071
4080
|
let N = I ? I[x] : 0;
|
|
4072
4081
|
(!N || !await (a.isElement == null ? void 0 : a.isElement(I))) && (N = i.floating[x] || s.floating[m]);
|
|
4073
|
-
const L = E / 2 - C / 2,
|
|
4082
|
+
const L = E / 2 - C / 2, k = N / 2 - h[m] / 2 - 1, D = st(p[w], k), j = st(p[y], k), K = D, W = N - h[m] - j, B = N / 2 - h[m] / 2 + L, q = Jr(K, B, W), F = !u.arrow && $t(o) != null && B !== q && s.reference[m] / 2 - (B < K ? D : j) - h[m] / 2 < 0, G = F ? B < K ? B - K : B - W : 0;
|
|
4074
4083
|
return {
|
|
4075
4084
|
[v]: g[v] + G,
|
|
4076
4085
|
data: {
|
|
@@ -4109,16 +4118,16 @@ const ah = (e) => ({
|
|
|
4109
4118
|
return {};
|
|
4110
4119
|
const w = Ze(o), y = je(i), x = Ze(i) === i, E = await (u.isRTL == null ? void 0 : u.isRTL(f.floating)), C = g || (x || !h ? [Bn(i)] : Qp(i)), I = m !== "none";
|
|
4111
4120
|
!g && I && C.push(...rh(i, h, m, E));
|
|
4112
|
-
const N = [i, ...C], L = await Jt(t, b),
|
|
4121
|
+
const N = [i, ...C], L = await Jt(t, b), k = [];
|
|
4113
4122
|
let D = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
4114
|
-
if (d &&
|
|
4123
|
+
if (d && k.push(L[w]), p) {
|
|
4115
4124
|
const B = Zp(o, a, E);
|
|
4116
|
-
|
|
4125
|
+
k.push(L[B[0]], L[B[1]]);
|
|
4117
4126
|
}
|
|
4118
4127
|
if (D = [...D, {
|
|
4119
4128
|
placement: o,
|
|
4120
|
-
overflows:
|
|
4121
|
-
}], !
|
|
4129
|
+
overflows: k
|
|
4130
|
+
}], !k.every((B) => B <= 0)) {
|
|
4122
4131
|
var j, K;
|
|
4123
4132
|
const B = (((j = s.flip) == null ? void 0 : j.index) || 0) + 1, q = N[B];
|
|
4124
4133
|
if (q && (!(p === "alignment" ? y !== je(q) : !1) || // We leave the current main axis only if every placement on that axis
|
|
@@ -4397,8 +4406,8 @@ const uh = function(e) {
|
|
|
4397
4406
|
availableWidth: L,
|
|
4398
4407
|
availableHeight: N
|
|
4399
4408
|
});
|
|
4400
|
-
const
|
|
4401
|
-
return m !==
|
|
4409
|
+
const k = await a.getDimensions(i.floating);
|
|
4410
|
+
return m !== k.width || h !== k.height ? {
|
|
4402
4411
|
reset: {
|
|
4403
4412
|
rects: !0
|
|
4404
4413
|
}
|
|
@@ -4718,7 +4727,7 @@ function Oh(e) {
|
|
|
4718
4727
|
y: u.top
|
|
4719
4728
|
};
|
|
4720
4729
|
}
|
|
4721
|
-
function
|
|
4730
|
+
function kh(e) {
|
|
4722
4731
|
const {
|
|
4723
4732
|
width: t,
|
|
4724
4733
|
height: n
|
|
@@ -4728,7 +4737,7 @@ function Mh(e) {
|
|
|
4728
4737
|
height: n
|
|
4729
4738
|
};
|
|
4730
4739
|
}
|
|
4731
|
-
function
|
|
4740
|
+
function Mh(e, t, n) {
|
|
4732
4741
|
const r = qe(t), o = Xe(t), s = n === "fixed", a = ht(e, !0, s, t);
|
|
4733
4742
|
let i = {
|
|
4734
4743
|
scrollLeft: 0,
|
|
@@ -4752,7 +4761,7 @@ function kh(e, t, n) {
|
|
|
4752
4761
|
height: a.height
|
|
4753
4762
|
};
|
|
4754
4763
|
}
|
|
4755
|
-
function
|
|
4764
|
+
function kr(e) {
|
|
4756
4765
|
return $e(e).position === "static";
|
|
4757
4766
|
}
|
|
4758
4767
|
function Ks(e, t) {
|
|
@@ -4770,21 +4779,21 @@ function si(e, t) {
|
|
|
4770
4779
|
if (!qe(e)) {
|
|
4771
4780
|
let o = at(e);
|
|
4772
4781
|
for (; o && !Ot(o); ) {
|
|
4773
|
-
if (Fe(o) && !
|
|
4782
|
+
if (Fe(o) && !kr(o))
|
|
4774
4783
|
return o;
|
|
4775
4784
|
o = at(o);
|
|
4776
4785
|
}
|
|
4777
4786
|
return n;
|
|
4778
4787
|
}
|
|
4779
4788
|
let r = Ks(e, t);
|
|
4780
|
-
for (; r && gh(r) &&
|
|
4789
|
+
for (; r && gh(r) && kr(r); )
|
|
4781
4790
|
r = Ks(r, t);
|
|
4782
|
-
return r && Ot(r) &&
|
|
4791
|
+
return r && Ot(r) && kr(r) && !Ao(r) ? n : r || xh(e) || n;
|
|
4783
4792
|
}
|
|
4784
4793
|
const Dh = async function(e) {
|
|
4785
4794
|
const t = this.getOffsetParent || si, n = this.getDimensions, r = await n(e.floating);
|
|
4786
4795
|
return {
|
|
4787
|
-
reference:
|
|
4796
|
+
reference: Mh(e.reference, await t(e.floating), e.strategy),
|
|
4788
4797
|
floating: {
|
|
4789
4798
|
x: 0,
|
|
4790
4799
|
y: 0,
|
|
@@ -4803,7 +4812,7 @@ const Fh = {
|
|
|
4803
4812
|
getOffsetParent: si,
|
|
4804
4813
|
getElementRects: Dh,
|
|
4805
4814
|
getClientRects: Nh,
|
|
4806
|
-
getDimensions:
|
|
4815
|
+
getDimensions: kh,
|
|
4807
4816
|
getScale: At,
|
|
4808
4817
|
isElement: Fe,
|
|
4809
4818
|
isRTL: Lh
|
|
@@ -4945,7 +4954,7 @@ function qs(e, t) {
|
|
|
4945
4954
|
const n = ii(e);
|
|
4946
4955
|
return Math.round(t * n) / n;
|
|
4947
4956
|
}
|
|
4948
|
-
function
|
|
4957
|
+
function Mr(e) {
|
|
4949
4958
|
const t = l.useRef(e);
|
|
4950
4959
|
return Nn(() => {
|
|
4951
4960
|
t.current = e;
|
|
@@ -4978,7 +4987,7 @@ function Xh(e) {
|
|
|
4978
4987
|
T !== I.current && (I.current = T, h(T));
|
|
4979
4988
|
}, []), x = l.useCallback((T) => {
|
|
4980
4989
|
T !== N.current && (N.current = T, w(T));
|
|
4981
|
-
}, []), E = s || m, C = a || b, I = l.useRef(null), N = l.useRef(null), L = l.useRef(d),
|
|
4990
|
+
}, []), E = s || m, C = a || b, I = l.useRef(null), N = l.useRef(null), L = l.useRef(d), k = u != null, D = Mr(u), j = Mr(o), K = Mr(f), W = l.useCallback(() => {
|
|
4982
4991
|
if (!I.current || !N.current)
|
|
4983
4992
|
return;
|
|
4984
4993
|
const T = {
|
|
@@ -5015,7 +5024,7 @@ function Xh(e) {
|
|
|
5015
5024
|
return D.current(E, C, W);
|
|
5016
5025
|
W();
|
|
5017
5026
|
}
|
|
5018
|
-
}, [E, C, W, D,
|
|
5027
|
+
}, [E, C, W, D, k]);
|
|
5019
5028
|
const q = l.useMemo(() => ({
|
|
5020
5029
|
reference: I,
|
|
5021
5030
|
floating: N,
|
|
@@ -5168,7 +5177,7 @@ var Oo = "PopperContent", [im, cm] = ui(Oo), mi = l.forwardRef(
|
|
|
5168
5177
|
updatePositionStrategy: v = "optimized",
|
|
5169
5178
|
onPlaced: m,
|
|
5170
5179
|
...h
|
|
5171
|
-
} = e, b = di(Oo, n), [w, y] = l.useState(null), x = ne(t, (de) => y(de)), [E, C] = l.useState(null), I = li(E), N = (I == null ? void 0 : I.width) ?? 0, L = (I == null ? void 0 : I.height) ?? 0,
|
|
5180
|
+
} = e, b = di(Oo, n), [w, y] = l.useState(null), x = ne(t, (de) => y(de)), [E, C] = l.useState(null), I = li(E), N = (I == null ? void 0 : I.width) ?? 0, L = (I == null ? void 0 : I.height) ?? 0, k = r + (s !== "center" ? "-" + s : ""), D = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, j = Array.isArray(f) ? f : [f], K = j.length > 0, W = {
|
|
5172
5181
|
padding: D,
|
|
5173
5182
|
boundary: j.filter(um),
|
|
5174
5183
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
@@ -5176,7 +5185,7 @@ var Oo = "PopperContent", [im, cm] = ui(Oo), mi = l.forwardRef(
|
|
|
5176
5185
|
}, { refs: B, floatingStyles: q, placement: F, isPositioned: G, middlewareData: T } = Xh({
|
|
5177
5186
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
5178
5187
|
strategy: "fixed",
|
|
5179
|
-
placement:
|
|
5188
|
+
placement: k,
|
|
5180
5189
|
whileElementsMounted: (...de) => Bh(...de, {
|
|
5181
5190
|
animationFrame: v === "always"
|
|
5182
5191
|
}),
|
|
@@ -5333,7 +5342,7 @@ function vi(e) {
|
|
|
5333
5342
|
const [t, n = "center"] = e.split("-");
|
|
5334
5343
|
return [t, n];
|
|
5335
5344
|
}
|
|
5336
|
-
var
|
|
5345
|
+
var ko = fi, Mo = hi, Do = mi, Lo = bi, fm = "Portal", ir = l.forwardRef((e, t) => {
|
|
5337
5346
|
var i;
|
|
5338
5347
|
const { container: n, ...r } = e, [o, s] = l.useState(!1);
|
|
5339
5348
|
be(() => s(!0), []);
|
|
@@ -5403,8 +5412,8 @@ var vm = l.forwardRef((e, t) => {
|
|
|
5403
5412
|
C.current = !0;
|
|
5404
5413
|
}),
|
|
5405
5414
|
onFocus: U(e.onFocus, (L) => {
|
|
5406
|
-
const
|
|
5407
|
-
if (L.target === L.currentTarget &&
|
|
5415
|
+
const k = !C.current;
|
|
5416
|
+
if (L.target === L.currentTarget && k && !w) {
|
|
5408
5417
|
const D = new CustomEvent(Dr, pm);
|
|
5409
5418
|
if (L.currentTarget.dispatchEvent(D), !D.defaultPrevented) {
|
|
5410
5419
|
const j = E().filter((F) => F.focusable), K = j.find((F) => F.active), W = j.find((F) => F.id === h), q = [K, W, ...j].filter(
|
|
@@ -5601,7 +5610,7 @@ function Im(e, t) {
|
|
|
5601
5610
|
return n.callback = t, n.facade;
|
|
5602
5611
|
}
|
|
5603
5612
|
var Om = typeof window < "u" ? l.useLayoutEffect : l.useEffect, Xs = /* @__PURE__ */ new WeakMap();
|
|
5604
|
-
function
|
|
5613
|
+
function km(e, t) {
|
|
5605
5614
|
var n = Im(null, function(r) {
|
|
5606
5615
|
return e.forEach(function(o) {
|
|
5607
5616
|
return Fr(o, r);
|
|
@@ -5620,11 +5629,11 @@ function Mm(e, t) {
|
|
|
5620
5629
|
Xs.set(n, e);
|
|
5621
5630
|
}, [e]), n;
|
|
5622
5631
|
}
|
|
5623
|
-
function
|
|
5632
|
+
function Mm(e) {
|
|
5624
5633
|
return e;
|
|
5625
5634
|
}
|
|
5626
5635
|
function Dm(e, t) {
|
|
5627
|
-
t === void 0 && (t =
|
|
5636
|
+
t === void 0 && (t = Mm);
|
|
5628
5637
|
var n = [], r = !1, o = {
|
|
5629
5638
|
read: function() {
|
|
5630
5639
|
if (r)
|
|
@@ -5702,7 +5711,7 @@ var Ai = Lm(), $r = function() {
|
|
|
5702
5711
|
onScrollCapture: $r,
|
|
5703
5712
|
onWheelCapture: $r,
|
|
5704
5713
|
onTouchMoveCapture: $r
|
|
5705
|
-
}), o = r[0], s = r[1], a = e.forwardProps, i = e.children, u = e.className, f = e.removeScrollBar, d = e.enabled, p = e.shards, g = e.sideCar, v = e.noRelative, m = e.noIsolation, h = e.inert, b = e.allowPinchZoom, w = e.as, y = w === void 0 ? "div" : w, x = e.gapMode, E = Ni(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = g, I =
|
|
5714
|
+
}), o = r[0], s = r[1], a = e.forwardProps, i = e.children, u = e.className, f = e.removeScrollBar, d = e.enabled, p = e.shards, g = e.sideCar, v = e.noRelative, m = e.noIsolation, h = e.inert, b = e.allowPinchZoom, w = e.as, y = w === void 0 ? "div" : w, x = e.gapMode, E = Ni(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = g, I = km([n, t]), N = Ve(Ve({}, E), o);
|
|
5706
5715
|
return l.createElement(
|
|
5707
5716
|
l.Fragment,
|
|
5708
5717
|
null,
|
|
@@ -5963,8 +5972,8 @@ function ig(e) {
|
|
|
5963
5972
|
return !1;
|
|
5964
5973
|
if (!r.current && "changedTouches" in h && (x || E) && (r.current = C), !C)
|
|
5965
5974
|
return !0;
|
|
5966
|
-
var
|
|
5967
|
-
return rg(
|
|
5975
|
+
var k = r.current || C;
|
|
5976
|
+
return rg(k, b, h, k === "h" ? x : E);
|
|
5968
5977
|
}, []), u = l.useCallback(function(h) {
|
|
5969
5978
|
var b = h;
|
|
5970
5979
|
if (!(!Rt.length || Rt[Rt.length - 1] !== s)) {
|
|
@@ -6025,13 +6034,13 @@ var lr = l.forwardRef(function(e, t) {
|
|
|
6025
6034
|
return l.createElement(cr, Ve({}, e, { ref: t, sideCar: lg }));
|
|
6026
6035
|
});
|
|
6027
6036
|
lr.classNames = cr.classNames;
|
|
6028
|
-
var no = ["Enter", " "], ug = ["ArrowDown", "PageUp", "Home"],
|
|
6037
|
+
var no = ["Enter", " "], ug = ["ArrowDown", "PageUp", "Home"], ki = ["ArrowUp", "PageDown", "End"], dg = [...ug, ...ki], fg = {
|
|
6029
6038
|
ltr: [...no, "ArrowRight"],
|
|
6030
6039
|
rtl: [...no, "ArrowLeft"]
|
|
6031
6040
|
}, pg = {
|
|
6032
6041
|
ltr: ["ArrowLeft"],
|
|
6033
6042
|
rtl: ["ArrowRight"]
|
|
6034
|
-
}, fn = "Menu", [Qt, hg, mg] = Co(fn), [vt,
|
|
6043
|
+
}, fn = "Menu", [Qt, hg, mg] = Co(fn), [vt, Mi] = Ue(fn, [
|
|
6035
6044
|
mg,
|
|
6036
6045
|
Ut,
|
|
6037
6046
|
yi
|
|
@@ -6044,7 +6053,7 @@ var no = ["Enter", " "], ug = ["ArrowDown", "PageUp", "Home"], Mi = ["ArrowUp",
|
|
|
6044
6053
|
return document.addEventListener("keydown", v, { capture: !0 }), () => {
|
|
6045
6054
|
document.removeEventListener("keydown", v, { capture: !0 }), document.removeEventListener("pointerdown", m, { capture: !0 }), document.removeEventListener("pointermove", m, { capture: !0 });
|
|
6046
6055
|
};
|
|
6047
|
-
}, []), /* @__PURE__ */ c(
|
|
6056
|
+
}, []), /* @__PURE__ */ c(ko, { ...i, children: /* @__PURE__ */ c(
|
|
6048
6057
|
gg,
|
|
6049
6058
|
{
|
|
6050
6059
|
scope: t,
|
|
@@ -6070,7 +6079,7 @@ Li.displayName = fn;
|
|
|
6070
6079
|
var vg = "MenuAnchor", $o = l.forwardRef(
|
|
6071
6080
|
(e, t) => {
|
|
6072
6081
|
const { __scopeMenu: n, ...r } = e, o = ur(n);
|
|
6073
|
-
return /* @__PURE__ */ c(
|
|
6082
|
+
return /* @__PURE__ */ c(Mo, { ...o, ...r, ref: t });
|
|
6074
6083
|
}
|
|
6075
6084
|
);
|
|
6076
6085
|
$o.displayName = vg;
|
|
@@ -6139,14 +6148,14 @@ var Oe = "MenuContent", [yg, Uo] = vt(Oe), Bi = l.forwardRef(
|
|
|
6139
6148
|
onDismiss: v,
|
|
6140
6149
|
disableOutsideScroll: m,
|
|
6141
6150
|
...h
|
|
6142
|
-
} = e, b = wt(Oe, n), w = pn(Oe, n), y = ur(n), x = Di(n), E = hg(n), [C, I] = l.useState(null), N = l.useRef(null), L = ne(t, N, b.onContentChange),
|
|
6151
|
+
} = e, b = wt(Oe, n), w = pn(Oe, n), y = ur(n), x = Di(n), E = hg(n), [C, I] = l.useState(null), N = l.useRef(null), L = ne(t, N, b.onContentChange), k = l.useRef(0), D = l.useRef(""), j = l.useRef(0), K = l.useRef(null), W = l.useRef("right"), B = l.useRef(0), q = m ? lr : l.Fragment, F = m ? { as: Cg, allowPinchZoom: !0 } : void 0, G = (P) => {
|
|
6143
6152
|
var V, oe;
|
|
6144
6153
|
const _ = D.current + P, O = E().filter((ie) => !ie.disabled), X = document.activeElement, $ = (V = O.find((ie) => ie.ref.current === X)) == null ? void 0 : V.textValue, z = O.map((ie) => ie.textValue), le = Dg(z, _, $), ae = (oe = O.find((ie) => ie.textValue === le)) == null ? void 0 : oe.ref.current;
|
|
6145
6154
|
(function ie(se) {
|
|
6146
|
-
D.current = se, window.clearTimeout(
|
|
6155
|
+
D.current = se, window.clearTimeout(k.current), se !== "" && (k.current = window.setTimeout(() => ie(""), 1e3));
|
|
6147
6156
|
})(_), ae && setTimeout(() => ae.focus());
|
|
6148
6157
|
};
|
|
6149
|
-
l.useEffect(() => () => window.clearTimeout(
|
|
6158
|
+
l.useEffect(() => () => window.clearTimeout(k.current), []), Eo();
|
|
6150
6159
|
const T = l.useCallback((P) => {
|
|
6151
6160
|
var O, X;
|
|
6152
6161
|
return W.current === ((O = K.current) == null ? void 0 : O.side) && Fg(P, (X = K.current) == null ? void 0 : X.area);
|
|
@@ -6232,10 +6241,10 @@ var Oe = "MenuContent", [yg, Uo] = vt(Oe), Bi = l.forwardRef(
|
|
|
6232
6241
|
if (P.target !== z || !dg.includes(P.key)) return;
|
|
6233
6242
|
P.preventDefault();
|
|
6234
6243
|
const ae = E().filter((V) => !V.disabled).map((V) => V.ref.current);
|
|
6235
|
-
|
|
6244
|
+
ki.includes(P.key) && ae.reverse(), kg(ae);
|
|
6236
6245
|
}),
|
|
6237
6246
|
onBlur: U(e.onBlur, (P) => {
|
|
6238
|
-
P.currentTarget.contains(P.target) || (window.clearTimeout(
|
|
6247
|
+
P.currentTarget.contains(P.target) || (window.clearTimeout(k.current), D.current = "");
|
|
6239
6248
|
}),
|
|
6240
6249
|
onPointerMove: U(
|
|
6241
6250
|
e.onPointerMove,
|
|
@@ -6562,17 +6571,17 @@ function Wn(e) {
|
|
|
6562
6571
|
function Vo(e) {
|
|
6563
6572
|
return Wn(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
6564
6573
|
}
|
|
6565
|
-
function
|
|
6574
|
+
function kg(e) {
|
|
6566
6575
|
const t = document.activeElement;
|
|
6567
6576
|
for (const n of e)
|
|
6568
6577
|
if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
6569
6578
|
}
|
|
6570
|
-
function
|
|
6579
|
+
function Mg(e, t) {
|
|
6571
6580
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
6572
6581
|
}
|
|
6573
6582
|
function Dg(e, t, n) {
|
|
6574
6583
|
const o = t.length > 1 && Array.from(t).every((f) => f === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
|
|
6575
|
-
let a =
|
|
6584
|
+
let a = Mg(e, Math.max(s, 0));
|
|
6576
6585
|
o.length === 1 && (a = a.filter((f) => f !== n));
|
|
6577
6586
|
const u = a.find(
|
|
6578
6587
|
(f) => f.toLowerCase().startsWith(o.toLowerCase())
|
|
@@ -6598,8 +6607,8 @@ function en(e) {
|
|
|
6598
6607
|
}
|
|
6599
6608
|
var $g = Li, Bg = $o, Ug = $i, zg = Bi, Hg = Ho, Wg = Ui, Vg = dr, jg = Hi, Kg = Vi, Gg = Ki, qg = qi, Xg = Xi, Yg = Yi, Jg = Zi, Zg = ec, fr = "DropdownMenu", [Qg, Cy] = Ue(
|
|
6600
6609
|
fr,
|
|
6601
|
-
[
|
|
6602
|
-
), Ee =
|
|
6610
|
+
[Mi]
|
|
6611
|
+
), Ee = Mi(), [eb, nc] = Qg(fr), rc = (e) => {
|
|
6603
6612
|
const {
|
|
6604
6613
|
__scopeDropdownMenu: t,
|
|
6605
6614
|
children: n,
|
|
@@ -6907,30 +6916,30 @@ function Pn({
|
|
|
6907
6916
|
listCheckpoints: y,
|
|
6908
6917
|
navigateToCheckpoint: x,
|
|
6909
6918
|
returnToLatest: E
|
|
6910
|
-
} = Ua(), [C, I] = ce(""), [N, L] = ce(null), [
|
|
6919
|
+
} = Ua(), [C, I] = ce(""), [N, L] = ce(null), [k, D] = ce(null), [j, K] = ce([]), [W, B] = ce(!1), [q, F] = ce([]), [G, T] = ce(null), P = rt(null), _ = rt(null), O = rt(null), [X, $] = ce("desktop");
|
|
6911
6920
|
we(() => {
|
|
6912
|
-
const
|
|
6921
|
+
const M = () => {
|
|
6913
6922
|
const Q = window.innerWidth;
|
|
6914
6923
|
$(Q < 640 ? "phone" : Q < 1024 ? "tablet" : "desktop");
|
|
6915
6924
|
};
|
|
6916
|
-
return
|
|
6925
|
+
return M(), window.addEventListener("resize", M), () => window.removeEventListener("resize", M);
|
|
6917
6926
|
}, []), we(() => {
|
|
6918
|
-
var
|
|
6919
|
-
(
|
|
6927
|
+
var M;
|
|
6928
|
+
(M = P.current) == null || M.scrollIntoView({ behavior: "smooth" });
|
|
6920
6929
|
}, [p]), we(() => {
|
|
6921
|
-
var
|
|
6922
|
-
n && ((
|
|
6930
|
+
var M;
|
|
6931
|
+
n && ((M = _.current) == null || M.focus());
|
|
6923
6932
|
}, [n]), we(() => {
|
|
6924
6933
|
m && !W && (f == null || f(m));
|
|
6925
6934
|
}, [m, W, f]), we(() => {
|
|
6926
|
-
let
|
|
6935
|
+
let M = !0;
|
|
6927
6936
|
if (!d) {
|
|
6928
6937
|
F([]), T(null);
|
|
6929
6938
|
return;
|
|
6930
6939
|
}
|
|
6931
6940
|
return y(d).then((Q) => {
|
|
6932
6941
|
var Re;
|
|
6933
|
-
if (!
|
|
6942
|
+
if (!M) return;
|
|
6934
6943
|
const re = Q.checkpoints || [];
|
|
6935
6944
|
F(re);
|
|
6936
6945
|
const ue = ((Re = re.slice().sort(
|
|
@@ -6939,32 +6948,32 @@ function Pn({
|
|
|
6939
6948
|
T((yt) => yt ?? ue);
|
|
6940
6949
|
}).catch(() => {
|
|
6941
6950
|
}), () => {
|
|
6942
|
-
|
|
6951
|
+
M = !1;
|
|
6943
6952
|
};
|
|
6944
6953
|
}, [d, y]), we(() => {
|
|
6945
6954
|
w && T(w);
|
|
6946
6955
|
}, [w]);
|
|
6947
|
-
const z = (
|
|
6948
|
-
if (
|
|
6949
|
-
return `Message too long (${
|
|
6956
|
+
const z = (M) => {
|
|
6957
|
+
if (M.length > Nt)
|
|
6958
|
+
return `Message too long (${M.length}/${Nt} characters)`;
|
|
6950
6959
|
try {
|
|
6951
|
-
return Ip(
|
|
6960
|
+
return Ip(M), null;
|
|
6952
6961
|
} catch (Q) {
|
|
6953
6962
|
return (Q == null ? void 0 : Q.message) || "Invalid message";
|
|
6954
6963
|
}
|
|
6955
|
-
}, le = (
|
|
6956
|
-
const Q =
|
|
6964
|
+
}, le = (M) => {
|
|
6965
|
+
const Q = M.content || [], re = Q.filter((ue) => ue.type === "text").map((ue) => ue.text).join("");
|
|
6957
6966
|
if (re) return re;
|
|
6958
6967
|
try {
|
|
6959
6968
|
return JSON.stringify(Q, null, 2);
|
|
6960
6969
|
} catch {
|
|
6961
6970
|
return String(Q);
|
|
6962
6971
|
}
|
|
6963
|
-
}, ae = (
|
|
6972
|
+
}, ae = (M) => {
|
|
6964
6973
|
var yt;
|
|
6965
6974
|
if (!q.length)
|
|
6966
6975
|
return [];
|
|
6967
|
-
const re = (((yt = p[
|
|
6976
|
+
const re = (((yt = p[M]) == null ? void 0 : yt.role) ?? "user") === "user", ue = re ? M + 2 : M + 1;
|
|
6968
6977
|
return q.filter((Se) => (Se.messagesLen ?? -1) >= (re ? ue : 0)).filter((Se) => re ? (Se.messagesLen ?? 0) >= ue : (Se.messagesLen ?? 0) === ue).map((Se) => ({
|
|
6969
6978
|
checkpoint_id: Se.checkpointId,
|
|
6970
6979
|
checkpoint_ns: Se.checkpointNs,
|
|
@@ -6972,54 +6981,54 @@ function Pn({
|
|
|
6972
6981
|
last_message_preview: Se.preview ?? void 0,
|
|
6973
6982
|
ts: new Date(Se.createdAt).getTime(),
|
|
6974
6983
|
isCurrent: Se.checkpointId === G
|
|
6975
|
-
})).sort((Se,
|
|
6976
|
-
}, V = (
|
|
6977
|
-
if (
|
|
6984
|
+
})).sort((Se, Mu) => (Se.ts || 0) - (Mu.ts || 0));
|
|
6985
|
+
}, V = (M) => {
|
|
6986
|
+
if (M === void 0)
|
|
6978
6987
|
return { canGoBack: !1, canGoForward: !1, currentIndex: 0, totalBranches: 0 };
|
|
6979
|
-
const Q = ae(
|
|
6988
|
+
const Q = ae(M);
|
|
6980
6989
|
if (Q.length <= 1)
|
|
6981
6990
|
return { canGoBack: !1, canGoForward: !1, currentIndex: 0, totalBranches: Q.length };
|
|
6982
6991
|
const re = Math.max(0, Q.findIndex((ue) => ue.isCurrent));
|
|
6983
6992
|
return { canGoBack: re > 0, canGoForward: re < Q.length - 1, currentIndex: re, totalBranches: Q.length };
|
|
6984
6993
|
}, oe = async () => {
|
|
6985
|
-
const
|
|
6986
|
-
if (!
|
|
6987
|
-
const Q = z(
|
|
6994
|
+
const M = C.trim();
|
|
6995
|
+
if (!M && j.length === 0) return;
|
|
6996
|
+
const Q = z(M);
|
|
6988
6997
|
if (Q) {
|
|
6989
6998
|
D(Q);
|
|
6990
6999
|
return;
|
|
6991
7000
|
}
|
|
6992
7001
|
try {
|
|
6993
7002
|
const re = window.__editingCheckpointId || G || void 0;
|
|
6994
|
-
await h(
|
|
7003
|
+
await h(M, { checkpointId: re, payloadExtras: N ? { edit: !0, originalMessageId: N } : void 0, attachments: j }), u == null || u(M), I(""), D(null), K([]), delete window.__editingCheckpointId, L(null), _.current && (_.current.style.height = "auto");
|
|
6995
7004
|
} catch (re) {
|
|
6996
7005
|
const ue = (re == null ? void 0 : re.message) || "Failed to send message";
|
|
6997
7006
|
D(ue), f == null || f(ue);
|
|
6998
7007
|
}
|
|
6999
|
-
}, ie = (
|
|
7000
|
-
a && (L(
|
|
7008
|
+
}, ie = (M, Q) => {
|
|
7009
|
+
a && (L(M), I(Q), D(null), setTimeout(() => {
|
|
7001
7010
|
_.current && (_.current.focus(), _.current.style.height = "auto", _.current.style.height = _.current.scrollHeight + "px");
|
|
7002
7011
|
}, 0));
|
|
7003
|
-
}, se = async (
|
|
7004
|
-
const re = p.find((Re) => Re.id ===
|
|
7012
|
+
}, se = async (M, Q) => {
|
|
7013
|
+
const re = p.find((Re) => Re.id === M);
|
|
7005
7014
|
if (!re) {
|
|
7006
7015
|
D("Message not found");
|
|
7007
7016
|
return;
|
|
7008
7017
|
}
|
|
7009
7018
|
const ue = le(re);
|
|
7010
|
-
L(
|
|
7019
|
+
L(M), I(ue), window.__editingCheckpointId = Q, setTimeout(() => {
|
|
7011
7020
|
var Re;
|
|
7012
7021
|
return (Re = _.current) == null ? void 0 : Re.focus();
|
|
7013
7022
|
}, 0);
|
|
7014
7023
|
}, H = () => {
|
|
7015
7024
|
L(null), I(""), D(null), delete window.__editingCheckpointId, _.current && (_.current.style.height = "auto");
|
|
7016
|
-
}, Z = (
|
|
7017
|
-
|
|
7018
|
-
}, de = (
|
|
7019
|
-
const Q = Array.from(
|
|
7025
|
+
}, Z = (M) => {
|
|
7026
|
+
M.key === "Enter" && !M.shiftKey ? (M.preventDefault(), oe()) : M.key === "Escape" && N && (M.preventDefault(), H());
|
|
7027
|
+
}, de = (M) => {
|
|
7028
|
+
const Q = Array.from(M.target.files || []);
|
|
7020
7029
|
K((re) => [...re, ...Q]);
|
|
7021
|
-
}, pe = (
|
|
7022
|
-
d && (await x(
|
|
7030
|
+
}, pe = (M) => K((Q) => Q.filter((re, ue) => M !== ue)), Y = async (M) => {
|
|
7031
|
+
d && (await x(M), T(M));
|
|
7023
7032
|
}, ge = async () => {
|
|
7024
7033
|
await E(), T(null);
|
|
7025
7034
|
}, te = `flex flex-col h-full min-w-0 bg-transparent ${e} ${i.container || ""}`, he = `flex-1 min-h-0 min-w-0 overflow-y-auto p-4 space-y-4 bg-transparent ${i.messagesArea || ""}`, ve = `flex-shrink-0 border-t p-4 bg-transparent ${i.inputArea || ""}`;
|
|
@@ -7046,29 +7055,29 @@ function Pn({
|
|
|
7046
7055
|
{
|
|
7047
7056
|
className: "border rounded px-2 py-1 text-xs",
|
|
7048
7057
|
value: G ?? "",
|
|
7049
|
-
onChange: (
|
|
7050
|
-
const Q =
|
|
7058
|
+
onChange: (M) => {
|
|
7059
|
+
const Q = M.target.value || null;
|
|
7051
7060
|
Q ? Y(Q) : ge();
|
|
7052
7061
|
},
|
|
7053
7062
|
children: [
|
|
7054
7063
|
/* @__PURE__ */ c("option", { value: "", children: "Latest" }),
|
|
7055
|
-
q.slice().sort((
|
|
7056
|
-
new Date(
|
|
7057
|
-
|
|
7058
|
-
] },
|
|
7064
|
+
q.slice().sort((M, Q) => new Date(Q.createdAt).getTime() - new Date(M.createdAt).getTime()).map((M) => /* @__PURE__ */ R("option", { value: M.checkpointId, children: [
|
|
7065
|
+
new Date(M.createdAt).toLocaleString(),
|
|
7066
|
+
M.preview ? ` — ${M.preview.slice(0, 30)}` : ""
|
|
7067
|
+
] }, M.checkpointId))
|
|
7059
7068
|
]
|
|
7060
7069
|
}
|
|
7061
7070
|
)
|
|
7062
7071
|
] }),
|
|
7063
7072
|
/* @__PURE__ */ R("div", { className: he, style: r ? { maxHeight: r } : void 0, children: [
|
|
7064
|
-
p.length === 0 ? /* @__PURE__ */ c("div", { className: "flex items-center justify-center py-8 text-muted-foreground", children: "No messages yet. Start a conversation!" }) : p.map((
|
|
7073
|
+
p.length === 0 ? /* @__PURE__ */ c("div", { className: "flex items-center justify-center py-8 text-muted-foreground", children: "No messages yet. Start a conversation!" }) : p.map((M, Q) => /* @__PURE__ */ c(
|
|
7065
7074
|
gp,
|
|
7066
7075
|
{
|
|
7067
|
-
message:
|
|
7076
|
+
message: M,
|
|
7068
7077
|
messageIndex: Q,
|
|
7069
|
-
isStreamingMessage: g && v ===
|
|
7078
|
+
isStreamingMessage: g && v === M.id,
|
|
7070
7079
|
streamingDebounceMs: o,
|
|
7071
|
-
isEditing: N ===
|
|
7080
|
+
isEditing: N === M.id,
|
|
7072
7081
|
showActions: a,
|
|
7073
7082
|
showTimestamp: !1,
|
|
7074
7083
|
showAgentName: !0,
|
|
@@ -7096,7 +7105,7 @@ function Pn({
|
|
|
7096
7105
|
},
|
|
7097
7106
|
onCancelEdit: H
|
|
7098
7107
|
},
|
|
7099
|
-
|
|
7108
|
+
M.id || Q
|
|
7100
7109
|
)),
|
|
7101
7110
|
/* @__PURE__ */ c("div", { ref: P })
|
|
7102
7111
|
] }),
|
|
@@ -7124,13 +7133,13 @@ function Pn({
|
|
|
7124
7133
|
ref: O,
|
|
7125
7134
|
type: "file",
|
|
7126
7135
|
multiple: !0,
|
|
7127
|
-
onChange: (
|
|
7136
|
+
onChange: (M) => de(M),
|
|
7128
7137
|
className: "hidden"
|
|
7129
7138
|
}
|
|
7130
7139
|
),
|
|
7131
|
-
j.length > 0 && /* @__PURE__ */ c("div", { className: "mb-3 flex flex-wrap gap-2", children: j.map((
|
|
7140
|
+
j.length > 0 && /* @__PURE__ */ c("div", { className: "mb-3 flex flex-wrap gap-2", children: j.map((M, Q) => /* @__PURE__ */ R("div", { className: "flex items-center gap-2 bg-gray-100 rounded-lg px-3 py-2 text-sm", children: [
|
|
7132
7141
|
/* @__PURE__ */ c(ss, { size: 14 }),
|
|
7133
|
-
/* @__PURE__ */ c("span", { className: "truncate max-w-[150px]", children:
|
|
7142
|
+
/* @__PURE__ */ c("span", { className: "truncate max-w-[150px]", children: M.name }),
|
|
7134
7143
|
/* @__PURE__ */ c(
|
|
7135
7144
|
fe,
|
|
7136
7145
|
{
|
|
@@ -7138,13 +7147,13 @@ function Pn({
|
|
|
7138
7147
|
size: "sm",
|
|
7139
7148
|
onClick: () => pe(Q),
|
|
7140
7149
|
className: "h-4 w-4 p-0 text-gray-500 hover:text-red-500",
|
|
7141
|
-
"aria-label": `Remove ${
|
|
7150
|
+
"aria-label": `Remove ${M.name}`,
|
|
7142
7151
|
children: /* @__PURE__ */ c(Kt, { size: 12 })
|
|
7143
7152
|
}
|
|
7144
7153
|
)
|
|
7145
7154
|
] }, Q)) })
|
|
7146
7155
|
] }),
|
|
7147
|
-
|
|
7156
|
+
k && /* @__PURE__ */ c("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: k }),
|
|
7148
7157
|
/* @__PURE__ */ R("div", { className: "flex items-end gap-2", children: [
|
|
7149
7158
|
s && /* @__PURE__ */ R(wb, { children: [
|
|
7150
7159
|
/* @__PURE__ */ c(yb, { asChild: !0, children: /* @__PURE__ */ c(
|
|
@@ -7160,8 +7169,8 @@ function Pn({
|
|
|
7160
7169
|
}
|
|
7161
7170
|
) }),
|
|
7162
7171
|
/* @__PURE__ */ c(Nc, { align: "start", sideOffset: 6, className: "w-52", children: /* @__PURE__ */ R(Tc, { onClick: () => {
|
|
7163
|
-
var
|
|
7164
|
-
return (
|
|
7172
|
+
var M;
|
|
7173
|
+
return (M = O.current) == null ? void 0 : M.click();
|
|
7165
7174
|
}, className: "cursor-pointer", children: [
|
|
7166
7175
|
/* @__PURE__ */ c(ss, { className: "h-4 w-4 mr-2" }),
|
|
7167
7176
|
" Attach files or images"
|
|
@@ -7172,12 +7181,12 @@ function Pn({
|
|
|
7172
7181
|
{
|
|
7173
7182
|
ref: _,
|
|
7174
7183
|
value: C,
|
|
7175
|
-
onChange: (
|
|
7176
|
-
I(
|
|
7184
|
+
onChange: (M) => {
|
|
7185
|
+
I(M.target.value), D(null), _.current && (_.current.style.height = "auto", _.current.style.height = `${_.current.scrollHeight}px`);
|
|
7177
7186
|
},
|
|
7178
7187
|
onKeyDown: Z,
|
|
7179
7188
|
placeholder: N ? "Edit your message..." : t,
|
|
7180
|
-
className: `resize-none min-h-[44px] max-h-[20rem] w-full ${N ? "border-blue-400 bg-blue-50" : ""} ${
|
|
7189
|
+
className: `resize-none min-h-[44px] max-h-[20rem] w-full ${N ? "border-blue-400 bg-blue-50" : ""} ${k ? "border-red-400" : ""} ${i.textarea || ""}`,
|
|
7181
7190
|
disabled: !1,
|
|
7182
7191
|
maxLength: Nt,
|
|
7183
7192
|
rows: 1
|
|
@@ -7236,7 +7245,7 @@ function ro(e, [t, n]) {
|
|
|
7236
7245
|
function Tb(e, t) {
|
|
7237
7246
|
return l.useReducer((n, r) => t[n][r] ?? n, e);
|
|
7238
7247
|
}
|
|
7239
|
-
var jo = "ScrollArea", [Ac, Ey] = Ue(jo), [Ab,
|
|
7248
|
+
var jo = "ScrollArea", [Ac, Ey] = Ue(jo), [Ab, ke] = Ac(jo), Pc = l.forwardRef(
|
|
7240
7249
|
(e, t) => {
|
|
7241
7250
|
const {
|
|
7242
7251
|
__scopeScrollArea: n,
|
|
@@ -7244,7 +7253,7 @@ var jo = "ScrollArea", [Ac, Ey] = Ue(jo), [Ab, Me] = Ac(jo), Pc = l.forwardRef(
|
|
|
7244
7253
|
dir: o,
|
|
7245
7254
|
scrollHideDelay: s = 600,
|
|
7246
7255
|
...a
|
|
7247
|
-
} = e, [i, u] = l.useState(null), [f, d] = l.useState(null), [p, g] = l.useState(null), [v, m] = l.useState(null), [h, b] = l.useState(null), [w, y] = l.useState(0), [x, E] = l.useState(0), [C, I] = l.useState(!1), [N, L] = l.useState(!1),
|
|
7256
|
+
} = e, [i, u] = l.useState(null), [f, d] = l.useState(null), [p, g] = l.useState(null), [v, m] = l.useState(null), [h, b] = l.useState(null), [w, y] = l.useState(0), [x, E] = l.useState(0), [C, I] = l.useState(!1), [N, L] = l.useState(!1), k = ne(t, (j) => u(j)), D = tr(o);
|
|
7248
7257
|
return /* @__PURE__ */ c(
|
|
7249
7258
|
Ab,
|
|
7250
7259
|
{
|
|
@@ -7272,7 +7281,7 @@ var jo = "ScrollArea", [Ac, Ey] = Ue(jo), [Ab, Me] = Ac(jo), Pc = l.forwardRef(
|
|
|
7272
7281
|
{
|
|
7273
7282
|
dir: D,
|
|
7274
7283
|
...a,
|
|
7275
|
-
ref:
|
|
7284
|
+
ref: k,
|
|
7276
7285
|
style: {
|
|
7277
7286
|
position: "relative",
|
|
7278
7287
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
@@ -7289,7 +7298,7 @@ var jo = "ScrollArea", [Ac, Ey] = Ue(jo), [Ab, Me] = Ac(jo), Pc = l.forwardRef(
|
|
|
7289
7298
|
Pc.displayName = jo;
|
|
7290
7299
|
var _c = "ScrollAreaViewport", Ic = l.forwardRef(
|
|
7291
7300
|
(e, t) => {
|
|
7292
|
-
const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, a =
|
|
7301
|
+
const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, a = ke(_c, n), i = l.useRef(null), u = ne(t, i, a.onViewportChange);
|
|
7293
7302
|
return /* @__PURE__ */ R(De, { children: [
|
|
7294
7303
|
/* @__PURE__ */ c(
|
|
7295
7304
|
"style",
|
|
@@ -7331,7 +7340,7 @@ var _c = "ScrollAreaViewport", Ic = l.forwardRef(
|
|
|
7331
7340
|
Ic.displayName = _c;
|
|
7332
7341
|
var Ye = "ScrollAreaScrollbar", Ko = l.forwardRef(
|
|
7333
7342
|
(e, t) => {
|
|
7334
|
-
const { forceMount: n, ...r } = e, o =
|
|
7343
|
+
const { forceMount: n, ...r } = e, o = ke(Ye, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: a } = o, i = e.orientation === "horizontal";
|
|
7335
7344
|
return l.useEffect(() => (i ? s(!0) : a(!0), () => {
|
|
7336
7345
|
i ? s(!1) : a(!1);
|
|
7337
7346
|
}), [i, s, a]), o.type === "hover" ? /* @__PURE__ */ c(Pb, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ c(_b, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ c(Oc, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ c(Go, { ...r, ref: t }) : null;
|
|
@@ -7339,7 +7348,7 @@ var Ye = "ScrollAreaScrollbar", Ko = l.forwardRef(
|
|
|
7339
7348
|
);
|
|
7340
7349
|
Ko.displayName = Ye;
|
|
7341
7350
|
var Pb = l.forwardRef((e, t) => {
|
|
7342
|
-
const { forceMount: n, ...r } = e, o =
|
|
7351
|
+
const { forceMount: n, ...r } = e, o = ke(Ye, e.__scopeScrollArea), [s, a] = l.useState(!1);
|
|
7343
7352
|
return l.useEffect(() => {
|
|
7344
7353
|
const i = o.scrollArea;
|
|
7345
7354
|
let u = 0;
|
|
@@ -7362,7 +7371,7 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7362
7371
|
}
|
|
7363
7372
|
) });
|
|
7364
7373
|
}), _b = l.forwardRef((e, t) => {
|
|
7365
|
-
const { forceMount: n, ...r } = e, o =
|
|
7374
|
+
const { forceMount: n, ...r } = e, o = ke(Ye, e.__scopeScrollArea), s = e.orientation === "horizontal", a = hr(() => u("SCROLL_END"), 100), [i, u] = Tb("hidden", {
|
|
7366
7375
|
hidden: {
|
|
7367
7376
|
SCROLL: "scrolling"
|
|
7368
7377
|
},
|
|
@@ -7406,13 +7415,13 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7406
7415
|
}
|
|
7407
7416
|
) });
|
|
7408
7417
|
}), Oc = l.forwardRef((e, t) => {
|
|
7409
|
-
const n =
|
|
7418
|
+
const n = ke(Ye, e.__scopeScrollArea), { forceMount: r, ...o } = e, [s, a] = l.useState(!1), i = e.orientation === "horizontal", u = hr(() => {
|
|
7410
7419
|
if (n.viewport) {
|
|
7411
7420
|
const f = n.viewport.offsetWidth < n.viewport.scrollWidth, d = n.viewport.offsetHeight < n.viewport.scrollHeight;
|
|
7412
7421
|
a(i ? f : d);
|
|
7413
7422
|
}
|
|
7414
7423
|
}, 10);
|
|
7415
|
-
return
|
|
7424
|
+
return kt(n.viewport, u), kt(n.content, u), /* @__PURE__ */ c(Ae, { present: r || s, children: /* @__PURE__ */ c(
|
|
7416
7425
|
Go,
|
|
7417
7426
|
{
|
|
7418
7427
|
"data-state": s ? "visible" : "hidden",
|
|
@@ -7421,7 +7430,7 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7421
7430
|
}
|
|
7422
7431
|
) });
|
|
7423
7432
|
}), Go = l.forwardRef((e, t) => {
|
|
7424
|
-
const { orientation: n = "vertical", ...r } = e, o =
|
|
7433
|
+
const { orientation: n = "vertical", ...r } = e, o = ke(Ye, e.__scopeScrollArea), s = l.useRef(null), a = l.useRef(0), [i, u] = l.useState({
|
|
7425
7434
|
content: 0,
|
|
7426
7435
|
viewport: 0,
|
|
7427
7436
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
@@ -7475,11 +7484,11 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7475
7484
|
}
|
|
7476
7485
|
) : null;
|
|
7477
7486
|
}), Ib = l.forwardRef((e, t) => {
|
|
7478
|
-
const { sizes: n, onSizesChange: r, ...o } = e, s =
|
|
7487
|
+
const { sizes: n, onSizesChange: r, ...o } = e, s = ke(Ye, e.__scopeScrollArea), [a, i] = l.useState(), u = l.useRef(null), f = ne(t, u, s.onScrollbarXChange);
|
|
7479
7488
|
return l.useEffect(() => {
|
|
7480
7489
|
u.current && i(getComputedStyle(u.current));
|
|
7481
7490
|
}, [u]), /* @__PURE__ */ c(
|
|
7482
|
-
|
|
7491
|
+
Mc,
|
|
7483
7492
|
{
|
|
7484
7493
|
"data-orientation": "horizontal",
|
|
7485
7494
|
...o,
|
|
@@ -7514,11 +7523,11 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7514
7523
|
}
|
|
7515
7524
|
);
|
|
7516
7525
|
}), Ob = l.forwardRef((e, t) => {
|
|
7517
|
-
const { sizes: n, onSizesChange: r, ...o } = e, s =
|
|
7526
|
+
const { sizes: n, onSizesChange: r, ...o } = e, s = ke(Ye, e.__scopeScrollArea), [a, i] = l.useState(), u = l.useRef(null), f = ne(t, u, s.onScrollbarYChange);
|
|
7518
7527
|
return l.useEffect(() => {
|
|
7519
7528
|
u.current && i(getComputedStyle(u.current));
|
|
7520
7529
|
}, [u]), /* @__PURE__ */ c(
|
|
7521
|
-
|
|
7530
|
+
Mc,
|
|
7522
7531
|
{
|
|
7523
7532
|
"data-orientation": "vertical",
|
|
7524
7533
|
...o,
|
|
@@ -7553,7 +7562,7 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7553
7562
|
}
|
|
7554
7563
|
}
|
|
7555
7564
|
);
|
|
7556
|
-
}), [
|
|
7565
|
+
}), [kb, kc] = Ac(Ye), Mc = l.forwardRef((e, t) => {
|
|
7557
7566
|
const {
|
|
7558
7567
|
__scopeScrollArea: n,
|
|
7559
7568
|
sizes: r,
|
|
@@ -7566,21 +7575,21 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7566
7575
|
onWheelScroll: d,
|
|
7567
7576
|
onResize: p,
|
|
7568
7577
|
...g
|
|
7569
|
-
} = e, v =
|
|
7570
|
-
function L(
|
|
7578
|
+
} = e, v = ke(Ye, n), [m, h] = l.useState(null), b = ne(t, (k) => h(k)), w = l.useRef(null), y = l.useRef(""), x = v.viewport, E = r.content - r.viewport, C = ye(d), I = ye(u), N = hr(p, 10);
|
|
7579
|
+
function L(k) {
|
|
7571
7580
|
if (w.current) {
|
|
7572
|
-
const D =
|
|
7581
|
+
const D = k.clientX - w.current.left, j = k.clientY - w.current.top;
|
|
7573
7582
|
f({ x: D, y: j });
|
|
7574
7583
|
}
|
|
7575
7584
|
}
|
|
7576
7585
|
return l.useEffect(() => {
|
|
7577
|
-
const
|
|
7586
|
+
const k = (D) => {
|
|
7578
7587
|
const j = D.target;
|
|
7579
7588
|
(m == null ? void 0 : m.contains(j)) && C(D, E);
|
|
7580
7589
|
};
|
|
7581
|
-
return document.addEventListener("wheel",
|
|
7582
|
-
}, [x, m, E, C]), l.useEffect(I, [r, I]),
|
|
7583
|
-
|
|
7590
|
+
return document.addEventListener("wheel", k, { passive: !1 }), () => document.removeEventListener("wheel", k, { passive: !1 });
|
|
7591
|
+
}, [x, m, E, C]), l.useEffect(I, [r, I]), kt(m, N), kt(v.content, N), /* @__PURE__ */ c(
|
|
7592
|
+
kb,
|
|
7584
7593
|
{
|
|
7585
7594
|
scope: n,
|
|
7586
7595
|
scrollbar: m,
|
|
@@ -7595,13 +7604,13 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7595
7604
|
...g,
|
|
7596
7605
|
ref: b,
|
|
7597
7606
|
style: { position: "absolute", ...g.style },
|
|
7598
|
-
onPointerDown: U(e.onPointerDown, (
|
|
7599
|
-
|
|
7607
|
+
onPointerDown: U(e.onPointerDown, (k) => {
|
|
7608
|
+
k.button === 0 && (k.target.setPointerCapture(k.pointerId), w.current = m.getBoundingClientRect(), y.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", v.viewport && (v.viewport.style.scrollBehavior = "auto"), L(k));
|
|
7600
7609
|
}),
|
|
7601
7610
|
onPointerMove: U(e.onPointerMove, L),
|
|
7602
|
-
onPointerUp: U(e.onPointerUp, (
|
|
7603
|
-
const D =
|
|
7604
|
-
D.hasPointerCapture(
|
|
7611
|
+
onPointerUp: U(e.onPointerUp, (k) => {
|
|
7612
|
+
const D = k.target;
|
|
7613
|
+
D.hasPointerCapture(k.pointerId) && D.releasePointerCapture(k.pointerId), document.body.style.webkitUserSelect = y.current, v.viewport && (v.viewport.style.scrollBehavior = ""), w.current = null;
|
|
7605
7614
|
})
|
|
7606
7615
|
}
|
|
7607
7616
|
)
|
|
@@ -7609,12 +7618,12 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7609
7618
|
);
|
|
7610
7619
|
}), Vn = "ScrollAreaThumb", Dc = l.forwardRef(
|
|
7611
7620
|
(e, t) => {
|
|
7612
|
-
const { forceMount: n, ...r } = e, o =
|
|
7613
|
-
return /* @__PURE__ */ c(Ae, { present: n || o.hasThumb, children: /* @__PURE__ */ c(
|
|
7621
|
+
const { forceMount: n, ...r } = e, o = kc(Vn, e.__scopeScrollArea);
|
|
7622
|
+
return /* @__PURE__ */ c(Ae, { present: n || o.hasThumb, children: /* @__PURE__ */ c(Mb, { ref: t, ...r }) });
|
|
7614
7623
|
}
|
|
7615
|
-
),
|
|
7624
|
+
), Mb = l.forwardRef(
|
|
7616
7625
|
(e, t) => {
|
|
7617
|
-
const { __scopeScrollArea: n, style: r, ...o } = e, s =
|
|
7626
|
+
const { __scopeScrollArea: n, style: r, ...o } = e, s = ke(Vn, n), a = kc(Vn, n), { onThumbPositionChange: i } = a, u = ne(
|
|
7618
7627
|
t,
|
|
7619
7628
|
(p) => a.onThumbChange(p)
|
|
7620
7629
|
), f = l.useRef(void 0), d = hr(() => {
|
|
@@ -7654,18 +7663,18 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7654
7663
|
Dc.displayName = Vn;
|
|
7655
7664
|
var qo = "ScrollAreaCorner", Lc = l.forwardRef(
|
|
7656
7665
|
(e, t) => {
|
|
7657
|
-
const n =
|
|
7666
|
+
const n = ke(qo, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
|
|
7658
7667
|
return n.type !== "scroll" && r ? /* @__PURE__ */ c(Db, { ...e, ref: t }) : null;
|
|
7659
7668
|
}
|
|
7660
7669
|
);
|
|
7661
7670
|
Lc.displayName = qo;
|
|
7662
7671
|
var Db = l.forwardRef((e, t) => {
|
|
7663
|
-
const { __scopeScrollArea: n, ...r } = e, o =
|
|
7664
|
-
return
|
|
7672
|
+
const { __scopeScrollArea: n, ...r } = e, o = ke(qo, n), [s, a] = l.useState(0), [i, u] = l.useState(0), f = !!(s && i);
|
|
7673
|
+
return kt(o.scrollbarX, () => {
|
|
7665
7674
|
var p;
|
|
7666
7675
|
const d = ((p = o.scrollbarX) == null ? void 0 : p.offsetHeight) || 0;
|
|
7667
7676
|
o.onCornerHeightChange(d), u(d);
|
|
7668
|
-
}),
|
|
7677
|
+
}), kt(o.scrollbarY, () => {
|
|
7669
7678
|
var p;
|
|
7670
7679
|
const d = ((p = o.scrollbarY) == null ? void 0 : p.offsetWidth) || 0;
|
|
7671
7680
|
o.onCornerWidthChange(d), a(d);
|
|
@@ -7729,7 +7738,7 @@ function hr(e, t) {
|
|
|
7729
7738
|
window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
|
|
7730
7739
|
}, [n, t]);
|
|
7731
7740
|
}
|
|
7732
|
-
function
|
|
7741
|
+
function kt(e, t) {
|
|
7733
7742
|
const n = ye(t);
|
|
7734
7743
|
be(() => {
|
|
7735
7744
|
let r = 0;
|
|
@@ -7795,7 +7804,7 @@ function oo({
|
|
|
7795
7804
|
createThread: h,
|
|
7796
7805
|
deleteThread: b,
|
|
7797
7806
|
renameThread: w
|
|
7798
|
-
} = Ua(), [y, x] = ce(g ?? []), [E, C] = ce(!1), [I, N] = ce(null), [L,
|
|
7807
|
+
} = Ua(), [y, x] = ce(g ?? []), [E, C] = ce(!1), [I, N] = ce(null), [L, k] = ce(null), [D, j] = ce(""), [K, W] = ce(!1);
|
|
7799
7808
|
we(() => {
|
|
7800
7809
|
x(g ?? []);
|
|
7801
7810
|
}, [g]);
|
|
@@ -7823,16 +7832,16 @@ function oo({
|
|
|
7823
7832
|
console.error("Failed to delete thread:", le);
|
|
7824
7833
|
}
|
|
7825
7834
|
}, G = ($, z) => {
|
|
7826
|
-
z.stopPropagation(),
|
|
7835
|
+
z.stopPropagation(), k($.threadId), j($.title || `Thread ${$.threadId.slice(0, 8)}`);
|
|
7827
7836
|
}, T = async ($) => {
|
|
7828
7837
|
if (D.trim())
|
|
7829
7838
|
try {
|
|
7830
|
-
await w($, D.trim()),
|
|
7839
|
+
await w($, D.trim()), k(null), j("");
|
|
7831
7840
|
} catch (z) {
|
|
7832
7841
|
console.error("Failed to update title:", z);
|
|
7833
7842
|
}
|
|
7834
7843
|
}, P = () => {
|
|
7835
|
-
|
|
7844
|
+
k(null), j("");
|
|
7836
7845
|
}, _ = ($, z) => {
|
|
7837
7846
|
$.key === "Enter" ? T(z) : $.key === "Escape" && P();
|
|
7838
7847
|
}, O = ($) => {
|
|
@@ -8429,7 +8438,7 @@ var nn = "Tooltip", [gv, vr] = gr(nn), Sl = (e) => {
|
|
|
8429
8438
|
}, [h, y]);
|
|
8430
8439
|
return l.useEffect(() => () => {
|
|
8431
8440
|
v.current && (window.clearTimeout(v.current), v.current = 0);
|
|
8432
|
-
}, []), /* @__PURE__ */ c(
|
|
8441
|
+
}, []), /* @__PURE__ */ c(ko, { ...f, children: /* @__PURE__ */ c(
|
|
8433
8442
|
gv,
|
|
8434
8443
|
{
|
|
8435
8444
|
scope: t,
|
|
@@ -8455,7 +8464,7 @@ Sl.displayName = nn;
|
|
|
8455
8464
|
var ao = "TooltipTrigger", Cl = l.forwardRef(
|
|
8456
8465
|
(e, t) => {
|
|
8457
8466
|
const { __scopeTooltip: n, ...r } = e, o = vr(ao, n), s = es(ao, n), a = br(n), i = l.useRef(null), u = ne(t, i, o.onTriggerChange), f = l.useRef(!1), d = l.useRef(!1), p = l.useCallback(() => f.current = !1, []);
|
|
8458
|
-
return l.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ c(
|
|
8467
|
+
return l.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ c(Mo, { asChild: !0, ...a, children: /* @__PURE__ */ c(
|
|
8459
8468
|
J.button,
|
|
8460
8469
|
{
|
|
8461
8470
|
"aria-describedby": o.open ? o.contentId : void 0,
|
|
@@ -8483,13 +8492,13 @@ var ao = "TooltipTrigger", Cl = l.forwardRef(
|
|
|
8483
8492
|
Cl.displayName = ao;
|
|
8484
8493
|
var bv = "TooltipPortal", [Oy, vv] = gr(bv, {
|
|
8485
8494
|
forceMount: void 0
|
|
8486
|
-
}),
|
|
8495
|
+
}), Mt = "TooltipContent", El = l.forwardRef(
|
|
8487
8496
|
(e, t) => {
|
|
8488
|
-
const n = vv(
|
|
8497
|
+
const n = vv(Mt, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...s } = e, a = vr(Mt, e.__scopeTooltip);
|
|
8489
8498
|
return /* @__PURE__ */ c(Ae, { present: r || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ c(Rl, { side: o, ...s, ref: t }) : /* @__PURE__ */ c(wv, { side: o, ...s, ref: t }) });
|
|
8490
8499
|
}
|
|
8491
8500
|
), wv = l.forwardRef((e, t) => {
|
|
8492
|
-
const n = vr(
|
|
8501
|
+
const n = vr(Mt, e.__scopeTooltip), r = es(Mt, e.__scopeTooltip), o = l.useRef(null), s = ne(t, o), [a, i] = l.useState(null), { trigger: u, onClose: f } = n, d = o.current, { onPointerInTransitChange: p } = r, g = l.useCallback(() => {
|
|
8493
8502
|
i(null), p(!1);
|
|
8494
8503
|
}, [p]), v = l.useCallback(
|
|
8495
8504
|
(m, h) => {
|
|
@@ -8523,7 +8532,7 @@ var bv = "TooltipPortal", [Oy, vv] = gr(bv, {
|
|
|
8523
8532
|
onEscapeKeyDown: s,
|
|
8524
8533
|
onPointerDownOutside: a,
|
|
8525
8534
|
...i
|
|
8526
|
-
} = e, u = vr(
|
|
8535
|
+
} = e, u = vr(Mt, n), f = br(n), { onClose: d } = u;
|
|
8527
8536
|
return l.useEffect(() => (document.addEventListener(so, d), () => document.removeEventListener(so, d)), [d]), l.useEffect(() => {
|
|
8528
8537
|
if (u.trigger) {
|
|
8529
8538
|
const p = (g) => {
|
|
@@ -8566,7 +8575,7 @@ var bv = "TooltipPortal", [Oy, vv] = gr(bv, {
|
|
|
8566
8575
|
);
|
|
8567
8576
|
}
|
|
8568
8577
|
);
|
|
8569
|
-
El.displayName =
|
|
8578
|
+
El.displayName = Mt;
|
|
8570
8579
|
var Nl = "TooltipArrow", Cv = l.forwardRef(
|
|
8571
8580
|
(e, t) => {
|
|
8572
8581
|
const { __scopeTooltip: n, ...r } = e, o = br(n);
|
|
@@ -8670,7 +8679,7 @@ function Pv(e) {
|
|
|
8670
8679
|
return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
|
|
8671
8680
|
}
|
|
8672
8681
|
var _v = xl, Iv = Sl, Ov = Cl, Tl = El;
|
|
8673
|
-
const
|
|
8682
|
+
const kv = _v, Mv = Iv, Dv = Ov, Al = l.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ c(
|
|
8674
8683
|
Tl,
|
|
8675
8684
|
{
|
|
8676
8685
|
ref: r,
|
|
@@ -8725,7 +8734,7 @@ const _l = l.forwardRef(
|
|
|
8725
8734
|
}),
|
|
8726
8735
|
[b, v, m, u, f, d, h]
|
|
8727
8736
|
);
|
|
8728
|
-
return /* @__PURE__ */ c(Pl.Provider, { value: w, children: /* @__PURE__ */ c(
|
|
8737
|
+
return /* @__PURE__ */ c(Pl.Provider, { value: w, children: /* @__PURE__ */ c(kv, { delayDuration: 0, children: /* @__PURE__ */ c(
|
|
8729
8738
|
"div",
|
|
8730
8739
|
{
|
|
8731
8740
|
style: {
|
|
@@ -8873,7 +8882,7 @@ const Hv = l.forwardRef(({ className: e, ...t }, n) => {
|
|
|
8873
8882
|
);
|
|
8874
8883
|
});
|
|
8875
8884
|
Hv.displayName = "SidebarRail";
|
|
8876
|
-
const
|
|
8885
|
+
const kl = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
8877
8886
|
"main",
|
|
8878
8887
|
{
|
|
8879
8888
|
ref: n,
|
|
@@ -8885,7 +8894,7 @@ const Ml = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
8885
8894
|
...t
|
|
8886
8895
|
}
|
|
8887
8896
|
));
|
|
8888
|
-
|
|
8897
|
+
kl.displayName = "SidebarInset";
|
|
8889
8898
|
const Wv = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
8890
8899
|
tn,
|
|
8891
8900
|
{
|
|
@@ -8899,7 +8908,7 @@ const Wv = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
8899
8908
|
}
|
|
8900
8909
|
));
|
|
8901
8910
|
Wv.displayName = "SidebarInput";
|
|
8902
|
-
const
|
|
8911
|
+
const Ml = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
8903
8912
|
"div",
|
|
8904
8913
|
{
|
|
8905
8914
|
ref: n,
|
|
@@ -8908,7 +8917,7 @@ const kl = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
8908
8917
|
...t
|
|
8909
8918
|
}
|
|
8910
8919
|
));
|
|
8911
|
-
|
|
8920
|
+
Ml.displayName = "SidebarHeader";
|
|
8912
8921
|
const Vv = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
8913
8922
|
"div",
|
|
8914
8923
|
{
|
|
@@ -9054,7 +9063,7 @@ const Gv = rn(
|
|
|
9054
9063
|
);
|
|
9055
9064
|
return o ? (typeof o == "string" && (o = {
|
|
9056
9065
|
children: o
|
|
9057
|
-
}), /* @__PURE__ */ R(
|
|
9066
|
+
}), /* @__PURE__ */ R(Mv, { children: [
|
|
9058
9067
|
/* @__PURE__ */ c(Dv, { asChild: !0, children: p }),
|
|
9059
9068
|
/* @__PURE__ */ c(
|
|
9060
9069
|
Al,
|
|
@@ -9174,7 +9183,7 @@ const Qv = l.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, classNa
|
|
|
9174
9183
|
}
|
|
9175
9184
|
));
|
|
9176
9185
|
Qv.displayName = "SidebarMenuSubButton";
|
|
9177
|
-
function
|
|
9186
|
+
function ky({
|
|
9178
9187
|
header: e,
|
|
9179
9188
|
sidebarTitle: t = "Threads",
|
|
9180
9189
|
showThreads: n = !0,
|
|
@@ -9185,7 +9194,7 @@ function My({
|
|
|
9185
9194
|
}) {
|
|
9186
9195
|
return /* @__PURE__ */ c(Rn, { ...a, children: /* @__PURE__ */ R(_l, { className: `w-full ${r}`, children: [
|
|
9187
9196
|
/* @__PURE__ */ R(Il, { className: `border-r ${o}`, children: [
|
|
9188
|
-
/* @__PURE__ */ c(
|
|
9197
|
+
/* @__PURE__ */ c(Ml, { children: /* @__PURE__ */ c(Bl, { children: /* @__PURE__ */ c(Ul, { children: /* @__PURE__ */ c(zl, { size: "lg", children: /* @__PURE__ */ c("span", { className: "font-semibold", children: t }) }) }) }) }),
|
|
9189
9198
|
/* @__PURE__ */ c(Dl, { children: n && /* @__PURE__ */ R(Ll, { children: [
|
|
9190
9199
|
/* @__PURE__ */ c(Fl, { children: "Conversations" }),
|
|
9191
9200
|
/* @__PURE__ */ c($l, { children: /* @__PURE__ */ c("div", { className: "px-2 py-1", children: /* @__PURE__ */ c(
|
|
@@ -9199,7 +9208,7 @@ function My({
|
|
|
9199
9208
|
) }) })
|
|
9200
9209
|
] }) })
|
|
9201
9210
|
] }),
|
|
9202
|
-
/* @__PURE__ */ R(
|
|
9211
|
+
/* @__PURE__ */ R(kl, { children: [
|
|
9203
9212
|
/* @__PURE__ */ R("header", { className: "h-14 border-b bg-background/60 backdrop-blur flex items-center gap-2 px-4", children: [
|
|
9204
9213
|
/* @__PURE__ */ c(Ol, {}),
|
|
9205
9214
|
/* @__PURE__ */ c("div", { className: "flex-1" }),
|
|
@@ -9237,7 +9246,7 @@ function Vl(e) {
|
|
|
9237
9246
|
const t = l.useRef({ value: e, previous: e });
|
|
9238
9247
|
return l.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
9239
9248
|
}
|
|
9240
|
-
var yr = "Switch", [nw,
|
|
9249
|
+
var yr = "Switch", [nw, My] = Ue(yr), [rw, ow] = nw(yr), jl = l.forwardRef(
|
|
9241
9250
|
(e, t) => {
|
|
9242
9251
|
const {
|
|
9243
9252
|
__scopeSwitch: n,
|
|
@@ -9398,13 +9407,13 @@ var iw = [" ", "Enter", "ArrowUp", "ArrowDown"], cw = [" ", "Enter"], gt = "Sele
|
|
|
9398
9407
|
defaultProp: o ?? !1,
|
|
9399
9408
|
onChange: s,
|
|
9400
9409
|
caller: gt
|
|
9401
|
-
}), [
|
|
9410
|
+
}), [k, D] = ot({
|
|
9402
9411
|
prop: a,
|
|
9403
9412
|
defaultProp: i,
|
|
9404
9413
|
onChange: u,
|
|
9405
9414
|
caller: gt
|
|
9406
9415
|
}), j = l.useRef(null), K = b ? m || !!b.closest("form") : !0, [W, B] = l.useState(/* @__PURE__ */ new Set()), q = Array.from(W).map((F) => F.props.value).join(";");
|
|
9407
|
-
return /* @__PURE__ */ c(
|
|
9416
|
+
return /* @__PURE__ */ c(ko, { ...h, children: /* @__PURE__ */ R(
|
|
9408
9417
|
uw,
|
|
9409
9418
|
{
|
|
9410
9419
|
required: v,
|
|
@@ -9416,7 +9425,7 @@ var iw = [" ", "Enter", "ArrowUp", "ArrowDown"], cw = [" ", "Enter"], gt = "Sele
|
|
|
9416
9425
|
valueNodeHasChildren: E,
|
|
9417
9426
|
onValueNodeHasChildrenChange: C,
|
|
9418
9427
|
contentId: Le(),
|
|
9419
|
-
value:
|
|
9428
|
+
value: k,
|
|
9420
9429
|
onValueChange: D,
|
|
9421
9430
|
open: N,
|
|
9422
9431
|
onOpenChange: L,
|
|
@@ -9448,12 +9457,12 @@ var iw = [" ", "Enter", "ArrowUp", "ArrowDown"], cw = [" ", "Enter"], gt = "Sele
|
|
|
9448
9457
|
tabIndex: -1,
|
|
9449
9458
|
name: d,
|
|
9450
9459
|
autoComplete: p,
|
|
9451
|
-
value:
|
|
9460
|
+
value: k,
|
|
9452
9461
|
onChange: (F) => D(F.target.value),
|
|
9453
9462
|
disabled: g,
|
|
9454
9463
|
form: m,
|
|
9455
9464
|
children: [
|
|
9456
|
-
|
|
9465
|
+
k === void 0 ? /* @__PURE__ */ c("option", { value: "" }) : null,
|
|
9457
9466
|
Array.from(W)
|
|
9458
9467
|
]
|
|
9459
9468
|
},
|
|
@@ -9475,7 +9484,7 @@ var Zl = "SelectTrigger", Ql = l.forwardRef(
|
|
|
9475
9484
|
y: Math.round(h.pageY)
|
|
9476
9485
|
});
|
|
9477
9486
|
};
|
|
9478
|
-
return /* @__PURE__ */ c(
|
|
9487
|
+
return /* @__PURE__ */ c(Mo, { asChild: !0, ...s, children: /* @__PURE__ */ c(
|
|
9479
9488
|
J.button,
|
|
9480
9489
|
{
|
|
9481
9490
|
type: "button",
|
|
@@ -9550,7 +9559,7 @@ var bt = "SelectContent", ou = l.forwardRef(
|
|
|
9550
9559
|
}
|
|
9551
9560
|
);
|
|
9552
9561
|
ou.displayName = bt;
|
|
9553
|
-
var
|
|
9562
|
+
var Me = 10, [su, ct] = zt(bt), mw = "SelectContentImpl", gw = _t("SelectContent.RemoveScroll"), au = l.forwardRef(
|
|
9554
9563
|
(e, t) => {
|
|
9555
9564
|
const {
|
|
9556
9565
|
__scopeSelect: n,
|
|
@@ -9572,7 +9581,7 @@ var ke = 10, [su, ct] = zt(bt), mw = "SelectContentImpl", gw = _t("SelectContent
|
|
|
9572
9581
|
avoidCollisions: b,
|
|
9573
9582
|
//
|
|
9574
9583
|
...w
|
|
9575
|
-
} = e, y = it(bt, n), [x, E] = l.useState(null), [C, I] = l.useState(null), N = ne(t, (V) => E(V)), [L,
|
|
9584
|
+
} = e, y = it(bt, n), [x, E] = l.useState(null), [C, I] = l.useState(null), N = ne(t, (V) => E(V)), [L, k] = l.useState(null), [D, j] = l.useState(
|
|
9576
9585
|
null
|
|
9577
9586
|
), K = Sr(n), [W, B] = l.useState(!1), q = l.useRef(!1);
|
|
9578
9587
|
l.useEffect(() => {
|
|
@@ -9621,7 +9630,7 @@ var ke = 10, [su, ct] = zt(bt), mw = "SelectContentImpl", gw = _t("SelectContent
|
|
|
9621
9630
|
}), X = l.useCallback(
|
|
9622
9631
|
(V, oe, ie) => {
|
|
9623
9632
|
const se = !q.current && !ie;
|
|
9624
|
-
(y.value !== void 0 && y.value === oe || se) && (
|
|
9633
|
+
(y.value !== void 0 && y.value === oe || se) && (k(V), se && (q.current = !0));
|
|
9625
9634
|
},
|
|
9626
9635
|
[y.value]
|
|
9627
9636
|
), $ = l.useCallback(() => x == null ? void 0 : x.focus(), [x]), z = l.useCallback(
|
|
@@ -9724,26 +9733,26 @@ au.displayName = mw;
|
|
|
9724
9733
|
var bw = "SelectItemAlignedPosition", iu = l.forwardRef((e, t) => {
|
|
9725
9734
|
const { __scopeSelect: n, onPlaced: r, ...o } = e, s = it(bt, n), a = ct(bt, n), [i, u] = l.useState(null), [f, d] = l.useState(null), p = ne(t, (N) => d(N)), g = Sr(n), v = l.useRef(!1), m = l.useRef(!0), { viewport: h, selectedItem: b, selectedItemText: w, focusSelectedItem: y } = a, x = l.useCallback(() => {
|
|
9726
9735
|
if (s.trigger && s.valueNode && i && f && h && b && w) {
|
|
9727
|
-
const N = s.trigger.getBoundingClientRect(), L = f.getBoundingClientRect(),
|
|
9736
|
+
const N = s.trigger.getBoundingClientRect(), L = f.getBoundingClientRect(), k = s.valueNode.getBoundingClientRect(), D = w.getBoundingClientRect();
|
|
9728
9737
|
if (s.dir !== "rtl") {
|
|
9729
|
-
const H = D.left - L.left, Z =
|
|
9730
|
-
|
|
9738
|
+
const H = D.left - L.left, Z = k.left - H, de = N.left - Z, pe = N.width + de, Y = Math.max(pe, L.width), ge = window.innerWidth - Me, te = ro(Z, [
|
|
9739
|
+
Me,
|
|
9731
9740
|
// Prevents the content from going off the starting edge of the
|
|
9732
9741
|
// viewport. It may still go off the ending edge, but this can be
|
|
9733
9742
|
// controlled by the user since they may want to manage overflow in a
|
|
9734
9743
|
// specific way.
|
|
9735
9744
|
// https://github.com/radix-ui/primitives/issues/2049
|
|
9736
|
-
Math.max(
|
|
9745
|
+
Math.max(Me, ge - Y)
|
|
9737
9746
|
]);
|
|
9738
9747
|
i.style.minWidth = pe + "px", i.style.left = te + "px";
|
|
9739
9748
|
} else {
|
|
9740
|
-
const H = L.right - D.right, Z = window.innerWidth -
|
|
9741
|
-
|
|
9742
|
-
Math.max(
|
|
9749
|
+
const H = L.right - D.right, Z = window.innerWidth - k.right - H, de = window.innerWidth - N.right - Z, pe = N.width + de, Y = Math.max(pe, L.width), ge = window.innerWidth - Me, te = ro(Z, [
|
|
9750
|
+
Me,
|
|
9751
|
+
Math.max(Me, ge - Y)
|
|
9743
9752
|
]);
|
|
9744
9753
|
i.style.minWidth = pe + "px", i.style.right = te + "px";
|
|
9745
9754
|
}
|
|
9746
|
-
const j = g(), K = window.innerHeight -
|
|
9755
|
+
const j = g(), K = window.innerHeight - Me * 2, W = h.scrollHeight, B = window.getComputedStyle(f), q = parseInt(B.borderTopWidth, 10), F = parseInt(B.paddingTop, 10), G = parseInt(B.borderBottomWidth, 10), T = parseInt(B.paddingBottom, 10), P = q + F + W + T + G, _ = Math.min(b.offsetHeight * 5, P), O = window.getComputedStyle(h), X = parseInt(O.paddingTop, 10), $ = parseInt(O.paddingBottom, 10), z = N.top + N.height / 2 - Me, le = K - z, ae = b.offsetHeight / 2, V = b.offsetTop + ae, oe = q + F + V, ie = P - oe;
|
|
9747
9756
|
if (oe <= z) {
|
|
9748
9757
|
const H = j.length > 0 && b === j[j.length - 1].ref.current;
|
|
9749
9758
|
i.style.bottom = "0px";
|
|
@@ -9763,7 +9772,7 @@ var bw = "SelectItemAlignedPosition", iu = l.forwardRef((e, t) => {
|
|
|
9763
9772
|
) + ie;
|
|
9764
9773
|
i.style.height = de + "px", h.scrollTop = oe - z + h.offsetTop;
|
|
9765
9774
|
}
|
|
9766
|
-
i.style.margin = `${
|
|
9775
|
+
i.style.margin = `${Me}px 0`, i.style.minHeight = _ + "px", i.style.maxHeight = K + "px", r == null || r(), requestAnimationFrame(() => v.current = !0);
|
|
9767
9776
|
}
|
|
9768
9777
|
}, [
|
|
9769
9778
|
g,
|
|
@@ -9830,7 +9839,7 @@ var vw = "SelectPopperPosition", io = l.forwardRef((e, t) => {
|
|
|
9830
9839
|
const {
|
|
9831
9840
|
__scopeSelect: n,
|
|
9832
9841
|
align: r = "start",
|
|
9833
|
-
collisionPadding: o =
|
|
9842
|
+
collisionPadding: o = Me,
|
|
9834
9843
|
...s
|
|
9835
9844
|
} = e, a = Cr(n);
|
|
9836
9845
|
return /* @__PURE__ */ c(
|
|
@@ -9893,7 +9902,7 @@ var [ww, ts] = zt(bt, {}), co = "SelectViewport", cu = l.forwardRef(
|
|
|
9893
9902
|
if (g != null && g.current && p) {
|
|
9894
9903
|
const v = Math.abs(u.current - d.scrollTop);
|
|
9895
9904
|
if (v > 0) {
|
|
9896
|
-
const m = window.innerHeight -
|
|
9905
|
+
const m = window.innerHeight - Me * 2, h = parseFloat(p.style.minHeight), b = parseFloat(p.style.height), w = Math.max(h, b);
|
|
9897
9906
|
if (w < m) {
|
|
9898
9907
|
const y = w + v, x = Math.min(m, y), E = y - x;
|
|
9899
9908
|
p.style.height = x + "px", p.style.bottom === "0px" && (d.scrollTop = E > 0 ? E : 0, p.style.justifyContent = "flex-end");
|
|
@@ -10178,7 +10187,7 @@ function Eu(e, t, n) {
|
|
|
10178
10187
|
function Tw(e, t) {
|
|
10179
10188
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
10180
10189
|
}
|
|
10181
|
-
var Aw = Jl, Ru = Ql, Pw = tu, _w = nu, Iw = ru, Nu = ou, Ow = cu, Tu = du, Au = pu,
|
|
10190
|
+
var Aw = Jl, Ru = Ql, Pw = tu, _w = nu, Iw = ru, Nu = ou, Ow = cu, Tu = du, Au = pu, kw = hu, Mw = gu, Pu = bu, _u = vu, Iu = yu;
|
|
10182
10191
|
const sa = Aw, aa = Pw, po = l.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ R(
|
|
10183
10192
|
Ru,
|
|
10184
10193
|
{
|
|
@@ -10208,7 +10217,7 @@ const Ou = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
10208
10217
|
}
|
|
10209
10218
|
));
|
|
10210
10219
|
Ou.displayName = Pu.displayName;
|
|
10211
|
-
const
|
|
10220
|
+
const ku = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
10212
10221
|
_u,
|
|
10213
10222
|
{
|
|
10214
10223
|
ref: n,
|
|
@@ -10220,7 +10229,7 @@ const Mu = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
10220
10229
|
children: /* @__PURE__ */ c(Tt, { className: "h-4 w-4" })
|
|
10221
10230
|
}
|
|
10222
10231
|
));
|
|
10223
|
-
|
|
10232
|
+
ku.displayName = _u.displayName;
|
|
10224
10233
|
const ho = l.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ c(Iw, { children: /* @__PURE__ */ R(
|
|
10225
10234
|
Nu,
|
|
10226
10235
|
{
|
|
@@ -10244,7 +10253,7 @@ const ho = l.forwardRef(({ className: e, children: t, position: n = "popper", ..
|
|
|
10244
10253
|
children: t
|
|
10245
10254
|
}
|
|
10246
10255
|
),
|
|
10247
|
-
/* @__PURE__ */ c(
|
|
10256
|
+
/* @__PURE__ */ c(ku, {})
|
|
10248
10257
|
]
|
|
10249
10258
|
}
|
|
10250
10259
|
) }));
|
|
@@ -10268,8 +10277,8 @@ const lt = l.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
10268
10277
|
),
|
|
10269
10278
|
...n,
|
|
10270
10279
|
children: [
|
|
10271
|
-
/* @__PURE__ */ c("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ c(
|
|
10272
|
-
/* @__PURE__ */ c(
|
|
10280
|
+
/* @__PURE__ */ c("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ c(Mw, { children: /* @__PURE__ */ c(mo, { className: "h-4 w-4" }) }) }),
|
|
10281
|
+
/* @__PURE__ */ c(kw, { children: t })
|
|
10273
10282
|
]
|
|
10274
10283
|
}
|
|
10275
10284
|
));
|
|
@@ -10325,8 +10334,8 @@ const Fw = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
10325
10334
|
}
|
|
10326
10335
|
));
|
|
10327
10336
|
Fw.displayName = "CardDescription";
|
|
10328
|
-
const
|
|
10329
|
-
|
|
10337
|
+
const kn = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c("div", { ref: n, className: A("p-6 pt-0", e), ...t }));
|
|
10338
|
+
kn.displayName = "CardContent";
|
|
10330
10339
|
const $w = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
10331
10340
|
"div",
|
|
10332
10341
|
{
|
|
@@ -10388,10 +10397,10 @@ const Hr = /* @__PURE__ */ new Map(), ia = (e) => {
|
|
|
10388
10397
|
toasts: e.toasts.filter((n) => n.id !== t.toastId)
|
|
10389
10398
|
};
|
|
10390
10399
|
}
|
|
10391
|
-
},
|
|
10400
|
+
}, Mn = [];
|
|
10392
10401
|
let Dn = { toasts: [] };
|
|
10393
10402
|
function Yt(e) {
|
|
10394
|
-
Dn = Hw(Dn, e),
|
|
10403
|
+
Dn = Hw(Dn, e), Mn.forEach((t) => {
|
|
10395
10404
|
t(Dn);
|
|
10396
10405
|
});
|
|
10397
10406
|
}
|
|
@@ -10418,9 +10427,9 @@ function Ww({ ...e }) {
|
|
|
10418
10427
|
}
|
|
10419
10428
|
function Vw() {
|
|
10420
10429
|
const [e, t] = l.useState(Dn);
|
|
10421
|
-
return l.useEffect(() => (
|
|
10422
|
-
const n =
|
|
10423
|
-
n > -1 &&
|
|
10430
|
+
return l.useEffect(() => (Mn.push(t), () => {
|
|
10431
|
+
const n = Mn.indexOf(t);
|
|
10432
|
+
n > -1 && Mn.splice(n, 1);
|
|
10424
10433
|
}), [e]), {
|
|
10425
10434
|
...e,
|
|
10426
10435
|
toast: Ww,
|
|
@@ -10498,7 +10507,7 @@ function Ly({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10498
10507
|
/* @__PURE__ */ c(Ju, { className: "h-5 w-5" }),
|
|
10499
10508
|
"API Configuration"
|
|
10500
10509
|
] }) }),
|
|
10501
|
-
/* @__PURE__ */ R(
|
|
10510
|
+
/* @__PURE__ */ R(kn, { className: "space-y-4", children: [
|
|
10502
10511
|
/* @__PURE__ */ R("div", { className: "space-y-2", children: [
|
|
10503
10512
|
/* @__PURE__ */ c(Ie, { htmlFor: "api-url", children: "API Base URL" }),
|
|
10504
10513
|
/* @__PURE__ */ R("div", { className: "flex gap-2", children: [
|
|
@@ -10565,7 +10574,7 @@ function Ly({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10565
10574
|
/* @__PURE__ */ c(ed, { className: "h-5 w-5" }),
|
|
10566
10575
|
"Interface Settings"
|
|
10567
10576
|
] }) }),
|
|
10568
|
-
/* @__PURE__ */ R(
|
|
10577
|
+
/* @__PURE__ */ R(kn, { className: "space-y-4", children: [
|
|
10569
10578
|
/* @__PURE__ */ R("div", { className: "space-y-2", children: [
|
|
10570
10579
|
/* @__PURE__ */ c(Ie, { htmlFor: "layout", children: "Layout Style" }),
|
|
10571
10580
|
/* @__PURE__ */ R(
|
|
@@ -10660,7 +10669,7 @@ function Ly({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10660
10669
|
/* @__PURE__ */ c(td, { className: "h-5 w-5" }),
|
|
10661
10670
|
"Behavior Settings"
|
|
10662
10671
|
] }) }),
|
|
10663
|
-
/* @__PURE__ */ R(
|
|
10672
|
+
/* @__PURE__ */ R(kn, { className: "space-y-4", children: [
|
|
10664
10673
|
/* @__PURE__ */ R("div", { className: "flex items-center justify-between", children: [
|
|
10665
10674
|
/* @__PURE__ */ R("div", { children: [
|
|
10666
10675
|
/* @__PURE__ */ c(Ie, { htmlFor: "auto-save", children: "Auto-save Conversations" }),
|
|
@@ -10810,7 +10819,7 @@ export {
|
|
|
10810
10819
|
zf as ApiClient,
|
|
10811
10820
|
zf as ChatApi,
|
|
10812
10821
|
Pn as ChatInterface,
|
|
10813
|
-
|
|
10822
|
+
ky as ChatMainLayout,
|
|
10814
10823
|
Rn as ChatProvider,
|
|
10815
10824
|
Ry as ChatRoutingProvider,
|
|
10816
10825
|
Ly as ChatSettings,
|