teodor-new-chat-ui 3.0.73 → 3.0.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +912 -907
- package/dist/index.umd.js +16 -16
- 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 at, 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(T) {
|
|
49
|
+
if (T === null || typeof T != "object")
|
|
50
50
|
return null;
|
|
51
|
-
var U = g &&
|
|
51
|
+
var U = g && T[g] || T[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(T) {
|
|
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", T, te);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
function y(
|
|
62
|
+
function y(T, 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[T], console, Me);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
function k(
|
|
75
|
-
return !!(typeof
|
|
72
|
+
var E = !1, S = !1, C = !1, R = !1, I = !1, N;
|
|
73
|
+
N = Symbol.for("react.module.reference");
|
|
74
|
+
function k(T) {
|
|
75
|
+
return !!(typeof T == "string" || typeof T == "function" || T === r || T === s || I || T === o || T === u || T === d || R || T === b || E || S || C || typeof T == "object" && T !== null && (T.$$typeof === p || T.$$typeof === h || T.$$typeof === i || T.$$typeof === a || T.$$typeof === c || // This needs to include all possible module reference object
|
|
76
76
|
// types supported by any Flight configuration anywhere since
|
|
77
77
|
// we don't know which Flight build this will end up being used
|
|
78
78
|
// with.
|
|
79
|
-
|
|
79
|
+
T.$$typeof === N || T.getModuleId !== void 0));
|
|
80
80
|
}
|
|
81
|
-
function M(
|
|
82
|
-
var ge =
|
|
81
|
+
function M(T, U, te) {
|
|
82
|
+
var ge = T.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(T) {
|
|
89
|
+
return T.displayName || "Context";
|
|
90
90
|
}
|
|
91
|
-
function G(
|
|
92
|
-
if (
|
|
91
|
+
function G(T) {
|
|
92
|
+
if (T == null)
|
|
93
93
|
return null;
|
|
94
|
-
if (typeof
|
|
95
|
-
return
|
|
96
|
-
if (typeof
|
|
97
|
-
return
|
|
98
|
-
switch (
|
|
94
|
+
if (typeof T.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof T == "function")
|
|
95
|
+
return T.displayName || T.name || null;
|
|
96
|
+
if (typeof T == "string")
|
|
97
|
+
return T;
|
|
98
|
+
switch (T) {
|
|
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 T == "object")
|
|
113
|
+
switch (T.$$typeof) {
|
|
114
114
|
case a:
|
|
115
|
-
var U =
|
|
115
|
+
var U = T;
|
|
116
116
|
return W(U) + ".Consumer";
|
|
117
117
|
case i:
|
|
118
|
-
var te =
|
|
118
|
+
var te = T;
|
|
119
119
|
return W(te._context) + ".Provider";
|
|
120
120
|
case c:
|
|
121
|
-
return M(
|
|
121
|
+
return M(T, T.render, "ForwardRef");
|
|
122
122
|
case h:
|
|
123
|
-
var ge =
|
|
124
|
-
return ge !== null ? ge : G(
|
|
123
|
+
var ge = T.displayName || null;
|
|
124
|
+
return ge !== null ? ge : G(T.type) || "Memo";
|
|
125
125
|
case p: {
|
|
126
|
-
var Ae =
|
|
126
|
+
var Ae = T, 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 j = 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 T = {
|
|
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: T,
|
|
152
|
+
log: T,
|
|
153
|
+
warn: T,
|
|
154
|
+
error: T,
|
|
155
|
+
group: T,
|
|
156
|
+
groupCollapsed: T,
|
|
157
|
+
groupEnd: T
|
|
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 T = {
|
|
167
167
|
configurable: !0,
|
|
168
168
|
enumerable: !0,
|
|
169
169
|
writable: !0
|
|
170
170
|
};
|
|
171
171
|
Object.defineProperties(console, {
|
|
172
|
-
log:
|
|
172
|
+
log: j({}, T, {
|
|
173
173
|
value: L
|
|
174
174
|
}),
|
|
175
|
-
info:
|
|
175
|
+
info: j({}, T, {
|
|
176
176
|
value: q
|
|
177
177
|
}),
|
|
178
|
-
warn:
|
|
178
|
+
warn: j({}, T, {
|
|
179
179
|
value: O
|
|
180
180
|
}),
|
|
181
|
-
error:
|
|
181
|
+
error: j({}, T, {
|
|
182
182
|
value: _
|
|
183
183
|
}),
|
|
184
|
-
group:
|
|
184
|
+
group: j({}, T, {
|
|
185
185
|
value: z
|
|
186
186
|
}),
|
|
187
|
-
groupCollapsed:
|
|
187
|
+
groupCollapsed: j({}, T, {
|
|
188
188
|
value: X
|
|
189
189
|
}),
|
|
190
|
-
groupEnd:
|
|
190
|
+
groupEnd: j({}, T, {
|
|
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(T, 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 + T;
|
|
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(T, U) {
|
|
218
|
+
if (!T || Z)
|
|
219
219
|
return "";
|
|
220
220
|
{
|
|
221
|
-
var te = ne.get(
|
|
221
|
+
var te = ne.get(T);
|
|
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(T, [], Ee);
|
|
247
247
|
} else {
|
|
248
248
|
try {
|
|
249
249
|
Ee.call();
|
|
250
250
|
} catch (Qt) {
|
|
251
251
|
ge = Qt;
|
|
252
252
|
}
|
|
253
|
-
|
|
253
|
+
T.call(Ee.prototype);
|
|
254
254
|
}
|
|
255
255
|
} else {
|
|
256
256
|
try {
|
|
@@ -258,22 +258,22 @@ function fm() {
|
|
|
258
258
|
} catch (Qt) {
|
|
259
259
|
ge = Qt;
|
|
260
260
|
}
|
|
261
|
-
|
|
261
|
+
T();
|
|
262
262
|
}
|
|
263
263
|
} catch (Qt) {
|
|
264
264
|
if (Qt && ge && typeof Qt.stack == "string") {
|
|
265
265
|
for (var Te = Qt.stack.split(`
|
|
266
|
-
`),
|
|
267
|
-
`), Ve = Te.length - 1, Xe =
|
|
266
|
+
`), dt = ge.stack.split(`
|
|
267
|
+
`), Ve = Te.length - 1, Xe = dt.length - 1; Ve >= 1 && Xe >= 0 && Te[Ve] !== dt[Xe]; )
|
|
268
268
|
Xe--;
|
|
269
269
|
for (; Ve >= 1 && Xe >= 0; Ve--, Xe--)
|
|
270
|
-
if (Te[Ve] !==
|
|
270
|
+
if (Te[Ve] !== dt[Xe]) {
|
|
271
271
|
if (Ve !== 1 || Xe !== 1)
|
|
272
272
|
do
|
|
273
|
-
if (Ve--, Xe--, Xe < 0 || Te[Ve] !==
|
|
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 T.displayName && St.includes("<anonymous>") && (St = St.replace("<anonymous>", T.displayName)), typeof T == "function" && ne.set(T, 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 = T ? T.displayName || T.name : "", $a = Ln ? P(Ln) : "";
|
|
286
|
+
return typeof T == "function" && ne.set(T, $a), $a;
|
|
287
287
|
}
|
|
288
|
-
function je(
|
|
289
|
-
return se(
|
|
288
|
+
function je(T, U, te) {
|
|
289
|
+
return se(T, !1);
|
|
290
290
|
}
|
|
291
|
-
function Le(
|
|
292
|
-
var U =
|
|
291
|
+
function Le(T) {
|
|
292
|
+
var U = T.prototype;
|
|
293
293
|
return !!(U && U.isReactComponent);
|
|
294
294
|
}
|
|
295
|
-
function Oe(
|
|
296
|
-
if (
|
|
295
|
+
function Oe(T, U, te) {
|
|
296
|
+
if (T == null)
|
|
297
297
|
return "";
|
|
298
|
-
if (typeof
|
|
299
|
-
return se(
|
|
300
|
-
if (typeof
|
|
301
|
-
return P(
|
|
302
|
-
switch (
|
|
298
|
+
if (typeof T == "function")
|
|
299
|
+
return se(T, Le(T));
|
|
300
|
+
if (typeof T == "string")
|
|
301
|
+
return P(T);
|
|
302
|
+
switch (T) {
|
|
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 T == "object")
|
|
309
|
+
switch (T.$$typeof) {
|
|
310
310
|
case c:
|
|
311
|
-
return je(
|
|
311
|
+
return je(T.render);
|
|
312
312
|
case h:
|
|
313
|
-
return Oe(
|
|
313
|
+
return Oe(T.type, U, te);
|
|
314
314
|
case p: {
|
|
315
|
-
var ge =
|
|
315
|
+
var ge = T, 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 $(T) {
|
|
326
|
+
if (T) {
|
|
327
|
+
var U = T._owner, te = Oe(T.type, T._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(T, 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 T)
|
|
336
|
+
if (Me(T, Ee)) {
|
|
337
337
|
var Te = void 0;
|
|
338
338
|
try {
|
|
339
|
-
if (typeof
|
|
340
|
-
var
|
|
341
|
-
throw
|
|
339
|
+
if (typeof T[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 T[Ee] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
341
|
+
throw dt.name = "Invariant Violation", dt;
|
|
342
342
|
}
|
|
343
|
-
Te =
|
|
343
|
+
Te = T[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,28 +349,28 @@ function fm() {
|
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
var Fe = Array.isArray;
|
|
352
|
-
function et(
|
|
353
|
-
return Fe(
|
|
352
|
+
function et(T) {
|
|
353
|
+
return Fe(T);
|
|
354
354
|
}
|
|
355
|
-
function nt(
|
|
355
|
+
function nt(T) {
|
|
356
356
|
{
|
|
357
|
-
var U = typeof Symbol == "function" && Symbol.toStringTag, te = U &&
|
|
357
|
+
var U = typeof Symbol == "function" && Symbol.toStringTag, te = U && T[Symbol.toStringTag] || T.constructor.name || "Object";
|
|
358
358
|
return te;
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
function ot(
|
|
361
|
+
function ot(T) {
|
|
362
362
|
try {
|
|
363
|
-
return Ze(
|
|
363
|
+
return Ze(T), !1;
|
|
364
364
|
} catch {
|
|
365
365
|
return !0;
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
function Ze(
|
|
369
|
-
return "" +
|
|
368
|
+
function Ze(T) {
|
|
369
|
+
return "" + T;
|
|
370
370
|
}
|
|
371
|
-
function At(
|
|
372
|
-
if (ot(
|
|
373
|
-
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nt(
|
|
371
|
+
function At(T) {
|
|
372
|
+
if (ot(T))
|
|
373
|
+
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nt(T)), Ze(T);
|
|
374
374
|
}
|
|
375
375
|
var Ye = v.ReactCurrentOwner, st = {
|
|
376
376
|
key: !0,
|
|
@@ -378,53 +378,53 @@ function fm() {
|
|
|
378
378
|
__self: !0,
|
|
379
379
|
__source: !0
|
|
380
380
|
}, We, it;
|
|
381
|
-
function kt(
|
|
382
|
-
if (ue.call(
|
|
383
|
-
var U = Object.getOwnPropertyDescriptor(
|
|
381
|
+
function kt(T) {
|
|
382
|
+
if (ue.call(T, "ref")) {
|
|
383
|
+
var U = Object.getOwnPropertyDescriptor(T, "ref").get;
|
|
384
384
|
if (U && U.isReactWarning)
|
|
385
385
|
return !1;
|
|
386
386
|
}
|
|
387
|
-
return
|
|
387
|
+
return T.ref !== void 0;
|
|
388
388
|
}
|
|
389
|
-
function xn(
|
|
390
|
-
if (ue.call(
|
|
391
|
-
var U = Object.getOwnPropertyDescriptor(
|
|
389
|
+
function xn(T) {
|
|
390
|
+
if (ue.call(T, "key")) {
|
|
391
|
+
var U = Object.getOwnPropertyDescriptor(T, "key").get;
|
|
392
392
|
if (U && U.isReactWarning)
|
|
393
393
|
return !1;
|
|
394
394
|
}
|
|
395
|
-
return
|
|
395
|
+
return T.key !== void 0;
|
|
396
396
|
}
|
|
397
|
-
function On(
|
|
398
|
-
typeof
|
|
397
|
+
function On(T, U) {
|
|
398
|
+
typeof T.ref == "string" && Ye.current;
|
|
399
399
|
}
|
|
400
|
-
function J(
|
|
400
|
+
function J(T, 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(T, "key", {
|
|
406
406
|
get: te,
|
|
407
407
|
configurable: !0
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
function ce(
|
|
411
|
+
function ce(T, U) {
|
|
412
412
|
{
|
|
413
413
|
var te = function() {
|
|
414
414
|
it || (it = !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(T, "ref", {
|
|
417
417
|
get: te,
|
|
418
418
|
configurable: !0
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
var _e = function(
|
|
422
|
+
var _e = function(T, 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: T,
|
|
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(T, U, te, ge, Ae) {
|
|
452
452
|
{
|
|
453
|
-
var Me, Ee = {}, Te = null,
|
|
454
|
-
te !== void 0 && (At(te), Te = "" + te), xn(U) && (At(U.key), Te = "" + U.key), kt(U) && (
|
|
453
|
+
var Me, Ee = {}, Te = null, dt = null;
|
|
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
456
|
ue.call(U, Me) && !st.hasOwnProperty(Me) && (Ee[Me] = U[Me]);
|
|
457
|
-
if (
|
|
458
|
-
var Ve =
|
|
457
|
+
if (T && T.defaultProps) {
|
|
458
|
+
var Ve = T.defaultProps;
|
|
459
459
|
for (Me in Ve)
|
|
460
460
|
Ee[Me] === void 0 && (Ee[Me] = Ve[Me]);
|
|
461
461
|
}
|
|
462
|
-
if (Te ||
|
|
463
|
-
var Xe = typeof
|
|
464
|
-
Te && J(Ee, Xe),
|
|
462
|
+
if (Te || dt) {
|
|
463
|
+
var Xe = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
|
|
464
|
+
Te && J(Ee, Xe), dt && ce(Ee, Xe);
|
|
465
465
|
}
|
|
466
|
-
return _e(
|
|
466
|
+
return _e(T, 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(T) {
|
|
471
|
+
if (T) {
|
|
472
|
+
var U = T._owner, te = Oe(T.type, T._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(T) {
|
|
480
|
+
return typeof T == "object" && T !== null && T.$$typeof === t;
|
|
481
481
|
}
|
|
482
482
|
function Da() {
|
|
483
483
|
{
|
|
484
484
|
if (Mn.current) {
|
|
485
|
-
var
|
|
486
|
-
if (
|
|
485
|
+
var T = G(Mn.current.type);
|
|
486
|
+
if (T)
|
|
487
487
|
return `
|
|
488
488
|
|
|
489
|
-
Check the render method of \`` +
|
|
489
|
+
Check the render method of \`` + T + "`.";
|
|
490
490
|
}
|
|
491
491
|
return "";
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
function Np(
|
|
494
|
+
function Np(T) {
|
|
495
495
|
return "";
|
|
496
496
|
}
|
|
497
497
|
var La = {};
|
|
498
|
-
function jp(
|
|
498
|
+
function jp(T) {
|
|
499
499
|
{
|
|
500
500
|
var U = Da();
|
|
501
501
|
if (!U) {
|
|
502
|
-
var te = typeof
|
|
502
|
+
var te = typeof T == "string" ? T : T.displayName || T.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(T, U) {
|
|
511
511
|
{
|
|
512
|
-
if (!
|
|
512
|
+
if (!T._store || T._store.validated || T.key != null)
|
|
513
513
|
return;
|
|
514
|
-
|
|
514
|
+
T._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
|
+
T && T._owner && T._owner !== Mn.current && (ge = " It was passed a child from " + G(T._owner.type) + "."), Pt(T), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', te, ge), Pt(null);
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
function Ba(
|
|
523
|
+
function Ba(T, U) {
|
|
524
524
|
{
|
|
525
|
-
if (typeof
|
|
525
|
+
if (typeof T != "object")
|
|
526
526
|
return;
|
|
527
|
-
if (et(
|
|
528
|
-
for (var te = 0; te <
|
|
529
|
-
var ge =
|
|
527
|
+
if (et(T))
|
|
528
|
+
for (var te = 0; te < T.length; te++) {
|
|
529
|
+
var ge = T[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(T))
|
|
533
|
+
T._store && (T._store.validated = !0);
|
|
534
|
+
else if (T) {
|
|
535
|
+
var Ae = m(T);
|
|
536
|
+
if (typeof Ae == "function" && Ae !== T.entries)
|
|
537
|
+
for (var Me = Ae.call(T), 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(T) {
|
|
543
543
|
{
|
|
544
|
-
var U =
|
|
544
|
+
var U = T.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, T.props, "prop", ge, T);
|
|
559
559
|
} else if (U.PropTypes !== void 0 && !Cs) {
|
|
560
560
|
Cs = !0;
|
|
561
561
|
var Ae = G(U);
|
|
@@ -564,30 +564,30 @@ 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(T) {
|
|
568
568
|
{
|
|
569
|
-
for (var U = Object.keys(
|
|
569
|
+
for (var U = Object.keys(T.props), te = 0; te < U.length; te++) {
|
|
570
570
|
var ge = U[te];
|
|
571
571
|
if (ge !== "children" && ge !== "key") {
|
|
572
|
-
Pt(
|
|
572
|
+
Pt(T), 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
|
+
T.ref !== null && (Pt(T), w("Invalid attribute `ref` supplied to `React.Fragment`."), Pt(null));
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
|
-
function Ha(
|
|
579
|
+
function Ha(T, U, te, ge, Ae, Me) {
|
|
580
580
|
{
|
|
581
|
-
var Ee = k(
|
|
581
|
+
var Ee = k(T);
|
|
582
582
|
if (!Ee) {
|
|
583
583
|
var Te = "";
|
|
584
|
-
(
|
|
585
|
-
var
|
|
586
|
-
|
|
584
|
+
(T === void 0 || typeof T == "object" && T !== null && Object.keys(T).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
|
+
var dt = Np();
|
|
586
|
+
dt ? Te += dt : Te += Da();
|
|
587
587
|
var Ve;
|
|
588
|
-
|
|
588
|
+
T === null ? Ve = "null" : et(T) ? Ve = "array" : T !== void 0 && T.$$typeof === t ? (Ve = "<" + (G(T.type) || "Unknown") + " />", Te = " Did you accidentally export a JSX literal instead of a component?") : Ve = typeof T, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Ve, Te);
|
|
589
589
|
}
|
|
590
|
-
var Xe = qe(
|
|
590
|
+
var Xe = qe(T, U, te, Ae, Me);
|
|
591
591
|
if (Xe == null)
|
|
592
592
|
return Xe;
|
|
593
593
|
if (Ee) {
|
|
@@ -596,21 +596,21 @@ Check the top-level render call using <` + te + ">.");
|
|
|
596
596
|
if (ge)
|
|
597
597
|
if (et(St)) {
|
|
598
598
|
for (var Ln = 0; Ln < St.length; Ln++)
|
|
599
|
-
Ba(St[Ln],
|
|
599
|
+
Ba(St[Ln], T);
|
|
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, T);
|
|
605
605
|
}
|
|
606
|
-
return
|
|
606
|
+
return T === r ? kp(Xe) : Ap(Xe), Xe;
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
|
-
function Pp(
|
|
610
|
-
return Ha(
|
|
609
|
+
function Pp(T, U, te) {
|
|
610
|
+
return Ha(T, U, te, !0);
|
|
611
611
|
}
|
|
612
|
-
function _p(
|
|
613
|
-
return Ha(
|
|
612
|
+
function _p(T, U, te) {
|
|
613
|
+
return Ha(T, 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]), A = {
|
|
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
|
+
A.inherits(we, Error, {
|
|
863
863
|
toJSON: function() {
|
|
864
864
|
return {
|
|
865
865
|
// Standard
|
|
@@ -874,7 +874,7 @@ j.inherits(we, Error, {
|
|
|
874
874
|
columnNumber: this.columnNumber,
|
|
875
875
|
stack: this.stack,
|
|
876
876
|
// Axios
|
|
877
|
-
config:
|
|
877
|
+
config: A.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
|
+
A.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 A.isPlainObject(e) || A.isArray(e);
|
|
914
914
|
}
|
|
915
915
|
function Pc(e) {
|
|
916
|
-
return
|
|
916
|
+
return A.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,44 +921,44 @@ function Xa(e, t, n) {
|
|
|
921
921
|
}).join(n ? "." : "") : t;
|
|
922
922
|
}
|
|
923
923
|
function Qm(e) {
|
|
924
|
-
return
|
|
924
|
+
return A.isArray(e) && !e.some(Qs);
|
|
925
925
|
}
|
|
926
|
-
const eg =
|
|
926
|
+
const eg = A.toFlatObject(A, {}, null, function(t) {
|
|
927
927
|
return /^is[A-Z]/.test(t);
|
|
928
928
|
});
|
|
929
929
|
function zo(e, t, n) {
|
|
930
|
-
if (!
|
|
930
|
+
if (!A.isObject(e))
|
|
931
931
|
throw new TypeError("target must be an object");
|
|
932
|
-
t = t || new FormData(), n =
|
|
932
|
+
t = t || new FormData(), n = A.toFlatObject(n, {
|
|
933
933
|
metaTokens: !0,
|
|
934
934
|
dots: !1,
|
|
935
935
|
indexes: !1
|
|
936
936
|
}, !1, function(x, m) {
|
|
937
|
-
return !
|
|
937
|
+
return !A.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) && A.isSpecCompliantForm(t);
|
|
940
|
+
if (!A.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 (A.isDate(g))
|
|
945
945
|
return g.toISOString();
|
|
946
|
-
if (
|
|
946
|
+
if (A.isBoolean(g))
|
|
947
947
|
return g.toString();
|
|
948
|
-
if (!c &&
|
|
948
|
+
if (!c && A.isBlob(g))
|
|
949
949
|
throw new we("Blob is not supported. Use a Buffer instead.");
|
|
950
|
-
return
|
|
950
|
+
return A.isArrayBuffer(g) || A.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 (A.endsWith(x, "{}"))
|
|
956
956
|
x = r ? x : x.slice(0, -2), g = JSON.stringify(g);
|
|
957
|
-
else if (
|
|
958
|
-
return x = Pc(x), v.forEach(function(y,
|
|
959
|
-
!(
|
|
957
|
+
else if (A.isArray(g) && Qm(g) || (A.isFileList(g) || A.endsWith(x, "[]")) && (v = A.toArray(g)))
|
|
958
|
+
return x = Pc(x), v.forEach(function(y, E) {
|
|
959
|
+
!(A.isUndefined(y) || y === null) && t.append(
|
|
960
960
|
// eslint-disable-next-line no-nested-ternary
|
|
961
|
-
i === !0 ? Xa([x],
|
|
961
|
+
i === !0 ? Xa([x], E, s) : i === null ? x : x + "[]",
|
|
962
962
|
u(y)
|
|
963
963
|
);
|
|
964
964
|
}), !1;
|
|
@@ -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 (!A.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), A.forEach(g, function(v, w) {
|
|
978
|
+
(!(A.isUndefined(v) || v === null) && o.call(
|
|
979
979
|
t,
|
|
980
980
|
v,
|
|
981
|
-
|
|
981
|
+
A.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 (!A.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
|
+
A.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 = A.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
|
+
A.forEach(this.handlers, function(r) {
|
|
1089
1089
|
r !== null && t(r);
|
|
1090
1090
|
});
|
|
1091
1091
|
}
|
|
@@ -1110,20 +1110,20 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", lg
|
|
|
1110
1110
|
hasStandardBrowserWebWorkerEnv: ag,
|
|
1111
1111
|
navigator: ei,
|
|
1112
1112
|
origin: lg
|
|
1113
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1113
|
+
}, Symbol.toStringTag, { value: "Module" })), lt = {
|
|
1114
1114
|
...cg,
|
|
1115
1115
|
...sg
|
|
1116
1116
|
};
|
|
1117
1117
|
function ug(e, t) {
|
|
1118
|
-
return zo(e, new
|
|
1118
|
+
return zo(e, new lt.classes.URLSearchParams(), {
|
|
1119
1119
|
visitor: function(n, r, o, s) {
|
|
1120
|
-
return
|
|
1120
|
+
return lt.isNode && A.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 A.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 && A.isArray(o) ? o.length : i, c ? (A.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !a) : ((!o[i] || !A.isObject(o[i])) && (o[i] = []), t(n, r, o[i], s) && A.isArray(o[i]) && (o[i] = fg(o[i])), !a);
|
|
1143
1143
|
}
|
|
1144
|
-
if (
|
|
1144
|
+
if (A.isFormData(e) && A.isFunction(e.entries)) {
|
|
1145
1145
|
const n = {};
|
|
1146
|
-
return
|
|
1146
|
+
return A.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 (A.isString(e))
|
|
1154
1154
|
try {
|
|
1155
|
-
return (t || JSON.parse)(e),
|
|
1155
|
+
return (t || JSON.parse)(e), A.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 = A.isObject(t);
|
|
1167
|
+
if (s && A.isHTMLForm(t) && (t = new FormData(t)), A.isFormData(t))
|
|
1168
1168
|
return o ? JSON.stringify(Dc(t)) : t;
|
|
1169
|
-
if (
|
|
1169
|
+
if (A.isArrayBuffer(t) || A.isBuffer(t) || A.isStream(t) || A.isFile(t) || A.isBlob(t) || A.isReadableStream(t))
|
|
1170
1170
|
return t;
|
|
1171
|
-
if (
|
|
1171
|
+
if (A.isArrayBufferView(t))
|
|
1172
1172
|
return t.buffer;
|
|
1173
|
-
if (
|
|
1173
|
+
if (A.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 = A.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 (A.isResponse(t) || A.isReadableStream(t))
|
|
1193
1193
|
return t;
|
|
1194
|
-
if (t &&
|
|
1194
|
+
if (t && A.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);
|
|
@@ -1212,8 +1212,8 @@ const Mr = {
|
|
|
1212
1212
|
maxContentLength: -1,
|
|
1213
1213
|
maxBodyLength: -1,
|
|
1214
1214
|
env: {
|
|
1215
|
-
FormData:
|
|
1216
|
-
Blob:
|
|
1215
|
+
FormData: lt.classes.FormData,
|
|
1216
|
+
Blob: lt.classes.Blob
|
|
1217
1217
|
},
|
|
1218
1218
|
validateStatus: function(t) {
|
|
1219
1219
|
return t >= 200 && t < 300;
|
|
@@ -1225,10 +1225,10 @@ const Mr = {
|
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
1227
|
};
|
|
1228
|
-
|
|
1228
|
+
A.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1229
1229
|
Mr.headers[e] = {};
|
|
1230
1230
|
});
|
|
1231
|
-
const pg =
|
|
1231
|
+
const pg = A.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 : A.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 (A.isFunction(r))
|
|
1273
1273
|
return r.call(this, t, n);
|
|
1274
|
-
if (o && (t = n), !!
|
|
1275
|
-
if (
|
|
1274
|
+
if (o && (t = n), !!A.isString(t)) {
|
|
1275
|
+
if (A.isString(r))
|
|
1276
1276
|
return t.indexOf(r) !== -1;
|
|
1277
|
-
if (
|
|
1277
|
+
if (A.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 = A.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 = A.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) => A.forEach(a, (u, d) => s(u, d, c));
|
|
1309
|
+
if (A.isPlainObject(t) || t instanceof this.constructor)
|
|
1310
1310
|
i(t, n);
|
|
1311
|
-
else if (
|
|
1311
|
+
else if (A.isString(t) && (t = t.trim()) && !xg(t))
|
|
1312
1312
|
i(mg(t), n);
|
|
1313
|
-
else if (
|
|
1313
|
+
else if (A.isObject(t) && A.isIterable(t)) {
|
|
1314
1314
|
let a = {}, c, u;
|
|
1315
1315
|
for (const d of t) {
|
|
1316
|
-
if (!
|
|
1316
|
+
if (!A.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]) ? A.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 = A.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 (A.isFunction(n))
|
|
1335
1335
|
return n.call(this, o, r);
|
|
1336
|
-
if (
|
|
1336
|
+
if (A.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 = A.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 = A.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 A.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 A.forEach(this, (o, s) => {
|
|
1372
|
+
const i = A.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 A.forEach(this, (r, o) => {
|
|
1387
|
+
r != null && r !== !1 && (n[o] = t && A.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 A.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
|
+
A.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 @@ j.reduceDescriptors(mt.prototype, ({ value: e }, t) => {
|
|
|
1428
1428
|
}
|
|
1429
1429
|
};
|
|
1430
1430
|
});
|
|
1431
|
-
|
|
1431
|
+
A.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 A.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
|
+
A.inherits(nr, we, {
|
|
1446
1446
|
__CANCEL__: !0
|
|
1447
1447
|
});
|
|
1448
1448
|
function Fc(e, t, n) {
|
|
@@ -1513,15 +1513,15 @@ const yo = (e, t, n = 3) => {
|
|
|
1513
1513
|
total: e,
|
|
1514
1514
|
loaded: r
|
|
1515
1515
|
}), t[1]];
|
|
1516
|
-
}, tl = (e) => (...t) =>
|
|
1517
|
-
new URL(
|
|
1518
|
-
|
|
1519
|
-
) : () => !0, Tg =
|
|
1516
|
+
}, tl = (e) => (...t) => A.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
|
+
new URL(lt.origin),
|
|
1518
|
+
lt.navigator && /(msie|trident)/i.test(lt.navigator.userAgent)
|
|
1519
|
+
) : () => !0, Tg = lt.hasStandardBrowserEnv ? (
|
|
1520
1520
|
// Standard browser envs support document.cookie
|
|
1521
1521
|
{
|
|
1522
1522
|
write(e, t, n, r, o, s) {
|
|
1523
1523
|
const i = [e + "=" + encodeURIComponent(t)];
|
|
1524
|
-
|
|
1524
|
+
A.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), A.isString(r) && i.push("path=" + r), A.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 A.isPlainObject(u) && A.isPlainObject(d) ? A.merge.call({ caseless: p }, u, d) : A.isPlainObject(d) ? A.merge({}, d) : A.isArray(d) ? d.slice() : d;
|
|
1562
1562
|
}
|
|
1563
1563
|
function o(u, d, h, p) {
|
|
1564
|
-
if (
|
|
1565
|
-
if (!
|
|
1564
|
+
if (A.isUndefined(d)) {
|
|
1565
|
+
if (!A.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 (!A.isUndefined(d))
|
|
1571
1571
|
return r(void 0, d);
|
|
1572
1572
|
}
|
|
1573
1573
|
function i(u, d) {
|
|
1574
|
-
if (
|
|
1575
|
-
if (!
|
|
1574
|
+
if (A.isUndefined(d)) {
|
|
1575
|
+
if (!A.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 A.forEach(Object.keys({ ...e, ...t }), function(d) {
|
|
1617
1617
|
const h = c[d] || o, p = h(e[d], t[d], d);
|
|
1618
|
-
|
|
1618
|
+
A.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
|
-
),
|
|
1628
|
-
if (
|
|
1627
|
+
), A.isFormData(n)) {
|
|
1628
|
+
if (lt.hasStandardBrowserEnv || lt.hasStandardBrowserWebWorkerEnv)
|
|
1629
1629
|
i.setContentType(void 0);
|
|
1630
|
-
else if (
|
|
1630
|
+
else if (A.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 (
|
|
1637
|
+
if (lt.hasStandardBrowserEnv && (r && A.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,35 +1663,35 @@ 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(R) {
|
|
1667
|
+
n(R), x();
|
|
1668
|
+
}, function(R) {
|
|
1669
|
+
r(R), x();
|
|
1670
1670
|
}, S), m = null;
|
|
1671
1671
|
}
|
|
1672
1672
|
"onloadend" in m ? m.onloadend = v : m.onreadystatechange = function() {
|
|
1673
1673
|
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(v);
|
|
1674
1674
|
}, m.onabort = function() {
|
|
1675
1675
|
m && (r(new we("Request aborted", we.ECONNABORTED, e, m)), m = null);
|
|
1676
|
-
}, m.onerror = function(
|
|
1677
|
-
const S =
|
|
1678
|
-
|
|
1676
|
+
}, m.onerror = function(E) {
|
|
1677
|
+
const S = E && E.message ? E.message : "Network Error", C = new we(S, we.ERR_NETWORK, e, m);
|
|
1678
|
+
C.event = E || null, r(C), m = null;
|
|
1679
1679
|
}, m.ontimeout = function() {
|
|
1680
|
-
let
|
|
1680
|
+
let E = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1681
1681
|
const S = o.transitional || Mc;
|
|
1682
|
-
o.timeoutErrorMessage && (
|
|
1683
|
-
|
|
1682
|
+
o.timeoutErrorMessage && (E = o.timeoutErrorMessage), r(new we(
|
|
1683
|
+
E,
|
|
1684
1684
|
S.clarifyTimeoutError ? we.ETIMEDOUT : we.ECONNABORTED,
|
|
1685
1685
|
e,
|
|
1686
1686
|
m
|
|
1687
1687
|
)), m = null;
|
|
1688
|
-
}, s === void 0 && i.setContentType(null), "setRequestHeader" in m &&
|
|
1689
|
-
m.setRequestHeader(S,
|
|
1690
|
-
}),
|
|
1688
|
+
}, s === void 0 && i.setContentType(null), "setRequestHeader" in m && A.forEach(i.toJSON(), function(E, S) {
|
|
1689
|
+
m.setRequestHeader(S, E);
|
|
1690
|
+
}), A.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);
|
|
1694
|
-
if (w &&
|
|
1694
|
+
if (w && lt.protocols.indexOf(w) === -1) {
|
|
1695
1695
|
r(new we("Unsupported protocol " + w + ":", we.ERR_BAD_REQUEST, e));
|
|
1696
1696
|
return;
|
|
1697
1697
|
}
|
|
@@ -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 = () => A.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 } = A, _g = (({ Request: e, Response: t }) => ({
|
|
1781
1781
|
Request: e,
|
|
1782
1782
|
Response: t
|
|
1783
|
-
}))(
|
|
1783
|
+
}))(A.global), {
|
|
1784
1784
|
ReadableStream: sl,
|
|
1785
1785
|
TextEncoder: il
|
|
1786
|
-
} =
|
|
1786
|
+
} = A.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 = A.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);
|
|
@@ -1798,7 +1798,7 @@ const Hc = (e) => {
|
|
|
1798
1798
|
return !1;
|
|
1799
1799
|
const a = o && Wr(sl), c = o && (typeof il == "function" ? /* @__PURE__ */ ((g) => (x) => g.encode(x))(new il()) : async (g) => new Uint8Array(await new n(g).arrayBuffer())), u = s && a && al(() => {
|
|
1800
1800
|
let g = !1;
|
|
1801
|
-
const x = new n(
|
|
1801
|
+
const x = new n(lt.origin, {
|
|
1802
1802
|
body: new sl(),
|
|
1803
1803
|
method: "POST",
|
|
1804
1804
|
get duplex() {
|
|
@@ -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(() => A.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 (A.isBlob(g))
|
|
1824
1824
|
return g.size;
|
|
1825
|
-
if (
|
|
1826
|
-
return (await new n(
|
|
1825
|
+
if (A.isSpecCompliantForm(g))
|
|
1826
|
+
return (await new n(lt.origin, {
|
|
1827
1827
|
method: "POST",
|
|
1828
1828
|
body: g
|
|
1829
1829
|
}).arrayBuffer()).byteLength;
|
|
1830
|
-
if (
|
|
1830
|
+
if (A.isArrayBufferView(g) || A.isArrayBuffer(g))
|
|
1831
1831
|
return g.byteLength;
|
|
1832
|
-
if (
|
|
1832
|
+
if (A.isURLSearchParams(g) && (g = g + ""), A.isString(g))
|
|
1833
1833
|
return (await c(g)).byteLength;
|
|
1834
1834
|
}, b = async (g, x) => {
|
|
1835
|
-
const m =
|
|
1835
|
+
const m = A.toFiniteNumber(g.getContentLength());
|
|
1836
1836
|
return m ?? p(x);
|
|
1837
1837
|
};
|
|
1838
1838
|
return async (g) => {
|
|
@@ -1842,36 +1842,36 @@ const Hc = (e) => {
|
|
|
1842
1842
|
data: v,
|
|
1843
1843
|
signal: w,
|
|
1844
1844
|
cancelToken: y,
|
|
1845
|
-
timeout:
|
|
1845
|
+
timeout: E,
|
|
1846
1846
|
onDownloadProgress: S,
|
|
1847
|
-
onUploadProgress:
|
|
1848
|
-
responseType:
|
|
1847
|
+
onUploadProgress: C,
|
|
1848
|
+
responseType: R,
|
|
1849
1849
|
headers: I,
|
|
1850
|
-
withCredentials:
|
|
1850
|
+
withCredentials: N = "same-origin",
|
|
1851
1851
|
fetchOptions: k
|
|
1852
1852
|
} = Hc(g), M = t || fetch;
|
|
1853
|
-
|
|
1854
|
-
let W = jg([w, y && y.toAbortSignal()],
|
|
1855
|
-
const
|
|
1853
|
+
R = R ? (R + "").toLowerCase() : "text";
|
|
1854
|
+
let W = jg([w, y && y.toAbortSignal()], E), G = null;
|
|
1855
|
+
const j = W && W.unsubscribe && (() => {
|
|
1856
1856
|
W.unsubscribe();
|
|
1857
1857
|
});
|
|
1858
1858
|
let H;
|
|
1859
1859
|
try {
|
|
1860
|
-
if (
|
|
1860
|
+
if (C && 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 (A.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(C))
|
|
1870
1870
|
);
|
|
1871
1871
|
v = rl(X.body, ol, F, ee);
|
|
1872
1872
|
}
|
|
1873
1873
|
}
|
|
1874
|
-
|
|
1874
|
+
A.isString(N) || (N = N ? "include" : "omit");
|
|
1875
1875
|
const L = s && "credentials" in n.prototype, q = {
|
|
1876
1876
|
...k,
|
|
1877
1877
|
signal: W,
|
|
@@ -1879,30 +1879,30 @@ const Hc = (e) => {
|
|
|
1879
1879
|
headers: I.normalize().toJSON(),
|
|
1880
1880
|
body: v,
|
|
1881
1881
|
duplex: "half",
|
|
1882
|
-
credentials: L ?
|
|
1882
|
+
credentials: L ? N : void 0
|
|
1883
1883
|
};
|
|
1884
1884
|
G = s && new n(x, q);
|
|
1885
1885
|
let O = await (s ? M(G, k) : M(x, q));
|
|
1886
|
-
const _ = d && (
|
|
1887
|
-
if (d && (S || _ &&
|
|
1886
|
+
const _ = d && (R === "stream" || R === "response");
|
|
1887
|
+
if (d && (S || _ && j)) {
|
|
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 = A.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(), j && j();
|
|
1899
1899
|
}),
|
|
1900
1900
|
X
|
|
1901
1901
|
);
|
|
1902
1902
|
}
|
|
1903
|
-
|
|
1904
|
-
let z = await h[
|
|
1905
|
-
return !_ &&
|
|
1903
|
+
R = R || "text";
|
|
1904
|
+
let z = await h[A.findKey(h, R) || "text"](O, g);
|
|
1905
|
+
return !_ && j && j(), 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 j && j(), 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
|
+
A.forEach(ti, (e, t) => {
|
|
1945
1945
|
if (e) {
|
|
1946
1946
|
try {
|
|
1947
1947
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1950,9 +1950,9 @@ j.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) => A.isFunction(e) || e === null || e === !1, zc = {
|
|
1954
1954
|
getAdapter: (e, t) => {
|
|
1955
|
-
e =
|
|
1955
|
+
e = A.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) => j.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 && (A.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 && (A.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 && A.merge(
|
|
2104
2104
|
s.common,
|
|
2105
2105
|
s[n.method]
|
|
2106
2106
|
);
|
|
2107
|
-
s &&
|
|
2107
|
+
s && A.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
|
+
A.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 @@ j.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
2161
2161
|
}));
|
|
2162
2162
|
};
|
|
2163
2163
|
});
|
|
2164
|
-
|
|
2164
|
+
A.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 A.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 A.extend(n, yn.prototype, t, { allOwnKeys: !0 }), A.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(A.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 = at(e.headers ?? {}), [i, a] = de(!1), [c, u] = de(null), [d, h] = de(""), [p, b] = de(null), g = at(null), x = ze((y) => {
|
|
2508
2508
|
o(y);
|
|
2509
2509
|
}, []), m = ze(() => {
|
|
2510
2510
|
var y;
|
|
@@ -2512,37 +2512,37 @@ function Kg(e = {}) {
|
|
|
2512
2512
|
}, []), v = ze(() => {
|
|
2513
2513
|
h(""), b(null), u(null);
|
|
2514
2514
|
}, []), w = ze(
|
|
2515
|
-
(y,
|
|
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
|
|
2520
|
-
const
|
|
2521
|
-
var
|
|
2517
|
+
const C = new AbortController();
|
|
2518
|
+
return g.current = C, (async () => {
|
|
2519
|
+
var N, k, M, W, G;
|
|
2520
|
+
const R = (() => {
|
|
2521
|
+
var j;
|
|
2522
2522
|
try {
|
|
2523
|
-
return typeof window < "u" && ((
|
|
2523
|
+
return typeof window < "u" && ((j = window.localStorage) == null ? void 0 : j.getItem("chat-debug")) === "1";
|
|
2524
2524
|
} catch {
|
|
2525
2525
|
return !1;
|
|
2526
2526
|
}
|
|
2527
|
-
})(), I = (
|
|
2527
|
+
})(), I = (j) => {
|
|
2528
2528
|
var H;
|
|
2529
2529
|
try {
|
|
2530
|
-
const L = JSON.parse(JSON.stringify(
|
|
2530
|
+
const L = JSON.parse(JSON.stringify(j));
|
|
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 j;
|
|
2537
2537
|
}
|
|
2538
2538
|
};
|
|
2539
2539
|
try {
|
|
2540
|
-
let
|
|
2540
|
+
let j = {};
|
|
2541
2541
|
try {
|
|
2542
2542
|
if (r)
|
|
2543
|
-
|
|
2543
|
+
j = { Authorization: `Bearer ${r}` };
|
|
2544
2544
|
else if (typeof window < "u") {
|
|
2545
|
-
const z = window.__AUTH_TOKEN__, X = ((
|
|
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
2548
|
const ee = (k = window.localStorage) == null ? void 0 : k.getItem("chat-settings");
|
|
@@ -2550,35 +2550,35 @@ function Kg(e = {}) {
|
|
|
2550
2550
|
} catch {
|
|
2551
2551
|
}
|
|
2552
2552
|
const F = z || X || oe || null;
|
|
2553
|
-
F && (
|
|
2553
|
+
F && (j = { Authorization: `Bearer ${F}` });
|
|
2554
2554
|
}
|
|
2555
2555
|
} catch {
|
|
2556
2556
|
}
|
|
2557
|
-
|
|
2557
|
+
R && 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
|
+
...j,
|
|
2564
2564
|
...s.current
|
|
2565
2565
|
},
|
|
2566
2566
|
body: JSON.stringify(y),
|
|
2567
|
-
signal:
|
|
2567
|
+
signal: C.signal
|
|
2568
2568
|
});
|
|
2569
2569
|
if (!H.ok || !H.body) {
|
|
2570
2570
|
const _ = await H.text().catch(() => "");
|
|
2571
|
-
throw
|
|
2571
|
+
throw R && 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
|
+
R && console.debug("[use-chat] onOpen handler threw:", F);
|
|
2579
2579
|
}
|
|
2580
2580
|
} catch (_) {
|
|
2581
|
-
|
|
2581
|
+
R && 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
|
+
R && 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 (R && 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 (j) {
|
|
2614
|
+
if ((j == null ? void 0 : j.name) === "AbortError") return;
|
|
2615
|
+
const H = (j == null ? void 0 : j.message) || String(j);
|
|
2616
|
+
R && 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: () => C.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 = at([]), o = at(null), s = at(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,12 +2949,12 @@ 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:
|
|
2952
|
+
}, [u]), { state: w, seed: y, prepend: E, pushUser: S, onEvent: C, reset: R } = Zg(), I = s && s > 0 ? s : 6, [N, k] = de(!1), [M, W] = de(!1), [G, j] = 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 &&
|
|
2955
|
+
ie === "replace" ? y(Fe) : ie === "prepend" && Fe.length && E(Fe), j(($ == null ? void 0 : $.nextCursor) ?? null), k(!!($ != null && $.hasMore)), L((et) => ($ == null ? void 0 : $.checkpointId) ?? et ?? void 0);
|
|
2956
2956
|
},
|
|
2957
|
-
[y,
|
|
2957
|
+
[y, E]
|
|
2958
2958
|
), [O, _] = de([]), [z, X] = de(null), oe = ze(async () => {
|
|
2959
2959
|
const $ = await u.listThreads();
|
|
2960
2960
|
_($);
|
|
@@ -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 = at(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 = at(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,7 +3044,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3044
3044
|
if (Y.current !== $) {
|
|
3045
3045
|
Y.current = $;
|
|
3046
3046
|
try {
|
|
3047
|
-
k(!1),
|
|
3047
|
+
k(!1), j(null), L(void 0);
|
|
3048
3048
|
const et = await u.getMessages({
|
|
3049
3049
|
threadId: $,
|
|
3050
3050
|
checkpointId: ie,
|
|
@@ -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
|
-
k(!1),
|
|
3066
|
+
k(!1), j(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 = at(!1);
|
|
3077
3077
|
Ue(() => {
|
|
3078
3078
|
const $ = se.current;
|
|
3079
3079
|
if (se.current = d, $ && !d && z) {
|
|
@@ -3099,8 +3099,8 @@ 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), R([]), k(!1), j(null), L(void 0));
|
|
3103
|
+
}, [u, oe, z, R]), Oe = ze(async ($, ie) => {
|
|
3104
3104
|
await u.updateThread($, ie), await oe();
|
|
3105
3105
|
}, [u, oe]), ue = ze(async ($, ie) => {
|
|
3106
3106
|
var On;
|
|
@@ -3143,7 +3143,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3143
3143
|
};
|
|
3144
3144
|
p(
|
|
3145
3145
|
xn,
|
|
3146
|
-
(J) =>
|
|
3146
|
+
(J) => C(J),
|
|
3147
3147
|
{
|
|
3148
3148
|
onError: (J) => console.warn("stream error", J),
|
|
3149
3149
|
onOpen: ({ threadId: J, created: ce }) => {
|
|
@@ -3152,10 +3152,10 @@ 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, C, 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
|
-
if (M || !
|
|
3158
|
+
if (M || !N) return;
|
|
3159
3159
|
const ie = G;
|
|
3160
3160
|
if (ie) {
|
|
3161
3161
|
W(!0);
|
|
@@ -3172,7 +3172,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3172
3172
|
}
|
|
3173
3173
|
}
|
|
3174
3174
|
},
|
|
3175
|
-
[u, z, H, G,
|
|
3175
|
+
[u, z, H, G, N, M, q]
|
|
3176
3176
|
), xe = {
|
|
3177
3177
|
baseUrl: u.baseUrl,
|
|
3178
3178
|
token: x,
|
|
@@ -3186,7 +3186,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
|
|
|
3186
3186
|
error: h,
|
|
3187
3187
|
lastCheckpointId: w.lastCheckpointId,
|
|
3188
3188
|
streamingAssistantId: w.assemblingId,
|
|
3189
|
-
hasMoreHistory:
|
|
3189
|
+
hasMoreHistory: N,
|
|
3190
3190
|
isLoadingHistory: M,
|
|
3191
3191
|
loadOlderMessages: Pe,
|
|
3192
3192
|
historyPageSize: I,
|
|
@@ -3291,10 +3291,10 @@ function lx({
|
|
|
3291
3291
|
const w = K.useCallback(
|
|
3292
3292
|
async (I) => {
|
|
3293
3293
|
I && I.preventDefault();
|
|
3294
|
-
const
|
|
3295
|
-
!
|
|
3294
|
+
const N = (p ?? "").trim();
|
|
3295
|
+
!N && !h || x(() => {
|
|
3296
3296
|
try {
|
|
3297
|
-
const k = i(
|
|
3297
|
+
const k = i(N);
|
|
3298
3298
|
k && typeof k.then == "function" ? k.then(() => {
|
|
3299
3299
|
b(""), m.current && (m.current.style.height = "auto");
|
|
3300
3300
|
}).catch(() => {
|
|
@@ -3306,12 +3306,12 @@ function lx({
|
|
|
3306
3306
|
[p, i, h]
|
|
3307
3307
|
), y = K.useCallback((I) => {
|
|
3308
3308
|
b(I.target.value), m.current && (m.current.style.height = "auto", m.current.style.height = `${m.current.scrollHeight}px`);
|
|
3309
|
-
}, []),
|
|
3309
|
+
}, []), E = K.useCallback(
|
|
3310
3310
|
(I) => {
|
|
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
|
+
), R = `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${t ? "border-[hsl(var(--ring))] bg-[hsl(var(--card))] text-[hsl(var(--card-foreground))] dark:bg-[hsl(var(--card))] dark:text-[hsl(var(--card-foreground))]" : ""} ${d}`;
|
|
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,
|
|
@@ -3319,9 +3319,9 @@ function lx({
|
|
|
3319
3319
|
ref: m,
|
|
3320
3320
|
value: p,
|
|
3321
3321
|
onChange: y,
|
|
3322
|
-
onKeyDown:
|
|
3322
|
+
onKeyDown: E,
|
|
3323
3323
|
placeholder: t ? "Edit your message..." : n,
|
|
3324
|
-
className:
|
|
3324
|
+
className: R,
|
|
3325
3325
|
disabled: o,
|
|
3326
3326
|
maxLength: s,
|
|
3327
3327
|
rows: 1,
|
|
@@ -3523,7 +3523,7 @@ function V(e) {
|
|
|
3523
3523
|
return n(r, o);
|
|
3524
3524
|
};
|
|
3525
3525
|
}
|
|
3526
|
-
function
|
|
3526
|
+
function ut(e, t) {
|
|
3527
3527
|
return Vo(V(t), (n) => le(e, n));
|
|
3528
3528
|
}
|
|
3529
3529
|
function Re() {
|
|
@@ -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 =
|
|
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, C) => ln(S, _x[C])), 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
|
-
), m =
|
|
4090
|
+
), m = ut(
|
|
4091
4091
|
B(
|
|
4092
4092
|
c,
|
|
4093
4093
|
Be(),
|
|
4094
|
-
Gt((S,
|
|
4094
|
+
Gt((S, C) => ({ current: C, 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((
|
|
4107
|
+
re(([S, C, R]) => {
|
|
4108
|
+
const I = S.reduce((N, k, M) => bt(N, k, Cr(k, C.offsetTree, R) || M), Vn());
|
|
4109
4109
|
return {
|
|
4110
|
-
...
|
|
4110
|
+
...C,
|
|
4111
4111
|
groupIndices: S,
|
|
4112
4112
|
groupOffsetTree: I
|
|
4113
4113
|
};
|
|
@@ -4118,18 +4118,18 @@ const _x = {
|
|
|
4118
4118
|
B(
|
|
4119
4119
|
r,
|
|
4120
4120
|
Se(x),
|
|
4121
|
-
pe(([S, { lastIndex:
|
|
4122
|
-
re(([S, { lastIndex:
|
|
4121
|
+
pe(([S, { lastIndex: C }]) => S < C),
|
|
4122
|
+
re(([S, { lastIndex: C, lastSize: R }]) => [
|
|
4123
4123
|
{
|
|
4124
|
-
endIndex:
|
|
4125
|
-
size:
|
|
4124
|
+
endIndex: C,
|
|
4125
|
+
size: R,
|
|
4126
4126
|
startIndex: S
|
|
4127
4127
|
}
|
|
4128
4128
|
])
|
|
4129
4129
|
),
|
|
4130
4130
|
n
|
|
4131
4131
|
), le(u, d);
|
|
4132
|
-
const v =
|
|
4132
|
+
const v = ut(
|
|
4133
4133
|
B(
|
|
4134
4134
|
u,
|
|
4135
4135
|
re((S) => S === void 0)
|
|
@@ -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 }, [C, R]) => ({
|
|
4153
|
+
changed: R !== S,
|
|
4154
|
+
sizes: R
|
|
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, C) => ({ diff: S.prev - C, prev: C }),
|
|
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: C } = 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, C));
|
|
4174
4174
|
else if (S < 0) {
|
|
4175
|
-
const
|
|
4176
|
-
|
|
4175
|
+
const R = Ge(m);
|
|
4176
|
+
R.length > 0 && (S -= wl(-S, R)), ye(i, S);
|
|
4177
4177
|
}
|
|
4178
4178
|
}
|
|
4179
|
-
), ke(B(a, Se(e)), ([S,
|
|
4180
|
-
S < 0 &&
|
|
4179
|
+
), ke(B(a, Se(e)), ([S, C]) => {
|
|
4180
|
+
S < 0 && C(
|
|
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 k = yr(
|
|
4191
|
+
re(([S, C]) => {
|
|
4192
|
+
const R = C.groupIndices.length > 0, I = [], N = C.lastSize;
|
|
4193
|
+
if (R) {
|
|
4194
|
+
const k = yr(C.sizeTree, 0);
|
|
4195
4195
|
let M = 0, W = 0;
|
|
4196
4196
|
for (; M < S; ) {
|
|
4197
|
-
const
|
|
4197
|
+
const j = C.groupIndices[W], H = C.groupIndices.length === W + 1 ? 1 / 0 : C.groupIndices[W + 1] - j - 1;
|
|
4198
4198
|
I.push({
|
|
4199
|
-
endIndex:
|
|
4199
|
+
endIndex: j,
|
|
4200
4200
|
size: k,
|
|
4201
|
-
startIndex:
|
|
4201
|
+
startIndex: j
|
|
4202
4202
|
}), I.push({
|
|
4203
|
-
endIndex:
|
|
4204
|
-
size:
|
|
4205
|
-
startIndex:
|
|
4203
|
+
endIndex: j + 1 + H - 1,
|
|
4204
|
+
size: N,
|
|
4205
|
+
startIndex: j + 1
|
|
4206
4206
|
}), W++, M += H + 1;
|
|
4207
4207
|
}
|
|
4208
|
-
const G = wn(
|
|
4208
|
+
const G = wn(C.sizeTree);
|
|
4209
4209
|
return M !== S && G.shift(), G.reduce(
|
|
4210
|
-
(
|
|
4211
|
-
let q =
|
|
4212
|
-
return
|
|
4213
|
-
...
|
|
4210
|
+
(j, { k: H, v: L }) => {
|
|
4211
|
+
let q = j.ranges;
|
|
4212
|
+
return j.prevSize !== 0 && (q = [
|
|
4213
|
+
...j.ranges,
|
|
4214
4214
|
{
|
|
4215
4215
|
endIndex: H + S - 1,
|
|
4216
|
-
size:
|
|
4217
|
-
startIndex:
|
|
4216
|
+
size: j.prevSize,
|
|
4217
|
+
startIndex: j.prevIndex
|
|
4218
4218
|
}
|
|
4219
4219
|
]), {
|
|
4220
4220
|
prevIndex: H + S,
|
|
@@ -4229,7 +4229,7 @@ const _x = {
|
|
|
4229
4229
|
}
|
|
4230
4230
|
).ranges;
|
|
4231
4231
|
}
|
|
4232
|
-
return wn(
|
|
4232
|
+
return wn(C.sizeTree).reduce(
|
|
4233
4233
|
(k, { k: M, v: W }) => ({
|
|
4234
4234
|
prevIndex: M + S,
|
|
4235
4235
|
prevSize: W,
|
|
@@ -4237,7 +4237,7 @@ const _x = {
|
|
|
4237
4237
|
}),
|
|
4238
4238
|
{
|
|
4239
4239
|
prevIndex: 0,
|
|
4240
|
-
prevSize:
|
|
4240
|
+
prevSize: N,
|
|
4241
4241
|
ranges: []
|
|
4242
4242
|
}
|
|
4243
4243
|
).ranges;
|
|
@@ -4245,13 +4245,13 @@ const _x = {
|
|
|
4245
4245
|
),
|
|
4246
4246
|
n
|
|
4247
4247
|
);
|
|
4248
|
-
const
|
|
4248
|
+
const E = wt(
|
|
4249
4249
|
B(
|
|
4250
4250
|
i,
|
|
4251
4251
|
Se(x, b),
|
|
4252
|
-
re(([S, { offsetTree:
|
|
4252
|
+
re(([S, { offsetTree: C }, R]) => {
|
|
4253
4253
|
const I = -S;
|
|
4254
|
-
return Cr(I,
|
|
4254
|
+
return Cr(I, C, R);
|
|
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, C, R]) => {
|
|
4263
|
+
if (C.groupIndices.length > 0) {
|
|
4264
|
+
if (De(C.sizeTree))
|
|
4265
|
+
return C;
|
|
4266
4266
|
let I = Vn();
|
|
4267
|
-
const
|
|
4267
|
+
const N = Ge(m);
|
|
4268
4268
|
let k = 0, M = 0, W = 0;
|
|
4269
4269
|
for (; k < -S; ) {
|
|
4270
|
-
W =
|
|
4271
|
-
const G =
|
|
4270
|
+
W = N[M];
|
|
4271
|
+
const G = N[M + 1] - W - 1;
|
|
4272
4272
|
M++, k += G + 1;
|
|
4273
4273
|
}
|
|
4274
|
-
if (I = wn(
|
|
4275
|
-
const G = yr(
|
|
4274
|
+
if (I = wn(C.sizeTree).reduce((G, { k: j, v: H }) => bt(G, Math.max(0, j + S), H), I), k !== -S) {
|
|
4275
|
+
const G = yr(C.sizeTree, W);
|
|
4276
4276
|
I = bt(I, 0, G);
|
|
4277
|
-
const
|
|
4278
|
-
I = bt(I, 1,
|
|
4277
|
+
const j = Lt(C.sizeTree, -S + 1)[1];
|
|
4278
|
+
I = bt(I, 1, j);
|
|
4279
4279
|
}
|
|
4280
4280
|
return {
|
|
4281
|
-
...
|
|
4281
|
+
...C,
|
|
4282
4282
|
sizeTree: I,
|
|
4283
|
-
...ui(
|
|
4283
|
+
...ui(C.offsetTree, 0, I, R)
|
|
4284
4284
|
};
|
|
4285
4285
|
} else {
|
|
4286
|
-
const I = wn(
|
|
4286
|
+
const I = wn(C.sizeTree).reduce((N, { k, v: M }) => bt(N, Math.max(0, k + S), M), Vn());
|
|
4287
4287
|
return {
|
|
4288
|
-
...
|
|
4288
|
+
...C,
|
|
4289
4289
|
sizeTree: I,
|
|
4290
|
-
...ui(
|
|
4290
|
+
...ui(C.offsetTree, 0, I, R)
|
|
4291
4291
|
};
|
|
4292
4292
|
}
|
|
4293
4293
|
})
|
|
@@ -4305,7 +4305,7 @@ const _x = {
|
|
|
4305
4305
|
itemSize: h,
|
|
4306
4306
|
listRefresh: w,
|
|
4307
4307
|
shiftWith: i,
|
|
4308
|
-
shiftWithOffset:
|
|
4308
|
+
shiftWithOffset: E,
|
|
4309
4309
|
sizeRanges: n,
|
|
4310
4310
|
// output
|
|
4311
4311
|
sizes: x,
|
|
@@ -4401,16 +4401,16 @@ const Dr = Ie(
|
|
|
4401
4401
|
Se(e, s, o),
|
|
4402
4402
|
re(
|
|
4403
4403
|
([
|
|
4404
|
-
[
|
|
4404
|
+
[E, S, C, R, I, N, k, M],
|
|
4405
4405
|
W,
|
|
4406
4406
|
G,
|
|
4407
|
-
|
|
4407
|
+
j
|
|
4408
4408
|
]) => {
|
|
4409
|
-
const H = lu(
|
|
4410
|
-
let X = Cr(z, S.offsetTree, W) +
|
|
4411
|
-
L === "end" ? (X += G + Lt(S.sizeTree, z)[1] -
|
|
4409
|
+
const H = lu(E), { align: L, behavior: q, offset: O } = H, _ = R - 1, z = iu(H, S, _);
|
|
4410
|
+
let X = Cr(z, S.offsetTree, W) + N;
|
|
4411
|
+
L === "end" ? (X += G + Lt(S.sizeTree, z)[1] - C + j, z === _ && (X += k)) : L === "center" ? X += (G + Lt(S.sizeTree, z)[1] - C + j) / 2 : X -= I, O && (X += O);
|
|
4412
4412
|
const oe = (F) => {
|
|
4413
|
-
y(), F ? (M("retrying to scroll to", { location:
|
|
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
|
};
|
|
4415
4415
|
if (y(), q === "smooth") {
|
|
4416
4416
|
let F = !1;
|
|
@@ -4513,13 +4513,13 @@ const Tr = "up", mr = "down", Lx = "none", Fx = {
|
|
|
4513
4513
|
viewportHeight: 0
|
|
4514
4514
|
}
|
|
4515
4515
|
}, Bx = 0, Fr = Ie(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
|
|
4516
|
-
const i = V(!1), a = V(!0), c = Re(), u = Re(), d = V(4), h = V(Bx), p =
|
|
4516
|
+
const i = V(!1), a = V(!0), c = Re(), u = Re(), d = V(4), h = V(Bx), p = ut(
|
|
4517
4517
|
B(
|
|
4518
4518
|
ii(B(fe(o), Rn(1), Wt(!0)), B(fe(o), Rn(1), Wt(!1), xl(100))),
|
|
4519
4519
|
Be()
|
|
4520
4520
|
),
|
|
4521
4521
|
!1
|
|
4522
|
-
), b =
|
|
4522
|
+
), b = ut(
|
|
4523
4523
|
B(ii(B(n, Wt(!0)), B(n, Wt(!1), xl(200))), Be()),
|
|
4524
4524
|
!1
|
|
4525
4525
|
);
|
|
@@ -4534,15 +4534,15 @@ const Tr = "up", mr = "down", Lx = "none", Fx = {
|
|
|
4534
4534
|
const g = wt(
|
|
4535
4535
|
B(
|
|
4536
4536
|
Je(r, fe(s), fe(t), fe(e), fe(d)),
|
|
4537
|
-
Gt((w, [{ scrollHeight: y, scrollTop:
|
|
4538
|
-
const
|
|
4537
|
+
Gt((w, [{ scrollHeight: y, scrollTop: E }, S, C, R, I]) => {
|
|
4538
|
+
const N = E + S - y > -I, k = {
|
|
4539
4539
|
scrollHeight: y,
|
|
4540
|
-
scrollTop:
|
|
4540
|
+
scrollTop: E,
|
|
4541
4541
|
viewportHeight: S
|
|
4542
4542
|
};
|
|
4543
|
-
if (
|
|
4543
|
+
if (N) {
|
|
4544
4544
|
let W, G;
|
|
4545
|
-
return
|
|
4545
|
+
return E > w.state.scrollTop ? (W = "SCROLLED_DOWN", G = w.state.scrollTop - E) : (W = "SIZE_DECREASED", G = w.state.scrollTop - E || w.scrollTopDelta), {
|
|
4546
4546
|
atBottom: !0,
|
|
4547
4547
|
atBottomBecause: W,
|
|
4548
4548
|
scrollTopDelta: G,
|
|
@@ -4550,7 +4550,7 @@ const Tr = "up", mr = "down", Lx = "none", Fx = {
|
|
|
4550
4550
|
};
|
|
4551
4551
|
}
|
|
4552
4552
|
let M;
|
|
4553
|
-
return k.scrollHeight > w.state.scrollHeight ? M = "SIZE_INCREASED" : S < w.state.viewportHeight ? M = "VIEWPORT_HEIGHT_DECREASING" :
|
|
4553
|
+
return k.scrollHeight > w.state.scrollHeight ? M = "SIZE_INCREASED" : S < w.state.viewportHeight ? M = "VIEWPORT_HEIGHT_DECREASING" : E < w.state.scrollTop ? M = "SCROLLING_UPWARDS" : M = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
|
|
4554
4554
|
atBottom: !1,
|
|
4555
4555
|
notAtBottomBecause: M,
|
|
4556
4556
|
state: k
|
|
@@ -4558,30 +4558,30 @@ const Tr = "up", mr = "down", Lx = "none", Fx = {
|
|
|
4558
4558
|
}, Fx),
|
|
4559
4559
|
Be((w, y) => w && w.atBottom === y.atBottom)
|
|
4560
4560
|
)
|
|
4561
|
-
), x =
|
|
4561
|
+
), x = ut(
|
|
4562
4562
|
B(
|
|
4563
4563
|
r,
|
|
4564
4564
|
Gt(
|
|
4565
|
-
(w, { scrollHeight: y, scrollTop:
|
|
4565
|
+
(w, { scrollHeight: y, scrollTop: E, viewportHeight: S }) => {
|
|
4566
4566
|
if (cu(w.scrollHeight, y))
|
|
4567
4567
|
return {
|
|
4568
4568
|
changed: !1,
|
|
4569
4569
|
jump: 0,
|
|
4570
4570
|
scrollHeight: y,
|
|
4571
|
-
scrollTop:
|
|
4571
|
+
scrollTop: E
|
|
4572
4572
|
};
|
|
4573
4573
|
{
|
|
4574
|
-
const
|
|
4575
|
-
return w.scrollTop !==
|
|
4574
|
+
const C = y - (E + S) < 1;
|
|
4575
|
+
return w.scrollTop !== E && C ? {
|
|
4576
4576
|
changed: !0,
|
|
4577
|
-
jump: w.scrollTop -
|
|
4577
|
+
jump: w.scrollTop - E,
|
|
4578
4578
|
scrollHeight: y,
|
|
4579
|
-
scrollTop:
|
|
4579
|
+
scrollTop: E
|
|
4580
4580
|
} : {
|
|
4581
4581
|
changed: !0,
|
|
4582
4582
|
jump: 0,
|
|
4583
4583
|
scrollHeight: y,
|
|
4584
|
-
scrollTop:
|
|
4584
|
+
scrollTop: E
|
|
4585
4585
|
};
|
|
4586
4586
|
}
|
|
4587
4587
|
},
|
|
@@ -4627,7 +4627,7 @@ const Tr = "up", mr = "down", Lx = "none", Fx = {
|
|
|
4627
4627
|
en(100),
|
|
4628
4628
|
Se(p),
|
|
4629
4629
|
pe(([w, y]) => !!y),
|
|
4630
|
-
Gt(([w, y], [
|
|
4630
|
+
Gt(([w, y], [E]) => [y, E], [0, 0]),
|
|
4631
4631
|
re(([w, y]) => y - w)
|
|
4632
4632
|
),
|
|
4633
4633
|
v
|
|
@@ -4654,7 +4654,7 @@ function Cl(e, t) {
|
|
|
4654
4654
|
}
|
|
4655
4655
|
const Gi = Ie(
|
|
4656
4656
|
([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: o }]) => {
|
|
4657
|
-
const s = Re(), i = V(0), a = V(0), c = V(0), u =
|
|
4657
|
+
const s = Re(), i = V(0), a = V(0), c = V(0), u = ut(
|
|
4658
4658
|
B(
|
|
4659
4659
|
Je(
|
|
4660
4660
|
fe(r),
|
|
@@ -4679,12 +4679,12 @@ const Gi = Ie(
|
|
|
4679
4679
|
w,
|
|
4680
4680
|
y
|
|
4681
4681
|
]) => {
|
|
4682
|
-
const
|
|
4683
|
-
let
|
|
4684
|
-
const I = Cl(y, To),
|
|
4685
|
-
return b -= w, b += p + v, g += p + v, g -= w, b > d + S - I && (
|
|
4686
|
-
Math.max(
|
|
4687
|
-
|
|
4682
|
+
const E = d - w, S = m + v, C = Math.max(p - E, 0);
|
|
4683
|
+
let R = yl;
|
|
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 && (R = Tr), g < d - C + h + N && (R = mr), R !== yl ? [
|
|
4686
|
+
Math.max(E - p - Sl(x, To, R) - I, 0),
|
|
4687
|
+
E - C - v + h + Sl(x, Ro, R) + N
|
|
4688
4688
|
] : null;
|
|
4689
4689
|
}
|
|
4690
4690
|
),
|
|
@@ -4803,7 +4803,7 @@ const kn = Ie(
|
|
|
4803
4803
|
]) => {
|
|
4804
4804
|
const x = V([]), m = V(0), v = Re();
|
|
4805
4805
|
le(s.topItemsIndexes, x);
|
|
4806
|
-
const w =
|
|
4806
|
+
const w = ut(
|
|
4807
4807
|
B(
|
|
4808
4808
|
Je(
|
|
4809
4809
|
b,
|
|
@@ -4818,35 +4818,35 @@ const kn = Ie(
|
|
|
4818
4818
|
fe(n),
|
|
4819
4819
|
e
|
|
4820
4820
|
),
|
|
4821
|
-
pe(([
|
|
4822
|
-
const k =
|
|
4823
|
-
return
|
|
4821
|
+
pe(([C, R, , I, , , , , , , N]) => {
|
|
4822
|
+
const k = N && N.length !== I;
|
|
4823
|
+
return C && !R && !k;
|
|
4824
4824
|
}),
|
|
4825
4825
|
re(
|
|
4826
4826
|
([
|
|
4827
4827
|
,
|
|
4828
4828
|
,
|
|
4829
|
-
[
|
|
4829
|
+
[C, R],
|
|
4830
4830
|
I,
|
|
4831
|
-
|
|
4831
|
+
N,
|
|
4832
4832
|
k,
|
|
4833
4833
|
M,
|
|
4834
4834
|
W,
|
|
4835
4835
|
G,
|
|
4836
|
-
|
|
4836
|
+
j,
|
|
4837
4837
|
H
|
|
4838
4838
|
]) => {
|
|
4839
|
-
const L =
|
|
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(_, k,
|
|
4842
|
+
if (C === 0 && R === 0)
|
|
4843
|
+
return _ === 0 ? { ...ks, totalCount: I } : uu(_, k, N, G, j, H || []);
|
|
4844
4844
|
if (De(O))
|
|
4845
4845
|
return _ > 0 ? null : ao(
|
|
4846
4846
|
Hx(Vi(k, I), L, H),
|
|
4847
4847
|
[],
|
|
4848
4848
|
I,
|
|
4849
|
-
|
|
4849
|
+
j,
|
|
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, j, L, G);
|
|
4865
|
+
const X = W.length > 0 ? W[W.length - 1] + 1 : 0, oe = Nx(q, C, R, 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 < C) {
|
|
4874
|
+
Z += Math.floor((C - Y.offset + j) / (ne + j));
|
|
4875
4875
|
const se = Z - be.start;
|
|
4876
|
-
P += se * ne + se *
|
|
4876
|
+
P += se * ne + se * j;
|
|
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 >= R); se++)
|
|
4881
|
+
he.push({ data: H == null ? void 0 : H[se], index: se, offset: P, size: ne }), P += ne + j;
|
|
4882
4882
|
}
|
|
4883
4883
|
});
|
|
4884
|
-
return ao(ee, z, I,
|
|
4884
|
+
return ao(ee, z, I, j, L, G);
|
|
4885
4885
|
}
|
|
4886
4886
|
),
|
|
4887
4887
|
//@ts-expect-error filter needs to be fixed
|
|
4888
|
-
pe((
|
|
4888
|
+
pe((C) => C !== null),
|
|
4889
4889
|
Be()
|
|
4890
4890
|
),
|
|
4891
4891
|
ks
|
|
@@ -4894,65 +4894,65 @@ const kn = Ie(
|
|
|
4894
4894
|
B(
|
|
4895
4895
|
e,
|
|
4896
4896
|
pe(Bi),
|
|
4897
|
-
re((
|
|
4897
|
+
re((C) => C == null ? void 0 : C.length)
|
|
4898
4898
|
),
|
|
4899
4899
|
o
|
|
4900
4900
|
), le(
|
|
4901
4901
|
B(
|
|
4902
4902
|
w,
|
|
4903
|
-
re((
|
|
4903
|
+
re((C) => C.topListHeight)
|
|
4904
4904
|
),
|
|
4905
4905
|
h
|
|
4906
4906
|
), le(h, a), le(
|
|
4907
4907
|
B(
|
|
4908
4908
|
w,
|
|
4909
|
-
re((
|
|
4909
|
+
re((C) => [C.top, C.bottom])
|
|
4910
4910
|
),
|
|
4911
4911
|
i
|
|
4912
4912
|
), le(
|
|
4913
4913
|
B(
|
|
4914
4914
|
w,
|
|
4915
|
-
re((
|
|
4915
|
+
re((C) => C.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: C }) => C.length > 0),
|
|
4923
4923
|
Se(o, e),
|
|
4924
|
-
pe(([{ items:
|
|
4925
|
-
re(([,
|
|
4924
|
+
pe(([{ items: C }, R]) => C[C.length - 1].originalIndex === R - 1),
|
|
4925
|
+
re(([, C, R]) => [C - 1, R]),
|
|
4926
4926
|
Be(Sr),
|
|
4927
|
-
re(([
|
|
4927
|
+
re(([C]) => C)
|
|
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: C, topItems: R }) => C.length > 0 && C[0].originalIndex === R.length),
|
|
4934
|
+
re(({ items: C }) => C[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 (;
|
|
4944
|
-
|
|
4945
|
-
for (;
|
|
4940
|
+
pe(({ items: C }) => C.length > 0),
|
|
4941
|
+
re(({ items: C }) => {
|
|
4942
|
+
let R = 0, I = C.length - 1;
|
|
4943
|
+
for (; C[R].type === "group" && R < I; )
|
|
4944
|
+
R++;
|
|
4945
|
+
for (; C[I].type === "group" && I > R; )
|
|
4946
4946
|
I--;
|
|
4947
4947
|
return {
|
|
4948
|
-
endIndex:
|
|
4949
|
-
startIndex:
|
|
4948
|
+
endIndex: C[I].index,
|
|
4949
|
+
startIndex: C[R].index
|
|
4950
4950
|
};
|
|
4951
4951
|
}),
|
|
4952
4952
|
Be(ru)
|
|
4953
4953
|
)
|
|
4954
4954
|
);
|
|
4955
|
-
return { endReached: y, initialItemCount: m, itemsRendered: v, listState: w, rangeChanged: S, startReached:
|
|
4955
|
+
return { endReached: y, initialItemCount: m, itemsRendered: v, listState: w, rangeChanged: S, startReached: E, topItemsIndexes: x, ...p };
|
|
4956
4956
|
},
|
|
4957
4957
|
He(
|
|
4958
4958
|
Xt,
|
|
@@ -4967,7 +4967,7 @@ const kn = Ie(
|
|
|
4967
4967
|
{ singleton: !0 }
|
|
4968
4968
|
), du = Ie(
|
|
4969
4969
|
([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: n, headerHeight: r }, { listState: o }]) => {
|
|
4970
|
-
const s = Re(), i =
|
|
4970
|
+
const s = Re(), i = ut(
|
|
4971
4971
|
B(
|
|
4972
4972
|
Je(n, e, r, t, o),
|
|
4973
4973
|
re(([a, c, u, d, h]) => a + c + u + d + h.offsetBottom + h.bottom)
|
|
@@ -4980,7 +4980,7 @@ const kn = Ie(
|
|
|
4980
4980
|
{ singleton: !0 }
|
|
4981
4981
|
), $x = Ie(
|
|
4982
4982
|
([{ viewportHeight: e }, { totalListHeight: t }]) => {
|
|
4983
|
-
const n = V(!1), r =
|
|
4983
|
+
const n = V(!1), r = ut(
|
|
4984
4984
|
B(
|
|
4985
4985
|
Je(n, e, t),
|
|
4986
4986
|
pe(([o]) => o),
|
|
@@ -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:
|
|
5018
|
+
const { align: E, behavior: S, calculateViewLocation: C = zx, done: R, ...I } = h, N = iu(h, p, g - 1), k = Cr(N, p.offsetTree, y) + x + m, M = k + Lt(p.sizeTree, N)[1], W = w + m, G = w + b - v, j = C({
|
|
5019
5019
|
itemBottom: M,
|
|
5020
5020
|
itemTop: k,
|
|
5021
|
-
locationParams: { align:
|
|
5021
|
+
locationParams: { align: E, behavior: S, ...I },
|
|
5022
5022
|
viewportBottom: G,
|
|
5023
5023
|
viewportTop: W
|
|
5024
5024
|
});
|
|
5025
|
-
return
|
|
5025
|
+
return j ? R && 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
|
+
R
|
|
5034
|
+
) : R && R(), j;
|
|
5035
5035
|
}),
|
|
5036
5036
|
pe((h) => h !== null)
|
|
5037
5037
|
),
|
|
@@ -5071,32 +5071,32 @@ const Ux = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Wx = Ie(
|
|
|
5071
5071
|
B(
|
|
5072
5072
|
Je(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, C], R, I, N, k]) => {
|
|
5075
|
+
let M = C && N, W = "auto";
|
|
5076
|
+
return M && (W = Ux(R, I || k), 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: C }) => {
|
|
5081
5081
|
m && (m(), m = null), Ge(n) ? requestAnimationFrame(() => {
|
|
5082
|
-
Ge(d)("following output to ", { totalCount:
|
|
5082
|
+
Ge(d)("following output to ", { totalCount: C }, gt.DEBUG), v(S);
|
|
5083
5083
|
}) : m = Mt(e, () => {
|
|
5084
|
-
Ge(d)("following output to ", { totalCount:
|
|
5084
|
+
Ge(d)("following output to ", { totalCount: C }, gt.DEBUG), v(S), m = null;
|
|
5085
5085
|
});
|
|
5086
5086
|
}
|
|
5087
5087
|
);
|
|
5088
5088
|
function w(S) {
|
|
5089
|
-
const
|
|
5090
|
-
S && !
|
|
5089
|
+
const C = Mt(o, (R) => {
|
|
5090
|
+
S && !R.atBottom && R.notAtBottomBecause === "SIZE_INCREASED" && !m && (Ge(d)("scrolling to bottom due to increased size", {}, gt.DEBUG), v("auto"));
|
|
5091
5091
|
});
|
|
5092
|
-
setTimeout(
|
|
5092
|
+
setTimeout(C, 100);
|
|
5093
5093
|
}
|
|
5094
5094
|
ke(
|
|
5095
5095
|
B(
|
|
5096
5096
|
Je(fe(g), t, u),
|
|
5097
|
-
pe(([S, ,
|
|
5097
|
+
pe(([S, , C]) => S && C),
|
|
5098
5098
|
Gt(
|
|
5099
|
-
({ value: S }, [,
|
|
5099
|
+
({ value: S }, [, C]) => ({ refreshed: S === C, value: C }),
|
|
5100
5100
|
{ refreshed: !1, value: 0 }
|
|
5101
5101
|
),
|
|
5102
5102
|
pe(({ refreshed: S }) => S),
|
|
@@ -5107,27 +5107,27 @@ 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(Je(fe(g), o), ([S,
|
|
5111
|
-
S && !
|
|
5110
|
+
}), ke(Je(fe(g), o), ([S, C]) => {
|
|
5111
|
+
S && !C.atBottom && C.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && v("auto");
|
|
5112
5112
|
});
|
|
5113
|
-
const y = V(null),
|
|
5113
|
+
const y = V(null), E = Re();
|
|
5114
5114
|
return le(
|
|
5115
5115
|
ii(
|
|
5116
5116
|
B(
|
|
5117
5117
|
fe(r),
|
|
5118
5118
|
re((S) => {
|
|
5119
|
-
var
|
|
5120
|
-
return (
|
|
5119
|
+
var C;
|
|
5120
|
+
return (C = S == null ? void 0 : S.length) != null ? C : 0;
|
|
5121
5121
|
})
|
|
5122
5122
|
),
|
|
5123
5123
|
B(fe(t))
|
|
5124
5124
|
),
|
|
5125
|
-
|
|
5125
|
+
E
|
|
5126
5126
|
), ke(
|
|
5127
5127
|
B(
|
|
5128
|
-
Je(B(
|
|
5128
|
+
Je(B(E, Rn(1)), c),
|
|
5129
5129
|
Se(fe(y), a, h, p),
|
|
5130
|
-
re(([[S,
|
|
5130
|
+
re(([[S, C], R, I, N, k]) => C && I && (R == null ? void 0 : R({ context: k, totalCount: S, scrollingInProgress: N }))),
|
|
5131
5131
|
pe((S) => !!S),
|
|
5132
5132
|
en(0)
|
|
5133
5133
|
),
|
|
@@ -5270,8 +5270,8 @@ const Ux = (e, t) => typeof e == "function" ? Rl(e(t)) : t && Rl(e), Wx = Ie(
|
|
|
5270
5270
|
Se(t, r, i, h, p, n)
|
|
5271
5271
|
),
|
|
5272
5272
|
([b, g, x, m, v, w, y]) => {
|
|
5273
|
-
const
|
|
5274
|
-
m && v !== null && w !== null && (x = v.scrollTop - w.offsetTop), x -= y, b({ ranges:
|
|
5273
|
+
const E = Ax(g.sizeTree);
|
|
5274
|
+
m && v !== null && w !== null && (x = v.scrollTop - w.offsetTop), x -= y, b({ ranges: E, scrollTop: x });
|
|
5275
5275
|
}
|
|
5276
5276
|
), le(B(d, pe(Bi), re(Yx)), o), le(
|
|
5277
5277
|
B(
|
|
@@ -5321,16 +5321,16 @@ 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:
|
|
5325
|
-
const
|
|
5324
|
+
([, v, w, y], [{ bottom: E, items: S, offsetBottom: C, totalCount: R }, I]) => {
|
|
5325
|
+
const N = E + C;
|
|
5326
5326
|
let k = 0;
|
|
5327
|
-
return w ===
|
|
5327
|
+
return w === R && v.length > 0 && S.length > 0 && (S[0].originalIndex === 0 && v[0].originalIndex === 0 || (k = N - y, k !== 0 && (k += I))), [k, S, R, N];
|
|
5328
5328
|
},
|
|
5329
5329
|
[0, [], 0, 0]
|
|
5330
5330
|
),
|
|
5331
5331
|
pe(([v]) => v !== 0),
|
|
5332
5332
|
Se(r, a, n, o, b, g),
|
|
5333
|
-
pe(([, v, w, y, , ,
|
|
5333
|
+
pe(([, v, w, y, , , E]) => !E && !y && v !== 0 && w === Tr),
|
|
5334
5334
|
re(([[v], , , , , w]) => (w("Upward scrolling compensation", { amount: v }, gt.DEBUG), v))
|
|
5335
5335
|
)
|
|
5336
5336
|
);
|
|
@@ -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
|
-
Je(
|
|
5344
|
+
Je(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)
|
|
@@ -5357,22 +5357,22 @@ const Xx = mu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5357
5357
|
B(
|
|
5358
5358
|
u,
|
|
5359
5359
|
Se(p, d),
|
|
5360
|
-
re(([v, { groupIndices: w, lastSize: y, sizeTree:
|
|
5361
|
-
function
|
|
5362
|
-
return
|
|
5360
|
+
re(([v, { groupIndices: w, lastSize: y, sizeTree: E }, S]) => {
|
|
5361
|
+
function C(R) {
|
|
5362
|
+
return R * (y + S);
|
|
5363
5363
|
}
|
|
5364
5364
|
if (w.length === 0)
|
|
5365
|
-
return
|
|
5365
|
+
return C(v);
|
|
5366
5366
|
{
|
|
5367
|
-
let
|
|
5368
|
-
const I = yr(
|
|
5369
|
-
let
|
|
5370
|
-
for (;
|
|
5371
|
-
|
|
5367
|
+
let R = 0;
|
|
5368
|
+
const I = yr(E, 0);
|
|
5369
|
+
let N = 0, k = 0;
|
|
5370
|
+
for (; N < v; ) {
|
|
5371
|
+
N++, R += I;
|
|
5372
5372
|
let M = w.length === k + 1 ? 1 / 0 : w[k + 1] - w[k] - 1;
|
|
5373
|
-
|
|
5373
|
+
N + M > v && (R -= I, M = v - N + 1), N += M, R += C(M), k++;
|
|
5374
5374
|
}
|
|
5375
|
-
return
|
|
5375
|
+
return R;
|
|
5376
5376
|
}
|
|
5377
5377
|
})
|
|
5378
5378
|
),
|
|
@@ -5445,15 +5445,15 @@ const Xx = mu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5445
5445
|
x,
|
|
5446
5446
|
m,
|
|
5447
5447
|
v,
|
|
5448
|
-
{ listState: w, topItemsIndexes: y, ...
|
|
5448
|
+
{ listState: w, topItemsIndexes: y, ...E },
|
|
5449
5449
|
{ scrollToIndex: S },
|
|
5450
|
-
|
|
5451
|
-
{ topItemCount:
|
|
5450
|
+
C,
|
|
5451
|
+
{ topItemCount: R },
|
|
5452
5452
|
{ groupCounts: I },
|
|
5453
|
-
|
|
5454
|
-
]) => (le(
|
|
5453
|
+
N
|
|
5454
|
+
]) => (le(E.rangeChanged, N.scrollSeekRangeChanged), le(
|
|
5455
5455
|
B(
|
|
5456
|
-
|
|
5456
|
+
N.windowViewportRect,
|
|
5457
5457
|
re((k) => k.visibleHeight)
|
|
5458
5458
|
),
|
|
5459
5459
|
x.viewportHeight
|
|
@@ -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: R,
|
|
5472
5472
|
topItemsIndexes: y,
|
|
5473
5473
|
// input
|
|
5474
5474
|
totalCount: d,
|
|
@@ -5481,9 +5481,9 @@ const Xx = mu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5481
5481
|
statefulTotalCount: u,
|
|
5482
5482
|
trackItemSizes: h,
|
|
5483
5483
|
// exported from stateFlagsSystem
|
|
5484
|
-
...
|
|
5484
|
+
...E,
|
|
5485
5485
|
// the bag of IO from featureGroup1System
|
|
5486
|
-
...
|
|
5486
|
+
...N,
|
|
5487
5487
|
...x,
|
|
5488
5488
|
sizes: c,
|
|
5489
5489
|
...m
|
|
@@ -5530,28 +5530,28 @@ function xu(e, t, n) {
|
|
|
5530
5530
|
}
|
|
5531
5531
|
function u(m) {
|
|
5532
5532
|
return s.reduce((v, w) => (v[w] = (y) => {
|
|
5533
|
-
const
|
|
5534
|
-
ye(
|
|
5533
|
+
const E = m[t.methods[w]];
|
|
5534
|
+
ye(E, y);
|
|
5535
5535
|
}, v), {});
|
|
5536
5536
|
}
|
|
5537
5537
|
function d(m) {
|
|
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, [
|
|
5542
|
-
c(
|
|
5543
|
-
})), [S] = K.useState(gl(d,
|
|
5541
|
+
const { children: w, ...y } = m, [E] = K.useState(() => Vo(xx(e), (R) => {
|
|
5542
|
+
c(R, y);
|
|
5543
|
+
})), [S] = K.useState(gl(d, E));
|
|
5544
5544
|
Vr(() => {
|
|
5545
|
-
for (const
|
|
5546
|
-
|
|
5545
|
+
for (const R of i)
|
|
5546
|
+
R in y && ke(S[R], y[R]);
|
|
5547
5547
|
return () => {
|
|
5548
5548
|
Object.values(S).map(Hi);
|
|
5549
5549
|
};
|
|
5550
|
-
}, [y, S,
|
|
5551
|
-
c(
|
|
5552
|
-
}), K.useImperativeHandle(v, ml(u(
|
|
5553
|
-
const
|
|
5554
|
-
return /* @__PURE__ */ l.jsx(a.Provider, { value:
|
|
5550
|
+
}, [y, S, E]), Vr(() => {
|
|
5551
|
+
c(E, y);
|
|
5552
|
+
}), K.useImperativeHandle(v, ml(u(E)));
|
|
5553
|
+
const C = n;
|
|
5554
|
+
return /* @__PURE__ */ l.jsx(a.Provider, { value: E, children: n ? /* @__PURE__ */ l.jsx(C, { ...Qx([...r, ...o, ...i], y), children: w }) : w });
|
|
5555
5555
|
}), p = (m) => {
|
|
5556
5556
|
const v = K.useContext(a);
|
|
5557
5557
|
return K.useCallback(
|
|
@@ -5573,8 +5573,8 @@ function xu(e, t, n) {
|
|
|
5573
5573
|
}, g = (m) => {
|
|
5574
5574
|
const v = K.useContext(a)[m], [w, y] = K.useState(gl(Ge, v));
|
|
5575
5575
|
return Vr(
|
|
5576
|
-
() => ke(v, (
|
|
5577
|
-
|
|
5576
|
+
() => ke(v, (E) => {
|
|
5577
|
+
E !== w && y(ml(E));
|
|
5578
5578
|
}),
|
|
5579
5579
|
[v, w]
|
|
5580
5580
|
), w;
|
|
@@ -5657,7 +5657,7 @@ function qi(e) {
|
|
|
5657
5657
|
return e;
|
|
5658
5658
|
}
|
|
5659
5659
|
const tv = /* @__PURE__ */ Ie(() => {
|
|
5660
|
-
const e = V((a) => `Item ${a}`), t = V((a) => `Group ${a}`), n = V({}), r = V(qi), o = V("div"), s = V(or), i = (a, c = null) =>
|
|
5660
|
+
const e = V((a) => `Item ${a}`), t = V((a) => `Group ${a}`), n = V({}), r = V(qi), o = V("div"), s = V(or), i = (a, c = null) => ut(
|
|
5661
5661
|
B(
|
|
5662
5662
|
n,
|
|
5663
5663
|
re((u) => u[a]),
|
|
@@ -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", (j) => {
|
|
5701
|
+
v !== j && w(j);
|
|
5702
5702
|
});
|
|
5703
|
-
const y = ve("EmptyPlaceholder"),
|
|
5703
|
+
const y = ve("EmptyPlaceholder"), E = ve("ScrollSeekPlaceholder") || rv, S = ve("ListComponent"), C = ve("ItemComponent"), R = ve("GroupComponent"), I = ve("computeItemKey"), N = ve("isSeeking"), k = 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",
|
|
@@ -5716,49 +5716,49 @@ const tv = /* @__PURE__ */ Ie(() => {
|
|
|
5716
5716
|
},
|
|
5717
5717
|
...W ? {} : { visibility: "hidden" }
|
|
5718
5718
|
};
|
|
5719
|
-
return !e && t.totalCount === 0 && y ? /* @__PURE__ */ l.jsx(y, { ...
|
|
5719
|
+
return !e && t.totalCount === 0 && y ? /* @__PURE__ */ l.jsx(y, { ...ct(y, u) }) : /* @__PURE__ */ l.jsx(
|
|
5720
5720
|
S,
|
|
5721
5721
|
{
|
|
5722
|
-
...
|
|
5722
|
+
...ct(S, u),
|
|
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 =
|
|
5728
|
-
return
|
|
5729
|
-
|
|
5726
|
+
children: (e ? t.topItems : t.items).map((j) => {
|
|
5727
|
+
const H = j.originalIndex, L = I(H + t.firstItemIndex, j.data, u);
|
|
5728
|
+
return N ? /* @__PURE__ */ to(
|
|
5729
|
+
E,
|
|
5730
5730
|
{
|
|
5731
|
-
...
|
|
5732
|
-
height:
|
|
5733
|
-
index:
|
|
5731
|
+
...ct(E, u),
|
|
5732
|
+
height: j.size,
|
|
5733
|
+
index: j.index,
|
|
5734
5734
|
key: L,
|
|
5735
|
-
type:
|
|
5736
|
-
...
|
|
5735
|
+
type: j.type || "item",
|
|
5736
|
+
...j.type === "group" ? {} : { groupIndex: j.groupIndex }
|
|
5737
5737
|
}
|
|
5738
|
-
) :
|
|
5739
|
-
|
|
5738
|
+
) : j.type === "group" ? /* @__PURE__ */ to(
|
|
5739
|
+
R,
|
|
5740
5740
|
{
|
|
5741
|
-
...
|
|
5741
|
+
...ct(R, u),
|
|
5742
5742
|
"data-index": H,
|
|
5743
|
-
"data-item-index":
|
|
5744
|
-
"data-known-size":
|
|
5743
|
+
"data-item-index": j.index,
|
|
5744
|
+
"data-known-size": j.size,
|
|
5745
5745
|
key: L,
|
|
5746
5746
|
style: ov
|
|
5747
5747
|
},
|
|
5748
|
-
d(
|
|
5748
|
+
d(j.index, u)
|
|
5749
5749
|
) : /* @__PURE__ */ to(
|
|
5750
|
-
|
|
5750
|
+
C,
|
|
5751
5751
|
{
|
|
5752
|
-
...
|
|
5753
|
-
...cv(
|
|
5752
|
+
...ct(C, u),
|
|
5753
|
+
...cv(C, j.data),
|
|
5754
5754
|
"data-index": H,
|
|
5755
|
-
"data-item-group-index":
|
|
5756
|
-
"data-item-index":
|
|
5757
|
-
"data-known-size":
|
|
5755
|
+
"data-item-group-index": j.groupIndex,
|
|
5756
|
+
"data-item-index": j.index,
|
|
5757
|
+
"data-known-size": j.size,
|
|
5758
5758
|
key: L,
|
|
5759
5759
|
style: x ? sv : Su
|
|
5760
5760
|
},
|
|
5761
|
-
k ? c(
|
|
5761
|
+
k ? c(j.index, j.groupIndex, j.data, u) : c(j.index, j.data, u)
|
|
5762
5762
|
);
|
|
5763
5763
|
})
|
|
5764
5764
|
}
|
|
@@ -5785,7 +5785,7 @@ const tv = /* @__PURE__ */ Ie(() => {
|
|
|
5785
5785
|
width: "100%",
|
|
5786
5786
|
zIndex: 1
|
|
5787
5787
|
};
|
|
5788
|
-
function
|
|
5788
|
+
function ct(e, t) {
|
|
5789
5789
|
if (typeof e != "string")
|
|
5790
5790
|
return { context: t };
|
|
5791
5791
|
}
|
|
@@ -5803,7 +5803,7 @@ const uv = /* @__PURE__ */ K.memo(function() {
|
|
|
5803
5803
|
!0,
|
|
5804
5804
|
ve("skipAnimationFrameInResizeObserver")
|
|
5805
5805
|
), o = ve("context");
|
|
5806
|
-
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...
|
|
5806
|
+
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...ct(e, o) }) }) : null;
|
|
5807
5807
|
}), dv = /* @__PURE__ */ K.memo(function() {
|
|
5808
5808
|
const e = ve("FooterComponent"), t = Rt("footerHeight"), n = ve("HeaderFooterTag"), r = An(
|
|
5809
5809
|
K.useMemo(
|
|
@@ -5815,7 +5815,7 @@ const uv = /* @__PURE__ */ K.memo(function() {
|
|
|
5815
5815
|
!0,
|
|
5816
5816
|
ve("skipAnimationFrameInResizeObserver")
|
|
5817
5817
|
), o = ve("context");
|
|
5818
|
-
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...
|
|
5818
|
+
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...ct(e, o) }) }) : null;
|
|
5819
5819
|
});
|
|
5820
5820
|
function Cu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
5821
5821
|
return K.memo(function({ children: r, style: o, context: s, ...i }) {
|
|
@@ -5836,7 +5836,7 @@ function Cu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
5836
5836
|
style: { ...h ? av : iv, ...o },
|
|
5837
5837
|
tabIndex: 0,
|
|
5838
5838
|
...i,
|
|
5839
|
-
...
|
|
5839
|
+
...ct(c, s),
|
|
5840
5840
|
children: r
|
|
5841
5841
|
}
|
|
5842
5842
|
);
|
|
@@ -5863,7 +5863,7 @@ function Tu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
5863
5863
|
"data-virtuoso-scroller": !0,
|
|
5864
5864
|
style: { position: "relative", ...o, ...d !== 0 ? { height: d + h } : {} },
|
|
5865
5865
|
...i,
|
|
5866
|
-
...
|
|
5866
|
+
...ct(c, s),
|
|
5867
5867
|
children: r
|
|
5868
5868
|
}
|
|
5869
5869
|
);
|
|
@@ -5888,7 +5888,7 @@ const fv = ({ children: e }) => {
|
|
|
5888
5888
|
}, [t, n, r]), /* @__PURE__ */ l.jsx("div", { "data-viewport-type": "window", ref: s, style: Yo(i), children: e });
|
|
5889
5889
|
}, pv = ({ children: e }) => {
|
|
5890
5890
|
const t = ve("TopItemListComponent") || "div", n = ve("headerHeight"), r = { ...lv, marginTop: `${n}px` }, o = ve("context");
|
|
5891
|
-
return /* @__PURE__ */ l.jsx(t, { style: r, ...
|
|
5891
|
+
return /* @__PURE__ */ l.jsx(t, { style: r, ...ct(t, o), children: e });
|
|
5892
5892
|
}, mv = /* @__PURE__ */ K.memo(function(e) {
|
|
5893
5893
|
const t = ve("useWindowScroll"), n = ve("topItemsIndexes").length > 0, r = ve("customScrollParent"), o = ve("context");
|
|
5894
5894
|
return /* @__PURE__ */ l.jsxs(r || t ? vv : xv, { ...e, context: o, children: [
|
|
@@ -5970,7 +5970,7 @@ const fv = ({ children: e }) => {
|
|
|
5970
5970
|
] })), t = V(null), n = V((u) => /* @__PURE__ */ l.jsxs("td", { colSpan: 1e3, children: [
|
|
5971
5971
|
"Group ",
|
|
5972
5972
|
u
|
|
5973
|
-
] })), r = V(null), o = V(null), s = V({}), i = V(qi), a = V(or), c = (u, d = null) =>
|
|
5973
|
+
] })), r = V(null), o = V(null), s = V({}), i = V(qi), a = V(or), c = (u, d = null) => ut(
|
|
5974
5974
|
B(
|
|
5975
5975
|
s,
|
|
5976
5976
|
re((h) => h[u]),
|
|
@@ -6040,10 +6040,10 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6040
6040
|
p,
|
|
6041
6041
|
b,
|
|
6042
6042
|
{ didMount: g, propsReady: x },
|
|
6043
|
-
{ customScrollParent: m, useWindowScroll: v, windowScrollContainerState: w, windowScrollTo: y, windowViewportRect:
|
|
6043
|
+
{ customScrollParent: m, useWindowScroll: v, windowScrollContainerState: w, windowScrollTo: y, windowViewportRect: E },
|
|
6044
6044
|
S
|
|
6045
6045
|
]) => {
|
|
6046
|
-
const
|
|
6046
|
+
const C = V(0), R = V(0), I = V(Nl), N = V({ height: 0, width: 0 }), k = V({ height: 0, width: 0 }), M = Re(), W = Re(), G = V(0), j = 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
|
-
Je(g, z, k,
|
|
6058
|
+
Je(g, z, k, 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
|
+
R
|
|
6075
6075
|
), ke(
|
|
6076
6076
|
B(
|
|
6077
6077
|
g,
|
|
@@ -6079,20 +6079,20 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6079
6079
|
pe(([, P]) => P != null)
|
|
6080
6080
|
),
|
|
6081
6081
|
([, P]) => {
|
|
6082
|
-
P && (ye(
|
|
6082
|
+
P && (ye(N, P.viewport), ye(k, 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
|
}
|
|
6086
6086
|
), le(
|
|
6087
6087
|
B(
|
|
6088
|
-
|
|
6088
|
+
N,
|
|
6089
6089
|
re(({ height: P }) => P)
|
|
6090
6090
|
),
|
|
6091
6091
|
h
|
|
6092
6092
|
), le(
|
|
6093
6093
|
B(
|
|
6094
6094
|
Je(
|
|
6095
|
-
fe(
|
|
6095
|
+
fe(N, Gr),
|
|
6096
6096
|
fe(k, Gr),
|
|
6097
6097
|
fe(H, (P, Z) => P && P.column === Z.column && P.row === Z.row),
|
|
6098
6098
|
fe(u)
|
|
@@ -6108,13 +6108,13 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6108
6108
|
), le(
|
|
6109
6109
|
B(
|
|
6110
6110
|
Je(
|
|
6111
|
-
fe(
|
|
6111
|
+
fe(C),
|
|
6112
6112
|
r,
|
|
6113
6113
|
fe(H, Cv),
|
|
6114
6114
|
fe(k, Gr),
|
|
6115
|
-
fe(
|
|
6116
|
-
fe(
|
|
6117
|
-
fe(
|
|
6115
|
+
fe(N, Gr),
|
|
6116
|
+
fe(j),
|
|
6117
|
+
fe(R),
|
|
6118
6118
|
fe(O),
|
|
6119
6119
|
fe(z),
|
|
6120
6120
|
fe(_)
|
|
@@ -6151,14 +6151,14 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6151
6151
|
I
|
|
6152
6152
|
), le(
|
|
6153
6153
|
B(
|
|
6154
|
-
|
|
6154
|
+
j,
|
|
6155
6155
|
pe((P) => P !== null),
|
|
6156
6156
|
re((P) => P.length)
|
|
6157
6157
|
),
|
|
6158
|
-
|
|
6158
|
+
C
|
|
6159
6159
|
), le(
|
|
6160
6160
|
B(
|
|
6161
|
-
Je(
|
|
6161
|
+
Je(N, k, 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
|
-
Je(I,
|
|
6182
|
+
Je(I, C),
|
|
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(
|
|
6215
|
+
Se(N, k, C, 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;
|
|
@@ -6223,7 +6223,7 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6223
6223
|
),
|
|
6224
6224
|
c
|
|
6225
6225
|
);
|
|
6226
|
-
const Y =
|
|
6226
|
+
const Y = ut(
|
|
6227
6227
|
B(
|
|
6228
6228
|
I,
|
|
6229
6229
|
re((P) => P.offsetBottom + P.bottom)
|
|
@@ -6232,20 +6232,20 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6232
6232
|
);
|
|
6233
6233
|
return le(
|
|
6234
6234
|
B(
|
|
6235
|
-
|
|
6235
|
+
E,
|
|
6236
6236
|
re((P) => ({ height: P.visibleHeight, width: P.visibleWidth }))
|
|
6237
6237
|
),
|
|
6238
|
-
|
|
6238
|
+
N
|
|
6239
6239
|
), {
|
|
6240
6240
|
customScrollParent: m,
|
|
6241
6241
|
// input
|
|
6242
|
-
data:
|
|
6242
|
+
data: j,
|
|
6243
6243
|
deviation: G,
|
|
6244
6244
|
footerHeight: o,
|
|
6245
6245
|
gap: H,
|
|
6246
6246
|
headerHeight: s,
|
|
6247
6247
|
increaseViewportBy: e,
|
|
6248
|
-
initialItemCount:
|
|
6248
|
+
initialItemCount: R,
|
|
6249
6249
|
itemDimensions: k,
|
|
6250
6250
|
overscan: n,
|
|
6251
6251
|
restoreStateFrom: q,
|
|
@@ -6256,12 +6256,12 @@ const Tv = /* @__PURE__ */ Ie(
|
|
|
6256
6256
|
scrollToIndex: M,
|
|
6257
6257
|
scrollTop: u,
|
|
6258
6258
|
smoothScrollTargetReached: d,
|
|
6259
|
-
totalCount:
|
|
6259
|
+
totalCount: C,
|
|
6260
6260
|
useWindowScroll: v,
|
|
6261
|
-
viewportDimensions:
|
|
6261
|
+
viewportDimensions: N,
|
|
6262
6262
|
windowScrollContainerState: w,
|
|
6263
6263
|
windowScrollTo: y,
|
|
6264
|
-
windowViewportRect:
|
|
6264
|
+
windowViewportRect: E,
|
|
6265
6265
|
...b,
|
|
6266
6266
|
// output
|
|
6267
6267
|
gridState: I,
|
|
@@ -6295,7 +6295,7 @@ function di(e, t, n, r) {
|
|
|
6295
6295
|
return i > 0 ? i + t.row : i;
|
|
6296
6296
|
}
|
|
6297
6297
|
const Rv = /* @__PURE__ */ Ie(() => {
|
|
6298
|
-
const e = V((h) => `Item ${h}`), t = V({}), n = V(null), r = V("virtuoso-grid-item"), o = V("virtuoso-grid-list"), s = V(qi), i = V("div"), a = V(or), c = (h, p = null) =>
|
|
6298
|
+
const e = V((h) => `Item ${h}`), t = V({}), n = V(null), r = V("virtuoso-grid-item"), o = V("virtuoso-grid-list"), s = V(qi), i = V("div"), a = V(or), c = (h, p = null) => ut(
|
|
6299
6299
|
B(
|
|
6300
6300
|
t,
|
|
6301
6301
|
re((b) => b[h]),
|
|
@@ -6332,8 +6332,8 @@ const Rv = /* @__PURE__ */ Ie(() => {
|
|
|
6332
6332
|
i(w);
|
|
6333
6333
|
const y = v.firstChild;
|
|
6334
6334
|
if (y) {
|
|
6335
|
-
const { height:
|
|
6336
|
-
h({ height:
|
|
6335
|
+
const { height: E, width: S } = y.getBoundingClientRect();
|
|
6336
|
+
h({ height: E, width: S });
|
|
6337
6337
|
}
|
|
6338
6338
|
p({
|
|
6339
6339
|
column: _l("column-gap", getComputedStyle(v).columnGap, b),
|
|
@@ -6352,7 +6352,7 @@ const Rv = /* @__PURE__ */ Ie(() => {
|
|
|
6352
6352
|
{
|
|
6353
6353
|
className: t,
|
|
6354
6354
|
ref: m,
|
|
6355
|
-
...
|
|
6355
|
+
...ct(c, d),
|
|
6356
6356
|
"data-testid": "virtuoso-item-list",
|
|
6357
6357
|
style: { paddingBottom: e.offsetBottom, paddingTop: e.offsetTop },
|
|
6358
6358
|
children: e.items.map((v) => {
|
|
@@ -6360,7 +6360,7 @@ const Rv = /* @__PURE__ */ Ie(() => {
|
|
|
6360
6360
|
return s ? /* @__PURE__ */ l.jsx(
|
|
6361
6361
|
u,
|
|
6362
6362
|
{
|
|
6363
|
-
...
|
|
6363
|
+
...ct(u, d),
|
|
6364
6364
|
height: e.itemHeight,
|
|
6365
6365
|
index: v.index,
|
|
6366
6366
|
width: e.itemWidth
|
|
@@ -6369,7 +6369,7 @@ const Rv = /* @__PURE__ */ Ie(() => {
|
|
|
6369
6369
|
) : /* @__PURE__ */ to(
|
|
6370
6370
|
a,
|
|
6371
6371
|
{
|
|
6372
|
-
...
|
|
6372
|
+
...ct(a, d),
|
|
6373
6373
|
className: n,
|
|
6374
6374
|
"data-index": v.index,
|
|
6375
6375
|
key: w
|
|
@@ -6390,7 +6390,7 @@ const Rv = /* @__PURE__ */ Ie(() => {
|
|
|
6390
6390
|
!0,
|
|
6391
6391
|
!1
|
|
6392
6392
|
), o = $e("context");
|
|
6393
|
-
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...
|
|
6393
|
+
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...ct(e, o) }) }) : null;
|
|
6394
6394
|
}), jv = K.memo(function() {
|
|
6395
6395
|
const e = $e("FooterComponent"), t = Et("footerHeight"), n = $e("headerFooterTag"), r = An(
|
|
6396
6396
|
K.useMemo(
|
|
@@ -6402,7 +6402,7 @@ const Rv = /* @__PURE__ */ Ie(() => {
|
|
|
6402
6402
|
!0,
|
|
6403
6403
|
!1
|
|
6404
6404
|
), o = $e("context");
|
|
6405
|
-
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...
|
|
6405
|
+
return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...ct(e, o) }) }) : null;
|
|
6406
6406
|
}), Av = ({ children: e }) => {
|
|
6407
6407
|
const t = K.useContext(bu), n = Et("itemDimensions"), r = Et("viewportDimensions"), o = An(
|
|
6408
6408
|
K.useMemo(
|
|
@@ -6424,7 +6424,7 @@ const Rv = /* @__PURE__ */ Ie(() => {
|
|
|
6424
6424
|
}, [t, n, r]), /* @__PURE__ */ l.jsx("div", { ref: s, style: Yo(!1), children: e });
|
|
6425
6425
|
}, Pv = /* @__PURE__ */ K.memo(function({ ...e }) {
|
|
6426
6426
|
const t = $e("useWindowScroll"), n = $e("customScrollParent"), r = n || t ? Ov : _v, o = n || t ? kv : Av, s = $e("context");
|
|
6427
|
-
return /* @__PURE__ */ l.jsx(r, { ...e, ...
|
|
6427
|
+
return /* @__PURE__ */ l.jsx(r, { ...e, ...ct(r, s), children: /* @__PURE__ */ l.jsxs(o, { children: [
|
|
6428
6428
|
/* @__PURE__ */ l.jsx(Nv, {}),
|
|
6429
6429
|
/* @__PURE__ */ l.jsx(Iv, {}),
|
|
6430
6430
|
/* @__PURE__ */ l.jsx(jv, {})
|
|
@@ -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
|
-
!
|
|
7229
|
-
}, p),
|
|
7230
|
-
const I =
|
|
7231
|
-
[...u.branches].some((k) => k.contains(I)) || (s == null || s(
|
|
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, (R) => h(R)), 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((R) => {
|
|
7227
|
+
const I = R.target, N = [...u.branches].some((k) => k.contains(I));
|
|
7228
|
+
!E || N || (o == null || o(R), i == null || i(R), R.defaultPrevented || a == null || a());
|
|
7229
|
+
}, p), C = bb((R) => {
|
|
7230
|
+
const I = R.target;
|
|
7231
|
+
[...u.branches].some((k) => k.contains(I)) || (s == null || s(R), i == null || i(R), R.defaultPrevented || a == null || a());
|
|
7232
7232
|
}, p);
|
|
7233
|
-
return fb((
|
|
7234
|
-
w === u.layers.size - 1 && (r == null || r(
|
|
7233
|
+
return fb((R) => {
|
|
7234
|
+
w === u.layers.size - 1 && (r == null || r(R), !R.defaultPrevented && a && (R.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,19 +7240,19 @@ 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 R = () => b({});
|
|
7244
|
+
return document.addEventListener(mi, R), () => document.removeEventListener(mi, R);
|
|
7245
7245
|
}, []), /* @__PURE__ */ l.jsx(
|
|
7246
7246
|
me.div,
|
|
7247
7247
|
{
|
|
7248
7248
|
...c,
|
|
7249
7249
|
ref: g,
|
|
7250
7250
|
style: {
|
|
7251
|
-
pointerEvents: y ?
|
|
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, C.onFocusCapture),
|
|
7255
|
+
onBlurCapture: Q(e.onBlurCapture, C.onBlurCapture),
|
|
7256
7256
|
onPointerDownCapture: Q(
|
|
7257
7257
|
e.onPointerDownCapture,
|
|
7258
7258
|
S.onPointerDownCapture
|
|
@@ -7345,12 +7345,12 @@ var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", Ul
|
|
|
7345
7345
|
if (r) {
|
|
7346
7346
|
let x = function(y) {
|
|
7347
7347
|
if (b.paused || !a) return;
|
|
7348
|
-
const
|
|
7349
|
-
a.contains(
|
|
7348
|
+
const E = y.target;
|
|
7349
|
+
a.contains(E) ? h.current = E : rn(h.current, { select: !0 });
|
|
7350
7350
|
}, m = function(y) {
|
|
7351
7351
|
if (b.paused || !a) return;
|
|
7352
|
-
const
|
|
7353
|
-
|
|
7352
|
+
const E = y.relatedTarget;
|
|
7353
|
+
E !== null && (a.contains(E) || rn(h.current, { select: !0 }));
|
|
7354
7354
|
}, v = function(y) {
|
|
7355
7355
|
if (document.activeElement === document.body)
|
|
7356
7356
|
for (const S of y)
|
|
@@ -7383,8 +7383,8 @@ var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", Ul
|
|
|
7383
7383
|
if (!n && !r || b.paused) return;
|
|
7384
7384
|
const m = x.key === "Tab" && !x.altKey && !x.ctrlKey && !x.metaKey, v = document.activeElement;
|
|
7385
7385
|
if (m && v) {
|
|
7386
|
-
const w = x.currentTarget, [y,
|
|
7387
|
-
y &&
|
|
7386
|
+
const w = x.currentTarget, [y, E] = Sb(w);
|
|
7387
|
+
y && E ? !x.shiftKey && v === E ? (x.preventDefault(), n && rn(y, { select: !0 })) : x.shiftKey && v === y && (x.preventDefault(), n && rn(E, { select: !0 })) : v === w && x.preventDefault();
|
|
7388
7388
|
}
|
|
7389
7389
|
},
|
|
7390
7390
|
[n, r, b.paused]
|
|
@@ -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,
|
|
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, C = _b([n, t]), R = 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({}, R), { ref: C })) : f.createElement(w, Vt({}, R, { className: c, ref: C }), a)
|
|
7633
7633
|
);
|
|
7634
7634
|
});
|
|
7635
7635
|
Qo.defaultProps = {
|
|
@@ -7875,18 +7875,18 @@ 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],
|
|
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, C = x.target, R = Math.abs(y) > Math.abs(E) ? "h" : "v";
|
|
7879
|
+
if ("touches" in x && R === "h" && C.type === "range")
|
|
7880
7880
|
return !1;
|
|
7881
|
-
var I = Xl(
|
|
7881
|
+
var I = Xl(R, C);
|
|
7882
7882
|
if (!I)
|
|
7883
7883
|
return !0;
|
|
7884
|
-
if (I ? S =
|
|
7884
|
+
if (I ? S = R : (S = R === "v" ? "h" : "v", I = Xl(R, C)), !I)
|
|
7885
7885
|
return !1;
|
|
7886
|
-
if (!r.current && "changedTouches" in x && (y ||
|
|
7886
|
+
if (!r.current && "changedTouches" in x && (y || E) && (r.current = S), !S)
|
|
7887
7887
|
return !0;
|
|
7888
|
-
var
|
|
7889
|
-
return rw(
|
|
7888
|
+
var N = r.current || S;
|
|
7889
|
+
return rw(N, m, x, N === "h" ? y : E);
|
|
7890
7890
|
}, []), c = f.useCallback(function(x) {
|
|
7891
7891
|
var m = x;
|
|
7892
7892
|
if (!(!Hn.length || Hn[Hn.length - 1] !== s)) {
|
|
@@ -7900,15 +7900,15 @@ function aw(e) {
|
|
|
7900
7900
|
if (!w) {
|
|
7901
7901
|
var y = (i.current.shards || []).map(Zl).filter(Boolean).filter(function(S) {
|
|
7902
7902
|
return S.contains(m.target);
|
|
7903
|
-
}),
|
|
7904
|
-
|
|
7903
|
+
}), E = y.length > 0 ? a(m, y[0]) : !i.current.noIsolation;
|
|
7904
|
+
E && m.cancelable && m.preventDefault();
|
|
7905
7905
|
}
|
|
7906
7906
|
}
|
|
7907
7907
|
}, []), u = f.useCallback(function(x, m, v, w) {
|
|
7908
7908
|
var y = { name: x, delta: m, target: v, should: w, shadowParent: lw(v) };
|
|
7909
7909
|
t.current.push(y), setTimeout(function() {
|
|
7910
|
-
t.current = t.current.filter(function(
|
|
7911
|
-
return
|
|
7910
|
+
t.current = t.current.filter(function(E) {
|
|
7911
|
+
return E !== y;
|
|
7912
7912
|
});
|
|
7913
7913
|
}, 1);
|
|
7914
7914
|
}, []), d = f.useCallback(function(x) {
|
|
@@ -8454,9 +8454,9 @@ const Nw = K.memo(function({
|
|
|
8454
8454
|
onCancelEdit: v,
|
|
8455
8455
|
onCopy: w
|
|
8456
8456
|
}) {
|
|
8457
|
-
const [y,
|
|
8457
|
+
const [y, E] = de(!1), [S, C] = de(!1), [R, I] = de(!1), [N, k] = de(!1), { currentThreadId: M } = Fi();
|
|
8458
8458
|
na();
|
|
8459
|
-
const [W, G] = de({}), [
|
|
8459
|
+
const [W, G] = de({}), [j, 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))]";
|
|
@@ -8472,7 +8472,7 @@ const Nw = K.memo(function({
|
|
|
8472
8472
|
}, [_]), oe = sn(() => jw(t.content), [t.content]), F = sn(() => Ow(t.content), [t.content]), ee = sn(() => t.content.filter((ue) => ue.type === "image_url"), [t.content]), he = sn(() => t.content.filter((ue) => ue.type === "file"), [t.content]), be = Dw(oe, r ? o : 0), Y = async () => {
|
|
8473
8473
|
try {
|
|
8474
8474
|
const ue = z ? zn(t.content) : oe;
|
|
8475
|
-
await navigator.clipboard.writeText(ue),
|
|
8475
|
+
await navigator.clipboard.writeText(ue), E(!0), setTimeout(() => E(!1), 2e3), w == null || w(ue);
|
|
8476
8476
|
} catch (ue) {
|
|
8477
8477
|
console.error("Failed to copy:", ue);
|
|
8478
8478
|
}
|
|
@@ -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 && !R) {
|
|
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: C, 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 && R && !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,8 +8596,8 @@ 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:
|
|
8600
|
-
/* @__PURE__ */ l.jsx("div", { className: D("text-sm text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children:
|
|
8599
|
+
return /* @__PURE__ */ l.jsxs(Ml, { open: N, onOpenChange: k, children: [
|
|
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
|
"..."
|
|
8603
8603
|
] }) }),
|
|
@@ -8607,7 +8607,7 @@ const Nw = K.memo(function({
|
|
|
8607
8607
|
variant: "ghost",
|
|
8608
8608
|
size: "sm",
|
|
8609
8609
|
className: "h-6 text-xs !text-[hsl(var(--chat-bubble-user-text))]",
|
|
8610
|
-
children:
|
|
8610
|
+
children: N ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
8611
8611
|
/* @__PURE__ */ l.jsx(fr, { className: "h-3 w-3 mr-1" }),
|
|
8612
8612
|
" Show less"
|
|
8613
8613
|
] }) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
@@ -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: R ? /* @__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
|
+
R ? /* @__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 && R && (F.toolCallId || F.name) && /* @__PURE__ */ l.jsxs("div", { className: D("mt-2 pt-2 border-t border-current/10 text-xs opacity-60", O && "text-xs"), children: [
|
|
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: j,
|
|
8795
8795
|
onClose: () => {
|
|
8796
8796
|
H(!1), q(null);
|
|
8797
8797
|
},
|
|
@@ -9045,88 +9045,93 @@ function Hw({
|
|
|
9045
9045
|
style: p,
|
|
9046
9046
|
emptyMessage: b
|
|
9047
9047
|
}) {
|
|
9048
|
-
const g =
|
|
9048
|
+
const g = at(null), x = at(null), m = at(!1), v = at(!0), w = at(e.length);
|
|
9049
9049
|
Ue(() => {
|
|
9050
|
-
const
|
|
9051
|
-
if (!
|
|
9052
|
-
const
|
|
9053
|
-
const
|
|
9054
|
-
|
|
9050
|
+
const S = g.current;
|
|
9051
|
+
if (!S) return;
|
|
9052
|
+
const C = () => {
|
|
9053
|
+
const R = S.scrollHeight - S.scrollTop - S.clientHeight;
|
|
9054
|
+
v.current = R <= 32;
|
|
9055
9055
|
};
|
|
9056
|
-
return
|
|
9057
|
-
|
|
9056
|
+
return S.addEventListener("scroll", C, { passive: !0 }), C(), () => {
|
|
9057
|
+
S.removeEventListener("scroll", C);
|
|
9058
9058
|
};
|
|
9059
9059
|
}, [e.length]), Ue(() => {
|
|
9060
|
-
e.length <
|
|
9060
|
+
e.length < w.current && (v.current = !0), w.current = e.length;
|
|
9061
9061
|
}, [e.length]), Ue(() => {
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
C && (C.scrollTop = C.scrollHeight, m.current = !0);
|
|
9062
|
+
var S;
|
|
9063
|
+
m.current || v.current && v.current && ((S = x.current) == null || S.scrollToIndex({ index: Math.max(0, e.length - 1), behavior: "auto", align: "end" }), v.current = !0);
|
|
9065
9064
|
}, [e]);
|
|
9066
|
-
const
|
|
9065
|
+
const y = sn(() => {
|
|
9067
9066
|
if (a)
|
|
9068
9067
|
return async () => {
|
|
9069
|
-
if (
|
|
9070
|
-
const
|
|
9071
|
-
if (!
|
|
9068
|
+
if (m.current) return;
|
|
9069
|
+
const S = g.current;
|
|
9070
|
+
if (!S) {
|
|
9072
9071
|
await (a == null ? void 0 : a());
|
|
9073
9072
|
return;
|
|
9074
9073
|
}
|
|
9075
|
-
const
|
|
9076
|
-
|
|
9074
|
+
const C = S.scrollHeight, R = S.scrollTop;
|
|
9075
|
+
m.current = !0;
|
|
9077
9076
|
try {
|
|
9078
9077
|
await a();
|
|
9079
9078
|
} finally {
|
|
9080
9079
|
requestAnimationFrame(() => {
|
|
9081
|
-
const
|
|
9082
|
-
if (!
|
|
9083
|
-
|
|
9080
|
+
const I = g.current;
|
|
9081
|
+
if (!I) {
|
|
9082
|
+
m.current = !1;
|
|
9084
9083
|
return;
|
|
9085
9084
|
}
|
|
9086
|
-
const
|
|
9087
|
-
|
|
9088
|
-
const
|
|
9089
|
-
|
|
9085
|
+
const N = I.scrollHeight;
|
|
9086
|
+
I.scrollTop = R + (N - C);
|
|
9087
|
+
const k = N - I.scrollTop - I.clientHeight;
|
|
9088
|
+
v.current = k <= 32, m.current = !1;
|
|
9090
9089
|
});
|
|
9091
9090
|
}
|
|
9092
9091
|
};
|
|
9093
|
-
}, [a]),
|
|
9094
|
-
g.current =
|
|
9092
|
+
}, [a]), E = (S, C) => {
|
|
9093
|
+
g.current = S, C && (typeof C == "function" ? C(S) : C.current = S);
|
|
9095
9094
|
};
|
|
9096
9095
|
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(
|
|
9097
9096
|
bv,
|
|
9098
9097
|
{
|
|
9098
|
+
ref: (S) => {
|
|
9099
|
+
x.current = S;
|
|
9100
|
+
},
|
|
9099
9101
|
data: e,
|
|
9100
|
-
followOutput:
|
|
9102
|
+
followOutput: "smooth",
|
|
9101
9103
|
overscan: 120,
|
|
9102
9104
|
increaseViewportBy: { top: 200, bottom: 200 },
|
|
9103
9105
|
startReached: () => {
|
|
9104
|
-
|
|
9106
|
+
y && y();
|
|
9107
|
+
},
|
|
9108
|
+
atBottomStateChange: (S) => {
|
|
9109
|
+
v.current = S;
|
|
9105
9110
|
},
|
|
9106
9111
|
style: { height: "100%", overscrollBehavior: "contain" },
|
|
9107
|
-
computeItemKey: (
|
|
9112
|
+
computeItemKey: (S, C) => C.id ?? `message-${S}`,
|
|
9108
9113
|
components: {
|
|
9109
|
-
Scroller: K.forwardRef((
|
|
9114
|
+
Scroller: K.forwardRef((S, C) => /* @__PURE__ */ l.jsx(
|
|
9110
9115
|
"div",
|
|
9111
9116
|
{
|
|
9112
|
-
...
|
|
9113
|
-
ref: (
|
|
9117
|
+
...S,
|
|
9118
|
+
ref: (R) => E(R, C),
|
|
9114
9119
|
style: {
|
|
9115
9120
|
overflowAnchor: "none",
|
|
9116
9121
|
willChange: "transform",
|
|
9117
|
-
...(
|
|
9122
|
+
...(S == null ? void 0 : S.style) ?? {}
|
|
9118
9123
|
}
|
|
9119
9124
|
}
|
|
9120
9125
|
))
|
|
9121
9126
|
},
|
|
9122
|
-
itemContent: (
|
|
9127
|
+
itemContent: (S, C) => /* @__PURE__ */ l.jsx("div", { className: "mb-4 last:mb-0", children: /* @__PURE__ */ l.jsx(
|
|
9123
9128
|
Nw,
|
|
9124
9129
|
{
|
|
9125
|
-
message:
|
|
9126
|
-
messageIndex:
|
|
9127
|
-
isStreamingMessage: t && n ===
|
|
9130
|
+
message: C,
|
|
9131
|
+
messageIndex: S,
|
|
9132
|
+
isStreamingMessage: t && n === C.id,
|
|
9128
9133
|
streamingDebounceMs: r,
|
|
9129
|
-
isEditing: i ===
|
|
9134
|
+
isEditing: i === C.id,
|
|
9130
9135
|
showActions: s,
|
|
9131
9136
|
showTimestamp: !1,
|
|
9132
9137
|
showAgentName: !0,
|
|
@@ -9134,11 +9139,11 @@ function Hw({
|
|
|
9134
9139
|
truncateToolMessages: !1,
|
|
9135
9140
|
toolMessagePreviewLength: 200,
|
|
9136
9141
|
onEdit: c,
|
|
9137
|
-
onRegenerate: () => u(
|
|
9142
|
+
onRegenerate: () => u(S),
|
|
9138
9143
|
onCancelEdit: d
|
|
9139
9144
|
},
|
|
9140
|
-
|
|
9141
|
-
)
|
|
9145
|
+
C.id ?? `msg-${C.role}-${S}-${C.createdAt ?? ""}`
|
|
9146
|
+
) })
|
|
9142
9147
|
}
|
|
9143
9148
|
) });
|
|
9144
9149
|
}
|
|
@@ -9192,15 +9197,15 @@ function la(e) {
|
|
|
9192
9197
|
i.displayName = t;
|
|
9193
9198
|
const a = e + "CollectionSlot", c = qn(a), u = K.forwardRef(
|
|
9194
9199
|
(x, m) => {
|
|
9195
|
-
const { scope: v, children: w } = x, y = s(a, v),
|
|
9196
|
-
return /* @__PURE__ */ l.jsx(c, { ref:
|
|
9200
|
+
const { scope: v, children: w } = x, y = s(a, v), E = Ce(m, y.collectionRef);
|
|
9201
|
+
return /* @__PURE__ */ l.jsx(c, { ref: E, children: w });
|
|
9197
9202
|
}
|
|
9198
9203
|
);
|
|
9199
9204
|
u.displayName = a;
|
|
9200
9205
|
const d = e + "CollectionItemSlot", h = "data-radix-collection-item", p = qn(d), b = K.forwardRef(
|
|
9201
9206
|
(x, m) => {
|
|
9202
|
-
const { scope: v, children: w, ...y } = x,
|
|
9203
|
-
return K.useEffect(() => (
|
|
9207
|
+
const { scope: v, children: w, ...y } = x, E = K.useRef(null), S = Ce(m, E), C = s(d, v);
|
|
9208
|
+
return K.useEffect(() => (C.itemMap.set(E, { ref: E, ...y }), () => void C.itemMap.delete(E))), /* @__PURE__ */ l.jsx(p, { [h]: "", ref: S, children: w });
|
|
9204
9209
|
}
|
|
9205
9210
|
);
|
|
9206
9211
|
b.displayName = d;
|
|
@@ -9211,7 +9216,7 @@ function la(e) {
|
|
|
9211
9216
|
if (!w) return [];
|
|
9212
9217
|
const y = Array.from(w.querySelectorAll(`[${h}]`));
|
|
9213
9218
|
return Array.from(m.itemMap.values()).sort(
|
|
9214
|
-
(
|
|
9219
|
+
(C, R) => y.indexOf(C.ref.current) - y.indexOf(R.ref.current)
|
|
9215
9220
|
);
|
|
9216
9221
|
}, [m.collectionRef, m.itemMap]);
|
|
9217
9222
|
}
|
|
@@ -9402,7 +9407,7 @@ const ny = async (e, t, n) => {
|
|
|
9402
9407
|
} = a[x], {
|
|
9403
9408
|
x: w,
|
|
9404
9409
|
y,
|
|
9405
|
-
data:
|
|
9410
|
+
data: E,
|
|
9406
9411
|
reset: S
|
|
9407
9412
|
} = await v({
|
|
9408
9413
|
x: d,
|
|
@@ -9422,7 +9427,7 @@ const ny = async (e, t, n) => {
|
|
|
9422
9427
|
...b,
|
|
9423
9428
|
[m]: {
|
|
9424
9429
|
...b[m],
|
|
9425
|
-
...
|
|
9430
|
+
...E
|
|
9426
9431
|
}
|
|
9427
9432
|
}, S && g <= 50 && (g++, typeof S == "object" && (S.placement && (p = S.placement), S.rects && (u = S.rects === !0 ? await i.getElementRects({
|
|
9428
9433
|
reference: e,
|
|
@@ -9467,7 +9472,7 @@ async function Rr(e, t) {
|
|
|
9467
9472
|
y: o,
|
|
9468
9473
|
width: i.floating.width,
|
|
9469
9474
|
height: i.floating.height
|
|
9470
|
-
} : i.reference, y = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating)),
|
|
9475
|
+
} : i.reference, y = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating)), E = await (s.isElement == null ? void 0 : s.isElement(y)) ? await (s.getScale == null ? void 0 : s.getScale(y)) || {
|
|
9471
9476
|
x: 1,
|
|
9472
9477
|
y: 1
|
|
9473
9478
|
} : {
|
|
@@ -9480,10 +9485,10 @@ async function Rr(e, t) {
|
|
|
9480
9485
|
strategy: c
|
|
9481
9486
|
}) : w);
|
|
9482
9487
|
return {
|
|
9483
|
-
top: (v.top - S.top + g.top) /
|
|
9484
|
-
bottom: (S.bottom - v.bottom + g.bottom) /
|
|
9485
|
-
left: (v.left - S.left + g.left) /
|
|
9486
|
-
right: (S.right - v.right + g.right) /
|
|
9488
|
+
top: (v.top - S.top + g.top) / E.y,
|
|
9489
|
+
bottom: (S.bottom - v.bottom + g.bottom) / E.y,
|
|
9490
|
+
left: (v.left - S.left + g.left) / E.x,
|
|
9491
|
+
right: (S.right - v.right + g.right) / E.x
|
|
9487
9492
|
};
|
|
9488
9493
|
}
|
|
9489
9494
|
const ry = (e) => ({
|
|
@@ -9507,15 +9512,15 @@ const ry = (e) => ({
|
|
|
9507
9512
|
const h = xd(d), p = {
|
|
9508
9513
|
x: n,
|
|
9509
9514
|
y: r
|
|
9510
|
-
}, 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",
|
|
9511
|
-
let
|
|
9512
|
-
(!
|
|
9513
|
-
const I =
|
|
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], C = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
|
|
9516
|
+
let R = C ? C[y] : 0;
|
|
9517
|
+
(!R || !await (i.isElement == null ? void 0 : i.isElement(C))) && (R = a.floating[y] || s.floating[g]);
|
|
9518
|
+
const I = E / 2 - S / 2, N = R / 2 - x[g] / 2 - 1, k = un(h[v], N), M = un(h[w], N), W = k, G = R - x[g] - M, j = R / 2 - x[g] / 2 + I, H = xi(W, j, G), L = !c.arrow && sr(o) != null && j !== H && s.reference[g] / 2 - (j < W ? k : M) - x[g] / 2 < 0, q = L ? j < W ? j - W : j - G : 0;
|
|
9514
9519
|
return {
|
|
9515
9520
|
[b]: p[b] + q,
|
|
9516
9521
|
data: {
|
|
9517
9522
|
[b]: H,
|
|
9518
|
-
centerOffset:
|
|
9523
|
+
centerOffset: j - H - q,
|
|
9519
9524
|
...L && {
|
|
9520
9525
|
alignmentOffset: q
|
|
9521
9526
|
}
|
|
@@ -9547,26 +9552,26 @@ const ry = (e) => ({
|
|
|
9547
9552
|
} = tn(e, t);
|
|
9548
9553
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
9549
9554
|
return {};
|
|
9550
|
-
const v = nn(o), w = Kt(a), y = nn(a) === a,
|
|
9551
|
-
!p &&
|
|
9552
|
-
const
|
|
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)), C = g !== "none";
|
|
9556
|
+
!p && C && S.push(...ey(a, x, g, E));
|
|
9557
|
+
const R = [a, ...S], I = await Rr(t, m), N = [];
|
|
9553
9558
|
let k = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
9554
|
-
if (d &&
|
|
9555
|
-
const
|
|
9556
|
-
|
|
9559
|
+
if (d && N.push(I[v]), h) {
|
|
9560
|
+
const j = qw(o, i, E);
|
|
9561
|
+
N.push(I[j[0]], I[j[1]]);
|
|
9557
9562
|
}
|
|
9558
9563
|
if (k = [...k, {
|
|
9559
9564
|
placement: o,
|
|
9560
|
-
overflows:
|
|
9561
|
-
}], !
|
|
9565
|
+
overflows: N
|
|
9566
|
+
}], !N.every((j) => j <= 0)) {
|
|
9562
9567
|
var M, W;
|
|
9563
|
-
const
|
|
9568
|
+
const j = (((M = s.flip) == null ? void 0 : M.index) || 0) + 1, H = R[j];
|
|
9564
9569
|
if (H && (!(h === "alignment" ? w !== Kt(H) : !1) || // We leave the current main axis only if every placement on that axis
|
|
9565
9570
|
// overflows the main axis.
|
|
9566
9571
|
k.every((O) => Kt(O.placement) === w ? O.overflows[0] > 0 : !0)))
|
|
9567
9572
|
return {
|
|
9568
9573
|
data: {
|
|
9569
|
-
index:
|
|
9574
|
+
index: j,
|
|
9570
9575
|
overflows: k
|
|
9571
9576
|
},
|
|
9572
9577
|
reset: {
|
|
@@ -9579,7 +9584,7 @@ const ry = (e) => ({
|
|
|
9579
9584
|
case "bestFit": {
|
|
9580
9585
|
var G;
|
|
9581
9586
|
const q = (G = k.filter((O) => {
|
|
9582
|
-
if (
|
|
9587
|
+
if (C) {
|
|
9583
9588
|
const _ = Kt(O.placement);
|
|
9584
9589
|
return _ === w || // Create a bias to the `y` side axis due to horizontal
|
|
9585
9590
|
// reading directions favoring greater width.
|
|
@@ -9791,13 +9796,13 @@ const ay = function(e) {
|
|
|
9791
9796
|
...x
|
|
9792
9797
|
};
|
|
9793
9798
|
if (c) {
|
|
9794
|
-
const y = p === "y" ? "height" : "width",
|
|
9795
|
-
b <
|
|
9799
|
+
const y = p === "y" ? "height" : "width", E = s.reference[p] - s.floating[y] + m.mainAxis, S = s.reference[p] + s.reference[y] - m.mainAxis;
|
|
9800
|
+
b < E ? b = E : b > S && (b = S);
|
|
9796
9801
|
}
|
|
9797
9802
|
if (u) {
|
|
9798
9803
|
var v, w;
|
|
9799
|
-
const y = p === "y" ? "width" : "height",
|
|
9800
|
-
g < S ? g = S : g >
|
|
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), C = s.reference[h] + s.reference[y] + (E ? 0 : ((w = i.offset) == null ? void 0 : w[h]) || 0) - (E ? m.crossAxis : 0);
|
|
9805
|
+
g < S ? g = S : g > C && (g = C);
|
|
9801
9806
|
}
|
|
9802
9807
|
return {
|
|
9803
9808
|
[p]: b,
|
|
@@ -9826,19 +9831,19 @@ const ay = function(e) {
|
|
|
9826
9831
|
} = s.floating;
|
|
9827
9832
|
let m, v;
|
|
9828
9833
|
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");
|
|
9829
|
-
const w = x - d.top - d.bottom, y = g - d.left - d.right,
|
|
9830
|
-
let
|
|
9831
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (I = y), (r = t.middlewareData.shift) != null && r.enabled.y && (
|
|
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), C = !t.middlewareData.shift;
|
|
9835
|
+
let R = E, I = S;
|
|
9836
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (I = y), (r = t.middlewareData.shift) != null && r.enabled.y && (R = w), C && !p) {
|
|
9832
9837
|
const k = vt(d.left, 0), M = vt(d.right, 0), W = vt(d.top, 0), G = vt(d.bottom, 0);
|
|
9833
|
-
b ? I = g - 2 * (k !== 0 || M !== 0 ? k + M : vt(d.left, d.right)) :
|
|
9838
|
+
b ? I = g - 2 * (k !== 0 || M !== 0 ? k + M : vt(d.left, d.right)) : R = x - 2 * (W !== 0 || G !== 0 ? W + G : vt(d.top, d.bottom));
|
|
9834
9839
|
}
|
|
9835
9840
|
await c({
|
|
9836
9841
|
...t,
|
|
9837
9842
|
availableWidth: I,
|
|
9838
|
-
availableHeight:
|
|
9843
|
+
availableHeight: R
|
|
9839
9844
|
});
|
|
9840
|
-
const
|
|
9841
|
-
return g !==
|
|
9845
|
+
const N = await i.getDimensions(a.floating);
|
|
9846
|
+
return g !== N.width || x !== N.height ? {
|
|
9842
9847
|
reset: {
|
|
9843
9848
|
rects: !0
|
|
9844
9849
|
}
|
|
@@ -10010,8 +10015,8 @@ function In(e, t, n, r) {
|
|
|
10010
10015
|
const p = yt(s), b = r && Ft(r) ? yt(r) : r;
|
|
10011
10016
|
let g = p, x = bi(g);
|
|
10012
10017
|
for (; x && r && b !== g; ) {
|
|
10013
|
-
const m = Kn(x), v = x.getBoundingClientRect(), w = Bt(x), y = v.left + (x.clientLeft + parseFloat(w.paddingLeft)) * m.x,
|
|
10014
|
-
c *= m.x, u *= m.y, d *= m.x, h *= m.y, c += y, u +=
|
|
10018
|
+
const m = Kn(x), v = x.getBoundingClientRect(), w = Bt(x), y = v.left + (x.clientLeft + parseFloat(w.paddingLeft)) * m.x, E = v.top + (x.clientTop + parseFloat(w.paddingTop)) * m.y;
|
|
10019
|
+
c *= m.x, u *= m.y, d *= m.x, h *= m.y, c += y, u += E, g = yt(x), x = bi(g);
|
|
10015
10020
|
}
|
|
10016
10021
|
}
|
|
10017
10022
|
return ko({
|
|
@@ -10272,17 +10277,17 @@ function My(e, t) {
|
|
|
10272
10277
|
rootMargin: -g + "px " + -x + "px " + -m + "px " + -v + "px",
|
|
10273
10278
|
threshold: vt(0, un(1, c)) || 1
|
|
10274
10279
|
};
|
|
10275
|
-
let
|
|
10276
|
-
function S(
|
|
10277
|
-
const
|
|
10278
|
-
if (
|
|
10279
|
-
if (!
|
|
10280
|
+
let E = !0;
|
|
10281
|
+
function S(C) {
|
|
10282
|
+
const R = C[0].intersectionRatio;
|
|
10283
|
+
if (R !== c) {
|
|
10284
|
+
if (!E)
|
|
10280
10285
|
return i();
|
|
10281
|
-
|
|
10286
|
+
R ? i(!1, R) : r = setTimeout(() => {
|
|
10282
10287
|
i(!1, 1e-7);
|
|
10283
10288
|
}, 1e3);
|
|
10284
10289
|
}
|
|
10285
|
-
|
|
10290
|
+
R === 1 && !Ed(u, e.getBoundingClientRect()) && i(), E = !1;
|
|
10286
10291
|
}
|
|
10287
10292
|
try {
|
|
10288
10293
|
n = new IntersectionObserver(S, {
|
|
@@ -10415,18 +10420,18 @@ function Gy(e) {
|
|
|
10415
10420
|
}), [p, b] = f.useState(r);
|
|
10416
10421
|
Po(p, r) || b(r);
|
|
10417
10422
|
const [g, x] = f.useState(null), [m, v] = f.useState(null), w = f.useCallback((O) => {
|
|
10418
|
-
O !==
|
|
10423
|
+
O !== C.current && (C.current = O, x(O));
|
|
10419
10424
|
}, []), y = f.useCallback((O) => {
|
|
10420
|
-
O !==
|
|
10421
|
-
}, []),
|
|
10422
|
-
if (!
|
|
10425
|
+
O !== R.current && (R.current = O, v(O));
|
|
10426
|
+
}, []), E = s || g, S = i || m, C = f.useRef(null), R = f.useRef(null), I = f.useRef(d), N = c != null, k = Ks(c), M = Ks(o), W = Ks(u), G = f.useCallback(() => {
|
|
10427
|
+
if (!C.current || !R.current)
|
|
10423
10428
|
return;
|
|
10424
10429
|
const O = {
|
|
10425
10430
|
placement: t,
|
|
10426
10431
|
strategy: n,
|
|
10427
10432
|
middleware: p
|
|
10428
10433
|
};
|
|
10429
|
-
M.current && (O.platform = M.current), Uy(
|
|
10434
|
+
M.current && (O.platform = M.current), Uy(C.current, R.current, O).then((_) => {
|
|
10430
10435
|
const z = {
|
|
10431
10436
|
..._,
|
|
10432
10437
|
// The floating element's position may be recomputed while it's closed
|
|
@@ -10435,7 +10440,7 @@ function Gy(e) {
|
|
|
10435
10440
|
// setting it to `true` when `open === false` (must be specified).
|
|
10436
10441
|
isPositioned: W.current !== !1
|
|
10437
10442
|
};
|
|
10438
|
-
|
|
10443
|
+
j.current && !Po(I.current, z) && (I.current = z, Fo.flushSync(() => {
|
|
10439
10444
|
h(z);
|
|
10440
10445
|
}));
|
|
10441
10446
|
});
|
|
@@ -10446,25 +10451,25 @@ function Gy(e) {
|
|
|
10446
10451
|
isPositioned: !1
|
|
10447
10452
|
})));
|
|
10448
10453
|
}, [u]);
|
|
10449
|
-
const
|
|
10450
|
-
mo(() => (
|
|
10451
|
-
|
|
10454
|
+
const j = f.useRef(!1);
|
|
10455
|
+
mo(() => (j.current = !0, () => {
|
|
10456
|
+
j.current = !1;
|
|
10452
10457
|
}), []), mo(() => {
|
|
10453
|
-
if (
|
|
10458
|
+
if (E && (C.current = E), S && (R.current = S), E && S) {
|
|
10454
10459
|
if (k.current)
|
|
10455
|
-
return k.current(
|
|
10460
|
+
return k.current(E, S, G);
|
|
10456
10461
|
G();
|
|
10457
10462
|
}
|
|
10458
|
-
}, [
|
|
10463
|
+
}, [E, S, G, k, N]);
|
|
10459
10464
|
const H = f.useMemo(() => ({
|
|
10460
|
-
reference:
|
|
10461
|
-
floating:
|
|
10465
|
+
reference: C,
|
|
10466
|
+
floating: R,
|
|
10462
10467
|
setReference: w,
|
|
10463
10468
|
setFloating: y
|
|
10464
10469
|
}), [w, y]), L = f.useMemo(() => ({
|
|
10465
|
-
reference:
|
|
10470
|
+
reference: E,
|
|
10466
10471
|
floating: S
|
|
10467
|
-
}), [
|
|
10472
|
+
}), [E, S]), q = f.useMemo(() => {
|
|
10468
10473
|
const O = {
|
|
10469
10474
|
position: n,
|
|
10470
10475
|
left: 0,
|
|
@@ -10608,15 +10613,15 @@ var ga = "PopperContent", [oS, sS] = Ad(ga), Md = f.forwardRef(
|
|
|
10608
10613
|
updatePositionStrategy: b = "optimized",
|
|
10609
10614
|
onPlaced: g,
|
|
10610
10615
|
...x
|
|
10611
|
-
} = e, m = kd(ga, n), [v, w] = f.useState(null), y = Ce(t, (je) => w(je)), [
|
|
10616
|
+
} = e, m = kd(ga, n), [v, w] = f.useState(null), y = Ce(t, (je) => w(je)), [E, S] = f.useState(null), C = jd(E), R = (C == null ? void 0 : C.width) ?? 0, I = (C == null ? void 0 : C.height) ?? 0, N = r + (s !== "center" ? "-" + s : ""), k = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, M = Array.isArray(u) ? u : [u], W = M.length > 0, G = {
|
|
10612
10617
|
padding: k,
|
|
10613
10618
|
boundary: M.filter(aS),
|
|
10614
10619
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
10615
10620
|
altBoundary: W
|
|
10616
|
-
}, { refs:
|
|
10621
|
+
}, { refs: j, floatingStyles: H, placement: L, isPositioned: q, middlewareData: O } = Gy({
|
|
10617
10622
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
10618
10623
|
strategy: "fixed",
|
|
10619
|
-
placement:
|
|
10624
|
+
placement: N,
|
|
10620
10625
|
whileElementsMounted: (...je) => Dy(...je, {
|
|
10621
10626
|
animationFrame: b === "always"
|
|
10622
10627
|
}),
|
|
@@ -10639,8 +10644,8 @@ var ga = "PopperContent", [oS, sS] = Ad(ga), Md = f.forwardRef(
|
|
|
10639
10644
|
$.setProperty("--radix-popper-available-width", `${Oe}px`), $.setProperty("--radix-popper-available-height", `${ue}px`), $.setProperty("--radix-popper-anchor-width", `${Pe}px`), $.setProperty("--radix-popper-anchor-height", `${xe}px`);
|
|
10640
10645
|
}
|
|
10641
10646
|
}),
|
|
10642
|
-
|
|
10643
|
-
lS({ arrowWidth:
|
|
10647
|
+
E && eS({ element: E, padding: a }),
|
|
10648
|
+
lS({ arrowWidth: R, arrowHeight: I }),
|
|
10644
10649
|
p && Qy({ strategy: "referenceHidden", ...G })
|
|
10645
10650
|
]
|
|
10646
10651
|
}), [_, z] = Fd(L), X = rt(g);
|
|
@@ -10653,7 +10658,7 @@ var ga = "PopperContent", [oS, sS] = Ad(ga), Md = f.forwardRef(
|
|
|
10653
10658
|
}, [v]), /* @__PURE__ */ l.jsx(
|
|
10654
10659
|
"div",
|
|
10655
10660
|
{
|
|
10656
|
-
ref:
|
|
10661
|
+
ref: j.setFloating,
|
|
10657
10662
|
"data-radix-popper-content-wrapper": "",
|
|
10658
10663
|
style: {
|
|
10659
10664
|
...H,
|
|
@@ -10797,7 +10802,7 @@ var pS = f.forwardRef((e, t) => {
|
|
|
10797
10802
|
defaultProp: a ?? null,
|
|
10798
10803
|
onChange: c,
|
|
10799
10804
|
caller: $r
|
|
10800
|
-
}), [v, w] = f.useState(!1), y = rt(u),
|
|
10805
|
+
}), [v, w] = f.useState(!1), y = rt(u), E = Bd(n), S = f.useRef(!1), [C, R] = f.useState(0);
|
|
10801
10806
|
return f.useEffect(() => {
|
|
10802
10807
|
const I = p.current;
|
|
10803
10808
|
if (I)
|
|
@@ -10816,17 +10821,17 @@ var pS = f.forwardRef((e, t) => {
|
|
|
10816
10821
|
),
|
|
10817
10822
|
onItemShiftTab: f.useCallback(() => w(!0), []),
|
|
10818
10823
|
onFocusableItemAdd: f.useCallback(
|
|
10819
|
-
() =>
|
|
10824
|
+
() => R((I) => I + 1),
|
|
10820
10825
|
[]
|
|
10821
10826
|
),
|
|
10822
10827
|
onFocusableItemRemove: f.useCallback(
|
|
10823
|
-
() =>
|
|
10828
|
+
() => R((I) => I - 1),
|
|
10824
10829
|
[]
|
|
10825
10830
|
),
|
|
10826
10831
|
children: /* @__PURE__ */ l.jsx(
|
|
10827
10832
|
me.div,
|
|
10828
10833
|
{
|
|
10829
|
-
tabIndex: v ||
|
|
10834
|
+
tabIndex: v || C === 0 ? -1 : 0,
|
|
10830
10835
|
"data-orientation": r,
|
|
10831
10836
|
...h,
|
|
10832
10837
|
ref: b,
|
|
@@ -10835,11 +10840,11 @@ var pS = f.forwardRef((e, t) => {
|
|
|
10835
10840
|
S.current = !0;
|
|
10836
10841
|
}),
|
|
10837
10842
|
onFocus: Q(e.onFocus, (I) => {
|
|
10838
|
-
const
|
|
10839
|
-
if (I.target === I.currentTarget &&
|
|
10843
|
+
const N = !S.current;
|
|
10844
|
+
if (I.target === I.currentTarget && N && !v) {
|
|
10840
10845
|
const k = new CustomEvent(Ys, cS);
|
|
10841
10846
|
if (I.currentTarget.dispatchEvent(k), !k.defaultPrevented) {
|
|
10842
|
-
const M =
|
|
10847
|
+
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(
|
|
10843
10848
|
Boolean
|
|
10844
10849
|
).map((L) => L.ref.current);
|
|
10845
10850
|
Wd(H, d);
|
|
@@ -10893,12 +10898,12 @@ var pS = f.forwardRef((e, t) => {
|
|
|
10893
10898
|
if (v !== void 0) {
|
|
10894
10899
|
if (m.metaKey || m.ctrlKey || m.altKey || m.shiftKey) return;
|
|
10895
10900
|
m.preventDefault();
|
|
10896
|
-
let y = p().filter((
|
|
10901
|
+
let y = p().filter((E) => E.focusable).map((E) => E.ref.current);
|
|
10897
10902
|
if (v === "last") y.reverse();
|
|
10898
10903
|
else if (v === "prev" || v === "next") {
|
|
10899
10904
|
v === "prev" && y.reverse();
|
|
10900
|
-
const
|
|
10901
|
-
y = d.loop ? vS(y,
|
|
10905
|
+
const E = y.indexOf(m.currentTarget);
|
|
10906
|
+
y = d.loop ? vS(y, E + 1) : y.slice(E + 1);
|
|
10902
10907
|
}
|
|
10903
10908
|
setTimeout(() => Wd(y));
|
|
10904
10909
|
}
|
|
@@ -11051,14 +11056,14 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
|
|
|
11051
11056
|
onDismiss: b,
|
|
11052
11057
|
disableOutsideScroll: g,
|
|
11053
11058
|
...x
|
|
11054
|
-
} = e, m = _n(It, n), v = Ur(It, n), w = us(n), y = Kd(n),
|
|
11059
|
+
} = e, m = _n(It, n), v = Ur(It, n), w = us(n), y = Kd(n), E = RS(n), [S, C] = f.useState(null), R = f.useRef(null), I = Ce(t, R, m.onContentChange), N = f.useRef(0), k = f.useRef(""), M = f.useRef(0), W = f.useRef(null), G = f.useRef("right"), j = f.useRef(0), H = g ? es : f.Fragment, L = g ? { as: OS, allowPinchZoom: !0 } : void 0, q = (_) => {
|
|
11055
11060
|
var Y, P;
|
|
11056
|
-
const z = k.current + _, X =
|
|
11061
|
+
const z = k.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;
|
|
11057
11062
|
(function Z(ne) {
|
|
11058
|
-
k.current = ne, window.clearTimeout(
|
|
11063
|
+
k.current = ne, window.clearTimeout(N.current), ne !== "" && (N.current = window.setTimeout(() => Z(""), 1e3));
|
|
11059
11064
|
})(z), be && setTimeout(() => be.focus());
|
|
11060
11065
|
};
|
|
11061
|
-
f.useEffect(() => () => window.clearTimeout(
|
|
11066
|
+
f.useEffect(() => () => window.clearTimeout(N.current), []), ra();
|
|
11062
11067
|
const O = f.useCallback((_) => {
|
|
11063
11068
|
var X, oe;
|
|
11064
11069
|
return G.current === ((X = W.current) == null ? void 0 : X.side) && YS(_, (oe = W.current) == null ? void 0 : oe.area);
|
|
@@ -11077,7 +11082,7 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
|
|
|
11077
11082
|
onItemLeave: f.useCallback(
|
|
11078
11083
|
(_) => {
|
|
11079
11084
|
var z;
|
|
11080
|
-
O(_) || ((z =
|
|
11085
|
+
O(_) || ((z = R.current) == null || z.focus(), C(null));
|
|
11081
11086
|
},
|
|
11082
11087
|
[O]
|
|
11083
11088
|
),
|
|
@@ -11098,7 +11103,7 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
|
|
|
11098
11103
|
trapped: o,
|
|
11099
11104
|
onMountAutoFocus: Q(s, (_) => {
|
|
11100
11105
|
var z;
|
|
11101
|
-
_.preventDefault(), (z =
|
|
11106
|
+
_.preventDefault(), (z = R.current) == null || z.focus({ preventScroll: !0 });
|
|
11102
11107
|
}),
|
|
11103
11108
|
onUnmountAutoFocus: i,
|
|
11104
11109
|
children: /* @__PURE__ */ l.jsx(
|
|
@@ -11120,7 +11125,7 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
|
|
|
11120
11125
|
orientation: "vertical",
|
|
11121
11126
|
loop: r,
|
|
11122
11127
|
currentTabStopId: S,
|
|
11123
|
-
onCurrentTabStopIdChange:
|
|
11128
|
+
onCurrentTabStopIdChange: C,
|
|
11124
11129
|
onEntryFocus: Q(c, (_) => {
|
|
11125
11130
|
v.isUsingKeyboardRef.current || _.preventDefault();
|
|
11126
11131
|
}),
|
|
@@ -11140,22 +11145,22 @@ var It = "MenuContent", [kS, Ca] = Pn(It), Jd = f.forwardRef(
|
|
|
11140
11145
|
onKeyDown: Q(x.onKeyDown, (_) => {
|
|
11141
11146
|
const X = _.target.closest("[data-radix-menu-content]") === _.currentTarget, oe = _.ctrlKey || _.altKey || _.metaKey, F = _.key.length === 1;
|
|
11142
11147
|
X && (_.key === "Tab" && _.preventDefault(), !oe && F && q(_.key));
|
|
11143
|
-
const ee =
|
|
11148
|
+
const ee = R.current;
|
|
11144
11149
|
if (_.target !== ee || !SS.includes(_.key)) return;
|
|
11145
11150
|
_.preventDefault();
|
|
11146
|
-
const be =
|
|
11151
|
+
const be = E().filter((Y) => !Y.disabled).map((Y) => Y.ref.current);
|
|
11147
11152
|
Vd.includes(_.key) && be.reverse(), WS(be);
|
|
11148
11153
|
}),
|
|
11149
11154
|
onBlur: Q(e.onBlur, (_) => {
|
|
11150
|
-
_.currentTarget.contains(_.target) || (window.clearTimeout(
|
|
11155
|
+
_.currentTarget.contains(_.target) || (window.clearTimeout(N.current), k.current = "");
|
|
11151
11156
|
}),
|
|
11152
11157
|
onPointerMove: Q(
|
|
11153
11158
|
e.onPointerMove,
|
|
11154
11159
|
Nr((_) => {
|
|
11155
|
-
const z = _.target, X =
|
|
11160
|
+
const z = _.target, X = j.current !== _.clientX;
|
|
11156
11161
|
if (_.currentTarget.contains(z) && X) {
|
|
11157
|
-
const oe = _.clientX >
|
|
11158
|
-
G.current = oe,
|
|
11162
|
+
const oe = _.clientX > j.current ? "right" : "left";
|
|
11163
|
+
G.current = oe, j.current = _.clientX;
|
|
11159
11164
|
}
|
|
11160
11165
|
})
|
|
11161
11166
|
)
|
|
@@ -11818,14 +11823,14 @@ function go({
|
|
|
11818
11823
|
send: v,
|
|
11819
11824
|
stop: w,
|
|
11820
11825
|
lastCheckpointId: y,
|
|
11821
|
-
listCheckpoints:
|
|
11826
|
+
listCheckpoints: E,
|
|
11822
11827
|
navigateToCheckpoint: S,
|
|
11823
|
-
returnToLatest:
|
|
11824
|
-
hasMoreHistory:
|
|
11828
|
+
returnToLatest: C,
|
|
11829
|
+
hasMoreHistory: R,
|
|
11825
11830
|
isLoadingHistory: I,
|
|
11826
|
-
loadOlderMessages:
|
|
11831
|
+
loadOlderMessages: N,
|
|
11827
11832
|
api: k
|
|
11828
|
-
} = Fi(), [M, W] = de(null), [G,
|
|
11833
|
+
} = Fi(), [M, W] = de(null), [G, j] = 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 = at(null), Le = at(null), Oe = at(null), [ue, Pe] = de("desktop");
|
|
11829
11834
|
Ue(() => {
|
|
11830
11835
|
const J = () => {
|
|
11831
11836
|
const ce = window.innerWidth;
|
|
@@ -11843,7 +11848,7 @@ function go({
|
|
|
11843
11848
|
checkpointId: y ?? null
|
|
11844
11849
|
}, _e = Oe.current;
|
|
11845
11850
|
if (!(_e && _e.threadId === ce.threadId && _e.checkpointId === ce.checkpointId))
|
|
11846
|
-
return
|
|
11851
|
+
return E(p).then((qe) => {
|
|
11847
11852
|
if (J) return;
|
|
11848
11853
|
const Mn = ((qe == null ? void 0 : qe.checkpoints) ?? []).slice().sort((Dn, Pt) => new Date(Pt.createdAt).getTime() - new Date(Dn.createdAt).getTime());
|
|
11849
11854
|
ne(Mn), se((Dn) => {
|
|
@@ -11855,17 +11860,17 @@ function go({
|
|
|
11855
11860
|
}), () => {
|
|
11856
11861
|
J = !0;
|
|
11857
11862
|
};
|
|
11858
|
-
}, [p, y,
|
|
11863
|
+
}, [p, y, E]), Ue(() => {
|
|
11859
11864
|
y && se(y);
|
|
11860
11865
|
}, [y]);
|
|
11861
11866
|
const xe = ze(async () => {
|
|
11862
|
-
if (!(!
|
|
11867
|
+
if (!(!R || I))
|
|
11863
11868
|
try {
|
|
11864
|
-
await
|
|
11869
|
+
await N();
|
|
11865
11870
|
} catch (J) {
|
|
11866
11871
|
console.warn("loadOlderMessages failed", J);
|
|
11867
11872
|
}
|
|
11868
|
-
}, [
|
|
11873
|
+
}, [R, I, N]);
|
|
11869
11874
|
Ue(() => {
|
|
11870
11875
|
(async () => {
|
|
11871
11876
|
try {
|
|
@@ -11905,16 +11910,16 @@ function go({
|
|
|
11905
11910
|
}
|
|
11906
11911
|
}
|
|
11907
11912
|
try {
|
|
11908
|
-
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),
|
|
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), j("");
|
|
11909
11914
|
} catch (_e) {
|
|
11910
11915
|
const qe = (_e == null ? void 0 : _e.message) || "Failed to send message";
|
|
11911
11916
|
L(qe), h == null || h(qe);
|
|
11912
11917
|
}
|
|
11913
11918
|
}
|
|
11914
11919
|
}, et = K.useCallback((J, ce) => {
|
|
11915
|
-
a && (W(J),
|
|
11920
|
+
a && (W(J), j(ce), L(null));
|
|
11916
11921
|
}, [a]), nt = K.useCallback(() => {
|
|
11917
|
-
W(null),
|
|
11922
|
+
W(null), j(""), L(null);
|
|
11918
11923
|
}, []), ot = ze((J, ce) => {
|
|
11919
11924
|
et(J, ce);
|
|
11920
11925
|
}, [et]), Ze = ze((J) => {
|
|
@@ -11952,12 +11957,12 @@ function go({
|
|
|
11952
11957
|
}, it = async (J) => {
|
|
11953
11958
|
if (p) {
|
|
11954
11959
|
if (!J) {
|
|
11955
|
-
await
|
|
11960
|
+
await C(), se(null);
|
|
11956
11961
|
return;
|
|
11957
11962
|
}
|
|
11958
11963
|
await S(J), se(J);
|
|
11959
11964
|
}
|
|
11960
|
-
}, kt = `flex flex-1 w-full flex-col min-h-0 min-w-0 max-h-full overflow-hidden bg-transparent ${e} ${c.container || ""}`, xn = `flex-1 min-h-0 min-w-0 max-h-full w-full overflow-y-auto overflow-x-auto overscroll-contain break-words break-anywhere p-4
|
|
11965
|
+
}, kt = `flex flex-1 w-full flex-col min-h-0 min-w-0 max-h-full overflow-hidden bg-transparent ${e} ${c.container || ""}`, xn = `flex-1 min-h-0 min-w-0 max-h-full w-full overflow-y-auto overflow-x-auto overscroll-contain break-words break-anywhere p-4 bg-transparent ${c.messagesArea || ""}`, On = `flex-shrink-0 w-full border-t p-4 bg-transparent ${c.inputArea || ""}`;
|
|
11961
11966
|
return /* @__PURE__ */ l.jsxs("div", { className: kt, children: [
|
|
11962
11967
|
!!m && !he && /* @__PURE__ */ l.jsxs("div", { className: "flex-shrink-0 bg-red-50 border border-red-200 text-red-800 px-4 py-2 text-sm flex items-center justify-between", children: [
|
|
11963
11968
|
/* @__PURE__ */ l.jsx("span", { children: m }),
|
|
@@ -12167,7 +12172,7 @@ var Na = "ScrollArea", [Hf, hR] = $t(Na), [B0, jt] = Hf(Na), $f = f.forwardRef(
|
|
|
12167
12172
|
dir: o,
|
|
12168
12173
|
scrollHideDelay: s = 600,
|
|
12169
12174
|
...i
|
|
12170
|
-
} = 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,
|
|
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, C] = f.useState(!1), [R, I] = f.useState(!1), N = Ce(t, (M) => c(M)), k = ss(o);
|
|
12171
12176
|
return /* @__PURE__ */ l.jsx(
|
|
12172
12177
|
B0,
|
|
12173
12178
|
{
|
|
@@ -12183,19 +12188,19 @@ var Na = "ScrollArea", [Hf, hR] = $t(Na), [B0, jt] = Hf(Na), $f = f.forwardRef(
|
|
|
12183
12188
|
scrollbarX: b,
|
|
12184
12189
|
onScrollbarXChange: g,
|
|
12185
12190
|
scrollbarXEnabled: S,
|
|
12186
|
-
onScrollbarXEnabledChange:
|
|
12191
|
+
onScrollbarXEnabledChange: C,
|
|
12187
12192
|
scrollbarY: x,
|
|
12188
12193
|
onScrollbarYChange: m,
|
|
12189
|
-
scrollbarYEnabled:
|
|
12194
|
+
scrollbarYEnabled: R,
|
|
12190
12195
|
onScrollbarYEnabledChange: I,
|
|
12191
12196
|
onCornerWidthChange: w,
|
|
12192
|
-
onCornerHeightChange:
|
|
12197
|
+
onCornerHeightChange: E,
|
|
12193
12198
|
children: /* @__PURE__ */ l.jsx(
|
|
12194
12199
|
me.div,
|
|
12195
12200
|
{
|
|
12196
12201
|
dir: k,
|
|
12197
12202
|
...i,
|
|
12198
|
-
ref:
|
|
12203
|
+
ref: N,
|
|
12199
12204
|
style: {
|
|
12200
12205
|
position: "relative",
|
|
12201
12206
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
@@ -12489,20 +12494,20 @@ var H0 = f.forwardRef((e, t) => {
|
|
|
12489
12494
|
onWheelScroll: d,
|
|
12490
12495
|
onResize: h,
|
|
12491
12496
|
...p
|
|
12492
|
-
} = e, b = jt(Zt, n), [g, x] = f.useState(null), m = Ce(t, (
|
|
12493
|
-
function I(
|
|
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 = rt(d), C = rt(c), R = ps(h, 10);
|
|
12498
|
+
function I(N) {
|
|
12494
12499
|
if (v.current) {
|
|
12495
|
-
const k =
|
|
12500
|
+
const k = N.clientX - v.current.left, M = N.clientY - v.current.top;
|
|
12496
12501
|
u({ x: k, y: M });
|
|
12497
12502
|
}
|
|
12498
12503
|
}
|
|
12499
12504
|
return f.useEffect(() => {
|
|
12500
|
-
const
|
|
12505
|
+
const N = (k) => {
|
|
12501
12506
|
const M = k.target;
|
|
12502
|
-
(g == null ? void 0 : g.contains(M)) && S(k,
|
|
12507
|
+
(g == null ? void 0 : g.contains(M)) && S(k, E);
|
|
12503
12508
|
};
|
|
12504
|
-
return document.addEventListener("wheel",
|
|
12505
|
-
}, [y, g,
|
|
12509
|
+
return document.addEventListener("wheel", N, { passive: !1 }), () => document.removeEventListener("wheel", N, { passive: !1 });
|
|
12510
|
+
}, [y, g, E, S]), f.useEffect(C, [r, C]), Zn(g, R), Zn(b.content, R), /* @__PURE__ */ l.jsx(
|
|
12506
12511
|
W0,
|
|
12507
12512
|
{
|
|
12508
12513
|
scope: n,
|
|
@@ -12510,7 +12515,7 @@ var H0 = f.forwardRef((e, t) => {
|
|
|
12510
12515
|
hasThumb: o,
|
|
12511
12516
|
onThumbChange: rt(s),
|
|
12512
12517
|
onThumbPointerUp: rt(i),
|
|
12513
|
-
onThumbPositionChange:
|
|
12518
|
+
onThumbPositionChange: C,
|
|
12514
12519
|
onThumbPointerDown: rt(a),
|
|
12515
12520
|
children: /* @__PURE__ */ l.jsx(
|
|
12516
12521
|
me.div,
|
|
@@ -12518,13 +12523,13 @@ var H0 = f.forwardRef((e, t) => {
|
|
|
12518
12523
|
...p,
|
|
12519
12524
|
ref: m,
|
|
12520
12525
|
style: { position: "absolute", ...p.style },
|
|
12521
|
-
onPointerDown: Q(e.onPointerDown, (
|
|
12522
|
-
|
|
12526
|
+
onPointerDown: Q(e.onPointerDown, (N) => {
|
|
12527
|
+
N.button === 0 && (N.target.setPointerCapture(N.pointerId), v.current = g.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", b.viewport && (b.viewport.style.scrollBehavior = "auto"), I(N));
|
|
12523
12528
|
}),
|
|
12524
12529
|
onPointerMove: Q(e.onPointerMove, I),
|
|
12525
|
-
onPointerUp: Q(e.onPointerUp, (
|
|
12526
|
-
const k =
|
|
12527
|
-
k.hasPointerCapture(
|
|
12530
|
+
onPointerUp: Q(e.onPointerUp, (N) => {
|
|
12531
|
+
const k = N.target;
|
|
12532
|
+
k.hasPointerCapture(N.pointerId) && k.releasePointerCapture(N.pointerId), document.body.style.webkitUserSelect = w.current, b.viewport && (b.viewport.style.scrollBehavior = ""), v.current = null;
|
|
12528
12533
|
})
|
|
12529
12534
|
}
|
|
12530
12535
|
)
|
|
@@ -12718,11 +12723,11 @@ function Ti({
|
|
|
12718
12723
|
createThread: x,
|
|
12719
12724
|
deleteThread: m,
|
|
12720
12725
|
renameThread: v
|
|
12721
|
-
} = Fi(), [w, y] = de(p ?? []), [
|
|
12726
|
+
} = Fi(), [w, y] = de(p ?? []), [E, S] = de(!1), [C, R] = de(null), [I, N] = de(null), [k, M] = de(""), [W, G] = de(!1);
|
|
12722
12727
|
Ue(() => {
|
|
12723
12728
|
y(p ?? []);
|
|
12724
12729
|
}, [p]);
|
|
12725
|
-
const
|
|
12730
|
+
const j = async (F) => {
|
|
12726
12731
|
try {
|
|
12727
12732
|
await h(F), a == null || a(F), c == null || c(F);
|
|
12728
12733
|
} catch (ee) {
|
|
@@ -12746,16 +12751,16 @@ function Ti({
|
|
|
12746
12751
|
console.error("Failed to delete thread:", he);
|
|
12747
12752
|
}
|
|
12748
12753
|
}, q = (F, ee) => {
|
|
12749
|
-
ee.stopPropagation(),
|
|
12754
|
+
ee.stopPropagation(), N(F.threadId), M(F.title || `Thread ${F.threadId.slice(0, 8)}`);
|
|
12750
12755
|
}, O = async (F) => {
|
|
12751
12756
|
if (k.trim())
|
|
12752
12757
|
try {
|
|
12753
|
-
await v(F, k.trim()),
|
|
12758
|
+
await v(F, k.trim()), N(null), M("");
|
|
12754
12759
|
} catch (ee) {
|
|
12755
12760
|
console.error("Failed to update title:", ee);
|
|
12756
12761
|
}
|
|
12757
12762
|
}, _ = () => {
|
|
12758
|
-
|
|
12763
|
+
N(null), M("");
|
|
12759
12764
|
}, z = (F, ee) => {
|
|
12760
12765
|
F.key === "Enter" ? O(ee) : F.key === "Escape" && _();
|
|
12761
12766
|
}, X = (F) => {
|
|
@@ -12772,7 +12777,7 @@ function Ti({
|
|
|
12772
12777
|
Ne,
|
|
12773
12778
|
{
|
|
12774
12779
|
onClick: H,
|
|
12775
|
-
disabled: W ||
|
|
12780
|
+
disabled: W || E,
|
|
12776
12781
|
className: s.createButton || "p-2",
|
|
12777
12782
|
size: "sm",
|
|
12778
12783
|
variant: "ghost",
|
|
@@ -12785,13 +12790,13 @@ function Ti({
|
|
|
12785
12790
|
{
|
|
12786
12791
|
className: `flex-1 min-h-0 ${s.threadList || ""}`,
|
|
12787
12792
|
style: o ? { maxHeight: o } : void 0,
|
|
12788
|
-
children: /* @__PURE__ */ l.jsx("div", { className: "p-2 space-y-1 pb-4", children:
|
|
12793
|
+
children: /* @__PURE__ */ l.jsx("div", { className: "p-2 space-y-1 pb-4", children: E ? /* @__PURE__ */ l.jsx("div", { className: "text-center py-8 text-slate-400", children: "Loading…" }) : w.length === 0 ? /* @__PURE__ */ l.jsxs("div", { className: "text-center py-8 text-slate-400", children: [
|
|
12789
12794
|
/* @__PURE__ */ l.jsx(Jp, { className: "w-8 h-8 mx-auto mb-2 opacity-40 text-slate-500" }),
|
|
12790
12795
|
/* @__PURE__ */ l.jsx("p", { className: "text-sm text-slate-500", children: "No conversations yet" })
|
|
12791
12796
|
] }) : w.slice().sort((F, ee) => new Date(ee.updatedAt || ee.createdAt || "").getTime() - new Date(F.updatedAt || F.createdAt || "").getTime()).map((F) => /* @__PURE__ */ l.jsxs(
|
|
12792
12797
|
"div",
|
|
12793
12798
|
{
|
|
12794
|
-
onClick: () =>
|
|
12799
|
+
onClick: () => j(F.threadId),
|
|
12795
12800
|
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`,
|
|
12796
12801
|
children: [
|
|
12797
12802
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
@@ -13137,15 +13142,15 @@ var Ar = "Tooltip", [hC, xs] = ms(Ar), gh = (e) => {
|
|
|
13137
13142
|
} = 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({
|
|
13138
13143
|
prop: r,
|
|
13139
13144
|
defaultProp: o ?? !1,
|
|
13140
|
-
onChange: (
|
|
13141
|
-
|
|
13145
|
+
onChange: (R) => {
|
|
13146
|
+
R ? (c.onOpen(), document.dispatchEvent(new CustomEvent(Ri))) : c.onClose(), s == null || s(R);
|
|
13142
13147
|
},
|
|
13143
13148
|
caller: Ar
|
|
13144
|
-
}), y = f.useMemo(() => v ? m.current ? "delayed-open" : "instant-open" : "closed", [v]),
|
|
13149
|
+
}), y = f.useMemo(() => v ? m.current ? "delayed-open" : "instant-open" : "closed", [v]), E = f.useCallback(() => {
|
|
13145
13150
|
window.clearTimeout(b.current), b.current = 0, m.current = !1, w(!0);
|
|
13146
13151
|
}, [w]), S = f.useCallback(() => {
|
|
13147
13152
|
window.clearTimeout(b.current), b.current = 0, w(!1);
|
|
13148
|
-
}, [w]),
|
|
13153
|
+
}, [w]), C = f.useCallback(() => {
|
|
13149
13154
|
window.clearTimeout(b.current), b.current = window.setTimeout(() => {
|
|
13150
13155
|
m.current = !0, w(!0), b.current = 0;
|
|
13151
13156
|
}, x);
|
|
@@ -13162,12 +13167,12 @@ var Ar = "Tooltip", [hC, xs] = ms(Ar), gh = (e) => {
|
|
|
13162
13167
|
trigger: d,
|
|
13163
13168
|
onTriggerChange: h,
|
|
13164
13169
|
onTriggerEnter: f.useCallback(() => {
|
|
13165
|
-
c.isOpenDelayedRef.current ?
|
|
13166
|
-
}, [c.isOpenDelayedRef,
|
|
13170
|
+
c.isOpenDelayedRef.current ? C() : E();
|
|
13171
|
+
}, [c.isOpenDelayedRef, C, E]),
|
|
13167
13172
|
onTriggerLeave: f.useCallback(() => {
|
|
13168
13173
|
g ? S() : (window.clearTimeout(b.current), b.current = 0);
|
|
13169
13174
|
}, [S, g]),
|
|
13170
|
-
onOpen:
|
|
13175
|
+
onOpen: E,
|
|
13171
13176
|
onClose: S,
|
|
13172
13177
|
disableHoverableContent: g,
|
|
13173
13178
|
children: n
|
|
@@ -13216,7 +13221,7 @@ var pC = "TooltipPortal", [bR, mC] = ms(pC, {
|
|
|
13216
13221
|
a(null), h(!1);
|
|
13217
13222
|
}, [h]), b = f.useCallback(
|
|
13218
13223
|
(g, x) => {
|
|
13219
|
-
const m = g.currentTarget, v = { x: g.clientX, y: g.clientY }, w = yC(v, m.getBoundingClientRect()), y = SC(v, w),
|
|
13224
|
+
const m = g.currentTarget, v = { x: g.clientX, y: g.clientY }, w = yC(v, m.getBoundingClientRect()), y = SC(v, w), E = CC(x.getBoundingClientRect()), S = RC([...y, ...E]);
|
|
13220
13225
|
a(S), h(!0);
|
|
13221
13226
|
},
|
|
13222
13227
|
[h]
|
|
@@ -14006,7 +14011,7 @@ var bs = "Switch", [QC, yR] = $t(bs), [eT, tT] = QC(bs), Bh = f.forwardRef(
|
|
|
14006
14011
|
...h,
|
|
14007
14012
|
ref: g,
|
|
14008
14013
|
onClick: Q(e.onClick, (y) => {
|
|
14009
|
-
w((
|
|
14014
|
+
w((E) => !E), m && (x.current = y.isPropagationStopped(), x.current || y.stopPropagation());
|
|
14010
14015
|
})
|
|
14011
14016
|
}
|
|
14012
14017
|
),
|
|
@@ -14128,17 +14133,17 @@ var oT = [" ", "Enter", "ArrowUp", "ArrowDown"], sT = [" ", "Enter"], Nn = "Sele
|
|
|
14128
14133
|
disabled: p,
|
|
14129
14134
|
required: b,
|
|
14130
14135
|
form: g
|
|
14131
|
-
} = e, x = Ss(t), [m, v] = f.useState(null), [w, y] = f.useState(null), [
|
|
14136
|
+
} = e, x = Ss(t), [m, v] = f.useState(null), [w, y] = f.useState(null), [E, S] = f.useState(!1), C = ss(u), [R, I] = cn({
|
|
14132
14137
|
prop: r,
|
|
14133
14138
|
defaultProp: o ?? !1,
|
|
14134
14139
|
onChange: s,
|
|
14135
14140
|
caller: Nn
|
|
14136
|
-
}), [
|
|
14141
|
+
}), [N, k] = cn({
|
|
14137
14142
|
prop: i,
|
|
14138
14143
|
defaultProp: a,
|
|
14139
14144
|
onChange: c,
|
|
14140
14145
|
caller: Nn
|
|
14141
|
-
}), M = f.useRef(null), W = m ? g || !!m.closest("form") : !0, [G,
|
|
14146
|
+
}), M = f.useRef(null), W = m ? g || !!m.closest("form") : !0, [G, j] = f.useState(/* @__PURE__ */ new Set()), H = Array.from(G).map((L) => L.props.value).join(";");
|
|
14142
14147
|
return /* @__PURE__ */ l.jsx(xa, { ...x, children: /* @__PURE__ */ l.jsxs(
|
|
14143
14148
|
aT,
|
|
14144
14149
|
{
|
|
@@ -14148,14 +14153,14 @@ var oT = [" ", "Enter", "ArrowUp", "ArrowDown"], sT = [" ", "Enter"], Nn = "Sele
|
|
|
14148
14153
|
onTriggerChange: v,
|
|
14149
14154
|
valueNode: w,
|
|
14150
14155
|
onValueNodeChange: y,
|
|
14151
|
-
valueNodeHasChildren:
|
|
14156
|
+
valueNodeHasChildren: E,
|
|
14152
14157
|
onValueNodeHasChildrenChange: S,
|
|
14153
14158
|
contentId: Dt(),
|
|
14154
|
-
value:
|
|
14159
|
+
value: N,
|
|
14155
14160
|
onValueChange: k,
|
|
14156
|
-
open:
|
|
14161
|
+
open: R,
|
|
14157
14162
|
onOpenChange: I,
|
|
14158
|
-
dir:
|
|
14163
|
+
dir: C,
|
|
14159
14164
|
triggerPointerDownPosRef: M,
|
|
14160
14165
|
disabled: p,
|
|
14161
14166
|
children: [
|
|
@@ -14164,10 +14169,10 @@ var oT = [" ", "Enter", "ArrowUp", "ArrowDown"], sT = [" ", "Enter"], Nn = "Sele
|
|
|
14164
14169
|
{
|
|
14165
14170
|
scope: e.__scopeSelect,
|
|
14166
14171
|
onNativeOptionAdd: f.useCallback((L) => {
|
|
14167
|
-
|
|
14172
|
+
j((q) => new Set(q).add(L));
|
|
14168
14173
|
}, []),
|
|
14169
14174
|
onNativeOptionRemove: f.useCallback((L) => {
|
|
14170
|
-
|
|
14175
|
+
j((q) => {
|
|
14171
14176
|
const O = new Set(q);
|
|
14172
14177
|
return O.delete(L), O;
|
|
14173
14178
|
});
|
|
@@ -14183,12 +14188,12 @@ var oT = [" ", "Enter", "ArrowUp", "ArrowDown"], sT = [" ", "Enter"], Nn = "Sele
|
|
|
14183
14188
|
tabIndex: -1,
|
|
14184
14189
|
name: d,
|
|
14185
14190
|
autoComplete: h,
|
|
14186
|
-
value:
|
|
14191
|
+
value: N,
|
|
14187
14192
|
onChange: (L) => k(L.target.value),
|
|
14188
14193
|
disabled: p,
|
|
14189
14194
|
form: g,
|
|
14190
14195
|
children: [
|
|
14191
|
-
|
|
14196
|
+
N === void 0 ? /* @__PURE__ */ l.jsx("option", { value: "" }) : null,
|
|
14192
14197
|
Array.from(G)
|
|
14193
14198
|
]
|
|
14194
14199
|
},
|
|
@@ -14307,9 +14312,9 @@ var Ot = 10, [Qh, gn] = lr(jn), fT = "SelectContentImpl", hT = qn("SelectContent
|
|
|
14307
14312
|
avoidCollisions: m,
|
|
14308
14313
|
//
|
|
14309
14314
|
...v
|
|
14310
|
-
} = e, w = mn(jn, n), [y,
|
|
14315
|
+
} = e, w = mn(jn, n), [y, E] = f.useState(null), [S, C] = f.useState(null), R = Ce(t, (Y) => E(Y)), [I, N] = f.useState(null), [k, M] = f.useState(
|
|
14311
14316
|
null
|
|
14312
|
-
), W = ys(n), [G,
|
|
14317
|
+
), W = ys(n), [G, j] = f.useState(!1), H = f.useRef(!1);
|
|
14313
14318
|
f.useEffect(() => {
|
|
14314
14319
|
if (y) return oa(y);
|
|
14315
14320
|
}, [y]), ra();
|
|
@@ -14356,7 +14361,7 @@ var Ot = 10, [Qh, gn] = lr(jn), fT = "SelectContentImpl", hT = qn("SelectContent
|
|
|
14356
14361
|
}), oe = f.useCallback(
|
|
14357
14362
|
(Y, P, Z) => {
|
|
14358
14363
|
const ne = !H.current && !Z;
|
|
14359
|
-
(w.value !== void 0 && w.value === P || ne) && (
|
|
14364
|
+
(w.value !== void 0 && w.value === P || ne) && (N(Y), ne && (H.current = !0));
|
|
14360
14365
|
},
|
|
14361
14366
|
[w.value]
|
|
14362
14367
|
), F = f.useCallback(() => y == null ? void 0 : y.focus(), [y]), ee = f.useCallback(
|
|
@@ -14383,7 +14388,7 @@ var Ot = 10, [Qh, gn] = lr(jn), fT = "SelectContentImpl", hT = qn("SelectContent
|
|
|
14383
14388
|
scope: n,
|
|
14384
14389
|
content: y,
|
|
14385
14390
|
viewport: S,
|
|
14386
|
-
onViewportChange:
|
|
14391
|
+
onViewportChange: C,
|
|
14387
14392
|
itemRefCallback: oe,
|
|
14388
14393
|
selectedItem: I,
|
|
14389
14394
|
onItemLeave: F,
|
|
@@ -14424,8 +14429,8 @@ var Ot = 10, [Qh, gn] = lr(jn), fT = "SelectContentImpl", hT = qn("SelectContent
|
|
|
14424
14429
|
onContextMenu: (Y) => Y.preventDefault(),
|
|
14425
14430
|
...v,
|
|
14426
14431
|
...be,
|
|
14427
|
-
onPlaced: () =>
|
|
14428
|
-
ref:
|
|
14432
|
+
onPlaced: () => j(!0),
|
|
14433
|
+
ref: R,
|
|
14429
14434
|
style: {
|
|
14430
14435
|
// flex layout so we can place the scroll buttons properly
|
|
14431
14436
|
display: "flex",
|
|
@@ -14457,11 +14462,11 @@ var Ot = 10, [Qh, gn] = lr(jn), fT = "SelectContentImpl", hT = qn("SelectContent
|
|
|
14457
14462
|
);
|
|
14458
14463
|
ep.displayName = fT;
|
|
14459
14464
|
var pT = "SelectItemAlignedPosition", tp = f.forwardRef((e, t) => {
|
|
14460
|
-
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, (
|
|
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, (R) => d(R)), p = ys(n), b = f.useRef(!1), g = f.useRef(!0), { viewport: x, selectedItem: m, selectedItemText: v, focusSelectedItem: w } = i, y = f.useCallback(() => {
|
|
14461
14466
|
if (s.trigger && s.valueNode && a && u && x && m && v) {
|
|
14462
|
-
const
|
|
14467
|
+
const R = s.trigger.getBoundingClientRect(), I = u.getBoundingClientRect(), N = s.valueNode.getBoundingClientRect(), k = v.getBoundingClientRect();
|
|
14463
14468
|
if (s.dir !== "rtl") {
|
|
14464
|
-
const ae = k.left - I.left, se =
|
|
14469
|
+
const ae = k.left - I.left, se = N.left - ae, je = R.left - se, Le = R.width + je, Oe = Math.max(Le, I.width), ue = window.innerWidth - Ot, Pe = Ci(se, [
|
|
14465
14470
|
Ot,
|
|
14466
14471
|
// Prevents the content from going off the starting edge of the
|
|
14467
14472
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -14472,13 +14477,13 @@ var pT = "SelectItemAlignedPosition", tp = f.forwardRef((e, t) => {
|
|
|
14472
14477
|
]);
|
|
14473
14478
|
a.style.minWidth = Le + "px", a.style.left = Pe + "px";
|
|
14474
14479
|
} else {
|
|
14475
|
-
const ae = I.right - k.right, se = window.innerWidth -
|
|
14480
|
+
const ae = I.right - k.right, se = window.innerWidth - N.right - ae, je = window.innerWidth - R.right - se, Le = R.width + je, Oe = Math.max(Le, I.width), ue = window.innerWidth - Ot, Pe = Ci(se, [
|
|
14476
14481
|
Ot,
|
|
14477
14482
|
Math.max(Ot, ue - Oe)
|
|
14478
14483
|
]);
|
|
14479
14484
|
a.style.minWidth = Le + "px", a.style.right = Pe + "px";
|
|
14480
14485
|
}
|
|
14481
|
-
const M = p(), W = window.innerHeight - Ot * 2, G = x.scrollHeight,
|
|
14486
|
+
const M = p(), W = window.innerHeight - Ot * 2, G = x.scrollHeight, j = window.getComputedStyle(u), H = parseInt(j.borderTopWidth, 10), L = parseInt(j.paddingTop, 10), q = parseInt(j.borderBottomWidth, 10), O = parseInt(j.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 = R.top + R.height / 2 - Ot, he = W - ee, be = m.offsetHeight / 2, Y = m.offsetTop + be, P = H + L + Y, Z = _ - P;
|
|
14482
14487
|
if (P <= ee) {
|
|
14483
14488
|
const ae = M.length > 0 && m === M[M.length - 1].ref.current;
|
|
14484
14489
|
a.style.bottom = "0px";
|
|
@@ -14513,13 +14518,13 @@ var pT = "SelectItemAlignedPosition", tp = f.forwardRef((e, t) => {
|
|
|
14513
14518
|
r
|
|
14514
14519
|
]);
|
|
14515
14520
|
tt(() => y(), [y]);
|
|
14516
|
-
const [
|
|
14521
|
+
const [E, S] = f.useState();
|
|
14517
14522
|
tt(() => {
|
|
14518
14523
|
u && S(window.getComputedStyle(u).zIndex);
|
|
14519
14524
|
}, [u]);
|
|
14520
|
-
const
|
|
14521
|
-
(
|
|
14522
|
-
|
|
14525
|
+
const C = f.useCallback(
|
|
14526
|
+
(R) => {
|
|
14527
|
+
R && g.current === !0 && (y(), w == null || w(), g.current = !1);
|
|
14523
14528
|
},
|
|
14524
14529
|
[y, w]
|
|
14525
14530
|
);
|
|
@@ -14529,7 +14534,7 @@ var pT = "SelectItemAlignedPosition", tp = f.forwardRef((e, t) => {
|
|
|
14529
14534
|
scope: n,
|
|
14530
14535
|
contentWrapper: a,
|
|
14531
14536
|
shouldExpandOnScrollRef: b,
|
|
14532
|
-
onScrollButtonChange:
|
|
14537
|
+
onScrollButtonChange: C,
|
|
14533
14538
|
children: /* @__PURE__ */ l.jsx(
|
|
14534
14539
|
"div",
|
|
14535
14540
|
{
|
|
@@ -14538,7 +14543,7 @@ var pT = "SelectItemAlignedPosition", tp = f.forwardRef((e, t) => {
|
|
|
14538
14543
|
display: "flex",
|
|
14539
14544
|
flexDirection: "column",
|
|
14540
14545
|
position: "fixed",
|
|
14541
|
-
zIndex:
|
|
14546
|
+
zIndex: E
|
|
14542
14547
|
},
|
|
14543
14548
|
children: /* @__PURE__ */ l.jsx(
|
|
14544
14549
|
me.div,
|
|
@@ -14630,8 +14635,8 @@ var [gT, Ma] = lr(jn, {}), Ni = "SelectViewport", np = f.forwardRef(
|
|
|
14630
14635
|
if (b > 0) {
|
|
14631
14636
|
const g = window.innerHeight - Ot * 2, x = parseFloat(h.style.minHeight), m = parseFloat(h.style.height), v = Math.max(x, m);
|
|
14632
14637
|
if (v < g) {
|
|
14633
|
-
const w = v + b, y = Math.min(g, w),
|
|
14634
|
-
h.style.height = y + "px", h.style.bottom === "0px" && (d.scrollTop =
|
|
14638
|
+
const w = v + b, y = Math.min(g, w), E = w - y;
|
|
14639
|
+
h.style.height = y + "px", h.style.bottom === "0px" && (d.scrollTop = E > 0 ? E : 0, h.style.justifyContent = "flex-end");
|
|
14635
14640
|
}
|
|
14636
14641
|
}
|
|
14637
14642
|
}
|
|
@@ -14729,8 +14734,8 @@ var Lo = "SelectItem", [wT, ip] = lr(Lo), ap = f.forwardRef(
|
|
|
14729
14734
|
w.currentTarget === document.activeElement && ((y = c.onItemLeave) == null || y.call(c));
|
|
14730
14735
|
}),
|
|
14731
14736
|
onKeyDown: Q(i.onKeyDown, (w) => {
|
|
14732
|
-
var
|
|
14733
|
-
((
|
|
14737
|
+
var E;
|
|
14738
|
+
((E = c.searchRef) == null ? void 0 : E.current) !== "" && w.key === " " || (sT.includes(w.key) && v(), w.key === " " && w.preventDefault());
|
|
14734
14739
|
})
|
|
14735
14740
|
}
|
|
14736
14741
|
)
|