teodor-new-chat-ui 3.0.74 → 3.0.76
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/components/chat/ChatInterface.d.ts +1 -1
- package/dist/index.esm.js +924 -882
- package/dist/index.umd.js +21 -21
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as f from "react";
|
|
2
|
-
import K, { useState as de, useRef as
|
|
2
|
+
import K, { useState as de, useRef as Je, useCallback as ze, useEffect as Ue, useReducer as Dp, useMemo as sn, createContext as xc, useContext as vc, createElement as to, useLayoutEffect as Lp } from "react";
|
|
3
3
|
import { Square as Fp, Send as Bp, X as Wn, ExternalLink as Hp, Download as $p, Image as bc, FileText as za, Loader as zp, ChevronUp as fr, ChevronDown as Un, Copy as Ua, Edit as Wa, RotateCcw as Xs, Bot as Va, Wrench as Up, User as Wp, ChevronRight as Vp, Check as Oi, Circle as Gp, Edit3 as wc, Paperclip as Ga, Loader2 as Kp, Plus as Yp, FileSpreadsheet as qp, MessageSquarePlus as Xp, MessageSquare as Jp, Calendar as Zp, Trash2 as Qp, PanelLeft as em, Settings as tm, Server as nm, EyeOff as rm, Eye as om, Layout as sm, MessageCircle as im, Save as am } from "lucide-react";
|
|
4
4
|
import { Slot as er, createSlot as qn, createSlottable as lm } from "@radix-ui/react-slot";
|
|
5
5
|
import { cva as kr } from "class-variance-authority";
|
|
@@ -45,57 +45,57 @@ var Ya;
|
|
|
45
45
|
function fm() {
|
|
46
46
|
return Ya || (Ya = 1, process.env.NODE_ENV !== "production" && function() {
|
|
47
47
|
var e = K, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), a = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), g = Symbol.iterator, x = "@@iterator";
|
|
48
|
-
function m(
|
|
49
|
-
if (
|
|
48
|
+
function m(R) {
|
|
49
|
+
if (R === null || typeof R != "object")
|
|
50
50
|
return null;
|
|
51
|
-
var U = g &&
|
|
51
|
+
var U = g && R[g] || R[x];
|
|
52
52
|
return typeof U == "function" ? U : null;
|
|
53
53
|
}
|
|
54
54
|
var v = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
55
|
-
function w(
|
|
55
|
+
function w(R) {
|
|
56
56
|
{
|
|
57
57
|
for (var U = arguments.length, te = new Array(U > 1 ? U - 1 : 0), ge = 1; ge < U; ge++)
|
|
58
58
|
te[ge - 1] = arguments[ge];
|
|
59
|
-
y("error",
|
|
59
|
+
y("error", R, te);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
function y(
|
|
62
|
+
function y(R, U, te) {
|
|
63
63
|
{
|
|
64
64
|
var ge = v.ReactDebugCurrentFrame, Ae = ge.getStackAddendum();
|
|
65
65
|
Ae !== "" && (U += "%s", te = te.concat([Ae]));
|
|
66
66
|
var Me = te.map(function(Ee) {
|
|
67
67
|
return String(Ee);
|
|
68
68
|
});
|
|
69
|
-
Me.unshift("Warning: " + U), Function.prototype.apply.call(console[
|
|
69
|
+
Me.unshift("Warning: " + U), Function.prototype.apply.call(console[R], console, Me);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
var E = !1, S = !1,
|
|
72
|
+
var E = !1, S = !1, T = !1, C = !1, I = !1, N;
|
|
73
73
|
N = Symbol.for("react.module.reference");
|
|
74
|
-
function
|
|
75
|
-
return !!(typeof
|
|
74
|
+
function j(R) {
|
|
75
|
+
return !!(typeof R == "string" || typeof R == "function" || R === r || R === s || I || R === o || R === u || R === d || C || R === b || E || S || T || typeof R == "object" && R !== null && (R.$$typeof === p || R.$$typeof === h || R.$$typeof === i || R.$$typeof === a || R.$$typeof === c || // This needs to include all possible module reference object
|
|
76
76
|
// types supported by any Flight configuration anywhere since
|
|
77
77
|
// we don't know which Flight build this will end up being used
|
|
78
78
|
// with.
|
|
79
|
-
|
|
79
|
+
R.$$typeof === N || R.getModuleId !== void 0));
|
|
80
80
|
}
|
|
81
|
-
function M(
|
|
82
|
-
var ge =
|
|
81
|
+
function M(R, U, te) {
|
|
82
|
+
var ge = R.displayName;
|
|
83
83
|
if (ge)
|
|
84
84
|
return ge;
|
|
85
85
|
var Ae = U.displayName || U.name || "";
|
|
86
86
|
return Ae !== "" ? te + "(" + Ae + ")" : te;
|
|
87
87
|
}
|
|
88
|
-
function W(
|
|
89
|
-
return
|
|
88
|
+
function W(R) {
|
|
89
|
+
return R.displayName || "Context";
|
|
90
90
|
}
|
|
91
|
-
function G(
|
|
92
|
-
if (
|
|
91
|
+
function G(R) {
|
|
92
|
+
if (R == null)
|
|
93
93
|
return null;
|
|
94
|
-
if (typeof
|
|
95
|
-
return
|
|
96
|
-
if (typeof
|
|
97
|
-
return
|
|
98
|
-
switch (
|
|
94
|
+
if (typeof R.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof R == "function")
|
|
95
|
+
return R.displayName || R.name || null;
|
|
96
|
+
if (typeof R == "string")
|
|
97
|
+
return R;
|
|
98
|
+
switch (R) {
|
|
99
99
|
case r:
|
|
100
100
|
return "Fragment";
|
|
101
101
|
case n:
|
|
@@ -109,21 +109,21 @@ function fm() {
|
|
|
109
109
|
case d:
|
|
110
110
|
return "SuspenseList";
|
|
111
111
|
}
|
|
112
|
-
if (typeof
|
|
113
|
-
switch (
|
|
112
|
+
if (typeof R == "object")
|
|
113
|
+
switch (R.$$typeof) {
|
|
114
114
|
case a:
|
|
115
|
-
var U =
|
|
115
|
+
var U = R;
|
|
116
116
|
return W(U) + ".Consumer";
|
|
117
117
|
case i:
|
|
118
|
-
var te =
|
|
118
|
+
var te = R;
|
|
119
119
|
return W(te._context) + ".Provider";
|
|
120
120
|
case c:
|
|
121
|
-
return M(
|
|
121
|
+
return M(R, R.render, "ForwardRef");
|
|
122
122
|
case h:
|
|
123
|
-
var ge =
|
|
124
|
-
return ge !== null ? ge : G(
|
|
123
|
+
var ge = R.displayName || null;
|
|
124
|
+
return ge !== null ? ge : G(R.type) || "Memo";
|
|
125
125
|
case p: {
|
|
126
|
-
var Ae =
|
|
126
|
+
var Ae = R, Me = Ae._payload, Ee = Ae._init;
|
|
127
127
|
try {
|
|
128
128
|
return G(Ee(Me));
|
|
129
129
|
} catch {
|
|
@@ -133,7 +133,7 @@ function fm() {
|
|
|
133
133
|
}
|
|
134
134
|
return null;
|
|
135
135
|
}
|
|
136
|
-
var
|
|
136
|
+
var A = Object.assign, H = 0, L, q, O, _, z, X, oe;
|
|
137
137
|
function F() {
|
|
138
138
|
}
|
|
139
139
|
F.__reactDisabledLog = !0;
|
|
@@ -141,20 +141,20 @@ function fm() {
|
|
|
141
141
|
{
|
|
142
142
|
if (H === 0) {
|
|
143
143
|
L = console.log, q = console.info, O = console.warn, _ = console.error, z = console.group, X = console.groupCollapsed, oe = console.groupEnd;
|
|
144
|
-
var
|
|
144
|
+
var R = {
|
|
145
145
|
configurable: !0,
|
|
146
146
|
enumerable: !0,
|
|
147
147
|
value: F,
|
|
148
148
|
writable: !0
|
|
149
149
|
};
|
|
150
150
|
Object.defineProperties(console, {
|
|
151
|
-
info:
|
|
152
|
-
log:
|
|
153
|
-
warn:
|
|
154
|
-
error:
|
|
155
|
-
group:
|
|
156
|
-
groupCollapsed:
|
|
157
|
-
groupEnd:
|
|
151
|
+
info: R,
|
|
152
|
+
log: R,
|
|
153
|
+
warn: R,
|
|
154
|
+
error: R,
|
|
155
|
+
group: R,
|
|
156
|
+
groupCollapsed: R,
|
|
157
|
+
groupEnd: R
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
160
|
H++;
|
|
@@ -163,31 +163,31 @@ function fm() {
|
|
|
163
163
|
function he() {
|
|
164
164
|
{
|
|
165
165
|
if (H--, H === 0) {
|
|
166
|
-
var
|
|
166
|
+
var R = {
|
|
167
167
|
configurable: !0,
|
|
168
168
|
enumerable: !0,
|
|
169
169
|
writable: !0
|
|
170
170
|
};
|
|
171
171
|
Object.defineProperties(console, {
|
|
172
|
-
log:
|
|
172
|
+
log: A({}, R, {
|
|
173
173
|
value: L
|
|
174
174
|
}),
|
|
175
|
-
info:
|
|
175
|
+
info: A({}, R, {
|
|
176
176
|
value: q
|
|
177
177
|
}),
|
|
178
|
-
warn:
|
|
178
|
+
warn: A({}, R, {
|
|
179
179
|
value: O
|
|
180
180
|
}),
|
|
181
|
-
error:
|
|
181
|
+
error: A({}, R, {
|
|
182
182
|
value: _
|
|
183
183
|
}),
|
|
184
|
-
group:
|
|
184
|
+
group: A({}, R, {
|
|
185
185
|
value: z
|
|
186
186
|
}),
|
|
187
|
-
groupCollapsed:
|
|
187
|
+
groupCollapsed: A({}, R, {
|
|
188
188
|
value: X
|
|
189
189
|
}),
|
|
190
|
-
groupEnd:
|
|
190
|
+
groupEnd: A({}, R, {
|
|
191
191
|
value: oe
|
|
192
192
|
})
|
|
193
193
|
});
|
|
@@ -196,7 +196,7 @@ function fm() {
|
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
var be = v.ReactCurrentDispatcher, Y;
|
|
199
|
-
function P(
|
|
199
|
+
function P(R, U, te) {
|
|
200
200
|
{
|
|
201
201
|
if (Y === void 0)
|
|
202
202
|
try {
|
|
@@ -206,7 +206,7 @@ function fm() {
|
|
|
206
206
|
Y = ge && ge[1] || "";
|
|
207
207
|
}
|
|
208
208
|
return `
|
|
209
|
-
` + Y +
|
|
209
|
+
` + Y + R;
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
var Z = !1, ne;
|
|
@@ -214,11 +214,11 @@ function fm() {
|
|
|
214
214
|
var ae = typeof WeakMap == "function" ? WeakMap : Map;
|
|
215
215
|
ne = new ae();
|
|
216
216
|
}
|
|
217
|
-
function se(
|
|
218
|
-
if (!
|
|
217
|
+
function se(R, U) {
|
|
218
|
+
if (!R || Z)
|
|
219
219
|
return "";
|
|
220
220
|
{
|
|
221
|
-
var te = ne.get(
|
|
221
|
+
var te = ne.get(R);
|
|
222
222
|
if (te !== void 0)
|
|
223
223
|
return te;
|
|
224
224
|
}
|
|
@@ -243,14 +243,14 @@ function fm() {
|
|
|
243
243
|
} catch (Qt) {
|
|
244
244
|
ge = Qt;
|
|
245
245
|
}
|
|
246
|
-
Reflect.construct(
|
|
246
|
+
Reflect.construct(R, [], Ee);
|
|
247
247
|
} else {
|
|
248
248
|
try {
|
|
249
249
|
Ee.call();
|
|
250
250
|
} catch (Qt) {
|
|
251
251
|
ge = Qt;
|
|
252
252
|
}
|
|
253
|
-
|
|
253
|
+
R.call(Ee.prototype);
|
|
254
254
|
}
|
|
255
255
|
} else {
|
|
256
256
|
try {
|
|
@@ -258,7 +258,7 @@ function fm() {
|
|
|
258
258
|
} catch (Qt) {
|
|
259
259
|
ge = Qt;
|
|
260
260
|
}
|
|
261
|
-
|
|
261
|
+
R();
|
|
262
262
|
}
|
|
263
263
|
} catch (Qt) {
|
|
264
264
|
if (Qt && ge && typeof Qt.stack == "string") {
|
|
@@ -273,7 +273,7 @@ function fm() {
|
|
|
273
273
|
if (Ve--, Xe--, Xe < 0 || Te[Ve] !== dt[Xe]) {
|
|
274
274
|
var St = `
|
|
275
275
|
` + Te[Ve].replace(" at new ", " at ");
|
|
276
|
-
return
|
|
276
|
+
return R.displayName && St.includes("<anonymous>") && (St = St.replace("<anonymous>", R.displayName)), typeof R == "function" && ne.set(R, St), St;
|
|
277
277
|
}
|
|
278
278
|
while (Ve >= 1 && Xe >= 0);
|
|
279
279
|
break;
|
|
@@ -282,37 +282,37 @@ function fm() {
|
|
|
282
282
|
} finally {
|
|
283
283
|
Z = !1, be.current = Me, he(), Error.prepareStackTrace = Ae;
|
|
284
284
|
}
|
|
285
|
-
var Ln =
|
|
286
|
-
return typeof
|
|
285
|
+
var Ln = R ? R.displayName || R.name : "", $a = Ln ? P(Ln) : "";
|
|
286
|
+
return typeof R == "function" && ne.set(R, $a), $a;
|
|
287
287
|
}
|
|
288
|
-
function je(
|
|
289
|
-
return se(
|
|
288
|
+
function je(R, U, te) {
|
|
289
|
+
return se(R, !1);
|
|
290
290
|
}
|
|
291
|
-
function Le(
|
|
292
|
-
var U =
|
|
291
|
+
function Le(R) {
|
|
292
|
+
var U = R.prototype;
|
|
293
293
|
return !!(U && U.isReactComponent);
|
|
294
294
|
}
|
|
295
|
-
function Oe(
|
|
296
|
-
if (
|
|
295
|
+
function Oe(R, U, te) {
|
|
296
|
+
if (R == null)
|
|
297
297
|
return "";
|
|
298
|
-
if (typeof
|
|
299
|
-
return se(
|
|
300
|
-
if (typeof
|
|
301
|
-
return P(
|
|
302
|
-
switch (
|
|
298
|
+
if (typeof R == "function")
|
|
299
|
+
return se(R, Le(R));
|
|
300
|
+
if (typeof R == "string")
|
|
301
|
+
return P(R);
|
|
302
|
+
switch (R) {
|
|
303
303
|
case u:
|
|
304
304
|
return P("Suspense");
|
|
305
305
|
case d:
|
|
306
306
|
return P("SuspenseList");
|
|
307
307
|
}
|
|
308
|
-
if (typeof
|
|
309
|
-
switch (
|
|
308
|
+
if (typeof R == "object")
|
|
309
|
+
switch (R.$$typeof) {
|
|
310
310
|
case c:
|
|
311
|
-
return je(
|
|
311
|
+
return je(R.render);
|
|
312
312
|
case h:
|
|
313
|
-
return Oe(
|
|
313
|
+
return Oe(R.type, U, te);
|
|
314
314
|
case p: {
|
|
315
|
-
var ge =
|
|
315
|
+
var ge = R, Ae = ge._payload, Me = ge._init;
|
|
316
316
|
try {
|
|
317
317
|
return Oe(Me(Ae), U, te);
|
|
318
318
|
} catch {
|
|
@@ -322,25 +322,25 @@ function fm() {
|
|
|
322
322
|
return "";
|
|
323
323
|
}
|
|
324
324
|
var ue = Object.prototype.hasOwnProperty, Pe = {}, xe = v.ReactDebugCurrentFrame;
|
|
325
|
-
function $(
|
|
326
|
-
if (
|
|
327
|
-
var U =
|
|
325
|
+
function $(R) {
|
|
326
|
+
if (R) {
|
|
327
|
+
var U = R._owner, te = Oe(R.type, R._source, U ? U.type : null);
|
|
328
328
|
xe.setExtraStackFrame(te);
|
|
329
329
|
} else
|
|
330
330
|
xe.setExtraStackFrame(null);
|
|
331
331
|
}
|
|
332
|
-
function ie(
|
|
332
|
+
function ie(R, U, te, ge, Ae) {
|
|
333
333
|
{
|
|
334
334
|
var Me = Function.call.bind(ue);
|
|
335
|
-
for (var Ee in
|
|
336
|
-
if (Me(
|
|
335
|
+
for (var Ee in R)
|
|
336
|
+
if (Me(R, Ee)) {
|
|
337
337
|
var Te = void 0;
|
|
338
338
|
try {
|
|
339
|
-
if (typeof
|
|
340
|
-
var dt = Error((ge || "React class") + ": " + te + " type `" + Ee + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof
|
|
339
|
+
if (typeof R[Ee] != "function") {
|
|
340
|
+
var dt = Error((ge || "React class") + ": " + te + " type `" + Ee + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof R[Ee] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
341
341
|
throw dt.name = "Invariant Violation", dt;
|
|
342
342
|
}
|
|
343
|
-
Te =
|
|
343
|
+
Te = R[Ee](U, Ee, ge, te, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
344
344
|
} catch (Ve) {
|
|
345
345
|
Te = Ve;
|
|
346
346
|
}
|
|
@@ -349,82 +349,82 @@ function fm() {
|
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
var Fe = Array.isArray;
|
|
352
|
-
function
|
|
353
|
-
return Fe(
|
|
352
|
+
function tt(R) {
|
|
353
|
+
return Fe(R);
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function rt(R) {
|
|
356
356
|
{
|
|
357
|
-
var U = typeof Symbol == "function" && Symbol.toStringTag, te = U &&
|
|
357
|
+
var U = typeof Symbol == "function" && Symbol.toStringTag, te = U && R[Symbol.toStringTag] || R.constructor.name || "Object";
|
|
358
358
|
return te;
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function st(R) {
|
|
362
362
|
try {
|
|
363
|
-
return
|
|
363
|
+
return Qe(R), !1;
|
|
364
364
|
} catch {
|
|
365
365
|
return !0;
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
function
|
|
369
|
-
return "" +
|
|
368
|
+
function Qe(R) {
|
|
369
|
+
return "" + R;
|
|
370
370
|
}
|
|
371
|
-
function At(
|
|
372
|
-
if (
|
|
373
|
-
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
371
|
+
function At(R) {
|
|
372
|
+
if (st(R))
|
|
373
|
+
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rt(R)), Qe(R);
|
|
374
374
|
}
|
|
375
|
-
var Ye = v.ReactCurrentOwner,
|
|
375
|
+
var Ye = v.ReactCurrentOwner, it = {
|
|
376
376
|
key: !0,
|
|
377
377
|
ref: !0,
|
|
378
378
|
__self: !0,
|
|
379
379
|
__source: !0
|
|
380
|
-
}, We,
|
|
381
|
-
function kt(
|
|
382
|
-
if (ue.call(
|
|
383
|
-
var U = Object.getOwnPropertyDescriptor(
|
|
380
|
+
}, We, at;
|
|
381
|
+
function kt(R) {
|
|
382
|
+
if (ue.call(R, "ref")) {
|
|
383
|
+
var U = Object.getOwnPropertyDescriptor(R, "ref").get;
|
|
384
384
|
if (U && U.isReactWarning)
|
|
385
385
|
return !1;
|
|
386
386
|
}
|
|
387
|
-
return
|
|
387
|
+
return R.ref !== void 0;
|
|
388
388
|
}
|
|
389
|
-
function xn(
|
|
390
|
-
if (ue.call(
|
|
391
|
-
var U = Object.getOwnPropertyDescriptor(
|
|
389
|
+
function xn(R) {
|
|
390
|
+
if (ue.call(R, "key")) {
|
|
391
|
+
var U = Object.getOwnPropertyDescriptor(R, "key").get;
|
|
392
392
|
if (U && U.isReactWarning)
|
|
393
393
|
return !1;
|
|
394
394
|
}
|
|
395
|
-
return
|
|
395
|
+
return R.key !== void 0;
|
|
396
396
|
}
|
|
397
|
-
function On(
|
|
398
|
-
typeof
|
|
397
|
+
function On(R, U) {
|
|
398
|
+
typeof R.ref == "string" && Ye.current;
|
|
399
399
|
}
|
|
400
|
-
function J(
|
|
400
|
+
function J(R, U) {
|
|
401
401
|
{
|
|
402
402
|
var te = function() {
|
|
403
403
|
We || (We = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", U));
|
|
404
404
|
};
|
|
405
|
-
te.isReactWarning = !0, Object.defineProperty(
|
|
405
|
+
te.isReactWarning = !0, Object.defineProperty(R, "key", {
|
|
406
406
|
get: te,
|
|
407
407
|
configurable: !0
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
function ce(
|
|
411
|
+
function ce(R, U) {
|
|
412
412
|
{
|
|
413
413
|
var te = function() {
|
|
414
|
-
|
|
414
|
+
at || (at = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", U));
|
|
415
415
|
};
|
|
416
|
-
te.isReactWarning = !0, Object.defineProperty(
|
|
416
|
+
te.isReactWarning = !0, Object.defineProperty(R, "ref", {
|
|
417
417
|
get: te,
|
|
418
418
|
configurable: !0
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
var _e = function(
|
|
422
|
+
var _e = function(R, U, te, ge, Ae, Me, Ee) {
|
|
423
423
|
var Te = {
|
|
424
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
425
|
$$typeof: t,
|
|
426
426
|
// Built-in properties that belong on the element
|
|
427
|
-
type:
|
|
427
|
+
type: R,
|
|
428
428
|
key: U,
|
|
429
429
|
ref: te,
|
|
430
430
|
props: Ee,
|
|
@@ -448,58 +448,58 @@ function fm() {
|
|
|
448
448
|
value: Ae
|
|
449
449
|
}), Object.freeze && (Object.freeze(Te.props), Object.freeze(Te)), Te;
|
|
450
450
|
};
|
|
451
|
-
function qe(
|
|
451
|
+
function qe(R, U, te, ge, Ae) {
|
|
452
452
|
{
|
|
453
453
|
var Me, Ee = {}, Te = null, dt = null;
|
|
454
454
|
te !== void 0 && (At(te), Te = "" + te), xn(U) && (At(U.key), Te = "" + U.key), kt(U) && (dt = U.ref, On(U, Ae));
|
|
455
455
|
for (Me in U)
|
|
456
|
-
ue.call(U, Me) && !
|
|
457
|
-
if (
|
|
458
|
-
var Ve =
|
|
456
|
+
ue.call(U, Me) && !it.hasOwnProperty(Me) && (Ee[Me] = U[Me]);
|
|
457
|
+
if (R && R.defaultProps) {
|
|
458
|
+
var Ve = R.defaultProps;
|
|
459
459
|
for (Me in Ve)
|
|
460
460
|
Ee[Me] === void 0 && (Ee[Me] = Ve[Me]);
|
|
461
461
|
}
|
|
462
462
|
if (Te || dt) {
|
|
463
|
-
var Xe = typeof
|
|
463
|
+
var Xe = typeof R == "function" ? R.displayName || R.name || "Unknown" : R;
|
|
464
464
|
Te && J(Ee, Xe), dt && ce(Ee, Xe);
|
|
465
465
|
}
|
|
466
|
-
return _e(
|
|
466
|
+
return _e(R, Te, dt, Ae, ge, Ye.current, Ee);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
var Mn = v.ReactCurrentOwner, Dn = v.ReactDebugCurrentFrame;
|
|
470
|
-
function Pt(
|
|
471
|
-
if (
|
|
472
|
-
var U =
|
|
470
|
+
function Pt(R) {
|
|
471
|
+
if (R) {
|
|
472
|
+
var U = R._owner, te = Oe(R.type, R._source, U ? U.type : null);
|
|
473
473
|
Dn.setExtraStackFrame(te);
|
|
474
474
|
} else
|
|
475
475
|
Dn.setExtraStackFrame(null);
|
|
476
476
|
}
|
|
477
477
|
var Cs;
|
|
478
478
|
Cs = !1;
|
|
479
|
-
function Ts(
|
|
480
|
-
return typeof
|
|
479
|
+
function Ts(R) {
|
|
480
|
+
return typeof R == "object" && R !== null && R.$$typeof === t;
|
|
481
481
|
}
|
|
482
482
|
function Da() {
|
|
483
483
|
{
|
|
484
484
|
if (Mn.current) {
|
|
485
|
-
var
|
|
486
|
-
if (
|
|
485
|
+
var R = G(Mn.current.type);
|
|
486
|
+
if (R)
|
|
487
487
|
return `
|
|
488
488
|
|
|
489
|
-
Check the render method of \`` +
|
|
489
|
+
Check the render method of \`` + R + "`.";
|
|
490
490
|
}
|
|
491
491
|
return "";
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
function Np(
|
|
494
|
+
function Np(R) {
|
|
495
495
|
return "";
|
|
496
496
|
}
|
|
497
497
|
var La = {};
|
|
498
|
-
function jp(
|
|
498
|
+
function jp(R) {
|
|
499
499
|
{
|
|
500
500
|
var U = Da();
|
|
501
501
|
if (!U) {
|
|
502
|
-
var te = typeof
|
|
502
|
+
var te = typeof R == "string" ? R : R.displayName || R.name;
|
|
503
503
|
te && (U = `
|
|
504
504
|
|
|
505
505
|
Check the top-level render call using <` + te + ">.");
|
|
@@ -507,41 +507,41 @@ Check the top-level render call using <` + te + ">.");
|
|
|
507
507
|
return U;
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
|
-
function Fa(
|
|
510
|
+
function Fa(R, U) {
|
|
511
511
|
{
|
|
512
|
-
if (!
|
|
512
|
+
if (!R._store || R._store.validated || R.key != null)
|
|
513
513
|
return;
|
|
514
|
-
|
|
514
|
+
R._store.validated = !0;
|
|
515
515
|
var te = jp(U);
|
|
516
516
|
if (La[te])
|
|
517
517
|
return;
|
|
518
518
|
La[te] = !0;
|
|
519
519
|
var ge = "";
|
|
520
|
-
|
|
520
|
+
R && R._owner && R._owner !== Mn.current && (ge = " It was passed a child from " + G(R._owner.type) + "."), Pt(R), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', te, ge), Pt(null);
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
function Ba(
|
|
523
|
+
function Ba(R, U) {
|
|
524
524
|
{
|
|
525
|
-
if (typeof
|
|
525
|
+
if (typeof R != "object")
|
|
526
526
|
return;
|
|
527
|
-
if (
|
|
528
|
-
for (var te = 0; te <
|
|
529
|
-
var ge =
|
|
527
|
+
if (tt(R))
|
|
528
|
+
for (var te = 0; te < R.length; te++) {
|
|
529
|
+
var ge = R[te];
|
|
530
530
|
Ts(ge) && Fa(ge, U);
|
|
531
531
|
}
|
|
532
|
-
else if (Ts(
|
|
533
|
-
|
|
534
|
-
else if (
|
|
535
|
-
var Ae = m(
|
|
536
|
-
if (typeof Ae == "function" && Ae !==
|
|
537
|
-
for (var Me = Ae.call(
|
|
532
|
+
else if (Ts(R))
|
|
533
|
+
R._store && (R._store.validated = !0);
|
|
534
|
+
else if (R) {
|
|
535
|
+
var Ae = m(R);
|
|
536
|
+
if (typeof Ae == "function" && Ae !== R.entries)
|
|
537
|
+
for (var Me = Ae.call(R), Ee; !(Ee = Me.next()).done; )
|
|
538
538
|
Ts(Ee.value) && Fa(Ee.value, U);
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
|
-
function Ap(
|
|
542
|
+
function Ap(R) {
|
|
543
543
|
{
|
|
544
|
-
var U =
|
|
544
|
+
var U = R.type;
|
|
545
545
|
if (U == null || typeof U == "string")
|
|
546
546
|
return;
|
|
547
547
|
var te;
|
|
@@ -555,7 +555,7 @@ Check the top-level render call using <` + te + ">.");
|
|
|
555
555
|
return;
|
|
556
556
|
if (te) {
|
|
557
557
|
var ge = G(U);
|
|
558
|
-
ie(te,
|
|
558
|
+
ie(te, R.props, "prop", ge, R);
|
|
559
559
|
} else if (U.PropTypes !== void 0 && !Cs) {
|
|
560
560
|
Cs = !0;
|
|
561
561
|
var Ae = G(U);
|
|
@@ -564,53 +564,53 @@ Check the top-level render call using <` + te + ">.");
|
|
|
564
564
|
typeof U.getDefaultProps == "function" && !U.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
|
-
function kp(
|
|
567
|
+
function kp(R) {
|
|
568
568
|
{
|
|
569
|
-
for (var U = Object.keys(
|
|
569
|
+
for (var U = Object.keys(R.props), te = 0; te < U.length; te++) {
|
|
570
570
|
var ge = U[te];
|
|
571
571
|
if (ge !== "children" && ge !== "key") {
|
|
572
|
-
Pt(
|
|
572
|
+
Pt(R), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", ge), Pt(null);
|
|
573
573
|
break;
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
|
-
|
|
576
|
+
R.ref !== null && (Pt(R), w("Invalid attribute `ref` supplied to `React.Fragment`."), Pt(null));
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
|
-
function Ha(
|
|
579
|
+
function Ha(R, U, te, ge, Ae, Me) {
|
|
580
580
|
{
|
|
581
|
-
var Ee =
|
|
581
|
+
var Ee = j(R);
|
|
582
582
|
if (!Ee) {
|
|
583
583
|
var Te = "";
|
|
584
|
-
(
|
|
584
|
+
(R === void 0 || typeof R == "object" && R !== null && Object.keys(R).length === 0) && (Te += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
585
585
|
var dt = Np();
|
|
586
586
|
dt ? Te += dt : Te += Da();
|
|
587
587
|
var Ve;
|
|
588
|
-
|
|
588
|
+
R === null ? Ve = "null" : tt(R) ? Ve = "array" : R !== void 0 && R.$$typeof === t ? (Ve = "<" + (G(R.type) || "Unknown") + " />", Te = " Did you accidentally export a JSX literal instead of a component?") : Ve = typeof R, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Ve, Te);
|
|
589
589
|
}
|
|
590
|
-
var Xe = qe(
|
|
590
|
+
var Xe = qe(R, U, te, Ae, Me);
|
|
591
591
|
if (Xe == null)
|
|
592
592
|
return Xe;
|
|
593
593
|
if (Ee) {
|
|
594
594
|
var St = U.children;
|
|
595
595
|
if (St !== void 0)
|
|
596
596
|
if (ge)
|
|
597
|
-
if (
|
|
597
|
+
if (tt(St)) {
|
|
598
598
|
for (var Ln = 0; Ln < St.length; Ln++)
|
|
599
|
-
Ba(St[Ln],
|
|
599
|
+
Ba(St[Ln], R);
|
|
600
600
|
Object.freeze && Object.freeze(St);
|
|
601
601
|
} else
|
|
602
602
|
w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
603
603
|
else
|
|
604
|
-
Ba(St,
|
|
604
|
+
Ba(St, R);
|
|
605
605
|
}
|
|
606
|
-
return
|
|
606
|
+
return R === r ? kp(Xe) : Ap(Xe), Xe;
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
|
-
function Pp(
|
|
610
|
-
return Ha(
|
|
609
|
+
function Pp(R, U, te) {
|
|
610
|
+
return Ha(R, U, te, !0);
|
|
611
611
|
}
|
|
612
|
-
function _p(
|
|
613
|
-
return Ha(
|
|
612
|
+
function _p(R, U, te) {
|
|
613
|
+
return Ha(R, U, te, !1);
|
|
614
614
|
}
|
|
615
615
|
var Op = _p, Mp = Pp;
|
|
616
616
|
ur.Fragment = r, ur.jsx = Op, ur.jsxs = Mp;
|
|
@@ -796,7 +796,7 @@ const Km = (e) => {
|
|
|
796
796
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
797
797
|
typeof setImmediate == "function",
|
|
798
798
|
pt(bn.postMessage)
|
|
799
|
-
), Xm = typeof queueMicrotask < "u" ? queueMicrotask.bind(bn) : typeof process < "u" && process.nextTick || jc, Jm = (e) => e != null && pt(e[Bo]),
|
|
799
|
+
), Xm = typeof queueMicrotask < "u" ? queueMicrotask.bind(bn) : typeof process < "u" && process.nextTick || jc, Jm = (e) => e != null && pt(e[Bo]), k = {
|
|
800
800
|
isArray: tr,
|
|
801
801
|
isArrayBuffer: Tc,
|
|
802
802
|
isBuffer: Pr,
|
|
@@ -859,7 +859,7 @@ const Km = (e) => {
|
|
|
859
859
|
function we(e, t, n, r, o) {
|
|
860
860
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
861
861
|
}
|
|
862
|
-
|
|
862
|
+
k.inherits(we, Error, {
|
|
863
863
|
toJSON: function() {
|
|
864
864
|
return {
|
|
865
865
|
// Standard
|
|
@@ -874,7 +874,7 @@ A.inherits(we, Error, {
|
|
|
874
874
|
columnNumber: this.columnNumber,
|
|
875
875
|
stack: this.stack,
|
|
876
876
|
// Axios
|
|
877
|
-
config:
|
|
877
|
+
config: k.toJSONObject(this.config),
|
|
878
878
|
code: this.code,
|
|
879
879
|
status: this.status
|
|
880
880
|
};
|
|
@@ -902,7 +902,7 @@ Object.defineProperties(we, kc);
|
|
|
902
902
|
Object.defineProperty(Ac, "isAxiosError", { value: !0 });
|
|
903
903
|
we.from = (e, t, n, r, o, s) => {
|
|
904
904
|
const i = Object.create(Ac);
|
|
905
|
-
|
|
905
|
+
k.toFlatObject(e, i, function(d) {
|
|
906
906
|
return d !== Error.prototype;
|
|
907
907
|
}, (u) => u !== "isAxiosError");
|
|
908
908
|
const a = e && e.message ? e.message : "Error", c = t == null && e ? e.code : t;
|
|
@@ -910,10 +910,10 @@ we.from = (e, t, n, r, o, s) => {
|
|
|
910
910
|
};
|
|
911
911
|
const Zm = null;
|
|
912
912
|
function Qs(e) {
|
|
913
|
-
return
|
|
913
|
+
return k.isPlainObject(e) || k.isArray(e);
|
|
914
914
|
}
|
|
915
915
|
function Pc(e) {
|
|
916
|
-
return
|
|
916
|
+
return k.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
917
917
|
}
|
|
918
918
|
function Xa(e, t, n) {
|
|
919
919
|
return e ? e.concat(t).map(function(o, s) {
|
|
@@ -921,42 +921,42 @@ function Xa(e, t, n) {
|
|
|
921
921
|
}).join(n ? "." : "") : t;
|
|
922
922
|
}
|
|
923
923
|
function Qm(e) {
|
|
924
|
-
return
|
|
924
|
+
return k.isArray(e) && !e.some(Qs);
|
|
925
925
|
}
|
|
926
|
-
const eg =
|
|
926
|
+
const eg = k.toFlatObject(k, {}, null, function(t) {
|
|
927
927
|
return /^is[A-Z]/.test(t);
|
|
928
928
|
});
|
|
929
929
|
function zo(e, t, n) {
|
|
930
|
-
if (!
|
|
930
|
+
if (!k.isObject(e))
|
|
931
931
|
throw new TypeError("target must be an object");
|
|
932
|
-
t = t || new FormData(), n =
|
|
932
|
+
t = t || new FormData(), n = k.toFlatObject(n, {
|
|
933
933
|
metaTokens: !0,
|
|
934
934
|
dots: !1,
|
|
935
935
|
indexes: !1
|
|
936
936
|
}, !1, function(x, m) {
|
|
937
|
-
return !
|
|
937
|
+
return !k.isUndefined(m[x]);
|
|
938
938
|
});
|
|
939
|
-
const r = n.metaTokens, o = n.visitor || d, s = n.dots, i = n.indexes, c = (n.Blob || typeof Blob < "u" && Blob) &&
|
|
940
|
-
if (!
|
|
939
|
+
const r = n.metaTokens, o = n.visitor || d, s = n.dots, i = n.indexes, c = (n.Blob || typeof Blob < "u" && Blob) && k.isSpecCompliantForm(t);
|
|
940
|
+
if (!k.isFunction(o))
|
|
941
941
|
throw new TypeError("visitor must be a function");
|
|
942
942
|
function u(g) {
|
|
943
943
|
if (g === null) return "";
|
|
944
|
-
if (
|
|
944
|
+
if (k.isDate(g))
|
|
945
945
|
return g.toISOString();
|
|
946
|
-
if (
|
|
946
|
+
if (k.isBoolean(g))
|
|
947
947
|
return g.toString();
|
|
948
|
-
if (!c &&
|
|
948
|
+
if (!c && k.isBlob(g))
|
|
949
949
|
throw new we("Blob is not supported. Use a Buffer instead.");
|
|
950
|
-
return
|
|
950
|
+
return k.isArrayBuffer(g) || k.isTypedArray(g) ? c && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g;
|
|
951
951
|
}
|
|
952
952
|
function d(g, x, m) {
|
|
953
953
|
let v = g;
|
|
954
954
|
if (g && !m && typeof g == "object") {
|
|
955
|
-
if (
|
|
955
|
+
if (k.endsWith(x, "{}"))
|
|
956
956
|
x = r ? x : x.slice(0, -2), g = JSON.stringify(g);
|
|
957
|
-
else if (
|
|
957
|
+
else if (k.isArray(g) && Qm(g) || (k.isFileList(g) || k.endsWith(x, "[]")) && (v = k.toArray(g)))
|
|
958
958
|
return x = Pc(x), v.forEach(function(y, E) {
|
|
959
|
-
!(
|
|
959
|
+
!(k.isUndefined(y) || y === null) && t.append(
|
|
960
960
|
// eslint-disable-next-line no-nested-ternary
|
|
961
961
|
i === !0 ? Xa([x], E, s) : i === null ? x : x + "[]",
|
|
962
962
|
u(y)
|
|
@@ -971,21 +971,21 @@ function zo(e, t, n) {
|
|
|
971
971
|
isVisitable: Qs
|
|
972
972
|
});
|
|
973
973
|
function b(g, x) {
|
|
974
|
-
if (!
|
|
974
|
+
if (!k.isUndefined(g)) {
|
|
975
975
|
if (h.indexOf(g) !== -1)
|
|
976
976
|
throw Error("Circular reference detected in " + x.join("."));
|
|
977
|
-
h.push(g),
|
|
978
|
-
(!(
|
|
977
|
+
h.push(g), k.forEach(g, function(v, w) {
|
|
978
|
+
(!(k.isUndefined(v) || v === null) && o.call(
|
|
979
979
|
t,
|
|
980
980
|
v,
|
|
981
|
-
|
|
981
|
+
k.isString(w) ? w.trim() : w,
|
|
982
982
|
x,
|
|
983
983
|
p
|
|
984
984
|
)) === !0 && b(v, x ? x.concat(w) : [w]);
|
|
985
985
|
}), h.pop();
|
|
986
986
|
}
|
|
987
987
|
}
|
|
988
|
-
if (!
|
|
988
|
+
if (!k.isObject(e))
|
|
989
989
|
throw new TypeError("data must be an object");
|
|
990
990
|
return b(e), t;
|
|
991
991
|
}
|
|
@@ -1025,12 +1025,12 @@ function Oc(e, t, n) {
|
|
|
1025
1025
|
if (!t)
|
|
1026
1026
|
return e;
|
|
1027
1027
|
const r = n && n.encode || tg;
|
|
1028
|
-
|
|
1028
|
+
k.isFunction(n) && (n = {
|
|
1029
1029
|
serialize: n
|
|
1030
1030
|
});
|
|
1031
1031
|
const o = n && n.serialize;
|
|
1032
1032
|
let s;
|
|
1033
|
-
if (o ? s = o(t, n) : s =
|
|
1033
|
+
if (o ? s = o(t, n) : s = k.isURLSearchParams(t) ? t.toString() : new Di(t, n).toString(r), s) {
|
|
1034
1034
|
const i = e.indexOf("#");
|
|
1035
1035
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
|
|
1036
1036
|
}
|
|
@@ -1085,7 +1085,7 @@ class Za {
|
|
|
1085
1085
|
* @returns {void}
|
|
1086
1086
|
*/
|
|
1087
1087
|
forEach(t) {
|
|
1088
|
-
|
|
1088
|
+
k.forEach(this.handlers, function(r) {
|
|
1089
1089
|
r !== null && t(r);
|
|
1090
1090
|
});
|
|
1091
1091
|
}
|
|
@@ -1117,13 +1117,13 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", lg
|
|
|
1117
1117
|
function ug(e, t) {
|
|
1118
1118
|
return zo(e, new lt.classes.URLSearchParams(), {
|
|
1119
1119
|
visitor: function(n, r, o, s) {
|
|
1120
|
-
return lt.isNode &&
|
|
1120
|
+
return lt.isNode && k.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
1121
1121
|
},
|
|
1122
1122
|
...t
|
|
1123
1123
|
});
|
|
1124
1124
|
}
|
|
1125
1125
|
function dg(e) {
|
|
1126
|
-
return
|
|
1126
|
+
return k.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
1127
1127
|
}
|
|
1128
1128
|
function fg(e) {
|
|
1129
1129
|
const t = {}, n = Object.keys(e);
|
|
@@ -1139,20 +1139,20 @@ function Dc(e) {
|
|
|
1139
1139
|
let i = n[s++];
|
|
1140
1140
|
if (i === "__proto__") return !0;
|
|
1141
1141
|
const a = Number.isFinite(+i), c = s >= n.length;
|
|
1142
|
-
return i = !i &&
|
|
1142
|
+
return i = !i && k.isArray(o) ? o.length : i, c ? (k.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !a) : ((!o[i] || !k.isObject(o[i])) && (o[i] = []), t(n, r, o[i], s) && k.isArray(o[i]) && (o[i] = fg(o[i])), !a);
|
|
1143
1143
|
}
|
|
1144
|
-
if (
|
|
1144
|
+
if (k.isFormData(e) && k.isFunction(e.entries)) {
|
|
1145
1145
|
const n = {};
|
|
1146
|
-
return
|
|
1146
|
+
return k.forEachEntry(e, (r, o) => {
|
|
1147
1147
|
t(dg(r), o, n, 0);
|
|
1148
1148
|
}), n;
|
|
1149
1149
|
}
|
|
1150
1150
|
return null;
|
|
1151
1151
|
}
|
|
1152
1152
|
function hg(e, t, n) {
|
|
1153
|
-
if (
|
|
1153
|
+
if (k.isString(e))
|
|
1154
1154
|
try {
|
|
1155
|
-
return (t || JSON.parse)(e),
|
|
1155
|
+
return (t || JSON.parse)(e), k.trim(e);
|
|
1156
1156
|
} catch (r) {
|
|
1157
1157
|
if (r.name !== "SyntaxError")
|
|
1158
1158
|
throw r;
|
|
@@ -1163,20 +1163,20 @@ const Mr = {
|
|
|
1163
1163
|
transitional: Mc,
|
|
1164
1164
|
adapter: ["xhr", "http", "fetch"],
|
|
1165
1165
|
transformRequest: [function(t, n) {
|
|
1166
|
-
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s =
|
|
1167
|
-
if (s &&
|
|
1166
|
+
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = k.isObject(t);
|
|
1167
|
+
if (s && k.isHTMLForm(t) && (t = new FormData(t)), k.isFormData(t))
|
|
1168
1168
|
return o ? JSON.stringify(Dc(t)) : t;
|
|
1169
|
-
if (
|
|
1169
|
+
if (k.isArrayBuffer(t) || k.isBuffer(t) || k.isStream(t) || k.isFile(t) || k.isBlob(t) || k.isReadableStream(t))
|
|
1170
1170
|
return t;
|
|
1171
|
-
if (
|
|
1171
|
+
if (k.isArrayBufferView(t))
|
|
1172
1172
|
return t.buffer;
|
|
1173
|
-
if (
|
|
1173
|
+
if (k.isURLSearchParams(t))
|
|
1174
1174
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
1175
1175
|
let a;
|
|
1176
1176
|
if (s) {
|
|
1177
1177
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1178
1178
|
return ug(t, this.formSerializer).toString();
|
|
1179
|
-
if ((a =
|
|
1179
|
+
if ((a = k.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
1180
1180
|
const c = this.env && this.env.FormData;
|
|
1181
1181
|
return zo(
|
|
1182
1182
|
a ? { "files[]": t } : t,
|
|
@@ -1189,9 +1189,9 @@ const Mr = {
|
|
|
1189
1189
|
}],
|
|
1190
1190
|
transformResponse: [function(t) {
|
|
1191
1191
|
const n = this.transitional || Mr.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
1192
|
-
if (
|
|
1192
|
+
if (k.isResponse(t) || k.isReadableStream(t))
|
|
1193
1193
|
return t;
|
|
1194
|
-
if (t &&
|
|
1194
|
+
if (t && k.isString(t) && (r && !this.responseType || o)) {
|
|
1195
1195
|
const i = !(n && n.silentJSONParsing) && o;
|
|
1196
1196
|
try {
|
|
1197
1197
|
return JSON.parse(t, this.parseReviver);
|
|
@@ -1225,10 +1225,10 @@ const Mr = {
|
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
1227
|
};
|
|
1228
|
-
|
|
1228
|
+
k.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1229
1229
|
Mr.headers[e] = {};
|
|
1230
1230
|
});
|
|
1231
|
-
const pg =
|
|
1231
|
+
const pg = k.toObjectSet([
|
|
1232
1232
|
"age",
|
|
1233
1233
|
"authorization",
|
|
1234
1234
|
"content-length",
|
|
@@ -1258,7 +1258,7 @@ function dr(e) {
|
|
|
1258
1258
|
return e && String(e).trim().toLowerCase();
|
|
1259
1259
|
}
|
|
1260
1260
|
function ro(e) {
|
|
1261
|
-
return e === !1 || e == null ? e :
|
|
1261
|
+
return e === !1 || e == null ? e : k.isArray(e) ? e.map(ro) : String(e);
|
|
1262
1262
|
}
|
|
1263
1263
|
function gg(e) {
|
|
1264
1264
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -1269,12 +1269,12 @@ function gg(e) {
|
|
|
1269
1269
|
}
|
|
1270
1270
|
const xg = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
1271
1271
|
function Rs(e, t, n, r, o) {
|
|
1272
|
-
if (
|
|
1272
|
+
if (k.isFunction(r))
|
|
1273
1273
|
return r.call(this, t, n);
|
|
1274
|
-
if (o && (t = n), !!
|
|
1275
|
-
if (
|
|
1274
|
+
if (o && (t = n), !!k.isString(t)) {
|
|
1275
|
+
if (k.isString(r))
|
|
1276
1276
|
return t.indexOf(r) !== -1;
|
|
1277
|
-
if (
|
|
1277
|
+
if (k.isRegExp(r))
|
|
1278
1278
|
return r.test(t);
|
|
1279
1279
|
}
|
|
1280
1280
|
}
|
|
@@ -1282,7 +1282,7 @@ function vg(e) {
|
|
|
1282
1282
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
1283
1283
|
}
|
|
1284
1284
|
function bg(e, t) {
|
|
1285
|
-
const n =
|
|
1285
|
+
const n = k.toCamelCase(" " + t);
|
|
1286
1286
|
["get", "set", "has"].forEach((r) => {
|
|
1287
1287
|
Object.defineProperty(e, r + n, {
|
|
1288
1288
|
value: function(o, s, i) {
|
|
@@ -1302,20 +1302,20 @@ let mt = class {
|
|
|
1302
1302
|
const d = dr(c);
|
|
1303
1303
|
if (!d)
|
|
1304
1304
|
throw new Error("header name must be a non-empty string");
|
|
1305
|
-
const h =
|
|
1305
|
+
const h = k.findKey(o, d);
|
|
1306
1306
|
(!h || o[h] === void 0 || u === !0 || u === void 0 && o[h] !== !1) && (o[h || c] = ro(a));
|
|
1307
1307
|
}
|
|
1308
|
-
const i = (a, c) =>
|
|
1309
|
-
if (
|
|
1308
|
+
const i = (a, c) => k.forEach(a, (u, d) => s(u, d, c));
|
|
1309
|
+
if (k.isPlainObject(t) || t instanceof this.constructor)
|
|
1310
1310
|
i(t, n);
|
|
1311
|
-
else if (
|
|
1311
|
+
else if (k.isString(t) && (t = t.trim()) && !xg(t))
|
|
1312
1312
|
i(mg(t), n);
|
|
1313
|
-
else if (
|
|
1313
|
+
else if (k.isObject(t) && k.isIterable(t)) {
|
|
1314
1314
|
let a = {}, c, u;
|
|
1315
1315
|
for (const d of t) {
|
|
1316
|
-
if (!
|
|
1316
|
+
if (!k.isArray(d))
|
|
1317
1317
|
throw TypeError("Object iterator must return a key-value pair");
|
|
1318
|
-
a[u = d[0]] = (c = a[u]) ?
|
|
1318
|
+
a[u = d[0]] = (c = a[u]) ? k.isArray(c) ? [...c, d[1]] : [c, d[1]] : d[1];
|
|
1319
1319
|
}
|
|
1320
1320
|
i(a, n);
|
|
1321
1321
|
} else
|
|
@@ -1324,16 +1324,16 @@ let mt = class {
|
|
|
1324
1324
|
}
|
|
1325
1325
|
get(t, n) {
|
|
1326
1326
|
if (t = dr(t), t) {
|
|
1327
|
-
const r =
|
|
1327
|
+
const r = k.findKey(this, t);
|
|
1328
1328
|
if (r) {
|
|
1329
1329
|
const o = this[r];
|
|
1330
1330
|
if (!n)
|
|
1331
1331
|
return o;
|
|
1332
1332
|
if (n === !0)
|
|
1333
1333
|
return gg(o);
|
|
1334
|
-
if (
|
|
1334
|
+
if (k.isFunction(n))
|
|
1335
1335
|
return n.call(this, o, r);
|
|
1336
|
-
if (
|
|
1336
|
+
if (k.isRegExp(n))
|
|
1337
1337
|
return n.exec(o);
|
|
1338
1338
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
1339
1339
|
}
|
|
@@ -1341,7 +1341,7 @@ let mt = class {
|
|
|
1341
1341
|
}
|
|
1342
1342
|
has(t, n) {
|
|
1343
1343
|
if (t = dr(t), t) {
|
|
1344
|
-
const r =
|
|
1344
|
+
const r = k.findKey(this, t);
|
|
1345
1345
|
return !!(r && this[r] !== void 0 && (!n || Rs(this, this[r], r, n)));
|
|
1346
1346
|
}
|
|
1347
1347
|
return !1;
|
|
@@ -1351,11 +1351,11 @@ let mt = class {
|
|
|
1351
1351
|
let o = !1;
|
|
1352
1352
|
function s(i) {
|
|
1353
1353
|
if (i = dr(i), i) {
|
|
1354
|
-
const a =
|
|
1354
|
+
const a = k.findKey(r, i);
|
|
1355
1355
|
a && (!n || Rs(r, r[a], a, n)) && (delete r[a], o = !0);
|
|
1356
1356
|
}
|
|
1357
1357
|
}
|
|
1358
|
-
return
|
|
1358
|
+
return k.isArray(t) ? t.forEach(s) : s(t), o;
|
|
1359
1359
|
}
|
|
1360
1360
|
clear(t) {
|
|
1361
1361
|
const n = Object.keys(this);
|
|
@@ -1368,8 +1368,8 @@ let mt = class {
|
|
|
1368
1368
|
}
|
|
1369
1369
|
normalize(t) {
|
|
1370
1370
|
const n = this, r = {};
|
|
1371
|
-
return
|
|
1372
|
-
const i =
|
|
1371
|
+
return k.forEach(this, (o, s) => {
|
|
1372
|
+
const i = k.findKey(r, s);
|
|
1373
1373
|
if (i) {
|
|
1374
1374
|
n[i] = ro(o), delete n[s];
|
|
1375
1375
|
return;
|
|
@@ -1383,8 +1383,8 @@ let mt = class {
|
|
|
1383
1383
|
}
|
|
1384
1384
|
toJSON(t) {
|
|
1385
1385
|
const n = /* @__PURE__ */ Object.create(null);
|
|
1386
|
-
return
|
|
1387
|
-
r != null && r !== !1 && (n[o] = t &&
|
|
1386
|
+
return k.forEach(this, (r, o) => {
|
|
1387
|
+
r != null && r !== !1 && (n[o] = t && k.isArray(r) ? r.join(", ") : r);
|
|
1388
1388
|
}), n;
|
|
1389
1389
|
}
|
|
1390
1390
|
[Symbol.iterator]() {
|
|
@@ -1415,11 +1415,11 @@ let mt = class {
|
|
|
1415
1415
|
const a = dr(i);
|
|
1416
1416
|
r[a] || (bg(o, i), r[a] = !0);
|
|
1417
1417
|
}
|
|
1418
|
-
return
|
|
1418
|
+
return k.isArray(t) ? t.forEach(s) : s(t), this;
|
|
1419
1419
|
}
|
|
1420
1420
|
};
|
|
1421
1421
|
mt.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1422
|
-
|
|
1422
|
+
k.reduceDescriptors(mt.prototype, ({ value: e }, t) => {
|
|
1423
1423
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
1424
1424
|
return {
|
|
1425
1425
|
get: () => e,
|
|
@@ -1428,11 +1428,11 @@ A.reduceDescriptors(mt.prototype, ({ value: e }, t) => {
|
|
|
1428
1428
|
}
|
|
1429
1429
|
};
|
|
1430
1430
|
});
|
|
1431
|
-
|
|
1431
|
+
k.freezeMethods(mt);
|
|
1432
1432
|
function Es(e, t) {
|
|
1433
1433
|
const n = this || Mr, r = t || n, o = mt.from(r.headers);
|
|
1434
1434
|
let s = r.data;
|
|
1435
|
-
return
|
|
1435
|
+
return k.forEach(e, function(a) {
|
|
1436
1436
|
s = a.call(n, s, o.normalize(), t ? t.status : void 0);
|
|
1437
1437
|
}), o.normalize(), s;
|
|
1438
1438
|
}
|
|
@@ -1442,7 +1442,7 @@ function Lc(e) {
|
|
|
1442
1442
|
function nr(e, t, n) {
|
|
1443
1443
|
we.call(this, e ?? "canceled", we.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
1444
1444
|
}
|
|
1445
|
-
|
|
1445
|
+
k.inherits(nr, we, {
|
|
1446
1446
|
__CANCEL__: !0
|
|
1447
1447
|
});
|
|
1448
1448
|
function Fc(e, t, n) {
|
|
@@ -1513,7 +1513,7 @@ const yo = (e, t, n = 3) => {
|
|
|
1513
1513
|
total: e,
|
|
1514
1514
|
loaded: r
|
|
1515
1515
|
}), t[1]];
|
|
1516
|
-
}, tl = (e) => (...t) =>
|
|
1516
|
+
}, tl = (e) => (...t) => k.asap(() => e(...t)), Cg = lt.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, lt.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1517
1517
|
new URL(lt.origin),
|
|
1518
1518
|
lt.navigator && /(msie|trident)/i.test(lt.navigator.userAgent)
|
|
1519
1519
|
) : () => !0, Tg = lt.hasStandardBrowserEnv ? (
|
|
@@ -1521,7 +1521,7 @@ const yo = (e, t, n = 3) => {
|
|
|
1521
1521
|
{
|
|
1522
1522
|
write(e, t, n, r, o, s) {
|
|
1523
1523
|
const i = [e + "=" + encodeURIComponent(t)];
|
|
1524
|
-
|
|
1524
|
+
k.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), k.isString(r) && i.push("path=" + r), k.isString(o) && i.push("domain=" + o), s === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
1525
1525
|
},
|
|
1526
1526
|
read(e) {
|
|
1527
1527
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -1558,21 +1558,21 @@ function Cn(e, t) {
|
|
|
1558
1558
|
t = t || {};
|
|
1559
1559
|
const n = {};
|
|
1560
1560
|
function r(u, d, h, p) {
|
|
1561
|
-
return
|
|
1561
|
+
return k.isPlainObject(u) && k.isPlainObject(d) ? k.merge.call({ caseless: p }, u, d) : k.isPlainObject(d) ? k.merge({}, d) : k.isArray(d) ? d.slice() : d;
|
|
1562
1562
|
}
|
|
1563
1563
|
function o(u, d, h, p) {
|
|
1564
|
-
if (
|
|
1565
|
-
if (!
|
|
1564
|
+
if (k.isUndefined(d)) {
|
|
1565
|
+
if (!k.isUndefined(u))
|
|
1566
1566
|
return r(void 0, u, h, p);
|
|
1567
1567
|
} else return r(u, d, h, p);
|
|
1568
1568
|
}
|
|
1569
1569
|
function s(u, d) {
|
|
1570
|
-
if (!
|
|
1570
|
+
if (!k.isUndefined(d))
|
|
1571
1571
|
return r(void 0, d);
|
|
1572
1572
|
}
|
|
1573
1573
|
function i(u, d) {
|
|
1574
|
-
if (
|
|
1575
|
-
if (!
|
|
1574
|
+
if (k.isUndefined(d)) {
|
|
1575
|
+
if (!k.isUndefined(u))
|
|
1576
1576
|
return r(void 0, u);
|
|
1577
1577
|
} else return r(void 0, d);
|
|
1578
1578
|
}
|
|
@@ -1613,9 +1613,9 @@ function Cn(e, t) {
|
|
|
1613
1613
|
validateStatus: a,
|
|
1614
1614
|
headers: (u, d, h) => o(nl(u), nl(d), h, !0)
|
|
1615
1615
|
};
|
|
1616
|
-
return
|
|
1616
|
+
return k.forEach(Object.keys({ ...e, ...t }), function(d) {
|
|
1617
1617
|
const h = c[d] || o, p = h(e[d], t[d], d);
|
|
1618
|
-
|
|
1618
|
+
k.isUndefined(p) && h !== a || (n[d] = p);
|
|
1619
1619
|
}), n;
|
|
1620
1620
|
}
|
|
1621
1621
|
const Hc = (e) => {
|
|
@@ -1624,17 +1624,17 @@ const Hc = (e) => {
|
|
|
1624
1624
|
if (t.headers = i = mt.from(i), t.url = Oc(Bc(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
|
|
1625
1625
|
"Authorization",
|
|
1626
1626
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1627
|
-
),
|
|
1627
|
+
), k.isFormData(n)) {
|
|
1628
1628
|
if (lt.hasStandardBrowserEnv || lt.hasStandardBrowserWebWorkerEnv)
|
|
1629
1629
|
i.setContentType(void 0);
|
|
1630
|
-
else if (
|
|
1630
|
+
else if (k.isFunction(n.getHeaders)) {
|
|
1631
1631
|
const c = n.getHeaders(), u = ["content-type", "content-length"];
|
|
1632
1632
|
Object.entries(c).forEach(([d, h]) => {
|
|
1633
1633
|
u.includes(d.toLowerCase()) && i.set(d, h);
|
|
1634
1634
|
});
|
|
1635
1635
|
}
|
|
1636
1636
|
}
|
|
1637
|
-
if (lt.hasStandardBrowserEnv && (r &&
|
|
1637
|
+
if (lt.hasStandardBrowserEnv && (r && k.isFunction(r) && (r = r(t)), r || r !== !1 && Cg(t.url))) {
|
|
1638
1638
|
const c = o && s && Tg.read(s);
|
|
1639
1639
|
c && i.set(o, c);
|
|
1640
1640
|
}
|
|
@@ -1663,10 +1663,10 @@ const Hc = (e) => {
|
|
|
1663
1663
|
config: e,
|
|
1664
1664
|
request: m
|
|
1665
1665
|
};
|
|
1666
|
-
Fc(function(
|
|
1667
|
-
n(
|
|
1668
|
-
}, function(
|
|
1669
|
-
r(
|
|
1666
|
+
Fc(function(C) {
|
|
1667
|
+
n(C), x();
|
|
1668
|
+
}, function(C) {
|
|
1669
|
+
r(C), x();
|
|
1670
1670
|
}, S), m = null;
|
|
1671
1671
|
}
|
|
1672
1672
|
"onloadend" in m ? m.onloadend = v : m.onreadystatechange = function() {
|
|
@@ -1674,8 +1674,8 @@ const Hc = (e) => {
|
|
|
1674
1674
|
}, m.onabort = function() {
|
|
1675
1675
|
m && (r(new we("Request aborted", we.ECONNABORTED, e, m)), m = null);
|
|
1676
1676
|
}, m.onerror = function(E) {
|
|
1677
|
-
const S = E && E.message ? E.message : "Network Error",
|
|
1678
|
-
|
|
1677
|
+
const S = E && E.message ? E.message : "Network Error", T = new we(S, we.ERR_NETWORK, e, m);
|
|
1678
|
+
T.event = E || null, r(T), m = null;
|
|
1679
1679
|
}, m.ontimeout = function() {
|
|
1680
1680
|
let E = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1681
1681
|
const S = o.transitional || Mc;
|
|
@@ -1685,9 +1685,9 @@ const Hc = (e) => {
|
|
|
1685
1685
|
e,
|
|
1686
1686
|
m
|
|
1687
1687
|
)), m = null;
|
|
1688
|
-
}, s === void 0 && i.setContentType(null), "setRequestHeader" in m &&
|
|
1688
|
+
}, s === void 0 && i.setContentType(null), "setRequestHeader" in m && k.forEach(i.toJSON(), function(E, S) {
|
|
1689
1689
|
m.setRequestHeader(S, E);
|
|
1690
|
-
}),
|
|
1690
|
+
}), k.isUndefined(o.withCredentials) || (m.withCredentials = !!o.withCredentials), a && a !== "json" && (m.responseType = o.responseType), u && ([p, g] = yo(u, !0), m.addEventListener("progress", p)), c && m.upload && ([h, b] = yo(c), m.upload.addEventListener("progress", h), m.upload.addEventListener("loadend", b)), (o.cancelToken || o.signal) && (d = (y) => {
|
|
1691
1691
|
m && (r(!y || y.type ? new nr(null, e, m) : y), m.abort(), m = null);
|
|
1692
1692
|
}, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
|
|
1693
1693
|
const w = wg(o.url);
|
|
@@ -1718,7 +1718,7 @@ const Hc = (e) => {
|
|
|
1718
1718
|
};
|
|
1719
1719
|
e.forEach((u) => u.addEventListener("abort", s));
|
|
1720
1720
|
const { signal: c } = r;
|
|
1721
|
-
return c.unsubscribe = () =>
|
|
1721
|
+
return c.unsubscribe = () => k.asap(a), c;
|
|
1722
1722
|
}
|
|
1723
1723
|
}, Ag = function* (e, t) {
|
|
1724
1724
|
let n = e.byteLength;
|
|
@@ -1777,20 +1777,20 @@ const Hc = (e) => {
|
|
|
1777
1777
|
}, {
|
|
1778
1778
|
highWaterMark: 2
|
|
1779
1779
|
});
|
|
1780
|
-
}, ol = 64 * 1024, { isFunction: Wr } =
|
|
1780
|
+
}, ol = 64 * 1024, { isFunction: Wr } = k, _g = (({ Request: e, Response: t }) => ({
|
|
1781
1781
|
Request: e,
|
|
1782
1782
|
Response: t
|
|
1783
|
-
}))(
|
|
1783
|
+
}))(k.global), {
|
|
1784
1784
|
ReadableStream: sl,
|
|
1785
1785
|
TextEncoder: il
|
|
1786
|
-
} =
|
|
1786
|
+
} = k.global, al = (e, ...t) => {
|
|
1787
1787
|
try {
|
|
1788
1788
|
return !!e(...t);
|
|
1789
1789
|
} catch {
|
|
1790
1790
|
return !1;
|
|
1791
1791
|
}
|
|
1792
1792
|
}, Og = (e) => {
|
|
1793
|
-
e =
|
|
1793
|
+
e = k.merge.call({
|
|
1794
1794
|
skipUndefined: !0
|
|
1795
1795
|
}, _g, e);
|
|
1796
1796
|
const { fetch: t, Request: n, Response: r } = e, o = t ? Wr(t) : typeof fetch == "function", s = Wr(n), i = Wr(r);
|
|
@@ -1806,7 +1806,7 @@ const Hc = (e) => {
|
|
|
1806
1806
|
}
|
|
1807
1807
|
}).headers.has("Content-Type");
|
|
1808
1808
|
return g && !x;
|
|
1809
|
-
}), d = i && a && al(() =>
|
|
1809
|
+
}), d = i && a && al(() => k.isReadableStream(new r("").body)), h = {
|
|
1810
1810
|
stream: d && ((g) => g.body)
|
|
1811
1811
|
};
|
|
1812
1812
|
o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((g) => {
|
|
@@ -1820,19 +1820,19 @@ const Hc = (e) => {
|
|
|
1820
1820
|
const p = async (g) => {
|
|
1821
1821
|
if (g == null)
|
|
1822
1822
|
return 0;
|
|
1823
|
-
if (
|
|
1823
|
+
if (k.isBlob(g))
|
|
1824
1824
|
return g.size;
|
|
1825
|
-
if (
|
|
1825
|
+
if (k.isSpecCompliantForm(g))
|
|
1826
1826
|
return (await new n(lt.origin, {
|
|
1827
1827
|
method: "POST",
|
|
1828
1828
|
body: g
|
|
1829
1829
|
}).arrayBuffer()).byteLength;
|
|
1830
|
-
if (
|
|
1830
|
+
if (k.isArrayBufferView(g) || k.isArrayBuffer(g))
|
|
1831
1831
|
return g.byteLength;
|
|
1832
|
-
if (
|
|
1832
|
+
if (k.isURLSearchParams(g) && (g = g + ""), k.isString(g))
|
|
1833
1833
|
return (await c(g)).byteLength;
|
|
1834
1834
|
}, b = async (g, x) => {
|
|
1835
|
-
const m =
|
|
1835
|
+
const m = k.toFiniteNumber(g.getContentLength());
|
|
1836
1836
|
return m ?? p(x);
|
|
1837
1837
|
};
|
|
1838
1838
|
return async (g) => {
|
|
@@ -1844,36 +1844,36 @@ const Hc = (e) => {
|
|
|
1844
1844
|
cancelToken: y,
|
|
1845
1845
|
timeout: E,
|
|
1846
1846
|
onDownloadProgress: S,
|
|
1847
|
-
onUploadProgress:
|
|
1848
|
-
responseType:
|
|
1847
|
+
onUploadProgress: T,
|
|
1848
|
+
responseType: C,
|
|
1849
1849
|
headers: I,
|
|
1850
1850
|
withCredentials: N = "same-origin",
|
|
1851
|
-
fetchOptions:
|
|
1851
|
+
fetchOptions: j
|
|
1852
1852
|
} = Hc(g), M = t || fetch;
|
|
1853
|
-
|
|
1853
|
+
C = C ? (C + "").toLowerCase() : "text";
|
|
1854
1854
|
let W = jg([w, y && y.toAbortSignal()], E), G = null;
|
|
1855
|
-
const
|
|
1855
|
+
const A = W && W.unsubscribe && (() => {
|
|
1856
1856
|
W.unsubscribe();
|
|
1857
1857
|
});
|
|
1858
1858
|
let H;
|
|
1859
1859
|
try {
|
|
1860
|
-
if (
|
|
1860
|
+
if (T && u && m !== "get" && m !== "head" && (H = await b(I, v)) !== 0) {
|
|
1861
1861
|
let X = new n(x, {
|
|
1862
1862
|
method: "POST",
|
|
1863
1863
|
body: v,
|
|
1864
1864
|
duplex: "half"
|
|
1865
1865
|
}), oe;
|
|
1866
|
-
if (
|
|
1866
|
+
if (k.isFormData(v) && (oe = X.headers.get("content-type")) && I.setContentType(oe), X.body) {
|
|
1867
1867
|
const [F, ee] = el(
|
|
1868
1868
|
H,
|
|
1869
|
-
yo(tl(
|
|
1869
|
+
yo(tl(T))
|
|
1870
1870
|
);
|
|
1871
1871
|
v = rl(X.body, ol, F, ee);
|
|
1872
1872
|
}
|
|
1873
1873
|
}
|
|
1874
|
-
|
|
1874
|
+
k.isString(N) || (N = N ? "include" : "omit");
|
|
1875
1875
|
const L = s && "credentials" in n.prototype, q = {
|
|
1876
|
-
...
|
|
1876
|
+
...j,
|
|
1877
1877
|
signal: W,
|
|
1878
1878
|
method: m.toUpperCase(),
|
|
1879
1879
|
headers: I.normalize().toJSON(),
|
|
@@ -1882,27 +1882,27 @@ const Hc = (e) => {
|
|
|
1882
1882
|
credentials: L ? N : void 0
|
|
1883
1883
|
};
|
|
1884
1884
|
G = s && new n(x, q);
|
|
1885
|
-
let O = await (s ? M(G,
|
|
1886
|
-
const _ = d && (
|
|
1887
|
-
if (d && (S || _ &&
|
|
1885
|
+
let O = await (s ? M(G, j) : M(x, q));
|
|
1886
|
+
const _ = d && (C === "stream" || C === "response");
|
|
1887
|
+
if (d && (S || _ && A)) {
|
|
1888
1888
|
const X = {};
|
|
1889
1889
|
["status", "statusText", "headers"].forEach((he) => {
|
|
1890
1890
|
X[he] = O[he];
|
|
1891
1891
|
});
|
|
1892
|
-
const oe =
|
|
1892
|
+
const oe = k.toFiniteNumber(O.headers.get("content-length")), [F, ee] = S && el(
|
|
1893
1893
|
oe,
|
|
1894
1894
|
yo(tl(S), !0)
|
|
1895
1895
|
) || [];
|
|
1896
1896
|
O = new r(
|
|
1897
1897
|
rl(O.body, ol, F, () => {
|
|
1898
|
-
ee && ee(),
|
|
1898
|
+
ee && ee(), A && A();
|
|
1899
1899
|
}),
|
|
1900
1900
|
X
|
|
1901
1901
|
);
|
|
1902
1902
|
}
|
|
1903
|
-
|
|
1904
|
-
let z = await h[
|
|
1905
|
-
return !_ &&
|
|
1903
|
+
C = C || "text";
|
|
1904
|
+
let z = await h[k.findKey(h, C) || "text"](O, g);
|
|
1905
|
+
return !_ && A && A(), await new Promise((X, oe) => {
|
|
1906
1906
|
Fc(X, oe, {
|
|
1907
1907
|
data: z,
|
|
1908
1908
|
headers: mt.from(O.headers),
|
|
@@ -1913,7 +1913,7 @@ const Hc = (e) => {
|
|
|
1913
1913
|
});
|
|
1914
1914
|
});
|
|
1915
1915
|
} catch (L) {
|
|
1916
|
-
throw
|
|
1916
|
+
throw A && A(), L && L.name === "TypeError" && /Load failed|fetch/i.test(L.message) ? Object.assign(
|
|
1917
1917
|
new we("Network Error", we.ERR_NETWORK, g, G),
|
|
1918
1918
|
{
|
|
1919
1919
|
cause: L.cause || L
|
|
@@ -1941,7 +1941,7 @@ const ti = {
|
|
|
1941
1941
|
get: $c
|
|
1942
1942
|
}
|
|
1943
1943
|
};
|
|
1944
|
-
|
|
1944
|
+
k.forEach(ti, (e, t) => {
|
|
1945
1945
|
if (e) {
|
|
1946
1946
|
try {
|
|
1947
1947
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1950,9 +1950,9 @@ A.forEach(ti, (e, t) => {
|
|
|
1950
1950
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1951
1951
|
}
|
|
1952
1952
|
});
|
|
1953
|
-
const ll = (e) => `- ${e}`, Dg = (e) =>
|
|
1953
|
+
const ll = (e) => `- ${e}`, Dg = (e) => k.isFunction(e) || e === null || e === !1, zc = {
|
|
1954
1954
|
getAdapter: (e, t) => {
|
|
1955
|
-
e =
|
|
1955
|
+
e = k.isArray(e) ? e : [e];
|
|
1956
1956
|
const { length: n } = e;
|
|
1957
1957
|
let r, o;
|
|
1958
1958
|
const s = {};
|
|
@@ -1961,7 +1961,7 @@ const ll = (e) => `- ${e}`, Dg = (e) => A.isFunction(e) || e === null || e === !
|
|
|
1961
1961
|
let a;
|
|
1962
1962
|
if (o = r, !Dg(r) && (o = ti[(a = String(r)).toLowerCase()], o === void 0))
|
|
1963
1963
|
throw new we(`Unknown adapter '${a}'`);
|
|
1964
|
-
if (o && (
|
|
1964
|
+
if (o && (k.isFunction(o) || (o = o.get(t))))
|
|
1965
1965
|
break;
|
|
1966
1966
|
s[a || "#" + i] = o;
|
|
1967
1967
|
}
|
|
@@ -2091,7 +2091,7 @@ let yn = class {
|
|
|
2091
2091
|
silentJSONParsing: Ut.transitional(Ut.boolean),
|
|
2092
2092
|
forcedJSONParsing: Ut.transitional(Ut.boolean),
|
|
2093
2093
|
clarifyTimeoutError: Ut.transitional(Ut.boolean)
|
|
2094
|
-
}, !1), o != null && (
|
|
2094
|
+
}, !1), o != null && (k.isFunction(o) ? n.paramsSerializer = {
|
|
2095
2095
|
serialize: o
|
|
2096
2096
|
} : oo.assertOptions(o, {
|
|
2097
2097
|
encode: Ut.function,
|
|
@@ -2100,11 +2100,11 @@ let yn = class {
|
|
|
2100
2100
|
baseUrl: Ut.spelling("baseURL"),
|
|
2101
2101
|
withXsrfToken: Ut.spelling("withXSRFToken")
|
|
2102
2102
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
2103
|
-
let i = s &&
|
|
2103
|
+
let i = s && k.merge(
|
|
2104
2104
|
s.common,
|
|
2105
2105
|
s[n.method]
|
|
2106
2106
|
);
|
|
2107
|
-
s &&
|
|
2107
|
+
s && k.forEach(
|
|
2108
2108
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
2109
2109
|
(g) => {
|
|
2110
2110
|
delete s[g];
|
|
@@ -2152,7 +2152,7 @@ let yn = class {
|
|
|
2152
2152
|
return Oc(n, t.params, t.paramsSerializer);
|
|
2153
2153
|
}
|
|
2154
2154
|
};
|
|
2155
|
-
|
|
2155
|
+
k.forEach(["delete", "get", "head", "options"], function(t) {
|
|
2156
2156
|
yn.prototype[t] = function(n, r) {
|
|
2157
2157
|
return this.request(Cn(r || {}, {
|
|
2158
2158
|
method: t,
|
|
@@ -2161,7 +2161,7 @@ A.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
2161
2161
|
}));
|
|
2162
2162
|
};
|
|
2163
2163
|
});
|
|
2164
|
-
|
|
2164
|
+
k.forEach(["post", "put", "patch"], function(t) {
|
|
2165
2165
|
function n(r) {
|
|
2166
2166
|
return function(s, i, a) {
|
|
2167
2167
|
return this.request(Cn(a || {}, {
|
|
@@ -2255,7 +2255,7 @@ function Bg(e) {
|
|
|
2255
2255
|
};
|
|
2256
2256
|
}
|
|
2257
2257
|
function Hg(e) {
|
|
2258
|
-
return
|
|
2258
|
+
return k.isObject(e) && e.isAxiosError === !0;
|
|
2259
2259
|
}
|
|
2260
2260
|
const ni = {
|
|
2261
2261
|
Continue: 100,
|
|
@@ -2327,7 +2327,7 @@ Object.entries(ni).forEach(([e, t]) => {
|
|
|
2327
2327
|
});
|
|
2328
2328
|
function Vc(e) {
|
|
2329
2329
|
const t = new yn(e), n = Sc(yn.prototype.request, t);
|
|
2330
|
-
return
|
|
2330
|
+
return k.extend(n, yn.prototype, t, { allOwnKeys: !0 }), k.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
2331
2331
|
return Vc(Cn(e, o));
|
|
2332
2332
|
}, n;
|
|
2333
2333
|
}
|
|
@@ -2347,7 +2347,7 @@ Ke.spread = Bg;
|
|
|
2347
2347
|
Ke.isAxiosError = Hg;
|
|
2348
2348
|
Ke.mergeConfig = Cn;
|
|
2349
2349
|
Ke.AxiosHeaders = mt;
|
|
2350
|
-
Ke.formToJSON = (e) => Dc(
|
|
2350
|
+
Ke.formToJSON = (e) => Dc(k.isHTMLForm(e) ? new FormData(e) : e);
|
|
2351
2351
|
Ke.getAdapter = zc.getAdapter;
|
|
2352
2352
|
Ke.HttpStatusCode = ni;
|
|
2353
2353
|
Ke.default = Ke;
|
|
@@ -2504,7 +2504,7 @@ class Gg {
|
|
|
2504
2504
|
}
|
|
2505
2505
|
const Tn = new Gg();
|
|
2506
2506
|
function Kg(e = {}) {
|
|
2507
|
-
const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = de(e.token ?? null), s =
|
|
2507
|
+
const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = de(e.token ?? null), s = Je(e.headers ?? {}), [i, a] = de(!1), [c, u] = de(null), [d, h] = de(""), [p, b] = de(null), g = Je(null), x = ze((y) => {
|
|
2508
2508
|
o(y);
|
|
2509
2509
|
}, []), m = ze(() => {
|
|
2510
2510
|
var y;
|
|
@@ -2514,71 +2514,71 @@ function Kg(e = {}) {
|
|
|
2514
2514
|
}, []), w = ze(
|
|
2515
2515
|
(y, E, S) => {
|
|
2516
2516
|
g.current && (g.current.abort(), g.current = null), a(!0), u(null), e.autoAppendAssistant !== !1 && h("");
|
|
2517
|
-
const
|
|
2518
|
-
return g.current =
|
|
2519
|
-
var N,
|
|
2520
|
-
const
|
|
2521
|
-
var
|
|
2517
|
+
const T = new AbortController();
|
|
2518
|
+
return g.current = T, (async () => {
|
|
2519
|
+
var N, j, M, W, G;
|
|
2520
|
+
const C = (() => {
|
|
2521
|
+
var A;
|
|
2522
2522
|
try {
|
|
2523
|
-
return typeof window < "u" && ((
|
|
2523
|
+
return typeof window < "u" && ((A = window.localStorage) == null ? void 0 : A.getItem("chat-debug")) === "1";
|
|
2524
2524
|
} catch {
|
|
2525
2525
|
return !1;
|
|
2526
2526
|
}
|
|
2527
|
-
})(), I = (
|
|
2527
|
+
})(), I = (A) => {
|
|
2528
2528
|
var H;
|
|
2529
2529
|
try {
|
|
2530
|
-
const L = JSON.parse(JSON.stringify(
|
|
2530
|
+
const L = JSON.parse(JSON.stringify(A));
|
|
2531
2531
|
return (H = L == null ? void 0 : L.payload) != null && H.files_info && Array.isArray(L.payload.files_info) && (L.payload.files_info = L.payload.files_info.map((q) => ({
|
|
2532
2532
|
...q,
|
|
2533
2533
|
data: q != null && q.data ? `<base64 ${String(q.data).length} chars>` : q == null ? void 0 : q.data
|
|
2534
2534
|
}))), L;
|
|
2535
2535
|
} catch {
|
|
2536
|
-
return
|
|
2536
|
+
return A;
|
|
2537
2537
|
}
|
|
2538
2538
|
};
|
|
2539
2539
|
try {
|
|
2540
|
-
let
|
|
2540
|
+
let A = {};
|
|
2541
2541
|
try {
|
|
2542
2542
|
if (r)
|
|
2543
|
-
|
|
2543
|
+
A = { Authorization: `Bearer ${r}` };
|
|
2544
2544
|
else if (typeof window < "u") {
|
|
2545
2545
|
const z = window.__AUTH_TOKEN__, X = ((N = window.localStorage) == null ? void 0 : N.getItem("authToken")) || null;
|
|
2546
2546
|
let oe = null;
|
|
2547
2547
|
try {
|
|
2548
|
-
const ee = (
|
|
2548
|
+
const ee = (j = window.localStorage) == null ? void 0 : j.getItem("chat-settings");
|
|
2549
2549
|
ee && (oe = ((M = JSON.parse(ee)) == null ? void 0 : M.apiKey) || null);
|
|
2550
2550
|
} catch {
|
|
2551
2551
|
}
|
|
2552
2552
|
const F = z || X || oe || null;
|
|
2553
|
-
F && (
|
|
2553
|
+
F && (A = { Authorization: `Bearer ${F}` });
|
|
2554
2554
|
}
|
|
2555
2555
|
} catch {
|
|
2556
2556
|
}
|
|
2557
|
-
|
|
2557
|
+
C && console.debug("[use-chat] POST", t + n, I(y));
|
|
2558
2558
|
const H = await fetch(t + n, {
|
|
2559
2559
|
method: "POST",
|
|
2560
2560
|
headers: {
|
|
2561
2561
|
"Content-Type": "application/json",
|
|
2562
2562
|
Accept: "text/event-stream",
|
|
2563
|
-
...
|
|
2563
|
+
...A,
|
|
2564
2564
|
...s.current
|
|
2565
2565
|
},
|
|
2566
2566
|
body: JSON.stringify(y),
|
|
2567
|
-
signal:
|
|
2567
|
+
signal: T.signal
|
|
2568
2568
|
});
|
|
2569
2569
|
if (!H.ok || !H.body) {
|
|
2570
2570
|
const _ = await H.text().catch(() => "");
|
|
2571
|
-
throw
|
|
2571
|
+
throw C && console.debug("[use-chat] non-OK response", H.status, _ == null ? void 0 : _.slice(0, 500)), new Error(`stream ${H.status}${_ ? ": " + _ : ""}`);
|
|
2572
2572
|
}
|
|
2573
2573
|
try {
|
|
2574
2574
|
const _ = H.headers.get("X-Thread-Id") || H.headers.get("x-thread-id"), z = H.headers.get("X-Thread-Created") || H.headers.get("x-thread-created"), X = _ ?? null, oe = String(z ?? "").toLowerCase() === "true";
|
|
2575
2575
|
try {
|
|
2576
2576
|
(W = S == null ? void 0 : S.onOpen) == null || W.call(S, { threadId: X, created: oe });
|
|
2577
2577
|
} catch (F) {
|
|
2578
|
-
|
|
2578
|
+
C && console.debug("[use-chat] onOpen handler threw:", F);
|
|
2579
2579
|
}
|
|
2580
2580
|
} catch (_) {
|
|
2581
|
-
|
|
2581
|
+
C && console.debug("[use-chat] failed to read headers:", _);
|
|
2582
2582
|
}
|
|
2583
2583
|
const L = H.body.getReader(), q = new TextDecoder();
|
|
2584
2584
|
let O = "";
|
|
@@ -2598,11 +2598,11 @@ function Kg(e = {}) {
|
|
|
2598
2598
|
try {
|
|
2599
2599
|
ee = JSON.parse(F);
|
|
2600
2600
|
} catch {
|
|
2601
|
-
|
|
2601
|
+
C && console.debug("[use-chat] skip malformed SSE data:", F == null ? void 0 : F.slice(0, 200));
|
|
2602
2602
|
continue;
|
|
2603
2603
|
}
|
|
2604
2604
|
const he = Yg(ee) ? ee.data : ee;
|
|
2605
|
-
if (
|
|
2605
|
+
if (C && console.debug("[use-chat] event:", he == null ? void 0 : he.type, he), E == null || E(he), he.type === "token")
|
|
2606
2606
|
e.autoAppendAssistant !== !1 && h((be) => be + he.content);
|
|
2607
2607
|
else if (he.type === "message_delta") {
|
|
2608
2608
|
const be = he.delta.filter((Y) => Y.type === "text").map((Y) => Y.text).join("");
|
|
@@ -2610,14 +2610,14 @@ function Kg(e = {}) {
|
|
|
2610
2610
|
} else he.type === "checkpoint" ? b(he.checkpointId) : he.type === "error" && u(he.message);
|
|
2611
2611
|
}
|
|
2612
2612
|
}
|
|
2613
|
-
} catch (
|
|
2614
|
-
if ((
|
|
2615
|
-
const H = (
|
|
2616
|
-
|
|
2613
|
+
} catch (A) {
|
|
2614
|
+
if ((A == null ? void 0 : A.name) === "AbortError") return;
|
|
2615
|
+
const H = (A == null ? void 0 : A.message) || String(A);
|
|
2616
|
+
C && console.debug("[use-chat] error:", H), u(H), (G = S == null ? void 0 : S.onError) == null || G.call(S, H);
|
|
2617
2617
|
} finally {
|
|
2618
2618
|
a(!1), g.current = null;
|
|
2619
2619
|
}
|
|
2620
|
-
})(), { close: () =>
|
|
2620
|
+
})(), { close: () => T.abort() };
|
|
2621
2621
|
},
|
|
2622
2622
|
[t, r, e.autoAppendAssistant]
|
|
2623
2623
|
);
|
|
@@ -2696,7 +2696,7 @@ function Jg(e, t) {
|
|
|
2696
2696
|
}
|
|
2697
2697
|
}
|
|
2698
2698
|
function Zg(e = []) {
|
|
2699
|
-
const [t, n] = Dp(Jg, { ...Xg, messages: e }), r =
|
|
2699
|
+
const [t, n] = Dp(Jg, { ...Xg, messages: e }), r = Je([]), o = Je(null), s = Je(null), i = ze(() => {
|
|
2700
2700
|
o.current !== null && typeof window < "u" && window.cancelAnimationFrame(o.current), s.current !== null && clearTimeout(s.current), o.current = null, s.current = null;
|
|
2701
2701
|
const d = r.current;
|
|
2702
2702
|
d.length && (r.current = [], n({ type: "batch", payload: { events: d } }));
|
|
@@ -2949,10 +2949,10 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2949
2949
|
}, [u, g]);
|
|
2950
2950
|
const v = ze(($) => {
|
|
2951
2951
|
u.setAuthToken($);
|
|
2952
|
-
}, [u]), { state: w, seed: y, prepend: E, pushUser: S, onEvent:
|
|
2952
|
+
}, [u]), { state: w, seed: y, prepend: E, pushUser: S, onEvent: T, reset: C } = Zg(), I = s && s > 0 ? s : 6, [N, j] = de(!1), [M, W] = de(!1), [G, A] = de(null), [H, L] = de(void 0), q = ze(
|
|
2953
2953
|
($, ie) => {
|
|
2954
2954
|
const Fe = Array.isArray($ == null ? void 0 : $.messages) ? $.messages : [];
|
|
2955
|
-
ie === "replace" ? y(Fe) : ie === "prepend" && Fe.length && E(Fe),
|
|
2955
|
+
ie === "replace" ? y(Fe) : ie === "prepend" && Fe.length && E(Fe), A(($ == null ? void 0 : $.nextCursor) ?? null), j(!!($ != null && $.hasMore)), L((tt) => ($ == null ? void 0 : $.checkpointId) ?? tt ?? void 0);
|
|
2956
2956
|
},
|
|
2957
2957
|
[y, E]
|
|
2958
2958
|
), [O, _] = de([]), [z, X] = de(null), oe = ze(async () => {
|
|
@@ -2960,41 +2960,41 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
2960
2960
|
_($);
|
|
2961
2961
|
}, [u]), [F, ee] = de(!1), he = ze(
|
|
2962
2962
|
async ($) => {
|
|
2963
|
-
const ie = ($ == null ? void 0 : $.maxAttempts) ?? 5, Fe = ($ == null ? void 0 : $.baseDelayMs) ?? 500,
|
|
2963
|
+
const ie = ($ == null ? void 0 : $.maxAttempts) ?? 5, Fe = ($ == null ? void 0 : $.baseDelayMs) ?? 500, tt = ($ == null ? void 0 : $.timeoutMs) ?? 2e3;
|
|
2964
2964
|
if (!u.baseUrl) return !1;
|
|
2965
|
-
const
|
|
2965
|
+
const rt = u.baseUrl.replace(/\/+$/, ""), st = [
|
|
2966
2966
|
"/health",
|
|
2967
2967
|
"/api/health",
|
|
2968
2968
|
"/",
|
|
2969
2969
|
// root
|
|
2970
2970
|
"/api/v2/health",
|
|
2971
2971
|
"/api/v2/chat/health"
|
|
2972
|
-
],
|
|
2972
|
+
], Qe = async (Ye) => {
|
|
2973
2973
|
try {
|
|
2974
|
-
const
|
|
2975
|
-
return clearTimeout(We),
|
|
2974
|
+
const it = new AbortController(), We = setTimeout(() => it.abort(), tt), at = await fetch(Ye, { method: "GET", signal: it.signal });
|
|
2975
|
+
return clearTimeout(We), at.ok;
|
|
2976
2976
|
} catch {
|
|
2977
2977
|
return !1;
|
|
2978
2978
|
}
|
|
2979
2979
|
}, At = async (Ye) => {
|
|
2980
2980
|
try {
|
|
2981
|
-
const
|
|
2982
|
-
return clearTimeout(We),
|
|
2981
|
+
const it = new AbortController(), We = setTimeout(() => it.abort(), tt), at = await fetch(Ye, { method: "HEAD", signal: it.signal });
|
|
2982
|
+
return clearTimeout(We), at.ok;
|
|
2983
2983
|
} catch {
|
|
2984
2984
|
return !1;
|
|
2985
2985
|
}
|
|
2986
2986
|
};
|
|
2987
2987
|
for (let Ye = 0; Ye < ie; Ye++) {
|
|
2988
2988
|
console.debug(`[ChatProvider] health-check attempt ${Ye + 1}/${ie}`);
|
|
2989
|
-
for (const We of
|
|
2990
|
-
let
|
|
2991
|
-
|
|
2992
|
-
const kt =
|
|
2993
|
-
if (console.debug(`[ChatProvider] checking ${kt}`), await
|
|
2989
|
+
for (const We of st) {
|
|
2990
|
+
let at = We;
|
|
2991
|
+
rt.endsWith("/api") && We.startsWith("/api") && (at = We.replace(/^\/api/, "") || "/");
|
|
2992
|
+
const kt = at === "/" ? rt + "/" : rt + at;
|
|
2993
|
+
if (console.debug(`[ChatProvider] checking ${kt}`), await Qe(kt) || We === "/" && await At(rt + "/"))
|
|
2994
2994
|
return ee(!0), !0;
|
|
2995
2995
|
}
|
|
2996
|
-
const
|
|
2997
|
-
await new Promise((We) => setTimeout(We,
|
|
2996
|
+
const it = Fe * Math.pow(2, Ye);
|
|
2997
|
+
await new Promise((We) => setTimeout(We, it));
|
|
2998
2998
|
}
|
|
2999
2999
|
return ee(!1), !1;
|
|
3000
3000
|
},
|
|
@@ -3020,7 +3020,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3020
3020
|
}, [oe, u.baseUrl, he]), Ue(() => {
|
|
3021
3021
|
r == null || r(z);
|
|
3022
3022
|
}, [z, r]);
|
|
3023
|
-
const be =
|
|
3023
|
+
const be = Je(null);
|
|
3024
3024
|
Ue(() => {
|
|
3025
3025
|
if (o && i) {
|
|
3026
3026
|
if (!u.baseUrl) {
|
|
@@ -3035,7 +3035,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3035
3035
|
}));
|
|
3036
3036
|
}
|
|
3037
3037
|
}, [o, i, u.baseUrl, F]);
|
|
3038
|
-
const Y =
|
|
3038
|
+
const Y = Je(null), P = ze(
|
|
3039
3039
|
async ($, ie, Fe) => {
|
|
3040
3040
|
if (!u.baseUrl) {
|
|
3041
3041
|
console.debug("[ChatProvider] skipping loadThread: api.baseUrl not configured");
|
|
@@ -3044,14 +3044,14 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3044
3044
|
if (Y.current !== $) {
|
|
3045
3045
|
Y.current = $;
|
|
3046
3046
|
try {
|
|
3047
|
-
|
|
3048
|
-
const
|
|
3047
|
+
j(!1), A(null), L(void 0);
|
|
3048
|
+
const tt = await u.getMessages({
|
|
3049
3049
|
threadId: $,
|
|
3050
3050
|
checkpointId: ie,
|
|
3051
3051
|
checkpointNs: Fe,
|
|
3052
3052
|
limit: I
|
|
3053
3053
|
});
|
|
3054
|
-
X($), q(
|
|
3054
|
+
X($), q(tt, "replace");
|
|
3055
3055
|
} finally {
|
|
3056
3056
|
Y.current = null;
|
|
3057
3057
|
}
|
|
@@ -3063,7 +3063,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3063
3063
|
return rx(ie, $);
|
|
3064
3064
|
}, [u]), ne = ze(async ($) => {
|
|
3065
3065
|
if (!z) throw new Error("No active thread");
|
|
3066
|
-
|
|
3066
|
+
j(!1), A(null), L(void 0);
|
|
3067
3067
|
const ie = await u.getMessages({
|
|
3068
3068
|
threadId: z,
|
|
3069
3069
|
checkpointId: $,
|
|
@@ -3073,7 +3073,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3073
3073
|
}, [u, z, q, I]), ae = ze(async () => {
|
|
3074
3074
|
if (!z) throw new Error("No active thread");
|
|
3075
3075
|
await P(z);
|
|
3076
|
-
}, [z, P]), se =
|
|
3076
|
+
}, [z, P]), se = Je(!1);
|
|
3077
3077
|
Ue(() => {
|
|
3078
3078
|
const $ = se.current;
|
|
3079
3079
|
if (se.current = d, $ && !d && z) {
|
|
@@ -3099,38 +3099,38 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3099
3099
|
const ie = await u.createThread($);
|
|
3100
3100
|
return await oe(), await P(ie.threadId), ie.threadId;
|
|
3101
3101
|
}, [u, oe, P]), Le = ze(async ($) => {
|
|
3102
|
-
await u.deleteThread($), await oe(), z === $ && (X(null),
|
|
3103
|
-
}, [u, oe, z,
|
|
3102
|
+
await u.deleteThread($), await oe(), z === $ && (X(null), C([]), j(!1), A(null), L(void 0));
|
|
3103
|
+
}, [u, oe, z, C]), Oe = ze(async ($, ie) => {
|
|
3104
3104
|
await u.updateThread($, ie), await oe();
|
|
3105
3105
|
}, [u, oe]), ue = ze(async ($, ie) => {
|
|
3106
3106
|
var On;
|
|
3107
|
-
const Fe = (ie == null ? void 0 : ie.attachments) || [], { contentParts:
|
|
3107
|
+
const Fe = (ie == null ? void 0 : ie.attachments) || [], { contentParts: tt, filesInfo: rt } = await ix(
|
|
3108
3108
|
u,
|
|
3109
3109
|
Fe,
|
|
3110
3110
|
t == null ? void 0 : t.uploadPath,
|
|
3111
3111
|
a,
|
|
3112
3112
|
c,
|
|
3113
3113
|
z
|
|
3114
|
-
),
|
|
3115
|
-
$ &&
|
|
3116
|
-
for (const J of
|
|
3117
|
-
const
|
|
3114
|
+
), st = [];
|
|
3115
|
+
$ && st.push({ type: "text", text: $ });
|
|
3116
|
+
for (const J of tt) st.push(J);
|
|
3117
|
+
const Qe = {
|
|
3118
3118
|
id: ((On = crypto.randomUUID) == null ? void 0 : On.call(crypto)) || `user-${Date.now()}`,
|
|
3119
3119
|
role: "user",
|
|
3120
|
-
content:
|
|
3120
|
+
content: st,
|
|
3121
3121
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3122
3122
|
checkpointId: (ie == null ? void 0 : ie.checkpointId) ?? w.lastCheckpointId ?? void 0
|
|
3123
3123
|
};
|
|
3124
|
-
S(
|
|
3124
|
+
S(Qe);
|
|
3125
3125
|
const At = {
|
|
3126
|
-
...
|
|
3127
|
-
content:
|
|
3128
|
-
}, Ye = { ...(ie == null ? void 0 : ie.payloadExtras) ?? {} },
|
|
3126
|
+
...Qe,
|
|
3127
|
+
content: Qe.content.filter((J) => J.type === "text" || J.type === "image_url" || J.type === "file")
|
|
3128
|
+
}, Ye = { ...(ie == null ? void 0 : ie.payloadExtras) ?? {} }, it = !!Ye.edit, We = Ye.originalMessageId, at = typeof We == "string" ? We : void 0, kt = Fe && Fe.length > 0, xn = {
|
|
3129
3129
|
...z ? { threadId: z } : {},
|
|
3130
3130
|
payload: {
|
|
3131
3131
|
messages: [At],
|
|
3132
|
-
attachments:
|
|
3133
|
-
files_info:
|
|
3132
|
+
attachments: Qe.content.filter((J) => J.type === "file").map((J) => ({ type: "file", url: J.url, mimeType: J.mimeType, name: J.name, size: J.size })),
|
|
3133
|
+
files_info: rt,
|
|
3134
3134
|
...a && kt && c ? { active_agent: c } : {},
|
|
3135
3135
|
...Ye
|
|
3136
3136
|
},
|
|
@@ -3138,12 +3138,12 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3138
3138
|
checkpointNs: ie == null ? void 0 : ie.checkpointNs,
|
|
3139
3139
|
nodeFilter: ie == null ? void 0 : ie.nodeFilter,
|
|
3140
3140
|
config: ie == null ? void 0 : ie.config,
|
|
3141
|
-
edit:
|
|
3142
|
-
originalMessageId:
|
|
3141
|
+
edit: it,
|
|
3142
|
+
originalMessageId: at
|
|
3143
3143
|
};
|
|
3144
3144
|
p(
|
|
3145
3145
|
xn,
|
|
3146
|
-
(J) =>
|
|
3146
|
+
(J) => T(J),
|
|
3147
3147
|
{
|
|
3148
3148
|
onError: (J) => console.warn("stream error", J),
|
|
3149
3149
|
onOpen: ({ threadId: J, created: ce }) => {
|
|
@@ -3152,7 +3152,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3152
3152
|
}
|
|
3153
3153
|
}
|
|
3154
3154
|
);
|
|
3155
|
-
}, [z, S, p,
|
|
3155
|
+
}, [z, S, p, T, w.lastCheckpointId, u, t == null ? void 0 : t.uploadPath, oe, X, a, c]), Pe = ze(
|
|
3156
3156
|
async ($) => {
|
|
3157
3157
|
if (!z) throw new Error("No active thread");
|
|
3158
3158
|
if (M || !N) return;
|
|
@@ -3294,8 +3294,8 @@ function lx({
|
|
|
3294
3294
|
const N = (p ?? "").trim();
|
|
3295
3295
|
!N && !h || x(() => {
|
|
3296
3296
|
try {
|
|
3297
|
-
const
|
|
3298
|
-
|
|
3297
|
+
const j = i(N);
|
|
3298
|
+
j && typeof j.then == "function" ? j.then(() => {
|
|
3299
3299
|
b(""), m.current && (m.current.style.height = "auto");
|
|
3300
3300
|
}).catch(() => {
|
|
3301
3301
|
}) : (b(""), m.current && (m.current.style.height = "auto"));
|
|
@@ -3311,7 +3311,7 @@ function lx({
|
|
|
3311
3311
|
I.key === "Enter" && !I.shiftKey ? (I.preventDefault(), w()) : I.key === "Escape" && t && (I.preventDefault(), a == null || a());
|
|
3312
3312
|
},
|
|
3313
3313
|
[w, t, a]
|
|
3314
|
-
),
|
|
3314
|
+
), C = `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${t ? "border-[hsl(var(--ring))] bg-[hsl(var(--card))] text-[hsl(var(--card-foreground))] dark:bg-[hsl(var(--card))] dark:text-[hsl(var(--card-foreground))]" : ""} ${d}`;
|
|
3315
3315
|
return /* @__PURE__ */ l.jsx("form", { onSubmit: (I) => void w(I), className: `w-full ${u}`, children: /* @__PURE__ */ l.jsxs("div", { className: "flex items-end gap-2", children: [
|
|
3316
3316
|
/* @__PURE__ */ l.jsx("div", { className: "flex-1", children: /* @__PURE__ */ l.jsx(
|
|
3317
3317
|
Kc,
|
|
@@ -3321,7 +3321,7 @@ function lx({
|
|
|
3321
3321
|
onChange: y,
|
|
3322
3322
|
onKeyDown: E,
|
|
3323
3323
|
placeholder: t ? "Edit your message..." : n,
|
|
3324
|
-
className:
|
|
3324
|
+
className: C,
|
|
3325
3325
|
disabled: o,
|
|
3326
3326
|
maxLength: s,
|
|
3327
3327
|
rows: 1,
|
|
@@ -3567,7 +3567,7 @@ function xx(e) {
|
|
|
3567
3567
|
};
|
|
3568
3568
|
return n(e);
|
|
3569
3569
|
}
|
|
3570
|
-
function
|
|
3570
|
+
function Ze(...e) {
|
|
3571
3571
|
const t = Re(), n = new Array(e.length);
|
|
3572
3572
|
let r = 0;
|
|
3573
3573
|
const o = Math.pow(2, e.length) - 1;
|
|
@@ -3805,7 +3805,7 @@ function Lt(e, t, n = "k") {
|
|
|
3805
3805
|
return Lt(e.l, t, n);
|
|
3806
3806
|
}
|
|
3807
3807
|
function bt(e, t, n) {
|
|
3808
|
-
return De(e) ? tu(t, n, 1) : t === e.k ?
|
|
3808
|
+
return De(e) ? tu(t, n, 1) : t === e.k ? et(e, { k: t, v: n }) : t < e.k ? bl(et(e, { l: bt(e.l, t, n) })) : bl(et(e, { r: bt(e.r, t, n) }));
|
|
3809
3809
|
}
|
|
3810
3810
|
function Vn() {
|
|
3811
3811
|
return wr;
|
|
@@ -3826,9 +3826,9 @@ function ai(e, t) {
|
|
|
3826
3826
|
return r;
|
|
3827
3827
|
{
|
|
3828
3828
|
const [s, i] = eu(r);
|
|
3829
|
-
return io(
|
|
3829
|
+
return io(et(e, { k: s, l: Qc(r), v: i }));
|
|
3830
3830
|
}
|
|
3831
|
-
} else return t < n ? io(
|
|
3831
|
+
} else return t < n ? io(et(e, { l: ai(r, t) })) : io(et(e, { r: ai(o, t) }));
|
|
3832
3832
|
}
|
|
3833
3833
|
function wn(e) {
|
|
3834
3834
|
return De(e) ? [] : [...wn(e.l), { k: e.k, v: e.v }, ...wn(e.r)];
|
|
@@ -3846,12 +3846,12 @@ function io(e) {
|
|
|
3846
3846
|
return e;
|
|
3847
3847
|
if (n > r.lvl + 1) {
|
|
3848
3848
|
if (As(t))
|
|
3849
|
-
return nu(
|
|
3849
|
+
return nu(et(e, { lvl: n - 1 }));
|
|
3850
3850
|
if (!De(t) && !De(t.r))
|
|
3851
|
-
return
|
|
3852
|
-
l:
|
|
3851
|
+
return et(t.r, {
|
|
3852
|
+
l: et(t, { r: t.r.l }),
|
|
3853
3853
|
lvl: n,
|
|
3854
|
-
r:
|
|
3854
|
+
r: et(e, {
|
|
3855
3855
|
l: t.r.r,
|
|
3856
3856
|
lvl: n - 1
|
|
3857
3857
|
})
|
|
@@ -3859,22 +3859,22 @@ function io(e) {
|
|
|
3859
3859
|
throw new Error("Unexpected empty nodes");
|
|
3860
3860
|
} else {
|
|
3861
3861
|
if (As(e))
|
|
3862
|
-
return ci(
|
|
3862
|
+
return ci(et(e, { lvl: n - 1 }));
|
|
3863
3863
|
if (!De(r) && !De(r.l)) {
|
|
3864
3864
|
const o = r.l, s = As(o) ? r.lvl - 1 : r.lvl;
|
|
3865
|
-
return
|
|
3866
|
-
l:
|
|
3865
|
+
return et(o, {
|
|
3866
|
+
l: et(e, {
|
|
3867
3867
|
lvl: n - 1,
|
|
3868
3868
|
r: o.l
|
|
3869
3869
|
}),
|
|
3870
3870
|
lvl: o.lvl + 1,
|
|
3871
|
-
r: ci(
|
|
3871
|
+
r: ci(et(r, { l: o.r, lvl: s }))
|
|
3872
3872
|
});
|
|
3873
3873
|
} else
|
|
3874
3874
|
throw new Error("Unexpected empty nodes");
|
|
3875
3875
|
}
|
|
3876
3876
|
}
|
|
3877
|
-
function
|
|
3877
|
+
function et(e, t) {
|
|
3878
3878
|
return tu(
|
|
3879
3879
|
t.k !== void 0 ? t.k : e.k,
|
|
3880
3880
|
t.v !== void 0 ? t.v : e.v,
|
|
@@ -3884,7 +3884,7 @@ function Qe(e, t) {
|
|
|
3884
3884
|
);
|
|
3885
3885
|
}
|
|
3886
3886
|
function Qc(e) {
|
|
3887
|
-
return De(e.r) ? e.l : io(
|
|
3887
|
+
return De(e.r) ? e.l : io(et(e, { r: Qc(e.r) }));
|
|
3888
3888
|
}
|
|
3889
3889
|
function As(e) {
|
|
3890
3890
|
return De(e) || e.lvl > e.r.lvl;
|
|
@@ -3900,11 +3900,11 @@ function bl(e) {
|
|
|
3900
3900
|
}
|
|
3901
3901
|
function nu(e) {
|
|
3902
3902
|
const { l: t } = e;
|
|
3903
|
-
return !De(t) && t.lvl === e.lvl ?
|
|
3903
|
+
return !De(t) && t.lvl === e.lvl ? et(t, { r: et(e, { l: t.r }) }) : e;
|
|
3904
3904
|
}
|
|
3905
3905
|
function ci(e) {
|
|
3906
3906
|
const { lvl: t, r: n } = e;
|
|
3907
|
-
return !De(n) && !De(n.r) && n.lvl === t && n.r.lvl === t ?
|
|
3907
|
+
return !De(n) && !De(n.r) && n.lvl === t && n.r.lvl === t ? et(n, { l: et(e, { r: n.l }), lvl: t + 1 }) : e;
|
|
3908
3908
|
}
|
|
3909
3909
|
function Sx(e) {
|
|
3910
3910
|
return Zc(e, ({ k: t, v: n }) => ({ index: t, value: n }));
|
|
@@ -4084,14 +4084,14 @@ const _x = {
|
|
|
4084
4084
|
offsetWidth: "width"
|
|
4085
4085
|
}, Xt = Ie(
|
|
4086
4086
|
([{ log: e }, { recalcInProgress: t }]) => {
|
|
4087
|
-
const n = Re(), r = Re(), o = ut(r, 0), s = Re(), i = Re(), a = V(0), c = V([]), u = V(void 0), d = V(void 0), h = V((S,
|
|
4087
|
+
const n = Re(), r = Re(), o = ut(r, 0), s = Re(), i = Re(), a = V(0), c = V([]), u = V(void 0), d = V(void 0), h = V((S, T) => ln(S, _x[T])), p = V(void 0), b = V(0), g = Tx(), x = ut(
|
|
4088
4088
|
B(n, Se(c, e, b), Gt(jx, g), Be()),
|
|
4089
4089
|
g
|
|
4090
4090
|
), m = ut(
|
|
4091
4091
|
B(
|
|
4092
4092
|
c,
|
|
4093
4093
|
Be(),
|
|
4094
|
-
Gt((S,
|
|
4094
|
+
Gt((S, T) => ({ current: T, prev: S.current }), {
|
|
4095
4095
|
current: [],
|
|
4096
4096
|
prev: []
|
|
4097
4097
|
}),
|
|
@@ -4104,10 +4104,10 @@ const _x = {
|
|
|
4104
4104
|
c,
|
|
4105
4105
|
pe((S) => S.length > 0),
|
|
4106
4106
|
Se(x, b),
|
|
4107
|
-
re(([S,
|
|
4108
|
-
const I = S.reduce((N,
|
|
4107
|
+
re(([S, T, C]) => {
|
|
4108
|
+
const I = S.reduce((N, j, M) => bt(N, j, Cr(j, T.offsetTree, C) || M), Vn());
|
|
4109
4109
|
return {
|
|
4110
|
-
...
|
|
4110
|
+
...T,
|
|
4111
4111
|
groupIndices: S,
|
|
4112
4112
|
groupOffsetTree: I
|
|
4113
4113
|
};
|
|
@@ -4118,11 +4118,11 @@ const _x = {
|
|
|
4118
4118
|
B(
|
|
4119
4119
|
r,
|
|
4120
4120
|
Se(x),
|
|
4121
|
-
pe(([S, { lastIndex:
|
|
4122
|
-
re(([S, { lastIndex:
|
|
4121
|
+
pe(([S, { lastIndex: T }]) => S < T),
|
|
4122
|
+
re(([S, { lastIndex: T, lastSize: C }]) => [
|
|
4123
4123
|
{
|
|
4124
|
-
endIndex:
|
|
4125
|
-
size:
|
|
4124
|
+
endIndex: T,
|
|
4125
|
+
size: C,
|
|
4126
4126
|
startIndex: S
|
|
4127
4127
|
}
|
|
4128
4128
|
])
|
|
@@ -4149,9 +4149,9 @@ const _x = {
|
|
|
4149
4149
|
n,
|
|
4150
4150
|
Se(x),
|
|
4151
4151
|
Gt(
|
|
4152
|
-
({ sizes: S }, [
|
|
4153
|
-
changed:
|
|
4154
|
-
sizes:
|
|
4152
|
+
({ sizes: S }, [T, C]) => ({
|
|
4153
|
+
changed: C !== S,
|
|
4154
|
+
sizes: C
|
|
4155
4155
|
}),
|
|
4156
4156
|
{ changed: !1, sizes: g }
|
|
4157
4157
|
),
|
|
@@ -4162,22 +4162,22 @@ const _x = {
|
|
|
4162
4162
|
B(
|
|
4163
4163
|
a,
|
|
4164
4164
|
Gt(
|
|
4165
|
-
(S,
|
|
4165
|
+
(S, T) => ({ diff: S.prev - T, prev: T }),
|
|
4166
4166
|
{ diff: 0, prev: 0 }
|
|
4167
4167
|
),
|
|
4168
4168
|
re((S) => S.diff)
|
|
4169
4169
|
),
|
|
4170
4170
|
(S) => {
|
|
4171
|
-
const { groupIndices:
|
|
4171
|
+
const { groupIndices: T } = Ge(x);
|
|
4172
4172
|
if (S > 0)
|
|
4173
|
-
ye(t, !0), ye(s, S + wl(S,
|
|
4173
|
+
ye(t, !0), ye(s, S + wl(S, T));
|
|
4174
4174
|
else if (S < 0) {
|
|
4175
|
-
const
|
|
4176
|
-
|
|
4175
|
+
const C = Ge(m);
|
|
4176
|
+
C.length > 0 && (S -= wl(-S, C)), ye(i, S);
|
|
4177
4177
|
}
|
|
4178
4178
|
}
|
|
4179
|
-
), ke(B(a, Se(e)), ([S,
|
|
4180
|
-
S < 0 &&
|
|
4179
|
+
), ke(B(a, Se(e)), ([S, T]) => {
|
|
4180
|
+
S < 0 && T(
|
|
4181
4181
|
"`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
|
|
4182
4182
|
{ firstItemIndex: a },
|
|
4183
4183
|
gt.ERROR
|
|
@@ -4188,33 +4188,33 @@ const _x = {
|
|
|
4188
4188
|
B(
|
|
4189
4189
|
s,
|
|
4190
4190
|
Se(x),
|
|
4191
|
-
re(([S,
|
|
4192
|
-
const
|
|
4193
|
-
if (
|
|
4194
|
-
const
|
|
4191
|
+
re(([S, T]) => {
|
|
4192
|
+
const C = T.groupIndices.length > 0, I = [], N = T.lastSize;
|
|
4193
|
+
if (C) {
|
|
4194
|
+
const j = yr(T.sizeTree, 0);
|
|
4195
4195
|
let M = 0, W = 0;
|
|
4196
4196
|
for (; M < S; ) {
|
|
4197
|
-
const
|
|
4197
|
+
const A = T.groupIndices[W], H = T.groupIndices.length === W + 1 ? 1 / 0 : T.groupIndices[W + 1] - A - 1;
|
|
4198
4198
|
I.push({
|
|
4199
|
-
endIndex:
|
|
4200
|
-
size:
|
|
4201
|
-
startIndex:
|
|
4199
|
+
endIndex: A,
|
|
4200
|
+
size: j,
|
|
4201
|
+
startIndex: A
|
|
4202
4202
|
}), I.push({
|
|
4203
|
-
endIndex:
|
|
4203
|
+
endIndex: A + 1 + H - 1,
|
|
4204
4204
|
size: N,
|
|
4205
|
-
startIndex:
|
|
4205
|
+
startIndex: A + 1
|
|
4206
4206
|
}), W++, M += H + 1;
|
|
4207
4207
|
}
|
|
4208
|
-
const G = wn(
|
|
4208
|
+
const G = wn(T.sizeTree);
|
|
4209
4209
|
return M !== S && G.shift(), G.reduce(
|
|
4210
|
-
(
|
|
4211
|
-
let q =
|
|
4212
|
-
return
|
|
4213
|
-
...
|
|
4210
|
+
(A, { k: H, v: L }) => {
|
|
4211
|
+
let q = A.ranges;
|
|
4212
|
+
return A.prevSize !== 0 && (q = [
|
|
4213
|
+
...A.ranges,
|
|
4214
4214
|
{
|
|
4215
4215
|
endIndex: H + S - 1,
|
|
4216
|
-
size:
|
|
4217
|
-
startIndex:
|
|
4216
|
+
size: A.prevSize,
|
|
4217
|
+
startIndex: A.prevIndex
|
|
4218
4218
|
}
|
|
4219
4219
|
]), {
|
|
4220
4220
|
prevIndex: H + S,
|
|
@@ -4229,11 +4229,11 @@ const _x = {
|
|
|
4229
4229
|
}
|
|
4230
4230
|
).ranges;
|
|
4231
4231
|
}
|
|
4232
|
-
return wn(
|
|
4233
|
-
(
|
|
4232
|
+
return wn(T.sizeTree).reduce(
|
|
4233
|
+
(j, { k: M, v: W }) => ({
|
|
4234
4234
|
prevIndex: M + S,
|
|
4235
4235
|
prevSize: W,
|
|
4236
|
-
ranges: [...
|
|
4236
|
+
ranges: [...j.ranges, { endIndex: M + S - 1, size: j.prevSize, startIndex: j.prevIndex }]
|
|
4237
4237
|
}),
|
|
4238
4238
|
{
|
|
4239
4239
|
prevIndex: 0,
|
|
@@ -4249,9 +4249,9 @@ const _x = {
|
|
|
4249
4249
|
B(
|
|
4250
4250
|
i,
|
|
4251
4251
|
Se(x, b),
|
|
4252
|
-
re(([S, { offsetTree:
|
|
4252
|
+
re(([S, { offsetTree: T }, C]) => {
|
|
4253
4253
|
const I = -S;
|
|
4254
|
-
return Cr(I,
|
|
4254
|
+
return Cr(I, T, C);
|
|
4255
4255
|
})
|
|
4256
4256
|
)
|
|
4257
4257
|
);
|
|
@@ -4259,35 +4259,35 @@ const _x = {
|
|
|
4259
4259
|
B(
|
|
4260
4260
|
i,
|
|
4261
4261
|
Se(x, b),
|
|
4262
|
-
re(([S,
|
|
4263
|
-
if (
|
|
4264
|
-
if (De(
|
|
4265
|
-
return
|
|
4262
|
+
re(([S, T, C]) => {
|
|
4263
|
+
if (T.groupIndices.length > 0) {
|
|
4264
|
+
if (De(T.sizeTree))
|
|
4265
|
+
return T;
|
|
4266
4266
|
let I = Vn();
|
|
4267
4267
|
const N = Ge(m);
|
|
4268
|
-
let
|
|
4269
|
-
for (;
|
|
4268
|
+
let j = 0, M = 0, W = 0;
|
|
4269
|
+
for (; j < -S; ) {
|
|
4270
4270
|
W = N[M];
|
|
4271
4271
|
const G = N[M + 1] - W - 1;
|
|
4272
|
-
M++,
|
|
4272
|
+
M++, j += G + 1;
|
|
4273
4273
|
}
|
|
4274
|
-
if (I = wn(
|
|
4275
|
-
const G = yr(
|
|
4274
|
+
if (I = wn(T.sizeTree).reduce((G, { k: A, v: H }) => bt(G, Math.max(0, A + S), H), I), j !== -S) {
|
|
4275
|
+
const G = yr(T.sizeTree, W);
|
|
4276
4276
|
I = bt(I, 0, G);
|
|
4277
|
-
const
|
|
4278
|
-
I = bt(I, 1,
|
|
4277
|
+
const A = Lt(T.sizeTree, -S + 1)[1];
|
|
4278
|
+
I = bt(I, 1, A);
|
|
4279
4279
|
}
|
|
4280
4280
|
return {
|
|
4281
|
-
...
|
|
4281
|
+
...T,
|
|
4282
4282
|
sizeTree: I,
|
|
4283
|
-
...ui(
|
|
4283
|
+
...ui(T.offsetTree, 0, I, C)
|
|
4284
4284
|
};
|
|
4285
4285
|
} else {
|
|
4286
|
-
const I = wn(
|
|
4286
|
+
const I = wn(T.sizeTree).reduce((N, { k: j, v: M }) => bt(N, Math.max(0, j + S), M), Vn());
|
|
4287
4287
|
return {
|
|
4288
|
-
...
|
|
4288
|
+
...T,
|
|
4289
4289
|
sizeTree: I,
|
|
4290
|
-
...ui(
|
|
4290
|
+
...ui(T.offsetTree, 0, I, C)
|
|
4291
4291
|
};
|
|
4292
4292
|
}
|
|
4293
4293
|
})
|
|
@@ -4344,7 +4344,7 @@ const au = Ie(
|
|
|
4344
4344
|
e
|
|
4345
4345
|
), le(
|
|
4346
4346
|
B(
|
|
4347
|
-
|
|
4347
|
+
Ze(o, t, r),
|
|
4348
4348
|
pe(([c, u]) => Ko(u)),
|
|
4349
4349
|
re(([c, u, d]) => Lt(u.groupOffsetTree, Math.max(c - d, 0), "v")[0]),
|
|
4350
4350
|
Be(),
|
|
@@ -4401,14 +4401,14 @@ const Dr = Ie(
|
|
|
4401
4401
|
Se(e, s, o),
|
|
4402
4402
|
re(
|
|
4403
4403
|
([
|
|
4404
|
-
[E, S,
|
|
4404
|
+
[E, S, T, C, I, N, j, M],
|
|
4405
4405
|
W,
|
|
4406
4406
|
G,
|
|
4407
|
-
|
|
4407
|
+
A
|
|
4408
4408
|
]) => {
|
|
4409
|
-
const H = lu(E), { align: L, behavior: q, offset: O } = H, _ =
|
|
4409
|
+
const H = lu(E), { align: L, behavior: q, offset: O } = H, _ = C - 1, z = iu(H, S, _);
|
|
4410
4410
|
let X = Cr(z, S.offsetTree, W) + N;
|
|
4411
|
-
L === "end" ? (X += G + Lt(S.sizeTree, z)[1] -
|
|
4411
|
+
L === "end" ? (X += G + Lt(S.sizeTree, z)[1] - T + A, z === _ && (X += j)) : L === "center" ? X += (G + Lt(S.sizeTree, z)[1] - T + A) / 2 : X -= I, O && (X += O);
|
|
4412
4412
|
const oe = (F) => {
|
|
4413
4413
|
y(), F ? (M("retrying to scroll to", { location: E }, gt.DEBUG), ye(b, E)) : (ye(g, !0), M("list did not change, scroll successful", {}, gt.DEBUG));
|
|
4414
4414
|
};
|
|
@@ -4477,7 +4477,7 @@ const Lr = Ie(
|
|
|
4477
4477
|
u
|
|
4478
4478
|
), ke(
|
|
4479
4479
|
B(
|
|
4480
|
-
|
|
4480
|
+
Ze(t, i),
|
|
4481
4481
|
Se(a, n, e, u),
|
|
4482
4482
|
pe(([[, d], h, { sizeTree: p }, b, g]) => d && (!De(p) || Bi(b)) && !h && !g),
|
|
4483
4483
|
Se(c)
|
|
@@ -4525,7 +4525,7 @@ const Tr = "up", mr = "down", Lx = "none", Fx = {
|
|
|
4525
4525
|
);
|
|
4526
4526
|
le(
|
|
4527
4527
|
B(
|
|
4528
|
-
|
|
4528
|
+
Ze(fe(o), fe(h)),
|
|
4529
4529
|
re(([w, y]) => w <= y),
|
|
4530
4530
|
Be()
|
|
4531
4531
|
),
|
|
@@ -4533,9 +4533,9 @@ const Tr = "up", mr = "down", Lx = "none", Fx = {
|
|
|
4533
4533
|
), le(B(a, en(50)), u);
|
|
4534
4534
|
const g = wt(
|
|
4535
4535
|
B(
|
|
4536
|
-
|
|
4537
|
-
Gt((w, [{ scrollHeight: y, scrollTop: E }, S,
|
|
4538
|
-
const N = E + S - y > -I,
|
|
4536
|
+
Ze(r, fe(s), fe(t), fe(e), fe(d)),
|
|
4537
|
+
Gt((w, [{ scrollHeight: y, scrollTop: E }, S, T, C, I]) => {
|
|
4538
|
+
const N = E + S - y > -I, j = {
|
|
4539
4539
|
scrollHeight: y,
|
|
4540
4540
|
scrollTop: E,
|
|
4541
4541
|
viewportHeight: S
|
|
@@ -4546,14 +4546,14 @@ const Tr = "up", mr = "down", Lx = "none", Fx = {
|
|
|
4546
4546
|
atBottom: !0,
|
|
4547
4547
|
atBottomBecause: W,
|
|
4548
4548
|
scrollTopDelta: G,
|
|
4549
|
-
state:
|
|
4549
|
+
state: j
|
|
4550
4550
|
};
|
|
4551
4551
|
}
|
|
4552
4552
|
let M;
|
|
4553
|
-
return
|
|
4553
|
+
return j.scrollHeight > w.state.scrollHeight ? M = "SIZE_INCREASED" : S < w.state.viewportHeight ? M = "VIEWPORT_HEIGHT_DECREASING" : E < w.state.scrollTop ? M = "SCROLLING_UPWARDS" : M = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
|
|
4554
4554
|
atBottom: !1,
|
|
4555
4555
|
notAtBottomBecause: M,
|
|
4556
|
-
state:
|
|
4556
|
+
state: j
|
|
4557
4557
|
};
|
|
4558
4558
|
}, Fx),
|
|
4559
4559
|
Be((w, y) => w && w.atBottom === y.atBottom)
|
|
@@ -4571,8 +4571,8 @@ const Tr = "up", mr = "down", Lx = "none", Fx = {
|
|
|
4571
4571
|
scrollTop: E
|
|
4572
4572
|
};
|
|
4573
4573
|
{
|
|
4574
|
-
const
|
|
4575
|
-
return w.scrollTop !== E &&
|
|
4574
|
+
const T = y - (E + S) < 1;
|
|
4575
|
+
return w.scrollTop !== E && T ? {
|
|
4576
4576
|
changed: !0,
|
|
4577
4577
|
jump: w.scrollTop - E,
|
|
4578
4578
|
scrollHeight: y,
|
|
@@ -4656,7 +4656,7 @@ const Gi = Ie(
|
|
|
4656
4656
|
([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: o }]) => {
|
|
4657
4657
|
const s = Re(), i = V(0), a = V(0), c = V(0), u = ut(
|
|
4658
4658
|
B(
|
|
4659
|
-
|
|
4659
|
+
Ze(
|
|
4660
4660
|
fe(r),
|
|
4661
4661
|
fe(o),
|
|
4662
4662
|
fe(n),
|
|
@@ -4679,12 +4679,12 @@ const Gi = Ie(
|
|
|
4679
4679
|
w,
|
|
4680
4680
|
y
|
|
4681
4681
|
]) => {
|
|
4682
|
-
const E = d - w, S = m + v,
|
|
4683
|
-
let
|
|
4682
|
+
const E = d - w, S = m + v, T = Math.max(p - E, 0);
|
|
4683
|
+
let C = yl;
|
|
4684
4684
|
const I = Cl(y, To), N = Cl(y, Ro);
|
|
4685
|
-
return b -= w, b += p + v, g += p + v, g -= w, b > d + S - I && (
|
|
4686
|
-
Math.max(E - p - Sl(x, To,
|
|
4687
|
-
E -
|
|
4685
|
+
return b -= w, b += p + v, g += p + v, g -= w, b > d + S - I && (C = Tr), g < d - T + h + N && (C = mr), C !== yl ? [
|
|
4686
|
+
Math.max(E - p - Sl(x, To, C) - I, 0),
|
|
4687
|
+
E - T - v + h + Sl(x, Ro, C) + N
|
|
4688
4688
|
] : null;
|
|
4689
4689
|
}
|
|
4690
4690
|
),
|
|
@@ -4805,7 +4805,7 @@ const kn = Ie(
|
|
|
4805
4805
|
le(s.topItemsIndexes, x);
|
|
4806
4806
|
const w = ut(
|
|
4807
4807
|
B(
|
|
4808
|
-
|
|
4808
|
+
Ze(
|
|
4809
4809
|
b,
|
|
4810
4810
|
g,
|
|
4811
4811
|
fe(c, Sr),
|
|
@@ -4818,35 +4818,35 @@ const kn = Ie(
|
|
|
4818
4818
|
fe(n),
|
|
4819
4819
|
e
|
|
4820
4820
|
),
|
|
4821
|
-
pe(([
|
|
4822
|
-
const
|
|
4823
|
-
return
|
|
4821
|
+
pe(([T, C, , I, , , , , , , N]) => {
|
|
4822
|
+
const j = N && N.length !== I;
|
|
4823
|
+
return T && !C && !j;
|
|
4824
4824
|
}),
|
|
4825
4825
|
re(
|
|
4826
4826
|
([
|
|
4827
4827
|
,
|
|
4828
4828
|
,
|
|
4829
|
-
[
|
|
4829
|
+
[T, C],
|
|
4830
4830
|
I,
|
|
4831
4831
|
N,
|
|
4832
|
-
|
|
4832
|
+
j,
|
|
4833
4833
|
M,
|
|
4834
4834
|
W,
|
|
4835
4835
|
G,
|
|
4836
|
-
|
|
4836
|
+
A,
|
|
4837
4837
|
H
|
|
4838
4838
|
]) => {
|
|
4839
4839
|
const L = N, { offsetTree: q, sizeTree: O } = L, _ = Ge(m);
|
|
4840
4840
|
if (I === 0)
|
|
4841
4841
|
return { ...ks, totalCount: I };
|
|
4842
|
-
if (
|
|
4843
|
-
return _ === 0 ? { ...ks, totalCount: I } : uu(_,
|
|
4842
|
+
if (T === 0 && C === 0)
|
|
4843
|
+
return _ === 0 ? { ...ks, totalCount: I } : uu(_, j, N, G, A, H || []);
|
|
4844
4844
|
if (De(O))
|
|
4845
4845
|
return _ > 0 ? null : ao(
|
|
4846
|
-
Hx(Vi(
|
|
4846
|
+
Hx(Vi(j, I), L, H),
|
|
4847
4847
|
[],
|
|
4848
4848
|
I,
|
|
4849
|
-
|
|
4849
|
+
A,
|
|
4850
4850
|
L,
|
|
4851
4851
|
G
|
|
4852
4852
|
);
|
|
@@ -4861,8 +4861,8 @@ const kn = Ie(
|
|
|
4861
4861
|
}
|
|
4862
4862
|
}
|
|
4863
4863
|
if (!M)
|
|
4864
|
-
return ao([], z, I,
|
|
4865
|
-
const X = W.length > 0 ? W[W.length - 1] + 1 : 0, oe = Nx(q,
|
|
4864
|
+
return ao([], z, I, A, L, G);
|
|
4865
|
+
const X = W.length > 0 ? W[W.length - 1] + 1 : 0, oe = Nx(q, T, C, X);
|
|
4866
4866
|
if (oe.length === 0)
|
|
4867
4867
|
return null;
|
|
4868
4868
|
const F = I - 1, ee = Vo([], (he) => {
|
|
@@ -4870,22 +4870,22 @@ const kn = Ie(
|
|
|
4870
4870
|
const Y = be.value;
|
|
4871
4871
|
let P = Y.offset, Z = be.start;
|
|
4872
4872
|
const ne = Y.size;
|
|
4873
|
-
if (Y.offset <
|
|
4874
|
-
Z += Math.floor((
|
|
4873
|
+
if (Y.offset < T) {
|
|
4874
|
+
Z += Math.floor((T - Y.offset + A) / (ne + A));
|
|
4875
4875
|
const se = Z - be.start;
|
|
4876
|
-
P += se * ne + se *
|
|
4876
|
+
P += se * ne + se * A;
|
|
4877
4877
|
}
|
|
4878
4878
|
Z < X && (P += (X - Z) * ne, Z = X);
|
|
4879
4879
|
const ae = Math.min(be.end, F);
|
|
4880
|
-
for (let se = Z; se <= ae && !(P >=
|
|
4881
|
-
he.push({ data: H == null ? void 0 : H[se], index: se, offset: P, size: ne }), P += ne +
|
|
4880
|
+
for (let se = Z; se <= ae && !(P >= C); se++)
|
|
4881
|
+
he.push({ data: H == null ? void 0 : H[se], index: se, offset: P, size: ne }), P += ne + A;
|
|
4882
4882
|
}
|
|
4883
4883
|
});
|
|
4884
|
-
return ao(ee, z, I,
|
|
4884
|
+
return ao(ee, z, I, A, L, G);
|
|
4885
4885
|
}
|
|
4886
4886
|
),
|
|
4887
4887
|
//@ts-expect-error filter needs to be fixed
|
|
4888
|
-
pe((
|
|
4888
|
+
pe((T) => T !== null),
|
|
4889
4889
|
Be()
|
|
4890
4890
|
),
|
|
4891
4891
|
ks
|
|
@@ -4894,59 +4894,59 @@ const kn = Ie(
|
|
|
4894
4894
|
B(
|
|
4895
4895
|
e,
|
|
4896
4896
|
pe(Bi),
|
|
4897
|
-
re((
|
|
4897
|
+
re((T) => T == null ? void 0 : T.length)
|
|
4898
4898
|
),
|
|
4899
4899
|
o
|
|
4900
4900
|
), le(
|
|
4901
4901
|
B(
|
|
4902
4902
|
w,
|
|
4903
|
-
re((
|
|
4903
|
+
re((T) => T.topListHeight)
|
|
4904
4904
|
),
|
|
4905
4905
|
h
|
|
4906
4906
|
), le(h, a), le(
|
|
4907
4907
|
B(
|
|
4908
4908
|
w,
|
|
4909
|
-
re((
|
|
4909
|
+
re((T) => [T.top, T.bottom])
|
|
4910
4910
|
),
|
|
4911
4911
|
i
|
|
4912
4912
|
), le(
|
|
4913
4913
|
B(
|
|
4914
4914
|
w,
|
|
4915
|
-
re((
|
|
4915
|
+
re((T) => T.items)
|
|
4916
4916
|
),
|
|
4917
4917
|
v
|
|
4918
4918
|
);
|
|
4919
4919
|
const y = wt(
|
|
4920
4920
|
B(
|
|
4921
4921
|
w,
|
|
4922
|
-
pe(({ items:
|
|
4922
|
+
pe(({ items: T }) => T.length > 0),
|
|
4923
4923
|
Se(o, e),
|
|
4924
|
-
pe(([{ items:
|
|
4925
|
-
re(([,
|
|
4924
|
+
pe(([{ items: T }, C]) => T[T.length - 1].originalIndex === C - 1),
|
|
4925
|
+
re(([, T, C]) => [T - 1, C]),
|
|
4926
4926
|
Be(Sr),
|
|
4927
|
-
re(([
|
|
4927
|
+
re(([T]) => T)
|
|
4928
4928
|
)
|
|
4929
4929
|
), E = wt(
|
|
4930
4930
|
B(
|
|
4931
4931
|
w,
|
|
4932
4932
|
en(200),
|
|
4933
|
-
pe(({ items:
|
|
4934
|
-
re(({ items:
|
|
4933
|
+
pe(({ items: T, topItems: C }) => T.length > 0 && T[0].originalIndex === C.length),
|
|
4934
|
+
re(({ items: T }) => T[0].index),
|
|
4935
4935
|
Be()
|
|
4936
4936
|
)
|
|
4937
4937
|
), S = wt(
|
|
4938
4938
|
B(
|
|
4939
4939
|
w,
|
|
4940
|
-
pe(({ items:
|
|
4941
|
-
re(({ items:
|
|
4942
|
-
let
|
|
4943
|
-
for (; C
|
|
4944
|
-
|
|
4945
|
-
for (;
|
|
4940
|
+
pe(({ items: T }) => T.length > 0),
|
|
4941
|
+
re(({ items: T }) => {
|
|
4942
|
+
let C = 0, I = T.length - 1;
|
|
4943
|
+
for (; T[C].type === "group" && C < I; )
|
|
4944
|
+
C++;
|
|
4945
|
+
for (; T[I].type === "group" && I > C; )
|
|
4946
4946
|
I--;
|
|
4947
4947
|
return {
|
|
4948
|
-
endIndex:
|
|
4949
|
-
startIndex: C
|
|
4948
|
+
endIndex: T[I].index,
|
|
4949
|
+
startIndex: T[C].index
|
|
4950
4950
|
};
|
|
4951
4951
|
}),
|
|
4952
4952
|
Be(ru)
|
|
@@ -4969,7 +4969,7 @@ const kn = Ie(
|
|
|
4969
4969
|
([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: n, headerHeight: r }, { listState: o }]) => {
|
|
4970
4970
|
const s = Re(), i = ut(
|
|
4971
4971
|
B(
|
|
4972
|
-
|
|
4972
|
+
Ze(n, e, r, t, o),
|
|
4973
4973
|
re(([a, c, u, d, h]) => a + c + u + d + h.offsetBottom + h.bottom)
|
|
4974
4974
|
),
|
|
4975
4975
|
0
|
|
@@ -4982,7 +4982,7 @@ const kn = Ie(
|
|
|
4982
4982
|
([{ viewportHeight: e }, { totalListHeight: t }]) => {
|
|
4983
4983
|
const n = V(!1), r = ut(
|
|
4984
4984
|
B(
|
|
4985
|
-
|
|
4985
|
+
Ze(n, e, t),
|
|
4986
4986
|
pe(([o]) => o),
|
|
4987
4987
|
re(([, o, s]) => Math.max(0, o - s)),
|
|
4988
4988
|
en(0),
|
|
@@ -5015,14 +5015,14 @@ const kn = Ie(
|
|
|
5015
5015
|
Se(t, c, n, s, o, r, a),
|
|
5016
5016
|
Se(e),
|
|
5017
5017
|
re(([[h, p, b, g, x, m, v, w], y]) => {
|
|
5018
|
-
const { align: E, behavior: S, calculateViewLocation:
|
|
5018
|
+
const { align: E, behavior: S, calculateViewLocation: T = zx, done: C, ...I } = h, N = iu(h, p, g - 1), j = Cr(N, p.offsetTree, y) + x + m, M = j + Lt(p.sizeTree, N)[1], W = w + m, G = w + b - v, A = T({
|
|
5019
5019
|
itemBottom: M,
|
|
5020
|
-
itemTop:
|
|
5020
|
+
itemTop: j,
|
|
5021
5021
|
locationParams: { align: E, behavior: S, ...I },
|
|
5022
5022
|
viewportBottom: G,
|
|
5023
5023
|
viewportTop: W
|
|
5024
5024
|
});
|
|
5025
|
-
return
|
|
5025
|
+
return A ? C && Mt(
|
|
5026
5026
|
B(
|
|
5027
5027
|
i,
|
|
5028
5028
|
pe((H) => !H),
|
|
@@ -5030,8 +5030,8 @@ const kn = Ie(
|
|
|
5030
5030
|
// but if scrollingInProgress is true, we skip the initial publish.
|
|
5031
5031
|
Rn(Ge(i) ? 1 : 2)
|
|
5032
5032
|
),
|
|
5033
|
-
|
|
5034
|
-
) :
|
|
5033
|
+
C
|
|
5034
|
+
) : C && C(), A;
|
|
5035
5035
|
}),
|
|
5036
5036
|
pe((h) => h !== null)
|
|
5037
5037
|
),
|
|
@@ -5069,34 +5069,34 @@ const Ux = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Wx = Ie(
|
|
|
5069
5069
|
}
|
|
5070
5070
|
ke(
|
|
5071
5071
|
B(
|
|
5072
|
-
|
|
5072
|
+
Ze(B(fe(t), Rn(1)), c),
|
|
5073
5073
|
Se(fe(g), s, a, h),
|
|
5074
|
-
re(([[S,
|
|
5075
|
-
let M =
|
|
5076
|
-
return M && (W = Ux(
|
|
5074
|
+
re(([[S, T], C, I, N, j]) => {
|
|
5075
|
+
let M = T && N, W = "auto";
|
|
5076
|
+
return M && (W = Ux(C, I || j), M = M && !!W), { followOutputBehavior: W, shouldFollow: M, totalCount: S };
|
|
5077
5077
|
}),
|
|
5078
5078
|
pe(({ shouldFollow: S }) => S)
|
|
5079
5079
|
),
|
|
5080
|
-
({ followOutputBehavior: S, totalCount:
|
|
5080
|
+
({ followOutputBehavior: S, totalCount: T }) => {
|
|
5081
5081
|
m && (m(), m = null), Ge(n) ? requestAnimationFrame(() => {
|
|
5082
|
-
Ge(d)("following output to ", { totalCount:
|
|
5082
|
+
Ge(d)("following output to ", { totalCount: T }, gt.DEBUG), v(S);
|
|
5083
5083
|
}) : m = Mt(e, () => {
|
|
5084
|
-
Ge(d)("following output to ", { totalCount:
|
|
5084
|
+
Ge(d)("following output to ", { totalCount: T }, gt.DEBUG), v(S), m = null;
|
|
5085
5085
|
});
|
|
5086
5086
|
}
|
|
5087
5087
|
);
|
|
5088
5088
|
function w(S) {
|
|
5089
|
-
const
|
|
5090
|
-
S && !
|
|
5089
|
+
const T = Mt(o, (C) => {
|
|
5090
|
+
S && !C.atBottom && C.notAtBottomBecause === "SIZE_INCREASED" && !m && (Ge(d)("scrolling to bottom due to increased size", {}, gt.DEBUG), v("auto"));
|
|
5091
5091
|
});
|
|
5092
|
-
setTimeout(
|
|
5092
|
+
setTimeout(T, 100);
|
|
5093
5093
|
}
|
|
5094
5094
|
ke(
|
|
5095
5095
|
B(
|
|
5096
|
-
|
|
5097
|
-
pe(([S, ,
|
|
5096
|
+
Ze(fe(g), t, u),
|
|
5097
|
+
pe(([S, , T]) => S && T),
|
|
5098
5098
|
Gt(
|
|
5099
|
-
({ value: S }, [,
|
|
5099
|
+
({ value: S }, [, T]) => ({ refreshed: S === T, value: T }),
|
|
5100
5100
|
{ refreshed: !1, value: 0 }
|
|
5101
5101
|
),
|
|
5102
5102
|
pe(({ refreshed: S }) => S),
|
|
@@ -5107,8 +5107,8 @@ const Ux = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Wx = Ie(
|
|
|
5107
5107
|
}
|
|
5108
5108
|
), ke(x, () => {
|
|
5109
5109
|
w(Ge(g) !== !1);
|
|
5110
|
-
}), ke(
|
|
5111
|
-
S && !
|
|
5110
|
+
}), ke(Ze(fe(g), o), ([S, T]) => {
|
|
5111
|
+
S && !T.atBottom && T.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && v("auto");
|
|
5112
5112
|
});
|
|
5113
5113
|
const y = V(null), E = Re();
|
|
5114
5114
|
return le(
|
|
@@ -5116,8 +5116,8 @@ const Ux = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Wx = Ie(
|
|
|
5116
5116
|
B(
|
|
5117
5117
|
fe(r),
|
|
5118
5118
|
re((S) => {
|
|
5119
|
-
var
|
|
5120
|
-
return (
|
|
5119
|
+
var T;
|
|
5120
|
+
return (T = S == null ? void 0 : S.length) != null ? T : 0;
|
|
5121
5121
|
})
|
|
5122
5122
|
),
|
|
5123
5123
|
B(fe(t))
|
|
@@ -5125,9 +5125,9 @@ const Ux = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Wx = Ie(
|
|
|
5125
5125
|
E
|
|
5126
5126
|
), ke(
|
|
5127
5127
|
B(
|
|
5128
|
-
|
|
5128
|
+
Ze(B(E, Rn(1)), c),
|
|
5129
5129
|
Se(fe(y), a, h, p),
|
|
5130
|
-
re(([[S,
|
|
5130
|
+
re(([[S, T], C, I, N, j]) => T && I && (C == null ? void 0 : C({ context: j, totalCount: S, scrollingInProgress: N }))),
|
|
5131
5131
|
pe((S) => !!S),
|
|
5132
5132
|
en(0)
|
|
5133
5133
|
),
|
|
@@ -5215,7 +5215,7 @@ const Ux = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Wx = Ie(
|
|
|
5215
5215
|
),
|
|
5216
5216
|
t
|
|
5217
5217
|
), ke(
|
|
5218
|
-
B(
|
|
5218
|
+
B(Ze(t, e, n), Se(r)),
|
|
5219
5219
|
([[o, s, i], a]) => {
|
|
5220
5220
|
o && a && a.change && a.change(s, i);
|
|
5221
5221
|
}
|
|
@@ -5227,7 +5227,7 @@ const Ux = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Wx = Ie(
|
|
|
5227
5227
|
const n = Re(), r = Re(), o = Re(), s = V(!1), i = V(void 0);
|
|
5228
5228
|
return le(
|
|
5229
5229
|
B(
|
|
5230
|
-
|
|
5230
|
+
Ze(n, r),
|
|
5231
5231
|
re(([{ scrollHeight: a, scrollTop: c, viewportHeight: u }, { offsetTop: d }]) => ({
|
|
5232
5232
|
scrollHeight: a,
|
|
5233
5233
|
scrollTop: Math.max(0, c - d),
|
|
@@ -5321,10 +5321,10 @@ const Xx = mu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5321
5321
|
c,
|
|
5322
5322
|
Se(i),
|
|
5323
5323
|
Gt(
|
|
5324
|
-
([, v, w, y], [{ bottom: E, items: S, offsetBottom:
|
|
5325
|
-
const N = E +
|
|
5326
|
-
let
|
|
5327
|
-
return w ===
|
|
5324
|
+
([, v, w, y], [{ bottom: E, items: S, offsetBottom: T, totalCount: C }, I]) => {
|
|
5325
|
+
const N = E + T;
|
|
5326
|
+
let j = 0;
|
|
5327
|
+
return w === C && v.length > 0 && S.length > 0 && (S[0].originalIndex === 0 && v[0].originalIndex === 0 || (j = N - y, j !== 0 && (j += I))), [j, S, C, N];
|
|
5328
5328
|
},
|
|
5329
5329
|
[0, [], 0, 0]
|
|
5330
5330
|
),
|
|
@@ -5341,7 +5341,7 @@ const Xx = mu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5341
5341
|
y && Xx() ? ye(e, w - v) : m(-v);
|
|
5342
5342
|
}), ke(
|
|
5343
5343
|
B(
|
|
5344
|
-
|
|
5344
|
+
Ze(ut(s, !1), e, g),
|
|
5345
5345
|
pe(([v, w, y]) => !v && !y && w !== 0),
|
|
5346
5346
|
re(([v, w]) => w),
|
|
5347
5347
|
en(1)
|
|
@@ -5358,21 +5358,21 @@ const Xx = mu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5358
5358
|
u,
|
|
5359
5359
|
Se(p, d),
|
|
5360
5360
|
re(([v, { groupIndices: w, lastSize: y, sizeTree: E }, S]) => {
|
|
5361
|
-
function C
|
|
5362
|
-
return
|
|
5361
|
+
function T(C) {
|
|
5362
|
+
return C * (y + S);
|
|
5363
5363
|
}
|
|
5364
5364
|
if (w.length === 0)
|
|
5365
|
-
return
|
|
5365
|
+
return T(v);
|
|
5366
5366
|
{
|
|
5367
|
-
let
|
|
5367
|
+
let C = 0;
|
|
5368
5368
|
const I = yr(E, 0);
|
|
5369
|
-
let N = 0,
|
|
5369
|
+
let N = 0, j = 0;
|
|
5370
5370
|
for (; N < v; ) {
|
|
5371
|
-
N++,
|
|
5372
|
-
let M = w.length ===
|
|
5373
|
-
N + M > v && (
|
|
5371
|
+
N++, C += I;
|
|
5372
|
+
let M = w.length === j + 1 ? 1 / 0 : w[j + 1] - w[j] - 1;
|
|
5373
|
+
N + M > v && (C -= I, M = v - N + 1), N += M, C += T(M), j++;
|
|
5374
5374
|
}
|
|
5375
|
-
return
|
|
5375
|
+
return C;
|
|
5376
5376
|
}
|
|
5377
5377
|
})
|
|
5378
5378
|
),
|
|
@@ -5447,14 +5447,14 @@ const Xx = mu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5447
5447
|
v,
|
|
5448
5448
|
{ listState: w, topItemsIndexes: y, ...E },
|
|
5449
5449
|
{ scrollToIndex: S },
|
|
5450
|
-
|
|
5451
|
-
{ topItemCount:
|
|
5450
|
+
T,
|
|
5451
|
+
{ topItemCount: C },
|
|
5452
5452
|
{ groupCounts: I },
|
|
5453
5453
|
N
|
|
5454
5454
|
]) => (le(E.rangeChanged, N.scrollSeekRangeChanged), le(
|
|
5455
5455
|
B(
|
|
5456
5456
|
N.windowViewportRect,
|
|
5457
|
-
re((
|
|
5457
|
+
re((j) => j.visibleHeight)
|
|
5458
5458
|
),
|
|
5459
5459
|
x.viewportHeight
|
|
5460
5460
|
), {
|
|
@@ -5468,7 +5468,7 @@ const Xx = mu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5468
5468
|
initialTopMostItemIndex: b,
|
|
5469
5469
|
scrolledToInitialItem: g,
|
|
5470
5470
|
sizeRanges: a,
|
|
5471
|
-
topItemCount:
|
|
5471
|
+
topItemCount: C,
|
|
5472
5472
|
topItemsIndexes: y,
|
|
5473
5473
|
// input
|
|
5474
5474
|
totalCount: d,
|
|
@@ -5538,20 +5538,20 @@ function xu(e, t, n) {
|
|
|
5538
5538
|
return i.reduce((v, w) => (v[w] = mx(m[t.events[w]]), v), {});
|
|
5539
5539
|
}
|
|
5540
5540
|
const h = K.forwardRef((m, v) => {
|
|
5541
|
-
const { children: w, ...y } = m, [E] = K.useState(() => Vo(xx(e), (
|
|
5542
|
-
c(
|
|
5541
|
+
const { children: w, ...y } = m, [E] = K.useState(() => Vo(xx(e), (C) => {
|
|
5542
|
+
c(C, y);
|
|
5543
5543
|
})), [S] = K.useState(gl(d, E));
|
|
5544
5544
|
Vr(() => {
|
|
5545
|
-
for (const
|
|
5546
|
-
|
|
5545
|
+
for (const C of i)
|
|
5546
|
+
C in y && ke(S[C], y[C]);
|
|
5547
5547
|
return () => {
|
|
5548
5548
|
Object.values(S).map(Hi);
|
|
5549
5549
|
};
|
|
5550
5550
|
}, [y, S, E]), Vr(() => {
|
|
5551
5551
|
c(E, y);
|
|
5552
5552
|
}), K.useImperativeHandle(v, ml(u(E)));
|
|
5553
|
-
const
|
|
5554
|
-
return /* @__PURE__ */ l.jsx(a.Provider, { value: E, children: n ? /* @__PURE__ */ l.jsx(
|
|
5553
|
+
const T = n;
|
|
5554
|
+
return /* @__PURE__ */ l.jsx(a.Provider, { value: E, children: n ? /* @__PURE__ */ l.jsx(T, { ...Qx([...r, ...o, ...i], y), children: w }) : w });
|
|
5555
5555
|
}), p = (m) => {
|
|
5556
5556
|
const v = K.useContext(a);
|
|
5557
5557
|
return K.useCallback(
|
|
@@ -5697,10 +5697,10 @@ const tv = /* @__PURE__ */ Ie(() => {
|
|
|
5697
5697
|
x,
|
|
5698
5698
|
ve("skipAnimationFrameInResizeObserver")
|
|
5699
5699
|
), [v, w] = K.useState(0);
|
|
5700
|
-
Xi("deviation", (
|
|
5701
|
-
v !==
|
|
5700
|
+
Xi("deviation", (A) => {
|
|
5701
|
+
v !== A && w(A);
|
|
5702
5702
|
});
|
|
5703
|
-
const y = ve("EmptyPlaceholder"), E = ve("ScrollSeekPlaceholder") || rv, S = ve("ListComponent"),
|
|
5703
|
+
const y = ve("EmptyPlaceholder"), E = ve("ScrollSeekPlaceholder") || rv, S = ve("ListComponent"), T = ve("ItemComponent"), C = ve("GroupComponent"), I = ve("computeItemKey"), N = ve("isSeeking"), j = ve("groupIndices").length > 0, M = ve("alignToBottom"), W = ve("initialItemFinalLocationReached"), G = e ? {} : {
|
|
5704
5704
|
boxSizing: "border-box",
|
|
5705
5705
|
...x ? {
|
|
5706
5706
|
display: "inline-block",
|
|
@@ -5723,42 +5723,42 @@ const tv = /* @__PURE__ */ Ie(() => {
|
|
|
5723
5723
|
"data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
|
|
5724
5724
|
ref: m,
|
|
5725
5725
|
style: G,
|
|
5726
|
-
children: (e ? t.topItems : t.items).map((
|
|
5727
|
-
const H =
|
|
5726
|
+
children: (e ? t.topItems : t.items).map((A) => {
|
|
5727
|
+
const H = A.originalIndex, L = I(H + t.firstItemIndex, A.data, u);
|
|
5728
5728
|
return N ? /* @__PURE__ */ to(
|
|
5729
5729
|
E,
|
|
5730
5730
|
{
|
|
5731
5731
|
...ct(E, u),
|
|
5732
|
-
height:
|
|
5733
|
-
index:
|
|
5732
|
+
height: A.size,
|
|
5733
|
+
index: A.index,
|
|
5734
5734
|
key: L,
|
|
5735
|
-
type:
|
|
5736
|
-
...
|
|
5735
|
+
type: A.type || "item",
|
|
5736
|
+
...A.type === "group" ? {} : { groupIndex: A.groupIndex }
|
|
5737
5737
|
}
|
|
5738
|
-
) :
|
|
5739
|
-
|
|
5738
|
+
) : A.type === "group" ? /* @__PURE__ */ to(
|
|
5739
|
+
C,
|
|
5740
5740
|
{
|
|
5741
|
-
...ct(
|
|
5741
|
+
...ct(C, u),
|
|
5742
5742
|
"data-index": H,
|
|
5743
|
-
"data-item-index":
|
|
5744
|
-
"data-known-size":
|
|
5743
|
+
"data-item-index": A.index,
|
|
5744
|
+
"data-known-size": A.size,
|
|
5745
5745
|
key: L,
|
|
5746
5746
|
style: ov
|
|
5747
5747
|
},
|
|
5748
|
-
d(
|
|
5748
|
+
d(A.index, u)
|
|
5749
5749
|
) : /* @__PURE__ */ to(
|
|
5750
|
-
|
|
5750
|
+
T,
|
|
5751
5751
|
{
|
|
5752
|
-
...ct(
|
|
5753
|
-
...cv(
|
|
5752
|
+
...ct(T, u),
|
|
5753
|
+
...cv(T, A.data),
|
|
5754
5754
|
"data-index": H,
|
|
5755
|
-
"data-item-group-index":
|
|
5756
|
-
"data-item-index":
|
|
5757
|
-
"data-known-size":
|
|
5755
|
+
"data-item-group-index": A.groupIndex,
|
|
5756
|
+
"data-item-index": A.index,
|
|
5757
|
+
"data-known-size": A.size,
|
|
5758
5758
|
key: L,
|
|
5759
5759
|
style: x ? sv : Su
|
|
5760
5760
|
},
|
|
5761
|
-
|
|
5761
|
+
j ? c(A.index, A.groupIndex, A.data, u) : c(A.index, A.data, u)
|
|
5762
5762
|
);
|
|
5763
5763
|
})
|
|
5764
5764
|
}
|
|
@@ -6043,7 +6043,7 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6043
6043
|
{ customScrollParent: m, useWindowScroll: v, windowScrollContainerState: w, windowScrollTo: y, windowViewportRect: E },
|
|
6044
6044
|
S
|
|
6045
6045
|
]) => {
|
|
6046
|
-
const
|
|
6046
|
+
const T = V(0), C = V(0), I = V(Nl), N = V({ height: 0, width: 0 }), j = V({ height: 0, width: 0 }), M = Re(), W = Re(), G = V(0), A = V(null), H = V({ column: 0, row: 0 }), L = Re(), q = Re(), O = V(!1), _ = V(0), z = V(!0), X = V(!1), oe = V(!1);
|
|
6047
6047
|
ke(
|
|
6048
6048
|
B(
|
|
6049
6049
|
g,
|
|
@@ -6055,7 +6055,7 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6055
6055
|
}
|
|
6056
6056
|
), ke(
|
|
6057
6057
|
B(
|
|
6058
|
-
|
|
6058
|
+
Ze(g, z, j, N, _, X),
|
|
6059
6059
|
pe(([P, Z, ne, ae, , se]) => P && !Z && ne.height !== 0 && ae.height !== 0 && !se)
|
|
6060
6060
|
),
|
|
6061
6061
|
([, , , , P]) => {
|
|
@@ -6071,7 +6071,7 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6071
6071
|
pe((P) => P != null && P.scrollTop > 0),
|
|
6072
6072
|
Wt(0)
|
|
6073
6073
|
),
|
|
6074
|
-
|
|
6074
|
+
C
|
|
6075
6075
|
), ke(
|
|
6076
6076
|
B(
|
|
6077
6077
|
g,
|
|
@@ -6079,7 +6079,7 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6079
6079
|
pe(([, P]) => P != null)
|
|
6080
6080
|
),
|
|
6081
6081
|
([, P]) => {
|
|
6082
|
-
P && (ye(N, P.viewport), ye(
|
|
6082
|
+
P && (ye(N, P.viewport), ye(j, P.item), ye(H, P.gap), P.scrollTop > 0 && (ye(O, !0), Mt(B(u, Rn(1)), (Z) => {
|
|
6083
6083
|
ye(O, !1);
|
|
6084
6084
|
}), ye(c, { top: P.scrollTop })));
|
|
6085
6085
|
}
|
|
@@ -6091,9 +6091,9 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6091
6091
|
h
|
|
6092
6092
|
), le(
|
|
6093
6093
|
B(
|
|
6094
|
-
|
|
6094
|
+
Ze(
|
|
6095
6095
|
fe(N, Gr),
|
|
6096
|
-
fe(
|
|
6096
|
+
fe(j, Gr),
|
|
6097
6097
|
fe(H, (P, Z) => P && P.column === Z.column && P.row === Z.row),
|
|
6098
6098
|
fe(u)
|
|
6099
6099
|
),
|
|
@@ -6107,14 +6107,14 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6107
6107
|
L
|
|
6108
6108
|
), le(
|
|
6109
6109
|
B(
|
|
6110
|
-
|
|
6111
|
-
fe(
|
|
6110
|
+
Ze(
|
|
6111
|
+
fe(T),
|
|
6112
6112
|
r,
|
|
6113
6113
|
fe(H, Cv),
|
|
6114
|
-
fe(
|
|
6114
|
+
fe(j, Gr),
|
|
6115
6115
|
fe(N, Gr),
|
|
6116
|
-
fe(
|
|
6117
|
-
fe(
|
|
6116
|
+
fe(A),
|
|
6117
|
+
fe(C),
|
|
6118
6118
|
fe(O),
|
|
6119
6119
|
fe(z),
|
|
6120
6120
|
fe(_)
|
|
@@ -6133,32 +6133,32 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6133
6133
|
ue,
|
|
6134
6134
|
Pe
|
|
6135
6135
|
]) => {
|
|
6136
|
-
const { column: xe, row: $ } = ae, { height: ie, width: Fe } = se, { width:
|
|
6137
|
-
if (Oe === 0 && (P === 0 ||
|
|
6136
|
+
const { column: xe, row: $ } = ae, { height: ie, width: Fe } = se, { width: tt } = je;
|
|
6137
|
+
if (Oe === 0 && (P === 0 || tt === 0))
|
|
6138
6138
|
return Nl;
|
|
6139
6139
|
if (Fe === 0) {
|
|
6140
6140
|
const kt = Vi(Pe, P), xn = kt + Math.max(Oe - 1, 0);
|
|
6141
6141
|
return Sv(kl(kt, xn, Le));
|
|
6142
6142
|
}
|
|
6143
|
-
const
|
|
6144
|
-
let
|
|
6145
|
-
ue ? Z === 0 && ne === 0 && Oe > 0 ? (
|
|
6146
|
-
const At = kl(
|
|
6147
|
-
return { bottom: Ye, itemHeight: ie, items: At, itemWidth: Fe, offsetBottom:
|
|
6143
|
+
const rt = Ru(tt, Fe, xe);
|
|
6144
|
+
let st, Qe;
|
|
6145
|
+
ue ? Z === 0 && ne === 0 && Oe > 0 ? (st = 0, Qe = Oe - 1) : (st = rt * Eo((Z + $) / (ie + $)), Qe = rt * jl((ne + $) / (ie + $)) - 1, Qe = Os(P - 1, gr(Qe, rt - 1)), st = Os(Qe, gr(0, st))) : (st = 0, Qe = -1);
|
|
6146
|
+
const At = kl(st, Qe, Le), { bottom: Ye, top: it } = Pl(je, ae, se, At), We = jl(P / rt), at = We * ie + (We - 1) * $ - Ye;
|
|
6147
|
+
return { bottom: Ye, itemHeight: ie, items: At, itemWidth: Fe, offsetBottom: at, offsetTop: it, top: it };
|
|
6148
6148
|
}
|
|
6149
6149
|
)
|
|
6150
6150
|
),
|
|
6151
6151
|
I
|
|
6152
6152
|
), le(
|
|
6153
6153
|
B(
|
|
6154
|
-
|
|
6154
|
+
A,
|
|
6155
6155
|
pe((P) => P !== null),
|
|
6156
6156
|
re((P) => P.length)
|
|
6157
6157
|
),
|
|
6158
|
-
|
|
6158
|
+
T
|
|
6159
6159
|
), le(
|
|
6160
6160
|
B(
|
|
6161
|
-
|
|
6161
|
+
Ze(N, j, I, H),
|
|
6162
6162
|
pe(([P, Z, { items: ne }]) => ne.length > 0 && Z.height !== 0 && P.height !== 0),
|
|
6163
6163
|
re(([P, Z, { items: ne }, ae]) => {
|
|
6164
6164
|
const { bottom: se, top: je } = Pl(P, ae, Z, ne);
|
|
@@ -6179,7 +6179,7 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6179
6179
|
);
|
|
6180
6180
|
const ee = wt(
|
|
6181
6181
|
B(
|
|
6182
|
-
|
|
6182
|
+
Ze(I, T),
|
|
6183
6183
|
pe(([{ items: P }]) => P.length > 0),
|
|
6184
6184
|
Se(F),
|
|
6185
6185
|
pe(([[P, Z], ne]) => {
|
|
@@ -6212,7 +6212,7 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6212
6212
|
le(be, b.scrollSeekRangeChanged), le(
|
|
6213
6213
|
B(
|
|
6214
6214
|
M,
|
|
6215
|
-
Se(N,
|
|
6215
|
+
Se(N, j, T, H),
|
|
6216
6216
|
re(([P, Z, ne, ae, se]) => {
|
|
6217
6217
|
const je = lu(P), { align: Le, behavior: Oe, offset: ue } = je;
|
|
6218
6218
|
let Pe = je.index;
|
|
@@ -6239,14 +6239,14 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6239
6239
|
), {
|
|
6240
6240
|
customScrollParent: m,
|
|
6241
6241
|
// input
|
|
6242
|
-
data:
|
|
6242
|
+
data: A,
|
|
6243
6243
|
deviation: G,
|
|
6244
6244
|
footerHeight: o,
|
|
6245
6245
|
gap: H,
|
|
6246
6246
|
headerHeight: s,
|
|
6247
6247
|
increaseViewportBy: e,
|
|
6248
|
-
initialItemCount:
|
|
6249
|
-
itemDimensions:
|
|
6248
|
+
initialItemCount: C,
|
|
6249
|
+
itemDimensions: j,
|
|
6250
6250
|
overscan: n,
|
|
6251
6251
|
restoreStateFrom: q,
|
|
6252
6252
|
scrollBy: i,
|
|
@@ -6256,7 +6256,7 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6256
6256
|
scrollToIndex: M,
|
|
6257
6257
|
scrollTop: u,
|
|
6258
6258
|
smoothScrollTargetReached: d,
|
|
6259
|
-
totalCount:
|
|
6259
|
+
totalCount: T,
|
|
6260
6260
|
useWindowScroll: v,
|
|
6261
6261
|
viewportDimensions: N,
|
|
6262
6262
|
windowScrollContainerState: w,
|
|
@@ -6567,8 +6567,8 @@ function Lv(...e) {
|
|
|
6567
6567
|
};
|
|
6568
6568
|
return n.scopeName = t.scopeName, n;
|
|
6569
6569
|
}
|
|
6570
|
-
var
|
|
6571
|
-
}, Fv = f[" useInsertionEffect ".trim().toString()] ||
|
|
6570
|
+
var nt = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
|
|
6571
|
+
}, Fv = f[" useInsertionEffect ".trim().toString()] || nt;
|
|
6572
6572
|
function cn({
|
|
6573
6573
|
prop: e,
|
|
6574
6574
|
defaultProp: t,
|
|
@@ -6694,13 +6694,13 @@ function Uv(e) {
|
|
|
6694
6694
|
return f.useEffect(() => {
|
|
6695
6695
|
const u = Kr(r.current);
|
|
6696
6696
|
s.current = a === "mounted" ? u : "none";
|
|
6697
|
-
}, [a]),
|
|
6697
|
+
}, [a]), nt(() => {
|
|
6698
6698
|
const u = r.current, d = o.current;
|
|
6699
6699
|
if (d !== e) {
|
|
6700
6700
|
const p = s.current, b = Kr(u);
|
|
6701
6701
|
e ? c("MOUNT") : b === "none" || (u == null ? void 0 : u.display) === "none" ? c("UNMOUNT") : c(d && p !== b ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
6702
6702
|
}
|
|
6703
|
-
}, [e, c]),
|
|
6703
|
+
}, [e, c]), nt(() => {
|
|
6704
6704
|
if (t) {
|
|
6705
6705
|
let u;
|
|
6706
6706
|
const d = t.ownerDocument.defaultView ?? window, h = (b) => {
|
|
@@ -6738,7 +6738,7 @@ var Vv = f[" useId ".trim().toString()] || (() => {
|
|
|
6738
6738
|
}), Gv = 0;
|
|
6739
6739
|
function Dt(e) {
|
|
6740
6740
|
const [t, n] = f.useState(Vv());
|
|
6741
|
-
return
|
|
6741
|
+
return nt(() => {
|
|
6742
6742
|
n((r) => r ?? String(Gv++));
|
|
6743
6743
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
6744
6744
|
}
|
|
@@ -6811,7 +6811,7 @@ var Xv = f.forwardRef((e, t) => {
|
|
|
6811
6811
|
return f.useEffect(() => {
|
|
6812
6812
|
const w = requestAnimationFrame(() => m.current = !1);
|
|
6813
6813
|
return () => cancelAnimationFrame(w);
|
|
6814
|
-
}, []),
|
|
6814
|
+
}, []), nt(() => {
|
|
6815
6815
|
const w = u.current;
|
|
6816
6816
|
if (w) {
|
|
6817
6817
|
v.current = v.current || {
|
|
@@ -7191,7 +7191,7 @@ function na() {
|
|
|
7191
7191
|
dismiss: (n) => vr({ type: "DISMISS_TOAST", toastId: n })
|
|
7192
7192
|
};
|
|
7193
7193
|
}
|
|
7194
|
-
function
|
|
7194
|
+
function ot(e) {
|
|
7195
7195
|
const t = f.useRef(e);
|
|
7196
7196
|
return f.useEffect(() => {
|
|
7197
7197
|
t.current = e;
|
|
@@ -7201,7 +7201,7 @@ function rt(e) {
|
|
|
7201
7201
|
}, []);
|
|
7202
7202
|
}
|
|
7203
7203
|
function fb(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
7204
|
-
const n =
|
|
7204
|
+
const n = ot(e);
|
|
7205
7205
|
f.useEffect(() => {
|
|
7206
7206
|
const r = (o) => {
|
|
7207
7207
|
o.key === "Escape" && n(o);
|
|
@@ -7223,15 +7223,15 @@ var hb = "DismissableLayer", mi = "dismissableLayer.update", pb = "dismissableLa
|
|
|
7223
7223
|
onInteractOutside: i,
|
|
7224
7224
|
onDismiss: a,
|
|
7225
7225
|
...c
|
|
7226
|
-
} = e, u = f.useContext(Mu), [d, h] = f.useState(null), p = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, b] = f.useState({}), g = Ce(t, (
|
|
7227
|
-
const I =
|
|
7228
|
-
!E || N || (o == null || o(
|
|
7229
|
-
}, p),
|
|
7230
|
-
const I =
|
|
7231
|
-
[...u.branches].some((
|
|
7226
|
+
} = e, u = f.useContext(Mu), [d, h] = f.useState(null), p = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, b] = f.useState({}), g = Ce(t, (C) => h(C)), x = Array.from(u.layers), [m] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), v = x.indexOf(m), w = d ? x.indexOf(d) : -1, y = u.layersWithOutsidePointerEventsDisabled.size > 0, E = w >= v, S = vb((C) => {
|
|
7227
|
+
const I = C.target, N = [...u.branches].some((j) => j.contains(I));
|
|
7228
|
+
!E || N || (o == null || o(C), i == null || i(C), C.defaultPrevented || a == null || a());
|
|
7229
|
+
}, p), T = bb((C) => {
|
|
7230
|
+
const I = C.target;
|
|
7231
|
+
[...u.branches].some((j) => j.contains(I)) || (s == null || s(C), i == null || i(C), C.defaultPrevented || a == null || a());
|
|
7232
7232
|
}, p);
|
|
7233
|
-
return fb((
|
|
7234
|
-
w === u.layers.size - 1 && (r == null || r(
|
|
7233
|
+
return fb((C) => {
|
|
7234
|
+
w === u.layers.size - 1 && (r == null || r(C), !C.defaultPrevented && a && (C.preventDefault(), a()));
|
|
7235
7235
|
}, p), f.useEffect(() => {
|
|
7236
7236
|
if (d)
|
|
7237
7237
|
return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && ($l = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(d)), u.layers.add(d), zl(), () => {
|
|
@@ -7240,8 +7240,8 @@ var hb = "DismissableLayer", mi = "dismissableLayer.update", pb = "dismissableLa
|
|
|
7240
7240
|
}, [d, p, n, u]), f.useEffect(() => () => {
|
|
7241
7241
|
d && (u.layers.delete(d), u.layersWithOutsidePointerEventsDisabled.delete(d), zl());
|
|
7242
7242
|
}, [d, u]), f.useEffect(() => {
|
|
7243
|
-
const
|
|
7244
|
-
return document.addEventListener(mi,
|
|
7243
|
+
const C = () => b({});
|
|
7244
|
+
return document.addEventListener(mi, C), () => document.removeEventListener(mi, C);
|
|
7245
7245
|
}, []), /* @__PURE__ */ l.jsx(
|
|
7246
7246
|
me.div,
|
|
7247
7247
|
{
|
|
@@ -7251,8 +7251,8 @@ var hb = "DismissableLayer", mi = "dismissableLayer.update", pb = "dismissableLa
|
|
|
7251
7251
|
pointerEvents: y ? E ? "auto" : "none" : void 0,
|
|
7252
7252
|
...e.style
|
|
7253
7253
|
},
|
|
7254
|
-
onFocusCapture: Q(e.onFocusCapture,
|
|
7255
|
-
onBlurCapture: Q(e.onBlurCapture,
|
|
7254
|
+
onFocusCapture: Q(e.onFocusCapture, T.onFocusCapture),
|
|
7255
|
+
onBlurCapture: Q(e.onBlurCapture, T.onBlurCapture),
|
|
7256
7256
|
onPointerDownCapture: Q(
|
|
7257
7257
|
e.onPointerDownCapture,
|
|
7258
7258
|
S.onPointerDownCapture
|
|
@@ -7274,7 +7274,7 @@ var gb = "DismissableLayerBranch", xb = f.forwardRef((e, t) => {
|
|
|
7274
7274
|
});
|
|
7275
7275
|
xb.displayName = gb;
|
|
7276
7276
|
function vb(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
7277
|
-
const n =
|
|
7277
|
+
const n = ot(e), r = f.useRef(!1), o = f.useRef(() => {
|
|
7278
7278
|
});
|
|
7279
7279
|
return f.useEffect(() => {
|
|
7280
7280
|
const s = (a) => {
|
|
@@ -7304,7 +7304,7 @@ function vb(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
7304
7304
|
};
|
|
7305
7305
|
}
|
|
7306
7306
|
function bb(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
7307
|
-
const n =
|
|
7307
|
+
const n = ot(e), r = f.useRef(!1);
|
|
7308
7308
|
return f.useEffect(() => {
|
|
7309
7309
|
const o = (s) => {
|
|
7310
7310
|
s.target && !r.current && Du(mb, n, { originalEvent: s }, {
|
|
@@ -7332,7 +7332,7 @@ var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", Ul
|
|
|
7332
7332
|
onMountAutoFocus: o,
|
|
7333
7333
|
onUnmountAutoFocus: s,
|
|
7334
7334
|
...i
|
|
7335
|
-
} = e, [a, c] = f.useState(null), u =
|
|
7335
|
+
} = e, [a, c] = f.useState(null), u = ot(o), d = ot(s), h = f.useRef(null), p = Ce(t, (x) => c(x)), b = f.useRef({
|
|
7336
7336
|
paused: !1,
|
|
7337
7337
|
pause() {
|
|
7338
7338
|
this.paused = !0;
|
|
@@ -7457,7 +7457,7 @@ function Eb(e) {
|
|
|
7457
7457
|
var Ib = "Portal", Zo = f.forwardRef((e, t) => {
|
|
7458
7458
|
var a;
|
|
7459
7459
|
const { container: n, ...r } = e, [o, s] = f.useState(!1);
|
|
7460
|
-
|
|
7460
|
+
nt(() => s(!0), []);
|
|
7461
7461
|
const i = n || o && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
|
|
7462
7462
|
return i ? yc.createPortal(/* @__PURE__ */ l.jsx(me.div, { ...r, ref: t }), i) : null;
|
|
7463
7463
|
});
|
|
@@ -7624,12 +7624,12 @@ var Hu = Db(), zs = function() {
|
|
|
7624
7624
|
onScrollCapture: zs,
|
|
7625
7625
|
onWheelCapture: zs,
|
|
7626
7626
|
onTouchMoveCapture: zs
|
|
7627
|
-
}), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, h = e.shards, p = e.sideCar, b = e.noRelative, g = e.noIsolation, x = e.inert, m = e.allowPinchZoom, v = e.as, w = v === void 0 ? "div" : v, y = e.gapMode, E = Fu(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = p,
|
|
7627
|
+
}), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, h = e.shards, p = e.sideCar, b = e.noRelative, g = e.noIsolation, x = e.inert, m = e.allowPinchZoom, v = e.as, w = v === void 0 ? "div" : v, y = e.gapMode, E = Fu(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = p, T = _b([n, t]), C = Vt(Vt({}, E), o);
|
|
7628
7628
|
return f.createElement(
|
|
7629
7629
|
f.Fragment,
|
|
7630
7630
|
null,
|
|
7631
7631
|
d && f.createElement(S, { sideCar: Hu, removeScrollBar: u, shards: h, noRelative: b, noIsolation: g, inert: x, setCallbacks: s, allowPinchZoom: !!m, lockRef: n, gapMode: y }),
|
|
7632
|
-
i ? f.cloneElement(f.Children.only(a), Vt(Vt({},
|
|
7632
|
+
i ? f.cloneElement(f.Children.only(a), Vt(Vt({}, C), { ref: T })) : f.createElement(w, Vt({}, C, { className: c, ref: T }), a)
|
|
7633
7633
|
);
|
|
7634
7634
|
});
|
|
7635
7635
|
Qo.defaultProps = {
|
|
@@ -7875,13 +7875,13 @@ function aw(e) {
|
|
|
7875
7875
|
var a = f.useCallback(function(x, m) {
|
|
7876
7876
|
if ("touches" in x && x.touches.length === 2 || x.type === "wheel" && x.ctrlKey)
|
|
7877
7877
|
return !i.current.allowPinchZoom;
|
|
7878
|
-
var v = Jr(x), w = n.current, y = "deltaX" in x ? x.deltaX : w[0] - v[0], E = "deltaY" in x ? x.deltaY : w[1] - v[1], S,
|
|
7879
|
-
if ("touches" in x &&
|
|
7878
|
+
var v = Jr(x), w = n.current, y = "deltaX" in x ? x.deltaX : w[0] - v[0], E = "deltaY" in x ? x.deltaY : w[1] - v[1], S, T = x.target, C = Math.abs(y) > Math.abs(E) ? "h" : "v";
|
|
7879
|
+
if ("touches" in x && C === "h" && T.type === "range")
|
|
7880
7880
|
return !1;
|
|
7881
|
-
var I = Xl(
|
|
7881
|
+
var I = Xl(C, T);
|
|
7882
7882
|
if (!I)
|
|
7883
7883
|
return !0;
|
|
7884
|
-
if (I ? S =
|
|
7884
|
+
if (I ? S = C : (S = C === "v" ? "h" : "v", I = Xl(C, T)), !I)
|
|
7885
7885
|
return !1;
|
|
7886
7886
|
if (!r.current && "changedTouches" in x && (y || E) && (r.current = S), !S)
|
|
7887
7887
|
return !0;
|
|
@@ -8438,7 +8438,7 @@ const Nw = K.memo(function({
|
|
|
8438
8438
|
message: t,
|
|
8439
8439
|
messageIndex: n,
|
|
8440
8440
|
isStreamingMessage: r = !1,
|
|
8441
|
-
streamingDebounceMs: o =
|
|
8441
|
+
streamingDebounceMs: o = 500,
|
|
8442
8442
|
isEditing: s = !1,
|
|
8443
8443
|
showActions: i = !0,
|
|
8444
8444
|
showTimestamp: a = !0,
|
|
@@ -8454,9 +8454,9 @@ const Nw = K.memo(function({
|
|
|
8454
8454
|
onCancelEdit: v,
|
|
8455
8455
|
onCopy: w
|
|
8456
8456
|
}) {
|
|
8457
|
-
const [y, E] = de(!1), [S,
|
|
8457
|
+
const [y, E] = de(!1), [S, T] = de(!1), [C, I] = de(!1), [N, j] = de(!1), { currentThreadId: M } = Fi();
|
|
8458
8458
|
na();
|
|
8459
|
-
const [W, G] = de({}), [
|
|
8459
|
+
const [W, G] = de({}), [A, H] = de(!1), [L, q] = de(null), O = u === "phone" || u === "half-screen", _ = t.role, z = _ === "tool", X = K.useMemo(() => {
|
|
8460
8460
|
switch (_) {
|
|
8461
8461
|
case "user":
|
|
8462
8462
|
return "text-[hsl(var(--chat-bubble-user-text))]";
|
|
@@ -8553,7 +8553,7 @@ const Nw = K.memo(function({
|
|
|
8553
8553
|
const xe = t.content.find((Fe) => Fe.type === "tool_result"), $ = (xe == null ? void 0 : xe.output) ?? zn(t.content), ie = gd($);
|
|
8554
8554
|
if (ie) return /* @__PURE__ */ l.jsx(Fw, { issues: ie });
|
|
8555
8555
|
}
|
|
8556
|
-
if (z && !
|
|
8556
|
+
if (z && !C) {
|
|
8557
8557
|
const xe = zn(t.content).slice(0, 80).replace(/\s+/g, " ");
|
|
8558
8558
|
return /* @__PURE__ */ l.jsx("div", { className: D("text-xs font-mono opacity-70 flex items-center justify-between gap-2 text-current", O && "text-[10px]"), children: /* @__PURE__ */ l.jsxs("span", { className: "truncate max-w-full text-current", children: [
|
|
8559
8559
|
xe,
|
|
@@ -8562,7 +8562,7 @@ const Nw = K.memo(function({
|
|
|
8562
8562
|
}
|
|
8563
8563
|
if (z && d) {
|
|
8564
8564
|
const xe = zn(t.content), $ = xe.length > h;
|
|
8565
|
-
return /* @__PURE__ */ l.jsx(Ml, { open: S, onOpenChange:
|
|
8565
|
+
return /* @__PURE__ */ l.jsx(Ml, { open: S, onOpenChange: T, children: /* @__PURE__ */ l.jsxs("div", { className: "font-mono text-sm text-current", children: [
|
|
8566
8566
|
/* @__PURE__ */ l.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: $ && !S ? xe.substring(0, h) + "..." : xe }),
|
|
8567
8567
|
$ && /* @__PURE__ */ l.jsx(Dl, { asChild: !0, children: /* @__PURE__ */ l.jsx(Ne, { variant: "ghost", size: "sm", className: "h-6 text-xs text-current", children: S ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
8568
8568
|
/* @__PURE__ */ l.jsx(fr, { className: "h-3 w-3 mr-1" }),
|
|
@@ -8575,7 +8575,7 @@ const Nw = K.memo(function({
|
|
|
8575
8575
|
] }) }) })
|
|
8576
8576
|
] }) });
|
|
8577
8577
|
}
|
|
8578
|
-
if (z &&
|
|
8578
|
+
if (z && C && !d) {
|
|
8579
8579
|
const xe = Bw(t.content);
|
|
8580
8580
|
if (xe && Aw(xe))
|
|
8581
8581
|
return /* @__PURE__ */ l.jsx(qr, { content: xe.trim() });
|
|
@@ -8596,7 +8596,7 @@ const Nw = K.memo(function({
|
|
|
8596
8596
|
if (_ === "user" && p) {
|
|
8597
8597
|
const $ = oe.trim();
|
|
8598
8598
|
if ($.length > b)
|
|
8599
|
-
return /* @__PURE__ */ l.jsxs(Ml, { open: N, onOpenChange:
|
|
8599
|
+
return /* @__PURE__ */ l.jsxs(Ml, { open: N, onOpenChange: j, children: [
|
|
8600
8600
|
/* @__PURE__ */ l.jsx("div", { className: D("text-sm text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: N ? /* @__PURE__ */ l.jsx(qr, { content: $ }) : /* @__PURE__ */ l.jsxs("pre", { className: D("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: [
|
|
8601
8601
|
$.substring(0, b),
|
|
8602
8602
|
"..."
|
|
@@ -8660,7 +8660,7 @@ const Nw = K.memo(function({
|
|
|
8660
8660
|
onClick: () => I((ue) => !ue),
|
|
8661
8661
|
children: [
|
|
8662
8662
|
/* @__PURE__ */ l.jsx("span", { children: F.name }),
|
|
8663
|
-
/* @__PURE__ */ l.jsx("span", { className: "inline-flex items-center", children:
|
|
8663
|
+
/* @__PURE__ */ l.jsx("span", { className: "inline-flex items-center", children: C ? /* @__PURE__ */ l.jsx(fr, { className: "h-3 w-3" }) : /* @__PURE__ */ l.jsx(Un, { className: "h-3 w-3" }) })
|
|
8664
8664
|
]
|
|
8665
8665
|
}
|
|
8666
8666
|
),
|
|
@@ -8673,7 +8673,7 @@ const Nw = K.memo(function({
|
|
|
8673
8673
|
onClick: () => I((ue) => !ue),
|
|
8674
8674
|
children: /* @__PURE__ */ l.jsxs("span", { className: "text-xs flex items-center gap-1", children: [
|
|
8675
8675
|
"Tool Output ",
|
|
8676
|
-
|
|
8676
|
+
C ? /* @__PURE__ */ l.jsx(fr, { className: "h-3 w-3" }) : /* @__PURE__ */ l.jsx(Un, { className: "h-3 w-3" })
|
|
8677
8677
|
] })
|
|
8678
8678
|
}
|
|
8679
8679
|
)
|
|
@@ -8735,7 +8735,7 @@ const Nw = K.memo(function({
|
|
|
8735
8735
|
}
|
|
8736
8736
|
),
|
|
8737
8737
|
/* @__PURE__ */ l.jsx("div", { className: "relative", children: Le() }),
|
|
8738
|
-
z &&
|
|
8738
|
+
z && C && (F.toolCallId || F.name) && /* @__PURE__ */ l.jsxs("div", { className: D("mt-2 pt-2 border-t border-current/10 text-xs opacity-60", O && "text-xs"), children: [
|
|
8739
8739
|
F.name && /* @__PURE__ */ l.jsxs("div", { children: [
|
|
8740
8740
|
"Function: ",
|
|
8741
8741
|
F.name
|
|
@@ -8791,7 +8791,7 @@ const Nw = K.memo(function({
|
|
|
8791
8791
|
L && /* @__PURE__ */ l.jsx(
|
|
8792
8792
|
Ew,
|
|
8793
8793
|
{
|
|
8794
|
-
isOpen:
|
|
8794
|
+
isOpen: A,
|
|
8795
8795
|
onClose: () => {
|
|
8796
8796
|
H(!1), q(null);
|
|
8797
8797
|
},
|
|
@@ -8801,7 +8801,7 @@ const Nw = K.memo(function({
|
|
|
8801
8801
|
}
|
|
8802
8802
|
)
|
|
8803
8803
|
] });
|
|
8804
|
-
}, (e, t) => e.message.id === t.message.id && e.message.content === t.message.content);
|
|
8804
|
+
}, (e, t) => t.isStreamingMessage ? !1 : e.message.id === t.message.id && e.message.content === t.message.content && e.isStreamingMessage === t.isStreamingMessage && e.isEditing === t.isEditing);
|
|
8805
8805
|
function jw(e) {
|
|
8806
8806
|
const t = e.filter((n) => n.type === "text").map((n) => n.text).join("");
|
|
8807
8807
|
return t || JSON.stringify(e);
|
|
@@ -8928,14 +8928,19 @@ function Mw(e) {
|
|
|
8928
8928
|
return e.name && e.name.trim() ? e.name : e.model && e.model.includes("/") ? e.model.split("/").pop() || null : e.model || null;
|
|
8929
8929
|
}
|
|
8930
8930
|
function Dw(e, t) {
|
|
8931
|
-
const [n, r] = de(e);
|
|
8931
|
+
const [n, r] = de(e), o = Je(null), s = Je(null);
|
|
8932
8932
|
return Ue(() => {
|
|
8933
8933
|
if (!t) {
|
|
8934
8934
|
r(e);
|
|
8935
8935
|
return;
|
|
8936
8936
|
}
|
|
8937
|
-
|
|
8938
|
-
|
|
8937
|
+
return s.current && clearTimeout(s.current), o.current && cancelAnimationFrame(o.current), s.current = setTimeout(() => {
|
|
8938
|
+
o.current = requestAnimationFrame(() => {
|
|
8939
|
+
r(e);
|
|
8940
|
+
});
|
|
8941
|
+
}, t), () => {
|
|
8942
|
+
s.current && clearTimeout(s.current), o.current && cancelAnimationFrame(o.current);
|
|
8943
|
+
};
|
|
8939
8944
|
}, [e, t]), n;
|
|
8940
8945
|
}
|
|
8941
8946
|
function Lw({ data: e }) {
|
|
@@ -9045,105 +9050,142 @@ function Hw({
|
|
|
9045
9050
|
style: p,
|
|
9046
9051
|
emptyMessage: b
|
|
9047
9052
|
}) {
|
|
9048
|
-
const g =
|
|
9053
|
+
const g = Je(null), x = Je(null), m = Je(!1), v = Je(!0), w = Je(e.length), y = Je(null), E = Je(0);
|
|
9049
9054
|
Ue(() => {
|
|
9050
|
-
const
|
|
9051
|
-
if (!
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
|
|
9055
|
+
const C = g.current;
|
|
9056
|
+
if (!C) return;
|
|
9057
|
+
let I = !1;
|
|
9058
|
+
const N = () => {
|
|
9059
|
+
I || (window.requestAnimationFrame(() => {
|
|
9060
|
+
const j = C.scrollHeight - C.scrollTop - C.clientHeight;
|
|
9061
|
+
v.current = j <= 32, I = !1;
|
|
9062
|
+
}), I = !0);
|
|
9055
9063
|
};
|
|
9056
|
-
return
|
|
9057
|
-
|
|
9064
|
+
return C.addEventListener("scroll", N, { passive: !0 }), N(), () => {
|
|
9065
|
+
C.removeEventListener("scroll", N);
|
|
9058
9066
|
};
|
|
9059
|
-
}, [
|
|
9067
|
+
}, []), Ue(() => {
|
|
9060
9068
|
e.length < w.current && (v.current = !0), w.current = e.length;
|
|
9061
9069
|
}, [e.length]), Ue(() => {
|
|
9062
|
-
var
|
|
9063
|
-
m.current
|
|
9064
|
-
|
|
9065
|
-
|
|
9070
|
+
var C;
|
|
9071
|
+
if (!m.current && v.current) {
|
|
9072
|
+
if (t) {
|
|
9073
|
+
if (Date.now() - E.current < 100) return;
|
|
9074
|
+
y.current && cancelAnimationFrame(y.current), y.current = requestAnimationFrame(() => {
|
|
9075
|
+
var j;
|
|
9076
|
+
(j = x.current) == null || j.scrollToIndex({
|
|
9077
|
+
index: Math.max(0, e.length - 1),
|
|
9078
|
+
behavior: "auto",
|
|
9079
|
+
align: "end"
|
|
9080
|
+
}), E.current = Date.now(), y.current = null;
|
|
9081
|
+
});
|
|
9082
|
+
} else
|
|
9083
|
+
(C = x.current) == null || C.scrollToIndex({
|
|
9084
|
+
index: Math.max(0, e.length - 1),
|
|
9085
|
+
behavior: "auto",
|
|
9086
|
+
align: "end"
|
|
9087
|
+
});
|
|
9088
|
+
return () => {
|
|
9089
|
+
y.current && cancelAnimationFrame(y.current);
|
|
9090
|
+
};
|
|
9091
|
+
}
|
|
9092
|
+
}, [e, t]);
|
|
9093
|
+
const S = sn(() => {
|
|
9066
9094
|
if (a)
|
|
9067
9095
|
return async () => {
|
|
9068
9096
|
if (m.current) return;
|
|
9069
|
-
const
|
|
9070
|
-
if (!
|
|
9097
|
+
const C = g.current;
|
|
9098
|
+
if (!C) {
|
|
9071
9099
|
await (a == null ? void 0 : a());
|
|
9072
9100
|
return;
|
|
9073
9101
|
}
|
|
9074
|
-
const
|
|
9102
|
+
const I = C.scrollHeight, N = C.scrollTop;
|
|
9075
9103
|
m.current = !0;
|
|
9076
9104
|
try {
|
|
9077
9105
|
await a();
|
|
9078
9106
|
} finally {
|
|
9079
9107
|
requestAnimationFrame(() => {
|
|
9080
|
-
const
|
|
9081
|
-
if (!
|
|
9108
|
+
const j = g.current;
|
|
9109
|
+
if (!j) {
|
|
9082
9110
|
m.current = !1;
|
|
9083
9111
|
return;
|
|
9084
9112
|
}
|
|
9085
|
-
const
|
|
9086
|
-
|
|
9087
|
-
const
|
|
9088
|
-
v.current =
|
|
9113
|
+
const M = j.scrollHeight;
|
|
9114
|
+
j.scrollTop = N + (M - I);
|
|
9115
|
+
const W = M - j.scrollTop - j.clientHeight;
|
|
9116
|
+
v.current = W <= 32, m.current = !1;
|
|
9089
9117
|
});
|
|
9090
9118
|
}
|
|
9091
9119
|
};
|
|
9092
|
-
}, [a]),
|
|
9093
|
-
g.current =
|
|
9120
|
+
}, [a]), T = (C, I) => {
|
|
9121
|
+
g.current = C, I && (typeof I == "function" ? I(C) : I.current = C);
|
|
9094
9122
|
};
|
|
9095
9123
|
return e.length === 0 ? /* @__PURE__ */ l.jsx("div", { className: h, style: p, children: /* @__PURE__ */ l.jsx("div", { className: "flex items-center justify-center py-8 text-muted-foreground text-center max-w-md mx-auto", children: b || "No messages yet. Start a conversation!" }) }) : /* @__PURE__ */ l.jsx("div", { className: h, style: p, children: /* @__PURE__ */ l.jsx(
|
|
9096
9124
|
bv,
|
|
9097
9125
|
{
|
|
9098
|
-
ref: (
|
|
9099
|
-
x.current =
|
|
9126
|
+
ref: (C) => {
|
|
9127
|
+
x.current = C;
|
|
9100
9128
|
},
|
|
9101
9129
|
data: e,
|
|
9102
|
-
followOutput: "smooth",
|
|
9103
|
-
overscan:
|
|
9104
|
-
increaseViewportBy: { top:
|
|
9130
|
+
followOutput: t ? !1 : "smooth",
|
|
9131
|
+
overscan: { main: 300, reverse: 300 },
|
|
9132
|
+
increaseViewportBy: { top: 600, bottom: 600 },
|
|
9133
|
+
defaultItemHeight: 100,
|
|
9105
9134
|
startReached: () => {
|
|
9106
|
-
|
|
9135
|
+
S && S();
|
|
9107
9136
|
},
|
|
9108
|
-
atBottomStateChange: (
|
|
9109
|
-
v.current =
|
|
9137
|
+
atBottomStateChange: (C) => {
|
|
9138
|
+
v.current = C;
|
|
9110
9139
|
},
|
|
9111
9140
|
style: { height: "100%", overscrollBehavior: "contain" },
|
|
9112
|
-
computeItemKey: (
|
|
9141
|
+
computeItemKey: (C, I) => I.id ?? `message-${C}`,
|
|
9113
9142
|
components: {
|
|
9114
|
-
Scroller: K.forwardRef((
|
|
9143
|
+
Scroller: K.forwardRef((C, I) => /* @__PURE__ */ l.jsx(
|
|
9115
9144
|
"div",
|
|
9116
9145
|
{
|
|
9117
|
-
...
|
|
9118
|
-
ref: (
|
|
9146
|
+
...C,
|
|
9147
|
+
ref: (N) => T(N, I),
|
|
9119
9148
|
style: {
|
|
9120
9149
|
overflowAnchor: "none",
|
|
9121
|
-
willChange: "transform",
|
|
9122
|
-
|
|
9150
|
+
willChange: t ? "scroll-position" : "transform",
|
|
9151
|
+
contain: "layout style paint",
|
|
9152
|
+
...(C == null ? void 0 : C.style) ?? {}
|
|
9123
9153
|
}
|
|
9124
9154
|
}
|
|
9125
9155
|
))
|
|
9126
9156
|
},
|
|
9127
|
-
itemContent: (
|
|
9128
|
-
|
|
9157
|
+
itemContent: (C, I) => /* @__PURE__ */ l.jsx(
|
|
9158
|
+
"div",
|
|
9129
9159
|
{
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9160
|
+
className: "mb-4 last:mb-0",
|
|
9161
|
+
style: {
|
|
9162
|
+
contentVisibility: "auto",
|
|
9163
|
+
containIntrinsicSize: "auto 150px",
|
|
9164
|
+
transform: "translateZ(0)",
|
|
9165
|
+
isolation: "isolate"
|
|
9166
|
+
},
|
|
9167
|
+
children: /* @__PURE__ */ l.jsx(
|
|
9168
|
+
Nw,
|
|
9169
|
+
{
|
|
9170
|
+
message: I,
|
|
9171
|
+
messageIndex: C,
|
|
9172
|
+
isStreamingMessage: t && n === I.id,
|
|
9173
|
+
streamingDebounceMs: r,
|
|
9174
|
+
isEditing: i === I.id,
|
|
9175
|
+
showActions: s,
|
|
9176
|
+
showTimestamp: !1,
|
|
9177
|
+
showAgentName: !0,
|
|
9178
|
+
layoutSize: o,
|
|
9179
|
+
truncateToolMessages: !1,
|
|
9180
|
+
toolMessagePreviewLength: 200,
|
|
9181
|
+
onEdit: c,
|
|
9182
|
+
onRegenerate: () => u(C),
|
|
9183
|
+
onCancelEdit: d
|
|
9184
|
+
},
|
|
9185
|
+
I.id ?? `msg-${I.role}-${C}-${I.createdAt ?? ""}`
|
|
9186
|
+
)
|
|
9187
|
+
}
|
|
9188
|
+
)
|
|
9147
9189
|
}
|
|
9148
9190
|
) });
|
|
9149
9191
|
}
|
|
@@ -9204,8 +9246,8 @@ function la(e) {
|
|
|
9204
9246
|
u.displayName = a;
|
|
9205
9247
|
const d = e + "CollectionItemSlot", h = "data-radix-collection-item", p = qn(d), b = K.forwardRef(
|
|
9206
9248
|
(x, m) => {
|
|
9207
|
-
const { scope: v, children: w, ...y } = x, E = K.useRef(null), S = Ce(m, E),
|
|
9208
|
-
return K.useEffect(() => (
|
|
9249
|
+
const { scope: v, children: w, ...y } = x, E = K.useRef(null), S = Ce(m, E), T = s(d, v);
|
|
9250
|
+
return K.useEffect(() => (T.itemMap.set(E, { ref: E, ...y }), () => void T.itemMap.delete(E))), /* @__PURE__ */ l.jsx(p, { [h]: "", ref: S, children: w });
|
|
9209
9251
|
}
|
|
9210
9252
|
);
|
|
9211
9253
|
b.displayName = d;
|
|
@@ -9216,7 +9258,7 @@ function la(e) {
|
|
|
9216
9258
|
if (!w) return [];
|
|
9217
9259
|
const y = Array.from(w.querySelectorAll(`[${h}]`));
|
|
9218
9260
|
return Array.from(m.itemMap.values()).sort(
|
|
9219
|
-
(
|
|
9261
|
+
(T, C) => y.indexOf(T.ref.current) - y.indexOf(C.ref.current)
|
|
9220
9262
|
);
|
|
9221
9263
|
}, [m.collectionRef, m.itemMap]);
|
|
9222
9264
|
}
|
|
@@ -9512,15 +9554,15 @@ const ry = (e) => ({
|
|
|
9512
9554
|
const h = xd(d), p = {
|
|
9513
9555
|
x: n,
|
|
9514
9556
|
y: r
|
|
9515
|
-
}, b = da(o), g = ua(b), x = await i.getDimensions(u), m = b === "y", v = m ? "top" : "left", w = m ? "bottom" : "right", y = m ? "clientHeight" : "clientWidth", E = s.reference[g] + s.reference[b] - p[b] - s.floating[g], S = p[b] - s.reference[b],
|
|
9516
|
-
let
|
|
9517
|
-
(!
|
|
9518
|
-
const I = E / 2 - S / 2, N =
|
|
9557
|
+
}, b = da(o), g = ua(b), x = await i.getDimensions(u), m = b === "y", v = m ? "top" : "left", w = m ? "bottom" : "right", y = m ? "clientHeight" : "clientWidth", E = s.reference[g] + s.reference[b] - p[b] - s.floating[g], S = p[b] - s.reference[b], T = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
|
|
9558
|
+
let C = T ? T[y] : 0;
|
|
9559
|
+
(!C || !await (i.isElement == null ? void 0 : i.isElement(T))) && (C = a.floating[y] || s.floating[g]);
|
|
9560
|
+
const I = E / 2 - S / 2, N = C / 2 - x[g] / 2 - 1, j = un(h[v], N), M = un(h[w], N), W = j, G = C - x[g] - M, A = C / 2 - x[g] / 2 + I, H = xi(W, A, G), L = !c.arrow && sr(o) != null && A !== H && s.reference[g] / 2 - (A < W ? j : M) - x[g] / 2 < 0, q = L ? A < W ? A - W : A - G : 0;
|
|
9519
9561
|
return {
|
|
9520
9562
|
[b]: p[b] + q,
|
|
9521
9563
|
data: {
|
|
9522
9564
|
[b]: H,
|
|
9523
|
-
centerOffset:
|
|
9565
|
+
centerOffset: A - H - q,
|
|
9524
9566
|
...L && {
|
|
9525
9567
|
alignmentOffset: q
|
|
9526
9568
|
}
|
|
@@ -9552,39 +9594,39 @@ const ry = (e) => ({
|
|
|
9552
9594
|
} = tn(e, t);
|
|
9553
9595
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
9554
9596
|
return {};
|
|
9555
|
-
const v = nn(o), w = Kt(a), y = nn(a) === a, E = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = p || (y || !x ? [Ao(a)] : Xw(a)),
|
|
9556
|
-
!p &&
|
|
9557
|
-
const
|
|
9558
|
-
let
|
|
9597
|
+
const v = nn(o), w = Kt(a), y = nn(a) === a, E = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = p || (y || !x ? [Ao(a)] : Xw(a)), T = g !== "none";
|
|
9598
|
+
!p && T && S.push(...ey(a, x, g, E));
|
|
9599
|
+
const C = [a, ...S], I = await Rr(t, m), N = [];
|
|
9600
|
+
let j = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
9559
9601
|
if (d && N.push(I[v]), h) {
|
|
9560
|
-
const
|
|
9561
|
-
N.push(I[
|
|
9602
|
+
const A = qw(o, i, E);
|
|
9603
|
+
N.push(I[A[0]], I[A[1]]);
|
|
9562
9604
|
}
|
|
9563
|
-
if (
|
|
9605
|
+
if (j = [...j, {
|
|
9564
9606
|
placement: o,
|
|
9565
9607
|
overflows: N
|
|
9566
|
-
}], !N.every((
|
|
9608
|
+
}], !N.every((A) => A <= 0)) {
|
|
9567
9609
|
var M, W;
|
|
9568
|
-
const
|
|
9610
|
+
const A = (((M = s.flip) == null ? void 0 : M.index) || 0) + 1, H = C[A];
|
|
9569
9611
|
if (H && (!(h === "alignment" ? w !== Kt(H) : !1) || // We leave the current main axis only if every placement on that axis
|
|
9570
9612
|
// overflows the main axis.
|
|
9571
|
-
|
|
9613
|
+
j.every((O) => Kt(O.placement) === w ? O.overflows[0] > 0 : !0)))
|
|
9572
9614
|
return {
|
|
9573
9615
|
data: {
|
|
9574
|
-
index:
|
|
9575
|
-
overflows:
|
|
9616
|
+
index: A,
|
|
9617
|
+
overflows: j
|
|
9576
9618
|
},
|
|
9577
9619
|
reset: {
|
|
9578
9620
|
placement: H
|
|
9579
9621
|
}
|
|
9580
9622
|
};
|
|
9581
|
-
let L = (W =
|
|
9623
|
+
let L = (W = j.filter((q) => q.overflows[0] <= 0).sort((q, O) => q.overflows[1] - O.overflows[1])[0]) == null ? void 0 : W.placement;
|
|
9582
9624
|
if (!L)
|
|
9583
9625
|
switch (b) {
|
|
9584
9626
|
case "bestFit": {
|
|
9585
9627
|
var G;
|
|
9586
|
-
const q = (G =
|
|
9587
|
-
if (
|
|
9628
|
+
const q = (G = j.filter((O) => {
|
|
9629
|
+
if (T) {
|
|
9588
9630
|
const _ = Kt(O.placement);
|
|
9589
9631
|
return _ === w || // Create a bias to the `y` side axis due to horizontal
|
|
9590
9632
|
// reading directions favoring greater width.
|
|
@@ -9801,8 +9843,8 @@ const ay = function(e) {
|
|
|
9801
9843
|
}
|
|
9802
9844
|
if (u) {
|
|
9803
9845
|
var v, w;
|
|
9804
|
-
const y = p === "y" ? "width" : "height", E = vd.has(nn(o)), S = s.reference[h] - s.floating[y] + (E && ((v = i.offset) == null ? void 0 : v[h]) || 0) + (E ? 0 : m.crossAxis),
|
|
9805
|
-
g < S ? g = S : g >
|
|
9846
|
+
const y = p === "y" ? "width" : "height", E = vd.has(nn(o)), S = s.reference[h] - s.floating[y] + (E && ((v = i.offset) == null ? void 0 : v[h]) || 0) + (E ? 0 : m.crossAxis), T = s.reference[h] + s.reference[y] + (E ? 0 : ((w = i.offset) == null ? void 0 : w[h]) || 0) - (E ? m.crossAxis : 0);
|
|
9847
|
+
g < S ? g = S : g > T && (g = T);
|
|
9806
9848
|
}
|
|
9807
9849
|
return {
|
|
9808
9850
|
[p]: b,
|
|
@@ -9831,16 +9873,16 @@ const ay = function(e) {
|
|
|
9831
9873
|
} = s.floating;
|
|
9832
9874
|
let m, v;
|
|
9833
9875
|
h === "top" || h === "bottom" ? (m = h, v = p === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (v = h, m = p === "end" ? "top" : "bottom");
|
|
9834
|
-
const w = x - d.top - d.bottom, y = g - d.left - d.right, E = un(x - d[m], w), S = un(g - d[v], y),
|
|
9835
|
-
let
|
|
9836
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (I = y), (r = t.middlewareData.shift) != null && r.enabled.y && (
|
|
9837
|
-
const
|
|
9838
|
-
b ? I = g - 2 * (
|
|
9876
|
+
const w = x - d.top - d.bottom, y = g - d.left - d.right, E = un(x - d[m], w), S = un(g - d[v], y), T = !t.middlewareData.shift;
|
|
9877
|
+
let C = E, I = S;
|
|
9878
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (I = y), (r = t.middlewareData.shift) != null && r.enabled.y && (C = w), T && !p) {
|
|
9879
|
+
const j = vt(d.left, 0), M = vt(d.right, 0), W = vt(d.top, 0), G = vt(d.bottom, 0);
|
|
9880
|
+
b ? I = g - 2 * (j !== 0 || M !== 0 ? j + M : vt(d.left, d.right)) : C = x - 2 * (W !== 0 || G !== 0 ? W + G : vt(d.top, d.bottom));
|
|
9839
9881
|
}
|
|
9840
9882
|
await c({
|
|
9841
9883
|
...t,
|
|
9842
9884
|
availableWidth: I,
|
|
9843
|
-
availableHeight:
|
|
9885
|
+
availableHeight: C
|
|
9844
9886
|
});
|
|
9845
9887
|
const N = await i.getDimensions(a.floating);
|
|
9846
9888
|
return g !== N.width || x !== N.height ? {
|
|
@@ -10278,16 +10320,16 @@ function My(e, t) {
|
|
|
10278
10320
|
threshold: vt(0, un(1, c)) || 1
|
|
10279
10321
|
};
|
|
10280
10322
|
let E = !0;
|
|
10281
|
-
function S(
|
|
10282
|
-
const
|
|
10283
|
-
if (
|
|
10323
|
+
function S(T) {
|
|
10324
|
+
const C = T[0].intersectionRatio;
|
|
10325
|
+
if (C !== c) {
|
|
10284
10326
|
if (!E)
|
|
10285
10327
|
return i();
|
|
10286
|
-
|
|
10328
|
+
C ? i(!1, C) : r = setTimeout(() => {
|
|
10287
10329
|
i(!1, 1e-7);
|
|
10288
10330
|
}, 1e3);
|
|
10289
10331
|
}
|
|
10290
|
-
|
|
10332
|
+
C === 1 && !Ed(u, e.getBoundingClientRect()) && i(), E = !1;
|
|
10291
10333
|
}
|
|
10292
10334
|
try {
|
|
10293
10335
|
n = new IntersectionObserver(S, {
|
|
@@ -10420,18 +10462,18 @@ function Gy(e) {
|
|
|
10420
10462
|
}), [p, b] = f.useState(r);
|
|
10421
10463
|
Po(p, r) || b(r);
|
|
10422
10464
|
const [g, x] = f.useState(null), [m, v] = f.useState(null), w = f.useCallback((O) => {
|
|
10423
|
-
O !==
|
|
10465
|
+
O !== T.current && (T.current = O, x(O));
|
|
10424
10466
|
}, []), y = f.useCallback((O) => {
|
|
10425
|
-
O !==
|
|
10426
|
-
}, []), E = s || g, S = i || m,
|
|
10427
|
-
if (!
|
|
10467
|
+
O !== C.current && (C.current = O, v(O));
|
|
10468
|
+
}, []), E = s || g, S = i || m, T = f.useRef(null), C = f.useRef(null), I = f.useRef(d), N = c != null, j = Ks(c), M = Ks(o), W = Ks(u), G = f.useCallback(() => {
|
|
10469
|
+
if (!T.current || !C.current)
|
|
10428
10470
|
return;
|
|
10429
10471
|
const O = {
|
|
10430
10472
|
placement: t,
|
|
10431
10473
|
strategy: n,
|
|
10432
10474
|
middleware: p
|
|
10433
10475
|
};
|
|
10434
|
-
M.current && (O.platform = M.current), Uy(
|
|
10476
|
+
M.current && (O.platform = M.current), Uy(T.current, C.current, O).then((_) => {
|
|
10435
10477
|
const z = {
|
|
10436
10478
|
..._,
|
|
10437
10479
|
// The floating element's position may be recomputed while it's closed
|
|
@@ -10440,7 +10482,7 @@ function Gy(e) {
|
|
|
10440
10482
|
// setting it to `true` when `open === false` (must be specified).
|
|
10441
10483
|
isPositioned: W.current !== !1
|
|
10442
10484
|
};
|
|
10443
|
-
|
|
10485
|
+
A.current && !Po(I.current, z) && (I.current = z, Fo.flushSync(() => {
|
|
10444
10486
|
h(z);
|
|
10445
10487
|
}));
|
|
10446
10488
|
});
|
|
@@ -10451,19 +10493,19 @@ function Gy(e) {
|
|
|
10451
10493
|
isPositioned: !1
|
|
10452
10494
|
})));
|
|
10453
10495
|
}, [u]);
|
|
10454
|
-
const
|
|
10455
|
-
mo(() => (
|
|
10456
|
-
|
|
10496
|
+
const A = f.useRef(!1);
|
|
10497
|
+
mo(() => (A.current = !0, () => {
|
|
10498
|
+
A.current = !1;
|
|
10457
10499
|
}), []), mo(() => {
|
|
10458
|
-
if (E && (
|
|
10459
|
-
if (
|
|
10460
|
-
return
|
|
10500
|
+
if (E && (T.current = E), S && (C.current = S), E && S) {
|
|
10501
|
+
if (j.current)
|
|
10502
|
+
return j.current(E, S, G);
|
|
10461
10503
|
G();
|
|
10462
10504
|
}
|
|
10463
|
-
}, [E, S, G,
|
|
10505
|
+
}, [E, S, G, j, N]);
|
|
10464
10506
|
const H = f.useMemo(() => ({
|
|
10465
|
-
reference:
|
|
10466
|
-
floating:
|
|
10507
|
+
reference: T,
|
|
10508
|
+
floating: C,
|
|
10467
10509
|
setReference: w,
|
|
10468
10510
|
setFloating: y
|
|
10469
10511
|
}), [w, y]), L = f.useMemo(() => ({
|
|
@@ -10560,7 +10602,7 @@ Nd.displayName = tS;
|
|
|
10560
10602
|
var nS = Nd;
|
|
10561
10603
|
function jd(e) {
|
|
10562
10604
|
const [t, n] = f.useState(void 0);
|
|
10563
|
-
return
|
|
10605
|
+
return nt(() => {
|
|
10564
10606
|
if (e) {
|
|
10565
10607
|
n({ width: e.offsetWidth, height: e.offsetHeight });
|
|
10566
10608
|
const r = new ResizeObserver((o) => {
|
|
@@ -10613,12 +10655,12 @@ var ga = "PopperContent", [oS, sS] = Ad(ga), Md = f.forwardRef(
|
|
|
10613
10655
|
updatePositionStrategy: b = "optimized",
|
|
10614
10656
|
onPlaced: g,
|
|
10615
10657
|
...x
|
|
10616
|
-
} = e, m = kd(ga, n), [v, w] = f.useState(null), y = Ce(t, (je) => w(je)), [E, S] = f.useState(null),
|
|
10617
|
-
padding:
|
|
10658
|
+
} = e, m = kd(ga, n), [v, w] = f.useState(null), y = Ce(t, (je) => w(je)), [E, S] = f.useState(null), T = jd(E), C = (T == null ? void 0 : T.width) ?? 0, I = (T == null ? void 0 : T.height) ?? 0, N = r + (s !== "center" ? "-" + s : ""), j = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, M = Array.isArray(u) ? u : [u], W = M.length > 0, G = {
|
|
10659
|
+
padding: j,
|
|
10618
10660
|
boundary: M.filter(aS),
|
|
10619
10661
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
10620
10662
|
altBoundary: W
|
|
10621
|
-
}, { refs:
|
|
10663
|
+
}, { refs: A, floatingStyles: H, placement: L, isPositioned: q, middlewareData: O } = Gy({
|
|
10622
10664
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
10623
10665
|
strategy: "fixed",
|
|
10624
10666
|
placement: N,
|
|
@@ -10645,20 +10687,20 @@ var ga = "PopperContent", [oS, sS] = Ad(ga), Md = f.forwardRef(
|
|
|
10645
10687
|
}
|
|
10646
10688
|
}),
|
|
10647
10689
|
E && eS({ element: E, padding: a }),
|
|
10648
|
-
lS({ arrowWidth:
|
|
10690
|
+
lS({ arrowWidth: C, arrowHeight: I }),
|
|
10649
10691
|
p && Qy({ strategy: "referenceHidden", ...G })
|
|
10650
10692
|
]
|
|
10651
|
-
}), [_, z] = Fd(L), X =
|
|
10652
|
-
|
|
10693
|
+
}), [_, z] = Fd(L), X = ot(g);
|
|
10694
|
+
nt(() => {
|
|
10653
10695
|
q && (X == null || X());
|
|
10654
10696
|
}, [q, X]);
|
|
10655
10697
|
const oe = (Y = O.arrow) == null ? void 0 : Y.x, F = (P = O.arrow) == null ? void 0 : P.y, ee = ((Z = O.arrow) == null ? void 0 : Z.centerOffset) !== 0, [he, be] = f.useState();
|
|
10656
|
-
return
|
|
10698
|
+
return nt(() => {
|
|
10657
10699
|
v && be(window.getComputedStyle(v).zIndex);
|
|
10658
10700
|
}, [v]), /* @__PURE__ */ l.jsx(
|
|
10659
10701
|
"div",
|
|
10660
10702
|
{
|
|
10661
|
-
ref:
|
|
10703
|
+
ref: A.setFloating,
|
|
10662
10704
|
"data-radix-popper-content-wrapper": "",
|
|
10663
10705
|
style: {
|
|
10664
10706
|
...H,
|
|
@@ -10802,7 +10844,7 @@ var pS = f.forwardRef((e, t) => {
|
|
|
10802
10844
|
defaultProp: a ?? null,
|
|
10803
10845
|
onChange: c,
|
|
10804
10846
|
caller: $r
|
|
10805
|
-
}), [v, w] = f.useState(!1), y =
|
|
10847
|
+
}), [v, w] = f.useState(!1), y = ot(u), E = Bd(n), S = f.useRef(!1), [T, C] = f.useState(0);
|
|
10806
10848
|
return f.useEffect(() => {
|
|
10807
10849
|
const I = p.current;
|
|
10808
10850
|
if (I)
|
|
@@ -10821,17 +10863,17 @@ var pS = f.forwardRef((e, t) => {
|
|
|
10821
10863
|
),
|
|
10822
10864
|
onItemShiftTab: f.useCallback(() => w(!0), []),
|
|
10823
10865
|
onFocusableItemAdd: f.useCallback(
|
|
10824
|
-
() =>
|
|
10866
|
+
() => C((I) => I + 1),
|
|
10825
10867
|
[]
|
|
10826
10868
|
),
|
|
10827
10869
|
onFocusableItemRemove: f.useCallback(
|
|
10828
|
-
() =>
|
|
10870
|
+
() => C((I) => I - 1),
|
|
10829
10871
|
[]
|
|
10830
10872
|
),
|
|
10831
10873
|
children: /* @__PURE__ */ l.jsx(
|
|
10832
10874
|
me.div,
|
|
10833
10875
|
{
|
|
10834
|
-
tabIndex: v ||
|
|
10876
|
+
tabIndex: v || T === 0 ? -1 : 0,
|
|
10835
10877
|
"data-orientation": r,
|
|
10836
10878
|
...h,
|
|
10837
10879
|
ref: b,
|
|
@@ -10842,8 +10884,8 @@ var pS = f.forwardRef((e, t) => {
|
|
|
10842
10884
|
onFocus: Q(e.onFocus, (I) => {
|
|
10843
10885
|
const N = !S.current;
|
|
10844
10886
|
if (I.target === I.currentTarget && N && !v) {
|
|
10845
|
-
const
|
|
10846
|
-
if (I.currentTarget.dispatchEvent(
|
|
10887
|
+
const j = new CustomEvent(Ys, cS);
|
|
10888
|
+
if (I.currentTarget.dispatchEvent(j), !j.defaultPrevented) {
|
|
10847
10889
|
const M = E().filter((L) => L.focusable), W = M.find((L) => L.active), G = M.find((L) => L.id === x), H = [W, G, ...M].filter(
|
|
10848
10890
|
Boolean
|
|
10849
10891
|
).map((L) => L.ref.current);
|
|
@@ -10953,7 +10995,7 @@ var bS = $d, wS = Ud, yi = ["Enter", " "], yS = ["ArrowDown", "PageUp", "Home"],
|
|
|
10953
10995
|
ar,
|
|
10954
10996
|
Hd
|
|
10955
10997
|
]), us = ar(), Kd = Hd(), [IS, _n] = Pn(zr), [NS, Ur] = Pn(zr), Yd = (e) => {
|
|
10956
|
-
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = us(t), [c, u] = f.useState(null), d = f.useRef(!1), h =
|
|
10998
|
+
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = us(t), [c, u] = f.useState(null), d = f.useRef(!1), h = ot(s), p = ss(o);
|
|
10957
10999
|
return f.useEffect(() => {
|
|
10958
11000
|
const b = () => {
|
|
10959
11001
|
d.current = !0, document.addEventListener("pointerdown", g, { capture: !0, once: !0 }), document.addEventListener("pointermove", g, { capture: !0, once: !0 });
|
|
@@ -11056,11 +11098,11 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
|
|
|
11056
11098
|
onDismiss: b,
|
|
11057
11099
|
disableOutsideScroll: g,
|
|
11058
11100
|
...x
|
|
11059
|
-
} = e, m = _n(It, n), v = Ur(It, n), w = us(n), y = Kd(n), E = RS(n), [S,
|
|
11101
|
+
} = e, m = _n(It, n), v = Ur(It, n), w = us(n), y = Kd(n), E = RS(n), [S, T] = f.useState(null), C = f.useRef(null), I = Ce(t, C, m.onContentChange), N = f.useRef(0), j = f.useRef(""), M = f.useRef(0), W = f.useRef(null), G = f.useRef("right"), A = f.useRef(0), H = g ? es : f.Fragment, L = g ? { as: OS, allowPinchZoom: !0 } : void 0, q = (_) => {
|
|
11060
11102
|
var Y, P;
|
|
11061
|
-
const z =
|
|
11103
|
+
const z = j.current + _, X = E().filter((Z) => !Z.disabled), oe = document.activeElement, F = (Y = X.find((Z) => Z.ref.current === oe)) == null ? void 0 : Y.textValue, ee = X.map((Z) => Z.textValue), he = GS(ee, z, F), be = (P = X.find((Z) => Z.textValue === he)) == null ? void 0 : P.ref.current;
|
|
11062
11104
|
(function Z(ne) {
|
|
11063
|
-
|
|
11105
|
+
j.current = ne, window.clearTimeout(N.current), ne !== "" && (N.current = window.setTimeout(() => Z(""), 1e3));
|
|
11064
11106
|
})(z), be && setTimeout(() => be.focus());
|
|
11065
11107
|
};
|
|
11066
11108
|
f.useEffect(() => () => window.clearTimeout(N.current), []), ra();
|
|
@@ -11072,7 +11114,7 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
|
|
|
11072
11114
|
kS,
|
|
11073
11115
|
{
|
|
11074
11116
|
scope: n,
|
|
11075
|
-
searchRef:
|
|
11117
|
+
searchRef: j,
|
|
11076
11118
|
onItemEnter: f.useCallback(
|
|
11077
11119
|
(_) => {
|
|
11078
11120
|
O(_) && _.preventDefault();
|
|
@@ -11082,7 +11124,7 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
|
|
|
11082
11124
|
onItemLeave: f.useCallback(
|
|
11083
11125
|
(_) => {
|
|
11084
11126
|
var z;
|
|
11085
|
-
O(_) || ((z =
|
|
11127
|
+
O(_) || ((z = C.current) == null || z.focus(), T(null));
|
|
11086
11128
|
},
|
|
11087
11129
|
[O]
|
|
11088
11130
|
),
|
|
@@ -11103,7 +11145,7 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
|
|
|
11103
11145
|
trapped: o,
|
|
11104
11146
|
onMountAutoFocus: Q(s, (_) => {
|
|
11105
11147
|
var z;
|
|
11106
|
-
_.preventDefault(), (z =
|
|
11148
|
+
_.preventDefault(), (z = C.current) == null || z.focus({ preventScroll: !0 });
|
|
11107
11149
|
}),
|
|
11108
11150
|
onUnmountAutoFocus: i,
|
|
11109
11151
|
children: /* @__PURE__ */ l.jsx(
|
|
@@ -11125,7 +11167,7 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
|
|
|
11125
11167
|
orientation: "vertical",
|
|
11126
11168
|
loop: r,
|
|
11127
11169
|
currentTabStopId: S,
|
|
11128
|
-
onCurrentTabStopIdChange:
|
|
11170
|
+
onCurrentTabStopIdChange: T,
|
|
11129
11171
|
onEntryFocus: Q(c, (_) => {
|
|
11130
11172
|
v.isUsingKeyboardRef.current || _.preventDefault();
|
|
11131
11173
|
}),
|
|
@@ -11145,22 +11187,22 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
|
|
|
11145
11187
|
onKeyDown: Q(x.onKeyDown, (_) => {
|
|
11146
11188
|
const X = _.target.closest("[data-radix-menu-content]") === _.currentTarget, oe = _.ctrlKey || _.altKey || _.metaKey, F = _.key.length === 1;
|
|
11147
11189
|
X && (_.key === "Tab" && _.preventDefault(), !oe && F && q(_.key));
|
|
11148
|
-
const ee =
|
|
11190
|
+
const ee = C.current;
|
|
11149
11191
|
if (_.target !== ee || !SS.includes(_.key)) return;
|
|
11150
11192
|
_.preventDefault();
|
|
11151
11193
|
const be = E().filter((Y) => !Y.disabled).map((Y) => Y.ref.current);
|
|
11152
11194
|
Vd.includes(_.key) && be.reverse(), WS(be);
|
|
11153
11195
|
}),
|
|
11154
11196
|
onBlur: Q(e.onBlur, (_) => {
|
|
11155
|
-
_.currentTarget.contains(_.target) || (window.clearTimeout(N.current),
|
|
11197
|
+
_.currentTarget.contains(_.target) || (window.clearTimeout(N.current), j.current = "");
|
|
11156
11198
|
}),
|
|
11157
11199
|
onPointerMove: Q(
|
|
11158
11200
|
e.onPointerMove,
|
|
11159
11201
|
Nr((_) => {
|
|
11160
|
-
const z = _.target, X =
|
|
11202
|
+
const z = _.target, X = A.current !== _.clientX;
|
|
11161
11203
|
if (_.currentTarget.contains(z) && X) {
|
|
11162
|
-
const oe = _.clientX >
|
|
11163
|
-
G.current = oe,
|
|
11204
|
+
const oe = _.clientX > A.current ? "right" : "left";
|
|
11205
|
+
G.current = oe, A.current = _.clientX;
|
|
11164
11206
|
}
|
|
11165
11207
|
})
|
|
11166
11208
|
)
|
|
@@ -11289,7 +11331,7 @@ var tf = "MenuRadioGroup", [FS, BS] = Pn(
|
|
|
11289
11331
|
} }
|
|
11290
11332
|
), nf = f.forwardRef(
|
|
11291
11333
|
(e, t) => {
|
|
11292
|
-
const { value: n, onValueChange: r, ...o } = e, s =
|
|
11334
|
+
const { value: n, onValueChange: r, ...o } = e, s = ot(r);
|
|
11293
11335
|
return /* @__PURE__ */ l.jsx(FS, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ l.jsx(Ra, { ...o, ref: t }) });
|
|
11294
11336
|
}
|
|
11295
11337
|
);
|
|
@@ -11805,7 +11847,7 @@ function go({
|
|
|
11805
11847
|
placeholder: t = "Type your message...",
|
|
11806
11848
|
autoFocus: n = !0,
|
|
11807
11849
|
maxHeight: r = void 0,
|
|
11808
|
-
streamingDebounceMs: o =
|
|
11850
|
+
streamingDebounceMs: o = 500,
|
|
11809
11851
|
enableFileUpload: s = !0,
|
|
11810
11852
|
enableExcelUpload: i = !1,
|
|
11811
11853
|
enableMessageEditing: a = !0,
|
|
@@ -11825,12 +11867,12 @@ function go({
|
|
|
11825
11867
|
lastCheckpointId: y,
|
|
11826
11868
|
listCheckpoints: E,
|
|
11827
11869
|
navigateToCheckpoint: S,
|
|
11828
|
-
returnToLatest:
|
|
11829
|
-
hasMoreHistory:
|
|
11870
|
+
returnToLatest: T,
|
|
11871
|
+
hasMoreHistory: C,
|
|
11830
11872
|
isLoadingHistory: I,
|
|
11831
11873
|
loadOlderMessages: N,
|
|
11832
|
-
api:
|
|
11833
|
-
} = Fi(), [M, W] = de(null), [G,
|
|
11874
|
+
api: j
|
|
11875
|
+
} = Fi(), [M, W] = de(null), [G, A] = de(""), [H, L] = de(null), [q, O] = de([]), [_, z] = de(!1), [X, oe] = de(null), [F, ee] = de(null), [he, be] = de(!1), [Y, P] = de(null), [Z, ne] = de([]), [ae, se] = de(null), je = Je(null), Le = Je(null), Oe = Je(null), [ue, Pe] = de("desktop");
|
|
11834
11876
|
Ue(() => {
|
|
11835
11877
|
const J = () => {
|
|
11836
11878
|
const ce = window.innerWidth;
|
|
@@ -11864,23 +11906,23 @@ function go({
|
|
|
11864
11906
|
y && se(y);
|
|
11865
11907
|
}, [y]);
|
|
11866
11908
|
const xe = ze(async () => {
|
|
11867
|
-
if (!(!
|
|
11909
|
+
if (!(!C || I))
|
|
11868
11910
|
try {
|
|
11869
11911
|
await N();
|
|
11870
11912
|
} catch (J) {
|
|
11871
11913
|
console.warn("loadOlderMessages failed", J);
|
|
11872
11914
|
}
|
|
11873
|
-
}, [
|
|
11915
|
+
}, [C, I, N]);
|
|
11874
11916
|
Ue(() => {
|
|
11875
11917
|
(async () => {
|
|
11876
11918
|
try {
|
|
11877
|
-
const ce = await
|
|
11919
|
+
const ce = await j.getAgent("default");
|
|
11878
11920
|
P(ce.uiDefaultMessage || null);
|
|
11879
11921
|
} catch (ce) {
|
|
11880
11922
|
console.warn("Failed to fetch default message:", ce), P(null);
|
|
11881
11923
|
}
|
|
11882
11924
|
})();
|
|
11883
|
-
}, [
|
|
11925
|
+
}, [j]), Ue(() => {
|
|
11884
11926
|
m && !he && (h == null || h(m));
|
|
11885
11927
|
}, [m, he, h]);
|
|
11886
11928
|
const $ = (J) => {
|
|
@@ -11910,19 +11952,19 @@ function go({
|
|
|
11910
11952
|
}
|
|
11911
11953
|
}
|
|
11912
11954
|
try {
|
|
11913
|
-
await v(ce, { checkpointId: ae || y || void 0, payloadExtras: M ? { edit: !0, originalMessageId: M } : void 0, attachments: q }), u == null || u(ce), L(null), O([]), W(null),
|
|
11955
|
+
await v(ce, { checkpointId: ae || y || void 0, payloadExtras: M ? { edit: !0, originalMessageId: M } : void 0, attachments: q }), u == null || u(ce), L(null), O([]), W(null), A("");
|
|
11914
11956
|
} catch (_e) {
|
|
11915
11957
|
const qe = (_e == null ? void 0 : _e.message) || "Failed to send message";
|
|
11916
11958
|
L(qe), h == null || h(qe);
|
|
11917
11959
|
}
|
|
11918
11960
|
}
|
|
11919
|
-
},
|
|
11920
|
-
a && (W(J),
|
|
11921
|
-
}, [a]),
|
|
11922
|
-
W(null),
|
|
11923
|
-
}, []),
|
|
11924
|
-
|
|
11925
|
-
}, [
|
|
11961
|
+
}, tt = K.useCallback((J, ce) => {
|
|
11962
|
+
a && (W(J), A(ce), L(null));
|
|
11963
|
+
}, [a]), rt = K.useCallback(() => {
|
|
11964
|
+
W(null), A(""), L(null);
|
|
11965
|
+
}, []), st = ze((J, ce) => {
|
|
11966
|
+
tt(J, ce);
|
|
11967
|
+
}, [tt]), Qe = ze((J) => {
|
|
11926
11968
|
for (let ce = J - 1; ce >= 0; ce--)
|
|
11927
11969
|
if (b[ce].role === "user") {
|
|
11928
11970
|
const _e = ie(b[ce]);
|
|
@@ -11932,7 +11974,7 @@ function go({
|
|
|
11932
11974
|
}, [b, v, ae, y, ie]), At = (J) => {
|
|
11933
11975
|
const ce = Array.from(J.target.files || []);
|
|
11934
11976
|
O((_e) => [..._e, ...ce]);
|
|
11935
|
-
}, Ye = (J) => O((ce) => ce.filter((_e, qe) => J !== qe)),
|
|
11977
|
+
}, Ye = (J) => O((ce) => ce.filter((_e, qe) => J !== qe)), it = async (J) => {
|
|
11936
11978
|
const ce = (J.target.files || [])[0];
|
|
11937
11979
|
if (ce) {
|
|
11938
11980
|
oe(null), ee(null), z(!0);
|
|
@@ -11954,10 +11996,10 @@ function go({
|
|
|
11954
11996
|
if (!J) return "Unknown";
|
|
11955
11997
|
const ce = Date.parse(J);
|
|
11956
11998
|
return Number.isNaN(ce) ? J : new Date(ce).toLocaleString();
|
|
11957
|
-
},
|
|
11999
|
+
}, at = async (J) => {
|
|
11958
12000
|
if (p) {
|
|
11959
12001
|
if (!J) {
|
|
11960
|
-
await
|
|
12002
|
+
await T(), se(null);
|
|
11961
12003
|
return;
|
|
11962
12004
|
}
|
|
11963
12005
|
await S(J), se(J);
|
|
@@ -11987,7 +12029,7 @@ function go({
|
|
|
11987
12029
|
value: ae ?? "",
|
|
11988
12030
|
onChange: (J) => {
|
|
11989
12031
|
const ce = J.target.value || null;
|
|
11990
|
-
|
|
12032
|
+
at(ce);
|
|
11991
12033
|
},
|
|
11992
12034
|
children: [
|
|
11993
12035
|
/* @__PURE__ */ l.jsx("option", { value: "", children: "Latest" }),
|
|
@@ -12014,9 +12056,9 @@ function go({
|
|
|
12014
12056
|
onStartReached: () => {
|
|
12015
12057
|
xe();
|
|
12016
12058
|
},
|
|
12017
|
-
onEdit:
|
|
12018
|
-
onRegenerate:
|
|
12019
|
-
onCancelEdit:
|
|
12059
|
+
onEdit: st,
|
|
12060
|
+
onRegenerate: Qe,
|
|
12061
|
+
onCancelEdit: rt,
|
|
12020
12062
|
emptyMessage: Y ?? void 0
|
|
12021
12063
|
}
|
|
12022
12064
|
),
|
|
@@ -12031,7 +12073,7 @@ function go({
|
|
|
12031
12073
|
{
|
|
12032
12074
|
variant: "ghost",
|
|
12033
12075
|
size: "sm",
|
|
12034
|
-
onClick:
|
|
12076
|
+
onClick: rt,
|
|
12035
12077
|
className: "text-blue-600 hover:bg-blue-100",
|
|
12036
12078
|
children: /* @__PURE__ */ l.jsx(Wn, { size: 16 })
|
|
12037
12079
|
}
|
|
@@ -12072,7 +12114,7 @@ function go({
|
|
|
12072
12114
|
ref: Le,
|
|
12073
12115
|
type: "file",
|
|
12074
12116
|
accept: ".xls,.xlsx,.xlsm",
|
|
12075
|
-
onChange:
|
|
12117
|
+
onChange: it,
|
|
12076
12118
|
className: "hidden"
|
|
12077
12119
|
}
|
|
12078
12120
|
),
|
|
@@ -12133,7 +12175,7 @@ function go({
|
|
|
12133
12175
|
disabled: !1,
|
|
12134
12176
|
maxLength: po,
|
|
12135
12177
|
onSend: Fe,
|
|
12136
|
-
onCancelEdit:
|
|
12178
|
+
onCancelEdit: rt,
|
|
12137
12179
|
onStop: w,
|
|
12138
12180
|
allowEmptySend: q.length > 0,
|
|
12139
12181
|
textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${M ? "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" : ""} ${c.textarea || ""}`
|
|
@@ -12172,13 +12214,13 @@ var Na = "ScrollArea", [Hf, hR] = $t(Na), [B0, jt] = Hf(Na), $f = f.forwardRef(
|
|
|
12172
12214
|
dir: o,
|
|
12173
12215
|
scrollHideDelay: s = 600,
|
|
12174
12216
|
...i
|
|
12175
|
-
} = e, [a, c] = f.useState(null), [u, d] = f.useState(null), [h, p] = f.useState(null), [b, g] = f.useState(null), [x, m] = f.useState(null), [v, w] = f.useState(0), [y, E] = f.useState(0), [S,
|
|
12217
|
+
} = e, [a, c] = f.useState(null), [u, d] = f.useState(null), [h, p] = f.useState(null), [b, g] = f.useState(null), [x, m] = f.useState(null), [v, w] = f.useState(0), [y, E] = f.useState(0), [S, T] = f.useState(!1), [C, I] = f.useState(!1), N = Ce(t, (M) => c(M)), j = ss(o);
|
|
12176
12218
|
return /* @__PURE__ */ l.jsx(
|
|
12177
12219
|
B0,
|
|
12178
12220
|
{
|
|
12179
12221
|
scope: n,
|
|
12180
12222
|
type: r,
|
|
12181
|
-
dir:
|
|
12223
|
+
dir: j,
|
|
12182
12224
|
scrollHideDelay: s,
|
|
12183
12225
|
scrollArea: a,
|
|
12184
12226
|
viewport: u,
|
|
@@ -12188,17 +12230,17 @@ var Na = "ScrollArea", [Hf, hR] = $t(Na), [B0, jt] = Hf(Na), $f = f.forwardRef(
|
|
|
12188
12230
|
scrollbarX: b,
|
|
12189
12231
|
onScrollbarXChange: g,
|
|
12190
12232
|
scrollbarXEnabled: S,
|
|
12191
|
-
onScrollbarXEnabledChange:
|
|
12233
|
+
onScrollbarXEnabledChange: T,
|
|
12192
12234
|
scrollbarY: x,
|
|
12193
12235
|
onScrollbarYChange: m,
|
|
12194
|
-
scrollbarYEnabled:
|
|
12236
|
+
scrollbarYEnabled: C,
|
|
12195
12237
|
onScrollbarYEnabledChange: I,
|
|
12196
12238
|
onCornerWidthChange: w,
|
|
12197
12239
|
onCornerHeightChange: E,
|
|
12198
12240
|
children: /* @__PURE__ */ l.jsx(
|
|
12199
12241
|
me.div,
|
|
12200
12242
|
{
|
|
12201
|
-
dir:
|
|
12243
|
+
dir: j,
|
|
12202
12244
|
...i,
|
|
12203
12245
|
ref: N,
|
|
12204
12246
|
style: {
|
|
@@ -12494,29 +12536,29 @@ var H0 = f.forwardRef((e, t) => {
|
|
|
12494
12536
|
onWheelScroll: d,
|
|
12495
12537
|
onResize: h,
|
|
12496
12538
|
...p
|
|
12497
|
-
} = e, b = jt(Zt, n), [g, x] = f.useState(null), m = Ce(t, (N) => x(N)), v = f.useRef(null), w = f.useRef(""), y = b.viewport, E = r.content - r.viewport, S =
|
|
12539
|
+
} = e, b = jt(Zt, n), [g, x] = f.useState(null), m = Ce(t, (N) => x(N)), v = f.useRef(null), w = f.useRef(""), y = b.viewport, E = r.content - r.viewport, S = ot(d), T = ot(c), C = ps(h, 10);
|
|
12498
12540
|
function I(N) {
|
|
12499
12541
|
if (v.current) {
|
|
12500
|
-
const
|
|
12501
|
-
u({ x:
|
|
12542
|
+
const j = N.clientX - v.current.left, M = N.clientY - v.current.top;
|
|
12543
|
+
u({ x: j, y: M });
|
|
12502
12544
|
}
|
|
12503
12545
|
}
|
|
12504
12546
|
return f.useEffect(() => {
|
|
12505
|
-
const N = (
|
|
12506
|
-
const M =
|
|
12507
|
-
(g == null ? void 0 : g.contains(M)) && S(
|
|
12547
|
+
const N = (j) => {
|
|
12548
|
+
const M = j.target;
|
|
12549
|
+
(g == null ? void 0 : g.contains(M)) && S(j, E);
|
|
12508
12550
|
};
|
|
12509
12551
|
return document.addEventListener("wheel", N, { passive: !1 }), () => document.removeEventListener("wheel", N, { passive: !1 });
|
|
12510
|
-
}, [y, g, E, S]), f.useEffect(
|
|
12552
|
+
}, [y, g, E, S]), f.useEffect(T, [r, T]), Zn(g, C), Zn(b.content, C), /* @__PURE__ */ l.jsx(
|
|
12511
12553
|
W0,
|
|
12512
12554
|
{
|
|
12513
12555
|
scope: n,
|
|
12514
12556
|
scrollbar: g,
|
|
12515
12557
|
hasThumb: o,
|
|
12516
|
-
onThumbChange:
|
|
12517
|
-
onThumbPointerUp:
|
|
12518
|
-
onThumbPositionChange:
|
|
12519
|
-
onThumbPointerDown:
|
|
12558
|
+
onThumbChange: ot(s),
|
|
12559
|
+
onThumbPointerUp: ot(i),
|
|
12560
|
+
onThumbPositionChange: T,
|
|
12561
|
+
onThumbPointerDown: ot(a),
|
|
12520
12562
|
children: /* @__PURE__ */ l.jsx(
|
|
12521
12563
|
me.div,
|
|
12522
12564
|
{
|
|
@@ -12528,8 +12570,8 @@ var H0 = f.forwardRef((e, t) => {
|
|
|
12528
12570
|
}),
|
|
12529
12571
|
onPointerMove: Q(e.onPointerMove, I),
|
|
12530
12572
|
onPointerUp: Q(e.onPointerUp, (N) => {
|
|
12531
|
-
const
|
|
12532
|
-
|
|
12573
|
+
const j = N.target;
|
|
12574
|
+
j.hasPointerCapture(N.pointerId) && j.releasePointerCapture(N.pointerId), document.body.style.webkitUserSelect = w.current, b.viewport && (b.viewport.style.scrollBehavior = ""), v.current = null;
|
|
12533
12575
|
})
|
|
12534
12576
|
}
|
|
12535
12577
|
)
|
|
@@ -12652,14 +12694,14 @@ var Y0 = (e, t = () => {
|
|
|
12652
12694
|
}(), () => window.cancelAnimationFrame(r);
|
|
12653
12695
|
};
|
|
12654
12696
|
function ps(e, t) {
|
|
12655
|
-
const n =
|
|
12697
|
+
const n = ot(e), r = f.useRef(0);
|
|
12656
12698
|
return f.useEffect(() => () => window.clearTimeout(r.current), []), f.useCallback(() => {
|
|
12657
12699
|
window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
|
|
12658
12700
|
}, [n, t]);
|
|
12659
12701
|
}
|
|
12660
12702
|
function Zn(e, t) {
|
|
12661
|
-
const n =
|
|
12662
|
-
|
|
12703
|
+
const n = ot(t);
|
|
12704
|
+
nt(() => {
|
|
12663
12705
|
let r = 0;
|
|
12664
12706
|
if (e) {
|
|
12665
12707
|
const o = new ResizeObserver(() => {
|
|
@@ -12723,11 +12765,11 @@ function Ti({
|
|
|
12723
12765
|
createThread: x,
|
|
12724
12766
|
deleteThread: m,
|
|
12725
12767
|
renameThread: v
|
|
12726
|
-
} = Fi(), [w, y] = de(p ?? []), [E, S] = de(!1), [
|
|
12768
|
+
} = Fi(), [w, y] = de(p ?? []), [E, S] = de(!1), [T, C] = de(null), [I, N] = de(null), [j, M] = de(""), [W, G] = de(!1);
|
|
12727
12769
|
Ue(() => {
|
|
12728
12770
|
y(p ?? []);
|
|
12729
12771
|
}, [p]);
|
|
12730
|
-
const
|
|
12772
|
+
const A = async (F) => {
|
|
12731
12773
|
try {
|
|
12732
12774
|
await h(F), a == null || a(F), c == null || c(F);
|
|
12733
12775
|
} catch (ee) {
|
|
@@ -12753,9 +12795,9 @@ function Ti({
|
|
|
12753
12795
|
}, q = (F, ee) => {
|
|
12754
12796
|
ee.stopPropagation(), N(F.threadId), M(F.title || `Thread ${F.threadId.slice(0, 8)}`);
|
|
12755
12797
|
}, O = async (F) => {
|
|
12756
|
-
if (
|
|
12798
|
+
if (j.trim())
|
|
12757
12799
|
try {
|
|
12758
|
-
await v(F,
|
|
12800
|
+
await v(F, j.trim()), N(null), M("");
|
|
12759
12801
|
} catch (ee) {
|
|
12760
12802
|
console.error("Failed to update title:", ee);
|
|
12761
12803
|
}
|
|
@@ -12796,12 +12838,12 @@ function Ti({
|
|
|
12796
12838
|
] }) : w.slice().sort((F, ee) => new Date(ee.updatedAt || ee.createdAt || "").getTime() - new Date(F.updatedAt || F.createdAt || "").getTime()).map((F) => /* @__PURE__ */ l.jsxs(
|
|
12797
12839
|
"div",
|
|
12798
12840
|
{
|
|
12799
|
-
onClick: () =>
|
|
12841
|
+
onClick: () => A(F.threadId),
|
|
12800
12842
|
className: `group relative p-3 rounded-lg cursor-pointer transition-colors border ${(i ?? g) === F.threadId ? `${s.activeThread || "bg-slate-600 border-slate-500"} ` : `${s.threadItem || "bg-slate-700 border-slate-600 hover:bg-slate-600 text-gray-900 dark:text-slate-100"}`} ${s.threadItem || ""} text-gray-900 dark:text-slate-100`,
|
|
12801
12843
|
children: [
|
|
12802
12844
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
12803
12845
|
/* @__PURE__ */ l.jsx("div", { className: "flex-1 min-w-0", children: I === F.threadId ? /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2", onClick: (ee) => ee.stopPropagation(), children: [
|
|
12804
|
-
/* @__PURE__ */ l.jsx(jr, { value:
|
|
12846
|
+
/* @__PURE__ */ l.jsx(jr, { value: j, onChange: (ee) => M(ee.target.value), onKeyDown: (ee) => z(ee, F.threadId), className: "h-6 text-sm", autoFocus: !0 }),
|
|
12805
12847
|
/* @__PURE__ */ l.jsx(Ne, { variant: "ghost", size: "sm", onClick: () => O(F.threadId), className: "h-6 w-6 p-0", children: /* @__PURE__ */ l.jsx(Oi, { size: 12 }) }),
|
|
12806
12848
|
/* @__PURE__ */ l.jsx(Ne, { variant: "ghost", size: "sm", onClick: _, className: "h-6 w-6 p-0", children: /* @__PURE__ */ l.jsx(Wn, { size: 12 }) })
|
|
12807
12849
|
] }) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
@@ -13142,15 +13184,15 @@ var Ar = "Tooltip", [hC, xs] = ms(Ar), gh = (e) => {
|
|
|
13142
13184
|
} = e, c = Oa(Ar, e.__scopeTooltip), u = gs(t), [d, h] = f.useState(null), p = Dt(), b = f.useRef(0), g = i ?? c.disableHoverableContent, x = a ?? c.delayDuration, m = f.useRef(!1), [v, w] = cn({
|
|
13143
13185
|
prop: r,
|
|
13144
13186
|
defaultProp: o ?? !1,
|
|
13145
|
-
onChange: (
|
|
13146
|
-
|
|
13187
|
+
onChange: (C) => {
|
|
13188
|
+
C ? (c.onOpen(), document.dispatchEvent(new CustomEvent(Ri))) : c.onClose(), s == null || s(C);
|
|
13147
13189
|
},
|
|
13148
13190
|
caller: Ar
|
|
13149
13191
|
}), y = f.useMemo(() => v ? m.current ? "delayed-open" : "instant-open" : "closed", [v]), E = f.useCallback(() => {
|
|
13150
13192
|
window.clearTimeout(b.current), b.current = 0, m.current = !1, w(!0);
|
|
13151
13193
|
}, [w]), S = f.useCallback(() => {
|
|
13152
13194
|
window.clearTimeout(b.current), b.current = 0, w(!1);
|
|
13153
|
-
}, [w]),
|
|
13195
|
+
}, [w]), T = f.useCallback(() => {
|
|
13154
13196
|
window.clearTimeout(b.current), b.current = window.setTimeout(() => {
|
|
13155
13197
|
m.current = !0, w(!0), b.current = 0;
|
|
13156
13198
|
}, x);
|
|
@@ -13167,8 +13209,8 @@ var Ar = "Tooltip", [hC, xs] = ms(Ar), gh = (e) => {
|
|
|
13167
13209
|
trigger: d,
|
|
13168
13210
|
onTriggerChange: h,
|
|
13169
13211
|
onTriggerEnter: f.useCallback(() => {
|
|
13170
|
-
c.isOpenDelayedRef.current ?
|
|
13171
|
-
}, [c.isOpenDelayedRef,
|
|
13212
|
+
c.isOpenDelayedRef.current ? T() : E();
|
|
13213
|
+
}, [c.isOpenDelayedRef, T, E]),
|
|
13172
13214
|
onTriggerLeave: f.useCallback(() => {
|
|
13173
13215
|
g ? S() : (window.clearTimeout(b.current), b.current = 0);
|
|
13174
13216
|
}, [S, g]),
|
|
@@ -14133,17 +14175,17 @@ var oT = [" ", "Enter", "ArrowUp", "ArrowDown"], sT = [" ", "Enter"], Nn = "Sele
|
|
|
14133
14175
|
disabled: p,
|
|
14134
14176
|
required: b,
|
|
14135
14177
|
form: g
|
|
14136
|
-
} = e, x = Ss(t), [m, v] = f.useState(null), [w, y] = f.useState(null), [E, S] = f.useState(!1),
|
|
14178
|
+
} = e, x = Ss(t), [m, v] = f.useState(null), [w, y] = f.useState(null), [E, S] = f.useState(!1), T = ss(u), [C, I] = cn({
|
|
14137
14179
|
prop: r,
|
|
14138
14180
|
defaultProp: o ?? !1,
|
|
14139
14181
|
onChange: s,
|
|
14140
14182
|
caller: Nn
|
|
14141
|
-
}), [N,
|
|
14183
|
+
}), [N, j] = cn({
|
|
14142
14184
|
prop: i,
|
|
14143
14185
|
defaultProp: a,
|
|
14144
14186
|
onChange: c,
|
|
14145
14187
|
caller: Nn
|
|
14146
|
-
}), M = f.useRef(null), W = m ? g || !!m.closest("form") : !0, [G,
|
|
14188
|
+
}), M = f.useRef(null), W = m ? g || !!m.closest("form") : !0, [G, A] = f.useState(/* @__PURE__ */ new Set()), H = Array.from(G).map((L) => L.props.value).join(";");
|
|
14147
14189
|
return /* @__PURE__ */ l.jsx(xa, { ...x, children: /* @__PURE__ */ l.jsxs(
|
|
14148
14190
|
aT,
|
|
14149
14191
|
{
|
|
@@ -14157,10 +14199,10 @@ var oT = [" ", "Enter", "ArrowUp", "ArrowDown"], sT = [" ", "Enter"], Nn = "Sele
|
|
|
14157
14199
|
onValueNodeHasChildrenChange: S,
|
|
14158
14200
|
contentId: Dt(),
|
|
14159
14201
|
value: N,
|
|
14160
|
-
onValueChange:
|
|
14161
|
-
open:
|
|
14202
|
+
onValueChange: j,
|
|
14203
|
+
open: C,
|
|
14162
14204
|
onOpenChange: I,
|
|
14163
|
-
dir:
|
|
14205
|
+
dir: T,
|
|
14164
14206
|
triggerPointerDownPosRef: M,
|
|
14165
14207
|
disabled: p,
|
|
14166
14208
|
children: [
|
|
@@ -14169,10 +14211,10 @@ var oT = [" ", "Enter", "ArrowUp", "ArrowDown"], sT = [" ", "Enter"], Nn = "Sele
|
|
|
14169
14211
|
{
|
|
14170
14212
|
scope: e.__scopeSelect,
|
|
14171
14213
|
onNativeOptionAdd: f.useCallback((L) => {
|
|
14172
|
-
|
|
14214
|
+
A((q) => new Set(q).add(L));
|
|
14173
14215
|
}, []),
|
|
14174
14216
|
onNativeOptionRemove: f.useCallback((L) => {
|
|
14175
|
-
|
|
14217
|
+
A((q) => {
|
|
14176
14218
|
const O = new Set(q);
|
|
14177
14219
|
return O.delete(L), O;
|
|
14178
14220
|
});
|
|
@@ -14189,7 +14231,7 @@ var oT = [" ", "Enter", "ArrowUp", "ArrowDown"], sT = [" ", "Enter"], Nn = "Sele
|
|
|
14189
14231
|
name: d,
|
|
14190
14232
|
autoComplete: h,
|
|
14191
14233
|
value: N,
|
|
14192
|
-
onChange: (L) =>
|
|
14234
|
+
onChange: (L) => j(L.target.value),
|
|
14193
14235
|
disabled: p,
|
|
14194
14236
|
form: g,
|
|
14195
14237
|
children: [
|
|
@@ -14251,7 +14293,7 @@ Kh.displayName = Gh;
|
|
|
14251
14293
|
var Yh = "SelectValue", qh = f.forwardRef(
|
|
14252
14294
|
(e, t) => {
|
|
14253
14295
|
const { __scopeSelect: n, className: r, style: o, children: s, placeholder: i = "", ...a } = e, c = mn(Yh, n), { onValueNodeHasChildrenChange: u } = c, d = s !== void 0, h = Ce(t, c.onValueNodeChange);
|
|
14254
|
-
return
|
|
14296
|
+
return nt(() => {
|
|
14255
14297
|
u(d);
|
|
14256
14298
|
}, [u, d]), /* @__PURE__ */ l.jsx(
|
|
14257
14299
|
me.span,
|
|
@@ -14277,7 +14319,7 @@ Jh.displayName = dT;
|
|
|
14277
14319
|
var jn = "SelectContent", Zh = f.forwardRef(
|
|
14278
14320
|
(e, t) => {
|
|
14279
14321
|
const n = mn(jn, e.__scopeSelect), [r, o] = f.useState();
|
|
14280
|
-
if (
|
|
14322
|
+
if (nt(() => {
|
|
14281
14323
|
o(new DocumentFragment());
|
|
14282
14324
|
}, []), !n.open) {
|
|
14283
14325
|
const s = r;
|
|
@@ -14312,9 +14354,9 @@ var Ot = 10, [Qh, gn] = lr(jn), fT = "SelectContentImpl", hT = qn("SelectContent
|
|
|
14312
14354
|
avoidCollisions: m,
|
|
14313
14355
|
//
|
|
14314
14356
|
...v
|
|
14315
|
-
} = e, w = mn(jn, n), [y, E] = f.useState(null), [S,
|
|
14357
|
+
} = e, w = mn(jn, n), [y, E] = f.useState(null), [S, T] = f.useState(null), C = Ce(t, (Y) => E(Y)), [I, N] = f.useState(null), [j, M] = f.useState(
|
|
14316
14358
|
null
|
|
14317
|
-
), W = ys(n), [G,
|
|
14359
|
+
), W = ys(n), [G, A] = f.useState(!1), H = f.useRef(!1);
|
|
14318
14360
|
f.useEffect(() => {
|
|
14319
14361
|
if (y) return oa(y);
|
|
14320
14362
|
}, [y]), ra();
|
|
@@ -14388,13 +14430,13 @@ var Ot = 10, [Qh, gn] = lr(jn), fT = "SelectContentImpl", hT = qn("SelectContent
|
|
|
14388
14430
|
scope: n,
|
|
14389
14431
|
content: y,
|
|
14390
14432
|
viewport: S,
|
|
14391
|
-
onViewportChange:
|
|
14433
|
+
onViewportChange: T,
|
|
14392
14434
|
itemRefCallback: oe,
|
|
14393
14435
|
selectedItem: I,
|
|
14394
14436
|
onItemLeave: F,
|
|
14395
14437
|
itemTextRefCallback: ee,
|
|
14396
14438
|
focusSelectedItem: q,
|
|
14397
|
-
selectedItemText:
|
|
14439
|
+
selectedItemText: j,
|
|
14398
14440
|
position: r,
|
|
14399
14441
|
isPositioned: G,
|
|
14400
14442
|
searchRef: z,
|
|
@@ -14429,8 +14471,8 @@ var Ot = 10, [Qh, gn] = lr(jn), fT = "SelectContentImpl", hT = qn("SelectContent
|
|
|
14429
14471
|
onContextMenu: (Y) => Y.preventDefault(),
|
|
14430
14472
|
...v,
|
|
14431
14473
|
...be,
|
|
14432
|
-
onPlaced: () =>
|
|
14433
|
-
ref:
|
|
14474
|
+
onPlaced: () => A(!0),
|
|
14475
|
+
ref: C,
|
|
14434
14476
|
style: {
|
|
14435
14477
|
// flex layout so we can place the scroll buttons properly
|
|
14436
14478
|
display: "flex",
|
|
@@ -14462,11 +14504,11 @@ var Ot = 10, [Qh, gn] = lr(jn), fT = "SelectContentImpl", hT = qn("SelectContent
|
|
|
14462
14504
|
);
|
|
14463
14505
|
ep.displayName = fT;
|
|
14464
14506
|
var pT = "SelectItemAlignedPosition", tp = f.forwardRef((e, t) => {
|
|
14465
|
-
const { __scopeSelect: n, onPlaced: r, ...o } = e, s = mn(jn, n), i = gn(jn, n), [a, c] = f.useState(null), [u, d] = f.useState(null), h = Ce(t, (
|
|
14507
|
+
const { __scopeSelect: n, onPlaced: r, ...o } = e, s = mn(jn, n), i = gn(jn, n), [a, c] = f.useState(null), [u, d] = f.useState(null), h = Ce(t, (C) => d(C)), p = ys(n), b = f.useRef(!1), g = f.useRef(!0), { viewport: x, selectedItem: m, selectedItemText: v, focusSelectedItem: w } = i, y = f.useCallback(() => {
|
|
14466
14508
|
if (s.trigger && s.valueNode && a && u && x && m && v) {
|
|
14467
|
-
const
|
|
14509
|
+
const C = s.trigger.getBoundingClientRect(), I = u.getBoundingClientRect(), N = s.valueNode.getBoundingClientRect(), j = v.getBoundingClientRect();
|
|
14468
14510
|
if (s.dir !== "rtl") {
|
|
14469
|
-
const ae =
|
|
14511
|
+
const ae = j.left - I.left, se = N.left - ae, je = C.left - se, Le = C.width + je, Oe = Math.max(Le, I.width), ue = window.innerWidth - Ot, Pe = Ci(se, [
|
|
14470
14512
|
Ot,
|
|
14471
14513
|
// Prevents the content from going off the starting edge of the
|
|
14472
14514
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -14477,13 +14519,13 @@ var pT = "SelectItemAlignedPosition", tp = f.forwardRef((e, t) => {
|
|
|
14477
14519
|
]);
|
|
14478
14520
|
a.style.minWidth = Le + "px", a.style.left = Pe + "px";
|
|
14479
14521
|
} else {
|
|
14480
|
-
const ae = I.right -
|
|
14522
|
+
const ae = I.right - j.right, se = window.innerWidth - N.right - ae, je = window.innerWidth - C.right - se, Le = C.width + je, Oe = Math.max(Le, I.width), ue = window.innerWidth - Ot, Pe = Ci(se, [
|
|
14481
14523
|
Ot,
|
|
14482
14524
|
Math.max(Ot, ue - Oe)
|
|
14483
14525
|
]);
|
|
14484
14526
|
a.style.minWidth = Le + "px", a.style.right = Pe + "px";
|
|
14485
14527
|
}
|
|
14486
|
-
const M = p(), W = window.innerHeight - Ot * 2, G = x.scrollHeight,
|
|
14528
|
+
const M = p(), W = window.innerHeight - Ot * 2, G = x.scrollHeight, A = window.getComputedStyle(u), H = parseInt(A.borderTopWidth, 10), L = parseInt(A.paddingTop, 10), q = parseInt(A.borderBottomWidth, 10), O = parseInt(A.paddingBottom, 10), _ = H + L + G + O + q, z = Math.min(m.offsetHeight * 5, _), X = window.getComputedStyle(x), oe = parseInt(X.paddingTop, 10), F = parseInt(X.paddingBottom, 10), ee = C.top + C.height / 2 - Ot, he = W - ee, be = m.offsetHeight / 2, Y = m.offsetTop + be, P = H + L + Y, Z = _ - P;
|
|
14487
14529
|
if (P <= ee) {
|
|
14488
14530
|
const ae = M.length > 0 && m === M[M.length - 1].ref.current;
|
|
14489
14531
|
a.style.bottom = "0px";
|
|
@@ -14517,14 +14559,14 @@ var pT = "SelectItemAlignedPosition", tp = f.forwardRef((e, t) => {
|
|
|
14517
14559
|
s.dir,
|
|
14518
14560
|
r
|
|
14519
14561
|
]);
|
|
14520
|
-
|
|
14562
|
+
nt(() => y(), [y]);
|
|
14521
14563
|
const [E, S] = f.useState();
|
|
14522
|
-
|
|
14564
|
+
nt(() => {
|
|
14523
14565
|
u && S(window.getComputedStyle(u).zIndex);
|
|
14524
14566
|
}, [u]);
|
|
14525
|
-
const
|
|
14526
|
-
(
|
|
14527
|
-
|
|
14567
|
+
const T = f.useCallback(
|
|
14568
|
+
(C) => {
|
|
14569
|
+
C && g.current === !0 && (y(), w == null || w(), g.current = !1);
|
|
14528
14570
|
},
|
|
14529
14571
|
[y, w]
|
|
14530
14572
|
);
|
|
@@ -14534,7 +14576,7 @@ var pT = "SelectItemAlignedPosition", tp = f.forwardRef((e, t) => {
|
|
|
14534
14576
|
scope: n,
|
|
14535
14577
|
contentWrapper: a,
|
|
14536
14578
|
shouldExpandOnScrollRef: b,
|
|
14537
|
-
onScrollButtonChange:
|
|
14579
|
+
onScrollButtonChange: T,
|
|
14538
14580
|
children: /* @__PURE__ */ l.jsx(
|
|
14539
14581
|
"div",
|
|
14540
14582
|
{
|
|
@@ -14760,7 +14802,7 @@ var pr = "SelectItemText", lp = f.forwardRef(
|
|
|
14760
14802
|
() => /* @__PURE__ */ l.jsx("option", { value: c.value, disabled: c.disabled, children: b }, c.value),
|
|
14761
14803
|
[c.disabled, c.value, b]
|
|
14762
14804
|
), { onNativeOptionAdd: x, onNativeOptionRemove: m } = u;
|
|
14763
|
-
return
|
|
14805
|
+
return nt(() => (x(g), () => m(g)), [x, m, g]), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
14764
14806
|
/* @__PURE__ */ l.jsx(me.span, { id: c.textId, ...s, ref: p }),
|
|
14765
14807
|
c.isSelected && i.valueNode && !i.valueNodeHasChildren ? Fo.createPortal(s.children, i.valueNode) : null
|
|
14766
14808
|
] });
|
|
@@ -14776,7 +14818,7 @@ var cp = "SelectItemIndicator", up = f.forwardRef(
|
|
|
14776
14818
|
up.displayName = cp;
|
|
14777
14819
|
var ji = "SelectScrollUpButton", dp = f.forwardRef((e, t) => {
|
|
14778
14820
|
const n = gn(ji, e.__scopeSelect), r = Ma(ji, e.__scopeSelect), [o, s] = f.useState(!1), i = Ce(t, r.onScrollButtonChange);
|
|
14779
|
-
return
|
|
14821
|
+
return nt(() => {
|
|
14780
14822
|
if (n.viewport && n.isPositioned) {
|
|
14781
14823
|
let a = function() {
|
|
14782
14824
|
const u = c.scrollTop > 0;
|
|
@@ -14800,7 +14842,7 @@ var ji = "SelectScrollUpButton", dp = f.forwardRef((e, t) => {
|
|
|
14800
14842
|
dp.displayName = ji;
|
|
14801
14843
|
var Ai = "SelectScrollDownButton", fp = f.forwardRef((e, t) => {
|
|
14802
14844
|
const n = gn(Ai, e.__scopeSelect), r = Ma(Ai, e.__scopeSelect), [o, s] = f.useState(!1), i = Ce(t, r.onScrollButtonChange);
|
|
14803
|
-
return
|
|
14845
|
+
return nt(() => {
|
|
14804
14846
|
if (n.viewport && n.isPositioned) {
|
|
14805
14847
|
let a = function() {
|
|
14806
14848
|
const u = c.scrollHeight - c.clientHeight, d = Math.ceil(c.scrollTop) < u;
|
|
@@ -14826,7 +14868,7 @@ var hp = f.forwardRef((e, t) => {
|
|
|
14826
14868
|
const { __scopeSelect: n, onAutoScroll: r, ...o } = e, s = gn("SelectScrollButton", n), i = f.useRef(null), a = ys(n), c = f.useCallback(() => {
|
|
14827
14869
|
i.current !== null && (window.clearInterval(i.current), i.current = null);
|
|
14828
14870
|
}, []);
|
|
14829
|
-
return f.useEffect(() => () => c(), [c]),
|
|
14871
|
+
return f.useEffect(() => () => c(), [c]), nt(() => {
|
|
14830
14872
|
var d;
|
|
14831
14873
|
const u = a().find((h) => h.ref.current === document.activeElement);
|
|
14832
14874
|
(d = u == null ? void 0 : u.ref.current) == null || d.scrollIntoView({ block: "nearest" });
|
|
@@ -14893,7 +14935,7 @@ function gp(e) {
|
|
|
14893
14935
|
return e === "" || e === void 0;
|
|
14894
14936
|
}
|
|
14895
14937
|
function xp(e) {
|
|
14896
|
-
const t =
|
|
14938
|
+
const t = ot(e), n = f.useRef(""), r = f.useRef(0), o = f.useCallback(
|
|
14897
14939
|
(i) => {
|
|
14898
14940
|
const a = n.current + i;
|
|
14899
14941
|
t(a), function c(u) {
|