teodor-new-chat-ui 2.0.21 → 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 +239 -239
- 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
|
},
|
|
@@ -2888,12 +2888,12 @@ function gp({
|
|
|
2888
2888
|
onRegenerate: I,
|
|
2889
2889
|
onEditFromCheckpoint: N,
|
|
2890
2890
|
onCancelEdit: L,
|
|
2891
|
-
onCopy:
|
|
2891
|
+
onCopy: k
|
|
2892
2892
|
}) {
|
|
2893
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 () => {
|
|
2894
2894
|
try {
|
|
2895
2895
|
const Y = _ ? St(e.content) : O;
|
|
2896
|
-
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);
|
|
2897
2897
|
} catch (Y) {
|
|
2898
2898
|
console.error("Failed to copy:", Y);
|
|
2899
2899
|
}
|
|
@@ -2974,7 +2974,7 @@ function gp({
|
|
|
2974
2974
|
return /* @__PURE__ */ c(Tp, { data: he });
|
|
2975
2975
|
}
|
|
2976
2976
|
if (_ && X.name === "get_issues") {
|
|
2977
|
-
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);
|
|
2978
2978
|
if (ve) return /* @__PURE__ */ c(Ap, { issues: ve });
|
|
2979
2979
|
}
|
|
2980
2980
|
if (_ && !B) {
|
|
@@ -3021,11 +3021,11 @@ function gp({
|
|
|
3021
3021
|
const he = O.trim();
|
|
3022
3022
|
if (he.length > g)
|
|
3023
3023
|
return /* @__PURE__ */ R(As, { open: F, onOpenChange: G, children: [
|
|
3024
|
-
/* @__PURE__ */ c("div", { className: A("text-sm text-current", 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", 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: [
|
|
3025
3025
|
he.substring(0, g),
|
|
3026
3026
|
"..."
|
|
3027
3027
|
] }) }),
|
|
3028
|
-
/* @__PURE__ */ c(Ps, { asChild: !0, children: /* @__PURE__ */ c(fe, { variant: "ghost", size: "sm", className: "h-6 text-xs text-current", 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: [
|
|
3029
3029
|
/* @__PURE__ */ c(Wt, { className: "h-3 w-3 mr-1" }),
|
|
3030
3030
|
" Show less"
|
|
3031
3031
|
] }) : /* @__PURE__ */ R(De, { children: [
|
|
@@ -3046,19 +3046,19 @@ function gp({
|
|
|
3046
3046
|
] })
|
|
3047
3047
|
] }, he)) }),
|
|
3048
3048
|
ge && /* @__PURE__ */ c("div", { className: "mt-2 flex flex-wrap gap-2", children: z.map((te, he) => {
|
|
3049
|
-
const ve = te,
|
|
3049
|
+
const ve = te, M = ve.name || "file";
|
|
3050
3050
|
return /* @__PURE__ */ R(
|
|
3051
3051
|
"a",
|
|
3052
3052
|
{
|
|
3053
3053
|
href: ve.url,
|
|
3054
|
-
download:
|
|
3054
|
+
download: M,
|
|
3055
3055
|
target: "_blank",
|
|
3056
3056
|
rel: "noreferrer",
|
|
3057
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",
|
|
3058
|
-
title:
|
|
3058
|
+
title: M,
|
|
3059
3059
|
children: [
|
|
3060
3060
|
/* @__PURE__ */ c("span", { className: "inline-block w-1.5 h-1.5 rounded-full bg-gray-400" }),
|
|
3061
|
-
/* @__PURE__ */ c("span", { className: "truncate max-w-[180px]", children:
|
|
3061
|
+
/* @__PURE__ */ c("span", { className: "truncate max-w-[180px]", children: M })
|
|
3062
3062
|
]
|
|
3063
3063
|
},
|
|
3064
3064
|
he
|
|
@@ -3528,7 +3528,7 @@ function ye(e) {
|
|
|
3528
3528
|
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
3529
3529
|
}, []);
|
|
3530
3530
|
}
|
|
3531
|
-
function
|
|
3531
|
+
function kp(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
3532
3532
|
const n = ye(e);
|
|
3533
3533
|
l.useEffect(() => {
|
|
3534
3534
|
const r = (o) => {
|
|
@@ -3537,7 +3537,7 @@ function Mp(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
3537
3537
|
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
3538
3538
|
}, [n, t]);
|
|
3539
3539
|
}
|
|
3540
|
-
var
|
|
3540
|
+
var Mp = "DismissableLayer", Yr = "dismissableLayer.update", Dp = "dismissableLayer.pointerDownOutside", Lp = "dismissableLayer.focusOutside", Is, qa = l.createContext({
|
|
3541
3541
|
layers: /* @__PURE__ */ new Set(),
|
|
3542
3542
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
3543
3543
|
branches: /* @__PURE__ */ new Set()
|
|
@@ -3552,13 +3552,13 @@ var kp = "DismissableLayer", Yr = "dismissableLayer.update", Dp = "dismissableLa
|
|
|
3552
3552
|
onDismiss: i,
|
|
3553
3553
|
...u
|
|
3554
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) => {
|
|
3555
|
-
const L = N.target,
|
|
3556
|
-
!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());
|
|
3557
3557
|
}, g), I = Up((N) => {
|
|
3558
3558
|
const L = N.target;
|
|
3559
3559
|
[...f.branches].some((D) => D.contains(L)) || (s == null || s(N), a == null || a(N), N.defaultPrevented || i == null || i());
|
|
3560
3560
|
}, g);
|
|
3561
|
-
return
|
|
3561
|
+
return kp((N) => {
|
|
3562
3562
|
y === f.layers.size - 1 && (r == null || r(N), !N.defaultPrevented && i && (N.preventDefault(), i()));
|
|
3563
3563
|
}, g), l.useEffect(() => {
|
|
3564
3564
|
if (d)
|
|
@@ -3589,7 +3589,7 @@ var kp = "DismissableLayer", Yr = "dismissableLayer.update", Dp = "dismissableLa
|
|
|
3589
3589
|
);
|
|
3590
3590
|
}
|
|
3591
3591
|
);
|
|
3592
|
-
ln.displayName =
|
|
3592
|
+
ln.displayName = Mp;
|
|
3593
3593
|
var Fp = "DismissableLayerBranch", $p = l.forwardRef((e, t) => {
|
|
3594
3594
|
const n = l.useContext(qa), r = l.useRef(null), o = ne(t, r);
|
|
3595
3595
|
return l.useEffect(() => {
|
|
@@ -3657,16 +3657,16 @@ var _r = 0;
|
|
|
3657
3657
|
function Eo() {
|
|
3658
3658
|
l.useEffect(() => {
|
|
3659
3659
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
3660
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ??
|
|
3660
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? ks()), document.body.insertAdjacentElement("beforeend", e[1] ?? ks()), _r++, () => {
|
|
3661
3661
|
_r === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), _r--;
|
|
3662
3662
|
};
|
|
3663
3663
|
}, []);
|
|
3664
3664
|
}
|
|
3665
|
-
function
|
|
3665
|
+
function ks() {
|
|
3666
3666
|
const e = document.createElement("span");
|
|
3667
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;
|
|
3668
3668
|
}
|
|
3669
|
-
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) => {
|
|
3670
3670
|
const {
|
|
3671
3671
|
loop: n = !1,
|
|
3672
3672
|
trapped: r = !1,
|
|
@@ -3708,12 +3708,12 @@ var Ir = "focusScope.autoFocusOnMount", Or = "focusScope.autoFocusOnUnmount", ks
|
|
|
3708
3708
|
Ls.add(v);
|
|
3709
3709
|
const h = document.activeElement;
|
|
3710
3710
|
if (!i.contains(h)) {
|
|
3711
|
-
const w = new CustomEvent(Ir,
|
|
3711
|
+
const w = new CustomEvent(Ir, Ms);
|
|
3712
3712
|
i.addEventListener(Ir, f), i.dispatchEvent(w), w.defaultPrevented || (Hp(Gp(Ya(i)), { select: !0 }), document.activeElement === h && et(i));
|
|
3713
3713
|
}
|
|
3714
3714
|
return () => {
|
|
3715
3715
|
i.removeEventListener(Ir, f), setTimeout(() => {
|
|
3716
|
-
const w = new CustomEvent(Or,
|
|
3716
|
+
const w = new CustomEvent(Or, Ms);
|
|
3717
3717
|
i.addEventListener(Or, d), i.dispatchEvent(w), w.defaultPrevented || et(h ?? document.body, { select: !0 }), i.removeEventListener(Or, d), Ls.remove(v);
|
|
3718
3718
|
}, 0);
|
|
3719
3719
|
};
|
|
@@ -4079,7 +4079,7 @@ const ah = (e) => ({
|
|
|
4079
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));
|
|
4080
4080
|
let N = I ? I[x] : 0;
|
|
4081
4081
|
(!N || !await (a.isElement == null ? void 0 : a.isElement(I))) && (N = i.floating[x] || s.floating[m]);
|
|
4082
|
-
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;
|
|
4083
4083
|
return {
|
|
4084
4084
|
[v]: g[v] + G,
|
|
4085
4085
|
data: {
|
|
@@ -4118,16 +4118,16 @@ const ah = (e) => ({
|
|
|
4118
4118
|
return {};
|
|
4119
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";
|
|
4120
4120
|
!g && I && C.push(...rh(i, h, m, E));
|
|
4121
|
-
const N = [i, ...C], L = await Jt(t, b),
|
|
4121
|
+
const N = [i, ...C], L = await Jt(t, b), k = [];
|
|
4122
4122
|
let D = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
4123
|
-
if (d &&
|
|
4123
|
+
if (d && k.push(L[w]), p) {
|
|
4124
4124
|
const B = Zp(o, a, E);
|
|
4125
|
-
|
|
4125
|
+
k.push(L[B[0]], L[B[1]]);
|
|
4126
4126
|
}
|
|
4127
4127
|
if (D = [...D, {
|
|
4128
4128
|
placement: o,
|
|
4129
|
-
overflows:
|
|
4130
|
-
}], !
|
|
4129
|
+
overflows: k
|
|
4130
|
+
}], !k.every((B) => B <= 0)) {
|
|
4131
4131
|
var j, K;
|
|
4132
4132
|
const B = (((j = s.flip) == null ? void 0 : j.index) || 0) + 1, q = N[B];
|
|
4133
4133
|
if (q && (!(p === "alignment" ? y !== je(q) : !1) || // We leave the current main axis only if every placement on that axis
|
|
@@ -4406,8 +4406,8 @@ const uh = function(e) {
|
|
|
4406
4406
|
availableWidth: L,
|
|
4407
4407
|
availableHeight: N
|
|
4408
4408
|
});
|
|
4409
|
-
const
|
|
4410
|
-
return m !==
|
|
4409
|
+
const k = await a.getDimensions(i.floating);
|
|
4410
|
+
return m !== k.width || h !== k.height ? {
|
|
4411
4411
|
reset: {
|
|
4412
4412
|
rects: !0
|
|
4413
4413
|
}
|
|
@@ -4727,7 +4727,7 @@ function Oh(e) {
|
|
|
4727
4727
|
y: u.top
|
|
4728
4728
|
};
|
|
4729
4729
|
}
|
|
4730
|
-
function
|
|
4730
|
+
function kh(e) {
|
|
4731
4731
|
const {
|
|
4732
4732
|
width: t,
|
|
4733
4733
|
height: n
|
|
@@ -4737,7 +4737,7 @@ function Mh(e) {
|
|
|
4737
4737
|
height: n
|
|
4738
4738
|
};
|
|
4739
4739
|
}
|
|
4740
|
-
function
|
|
4740
|
+
function Mh(e, t, n) {
|
|
4741
4741
|
const r = qe(t), o = Xe(t), s = n === "fixed", a = ht(e, !0, s, t);
|
|
4742
4742
|
let i = {
|
|
4743
4743
|
scrollLeft: 0,
|
|
@@ -4761,7 +4761,7 @@ function kh(e, t, n) {
|
|
|
4761
4761
|
height: a.height
|
|
4762
4762
|
};
|
|
4763
4763
|
}
|
|
4764
|
-
function
|
|
4764
|
+
function kr(e) {
|
|
4765
4765
|
return $e(e).position === "static";
|
|
4766
4766
|
}
|
|
4767
4767
|
function Ks(e, t) {
|
|
@@ -4779,21 +4779,21 @@ function si(e, t) {
|
|
|
4779
4779
|
if (!qe(e)) {
|
|
4780
4780
|
let o = at(e);
|
|
4781
4781
|
for (; o && !Ot(o); ) {
|
|
4782
|
-
if (Fe(o) && !
|
|
4782
|
+
if (Fe(o) && !kr(o))
|
|
4783
4783
|
return o;
|
|
4784
4784
|
o = at(o);
|
|
4785
4785
|
}
|
|
4786
4786
|
return n;
|
|
4787
4787
|
}
|
|
4788
4788
|
let r = Ks(e, t);
|
|
4789
|
-
for (; r && gh(r) &&
|
|
4789
|
+
for (; r && gh(r) && kr(r); )
|
|
4790
4790
|
r = Ks(r, t);
|
|
4791
|
-
return r && Ot(r) &&
|
|
4791
|
+
return r && Ot(r) && kr(r) && !Ao(r) ? n : r || xh(e) || n;
|
|
4792
4792
|
}
|
|
4793
4793
|
const Dh = async function(e) {
|
|
4794
4794
|
const t = this.getOffsetParent || si, n = this.getDimensions, r = await n(e.floating);
|
|
4795
4795
|
return {
|
|
4796
|
-
reference:
|
|
4796
|
+
reference: Mh(e.reference, await t(e.floating), e.strategy),
|
|
4797
4797
|
floating: {
|
|
4798
4798
|
x: 0,
|
|
4799
4799
|
y: 0,
|
|
@@ -4812,7 +4812,7 @@ const Fh = {
|
|
|
4812
4812
|
getOffsetParent: si,
|
|
4813
4813
|
getElementRects: Dh,
|
|
4814
4814
|
getClientRects: Nh,
|
|
4815
|
-
getDimensions:
|
|
4815
|
+
getDimensions: kh,
|
|
4816
4816
|
getScale: At,
|
|
4817
4817
|
isElement: Fe,
|
|
4818
4818
|
isRTL: Lh
|
|
@@ -4954,7 +4954,7 @@ function qs(e, t) {
|
|
|
4954
4954
|
const n = ii(e);
|
|
4955
4955
|
return Math.round(t * n) / n;
|
|
4956
4956
|
}
|
|
4957
|
-
function
|
|
4957
|
+
function Mr(e) {
|
|
4958
4958
|
const t = l.useRef(e);
|
|
4959
4959
|
return Nn(() => {
|
|
4960
4960
|
t.current = e;
|
|
@@ -4987,7 +4987,7 @@ function Xh(e) {
|
|
|
4987
4987
|
T !== I.current && (I.current = T, h(T));
|
|
4988
4988
|
}, []), x = l.useCallback((T) => {
|
|
4989
4989
|
T !== N.current && (N.current = T, w(T));
|
|
4990
|
-
}, []), 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(() => {
|
|
4991
4991
|
if (!I.current || !N.current)
|
|
4992
4992
|
return;
|
|
4993
4993
|
const T = {
|
|
@@ -5024,7 +5024,7 @@ function Xh(e) {
|
|
|
5024
5024
|
return D.current(E, C, W);
|
|
5025
5025
|
W();
|
|
5026
5026
|
}
|
|
5027
|
-
}, [E, C, W, D,
|
|
5027
|
+
}, [E, C, W, D, k]);
|
|
5028
5028
|
const q = l.useMemo(() => ({
|
|
5029
5029
|
reference: I,
|
|
5030
5030
|
floating: N,
|
|
@@ -5177,7 +5177,7 @@ var Oo = "PopperContent", [im, cm] = ui(Oo), mi = l.forwardRef(
|
|
|
5177
5177
|
updatePositionStrategy: v = "optimized",
|
|
5178
5178
|
onPlaced: m,
|
|
5179
5179
|
...h
|
|
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,
|
|
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 = {
|
|
5181
5181
|
padding: D,
|
|
5182
5182
|
boundary: j.filter(um),
|
|
5183
5183
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
@@ -5185,7 +5185,7 @@ var Oo = "PopperContent", [im, cm] = ui(Oo), mi = l.forwardRef(
|
|
|
5185
5185
|
}, { refs: B, floatingStyles: q, placement: F, isPositioned: G, middlewareData: T } = Xh({
|
|
5186
5186
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
5187
5187
|
strategy: "fixed",
|
|
5188
|
-
placement:
|
|
5188
|
+
placement: k,
|
|
5189
5189
|
whileElementsMounted: (...de) => Bh(...de, {
|
|
5190
5190
|
animationFrame: v === "always"
|
|
5191
5191
|
}),
|
|
@@ -5342,7 +5342,7 @@ function vi(e) {
|
|
|
5342
5342
|
const [t, n = "center"] = e.split("-");
|
|
5343
5343
|
return [t, n];
|
|
5344
5344
|
}
|
|
5345
|
-
var
|
|
5345
|
+
var ko = fi, Mo = hi, Do = mi, Lo = bi, fm = "Portal", ir = l.forwardRef((e, t) => {
|
|
5346
5346
|
var i;
|
|
5347
5347
|
const { container: n, ...r } = e, [o, s] = l.useState(!1);
|
|
5348
5348
|
be(() => s(!0), []);
|
|
@@ -5412,8 +5412,8 @@ var vm = l.forwardRef((e, t) => {
|
|
|
5412
5412
|
C.current = !0;
|
|
5413
5413
|
}),
|
|
5414
5414
|
onFocus: U(e.onFocus, (L) => {
|
|
5415
|
-
const
|
|
5416
|
-
if (L.target === L.currentTarget &&
|
|
5415
|
+
const k = !C.current;
|
|
5416
|
+
if (L.target === L.currentTarget && k && !w) {
|
|
5417
5417
|
const D = new CustomEvent(Dr, pm);
|
|
5418
5418
|
if (L.currentTarget.dispatchEvent(D), !D.defaultPrevented) {
|
|
5419
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(
|
|
@@ -5610,7 +5610,7 @@ function Im(e, t) {
|
|
|
5610
5610
|
return n.callback = t, n.facade;
|
|
5611
5611
|
}
|
|
5612
5612
|
var Om = typeof window < "u" ? l.useLayoutEffect : l.useEffect, Xs = /* @__PURE__ */ new WeakMap();
|
|
5613
|
-
function
|
|
5613
|
+
function km(e, t) {
|
|
5614
5614
|
var n = Im(null, function(r) {
|
|
5615
5615
|
return e.forEach(function(o) {
|
|
5616
5616
|
return Fr(o, r);
|
|
@@ -5629,11 +5629,11 @@ function Mm(e, t) {
|
|
|
5629
5629
|
Xs.set(n, e);
|
|
5630
5630
|
}, [e]), n;
|
|
5631
5631
|
}
|
|
5632
|
-
function
|
|
5632
|
+
function Mm(e) {
|
|
5633
5633
|
return e;
|
|
5634
5634
|
}
|
|
5635
5635
|
function Dm(e, t) {
|
|
5636
|
-
t === void 0 && (t =
|
|
5636
|
+
t === void 0 && (t = Mm);
|
|
5637
5637
|
var n = [], r = !1, o = {
|
|
5638
5638
|
read: function() {
|
|
5639
5639
|
if (r)
|
|
@@ -5711,7 +5711,7 @@ var Ai = Lm(), $r = function() {
|
|
|
5711
5711
|
onScrollCapture: $r,
|
|
5712
5712
|
onWheelCapture: $r,
|
|
5713
5713
|
onTouchMoveCapture: $r
|
|
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 =
|
|
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);
|
|
5715
5715
|
return l.createElement(
|
|
5716
5716
|
l.Fragment,
|
|
5717
5717
|
null,
|
|
@@ -5972,8 +5972,8 @@ function ig(e) {
|
|
|
5972
5972
|
return !1;
|
|
5973
5973
|
if (!r.current && "changedTouches" in h && (x || E) && (r.current = C), !C)
|
|
5974
5974
|
return !0;
|
|
5975
|
-
var
|
|
5976
|
-
return rg(
|
|
5975
|
+
var k = r.current || C;
|
|
5976
|
+
return rg(k, b, h, k === "h" ? x : E);
|
|
5977
5977
|
}, []), u = l.useCallback(function(h) {
|
|
5978
5978
|
var b = h;
|
|
5979
5979
|
if (!(!Rt.length || Rt[Rt.length - 1] !== s)) {
|
|
@@ -6034,13 +6034,13 @@ var lr = l.forwardRef(function(e, t) {
|
|
|
6034
6034
|
return l.createElement(cr, Ve({}, e, { ref: t, sideCar: lg }));
|
|
6035
6035
|
});
|
|
6036
6036
|
lr.classNames = cr.classNames;
|
|
6037
|
-
var no = ["Enter", " "], ug = ["ArrowDown", "PageUp", "Home"],
|
|
6037
|
+
var no = ["Enter", " "], ug = ["ArrowDown", "PageUp", "Home"], ki = ["ArrowUp", "PageDown", "End"], dg = [...ug, ...ki], fg = {
|
|
6038
6038
|
ltr: [...no, "ArrowRight"],
|
|
6039
6039
|
rtl: [...no, "ArrowLeft"]
|
|
6040
6040
|
}, pg = {
|
|
6041
6041
|
ltr: ["ArrowLeft"],
|
|
6042
6042
|
rtl: ["ArrowRight"]
|
|
6043
|
-
}, fn = "Menu", [Qt, hg, mg] = Co(fn), [vt,
|
|
6043
|
+
}, fn = "Menu", [Qt, hg, mg] = Co(fn), [vt, Mi] = Ue(fn, [
|
|
6044
6044
|
mg,
|
|
6045
6045
|
Ut,
|
|
6046
6046
|
yi
|
|
@@ -6053,7 +6053,7 @@ var no = ["Enter", " "], ug = ["ArrowDown", "PageUp", "Home"], Mi = ["ArrowUp",
|
|
|
6053
6053
|
return document.addEventListener("keydown", v, { capture: !0 }), () => {
|
|
6054
6054
|
document.removeEventListener("keydown", v, { capture: !0 }), document.removeEventListener("pointerdown", m, { capture: !0 }), document.removeEventListener("pointermove", m, { capture: !0 });
|
|
6055
6055
|
};
|
|
6056
|
-
}, []), /* @__PURE__ */ c(
|
|
6056
|
+
}, []), /* @__PURE__ */ c(ko, { ...i, children: /* @__PURE__ */ c(
|
|
6057
6057
|
gg,
|
|
6058
6058
|
{
|
|
6059
6059
|
scope: t,
|
|
@@ -6079,7 +6079,7 @@ Li.displayName = fn;
|
|
|
6079
6079
|
var vg = "MenuAnchor", $o = l.forwardRef(
|
|
6080
6080
|
(e, t) => {
|
|
6081
6081
|
const { __scopeMenu: n, ...r } = e, o = ur(n);
|
|
6082
|
-
return /* @__PURE__ */ c(
|
|
6082
|
+
return /* @__PURE__ */ c(Mo, { ...o, ...r, ref: t });
|
|
6083
6083
|
}
|
|
6084
6084
|
);
|
|
6085
6085
|
$o.displayName = vg;
|
|
@@ -6148,14 +6148,14 @@ var Oe = "MenuContent", [yg, Uo] = vt(Oe), Bi = l.forwardRef(
|
|
|
6148
6148
|
onDismiss: v,
|
|
6149
6149
|
disableOutsideScroll: m,
|
|
6150
6150
|
...h
|
|
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),
|
|
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) => {
|
|
6152
6152
|
var V, oe;
|
|
6153
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;
|
|
6154
6154
|
(function ie(se) {
|
|
6155
|
-
D.current = se, window.clearTimeout(
|
|
6155
|
+
D.current = se, window.clearTimeout(k.current), se !== "" && (k.current = window.setTimeout(() => ie(""), 1e3));
|
|
6156
6156
|
})(_), ae && setTimeout(() => ae.focus());
|
|
6157
6157
|
};
|
|
6158
|
-
l.useEffect(() => () => window.clearTimeout(
|
|
6158
|
+
l.useEffect(() => () => window.clearTimeout(k.current), []), Eo();
|
|
6159
6159
|
const T = l.useCallback((P) => {
|
|
6160
6160
|
var O, X;
|
|
6161
6161
|
return W.current === ((O = K.current) == null ? void 0 : O.side) && Fg(P, (X = K.current) == null ? void 0 : X.area);
|
|
@@ -6241,10 +6241,10 @@ var Oe = "MenuContent", [yg, Uo] = vt(Oe), Bi = l.forwardRef(
|
|
|
6241
6241
|
if (P.target !== z || !dg.includes(P.key)) return;
|
|
6242
6242
|
P.preventDefault();
|
|
6243
6243
|
const ae = E().filter((V) => !V.disabled).map((V) => V.ref.current);
|
|
6244
|
-
|
|
6244
|
+
ki.includes(P.key) && ae.reverse(), kg(ae);
|
|
6245
6245
|
}),
|
|
6246
6246
|
onBlur: U(e.onBlur, (P) => {
|
|
6247
|
-
P.currentTarget.contains(P.target) || (window.clearTimeout(
|
|
6247
|
+
P.currentTarget.contains(P.target) || (window.clearTimeout(k.current), D.current = "");
|
|
6248
6248
|
}),
|
|
6249
6249
|
onPointerMove: U(
|
|
6250
6250
|
e.onPointerMove,
|
|
@@ -6571,17 +6571,17 @@ function Wn(e) {
|
|
|
6571
6571
|
function Vo(e) {
|
|
6572
6572
|
return Wn(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
6573
6573
|
}
|
|
6574
|
-
function
|
|
6574
|
+
function kg(e) {
|
|
6575
6575
|
const t = document.activeElement;
|
|
6576
6576
|
for (const n of e)
|
|
6577
6577
|
if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
6578
6578
|
}
|
|
6579
|
-
function
|
|
6579
|
+
function Mg(e, t) {
|
|
6580
6580
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
6581
6581
|
}
|
|
6582
6582
|
function Dg(e, t, n) {
|
|
6583
6583
|
const o = t.length > 1 && Array.from(t).every((f) => f === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
|
|
6584
|
-
let a =
|
|
6584
|
+
let a = Mg(e, Math.max(s, 0));
|
|
6585
6585
|
o.length === 1 && (a = a.filter((f) => f !== n));
|
|
6586
6586
|
const u = a.find(
|
|
6587
6587
|
(f) => f.toLowerCase().startsWith(o.toLowerCase())
|
|
@@ -6607,8 +6607,8 @@ function en(e) {
|
|
|
6607
6607
|
}
|
|
6608
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(
|
|
6609
6609
|
fr,
|
|
6610
|
-
[
|
|
6611
|
-
), Ee =
|
|
6610
|
+
[Mi]
|
|
6611
|
+
), Ee = Mi(), [eb, nc] = Qg(fr), rc = (e) => {
|
|
6612
6612
|
const {
|
|
6613
6613
|
__scopeDropdownMenu: t,
|
|
6614
6614
|
children: n,
|
|
@@ -6916,30 +6916,30 @@ function Pn({
|
|
|
6916
6916
|
listCheckpoints: y,
|
|
6917
6917
|
navigateToCheckpoint: x,
|
|
6918
6918
|
returnToLatest: E
|
|
6919
|
-
} = 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");
|
|
6920
6920
|
we(() => {
|
|
6921
|
-
const
|
|
6921
|
+
const M = () => {
|
|
6922
6922
|
const Q = window.innerWidth;
|
|
6923
6923
|
$(Q < 640 ? "phone" : Q < 1024 ? "tablet" : "desktop");
|
|
6924
6924
|
};
|
|
6925
|
-
return
|
|
6925
|
+
return M(), window.addEventListener("resize", M), () => window.removeEventListener("resize", M);
|
|
6926
6926
|
}, []), we(() => {
|
|
6927
|
-
var
|
|
6928
|
-
(
|
|
6927
|
+
var M;
|
|
6928
|
+
(M = P.current) == null || M.scrollIntoView({ behavior: "smooth" });
|
|
6929
6929
|
}, [p]), we(() => {
|
|
6930
|
-
var
|
|
6931
|
-
n && ((
|
|
6930
|
+
var M;
|
|
6931
|
+
n && ((M = _.current) == null || M.focus());
|
|
6932
6932
|
}, [n]), we(() => {
|
|
6933
6933
|
m && !W && (f == null || f(m));
|
|
6934
6934
|
}, [m, W, f]), we(() => {
|
|
6935
|
-
let
|
|
6935
|
+
let M = !0;
|
|
6936
6936
|
if (!d) {
|
|
6937
6937
|
F([]), T(null);
|
|
6938
6938
|
return;
|
|
6939
6939
|
}
|
|
6940
6940
|
return y(d).then((Q) => {
|
|
6941
6941
|
var Re;
|
|
6942
|
-
if (!
|
|
6942
|
+
if (!M) return;
|
|
6943
6943
|
const re = Q.checkpoints || [];
|
|
6944
6944
|
F(re);
|
|
6945
6945
|
const ue = ((Re = re.slice().sort(
|
|
@@ -6948,32 +6948,32 @@ function Pn({
|
|
|
6948
6948
|
T((yt) => yt ?? ue);
|
|
6949
6949
|
}).catch(() => {
|
|
6950
6950
|
}), () => {
|
|
6951
|
-
|
|
6951
|
+
M = !1;
|
|
6952
6952
|
};
|
|
6953
6953
|
}, [d, y]), we(() => {
|
|
6954
6954
|
w && T(w);
|
|
6955
6955
|
}, [w]);
|
|
6956
|
-
const z = (
|
|
6957
|
-
if (
|
|
6958
|
-
return `Message too long (${
|
|
6956
|
+
const z = (M) => {
|
|
6957
|
+
if (M.length > Nt)
|
|
6958
|
+
return `Message too long (${M.length}/${Nt} characters)`;
|
|
6959
6959
|
try {
|
|
6960
|
-
return Ip(
|
|
6960
|
+
return Ip(M), null;
|
|
6961
6961
|
} catch (Q) {
|
|
6962
6962
|
return (Q == null ? void 0 : Q.message) || "Invalid message";
|
|
6963
6963
|
}
|
|
6964
|
-
}, le = (
|
|
6965
|
-
const Q =
|
|
6964
|
+
}, le = (M) => {
|
|
6965
|
+
const Q = M.content || [], re = Q.filter((ue) => ue.type === "text").map((ue) => ue.text).join("");
|
|
6966
6966
|
if (re) return re;
|
|
6967
6967
|
try {
|
|
6968
6968
|
return JSON.stringify(Q, null, 2);
|
|
6969
6969
|
} catch {
|
|
6970
6970
|
return String(Q);
|
|
6971
6971
|
}
|
|
6972
|
-
}, ae = (
|
|
6972
|
+
}, ae = (M) => {
|
|
6973
6973
|
var yt;
|
|
6974
6974
|
if (!q.length)
|
|
6975
6975
|
return [];
|
|
6976
|
-
const re = (((yt = p[
|
|
6976
|
+
const re = (((yt = p[M]) == null ? void 0 : yt.role) ?? "user") === "user", ue = re ? M + 2 : M + 1;
|
|
6977
6977
|
return q.filter((Se) => (Se.messagesLen ?? -1) >= (re ? ue : 0)).filter((Se) => re ? (Se.messagesLen ?? 0) >= ue : (Se.messagesLen ?? 0) === ue).map((Se) => ({
|
|
6978
6978
|
checkpoint_id: Se.checkpointId,
|
|
6979
6979
|
checkpoint_ns: Se.checkpointNs,
|
|
@@ -6981,54 +6981,54 @@ function Pn({
|
|
|
6981
6981
|
last_message_preview: Se.preview ?? void 0,
|
|
6982
6982
|
ts: new Date(Se.createdAt).getTime(),
|
|
6983
6983
|
isCurrent: Se.checkpointId === G
|
|
6984
|
-
})).sort((Se,
|
|
6985
|
-
}, V = (
|
|
6986
|
-
if (
|
|
6984
|
+
})).sort((Se, Mu) => (Se.ts || 0) - (Mu.ts || 0));
|
|
6985
|
+
}, V = (M) => {
|
|
6986
|
+
if (M === void 0)
|
|
6987
6987
|
return { canGoBack: !1, canGoForward: !1, currentIndex: 0, totalBranches: 0 };
|
|
6988
|
-
const Q = ae(
|
|
6988
|
+
const Q = ae(M);
|
|
6989
6989
|
if (Q.length <= 1)
|
|
6990
6990
|
return { canGoBack: !1, canGoForward: !1, currentIndex: 0, totalBranches: Q.length };
|
|
6991
6991
|
const re = Math.max(0, Q.findIndex((ue) => ue.isCurrent));
|
|
6992
6992
|
return { canGoBack: re > 0, canGoForward: re < Q.length - 1, currentIndex: re, totalBranches: Q.length };
|
|
6993
6993
|
}, oe = async () => {
|
|
6994
|
-
const
|
|
6995
|
-
if (!
|
|
6996
|
-
const Q = z(
|
|
6994
|
+
const M = C.trim();
|
|
6995
|
+
if (!M && j.length === 0) return;
|
|
6996
|
+
const Q = z(M);
|
|
6997
6997
|
if (Q) {
|
|
6998
6998
|
D(Q);
|
|
6999
6999
|
return;
|
|
7000
7000
|
}
|
|
7001
7001
|
try {
|
|
7002
7002
|
const re = window.__editingCheckpointId || G || void 0;
|
|
7003
|
-
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");
|
|
7004
7004
|
} catch (re) {
|
|
7005
7005
|
const ue = (re == null ? void 0 : re.message) || "Failed to send message";
|
|
7006
7006
|
D(ue), f == null || f(ue);
|
|
7007
7007
|
}
|
|
7008
|
-
}, ie = (
|
|
7009
|
-
a && (L(
|
|
7008
|
+
}, ie = (M, Q) => {
|
|
7009
|
+
a && (L(M), I(Q), D(null), setTimeout(() => {
|
|
7010
7010
|
_.current && (_.current.focus(), _.current.style.height = "auto", _.current.style.height = _.current.scrollHeight + "px");
|
|
7011
7011
|
}, 0));
|
|
7012
|
-
}, se = async (
|
|
7013
|
-
const re = p.find((Re) => Re.id ===
|
|
7012
|
+
}, se = async (M, Q) => {
|
|
7013
|
+
const re = p.find((Re) => Re.id === M);
|
|
7014
7014
|
if (!re) {
|
|
7015
7015
|
D("Message not found");
|
|
7016
7016
|
return;
|
|
7017
7017
|
}
|
|
7018
7018
|
const ue = le(re);
|
|
7019
|
-
L(
|
|
7019
|
+
L(M), I(ue), window.__editingCheckpointId = Q, setTimeout(() => {
|
|
7020
7020
|
var Re;
|
|
7021
7021
|
return (Re = _.current) == null ? void 0 : Re.focus();
|
|
7022
7022
|
}, 0);
|
|
7023
7023
|
}, H = () => {
|
|
7024
7024
|
L(null), I(""), D(null), delete window.__editingCheckpointId, _.current && (_.current.style.height = "auto");
|
|
7025
|
-
}, Z = (
|
|
7026
|
-
|
|
7027
|
-
}, de = (
|
|
7028
|
-
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 || []);
|
|
7029
7029
|
K((re) => [...re, ...Q]);
|
|
7030
|
-
}, pe = (
|
|
7031
|
-
d && (await x(
|
|
7030
|
+
}, pe = (M) => K((Q) => Q.filter((re, ue) => M !== ue)), Y = async (M) => {
|
|
7031
|
+
d && (await x(M), T(M));
|
|
7032
7032
|
}, ge = async () => {
|
|
7033
7033
|
await E(), T(null);
|
|
7034
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 || ""}`;
|
|
@@ -7055,29 +7055,29 @@ function Pn({
|
|
|
7055
7055
|
{
|
|
7056
7056
|
className: "border rounded px-2 py-1 text-xs",
|
|
7057
7057
|
value: G ?? "",
|
|
7058
|
-
onChange: (
|
|
7059
|
-
const Q =
|
|
7058
|
+
onChange: (M) => {
|
|
7059
|
+
const Q = M.target.value || null;
|
|
7060
7060
|
Q ? Y(Q) : ge();
|
|
7061
7061
|
},
|
|
7062
7062
|
children: [
|
|
7063
7063
|
/* @__PURE__ */ c("option", { value: "", children: "Latest" }),
|
|
7064
|
-
q.slice().sort((
|
|
7065
|
-
new Date(
|
|
7066
|
-
|
|
7067
|
-
] },
|
|
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))
|
|
7068
7068
|
]
|
|
7069
7069
|
}
|
|
7070
7070
|
)
|
|
7071
7071
|
] }),
|
|
7072
7072
|
/* @__PURE__ */ R("div", { className: he, style: r ? { maxHeight: r } : void 0, children: [
|
|
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((
|
|
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(
|
|
7074
7074
|
gp,
|
|
7075
7075
|
{
|
|
7076
|
-
message:
|
|
7076
|
+
message: M,
|
|
7077
7077
|
messageIndex: Q,
|
|
7078
|
-
isStreamingMessage: g && v ===
|
|
7078
|
+
isStreamingMessage: g && v === M.id,
|
|
7079
7079
|
streamingDebounceMs: o,
|
|
7080
|
-
isEditing: N ===
|
|
7080
|
+
isEditing: N === M.id,
|
|
7081
7081
|
showActions: a,
|
|
7082
7082
|
showTimestamp: !1,
|
|
7083
7083
|
showAgentName: !0,
|
|
@@ -7105,7 +7105,7 @@ function Pn({
|
|
|
7105
7105
|
},
|
|
7106
7106
|
onCancelEdit: H
|
|
7107
7107
|
},
|
|
7108
|
-
|
|
7108
|
+
M.id || Q
|
|
7109
7109
|
)),
|
|
7110
7110
|
/* @__PURE__ */ c("div", { ref: P })
|
|
7111
7111
|
] }),
|
|
@@ -7133,13 +7133,13 @@ function Pn({
|
|
|
7133
7133
|
ref: O,
|
|
7134
7134
|
type: "file",
|
|
7135
7135
|
multiple: !0,
|
|
7136
|
-
onChange: (
|
|
7136
|
+
onChange: (M) => de(M),
|
|
7137
7137
|
className: "hidden"
|
|
7138
7138
|
}
|
|
7139
7139
|
),
|
|
7140
|
-
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: [
|
|
7141
7141
|
/* @__PURE__ */ c(ss, { size: 14 }),
|
|
7142
|
-
/* @__PURE__ */ c("span", { className: "truncate max-w-[150px]", children:
|
|
7142
|
+
/* @__PURE__ */ c("span", { className: "truncate max-w-[150px]", children: M.name }),
|
|
7143
7143
|
/* @__PURE__ */ c(
|
|
7144
7144
|
fe,
|
|
7145
7145
|
{
|
|
@@ -7147,13 +7147,13 @@ function Pn({
|
|
|
7147
7147
|
size: "sm",
|
|
7148
7148
|
onClick: () => pe(Q),
|
|
7149
7149
|
className: "h-4 w-4 p-0 text-gray-500 hover:text-red-500",
|
|
7150
|
-
"aria-label": `Remove ${
|
|
7150
|
+
"aria-label": `Remove ${M.name}`,
|
|
7151
7151
|
children: /* @__PURE__ */ c(Kt, { size: 12 })
|
|
7152
7152
|
}
|
|
7153
7153
|
)
|
|
7154
7154
|
] }, Q)) })
|
|
7155
7155
|
] }),
|
|
7156
|
-
|
|
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 }),
|
|
7157
7157
|
/* @__PURE__ */ R("div", { className: "flex items-end gap-2", children: [
|
|
7158
7158
|
s && /* @__PURE__ */ R(wb, { children: [
|
|
7159
7159
|
/* @__PURE__ */ c(yb, { asChild: !0, children: /* @__PURE__ */ c(
|
|
@@ -7169,8 +7169,8 @@ function Pn({
|
|
|
7169
7169
|
}
|
|
7170
7170
|
) }),
|
|
7171
7171
|
/* @__PURE__ */ c(Nc, { align: "start", sideOffset: 6, className: "w-52", children: /* @__PURE__ */ R(Tc, { onClick: () => {
|
|
7172
|
-
var
|
|
7173
|
-
return (
|
|
7172
|
+
var M;
|
|
7173
|
+
return (M = O.current) == null ? void 0 : M.click();
|
|
7174
7174
|
}, className: "cursor-pointer", children: [
|
|
7175
7175
|
/* @__PURE__ */ c(ss, { className: "h-4 w-4 mr-2" }),
|
|
7176
7176
|
" Attach files or images"
|
|
@@ -7181,12 +7181,12 @@ function Pn({
|
|
|
7181
7181
|
{
|
|
7182
7182
|
ref: _,
|
|
7183
7183
|
value: C,
|
|
7184
|
-
onChange: (
|
|
7185
|
-
I(
|
|
7184
|
+
onChange: (M) => {
|
|
7185
|
+
I(M.target.value), D(null), _.current && (_.current.style.height = "auto", _.current.style.height = `${_.current.scrollHeight}px`);
|
|
7186
7186
|
},
|
|
7187
7187
|
onKeyDown: Z,
|
|
7188
7188
|
placeholder: N ? "Edit your message..." : t,
|
|
7189
|
-
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 || ""}`,
|
|
7190
7190
|
disabled: !1,
|
|
7191
7191
|
maxLength: Nt,
|
|
7192
7192
|
rows: 1
|
|
@@ -7245,7 +7245,7 @@ function ro(e, [t, n]) {
|
|
|
7245
7245
|
function Tb(e, t) {
|
|
7246
7246
|
return l.useReducer((n, r) => t[n][r] ?? n, e);
|
|
7247
7247
|
}
|
|
7248
|
-
var jo = "ScrollArea", [Ac, Ey] = Ue(jo), [Ab,
|
|
7248
|
+
var jo = "ScrollArea", [Ac, Ey] = Ue(jo), [Ab, ke] = Ac(jo), Pc = l.forwardRef(
|
|
7249
7249
|
(e, t) => {
|
|
7250
7250
|
const {
|
|
7251
7251
|
__scopeScrollArea: n,
|
|
@@ -7253,7 +7253,7 @@ var jo = "ScrollArea", [Ac, Ey] = Ue(jo), [Ab, Me] = Ac(jo), Pc = l.forwardRef(
|
|
|
7253
7253
|
dir: o,
|
|
7254
7254
|
scrollHideDelay: s = 600,
|
|
7255
7255
|
...a
|
|
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),
|
|
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);
|
|
7257
7257
|
return /* @__PURE__ */ c(
|
|
7258
7258
|
Ab,
|
|
7259
7259
|
{
|
|
@@ -7281,7 +7281,7 @@ var jo = "ScrollArea", [Ac, Ey] = Ue(jo), [Ab, Me] = Ac(jo), Pc = l.forwardRef(
|
|
|
7281
7281
|
{
|
|
7282
7282
|
dir: D,
|
|
7283
7283
|
...a,
|
|
7284
|
-
ref:
|
|
7284
|
+
ref: k,
|
|
7285
7285
|
style: {
|
|
7286
7286
|
position: "relative",
|
|
7287
7287
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
@@ -7298,7 +7298,7 @@ var jo = "ScrollArea", [Ac, Ey] = Ue(jo), [Ab, Me] = Ac(jo), Pc = l.forwardRef(
|
|
|
7298
7298
|
Pc.displayName = jo;
|
|
7299
7299
|
var _c = "ScrollAreaViewport", Ic = l.forwardRef(
|
|
7300
7300
|
(e, t) => {
|
|
7301
|
-
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);
|
|
7302
7302
|
return /* @__PURE__ */ R(De, { children: [
|
|
7303
7303
|
/* @__PURE__ */ c(
|
|
7304
7304
|
"style",
|
|
@@ -7340,7 +7340,7 @@ var _c = "ScrollAreaViewport", Ic = l.forwardRef(
|
|
|
7340
7340
|
Ic.displayName = _c;
|
|
7341
7341
|
var Ye = "ScrollAreaScrollbar", Ko = l.forwardRef(
|
|
7342
7342
|
(e, t) => {
|
|
7343
|
-
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";
|
|
7344
7344
|
return l.useEffect(() => (i ? s(!0) : a(!0), () => {
|
|
7345
7345
|
i ? s(!1) : a(!1);
|
|
7346
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;
|
|
@@ -7348,7 +7348,7 @@ var Ye = "ScrollAreaScrollbar", Ko = l.forwardRef(
|
|
|
7348
7348
|
);
|
|
7349
7349
|
Ko.displayName = Ye;
|
|
7350
7350
|
var Pb = l.forwardRef((e, t) => {
|
|
7351
|
-
const { forceMount: n, ...r } = e, o =
|
|
7351
|
+
const { forceMount: n, ...r } = e, o = ke(Ye, e.__scopeScrollArea), [s, a] = l.useState(!1);
|
|
7352
7352
|
return l.useEffect(() => {
|
|
7353
7353
|
const i = o.scrollArea;
|
|
7354
7354
|
let u = 0;
|
|
@@ -7371,7 +7371,7 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7371
7371
|
}
|
|
7372
7372
|
) });
|
|
7373
7373
|
}), _b = l.forwardRef((e, t) => {
|
|
7374
|
-
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", {
|
|
7375
7375
|
hidden: {
|
|
7376
7376
|
SCROLL: "scrolling"
|
|
7377
7377
|
},
|
|
@@ -7415,13 +7415,13 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7415
7415
|
}
|
|
7416
7416
|
) });
|
|
7417
7417
|
}), Oc = l.forwardRef((e, t) => {
|
|
7418
|
-
const n =
|
|
7418
|
+
const n = ke(Ye, e.__scopeScrollArea), { forceMount: r, ...o } = e, [s, a] = l.useState(!1), i = e.orientation === "horizontal", u = hr(() => {
|
|
7419
7419
|
if (n.viewport) {
|
|
7420
7420
|
const f = n.viewport.offsetWidth < n.viewport.scrollWidth, d = n.viewport.offsetHeight < n.viewport.scrollHeight;
|
|
7421
7421
|
a(i ? f : d);
|
|
7422
7422
|
}
|
|
7423
7423
|
}, 10);
|
|
7424
|
-
return
|
|
7424
|
+
return kt(n.viewport, u), kt(n.content, u), /* @__PURE__ */ c(Ae, { present: r || s, children: /* @__PURE__ */ c(
|
|
7425
7425
|
Go,
|
|
7426
7426
|
{
|
|
7427
7427
|
"data-state": s ? "visible" : "hidden",
|
|
@@ -7430,7 +7430,7 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7430
7430
|
}
|
|
7431
7431
|
) });
|
|
7432
7432
|
}), Go = l.forwardRef((e, t) => {
|
|
7433
|
-
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({
|
|
7434
7434
|
content: 0,
|
|
7435
7435
|
viewport: 0,
|
|
7436
7436
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
@@ -7484,11 +7484,11 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7484
7484
|
}
|
|
7485
7485
|
) : null;
|
|
7486
7486
|
}), Ib = l.forwardRef((e, t) => {
|
|
7487
|
-
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);
|
|
7488
7488
|
return l.useEffect(() => {
|
|
7489
7489
|
u.current && i(getComputedStyle(u.current));
|
|
7490
7490
|
}, [u]), /* @__PURE__ */ c(
|
|
7491
|
-
|
|
7491
|
+
Mc,
|
|
7492
7492
|
{
|
|
7493
7493
|
"data-orientation": "horizontal",
|
|
7494
7494
|
...o,
|
|
@@ -7523,11 +7523,11 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7523
7523
|
}
|
|
7524
7524
|
);
|
|
7525
7525
|
}), Ob = l.forwardRef((e, t) => {
|
|
7526
|
-
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);
|
|
7527
7527
|
return l.useEffect(() => {
|
|
7528
7528
|
u.current && i(getComputedStyle(u.current));
|
|
7529
7529
|
}, [u]), /* @__PURE__ */ c(
|
|
7530
|
-
|
|
7530
|
+
Mc,
|
|
7531
7531
|
{
|
|
7532
7532
|
"data-orientation": "vertical",
|
|
7533
7533
|
...o,
|
|
@@ -7562,7 +7562,7 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7562
7562
|
}
|
|
7563
7563
|
}
|
|
7564
7564
|
);
|
|
7565
|
-
}), [
|
|
7565
|
+
}), [kb, kc] = Ac(Ye), Mc = l.forwardRef((e, t) => {
|
|
7566
7566
|
const {
|
|
7567
7567
|
__scopeScrollArea: n,
|
|
7568
7568
|
sizes: r,
|
|
@@ -7575,21 +7575,21 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7575
7575
|
onWheelScroll: d,
|
|
7576
7576
|
onResize: p,
|
|
7577
7577
|
...g
|
|
7578
|
-
} = e, v =
|
|
7579
|
-
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) {
|
|
7580
7580
|
if (w.current) {
|
|
7581
|
-
const D =
|
|
7581
|
+
const D = k.clientX - w.current.left, j = k.clientY - w.current.top;
|
|
7582
7582
|
f({ x: D, y: j });
|
|
7583
7583
|
}
|
|
7584
7584
|
}
|
|
7585
7585
|
return l.useEffect(() => {
|
|
7586
|
-
const
|
|
7586
|
+
const k = (D) => {
|
|
7587
7587
|
const j = D.target;
|
|
7588
7588
|
(m == null ? void 0 : m.contains(j)) && C(D, E);
|
|
7589
7589
|
};
|
|
7590
|
-
return document.addEventListener("wheel",
|
|
7591
|
-
}, [x, m, E, C]), l.useEffect(I, [r, I]),
|
|
7592
|
-
|
|
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,
|
|
7593
7593
|
{
|
|
7594
7594
|
scope: n,
|
|
7595
7595
|
scrollbar: m,
|
|
@@ -7604,13 +7604,13 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7604
7604
|
...g,
|
|
7605
7605
|
ref: b,
|
|
7606
7606
|
style: { position: "absolute", ...g.style },
|
|
7607
|
-
onPointerDown: U(e.onPointerDown, (
|
|
7608
|
-
|
|
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));
|
|
7609
7609
|
}),
|
|
7610
7610
|
onPointerMove: U(e.onPointerMove, L),
|
|
7611
|
-
onPointerUp: U(e.onPointerUp, (
|
|
7612
|
-
const D =
|
|
7613
|
-
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;
|
|
7614
7614
|
})
|
|
7615
7615
|
}
|
|
7616
7616
|
)
|
|
@@ -7618,12 +7618,12 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7618
7618
|
);
|
|
7619
7619
|
}), Vn = "ScrollAreaThumb", Dc = l.forwardRef(
|
|
7620
7620
|
(e, t) => {
|
|
7621
|
-
const { forceMount: n, ...r } = e, o =
|
|
7622
|
-
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 }) });
|
|
7623
7623
|
}
|
|
7624
|
-
),
|
|
7624
|
+
), Mb = l.forwardRef(
|
|
7625
7625
|
(e, t) => {
|
|
7626
|
-
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(
|
|
7627
7627
|
t,
|
|
7628
7628
|
(p) => a.onThumbChange(p)
|
|
7629
7629
|
), f = l.useRef(void 0), d = hr(() => {
|
|
@@ -7663,18 +7663,18 @@ var Pb = l.forwardRef((e, t) => {
|
|
|
7663
7663
|
Dc.displayName = Vn;
|
|
7664
7664
|
var qo = "ScrollAreaCorner", Lc = l.forwardRef(
|
|
7665
7665
|
(e, t) => {
|
|
7666
|
-
const n =
|
|
7666
|
+
const n = ke(qo, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
|
|
7667
7667
|
return n.type !== "scroll" && r ? /* @__PURE__ */ c(Db, { ...e, ref: t }) : null;
|
|
7668
7668
|
}
|
|
7669
7669
|
);
|
|
7670
7670
|
Lc.displayName = qo;
|
|
7671
7671
|
var Db = l.forwardRef((e, t) => {
|
|
7672
|
-
const { __scopeScrollArea: n, ...r } = e, o =
|
|
7673
|
-
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, () => {
|
|
7674
7674
|
var p;
|
|
7675
7675
|
const d = ((p = o.scrollbarX) == null ? void 0 : p.offsetHeight) || 0;
|
|
7676
7676
|
o.onCornerHeightChange(d), u(d);
|
|
7677
|
-
}),
|
|
7677
|
+
}), kt(o.scrollbarY, () => {
|
|
7678
7678
|
var p;
|
|
7679
7679
|
const d = ((p = o.scrollbarY) == null ? void 0 : p.offsetWidth) || 0;
|
|
7680
7680
|
o.onCornerWidthChange(d), a(d);
|
|
@@ -7738,7 +7738,7 @@ function hr(e, t) {
|
|
|
7738
7738
|
window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
|
|
7739
7739
|
}, [n, t]);
|
|
7740
7740
|
}
|
|
7741
|
-
function
|
|
7741
|
+
function kt(e, t) {
|
|
7742
7742
|
const n = ye(t);
|
|
7743
7743
|
be(() => {
|
|
7744
7744
|
let r = 0;
|
|
@@ -7804,7 +7804,7 @@ function oo({
|
|
|
7804
7804
|
createThread: h,
|
|
7805
7805
|
deleteThread: b,
|
|
7806
7806
|
renameThread: w
|
|
7807
|
-
} = 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);
|
|
7808
7808
|
we(() => {
|
|
7809
7809
|
x(g ?? []);
|
|
7810
7810
|
}, [g]);
|
|
@@ -7832,16 +7832,16 @@ function oo({
|
|
|
7832
7832
|
console.error("Failed to delete thread:", le);
|
|
7833
7833
|
}
|
|
7834
7834
|
}, G = ($, z) => {
|
|
7835
|
-
z.stopPropagation(),
|
|
7835
|
+
z.stopPropagation(), k($.threadId), j($.title || `Thread ${$.threadId.slice(0, 8)}`);
|
|
7836
7836
|
}, T = async ($) => {
|
|
7837
7837
|
if (D.trim())
|
|
7838
7838
|
try {
|
|
7839
|
-
await w($, D.trim()),
|
|
7839
|
+
await w($, D.trim()), k(null), j("");
|
|
7840
7840
|
} catch (z) {
|
|
7841
7841
|
console.error("Failed to update title:", z);
|
|
7842
7842
|
}
|
|
7843
7843
|
}, P = () => {
|
|
7844
|
-
|
|
7844
|
+
k(null), j("");
|
|
7845
7845
|
}, _ = ($, z) => {
|
|
7846
7846
|
$.key === "Enter" ? T(z) : $.key === "Escape" && P();
|
|
7847
7847
|
}, O = ($) => {
|
|
@@ -8438,7 +8438,7 @@ var nn = "Tooltip", [gv, vr] = gr(nn), Sl = (e) => {
|
|
|
8438
8438
|
}, [h, y]);
|
|
8439
8439
|
return l.useEffect(() => () => {
|
|
8440
8440
|
v.current && (window.clearTimeout(v.current), v.current = 0);
|
|
8441
|
-
}, []), /* @__PURE__ */ c(
|
|
8441
|
+
}, []), /* @__PURE__ */ c(ko, { ...f, children: /* @__PURE__ */ c(
|
|
8442
8442
|
gv,
|
|
8443
8443
|
{
|
|
8444
8444
|
scope: t,
|
|
@@ -8464,7 +8464,7 @@ Sl.displayName = nn;
|
|
|
8464
8464
|
var ao = "TooltipTrigger", Cl = l.forwardRef(
|
|
8465
8465
|
(e, t) => {
|
|
8466
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, []);
|
|
8467
|
-
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(
|
|
8468
8468
|
J.button,
|
|
8469
8469
|
{
|
|
8470
8470
|
"aria-describedby": o.open ? o.contentId : void 0,
|
|
@@ -8492,13 +8492,13 @@ var ao = "TooltipTrigger", Cl = l.forwardRef(
|
|
|
8492
8492
|
Cl.displayName = ao;
|
|
8493
8493
|
var bv = "TooltipPortal", [Oy, vv] = gr(bv, {
|
|
8494
8494
|
forceMount: void 0
|
|
8495
|
-
}),
|
|
8495
|
+
}), Mt = "TooltipContent", El = l.forwardRef(
|
|
8496
8496
|
(e, t) => {
|
|
8497
|
-
const n = vv(
|
|
8497
|
+
const n = vv(Mt, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...s } = e, a = vr(Mt, e.__scopeTooltip);
|
|
8498
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 }) });
|
|
8499
8499
|
}
|
|
8500
8500
|
), wv = l.forwardRef((e, t) => {
|
|
8501
|
-
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(() => {
|
|
8502
8502
|
i(null), p(!1);
|
|
8503
8503
|
}, [p]), v = l.useCallback(
|
|
8504
8504
|
(m, h) => {
|
|
@@ -8532,7 +8532,7 @@ var bv = "TooltipPortal", [Oy, vv] = gr(bv, {
|
|
|
8532
8532
|
onEscapeKeyDown: s,
|
|
8533
8533
|
onPointerDownOutside: a,
|
|
8534
8534
|
...i
|
|
8535
|
-
} = e, u = vr(
|
|
8535
|
+
} = e, u = vr(Mt, n), f = br(n), { onClose: d } = u;
|
|
8536
8536
|
return l.useEffect(() => (document.addEventListener(so, d), () => document.removeEventListener(so, d)), [d]), l.useEffect(() => {
|
|
8537
8537
|
if (u.trigger) {
|
|
8538
8538
|
const p = (g) => {
|
|
@@ -8575,7 +8575,7 @@ var bv = "TooltipPortal", [Oy, vv] = gr(bv, {
|
|
|
8575
8575
|
);
|
|
8576
8576
|
}
|
|
8577
8577
|
);
|
|
8578
|
-
El.displayName =
|
|
8578
|
+
El.displayName = Mt;
|
|
8579
8579
|
var Nl = "TooltipArrow", Cv = l.forwardRef(
|
|
8580
8580
|
(e, t) => {
|
|
8581
8581
|
const { __scopeTooltip: n, ...r } = e, o = br(n);
|
|
@@ -8679,7 +8679,7 @@ function Pv(e) {
|
|
|
8679
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);
|
|
8680
8680
|
}
|
|
8681
8681
|
var _v = xl, Iv = Sl, Ov = Cl, Tl = El;
|
|
8682
|
-
const
|
|
8682
|
+
const kv = _v, Mv = Iv, Dv = Ov, Al = l.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ c(
|
|
8683
8683
|
Tl,
|
|
8684
8684
|
{
|
|
8685
8685
|
ref: r,
|
|
@@ -8734,7 +8734,7 @@ const _l = l.forwardRef(
|
|
|
8734
8734
|
}),
|
|
8735
8735
|
[b, v, m, u, f, d, h]
|
|
8736
8736
|
);
|
|
8737
|
-
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(
|
|
8738
8738
|
"div",
|
|
8739
8739
|
{
|
|
8740
8740
|
style: {
|
|
@@ -8882,7 +8882,7 @@ const Hv = l.forwardRef(({ className: e, ...t }, n) => {
|
|
|
8882
8882
|
);
|
|
8883
8883
|
});
|
|
8884
8884
|
Hv.displayName = "SidebarRail";
|
|
8885
|
-
const
|
|
8885
|
+
const kl = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
8886
8886
|
"main",
|
|
8887
8887
|
{
|
|
8888
8888
|
ref: n,
|
|
@@ -8894,7 +8894,7 @@ const Ml = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
8894
8894
|
...t
|
|
8895
8895
|
}
|
|
8896
8896
|
));
|
|
8897
|
-
|
|
8897
|
+
kl.displayName = "SidebarInset";
|
|
8898
8898
|
const Wv = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
8899
8899
|
tn,
|
|
8900
8900
|
{
|
|
@@ -8908,7 +8908,7 @@ const Wv = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
8908
8908
|
}
|
|
8909
8909
|
));
|
|
8910
8910
|
Wv.displayName = "SidebarInput";
|
|
8911
|
-
const
|
|
8911
|
+
const Ml = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
8912
8912
|
"div",
|
|
8913
8913
|
{
|
|
8914
8914
|
ref: n,
|
|
@@ -8917,7 +8917,7 @@ const kl = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
8917
8917
|
...t
|
|
8918
8918
|
}
|
|
8919
8919
|
));
|
|
8920
|
-
|
|
8920
|
+
Ml.displayName = "SidebarHeader";
|
|
8921
8921
|
const Vv = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
8922
8922
|
"div",
|
|
8923
8923
|
{
|
|
@@ -9063,7 +9063,7 @@ const Gv = rn(
|
|
|
9063
9063
|
);
|
|
9064
9064
|
return o ? (typeof o == "string" && (o = {
|
|
9065
9065
|
children: o
|
|
9066
|
-
}), /* @__PURE__ */ R(
|
|
9066
|
+
}), /* @__PURE__ */ R(Mv, { children: [
|
|
9067
9067
|
/* @__PURE__ */ c(Dv, { asChild: !0, children: p }),
|
|
9068
9068
|
/* @__PURE__ */ c(
|
|
9069
9069
|
Al,
|
|
@@ -9183,7 +9183,7 @@ const Qv = l.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, classNa
|
|
|
9183
9183
|
}
|
|
9184
9184
|
));
|
|
9185
9185
|
Qv.displayName = "SidebarMenuSubButton";
|
|
9186
|
-
function
|
|
9186
|
+
function ky({
|
|
9187
9187
|
header: e,
|
|
9188
9188
|
sidebarTitle: t = "Threads",
|
|
9189
9189
|
showThreads: n = !0,
|
|
@@ -9194,7 +9194,7 @@ function My({
|
|
|
9194
9194
|
}) {
|
|
9195
9195
|
return /* @__PURE__ */ c(Rn, { ...a, children: /* @__PURE__ */ R(_l, { className: `w-full ${r}`, children: [
|
|
9196
9196
|
/* @__PURE__ */ R(Il, { className: `border-r ${o}`, children: [
|
|
9197
|
-
/* @__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 }) }) }) }) }),
|
|
9198
9198
|
/* @__PURE__ */ c(Dl, { children: n && /* @__PURE__ */ R(Ll, { children: [
|
|
9199
9199
|
/* @__PURE__ */ c(Fl, { children: "Conversations" }),
|
|
9200
9200
|
/* @__PURE__ */ c($l, { children: /* @__PURE__ */ c("div", { className: "px-2 py-1", children: /* @__PURE__ */ c(
|
|
@@ -9208,7 +9208,7 @@ function My({
|
|
|
9208
9208
|
) }) })
|
|
9209
9209
|
] }) })
|
|
9210
9210
|
] }),
|
|
9211
|
-
/* @__PURE__ */ R(
|
|
9211
|
+
/* @__PURE__ */ R(kl, { children: [
|
|
9212
9212
|
/* @__PURE__ */ R("header", { className: "h-14 border-b bg-background/60 backdrop-blur flex items-center gap-2 px-4", children: [
|
|
9213
9213
|
/* @__PURE__ */ c(Ol, {}),
|
|
9214
9214
|
/* @__PURE__ */ c("div", { className: "flex-1" }),
|
|
@@ -9246,7 +9246,7 @@ function Vl(e) {
|
|
|
9246
9246
|
const t = l.useRef({ value: e, previous: e });
|
|
9247
9247
|
return l.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
9248
9248
|
}
|
|
9249
|
-
var yr = "Switch", [nw,
|
|
9249
|
+
var yr = "Switch", [nw, My] = Ue(yr), [rw, ow] = nw(yr), jl = l.forwardRef(
|
|
9250
9250
|
(e, t) => {
|
|
9251
9251
|
const {
|
|
9252
9252
|
__scopeSwitch: n,
|
|
@@ -9407,13 +9407,13 @@ var iw = [" ", "Enter", "ArrowUp", "ArrowDown"], cw = [" ", "Enter"], gt = "Sele
|
|
|
9407
9407
|
defaultProp: o ?? !1,
|
|
9408
9408
|
onChange: s,
|
|
9409
9409
|
caller: gt
|
|
9410
|
-
}), [
|
|
9410
|
+
}), [k, D] = ot({
|
|
9411
9411
|
prop: a,
|
|
9412
9412
|
defaultProp: i,
|
|
9413
9413
|
onChange: u,
|
|
9414
9414
|
caller: gt
|
|
9415
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(";");
|
|
9416
|
-
return /* @__PURE__ */ c(
|
|
9416
|
+
return /* @__PURE__ */ c(ko, { ...h, children: /* @__PURE__ */ R(
|
|
9417
9417
|
uw,
|
|
9418
9418
|
{
|
|
9419
9419
|
required: v,
|
|
@@ -9425,7 +9425,7 @@ var iw = [" ", "Enter", "ArrowUp", "ArrowDown"], cw = [" ", "Enter"], gt = "Sele
|
|
|
9425
9425
|
valueNodeHasChildren: E,
|
|
9426
9426
|
onValueNodeHasChildrenChange: C,
|
|
9427
9427
|
contentId: Le(),
|
|
9428
|
-
value:
|
|
9428
|
+
value: k,
|
|
9429
9429
|
onValueChange: D,
|
|
9430
9430
|
open: N,
|
|
9431
9431
|
onOpenChange: L,
|
|
@@ -9457,12 +9457,12 @@ var iw = [" ", "Enter", "ArrowUp", "ArrowDown"], cw = [" ", "Enter"], gt = "Sele
|
|
|
9457
9457
|
tabIndex: -1,
|
|
9458
9458
|
name: d,
|
|
9459
9459
|
autoComplete: p,
|
|
9460
|
-
value:
|
|
9460
|
+
value: k,
|
|
9461
9461
|
onChange: (F) => D(F.target.value),
|
|
9462
9462
|
disabled: g,
|
|
9463
9463
|
form: m,
|
|
9464
9464
|
children: [
|
|
9465
|
-
|
|
9465
|
+
k === void 0 ? /* @__PURE__ */ c("option", { value: "" }) : null,
|
|
9466
9466
|
Array.from(W)
|
|
9467
9467
|
]
|
|
9468
9468
|
},
|
|
@@ -9484,7 +9484,7 @@ var Zl = "SelectTrigger", Ql = l.forwardRef(
|
|
|
9484
9484
|
y: Math.round(h.pageY)
|
|
9485
9485
|
});
|
|
9486
9486
|
};
|
|
9487
|
-
return /* @__PURE__ */ c(
|
|
9487
|
+
return /* @__PURE__ */ c(Mo, { asChild: !0, ...s, children: /* @__PURE__ */ c(
|
|
9488
9488
|
J.button,
|
|
9489
9489
|
{
|
|
9490
9490
|
type: "button",
|
|
@@ -9559,7 +9559,7 @@ var bt = "SelectContent", ou = l.forwardRef(
|
|
|
9559
9559
|
}
|
|
9560
9560
|
);
|
|
9561
9561
|
ou.displayName = bt;
|
|
9562
|
-
var
|
|
9562
|
+
var Me = 10, [su, ct] = zt(bt), mw = "SelectContentImpl", gw = _t("SelectContent.RemoveScroll"), au = l.forwardRef(
|
|
9563
9563
|
(e, t) => {
|
|
9564
9564
|
const {
|
|
9565
9565
|
__scopeSelect: n,
|
|
@@ -9581,7 +9581,7 @@ var ke = 10, [su, ct] = zt(bt), mw = "SelectContentImpl", gw = _t("SelectContent
|
|
|
9581
9581
|
avoidCollisions: b,
|
|
9582
9582
|
//
|
|
9583
9583
|
...w
|
|
9584
|
-
} = 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(
|
|
9585
9585
|
null
|
|
9586
9586
|
), K = Sr(n), [W, B] = l.useState(!1), q = l.useRef(!1);
|
|
9587
9587
|
l.useEffect(() => {
|
|
@@ -9630,7 +9630,7 @@ var ke = 10, [su, ct] = zt(bt), mw = "SelectContentImpl", gw = _t("SelectContent
|
|
|
9630
9630
|
}), X = l.useCallback(
|
|
9631
9631
|
(V, oe, ie) => {
|
|
9632
9632
|
const se = !q.current && !ie;
|
|
9633
|
-
(y.value !== void 0 && y.value === oe || se) && (
|
|
9633
|
+
(y.value !== void 0 && y.value === oe || se) && (k(V), se && (q.current = !0));
|
|
9634
9634
|
},
|
|
9635
9635
|
[y.value]
|
|
9636
9636
|
), $ = l.useCallback(() => x == null ? void 0 : x.focus(), [x]), z = l.useCallback(
|
|
@@ -9733,26 +9733,26 @@ au.displayName = mw;
|
|
|
9733
9733
|
var bw = "SelectItemAlignedPosition", iu = l.forwardRef((e, t) => {
|
|
9734
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(() => {
|
|
9735
9735
|
if (s.trigger && s.valueNode && i && f && h && b && w) {
|
|
9736
|
-
const N = s.trigger.getBoundingClientRect(), L = f.getBoundingClientRect(),
|
|
9736
|
+
const N = s.trigger.getBoundingClientRect(), L = f.getBoundingClientRect(), k = s.valueNode.getBoundingClientRect(), D = w.getBoundingClientRect();
|
|
9737
9737
|
if (s.dir !== "rtl") {
|
|
9738
|
-
const H = D.left - L.left, Z =
|
|
9739
|
-
|
|
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,
|
|
9740
9740
|
// Prevents the content from going off the starting edge of the
|
|
9741
9741
|
// viewport. It may still go off the ending edge, but this can be
|
|
9742
9742
|
// controlled by the user since they may want to manage overflow in a
|
|
9743
9743
|
// specific way.
|
|
9744
9744
|
// https://github.com/radix-ui/primitives/issues/2049
|
|
9745
|
-
Math.max(
|
|
9745
|
+
Math.max(Me, ge - Y)
|
|
9746
9746
|
]);
|
|
9747
9747
|
i.style.minWidth = pe + "px", i.style.left = te + "px";
|
|
9748
9748
|
} else {
|
|
9749
|
-
const H = L.right - D.right, Z = window.innerWidth -
|
|
9750
|
-
|
|
9751
|
-
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)
|
|
9752
9752
|
]);
|
|
9753
9753
|
i.style.minWidth = pe + "px", i.style.right = te + "px";
|
|
9754
9754
|
}
|
|
9755
|
-
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;
|
|
9756
9756
|
if (oe <= z) {
|
|
9757
9757
|
const H = j.length > 0 && b === j[j.length - 1].ref.current;
|
|
9758
9758
|
i.style.bottom = "0px";
|
|
@@ -9772,7 +9772,7 @@ var bw = "SelectItemAlignedPosition", iu = l.forwardRef((e, t) => {
|
|
|
9772
9772
|
) + ie;
|
|
9773
9773
|
i.style.height = de + "px", h.scrollTop = oe - z + h.offsetTop;
|
|
9774
9774
|
}
|
|
9775
|
-
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);
|
|
9776
9776
|
}
|
|
9777
9777
|
}, [
|
|
9778
9778
|
g,
|
|
@@ -9839,7 +9839,7 @@ var vw = "SelectPopperPosition", io = l.forwardRef((e, t) => {
|
|
|
9839
9839
|
const {
|
|
9840
9840
|
__scopeSelect: n,
|
|
9841
9841
|
align: r = "start",
|
|
9842
|
-
collisionPadding: o =
|
|
9842
|
+
collisionPadding: o = Me,
|
|
9843
9843
|
...s
|
|
9844
9844
|
} = e, a = Cr(n);
|
|
9845
9845
|
return /* @__PURE__ */ c(
|
|
@@ -9902,7 +9902,7 @@ var [ww, ts] = zt(bt, {}), co = "SelectViewport", cu = l.forwardRef(
|
|
|
9902
9902
|
if (g != null && g.current && p) {
|
|
9903
9903
|
const v = Math.abs(u.current - d.scrollTop);
|
|
9904
9904
|
if (v > 0) {
|
|
9905
|
-
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);
|
|
9906
9906
|
if (w < m) {
|
|
9907
9907
|
const y = w + v, x = Math.min(m, y), E = y - x;
|
|
9908
9908
|
p.style.height = x + "px", p.style.bottom === "0px" && (d.scrollTop = E > 0 ? E : 0, p.style.justifyContent = "flex-end");
|
|
@@ -10187,7 +10187,7 @@ function Eu(e, t, n) {
|
|
|
10187
10187
|
function Tw(e, t) {
|
|
10188
10188
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
10189
10189
|
}
|
|
10190
|
-
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;
|
|
10191
10191
|
const sa = Aw, aa = Pw, po = l.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ R(
|
|
10192
10192
|
Ru,
|
|
10193
10193
|
{
|
|
@@ -10217,7 +10217,7 @@ const Ou = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
10217
10217
|
}
|
|
10218
10218
|
));
|
|
10219
10219
|
Ou.displayName = Pu.displayName;
|
|
10220
|
-
const
|
|
10220
|
+
const ku = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
10221
10221
|
_u,
|
|
10222
10222
|
{
|
|
10223
10223
|
ref: n,
|
|
@@ -10229,7 +10229,7 @@ const Mu = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
10229
10229
|
children: /* @__PURE__ */ c(Tt, { className: "h-4 w-4" })
|
|
10230
10230
|
}
|
|
10231
10231
|
));
|
|
10232
|
-
|
|
10232
|
+
ku.displayName = _u.displayName;
|
|
10233
10233
|
const ho = l.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ c(Iw, { children: /* @__PURE__ */ R(
|
|
10234
10234
|
Nu,
|
|
10235
10235
|
{
|
|
@@ -10253,7 +10253,7 @@ const ho = l.forwardRef(({ className: e, children: t, position: n = "popper", ..
|
|
|
10253
10253
|
children: t
|
|
10254
10254
|
}
|
|
10255
10255
|
),
|
|
10256
|
-
/* @__PURE__ */ c(
|
|
10256
|
+
/* @__PURE__ */ c(ku, {})
|
|
10257
10257
|
]
|
|
10258
10258
|
}
|
|
10259
10259
|
) }));
|
|
@@ -10277,8 +10277,8 @@ const lt = l.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
10277
10277
|
),
|
|
10278
10278
|
...n,
|
|
10279
10279
|
children: [
|
|
10280
|
-
/* @__PURE__ */ c("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ c(
|
|
10281
|
-
/* @__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 })
|
|
10282
10282
|
]
|
|
10283
10283
|
}
|
|
10284
10284
|
));
|
|
@@ -10334,8 +10334,8 @@ const Fw = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
10334
10334
|
}
|
|
10335
10335
|
));
|
|
10336
10336
|
Fw.displayName = "CardDescription";
|
|
10337
|
-
const
|
|
10338
|
-
|
|
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";
|
|
10339
10339
|
const $w = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
10340
10340
|
"div",
|
|
10341
10341
|
{
|
|
@@ -10397,10 +10397,10 @@ const Hr = /* @__PURE__ */ new Map(), ia = (e) => {
|
|
|
10397
10397
|
toasts: e.toasts.filter((n) => n.id !== t.toastId)
|
|
10398
10398
|
};
|
|
10399
10399
|
}
|
|
10400
|
-
},
|
|
10400
|
+
}, Mn = [];
|
|
10401
10401
|
let Dn = { toasts: [] };
|
|
10402
10402
|
function Yt(e) {
|
|
10403
|
-
Dn = Hw(Dn, e),
|
|
10403
|
+
Dn = Hw(Dn, e), Mn.forEach((t) => {
|
|
10404
10404
|
t(Dn);
|
|
10405
10405
|
});
|
|
10406
10406
|
}
|
|
@@ -10427,9 +10427,9 @@ function Ww({ ...e }) {
|
|
|
10427
10427
|
}
|
|
10428
10428
|
function Vw() {
|
|
10429
10429
|
const [e, t] = l.useState(Dn);
|
|
10430
|
-
return l.useEffect(() => (
|
|
10431
|
-
const n =
|
|
10432
|
-
n > -1 &&
|
|
10430
|
+
return l.useEffect(() => (Mn.push(t), () => {
|
|
10431
|
+
const n = Mn.indexOf(t);
|
|
10432
|
+
n > -1 && Mn.splice(n, 1);
|
|
10433
10433
|
}), [e]), {
|
|
10434
10434
|
...e,
|
|
10435
10435
|
toast: Ww,
|
|
@@ -10507,7 +10507,7 @@ function Ly({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10507
10507
|
/* @__PURE__ */ c(Ju, { className: "h-5 w-5" }),
|
|
10508
10508
|
"API Configuration"
|
|
10509
10509
|
] }) }),
|
|
10510
|
-
/* @__PURE__ */ R(
|
|
10510
|
+
/* @__PURE__ */ R(kn, { className: "space-y-4", children: [
|
|
10511
10511
|
/* @__PURE__ */ R("div", { className: "space-y-2", children: [
|
|
10512
10512
|
/* @__PURE__ */ c(Ie, { htmlFor: "api-url", children: "API Base URL" }),
|
|
10513
10513
|
/* @__PURE__ */ R("div", { className: "flex gap-2", children: [
|
|
@@ -10574,7 +10574,7 @@ function Ly({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10574
10574
|
/* @__PURE__ */ c(ed, { className: "h-5 w-5" }),
|
|
10575
10575
|
"Interface Settings"
|
|
10576
10576
|
] }) }),
|
|
10577
|
-
/* @__PURE__ */ R(
|
|
10577
|
+
/* @__PURE__ */ R(kn, { className: "space-y-4", children: [
|
|
10578
10578
|
/* @__PURE__ */ R("div", { className: "space-y-2", children: [
|
|
10579
10579
|
/* @__PURE__ */ c(Ie, { htmlFor: "layout", children: "Layout Style" }),
|
|
10580
10580
|
/* @__PURE__ */ R(
|
|
@@ -10669,7 +10669,7 @@ function Ly({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10669
10669
|
/* @__PURE__ */ c(td, { className: "h-5 w-5" }),
|
|
10670
10670
|
"Behavior Settings"
|
|
10671
10671
|
] }) }),
|
|
10672
|
-
/* @__PURE__ */ R(
|
|
10672
|
+
/* @__PURE__ */ R(kn, { className: "space-y-4", children: [
|
|
10673
10673
|
/* @__PURE__ */ R("div", { className: "flex items-center justify-between", children: [
|
|
10674
10674
|
/* @__PURE__ */ R("div", { children: [
|
|
10675
10675
|
/* @__PURE__ */ c(Ie, { htmlFor: "auto-save", children: "Auto-save Conversations" }),
|
|
@@ -10819,7 +10819,7 @@ export {
|
|
|
10819
10819
|
zf as ApiClient,
|
|
10820
10820
|
zf as ChatApi,
|
|
10821
10821
|
Pn as ChatInterface,
|
|
10822
|
-
|
|
10822
|
+
ky as ChatMainLayout,
|
|
10823
10823
|
Rn as ChatProvider,
|
|
10824
10824
|
Ry as ChatRoutingProvider,
|
|
10825
10825
|
Ly as ChatSettings,
|