teodor-new-chat-ui 3.0.59 → 3.0.60
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 +784 -784
- package/dist/index.umd.js +32 -32
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2,12 +2,12 @@ import * as f from "react";
|
|
|
2
2
|
import K, { useState as fe, useRef as bt, useCallback as Ye, useEffect as Ve, useReducer as Pp, useMemo as wn, createContext as gc, useContext as vc, createElement as to, useLayoutEffect as _p } from "react";
|
|
3
3
|
import * as Bo from "react-dom";
|
|
4
4
|
import xc from "react-dom";
|
|
5
|
-
import { Square as Op, Send as Mp, X as Wn, ExternalLink as Dp, Download as Lp, Image as bc, FileText as Ha, Loader as Fp, ChevronUp as hr, ChevronDown as Un, Copy as $a, Edit as za, RotateCcw as qs, Bot as Ua, Wrench as Bp, User as Hp, ChevronRight as $p, Check as Oi, Circle as zp, Edit3 as wc, Paperclip as Wa, Loader2 as Up, Plus as Wp, FileSpreadsheet as Vp, MessageSquarePlus as Gp, MessageSquare as Kp, Calendar as Yp, Trash2 as Xp, PanelLeft as qp, Settings as
|
|
5
|
+
import { Square as Op, Send as Mp, X as Wn, ExternalLink as Dp, Download as Lp, Image as bc, FileText as Ha, Loader as Fp, ChevronUp as hr, ChevronDown as Un, Copy as $a, Edit as za, RotateCcw as qs, Bot as Ua, Wrench as Bp, User as Hp, ChevronRight as $p, Check as Oi, Circle as zp, Edit3 as wc, Paperclip as Wa, Loader2 as Up, Plus as Wp, FileSpreadsheet as Vp, MessageSquarePlus as Gp, MessageSquare as Kp, Calendar as Yp, Trash2 as Xp, PanelLeft as qp, Settings as Jp, Server as Zp, EyeOff as Qp, Eye as em, Layout as tm, MessageCircle as nm, Save as rm } from "lucide-react";
|
|
6
6
|
import { Slot as Qn, createSlot as Yn, createSlottable as om } from "@radix-ui/react-slot";
|
|
7
7
|
import { cva as Pr } from "class-variance-authority";
|
|
8
8
|
import { clsx as sm } from "clsx";
|
|
9
9
|
import { twMerge as im } from "tailwind-merge";
|
|
10
|
-
var
|
|
10
|
+
var Js = { exports: {} }, cr = {};
|
|
11
11
|
/**
|
|
12
12
|
* @license React
|
|
13
13
|
* react-jsx-runtime.production.min.js
|
|
@@ -69,10 +69,10 @@ function lm() {
|
|
|
69
69
|
Me.unshift("Warning: " + U), Function.prototype.apply.call(console[T], console, Me);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
var
|
|
72
|
+
var E = !1, S = !1, C = !1, R = !1, I = !1, A;
|
|
73
73
|
A = Symbol.for("react.module.reference");
|
|
74
74
|
function k(T) {
|
|
75
|
-
return !!(typeof T == "string" || typeof T == "function" || T === r || T === s || I || T === o || T === u || T === d ||
|
|
75
|
+
return !!(typeof T == "string" || typeof T == "function" || T === r || T === s || I || T === o || T === u || T === d || R || T === x || E || S || C || typeof T == "object" && T !== null && (T.$$typeof === p || T.$$typeof === h || T.$$typeof === i || T.$$typeof === a || T.$$typeof === c || // This needs to include all possible module reference object
|
|
76
76
|
// types supported by any Flight configuration anywhere since
|
|
77
77
|
// we don't know which Flight build this will end up being used
|
|
78
78
|
// with.
|
|
@@ -209,13 +209,13 @@ function lm() {
|
|
|
209
209
|
` + Y + T;
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
var
|
|
212
|
+
var Z = !1, ne;
|
|
213
213
|
{
|
|
214
214
|
var le = typeof WeakMap == "function" ? WeakMap : Map;
|
|
215
215
|
ne = new le();
|
|
216
216
|
}
|
|
217
217
|
function ie(T, U) {
|
|
218
|
-
if (!T ||
|
|
218
|
+
if (!T || Z)
|
|
219
219
|
return "";
|
|
220
220
|
{
|
|
221
221
|
var te = ne.get(T);
|
|
@@ -223,7 +223,7 @@ function lm() {
|
|
|
223
223
|
return te;
|
|
224
224
|
}
|
|
225
225
|
var ge;
|
|
226
|
-
|
|
226
|
+
Z = !0;
|
|
227
227
|
var _e = Error.prepareStackTrace;
|
|
228
228
|
Error.prepareStackTrace = void 0;
|
|
229
229
|
var Me;
|
|
@@ -262,25 +262,25 @@ function lm() {
|
|
|
262
262
|
}
|
|
263
263
|
} catch (tn) {
|
|
264
264
|
if (tn && ge && typeof tn.stack == "string") {
|
|
265
|
-
for (var
|
|
265
|
+
for (var Re = tn.stack.split(`
|
|
266
266
|
`), dt = ge.stack.split(`
|
|
267
|
-
`), Ke =
|
|
268
|
-
|
|
269
|
-
for (; Ke >= 1 &&
|
|
270
|
-
if (
|
|
271
|
-
if (Ke !== 1 ||
|
|
267
|
+
`), Ke = Re.length - 1, Je = dt.length - 1; Ke >= 1 && Je >= 0 && Re[Ke] !== dt[Je]; )
|
|
268
|
+
Je--;
|
|
269
|
+
for (; Ke >= 1 && Je >= 0; Ke--, Je--)
|
|
270
|
+
if (Re[Ke] !== dt[Je]) {
|
|
271
|
+
if (Ke !== 1 || Je !== 1)
|
|
272
272
|
do
|
|
273
|
-
if (Ke--,
|
|
274
|
-
var
|
|
275
|
-
` +
|
|
276
|
-
return T.displayName &&
|
|
273
|
+
if (Ke--, Je--, Je < 0 || Re[Ke] !== dt[Je]) {
|
|
274
|
+
var Rt = `
|
|
275
|
+
` + Re[Ke].replace(" at new ", " at ");
|
|
276
|
+
return T.displayName && Rt.includes("<anonymous>") && (Rt = Rt.replace("<anonymous>", T.displayName)), typeof T == "function" && ne.set(T, Rt), Rt;
|
|
277
277
|
}
|
|
278
|
-
while (Ke >= 1 &&
|
|
278
|
+
while (Ke >= 1 && Je >= 0);
|
|
279
279
|
break;
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
} finally {
|
|
283
|
-
|
|
283
|
+
Z = !1, be.current = Me, de(), Error.prepareStackTrace = _e;
|
|
284
284
|
}
|
|
285
285
|
var Fn = T ? T.displayName || T.name : "", Ba = Fn ? P(Fn) : "";
|
|
286
286
|
return typeof T == "function" && ne.set(T, Ba), Ba;
|
|
@@ -334,17 +334,17 @@ function lm() {
|
|
|
334
334
|
var Me = Function.call.bind(ce);
|
|
335
335
|
for (var Ie in T)
|
|
336
336
|
if (Me(T, Ie)) {
|
|
337
|
-
var
|
|
337
|
+
var Re = void 0;
|
|
338
338
|
try {
|
|
339
339
|
if (typeof T[Ie] != "function") {
|
|
340
340
|
var dt = Error((ge || "React class") + ": " + te + " type `" + Ie + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof T[Ie] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
341
341
|
throw dt.name = "Invariant Violation", dt;
|
|
342
342
|
}
|
|
343
|
-
|
|
343
|
+
Re = T[Ie](U, Ie, ge, te, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
344
344
|
} catch (Ke) {
|
|
345
|
-
|
|
345
|
+
Re = Ke;
|
|
346
346
|
}
|
|
347
|
-
|
|
347
|
+
Re && !(Re instanceof Error) && (H(_e), 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).", ge || "React class", te, Ie, typeof Re), H(null)), Re instanceof Error && !(Re.message in Ae) && (Ae[Re.message] = !0, H(_e), w("Failed %s type: %s", te, Re.message), H(null));
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
}
|
|
@@ -420,7 +420,7 @@ function lm() {
|
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
var Cs = function(T, U, te, ge, _e, Me, Ie) {
|
|
423
|
-
var
|
|
423
|
+
var Re = {
|
|
424
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
425
|
$$typeof: t,
|
|
426
426
|
// Built-in properties that belong on the element
|
|
@@ -431,27 +431,27 @@ function lm() {
|
|
|
431
431
|
// Record the component responsible for creating this element.
|
|
432
432
|
_owner: Me
|
|
433
433
|
};
|
|
434
|
-
return
|
|
434
|
+
return Re._store = {}, Object.defineProperty(Re._store, "validated", {
|
|
435
435
|
configurable: !1,
|
|
436
436
|
enumerable: !1,
|
|
437
437
|
writable: !0,
|
|
438
438
|
value: !1
|
|
439
|
-
}), Object.defineProperty(
|
|
439
|
+
}), Object.defineProperty(Re, "_self", {
|
|
440
440
|
configurable: !1,
|
|
441
441
|
enumerable: !1,
|
|
442
442
|
writable: !1,
|
|
443
443
|
value: ge
|
|
444
|
-
}), Object.defineProperty(
|
|
444
|
+
}), Object.defineProperty(Re, "_source", {
|
|
445
445
|
configurable: !1,
|
|
446
446
|
enumerable: !1,
|
|
447
447
|
writable: !1,
|
|
448
448
|
value: _e
|
|
449
|
-
}), Object.freeze && (Object.freeze(
|
|
449
|
+
}), Object.freeze && (Object.freeze(Re.props), Object.freeze(Re)), Re;
|
|
450
450
|
};
|
|
451
451
|
function Ts(T, U, te, ge, _e) {
|
|
452
452
|
{
|
|
453
|
-
var Me, Ie = {},
|
|
454
|
-
te !== void 0 && (Tt(te),
|
|
453
|
+
var Me, Ie = {}, Re = null, dt = null;
|
|
454
|
+
te !== void 0 && (Tt(te), Re = "" + te), xn(U) && (Tt(U.key), Re = "" + U.key), Pt(U) && (dt = U.ref, Dn(U, _e));
|
|
455
455
|
for (Me in U)
|
|
456
456
|
ce.call(U, Me) && !st.hasOwnProperty(Me) && (Ie[Me] = U[Me]);
|
|
457
457
|
if (T && T.defaultProps) {
|
|
@@ -459,14 +459,14 @@ function lm() {
|
|
|
459
459
|
for (Me in Ke)
|
|
460
460
|
Ie[Me] === void 0 && (Ie[Me] = Ke[Me]);
|
|
461
461
|
}
|
|
462
|
-
if (
|
|
463
|
-
var
|
|
464
|
-
|
|
462
|
+
if (Re || dt) {
|
|
463
|
+
var Je = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
|
|
464
|
+
Re && Ue(Ie, Je), dt && lr(Ie, Je);
|
|
465
465
|
}
|
|
466
|
-
return Cs(T,
|
|
466
|
+
return Cs(T, Re, dt, _e, ge, We.current, Ie);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
var
|
|
469
|
+
var J = b.ReactCurrentOwner, se = b.ReactDebugCurrentFrame;
|
|
470
470
|
function Ce(T) {
|
|
471
471
|
if (T) {
|
|
472
472
|
var U = T._owner, te = Le(T.type, T._source, U ? U.type : null);
|
|
@@ -481,8 +481,8 @@ function lm() {
|
|
|
481
481
|
}
|
|
482
482
|
function Ot() {
|
|
483
483
|
{
|
|
484
|
-
if (
|
|
485
|
-
var T = G(
|
|
484
|
+
if (J.current) {
|
|
485
|
+
var T = G(J.current.type);
|
|
486
486
|
if (T)
|
|
487
487
|
return `
|
|
488
488
|
|
|
@@ -495,7 +495,7 @@ Check the render method of \`` + T + "`.";
|
|
|
495
495
|
return "";
|
|
496
496
|
}
|
|
497
497
|
var Ma = {};
|
|
498
|
-
function
|
|
498
|
+
function Rp(T) {
|
|
499
499
|
{
|
|
500
500
|
var U = Ot();
|
|
501
501
|
if (!U) {
|
|
@@ -512,12 +512,12 @@ Check the top-level render call using <` + te + ">.");
|
|
|
512
512
|
if (!T._store || T._store.validated || T.key != null)
|
|
513
513
|
return;
|
|
514
514
|
T._store.validated = !0;
|
|
515
|
-
var te =
|
|
515
|
+
var te = Rp(U);
|
|
516
516
|
if (Ma[te])
|
|
517
517
|
return;
|
|
518
518
|
Ma[te] = !0;
|
|
519
519
|
var ge = "";
|
|
520
|
-
T && T._owner && T._owner !==
|
|
520
|
+
T && T._owner && T._owner !== J.current && (ge = " It was passed a child from " + G(T._owner.type) + "."), Ce(T), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', te, ge), Ce(null);
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
523
|
function La(T, U) {
|
|
@@ -539,7 +539,7 @@ Check the top-level render call using <` + te + ">.");
|
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function Ep(T) {
|
|
543
543
|
{
|
|
544
544
|
var U = T.type;
|
|
545
545
|
if (U == null || typeof U == "string")
|
|
@@ -580,30 +580,30 @@ Check the top-level render call using <` + te + ">.");
|
|
|
580
580
|
{
|
|
581
581
|
var Ie = k(T);
|
|
582
582
|
if (!Ie) {
|
|
583
|
-
var
|
|
584
|
-
(T === void 0 || typeof T == "object" && T !== null && Object.keys(T).length === 0) && (
|
|
583
|
+
var Re = "";
|
|
584
|
+
(T === void 0 || typeof T == "object" && T !== null && Object.keys(T).length === 0) && (Re += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
585
585
|
var dt = Ln();
|
|
586
|
-
dt ?
|
|
586
|
+
dt ? Re += dt : Re += Ot();
|
|
587
587
|
var Ke;
|
|
588
|
-
T === null ? Ke = "null" : nt(T) ? Ke = "array" : T !== void 0 && T.$$typeof === t ? (Ke = "<" + (G(T.type) || "Unknown") + " />",
|
|
588
|
+
T === null ? Ke = "null" : nt(T) ? Ke = "array" : T !== void 0 && T.$$typeof === t ? (Ke = "<" + (G(T.type) || "Unknown") + " />", Re = " Did you accidentally export a JSX literal instead of a component?") : Ke = typeof T, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Ke, Re);
|
|
589
589
|
}
|
|
590
|
-
var
|
|
591
|
-
if (
|
|
592
|
-
return
|
|
590
|
+
var Je = Ts(T, U, te, _e, Me);
|
|
591
|
+
if (Je == null)
|
|
592
|
+
return Je;
|
|
593
593
|
if (Ie) {
|
|
594
|
-
var
|
|
595
|
-
if (
|
|
594
|
+
var Rt = U.children;
|
|
595
|
+
if (Rt !== void 0)
|
|
596
596
|
if (ge)
|
|
597
|
-
if (nt(
|
|
598
|
-
for (var Fn = 0; Fn <
|
|
599
|
-
La(
|
|
600
|
-
Object.freeze && Object.freeze(
|
|
597
|
+
if (nt(Rt)) {
|
|
598
|
+
for (var Fn = 0; Fn < Rt.length; Fn++)
|
|
599
|
+
La(Rt[Fn], T);
|
|
600
|
+
Object.freeze && Object.freeze(Rt);
|
|
601
601
|
} else
|
|
602
602
|
w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
603
603
|
else
|
|
604
|
-
La(
|
|
604
|
+
La(Rt, T);
|
|
605
605
|
}
|
|
606
|
-
return T === r ? Ip(
|
|
606
|
+
return T === r ? Ip(Je) : Ep(Je), Je;
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
609
|
function Np(T, U, te) {
|
|
@@ -616,8 +616,8 @@ Check the top-level render call using <` + te + ">.");
|
|
|
616
616
|
ur.Fragment = r, ur.jsx = Ap, ur.jsxs = kp;
|
|
617
617
|
}()), ur;
|
|
618
618
|
}
|
|
619
|
-
process.env.NODE_ENV === "production" ?
|
|
620
|
-
var l =
|
|
619
|
+
process.env.NODE_ENV === "production" ? Js.exports = am() : Js.exports = lm();
|
|
620
|
+
var l = Js.exports;
|
|
621
621
|
function yc(e, t) {
|
|
622
622
|
return function() {
|
|
623
623
|
return e.apply(t, arguments);
|
|
@@ -652,7 +652,7 @@ const dm = zo("string"), pt = zo("function"), Tc = zo("number"), Or = (e) => e !
|
|
|
652
652
|
let t;
|
|
653
653
|
return e && (typeof FormData == "function" && e instanceof FormData || pt(e.append) && ((t = $o(e)) === "formdata" || // detect form-data instance
|
|
654
654
|
t === "object" && pt(e.toString) && e.toString() === "[object FormData]"));
|
|
655
|
-
}, wm = zt("URLSearchParams"), [ym, Sm, Cm, Tm] = ["ReadableStream", "Request", "Response", "Headers"].map(zt),
|
|
655
|
+
}, wm = zt("URLSearchParams"), [ym, Sm, Cm, Tm] = ["ReadableStream", "Request", "Response", "Headers"].map(zt), Rm = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
656
656
|
function Mr(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
657
657
|
if (e === null || typeof e > "u")
|
|
658
658
|
return;
|
|
@@ -669,7 +669,7 @@ function Mr(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
669
669
|
a = s[r], t.call(null, e[a], a, e);
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function Rc(e, t) {
|
|
673
673
|
if (_r(e))
|
|
674
674
|
return null;
|
|
675
675
|
t = t.toLowerCase();
|
|
@@ -680,17 +680,17 @@ function Ec(e, t) {
|
|
|
680
680
|
return o;
|
|
681
681
|
return null;
|
|
682
682
|
}
|
|
683
|
-
const yn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
684
|
-
function
|
|
685
|
-
const { caseless: e, skipUndefined: t } =
|
|
686
|
-
const i = e &&
|
|
687
|
-
no(n[i]) && no(o) ? n[i] =
|
|
683
|
+
const yn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ec = (e) => !Xn(e) && e !== yn;
|
|
684
|
+
function Zs() {
|
|
685
|
+
const { caseless: e, skipUndefined: t } = Ec(this) && this || {}, n = {}, r = (o, s) => {
|
|
686
|
+
const i = e && Rc(n, s) || s;
|
|
687
|
+
no(n[i]) && no(o) ? n[i] = Zs(n[i], o) : no(o) ? n[i] = Zs({}, o) : er(o) ? n[i] = o.slice() : (!t || !Xn(o)) && (n[i] = o);
|
|
688
688
|
};
|
|
689
689
|
for (let o = 0, s = arguments.length; o < s; o++)
|
|
690
690
|
arguments[o] && Mr(arguments[o], r);
|
|
691
691
|
return n;
|
|
692
692
|
}
|
|
693
|
-
const
|
|
693
|
+
const Em = (e, t, n, { allOwnKeys: r } = {}) => (Mr(t, (o, s) => {
|
|
694
694
|
n && pt(o) ? e[s] = yc(o, n) : e[s] = o;
|
|
695
695
|
}, { allOwnKeys: r }), e), Im = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Nm = (e, t, n, r) => {
|
|
696
696
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
@@ -823,9 +823,9 @@ const Um = (e) => {
|
|
|
823
823
|
isTypedArray: Pm,
|
|
824
824
|
isFileList: vm,
|
|
825
825
|
forEach: Mr,
|
|
826
|
-
merge:
|
|
827
|
-
extend:
|
|
828
|
-
trim:
|
|
826
|
+
merge: Zs,
|
|
827
|
+
extend: Em,
|
|
828
|
+
trim: Rm,
|
|
829
829
|
stripBOM: Im,
|
|
830
830
|
inherits: Nm,
|
|
831
831
|
toFlatObject: jm,
|
|
@@ -845,9 +845,9 @@ const Um = (e) => {
|
|
|
845
845
|
toCamelCase: Dm,
|
|
846
846
|
noop: Hm,
|
|
847
847
|
toFiniteNumber: $m,
|
|
848
|
-
findKey:
|
|
848
|
+
findKey: Rc,
|
|
849
849
|
global: yn,
|
|
850
|
-
isContextDefined:
|
|
850
|
+
isContextDefined: Ec,
|
|
851
851
|
isSpecCompliantForm: zm,
|
|
852
852
|
toJSONObject: Um,
|
|
853
853
|
isAsyncFn: Wm,
|
|
@@ -955,10 +955,10 @@ function Uo(e, t, n) {
|
|
|
955
955
|
if (j.endsWith(v, "{}"))
|
|
956
956
|
v = r ? v : v.slice(0, -2), g = JSON.stringify(g);
|
|
957
957
|
else if (j.isArray(g) && Xm(g) || (j.isFileList(g) || j.endsWith(v, "[]")) && (b = j.toArray(g)))
|
|
958
|
-
return v = kc(v), b.forEach(function(y,
|
|
958
|
+
return v = kc(v), b.forEach(function(y, E) {
|
|
959
959
|
!(j.isUndefined(y) || y === null) && t.append(
|
|
960
960
|
// eslint-disable-next-line no-nested-ternary
|
|
961
|
-
i === !0 ? Ya([v],
|
|
961
|
+
i === !0 ? Ya([v], E, s) : i === null ? v : v + "[]",
|
|
962
962
|
u(y)
|
|
963
963
|
);
|
|
964
964
|
}), !1;
|
|
@@ -1018,13 +1018,13 @@ Pc.toString = function(t) {
|
|
|
1018
1018
|
return n(o[0]) + "=" + n(o[1]);
|
|
1019
1019
|
}, "").join("&");
|
|
1020
1020
|
};
|
|
1021
|
-
function
|
|
1021
|
+
function Jm(e) {
|
|
1022
1022
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
1023
1023
|
}
|
|
1024
1024
|
function _c(e, t, n) {
|
|
1025
1025
|
if (!t)
|
|
1026
1026
|
return e;
|
|
1027
|
-
const r = n && n.encode ||
|
|
1027
|
+
const r = n && n.encode || Jm;
|
|
1028
1028
|
j.isFunction(n) && (n = {
|
|
1029
1029
|
serialize: n
|
|
1030
1030
|
});
|
|
@@ -1094,10 +1094,10 @@ const Oc = {
|
|
|
1094
1094
|
silentJSONParsing: !0,
|
|
1095
1095
|
forcedJSONParsing: !0,
|
|
1096
1096
|
clarifyTimeoutError: !1
|
|
1097
|
-
},
|
|
1097
|
+
}, Zm = typeof URLSearchParams < "u" ? URLSearchParams : Di, Qm = typeof FormData < "u" ? FormData : null, eg = typeof Blob < "u" ? Blob : null, tg = {
|
|
1098
1098
|
isBrowser: !0,
|
|
1099
1099
|
classes: {
|
|
1100
|
-
URLSearchParams:
|
|
1100
|
+
URLSearchParams: Zm,
|
|
1101
1101
|
FormData: Qm,
|
|
1102
1102
|
Blob: eg
|
|
1103
1103
|
},
|
|
@@ -1253,7 +1253,7 @@ const ug = j.toObjectSet([
|
|
|
1253
1253
|
`).forEach(function(i) {
|
|
1254
1254
|
o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && ug[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
1255
1255
|
}), t;
|
|
1256
|
-
},
|
|
1256
|
+
}, Ja = Symbol("internals");
|
|
1257
1257
|
function dr(e) {
|
|
1258
1258
|
return e && String(e).trim().toLowerCase();
|
|
1259
1259
|
}
|
|
@@ -1268,7 +1268,7 @@ function fg(e) {
|
|
|
1268
1268
|
return t;
|
|
1269
1269
|
}
|
|
1270
1270
|
const hg = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
1271
|
-
function
|
|
1271
|
+
function Rs(e, t, n, r, o) {
|
|
1272
1272
|
if (j.isFunction(r))
|
|
1273
1273
|
return r.call(this, t, n);
|
|
1274
1274
|
if (o && (t = n), !!j.isString(t)) {
|
|
@@ -1342,7 +1342,7 @@ let mt = class {
|
|
|
1342
1342
|
has(t, n) {
|
|
1343
1343
|
if (t = dr(t), t) {
|
|
1344
1344
|
const r = j.findKey(this, t);
|
|
1345
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
1345
|
+
return !!(r && this[r] !== void 0 && (!n || Rs(this, this[r], r, n)));
|
|
1346
1346
|
}
|
|
1347
1347
|
return !1;
|
|
1348
1348
|
}
|
|
@@ -1352,7 +1352,7 @@ let mt = class {
|
|
|
1352
1352
|
function s(i) {
|
|
1353
1353
|
if (i = dr(i), i) {
|
|
1354
1354
|
const a = j.findKey(r, i);
|
|
1355
|
-
a && (!n ||
|
|
1355
|
+
a && (!n || Rs(r, r[a], a, n)) && (delete r[a], o = !0);
|
|
1356
1356
|
}
|
|
1357
1357
|
}
|
|
1358
1358
|
return j.isArray(t) ? t.forEach(s) : s(t), o;
|
|
@@ -1362,7 +1362,7 @@ let mt = class {
|
|
|
1362
1362
|
let r = n.length, o = !1;
|
|
1363
1363
|
for (; r--; ) {
|
|
1364
1364
|
const s = n[r];
|
|
1365
|
-
(!t ||
|
|
1365
|
+
(!t || Rs(this, this[s], s, t, !0)) && (delete this[s], o = !0);
|
|
1366
1366
|
}
|
|
1367
1367
|
return o;
|
|
1368
1368
|
}
|
|
@@ -1408,7 +1408,7 @@ let mt = class {
|
|
|
1408
1408
|
return n.forEach((o) => r.set(o)), r;
|
|
1409
1409
|
}
|
|
1410
1410
|
static accessor(t) {
|
|
1411
|
-
const r = (this[
|
|
1411
|
+
const r = (this[Ja] = this[Ja] = {
|
|
1412
1412
|
accessors: {}
|
|
1413
1413
|
}).accessors, o = this.prototype;
|
|
1414
1414
|
function s(i) {
|
|
@@ -1429,7 +1429,7 @@ j.reduceDescriptors(mt.prototype, ({ value: e }, t) => {
|
|
|
1429
1429
|
};
|
|
1430
1430
|
});
|
|
1431
1431
|
j.freezeMethods(mt);
|
|
1432
|
-
function
|
|
1432
|
+
function Es(e, t) {
|
|
1433
1433
|
const n = this || Dr, r = t || n, o = mt.from(r.headers);
|
|
1434
1434
|
let s = r.data;
|
|
1435
1435
|
return j.forEach(e, function(a) {
|
|
@@ -1506,7 +1506,7 @@ const So = (e, t, n = 3) => {
|
|
|
1506
1506
|
};
|
|
1507
1507
|
e(h);
|
|
1508
1508
|
}, n);
|
|
1509
|
-
},
|
|
1509
|
+
}, Za = (e, t) => {
|
|
1510
1510
|
const n = e != null;
|
|
1511
1511
|
return [(r) => t[0]({
|
|
1512
1512
|
lengthComputable: n,
|
|
@@ -1554,7 +1554,7 @@ function Fc(e, t, n) {
|
|
|
1554
1554
|
return e && (r || n == !1) ? Sg(e, t) : t;
|
|
1555
1555
|
}
|
|
1556
1556
|
const el = (e) => e instanceof mt ? { ...e } : e;
|
|
1557
|
-
function
|
|
1557
|
+
function Rn(e, t) {
|
|
1558
1558
|
t = t || {};
|
|
1559
1559
|
const n = {};
|
|
1560
1560
|
function r(u, d, h, p) {
|
|
@@ -1619,7 +1619,7 @@ function En(e, t) {
|
|
|
1619
1619
|
}), n;
|
|
1620
1620
|
}
|
|
1621
1621
|
const Bc = (e) => {
|
|
1622
|
-
const t =
|
|
1622
|
+
const t = Rn({}, e);
|
|
1623
1623
|
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: i, auth: a } = t;
|
|
1624
1624
|
if (t.headers = i = mt.from(i), t.url = _c(Fc(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
|
|
1625
1625
|
"Authorization",
|
|
@@ -1663,30 +1663,30 @@ const Bc = (e) => {
|
|
|
1663
1663
|
config: e,
|
|
1664
1664
|
request: m
|
|
1665
1665
|
};
|
|
1666
|
-
Lc(function(
|
|
1667
|
-
n(
|
|
1668
|
-
}, function(
|
|
1669
|
-
r(
|
|
1666
|
+
Lc(function(R) {
|
|
1667
|
+
n(R), v();
|
|
1668
|
+
}, function(R) {
|
|
1669
|
+
r(R), v();
|
|
1670
1670
|
}, S), m = null;
|
|
1671
1671
|
}
|
|
1672
1672
|
"onloadend" in m ? m.onloadend = b : m.onreadystatechange = function() {
|
|
1673
1673
|
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(b);
|
|
1674
1674
|
}, m.onabort = function() {
|
|
1675
1675
|
m && (r(new we("Request aborted", we.ECONNABORTED, e, m)), m = null);
|
|
1676
|
-
}, m.onerror = function(
|
|
1677
|
-
const S =
|
|
1678
|
-
C.event =
|
|
1676
|
+
}, m.onerror = function(E) {
|
|
1677
|
+
const S = E && E.message ? E.message : "Network Error", C = new we(S, we.ERR_NETWORK, e, m);
|
|
1678
|
+
C.event = E || null, r(C), m = null;
|
|
1679
1679
|
}, m.ontimeout = function() {
|
|
1680
|
-
let
|
|
1680
|
+
let E = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1681
1681
|
const S = o.transitional || Oc;
|
|
1682
|
-
o.timeoutErrorMessage && (
|
|
1683
|
-
|
|
1682
|
+
o.timeoutErrorMessage && (E = o.timeoutErrorMessage), r(new we(
|
|
1683
|
+
E,
|
|
1684
1684
|
S.clarifyTimeoutError ? we.ETIMEDOUT : we.ECONNABORTED,
|
|
1685
1685
|
e,
|
|
1686
1686
|
m
|
|
1687
1687
|
)), m = null;
|
|
1688
|
-
}, s === void 0 && i.setContentType(null), "setRequestHeader" in m && j.forEach(i.toJSON(), function(
|
|
1689
|
-
m.setRequestHeader(S,
|
|
1688
|
+
}, s === void 0 && i.setContentType(null), "setRequestHeader" in m && j.forEach(i.toJSON(), function(E, S) {
|
|
1689
|
+
m.setRequestHeader(S, E);
|
|
1690
1690
|
}), j.isUndefined(o.withCredentials) || (m.withCredentials = !!o.withCredentials), a && a !== "json" && (m.responseType = o.responseType), u && ([p, g] = So(u, !0), m.addEventListener("progress", p)), c && m.upload && ([h, x] = So(c), m.upload.addEventListener("progress", h), m.upload.addEventListener("loadend", x)), (o.cancelToken || o.signal) && (d = (y) => {
|
|
1691
1691
|
m && (r(!y || y.type ? new tr(null, e, m) : y), m.abort(), m = null);
|
|
1692
1692
|
}, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
|
|
@@ -1697,7 +1697,7 @@ const Bc = (e) => {
|
|
|
1697
1697
|
}
|
|
1698
1698
|
m.send(s || null);
|
|
1699
1699
|
});
|
|
1700
|
-
},
|
|
1700
|
+
}, Rg = (e, t) => {
|
|
1701
1701
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1702
1702
|
if (t || n) {
|
|
1703
1703
|
let r = new AbortController(), o;
|
|
@@ -1720,7 +1720,7 @@ const Bc = (e) => {
|
|
|
1720
1720
|
const { signal: c } = r;
|
|
1721
1721
|
return c.unsubscribe = () => j.asap(a), c;
|
|
1722
1722
|
}
|
|
1723
|
-
},
|
|
1723
|
+
}, Eg = function* (e, t) {
|
|
1724
1724
|
let n = e.byteLength;
|
|
1725
1725
|
if (n < t) {
|
|
1726
1726
|
yield e;
|
|
@@ -1731,7 +1731,7 @@ const Bc = (e) => {
|
|
|
1731
1731
|
o = r + t, yield e.slice(r, o), r = o;
|
|
1732
1732
|
}, Ig = async function* (e, t) {
|
|
1733
1733
|
for await (const n of Ng(e))
|
|
1734
|
-
yield*
|
|
1734
|
+
yield* Eg(n, t);
|
|
1735
1735
|
}, Ng = async function* (e) {
|
|
1736
1736
|
if (e[Symbol.asyncIterator]) {
|
|
1737
1737
|
yield* e;
|
|
@@ -1842,16 +1842,16 @@ const Bc = (e) => {
|
|
|
1842
1842
|
data: b,
|
|
1843
1843
|
signal: w,
|
|
1844
1844
|
cancelToken: y,
|
|
1845
|
-
timeout:
|
|
1845
|
+
timeout: E,
|
|
1846
1846
|
onDownloadProgress: S,
|
|
1847
1847
|
onUploadProgress: C,
|
|
1848
|
-
responseType:
|
|
1848
|
+
responseType: R,
|
|
1849
1849
|
headers: I,
|
|
1850
1850
|
withCredentials: A = "same-origin",
|
|
1851
1851
|
fetchOptions: k
|
|
1852
1852
|
} = Bc(g), M = t || fetch;
|
|
1853
|
-
|
|
1854
|
-
let W =
|
|
1853
|
+
R = R ? (R + "").toLowerCase() : "text";
|
|
1854
|
+
let W = Rg([w, y && y.toAbortSignal()], E), G = null;
|
|
1855
1855
|
const N = W && W.unsubscribe && (() => {
|
|
1856
1856
|
W.unsubscribe();
|
|
1857
1857
|
});
|
|
@@ -1864,7 +1864,7 @@ const Bc = (e) => {
|
|
|
1864
1864
|
duplex: "half"
|
|
1865
1865
|
}), oe;
|
|
1866
1866
|
if (j.isFormData(b) && (oe = q.headers.get("content-type")) && I.setContentType(oe), q.body) {
|
|
1867
|
-
const [F, Q] =
|
|
1867
|
+
const [F, Q] = Za(
|
|
1868
1868
|
$,
|
|
1869
1869
|
So(Qa(C))
|
|
1870
1870
|
);
|
|
@@ -1883,13 +1883,13 @@ const Bc = (e) => {
|
|
|
1883
1883
|
};
|
|
1884
1884
|
G = s && new n(v, X);
|
|
1885
1885
|
let O = await (s ? M(G, k) : M(v, X));
|
|
1886
|
-
const _ = d && (
|
|
1886
|
+
const _ = d && (R === "stream" || R === "response");
|
|
1887
1887
|
if (d && (S || _ && N)) {
|
|
1888
1888
|
const q = {};
|
|
1889
1889
|
["status", "statusText", "headers"].forEach((de) => {
|
|
1890
1890
|
q[de] = O[de];
|
|
1891
1891
|
});
|
|
1892
|
-
const oe = j.toFiniteNumber(O.headers.get("content-length")), [F, Q] = S &&
|
|
1892
|
+
const oe = j.toFiniteNumber(O.headers.get("content-length")), [F, Q] = S && Za(
|
|
1893
1893
|
oe,
|
|
1894
1894
|
So(Qa(S), !0)
|
|
1895
1895
|
) || [];
|
|
@@ -1900,8 +1900,8 @@ const Bc = (e) => {
|
|
|
1900
1900
|
q
|
|
1901
1901
|
);
|
|
1902
1902
|
}
|
|
1903
|
-
|
|
1904
|
-
let z = await h[j.findKey(h,
|
|
1903
|
+
R = R || "text";
|
|
1904
|
+
let z = await h[j.findKey(h, R) || "text"](O, g);
|
|
1905
1905
|
return !_ && N && N(), await new Promise((q, oe) => {
|
|
1906
1906
|
Lc(q, oe, {
|
|
1907
1907
|
data: z,
|
|
@@ -1986,17 +1986,17 @@ function Is(e) {
|
|
|
1986
1986
|
throw new tr(null, e);
|
|
1987
1987
|
}
|
|
1988
1988
|
function al(e) {
|
|
1989
|
-
return Is(e), e.headers = mt.from(e.headers), e.data =
|
|
1989
|
+
return Is(e), e.headers = mt.from(e.headers), e.data = Es.call(
|
|
1990
1990
|
e,
|
|
1991
1991
|
e.transformRequest
|
|
1992
1992
|
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), $c.getAdapter(e.adapter || Dr.adapter, e)(e).then(function(r) {
|
|
1993
|
-
return Is(e), r.data =
|
|
1993
|
+
return Is(e), r.data = Es.call(
|
|
1994
1994
|
e,
|
|
1995
1995
|
e.transformResponse,
|
|
1996
1996
|
r
|
|
1997
1997
|
), r.headers = mt.from(r.headers), r;
|
|
1998
1998
|
}, function(r) {
|
|
1999
|
-
return Dc(r) || (Is(e), r && r.response && (r.response.data =
|
|
1999
|
+
return Dc(r) || (Is(e), r && r.response && (r.response.data = Es.call(
|
|
2000
2000
|
e,
|
|
2001
2001
|
e.transformResponse,
|
|
2002
2002
|
r.response
|
|
@@ -2085,7 +2085,7 @@ let Cn = class {
|
|
|
2085
2085
|
}
|
|
2086
2086
|
}
|
|
2087
2087
|
_request(t, n) {
|
|
2088
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
2088
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Rn(this.defaults, n);
|
|
2089
2089
|
const { transitional: r, paramsSerializer: o, headers: s } = n;
|
|
2090
2090
|
r !== void 0 && oo.assertOptions(r, {
|
|
2091
2091
|
silentJSONParsing: Vt.transitional(Vt.boolean),
|
|
@@ -2147,14 +2147,14 @@ let Cn = class {
|
|
|
2147
2147
|
return d;
|
|
2148
2148
|
}
|
|
2149
2149
|
getUri(t) {
|
|
2150
|
-
t =
|
|
2150
|
+
t = Rn(this.defaults, t);
|
|
2151
2151
|
const n = Fc(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
2152
2152
|
return _c(n, t.params, t.paramsSerializer);
|
|
2153
2153
|
}
|
|
2154
2154
|
};
|
|
2155
2155
|
j.forEach(["delete", "get", "head", "options"], function(t) {
|
|
2156
2156
|
Cn.prototype[t] = function(n, r) {
|
|
2157
|
-
return this.request(
|
|
2157
|
+
return this.request(Rn(r || {}, {
|
|
2158
2158
|
method: t,
|
|
2159
2159
|
url: n,
|
|
2160
2160
|
data: (r || {}).data
|
|
@@ -2164,7 +2164,7 @@ j.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
2164
2164
|
j.forEach(["post", "put", "patch"], function(t) {
|
|
2165
2165
|
function n(r) {
|
|
2166
2166
|
return function(s, i, a) {
|
|
2167
|
-
return this.request(
|
|
2167
|
+
return this.request(Rn(a || {}, {
|
|
2168
2168
|
method: t,
|
|
2169
2169
|
headers: r ? {
|
|
2170
2170
|
"Content-Type": "multipart/form-data"
|
|
@@ -2328,7 +2328,7 @@ Object.entries(ni).forEach(([e, t]) => {
|
|
|
2328
2328
|
function Wc(e) {
|
|
2329
2329
|
const t = new Cn(e), n = yc(Cn.prototype.request, t);
|
|
2330
2330
|
return j.extend(n, Cn.prototype, t, { allOwnKeys: !0 }), j.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
2331
|
-
return Wc(
|
|
2331
|
+
return Wc(Rn(e, o));
|
|
2332
2332
|
}, n;
|
|
2333
2333
|
}
|
|
2334
2334
|
const qe = Wc(Dr);
|
|
@@ -2345,7 +2345,7 @@ qe.all = function(t) {
|
|
|
2345
2345
|
};
|
|
2346
2346
|
qe.spread = Mg;
|
|
2347
2347
|
qe.isAxiosError = Dg;
|
|
2348
|
-
qe.mergeConfig =
|
|
2348
|
+
qe.mergeConfig = Rn;
|
|
2349
2349
|
qe.AxiosHeaders = mt;
|
|
2350
2350
|
qe.formToJSON = (e) => Mc(j.isHTMLForm(e) ? new FormData(e) : e);
|
|
2351
2351
|
qe.getAdapter = $c.getAdapter;
|
|
@@ -2365,8 +2365,8 @@ const {
|
|
|
2365
2365
|
toFormData: YT,
|
|
2366
2366
|
AxiosHeaders: XT,
|
|
2367
2367
|
HttpStatusCode: qT,
|
|
2368
|
-
formToJSON:
|
|
2369
|
-
getAdapter:
|
|
2368
|
+
formToJSON: JT,
|
|
2369
|
+
getAdapter: ZT,
|
|
2370
2370
|
mergeConfig: QT
|
|
2371
2371
|
} = qe, Ns = {};
|
|
2372
2372
|
function cl() {
|
|
@@ -2521,7 +2521,7 @@ class Ug {
|
|
|
2521
2521
|
return cl() && console.debug("[api.uploadExcel] <-", c), c;
|
|
2522
2522
|
}
|
|
2523
2523
|
}
|
|
2524
|
-
const
|
|
2524
|
+
const En = new Ug();
|
|
2525
2525
|
function Wg(e = {}) {
|
|
2526
2526
|
const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = fe(e.token ?? null), s = bt(e.headers ?? {}), [i, a] = fe(!1), [c, u] = fe(null), [d, h] = fe(""), [p, x] = fe(null), g = bt(null), v = Ye((y) => {
|
|
2527
2527
|
o(y);
|
|
@@ -2531,12 +2531,12 @@ function Wg(e = {}) {
|
|
|
2531
2531
|
}, []), b = Ye(() => {
|
|
2532
2532
|
h(""), x(null), u(null);
|
|
2533
2533
|
}, []), w = Ye(
|
|
2534
|
-
(y,
|
|
2534
|
+
(y, E, S) => {
|
|
2535
2535
|
g.current && (g.current.abort(), g.current = null), a(!0), u(null), e.autoAppendAssistant !== !1 && h("");
|
|
2536
2536
|
const C = new AbortController();
|
|
2537
2537
|
return g.current = C, (async () => {
|
|
2538
2538
|
var A, k, M, W, G;
|
|
2539
|
-
const
|
|
2539
|
+
const R = (() => {
|
|
2540
2540
|
var N;
|
|
2541
2541
|
try {
|
|
2542
2542
|
return typeof window < "u" && ((N = window.localStorage) == null ? void 0 : N.getItem("chat-debug")) === "1";
|
|
@@ -2573,7 +2573,7 @@ function Wg(e = {}) {
|
|
|
2573
2573
|
}
|
|
2574
2574
|
} catch {
|
|
2575
2575
|
}
|
|
2576
|
-
|
|
2576
|
+
R && console.debug("[use-chat] POST", t + n, I(y));
|
|
2577
2577
|
const $ = await fetch(t + n, {
|
|
2578
2578
|
method: "POST",
|
|
2579
2579
|
headers: {
|
|
@@ -2587,17 +2587,17 @@ function Wg(e = {}) {
|
|
|
2587
2587
|
});
|
|
2588
2588
|
if (!$.ok || !$.body) {
|
|
2589
2589
|
const _ = await $.text().catch(() => "");
|
|
2590
|
-
throw
|
|
2590
|
+
throw R && console.debug("[use-chat] non-OK response", $.status, _ == null ? void 0 : _.slice(0, 500)), new Error(`stream ${$.status}${_ ? ": " + _ : ""}`);
|
|
2591
2591
|
}
|
|
2592
2592
|
try {
|
|
2593
2593
|
const _ = $.headers.get("X-Thread-Id") || $.headers.get("x-thread-id"), z = $.headers.get("X-Thread-Created") || $.headers.get("x-thread-created"), q = _ ?? null, oe = String(z ?? "").toLowerCase() === "true";
|
|
2594
2594
|
try {
|
|
2595
2595
|
(W = S == null ? void 0 : S.onOpen) == null || W.call(S, { threadId: q, created: oe });
|
|
2596
2596
|
} catch (F) {
|
|
2597
|
-
|
|
2597
|
+
R && console.debug("[use-chat] onOpen handler threw:", F);
|
|
2598
2598
|
}
|
|
2599
2599
|
} catch (_) {
|
|
2600
|
-
|
|
2600
|
+
R && console.debug("[use-chat] failed to read headers:", _);
|
|
2601
2601
|
}
|
|
2602
2602
|
const L = $.body.getReader(), X = new TextDecoder();
|
|
2603
2603
|
let O = "";
|
|
@@ -2617,11 +2617,11 @@ function Wg(e = {}) {
|
|
|
2617
2617
|
try {
|
|
2618
2618
|
Q = JSON.parse(F);
|
|
2619
2619
|
} catch {
|
|
2620
|
-
|
|
2620
|
+
R && console.debug("[use-chat] skip malformed SSE data:", F == null ? void 0 : F.slice(0, 200));
|
|
2621
2621
|
continue;
|
|
2622
2622
|
}
|
|
2623
2623
|
const de = Vg(Q) ? Q.data : Q;
|
|
2624
|
-
if (
|
|
2624
|
+
if (R && console.debug("[use-chat] event:", de == null ? void 0 : de.type, de), E == null || E(de), de.type === "token")
|
|
2625
2625
|
e.autoAppendAssistant !== !1 && h((be) => be + de.content);
|
|
2626
2626
|
else if (de.type === "message_delta") {
|
|
2627
2627
|
const be = de.delta.filter((Y) => Y.type === "text").map((Y) => Y.text).join("");
|
|
@@ -2632,7 +2632,7 @@ function Wg(e = {}) {
|
|
|
2632
2632
|
} catch (N) {
|
|
2633
2633
|
if ((N == null ? void 0 : N.name) === "AbortError") return;
|
|
2634
2634
|
const $ = (N == null ? void 0 : N.message) || String(N);
|
|
2635
|
-
|
|
2635
|
+
R && console.debug("[use-chat] error:", $), u($), (G = S == null ? void 0 : S.onError) == null || G.call(S, $);
|
|
2636
2636
|
} finally {
|
|
2637
2637
|
a(!1), g.current = null;
|
|
2638
2638
|
}
|
|
@@ -2757,7 +2757,7 @@ function Yg(e, t) {
|
|
|
2757
2757
|
return { ...e, messages: u };
|
|
2758
2758
|
}
|
|
2759
2759
|
if (o.type === "checkpoint") {
|
|
2760
|
-
const s =
|
|
2760
|
+
const s = Zg(e.messages, o.checkpointId);
|
|
2761
2761
|
return { ...e, lastCheckpointId: o.checkpointId, messages: s };
|
|
2762
2762
|
}
|
|
2763
2763
|
if (o.type === "branch") {
|
|
@@ -2816,9 +2816,9 @@ function qg(e, t, n) {
|
|
|
2816
2816
|
});
|
|
2817
2817
|
}
|
|
2818
2818
|
function hl(e, t, n) {
|
|
2819
|
-
return e.map((r) => r.id === t ? { ...r, content:
|
|
2819
|
+
return e.map((r) => r.id === t ? { ...r, content: Jg(r.content, n) } : r);
|
|
2820
2820
|
}
|
|
2821
|
-
function
|
|
2821
|
+
function Jg(e, t) {
|
|
2822
2822
|
const n = e.slice();
|
|
2823
2823
|
for (const r of t)
|
|
2824
2824
|
if (r.type === "text") {
|
|
@@ -2828,7 +2828,7 @@ function Zg(e, t) {
|
|
|
2828
2828
|
n.push(r);
|
|
2829
2829
|
return n;
|
|
2830
2830
|
}
|
|
2831
|
-
function
|
|
2831
|
+
function Zg(e, t) {
|
|
2832
2832
|
for (let n = e.length - 1; n >= 0; n--)
|
|
2833
2833
|
if (e[n].role === "assistant") {
|
|
2834
2834
|
const o = { ...e[n], checkpointId: t };
|
|
@@ -2925,7 +2925,7 @@ async function rv(e, t = [], n, r, o, s) {
|
|
|
2925
2925
|
}
|
|
2926
2926
|
const Vc = gc(null);
|
|
2927
2927
|
function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialThreadId: o = null, historyPageSize: s, autoLoadInitial: i = !0, enableFileAgentRouting: a = !1, fileAgentId: c = "invoice_reader" }) {
|
|
2928
|
-
const u =
|
|
2928
|
+
const u = En;
|
|
2929
2929
|
Ve(() => {
|
|
2930
2930
|
t && u.updateConfig({
|
|
2931
2931
|
baseUrl: t.baseUrl,
|
|
@@ -2952,12 +2952,12 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2952
2952
|
}, [u, g]);
|
|
2953
2953
|
const b = Ye((H) => {
|
|
2954
2954
|
u.setAuthToken(H);
|
|
2955
|
-
}, [u]), { state: w, seed: y, prepend:
|
|
2955
|
+
}, [u]), { state: w, seed: y, prepend: E, pushUser: S, onEvent: C, reset: R } = Xg(), I = s && s > 0 ? s : 6, [A, k] = fe(!1), [M, W] = fe(!1), [G, N] = fe(null), [$, L] = fe(void 0), X = Ye(
|
|
2956
2956
|
(H, ae) => {
|
|
2957
2957
|
const Be = Array.isArray(H == null ? void 0 : H.messages) ? H.messages : [];
|
|
2958
|
-
ae === "replace" ? y(Be) : ae === "prepend" && Be.length &&
|
|
2958
|
+
ae === "replace" ? y(Be) : ae === "prepend" && Be.length && E(Be), N((H == null ? void 0 : H.nextCursor) ?? null), k(!!(H != null && H.hasMore)), L((nt) => (H == null ? void 0 : H.checkpointId) ?? nt ?? void 0);
|
|
2959
2959
|
},
|
|
2960
|
-
[y,
|
|
2960
|
+
[y, E]
|
|
2961
2961
|
), [O, _] = fe([]), [z, q] = fe(null), oe = Ye(async () => {
|
|
2962
2962
|
const H = await u.listThreads();
|
|
2963
2963
|
_(H);
|
|
@@ -3061,7 +3061,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3061
3061
|
}
|
|
3062
3062
|
},
|
|
3063
3063
|
[u, X]
|
|
3064
|
-
),
|
|
3064
|
+
), Z = Ye(async (H) => {
|
|
3065
3065
|
const ae = await u.listCheckpoints(H);
|
|
3066
3066
|
return ev(ae, H);
|
|
3067
3067
|
}, [u]), ne = Ye(async (H) => {
|
|
@@ -3102,8 +3102,8 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3102
3102
|
const ae = await u.createThread(H);
|
|
3103
3103
|
return await oe(), await P(ae.threadId), ae.threadId;
|
|
3104
3104
|
}, [u, oe, P]), Fe = Ye(async (H) => {
|
|
3105
|
-
await u.deleteThread(H), await oe(), z === H && (q(null),
|
|
3106
|
-
}, [u, oe, z,
|
|
3105
|
+
await u.deleteThread(H), await oe(), z === H && (q(null), R([]), k(!1), N(null), L(void 0));
|
|
3106
|
+
}, [u, oe, z, R]), Le = Ye(async (H, ae) => {
|
|
3107
3107
|
await u.updateThread(H, ae), await oe();
|
|
3108
3108
|
}, [u, oe]), ce = Ye(async (H, ae) => {
|
|
3109
3109
|
var Dn;
|
|
@@ -3193,7 +3193,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3193
3193
|
isLoadingHistory: M,
|
|
3194
3194
|
loadOlderMessages: Ae,
|
|
3195
3195
|
historyPageSize: I,
|
|
3196
|
-
listCheckpoints:
|
|
3196
|
+
listCheckpoints: Z,
|
|
3197
3197
|
navigateToCheckpoint: ne,
|
|
3198
3198
|
returnToLatest: le,
|
|
3199
3199
|
refreshThreads: oe,
|
|
@@ -3362,7 +3362,7 @@ function cv(e) {
|
|
|
3362
3362
|
}
|
|
3363
3363
|
function V(e) {
|
|
3364
3364
|
let t = e;
|
|
3365
|
-
const n =
|
|
3365
|
+
const n = Ee();
|
|
3366
3366
|
return (r, o) => {
|
|
3367
3367
|
switch (r) {
|
|
3368
3368
|
case Vo:
|
|
@@ -3381,7 +3381,7 @@ function V(e) {
|
|
|
3381
3381
|
function ct(e, t) {
|
|
3382
3382
|
return Go(V(t), (n) => ue(e, n));
|
|
3383
3383
|
}
|
|
3384
|
-
function
|
|
3384
|
+
function Ee() {
|
|
3385
3385
|
const e = [];
|
|
3386
3386
|
return (t, n) => {
|
|
3387
3387
|
switch (t) {
|
|
@@ -3402,7 +3402,7 @@ function Re() {
|
|
|
3402
3402
|
};
|
|
3403
3403
|
}
|
|
3404
3404
|
function St(e) {
|
|
3405
|
-
return Go(
|
|
3405
|
+
return Go(Ee(), (t) => ue(e, t));
|
|
3406
3406
|
}
|
|
3407
3407
|
function je(e, t = [], { singleton: n } = { singleton: !0 }) {
|
|
3408
3408
|
return {
|
|
@@ -3422,8 +3422,8 @@ function dv(e) {
|
|
|
3422
3422
|
};
|
|
3423
3423
|
return n(e);
|
|
3424
3424
|
}
|
|
3425
|
-
function
|
|
3426
|
-
const t =
|
|
3425
|
+
function Ze(...e) {
|
|
3426
|
+
const t = Ee(), n = new Array(e.length);
|
|
3427
3427
|
let r = 0;
|
|
3428
3428
|
const o = Math.pow(2, e.length) - 1;
|
|
3429
3429
|
return e.forEach((s, i) => {
|
|
@@ -3591,7 +3591,7 @@ function Xc(e, t, n) {
|
|
|
3591
3591
|
}
|
|
3592
3592
|
const ft = je(
|
|
3593
3593
|
() => {
|
|
3594
|
-
const e =
|
|
3594
|
+
const e = Ee(), t = Ee(), n = V(0), r = Ee(), o = V(0), s = Ee(), i = Ee(), a = V(0), c = V(0), u = V(0), d = V(0), h = Ee(), p = Ee(), x = V(!1), g = V(!1), v = V(!1);
|
|
3595
3595
|
return ue(
|
|
3596
3596
|
B(
|
|
3597
3597
|
e,
|
|
@@ -3680,8 +3680,8 @@ function ai(e, t) {
|
|
|
3680
3680
|
if (De(o))
|
|
3681
3681
|
return r;
|
|
3682
3682
|
{
|
|
3683
|
-
const [s, i] =
|
|
3684
|
-
return io(et(e, { k: s, l:
|
|
3683
|
+
const [s, i] = Zc(r);
|
|
3684
|
+
return io(et(e, { k: s, l: Jc(r), v: i }));
|
|
3685
3685
|
}
|
|
3686
3686
|
} else return t < n ? io(et(e, { l: ai(r, t) })) : io(et(e, { r: ai(o, t) }));
|
|
3687
3687
|
}
|
|
@@ -3738,14 +3738,14 @@ function et(e, t) {
|
|
|
3738
3738
|
t.r !== void 0 ? t.r : e.r
|
|
3739
3739
|
);
|
|
3740
3740
|
}
|
|
3741
|
-
function
|
|
3742
|
-
return De(e.r) ? e.l : io(et(e, { r:
|
|
3741
|
+
function Jc(e) {
|
|
3742
|
+
return De(e.r) ? e.l : io(et(e, { r: Jc(e.r) }));
|
|
3743
3743
|
}
|
|
3744
3744
|
function ks(e) {
|
|
3745
3745
|
return De(e) || e.lvl > e.r.lvl;
|
|
3746
3746
|
}
|
|
3747
|
-
function
|
|
3748
|
-
return De(e.r) ? [e.k, e.v] :
|
|
3747
|
+
function Zc(e) {
|
|
3748
|
+
return De(e.r) ? [e.k, e.v] : Zc(e.r);
|
|
3749
3749
|
}
|
|
3750
3750
|
function Qc(e, t, n, r = yr, o = yr) {
|
|
3751
3751
|
return { k: e, l: r, lvl: n, r: o, v: t };
|
|
@@ -3829,7 +3829,7 @@ function bv(e, t) {
|
|
|
3829
3829
|
continue;
|
|
3830
3830
|
}
|
|
3831
3831
|
const a = Ko(e, i - 1, o + 1);
|
|
3832
|
-
if (a.some(
|
|
3832
|
+
if (a.some(Ev(r)))
|
|
3833
3833
|
continue;
|
|
3834
3834
|
let c = !1, u = !1;
|
|
3835
3835
|
for (const { end: d, start: h, value: p } of a)
|
|
@@ -3868,7 +3868,7 @@ function ou(e, t, n) {
|
|
|
3868
3868
|
}
|
|
3869
3869
|
}
|
|
3870
3870
|
function Sv(e, t, n, r = 0) {
|
|
3871
|
-
return r > 0 && (t = Math.max(t, nu(e, r, Ui).offset)), qc(vv(e, t, n, yv),
|
|
3871
|
+
return r > 0 && (t = Math.max(t, nu(e, r, Ui).offset)), qc(vv(e, t, n, yv), Rv);
|
|
3872
3872
|
}
|
|
3873
3873
|
function Cv(e, [t, n, r, o]) {
|
|
3874
3874
|
t.length > 0 && r("received item sizes", t, gt.DEBUG);
|
|
@@ -3927,19 +3927,19 @@ function ui(e, t, n, r) {
|
|
|
3927
3927
|
offsetTree: o
|
|
3928
3928
|
};
|
|
3929
3929
|
}
|
|
3930
|
-
function
|
|
3930
|
+
function Rv(e) {
|
|
3931
3931
|
return { index: e.index, value: e };
|
|
3932
3932
|
}
|
|
3933
|
-
function
|
|
3933
|
+
function Ev(e) {
|
|
3934
3934
|
const { endIndex: t, size: n, startIndex: r } = e;
|
|
3935
3935
|
return (o) => o.start === r && (o.end === t || o.end === 1 / 0) && o.value === n;
|
|
3936
3936
|
}
|
|
3937
3937
|
const Iv = {
|
|
3938
3938
|
offsetHeight: "height",
|
|
3939
3939
|
offsetWidth: "width"
|
|
3940
|
-
},
|
|
3940
|
+
}, Zt = je(
|
|
3941
3941
|
([{ log: e }, { recalcInProgress: t }]) => {
|
|
3942
|
-
const n =
|
|
3942
|
+
const n = Ee(), r = Ee(), o = ct(r, 0), s = Ee(), i = Ee(), a = V(0), c = V([]), u = V(void 0), d = V(void 0), h = V((S, C) => cn(S, Iv[C])), p = V(void 0), x = V(0), g = xv(), v = ct(
|
|
3943
3943
|
B(n, Se(c, e, x), Yt(Cv, g), He()),
|
|
3944
3944
|
g
|
|
3945
3945
|
), m = ct(
|
|
@@ -3959,8 +3959,8 @@ const Iv = {
|
|
|
3959
3959
|
c,
|
|
3960
3960
|
pe((S) => S.length > 0),
|
|
3961
3961
|
Se(v, x),
|
|
3962
|
-
re(([S, C,
|
|
3963
|
-
const I = S.reduce((A, k, M) => yt(A, k, Tr(k, C.offsetTree,
|
|
3962
|
+
re(([S, C, R]) => {
|
|
3963
|
+
const I = S.reduce((A, k, M) => yt(A, k, Tr(k, C.offsetTree, R) || M), Vn());
|
|
3964
3964
|
return {
|
|
3965
3965
|
...C,
|
|
3966
3966
|
groupIndices: S,
|
|
@@ -3974,10 +3974,10 @@ const Iv = {
|
|
|
3974
3974
|
r,
|
|
3975
3975
|
Se(v),
|
|
3976
3976
|
pe(([S, { lastIndex: C }]) => S < C),
|
|
3977
|
-
re(([S, { lastIndex: C, lastSize:
|
|
3977
|
+
re(([S, { lastIndex: C, lastSize: R }]) => [
|
|
3978
3978
|
{
|
|
3979
3979
|
endIndex: C,
|
|
3980
|
-
size:
|
|
3980
|
+
size: R,
|
|
3981
3981
|
startIndex: S
|
|
3982
3982
|
}
|
|
3983
3983
|
])
|
|
@@ -4004,9 +4004,9 @@ const Iv = {
|
|
|
4004
4004
|
n,
|
|
4005
4005
|
Se(v),
|
|
4006
4006
|
Yt(
|
|
4007
|
-
({ sizes: S }, [C,
|
|
4008
|
-
changed:
|
|
4009
|
-
sizes:
|
|
4007
|
+
({ sizes: S }, [C, R]) => ({
|
|
4008
|
+
changed: R !== S,
|
|
4009
|
+
sizes: R
|
|
4010
4010
|
}),
|
|
4011
4011
|
{ changed: !1, sizes: g }
|
|
4012
4012
|
),
|
|
@@ -4027,8 +4027,8 @@ const Iv = {
|
|
|
4027
4027
|
if (S > 0)
|
|
4028
4028
|
ye(t, !0), ye(s, S + bl(S, C));
|
|
4029
4029
|
else if (S < 0) {
|
|
4030
|
-
const
|
|
4031
|
-
|
|
4030
|
+
const R = Xe(m);
|
|
4031
|
+
R.length > 0 && (S -= bl(-S, R)), ye(i, S);
|
|
4032
4032
|
}
|
|
4033
4033
|
}
|
|
4034
4034
|
), Oe(B(a, Se(e)), ([S, C]) => {
|
|
@@ -4044,8 +4044,8 @@ const Iv = {
|
|
|
4044
4044
|
s,
|
|
4045
4045
|
Se(v),
|
|
4046
4046
|
re(([S, C]) => {
|
|
4047
|
-
const
|
|
4048
|
-
if (
|
|
4047
|
+
const R = C.groupIndices.length > 0, I = [], A = C.lastSize;
|
|
4048
|
+
if (R) {
|
|
4049
4049
|
const k = Sr(C.sizeTree, 0);
|
|
4050
4050
|
let M = 0, W = 0;
|
|
4051
4051
|
for (; M < S; ) {
|
|
@@ -4100,13 +4100,13 @@ const Iv = {
|
|
|
4100
4100
|
),
|
|
4101
4101
|
n
|
|
4102
4102
|
);
|
|
4103
|
-
const
|
|
4103
|
+
const E = St(
|
|
4104
4104
|
B(
|
|
4105
4105
|
i,
|
|
4106
4106
|
Se(v, x),
|
|
4107
|
-
re(([S, { offsetTree: C },
|
|
4107
|
+
re(([S, { offsetTree: C }, R]) => {
|
|
4108
4108
|
const I = -S;
|
|
4109
|
-
return Tr(I, C,
|
|
4109
|
+
return Tr(I, C, R);
|
|
4110
4110
|
})
|
|
4111
4111
|
)
|
|
4112
4112
|
);
|
|
@@ -4114,7 +4114,7 @@ const Iv = {
|
|
|
4114
4114
|
B(
|
|
4115
4115
|
i,
|
|
4116
4116
|
Se(v, x),
|
|
4117
|
-
re(([S, C,
|
|
4117
|
+
re(([S, C, R]) => {
|
|
4118
4118
|
if (C.groupIndices.length > 0) {
|
|
4119
4119
|
if (De(C.sizeTree))
|
|
4120
4120
|
return C;
|
|
@@ -4135,14 +4135,14 @@ const Iv = {
|
|
|
4135
4135
|
return {
|
|
4136
4136
|
...C,
|
|
4137
4137
|
sizeTree: I,
|
|
4138
|
-
...ui(C.offsetTree, 0, I,
|
|
4138
|
+
...ui(C.offsetTree, 0, I, R)
|
|
4139
4139
|
};
|
|
4140
4140
|
} else {
|
|
4141
4141
|
const I = Sn(C.sizeTree).reduce((A, { k, v: M }) => yt(A, Math.max(0, k + S), M), Vn());
|
|
4142
4142
|
return {
|
|
4143
4143
|
...C,
|
|
4144
4144
|
sizeTree: I,
|
|
4145
|
-
...ui(C.offsetTree, 0, I,
|
|
4145
|
+
...ui(C.offsetTree, 0, I, R)
|
|
4146
4146
|
};
|
|
4147
4147
|
}
|
|
4148
4148
|
})
|
|
@@ -4160,7 +4160,7 @@ const Iv = {
|
|
|
4160
4160
|
itemSize: h,
|
|
4161
4161
|
listRefresh: w,
|
|
4162
4162
|
shiftWith: i,
|
|
4163
|
-
shiftWithOffset:
|
|
4163
|
+
shiftWithOffset: E,
|
|
4164
4164
|
sizeRanges: n,
|
|
4165
4165
|
// output
|
|
4166
4166
|
sizes: v,
|
|
@@ -4184,7 +4184,7 @@ function Nv(e) {
|
|
|
4184
4184
|
}
|
|
4185
4185
|
const su = je(
|
|
4186
4186
|
([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, scrollTop: o }]) => {
|
|
4187
|
-
const s =
|
|
4187
|
+
const s = Ee(), i = Ee(), a = St(B(s, re(Nv)));
|
|
4188
4188
|
return ue(
|
|
4189
4189
|
B(
|
|
4190
4190
|
a,
|
|
@@ -4199,7 +4199,7 @@ const su = je(
|
|
|
4199
4199
|
e
|
|
4200
4200
|
), ue(
|
|
4201
4201
|
B(
|
|
4202
|
-
|
|
4202
|
+
Ze(o, t, r),
|
|
4203
4203
|
pe(([c, u]) => Yo(u)),
|
|
4204
4204
|
re(([c, u, d]) => Bt(u.groupOffsetTree, Math.max(c - d, 0), "v")[0]),
|
|
4205
4205
|
He(),
|
|
@@ -4208,7 +4208,7 @@ const su = je(
|
|
|
4208
4208
|
i
|
|
4209
4209
|
), { groupCounts: s, topItemsIndexes: i };
|
|
4210
4210
|
},
|
|
4211
|
-
$e(
|
|
4211
|
+
$e(Zt, ft)
|
|
4212
4212
|
), mn = je(
|
|
4213
4213
|
([{ log: e }]) => {
|
|
4214
4214
|
const t = V(!1), n = St(
|
|
@@ -4244,7 +4244,7 @@ const Lr = je(
|
|
|
4244
4244
|
},
|
|
4245
4245
|
{ log: p }
|
|
4246
4246
|
]) => {
|
|
4247
|
-
const x =
|
|
4247
|
+
const x = Ee(), g = Ee(), v = V(0);
|
|
4248
4248
|
let m = null, b = null, w = null;
|
|
4249
4249
|
function y() {
|
|
4250
4250
|
m && (m(), m = null), w && (w(), w = null), b && (clearTimeout(b), b = null), ye(c, !1);
|
|
@@ -4256,16 +4256,16 @@ const Lr = je(
|
|
|
4256
4256
|
Se(e, s, o),
|
|
4257
4257
|
re(
|
|
4258
4258
|
([
|
|
4259
|
-
[
|
|
4259
|
+
[E, S, C, R, I, A, k, M],
|
|
4260
4260
|
W,
|
|
4261
4261
|
G,
|
|
4262
4262
|
N
|
|
4263
4263
|
]) => {
|
|
4264
|
-
const $ = iu(
|
|
4264
|
+
const $ = iu(E), { align: L, behavior: X, offset: O } = $, _ = R - 1, z = ou($, S, _);
|
|
4265
4265
|
let q = Tr(z, S.offsetTree, W) + A;
|
|
4266
4266
|
L === "end" ? (q += G + Bt(S.sizeTree, z)[1] - C + N, z === _ && (q += k)) : L === "center" ? q += (G + Bt(S.sizeTree, z)[1] - C + N) / 2 : q -= I, O && (q += O);
|
|
4267
4267
|
const oe = (F) => {
|
|
4268
|
-
y(), F ? (M("retrying to scroll to", { location:
|
|
4268
|
+
y(), F ? (M("retrying to scroll to", { location: E }, gt.DEBUG), ye(x, E)) : (ye(g, !0), M("list did not change, scroll successful", {}, gt.DEBUG));
|
|
4269
4269
|
};
|
|
4270
4270
|
if (y(), X === "smooth") {
|
|
4271
4271
|
let F = !1;
|
|
@@ -4289,7 +4289,7 @@ const Lr = je(
|
|
|
4289
4289
|
topListHeight: v
|
|
4290
4290
|
};
|
|
4291
4291
|
},
|
|
4292
|
-
$e(
|
|
4292
|
+
$e(Zt, ft, pn),
|
|
4293
4293
|
{ singleton: !0 }
|
|
4294
4294
|
);
|
|
4295
4295
|
function Av(e) {
|
|
@@ -4332,7 +4332,7 @@ const Fr = je(
|
|
|
4332
4332
|
u
|
|
4333
4333
|
), Oe(
|
|
4334
4334
|
B(
|
|
4335
|
-
|
|
4335
|
+
Ze(t, i),
|
|
4336
4336
|
Se(a, n, e, u),
|
|
4337
4337
|
pe(([[, d], h, { sizeTree: p }, x, g]) => d && (!De(p) || Bi(x)) && !h && !g),
|
|
4338
4338
|
Se(c)
|
|
@@ -4352,13 +4352,13 @@ const Fr = je(
|
|
|
4352
4352
|
scrolledToInitialItem: a
|
|
4353
4353
|
};
|
|
4354
4354
|
},
|
|
4355
|
-
$e(
|
|
4355
|
+
$e(Zt, ft, Lr, mn),
|
|
4356
4356
|
{ singleton: !0 }
|
|
4357
4357
|
);
|
|
4358
4358
|
function au(e, t) {
|
|
4359
4359
|
return Math.abs(e - t) < 1.01;
|
|
4360
4360
|
}
|
|
4361
|
-
const
|
|
4361
|
+
const Rr = "up", gr = "down", kv = "none", Pv = {
|
|
4362
4362
|
atBottom: !1,
|
|
4363
4363
|
notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
|
|
4364
4364
|
state: {
|
|
@@ -4368,7 +4368,7 @@ const Er = "up", gr = "down", kv = "none", Pv = {
|
|
|
4368
4368
|
viewportHeight: 0
|
|
4369
4369
|
}
|
|
4370
4370
|
}, _v = 0, Br = je(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
|
|
4371
|
-
const i = V(!1), a = V(!0), c =
|
|
4371
|
+
const i = V(!1), a = V(!0), c = Ee(), u = Ee(), d = V(4), h = V(_v), p = ct(
|
|
4372
4372
|
B(
|
|
4373
4373
|
ii(B(he(o), In(1), Gt(!0)), B(he(o), In(1), Gt(!1), gl(100))),
|
|
4374
4374
|
He()
|
|
@@ -4380,7 +4380,7 @@ const Er = "up", gr = "down", kv = "none", Pv = {
|
|
|
4380
4380
|
);
|
|
4381
4381
|
ue(
|
|
4382
4382
|
B(
|
|
4383
|
-
|
|
4383
|
+
Ze(he(o), he(h)),
|
|
4384
4384
|
re(([w, y]) => w <= y),
|
|
4385
4385
|
He()
|
|
4386
4386
|
),
|
|
@@ -4388,16 +4388,16 @@ const Er = "up", gr = "down", kv = "none", Pv = {
|
|
|
4388
4388
|
), ue(B(a, nn(50)), u);
|
|
4389
4389
|
const g = St(
|
|
4390
4390
|
B(
|
|
4391
|
-
|
|
4392
|
-
Yt((w, [{ scrollHeight: y, scrollTop:
|
|
4393
|
-
const A =
|
|
4391
|
+
Ze(r, he(s), he(t), he(e), he(d)),
|
|
4392
|
+
Yt((w, [{ scrollHeight: y, scrollTop: E }, S, C, R, I]) => {
|
|
4393
|
+
const A = E + S - y > -I, k = {
|
|
4394
4394
|
scrollHeight: y,
|
|
4395
|
-
scrollTop:
|
|
4395
|
+
scrollTop: E,
|
|
4396
4396
|
viewportHeight: S
|
|
4397
4397
|
};
|
|
4398
4398
|
if (A) {
|
|
4399
4399
|
let W, G;
|
|
4400
|
-
return
|
|
4400
|
+
return E > w.state.scrollTop ? (W = "SCROLLED_DOWN", G = w.state.scrollTop - E) : (W = "SIZE_DECREASED", G = w.state.scrollTop - E || w.scrollTopDelta), {
|
|
4401
4401
|
atBottom: !0,
|
|
4402
4402
|
atBottomBecause: W,
|
|
4403
4403
|
scrollTopDelta: G,
|
|
@@ -4405,7 +4405,7 @@ const Er = "up", gr = "down", kv = "none", Pv = {
|
|
|
4405
4405
|
};
|
|
4406
4406
|
}
|
|
4407
4407
|
let M;
|
|
4408
|
-
return k.scrollHeight > w.state.scrollHeight ? M = "SIZE_INCREASED" : S < w.state.viewportHeight ? M = "VIEWPORT_HEIGHT_DECREASING" :
|
|
4408
|
+
return k.scrollHeight > w.state.scrollHeight ? M = "SIZE_INCREASED" : S < w.state.viewportHeight ? M = "VIEWPORT_HEIGHT_DECREASING" : E < w.state.scrollTop ? M = "SCROLLING_UPWARDS" : M = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
|
|
4409
4409
|
atBottom: !1,
|
|
4410
4410
|
notAtBottomBecause: M,
|
|
4411
4411
|
state: k
|
|
@@ -4417,26 +4417,26 @@ const Er = "up", gr = "down", kv = "none", Pv = {
|
|
|
4417
4417
|
B(
|
|
4418
4418
|
r,
|
|
4419
4419
|
Yt(
|
|
4420
|
-
(w, { scrollHeight: y, scrollTop:
|
|
4420
|
+
(w, { scrollHeight: y, scrollTop: E, viewportHeight: S }) => {
|
|
4421
4421
|
if (au(w.scrollHeight, y))
|
|
4422
4422
|
return {
|
|
4423
4423
|
changed: !1,
|
|
4424
4424
|
jump: 0,
|
|
4425
4425
|
scrollHeight: y,
|
|
4426
|
-
scrollTop:
|
|
4426
|
+
scrollTop: E
|
|
4427
4427
|
};
|
|
4428
4428
|
{
|
|
4429
|
-
const C = y - (
|
|
4430
|
-
return w.scrollTop !==
|
|
4429
|
+
const C = y - (E + S) < 1;
|
|
4430
|
+
return w.scrollTop !== E && C ? {
|
|
4431
4431
|
changed: !0,
|
|
4432
|
-
jump: w.scrollTop -
|
|
4432
|
+
jump: w.scrollTop - E,
|
|
4433
4433
|
scrollHeight: y,
|
|
4434
|
-
scrollTop:
|
|
4434
|
+
scrollTop: E
|
|
4435
4435
|
} : {
|
|
4436
4436
|
changed: !0,
|
|
4437
4437
|
jump: 0,
|
|
4438
4438
|
scrollHeight: y,
|
|
4439
|
-
scrollTop:
|
|
4439
|
+
scrollTop: E
|
|
4440
4440
|
};
|
|
4441
4441
|
}
|
|
4442
4442
|
},
|
|
@@ -4461,7 +4461,7 @@ const Er = "up", gr = "down", kv = "none", Pv = {
|
|
|
4461
4461
|
re(({ scrollTop: w }) => w),
|
|
4462
4462
|
He(),
|
|
4463
4463
|
Yt(
|
|
4464
|
-
(w, y) => Xe(x) ? { direction: w.direction, prevScrollTop: y } : { direction: y < w.prevScrollTop ?
|
|
4464
|
+
(w, y) => Xe(x) ? { direction: w.direction, prevScrollTop: y } : { direction: y < w.prevScrollTop ? Rr : gr, prevScrollTop: y },
|
|
4465
4465
|
{ direction: gr, prevScrollTop: 0 }
|
|
4466
4466
|
),
|
|
4467
4467
|
re((w) => w.direction)
|
|
@@ -4482,7 +4482,7 @@ const Er = "up", gr = "down", kv = "none", Pv = {
|
|
|
4482
4482
|
nn(100),
|
|
4483
4483
|
Se(p),
|
|
4484
4484
|
pe(([w, y]) => !!y),
|
|
4485
|
-
Yt(([w, y], [
|
|
4485
|
+
Yt(([w, y], [E]) => [y, E], [0, 0]),
|
|
4486
4486
|
re(([w, y]) => y - w)
|
|
4487
4487
|
),
|
|
4488
4488
|
b
|
|
@@ -4499,9 +4499,9 @@ const Er = "up", gr = "down", kv = "none", Pv = {
|
|
|
4499
4499
|
scrollDirection: m,
|
|
4500
4500
|
scrollVelocity: b
|
|
4501
4501
|
};
|
|
4502
|
-
}, $e(ft)),
|
|
4502
|
+
}, $e(ft)), Ro = "top", Eo = "bottom", wl = "none";
|
|
4503
4503
|
function yl(e, t, n) {
|
|
4504
|
-
return typeof e == "number" ? n ===
|
|
4504
|
+
return typeof e == "number" ? n === Rr && t === Ro || n === gr && t === Eo ? e : 0 : n === Rr ? t === Ro ? e.main : e.reverse : t === Eo ? e.main : e.reverse;
|
|
4505
4505
|
}
|
|
4506
4506
|
function Sl(e, t) {
|
|
4507
4507
|
var n;
|
|
@@ -4509,9 +4509,9 @@ function Sl(e, t) {
|
|
|
4509
4509
|
}
|
|
4510
4510
|
const Gi = je(
|
|
4511
4511
|
([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: o }]) => {
|
|
4512
|
-
const s =
|
|
4512
|
+
const s = Ee(), i = V(0), a = V(0), c = V(0), u = ct(
|
|
4513
4513
|
B(
|
|
4514
|
-
|
|
4514
|
+
Ze(
|
|
4515
4515
|
he(r),
|
|
4516
4516
|
he(o),
|
|
4517
4517
|
he(n),
|
|
@@ -4534,12 +4534,12 @@ const Gi = je(
|
|
|
4534
4534
|
w,
|
|
4535
4535
|
y
|
|
4536
4536
|
]) => {
|
|
4537
|
-
const
|
|
4538
|
-
let
|
|
4539
|
-
const I = Sl(y,
|
|
4540
|
-
return x -= w, x += p + b, g += p + b, g -= w, x > d + S - I && (
|
|
4541
|
-
Math.max(
|
|
4542
|
-
|
|
4537
|
+
const E = d - w, S = m + b, C = Math.max(p - E, 0);
|
|
4538
|
+
let R = wl;
|
|
4539
|
+
const I = Sl(y, Ro), A = Sl(y, Eo);
|
|
4540
|
+
return x -= w, x += p + b, g += p + b, g -= w, x > d + S - I && (R = Rr), g < d - C + h + A && (R = gr), R !== wl ? [
|
|
4541
|
+
Math.max(E - p - yl(v, Ro, R) - I, 0),
|
|
4542
|
+
E - C - b + h + yl(v, Eo, R) + A
|
|
4543
4543
|
] : null;
|
|
4544
4544
|
}
|
|
4545
4545
|
),
|
|
@@ -4656,11 +4656,11 @@ const _n = je(
|
|
|
4656
4656
|
{ didMount: x },
|
|
4657
4657
|
{ recalcInProgress: g }
|
|
4658
4658
|
]) => {
|
|
4659
|
-
const v = V([]), m = V(0), b =
|
|
4659
|
+
const v = V([]), m = V(0), b = Ee();
|
|
4660
4660
|
ue(s.topItemsIndexes, v);
|
|
4661
4661
|
const w = ct(
|
|
4662
4662
|
B(
|
|
4663
|
-
|
|
4663
|
+
Ze(
|
|
4664
4664
|
x,
|
|
4665
4665
|
g,
|
|
4666
4666
|
he(c, Cr),
|
|
@@ -4673,15 +4673,15 @@ const _n = je(
|
|
|
4673
4673
|
he(n),
|
|
4674
4674
|
e
|
|
4675
4675
|
),
|
|
4676
|
-
pe(([C,
|
|
4676
|
+
pe(([C, R, , I, , , , , , , A]) => {
|
|
4677
4677
|
const k = A && A.length !== I;
|
|
4678
|
-
return C && !
|
|
4678
|
+
return C && !R && !k;
|
|
4679
4679
|
}),
|
|
4680
4680
|
re(
|
|
4681
4681
|
([
|
|
4682
4682
|
,
|
|
4683
4683
|
,
|
|
4684
|
-
[C,
|
|
4684
|
+
[C, R],
|
|
4685
4685
|
I,
|
|
4686
4686
|
A,
|
|
4687
4687
|
k,
|
|
@@ -4694,7 +4694,7 @@ const _n = je(
|
|
|
4694
4694
|
const L = A, { offsetTree: X, sizeTree: O } = L, _ = Xe(m);
|
|
4695
4695
|
if (I === 0)
|
|
4696
4696
|
return { ...Ps, totalCount: I };
|
|
4697
|
-
if (C === 0 &&
|
|
4697
|
+
if (C === 0 && R === 0)
|
|
4698
4698
|
return _ === 0 ? { ...Ps, totalCount: I } : lu(_, k, A, G, N, $ || []);
|
|
4699
4699
|
if (De(O))
|
|
4700
4700
|
return _ > 0 ? null : ao(
|
|
@@ -4710,29 +4710,29 @@ const _n = je(
|
|
|
4710
4710
|
const de = W[0], be = W[W.length - 1];
|
|
4711
4711
|
let Y = 0;
|
|
4712
4712
|
for (const P of Ko(O, de, be)) {
|
|
4713
|
-
const
|
|
4713
|
+
const Z = P.value, ne = Math.max(P.start, de), le = Math.min(P.end, be);
|
|
4714
4714
|
for (let ie = ne; ie <= le; ie++)
|
|
4715
|
-
z.push({ data: $ == null ? void 0 : $[ie], index: ie, offset: Y, size:
|
|
4715
|
+
z.push({ data: $ == null ? void 0 : $[ie], index: ie, offset: Y, size: Z }), Y += Z;
|
|
4716
4716
|
}
|
|
4717
4717
|
}
|
|
4718
4718
|
if (!M)
|
|
4719
4719
|
return ao([], z, I, N, L, G);
|
|
4720
|
-
const q = W.length > 0 ? W[W.length - 1] + 1 : 0, oe = Sv(X, C,
|
|
4720
|
+
const q = W.length > 0 ? W[W.length - 1] + 1 : 0, oe = Sv(X, C, R, q);
|
|
4721
4721
|
if (oe.length === 0)
|
|
4722
4722
|
return null;
|
|
4723
4723
|
const F = I - 1, Q = Go([], (de) => {
|
|
4724
4724
|
for (const be of oe) {
|
|
4725
4725
|
const Y = be.value;
|
|
4726
|
-
let P = Y.offset,
|
|
4726
|
+
let P = Y.offset, Z = be.start;
|
|
4727
4727
|
const ne = Y.size;
|
|
4728
4728
|
if (Y.offset < C) {
|
|
4729
|
-
|
|
4730
|
-
const ie =
|
|
4729
|
+
Z += Math.floor((C - Y.offset + N) / (ne + N));
|
|
4730
|
+
const ie = Z - be.start;
|
|
4731
4731
|
P += ie * ne + ie * N;
|
|
4732
4732
|
}
|
|
4733
|
-
|
|
4733
|
+
Z < q && (P += (q - Z) * ne, Z = q);
|
|
4734
4734
|
const le = Math.min(be.end, F);
|
|
4735
|
-
for (let ie =
|
|
4735
|
+
for (let ie = Z; ie <= le && !(P >= R); ie++)
|
|
4736
4736
|
de.push({ data: $ == null ? void 0 : $[ie], index: ie, offset: P, size: ne }), P += ne + N;
|
|
4737
4737
|
}
|
|
4738
4738
|
});
|
|
@@ -4776,16 +4776,16 @@ const _n = je(
|
|
|
4776
4776
|
w,
|
|
4777
4777
|
pe(({ items: C }) => C.length > 0),
|
|
4778
4778
|
Se(o, e),
|
|
4779
|
-
pe(([{ items: C },
|
|
4780
|
-
re(([, C,
|
|
4779
|
+
pe(([{ items: C }, R]) => C[C.length - 1].originalIndex === R - 1),
|
|
4780
|
+
re(([, C, R]) => [C - 1, R]),
|
|
4781
4781
|
He(Cr),
|
|
4782
4782
|
re(([C]) => C)
|
|
4783
4783
|
)
|
|
4784
|
-
),
|
|
4784
|
+
), E = St(
|
|
4785
4785
|
B(
|
|
4786
4786
|
w,
|
|
4787
4787
|
nn(200),
|
|
4788
|
-
pe(({ items: C, topItems:
|
|
4788
|
+
pe(({ items: C, topItems: R }) => C.length > 0 && C[0].originalIndex === R.length),
|
|
4789
4789
|
re(({ items: C }) => C[0].index),
|
|
4790
4790
|
He()
|
|
4791
4791
|
)
|
|
@@ -4794,23 +4794,23 @@ const _n = je(
|
|
|
4794
4794
|
w,
|
|
4795
4795
|
pe(({ items: C }) => C.length > 0),
|
|
4796
4796
|
re(({ items: C }) => {
|
|
4797
|
-
let
|
|
4798
|
-
for (; C[
|
|
4799
|
-
|
|
4800
|
-
for (; C[I].type === "group" && I >
|
|
4797
|
+
let R = 0, I = C.length - 1;
|
|
4798
|
+
for (; C[R].type === "group" && R < I; )
|
|
4799
|
+
R++;
|
|
4800
|
+
for (; C[I].type === "group" && I > R; )
|
|
4801
4801
|
I--;
|
|
4802
4802
|
return {
|
|
4803
4803
|
endIndex: C[I].index,
|
|
4804
|
-
startIndex: C[
|
|
4804
|
+
startIndex: C[R].index
|
|
4805
4805
|
};
|
|
4806
4806
|
}),
|
|
4807
4807
|
He(tu)
|
|
4808
4808
|
)
|
|
4809
4809
|
);
|
|
4810
|
-
return { endReached: y, initialItemCount: m, itemsRendered: b, listState: w, rangeChanged: S, startReached:
|
|
4810
|
+
return { endReached: y, initialItemCount: m, itemsRendered: b, listState: w, rangeChanged: S, startReached: E, topItemsIndexes: v, ...p };
|
|
4811
4811
|
},
|
|
4812
4812
|
$e(
|
|
4813
|
-
|
|
4813
|
+
Zt,
|
|
4814
4814
|
su,
|
|
4815
4815
|
Gi,
|
|
4816
4816
|
Fr,
|
|
@@ -4822,9 +4822,9 @@ const _n = je(
|
|
|
4822
4822
|
{ singleton: !0 }
|
|
4823
4823
|
), cu = je(
|
|
4824
4824
|
([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: n, headerHeight: r }, { listState: o }]) => {
|
|
4825
|
-
const s =
|
|
4825
|
+
const s = Ee(), i = ct(
|
|
4826
4826
|
B(
|
|
4827
|
-
|
|
4827
|
+
Ze(n, e, r, t, o),
|
|
4828
4828
|
re(([a, c, u, d, h]) => a + c + u + d + h.offsetBottom + h.bottom)
|
|
4829
4829
|
),
|
|
4830
4830
|
0
|
|
@@ -4837,7 +4837,7 @@ const _n = je(
|
|
|
4837
4837
|
([{ viewportHeight: e }, { totalListHeight: t }]) => {
|
|
4838
4838
|
const n = V(!1), r = ct(
|
|
4839
4839
|
B(
|
|
4840
|
-
|
|
4840
|
+
Ze(n, e, t),
|
|
4841
4841
|
pe(([o]) => o),
|
|
4842
4842
|
re(([, o, s]) => Math.max(0, o - s)),
|
|
4843
4843
|
nn(0),
|
|
@@ -4863,21 +4863,21 @@ const _n = je(
|
|
|
4863
4863
|
{ fixedFooterHeight: r, fixedHeaderHeight: o, headerHeight: s, scrollingInProgress: i, scrollTop: a, viewportHeight: c },
|
|
4864
4864
|
{ scrollToIndex: u }
|
|
4865
4865
|
]) => {
|
|
4866
|
-
const d =
|
|
4866
|
+
const d = Ee();
|
|
4867
4867
|
return ue(
|
|
4868
4868
|
B(
|
|
4869
4869
|
d,
|
|
4870
4870
|
Se(t, c, n, s, o, r, a),
|
|
4871
4871
|
Se(e),
|
|
4872
4872
|
re(([[h, p, x, g, v, m, b, w], y]) => {
|
|
4873
|
-
const { align:
|
|
4873
|
+
const { align: E, behavior: S, calculateViewLocation: C = Dv, done: R, ...I } = h, A = ou(h, p, g - 1), k = Tr(A, p.offsetTree, y) + v + m, M = k + Bt(p.sizeTree, A)[1], W = w + m, G = w + x - b, N = C({
|
|
4874
4874
|
itemBottom: M,
|
|
4875
4875
|
itemTop: k,
|
|
4876
|
-
locationParams: { align:
|
|
4876
|
+
locationParams: { align: E, behavior: S, ...I },
|
|
4877
4877
|
viewportBottom: G,
|
|
4878
4878
|
viewportTop: W
|
|
4879
4879
|
});
|
|
4880
|
-
return N ?
|
|
4880
|
+
return N ? R && Lt(
|
|
4881
4881
|
B(
|
|
4882
4882
|
i,
|
|
4883
4883
|
pe(($) => !$),
|
|
@@ -4885,8 +4885,8 @@ const _n = je(
|
|
|
4885
4885
|
// but if scrollingInProgress is true, we skip the initial publish.
|
|
4886
4886
|
In(Xe(i) ? 1 : 2)
|
|
4887
4887
|
),
|
|
4888
|
-
|
|
4889
|
-
) :
|
|
4888
|
+
R
|
|
4889
|
+
) : R && R(), N;
|
|
4890
4890
|
}),
|
|
4891
4891
|
pe((h) => h !== null)
|
|
4892
4892
|
),
|
|
@@ -4895,7 +4895,7 @@ const _n = je(
|
|
|
4895
4895
|
scrollIntoView: d
|
|
4896
4896
|
};
|
|
4897
4897
|
},
|
|
4898
|
-
$e(
|
|
4898
|
+
$e(Zt, ft, Lr, _n, pn),
|
|
4899
4899
|
{ singleton: !0 }
|
|
4900
4900
|
);
|
|
4901
4901
|
function Tl(e) {
|
|
@@ -4913,7 +4913,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
|
|
|
4913
4913
|
{ context: p },
|
|
4914
4914
|
{ scrollIntoView: x }
|
|
4915
4915
|
]) => {
|
|
4916
|
-
const g = V(!1), v =
|
|
4916
|
+
const g = V(!1), v = Ee();
|
|
4917
4917
|
let m = null;
|
|
4918
4918
|
function b(S) {
|
|
4919
4919
|
ye(i, {
|
|
@@ -4924,11 +4924,11 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
|
|
|
4924
4924
|
}
|
|
4925
4925
|
Oe(
|
|
4926
4926
|
B(
|
|
4927
|
-
|
|
4927
|
+
Ze(B(he(t), In(1)), c),
|
|
4928
4928
|
Se(he(g), s, a, h),
|
|
4929
|
-
re(([[S, C],
|
|
4929
|
+
re(([[S, C], R, I, A, k]) => {
|
|
4930
4930
|
let M = C && A, W = "auto";
|
|
4931
|
-
return M && (W = Lv(
|
|
4931
|
+
return M && (W = Lv(R, I || k), M = M && !!W), { followOutputBehavior: W, shouldFollow: M, totalCount: S };
|
|
4932
4932
|
}),
|
|
4933
4933
|
pe(({ shouldFollow: S }) => S)
|
|
4934
4934
|
),
|
|
@@ -4941,14 +4941,14 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
|
|
|
4941
4941
|
}
|
|
4942
4942
|
);
|
|
4943
4943
|
function w(S) {
|
|
4944
|
-
const C = Lt(o, (
|
|
4945
|
-
S && !
|
|
4944
|
+
const C = Lt(o, (R) => {
|
|
4945
|
+
S && !R.atBottom && R.notAtBottomBecause === "SIZE_INCREASED" && !m && (Xe(d)("scrolling to bottom due to increased size", {}, gt.DEBUG), b("auto"));
|
|
4946
4946
|
});
|
|
4947
4947
|
setTimeout(C, 100);
|
|
4948
4948
|
}
|
|
4949
4949
|
Oe(
|
|
4950
4950
|
B(
|
|
4951
|
-
|
|
4951
|
+
Ze(he(g), t, u),
|
|
4952
4952
|
pe(([S, , C]) => S && C),
|
|
4953
4953
|
Yt(
|
|
4954
4954
|
({ value: S }, [, C]) => ({ refreshed: S === C, value: C }),
|
|
@@ -4962,10 +4962,10 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
|
|
|
4962
4962
|
}
|
|
4963
4963
|
), Oe(v, () => {
|
|
4964
4964
|
w(Xe(g) !== !1);
|
|
4965
|
-
}), Oe(
|
|
4965
|
+
}), Oe(Ze(he(g), o), ([S, C]) => {
|
|
4966
4966
|
S && !C.atBottom && C.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && b("auto");
|
|
4967
4967
|
});
|
|
4968
|
-
const y = V(null),
|
|
4968
|
+
const y = V(null), E = Ee();
|
|
4969
4969
|
return ue(
|
|
4970
4970
|
ii(
|
|
4971
4971
|
B(
|
|
@@ -4977,12 +4977,12 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
|
|
|
4977
4977
|
),
|
|
4978
4978
|
B(he(t))
|
|
4979
4979
|
),
|
|
4980
|
-
|
|
4980
|
+
E
|
|
4981
4981
|
), Oe(
|
|
4982
4982
|
B(
|
|
4983
|
-
|
|
4983
|
+
Ze(B(E, In(1)), c),
|
|
4984
4984
|
Se(he(y), a, h, p),
|
|
4985
|
-
re(([[S, C],
|
|
4985
|
+
re(([[S, C], R, I, A, k]) => C && I && (R == null ? void 0 : R({ context: k, totalCount: S, scrollingInProgress: A }))),
|
|
4986
4986
|
pe((S) => !!S),
|
|
4987
4987
|
nn(0)
|
|
4988
4988
|
),
|
|
@@ -4996,7 +4996,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
|
|
|
4996
4996
|
), { autoscrollToBottom: v, followOutput: g, scrollIntoViewOnChange: y };
|
|
4997
4997
|
},
|
|
4998
4998
|
$e(
|
|
4999
|
-
|
|
4999
|
+
Zt,
|
|
5000
5000
|
Br,
|
|
5001
5001
|
Lr,
|
|
5002
5002
|
Fr,
|
|
@@ -5017,7 +5017,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
|
|
|
5017
5017
|
),
|
|
5018
5018
|
i
|
|
5019
5019
|
), {}),
|
|
5020
|
-
$e(
|
|
5020
|
+
$e(Zt, Fr, _n, mn),
|
|
5021
5021
|
{ singleton: !0 }
|
|
5022
5022
|
), Hv = je(
|
|
5023
5023
|
([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
|
|
@@ -5051,7 +5051,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
|
|
|
5051
5051
|
{ singleton: !0 }
|
|
5052
5052
|
), fu = je(
|
|
5053
5053
|
([{ scrollVelocity: e }]) => {
|
|
5054
|
-
const t = V(!1), n =
|
|
5054
|
+
const t = V(!1), n = Ee(), r = V(!1);
|
|
5055
5055
|
return ue(
|
|
5056
5056
|
B(
|
|
5057
5057
|
e,
|
|
@@ -5070,7 +5070,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
|
|
|
5070
5070
|
),
|
|
5071
5071
|
t
|
|
5072
5072
|
), Oe(
|
|
5073
|
-
B(
|
|
5073
|
+
B(Ze(t, e, n), Se(r)),
|
|
5074
5074
|
([[o, s, i], a]) => {
|
|
5075
5075
|
o && a && a.change && a.change(s, i);
|
|
5076
5076
|
}
|
|
@@ -5079,10 +5079,10 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
|
|
|
5079
5079
|
$e(Br),
|
|
5080
5080
|
{ singleton: !0 }
|
|
5081
5081
|
), Ki = je(([{ scrollContainerState: e, scrollTo: t }]) => {
|
|
5082
|
-
const n =
|
|
5082
|
+
const n = Ee(), r = Ee(), o = Ee(), s = V(!1), i = V(void 0);
|
|
5083
5083
|
return ue(
|
|
5084
5084
|
B(
|
|
5085
|
-
|
|
5085
|
+
Ze(n, r),
|
|
5086
5086
|
re(([{ scrollHeight: a, scrollTop: c, viewportHeight: u }, { offsetTop: d }]) => ({
|
|
5087
5087
|
scrollHeight: a,
|
|
5088
5088
|
scrollTop: Math.max(0, c - d),
|
|
@@ -5118,15 +5118,15 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
|
|
|
5118
5118
|
{ didMount: s },
|
|
5119
5119
|
{ useWindowScroll: i, windowScrollContainerState: a, windowViewportRect: c }
|
|
5120
5120
|
]) => {
|
|
5121
|
-
const u =
|
|
5121
|
+
const u = Ee(), d = V(void 0), h = V(null), p = V(null);
|
|
5122
5122
|
return ue(a, h), ue(c, p), Oe(
|
|
5123
5123
|
B(
|
|
5124
5124
|
u,
|
|
5125
5125
|
Se(t, r, i, h, p, n)
|
|
5126
5126
|
),
|
|
5127
5127
|
([x, g, v, m, b, w, y]) => {
|
|
5128
|
-
const
|
|
5129
|
-
m && b !== null && w !== null && (v = b.scrollTop - w.offsetTop), v -= y, x({ ranges:
|
|
5128
|
+
const E = Tv(g.sizeTree);
|
|
5129
|
+
m && b !== null && w !== null && (v = b.scrollTop - w.offsetTop), v -= y, x({ ranges: E, scrollTop: v });
|
|
5130
5130
|
}
|
|
5131
5131
|
), ue(B(d, pe(Bi), re(zv)), o), ue(
|
|
5132
5132
|
B(
|
|
@@ -5142,7 +5142,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
|
|
|
5142
5142
|
restoreStateFrom: d
|
|
5143
5143
|
};
|
|
5144
5144
|
},
|
|
5145
|
-
$e(
|
|
5145
|
+
$e(Zt, ft, Fr, mn, Ki)
|
|
5146
5146
|
);
|
|
5147
5147
|
function zv(e) {
|
|
5148
5148
|
return { align: "start", index: 0, offset: e.scrollTop };
|
|
@@ -5176,16 +5176,16 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5176
5176
|
c,
|
|
5177
5177
|
Se(i),
|
|
5178
5178
|
Yt(
|
|
5179
|
-
([, b, w, y], [{ bottom:
|
|
5180
|
-
const A =
|
|
5179
|
+
([, b, w, y], [{ bottom: E, items: S, offsetBottom: C, totalCount: R }, I]) => {
|
|
5180
|
+
const A = E + C;
|
|
5181
5181
|
let k = 0;
|
|
5182
|
-
return w ===
|
|
5182
|
+
return w === R && b.length > 0 && S.length > 0 && (S[0].originalIndex === 0 && b[0].originalIndex === 0 || (k = A - y, k !== 0 && (k += I))), [k, S, R, A];
|
|
5183
5183
|
},
|
|
5184
5184
|
[0, [], 0, 0]
|
|
5185
5185
|
),
|
|
5186
5186
|
pe(([b]) => b !== 0),
|
|
5187
5187
|
Se(r, a, n, o, x, g),
|
|
5188
|
-
pe(([, b, w, y, , ,
|
|
5188
|
+
pe(([, b, w, y, , , E]) => !E && !y && b !== 0 && w === Rr),
|
|
5189
5189
|
re(([[b], , , , , w]) => (w("Upward scrolling compensation", { amount: b }, gt.DEBUG), b))
|
|
5190
5190
|
)
|
|
5191
5191
|
);
|
|
@@ -5196,7 +5196,7 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5196
5196
|
y && Wv() ? ye(e, w - b) : m(-b);
|
|
5197
5197
|
}), Oe(
|
|
5198
5198
|
B(
|
|
5199
|
-
|
|
5199
|
+
Ze(ct(s, !1), e, g),
|
|
5200
5200
|
pe(([b, w, y]) => !b && !y && w !== 0),
|
|
5201
5201
|
re(([b, w]) => w),
|
|
5202
5202
|
nn(1)
|
|
@@ -5212,22 +5212,22 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5212
5212
|
B(
|
|
5213
5213
|
u,
|
|
5214
5214
|
Se(p, d),
|
|
5215
|
-
re(([b, { groupIndices: w, lastSize: y, sizeTree:
|
|
5216
|
-
function C(
|
|
5217
|
-
return
|
|
5215
|
+
re(([b, { groupIndices: w, lastSize: y, sizeTree: E }, S]) => {
|
|
5216
|
+
function C(R) {
|
|
5217
|
+
return R * (y + S);
|
|
5218
5218
|
}
|
|
5219
5219
|
if (w.length === 0)
|
|
5220
5220
|
return C(b);
|
|
5221
5221
|
{
|
|
5222
|
-
let
|
|
5223
|
-
const I = Sr(
|
|
5222
|
+
let R = 0;
|
|
5223
|
+
const I = Sr(E, 0);
|
|
5224
5224
|
let A = 0, k = 0;
|
|
5225
5225
|
for (; A < b; ) {
|
|
5226
|
-
A++,
|
|
5226
|
+
A++, R += I;
|
|
5227
5227
|
let M = w.length === k + 1 ? 1 / 0 : w[k + 1] - w[k] - 1;
|
|
5228
|
-
A + M > b && (
|
|
5228
|
+
A + M > b && (R -= I, M = b - A + 1), A += M, R += C(M), k++;
|
|
5229
5229
|
}
|
|
5230
|
-
return
|
|
5230
|
+
return R;
|
|
5231
5231
|
}
|
|
5232
5232
|
})
|
|
5233
5233
|
),
|
|
@@ -5240,7 +5240,7 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5240
5240
|
}
|
|
5241
5241
|
), { deviation: e };
|
|
5242
5242
|
},
|
|
5243
|
-
$e(ft, Br, _n,
|
|
5243
|
+
$e(ft, Br, _n, Zt, pn, zi)
|
|
5244
5244
|
), Gv = je(
|
|
5245
5245
|
([
|
|
5246
5246
|
e,
|
|
@@ -5300,13 +5300,13 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5300
5300
|
v,
|
|
5301
5301
|
m,
|
|
5302
5302
|
b,
|
|
5303
|
-
{ listState: w, topItemsIndexes: y, ...
|
|
5303
|
+
{ listState: w, topItemsIndexes: y, ...E },
|
|
5304
5304
|
{ scrollToIndex: S },
|
|
5305
5305
|
C,
|
|
5306
|
-
{ topItemCount:
|
|
5306
|
+
{ topItemCount: R },
|
|
5307
5307
|
{ groupCounts: I },
|
|
5308
5308
|
A
|
|
5309
|
-
]) => (ue(
|
|
5309
|
+
]) => (ue(E.rangeChanged, A.scrollSeekRangeChanged), ue(
|
|
5310
5310
|
B(
|
|
5311
5311
|
A.windowViewportRect,
|
|
5312
5312
|
re((k) => k.visibleHeight)
|
|
@@ -5323,7 +5323,7 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5323
5323
|
initialTopMostItemIndex: x,
|
|
5324
5324
|
scrolledToInitialItem: g,
|
|
5325
5325
|
sizeRanges: a,
|
|
5326
|
-
topItemCount:
|
|
5326
|
+
topItemCount: R,
|
|
5327
5327
|
topItemsIndexes: y,
|
|
5328
5328
|
// input
|
|
5329
5329
|
totalCount: d,
|
|
@@ -5336,7 +5336,7 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5336
5336
|
statefulTotalCount: u,
|
|
5337
5337
|
trackItemSizes: h,
|
|
5338
5338
|
// exported from stateFlagsSystem
|
|
5339
|
-
...
|
|
5339
|
+
...E,
|
|
5340
5340
|
// the bag of IO from featureGroup1System
|
|
5341
5341
|
...A,
|
|
5342
5342
|
...v,
|
|
@@ -5344,7 +5344,7 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5344
5344
|
...m
|
|
5345
5345
|
}),
|
|
5346
5346
|
$e(
|
|
5347
|
-
|
|
5347
|
+
Zt,
|
|
5348
5348
|
Fr,
|
|
5349
5349
|
ft,
|
|
5350
5350
|
$v,
|
|
@@ -5385,28 +5385,28 @@ function mu(e, t, n) {
|
|
|
5385
5385
|
}
|
|
5386
5386
|
function u(m) {
|
|
5387
5387
|
return s.reduce((b, w) => (b[w] = (y) => {
|
|
5388
|
-
const
|
|
5389
|
-
ye(
|
|
5388
|
+
const E = m[t.methods[w]];
|
|
5389
|
+
ye(E, y);
|
|
5390
5390
|
}, b), {});
|
|
5391
5391
|
}
|
|
5392
5392
|
function d(m) {
|
|
5393
5393
|
return i.reduce((b, w) => (b[w] = cv(m[t.events[w]]), b), {});
|
|
5394
5394
|
}
|
|
5395
5395
|
const h = K.forwardRef((m, b) => {
|
|
5396
|
-
const { children: w, ...y } = m, [
|
|
5397
|
-
c(
|
|
5398
|
-
})), [S] = K.useState(ml(d,
|
|
5396
|
+
const { children: w, ...y } = m, [E] = K.useState(() => Go(dv(e), (R) => {
|
|
5397
|
+
c(R, y);
|
|
5398
|
+
})), [S] = K.useState(ml(d, E));
|
|
5399
5399
|
Gr(() => {
|
|
5400
|
-
for (const
|
|
5401
|
-
|
|
5400
|
+
for (const R of i)
|
|
5401
|
+
R in y && Oe(S[R], y[R]);
|
|
5402
5402
|
return () => {
|
|
5403
5403
|
Object.values(S).map(Hi);
|
|
5404
5404
|
};
|
|
5405
|
-
}, [y, S,
|
|
5406
|
-
c(
|
|
5407
|
-
}), K.useImperativeHandle(b, pl(u(
|
|
5405
|
+
}, [y, S, E]), Gr(() => {
|
|
5406
|
+
c(E, y);
|
|
5407
|
+
}), K.useImperativeHandle(b, pl(u(E)));
|
|
5408
5408
|
const C = n;
|
|
5409
|
-
return /* @__PURE__ */ l.jsx(a.Provider, { value:
|
|
5409
|
+
return /* @__PURE__ */ l.jsx(a.Provider, { value: E, children: n ? /* @__PURE__ */ l.jsx(C, { ...Kv([...r, ...o, ...i], y), children: w }) : w });
|
|
5410
5410
|
}), p = (m) => {
|
|
5411
5411
|
const b = K.useContext(a);
|
|
5412
5412
|
return K.useCallback(
|
|
@@ -5428,8 +5428,8 @@ function mu(e, t, n) {
|
|
|
5428
5428
|
}, g = (m) => {
|
|
5429
5429
|
const b = K.useContext(a)[m], [w, y] = K.useState(ml(Xe, b));
|
|
5430
5430
|
return Gr(
|
|
5431
|
-
() => Oe(b, (
|
|
5432
|
-
|
|
5431
|
+
() => Oe(b, (E) => {
|
|
5432
|
+
E !== w && y(pl(E));
|
|
5433
5433
|
}),
|
|
5434
5434
|
[b, w]
|
|
5435
5435
|
), w;
|
|
@@ -5502,11 +5502,11 @@ function bu(e, t, n, r = rr, o, s) {
|
|
|
5502
5502
|
}
|
|
5503
5503
|
return { scrollByCallback: h, scrollerRef: i, scrollToCallback: d };
|
|
5504
5504
|
}
|
|
5505
|
-
const Os = "-webkit-sticky",
|
|
5505
|
+
const Os = "-webkit-sticky", Rl = "sticky", Yi = hu(() => {
|
|
5506
5506
|
if (typeof document > "u")
|
|
5507
|
-
return
|
|
5507
|
+
return Rl;
|
|
5508
5508
|
const e = document.createElement("div");
|
|
5509
|
-
return e.style.position = Os, e.style.position === Os ? Os :
|
|
5509
|
+
return e.style.position = Os, e.style.position === Os ? Os : Rl;
|
|
5510
5510
|
});
|
|
5511
5511
|
function Xi(e) {
|
|
5512
5512
|
return e;
|
|
@@ -5540,7 +5540,7 @@ const Xv = /* @__PURE__ */ je(() => {
|
|
|
5540
5540
|
}), qv = /* @__PURE__ */ je(
|
|
5541
5541
|
([e, t]) => ({ ...e, ...t }),
|
|
5542
5542
|
$e(pu, Xv)
|
|
5543
|
-
),
|
|
5543
|
+
), Jv = ({ height: e }) => /* @__PURE__ */ l.jsx("div", { style: { height: e } }), Zv = { overflowAnchor: "none", position: Yi(), zIndex: 1 }, wu = { overflowAnchor: "none" }, Qv = { ...wu, display: "inline-block", height: "100%" }, El = /* @__PURE__ */ K.memo(function({ showTopList: e = !1 }) {
|
|
5544
5544
|
const t = xe("listState"), n = It("sizeRanges"), r = xe("useWindowScroll"), o = xe("customScrollParent"), s = It("windowScrollContainerState"), i = It("scrollContainerState"), a = o || r ? s : i, c = xe("itemContent"), u = xe("context"), d = xe("groupContent"), h = xe("trackItemSizes"), p = xe("itemSize"), x = xe("log"), g = It("gap"), v = xe("horizontalDirection"), { callbackRef: m } = pv(
|
|
5545
5545
|
n,
|
|
5546
5546
|
p,
|
|
@@ -5555,7 +5555,7 @@ const Xv = /* @__PURE__ */ je(() => {
|
|
|
5555
5555
|
qi("deviation", (N) => {
|
|
5556
5556
|
b !== N && w(N);
|
|
5557
5557
|
});
|
|
5558
|
-
const y = xe("EmptyPlaceholder"),
|
|
5558
|
+
const y = xe("EmptyPlaceholder"), E = xe("ScrollSeekPlaceholder") || Jv, S = xe("ListComponent"), C = xe("ItemComponent"), R = xe("GroupComponent"), I = xe("computeItemKey"), A = xe("isSeeking"), k = xe("groupIndices").length > 0, M = xe("alignToBottom"), W = xe("initialItemFinalLocationReached"), G = e ? {} : {
|
|
5559
5559
|
boxSizing: "border-box",
|
|
5560
5560
|
...v ? {
|
|
5561
5561
|
display: "inline-block",
|
|
@@ -5581,9 +5581,9 @@ const Xv = /* @__PURE__ */ je(() => {
|
|
|
5581
5581
|
children: (e ? t.topItems : t.items).map((N) => {
|
|
5582
5582
|
const $ = N.originalIndex, L = I($ + t.firstItemIndex, N.data, u);
|
|
5583
5583
|
return A ? /* @__PURE__ */ to(
|
|
5584
|
-
|
|
5584
|
+
E,
|
|
5585
5585
|
{
|
|
5586
|
-
...lt(
|
|
5586
|
+
...lt(E, u),
|
|
5587
5587
|
height: N.size,
|
|
5588
5588
|
index: N.index,
|
|
5589
5589
|
key: L,
|
|
@@ -5591,14 +5591,14 @@ const Xv = /* @__PURE__ */ je(() => {
|
|
|
5591
5591
|
...N.type === "group" ? {} : { groupIndex: N.groupIndex }
|
|
5592
5592
|
}
|
|
5593
5593
|
) : N.type === "group" ? /* @__PURE__ */ to(
|
|
5594
|
-
|
|
5594
|
+
R,
|
|
5595
5595
|
{
|
|
5596
|
-
...lt(
|
|
5596
|
+
...lt(R, u),
|
|
5597
5597
|
"data-index": $,
|
|
5598
5598
|
"data-item-index": N.index,
|
|
5599
5599
|
"data-known-size": N.size,
|
|
5600
5600
|
key: L,
|
|
5601
|
-
style:
|
|
5601
|
+
style: Zv
|
|
5602
5602
|
},
|
|
5603
5603
|
d(N.index, u)
|
|
5604
5604
|
) : /* @__PURE__ */ to(
|
|
@@ -5747,10 +5747,10 @@ const ix = ({ children: e }) => {
|
|
|
5747
5747
|
}, cx = /* @__PURE__ */ K.memo(function(e) {
|
|
5748
5748
|
const t = xe("useWindowScroll"), n = xe("topItemsIndexes").length > 0, r = xe("customScrollParent"), o = xe("context");
|
|
5749
5749
|
return /* @__PURE__ */ l.jsxs(r || t ? fx : dx, { ...e, context: o, children: [
|
|
5750
|
-
n && /* @__PURE__ */ l.jsx(lx, { children: /* @__PURE__ */ l.jsx(
|
|
5750
|
+
n && /* @__PURE__ */ l.jsx(lx, { children: /* @__PURE__ */ l.jsx(El, { showTopList: !0 }) }),
|
|
5751
5751
|
/* @__PURE__ */ l.jsxs(r || t ? ax : ix, { children: [
|
|
5752
5752
|
/* @__PURE__ */ l.jsx(ox, {}),
|
|
5753
|
-
/* @__PURE__ */ l.jsx(
|
|
5753
|
+
/* @__PURE__ */ l.jsx(El, {}),
|
|
5754
5754
|
/* @__PURE__ */ l.jsx(sx, {})
|
|
5755
5755
|
] })
|
|
5756
5756
|
] });
|
|
@@ -5895,23 +5895,23 @@ const xx = /* @__PURE__ */ je(
|
|
|
5895
5895
|
p,
|
|
5896
5896
|
x,
|
|
5897
5897
|
{ didMount: g, propsReady: v },
|
|
5898
|
-
{ customScrollParent: m, useWindowScroll: b, windowScrollContainerState: w, windowScrollTo: y, windowViewportRect:
|
|
5898
|
+
{ customScrollParent: m, useWindowScroll: b, windowScrollContainerState: w, windowScrollTo: y, windowViewportRect: E },
|
|
5899
5899
|
S
|
|
5900
5900
|
]) => {
|
|
5901
|
-
const C = V(0),
|
|
5901
|
+
const C = V(0), R = V(0), I = V(Il), A = V({ height: 0, width: 0 }), k = V({ height: 0, width: 0 }), M = Ee(), W = Ee(), G = V(0), N = V(null), $ = V({ column: 0, row: 0 }), L = Ee(), X = Ee(), O = V(!1), _ = V(0), z = V(!0), q = V(!1), oe = V(!1);
|
|
5902
5902
|
Oe(
|
|
5903
5903
|
B(
|
|
5904
5904
|
g,
|
|
5905
5905
|
Se(_),
|
|
5906
|
-
pe(([P,
|
|
5906
|
+
pe(([P, Z]) => !!Z)
|
|
5907
5907
|
),
|
|
5908
5908
|
() => {
|
|
5909
5909
|
ye(z, !1);
|
|
5910
5910
|
}
|
|
5911
5911
|
), Oe(
|
|
5912
5912
|
B(
|
|
5913
|
-
|
|
5914
|
-
pe(([P,
|
|
5913
|
+
Ze(g, z, k, A, _, q),
|
|
5914
|
+
pe(([P, Z, ne, le, , ie]) => P && !Z && ne.height !== 0 && le.height !== 0 && !ie)
|
|
5915
5915
|
),
|
|
5916
5916
|
([, , , , P]) => {
|
|
5917
5917
|
ye(q, !0), Wi(1, () => {
|
|
@@ -5926,7 +5926,7 @@ const xx = /* @__PURE__ */ je(
|
|
|
5926
5926
|
pe((P) => P != null && P.scrollTop > 0),
|
|
5927
5927
|
Gt(0)
|
|
5928
5928
|
),
|
|
5929
|
-
|
|
5929
|
+
R
|
|
5930
5930
|
), Oe(
|
|
5931
5931
|
B(
|
|
5932
5932
|
g,
|
|
@@ -5934,7 +5934,7 @@ const xx = /* @__PURE__ */ je(
|
|
|
5934
5934
|
pe(([, P]) => P != null)
|
|
5935
5935
|
),
|
|
5936
5936
|
([, P]) => {
|
|
5937
|
-
P && (ye(A, P.viewport), ye(k, P.item), ye($, P.gap), P.scrollTop > 0 && (ye(O, !0), Lt(B(u, In(1)), (
|
|
5937
|
+
P && (ye(A, P.viewport), ye(k, P.item), ye($, P.gap), P.scrollTop > 0 && (ye(O, !0), Lt(B(u, In(1)), (Z) => {
|
|
5938
5938
|
ye(O, !1);
|
|
5939
5939
|
}), ye(c, { top: P.scrollTop })));
|
|
5940
5940
|
}
|
|
@@ -5946,15 +5946,15 @@ const xx = /* @__PURE__ */ je(
|
|
|
5946
5946
|
h
|
|
5947
5947
|
), ue(
|
|
5948
5948
|
B(
|
|
5949
|
-
|
|
5949
|
+
Ze(
|
|
5950
5950
|
he(A, Kr),
|
|
5951
5951
|
he(k, Kr),
|
|
5952
|
-
he($, (P,
|
|
5952
|
+
he($, (P, Z) => P && P.column === Z.column && P.row === Z.row),
|
|
5953
5953
|
he(u)
|
|
5954
5954
|
),
|
|
5955
|
-
re(([P,
|
|
5955
|
+
re(([P, Z, ne, le]) => ({
|
|
5956
5956
|
gap: ne,
|
|
5957
|
-
item:
|
|
5957
|
+
item: Z,
|
|
5958
5958
|
scrollTop: le,
|
|
5959
5959
|
viewport: P
|
|
5960
5960
|
}))
|
|
@@ -5962,14 +5962,14 @@ const xx = /* @__PURE__ */ je(
|
|
|
5962
5962
|
L
|
|
5963
5963
|
), ue(
|
|
5964
5964
|
B(
|
|
5965
|
-
|
|
5965
|
+
Ze(
|
|
5966
5966
|
he(C),
|
|
5967
5967
|
r,
|
|
5968
5968
|
he($, vx),
|
|
5969
5969
|
he(k, Kr),
|
|
5970
5970
|
he(A, Kr),
|
|
5971
5971
|
he(N),
|
|
5972
|
-
he(
|
|
5972
|
+
he(R),
|
|
5973
5973
|
he(O),
|
|
5974
5974
|
he(z),
|
|
5975
5975
|
he(_)
|
|
@@ -5978,7 +5978,7 @@ const xx = /* @__PURE__ */ je(
|
|
|
5978
5978
|
re(
|
|
5979
5979
|
([
|
|
5980
5980
|
P,
|
|
5981
|
-
[
|
|
5981
|
+
[Z, ne],
|
|
5982
5982
|
le,
|
|
5983
5983
|
ie,
|
|
5984
5984
|
Pe,
|
|
@@ -5997,7 +5997,7 @@ const xx = /* @__PURE__ */ je(
|
|
|
5997
5997
|
}
|
|
5998
5998
|
const ut = Cu(nt, Be, ve);
|
|
5999
5999
|
let rt, Qe;
|
|
6000
|
-
ce ?
|
|
6000
|
+
ce ? Z === 0 && ne === 0 && Le > 0 ? (rt = 0, Qe = Le - 1) : (rt = ut * Io((Z + H) / (ae + H)), Qe = ut * Nl((ne + H) / (ae + H)) - 1, Qe = Ms(P - 1, vr(Qe, ut - 1)), rt = Ms(Qe, vr(0, rt))) : (rt = 0, Qe = -1);
|
|
6001
6001
|
const Tt = Al(rt, Qe, Fe), { bottom: We, top: st } = kl(Pe, le, ie, Tt), Ge = Nl(P / ut), it = Ge * ae + (Ge - 1) * H - We;
|
|
6002
6002
|
return { bottom: We, itemHeight: ae, items: Tt, itemWidth: Be, offsetBottom: it, offsetTop: st, top: st };
|
|
6003
6003
|
}
|
|
@@ -6013,10 +6013,10 @@ const xx = /* @__PURE__ */ je(
|
|
|
6013
6013
|
C
|
|
6014
6014
|
), ue(
|
|
6015
6015
|
B(
|
|
6016
|
-
|
|
6017
|
-
pe(([P,
|
|
6018
|
-
re(([P,
|
|
6019
|
-
const { bottom: ie, top: Pe } = kl(P, le,
|
|
6016
|
+
Ze(A, k, I, $),
|
|
6017
|
+
pe(([P, Z, { items: ne }]) => ne.length > 0 && Z.height !== 0 && P.height !== 0),
|
|
6018
|
+
re(([P, Z, { items: ne }, le]) => {
|
|
6019
|
+
const { bottom: ie, top: Pe } = kl(P, le, Z, ne);
|
|
6020
6020
|
return [Pe, ie];
|
|
6021
6021
|
}),
|
|
6022
6022
|
He(Cr)
|
|
@@ -6028,18 +6028,18 @@ const xx = /* @__PURE__ */ je(
|
|
|
6028
6028
|
B(
|
|
6029
6029
|
u,
|
|
6030
6030
|
Se(F),
|
|
6031
|
-
re(([P,
|
|
6031
|
+
re(([P, Z]) => Z || P !== 0)
|
|
6032
6032
|
),
|
|
6033
6033
|
F
|
|
6034
6034
|
);
|
|
6035
6035
|
const Q = St(
|
|
6036
6036
|
B(
|
|
6037
|
-
|
|
6037
|
+
Ze(I, C),
|
|
6038
6038
|
pe(([{ items: P }]) => P.length > 0),
|
|
6039
6039
|
Se(F),
|
|
6040
|
-
pe(([[P,
|
|
6041
|
-
const le = P.items[P.items.length - 1].index ===
|
|
6042
|
-
return (ne || P.bottom > 0 && P.itemHeight > 0 && P.offsetBottom === 0 && P.items.length ===
|
|
6040
|
+
pe(([[P, Z], ne]) => {
|
|
6041
|
+
const le = P.items[P.items.length - 1].index === Z - 1;
|
|
6042
|
+
return (ne || P.bottom > 0 && P.itemHeight > 0 && P.offsetBottom === 0 && P.items.length === Z) && le;
|
|
6043
6043
|
}),
|
|
6044
6044
|
re(([[, P]]) => P - 1),
|
|
6045
6045
|
He()
|
|
@@ -6055,7 +6055,7 @@ const xx = /* @__PURE__ */ je(
|
|
|
6055
6055
|
B(
|
|
6056
6056
|
he(I),
|
|
6057
6057
|
Se(O),
|
|
6058
|
-
pe(([{ items: P },
|
|
6058
|
+
pe(([{ items: P }, Z]) => P.length > 0 && !Z),
|
|
6059
6059
|
re(([{ items: P }]) => ({
|
|
6060
6060
|
endIndex: P[P.length - 1].index,
|
|
6061
6061
|
startIndex: P[0].index
|
|
@@ -6068,12 +6068,12 @@ const xx = /* @__PURE__ */ je(
|
|
|
6068
6068
|
B(
|
|
6069
6069
|
M,
|
|
6070
6070
|
Se(A, k, C, $),
|
|
6071
|
-
re(([P,
|
|
6071
|
+
re(([P, Z, ne, le, ie]) => {
|
|
6072
6072
|
const Pe = iu(P), { align: Fe, behavior: Le, offset: ce } = Pe;
|
|
6073
6073
|
let Ae = Pe.index;
|
|
6074
6074
|
Ae === "LAST" && (Ae = le - 1), Ae = vr(0, Ae, Ms(le - 1, Ae));
|
|
6075
|
-
let ve = di(
|
|
6076
|
-
return Fe === "end" ? ve = jl(ve -
|
|
6075
|
+
let ve = di(Z, ie, ne, Ae);
|
|
6076
|
+
return Fe === "end" ? ve = jl(ve - Z.height + ne.height) : Fe === "center" && (ve = jl(ve - Z.height / 2 + ne.height / 2)), ce && (ve += ce), { behavior: Le, top: ve };
|
|
6077
6077
|
})
|
|
6078
6078
|
),
|
|
6079
6079
|
c
|
|
@@ -6087,7 +6087,7 @@ const xx = /* @__PURE__ */ je(
|
|
|
6087
6087
|
);
|
|
6088
6088
|
return ue(
|
|
6089
6089
|
B(
|
|
6090
|
-
|
|
6090
|
+
E,
|
|
6091
6091
|
re((P) => ({ height: P.visibleHeight, width: P.visibleWidth }))
|
|
6092
6092
|
),
|
|
6093
6093
|
A
|
|
@@ -6100,7 +6100,7 @@ const xx = /* @__PURE__ */ je(
|
|
|
6100
6100
|
gap: $,
|
|
6101
6101
|
headerHeight: s,
|
|
6102
6102
|
increaseViewportBy: e,
|
|
6103
|
-
initialItemCount:
|
|
6103
|
+
initialItemCount: R,
|
|
6104
6104
|
itemDimensions: k,
|
|
6105
6105
|
overscan: n,
|
|
6106
6106
|
restoreStateFrom: X,
|
|
@@ -6116,7 +6116,7 @@ const xx = /* @__PURE__ */ je(
|
|
|
6116
6116
|
viewportDimensions: A,
|
|
6117
6117
|
windowScrollContainerState: w,
|
|
6118
6118
|
windowScrollTo: y,
|
|
6119
|
-
windowViewportRect:
|
|
6119
|
+
windowViewportRect: E,
|
|
6120
6120
|
...x,
|
|
6121
6121
|
// output
|
|
6122
6122
|
gridState: I,
|
|
@@ -6187,8 +6187,8 @@ const bx = /* @__PURE__ */ je(() => {
|
|
|
6187
6187
|
i(w);
|
|
6188
6188
|
const y = b.firstChild;
|
|
6189
6189
|
if (y) {
|
|
6190
|
-
const { height:
|
|
6191
|
-
h({ height:
|
|
6190
|
+
const { height: E, width: S } = y.getBoundingClientRect();
|
|
6191
|
+
h({ height: E, width: S });
|
|
6192
6192
|
}
|
|
6193
6193
|
p({
|
|
6194
6194
|
column: Pl("column-gap", getComputedStyle(b).columnGap, x),
|
|
@@ -6272,13 +6272,13 @@ const bx = /* @__PURE__ */ je(() => {
|
|
|
6272
6272
|
return K.useEffect(() => {
|
|
6273
6273
|
t && (r({ height: t.viewportHeight, width: t.viewportWidth }), n({ height: t.itemHeight, width: t.itemWidth }));
|
|
6274
6274
|
}, [t, r, n]), /* @__PURE__ */ l.jsx("div", { ref: o, style: Xo(!1), children: e });
|
|
6275
|
-
},
|
|
6275
|
+
}, Rx = ({ children: e }) => {
|
|
6276
6276
|
const t = K.useContext(vu), n = Nt("windowViewportRect"), r = Nt("itemDimensions"), o = ze("customScrollParent"), s = Xc(n, o, !1);
|
|
6277
6277
|
return K.useEffect(() => {
|
|
6278
6278
|
t && (r({ height: t.itemHeight, width: t.itemWidth }), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: t.viewportWidth }));
|
|
6279
6279
|
}, [t, n, r]), /* @__PURE__ */ l.jsx("div", { ref: s, style: Xo(!1), children: e });
|
|
6280
|
-
},
|
|
6281
|
-
const t = ze("useWindowScroll"), n = ze("customScrollParent"), r = n || t ? Nx : Ix, o = n || t ?
|
|
6280
|
+
}, Ex = /* @__PURE__ */ K.memo(function({ ...e }) {
|
|
6281
|
+
const t = ze("useWindowScroll"), n = ze("customScrollParent"), r = n || t ? Nx : Ix, o = n || t ? Rx : Tx, s = ze("context");
|
|
6282
6282
|
return /* @__PURE__ */ l.jsx(r, { ...e, ...lt(r, s), children: /* @__PURE__ */ l.jsxs(o, { children: [
|
|
6283
6283
|
/* @__PURE__ */ l.jsx(Sx, {}),
|
|
6284
6284
|
/* @__PURE__ */ l.jsx(yx, {}),
|
|
@@ -6328,7 +6328,7 @@ const bx = /* @__PURE__ */ je(() => {
|
|
|
6328
6328
|
readyStateChanged: "readyStateChanged"
|
|
6329
6329
|
}
|
|
6330
6330
|
},
|
|
6331
|
-
|
|
6331
|
+
Ex
|
|
6332
6332
|
), Ix = /* @__PURE__ */ yu({ useEmitter: Tu, useEmitterValue: ze, usePublisher: Nt }), Nx = /* @__PURE__ */ Su({ useEmitter: Tu, useEmitterValue: ze, usePublisher: Nt });
|
|
6333
6333
|
function Pl(e, t, n) {
|
|
6334
6334
|
return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, gt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
|
|
@@ -6374,7 +6374,7 @@ const jx = Pr(
|
|
|
6374
6374
|
}
|
|
6375
6375
|
);
|
|
6376
6376
|
ke.displayName = "Button";
|
|
6377
|
-
const
|
|
6377
|
+
const Ru = f.forwardRef(
|
|
6378
6378
|
({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
6379
6379
|
"textarea",
|
|
6380
6380
|
{
|
|
@@ -6387,7 +6387,7 @@ const Eu = f.forwardRef(
|
|
|
6387
6387
|
}
|
|
6388
6388
|
)
|
|
6389
6389
|
);
|
|
6390
|
-
|
|
6390
|
+
Ru.displayName = "Textarea";
|
|
6391
6391
|
function Ax({
|
|
6392
6392
|
initialValue: e = "",
|
|
6393
6393
|
editingMessageId: t = null,
|
|
@@ -6431,22 +6431,22 @@ function Ax({
|
|
|
6431
6431
|
[p, i, h]
|
|
6432
6432
|
), y = K.useCallback((I) => {
|
|
6433
6433
|
x(I.target.value), m.current && (m.current.style.height = "auto", m.current.style.height = `${m.current.scrollHeight}px`);
|
|
6434
|
-
}, []),
|
|
6434
|
+
}, []), E = K.useCallback(
|
|
6435
6435
|
(I) => {
|
|
6436
6436
|
I.key === "Enter" && !I.shiftKey ? (I.preventDefault(), w()) : I.key === "Escape" && t && (I.preventDefault(), a == null || a());
|
|
6437
6437
|
},
|
|
6438
6438
|
[w, t, a]
|
|
6439
|
-
),
|
|
6439
|
+
), R = `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${t ? "border-[hsl(var(--ring))] bg-[hsl(var(--card))] text-[hsl(var(--card-foreground))] dark:bg-[hsl(var(--card))] dark:text-[hsl(var(--card-foreground))]" : ""} ${d}`;
|
|
6440
6440
|
return /* @__PURE__ */ l.jsx("form", { onSubmit: (I) => void w(I), className: `w-full ${u}`, children: /* @__PURE__ */ l.jsxs("div", { className: "flex items-end gap-2", children: [
|
|
6441
6441
|
/* @__PURE__ */ l.jsx("div", { className: "flex-1", children: /* @__PURE__ */ l.jsx(
|
|
6442
|
-
|
|
6442
|
+
Ru,
|
|
6443
6443
|
{
|
|
6444
6444
|
ref: m,
|
|
6445
6445
|
value: p,
|
|
6446
6446
|
onChange: y,
|
|
6447
|
-
onKeyDown:
|
|
6447
|
+
onKeyDown: E,
|
|
6448
6448
|
placeholder: t ? "Edit your message..." : n,
|
|
6449
|
-
className:
|
|
6449
|
+
className: R,
|
|
6450
6450
|
disabled: o,
|
|
6451
6451
|
maxLength: s,
|
|
6452
6452
|
rows: 1,
|
|
@@ -6497,7 +6497,7 @@ const kx = K.memo(Ax), Px = Pr(
|
|
|
6497
6497
|
}
|
|
6498
6498
|
}
|
|
6499
6499
|
);
|
|
6500
|
-
function
|
|
6500
|
+
function Eu({ className: e, variant: t, ...n }) {
|
|
6501
6501
|
return /* @__PURE__ */ l.jsx("div", { className: D(Px({ variant: t }), e), ...n });
|
|
6502
6502
|
}
|
|
6503
6503
|
function ee(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
@@ -6625,7 +6625,7 @@ function _l(e, t) {
|
|
|
6625
6625
|
return e(t);
|
|
6626
6626
|
e != null && (e.current = t);
|
|
6627
6627
|
}
|
|
6628
|
-
function
|
|
6628
|
+
function Ji(...e) {
|
|
6629
6629
|
return (t) => {
|
|
6630
6630
|
let n = !1;
|
|
6631
6631
|
const r = e.map((o) => {
|
|
@@ -6642,7 +6642,7 @@ function Zi(...e) {
|
|
|
6642
6642
|
};
|
|
6643
6643
|
}
|
|
6644
6644
|
function Te(...e) {
|
|
6645
|
-
return f.useCallback(
|
|
6645
|
+
return f.useCallback(Ji(...e), e);
|
|
6646
6646
|
}
|
|
6647
6647
|
var Fx = [
|
|
6648
6648
|
"a",
|
|
@@ -6745,7 +6745,7 @@ function Ft(e) {
|
|
|
6745
6745
|
n((r) => r ?? String(Ux++));
|
|
6746
6746
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
6747
6747
|
}
|
|
6748
|
-
var qo = "Collapsible", [Wx,
|
|
6748
|
+
var qo = "Collapsible", [Wx, eR] = Ut(qo), [Vx, Zi] = Wx(qo), Nu = f.forwardRef(
|
|
6749
6749
|
(e, t) => {
|
|
6750
6750
|
const {
|
|
6751
6751
|
__scopeCollapsible: n,
|
|
@@ -6784,7 +6784,7 @@ var qo = "Collapsible", [Wx, eE] = Ut(qo), [Vx, Ji] = Wx(qo), Nu = f.forwardRef(
|
|
|
6784
6784
|
Nu.displayName = qo;
|
|
6785
6785
|
var ju = "CollapsibleTrigger", Au = f.forwardRef(
|
|
6786
6786
|
(e, t) => {
|
|
6787
|
-
const { __scopeCollapsible: n, ...r } = e, o =
|
|
6787
|
+
const { __scopeCollapsible: n, ...r } = e, o = Zi(ju, n);
|
|
6788
6788
|
return /* @__PURE__ */ l.jsx(
|
|
6789
6789
|
me.button,
|
|
6790
6790
|
{
|
|
@@ -6804,13 +6804,13 @@ var ju = "CollapsibleTrigger", Au = f.forwardRef(
|
|
|
6804
6804
|
Au.displayName = ju;
|
|
6805
6805
|
var Qi = "CollapsibleContent", Gx = f.forwardRef(
|
|
6806
6806
|
(e, t) => {
|
|
6807
|
-
const { forceMount: n, ...r } = e, o =
|
|
6807
|
+
const { forceMount: n, ...r } = e, o = Zi(Qi, e.__scopeCollapsible);
|
|
6808
6808
|
return /* @__PURE__ */ l.jsx(vt, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ l.jsx(Kx, { ...r, ref: t, present: s }) });
|
|
6809
6809
|
}
|
|
6810
6810
|
);
|
|
6811
6811
|
Gx.displayName = Qi;
|
|
6812
6812
|
var Kx = f.forwardRef((e, t) => {
|
|
6813
|
-
const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i =
|
|
6813
|
+
const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i = Zi(Qi, n), [a, c] = f.useState(r), u = f.useRef(null), d = Te(t, u), h = f.useRef(0), p = h.current, x = f.useRef(0), g = x.current, v = i.open || a, m = f.useRef(v), b = f.useRef(void 0);
|
|
6814
6814
|
return f.useEffect(() => {
|
|
6815
6815
|
const w = requestAnimationFrame(() => m.current = !1);
|
|
6816
6816
|
return () => cancelAnimationFrame(w);
|
|
@@ -6846,7 +6846,7 @@ function ea(e) {
|
|
|
6846
6846
|
return e ? "open" : "closed";
|
|
6847
6847
|
}
|
|
6848
6848
|
var Yx = Nu;
|
|
6849
|
-
const Ol = Yx, Ml = Au, ku = new URL("data:video/mp2t;base64,
|
|
6849
|
+
const Ol = Yx, Ml = Au, ku = new URL("data:video/mp2t;base64,Ly8gQHRzLWlnbm9yZSAtIG1hcmtlZCB3aWxsIGJlIGF2YWlsYWJsZSBnbG9iYWxseSBpbiB0aGUgd29ya2VyIGNvbnRleHQKZGVjbGFyZSBjb25zdCBwYXJzZTogKG1hcmtkb3duOiBzdHJpbmcpID0+IHN0cmluZzsKCmNvbnN0IHNjb3BlID0gc2VsZjsKCmNvbnNvbGUubG9nKCdbTWFya2Rvd25Xb3JrZXJdIHdvcmtlciBzY3JpcHQgbG9hZGVkJyk7Ci8vIFNpZ25hbCB0byB0aGUgbWFpbiB0aHJlYWQgdGhhdCB0aGUgd29ya2VyIGlzIHJlYWR5IHRvIHJlY2VpdmUgd29yay4KLy8gVGhpcyBoZWxwcyBjYWxsZXJzIGF2b2lkIHBvc3RpbmcgbWVzc2FnZXMgYmVmb3JlIHRoZSB3b3JrZXIgaGFzIGZpbmlzaGVkIGluaXRpYWxpemluZy4Kc2NvcGUucG9zdE1lc3NhZ2U/Lih7IF9fd29ya2VyX3JlYWR5OiB0cnVlIH0pOwoKc2NvcGUuYWRkRXZlbnRMaXN0ZW5lcignbWVzc2FnZScsIChldmVudCkgPT4gewogIGNvbnN0IHBheWxvYWQgPSBldmVudD8uZGF0YSA/PyB7fTsKICBjb25zdCBpZCA9IHR5cGVvZiBwYXlsb2FkLmlkID09PSAnc3RyaW5nJyA/IHBheWxvYWQuaWQgOiB1bmRlZmluZWQ7CiAgY29uc3Qgc291cmNlID0gdHlwZW9mIHBheWxvYWQuc291cmNlID09PSAnc3RyaW5nJyA/IHBheWxvYWQuc291cmNlIDogdW5kZWZpbmVkOwogIGlmICghaWQgfHwgdHlwZW9mIHNvdXJjZSAhPT0gJ3N0cmluZycpIHsKICAgIHJldHVybjsKICB9CiAgdHJ5IHsKICAgIGNvbnNvbGUubG9nKCdbTWFya2Rvd25Xb3JrZXJdIHJlY2VpdmVkIHdvcmsnLCBpZCwgJ3NvdXJjZUxlbicsIHNvdXJjZT8ubGVuZ3RoID8/IDApOwogICAgY29uc3QgaHRtbCA9IHBhcnNlKHNvdXJjZSk7CiAgICBjb25zb2xlLmxvZygnW01hcmtkb3duV29ya2VyXSBwYXJzZWQgaHRtbCBsZW5ndGgnLCBodG1sPy5sZW5ndGggPz8gMCwgJ2ZvcicsIGlkKTsKICAgIC8vIFJldHVybiB0aGUgZ2VuZXJhdGVkIEhUTUwgZm9yIHRoZSBjYWxsZXIgdG8gY2FjaGUgYW5kIHJlbmRlcgogICAgLy8gS2VlcCB0aGUgcGF5bG9hZCBzbWFsbDogc2VuZCBpZCArIGh0bWwKICAgIC8vIE1hcmtlZCBvdXRwdXQgc2hvdWxkIGJlIHNhZmUtZW5vdWdoIGZvciBpbnRlcm5hbCBVSXM7IGNhbGxlcnMgbWF5IGZ1cnRoZXIgc2FuaXRpemUgaWYgcmVxdWlyZWQuCiAgICBzY29wZS5wb3N0TWVzc2FnZSh7IGlkLCBodG1sIH0pOwogIH0gY2F0Y2ggKGVycikgewogICAgY29uc29sZS5lcnJvcignW01hcmtkb3duV29ya2VyXSByZW5kZXIgZXJyb3InLCBlcnIpOwogICAgc2NvcGUucG9zdE1lc3NhZ2UoeyBpZCwgaHRtbDogYDxwcmU+RXJyb3IgcmVuZGVyaW5nIG1hcmtkb3duOiAke1N0cmluZyhlcnIpfTwvcHJlPmAgfSk7CiAgfQp9KTsK", import.meta.url), lo = ku.toString();
|
|
6850
6850
|
console.log("[MarkdownContent] worker url", lo);
|
|
6851
6851
|
const fi = [];
|
|
6852
6852
|
let hi = !1;
|
|
@@ -6950,12 +6950,12 @@ async function qx(e) {
|
|
|
6950
6950
|
}
|
|
6951
6951
|
})();
|
|
6952
6952
|
const fr = /* @__PURE__ */ new Map();
|
|
6953
|
-
function
|
|
6953
|
+
function Jx(e) {
|
|
6954
6954
|
const t = e.slice(0, 64), n = e.length > 64 ? e.slice(-64) : "";
|
|
6955
6955
|
return `${e.length}:${t}:${n}`;
|
|
6956
6956
|
}
|
|
6957
6957
|
function Xr({ content: e, className: t = "", fallback: n = /* @__PURE__ */ l.jsx("div", { "aria-busy": !0, children: "Rendering…" }) }) {
|
|
6958
|
-
const r =
|
|
6958
|
+
const r = Jx(e), [o, s] = fe(() => fr.get(r) ?? null);
|
|
6959
6959
|
Ve(() => {
|
|
6960
6960
|
if (fr.has(r)) {
|
|
6961
6961
|
const g = fr.get(r) ?? null;
|
|
@@ -7048,7 +7048,7 @@ async function _u(e, t) {
|
|
|
7048
7048
|
async function Ll(e, t) {
|
|
7049
7049
|
return await (await _u(`/chat/files/${e}/view`, t)).text();
|
|
7050
7050
|
}
|
|
7051
|
-
async function
|
|
7051
|
+
async function Zx(e, t) {
|
|
7052
7052
|
const n = await _u(`/chat/files/${e}/download`, t), r = URL.createObjectURL(n);
|
|
7053
7053
|
let o = `file_${e}`;
|
|
7054
7054
|
try {
|
|
@@ -7182,15 +7182,15 @@ var sb = "DismissableLayer", mi = "dismissableLayer.update", ib = "dismissableLa
|
|
|
7182
7182
|
onInteractOutside: i,
|
|
7183
7183
|
onDismiss: a,
|
|
7184
7184
|
...c
|
|
7185
|
-
} = e, u = f.useContext(Ou), [d, h] = f.useState(null), p = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, x] = f.useState({}), g = Te(t, (
|
|
7186
|
-
const I =
|
|
7187
|
-
!
|
|
7188
|
-
}, p), C = db((
|
|
7189
|
-
const I =
|
|
7190
|
-
[...u.branches].some((k) => k.contains(I)) || (s == null || s(
|
|
7185
|
+
} = e, u = f.useContext(Ou), [d, h] = f.useState(null), p = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, x] = f.useState({}), g = Te(t, (R) => h(R)), v = Array.from(u.layers), [m] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), b = v.indexOf(m), w = d ? v.indexOf(d) : -1, y = u.layersWithOutsidePointerEventsDisabled.size > 0, E = w >= b, S = ub((R) => {
|
|
7186
|
+
const I = R.target, A = [...u.branches].some((k) => k.contains(I));
|
|
7187
|
+
!E || A || (o == null || o(R), i == null || i(R), R.defaultPrevented || a == null || a());
|
|
7188
|
+
}, p), C = db((R) => {
|
|
7189
|
+
const I = R.target;
|
|
7190
|
+
[...u.branches].some((k) => k.contains(I)) || (s == null || s(R), i == null || i(R), R.defaultPrevented || a == null || a());
|
|
7191
7191
|
}, p);
|
|
7192
|
-
return ob((
|
|
7193
|
-
w === u.layers.size - 1 && (r == null || r(
|
|
7192
|
+
return ob((R) => {
|
|
7193
|
+
w === u.layers.size - 1 && (r == null || r(R), !R.defaultPrevented && a && (R.preventDefault(), a()));
|
|
7194
7194
|
}, p), f.useEffect(() => {
|
|
7195
7195
|
if (d)
|
|
7196
7196
|
return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (Bl = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(d)), u.layers.add(d), Hl(), () => {
|
|
@@ -7199,15 +7199,15 @@ var sb = "DismissableLayer", mi = "dismissableLayer.update", ib = "dismissableLa
|
|
|
7199
7199
|
}, [d, p, n, u]), f.useEffect(() => () => {
|
|
7200
7200
|
d && (u.layers.delete(d), u.layersWithOutsidePointerEventsDisabled.delete(d), Hl());
|
|
7201
7201
|
}, [d, u]), f.useEffect(() => {
|
|
7202
|
-
const
|
|
7203
|
-
return document.addEventListener(mi,
|
|
7202
|
+
const R = () => x({});
|
|
7203
|
+
return document.addEventListener(mi, R), () => document.removeEventListener(mi, R);
|
|
7204
7204
|
}, []), /* @__PURE__ */ l.jsx(
|
|
7205
7205
|
me.div,
|
|
7206
7206
|
{
|
|
7207
7207
|
...c,
|
|
7208
7208
|
ref: g,
|
|
7209
7209
|
style: {
|
|
7210
|
-
pointerEvents: y ?
|
|
7210
|
+
pointerEvents: y ? E ? "auto" : "none" : void 0,
|
|
7211
7211
|
...e.style
|
|
7212
7212
|
},
|
|
7213
7213
|
onFocusCapture: ee(e.onFocusCapture, C.onFocusCapture),
|
|
@@ -7284,7 +7284,7 @@ function Mu(e, t, n, { discrete: r }) {
|
|
|
7284
7284
|
const o = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
7285
7285
|
t && o.addEventListener(e, t, { once: !0 }), r ? Iu(o, s) : o.dispatchEvent(s);
|
|
7286
7286
|
}
|
|
7287
|
-
var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", $l = { bubbles: !1, cancelable: !0 }, fb = "FocusScope",
|
|
7287
|
+
var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", $l = { bubbles: !1, cancelable: !0 }, fb = "FocusScope", Jo = f.forwardRef((e, t) => {
|
|
7288
7288
|
const {
|
|
7289
7289
|
loop: n = !1,
|
|
7290
7290
|
trapped: r = !1,
|
|
@@ -7304,12 +7304,12 @@ var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", $l
|
|
|
7304
7304
|
if (r) {
|
|
7305
7305
|
let v = function(y) {
|
|
7306
7306
|
if (x.paused || !a) return;
|
|
7307
|
-
const
|
|
7308
|
-
a.contains(
|
|
7307
|
+
const E = y.target;
|
|
7308
|
+
a.contains(E) ? h.current = E : sn(h.current, { select: !0 });
|
|
7309
7309
|
}, m = function(y) {
|
|
7310
7310
|
if (x.paused || !a) return;
|
|
7311
|
-
const
|
|
7312
|
-
|
|
7311
|
+
const E = y.relatedTarget;
|
|
7312
|
+
E !== null && (a.contains(E) || sn(h.current, { select: !0 }));
|
|
7313
7313
|
}, b = function(y) {
|
|
7314
7314
|
if (document.activeElement === document.body)
|
|
7315
7315
|
for (const S of y)
|
|
@@ -7342,15 +7342,15 @@ var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", $l
|
|
|
7342
7342
|
if (!n && !r || x.paused) return;
|
|
7343
7343
|
const m = v.key === "Tab" && !v.altKey && !v.ctrlKey && !v.metaKey, b = document.activeElement;
|
|
7344
7344
|
if (m && b) {
|
|
7345
|
-
const w = v.currentTarget, [y,
|
|
7346
|
-
y &&
|
|
7345
|
+
const w = v.currentTarget, [y, E] = pb(w);
|
|
7346
|
+
y && E ? !v.shiftKey && b === E ? (v.preventDefault(), n && sn(y, { select: !0 })) : v.shiftKey && b === y && (v.preventDefault(), n && sn(E, { select: !0 })) : b === w && v.preventDefault();
|
|
7347
7347
|
}
|
|
7348
7348
|
},
|
|
7349
7349
|
[n, r, x.paused]
|
|
7350
7350
|
);
|
|
7351
7351
|
return /* @__PURE__ */ l.jsx(me.div, { tabIndex: -1, ...i, ref: p, onKeyDown: g });
|
|
7352
7352
|
});
|
|
7353
|
-
|
|
7353
|
+
Jo.displayName = fb;
|
|
7354
7354
|
function hb(e, { select: t = !1 } = {}) {
|
|
7355
7355
|
const n = document.activeElement;
|
|
7356
7356
|
for (const r of e)
|
|
@@ -7413,14 +7413,14 @@ function Wl(e, t) {
|
|
|
7413
7413
|
function xb(e) {
|
|
7414
7414
|
return e.filter((t) => t.tagName !== "A");
|
|
7415
7415
|
}
|
|
7416
|
-
var bb = "Portal",
|
|
7416
|
+
var bb = "Portal", Zo = f.forwardRef((e, t) => {
|
|
7417
7417
|
var a;
|
|
7418
7418
|
const { container: n, ...r } = e, [o, s] = f.useState(!1);
|
|
7419
7419
|
tt(() => s(!0), []);
|
|
7420
7420
|
const i = n || o && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
|
|
7421
7421
|
return i ? xc.createPortal(/* @__PURE__ */ l.jsx(me.div, { ...r, ref: t }), i) : null;
|
|
7422
7422
|
});
|
|
7423
|
-
|
|
7423
|
+
Zo.displayName = bb;
|
|
7424
7424
|
var Hs = 0;
|
|
7425
7425
|
function na() {
|
|
7426
7426
|
f.useEffect(() => {
|
|
@@ -7482,7 +7482,7 @@ function Cb(e, t) {
|
|
|
7482
7482
|
return n.callback = t, n.facade;
|
|
7483
7483
|
}
|
|
7484
7484
|
var Tb = typeof window < "u" ? f.useLayoutEffect : f.useEffect, Gl = /* @__PURE__ */ new WeakMap();
|
|
7485
|
-
function
|
|
7485
|
+
function Rb(e, t) {
|
|
7486
7486
|
var n = Cb(null, function(r) {
|
|
7487
7487
|
return e.forEach(function(o) {
|
|
7488
7488
|
return $s(o, r);
|
|
@@ -7501,11 +7501,11 @@ function Eb(e, t) {
|
|
|
7501
7501
|
Gl.set(n, e);
|
|
7502
7502
|
}, [e]), n;
|
|
7503
7503
|
}
|
|
7504
|
-
function
|
|
7504
|
+
function Eb(e) {
|
|
7505
7505
|
return e;
|
|
7506
7506
|
}
|
|
7507
7507
|
function Ib(e, t) {
|
|
7508
|
-
t === void 0 && (t =
|
|
7508
|
+
t === void 0 && (t = Eb);
|
|
7509
7509
|
var n = [], r = !1, o = {
|
|
7510
7510
|
read: function() {
|
|
7511
7511
|
if (r)
|
|
@@ -7583,12 +7583,12 @@ var Bu = Nb(), zs = function() {
|
|
|
7583
7583
|
onScrollCapture: zs,
|
|
7584
7584
|
onWheelCapture: zs,
|
|
7585
7585
|
onTouchMoveCapture: zs
|
|
7586
|
-
}), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, h = e.shards, p = e.sideCar, x = e.noRelative, g = e.noIsolation, v = e.inert, m = e.allowPinchZoom, b = e.as, w = b === void 0 ? "div" : b, y = e.gapMode,
|
|
7586
|
+
}), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, h = e.shards, p = e.sideCar, x = e.noRelative, g = e.noIsolation, v = e.inert, m = e.allowPinchZoom, b = e.as, w = b === void 0 ? "div" : b, y = e.gapMode, E = Lu(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = p, C = Rb([n, t]), R = Kt(Kt({}, E), o);
|
|
7587
7587
|
return f.createElement(
|
|
7588
7588
|
f.Fragment,
|
|
7589
7589
|
null,
|
|
7590
7590
|
d && f.createElement(S, { sideCar: Bu, removeScrollBar: u, shards: h, noRelative: x, noIsolation: g, inert: v, setCallbacks: s, allowPinchZoom: !!m, lockRef: n, gapMode: y }),
|
|
7591
|
-
i ? f.cloneElement(f.Children.only(a), Kt(Kt({},
|
|
7591
|
+
i ? f.cloneElement(f.Children.only(a), Kt(Kt({}, R), { ref: C })) : f.createElement(w, Kt({}, R, { className: c, ref: C }), a)
|
|
7592
7592
|
);
|
|
7593
7593
|
});
|
|
7594
7594
|
Qo.defaultProps = {
|
|
@@ -7800,7 +7800,7 @@ var Bn = gi ? { passive: !1 } : !1, Ub = function(e) {
|
|
|
7800
7800
|
c && (t.contains(a) || t === a)
|
|
7801
7801
|
);
|
|
7802
7802
|
return (d && Math.abs(h) < 1 || !d && Math.abs(p) < 1) && (u = !0), u;
|
|
7803
|
-
},
|
|
7803
|
+
}, Jr = function(e) {
|
|
7804
7804
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
7805
7805
|
}, Xl = function(e) {
|
|
7806
7806
|
return [e.deltaX, e.deltaY];
|
|
@@ -7808,14 +7808,14 @@ var Bn = gi ? { passive: !1 } : !1, Ub = function(e) {
|
|
|
7808
7808
|
return e && "current" in e ? e.current : e;
|
|
7809
7809
|
}, qb = function(e, t) {
|
|
7810
7810
|
return e[0] === t[0] && e[1] === t[1];
|
|
7811
|
-
},
|
|
7811
|
+
}, Jb = function(e) {
|
|
7812
7812
|
return `
|
|
7813
7813
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
7814
7814
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
7815
7815
|
`);
|
|
7816
|
-
},
|
|
7816
|
+
}, Zb = 0, Hn = [];
|
|
7817
7817
|
function Qb(e) {
|
|
7818
|
-
var t = f.useRef([]), n = f.useRef([0, 0]), r = f.useRef(), o = f.useState(
|
|
7818
|
+
var t = f.useRef([]), n = f.useRef([0, 0]), r = f.useRef(), o = f.useState(Zb++)[0], s = f.useState(Hu)[0], i = f.useRef(e);
|
|
7819
7819
|
f.useEffect(function() {
|
|
7820
7820
|
i.current = e;
|
|
7821
7821
|
}, [e]), f.useEffect(function() {
|
|
@@ -7834,22 +7834,22 @@ function Qb(e) {
|
|
|
7834
7834
|
var a = f.useCallback(function(v, m) {
|
|
7835
7835
|
if ("touches" in v && v.touches.length === 2 || v.type === "wheel" && v.ctrlKey)
|
|
7836
7836
|
return !i.current.allowPinchZoom;
|
|
7837
|
-
var b =
|
|
7838
|
-
if ("touches" in v &&
|
|
7837
|
+
var b = Jr(v), w = n.current, y = "deltaX" in v ? v.deltaX : w[0] - b[0], E = "deltaY" in v ? v.deltaY : w[1] - b[1], S, C = v.target, R = Math.abs(y) > Math.abs(E) ? "h" : "v";
|
|
7838
|
+
if ("touches" in v && R === "h" && C.type === "range")
|
|
7839
7839
|
return !1;
|
|
7840
|
-
var I = Yl(
|
|
7840
|
+
var I = Yl(R, C);
|
|
7841
7841
|
if (!I)
|
|
7842
7842
|
return !0;
|
|
7843
|
-
if (I ? S =
|
|
7843
|
+
if (I ? S = R : (S = R === "v" ? "h" : "v", I = Yl(R, C)), !I)
|
|
7844
7844
|
return !1;
|
|
7845
|
-
if (!r.current && "changedTouches" in v && (y ||
|
|
7845
|
+
if (!r.current && "changedTouches" in v && (y || E) && (r.current = S), !S)
|
|
7846
7846
|
return !0;
|
|
7847
7847
|
var A = r.current || S;
|
|
7848
|
-
return Xb(A, m, v, A === "h" ? y :
|
|
7848
|
+
return Xb(A, m, v, A === "h" ? y : E);
|
|
7849
7849
|
}, []), c = f.useCallback(function(v) {
|
|
7850
7850
|
var m = v;
|
|
7851
7851
|
if (!(!Hn.length || Hn[Hn.length - 1] !== s)) {
|
|
7852
|
-
var b = "deltaY" in m ? Xl(m) :
|
|
7852
|
+
var b = "deltaY" in m ? Xl(m) : Jr(m), w = t.current.filter(function(S) {
|
|
7853
7853
|
return S.name === m.type && (S.target === m.target || m.target === S.shadowParent) && qb(S.delta, b);
|
|
7854
7854
|
})[0];
|
|
7855
7855
|
if (w && w.should) {
|
|
@@ -7859,23 +7859,23 @@ function Qb(e) {
|
|
|
7859
7859
|
if (!w) {
|
|
7860
7860
|
var y = (i.current.shards || []).map(ql).filter(Boolean).filter(function(S) {
|
|
7861
7861
|
return S.contains(m.target);
|
|
7862
|
-
}),
|
|
7863
|
-
|
|
7862
|
+
}), E = y.length > 0 ? a(m, y[0]) : !i.current.noIsolation;
|
|
7863
|
+
E && m.cancelable && m.preventDefault();
|
|
7864
7864
|
}
|
|
7865
7865
|
}
|
|
7866
7866
|
}, []), u = f.useCallback(function(v, m, b, w) {
|
|
7867
7867
|
var y = { name: v, delta: m, target: b, should: w, shadowParent: ew(b) };
|
|
7868
7868
|
t.current.push(y), setTimeout(function() {
|
|
7869
|
-
t.current = t.current.filter(function(
|
|
7870
|
-
return
|
|
7869
|
+
t.current = t.current.filter(function(E) {
|
|
7870
|
+
return E !== y;
|
|
7871
7871
|
});
|
|
7872
7872
|
}, 1);
|
|
7873
7873
|
}, []), d = f.useCallback(function(v) {
|
|
7874
|
-
n.current =
|
|
7874
|
+
n.current = Jr(v), r.current = void 0;
|
|
7875
7875
|
}, []), h = f.useCallback(function(v) {
|
|
7876
7876
|
u(v.type, Xl(v), v.target, a(v, e.lockRef.current));
|
|
7877
7877
|
}, []), p = f.useCallback(function(v) {
|
|
7878
|
-
u(v.type,
|
|
7878
|
+
u(v.type, Jr(v), v.target, a(v, e.lockRef.current));
|
|
7879
7879
|
}, []);
|
|
7880
7880
|
f.useEffect(function() {
|
|
7881
7881
|
return Hn.push(s), e.setCallbacks({
|
|
@@ -7892,7 +7892,7 @@ function Qb(e) {
|
|
|
7892
7892
|
return f.createElement(
|
|
7893
7893
|
f.Fragment,
|
|
7894
7894
|
null,
|
|
7895
|
-
g ? f.createElement(s, { styles:
|
|
7895
|
+
g ? f.createElement(s, { styles: Jb(o) }) : null,
|
|
7896
7896
|
x ? f.createElement(zb, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
7897
7897
|
);
|
|
7898
7898
|
}
|
|
@@ -7911,7 +7911,7 @@ var nw = function(e) {
|
|
|
7911
7911
|
return null;
|
|
7912
7912
|
var t = Array.isArray(e) ? e[0] : e;
|
|
7913
7913
|
return t.ownerDocument.body;
|
|
7914
|
-
}, $n = /* @__PURE__ */ new WeakMap(),
|
|
7914
|
+
}, $n = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), Qr = {}, Ws = 0, Wu = function(e) {
|
|
7915
7915
|
return e && (e.host || Wu(e.parentNode));
|
|
7916
7916
|
}, rw = function(e, t) {
|
|
7917
7917
|
return t.map(function(n) {
|
|
@@ -7936,7 +7936,7 @@ var nw = function(e) {
|
|
|
7936
7936
|
else
|
|
7937
7937
|
try {
|
|
7938
7938
|
var x = p.getAttribute(r), g = x !== null && x !== "false", v = ($n.get(p) || 0) + 1, m = (s.get(p) || 0) + 1;
|
|
7939
|
-
$n.set(p, v), s.set(p, m), i.push(p), v === 1 && g &&
|
|
7939
|
+
$n.set(p, v), s.set(p, m), i.push(p), v === 1 && g && Zr.set(p, !0), m === 1 && p.setAttribute(n, "true"), g || p.setAttribute(r, "true");
|
|
7940
7940
|
} catch (b) {
|
|
7941
7941
|
console.error("aria-hidden: cannot operate on ", p, b);
|
|
7942
7942
|
}
|
|
@@ -7945,8 +7945,8 @@ var nw = function(e) {
|
|
|
7945
7945
|
return d(t), a.clear(), Ws++, function() {
|
|
7946
7946
|
i.forEach(function(h) {
|
|
7947
7947
|
var p = $n.get(h) - 1, x = s.get(h) - 1;
|
|
7948
|
-
$n.set(h, p), s.set(h, x), p || (
|
|
7949
|
-
}), Ws--, Ws || ($n = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(),
|
|
7948
|
+
$n.set(h, p), s.set(h, x), p || (Zr.has(h) || h.removeAttribute(r), Zr.delete(h)), x || h.removeAttribute(n);
|
|
7949
|
+
}), Ws--, Ws || ($n = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), Qr = {});
|
|
7950
7950
|
};
|
|
7951
7951
|
}, ra = function(e, t, n) {
|
|
7952
7952
|
n === void 0 && (n = "data-aria-hidden");
|
|
@@ -7954,7 +7954,7 @@ var nw = function(e) {
|
|
|
7954
7954
|
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), ow(r, o, n, "aria-hidden")) : function() {
|
|
7955
7955
|
return null;
|
|
7956
7956
|
};
|
|
7957
|
-
}, ts = "Dialog", [Vu,
|
|
7957
|
+
}, ts = "Dialog", [Vu, tR] = Ut(ts), [sw, Wt] = Vu(ts), Gu = (e) => {
|
|
7958
7958
|
const {
|
|
7959
7959
|
__scopeDialog: t,
|
|
7960
7960
|
children: n,
|
|
@@ -8009,16 +8009,16 @@ var oa = "DialogPortal", [iw, Xu] = Vu(oa, {
|
|
|
8009
8009
|
forceMount: void 0
|
|
8010
8010
|
}), qu = (e) => {
|
|
8011
8011
|
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = Wt(oa, t);
|
|
8012
|
-
return /* @__PURE__ */ l.jsx(iw, { scope: t, forceMount: n, children: f.Children.map(r, (i) => /* @__PURE__ */ l.jsx(vt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(
|
|
8012
|
+
return /* @__PURE__ */ l.jsx(iw, { scope: t, forceMount: n, children: f.Children.map(r, (i) => /* @__PURE__ */ l.jsx(vt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(Zo, { asChild: !0, container: o, children: i }) })) });
|
|
8013
8013
|
};
|
|
8014
8014
|
qu.displayName = oa;
|
|
8015
|
-
var No = "DialogOverlay",
|
|
8015
|
+
var No = "DialogOverlay", Ju = f.forwardRef(
|
|
8016
8016
|
(e, t) => {
|
|
8017
8017
|
const n = Xu(No, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Wt(No, e.__scopeDialog);
|
|
8018
8018
|
return s.modal ? /* @__PURE__ */ l.jsx(vt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(lw, { ...o, ref: t }) }) : null;
|
|
8019
8019
|
}
|
|
8020
8020
|
);
|
|
8021
|
-
|
|
8021
|
+
Ju.displayName = No;
|
|
8022
8022
|
var aw = Yn("DialogOverlay.RemoveScroll"), lw = f.forwardRef(
|
|
8023
8023
|
(e, t) => {
|
|
8024
8024
|
const { __scopeDialog: n, ...r } = e, o = Wt(No, n);
|
|
@@ -8036,13 +8036,13 @@ var aw = Yn("DialogOverlay.RemoveScroll"), lw = f.forwardRef(
|
|
|
8036
8036
|
) })
|
|
8037
8037
|
);
|
|
8038
8038
|
}
|
|
8039
|
-
), Nn = "DialogContent",
|
|
8039
|
+
), Nn = "DialogContent", Zu = f.forwardRef(
|
|
8040
8040
|
(e, t) => {
|
|
8041
8041
|
const n = Xu(Nn, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Wt(Nn, e.__scopeDialog);
|
|
8042
8042
|
return /* @__PURE__ */ l.jsx(vt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ l.jsx(cw, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(uw, { ...o, ref: t }) });
|
|
8043
8043
|
}
|
|
8044
8044
|
);
|
|
8045
|
-
|
|
8045
|
+
Zu.displayName = Nn;
|
|
8046
8046
|
var cw = f.forwardRef(
|
|
8047
8047
|
(e, t) => {
|
|
8048
8048
|
const n = Wt(Nn, e.__scopeDialog), r = f.useRef(null), o = Te(t, n.contentRef, r);
|
|
@@ -8099,7 +8099,7 @@ var cw = f.forwardRef(
|
|
|
8099
8099
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = Wt(Nn, n), c = f.useRef(null), u = Te(t, c);
|
|
8100
8100
|
return na(), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
8101
8101
|
/* @__PURE__ */ l.jsx(
|
|
8102
|
-
|
|
8102
|
+
Jo,
|
|
8103
8103
|
{
|
|
8104
8104
|
asChild: !0,
|
|
8105
8105
|
loop: !0,
|
|
@@ -8159,7 +8159,7 @@ od.displayName = rd;
|
|
|
8159
8159
|
function ia(e) {
|
|
8160
8160
|
return e ? "open" : "closed";
|
|
8161
8161
|
}
|
|
8162
|
-
var sd = "DialogTitleWarning", [
|
|
8162
|
+
var sd = "DialogTitleWarning", [nR, id] = _x(sd, {
|
|
8163
8163
|
contentName: Nn,
|
|
8164
8164
|
titleName: sa,
|
|
8165
8165
|
docsSlug: "dialog"
|
|
@@ -8179,7 +8179,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
8179
8179
|
const o = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
|
|
8180
8180
|
t && o && (document.getElementById(t) || console.warn(r));
|
|
8181
8181
|
}, [r, e, t]), null;
|
|
8182
|
-
}, ad = Gu, pw = Yu, ld = qu, ns =
|
|
8182
|
+
}, ad = Gu, pw = Yu, ld = qu, ns = Ju, rs = Zu, Tn = ed, os = nd, cd = od;
|
|
8183
8183
|
const mw = ad, gw = ld, ud = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
8184
8184
|
ns,
|
|
8185
8185
|
{
|
|
@@ -8287,7 +8287,7 @@ function xw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
|
|
|
8287
8287
|
}, x = async () => {
|
|
8288
8288
|
if (n)
|
|
8289
8289
|
try {
|
|
8290
|
-
await
|
|
8290
|
+
await Zx(n), h({ title: "Download started", description: `Downloading ${r}` });
|
|
8291
8291
|
} catch (b) {
|
|
8292
8292
|
console.error("Failed to download file:", b), h({ title: "Download failed", description: String(b), variant: "destructive" });
|
|
8293
8293
|
}
|
|
@@ -8413,7 +8413,7 @@ const ww = K.memo(function({
|
|
|
8413
8413
|
onCancelEdit: b,
|
|
8414
8414
|
onCopy: w
|
|
8415
8415
|
}) {
|
|
8416
|
-
const [y,
|
|
8416
|
+
const [y, E] = fe(!1), [S, C] = fe(!1), [R, I] = fe(!1), [A, k] = fe(!1), { currentThreadId: M } = Fi();
|
|
8417
8417
|
ta();
|
|
8418
8418
|
const [W, G] = fe({}), [N, $] = fe(!1), [L, X] = fe(null), O = u === "phone" || u === "half-screen", _ = t.role, z = _ === "tool", q = K.useMemo(() => {
|
|
8419
8419
|
switch (_) {
|
|
@@ -8428,7 +8428,7 @@ const ww = K.memo(function({
|
|
|
8428
8428
|
default:
|
|
8429
8429
|
return "text-[hsl(var(--chat-bubble-ai-text))]";
|
|
8430
8430
|
}
|
|
8431
|
-
}, [_]), oe = wn(() => yw(t.content), [t.content]), F = wn(() =>
|
|
8431
|
+
}, [_]), oe = wn(() => yw(t.content), [t.content]), F = wn(() => Ew(t.content), [t.content]), Q = wn(() => t.content.filter((ce) => ce.type === "image_url"), [t.content]), de = wn(() => t.content.filter((ce) => ce.type === "file"), [t.content]);
|
|
8432
8432
|
Ve(() => {
|
|
8433
8433
|
console.log("[DEBUG] MessageComponent render:", {
|
|
8434
8434
|
messageId: t.id,
|
|
@@ -8442,7 +8442,7 @@ const ww = K.memo(function({
|
|
|
8442
8442
|
const be = Nw(oe, r ? o : 0), Y = async () => {
|
|
8443
8443
|
try {
|
|
8444
8444
|
const ce = z ? zn(t.content) : oe;
|
|
8445
|
-
await navigator.clipboard.writeText(ce),
|
|
8445
|
+
await navigator.clipboard.writeText(ce), E(!0), setTimeout(() => E(!1), 2e3), w == null || w(ce);
|
|
8446
8446
|
} catch (ce) {
|
|
8447
8447
|
console.error("Failed to copy:", ce);
|
|
8448
8448
|
}
|
|
@@ -8450,7 +8450,7 @@ const ww = K.memo(function({
|
|
|
8450
8450
|
if (!v) return;
|
|
8451
8451
|
const ce = z ? zn(t.content) : oe;
|
|
8452
8452
|
v(t.id, ce);
|
|
8453
|
-
},
|
|
8453
|
+
}, Z = () => m == null ? void 0 : m(n), ne = () => {
|
|
8454
8454
|
const Ae = D(O ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", q);
|
|
8455
8455
|
switch (_) {
|
|
8456
8456
|
case "user":
|
|
@@ -8523,7 +8523,7 @@ const ww = K.memo(function({
|
|
|
8523
8523
|
const ve = t.content.find((Be) => Be.type === "tool_result"), H = (ve == null ? void 0 : ve.output) ?? zn(t.content), ae = md(H);
|
|
8524
8524
|
if (ae) return /* @__PURE__ */ l.jsx(Aw, { issues: ae });
|
|
8525
8525
|
}
|
|
8526
|
-
if (z && !
|
|
8526
|
+
if (z && !R) {
|
|
8527
8527
|
const ve = zn(t.content).slice(0, 80).replace(/\s+/g, " ");
|
|
8528
8528
|
return /* @__PURE__ */ l.jsx("div", { className: D("text-xs font-mono opacity-70 flex items-center justify-between gap-2 text-current", O && "text-[10px]"), children: /* @__PURE__ */ l.jsxs("span", { className: "truncate max-w-full text-current", children: [
|
|
8529
8529
|
ve,
|
|
@@ -8545,7 +8545,7 @@ const ww = K.memo(function({
|
|
|
8545
8545
|
] }) }) })
|
|
8546
8546
|
] }) });
|
|
8547
8547
|
}
|
|
8548
|
-
if (z &&
|
|
8548
|
+
if (z && R && !d) {
|
|
8549
8549
|
const ve = kw(t.content);
|
|
8550
8550
|
if (ve && Sw(ve))
|
|
8551
8551
|
return /* @__PURE__ */ l.jsx(Xr, { content: ve.trim() });
|
|
@@ -8557,12 +8557,12 @@ const ww = K.memo(function({
|
|
|
8557
8557
|
r ? /* @__PURE__ */ l.jsxs("div", { className: "relative", children: [
|
|
8558
8558
|
(() => {
|
|
8559
8559
|
const ve = Vs(be);
|
|
8560
|
-
return ve !== null ? /* @__PURE__ */ l.jsx(
|
|
8560
|
+
return ve !== null ? /* @__PURE__ */ l.jsx(Jl, { data: ve }) : /* @__PURE__ */ l.jsx(Xr, { content: Tw(Cw(be)) });
|
|
8561
8561
|
})(),
|
|
8562
8562
|
/* @__PURE__ */ l.jsx(bw, { className: D(q, O ? "text-xs" : "text-sm") })
|
|
8563
8563
|
] }) : (() => {
|
|
8564
8564
|
const ve = Vs(oe.trim());
|
|
8565
|
-
if (ve !== null) return /* @__PURE__ */ l.jsx(
|
|
8565
|
+
if (ve !== null) return /* @__PURE__ */ l.jsx(Jl, { data: ve });
|
|
8566
8566
|
if (_ === "user" && p) {
|
|
8567
8567
|
const H = oe.trim();
|
|
8568
8568
|
if (H.length > x)
|
|
@@ -8618,7 +8618,7 @@ const ww = K.memo(function({
|
|
|
8618
8618
|
ne(),
|
|
8619
8619
|
c && Le && /* @__PURE__ */ l.jsx("span", { className: D("font-medium", O ? "text-xs" : "text-sm"), children: Le }),
|
|
8620
8620
|
z && F.name && /* @__PURE__ */ l.jsxs(
|
|
8621
|
-
|
|
8621
|
+
Eu,
|
|
8622
8622
|
{
|
|
8623
8623
|
variant: "outline",
|
|
8624
8624
|
className: D(
|
|
@@ -8630,7 +8630,7 @@ const ww = K.memo(function({
|
|
|
8630
8630
|
onClick: () => I((ce) => !ce),
|
|
8631
8631
|
children: [
|
|
8632
8632
|
/* @__PURE__ */ l.jsx("span", { children: F.name }),
|
|
8633
|
-
/* @__PURE__ */ l.jsx("span", { className: "inline-flex items-center", children:
|
|
8633
|
+
/* @__PURE__ */ l.jsx("span", { className: "inline-flex items-center", children: R ? /* @__PURE__ */ l.jsx(hr, { className: "h-3 w-3" }) : /* @__PURE__ */ l.jsx(Un, { className: "h-3 w-3" }) })
|
|
8634
8634
|
]
|
|
8635
8635
|
}
|
|
8636
8636
|
),
|
|
@@ -8643,7 +8643,7 @@ const ww = K.memo(function({
|
|
|
8643
8643
|
onClick: () => I((ce) => !ce),
|
|
8644
8644
|
children: /* @__PURE__ */ l.jsxs("span", { className: "text-xs flex items-center gap-1", children: [
|
|
8645
8645
|
"Tool Output ",
|
|
8646
|
-
|
|
8646
|
+
R ? /* @__PURE__ */ l.jsx(hr, { className: "h-3 w-3" }) : /* @__PURE__ */ l.jsx(Un, { className: "h-3 w-3" })
|
|
8647
8647
|
] })
|
|
8648
8648
|
}
|
|
8649
8649
|
)
|
|
@@ -8692,7 +8692,7 @@ const ww = K.memo(function({
|
|
|
8692
8692
|
{
|
|
8693
8693
|
variant: "ghost",
|
|
8694
8694
|
size: "sm",
|
|
8695
|
-
onClick:
|
|
8695
|
+
onClick: Z,
|
|
8696
8696
|
className: D("h-6 w-6 p-0 hover:bg-foreground/10", q, O && "h-5 w-5"),
|
|
8697
8697
|
children: /* @__PURE__ */ l.jsx(qs, { className: D(q, O ? "h-3 w-3" : "h-4 w-4") })
|
|
8698
8698
|
}
|
|
@@ -8705,7 +8705,7 @@ const ww = K.memo(function({
|
|
|
8705
8705
|
}
|
|
8706
8706
|
),
|
|
8707
8707
|
/* @__PURE__ */ l.jsx("div", { className: "relative", children: Fe() }),
|
|
8708
|
-
z &&
|
|
8708
|
+
z && R && (F.toolCallId || F.name) && /* @__PURE__ */ l.jsxs("div", { className: D("mt-2 pt-2 border-t border-current/10 text-xs opacity-60", O && "text-xs"), children: [
|
|
8709
8709
|
F.name && /* @__PURE__ */ l.jsxs("div", { children: [
|
|
8710
8710
|
"Function: ",
|
|
8711
8711
|
F.name
|
|
@@ -8749,7 +8749,7 @@ const ww = K.memo(function({
|
|
|
8749
8749
|
{
|
|
8750
8750
|
variant: "ghost",
|
|
8751
8751
|
size: "sm",
|
|
8752
|
-
onClick:
|
|
8752
|
+
onClick: Z,
|
|
8753
8753
|
className: D("h-6 w-6 p-0 hover:bg-background/50 text-current", O && "h-5 w-5"),
|
|
8754
8754
|
children: /* @__PURE__ */ l.jsx(qs, { className: D("text-current", O ? "h-3 w-3" : "h-4 w-4") })
|
|
8755
8755
|
}
|
|
@@ -8807,7 +8807,7 @@ function Vs(e) {
|
|
|
8807
8807
|
return null;
|
|
8808
8808
|
}
|
|
8809
8809
|
}
|
|
8810
|
-
function
|
|
8810
|
+
function Jl({ data: e }) {
|
|
8811
8811
|
if (Array.isArray(e))
|
|
8812
8812
|
return e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ l.jsx("div", { className: po, children: /* @__PURE__ */ l.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ l.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ l.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: br(e) });
|
|
8813
8813
|
if (e && typeof e == "object") {
|
|
@@ -8834,12 +8834,12 @@ function Zl({ data: e }) {
|
|
|
8834
8834
|
s,
|
|
8835
8835
|
":"
|
|
8836
8836
|
] }),
|
|
8837
|
-
/* @__PURE__ */ l.jsx("dd", { className: "inline", children:
|
|
8837
|
+
/* @__PURE__ */ l.jsx("dd", { className: "inline", children: Rw(i) })
|
|
8838
8838
|
] }, s)) }) });
|
|
8839
8839
|
}
|
|
8840
8840
|
return /* @__PURE__ */ l.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: br(e) });
|
|
8841
8841
|
}
|
|
8842
|
-
function
|
|
8842
|
+
function Rw(e) {
|
|
8843
8843
|
if (e == null) return String(e);
|
|
8844
8844
|
const t = typeof e;
|
|
8845
8845
|
if (t === "string" || t === "number" || t === "boolean") return String(e);
|
|
@@ -8887,7 +8887,7 @@ function br(e) {
|
|
|
8887
8887
|
return "";
|
|
8888
8888
|
}
|
|
8889
8889
|
}
|
|
8890
|
-
function
|
|
8890
|
+
function Ew(e) {
|
|
8891
8891
|
const t = e.find((r) => r.type === "tool_call"), n = e.find((r) => r.type === "tool_result");
|
|
8892
8892
|
return {
|
|
8893
8893
|
name: t == null ? void 0 : t.name,
|
|
@@ -9049,15 +9049,15 @@ function aa(e) {
|
|
|
9049
9049
|
i.displayName = t;
|
|
9050
9050
|
const a = e + "CollectionSlot", c = Yn(a), u = K.forwardRef(
|
|
9051
9051
|
(v, m) => {
|
|
9052
|
-
const { scope: b, children: w } = v, y = s(a, b),
|
|
9053
|
-
return /* @__PURE__ */ l.jsx(c, { ref:
|
|
9052
|
+
const { scope: b, children: w } = v, y = s(a, b), E = Te(m, y.collectionRef);
|
|
9053
|
+
return /* @__PURE__ */ l.jsx(c, { ref: E, children: w });
|
|
9054
9054
|
}
|
|
9055
9055
|
);
|
|
9056
9056
|
u.displayName = a;
|
|
9057
9057
|
const d = e + "CollectionItemSlot", h = "data-radix-collection-item", p = Yn(d), x = K.forwardRef(
|
|
9058
9058
|
(v, m) => {
|
|
9059
|
-
const { scope: b, children: w, ...y } = v,
|
|
9060
|
-
return K.useEffect(() => (C.itemMap.set(
|
|
9059
|
+
const { scope: b, children: w, ...y } = v, E = K.useRef(null), S = Te(m, E), C = s(d, b);
|
|
9060
|
+
return K.useEffect(() => (C.itemMap.set(E, { ref: E, ...y }), () => void C.itemMap.delete(E))), /* @__PURE__ */ l.jsx(p, { [h]: "", ref: S, children: w });
|
|
9061
9061
|
}
|
|
9062
9062
|
);
|
|
9063
9063
|
x.displayName = d;
|
|
@@ -9068,7 +9068,7 @@ function aa(e) {
|
|
|
9068
9068
|
if (!w) return [];
|
|
9069
9069
|
const y = Array.from(w.querySelectorAll(`[${h}]`));
|
|
9070
9070
|
return Array.from(m.itemMap.values()).sort(
|
|
9071
|
-
(C,
|
|
9071
|
+
(C, R) => y.indexOf(C.ref.current) - y.indexOf(R.ref.current)
|
|
9072
9072
|
);
|
|
9073
9073
|
}, [m.collectionRef, m.itemMap]);
|
|
9074
9074
|
}
|
|
@@ -9133,12 +9133,12 @@ function $w(e) {
|
|
|
9133
9133
|
function xi(e) {
|
|
9134
9134
|
return e.replace(/start|end/g, (t) => Fw[t]);
|
|
9135
9135
|
}
|
|
9136
|
-
const
|
|
9136
|
+
const Zl = ["left", "right"], Ql = ["right", "left"], zw = ["top", "bottom"], Uw = ["bottom", "top"];
|
|
9137
9137
|
function Ww(e, t, n) {
|
|
9138
9138
|
switch (e) {
|
|
9139
9139
|
case "top":
|
|
9140
9140
|
case "bottom":
|
|
9141
|
-
return n ? t ? Ql :
|
|
9141
|
+
return n ? t ? Ql : Zl : t ? Zl : Ql;
|
|
9142
9142
|
case "left":
|
|
9143
9143
|
case "right":
|
|
9144
9144
|
return t ? zw : Uw;
|
|
@@ -9259,7 +9259,7 @@ const Kw = async (e, t, n) => {
|
|
|
9259
9259
|
} = a[v], {
|
|
9260
9260
|
x: w,
|
|
9261
9261
|
y,
|
|
9262
|
-
data:
|
|
9262
|
+
data: E,
|
|
9263
9263
|
reset: S
|
|
9264
9264
|
} = await b({
|
|
9265
9265
|
x: d,
|
|
@@ -9279,7 +9279,7 @@ const Kw = async (e, t, n) => {
|
|
|
9279
9279
|
...x,
|
|
9280
9280
|
[m]: {
|
|
9281
9281
|
...x[m],
|
|
9282
|
-
...
|
|
9282
|
+
...E
|
|
9283
9283
|
}
|
|
9284
9284
|
}, S && g <= 50 && (g++, typeof S == "object" && (S.placement && (p = S.placement), S.rects && (u = S.rects === !0 ? await i.getElementRects({
|
|
9285
9285
|
reference: e,
|
|
@@ -9298,7 +9298,7 @@ const Kw = async (e, t, n) => {
|
|
|
9298
9298
|
middlewareData: x
|
|
9299
9299
|
};
|
|
9300
9300
|
};
|
|
9301
|
-
async function
|
|
9301
|
+
async function Er(e, t) {
|
|
9302
9302
|
var n;
|
|
9303
9303
|
t === void 0 && (t = {});
|
|
9304
9304
|
const {
|
|
@@ -9324,7 +9324,7 @@ async function Rr(e, t) {
|
|
|
9324
9324
|
y: o,
|
|
9325
9325
|
width: i.floating.width,
|
|
9326
9326
|
height: i.floating.height
|
|
9327
|
-
} : i.reference, y = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating)),
|
|
9327
|
+
} : i.reference, y = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating)), E = await (s.isElement == null ? void 0 : s.isElement(y)) ? await (s.getScale == null ? void 0 : s.getScale(y)) || {
|
|
9328
9328
|
x: 1,
|
|
9329
9329
|
y: 1
|
|
9330
9330
|
} : {
|
|
@@ -9337,10 +9337,10 @@ async function Rr(e, t) {
|
|
|
9337
9337
|
strategy: c
|
|
9338
9338
|
}) : w);
|
|
9339
9339
|
return {
|
|
9340
|
-
top: (b.top - S.top + g.top) /
|
|
9341
|
-
bottom: (S.bottom - b.bottom + g.bottom) /
|
|
9342
|
-
left: (b.left - S.left + g.left) /
|
|
9343
|
-
right: (S.right - b.right + g.right) /
|
|
9340
|
+
top: (b.top - S.top + g.top) / E.y,
|
|
9341
|
+
bottom: (S.bottom - b.bottom + g.bottom) / E.y,
|
|
9342
|
+
left: (b.left - S.left + g.left) / E.x,
|
|
9343
|
+
right: (S.right - b.right + g.right) / E.x
|
|
9344
9344
|
};
|
|
9345
9345
|
}
|
|
9346
9346
|
const Yw = (e) => ({
|
|
@@ -9364,10 +9364,10 @@ const Yw = (e) => ({
|
|
|
9364
9364
|
const h = gd(d), p = {
|
|
9365
9365
|
x: n,
|
|
9366
9366
|
y: r
|
|
9367
|
-
}, x = ua(o), g = ca(x), v = await i.getDimensions(u), m = x === "y", b = m ? "top" : "left", w = m ? "bottom" : "right", y = m ? "clientHeight" : "clientWidth",
|
|
9368
|
-
let
|
|
9369
|
-
(!
|
|
9370
|
-
const I =
|
|
9367
|
+
}, x = ua(o), g = ca(x), v = await i.getDimensions(u), m = x === "y", b = m ? "top" : "left", w = m ? "bottom" : "right", y = m ? "clientHeight" : "clientWidth", E = s.reference[g] + s.reference[x] - p[x] - s.floating[g], S = p[x] - s.reference[x], C = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
|
|
9368
|
+
let R = C ? C[y] : 0;
|
|
9369
|
+
(!R || !await (i.isElement == null ? void 0 : i.isElement(C))) && (R = a.floating[y] || s.floating[g]);
|
|
9370
|
+
const I = E / 2 - S / 2, A = R / 2 - v[g] / 2 - 1, k = dn(h[b], A), M = dn(h[w], A), W = k, G = R - v[g] - M, N = R / 2 - v[g] / 2 + I, $ = vi(W, N, G), L = !c.arrow && or(o) != null && N !== $ && s.reference[g] / 2 - (N < W ? k : M) - v[g] / 2 < 0, X = L ? N < W ? N - W : N - G : 0;
|
|
9371
9371
|
return {
|
|
9372
9372
|
[x]: p[x] + X,
|
|
9373
9373
|
data: {
|
|
@@ -9404,12 +9404,12 @@ const Yw = (e) => ({
|
|
|
9404
9404
|
} = rn(e, t);
|
|
9405
9405
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
9406
9406
|
return {};
|
|
9407
|
-
const b = on(o), w = Xt(a), y = on(a) === a,
|
|
9408
|
-
!p && C && S.push(...Vw(a, v, g,
|
|
9409
|
-
const
|
|
9407
|
+
const b = on(o), w = Xt(a), y = on(a) === a, E = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = p || (y || !v ? [ko(a)] : $w(a)), C = g !== "none";
|
|
9408
|
+
!p && C && S.push(...Vw(a, v, g, E));
|
|
9409
|
+
const R = [a, ...S], I = await Er(t, m), A = [];
|
|
9410
9410
|
let k = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
9411
9411
|
if (d && A.push(I[b]), h) {
|
|
9412
|
-
const N = Hw(o, i,
|
|
9412
|
+
const N = Hw(o, i, E);
|
|
9413
9413
|
A.push(I[N[0]], I[N[1]]);
|
|
9414
9414
|
}
|
|
9415
9415
|
if (k = [...k, {
|
|
@@ -9417,7 +9417,7 @@ const Yw = (e) => ({
|
|
|
9417
9417
|
overflows: A
|
|
9418
9418
|
}], !A.every((N) => N <= 0)) {
|
|
9419
9419
|
var M, W;
|
|
9420
|
-
const N = (((M = s.flip) == null ? void 0 : M.index) || 0) + 1, $ =
|
|
9420
|
+
const N = (((M = s.flip) == null ? void 0 : M.index) || 0) + 1, $ = R[N];
|
|
9421
9421
|
if ($ && (!(h === "alignment" ? w !== Xt($) : !1) || // We leave the current main axis only if every placement on that axis
|
|
9422
9422
|
// overflows the main axis.
|
|
9423
9423
|
k.every((O) => Xt(O.placement) === w ? O.overflows[0] > 0 : !0)))
|
|
@@ -9486,7 +9486,7 @@ const qw = function(e) {
|
|
|
9486
9486
|
} = rn(e, t);
|
|
9487
9487
|
switch (r) {
|
|
9488
9488
|
case "referenceHidden": {
|
|
9489
|
-
const s = await
|
|
9489
|
+
const s = await Er(t, {
|
|
9490
9490
|
...o,
|
|
9491
9491
|
elementContext: "reference"
|
|
9492
9492
|
}), i = tc(s, n.reference);
|
|
@@ -9498,7 +9498,7 @@ const qw = function(e) {
|
|
|
9498
9498
|
};
|
|
9499
9499
|
}
|
|
9500
9500
|
case "escaped": {
|
|
9501
|
-
const s = await
|
|
9501
|
+
const s = await Er(t, {
|
|
9502
9502
|
...o,
|
|
9503
9503
|
altBoundary: !0
|
|
9504
9504
|
}), i = tc(s, n.floating);
|
|
@@ -9515,7 +9515,7 @@ const qw = function(e) {
|
|
|
9515
9515
|
}
|
|
9516
9516
|
};
|
|
9517
9517
|
}, vd = /* @__PURE__ */ new Set(["left", "top"]);
|
|
9518
|
-
async function
|
|
9518
|
+
async function Jw(e, t) {
|
|
9519
9519
|
const {
|
|
9520
9520
|
placement: n,
|
|
9521
9521
|
platform: r,
|
|
@@ -9542,7 +9542,7 @@ async function Zw(e, t) {
|
|
|
9542
9542
|
y: x * d
|
|
9543
9543
|
};
|
|
9544
9544
|
}
|
|
9545
|
-
const
|
|
9545
|
+
const Zw = function(e) {
|
|
9546
9546
|
return e === void 0 && (e = 0), {
|
|
9547
9547
|
name: "offset",
|
|
9548
9548
|
options: e,
|
|
@@ -9553,7 +9553,7 @@ const Jw = function(e) {
|
|
|
9553
9553
|
y: s,
|
|
9554
9554
|
placement: i,
|
|
9555
9555
|
middlewareData: a
|
|
9556
|
-
} = t, c = await
|
|
9556
|
+
} = t, c = await Jw(t, e);
|
|
9557
9557
|
return i === ((n = a.offset) == null ? void 0 : n.placement) && (r = a.arrow) != null && r.alignmentOffset ? {} : {
|
|
9558
9558
|
x: o + c.x,
|
|
9559
9559
|
y: s + c.y,
|
|
@@ -9592,7 +9592,7 @@ const Jw = function(e) {
|
|
|
9592
9592
|
} = rn(e, t), u = {
|
|
9593
9593
|
x: n,
|
|
9594
9594
|
y: r
|
|
9595
|
-
}, d = await
|
|
9595
|
+
}, d = await Er(t, c), h = Xt(on(o)), p = la(h);
|
|
9596
9596
|
let x = u[p], g = u[h];
|
|
9597
9597
|
if (s) {
|
|
9598
9598
|
const m = p === "y" ? "top" : "left", b = p === "y" ? "bottom" : "right", w = x + d[m], y = x - d[b];
|
|
@@ -9648,12 +9648,12 @@ const Jw = function(e) {
|
|
|
9648
9648
|
...v
|
|
9649
9649
|
};
|
|
9650
9650
|
if (c) {
|
|
9651
|
-
const y = p === "y" ? "height" : "width",
|
|
9652
|
-
x <
|
|
9651
|
+
const y = p === "y" ? "height" : "width", E = s.reference[p] - s.floating[y] + m.mainAxis, S = s.reference[p] + s.reference[y] - m.mainAxis;
|
|
9652
|
+
x < E ? x = E : x > S && (x = S);
|
|
9653
9653
|
}
|
|
9654
9654
|
if (u) {
|
|
9655
9655
|
var b, w;
|
|
9656
|
-
const y = p === "y" ? "width" : "height",
|
|
9656
|
+
const y = p === "y" ? "width" : "height", E = vd.has(on(o)), S = s.reference[h] - s.floating[y] + (E && ((b = i.offset) == null ? void 0 : b[h]) || 0) + (E ? 0 : m.crossAxis), C = s.reference[h] + s.reference[y] + (E ? 0 : ((w = i.offset) == null ? void 0 : w[h]) || 0) - (E ? m.crossAxis : 0);
|
|
9657
9657
|
g < S ? g = S : g > C && (g = C);
|
|
9658
9658
|
}
|
|
9659
9659
|
return {
|
|
@@ -9677,22 +9677,22 @@ const Jw = function(e) {
|
|
|
9677
9677
|
apply: c = () => {
|
|
9678
9678
|
},
|
|
9679
9679
|
...u
|
|
9680
|
-
} = rn(e, t), d = await
|
|
9680
|
+
} = rn(e, t), d = await Er(t, u), h = on(o), p = or(o), x = Xt(o) === "y", {
|
|
9681
9681
|
width: g,
|
|
9682
9682
|
height: v
|
|
9683
9683
|
} = s.floating;
|
|
9684
9684
|
let m, b;
|
|
9685
9685
|
h === "top" || h === "bottom" ? (m = h, b = p === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (b = h, m = p === "end" ? "top" : "bottom");
|
|
9686
|
-
const w = v - d.top - d.bottom, y = g - d.left - d.right,
|
|
9687
|
-
let
|
|
9688
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (I = y), (r = t.middlewareData.shift) != null && r.enabled.y && (
|
|
9686
|
+
const w = v - d.top - d.bottom, y = g - d.left - d.right, E = dn(v - d[m], w), S = dn(g - d[b], y), C = !t.middlewareData.shift;
|
|
9687
|
+
let R = E, I = S;
|
|
9688
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (I = y), (r = t.middlewareData.shift) != null && r.enabled.y && (R = w), C && !p) {
|
|
9689
9689
|
const k = wt(d.left, 0), M = wt(d.right, 0), W = wt(d.top, 0), G = wt(d.bottom, 0);
|
|
9690
|
-
x ? I = g - 2 * (k !== 0 || M !== 0 ? k + M : wt(d.left, d.right)) :
|
|
9690
|
+
x ? I = g - 2 * (k !== 0 || M !== 0 ? k + M : wt(d.left, d.right)) : R = v - 2 * (W !== 0 || G !== 0 ? W + G : wt(d.top, d.bottom));
|
|
9691
9691
|
}
|
|
9692
9692
|
await c({
|
|
9693
9693
|
...t,
|
|
9694
9694
|
availableWidth: I,
|
|
9695
|
-
availableHeight:
|
|
9695
|
+
availableHeight: R
|
|
9696
9696
|
});
|
|
9697
9697
|
const A = await i.getDimensions(a.floating);
|
|
9698
9698
|
return g !== A.width || v !== A.height ? {
|
|
@@ -9723,7 +9723,7 @@ function xd(e) {
|
|
|
9723
9723
|
function Ht(e) {
|
|
9724
9724
|
return is() ? e instanceof Element || e instanceof Ct(e).Element : !1;
|
|
9725
9725
|
}
|
|
9726
|
-
function
|
|
9726
|
+
function Jt(e) {
|
|
9727
9727
|
return is() ? e instanceof HTMLElement || e instanceof Ct(e).HTMLElement : !1;
|
|
9728
9728
|
}
|
|
9729
9729
|
function rc(e) {
|
|
@@ -9760,7 +9760,7 @@ function da(e) {
|
|
|
9760
9760
|
}
|
|
9761
9761
|
function cy(e) {
|
|
9762
9762
|
let t = fn(e);
|
|
9763
|
-
for (;
|
|
9763
|
+
for (; Jt(t) && !qn(t); ) {
|
|
9764
9764
|
if (da(t))
|
|
9765
9765
|
return t;
|
|
9766
9766
|
if (as(t))
|
|
@@ -9802,7 +9802,7 @@ function fn(e) {
|
|
|
9802
9802
|
}
|
|
9803
9803
|
function bd(e) {
|
|
9804
9804
|
const t = fn(e);
|
|
9805
|
-
return qn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body :
|
|
9805
|
+
return qn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Jt(t) && $r(t) ? t : bd(t);
|
|
9806
9806
|
}
|
|
9807
9807
|
function Ir(e, t, n) {
|
|
9808
9808
|
var r;
|
|
@@ -9820,7 +9820,7 @@ function bi(e) {
|
|
|
9820
9820
|
function wd(e) {
|
|
9821
9821
|
const t = $t(e);
|
|
9822
9822
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
9823
|
-
const o =
|
|
9823
|
+
const o = Jt(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, a = Ao(n) !== s || Ao(r) !== i;
|
|
9824
9824
|
return a && (n = s, r = i), {
|
|
9825
9825
|
width: n,
|
|
9826
9826
|
height: r,
|
|
@@ -9832,7 +9832,7 @@ function ha(e) {
|
|
|
9832
9832
|
}
|
|
9833
9833
|
function Kn(e) {
|
|
9834
9834
|
const t = ha(e);
|
|
9835
|
-
if (!
|
|
9835
|
+
if (!Jt(t))
|
|
9836
9836
|
return qt(1);
|
|
9837
9837
|
const n = t.getBoundingClientRect(), {
|
|
9838
9838
|
width: r,
|
|
@@ -9867,8 +9867,8 @@ function jn(e, t, n, r) {
|
|
|
9867
9867
|
const p = Ct(s), x = r && Ht(r) ? Ct(r) : r;
|
|
9868
9868
|
let g = p, v = bi(g);
|
|
9869
9869
|
for (; v && r && x !== g; ) {
|
|
9870
|
-
const m = Kn(v), b = v.getBoundingClientRect(), w = $t(v), y = b.left + (v.clientLeft + parseFloat(w.paddingLeft)) * m.x,
|
|
9871
|
-
c *= m.x, u *= m.y, d *= m.x, h *= m.y, c += y, u +=
|
|
9870
|
+
const m = Kn(v), b = v.getBoundingClientRect(), w = $t(v), y = b.left + (v.clientLeft + parseFloat(w.paddingLeft)) * m.x, E = b.top + (v.clientTop + parseFloat(w.paddingTop)) * m.y;
|
|
9871
|
+
c *= m.x, u *= m.y, d *= m.x, h *= m.y, c += y, u += E, g = Ct(v), v = bi(g);
|
|
9872
9872
|
}
|
|
9873
9873
|
}
|
|
9874
9874
|
return Po({
|
|
@@ -9903,8 +9903,8 @@ function hy(e) {
|
|
|
9903
9903
|
scrollLeft: 0,
|
|
9904
9904
|
scrollTop: 0
|
|
9905
9905
|
}, u = qt(1);
|
|
9906
|
-
const d = qt(0), h =
|
|
9907
|
-
if ((h || !h && !s) && ((sr(r) !== "body" || $r(i)) && (c = ls(r)),
|
|
9906
|
+
const d = qt(0), h = Jt(r);
|
|
9907
|
+
if ((h || !h && !s) && ((sr(r) !== "body" || $r(i)) && (c = ls(r)), Jt(r))) {
|
|
9908
9908
|
const x = jn(r);
|
|
9909
9909
|
u = Kn(r), d.x = x.x + r.clientLeft, d.y = x.y + r.clientTop;
|
|
9910
9910
|
}
|
|
@@ -9953,7 +9953,7 @@ function gy(e, t) {
|
|
|
9953
9953
|
}
|
|
9954
9954
|
const vy = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
9955
9955
|
function xy(e, t) {
|
|
9956
|
-
const n = jn(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s =
|
|
9956
|
+
const n = jn(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Jt(e) ? Kn(e) : qt(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, c = o * s.x, u = r * s.y;
|
|
9957
9957
|
return {
|
|
9958
9958
|
width: i,
|
|
9959
9959
|
height: a,
|
|
@@ -10026,7 +10026,7 @@ function yy(e) {
|
|
|
10026
10026
|
};
|
|
10027
10027
|
}
|
|
10028
10028
|
function Sy(e, t, n) {
|
|
10029
|
-
const r =
|
|
10029
|
+
const r = Jt(t), o = Qt(t), s = n === "fixed", i = jn(e, !0, s, t);
|
|
10030
10030
|
let a = {
|
|
10031
10031
|
scrollLeft: 0,
|
|
10032
10032
|
scrollTop: 0
|
|
@@ -10053,7 +10053,7 @@ function Gs(e) {
|
|
|
10053
10053
|
return $t(e).position === "static";
|
|
10054
10054
|
}
|
|
10055
10055
|
function ic(e, t) {
|
|
10056
|
-
if (!
|
|
10056
|
+
if (!Jt(e) || $t(e).position === "fixed")
|
|
10057
10057
|
return null;
|
|
10058
10058
|
if (t)
|
|
10059
10059
|
return t(e);
|
|
@@ -10064,7 +10064,7 @@ function Td(e, t) {
|
|
|
10064
10064
|
const n = Ct(e);
|
|
10065
10065
|
if (as(e))
|
|
10066
10066
|
return n;
|
|
10067
|
-
if (!
|
|
10067
|
+
if (!Jt(e)) {
|
|
10068
10068
|
let o = fn(e);
|
|
10069
10069
|
for (; o && !qn(o); ) {
|
|
10070
10070
|
if (Ht(o) && !Gs(o))
|
|
@@ -10093,7 +10093,7 @@ const Cy = async function(e) {
|
|
|
10093
10093
|
function Ty(e) {
|
|
10094
10094
|
return $t(e).direction === "rtl";
|
|
10095
10095
|
}
|
|
10096
|
-
const
|
|
10096
|
+
const Ry = {
|
|
10097
10097
|
convertOffsetParentRelativeRectToViewportRelativeRect: hy,
|
|
10098
10098
|
getDocumentElement: Qt,
|
|
10099
10099
|
getClippingRect: wy,
|
|
@@ -10105,10 +10105,10 @@ const Ey = {
|
|
|
10105
10105
|
isElement: Ht,
|
|
10106
10106
|
isRTL: Ty
|
|
10107
10107
|
};
|
|
10108
|
-
function
|
|
10108
|
+
function Rd(e, t) {
|
|
10109
10109
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
10110
10110
|
}
|
|
10111
|
-
function
|
|
10111
|
+
function Ey(e, t) {
|
|
10112
10112
|
let n = null, r;
|
|
10113
10113
|
const o = Qt(e);
|
|
10114
10114
|
function s() {
|
|
@@ -10129,17 +10129,17 @@ function Ry(e, t) {
|
|
|
10129
10129
|
rootMargin: -g + "px " + -v + "px " + -m + "px " + -b + "px",
|
|
10130
10130
|
threshold: wt(0, dn(1, c)) || 1
|
|
10131
10131
|
};
|
|
10132
|
-
let
|
|
10132
|
+
let E = !0;
|
|
10133
10133
|
function S(C) {
|
|
10134
|
-
const
|
|
10135
|
-
if (
|
|
10136
|
-
if (!
|
|
10134
|
+
const R = C[0].intersectionRatio;
|
|
10135
|
+
if (R !== c) {
|
|
10136
|
+
if (!E)
|
|
10137
10137
|
return i();
|
|
10138
|
-
|
|
10138
|
+
R ? i(!1, R) : r = setTimeout(() => {
|
|
10139
10139
|
i(!1, 1e-7);
|
|
10140
10140
|
}, 1e3);
|
|
10141
10141
|
}
|
|
10142
|
-
|
|
10142
|
+
R === 1 && !Rd(u, e.getBoundingClientRect()) && i(), E = !1;
|
|
10143
10143
|
}
|
|
10144
10144
|
try {
|
|
10145
10145
|
n = new IntersectionObserver(S, {
|
|
@@ -10168,7 +10168,7 @@ function Iy(e, t, n, r) {
|
|
|
10168
10168
|
passive: !0
|
|
10169
10169
|
}), s && b.addEventListener("resize", n);
|
|
10170
10170
|
});
|
|
10171
|
-
const h = u && a ?
|
|
10171
|
+
const h = u && a ? Ey(u, n) : null;
|
|
10172
10172
|
let p = -1, x = null;
|
|
10173
10173
|
i && (x = new ResizeObserver((b) => {
|
|
10174
10174
|
let [w] = b;
|
|
@@ -10181,7 +10181,7 @@ function Iy(e, t, n, r) {
|
|
|
10181
10181
|
c && m();
|
|
10182
10182
|
function m() {
|
|
10183
10183
|
const b = jn(e);
|
|
10184
|
-
v && !
|
|
10184
|
+
v && !Rd(v, b) && n(), v = b, g = requestAnimationFrame(m);
|
|
10185
10185
|
}
|
|
10186
10186
|
return n(), () => {
|
|
10187
10187
|
var b;
|
|
@@ -10190,9 +10190,9 @@ function Iy(e, t, n, r) {
|
|
|
10190
10190
|
}), h == null || h(), (b = x) == null || b.disconnect(), x = null, c && cancelAnimationFrame(g);
|
|
10191
10191
|
};
|
|
10192
10192
|
}
|
|
10193
|
-
const Ny =
|
|
10193
|
+
const Ny = Zw, jy = Qw, Ay = Xw, ky = ty, Py = qw, ac = Yw, _y = ey, Oy = (e, t, n) => {
|
|
10194
10194
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
10195
|
-
platform:
|
|
10195
|
+
platform: Ry,
|
|
10196
10196
|
...n
|
|
10197
10197
|
}, s = {
|
|
10198
10198
|
...o.platform,
|
|
@@ -10235,11 +10235,11 @@ function _o(e, t) {
|
|
|
10235
10235
|
}
|
|
10236
10236
|
return e !== e && t !== t;
|
|
10237
10237
|
}
|
|
10238
|
-
function
|
|
10238
|
+
function Ed(e) {
|
|
10239
10239
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
10240
10240
|
}
|
|
10241
10241
|
function lc(e, t) {
|
|
10242
|
-
const n =
|
|
10242
|
+
const n = Ed(e);
|
|
10243
10243
|
return Math.round(t * n) / n;
|
|
10244
10244
|
}
|
|
10245
10245
|
function Ks(e) {
|
|
@@ -10274,16 +10274,16 @@ function Ly(e) {
|
|
|
10274
10274
|
const [g, v] = f.useState(null), [m, b] = f.useState(null), w = f.useCallback((O) => {
|
|
10275
10275
|
O !== C.current && (C.current = O, v(O));
|
|
10276
10276
|
}, []), y = f.useCallback((O) => {
|
|
10277
|
-
O !==
|
|
10278
|
-
}, []),
|
|
10279
|
-
if (!C.current || !
|
|
10277
|
+
O !== R.current && (R.current = O, b(O));
|
|
10278
|
+
}, []), E = s || g, S = i || m, C = f.useRef(null), R = f.useRef(null), I = f.useRef(d), A = c != null, k = Ks(c), M = Ks(o), W = Ks(u), G = f.useCallback(() => {
|
|
10279
|
+
if (!C.current || !R.current)
|
|
10280
10280
|
return;
|
|
10281
10281
|
const O = {
|
|
10282
10282
|
placement: t,
|
|
10283
10283
|
strategy: n,
|
|
10284
10284
|
middleware: p
|
|
10285
10285
|
};
|
|
10286
|
-
M.current && (O.platform = M.current), Oy(C.current,
|
|
10286
|
+
M.current && (O.platform = M.current), Oy(C.current, R.current, O).then((_) => {
|
|
10287
10287
|
const z = {
|
|
10288
10288
|
..._,
|
|
10289
10289
|
// The floating element's position may be recomputed while it's closed
|
|
@@ -10307,21 +10307,21 @@ function Ly(e) {
|
|
|
10307
10307
|
go(() => (N.current = !0, () => {
|
|
10308
10308
|
N.current = !1;
|
|
10309
10309
|
}), []), go(() => {
|
|
10310
|
-
if (
|
|
10310
|
+
if (E && (C.current = E), S && (R.current = S), E && S) {
|
|
10311
10311
|
if (k.current)
|
|
10312
|
-
return k.current(
|
|
10312
|
+
return k.current(E, S, G);
|
|
10313
10313
|
G();
|
|
10314
10314
|
}
|
|
10315
|
-
}, [
|
|
10315
|
+
}, [E, S, G, k, A]);
|
|
10316
10316
|
const $ = f.useMemo(() => ({
|
|
10317
10317
|
reference: C,
|
|
10318
|
-
floating:
|
|
10318
|
+
floating: R,
|
|
10319
10319
|
setReference: w,
|
|
10320
10320
|
setFloating: y
|
|
10321
10321
|
}), [w, y]), L = f.useMemo(() => ({
|
|
10322
|
-
reference:
|
|
10322
|
+
reference: E,
|
|
10323
10323
|
floating: S
|
|
10324
|
-
}), [
|
|
10324
|
+
}), [E, S]), X = f.useMemo(() => {
|
|
10325
10325
|
const O = {
|
|
10326
10326
|
position: n,
|
|
10327
10327
|
left: 0,
|
|
@@ -10333,7 +10333,7 @@ function Ly(e) {
|
|
|
10333
10333
|
return a ? {
|
|
10334
10334
|
...O,
|
|
10335
10335
|
transform: "translate(" + _ + "px, " + z + "px)",
|
|
10336
|
-
...
|
|
10336
|
+
...Ed(L.floating) >= 1.5 && {
|
|
10337
10337
|
willChange: "transform"
|
|
10338
10338
|
}
|
|
10339
10339
|
} : {
|
|
@@ -10449,7 +10449,7 @@ var Pd = "PopperAnchor", _d = f.forwardRef(
|
|
|
10449
10449
|
_d.displayName = Pd;
|
|
10450
10450
|
var ma = "PopperContent", [Xy, qy] = jd(ma), Od = f.forwardRef(
|
|
10451
10451
|
(e, t) => {
|
|
10452
|
-
var Y, P,
|
|
10452
|
+
var Y, P, Z, ne, le, ie;
|
|
10453
10453
|
const {
|
|
10454
10454
|
__scopePopper: n,
|
|
10455
10455
|
side: r = "bottom",
|
|
@@ -10465,9 +10465,9 @@ var ma = "PopperContent", [Xy, qy] = jd(ma), Od = f.forwardRef(
|
|
|
10465
10465
|
updatePositionStrategy: x = "optimized",
|
|
10466
10466
|
onPlaced: g,
|
|
10467
10467
|
...v
|
|
10468
|
-
} = e, m = Ad(ma, n), [b, w] = f.useState(null), y = Te(t, (Pe) => w(Pe)), [
|
|
10468
|
+
} = e, m = Ad(ma, n), [b, w] = f.useState(null), y = Te(t, (Pe) => w(Pe)), [E, S] = f.useState(null), C = Nd(E), R = (C == null ? void 0 : C.width) ?? 0, I = (C == null ? void 0 : C.height) ?? 0, A = r + (s !== "center" ? "-" + s : ""), k = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, M = Array.isArray(u) ? u : [u], W = M.length > 0, G = {
|
|
10469
10469
|
padding: k,
|
|
10470
|
-
boundary: M.filter(
|
|
10470
|
+
boundary: M.filter(Zy),
|
|
10471
10471
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
10472
10472
|
altBoundary: W
|
|
10473
10473
|
}, { refs: N, floatingStyles: $, placement: L, isPositioned: X, middlewareData: O } = Ly({
|
|
@@ -10496,15 +10496,15 @@ var ma = "PopperContent", [Xy, qy] = jd(ma), Od = f.forwardRef(
|
|
|
10496
10496
|
H.setProperty("--radix-popper-available-width", `${Le}px`), H.setProperty("--radix-popper-available-height", `${ce}px`), H.setProperty("--radix-popper-anchor-width", `${Ae}px`), H.setProperty("--radix-popper-anchor-height", `${ve}px`);
|
|
10497
10497
|
}
|
|
10498
10498
|
}),
|
|
10499
|
-
|
|
10500
|
-
Qy({ arrowWidth:
|
|
10499
|
+
E && Vy({ element: E, padding: a }),
|
|
10500
|
+
Qy({ arrowWidth: R, arrowHeight: I }),
|
|
10501
10501
|
p && Wy({ strategy: "referenceHidden", ...G })
|
|
10502
10502
|
]
|
|
10503
10503
|
}), [_, z] = Ld(L), q = ot(g);
|
|
10504
10504
|
tt(() => {
|
|
10505
10505
|
X && (q == null || q());
|
|
10506
10506
|
}, [X, q]);
|
|
10507
|
-
const oe = (Y = O.arrow) == null ? void 0 : Y.x, F = (P = O.arrow) == null ? void 0 : P.y, Q = ((
|
|
10507
|
+
const oe = (Y = O.arrow) == null ? void 0 : Y.x, F = (P = O.arrow) == null ? void 0 : P.y, Q = ((Z = O.arrow) == null ? void 0 : Z.centerOffset) !== 0, [de, be] = f.useState();
|
|
10508
10508
|
return tt(() => {
|
|
10509
10509
|
b && be(window.getComputedStyle(b).zIndex);
|
|
10510
10510
|
}, [b]), /* @__PURE__ */ l.jsx(
|
|
@@ -10562,13 +10562,13 @@ var ma = "PopperContent", [Xy, qy] = jd(ma), Od = f.forwardRef(
|
|
|
10562
10562
|
}
|
|
10563
10563
|
);
|
|
10564
10564
|
Od.displayName = ma;
|
|
10565
|
-
var Md = "PopperArrow",
|
|
10565
|
+
var Md = "PopperArrow", Jy = {
|
|
10566
10566
|
top: "bottom",
|
|
10567
10567
|
right: "left",
|
|
10568
10568
|
bottom: "top",
|
|
10569
10569
|
left: "right"
|
|
10570
10570
|
}, Dd = f.forwardRef(function(t, n) {
|
|
10571
|
-
const { __scopePopper: r, ...o } = t, s = qy(Md, r), i =
|
|
10571
|
+
const { __scopePopper: r, ...o } = t, s = qy(Md, r), i = Jy[s.placedSide];
|
|
10572
10572
|
return (
|
|
10573
10573
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
10574
10574
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -10613,7 +10613,7 @@ var Md = "PopperArrow", Zy = {
|
|
|
10613
10613
|
);
|
|
10614
10614
|
});
|
|
10615
10615
|
Dd.displayName = Md;
|
|
10616
|
-
function
|
|
10616
|
+
function Zy(e) {
|
|
10617
10617
|
return e !== null;
|
|
10618
10618
|
}
|
|
10619
10619
|
var Qy = (e) => ({
|
|
@@ -10654,7 +10654,7 @@ var sS = f.forwardRef((e, t) => {
|
|
|
10654
10654
|
defaultProp: a ?? null,
|
|
10655
10655
|
onChange: c,
|
|
10656
10656
|
caller: zr
|
|
10657
|
-
}), [b, w] = f.useState(!1), y = ot(u),
|
|
10657
|
+
}), [b, w] = f.useState(!1), y = ot(u), E = Fd(n), S = f.useRef(!1), [C, R] = f.useState(0);
|
|
10658
10658
|
return f.useEffect(() => {
|
|
10659
10659
|
const I = p.current;
|
|
10660
10660
|
if (I)
|
|
@@ -10673,11 +10673,11 @@ var sS = f.forwardRef((e, t) => {
|
|
|
10673
10673
|
),
|
|
10674
10674
|
onItemShiftTab: f.useCallback(() => w(!0), []),
|
|
10675
10675
|
onFocusableItemAdd: f.useCallback(
|
|
10676
|
-
() =>
|
|
10676
|
+
() => R((I) => I + 1),
|
|
10677
10677
|
[]
|
|
10678
10678
|
),
|
|
10679
10679
|
onFocusableItemRemove: f.useCallback(
|
|
10680
|
-
() =>
|
|
10680
|
+
() => R((I) => I - 1),
|
|
10681
10681
|
[]
|
|
10682
10682
|
),
|
|
10683
10683
|
children: /* @__PURE__ */ l.jsx(
|
|
@@ -10696,7 +10696,7 @@ var sS = f.forwardRef((e, t) => {
|
|
|
10696
10696
|
if (I.target === I.currentTarget && A && !b) {
|
|
10697
10697
|
const k = new CustomEvent(Ys, eS);
|
|
10698
10698
|
if (I.currentTarget.dispatchEvent(k), !k.defaultPrevented) {
|
|
10699
|
-
const M =
|
|
10699
|
+
const M = E().filter((L) => L.focusable), W = M.find((L) => L.active), G = M.find((L) => L.id === v), $ = [W, G, ...M].filter(
|
|
10700
10700
|
Boolean
|
|
10701
10701
|
).map((L) => L.ref.current);
|
|
10702
10702
|
Ud($, d);
|
|
@@ -10750,12 +10750,12 @@ var sS = f.forwardRef((e, t) => {
|
|
|
10750
10750
|
if (b !== void 0) {
|
|
10751
10751
|
if (m.metaKey || m.ctrlKey || m.altKey || m.shiftKey) return;
|
|
10752
10752
|
m.preventDefault();
|
|
10753
|
-
let y = p().filter((
|
|
10753
|
+
let y = p().filter((E) => E.focusable).map((E) => E.ref.current);
|
|
10754
10754
|
if (b === "last") y.reverse();
|
|
10755
10755
|
else if (b === "prev" || b === "next") {
|
|
10756
10756
|
b === "prev" && y.reverse();
|
|
10757
|
-
const
|
|
10758
|
-
y = d.loop ? cS(y,
|
|
10757
|
+
const E = y.indexOf(m.currentTarget);
|
|
10758
|
+
y = d.loop ? cS(y, E + 1) : y.slice(E + 1);
|
|
10759
10759
|
}
|
|
10760
10760
|
setTimeout(() => Ud(y));
|
|
10761
10761
|
}
|
|
@@ -10847,7 +10847,7 @@ var ya = "MenuPortal", [yS, Yd] = On(ya, {
|
|
|
10847
10847
|
forceMount: void 0
|
|
10848
10848
|
}), Xd = (e) => {
|
|
10849
10849
|
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Mn(ya, t);
|
|
10850
|
-
return /* @__PURE__ */ l.jsx(yS, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(vt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(
|
|
10850
|
+
return /* @__PURE__ */ l.jsx(yS, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(vt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(Zo, { asChild: !0, container: o, children: r }) }) });
|
|
10851
10851
|
};
|
|
10852
10852
|
Xd.displayName = ya;
|
|
10853
10853
|
var jt = "MenuContent", [SS, Sa] = On(jt), qd = f.forwardRef(
|
|
@@ -10891,7 +10891,7 @@ var jt = "MenuContent", [SS, Sa] = On(jt), qd = f.forwardRef(
|
|
|
10891
10891
|
onDismiss: () => n.onOpenChange(!1)
|
|
10892
10892
|
}
|
|
10893
10893
|
);
|
|
10894
|
-
}),
|
|
10894
|
+
}), RS = Yn("MenuContent.ScrollLock"), Ca = f.forwardRef(
|
|
10895
10895
|
(e, t) => {
|
|
10896
10896
|
const {
|
|
10897
10897
|
__scopeMenu: n,
|
|
@@ -10908,11 +10908,11 @@ var jt = "MenuContent", [SS, Sa] = On(jt), qd = f.forwardRef(
|
|
|
10908
10908
|
onDismiss: x,
|
|
10909
10909
|
disableOutsideScroll: g,
|
|
10910
10910
|
...v
|
|
10911
|
-
} = e, m = Mn(jt, n), b = Wr(jt, n), w = us(n), y = Gd(n),
|
|
10911
|
+
} = e, m = Mn(jt, n), b = Wr(jt, n), w = us(n), y = Gd(n), E = gS(n), [S, C] = f.useState(null), R = f.useRef(null), I = Te(t, R, m.onContentChange), A = f.useRef(0), k = f.useRef(""), M = f.useRef(0), W = f.useRef(null), G = f.useRef("right"), N = f.useRef(0), $ = g ? es : f.Fragment, L = g ? { as: RS, allowPinchZoom: !0 } : void 0, X = (_) => {
|
|
10912
10912
|
var Y, P;
|
|
10913
|
-
const z = k.current + _, q =
|
|
10914
|
-
(function
|
|
10915
|
-
k.current = ne, window.clearTimeout(A.current), ne !== "" && (A.current = window.setTimeout(() =>
|
|
10913
|
+
const z = k.current + _, q = E().filter((Z) => !Z.disabled), oe = document.activeElement, F = (Y = q.find((Z) => Z.ref.current === oe)) == null ? void 0 : Y.textValue, Q = q.map((Z) => Z.textValue), de = LS(Q, z, F), be = (P = q.find((Z) => Z.textValue === de)) == null ? void 0 : P.ref.current;
|
|
10914
|
+
(function Z(ne) {
|
|
10915
|
+
k.current = ne, window.clearTimeout(A.current), ne !== "" && (A.current = window.setTimeout(() => Z(""), 1e3));
|
|
10916
10916
|
})(z), be && setTimeout(() => be.focus());
|
|
10917
10917
|
};
|
|
10918
10918
|
f.useEffect(() => () => window.clearTimeout(A.current), []), na();
|
|
@@ -10934,7 +10934,7 @@ var jt = "MenuContent", [SS, Sa] = On(jt), qd = f.forwardRef(
|
|
|
10934
10934
|
onItemLeave: f.useCallback(
|
|
10935
10935
|
(_) => {
|
|
10936
10936
|
var z;
|
|
10937
|
-
O(_) || ((z =
|
|
10937
|
+
O(_) || ((z = R.current) == null || z.focus(), C(null));
|
|
10938
10938
|
},
|
|
10939
10939
|
[O]
|
|
10940
10940
|
),
|
|
@@ -10949,13 +10949,13 @@ var jt = "MenuContent", [SS, Sa] = On(jt), qd = f.forwardRef(
|
|
|
10949
10949
|
W.current = _;
|
|
10950
10950
|
}, []),
|
|
10951
10951
|
children: /* @__PURE__ */ l.jsx($, { ...L, children: /* @__PURE__ */ l.jsx(
|
|
10952
|
-
|
|
10952
|
+
Jo,
|
|
10953
10953
|
{
|
|
10954
10954
|
asChild: !0,
|
|
10955
10955
|
trapped: o,
|
|
10956
10956
|
onMountAutoFocus: ee(s, (_) => {
|
|
10957
10957
|
var z;
|
|
10958
|
-
_.preventDefault(), (z =
|
|
10958
|
+
_.preventDefault(), (z = R.current) == null || z.focus({ preventScroll: !0 });
|
|
10959
10959
|
}),
|
|
10960
10960
|
onUnmountAutoFocus: i,
|
|
10961
10961
|
children: /* @__PURE__ */ l.jsx(
|
|
@@ -10997,10 +10997,10 @@ var jt = "MenuContent", [SS, Sa] = On(jt), qd = f.forwardRef(
|
|
|
10997
10997
|
onKeyDown: ee(v.onKeyDown, (_) => {
|
|
10998
10998
|
const q = _.target.closest("[data-radix-menu-content]") === _.currentTarget, oe = _.ctrlKey || _.altKey || _.metaKey, F = _.key.length === 1;
|
|
10999
10999
|
q && (_.key === "Tab" && _.preventDefault(), !oe && F && X(_.key));
|
|
11000
|
-
const Q =
|
|
11000
|
+
const Q = R.current;
|
|
11001
11001
|
if (_.target !== Q || !hS.includes(_.key)) return;
|
|
11002
11002
|
_.preventDefault();
|
|
11003
|
-
const be =
|
|
11003
|
+
const be = E().filter((Y) => !Y.disabled).map((Y) => Y.ref.current);
|
|
11004
11004
|
Wd.includes(_.key) && be.reverse(), MS(be);
|
|
11005
11005
|
}),
|
|
11006
11006
|
onBlur: ee(e.onBlur, (_) => {
|
|
@@ -11029,20 +11029,20 @@ var jt = "MenuContent", [SS, Sa] = On(jt), qd = f.forwardRef(
|
|
|
11029
11029
|
}
|
|
11030
11030
|
);
|
|
11031
11031
|
qd.displayName = jt;
|
|
11032
|
-
var
|
|
11032
|
+
var ES = "MenuGroup", Ta = f.forwardRef(
|
|
11033
11033
|
(e, t) => {
|
|
11034
11034
|
const { __scopeMenu: n, ...r } = e;
|
|
11035
11035
|
return /* @__PURE__ */ l.jsx(me.div, { role: "group", ...r, ref: t });
|
|
11036
11036
|
}
|
|
11037
11037
|
);
|
|
11038
|
-
Ta.displayName =
|
|
11039
|
-
var IS = "MenuLabel",
|
|
11038
|
+
Ta.displayName = ES;
|
|
11039
|
+
var IS = "MenuLabel", Jd = f.forwardRef(
|
|
11040
11040
|
(e, t) => {
|
|
11041
11041
|
const { __scopeMenu: n, ...r } = e;
|
|
11042
11042
|
return /* @__PURE__ */ l.jsx(me.div, { ...r, ref: t });
|
|
11043
11043
|
}
|
|
11044
11044
|
);
|
|
11045
|
-
|
|
11045
|
+
Jd.displayName = IS;
|
|
11046
11046
|
var Oo = "MenuItem", cc = "menu.itemSelect", ds = f.forwardRef(
|
|
11047
11047
|
(e, t) => {
|
|
11048
11048
|
const { disabled: n = !1, onSelect: r, ...o } = e, s = f.useRef(null), i = Wr(Oo, e.__scopeMenu), a = Sa(Oo, e.__scopeMenu), c = Te(t, s), u = f.useRef(!1), d = () => {
|
|
@@ -11053,7 +11053,7 @@ var Oo = "MenuItem", cc = "menu.itemSelect", ds = f.forwardRef(
|
|
|
11053
11053
|
}
|
|
11054
11054
|
};
|
|
11055
11055
|
return /* @__PURE__ */ l.jsx(
|
|
11056
|
-
|
|
11056
|
+
Zd,
|
|
11057
11057
|
{
|
|
11058
11058
|
...o,
|
|
11059
11059
|
ref: c,
|
|
@@ -11076,7 +11076,7 @@ var Oo = "MenuItem", cc = "menu.itemSelect", ds = f.forwardRef(
|
|
|
11076
11076
|
}
|
|
11077
11077
|
);
|
|
11078
11078
|
ds.displayName = Oo;
|
|
11079
|
-
var
|
|
11079
|
+
var Zd = f.forwardRef(
|
|
11080
11080
|
(e, t) => {
|
|
11081
11081
|
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = Sa(Oo, n), a = Gd(n), c = f.useRef(null), u = Te(t, c), [d, h] = f.useState(!1), [p, x] = f.useState("");
|
|
11082
11082
|
return f.useEffect(() => {
|
|
@@ -11124,7 +11124,7 @@ var Jd = f.forwardRef(
|
|
|
11124
11124
|
"aria-checked": Mo(n) ? "mixed" : n,
|
|
11125
11125
|
...o,
|
|
11126
11126
|
ref: t,
|
|
11127
|
-
"data-state":
|
|
11127
|
+
"data-state": Ea(n),
|
|
11128
11128
|
onSelect: ee(
|
|
11129
11129
|
o.onSelect,
|
|
11130
11130
|
() => r == null ? void 0 : r(Mo(n) ? !0 : !n),
|
|
@@ -11156,7 +11156,7 @@ var nf = "MenuRadioItem", rf = f.forwardRef(
|
|
|
11156
11156
|
"aria-checked": s,
|
|
11157
11157
|
...r,
|
|
11158
11158
|
ref: t,
|
|
11159
|
-
"data-state":
|
|
11159
|
+
"data-state": Ea(s),
|
|
11160
11160
|
onSelect: ee(
|
|
11161
11161
|
r.onSelect,
|
|
11162
11162
|
() => {
|
|
@@ -11170,12 +11170,12 @@ var nf = "MenuRadioItem", rf = f.forwardRef(
|
|
|
11170
11170
|
}
|
|
11171
11171
|
);
|
|
11172
11172
|
rf.displayName = nf;
|
|
11173
|
-
var
|
|
11174
|
-
|
|
11173
|
+
var Ra = "MenuItemIndicator", [of, kS] = On(
|
|
11174
|
+
Ra,
|
|
11175
11175
|
{ checked: !1 }
|
|
11176
11176
|
), sf = f.forwardRef(
|
|
11177
11177
|
(e, t) => {
|
|
11178
|
-
const { __scopeMenu: n, forceMount: r, ...o } = e, s = kS(
|
|
11178
|
+
const { __scopeMenu: n, forceMount: r, ...o } = e, s = kS(Ra, n);
|
|
11179
11179
|
return /* @__PURE__ */ l.jsx(
|
|
11180
11180
|
vt,
|
|
11181
11181
|
{
|
|
@@ -11185,14 +11185,14 @@ var Ea = "MenuItemIndicator", [of, kS] = On(
|
|
|
11185
11185
|
{
|
|
11186
11186
|
...o,
|
|
11187
11187
|
ref: t,
|
|
11188
|
-
"data-state":
|
|
11188
|
+
"data-state": Ea(s.checked)
|
|
11189
11189
|
}
|
|
11190
11190
|
)
|
|
11191
11191
|
}
|
|
11192
11192
|
);
|
|
11193
11193
|
}
|
|
11194
11194
|
);
|
|
11195
|
-
sf.displayName =
|
|
11195
|
+
sf.displayName = Ra;
|
|
11196
11196
|
var PS = "MenuSeparator", af = f.forwardRef(
|
|
11197
11197
|
(e, t) => {
|
|
11198
11198
|
const { __scopeMenu: n, ...r } = e;
|
|
@@ -11215,7 +11215,7 @@ var _S = "MenuArrow", lf = f.forwardRef(
|
|
|
11215
11215
|
}
|
|
11216
11216
|
);
|
|
11217
11217
|
lf.displayName = _S;
|
|
11218
|
-
var OS = "MenuSub", [
|
|
11218
|
+
var OS = "MenuSub", [rR, cf] = On(OS), pr = "MenuSubTrigger", uf = f.forwardRef(
|
|
11219
11219
|
(e, t) => {
|
|
11220
11220
|
const n = Mn(pr, e.__scopeMenu), r = Wr(pr, e.__scopeMenu), o = cf(pr, e.__scopeMenu), s = Sa(pr, e.__scopeMenu), i = f.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: c } = s, u = { __scopeMenu: e.__scopeMenu }, d = f.useCallback(() => {
|
|
11221
11221
|
i.current && window.clearTimeout(i.current), i.current = null;
|
|
@@ -11226,7 +11226,7 @@ var OS = "MenuSub", [rE, cf] = On(OS), pr = "MenuSubTrigger", uf = f.forwardRef(
|
|
|
11226
11226
|
window.clearTimeout(h), c(null);
|
|
11227
11227
|
};
|
|
11228
11228
|
}, [a, c]), /* @__PURE__ */ l.jsx(wa, { asChild: !0, ...u, children: /* @__PURE__ */ l.jsx(
|
|
11229
|
-
|
|
11229
|
+
Zd,
|
|
11230
11230
|
{
|
|
11231
11231
|
id: o.triggerId,
|
|
11232
11232
|
"aria-haspopup": "menu",
|
|
@@ -11234,7 +11234,7 @@ var OS = "MenuSub", [rE, cf] = On(OS), pr = "MenuSubTrigger", uf = f.forwardRef(
|
|
|
11234
11234
|
"aria-controls": o.contentId,
|
|
11235
11235
|
"data-state": hf(n.open),
|
|
11236
11236
|
...e,
|
|
11237
|
-
ref:
|
|
11237
|
+
ref: Ji(t, o.onTriggerChange),
|
|
11238
11238
|
onClick: (h) => {
|
|
11239
11239
|
var p;
|
|
11240
11240
|
(p = e.onClick) == null || p.call(e, h), !(e.disabled || h.defaultPrevented) && (h.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
@@ -11328,7 +11328,7 @@ function hf(e) {
|
|
|
11328
11328
|
function Mo(e) {
|
|
11329
11329
|
return e === "indeterminate";
|
|
11330
11330
|
}
|
|
11331
|
-
function
|
|
11331
|
+
function Ea(e) {
|
|
11332
11332
|
return Mo(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
11333
11333
|
}
|
|
11334
11334
|
function MS(e) {
|
|
@@ -11365,7 +11365,7 @@ function BS(e, t) {
|
|
|
11365
11365
|
function jr(e) {
|
|
11366
11366
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
11367
11367
|
}
|
|
11368
|
-
var HS = Kd, $S = wa, zS = Xd, US = qd, WS = Ta, VS =
|
|
11368
|
+
var HS = Kd, $S = wa, zS = Xd, US = qd, WS = Ta, VS = Jd, GS = ds, KS = Qd, YS = tf, XS = rf, qS = sf, JS = af, ZS = lf, QS = uf, e0 = ff, fs = "DropdownMenu", [t0, oR] = Ut(
|
|
11369
11369
|
fs,
|
|
11370
11370
|
[Vd]
|
|
11371
11371
|
), ht = Vd(), [n0, pf] = t0(fs), mf = (e) => {
|
|
@@ -11414,7 +11414,7 @@ var gf = "DropdownMenuTrigger", vf = f.forwardRef(
|
|
|
11414
11414
|
"data-disabled": r ? "" : void 0,
|
|
11415
11415
|
disabled: r,
|
|
11416
11416
|
...o,
|
|
11417
|
-
ref:
|
|
11417
|
+
ref: Ji(t, s.triggerRef),
|
|
11418
11418
|
onPointerDown: ee(e.onPointerDown, (a) => {
|
|
11419
11419
|
!r && a.button === 0 && a.ctrlKey === !1 && (s.onOpenToggle(), s.open || a.preventDefault());
|
|
11420
11420
|
}),
|
|
@@ -11499,20 +11499,20 @@ var d0 = "DropdownMenuRadioItem", Tf = f.forwardRef((e, t) => {
|
|
|
11499
11499
|
return /* @__PURE__ */ l.jsx(XS, { ...o, ...r, ref: t });
|
|
11500
11500
|
});
|
|
11501
11501
|
Tf.displayName = d0;
|
|
11502
|
-
var f0 = "DropdownMenuItemIndicator",
|
|
11502
|
+
var f0 = "DropdownMenuItemIndicator", Rf = f.forwardRef((e, t) => {
|
|
11503
11503
|
const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
|
|
11504
11504
|
return /* @__PURE__ */ l.jsx(qS, { ...o, ...r, ref: t });
|
|
11505
11505
|
});
|
|
11506
|
-
|
|
11507
|
-
var h0 = "DropdownMenuSeparator",
|
|
11506
|
+
Rf.displayName = f0;
|
|
11507
|
+
var h0 = "DropdownMenuSeparator", Ef = f.forwardRef((e, t) => {
|
|
11508
11508
|
const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
|
|
11509
|
-
return /* @__PURE__ */ l.jsx(
|
|
11509
|
+
return /* @__PURE__ */ l.jsx(JS, { ...o, ...r, ref: t });
|
|
11510
11510
|
});
|
|
11511
|
-
|
|
11511
|
+
Ef.displayName = h0;
|
|
11512
11512
|
var p0 = "DropdownMenuArrow", m0 = f.forwardRef(
|
|
11513
11513
|
(e, t) => {
|
|
11514
11514
|
const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
|
|
11515
|
-
return /* @__PURE__ */ l.jsx(
|
|
11515
|
+
return /* @__PURE__ */ l.jsx(ZS, { ...o, ...r, ref: t });
|
|
11516
11516
|
}
|
|
11517
11517
|
);
|
|
11518
11518
|
m0.displayName = p0;
|
|
@@ -11541,7 +11541,7 @@ var v0 = "DropdownMenuSubContent", Nf = f.forwardRef((e, t) => {
|
|
|
11541
11541
|
);
|
|
11542
11542
|
});
|
|
11543
11543
|
Nf.displayName = v0;
|
|
11544
|
-
var x0 = mf, b0 = vf, w0 = xf, jf = wf, Af = yf, kf = Sf, Pf = Cf, _f = Tf, Of =
|
|
11544
|
+
var x0 = mf, b0 = vf, w0 = xf, jf = wf, Af = yf, kf = Sf, Pf = Cf, _f = Tf, Of = Rf, Mf = Ef, Df = If, Lf = Nf;
|
|
11545
11545
|
const y0 = x0, S0 = b0, C0 = f.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ l.jsxs(
|
|
11546
11546
|
Df,
|
|
11547
11547
|
{
|
|
@@ -11597,7 +11597,7 @@ const Si = f.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
|
|
|
11597
11597
|
}
|
|
11598
11598
|
));
|
|
11599
11599
|
Si.displayName = kf.displayName;
|
|
11600
|
-
const
|
|
11600
|
+
const R0 = f.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ l.jsxs(
|
|
11601
11601
|
Pf,
|
|
11602
11602
|
{
|
|
11603
11603
|
ref: o,
|
|
@@ -11613,8 +11613,8 @@ const E0 = f.forwardRef(({ className: e, children: t, checked: n, ...r }, o) =>
|
|
|
11613
11613
|
]
|
|
11614
11614
|
}
|
|
11615
11615
|
));
|
|
11616
|
-
|
|
11617
|
-
const
|
|
11616
|
+
R0.displayName = Pf.displayName;
|
|
11617
|
+
const E0 = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
|
|
11618
11618
|
_f,
|
|
11619
11619
|
{
|
|
11620
11620
|
ref: r,
|
|
@@ -11629,7 +11629,7 @@ const R0 = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
11629
11629
|
]
|
|
11630
11630
|
}
|
|
11631
11631
|
));
|
|
11632
|
-
|
|
11632
|
+
E0.displayName = _f.displayName;
|
|
11633
11633
|
const I0 = f.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ l.jsx(
|
|
11634
11634
|
Af,
|
|
11635
11635
|
{
|
|
@@ -11675,24 +11675,24 @@ function vo({
|
|
|
11675
11675
|
send: b,
|
|
11676
11676
|
stop: w,
|
|
11677
11677
|
lastCheckpointId: y,
|
|
11678
|
-
listCheckpoints:
|
|
11678
|
+
listCheckpoints: E,
|
|
11679
11679
|
navigateToCheckpoint: S,
|
|
11680
11680
|
returnToLatest: C,
|
|
11681
|
-
hasMoreHistory:
|
|
11681
|
+
hasMoreHistory: R,
|
|
11682
11682
|
isLoadingHistory: I,
|
|
11683
11683
|
loadOlderMessages: A,
|
|
11684
11684
|
api: k
|
|
11685
|
-
} = Fi(), [M, W] = fe(null), [G, N] = fe(""), [$, L] = fe(null), [X, O] = fe([]), [_, z] = fe(!1), [q, oe] = fe(null), [F, Q] = fe(null), [de, be] = fe(!1), [Y, P] = fe(null), [
|
|
11685
|
+
} = Fi(), [M, W] = fe(null), [G, N] = fe(""), [$, L] = fe(null), [X, O] = fe([]), [_, z] = fe(!1), [q, oe] = fe(null), [F, Q] = fe(null), [de, be] = fe(!1), [Y, P] = fe(null), [Z, ne] = fe([]), [le, ie] = fe(null);
|
|
11686
11686
|
bt(null);
|
|
11687
11687
|
const Pe = bt(null), Fe = bt(null), Le = bt(null), ce = bt(!1), Ae = bt(!0), ve = bt(0), H = bt(null), [ae, Be] = fe("desktop");
|
|
11688
11688
|
Ve(() => {
|
|
11689
|
-
const
|
|
11689
|
+
const J = () => {
|
|
11690
11690
|
const se = window.innerWidth;
|
|
11691
11691
|
Be(se < 640 ? "phone" : se < 1024 ? "tablet" : "desktop");
|
|
11692
11692
|
};
|
|
11693
|
-
return
|
|
11693
|
+
return J(), window.addEventListener("resize", J), () => window.removeEventListener("resize", J);
|
|
11694
11694
|
}, []), Ve(() => {
|
|
11695
|
-
let
|
|
11695
|
+
let J = !1;
|
|
11696
11696
|
if (!p) {
|
|
11697
11697
|
ne([]), ie(null), H.current = null;
|
|
11698
11698
|
return;
|
|
@@ -11702,26 +11702,26 @@ function vo({
|
|
|
11702
11702
|
checkpointId: y ?? null
|
|
11703
11703
|
}, Ce = H.current;
|
|
11704
11704
|
if (!(Ce && Ce.threadId === se.threadId && Ce.checkpointId === se.checkpointId))
|
|
11705
|
-
return
|
|
11706
|
-
if (
|
|
11705
|
+
return E(p).then((Ne) => {
|
|
11706
|
+
if (J) return;
|
|
11707
11707
|
const _t = ((Ne == null ? void 0 : Ne.checkpoints) ?? []).slice().sort((Ot, Ln) => new Date(Ln.createdAt).getTime() - new Date(Ot.createdAt).getTime());
|
|
11708
11708
|
ne(_t), ie((Ot) => {
|
|
11709
11709
|
var Ln;
|
|
11710
11710
|
return Ot ?? ((Ln = _t[0]) == null ? void 0 : Ln.checkpointId) ?? null;
|
|
11711
11711
|
}), H.current = se;
|
|
11712
11712
|
}).catch((Ne) => {
|
|
11713
|
-
console.error("ChatInterface - listCheckpoints error:", Ne),
|
|
11713
|
+
console.error("ChatInterface - listCheckpoints error:", Ne), J || (ne([]), H.current = null);
|
|
11714
11714
|
}), () => {
|
|
11715
|
-
|
|
11715
|
+
J = !0;
|
|
11716
11716
|
};
|
|
11717
|
-
}, [p, y,
|
|
11717
|
+
}, [p, y, E]), Ve(() => {
|
|
11718
11718
|
y && ie(y);
|
|
11719
11719
|
}, [y]);
|
|
11720
11720
|
const nt = Ye(async () => {
|
|
11721
|
-
if (!
|
|
11722
|
-
const
|
|
11723
|
-
if (!
|
|
11724
|
-
const se =
|
|
11721
|
+
if (!R || I) return;
|
|
11722
|
+
const J = Le.current;
|
|
11723
|
+
if (!J) return;
|
|
11724
|
+
const se = J.scrollHeight, Ce = J.scrollTop;
|
|
11725
11725
|
ce.current = !0;
|
|
11726
11726
|
try {
|
|
11727
11727
|
await A();
|
|
@@ -11740,12 +11740,12 @@ function vo({
|
|
|
11740
11740
|
Ae.current = Ot <= 32, ce.current = !1;
|
|
11741
11741
|
});
|
|
11742
11742
|
}
|
|
11743
|
-
}, [
|
|
11743
|
+
}, [R, I, A]);
|
|
11744
11744
|
Ve(() => {
|
|
11745
11745
|
x.length < ve.current && (Ae.current = !0), ve.current = x.length;
|
|
11746
11746
|
}, [x.length]), Ve(() => {
|
|
11747
|
-
const
|
|
11748
|
-
|
|
11747
|
+
const J = Le.current;
|
|
11748
|
+
J && (ce.current || Ae.current && (J.scrollTop = J.scrollHeight, Ae.current = !0));
|
|
11749
11749
|
}, [x]), Ve(() => {
|
|
11750
11750
|
(async () => {
|
|
11751
11751
|
try {
|
|
@@ -11758,24 +11758,24 @@ function vo({
|
|
|
11758
11758
|
}, [k]), Ve(() => {
|
|
11759
11759
|
m && !de && (h == null || h(m));
|
|
11760
11760
|
}, [m, de, h]);
|
|
11761
|
-
const ut = (
|
|
11762
|
-
if (
|
|
11763
|
-
return `Message too long (${
|
|
11761
|
+
const ut = (J) => {
|
|
11762
|
+
if (J.length > mo)
|
|
11763
|
+
return `Message too long (${J.length}/${mo} characters)`;
|
|
11764
11764
|
try {
|
|
11765
|
-
return Ow(
|
|
11765
|
+
return Ow(J), null;
|
|
11766
11766
|
} catch (se) {
|
|
11767
11767
|
return (se == null ? void 0 : se.message) || "Invalid message";
|
|
11768
11768
|
}
|
|
11769
|
-
}, rt = (
|
|
11770
|
-
const se =
|
|
11769
|
+
}, rt = (J) => {
|
|
11770
|
+
const se = J.content || [], Ce = se.filter((Ne) => Ne.type === "text").map((Ne) => Ne.text).join("");
|
|
11771
11771
|
if (Ce) return Ce;
|
|
11772
11772
|
try {
|
|
11773
11773
|
return JSON.stringify(se, null, 2);
|
|
11774
11774
|
} catch {
|
|
11775
11775
|
return String(se);
|
|
11776
11776
|
}
|
|
11777
|
-
}, Qe = async (
|
|
11778
|
-
const se =
|
|
11777
|
+
}, Qe = async (J) => {
|
|
11778
|
+
const se = J.trim();
|
|
11779
11779
|
if (!(!se && X.length === 0)) {
|
|
11780
11780
|
if (se) {
|
|
11781
11781
|
const Ce = ut(se);
|
|
@@ -11791,24 +11791,24 @@ function vo({
|
|
|
11791
11791
|
L(Ne), h == null || h(Ne);
|
|
11792
11792
|
}
|
|
11793
11793
|
}
|
|
11794
|
-
}, Tt = K.useCallback((
|
|
11795
|
-
a && (W(
|
|
11794
|
+
}, Tt = K.useCallback((J, se) => {
|
|
11795
|
+
a && (W(J), N(se), L(null));
|
|
11796
11796
|
}, [a]), We = K.useCallback(() => {
|
|
11797
11797
|
W(null), N(""), L(null);
|
|
11798
|
-
}, []), st = Ye((
|
|
11799
|
-
Tt(
|
|
11800
|
-
}, [Tt]), Ge = Ye((
|
|
11801
|
-
for (let se =
|
|
11798
|
+
}, []), st = Ye((J, se) => {
|
|
11799
|
+
Tt(J, se);
|
|
11800
|
+
}, [Tt]), Ge = Ye((J) => {
|
|
11801
|
+
for (let se = J - 1; se >= 0; se--)
|
|
11802
11802
|
if (x[se].role === "user") {
|
|
11803
11803
|
const Ce = rt(x[se]);
|
|
11804
11804
|
Ce && b(Ce, { checkpointId: le || y || void 0 });
|
|
11805
11805
|
break;
|
|
11806
11806
|
}
|
|
11807
|
-
}, [x, b, le, y, rt]), it = (
|
|
11808
|
-
const se = Array.from(
|
|
11807
|
+
}, [x, b, le, y, rt]), it = (J) => {
|
|
11808
|
+
const se = Array.from(J.target.files || []);
|
|
11809
11809
|
O((Ce) => [...Ce, ...se]);
|
|
11810
|
-
}, Pt = (
|
|
11811
|
-
const se = (
|
|
11810
|
+
}, Pt = (J) => O((se) => se.filter((Ce, Ne) => J !== Ne)), xn = async (J) => {
|
|
11811
|
+
const se = (J.target.files || [])[0];
|
|
11812
11812
|
if (se) {
|
|
11813
11813
|
oe(null), Q(null), z(!0);
|
|
11814
11814
|
try {
|
|
@@ -11818,20 +11818,20 @@ function vo({
|
|
|
11818
11818
|
const Ne = Ce instanceof Error ? Ce.message : "Failed to upload Excel file";
|
|
11819
11819
|
console.error("Excel upload failed", Ce), oe(Ne), h == null || h(Ne);
|
|
11820
11820
|
} finally {
|
|
11821
|
-
z(!1),
|
|
11821
|
+
z(!1), J.target.value = "";
|
|
11822
11822
|
}
|
|
11823
11823
|
}
|
|
11824
|
-
}, Dn = (
|
|
11825
|
-
if (!
|
|
11826
|
-
const se = Date.parse(
|
|
11827
|
-
return Number.isNaN(se) ?
|
|
11828
|
-
}, Ue = async (
|
|
11824
|
+
}, Dn = (J) => {
|
|
11825
|
+
if (!J) return "Unknown";
|
|
11826
|
+
const se = Date.parse(J);
|
|
11827
|
+
return Number.isNaN(se) ? J : new Date(se).toLocaleString();
|
|
11828
|
+
}, Ue = async (J) => {
|
|
11829
11829
|
if (p) {
|
|
11830
|
-
if (!
|
|
11830
|
+
if (!J) {
|
|
11831
11831
|
await C(), ie(null);
|
|
11832
11832
|
return;
|
|
11833
11833
|
}
|
|
11834
|
-
await S(
|
|
11834
|
+
await S(J), ie(J);
|
|
11835
11835
|
}
|
|
11836
11836
|
}, lr = `flex flex-1 w-full flex-col min-h-0 min-w-0 max-h-full overflow-hidden bg-transparent ${e} ${c.container || ""}`, Cs = `flex-1 min-h-0 min-w-0 max-h-full w-full overflow-y-auto overflow-x-auto overscroll-contain break-words break-anywhere p-4 space-y-4 bg-transparent ${c.messagesArea || ""}`, Ts = `flex-shrink-0 w-full border-t p-4 bg-transparent ${c.inputArea || ""}`;
|
|
11837
11837
|
return /* @__PURE__ */ l.jsxs("div", { className: lr, children: [
|
|
@@ -11849,23 +11849,23 @@ function vo({
|
|
|
11849
11849
|
}
|
|
11850
11850
|
)
|
|
11851
11851
|
] }),
|
|
11852
|
-
p &&
|
|
11852
|
+
p && Z.length > 0 && /* @__PURE__ */ l.jsxs("div", { className: "flex-shrink-0 flex items-center gap-2 px-4 py-2 border-b border-border bg-muted/60 text-xs dark:bg-muted/50", children: [
|
|
11853
11853
|
/* @__PURE__ */ l.jsx("span", { className: "opacity-70", children: "Checkpoint:" }),
|
|
11854
11854
|
/* @__PURE__ */ l.jsxs(
|
|
11855
11855
|
"select",
|
|
11856
11856
|
{
|
|
11857
11857
|
className: "border border-border rounded px-2 py-1 text-xs bg-card text-foreground focus:outline-none focus:ring-1 focus:ring-ring dark:bg-secondary",
|
|
11858
11858
|
value: le ?? "",
|
|
11859
|
-
onChange: (
|
|
11860
|
-
const se =
|
|
11859
|
+
onChange: (J) => {
|
|
11860
|
+
const se = J.target.value || null;
|
|
11861
11861
|
Ue(se);
|
|
11862
11862
|
},
|
|
11863
11863
|
children: [
|
|
11864
11864
|
/* @__PURE__ */ l.jsx("option", { value: "", children: "Latest" }),
|
|
11865
|
-
|
|
11866
|
-
Dn(
|
|
11867
|
-
|
|
11868
|
-
] },
|
|
11865
|
+
Z.map((J) => /* @__PURE__ */ l.jsxs("option", { value: J.checkpointId, children: [
|
|
11866
|
+
Dn(J.createdAt),
|
|
11867
|
+
J.preview ? ` — ${J.preview.slice(0, 40)}` : ""
|
|
11868
|
+
] }, J.checkpointId))
|
|
11869
11869
|
]
|
|
11870
11870
|
}
|
|
11871
11871
|
)
|
|
@@ -11887,24 +11887,24 @@ function vo({
|
|
|
11887
11887
|
},
|
|
11888
11888
|
style: { height: "100%", overscrollBehavior: "contain" },
|
|
11889
11889
|
components: {
|
|
11890
|
-
Scroller: K.forwardRef((
|
|
11890
|
+
Scroller: K.forwardRef((J, se) => /* @__PURE__ */ l.jsx(
|
|
11891
11891
|
"div",
|
|
11892
11892
|
{
|
|
11893
|
-
...
|
|
11893
|
+
...J,
|
|
11894
11894
|
ref: se,
|
|
11895
11895
|
style: {
|
|
11896
11896
|
overflowAnchor: "auto",
|
|
11897
11897
|
willChange: "transform",
|
|
11898
|
-
...(
|
|
11898
|
+
...(J == null ? void 0 : J.style) ?? {}
|
|
11899
11899
|
}
|
|
11900
11900
|
}
|
|
11901
11901
|
))
|
|
11902
11902
|
},
|
|
11903
|
-
itemContent: (
|
|
11903
|
+
itemContent: (J, se) => /* @__PURE__ */ l.jsx(
|
|
11904
11904
|
ww,
|
|
11905
11905
|
{
|
|
11906
11906
|
message: se,
|
|
11907
|
-
messageIndex:
|
|
11907
|
+
messageIndex: J,
|
|
11908
11908
|
isStreamingMessage: g && v === se.id,
|
|
11909
11909
|
streamingDebounceMs: o,
|
|
11910
11910
|
isEditing: M === se.id,
|
|
@@ -11915,10 +11915,10 @@ function vo({
|
|
|
11915
11915
|
truncateToolMessages: !1,
|
|
11916
11916
|
toolMessagePreviewLength: 200,
|
|
11917
11917
|
onEdit: st,
|
|
11918
|
-
onRegenerate: () => Ge(
|
|
11918
|
+
onRegenerate: () => Ge(J),
|
|
11919
11919
|
onCancelEdit: We
|
|
11920
11920
|
},
|
|
11921
|
-
se.id ?? `msg-${se.role}-${
|
|
11921
|
+
se.id ?? `msg-${se.role}-${J}-${se.createdAt ?? ""}`
|
|
11922
11922
|
)
|
|
11923
11923
|
}
|
|
11924
11924
|
)
|
|
@@ -11949,13 +11949,13 @@ function vo({
|
|
|
11949
11949
|
ref: Pe,
|
|
11950
11950
|
type: "file",
|
|
11951
11951
|
multiple: !0,
|
|
11952
|
-
onChange: (
|
|
11952
|
+
onChange: (J) => it(J),
|
|
11953
11953
|
className: "hidden"
|
|
11954
11954
|
}
|
|
11955
11955
|
),
|
|
11956
|
-
X.length > 0 && /* @__PURE__ */ l.jsx("div", { className: "flex flex-wrap gap-2", children: X.map((
|
|
11956
|
+
X.length > 0 && /* @__PURE__ */ l.jsx("div", { className: "flex flex-wrap gap-2", children: X.map((J, se) => /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2 bg-gray-100 dark:bg-gray-800 rounded-lg px-3 py-2 text-sm text-gray-900 dark:text-gray-100", children: [
|
|
11957
11957
|
/* @__PURE__ */ l.jsx(Wa, { size: 14 }),
|
|
11958
|
-
/* @__PURE__ */ l.jsx("span", { className: "truncate max-w-[150px]", children:
|
|
11958
|
+
/* @__PURE__ */ l.jsx("span", { className: "truncate max-w-[150px]", children: J.name }),
|
|
11959
11959
|
/* @__PURE__ */ l.jsx(
|
|
11960
11960
|
ke,
|
|
11961
11961
|
{
|
|
@@ -11963,7 +11963,7 @@ function vo({
|
|
|
11963
11963
|
size: "sm",
|
|
11964
11964
|
onClick: () => Pt(se),
|
|
11965
11965
|
className: "h-4 w-4 p-0 text-gray-500 dark:text-gray-400 hover:text-red-500 dark:hover:text-red-400",
|
|
11966
|
-
"aria-label": `Remove ${
|
|
11966
|
+
"aria-label": `Remove ${J.name}`,
|
|
11967
11967
|
children: /* @__PURE__ */ l.jsx(Wn, { size: 12 })
|
|
11968
11968
|
}
|
|
11969
11969
|
)
|
|
@@ -12005,8 +12005,8 @@ function vo({
|
|
|
12005
12005
|
) }),
|
|
12006
12006
|
/* @__PURE__ */ l.jsxs(Ff, { align: "start", sideOffset: 6, className: "w-52", children: [
|
|
12007
12007
|
s && /* @__PURE__ */ l.jsxs(Si, { onClick: () => {
|
|
12008
|
-
var
|
|
12009
|
-
return (
|
|
12008
|
+
var J;
|
|
12009
|
+
return (J = Pe.current) == null ? void 0 : J.click();
|
|
12010
12010
|
}, className: "cursor-pointer", children: [
|
|
12011
12011
|
/* @__PURE__ */ l.jsx(Wa, { className: "h-4 w-4 mr-2" }),
|
|
12012
12012
|
" Attach files or images"
|
|
@@ -12015,8 +12015,8 @@ function vo({
|
|
|
12015
12015
|
Si,
|
|
12016
12016
|
{
|
|
12017
12017
|
onClick: () => {
|
|
12018
|
-
var
|
|
12019
|
-
_ || (
|
|
12018
|
+
var J;
|
|
12019
|
+
_ || (J = Fe.current) == null || J.click();
|
|
12020
12020
|
},
|
|
12021
12021
|
className: `cursor-pointer ${_ ? "opacity-60 pointer-events-none" : ""}`,
|
|
12022
12022
|
children: [
|
|
@@ -12068,7 +12068,7 @@ function Ci(e, [t, n]) {
|
|
|
12068
12068
|
function j0(e, t) {
|
|
12069
12069
|
return f.useReducer((n, r) => t[n][r] ?? n, e);
|
|
12070
12070
|
}
|
|
12071
|
-
var Ia = "ScrollArea", [Bf,
|
|
12071
|
+
var Ia = "ScrollArea", [Bf, sR] = Ut(Ia), [A0, kt] = Bf(Ia), Hf = f.forwardRef(
|
|
12072
12072
|
(e, t) => {
|
|
12073
12073
|
const {
|
|
12074
12074
|
__scopeScrollArea: n,
|
|
@@ -12076,7 +12076,7 @@ var Ia = "ScrollArea", [Bf, sE] = Ut(Ia), [A0, kt] = Bf(Ia), Hf = f.forwardRef(
|
|
|
12076
12076
|
dir: o,
|
|
12077
12077
|
scrollHideDelay: s = 600,
|
|
12078
12078
|
...i
|
|
12079
|
-
} = e, [a, c] = f.useState(null), [u, d] = f.useState(null), [h, p] = f.useState(null), [x, g] = f.useState(null), [v, m] = f.useState(null), [b, w] = f.useState(0), [y,
|
|
12079
|
+
} = e, [a, c] = f.useState(null), [u, d] = f.useState(null), [h, p] = f.useState(null), [x, g] = f.useState(null), [v, m] = f.useState(null), [b, w] = f.useState(0), [y, E] = f.useState(0), [S, C] = f.useState(!1), [R, I] = f.useState(!1), A = Te(t, (M) => c(M)), k = ss(o);
|
|
12080
12080
|
return /* @__PURE__ */ l.jsx(
|
|
12081
12081
|
A0,
|
|
12082
12082
|
{
|
|
@@ -12095,10 +12095,10 @@ var Ia = "ScrollArea", [Bf, sE] = Ut(Ia), [A0, kt] = Bf(Ia), Hf = f.forwardRef(
|
|
|
12095
12095
|
onScrollbarXEnabledChange: C,
|
|
12096
12096
|
scrollbarY: v,
|
|
12097
12097
|
onScrollbarYChange: m,
|
|
12098
|
-
scrollbarYEnabled:
|
|
12098
|
+
scrollbarYEnabled: R,
|
|
12099
12099
|
onScrollbarYEnabledChange: I,
|
|
12100
12100
|
onCornerWidthChange: w,
|
|
12101
|
-
onCornerHeightChange:
|
|
12101
|
+
onCornerHeightChange: E,
|
|
12102
12102
|
children: /* @__PURE__ */ l.jsx(
|
|
12103
12103
|
me.div,
|
|
12104
12104
|
{
|
|
@@ -12244,7 +12244,7 @@ var k0 = f.forwardRef((e, t) => {
|
|
|
12244
12244
|
i(a ? u : d);
|
|
12245
12245
|
}
|
|
12246
12246
|
}, 10);
|
|
12247
|
-
return
|
|
12247
|
+
return Jn(n.viewport, c), Jn(n.content, c), /* @__PURE__ */ l.jsx(vt, { present: r || s, children: /* @__PURE__ */ l.jsx(
|
|
12248
12248
|
ja,
|
|
12249
12249
|
{
|
|
12250
12250
|
"data-state": s ? "visible" : "hidden",
|
|
@@ -12398,7 +12398,7 @@ var k0 = f.forwardRef((e, t) => {
|
|
|
12398
12398
|
onWheelScroll: d,
|
|
12399
12399
|
onResize: h,
|
|
12400
12400
|
...p
|
|
12401
|
-
} = e, x = kt(en, n), [g, v] = f.useState(null), m = Te(t, (A) => v(A)), b = f.useRef(null), w = f.useRef(""), y = x.viewport,
|
|
12401
|
+
} = e, x = kt(en, n), [g, v] = f.useState(null), m = Te(t, (A) => v(A)), b = f.useRef(null), w = f.useRef(""), y = x.viewport, E = r.content - r.viewport, S = ot(d), C = ot(c), R = ps(h, 10);
|
|
12402
12402
|
function I(A) {
|
|
12403
12403
|
if (b.current) {
|
|
12404
12404
|
const k = A.clientX - b.current.left, M = A.clientY - b.current.top;
|
|
@@ -12408,10 +12408,10 @@ var k0 = f.forwardRef((e, t) => {
|
|
|
12408
12408
|
return f.useEffect(() => {
|
|
12409
12409
|
const A = (k) => {
|
|
12410
12410
|
const M = k.target;
|
|
12411
|
-
(g == null ? void 0 : g.contains(M)) && S(k,
|
|
12411
|
+
(g == null ? void 0 : g.contains(M)) && S(k, E);
|
|
12412
12412
|
};
|
|
12413
12413
|
return document.addEventListener("wheel", A, { passive: !1 }), () => document.removeEventListener("wheel", A, { passive: !1 });
|
|
12414
|
-
}, [y, g,
|
|
12414
|
+
}, [y, g, E, S]), f.useEffect(C, [r, C]), Jn(g, R), Jn(x.content, R), /* @__PURE__ */ l.jsx(
|
|
12415
12415
|
M0,
|
|
12416
12416
|
{
|
|
12417
12417
|
scope: n,
|
|
@@ -12493,11 +12493,11 @@ var Aa = "ScrollAreaCorner", Kf = f.forwardRef(
|
|
|
12493
12493
|
Kf.displayName = Aa;
|
|
12494
12494
|
var L0 = f.forwardRef((e, t) => {
|
|
12495
12495
|
const { __scopeScrollArea: n, ...r } = e, o = kt(Aa, n), [s, i] = f.useState(0), [a, c] = f.useState(0), u = !!(s && a);
|
|
12496
|
-
return
|
|
12496
|
+
return Jn(o.scrollbarX, () => {
|
|
12497
12497
|
var h;
|
|
12498
12498
|
const d = ((h = o.scrollbarX) == null ? void 0 : h.offsetHeight) || 0;
|
|
12499
12499
|
o.onCornerHeightChange(d), c(d);
|
|
12500
|
-
}),
|
|
12500
|
+
}), Jn(o.scrollbarY, () => {
|
|
12501
12501
|
var h;
|
|
12502
12502
|
const d = ((h = o.scrollbarY) == null ? void 0 : h.offsetWidth) || 0;
|
|
12503
12503
|
o.onCornerWidthChange(d), i(d);
|
|
@@ -12561,7 +12561,7 @@ function ps(e, t) {
|
|
|
12561
12561
|
window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
|
|
12562
12562
|
}, [n, t]);
|
|
12563
12563
|
}
|
|
12564
|
-
function
|
|
12564
|
+
function Jn(e, t) {
|
|
12565
12565
|
const n = ot(t);
|
|
12566
12566
|
tt(() => {
|
|
12567
12567
|
let r = 0;
|
|
@@ -12575,9 +12575,9 @@ function Zn(e, t) {
|
|
|
12575
12575
|
}
|
|
12576
12576
|
}, [e, n]);
|
|
12577
12577
|
}
|
|
12578
|
-
var
|
|
12579
|
-
const
|
|
12580
|
-
|
|
12578
|
+
var Jf = Hf, H0 = zf, $0 = Kf;
|
|
12579
|
+
const Zf = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
|
|
12580
|
+
Jf,
|
|
12581
12581
|
{
|
|
12582
12582
|
ref: r,
|
|
12583
12583
|
className: D("relative overflow-hidden", e),
|
|
@@ -12589,7 +12589,7 @@ const Jf = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
12589
12589
|
]
|
|
12590
12590
|
}
|
|
12591
12591
|
));
|
|
12592
|
-
|
|
12592
|
+
Zf.displayName = Jf.displayName;
|
|
12593
12593
|
const Qf = f.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ l.jsx(
|
|
12594
12594
|
Na,
|
|
12595
12595
|
{
|
|
@@ -12627,7 +12627,7 @@ function Ti({
|
|
|
12627
12627
|
createThread: v,
|
|
12628
12628
|
deleteThread: m,
|
|
12629
12629
|
renameThread: b
|
|
12630
|
-
} = Fi(), [w, y] = fe(p ?? []), [
|
|
12630
|
+
} = Fi(), [w, y] = fe(p ?? []), [E, S] = fe(!1), [C, R] = fe(null), [I, A] = fe(null), [k, M] = fe(""), [W, G] = fe(!1);
|
|
12631
12631
|
Ve(() => {
|
|
12632
12632
|
y(p ?? []);
|
|
12633
12633
|
}, [p]);
|
|
@@ -12681,7 +12681,7 @@ function Ti({
|
|
|
12681
12681
|
ke,
|
|
12682
12682
|
{
|
|
12683
12683
|
onClick: $,
|
|
12684
|
-
disabled: W ||
|
|
12684
|
+
disabled: W || E,
|
|
12685
12685
|
className: s.createButton || "p-2",
|
|
12686
12686
|
size: "sm",
|
|
12687
12687
|
variant: "ghost",
|
|
@@ -12690,11 +12690,11 @@ function Ti({
|
|
|
12690
12690
|
}
|
|
12691
12691
|
) }),
|
|
12692
12692
|
/* @__PURE__ */ l.jsx(
|
|
12693
|
-
|
|
12693
|
+
Zf,
|
|
12694
12694
|
{
|
|
12695
12695
|
className: `flex-1 min-h-0 ${s.threadList || ""}`,
|
|
12696
12696
|
style: o ? { maxHeight: o } : void 0,
|
|
12697
|
-
children: /* @__PURE__ */ l.jsx("div", { className: "p-2 space-y-1 pb-4", children:
|
|
12697
|
+
children: /* @__PURE__ */ l.jsx("div", { className: "p-2 space-y-1 pb-4", children: E ? /* @__PURE__ */ l.jsx("div", { className: "text-center py-8 text-slate-400", children: "Loading…" }) : w.length === 0 ? /* @__PURE__ */ l.jsxs("div", { className: "text-center py-8 text-slate-400", children: [
|
|
12698
12698
|
/* @__PURE__ */ l.jsx(Kp, { className: "w-8 h-8 mx-auto mb-2 opacity-40 text-slate-500" }),
|
|
12699
12699
|
/* @__PURE__ */ l.jsx("p", { className: "text-sm text-slate-500", children: "No conversations yet" })
|
|
12700
12700
|
] }) : w.slice().sort((F, Q) => new Date(Q.updatedAt || Q.createdAt || "").getTime() - new Date(F.updatedAt || F.createdAt || "").getTime()).map((F) => /* @__PURE__ */ l.jsxs(
|
|
@@ -12740,7 +12740,7 @@ function Ti({
|
|
|
12740
12740
|
] });
|
|
12741
12741
|
}
|
|
12742
12742
|
const eh = gc(null);
|
|
12743
|
-
function
|
|
12743
|
+
function iR({ children: e, basePath: t = "/chat" }) {
|
|
12744
12744
|
const n = wn(() => t ? t === "/" ? "" : t.endsWith("/") ? t.slice(0, -1) : t : "/chat", [t]), r = {
|
|
12745
12745
|
basePath: n,
|
|
12746
12746
|
buildThreadPath: (o) => `${n}/${o}`,
|
|
@@ -12748,7 +12748,7 @@ function iE({ children: e, basePath: t = "/chat" }) {
|
|
|
12748
12748
|
};
|
|
12749
12749
|
return /* @__PURE__ */ l.jsx(eh.Provider, { value: r, children: e });
|
|
12750
12750
|
}
|
|
12751
|
-
function
|
|
12751
|
+
function aR() {
|
|
12752
12752
|
const e = vc(eh);
|
|
12753
12753
|
return e || {
|
|
12754
12754
|
basePath: "/chat",
|
|
@@ -12773,9 +12773,9 @@ function W0() {
|
|
|
12773
12773
|
return e && (n.baseUrl = e), t && (n.apiKey = t), n;
|
|
12774
12774
|
}
|
|
12775
12775
|
function V0() {
|
|
12776
|
-
const e = W0(), t =
|
|
12776
|
+
const e = W0(), t = En.getAuthToken();
|
|
12777
12777
|
return {
|
|
12778
|
-
apiBaseUrl: e.baseUrl ||
|
|
12778
|
+
apiBaseUrl: e.baseUrl || En.baseUrl || "http://localhost:8000",
|
|
12779
12779
|
apiKey: t || e.apiKey || "",
|
|
12780
12780
|
model: "gpt-4",
|
|
12781
12781
|
temperature: 0.7,
|
|
@@ -12801,24 +12801,24 @@ function G0() {
|
|
|
12801
12801
|
}
|
|
12802
12802
|
function K0(e) {
|
|
12803
12803
|
try {
|
|
12804
|
-
localStorage.setItem(th, JSON.stringify(e)), e.apiKey &&
|
|
12804
|
+
localStorage.setItem(th, JSON.stringify(e)), e.apiKey && En.setAuthToken(e.apiKey);
|
|
12805
12805
|
} catch (t) {
|
|
12806
12806
|
console.error("Failed to save settings:", t);
|
|
12807
12807
|
}
|
|
12808
12808
|
}
|
|
12809
|
-
function
|
|
12810
|
-
const e = V0(), t = G0(), n =
|
|
12809
|
+
function lR() {
|
|
12810
|
+
const e = V0(), t = G0(), n = En.getAuthToken();
|
|
12811
12811
|
return {
|
|
12812
12812
|
...e,
|
|
12813
12813
|
...t,
|
|
12814
12814
|
// Always use the current token from API client if available
|
|
12815
12815
|
apiKey: n || t.apiKey || e.apiKey,
|
|
12816
12816
|
// Always use the current base URL from API client
|
|
12817
|
-
apiBaseUrl:
|
|
12817
|
+
apiBaseUrl: En.baseUrl || t.apiBaseUrl || e.apiBaseUrl
|
|
12818
12818
|
};
|
|
12819
12819
|
}
|
|
12820
|
-
function
|
|
12821
|
-
e.apiKey &&
|
|
12820
|
+
function cR(e) {
|
|
12821
|
+
e.apiKey && En.setAuthToken(e.apiKey), K0(e);
|
|
12822
12822
|
}
|
|
12823
12823
|
const Xs = 768;
|
|
12824
12824
|
function Y0() {
|
|
@@ -12831,7 +12831,7 @@ function Y0() {
|
|
|
12831
12831
|
}, []), !!e;
|
|
12832
12832
|
}
|
|
12833
12833
|
var X0 = "Separator", fc = "horizontal", q0 = ["horizontal", "vertical"], nh = f.forwardRef((e, t) => {
|
|
12834
|
-
const { decorative: n, orientation: r = fc, ...o } = e, s =
|
|
12834
|
+
const { decorative: n, orientation: r = fc, ...o } = e, s = J0(r) ? r : fc, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
|
|
12835
12835
|
return /* @__PURE__ */ l.jsx(
|
|
12836
12836
|
me.div,
|
|
12837
12837
|
{
|
|
@@ -12843,7 +12843,7 @@ var X0 = "Separator", fc = "horizontal", q0 = ["horizontal", "vertical"], nh = f
|
|
|
12843
12843
|
);
|
|
12844
12844
|
});
|
|
12845
12845
|
nh.displayName = X0;
|
|
12846
|
-
function
|
|
12846
|
+
function J0(e) {
|
|
12847
12847
|
return q0.includes(e);
|
|
12848
12848
|
}
|
|
12849
12849
|
var rh = nh;
|
|
@@ -12864,7 +12864,7 @@ const ka = f.forwardRef(
|
|
|
12864
12864
|
)
|
|
12865
12865
|
);
|
|
12866
12866
|
ka.displayName = rh.displayName;
|
|
12867
|
-
const oh = ad,
|
|
12867
|
+
const oh = ad, Z0 = pw, Q0 = ld, sh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
12868
12868
|
ns,
|
|
12869
12869
|
{
|
|
12870
12870
|
className: D(
|
|
@@ -12977,9 +12977,9 @@ var ch = Object.freeze({
|
|
|
12977
12977
|
)
|
|
12978
12978
|
);
|
|
12979
12979
|
uh.displayName = tC;
|
|
12980
|
-
var nC = uh, [ms,
|
|
12980
|
+
var nC = uh, [ms, uR] = Ut("Tooltip", [
|
|
12981
12981
|
ir
|
|
12982
|
-
]), gs = ir(), dh = "TooltipProvider", rC = 700,
|
|
12982
|
+
]), gs = ir(), dh = "TooltipProvider", rC = 700, Ri = "tooltip.open", [oC, _a] = ms(dh), fh = (e) => {
|
|
12983
12983
|
const {
|
|
12984
12984
|
__scopeTooltip: t,
|
|
12985
12985
|
delayDuration: n = rC,
|
|
@@ -13027,11 +13027,11 @@ var kr = "Tooltip", [sC, vs] = ms(kr), hh = (e) => {
|
|
|
13027
13027
|
} = e, c = _a(kr, e.__scopeTooltip), u = gs(t), [d, h] = f.useState(null), p = Ft(), x = f.useRef(0), g = i ?? c.disableHoverableContent, v = a ?? c.delayDuration, m = f.useRef(!1), [b, w] = un({
|
|
13028
13028
|
prop: r,
|
|
13029
13029
|
defaultProp: o ?? !1,
|
|
13030
|
-
onChange: (
|
|
13031
|
-
|
|
13030
|
+
onChange: (R) => {
|
|
13031
|
+
R ? (c.onOpen(), document.dispatchEvent(new CustomEvent(Ri))) : c.onClose(), s == null || s(R);
|
|
13032
13032
|
},
|
|
13033
13033
|
caller: kr
|
|
13034
|
-
}), y = f.useMemo(() => b ? m.current ? "delayed-open" : "instant-open" : "closed", [b]),
|
|
13034
|
+
}), y = f.useMemo(() => b ? m.current ? "delayed-open" : "instant-open" : "closed", [b]), E = f.useCallback(() => {
|
|
13035
13035
|
window.clearTimeout(x.current), x.current = 0, m.current = !1, w(!0);
|
|
13036
13036
|
}, [w]), S = f.useCallback(() => {
|
|
13037
13037
|
window.clearTimeout(x.current), x.current = 0, w(!1);
|
|
@@ -13052,12 +13052,12 @@ var kr = "Tooltip", [sC, vs] = ms(kr), hh = (e) => {
|
|
|
13052
13052
|
trigger: d,
|
|
13053
13053
|
onTriggerChange: h,
|
|
13054
13054
|
onTriggerEnter: f.useCallback(() => {
|
|
13055
|
-
c.isOpenDelayedRef.current ? C() :
|
|
13056
|
-
}, [c.isOpenDelayedRef, C,
|
|
13055
|
+
c.isOpenDelayedRef.current ? C() : E();
|
|
13056
|
+
}, [c.isOpenDelayedRef, C, E]),
|
|
13057
13057
|
onTriggerLeave: f.useCallback(() => {
|
|
13058
13058
|
g ? S() : (window.clearTimeout(x.current), x.current = 0);
|
|
13059
13059
|
}, [S, g]),
|
|
13060
|
-
onOpen:
|
|
13060
|
+
onOpen: E,
|
|
13061
13061
|
onClose: S,
|
|
13062
13062
|
disableHoverableContent: g,
|
|
13063
13063
|
children: n
|
|
@@ -13065,9 +13065,9 @@ var kr = "Tooltip", [sC, vs] = ms(kr), hh = (e) => {
|
|
|
13065
13065
|
) });
|
|
13066
13066
|
};
|
|
13067
13067
|
hh.displayName = kr;
|
|
13068
|
-
var
|
|
13068
|
+
var Ei = "TooltipTrigger", ph = f.forwardRef(
|
|
13069
13069
|
(e, t) => {
|
|
13070
|
-
const { __scopeTooltip: n, ...r } = e, o = vs(
|
|
13070
|
+
const { __scopeTooltip: n, ...r } = e, o = vs(Ei, n), s = _a(Ei, n), i = gs(n), a = f.useRef(null), c = Te(t, a, o.onTriggerChange), u = f.useRef(!1), d = f.useRef(!1), h = f.useCallback(() => u.current = !1, []);
|
|
13071
13071
|
return f.useEffect(() => () => document.removeEventListener("pointerup", h), [h]), /* @__PURE__ */ l.jsx(va, { asChild: !0, ...i, children: /* @__PURE__ */ l.jsx(
|
|
13072
13072
|
me.button,
|
|
13073
13073
|
{
|
|
@@ -13093,20 +13093,20 @@ var Ri = "TooltipTrigger", ph = f.forwardRef(
|
|
|
13093
13093
|
) });
|
|
13094
13094
|
}
|
|
13095
13095
|
);
|
|
13096
|
-
ph.displayName =
|
|
13097
|
-
var iC = "TooltipPortal", [
|
|
13096
|
+
ph.displayName = Ei;
|
|
13097
|
+
var iC = "TooltipPortal", [dR, aC] = ms(iC, {
|
|
13098
13098
|
forceMount: void 0
|
|
13099
|
-
}),
|
|
13099
|
+
}), Zn = "TooltipContent", mh = f.forwardRef(
|
|
13100
13100
|
(e, t) => {
|
|
13101
|
-
const n = aC(
|
|
13101
|
+
const n = aC(Zn, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...s } = e, i = vs(Zn, e.__scopeTooltip);
|
|
13102
13102
|
return /* @__PURE__ */ l.jsx(vt, { present: r || i.open, children: i.disableHoverableContent ? /* @__PURE__ */ l.jsx(gh, { side: o, ...s, ref: t }) : /* @__PURE__ */ l.jsx(lC, { side: o, ...s, ref: t }) });
|
|
13103
13103
|
}
|
|
13104
13104
|
), lC = f.forwardRef((e, t) => {
|
|
13105
|
-
const n = vs(
|
|
13105
|
+
const n = vs(Zn, e.__scopeTooltip), r = _a(Zn, e.__scopeTooltip), o = f.useRef(null), s = Te(t, o), [i, a] = f.useState(null), { trigger: c, onClose: u } = n, d = o.current, { onPointerInTransitChange: h } = r, p = f.useCallback(() => {
|
|
13106
13106
|
a(null), h(!1);
|
|
13107
13107
|
}, [h]), x = f.useCallback(
|
|
13108
13108
|
(g, v) => {
|
|
13109
|
-
const m = g.currentTarget, b = { x: g.clientX, y: g.clientY }, w = hC(b, m.getBoundingClientRect()), y = pC(b, w),
|
|
13109
|
+
const m = g.currentTarget, b = { x: g.clientX, y: g.clientY }, w = hC(b, m.getBoundingClientRect()), y = pC(b, w), E = mC(v.getBoundingClientRect()), S = vC([...y, ...E]);
|
|
13110
13110
|
a(S), h(!0);
|
|
13111
13111
|
},
|
|
13112
13112
|
[h]
|
|
@@ -13136,8 +13136,8 @@ var iC = "TooltipPortal", [dE, aC] = ms(iC, {
|
|
|
13136
13136
|
onEscapeKeyDown: s,
|
|
13137
13137
|
onPointerDownOutside: i,
|
|
13138
13138
|
...a
|
|
13139
|
-
} = e, c = vs(
|
|
13140
|
-
return f.useEffect(() => (document.addEventListener(
|
|
13139
|
+
} = e, c = vs(Zn, n), u = gs(n), { onClose: d } = c;
|
|
13140
|
+
return f.useEffect(() => (document.addEventListener(Ri, d), () => document.removeEventListener(Ri, d)), [d]), f.useEffect(() => {
|
|
13141
13141
|
if (c.trigger) {
|
|
13142
13142
|
const h = (p) => {
|
|
13143
13143
|
const x = p.target;
|
|
@@ -13179,7 +13179,7 @@ var iC = "TooltipPortal", [dE, aC] = ms(iC, {
|
|
|
13179
13179
|
);
|
|
13180
13180
|
}
|
|
13181
13181
|
);
|
|
13182
|
-
mh.displayName =
|
|
13182
|
+
mh.displayName = Zn;
|
|
13183
13183
|
var vh = "TooltipArrow", fC = f.forwardRef(
|
|
13184
13184
|
(e, t) => {
|
|
13185
13185
|
const { __scopeTooltip: n, ...r } = e, o = gs(n);
|
|
@@ -13296,7 +13296,7 @@ const SC = bC, CC = wC, TC = yC, bh = f.forwardRef(({ className: e, sideOffset:
|
|
|
13296
13296
|
}
|
|
13297
13297
|
));
|
|
13298
13298
|
bh.displayName = xh.displayName;
|
|
13299
|
-
const
|
|
13299
|
+
const RC = "sidebar:state", EC = 60 * 60 * 24 * 7, IC = "16rem", NC = "18rem", jC = "3rem", AC = "b", wh = f.createContext(null);
|
|
13300
13300
|
function xs() {
|
|
13301
13301
|
const e = f.useContext(wh);
|
|
13302
13302
|
if (!e)
|
|
@@ -13316,7 +13316,7 @@ const yh = f.forwardRef(
|
|
|
13316
13316
|
const c = Y0(), [u, d] = f.useState(!1), [h, p] = f.useState(e), x = t ?? h, g = f.useCallback(
|
|
13317
13317
|
(w) => {
|
|
13318
13318
|
const y = typeof w == "function" ? w(x) : w;
|
|
13319
|
-
n ? n(y) : p(y), document.cookie = `${
|
|
13319
|
+
n ? n(y) : p(y), document.cookie = `${RC}=${y}; path=/; max-age=${EC}`;
|
|
13320
13320
|
},
|
|
13321
13321
|
[n, x]
|
|
13322
13322
|
), v = f.useCallback(() => c ? d((w) => !w) : g((w) => !w), [c, g, d]);
|
|
@@ -13512,7 +13512,7 @@ const PC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
|
13512
13512
|
}
|
|
13513
13513
|
));
|
|
13514
13514
|
PC.displayName = "SidebarInput";
|
|
13515
|
-
const
|
|
13515
|
+
const Rh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
13516
13516
|
"div",
|
|
13517
13517
|
{
|
|
13518
13518
|
ref: n,
|
|
@@ -13521,7 +13521,7 @@ const Eh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
|
13521
13521
|
...t
|
|
13522
13522
|
}
|
|
13523
13523
|
));
|
|
13524
|
-
|
|
13524
|
+
Rh.displayName = "SidebarHeader";
|
|
13525
13525
|
const _C = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
13526
13526
|
"div",
|
|
13527
13527
|
{
|
|
@@ -13542,7 +13542,7 @@ const OC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
|
13542
13542
|
}
|
|
13543
13543
|
));
|
|
13544
13544
|
OC.displayName = "SidebarSeparator";
|
|
13545
|
-
const
|
|
13545
|
+
const Eh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
13546
13546
|
"div",
|
|
13547
13547
|
{
|
|
13548
13548
|
ref: n,
|
|
@@ -13554,7 +13554,7 @@ const Rh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
|
13554
13554
|
...t
|
|
13555
13555
|
}
|
|
13556
13556
|
));
|
|
13557
|
-
|
|
13557
|
+
Eh.displayName = "SidebarContent";
|
|
13558
13558
|
const Ih = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
13559
13559
|
"div",
|
|
13560
13560
|
{
|
|
@@ -13799,7 +13799,7 @@ const zC = f.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, classNa
|
|
|
13799
13799
|
);
|
|
13800
13800
|
});
|
|
13801
13801
|
zC.displayName = "SidebarMenuSubButton";
|
|
13802
|
-
function
|
|
13802
|
+
function fR({
|
|
13803
13803
|
header: e,
|
|
13804
13804
|
sidebarTitle: t = "Threads",
|
|
13805
13805
|
showThreads: n = !0,
|
|
@@ -13810,8 +13810,8 @@ function fE({
|
|
|
13810
13810
|
}) {
|
|
13811
13811
|
return /* @__PURE__ */ l.jsx(so, { ...i, children: /* @__PURE__ */ l.jsxs(yh, { className: `w-full ${r}`, children: [
|
|
13812
13812
|
/* @__PURE__ */ l.jsxs(Sh, { className: `border-r ${o}`, children: [
|
|
13813
|
-
/* @__PURE__ */ l.jsx(
|
|
13814
|
-
/* @__PURE__ */ l.jsx(
|
|
13813
|
+
/* @__PURE__ */ l.jsx(Rh, { children: /* @__PURE__ */ l.jsx(Ah, { children: /* @__PURE__ */ l.jsx(kh, { children: /* @__PURE__ */ l.jsx(Ph, { asChild: !0, size: "lg", children: /* @__PURE__ */ l.jsx("span", { className: "font-semibold", children: t }) }) }) }) }),
|
|
13814
|
+
/* @__PURE__ */ l.jsx(Eh, { children: n && /* @__PURE__ */ l.jsxs(Ih, { children: [
|
|
13815
13815
|
/* @__PURE__ */ l.jsx(Nh, { children: "Conversations" }),
|
|
13816
13816
|
/* @__PURE__ */ l.jsx(jh, { children: /* @__PURE__ */ l.jsx("div", { className: "px-2 py-1", children: /* @__PURE__ */ l.jsx(
|
|
13817
13817
|
Ti,
|
|
@@ -13849,7 +13849,7 @@ _h.displayName = UC;
|
|
|
13849
13849
|
var Oh = _h;
|
|
13850
13850
|
const WC = Pr(
|
|
13851
13851
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
13852
|
-
),
|
|
13852
|
+
), Et = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
13853
13853
|
Oh,
|
|
13854
13854
|
{
|
|
13855
13855
|
ref: n,
|
|
@@ -13857,12 +13857,12 @@ const WC = Pr(
|
|
|
13857
13857
|
...t
|
|
13858
13858
|
}
|
|
13859
13859
|
));
|
|
13860
|
-
|
|
13860
|
+
Et.displayName = Oh.displayName;
|
|
13861
13861
|
function Mh(e) {
|
|
13862
13862
|
const t = f.useRef({ value: e, previous: e });
|
|
13863
13863
|
return f.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
13864
13864
|
}
|
|
13865
|
-
var bs = "Switch", [VC,
|
|
13865
|
+
var bs = "Switch", [VC, hR] = Ut(bs), [GC, KC] = VC(bs), Dh = f.forwardRef(
|
|
13866
13866
|
(e, t) => {
|
|
13867
13867
|
const {
|
|
13868
13868
|
__scopeSwitch: n,
|
|
@@ -13896,7 +13896,7 @@ var bs = "Switch", [VC, hE] = Ut(bs), [GC, KC] = VC(bs), Dh = f.forwardRef(
|
|
|
13896
13896
|
...h,
|
|
13897
13897
|
ref: g,
|
|
13898
13898
|
onClick: ee(e.onClick, (y) => {
|
|
13899
|
-
w((
|
|
13899
|
+
w((E) => !E), m && (v.current = y.isPropagationStopped(), v.current || y.stopPropagation());
|
|
13900
13900
|
})
|
|
13901
13901
|
}
|
|
13902
13902
|
),
|
|
@@ -13999,8 +13999,8 @@ const an = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
|
13999
13999
|
}
|
|
14000
14000
|
));
|
|
14001
14001
|
an.displayName = $h.displayName;
|
|
14002
|
-
var qC = [" ", "Enter", "ArrowUp", "ArrowDown"],
|
|
14003
|
-
|
|
14002
|
+
var qC = [" ", "Enter", "ArrowUp", "ArrowDown"], JC = [" ", "Enter"], An = "Select", [ws, ys, ZC] = aa(An), [ar, pR] = Ut(An, [
|
|
14003
|
+
ZC,
|
|
14004
14004
|
ir
|
|
14005
14005
|
]), Ss = ir(), [QC, gn] = ar(An), [eT, tT] = ar(An), zh = (e) => {
|
|
14006
14006
|
const {
|
|
@@ -14018,7 +14018,7 @@ var qC = [" ", "Enter", "ArrowUp", "ArrowDown"], ZC = [" ", "Enter"], An = "Sele
|
|
|
14018
14018
|
disabled: p,
|
|
14019
14019
|
required: x,
|
|
14020
14020
|
form: g
|
|
14021
|
-
} = e, v = Ss(t), [m, b] = f.useState(null), [w, y] = f.useState(null), [
|
|
14021
|
+
} = e, v = Ss(t), [m, b] = f.useState(null), [w, y] = f.useState(null), [E, S] = f.useState(!1), C = ss(u), [R, I] = un({
|
|
14022
14022
|
prop: r,
|
|
14023
14023
|
defaultProp: o ?? !1,
|
|
14024
14024
|
onChange: s,
|
|
@@ -14038,12 +14038,12 @@ var qC = [" ", "Enter", "ArrowUp", "ArrowDown"], ZC = [" ", "Enter"], An = "Sele
|
|
|
14038
14038
|
onTriggerChange: b,
|
|
14039
14039
|
valueNode: w,
|
|
14040
14040
|
onValueNodeChange: y,
|
|
14041
|
-
valueNodeHasChildren:
|
|
14041
|
+
valueNodeHasChildren: E,
|
|
14042
14042
|
onValueNodeHasChildrenChange: S,
|
|
14043
14043
|
contentId: Ft(),
|
|
14044
14044
|
value: A,
|
|
14045
14045
|
onValueChange: k,
|
|
14046
|
-
open:
|
|
14046
|
+
open: R,
|
|
14047
14047
|
onOpenChange: I,
|
|
14048
14048
|
dir: C,
|
|
14049
14049
|
triggerPointerDownPosRef: M,
|
|
@@ -14157,7 +14157,7 @@ var nT = "SelectIcon", Kh = f.forwardRef(
|
|
|
14157
14157
|
}
|
|
14158
14158
|
);
|
|
14159
14159
|
Kh.displayName = nT;
|
|
14160
|
-
var rT = "SelectPortal", Yh = (e) => /* @__PURE__ */ l.jsx(
|
|
14160
|
+
var rT = "SelectPortal", Yh = (e) => /* @__PURE__ */ l.jsx(Zo, { asChild: !0, ...e });
|
|
14161
14161
|
Yh.displayName = rT;
|
|
14162
14162
|
var kn = "SelectContent", Xh = f.forwardRef(
|
|
14163
14163
|
(e, t) => {
|
|
@@ -14171,11 +14171,11 @@ var kn = "SelectContent", Xh = f.forwardRef(
|
|
|
14171
14171
|
s
|
|
14172
14172
|
) : null;
|
|
14173
14173
|
}
|
|
14174
|
-
return /* @__PURE__ */ l.jsx(
|
|
14174
|
+
return /* @__PURE__ */ l.jsx(Jh, { ...e, ref: t });
|
|
14175
14175
|
}
|
|
14176
14176
|
);
|
|
14177
14177
|
Xh.displayName = kn;
|
|
14178
|
-
var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent.RemoveScroll"),
|
|
14178
|
+
var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent.RemoveScroll"), Jh = f.forwardRef(
|
|
14179
14179
|
(e, t) => {
|
|
14180
14180
|
const {
|
|
14181
14181
|
__scopeSelect: n,
|
|
@@ -14197,7 +14197,7 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
|
|
|
14197
14197
|
avoidCollisions: m,
|
|
14198
14198
|
//
|
|
14199
14199
|
...b
|
|
14200
|
-
} = e, w = gn(kn, n), [y,
|
|
14200
|
+
} = e, w = gn(kn, n), [y, E] = f.useState(null), [S, C] = f.useState(null), R = Te(t, (Y) => E(Y)), [I, A] = f.useState(null), [k, M] = f.useState(
|
|
14201
14201
|
null
|
|
14202
14202
|
), W = ys(n), [G, N] = f.useState(!1), $ = f.useRef(!1);
|
|
14203
14203
|
f.useEffect(() => {
|
|
@@ -14205,7 +14205,7 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
|
|
|
14205
14205
|
}, [y]), na();
|
|
14206
14206
|
const L = f.useCallback(
|
|
14207
14207
|
(Y) => {
|
|
14208
|
-
const [P, ...
|
|
14208
|
+
const [P, ...Z] = W().map((ie) => ie.ref.current), [ne] = Z.slice(-1), le = document.activeElement;
|
|
14209
14209
|
for (const ie of Y)
|
|
14210
14210
|
if (ie === le || (ie == null || ie.scrollIntoView({ block: "nearest" }), ie === P && S && (S.scrollTop = 0), ie === ne && S && (S.scrollTop = S.scrollHeight), ie == null || ie.focus(), document.activeElement !== le)) return;
|
|
14211
14211
|
},
|
|
@@ -14227,11 +14227,11 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
|
|
|
14227
14227
|
x: Math.abs(Math.round(ne.pageX) - (((le = _.current) == null ? void 0 : le.x) ?? 0)),
|
|
14228
14228
|
y: Math.abs(Math.round(ne.pageY) - (((ie = _.current) == null ? void 0 : ie.y) ?? 0))
|
|
14229
14229
|
};
|
|
14230
|
-
},
|
|
14230
|
+
}, Z = (ne) => {
|
|
14231
14231
|
Y.x <= 10 && Y.y <= 10 ? ne.preventDefault() : y.contains(ne.target) || O(!1), document.removeEventListener("pointermove", P), _.current = null;
|
|
14232
14232
|
};
|
|
14233
|
-
return _.current !== null && (document.addEventListener("pointermove", P), document.addEventListener("pointerup",
|
|
14234
|
-
document.removeEventListener("pointermove", P), document.removeEventListener("pointerup",
|
|
14233
|
+
return _.current !== null && (document.addEventListener("pointermove", P), document.addEventListener("pointerup", Z, { capture: !0, once: !0 })), () => {
|
|
14234
|
+
document.removeEventListener("pointermove", P), document.removeEventListener("pointerup", Z, { capture: !0 });
|
|
14235
14235
|
};
|
|
14236
14236
|
}
|
|
14237
14237
|
}, [y, O, _]), f.useEffect(() => {
|
|
@@ -14241,21 +14241,21 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
|
|
|
14241
14241
|
};
|
|
14242
14242
|
}, [O]);
|
|
14243
14243
|
const [z, q] = pp((Y) => {
|
|
14244
|
-
const P = W().filter((le) => !le.disabled),
|
|
14244
|
+
const P = W().filter((le) => !le.disabled), Z = P.find((le) => le.ref.current === document.activeElement), ne = mp(P, Y, Z);
|
|
14245
14245
|
ne && setTimeout(() => ne.ref.current.focus());
|
|
14246
14246
|
}), oe = f.useCallback(
|
|
14247
|
-
(Y, P,
|
|
14248
|
-
const ne = !$.current && !
|
|
14247
|
+
(Y, P, Z) => {
|
|
14248
|
+
const ne = !$.current && !Z;
|
|
14249
14249
|
(w.value !== void 0 && w.value === P || ne) && (A(Y), ne && ($.current = !0));
|
|
14250
14250
|
},
|
|
14251
14251
|
[w.value]
|
|
14252
14252
|
), F = f.useCallback(() => y == null ? void 0 : y.focus(), [y]), Q = f.useCallback(
|
|
14253
|
-
(Y, P,
|
|
14254
|
-
const ne = !$.current && !
|
|
14253
|
+
(Y, P, Z) => {
|
|
14254
|
+
const ne = !$.current && !Z;
|
|
14255
14255
|
(w.value !== void 0 && w.value === P || ne) && M(Y);
|
|
14256
14256
|
},
|
|
14257
14257
|
[w.value]
|
|
14258
|
-
), de = r === "popper" ? Ii :
|
|
14258
|
+
), de = r === "popper" ? Ii : Zh, be = de === Ii ? {
|
|
14259
14259
|
side: a,
|
|
14260
14260
|
sideOffset: c,
|
|
14261
14261
|
align: u,
|
|
@@ -14284,7 +14284,7 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
|
|
|
14284
14284
|
isPositioned: G,
|
|
14285
14285
|
searchRef: z,
|
|
14286
14286
|
children: /* @__PURE__ */ l.jsx(es, { as: sT, allowPinchZoom: !0, children: /* @__PURE__ */ l.jsx(
|
|
14287
|
-
|
|
14287
|
+
Jo,
|
|
14288
14288
|
{
|
|
14289
14289
|
asChild: !0,
|
|
14290
14290
|
trapped: w.open,
|
|
@@ -14315,7 +14315,7 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
|
|
|
14315
14315
|
...b,
|
|
14316
14316
|
...be,
|
|
14317
14317
|
onPlaced: () => N(!0),
|
|
14318
|
-
ref:
|
|
14318
|
+
ref: R,
|
|
14319
14319
|
style: {
|
|
14320
14320
|
// flex layout so we can place the scroll buttons properly
|
|
14321
14321
|
display: "flex",
|
|
@@ -14345,13 +14345,13 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
|
|
|
14345
14345
|
);
|
|
14346
14346
|
}
|
|
14347
14347
|
);
|
|
14348
|
-
|
|
14349
|
-
var iT = "SelectItemAlignedPosition",
|
|
14350
|
-
const { __scopeSelect: n, onPlaced: r, ...o } = e, s = gn(kn, n), i = vn(kn, n), [a, c] = f.useState(null), [u, d] = f.useState(null), h = Te(t, (
|
|
14348
|
+
Jh.displayName = oT;
|
|
14349
|
+
var iT = "SelectItemAlignedPosition", Zh = f.forwardRef((e, t) => {
|
|
14350
|
+
const { __scopeSelect: n, onPlaced: r, ...o } = e, s = gn(kn, n), i = vn(kn, n), [a, c] = f.useState(null), [u, d] = f.useState(null), h = Te(t, (R) => d(R)), p = ys(n), x = f.useRef(!1), g = f.useRef(!0), { viewport: v, selectedItem: m, selectedItemText: b, focusSelectedItem: w } = i, y = f.useCallback(() => {
|
|
14351
14351
|
if (s.trigger && s.valueNode && a && u && v && m && b) {
|
|
14352
|
-
const
|
|
14352
|
+
const R = s.trigger.getBoundingClientRect(), I = u.getBoundingClientRect(), A = s.valueNode.getBoundingClientRect(), k = b.getBoundingClientRect();
|
|
14353
14353
|
if (s.dir !== "rtl") {
|
|
14354
|
-
const le = k.left - I.left, ie = A.left - le, Pe =
|
|
14354
|
+
const le = k.left - I.left, ie = A.left - le, Pe = R.left - ie, Fe = R.width + Pe, Le = Math.max(Fe, I.width), ce = window.innerWidth - Dt, Ae = Ci(ie, [
|
|
14355
14355
|
Dt,
|
|
14356
14356
|
// Prevents the content from going off the starting edge of the
|
|
14357
14357
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -14362,13 +14362,13 @@ var iT = "SelectItemAlignedPosition", Jh = f.forwardRef((e, t) => {
|
|
|
14362
14362
|
]);
|
|
14363
14363
|
a.style.minWidth = Fe + "px", a.style.left = Ae + "px";
|
|
14364
14364
|
} else {
|
|
14365
|
-
const le = I.right - k.right, ie = window.innerWidth - A.right - le, Pe = window.innerWidth -
|
|
14365
|
+
const le = I.right - k.right, ie = window.innerWidth - A.right - le, Pe = window.innerWidth - R.right - ie, Fe = R.width + Pe, Le = Math.max(Fe, I.width), ce = window.innerWidth - Dt, Ae = Ci(ie, [
|
|
14366
14366
|
Dt,
|
|
14367
14367
|
Math.max(Dt, ce - Le)
|
|
14368
14368
|
]);
|
|
14369
14369
|
a.style.minWidth = Fe + "px", a.style.right = Ae + "px";
|
|
14370
14370
|
}
|
|
14371
|
-
const M = p(), W = window.innerHeight - Dt * 2, G = v.scrollHeight, N = window.getComputedStyle(u), $ = parseInt(N.borderTopWidth, 10), L = parseInt(N.paddingTop, 10), X = parseInt(N.borderBottomWidth, 10), O = parseInt(N.paddingBottom, 10), _ = $ + L + G + O + X, z = Math.min(m.offsetHeight * 5, _), q = window.getComputedStyle(v), oe = parseInt(q.paddingTop, 10), F = parseInt(q.paddingBottom, 10), Q =
|
|
14371
|
+
const M = p(), W = window.innerHeight - Dt * 2, G = v.scrollHeight, N = window.getComputedStyle(u), $ = parseInt(N.borderTopWidth, 10), L = parseInt(N.paddingTop, 10), X = parseInt(N.borderBottomWidth, 10), O = parseInt(N.paddingBottom, 10), _ = $ + L + G + O + X, z = Math.min(m.offsetHeight * 5, _), q = window.getComputedStyle(v), oe = parseInt(q.paddingTop, 10), F = parseInt(q.paddingBottom, 10), Q = R.top + R.height / 2 - Dt, de = W - Q, be = m.offsetHeight / 2, Y = m.offsetTop + be, P = $ + L + Y, Z = _ - P;
|
|
14372
14372
|
if (P <= Q) {
|
|
14373
14373
|
const le = M.length > 0 && m === M[M.length - 1].ref.current;
|
|
14374
14374
|
a.style.bottom = "0px";
|
|
@@ -14385,7 +14385,7 @@ var iT = "SelectItemAlignedPosition", Jh = f.forwardRef((e, t) => {
|
|
|
14385
14385
|
Q,
|
|
14386
14386
|
$ + v.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
14387
14387
|
(le ? oe : 0) + be
|
|
14388
|
-
) +
|
|
14388
|
+
) + Z;
|
|
14389
14389
|
a.style.height = Pe + "px", v.scrollTop = P - Q + v.offsetTop;
|
|
14390
14390
|
}
|
|
14391
14391
|
a.style.margin = `${Dt}px 0`, a.style.minHeight = z + "px", a.style.maxHeight = W + "px", r == null || r(), requestAnimationFrame(() => x.current = !0);
|
|
@@ -14403,13 +14403,13 @@ var iT = "SelectItemAlignedPosition", Jh = f.forwardRef((e, t) => {
|
|
|
14403
14403
|
r
|
|
14404
14404
|
]);
|
|
14405
14405
|
tt(() => y(), [y]);
|
|
14406
|
-
const [
|
|
14406
|
+
const [E, S] = f.useState();
|
|
14407
14407
|
tt(() => {
|
|
14408
14408
|
u && S(window.getComputedStyle(u).zIndex);
|
|
14409
14409
|
}, [u]);
|
|
14410
14410
|
const C = f.useCallback(
|
|
14411
|
-
(
|
|
14412
|
-
|
|
14411
|
+
(R) => {
|
|
14412
|
+
R && g.current === !0 && (y(), w == null || w(), g.current = !1);
|
|
14413
14413
|
},
|
|
14414
14414
|
[y, w]
|
|
14415
14415
|
);
|
|
@@ -14428,7 +14428,7 @@ var iT = "SelectItemAlignedPosition", Jh = f.forwardRef((e, t) => {
|
|
|
14428
14428
|
display: "flex",
|
|
14429
14429
|
flexDirection: "column",
|
|
14430
14430
|
position: "fixed",
|
|
14431
|
-
zIndex:
|
|
14431
|
+
zIndex: E
|
|
14432
14432
|
},
|
|
14433
14433
|
children: /* @__PURE__ */ l.jsx(
|
|
14434
14434
|
me.div,
|
|
@@ -14450,7 +14450,7 @@ var iT = "SelectItemAlignedPosition", Jh = f.forwardRef((e, t) => {
|
|
|
14450
14450
|
}
|
|
14451
14451
|
);
|
|
14452
14452
|
});
|
|
14453
|
-
|
|
14453
|
+
Zh.displayName = iT;
|
|
14454
14454
|
var aT = "SelectPopperPosition", Ii = f.forwardRef((e, t) => {
|
|
14455
14455
|
const {
|
|
14456
14456
|
__scopeSelect: n,
|
|
@@ -14520,8 +14520,8 @@ var [lT, Oa] = ar(kn, {}), Ni = "SelectViewport", Qh = f.forwardRef(
|
|
|
14520
14520
|
if (x > 0) {
|
|
14521
14521
|
const g = window.innerHeight - Dt * 2, v = parseFloat(h.style.minHeight), m = parseFloat(h.style.height), b = Math.max(v, m);
|
|
14522
14522
|
if (b < g) {
|
|
14523
|
-
const w = b + x, y = Math.min(g, w),
|
|
14524
|
-
h.style.height = y + "px", h.style.bottom === "0px" && (d.scrollTop =
|
|
14523
|
+
const w = b + x, y = Math.min(g, w), E = w - y;
|
|
14524
|
+
h.style.height = y + "px", h.style.bottom === "0px" && (d.scrollTop = E > 0 ? E : 0, h.style.justifyContent = "flex-end");
|
|
14525
14525
|
}
|
|
14526
14526
|
}
|
|
14527
14527
|
}
|
|
@@ -14619,8 +14619,8 @@ var Fo = "SelectItem", [fT, rp] = ar(Fo), op = f.forwardRef(
|
|
|
14619
14619
|
w.currentTarget === document.activeElement && ((y = c.onItemLeave) == null || y.call(c));
|
|
14620
14620
|
}),
|
|
14621
14621
|
onKeyDown: ee(i.onKeyDown, (w) => {
|
|
14622
|
-
var
|
|
14623
|
-
((
|
|
14622
|
+
var E;
|
|
14623
|
+
((E = c.searchRef) == null ? void 0 : E.current) !== "" && w.key === " " || (JC.includes(w.key) && b(), w.key === " " && w.preventDefault());
|
|
14624
14624
|
})
|
|
14625
14625
|
}
|
|
14626
14626
|
)
|
|
@@ -14899,7 +14899,7 @@ const bn = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
14899
14899
|
}
|
|
14900
14900
|
));
|
|
14901
14901
|
bn.displayName = bp.displayName;
|
|
14902
|
-
const
|
|
14902
|
+
const RT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
14903
14903
|
Sp,
|
|
14904
14904
|
{
|
|
14905
14905
|
ref: n,
|
|
@@ -14907,7 +14907,7 @@ const ET = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
|
14907
14907
|
...t
|
|
14908
14908
|
}
|
|
14909
14909
|
));
|
|
14910
|
-
|
|
14910
|
+
RT.displayName = Sp.displayName;
|
|
14911
14911
|
const xo = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
14912
14912
|
"div",
|
|
14913
14913
|
{
|
|
@@ -14941,7 +14941,7 @@ const wo = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
|
14941
14941
|
}
|
|
14942
14942
|
));
|
|
14943
14943
|
wo.displayName = "CardTitle";
|
|
14944
|
-
const
|
|
14944
|
+
const ET = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
14945
14945
|
"p",
|
|
14946
14946
|
{
|
|
14947
14947
|
ref: n,
|
|
@@ -14949,7 +14949,7 @@ const RT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
|
14949
14949
|
...t
|
|
14950
14950
|
}
|
|
14951
14951
|
));
|
|
14952
|
-
|
|
14952
|
+
ET.displayName = "CardDescription";
|
|
14953
14953
|
const yo = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx("div", { ref: n, className: D("p-6 pt-0", e), ...t }));
|
|
14954
14954
|
yo.displayName = "CardContent";
|
|
14955
14955
|
const IT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
|
|
@@ -14980,7 +14980,7 @@ const NT = {
|
|
|
14980
14980
|
showTypingIndicator: !0
|
|
14981
14981
|
}
|
|
14982
14982
|
};
|
|
14983
|
-
function
|
|
14983
|
+
function mR({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
14984
14984
|
const [r, o] = fe(!1), [s, i] = fe(!1), [a, c] = fe(e), [u, d] = fe(!1), { toast: h } = ta();
|
|
14985
14985
|
Ve(() => {
|
|
14986
14986
|
const m = JSON.stringify(a) !== JSON.stringify(e);
|
|
@@ -15016,10 +15016,10 @@ function mE({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15016
15016
|
}
|
|
15017
15017
|
};
|
|
15018
15018
|
return /* @__PURE__ */ l.jsxs(oh, { open: r, onOpenChange: o, children: [
|
|
15019
|
-
/* @__PURE__ */ l.jsx(
|
|
15020
|
-
/* @__PURE__ */ l.jsx(
|
|
15019
|
+
/* @__PURE__ */ l.jsx(Z0, { asChild: !0, children: /* @__PURE__ */ l.jsxs(ke, { variant: "outline", size: "sm", className: n, children: [
|
|
15020
|
+
/* @__PURE__ */ l.jsx(Jp, { className: "h-4 w-4 mr-2" }),
|
|
15021
15021
|
"Settings",
|
|
15022
|
-
u && /* @__PURE__ */ l.jsx(
|
|
15022
|
+
u && /* @__PURE__ */ l.jsx(Eu, { variant: "destructive", className: "ml-2 h-4 w-4 p-0" })
|
|
15023
15023
|
] }) }),
|
|
15024
15024
|
/* @__PURE__ */ l.jsxs(Pa, { className: "w-[500px] sm:w-[600px] overflow-y-auto", children: [
|
|
15025
15025
|
/* @__PURE__ */ l.jsxs(ih, { children: [
|
|
@@ -15029,12 +15029,12 @@ function mE({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15029
15029
|
/* @__PURE__ */ l.jsxs("div", { className: "space-y-6 py-6", children: [
|
|
15030
15030
|
/* @__PURE__ */ l.jsxs(xo, { children: [
|
|
15031
15031
|
/* @__PURE__ */ l.jsx(bo, { className: "pb-3", children: /* @__PURE__ */ l.jsxs(wo, { className: "text-lg flex items-center gap-2", children: [
|
|
15032
|
-
/* @__PURE__ */ l.jsx(
|
|
15032
|
+
/* @__PURE__ */ l.jsx(Zp, { className: "h-5 w-5" }),
|
|
15033
15033
|
"API Configuration"
|
|
15034
15034
|
] }) }),
|
|
15035
15035
|
/* @__PURE__ */ l.jsxs(yo, { className: "space-y-4", children: [
|
|
15036
15036
|
/* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
|
|
15037
|
-
/* @__PURE__ */ l.jsx(
|
|
15037
|
+
/* @__PURE__ */ l.jsx(Et, { htmlFor: "api-url", children: "API Base URL" }),
|
|
15038
15038
|
/* @__PURE__ */ l.jsxs("div", { className: "flex gap-2", children: [
|
|
15039
15039
|
/* @__PURE__ */ l.jsx(
|
|
15040
15040
|
Ar,
|
|
@@ -15052,7 +15052,7 @@ function mE({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15052
15052
|
] })
|
|
15053
15053
|
] }),
|
|
15054
15054
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
15055
|
-
/* @__PURE__ */ l.jsx(
|
|
15055
|
+
/* @__PURE__ */ l.jsx(Et, { htmlFor: "enable-auth", children: "Enable Authentication" }),
|
|
15056
15056
|
/* @__PURE__ */ l.jsx(
|
|
15057
15057
|
an,
|
|
15058
15058
|
{
|
|
@@ -15066,7 +15066,7 @@ function mE({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15066
15066
|
)
|
|
15067
15067
|
] }),
|
|
15068
15068
|
a.api.enableAuth && /* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
|
|
15069
|
-
/* @__PURE__ */ l.jsx(
|
|
15069
|
+
/* @__PURE__ */ l.jsx(Et, { htmlFor: "auth-token", children: "Authentication Token" }),
|
|
15070
15070
|
/* @__PURE__ */ l.jsxs("div", { className: "flex gap-2", children: [
|
|
15071
15071
|
/* @__PURE__ */ l.jsx(
|
|
15072
15072
|
Ar,
|
|
@@ -15101,7 +15101,7 @@ function mE({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15101
15101
|
] }) }),
|
|
15102
15102
|
/* @__PURE__ */ l.jsxs(yo, { className: "space-y-4", children: [
|
|
15103
15103
|
/* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
|
|
15104
|
-
/* @__PURE__ */ l.jsx(
|
|
15104
|
+
/* @__PURE__ */ l.jsx(Et, { htmlFor: "layout", children: "Layout Style" }),
|
|
15105
15105
|
/* @__PURE__ */ l.jsxs(
|
|
15106
15106
|
pc,
|
|
15107
15107
|
{
|
|
@@ -15122,7 +15122,7 @@ function mE({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15122
15122
|
)
|
|
15123
15123
|
] }),
|
|
15124
15124
|
/* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
|
|
15125
|
-
/* @__PURE__ */ l.jsx(
|
|
15125
|
+
/* @__PURE__ */ l.jsx(Et, { htmlFor: "theme", children: "Theme" }),
|
|
15126
15126
|
/* @__PURE__ */ l.jsxs(
|
|
15127
15127
|
pc,
|
|
15128
15128
|
{
|
|
@@ -15145,7 +15145,7 @@ function mE({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15145
15145
|
/* @__PURE__ */ l.jsx(ka, {}),
|
|
15146
15146
|
/* @__PURE__ */ l.jsxs("div", { className: "space-y-3", children: [
|
|
15147
15147
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
15148
|
-
/* @__PURE__ */ l.jsx(
|
|
15148
|
+
/* @__PURE__ */ l.jsx(Et, { htmlFor: "show-timestamps", children: "Show Timestamps" }),
|
|
15149
15149
|
/* @__PURE__ */ l.jsx(
|
|
15150
15150
|
an,
|
|
15151
15151
|
{
|
|
@@ -15159,7 +15159,7 @@ function mE({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15159
15159
|
)
|
|
15160
15160
|
] }),
|
|
15161
15161
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
15162
|
-
/* @__PURE__ */ l.jsx(
|
|
15162
|
+
/* @__PURE__ */ l.jsx(Et, { htmlFor: "show-agent-names", children: "Show Agent Names" }),
|
|
15163
15163
|
/* @__PURE__ */ l.jsx(
|
|
15164
15164
|
an,
|
|
15165
15165
|
{
|
|
@@ -15173,7 +15173,7 @@ function mE({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15173
15173
|
)
|
|
15174
15174
|
] }),
|
|
15175
15175
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
15176
|
-
/* @__PURE__ */ l.jsx(
|
|
15176
|
+
/* @__PURE__ */ l.jsx(Et, { htmlFor: "compact-messages", children: "Compact Messages" }),
|
|
15177
15177
|
/* @__PURE__ */ l.jsx(
|
|
15178
15178
|
an,
|
|
15179
15179
|
{
|
|
@@ -15197,7 +15197,7 @@ function mE({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15197
15197
|
/* @__PURE__ */ l.jsxs(yo, { className: "space-y-4", children: [
|
|
15198
15198
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
15199
15199
|
/* @__PURE__ */ l.jsxs("div", { children: [
|
|
15200
|
-
/* @__PURE__ */ l.jsx(
|
|
15200
|
+
/* @__PURE__ */ l.jsx(Et, { htmlFor: "auto-save", children: "Auto-save Conversations" }),
|
|
15201
15201
|
/* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground", children: "Automatically save messages to threads" })
|
|
15202
15202
|
] }),
|
|
15203
15203
|
/* @__PURE__ */ l.jsx(
|
|
@@ -15214,7 +15214,7 @@ function mE({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15214
15214
|
] }),
|
|
15215
15215
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
15216
15216
|
/* @__PURE__ */ l.jsxs("div", { children: [
|
|
15217
|
-
/* @__PURE__ */ l.jsx(
|
|
15217
|
+
/* @__PURE__ */ l.jsx(Et, { htmlFor: "enable-streaming", children: "Enable Streaming" }),
|
|
15218
15218
|
/* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground", children: "Stream responses in real-time" })
|
|
15219
15219
|
] }),
|
|
15220
15220
|
/* @__PURE__ */ l.jsx(
|
|
@@ -15231,7 +15231,7 @@ function mE({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15231
15231
|
] }),
|
|
15232
15232
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
15233
15233
|
/* @__PURE__ */ l.jsxs("div", { children: [
|
|
15234
|
-
/* @__PURE__ */ l.jsx(
|
|
15234
|
+
/* @__PURE__ */ l.jsx(Et, { htmlFor: "typing-indicator", children: "Typing Indicator" }),
|
|
15235
15235
|
/* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground", children: "Show typing indicator during responses" })
|
|
15236
15236
|
] }),
|
|
15237
15237
|
/* @__PURE__ */ l.jsx(
|
|
@@ -15265,7 +15265,7 @@ function mE({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
15265
15265
|
] })
|
|
15266
15266
|
] });
|
|
15267
15267
|
}
|
|
15268
|
-
function
|
|
15268
|
+
function gR({
|
|
15269
15269
|
layout: e = "sidebar",
|
|
15270
15270
|
layoutSize: t = "desktop",
|
|
15271
15271
|
showThreads: n = !0,
|
|
@@ -15344,21 +15344,21 @@ export {
|
|
|
15344
15344
|
Ug as ApiClient,
|
|
15345
15345
|
Ug as ChatApi,
|
|
15346
15346
|
vo as ChatInterface,
|
|
15347
|
-
|
|
15347
|
+
fR as ChatMainLayout,
|
|
15348
15348
|
so as ChatProvider,
|
|
15349
|
-
|
|
15350
|
-
|
|
15349
|
+
iR as ChatRoutingProvider,
|
|
15350
|
+
mR as ChatSettings,
|
|
15351
15351
|
Xr as MarkdownContent,
|
|
15352
15352
|
ww as MessageComponent,
|
|
15353
15353
|
Ti as ThreadManager,
|
|
15354
|
-
|
|
15355
|
-
|
|
15356
|
-
|
|
15357
|
-
|
|
15354
|
+
En as apiClient,
|
|
15355
|
+
cR as applySettings,
|
|
15356
|
+
En as chatApiClient,
|
|
15357
|
+
gR as default,
|
|
15358
15358
|
zg as del,
|
|
15359
15359
|
Mt as get,
|
|
15360
15360
|
Bg as getChatToken,
|
|
15361
|
-
|
|
15361
|
+
lR as getCurrentSettings,
|
|
15362
15362
|
W0 as getDefaultApiConfig,
|
|
15363
15363
|
V0 as getDefaultChatSettings,
|
|
15364
15364
|
Hg as onChatTokenChanged,
|
|
@@ -15366,7 +15366,7 @@ export {
|
|
|
15366
15366
|
$g as put,
|
|
15367
15367
|
dl as setChatToken,
|
|
15368
15368
|
Fi as useChat,
|
|
15369
|
-
|
|
15369
|
+
aR as useChatRouting,
|
|
15370
15370
|
Wg as useChatStream,
|
|
15371
15371
|
Xg as useMessagesReducer
|
|
15372
15372
|
};
|