teodor-new-chat-ui 4.3.320 → 4.3.321
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 +389 -401
- package/dist/index.umd.js +13 -13
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -136,14 +136,14 @@ function Om() {
|
|
|
136
136
|
}
|
|
137
137
|
return null;
|
|
138
138
|
}
|
|
139
|
-
var E = Object.assign, F = 0, A, X, z, P, U, Y,
|
|
139
|
+
var E = Object.assign, F = 0, A, X, z, P, U, Y, de;
|
|
140
140
|
function ie() {
|
|
141
141
|
}
|
|
142
142
|
ie.__reactDisabledLog = !0;
|
|
143
143
|
function _e() {
|
|
144
144
|
{
|
|
145
145
|
if (F === 0) {
|
|
146
|
-
A = console.log, X = console.info, z = console.warn, P = console.error, U = console.group, Y = console.groupCollapsed,
|
|
146
|
+
A = console.log, X = console.info, z = console.warn, P = console.error, U = console.group, Y = console.groupCollapsed, de = console.groupEnd;
|
|
147
147
|
var R = {
|
|
148
148
|
configurable: !0,
|
|
149
149
|
enumerable: !0,
|
|
@@ -191,7 +191,7 @@ function Om() {
|
|
|
191
191
|
value: Y
|
|
192
192
|
}),
|
|
193
193
|
groupEnd: E({}, R, {
|
|
194
|
-
value:
|
|
194
|
+
value: de
|
|
195
195
|
})
|
|
196
196
|
});
|
|
197
197
|
}
|
|
@@ -324,13 +324,13 @@ function Om() {
|
|
|
324
324
|
}
|
|
325
325
|
return "";
|
|
326
326
|
}
|
|
327
|
-
var Ze = Object.prototype.hasOwnProperty, rt = {},
|
|
328
|
-
function
|
|
327
|
+
var Ze = Object.prototype.hasOwnProperty, rt = {}, ce = g.ReactDebugCurrentFrame;
|
|
328
|
+
function he(R) {
|
|
329
329
|
if (R) {
|
|
330
330
|
var V = R._owner, ae = $e(R.type, R._source, V ? V.type : null);
|
|
331
|
-
|
|
331
|
+
ce.setExtraStackFrame(ae);
|
|
332
332
|
} else
|
|
333
|
-
|
|
333
|
+
ce.setExtraStackFrame(null);
|
|
334
334
|
}
|
|
335
335
|
function De(R, V, ae, Ie, ot) {
|
|
336
336
|
{
|
|
@@ -347,7 +347,7 @@ function Om() {
|
|
|
347
347
|
} catch (yt) {
|
|
348
348
|
We = yt;
|
|
349
349
|
}
|
|
350
|
-
We && !(We instanceof Error) && (
|
|
350
|
+
We && !(We instanceof Error) && (he(ot), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", Ie || "React class", ae, Ye, typeof We), he(null)), We instanceof Error && !(We.message in rt) && (rt[We.message] = !0, he(ot), w("Failed %s type: %s", ae, We.message), he(null));
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
}
|
|
@@ -497,8 +497,8 @@ Check the render method of \`` + R + "`.";
|
|
|
497
497
|
function ne(R) {
|
|
498
498
|
return "";
|
|
499
499
|
}
|
|
500
|
-
var
|
|
501
|
-
function
|
|
500
|
+
var me = {};
|
|
501
|
+
function fe(R) {
|
|
502
502
|
{
|
|
503
503
|
var V = D();
|
|
504
504
|
if (!V) {
|
|
@@ -515,10 +515,10 @@ Check the top-level render call using <` + ae + ">.");
|
|
|
515
515
|
if (!R._store || R._store.validated || R.key != null)
|
|
516
516
|
return;
|
|
517
517
|
R._store.validated = !0;
|
|
518
|
-
var ae =
|
|
519
|
-
if (
|
|
518
|
+
var ae = fe(V);
|
|
519
|
+
if (me[ae])
|
|
520
520
|
return;
|
|
521
|
-
|
|
521
|
+
me[ae] = !0;
|
|
522
522
|
var Ie = "";
|
|
523
523
|
R && R._owner && R._owner !== ct.current && (Ie = " It was passed a child from " + $(R._owner.type) + "."), Q(R), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', ae, Ie), Q(null);
|
|
524
524
|
}
|
|
@@ -1880,8 +1880,8 @@ const gu = (e) => {
|
|
|
1880
1880
|
method: "POST",
|
|
1881
1881
|
body: g,
|
|
1882
1882
|
duplex: "half"
|
|
1883
|
-
}),
|
|
1884
|
-
if (O.isFormData(g) && (
|
|
1883
|
+
}), de;
|
|
1884
|
+
if (O.isFormData(g) && (de = Y.headers.get("content-type")) && I.setContentType(de), Y.body) {
|
|
1885
1885
|
const [ie, _e] = vl(
|
|
1886
1886
|
F,
|
|
1887
1887
|
Go(wl(C))
|
|
@@ -1907,8 +1907,8 @@ const gu = (e) => {
|
|
|
1907
1907
|
["status", "statusText", "headers"].forEach((q) => {
|
|
1908
1908
|
Y[q] = z[q];
|
|
1909
1909
|
});
|
|
1910
|
-
const
|
|
1911
|
-
|
|
1910
|
+
const de = O.toFiniteNumber(z.headers.get("content-length")), [ie, _e] = S && vl(
|
|
1911
|
+
de,
|
|
1912
1912
|
Go(wl(S), !0)
|
|
1913
1913
|
) || [];
|
|
1914
1914
|
z = new r(
|
|
@@ -1920,8 +1920,8 @@ const gu = (e) => {
|
|
|
1920
1920
|
}
|
|
1921
1921
|
k = k || "text";
|
|
1922
1922
|
let U = await f[O.findKey(f, k) || "text"](z, x);
|
|
1923
|
-
return !P && E && E(), await new Promise((Y,
|
|
1924
|
-
hu(Y,
|
|
1923
|
+
return !P && E && E(), await new Promise((Y, de) => {
|
|
1924
|
+
hu(Y, de, {
|
|
1925
1925
|
data: U,
|
|
1926
1926
|
headers: qt.from(z.headers),
|
|
1927
1927
|
status: z.status,
|
|
@@ -3066,7 +3066,7 @@ function Wx(e = {}) {
|
|
|
3066
3066
|
threadId: E.threadId ?? null,
|
|
3067
3067
|
headers: {}
|
|
3068
3068
|
}, (async () => {
|
|
3069
|
-
var
|
|
3069
|
+
var de, ie, _e, q, B, K, L, W, re, oe, se, Se, tt, $e, Ze, rt, ce, he;
|
|
3070
3070
|
const Y = (De) => {
|
|
3071
3071
|
var Be;
|
|
3072
3072
|
try {
|
|
@@ -3085,7 +3085,7 @@ function Wx(e = {}) {
|
|
|
3085
3085
|
if (r)
|
|
3086
3086
|
De = { Authorization: `Bearer ${r}` };
|
|
3087
3087
|
else if (typeof window < "u") {
|
|
3088
|
-
const Ae = window.__AUTH_TOKEN__, ct = ((
|
|
3088
|
+
const Ae = window.__AUTH_TOKEN__, ct = ((de = window.localStorage) == null ? void 0 : de.getItem("authToken")) || null;
|
|
3089
3089
|
let G = null;
|
|
3090
3090
|
try {
|
|
3091
3091
|
const Ce = (ie = window.localStorage) == null ? void 0 : ie.getItem("chat-settings");
|
|
@@ -3173,66 +3173,66 @@ function Wx(e = {}) {
|
|
|
3173
3173
|
ht = ht.slice(Te + 2);
|
|
3174
3174
|
const ne = Kx(D);
|
|
3175
3175
|
if (!ne) continue;
|
|
3176
|
-
let
|
|
3176
|
+
let me;
|
|
3177
3177
|
try {
|
|
3178
|
-
|
|
3178
|
+
me = JSON.parse(ne);
|
|
3179
3179
|
} catch {
|
|
3180
3180
|
console.debug("[use-chat] malformed SSE:", ne.slice(0, 200));
|
|
3181
3181
|
continue;
|
|
3182
3182
|
}
|
|
3183
|
-
const
|
|
3183
|
+
const fe = Vx(me) ? me.data : me;
|
|
3184
3184
|
Ct = Date.now();
|
|
3185
|
-
const nt =
|
|
3185
|
+
const nt = fe.seq;
|
|
3186
3186
|
if (nt !== void 0) {
|
|
3187
3187
|
if (nt <= xt) {
|
|
3188
|
-
console.debug("[use-chat] drop duplicate/out-of-order event", { seq: nt, lastProcessedSeq: xt, type:
|
|
3188
|
+
console.debug("[use-chat] drop duplicate/out-of-order event", { seq: nt, lastProcessedSeq: xt, type: fe.type });
|
|
3189
3189
|
continue;
|
|
3190
3190
|
}
|
|
3191
3191
|
xt > 0 && nt > xt + 1 && ((L = A == null ? void 0 : A.onGap) == null || L.call(A, { from: xt, to: nt })), xt = nt, S.current = nt, v(nt);
|
|
3192
3192
|
}
|
|
3193
3193
|
if (console.debug("[use-chat] received event", {
|
|
3194
|
-
seq:
|
|
3195
|
-
type:
|
|
3194
|
+
seq: fe.seq,
|
|
3195
|
+
type: fe.type,
|
|
3196
3196
|
preview: (() => {
|
|
3197
3197
|
var ke;
|
|
3198
3198
|
try {
|
|
3199
|
-
return
|
|
3199
|
+
return fe.type === "message_delta" ? { deltaTypes: (ke = fe.delta) == null ? void 0 : ke.map((dt) => dt.type), textLen: (fe.delta || []).filter((dt) => dt.type === "text").map((dt) => String(dt.text || "").length) } : fe.content || fe.delta ? { hasContent: !0 } : {};
|
|
3200
3200
|
} catch (dt) {
|
|
3201
3201
|
return { err: String(dt) };
|
|
3202
3202
|
}
|
|
3203
3203
|
})()
|
|
3204
|
-
}),
|
|
3205
|
-
k.current =
|
|
3206
|
-
else if (
|
|
3207
|
-
N.current =
|
|
3204
|
+
}), fe.type === "checkpoint")
|
|
3205
|
+
k.current = fe.checkpointId ?? null, I.current = fe.checkpointNs ?? null, x(fe.checkpointId ?? null);
|
|
3206
|
+
else if (fe.type === "state_history") {
|
|
3207
|
+
N.current = fe;
|
|
3208
3208
|
try {
|
|
3209
|
-
const dt = xr(
|
|
3209
|
+
const dt = xr(fe).latest;
|
|
3210
3210
|
dt && (k.current = dt.checkpointId ?? null, I.current = dt.checkpointNs ?? null, x(dt.checkpointId ?? null));
|
|
3211
3211
|
} catch (ke) {
|
|
3212
3212
|
console.warn("[use-chat] Failed to hydrate state_history payload", ke);
|
|
3213
3213
|
}
|
|
3214
3214
|
}
|
|
3215
3215
|
try {
|
|
3216
|
-
F == null || F(
|
|
3216
|
+
F == null || F(fe);
|
|
3217
3217
|
} catch (ke) {
|
|
3218
|
-
console.error("[use-chat] Error in onEvent callback:", ke, "for event:",
|
|
3218
|
+
console.error("[use-chat] Error in onEvent callback:", ke, "for event:", fe.type);
|
|
3219
3219
|
}
|
|
3220
|
-
if (
|
|
3221
|
-
He.push(
|
|
3222
|
-
else if (
|
|
3223
|
-
const ke =
|
|
3220
|
+
if (fe.type === "token" && e.autoAppendAssistant !== !1)
|
|
3221
|
+
He.push(fe.content), St();
|
|
3222
|
+
else if (fe.type === "message_delta") {
|
|
3223
|
+
const ke = fe.delta.filter((dt) => dt.type === "text").map((dt) => dt.text).join("");
|
|
3224
3224
|
ke && e.autoAppendAssistant !== !1 && (He.push(ke), St());
|
|
3225
|
-
} else if (
|
|
3225
|
+
} else if (fe.type === "heartbeat") {
|
|
3226
3226
|
console.debug("[use-chat] heartbeat received");
|
|
3227
3227
|
try {
|
|
3228
|
-
(W = A == null ? void 0 : A.onHeartbeat) == null || W.call(A,
|
|
3228
|
+
(W = A == null ? void 0 : A.onHeartbeat) == null || W.call(A, fe);
|
|
3229
3229
|
} catch (ke) {
|
|
3230
3230
|
console.warn("[use-chat] heartbeat callback failed", ke);
|
|
3231
3231
|
}
|
|
3232
|
-
} else if (bt !== null && cancelAnimationFrame(bt), Nt(),
|
|
3233
|
-
x(
|
|
3234
|
-
else if (
|
|
3235
|
-
const ke =
|
|
3232
|
+
} else if (bt !== null && cancelAnimationFrame(bt), Nt(), fe.type === "checkpoint")
|
|
3233
|
+
x(fe.checkpointId);
|
|
3234
|
+
else if (fe.type === "error") {
|
|
3235
|
+
const ke = fe;
|
|
3236
3236
|
if (d(ke.message), z = "error", P = ke.message, ke.error_type === "auth_error" || ke.code === "TOKEN_EXPIRED" || ((re = ke.message) == null ? void 0 : re.includes("token")) || ((oe = ke.message) == null ? void 0 : oe.includes("401")) || ((se = ke.message) == null ? void 0 : se.includes("unauthorized")) || ((Se = ke.message) == null ? void 0 : Se.includes("Unauthorized"))) {
|
|
3237
3237
|
console.error("[use-chat] Auth error detected:", ke.message);
|
|
3238
3238
|
try {
|
|
@@ -3267,12 +3267,12 @@ function Wx(e = {}) {
|
|
|
3267
3267
|
z = z ?? "aborted";
|
|
3268
3268
|
else {
|
|
3269
3269
|
const Be = De.message || String(De);
|
|
3270
|
-
z = "error", P = Be, d(Be), (rt = A == null ? void 0 : A.onError) == null || rt.call(A, Be), U || ((
|
|
3270
|
+
z = "error", P = Be, d(Be), (rt = A == null ? void 0 : A.onError) == null || rt.call(A, Be), U || ((ce = A == null ? void 0 : A.onConnectionError) == null || ce.call(A, Be), U = !0);
|
|
3271
3271
|
}
|
|
3272
3272
|
} finally {
|
|
3273
3273
|
const De = S.current, Be = k.current, Ke = I.current, Qe = N.current, Fe = z ?? (X.signal.aborted ? "aborted" : P ? "error" : "complete");
|
|
3274
3274
|
try {
|
|
3275
|
-
(
|
|
3275
|
+
(he = A == null ? void 0 : A.onClosed) == null || he.call(A, {
|
|
3276
3276
|
reason: Fe,
|
|
3277
3277
|
lastSeq: De,
|
|
3278
3278
|
lastCheckpointId: Be,
|
|
@@ -3944,7 +3944,7 @@ function ny({
|
|
|
3944
3944
|
onAuthError: i,
|
|
3945
3945
|
onThreadChange: a
|
|
3946
3946
|
}) {
|
|
3947
|
-
const { api: l, baseUrl: c } = Cu(), d = Ge(() => An(c), [c]), [f, p] = be([]), [h, x] = be(t), [m, v] = be(!1), [g, w] = be(null), [b, T] = be(!1), [S, C] = be(null), { state: k, seed: I, prepend: N, pushUser: j, onEvent: _ } = Xx(), [M, $] = be(!1), [E, F] = be(!1), [A, X] = be(null), [z, P] = be([]), [U, Y] = be([]), [
|
|
3947
|
+
const { api: l, baseUrl: c } = Cu(), d = Ge(() => An(c), [c]), [f, p] = be([]), [h, x] = be(t), [m, v] = be(!1), [g, w] = be(null), [b, T] = be(!1), [S, C] = be(null), { state: k, seed: I, prepend: N, pushUser: j, onEvent: _ } = Xx(), [M, $] = be(!1), [E, F] = be(!1), [A, X] = be(null), [z, P] = be([]), [U, Y] = be([]), [de, ie] = be(!1), _e = Ge(
|
|
3948
3948
|
() => z.flatMap((G) => G.messages ?? []),
|
|
3949
3949
|
[z]
|
|
3950
3950
|
), q = Ge(() => Ux(_e), [_e]), B = Ve(h), K = Ve(null), L = Ve(null), W = Ve(null), re = Ve(null), oe = Ve(!1), se = Ve(null), Se = Ve(/* @__PURE__ */ new Map()), tt = Ve(/* @__PURE__ */ new Map());
|
|
@@ -3987,11 +3987,11 @@ function ny({
|
|
|
3987
3987
|
}), Y(Te), P(Ce), $(!!(D != null && D.nextCursor)), X((D == null ? void 0 : D.nextCursor) ?? null), se.current = `${Q}:latest`, L.current = null, W.current = null;
|
|
3988
3988
|
},
|
|
3989
3989
|
[I]
|
|
3990
|
-
),
|
|
3990
|
+
), ce = ye((G) => {
|
|
3991
3991
|
console.log("[ChatSessionProvider] 🎯 Received thread_info:", G.threadId), Ze(G), B.current !== G.threadId && ((G.created ?? !B.current) && (L.current = G.threadId), W.current = G.threadId, console.log("[ChatSessionProvider] thread_info: marking to skip auto-load for new thread"), x(G.threadId));
|
|
3992
|
-
}, [Ze]), { startStream:
|
|
3992
|
+
}, [Ze]), { startStream: he, stop: De, isStreaming: Be, error: Ke, setAuthToken: Qe } = ty({
|
|
3993
3993
|
baseUrl: d,
|
|
3994
|
-
onThreadInfo:
|
|
3994
|
+
onThreadInfo: ce,
|
|
3995
3995
|
onMessageEvent: _,
|
|
3996
3996
|
onStateHistory: rt,
|
|
3997
3997
|
onUnhandledEvent: (G) => {
|
|
@@ -4042,7 +4042,7 @@ function ny({
|
|
|
4042
4042
|
const ne = G;
|
|
4043
4043
|
T(!0), C(null);
|
|
4044
4044
|
try {
|
|
4045
|
-
const
|
|
4045
|
+
const me = await l.getStateHistory({
|
|
4046
4046
|
threadId: ne,
|
|
4047
4047
|
checkpointId: Q || void 0
|
|
4048
4048
|
});
|
|
@@ -4050,15 +4050,15 @@ function ny({
|
|
|
4050
4050
|
console.log(`[ChatSessionProvider] Thread changed during load (was ${ne}, now ${B.current}), discarding stale data`);
|
|
4051
4051
|
return;
|
|
4052
4052
|
}
|
|
4053
|
-
const { checkpoints:
|
|
4053
|
+
const { checkpoints: fe, timeline: nt } = xr(me), ke = fe.find((dt) => dt.messages && dt.messages.length > 0) ?? (Q ? fe.find((dt) => dt.checkpointId === Q) : null) ?? fe[0];
|
|
4054
4054
|
I((ke == null ? void 0 : ke.messages) ?? [], {
|
|
4055
4055
|
checkpointId: (ke == null ? void 0 : ke.checkpointId) ?? null,
|
|
4056
4056
|
checkpointNs: (ke == null ? void 0 : ke.checkpointNs) ?? null
|
|
4057
|
-
}), Y(nt), P(
|
|
4058
|
-
} catch (
|
|
4057
|
+
}), Y(nt), P(fe), $(!!(ke != null && ke.nextCursor)), X((ke == null ? void 0 : ke.nextCursor) ?? null);
|
|
4058
|
+
} catch (me) {
|
|
4059
4059
|
if (B.current === ne) {
|
|
4060
|
-
const
|
|
4061
|
-
C(
|
|
4060
|
+
const fe = String(me);
|
|
4061
|
+
C(fe), s == null || s(fe);
|
|
4062
4062
|
}
|
|
4063
4063
|
} finally {
|
|
4064
4064
|
T(!1);
|
|
@@ -4137,16 +4137,16 @@ function ny({
|
|
|
4137
4137
|
console.log(`[ChatSessionProvider] Thread changed during checkpoint navigation (was ${Te}, now ${B.current}), discarding stale data`);
|
|
4138
4138
|
return;
|
|
4139
4139
|
}
|
|
4140
|
-
const { checkpoints: ne, timeline:
|
|
4140
|
+
const { checkpoints: ne, timeline: me } = xr(D), fe = ne.find(
|
|
4141
4141
|
(nt) => nt.checkpointId === G && (Q ? nt.checkpointNs === Q : !0)
|
|
4142
4142
|
);
|
|
4143
|
-
if (!
|
|
4143
|
+
if (!fe) {
|
|
4144
4144
|
console.warn("[ChatSessionProvider] Requested checkpoint not found:", { checkpointId: G, checkpointNs: Q });
|
|
4145
4145
|
return;
|
|
4146
4146
|
}
|
|
4147
|
-
Y(
|
|
4148
|
-
checkpointId:
|
|
4149
|
-
checkpointNs:
|
|
4147
|
+
Y(me), P(ne), I(fe.messages ?? [], {
|
|
4148
|
+
checkpointId: fe.checkpointId ?? null,
|
|
4149
|
+
checkpointNs: fe.checkpointNs ?? null
|
|
4150
4150
|
});
|
|
4151
4151
|
} catch (D) {
|
|
4152
4152
|
B.current === Te && (s == null || s(String(D)));
|
|
@@ -4209,12 +4209,12 @@ function ny({
|
|
|
4209
4209
|
// The command is the key: backend extracts this and routes to LangGraph
|
|
4210
4210
|
command: { kind: "resume", value: D }
|
|
4211
4211
|
};
|
|
4212
|
-
|
|
4212
|
+
he(ne);
|
|
4213
4213
|
} catch (ne) {
|
|
4214
4214
|
throw console.error(`[ChatSessionProvider] Failed to handle interrupt ${G}:`, ne), ne;
|
|
4215
4215
|
}
|
|
4216
4216
|
},
|
|
4217
|
-
[k.lastCheckpointId, k.lastCheckpointNs,
|
|
4217
|
+
[k.lastCheckpointId, k.lastCheckpointNs, he]
|
|
4218
4218
|
);
|
|
4219
4219
|
kt(() => {
|
|
4220
4220
|
$e();
|
|
@@ -4238,24 +4238,24 @@ function ny({
|
|
|
4238
4238
|
(G == null ? void 0 : G.attachments) ?? []
|
|
4239
4239
|
), ne = [...D];
|
|
4240
4240
|
Te != null && Te.trim() && ne.push({ type: "text", text: Te });
|
|
4241
|
-
const
|
|
4241
|
+
const me = {
|
|
4242
4242
|
id: `msg-${Date.now()}`,
|
|
4243
4243
|
role: "user",
|
|
4244
4244
|
content: ne,
|
|
4245
4245
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
4246
4246
|
};
|
|
4247
|
-
j(
|
|
4248
|
-
const
|
|
4247
|
+
j(me);
|
|
4248
|
+
const fe = {
|
|
4249
4249
|
threadId: Ce,
|
|
4250
4250
|
payload: {
|
|
4251
|
-
messages: [
|
|
4251
|
+
messages: [me]
|
|
4252
4252
|
},
|
|
4253
4253
|
checkpointId: (Q == null ? void 0 : Q.checkpointId) ?? k.lastCheckpointId ?? void 0,
|
|
4254
4254
|
checkpointNs: (Q == null ? void 0 : Q.checkpointNs) ?? k.lastCheckpointNs ?? void 0
|
|
4255
4255
|
};
|
|
4256
|
-
|
|
4256
|
+
he(fe);
|
|
4257
4257
|
},
|
|
4258
|
-
[l, Fe, j, k,
|
|
4258
|
+
[l, Fe, j, k, he]
|
|
4259
4259
|
), je = Ge(
|
|
4260
4260
|
() => ({
|
|
4261
4261
|
threads: f,
|
|
@@ -4285,7 +4285,7 @@ function ny({
|
|
|
4285
4285
|
metadata: null,
|
|
4286
4286
|
isLoading: b,
|
|
4287
4287
|
isHistoryLoading: E,
|
|
4288
|
-
isLoadingCheckpoint:
|
|
4288
|
+
isLoadingCheckpoint: de,
|
|
4289
4289
|
error: S,
|
|
4290
4290
|
hasMore: M,
|
|
4291
4291
|
loadOlder: St,
|
|
@@ -4305,7 +4305,7 @@ function ny({
|
|
|
4305
4305
|
U,
|
|
4306
4306
|
b,
|
|
4307
4307
|
E,
|
|
4308
|
-
|
|
4308
|
+
de,
|
|
4309
4309
|
S,
|
|
4310
4310
|
M,
|
|
4311
4311
|
St,
|
|
@@ -4473,11 +4473,11 @@ function sy({
|
|
|
4473
4473
|
try {
|
|
4474
4474
|
const Y = l(A);
|
|
4475
4475
|
Y && typeof Y.then == "function" ? Y.then(() => {
|
|
4476
|
-
var
|
|
4477
|
-
((
|
|
4476
|
+
var de, ie;
|
|
4477
|
+
((de = C.current) == null ? void 0 : de.id) === X && C.current.shouldClear && (x || (v(""), T.current && (T.current.style.height = "auto"), a == null || a(""))), ((ie = C.current) == null ? void 0 : ie.id) === X && (C.current = null);
|
|
4478
4478
|
}).catch(() => {
|
|
4479
|
-
var
|
|
4480
|
-
((
|
|
4479
|
+
var de;
|
|
4480
|
+
((de = C.current) == null ? void 0 : de.id) === X && (C.current = null);
|
|
4481
4481
|
}) : (((z = C.current) == null ? void 0 : z.id) === X && C.current.shouldClear && (x || (v(""), T.current && (T.current.style.height = "auto"), a == null || a(""))), ((P = C.current) == null ? void 0 : P.id) === X && (C.current = null));
|
|
4482
4482
|
} catch {
|
|
4483
4483
|
((U = C.current) == null ? void 0 : U.id) === X && (C.current = null);
|
|
@@ -4539,7 +4539,7 @@ function sy({
|
|
|
4539
4539
|
] }) });
|
|
4540
4540
|
}
|
|
4541
4541
|
const iy = ee.memo(sy);
|
|
4542
|
-
function
|
|
4542
|
+
function pe(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
4543
4543
|
return function(o) {
|
|
4544
4544
|
if (e == null || e(o), n === !1 || !o.defaultPrevented)
|
|
4545
4545
|
return t == null ? void 0 : t(o);
|
|
@@ -4816,9 +4816,9 @@ var my = "DismissableLayer", $i = "dismissableLayer.update", gy = "dismissableLa
|
|
|
4816
4816
|
pointerEvents: b ? T ? "auto" : "none" : void 0,
|
|
4817
4817
|
...e.style
|
|
4818
4818
|
},
|
|
4819
|
-
onFocusCapture:
|
|
4820
|
-
onBlurCapture:
|
|
4821
|
-
onPointerDownCapture:
|
|
4819
|
+
onFocusCapture: pe(e.onFocusCapture, C.onFocusCapture),
|
|
4820
|
+
onBlurCapture: pe(e.onBlurCapture, C.onBlurCapture),
|
|
4821
|
+
onPointerDownCapture: pe(
|
|
4822
4822
|
e.onPointerDownCapture,
|
|
4823
4823
|
S.onPointerDownCapture
|
|
4824
4824
|
)
|
|
@@ -6449,8 +6449,8 @@ var Ra = "PopperContent", [Wv, Vv] = Xu(Ra), td = y.forwardRef(
|
|
|
6449
6449
|
$v({
|
|
6450
6450
|
...$,
|
|
6451
6451
|
apply: ({ elements: Se, rects: tt, availableWidth: $e, availableHeight: Ze }) => {
|
|
6452
|
-
const { width: rt, height:
|
|
6453
|
-
|
|
6452
|
+
const { width: rt, height: ce } = tt.reference, he = Se.floating.style;
|
|
6453
|
+
he.setProperty("--radix-popper-available-width", `${$e}px`), he.setProperty("--radix-popper-available-height", `${Ze}px`), he.setProperty("--radix-popper-anchor-width", `${rt}px`), he.setProperty("--radix-popper-anchor-height", `${ce}px`);
|
|
6454
6454
|
}
|
|
6455
6455
|
}),
|
|
6456
6456
|
T && zv({ element: T, padding: a }),
|
|
@@ -6461,7 +6461,7 @@ var Ra = "PopperContent", [Wv, Vv] = Xu(Ra), td = y.forwardRef(
|
|
|
6461
6461
|
Mt(() => {
|
|
6462
6462
|
X && (Y == null || Y());
|
|
6463
6463
|
}, [X, Y]);
|
|
6464
|
-
const
|
|
6464
|
+
const de = (K = z.arrow) == null ? void 0 : K.x, ie = (L = z.arrow) == null ? void 0 : L.y, _e = ((W = z.arrow) == null ? void 0 : W.centerOffset) !== 0, [q, B] = y.useState();
|
|
6465
6465
|
return Mt(() => {
|
|
6466
6466
|
g && B(window.getComputedStyle(g).zIndex);
|
|
6467
6467
|
}, [g]), /* @__PURE__ */ u.jsx(
|
|
@@ -6494,7 +6494,7 @@ var Ra = "PopperContent", [Wv, Vv] = Xu(Ra), td = y.forwardRef(
|
|
|
6494
6494
|
scope: n,
|
|
6495
6495
|
placedSide: P,
|
|
6496
6496
|
onArrowChange: S,
|
|
6497
|
-
arrowX:
|
|
6497
|
+
arrowX: de,
|
|
6498
6498
|
arrowY: ie,
|
|
6499
6499
|
shouldHideArrow: _e,
|
|
6500
6500
|
children: /* @__PURE__ */ u.jsx(
|
|
@@ -6718,10 +6718,10 @@ var ow = y.forwardRef((e, t) => {
|
|
|
6718
6718
|
...f,
|
|
6719
6719
|
ref: h,
|
|
6720
6720
|
style: { outline: "none", ...e.style },
|
|
6721
|
-
onMouseDown:
|
|
6721
|
+
onMouseDown: pe(e.onMouseDown, () => {
|
|
6722
6722
|
S.current = !0;
|
|
6723
6723
|
}),
|
|
6724
|
-
onFocus:
|
|
6724
|
+
onFocus: pe(e.onFocus, (I) => {
|
|
6725
6725
|
const N = !S.current;
|
|
6726
6726
|
if (I.target === I.currentTarget && N && !g) {
|
|
6727
6727
|
const j = new CustomEvent(mi, Qv);
|
|
@@ -6734,7 +6734,7 @@ var ow = y.forwardRef((e, t) => {
|
|
|
6734
6734
|
}
|
|
6735
6735
|
S.current = !1;
|
|
6736
6736
|
}),
|
|
6737
|
-
onBlur:
|
|
6737
|
+
onBlur: pe(e.onBlur, () => w(!1))
|
|
6738
6738
|
}
|
|
6739
6739
|
)
|
|
6740
6740
|
}
|
|
@@ -6766,11 +6766,11 @@ var ow = y.forwardRef((e, t) => {
|
|
|
6766
6766
|
"data-orientation": d.orientation,
|
|
6767
6767
|
...a,
|
|
6768
6768
|
ref: t,
|
|
6769
|
-
onMouseDown:
|
|
6769
|
+
onMouseDown: pe(e.onMouseDown, (v) => {
|
|
6770
6770
|
r ? d.onItemFocus(c) : v.preventDefault();
|
|
6771
6771
|
}),
|
|
6772
|
-
onFocus:
|
|
6773
|
-
onKeyDown:
|
|
6772
|
+
onFocus: pe(e.onFocus, () => d.onItemFocus(c)),
|
|
6773
|
+
onKeyDown: pe(e.onKeyDown, (v) => {
|
|
6774
6774
|
if (v.key === "Tab" && v.shiftKey) {
|
|
6775
6775
|
d.onItemShiftTab();
|
|
6776
6776
|
return;
|
|
@@ -7419,7 +7419,7 @@ var on = "MenuContent", [ib, Aa] = lr(on), Nd = y.forwardRef(
|
|
|
7419
7419
|
trapFocus: n.open,
|
|
7420
7420
|
disableOutsidePointerEvents: n.open,
|
|
7421
7421
|
disableOutsideScroll: !0,
|
|
7422
|
-
onFocusOutside:
|
|
7422
|
+
onFocusOutside: pe(
|
|
7423
7423
|
e.onFocusOutside,
|
|
7424
7424
|
(s) => s.preventDefault(),
|
|
7425
7425
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -7460,15 +7460,15 @@ var on = "MenuContent", [ib, Aa] = lr(on), Nd = y.forwardRef(
|
|
|
7460
7460
|
...m
|
|
7461
7461
|
} = e, v = cr(on, n), g = go(on, n), w = Ms(n), b = kd(n), T = eb(n), [S, C] = y.useState(null), k = y.useRef(null), I = Je(t, k, v.onContentChange), N = y.useRef(0), j = y.useRef(""), _ = y.useRef(0), M = y.useRef(null), $ = y.useRef("right"), E = y.useRef(0), F = x ? Os : y.Fragment, A = x ? { as: cb, allowPinchZoom: !0 } : void 0, X = (P) => {
|
|
7462
7462
|
var K, L;
|
|
7463
|
-
const U = j.current + P, Y = T().filter((W) => !W.disabled),
|
|
7463
|
+
const U = j.current + P, Y = T().filter((W) => !W.disabled), de = document.activeElement, ie = (K = Y.find((W) => W.ref.current === de)) == null ? void 0 : K.textValue, _e = Y.map((W) => W.textValue), q = bb(_e, U, ie), B = (L = Y.find((W) => W.textValue === q)) == null ? void 0 : L.ref.current;
|
|
7464
7464
|
(function W(re) {
|
|
7465
7465
|
j.current = re, window.clearTimeout(N.current), re !== "" && (N.current = window.setTimeout(() => W(""), 1e3));
|
|
7466
7466
|
})(U), B && setTimeout(() => B.focus());
|
|
7467
7467
|
};
|
|
7468
7468
|
y.useEffect(() => () => window.clearTimeout(N.current), []), ya();
|
|
7469
7469
|
const z = y.useCallback((P) => {
|
|
7470
|
-
var Y,
|
|
7471
|
-
return $.current === ((Y = M.current) == null ? void 0 : Y.side) && Cb(P, (
|
|
7470
|
+
var Y, de;
|
|
7471
|
+
return $.current === ((Y = M.current) == null ? void 0 : Y.side) && Cb(P, (de = M.current) == null ? void 0 : de.area);
|
|
7472
7472
|
}, []);
|
|
7473
7473
|
return /* @__PURE__ */ u.jsx(
|
|
7474
7474
|
ib,
|
|
@@ -7503,7 +7503,7 @@ var on = "MenuContent", [ib, Aa] = lr(on), Nd = y.forwardRef(
|
|
|
7503
7503
|
{
|
|
7504
7504
|
asChild: !0,
|
|
7505
7505
|
trapped: o,
|
|
7506
|
-
onMountAutoFocus:
|
|
7506
|
+
onMountAutoFocus: pe(s, (P) => {
|
|
7507
7507
|
var U;
|
|
7508
7508
|
P.preventDefault(), (U = k.current) == null || U.focus({ preventScroll: !0 });
|
|
7509
7509
|
}),
|
|
@@ -7528,7 +7528,7 @@ var on = "MenuContent", [ib, Aa] = lr(on), Nd = y.forwardRef(
|
|
|
7528
7528
|
loop: r,
|
|
7529
7529
|
currentTabStopId: S,
|
|
7530
7530
|
onCurrentTabStopIdChange: C,
|
|
7531
|
-
onEntryFocus:
|
|
7531
|
+
onEntryFocus: pe(l, (P) => {
|
|
7532
7532
|
g.isUsingKeyboardRef.current || P.preventDefault();
|
|
7533
7533
|
}),
|
|
7534
7534
|
preventScrollOnEntryFocus: !0,
|
|
@@ -7544,25 +7544,25 @@ var on = "MenuContent", [ib, Aa] = lr(on), Nd = y.forwardRef(
|
|
|
7544
7544
|
...m,
|
|
7545
7545
|
ref: I,
|
|
7546
7546
|
style: { outline: "none", ...m.style },
|
|
7547
|
-
onKeyDown:
|
|
7548
|
-
const Y = P.target.closest("[data-radix-menu-content]") === P.currentTarget,
|
|
7549
|
-
Y && (P.key === "Tab" && P.preventDefault(), !
|
|
7547
|
+
onKeyDown: pe(m.onKeyDown, (P) => {
|
|
7548
|
+
const Y = P.target.closest("[data-radix-menu-content]") === P.currentTarget, de = P.ctrlKey || P.altKey || P.metaKey, ie = P.key.length === 1;
|
|
7549
|
+
Y && (P.key === "Tab" && P.preventDefault(), !de && ie && X(P.key));
|
|
7550
7550
|
const _e = k.current;
|
|
7551
7551
|
if (P.target !== _e || !Jw.includes(P.key)) return;
|
|
7552
7552
|
P.preventDefault();
|
|
7553
7553
|
const B = T().filter((K) => !K.disabled).map((K) => K.ref.current);
|
|
7554
7554
|
Cd.includes(P.key) && B.reverse(), vb(B);
|
|
7555
7555
|
}),
|
|
7556
|
-
onBlur:
|
|
7556
|
+
onBlur: pe(e.onBlur, (P) => {
|
|
7557
7557
|
P.currentTarget.contains(P.target) || (window.clearTimeout(N.current), j.current = "");
|
|
7558
7558
|
}),
|
|
7559
|
-
onPointerMove:
|
|
7559
|
+
onPointerMove: pe(
|
|
7560
7560
|
e.onPointerMove,
|
|
7561
7561
|
Qr((P) => {
|
|
7562
7562
|
const U = P.target, Y = E.current !== P.clientX;
|
|
7563
7563
|
if (P.currentTarget.contains(U) && Y) {
|
|
7564
|
-
const
|
|
7565
|
-
$.current =
|
|
7564
|
+
const de = P.clientX > E.current ? "right" : "left";
|
|
7565
|
+
$.current = de, E.current = P.clientX;
|
|
7566
7566
|
}
|
|
7567
7567
|
})
|
|
7568
7568
|
)
|
|
@@ -7608,16 +7608,16 @@ var es = "MenuItem", dc = "menu.itemSelect", Ds = y.forwardRef(
|
|
|
7608
7608
|
...o,
|
|
7609
7609
|
ref: l,
|
|
7610
7610
|
disabled: n,
|
|
7611
|
-
onClick:
|
|
7611
|
+
onClick: pe(e.onClick, d),
|
|
7612
7612
|
onPointerDown: (f) => {
|
|
7613
7613
|
var p;
|
|
7614
7614
|
(p = e.onPointerDown) == null || p.call(e, f), c.current = !0;
|
|
7615
7615
|
},
|
|
7616
|
-
onPointerUp:
|
|
7616
|
+
onPointerUp: pe(e.onPointerUp, (f) => {
|
|
7617
7617
|
var p;
|
|
7618
7618
|
c.current || (p = f.currentTarget) == null || p.click();
|
|
7619
7619
|
}),
|
|
7620
|
-
onKeyDown:
|
|
7620
|
+
onKeyDown: pe(e.onKeyDown, (f) => {
|
|
7621
7621
|
const p = a.searchRef.current !== "";
|
|
7622
7622
|
n || p && f.key === " " || Wi.includes(f.key) && (f.currentTarget.click(), f.preventDefault());
|
|
7623
7623
|
})
|
|
@@ -7647,18 +7647,18 @@ var _d = y.forwardRef(
|
|
|
7647
7647
|
"data-disabled": r ? "" : void 0,
|
|
7648
7648
|
...s,
|
|
7649
7649
|
ref: c,
|
|
7650
|
-
onPointerMove:
|
|
7650
|
+
onPointerMove: pe(
|
|
7651
7651
|
e.onPointerMove,
|
|
7652
7652
|
Qr((x) => {
|
|
7653
7653
|
r ? i.onItemLeave(x) : (i.onItemEnter(x), x.defaultPrevented || x.currentTarget.focus({ preventScroll: !0 }));
|
|
7654
7654
|
})
|
|
7655
7655
|
),
|
|
7656
|
-
onPointerLeave:
|
|
7656
|
+
onPointerLeave: pe(
|
|
7657
7657
|
e.onPointerLeave,
|
|
7658
7658
|
Qr((x) => i.onItemLeave(x))
|
|
7659
7659
|
),
|
|
7660
|
-
onFocus:
|
|
7661
|
-
onBlur:
|
|
7660
|
+
onFocus: pe(e.onFocus, () => f(!0)),
|
|
7661
|
+
onBlur: pe(e.onBlur, () => f(!1))
|
|
7662
7662
|
}
|
|
7663
7663
|
) })
|
|
7664
7664
|
}
|
|
@@ -7675,7 +7675,7 @@ var _d = y.forwardRef(
|
|
|
7675
7675
|
...o,
|
|
7676
7676
|
ref: t,
|
|
7677
7677
|
"data-state": Oa(n),
|
|
7678
|
-
onSelect:
|
|
7678
|
+
onSelect: pe(
|
|
7679
7679
|
o.onSelect,
|
|
7680
7680
|
() => r == null ? void 0 : r(ts(n) ? !0 : !n),
|
|
7681
7681
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -7707,7 +7707,7 @@ var Md = "MenuRadioItem", Dd = y.forwardRef(
|
|
|
7707
7707
|
...r,
|
|
7708
7708
|
ref: t,
|
|
7709
7709
|
"data-state": Oa(s),
|
|
7710
|
-
onSelect:
|
|
7710
|
+
onSelect: pe(
|
|
7711
7711
|
r.onSelect,
|
|
7712
7712
|
() => {
|
|
7713
7713
|
var i;
|
|
@@ -7789,7 +7789,7 @@ var yb = "MenuSub", [Pk, Bd] = lr(yb), zr = "MenuSubTrigger", Hd = y.forwardRef(
|
|
|
7789
7789
|
var p;
|
|
7790
7790
|
(p = e.onClick) == null || p.call(e, f), !(e.disabled || f.defaultPrevented) && (f.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
7791
7791
|
},
|
|
7792
|
-
onPointerMove:
|
|
7792
|
+
onPointerMove: pe(
|
|
7793
7793
|
e.onPointerMove,
|
|
7794
7794
|
Qr((f) => {
|
|
7795
7795
|
s.onItemEnter(f), !f.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
|
|
@@ -7797,7 +7797,7 @@ var yb = "MenuSub", [Pk, Bd] = lr(yb), zr = "MenuSubTrigger", Hd = y.forwardRef(
|
|
|
7797
7797
|
}, 100));
|
|
7798
7798
|
})
|
|
7799
7799
|
),
|
|
7800
|
-
onPointerLeave:
|
|
7800
|
+
onPointerLeave: pe(
|
|
7801
7801
|
e.onPointerLeave,
|
|
7802
7802
|
Qr((f) => {
|
|
7803
7803
|
var h, x;
|
|
@@ -7826,7 +7826,7 @@ var yb = "MenuSub", [Pk, Bd] = lr(yb), zr = "MenuSubTrigger", Hd = y.forwardRef(
|
|
|
7826
7826
|
}
|
|
7827
7827
|
})
|
|
7828
7828
|
),
|
|
7829
|
-
onKeyDown:
|
|
7829
|
+
onKeyDown: pe(e.onKeyDown, (f) => {
|
|
7830
7830
|
var h;
|
|
7831
7831
|
const p = s.searchRef.current !== "";
|
|
7832
7832
|
e.disabled || p && f.key === " " || Zw[r.dir].includes(f.key) && (n.onOpenChange(!0), (h = n.content) == null || h.focus(), f.preventDefault());
|
|
@@ -7856,13 +7856,13 @@ var Ud = "MenuSubContent", Wd = y.forwardRef(
|
|
|
7856
7856
|
i.isUsingKeyboardRef.current && ((f = l.current) == null || f.focus()), d.preventDefault();
|
|
7857
7857
|
},
|
|
7858
7858
|
onCloseAutoFocus: (d) => d.preventDefault(),
|
|
7859
|
-
onFocusOutside:
|
|
7859
|
+
onFocusOutside: pe(e.onFocusOutside, (d) => {
|
|
7860
7860
|
d.target !== a.trigger && s.onOpenChange(!1);
|
|
7861
7861
|
}),
|
|
7862
|
-
onEscapeKeyDown:
|
|
7862
|
+
onEscapeKeyDown: pe(e.onEscapeKeyDown, (d) => {
|
|
7863
7863
|
i.onClose(), d.preventDefault();
|
|
7864
7864
|
}),
|
|
7865
|
-
onKeyDown:
|
|
7865
|
+
onKeyDown: pe(e.onKeyDown, (d) => {
|
|
7866
7866
|
var h;
|
|
7867
7867
|
const f = d.currentTarget.contains(d.target), p = Qw[i.dir].includes(d.key);
|
|
7868
7868
|
f && p && (s.onOpenChange(!1), (h = a.trigger) == null || h.focus(), d.preventDefault());
|
|
@@ -7965,10 +7965,10 @@ var Gd = "DropdownMenuTrigger", Yd = y.forwardRef(
|
|
|
7965
7965
|
disabled: r,
|
|
7966
7966
|
...o,
|
|
7967
7967
|
ref: ga(t, s.triggerRef),
|
|
7968
|
-
onPointerDown:
|
|
7968
|
+
onPointerDown: pe(e.onPointerDown, (a) => {
|
|
7969
7969
|
!r && a.button === 0 && a.ctrlKey === !1 && (s.onOpenToggle(), s.open || a.preventDefault());
|
|
7970
7970
|
}),
|
|
7971
|
-
onKeyDown:
|
|
7971
|
+
onKeyDown: pe(e.onKeyDown, (a) => {
|
|
7972
7972
|
r || (["Enter", " "].includes(a.key) && s.onOpenToggle(), a.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(a.key) && a.preventDefault());
|
|
7973
7973
|
})
|
|
7974
7974
|
}
|
|
@@ -7992,11 +7992,11 @@ var Jd = "DropdownMenuContent", Zd = y.forwardRef(
|
|
|
7992
7992
|
...s,
|
|
7993
7993
|
...r,
|
|
7994
7994
|
ref: t,
|
|
7995
|
-
onCloseAutoFocus:
|
|
7995
|
+
onCloseAutoFocus: pe(e.onCloseAutoFocus, (a) => {
|
|
7996
7996
|
var l;
|
|
7997
7997
|
i.current || (l = o.triggerRef.current) == null || l.focus(), i.current = !1, a.preventDefault();
|
|
7998
7998
|
}),
|
|
7999
|
-
onInteractOutside:
|
|
7999
|
+
onInteractOutside: pe(e.onInteractOutside, (a) => {
|
|
8000
8000
|
const l = a.detail.originalEvent, c = l.button === 0 && l.ctrlKey === !0, d = l.button === 2 || c;
|
|
8001
8001
|
(!o.modal || d) && (i.current = !0);
|
|
8002
8002
|
}),
|
|
@@ -8395,7 +8395,7 @@ function Ne(e) {
|
|
|
8395
8395
|
e(n) && t(n);
|
|
8396
8396
|
};
|
|
8397
8397
|
}
|
|
8398
|
-
function
|
|
8398
|
+
function le(e) {
|
|
8399
8399
|
return (t) => vf(t, e);
|
|
8400
8400
|
}
|
|
8401
8401
|
function yn(e) {
|
|
@@ -8701,13 +8701,13 @@ const Wt = st(
|
|
|
8701
8701
|
return ve(
|
|
8702
8702
|
H(
|
|
8703
8703
|
e,
|
|
8704
|
-
|
|
8704
|
+
le(({ scrollTop: v }) => v)
|
|
8705
8705
|
),
|
|
8706
8706
|
t
|
|
8707
8707
|
), ve(
|
|
8708
8708
|
H(
|
|
8709
8709
|
e,
|
|
8710
|
-
|
|
8710
|
+
le(({ scrollHeight: v }) => v)
|
|
8711
8711
|
),
|
|
8712
8712
|
i
|
|
8713
8713
|
), ve(t, o), {
|
|
@@ -9056,7 +9056,7 @@ const H0 = {
|
|
|
9056
9056
|
current: [],
|
|
9057
9057
|
prev: []
|
|
9058
9058
|
}),
|
|
9059
|
-
|
|
9059
|
+
le(({ prev: S }) => S)
|
|
9060
9060
|
),
|
|
9061
9061
|
[]
|
|
9062
9062
|
);
|
|
@@ -9065,7 +9065,7 @@ const H0 = {
|
|
|
9065
9065
|
l,
|
|
9066
9066
|
Ne((S) => S.length > 0),
|
|
9067
9067
|
ze(m, h),
|
|
9068
|
-
|
|
9068
|
+
le(([S, C, k]) => {
|
|
9069
9069
|
const I = S.reduce((N, j, _) => Xt(N, j, ro(j, C.offsetTree, k) || _), Sr());
|
|
9070
9070
|
return {
|
|
9071
9071
|
...C,
|
|
@@ -9080,7 +9080,7 @@ const H0 = {
|
|
|
9080
9080
|
r,
|
|
9081
9081
|
ze(m),
|
|
9082
9082
|
Ne(([S, { lastIndex: C }]) => S < C),
|
|
9083
|
-
|
|
9083
|
+
le(([S, { lastIndex: C, lastSize: k }]) => [
|
|
9084
9084
|
{
|
|
9085
9085
|
endIndex: C,
|
|
9086
9086
|
size: k,
|
|
@@ -9093,7 +9093,7 @@ const H0 = {
|
|
|
9093
9093
|
const g = Ft(
|
|
9094
9094
|
H(
|
|
9095
9095
|
c,
|
|
9096
|
-
|
|
9096
|
+
le((S) => S === void 0)
|
|
9097
9097
|
),
|
|
9098
9098
|
!0
|
|
9099
9099
|
);
|
|
@@ -9101,7 +9101,7 @@ const H0 = {
|
|
|
9101
9101
|
H(
|
|
9102
9102
|
d,
|
|
9103
9103
|
Ne((S) => S !== void 0 && ft(Rt(m).sizeTree)),
|
|
9104
|
-
|
|
9104
|
+
le((S) => [{ endIndex: 0, size: S, startIndex: 0 }])
|
|
9105
9105
|
),
|
|
9106
9106
|
n
|
|
9107
9107
|
);
|
|
@@ -9116,7 +9116,7 @@ const H0 = {
|
|
|
9116
9116
|
}),
|
|
9117
9117
|
{ changed: !1, sizes: x }
|
|
9118
9118
|
),
|
|
9119
|
-
|
|
9119
|
+
le((S) => S.changed)
|
|
9120
9120
|
)
|
|
9121
9121
|
);
|
|
9122
9122
|
lt(
|
|
@@ -9126,7 +9126,7 @@ const H0 = {
|
|
|
9126
9126
|
(S, C) => ({ diff: S.prev - C, prev: C }),
|
|
9127
9127
|
{ diff: 0, prev: 0 }
|
|
9128
9128
|
),
|
|
9129
|
-
|
|
9129
|
+
le((S) => S.diff)
|
|
9130
9130
|
),
|
|
9131
9131
|
(S) => {
|
|
9132
9132
|
const { groupIndices: C } = Rt(m);
|
|
@@ -9149,7 +9149,7 @@ const H0 = {
|
|
|
9149
9149
|
H(
|
|
9150
9150
|
s,
|
|
9151
9151
|
ze(m),
|
|
9152
|
-
|
|
9152
|
+
le(([S, C]) => {
|
|
9153
9153
|
const k = C.groupIndices.length > 0, I = [], N = C.lastSize;
|
|
9154
9154
|
if (k) {
|
|
9155
9155
|
const j = to(C.sizeTree, 0);
|
|
@@ -9210,7 +9210,7 @@ const H0 = {
|
|
|
9210
9210
|
H(
|
|
9211
9211
|
i,
|
|
9212
9212
|
ze(m, h),
|
|
9213
|
-
|
|
9213
|
+
le(([S, { offsetTree: C }, k]) => {
|
|
9214
9214
|
const I = -S;
|
|
9215
9215
|
return ro(I, C, k);
|
|
9216
9216
|
})
|
|
@@ -9220,7 +9220,7 @@ const H0 = {
|
|
|
9220
9220
|
H(
|
|
9221
9221
|
i,
|
|
9222
9222
|
ze(m, h),
|
|
9223
|
-
|
|
9223
|
+
le(([S, C, k]) => {
|
|
9224
9224
|
if (C.groupIndices.length > 0) {
|
|
9225
9225
|
if (ft(C.sizeTree))
|
|
9226
9226
|
return C;
|
|
@@ -9290,26 +9290,26 @@ function U0(e) {
|
|
|
9290
9290
|
}
|
|
9291
9291
|
const _f = st(
|
|
9292
9292
|
([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, scrollTop: o }]) => {
|
|
9293
|
-
const s = Xe(), i = Xe(), a = Zt(H(s,
|
|
9293
|
+
const s = Xe(), i = Xe(), a = Zt(H(s, le(U0)));
|
|
9294
9294
|
return ve(
|
|
9295
9295
|
H(
|
|
9296
9296
|
a,
|
|
9297
|
-
|
|
9297
|
+
le((l) => l.totalCount)
|
|
9298
9298
|
),
|
|
9299
9299
|
n
|
|
9300
9300
|
), ve(
|
|
9301
9301
|
H(
|
|
9302
9302
|
a,
|
|
9303
|
-
|
|
9303
|
+
le((l) => l.groupIndices)
|
|
9304
9304
|
),
|
|
9305
9305
|
e
|
|
9306
9306
|
), ve(
|
|
9307
9307
|
H(
|
|
9308
9308
|
_t(o, t, r),
|
|
9309
9309
|
Ne(([l, c]) => Bs(c)),
|
|
9310
|
-
|
|
9310
|
+
le(([l, c, d]) => hn(c.groupOffsetTree, Math.max(l - d, 0), "v")[0]),
|
|
9311
9311
|
mt(),
|
|
9312
|
-
|
|
9312
|
+
le((l) => [l])
|
|
9313
9313
|
),
|
|
9314
9314
|
i
|
|
9315
9315
|
), { groupCounts: s, topItemsIndexes: i };
|
|
@@ -9360,7 +9360,7 @@ const xo = st(
|
|
|
9360
9360
|
h,
|
|
9361
9361
|
ze(n, f, r, m, a, i, p),
|
|
9362
9362
|
ze(e, s, o),
|
|
9363
|
-
|
|
9363
|
+
le(
|
|
9364
9364
|
([
|
|
9365
9365
|
[T, S, C, k, I, N, j, _],
|
|
9366
9366
|
M,
|
|
@@ -9370,7 +9370,7 @@ const xo = st(
|
|
|
9370
9370
|
const F = jf(T), { align: A, behavior: X, offset: z } = F, P = k - 1, U = Af(F, S, P);
|
|
9371
9371
|
let Y = ro(U, S.offsetTree, M) + N;
|
|
9372
9372
|
A === "end" ? (Y += $ + hn(S.sizeTree, U)[1] - C + E, U === P && (Y += j)) : A === "center" ? Y += ($ + hn(S.sizeTree, U)[1] - C + E) / 2 : Y -= I, z && (Y += z);
|
|
9373
|
-
const
|
|
9373
|
+
const de = (ie) => {
|
|
9374
9374
|
b(), ie ? (_("retrying to scroll to", { location: T }, Gt.DEBUG), Le(h, T)) : (Le(x, !0), _("list did not change, scroll successful", {}, Gt.DEBUG));
|
|
9375
9375
|
};
|
|
9376
9376
|
if (b(), X === "smooth") {
|
|
@@ -9378,10 +9378,10 @@ const xo = st(
|
|
|
9378
9378
|
w = lt(t, (_e) => {
|
|
9379
9379
|
ie = ie || _e;
|
|
9380
9380
|
}), v = dn(d, () => {
|
|
9381
|
-
|
|
9381
|
+
de(ie);
|
|
9382
9382
|
});
|
|
9383
9383
|
} else
|
|
9384
|
-
v = dn(H(t, V0(150)),
|
|
9384
|
+
v = dn(H(t, V0(150)), de);
|
|
9385
9385
|
return g = setTimeout(() => {
|
|
9386
9386
|
b();
|
|
9387
9387
|
}, 1200), Le(l, !0), _("scrolling from index to", { behavior: X, index: U, top: Y }, Gt.DEBUG), { behavior: X, top: Y };
|
|
@@ -9487,7 +9487,7 @@ const oo = "up", Ur = "down", K0 = "none", q0 = {
|
|
|
9487
9487
|
ve(
|
|
9488
9488
|
H(
|
|
9489
9489
|
_t(Ee(o), Ee(f)),
|
|
9490
|
-
|
|
9490
|
+
le(([w, b]) => w <= b),
|
|
9491
9491
|
mt()
|
|
9492
9492
|
),
|
|
9493
9493
|
a
|
|
@@ -9549,14 +9549,14 @@ const oo = "up", Ur = "down", K0 = "none", q0 = {
|
|
|
9549
9549
|
{ changed: !1, jump: 0, scrollHeight: 0, scrollTop: 0 }
|
|
9550
9550
|
),
|
|
9551
9551
|
Ne((w) => w.changed),
|
|
9552
|
-
|
|
9552
|
+
le((w) => w.jump)
|
|
9553
9553
|
),
|
|
9554
9554
|
0
|
|
9555
9555
|
);
|
|
9556
9556
|
ve(
|
|
9557
9557
|
H(
|
|
9558
9558
|
x,
|
|
9559
|
-
|
|
9559
|
+
le((w) => w.atBottom)
|
|
9560
9560
|
),
|
|
9561
9561
|
i
|
|
9562
9562
|
), ve(H(i, En(50)), l);
|
|
@@ -9564,13 +9564,13 @@ const oo = "up", Ur = "down", K0 = "none", q0 = {
|
|
|
9564
9564
|
ve(
|
|
9565
9565
|
H(
|
|
9566
9566
|
r,
|
|
9567
|
-
|
|
9567
|
+
le(({ scrollTop: w }) => w),
|
|
9568
9568
|
mt(),
|
|
9569
9569
|
bn(
|
|
9570
9570
|
(w, b) => Rt(h) ? { direction: w.direction, prevScrollTop: b } : { direction: b < w.prevScrollTop ? oo : Ur, prevScrollTop: b },
|
|
9571
9571
|
{ direction: Ur, prevScrollTop: 0 }
|
|
9572
9572
|
),
|
|
9573
|
-
|
|
9573
|
+
le((w) => w.direction)
|
|
9574
9574
|
),
|
|
9575
9575
|
v
|
|
9576
9576
|
), ve(H(r, En(50), yn(K0)), v);
|
|
@@ -9589,7 +9589,7 @@ const oo = "up", Ur = "down", K0 = "none", q0 = {
|
|
|
9589
9589
|
ze(p),
|
|
9590
9590
|
Ne(([w, b]) => !!b),
|
|
9591
9591
|
bn(([w, b], [T]) => [b, T], [0, 0]),
|
|
9592
|
-
|
|
9592
|
+
le(([w, b]) => b - w)
|
|
9593
9593
|
),
|
|
9594
9594
|
g
|
|
9595
9595
|
), {
|
|
@@ -9628,7 +9628,7 @@ const Ha = st(
|
|
|
9628
9628
|
Ee(e),
|
|
9629
9629
|
Ee(a)
|
|
9630
9630
|
),
|
|
9631
|
-
|
|
9631
|
+
le(
|
|
9632
9632
|
([
|
|
9633
9633
|
d,
|
|
9634
9634
|
f,
|
|
@@ -9783,7 +9783,7 @@ const dr = st(
|
|
|
9783
9783
|
const j = N && N.length !== I;
|
|
9784
9784
|
return C && !k && !j;
|
|
9785
9785
|
}),
|
|
9786
|
-
|
|
9786
|
+
le(
|
|
9787
9787
|
([
|
|
9788
9788
|
,
|
|
9789
9789
|
,
|
|
@@ -9823,11 +9823,11 @@ const dr = st(
|
|
|
9823
9823
|
}
|
|
9824
9824
|
if (!_)
|
|
9825
9825
|
return Wo([], U, I, E, A, $);
|
|
9826
|
-
const Y = M.length > 0 ? M[M.length - 1] + 1 : 0,
|
|
9827
|
-
if (
|
|
9826
|
+
const Y = M.length > 0 ? M[M.length - 1] + 1 : 0, de = L0(X, C, k, Y);
|
|
9827
|
+
if (de.length === 0)
|
|
9828
9828
|
return null;
|
|
9829
9829
|
const ie = I - 1, _e = Fs([], (q) => {
|
|
9830
|
-
for (const B of
|
|
9830
|
+
for (const B of de) {
|
|
9831
9831
|
const K = B.value;
|
|
9832
9832
|
let L = K.offset, W = B.start;
|
|
9833
9833
|
const re = K.size;
|
|
@@ -9855,25 +9855,25 @@ const dr = st(
|
|
|
9855
9855
|
H(
|
|
9856
9856
|
e,
|
|
9857
9857
|
Ne(Ma),
|
|
9858
|
-
|
|
9858
|
+
le((C) => C == null ? void 0 : C.length)
|
|
9859
9859
|
),
|
|
9860
9860
|
o
|
|
9861
9861
|
), ve(
|
|
9862
9862
|
H(
|
|
9863
9863
|
w,
|
|
9864
|
-
|
|
9864
|
+
le((C) => C.topListHeight)
|
|
9865
9865
|
),
|
|
9866
9866
|
f
|
|
9867
9867
|
), ve(f, a), ve(
|
|
9868
9868
|
H(
|
|
9869
9869
|
w,
|
|
9870
|
-
|
|
9870
|
+
le((C) => [C.top, C.bottom])
|
|
9871
9871
|
),
|
|
9872
9872
|
i
|
|
9873
9873
|
), ve(
|
|
9874
9874
|
H(
|
|
9875
9875
|
w,
|
|
9876
|
-
|
|
9876
|
+
le((C) => C.items)
|
|
9877
9877
|
),
|
|
9878
9878
|
g
|
|
9879
9879
|
);
|
|
@@ -9883,23 +9883,23 @@ const dr = st(
|
|
|
9883
9883
|
Ne(({ items: C }) => C.length > 0),
|
|
9884
9884
|
ze(o, e),
|
|
9885
9885
|
Ne(([{ items: C }, k]) => C[C.length - 1].originalIndex === k - 1),
|
|
9886
|
-
|
|
9886
|
+
le(([, C, k]) => [C - 1, k]),
|
|
9887
9887
|
mt(no),
|
|
9888
|
-
|
|
9888
|
+
le(([C]) => C)
|
|
9889
9889
|
)
|
|
9890
9890
|
), T = Zt(
|
|
9891
9891
|
H(
|
|
9892
9892
|
w,
|
|
9893
9893
|
En(200),
|
|
9894
9894
|
Ne(({ items: C, topItems: k }) => C.length > 0 && C[0].originalIndex === k.length),
|
|
9895
|
-
|
|
9895
|
+
le(({ items: C }) => C[0].index),
|
|
9896
9896
|
mt()
|
|
9897
9897
|
)
|
|
9898
9898
|
), S = Zt(
|
|
9899
9899
|
H(
|
|
9900
9900
|
w,
|
|
9901
9901
|
Ne(({ items: C }) => C.length > 0),
|
|
9902
|
-
|
|
9902
|
+
le(({ items: C }) => {
|
|
9903
9903
|
let k = 0, I = C.length - 1;
|
|
9904
9904
|
for (; C[k].type === "group" && k < I; )
|
|
9905
9905
|
k++;
|
|
@@ -9931,7 +9931,7 @@ const dr = st(
|
|
|
9931
9931
|
const s = Xe(), i = Ft(
|
|
9932
9932
|
H(
|
|
9933
9933
|
_t(n, e, r, t, o),
|
|
9934
|
-
|
|
9934
|
+
le(([a, l, c, d, f]) => a + l + c + d + f.offsetBottom + f.bottom)
|
|
9935
9935
|
),
|
|
9936
9936
|
0
|
|
9937
9937
|
);
|
|
@@ -9945,7 +9945,7 @@ const dr = st(
|
|
|
9945
9945
|
H(
|
|
9946
9946
|
_t(n, e, t),
|
|
9947
9947
|
Ne(([o]) => o),
|
|
9948
|
-
|
|
9948
|
+
le(([, o, s]) => Math.max(0, o - s)),
|
|
9949
9949
|
En(0),
|
|
9950
9950
|
mt()
|
|
9951
9951
|
),
|
|
@@ -9975,7 +9975,7 @@ const dr = st(
|
|
|
9975
9975
|
d,
|
|
9976
9976
|
ze(t, l, n, s, o, r, a),
|
|
9977
9977
|
ze(e),
|
|
9978
|
-
|
|
9978
|
+
le(([[f, p, h, x, m, v, g, w], b]) => {
|
|
9979
9979
|
const { align: T, behavior: S, calculateViewLocation: C = J0, done: k, ...I } = f, N = Af(f, p, x - 1), j = ro(N, p.offsetTree, b) + m + v, _ = j + hn(p.sizeTree, N)[1], M = w + v, $ = w + h - g, E = C({
|
|
9980
9980
|
itemBottom: _,
|
|
9981
9981
|
itemTop: j,
|
|
@@ -10032,7 +10032,7 @@ const Z0 = (e, t) => typeof e == "function" ? Sc(e(t)) : t && Sc(e), Q0 = st(
|
|
|
10032
10032
|
H(
|
|
10033
10033
|
_t(H(Ee(t), or(1)), l),
|
|
10034
10034
|
ze(Ee(x), s, a, f),
|
|
10035
|
-
|
|
10035
|
+
le(([[S, C], k, I, N, j]) => {
|
|
10036
10036
|
let _ = C && N, M = "auto";
|
|
10037
10037
|
return _ && (M = Z0(k, I || j), _ = _ && !!M), { followOutputBehavior: M, shouldFollow: _, totalCount: S };
|
|
10038
10038
|
}),
|
|
@@ -10076,7 +10076,7 @@ const Z0 = (e, t) => typeof e == "function" ? Sc(e(t)) : t && Sc(e), Q0 = st(
|
|
|
10076
10076
|
Ki(
|
|
10077
10077
|
H(
|
|
10078
10078
|
Ee(r),
|
|
10079
|
-
|
|
10079
|
+
le((S) => {
|
|
10080
10080
|
var C;
|
|
10081
10081
|
return (C = S == null ? void 0 : S.length) != null ? C : 0;
|
|
10082
10082
|
})
|
|
@@ -10088,7 +10088,7 @@ const Z0 = (e, t) => typeof e == "function" ? Sc(e(t)) : t && Sc(e), Q0 = st(
|
|
|
10088
10088
|
H(
|
|
10089
10089
|
_t(H(T, or(1)), l),
|
|
10090
10090
|
ze(Ee(b), a, f, p),
|
|
10091
|
-
|
|
10091
|
+
le(([[S, C], k, I, N, j]) => C && I && (k == null ? void 0 : k({ context: j, totalCount: S, scrollingInProgress: N }))),
|
|
10092
10092
|
Ne((S) => !!S),
|
|
10093
10093
|
En(0)
|
|
10094
10094
|
),
|
|
@@ -10119,7 +10119,7 @@ const Z0 = (e, t) => typeof e == "function" ? Sc(e(t)) : t && Sc(e), Q0 = st(
|
|
|
10119
10119
|
ze(s),
|
|
10120
10120
|
Ne(([, l]) => l !== 0),
|
|
10121
10121
|
ze(o, r, t, n, e),
|
|
10122
|
-
|
|
10122
|
+
le(([[, l], c, d, f, p, h = []]) => Of(l, c, d, f, p, h))
|
|
10123
10123
|
),
|
|
10124
10124
|
i
|
|
10125
10125
|
), {}),
|
|
@@ -10133,7 +10133,7 @@ const Z0 = (e, t) => typeof e == "function" ? Sc(e(t)) : t && Sc(e), Q0 = st(
|
|
|
10133
10133
|
e,
|
|
10134
10134
|
ze(r),
|
|
10135
10135
|
Ne(([, o]) => o !== 0),
|
|
10136
|
-
|
|
10136
|
+
le(([, o]) => ({ top: o }))
|
|
10137
10137
|
),
|
|
10138
10138
|
(o) => {
|
|
10139
10139
|
dn(
|
|
@@ -10163,7 +10163,7 @@ const Z0 = (e, t) => typeof e == "function" ? Sc(e(t)) : t && Sc(e), Q0 = st(
|
|
|
10163
10163
|
e,
|
|
10164
10164
|
ze(r, t, n),
|
|
10165
10165
|
Ne(([o, s]) => !!s),
|
|
10166
|
-
|
|
10166
|
+
le(([o, s, i, a]) => {
|
|
10167
10167
|
const { enter: l, exit: c } = s;
|
|
10168
10168
|
if (i) {
|
|
10169
10169
|
if (c(o, a))
|
|
@@ -10189,7 +10189,7 @@ const Z0 = (e, t) => typeof e == "function" ? Sc(e(t)) : t && Sc(e), Q0 = st(
|
|
|
10189
10189
|
return ve(
|
|
10190
10190
|
H(
|
|
10191
10191
|
_t(n, r),
|
|
10192
|
-
|
|
10192
|
+
le(([{ scrollHeight: a, scrollTop: l, viewportHeight: c }, { offsetTop: d }]) => ({
|
|
10193
10193
|
scrollHeight: a,
|
|
10194
10194
|
scrollTop: Math.max(0, l - d),
|
|
10195
10195
|
viewportHeight: c
|
|
@@ -10200,7 +10200,7 @@ const Z0 = (e, t) => typeof e == "function" ? Sc(e(t)) : t && Sc(e), Q0 = st(
|
|
|
10200
10200
|
H(
|
|
10201
10201
|
t,
|
|
10202
10202
|
ze(r),
|
|
10203
|
-
|
|
10203
|
+
le(([a, { offsetTop: l }]) => ({
|
|
10204
10204
|
...a,
|
|
10205
10205
|
top: a.top + l
|
|
10206
10206
|
}))
|
|
@@ -10234,13 +10234,13 @@ const Z0 = (e, t) => typeof e == "function" ? Sc(e(t)) : t && Sc(e), Q0 = st(
|
|
|
10234
10234
|
const T = F0(x.sizeTree);
|
|
10235
10235
|
v && g !== null && w !== null && (m = g.scrollTop - w.offsetTop), m -= b, h({ ranges: T, scrollTop: m });
|
|
10236
10236
|
}
|
|
10237
|
-
), ve(H(d, Ne(Ma),
|
|
10237
|
+
), ve(H(d, Ne(Ma), le(rS)), o), ve(
|
|
10238
10238
|
H(
|
|
10239
10239
|
s,
|
|
10240
10240
|
ze(d),
|
|
10241
10241
|
Ne(([, h]) => h !== void 0),
|
|
10242
10242
|
mt(),
|
|
10243
|
-
|
|
10243
|
+
le(([, h]) => h.ranges)
|
|
10244
10244
|
),
|
|
10245
10245
|
e
|
|
10246
10246
|
), {
|
|
@@ -10259,7 +10259,7 @@ const oS = st(([{ topItemsIndexes: e }]) => {
|
|
|
10259
10259
|
H(
|
|
10260
10260
|
t,
|
|
10261
10261
|
Ne((n) => n >= 0),
|
|
10262
|
-
|
|
10262
|
+
le((n) => Array.from({ length: n }).map((r, o) => o))
|
|
10263
10263
|
),
|
|
10264
10264
|
e
|
|
10265
10265
|
), { topItemCount: t };
|
|
@@ -10292,7 +10292,7 @@ const sS = Ff(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
10292
10292
|
Ne(([g]) => g !== 0),
|
|
10293
10293
|
ze(r, a, n, o, h, x),
|
|
10294
10294
|
Ne(([, g, w, b, , , T]) => !T && !b && g !== 0 && w === oo),
|
|
10295
|
-
|
|
10295
|
+
le(([[g], , , , , w]) => (w("Upward scrolling compensation", { amount: g }, Gt.DEBUG), g))
|
|
10296
10296
|
)
|
|
10297
10297
|
);
|
|
10298
10298
|
function v(g) {
|
|
@@ -10304,21 +10304,21 @@ const sS = Ff(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
10304
10304
|
H(
|
|
10305
10305
|
_t(Ft(s, !1), e, x),
|
|
10306
10306
|
Ne(([g, w, b]) => !g && !b && w !== 0),
|
|
10307
|
-
|
|
10307
|
+
le(([g, w]) => w),
|
|
10308
10308
|
En(1)
|
|
10309
10309
|
),
|
|
10310
10310
|
v
|
|
10311
10311
|
), ve(
|
|
10312
10312
|
H(
|
|
10313
10313
|
f,
|
|
10314
|
-
|
|
10314
|
+
le((g) => ({ top: -g }))
|
|
10315
10315
|
),
|
|
10316
10316
|
t
|
|
10317
10317
|
), lt(
|
|
10318
10318
|
H(
|
|
10319
10319
|
c,
|
|
10320
10320
|
ze(p, d),
|
|
10321
|
-
|
|
10321
|
+
le(([g, { groupIndices: w, lastSize: b, sizeTree: T }, S]) => {
|
|
10322
10322
|
function C(k) {
|
|
10323
10323
|
return k * (b + S);
|
|
10324
10324
|
}
|
|
@@ -10415,7 +10415,7 @@ const sS = Ff(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
10415
10415
|
]) => (ve(T.rangeChanged, N.scrollSeekRangeChanged), ve(
|
|
10416
10416
|
H(
|
|
10417
10417
|
N.windowViewportRect,
|
|
10418
|
-
|
|
10418
|
+
le((j) => j.visibleHeight)
|
|
10419
10419
|
),
|
|
10420
10420
|
m.viewportHeight
|
|
10421
10421
|
), {
|
|
@@ -10621,7 +10621,7 @@ const uS = /* @__PURE__ */ st(() => {
|
|
|
10621
10621
|
const e = Z((a) => `Item ${a}`), t = Z((a) => `Group ${a}`), n = Z({}), r = Z(Va), o = Z("div"), s = Z(Or), i = (a, l = null) => Ft(
|
|
10622
10622
|
H(
|
|
10623
10623
|
n,
|
|
10624
|
-
|
|
10624
|
+
le((c) => c[a]),
|
|
10625
10625
|
mt()
|
|
10626
10626
|
),
|
|
10627
10627
|
l
|
|
@@ -10934,7 +10934,7 @@ const bS = ({ children: e }) => {
|
|
|
10934
10934
|
] })), r = Z(null), o = Z(null), s = Z({}), i = Z(Va), a = Z(Or), l = (c, d = null) => Ft(
|
|
10935
10935
|
H(
|
|
10936
10936
|
s,
|
|
10937
|
-
|
|
10937
|
+
le((f) => f[c]),
|
|
10938
10938
|
mt()
|
|
10939
10939
|
),
|
|
10940
10940
|
d
|
|
@@ -11004,7 +11004,7 @@ const PS = /* @__PURE__ */ st(
|
|
|
11004
11004
|
{ customScrollParent: v, useWindowScroll: g, windowScrollContainerState: w, windowScrollTo: b, windowViewportRect: T },
|
|
11005
11005
|
S
|
|
11006
11006
|
]) => {
|
|
11007
|
-
const C = Z(0), k = Z(0), I = Z(kc), N = Z({ height: 0, width: 0 }), j = Z({ height: 0, width: 0 }), _ = Xe(), M = Xe(), $ = Z(0), E = Z(null), F = Z({ column: 0, row: 0 }), A = Xe(), X = Xe(), z = Z(!1), P = Z(0), U = Z(!0), Y = Z(!1),
|
|
11007
|
+
const C = Z(0), k = Z(0), I = Z(kc), N = Z({ height: 0, width: 0 }), j = Z({ height: 0, width: 0 }), _ = Xe(), M = Xe(), $ = Z(0), E = Z(null), F = Z({ column: 0, row: 0 }), A = Xe(), X = Xe(), z = Z(!1), P = Z(0), U = Z(!0), Y = Z(!1), de = Z(!1);
|
|
11008
11008
|
lt(
|
|
11009
11009
|
H(
|
|
11010
11010
|
x,
|
|
@@ -11047,7 +11047,7 @@ const PS = /* @__PURE__ */ st(
|
|
|
11047
11047
|
), ve(
|
|
11048
11048
|
H(
|
|
11049
11049
|
N,
|
|
11050
|
-
|
|
11050
|
+
le(({ height: L }) => L)
|
|
11051
11051
|
),
|
|
11052
11052
|
f
|
|
11053
11053
|
), ve(
|
|
@@ -11058,7 +11058,7 @@ const PS = /* @__PURE__ */ st(
|
|
|
11058
11058
|
Ee(F, (L, W) => L && L.column === W.column && L.row === W.row),
|
|
11059
11059
|
Ee(c)
|
|
11060
11060
|
),
|
|
11061
|
-
|
|
11061
|
+
le(([L, W, re, oe]) => ({
|
|
11062
11062
|
gap: re,
|
|
11063
11063
|
item: W,
|
|
11064
11064
|
scrollTop: oe,
|
|
@@ -11081,7 +11081,7 @@ const PS = /* @__PURE__ */ st(
|
|
|
11081
11081
|
Ee(P)
|
|
11082
11082
|
),
|
|
11083
11083
|
Ne(([, , , , , , , L]) => !L),
|
|
11084
|
-
|
|
11084
|
+
le(
|
|
11085
11085
|
([
|
|
11086
11086
|
L,
|
|
11087
11087
|
[W, re],
|
|
@@ -11094,17 +11094,17 @@ const PS = /* @__PURE__ */ st(
|
|
|
11094
11094
|
Ze,
|
|
11095
11095
|
rt
|
|
11096
11096
|
]) => {
|
|
11097
|
-
const { column:
|
|
11097
|
+
const { column: ce, row: he } = oe, { height: De, width: Be } = se, { width: Ke } = Se;
|
|
11098
11098
|
if ($e === 0 && (L === 0 || Ke === 0))
|
|
11099
11099
|
return kc;
|
|
11100
11100
|
if (Be === 0) {
|
|
11101
11101
|
const Nt = Ba(rt, L), St = Nt + Math.max($e - 1, 0);
|
|
11102
11102
|
return _S(Ec(Nt, St, tt));
|
|
11103
11103
|
}
|
|
11104
|
-
const Qe = Yf(Ke, Be,
|
|
11104
|
+
const Qe = Yf(Ke, Be, ce);
|
|
11105
11105
|
let Fe, et;
|
|
11106
|
-
Ze ? W === 0 && re === 0 && $e > 0 ? (Fe = 0, et = $e - 1) : (Fe = Qe * ss((W +
|
|
11107
|
-
const Et = Ec(Fe, et, tt), { bottom: ht, top: He } = Nc(Se, oe, se, Et), xt = Rc(L / Qe), bt = xt * De + (xt - 1) *
|
|
11106
|
+
Ze ? W === 0 && re === 0 && $e > 0 ? (Fe = 0, et = $e - 1) : (Fe = Qe * ss((W + he) / (De + he)), et = Qe * Rc((re + he) / (De + he)) - 1, et = Ti(L - 1, Wr(et, Qe - 1)), Fe = Ti(et, Wr(0, Fe))) : (Fe = 0, et = -1);
|
|
11107
|
+
const Et = Ec(Fe, et, tt), { bottom: ht, top: He } = Nc(Se, oe, se, Et), xt = Rc(L / Qe), bt = xt * De + (xt - 1) * he - ht;
|
|
11108
11108
|
return { bottom: ht, itemHeight: De, items: Et, itemWidth: Be, offsetBottom: bt, offsetTop: He, top: He };
|
|
11109
11109
|
}
|
|
11110
11110
|
)
|
|
@@ -11114,14 +11114,14 @@ const PS = /* @__PURE__ */ st(
|
|
|
11114
11114
|
H(
|
|
11115
11115
|
E,
|
|
11116
11116
|
Ne((L) => L !== null),
|
|
11117
|
-
|
|
11117
|
+
le((L) => L.length)
|
|
11118
11118
|
),
|
|
11119
11119
|
C
|
|
11120
11120
|
), ve(
|
|
11121
11121
|
H(
|
|
11122
11122
|
_t(N, j, I, F),
|
|
11123
11123
|
Ne(([L, W, { items: re }]) => re.length > 0 && W.height !== 0 && L.height !== 0),
|
|
11124
|
-
|
|
11124
|
+
le(([L, W, { items: re }, oe]) => {
|
|
11125
11125
|
const { bottom: se, top: Se } = Nc(L, oe, W, re);
|
|
11126
11126
|
return [Se, se];
|
|
11127
11127
|
}),
|
|
@@ -11134,7 +11134,7 @@ const PS = /* @__PURE__ */ st(
|
|
|
11134
11134
|
H(
|
|
11135
11135
|
c,
|
|
11136
11136
|
ze(ie),
|
|
11137
|
-
|
|
11137
|
+
le(([L, W]) => W || L !== 0)
|
|
11138
11138
|
),
|
|
11139
11139
|
ie
|
|
11140
11140
|
);
|
|
@@ -11147,7 +11147,7 @@ const PS = /* @__PURE__ */ st(
|
|
|
11147
11147
|
const oe = L.items[L.items.length - 1].index === W - 1;
|
|
11148
11148
|
return (re || L.bottom > 0 && L.itemHeight > 0 && L.offsetBottom === 0 && L.items.length === W) && oe;
|
|
11149
11149
|
}),
|
|
11150
|
-
|
|
11150
|
+
le(([[, L]]) => L - 1),
|
|
11151
11151
|
mt()
|
|
11152
11152
|
)
|
|
11153
11153
|
), q = Zt(
|
|
@@ -11162,7 +11162,7 @@ const PS = /* @__PURE__ */ st(
|
|
|
11162
11162
|
Ee(I),
|
|
11163
11163
|
ze(z),
|
|
11164
11164
|
Ne(([{ items: L }, W]) => L.length > 0 && !W),
|
|
11165
|
-
|
|
11165
|
+
le(([{ items: L }]) => ({
|
|
11166
11166
|
endIndex: L[L.length - 1].index,
|
|
11167
11167
|
startIndex: L[0].index
|
|
11168
11168
|
})),
|
|
@@ -11174,12 +11174,12 @@ const PS = /* @__PURE__ */ st(
|
|
|
11174
11174
|
H(
|
|
11175
11175
|
_,
|
|
11176
11176
|
ze(N, j, C, F),
|
|
11177
|
-
|
|
11177
|
+
le(([L, W, re, oe, se]) => {
|
|
11178
11178
|
const Se = jf(L), { align: tt, behavior: $e, offset: Ze } = Se;
|
|
11179
11179
|
let rt = Se.index;
|
|
11180
11180
|
rt === "LAST" && (rt = oe - 1), rt = Wr(0, rt, Ti(oe - 1, rt));
|
|
11181
|
-
let
|
|
11182
|
-
return tt === "end" ?
|
|
11181
|
+
let ce = Ji(W, se, re, rt);
|
|
11182
|
+
return tt === "end" ? ce = Ic(ce - W.height + re.height) : tt === "center" && (ce = Ic(ce - W.height / 2 + re.height / 2)), Ze && (ce += Ze), { behavior: $e, top: ce };
|
|
11183
11183
|
})
|
|
11184
11184
|
),
|
|
11185
11185
|
l
|
|
@@ -11187,14 +11187,14 @@ const PS = /* @__PURE__ */ st(
|
|
|
11187
11187
|
const K = Ft(
|
|
11188
11188
|
H(
|
|
11189
11189
|
I,
|
|
11190
|
-
|
|
11190
|
+
le((L) => L.offsetBottom + L.bottom)
|
|
11191
11191
|
),
|
|
11192
11192
|
0
|
|
11193
11193
|
);
|
|
11194
11194
|
return ve(
|
|
11195
11195
|
H(
|
|
11196
11196
|
T,
|
|
11197
|
-
|
|
11197
|
+
le((L) => ({ height: L.visibleHeight, width: L.visibleWidth }))
|
|
11198
11198
|
),
|
|
11199
11199
|
N
|
|
11200
11200
|
), {
|
|
@@ -11226,7 +11226,7 @@ const PS = /* @__PURE__ */ st(
|
|
|
11226
11226
|
...h,
|
|
11227
11227
|
// output
|
|
11228
11228
|
gridState: I,
|
|
11229
|
-
horizontalDirection:
|
|
11229
|
+
horizontalDirection: de,
|
|
11230
11230
|
initialTopMostItemIndex: P,
|
|
11231
11231
|
totalListHeight: K,
|
|
11232
11232
|
...p,
|
|
@@ -11259,7 +11259,7 @@ const OS = /* @__PURE__ */ st(() => {
|
|
|
11259
11259
|
const e = Z((f) => `Item ${f}`), t = Z({}), n = Z(null), r = Z("virtuoso-grid-item"), o = Z("virtuoso-grid-list"), s = Z(Va), i = Z("div"), a = Z(Or), l = (f, p = null) => Ft(
|
|
11260
11260
|
H(
|
|
11261
11261
|
t,
|
|
11262
|
-
|
|
11262
|
+
le((h) => h[f]),
|
|
11263
11263
|
mt()
|
|
11264
11264
|
),
|
|
11265
11265
|
p
|
|
@@ -11782,7 +11782,7 @@ var op = "DialogTrigger", sp = y.forwardRef(
|
|
|
11782
11782
|
"data-state": Ja(o.open),
|
|
11783
11783
|
...r,
|
|
11784
11784
|
ref: s,
|
|
11785
|
-
onClick:
|
|
11785
|
+
onClick: pe(e.onClick, o.onOpenToggle)
|
|
11786
11786
|
}
|
|
11787
11787
|
);
|
|
11788
11788
|
}
|
|
@@ -11839,15 +11839,15 @@ var cC = y.forwardRef(
|
|
|
11839
11839
|
ref: o,
|
|
11840
11840
|
trapFocus: n.open,
|
|
11841
11841
|
disableOutsidePointerEvents: !0,
|
|
11842
|
-
onCloseAutoFocus:
|
|
11842
|
+
onCloseAutoFocus: pe(e.onCloseAutoFocus, (s) => {
|
|
11843
11843
|
var i;
|
|
11844
11844
|
s.preventDefault(), (i = n.triggerRef.current) == null || i.focus();
|
|
11845
11845
|
}),
|
|
11846
|
-
onPointerDownOutside:
|
|
11846
|
+
onPointerDownOutside: pe(e.onPointerDownOutside, (s) => {
|
|
11847
11847
|
const i = s.detail.originalEvent, a = i.button === 0 && i.ctrlKey === !0;
|
|
11848
11848
|
(i.button === 2 || a) && s.preventDefault();
|
|
11849
11849
|
}),
|
|
11850
|
-
onFocusOutside:
|
|
11850
|
+
onFocusOutside: pe(
|
|
11851
11851
|
e.onFocusOutside,
|
|
11852
11852
|
(s) => s.preventDefault()
|
|
11853
11853
|
)
|
|
@@ -11933,7 +11933,7 @@ var hp = "DialogClose", mp = y.forwardRef(
|
|
|
11933
11933
|
type: "button",
|
|
11934
11934
|
...r,
|
|
11935
11935
|
ref: t,
|
|
11936
|
-
onClick:
|
|
11936
|
+
onClick: pe(e.onClick, () => o.onOpenChange(!1))
|
|
11937
11937
|
}
|
|
11938
11938
|
);
|
|
11939
11939
|
}
|
|
@@ -12798,7 +12798,7 @@ Re.pedantic = {
|
|
|
12798
12798
|
paragraph: pt(Re.normal._paragraph).replace("hr", Re.hr).replace("heading", ` *#{1,6} *[^
|
|
12799
12799
|
]`).replace("lheading", Re.lheading).replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").getRegex()
|
|
12800
12800
|
};
|
|
12801
|
-
const
|
|
12801
|
+
const ue = {
|
|
12802
12802
|
escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,
|
|
12803
12803
|
autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/,
|
|
12804
12804
|
url: ls,
|
|
@@ -12822,30 +12822,30 @@ const fe = {
|
|
|
12822
12822
|
text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,
|
|
12823
12823
|
punctuation: /^([\spunctuation])/
|
|
12824
12824
|
};
|
|
12825
|
-
|
|
12826
|
-
|
|
12827
|
-
|
|
12828
|
-
|
|
12829
|
-
|
|
12830
|
-
|
|
12831
|
-
|
|
12832
|
-
|
|
12833
|
-
|
|
12834
|
-
|
|
12835
|
-
|
|
12836
|
-
|
|
12837
|
-
|
|
12838
|
-
|
|
12839
|
-
|
|
12840
|
-
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
|
|
12844
|
-
|
|
12845
|
-
|
|
12846
|
-
|
|
12847
|
-
|
|
12848
|
-
...
|
|
12825
|
+
ue._punctuation = "!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";
|
|
12826
|
+
ue.punctuation = pt(ue.punctuation).replace(/punctuation/g, ue._punctuation).getRegex();
|
|
12827
|
+
ue.blockSkip = /\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;
|
|
12828
|
+
ue.escapedEmSt = /(?:^|[^\\])(?:\\\\)*\\[*_]/g;
|
|
12829
|
+
ue._comment = pt(Re._comment).replace("(?:-->|$)", "-->").getRegex();
|
|
12830
|
+
ue.emStrong.lDelim = pt(ue.emStrong.lDelim).replace(/punct/g, ue._punctuation).getRegex();
|
|
12831
|
+
ue.emStrong.rDelimAst = pt(ue.emStrong.rDelimAst, "g").replace(/punct/g, ue._punctuation).getRegex();
|
|
12832
|
+
ue.emStrong.rDelimUnd = pt(ue.emStrong.rDelimUnd, "g").replace(/punct/g, ue._punctuation).getRegex();
|
|
12833
|
+
ue._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;
|
|
12834
|
+
ue._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;
|
|
12835
|
+
ue._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;
|
|
12836
|
+
ue.autolink = pt(ue.autolink).replace("scheme", ue._scheme).replace("email", ue._email).getRegex();
|
|
12837
|
+
ue._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;
|
|
12838
|
+
ue.tag = pt(ue.tag).replace("comment", ue._comment).replace("attribute", ue._attribute).getRegex();
|
|
12839
|
+
ue._label = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;
|
|
12840
|
+
ue._href = /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;
|
|
12841
|
+
ue._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;
|
|
12842
|
+
ue.link = pt(ue.link).replace("label", ue._label).replace("href", ue._href).replace("title", ue._title).getRegex();
|
|
12843
|
+
ue.reflink = pt(ue.reflink).replace("label", ue._label).replace("ref", Re._label).getRegex();
|
|
12844
|
+
ue.nolink = pt(ue.nolink).replace("ref", Re._label).getRegex();
|
|
12845
|
+
ue.reflinkSearch = pt(ue.reflinkSearch, "g").replace("reflink", ue.reflink).replace("nolink", ue.nolink).getRegex();
|
|
12846
|
+
ue.normal = { ...ue };
|
|
12847
|
+
ue.pedantic = {
|
|
12848
|
+
...ue.normal,
|
|
12849
12849
|
strong: {
|
|
12850
12850
|
start: /^__|\*\*/,
|
|
12851
12851
|
middle: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,
|
|
@@ -12858,23 +12858,23 @@ fe.pedantic = {
|
|
|
12858
12858
|
endAst: /\*(?!\*)/g,
|
|
12859
12859
|
endUnd: /_(?!_)/g
|
|
12860
12860
|
},
|
|
12861
|
-
link: pt(/^!?\[(label)\]\((.*?)\)/).replace("label",
|
|
12862
|
-
reflink: pt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",
|
|
12861
|
+
link: pt(/^!?\[(label)\]\((.*?)\)/).replace("label", ue._label).getRegex(),
|
|
12862
|
+
reflink: pt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", ue._label).getRegex()
|
|
12863
12863
|
};
|
|
12864
|
-
|
|
12865
|
-
...
|
|
12866
|
-
escape: pt(
|
|
12864
|
+
ue.gfm = {
|
|
12865
|
+
...ue.normal,
|
|
12866
|
+
escape: pt(ue.escape).replace("])", "~|])").getRegex(),
|
|
12867
12867
|
_extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,
|
|
12868
12868
|
url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,
|
|
12869
12869
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
12870
12870
|
del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
|
|
12871
12871
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
12872
12872
|
};
|
|
12873
|
-
|
|
12874
|
-
|
|
12875
|
-
...
|
|
12876
|
-
br: pt(
|
|
12877
|
-
text: pt(
|
|
12873
|
+
ue.gfm.url = pt(ue.gfm.url, "i").replace("email", ue.gfm._extended_email).getRegex();
|
|
12874
|
+
ue.breaks = {
|
|
12875
|
+
...ue.gfm,
|
|
12876
|
+
br: pt(ue.br).replace("{2,}", "*").getRegex(),
|
|
12877
|
+
text: pt(ue.gfm.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
12878
12878
|
};
|
|
12879
12879
|
function OC(e) {
|
|
12880
12880
|
return e.replace(/---/g, "—").replace(/--/g, "–").replace(/(^|[-\u2014/(\[{"\s])'/g, "$1‘").replace(/'/g, "’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g, "$1“").replace(/"/g, "”").replace(/\.{3}/g, "…");
|
|
@@ -12895,9 +12895,9 @@ class Hn {
|
|
|
12895
12895
|
};
|
|
12896
12896
|
const n = {
|
|
12897
12897
|
block: Re.normal,
|
|
12898
|
-
inline:
|
|
12898
|
+
inline: ue.normal
|
|
12899
12899
|
};
|
|
12900
|
-
this.options.pedantic ? (n.block = Re.pedantic, n.inline =
|
|
12900
|
+
this.options.pedantic ? (n.block = Re.pedantic, n.inline = ue.pedantic) : this.options.gfm && (n.block = Re.gfm, this.options.breaks ? n.inline = ue.breaks : n.inline = ue.gfm), this.tokenizer.rules = n;
|
|
12901
12901
|
}
|
|
12902
12902
|
/**
|
|
12903
12903
|
* Expose Rules
|
|
@@ -12905,7 +12905,7 @@ class Hn {
|
|
|
12905
12905
|
static get rules() {
|
|
12906
12906
|
return {
|
|
12907
12907
|
block: Re,
|
|
12908
|
-
inline:
|
|
12908
|
+
inline: ue
|
|
12909
12909
|
};
|
|
12910
12910
|
}
|
|
12911
12911
|
/**
|
|
@@ -13904,7 +13904,7 @@ const zc = sm(function({
|
|
|
13904
13904
|
messageParentCheckpointId: j = null,
|
|
13905
13905
|
attemptMeta: _ = null
|
|
13906
13906
|
}) {
|
|
13907
|
-
const [M, $] = be(!1), [E, F] = be("preview"), [A, X] = be(!1), { currentThreadId: z } = ha(), { respondToInterrupt: P } = ma(), U = l === "phone" || l === "half-screen", Y = t.role,
|
|
13907
|
+
const [M, $] = be(!1), [E, F] = be("preview"), [A, X] = be(!1), { currentThreadId: z } = ha(), { respondToInterrupt: P } = ma(), U = l === "phone" || l === "half-screen", Y = t.role, de = Y === "tool", ie = Ge(() => "type" in t && t.type === "default_message" ? t : null, [t]), _e = !!ie, q = !(r && Y !== "user"), {
|
|
13908
13908
|
uploadingFiles: B,
|
|
13909
13909
|
handleFileClick: K,
|
|
13910
13910
|
fileViewerOpen: L,
|
|
@@ -13932,30 +13932,30 @@ const zc = sm(function({
|
|
|
13932
13932
|
), Ze = Ge(
|
|
13933
13933
|
() => ie ? [] : t.content.filter((D) => D.type === "interrupt"),
|
|
13934
13934
|
[ie, t]
|
|
13935
|
-
), rt = (w == null ? void 0 : w.id) ?? (w == null ? void 0 : w.interrupt_id),
|
|
13935
|
+
), rt = (w == null ? void 0 : w.id) ?? (w == null ? void 0 : w.interrupt_id), ce = Po(rt), he = w == null ? void 0 : w.value, De = Ge(() => ie ? "" : $C(t.content), [ie, t]), Be = Ge(() => {
|
|
13936
13936
|
if (ie || !p) return [];
|
|
13937
13937
|
const ne = t.artifact;
|
|
13938
13938
|
if (!ne) return [];
|
|
13939
|
-
const
|
|
13939
|
+
const me = [], fe = [
|
|
13940
13940
|
...Array.isArray(ne.plots) ? ne.plots : []
|
|
13941
13941
|
];
|
|
13942
|
-
for (const nt of
|
|
13942
|
+
for (const nt of fe) {
|
|
13943
13943
|
const ke = UC(nt);
|
|
13944
|
-
ke &&
|
|
13944
|
+
ke && me.push(ke);
|
|
13945
13945
|
}
|
|
13946
|
-
return
|
|
13946
|
+
return me;
|
|
13947
13947
|
}, [ie, t, p]), Ke = ye(async () => {
|
|
13948
|
-
const D =
|
|
13949
|
-
async function ne(
|
|
13948
|
+
const D = de ? De : se;
|
|
13949
|
+
async function ne(me) {
|
|
13950
13950
|
if (navigator.clipboard && typeof navigator.clipboard.writeText == "function") {
|
|
13951
|
-
await navigator.clipboard.writeText(
|
|
13951
|
+
await navigator.clipboard.writeText(me);
|
|
13952
13952
|
return;
|
|
13953
13953
|
}
|
|
13954
13954
|
if (navigator.clipboard && typeof navigator.clipboard.write == "function" && typeof ClipboardItem < "u") {
|
|
13955
|
-
const
|
|
13955
|
+
const fe = new Blob([me], { type: "text/plain" });
|
|
13956
13956
|
await navigator.clipboard.write([
|
|
13957
13957
|
new ClipboardItem({
|
|
13958
|
-
"text/plain":
|
|
13958
|
+
"text/plain": fe
|
|
13959
13959
|
})
|
|
13960
13960
|
]);
|
|
13961
13961
|
return;
|
|
@@ -13964,17 +13964,17 @@ const zc = sm(function({
|
|
|
13964
13964
|
}
|
|
13965
13965
|
try {
|
|
13966
13966
|
await ne(D), $(!0), setTimeout(() => $(!1), 2e3), g == null || g(D);
|
|
13967
|
-
} catch (
|
|
13968
|
-
console.error("Failed to copy:",
|
|
13967
|
+
} catch (me) {
|
|
13968
|
+
console.error("Failed to copy:", me);
|
|
13969
13969
|
}
|
|
13970
|
-
}, [
|
|
13970
|
+
}, [de, De, se, g]), Qe = ye(() => {
|
|
13971
13971
|
if (!x) return;
|
|
13972
|
-
const D =
|
|
13972
|
+
const D = de ? De : se, ne = "type" in t && t.type === "default_message" ? void 0 : {
|
|
13973
13973
|
checkpointId: t.checkpointId ?? null,
|
|
13974
13974
|
checkpointNs: t.checkpointNs ?? null
|
|
13975
13975
|
};
|
|
13976
13976
|
x(t.id, D, ne);
|
|
13977
|
-
}, [x, t.id,
|
|
13977
|
+
}, [x, t.id, de, De, se, t]), Fe = ye(() => {
|
|
13978
13978
|
m == null || m(n);
|
|
13979
13979
|
}, [m, n]), et = ye(() => {
|
|
13980
13980
|
const ne = te(U ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", oe);
|
|
@@ -14066,8 +14066,8 @@ const zc = sm(function({
|
|
|
14066
14066
|
}
|
|
14067
14067
|
try {
|
|
14068
14068
|
T == null || T(), await P(ne, !0);
|
|
14069
|
-
} catch (
|
|
14070
|
-
console.error("Failed to approve interrupt:",
|
|
14069
|
+
} catch (me) {
|
|
14070
|
+
console.error("Failed to approve interrupt:", me);
|
|
14071
14071
|
} finally {
|
|
14072
14072
|
S == null || S();
|
|
14073
14073
|
}
|
|
@@ -14083,51 +14083,51 @@ const zc = sm(function({
|
|
|
14083
14083
|
}
|
|
14084
14084
|
try {
|
|
14085
14085
|
T == null || T(), await P(ne, !1);
|
|
14086
|
-
} catch (
|
|
14087
|
-
console.error("Failed to reject interrupt:",
|
|
14086
|
+
} catch (me) {
|
|
14087
|
+
console.error("Failed to reject interrupt:", me);
|
|
14088
14088
|
} finally {
|
|
14089
14089
|
S == null || S();
|
|
14090
14090
|
}
|
|
14091
14091
|
}, [b, S, T, P]), bt = ye(({ part: D, i: ne }) => {
|
|
14092
14092
|
if (D.type === "text") {
|
|
14093
|
-
const
|
|
14094
|
-
return nt && Y !== "tool" ? /* @__PURE__ */ u.jsx(Pp, { data: nt }, ne) : Y === "user" && c &&
|
|
14093
|
+
const me = D.text ?? "", fe = me.trim(), nt = Ga(fe);
|
|
14094
|
+
return nt && Y !== "tool" ? /* @__PURE__ */ u.jsx(Pp, { data: nt }, ne) : Y === "user" && c && fe.length > d ? /* @__PURE__ */ u.jsx(
|
|
14095
14095
|
qC,
|
|
14096
14096
|
{
|
|
14097
|
-
text:
|
|
14097
|
+
text: fe,
|
|
14098
14098
|
expanded: A,
|
|
14099
14099
|
onExpandedChange: X,
|
|
14100
14100
|
previewLength: d,
|
|
14101
14101
|
isCompact: U
|
|
14102
14102
|
},
|
|
14103
14103
|
ne
|
|
14104
|
-
) : /* @__PURE__ */ u.jsx(us, { content:
|
|
14104
|
+
) : /* @__PURE__ */ u.jsx(us, { content: me, allowHtml: !1 }, ne);
|
|
14105
14105
|
}
|
|
14106
14106
|
if (D.type === "image_url") {
|
|
14107
|
-
const
|
|
14107
|
+
const me = D;
|
|
14108
14108
|
return /* @__PURE__ */ u.jsx("div", { className: "my-2", children: /* @__PURE__ */ u.jsx(
|
|
14109
14109
|
"img",
|
|
14110
14110
|
{
|
|
14111
|
-
src:
|
|
14112
|
-
alt:
|
|
14111
|
+
src: me.url,
|
|
14112
|
+
alt: me.alt ?? "",
|
|
14113
14113
|
loading: "lazy",
|
|
14114
14114
|
className: "border rounded max-h-[420px] w-auto object-contain"
|
|
14115
14115
|
}
|
|
14116
14116
|
) }, ne);
|
|
14117
14117
|
}
|
|
14118
14118
|
if (D.type === "file") {
|
|
14119
|
-
const
|
|
14119
|
+
const me = D, fe = me.name || "file";
|
|
14120
14120
|
return /* @__PURE__ */ u.jsxs(
|
|
14121
14121
|
"a",
|
|
14122
14122
|
{
|
|
14123
|
-
href:
|
|
14124
|
-
onClick: (nt) => K(nt.nativeEvent,
|
|
14123
|
+
href: me.url,
|
|
14124
|
+
onClick: (nt) => K(nt.nativeEvent, me, ne),
|
|
14125
14125
|
className: `inline-flex items-center gap-2 rounded px-2 py-1 text-xs bg-gray-100 border hover:bg-gray-200
|
|
14126
14126
|
dark:bg-background/10 dark:border-border/30 dark:hover:bg-background/20`,
|
|
14127
14127
|
children: [
|
|
14128
14128
|
B[ne] ? /* @__PURE__ */ u.jsx(aa, { className: "h-4 w-4 animate-spin" }) : null,
|
|
14129
14129
|
/* @__PURE__ */ u.jsxs("span", { className: "truncate max-w-[180px]", children: [
|
|
14130
|
-
|
|
14130
|
+
fe,
|
|
14131
14131
|
B[ne] ? " (processing)" : ""
|
|
14132
14132
|
] })
|
|
14133
14133
|
]
|
|
@@ -14136,9 +14136,9 @@ const zc = sm(function({
|
|
|
14136
14136
|
);
|
|
14137
14137
|
}
|
|
14138
14138
|
if (D.type === "interrupt") {
|
|
14139
|
-
const
|
|
14140
|
-
(
|
|
14141
|
-
), nt = !!(
|
|
14139
|
+
const me = D, fe = Po(
|
|
14140
|
+
(me == null ? void 0 : me.id) ?? (me == null ? void 0 : me.interrupt_id)
|
|
14141
|
+
), nt = !!(ce && fe && fe === ce), ke = nt ? he ?? (me == null ? void 0 : me.value) : me == null ? void 0 : me.value, dt = fe ? { ...me, id: fe, interrupt_id: fe } : me;
|
|
14142
14142
|
return /* @__PURE__ */ u.jsx(
|
|
14143
14143
|
VC,
|
|
14144
14144
|
{
|
|
@@ -14163,8 +14163,8 @@ const zc = sm(function({
|
|
|
14163
14163
|
d,
|
|
14164
14164
|
A,
|
|
14165
14165
|
U,
|
|
14166
|
-
|
|
14167
|
-
|
|
14166
|
+
ce,
|
|
14167
|
+
he,
|
|
14168
14168
|
w,
|
|
14169
14169
|
b,
|
|
14170
14170
|
Ze
|
|
@@ -14173,11 +14173,11 @@ const zc = sm(function({
|
|
|
14173
14173
|
/* @__PURE__ */ u.jsx("span", { className: "text-sm text-muted-foreground", children: "File upload" })
|
|
14174
14174
|
] }), []), St = ye(() => {
|
|
14175
14175
|
const D = se.trim().length > 0 || tt.length > 0 || $e.length > 0 || Ze.length > 0;
|
|
14176
|
-
if (!
|
|
14176
|
+
if (!de && $e.length > 0 && !r)
|
|
14177
14177
|
return Nt();
|
|
14178
|
-
if (!
|
|
14178
|
+
if (!de && !D && !r)
|
|
14179
14179
|
return null;
|
|
14180
|
-
if (
|
|
14180
|
+
if (de)
|
|
14181
14181
|
return !f && Be.length > 0 ? null : f ? /* @__PURE__ */ u.jsx(
|
|
14182
14182
|
GC,
|
|
14183
14183
|
{
|
|
@@ -14186,12 +14186,12 @@ const zc = sm(function({
|
|
|
14186
14186
|
},
|
|
14187
14187
|
t.id
|
|
14188
14188
|
) : null;
|
|
14189
|
-
if (!
|
|
14190
|
-
const ne = t,
|
|
14189
|
+
if (!de && !ie) {
|
|
14190
|
+
const ne = t, me = /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: ne.content.map((fe, nt) => /* @__PURE__ */ u.jsx(bt, { part: fe, i: nt }, nt)) });
|
|
14191
14191
|
return r ? /* @__PURE__ */ u.jsxs("div", { "aria-busy": "true", role: "status", children: [
|
|
14192
|
-
|
|
14192
|
+
me,
|
|
14193
14193
|
/* @__PURE__ */ u.jsx(WC, { className: oe })
|
|
14194
|
-
] }) :
|
|
14194
|
+
] }) : me;
|
|
14195
14195
|
}
|
|
14196
14196
|
}, [
|
|
14197
14197
|
se,
|
|
@@ -14199,7 +14199,7 @@ const zc = sm(function({
|
|
|
14199
14199
|
$e.length,
|
|
14200
14200
|
Ze.length,
|
|
14201
14201
|
r,
|
|
14202
|
-
|
|
14202
|
+
de,
|
|
14203
14203
|
E,
|
|
14204
14204
|
f,
|
|
14205
14205
|
Be.length,
|
|
@@ -14211,29 +14211,17 @@ const zc = sm(function({
|
|
|
14211
14211
|
}, [N, Ue]), Ae = Ge(() => !Ue.length || !k ? null : Ue.some((D) => D.id === k) ? k : null, [k, Ue]) ?? zt, ct = Y === "user" && Ue.length > 0 && typeof I == "function", G = ye(
|
|
14212
14212
|
(D) => {
|
|
14213
14213
|
if (!I) return;
|
|
14214
|
-
const ne = (D == null ? void 0 : D.id) ?? null,
|
|
14215
|
-
I(ne,
|
|
14214
|
+
const ne = (D == null ? void 0 : D.id) ?? null, me = (D == null ? void 0 : D.parentId) ?? j ?? null;
|
|
14215
|
+
I(ne, me);
|
|
14216
14216
|
},
|
|
14217
14217
|
[j, I]
|
|
14218
14218
|
), Q = Ge(() => Ae ? Ue.findIndex((D) => D.id === Ae) : -1, [Ae, Ue]), Ce = Ge(() => Q < 0 ? null : Ue[Q] ?? null, [Q, Ue]), Te = ye((D) => {
|
|
14219
14219
|
const ne = [];
|
|
14220
|
-
|
|
14221
|
-
return ne.length ? ne.join(" • ") : D.id.slice(0, 8);
|
|
14222
|
-
let de = "";
|
|
14223
|
-
try {
|
|
14224
|
-
const le = new Date(D.createdAt);
|
|
14225
|
-
Number.isNaN(le.getTime()) || (de = new Intl.DateTimeFormat(void 0, {
|
|
14226
|
-
hour: "2-digit",
|
|
14227
|
-
minute: "2-digit"
|
|
14228
|
-
}).format(le));
|
|
14229
|
-
} catch {
|
|
14230
|
-
de = "";
|
|
14231
|
-
}
|
|
14232
|
-
return `${de}`;
|
|
14220
|
+
return D.step !== null && ne.push(`Step ${D.step}`), D.source && ne.push(D.source), ne.length ? ne.join(" • ") : D.id.slice(0, 8);
|
|
14233
14221
|
}, []);
|
|
14234
|
-
return
|
|
14222
|
+
return de && !f && Be.length === 0 ? null : /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
14235
14223
|
/* @__PURE__ */ u.jsx("div", { className: te(Et(), h.container), children: /* @__PURE__ */ u.jsxs("div", { className: te(ht(), h.content), children: [
|
|
14236
|
-
(i || a ||
|
|
14224
|
+
(i || a || de) && /* @__PURE__ */ u.jsxs(
|
|
14237
14225
|
"div",
|
|
14238
14226
|
{
|
|
14239
14227
|
className: te(
|
|
@@ -14246,7 +14234,7 @@ const zc = sm(function({
|
|
|
14246
14234
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
14247
14235
|
et(),
|
|
14248
14236
|
a && Ct && /* @__PURE__ */ u.jsx("span", { className: te("font-medium", U ? "text-xs" : "text-sm"), children: Ct }),
|
|
14249
|
-
|
|
14237
|
+
de && /* @__PURE__ */ u.jsxs(
|
|
14250
14238
|
Jf,
|
|
14251
14239
|
{
|
|
14252
14240
|
variant: "outline",
|
|
@@ -14279,15 +14267,15 @@ const zc = sm(function({
|
|
|
14279
14267
|
type: "button",
|
|
14280
14268
|
className: te(
|
|
14281
14269
|
"flex items-center justify-center rounded border px-1.5 py-1 transition-colors",
|
|
14282
|
-
Q
|
|
14270
|
+
Q < Ue.length - 1 ? "border-border text-foreground hover:bg-muted/60" : "border-border text-muted-foreground cursor-not-allowed"
|
|
14283
14271
|
),
|
|
14284
14272
|
onClick: () => {
|
|
14285
|
-
if (Q
|
|
14286
|
-
const D = Ue[Q
|
|
14273
|
+
if (Q >= Ue.length - 1) return;
|
|
14274
|
+
const D = Ue[Q + 1];
|
|
14287
14275
|
D && G(D);
|
|
14288
14276
|
},
|
|
14289
|
-
"aria-label": "
|
|
14290
|
-
disabled: Q
|
|
14277
|
+
"aria-label": "Older checkpoint (back in time)",
|
|
14278
|
+
disabled: Q >= Ue.length - 1,
|
|
14291
14279
|
children: /* @__PURE__ */ u.jsx(mm, { className: "h-3 w-3" })
|
|
14292
14280
|
}
|
|
14293
14281
|
),
|
|
@@ -14305,15 +14293,15 @@ const zc = sm(function({
|
|
|
14305
14293
|
type: "button",
|
|
14306
14294
|
className: te(
|
|
14307
14295
|
"flex items-center justify-center rounded border px-1.5 py-1 transition-colors",
|
|
14308
|
-
Q
|
|
14296
|
+
Q > 0 ? "border-border text-foreground hover:bg-muted/60" : "border-border text-muted-foreground cursor-not-allowed"
|
|
14309
14297
|
),
|
|
14310
14298
|
onClick: () => {
|
|
14311
|
-
if (Q
|
|
14312
|
-
const D = Ue[Q
|
|
14299
|
+
if (Q <= 0) return;
|
|
14300
|
+
const D = Ue[Q - 1];
|
|
14313
14301
|
D && G(D);
|
|
14314
14302
|
},
|
|
14315
|
-
"aria-label": "
|
|
14316
|
-
disabled: Q
|
|
14303
|
+
"aria-label": "Newer checkpoint (forward in time)",
|
|
14304
|
+
disabled: Q <= 0,
|
|
14317
14305
|
children: /* @__PURE__ */ u.jsx(Yc, { className: "h-3 w-3" })
|
|
14318
14306
|
}
|
|
14319
14307
|
)
|
|
@@ -14400,18 +14388,18 @@ const zc = sm(function({
|
|
|
14400
14388
|
className: "h-auto max-h-[420px] w-full rounded object-contain",
|
|
14401
14389
|
onLoad: () => {
|
|
14402
14390
|
},
|
|
14403
|
-
onError: (
|
|
14391
|
+
onError: (me) => {
|
|
14404
14392
|
console.error(`[MessageComponent] ❌ Image failed to load for artifact ${ne}:`, {
|
|
14405
14393
|
alt: D.alt,
|
|
14406
14394
|
label: D.label,
|
|
14407
|
-
message:
|
|
14395
|
+
message: me.target.alt
|
|
14408
14396
|
});
|
|
14409
14397
|
}
|
|
14410
14398
|
}
|
|
14411
14399
|
) })
|
|
14412
14400
|
] }, `artifact-${ne}`))) })
|
|
14413
14401
|
] }),
|
|
14414
|
-
|
|
14402
|
+
de && E === "expanded" && (Se.toolCallId || Se.name) && /* @__PURE__ */ u.jsxs("div", { className: te("mt-2 pt-2 border-t border-current/10 text-xs opacity-60", U && "text-xs"), children: [
|
|
14415
14403
|
Se.name && /* @__PURE__ */ u.jsxs("div", { children: [
|
|
14416
14404
|
"Function: ",
|
|
14417
14405
|
Se.name
|
|
@@ -14421,7 +14409,7 @@ const zc = sm(function({
|
|
|
14421
14409
|
Se.toolCallId
|
|
14422
14410
|
] })
|
|
14423
14411
|
] }),
|
|
14424
|
-
!(i || a ||
|
|
14412
|
+
!(i || a || de) && s && !o && /* @__PURE__ */ u.jsxs(
|
|
14425
14413
|
"div",
|
|
14426
14414
|
{
|
|
14427
14415
|
className: te(
|
|
@@ -14817,32 +14805,32 @@ const YC = ({
|
|
|
14817
14805
|
messagePreviews: F,
|
|
14818
14806
|
createSyntheticThinkingMessage: A = !1
|
|
14819
14807
|
}, X) => {
|
|
14820
|
-
const z = Ve(null), P = Ve(null), U = Ve(!1), [Y,
|
|
14821
|
-
(
|
|
14808
|
+
const z = Ve(null), P = Ve(null), U = Ve(!1), [Y, de] = be(!0), ie = Ge(() => w ? e.some((ce) => "type" in ce && ce.type === "default_message" ? !1 : Array.isArray(ce == null ? void 0 : ce.content) && ce.content.some(
|
|
14809
|
+
(he) => he && he.type === "interrupt" && (he.id ?? he.interrupt_id) === w.id
|
|
14822
14810
|
)) : !1, [w, e]), _e = Ge(() => {
|
|
14823
14811
|
if (!w || ie)
|
|
14824
14812
|
return null;
|
|
14825
|
-
const
|
|
14826
|
-
let
|
|
14813
|
+
const ce = w.id && String(w.id).trim() ? String(w.id).trim() : "pending-interrupt";
|
|
14814
|
+
let he;
|
|
14827
14815
|
const De = w.value;
|
|
14828
14816
|
if (De && typeof De == "object" && !Array.isArray(De)) {
|
|
14829
14817
|
const Be = De.title;
|
|
14830
|
-
typeof Be == "string" && Be.trim() && (
|
|
14818
|
+
typeof Be == "string" && Be.trim() && (he = Be.trim());
|
|
14831
14819
|
}
|
|
14832
14820
|
return {
|
|
14833
|
-
id: `interrupt-${
|
|
14821
|
+
id: `interrupt-${ce}`,
|
|
14834
14822
|
role: "system",
|
|
14835
14823
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
14836
14824
|
content: [
|
|
14837
14825
|
{
|
|
14838
14826
|
type: "interrupt",
|
|
14839
|
-
id:
|
|
14827
|
+
id: ce,
|
|
14840
14828
|
value: De,
|
|
14841
|
-
title:
|
|
14829
|
+
title: he
|
|
14842
14830
|
}
|
|
14843
14831
|
]
|
|
14844
14832
|
};
|
|
14845
|
-
}, [w, ie]), q = Ge(() => _e ? [...e, _e] : e, [e, _e]), B = Ge(() => !A || !t ? q : !q.some((
|
|
14833
|
+
}, [w, ie]), q = Ge(() => _e ? [...e, _e] : e, [e, _e]), B = Ge(() => !A || !t ? q : !q.some((he) => he.role === "assistant") && q.length > 0 ? [
|
|
14846
14834
|
...q,
|
|
14847
14835
|
{
|
|
14848
14836
|
id: "thinking-assistant",
|
|
@@ -14850,8 +14838,8 @@ const YC = ({
|
|
|
14850
14838
|
content: [],
|
|
14851
14839
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
14852
14840
|
}
|
|
14853
|
-
] : q, [q, t, A]), K = Ge(() => C ? B : B.filter((
|
|
14854
|
-
|
|
14841
|
+
] : q, [q, t, A]), K = Ge(() => C ? B : B.filter((ce) => (ce == null ? void 0 : ce.role) !== "tool"), [B, C]), L = ye((ce) => {
|
|
14842
|
+
de(ce), v && v(!ce), g && g(ce);
|
|
14855
14843
|
}, [v, g]), W = Ge(() => {
|
|
14856
14844
|
if (a)
|
|
14857
14845
|
return async () => {
|
|
@@ -14866,12 +14854,12 @@ const YC = ({
|
|
|
14866
14854
|
};
|
|
14867
14855
|
}, [a]), re = Ge(() => !x || m ? !1 : Y ? "auto" : !1, [Y, x, m]), oe = E ?? [], se = oe.length > 0, Se = Ge(() => {
|
|
14868
14856
|
if (typeof h != "string") return null;
|
|
14869
|
-
const
|
|
14870
|
-
return
|
|
14857
|
+
const ce = h.trim();
|
|
14858
|
+
return ce ? {
|
|
14871
14859
|
id: "default-message",
|
|
14872
14860
|
role: "assistant",
|
|
14873
14861
|
type: "default_message",
|
|
14874
|
-
content:
|
|
14862
|
+
content: ce,
|
|
14875
14863
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
14876
14864
|
} : null;
|
|
14877
14865
|
}, [h]), tt = se ? /* @__PURE__ */ u.jsx(
|
|
@@ -14905,10 +14893,10 @@ const YC = ({
|
|
|
14905
14893
|
X,
|
|
14906
14894
|
() => ({
|
|
14907
14895
|
scrollToLatest: () => {
|
|
14908
|
-
var
|
|
14896
|
+
var ce, he;
|
|
14909
14897
|
if (z.current && K.length > 0) {
|
|
14910
14898
|
const De = K.length - 1;
|
|
14911
|
-
(
|
|
14899
|
+
(he = (ce = z.current).scrollToIndex) == null || he.call(ce, {
|
|
14912
14900
|
index: De,
|
|
14913
14901
|
align: "end",
|
|
14914
14902
|
behavior: "auto"
|
|
@@ -14916,8 +14904,8 @@ const YC = ({
|
|
|
14916
14904
|
} else P.current && (P.current.scrollTop = P.current.scrollHeight);
|
|
14917
14905
|
},
|
|
14918
14906
|
scrollToTop: () => {
|
|
14919
|
-
var
|
|
14920
|
-
z.current && K.length > 0 ? (
|
|
14907
|
+
var ce, he;
|
|
14908
|
+
z.current && K.length > 0 ? (he = (ce = z.current).scrollToIndex) == null || he.call(ce, {
|
|
14921
14909
|
index: 0,
|
|
14922
14910
|
align: "start",
|
|
14923
14911
|
behavior: "auto"
|
|
@@ -14930,11 +14918,11 @@ const YC = ({
|
|
|
14930
14918
|
/* @__PURE__ */ u.jsx("div", { className: "relative flex-1 min-h-0", children: rt ? /* @__PURE__ */ u.jsx(
|
|
14931
14919
|
ES,
|
|
14932
14920
|
{
|
|
14933
|
-
ref: (
|
|
14934
|
-
z.current =
|
|
14921
|
+
ref: (ce) => {
|
|
14922
|
+
z.current = ce;
|
|
14935
14923
|
},
|
|
14936
|
-
scrollerRef: (
|
|
14937
|
-
P.current =
|
|
14924
|
+
scrollerRef: (ce) => {
|
|
14925
|
+
P.current = ce instanceof HTMLDivElement ? ce : null;
|
|
14938
14926
|
},
|
|
14939
14927
|
data: K,
|
|
14940
14928
|
followOutput: re,
|
|
@@ -14948,24 +14936,24 @@ const YC = ({
|
|
|
14948
14936
|
},
|
|
14949
14937
|
atBottomStateChange: L,
|
|
14950
14938
|
style: { height: "100%", overscrollBehavior: "contain" },
|
|
14951
|
-
computeItemKey: (
|
|
14952
|
-
itemContent: (
|
|
14939
|
+
computeItemKey: (ce, he) => Bc(he, ce),
|
|
14940
|
+
itemContent: (ce, he) => {
|
|
14953
14941
|
var bt;
|
|
14954
|
-
const De = Bc(
|
|
14942
|
+
const De = Bc(he, ce), Be = "type" in he && he.type === "default_message";
|
|
14955
14943
|
let Ke = [], Qe = null, Fe = {}, et = {}, Et = null, ht = null, He = null;
|
|
14956
14944
|
if (!Be) {
|
|
14957
|
-
const Nt =
|
|
14945
|
+
const Nt = he, St = Nt.checkpointId ?? null;
|
|
14958
14946
|
Fe = Nt.additionalKwargs ?? {}, et = Nt.responseMetadata ?? {};
|
|
14959
14947
|
const Ct = St && I ? I.get(St) ?? null : null;
|
|
14960
14948
|
Et = typeof Fe.step == "number" ? Fe.step : typeof et.step == "number" ? et.step : (Ct == null ? void 0 : Ct.step) ?? null;
|
|
14961
14949
|
const Ue = typeof Fe.source == "string" ? Fe.source : typeof et.source == "string" ? et.source : (Ct == null ? void 0 : Ct.source) ?? null;
|
|
14962
14950
|
ht = Ue ? String(Ue) : null;
|
|
14963
14951
|
const zt = Et !== null && ht ? `${Et}:${ht}` : null;
|
|
14964
|
-
if (zt && (N != null && N.has(zt)) ? Ke = N.get(zt) ?? [] : St && Ct && (Ke = [Ct]), Qe = St ?? ((bt = Ke[0]) == null ? void 0 : bt.id) ?? null, He = St ? (j == null ? void 0 : j.get(St)) ?? null : null, !He && (
|
|
14965
|
-
const je = _.get(
|
|
14952
|
+
if (zt && (N != null && N.has(zt)) ? Ke = N.get(zt) ?? [] : St && Ct && (Ke = [Ct]), Qe = St ?? ((bt = Ke[0]) == null ? void 0 : bt.id) ?? null, He = St ? (j == null ? void 0 : j.get(St)) ?? null : null, !He && (he == null ? void 0 : he.role) === "user" && (he != null && he.id) && _) {
|
|
14953
|
+
const je = _.get(he.id);
|
|
14966
14954
|
if (je && je.length > 0) {
|
|
14967
14955
|
const Ae = je[0].checkpointId;
|
|
14968
|
-
He = (j == null ? void 0 : j.get(Ae)) ?? null, console.log(`[MessageList] Found attempt by user message ID "${
|
|
14956
|
+
He = (j == null ? void 0 : j.get(Ae)) ?? null, console.log(`[MessageList] Found attempt by user message ID "${he.id}":`, je.length, "versions");
|
|
14969
14957
|
}
|
|
14970
14958
|
}
|
|
14971
14959
|
if (!He && Ke.length > 0 && j) {
|
|
@@ -14994,7 +14982,7 @@ const YC = ({
|
|
|
14994
14982
|
const G = Ae.createdAt ? Date.parse(Ae.createdAt) : 0;
|
|
14995
14983
|
return (ct.createdAt ? Date.parse(ct.createdAt) : 0) - G;
|
|
14996
14984
|
}), je.length > 0 && (Ke = je, console.log("[MessageList] Populated checkpointCandidates with all attempts:", {
|
|
14997
|
-
messageId:
|
|
14985
|
+
messageId: he.id,
|
|
14998
14986
|
attemptCount: He.attemptCount,
|
|
14999
14987
|
candidateIds: Ke.map((Ae) => Ae.id)
|
|
15000
14988
|
}));
|
|
@@ -15018,17 +15006,17 @@ const YC = ({
|
|
|
15018
15006
|
children: /* @__PURE__ */ u.jsx(
|
|
15019
15007
|
zc,
|
|
15020
15008
|
{
|
|
15021
|
-
message:
|
|
15022
|
-
messageIndex:
|
|
15023
|
-
isStreamingMessage: t && n ===
|
|
15009
|
+
message: he,
|
|
15010
|
+
messageIndex: ce,
|
|
15011
|
+
isStreamingMessage: t && n === he.id,
|
|
15024
15012
|
streamingDebounceMs: r,
|
|
15025
|
-
isEditing: i ===
|
|
15013
|
+
isEditing: i === he.id,
|
|
15026
15014
|
showActions: s,
|
|
15027
15015
|
showTimestamp: !1,
|
|
15028
15016
|
showAgentName: !0,
|
|
15029
15017
|
layoutSize: o,
|
|
15030
15018
|
onEdit: l,
|
|
15031
|
-
onRegenerate: () => c(
|
|
15019
|
+
onRegenerate: () => c(ce),
|
|
15032
15020
|
onCancelEdit: d,
|
|
15033
15021
|
activeInterrupt: w,
|
|
15034
15022
|
disableInterruptActions: b,
|
|
@@ -15086,7 +15074,7 @@ function Ii({
|
|
|
15086
15074
|
metadata: _,
|
|
15087
15075
|
timelineCheckpoints: M,
|
|
15088
15076
|
messagePreviews: $
|
|
15089
|
-
} = ma(), { isStreaming: E, error: F, connectionState: A, submit: X, stop: z } = ry(), P = w ?? g ?? null, U = (I == null ? void 0 : I.id) ?? null, Y = (I == null ? void 0 : I.namespace) ?? null,
|
|
15077
|
+
} = ma(), { isStreaming: E, error: F, connectionState: A, submit: X, stop: z } = ry(), P = w ?? g ?? null, U = (I == null ? void 0 : I.id) ?? null, Y = (I == null ? void 0 : I.namespace) ?? null, de = (_ == null ? void 0 : _.assemblingMessageId) ?? null, ie = j, [_e, q] = be(!1);
|
|
15090
15078
|
kt(() => {
|
|
15091
15079
|
ie || q(!1);
|
|
15092
15080
|
}, [ie]);
|
|
@@ -15094,7 +15082,7 @@ function Ii({
|
|
|
15094
15082
|
q(!0);
|
|
15095
15083
|
}, []), K = ye(() => {
|
|
15096
15084
|
q(!1);
|
|
15097
|
-
}, []), L = !!ie || _e, [W, re] = be(null), [oe, se] = be(""), [Se, tt] = be(null), [$e, Ze] = be(null), [rt,
|
|
15085
|
+
}, []), L = !!ie || _e, [W, re] = be(null), [oe, se] = be(""), [Se, tt] = be(null), [$e, Ze] = be(null), [rt, ce] = be([]), [he, De] = be(0), [Be, Ke] = be(0), [Qe, Fe] = be(!1), [et, Et] = be(null), [ht, He] = be(null), [xt, bt] = be(!1), [Nt, St] = be(null), Ct = Ve(!1), [Ue, zt] = be(() => Hc.value), je = Ve(Ue), Ae = Ve(null), ct = ye((J) => {
|
|
15098
15086
|
Hc.value = J, zt(J);
|
|
15099
15087
|
}, []), [G, Q] = be(!1), Ce = Ve(null), Te = ye(
|
|
15100
15088
|
(J, ge) => {
|
|
@@ -15142,7 +15130,7 @@ function Ii({
|
|
|
15142
15130
|
const Qt = Date.parse(qe.createdAt ?? ""), pr = Date.parse(At.createdAt ?? "");
|
|
15143
15131
|
return Number.isNaN(Qt) || Number.isNaN(pr) ? 0 : pr - Qt;
|
|
15144
15132
|
}), ge;
|
|
15145
|
-
}, [N, Te]), { checkpointMetaById:
|
|
15133
|
+
}, [N, Te]), { checkpointMetaById: me, checkpointIndexByKey: fe, attemptMetaById: nt, userMessageIdToAttempts: ke } = Ge(() => {
|
|
15146
15134
|
const J = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(), xe = /* @__PURE__ */ new Map();
|
|
15147
15135
|
for (const it of ne) {
|
|
15148
15136
|
const Bt = it.checkpointId ?? null;
|
|
@@ -15198,7 +15186,7 @@ function Ii({
|
|
|
15198
15186
|
[ct]
|
|
15199
15187
|
), wo = Ve(!1);
|
|
15200
15188
|
kt(() => {
|
|
15201
|
-
wo.current && !E && (
|
|
15189
|
+
wo.current && !E && (ce([]), Mn()), wo.current = E;
|
|
15202
15190
|
}, [E, Mn]);
|
|
15203
15191
|
const [ei, ti] = be("desktop");
|
|
15204
15192
|
kt(() => {
|
|
@@ -15268,7 +15256,7 @@ function Ii({
|
|
|
15268
15256
|
checkpointId: xe,
|
|
15269
15257
|
checkpointNs: qe
|
|
15270
15258
|
}
|
|
15271
|
-
), h == null || h(ge), ct(""), Ze(null),
|
|
15259
|
+
), h == null || h(ge), ct(""), Ze(null), ce([]), Mn(), re(null), se(""), tt(null);
|
|
15272
15260
|
} catch (xe) {
|
|
15273
15261
|
const qe = (xe == null ? void 0 : xe.message) || "Failed to send message";
|
|
15274
15262
|
Ze(qe), m == null || m(qe);
|
|
@@ -15310,9 +15298,9 @@ function Ii({
|
|
|
15310
15298
|
}
|
|
15311
15299
|
}, [b, X, U, Y]), Ye = (J) => {
|
|
15312
15300
|
const ge = Array.from(J.target.files || []);
|
|
15313
|
-
|
|
15301
|
+
ce((xe) => [...xe, ...ge]), J.target.value = "";
|
|
15314
15302
|
}, We = (J) => {
|
|
15315
|
-
|
|
15303
|
+
ce((ge) => {
|
|
15316
15304
|
const xe = ge.filter((qe, At) => J !== At);
|
|
15317
15305
|
return xe.length === 0 && Mn(), xe;
|
|
15318
15306
|
});
|
|
@@ -15402,7 +15390,7 @@ function Ii({
|
|
|
15402
15390
|
style: { height: "100%" },
|
|
15403
15391
|
messages: b,
|
|
15404
15392
|
isStreaming: E,
|
|
15405
|
-
streamingAssistantId:
|
|
15393
|
+
streamingAssistantId: de,
|
|
15406
15394
|
streamingDebounceMs: typeof s == "number" ? s : o,
|
|
15407
15395
|
followNewMessages: i,
|
|
15408
15396
|
layoutSize: ei,
|
|
@@ -15419,8 +15407,8 @@ function Ii({
|
|
|
15419
15407
|
onInterruptActionEnd: K,
|
|
15420
15408
|
showToolMessages: d,
|
|
15421
15409
|
showArtifactPreviews: f,
|
|
15422
|
-
checkpointMetaById:
|
|
15423
|
-
checkpointIndexByKey:
|
|
15410
|
+
checkpointMetaById: me,
|
|
15411
|
+
checkpointIndexByKey: fe,
|
|
15424
15412
|
attemptMetaById: nt,
|
|
15425
15413
|
userMessageIdToAttempts: ke,
|
|
15426
15414
|
activeCheckpointId: U,
|
|
@@ -15473,7 +15461,7 @@ function Ii({
|
|
|
15473
15461
|
onChange: (J) => Ye(J),
|
|
15474
15462
|
className: "hidden"
|
|
15475
15463
|
},
|
|
15476
|
-
|
|
15464
|
+
he
|
|
15477
15465
|
),
|
|
15478
15466
|
rt.length > 0 && /* @__PURE__ */ u.jsx("div", { className: "flex flex-wrap gap-2", children: rt.map((J, ge) => /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 bg-gray-100 dark:bg-gray-800 rounded-lg px-3 py-2 text-sm text-gray-900 dark:text-gray-100", children: [
|
|
15479
15467
|
/* @__PURE__ */ u.jsx(Ei, { size: 14 }),
|
|
@@ -15758,8 +15746,8 @@ var ZC = y.forwardRef((e, t) => {
|
|
|
15758
15746
|
"data-state": a === "hidden" ? "hidden" : "visible",
|
|
15759
15747
|
...r,
|
|
15760
15748
|
ref: t,
|
|
15761
|
-
onPointerEnter:
|
|
15762
|
-
onPointerLeave:
|
|
15749
|
+
onPointerEnter: pe(e.onPointerEnter, () => l("POINTER_ENTER")),
|
|
15750
|
+
onPointerLeave: pe(e.onPointerLeave, () => l("POINTER_LEAVE"))
|
|
15763
15751
|
}
|
|
15764
15752
|
) });
|
|
15765
15753
|
}), Fp = y.forwardRef((e, t) => {
|
|
@@ -15952,11 +15940,11 @@ var ZC = y.forwardRef((e, t) => {
|
|
|
15952
15940
|
...p,
|
|
15953
15941
|
ref: v,
|
|
15954
15942
|
style: { position: "absolute", ...p.style },
|
|
15955
|
-
onPointerDown:
|
|
15943
|
+
onPointerDown: pe(e.onPointerDown, (N) => {
|
|
15956
15944
|
N.button === 0 && (N.target.setPointerCapture(N.pointerId), g.current = x.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", h.viewport && (h.viewport.style.scrollBehavior = "auto"), I(N));
|
|
15957
15945
|
}),
|
|
15958
|
-
onPointerMove:
|
|
15959
|
-
onPointerUp:
|
|
15946
|
+
onPointerMove: pe(e.onPointerMove, I),
|
|
15947
|
+
onPointerUp: pe(e.onPointerUp, (N) => {
|
|
15960
15948
|
const j = N.target;
|
|
15961
15949
|
j.hasPointerCapture(N.pointerId) && j.releasePointerCapture(N.pointerId), document.body.style.webkitUserSelect = w.current, h.viewport && (h.viewport.style.scrollBehavior = ""), g.current = null;
|
|
15962
15950
|
})
|
|
@@ -15999,11 +15987,11 @@ var ZC = y.forwardRef((e, t) => {
|
|
|
15999
15987
|
height: "var(--radix-scroll-area-thumb-height)",
|
|
16000
15988
|
...r
|
|
16001
15989
|
},
|
|
16002
|
-
onPointerDownCapture:
|
|
15990
|
+
onPointerDownCapture: pe(e.onPointerDownCapture, (f) => {
|
|
16003
15991
|
const h = f.target.getBoundingClientRect(), x = f.clientX - h.left, m = f.clientY - h.top;
|
|
16004
15992
|
i.onThumbPointerDown({ x, y: m });
|
|
16005
15993
|
}),
|
|
16006
|
-
onPointerUp:
|
|
15994
|
+
onPointerUp: pe(e.onPointerUp, i.onThumbPointerUp)
|
|
16007
15995
|
}
|
|
16008
15996
|
);
|
|
16009
15997
|
}
|
|
@@ -16215,7 +16203,7 @@ function Vc({
|
|
|
16215
16203
|
j(null), M("");
|
|
16216
16204
|
}, Y = (q, B) => {
|
|
16217
16205
|
q.key === "Enter" ? P(B) : q.key === "Escape" && U();
|
|
16218
|
-
},
|
|
16206
|
+
}, de = (q) => {
|
|
16219
16207
|
if (!q) return "";
|
|
16220
16208
|
try {
|
|
16221
16209
|
const B = new Date(q), L = (/* @__PURE__ */ new Date()).getTime() - B.getTime(), W = Math.floor(L / (1e3 * 60 * 60 * 24));
|
|
@@ -16267,7 +16255,7 @@ function Vc({
|
|
|
16267
16255
|
/* @__PURE__ */ u.jsx("div", { className: "font-medium text-sm truncate text-gray-900 dark:text-slate-100", children: _e(q) }),
|
|
16268
16256
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-500 dark:text-slate-400 mt-1", children: [
|
|
16269
16257
|
/* @__PURE__ */ u.jsx(bm, { size: 10 }),
|
|
16270
|
-
/* @__PURE__ */ u.jsx("span", { children:
|
|
16258
|
+
/* @__PURE__ */ u.jsx("span", { children: de(q.updatedAt || q.createdAt) })
|
|
16271
16259
|
] })
|
|
16272
16260
|
] }) }),
|
|
16273
16261
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-2", children: [
|
|
@@ -16564,15 +16552,15 @@ var sh = "SelectTrigger", ih = y.forwardRef(
|
|
|
16564
16552
|
"data-placeholder": Nh(i.value) ? "" : void 0,
|
|
16565
16553
|
...o,
|
|
16566
16554
|
ref: l,
|
|
16567
|
-
onClick:
|
|
16555
|
+
onClick: pe(o.onClick, (m) => {
|
|
16568
16556
|
m.currentTarget.focus(), d.current !== "mouse" && x(m);
|
|
16569
16557
|
}),
|
|
16570
|
-
onPointerDown:
|
|
16558
|
+
onPointerDown: pe(o.onPointerDown, (m) => {
|
|
16571
16559
|
d.current = m.pointerType;
|
|
16572
16560
|
const v = m.target;
|
|
16573
16561
|
v.hasPointerCapture(m.pointerId) && v.releasePointerCapture(m.pointerId), m.button === 0 && m.ctrlKey === !1 && m.pointerType === "mouse" && (x(m), m.preventDefault());
|
|
16574
16562
|
}),
|
|
16575
|
-
onKeyDown:
|
|
16563
|
+
onKeyDown: pe(o.onKeyDown, (m) => {
|
|
16576
16564
|
const v = f.current !== "";
|
|
16577
16565
|
!(m.ctrlKey || m.altKey || m.metaKey) && m.key.length === 1 && p(m.key), !(v && m.key === " ") && yT.includes(m.key) && (x(), m.preventDefault());
|
|
16578
16566
|
})
|
|
@@ -16691,7 +16679,7 @@ var cn = 10, [fh, Gn] = Mr(ar), RT = "SelectContentImpl", IT = Tr("SelectContent
|
|
|
16691
16679
|
const [U, Y] = Ah((K) => {
|
|
16692
16680
|
const L = M().filter((oe) => !oe.disabled), W = L.find((oe) => oe.ref.current === document.activeElement), re = _h(L, K, W);
|
|
16693
16681
|
re && setTimeout(() => re.ref.current.focus());
|
|
16694
|
-
}),
|
|
16682
|
+
}), de = y.useCallback(
|
|
16695
16683
|
(K, L, W) => {
|
|
16696
16684
|
const re = !F.current && !W;
|
|
16697
16685
|
(w.value !== void 0 && w.value === L || re) && (N(K), re && (F.current = !0));
|
|
@@ -16722,7 +16710,7 @@ var cn = 10, [fh, Gn] = Mr(ar), RT = "SelectContentImpl", IT = Tr("SelectContent
|
|
|
16722
16710
|
content: b,
|
|
16723
16711
|
viewport: S,
|
|
16724
16712
|
onViewportChange: C,
|
|
16725
|
-
itemRefCallback:
|
|
16713
|
+
itemRefCallback: de,
|
|
16726
16714
|
selectedItem: I,
|
|
16727
16715
|
onItemLeave: ie,
|
|
16728
16716
|
itemTextRefCallback: _e,
|
|
@@ -16739,7 +16727,7 @@ var cn = 10, [fh, Gn] = Mr(ar), RT = "SelectContentImpl", IT = Tr("SelectContent
|
|
|
16739
16727
|
onMountAutoFocus: (K) => {
|
|
16740
16728
|
K.preventDefault();
|
|
16741
16729
|
},
|
|
16742
|
-
onUnmountAutoFocus:
|
|
16730
|
+
onUnmountAutoFocus: pe(o, (K) => {
|
|
16743
16731
|
var L;
|
|
16744
16732
|
(L = w.trigger) == null || L.focus({ preventScroll: !0 }), K.preventDefault();
|
|
16745
16733
|
}),
|
|
@@ -16772,7 +16760,7 @@ var cn = 10, [fh, Gn] = Mr(ar), RT = "SelectContentImpl", IT = Tr("SelectContent
|
|
|
16772
16760
|
outline: "none",
|
|
16773
16761
|
...g.style
|
|
16774
16762
|
},
|
|
16775
|
-
onKeyDown:
|
|
16763
|
+
onKeyDown: pe(g.onKeyDown, (K) => {
|
|
16776
16764
|
const L = K.ctrlKey || K.altKey || K.metaKey;
|
|
16777
16765
|
if (K.key === "Tab" && K.preventDefault(), !L && K.key.length === 1 && Y(K.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(K.key)) {
|
|
16778
16766
|
let re = M().filter((oe) => !oe.disabled).map((oe) => oe.ref.current);
|
|
@@ -16816,7 +16804,7 @@ var ET = "SelectItemAlignedPosition", hh = y.forwardRef((e, t) => {
|
|
|
16816
16804
|
]);
|
|
16817
16805
|
a.style.minWidth = tt + "px", a.style.right = rt + "px";
|
|
16818
16806
|
}
|
|
16819
|
-
const _ = p(), M = window.innerHeight - cn * 2, $ = m.scrollHeight, E = window.getComputedStyle(c), F = parseInt(E.borderTopWidth, 10), A = parseInt(E.paddingTop, 10), X = parseInt(E.borderBottomWidth, 10), z = parseInt(E.paddingBottom, 10), P = F + A + $ + z + X, U = Math.min(v.offsetHeight * 5, P), Y = window.getComputedStyle(m),
|
|
16807
|
+
const _ = p(), M = window.innerHeight - cn * 2, $ = m.scrollHeight, E = window.getComputedStyle(c), F = parseInt(E.borderTopWidth, 10), A = parseInt(E.paddingTop, 10), X = parseInt(E.borderBottomWidth, 10), z = parseInt(E.paddingBottom, 10), P = F + A + $ + z + X, U = Math.min(v.offsetHeight * 5, P), Y = window.getComputedStyle(m), de = parseInt(Y.paddingTop, 10), ie = parseInt(Y.paddingBottom, 10), _e = k.top + k.height / 2 - cn, q = M - _e, B = v.offsetHeight / 2, K = v.offsetTop + B, L = F + A + K, W = P - L;
|
|
16820
16808
|
if (L <= _e) {
|
|
16821
16809
|
const oe = _.length > 0 && v === _[_.length - 1].ref.current;
|
|
16822
16810
|
a.style.bottom = "0px";
|
|
@@ -16832,7 +16820,7 @@ var ET = "SelectItemAlignedPosition", hh = y.forwardRef((e, t) => {
|
|
|
16832
16820
|
const Se = Math.max(
|
|
16833
16821
|
_e,
|
|
16834
16822
|
F + m.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
16835
|
-
(oe ?
|
|
16823
|
+
(oe ? de : 0) + B
|
|
16836
16824
|
) + W;
|
|
16837
16825
|
a.style.height = Se + "px", m.scrollTop = L - _e + m.offsetTop;
|
|
16838
16826
|
}
|
|
@@ -16961,7 +16949,7 @@ var [AT, ol] = Mr(ar, {}), ea = "SelectViewport", mh = y.forwardRef(
|
|
|
16961
16949
|
overflow: "hidden auto",
|
|
16962
16950
|
...o.style
|
|
16963
16951
|
},
|
|
16964
|
-
onScroll:
|
|
16952
|
+
onScroll: pe(o.onScroll, (c) => {
|
|
16965
16953
|
const d = c.currentTarget, { contentWrapper: f, shouldExpandOnScrollRef: p } = i;
|
|
16966
16954
|
if (p != null && p.current && f) {
|
|
16967
16955
|
const h = Math.abs(l.current - d.scrollTop);
|
|
@@ -17047,26 +17035,26 @@ var hs = "SelectItem", [OT, vh] = Mr(hs), wh = y.forwardRef(
|
|
|
17047
17035
|
tabIndex: o ? void 0 : -1,
|
|
17048
17036
|
...i,
|
|
17049
17037
|
ref: x,
|
|
17050
|
-
onFocus:
|
|
17051
|
-
onBlur:
|
|
17052
|
-
onClick:
|
|
17038
|
+
onFocus: pe(i.onFocus, () => h(!0)),
|
|
17039
|
+
onBlur: pe(i.onBlur, () => h(!1)),
|
|
17040
|
+
onClick: pe(i.onClick, () => {
|
|
17053
17041
|
v.current !== "mouse" && g();
|
|
17054
17042
|
}),
|
|
17055
|
-
onPointerUp:
|
|
17043
|
+
onPointerUp: pe(i.onPointerUp, () => {
|
|
17056
17044
|
v.current === "mouse" && g();
|
|
17057
17045
|
}),
|
|
17058
|
-
onPointerDown:
|
|
17046
|
+
onPointerDown: pe(i.onPointerDown, (w) => {
|
|
17059
17047
|
v.current = w.pointerType;
|
|
17060
17048
|
}),
|
|
17061
|
-
onPointerMove:
|
|
17049
|
+
onPointerMove: pe(i.onPointerMove, (w) => {
|
|
17062
17050
|
var b;
|
|
17063
17051
|
v.current = w.pointerType, o ? (b = l.onItemLeave) == null || b.call(l) : v.current === "mouse" && w.currentTarget.focus({ preventScroll: !0 });
|
|
17064
17052
|
}),
|
|
17065
|
-
onPointerLeave:
|
|
17053
|
+
onPointerLeave: pe(i.onPointerLeave, (w) => {
|
|
17066
17054
|
var b;
|
|
17067
17055
|
w.currentTarget === document.activeElement && ((b = l.onItemLeave) == null || b.call(l));
|
|
17068
17056
|
}),
|
|
17069
|
-
onKeyDown:
|
|
17057
|
+
onKeyDown: pe(i.onKeyDown, (w) => {
|
|
17070
17058
|
var T;
|
|
17071
17059
|
((T = l.searchRef) == null ? void 0 : T.current) !== "" && w.key === " " || (vT.includes(w.key) && g(), w.key === " " && w.preventDefault());
|
|
17072
17060
|
})
|
|
@@ -17170,14 +17158,14 @@ var Rh = y.forwardRef((e, t) => {
|
|
|
17170
17158
|
...o,
|
|
17171
17159
|
ref: t,
|
|
17172
17160
|
style: { flexShrink: 0, ...o.style },
|
|
17173
|
-
onPointerDown:
|
|
17161
|
+
onPointerDown: pe(o.onPointerDown, () => {
|
|
17174
17162
|
i.current === null && (i.current = window.setInterval(r, 50));
|
|
17175
17163
|
}),
|
|
17176
|
-
onPointerMove:
|
|
17164
|
+
onPointerMove: pe(o.onPointerMove, () => {
|
|
17177
17165
|
var c;
|
|
17178
17166
|
(c = s.onItemLeave) == null || c.call(s), i.current === null && (i.current = window.setInterval(r, 50));
|
|
17179
17167
|
}),
|
|
17180
|
-
onPointerLeave:
|
|
17168
|
+
onPointerLeave: pe(o.onPointerLeave, () => {
|
|
17181
17169
|
l();
|
|
17182
17170
|
})
|
|
17183
17171
|
}
|
|
@@ -17501,7 +17489,7 @@ var Zs = "Switch", [tk, Bk] = Pn(Zs), [nk, rk] = tk(Zs), Yh = y.forwardRef(
|
|
|
17501
17489
|
value: l,
|
|
17502
17490
|
...f,
|
|
17503
17491
|
ref: x,
|
|
17504
|
-
onClick:
|
|
17492
|
+
onClick: pe(e.onClick, (b) => {
|
|
17505
17493
|
w((T) => !T), v && (m.current = b.isPropagationStopped(), m.current || b.stopPropagation());
|
|
17506
17494
|
})
|
|
17507
17495
|
}
|