teodor-new-chat-ui 3.0.17 → 3.0.19
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 +768 -752
- package/dist/index.umd.js +13 -13
- package/dist/lib/chat-api.d.ts +8 -0
- package/dist/lib/chatUtils.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
import { jsx as c, jsxs as E, Fragment as Ne } from "react/jsx-runtime";
|
|
2
2
|
import * as u from "react";
|
|
3
|
-
import Ve, { useState as re, useRef as Ee, useCallback as ve, useEffect as me, useReducer as nd, useMemo as ft, createContext as
|
|
4
|
-
import { ChevronUp as
|
|
5
|
-
import { Slot as
|
|
6
|
-
import { cva as
|
|
3
|
+
import Ve, { useState as re, useRef as Ee, useCallback as ve, useEffect as me, useReducer as nd, useMemo as ft, createContext as Na, useContext as Ra, useLayoutEffect as rd } from "react";
|
|
4
|
+
import { ChevronUp as qt, ChevronDown as _t, Copy as ys, Edit as xs, RotateCcw as so, Bot as Ss, Wrench as od, User as sd, Image as ad, ChevronRight as id, Check as ko, Circle as cd, X as Jt, Loader2 as Cs, Edit3 as Ta, Paperclip as Es, Plus as ld, FileSpreadsheet as ud, Square as dd, Send as fd, MessageSquarePlus as pd, MessageSquare as hd, Calendar as md, Trash2 as gd, PanelLeft as bd, Settings as vd, Server as wd, EyeOff as yd, Eye as xd, Layout as Sd, MessageCircle as Cd, Save as Ed } from "lucide-react";
|
|
5
|
+
import { Slot as Bt, createSlot as Mt, createSlottable as Nd } from "@radix-ui/react-slot";
|
|
6
|
+
import { cva as cn } from "class-variance-authority";
|
|
7
7
|
import { clsx as Rd } from "clsx";
|
|
8
8
|
import { twMerge as Td } from "tailwind-merge";
|
|
9
|
-
import * as
|
|
9
|
+
import * as sr from "react-dom";
|
|
10
10
|
import Ad from "react-dom";
|
|
11
11
|
import Pd from "react-markdown";
|
|
12
12
|
import Id from "remark-gfm";
|
|
13
|
-
function
|
|
13
|
+
function Aa(e, t) {
|
|
14
14
|
return function() {
|
|
15
15
|
return e.apply(t, arguments);
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
const { toString: _d } = Object.prototype, { getPrototypeOf: Mo } = Object, { iterator:
|
|
18
|
+
const { toString: _d } = Object.prototype, { getPrototypeOf: Mo } = Object, { iterator: ar, toStringTag: Pa } = Symbol, ir = /* @__PURE__ */ ((e) => (t) => {
|
|
19
19
|
const n = _d.call(t);
|
|
20
20
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
21
|
-
})(/* @__PURE__ */ Object.create(null)), He = (e) => (e = e.toLowerCase(), (t) =>
|
|
22
|
-
function
|
|
23
|
-
return e !== null && !
|
|
21
|
+
})(/* @__PURE__ */ Object.create(null)), He = (e) => (e = e.toLowerCase(), (t) => ir(t) === e), cr = (e) => (t) => typeof t === e, { isArray: Ut } = Array, Dt = cr("undefined");
|
|
22
|
+
function ln(e) {
|
|
23
|
+
return e !== null && !Dt(e) && e.constructor !== null && !Dt(e.constructor) && Re(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const Ia = He("ArrayBuffer");
|
|
26
26
|
function Od(e) {
|
|
27
27
|
let t;
|
|
28
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
28
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ia(e.buffer), t;
|
|
29
29
|
}
|
|
30
|
-
const kd =
|
|
31
|
-
if (
|
|
30
|
+
const kd = cr("string"), Re = cr("function"), _a = cr("number"), un = (e) => e !== null && typeof e == "object", Md = (e) => e === !0 || e === !1, _n = (e) => {
|
|
31
|
+
if (ir(e) !== "object")
|
|
32
32
|
return !1;
|
|
33
33
|
const t = Mo(e);
|
|
34
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
34
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Pa in e) && !(ar in e);
|
|
35
35
|
}, Dd = (e) => {
|
|
36
|
-
if (!
|
|
36
|
+
if (!un(e) || ln(e))
|
|
37
37
|
return !1;
|
|
38
38
|
try {
|
|
39
39
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
40
40
|
} catch {
|
|
41
41
|
return !1;
|
|
42
42
|
}
|
|
43
|
-
}, Ld = He("Date"), Fd = He("File"), $d = He("Blob"), Bd = He("FileList"), Ud = (e) =>
|
|
43
|
+
}, Ld = He("Date"), Fd = He("File"), $d = He("Blob"), Bd = He("FileList"), Ud = (e) => un(e) && Re(e.pipe), Hd = (e) => {
|
|
44
44
|
let t;
|
|
45
|
-
return e && (typeof FormData == "function" && e instanceof FormData || Re(e.append) && ((t =
|
|
45
|
+
return e && (typeof FormData == "function" && e instanceof FormData || Re(e.append) && ((t = ir(e)) === "formdata" || // detect form-data instance
|
|
46
46
|
t === "object" && Re(e.toString) && e.toString() === "[object FormData]"));
|
|
47
47
|
}, zd = He("URLSearchParams"), [Wd, jd, Vd, Kd] = ["ReadableStream", "Request", "Response", "Headers"].map(He), Gd = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
48
|
-
function
|
|
48
|
+
function dn(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
49
49
|
if (e === null || typeof e > "u")
|
|
50
50
|
return;
|
|
51
51
|
let r, o;
|
|
52
|
-
if (typeof e != "object" && (e = [e]),
|
|
52
|
+
if (typeof e != "object" && (e = [e]), Ut(e))
|
|
53
53
|
for (r = 0, o = e.length; r < o; r++)
|
|
54
54
|
t.call(null, e[r], r, e);
|
|
55
55
|
else {
|
|
56
|
-
if (
|
|
56
|
+
if (ln(e))
|
|
57
57
|
return;
|
|
58
58
|
const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), a = s.length;
|
|
59
59
|
let i;
|
|
@@ -61,8 +61,8 @@ function un(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
61
61
|
i = s[r], t.call(null, e[i], i, e);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
if (
|
|
64
|
+
function Oa(e, t) {
|
|
65
|
+
if (ln(e))
|
|
66
66
|
return null;
|
|
67
67
|
t = t.toLowerCase();
|
|
68
68
|
const n = Object.keys(e);
|
|
@@ -72,18 +72,18 @@ function ka(e, t) {
|
|
|
72
72
|
return o;
|
|
73
73
|
return null;
|
|
74
74
|
}
|
|
75
|
-
const pt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
75
|
+
const pt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ka = (e) => !Dt(e) && e !== pt;
|
|
76
76
|
function ao() {
|
|
77
|
-
const { caseless: e, skipUndefined: t } =
|
|
78
|
-
const a = e &&
|
|
79
|
-
|
|
77
|
+
const { caseless: e, skipUndefined: t } = ka(this) && this || {}, n = {}, r = (o, s) => {
|
|
78
|
+
const a = e && Oa(n, s) || s;
|
|
79
|
+
_n(n[a]) && _n(o) ? n[a] = ao(n[a], o) : _n(o) ? n[a] = ao({}, o) : Ut(o) ? n[a] = o.slice() : (!t || !Dt(o)) && (n[a] = o);
|
|
80
80
|
};
|
|
81
81
|
for (let o = 0, s = arguments.length; o < s; o++)
|
|
82
|
-
arguments[o] &&
|
|
82
|
+
arguments[o] && dn(arguments[o], r);
|
|
83
83
|
return n;
|
|
84
84
|
}
|
|
85
|
-
const qd = (e, t, n, { allOwnKeys: r } = {}) => (
|
|
86
|
-
n && Re(o) ? e[s] =
|
|
85
|
+
const qd = (e, t, n, { allOwnKeys: r } = {}) => (dn(t, (o, s) => {
|
|
86
|
+
n && Re(o) ? e[s] = Aa(o, n) : e[s] = o;
|
|
87
87
|
}, { allOwnKeys: r }), e), Xd = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Yd = (e, t, n, r) => {
|
|
88
88
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
89
89
|
value: t.prototype
|
|
@@ -104,15 +104,15 @@ const qd = (e, t, n, { allOwnKeys: r } = {}) => (un(t, (o, s) => {
|
|
|
104
104
|
return r !== -1 && r === n;
|
|
105
105
|
}, Qd = (e) => {
|
|
106
106
|
if (!e) return null;
|
|
107
|
-
if (
|
|
107
|
+
if (Ut(e)) return e;
|
|
108
108
|
let t = e.length;
|
|
109
|
-
if (!
|
|
109
|
+
if (!_a(t)) return null;
|
|
110
110
|
const n = new Array(t);
|
|
111
111
|
for (; t-- > 0; )
|
|
112
112
|
n[t] = e[t];
|
|
113
113
|
return n;
|
|
114
114
|
}, ef = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Mo(Uint8Array)), tf = (e, t) => {
|
|
115
|
-
const r = (e && e[
|
|
115
|
+
const r = (e && e[ar]).call(e);
|
|
116
116
|
let o;
|
|
117
117
|
for (; (o = r.next()) && !o.done; ) {
|
|
118
118
|
const s = o.value;
|
|
@@ -129,14 +129,14 @@ const qd = (e, t, n, { allOwnKeys: r } = {}) => (un(t, (o, s) => {
|
|
|
129
129
|
function(n, r, o) {
|
|
130
130
|
return r.toUpperCase() + o;
|
|
131
131
|
}
|
|
132
|
-
), Ns = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), sf = He("RegExp"),
|
|
132
|
+
), Ns = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), sf = He("RegExp"), Ma = (e, t) => {
|
|
133
133
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
134
|
-
|
|
134
|
+
dn(n, (o, s) => {
|
|
135
135
|
let a;
|
|
136
136
|
(a = t(o, s, e)) !== !1 && (r[s] = a || o);
|
|
137
137
|
}), Object.defineProperties(e, r);
|
|
138
138
|
}, af = (e) => {
|
|
139
|
-
|
|
139
|
+
Ma(e, (t, n) => {
|
|
140
140
|
if (Re(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
141
141
|
return !1;
|
|
142
142
|
const r = e[n];
|
|
@@ -156,55 +156,55 @@ const qd = (e, t, n, { allOwnKeys: r } = {}) => (un(t, (o, s) => {
|
|
|
156
156
|
n[s] = !0;
|
|
157
157
|
});
|
|
158
158
|
};
|
|
159
|
-
return
|
|
159
|
+
return Ut(e) ? r(e) : r(String(e).split(t)), n;
|
|
160
160
|
}, lf = () => {
|
|
161
161
|
}, uf = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
162
162
|
function df(e) {
|
|
163
|
-
return !!(e && Re(e.append) && e[
|
|
163
|
+
return !!(e && Re(e.append) && e[Pa] === "FormData" && e[ar]);
|
|
164
164
|
}
|
|
165
165
|
const ff = (e) => {
|
|
166
166
|
const t = new Array(10), n = (r, o) => {
|
|
167
|
-
if (
|
|
167
|
+
if (un(r)) {
|
|
168
168
|
if (t.indexOf(r) >= 0)
|
|
169
169
|
return;
|
|
170
|
-
if (
|
|
170
|
+
if (ln(r))
|
|
171
171
|
return r;
|
|
172
172
|
if (!("toJSON" in r)) {
|
|
173
173
|
t[o] = r;
|
|
174
|
-
const s =
|
|
175
|
-
return
|
|
174
|
+
const s = Ut(r) ? [] : {};
|
|
175
|
+
return dn(r, (a, i) => {
|
|
176
176
|
const l = n(a, o + 1);
|
|
177
|
-
!
|
|
177
|
+
!Dt(l) && (s[i] = l);
|
|
178
178
|
}), t[o] = void 0, s;
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
return r;
|
|
182
182
|
};
|
|
183
183
|
return n(e, 0);
|
|
184
|
-
}, pf = He("AsyncFunction"), hf = (e) => e && (
|
|
184
|
+
}, pf = He("AsyncFunction"), hf = (e) => e && (un(e) || Re(e)) && Re(e.then) && Re(e.catch), Da = ((e, t) => e ? setImmediate : t ? ((n, r) => (pt.addEventListener("message", ({ source: o, data: s }) => {
|
|
185
185
|
o === pt && s === n && r.length && r.shift()();
|
|
186
186
|
}, !1), (o) => {
|
|
187
187
|
r.push(o), pt.postMessage(n, "*");
|
|
188
188
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
189
189
|
typeof setImmediate == "function",
|
|
190
190
|
Re(pt.postMessage)
|
|
191
|
-
), mf = typeof queueMicrotask < "u" ? queueMicrotask.bind(pt) : typeof process < "u" && process.nextTick ||
|
|
192
|
-
isArray:
|
|
193
|
-
isArrayBuffer:
|
|
194
|
-
isBuffer:
|
|
191
|
+
), mf = typeof queueMicrotask < "u" ? queueMicrotask.bind(pt) : typeof process < "u" && process.nextTick || Da, gf = (e) => e != null && Re(e[ar]), S = {
|
|
192
|
+
isArray: Ut,
|
|
193
|
+
isArrayBuffer: Ia,
|
|
194
|
+
isBuffer: ln,
|
|
195
195
|
isFormData: Hd,
|
|
196
196
|
isArrayBufferView: Od,
|
|
197
197
|
isString: kd,
|
|
198
|
-
isNumber:
|
|
198
|
+
isNumber: _a,
|
|
199
199
|
isBoolean: Md,
|
|
200
|
-
isObject:
|
|
201
|
-
isPlainObject:
|
|
200
|
+
isObject: un,
|
|
201
|
+
isPlainObject: _n,
|
|
202
202
|
isEmptyObject: Dd,
|
|
203
203
|
isReadableStream: Wd,
|
|
204
204
|
isRequest: jd,
|
|
205
205
|
isResponse: Vd,
|
|
206
206
|
isHeaders: Kd,
|
|
207
|
-
isUndefined:
|
|
207
|
+
isUndefined: Dt,
|
|
208
208
|
isDate: Ld,
|
|
209
209
|
isFile: Fd,
|
|
210
210
|
isBlob: $d,
|
|
@@ -214,14 +214,14 @@ const ff = (e) => {
|
|
|
214
214
|
isURLSearchParams: zd,
|
|
215
215
|
isTypedArray: ef,
|
|
216
216
|
isFileList: Bd,
|
|
217
|
-
forEach:
|
|
217
|
+
forEach: dn,
|
|
218
218
|
merge: ao,
|
|
219
219
|
extend: qd,
|
|
220
220
|
trim: Gd,
|
|
221
221
|
stripBOM: Xd,
|
|
222
222
|
inherits: Yd,
|
|
223
223
|
toFlatObject: Jd,
|
|
224
|
-
kindOf:
|
|
224
|
+
kindOf: ir,
|
|
225
225
|
kindOfTest: He,
|
|
226
226
|
endsWith: Zd,
|
|
227
227
|
toArray: Qd,
|
|
@@ -231,20 +231,20 @@ const ff = (e) => {
|
|
|
231
231
|
hasOwnProperty: Ns,
|
|
232
232
|
hasOwnProp: Ns,
|
|
233
233
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
234
|
-
reduceDescriptors:
|
|
234
|
+
reduceDescriptors: Ma,
|
|
235
235
|
freezeMethods: af,
|
|
236
236
|
toObjectSet: cf,
|
|
237
237
|
toCamelCase: of,
|
|
238
238
|
noop: lf,
|
|
239
239
|
toFiniteNumber: uf,
|
|
240
|
-
findKey:
|
|
240
|
+
findKey: Oa,
|
|
241
241
|
global: pt,
|
|
242
|
-
isContextDefined:
|
|
242
|
+
isContextDefined: ka,
|
|
243
243
|
isSpecCompliantForm: df,
|
|
244
244
|
toJSONObject: ff,
|
|
245
245
|
isAsyncFn: pf,
|
|
246
246
|
isThenable: hf,
|
|
247
|
-
setImmediate:
|
|
247
|
+
setImmediate: Da,
|
|
248
248
|
asap: mf,
|
|
249
249
|
isIterable: gf
|
|
250
250
|
};
|
|
@@ -272,7 +272,7 @@ S.inherits(ne, Error, {
|
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
});
|
|
275
|
-
const
|
|
275
|
+
const La = ne.prototype, Fa = {};
|
|
276
276
|
[
|
|
277
277
|
"ERR_BAD_OPTION_VALUE",
|
|
278
278
|
"ERR_BAD_OPTION",
|
|
@@ -288,12 +288,12 @@ const Fa = ne.prototype, $a = {};
|
|
|
288
288
|
"ERR_INVALID_URL"
|
|
289
289
|
// eslint-disable-next-line func-names
|
|
290
290
|
].forEach((e) => {
|
|
291
|
-
|
|
291
|
+
Fa[e] = { value: e };
|
|
292
292
|
});
|
|
293
|
-
Object.defineProperties(ne,
|
|
294
|
-
Object.defineProperty(
|
|
293
|
+
Object.defineProperties(ne, Fa);
|
|
294
|
+
Object.defineProperty(La, "isAxiosError", { value: !0 });
|
|
295
295
|
ne.from = (e, t, n, r, o, s) => {
|
|
296
|
-
const a = Object.create(
|
|
296
|
+
const a = Object.create(La);
|
|
297
297
|
S.toFlatObject(e, a, function(d) {
|
|
298
298
|
return d !== Error.prototype;
|
|
299
299
|
}, (f) => f !== "isAxiosError");
|
|
@@ -304,12 +304,12 @@ const bf = null;
|
|
|
304
304
|
function io(e) {
|
|
305
305
|
return S.isPlainObject(e) || S.isArray(e);
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function $a(e) {
|
|
308
308
|
return S.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
309
309
|
}
|
|
310
310
|
function Rs(e, t, n) {
|
|
311
311
|
return e ? e.concat(t).map(function(o, s) {
|
|
312
|
-
return o =
|
|
312
|
+
return o = $a(o), !n && s ? "[" + o + "]" : o;
|
|
313
313
|
}).join(n ? "." : "") : t;
|
|
314
314
|
}
|
|
315
315
|
function vf(e) {
|
|
@@ -318,7 +318,7 @@ function vf(e) {
|
|
|
318
318
|
const wf = S.toFlatObject(S, {}, null, function(t) {
|
|
319
319
|
return /^is[A-Z]/.test(t);
|
|
320
320
|
});
|
|
321
|
-
function
|
|
321
|
+
function lr(e, t, n) {
|
|
322
322
|
if (!S.isObject(e))
|
|
323
323
|
throw new TypeError("target must be an object");
|
|
324
324
|
t = t || new FormData(), n = S.toFlatObject(n, {
|
|
@@ -347,7 +347,7 @@ function cr(e, t, n) {
|
|
|
347
347
|
if (S.endsWith(h, "{}"))
|
|
348
348
|
h = r ? h : h.slice(0, -2), g = JSON.stringify(g);
|
|
349
349
|
else if (S.isArray(g) && vf(g) || (S.isFileList(g) || S.endsWith(h, "[]")) && (w = S.toArray(g)))
|
|
350
|
-
return h =
|
|
350
|
+
return h = $a(h), w.forEach(function(y, C) {
|
|
351
351
|
!(S.isUndefined(y) || y === null) && t.append(
|
|
352
352
|
// eslint-disable-next-line no-nested-ternary
|
|
353
353
|
a === !0 ? Rs([h], C, s) : a === null ? h : h + "[]",
|
|
@@ -396,13 +396,13 @@ function Ts(e) {
|
|
|
396
396
|
});
|
|
397
397
|
}
|
|
398
398
|
function Do(e, t) {
|
|
399
|
-
this._pairs = [], e &&
|
|
399
|
+
this._pairs = [], e && lr(e, this, t);
|
|
400
400
|
}
|
|
401
|
-
const
|
|
402
|
-
|
|
401
|
+
const Ba = Do.prototype;
|
|
402
|
+
Ba.append = function(t, n) {
|
|
403
403
|
this._pairs.push([t, n]);
|
|
404
404
|
};
|
|
405
|
-
|
|
405
|
+
Ba.toString = function(t) {
|
|
406
406
|
const n = t ? function(r) {
|
|
407
407
|
return t.call(this, r, Ts);
|
|
408
408
|
} : Ts;
|
|
@@ -413,7 +413,7 @@ Ua.toString = function(t) {
|
|
|
413
413
|
function yf(e) {
|
|
414
414
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function Ua(e, t, n) {
|
|
417
417
|
if (!t)
|
|
418
418
|
return e;
|
|
419
419
|
const r = n && n.encode || yf;
|
|
@@ -482,7 +482,7 @@ class As {
|
|
|
482
482
|
});
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
-
const
|
|
485
|
+
const Ha = {
|
|
486
486
|
silentJSONParsing: !0,
|
|
487
487
|
forcedJSONParsing: !0,
|
|
488
488
|
clarifyTimeoutError: !1
|
|
@@ -507,7 +507,7 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Tf
|
|
|
507
507
|
...Ef
|
|
508
508
|
};
|
|
509
509
|
function Pf(e, t) {
|
|
510
|
-
return
|
|
510
|
+
return lr(e, new xe.classes.URLSearchParams(), {
|
|
511
511
|
visitor: function(n, r, o, s) {
|
|
512
512
|
return xe.isNode && S.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
513
513
|
},
|
|
@@ -526,7 +526,7 @@ function _f(e) {
|
|
|
526
526
|
s = n[r], t[s] = e[s];
|
|
527
527
|
return t;
|
|
528
528
|
}
|
|
529
|
-
function
|
|
529
|
+
function za(e) {
|
|
530
530
|
function t(n, r, o, s) {
|
|
531
531
|
let a = n[s++];
|
|
532
532
|
if (a === "__proto__") return !0;
|
|
@@ -551,13 +551,13 @@ function Of(e, t, n) {
|
|
|
551
551
|
}
|
|
552
552
|
return (n || JSON.stringify)(e);
|
|
553
553
|
}
|
|
554
|
-
const
|
|
555
|
-
transitional:
|
|
554
|
+
const fn = {
|
|
555
|
+
transitional: Ha,
|
|
556
556
|
adapter: ["xhr", "http", "fetch"],
|
|
557
557
|
transformRequest: [function(t, n) {
|
|
558
558
|
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = S.isObject(t);
|
|
559
559
|
if (s && S.isHTMLForm(t) && (t = new FormData(t)), S.isFormData(t))
|
|
560
|
-
return o ? JSON.stringify(
|
|
560
|
+
return o ? JSON.stringify(za(t)) : t;
|
|
561
561
|
if (S.isArrayBuffer(t) || S.isBuffer(t) || S.isStream(t) || S.isFile(t) || S.isBlob(t) || S.isReadableStream(t))
|
|
562
562
|
return t;
|
|
563
563
|
if (S.isArrayBufferView(t))
|
|
@@ -570,7 +570,7 @@ const dn = {
|
|
|
570
570
|
return Pf(t, this.formSerializer).toString();
|
|
571
571
|
if ((i = S.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
572
572
|
const l = this.env && this.env.FormData;
|
|
573
|
-
return
|
|
573
|
+
return lr(
|
|
574
574
|
i ? { "files[]": t } : t,
|
|
575
575
|
l && new l(),
|
|
576
576
|
this.formSerializer
|
|
@@ -580,7 +580,7 @@ const dn = {
|
|
|
580
580
|
return s || o ? (n.setContentType("application/json", !1), Of(t)) : t;
|
|
581
581
|
}],
|
|
582
582
|
transformResponse: [function(t) {
|
|
583
|
-
const n = this.transitional ||
|
|
583
|
+
const n = this.transitional || fn.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
584
584
|
if (S.isResponse(t) || S.isReadableStream(t))
|
|
585
585
|
return t;
|
|
586
586
|
if (t && S.isString(t) && (r && !this.responseType || o)) {
|
|
@@ -618,7 +618,7 @@ const dn = {
|
|
|
618
618
|
}
|
|
619
619
|
};
|
|
620
620
|
S.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
621
|
-
|
|
621
|
+
fn.headers[e] = {};
|
|
622
622
|
});
|
|
623
623
|
const kf = S.toObjectSet([
|
|
624
624
|
"age",
|
|
@@ -646,11 +646,11 @@ const kf = S.toObjectSet([
|
|
|
646
646
|
o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), r = a.substring(o + 1).trim(), !(!n || t[n] && kf[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
647
647
|
}), t;
|
|
648
648
|
}, Ps = Symbol("internals");
|
|
649
|
-
function
|
|
649
|
+
function Gt(e) {
|
|
650
650
|
return e && String(e).trim().toLowerCase();
|
|
651
651
|
}
|
|
652
|
-
function
|
|
653
|
-
return e === !1 || e == null ? e : S.isArray(e) ? e.map(
|
|
652
|
+
function On(e) {
|
|
653
|
+
return e === !1 || e == null ? e : S.isArray(e) ? e.map(On) : String(e);
|
|
654
654
|
}
|
|
655
655
|
function Df(e) {
|
|
656
656
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -660,7 +660,7 @@ function Df(e) {
|
|
|
660
660
|
return t;
|
|
661
661
|
}
|
|
662
662
|
const Lf = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
663
|
-
function
|
|
663
|
+
function Br(e, t, n, r, o) {
|
|
664
664
|
if (S.isFunction(r))
|
|
665
665
|
return r.call(this, t, n);
|
|
666
666
|
if (o && (t = n), !!S.isString(t)) {
|
|
@@ -691,11 +691,11 @@ let Te = class {
|
|
|
691
691
|
set(t, n, r) {
|
|
692
692
|
const o = this;
|
|
693
693
|
function s(i, l, f) {
|
|
694
|
-
const d =
|
|
694
|
+
const d = Gt(l);
|
|
695
695
|
if (!d)
|
|
696
696
|
throw new Error("header name must be a non-empty string");
|
|
697
697
|
const p = S.findKey(o, d);
|
|
698
|
-
(!p || o[p] === void 0 || f === !0 || f === void 0 && o[p] !== !1) && (o[p || l] =
|
|
698
|
+
(!p || o[p] === void 0 || f === !0 || f === void 0 && o[p] !== !1) && (o[p || l] = On(i));
|
|
699
699
|
}
|
|
700
700
|
const a = (i, l) => S.forEach(i, (f, d) => s(f, d, l));
|
|
701
701
|
if (S.isPlainObject(t) || t instanceof this.constructor)
|
|
@@ -715,7 +715,7 @@ let Te = class {
|
|
|
715
715
|
return this;
|
|
716
716
|
}
|
|
717
717
|
get(t, n) {
|
|
718
|
-
if (t =
|
|
718
|
+
if (t = Gt(t), t) {
|
|
719
719
|
const r = S.findKey(this, t);
|
|
720
720
|
if (r) {
|
|
721
721
|
const o = this[r];
|
|
@@ -732,9 +732,9 @@ let Te = class {
|
|
|
732
732
|
}
|
|
733
733
|
}
|
|
734
734
|
has(t, n) {
|
|
735
|
-
if (t =
|
|
735
|
+
if (t = Gt(t), t) {
|
|
736
736
|
const r = S.findKey(this, t);
|
|
737
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
737
|
+
return !!(r && this[r] !== void 0 && (!n || Br(this, this[r], r, n)));
|
|
738
738
|
}
|
|
739
739
|
return !1;
|
|
740
740
|
}
|
|
@@ -742,9 +742,9 @@ let Te = class {
|
|
|
742
742
|
const r = this;
|
|
743
743
|
let o = !1;
|
|
744
744
|
function s(a) {
|
|
745
|
-
if (a =
|
|
745
|
+
if (a = Gt(a), a) {
|
|
746
746
|
const i = S.findKey(r, a);
|
|
747
|
-
i && (!n ||
|
|
747
|
+
i && (!n || Br(r, r[i], i, n)) && (delete r[i], o = !0);
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
750
|
return S.isArray(t) ? t.forEach(s) : s(t), o;
|
|
@@ -754,7 +754,7 @@ let Te = class {
|
|
|
754
754
|
let r = n.length, o = !1;
|
|
755
755
|
for (; r--; ) {
|
|
756
756
|
const s = n[r];
|
|
757
|
-
(!t ||
|
|
757
|
+
(!t || Br(this, this[s], s, t, !0)) && (delete this[s], o = !0);
|
|
758
758
|
}
|
|
759
759
|
return o;
|
|
760
760
|
}
|
|
@@ -763,11 +763,11 @@ let Te = class {
|
|
|
763
763
|
return S.forEach(this, (o, s) => {
|
|
764
764
|
const a = S.findKey(r, s);
|
|
765
765
|
if (a) {
|
|
766
|
-
n[a] =
|
|
766
|
+
n[a] = On(o), delete n[s];
|
|
767
767
|
return;
|
|
768
768
|
}
|
|
769
769
|
const i = t ? Ff(s) : String(s).trim();
|
|
770
|
-
i !== s && delete n[s], n[i] =
|
|
770
|
+
i !== s && delete n[s], n[i] = On(o), r[i] = !0;
|
|
771
771
|
}), this;
|
|
772
772
|
}
|
|
773
773
|
concat(...t) {
|
|
@@ -804,7 +804,7 @@ let Te = class {
|
|
|
804
804
|
accessors: {}
|
|
805
805
|
}).accessors, o = this.prototype;
|
|
806
806
|
function s(a) {
|
|
807
|
-
const i =
|
|
807
|
+
const i = Gt(a);
|
|
808
808
|
r[i] || ($f(o, a), r[i] = !0);
|
|
809
809
|
}
|
|
810
810
|
return S.isArray(t) ? t.forEach(s) : s(t), this;
|
|
@@ -821,23 +821,23 @@ S.reduceDescriptors(Te.prototype, ({ value: e }, t) => {
|
|
|
821
821
|
};
|
|
822
822
|
});
|
|
823
823
|
S.freezeMethods(Te);
|
|
824
|
-
function
|
|
825
|
-
const n = this ||
|
|
824
|
+
function Ur(e, t) {
|
|
825
|
+
const n = this || fn, r = t || n, o = Te.from(r.headers);
|
|
826
826
|
let s = r.data;
|
|
827
827
|
return S.forEach(e, function(i) {
|
|
828
828
|
s = i.call(n, s, o.normalize(), t ? t.status : void 0);
|
|
829
829
|
}), o.normalize(), s;
|
|
830
830
|
}
|
|
831
|
-
function
|
|
831
|
+
function Wa(e) {
|
|
832
832
|
return !!(e && e.__CANCEL__);
|
|
833
833
|
}
|
|
834
|
-
function
|
|
834
|
+
function Ht(e, t, n) {
|
|
835
835
|
ne.call(this, e ?? "canceled", ne.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
836
836
|
}
|
|
837
|
-
S.inherits(
|
|
837
|
+
S.inherits(Ht, ne, {
|
|
838
838
|
__CANCEL__: !0
|
|
839
839
|
});
|
|
840
|
-
function
|
|
840
|
+
function ja(e, t, n) {
|
|
841
841
|
const r = n.config.validateStatus;
|
|
842
842
|
!n.status || !r || r(n.status) ? e(n) : t(new ne(
|
|
843
843
|
"Request failed with status code " + n.status,
|
|
@@ -879,7 +879,7 @@ function Hf(e, t) {
|
|
|
879
879
|
}, r - p)));
|
|
880
880
|
}, () => o && a(o)];
|
|
881
881
|
}
|
|
882
|
-
const
|
|
882
|
+
const Kn = (e, t, n = 3) => {
|
|
883
883
|
let r = 0;
|
|
884
884
|
const o = Uf(50, 250);
|
|
885
885
|
return Hf((s) => {
|
|
@@ -941,7 +941,7 @@ function jf(e) {
|
|
|
941
941
|
function Vf(e, t) {
|
|
942
942
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
943
943
|
}
|
|
944
|
-
function
|
|
944
|
+
function Va(e, t, n) {
|
|
945
945
|
let r = !jf(t);
|
|
946
946
|
return e && (r || n == !1) ? Vf(e, t) : t;
|
|
947
947
|
}
|
|
@@ -1010,10 +1010,10 @@ function mt(e, t) {
|
|
|
1010
1010
|
S.isUndefined(m) && p !== i || (n[d] = m);
|
|
1011
1011
|
}), n;
|
|
1012
1012
|
}
|
|
1013
|
-
const
|
|
1013
|
+
const Ka = (e) => {
|
|
1014
1014
|
const t = mt({}, e);
|
|
1015
1015
|
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: a, auth: i } = t;
|
|
1016
|
-
if (t.headers = a = Te.from(a), t.url =
|
|
1016
|
+
if (t.headers = a = Te.from(a), t.url = Ua(Va(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), i && a.set(
|
|
1017
1017
|
"Authorization",
|
|
1018
1018
|
"Basic " + btoa((i.username || "") + ":" + (i.password ? unescape(encodeURIComponent(i.password)) : ""))
|
|
1019
1019
|
), S.isFormData(n)) {
|
|
@@ -1033,7 +1033,7 @@ const Ga = (e) => {
|
|
|
1033
1033
|
return t;
|
|
1034
1034
|
}, Kf = typeof XMLHttpRequest < "u", Gf = Kf && function(e) {
|
|
1035
1035
|
return new Promise(function(n, r) {
|
|
1036
|
-
const o =
|
|
1036
|
+
const o = Ka(e);
|
|
1037
1037
|
let s = o.data;
|
|
1038
1038
|
const a = Te.from(o.headers).normalize();
|
|
1039
1039
|
let { responseType: i, onUploadProgress: l, onDownloadProgress: f } = o, d, p, m, v, g;
|
|
@@ -1055,7 +1055,7 @@ const Ga = (e) => {
|
|
|
1055
1055
|
config: e,
|
|
1056
1056
|
request: b
|
|
1057
1057
|
};
|
|
1058
|
-
|
|
1058
|
+
ja(function(N) {
|
|
1059
1059
|
n(N), h();
|
|
1060
1060
|
}, function(N) {
|
|
1061
1061
|
r(N), h();
|
|
@@ -1070,7 +1070,7 @@ const Ga = (e) => {
|
|
|
1070
1070
|
_.event = C || null, r(_), b = null;
|
|
1071
1071
|
}, b.ontimeout = function() {
|
|
1072
1072
|
let C = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1073
|
-
const R = o.transitional ||
|
|
1073
|
+
const R = o.transitional || Ha;
|
|
1074
1074
|
o.timeoutErrorMessage && (C = o.timeoutErrorMessage), r(new ne(
|
|
1075
1075
|
C,
|
|
1076
1076
|
R.clarifyTimeoutError ? ne.ETIMEDOUT : ne.ECONNABORTED,
|
|
@@ -1079,8 +1079,8 @@ const Ga = (e) => {
|
|
|
1079
1079
|
)), b = null;
|
|
1080
1080
|
}, s === void 0 && a.setContentType(null), "setRequestHeader" in b && S.forEach(a.toJSON(), function(C, R) {
|
|
1081
1081
|
b.setRequestHeader(R, C);
|
|
1082
|
-
}), S.isUndefined(o.withCredentials) || (b.withCredentials = !!o.withCredentials), i && i !== "json" && (b.responseType = o.responseType), f && ([m, g] =
|
|
1083
|
-
b && (r(!y || y.type ? new
|
|
1082
|
+
}), S.isUndefined(o.withCredentials) || (b.withCredentials = !!o.withCredentials), i && i !== "json" && (b.responseType = o.responseType), f && ([m, g] = Kn(f, !0), b.addEventListener("progress", m)), l && b.upload && ([p, v] = Kn(l), b.upload.addEventListener("progress", p), b.upload.addEventListener("loadend", v)), (o.cancelToken || o.signal) && (d = (y) => {
|
|
1083
|
+
b && (r(!y || y.type ? new Ht(null, e, b) : y), b.abort(), b = null);
|
|
1084
1084
|
}, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
|
|
1085
1085
|
const x = Bf(o.url);
|
|
1086
1086
|
if (x && xe.protocols.indexOf(x) === -1) {
|
|
@@ -1097,7 +1097,7 @@ const Ga = (e) => {
|
|
|
1097
1097
|
if (!o) {
|
|
1098
1098
|
o = !0, i();
|
|
1099
1099
|
const d = f instanceof Error ? f : this.reason;
|
|
1100
|
-
r.abort(d instanceof ne ? d : new
|
|
1100
|
+
r.abort(d instanceof ne ? d : new Ht(d instanceof Error ? d.message : d));
|
|
1101
1101
|
}
|
|
1102
1102
|
};
|
|
1103
1103
|
let a = t && setTimeout(() => {
|
|
@@ -1169,7 +1169,7 @@ const Ga = (e) => {
|
|
|
1169
1169
|
}, {
|
|
1170
1170
|
highWaterMark: 2
|
|
1171
1171
|
});
|
|
1172
|
-
}, Ms = 64 * 1024, { isFunction:
|
|
1172
|
+
}, Ms = 64 * 1024, { isFunction: Sn } = S, Zf = (({ Request: e, Response: t }) => ({
|
|
1173
1173
|
Request: e,
|
|
1174
1174
|
Response: t
|
|
1175
1175
|
}))(S.global), {
|
|
@@ -1185,10 +1185,10 @@ const Ga = (e) => {
|
|
|
1185
1185
|
e = S.merge.call({
|
|
1186
1186
|
skipUndefined: !0
|
|
1187
1187
|
}, Zf, e);
|
|
1188
|
-
const { fetch: t, Request: n, Response: r } = e, o = t ?
|
|
1188
|
+
const { fetch: t, Request: n, Response: r } = e, o = t ? Sn(t) : typeof fetch == "function", s = Sn(n), a = Sn(r);
|
|
1189
1189
|
if (!o)
|
|
1190
1190
|
return !1;
|
|
1191
|
-
const i = o &&
|
|
1191
|
+
const i = o && Sn(Ds), l = o && (typeof Ls == "function" ? /* @__PURE__ */ ((g) => (h) => g.encode(h))(new Ls()) : async (g) => new Uint8Array(await new n(g).arrayBuffer())), f = s && i && Fs(() => {
|
|
1192
1192
|
let g = !1;
|
|
1193
1193
|
const h = new n(xe.origin, {
|
|
1194
1194
|
body: new Ds(),
|
|
@@ -1241,7 +1241,7 @@ const Ga = (e) => {
|
|
|
1241
1241
|
headers: k,
|
|
1242
1242
|
withCredentials: L = "same-origin",
|
|
1243
1243
|
fetchOptions: P
|
|
1244
|
-
} =
|
|
1244
|
+
} = Ka(g), $ = t || fetch;
|
|
1245
1245
|
N = N ? (N + "").toLowerCase() : "text";
|
|
1246
1246
|
let K = qf([x, y && y.toAbortSignal()], C), B = null;
|
|
1247
1247
|
const M = K && K.unsubscribe && (() => {
|
|
@@ -1258,7 +1258,7 @@ const Ga = (e) => {
|
|
|
1258
1258
|
if (S.isFormData(w) && (oe = q.headers.get("content-type")) && k.setContentType(oe), q.body) {
|
|
1259
1259
|
const [F, j] = Is(
|
|
1260
1260
|
H,
|
|
1261
|
-
|
|
1261
|
+
Kn(_s(_))
|
|
1262
1262
|
);
|
|
1263
1263
|
w = ks(q.body, Ms, F, j);
|
|
1264
1264
|
}
|
|
@@ -1283,7 +1283,7 @@ const Ga = (e) => {
|
|
|
1283
1283
|
});
|
|
1284
1284
|
const oe = S.toFiniteNumber(D.headers.get("content-length")), [F, j] = R && Is(
|
|
1285
1285
|
oe,
|
|
1286
|
-
|
|
1286
|
+
Kn(_s(R), !0)
|
|
1287
1287
|
) || [];
|
|
1288
1288
|
D = new r(
|
|
1289
1289
|
ks(D.body, Ms, F, () => {
|
|
@@ -1295,7 +1295,7 @@ const Ga = (e) => {
|
|
|
1295
1295
|
N = N || "text";
|
|
1296
1296
|
let Q = await p[S.findKey(p, N) || "text"](D, g);
|
|
1297
1297
|
return !T && M && M(), await new Promise((q, oe) => {
|
|
1298
|
-
|
|
1298
|
+
ja(q, oe, {
|
|
1299
1299
|
data: Q,
|
|
1300
1300
|
headers: Te.from(D.headers),
|
|
1301
1301
|
status: D.status,
|
|
@@ -1313,7 +1313,7 @@ const Ga = (e) => {
|
|
|
1313
1313
|
) : ne.from(O, O && O.code, g, B);
|
|
1314
1314
|
}
|
|
1315
1315
|
};
|
|
1316
|
-
}, ep = /* @__PURE__ */ new Map(),
|
|
1316
|
+
}, ep = /* @__PURE__ */ new Map(), Ga = (e) => {
|
|
1317
1317
|
let t = e ? e.env : {};
|
|
1318
1318
|
const { fetch: n, Request: r, Response: o } = t, s = [
|
|
1319
1319
|
r,
|
|
@@ -1325,12 +1325,12 @@ const Ga = (e) => {
|
|
|
1325
1325
|
l = s[i], f = d.get(l), f === void 0 && d.set(l, f = i ? /* @__PURE__ */ new Map() : Qf(t)), d = f;
|
|
1326
1326
|
return f;
|
|
1327
1327
|
};
|
|
1328
|
-
|
|
1328
|
+
Ga();
|
|
1329
1329
|
const lo = {
|
|
1330
1330
|
http: bf,
|
|
1331
1331
|
xhr: Gf,
|
|
1332
1332
|
fetch: {
|
|
1333
|
-
get:
|
|
1333
|
+
get: Ga
|
|
1334
1334
|
}
|
|
1335
1335
|
};
|
|
1336
1336
|
S.forEach(lo, (e, t) => {
|
|
@@ -1342,7 +1342,7 @@ S.forEach(lo, (e, t) => {
|
|
|
1342
1342
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1343
1343
|
}
|
|
1344
1344
|
});
|
|
1345
|
-
const $s = (e) => `- ${e}`, tp = (e) => S.isFunction(e) || e === null || e === !1,
|
|
1345
|
+
const $s = (e) => `- ${e}`, tp = (e) => S.isFunction(e) || e === null || e === !1, qa = {
|
|
1346
1346
|
getAdapter: (e, t) => {
|
|
1347
1347
|
e = S.isArray(e) ? e : [e];
|
|
1348
1348
|
const { length: n } = e;
|
|
@@ -1373,38 +1373,38 @@ const $s = (e) => `- ${e}`, tp = (e) => S.isFunction(e) || e === null || e === !
|
|
|
1373
1373
|
},
|
|
1374
1374
|
adapters: lo
|
|
1375
1375
|
};
|
|
1376
|
-
function
|
|
1376
|
+
function Hr(e) {
|
|
1377
1377
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1378
|
-
throw new
|
|
1378
|
+
throw new Ht(null, e);
|
|
1379
1379
|
}
|
|
1380
1380
|
function Bs(e) {
|
|
1381
|
-
return
|
|
1381
|
+
return Hr(e), e.headers = Te.from(e.headers), e.data = Ur.call(
|
|
1382
1382
|
e,
|
|
1383
1383
|
e.transformRequest
|
|
1384
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1385
|
-
return
|
|
1384
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), qa.getAdapter(e.adapter || fn.adapter, e)(e).then(function(r) {
|
|
1385
|
+
return Hr(e), r.data = Ur.call(
|
|
1386
1386
|
e,
|
|
1387
1387
|
e.transformResponse,
|
|
1388
1388
|
r
|
|
1389
1389
|
), r.headers = Te.from(r.headers), r;
|
|
1390
1390
|
}, function(r) {
|
|
1391
|
-
return
|
|
1391
|
+
return Wa(r) || (Hr(e), r && r.response && (r.response.data = Ur.call(
|
|
1392
1392
|
e,
|
|
1393
1393
|
e.transformResponse,
|
|
1394
1394
|
r.response
|
|
1395
1395
|
), r.response.headers = Te.from(r.response.headers))), Promise.reject(r);
|
|
1396
1396
|
});
|
|
1397
1397
|
}
|
|
1398
|
-
const
|
|
1398
|
+
const Xa = "1.12.2", ur = {};
|
|
1399
1399
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1400
|
-
|
|
1400
|
+
ur[e] = function(r) {
|
|
1401
1401
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1402
1402
|
};
|
|
1403
1403
|
});
|
|
1404
1404
|
const Us = {};
|
|
1405
|
-
|
|
1405
|
+
ur.transitional = function(t, n, r) {
|
|
1406
1406
|
function o(s, a) {
|
|
1407
|
-
return "[Axios v" +
|
|
1407
|
+
return "[Axios v" + Xa + "] Transitional option '" + s + "'" + a + (r ? ". " + r : "");
|
|
1408
1408
|
}
|
|
1409
1409
|
return (s, a, i) => {
|
|
1410
1410
|
if (t === !1)
|
|
@@ -1420,7 +1420,7 @@ lr.transitional = function(t, n, r) {
|
|
|
1420
1420
|
)), t ? t(s, a, i) : !0;
|
|
1421
1421
|
};
|
|
1422
1422
|
};
|
|
1423
|
-
|
|
1423
|
+
ur.spelling = function(t) {
|
|
1424
1424
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1425
1425
|
};
|
|
1426
1426
|
function np(e, t, n) {
|
|
@@ -1440,10 +1440,10 @@ function np(e, t, n) {
|
|
|
1440
1440
|
throw new ne("Unknown option " + s, ne.ERR_BAD_OPTION);
|
|
1441
1441
|
}
|
|
1442
1442
|
}
|
|
1443
|
-
const
|
|
1443
|
+
const kn = {
|
|
1444
1444
|
assertOptions: np,
|
|
1445
|
-
validators:
|
|
1446
|
-
}, je =
|
|
1445
|
+
validators: ur
|
|
1446
|
+
}, je = kn.validators;
|
|
1447
1447
|
let ht = class {
|
|
1448
1448
|
constructor(t) {
|
|
1449
1449
|
this.defaults = t || {}, this.interceptors = {
|
|
@@ -1479,16 +1479,16 @@ let ht = class {
|
|
|
1479
1479
|
_request(t, n) {
|
|
1480
1480
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = mt(this.defaults, n);
|
|
1481
1481
|
const { transitional: r, paramsSerializer: o, headers: s } = n;
|
|
1482
|
-
r !== void 0 &&
|
|
1482
|
+
r !== void 0 && kn.assertOptions(r, {
|
|
1483
1483
|
silentJSONParsing: je.transitional(je.boolean),
|
|
1484
1484
|
forcedJSONParsing: je.transitional(je.boolean),
|
|
1485
1485
|
clarifyTimeoutError: je.transitional(je.boolean)
|
|
1486
1486
|
}, !1), o != null && (S.isFunction(o) ? n.paramsSerializer = {
|
|
1487
1487
|
serialize: o
|
|
1488
|
-
} :
|
|
1488
|
+
} : kn.assertOptions(o, {
|
|
1489
1489
|
encode: je.function,
|
|
1490
1490
|
serialize: je.function
|
|
1491
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1491
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), kn.assertOptions(n, {
|
|
1492
1492
|
baseUrl: je.spelling("baseURL"),
|
|
1493
1493
|
withXsrfToken: je.spelling("withXSRFToken")
|
|
1494
1494
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1540,8 +1540,8 @@ let ht = class {
|
|
|
1540
1540
|
}
|
|
1541
1541
|
getUri(t) {
|
|
1542
1542
|
t = mt(this.defaults, t);
|
|
1543
|
-
const n =
|
|
1544
|
-
return
|
|
1543
|
+
const n = Va(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1544
|
+
return Ua(n, t.params, t.paramsSerializer);
|
|
1545
1545
|
}
|
|
1546
1546
|
};
|
|
1547
1547
|
S.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -1568,7 +1568,7 @@ S.forEach(["post", "put", "patch"], function(t) {
|
|
|
1568
1568
|
}
|
|
1569
1569
|
ht.prototype[t] = n(), ht.prototype[t + "Form"] = n(!0);
|
|
1570
1570
|
});
|
|
1571
|
-
let rp = class
|
|
1571
|
+
let rp = class Ya {
|
|
1572
1572
|
constructor(t) {
|
|
1573
1573
|
if (typeof t != "function")
|
|
1574
1574
|
throw new TypeError("executor must be a function.");
|
|
@@ -1592,7 +1592,7 @@ let rp = class Ja {
|
|
|
1592
1592
|
r.unsubscribe(s);
|
|
1593
1593
|
}, a;
|
|
1594
1594
|
}, t(function(s, a, i) {
|
|
1595
|
-
r.reason || (r.reason = new
|
|
1595
|
+
r.reason || (r.reason = new Ht(s, a, i), n(r.reason));
|
|
1596
1596
|
});
|
|
1597
1597
|
}
|
|
1598
1598
|
/**
|
|
@@ -1634,7 +1634,7 @@ let rp = class Ja {
|
|
|
1634
1634
|
static source() {
|
|
1635
1635
|
let t;
|
|
1636
1636
|
return {
|
|
1637
|
-
token: new
|
|
1637
|
+
token: new Ya(function(o) {
|
|
1638
1638
|
t = o;
|
|
1639
1639
|
}),
|
|
1640
1640
|
cancel: t
|
|
@@ -1717,19 +1717,19 @@ const uo = {
|
|
|
1717
1717
|
Object.entries(uo).forEach(([e, t]) => {
|
|
1718
1718
|
uo[t] = e;
|
|
1719
1719
|
});
|
|
1720
|
-
function
|
|
1721
|
-
const t = new ht(e), n =
|
|
1720
|
+
function Ja(e) {
|
|
1721
|
+
const t = new ht(e), n = Aa(ht.prototype.request, t);
|
|
1722
1722
|
return S.extend(n, ht.prototype, t, { allOwnKeys: !0 }), S.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
1723
|
-
return
|
|
1723
|
+
return Ja(mt(e, o));
|
|
1724
1724
|
}, n;
|
|
1725
1725
|
}
|
|
1726
|
-
const ge =
|
|
1726
|
+
const ge = Ja(fn);
|
|
1727
1727
|
ge.Axios = ht;
|
|
1728
|
-
ge.CanceledError =
|
|
1728
|
+
ge.CanceledError = Ht;
|
|
1729
1729
|
ge.CancelToken = rp;
|
|
1730
|
-
ge.isCancel =
|
|
1731
|
-
ge.VERSION =
|
|
1732
|
-
ge.toFormData =
|
|
1730
|
+
ge.isCancel = Wa;
|
|
1731
|
+
ge.VERSION = Xa;
|
|
1732
|
+
ge.toFormData = lr;
|
|
1733
1733
|
ge.AxiosError = ne;
|
|
1734
1734
|
ge.Cancel = ge.CanceledError;
|
|
1735
1735
|
ge.all = function(t) {
|
|
@@ -1739,8 +1739,8 @@ ge.spread = op;
|
|
|
1739
1739
|
ge.isAxiosError = sp;
|
|
1740
1740
|
ge.mergeConfig = mt;
|
|
1741
1741
|
ge.AxiosHeaders = Te;
|
|
1742
|
-
ge.formToJSON = (e) =>
|
|
1743
|
-
ge.getAdapter =
|
|
1742
|
+
ge.formToJSON = (e) => za(S.isHTMLForm(e) ? new FormData(e) : e);
|
|
1743
|
+
ge.getAdapter = qa.getAdapter;
|
|
1744
1744
|
ge.HttpStatusCode = uo;
|
|
1745
1745
|
ge.default = ge;
|
|
1746
1746
|
const {
|
|
@@ -1760,8 +1760,8 @@ const {
|
|
|
1760
1760
|
formToJSON: Wy,
|
|
1761
1761
|
getAdapter: jy,
|
|
1762
1762
|
mergeConfig: Vy
|
|
1763
|
-
} = ge,
|
|
1764
|
-
function
|
|
1763
|
+
} = ge, zr = {};
|
|
1764
|
+
function Nt() {
|
|
1765
1765
|
var e;
|
|
1766
1766
|
try {
|
|
1767
1767
|
return typeof window < "u" && ((e = window.localStorage) == null ? void 0 : e.getItem("chat-debug")) === "1";
|
|
@@ -1769,26 +1769,26 @@ function Sn() {
|
|
|
1769
1769
|
return !1;
|
|
1770
1770
|
}
|
|
1771
1771
|
}
|
|
1772
|
-
const Hs =
|
|
1773
|
-
!
|
|
1774
|
-
let
|
|
1772
|
+
const Hs = zr == null ? void 0 : zr.VITE_API_BASE_URL, Za = Hs ? Hs.replace(/\/+$/, "") : void 0;
|
|
1773
|
+
!Za && typeof window < "u" && console.warn("VITE_API_BASE_URL is not set. The API client will need to be configured via apiConfig prop.");
|
|
1774
|
+
let Gn = null;
|
|
1775
1775
|
const fo = /* @__PURE__ */ new Set();
|
|
1776
1776
|
function ap() {
|
|
1777
|
-
return
|
|
1777
|
+
return Gn;
|
|
1778
1778
|
}
|
|
1779
1779
|
function zs(e) {
|
|
1780
|
-
|
|
1780
|
+
Gn = e, fo.forEach((t) => t(e));
|
|
1781
1781
|
}
|
|
1782
1782
|
function ip(e) {
|
|
1783
1783
|
return fo.add(e), () => fo.delete(e);
|
|
1784
1784
|
}
|
|
1785
1785
|
const st = ge.create({
|
|
1786
|
-
baseURL:
|
|
1786
|
+
baseURL: Za || "http://localhost:8000",
|
|
1787
1787
|
// Fallback base URL
|
|
1788
1788
|
timeout: 3e4,
|
|
1789
1789
|
withCredentials: !0
|
|
1790
1790
|
});
|
|
1791
|
-
st.interceptors.request.use((e) => (
|
|
1791
|
+
st.interceptors.request.use((e) => (Gn && (e.headers.Authorization = `Bearer ${Gn}`), e));
|
|
1792
1792
|
st.interceptors.response.use(
|
|
1793
1793
|
(e) => e,
|
|
1794
1794
|
(e) => Promise.reject(e)
|
|
@@ -1796,7 +1796,7 @@ st.interceptors.response.use(
|
|
|
1796
1796
|
async function Qe(e, t) {
|
|
1797
1797
|
return (await st.get(e, t)).data;
|
|
1798
1798
|
}
|
|
1799
|
-
async function
|
|
1799
|
+
async function Cn(e, t, n) {
|
|
1800
1800
|
return (await st.post(e, t, n)).data;
|
|
1801
1801
|
}
|
|
1802
1802
|
async function cp(e, t, n) {
|
|
@@ -1805,7 +1805,7 @@ async function cp(e, t, n) {
|
|
|
1805
1805
|
async function lp(e, t) {
|
|
1806
1806
|
return (await st.delete(e, t)).data;
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1808
|
+
function Se(e) {
|
|
1809
1809
|
return e && typeof e == "object" && "data" in e ? e.data : e;
|
|
1810
1810
|
}
|
|
1811
1811
|
class up {
|
|
@@ -1829,37 +1829,37 @@ class up {
|
|
|
1829
1829
|
}
|
|
1830
1830
|
// ---- Thread Management ----
|
|
1831
1831
|
async listThreads() {
|
|
1832
|
-
const t = await Qe("/chat/threads"), n =
|
|
1832
|
+
const t = await Qe("/chat/threads"), n = Se(t);
|
|
1833
1833
|
return (n == null ? void 0 : n.items) ?? (t == null ? void 0 : t.items) ?? [];
|
|
1834
1834
|
}
|
|
1835
1835
|
async createThread(t) {
|
|
1836
|
-
const r = await
|
|
1837
|
-
return
|
|
1836
|
+
const r = await Cn("/chat/threads", t ? { title: t } : void 0);
|
|
1837
|
+
return Se(r);
|
|
1838
1838
|
}
|
|
1839
1839
|
async updateThread(t, n) {
|
|
1840
1840
|
const r = await cp(`/chat/threads/${t}`, { title: n });
|
|
1841
|
-
return
|
|
1841
|
+
return Se(r);
|
|
1842
1842
|
}
|
|
1843
1843
|
async deleteThread(t) {
|
|
1844
1844
|
const n = await lp(`/chat/threads/${t}`);
|
|
1845
|
-
return
|
|
1845
|
+
return Se(n);
|
|
1846
1846
|
}
|
|
1847
1847
|
async threadInfo(t) {
|
|
1848
1848
|
const n = await Qe(`/chat/threads/${t}/info`);
|
|
1849
|
-
return
|
|
1849
|
+
return Se(n);
|
|
1850
1850
|
}
|
|
1851
1851
|
// ---- Agents ----
|
|
1852
1852
|
async listAgents() {
|
|
1853
|
-
const t = await Qe("/chat/agents"), n =
|
|
1853
|
+
const t = await Qe("/chat/agents"), n = Se(t);
|
|
1854
1854
|
return (n == null ? void 0 : n.items) ?? [];
|
|
1855
1855
|
}
|
|
1856
1856
|
async getAgent(t) {
|
|
1857
1857
|
const n = await Qe(`/chat/agents/${t}`);
|
|
1858
|
-
return
|
|
1858
|
+
return Se(n);
|
|
1859
1859
|
}
|
|
1860
1860
|
async getAgentSchema(t) {
|
|
1861
1861
|
const n = await Qe(`/chat/agents/${t}/schema`);
|
|
1862
|
-
return
|
|
1862
|
+
return Se(n);
|
|
1863
1863
|
}
|
|
1864
1864
|
// ---- Messages & State ----
|
|
1865
1865
|
async getMessages(t) {
|
|
@@ -1872,7 +1872,7 @@ class up {
|
|
|
1872
1872
|
before_id: t.beforeId ?? void 0
|
|
1873
1873
|
}
|
|
1874
1874
|
});
|
|
1875
|
-
return
|
|
1875
|
+
return Se(n);
|
|
1876
1876
|
}
|
|
1877
1877
|
async getState(t) {
|
|
1878
1878
|
const n = await Qe(`/chat/threads/${t.threadId}/state`, {
|
|
@@ -1882,7 +1882,7 @@ class up {
|
|
|
1882
1882
|
checkpoint_ns: t.checkpointNs
|
|
1883
1883
|
}
|
|
1884
1884
|
});
|
|
1885
|
-
return
|
|
1885
|
+
return Se(n);
|
|
1886
1886
|
}
|
|
1887
1887
|
async getStateHistory(t) {
|
|
1888
1888
|
const n = await Qe(`/chat/threads/${t.threadId}/state/history`, {
|
|
@@ -1892,34 +1892,34 @@ class up {
|
|
|
1892
1892
|
checkpoint_ns: t.checkpointNs
|
|
1893
1893
|
}
|
|
1894
1894
|
});
|
|
1895
|
-
return
|
|
1895
|
+
return Se(n);
|
|
1896
1896
|
}
|
|
1897
1897
|
// ---- Checkpoints ----
|
|
1898
1898
|
async listCheckpoints(t) {
|
|
1899
1899
|
const n = await Qe(`/chat/threads/${t}/checkpoints`, {
|
|
1900
1900
|
params: { thread_id: t }
|
|
1901
1901
|
});
|
|
1902
|
-
return
|
|
1902
|
+
return Se(n);
|
|
1903
1903
|
}
|
|
1904
1904
|
// ---- File Uploads ----
|
|
1905
1905
|
async uploadExcel(t, n = "/upload_excel", r = {}) {
|
|
1906
1906
|
const o = new FormData(), s = t.name.replace(/\.[^.]+$/, "").toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "") || `excel_${Date.now()}`, a = (r.tableName ?? s).trim();
|
|
1907
|
-
o.append("file", t, t.name), o.append("table_name", a), r.sheetName && o.append("sheet_name", r.sheetName),
|
|
1908
|
-
const i = await
|
|
1907
|
+
o.append("file", t, t.name), o.append("table_name", a), r.sheetName && o.append("sheet_name", r.sheetName), Nt() && console.debug("[api.uploadExcel] ->", n, { name: t.name, size: t.size, tableName: a, sheetName: r.sheetName });
|
|
1908
|
+
const i = await Cn(n, o, {
|
|
1909
1909
|
headers: { Accept: "application/json" },
|
|
1910
1910
|
maxBodyLength: 1 / 0
|
|
1911
|
-
}), l =
|
|
1912
|
-
return
|
|
1911
|
+
}), l = Se(i);
|
|
1912
|
+
return Nt() && console.debug("[api.uploadExcel] <-", l), l;
|
|
1913
1913
|
}
|
|
1914
1914
|
// ---- File Uploads ----
|
|
1915
1915
|
async uploadImage(t, n = "/upload") {
|
|
1916
1916
|
const r = new FormData();
|
|
1917
|
-
r.append("file", t, t.name),
|
|
1918
|
-
const o = await
|
|
1917
|
+
r.append("file", t, t.name), Nt() && console.debug("[api.uploadImage] ->", n, { name: t.name, type: t.type, size: t.size });
|
|
1918
|
+
const o = await Cn(n, r, {
|
|
1919
1919
|
headers: { Accept: "application/json" },
|
|
1920
1920
|
maxBodyLength: 1 / 0
|
|
1921
|
-
}), s =
|
|
1922
|
-
if (
|
|
1921
|
+
}), s = Se(o);
|
|
1922
|
+
if (Nt() && console.debug("[api.uploadImage] <-", s), !(s != null && s.url))
|
|
1923
1923
|
throw new Error("Invalid upload response: missing url");
|
|
1924
1924
|
return {
|
|
1925
1925
|
url: s.url,
|
|
@@ -1928,6 +1928,16 @@ class up {
|
|
|
1928
1928
|
size: s.size ?? t.size
|
|
1929
1929
|
};
|
|
1930
1930
|
}
|
|
1931
|
+
async uploadFile(t, n, r, o) {
|
|
1932
|
+
const s = { file_data: t, filename: n, mime_type: r };
|
|
1933
|
+
o && (s.thread_id = o), Nt() && console.debug("[api.uploadFile] ->", "/chat/files/upload", s);
|
|
1934
|
+
const a = await Cn("/chat/files/upload", s, {
|
|
1935
|
+
headers: { Accept: "application/json" }
|
|
1936
|
+
}), i = Se(a);
|
|
1937
|
+
if (Nt() && console.debug("[api.uploadFile] <-", i), !(i != null && i.id))
|
|
1938
|
+
throw new Error("Invalid upload response: missing id");
|
|
1939
|
+
return i;
|
|
1940
|
+
}
|
|
1931
1941
|
}
|
|
1932
1942
|
const gt = new up();
|
|
1933
1943
|
function dp(e = {}) {
|
|
@@ -2272,7 +2282,7 @@ async function po(e) {
|
|
|
2272
2282
|
r.onload = () => t(String(r.result)), r.onerror = (o) => n(o), r.readAsDataURL(e);
|
|
2273
2283
|
});
|
|
2274
2284
|
}
|
|
2275
|
-
async function
|
|
2285
|
+
async function Qa(e) {
|
|
2276
2286
|
return await new Promise((t, n) => {
|
|
2277
2287
|
const r = new FileReader();
|
|
2278
2288
|
r.onload = () => {
|
|
@@ -2289,10 +2299,10 @@ async function js(e) {
|
|
|
2289
2299
|
});
|
|
2290
2300
|
}
|
|
2291
2301
|
async function Sp(e, t, n) {
|
|
2292
|
-
if (!t.type || !t.type.startsWith("image/")) return null;
|
|
2293
2302
|
try {
|
|
2294
|
-
const r = await e.
|
|
2295
|
-
if (
|
|
2303
|
+
const r = await Qa(t), o = await e.uploadFile(r, t.name, t.type || "application/octet-stream", n);
|
|
2304
|
+
if (o && o.id)
|
|
2305
|
+
return `${e.baseUrl}/chat/files/${o.id}/view`;
|
|
2296
2306
|
} catch {
|
|
2297
2307
|
}
|
|
2298
2308
|
try {
|
|
@@ -2301,46 +2311,44 @@ async function Sp(e, t, n) {
|
|
|
2301
2311
|
return null;
|
|
2302
2312
|
}
|
|
2303
2313
|
}
|
|
2304
|
-
async function Cp(e, t = [], n, r, o) {
|
|
2305
|
-
const
|
|
2306
|
-
for (const
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
if (
|
|
2315
|
-
const
|
|
2316
|
-
|
|
2314
|
+
async function Cp(e, t = [], n, r, o, s) {
|
|
2315
|
+
const a = [], i = [];
|
|
2316
|
+
for (const l of t) {
|
|
2317
|
+
let f = null;
|
|
2318
|
+
try {
|
|
2319
|
+
f = await Sp(e, l, s);
|
|
2320
|
+
} catch {
|
|
2321
|
+
f = null;
|
|
2322
|
+
}
|
|
2323
|
+
if (l.type && l.type.startsWith("image/"))
|
|
2324
|
+
if (f) {
|
|
2325
|
+
const d = { type: "image_url", url: f, mimeType: l.type, alt: l.name };
|
|
2326
|
+
a.push(d);
|
|
2317
2327
|
} else
|
|
2318
2328
|
try {
|
|
2319
|
-
const
|
|
2320
|
-
|
|
2329
|
+
const d = await po(l), p = { type: "image_url", url: String(d), mimeType: l.type, alt: l.name };
|
|
2330
|
+
a.push(p);
|
|
2321
2331
|
} catch {
|
|
2322
2332
|
}
|
|
2333
|
+
else if (f) {
|
|
2334
|
+
const d = { type: "file", url: f, mimeType: l.type || void 0, name: l.name, size: l.size };
|
|
2335
|
+
a.push(d);
|
|
2336
|
+
} else
|
|
2323
2337
|
try {
|
|
2324
|
-
const
|
|
2325
|
-
a.push(
|
|
2326
|
-
} catch {
|
|
2327
|
-
}
|
|
2328
|
-
} else {
|
|
2329
|
-
try {
|
|
2330
|
-
const l = await po(i), f = { type: "file", url: String(l), mimeType: i.type || void 0, name: i.name, size: i.size };
|
|
2331
|
-
s.push(f);
|
|
2332
|
-
} catch {
|
|
2333
|
-
}
|
|
2334
|
-
try {
|
|
2335
|
-
const l = await js(i);
|
|
2336
|
-
a.push({ filename: i.name, data: l, mime_type: i.type || "application/octet-stream" });
|
|
2338
|
+
const d = await po(l), p = { type: "file", url: String(d), mimeType: l.type || void 0, name: l.name, size: l.size };
|
|
2339
|
+
a.push(p);
|
|
2337
2340
|
} catch {
|
|
2338
2341
|
}
|
|
2342
|
+
try {
|
|
2343
|
+
const d = await Qa(l);
|
|
2344
|
+
i.push({ filename: l.name, data: d, mime_type: l.type || "application/octet-stream" });
|
|
2345
|
+
} catch {
|
|
2339
2346
|
}
|
|
2340
|
-
|
|
2347
|
+
}
|
|
2348
|
+
return { contentParts: a, filesInfo: i };
|
|
2341
2349
|
}
|
|
2342
|
-
const ei =
|
|
2343
|
-
function
|
|
2350
|
+
const ei = Na(null);
|
|
2351
|
+
function Mn({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialThreadId: o = null, historyPageSize: s, enableFileAgentRouting: a = !1, fileAgentId: i = "invoice_reader" }) {
|
|
2344
2352
|
const l = gt;
|
|
2345
2353
|
me(() => {
|
|
2346
2354
|
t && l.updateConfig({
|
|
@@ -2457,7 +2465,10 @@ function kn({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2457
2465
|
const pe = (Z == null ? void 0 : Z.attachments) || [], { contentParts: _e, filesInfo: Oe } = await Cp(
|
|
2458
2466
|
l,
|
|
2459
2467
|
pe,
|
|
2460
|
-
t == null ? void 0 : t.uploadPath
|
|
2468
|
+
t == null ? void 0 : t.uploadPath,
|
|
2469
|
+
a,
|
|
2470
|
+
i,
|
|
2471
|
+
T
|
|
2461
2472
|
), Ct = [];
|
|
2462
2473
|
Y && Ct.push({ type: "text", text: Y });
|
|
2463
2474
|
for (const be of _e) Ct.push(be);
|
|
@@ -2469,32 +2480,32 @@ function kn({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2469
2480
|
checkpointId: (Z == null ? void 0 : Z.checkpointId) ?? w.lastCheckpointId ?? void 0
|
|
2470
2481
|
};
|
|
2471
2482
|
C(Ze);
|
|
2472
|
-
const
|
|
2483
|
+
const Dr = {
|
|
2473
2484
|
...Ze,
|
|
2474
2485
|
content: Ze.content.filter((be) => be.type === "text" || be.type === "image_url")
|
|
2475
|
-
},
|
|
2486
|
+
}, Kt = { ...(Z == null ? void 0 : Z.payloadExtras) ?? {} }, vn = !!Kt.edit, wn = Kt.originalMessageId, Lr = typeof wn == "string" ? wn : void 0, yn = pe && pe.length > 0, Fr = {
|
|
2476
2487
|
...T ? { threadId: T } : {},
|
|
2477
2488
|
payload: {
|
|
2478
|
-
messages: [
|
|
2489
|
+
messages: [Dr],
|
|
2479
2490
|
attachments: Ze.content.filter((be) => be.type === "file").map((be) => ({ type: "file", url: be.url, mimeType: be.mimeType, name: be.name, size: be.size })),
|
|
2480
2491
|
files_info: Oe,
|
|
2481
|
-
...a &&
|
|
2482
|
-
...
|
|
2492
|
+
...a && yn && i ? { agent_id: i } : {},
|
|
2493
|
+
...Kt
|
|
2483
2494
|
},
|
|
2484
2495
|
checkpointId: (Z == null ? void 0 : Z.checkpointId) ?? w.lastCheckpointId ?? void 0,
|
|
2485
2496
|
checkpointNs: Z == null ? void 0 : Z.checkpointNs,
|
|
2486
2497
|
nodeFilter: Z == null ? void 0 : Z.nodeFilter,
|
|
2487
2498
|
config: Z == null ? void 0 : Z.config,
|
|
2488
|
-
edit:
|
|
2489
|
-
originalMessageId:
|
|
2499
|
+
edit: vn,
|
|
2500
|
+
originalMessageId: Lr
|
|
2490
2501
|
};
|
|
2491
2502
|
p(
|
|
2492
|
-
|
|
2503
|
+
Fr,
|
|
2493
2504
|
(be) => R(be),
|
|
2494
2505
|
{
|
|
2495
2506
|
onError: (be) => console.warn("stream error", be),
|
|
2496
|
-
onOpen: ({ threadId: be, created:
|
|
2497
|
-
!T && be && (Q(be),
|
|
2507
|
+
onOpen: ({ threadId: be, created: $r }) => {
|
|
2508
|
+
!T && be && (Q(be), $r && q().catch(() => {
|
|
2498
2509
|
}));
|
|
2499
2510
|
}
|
|
2500
2511
|
}
|
|
@@ -2551,14 +2562,14 @@ function kn({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2551
2562
|
return /* @__PURE__ */ c(ei.Provider, { value: ue, children: e });
|
|
2552
2563
|
}
|
|
2553
2564
|
function ti() {
|
|
2554
|
-
const e =
|
|
2565
|
+
const e = Ra(ei);
|
|
2555
2566
|
if (!e) throw new Error("useChat must be used within ChatProvider");
|
|
2556
2567
|
return e;
|
|
2557
2568
|
}
|
|
2558
2569
|
function A(...e) {
|
|
2559
2570
|
return Td(Rd(e));
|
|
2560
2571
|
}
|
|
2561
|
-
const Ep =
|
|
2572
|
+
const Ep = cn(
|
|
2562
2573
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
2563
2574
|
{
|
|
2564
2575
|
variants: {
|
|
@@ -2584,7 +2595,7 @@ const Ep = an(
|
|
|
2584
2595
|
}
|
|
2585
2596
|
), de = u.forwardRef(
|
|
2586
2597
|
({ className: e, variant: t, size: n, asChild: r = !1, ...o }, s) => /* @__PURE__ */ c(
|
|
2587
|
-
r ?
|
|
2598
|
+
r ? Bt : "button",
|
|
2588
2599
|
{
|
|
2589
2600
|
className: A(Ep({ variant: t, size: n, className: e })),
|
|
2590
2601
|
ref: s,
|
|
@@ -2607,7 +2618,7 @@ const ni = u.forwardRef(
|
|
|
2607
2618
|
)
|
|
2608
2619
|
);
|
|
2609
2620
|
ni.displayName = "Textarea";
|
|
2610
|
-
const Np =
|
|
2621
|
+
const Np = cn(
|
|
2611
2622
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
2612
2623
|
{
|
|
2613
2624
|
variants: {
|
|
@@ -2746,7 +2757,7 @@ function Pp({
|
|
|
2746
2757
|
function Ip(e) {
|
|
2747
2758
|
return typeof e == "function";
|
|
2748
2759
|
}
|
|
2749
|
-
function
|
|
2760
|
+
function js(e, t) {
|
|
2750
2761
|
if (typeof e == "function")
|
|
2751
2762
|
return e(t);
|
|
2752
2763
|
e != null && (e.current = t);
|
|
@@ -2755,14 +2766,14 @@ function Fo(...e) {
|
|
|
2755
2766
|
return (t) => {
|
|
2756
2767
|
let n = !1;
|
|
2757
2768
|
const r = e.map((o) => {
|
|
2758
|
-
const s =
|
|
2769
|
+
const s = js(o, t);
|
|
2759
2770
|
return !n && typeof s == "function" && (n = !0), s;
|
|
2760
2771
|
});
|
|
2761
2772
|
if (n)
|
|
2762
2773
|
return () => {
|
|
2763
2774
|
for (let o = 0; o < r.length; o++) {
|
|
2764
2775
|
const s = r[o];
|
|
2765
|
-
typeof s == "function" ? s() :
|
|
2776
|
+
typeof s == "function" ? s() : js(e[o], null);
|
|
2766
2777
|
}
|
|
2767
2778
|
};
|
|
2768
2779
|
};
|
|
@@ -2789,14 +2800,14 @@ var _p = [
|
|
|
2789
2800
|
"svg",
|
|
2790
2801
|
"ul"
|
|
2791
2802
|
], ee = _p.reduce((e, t) => {
|
|
2792
|
-
const n =
|
|
2803
|
+
const n = Mt(`Primitive.${t}`), r = u.forwardRef((o, s) => {
|
|
2793
2804
|
const { asChild: a, ...i } = o, l = a ? n : t;
|
|
2794
2805
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ c(l, { ...i, ref: s });
|
|
2795
2806
|
});
|
|
2796
2807
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
2797
2808
|
}, {});
|
|
2798
2809
|
function oi(e, t) {
|
|
2799
|
-
e &&
|
|
2810
|
+
e && sr.flushSync(() => e.dispatchEvent(t));
|
|
2800
2811
|
}
|
|
2801
2812
|
function Op(e, t) {
|
|
2802
2813
|
return u.useReducer((n, r) => t[n][r] ?? n, e);
|
|
@@ -2821,19 +2832,19 @@ function kp(e) {
|
|
|
2821
2832
|
}
|
|
2822
2833
|
});
|
|
2823
2834
|
return u.useEffect(() => {
|
|
2824
|
-
const f =
|
|
2835
|
+
const f = En(r.current);
|
|
2825
2836
|
s.current = i === "mounted" ? f : "none";
|
|
2826
2837
|
}, [i]), we(() => {
|
|
2827
2838
|
const f = r.current, d = o.current;
|
|
2828
2839
|
if (d !== e) {
|
|
2829
|
-
const m = s.current, v =
|
|
2840
|
+
const m = s.current, v = En(f);
|
|
2830
2841
|
e ? l("MOUNT") : v === "none" || (f == null ? void 0 : f.display) === "none" ? l("UNMOUNT") : l(d && m !== v ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
2831
2842
|
}
|
|
2832
2843
|
}, [e, l]), we(() => {
|
|
2833
2844
|
if (t) {
|
|
2834
2845
|
let f;
|
|
2835
2846
|
const d = t.ownerDocument.defaultView ?? window, p = (v) => {
|
|
2836
|
-
const h =
|
|
2847
|
+
const h = En(r.current).includes(CSS.escape(v.animationName));
|
|
2837
2848
|
if (v.target === t && h && (l("ANIMATION_END"), !o.current)) {
|
|
2838
2849
|
const b = t.style.animationFillMode;
|
|
2839
2850
|
t.style.animationFillMode = "forwards", f = d.setTimeout(() => {
|
|
@@ -2841,7 +2852,7 @@ function kp(e) {
|
|
|
2841
2852
|
});
|
|
2842
2853
|
}
|
|
2843
2854
|
}, m = (v) => {
|
|
2844
|
-
v.target === t && (s.current =
|
|
2855
|
+
v.target === t && (s.current = En(r.current));
|
|
2845
2856
|
};
|
|
2846
2857
|
return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", p), t.addEventListener("animationend", p), () => {
|
|
2847
2858
|
d.clearTimeout(f), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", p), t.removeEventListener("animationend", p);
|
|
@@ -2855,7 +2866,7 @@ function kp(e) {
|
|
|
2855
2866
|
}, [])
|
|
2856
2867
|
};
|
|
2857
2868
|
}
|
|
2858
|
-
function
|
|
2869
|
+
function En(e) {
|
|
2859
2870
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
2860
2871
|
}
|
|
2861
2872
|
function Mp(e) {
|
|
@@ -2871,7 +2882,7 @@ function $e(e) {
|
|
|
2871
2882
|
n((r) => r ?? String(Lp++));
|
|
2872
2883
|
}, [e]), t ? `radix-${t}` : "";
|
|
2873
2884
|
}
|
|
2874
|
-
var
|
|
2885
|
+
var dr = "Collapsible", [Fp, Ky] = ze(dr), [$p, $o] = Fp(dr), si = u.forwardRef(
|
|
2875
2886
|
(e, t) => {
|
|
2876
2887
|
const {
|
|
2877
2888
|
__scopeCollapsible: n,
|
|
@@ -2884,7 +2895,7 @@ var ur = "Collapsible", [Fp, Ky] = ze(ur), [$p, $o] = Fp(ur), si = u.forwardRef(
|
|
|
2884
2895
|
prop: r,
|
|
2885
2896
|
defaultProp: o ?? !1,
|
|
2886
2897
|
onChange: a,
|
|
2887
|
-
caller:
|
|
2898
|
+
caller: dr
|
|
2888
2899
|
});
|
|
2889
2900
|
return /* @__PURE__ */ c(
|
|
2890
2901
|
$p,
|
|
@@ -2907,7 +2918,7 @@ var ur = "Collapsible", [Fp, Ky] = ze(ur), [$p, $o] = Fp(ur), si = u.forwardRef(
|
|
|
2907
2918
|
);
|
|
2908
2919
|
}
|
|
2909
2920
|
);
|
|
2910
|
-
si.displayName =
|
|
2921
|
+
si.displayName = dr;
|
|
2911
2922
|
var ai = "CollapsibleTrigger", ii = u.forwardRef(
|
|
2912
2923
|
(e, t) => {
|
|
2913
2924
|
const { __scopeCollapsible: n, ...r } = e, o = $o(ai, n);
|
|
@@ -2972,8 +2983,8 @@ function Uo(e) {
|
|
|
2972
2983
|
return e ? "open" : "closed";
|
|
2973
2984
|
}
|
|
2974
2985
|
var Hp = si;
|
|
2975
|
-
const
|
|
2976
|
-
function
|
|
2986
|
+
const Vs = Hp, Ks = ii;
|
|
2987
|
+
function Nn({ content: e, className: t = "" }) {
|
|
2977
2988
|
const n = Ve.useMemo(() => ({ table: ({ node: f, className: d, ...p }) => /* @__PURE__ */ c("div", { className: "max-w-full", children: /* @__PURE__ */ c(
|
|
2978
2989
|
"table",
|
|
2979
2990
|
{
|
|
@@ -3036,7 +3047,7 @@ function En({ content: e, className: t = "" }) {
|
|
|
3036
3047
|
);
|
|
3037
3048
|
return /* @__PURE__ */ c("div", { className: r, style: { wordBreak: "break-word", overflowWrap: "anywhere" }, children: /* @__PURE__ */ c(Pd, { remarkPlugins: [Id], components: n, children: e }) });
|
|
3038
3049
|
}
|
|
3039
|
-
const
|
|
3050
|
+
const Dn = "prose prose-sm max-w-none break-words dark:prose-invert prose-headings:break-words prose-p:break-words prose-li:break-words prose-td:break-words prose-th:break-words prose-a:break-all prose-code:break-words prose-blockquote:break-words";
|
|
3040
3051
|
function zp({ className: e }) {
|
|
3041
3052
|
const [t, n] = re(0);
|
|
3042
3053
|
return me(() => {
|
|
@@ -3085,18 +3096,18 @@ function Wp({
|
|
|
3085
3096
|
case "system":
|
|
3086
3097
|
return "text-muted-foreground";
|
|
3087
3098
|
default:
|
|
3088
|
-
return "text-
|
|
3099
|
+
return "text-[hsl(var(--chat-bubble-ai-text))]";
|
|
3089
3100
|
}
|
|
3090
3101
|
}, [$]), M = ft(() => jp(e.content), [e.content]), H = ft(() => Xp(e.content), [e.content]), O = ft(() => e.content.filter((W) => W.type === "image_url"), [e.content]), G = ft(() => e.content.filter((W) => W.type === "file"), [e.content]), D = Jp(M, n ? r : 0), T = async () => {
|
|
3091
3102
|
try {
|
|
3092
|
-
const W = K ?
|
|
3103
|
+
const W = K ? Rt(e.content) : M;
|
|
3093
3104
|
await navigator.clipboard.writeText(W), y(!0), setTimeout(() => y(!1), 2e3), w == null || w(W);
|
|
3094
3105
|
} catch (W) {
|
|
3095
3106
|
console.error("Failed to copy:", W);
|
|
3096
3107
|
}
|
|
3097
3108
|
}, Q = () => {
|
|
3098
3109
|
if (!g) return;
|
|
3099
|
-
const W = K ?
|
|
3110
|
+
const W = K ? Rt(e.content) : M;
|
|
3100
3111
|
g(e.id, W);
|
|
3101
3112
|
}, q = () => h == null ? void 0 : h(t), oe = () => {
|
|
3102
3113
|
const se = A(P ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", B);
|
|
@@ -3147,7 +3158,12 @@ function Wp({
|
|
|
3147
3158
|
case "system":
|
|
3148
3159
|
return A(W, "w-full md:max-w-[85%] bg-accent/40 text-muted-foreground border");
|
|
3149
3160
|
default:
|
|
3150
|
-
return
|
|
3161
|
+
return A(
|
|
3162
|
+
W,
|
|
3163
|
+
"w-full md:max-w-[95%]",
|
|
3164
|
+
"bg-[hsl(var(--chat-bubble-ai))] text-[hsl(var(--chat-bubble-ai-text))]",
|
|
3165
|
+
"border border-border/60 dark:border-border/40"
|
|
3166
|
+
);
|
|
3151
3167
|
}
|
|
3152
3168
|
}, ie = (W) => {
|
|
3153
3169
|
if (!W) return "";
|
|
@@ -3163,25 +3179,25 @@ function Wp({
|
|
|
3163
3179
|
return /* @__PURE__ */ c(Zp, { data: X });
|
|
3164
3180
|
}
|
|
3165
3181
|
if (K && H.name === "get_issues") {
|
|
3166
|
-
const V = e.content.find((he) => he.type === "tool_result"), X = (V == null ? void 0 : V.output) ??
|
|
3182
|
+
const V = e.content.find((he) => he.type === "tool_result"), X = (V == null ? void 0 : V.output) ?? Rt(e.content), te = li(X);
|
|
3167
3183
|
if (te) return /* @__PURE__ */ c(Qp, { issues: te });
|
|
3168
3184
|
}
|
|
3169
3185
|
if (K && !_) {
|
|
3170
|
-
const V =
|
|
3186
|
+
const V = Rt(e.content).slice(0, 80).replace(/\s+/g, " ");
|
|
3171
3187
|
return /* @__PURE__ */ c("div", { className: A("text-xs font-mono opacity-70 flex items-center justify-between gap-2 text-current", P && "text-[10px]"), children: /* @__PURE__ */ E("span", { className: "truncate max-w-full text-current", children: [
|
|
3172
3188
|
V,
|
|
3173
3189
|
V.length >= 80 ? "…" : ""
|
|
3174
3190
|
] }) });
|
|
3175
3191
|
}
|
|
3176
3192
|
if (K && f) {
|
|
3177
|
-
const V =
|
|
3178
|
-
return /* @__PURE__ */ c(
|
|
3193
|
+
const V = Rt(e.content), X = V.length > d;
|
|
3194
|
+
return /* @__PURE__ */ c(Vs, { open: C, onOpenChange: R, children: /* @__PURE__ */ E("div", { className: "font-mono text-sm text-current", children: [
|
|
3179
3195
|
/* @__PURE__ */ c("pre", { className: A("whitespace-pre-wrap break-words text-current", P && "text-xs"), children: X && !C ? V.substring(0, d) + "..." : V }),
|
|
3180
|
-
X && /* @__PURE__ */ c(
|
|
3181
|
-
/* @__PURE__ */ c(
|
|
3196
|
+
X && /* @__PURE__ */ c(Ks, { asChild: !0, children: /* @__PURE__ */ c(de, { variant: "ghost", size: "sm", className: "h-6 text-xs text-current", children: C ? /* @__PURE__ */ E(Ne, { children: [
|
|
3197
|
+
/* @__PURE__ */ c(qt, { className: "h-3 w-3 mr-1" }),
|
|
3182
3198
|
"Show less"
|
|
3183
3199
|
] }) : /* @__PURE__ */ E(Ne, { children: [
|
|
3184
|
-
/* @__PURE__ */ c(
|
|
3200
|
+
/* @__PURE__ */ c(_t, { className: "h-3 w-3 mr-1" }),
|
|
3185
3201
|
"Show more (",
|
|
3186
3202
|
V.length - d,
|
|
3187
3203
|
" chars)"
|
|
@@ -3191,8 +3207,8 @@ function Wp({
|
|
|
3191
3207
|
if (K && _ && !f) {
|
|
3192
3208
|
const V = eh(e.content);
|
|
3193
3209
|
if (V && Vp(V))
|
|
3194
|
-
return /* @__PURE__ */ c(
|
|
3195
|
-
const X =
|
|
3210
|
+
return /* @__PURE__ */ c(Nn, { content: V.trim() });
|
|
3211
|
+
const X = Rt(e.content);
|
|
3196
3212
|
return /* @__PURE__ */ c("div", { className: "font-mono text-sm text-current", children: /* @__PURE__ */ c("pre", { className: A("whitespace-pre-wrap break-words text-current", P && "text-xs"), children: X }) });
|
|
3197
3213
|
}
|
|
3198
3214
|
const W = O.length > 0 && $ !== "tool", se = G.length > 0 && $ !== "tool";
|
|
@@ -3200,31 +3216,31 @@ function Wp({
|
|
|
3200
3216
|
n ? /* @__PURE__ */ E("div", { className: "relative", children: [
|
|
3201
3217
|
(() => {
|
|
3202
3218
|
const V = Vr(D);
|
|
3203
|
-
return V !== null ? /* @__PURE__ */ c(
|
|
3219
|
+
return V !== null ? /* @__PURE__ */ c(Gs, { data: V }) : /* @__PURE__ */ c(Nn, { content: Gp(Kp(D)) });
|
|
3204
3220
|
})(),
|
|
3205
3221
|
/* @__PURE__ */ c(zp, { className: A(B, P ? "text-xs" : "text-sm") })
|
|
3206
3222
|
] }) : (() => {
|
|
3207
3223
|
const V = Vr(M.trim());
|
|
3208
|
-
if (V !== null) return /* @__PURE__ */ c(
|
|
3224
|
+
if (V !== null) return /* @__PURE__ */ c(Gs, { data: V });
|
|
3209
3225
|
if ($ === "user" && p) {
|
|
3210
3226
|
const X = M.trim();
|
|
3211
3227
|
if (X.length > m)
|
|
3212
|
-
return /* @__PURE__ */ E(
|
|
3213
|
-
/* @__PURE__ */ c("div", { className: A("text-sm text-[hsl(var(--chat-bubble-user-text))]", P && "text-xs"), children: k ? /* @__PURE__ */ c(
|
|
3228
|
+
return /* @__PURE__ */ E(Vs, { open: k, onOpenChange: L, children: [
|
|
3229
|
+
/* @__PURE__ */ c("div", { className: A("text-sm text-[hsl(var(--chat-bubble-user-text))]", P && "text-xs"), children: k ? /* @__PURE__ */ c(Nn, { content: X }) : /* @__PURE__ */ E("pre", { className: A("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", P && "text-xs"), children: [
|
|
3214
3230
|
X.substring(0, m),
|
|
3215
3231
|
"..."
|
|
3216
3232
|
] }) }),
|
|
3217
|
-
/* @__PURE__ */ c(
|
|
3233
|
+
/* @__PURE__ */ c(Ks, { asChild: !0, children: /* @__PURE__ */ c(
|
|
3218
3234
|
de,
|
|
3219
3235
|
{
|
|
3220
3236
|
variant: "ghost",
|
|
3221
3237
|
size: "sm",
|
|
3222
3238
|
className: "h-6 text-xs !text-[hsl(var(--chat-bubble-user-text))]",
|
|
3223
3239
|
children: k ? /* @__PURE__ */ E(Ne, { children: [
|
|
3224
|
-
/* @__PURE__ */ c(
|
|
3240
|
+
/* @__PURE__ */ c(qt, { className: "h-3 w-3 mr-1" }),
|
|
3225
3241
|
" Show less"
|
|
3226
3242
|
] }) : /* @__PURE__ */ E(Ne, { children: [
|
|
3227
|
-
/* @__PURE__ */ c(
|
|
3243
|
+
/* @__PURE__ */ c(_t, { className: "h-3 w-3 mr-1" }),
|
|
3228
3244
|
" Show more (",
|
|
3229
3245
|
X.length - m,
|
|
3230
3246
|
" chars)"
|
|
@@ -3233,7 +3249,7 @@ function Wp({
|
|
|
3233
3249
|
) })
|
|
3234
3250
|
] });
|
|
3235
3251
|
}
|
|
3236
|
-
return /* @__PURE__ */ c(
|
|
3252
|
+
return /* @__PURE__ */ c(Nn, { content: M.trim() });
|
|
3237
3253
|
})(),
|
|
3238
3254
|
W && /* @__PURE__ */ c("div", { className: "mt-2 grid grid-cols-2 gap-2", children: O.map((V, X) => /* @__PURE__ */ E("div", { className: "relative border rounded overflow-hidden", children: [
|
|
3239
3255
|
/* @__PURE__ */ c("img", { src: V.url, alt: V.alt ?? "image", className: "w-full h-auto" }),
|
|
@@ -3295,7 +3311,7 @@ function Wp({
|
|
|
3295
3311
|
onClick: () => N((W) => !W),
|
|
3296
3312
|
children: [
|
|
3297
3313
|
/* @__PURE__ */ c("span", { children: H.name }),
|
|
3298
|
-
/* @__PURE__ */ c("span", { className: "inline-flex items-center", children: _ ? /* @__PURE__ */ c(
|
|
3314
|
+
/* @__PURE__ */ c("span", { className: "inline-flex items-center", children: _ ? /* @__PURE__ */ c(qt, { className: "h-3 w-3" }) : /* @__PURE__ */ c(_t, { className: "h-3 w-3" }) })
|
|
3299
3315
|
]
|
|
3300
3316
|
}
|
|
3301
3317
|
),
|
|
@@ -3308,7 +3324,7 @@ function Wp({
|
|
|
3308
3324
|
onClick: () => N((W) => !W),
|
|
3309
3325
|
children: /* @__PURE__ */ E("span", { className: "text-xs flex items-center gap-1", children: [
|
|
3310
3326
|
"Tool Output ",
|
|
3311
|
-
_ ? /* @__PURE__ */ c(
|
|
3327
|
+
_ ? /* @__PURE__ */ c(qt, { className: "h-3 w-3" }) : /* @__PURE__ */ c(_t, { className: "h-3 w-3" })
|
|
3312
3328
|
] })
|
|
3313
3329
|
}
|
|
3314
3330
|
)
|
|
@@ -3459,13 +3475,13 @@ function Vr(e) {
|
|
|
3459
3475
|
return null;
|
|
3460
3476
|
}
|
|
3461
3477
|
}
|
|
3462
|
-
function
|
|
3478
|
+
function Gs({ data: e }) {
|
|
3463
3479
|
if (Array.isArray(e))
|
|
3464
|
-
return e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ c("div", { className:
|
|
3480
|
+
return e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ c("div", { className: Dn, children: /* @__PURE__ */ c("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ c("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ c("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: Zt(e) });
|
|
3465
3481
|
if (e && typeof e == "object") {
|
|
3466
3482
|
const t = Array.isArray(e.distilled_facts) ? e.distilled_facts : null, n = Array.isArray(e.follow_up_queries) ? e.follow_up_queries : null, r = typeof e.is_sufficient == "boolean" ? e.is_sufficient : void 0;
|
|
3467
3483
|
if (t || n || typeof r == "boolean")
|
|
3468
|
-
return /* @__PURE__ */ E("div", { className:
|
|
3484
|
+
return /* @__PURE__ */ E("div", { className: Dn, children: [
|
|
3469
3485
|
typeof r == "boolean" && /* @__PURE__ */ E("p", { children: [
|
|
3470
3486
|
/* @__PURE__ */ c("strong", { children: "Is sufficient:" }),
|
|
3471
3487
|
" ",
|
|
@@ -3481,7 +3497,7 @@ function qs({ data: e }) {
|
|
|
3481
3497
|
] })
|
|
3482
3498
|
] });
|
|
3483
3499
|
const o = Object.entries(e);
|
|
3484
|
-
return /* @__PURE__ */ c("div", { className:
|
|
3500
|
+
return /* @__PURE__ */ c("div", { className: Dn, children: /* @__PURE__ */ c("dl", { className: "mt-0", children: o.map(([s, a]) => /* @__PURE__ */ E("div", { className: "mb-1", children: [
|
|
3485
3501
|
/* @__PURE__ */ E("dt", { className: "inline font-medium mr-1", children: [
|
|
3486
3502
|
s,
|
|
3487
3503
|
":"
|
|
@@ -3489,7 +3505,7 @@ function qs({ data: e }) {
|
|
|
3489
3505
|
/* @__PURE__ */ c("dd", { className: "inline", children: qp(a) })
|
|
3490
3506
|
] }, s)) }) });
|
|
3491
3507
|
}
|
|
3492
|
-
return /* @__PURE__ */ c("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children:
|
|
3508
|
+
return /* @__PURE__ */ c("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: Zt(e) });
|
|
3493
3509
|
}
|
|
3494
3510
|
function qp(e) {
|
|
3495
3511
|
if (e == null) return String(e);
|
|
@@ -3498,7 +3514,7 @@ function qp(e) {
|
|
|
3498
3514
|
if (Array.isArray(e) && e.every((r) => r === null || ["string", "number", "boolean"].includes(typeof r)))
|
|
3499
3515
|
return e.join(", ");
|
|
3500
3516
|
try {
|
|
3501
|
-
return /* @__PURE__ */ c("code", { className: "text-xs", children: JSON.stringify(
|
|
3517
|
+
return /* @__PURE__ */ c("code", { className: "text-xs", children: JSON.stringify(qn(e)) });
|
|
3502
3518
|
} catch {
|
|
3503
3519
|
return String(e);
|
|
3504
3520
|
}
|
|
@@ -3506,12 +3522,12 @@ function qp(e) {
|
|
|
3506
3522
|
function ci(e) {
|
|
3507
3523
|
return !!(e && typeof e == "object" && (e.type === "file" || e.mimeType || e.filename || e.sourceType === "base64"));
|
|
3508
3524
|
}
|
|
3509
|
-
function
|
|
3525
|
+
function qn(e) {
|
|
3510
3526
|
if (typeof e == "string")
|
|
3511
3527
|
return e.length > 2e3 ? e.slice(0, 2e3) + "... [truncated]" : e;
|
|
3512
3528
|
if (e && typeof e == "object") {
|
|
3513
3529
|
if (Array.isArray(e)) {
|
|
3514
|
-
const n = e.map(
|
|
3530
|
+
const n = e.map(qn).filter((r) => r !== void 0);
|
|
3515
3531
|
return n.length ? n : void 0;
|
|
3516
3532
|
}
|
|
3517
3533
|
if (ci(e)) return;
|
|
@@ -3521,7 +3537,7 @@ function Gn(e) {
|
|
|
3521
3537
|
if (n === "data" && typeof r == "string" && r.length > 100)
|
|
3522
3538
|
t[n] = `[base64 ${r.length} chars omitted]`;
|
|
3523
3539
|
else {
|
|
3524
|
-
const o =
|
|
3540
|
+
const o = qn(r);
|
|
3525
3541
|
o !== void 0 && (t[n] = o);
|
|
3526
3542
|
}
|
|
3527
3543
|
}
|
|
@@ -3529,11 +3545,11 @@ function Gn(e) {
|
|
|
3529
3545
|
}
|
|
3530
3546
|
return e;
|
|
3531
3547
|
}
|
|
3532
|
-
function
|
|
3548
|
+
function Zt(e) {
|
|
3533
3549
|
if (typeof e == "string") return e;
|
|
3534
3550
|
if (ci(e)) return "";
|
|
3535
3551
|
try {
|
|
3536
|
-
const t =
|
|
3552
|
+
const t = qn(e);
|
|
3537
3553
|
return t === void 0 ? "" : typeof t == "string" ? t : JSON.stringify(t, null, 2);
|
|
3538
3554
|
} catch {
|
|
3539
3555
|
return "";
|
|
@@ -3614,7 +3630,7 @@ function li(e) {
|
|
|
3614
3630
|
return Object.values(n).some((a) => a.length > 0) ? n : null;
|
|
3615
3631
|
}
|
|
3616
3632
|
function Qp({ issues: e }) {
|
|
3617
|
-
return /* @__PURE__ */ c("div", { className:
|
|
3633
|
+
return /* @__PURE__ */ c("div", { className: Dn, children: [
|
|
3618
3634
|
{ key: "desirability", title: "Desirability" },
|
|
3619
3635
|
{ key: "feasibility", title: "Feasibility" },
|
|
3620
3636
|
{ key: "viability", title: "Viability" },
|
|
@@ -3635,14 +3651,14 @@ function Qp({ issues: e }) {
|
|
|
3635
3651
|
] }, n.key);
|
|
3636
3652
|
}) });
|
|
3637
3653
|
}
|
|
3638
|
-
function
|
|
3654
|
+
function Rt(e) {
|
|
3639
3655
|
const t = e.filter((n) => n.type === "tool_result");
|
|
3640
3656
|
if (t.length)
|
|
3641
3657
|
try {
|
|
3642
|
-
return t.length === 1 ?
|
|
3658
|
+
return t.length === 1 ? Zt(t[0].output) : Zt(t.map((n) => ({ toolCallId: n.toolCallId, output: n.output })));
|
|
3643
3659
|
} catch {
|
|
3644
3660
|
}
|
|
3645
|
-
return
|
|
3661
|
+
return Zt(e);
|
|
3646
3662
|
}
|
|
3647
3663
|
function eh(e) {
|
|
3648
3664
|
const t = e.find((r) => r.type === "tool_result");
|
|
@@ -3650,7 +3666,7 @@ function eh(e) {
|
|
|
3650
3666
|
const n = t.output;
|
|
3651
3667
|
return typeof n == "string" ? n : null;
|
|
3652
3668
|
}
|
|
3653
|
-
const
|
|
3669
|
+
const It = 1e4;
|
|
3654
3670
|
function th(e) {
|
|
3655
3671
|
if (typeof e != "string")
|
|
3656
3672
|
return String(e);
|
|
@@ -3678,7 +3694,7 @@ function th(e) {
|
|
|
3678
3694
|
`).replace(/<li>(.*?)<\/li>/gi, `- $1
|
|
3679
3695
|
`).trim() : n.replace(/</g, "<").replace(/>/g, ">").trim();
|
|
3680
3696
|
}
|
|
3681
|
-
function nh(e, t =
|
|
3697
|
+
function nh(e, t = It) {
|
|
3682
3698
|
if (!e || typeof e != "string")
|
|
3683
3699
|
throw new Error("Invalid content: must be a non-empty string");
|
|
3684
3700
|
if (e.length > t)
|
|
@@ -3698,14 +3714,14 @@ function Ho(e) {
|
|
|
3698
3714
|
return /* @__PURE__ */ c(o, { scope: b, itemMap: y, collectionRef: x, children: w });
|
|
3699
3715
|
};
|
|
3700
3716
|
a.displayName = t;
|
|
3701
|
-
const i = e + "CollectionSlot", l =
|
|
3717
|
+
const i = e + "CollectionSlot", l = Mt(i), f = Ve.forwardRef(
|
|
3702
3718
|
(h, b) => {
|
|
3703
3719
|
const { scope: w, children: x } = h, y = s(i, w), C = ae(b, y.collectionRef);
|
|
3704
3720
|
return /* @__PURE__ */ c(l, { ref: C, children: x });
|
|
3705
3721
|
}
|
|
3706
3722
|
);
|
|
3707
3723
|
f.displayName = i;
|
|
3708
|
-
const d = e + "CollectionItemSlot", p = "data-radix-collection-item", m =
|
|
3724
|
+
const d = e + "CollectionItemSlot", p = "data-radix-collection-item", m = Mt(d), v = Ve.forwardRef(
|
|
3709
3725
|
(h, b) => {
|
|
3710
3726
|
const { scope: w, children: x, ...y } = h, C = Ve.useRef(null), R = ae(b, C), _ = s(d, w);
|
|
3711
3727
|
return Ve.useEffect(() => (_.itemMap.set(C, { ref: C, ...y }), () => void _.itemMap.delete(C))), /* @__PURE__ */ c(m, { [p]: "", ref: R, children: x });
|
|
@@ -3730,7 +3746,7 @@ function Ho(e) {
|
|
|
3730
3746
|
];
|
|
3731
3747
|
}
|
|
3732
3748
|
var oh = u.createContext(void 0);
|
|
3733
|
-
function
|
|
3749
|
+
function fr(e) {
|
|
3734
3750
|
const t = u.useContext(oh);
|
|
3735
3751
|
return e || t || "ltr";
|
|
3736
3752
|
}
|
|
@@ -3752,11 +3768,11 @@ function sh(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
3752
3768
|
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
3753
3769
|
}, [n, t]);
|
|
3754
3770
|
}
|
|
3755
|
-
var ah = "DismissableLayer", ho = "dismissableLayer.update", ih = "dismissableLayer.pointerDownOutside", ch = "dismissableLayer.focusOutside",
|
|
3771
|
+
var ah = "DismissableLayer", ho = "dismissableLayer.update", ih = "dismissableLayer.pointerDownOutside", ch = "dismissableLayer.focusOutside", qs, ui = u.createContext({
|
|
3756
3772
|
layers: /* @__PURE__ */ new Set(),
|
|
3757
3773
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
3758
3774
|
branches: /* @__PURE__ */ new Set()
|
|
3759
|
-
}),
|
|
3775
|
+
}), pn = u.forwardRef(
|
|
3760
3776
|
(e, t) => {
|
|
3761
3777
|
const {
|
|
3762
3778
|
disableOutsidePointerEvents: n = !1,
|
|
@@ -3777,11 +3793,11 @@ var ah = "DismissableLayer", ho = "dismissableLayer.update", ih = "dismissableLa
|
|
|
3777
3793
|
x === f.layers.size - 1 && (r == null || r(N), !N.defaultPrevented && i && (N.preventDefault(), i()));
|
|
3778
3794
|
}, m), u.useEffect(() => {
|
|
3779
3795
|
if (d)
|
|
3780
|
-
return n && (f.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
3781
|
-
n && f.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents =
|
|
3796
|
+
return n && (f.layersWithOutsidePointerEventsDisabled.size === 0 && (qs = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), f.layersWithOutsidePointerEventsDisabled.add(d)), f.layers.add(d), Xs(), () => {
|
|
3797
|
+
n && f.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = qs);
|
|
3782
3798
|
};
|
|
3783
3799
|
}, [d, m, n, f]), u.useEffect(() => () => {
|
|
3784
|
-
d && (f.layers.delete(d), f.layersWithOutsidePointerEventsDisabled.delete(d),
|
|
3800
|
+
d && (f.layers.delete(d), f.layersWithOutsidePointerEventsDisabled.delete(d), Xs());
|
|
3785
3801
|
}, [d, f]), u.useEffect(() => {
|
|
3786
3802
|
const N = () => v({});
|
|
3787
3803
|
return document.addEventListener(ho, N), () => document.removeEventListener(ho, N);
|
|
@@ -3804,7 +3820,7 @@ var ah = "DismissableLayer", ho = "dismissableLayer.update", ih = "dismissableLa
|
|
|
3804
3820
|
);
|
|
3805
3821
|
}
|
|
3806
3822
|
);
|
|
3807
|
-
|
|
3823
|
+
pn.displayName = ah;
|
|
3808
3824
|
var lh = "DismissableLayerBranch", uh = u.forwardRef((e, t) => {
|
|
3809
3825
|
const n = u.useContext(ui), r = u.useRef(null), o = ae(t, r);
|
|
3810
3826
|
return u.useEffect(() => {
|
|
@@ -3860,7 +3876,7 @@ function fh(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
3860
3876
|
onBlurCapture: () => r.current = !1
|
|
3861
3877
|
};
|
|
3862
3878
|
}
|
|
3863
|
-
function
|
|
3879
|
+
function Xs() {
|
|
3864
3880
|
const e = new CustomEvent(ho);
|
|
3865
3881
|
document.dispatchEvent(e);
|
|
3866
3882
|
}
|
|
@@ -3872,16 +3888,16 @@ var Kr = 0;
|
|
|
3872
3888
|
function zo() {
|
|
3873
3889
|
u.useEffect(() => {
|
|
3874
3890
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
3875
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ??
|
|
3891
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Ys()), document.body.insertAdjacentElement("beforeend", e[1] ?? Ys()), Kr++, () => {
|
|
3876
3892
|
Kr === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Kr--;
|
|
3877
3893
|
};
|
|
3878
3894
|
}, []);
|
|
3879
3895
|
}
|
|
3880
|
-
function
|
|
3896
|
+
function Ys() {
|
|
3881
3897
|
const e = document.createElement("span");
|
|
3882
3898
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
3883
3899
|
}
|
|
3884
|
-
var Gr = "focusScope.autoFocusOnMount", qr = "focusScope.autoFocusOnUnmount",
|
|
3900
|
+
var Gr = "focusScope.autoFocusOnMount", qr = "focusScope.autoFocusOnUnmount", Js = { bubbles: !1, cancelable: !0 }, ph = "FocusScope", pr = u.forwardRef((e, t) => {
|
|
3885
3901
|
const {
|
|
3886
3902
|
loop: n = !1,
|
|
3887
3903
|
trapped: r = !1,
|
|
@@ -3920,16 +3936,16 @@ var Gr = "focusScope.autoFocusOnMount", qr = "focusScope.autoFocusOnUnmount", Zs
|
|
|
3920
3936
|
}
|
|
3921
3937
|
}, [r, i, v.paused]), u.useEffect(() => {
|
|
3922
3938
|
if (i) {
|
|
3923
|
-
|
|
3939
|
+
Qs.add(v);
|
|
3924
3940
|
const h = document.activeElement;
|
|
3925
3941
|
if (!i.contains(h)) {
|
|
3926
|
-
const w = new CustomEvent(Gr,
|
|
3942
|
+
const w = new CustomEvent(Gr, Js);
|
|
3927
3943
|
i.addEventListener(Gr, f), i.dispatchEvent(w), w.defaultPrevented || (hh(wh(fi(i)), { select: !0 }), document.activeElement === h && rt(i));
|
|
3928
3944
|
}
|
|
3929
3945
|
return () => {
|
|
3930
3946
|
i.removeEventListener(Gr, f), setTimeout(() => {
|
|
3931
|
-
const w = new CustomEvent(qr,
|
|
3932
|
-
i.addEventListener(qr, d), i.dispatchEvent(w), w.defaultPrevented || rt(h ?? document.body, { select: !0 }), i.removeEventListener(qr, d),
|
|
3947
|
+
const w = new CustomEvent(qr, Js);
|
|
3948
|
+
i.addEventListener(qr, d), i.dispatchEvent(w), w.defaultPrevented || rt(h ?? document.body, { select: !0 }), i.removeEventListener(qr, d), Qs.remove(v);
|
|
3933
3949
|
}, 0);
|
|
3934
3950
|
};
|
|
3935
3951
|
}
|
|
@@ -3947,14 +3963,14 @@ var Gr = "focusScope.autoFocusOnMount", qr = "focusScope.autoFocusOnUnmount", Zs
|
|
|
3947
3963
|
);
|
|
3948
3964
|
return /* @__PURE__ */ c(ee.div, { tabIndex: -1, ...a, ref: m, onKeyDown: g });
|
|
3949
3965
|
});
|
|
3950
|
-
|
|
3966
|
+
pr.displayName = ph;
|
|
3951
3967
|
function hh(e, { select: t = !1 } = {}) {
|
|
3952
3968
|
const n = document.activeElement;
|
|
3953
3969
|
for (const r of e)
|
|
3954
3970
|
if (rt(r, { select: t }), document.activeElement !== n) return;
|
|
3955
3971
|
}
|
|
3956
3972
|
function mh(e) {
|
|
3957
|
-
const t = fi(e), n =
|
|
3973
|
+
const t = fi(e), n = Zs(t, e), r = Zs(t.reverse(), e);
|
|
3958
3974
|
return [n, r];
|
|
3959
3975
|
}
|
|
3960
3976
|
function fi(e) {
|
|
@@ -3967,7 +3983,7 @@ function fi(e) {
|
|
|
3967
3983
|
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
3968
3984
|
return t;
|
|
3969
3985
|
}
|
|
3970
|
-
function
|
|
3986
|
+
function Zs(e, t) {
|
|
3971
3987
|
for (const n of e)
|
|
3972
3988
|
if (!gh(n, { upTo: t })) return n;
|
|
3973
3989
|
}
|
|
@@ -3989,28 +4005,28 @@ function rt(e, { select: t = !1 } = {}) {
|
|
|
3989
4005
|
e.focus({ preventScroll: !0 }), e !== n && bh(e) && t && e.select();
|
|
3990
4006
|
}
|
|
3991
4007
|
}
|
|
3992
|
-
var
|
|
4008
|
+
var Qs = vh();
|
|
3993
4009
|
function vh() {
|
|
3994
4010
|
let e = [];
|
|
3995
4011
|
return {
|
|
3996
4012
|
add(t) {
|
|
3997
4013
|
const n = e[0];
|
|
3998
|
-
t !== n && (n == null || n.pause()), e =
|
|
4014
|
+
t !== n && (n == null || n.pause()), e = ea(e, t), e.unshift(t);
|
|
3999
4015
|
},
|
|
4000
4016
|
remove(t) {
|
|
4001
4017
|
var n;
|
|
4002
|
-
e =
|
|
4018
|
+
e = ea(e, t), (n = e[0]) == null || n.resume();
|
|
4003
4019
|
}
|
|
4004
4020
|
};
|
|
4005
4021
|
}
|
|
4006
|
-
function
|
|
4022
|
+
function ea(e, t) {
|
|
4007
4023
|
const n = [...e], r = n.indexOf(t);
|
|
4008
4024
|
return r !== -1 && n.splice(r, 1), n;
|
|
4009
4025
|
}
|
|
4010
4026
|
function wh(e) {
|
|
4011
4027
|
return e.filter((t) => t.tagName !== "A");
|
|
4012
4028
|
}
|
|
4013
|
-
const yh = ["top", "right", "bottom", "left"], it = Math.min, Pe = Math.max,
|
|
4029
|
+
const yh = ["top", "right", "bottom", "left"], it = Math.min, Pe = Math.max, Xn = Math.round, Rn = Math.floor, qe = (e) => ({
|
|
4014
4030
|
x: e,
|
|
4015
4031
|
y: e
|
|
4016
4032
|
}), xh = {
|
|
@@ -4031,7 +4047,7 @@ function et(e, t) {
|
|
|
4031
4047
|
function tt(e) {
|
|
4032
4048
|
return e.split("-")[0];
|
|
4033
4049
|
}
|
|
4034
|
-
function
|
|
4050
|
+
function zt(e) {
|
|
4035
4051
|
return e.split("-")[1];
|
|
4036
4052
|
}
|
|
4037
4053
|
function Wo(e) {
|
|
@@ -4049,23 +4065,23 @@ function Vo(e) {
|
|
|
4049
4065
|
}
|
|
4050
4066
|
function Eh(e, t, n) {
|
|
4051
4067
|
n === void 0 && (n = !1);
|
|
4052
|
-
const r =
|
|
4068
|
+
const r = zt(e), o = Vo(e), s = jo(o);
|
|
4053
4069
|
let a = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
4054
|
-
return t.reference[s] > t.floating[s] && (a =
|
|
4070
|
+
return t.reference[s] > t.floating[s] && (a = Yn(a)), [a, Yn(a)];
|
|
4055
4071
|
}
|
|
4056
4072
|
function Nh(e) {
|
|
4057
|
-
const t =
|
|
4073
|
+
const t = Yn(e);
|
|
4058
4074
|
return [go(e), t, go(t)];
|
|
4059
4075
|
}
|
|
4060
4076
|
function go(e) {
|
|
4061
4077
|
return e.replace(/start|end/g, (t) => Sh[t]);
|
|
4062
4078
|
}
|
|
4063
|
-
const
|
|
4079
|
+
const ta = ["left", "right"], na = ["right", "left"], Rh = ["top", "bottom"], Th = ["bottom", "top"];
|
|
4064
4080
|
function Ah(e, t, n) {
|
|
4065
4081
|
switch (e) {
|
|
4066
4082
|
case "top":
|
|
4067
4083
|
case "bottom":
|
|
4068
|
-
return n ? t ?
|
|
4084
|
+
return n ? t ? na : ta : t ? ta : na;
|
|
4069
4085
|
case "left":
|
|
4070
4086
|
case "right":
|
|
4071
4087
|
return t ? Rh : Th;
|
|
@@ -4074,11 +4090,11 @@ function Ah(e, t, n) {
|
|
|
4074
4090
|
}
|
|
4075
4091
|
}
|
|
4076
4092
|
function Ph(e, t, n, r) {
|
|
4077
|
-
const o =
|
|
4093
|
+
const o = zt(e);
|
|
4078
4094
|
let s = Ah(tt(e), n === "start", r);
|
|
4079
4095
|
return o && (s = s.map((a) => a + "-" + o), t && (s = s.concat(s.map(go)))), s;
|
|
4080
4096
|
}
|
|
4081
|
-
function
|
|
4097
|
+
function Yn(e) {
|
|
4082
4098
|
return e.replace(/left|right|bottom|top/g, (t) => xh[t]);
|
|
4083
4099
|
}
|
|
4084
4100
|
function Ih(e) {
|
|
@@ -4098,7 +4114,7 @@ function pi(e) {
|
|
|
4098
4114
|
left: e
|
|
4099
4115
|
};
|
|
4100
4116
|
}
|
|
4101
|
-
function
|
|
4117
|
+
function Jn(e) {
|
|
4102
4118
|
const {
|
|
4103
4119
|
x: t,
|
|
4104
4120
|
y: n,
|
|
@@ -4116,7 +4132,7 @@ function Yn(e) {
|
|
|
4116
4132
|
y: n
|
|
4117
4133
|
};
|
|
4118
4134
|
}
|
|
4119
|
-
function
|
|
4135
|
+
function ra(e, t, n) {
|
|
4120
4136
|
let {
|
|
4121
4137
|
reference: r,
|
|
4122
4138
|
floating: o
|
|
@@ -4154,7 +4170,7 @@ function oa(e, t, n) {
|
|
|
4154
4170
|
y: r.y
|
|
4155
4171
|
};
|
|
4156
4172
|
}
|
|
4157
|
-
switch (
|
|
4173
|
+
switch (zt(t)) {
|
|
4158
4174
|
case "start":
|
|
4159
4175
|
v[a] -= m * (n && f ? -1 : 1);
|
|
4160
4176
|
break;
|
|
@@ -4178,7 +4194,7 @@ const _h = async (e, t, n) => {
|
|
|
4178
4194
|
}), {
|
|
4179
4195
|
x: d,
|
|
4180
4196
|
y: p
|
|
4181
|
-
} =
|
|
4197
|
+
} = ra(f, r, l), m = r, v = {}, g = 0;
|
|
4182
4198
|
for (let h = 0; h < i.length; h++) {
|
|
4183
4199
|
const {
|
|
4184
4200
|
name: b,
|
|
@@ -4215,7 +4231,7 @@ const _h = async (e, t, n) => {
|
|
|
4215
4231
|
}) : R.rects), {
|
|
4216
4232
|
x: d,
|
|
4217
4233
|
y: p
|
|
4218
|
-
} =
|
|
4234
|
+
} = ra(f, m, l)), h = -1);
|
|
4219
4235
|
}
|
|
4220
4236
|
return {
|
|
4221
4237
|
x: d,
|
|
@@ -4225,7 +4241,7 @@ const _h = async (e, t, n) => {
|
|
|
4225
4241
|
middlewareData: v
|
|
4226
4242
|
};
|
|
4227
4243
|
};
|
|
4228
|
-
async function
|
|
4244
|
+
async function tn(e, t) {
|
|
4229
4245
|
var n;
|
|
4230
4246
|
t === void 0 && (t = {});
|
|
4231
4247
|
const {
|
|
@@ -4241,7 +4257,7 @@ async function en(e, t) {
|
|
|
4241
4257
|
elementContext: p = "floating",
|
|
4242
4258
|
altBoundary: m = !1,
|
|
4243
4259
|
padding: v = 0
|
|
4244
|
-
} = et(t, e), g = pi(v), b = i[m ? p === "floating" ? "reference" : "floating" : p], w =
|
|
4260
|
+
} = et(t, e), g = pi(v), b = i[m ? p === "floating" ? "reference" : "floating" : p], w = Jn(await s.getClippingRect({
|
|
4245
4261
|
element: (n = await (s.isElement == null ? void 0 : s.isElement(b))) == null || n ? b : b.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(i.floating)),
|
|
4246
4262
|
boundary: f,
|
|
4247
4263
|
rootBoundary: d,
|
|
@@ -4257,7 +4273,7 @@ async function en(e, t) {
|
|
|
4257
4273
|
} : {
|
|
4258
4274
|
x: 1,
|
|
4259
4275
|
y: 1
|
|
4260
|
-
}, R =
|
|
4276
|
+
}, R = Jn(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
4261
4277
|
elements: i,
|
|
4262
4278
|
rect: x,
|
|
4263
4279
|
offsetParent: y,
|
|
@@ -4294,7 +4310,7 @@ const Oh = (e) => ({
|
|
|
4294
4310
|
}, v = Vo(o), g = jo(v), h = await a.getDimensions(f), b = v === "y", w = b ? "top" : "left", x = b ? "bottom" : "right", y = b ? "clientHeight" : "clientWidth", C = s.reference[g] + s.reference[v] - m[v] - s.floating[g], R = m[v] - s.reference[v], _ = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(f));
|
|
4295
4311
|
let N = _ ? _[y] : 0;
|
|
4296
4312
|
(!N || !await (a.isElement == null ? void 0 : a.isElement(_))) && (N = i.floating[y] || s.floating[g]);
|
|
4297
|
-
const k = C / 2 - R / 2, L = N / 2 - h[g] / 2 - 1, P = it(p[w], L), $ = it(p[x], L), K = P, B = N - h[g] - $, M = N / 2 - h[g] / 2 + k, H = mo(K, M, B), O = !l.arrow &&
|
|
4313
|
+
const k = C / 2 - R / 2, L = N / 2 - h[g] / 2 - 1, P = it(p[w], L), $ = it(p[x], L), K = P, B = N - h[g] - $, M = N / 2 - h[g] / 2 + k, H = mo(K, M, B), O = !l.arrow && zt(o) != null && M !== H && s.reference[g] / 2 - (M < K ? P : $) - h[g] / 2 < 0, G = O ? M < K ? M - K : M - B : 0;
|
|
4298
4314
|
return {
|
|
4299
4315
|
[v]: m[v] + G,
|
|
4300
4316
|
data: {
|
|
@@ -4331,9 +4347,9 @@ const Oh = (e) => ({
|
|
|
4331
4347
|
} = et(e, t);
|
|
4332
4348
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
4333
4349
|
return {};
|
|
4334
|
-
const w = tt(o), x = Ge(i), y = tt(i) === i, C = await (l.isRTL == null ? void 0 : l.isRTL(f.floating)), R = m || (y || !h ? [
|
|
4350
|
+
const w = tt(o), x = Ge(i), y = tt(i) === i, C = await (l.isRTL == null ? void 0 : l.isRTL(f.floating)), R = m || (y || !h ? [Yn(i)] : Nh(i)), _ = g !== "none";
|
|
4335
4351
|
!m && _ && R.push(...Ph(i, h, g, C));
|
|
4336
|
-
const N = [i, ...R], k = await
|
|
4352
|
+
const N = [i, ...R], k = await tn(t, b), L = [];
|
|
4337
4353
|
let P = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
4338
4354
|
if (d && L.push(k[w]), p) {
|
|
4339
4355
|
const M = Eh(o, a, C);
|
|
@@ -4389,7 +4405,7 @@ const Oh = (e) => ({
|
|
|
4389
4405
|
}
|
|
4390
4406
|
};
|
|
4391
4407
|
};
|
|
4392
|
-
function
|
|
4408
|
+
function oa(e, t) {
|
|
4393
4409
|
return {
|
|
4394
4410
|
top: e.top - t.height,
|
|
4395
4411
|
right: e.right - t.width,
|
|
@@ -4397,7 +4413,7 @@ function sa(e, t) {
|
|
|
4397
4413
|
left: e.left - t.width
|
|
4398
4414
|
};
|
|
4399
4415
|
}
|
|
4400
|
-
function
|
|
4416
|
+
function sa(e) {
|
|
4401
4417
|
return yh.some((t) => e[t] >= 0);
|
|
4402
4418
|
}
|
|
4403
4419
|
const Mh = function(e) {
|
|
@@ -4413,26 +4429,26 @@ const Mh = function(e) {
|
|
|
4413
4429
|
} = et(e, t);
|
|
4414
4430
|
switch (r) {
|
|
4415
4431
|
case "referenceHidden": {
|
|
4416
|
-
const s = await
|
|
4432
|
+
const s = await tn(t, {
|
|
4417
4433
|
...o,
|
|
4418
4434
|
elementContext: "reference"
|
|
4419
|
-
}), a =
|
|
4435
|
+
}), a = oa(s, n.reference);
|
|
4420
4436
|
return {
|
|
4421
4437
|
data: {
|
|
4422
4438
|
referenceHiddenOffsets: a,
|
|
4423
|
-
referenceHidden:
|
|
4439
|
+
referenceHidden: sa(a)
|
|
4424
4440
|
}
|
|
4425
4441
|
};
|
|
4426
4442
|
}
|
|
4427
4443
|
case "escaped": {
|
|
4428
|
-
const s = await
|
|
4444
|
+
const s = await tn(t, {
|
|
4429
4445
|
...o,
|
|
4430
4446
|
altBoundary: !0
|
|
4431
|
-
}), a =
|
|
4447
|
+
}), a = oa(s, n.floating);
|
|
4432
4448
|
return {
|
|
4433
4449
|
data: {
|
|
4434
4450
|
escapedOffsets: a,
|
|
4435
|
-
escaped:
|
|
4451
|
+
escaped: sa(a)
|
|
4436
4452
|
}
|
|
4437
4453
|
};
|
|
4438
4454
|
}
|
|
@@ -4447,7 +4463,7 @@ async function Dh(e, t) {
|
|
|
4447
4463
|
placement: n,
|
|
4448
4464
|
platform: r,
|
|
4449
4465
|
elements: o
|
|
4450
|
-
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), a = tt(n), i =
|
|
4466
|
+
} = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), a = tt(n), i = zt(n), l = Ge(n) === "y", f = hi.has(a) ? -1 : 1, d = s && l ? -1 : 1, p = et(t, e);
|
|
4451
4467
|
let {
|
|
4452
4468
|
mainAxis: m,
|
|
4453
4469
|
crossAxis: v,
|
|
@@ -4519,7 +4535,7 @@ const Lh = function(e) {
|
|
|
4519
4535
|
} = et(e, t), f = {
|
|
4520
4536
|
x: n,
|
|
4521
4537
|
y: r
|
|
4522
|
-
}, d = await
|
|
4538
|
+
}, d = await tn(t, l), p = Ge(tt(o)), m = Wo(p);
|
|
4523
4539
|
let v = f[m], g = f[p];
|
|
4524
4540
|
if (s) {
|
|
4525
4541
|
const b = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", x = v + d[b], y = v - d[w];
|
|
@@ -4604,7 +4620,7 @@ const Lh = function(e) {
|
|
|
4604
4620
|
apply: l = () => {
|
|
4605
4621
|
},
|
|
4606
4622
|
...f
|
|
4607
|
-
} = et(e, t), d = await
|
|
4623
|
+
} = et(e, t), d = await tn(t, f), p = tt(o), m = zt(o), v = Ge(o) === "y", {
|
|
4608
4624
|
width: g,
|
|
4609
4625
|
height: h
|
|
4610
4626
|
} = s.floating;
|
|
@@ -4630,10 +4646,10 @@ const Lh = function(e) {
|
|
|
4630
4646
|
}
|
|
4631
4647
|
};
|
|
4632
4648
|
};
|
|
4633
|
-
function
|
|
4649
|
+
function hr() {
|
|
4634
4650
|
return typeof window < "u";
|
|
4635
4651
|
}
|
|
4636
|
-
function
|
|
4652
|
+
function Wt(e) {
|
|
4637
4653
|
return mi(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
4638
4654
|
}
|
|
4639
4655
|
function Ie(e) {
|
|
@@ -4645,19 +4661,19 @@ function Ye(e) {
|
|
|
4645
4661
|
return (t = (mi(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
4646
4662
|
}
|
|
4647
4663
|
function mi(e) {
|
|
4648
|
-
return
|
|
4664
|
+
return hr() ? e instanceof Node || e instanceof Ie(e).Node : !1;
|
|
4649
4665
|
}
|
|
4650
4666
|
function Be(e) {
|
|
4651
|
-
return
|
|
4667
|
+
return hr() ? e instanceof Element || e instanceof Ie(e).Element : !1;
|
|
4652
4668
|
}
|
|
4653
4669
|
function Xe(e) {
|
|
4654
|
-
return
|
|
4670
|
+
return hr() ? e instanceof HTMLElement || e instanceof Ie(e).HTMLElement : !1;
|
|
4655
4671
|
}
|
|
4656
|
-
function
|
|
4657
|
-
return !
|
|
4672
|
+
function aa(e) {
|
|
4673
|
+
return !hr() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Ie(e).ShadowRoot;
|
|
4658
4674
|
}
|
|
4659
4675
|
const Uh = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
4660
|
-
function
|
|
4676
|
+
function hn(e) {
|
|
4661
4677
|
const {
|
|
4662
4678
|
overflow: t,
|
|
4663
4679
|
overflowX: n,
|
|
@@ -4668,10 +4684,10 @@ function pn(e) {
|
|
|
4668
4684
|
}
|
|
4669
4685
|
const Hh = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
4670
4686
|
function zh(e) {
|
|
4671
|
-
return Hh.has(
|
|
4687
|
+
return Hh.has(Wt(e));
|
|
4672
4688
|
}
|
|
4673
4689
|
const Wh = [":popover-open", ":modal"];
|
|
4674
|
-
function
|
|
4690
|
+
function mr(e) {
|
|
4675
4691
|
return Wh.some((t) => {
|
|
4676
4692
|
try {
|
|
4677
4693
|
return e.matches(t);
|
|
@@ -4687,10 +4703,10 @@ function Ko(e) {
|
|
|
4687
4703
|
}
|
|
4688
4704
|
function Gh(e) {
|
|
4689
4705
|
let t = ct(e);
|
|
4690
|
-
for (; Xe(t) && !
|
|
4706
|
+
for (; Xe(t) && !Lt(t); ) {
|
|
4691
4707
|
if (Ko(t))
|
|
4692
4708
|
return t;
|
|
4693
|
-
if (
|
|
4709
|
+
if (mr(t))
|
|
4694
4710
|
return null;
|
|
4695
4711
|
t = ct(t);
|
|
4696
4712
|
}
|
|
@@ -4700,13 +4716,13 @@ function Go() {
|
|
|
4700
4716
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
4701
4717
|
}
|
|
4702
4718
|
const qh = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
4703
|
-
function
|
|
4704
|
-
return qh.has(
|
|
4719
|
+
function Lt(e) {
|
|
4720
|
+
return qh.has(Wt(e));
|
|
4705
4721
|
}
|
|
4706
4722
|
function Ue(e) {
|
|
4707
4723
|
return Ie(e).getComputedStyle(e);
|
|
4708
4724
|
}
|
|
4709
|
-
function
|
|
4725
|
+
function gr(e) {
|
|
4710
4726
|
return Be(e) ? {
|
|
4711
4727
|
scrollLeft: e.scrollLeft,
|
|
4712
4728
|
scrollTop: e.scrollTop
|
|
@@ -4716,30 +4732,30 @@ function mr(e) {
|
|
|
4716
4732
|
};
|
|
4717
4733
|
}
|
|
4718
4734
|
function ct(e) {
|
|
4719
|
-
if (
|
|
4735
|
+
if (Wt(e) === "html")
|
|
4720
4736
|
return e;
|
|
4721
4737
|
const t = (
|
|
4722
4738
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
4723
4739
|
e.assignedSlot || // DOM Element detected.
|
|
4724
4740
|
e.parentNode || // ShadowRoot detected.
|
|
4725
|
-
|
|
4741
|
+
aa(e) && e.host || // Fallback.
|
|
4726
4742
|
Ye(e)
|
|
4727
4743
|
);
|
|
4728
|
-
return
|
|
4744
|
+
return aa(t) ? t.host : t;
|
|
4729
4745
|
}
|
|
4730
4746
|
function gi(e) {
|
|
4731
4747
|
const t = ct(e);
|
|
4732
|
-
return
|
|
4748
|
+
return Lt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Xe(t) && hn(t) ? t : gi(t);
|
|
4733
4749
|
}
|
|
4734
|
-
function
|
|
4750
|
+
function nn(e, t, n) {
|
|
4735
4751
|
var r;
|
|
4736
4752
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
4737
4753
|
const o = gi(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), a = Ie(o);
|
|
4738
4754
|
if (s) {
|
|
4739
4755
|
const i = bo(a);
|
|
4740
|
-
return t.concat(a, a.visualViewport || [],
|
|
4756
|
+
return t.concat(a, a.visualViewport || [], hn(o) ? o : [], i && n ? nn(i) : []);
|
|
4741
4757
|
}
|
|
4742
|
-
return t.concat(o,
|
|
4758
|
+
return t.concat(o, nn(o, [], n));
|
|
4743
4759
|
}
|
|
4744
4760
|
function bo(e) {
|
|
4745
4761
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
@@ -4747,7 +4763,7 @@ function bo(e) {
|
|
|
4747
4763
|
function bi(e) {
|
|
4748
4764
|
const t = Ue(e);
|
|
4749
4765
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
4750
|
-
const o = Xe(e), s = o ? e.offsetWidth : n, a = o ? e.offsetHeight : r, i =
|
|
4766
|
+
const o = Xe(e), s = o ? e.offsetWidth : n, a = o ? e.offsetHeight : r, i = Xn(n) !== s || Xn(r) !== a;
|
|
4751
4767
|
return i && (n = s, r = a), {
|
|
4752
4768
|
width: n,
|
|
4753
4769
|
height: r,
|
|
@@ -4757,7 +4773,7 @@ function bi(e) {
|
|
|
4757
4773
|
function qo(e) {
|
|
4758
4774
|
return Be(e) ? e : e.contextElement;
|
|
4759
4775
|
}
|
|
4760
|
-
function
|
|
4776
|
+
function Ot(e) {
|
|
4761
4777
|
const t = qo(e);
|
|
4762
4778
|
if (!Xe(t))
|
|
4763
4779
|
return qe(1);
|
|
@@ -4766,7 +4782,7 @@ function _t(e) {
|
|
|
4766
4782
|
height: o,
|
|
4767
4783
|
$: s
|
|
4768
4784
|
} = bi(t);
|
|
4769
|
-
let a = (s ?
|
|
4785
|
+
let a = (s ? Xn(n.width) : n.width) / r, i = (s ? Xn(n.height) : n.height) / o;
|
|
4770
4786
|
return (!a || !Number.isFinite(a)) && (a = 1), (!i || !Number.isFinite(i)) && (i = 1), {
|
|
4771
4787
|
x: a,
|
|
4772
4788
|
y: i
|
|
@@ -4787,30 +4803,30 @@ function bt(e, t, n, r) {
|
|
|
4787
4803
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
4788
4804
|
const o = e.getBoundingClientRect(), s = qo(e);
|
|
4789
4805
|
let a = qe(1);
|
|
4790
|
-
t && (r ? Be(r) && (a =
|
|
4806
|
+
t && (r ? Be(r) && (a = Ot(r)) : a = Ot(e));
|
|
4791
4807
|
const i = Yh(s, n, r) ? vi(s) : qe(0);
|
|
4792
4808
|
let l = (o.left + i.x) / a.x, f = (o.top + i.y) / a.y, d = o.width / a.x, p = o.height / a.y;
|
|
4793
4809
|
if (s) {
|
|
4794
4810
|
const m = Ie(s), v = r && Be(r) ? Ie(r) : r;
|
|
4795
4811
|
let g = m, h = bo(g);
|
|
4796
4812
|
for (; h && r && v !== g; ) {
|
|
4797
|
-
const b =
|
|
4813
|
+
const b = Ot(h), w = h.getBoundingClientRect(), x = Ue(h), y = w.left + (h.clientLeft + parseFloat(x.paddingLeft)) * b.x, C = w.top + (h.clientTop + parseFloat(x.paddingTop)) * b.y;
|
|
4798
4814
|
l *= b.x, f *= b.y, d *= b.x, p *= b.y, l += y, f += C, g = Ie(h), h = bo(g);
|
|
4799
4815
|
}
|
|
4800
4816
|
}
|
|
4801
|
-
return
|
|
4817
|
+
return Jn({
|
|
4802
4818
|
width: d,
|
|
4803
4819
|
height: p,
|
|
4804
4820
|
x: l,
|
|
4805
4821
|
y: f
|
|
4806
4822
|
});
|
|
4807
4823
|
}
|
|
4808
|
-
function
|
|
4809
|
-
const n =
|
|
4824
|
+
function br(e, t) {
|
|
4825
|
+
const n = gr(e).scrollLeft;
|
|
4810
4826
|
return t ? t.left + n : bt(Ye(e)).left + n;
|
|
4811
4827
|
}
|
|
4812
4828
|
function wi(e, t) {
|
|
4813
|
-
const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft -
|
|
4829
|
+
const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft - br(e, n), o = n.top + t.scrollTop;
|
|
4814
4830
|
return {
|
|
4815
4831
|
x: r,
|
|
4816
4832
|
y: o
|
|
@@ -4823,7 +4839,7 @@ function Jh(e) {
|
|
|
4823
4839
|
offsetParent: r,
|
|
4824
4840
|
strategy: o
|
|
4825
4841
|
} = e;
|
|
4826
|
-
const s = o === "fixed", a = Ye(r), i = t ?
|
|
4842
|
+
const s = o === "fixed", a = Ye(r), i = t ? mr(t.floating) : !1;
|
|
4827
4843
|
if (r === a || i && s)
|
|
4828
4844
|
return n;
|
|
4829
4845
|
let l = {
|
|
@@ -4831,9 +4847,9 @@ function Jh(e) {
|
|
|
4831
4847
|
scrollTop: 0
|
|
4832
4848
|
}, f = qe(1);
|
|
4833
4849
|
const d = qe(0), p = Xe(r);
|
|
4834
|
-
if ((p || !p && !s) && ((
|
|
4850
|
+
if ((p || !p && !s) && ((Wt(r) !== "body" || hn(a)) && (l = gr(r)), Xe(r))) {
|
|
4835
4851
|
const v = bt(r);
|
|
4836
|
-
f =
|
|
4852
|
+
f = Ot(r), d.x = v.x + r.clientLeft, d.y = v.y + r.clientTop;
|
|
4837
4853
|
}
|
|
4838
4854
|
const m = a && !p && !s ? wi(a, l) : qe(0);
|
|
4839
4855
|
return {
|
|
@@ -4847,8 +4863,8 @@ function Zh(e) {
|
|
|
4847
4863
|
return Array.from(e.getClientRects());
|
|
4848
4864
|
}
|
|
4849
4865
|
function Qh(e) {
|
|
4850
|
-
const t = Ye(e), n =
|
|
4851
|
-
let a = -n.scrollLeft +
|
|
4866
|
+
const t = Ye(e), n = gr(e), r = e.ownerDocument.body, o = Pe(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = Pe(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
4867
|
+
let a = -n.scrollLeft + br(e);
|
|
4852
4868
|
const i = -n.scrollTop;
|
|
4853
4869
|
return Ue(r).direction === "rtl" && (a += Pe(t.clientWidth, r.clientWidth) - o), {
|
|
4854
4870
|
width: o,
|
|
@@ -4857,7 +4873,7 @@ function Qh(e) {
|
|
|
4857
4873
|
y: i
|
|
4858
4874
|
};
|
|
4859
4875
|
}
|
|
4860
|
-
const
|
|
4876
|
+
const ia = 25;
|
|
4861
4877
|
function em(e, t) {
|
|
4862
4878
|
const n = Ie(e), r = Ye(e), o = n.visualViewport;
|
|
4863
4879
|
let s = r.clientWidth, a = r.clientHeight, i = 0, l = 0;
|
|
@@ -4866,11 +4882,11 @@ function em(e, t) {
|
|
|
4866
4882
|
const d = Go();
|
|
4867
4883
|
(!d || d && t === "fixed") && (i = o.offsetLeft, l = o.offsetTop);
|
|
4868
4884
|
}
|
|
4869
|
-
const f =
|
|
4885
|
+
const f = br(r);
|
|
4870
4886
|
if (f <= 0) {
|
|
4871
4887
|
const d = r.ownerDocument, p = d.body, m = getComputedStyle(p), v = d.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, g = Math.abs(r.clientWidth - p.clientWidth - v);
|
|
4872
|
-
g <=
|
|
4873
|
-
} else f <=
|
|
4888
|
+
g <= ia && (s -= g);
|
|
4889
|
+
} else f <= ia && (s += f);
|
|
4874
4890
|
return {
|
|
4875
4891
|
width: s,
|
|
4876
4892
|
height: a,
|
|
@@ -4880,7 +4896,7 @@ function em(e, t) {
|
|
|
4880
4896
|
}
|
|
4881
4897
|
const tm = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
4882
4898
|
function nm(e, t) {
|
|
4883
|
-
const n = bt(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Xe(e) ?
|
|
4899
|
+
const n = bt(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Xe(e) ? Ot(e) : qe(1), a = e.clientWidth * s.x, i = e.clientHeight * s.y, l = o * s.x, f = r * s.y;
|
|
4884
4900
|
return {
|
|
4885
4901
|
width: a,
|
|
4886
4902
|
height: i,
|
|
@@ -4888,7 +4904,7 @@ function nm(e, t) {
|
|
|
4888
4904
|
y: f
|
|
4889
4905
|
};
|
|
4890
4906
|
}
|
|
4891
|
-
function
|
|
4907
|
+
function ca(e, t, n) {
|
|
4892
4908
|
let r;
|
|
4893
4909
|
if (t === "viewport")
|
|
4894
4910
|
r = em(e, n);
|
|
@@ -4905,22 +4921,22 @@ function la(e, t, n) {
|
|
|
4905
4921
|
height: t.height
|
|
4906
4922
|
};
|
|
4907
4923
|
}
|
|
4908
|
-
return
|
|
4924
|
+
return Jn(r);
|
|
4909
4925
|
}
|
|
4910
4926
|
function yi(e, t) {
|
|
4911
4927
|
const n = ct(e);
|
|
4912
|
-
return n === t || !Be(n) ||
|
|
4928
|
+
return n === t || !Be(n) || Lt(n) ? !1 : Ue(n).position === "fixed" || yi(n, t);
|
|
4913
4929
|
}
|
|
4914
4930
|
function rm(e, t) {
|
|
4915
4931
|
const n = t.get(e);
|
|
4916
4932
|
if (n)
|
|
4917
4933
|
return n;
|
|
4918
|
-
let r =
|
|
4934
|
+
let r = nn(e, [], !1).filter((i) => Be(i) && Wt(i) !== "body"), o = null;
|
|
4919
4935
|
const s = Ue(e).position === "fixed";
|
|
4920
4936
|
let a = s ? ct(e) : e;
|
|
4921
|
-
for (; Be(a) && !
|
|
4937
|
+
for (; Be(a) && !Lt(a); ) {
|
|
4922
4938
|
const i = Ue(a), l = Ko(a);
|
|
4923
|
-
!l && i.position === "fixed" && (o = null), (s ? !l && !o : !l && i.position === "static" && !!o && tm.has(o.position) ||
|
|
4939
|
+
!l && i.position === "fixed" && (o = null), (s ? !l && !o : !l && i.position === "static" && !!o && tm.has(o.position) || hn(a) && !l && yi(e, a)) ? r = r.filter((d) => d !== a) : o = i, a = ct(a);
|
|
4924
4940
|
}
|
|
4925
4941
|
return t.set(e, r), r;
|
|
4926
4942
|
}
|
|
@@ -4931,10 +4947,10 @@ function om(e) {
|
|
|
4931
4947
|
rootBoundary: r,
|
|
4932
4948
|
strategy: o
|
|
4933
4949
|
} = e;
|
|
4934
|
-
const a = [...n === "clippingAncestors" ?
|
|
4935
|
-
const p =
|
|
4950
|
+
const a = [...n === "clippingAncestors" ? mr(t) ? [] : rm(t, this._c) : [].concat(n), r], i = a[0], l = a.reduce((f, d) => {
|
|
4951
|
+
const p = ca(t, d, o);
|
|
4936
4952
|
return f.top = Pe(p.top, f.top), f.right = it(p.right, f.right), f.bottom = it(p.bottom, f.bottom), f.left = Pe(p.left, f.left), f;
|
|
4937
|
-
},
|
|
4953
|
+
}, ca(t, i, o));
|
|
4938
4954
|
return {
|
|
4939
4955
|
width: l.right - l.left,
|
|
4940
4956
|
height: l.bottom - l.top,
|
|
@@ -4960,10 +4976,10 @@ function am(e, t, n) {
|
|
|
4960
4976
|
};
|
|
4961
4977
|
const l = qe(0);
|
|
4962
4978
|
function f() {
|
|
4963
|
-
l.x =
|
|
4979
|
+
l.x = br(o);
|
|
4964
4980
|
}
|
|
4965
4981
|
if (r || !r && !s)
|
|
4966
|
-
if ((
|
|
4982
|
+
if ((Wt(t) !== "body" || hn(o)) && (i = gr(t)), r) {
|
|
4967
4983
|
const v = bt(t, !0, s, t);
|
|
4968
4984
|
l.x = v.x + t.clientLeft, l.y = v.y + t.clientTop;
|
|
4969
4985
|
} else o && f();
|
|
@@ -4979,7 +4995,7 @@ function am(e, t, n) {
|
|
|
4979
4995
|
function Xr(e) {
|
|
4980
4996
|
return Ue(e).position === "static";
|
|
4981
4997
|
}
|
|
4982
|
-
function
|
|
4998
|
+
function la(e, t) {
|
|
4983
4999
|
if (!Xe(e) || Ue(e).position === "fixed")
|
|
4984
5000
|
return null;
|
|
4985
5001
|
if (t)
|
|
@@ -4989,21 +5005,21 @@ function ua(e, t) {
|
|
|
4989
5005
|
}
|
|
4990
5006
|
function xi(e, t) {
|
|
4991
5007
|
const n = Ie(e);
|
|
4992
|
-
if (
|
|
5008
|
+
if (mr(e))
|
|
4993
5009
|
return n;
|
|
4994
5010
|
if (!Xe(e)) {
|
|
4995
5011
|
let o = ct(e);
|
|
4996
|
-
for (; o && !
|
|
5012
|
+
for (; o && !Lt(o); ) {
|
|
4997
5013
|
if (Be(o) && !Xr(o))
|
|
4998
5014
|
return o;
|
|
4999
5015
|
o = ct(o);
|
|
5000
5016
|
}
|
|
5001
5017
|
return n;
|
|
5002
5018
|
}
|
|
5003
|
-
let r =
|
|
5019
|
+
let r = la(e, t);
|
|
5004
5020
|
for (; r && zh(r) && Xr(r); )
|
|
5005
|
-
r =
|
|
5006
|
-
return r &&
|
|
5021
|
+
r = la(r, t);
|
|
5022
|
+
return r && Lt(r) && Xr(r) && !Ko(r) ? n : r || Gh(e) || n;
|
|
5007
5023
|
}
|
|
5008
5024
|
const im = async function(e) {
|
|
5009
5025
|
const t = this.getOffsetParent || xi, n = this.getDimensions, r = await n(e.floating);
|
|
@@ -5028,7 +5044,7 @@ const lm = {
|
|
|
5028
5044
|
getElementRects: im,
|
|
5029
5045
|
getClientRects: Zh,
|
|
5030
5046
|
getDimensions: sm,
|
|
5031
|
-
getScale:
|
|
5047
|
+
getScale: Ot,
|
|
5032
5048
|
isElement: Be,
|
|
5033
5049
|
isRTL: cm
|
|
5034
5050
|
};
|
|
@@ -5052,7 +5068,7 @@ function um(e, t) {
|
|
|
5052
5068
|
} = f;
|
|
5053
5069
|
if (i || t(), !m || !v)
|
|
5054
5070
|
return;
|
|
5055
|
-
const g =
|
|
5071
|
+
const g = Rn(p), h = Rn(o.clientWidth - (d + m)), b = Rn(o.clientHeight - (p + v)), w = Rn(d), y = {
|
|
5056
5072
|
rootMargin: -g + "px " + -h + "px " + -b + "px " + -w + "px",
|
|
5057
5073
|
threshold: Pe(0, it(1, l)) || 1
|
|
5058
5074
|
};
|
|
@@ -5089,7 +5105,7 @@ function dm(e, t, n, r) {
|
|
|
5089
5105
|
elementResize: a = typeof ResizeObserver == "function",
|
|
5090
5106
|
layoutShift: i = typeof IntersectionObserver == "function",
|
|
5091
5107
|
animationFrame: l = !1
|
|
5092
|
-
} = r, f = qo(e), d = o || s ? [...f ?
|
|
5108
|
+
} = r, f = qo(e), d = o || s ? [...f ? nn(f) : [], ...nn(t)] : [];
|
|
5093
5109
|
d.forEach((w) => {
|
|
5094
5110
|
o && w.addEventListener("scroll", n, {
|
|
5095
5111
|
passive: !0
|
|
@@ -5117,7 +5133,7 @@ function dm(e, t, n, r) {
|
|
|
5117
5133
|
}), p == null || p(), (w = v) == null || w.disconnect(), v = null, l && cancelAnimationFrame(g);
|
|
5118
5134
|
};
|
|
5119
5135
|
}
|
|
5120
|
-
const fm = Lh, pm = Fh, hm = kh, mm = Bh, gm = Mh,
|
|
5136
|
+
const fm = Lh, pm = Fh, hm = kh, mm = Bh, gm = Mh, ua = Oh, bm = $h, vm = (e, t, n) => {
|
|
5121
5137
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
5122
5138
|
platform: lm,
|
|
5123
5139
|
...n
|
|
@@ -5131,8 +5147,8 @@ const fm = Lh, pm = Fh, hm = kh, mm = Bh, gm = Mh, da = Oh, bm = $h, vm = (e, t,
|
|
|
5131
5147
|
});
|
|
5132
5148
|
};
|
|
5133
5149
|
var wm = typeof document < "u", ym = function() {
|
|
5134
|
-
},
|
|
5135
|
-
function
|
|
5150
|
+
}, Ln = wm ? rd : ym;
|
|
5151
|
+
function Zn(e, t) {
|
|
5136
5152
|
if (e === t)
|
|
5137
5153
|
return !0;
|
|
5138
5154
|
if (typeof e != typeof t)
|
|
@@ -5144,7 +5160,7 @@ function Jn(e, t) {
|
|
|
5144
5160
|
if (Array.isArray(e)) {
|
|
5145
5161
|
if (n = e.length, n !== t.length) return !1;
|
|
5146
5162
|
for (r = n; r-- !== 0; )
|
|
5147
|
-
if (!
|
|
5163
|
+
if (!Zn(e[r], t[r]))
|
|
5148
5164
|
return !1;
|
|
5149
5165
|
return !0;
|
|
5150
5166
|
}
|
|
@@ -5155,7 +5171,7 @@ function Jn(e, t) {
|
|
|
5155
5171
|
return !1;
|
|
5156
5172
|
for (r = n; r-- !== 0; ) {
|
|
5157
5173
|
const s = o[r];
|
|
5158
|
-
if (!(s === "_owner" && e.$$typeof) && !
|
|
5174
|
+
if (!(s === "_owner" && e.$$typeof) && !Zn(e[s], t[s]))
|
|
5159
5175
|
return !1;
|
|
5160
5176
|
}
|
|
5161
5177
|
return !0;
|
|
@@ -5165,13 +5181,13 @@ function Jn(e, t) {
|
|
|
5165
5181
|
function Ci(e) {
|
|
5166
5182
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
5167
5183
|
}
|
|
5168
|
-
function
|
|
5184
|
+
function da(e, t) {
|
|
5169
5185
|
const n = Ci(e);
|
|
5170
5186
|
return Math.round(t * n) / n;
|
|
5171
5187
|
}
|
|
5172
5188
|
function Yr(e) {
|
|
5173
5189
|
const t = u.useRef(e);
|
|
5174
|
-
return
|
|
5190
|
+
return Ln(() => {
|
|
5175
5191
|
t.current = e;
|
|
5176
5192
|
}), t;
|
|
5177
5193
|
}
|
|
@@ -5197,7 +5213,7 @@ function xm(e) {
|
|
|
5197
5213
|
middlewareData: {},
|
|
5198
5214
|
isPositioned: !1
|
|
5199
5215
|
}), [m, v] = u.useState(r);
|
|
5200
|
-
|
|
5216
|
+
Zn(m, r) || v(r);
|
|
5201
5217
|
const [g, h] = u.useState(null), [b, w] = u.useState(null), x = u.useCallback((D) => {
|
|
5202
5218
|
D !== _.current && (_.current = D, h(D));
|
|
5203
5219
|
}, []), y = u.useCallback((D) => {
|
|
@@ -5219,21 +5235,21 @@ function xm(e) {
|
|
|
5219
5235
|
// setting it to `true` when `open === false` (must be specified).
|
|
5220
5236
|
isPositioned: K.current !== !1
|
|
5221
5237
|
};
|
|
5222
|
-
M.current && !
|
|
5238
|
+
M.current && !Zn(k.current, Q) && (k.current = Q, sr.flushSync(() => {
|
|
5223
5239
|
p(Q);
|
|
5224
5240
|
}));
|
|
5225
5241
|
});
|
|
5226
5242
|
}, [m, t, n, $, K]);
|
|
5227
|
-
|
|
5243
|
+
Ln(() => {
|
|
5228
5244
|
f === !1 && k.current.isPositioned && (k.current.isPositioned = !1, p((D) => ({
|
|
5229
5245
|
...D,
|
|
5230
5246
|
isPositioned: !1
|
|
5231
5247
|
})));
|
|
5232
5248
|
}, [f]);
|
|
5233
5249
|
const M = u.useRef(!1);
|
|
5234
|
-
|
|
5250
|
+
Ln(() => (M.current = !0, () => {
|
|
5235
5251
|
M.current = !1;
|
|
5236
|
-
}), []),
|
|
5252
|
+
}), []), Ln(() => {
|
|
5237
5253
|
if (C && (_.current = C), R && (N.current = R), C && R) {
|
|
5238
5254
|
if (P.current)
|
|
5239
5255
|
return P.current(C, R, B);
|
|
@@ -5256,7 +5272,7 @@ function xm(e) {
|
|
|
5256
5272
|
};
|
|
5257
5273
|
if (!O.floating)
|
|
5258
5274
|
return D;
|
|
5259
|
-
const T =
|
|
5275
|
+
const T = da(O.floating, d.x), Q = da(O.floating, d.y);
|
|
5260
5276
|
return i ? {
|
|
5261
5277
|
...D,
|
|
5262
5278
|
transform: "translate(" + T + "px, " + Q + "px)",
|
|
@@ -5289,10 +5305,10 @@ const Sm = (e) => {
|
|
|
5289
5305
|
element: r,
|
|
5290
5306
|
padding: o
|
|
5291
5307
|
} = typeof e == "function" ? e(n) : e;
|
|
5292
|
-
return r && t(r) ? r.current != null ?
|
|
5308
|
+
return r && t(r) ? r.current != null ? ua({
|
|
5293
5309
|
element: r.current,
|
|
5294
5310
|
padding: o
|
|
5295
|
-
}).fn(n) : {} : r ?
|
|
5311
|
+
}).fn(n) : {} : r ? ua({
|
|
5296
5312
|
element: r,
|
|
5297
5313
|
padding: o
|
|
5298
5314
|
}).fn(n) : {};
|
|
@@ -5359,7 +5375,7 @@ function Ni(e) {
|
|
|
5359
5375
|
n(void 0);
|
|
5360
5376
|
}, [e]), t;
|
|
5361
5377
|
}
|
|
5362
|
-
var Xo = "Popper", [Ri,
|
|
5378
|
+
var Xo = "Popper", [Ri, jt] = ze(Xo), [Om, Ti] = Ri(Xo), Ai = (e) => {
|
|
5363
5379
|
const { __scopePopper: t, children: n } = e, [r, o] = u.useState(null);
|
|
5364
5380
|
return /* @__PURE__ */ c(Om, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
5365
5381
|
};
|
|
@@ -5557,21 +5573,21 @@ function Mi(e) {
|
|
|
5557
5573
|
const [t, n = "center"] = e.split("-");
|
|
5558
5574
|
return [t, n];
|
|
5559
5575
|
}
|
|
5560
|
-
var Jo = Ai, Zo = Ii, Qo = _i, es = ki, $m = "Portal",
|
|
5576
|
+
var Jo = Ai, Zo = Ii, Qo = _i, es = ki, $m = "Portal", vr = u.forwardRef((e, t) => {
|
|
5561
5577
|
var i;
|
|
5562
5578
|
const { container: n, ...r } = e, [o, s] = u.useState(!1);
|
|
5563
5579
|
we(() => s(!0), []);
|
|
5564
5580
|
const a = n || o && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
|
|
5565
5581
|
return a ? Ad.createPortal(/* @__PURE__ */ c(ee.div, { ...r, ref: t }), a) : null;
|
|
5566
5582
|
});
|
|
5567
|
-
|
|
5568
|
-
var Jr = "rovingFocusGroup.onEntryFocus", Bm = { bubbles: !1, cancelable: !0 },
|
|
5569
|
-
|
|
5583
|
+
vr.displayName = $m;
|
|
5584
|
+
var Jr = "rovingFocusGroup.onEntryFocus", Bm = { bubbles: !1, cancelable: !0 }, mn = "RovingFocusGroup", [vo, Di, Um] = Ho(mn), [Hm, Li] = ze(
|
|
5585
|
+
mn,
|
|
5570
5586
|
[Um]
|
|
5571
|
-
), [zm, Wm] = Hm(
|
|
5587
|
+
), [zm, Wm] = Hm(mn), Fi = u.forwardRef(
|
|
5572
5588
|
(e, t) => /* @__PURE__ */ c(vo.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c(vo.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c(jm, { ...e, ref: t }) }) })
|
|
5573
5589
|
);
|
|
5574
|
-
Fi.displayName =
|
|
5590
|
+
Fi.displayName = mn;
|
|
5575
5591
|
var jm = u.forwardRef((e, t) => {
|
|
5576
5592
|
const {
|
|
5577
5593
|
__scopeRovingFocusGroup: n,
|
|
@@ -5584,11 +5600,11 @@ var jm = u.forwardRef((e, t) => {
|
|
|
5584
5600
|
onEntryFocus: f,
|
|
5585
5601
|
preventScrollOnEntryFocus: d = !1,
|
|
5586
5602
|
...p
|
|
5587
|
-
} = e, m = u.useRef(null), v = ae(t, m), g =
|
|
5603
|
+
} = e, m = u.useRef(null), v = ae(t, m), g = fr(s), [h, b] = at({
|
|
5588
5604
|
prop: a,
|
|
5589
5605
|
defaultProp: i ?? null,
|
|
5590
5606
|
onChange: l,
|
|
5591
|
-
caller:
|
|
5607
|
+
caller: mn
|
|
5592
5608
|
}), [w, x] = u.useState(!1), y = ye(f), C = Di(n), R = u.useRef(!1), [_, N] = u.useState(0);
|
|
5593
5609
|
return u.useEffect(() => {
|
|
5594
5610
|
const k = m.current;
|
|
@@ -5734,7 +5750,7 @@ var Xm = Fi, Ym = Bi, Jm = function(e) {
|
|
|
5734
5750
|
return null;
|
|
5735
5751
|
var t = Array.isArray(e) ? e[0] : e;
|
|
5736
5752
|
return t.ownerDocument.body;
|
|
5737
|
-
},
|
|
5753
|
+
}, Tt = /* @__PURE__ */ new WeakMap(), Tn = /* @__PURE__ */ new WeakMap(), An = {}, Zr = 0, Hi = function(e) {
|
|
5738
5754
|
return e && (e.host || Hi(e.parentNode));
|
|
5739
5755
|
}, Zm = function(e, t) {
|
|
5740
5756
|
return t.map(function(n) {
|
|
@@ -5747,8 +5763,8 @@ var Xm = Fi, Ym = Bi, Jm = function(e) {
|
|
|
5747
5763
|
});
|
|
5748
5764
|
}, Qm = function(e, t, n, r) {
|
|
5749
5765
|
var o = Zm(t, Array.isArray(e) ? e : [e]);
|
|
5750
|
-
|
|
5751
|
-
var s =
|
|
5766
|
+
An[n] || (An[n] = /* @__PURE__ */ new WeakMap());
|
|
5767
|
+
var s = An[n], a = [], i = /* @__PURE__ */ new Set(), l = new Set(o), f = function(p) {
|
|
5752
5768
|
!p || i.has(p) || (i.add(p), f(p.parentNode));
|
|
5753
5769
|
};
|
|
5754
5770
|
o.forEach(f);
|
|
@@ -5758,8 +5774,8 @@ var Xm = Fi, Ym = Bi, Jm = function(e) {
|
|
|
5758
5774
|
d(m);
|
|
5759
5775
|
else
|
|
5760
5776
|
try {
|
|
5761
|
-
var v = m.getAttribute(r), g = v !== null && v !== "false", h = (
|
|
5762
|
-
|
|
5777
|
+
var v = m.getAttribute(r), g = v !== null && v !== "false", h = (Tt.get(m) || 0) + 1, b = (s.get(m) || 0) + 1;
|
|
5778
|
+
Tt.set(m, h), s.set(m, b), a.push(m), h === 1 && g && Tn.set(m, !0), b === 1 && m.setAttribute(n, "true"), g || m.setAttribute(r, "true");
|
|
5763
5779
|
} catch (w) {
|
|
5764
5780
|
console.error("aria-hidden: cannot operate on ", m, w);
|
|
5765
5781
|
}
|
|
@@ -5767,9 +5783,9 @@ var Xm = Fi, Ym = Bi, Jm = function(e) {
|
|
|
5767
5783
|
};
|
|
5768
5784
|
return d(t), i.clear(), Zr++, function() {
|
|
5769
5785
|
a.forEach(function(p) {
|
|
5770
|
-
var m =
|
|
5771
|
-
|
|
5772
|
-
}), Zr--, Zr || (
|
|
5786
|
+
var m = Tt.get(p) - 1, v = s.get(p) - 1;
|
|
5787
|
+
Tt.set(p, m), s.set(p, v), m || (Tn.has(p) || p.removeAttribute(r), Tn.delete(p)), v || p.removeAttribute(n);
|
|
5788
|
+
}), Zr--, Zr || (Tt = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), Tn = /* @__PURE__ */ new WeakMap(), An = {});
|
|
5773
5789
|
};
|
|
5774
5790
|
}, ts = function(e, t, n) {
|
|
5775
5791
|
n === void 0 && (n = "data-aria-hidden");
|
|
@@ -5799,7 +5815,7 @@ function eg(e, t, n) {
|
|
|
5799
5815
|
(s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]);
|
|
5800
5816
|
return e.concat(s || Array.prototype.slice.call(t));
|
|
5801
5817
|
}
|
|
5802
|
-
var
|
|
5818
|
+
var Fn = "right-scroll-bar-position", $n = "width-before-scroll-bar", tg = "with-scroll-bars-hidden", ng = "--removed-body-scroll-bar-size";
|
|
5803
5819
|
function Qr(e, t) {
|
|
5804
5820
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
5805
5821
|
}
|
|
@@ -5824,7 +5840,7 @@ function rg(e, t) {
|
|
|
5824
5840
|
})[0];
|
|
5825
5841
|
return n.callback = t, n.facade;
|
|
5826
5842
|
}
|
|
5827
|
-
var og = typeof window < "u" ? u.useLayoutEffect : u.useEffect,
|
|
5843
|
+
var og = typeof window < "u" ? u.useLayoutEffect : u.useEffect, fa = /* @__PURE__ */ new WeakMap();
|
|
5828
5844
|
function sg(e, t) {
|
|
5829
5845
|
var n = rg(null, function(r) {
|
|
5830
5846
|
return e.forEach(function(o) {
|
|
@@ -5832,7 +5848,7 @@ function sg(e, t) {
|
|
|
5832
5848
|
});
|
|
5833
5849
|
});
|
|
5834
5850
|
return og(function() {
|
|
5835
|
-
var r =
|
|
5851
|
+
var r = fa.get(n);
|
|
5836
5852
|
if (r) {
|
|
5837
5853
|
var o = new Set(r), s = new Set(e), a = n.current;
|
|
5838
5854
|
o.forEach(function(i) {
|
|
@@ -5841,7 +5857,7 @@ function sg(e, t) {
|
|
|
5841
5857
|
o.has(i) || Qr(i, a);
|
|
5842
5858
|
});
|
|
5843
5859
|
}
|
|
5844
|
-
|
|
5860
|
+
fa.set(n, e);
|
|
5845
5861
|
}, [e]), n;
|
|
5846
5862
|
}
|
|
5847
5863
|
function ag(e) {
|
|
@@ -5921,7 +5937,7 @@ function lg(e, t) {
|
|
|
5921
5937
|
return e.useMedium(t), Wi;
|
|
5922
5938
|
}
|
|
5923
5939
|
var ji = cg(), eo = function() {
|
|
5924
|
-
},
|
|
5940
|
+
}, wr = u.forwardRef(function(e, t) {
|
|
5925
5941
|
var n = u.useRef(null), r = u.useState({
|
|
5926
5942
|
onScrollCapture: eo,
|
|
5927
5943
|
onWheelCapture: eo,
|
|
@@ -5934,14 +5950,14 @@ var ji = cg(), eo = function() {
|
|
|
5934
5950
|
a ? u.cloneElement(u.Children.only(i), Ke(Ke({}, N), { ref: _ })) : u.createElement(x, Ke({}, N, { className: l, ref: _ }), i)
|
|
5935
5951
|
);
|
|
5936
5952
|
});
|
|
5937
|
-
|
|
5953
|
+
wr.defaultProps = {
|
|
5938
5954
|
enabled: !0,
|
|
5939
5955
|
removeScrollBar: !0,
|
|
5940
5956
|
inert: !1
|
|
5941
5957
|
};
|
|
5942
|
-
|
|
5943
|
-
fullWidth:
|
|
5944
|
-
zeroRight:
|
|
5958
|
+
wr.classNames = {
|
|
5959
|
+
fullWidth: $n,
|
|
5960
|
+
zeroRight: Fn
|
|
5945
5961
|
};
|
|
5946
5962
|
var ug = function() {
|
|
5947
5963
|
if (typeof __webpack_nonce__ < "u")
|
|
@@ -6007,14 +6023,14 @@ var hg = function() {
|
|
|
6007
6023
|
right: t[2],
|
|
6008
6024
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
6009
6025
|
};
|
|
6010
|
-
}, wg = Vi(),
|
|
6026
|
+
}, wg = Vi(), kt = "data-scroll-locked", yg = function(e, t, n, r) {
|
|
6011
6027
|
var o = e.left, s = e.top, a = e.right, i = e.gap;
|
|
6012
6028
|
return n === void 0 && (n = "margin"), `
|
|
6013
6029
|
.`.concat(tg, ` {
|
|
6014
6030
|
overflow: hidden `).concat(r, `;
|
|
6015
6031
|
padding-right: `).concat(i, "px ").concat(r, `;
|
|
6016
6032
|
}
|
|
6017
|
-
body[`).concat(
|
|
6033
|
+
body[`).concat(kt, `] {
|
|
6018
6034
|
overflow: hidden `).concat(r, `;
|
|
6019
6035
|
overscroll-behavior: contain;
|
|
6020
6036
|
`).concat([
|
|
@@ -6031,34 +6047,34 @@ var hg = function() {
|
|
|
6031
6047
|
].filter(Boolean).join(""), `
|
|
6032
6048
|
}
|
|
6033
6049
|
|
|
6034
|
-
.`).concat(
|
|
6050
|
+
.`).concat(Fn, ` {
|
|
6035
6051
|
right: `).concat(i, "px ").concat(r, `;
|
|
6036
6052
|
}
|
|
6037
6053
|
|
|
6038
|
-
.`).concat(
|
|
6054
|
+
.`).concat($n, ` {
|
|
6039
6055
|
margin-right: `).concat(i, "px ").concat(r, `;
|
|
6040
6056
|
}
|
|
6041
6057
|
|
|
6042
|
-
.`).concat(
|
|
6058
|
+
.`).concat(Fn, " .").concat(Fn, ` {
|
|
6043
6059
|
right: 0 `).concat(r, `;
|
|
6044
6060
|
}
|
|
6045
6061
|
|
|
6046
|
-
.`).concat(
|
|
6062
|
+
.`).concat($n, " .").concat($n, ` {
|
|
6047
6063
|
margin-right: 0 `).concat(r, `;
|
|
6048
6064
|
}
|
|
6049
6065
|
|
|
6050
|
-
body[`).concat(
|
|
6066
|
+
body[`).concat(kt, `] {
|
|
6051
6067
|
`).concat(ng, ": ").concat(i, `px;
|
|
6052
6068
|
}
|
|
6053
6069
|
`);
|
|
6054
|
-
},
|
|
6055
|
-
var e = parseInt(document.body.getAttribute(
|
|
6070
|
+
}, pa = function() {
|
|
6071
|
+
var e = parseInt(document.body.getAttribute(kt) || "0", 10);
|
|
6056
6072
|
return isFinite(e) ? e : 0;
|
|
6057
6073
|
}, xg = function() {
|
|
6058
6074
|
u.useEffect(function() {
|
|
6059
|
-
return document.body.setAttribute(
|
|
6060
|
-
var e =
|
|
6061
|
-
e <= 0 ? document.body.removeAttribute(
|
|
6075
|
+
return document.body.setAttribute(kt, (pa() + 1).toString()), function() {
|
|
6076
|
+
var e = pa() - 1;
|
|
6077
|
+
e <= 0 ? document.body.removeAttribute(kt) : document.body.setAttribute(kt, e.toString());
|
|
6062
6078
|
};
|
|
6063
6079
|
}, []);
|
|
6064
6080
|
}, Sg = function(e) {
|
|
@@ -6071,16 +6087,16 @@ var hg = function() {
|
|
|
6071
6087
|
}, wo = !1;
|
|
6072
6088
|
if (typeof window < "u")
|
|
6073
6089
|
try {
|
|
6074
|
-
var
|
|
6090
|
+
var Pn = Object.defineProperty({}, "passive", {
|
|
6075
6091
|
get: function() {
|
|
6076
6092
|
return wo = !0, !0;
|
|
6077
6093
|
}
|
|
6078
6094
|
});
|
|
6079
|
-
window.addEventListener("test",
|
|
6095
|
+
window.addEventListener("test", Pn, Pn), window.removeEventListener("test", Pn, Pn);
|
|
6080
6096
|
} catch {
|
|
6081
6097
|
wo = !1;
|
|
6082
6098
|
}
|
|
6083
|
-
var
|
|
6099
|
+
var At = wo ? { passive: !1 } : !1, Cg = function(e) {
|
|
6084
6100
|
return e.tagName === "TEXTAREA";
|
|
6085
6101
|
}, Ki = function(e, t) {
|
|
6086
6102
|
if (!(e instanceof Element))
|
|
@@ -6095,7 +6111,7 @@ var Tt = wo ? { passive: !1 } : !1, Cg = function(e) {
|
|
|
6095
6111
|
return Ki(e, "overflowY");
|
|
6096
6112
|
}, Ng = function(e) {
|
|
6097
6113
|
return Ki(e, "overflowX");
|
|
6098
|
-
},
|
|
6114
|
+
}, ha = function(e, t) {
|
|
6099
6115
|
var n = t.ownerDocument, r = t;
|
|
6100
6116
|
do {
|
|
6101
6117
|
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
@@ -6143,11 +6159,11 @@ var Tt = wo ? { passive: !1 } : !1, Cg = function(e) {
|
|
|
6143
6159
|
l && (t.contains(i) || t === i)
|
|
6144
6160
|
);
|
|
6145
6161
|
return (d && Math.abs(p) < 1 || !d && Math.abs(m) < 1) && (f = !0), f;
|
|
6146
|
-
},
|
|
6162
|
+
}, In = function(e) {
|
|
6147
6163
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
6148
|
-
},
|
|
6164
|
+
}, ma = function(e) {
|
|
6149
6165
|
return [e.deltaX, e.deltaY];
|
|
6150
|
-
},
|
|
6166
|
+
}, ga = function(e) {
|
|
6151
6167
|
return e && "current" in e ? e.current : e;
|
|
6152
6168
|
}, Ig = function(e, t) {
|
|
6153
6169
|
return e[0] === t[0] && e[1] === t[1];
|
|
@@ -6156,7 +6172,7 @@ var Tt = wo ? { passive: !1 } : !1, Cg = function(e) {
|
|
|
6156
6172
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
6157
6173
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
6158
6174
|
`);
|
|
6159
|
-
}, Og = 0,
|
|
6175
|
+
}, Og = 0, Pt = [];
|
|
6160
6176
|
function kg(e) {
|
|
6161
6177
|
var t = u.useRef([]), n = u.useRef([0, 0]), r = u.useRef(), o = u.useState(Og++)[0], s = u.useState(Vi)[0], a = u.useRef(e);
|
|
6162
6178
|
u.useEffect(function() {
|
|
@@ -6164,7 +6180,7 @@ function kg(e) {
|
|
|
6164
6180
|
}, [e]), u.useEffect(function() {
|
|
6165
6181
|
if (e.inert) {
|
|
6166
6182
|
document.body.classList.add("block-interactivity-".concat(o));
|
|
6167
|
-
var h = eg([e.lockRef.current], (e.shards || []).map(
|
|
6183
|
+
var h = eg([e.lockRef.current], (e.shards || []).map(ga), !0).filter(Boolean);
|
|
6168
6184
|
return h.forEach(function(b) {
|
|
6169
6185
|
return b.classList.add("allow-interactivity-".concat(o));
|
|
6170
6186
|
}), function() {
|
|
@@ -6177,13 +6193,13 @@ function kg(e) {
|
|
|
6177
6193
|
var i = u.useCallback(function(h, b) {
|
|
6178
6194
|
if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
|
|
6179
6195
|
return !a.current.allowPinchZoom;
|
|
6180
|
-
var w =
|
|
6196
|
+
var w = In(h), x = n.current, y = "deltaX" in h ? h.deltaX : x[0] - w[0], C = "deltaY" in h ? h.deltaY : x[1] - w[1], R, _ = h.target, N = Math.abs(y) > Math.abs(C) ? "h" : "v";
|
|
6181
6197
|
if ("touches" in h && N === "h" && _.type === "range")
|
|
6182
6198
|
return !1;
|
|
6183
|
-
var k =
|
|
6199
|
+
var k = ha(N, _);
|
|
6184
6200
|
if (!k)
|
|
6185
6201
|
return !0;
|
|
6186
|
-
if (k ? R = N : (R = N === "v" ? "h" : "v", k =
|
|
6202
|
+
if (k ? R = N : (R = N === "v" ? "h" : "v", k = ha(N, _)), !k)
|
|
6187
6203
|
return !1;
|
|
6188
6204
|
if (!r.current && "changedTouches" in h && (y || C) && (r.current = R), !R)
|
|
6189
6205
|
return !0;
|
|
@@ -6191,8 +6207,8 @@ function kg(e) {
|
|
|
6191
6207
|
return Pg(L, b, h, L === "h" ? y : C);
|
|
6192
6208
|
}, []), l = u.useCallback(function(h) {
|
|
6193
6209
|
var b = h;
|
|
6194
|
-
if (!(!
|
|
6195
|
-
var w = "deltaY" in b ?
|
|
6210
|
+
if (!(!Pt.length || Pt[Pt.length - 1] !== s)) {
|
|
6211
|
+
var w = "deltaY" in b ? ma(b) : In(b), x = t.current.filter(function(R) {
|
|
6196
6212
|
return R.name === b.type && (R.target === b.target || b.target === R.shadowParent) && Ig(R.delta, w);
|
|
6197
6213
|
})[0];
|
|
6198
6214
|
if (x && x.should) {
|
|
@@ -6200,7 +6216,7 @@ function kg(e) {
|
|
|
6200
6216
|
return;
|
|
6201
6217
|
}
|
|
6202
6218
|
if (!x) {
|
|
6203
|
-
var y = (a.current.shards || []).map(
|
|
6219
|
+
var y = (a.current.shards || []).map(ga).filter(Boolean).filter(function(R) {
|
|
6204
6220
|
return R.contains(b.target);
|
|
6205
6221
|
}), C = y.length > 0 ? i(b, y[0]) : !a.current.noIsolation;
|
|
6206
6222
|
C && b.cancelable && b.preventDefault();
|
|
@@ -6214,21 +6230,21 @@ function kg(e) {
|
|
|
6214
6230
|
});
|
|
6215
6231
|
}, 1);
|
|
6216
6232
|
}, []), d = u.useCallback(function(h) {
|
|
6217
|
-
n.current =
|
|
6233
|
+
n.current = In(h), r.current = void 0;
|
|
6218
6234
|
}, []), p = u.useCallback(function(h) {
|
|
6219
|
-
f(h.type,
|
|
6235
|
+
f(h.type, ma(h), h.target, i(h, e.lockRef.current));
|
|
6220
6236
|
}, []), m = u.useCallback(function(h) {
|
|
6221
|
-
f(h.type,
|
|
6237
|
+
f(h.type, In(h), h.target, i(h, e.lockRef.current));
|
|
6222
6238
|
}, []);
|
|
6223
6239
|
u.useEffect(function() {
|
|
6224
|
-
return
|
|
6240
|
+
return Pt.push(s), e.setCallbacks({
|
|
6225
6241
|
onScrollCapture: p,
|
|
6226
6242
|
onWheelCapture: p,
|
|
6227
6243
|
onTouchMoveCapture: m
|
|
6228
|
-
}), document.addEventListener("wheel", l,
|
|
6229
|
-
|
|
6244
|
+
}), document.addEventListener("wheel", l, At), document.addEventListener("touchmove", l, At), document.addEventListener("touchstart", d, At), function() {
|
|
6245
|
+
Pt = Pt.filter(function(h) {
|
|
6230
6246
|
return h !== s;
|
|
6231
|
-
}), document.removeEventListener("wheel", l,
|
|
6247
|
+
}), document.removeEventListener("wheel", l, At), document.removeEventListener("touchmove", l, At), document.removeEventListener("touchstart", d, At);
|
|
6232
6248
|
};
|
|
6233
6249
|
}, []);
|
|
6234
6250
|
var v = e.removeScrollBar, g = e.inert;
|
|
@@ -6245,22 +6261,22 @@ function Mg(e) {
|
|
|
6245
6261
|
return t;
|
|
6246
6262
|
}
|
|
6247
6263
|
const Dg = lg(ji, kg);
|
|
6248
|
-
var
|
|
6249
|
-
return u.createElement(
|
|
6264
|
+
var yr = u.forwardRef(function(e, t) {
|
|
6265
|
+
return u.createElement(wr, Ke({}, e, { ref: t, sideCar: Dg }));
|
|
6250
6266
|
});
|
|
6251
|
-
|
|
6267
|
+
yr.classNames = wr.classNames;
|
|
6252
6268
|
var yo = ["Enter", " "], Lg = ["ArrowDown", "PageUp", "Home"], Xi = ["ArrowUp", "PageDown", "End"], Fg = [...Lg, ...Xi], $g = {
|
|
6253
6269
|
ltr: [...yo, "ArrowRight"],
|
|
6254
6270
|
rtl: [...yo, "ArrowLeft"]
|
|
6255
6271
|
}, Bg = {
|
|
6256
6272
|
ltr: ["ArrowLeft"],
|
|
6257
6273
|
rtl: ["ArrowRight"]
|
|
6258
|
-
},
|
|
6274
|
+
}, gn = "Menu", [rn, Ug, Hg] = Ho(gn), [xt, Yi] = ze(gn, [
|
|
6259
6275
|
Hg,
|
|
6260
|
-
|
|
6276
|
+
jt,
|
|
6261
6277
|
Li
|
|
6262
|
-
]),
|
|
6263
|
-
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: a = !0 } = e, i =
|
|
6278
|
+
]), xr = jt(), Ji = Li(), [zg, St] = xt(gn), [Wg, bn] = xt(gn), Zi = (e) => {
|
|
6279
|
+
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: a = !0 } = e, i = xr(t), [l, f] = u.useState(null), d = u.useRef(!1), p = ye(s), m = fr(o);
|
|
6264
6280
|
return u.useEffect(() => {
|
|
6265
6281
|
const v = () => {
|
|
6266
6282
|
d.current = !0, document.addEventListener("pointerdown", g, { capture: !0, once: !0 }), document.addEventListener("pointermove", g, { capture: !0, once: !0 });
|
|
@@ -6290,10 +6306,10 @@ var yo = ["Enter", " "], Lg = ["ArrowDown", "PageUp", "Home"], Xi = ["ArrowUp",
|
|
|
6290
6306
|
}
|
|
6291
6307
|
) });
|
|
6292
6308
|
};
|
|
6293
|
-
Zi.displayName =
|
|
6309
|
+
Zi.displayName = gn;
|
|
6294
6310
|
var jg = "MenuAnchor", ns = u.forwardRef(
|
|
6295
6311
|
(e, t) => {
|
|
6296
|
-
const { __scopeMenu: n, ...r } = e, o =
|
|
6312
|
+
const { __scopeMenu: n, ...r } = e, o = xr(n);
|
|
6297
6313
|
return /* @__PURE__ */ c(Zo, { ...o, ...r, ref: t });
|
|
6298
6314
|
}
|
|
6299
6315
|
);
|
|
@@ -6302,13 +6318,13 @@ var rs = "MenuPortal", [Vg, Qi] = xt(rs, {
|
|
|
6302
6318
|
forceMount: void 0
|
|
6303
6319
|
}), ec = (e) => {
|
|
6304
6320
|
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = St(rs, t);
|
|
6305
|
-
return /* @__PURE__ */ c(Vg, { scope: t, forceMount: n, children: /* @__PURE__ */ c(Ae, { present: n || s.open, children: /* @__PURE__ */ c(
|
|
6321
|
+
return /* @__PURE__ */ c(Vg, { scope: t, forceMount: n, children: /* @__PURE__ */ c(Ae, { present: n || s.open, children: /* @__PURE__ */ c(vr, { asChild: !0, container: o, children: r }) }) });
|
|
6306
6322
|
};
|
|
6307
6323
|
ec.displayName = rs;
|
|
6308
6324
|
var Me = "MenuContent", [Kg, os] = xt(Me), tc = u.forwardRef(
|
|
6309
6325
|
(e, t) => {
|
|
6310
|
-
const n = Qi(Me, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = St(Me, e.__scopeMenu), a =
|
|
6311
|
-
return /* @__PURE__ */ c(
|
|
6326
|
+
const n = Qi(Me, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = St(Me, e.__scopeMenu), a = bn(Me, e.__scopeMenu);
|
|
6327
|
+
return /* @__PURE__ */ c(rn.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ c(Ae, { present: r || s.open, children: /* @__PURE__ */ c(rn.Slot, { scope: e.__scopeMenu, children: a.modal ? /* @__PURE__ */ c(Gg, { ...o, ref: t }) : /* @__PURE__ */ c(qg, { ...o, ref: t }) }) }) });
|
|
6312
6328
|
}
|
|
6313
6329
|
), Gg = u.forwardRef(
|
|
6314
6330
|
(e, t) => {
|
|
@@ -6346,7 +6362,7 @@ var Me = "MenuContent", [Kg, os] = xt(Me), tc = u.forwardRef(
|
|
|
6346
6362
|
onDismiss: () => n.onOpenChange(!1)
|
|
6347
6363
|
}
|
|
6348
6364
|
);
|
|
6349
|
-
}), Xg =
|
|
6365
|
+
}), Xg = Mt("MenuContent.ScrollLock"), ss = u.forwardRef(
|
|
6350
6366
|
(e, t) => {
|
|
6351
6367
|
const {
|
|
6352
6368
|
__scopeMenu: n,
|
|
@@ -6363,7 +6379,7 @@ var Me = "MenuContent", [Kg, os] = xt(Me), tc = u.forwardRef(
|
|
|
6363
6379
|
onDismiss: v,
|
|
6364
6380
|
disableOutsideScroll: g,
|
|
6365
6381
|
...h
|
|
6366
|
-
} = e, b = St(Me, n), w =
|
|
6382
|
+
} = e, b = St(Me, n), w = bn(Me, n), x = xr(n), y = Ji(n), C = Ug(n), [R, _] = u.useState(null), N = u.useRef(null), k = ae(t, N, b.onContentChange), L = u.useRef(0), P = u.useRef(""), $ = u.useRef(0), K = u.useRef(null), B = u.useRef("right"), M = u.useRef(0), H = g ? yr : u.Fragment, O = g ? { as: Xg, allowPinchZoom: !0 } : void 0, G = (T) => {
|
|
6367
6383
|
var z, W;
|
|
6368
6384
|
const Q = P.current + T, q = C().filter((se) => !se.disabled), oe = document.activeElement, F = (z = q.find((se) => se.ref.current === oe)) == null ? void 0 : z.textValue, j = q.map((se) => se.textValue), ie = ib(j, Q, F), fe = (W = q.find((se) => se.textValue === ie)) == null ? void 0 : W.ref.current;
|
|
6369
6385
|
(function se(V) {
|
|
@@ -6404,7 +6420,7 @@ var Me = "MenuContent", [Kg, os] = xt(Me), tc = u.forwardRef(
|
|
|
6404
6420
|
K.current = T;
|
|
6405
6421
|
}, []),
|
|
6406
6422
|
children: /* @__PURE__ */ c(H, { ...O, children: /* @__PURE__ */ c(
|
|
6407
|
-
|
|
6423
|
+
pr,
|
|
6408
6424
|
{
|
|
6409
6425
|
asChild: !0,
|
|
6410
6426
|
trapped: o,
|
|
@@ -6414,7 +6430,7 @@ var Me = "MenuContent", [Kg, os] = xt(Me), tc = u.forwardRef(
|
|
|
6414
6430
|
}),
|
|
6415
6431
|
onUnmountAutoFocus: a,
|
|
6416
6432
|
children: /* @__PURE__ */ c(
|
|
6417
|
-
|
|
6433
|
+
pn,
|
|
6418
6434
|
{
|
|
6419
6435
|
asChild: !0,
|
|
6420
6436
|
disableOutsidePointerEvents: i,
|
|
@@ -6463,7 +6479,7 @@ var Me = "MenuContent", [Kg, os] = xt(Me), tc = u.forwardRef(
|
|
|
6463
6479
|
}),
|
|
6464
6480
|
onPointerMove: U(
|
|
6465
6481
|
e.onPointerMove,
|
|
6466
|
-
|
|
6482
|
+
on((T) => {
|
|
6467
6483
|
const Q = T.target, q = M.current !== T.clientX;
|
|
6468
6484
|
if (T.currentTarget.contains(Q) && q) {
|
|
6469
6485
|
const oe = T.clientX > M.current ? "right" : "left";
|
|
@@ -6498,13 +6514,13 @@ var Jg = "MenuLabel", nc = u.forwardRef(
|
|
|
6498
6514
|
}
|
|
6499
6515
|
);
|
|
6500
6516
|
nc.displayName = Jg;
|
|
6501
|
-
var
|
|
6517
|
+
var Qn = "MenuItem", ba = "menu.itemSelect", Sr = u.forwardRef(
|
|
6502
6518
|
(e, t) => {
|
|
6503
|
-
const { disabled: n = !1, onSelect: r, ...o } = e, s = u.useRef(null), a =
|
|
6519
|
+
const { disabled: n = !1, onSelect: r, ...o } = e, s = u.useRef(null), a = bn(Qn, e.__scopeMenu), i = os(Qn, e.__scopeMenu), l = ae(t, s), f = u.useRef(!1), d = () => {
|
|
6504
6520
|
const p = s.current;
|
|
6505
6521
|
if (!n && p) {
|
|
6506
|
-
const m = new CustomEvent(
|
|
6507
|
-
p.addEventListener(
|
|
6522
|
+
const m = new CustomEvent(ba, { bubbles: !0, cancelable: !0 });
|
|
6523
|
+
p.addEventListener(ba, (v) => r == null ? void 0 : r(v), { once: !0 }), oi(p, m), m.defaultPrevented ? f.current = !1 : a.onClose();
|
|
6508
6524
|
}
|
|
6509
6525
|
};
|
|
6510
6526
|
return /* @__PURE__ */ c(
|
|
@@ -6530,15 +6546,15 @@ var Zn = "MenuItem", va = "menu.itemSelect", xr = u.forwardRef(
|
|
|
6530
6546
|
);
|
|
6531
6547
|
}
|
|
6532
6548
|
);
|
|
6533
|
-
|
|
6549
|
+
Sr.displayName = Qn;
|
|
6534
6550
|
var rc = u.forwardRef(
|
|
6535
6551
|
(e, t) => {
|
|
6536
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, a = os(
|
|
6552
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, a = os(Qn, n), i = Ji(n), l = u.useRef(null), f = ae(t, l), [d, p] = u.useState(!1), [m, v] = u.useState("");
|
|
6537
6553
|
return u.useEffect(() => {
|
|
6538
6554
|
const g = l.current;
|
|
6539
6555
|
g && v((g.textContent ?? "").trim());
|
|
6540
6556
|
}, [s.children]), /* @__PURE__ */ c(
|
|
6541
|
-
|
|
6557
|
+
rn.ItemSlot,
|
|
6542
6558
|
{
|
|
6543
6559
|
scope: n,
|
|
6544
6560
|
disabled: r,
|
|
@@ -6554,13 +6570,13 @@ var rc = u.forwardRef(
|
|
|
6554
6570
|
ref: f,
|
|
6555
6571
|
onPointerMove: U(
|
|
6556
6572
|
e.onPointerMove,
|
|
6557
|
-
|
|
6573
|
+
on((g) => {
|
|
6558
6574
|
r ? a.onItemLeave(g) : (a.onItemEnter(g), g.defaultPrevented || g.currentTarget.focus({ preventScroll: !0 }));
|
|
6559
6575
|
})
|
|
6560
6576
|
),
|
|
6561
6577
|
onPointerLeave: U(
|
|
6562
6578
|
e.onPointerLeave,
|
|
6563
|
-
|
|
6579
|
+
on((g) => a.onItemLeave(g))
|
|
6564
6580
|
),
|
|
6565
6581
|
onFocus: U(e.onFocus, () => p(!0)),
|
|
6566
6582
|
onBlur: U(e.onBlur, () => p(!1))
|
|
@@ -6573,16 +6589,16 @@ var rc = u.forwardRef(
|
|
|
6573
6589
|
(e, t) => {
|
|
6574
6590
|
const { checked: n = !1, onCheckedChange: r, ...o } = e;
|
|
6575
6591
|
return /* @__PURE__ */ c(lc, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ c(
|
|
6576
|
-
|
|
6592
|
+
Sr,
|
|
6577
6593
|
{
|
|
6578
6594
|
role: "menuitemcheckbox",
|
|
6579
|
-
"aria-checked":
|
|
6595
|
+
"aria-checked": er(n) ? "mixed" : n,
|
|
6580
6596
|
...o,
|
|
6581
6597
|
ref: t,
|
|
6582
6598
|
"data-state": cs(n),
|
|
6583
6599
|
onSelect: U(
|
|
6584
6600
|
o.onSelect,
|
|
6585
|
-
() => r == null ? void 0 : r(
|
|
6601
|
+
() => r == null ? void 0 : r(er(n) ? !0 : !n),
|
|
6586
6602
|
{ checkForDefaultPrevented: !1 }
|
|
6587
6603
|
)
|
|
6588
6604
|
}
|
|
@@ -6605,7 +6621,7 @@ var ic = "MenuRadioItem", cc = u.forwardRef(
|
|
|
6605
6621
|
(e, t) => {
|
|
6606
6622
|
const { value: n, ...r } = e, o = eb(ic, e.__scopeMenu), s = n === o.value;
|
|
6607
6623
|
return /* @__PURE__ */ c(lc, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ c(
|
|
6608
|
-
|
|
6624
|
+
Sr,
|
|
6609
6625
|
{
|
|
6610
6626
|
role: "menuitemradio",
|
|
6611
6627
|
"aria-checked": s,
|
|
@@ -6634,7 +6650,7 @@ var is = "MenuItemIndicator", [lc, tb] = xt(
|
|
|
6634
6650
|
return /* @__PURE__ */ c(
|
|
6635
6651
|
Ae,
|
|
6636
6652
|
{
|
|
6637
|
-
present: r ||
|
|
6653
|
+
present: r || er(s.checked) || s.checked === !0,
|
|
6638
6654
|
children: /* @__PURE__ */ c(
|
|
6639
6655
|
ee.span,
|
|
6640
6656
|
{
|
|
@@ -6665,14 +6681,14 @@ var nb = "MenuSeparator", dc = u.forwardRef(
|
|
|
6665
6681
|
dc.displayName = nb;
|
|
6666
6682
|
var rb = "MenuArrow", fc = u.forwardRef(
|
|
6667
6683
|
(e, t) => {
|
|
6668
|
-
const { __scopeMenu: n, ...r } = e, o =
|
|
6684
|
+
const { __scopeMenu: n, ...r } = e, o = xr(n);
|
|
6669
6685
|
return /* @__PURE__ */ c(es, { ...o, ...r, ref: t });
|
|
6670
6686
|
}
|
|
6671
6687
|
);
|
|
6672
6688
|
fc.displayName = rb;
|
|
6673
|
-
var ob = "MenuSub", [Gy, pc] = xt(ob),
|
|
6689
|
+
var ob = "MenuSub", [Gy, pc] = xt(ob), Xt = "MenuSubTrigger", hc = u.forwardRef(
|
|
6674
6690
|
(e, t) => {
|
|
6675
|
-
const n = St(
|
|
6691
|
+
const n = St(Xt, e.__scopeMenu), r = bn(Xt, e.__scopeMenu), o = pc(Xt, e.__scopeMenu), s = os(Xt, e.__scopeMenu), a = u.useRef(null), { pointerGraceTimerRef: i, onPointerGraceIntentChange: l } = s, f = { __scopeMenu: e.__scopeMenu }, d = u.useCallback(() => {
|
|
6676
6692
|
a.current && window.clearTimeout(a.current), a.current = null;
|
|
6677
6693
|
}, []);
|
|
6678
6694
|
return u.useEffect(() => d, [d]), u.useEffect(() => {
|
|
@@ -6696,7 +6712,7 @@ var ob = "MenuSub", [Gy, pc] = xt(ob), qt = "MenuSubTrigger", hc = u.forwardRef(
|
|
|
6696
6712
|
},
|
|
6697
6713
|
onPointerMove: U(
|
|
6698
6714
|
e.onPointerMove,
|
|
6699
|
-
|
|
6715
|
+
on((p) => {
|
|
6700
6716
|
s.onItemEnter(p), !p.defaultPrevented && !e.disabled && !n.open && !a.current && (s.onPointerGraceIntentChange(null), a.current = window.setTimeout(() => {
|
|
6701
6717
|
n.onOpenChange(!0), d();
|
|
6702
6718
|
}, 100));
|
|
@@ -6704,7 +6720,7 @@ var ob = "MenuSub", [Gy, pc] = xt(ob), qt = "MenuSubTrigger", hc = u.forwardRef(
|
|
|
6704
6720
|
),
|
|
6705
6721
|
onPointerLeave: U(
|
|
6706
6722
|
e.onPointerLeave,
|
|
6707
|
-
|
|
6723
|
+
on((p) => {
|
|
6708
6724
|
var v, g;
|
|
6709
6725
|
d();
|
|
6710
6726
|
const m = (v = n.content) == null ? void 0 : v.getBoundingClientRect();
|
|
@@ -6740,11 +6756,11 @@ var ob = "MenuSub", [Gy, pc] = xt(ob), qt = "MenuSubTrigger", hc = u.forwardRef(
|
|
|
6740
6756
|
) });
|
|
6741
6757
|
}
|
|
6742
6758
|
);
|
|
6743
|
-
hc.displayName =
|
|
6759
|
+
hc.displayName = Xt;
|
|
6744
6760
|
var mc = "MenuSubContent", gc = u.forwardRef(
|
|
6745
6761
|
(e, t) => {
|
|
6746
|
-
const n = Qi(Me, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = St(Me, e.__scopeMenu), a =
|
|
6747
|
-
return /* @__PURE__ */ c(
|
|
6762
|
+
const n = Qi(Me, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = St(Me, e.__scopeMenu), a = bn(Me, e.__scopeMenu), i = pc(mc, e.__scopeMenu), l = u.useRef(null), f = ae(t, l);
|
|
6763
|
+
return /* @__PURE__ */ c(rn.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ c(Ae, { present: r || s.open, children: /* @__PURE__ */ c(rn.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ c(
|
|
6748
6764
|
ss,
|
|
6749
6765
|
{
|
|
6750
6766
|
id: i.contentId,
|
|
@@ -6780,11 +6796,11 @@ gc.displayName = mc;
|
|
|
6780
6796
|
function bc(e) {
|
|
6781
6797
|
return e ? "open" : "closed";
|
|
6782
6798
|
}
|
|
6783
|
-
function
|
|
6799
|
+
function er(e) {
|
|
6784
6800
|
return e === "indeterminate";
|
|
6785
6801
|
}
|
|
6786
6802
|
function cs(e) {
|
|
6787
|
-
return
|
|
6803
|
+
return er(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
6788
6804
|
}
|
|
6789
6805
|
function sb(e) {
|
|
6790
6806
|
const t = document.activeElement;
|
|
@@ -6817,13 +6833,13 @@ function lb(e, t) {
|
|
|
6817
6833
|
const n = { x: e.clientX, y: e.clientY };
|
|
6818
6834
|
return cb(n, t);
|
|
6819
6835
|
}
|
|
6820
|
-
function
|
|
6836
|
+
function on(e) {
|
|
6821
6837
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
6822
6838
|
}
|
|
6823
|
-
var ub = Zi, db = ns, fb = ec, pb = tc, hb = as, mb = nc, gb =
|
|
6824
|
-
|
|
6839
|
+
var ub = Zi, db = ns, fb = ec, pb = tc, hb = as, mb = nc, gb = Sr, bb = oc, vb = ac, wb = cc, yb = uc, xb = dc, Sb = fc, Cb = hc, Eb = gc, Cr = "DropdownMenu", [Nb, qy] = ze(
|
|
6840
|
+
Cr,
|
|
6825
6841
|
[Yi]
|
|
6826
|
-
),
|
|
6842
|
+
), Ce = Yi(), [Rb, vc] = Nb(Cr), wc = (e) => {
|
|
6827
6843
|
const {
|
|
6828
6844
|
__scopeDropdownMenu: t,
|
|
6829
6845
|
children: n,
|
|
@@ -6832,11 +6848,11 @@ var ub = Zi, db = ns, fb = ec, pb = tc, hb = as, mb = nc, gb = xr, bb = oc, vb =
|
|
|
6832
6848
|
defaultOpen: s,
|
|
6833
6849
|
onOpenChange: a,
|
|
6834
6850
|
modal: i = !0
|
|
6835
|
-
} = e, l =
|
|
6851
|
+
} = e, l = Ce(t), f = u.useRef(null), [d, p] = at({
|
|
6836
6852
|
prop: o,
|
|
6837
6853
|
defaultProp: s ?? !1,
|
|
6838
6854
|
onChange: a,
|
|
6839
|
-
caller:
|
|
6855
|
+
caller: Cr
|
|
6840
6856
|
});
|
|
6841
6857
|
return /* @__PURE__ */ c(
|
|
6842
6858
|
Rb,
|
|
@@ -6853,10 +6869,10 @@ var ub = Zi, db = ns, fb = ec, pb = tc, hb = as, mb = nc, gb = xr, bb = oc, vb =
|
|
|
6853
6869
|
}
|
|
6854
6870
|
);
|
|
6855
6871
|
};
|
|
6856
|
-
wc.displayName =
|
|
6872
|
+
wc.displayName = Cr;
|
|
6857
6873
|
var yc = "DropdownMenuTrigger", xc = u.forwardRef(
|
|
6858
6874
|
(e, t) => {
|
|
6859
|
-
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = vc(yc, n), a =
|
|
6875
|
+
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = vc(yc, n), a = Ce(n);
|
|
6860
6876
|
return /* @__PURE__ */ c(db, { asChild: !0, ...a, children: /* @__PURE__ */ c(
|
|
6861
6877
|
ee.button,
|
|
6862
6878
|
{
|
|
@@ -6882,13 +6898,13 @@ var yc = "DropdownMenuTrigger", xc = u.forwardRef(
|
|
|
6882
6898
|
);
|
|
6883
6899
|
xc.displayName = yc;
|
|
6884
6900
|
var Tb = "DropdownMenuPortal", Sc = (e) => {
|
|
6885
|
-
const { __scopeDropdownMenu: t, ...n } = e, r =
|
|
6901
|
+
const { __scopeDropdownMenu: t, ...n } = e, r = Ce(t);
|
|
6886
6902
|
return /* @__PURE__ */ c(fb, { ...r, ...n });
|
|
6887
6903
|
};
|
|
6888
6904
|
Sc.displayName = Tb;
|
|
6889
6905
|
var Cc = "DropdownMenuContent", Ec = u.forwardRef(
|
|
6890
6906
|
(e, t) => {
|
|
6891
|
-
const { __scopeDropdownMenu: n, ...r } = e, o = vc(Cc, n), s =
|
|
6907
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = vc(Cc, n), s = Ce(n), a = u.useRef(!1);
|
|
6892
6908
|
return /* @__PURE__ */ c(
|
|
6893
6909
|
pb,
|
|
6894
6910
|
{
|
|
@@ -6920,64 +6936,64 @@ var Cc = "DropdownMenuContent", Ec = u.forwardRef(
|
|
|
6920
6936
|
Ec.displayName = Cc;
|
|
6921
6937
|
var Ab = "DropdownMenuGroup", Pb = u.forwardRef(
|
|
6922
6938
|
(e, t) => {
|
|
6923
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
6939
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Ce(n);
|
|
6924
6940
|
return /* @__PURE__ */ c(hb, { ...o, ...r, ref: t });
|
|
6925
6941
|
}
|
|
6926
6942
|
);
|
|
6927
6943
|
Pb.displayName = Ab;
|
|
6928
6944
|
var Ib = "DropdownMenuLabel", Nc = u.forwardRef(
|
|
6929
6945
|
(e, t) => {
|
|
6930
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
6946
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Ce(n);
|
|
6931
6947
|
return /* @__PURE__ */ c(mb, { ...o, ...r, ref: t });
|
|
6932
6948
|
}
|
|
6933
6949
|
);
|
|
6934
6950
|
Nc.displayName = Ib;
|
|
6935
6951
|
var _b = "DropdownMenuItem", Rc = u.forwardRef(
|
|
6936
6952
|
(e, t) => {
|
|
6937
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
6953
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Ce(n);
|
|
6938
6954
|
return /* @__PURE__ */ c(gb, { ...o, ...r, ref: t });
|
|
6939
6955
|
}
|
|
6940
6956
|
);
|
|
6941
6957
|
Rc.displayName = _b;
|
|
6942
6958
|
var Ob = "DropdownMenuCheckboxItem", Tc = u.forwardRef((e, t) => {
|
|
6943
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
6959
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Ce(n);
|
|
6944
6960
|
return /* @__PURE__ */ c(bb, { ...o, ...r, ref: t });
|
|
6945
6961
|
});
|
|
6946
6962
|
Tc.displayName = Ob;
|
|
6947
6963
|
var kb = "DropdownMenuRadioGroup", Mb = u.forwardRef((e, t) => {
|
|
6948
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
6964
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Ce(n);
|
|
6949
6965
|
return /* @__PURE__ */ c(vb, { ...o, ...r, ref: t });
|
|
6950
6966
|
});
|
|
6951
6967
|
Mb.displayName = kb;
|
|
6952
6968
|
var Db = "DropdownMenuRadioItem", Ac = u.forwardRef((e, t) => {
|
|
6953
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
6969
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Ce(n);
|
|
6954
6970
|
return /* @__PURE__ */ c(wb, { ...o, ...r, ref: t });
|
|
6955
6971
|
});
|
|
6956
6972
|
Ac.displayName = Db;
|
|
6957
6973
|
var Lb = "DropdownMenuItemIndicator", Pc = u.forwardRef((e, t) => {
|
|
6958
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
6974
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Ce(n);
|
|
6959
6975
|
return /* @__PURE__ */ c(yb, { ...o, ...r, ref: t });
|
|
6960
6976
|
});
|
|
6961
6977
|
Pc.displayName = Lb;
|
|
6962
6978
|
var Fb = "DropdownMenuSeparator", Ic = u.forwardRef((e, t) => {
|
|
6963
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
6979
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Ce(n);
|
|
6964
6980
|
return /* @__PURE__ */ c(xb, { ...o, ...r, ref: t });
|
|
6965
6981
|
});
|
|
6966
6982
|
Ic.displayName = Fb;
|
|
6967
6983
|
var $b = "DropdownMenuArrow", Bb = u.forwardRef(
|
|
6968
6984
|
(e, t) => {
|
|
6969
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
6985
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Ce(n);
|
|
6970
6986
|
return /* @__PURE__ */ c(Sb, { ...o, ...r, ref: t });
|
|
6971
6987
|
}
|
|
6972
6988
|
);
|
|
6973
6989
|
Bb.displayName = $b;
|
|
6974
6990
|
var Ub = "DropdownMenuSubTrigger", _c = u.forwardRef((e, t) => {
|
|
6975
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
6991
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Ce(n);
|
|
6976
6992
|
return /* @__PURE__ */ c(Cb, { ...o, ...r, ref: t });
|
|
6977
6993
|
});
|
|
6978
6994
|
_c.displayName = Ub;
|
|
6979
6995
|
var Hb = "DropdownMenuSubContent", Oc = u.forwardRef((e, t) => {
|
|
6980
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
6996
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Ce(n);
|
|
6981
6997
|
return /* @__PURE__ */ c(
|
|
6982
6998
|
Eb,
|
|
6983
6999
|
{
|
|
@@ -7107,7 +7123,7 @@ const Zb = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
7107
7123
|
}
|
|
7108
7124
|
));
|
|
7109
7125
|
Zb.displayName = Bc.displayName;
|
|
7110
|
-
function
|
|
7126
|
+
function Bn({
|
|
7111
7127
|
className: e = "",
|
|
7112
7128
|
placeholder: t = "Type your message...",
|
|
7113
7129
|
autoFocus: n = !0,
|
|
@@ -7137,11 +7153,11 @@ function $n({
|
|
|
7137
7153
|
isLoadingHistory: k,
|
|
7138
7154
|
loadOlderMessages: L,
|
|
7139
7155
|
api: P
|
|
7140
|
-
} = ti(), [$, K] = re(""), [B, M] = re(null), [H, O] = re(null), [G, D] = re([]), [T, Q] = re(!1), [q, oe] = re(null), [F, j] = re(null), [ie, fe] = re(!1), [z, W] = re(null), [se, V] = re([]), [X, te] = re(null), he = Ee(null), ue = Ee(null), Y = Ee(null), Z = Ee(null), pe = Ee(null), _e = Ee(!1), Oe = Ee(!0), Ct = Ee(0), Ze = Ee(null), [
|
|
7156
|
+
} = ti(), [$, K] = re(""), [B, M] = re(null), [H, O] = re(null), [G, D] = re([]), [T, Q] = re(!1), [q, oe] = re(null), [F, j] = re(null), [ie, fe] = re(!1), [z, W] = re(null), [se, V] = re([]), [X, te] = re(null), he = Ee(null), ue = Ee(null), Y = Ee(null), Z = Ee(null), pe = Ee(null), _e = Ee(!1), Oe = Ee(!0), Ct = Ee(0), Ze = Ee(null), [Dr, Kt] = re("desktop");
|
|
7141
7157
|
me(() => {
|
|
7142
7158
|
const I = () => {
|
|
7143
7159
|
const J = window.innerWidth;
|
|
7144
|
-
|
|
7160
|
+
Kt(J < 640 ? "phone" : J < 1024 ? "tablet" : "desktop");
|
|
7145
7161
|
};
|
|
7146
7162
|
return I(), window.addEventListener("resize", I), () => window.removeEventListener("resize", I);
|
|
7147
7163
|
}, []), me(() => {
|
|
@@ -7157,10 +7173,10 @@ function $n({
|
|
|
7157
7173
|
if (!(le && le.threadId === J.threadId && le.checkpointId === J.checkpointId))
|
|
7158
7174
|
return C(m).then((ce) => {
|
|
7159
7175
|
if (I) return;
|
|
7160
|
-
const Le = ((ce == null ? void 0 : ce.checkpoints) ?? []).slice().sort((nt,
|
|
7176
|
+
const Le = ((ce == null ? void 0 : ce.checkpoints) ?? []).slice().sort((nt, xn) => new Date(xn.createdAt).getTime() - new Date(nt.createdAt).getTime());
|
|
7161
7177
|
V(Le), te((nt) => {
|
|
7162
|
-
var
|
|
7163
|
-
return nt ?? ((
|
|
7178
|
+
var xn;
|
|
7179
|
+
return nt ?? ((xn = Le[0]) == null ? void 0 : xn.checkpointId) ?? null;
|
|
7164
7180
|
}), Ze.current = J;
|
|
7165
7181
|
}).catch((ce) => {
|
|
7166
7182
|
console.error("ChatInterface - listCheckpoints error:", ce), I || (V([]), Ze.current = null);
|
|
@@ -7170,7 +7186,7 @@ function $n({
|
|
|
7170
7186
|
}, [m, y, C]), me(() => {
|
|
7171
7187
|
y && te(y);
|
|
7172
7188
|
}, [y]);
|
|
7173
|
-
const
|
|
7189
|
+
const vn = ve(async () => {
|
|
7174
7190
|
if (!N || k) return;
|
|
7175
7191
|
const I = pe.current;
|
|
7176
7192
|
if (!I) return;
|
|
@@ -7198,12 +7214,12 @@ function $n({
|
|
|
7198
7214
|
const I = pe.current;
|
|
7199
7215
|
if (!I) return;
|
|
7200
7216
|
const J = () => {
|
|
7201
|
-
I.scrollTop <= 80 &&
|
|
7217
|
+
I.scrollTop <= 80 && vn();
|
|
7202
7218
|
const Le = I.scrollHeight - I.scrollTop - I.clientHeight;
|
|
7203
7219
|
Oe.current = Le <= 80;
|
|
7204
7220
|
};
|
|
7205
7221
|
return I.addEventListener("scroll", J), () => I.removeEventListener("scroll", J);
|
|
7206
|
-
}, [
|
|
7222
|
+
}, [vn]), me(() => {
|
|
7207
7223
|
v.length < Ct.current && (Oe.current = !0), Ct.current = v.length;
|
|
7208
7224
|
}, [v.length]), me(() => {
|
|
7209
7225
|
const I = pe.current;
|
|
@@ -7223,15 +7239,15 @@ function $n({
|
|
|
7223
7239
|
}, [P]), me(() => {
|
|
7224
7240
|
b && !ie && (p == null || p(b));
|
|
7225
7241
|
}, [b, ie, p]);
|
|
7226
|
-
const
|
|
7227
|
-
if (I.length >
|
|
7228
|
-
return `Message too long (${I.length}/${
|
|
7242
|
+
const wn = (I) => {
|
|
7243
|
+
if (I.length > It)
|
|
7244
|
+
return `Message too long (${I.length}/${It} characters)`;
|
|
7229
7245
|
try {
|
|
7230
7246
|
return rh(I), null;
|
|
7231
7247
|
} catch (J) {
|
|
7232
7248
|
return (J == null ? void 0 : J.message) || "Invalid message";
|
|
7233
7249
|
}
|
|
7234
|
-
},
|
|
7250
|
+
}, Lr = (I) => {
|
|
7235
7251
|
const J = I.content || [], le = J.filter((ce) => ce.type === "text").map((ce) => ce.text).join("");
|
|
7236
7252
|
if (le) return le;
|
|
7237
7253
|
try {
|
|
@@ -7239,11 +7255,11 @@ function $n({
|
|
|
7239
7255
|
} catch {
|
|
7240
7256
|
return String(J);
|
|
7241
7257
|
}
|
|
7242
|
-
},
|
|
7258
|
+
}, yn = async () => {
|
|
7243
7259
|
const I = $.trim();
|
|
7244
7260
|
if (!(!I && G.length === 0)) {
|
|
7245
7261
|
if (I) {
|
|
7246
|
-
const J =
|
|
7262
|
+
const J = wn(I);
|
|
7247
7263
|
if (J) {
|
|
7248
7264
|
O(J);
|
|
7249
7265
|
return;
|
|
@@ -7256,15 +7272,15 @@ function $n({
|
|
|
7256
7272
|
O(le), p == null || p(le);
|
|
7257
7273
|
}
|
|
7258
7274
|
}
|
|
7259
|
-
},
|
|
7275
|
+
}, Fr = (I, J) => {
|
|
7260
7276
|
i && (M(I), K(J), O(null), setTimeout(() => {
|
|
7261
7277
|
ue.current && (ue.current.focus(), ue.current.style.height = "auto", ue.current.style.height = ue.current.scrollHeight + "px");
|
|
7262
7278
|
}, 0));
|
|
7263
7279
|
}, Et = () => {
|
|
7264
7280
|
M(null), K(""), O(null), ue.current && (ue.current.style.height = "auto");
|
|
7265
7281
|
}, be = (I) => {
|
|
7266
|
-
I.key === "Enter" && !I.shiftKey ? (I.preventDefault(),
|
|
7267
|
-
},
|
|
7282
|
+
I.key === "Enter" && !I.shiftKey ? (I.preventDefault(), yn()) : I.key === "Escape" && B && (I.preventDefault(), Et());
|
|
7283
|
+
}, $r = (I) => {
|
|
7268
7284
|
const J = Array.from(I.target.files || []);
|
|
7269
7285
|
D((le) => [...le, ...J]);
|
|
7270
7286
|
}, Xu = (I) => D((J) => J.filter((le, ce) => I !== ce)), Yu = async (I) => {
|
|
@@ -7305,7 +7321,7 @@ function $n({
|
|
|
7305
7321
|
onClick: () => fe(!0),
|
|
7306
7322
|
className: "text-red-800 hover:bg-red-100",
|
|
7307
7323
|
"aria-label": "Dismiss error",
|
|
7308
|
-
children: /* @__PURE__ */ c(
|
|
7324
|
+
children: /* @__PURE__ */ c(Jt, { size: 16 })
|
|
7309
7325
|
}
|
|
7310
7326
|
)
|
|
7311
7327
|
] }),
|
|
@@ -7350,12 +7366,12 @@ function $n({
|
|
|
7350
7366
|
showActions: i,
|
|
7351
7367
|
showTimestamp: !1,
|
|
7352
7368
|
showAgentName: !0,
|
|
7353
|
-
layoutSize:
|
|
7369
|
+
layoutSize: Dr,
|
|
7354
7370
|
truncateToolMessages: !1,
|
|
7355
7371
|
toolMessagePreviewLength: 200,
|
|
7356
|
-
onEdit: (le, ce) =>
|
|
7372
|
+
onEdit: (le, ce) => Fr(le, ce),
|
|
7357
7373
|
onRegenerate: () => {
|
|
7358
|
-
const le = [...v].reverse().find((Le) => Le.role === "user"), ce = le ?
|
|
7374
|
+
const le = [...v].reverse().find((Le) => Le.role === "user"), ce = le ? Lr(le) : "";
|
|
7359
7375
|
ce && w(ce, { checkpointId: X || y || void 0 });
|
|
7360
7376
|
},
|
|
7361
7377
|
onCancelEdit: Et
|
|
@@ -7370,7 +7386,7 @@ function $n({
|
|
|
7370
7386
|
/* @__PURE__ */ E("div", { className: td, children: [
|
|
7371
7387
|
B && /* @__PURE__ */ c("div", { className: "mb-3 p-3 bg-blue-50 border border-blue-200 rounded-lg", children: /* @__PURE__ */ E("div", { className: "flex items-center justify-between", children: [
|
|
7372
7388
|
/* @__PURE__ */ E("div", { className: "flex items-center gap-2", children: [
|
|
7373
|
-
/* @__PURE__ */ c(
|
|
7389
|
+
/* @__PURE__ */ c(Ta, { size: 16, className: "text-blue-600" }),
|
|
7374
7390
|
/* @__PURE__ */ c("span", { className: "text-sm font-medium text-blue-800", children: "Editing message" })
|
|
7375
7391
|
] }),
|
|
7376
7392
|
/* @__PURE__ */ c(
|
|
@@ -7380,7 +7396,7 @@ function $n({
|
|
|
7380
7396
|
size: "sm",
|
|
7381
7397
|
onClick: Et,
|
|
7382
7398
|
className: "text-blue-600 hover:bg-blue-100",
|
|
7383
|
-
children: /* @__PURE__ */ c(
|
|
7399
|
+
children: /* @__PURE__ */ c(Jt, { size: 16 })
|
|
7384
7400
|
}
|
|
7385
7401
|
)
|
|
7386
7402
|
] }) }),
|
|
@@ -7392,7 +7408,7 @@ function $n({
|
|
|
7392
7408
|
ref: Y,
|
|
7393
7409
|
type: "file",
|
|
7394
7410
|
multiple: !0,
|
|
7395
|
-
onChange: (I) =>
|
|
7411
|
+
onChange: (I) => $r(I),
|
|
7396
7412
|
className: "hidden"
|
|
7397
7413
|
}
|
|
7398
7414
|
),
|
|
@@ -7407,7 +7423,7 @@ function $n({
|
|
|
7407
7423
|
onClick: () => Xu(J),
|
|
7408
7424
|
className: "h-4 w-4 p-0 text-gray-500 dark:text-gray-400 hover:text-red-500 dark:hover:text-red-400",
|
|
7409
7425
|
"aria-label": `Remove ${I.name}`,
|
|
7410
|
-
children: /* @__PURE__ */ c(
|
|
7426
|
+
children: /* @__PURE__ */ c(Jt, { size: 12 })
|
|
7411
7427
|
}
|
|
7412
7428
|
)
|
|
7413
7429
|
] }, J)) })
|
|
@@ -7482,7 +7498,7 @@ function $n({
|
|
|
7482
7498
|
placeholder: B ? "Edit your message..." : t,
|
|
7483
7499
|
className: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${B ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${H ? "border-red-400" : ""} ${l.textarea || ""}`,
|
|
7484
7500
|
disabled: !1,
|
|
7485
|
-
maxLength:
|
|
7501
|
+
maxLength: It,
|
|
7486
7502
|
rows: 1
|
|
7487
7503
|
}
|
|
7488
7504
|
) }),
|
|
@@ -7501,7 +7517,7 @@ function $n({
|
|
|
7501
7517
|
de,
|
|
7502
7518
|
{
|
|
7503
7519
|
type: "button",
|
|
7504
|
-
onClick:
|
|
7520
|
+
onClick: yn,
|
|
7505
7521
|
size: "icon",
|
|
7506
7522
|
disabled: !$.trim() && G.length === 0,
|
|
7507
7523
|
className: `shrink-0 ${G.length > 0 ? "bg-blue-500 hover:bg-blue-600 text-white" : ""} ${l.sendButton || ""}`,
|
|
@@ -7510,15 +7526,15 @@ function $n({
|
|
|
7510
7526
|
}
|
|
7511
7527
|
) })
|
|
7512
7528
|
] }),
|
|
7513
|
-
$.length >
|
|
7529
|
+
$.length > It * 0.8 && /* @__PURE__ */ E("div", { className: "mt-2 text-xs text-gray-500 text-right", children: [
|
|
7514
7530
|
$.length,
|
|
7515
7531
|
"/",
|
|
7516
|
-
|
|
7532
|
+
It
|
|
7517
7533
|
] })
|
|
7518
7534
|
] })
|
|
7519
7535
|
] });
|
|
7520
7536
|
}
|
|
7521
|
-
const
|
|
7537
|
+
const sn = u.forwardRef(
|
|
7522
7538
|
({ className: e, type: t, ...n }, r) => /* @__PURE__ */ c(
|
|
7523
7539
|
"input",
|
|
7524
7540
|
{
|
|
@@ -7532,7 +7548,7 @@ const on = u.forwardRef(
|
|
|
7532
7548
|
}
|
|
7533
7549
|
)
|
|
7534
7550
|
);
|
|
7535
|
-
|
|
7551
|
+
sn.displayName = "Input";
|
|
7536
7552
|
function So(e, [t, n]) {
|
|
7537
7553
|
return Math.min(n, Math.max(t, e));
|
|
7538
7554
|
}
|
|
@@ -7547,7 +7563,7 @@ var ls = "ScrollArea", [Wc, Xy] = ze(ls), [ev, De] = Wc(ls), jc = u.forwardRef(
|
|
|
7547
7563
|
dir: o,
|
|
7548
7564
|
scrollHideDelay: s = 600,
|
|
7549
7565
|
...a
|
|
7550
|
-
} = e, [i, l] = u.useState(null), [f, d] = u.useState(null), [p, m] = u.useState(null), [v, g] = u.useState(null), [h, b] = u.useState(null), [w, x] = u.useState(0), [y, C] = u.useState(0), [R, _] = u.useState(!1), [N, k] = u.useState(!1), L = ae(t, ($) => l($)), P =
|
|
7566
|
+
} = e, [i, l] = u.useState(null), [f, d] = u.useState(null), [p, m] = u.useState(null), [v, g] = u.useState(null), [h, b] = u.useState(null), [w, x] = u.useState(0), [y, C] = u.useState(0), [R, _] = u.useState(!1), [N, k] = u.useState(!1), L = ae(t, ($) => l($)), P = fr(o);
|
|
7551
7567
|
return /* @__PURE__ */ c(
|
|
7552
7568
|
ev,
|
|
7553
7569
|
{
|
|
@@ -7665,7 +7681,7 @@ var tv = u.forwardRef((e, t) => {
|
|
|
7665
7681
|
}
|
|
7666
7682
|
) });
|
|
7667
7683
|
}), nv = u.forwardRef((e, t) => {
|
|
7668
|
-
const { forceMount: n, ...r } = e, o = De(Je, e.__scopeScrollArea), s = e.orientation === "horizontal", a =
|
|
7684
|
+
const { forceMount: n, ...r } = e, o = De(Je, e.__scopeScrollArea), s = e.orientation === "horizontal", a = Nr(() => l("SCROLL_END"), 100), [i, l] = Qb("hidden", {
|
|
7669
7685
|
hidden: {
|
|
7670
7686
|
SCROLL: "scrolling"
|
|
7671
7687
|
},
|
|
@@ -7709,13 +7725,13 @@ var tv = u.forwardRef((e, t) => {
|
|
|
7709
7725
|
}
|
|
7710
7726
|
) });
|
|
7711
7727
|
}), Gc = u.forwardRef((e, t) => {
|
|
7712
|
-
const n = De(Je, e.__scopeScrollArea), { forceMount: r, ...o } = e, [s, a] = u.useState(!1), i = e.orientation === "horizontal", l =
|
|
7728
|
+
const n = De(Je, e.__scopeScrollArea), { forceMount: r, ...o } = e, [s, a] = u.useState(!1), i = e.orientation === "horizontal", l = Nr(() => {
|
|
7713
7729
|
if (n.viewport) {
|
|
7714
7730
|
const f = n.viewport.offsetWidth < n.viewport.scrollWidth, d = n.viewport.offsetHeight < n.viewport.scrollHeight;
|
|
7715
7731
|
a(i ? f : d);
|
|
7716
7732
|
}
|
|
7717
7733
|
}, 10);
|
|
7718
|
-
return
|
|
7734
|
+
return Ft(n.viewport, l), Ft(n.content, l), /* @__PURE__ */ c(Ae, { present: r || s, children: /* @__PURE__ */ c(
|
|
7719
7735
|
ds,
|
|
7720
7736
|
{
|
|
7721
7737
|
"data-state": s ? "visible" : "hidden",
|
|
@@ -7747,7 +7763,7 @@ var tv = u.forwardRef((e, t) => {
|
|
|
7747
7763
|
ref: t,
|
|
7748
7764
|
onThumbPositionChange: () => {
|
|
7749
7765
|
if (o.viewport && s.current) {
|
|
7750
|
-
const m = o.viewport.scrollLeft, v =
|
|
7766
|
+
const m = o.viewport.scrollLeft, v = va(m, i, o.dir);
|
|
7751
7767
|
s.current.style.transform = `translate3d(${v}px, 0, 0)`;
|
|
7752
7768
|
}
|
|
7753
7769
|
},
|
|
@@ -7765,7 +7781,7 @@ var tv = u.forwardRef((e, t) => {
|
|
|
7765
7781
|
ref: t,
|
|
7766
7782
|
onThumbPositionChange: () => {
|
|
7767
7783
|
if (o.viewport && s.current) {
|
|
7768
|
-
const m = o.viewport.scrollTop, v =
|
|
7784
|
+
const m = o.viewport.scrollTop, v = va(m, i);
|
|
7769
7785
|
s.current.style.transform = `translate3d(0, ${v}px, 0)`;
|
|
7770
7786
|
}
|
|
7771
7787
|
},
|
|
@@ -7792,7 +7808,7 @@ var tv = u.forwardRef((e, t) => {
|
|
|
7792
7808
|
bottom: 0,
|
|
7793
7809
|
left: s.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
7794
7810
|
right: s.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
7795
|
-
"--radix-scroll-area-thumb-width":
|
|
7811
|
+
"--radix-scroll-area-thumb-width": Er(n) + "px",
|
|
7796
7812
|
...e.style
|
|
7797
7813
|
},
|
|
7798
7814
|
onThumbPointerDown: (d) => e.onThumbPointerDown(d.x),
|
|
@@ -7809,8 +7825,8 @@ var tv = u.forwardRef((e, t) => {
|
|
|
7809
7825
|
viewport: s.viewport.offsetWidth,
|
|
7810
7826
|
scrollbar: {
|
|
7811
7827
|
size: l.current.clientWidth,
|
|
7812
|
-
paddingStart:
|
|
7813
|
-
paddingEnd:
|
|
7828
|
+
paddingStart: nr(a.paddingLeft),
|
|
7829
|
+
paddingEnd: nr(a.paddingRight)
|
|
7814
7830
|
}
|
|
7815
7831
|
});
|
|
7816
7832
|
}
|
|
@@ -7832,7 +7848,7 @@ var tv = u.forwardRef((e, t) => {
|
|
|
7832
7848
|
right: s.dir === "ltr" ? 0 : void 0,
|
|
7833
7849
|
left: s.dir === "rtl" ? 0 : void 0,
|
|
7834
7850
|
bottom: "var(--radix-scroll-area-corner-height)",
|
|
7835
|
-
"--radix-scroll-area-thumb-height":
|
|
7851
|
+
"--radix-scroll-area-thumb-height": Er(n) + "px",
|
|
7836
7852
|
...e.style
|
|
7837
7853
|
},
|
|
7838
7854
|
onThumbPointerDown: (d) => e.onThumbPointerDown(d.y),
|
|
@@ -7849,8 +7865,8 @@ var tv = u.forwardRef((e, t) => {
|
|
|
7849
7865
|
viewport: s.viewport.offsetHeight,
|
|
7850
7866
|
scrollbar: {
|
|
7851
7867
|
size: l.current.clientHeight,
|
|
7852
|
-
paddingStart:
|
|
7853
|
-
paddingEnd:
|
|
7868
|
+
paddingStart: nr(a.paddingTop),
|
|
7869
|
+
paddingEnd: nr(a.paddingBottom)
|
|
7854
7870
|
}
|
|
7855
7871
|
});
|
|
7856
7872
|
}
|
|
@@ -7869,7 +7885,7 @@ var tv = u.forwardRef((e, t) => {
|
|
|
7869
7885
|
onWheelScroll: d,
|
|
7870
7886
|
onResize: p,
|
|
7871
7887
|
...m
|
|
7872
|
-
} = e, v = De(Je, n), [g, h] = u.useState(null), b = ae(t, (L) => h(L)), w = u.useRef(null), x = u.useRef(""), y = v.viewport, C = r.content - r.viewport, R = ye(d), _ = ye(l), N =
|
|
7888
|
+
} = e, v = De(Je, n), [g, h] = u.useState(null), b = ae(t, (L) => h(L)), w = u.useRef(null), x = u.useRef(""), y = v.viewport, C = r.content - r.viewport, R = ye(d), _ = ye(l), N = Nr(p, 10);
|
|
7873
7889
|
function k(L) {
|
|
7874
7890
|
if (w.current) {
|
|
7875
7891
|
const P = L.clientX - w.current.left, $ = L.clientY - w.current.top;
|
|
@@ -7882,7 +7898,7 @@ var tv = u.forwardRef((e, t) => {
|
|
|
7882
7898
|
(g == null ? void 0 : g.contains($)) && R(P, C);
|
|
7883
7899
|
};
|
|
7884
7900
|
return document.addEventListener("wheel", L, { passive: !1 }), () => document.removeEventListener("wheel", L, { passive: !1 });
|
|
7885
|
-
}, [y, g, C, R]), u.useEffect(_, [r, _]),
|
|
7901
|
+
}, [y, g, C, R]), u.useEffect(_, [r, _]), Ft(g, N), Ft(v.content, N), /* @__PURE__ */ c(
|
|
7886
7902
|
sv,
|
|
7887
7903
|
{
|
|
7888
7904
|
scope: n,
|
|
@@ -7910,17 +7926,17 @@ var tv = u.forwardRef((e, t) => {
|
|
|
7910
7926
|
)
|
|
7911
7927
|
}
|
|
7912
7928
|
);
|
|
7913
|
-
}),
|
|
7929
|
+
}), tr = "ScrollAreaThumb", Yc = u.forwardRef(
|
|
7914
7930
|
(e, t) => {
|
|
7915
|
-
const { forceMount: n, ...r } = e, o = qc(
|
|
7931
|
+
const { forceMount: n, ...r } = e, o = qc(tr, e.__scopeScrollArea);
|
|
7916
7932
|
return /* @__PURE__ */ c(Ae, { present: n || o.hasThumb, children: /* @__PURE__ */ c(av, { ref: t, ...r }) });
|
|
7917
7933
|
}
|
|
7918
7934
|
), av = u.forwardRef(
|
|
7919
7935
|
(e, t) => {
|
|
7920
|
-
const { __scopeScrollArea: n, style: r, ...o } = e, s = De(
|
|
7936
|
+
const { __scopeScrollArea: n, style: r, ...o } = e, s = De(tr, n), a = qc(tr, n), { onThumbPositionChange: i } = a, l = ae(
|
|
7921
7937
|
t,
|
|
7922
7938
|
(p) => a.onThumbChange(p)
|
|
7923
|
-
), f = u.useRef(void 0), d =
|
|
7939
|
+
), f = u.useRef(void 0), d = Nr(() => {
|
|
7924
7940
|
f.current && (f.current(), f.current = void 0);
|
|
7925
7941
|
}, 100);
|
|
7926
7942
|
return u.useEffect(() => {
|
|
@@ -7954,7 +7970,7 @@ var tv = u.forwardRef((e, t) => {
|
|
|
7954
7970
|
);
|
|
7955
7971
|
}
|
|
7956
7972
|
);
|
|
7957
|
-
Yc.displayName =
|
|
7973
|
+
Yc.displayName = tr;
|
|
7958
7974
|
var fs = "ScrollAreaCorner", Jc = u.forwardRef(
|
|
7959
7975
|
(e, t) => {
|
|
7960
7976
|
const n = De(fs, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
|
|
@@ -7964,11 +7980,11 @@ var fs = "ScrollAreaCorner", Jc = u.forwardRef(
|
|
|
7964
7980
|
Jc.displayName = fs;
|
|
7965
7981
|
var iv = u.forwardRef((e, t) => {
|
|
7966
7982
|
const { __scopeScrollArea: n, ...r } = e, o = De(fs, n), [s, a] = u.useState(0), [i, l] = u.useState(0), f = !!(s && i);
|
|
7967
|
-
return
|
|
7983
|
+
return Ft(o.scrollbarX, () => {
|
|
7968
7984
|
var p;
|
|
7969
7985
|
const d = ((p = o.scrollbarX) == null ? void 0 : p.offsetHeight) || 0;
|
|
7970
7986
|
o.onCornerHeightChange(d), l(d);
|
|
7971
|
-
}),
|
|
7987
|
+
}), Ft(o.scrollbarY, () => {
|
|
7972
7988
|
var p;
|
|
7973
7989
|
const d = ((p = o.scrollbarY) == null ? void 0 : p.offsetWidth) || 0;
|
|
7974
7990
|
o.onCornerWidthChange(d), a(d);
|
|
@@ -7989,23 +8005,23 @@ var iv = u.forwardRef((e, t) => {
|
|
|
7989
8005
|
}
|
|
7990
8006
|
) : null;
|
|
7991
8007
|
});
|
|
7992
|
-
function
|
|
8008
|
+
function nr(e) {
|
|
7993
8009
|
return e ? parseInt(e, 10) : 0;
|
|
7994
8010
|
}
|
|
7995
8011
|
function Zc(e, t) {
|
|
7996
8012
|
const n = e / t;
|
|
7997
8013
|
return isNaN(n) ? 0 : n;
|
|
7998
8014
|
}
|
|
7999
|
-
function
|
|
8015
|
+
function Er(e) {
|
|
8000
8016
|
const t = Zc(e.viewport, e.content), n = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, r = (e.scrollbar.size - n) * t;
|
|
8001
8017
|
return Math.max(r, 18);
|
|
8002
8018
|
}
|
|
8003
8019
|
function cv(e, t, n, r = "ltr") {
|
|
8004
|
-
const o =
|
|
8020
|
+
const o = Er(n), s = o / 2, a = t || s, i = o - a, l = n.scrollbar.paddingStart + a, f = n.scrollbar.size - n.scrollbar.paddingEnd - i, d = n.content - n.viewport, p = r === "ltr" ? [0, d] : [d * -1, 0];
|
|
8005
8021
|
return Qc([l, f], p)(e);
|
|
8006
8022
|
}
|
|
8007
|
-
function
|
|
8008
|
-
const r =
|
|
8023
|
+
function va(e, t, n = "ltr") {
|
|
8024
|
+
const r = Er(t), o = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, s = t.scrollbar.size - o, a = t.content - t.viewport, i = s - r, l = n === "ltr" ? [0, a] : [a * -1, 0], f = So(e, l);
|
|
8009
8025
|
return Qc([0, a], [0, i])(f);
|
|
8010
8026
|
}
|
|
8011
8027
|
function Qc(e, t) {
|
|
@@ -8026,13 +8042,13 @@ var lv = (e, t = () => {
|
|
|
8026
8042
|
(a || i) && t(), n = s, r = window.requestAnimationFrame(o);
|
|
8027
8043
|
}(), () => window.cancelAnimationFrame(r);
|
|
8028
8044
|
};
|
|
8029
|
-
function
|
|
8045
|
+
function Nr(e, t) {
|
|
8030
8046
|
const n = ye(e), r = u.useRef(0);
|
|
8031
8047
|
return u.useEffect(() => () => window.clearTimeout(r.current), []), u.useCallback(() => {
|
|
8032
8048
|
window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
|
|
8033
8049
|
}, [n, t]);
|
|
8034
8050
|
}
|
|
8035
|
-
function
|
|
8051
|
+
function Ft(e, t) {
|
|
8036
8052
|
const n = ye(t);
|
|
8037
8053
|
we(() => {
|
|
8038
8054
|
let r = 0;
|
|
@@ -8176,9 +8192,9 @@ function Co({
|
|
|
8176
8192
|
children: [
|
|
8177
8193
|
/* @__PURE__ */ E("div", { className: "flex items-center justify-between", children: [
|
|
8178
8194
|
/* @__PURE__ */ c("div", { className: "flex-1 min-w-0", children: k === F.threadId ? /* @__PURE__ */ E("div", { className: "flex items-center gap-2", onClick: (j) => j.stopPropagation(), children: [
|
|
8179
|
-
/* @__PURE__ */ c(
|
|
8195
|
+
/* @__PURE__ */ c(sn, { value: P, onChange: (j) => $(j.target.value), onKeyDown: (j) => Q(j, F.threadId), className: "h-6 text-sm", autoFocus: !0 }),
|
|
8180
8196
|
/* @__PURE__ */ c(de, { variant: "ghost", size: "sm", onClick: () => D(F.threadId), className: "h-6 w-6 p-0", children: /* @__PURE__ */ c(ko, { size: 12 }) }),
|
|
8181
|
-
/* @__PURE__ */ c(de, { variant: "ghost", size: "sm", onClick: T, className: "h-6 w-6 p-0", children: /* @__PURE__ */ c(
|
|
8197
|
+
/* @__PURE__ */ c(de, { variant: "ghost", size: "sm", onClick: T, className: "h-6 w-6 p-0", children: /* @__PURE__ */ c(Jt, { size: 12 }) })
|
|
8182
8198
|
] }) : /* @__PURE__ */ E(Ne, { children: [
|
|
8183
8199
|
/* @__PURE__ */ c("div", { className: "font-medium text-sm truncate text-gray-900 dark:text-slate-100", children: oe(F) }),
|
|
8184
8200
|
/* @__PURE__ */ E("div", { className: "flex items-center gap-2 text-xs text-gray-500 dark:text-slate-400 mt-1", children: [
|
|
@@ -8187,7 +8203,7 @@ function Co({
|
|
|
8187
8203
|
] })
|
|
8188
8204
|
] }) }),
|
|
8189
8205
|
/* @__PURE__ */ E("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-2", children: [
|
|
8190
|
-
r && k !== F.threadId && /* @__PURE__ */ c(de, { variant: "ghost", size: "sm", onClick: (j) => G(F, j), className: "h-6 w-6 p-0", title: "Edit title", children: /* @__PURE__ */ c(
|
|
8206
|
+
r && k !== F.threadId && /* @__PURE__ */ c(de, { variant: "ghost", size: "sm", onClick: (j) => G(F, j), className: "h-6 w-6 p-0", title: "Edit title", children: /* @__PURE__ */ c(Ta, { size: 12 }) }),
|
|
8191
8207
|
n && /* @__PURE__ */ c(
|
|
8192
8208
|
de,
|
|
8193
8209
|
{
|
|
@@ -8210,7 +8226,7 @@ function Co({
|
|
|
8210
8226
|
)
|
|
8211
8227
|
] });
|
|
8212
8228
|
}
|
|
8213
|
-
const ol =
|
|
8229
|
+
const ol = Na(null);
|
|
8214
8230
|
function Yy({ children: e, basePath: t = "/chat" }) {
|
|
8215
8231
|
const n = ft(() => t ? t === "/" ? "" : t.endsWith("/") ? t.slice(0, -1) : t : "/chat", [t]), r = {
|
|
8216
8232
|
basePath: n,
|
|
@@ -8220,24 +8236,24 @@ function Yy({ children: e, basePath: t = "/chat" }) {
|
|
|
8220
8236
|
return /* @__PURE__ */ c(ol.Provider, { value: r, children: e });
|
|
8221
8237
|
}
|
|
8222
8238
|
function Jy() {
|
|
8223
|
-
const e =
|
|
8239
|
+
const e = Ra(ol);
|
|
8224
8240
|
return e || {
|
|
8225
8241
|
basePath: "/chat",
|
|
8226
8242
|
buildThreadPath: (t) => `/chat/${t}`,
|
|
8227
8243
|
buildBasePath: () => "/chat"
|
|
8228
8244
|
};
|
|
8229
8245
|
}
|
|
8230
|
-
const
|
|
8231
|
-
function
|
|
8246
|
+
const wa = { BASE_URL: "/", DEV: !1, MODE: "library", PROD: !0, SSR: !1 };
|
|
8247
|
+
function Qt(e) {
|
|
8232
8248
|
var o;
|
|
8233
|
-
const t = typeof import.meta < "u" &&
|
|
8249
|
+
const t = typeof import.meta < "u" && wa ? wa[e] : void 0, n = (o = globalThis == null ? void 0 : globalThis.process) == null ? void 0 : o.env, r = n ? n[e] : void 0;
|
|
8234
8250
|
return (t ?? r) || void 0;
|
|
8235
8251
|
}
|
|
8236
8252
|
function fv() {
|
|
8237
|
-
return
|
|
8253
|
+
return Qt("VITE_API_BASE_URL") || Qt("NEXT_PUBLIC_API_BASE_URL") || void 0;
|
|
8238
8254
|
}
|
|
8239
8255
|
function pv() {
|
|
8240
|
-
return
|
|
8256
|
+
return Qt("VITE_API_KEY") || Qt("NEXT_PUBLIC_API_KEY") || Qt("VITE_AUTH_TOKEN") || void 0;
|
|
8241
8257
|
}
|
|
8242
8258
|
function hv() {
|
|
8243
8259
|
const e = fv(), t = pv(), n = {};
|
|
@@ -8301,8 +8317,8 @@ function vv() {
|
|
|
8301
8317
|
return n.addEventListener("change", r), t(window.innerWidth < no), () => n.removeEventListener("change", r);
|
|
8302
8318
|
}, []), !!e;
|
|
8303
8319
|
}
|
|
8304
|
-
var wv = "Separator",
|
|
8305
|
-
const { decorative: n, orientation: r =
|
|
8320
|
+
var wv = "Separator", ya = "horizontal", yv = ["horizontal", "vertical"], al = u.forwardRef((e, t) => {
|
|
8321
|
+
const { decorative: n, orientation: r = ya, ...o } = e, s = xv(r) ? r : ya, i = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
|
|
8306
8322
|
return /* @__PURE__ */ c(
|
|
8307
8323
|
ee.div,
|
|
8308
8324
|
{
|
|
@@ -8335,7 +8351,7 @@ const ps = u.forwardRef(
|
|
|
8335
8351
|
)
|
|
8336
8352
|
);
|
|
8337
8353
|
ps.displayName = il.displayName;
|
|
8338
|
-
var
|
|
8354
|
+
var Rr = "Dialog", [cl, ex] = ze(Rr), [Sv, We] = cl(Rr), ll = (e) => {
|
|
8339
8355
|
const {
|
|
8340
8356
|
__scopeDialog: t,
|
|
8341
8357
|
children: n,
|
|
@@ -8347,7 +8363,7 @@ var Nr = "Dialog", [cl, ex] = ze(Nr), [Sv, We] = cl(Nr), ll = (e) => {
|
|
|
8347
8363
|
prop: r,
|
|
8348
8364
|
defaultProp: o ?? !1,
|
|
8349
8365
|
onChange: s,
|
|
8350
|
-
caller:
|
|
8366
|
+
caller: Rr
|
|
8351
8367
|
});
|
|
8352
8368
|
return /* @__PURE__ */ c(
|
|
8353
8369
|
Sv,
|
|
@@ -8366,7 +8382,7 @@ var Nr = "Dialog", [cl, ex] = ze(Nr), [Sv, We] = cl(Nr), ll = (e) => {
|
|
|
8366
8382
|
}
|
|
8367
8383
|
);
|
|
8368
8384
|
};
|
|
8369
|
-
ll.displayName =
|
|
8385
|
+
ll.displayName = Rr;
|
|
8370
8386
|
var ul = "DialogTrigger", dl = u.forwardRef(
|
|
8371
8387
|
(e, t) => {
|
|
8372
8388
|
const { __scopeDialog: n, ...r } = e, o = We(ul, n), s = ae(t, o.triggerRef);
|
|
@@ -8390,23 +8406,23 @@ var hs = "DialogPortal", [Cv, fl] = cl(hs, {
|
|
|
8390
8406
|
forceMount: void 0
|
|
8391
8407
|
}), pl = (e) => {
|
|
8392
8408
|
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = We(hs, t);
|
|
8393
|
-
return /* @__PURE__ */ c(Cv, { scope: t, forceMount: n, children: u.Children.map(r, (a) => /* @__PURE__ */ c(Ae, { present: n || s.open, children: /* @__PURE__ */ c(
|
|
8409
|
+
return /* @__PURE__ */ c(Cv, { scope: t, forceMount: n, children: u.Children.map(r, (a) => /* @__PURE__ */ c(Ae, { present: n || s.open, children: /* @__PURE__ */ c(vr, { asChild: !0, container: o, children: a }) })) });
|
|
8394
8410
|
};
|
|
8395
8411
|
pl.displayName = hs;
|
|
8396
|
-
var
|
|
8412
|
+
var rr = "DialogOverlay", hl = u.forwardRef(
|
|
8397
8413
|
(e, t) => {
|
|
8398
|
-
const n = fl(
|
|
8414
|
+
const n = fl(rr, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = We(rr, e.__scopeDialog);
|
|
8399
8415
|
return s.modal ? /* @__PURE__ */ c(Ae, { present: r || s.open, children: /* @__PURE__ */ c(Nv, { ...o, ref: t }) }) : null;
|
|
8400
8416
|
}
|
|
8401
8417
|
);
|
|
8402
|
-
hl.displayName =
|
|
8403
|
-
var Ev =
|
|
8418
|
+
hl.displayName = rr;
|
|
8419
|
+
var Ev = Mt("DialogOverlay.RemoveScroll"), Nv = u.forwardRef(
|
|
8404
8420
|
(e, t) => {
|
|
8405
|
-
const { __scopeDialog: n, ...r } = e, o = We(
|
|
8421
|
+
const { __scopeDialog: n, ...r } = e, o = We(rr, n);
|
|
8406
8422
|
return (
|
|
8407
8423
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
8408
8424
|
// ie. when `Overlay` and `Content` are siblings
|
|
8409
|
-
/* @__PURE__ */ c(
|
|
8425
|
+
/* @__PURE__ */ c(yr, { as: Ev, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ c(
|
|
8410
8426
|
ee.div,
|
|
8411
8427
|
{
|
|
8412
8428
|
"data-state": gs(o.open),
|
|
@@ -8480,7 +8496,7 @@ var Rv = u.forwardRef(
|
|
|
8480
8496
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...a } = e, i = We(vt, n), l = u.useRef(null), f = ae(t, l);
|
|
8481
8497
|
return zo(), /* @__PURE__ */ E(Ne, { children: [
|
|
8482
8498
|
/* @__PURE__ */ c(
|
|
8483
|
-
|
|
8499
|
+
pr,
|
|
8484
8500
|
{
|
|
8485
8501
|
asChild: !0,
|
|
8486
8502
|
loop: !0,
|
|
@@ -8488,7 +8504,7 @@ var Rv = u.forwardRef(
|
|
|
8488
8504
|
onMountAutoFocus: o,
|
|
8489
8505
|
onUnmountAutoFocus: s,
|
|
8490
8506
|
children: /* @__PURE__ */ c(
|
|
8491
|
-
|
|
8507
|
+
pn,
|
|
8492
8508
|
{
|
|
8493
8509
|
role: "dialog",
|
|
8494
8510
|
id: i.contentId,
|
|
@@ -8573,7 +8589,7 @@ const Al = _v, Dv = Ov, Lv = kv, Pl = u.forwardRef(({ className: e, ...t }, n) =
|
|
|
8573
8589
|
}
|
|
8574
8590
|
));
|
|
8575
8591
|
Pl.displayName = El.displayName;
|
|
8576
|
-
const Fv =
|
|
8592
|
+
const Fv = cn(
|
|
8577
8593
|
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
8578
8594
|
{
|
|
8579
8595
|
variants: {
|
|
@@ -8599,7 +8615,7 @@ const Fv = an(
|
|
|
8599
8615
|
children: [
|
|
8600
8616
|
n,
|
|
8601
8617
|
/* @__PURE__ */ E(Mv, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
8602
|
-
/* @__PURE__ */ c(
|
|
8618
|
+
/* @__PURE__ */ c(Jt, { className: "h-4 w-4" }),
|
|
8603
8619
|
/* @__PURE__ */ c("span", { className: "sr-only", children: "Close" })
|
|
8604
8620
|
] })
|
|
8605
8621
|
]
|
|
@@ -8639,7 +8655,7 @@ const Ol = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
8639
8655
|
}
|
|
8640
8656
|
));
|
|
8641
8657
|
Ol.displayName = Tl.displayName;
|
|
8642
|
-
function
|
|
8658
|
+
function xa({
|
|
8643
8659
|
className: e,
|
|
8644
8660
|
...t
|
|
8645
8661
|
}) {
|
|
@@ -8674,9 +8690,9 @@ var kl = Object.freeze({
|
|
|
8674
8690
|
)
|
|
8675
8691
|
);
|
|
8676
8692
|
Ml.displayName = $v;
|
|
8677
|
-
var Bv = Ml, [
|
|
8678
|
-
|
|
8679
|
-
]),
|
|
8693
|
+
var Bv = Ml, [Tr, nx] = ze("Tooltip", [
|
|
8694
|
+
jt
|
|
8695
|
+
]), Ar = jt(), Dl = "TooltipProvider", Uv = 700, Eo = "tooltip.open", [Hv, vs] = Tr(Dl), Ll = (e) => {
|
|
8680
8696
|
const {
|
|
8681
8697
|
__scopeTooltip: t,
|
|
8682
8698
|
delayDuration: n = Uv,
|
|
@@ -8712,7 +8728,7 @@ var Bv = Ml, [Rr, nx] = ze("Tooltip", [
|
|
|
8712
8728
|
);
|
|
8713
8729
|
};
|
|
8714
8730
|
Ll.displayName = Dl;
|
|
8715
|
-
var
|
|
8731
|
+
var an = "Tooltip", [zv, Pr] = Tr(an), Fl = (e) => {
|
|
8716
8732
|
const {
|
|
8717
8733
|
__scopeTooltip: t,
|
|
8718
8734
|
children: n,
|
|
@@ -8721,13 +8737,13 @@ var sn = "Tooltip", [zv, Ar] = Rr(sn), Fl = (e) => {
|
|
|
8721
8737
|
onOpenChange: s,
|
|
8722
8738
|
disableHoverableContent: a,
|
|
8723
8739
|
delayDuration: i
|
|
8724
|
-
} = e, l = vs(
|
|
8740
|
+
} = e, l = vs(an, e.__scopeTooltip), f = Ar(t), [d, p] = u.useState(null), m = $e(), v = u.useRef(0), g = a ?? l.disableHoverableContent, h = i ?? l.delayDuration, b = u.useRef(!1), [w, x] = at({
|
|
8725
8741
|
prop: r,
|
|
8726
8742
|
defaultProp: o ?? !1,
|
|
8727
8743
|
onChange: (N) => {
|
|
8728
8744
|
N ? (l.onOpen(), document.dispatchEvent(new CustomEvent(Eo))) : l.onClose(), s == null || s(N);
|
|
8729
8745
|
},
|
|
8730
|
-
caller:
|
|
8746
|
+
caller: an
|
|
8731
8747
|
}), y = u.useMemo(() => w ? b.current ? "delayed-open" : "instant-open" : "closed", [w]), C = u.useCallback(() => {
|
|
8732
8748
|
window.clearTimeout(v.current), v.current = 0, b.current = !1, x(!0);
|
|
8733
8749
|
}, [x]), R = u.useCallback(() => {
|
|
@@ -8761,10 +8777,10 @@ var sn = "Tooltip", [zv, Ar] = Rr(sn), Fl = (e) => {
|
|
|
8761
8777
|
}
|
|
8762
8778
|
) });
|
|
8763
8779
|
};
|
|
8764
|
-
Fl.displayName =
|
|
8780
|
+
Fl.displayName = an;
|
|
8765
8781
|
var No = "TooltipTrigger", $l = u.forwardRef(
|
|
8766
8782
|
(e, t) => {
|
|
8767
|
-
const { __scopeTooltip: n, ...r } = e, o =
|
|
8783
|
+
const { __scopeTooltip: n, ...r } = e, o = Pr(No, n), s = vs(No, n), a = Ar(n), i = u.useRef(null), l = ae(t, i, o.onTriggerChange), f = u.useRef(!1), d = u.useRef(!1), p = u.useCallback(() => f.current = !1, []);
|
|
8768
8784
|
return u.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ c(Zo, { asChild: !0, ...a, children: /* @__PURE__ */ c(
|
|
8769
8785
|
ee.button,
|
|
8770
8786
|
{
|
|
@@ -8791,15 +8807,15 @@ var No = "TooltipTrigger", $l = u.forwardRef(
|
|
|
8791
8807
|
}
|
|
8792
8808
|
);
|
|
8793
8809
|
$l.displayName = No;
|
|
8794
|
-
var Wv = "TooltipPortal", [rx, jv] =
|
|
8810
|
+
var Wv = "TooltipPortal", [rx, jv] = Tr(Wv, {
|
|
8795
8811
|
forceMount: void 0
|
|
8796
|
-
}),
|
|
8812
|
+
}), $t = "TooltipContent", Bl = u.forwardRef(
|
|
8797
8813
|
(e, t) => {
|
|
8798
|
-
const n = jv(
|
|
8814
|
+
const n = jv($t, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...s } = e, a = Pr($t, e.__scopeTooltip);
|
|
8799
8815
|
return /* @__PURE__ */ c(Ae, { present: r || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ c(Ul, { side: o, ...s, ref: t }) : /* @__PURE__ */ c(Vv, { side: o, ...s, ref: t }) });
|
|
8800
8816
|
}
|
|
8801
8817
|
), Vv = u.forwardRef((e, t) => {
|
|
8802
|
-
const n =
|
|
8818
|
+
const n = Pr($t, e.__scopeTooltip), r = vs($t, e.__scopeTooltip), o = u.useRef(null), s = ae(t, o), [a, i] = u.useState(null), { trigger: l, onClose: f } = n, d = o.current, { onPointerInTransitChange: p } = r, m = u.useCallback(() => {
|
|
8803
8819
|
i(null), p(!1);
|
|
8804
8820
|
}, [p]), v = u.useCallback(
|
|
8805
8821
|
(g, h) => {
|
|
@@ -8824,7 +8840,7 @@ var Wv = "TooltipPortal", [rx, jv] = Rr(Wv, {
|
|
|
8824
8840
|
return document.addEventListener("pointermove", g), () => document.removeEventListener("pointermove", g);
|
|
8825
8841
|
}
|
|
8826
8842
|
}, [l, d, a, f, m]), /* @__PURE__ */ c(Ul, { ...e, ref: s });
|
|
8827
|
-
}), [Kv, Gv] =
|
|
8843
|
+
}), [Kv, Gv] = Tr(an, { isInside: !1 }), qv = Nd("TooltipContent"), Ul = u.forwardRef(
|
|
8828
8844
|
(e, t) => {
|
|
8829
8845
|
const {
|
|
8830
8846
|
__scopeTooltip: n,
|
|
@@ -8833,7 +8849,7 @@ var Wv = "TooltipPortal", [rx, jv] = Rr(Wv, {
|
|
|
8833
8849
|
onEscapeKeyDown: s,
|
|
8834
8850
|
onPointerDownOutside: a,
|
|
8835
8851
|
...i
|
|
8836
|
-
} = e, l =
|
|
8852
|
+
} = e, l = Pr($t, n), f = Ar(n), { onClose: d } = l;
|
|
8837
8853
|
return u.useEffect(() => (document.addEventListener(Eo, d), () => document.removeEventListener(Eo, d)), [d]), u.useEffect(() => {
|
|
8838
8854
|
if (l.trigger) {
|
|
8839
8855
|
const p = (m) => {
|
|
@@ -8843,7 +8859,7 @@ var Wv = "TooltipPortal", [rx, jv] = Rr(Wv, {
|
|
|
8843
8859
|
return window.addEventListener("scroll", p, { capture: !0 }), () => window.removeEventListener("scroll", p, { capture: !0 });
|
|
8844
8860
|
}
|
|
8845
8861
|
}, [l.trigger, d]), /* @__PURE__ */ c(
|
|
8846
|
-
|
|
8862
|
+
pn,
|
|
8847
8863
|
{
|
|
8848
8864
|
asChild: !0,
|
|
8849
8865
|
disableOutsidePointerEvents: !1,
|
|
@@ -8876,10 +8892,10 @@ var Wv = "TooltipPortal", [rx, jv] = Rr(Wv, {
|
|
|
8876
8892
|
);
|
|
8877
8893
|
}
|
|
8878
8894
|
);
|
|
8879
|
-
Bl.displayName =
|
|
8895
|
+
Bl.displayName = $t;
|
|
8880
8896
|
var Hl = "TooltipArrow", Xv = u.forwardRef(
|
|
8881
8897
|
(e, t) => {
|
|
8882
|
-
const { __scopeTooltip: n, ...r } = e, o =
|
|
8898
|
+
const { __scopeTooltip: n, ...r } = e, o = Ar(n);
|
|
8883
8899
|
return Gv(
|
|
8884
8900
|
Hl,
|
|
8885
8901
|
n
|
|
@@ -8994,7 +9010,7 @@ const sw = nw, aw = rw, iw = ow, Wl = u.forwardRef(({ className: e, sideOffset:
|
|
|
8994
9010
|
));
|
|
8995
9011
|
Wl.displayName = zl.displayName;
|
|
8996
9012
|
const cw = "sidebar:state", lw = 60 * 60 * 24 * 7, uw = "16rem", dw = "18rem", fw = "3rem", pw = "b", jl = u.createContext(null);
|
|
8997
|
-
function
|
|
9013
|
+
function Ir() {
|
|
8998
9014
|
const e = u.useContext(jl);
|
|
8999
9015
|
if (!e)
|
|
9000
9016
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
@@ -9064,7 +9080,7 @@ const Kl = u.forwardRef(
|
|
|
9064
9080
|
children: o,
|
|
9065
9081
|
...s
|
|
9066
9082
|
}, a) => {
|
|
9067
|
-
const { isMobile: i, state: l, openMobile: f, setOpenMobile: d } =
|
|
9083
|
+
const { isMobile: i, state: l, openMobile: f, setOpenMobile: d } = Ir();
|
|
9068
9084
|
return n === "none" ? /* @__PURE__ */ c(
|
|
9069
9085
|
"div",
|
|
9070
9086
|
{
|
|
@@ -9137,7 +9153,7 @@ const Kl = u.forwardRef(
|
|
|
9137
9153
|
);
|
|
9138
9154
|
Kl.displayName = "Sidebar";
|
|
9139
9155
|
const Gl = u.forwardRef(({ className: e, onClick: t, ...n }, r) => {
|
|
9140
|
-
const { toggleSidebar: o } =
|
|
9156
|
+
const { toggleSidebar: o } = Ir();
|
|
9141
9157
|
return /* @__PURE__ */ E(
|
|
9142
9158
|
de,
|
|
9143
9159
|
{
|
|
@@ -9159,7 +9175,7 @@ const Gl = u.forwardRef(({ className: e, onClick: t, ...n }, r) => {
|
|
|
9159
9175
|
});
|
|
9160
9176
|
Gl.displayName = "SidebarTrigger";
|
|
9161
9177
|
const hw = u.forwardRef(({ className: e, ...t }, n) => {
|
|
9162
|
-
const { toggleSidebar: r } =
|
|
9178
|
+
const { toggleSidebar: r } = Ir();
|
|
9163
9179
|
return /* @__PURE__ */ c(
|
|
9164
9180
|
"button",
|
|
9165
9181
|
{
|
|
@@ -9197,7 +9213,7 @@ const ql = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
9197
9213
|
));
|
|
9198
9214
|
ql.displayName = "SidebarInset";
|
|
9199
9215
|
const mw = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
9200
|
-
|
|
9216
|
+
sn,
|
|
9201
9217
|
{
|
|
9202
9218
|
ref: n,
|
|
9203
9219
|
"data-sidebar": "input",
|
|
@@ -9263,7 +9279,7 @@ const Jl = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
9263
9279
|
));
|
|
9264
9280
|
Jl.displayName = "SidebarGroup";
|
|
9265
9281
|
const Zl = u.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => /* @__PURE__ */ c(
|
|
9266
|
-
t ?
|
|
9282
|
+
t ? Bt : "div",
|
|
9267
9283
|
{
|
|
9268
9284
|
ref: r,
|
|
9269
9285
|
"data-sidebar": "group-label",
|
|
@@ -9277,7 +9293,7 @@ const Zl = u.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => /* @__PU
|
|
|
9277
9293
|
));
|
|
9278
9294
|
Zl.displayName = "SidebarGroupLabel";
|
|
9279
9295
|
const vw = u.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => /* @__PURE__ */ c(
|
|
9280
|
-
t ?
|
|
9296
|
+
t ? Bt : "button",
|
|
9281
9297
|
{
|
|
9282
9298
|
ref: r,
|
|
9283
9299
|
"data-sidebar": "group-action",
|
|
@@ -9322,7 +9338,7 @@ const tu = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
9322
9338
|
}
|
|
9323
9339
|
));
|
|
9324
9340
|
tu.displayName = "SidebarMenuItem";
|
|
9325
|
-
const ww =
|
|
9341
|
+
const ww = cn(
|
|
9326
9342
|
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
9327
9343
|
{
|
|
9328
9344
|
variants: {
|
|
@@ -9351,7 +9367,7 @@ const ww = an(
|
|
|
9351
9367
|
className: s,
|
|
9352
9368
|
...a
|
|
9353
9369
|
}, i) => {
|
|
9354
|
-
const l = e ?
|
|
9370
|
+
const l = e ? Bt : "button", { isMobile: f, state: d } = Ir(), p = /* @__PURE__ */ c(
|
|
9355
9371
|
l,
|
|
9356
9372
|
{
|
|
9357
9373
|
ref: i,
|
|
@@ -9380,7 +9396,7 @@ const ww = an(
|
|
|
9380
9396
|
);
|
|
9381
9397
|
nu.displayName = "SidebarMenuButton";
|
|
9382
9398
|
const yw = u.forwardRef(({ className: e, asChild: t = !1, showOnHover: n = !1, ...r }, o) => /* @__PURE__ */ c(
|
|
9383
|
-
t ?
|
|
9399
|
+
t ? Bt : "button",
|
|
9384
9400
|
{
|
|
9385
9401
|
ref: o,
|
|
9386
9402
|
"data-sidebar": "menu-action",
|
|
@@ -9428,14 +9444,14 @@ const Sw = u.forwardRef(({ className: e, showIcon: t = !1, ...n }, r) => {
|
|
|
9428
9444
|
...n,
|
|
9429
9445
|
children: [
|
|
9430
9446
|
t && /* @__PURE__ */ c(
|
|
9431
|
-
|
|
9447
|
+
xa,
|
|
9432
9448
|
{
|
|
9433
9449
|
className: "size-4 rounded-md",
|
|
9434
9450
|
"data-sidebar": "menu-skeleton-icon"
|
|
9435
9451
|
}
|
|
9436
9452
|
),
|
|
9437
9453
|
/* @__PURE__ */ c(
|
|
9438
|
-
|
|
9454
|
+
xa,
|
|
9439
9455
|
{
|
|
9440
9456
|
className: "h-4 flex-1 max-w-[--skeleton-width]",
|
|
9441
9457
|
"data-sidebar": "menu-skeleton-text",
|
|
@@ -9466,7 +9482,7 @@ Cw.displayName = "SidebarMenuSub";
|
|
|
9466
9482
|
const Ew = u.forwardRef(({ ...e }, t) => /* @__PURE__ */ c("li", { ref: t, ...e }));
|
|
9467
9483
|
Ew.displayName = "SidebarMenuSubItem";
|
|
9468
9484
|
const Nw = u.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, className: r, ...o }, s) => /* @__PURE__ */ c(
|
|
9469
|
-
e ?
|
|
9485
|
+
e ? Bt : "a",
|
|
9470
9486
|
{
|
|
9471
9487
|
ref: s,
|
|
9472
9488
|
"data-sidebar": "menu-sub-button",
|
|
@@ -9493,7 +9509,7 @@ function ox({
|
|
|
9493
9509
|
chatClassName: s = "",
|
|
9494
9510
|
...a
|
|
9495
9511
|
}) {
|
|
9496
|
-
return /* @__PURE__ */ c(
|
|
9512
|
+
return /* @__PURE__ */ c(Mn, { ...a, children: /* @__PURE__ */ E(Vl, { className: `w-full ${r}`, children: [
|
|
9497
9513
|
/* @__PURE__ */ E(Kl, { className: `border-r ${o}`, children: [
|
|
9498
9514
|
/* @__PURE__ */ c(Xl, { children: /* @__PURE__ */ c(eu, { children: /* @__PURE__ */ c(tu, { children: /* @__PURE__ */ c(nu, { size: "lg", children: /* @__PURE__ */ c("span", { className: "font-semibold", children: t }) }) }) }) }),
|
|
9499
9515
|
/* @__PURE__ */ c(Yl, { children: n && /* @__PURE__ */ E(Jl, { children: [
|
|
@@ -9515,7 +9531,7 @@ function ox({
|
|
|
9515
9531
|
/* @__PURE__ */ c("div", { className: "flex-1" }),
|
|
9516
9532
|
e
|
|
9517
9533
|
] }),
|
|
9518
|
-
/* @__PURE__ */ c("main", { className: `flex-1 min-h-0 overflow-hidden ${s}`, children: /* @__PURE__ */ c(
|
|
9534
|
+
/* @__PURE__ */ c("main", { className: `flex-1 min-h-0 overflow-hidden ${s}`, children: /* @__PURE__ */ c(Bn, {}) })
|
|
9519
9535
|
] })
|
|
9520
9536
|
] }) });
|
|
9521
9537
|
}
|
|
@@ -9532,7 +9548,7 @@ var Rw = "Label", ru = u.forwardRef((e, t) => /* @__PURE__ */ c(
|
|
|
9532
9548
|
));
|
|
9533
9549
|
ru.displayName = Rw;
|
|
9534
9550
|
var ou = ru;
|
|
9535
|
-
const Tw =
|
|
9551
|
+
const Tw = cn(
|
|
9536
9552
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
9537
9553
|
), ke = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
9538
9554
|
ou,
|
|
@@ -9547,7 +9563,7 @@ function su(e) {
|
|
|
9547
9563
|
const t = u.useRef({ value: e, previous: e });
|
|
9548
9564
|
return u.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
9549
9565
|
}
|
|
9550
|
-
var
|
|
9566
|
+
var _r = "Switch", [Aw, sx] = ze(_r), [Pw, Iw] = Aw(_r), au = u.forwardRef(
|
|
9551
9567
|
(e, t) => {
|
|
9552
9568
|
const {
|
|
9553
9569
|
__scopeSwitch: n,
|
|
@@ -9564,7 +9580,7 @@ var Ir = "Switch", [Aw, sx] = ze(Ir), [Pw, Iw] = Aw(Ir), au = u.forwardRef(
|
|
|
9564
9580
|
prop: o,
|
|
9565
9581
|
defaultProp: s ?? !1,
|
|
9566
9582
|
onChange: f,
|
|
9567
|
-
caller:
|
|
9583
|
+
caller: _r
|
|
9568
9584
|
});
|
|
9569
9585
|
return /* @__PURE__ */ E(Pw, { scope: n, checked: w, disabled: i, children: [
|
|
9570
9586
|
/* @__PURE__ */ c(
|
|
@@ -9602,7 +9618,7 @@ var Ir = "Switch", [Aw, sx] = ze(Ir), [Pw, Iw] = Aw(Ir), au = u.forwardRef(
|
|
|
9602
9618
|
] });
|
|
9603
9619
|
}
|
|
9604
9620
|
);
|
|
9605
|
-
au.displayName =
|
|
9621
|
+
au.displayName = _r;
|
|
9606
9622
|
var iu = "SwitchThumb", cu = u.forwardRef(
|
|
9607
9623
|
(e, t) => {
|
|
9608
9624
|
const { __scopeSwitch: n, ...r } = e, o = Iw(iu, n);
|
|
@@ -9684,10 +9700,10 @@ const ot = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
9684
9700
|
}
|
|
9685
9701
|
));
|
|
9686
9702
|
ot.displayName = du.displayName;
|
|
9687
|
-
var kw = [" ", "Enter", "ArrowUp", "ArrowDown"], Mw = [" ", "Enter"], wt = "Select", [
|
|
9703
|
+
var kw = [" ", "Enter", "ArrowUp", "ArrowDown"], Mw = [" ", "Enter"], wt = "Select", [Or, kr, Dw] = Ho(wt), [Vt, ax] = ze(wt, [
|
|
9688
9704
|
Dw,
|
|
9689
|
-
|
|
9690
|
-
]),
|
|
9705
|
+
jt
|
|
9706
|
+
]), Mr = jt(), [Lw, lt] = Vt(wt), [Fw, $w] = Vt(wt), fu = (e) => {
|
|
9691
9707
|
const {
|
|
9692
9708
|
__scopeSelect: t,
|
|
9693
9709
|
children: n,
|
|
@@ -9703,7 +9719,7 @@ var kw = [" ", "Enter", "ArrowUp", "ArrowDown"], Mw = [" ", "Enter"], wt = "Sele
|
|
|
9703
9719
|
disabled: m,
|
|
9704
9720
|
required: v,
|
|
9705
9721
|
form: g
|
|
9706
|
-
} = e, h =
|
|
9722
|
+
} = e, h = Mr(t), [b, w] = u.useState(null), [x, y] = u.useState(null), [C, R] = u.useState(!1), _ = fr(f), [N, k] = at({
|
|
9707
9723
|
prop: r,
|
|
9708
9724
|
defaultProp: o ?? !1,
|
|
9709
9725
|
onChange: s,
|
|
@@ -9734,7 +9750,7 @@ var kw = [" ", "Enter", "ArrowUp", "ArrowDown"], Mw = [" ", "Enter"], wt = "Sele
|
|
|
9734
9750
|
triggerPointerDownPosRef: $,
|
|
9735
9751
|
disabled: m,
|
|
9736
9752
|
children: [
|
|
9737
|
-
/* @__PURE__ */ c(
|
|
9753
|
+
/* @__PURE__ */ c(Or.Provider, { scope: t, children: /* @__PURE__ */ c(
|
|
9738
9754
|
Fw,
|
|
9739
9755
|
{
|
|
9740
9756
|
scope: e.__scopeSelect,
|
|
@@ -9776,7 +9792,7 @@ var kw = [" ", "Enter", "ArrowUp", "ArrowDown"], Mw = [" ", "Enter"], wt = "Sele
|
|
|
9776
9792
|
fu.displayName = wt;
|
|
9777
9793
|
var pu = "SelectTrigger", hu = u.forwardRef(
|
|
9778
9794
|
(e, t) => {
|
|
9779
|
-
const { __scopeSelect: n, disabled: r = !1, ...o } = e, s =
|
|
9795
|
+
const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = Mr(n), a = lt(pu, n), i = a.disabled || r, l = ae(t, a.onTriggerChange), f = kr(n), d = u.useRef("touch"), [p, m, v] = $u((h) => {
|
|
9780
9796
|
const b = f().filter((y) => !y.disabled), w = b.find((y) => y.value === a.value), x = Bu(b, h, w);
|
|
9781
9797
|
x !== void 0 && a.onValueChange(x.value);
|
|
9782
9798
|
}), g = (h) => {
|
|
@@ -9842,7 +9858,7 @@ var Bw = "SelectIcon", bu = u.forwardRef(
|
|
|
9842
9858
|
}
|
|
9843
9859
|
);
|
|
9844
9860
|
bu.displayName = Bw;
|
|
9845
|
-
var Uw = "SelectPortal", vu = (e) => /* @__PURE__ */ c(
|
|
9861
|
+
var Uw = "SelectPortal", vu = (e) => /* @__PURE__ */ c(vr, { asChild: !0, ...e });
|
|
9846
9862
|
vu.displayName = Uw;
|
|
9847
9863
|
var yt = "SelectContent", wu = u.forwardRef(
|
|
9848
9864
|
(e, t) => {
|
|
@@ -9851,8 +9867,8 @@ var yt = "SelectContent", wu = u.forwardRef(
|
|
|
9851
9867
|
o(new DocumentFragment());
|
|
9852
9868
|
}, []), !n.open) {
|
|
9853
9869
|
const s = r;
|
|
9854
|
-
return s ?
|
|
9855
|
-
/* @__PURE__ */ c(yu, { scope: e.__scopeSelect, children: /* @__PURE__ */ c(
|
|
9870
|
+
return s ? sr.createPortal(
|
|
9871
|
+
/* @__PURE__ */ c(yu, { scope: e.__scopeSelect, children: /* @__PURE__ */ c(Or.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ c("div", { children: e.children }) }) }),
|
|
9856
9872
|
s
|
|
9857
9873
|
) : null;
|
|
9858
9874
|
}
|
|
@@ -9860,7 +9876,7 @@ var yt = "SelectContent", wu = u.forwardRef(
|
|
|
9860
9876
|
}
|
|
9861
9877
|
);
|
|
9862
9878
|
wu.displayName = yt;
|
|
9863
|
-
var Fe = 10, [yu, ut] =
|
|
9879
|
+
var Fe = 10, [yu, ut] = Vt(yt), Hw = "SelectContentImpl", zw = Mt("SelectContent.RemoveScroll"), xu = u.forwardRef(
|
|
9864
9880
|
(e, t) => {
|
|
9865
9881
|
const {
|
|
9866
9882
|
__scopeSelect: n,
|
|
@@ -9884,7 +9900,7 @@ var Fe = 10, [yu, ut] = jt(yt), Hw = "SelectContentImpl", zw = kt("SelectContent
|
|
|
9884
9900
|
...w
|
|
9885
9901
|
} = e, x = lt(yt, n), [y, C] = u.useState(null), [R, _] = u.useState(null), N = ae(t, (z) => C(z)), [k, L] = u.useState(null), [P, $] = u.useState(
|
|
9886
9902
|
null
|
|
9887
|
-
), K =
|
|
9903
|
+
), K = kr(n), [B, M] = u.useState(!1), H = u.useRef(!1);
|
|
9888
9904
|
u.useEffect(() => {
|
|
9889
9905
|
if (y) return ts(y);
|
|
9890
9906
|
}, [y]), zo();
|
|
@@ -9968,8 +9984,8 @@ var Fe = 10, [yu, ut] = jt(yt), Hw = "SelectContentImpl", zw = kt("SelectContent
|
|
|
9968
9984
|
position: r,
|
|
9969
9985
|
isPositioned: B,
|
|
9970
9986
|
searchRef: Q,
|
|
9971
|
-
children: /* @__PURE__ */ c(
|
|
9972
|
-
|
|
9987
|
+
children: /* @__PURE__ */ c(yr, { as: zw, allowPinchZoom: !0, children: /* @__PURE__ */ c(
|
|
9988
|
+
pr,
|
|
9973
9989
|
{
|
|
9974
9990
|
asChild: !0,
|
|
9975
9991
|
trapped: x.open,
|
|
@@ -9981,7 +9997,7 @@ var Fe = 10, [yu, ut] = jt(yt), Hw = "SelectContentImpl", zw = kt("SelectContent
|
|
|
9981
9997
|
(W = x.trigger) == null || W.focus({ preventScroll: !0 }), z.preventDefault();
|
|
9982
9998
|
}),
|
|
9983
9999
|
children: /* @__PURE__ */ c(
|
|
9984
|
-
|
|
10000
|
+
pn,
|
|
9985
10001
|
{
|
|
9986
10002
|
asChild: !0,
|
|
9987
10003
|
disableOutsidePointerEvents: !0,
|
|
@@ -10032,7 +10048,7 @@ var Fe = 10, [yu, ut] = jt(yt), Hw = "SelectContentImpl", zw = kt("SelectContent
|
|
|
10032
10048
|
);
|
|
10033
10049
|
xu.displayName = Hw;
|
|
10034
10050
|
var Ww = "SelectItemAlignedPosition", Su = u.forwardRef((e, t) => {
|
|
10035
|
-
const { __scopeSelect: n, onPlaced: r, ...o } = e, s = lt(yt, n), a = ut(yt, n), [i, l] = u.useState(null), [f, d] = u.useState(null), p = ae(t, (N) => d(N)), m =
|
|
10051
|
+
const { __scopeSelect: n, onPlaced: r, ...o } = e, s = lt(yt, n), a = ut(yt, n), [i, l] = u.useState(null), [f, d] = u.useState(null), p = ae(t, (N) => d(N)), m = kr(n), v = u.useRef(!1), g = u.useRef(!0), { viewport: h, selectedItem: b, selectedItemText: w, focusSelectedItem: x } = a, y = u.useCallback(() => {
|
|
10036
10052
|
if (s.trigger && s.valueNode && i && f && h && b && w) {
|
|
10037
10053
|
const N = s.trigger.getBoundingClientRect(), k = f.getBoundingClientRect(), L = s.valueNode.getBoundingClientRect(), P = w.getBoundingClientRect();
|
|
10038
10054
|
if (s.dir !== "rtl") {
|
|
@@ -10142,7 +10158,7 @@ var jw = "SelectPopperPosition", Ro = u.forwardRef((e, t) => {
|
|
|
10142
10158
|
align: r = "start",
|
|
10143
10159
|
collisionPadding: o = Fe,
|
|
10144
10160
|
...s
|
|
10145
|
-
} = e, a =
|
|
10161
|
+
} = e, a = Mr(n);
|
|
10146
10162
|
return /* @__PURE__ */ c(
|
|
10147
10163
|
Qo,
|
|
10148
10164
|
{
|
|
@@ -10165,7 +10181,7 @@ var jw = "SelectPopperPosition", Ro = u.forwardRef((e, t) => {
|
|
|
10165
10181
|
);
|
|
10166
10182
|
});
|
|
10167
10183
|
Ro.displayName = jw;
|
|
10168
|
-
var [Vw, ws] =
|
|
10184
|
+
var [Vw, ws] = Vt(yt, {}), To = "SelectViewport", Cu = u.forwardRef(
|
|
10169
10185
|
(e, t) => {
|
|
10170
10186
|
const { __scopeSelect: n, nonce: r, ...o } = e, s = ut(To, n), a = ws(To, n), i = ae(t, s.onViewportChange), l = u.useRef(0);
|
|
10171
10187
|
return /* @__PURE__ */ E(Ne, { children: [
|
|
@@ -10178,7 +10194,7 @@ var [Vw, ws] = jt(yt, {}), To = "SelectViewport", Cu = u.forwardRef(
|
|
|
10178
10194
|
nonce: r
|
|
10179
10195
|
}
|
|
10180
10196
|
),
|
|
10181
|
-
/* @__PURE__ */ c(
|
|
10197
|
+
/* @__PURE__ */ c(Or.Slot, { scope: n, children: /* @__PURE__ */ c(
|
|
10182
10198
|
ee.div,
|
|
10183
10199
|
{
|
|
10184
10200
|
"data-radix-select-viewport": "",
|
|
@@ -10218,7 +10234,7 @@ var [Vw, ws] = jt(yt, {}), To = "SelectViewport", Cu = u.forwardRef(
|
|
|
10218
10234
|
}
|
|
10219
10235
|
);
|
|
10220
10236
|
Cu.displayName = To;
|
|
10221
|
-
var Eu = "SelectGroup", [Kw, Gw] =
|
|
10237
|
+
var Eu = "SelectGroup", [Kw, Gw] = Vt(Eu), qw = u.forwardRef(
|
|
10222
10238
|
(e, t) => {
|
|
10223
10239
|
const { __scopeSelect: n, ...r } = e, o = $e();
|
|
10224
10240
|
return /* @__PURE__ */ c(Kw, { scope: n, id: o, children: /* @__PURE__ */ c(ee.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
|
|
@@ -10232,7 +10248,7 @@ var Nu = "SelectLabel", Ru = u.forwardRef(
|
|
|
10232
10248
|
}
|
|
10233
10249
|
);
|
|
10234
10250
|
Ru.displayName = Nu;
|
|
10235
|
-
var
|
|
10251
|
+
var or = "SelectItem", [Xw, Tu] = Vt(or), Au = u.forwardRef(
|
|
10236
10252
|
(e, t) => {
|
|
10237
10253
|
const {
|
|
10238
10254
|
__scopeSelect: n,
|
|
@@ -10240,7 +10256,7 @@ var rr = "SelectItem", [Xw, Tu] = jt(rr), Au = u.forwardRef(
|
|
|
10240
10256
|
disabled: o = !1,
|
|
10241
10257
|
textValue: s,
|
|
10242
10258
|
...a
|
|
10243
|
-
} = e, i = lt(
|
|
10259
|
+
} = e, i = lt(or, n), l = ut(or, n), f = i.value === r, [d, p] = u.useState(s ?? ""), [m, v] = u.useState(!1), g = ae(
|
|
10244
10260
|
t,
|
|
10245
10261
|
(x) => {
|
|
10246
10262
|
var y;
|
|
@@ -10265,7 +10281,7 @@ var rr = "SelectItem", [Xw, Tu] = jt(rr), Au = u.forwardRef(
|
|
|
10265
10281
|
p((y) => y || ((x == null ? void 0 : x.textContent) ?? "").trim());
|
|
10266
10282
|
}, []),
|
|
10267
10283
|
children: /* @__PURE__ */ c(
|
|
10268
|
-
|
|
10284
|
+
Or.ItemSlot,
|
|
10269
10285
|
{
|
|
10270
10286
|
scope: n,
|
|
10271
10287
|
value: r,
|
|
@@ -10315,10 +10331,10 @@ var rr = "SelectItem", [Xw, Tu] = jt(rr), Au = u.forwardRef(
|
|
|
10315
10331
|
);
|
|
10316
10332
|
}
|
|
10317
10333
|
);
|
|
10318
|
-
Au.displayName =
|
|
10319
|
-
var
|
|
10334
|
+
Au.displayName = or;
|
|
10335
|
+
var Yt = "SelectItemText", Pu = u.forwardRef(
|
|
10320
10336
|
(e, t) => {
|
|
10321
|
-
const { __scopeSelect: n, className: r, style: o, ...s } = e, a = lt(
|
|
10337
|
+
const { __scopeSelect: n, className: r, style: o, ...s } = e, a = lt(Yt, n), i = ut(Yt, n), l = Tu(Yt, n), f = $w(Yt, n), [d, p] = u.useState(null), m = ae(
|
|
10322
10338
|
t,
|
|
10323
10339
|
(w) => p(w),
|
|
10324
10340
|
l.onItemTextChange,
|
|
@@ -10332,11 +10348,11 @@ var Xt = "SelectItemText", Pu = u.forwardRef(
|
|
|
10332
10348
|
), { onNativeOptionAdd: h, onNativeOptionRemove: b } = f;
|
|
10333
10349
|
return we(() => (h(g), () => b(g)), [h, b, g]), /* @__PURE__ */ E(Ne, { children: [
|
|
10334
10350
|
/* @__PURE__ */ c(ee.span, { id: l.textId, ...s, ref: m }),
|
|
10335
|
-
l.isSelected && a.valueNode && !a.valueNodeHasChildren ?
|
|
10351
|
+
l.isSelected && a.valueNode && !a.valueNodeHasChildren ? sr.createPortal(s.children, a.valueNode) : null
|
|
10336
10352
|
] });
|
|
10337
10353
|
}
|
|
10338
10354
|
);
|
|
10339
|
-
Pu.displayName =
|
|
10355
|
+
Pu.displayName = Yt;
|
|
10340
10356
|
var Iu = "SelectItemIndicator", _u = u.forwardRef(
|
|
10341
10357
|
(e, t) => {
|
|
10342
10358
|
const { __scopeSelect: n, ...r } = e;
|
|
@@ -10393,7 +10409,7 @@ var Po = "SelectScrollDownButton", ku = u.forwardRef((e, t) => {
|
|
|
10393
10409
|
});
|
|
10394
10410
|
ku.displayName = Po;
|
|
10395
10411
|
var Mu = u.forwardRef((e, t) => {
|
|
10396
|
-
const { __scopeSelect: n, onAutoScroll: r, ...o } = e, s = ut("SelectScrollButton", n), a = u.useRef(null), i =
|
|
10412
|
+
const { __scopeSelect: n, onAutoScroll: r, ...o } = e, s = ut("SelectScrollButton", n), a = u.useRef(null), i = kr(n), l = u.useCallback(() => {
|
|
10397
10413
|
a.current !== null && (window.clearInterval(a.current), a.current = null);
|
|
10398
10414
|
}, []);
|
|
10399
10415
|
return u.useEffect(() => () => l(), [l]), we(() => {
|
|
@@ -10428,7 +10444,7 @@ var Mu = u.forwardRef((e, t) => {
|
|
|
10428
10444
|
Du.displayName = Yw;
|
|
10429
10445
|
var Io = "SelectArrow", Jw = u.forwardRef(
|
|
10430
10446
|
(e, t) => {
|
|
10431
|
-
const { __scopeSelect: n, ...r } = e, o =
|
|
10447
|
+
const { __scopeSelect: n, ...r } = e, o = Mr(n), s = lt(Io, n), a = ut(Io, n);
|
|
10432
10448
|
return s.open && a.position === "popper" ? /* @__PURE__ */ c(es, { ...o, ...r, ref: t }) : null;
|
|
10433
10449
|
}
|
|
10434
10450
|
);
|
|
@@ -10489,7 +10505,7 @@ function Qw(e, t) {
|
|
|
10489
10505
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
10490
10506
|
}
|
|
10491
10507
|
var ey = fu, Uu = hu, ty = gu, ny = bu, ry = vu, Hu = wu, oy = Cu, zu = Ru, Wu = Au, sy = Pu, ay = _u, ju = Ou, Vu = ku, Ku = Du;
|
|
10492
|
-
const
|
|
10508
|
+
const Sa = ey, Ca = ty, _o = u.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ E(
|
|
10493
10509
|
Uu,
|
|
10494
10510
|
{
|
|
10495
10511
|
ref: r,
|
|
@@ -10500,7 +10516,7 @@ const Ca = ey, Ea = ty, _o = u.forwardRef(({ className: e, children: t, ...n },
|
|
|
10500
10516
|
...n,
|
|
10501
10517
|
children: [
|
|
10502
10518
|
t,
|
|
10503
|
-
/* @__PURE__ */ c(ny, { asChild: !0, children: /* @__PURE__ */ c(
|
|
10519
|
+
/* @__PURE__ */ c(ny, { asChild: !0, children: /* @__PURE__ */ c(_t, { className: "h-4 w-4 opacity-50" }) })
|
|
10504
10520
|
]
|
|
10505
10521
|
}
|
|
10506
10522
|
));
|
|
@@ -10514,7 +10530,7 @@ const Gu = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
10514
10530
|
e
|
|
10515
10531
|
),
|
|
10516
10532
|
...t,
|
|
10517
|
-
children: /* @__PURE__ */ c(
|
|
10533
|
+
children: /* @__PURE__ */ c(qt, { className: "h-4 w-4" })
|
|
10518
10534
|
}
|
|
10519
10535
|
));
|
|
10520
10536
|
Gu.displayName = ju.displayName;
|
|
@@ -10527,7 +10543,7 @@ const qu = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
10527
10543
|
e
|
|
10528
10544
|
),
|
|
10529
10545
|
...t,
|
|
10530
|
-
children: /* @__PURE__ */ c(
|
|
10546
|
+
children: /* @__PURE__ */ c(_t, { className: "h-4 w-4" })
|
|
10531
10547
|
}
|
|
10532
10548
|
));
|
|
10533
10549
|
qu.displayName = Vu.displayName;
|
|
@@ -10593,7 +10609,7 @@ const cy = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
10593
10609
|
}
|
|
10594
10610
|
));
|
|
10595
10611
|
cy.displayName = Ku.displayName;
|
|
10596
|
-
const
|
|
10612
|
+
const Un = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
10597
10613
|
"div",
|
|
10598
10614
|
{
|
|
10599
10615
|
ref: n,
|
|
@@ -10604,8 +10620,8 @@ const Bn = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
10604
10620
|
...t
|
|
10605
10621
|
}
|
|
10606
10622
|
));
|
|
10607
|
-
|
|
10608
|
-
const
|
|
10623
|
+
Un.displayName = "Card";
|
|
10624
|
+
const Hn = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
10609
10625
|
"div",
|
|
10610
10626
|
{
|
|
10611
10627
|
ref: n,
|
|
@@ -10613,8 +10629,8 @@ const Un = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
10613
10629
|
...t
|
|
10614
10630
|
}
|
|
10615
10631
|
));
|
|
10616
|
-
|
|
10617
|
-
const
|
|
10632
|
+
Hn.displayName = "CardHeader";
|
|
10633
|
+
const zn = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
10618
10634
|
"h3",
|
|
10619
10635
|
{
|
|
10620
10636
|
ref: n,
|
|
@@ -10625,7 +10641,7 @@ const Hn = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
10625
10641
|
...t
|
|
10626
10642
|
}
|
|
10627
10643
|
));
|
|
10628
|
-
|
|
10644
|
+
zn.displayName = "CardTitle";
|
|
10629
10645
|
const ly = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
10630
10646
|
"p",
|
|
10631
10647
|
{
|
|
@@ -10635,8 +10651,8 @@ const ly = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
|
10635
10651
|
}
|
|
10636
10652
|
));
|
|
10637
10653
|
ly.displayName = "CardDescription";
|
|
10638
|
-
const
|
|
10639
|
-
|
|
10654
|
+
const Wn = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c("div", { ref: n, className: A("p-6 pt-0", e), ...t }));
|
|
10655
|
+
Wn.displayName = "CardContent";
|
|
10640
10656
|
const uy = u.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c(
|
|
10641
10657
|
"div",
|
|
10642
10658
|
{
|
|
@@ -10651,11 +10667,11 @@ let ro = 0;
|
|
|
10651
10667
|
function py() {
|
|
10652
10668
|
return ro = (ro + 1) % Number.MAX_SAFE_INTEGER, ro.toString();
|
|
10653
10669
|
}
|
|
10654
|
-
const oo = /* @__PURE__ */ new Map(),
|
|
10670
|
+
const oo = /* @__PURE__ */ new Map(), Ea = (e) => {
|
|
10655
10671
|
if (oo.has(e))
|
|
10656
10672
|
return;
|
|
10657
10673
|
const t = setTimeout(() => {
|
|
10658
|
-
oo.delete(e),
|
|
10674
|
+
oo.delete(e), en({
|
|
10659
10675
|
type: "REMOVE_TOAST",
|
|
10660
10676
|
toastId: e
|
|
10661
10677
|
});
|
|
@@ -10677,8 +10693,8 @@ const oo = /* @__PURE__ */ new Map(), Na = (e) => {
|
|
|
10677
10693
|
};
|
|
10678
10694
|
case "DISMISS_TOAST": {
|
|
10679
10695
|
const { toastId: n } = t;
|
|
10680
|
-
return n ?
|
|
10681
|
-
|
|
10696
|
+
return n ? Ea(n) : e.toasts.forEach((r) => {
|
|
10697
|
+
Ea(r.id);
|
|
10682
10698
|
}), {
|
|
10683
10699
|
...e,
|
|
10684
10700
|
toasts: e.toasts.map(
|
|
@@ -10698,19 +10714,19 @@ const oo = /* @__PURE__ */ new Map(), Na = (e) => {
|
|
|
10698
10714
|
toasts: e.toasts.filter((n) => n.id !== t.toastId)
|
|
10699
10715
|
};
|
|
10700
10716
|
}
|
|
10701
|
-
},
|
|
10702
|
-
let
|
|
10703
|
-
function
|
|
10704
|
-
|
|
10705
|
-
t(
|
|
10717
|
+
}, jn = [];
|
|
10718
|
+
let Vn = { toasts: [] };
|
|
10719
|
+
function en(e) {
|
|
10720
|
+
Vn = hy(Vn, e), jn.forEach((t) => {
|
|
10721
|
+
t(Vn);
|
|
10706
10722
|
});
|
|
10707
10723
|
}
|
|
10708
10724
|
function my({ ...e }) {
|
|
10709
|
-
const t = py(), n = (o) =>
|
|
10725
|
+
const t = py(), n = (o) => en({
|
|
10710
10726
|
type: "UPDATE_TOAST",
|
|
10711
10727
|
toast: { ...o, id: t }
|
|
10712
|
-
}), r = () =>
|
|
10713
|
-
return
|
|
10728
|
+
}), r = () => en({ type: "DISMISS_TOAST", toastId: t });
|
|
10729
|
+
return en({
|
|
10714
10730
|
type: "ADD_TOAST",
|
|
10715
10731
|
toast: {
|
|
10716
10732
|
...e,
|
|
@@ -10727,14 +10743,14 @@ function my({ ...e }) {
|
|
|
10727
10743
|
};
|
|
10728
10744
|
}
|
|
10729
10745
|
function gy() {
|
|
10730
|
-
const [e, t] = u.useState(
|
|
10731
|
-
return u.useEffect(() => (
|
|
10732
|
-
const n =
|
|
10733
|
-
n > -1 &&
|
|
10746
|
+
const [e, t] = u.useState(Vn);
|
|
10747
|
+
return u.useEffect(() => (jn.push(t), () => {
|
|
10748
|
+
const n = jn.indexOf(t);
|
|
10749
|
+
n > -1 && jn.splice(n, 1);
|
|
10734
10750
|
}), [e]), {
|
|
10735
10751
|
...e,
|
|
10736
10752
|
toast: my,
|
|
10737
|
-
dismiss: (n) =>
|
|
10753
|
+
dismiss: (n) => en({ type: "DISMISS_TOAST", toastId: n })
|
|
10738
10754
|
};
|
|
10739
10755
|
}
|
|
10740
10756
|
const by = {
|
|
@@ -10803,17 +10819,17 @@ function ix({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10803
10819
|
/* @__PURE__ */ c(Ol, { children: "Configure your chat interface, API connection, and behavior preferences." })
|
|
10804
10820
|
] }),
|
|
10805
10821
|
/* @__PURE__ */ E("div", { className: "space-y-6 py-6", children: [
|
|
10806
|
-
/* @__PURE__ */ E(
|
|
10807
|
-
/* @__PURE__ */ c(
|
|
10822
|
+
/* @__PURE__ */ E(Un, { children: [
|
|
10823
|
+
/* @__PURE__ */ c(Hn, { className: "pb-3", children: /* @__PURE__ */ E(zn, { className: "text-lg flex items-center gap-2", children: [
|
|
10808
10824
|
/* @__PURE__ */ c(wd, { className: "h-5 w-5" }),
|
|
10809
10825
|
"API Configuration"
|
|
10810
10826
|
] }) }),
|
|
10811
|
-
/* @__PURE__ */ E(
|
|
10827
|
+
/* @__PURE__ */ E(Wn, { className: "space-y-4", children: [
|
|
10812
10828
|
/* @__PURE__ */ E("div", { className: "space-y-2", children: [
|
|
10813
10829
|
/* @__PURE__ */ c(ke, { htmlFor: "api-url", children: "API Base URL" }),
|
|
10814
10830
|
/* @__PURE__ */ E("div", { className: "flex gap-2", children: [
|
|
10815
10831
|
/* @__PURE__ */ c(
|
|
10816
|
-
|
|
10832
|
+
sn,
|
|
10817
10833
|
{
|
|
10818
10834
|
id: "api-url",
|
|
10819
10835
|
value: i.api.baseUrl,
|
|
@@ -10845,7 +10861,7 @@ function ix({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10845
10861
|
/* @__PURE__ */ c(ke, { htmlFor: "auth-token", children: "Authentication Token" }),
|
|
10846
10862
|
/* @__PURE__ */ E("div", { className: "flex gap-2", children: [
|
|
10847
10863
|
/* @__PURE__ */ c(
|
|
10848
|
-
|
|
10864
|
+
sn,
|
|
10849
10865
|
{
|
|
10850
10866
|
id: "auth-token",
|
|
10851
10867
|
type: s ? "text" : "password",
|
|
@@ -10870,16 +10886,16 @@ function ix({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10870
10886
|
] })
|
|
10871
10887
|
] })
|
|
10872
10888
|
] }),
|
|
10873
|
-
/* @__PURE__ */ E(
|
|
10874
|
-
/* @__PURE__ */ c(
|
|
10889
|
+
/* @__PURE__ */ E(Un, { children: [
|
|
10890
|
+
/* @__PURE__ */ c(Hn, { className: "pb-3", children: /* @__PURE__ */ E(zn, { className: "text-lg flex items-center gap-2", children: [
|
|
10875
10891
|
/* @__PURE__ */ c(Sd, { className: "h-5 w-5" }),
|
|
10876
10892
|
"Interface Settings"
|
|
10877
10893
|
] }) }),
|
|
10878
|
-
/* @__PURE__ */ E(
|
|
10894
|
+
/* @__PURE__ */ E(Wn, { className: "space-y-4", children: [
|
|
10879
10895
|
/* @__PURE__ */ E("div", { className: "space-y-2", children: [
|
|
10880
10896
|
/* @__PURE__ */ c(ke, { htmlFor: "layout", children: "Layout Style" }),
|
|
10881
10897
|
/* @__PURE__ */ E(
|
|
10882
|
-
|
|
10898
|
+
Sa,
|
|
10883
10899
|
{
|
|
10884
10900
|
value: i.ui.layout,
|
|
10885
10901
|
onValueChange: (b) => l((w) => ({
|
|
@@ -10887,7 +10903,7 @@ function ix({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10887
10903
|
ui: { ...w.ui, layout: b }
|
|
10888
10904
|
})),
|
|
10889
10905
|
children: [
|
|
10890
|
-
/* @__PURE__ */ c(_o, { children: /* @__PURE__ */ c(
|
|
10906
|
+
/* @__PURE__ */ c(_o, { children: /* @__PURE__ */ c(Ca, {}) }),
|
|
10891
10907
|
/* @__PURE__ */ E(Oo, { children: [
|
|
10892
10908
|
/* @__PURE__ */ c(dt, { value: "sidebar", children: "Sidebar Layout" }),
|
|
10893
10909
|
/* @__PURE__ */ c(dt, { value: "fullscreen", children: "Fullscreen" }),
|
|
@@ -10900,7 +10916,7 @@ function ix({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10900
10916
|
/* @__PURE__ */ E("div", { className: "space-y-2", children: [
|
|
10901
10917
|
/* @__PURE__ */ c(ke, { htmlFor: "theme", children: "Theme" }),
|
|
10902
10918
|
/* @__PURE__ */ E(
|
|
10903
|
-
|
|
10919
|
+
Sa,
|
|
10904
10920
|
{
|
|
10905
10921
|
value: i.ui.theme,
|
|
10906
10922
|
onValueChange: (b) => l((w) => ({
|
|
@@ -10908,7 +10924,7 @@ function ix({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10908
10924
|
ui: { ...w.ui, theme: b }
|
|
10909
10925
|
})),
|
|
10910
10926
|
children: [
|
|
10911
|
-
/* @__PURE__ */ c(_o, { children: /* @__PURE__ */ c(
|
|
10927
|
+
/* @__PURE__ */ c(_o, { children: /* @__PURE__ */ c(Ca, {}) }),
|
|
10912
10928
|
/* @__PURE__ */ E(Oo, { children: [
|
|
10913
10929
|
/* @__PURE__ */ c(dt, { value: "light", children: "Light" }),
|
|
10914
10930
|
/* @__PURE__ */ c(dt, { value: "dark", children: "Dark" }),
|
|
@@ -10965,12 +10981,12 @@ function ix({ settings: e, onSettingsChange: t, className: n = "" }) {
|
|
|
10965
10981
|
] })
|
|
10966
10982
|
] })
|
|
10967
10983
|
] }),
|
|
10968
|
-
/* @__PURE__ */ E(
|
|
10969
|
-
/* @__PURE__ */ c(
|
|
10984
|
+
/* @__PURE__ */ E(Un, { children: [
|
|
10985
|
+
/* @__PURE__ */ c(Hn, { className: "pb-3", children: /* @__PURE__ */ E(zn, { className: "text-lg flex items-center gap-2", children: [
|
|
10970
10986
|
/* @__PURE__ */ c(Cd, { className: "h-5 w-5" }),
|
|
10971
10987
|
"Behavior Settings"
|
|
10972
10988
|
] }) }),
|
|
10973
|
-
/* @__PURE__ */ E(
|
|
10989
|
+
/* @__PURE__ */ E(Wn, { className: "space-y-4", children: [
|
|
10974
10990
|
/* @__PURE__ */ E("div", { className: "flex items-center justify-between", children: [
|
|
10975
10991
|
/* @__PURE__ */ E("div", { children: [
|
|
10976
10992
|
/* @__PURE__ */ c(ke, { htmlFor: "auto-save", children: "Auto-save Conversations" }),
|
|
@@ -11070,14 +11086,14 @@ function cx({
|
|
|
11070
11086
|
var d;
|
|
11071
11087
|
(d = s.onThreadChange) == null || d.call(s, f);
|
|
11072
11088
|
}, [s.onThreadChange]);
|
|
11073
|
-
return e === "fullscreen" ? /* @__PURE__ */ c(
|
|
11089
|
+
return e === "fullscreen" ? /* @__PURE__ */ c(Mn, { ...s, onThreadChange: l, children: /* @__PURE__ */ c(
|
|
11074
11090
|
"div",
|
|
11075
11091
|
{
|
|
11076
11092
|
className: `${a(t)} flex flex-col overflow-hidden ${r} ${o.container || ""}`,
|
|
11077
11093
|
style: i(t),
|
|
11078
|
-
children: /* @__PURE__ */ c(
|
|
11094
|
+
children: /* @__PURE__ */ c(Bn, { className: "flex-1", onError: s.onError, enableFileUpload: !0 })
|
|
11079
11095
|
}
|
|
11080
|
-
) }) : e === "tabs" ? /* @__PURE__ */ c(
|
|
11096
|
+
) }) : e === "tabs" ? /* @__PURE__ */ c(Mn, { ...s, onThreadChange: l, children: /* @__PURE__ */ c(
|
|
11081
11097
|
"div",
|
|
11082
11098
|
{
|
|
11083
11099
|
className: `${a(t)} flex flex-col overflow-hidden ${r} ${o.container || ""}`,
|
|
@@ -11092,10 +11108,10 @@ function cx({
|
|
|
11092
11108
|
className: "h-full"
|
|
11093
11109
|
}
|
|
11094
11110
|
) }),
|
|
11095
|
-
/* @__PURE__ */ c("div", { className: `flex-1 min-w-0 overflow-hidden ${o.chatArea || ""}`, children: /* @__PURE__ */ c(
|
|
11111
|
+
/* @__PURE__ */ c("div", { className: `flex-1 min-w-0 overflow-hidden ${o.chatArea || ""}`, children: /* @__PURE__ */ c(Bn, { onError: s.onError, enableFileUpload: !0 }) })
|
|
11096
11112
|
] })
|
|
11097
11113
|
}
|
|
11098
|
-
) }) : /* @__PURE__ */ c(
|
|
11114
|
+
) }) : /* @__PURE__ */ c(Mn, { ...s, onThreadChange: l, children: /* @__PURE__ */ E(
|
|
11099
11115
|
"div",
|
|
11100
11116
|
{
|
|
11101
11117
|
className: `${a(t)} flex overflow-hidden ${r} ${o.container || ""}`,
|
|
@@ -11110,7 +11126,7 @@ function cx({
|
|
|
11110
11126
|
className: "h-full"
|
|
11111
11127
|
}
|
|
11112
11128
|
) }),
|
|
11113
|
-
/* @__PURE__ */ c("div", { className: `flex-1 min-w-0 overflow-hidden ${o.chatArea || ""}`, children: /* @__PURE__ */ c(
|
|
11129
|
+
/* @__PURE__ */ c("div", { className: `flex-1 min-w-0 overflow-hidden ${o.chatArea || ""}`, children: /* @__PURE__ */ c(Bn, { onError: s.onError, enableFileUpload: !0 }) })
|
|
11114
11130
|
]
|
|
11115
11131
|
}
|
|
11116
11132
|
) });
|
|
@@ -11119,12 +11135,12 @@ export {
|
|
|
11119
11135
|
up as Api,
|
|
11120
11136
|
up as ApiClient,
|
|
11121
11137
|
up as ChatApi,
|
|
11122
|
-
|
|
11138
|
+
Bn as ChatInterface,
|
|
11123
11139
|
ox as ChatMainLayout,
|
|
11124
|
-
|
|
11140
|
+
Mn as ChatProvider,
|
|
11125
11141
|
Yy as ChatRoutingProvider,
|
|
11126
11142
|
ix as ChatSettings,
|
|
11127
|
-
|
|
11143
|
+
Nn as MarkdownContent,
|
|
11128
11144
|
Wp as MessageComponent,
|
|
11129
11145
|
Co as ThreadManager,
|
|
11130
11146
|
gt as apiClient,
|
|
@@ -11138,7 +11154,7 @@ export {
|
|
|
11138
11154
|
hv as getDefaultApiConfig,
|
|
11139
11155
|
mv as getDefaultChatSettings,
|
|
11140
11156
|
ip as onChatTokenChanged,
|
|
11141
|
-
|
|
11157
|
+
Cn as post,
|
|
11142
11158
|
cp as put,
|
|
11143
11159
|
zs as setChatToken,
|
|
11144
11160
|
ti as useChat,
|