teodor-new-chat-ui 4.0.7 → 4.0.8
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 +80 -77
- package/dist/index.umd.js +8 -8
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -64,8 +64,8 @@ function im() {
|
|
|
64
64
|
}
|
|
65
65
|
function y(T, U, ne) {
|
|
66
66
|
{
|
|
67
|
-
var we = x.ReactDebugCurrentFrame,
|
|
68
|
-
|
|
67
|
+
var we = x.ReactDebugCurrentFrame, $e = we.getStackAddendum();
|
|
68
|
+
$e !== "" && (U += "%s", ne = ne.concat([$e]));
|
|
69
69
|
var We = ne.map(function(je) {
|
|
70
70
|
return String(je);
|
|
71
71
|
});
|
|
@@ -85,8 +85,8 @@ function im() {
|
|
|
85
85
|
var we = T.displayName;
|
|
86
86
|
if (we)
|
|
87
87
|
return we;
|
|
88
|
-
var
|
|
89
|
-
return
|
|
88
|
+
var $e = U.displayName || U.name || "";
|
|
89
|
+
return $e !== "" ? ne + "(" + $e + ")" : ne;
|
|
90
90
|
}
|
|
91
91
|
function $(T) {
|
|
92
92
|
return T.displayName || "Context";
|
|
@@ -126,7 +126,7 @@ function im() {
|
|
|
126
126
|
var we = T.displayName || null;
|
|
127
127
|
return we !== null ? we : G(T.type) || "Memo";
|
|
128
128
|
case h: {
|
|
129
|
-
var
|
|
129
|
+
var $e = T, We = $e._payload, je = $e._init;
|
|
130
130
|
try {
|
|
131
131
|
return G(je(We));
|
|
132
132
|
} catch {
|
|
@@ -204,8 +204,8 @@ function im() {
|
|
|
204
204
|
if (q === void 0)
|
|
205
205
|
try {
|
|
206
206
|
throw Error();
|
|
207
|
-
} catch (
|
|
208
|
-
var we =
|
|
207
|
+
} catch ($e) {
|
|
208
|
+
var we = $e.stack.trim().match(/\n( *(at )?)/);
|
|
209
209
|
q = we && we[1] || "";
|
|
210
210
|
}
|
|
211
211
|
return `
|
|
@@ -227,7 +227,7 @@ function im() {
|
|
|
227
227
|
}
|
|
228
228
|
var we;
|
|
229
229
|
M = !0;
|
|
230
|
-
var
|
|
230
|
+
var $e = Error.prepareStackTrace;
|
|
231
231
|
Error.prepareStackTrace = void 0;
|
|
232
232
|
var We;
|
|
233
233
|
We = me.current, me.current = null, le();
|
|
@@ -283,7 +283,7 @@ function im() {
|
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
} finally {
|
|
286
|
-
M = !1, me.current = We, pe(), Error.prepareStackTrace =
|
|
286
|
+
M = !1, me.current = We, pe(), Error.prepareStackTrace = $e;
|
|
287
287
|
}
|
|
288
288
|
var Zn = T ? T.displayName || T.name : "", Nn = Zn ? O(Zn) : "";
|
|
289
289
|
return typeof T == "function" && L.set(T, Nn), Nn;
|
|
@@ -315,9 +315,9 @@ function im() {
|
|
|
315
315
|
case f:
|
|
316
316
|
return Se(T.type, U, ne);
|
|
317
317
|
case h: {
|
|
318
|
-
var we = T,
|
|
318
|
+
var we = T, $e = we._payload, We = we._init;
|
|
319
319
|
try {
|
|
320
|
-
return Se(We(
|
|
320
|
+
return Se(We($e), U, ne);
|
|
321
321
|
} catch {
|
|
322
322
|
}
|
|
323
323
|
}
|
|
@@ -332,7 +332,7 @@ function im() {
|
|
|
332
332
|
} else
|
|
333
333
|
Ue.setExtraStackFrame(null);
|
|
334
334
|
}
|
|
335
|
-
function nt(T, U, ne, we,
|
|
335
|
+
function nt(T, U, ne, we, $e) {
|
|
336
336
|
{
|
|
337
337
|
var We = Function.call.bind(ke);
|
|
338
338
|
for (var je in T)
|
|
@@ -347,7 +347,7 @@ function im() {
|
|
|
347
347
|
} catch (rt) {
|
|
348
348
|
Ie = rt;
|
|
349
349
|
}
|
|
350
|
-
Ie && !(Ie instanceof Error) && (Pe(
|
|
350
|
+
Ie && !(Ie instanceof Error) && (Pe($e), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", we || "React class", ne, je, typeof Ie), Pe(null)), Ie instanceof Error && !(Ie.message in Me) && (Me[Ie.message] = !0, Pe($e), b("Failed %s type: %s", ne, Ie.message), Pe(null));
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
}
|
|
@@ -363,17 +363,17 @@ function im() {
|
|
|
363
363
|
}
|
|
364
364
|
function dt(T) {
|
|
365
365
|
try {
|
|
366
|
-
return
|
|
366
|
+
return Fe(T), !1;
|
|
367
367
|
} catch {
|
|
368
368
|
return !0;
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function Fe(T) {
|
|
372
372
|
return "" + T;
|
|
373
373
|
}
|
|
374
374
|
function ee(T) {
|
|
375
375
|
if (dt(T))
|
|
376
|
-
return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ht(T)),
|
|
376
|
+
return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ht(T)), Fe(T);
|
|
377
377
|
}
|
|
378
378
|
var se = x.ReactCurrentOwner, he = {
|
|
379
379
|
key: !0,
|
|
@@ -422,7 +422,7 @@ function im() {
|
|
|
422
422
|
});
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
var Jn = function(T, U, ne, we,
|
|
425
|
+
var Jn = function(T, U, ne, we, $e, We, je) {
|
|
426
426
|
var Ie = {
|
|
427
427
|
// This tag allows us to uniquely identify this as a React Element
|
|
428
428
|
$$typeof: t,
|
|
@@ -448,13 +448,13 @@ function im() {
|
|
|
448
448
|
configurable: !1,
|
|
449
449
|
enumerable: !1,
|
|
450
450
|
writable: !1,
|
|
451
|
-
value:
|
|
451
|
+
value: $e
|
|
452
452
|
}), Object.freeze && (Object.freeze(Ie.props), Object.freeze(Ie)), Ie;
|
|
453
453
|
};
|
|
454
|
-
function Ms(T, U, ne, we,
|
|
454
|
+
function Ms(T, U, ne, we, $e) {
|
|
455
455
|
{
|
|
456
456
|
var We, je = {}, Ie = null, yt = null;
|
|
457
|
-
ne !== void 0 && (ee(ne), Ie = "" + ne), mt(U) && (ee(U.key), Ie = "" + U.key), Xe(U) && (yt = U.ref, ct(U,
|
|
457
|
+
ne !== void 0 && (ee(ne), Ie = "" + ne), mt(U) && (ee(U.key), Ie = "" + U.key), Xe(U) && (yt = U.ref, ct(U, $e));
|
|
458
458
|
for (We in U)
|
|
459
459
|
ke.call(U, We) && !he.hasOwnProperty(We) && (je[We] = U[We]);
|
|
460
460
|
if (T && T.defaultProps) {
|
|
@@ -466,7 +466,7 @@ function im() {
|
|
|
466
466
|
var it = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
|
|
467
467
|
Ie && gt(je, it), yt && Jt(je, it);
|
|
468
468
|
}
|
|
469
|
-
return Jn(T, Ie, yt,
|
|
469
|
+
return Jn(T, Ie, yt, $e, we, se.current, je);
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
var wr = x.ReactCurrentOwner, no = x.ReactDebugCurrentFrame;
|
|
@@ -535,9 +535,9 @@ Check the top-level render call using <` + ne + ">.");
|
|
|
535
535
|
else if (yr(T))
|
|
536
536
|
T._store && (T._store.validated = !0);
|
|
537
537
|
else if (T) {
|
|
538
|
-
var
|
|
539
|
-
if (typeof
|
|
540
|
-
for (var We =
|
|
538
|
+
var $e = m(T);
|
|
539
|
+
if (typeof $e == "function" && $e !== T.entries)
|
|
540
|
+
for (var We = $e.call(T), je; !(je = We.next()).done; )
|
|
541
541
|
yr(je.value) && ie(je.value, U);
|
|
542
542
|
}
|
|
543
543
|
}
|
|
@@ -561,8 +561,8 @@ Check the top-level render call using <` + ne + ">.");
|
|
|
561
561
|
nt(ne, T.props, "prop", we, T);
|
|
562
562
|
} else if (U.PropTypes !== void 0 && !br) {
|
|
563
563
|
br = !0;
|
|
564
|
-
var
|
|
565
|
-
b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
564
|
+
var $e = G(U);
|
|
565
|
+
b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", $e || "Unknown");
|
|
566
566
|
}
|
|
567
567
|
typeof U.getDefaultProps == "function" && !U.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
568
568
|
}
|
|
@@ -580,7 +580,7 @@ Check the top-level render call using <` + ne + ">.");
|
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
582
|
var Nt = {};
|
|
583
|
-
function Zt(T, U, ne, we,
|
|
583
|
+
function Zt(T, U, ne, we, $e, We) {
|
|
584
584
|
{
|
|
585
585
|
var je = j(T);
|
|
586
586
|
if (!je) {
|
|
@@ -591,7 +591,7 @@ Check the top-level render call using <` + ne + ">.");
|
|
|
591
591
|
var rt;
|
|
592
592
|
T === null ? rt = "null" : lt(T) ? rt = "array" : T !== void 0 && T.$$typeof === t ? (rt = "<" + (G(T.type) || "Unknown") + " />", Ie = " Did you accidentally export a JSX literal instead of a component?") : rt = typeof T, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", rt, Ie);
|
|
593
593
|
}
|
|
594
|
-
var it = Ms(T, U, ne,
|
|
594
|
+
var it = Ms(T, U, ne, $e, We);
|
|
595
595
|
if (it == null)
|
|
596
596
|
return it;
|
|
597
597
|
if (je) {
|
|
@@ -3272,20 +3272,23 @@ function ux(e = {}) {
|
|
|
3272
3272
|
console.debug("[use-chat] malformed SSE:", ht.slice(0, 200));
|
|
3273
3273
|
continue;
|
|
3274
3274
|
}
|
|
3275
|
-
const
|
|
3276
|
-
te = Date.now()
|
|
3277
|
-
const ee =
|
|
3275
|
+
const Fe = dx(dt) ? dt.data : dt;
|
|
3276
|
+
te = Date.now();
|
|
3277
|
+
const ee = Fe.seq;
|
|
3278
3278
|
if (ee !== void 0) {
|
|
3279
|
-
if (ee <= O)
|
|
3279
|
+
if (ee <= O) {
|
|
3280
|
+
console.debug("[use-chat] drop duplicate/out-of-order event", { seq: ee, lastProcessedSeq: O, type: Fe.type });
|
|
3281
|
+
continue;
|
|
3282
|
+
}
|
|
3280
3283
|
O > 0 && ee > O + 1 && ((F = A == null ? void 0 : A.onGap) == null || F.call(A, { from: O, to: ee })), O = ee, E.current = ee, v(ee);
|
|
3281
3284
|
}
|
|
3282
|
-
if (
|
|
3283
|
-
q.push(
|
|
3284
|
-
else if (
|
|
3285
|
-
const se =
|
|
3285
|
+
if (j == null || j(Fe), Fe.type === "token" && e.autoAppendAssistant !== !1)
|
|
3286
|
+
q.push(Fe.content), Q();
|
|
3287
|
+
else if (Fe.type === "message_delta") {
|
|
3288
|
+
const se = Fe.delta.filter((he) => he.type === "text").map((he) => he.text).join("");
|
|
3286
3289
|
se && e.autoAppendAssistant !== !1 && (q.push(se), Q());
|
|
3287
3290
|
} else
|
|
3288
|
-
M !== null && cancelAnimationFrame(M), L(),
|
|
3291
|
+
M !== null && cancelAnimationFrame(M), L(), Fe.type === "checkpoint" ? g(Fe.checkpointId) : Fe.type === "error" && u(Fe.message);
|
|
3289
3292
|
}
|
|
3290
3293
|
}
|
|
3291
3294
|
L();
|
|
@@ -3801,7 +3804,7 @@ function Tx(e, t) {
|
|
|
3801
3804
|
function Ze(...e) {
|
|
3802
3805
|
return e;
|
|
3803
3806
|
}
|
|
3804
|
-
function
|
|
3807
|
+
function ze(e, t) {
|
|
3805
3808
|
return e(Tn, t);
|
|
3806
3809
|
}
|
|
3807
3810
|
function Te(e, t) {
|
|
@@ -3814,7 +3817,7 @@ function ot(e) {
|
|
|
3814
3817
|
return e(au);
|
|
3815
3818
|
}
|
|
3816
3819
|
function ce(e, t) {
|
|
3817
|
-
return
|
|
3820
|
+
return ze(e, Sx(t, is));
|
|
3818
3821
|
}
|
|
3819
3822
|
function Vt(e, t) {
|
|
3820
3823
|
const n = e(Tn, (r) => {
|
|
@@ -3860,7 +3863,7 @@ function z(e, ...t) {
|
|
|
3860
3863
|
Zi(e);
|
|
3861
3864
|
return;
|
|
3862
3865
|
case Tn:
|
|
3863
|
-
return
|
|
3866
|
+
return ze(e, n(o));
|
|
3864
3867
|
}
|
|
3865
3868
|
};
|
|
3866
3869
|
}
|
|
@@ -3888,7 +3891,7 @@ function Re(...e) {
|
|
|
3888
3891
|
const o = Math.pow(2, e.length) - 1;
|
|
3889
3892
|
return e.forEach((s, i) => {
|
|
3890
3893
|
const a = Math.pow(2, i);
|
|
3891
|
-
|
|
3894
|
+
ze(s, (c) => {
|
|
3892
3895
|
const u = n;
|
|
3893
3896
|
n = n | a, t[i] = c, u !== o && n === o && r && (r(), r = null);
|
|
3894
3897
|
});
|
|
@@ -3908,7 +3911,7 @@ function Ex(e) {
|
|
|
3908
3911
|
return function(o, s) {
|
|
3909
3912
|
switch (o) {
|
|
3910
3913
|
case Tn:
|
|
3911
|
-
return s ? n === s ? void 0 : (r(), n = s, t =
|
|
3914
|
+
return s ? n === s ? void 0 : (r(), n = s, t = ze(e, s), t) : (r(), mr);
|
|
3912
3915
|
case pr:
|
|
3913
3916
|
r(), n = null;
|
|
3914
3917
|
return;
|
|
@@ -3983,7 +3986,7 @@ function at(...e) {
|
|
|
3983
3986
|
const o = Math.pow(2, e.length) - 1;
|
|
3984
3987
|
return e.forEach((s, i) => {
|
|
3985
3988
|
const a = Math.pow(2, i);
|
|
3986
|
-
|
|
3989
|
+
ze(s, (c) => {
|
|
3987
3990
|
n[i] = c, r = r | a, r === o && Te(t, n);
|
|
3988
3991
|
});
|
|
3989
3992
|
}), function(s, i) {
|
|
@@ -3993,7 +3996,7 @@ function at(...e) {
|
|
|
3993
3996
|
return;
|
|
3994
3997
|
}
|
|
3995
3998
|
case Tn:
|
|
3996
|
-
return r === o && i(n),
|
|
3999
|
+
return r === o && i(n), ze(t, i);
|
|
3997
4000
|
}
|
|
3998
4001
|
};
|
|
3999
4002
|
}
|
|
@@ -4006,7 +4009,7 @@ function Si(...e) {
|
|
|
4006
4009
|
case pr:
|
|
4007
4010
|
return;
|
|
4008
4011
|
case Tn:
|
|
4009
|
-
return Cx(...e.map((r) =>
|
|
4012
|
+
return Cx(...e.map((r) => ze(r, n)));
|
|
4010
4013
|
}
|
|
4011
4014
|
};
|
|
4012
4015
|
}
|
|
@@ -4568,7 +4571,7 @@ const Wx = {
|
|
|
4568
4571
|
re((S) => S.changed)
|
|
4569
4572
|
)
|
|
4570
4573
|
);
|
|
4571
|
-
|
|
4574
|
+
ze(
|
|
4572
4575
|
z(
|
|
4573
4576
|
a,
|
|
4574
4577
|
nn(
|
|
@@ -4586,7 +4589,7 @@ const Wx = {
|
|
|
4586
4589
|
R.length > 0 && (S -= Sl(-S, R)), Te(i, S);
|
|
4587
4590
|
}
|
|
4588
4591
|
}
|
|
4589
|
-
),
|
|
4592
|
+
), ze(z(a, Re(e)), ([S, C]) => {
|
|
4590
4593
|
S < 0 && C(
|
|
4591
4594
|
"`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
|
|
4592
4595
|
{ firstItemIndex: a },
|
|
@@ -4773,7 +4776,7 @@ const bu = Le(
|
|
|
4773
4776
|
Je()
|
|
4774
4777
|
)
|
|
4775
4778
|
);
|
|
4776
|
-
return
|
|
4779
|
+
return ze(t, (r) => {
|
|
4777
4780
|
r && ot(e)("props updated", {}, It.DEBUG);
|
|
4778
4781
|
}), { didMount: n, propsReady: t };
|
|
4779
4782
|
},
|
|
@@ -4824,7 +4827,7 @@ const Yr = Le(
|
|
|
4824
4827
|
};
|
|
4825
4828
|
if (y(), V === "smooth") {
|
|
4826
4829
|
let Y = !1;
|
|
4827
|
-
b =
|
|
4830
|
+
b = ze(t, (le) => {
|
|
4828
4831
|
Y = Y || le;
|
|
4829
4832
|
}), m = Vt(d, () => {
|
|
4830
4833
|
X(Y);
|
|
@@ -4885,7 +4888,7 @@ const Xr = Le(
|
|
|
4885
4888
|
en(!1)
|
|
4886
4889
|
),
|
|
4887
4890
|
u
|
|
4888
|
-
),
|
|
4891
|
+
), ze(
|
|
4889
4892
|
z(
|
|
4890
4893
|
at(t, i),
|
|
4891
4894
|
Re(a, n, e, u),
|
|
@@ -5477,7 +5480,7 @@ const ev = (e, t) => typeof e == "function" ? kl(e(t)) : t && kl(e), tv = Le(
|
|
|
5477
5480
|
index: "LAST"
|
|
5478
5481
|
});
|
|
5479
5482
|
}
|
|
5480
|
-
|
|
5483
|
+
ze(
|
|
5481
5484
|
z(
|
|
5482
5485
|
at(z(xe(t), Fn(1)), c),
|
|
5483
5486
|
Re(xe(w), s, a, f),
|
|
@@ -5501,7 +5504,7 @@ const ev = (e, t) => typeof e == "function" ? kl(e(t)) : t && kl(e), tv = Le(
|
|
|
5501
5504
|
});
|
|
5502
5505
|
setTimeout(C, 100);
|
|
5503
5506
|
}
|
|
5504
|
-
|
|
5507
|
+
ze(
|
|
5505
5508
|
z(
|
|
5506
5509
|
at(xe(w), t, u),
|
|
5507
5510
|
ve(([S, , C]) => S && C),
|
|
@@ -5515,9 +5518,9 @@ const ev = (e, t) => typeof e == "function" ? kl(e(t)) : t && kl(e), tv = Le(
|
|
|
5515
5518
|
([, S]) => {
|
|
5516
5519
|
ot(a) && b(S !== !1);
|
|
5517
5520
|
}
|
|
5518
|
-
),
|
|
5521
|
+
), ze(v, () => {
|
|
5519
5522
|
b(ot(w) !== !1);
|
|
5520
|
-
}),
|
|
5523
|
+
}), ze(at(xe(w), o), ([S, C]) => {
|
|
5521
5524
|
S && !C.atBottom && C.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && x("auto");
|
|
5522
5525
|
});
|
|
5523
5526
|
const y = J(null), E = _e();
|
|
@@ -5533,7 +5536,7 @@ const ev = (e, t) => typeof e == "function" ? kl(e(t)) : t && kl(e), tv = Le(
|
|
|
5533
5536
|
z(xe(t))
|
|
5534
5537
|
),
|
|
5535
5538
|
E
|
|
5536
|
-
),
|
|
5539
|
+
), ze(
|
|
5537
5540
|
z(
|
|
5538
5541
|
at(z(E, Fn(1)), c),
|
|
5539
5542
|
Re(xe(y), a, f, h),
|
|
@@ -5577,7 +5580,7 @@ const ev = (e, t) => typeof e == "function" ? kl(e(t)) : t && kl(e), tv = Le(
|
|
|
5577
5580
|
), rv = Le(
|
|
5578
5581
|
([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
|
|
5579
5582
|
const r = J(0);
|
|
5580
|
-
return
|
|
5583
|
+
return ze(
|
|
5581
5584
|
z(
|
|
5582
5585
|
e,
|
|
5583
5586
|
Re(r),
|
|
@@ -5624,7 +5627,7 @@ const ev = (e, t) => typeof e == "function" ? kl(e(t)) : t && kl(e), tv = Le(
|
|
|
5624
5627
|
Je()
|
|
5625
5628
|
),
|
|
5626
5629
|
t
|
|
5627
|
-
),
|
|
5630
|
+
), ze(
|
|
5628
5631
|
z(at(t, e, n), Re(r)),
|
|
5629
5632
|
([[o, s, i], a]) => {
|
|
5630
5633
|
o && a && a.change && a.change(s, i);
|
|
@@ -5674,7 +5677,7 @@ const ev = (e, t) => typeof e == "function" ? kl(e(t)) : t && kl(e), tv = Le(
|
|
|
5674
5677
|
{ useWindowScroll: i, windowScrollContainerState: a, windowViewportRect: c }
|
|
5675
5678
|
]) => {
|
|
5676
5679
|
const u = _e(), d = J(void 0), f = J(null), h = J(null);
|
|
5677
|
-
return ce(a, f), ce(c, h),
|
|
5680
|
+
return ce(a, f), ce(c, h), ze(
|
|
5678
5681
|
z(
|
|
5679
5682
|
u,
|
|
5680
5683
|
Re(t, r, i, f, h, n)
|
|
@@ -5747,9 +5750,9 @@ const av = Iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5747
5750
|
function m(x) {
|
|
5748
5751
|
x > 0 ? (Te(t, { behavior: "auto", top: -x }), Te(e, 0)) : (Te(e, 0), Te(t, { behavior: "auto", top: -x }));
|
|
5749
5752
|
}
|
|
5750
|
-
return
|
|
5753
|
+
return ze(z(v, Re(e, s)), ([x, b, y]) => {
|
|
5751
5754
|
y && av() ? Te(e, b - x) : m(-x);
|
|
5752
|
-
}),
|
|
5755
|
+
}), ze(
|
|
5753
5756
|
z(
|
|
5754
5757
|
at(bt(s, !1), e, w),
|
|
5755
5758
|
ve(([x, b, y]) => !x && !y && b !== 0),
|
|
@@ -5763,7 +5766,7 @@ const av = Iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
5763
5766
|
re((x) => ({ top: -x }))
|
|
5764
5767
|
),
|
|
5765
5768
|
t
|
|
5766
|
-
),
|
|
5769
|
+
), ze(
|
|
5767
5770
|
z(
|
|
5768
5771
|
u,
|
|
5769
5772
|
Re(h, d),
|
|
@@ -5953,7 +5956,7 @@ function Au(e, t, n) {
|
|
|
5953
5956
|
})), [S] = B.useState(vl(d, E));
|
|
5954
5957
|
lo(() => {
|
|
5955
5958
|
for (const R of i)
|
|
5956
|
-
R in y &&
|
|
5959
|
+
R in y && ze(S[R], y[R]);
|
|
5957
5960
|
return () => {
|
|
5958
5961
|
Object.values(S).map(Zi);
|
|
5959
5962
|
};
|
|
@@ -5972,7 +5975,7 @@ function Au(e, t, n) {
|
|
|
5972
5975
|
);
|
|
5973
5976
|
}, g = (m) => {
|
|
5974
5977
|
const x = B.useContext(a)[m], b = B.useCallback(
|
|
5975
|
-
(y) =>
|
|
5978
|
+
(y) => ze(x, y),
|
|
5976
5979
|
[x]
|
|
5977
5980
|
);
|
|
5978
5981
|
return B.useSyncExternalStore(
|
|
@@ -5983,7 +5986,7 @@ function Au(e, t, n) {
|
|
|
5983
5986
|
}, w = (m) => {
|
|
5984
5987
|
const x = B.useContext(a)[m], [b, y] = B.useState(vl(ot, x));
|
|
5985
5988
|
return lo(
|
|
5986
|
-
() =>
|
|
5989
|
+
() => ze(x, (E) => {
|
|
5987
5990
|
E !== b && y(xl(E));
|
|
5988
5991
|
}),
|
|
5989
5992
|
[x, b]
|
|
@@ -5993,7 +5996,7 @@ function Au(e, t, n) {
|
|
|
5993
5996
|
Component: f,
|
|
5994
5997
|
useEmitter: (m, x) => {
|
|
5995
5998
|
const b = B.useContext(a)[m];
|
|
5996
|
-
lo(() =>
|
|
5999
|
+
lo(() => ze(b, x), [x, b]);
|
|
5997
6000
|
},
|
|
5998
6001
|
useEmitterValue: v,
|
|
5999
6002
|
usePublisher: h
|
|
@@ -6454,7 +6457,7 @@ const Mv = /* @__PURE__ */ Le(
|
|
|
6454
6457
|
S
|
|
6455
6458
|
]) => {
|
|
6456
6459
|
const C = J(0), R = J(0), k = J(Al), N = J({ height: 0, width: 0 }), j = J({ height: 0, width: 0 }), A = _e(), $ = _e(), G = J(0), P = J(null), W = J({ column: 0, row: 0 }), H = _e(), V = _e(), F = J(!1), I = J(0), K = J(!0), D = J(!1), X = J(!1);
|
|
6457
|
-
|
|
6460
|
+
ze(
|
|
6458
6461
|
z(
|
|
6459
6462
|
w,
|
|
6460
6463
|
Re(I),
|
|
@@ -6463,7 +6466,7 @@ const Mv = /* @__PURE__ */ Le(
|
|
|
6463
6466
|
() => {
|
|
6464
6467
|
Te(K, !1);
|
|
6465
6468
|
}
|
|
6466
|
-
),
|
|
6469
|
+
), ze(
|
|
6467
6470
|
z(
|
|
6468
6471
|
at(w, K, j, N, I, D),
|
|
6469
6472
|
ve(([O, M, L, Q, , te]) => O && !M && L.height !== 0 && Q.height !== 0 && !te)
|
|
@@ -6482,7 +6485,7 @@ const Mv = /* @__PURE__ */ Le(
|
|
|
6482
6485
|
en(0)
|
|
6483
6486
|
),
|
|
6484
6487
|
R
|
|
6485
|
-
),
|
|
6488
|
+
), ze(
|
|
6486
6489
|
z(
|
|
6487
6490
|
w,
|
|
6488
6491
|
Re(V),
|
|
@@ -6551,9 +6554,9 @@ const Mv = /* @__PURE__ */ Le(
|
|
|
6551
6554
|
return Pv(Pl(Xe, mt, He));
|
|
6552
6555
|
}
|
|
6553
6556
|
const ht = Fu(lt, Ye, Ue);
|
|
6554
|
-
let dt,
|
|
6555
|
-
ke ? M === 0 && L === 0 && Se > 0 ? (dt = 0,
|
|
6556
|
-
const ee = Pl(dt,
|
|
6557
|
+
let dt, Fe;
|
|
6558
|
+
ke ? M === 0 && L === 0 && Se > 0 ? (dt = 0, Fe = Se - 1) : (dt = ht * $o((M + Pe) / (nt + Pe)), Fe = ht * _l((L + Pe) / (nt + Pe)) - 1, Fe = Xs(O - 1, Ar(Fe, ht - 1)), dt = Xs(Fe, Ar(0, dt))) : (dt = 0, Fe = -1);
|
|
6559
|
+
const ee = Pl(dt, Fe, He), { bottom: se, top: he } = Ol(Ee, Q, te, ee), Be = _l(O / ht), Ge = Be * nt + (Be - 1) * Pe - se;
|
|
6557
6560
|
return { bottom: se, itemHeight: nt, items: ee, itemWidth: Ye, offsetBottom: Ge, offsetTop: he, top: he };
|
|
6558
6561
|
}
|
|
6559
6562
|
)
|
|
@@ -10770,7 +10773,7 @@ const oy = B.memo(function({
|
|
|
10770
10773
|
lt,
|
|
10771
10774
|
ht,
|
|
10772
10775
|
D
|
|
10773
|
-
]),
|
|
10776
|
+
]), Fe = Rt(() => ty(t), [t]);
|
|
10774
10777
|
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
10775
10778
|
/* @__PURE__ */ l.jsx("div", { className: Z(Se(), w.container), children: /* @__PURE__ */ l.jsxs("div", { className: Z(ke(), w.content), children: [
|
|
10776
10779
|
(a || c || I) && /* @__PURE__ */ l.jsxs(
|
|
@@ -10785,7 +10788,7 @@ const oy = B.memo(function({
|
|
|
10785
10788
|
children: [
|
|
10786
10789
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
10787
10790
|
He(),
|
|
10788
|
-
c &&
|
|
10791
|
+
c && Fe && /* @__PURE__ */ l.jsx("span", { className: Z("font-medium", V ? "text-xs" : "text-sm"), children: Fe }),
|
|
10789
10792
|
I && Y.name && /* @__PURE__ */ l.jsxs(
|
|
10790
10793
|
Ii,
|
|
10791
10794
|
{
|
|
@@ -13872,8 +13875,8 @@ function di({
|
|
|
13872
13875
|
isLoadingHistory: $,
|
|
13873
13876
|
loadOlderMessages: G,
|
|
13874
13877
|
api: P
|
|
13875
|
-
} = Mo(), [W, H] = ue(null), [V, F] = ue(""), [I, K] = ue(null), [D, X] = ue([]), [Y, le] = ue(0), [pe, me] = ue(0), [q, O] = ue(!1), [M, L] = ue(null), [Q, te] = ue(null), [Ee, He] = ue(!1), [Se, ke] = ue(null), [Me, Ue] = ue([]), [Pe, nt] = ue(null), [Ye, lt] = ue(null), [ht, dt] = ue(!1),
|
|
13876
|
-
|
|
13878
|
+
} = Mo(), [W, H] = ue(null), [V, F] = ue(""), [I, K] = ue(null), [D, X] = ue([]), [Y, le] = ue(0), [pe, me] = ue(0), [q, O] = ue(!1), [M, L] = ue(null), [Q, te] = ue(null), [Ee, He] = ue(!1), [Se, ke] = ue(null), [Me, Ue] = ue([]), [Pe, nt] = ue(null), [Ye, lt] = ue(null), [ht, dt] = ue(!1), Fe = Ve(null), ee = Ve(null), se = Ve(null), he = De(() => {
|
|
13879
|
+
Fe.current && (Fe.current.value = ""), ee.current && (ee.current.value = ""), le((ie) => ie + 1), me((ie) => ie + 1);
|
|
13877
13880
|
}, []), Be = Ve(!1);
|
|
13878
13881
|
tt(() => {
|
|
13879
13882
|
Be.current && !m && (X([]), he()), Be.current = m;
|
|
@@ -14136,7 +14139,7 @@ function di({
|
|
|
14136
14139
|
/* @__PURE__ */ l.jsx(
|
|
14137
14140
|
"input",
|
|
14138
14141
|
{
|
|
14139
|
-
ref:
|
|
14142
|
+
ref: Fe,
|
|
14140
14143
|
type: "file",
|
|
14141
14144
|
multiple: !0,
|
|
14142
14145
|
onChange: (ie) => no(ie),
|
|
@@ -14198,7 +14201,7 @@ function di({
|
|
|
14198
14201
|
/* @__PURE__ */ l.jsxs(ch, { align: "start", sideOffset: 6, className: "w-52", children: [
|
|
14199
14202
|
a && /* @__PURE__ */ l.jsxs(Li, { onClick: () => {
|
|
14200
14203
|
var ie;
|
|
14201
|
-
return (ie =
|
|
14204
|
+
return (ie = Fe.current) == null ? void 0 : ie.click();
|
|
14202
14205
|
}, className: "cursor-pointer", children: [
|
|
14203
14206
|
/* @__PURE__ */ l.jsx(fi, { className: "h-4 w-4 mr-2" }),
|
|
14204
14207
|
" Attach files or images"
|