teodor-new-chat-ui 4.3.50 → 4.3.52
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 +509 -526
- package/dist/index.umd.js +13 -13
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ var Im = Object.defineProperty;
|
|
|
2
2
|
var Am = (e, t, n) => t in e ? Im(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var _l = (e, t, n) => Am(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as g from "react";
|
|
5
|
-
import U, { createContext as To, useContext as js, useReducer as Nm, useRef as Ue, useCallback as
|
|
5
|
+
import U, { createContext as To, useContext as js, useReducer as Nm, useRef as Ue, useCallback as Te, useEffect as ct, useMemo as tt, useState as xe, startTransition as Do, createElement as Yo, useLayoutEffect as _m } from "react";
|
|
6
6
|
import { Square as jm, Send as Pm, X as Pr, ExternalLink as Om, Download as Mm, Image as Dm, FileText as jl, Loader as yu, Bot as Pl, Wrench as Lm, User as Fm, Paperclip as Ki, ChevronUp as Aa, ChevronDown as Ps, Copy as Ol, Edit as Ml, RotateCcw as qi, ChevronRight as $m, Check as Na, Circle as zm, Loader2 as Gi, Edit3 as vu, Plus as Bm, FileSpreadsheet as Hm, MessageSquarePlus as Um, MessageSquare as Wm, Calendar as Vm, Trash2 as Km, Settings as qm, Server as Gm, EyeOff as Ym, Eye as Xm, Layout as Jm, MessageCircle as Zm, Save as Qm } from "lucide-react";
|
|
7
7
|
import { Slot as eg, createSlot as Fr } from "@radix-ui/react-slot";
|
|
8
8
|
import { cva as Os } from "class-variance-authority";
|
|
@@ -64,12 +64,12 @@ function og() {
|
|
|
64
64
|
}
|
|
65
65
|
function b(R, I, $) {
|
|
66
66
|
{
|
|
67
|
-
var G = x.ReactDebugCurrentFrame,
|
|
68
|
-
|
|
69
|
-
var
|
|
70
|
-
return String(
|
|
67
|
+
var G = x.ReactDebugCurrentFrame, ge = G.getStackAddendum();
|
|
68
|
+
ge !== "" && (I += "%s", $ = $.concat([ge]));
|
|
69
|
+
var Re = $.map(function(Ae) {
|
|
70
|
+
return String(Ae);
|
|
71
71
|
});
|
|
72
|
-
|
|
72
|
+
Re.unshift("Warning: " + I), Function.prototype.apply.call(console[R], console, Re);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
var T = !1, S = !1, C = !1, k = !1, _ = !1, j;
|
|
@@ -85,8 +85,8 @@ function og() {
|
|
|
85
85
|
var G = R.displayName;
|
|
86
86
|
if (G)
|
|
87
87
|
return G;
|
|
88
|
-
var
|
|
89
|
-
return
|
|
88
|
+
var ge = I.displayName || I.name || "";
|
|
89
|
+
return ge !== "" ? $ + "(" + ge + ")" : $;
|
|
90
90
|
}
|
|
91
91
|
function F(R) {
|
|
92
92
|
return R.displayName || "Context";
|
|
@@ -126,9 +126,9 @@ function og() {
|
|
|
126
126
|
var G = R.displayName || null;
|
|
127
127
|
return G !== null ? G : D(R.type) || "Memo";
|
|
128
128
|
case h: {
|
|
129
|
-
var
|
|
129
|
+
var ge = R, Re = ge._payload, Ae = ge._init;
|
|
130
130
|
try {
|
|
131
|
-
return D(
|
|
131
|
+
return D(Ae(Re));
|
|
132
132
|
} catch {
|
|
133
133
|
return null;
|
|
134
134
|
}
|
|
@@ -163,7 +163,7 @@ function og() {
|
|
|
163
163
|
B++;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function Ce() {
|
|
167
167
|
{
|
|
168
168
|
if (B--, B === 0) {
|
|
169
169
|
var R = {
|
|
@@ -204,8 +204,8 @@ function og() {
|
|
|
204
204
|
if (J === void 0)
|
|
205
205
|
try {
|
|
206
206
|
throw Error();
|
|
207
|
-
} catch (
|
|
208
|
-
var G =
|
|
207
|
+
} catch (ge) {
|
|
208
|
+
var G = ge.stack.trim().match(/\n( *(at )?)/);
|
|
209
209
|
J = G && G[1] || "";
|
|
210
210
|
}
|
|
211
211
|
return `
|
|
@@ -227,33 +227,33 @@ function og() {
|
|
|
227
227
|
}
|
|
228
228
|
var G;
|
|
229
229
|
ee = !0;
|
|
230
|
-
var
|
|
230
|
+
var ge = Error.prepareStackTrace;
|
|
231
231
|
Error.prepareStackTrace = void 0;
|
|
232
|
-
var
|
|
233
|
-
|
|
232
|
+
var Re;
|
|
233
|
+
Re = Se.current, Se.current = null, me();
|
|
234
234
|
try {
|
|
235
235
|
if (I) {
|
|
236
|
-
var
|
|
236
|
+
var Ae = function() {
|
|
237
237
|
throw Error();
|
|
238
238
|
};
|
|
239
|
-
if (Object.defineProperty(
|
|
239
|
+
if (Object.defineProperty(Ae.prototype, "props", {
|
|
240
240
|
set: function() {
|
|
241
241
|
throw Error();
|
|
242
242
|
}
|
|
243
243
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
244
244
|
try {
|
|
245
|
-
Reflect.construct(
|
|
245
|
+
Reflect.construct(Ae, []);
|
|
246
246
|
} catch (Nt) {
|
|
247
247
|
G = Nt;
|
|
248
248
|
}
|
|
249
|
-
Reflect.construct(R, [],
|
|
249
|
+
Reflect.construct(R, [], Ae);
|
|
250
250
|
} else {
|
|
251
251
|
try {
|
|
252
|
-
|
|
252
|
+
Ae.call();
|
|
253
253
|
} catch (Nt) {
|
|
254
254
|
G = Nt;
|
|
255
255
|
}
|
|
256
|
-
R.call(
|
|
256
|
+
R.call(Ae.prototype);
|
|
257
257
|
}
|
|
258
258
|
} else {
|
|
259
259
|
try {
|
|
@@ -283,7 +283,7 @@ function og() {
|
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
} finally {
|
|
286
|
-
ee = !1, Se.current =
|
|
286
|
+
ee = !1, Se.current = Re, Ce(), Error.prepareStackTrace = ge;
|
|
287
287
|
}
|
|
288
288
|
var $n = R ? R.displayName || R.name : "", zn = $n ? M($n) : "";
|
|
289
289
|
return typeof R == "function" && ne.set(R, zn), zn;
|
|
@@ -315,9 +315,9 @@ function og() {
|
|
|
315
315
|
case f:
|
|
316
316
|
return Ze(R.type, I, $);
|
|
317
317
|
case h: {
|
|
318
|
-
var G = R,
|
|
318
|
+
var G = R, ge = G._payload, Re = G._init;
|
|
319
319
|
try {
|
|
320
|
-
return Ze(
|
|
320
|
+
return Ze(Re(ge), I, $);
|
|
321
321
|
} catch {
|
|
322
322
|
}
|
|
323
323
|
}
|
|
@@ -332,22 +332,22 @@ function og() {
|
|
|
332
332
|
} else
|
|
333
333
|
st.setExtraStackFrame(null);
|
|
334
334
|
}
|
|
335
|
-
function _e(R, I, $, G,
|
|
335
|
+
function _e(R, I, $, G, ge) {
|
|
336
336
|
{
|
|
337
|
-
var
|
|
338
|
-
for (var
|
|
339
|
-
if (
|
|
337
|
+
var Re = Function.call.bind(Oe);
|
|
338
|
+
for (var Ae in R)
|
|
339
|
+
if (Re(R, Ae)) {
|
|
340
340
|
var je = void 0;
|
|
341
341
|
try {
|
|
342
|
-
if (typeof R[
|
|
343
|
-
var dt = Error((G || "React class") + ": " + $ + " type `" +
|
|
342
|
+
if (typeof R[Ae] != "function") {
|
|
343
|
+
var dt = Error((G || "React class") + ": " + $ + " type `" + Ae + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof R[Ae] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
344
344
|
throw dt.name = "Invariant Violation", dt;
|
|
345
345
|
}
|
|
346
|
-
je = R[
|
|
346
|
+
je = R[Ae](I, Ae, G, $, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
347
347
|
} catch (it) {
|
|
348
348
|
je = it;
|
|
349
349
|
}
|
|
350
|
-
je && !(je instanceof Error) && (Ve(
|
|
350
|
+
je && !(je instanceof Error) && (Ve(ge), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", G || "React class", $, Ae, typeof je), Ve(null)), je instanceof Error && !(je.message in Be) && (Be[je.message] = !0, Ve(ge), w("Failed %s type: %s", $, je.message), Ve(null));
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
}
|
|
@@ -363,17 +363,17 @@ function og() {
|
|
|
363
363
|
}
|
|
364
364
|
function oe(R) {
|
|
365
365
|
try {
|
|
366
|
-
return
|
|
366
|
+
return ve(R), !1;
|
|
367
367
|
} catch {
|
|
368
368
|
return !0;
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function ve(R) {
|
|
372
372
|
return "" + R;
|
|
373
373
|
}
|
|
374
374
|
function ce(R) {
|
|
375
375
|
if (oe(R))
|
|
376
|
-
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", vt(R)),
|
|
376
|
+
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", vt(R)), ve(R);
|
|
377
377
|
}
|
|
378
378
|
var $e = x.ReactCurrentOwner, nt = {
|
|
379
379
|
key: !0,
|
|
@@ -422,7 +422,7 @@ function og() {
|
|
|
422
422
|
});
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
var sn = function(R, I, $, G,
|
|
425
|
+
var sn = function(R, I, $, G, ge, Re, Ae) {
|
|
426
426
|
var je = {
|
|
427
427
|
// This tag allows us to uniquely identify this as a React Element
|
|
428
428
|
$$typeof: t,
|
|
@@ -430,9 +430,9 @@ function og() {
|
|
|
430
430
|
type: R,
|
|
431
431
|
key: I,
|
|
432
432
|
ref: $,
|
|
433
|
-
props:
|
|
433
|
+
props: Ae,
|
|
434
434
|
// Record the component responsible for creating this element.
|
|
435
|
-
_owner:
|
|
435
|
+
_owner: Re
|
|
436
436
|
};
|
|
437
437
|
return je._store = {}, Object.defineProperty(je._store, "validated", {
|
|
438
438
|
configurable: !1,
|
|
@@ -448,25 +448,25 @@ function og() {
|
|
|
448
448
|
configurable: !1,
|
|
449
449
|
enumerable: !1,
|
|
450
450
|
writable: !1,
|
|
451
|
-
value:
|
|
451
|
+
value: ge
|
|
452
452
|
}), Object.freeze && (Object.freeze(je.props), Object.freeze(je)), je;
|
|
453
453
|
};
|
|
454
|
-
function an(R, I, $, G,
|
|
454
|
+
function an(R, I, $, G, ge) {
|
|
455
455
|
{
|
|
456
|
-
var
|
|
457
|
-
$ !== void 0 && (ce($), je = "" + $), $t(I) && (ce(I.key), je = "" + I.key), Tt(I) && (dt = I.ref, on(I,
|
|
458
|
-
for (
|
|
459
|
-
Oe.call(I,
|
|
456
|
+
var Re, Ae = {}, je = null, dt = null;
|
|
457
|
+
$ !== void 0 && (ce($), je = "" + $), $t(I) && (ce(I.key), je = "" + I.key), Tt(I) && (dt = I.ref, on(I, ge));
|
|
458
|
+
for (Re in I)
|
|
459
|
+
Oe.call(I, Re) && !nt.hasOwnProperty(Re) && (Ae[Re] = I[Re]);
|
|
460
460
|
if (R && R.defaultProps) {
|
|
461
461
|
var it = R.defaultProps;
|
|
462
|
-
for (
|
|
463
|
-
|
|
462
|
+
for (Re in it)
|
|
463
|
+
Ae[Re] === void 0 && (Ae[Re] = it[Re]);
|
|
464
464
|
}
|
|
465
465
|
if (je || dt) {
|
|
466
466
|
var lt = typeof R == "function" ? R.displayName || R.name || "Unknown" : R;
|
|
467
|
-
je && yn(
|
|
467
|
+
je && yn(Ae, lt), dt && Vn(Ae, lt);
|
|
468
468
|
}
|
|
469
|
-
return sn(R, je, dt,
|
|
469
|
+
return sn(R, je, dt, ge, G, $e.current, Ae);
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
var Dt = x.ReactCurrentOwner, ln = x.ReactDebugCurrentFrame;
|
|
@@ -535,10 +535,10 @@ Check the top-level render call using <` + $ + ">.");
|
|
|
535
535
|
else if (ar(R))
|
|
536
536
|
R._store && (R._store.validated = !0);
|
|
537
537
|
else if (R) {
|
|
538
|
-
var
|
|
539
|
-
if (typeof
|
|
540
|
-
for (var
|
|
541
|
-
ar(
|
|
538
|
+
var ge = m(R);
|
|
539
|
+
if (typeof ge == "function" && ge !== R.entries)
|
|
540
|
+
for (var Re = ge.call(R), Ae; !(Ae = Re.next()).done; )
|
|
541
|
+
ar(Ae.value) && Fn(Ae.value, I);
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
}
|
|
@@ -561,8 +561,8 @@ Check the top-level render call using <` + $ + ">.");
|
|
|
561
561
|
_e($, R.props, "prop", G, R);
|
|
562
562
|
} else if (I.PropTypes !== void 0 && !kt) {
|
|
563
563
|
kt = !0;
|
|
564
|
-
var
|
|
565
|
-
w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
564
|
+
var ge = D(I);
|
|
565
|
+
w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", ge || "Unknown");
|
|
566
566
|
}
|
|
567
567
|
typeof I.getDefaultProps == "function" && !I.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
568
568
|
}
|
|
@@ -580,10 +580,10 @@ Check the top-level render call using <` + $ + ">.");
|
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
582
|
var un = {};
|
|
583
|
-
function qn(R, I, $, G,
|
|
583
|
+
function qn(R, I, $, G, ge, Re) {
|
|
584
584
|
{
|
|
585
|
-
var
|
|
586
|
-
if (!
|
|
585
|
+
var Ae = N(R);
|
|
586
|
+
if (!Ae) {
|
|
587
587
|
var je = "";
|
|
588
588
|
(R === void 0 || typeof R == "object" && R !== null && Object.keys(R).length === 0) && (je += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
589
589
|
var dt = wt();
|
|
@@ -591,10 +591,10 @@ Check the top-level render call using <` + $ + ">.");
|
|
|
591
591
|
var it;
|
|
592
592
|
R === null ? it = "null" : yt(R) ? it = "array" : R !== void 0 && R.$$typeof === t ? (it = "<" + (D(R.type) || "Unknown") + " />", je = " Did you accidentally export a JSX literal instead of a component?") : it = typeof R, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", it, je);
|
|
593
593
|
}
|
|
594
|
-
var lt = an(R, I, $,
|
|
594
|
+
var lt = an(R, I, $, ge, Re);
|
|
595
595
|
if (lt == null)
|
|
596
596
|
return lt;
|
|
597
|
-
if (
|
|
597
|
+
if (Ae) {
|
|
598
598
|
var bt = I.children;
|
|
599
599
|
if (bt !== void 0)
|
|
600
600
|
if (G)
|
|
@@ -1904,8 +1904,8 @@ const $u = (e) => {
|
|
|
1904
1904
|
const H = d && (k === "stream" || k === "response");
|
|
1905
1905
|
if (d && (S || H && P)) {
|
|
1906
1906
|
const L = {};
|
|
1907
|
-
["status", "statusText", "headers"].forEach((
|
|
1908
|
-
L[
|
|
1907
|
+
["status", "statusText", "headers"].forEach((Ce) => {
|
|
1908
|
+
L[Ce] = K[Ce];
|
|
1909
1909
|
});
|
|
1910
1910
|
const q = O.toFiniteNumber(K.headers.get("content-length")), [pe, me] = S && Ul(
|
|
1911
1911
|
q,
|
|
@@ -2370,22 +2370,22 @@ pt.getAdapter = Bu.getAdapter;
|
|
|
2370
2370
|
pt.HttpStatusCode = ea;
|
|
2371
2371
|
pt.default = pt;
|
|
2372
2372
|
const {
|
|
2373
|
-
Axios:
|
|
2374
|
-
AxiosError:
|
|
2375
|
-
CanceledError:
|
|
2376
|
-
isCancel:
|
|
2377
|
-
CancelToken:
|
|
2378
|
-
VERSION:
|
|
2379
|
-
all:
|
|
2380
|
-
Cancel:
|
|
2381
|
-
isAxiosError:
|
|
2382
|
-
spread:
|
|
2383
|
-
toFormData:
|
|
2384
|
-
AxiosHeaders:
|
|
2385
|
-
HttpStatusCode:
|
|
2386
|
-
formToJSON:
|
|
2387
|
-
getAdapter:
|
|
2388
|
-
mergeConfig:
|
|
2373
|
+
Axios: Yk,
|
|
2374
|
+
AxiosError: Xk,
|
|
2375
|
+
CanceledError: Jk,
|
|
2376
|
+
isCancel: Zk,
|
|
2377
|
+
CancelToken: Qk,
|
|
2378
|
+
VERSION: eR,
|
|
2379
|
+
all: tR,
|
|
2380
|
+
Cancel: nR,
|
|
2381
|
+
isAxiosError: rR,
|
|
2382
|
+
spread: oR,
|
|
2383
|
+
toFormData: sR,
|
|
2384
|
+
AxiosHeaders: iR,
|
|
2385
|
+
HttpStatusCode: aR,
|
|
2386
|
+
formToJSON: lR,
|
|
2387
|
+
getAdapter: cR,
|
|
2388
|
+
mergeConfig: uR
|
|
2389
2389
|
} = pt, ec = typeof window < "u" ? window.__API_BASE_URL__ : void 0, tc = ec ? Hn(ec) : void 0;
|
|
2390
2390
|
function Hn(e) {
|
|
2391
2391
|
const n = (e != null && e.trim() ? e.trim() : "/api/chat").replace(/\/+$/, "");
|
|
@@ -3025,13 +3025,13 @@ function ay(e, t) {
|
|
|
3025
3025
|
}
|
|
3026
3026
|
}
|
|
3027
3027
|
function ly(e = []) {
|
|
3028
|
-
const [t, n] = Nm(ay, { ...iy, messages: e }), r = Ue([]), o = Ue(null), s = Ue(null), i =
|
|
3028
|
+
const [t, n] = Nm(ay, { ...iy, messages: e }), r = Ue([]), o = Ue(null), s = Ue(null), i = Te(() => {
|
|
3029
3029
|
o.current !== null && typeof window < "u" && window.cancelAnimationFrame(o.current), s.current !== null && clearTimeout(s.current), o.current = null, s.current = null;
|
|
3030
3030
|
const d = r.current;
|
|
3031
3031
|
d.length && (r.current = [], n({ type: "batch", payload: { events: d } }));
|
|
3032
|
-
}, []), a =
|
|
3032
|
+
}, []), a = Te(() => {
|
|
3033
3033
|
typeof window < "u" && typeof window.requestAnimationFrame == "function" ? o.current === null && (o.current = window.requestAnimationFrame(() => i())) : s.current === null && (s.current = setTimeout(i, 8));
|
|
3034
|
-
}, [i]), l =
|
|
3034
|
+
}, [i]), l = Te((d) => {
|
|
3035
3035
|
r.current.push(d), a();
|
|
3036
3036
|
}, [a]);
|
|
3037
3037
|
ct(() => () => {
|
|
@@ -3313,14 +3313,14 @@ function py(e) {
|
|
|
3313
3313
|
return t[t.length - 1] || null;
|
|
3314
3314
|
}
|
|
3315
3315
|
function my(e = {}) {
|
|
3316
|
-
const t = tt(() => Hn(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] =
|
|
3316
|
+
const t = tt(() => Hn(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] = xe(e.token ?? null), s = Ue(e.headers ?? {}), i = e.credentials ?? "include", [a, l] = xe(!1), [c, d] = xe(null), [f, h] = xe(""), [p, y] = xe(null), [v, m] = xe(0), [x, w] = xe(!1), b = Ue(null), T = Ue(!0), S = Ue(0), C = Te((N) => {
|
|
3317
3317
|
o(N);
|
|
3318
|
-
}, []), k =
|
|
3318
|
+
}, []), k = Te(() => {
|
|
3319
3319
|
var N;
|
|
3320
3320
|
(N = b.current) == null || N.abort(), b.current = null, l(!1), w(!1), S.current = 0, m(0);
|
|
3321
|
-
}, []), _ =
|
|
3321
|
+
}, []), _ = Te(() => {
|
|
3322
3322
|
h(""), y(null), d(null);
|
|
3323
|
-
}, []), j =
|
|
3323
|
+
}, []), j = Te(
|
|
3324
3324
|
(N, z, F) => {
|
|
3325
3325
|
b.current && (b.current.abort(), b.current = null), l(!0), d(null), e.autoAppendAssistant !== !1 && h("");
|
|
3326
3326
|
const D = new AbortController();
|
|
@@ -3329,11 +3329,11 @@ function my(e = {}) {
|
|
|
3329
3329
|
const P = (pe) => {
|
|
3330
3330
|
var me;
|
|
3331
3331
|
try {
|
|
3332
|
-
const
|
|
3333
|
-
return (me =
|
|
3332
|
+
const Ce = JSON.parse(JSON.stringify(pe));
|
|
3333
|
+
return (me = Ce == null ? void 0 : Ce.payload) != null && me.files_info && Array.isArray(Ce.payload.files_info) && (Ce.payload.files_info = Ce.payload.files_info.map((Se) => ({
|
|
3334
3334
|
...Se,
|
|
3335
3335
|
data: Se != null && Se.data ? `<base64 ${String(Se.data).length} chars>` : Se == null ? void 0 : Se.data
|
|
3336
|
-
}))),
|
|
3336
|
+
}))), Ce;
|
|
3337
3337
|
} catch {
|
|
3338
3338
|
return pe;
|
|
3339
3339
|
}
|
|
@@ -3384,7 +3384,7 @@ function my(e = {}) {
|
|
|
3384
3384
|
);
|
|
3385
3385
|
}
|
|
3386
3386
|
w(!0);
|
|
3387
|
-
const
|
|
3387
|
+
const Ce = me.body.getReader(), Se = new TextDecoder();
|
|
3388
3388
|
let J = "", M = [];
|
|
3389
3389
|
S.current = 0, m(0);
|
|
3390
3390
|
let ee = 0, ne = null;
|
|
@@ -3408,7 +3408,7 @@ function my(e = {}) {
|
|
|
3408
3408
|
try {
|
|
3409
3409
|
const Oe = me.headers.get("X-Thread-Id") || me.headers.get("x-thread-id"), Be = me.headers.get("X-Thread-Created") || me.headers.get("x-thread-created"), st = Oe ?? null, Ve = String(Be ?? "").toLowerCase() === "true";
|
|
3410
3410
|
for ((K = F == null ? void 0 : F.onOpen) == null || K.call(F, { threadId: st, created: Ve }); ; ) {
|
|
3411
|
-
const { value: _e, done: mt } = await
|
|
3411
|
+
const { value: _e, done: mt } = await Ce.read();
|
|
3412
3412
|
if (mt) break;
|
|
3413
3413
|
J += Se.decode(_e, { stream: !0 }), J.length > Ze && (J = "", console.warn("Stream buffer reset: exceeded 1MB"));
|
|
3414
3414
|
let yt;
|
|
@@ -3419,14 +3419,14 @@ function my(e = {}) {
|
|
|
3419
3419
|
J = J.slice(yt + 2);
|
|
3420
3420
|
const oe = xy(vt);
|
|
3421
3421
|
if (!oe) continue;
|
|
3422
|
-
let
|
|
3422
|
+
let ve;
|
|
3423
3423
|
try {
|
|
3424
|
-
|
|
3424
|
+
ve = JSON.parse(oe);
|
|
3425
3425
|
} catch {
|
|
3426
3426
|
console.debug("[use-chat] malformed SSE:", oe.slice(0, 200));
|
|
3427
3427
|
continue;
|
|
3428
3428
|
}
|
|
3429
|
-
const ce = gy(
|
|
3429
|
+
const ce = gy(ve) ? ve.data : ve;
|
|
3430
3430
|
ie = Date.now();
|
|
3431
3431
|
const $e = ce.seq;
|
|
3432
3432
|
if ($e !== void 0) {
|
|
@@ -3459,10 +3459,10 @@ function my(e = {}) {
|
|
|
3459
3459
|
}
|
|
3460
3460
|
} finally {
|
|
3461
3461
|
try {
|
|
3462
|
-
await
|
|
3462
|
+
await Ce.cancel();
|
|
3463
3463
|
} catch {
|
|
3464
3464
|
} finally {
|
|
3465
|
-
(L =
|
|
3465
|
+
(L = Ce.releaseLock) == null || L.call(Ce);
|
|
3466
3466
|
}
|
|
3467
3467
|
ne !== null && typeof window < "u" && window.cancelAnimationFrame(ne), clearInterval(qe), l(!1), w(!1), b.current = null, S.current = 0, m(0);
|
|
3468
3468
|
}
|
|
@@ -3514,7 +3514,7 @@ function yy({
|
|
|
3514
3514
|
onUnhandledEvent: r,
|
|
3515
3515
|
onSequenceGap: o
|
|
3516
3516
|
}) {
|
|
3517
|
-
const s = Ue(null), i =
|
|
3517
|
+
const s = Ue(null), i = Te(
|
|
3518
3518
|
(p) => {
|
|
3519
3519
|
const y = p.seq ?? null;
|
|
3520
3520
|
if (y !== null) {
|
|
@@ -3540,7 +3540,7 @@ function yy({
|
|
|
3540
3540
|
), { stream: a, stop: l, isStreaming: c, error: d, setToken: f } = my({
|
|
3541
3541
|
baseUrl: e,
|
|
3542
3542
|
token: null
|
|
3543
|
-
}), h =
|
|
3543
|
+
}), h = Te(
|
|
3544
3544
|
(p, y) => {
|
|
3545
3545
|
s.current = null, a(
|
|
3546
3546
|
p,
|
|
@@ -3834,38 +3834,38 @@ function Ly({
|
|
|
3834
3834
|
}, [c]), h = tt(
|
|
3835
3835
|
() => `threadPayload:${Ty}:${f}:`,
|
|
3836
3836
|
[f]
|
|
3837
|
-
), p =
|
|
3837
|
+
), p = Te(
|
|
3838
3838
|
(E) => Iy(h, E),
|
|
3839
3839
|
[h]
|
|
3840
|
-
), y =
|
|
3840
|
+
), y = Te(
|
|
3841
3841
|
(E, A = 100) => {
|
|
3842
3842
|
Ay(h, E, A);
|
|
3843
3843
|
},
|
|
3844
3844
|
[h]
|
|
3845
|
-
), v =
|
|
3845
|
+
), v = Te(
|
|
3846
3846
|
(E) => {
|
|
3847
3847
|
Ny(h, E);
|
|
3848
3848
|
},
|
|
3849
3849
|
[h]
|
|
3850
|
-
), m =
|
|
3850
|
+
), m = Te(() => {
|
|
3851
3851
|
_y(h);
|
|
3852
|
-
}, [h]), [x, w] =
|
|
3852
|
+
}, [h]), [x, w] = xe(
|
|
3853
3853
|
() => {
|
|
3854
3854
|
var E;
|
|
3855
3855
|
return Ti(f, (E = l.getAuthToken) == null ? void 0 : E.call(l));
|
|
3856
3856
|
}
|
|
3857
|
-
), [b, T] =
|
|
3857
|
+
), [b, T] = xe(() => {
|
|
3858
3858
|
var A;
|
|
3859
3859
|
const E = ki(
|
|
3860
3860
|
Ti(f, (A = l.getAuthToken) == null ? void 0 : A.call(l))
|
|
3861
3861
|
);
|
|
3862
3862
|
return Fo(E);
|
|
3863
|
-
}), S = tt(() => Ri(b), [b]), [C, k] =
|
|
3863
|
+
}), S = tt(() => Ri(b), [b]), [C, k] = xe(t), [_, j] = xe(!1), [N, z] = xe(!1), [F, D] = xe(null), [P, B] = xe(null), [W, re] = xe(null), [K, H] = xe([]), X = Te(() => {
|
|
3864
3864
|
const E = ki(x);
|
|
3865
3865
|
Do(() => {
|
|
3866
3866
|
T(Fo(E));
|
|
3867
3867
|
});
|
|
3868
|
-
}, [x]), [L, q] =
|
|
3868
|
+
}, [x]), [L, q] = xe(!1), [pe, me] = xe(!1), [Ce, Se] = xe(null), [J, M] = xe(void 0), [ee, ne] = xe(void 0), [de, ae] = xe(void 0), {
|
|
3869
3869
|
state: ie,
|
|
3870
3870
|
dispatch: qe,
|
|
3871
3871
|
seed: Ze,
|
|
@@ -3877,7 +3877,7 @@ function Ly({
|
|
|
3877
3877
|
ct(() => {
|
|
3878
3878
|
_e.current = C;
|
|
3879
3879
|
}, [C]);
|
|
3880
|
-
const mt = Ue(!1), yt = Ue([]), vt = Ue(null), oe = Ue(null),
|
|
3880
|
+
const mt = Ue(!1), yt = Ue([]), vt = Ue(null), oe = Ue(null), ve = Ue(/* @__PURE__ */ new Map()), ce = Ue(C), $e = Ue(!1), nt = Ue(null), Ge = Ue(/* @__PURE__ */ new Map()), Mt = Ue(/* @__PURE__ */ new Map()), Tt = Ue(/* @__PURE__ */ new Map()), $t = Ue(/* @__PURE__ */ new Map()), on = Te(
|
|
3881
3881
|
(E) => {
|
|
3882
3882
|
if (!E) {
|
|
3883
3883
|
H([]);
|
|
@@ -3897,7 +3897,7 @@ function Ly({
|
|
|
3897
3897
|
ct(() => {
|
|
3898
3898
|
on(C);
|
|
3899
3899
|
}, [C, on]);
|
|
3900
|
-
const yn =
|
|
3900
|
+
const yn = Te(() => {
|
|
3901
3901
|
var te;
|
|
3902
3902
|
const E = $t.current;
|
|
3903
3903
|
if (E.size <= uc) return;
|
|
@@ -3906,7 +3906,7 @@ function Ly({
|
|
|
3906
3906
|
const Q = (te = A[le]) == null ? void 0 : te[0];
|
|
3907
3907
|
Q && E.delete(Q);
|
|
3908
3908
|
}
|
|
3909
|
-
}, []), Vn =
|
|
3909
|
+
}, []), Vn = Te(
|
|
3910
3910
|
(E, A, Y) => {
|
|
3911
3911
|
if (!E) return;
|
|
3912
3912
|
const te = Y === "replace" ? [] : Ge.current.get(E) ?? [], le = Y === "replace" ? A : [...A, ...te];
|
|
@@ -3932,7 +3932,7 @@ function Ly({
|
|
|
3932
3932
|
Ge.current.set(E, Fe), E === _e.current && on(E);
|
|
3933
3933
|
},
|
|
3934
3934
|
[on]
|
|
3935
|
-
), sn =
|
|
3935
|
+
), sn = Te(
|
|
3936
3936
|
(E, A, Y) => {
|
|
3937
3937
|
if (!E) return;
|
|
3938
3938
|
const te = Mt.current.get(E), le = Y === "replace" || !te ? /* @__PURE__ */ new Map() : new Map(te);
|
|
@@ -3945,7 +3945,7 @@ function Ly({
|
|
|
3945
3945
|
Mt.current.set(E, le);
|
|
3946
3946
|
},
|
|
3947
3947
|
[]
|
|
3948
|
-
), an =
|
|
3948
|
+
), an = Te(
|
|
3949
3949
|
(E, A) => {
|
|
3950
3950
|
const { threadId: Y, checkpointId: te = null, checkpointNs: le = null } = E, Q = dc(Y, te, le);
|
|
3951
3951
|
if (A != null && A.force)
|
|
@@ -3970,7 +3970,7 @@ function Ly({
|
|
|
3970
3970
|
return Tt.current.set(Q, ze), ze;
|
|
3971
3971
|
},
|
|
3972
3972
|
[l, yn]
|
|
3973
|
-
), Dt =
|
|
3973
|
+
), Dt = Te((E, A) => new Promise((Y, te) => {
|
|
3974
3974
|
const le = async () => {
|
|
3975
3975
|
mt.current = !0;
|
|
3976
3976
|
try {
|
|
@@ -3994,7 +3994,7 @@ function Ly({
|
|
|
3994
3994
|
const E = ie.pendingInterrupt ?? Sy(ie.messages);
|
|
3995
3995
|
lc(W, E) || re(E ?? null);
|
|
3996
3996
|
}, [W, ie.messages, ie.pendingInterrupt]);
|
|
3997
|
-
const kt =
|
|
3997
|
+
const kt = Te(async () => {
|
|
3998
3998
|
const E = ln.current > 0;
|
|
3999
3999
|
E || j(!0);
|
|
4000
4000
|
try {
|
|
@@ -4010,7 +4010,7 @@ function Ly({
|
|
|
4010
4010
|
} finally {
|
|
4011
4011
|
E || j(!1);
|
|
4012
4012
|
}
|
|
4013
|
-
}, [l, i]), ar = Ue(!1), Kn = Ue(null), wt = Ue(null), cn = Ue(""), vn =
|
|
4013
|
+
}, [l, i]), ar = Ue(!1), Kn = Ue(null), wt = Ue(null), cn = Ue(""), vn = Te(
|
|
4014
4014
|
(E, A) => {
|
|
4015
4015
|
if (!gr()) return;
|
|
4016
4016
|
wt.current !== null && (window.clearTimeout(wt.current), wt.current = null);
|
|
@@ -4043,9 +4043,9 @@ function Ly({
|
|
|
4043
4043
|
}, es);
|
|
4044
4044
|
},
|
|
4045
4045
|
[x]
|
|
4046
|
-
), Fn =
|
|
4046
|
+
), Fn = Te(() => {
|
|
4047
4047
|
vn(S, { immediate: !0 });
|
|
4048
|
-
}, [vn, S]), Wt =
|
|
4048
|
+
}, [vn, S]), Wt = Te(
|
|
4049
4049
|
(E, A, Y, te) => {
|
|
4050
4050
|
var Nl;
|
|
4051
4051
|
const le = Y ?? _e.current;
|
|
@@ -4058,7 +4058,7 @@ function Ly({
|
|
|
4058
4058
|
threadId: le,
|
|
4059
4059
|
snapshot: Zt(E, { cloneMessages: !0 })
|
|
4060
4060
|
};
|
|
4061
|
-
|
|
4061
|
+
ve.current.set(le, St), ce.current = le;
|
|
4062
4062
|
}
|
|
4063
4063
|
if (!Fe)
|
|
4064
4064
|
return;
|
|
@@ -4069,7 +4069,7 @@ function Ly({
|
|
|
4069
4069
|
}), re(Q.interrupt ?? null), Se(Q.nextCursor ?? null), q(!!Q.nextCursor), M(Q.checkpointId ?? void 0), ne(Q.checkpointNs ?? void 0), ae(Q.nextCursorNs ?? void 0);
|
|
4070
4070
|
return;
|
|
4071
4071
|
}
|
|
4072
|
-
const De =
|
|
4072
|
+
const De = ve.current.get(le), Ye = (De == null ? void 0 : De.snapshot) ?? null, ft = Array.isArray(Ye == null ? void 0 : Ye.messages) ? Ye.messages : [], Rt = Zt(Ye), bn = Array.isArray(E == null ? void 0 : E.messages) ? E.messages : [], Et = /* @__PURE__ */ new Set(), It = [...bn, ...ft].filter((St) => {
|
|
4073
4073
|
const yi = St == null ? void 0 : St.id;
|
|
4074
4074
|
return yi ? Et.has(yi) ? !1 : (Et.add(yi), !0) : !0;
|
|
4075
4075
|
}), Jr = fc(Rt, Q), Zr = {
|
|
@@ -4087,7 +4087,7 @@ function Ly({
|
|
|
4087
4087
|
interrupt: Rt.interrupt ?? Q.interrupt ?? null,
|
|
4088
4088
|
...Jr
|
|
4089
4089
|
};
|
|
4090
|
-
if (
|
|
4090
|
+
if (ve.current.set(le, {
|
|
4091
4091
|
threadId: le,
|
|
4092
4092
|
snapshot: Zt(Zr, { cloneMessages: !0 })
|
|
4093
4093
|
}), !Fe)
|
|
@@ -4107,7 +4107,7 @@ function Ly({
|
|
|
4107
4107
|
);
|
|
4108
4108
|
},
|
|
4109
4109
|
[Oe, Ze, re]
|
|
4110
|
-
), lr =
|
|
4110
|
+
), lr = Te(
|
|
4111
4111
|
(E) => {
|
|
4112
4112
|
if (E.threadId != null && E.threadId !== _e.current)
|
|
4113
4113
|
return;
|
|
@@ -4119,24 +4119,24 @@ function Ly({
|
|
|
4119
4119
|
}), re(A.interrupt ?? null), Se(A.nextCursor ?? null), q(!!A.nextCursor), M(A.checkpointId ?? void 0), ne(A.checkpointNs ?? void 0), ae(A.nextCursorNs ?? void 0), ce.current = E.threadId, on(E.threadId ?? _e.current ?? null);
|
|
4120
4120
|
},
|
|
4121
4121
|
[Ze, re, on]
|
|
4122
|
-
), wn =
|
|
4122
|
+
), wn = Te((E) => {
|
|
4123
4123
|
if (!E) return;
|
|
4124
|
-
|
|
4124
|
+
ve.current.delete(E), v(E), Ge.current.delete(E), Mt.current.delete(E), E === _e.current && H([]);
|
|
4125
4125
|
const A = `${E}__`;
|
|
4126
4126
|
for (const Y of Tt.current.keys())
|
|
4127
4127
|
Y.startsWith(A) && Tt.current.delete(Y);
|
|
4128
4128
|
for (const Y of $t.current.keys())
|
|
4129
4129
|
Y.startsWith(A) && $t.current.delete(Y);
|
|
4130
4130
|
ce.current === E && (ce.current = null);
|
|
4131
|
-
}, [v]), un =
|
|
4131
|
+
}, [v]), un = Te(() => {
|
|
4132
4132
|
const E = _e.current;
|
|
4133
4133
|
E && wn(E), Ve([]), q(!1), me(!1), Se(null), M(void 0), ne(void 0), ae(void 0);
|
|
4134
|
-
}, [wn, Ve]), qn =
|
|
4134
|
+
}, [wn, Ve]), qn = Te(({ from: E, to: A }) => {
|
|
4135
4135
|
const Y = _e.current;
|
|
4136
4136
|
Y && console.warn(
|
|
4137
4137
|
`[ChatSessionProvider] Stream sequence gap detected (${E} -> ${A}) for thread ${Y}`
|
|
4138
4138
|
);
|
|
4139
|
-
}, []), Yr =
|
|
4139
|
+
}, []), Yr = Te(
|
|
4140
4140
|
(E) => {
|
|
4141
4141
|
const A = E.threadId;
|
|
4142
4142
|
console.log("[ChatSessionProvider] 📥 Handling thread_info event:", {
|
|
@@ -4226,7 +4226,7 @@ function Ly({
|
|
|
4226
4226
|
Y == null || Y();
|
|
4227
4227
|
};
|
|
4228
4228
|
}, [l, f, I, m, kt]);
|
|
4229
|
-
const $ =
|
|
4229
|
+
const $ = Te(
|
|
4230
4230
|
async (E) => {
|
|
4231
4231
|
var te;
|
|
4232
4232
|
const A = `Thread ${(te = crypto.randomUUID) == null ? void 0 : te.call(crypto)}`, Y = {
|
|
@@ -4261,7 +4261,7 @@ function Ly({
|
|
|
4261
4261
|
}
|
|
4262
4262
|
},
|
|
4263
4263
|
[l, kt]
|
|
4264
|
-
), G =
|
|
4264
|
+
), G = Te(
|
|
4265
4265
|
async (E) => {
|
|
4266
4266
|
try {
|
|
4267
4267
|
await l.deleteThread(E);
|
|
@@ -4278,7 +4278,7 @@ function Ly({
|
|
|
4278
4278
|
}
|
|
4279
4279
|
},
|
|
4280
4280
|
[l, un, wn, kt, vn]
|
|
4281
|
-
),
|
|
4281
|
+
), ge = Te(
|
|
4282
4282
|
async (E, A) => {
|
|
4283
4283
|
try {
|
|
4284
4284
|
await l.updateThread(E, A), T((Y) => {
|
|
@@ -4293,7 +4293,7 @@ function Ly({
|
|
|
4293
4293
|
}
|
|
4294
4294
|
},
|
|
4295
4295
|
[l, kt]
|
|
4296
|
-
),
|
|
4296
|
+
), Re = Te(
|
|
4297
4297
|
async (E, A, Y, te = !1) => {
|
|
4298
4298
|
await Dt(async () => {
|
|
4299
4299
|
if (oe.current === E && !te) {
|
|
@@ -4310,12 +4310,12 @@ function Ly({
|
|
|
4310
4310
|
), ze = $t.current.get(Fe), De = !te && !A && !Y && ze && Date.now() - ze.timestamp < Py, Ye = !te && !A && !Y;
|
|
4311
4311
|
let ft = !1;
|
|
4312
4312
|
if (Ye) {
|
|
4313
|
-
const Et =
|
|
4313
|
+
const Et = ve.current.get(E);
|
|
4314
4314
|
if (Et)
|
|
4315
4315
|
lr(Et), ft = !0;
|
|
4316
4316
|
else {
|
|
4317
4317
|
const It = p(E);
|
|
4318
|
-
It && (
|
|
4318
|
+
It && (ve.current.set(E, It), lr(It), ft = !0);
|
|
4319
4319
|
}
|
|
4320
4320
|
}
|
|
4321
4321
|
const Rt = te || !ft || !!A || !!Y, bn = async (Et) => {
|
|
@@ -4346,7 +4346,7 @@ function Ly({
|
|
|
4346
4346
|
Vn,
|
|
4347
4347
|
sn
|
|
4348
4348
|
]
|
|
4349
|
-
),
|
|
4349
|
+
), Ae = Te(async () => {
|
|
4350
4350
|
await Dt(async () => {
|
|
4351
4351
|
const E = _e.current;
|
|
4352
4352
|
E && wn(E), oe.current = null, k(null), _e.current = null, ce.current = null, un(), M(void 0), ne(void 0), ae(void 0), H([]);
|
|
@@ -4356,7 +4356,7 @@ function Ly({
|
|
|
4356
4356
|
console.warn("[ChatSessionProvider] Failed to clear lastThreadId:", A);
|
|
4357
4357
|
}
|
|
4358
4358
|
}, "clearCurrentThread");
|
|
4359
|
-
}, [un, wn, Dt]), je =
|
|
4359
|
+
}, [un, wn, Dt]), je = Te(
|
|
4360
4360
|
async (E, A) => {
|
|
4361
4361
|
var Q;
|
|
4362
4362
|
const Y = _e.current;
|
|
@@ -4368,17 +4368,17 @@ function Ly({
|
|
|
4368
4368
|
}, `navigateToCheckpoint-${Y}-${te}`);
|
|
4369
4369
|
return;
|
|
4370
4370
|
}
|
|
4371
|
-
await
|
|
4371
|
+
await Re(Y, E, A ?? void 0, !0);
|
|
4372
4372
|
},
|
|
4373
|
-
[Wt, Dt,
|
|
4374
|
-
), dt =
|
|
4373
|
+
[Wt, Dt, Re]
|
|
4374
|
+
), dt = Te(async () => {
|
|
4375
4375
|
if (!_e.current) throw new Error("No active thread");
|
|
4376
|
-
await
|
|
4377
|
-
}, [
|
|
4376
|
+
await Re(_e.current, void 0, void 0, !0);
|
|
4377
|
+
}, [Re]), it = Te(
|
|
4378
4378
|
async () => {
|
|
4379
4379
|
if (!_e.current) throw new Error("No active thread");
|
|
4380
4380
|
if (pe || !L) return;
|
|
4381
|
-
const E =
|
|
4381
|
+
const E = Ce;
|
|
4382
4382
|
if (E) {
|
|
4383
4383
|
me(!0);
|
|
4384
4384
|
try {
|
|
@@ -4412,12 +4412,12 @@ function Ly({
|
|
|
4412
4412
|
J,
|
|
4413
4413
|
ee,
|
|
4414
4414
|
de,
|
|
4415
|
-
|
|
4415
|
+
Ce,
|
|
4416
4416
|
pe,
|
|
4417
4417
|
Vn,
|
|
4418
4418
|
sn
|
|
4419
4419
|
]
|
|
4420
|
-
), lt =
|
|
4420
|
+
), lt = Te(
|
|
4421
4421
|
(E) => {
|
|
4422
4422
|
if (E != null && E.threadId) {
|
|
4423
4423
|
if (E.checkpointId) {
|
|
@@ -4434,7 +4434,7 @@ function Ly({
|
|
|
4434
4434
|
}
|
|
4435
4435
|
},
|
|
4436
4436
|
[Wt, sn]
|
|
4437
|
-
), bt =
|
|
4437
|
+
), bt = Te(
|
|
4438
4438
|
async (E, A) => {
|
|
4439
4439
|
var Qr;
|
|
4440
4440
|
const Y = _e.current, te = (E == null ? void 0 : E.text) ?? "", le = (E == null ? void 0 : E.attachments) ?? [], Q = le.length ? le : (A == null ? void 0 : A.attachments) ?? [], Fe = {
|
|
@@ -4498,7 +4498,7 @@ function Ly({
|
|
|
4498
4498
|
Be,
|
|
4499
4499
|
Ir
|
|
4500
4500
|
]
|
|
4501
|
-
), $n =
|
|
4501
|
+
), $n = Te(
|
|
4502
4502
|
async (E, A, Y) => {
|
|
4503
4503
|
if (!_e.current)
|
|
4504
4504
|
throw new Error("No active thread to handle interrupt");
|
|
@@ -4537,11 +4537,11 @@ function Ly({
|
|
|
4537
4537
|
}), !r && !t)
|
|
4538
4538
|
try {
|
|
4539
4539
|
const A = localStorage.getItem("lastThreadId");
|
|
4540
|
-
A && (k(A), n && await
|
|
4540
|
+
A && (k(A), n && await Re(A));
|
|
4541
4541
|
} catch (A) {
|
|
4542
4542
|
console.warn("[ChatSessionProvider] Failed to restore last thread:", A);
|
|
4543
4543
|
}
|
|
4544
|
-
else t && n && await
|
|
4544
|
+
else t && n && await Re(t);
|
|
4545
4545
|
} catch (A) {
|
|
4546
4546
|
console.error("[ChatSessionProvider] Initialization failed:", A), i == null || i(String(A));
|
|
4547
4547
|
}
|
|
@@ -4554,10 +4554,10 @@ function Ly({
|
|
|
4554
4554
|
checkpointId: ie.lastCheckpointId ?? null,
|
|
4555
4555
|
checkpointNs: ie.lastCheckpointNs ?? null,
|
|
4556
4556
|
messages: ie.messages.slice(),
|
|
4557
|
-
nextCursor:
|
|
4557
|
+
nextCursor: Ce ?? null,
|
|
4558
4558
|
nextCursorNs: de ?? null,
|
|
4559
4559
|
interrupt: ie.pendingInterrupt ?? W ?? null
|
|
4560
|
-
}), Y =
|
|
4560
|
+
}), Y = ve.current.get(E), te = Y == null ? void 0 : Y.snapshot, le = !te || te.messages.length !== A.messages.length || te.messages.some((De, Ye) => {
|
|
4561
4561
|
var ft;
|
|
4562
4562
|
return (De == null ? void 0 : De.id) !== ((ft = A.messages[Ye]) == null ? void 0 : ft.id);
|
|
4563
4563
|
}), Q = ((te == null ? void 0 : te.checkpointId) ?? null) !== A.checkpointId || ((te == null ? void 0 : te.checkpointNs) ?? null) !== A.checkpointNs, Fe = ((te == null ? void 0 : te.nextCursor) ?? null) !== A.nextCursor || ((te == null ? void 0 : te.nextCursorNs) ?? null) !== A.nextCursorNs, ze = !lc(
|
|
@@ -4569,7 +4569,7 @@ function Ly({
|
|
|
4569
4569
|
threadId: E,
|
|
4570
4570
|
snapshot: A
|
|
4571
4571
|
};
|
|
4572
|
-
|
|
4572
|
+
ve.current.set(E, De), Kn.current && window.clearTimeout(Kn.current), Kn.current = window.setTimeout(() => {
|
|
4573
4573
|
try {
|
|
4574
4574
|
y(De, 100);
|
|
4575
4575
|
} catch (Ye) {
|
|
@@ -4578,7 +4578,7 @@ function Ly({
|
|
|
4578
4578
|
}, es);
|
|
4579
4579
|
}
|
|
4580
4580
|
}, [
|
|
4581
|
-
|
|
4581
|
+
Ce,
|
|
4582
4582
|
de,
|
|
4583
4583
|
ie.lastCheckpointId,
|
|
4584
4584
|
ie.lastCheckpointNs,
|
|
@@ -4597,7 +4597,7 @@ function Ly({
|
|
|
4597
4597
|
actions: {
|
|
4598
4598
|
createThread: $,
|
|
4599
4599
|
deleteThread: G,
|
|
4600
|
-
renameThread:
|
|
4600
|
+
renameThread: ge,
|
|
4601
4601
|
refreshThreads: () => kt()
|
|
4602
4602
|
},
|
|
4603
4603
|
persistThreadsCache: Fn,
|
|
@@ -4610,7 +4610,7 @@ function Ly({
|
|
|
4610
4610
|
F,
|
|
4611
4611
|
$,
|
|
4612
4612
|
G,
|
|
4613
|
-
|
|
4613
|
+
ge,
|
|
4614
4614
|
kt,
|
|
4615
4615
|
Fn,
|
|
4616
4616
|
X,
|
|
@@ -4641,12 +4641,12 @@ function Ly({
|
|
|
4641
4641
|
clearState: un,
|
|
4642
4642
|
navigateToCheckpoint: je,
|
|
4643
4643
|
returnToLatest: dt,
|
|
4644
|
-
loadThread:
|
|
4645
|
-
clearThread:
|
|
4644
|
+
loadThread: Re,
|
|
4645
|
+
clearThread: Ae,
|
|
4646
4646
|
respondToInterrupt: $n
|
|
4647
4647
|
};
|
|
4648
4648
|
}, [
|
|
4649
|
-
|
|
4649
|
+
Ae,
|
|
4650
4650
|
un,
|
|
4651
4651
|
C,
|
|
4652
4652
|
W,
|
|
@@ -4654,7 +4654,7 @@ function Ly({
|
|
|
4654
4654
|
pe,
|
|
4655
4655
|
N,
|
|
4656
4656
|
it,
|
|
4657
|
-
|
|
4657
|
+
Re,
|
|
4658
4658
|
ie.assemblingId,
|
|
4659
4659
|
ie.lastBranch,
|
|
4660
4660
|
ie.lastCheckpointId,
|
|
@@ -4928,7 +4928,7 @@ function za(e) {
|
|
|
4928
4928
|
function ht(e) {
|
|
4929
4929
|
return e(od);
|
|
4930
4930
|
}
|
|
4931
|
-
function
|
|
4931
|
+
function ye(e, t) {
|
|
4932
4932
|
return Je(e, Uy(t, Bs));
|
|
4933
4933
|
}
|
|
4934
4934
|
function fn(e, t) {
|
|
@@ -5049,7 +5049,7 @@ function Z(e) {
|
|
|
5049
5049
|
};
|
|
5050
5050
|
}
|
|
5051
5051
|
function Ot(e, t) {
|
|
5052
|
-
return Hs(Z(t), (n) =>
|
|
5052
|
+
return Hs(Z(t), (n) => ye(e, n));
|
|
5053
5053
|
}
|
|
5054
5054
|
function We() {
|
|
5055
5055
|
const e = [];
|
|
@@ -5072,7 +5072,7 @@ function We() {
|
|
|
5072
5072
|
};
|
|
5073
5073
|
}
|
|
5074
5074
|
function Gt(e) {
|
|
5075
|
-
return Hs(We(), (t) =>
|
|
5075
|
+
return Hs(We(), (t) => ye(e, t));
|
|
5076
5076
|
}
|
|
5077
5077
|
function Ke(e, t = [], { singleton: n } = { singleton: !0 }) {
|
|
5078
5078
|
return {
|
|
@@ -5112,7 +5112,7 @@ function gt(...e) {
|
|
|
5112
5112
|
}
|
|
5113
5113
|
};
|
|
5114
5114
|
}
|
|
5115
|
-
function
|
|
5115
|
+
function ke(e, t = id) {
|
|
5116
5116
|
return V(e, rt(t));
|
|
5117
5117
|
}
|
|
5118
5118
|
function aa(...e) {
|
|
@@ -5262,19 +5262,19 @@ function ad(e, t, n) {
|
|
|
5262
5262
|
const Lt = Ke(
|
|
5263
5263
|
() => {
|
|
5264
5264
|
const e = We(), t = We(), n = Z(0), r = We(), o = Z(0), s = We(), i = We(), a = Z(0), l = Z(0), c = Z(0), d = Z(0), f = We(), h = We(), p = Z(!1), y = Z(!1), v = Z(!1);
|
|
5265
|
-
return
|
|
5265
|
+
return ye(
|
|
5266
5266
|
V(
|
|
5267
5267
|
e,
|
|
5268
5268
|
ue(({ scrollTop: m }) => m)
|
|
5269
5269
|
),
|
|
5270
5270
|
t
|
|
5271
|
-
),
|
|
5271
|
+
), ye(
|
|
5272
5272
|
V(
|
|
5273
5273
|
e,
|
|
5274
5274
|
ue(({ scrollHeight: m }) => m)
|
|
5275
5275
|
),
|
|
5276
5276
|
i
|
|
5277
|
-
),
|
|
5277
|
+
), ye(t, o), {
|
|
5278
5278
|
deviation: n,
|
|
5279
5279
|
fixedFooterHeight: c,
|
|
5280
5280
|
fixedHeaderHeight: l,
|
|
@@ -5624,7 +5624,7 @@ const dv = {
|
|
|
5624
5624
|
),
|
|
5625
5625
|
[]
|
|
5626
5626
|
);
|
|
5627
|
-
|
|
5627
|
+
ye(
|
|
5628
5628
|
V(
|
|
5629
5629
|
l,
|
|
5630
5630
|
Ee((S) => S.length > 0),
|
|
@@ -5639,7 +5639,7 @@ const dv = {
|
|
|
5639
5639
|
})
|
|
5640
5640
|
),
|
|
5641
5641
|
v
|
|
5642
|
-
),
|
|
5642
|
+
), ye(
|
|
5643
5643
|
V(
|
|
5644
5644
|
r,
|
|
5645
5645
|
Le(v),
|
|
@@ -5653,7 +5653,7 @@ const dv = {
|
|
|
5653
5653
|
])
|
|
5654
5654
|
),
|
|
5655
5655
|
n
|
|
5656
|
-
),
|
|
5656
|
+
), ye(c, d);
|
|
5657
5657
|
const x = Ot(
|
|
5658
5658
|
V(
|
|
5659
5659
|
c,
|
|
@@ -5661,7 +5661,7 @@ const dv = {
|
|
|
5661
5661
|
),
|
|
5662
5662
|
!0
|
|
5663
5663
|
);
|
|
5664
|
-
|
|
5664
|
+
ye(
|
|
5665
5665
|
V(
|
|
5666
5666
|
d,
|
|
5667
5667
|
Ee((S) => S !== void 0 && Qe(ht(v).sizeTree)),
|
|
@@ -5709,7 +5709,7 @@ const dv = {
|
|
|
5709
5709
|
);
|
|
5710
5710
|
});
|
|
5711
5711
|
const b = Gt(s);
|
|
5712
|
-
|
|
5712
|
+
ye(
|
|
5713
5713
|
V(
|
|
5714
5714
|
s,
|
|
5715
5715
|
Le(v),
|
|
@@ -5780,7 +5780,7 @@ const dv = {
|
|
|
5780
5780
|
})
|
|
5781
5781
|
)
|
|
5782
5782
|
);
|
|
5783
|
-
return
|
|
5783
|
+
return ye(
|
|
5784
5784
|
V(
|
|
5785
5785
|
i,
|
|
5786
5786
|
Le(v, p),
|
|
@@ -5855,19 +5855,19 @@ function fv(e) {
|
|
|
5855
5855
|
const xd = Ke(
|
|
5856
5856
|
([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, scrollTop: o }]) => {
|
|
5857
5857
|
const s = We(), i = We(), a = Gt(V(s, ue(fv)));
|
|
5858
|
-
return
|
|
5858
|
+
return ye(
|
|
5859
5859
|
V(
|
|
5860
5860
|
a,
|
|
5861
5861
|
ue((l) => l.totalCount)
|
|
5862
5862
|
),
|
|
5863
5863
|
n
|
|
5864
|
-
),
|
|
5864
|
+
), ye(
|
|
5865
5865
|
V(
|
|
5866
5866
|
a,
|
|
5867
5867
|
ue((l) => l.groupIndices)
|
|
5868
5868
|
),
|
|
5869
5869
|
e
|
|
5870
|
-
),
|
|
5870
|
+
), ye(
|
|
5871
5871
|
V(
|
|
5872
5872
|
gt(o, t, r),
|
|
5873
5873
|
Ee(([l, c]) => Ws(c)),
|
|
@@ -5919,7 +5919,7 @@ const Ao = Ke(
|
|
|
5919
5919
|
function b() {
|
|
5920
5920
|
m && (m(), m = null), w && (w(), w = null), x && (clearTimeout(x), x = null), Me(l, !1);
|
|
5921
5921
|
}
|
|
5922
|
-
return
|
|
5922
|
+
return ye(
|
|
5923
5923
|
V(
|
|
5924
5924
|
p,
|
|
5925
5925
|
Le(n, f, r, v, a, i, h),
|
|
@@ -5984,7 +5984,7 @@ function Va(e, t) {
|
|
|
5984
5984
|
const No = Ke(
|
|
5985
5985
|
([{ defaultItemSize: e, listRefresh: t, sizes: n }, { scrollTop: r }, { scrollTargetReached: o, scrollToIndex: s }, { didMount: i }]) => {
|
|
5986
5986
|
const a = Z(!0), l = Z(0), c = Z(!0);
|
|
5987
|
-
return
|
|
5987
|
+
return ye(
|
|
5988
5988
|
V(
|
|
5989
5989
|
i,
|
|
5990
5990
|
Le(l),
|
|
@@ -5992,7 +5992,7 @@ const No = Ke(
|
|
|
5992
5992
|
En(!1)
|
|
5993
5993
|
),
|
|
5994
5994
|
a
|
|
5995
|
-
),
|
|
5995
|
+
), ye(
|
|
5996
5996
|
V(
|
|
5997
5997
|
i,
|
|
5998
5998
|
Le(l),
|
|
@@ -6040,7 +6040,7 @@ const vo = "up", ao = "down", mv = "none", gv = {
|
|
|
6040
6040
|
}, xv = 0, _o = Ke(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
|
|
6041
6041
|
const i = Z(!1), a = Z(!0), l = We(), c = We(), d = Z(4), f = Z(xv), h = Ot(
|
|
6042
6042
|
V(
|
|
6043
|
-
aa(V(
|
|
6043
|
+
aa(V(ke(o), xr(1), En(!0)), V(ke(o), xr(1), En(!1), mc(100))),
|
|
6044
6044
|
rt()
|
|
6045
6045
|
),
|
|
6046
6046
|
!1
|
|
@@ -6048,17 +6048,17 @@ const vo = "up", ao = "down", mv = "none", gv = {
|
|
|
6048
6048
|
V(aa(V(n, En(!0)), V(n, En(!1), mc(200))), rt()),
|
|
6049
6049
|
!1
|
|
6050
6050
|
);
|
|
6051
|
-
|
|
6051
|
+
ye(
|
|
6052
6052
|
V(
|
|
6053
|
-
gt(
|
|
6053
|
+
gt(ke(o), ke(f)),
|
|
6054
6054
|
ue(([w, b]) => w <= b),
|
|
6055
6055
|
rt()
|
|
6056
6056
|
),
|
|
6057
6057
|
a
|
|
6058
|
-
),
|
|
6058
|
+
), ye(V(a, Bn(50)), c);
|
|
6059
6059
|
const y = Gt(
|
|
6060
6060
|
V(
|
|
6061
|
-
gt(r,
|
|
6061
|
+
gt(r, ke(s), ke(t), ke(e), ke(d)),
|
|
6062
6062
|
An((w, [{ scrollHeight: b, scrollTop: T }, S, C, k, _]) => {
|
|
6063
6063
|
const j = T + S - b > -_, N = {
|
|
6064
6064
|
scrollHeight: b,
|
|
@@ -6117,15 +6117,15 @@ const vo = "up", ao = "down", mv = "none", gv = {
|
|
|
6117
6117
|
),
|
|
6118
6118
|
0
|
|
6119
6119
|
);
|
|
6120
|
-
|
|
6120
|
+
ye(
|
|
6121
6121
|
V(
|
|
6122
6122
|
y,
|
|
6123
6123
|
ue((w) => w.atBottom)
|
|
6124
6124
|
),
|
|
6125
6125
|
i
|
|
6126
|
-
),
|
|
6126
|
+
), ye(V(i, Bn(50)), l);
|
|
6127
6127
|
const m = Z(ao);
|
|
6128
|
-
|
|
6128
|
+
ye(
|
|
6129
6129
|
V(
|
|
6130
6130
|
r,
|
|
6131
6131
|
ue(({ scrollTop: w }) => w),
|
|
@@ -6137,16 +6137,16 @@ const vo = "up", ao = "down", mv = "none", gv = {
|
|
|
6137
6137
|
ue((w) => w.direction)
|
|
6138
6138
|
),
|
|
6139
6139
|
m
|
|
6140
|
-
),
|
|
6140
|
+
), ye(V(r, Bn(50), En(mv)), m);
|
|
6141
6141
|
const x = Z(0);
|
|
6142
|
-
return
|
|
6142
|
+
return ye(
|
|
6143
6143
|
V(
|
|
6144
6144
|
h,
|
|
6145
6145
|
Ee((w) => !w),
|
|
6146
6146
|
En(0)
|
|
6147
6147
|
),
|
|
6148
6148
|
x
|
|
6149
|
-
),
|
|
6149
|
+
), ye(
|
|
6150
6150
|
V(
|
|
6151
6151
|
o,
|
|
6152
6152
|
Bn(100),
|
|
@@ -6182,15 +6182,15 @@ const Ka = Ke(
|
|
|
6182
6182
|
const s = We(), i = Z(0), a = Z(0), l = Z(0), c = Ot(
|
|
6183
6183
|
V(
|
|
6184
6184
|
gt(
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6185
|
+
ke(r),
|
|
6186
|
+
ke(o),
|
|
6187
|
+
ke(n),
|
|
6188
|
+
ke(s, xo),
|
|
6189
|
+
ke(l),
|
|
6190
|
+
ke(i),
|
|
6191
|
+
ke(t),
|
|
6192
|
+
ke(e),
|
|
6193
|
+
ke(a)
|
|
6194
6194
|
),
|
|
6195
6195
|
ue(
|
|
6196
6196
|
([
|
|
@@ -6327,20 +6327,20 @@ const Tr = Ke(
|
|
|
6327
6327
|
{ recalcInProgress: y }
|
|
6328
6328
|
]) => {
|
|
6329
6329
|
const v = Z([]), m = Z(0), x = We();
|
|
6330
|
-
|
|
6330
|
+
ye(s.topItemsIndexes, v);
|
|
6331
6331
|
const w = Ot(
|
|
6332
6332
|
V(
|
|
6333
6333
|
gt(
|
|
6334
6334
|
p,
|
|
6335
6335
|
y,
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6336
|
+
ke(l, xo),
|
|
6337
|
+
ke(o),
|
|
6338
|
+
ke(r),
|
|
6339
|
+
ke(c),
|
|
6340
6340
|
d,
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6341
|
+
ke(v),
|
|
6342
|
+
ke(t),
|
|
6343
|
+
ke(n),
|
|
6344
6344
|
e
|
|
6345
6345
|
),
|
|
6346
6346
|
Ee(([C, k, , _, , , , , , , j]) => {
|
|
@@ -6377,10 +6377,10 @@ const Tr = Ke(
|
|
|
6377
6377
|
);
|
|
6378
6378
|
const X = [];
|
|
6379
6379
|
if (F.length > 0) {
|
|
6380
|
-
const
|
|
6380
|
+
const Ce = F[0], Se = F[F.length - 1];
|
|
6381
6381
|
let J = 0;
|
|
6382
|
-
for (const M of Us(K,
|
|
6383
|
-
const ee = M.value, ne = Math.max(M.start,
|
|
6382
|
+
for (const M of Us(K, Ce, Se)) {
|
|
6383
|
+
const ee = M.value, ne = Math.max(M.start, Ce), de = Math.min(M.end, Se);
|
|
6384
6384
|
for (let ae = ne; ae <= de; ae++)
|
|
6385
6385
|
X.push({ data: B == null ? void 0 : B[ae], index: ae, offset: J, size: ee }), J += ee;
|
|
6386
6386
|
}
|
|
@@ -6390,7 +6390,7 @@ const Tr = Ke(
|
|
|
6390
6390
|
const L = F.length > 0 ? F[F.length - 1] + 1 : 0, q = iv(re, C, k, L);
|
|
6391
6391
|
if (q.length === 0)
|
|
6392
6392
|
return null;
|
|
6393
|
-
const pe = _ - 1, me = Hs([], (
|
|
6393
|
+
const pe = _ - 1, me = Hs([], (Ce) => {
|
|
6394
6394
|
for (const Se of q) {
|
|
6395
6395
|
const J = Se.value;
|
|
6396
6396
|
let M = J.offset, ee = Se.start;
|
|
@@ -6403,7 +6403,7 @@ const Tr = Ke(
|
|
|
6403
6403
|
ee < L && (M += (L - ee) * ne, ee = L);
|
|
6404
6404
|
const de = Math.min(Se.end, pe);
|
|
6405
6405
|
for (let ae = ee; ae <= de && !(M >= k); ae++)
|
|
6406
|
-
|
|
6406
|
+
Ce.push({ data: B == null ? void 0 : B[ae], index: ae, offset: M, size: ne }), M += ne + P;
|
|
6407
6407
|
}
|
|
6408
6408
|
});
|
|
6409
6409
|
return rs(me, X, _, P, W, D);
|
|
@@ -6415,26 +6415,26 @@ const Tr = Ke(
|
|
|
6415
6415
|
),
|
|
6416
6416
|
Ai
|
|
6417
6417
|
);
|
|
6418
|
-
|
|
6418
|
+
ye(
|
|
6419
6419
|
V(
|
|
6420
6420
|
e,
|
|
6421
6421
|
Ee($a),
|
|
6422
6422
|
ue((C) => C == null ? void 0 : C.length)
|
|
6423
6423
|
),
|
|
6424
6424
|
o
|
|
6425
|
-
),
|
|
6425
|
+
), ye(
|
|
6426
6426
|
V(
|
|
6427
6427
|
w,
|
|
6428
6428
|
ue((C) => C.topListHeight)
|
|
6429
6429
|
),
|
|
6430
6430
|
f
|
|
6431
|
-
),
|
|
6431
|
+
), ye(f, a), ye(
|
|
6432
6432
|
V(
|
|
6433
6433
|
w,
|
|
6434
6434
|
ue((C) => [C.top, C.bottom])
|
|
6435
6435
|
),
|
|
6436
6436
|
i
|
|
6437
|
-
),
|
|
6437
|
+
), ye(
|
|
6438
6438
|
V(
|
|
6439
6439
|
w,
|
|
6440
6440
|
ue((C) => C.items)
|
|
@@ -6499,7 +6499,7 @@ const Tr = Ke(
|
|
|
6499
6499
|
),
|
|
6500
6500
|
0
|
|
6501
6501
|
);
|
|
6502
|
-
return
|
|
6502
|
+
return ye(ke(i), s), { totalListHeight: i, totalListHeightChanged: s };
|
|
6503
6503
|
},
|
|
6504
6504
|
ot(Lt, Tr),
|
|
6505
6505
|
{ singleton: !0 }
|
|
@@ -6534,7 +6534,7 @@ const Tr = Ke(
|
|
|
6534
6534
|
{ scrollToIndex: c }
|
|
6535
6535
|
]) => {
|
|
6536
6536
|
const d = We();
|
|
6537
|
-
return
|
|
6537
|
+
return ye(
|
|
6538
6538
|
V(
|
|
6539
6539
|
d,
|
|
6540
6540
|
Le(t, l, n, s, o, r, a),
|
|
@@ -6594,8 +6594,8 @@ const bv = (e, t) => typeof e == "function" ? Cc(e(t)) : t && Cc(e), Sv = Ke(
|
|
|
6594
6594
|
}
|
|
6595
6595
|
Je(
|
|
6596
6596
|
V(
|
|
6597
|
-
gt(V(
|
|
6598
|
-
Le(
|
|
6597
|
+
gt(V(ke(t), xr(1)), l),
|
|
6598
|
+
Le(ke(y), s, a, f),
|
|
6599
6599
|
ue(([[S, C], k, _, j, N]) => {
|
|
6600
6600
|
let z = C && j, F = "auto";
|
|
6601
6601
|
return z && (F = bv(k, _ || N), z = z && !!F), { followOutputBehavior: F, shouldFollow: z, totalCount: S };
|
|
@@ -6618,7 +6618,7 @@ const bv = (e, t) => typeof e == "function" ? Cc(e(t)) : t && Cc(e), Sv = Ke(
|
|
|
6618
6618
|
}
|
|
6619
6619
|
Je(
|
|
6620
6620
|
V(
|
|
6621
|
-
gt(
|
|
6621
|
+
gt(ke(y), t, c),
|
|
6622
6622
|
Ee(([S, , C]) => S && C),
|
|
6623
6623
|
An(
|
|
6624
6624
|
({ value: S }, [, C]) => ({ refreshed: S === C, value: C }),
|
|
@@ -6632,26 +6632,26 @@ const bv = (e, t) => typeof e == "function" ? Cc(e(t)) : t && Cc(e), Sv = Ke(
|
|
|
6632
6632
|
}
|
|
6633
6633
|
), Je(v, () => {
|
|
6634
6634
|
w(ht(y) !== !1);
|
|
6635
|
-
}), Je(gt(
|
|
6635
|
+
}), Je(gt(ke(y), o), ([S, C]) => {
|
|
6636
6636
|
S && !C.atBottom && C.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && x("auto");
|
|
6637
6637
|
});
|
|
6638
6638
|
const b = Z(null), T = We();
|
|
6639
|
-
return
|
|
6639
|
+
return ye(
|
|
6640
6640
|
aa(
|
|
6641
6641
|
V(
|
|
6642
|
-
|
|
6642
|
+
ke(r),
|
|
6643
6643
|
ue((S) => {
|
|
6644
6644
|
var C;
|
|
6645
6645
|
return (C = S == null ? void 0 : S.length) != null ? C : 0;
|
|
6646
6646
|
})
|
|
6647
6647
|
),
|
|
6648
|
-
V(
|
|
6648
|
+
V(ke(t))
|
|
6649
6649
|
),
|
|
6650
6650
|
T
|
|
6651
6651
|
), Je(
|
|
6652
6652
|
V(
|
|
6653
6653
|
gt(V(T, xr(1)), l),
|
|
6654
|
-
Le(
|
|
6654
|
+
Le(ke(b), a, f, h),
|
|
6655
6655
|
ue(([[S, C], k, _, j, N]) => C && _ && (k == null ? void 0 : k({ context: N, totalCount: S, scrollingInProgress: j }))),
|
|
6656
6656
|
Ee((S) => !!S),
|
|
6657
6657
|
Bn(0)
|
|
@@ -6677,7 +6677,7 @@ const bv = (e, t) => typeof e == "function" ? Cc(e(t)) : t && Cc(e), Sv = Ke(
|
|
|
6677
6677
|
Cd
|
|
6678
6678
|
)
|
|
6679
6679
|
), Cv = Ke(
|
|
6680
|
-
([{ data: e, firstItemIndex: t, gap: n, sizes: r }, { initialTopMostItemIndex: o }, { initialItemCount: s, listState: i }, { didMount: a }]) => (
|
|
6680
|
+
([{ data: e, firstItemIndex: t, gap: n, sizes: r }, { initialTopMostItemIndex: o }, { initialItemCount: s, listState: i }, { didMount: a }]) => (ye(
|
|
6681
6681
|
V(
|
|
6682
6682
|
a,
|
|
6683
6683
|
Le(s),
|
|
@@ -6722,7 +6722,7 @@ const bv = (e, t) => typeof e == "function" ? Cc(e(t)) : t && Cc(e), Sv = Ke(
|
|
|
6722
6722
|
), Td = Ke(
|
|
6723
6723
|
([{ scrollVelocity: e }]) => {
|
|
6724
6724
|
const t = Z(!1), n = We(), r = Z(!1);
|
|
6725
|
-
return
|
|
6725
|
+
return ye(
|
|
6726
6726
|
V(
|
|
6727
6727
|
e,
|
|
6728
6728
|
Le(r, t, n),
|
|
@@ -6750,7 +6750,7 @@ const bv = (e, t) => typeof e == "function" ? Cc(e(t)) : t && Cc(e), Sv = Ke(
|
|
|
6750
6750
|
{ singleton: !0 }
|
|
6751
6751
|
), qa = Ke(([{ scrollContainerState: e, scrollTo: t }]) => {
|
|
6752
6752
|
const n = We(), r = We(), o = We(), s = Z(!1), i = Z(void 0);
|
|
6753
|
-
return
|
|
6753
|
+
return ye(
|
|
6754
6754
|
V(
|
|
6755
6755
|
gt(n, r),
|
|
6756
6756
|
ue(([{ scrollHeight: a, scrollTop: l, viewportHeight: c }, { offsetTop: d }]) => ({
|
|
@@ -6760,7 +6760,7 @@ const bv = (e, t) => typeof e == "function" ? Cc(e(t)) : t && Cc(e), Sv = Ke(
|
|
|
6760
6760
|
}))
|
|
6761
6761
|
),
|
|
6762
6762
|
e
|
|
6763
|
-
),
|
|
6763
|
+
), ye(
|
|
6764
6764
|
V(
|
|
6765
6765
|
t,
|
|
6766
6766
|
Le(r),
|
|
@@ -6789,7 +6789,7 @@ const bv = (e, t) => typeof e == "function" ? Cc(e(t)) : t && Cc(e), Sv = Ke(
|
|
|
6789
6789
|
{ useWindowScroll: i, windowScrollContainerState: a, windowViewportRect: l }
|
|
6790
6790
|
]) => {
|
|
6791
6791
|
const c = We(), d = Z(void 0), f = Z(null), h = Z(null);
|
|
6792
|
-
return
|
|
6792
|
+
return ye(a, f), ye(l, h), Je(
|
|
6793
6793
|
V(
|
|
6794
6794
|
c,
|
|
6795
6795
|
Le(t, r, i, f, h, n)
|
|
@@ -6798,7 +6798,7 @@ const bv = (e, t) => typeof e == "function" ? Cc(e(t)) : t && Cc(e), Sv = Ke(
|
|
|
6798
6798
|
const T = lv(y.sizeTree);
|
|
6799
6799
|
m && x !== null && w !== null && (v = x.scrollTop - w.offsetTop), v -= b, p({ ranges: T, scrollTop: v });
|
|
6800
6800
|
}
|
|
6801
|
-
),
|
|
6801
|
+
), ye(V(d, Ee($a), ue(Rv)), o), ye(
|
|
6802
6802
|
V(
|
|
6803
6803
|
s,
|
|
6804
6804
|
Le(d),
|
|
@@ -6819,7 +6819,7 @@ function Rv(e) {
|
|
|
6819
6819
|
}
|
|
6820
6820
|
const Ev = Ke(([{ topItemsIndexes: e }]) => {
|
|
6821
6821
|
const t = Z(0);
|
|
6822
|
-
return
|
|
6822
|
+
return ye(
|
|
6823
6823
|
V(
|
|
6824
6824
|
t,
|
|
6825
6825
|
Ee((n) => n >= 0),
|
|
@@ -6872,7 +6872,7 @@ const Iv = kd(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
6872
6872
|
Bn(1)
|
|
6873
6873
|
),
|
|
6874
6874
|
m
|
|
6875
|
-
),
|
|
6875
|
+
), ye(
|
|
6876
6876
|
V(
|
|
6877
6877
|
f,
|
|
6878
6878
|
ue((x) => ({ top: -x }))
|
|
@@ -6976,7 +6976,7 @@ const Iv = kd(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
6976
6976
|
{ topItemCount: k },
|
|
6977
6977
|
{ groupCounts: _ },
|
|
6978
6978
|
j
|
|
6979
|
-
]) => (
|
|
6979
|
+
]) => (ye(T.rangeChanged, j.scrollSeekRangeChanged), ye(
|
|
6980
6980
|
V(
|
|
6981
6981
|
j.windowViewportRect,
|
|
6982
6982
|
ue((N) => N.visibleHeight)
|
|
@@ -7590,7 +7590,7 @@ const nw = /* @__PURE__ */ Ke(
|
|
|
7590
7590
|
Me(t, [0, 0]), Me(X, !0);
|
|
7591
7591
|
});
|
|
7592
7592
|
}
|
|
7593
|
-
),
|
|
7593
|
+
), ye(
|
|
7594
7594
|
V(
|
|
7595
7595
|
re,
|
|
7596
7596
|
Ee((M) => M != null && M.scrollTop > 0),
|
|
@@ -7608,19 +7608,19 @@ const nw = /* @__PURE__ */ Ke(
|
|
|
7608
7608
|
Me(K, !1);
|
|
7609
7609
|
}), Me(l, { top: M.scrollTop })));
|
|
7610
7610
|
}
|
|
7611
|
-
),
|
|
7611
|
+
), ye(
|
|
7612
7612
|
V(
|
|
7613
7613
|
j,
|
|
7614
7614
|
ue(({ height: M }) => M)
|
|
7615
7615
|
),
|
|
7616
7616
|
f
|
|
7617
|
-
),
|
|
7617
|
+
), ye(
|
|
7618
7618
|
V(
|
|
7619
7619
|
gt(
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7620
|
+
ke(j, zo),
|
|
7621
|
+
ke(N, zo),
|
|
7622
|
+
ke(B, (M, ee) => M && M.column === ee.column && M.row === ee.row),
|
|
7623
|
+
ke(c)
|
|
7624
7624
|
),
|
|
7625
7625
|
ue(([M, ee, ne, de]) => ({
|
|
7626
7626
|
gap: ne,
|
|
@@ -7630,19 +7630,19 @@ const nw = /* @__PURE__ */ Ke(
|
|
|
7630
7630
|
}))
|
|
7631
7631
|
),
|
|
7632
7632
|
W
|
|
7633
|
-
),
|
|
7633
|
+
), ye(
|
|
7634
7634
|
V(
|
|
7635
7635
|
gt(
|
|
7636
|
-
|
|
7636
|
+
ke(C),
|
|
7637
7637
|
r,
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7638
|
+
ke(B, tw),
|
|
7639
|
+
ke(N, zo),
|
|
7640
|
+
ke(j, zo),
|
|
7641
|
+
ke(P),
|
|
7642
|
+
ke(k),
|
|
7643
|
+
ke(K),
|
|
7644
|
+
ke(X),
|
|
7645
|
+
ke(H)
|
|
7646
7646
|
),
|
|
7647
7647
|
Ee(([, , , , , , , M]) => !M),
|
|
7648
7648
|
ue(
|
|
@@ -7666,22 +7666,22 @@ const nw = /* @__PURE__ */ Ke(
|
|
|
7666
7666
|
return ew(Ac(Tt, $t, qe));
|
|
7667
7667
|
}
|
|
7668
7668
|
const vt = Md(yt, mt, st);
|
|
7669
|
-
let oe,
|
|
7670
|
-
Oe ? ee === 0 && ne === 0 && Ze > 0 ? (oe = 0,
|
|
7671
|
-
const ce = Ac(oe,
|
|
7669
|
+
let oe, ve;
|
|
7670
|
+
Oe ? ee === 0 && ne === 0 && Ze > 0 ? (oe = 0, ve = Ze - 1) : (oe = vt * gs((ee + Ve) / (_e + Ve)), ve = vt * Ec((ne + Ve) / (_e + Ve)) - 1, ve = ji(M - 1, lo(ve, vt - 1)), oe = ji(ve, lo(0, oe))) : (oe = 0, ve = -1);
|
|
7671
|
+
const ce = Ac(oe, ve, qe), { bottom: $e, top: nt } = Nc(ie, de, ae, ce), Ge = Ec(M / vt), Mt = Ge * _e + (Ge - 1) * Ve - $e;
|
|
7672
7672
|
return { bottom: $e, itemHeight: _e, items: ce, itemWidth: mt, offsetBottom: Mt, offsetTop: nt, top: nt };
|
|
7673
7673
|
}
|
|
7674
7674
|
)
|
|
7675
7675
|
),
|
|
7676
7676
|
_
|
|
7677
|
-
),
|
|
7677
|
+
), ye(
|
|
7678
7678
|
V(
|
|
7679
7679
|
P,
|
|
7680
7680
|
Ee((M) => M !== null),
|
|
7681
7681
|
ue((M) => M.length)
|
|
7682
7682
|
),
|
|
7683
7683
|
C
|
|
7684
|
-
),
|
|
7684
|
+
), ye(
|
|
7685
7685
|
V(
|
|
7686
7686
|
gt(j, N, _, B),
|
|
7687
7687
|
Ee(([M, ee, { items: ne }]) => ne.length > 0 && ee.height !== 0 && M.height !== 0),
|
|
@@ -7694,7 +7694,7 @@ const nw = /* @__PURE__ */ Ke(
|
|
|
7694
7694
|
t
|
|
7695
7695
|
);
|
|
7696
7696
|
const pe = Z(!1);
|
|
7697
|
-
|
|
7697
|
+
ye(
|
|
7698
7698
|
V(
|
|
7699
7699
|
c,
|
|
7700
7700
|
Le(pe),
|
|
@@ -7714,16 +7714,16 @@ const nw = /* @__PURE__ */ Ke(
|
|
|
7714
7714
|
ue(([[, M]]) => M - 1),
|
|
7715
7715
|
rt()
|
|
7716
7716
|
)
|
|
7717
|
-
),
|
|
7717
|
+
), Ce = Gt(
|
|
7718
7718
|
V(
|
|
7719
|
-
|
|
7719
|
+
ke(_),
|
|
7720
7720
|
Ee(({ items: M }) => M.length > 0 && M[0].index === 0),
|
|
7721
7721
|
En(0),
|
|
7722
7722
|
rt()
|
|
7723
7723
|
)
|
|
7724
7724
|
), Se = Gt(
|
|
7725
7725
|
V(
|
|
7726
|
-
|
|
7726
|
+
ke(_),
|
|
7727
7727
|
Le(K),
|
|
7728
7728
|
Ee(([{ items: M }, ee]) => M.length > 0 && !ee),
|
|
7729
7729
|
ue(([{ items: M }]) => ({
|
|
@@ -7734,7 +7734,7 @@ const nw = /* @__PURE__ */ Ke(
|
|
|
7734
7734
|
Bn(0)
|
|
7735
7735
|
)
|
|
7736
7736
|
);
|
|
7737
|
-
|
|
7737
|
+
ye(Se, p.scrollSeekRangeChanged), ye(
|
|
7738
7738
|
V(
|
|
7739
7739
|
z,
|
|
7740
7740
|
Le(j, N, C, B),
|
|
@@ -7755,7 +7755,7 @@ const nw = /* @__PURE__ */ Ke(
|
|
|
7755
7755
|
),
|
|
7756
7756
|
0
|
|
7757
7757
|
);
|
|
7758
|
-
return
|
|
7758
|
+
return ye(
|
|
7759
7759
|
V(
|
|
7760
7760
|
T,
|
|
7761
7761
|
ue((M) => ({ height: M.visibleHeight, width: M.visibleWidth }))
|
|
@@ -7797,7 +7797,7 @@ const nw = /* @__PURE__ */ Ke(
|
|
|
7797
7797
|
endReached: me,
|
|
7798
7798
|
propsReady: v,
|
|
7799
7799
|
rangeChanged: Se,
|
|
7800
|
-
startReached:
|
|
7800
|
+
startReached: Ce,
|
|
7801
7801
|
stateChanged: W,
|
|
7802
7802
|
stateRestoreInProgress: K,
|
|
7803
7803
|
...S
|
|
@@ -7828,7 +7828,7 @@ const rw = /* @__PURE__ */ Ke(() => {
|
|
|
7828
7828
|
),
|
|
7829
7829
|
h
|
|
7830
7830
|
), c = Z(!1), d = Z(!1);
|
|
7831
|
-
return
|
|
7831
|
+
return ye(ke(d), c), {
|
|
7832
7832
|
components: t,
|
|
7833
7833
|
computeItemKey: s,
|
|
7834
7834
|
context: n,
|
|
@@ -8184,7 +8184,7 @@ var vw = [
|
|
|
8184
8184
|
"span",
|
|
8185
8185
|
"svg",
|
|
8186
8186
|
"ul"
|
|
8187
|
-
],
|
|
8187
|
+
], Ie = vw.reduce((e, t) => {
|
|
8188
8188
|
const n = Fr(`Primitive.${t}`), r = g.forwardRef((o, s) => {
|
|
8189
8189
|
const { asChild: i, ...a } = o, l = i ? n : t;
|
|
8190
8190
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u.jsx(l, { ...a, ref: s });
|
|
@@ -8267,7 +8267,7 @@ function _n(e) {
|
|
|
8267
8267
|
n((r) => r ?? String(Tw++));
|
|
8268
8268
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
8269
8269
|
}
|
|
8270
|
-
var Ks = "Collapsible", [kw,
|
|
8270
|
+
var Ks = "Collapsible", [kw, dR] = Mn(Ks), [Rw, Za] = kw(Ks), $d = g.forwardRef(
|
|
8271
8271
|
(e, t) => {
|
|
8272
8272
|
const {
|
|
8273
8273
|
__scopeCollapsible: n,
|
|
@@ -8291,7 +8291,7 @@ var Ks = "Collapsible", [kw, fR] = Mn(Ks), [Rw, Za] = kw(Ks), $d = g.forwardRef(
|
|
|
8291
8291
|
open: l,
|
|
8292
8292
|
onOpenToggle: g.useCallback(() => c((d) => !d), [c]),
|
|
8293
8293
|
children: /* @__PURE__ */ u.jsx(
|
|
8294
|
-
|
|
8294
|
+
Ie.div,
|
|
8295
8295
|
{
|
|
8296
8296
|
"data-state": el(l),
|
|
8297
8297
|
"data-disabled": s ? "" : void 0,
|
|
@@ -8308,7 +8308,7 @@ var zd = "CollapsibleTrigger", Bd = g.forwardRef(
|
|
|
8308
8308
|
(e, t) => {
|
|
8309
8309
|
const { __scopeCollapsible: n, ...r } = e, o = Za(zd, n);
|
|
8310
8310
|
return /* @__PURE__ */ u.jsx(
|
|
8311
|
-
|
|
8311
|
+
Ie.button,
|
|
8312
8312
|
{
|
|
8313
8313
|
type: "button",
|
|
8314
8314
|
"aria-controls": o.contentId,
|
|
@@ -8347,7 +8347,7 @@ var Iw = g.forwardRef((e, t) => {
|
|
|
8347
8347
|
f.current = b.height, p.current = b.width, m.current || (w.style.transitionDuration = x.current.transitionDuration, w.style.animationName = x.current.animationName), l(r);
|
|
8348
8348
|
}
|
|
8349
8349
|
}, [i.open, r]), /* @__PURE__ */ u.jsx(
|
|
8350
|
-
|
|
8350
|
+
Ie.div,
|
|
8351
8351
|
{
|
|
8352
8352
|
"data-state": el(i.open),
|
|
8353
8353
|
"data-disabled": i.disabled ? "" : void 0,
|
|
@@ -10193,7 +10193,7 @@ var rb = "DismissableLayer", ha = "dismissableLayer.update", ob = "dismissableLa
|
|
|
10193
10193
|
const k = () => p({});
|
|
10194
10194
|
return document.addEventListener(ha, k), () => document.removeEventListener(ha, k);
|
|
10195
10195
|
}, []), /* @__PURE__ */ u.jsx(
|
|
10196
|
-
|
|
10196
|
+
Ie.div,
|
|
10197
10197
|
{
|
|
10198
10198
|
...l,
|
|
10199
10199
|
ref: y,
|
|
@@ -10220,7 +10220,7 @@ var ib = "DismissableLayerBranch", ab = g.forwardRef((e, t) => {
|
|
|
10220
10220
|
return n.branches.add(s), () => {
|
|
10221
10221
|
n.branches.delete(s);
|
|
10222
10222
|
};
|
|
10223
|
-
}, [n.branches]), /* @__PURE__ */ u.jsx(
|
|
10223
|
+
}, [n.branches]), /* @__PURE__ */ u.jsx(Ie.div, { ...e, ref: o });
|
|
10224
10224
|
});
|
|
10225
10225
|
ab.displayName = ib;
|
|
10226
10226
|
function lb(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
@@ -10339,7 +10339,7 @@ var Mi = "focusScope.autoFocusOnMount", Di = "focusScope.autoFocusOnUnmount", Uc
|
|
|
10339
10339
|
},
|
|
10340
10340
|
[n, r, p.paused]
|
|
10341
10341
|
);
|
|
10342
|
-
return /* @__PURE__ */ u.jsx(
|
|
10342
|
+
return /* @__PURE__ */ u.jsx(Ie.div, { tabIndex: -1, ...i, ref: h, onKeyDown: y });
|
|
10343
10343
|
});
|
|
10344
10344
|
Gs.displayName = ub;
|
|
10345
10345
|
function db(e, { select: t = !1 } = {}) {
|
|
@@ -10409,7 +10409,7 @@ var xb = "Portal", Ys = g.forwardRef((e, t) => {
|
|
|
10409
10409
|
const { container: n, ...r } = e, [o, s] = g.useState(!1);
|
|
10410
10410
|
Ct(() => s(!0), []);
|
|
10411
10411
|
const i = n || o && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
|
|
10412
|
-
return i ? wu.createPortal(/* @__PURE__ */ u.jsx(
|
|
10412
|
+
return i ? wu.createPortal(/* @__PURE__ */ u.jsx(Ie.div, { ...r, ref: t }), i) : null;
|
|
10413
10413
|
});
|
|
10414
10414
|
Ys.displayName = xb;
|
|
10415
10415
|
var Li = 0;
|
|
@@ -10452,7 +10452,7 @@ function Fi(e, t) {
|
|
|
10452
10452
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
10453
10453
|
}
|
|
10454
10454
|
function bb(e, t) {
|
|
10455
|
-
var n =
|
|
10455
|
+
var n = xe(function() {
|
|
10456
10456
|
return {
|
|
10457
10457
|
// value
|
|
10458
10458
|
value: e,
|
|
@@ -10945,7 +10945,7 @@ var e0 = function(e) {
|
|
|
10945
10945
|
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), n0(r, o, n, "aria-hidden")) : function() {
|
|
10946
10946
|
return null;
|
|
10947
10947
|
};
|
|
10948
|
-
}, Zs = "Dialog", [df,
|
|
10948
|
+
}, Zs = "Dialog", [df, fR] = Mn(Zs), [r0, xn] = df(Zs), ff = (e) => {
|
|
10949
10949
|
const {
|
|
10950
10950
|
__scopeDialog: t,
|
|
10951
10951
|
children: n,
|
|
@@ -10981,7 +10981,7 @@ var hf = "DialogTrigger", pf = g.forwardRef(
|
|
|
10981
10981
|
(e, t) => {
|
|
10982
10982
|
const { __scopeDialog: n, ...r } = e, o = xn(hf, n), s = He(t, o.triggerRef);
|
|
10983
10983
|
return /* @__PURE__ */ u.jsx(
|
|
10984
|
-
|
|
10984
|
+
Ie.button,
|
|
10985
10985
|
{
|
|
10986
10986
|
type: "button",
|
|
10987
10987
|
"aria-haspopup": "dialog",
|
|
@@ -11017,7 +11017,7 @@ var s0 = Fr("DialogOverlay.RemoveScroll"), i0 = g.forwardRef(
|
|
|
11017
11017
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
11018
11018
|
// ie. when `Overlay` and `Content` are siblings
|
|
11019
11019
|
/* @__PURE__ */ u.jsx(Js, { as: s0, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ u.jsx(
|
|
11020
|
-
|
|
11020
|
+
Ie.div,
|
|
11021
11021
|
{
|
|
11022
11022
|
"data-state": ll(o.open),
|
|
11023
11023
|
...r,
|
|
@@ -11121,14 +11121,14 @@ var a0 = g.forwardRef(
|
|
|
11121
11121
|
), al = "DialogTitle", wf = g.forwardRef(
|
|
11122
11122
|
(e, t) => {
|
|
11123
11123
|
const { __scopeDialog: n, ...r } = e, o = xn(al, n);
|
|
11124
|
-
return /* @__PURE__ */ u.jsx(
|
|
11124
|
+
return /* @__PURE__ */ u.jsx(Ie.h2, { id: o.titleId, ...r, ref: t });
|
|
11125
11125
|
}
|
|
11126
11126
|
);
|
|
11127
11127
|
wf.displayName = al;
|
|
11128
11128
|
var bf = "DialogDescription", Sf = g.forwardRef(
|
|
11129
11129
|
(e, t) => {
|
|
11130
11130
|
const { __scopeDialog: n, ...r } = e, o = xn(bf, n);
|
|
11131
|
-
return /* @__PURE__ */ u.jsx(
|
|
11131
|
+
return /* @__PURE__ */ u.jsx(Ie.p, { id: o.descriptionId, ...r, ref: t });
|
|
11132
11132
|
}
|
|
11133
11133
|
);
|
|
11134
11134
|
Sf.displayName = bf;
|
|
@@ -11136,7 +11136,7 @@ var Cf = "DialogClose", Tf = g.forwardRef(
|
|
|
11136
11136
|
(e, t) => {
|
|
11137
11137
|
const { __scopeDialog: n, ...r } = e, o = xn(Cf, n);
|
|
11138
11138
|
return /* @__PURE__ */ u.jsx(
|
|
11139
|
-
|
|
11139
|
+
Ie.button,
|
|
11140
11140
|
{
|
|
11141
11141
|
type: "button",
|
|
11142
11142
|
...r,
|
|
@@ -11150,7 +11150,7 @@ Tf.displayName = Cf;
|
|
|
11150
11150
|
function ll(e) {
|
|
11151
11151
|
return e ? "open" : "closed";
|
|
11152
11152
|
}
|
|
11153
|
-
var kf = "DialogTitleWarning", [
|
|
11153
|
+
var kf = "DialogTitleWarning", [hR, Rf] = pw(kf, {
|
|
11154
11154
|
contentName: vr,
|
|
11155
11155
|
titleName: al,
|
|
11156
11156
|
docsSlug: "dialog"
|
|
@@ -11259,7 +11259,7 @@ const m0 = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
11259
11259
|
));
|
|
11260
11260
|
m0.displayName = ti.displayName;
|
|
11261
11261
|
function g0({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
|
|
11262
|
-
const [s, i] =
|
|
11262
|
+
const [s, i] = xe(!1), [a, l] = xe(null), [c, d] = xe(null), { toast: f } = rl(), h = U.useCallback(async () => {
|
|
11263
11263
|
if (n) {
|
|
11264
11264
|
i(!0), d(null), l(null);
|
|
11265
11265
|
try {
|
|
@@ -11502,7 +11502,7 @@ function Qc(e) {
|
|
|
11502
11502
|
return `${e.id}:${t}:${n}`;
|
|
11503
11503
|
}
|
|
11504
11504
|
function T0({ className: e }) {
|
|
11505
|
-
const [t, n] =
|
|
11505
|
+
const [t, n] = xe(0);
|
|
11506
11506
|
return ct(() => {
|
|
11507
11507
|
const r = setInterval(() => n((o) => (o + 1) % 4), 500);
|
|
11508
11508
|
return () => clearInterval(r);
|
|
@@ -11540,7 +11540,7 @@ const k0 = U.memo(function({
|
|
|
11540
11540
|
onInterruptActionStart: b,
|
|
11541
11541
|
onInterruptActionEnd: T
|
|
11542
11542
|
}) {
|
|
11543
|
-
const [S, C] =
|
|
11543
|
+
const [S, C] = xe(!1), [k, _] = xe("preview"), [j, N] = xe(!1), { currentThreadId: z } = La(), { respondToInterrupt: F } = Fa(), D = l === "phone" || l === "half-screen", P = t.role, B = P === "tool", W = !(r && P !== "user"), {
|
|
11544
11544
|
uploadingFiles: re,
|
|
11545
11545
|
handleFileClick: K,
|
|
11546
11546
|
fileViewerOpen: H,
|
|
@@ -11559,7 +11559,7 @@ const k0 = U.memo(function({
|
|
|
11559
11559
|
default:
|
|
11560
11560
|
return "text-[hsl(var(--chat-bubble-ai-text))]";
|
|
11561
11561
|
}
|
|
11562
|
-
}, [P]), pe = tt(() => v0(t.content), [t.content]), me = tt(() => w0(t.content), [t.content]),
|
|
11562
|
+
}, [P]), pe = tt(() => v0(t.content), [t.content]), me = tt(() => w0(t.content), [t.content]), Ce = tt(
|
|
11563
11563
|
() => t.content.filter((oe) => oe.type === "image_url"),
|
|
11564
11564
|
[t.content]
|
|
11565
11565
|
), Se = tt(
|
|
@@ -11570,7 +11570,7 @@ const k0 = U.memo(function({
|
|
|
11570
11570
|
[t.content]
|
|
11571
11571
|
), M = (x == null ? void 0 : x.id) ?? (x == null ? void 0 : x.interrupt_id), ee = qo(M), ne = x == null ? void 0 : x.value, de = tt(() => S0(t.content), [t.content]), ae = U.useCallback(async () => {
|
|
11572
11572
|
const oe = B ? de : pe;
|
|
11573
|
-
async function
|
|
11573
|
+
async function ve(ce) {
|
|
11574
11574
|
if (navigator.clipboard && typeof navigator.clipboard.writeText == "function") {
|
|
11575
11575
|
await navigator.clipboard.writeText(ce);
|
|
11576
11576
|
return;
|
|
@@ -11587,7 +11587,7 @@ const k0 = U.memo(function({
|
|
|
11587
11587
|
throw new Error("Clipboard API not supported in this context.");
|
|
11588
11588
|
}
|
|
11589
11589
|
try {
|
|
11590
|
-
await
|
|
11590
|
+
await ve(oe), C(!0), setTimeout(() => C(!1), 2e3), m == null || m(oe);
|
|
11591
11591
|
} catch (ce) {
|
|
11592
11592
|
console.error("Failed to copy:", ce);
|
|
11593
11593
|
}
|
|
@@ -11598,16 +11598,16 @@ const k0 = U.memo(function({
|
|
|
11598
11598
|
}, [p, t.id, B, de, pe]), qe = U.useCallback(() => {
|
|
11599
11599
|
y == null || y(n);
|
|
11600
11600
|
}, [y, n]), Ze = U.useCallback(() => {
|
|
11601
|
-
const
|
|
11601
|
+
const ve = se(D ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", q);
|
|
11602
11602
|
switch (P) {
|
|
11603
11603
|
case "user":
|
|
11604
|
-
return /* @__PURE__ */ u.jsx(Fm, { className:
|
|
11604
|
+
return /* @__PURE__ */ u.jsx(Fm, { className: ve });
|
|
11605
11605
|
case "assistant":
|
|
11606
|
-
return /* @__PURE__ */ u.jsx(Pl, { className:
|
|
11606
|
+
return /* @__PURE__ */ u.jsx(Pl, { className: ve });
|
|
11607
11607
|
case "tool":
|
|
11608
|
-
return /* @__PURE__ */ u.jsx(Lm, { className:
|
|
11608
|
+
return /* @__PURE__ */ u.jsx(Lm, { className: ve });
|
|
11609
11609
|
default:
|
|
11610
|
-
return /* @__PURE__ */ u.jsx(Pl, { className:
|
|
11610
|
+
return /* @__PURE__ */ u.jsx(Pl, { className: ve });
|
|
11611
11611
|
}
|
|
11612
11612
|
}, [D, q, P]), Oe = U.useCallback(() => {
|
|
11613
11613
|
const oe = "group relative mb-4 flex w-full";
|
|
@@ -11656,15 +11656,15 @@ const k0 = U.memo(function({
|
|
|
11656
11656
|
}, [D, P]), st = U.useCallback(async (oe) => {
|
|
11657
11657
|
if (w)
|
|
11658
11658
|
return;
|
|
11659
|
-
const
|
|
11659
|
+
const ve = qo(
|
|
11660
11660
|
(oe == null ? void 0 : oe.id) ?? (oe == null ? void 0 : oe.interrupt_id)
|
|
11661
11661
|
);
|
|
11662
|
-
if (!
|
|
11662
|
+
if (!ve) {
|
|
11663
11663
|
console.warn("Interrupt part missing id", oe);
|
|
11664
11664
|
return;
|
|
11665
11665
|
}
|
|
11666
11666
|
try {
|
|
11667
|
-
b == null || b(), await F(
|
|
11667
|
+
b == null || b(), await F(ve, !0);
|
|
11668
11668
|
} catch (ce) {
|
|
11669
11669
|
console.error("Failed to approve interrupt:", ce);
|
|
11670
11670
|
} finally {
|
|
@@ -11673,24 +11673,24 @@ const k0 = U.memo(function({
|
|
|
11673
11673
|
}, [w, T, b, F]), Ve = U.useCallback(async (oe) => {
|
|
11674
11674
|
if (w)
|
|
11675
11675
|
return;
|
|
11676
|
-
const
|
|
11676
|
+
const ve = qo(
|
|
11677
11677
|
(oe == null ? void 0 : oe.id) ?? (oe == null ? void 0 : oe.interrupt_id)
|
|
11678
11678
|
);
|
|
11679
|
-
if (!
|
|
11679
|
+
if (!ve) {
|
|
11680
11680
|
console.warn("Interrupt part missing id", oe);
|
|
11681
11681
|
return;
|
|
11682
11682
|
}
|
|
11683
11683
|
try {
|
|
11684
|
-
b == null || b(), await F(
|
|
11684
|
+
b == null || b(), await F(ve, !1);
|
|
11685
11685
|
} catch (ce) {
|
|
11686
11686
|
console.error("Failed to reject interrupt:", ce);
|
|
11687
11687
|
} finally {
|
|
11688
11688
|
T == null || T();
|
|
11689
11689
|
}
|
|
11690
|
-
}, [w, T, b, F]), _e = U.useCallback(({ part: oe, i:
|
|
11690
|
+
}, [w, T, b, F]), _e = U.useCallback(({ part: oe, i: ve }) => {
|
|
11691
11691
|
if (oe.type === "text") {
|
|
11692
11692
|
const ce = oe.text ?? "", $e = ce.trim(), nt = x0($e);
|
|
11693
|
-
return nt && P !== "tool" ? /* @__PURE__ */ u.jsx(R0, { data: nt },
|
|
11693
|
+
return nt && P !== "tool" ? /* @__PURE__ */ u.jsx(R0, { data: nt }, ve) : P === "user" && c && $e.length > d ? /* @__PURE__ */ u.jsx(
|
|
11694
11694
|
A0,
|
|
11695
11695
|
{
|
|
11696
11696
|
text: $e,
|
|
@@ -11699,8 +11699,8 @@ const k0 = U.memo(function({
|
|
|
11699
11699
|
previewLength: d,
|
|
11700
11700
|
isCompact: D
|
|
11701
11701
|
},
|
|
11702
|
-
|
|
11703
|
-
) : /* @__PURE__ */ u.jsx(Jd, { content: ce, allowHtml: !1 },
|
|
11702
|
+
ve
|
|
11703
|
+
) : /* @__PURE__ */ u.jsx(Jd, { content: ce, allowHtml: !1 }, ve);
|
|
11704
11704
|
}
|
|
11705
11705
|
if (oe.type === "image_url") {
|
|
11706
11706
|
const ce = oe;
|
|
@@ -11712,7 +11712,7 @@ const k0 = U.memo(function({
|
|
|
11712
11712
|
loading: "lazy",
|
|
11713
11713
|
className: "border rounded max-h-[420px] w-auto object-contain"
|
|
11714
11714
|
}
|
|
11715
|
-
) },
|
|
11715
|
+
) }, ve);
|
|
11716
11716
|
}
|
|
11717
11717
|
if (oe.type === "file") {
|
|
11718
11718
|
const ce = oe, $e = ce.name || "file";
|
|
@@ -11720,18 +11720,18 @@ const k0 = U.memo(function({
|
|
|
11720
11720
|
"a",
|
|
11721
11721
|
{
|
|
11722
11722
|
href: ce.url,
|
|
11723
|
-
onClick: (nt) => K(nt, ce,
|
|
11723
|
+
onClick: (nt) => K(nt, ce, ve),
|
|
11724
11724
|
className: `inline-flex items-center gap-2 rounded px-2 py-1 text-xs bg-gray-100 border hover:bg-gray-200
|
|
11725
11725
|
dark:bg-background/10 dark:border-border/30 dark:hover:bg-background/20`,
|
|
11726
11726
|
children: [
|
|
11727
|
-
re[
|
|
11727
|
+
re[ve] ? /* @__PURE__ */ u.jsx(yu, { className: "h-4 w-4 animate-spin" }) : null,
|
|
11728
11728
|
/* @__PURE__ */ u.jsxs("span", { className: "truncate max-w-[180px]", children: [
|
|
11729
11729
|
$e,
|
|
11730
|
-
re[
|
|
11730
|
+
re[ve] ? " (processing)" : ""
|
|
11731
11731
|
] })
|
|
11732
11732
|
]
|
|
11733
11733
|
},
|
|
11734
|
-
|
|
11734
|
+
ve
|
|
11735
11735
|
);
|
|
11736
11736
|
}
|
|
11737
11737
|
if (oe.type === "interrupt") {
|
|
@@ -11748,7 +11748,7 @@ const k0 = U.memo(function({
|
|
|
11748
11748
|
isActive: nt,
|
|
11749
11749
|
payload: Ge
|
|
11750
11750
|
},
|
|
11751
|
-
|
|
11751
|
+
ve
|
|
11752
11752
|
);
|
|
11753
11753
|
}
|
|
11754
11754
|
return null;
|
|
@@ -11771,7 +11771,7 @@ const k0 = U.memo(function({
|
|
|
11771
11771
|
/* @__PURE__ */ u.jsx(Ki, { className: "h-4 w-4 text-muted-foreground" }),
|
|
11772
11772
|
/* @__PURE__ */ u.jsx("span", { className: "text-sm text-muted-foreground", children: "File upload" })
|
|
11773
11773
|
] }), []), yt = U.useCallback(() => {
|
|
11774
|
-
const oe = pe.trim().length > 0 ||
|
|
11774
|
+
const oe = pe.trim().length > 0 || Ce.length > 0 || Se.length > 0 || J.length > 0;
|
|
11775
11775
|
if (!B && !oe && !r)
|
|
11776
11776
|
return mt();
|
|
11777
11777
|
if (B)
|
|
@@ -11784,15 +11784,15 @@ const k0 = U.memo(function({
|
|
|
11784
11784
|
t.id
|
|
11785
11785
|
);
|
|
11786
11786
|
if (!B) {
|
|
11787
|
-
const
|
|
11787
|
+
const ve = /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: t.content.map((ce, $e) => /* @__PURE__ */ u.jsx(_e, { part: ce, i: $e }, $e)) });
|
|
11788
11788
|
return r ? /* @__PURE__ */ u.jsxs("div", { "aria-busy": "true", role: "status", children: [
|
|
11789
|
-
|
|
11789
|
+
ve,
|
|
11790
11790
|
/* @__PURE__ */ u.jsx(T0, { className: q })
|
|
11791
|
-
] }) :
|
|
11791
|
+
] }) : ve;
|
|
11792
11792
|
}
|
|
11793
11793
|
}, [
|
|
11794
11794
|
pe,
|
|
11795
|
-
|
|
11795
|
+
Ce.length,
|
|
11796
11796
|
Se.length,
|
|
11797
11797
|
J.length,
|
|
11798
11798
|
r,
|
|
@@ -11831,7 +11831,7 @@ const k0 = U.memo(function({
|
|
|
11831
11831
|
"aria-expanded": k === "expanded",
|
|
11832
11832
|
onClick: () => _((oe) => oe === "expanded" ? "preview" : "expanded"),
|
|
11833
11833
|
onKeyDown: (oe) => {
|
|
11834
|
-
(oe.key === "Enter" || oe.key === " ") && (oe.preventDefault(), _((
|
|
11834
|
+
(oe.key === "Enter" || oe.key === " ") && (oe.preventDefault(), _((ve) => ve === "expanded" ? "preview" : "expanded"));
|
|
11835
11835
|
},
|
|
11836
11836
|
children: [
|
|
11837
11837
|
/* @__PURE__ */ u.jsx("span", { children: me.name ?? "Tool Output" }),
|
|
@@ -12043,7 +12043,7 @@ function E0({
|
|
|
12043
12043
|
);
|
|
12044
12044
|
}
|
|
12045
12045
|
function I0(e) {
|
|
12046
|
-
const { allowFileOpen: t, currentThreadId: n } = e, { toast: r } = rl(), [o, s] =
|
|
12046
|
+
const { allowFileOpen: t, currentThreadId: n } = e, { toast: r } = rl(), [o, s] = xe({}), [i, a] = xe(null), [l, c] = xe(!1), d = U.useCallback(() => {
|
|
12047
12047
|
c(!1), a(null);
|
|
12048
12048
|
}, []), f = U.useCallback((p) => {
|
|
12049
12049
|
a(p), c(!0);
|
|
@@ -12178,7 +12178,7 @@ const eu = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, Mf = U.forwa
|
|
|
12178
12178
|
onInterruptActionEnd: S,
|
|
12179
12179
|
showToolMessages: C = !0
|
|
12180
12180
|
}, k) => {
|
|
12181
|
-
const _ = Ue(null), j = Ue(null), N = Ue(!1), [z, F] =
|
|
12181
|
+
const _ = Ue(null), j = Ue(null), N = Ue(!1), [z, F] = xe(!0), D = tt(() => w ? e.some(
|
|
12182
12182
|
(X) => Array.isArray(X == null ? void 0 : X.content) && X.content.some(
|
|
12183
12183
|
(L) => L && L.type === "interrupt" && (L.id ?? L.interrupt_id) === w.id
|
|
12184
12184
|
)
|
|
@@ -12205,7 +12205,7 @@ const eu = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, Mf = U.forwa
|
|
|
12205
12205
|
}
|
|
12206
12206
|
]
|
|
12207
12207
|
};
|
|
12208
|
-
}, [w, D]), B = tt(() => P ? [...e, P] : e, [e, P]), W = tt(() => C ? B : B.filter((X) => (X == null ? void 0 : X.role) !== "tool"), [B, C]), re =
|
|
12208
|
+
}, [w, D]), B = tt(() => P ? [...e, P] : e, [e, P]), W = tt(() => C ? B : B.filter((X) => (X == null ? void 0 : X.role) !== "tool"), [B, C]), re = Te((X) => {
|
|
12209
12209
|
F(X), m && m(!X), x && x(X);
|
|
12210
12210
|
}, [m, x]), K = tt(() => {
|
|
12211
12211
|
if (a)
|
|
@@ -13679,7 +13679,7 @@ const LS = (e) => {
|
|
|
13679
13679
|
var VS = "Arrow", qf = g.forwardRef((e, t) => {
|
|
13680
13680
|
const { children: n, width: r = 10, height: o = 5, ...s } = e;
|
|
13681
13681
|
return /* @__PURE__ */ u.jsx(
|
|
13682
|
-
|
|
13682
|
+
Ie.svg,
|
|
13683
13683
|
{
|
|
13684
13684
|
...s,
|
|
13685
13685
|
ref: t,
|
|
@@ -13726,7 +13726,7 @@ var Zf = "PopperAnchor", Qf = g.forwardRef(
|
|
|
13726
13726
|
return g.useEffect(() => {
|
|
13727
13727
|
const c = l.current;
|
|
13728
13728
|
l.current = (r == null ? void 0 : r.current) || i.current, c !== l.current && s.onAnchorChange(l.current);
|
|
13729
|
-
}), r ? null : /* @__PURE__ */ u.jsx(
|
|
13729
|
+
}), r ? null : /* @__PURE__ */ u.jsx(Ie.div, { ...o, ref: a });
|
|
13730
13730
|
}
|
|
13731
13731
|
);
|
|
13732
13732
|
Qf.displayName = Zf;
|
|
@@ -13787,7 +13787,7 @@ var xl = "PopperContent", [GS, YS] = Yf(xl), eh = g.forwardRef(
|
|
|
13787
13787
|
Ct(() => {
|
|
13788
13788
|
re && (L == null || L());
|
|
13789
13789
|
}, [re, L]);
|
|
13790
|
-
const q = (J = K.arrow) == null ? void 0 : J.x, pe = (M = K.arrow) == null ? void 0 : M.y, me = ((ee = K.arrow) == null ? void 0 : ee.centerOffset) !== 0, [
|
|
13790
|
+
const q = (J = K.arrow) == null ? void 0 : J.x, pe = (M = K.arrow) == null ? void 0 : M.y, me = ((ee = K.arrow) == null ? void 0 : ee.centerOffset) !== 0, [Ce, Se] = g.useState();
|
|
13791
13791
|
return Ct(() => {
|
|
13792
13792
|
x && Se(window.getComputedStyle(x).zIndex);
|
|
13793
13793
|
}, [x]), /* @__PURE__ */ u.jsx(
|
|
@@ -13800,7 +13800,7 @@ var xl = "PopperContent", [GS, YS] = Yf(xl), eh = g.forwardRef(
|
|
|
13800
13800
|
transform: re ? B.transform : "translate(0, -200%)",
|
|
13801
13801
|
// keep off the page when measuring
|
|
13802
13802
|
minWidth: "max-content",
|
|
13803
|
-
zIndex:
|
|
13803
|
+
zIndex: Ce,
|
|
13804
13804
|
"--radix-popper-transform-origin": [
|
|
13805
13805
|
(ne = K.transformOrigin) == null ? void 0 : ne.x,
|
|
13806
13806
|
(de = K.transformOrigin) == null ? void 0 : de.y
|
|
@@ -13824,7 +13824,7 @@ var xl = "PopperContent", [GS, YS] = Yf(xl), eh = g.forwardRef(
|
|
|
13824
13824
|
arrowY: pe,
|
|
13825
13825
|
shouldHideArrow: me,
|
|
13826
13826
|
children: /* @__PURE__ */ u.jsx(
|
|
13827
|
-
|
|
13827
|
+
Ie.div,
|
|
13828
13828
|
{
|
|
13829
13829
|
"data-side": H,
|
|
13830
13830
|
"data-align": X,
|
|
@@ -13964,7 +13964,7 @@ var oC = g.forwardRef((e, t) => {
|
|
|
13964
13964
|
[]
|
|
13965
13965
|
),
|
|
13966
13966
|
children: /* @__PURE__ */ u.jsx(
|
|
13967
|
-
|
|
13967
|
+
Ie.div,
|
|
13968
13968
|
{
|
|
13969
13969
|
tabIndex: x || C === 0 ? -1 : 0,
|
|
13970
13970
|
"data-orientation": r,
|
|
@@ -14013,7 +14013,7 @@ var oC = g.forwardRef((e, t) => {
|
|
|
14013
14013
|
focusable: r,
|
|
14014
14014
|
active: o,
|
|
14015
14015
|
children: /* @__PURE__ */ u.jsx(
|
|
14016
|
-
|
|
14016
|
+
Ie.span,
|
|
14017
14017
|
{
|
|
14018
14018
|
tabIndex: f ? 0 : -1,
|
|
14019
14019
|
"data-orientation": d.orientation,
|
|
@@ -14193,7 +14193,7 @@ var tn = "MenuContent", [bC, wl] = Rr(tn), wh = g.forwardRef(
|
|
|
14193
14193
|
...v
|
|
14194
14194
|
} = e, m = Er(tn, n), x = Mo(tn, n), w = li(n), b = gh(n), T = mC(n), [S, C] = g.useState(null), k = g.useRef(null), _ = He(t, k, m.onContentChange), j = g.useRef(0), N = g.useRef(""), z = g.useRef(0), F = g.useRef(null), D = g.useRef("right"), P = g.useRef(0), B = y ? Js : g.Fragment, W = y ? { as: TC, allowPinchZoom: !0 } : void 0, re = (H) => {
|
|
14195
14195
|
var J, M;
|
|
14196
|
-
const X = N.current + H, L = T().filter((ee) => !ee.disabled), q = document.activeElement, pe = (J = L.find((ee) => ee.ref.current === q)) == null ? void 0 : J.textValue, me = L.map((ee) => ee.textValue),
|
|
14196
|
+
const X = N.current + H, L = T().filter((ee) => !ee.disabled), q = document.activeElement, pe = (J = L.find((ee) => ee.ref.current === q)) == null ? void 0 : J.textValue, me = L.map((ee) => ee.textValue), Ce = DC(me, X, pe), Se = (M = L.find((ee) => ee.textValue === Ce)) == null ? void 0 : M.ref.current;
|
|
14197
14197
|
(function ee(ne) {
|
|
14198
14198
|
N.current = ne, window.clearTimeout(j.current), ne !== "" && (j.current = window.setTimeout(() => ee(""), 1e3));
|
|
14199
14199
|
})(X), Se && setTimeout(() => Se.focus());
|
|
@@ -14315,14 +14315,14 @@ wh.displayName = tn;
|
|
|
14315
14315
|
var kC = "MenuGroup", Sl = g.forwardRef(
|
|
14316
14316
|
(e, t) => {
|
|
14317
14317
|
const { __scopeMenu: n, ...r } = e;
|
|
14318
|
-
return /* @__PURE__ */ u.jsx(
|
|
14318
|
+
return /* @__PURE__ */ u.jsx(Ie.div, { role: "group", ...r, ref: t });
|
|
14319
14319
|
}
|
|
14320
14320
|
);
|
|
14321
14321
|
Sl.displayName = kC;
|
|
14322
14322
|
var RC = "MenuLabel", bh = g.forwardRef(
|
|
14323
14323
|
(e, t) => {
|
|
14324
14324
|
const { __scopeMenu: n, ...r } = e;
|
|
14325
|
-
return /* @__PURE__ */ u.jsx(
|
|
14325
|
+
return /* @__PURE__ */ u.jsx(Ie.div, { ...r, ref: t });
|
|
14326
14326
|
}
|
|
14327
14327
|
);
|
|
14328
14328
|
bh.displayName = RC;
|
|
@@ -14372,7 +14372,7 @@ var Sh = g.forwardRef(
|
|
|
14372
14372
|
disabled: r,
|
|
14373
14373
|
textValue: o ?? h,
|
|
14374
14374
|
children: /* @__PURE__ */ u.jsx(uC, { asChild: !0, ...a, focusable: !r, children: /* @__PURE__ */ u.jsx(
|
|
14375
|
-
|
|
14375
|
+
Ie.div,
|
|
14376
14376
|
{
|
|
14377
14377
|
role: "menuitem",
|
|
14378
14378
|
"data-highlighted": d ? "" : void 0,
|
|
@@ -14464,7 +14464,7 @@ var Cl = "MenuItemIndicator", [Ih, NC] = Rr(
|
|
|
14464
14464
|
{
|
|
14465
14465
|
present: r || Es(s.checked) || s.checked === !0,
|
|
14466
14466
|
children: /* @__PURE__ */ u.jsx(
|
|
14467
|
-
|
|
14467
|
+
Ie.span,
|
|
14468
14468
|
{
|
|
14469
14469
|
...o,
|
|
14470
14470
|
ref: t,
|
|
@@ -14480,7 +14480,7 @@ var _C = "MenuSeparator", Nh = g.forwardRef(
|
|
|
14480
14480
|
(e, t) => {
|
|
14481
14481
|
const { __scopeMenu: n, ...r } = e;
|
|
14482
14482
|
return /* @__PURE__ */ u.jsx(
|
|
14483
|
-
|
|
14483
|
+
Ie.div,
|
|
14484
14484
|
{
|
|
14485
14485
|
role: "separator",
|
|
14486
14486
|
"aria-orientation": "horizontal",
|
|
@@ -14498,7 +14498,7 @@ var jC = "MenuArrow", _h = g.forwardRef(
|
|
|
14498
14498
|
}
|
|
14499
14499
|
);
|
|
14500
14500
|
_h.displayName = jC;
|
|
14501
|
-
var PC = "MenuSub", [
|
|
14501
|
+
var PC = "MenuSub", [pR, jh] = Rr(PC), oo = "MenuSubTrigger", Ph = g.forwardRef(
|
|
14502
14502
|
(e, t) => {
|
|
14503
14503
|
const n = Er(oo, e.__scopeMenu), r = Mo(oo, e.__scopeMenu), o = jh(oo, e.__scopeMenu), s = wl(oo, e.__scopeMenu), i = g.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: l } = s, c = { __scopeMenu: e.__scopeMenu }, d = g.useCallback(() => {
|
|
14504
14504
|
i.current && window.clearTimeout(i.current), i.current = null;
|
|
@@ -14648,7 +14648,7 @@ function FC(e, t) {
|
|
|
14648
14648
|
function Co(e) {
|
|
14649
14649
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
14650
14650
|
}
|
|
14651
|
-
var $C = xh, zC = yl, BC = vh, HC = wh, UC = Sl, WC = bh, VC = ci, KC = Ch, qC = kh, GC = Eh, YC = Ah, XC = Nh, JC = _h, ZC = Ph, QC = Mh, ui = "DropdownMenu", [eT,
|
|
14651
|
+
var $C = xh, zC = yl, BC = vh, HC = wh, UC = Sl, WC = bh, VC = ci, KC = Ch, qC = kh, GC = Eh, YC = Ah, XC = Nh, JC = _h, ZC = Ph, QC = Mh, ui = "DropdownMenu", [eT, mR] = Mn(
|
|
14652
14652
|
ui,
|
|
14653
14653
|
[mh]
|
|
14654
14654
|
), Ft = mh(), [tT, Lh] = eT(ui), Fh = (e) => {
|
|
@@ -14686,7 +14686,7 @@ var $h = "DropdownMenuTrigger", zh = g.forwardRef(
|
|
|
14686
14686
|
(e, t) => {
|
|
14687
14687
|
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = Lh($h, n), i = Ft(n);
|
|
14688
14688
|
return /* @__PURE__ */ u.jsx(zC, { asChild: !0, ...i, children: /* @__PURE__ */ u.jsx(
|
|
14689
|
-
|
|
14689
|
+
Ie.button,
|
|
14690
14690
|
{
|
|
14691
14691
|
type: "button",
|
|
14692
14692
|
id: s.triggerId,
|
|
@@ -14935,23 +14935,6 @@ const ET = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
14935
14935
|
}
|
|
14936
14936
|
));
|
|
14937
14937
|
ET.displayName = op.displayName;
|
|
14938
|
-
function IT(e) {
|
|
14939
|
-
var t;
|
|
14940
|
-
if (!Array.isArray(e) || !e.length)
|
|
14941
|
-
return null;
|
|
14942
|
-
for (let n = e.length - 1; n >= 0; n--) {
|
|
14943
|
-
const r = ((t = e[n]) == null ? void 0 : t.content) ?? [];
|
|
14944
|
-
for (let o = 0; o < r.length; o++) {
|
|
14945
|
-
const s = r[o];
|
|
14946
|
-
if (s && s.type === "text" && typeof s.text == "string") {
|
|
14947
|
-
const i = s.text.trim();
|
|
14948
|
-
if (i)
|
|
14949
|
-
return i;
|
|
14950
|
-
}
|
|
14951
|
-
}
|
|
14952
|
-
}
|
|
14953
|
-
return null;
|
|
14954
|
-
}
|
|
14955
14938
|
function Vi({
|
|
14956
14939
|
className: e = "",
|
|
14957
14940
|
placeholder: t = "Type your message...",
|
|
@@ -14982,22 +14965,22 @@ function Vi({
|
|
|
14982
14965
|
checkpoints: N,
|
|
14983
14966
|
interrupt: z,
|
|
14984
14967
|
metadata: F
|
|
14985
|
-
} = Fa(), { isStreaming: D, error: P, submit: B, stop: W } = Fy(), re = x ?? m ?? null, K = (j == null ? void 0 : j.id) ?? null, H = (j == null ? void 0 : j.namespace) ?? null, X = (F == null ? void 0 : F.assemblingMessageId) ?? null, L = z, [q, pe] =
|
|
14968
|
+
} = Fa(), { isStreaming: D, error: P, submit: B, stop: W } = Fy(), re = x ?? m ?? null, K = (j == null ? void 0 : j.id) ?? null, H = (j == null ? void 0 : j.namespace) ?? null, X = (F == null ? void 0 : F.assemblingMessageId) ?? null, L = z, [q, pe] = xe(!1);
|
|
14986
14969
|
ct(() => {
|
|
14987
14970
|
L || pe(!1);
|
|
14988
14971
|
}, [L]);
|
|
14989
|
-
const me =
|
|
14972
|
+
const me = Te(() => {
|
|
14990
14973
|
pe(!0);
|
|
14991
|
-
}, []),
|
|
14974
|
+
}, []), Ce = Te(() => {
|
|
14992
14975
|
pe(!1);
|
|
14993
|
-
}, []), Se = !!L || q, [J, M] =
|
|
14976
|
+
}, []), Se = !!L || q, [J, M] = xe(null), [ee, ne] = xe(""), [de, ae] = xe(null), [ie, qe] = xe([]), [Ze, Oe] = xe(0), [Be, st] = xe(0), [Ve, _e] = xe(!1), [mt, yt] = xe(null), [vt, oe] = xe(null), [ve, ce] = xe(!1), [$e, nt] = xe(null), [Ge, Mt] = xe(!1), Tt = Ue(!1), [$t, on] = xe(!1), yn = Te(
|
|
14994
14977
|
(I, $) => {
|
|
14995
14978
|
if (!I || typeof I != "object") return null;
|
|
14996
14979
|
const G = I[$];
|
|
14997
14980
|
return typeof G == "number" ? G : null;
|
|
14998
14981
|
},
|
|
14999
14982
|
[]
|
|
15000
|
-
), Vn =
|
|
14983
|
+
), Vn = Te(
|
|
15001
14984
|
(I, $) => {
|
|
15002
14985
|
if (!I || typeof I != "object") return null;
|
|
15003
14986
|
const G = I[$];
|
|
@@ -15006,20 +14989,20 @@ function Vi({
|
|
|
15006
14989
|
[]
|
|
15007
14990
|
), sn = tt(() => {
|
|
15008
14991
|
const I = Array.isArray(N) ? [...N] : [];
|
|
15009
|
-
return I.some((G) => yn(G.metadata, "step") !== null) && I.sort((G,
|
|
15010
|
-
const
|
|
15011
|
-
if (
|
|
15012
|
-
return (
|
|
15013
|
-
const je = Date.parse(G.createdAt ?? ""), dt = Date.parse(
|
|
14992
|
+
return I.some((G) => yn(G.metadata, "step") !== null) && I.sort((G, ge) => {
|
|
14993
|
+
const Re = yn(G.metadata, "step"), Ae = yn(ge.metadata, "step");
|
|
14994
|
+
if (Re !== null || Ae !== null)
|
|
14995
|
+
return (Ae ?? Number.NEGATIVE_INFINITY) - (Re ?? Number.NEGATIVE_INFINITY);
|
|
14996
|
+
const je = Date.parse(G.createdAt ?? ""), dt = Date.parse(ge.createdAt ?? "");
|
|
15014
14997
|
return Number.isNaN(je) || Number.isNaN(dt) ? 0 : dt - je;
|
|
15015
14998
|
}), I;
|
|
15016
|
-
}, [N, yn]), an = Ue(null), Dt = Ue(null), ln =
|
|
14999
|
+
}, [N, yn]), an = Ue(null), Dt = Ue(null), ln = Te(() => {
|
|
15017
15000
|
an.current && (an.current.value = ""), Dt.current && (Dt.current.value = ""), Oe((I) => I + 1), st((I) => I + 1);
|
|
15018
15001
|
}, []), Ut = Ue(!1);
|
|
15019
15002
|
ct(() => {
|
|
15020
15003
|
Ut.current && !D && (qe([]), ln()), Ut.current = D;
|
|
15021
15004
|
}, [D, ln]);
|
|
15022
|
-
const [kt, ar] =
|
|
15005
|
+
const [kt, ar] = xe("desktop");
|
|
15023
15006
|
ct(() => {
|
|
15024
15007
|
const I = () => {
|
|
15025
15008
|
const $ = window.innerWidth;
|
|
@@ -15029,7 +15012,7 @@ function Vi({
|
|
|
15029
15012
|
}, []), ct(() => {
|
|
15030
15013
|
Mt(!1), Tt.current = !1;
|
|
15031
15014
|
}, [re]);
|
|
15032
|
-
const Kn =
|
|
15015
|
+
const Kn = Te(async () => {
|
|
15033
15016
|
if (!(!b || T || !Ge))
|
|
15034
15017
|
try {
|
|
15035
15018
|
await C();
|
|
@@ -15051,8 +15034,8 @@ function Vi({
|
|
|
15051
15034
|
}
|
|
15052
15035
|
})();
|
|
15053
15036
|
}, [v]), ct(() => {
|
|
15054
|
-
P && !
|
|
15055
|
-
}, [P,
|
|
15037
|
+
P && !ve && (y == null || y(P));
|
|
15038
|
+
}, [P, ve, y]);
|
|
15056
15039
|
const wt = (I) => {
|
|
15057
15040
|
if (I.length > cs)
|
|
15058
15041
|
return `Message too long (${I.length}/${cs} characters)`;
|
|
@@ -15084,31 +15067,31 @@ function Vi({
|
|
|
15084
15067
|
}
|
|
15085
15068
|
), h == null || h($), ae(null), qe([]), ln(), M(null), ne("");
|
|
15086
15069
|
} catch (G) {
|
|
15087
|
-
const
|
|
15088
|
-
ae(
|
|
15070
|
+
const ge = (G == null ? void 0 : G.message) || "Failed to send message";
|
|
15071
|
+
ae(ge), y == null || y(ge);
|
|
15089
15072
|
}
|
|
15090
15073
|
}
|
|
15091
15074
|
}, vn = U.useCallback((I, $) => {
|
|
15092
15075
|
c && (M(I), ne($), ae(null));
|
|
15093
15076
|
}, [c]), Fn = U.useCallback(() => {
|
|
15094
15077
|
M(null), ne(""), ae(null);
|
|
15095
|
-
}, []), Wt =
|
|
15078
|
+
}, []), Wt = Te((I, $) => {
|
|
15096
15079
|
vn(I, $);
|
|
15097
|
-
}, [vn]), lr =
|
|
15080
|
+
}, [vn]), lr = Te((I) => {
|
|
15098
15081
|
const $ = (G) => {
|
|
15099
|
-
const
|
|
15100
|
-
if (
|
|
15082
|
+
const ge = G.content || [], Re = ge.filter((Ae) => Ae.type === "text").map((Ae) => Ae.text).join("");
|
|
15083
|
+
if (Re) return Re;
|
|
15101
15084
|
try {
|
|
15102
|
-
return JSON.stringify(
|
|
15085
|
+
return JSON.stringify(ge, null, 2);
|
|
15103
15086
|
} catch {
|
|
15104
|
-
return String(
|
|
15087
|
+
return String(ge);
|
|
15105
15088
|
}
|
|
15106
15089
|
};
|
|
15107
15090
|
for (let G = I - 1; G >= 0; G--)
|
|
15108
15091
|
if (w[G].role === "user") {
|
|
15109
|
-
const
|
|
15110
|
-
|
|
15111
|
-
{ text:
|
|
15092
|
+
const ge = $(w[G]);
|
|
15093
|
+
ge && B(
|
|
15094
|
+
{ text: ge },
|
|
15112
15095
|
{
|
|
15113
15096
|
checkpointId: K ?? void 0,
|
|
15114
15097
|
checkpointNs: H ?? void 0
|
|
@@ -15121,7 +15104,7 @@ function Vi({
|
|
|
15121
15104
|
qe((G) => [...G, ...$]), I.target.value = "";
|
|
15122
15105
|
}, un = (I) => {
|
|
15123
15106
|
qe(($) => {
|
|
15124
|
-
const G = $.filter((
|
|
15107
|
+
const G = $.filter((ge, Re) => I !== Re);
|
|
15125
15108
|
return G.length === 0 && ln(), G;
|
|
15126
15109
|
});
|
|
15127
15110
|
}, qn = async (I) => {
|
|
@@ -15139,8 +15122,8 @@ function Vi({
|
|
|
15139
15122
|
const G = `Uploaded ${$.name} - processing through chat stream`;
|
|
15140
15123
|
oe(G);
|
|
15141
15124
|
} catch (G) {
|
|
15142
|
-
const
|
|
15143
|
-
console.error("Excel upload failed", G), yt(
|
|
15125
|
+
const ge = G instanceof Error ? G.message : "Failed to upload Excel file";
|
|
15126
|
+
console.error("Excel upload failed", G), yt(ge), y == null || y(ge);
|
|
15144
15127
|
} finally {
|
|
15145
15128
|
_e(!1), I.target.value = "", ln();
|
|
15146
15129
|
}
|
|
@@ -15157,7 +15140,7 @@ function Vi({
|
|
|
15157
15140
|
await _();
|
|
15158
15141
|
return;
|
|
15159
15142
|
}
|
|
15160
|
-
const $ = sn.find((
|
|
15143
|
+
const $ = sn.find((ge) => ge.checkpointId === I), G = ($ == null ? void 0 : $.checkpointNs) ?? null;
|
|
15161
15144
|
await k(I, G);
|
|
15162
15145
|
} finally {
|
|
15163
15146
|
on(!1);
|
|
@@ -15165,7 +15148,7 @@ function Vi({
|
|
|
15165
15148
|
}
|
|
15166
15149
|
}, Ar = `flex flex-1 w-full flex-col min-h-0 min-w-0 max-h-full overflow-hidden bg-transparent ${e} ${f.container || ""}`, Gn = `flex-1 min-h-0 min-w-0 max-h-full w-full overflow-hidden overscroll-contain break-words break-anywhere p-4 bg-transparent ${f.messagesArea || ""}`, R = `flex-shrink-0 w-full border-t p-4 bg-transparent ${f.inputArea || ""}`;
|
|
15167
15150
|
return /* @__PURE__ */ u.jsxs("div", { className: Ar, children: [
|
|
15168
|
-
!!P && !
|
|
15151
|
+
!!P && !ve && /* @__PURE__ */ u.jsxs("div", { className: "flex-shrink-0 bg-red-50 border border-red-200 text-red-800 px-4 py-2 text-sm flex items-center justify-between", children: [
|
|
15169
15152
|
/* @__PURE__ */ u.jsx("span", { children: P }),
|
|
15170
15153
|
/* @__PURE__ */ u.jsx(
|
|
15171
15154
|
Xe,
|
|
@@ -15193,12 +15176,12 @@ function Vi({
|
|
|
15193
15176
|
children: [
|
|
15194
15177
|
/* @__PURE__ */ u.jsx("option", { value: "", children: "Latest" }),
|
|
15195
15178
|
sn.map((I) => {
|
|
15196
|
-
const $ = yn(I.metadata, "step"), G = Vn(I.metadata, "source"),
|
|
15197
|
-
$ !== null &&
|
|
15198
|
-
const
|
|
15179
|
+
const $ = yn(I.metadata, "step"), G = Vn(I.metadata, "source"), ge = [];
|
|
15180
|
+
$ !== null && ge.push(`Step ${$}`), G && ge.push(G);
|
|
15181
|
+
const Re = ge.length ? ` — ${ge.join(" • ")}` : "";
|
|
15199
15182
|
return /* @__PURE__ */ u.jsxs("option", { value: I.checkpointId, children: [
|
|
15200
15183
|
Yr(I.createdAt),
|
|
15201
|
-
|
|
15184
|
+
Re
|
|
15202
15185
|
] }, I.checkpointId);
|
|
15203
15186
|
})
|
|
15204
15187
|
]
|
|
@@ -15242,7 +15225,7 @@ function Vi({
|
|
|
15242
15225
|
activeInterrupt: L,
|
|
15243
15226
|
disableInterruptActions: q,
|
|
15244
15227
|
onInterruptActionStart: me,
|
|
15245
|
-
onInterruptActionEnd:
|
|
15228
|
+
onInterruptActionEnd: Ce,
|
|
15246
15229
|
showToolMessages: d
|
|
15247
15230
|
}
|
|
15248
15231
|
),
|
|
@@ -15396,10 +15379,10 @@ Is.displayName = "Input";
|
|
|
15396
15379
|
function ba(e, [t, n]) {
|
|
15397
15380
|
return Math.min(n, Math.max(t, e));
|
|
15398
15381
|
}
|
|
15399
|
-
function
|
|
15382
|
+
function IT(e, t) {
|
|
15400
15383
|
return g.useReducer((n, r) => t[n][r] ?? n, e);
|
|
15401
15384
|
}
|
|
15402
|
-
var kl = "ScrollArea", [lp,
|
|
15385
|
+
var kl = "ScrollArea", [lp, gR] = Mn(kl), [AT, rn] = lp(kl), cp = g.forwardRef(
|
|
15403
15386
|
(e, t) => {
|
|
15404
15387
|
const {
|
|
15405
15388
|
__scopeScrollArea: n,
|
|
@@ -15409,7 +15392,7 @@ var kl = "ScrollArea", [lp, xR] = Mn(kl), [NT, rn] = lp(kl), cp = g.forwardRef(
|
|
|
15409
15392
|
...i
|
|
15410
15393
|
} = e, [a, l] = g.useState(null), [c, d] = g.useState(null), [f, h] = g.useState(null), [p, y] = g.useState(null), [v, m] = g.useState(null), [x, w] = g.useState(0), [b, T] = g.useState(0), [S, C] = g.useState(!1), [k, _] = g.useState(!1), j = He(t, (z) => l(z)), N = ni(o);
|
|
15411
15394
|
return /* @__PURE__ */ u.jsx(
|
|
15412
|
-
|
|
15395
|
+
AT,
|
|
15413
15396
|
{
|
|
15414
15397
|
scope: n,
|
|
15415
15398
|
type: r,
|
|
@@ -15431,7 +15414,7 @@ var kl = "ScrollArea", [lp, xR] = Mn(kl), [NT, rn] = lp(kl), cp = g.forwardRef(
|
|
|
15431
15414
|
onCornerWidthChange: w,
|
|
15432
15415
|
onCornerHeightChange: T,
|
|
15433
15416
|
children: /* @__PURE__ */ u.jsx(
|
|
15434
|
-
|
|
15417
|
+
Ie.div,
|
|
15435
15418
|
{
|
|
15436
15419
|
dir: N,
|
|
15437
15420
|
...i,
|
|
@@ -15464,7 +15447,7 @@ var up = "ScrollAreaViewport", dp = g.forwardRef(
|
|
|
15464
15447
|
}
|
|
15465
15448
|
),
|
|
15466
15449
|
/* @__PURE__ */ u.jsx(
|
|
15467
|
-
|
|
15450
|
+
Ie.div,
|
|
15468
15451
|
{
|
|
15469
15452
|
"data-radix-scroll-area-viewport": "",
|
|
15470
15453
|
...s,
|
|
@@ -15497,11 +15480,11 @@ var Ln = "ScrollAreaScrollbar", Rl = g.forwardRef(
|
|
|
15497
15480
|
const { forceMount: n, ...r } = e, o = rn(Ln, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
|
|
15498
15481
|
return g.useEffect(() => (a ? s(!0) : i(!0), () => {
|
|
15499
15482
|
a ? s(!1) : i(!1);
|
|
15500
|
-
}), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ u.jsx(
|
|
15483
|
+
}), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ u.jsx(NT, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ u.jsx(_T, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ u.jsx(fp, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ u.jsx(El, { ...r, ref: t }) : null;
|
|
15501
15484
|
}
|
|
15502
15485
|
);
|
|
15503
15486
|
Rl.displayName = Ln;
|
|
15504
|
-
var
|
|
15487
|
+
var NT = g.forwardRef((e, t) => {
|
|
15505
15488
|
const { forceMount: n, ...r } = e, o = rn(Ln, e.__scopeScrollArea), [s, i] = g.useState(!1);
|
|
15506
15489
|
return g.useEffect(() => {
|
|
15507
15490
|
const a = o.scrollArea;
|
|
@@ -15524,8 +15507,8 @@ var _T = g.forwardRef((e, t) => {
|
|
|
15524
15507
|
ref: t
|
|
15525
15508
|
}
|
|
15526
15509
|
) });
|
|
15527
|
-
}),
|
|
15528
|
-
const { forceMount: n, ...r } = e, o = rn(Ln, e.__scopeScrollArea), s = e.orientation === "horizontal", i = fi(() => l("SCROLL_END"), 100), [a, l] =
|
|
15510
|
+
}), _T = g.forwardRef((e, t) => {
|
|
15511
|
+
const { forceMount: n, ...r } = e, o = rn(Ln, e.__scopeScrollArea), s = e.orientation === "horizontal", i = fi(() => l("SCROLL_END"), 100), [a, l] = IT("hidden", {
|
|
15529
15512
|
hidden: {
|
|
15530
15513
|
SCROLL: "scrolling"
|
|
15531
15514
|
},
|
|
@@ -15598,10 +15581,10 @@ var _T = g.forwardRef((e, t) => {
|
|
|
15598
15581
|
onThumbPointerDown: (h) => i.current = h
|
|
15599
15582
|
};
|
|
15600
15583
|
function f(h, p) {
|
|
15601
|
-
return
|
|
15584
|
+
return LT(h, i.current, a, p);
|
|
15602
15585
|
}
|
|
15603
15586
|
return n === "horizontal" ? /* @__PURE__ */ u.jsx(
|
|
15604
|
-
|
|
15587
|
+
jT,
|
|
15605
15588
|
{
|
|
15606
15589
|
...d,
|
|
15607
15590
|
ref: t,
|
|
@@ -15619,7 +15602,7 @@ var _T = g.forwardRef((e, t) => {
|
|
|
15619
15602
|
}
|
|
15620
15603
|
}
|
|
15621
15604
|
) : n === "vertical" ? /* @__PURE__ */ u.jsx(
|
|
15622
|
-
|
|
15605
|
+
PT,
|
|
15623
15606
|
{
|
|
15624
15607
|
...d,
|
|
15625
15608
|
ref: t,
|
|
@@ -15637,7 +15620,7 @@ var _T = g.forwardRef((e, t) => {
|
|
|
15637
15620
|
}
|
|
15638
15621
|
}
|
|
15639
15622
|
) : null;
|
|
15640
|
-
}),
|
|
15623
|
+
}), jT = g.forwardRef((e, t) => {
|
|
15641
15624
|
const { sizes: n, onSizesChange: r, ...o } = e, s = rn(Ln, e.__scopeScrollArea), [i, a] = g.useState(), l = g.useRef(null), c = He(t, l, s.onScrollbarXChange);
|
|
15642
15625
|
return g.useEffect(() => {
|
|
15643
15626
|
l.current && a(getComputedStyle(l.current));
|
|
@@ -15676,7 +15659,7 @@ var _T = g.forwardRef((e, t) => {
|
|
|
15676
15659
|
}
|
|
15677
15660
|
}
|
|
15678
15661
|
);
|
|
15679
|
-
}),
|
|
15662
|
+
}), PT = g.forwardRef((e, t) => {
|
|
15680
15663
|
const { sizes: n, onSizesChange: r, ...o } = e, s = rn(Ln, e.__scopeScrollArea), [i, a] = g.useState(), l = g.useRef(null), c = He(t, l, s.onScrollbarYChange);
|
|
15681
15664
|
return g.useEffect(() => {
|
|
15682
15665
|
l.current && a(getComputedStyle(l.current));
|
|
@@ -15716,7 +15699,7 @@ var _T = g.forwardRef((e, t) => {
|
|
|
15716
15699
|
}
|
|
15717
15700
|
}
|
|
15718
15701
|
);
|
|
15719
|
-
}), [
|
|
15702
|
+
}), [OT, hp] = lp(Ln), pp = g.forwardRef((e, t) => {
|
|
15720
15703
|
const {
|
|
15721
15704
|
__scopeScrollArea: n,
|
|
15722
15705
|
sizes: r,
|
|
@@ -15743,7 +15726,7 @@ var _T = g.forwardRef((e, t) => {
|
|
|
15743
15726
|
};
|
|
15744
15727
|
return document.addEventListener("wheel", j, { passive: !1 }), () => document.removeEventListener("wheel", j, { passive: !1 });
|
|
15745
15728
|
}, [b, y, T, S]), g.useEffect(C, [r, C]), Br(y, k), Br(p.content, k), /* @__PURE__ */ u.jsx(
|
|
15746
|
-
|
|
15729
|
+
OT,
|
|
15747
15730
|
{
|
|
15748
15731
|
scope: n,
|
|
15749
15732
|
scrollbar: y,
|
|
@@ -15753,7 +15736,7 @@ var _T = g.forwardRef((e, t) => {
|
|
|
15753
15736
|
onThumbPositionChange: C,
|
|
15754
15737
|
onThumbPointerDown: At(a),
|
|
15755
15738
|
children: /* @__PURE__ */ u.jsx(
|
|
15756
|
-
|
|
15739
|
+
Ie.div,
|
|
15757
15740
|
{
|
|
15758
15741
|
...h,
|
|
15759
15742
|
ref: m,
|
|
@@ -15773,9 +15756,9 @@ var _T = g.forwardRef((e, t) => {
|
|
|
15773
15756
|
}), As = "ScrollAreaThumb", mp = g.forwardRef(
|
|
15774
15757
|
(e, t) => {
|
|
15775
15758
|
const { forceMount: n, ...r } = e, o = hp(As, e.__scopeScrollArea);
|
|
15776
|
-
return /* @__PURE__ */ u.jsx(Xt, { present: n || o.hasThumb, children: /* @__PURE__ */ u.jsx(
|
|
15759
|
+
return /* @__PURE__ */ u.jsx(Xt, { present: n || o.hasThumb, children: /* @__PURE__ */ u.jsx(MT, { ref: t, ...r }) });
|
|
15777
15760
|
}
|
|
15778
|
-
),
|
|
15761
|
+
), MT = g.forwardRef(
|
|
15779
15762
|
(e, t) => {
|
|
15780
15763
|
const { __scopeScrollArea: n, style: r, ...o } = e, s = rn(As, n), i = hp(As, n), { onThumbPositionChange: a } = i, l = He(
|
|
15781
15764
|
t,
|
|
@@ -15788,14 +15771,14 @@ var _T = g.forwardRef((e, t) => {
|
|
|
15788
15771
|
if (f) {
|
|
15789
15772
|
const h = () => {
|
|
15790
15773
|
if (d(), !c.current) {
|
|
15791
|
-
const p =
|
|
15774
|
+
const p = FT(f, a);
|
|
15792
15775
|
c.current = p, a();
|
|
15793
15776
|
}
|
|
15794
15777
|
};
|
|
15795
15778
|
return a(), f.addEventListener("scroll", h), () => f.removeEventListener("scroll", h);
|
|
15796
15779
|
}
|
|
15797
15780
|
}, [s.viewport, d, a]), /* @__PURE__ */ u.jsx(
|
|
15798
|
-
|
|
15781
|
+
Ie.div,
|
|
15799
15782
|
{
|
|
15800
15783
|
"data-state": i.hasThumb ? "visible" : "hidden",
|
|
15801
15784
|
...o,
|
|
@@ -15818,11 +15801,11 @@ mp.displayName = As;
|
|
|
15818
15801
|
var Il = "ScrollAreaCorner", gp = g.forwardRef(
|
|
15819
15802
|
(e, t) => {
|
|
15820
15803
|
const n = rn(Il, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
|
|
15821
|
-
return n.type !== "scroll" && r ? /* @__PURE__ */ u.jsx(
|
|
15804
|
+
return n.type !== "scroll" && r ? /* @__PURE__ */ u.jsx(DT, { ...e, ref: t }) : null;
|
|
15822
15805
|
}
|
|
15823
15806
|
);
|
|
15824
15807
|
gp.displayName = Il;
|
|
15825
|
-
var
|
|
15808
|
+
var DT = g.forwardRef((e, t) => {
|
|
15826
15809
|
const { __scopeScrollArea: n, ...r } = e, o = rn(Il, n), [s, i] = g.useState(0), [a, l] = g.useState(0), c = !!(s && a);
|
|
15827
15810
|
return Br(o.scrollbarX, () => {
|
|
15828
15811
|
var f;
|
|
@@ -15833,7 +15816,7 @@ var LT = g.forwardRef((e, t) => {
|
|
|
15833
15816
|
const d = ((f = o.scrollbarY) == null ? void 0 : f.offsetWidth) || 0;
|
|
15834
15817
|
o.onCornerWidthChange(d), i(d);
|
|
15835
15818
|
}), c ? /* @__PURE__ */ u.jsx(
|
|
15836
|
-
|
|
15819
|
+
Ie.div,
|
|
15837
15820
|
{
|
|
15838
15821
|
...r,
|
|
15839
15822
|
ref: t,
|
|
@@ -15860,7 +15843,7 @@ function di(e) {
|
|
|
15860
15843
|
const t = xp(e.viewport, e.content), n = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, r = (e.scrollbar.size - n) * t;
|
|
15861
15844
|
return Math.max(r, 18);
|
|
15862
15845
|
}
|
|
15863
|
-
function
|
|
15846
|
+
function LT(e, t, n, r = "ltr") {
|
|
15864
15847
|
const o = di(n), s = o / 2, i = t || s, a = o - i, l = n.scrollbar.paddingStart + i, c = n.scrollbar.size - n.scrollbar.paddingEnd - a, d = n.content - n.viewport, f = r === "ltr" ? [0, d] : [d * -1, 0];
|
|
15865
15848
|
return yp([l, c], f)(e);
|
|
15866
15849
|
}
|
|
@@ -15878,7 +15861,7 @@ function yp(e, t) {
|
|
|
15878
15861
|
function vp(e, t) {
|
|
15879
15862
|
return e > 0 && e < t;
|
|
15880
15863
|
}
|
|
15881
|
-
var
|
|
15864
|
+
var FT = (e, t = () => {
|
|
15882
15865
|
}) => {
|
|
15883
15866
|
let n = { left: e.scrollLeft, top: e.scrollTop }, r = 0;
|
|
15884
15867
|
return function o() {
|
|
@@ -15906,7 +15889,7 @@ function Br(e, t) {
|
|
|
15906
15889
|
}
|
|
15907
15890
|
}, [e, n]);
|
|
15908
15891
|
}
|
|
15909
|
-
var wp = cp,
|
|
15892
|
+
var wp = cp, $T = dp, zT = gp;
|
|
15910
15893
|
const bp = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ u.jsxs(
|
|
15911
15894
|
wp,
|
|
15912
15895
|
{
|
|
@@ -15914,9 +15897,9 @@ const bp = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
15914
15897
|
className: se("relative overflow-hidden", e),
|
|
15915
15898
|
...n,
|
|
15916
15899
|
children: [
|
|
15917
|
-
/* @__PURE__ */ u.jsx(
|
|
15900
|
+
/* @__PURE__ */ u.jsx($T, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
|
|
15918
15901
|
/* @__PURE__ */ u.jsx(Sp, {}),
|
|
15919
|
-
/* @__PURE__ */ u.jsx(
|
|
15902
|
+
/* @__PURE__ */ u.jsx(zT, {})
|
|
15920
15903
|
]
|
|
15921
15904
|
}
|
|
15922
15905
|
));
|
|
@@ -15955,7 +15938,7 @@ function pu({
|
|
|
15955
15938
|
currentThreadId: h,
|
|
15956
15939
|
isLoading: p,
|
|
15957
15940
|
actions: y
|
|
15958
|
-
} = La(), { loadThread: v } = Fa(), { createThread: m, deleteThread: x, renameThread: w } = y, [b, T] =
|
|
15941
|
+
} = La(), { loadThread: v } = Fa(), { createThread: m, deleteThread: x, renameThread: w } = y, [b, T] = xe(Array.isArray(f) ? f : []), S = Ue(b.length > 0), [C, k] = xe(null), [_, j] = xe(""), [N, z] = xe(!1);
|
|
15959
15942
|
ct(() => {
|
|
15960
15943
|
const L = Array.isArray(f) ? f : [];
|
|
15961
15944
|
if (L.length > 0) {
|
|
@@ -16003,8 +15986,8 @@ function pu({
|
|
|
16003
15986
|
}, H = (L) => {
|
|
16004
15987
|
if (!L) return "";
|
|
16005
15988
|
try {
|
|
16006
|
-
const q = new Date(L), me = (/* @__PURE__ */ new Date()).getTime() - q.getTime(),
|
|
16007
|
-
return
|
|
15989
|
+
const q = new Date(L), me = (/* @__PURE__ */ new Date()).getTime() - q.getTime(), Ce = Math.floor(me / (1e3 * 60 * 60 * 24));
|
|
15990
|
+
return Ce === 0 ? q.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : Ce === 1 ? "Yesterday" : Ce < 7 ? `${Ce} days ago` : q.toLocaleDateString();
|
|
16008
15991
|
} catch {
|
|
16009
15992
|
return "";
|
|
16010
15993
|
}
|
|
@@ -16079,7 +16062,7 @@ function Lr(e) {
|
|
|
16079
16062
|
if (!(typeof globalThis > "u"))
|
|
16080
16063
|
return globalThis[e];
|
|
16081
16064
|
}
|
|
16082
|
-
function
|
|
16065
|
+
function BT(e) {
|
|
16083
16066
|
if (typeof e != "string") return;
|
|
16084
16067
|
const t = e.trim();
|
|
16085
16068
|
if (t)
|
|
@@ -16092,7 +16075,7 @@ function Cp() {
|
|
|
16092
16075
|
Lr("__CHAT_API_URL__")
|
|
16093
16076
|
];
|
|
16094
16077
|
for (const t of e) {
|
|
16095
|
-
const n =
|
|
16078
|
+
const n = BT(t);
|
|
16096
16079
|
if (n) return n;
|
|
16097
16080
|
}
|
|
16098
16081
|
}
|
|
@@ -16112,12 +16095,12 @@ function kp(...e) {
|
|
|
16112
16095
|
return Hn(t);
|
|
16113
16096
|
return Hn();
|
|
16114
16097
|
}
|
|
16115
|
-
function
|
|
16098
|
+
function HT() {
|
|
16116
16099
|
const e = {}, t = Cp(), n = Tp();
|
|
16117
16100
|
return t && (e.baseUrl = t), n && (e.apiKey = n), e;
|
|
16118
16101
|
}
|
|
16119
|
-
function
|
|
16120
|
-
const e =
|
|
16102
|
+
function UT() {
|
|
16103
|
+
const e = HT(), t = mr.getAuthToken(), n = Cp();
|
|
16121
16104
|
return {
|
|
16122
16105
|
apiBaseUrl: kp(
|
|
16123
16106
|
e.baseUrl,
|
|
@@ -16137,7 +16120,7 @@ function WT() {
|
|
|
16137
16120
|
};
|
|
16138
16121
|
}
|
|
16139
16122
|
const Rp = "chat-settings";
|
|
16140
|
-
function
|
|
16123
|
+
function WT() {
|
|
16141
16124
|
try {
|
|
16142
16125
|
const e = localStorage.getItem(Rp);
|
|
16143
16126
|
return e ? JSON.parse(e) : {};
|
|
@@ -16145,7 +16128,7 @@ function VT() {
|
|
|
16145
16128
|
return console.error("Failed to parse stored settings:", e), {};
|
|
16146
16129
|
}
|
|
16147
16130
|
}
|
|
16148
|
-
function
|
|
16131
|
+
function VT(e) {
|
|
16149
16132
|
try {
|
|
16150
16133
|
const t = {
|
|
16151
16134
|
...e,
|
|
@@ -16156,8 +16139,8 @@ function KT(e) {
|
|
|
16156
16139
|
console.error("Failed to save settings:", t);
|
|
16157
16140
|
}
|
|
16158
16141
|
}
|
|
16159
|
-
function
|
|
16160
|
-
const e =
|
|
16142
|
+
function xR() {
|
|
16143
|
+
const e = UT(), t = WT(), n = mr.getAuthToken(), r = typeof t.apiBaseUrl == "string" ? t.apiBaseUrl : void 0;
|
|
16161
16144
|
return {
|
|
16162
16145
|
...e,
|
|
16163
16146
|
...t,
|
|
@@ -16171,14 +16154,14 @@ function yR() {
|
|
|
16171
16154
|
)
|
|
16172
16155
|
};
|
|
16173
16156
|
}
|
|
16174
|
-
function
|
|
16157
|
+
function yR(e) {
|
|
16175
16158
|
mr.updateConfig({
|
|
16176
16159
|
baseUrl: e.apiBaseUrl,
|
|
16177
16160
|
authToken: e.apiKey ?? void 0
|
|
16178
|
-
}),
|
|
16161
|
+
}), VT(e);
|
|
16179
16162
|
}
|
|
16180
|
-
var
|
|
16181
|
-
|
|
16163
|
+
var KT = "Label", Ep = g.forwardRef((e, t) => /* @__PURE__ */ u.jsx(
|
|
16164
|
+
Ie.label,
|
|
16182
16165
|
{
|
|
16183
16166
|
...e,
|
|
16184
16167
|
ref: t,
|
|
@@ -16188,15 +16171,15 @@ var qT = "Label", Ep = g.forwardRef((e, t) => /* @__PURE__ */ u.jsx(
|
|
|
16188
16171
|
}
|
|
16189
16172
|
}
|
|
16190
16173
|
));
|
|
16191
|
-
Ep.displayName =
|
|
16174
|
+
Ep.displayName = KT;
|
|
16192
16175
|
var Ip = Ep;
|
|
16193
|
-
const
|
|
16176
|
+
const qT = Os(
|
|
16194
16177
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
16195
16178
|
), Jt = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
16196
16179
|
Ip,
|
|
16197
16180
|
{
|
|
16198
16181
|
ref: n,
|
|
16199
|
-
className: se(
|
|
16182
|
+
className: se(qT(), e),
|
|
16200
16183
|
...t
|
|
16201
16184
|
}
|
|
16202
16185
|
));
|
|
@@ -16205,7 +16188,7 @@ function Ap(e) {
|
|
|
16205
16188
|
const t = g.useRef({ value: e, previous: e });
|
|
16206
16189
|
return g.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
16207
16190
|
}
|
|
16208
|
-
var hi = "Switch", [
|
|
16191
|
+
var hi = "Switch", [GT, vR] = Mn(hi), [YT, XT] = GT(hi), Np = g.forwardRef(
|
|
16209
16192
|
(e, t) => {
|
|
16210
16193
|
const {
|
|
16211
16194
|
__scopeSwitch: n,
|
|
@@ -16224,9 +16207,9 @@ var hi = "Switch", [YT, wR] = Mn(hi), [XT, JT] = YT(hi), Np = g.forwardRef(
|
|
|
16224
16207
|
onChange: c,
|
|
16225
16208
|
caller: hi
|
|
16226
16209
|
});
|
|
16227
|
-
return /* @__PURE__ */ u.jsxs(
|
|
16210
|
+
return /* @__PURE__ */ u.jsxs(YT, { scope: n, checked: x, disabled: a, children: [
|
|
16228
16211
|
/* @__PURE__ */ u.jsx(
|
|
16229
|
-
|
|
16212
|
+
Ie.button,
|
|
16230
16213
|
{
|
|
16231
16214
|
type: "button",
|
|
16232
16215
|
role: "switch",
|
|
@@ -16263,9 +16246,9 @@ var hi = "Switch", [YT, wR] = Mn(hi), [XT, JT] = YT(hi), Np = g.forwardRef(
|
|
|
16263
16246
|
Np.displayName = hi;
|
|
16264
16247
|
var _p = "SwitchThumb", jp = g.forwardRef(
|
|
16265
16248
|
(e, t) => {
|
|
16266
|
-
const { __scopeSwitch: n, ...r } = e, o =
|
|
16249
|
+
const { __scopeSwitch: n, ...r } = e, o = XT(_p, n);
|
|
16267
16250
|
return /* @__PURE__ */ u.jsx(
|
|
16268
|
-
|
|
16251
|
+
Ie.span,
|
|
16269
16252
|
{
|
|
16270
16253
|
"data-state": Op(o.checked),
|
|
16271
16254
|
"data-disabled": o.disabled ? "" : void 0,
|
|
@@ -16276,7 +16259,7 @@ var _p = "SwitchThumb", jp = g.forwardRef(
|
|
|
16276
16259
|
}
|
|
16277
16260
|
);
|
|
16278
16261
|
jp.displayName = _p;
|
|
16279
|
-
var
|
|
16262
|
+
var JT = "SwitchBubbleInput", Pp = g.forwardRef(
|
|
16280
16263
|
({
|
|
16281
16264
|
__scopeSwitch: e,
|
|
16282
16265
|
control: t,
|
|
@@ -16317,11 +16300,11 @@ var ZT = "SwitchBubbleInput", Pp = g.forwardRef(
|
|
|
16317
16300
|
);
|
|
16318
16301
|
}
|
|
16319
16302
|
);
|
|
16320
|
-
Pp.displayName =
|
|
16303
|
+
Pp.displayName = JT;
|
|
16321
16304
|
function Op(e) {
|
|
16322
16305
|
return e ? "checked" : "unchecked";
|
|
16323
16306
|
}
|
|
16324
|
-
var Mp = Np,
|
|
16307
|
+
var Mp = Np, ZT = jp;
|
|
16325
16308
|
const Xn = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
16326
16309
|
Mp,
|
|
16327
16310
|
{
|
|
@@ -16332,7 +16315,7 @@ const Xn = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
16332
16315
|
...t,
|
|
16333
16316
|
ref: n,
|
|
16334
16317
|
children: /* @__PURE__ */ u.jsx(
|
|
16335
|
-
|
|
16318
|
+
ZT,
|
|
16336
16319
|
{
|
|
16337
16320
|
className: se(
|
|
16338
16321
|
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
@@ -16354,9 +16337,9 @@ var Dp = Object.freeze({
|
|
|
16354
16337
|
clip: "rect(0, 0, 0, 0)",
|
|
16355
16338
|
whiteSpace: "nowrap",
|
|
16356
16339
|
wordWrap: "normal"
|
|
16357
|
-
}),
|
|
16340
|
+
}), QT = "VisuallyHidden", ek = g.forwardRef(
|
|
16358
16341
|
(e, t) => /* @__PURE__ */ u.jsx(
|
|
16359
|
-
|
|
16342
|
+
Ie.span,
|
|
16360
16343
|
{
|
|
16361
16344
|
...e,
|
|
16362
16345
|
ref: t,
|
|
@@ -16364,11 +16347,11 @@ var Dp = Object.freeze({
|
|
|
16364
16347
|
}
|
|
16365
16348
|
)
|
|
16366
16349
|
);
|
|
16367
|
-
|
|
16368
|
-
var
|
|
16369
|
-
|
|
16350
|
+
ek.displayName = QT;
|
|
16351
|
+
var tk = [" ", "Enter", "ArrowUp", "ArrowDown"], nk = [" ", "Enter"], br = "Select", [pi, mi, rk] = cl(br), [Gr, wR] = Mn(br, [
|
|
16352
|
+
rk,
|
|
16370
16353
|
ai
|
|
16371
|
-
]), gi = ai(), [
|
|
16354
|
+
]), gi = ai(), [ok, sr] = Gr(br), [sk, ik] = Gr(br), Lp = (e) => {
|
|
16372
16355
|
const {
|
|
16373
16356
|
__scopeSelect: t,
|
|
16374
16357
|
children: n,
|
|
@@ -16396,7 +16379,7 @@ var nk = [" ", "Enter", "ArrowUp", "ArrowDown"], rk = [" ", "Enter"], br = "Sele
|
|
|
16396
16379
|
caller: br
|
|
16397
16380
|
}), z = g.useRef(null), F = m ? y || !!m.closest("form") : !0, [D, P] = g.useState(/* @__PURE__ */ new Set()), B = Array.from(D).map((W) => W.props.value).join(";");
|
|
16398
16381
|
return /* @__PURE__ */ u.jsx(oh, { ...v, children: /* @__PURE__ */ u.jsxs(
|
|
16399
|
-
|
|
16382
|
+
ok,
|
|
16400
16383
|
{
|
|
16401
16384
|
required: p,
|
|
16402
16385
|
scope: t,
|
|
@@ -16416,7 +16399,7 @@ var nk = [" ", "Enter", "ArrowUp", "ArrowDown"], rk = [" ", "Enter"], br = "Sele
|
|
|
16416
16399
|
disabled: h,
|
|
16417
16400
|
children: [
|
|
16418
16401
|
/* @__PURE__ */ u.jsx(pi.Provider, { scope: t, children: /* @__PURE__ */ u.jsx(
|
|
16419
|
-
|
|
16402
|
+
sk,
|
|
16420
16403
|
{
|
|
16421
16404
|
scope: e.__scopeSelect,
|
|
16422
16405
|
onNativeOptionAdd: g.useCallback((W) => {
|
|
@@ -16467,7 +16450,7 @@ var Fp = "SelectTrigger", $p = g.forwardRef(
|
|
|
16467
16450
|
});
|
|
16468
16451
|
};
|
|
16469
16452
|
return /* @__PURE__ */ u.jsx(sh, { asChild: !0, ...s, children: /* @__PURE__ */ u.jsx(
|
|
16470
|
-
|
|
16453
|
+
Ie.button,
|
|
16471
16454
|
{
|
|
16472
16455
|
type: "button",
|
|
16473
16456
|
role: "combobox",
|
|
@@ -16492,7 +16475,7 @@ var Fp = "SelectTrigger", $p = g.forwardRef(
|
|
|
16492
16475
|
}),
|
|
16493
16476
|
onKeyDown: he(o.onKeyDown, (v) => {
|
|
16494
16477
|
const m = f.current !== "";
|
|
16495
|
-
!(v.ctrlKey || v.altKey || v.metaKey) && v.key.length === 1 && h(v.key), !(m && v.key === " ") &&
|
|
16478
|
+
!(v.ctrlKey || v.altKey || v.metaKey) && v.key.length === 1 && h(v.key), !(m && v.key === " ") && tk.includes(v.key) && (y(), v.preventDefault());
|
|
16496
16479
|
})
|
|
16497
16480
|
}
|
|
16498
16481
|
) });
|
|
@@ -16505,7 +16488,7 @@ var zp = "SelectValue", Bp = g.forwardRef(
|
|
|
16505
16488
|
return Ct(() => {
|
|
16506
16489
|
c(d);
|
|
16507
16490
|
}, [c, d]), /* @__PURE__ */ u.jsx(
|
|
16508
|
-
|
|
16491
|
+
Ie.span,
|
|
16509
16492
|
{
|
|
16510
16493
|
...a,
|
|
16511
16494
|
ref: f,
|
|
@@ -16516,15 +16499,15 @@ var zp = "SelectValue", Bp = g.forwardRef(
|
|
|
16516
16499
|
}
|
|
16517
16500
|
);
|
|
16518
16501
|
Bp.displayName = zp;
|
|
16519
|
-
var
|
|
16502
|
+
var ak = "SelectIcon", Hp = g.forwardRef(
|
|
16520
16503
|
(e, t) => {
|
|
16521
16504
|
const { __scopeSelect: n, children: r, ...o } = e;
|
|
16522
|
-
return /* @__PURE__ */ u.jsx(
|
|
16505
|
+
return /* @__PURE__ */ u.jsx(Ie.span, { "aria-hidden": !0, ...o, ref: t, children: r || "▼" });
|
|
16523
16506
|
}
|
|
16524
16507
|
);
|
|
16525
|
-
Hp.displayName =
|
|
16526
|
-
var
|
|
16527
|
-
Up.displayName =
|
|
16508
|
+
Hp.displayName = ak;
|
|
16509
|
+
var lk = "SelectPortal", Up = (e) => /* @__PURE__ */ u.jsx(Ys, { asChild: !0, ...e });
|
|
16510
|
+
Up.displayName = lk;
|
|
16528
16511
|
var Sr = "SelectContent", Wp = g.forwardRef(
|
|
16529
16512
|
(e, t) => {
|
|
16530
16513
|
const n = sr(Sr, e.__scopeSelect), [r, o] = g.useState();
|
|
@@ -16541,7 +16524,7 @@ var Sr = "SelectContent", Wp = g.forwardRef(
|
|
|
16541
16524
|
}
|
|
16542
16525
|
);
|
|
16543
16526
|
Wp.displayName = Sr;
|
|
16544
|
-
var dn = 10, [Vp, ir] = Gr(Sr),
|
|
16527
|
+
var dn = 10, [Vp, ir] = Gr(Sr), ck = "SelectContentImpl", uk = Fr("SelectContent.RemoveScroll"), Kp = g.forwardRef(
|
|
16545
16528
|
(e, t) => {
|
|
16546
16529
|
const {
|
|
16547
16530
|
__scopeSelect: n,
|
|
@@ -16621,7 +16604,7 @@ var dn = 10, [Vp, ir] = Gr(Sr), uk = "SelectContentImpl", dk = Fr("SelectContent
|
|
|
16621
16604
|
(w.value !== void 0 && w.value === M || ne) && z(J);
|
|
16622
16605
|
},
|
|
16623
16606
|
[w.value]
|
|
16624
|
-
),
|
|
16607
|
+
), Ce = r === "popper" ? Sa : qp, Se = Ce === Sa ? {
|
|
16625
16608
|
side: a,
|
|
16626
16609
|
sideOffset: l,
|
|
16627
16610
|
align: c,
|
|
@@ -16649,7 +16632,7 @@ var dn = 10, [Vp, ir] = Gr(Sr), uk = "SelectContentImpl", dk = Fr("SelectContent
|
|
|
16649
16632
|
position: r,
|
|
16650
16633
|
isPositioned: D,
|
|
16651
16634
|
searchRef: X,
|
|
16652
|
-
children: /* @__PURE__ */ u.jsx(Js, { as:
|
|
16635
|
+
children: /* @__PURE__ */ u.jsx(Js, { as: uk, allowPinchZoom: !0, children: /* @__PURE__ */ u.jsx(
|
|
16653
16636
|
Gs,
|
|
16654
16637
|
{
|
|
16655
16638
|
asChild: !0,
|
|
@@ -16671,7 +16654,7 @@ var dn = 10, [Vp, ir] = Gr(Sr), uk = "SelectContentImpl", dk = Fr("SelectContent
|
|
|
16671
16654
|
onFocusOutside: (J) => J.preventDefault(),
|
|
16672
16655
|
onDismiss: () => w.onOpenChange(!1),
|
|
16673
16656
|
children: /* @__PURE__ */ u.jsx(
|
|
16674
|
-
|
|
16657
|
+
Ce,
|
|
16675
16658
|
{
|
|
16676
16659
|
role: "listbox",
|
|
16677
16660
|
id: w.contentId,
|
|
@@ -16711,8 +16694,8 @@ var dn = 10, [Vp, ir] = Gr(Sr), uk = "SelectContentImpl", dk = Fr("SelectContent
|
|
|
16711
16694
|
);
|
|
16712
16695
|
}
|
|
16713
16696
|
);
|
|
16714
|
-
Kp.displayName =
|
|
16715
|
-
var
|
|
16697
|
+
Kp.displayName = ck;
|
|
16698
|
+
var dk = "SelectItemAlignedPosition", qp = g.forwardRef((e, t) => {
|
|
16716
16699
|
const { __scopeSelect: n, onPlaced: r, ...o } = e, s = sr(Sr, n), i = ir(Sr, n), [a, l] = g.useState(null), [c, d] = g.useState(null), f = He(t, (k) => d(k)), h = mi(n), p = g.useRef(!1), y = g.useRef(!0), { viewport: v, selectedItem: m, selectedItemText: x, focusSelectedItem: w } = i, b = g.useCallback(() => {
|
|
16717
16700
|
if (s.trigger && s.valueNode && a && c && v && m && x) {
|
|
16718
16701
|
const k = s.trigger.getBoundingClientRect(), _ = c.getBoundingClientRect(), j = s.valueNode.getBoundingClientRect(), N = x.getBoundingClientRect();
|
|
@@ -16734,12 +16717,12 @@ var fk = "SelectItemAlignedPosition", qp = g.forwardRef((e, t) => {
|
|
|
16734
16717
|
]);
|
|
16735
16718
|
a.style.minWidth = qe + "px", a.style.right = Be + "px";
|
|
16736
16719
|
}
|
|
16737
|
-
const z = h(), F = window.innerHeight - dn * 2, D = v.scrollHeight, P = window.getComputedStyle(c), B = parseInt(P.borderTopWidth, 10), W = parseInt(P.paddingTop, 10), re = parseInt(P.borderBottomWidth, 10), K = parseInt(P.paddingBottom, 10), H = B + W + D + K + re, X = Math.min(m.offsetHeight * 5, H), L = window.getComputedStyle(v), q = parseInt(L.paddingTop, 10), pe = parseInt(L.paddingBottom, 10), me = k.top + k.height / 2 - dn,
|
|
16720
|
+
const z = h(), F = window.innerHeight - dn * 2, D = v.scrollHeight, P = window.getComputedStyle(c), B = parseInt(P.borderTopWidth, 10), W = parseInt(P.paddingTop, 10), re = parseInt(P.borderBottomWidth, 10), K = parseInt(P.paddingBottom, 10), H = B + W + D + K + re, X = Math.min(m.offsetHeight * 5, H), L = window.getComputedStyle(v), q = parseInt(L.paddingTop, 10), pe = parseInt(L.paddingBottom, 10), me = k.top + k.height / 2 - dn, Ce = F - me, Se = m.offsetHeight / 2, J = m.offsetTop + Se, M = B + W + J, ee = H - M;
|
|
16738
16721
|
if (M <= me) {
|
|
16739
16722
|
const de = z.length > 0 && m === z[z.length - 1].ref.current;
|
|
16740
16723
|
a.style.bottom = "0px";
|
|
16741
16724
|
const ae = c.clientHeight - v.offsetTop - v.offsetHeight, ie = Math.max(
|
|
16742
|
-
|
|
16725
|
+
Ce,
|
|
16743
16726
|
Se + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
16744
16727
|
(de ? pe : 0) + ae + re
|
|
16745
16728
|
), qe = M + ie;
|
|
@@ -16780,7 +16763,7 @@ var fk = "SelectItemAlignedPosition", qp = g.forwardRef((e, t) => {
|
|
|
16780
16763
|
[b, w]
|
|
16781
16764
|
);
|
|
16782
16765
|
return /* @__PURE__ */ u.jsx(
|
|
16783
|
-
|
|
16766
|
+
hk,
|
|
16784
16767
|
{
|
|
16785
16768
|
scope: n,
|
|
16786
16769
|
contentWrapper: a,
|
|
@@ -16797,7 +16780,7 @@ var fk = "SelectItemAlignedPosition", qp = g.forwardRef((e, t) => {
|
|
|
16797
16780
|
zIndex: T
|
|
16798
16781
|
},
|
|
16799
16782
|
children: /* @__PURE__ */ u.jsx(
|
|
16800
|
-
|
|
16783
|
+
Ie.div,
|
|
16801
16784
|
{
|
|
16802
16785
|
...o,
|
|
16803
16786
|
ref: f,
|
|
@@ -16816,8 +16799,8 @@ var fk = "SelectItemAlignedPosition", qp = g.forwardRef((e, t) => {
|
|
|
16816
16799
|
}
|
|
16817
16800
|
);
|
|
16818
16801
|
});
|
|
16819
|
-
qp.displayName =
|
|
16820
|
-
var
|
|
16802
|
+
qp.displayName = dk;
|
|
16803
|
+
var fk = "SelectPopperPosition", Sa = g.forwardRef((e, t) => {
|
|
16821
16804
|
const {
|
|
16822
16805
|
__scopeSelect: n,
|
|
16823
16806
|
align: r = "start",
|
|
@@ -16845,8 +16828,8 @@ var hk = "SelectPopperPosition", Sa = g.forwardRef((e, t) => {
|
|
|
16845
16828
|
}
|
|
16846
16829
|
);
|
|
16847
16830
|
});
|
|
16848
|
-
Sa.displayName =
|
|
16849
|
-
var [
|
|
16831
|
+
Sa.displayName = fk;
|
|
16832
|
+
var [hk, Al] = Gr(Sr, {}), Ca = "SelectViewport", Gp = g.forwardRef(
|
|
16850
16833
|
(e, t) => {
|
|
16851
16834
|
const { __scopeSelect: n, nonce: r, ...o } = e, s = ir(Ca, n), i = Al(Ca, n), a = He(t, s.onViewportChange), l = g.useRef(0);
|
|
16852
16835
|
return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
@@ -16860,7 +16843,7 @@ var [pk, Al] = Gr(Sr, {}), Ca = "SelectViewport", Gp = g.forwardRef(
|
|
|
16860
16843
|
}
|
|
16861
16844
|
),
|
|
16862
16845
|
/* @__PURE__ */ u.jsx(pi.Slot, { scope: n, children: /* @__PURE__ */ u.jsx(
|
|
16863
|
-
|
|
16846
|
+
Ie.div,
|
|
16864
16847
|
{
|
|
16865
16848
|
"data-radix-select-viewport": "",
|
|
16866
16849
|
role: "presentation",
|
|
@@ -16899,21 +16882,21 @@ var [pk, Al] = Gr(Sr, {}), Ca = "SelectViewport", Gp = g.forwardRef(
|
|
|
16899
16882
|
}
|
|
16900
16883
|
);
|
|
16901
16884
|
Gp.displayName = Ca;
|
|
16902
|
-
var Yp = "SelectGroup", [
|
|
16885
|
+
var Yp = "SelectGroup", [pk, mk] = Gr(Yp), gk = g.forwardRef(
|
|
16903
16886
|
(e, t) => {
|
|
16904
16887
|
const { __scopeSelect: n, ...r } = e, o = _n();
|
|
16905
|
-
return /* @__PURE__ */ u.jsx(
|
|
16888
|
+
return /* @__PURE__ */ u.jsx(pk, { scope: n, id: o, children: /* @__PURE__ */ u.jsx(Ie.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
|
|
16906
16889
|
}
|
|
16907
16890
|
);
|
|
16908
|
-
|
|
16891
|
+
gk.displayName = Yp;
|
|
16909
16892
|
var Xp = "SelectLabel", Jp = g.forwardRef(
|
|
16910
16893
|
(e, t) => {
|
|
16911
|
-
const { __scopeSelect: n, ...r } = e, o =
|
|
16912
|
-
return /* @__PURE__ */ u.jsx(
|
|
16894
|
+
const { __scopeSelect: n, ...r } = e, o = mk(Xp, n);
|
|
16895
|
+
return /* @__PURE__ */ u.jsx(Ie.div, { id: o.id, ...r, ref: t });
|
|
16913
16896
|
}
|
|
16914
16897
|
);
|
|
16915
16898
|
Jp.displayName = Xp;
|
|
16916
|
-
var _s = "SelectItem", [
|
|
16899
|
+
var _s = "SelectItem", [xk, Zp] = Gr(_s), Qp = g.forwardRef(
|
|
16917
16900
|
(e, t) => {
|
|
16918
16901
|
const {
|
|
16919
16902
|
__scopeSelect: n,
|
|
@@ -16935,7 +16918,7 @@ var _s = "SelectItem", [yk, Zp] = Gr(_s), Qp = g.forwardRef(
|
|
|
16935
16918
|
"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
|
|
16936
16919
|
);
|
|
16937
16920
|
return /* @__PURE__ */ u.jsx(
|
|
16938
|
-
|
|
16921
|
+
xk,
|
|
16939
16922
|
{
|
|
16940
16923
|
scope: n,
|
|
16941
16924
|
value: r,
|
|
@@ -16953,7 +16936,7 @@ var _s = "SelectItem", [yk, Zp] = Gr(_s), Qp = g.forwardRef(
|
|
|
16953
16936
|
disabled: o,
|
|
16954
16937
|
textValue: d,
|
|
16955
16938
|
children: /* @__PURE__ */ u.jsx(
|
|
16956
|
-
|
|
16939
|
+
Ie.div,
|
|
16957
16940
|
{
|
|
16958
16941
|
role: "option",
|
|
16959
16942
|
"aria-labelledby": v,
|
|
@@ -16986,7 +16969,7 @@ var _s = "SelectItem", [yk, Zp] = Gr(_s), Qp = g.forwardRef(
|
|
|
16986
16969
|
}),
|
|
16987
16970
|
onKeyDown: he(i.onKeyDown, (w) => {
|
|
16988
16971
|
var T;
|
|
16989
|
-
((T = l.searchRef) == null ? void 0 : T.current) !== "" && w.key === " " || (
|
|
16972
|
+
((T = l.searchRef) == null ? void 0 : T.current) !== "" && w.key === " " || (nk.includes(w.key) && x(), w.key === " " && w.preventDefault());
|
|
16990
16973
|
})
|
|
16991
16974
|
}
|
|
16992
16975
|
)
|
|
@@ -16999,7 +16982,7 @@ var _s = "SelectItem", [yk, Zp] = Gr(_s), Qp = g.forwardRef(
|
|
|
16999
16982
|
Qp.displayName = _s;
|
|
17000
16983
|
var so = "SelectItemText", em = g.forwardRef(
|
|
17001
16984
|
(e, t) => {
|
|
17002
|
-
const { __scopeSelect: n, className: r, style: o, ...s } = e, i = sr(so, n), a = ir(so, n), l = Zp(so, n), c =
|
|
16985
|
+
const { __scopeSelect: n, className: r, style: o, ...s } = e, i = sr(so, n), a = ir(so, n), l = Zp(so, n), c = ik(so, n), [d, f] = g.useState(null), h = He(
|
|
17003
16986
|
t,
|
|
17004
16987
|
(x) => f(x),
|
|
17005
16988
|
l.onItemTextChange,
|
|
@@ -17012,7 +16995,7 @@ var so = "SelectItemText", em = g.forwardRef(
|
|
|
17012
16995
|
[l.disabled, l.value, p]
|
|
17013
16996
|
), { onNativeOptionAdd: v, onNativeOptionRemove: m } = c;
|
|
17014
16997
|
return Ct(() => (v(y), () => m(y)), [v, m, y]), /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
17015
|
-
/* @__PURE__ */ u.jsx(
|
|
16998
|
+
/* @__PURE__ */ u.jsx(Ie.span, { id: l.textId, ...s, ref: h }),
|
|
17016
16999
|
l.isSelected && i.valueNode && !i.valueNodeHasChildren ? Ms.createPortal(s.children, i.valueNode) : null
|
|
17017
17000
|
] });
|
|
17018
17001
|
}
|
|
@@ -17021,7 +17004,7 @@ em.displayName = so;
|
|
|
17021
17004
|
var tm = "SelectItemIndicator", nm = g.forwardRef(
|
|
17022
17005
|
(e, t) => {
|
|
17023
17006
|
const { __scopeSelect: n, ...r } = e;
|
|
17024
|
-
return Zp(tm, n).isSelected ? /* @__PURE__ */ u.jsx(
|
|
17007
|
+
return Zp(tm, n).isSelected ? /* @__PURE__ */ u.jsx(Ie.span, { "aria-hidden": !0, ...r, ref: t }) : null;
|
|
17025
17008
|
}
|
|
17026
17009
|
);
|
|
17027
17010
|
nm.displayName = tm;
|
|
@@ -17082,7 +17065,7 @@ var sm = g.forwardRef((e, t) => {
|
|
|
17082
17065
|
const c = a().find((f) => f.ref.current === document.activeElement);
|
|
17083
17066
|
(d = c == null ? void 0 : c.ref.current) == null || d.scrollIntoView({ block: "nearest" });
|
|
17084
17067
|
}, [a]), /* @__PURE__ */ u.jsx(
|
|
17085
|
-
|
|
17068
|
+
Ie.div,
|
|
17086
17069
|
{
|
|
17087
17070
|
"aria-hidden": !0,
|
|
17088
17071
|
...o,
|
|
@@ -17100,21 +17083,21 @@ var sm = g.forwardRef((e, t) => {
|
|
|
17100
17083
|
})
|
|
17101
17084
|
}
|
|
17102
17085
|
);
|
|
17103
|
-
}),
|
|
17086
|
+
}), yk = "SelectSeparator", im = g.forwardRef(
|
|
17104
17087
|
(e, t) => {
|
|
17105
17088
|
const { __scopeSelect: n, ...r } = e;
|
|
17106
|
-
return /* @__PURE__ */ u.jsx(
|
|
17089
|
+
return /* @__PURE__ */ u.jsx(Ie.div, { "aria-hidden": !0, ...r, ref: t });
|
|
17107
17090
|
}
|
|
17108
17091
|
);
|
|
17109
|
-
im.displayName =
|
|
17110
|
-
var Ra = "SelectArrow",
|
|
17092
|
+
im.displayName = yk;
|
|
17093
|
+
var Ra = "SelectArrow", vk = g.forwardRef(
|
|
17111
17094
|
(e, t) => {
|
|
17112
17095
|
const { __scopeSelect: n, ...r } = e, o = gi(n), s = sr(Ra, n), i = ir(Ra, n);
|
|
17113
17096
|
return s.open && i.position === "popper" ? /* @__PURE__ */ u.jsx(ah, { ...o, ...r, ref: t }) : null;
|
|
17114
17097
|
}
|
|
17115
17098
|
);
|
|
17116
|
-
|
|
17117
|
-
var
|
|
17099
|
+
vk.displayName = Ra;
|
|
17100
|
+
var wk = "SelectBubbleInput", am = g.forwardRef(
|
|
17118
17101
|
({ __scopeSelect: e, value: t, ...n }, r) => {
|
|
17119
17102
|
const o = g.useRef(null), s = He(r, o), i = Ap(t);
|
|
17120
17103
|
return g.useEffect(() => {
|
|
@@ -17129,7 +17112,7 @@ var bk = "SelectBubbleInput", am = g.forwardRef(
|
|
|
17129
17112
|
d.call(a, t), a.dispatchEvent(f);
|
|
17130
17113
|
}
|
|
17131
17114
|
}, [i, t]), /* @__PURE__ */ u.jsx(
|
|
17132
|
-
|
|
17115
|
+
Ie.select,
|
|
17133
17116
|
{
|
|
17134
17117
|
...n,
|
|
17135
17118
|
style: { ...Dp, ...n.style },
|
|
@@ -17139,7 +17122,7 @@ var bk = "SelectBubbleInput", am = g.forwardRef(
|
|
|
17139
17122
|
);
|
|
17140
17123
|
}
|
|
17141
17124
|
);
|
|
17142
|
-
am.displayName =
|
|
17125
|
+
am.displayName = wk;
|
|
17143
17126
|
function lm(e) {
|
|
17144
17127
|
return e === "" || e === void 0;
|
|
17145
17128
|
}
|
|
@@ -17159,18 +17142,18 @@ function cm(e) {
|
|
|
17159
17142
|
}
|
|
17160
17143
|
function um(e, t, n) {
|
|
17161
17144
|
const o = t.length > 1 && Array.from(t).every((c) => c === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
|
|
17162
|
-
let i =
|
|
17145
|
+
let i = bk(e, Math.max(s, 0));
|
|
17163
17146
|
o.length === 1 && (i = i.filter((c) => c !== n));
|
|
17164
17147
|
const l = i.find(
|
|
17165
17148
|
(c) => c.textValue.toLowerCase().startsWith(o.toLowerCase())
|
|
17166
17149
|
);
|
|
17167
17150
|
return l !== n ? l : void 0;
|
|
17168
17151
|
}
|
|
17169
|
-
function
|
|
17152
|
+
function bk(e, t) {
|
|
17170
17153
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
17171
17154
|
}
|
|
17172
|
-
var
|
|
17173
|
-
const mu =
|
|
17155
|
+
var Sk = Lp, dm = $p, Ck = Bp, Tk = Hp, kk = Up, fm = Wp, Rk = Gp, hm = Jp, pm = Qp, Ek = em, Ik = nm, mm = rm, gm = om, xm = im;
|
|
17156
|
+
const mu = Sk, gu = Ck, Ea = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ u.jsxs(
|
|
17174
17157
|
dm,
|
|
17175
17158
|
{
|
|
17176
17159
|
ref: r,
|
|
@@ -17181,7 +17164,7 @@ const mu = Ck, gu = Tk, Ea = g.forwardRef(({ className: e, children: t, ...n },
|
|
|
17181
17164
|
...n,
|
|
17182
17165
|
children: [
|
|
17183
17166
|
t,
|
|
17184
|
-
/* @__PURE__ */ u.jsx(
|
|
17167
|
+
/* @__PURE__ */ u.jsx(Tk, { asChild: !0, children: /* @__PURE__ */ u.jsx(Ps, { className: "h-4 w-4 opacity-50" }) })
|
|
17185
17168
|
]
|
|
17186
17169
|
}
|
|
17187
17170
|
));
|
|
@@ -17212,7 +17195,7 @@ const vm = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
17212
17195
|
}
|
|
17213
17196
|
));
|
|
17214
17197
|
vm.displayName = gm.displayName;
|
|
17215
|
-
const Ia = g.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ u.jsx(
|
|
17198
|
+
const Ia = g.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ u.jsx(kk, { children: /* @__PURE__ */ u.jsxs(
|
|
17216
17199
|
fm,
|
|
17217
17200
|
{
|
|
17218
17201
|
ref: o,
|
|
@@ -17226,7 +17209,7 @@ const Ia = g.forwardRef(({ className: e, children: t, position: n = "popper", ..
|
|
|
17226
17209
|
children: [
|
|
17227
17210
|
/* @__PURE__ */ u.jsx(ym, {}),
|
|
17228
17211
|
/* @__PURE__ */ u.jsx(
|
|
17229
|
-
|
|
17212
|
+
Rk,
|
|
17230
17213
|
{
|
|
17231
17214
|
className: se(
|
|
17232
17215
|
"p-1",
|
|
@@ -17240,7 +17223,7 @@ const Ia = g.forwardRef(({ className: e, children: t, position: n = "popper", ..
|
|
|
17240
17223
|
}
|
|
17241
17224
|
) }));
|
|
17242
17225
|
Ia.displayName = fm.displayName;
|
|
17243
|
-
const
|
|
17226
|
+
const Ak = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
17244
17227
|
hm,
|
|
17245
17228
|
{
|
|
17246
17229
|
ref: n,
|
|
@@ -17248,7 +17231,7 @@ const Nk = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
17248
17231
|
...t
|
|
17249
17232
|
}
|
|
17250
17233
|
));
|
|
17251
|
-
|
|
17234
|
+
Ak.displayName = hm.displayName;
|
|
17252
17235
|
const cr = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ u.jsxs(
|
|
17253
17236
|
pm,
|
|
17254
17237
|
{
|
|
@@ -17259,13 +17242,13 @@ const cr = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
17259
17242
|
),
|
|
17260
17243
|
...n,
|
|
17261
17244
|
children: [
|
|
17262
|
-
/* @__PURE__ */ u.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ u.jsx(
|
|
17263
|
-
/* @__PURE__ */ u.jsx(
|
|
17245
|
+
/* @__PURE__ */ u.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ u.jsx(Ik, { children: /* @__PURE__ */ u.jsx(Na, { className: "h-4 w-4" }) }) }),
|
|
17246
|
+
/* @__PURE__ */ u.jsx(Ek, { children: t })
|
|
17264
17247
|
]
|
|
17265
17248
|
}
|
|
17266
17249
|
));
|
|
17267
17250
|
cr.displayName = pm.displayName;
|
|
17268
|
-
const
|
|
17251
|
+
const Nk = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
17269
17252
|
xm,
|
|
17270
17253
|
{
|
|
17271
17254
|
ref: n,
|
|
@@ -17273,11 +17256,11 @@ const _k = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
17273
17256
|
...t
|
|
17274
17257
|
}
|
|
17275
17258
|
));
|
|
17276
|
-
|
|
17277
|
-
var
|
|
17278
|
-
const { decorative: n, orientation: r = xu, ...o } = e, s =
|
|
17259
|
+
Nk.displayName = xm.displayName;
|
|
17260
|
+
var _k = "Separator", xu = "horizontal", jk = ["horizontal", "vertical"], wm = g.forwardRef((e, t) => {
|
|
17261
|
+
const { decorative: n, orientation: r = xu, ...o } = e, s = Pk(r) ? r : xu, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
|
|
17279
17262
|
return /* @__PURE__ */ u.jsx(
|
|
17280
|
-
|
|
17263
|
+
Ie.div,
|
|
17281
17264
|
{
|
|
17282
17265
|
"data-orientation": s,
|
|
17283
17266
|
...a,
|
|
@@ -17286,9 +17269,9 @@ var jk = "Separator", xu = "horizontal", Pk = ["horizontal", "vertical"], wm = g
|
|
|
17286
17269
|
}
|
|
17287
17270
|
);
|
|
17288
17271
|
});
|
|
17289
|
-
wm.displayName =
|
|
17290
|
-
function
|
|
17291
|
-
return
|
|
17272
|
+
wm.displayName = _k;
|
|
17273
|
+
function Pk(e) {
|
|
17274
|
+
return jk.includes(e);
|
|
17292
17275
|
}
|
|
17293
17276
|
var bm = wm;
|
|
17294
17277
|
const Sm = g.forwardRef(
|
|
@@ -17308,7 +17291,7 @@ const Sm = g.forwardRef(
|
|
|
17308
17291
|
)
|
|
17309
17292
|
);
|
|
17310
17293
|
Sm.displayName = bm.displayName;
|
|
17311
|
-
const
|
|
17294
|
+
const Ok = Ef, Mk = f0, Dk = If, Cm = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
17312
17295
|
Qs,
|
|
17313
17296
|
{
|
|
17314
17297
|
className: se(
|
|
@@ -17320,7 +17303,7 @@ const Mk = Ef, Dk = f0, Lk = If, Cm = g.forwardRef(({ className: e, ...t }, n) =
|
|
|
17320
17303
|
}
|
|
17321
17304
|
));
|
|
17322
17305
|
Cm.displayName = Qs.displayName;
|
|
17323
|
-
const
|
|
17306
|
+
const Lk = Os(
|
|
17324
17307
|
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
17325
17308
|
{
|
|
17326
17309
|
variants: {
|
|
@@ -17335,13 +17318,13 @@ const Fk = Os(
|
|
|
17335
17318
|
side: "right"
|
|
17336
17319
|
}
|
|
17337
17320
|
}
|
|
17338
|
-
), Tm = g.forwardRef(({ side: e = "right", className: t, children: n, ...r }, o) => /* @__PURE__ */ u.jsxs(
|
|
17321
|
+
), Tm = g.forwardRef(({ side: e = "right", className: t, children: n, ...r }, o) => /* @__PURE__ */ u.jsxs(Dk, { children: [
|
|
17339
17322
|
/* @__PURE__ */ u.jsx(Cm, {}),
|
|
17340
17323
|
/* @__PURE__ */ u.jsxs(
|
|
17341
17324
|
ei,
|
|
17342
17325
|
{
|
|
17343
17326
|
ref: o,
|
|
17344
|
-
className: se(
|
|
17327
|
+
className: se(Lk({ side: e }), t),
|
|
17345
17328
|
...r,
|
|
17346
17329
|
children: [
|
|
17347
17330
|
n,
|
|
@@ -17386,7 +17369,7 @@ const Em = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
|
|
|
17386
17369
|
}
|
|
17387
17370
|
));
|
|
17388
17371
|
Em.displayName = ti.displayName;
|
|
17389
|
-
const
|
|
17372
|
+
const Fk = {
|
|
17390
17373
|
api: {
|
|
17391
17374
|
baseUrl: "http://localhost:8000/api",
|
|
17392
17375
|
authToken: "",
|
|
@@ -17405,8 +17388,8 @@ const $k = {
|
|
|
17405
17388
|
showTypingIndicator: !0
|
|
17406
17389
|
}
|
|
17407
17390
|
};
|
|
17408
|
-
function
|
|
17409
|
-
const [r, o] =
|
|
17391
|
+
function bR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
17392
|
+
const [r, o] = xe(!1), [s, i] = xe(!1), [a, l] = xe(e), [c, d] = xe(!1), { toast: f } = rl();
|
|
17410
17393
|
ct(() => {
|
|
17411
17394
|
const m = JSON.stringify(a) !== JSON.stringify(e);
|
|
17412
17395
|
d(m);
|
|
@@ -17419,7 +17402,7 @@ function SR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
17419
17402
|
description: "Your chat configuration has been updated successfully."
|
|
17420
17403
|
});
|
|
17421
17404
|
}, p = () => {
|
|
17422
|
-
l(
|
|
17405
|
+
l(Fk), d(!0), f({
|
|
17423
17406
|
title: "Settings reset",
|
|
17424
17407
|
description: "Configuration has been reset to defaults."
|
|
17425
17408
|
});
|
|
@@ -17440,8 +17423,8 @@ function SR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
17440
17423
|
});
|
|
17441
17424
|
}
|
|
17442
17425
|
};
|
|
17443
|
-
return /* @__PURE__ */ u.jsxs(
|
|
17444
|
-
/* @__PURE__ */ u.jsx(
|
|
17426
|
+
return /* @__PURE__ */ u.jsxs(Ok, { open: r, onOpenChange: o, children: [
|
|
17427
|
+
/* @__PURE__ */ u.jsx(Mk, { asChild: !0, children: /* @__PURE__ */ u.jsxs(Xe, { variant: "outline", size: "sm", className: n, children: [
|
|
17445
17428
|
/* @__PURE__ */ u.jsx(qm, { className: "h-4 w-4 mr-2" }),
|
|
17446
17429
|
"Settings",
|
|
17447
17430
|
c && /* @__PURE__ */ u.jsx(Ld, { variant: "destructive", className: "ml-2 h-4 w-4 p-0" })
|
|
@@ -17690,7 +17673,7 @@ function SR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
17690
17673
|
] })
|
|
17691
17674
|
] });
|
|
17692
17675
|
}
|
|
17693
|
-
function
|
|
17676
|
+
function SR({
|
|
17694
17677
|
layout: e = "sidebar",
|
|
17695
17678
|
layoutSize: t = "desktop",
|
|
17696
17679
|
showThreads: n = !0,
|
|
@@ -17768,20 +17751,20 @@ export {
|
|
|
17768
17751
|
Fx as ChatApi,
|
|
17769
17752
|
Vi as ChatInterface,
|
|
17770
17753
|
Ei as ChatProviders,
|
|
17771
|
-
|
|
17754
|
+
bR as ChatSettings,
|
|
17772
17755
|
Jd as MarkdownContent,
|
|
17773
17756
|
k0 as MessageComponent,
|
|
17774
17757
|
Mf as MessageList,
|
|
17775
17758
|
pu as ThreadManager,
|
|
17776
|
-
|
|
17759
|
+
yR as applySettings,
|
|
17777
17760
|
mr as chatApiClient,
|
|
17778
|
-
|
|
17761
|
+
SR as default,
|
|
17779
17762
|
Lx as del,
|
|
17780
17763
|
Rn as get,
|
|
17781
17764
|
Px as getChatToken,
|
|
17782
|
-
|
|
17783
|
-
|
|
17784
|
-
|
|
17765
|
+
xR as getCurrentSettings,
|
|
17766
|
+
HT as getDefaultApiConfig,
|
|
17767
|
+
UT as getDefaultChatSettings,
|
|
17785
17768
|
Ox as onChatTokenChanged,
|
|
17786
17769
|
Mx as post,
|
|
17787
17770
|
Dx as put,
|