@flamingo-stack/openframe-frontend-core 0.0.581 → 0.0.582-1960.5386.1
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/{chunk-R5JVRFSW.js → chunk-4KWAHIYA.js} +3 -3
- package/dist/{chunk-KAEVE7W2.js → chunk-646JEAY4.js} +2 -2
- package/dist/{chunk-GAHKWML7.js → chunk-6EUYXDV3.js} +6 -6
- package/dist/{chunk-HVSZYUGP.js → chunk-7HHRJTIY.js} +5 -5
- package/dist/{chunk-JW53WPB5.js → chunk-A3SVEK7A.js} +3 -3
- package/dist/{chunk-6U45VX5J.cjs → chunk-A5VD6R7N.cjs} +43 -43
- package/dist/{chunk-6U45VX5J.cjs.map → chunk-A5VD6R7N.cjs.map} +1 -1
- package/dist/{chunk-BTKMTVN5.cjs → chunk-ALSLHGBH.cjs} +4 -4
- package/dist/{chunk-BTKMTVN5.cjs.map → chunk-ALSLHGBH.cjs.map} +1 -1
- package/dist/{chunk-SEZ25E22.cjs → chunk-BQPCCBGO.cjs} +10 -10
- package/dist/{chunk-SEZ25E22.cjs.map → chunk-BQPCCBGO.cjs.map} +1 -1
- package/dist/{chunk-LWDIDSCF.js → chunk-BUOYMIFJ.js} +3 -3
- package/dist/{chunk-3GXNCJZI.js → chunk-CR7GPMCM.js} +3 -3
- package/dist/{chunk-U3W2ZVN4.cjs → chunk-DGZPX2G3.cjs} +159 -159
- package/dist/{chunk-U3W2ZVN4.cjs.map → chunk-DGZPX2G3.cjs.map} +1 -1
- package/dist/{chunk-PBRXT7TD.cjs → chunk-DQVM4FTL.cjs} +10 -10
- package/dist/{chunk-PBRXT7TD.cjs.map → chunk-DQVM4FTL.cjs.map} +1 -1
- package/dist/{chunk-HJVKPG55.js → chunk-F227VMPL.js} +125 -15
- package/dist/{chunk-HJVKPG55.js.map → chunk-F227VMPL.js.map} +1 -1
- package/dist/{chunk-EZVABFEO.js → chunk-FRWQ67UM.js} +2 -2
- package/dist/{chunk-DSPQVZFE.cjs → chunk-FYVL6A4Z.cjs} +24 -24
- package/dist/{chunk-DSPQVZFE.cjs.map → chunk-FYVL6A4Z.cjs.map} +1 -1
- package/dist/{chunk-VXUUSLD5.js → chunk-GD3OAM4T.js} +2 -2
- package/dist/{chunk-ESWXXWCL.js → chunk-HQF7VE7B.js} +2 -2
- package/dist/{chunk-VDRCKHML.cjs → chunk-J5I3TKAH.cjs} +3 -3
- package/dist/{chunk-VDRCKHML.cjs.map → chunk-J5I3TKAH.cjs.map} +1 -1
- package/dist/{chunk-GUC4JK6O.cjs → chunk-K5SCFOD5.cjs} +9 -9
- package/dist/{chunk-GUC4JK6O.cjs.map → chunk-K5SCFOD5.cjs.map} +1 -1
- package/dist/{chunk-UKHM2S6I.cjs → chunk-KAOXOYRT.cjs} +15 -15
- package/dist/{chunk-UKHM2S6I.cjs.map → chunk-KAOXOYRT.cjs.map} +1 -1
- package/dist/{chunk-IHFQ5VVR.js → chunk-KBOBPKMU.js} +5 -5
- package/dist/{chunk-GMQEHDN2.cjs → chunk-L4E2TOSF.cjs} +5 -5
- package/dist/{chunk-GMQEHDN2.cjs.map → chunk-L4E2TOSF.cjs.map} +1 -1
- package/dist/{chunk-YU2UJPAT.cjs → chunk-LOJ5KQ6B.cjs} +466 -356
- package/dist/chunk-LOJ5KQ6B.cjs.map +1 -0
- package/dist/{chunk-M4KQWGEL.cjs → chunk-ORQQZQBB.cjs} +32 -32
- package/dist/{chunk-M4KQWGEL.cjs.map → chunk-ORQQZQBB.cjs.map} +1 -1
- package/dist/{chunk-ZEZMGXYV.js → chunk-QDSVTIO5.js} +5 -5
- package/dist/{chunk-KNBXZ22O.cjs → chunk-R3J2ERH2.cjs} +3 -3
- package/dist/{chunk-KNBXZ22O.cjs.map → chunk-R3J2ERH2.cjs.map} +1 -1
- package/dist/{chunk-WHFEG6UU.cjs → chunk-RMOUILHT.cjs} +22 -22
- package/dist/{chunk-WHFEG6UU.cjs.map → chunk-RMOUILHT.cjs.map} +1 -1
- package/dist/{chunk-OKA3DJJ3.js → chunk-SKGMU7TZ.js} +2 -2
- package/dist/{chunk-7CP5KY5W.js → chunk-SVQVAGZK.js} +3 -3
- package/dist/{chunk-W2TXSZTM.cjs → chunk-T32XVOFP.cjs} +21 -21
- package/dist/{chunk-W2TXSZTM.cjs.map → chunk-T32XVOFP.cjs.map} +1 -1
- package/dist/{chunk-GVM37TRU.js → chunk-U2ZRM3YB.js} +4 -4
- package/dist/{chunk-AIALG25H.cjs → chunk-WQ236GO3.cjs} +69 -69
- package/dist/{chunk-AIALG25H.cjs.map → chunk-WQ236GO3.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +9 -9
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +7 -7
- package/dist/components/docs/index.js +6 -6
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +4 -4
- package/dist/components/faq/index.js +3 -3
- package/dist/components/features/index.cjs +5 -3
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.js +4 -2
- package/dist/components/features/video.d.ts +12 -0
- package/dist/components/features/video.d.ts.map +1 -1
- package/dist/components/help-center-pages/index.cjs +23 -23
- package/dist/components/help-center-pages/index.js +14 -14
- package/dist/components/index.cjs +123 -121
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +15 -13
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +21 -21
- package/dist/components/meeting-scheduler/index.js +2 -2
- package/dist/components/navigation/index.cjs +6 -6
- package/dist/components/navigation/index.js +5 -5
- package/dist/components/onboarding-guides/index.cjs +6 -6
- package/dist/components/onboarding-guides/index.js +5 -5
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/index.cjs +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/index.cjs +9 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/features/__tests__/video-playback-failure.test.tsx +250 -0
- package/src/components/features/video.tsx +198 -16
- package/dist/chunk-YU2UJPAT.cjs.map +0 -1
- /package/dist/{chunk-R5JVRFSW.js.map → chunk-4KWAHIYA.js.map} +0 -0
- /package/dist/{chunk-KAEVE7W2.js.map → chunk-646JEAY4.js.map} +0 -0
- /package/dist/{chunk-GAHKWML7.js.map → chunk-6EUYXDV3.js.map} +0 -0
- /package/dist/{chunk-HVSZYUGP.js.map → chunk-7HHRJTIY.js.map} +0 -0
- /package/dist/{chunk-JW53WPB5.js.map → chunk-A3SVEK7A.js.map} +0 -0
- /package/dist/{chunk-LWDIDSCF.js.map → chunk-BUOYMIFJ.js.map} +0 -0
- /package/dist/{chunk-3GXNCJZI.js.map → chunk-CR7GPMCM.js.map} +0 -0
- /package/dist/{chunk-EZVABFEO.js.map → chunk-FRWQ67UM.js.map} +0 -0
- /package/dist/{chunk-VXUUSLD5.js.map → chunk-GD3OAM4T.js.map} +0 -0
- /package/dist/{chunk-ESWXXWCL.js.map → chunk-HQF7VE7B.js.map} +0 -0
- /package/dist/{chunk-IHFQ5VVR.js.map → chunk-KBOBPKMU.js.map} +0 -0
- /package/dist/{chunk-ZEZMGXYV.js.map → chunk-QDSVTIO5.js.map} +0 -0
- /package/dist/{chunk-OKA3DJJ3.js.map → chunk-SKGMU7TZ.js.map} +0 -0
- /package/dist/{chunk-7CP5KY5W.js.map → chunk-SVQVAGZK.js.map} +0 -0
- /package/dist/{chunk-GVM37TRU.js.map → chunk-U2ZRM3YB.js.map} +0 -0
|
@@ -11935,6 +11935,36 @@ function extractYouTubeId(url) {
|
|
|
11935
11935
|
const m = u.pathname.match(YT_PATH_RE);
|
|
11936
11936
|
return m ? m[1] : null;
|
|
11937
11937
|
}
|
|
11938
|
+
var VIDEO_PLAYBACK_FAILED_EVENT = "flamingo:video-playback-failed";
|
|
11939
|
+
function reportPlaybackFailure(detail) {
|
|
11940
|
+
if (typeof window === "undefined") return;
|
|
11941
|
+
try {
|
|
11942
|
+
window.dispatchEvent(new CustomEvent(VIDEO_PLAYBACK_FAILED_EVENT, { detail }));
|
|
11943
|
+
} catch (e20) {
|
|
11944
|
+
}
|
|
11945
|
+
}
|
|
11946
|
+
var VIDEO_STALL_TIMEOUT_MS = 15e3;
|
|
11947
|
+
function VideoErrorOverlay({
|
|
11948
|
+
onRetry,
|
|
11949
|
+
watchOnYouTubeId
|
|
11950
|
+
}) {
|
|
11951
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "absolute inset-0 z-10 flex flex-col items-center justify-center gap-[var(--spacing-system-sf)] bg-ods-overlay p-[var(--spacing-system-lf)] text-center", children: [
|
|
11952
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-h6", children: "This video failed to play." }),
|
|
11953
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-[var(--spacing-system-sf)]", children: [
|
|
11954
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYHNIPSG6cjs.Button, { variant: "outline", size: "small", onClick: onRetry, children: "Try again" }),
|
|
11955
|
+
watchOnYouTubeId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11956
|
+
_chunkYHNIPSG6cjs.Button,
|
|
11957
|
+
{
|
|
11958
|
+
variant: "transparent",
|
|
11959
|
+
size: "small",
|
|
11960
|
+
href: `https://www.youtube.com/watch?v=${watchOnYouTubeId}`,
|
|
11961
|
+
openInNewTab: true,
|
|
11962
|
+
children: "Watch on YouTube"
|
|
11963
|
+
}
|
|
11964
|
+
) : null
|
|
11965
|
+
] })
|
|
11966
|
+
] });
|
|
11967
|
+
}
|
|
11938
11968
|
var VIDEO_FILE_PLAYBACK_KEYS = [
|
|
11939
11969
|
"srtContent",
|
|
11940
11970
|
"captionsUrl",
|
|
@@ -12072,7 +12102,7 @@ function FilePlayer({
|
|
|
12072
12102
|
if (perfListenerRef.current) {
|
|
12073
12103
|
try {
|
|
12074
12104
|
_optionalChain([hoverPlayerRef, 'access', _225 => _225.current, 'optionalAccess', _226 => _226.removeEventListener, 'optionalCall', _227 => _227("playing", perfListenerRef.current)]);
|
|
12075
|
-
} catch (
|
|
12105
|
+
} catch (e21) {
|
|
12076
12106
|
}
|
|
12077
12107
|
perfListenerRef.current = null;
|
|
12078
12108
|
}
|
|
@@ -12107,7 +12137,7 @@ function FilePlayer({
|
|
|
12107
12137
|
perfListenerRef.current = onPlaying;
|
|
12108
12138
|
try {
|
|
12109
12139
|
_optionalChain([el, 'access', _228 => _228.addEventListener, 'optionalCall', _229 => _229("playing", onPlaying)]);
|
|
12110
|
-
} catch (
|
|
12140
|
+
} catch (e22) {
|
|
12111
12141
|
}
|
|
12112
12142
|
}
|
|
12113
12143
|
try {
|
|
@@ -12125,7 +12155,7 @@ function FilePlayer({
|
|
|
12125
12155
|
}
|
|
12126
12156
|
})]);
|
|
12127
12157
|
setHoverMutedFallback(true);
|
|
12128
|
-
} catch (
|
|
12158
|
+
} catch (e23) {
|
|
12129
12159
|
}
|
|
12130
12160
|
}
|
|
12131
12161
|
})]);
|
|
@@ -12144,7 +12174,7 @@ function FilePlayer({
|
|
|
12144
12174
|
try {
|
|
12145
12175
|
el.muted = false;
|
|
12146
12176
|
el.volume = 0.5;
|
|
12147
|
-
} catch (
|
|
12177
|
+
} catch (e24) {
|
|
12148
12178
|
}
|
|
12149
12179
|
setHoverMutedFallback(false);
|
|
12150
12180
|
}
|
|
@@ -12152,7 +12182,7 @@ function FilePlayer({
|
|
|
12152
12182
|
activationWaiterRef.current = waiter;
|
|
12153
12183
|
activationWaiters.add(waiter);
|
|
12154
12184
|
}
|
|
12155
|
-
} catch (
|
|
12185
|
+
} catch (e25) {
|
|
12156
12186
|
}
|
|
12157
12187
|
}, [clearActivationWaiter, clearPerfListener]);
|
|
12158
12188
|
const stopHoverPlayback = _react.useCallback.call(void 0, () => {
|
|
@@ -12162,7 +12192,7 @@ function FilePlayer({
|
|
|
12162
12192
|
clearPerfListener();
|
|
12163
12193
|
try {
|
|
12164
12194
|
_optionalChain([hoverPlayerRef, 'access', _243 => _243.current, 'optionalAccess', _244 => _244.pause, 'optionalCall', _245 => _245()]);
|
|
12165
|
-
} catch (
|
|
12195
|
+
} catch (e26) {
|
|
12166
12196
|
}
|
|
12167
12197
|
}, [clearActivationWaiter, clearPerfListener]);
|
|
12168
12198
|
const unmuteNow = _react.useCallback.call(void 0, (e) => {
|
|
@@ -12176,7 +12206,7 @@ function FilePlayer({
|
|
|
12176
12206
|
_optionalChain([el, 'access', _246 => _246.play, 'optionalCall', _247 => _247(), 'optionalAccess', _248 => _248.catch, 'optionalCall', _249 => _249(() => {
|
|
12177
12207
|
})]);
|
|
12178
12208
|
}
|
|
12179
|
-
} catch (
|
|
12209
|
+
} catch (e27) {
|
|
12180
12210
|
}
|
|
12181
12211
|
setHoverMutedFallback(false);
|
|
12182
12212
|
}, []);
|
|
@@ -12207,13 +12237,13 @@ function FilePlayer({
|
|
|
12207
12237
|
autoPlayKickedRef.current = true;
|
|
12208
12238
|
try {
|
|
12209
12239
|
mutedEl.muted = true;
|
|
12210
|
-
} catch (
|
|
12240
|
+
} catch (e28) {
|
|
12211
12241
|
}
|
|
12212
12242
|
if (autoPlay) {
|
|
12213
12243
|
const reportBlocked = () => setMutedFallbackBlocked(true);
|
|
12214
12244
|
try {
|
|
12215
12245
|
_optionalChain([mutedEl, 'access', _252 => _252.play, 'optionalCall', _253 => _253(), 'optionalAccess', _254 => _254.catch, 'optionalCall', _255 => _255(reportBlocked)]);
|
|
12216
|
-
} catch (
|
|
12246
|
+
} catch (e29) {
|
|
12217
12247
|
reportBlocked();
|
|
12218
12248
|
}
|
|
12219
12249
|
}
|
|
@@ -12237,12 +12267,12 @@ function FilePlayer({
|
|
|
12237
12267
|
})]);
|
|
12238
12268
|
setMutedFallbackBlocked(false);
|
|
12239
12269
|
setHoverMutedFallback(true);
|
|
12240
|
-
} catch (
|
|
12270
|
+
} catch (e30) {
|
|
12241
12271
|
setMutedFallbackBlocked(true);
|
|
12242
12272
|
setHoverMutedFallback(true);
|
|
12243
12273
|
}
|
|
12244
12274
|
})]);
|
|
12245
|
-
} catch (
|
|
12275
|
+
} catch (e31) {
|
|
12246
12276
|
}
|
|
12247
12277
|
}, [autoPlayUnmuted, startMuted, autoPlay]);
|
|
12248
12278
|
_react.useEffect.call(void 0, () => {
|
|
@@ -12256,12 +12286,12 @@ function FilePlayer({
|
|
|
12256
12286
|
};
|
|
12257
12287
|
try {
|
|
12258
12288
|
el.addEventListener("volumechange", onVolumeChange);
|
|
12259
|
-
} catch (
|
|
12289
|
+
} catch (e32) {
|
|
12260
12290
|
}
|
|
12261
12291
|
return () => {
|
|
12262
12292
|
try {
|
|
12263
12293
|
_optionalChain([el, 'access', _266 => _266.removeEventListener, 'optionalCall', _267 => _267("volumechange", onVolumeChange)]);
|
|
12264
|
-
} catch (
|
|
12294
|
+
} catch (e33) {
|
|
12265
12295
|
}
|
|
12266
12296
|
};
|
|
12267
12297
|
}, []);
|
|
@@ -12271,12 +12301,12 @@ function FilePlayer({
|
|
|
12271
12301
|
const onPlaying = () => setMutedFallbackBlocked(false);
|
|
12272
12302
|
try {
|
|
12273
12303
|
el.addEventListener("playing", onPlaying);
|
|
12274
|
-
} catch (
|
|
12304
|
+
} catch (e34) {
|
|
12275
12305
|
}
|
|
12276
12306
|
return () => {
|
|
12277
12307
|
try {
|
|
12278
12308
|
_optionalChain([el, 'access', _269 => _269.removeEventListener, 'optionalCall', _270 => _270("playing", onPlaying)]);
|
|
12279
|
-
} catch (
|
|
12309
|
+
} catch (e35) {
|
|
12280
12310
|
}
|
|
12281
12311
|
};
|
|
12282
12312
|
}, []);
|
|
@@ -12290,12 +12320,12 @@ function FilePlayer({
|
|
|
12290
12320
|
const handler = () => _optionalChain([onEndedRef, 'access', _272 => _272.current, 'optionalCall', _273 => _273()]);
|
|
12291
12321
|
try {
|
|
12292
12322
|
el.addEventListener("ended", handler);
|
|
12293
|
-
} catch (
|
|
12323
|
+
} catch (e36) {
|
|
12294
12324
|
}
|
|
12295
12325
|
return () => {
|
|
12296
12326
|
try {
|
|
12297
12327
|
_optionalChain([el, 'access', _274 => _274.removeEventListener, 'optionalCall', _275 => _275("ended", handler)]);
|
|
12298
|
-
} catch (
|
|
12328
|
+
} catch (e37) {
|
|
12299
12329
|
}
|
|
12300
12330
|
};
|
|
12301
12331
|
}, []);
|
|
@@ -12316,7 +12346,7 @@ function FilePlayer({
|
|
|
12316
12346
|
pause: () => {
|
|
12317
12347
|
try {
|
|
12318
12348
|
_optionalChain([hoverPlayerRef, 'access', _287 => _287.current, 'optionalAccess', _288 => _288.pause, 'optionalCall', _289 => _289()]);
|
|
12319
|
-
} catch (
|
|
12349
|
+
} catch (e38) {
|
|
12320
12350
|
}
|
|
12321
12351
|
},
|
|
12322
12352
|
setMuted: (m) => {
|
|
@@ -12328,7 +12358,7 @@ function FilePlayer({
|
|
|
12328
12358
|
setMutedFallbackBlocked(false);
|
|
12329
12359
|
setHoverMutedFallback(false);
|
|
12330
12360
|
}
|
|
12331
|
-
} catch (
|
|
12361
|
+
} catch (e39) {
|
|
12332
12362
|
}
|
|
12333
12363
|
}
|
|
12334
12364
|
}),
|
|
@@ -12339,10 +12369,76 @@ function FilePlayer({
|
|
|
12339
12369
|
"[Video] srtContent supplied without captionsUrl \u2014 captions will not render. Pass captionsUrl (the VTT URL) instead; raw SRT text overlays are no longer supported."
|
|
12340
12370
|
);
|
|
12341
12371
|
}
|
|
12372
|
+
const monitorHealth = !chromeless;
|
|
12373
|
+
const [playbackFailed, setPlaybackFailed] = _react.useState.call(void 0, false);
|
|
12374
|
+
const stallTimerRef = _react.useRef.call(void 0, null);
|
|
12375
|
+
const clearStallTimer = _react.useCallback.call(void 0, () => {
|
|
12376
|
+
if (stallTimerRef.current !== null) {
|
|
12377
|
+
clearTimeout(stallTimerRef.current);
|
|
12378
|
+
stallTimerRef.current = null;
|
|
12379
|
+
}
|
|
12380
|
+
}, []);
|
|
12381
|
+
_react.useEffect.call(void 0, () => clearStallTimer, [clearStallTimer]);
|
|
12382
|
+
const failPlayback = _react.useCallback.call(void 0,
|
|
12383
|
+
(reason) => {
|
|
12384
|
+
clearStallTimer();
|
|
12385
|
+
setPlaybackFailed(true);
|
|
12386
|
+
reportPlaybackFailure({ kind: "file", src: url, reason });
|
|
12387
|
+
},
|
|
12388
|
+
[clearStallTimer, url]
|
|
12389
|
+
);
|
|
12390
|
+
const armStallTimer = _react.useCallback.call(void 0, () => {
|
|
12391
|
+
if (!monitorHealth) return;
|
|
12392
|
+
const el = hoverPlayerRef.current;
|
|
12393
|
+
if (!el || el.paused || el.ended) return;
|
|
12394
|
+
if (stallTimerRef.current !== null) return;
|
|
12395
|
+
stallTimerRef.current = setTimeout(() => {
|
|
12396
|
+
stallTimerRef.current = null;
|
|
12397
|
+
failPlayback("stall");
|
|
12398
|
+
}, VIDEO_STALL_TIMEOUT_MS);
|
|
12399
|
+
}, [monitorHealth, failPlayback]);
|
|
12400
|
+
const handlePlaybackProgress = _react.useCallback.call(void 0, () => {
|
|
12401
|
+
clearStallTimer();
|
|
12402
|
+
setPlaybackFailed(false);
|
|
12403
|
+
}, [clearStallTimer]);
|
|
12404
|
+
const handleMediaError = _react.useCallback.call(void 0, () => {
|
|
12405
|
+
if (!monitorHealth) return;
|
|
12406
|
+
failPlayback("error");
|
|
12407
|
+
}, [monitorHealth, failPlayback]);
|
|
12408
|
+
const retryPlayback = _react.useCallback.call(void 0, () => {
|
|
12409
|
+
setPlaybackFailed(false);
|
|
12410
|
+
clearStallTimer();
|
|
12411
|
+
const el = hoverPlayerRef.current;
|
|
12412
|
+
if (!el) return;
|
|
12413
|
+
const resumeAt = typeof el.currentTime === "number" ? el.currentTime : 0;
|
|
12414
|
+
try {
|
|
12415
|
+
_optionalChain([el, 'access', _290 => _290.load, 'optionalCall', _291 => _291()]);
|
|
12416
|
+
if (resumeAt > 0 && el.addEventListener && el.removeEventListener) {
|
|
12417
|
+
const seekBack = () => {
|
|
12418
|
+
_optionalChain([el, 'access', _292 => _292.removeEventListener, 'optionalCall', _293 => _293("loadedmetadata", seekBack)]);
|
|
12419
|
+
try {
|
|
12420
|
+
el.currentTime = resumeAt;
|
|
12421
|
+
} catch (e40) {
|
|
12422
|
+
}
|
|
12423
|
+
};
|
|
12424
|
+
el.addEventListener("loadedmetadata", seekBack);
|
|
12425
|
+
}
|
|
12426
|
+
_optionalChain([el, 'access', _294 => _294.play, 'optionalCall', _295 => _295(), 'optionalAccess', _296 => _296.catch, 'optionalCall', _297 => _297(() => {
|
|
12427
|
+
})]);
|
|
12428
|
+
} catch (e41) {
|
|
12429
|
+
}
|
|
12430
|
+
}, [clearStallTimer]);
|
|
12431
|
+
const errorOverlay = monitorHealth && playbackFailed ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, VideoErrorOverlay, { onRetry: retryPlayback }) : null;
|
|
12342
12432
|
const player = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12343
12433
|
_muxplayerreact2.default,
|
|
12344
12434
|
{
|
|
12345
12435
|
ref: hoverPlayerRef,
|
|
12436
|
+
onError: handleMediaError,
|
|
12437
|
+
onWaiting: armStallTimer,
|
|
12438
|
+
onStalled: armStallTimer,
|
|
12439
|
+
onPlaying: handlePlaybackProgress,
|
|
12440
|
+
onTimeUpdate: handlePlaybackProgress,
|
|
12441
|
+
onPause: clearStallTimer,
|
|
12346
12442
|
src: url,
|
|
12347
12443
|
poster: poster || void 0,
|
|
12348
12444
|
streamType: "on-demand",
|
|
@@ -12380,19 +12476,15 @@ function FilePlayer({
|
|
|
12380
12476
|
if (playOnHover && !hoverControlled) {
|
|
12381
12477
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative h-full w-full", onPointerEnter: handleHoverEnter, onPointerLeave: handleHoverLeave, children: [
|
|
12382
12478
|
player,
|
|
12383
|
-
unmuteBadge
|
|
12479
|
+
unmuteBadge,
|
|
12480
|
+
errorOverlay
|
|
12384
12481
|
] });
|
|
12385
12482
|
}
|
|
12386
|
-
if (hoverControlled) {
|
|
12483
|
+
if (hoverControlled || autoPlayUnmuted || startMuted || monitorHealth) {
|
|
12387
12484
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative h-full w-full", children: [
|
|
12388
12485
|
player,
|
|
12389
|
-
unmuteBadge
|
|
12390
|
-
|
|
12391
|
-
}
|
|
12392
|
-
if (autoPlayUnmuted || startMuted) {
|
|
12393
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative h-full w-full", children: [
|
|
12394
|
-
player,
|
|
12395
|
-
unmuteBadge
|
|
12486
|
+
unmuteBadge,
|
|
12487
|
+
errorOverlay
|
|
12396
12488
|
] });
|
|
12397
12489
|
}
|
|
12398
12490
|
return player;
|
|
@@ -12434,7 +12526,8 @@ function toYouTubeMessage(parsed) {
|
|
|
12434
12526
|
const playerState = typeof info === "object" && info !== null && "playerState" in info ? info.playerState : void 0;
|
|
12435
12527
|
return {
|
|
12436
12528
|
event: typeof event === "string" ? event : void 0,
|
|
12437
|
-
info: { playerState: typeof playerState === "number" ? playerState : void 0 }
|
|
12529
|
+
info: { playerState: typeof playerState === "number" ? playerState : void 0 },
|
|
12530
|
+
errorCode: typeof info === "number" ? info : void 0
|
|
12438
12531
|
};
|
|
12439
12532
|
}
|
|
12440
12533
|
function YouTubeFacadeInner({
|
|
@@ -12447,7 +12540,13 @@ function YouTubeFacadeInner({
|
|
|
12447
12540
|
suspended
|
|
12448
12541
|
}) {
|
|
12449
12542
|
const [activated, setActivated] = _react.useState.call(void 0, Boolean(autoActivate));
|
|
12543
|
+
const [failed, setFailed] = _react.useState.call(void 0, false);
|
|
12544
|
+
const [reloadNonce, setReloadNonce] = _react.useState.call(void 0, 0);
|
|
12450
12545
|
const iframeRef = _react.useRef.call(void 0, null);
|
|
12546
|
+
const retry = _react.useCallback.call(void 0, () => {
|
|
12547
|
+
setFailed(false);
|
|
12548
|
+
setReloadNonce((n) => n + 1);
|
|
12549
|
+
}, []);
|
|
12451
12550
|
const embedUrl = _react.useMemo.call(void 0, () => {
|
|
12452
12551
|
const params = new URLSearchParams({
|
|
12453
12552
|
autoplay: "1",
|
|
@@ -12479,11 +12578,11 @@ function YouTubeFacadeInner({
|
|
|
12479
12578
|
const posterWebp = `https://i.ytimg.com/vi_webp/${videoId}/${posterQuality}.webp`;
|
|
12480
12579
|
const handlePosterError = () => setPosterTier((tier) => Math.min(tier + 1, YT_POSTER_TIERS.length - 1));
|
|
12481
12580
|
_react.useEffect.call(void 0, () => {
|
|
12482
|
-
if (!activated) return void 0;
|
|
12581
|
+
if (!activated || failed) return void 0;
|
|
12483
12582
|
const iframe = iframeRef.current;
|
|
12484
12583
|
if (!iframe) return void 0;
|
|
12485
12584
|
function subscribe2() {
|
|
12486
|
-
_optionalChain([iframe, 'optionalAccess',
|
|
12585
|
+
_optionalChain([iframe, 'optionalAccess', _298 => _298.contentWindow, 'optionalAccess', _299 => _299.postMessage, 'call', _300 => _300('{"event":"listening"}', YT_NOCOOKIE_ORIGIN)]);
|
|
12487
12586
|
}
|
|
12488
12587
|
iframe.addEventListener("load", subscribe2);
|
|
12489
12588
|
subscribe2();
|
|
@@ -12494,17 +12593,23 @@ function YouTubeFacadeInner({
|
|
|
12494
12593
|
let payload = null;
|
|
12495
12594
|
try {
|
|
12496
12595
|
payload = toYouTubeMessage(JSON.parse(event.data));
|
|
12497
|
-
} catch (
|
|
12596
|
+
} catch (e42) {
|
|
12597
|
+
return;
|
|
12598
|
+
}
|
|
12599
|
+
if (!payload) return;
|
|
12600
|
+
if (payload.event === "onError") {
|
|
12601
|
+
setFailed(true);
|
|
12602
|
+
reportPlaybackFailure({ kind: "youtube", src: videoId, reason: "error", errorCode: payload.errorCode });
|
|
12498
12603
|
return;
|
|
12499
12604
|
}
|
|
12500
|
-
if (
|
|
12501
|
-
const state = _optionalChain([payload, 'access',
|
|
12605
|
+
if (payload.event !== "infoDelivery") return;
|
|
12606
|
+
const state = _optionalChain([payload, 'access', _301 => _301.info, 'optionalAccess', _302 => _302.playerState]);
|
|
12502
12607
|
if (typeof state !== "number") return;
|
|
12503
12608
|
if (state === YT_STATE_PLAYING) {
|
|
12504
12609
|
if (blurTimer !== null) return;
|
|
12505
12610
|
blurTimer = setTimeout(() => {
|
|
12506
12611
|
blurTimer = null;
|
|
12507
|
-
_optionalChain([iframeRef, 'access',
|
|
12612
|
+
_optionalChain([iframeRef, 'access', _303 => _303.current, 'optionalAccess', _304 => _304.blur, 'call', _305 => _305()]);
|
|
12508
12613
|
}, YT_PLAYING_BLUR_DELAY_MS);
|
|
12509
12614
|
return;
|
|
12510
12615
|
}
|
|
@@ -12518,14 +12623,14 @@ function YouTubeFacadeInner({
|
|
|
12518
12623
|
window.removeEventListener("message", handleMessage);
|
|
12519
12624
|
if (blurTimer !== null) clearTimeout(blurTimer);
|
|
12520
12625
|
};
|
|
12521
|
-
}, [activated]);
|
|
12626
|
+
}, [activated, failed, reloadNonce, videoId]);
|
|
12522
12627
|
const prevSuspendedRef = _react.useRef.call(void 0, false);
|
|
12523
12628
|
_react.useEffect.call(void 0, () => {
|
|
12524
12629
|
const wasSuspended = prevSuspendedRef.current;
|
|
12525
12630
|
prevSuspendedRef.current = Boolean(suspended);
|
|
12526
12631
|
if (!activated) return;
|
|
12527
12632
|
if (suspended && !wasSuspended) {
|
|
12528
|
-
_optionalChain([iframeRef, 'access',
|
|
12633
|
+
_optionalChain([iframeRef, 'access', _306 => _306.current, 'optionalAccess', _307 => _307.contentWindow, 'optionalAccess', _308 => _308.postMessage, 'call', _309 => _309(
|
|
12529
12634
|
'{"event":"command","func":"pauseVideo","args":[]}',
|
|
12530
12635
|
YT_NOCOOKIE_ORIGIN
|
|
12531
12636
|
)]);
|
|
@@ -12533,6 +12638,9 @@ function YouTubeFacadeInner({
|
|
|
12533
12638
|
}, [suspended, activated]);
|
|
12534
12639
|
const wrapperClass = `relative w-full ${_nullishCoalesce(className, () => ( ""))}`;
|
|
12535
12640
|
const wrapperStyle = { paddingBottom: "56.25%" };
|
|
12641
|
+
if (activated && failed) {
|
|
12642
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: wrapperClass, style: wrapperStyle, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, VideoErrorOverlay, { onRetry: retry, watchOnYouTubeId: videoId }) });
|
|
12643
|
+
}
|
|
12536
12644
|
if (activated) {
|
|
12537
12645
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: wrapperClass, style: wrapperStyle, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12538
12646
|
"iframe",
|
|
@@ -12544,7 +12652,8 @@ function YouTubeFacadeInner({
|
|
|
12544
12652
|
referrerPolicy: "strict-origin-when-cross-origin",
|
|
12545
12653
|
title,
|
|
12546
12654
|
className: "absolute inset-0 h-full w-full rounded-lg border-0"
|
|
12547
|
-
}
|
|
12655
|
+
},
|
|
12656
|
+
reloadNonce
|
|
12548
12657
|
) });
|
|
12549
12658
|
}
|
|
12550
12659
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: wrapperClass, style: wrapperStyle, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -12775,7 +12884,7 @@ function CardsStrip(props) {
|
|
|
12775
12884
|
_react.useEffect.call(void 0, () => {
|
|
12776
12885
|
const el = wrapperRef.current;
|
|
12777
12886
|
if (!el || typeof IntersectionObserver === "undefined") return void 0;
|
|
12778
|
-
const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access',
|
|
12887
|
+
const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access', _310 => _310[0], 'optionalAccess', _311 => _311.isIntersecting]), () => ( true))), {
|
|
12779
12888
|
rootMargin: "200px"
|
|
12780
12889
|
});
|
|
12781
12890
|
io.observe(el);
|
|
@@ -12797,9 +12906,9 @@ function CardsStrip(props) {
|
|
|
12797
12906
|
const p = hoverPointerRef.current;
|
|
12798
12907
|
if (!p.inside) return;
|
|
12799
12908
|
const el = typeof document !== "undefined" ? document.elementFromPoint(p.x, p.y) : null;
|
|
12800
|
-
const cardEl = _optionalChain([el, 'optionalAccess',
|
|
12801
|
-
const scoped = cardEl && _optionalChain([scrollerRef, 'access',
|
|
12802
|
-
const key = _nullishCoalesce(_optionalChain([scoped, 'optionalAccess',
|
|
12909
|
+
const cardEl = _optionalChain([el, 'optionalAccess', _312 => _312.closest, 'optionalCall', _313 => _313("[data-strip-card-key]")]);
|
|
12910
|
+
const scoped = cardEl && _optionalChain([scrollerRef, 'access', _314 => _314.current, 'optionalAccess', _315 => _315.contains, 'call', _316 => _316(cardEl)]) ? cardEl : null;
|
|
12911
|
+
const key = _nullishCoalesce(_optionalChain([scoped, 'optionalAccess', _317 => _317.getAttribute, 'call', _318 => _318("data-strip-card-key")]), () => ( null));
|
|
12803
12912
|
const current = activeKeyRef.current;
|
|
12804
12913
|
if (key === current) return;
|
|
12805
12914
|
if (current !== null) deactivate(current);
|
|
@@ -12837,7 +12946,7 @@ function CardsStrip(props) {
|
|
|
12837
12946
|
}, [syncHoverToPointer]);
|
|
12838
12947
|
const seamBuffer = _react.useCallback.call(void 0, () => {
|
|
12839
12948
|
const half = singleCopyWidthRef.current;
|
|
12840
|
-
const viewport = _nullishCoalesce(_optionalChain([scrollerRef, 'access',
|
|
12949
|
+
const viewport = _nullishCoalesce(_optionalChain([scrollerRef, 'access', _319 => _319.current, 'optionalAccess', _320 => _320.clientWidth]), () => ( 0));
|
|
12841
12950
|
return Math.max(0, Math.min(200, half / 4, half - viewport - TRACK_GAP_PX - 1));
|
|
12842
12951
|
}, []);
|
|
12843
12952
|
const { posRef: marqueePosRef, glideBy } = _chunkZI27ALYXcjs.useMarqueeEngine.call(void 0, {
|
|
@@ -12853,7 +12962,7 @@ function CardsStrip(props) {
|
|
|
12853
12962
|
const scroller = scrollerRef.current;
|
|
12854
12963
|
if (scroller) scroller.scrollLeft = pos;
|
|
12855
12964
|
},
|
|
12856
|
-
readBack: () => _nullishCoalesce(_optionalChain([scrollerRef, 'access',
|
|
12965
|
+
readBack: () => _nullishCoalesce(_optionalChain([scrollerRef, 'access', _321 => _321.current, 'optionalAccess', _322 => _322.scrollLeft]), () => ( 0)),
|
|
12857
12966
|
onAfterFrame: syncHoverIfScrolled
|
|
12858
12967
|
});
|
|
12859
12968
|
const [mountedIdx, setMountedIdx] = _react.useState.call(void 0, () => /* @__PURE__ */ new Set());
|
|
@@ -12901,11 +13010,11 @@ function CardsStrip(props) {
|
|
|
12901
13010
|
fn = (el) => {
|
|
12902
13011
|
if (!el) return void 0;
|
|
12903
13012
|
cardElIdxRef.current.set(el, idx);
|
|
12904
|
-
_optionalChain([cardObserverRef, 'access',
|
|
13013
|
+
_optionalChain([cardObserverRef, 'access', _323 => _323.current, 'optionalAccess', _324 => _324.observe, 'call', _325 => _325(el)]);
|
|
12905
13014
|
return () => {
|
|
12906
13015
|
cardElIdxRef.current.delete(el);
|
|
12907
13016
|
cardElNearRef.current.delete(el);
|
|
12908
|
-
_optionalChain([cardObserverRef, 'access',
|
|
13017
|
+
_optionalChain([cardObserverRef, 'access', _326 => _326.current, 'optionalAccess', _327 => _327.unobserve, 'call', _328 => _328(el)]);
|
|
12909
13018
|
};
|
|
12910
13019
|
};
|
|
12911
13020
|
cardRefFns.set(idx, fn);
|
|
@@ -12924,7 +13033,7 @@ function CardsStrip(props) {
|
|
|
12924
13033
|
const track = trackRef.current;
|
|
12925
13034
|
if (!scroller || !track) return;
|
|
12926
13035
|
const firstCard = track.firstElementChild;
|
|
12927
|
-
const step = (_nullishCoalesce(_optionalChain([firstCard, 'optionalAccess',
|
|
13036
|
+
const step = (_nullishCoalesce(_optionalChain([firstCard, 'optionalAccess', _329 => _329.offsetWidth]), () => ( 320))) + TRACK_GAP_PX;
|
|
12928
13037
|
chevronSuppressUntilRef.current = performance.now() + CHEVRON_SUPPRESS_MS;
|
|
12929
13038
|
if (marqueeActiveRef.current) {
|
|
12930
13039
|
glideBy(dir * step);
|
|
@@ -12981,7 +13090,7 @@ function CardsStrip(props) {
|
|
|
12981
13090
|
{
|
|
12982
13091
|
ref: (node) => {
|
|
12983
13092
|
wrapperRef.current = node;
|
|
12984
|
-
_optionalChain([rootRef, 'optionalCall',
|
|
13093
|
+
_optionalChain([rootRef, 'optionalCall', _330 => _330(node)]);
|
|
12985
13094
|
},
|
|
12986
13095
|
className: _chunkPRPZBXWZcjs.cn.call(void 0, "flex w-full min-w-0 flex-col gap-6", className),
|
|
12987
13096
|
children: [
|
|
@@ -13093,7 +13202,7 @@ function VideoHoverPreviewSurface({
|
|
|
13093
13202
|
if (gateControlled) return void 0;
|
|
13094
13203
|
const el = rootElRef.current;
|
|
13095
13204
|
if (!el || typeof IntersectionObserver === "undefined") return void 0;
|
|
13096
|
-
const io = new IntersectionObserver((entries) => setIsNear(_nullishCoalesce(_optionalChain([entries, 'access',
|
|
13205
|
+
const io = new IntersectionObserver((entries) => setIsNear(_nullishCoalesce(_optionalChain([entries, 'access', _331 => _331[0], 'optionalAccess', _332 => _332.isIntersecting]), () => ( false))), {
|
|
13097
13206
|
rootMargin: _chunkZI27ALYXcjs.NEAR_VIEWPORT_ROOT_MARGIN
|
|
13098
13207
|
});
|
|
13099
13208
|
io.observe(el);
|
|
@@ -13238,7 +13347,7 @@ function VideoBitesStrip({
|
|
|
13238
13347
|
const filtered = filterPublished ? bites.filter((b) => b.published) : [...bites];
|
|
13239
13348
|
return filtered.sort(sortComparator);
|
|
13240
13349
|
}, [bites, filterPublished, sortComparator]);
|
|
13241
|
-
const warmup = useVideoWarmup({ videoUrl: _optionalChain([items, 'access',
|
|
13350
|
+
const warmup = useVideoWarmup({ videoUrl: _optionalChain([items, 'access', _333 => _333[0], 'optionalAccess', _334 => _334.url]) || null });
|
|
13242
13351
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13243
13352
|
CardsStrip,
|
|
13244
13353
|
{
|
|
@@ -13305,8 +13414,8 @@ function VideoBiteCard({
|
|
|
13305
13414
|
const controlled = active !== void 0;
|
|
13306
13415
|
const [selfActive, setSelfActive] = _react.useState.call(void 0, false);
|
|
13307
13416
|
const isActive = controlled ? !!active : selfActive;
|
|
13308
|
-
const activate = () => controlled ? _optionalChain([onActivate, 'optionalCall',
|
|
13309
|
-
const deactivate = () => controlled ? _optionalChain([onDeactivate, 'optionalCall',
|
|
13417
|
+
const activate = () => controlled ? _optionalChain([onActivate, 'optionalCall', _335 => _335(key)]) : setSelfActive(true);
|
|
13418
|
+
const deactivate = () => controlled ? _optionalChain([onDeactivate, 'optionalCall', _336 => _336(key)]) : setSelfActive(false);
|
|
13310
13419
|
const titleInputRef = _react.useRef.call(void 0, null);
|
|
13311
13420
|
_chunkZI27ALYXcjs.useIsomorphicLayoutEffect.call(void 0, () => {
|
|
13312
13421
|
const el = titleInputRef.current;
|
|
@@ -13316,7 +13425,7 @@ function VideoBiteCard({
|
|
|
13316
13425
|
});
|
|
13317
13426
|
const navigate = () => {
|
|
13318
13427
|
if (bite.onNavigate) bite.onNavigate();
|
|
13319
|
-
else _optionalChain([onBiteNavigate, 'optionalCall',
|
|
13428
|
+
else _optionalChain([onBiteNavigate, 'optionalCall', _337 => _337(bite, index)]);
|
|
13320
13429
|
};
|
|
13321
13430
|
const handlePointerEnter = () => {
|
|
13322
13431
|
if (!isTouch) activate();
|
|
@@ -13341,9 +13450,9 @@ function VideoBiteCard({
|
|
|
13341
13450
|
placeholder: "Title (optional)",
|
|
13342
13451
|
"aria-label": "Bite title",
|
|
13343
13452
|
rows: 1,
|
|
13344
|
-
onChange: (e) => _optionalChain([onTitleChange, 'optionalCall',
|
|
13453
|
+
onChange: (e) => _optionalChain([onTitleChange, 'optionalCall', _338 => _338(e.target.value)]),
|
|
13345
13454
|
ref: titleInputRef,
|
|
13346
|
-
onBlur: (e) => _optionalChain([onTitleCommit, 'optionalCall',
|
|
13455
|
+
onBlur: (e) => _optionalChain([onTitleCommit, 'optionalCall', _339 => _339(e.target.value)]),
|
|
13347
13456
|
onClick: (e) => e.stopPropagation(),
|
|
13348
13457
|
className: _chunkPRPZBXWZcjs.cn.call(void 0,
|
|
13349
13458
|
titleClass,
|
|
@@ -13420,7 +13529,7 @@ function VideoBiteCard({
|
|
|
13420
13529
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
13421
13530
|
"div",
|
|
13422
13531
|
{
|
|
13423
|
-
ref: (node) => _optionalChain([rootRef, 'optionalCall',
|
|
13532
|
+
ref: (node) => _optionalChain([rootRef, 'optionalCall', _340 => _340(node)]),
|
|
13424
13533
|
"aria-hidden": isClone || void 0,
|
|
13425
13534
|
"data-strip-card-key": key,
|
|
13426
13535
|
className: _chunkPRPZBXWZcjs.cn.call(void 0,
|
|
@@ -13475,8 +13584,8 @@ function EntityVideoSection({
|
|
|
13475
13584
|
const hasHighlight = !!highlightVideoUrl;
|
|
13476
13585
|
const hasVideo = hasFullVideo || hasHighlight;
|
|
13477
13586
|
const derivedCaptions = captionsEntity ? captions.forEntityId(captionsEntity.type, captionsEntity.id) : null;
|
|
13478
|
-
const captionsUrl = _nullishCoalesce(captionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess',
|
|
13479
|
-
const highlightCaptionsUrl = _nullishCoalesce(highlightCaptionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess',
|
|
13587
|
+
const captionsUrl = _nullishCoalesce(captionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _341 => _341.captionsUrl])));
|
|
13588
|
+
const highlightCaptionsUrl = _nullishCoalesce(highlightCaptionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _342 => _342.highlightCaptionsUrl])));
|
|
13480
13589
|
if (!hasVideo && !videoSummary && (!videoBites || videoBites.length === 0)) {
|
|
13481
13590
|
return null;
|
|
13482
13591
|
}
|
|
@@ -13603,7 +13712,7 @@ function parseRepoFromUrl(url) {
|
|
|
13603
13712
|
if (u.host !== "github.com") return null;
|
|
13604
13713
|
const parts = u.pathname.split("/").filter(Boolean);
|
|
13605
13714
|
if (parts.length >= 2) return `${parts[0]}/${parts[1]}`;
|
|
13606
|
-
} catch (
|
|
13715
|
+
} catch (e43) {
|
|
13607
13716
|
}
|
|
13608
13717
|
return null;
|
|
13609
13718
|
}
|
|
@@ -13788,7 +13897,7 @@ function parseChannelFromUrl(url) {
|
|
|
13788
13897
|
const parts = u.pathname.split("/").filter(Boolean);
|
|
13789
13898
|
const archivesIdx = parts.indexOf("archives");
|
|
13790
13899
|
if (archivesIdx !== -1 && parts.length > archivesIdx + 1) return parts[archivesIdx + 1];
|
|
13791
|
-
} catch (
|
|
13900
|
+
} catch (e44) {
|
|
13792
13901
|
}
|
|
13793
13902
|
return null;
|
|
13794
13903
|
}
|
|
@@ -13995,7 +14104,7 @@ function DataRoomDocCard({ item, className, badgeText, anchorProps }) {
|
|
|
13995
14104
|
] }) : null,
|
|
13996
14105
|
item.preview ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex min-w-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-clamp-2 whitespace-pre-wrap break-words text-ods-text-secondary text-h6", children: item.preview }) }) : null
|
|
13997
14106
|
] }),
|
|
13998
|
-
_optionalChain([anchorProps, 'optionalAccess',
|
|
14107
|
+
_optionalChain([anchorProps, 'optionalAccess', _343 => _343.href]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex h-5 shrink-0 items-center self-start text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-3.5 w-3.5" }) }) : null
|
|
13999
14108
|
] });
|
|
14000
14109
|
if (!anchorProps) {
|
|
14001
14110
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${_chunkNNFQLTJ3cjs.COMPACT_CARD_OUTER_STATIC} ${_nullishCoalesce(className, () => ( ""))}`, "aria-label": "No link available", children: body });
|
|
@@ -14023,7 +14132,7 @@ function DataRoomDocCardSkeleton({ className }) {
|
|
|
14023
14132
|
|
|
14024
14133
|
|
|
14025
14134
|
function CampaignCardAdmin({ campaign, className, anchorProps }) {
|
|
14026
|
-
const goalsCount = _optionalChain([campaign, 'access',
|
|
14135
|
+
const goalsCount = _optionalChain([campaign, 'access', _344 => _344.goals, 'optionalAccess', _345 => _345.length]) || 0;
|
|
14027
14136
|
const innerChildren = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
14028
14137
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkNNFQLTJ3cjs.COMPACT_CARD_ICON_SLOT, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Megaphone, { className: "h-5 w-5" }) }),
|
|
14029
14138
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkNNFQLTJ3cjs.COMPACT_CARD_TEXT_COL, children: [
|
|
@@ -14317,7 +14426,7 @@ function pickFetchedCardHref({
|
|
|
14317
14426
|
itemHref,
|
|
14318
14427
|
allowComposed
|
|
14319
14428
|
}) {
|
|
14320
|
-
if (_optionalChain([composed, 'optionalAccess',
|
|
14429
|
+
if (_optionalChain([composed, 'optionalAccess', _346 => _346.hostOverride])) {
|
|
14321
14430
|
return { source: "hostOverride", href: composed.href, targetPlatform: composed.targetPlatform };
|
|
14322
14431
|
}
|
|
14323
14432
|
if (itemHref) return { source: "item", href: itemHref };
|
|
@@ -14512,7 +14621,7 @@ function resolveSourceRowCTA(row, ctx = {}) {
|
|
|
14512
14621
|
if (row.path && shouldFallbackToPathNav(row) && !row.externalUrl) {
|
|
14513
14622
|
const safePath = sanitizePath(row.path);
|
|
14514
14623
|
if (safePath) {
|
|
14515
|
-
const docTarget = row.documentType ? _optionalChain([ctx, 'access',
|
|
14624
|
+
const docTarget = row.documentType ? _optionalChain([ctx, 'access', _347 => _347.docPlatformTargets, 'optionalAccess', _348 => _348[row.documentType]]) : void 0;
|
|
14516
14625
|
if (docTarget) {
|
|
14517
14626
|
const seg = docTarget.basePath.split("/").filter(Boolean).join("/");
|
|
14518
14627
|
const base = `${_chunkPRPZBXWZcjs.getBaseUrl.call(void 0, docTarget.platform)}${seg ? `/${seg}` : ""}/`;
|
|
@@ -14655,8 +14764,8 @@ function cardMenuGroups(href, discuss, openDetails, externalLink) {
|
|
|
14655
14764
|
if (href) {
|
|
14656
14765
|
items.push({
|
|
14657
14766
|
id: "open-details",
|
|
14658
|
-
label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess',
|
|
14659
|
-
icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess',
|
|
14767
|
+
label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _349 => _349.label]), () => ( "Open Details")),
|
|
14768
|
+
icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _350 => _350.icon]), () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.EyeIcon, { size: 20 }))),
|
|
14660
14769
|
// Main row → open the entity (same tab, soft Link nav).
|
|
14661
14770
|
href,
|
|
14662
14771
|
// Trailing 40px ↗ side-button → open in a new tab.
|
|
@@ -14704,7 +14813,7 @@ function decodeVideoMarkerId(id) {
|
|
|
14704
14813
|
const url = atob(b64);
|
|
14705
14814
|
if (!/^https:\/\//.test(url)) return null;
|
|
14706
14815
|
return { videoUrl: url };
|
|
14707
|
-
} catch (
|
|
14816
|
+
} catch (e45) {
|
|
14708
14817
|
return null;
|
|
14709
14818
|
}
|
|
14710
14819
|
}
|
|
@@ -14716,18 +14825,18 @@ function itemVideoMetadata(item) {
|
|
|
14716
14825
|
for (const v of vals) if (typeof v === "string" && v.length > 0) return v;
|
|
14717
14826
|
return void 0;
|
|
14718
14827
|
};
|
|
14719
|
-
const m = _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
14828
|
+
const m = _nullishCoalesce(_optionalChain([item, 'optionalAccess', _351 => _351.metadata]), () => ( {}));
|
|
14720
14829
|
const out = {};
|
|
14721
|
-
const videoUrl = pick(m.videoUrl, _optionalChain([item, 'optionalAccess',
|
|
14722
|
-
const youtubeUrl = pick(m.youtubeUrl, _optionalChain([item, 'optionalAccess',
|
|
14723
|
-
const highlightVideoUrl = pick(m.highlightVideoUrl, _optionalChain([item, 'optionalAccess',
|
|
14830
|
+
const videoUrl = pick(m.videoUrl, _optionalChain([item, 'optionalAccess', _352 => _352.custom_video_url]), _optionalChain([item, 'optionalAccess', _353 => _353.main_video_url]));
|
|
14831
|
+
const youtubeUrl = pick(m.youtubeUrl, _optionalChain([item, 'optionalAccess', _354 => _354.youtube_url]), _optionalChain([item, 'optionalAccess', _355 => _355.testimonial_video_url]));
|
|
14832
|
+
const highlightVideoUrl = pick(m.highlightVideoUrl, _optionalChain([item, 'optionalAccess', _356 => _356.highlight_video_url]));
|
|
14724
14833
|
const videoPoster = pick(
|
|
14725
14834
|
m.videoPoster,
|
|
14726
|
-
_optionalChain([item, 'optionalAccess',
|
|
14727
|
-
_optionalChain([item, 'optionalAccess',
|
|
14728
|
-
_optionalChain([item, 'optionalAccess',
|
|
14835
|
+
_optionalChain([item, 'optionalAccess', _357 => _357.main_video_thumbnail]),
|
|
14836
|
+
_optionalChain([item, 'optionalAccess', _358 => _358.highlight_video_thumbnail]),
|
|
14837
|
+
_optionalChain([item, 'optionalAccess', _359 => _359.featured_image])
|
|
14729
14838
|
);
|
|
14730
|
-
const highlightVideoPoster = pick(m.highlightVideoPoster, _optionalChain([item, 'optionalAccess',
|
|
14839
|
+
const highlightVideoPoster = pick(m.highlightVideoPoster, _optionalChain([item, 'optionalAccess', _360 => _360.highlight_video_thumbnail]));
|
|
14731
14840
|
if (videoUrl) out.videoUrl = videoUrl;
|
|
14732
14841
|
if (youtubeUrl) out.youtubeUrl = youtubeUrl;
|
|
14733
14842
|
if (highlightVideoUrl) out.highlightVideoUrl = highlightVideoUrl;
|
|
@@ -14757,15 +14866,15 @@ function fetchedItemDisplayRef(item, chatRef) {
|
|
|
14757
14866
|
}
|
|
14758
14867
|
function fetchedFaqDisplayRef(item, chatRef) {
|
|
14759
14868
|
const it = item;
|
|
14760
|
-
const answer = typeof _optionalChain([it, 'optionalAccess',
|
|
14869
|
+
const answer = typeof _optionalChain([it, 'optionalAccess', _361 => _361.answer]) === "string" && it.answer.trim().length > 0 ? it.answer.trim() : null;
|
|
14761
14870
|
return {
|
|
14762
14871
|
type: "faq",
|
|
14763
14872
|
id: chatRef.id,
|
|
14764
14873
|
sourceRepo: chatRef.sourceRepo,
|
|
14765
|
-
title: typeof _optionalChain([it, 'optionalAccess',
|
|
14874
|
+
title: typeof _optionalChain([it, 'optionalAccess', _362 => _362.question]) === "string" && it.question ? it.question : chatRef.id,
|
|
14766
14875
|
url: _nullishCoalesce(chatRef.url, () => ( null)),
|
|
14767
14876
|
...answer ? { preview: answer.length > 400 ? `${answer.slice(0, 397)}\u2026` : answer } : {},
|
|
14768
|
-
metadata: typeof _optionalChain([it, 'optionalAccess',
|
|
14877
|
+
metadata: typeof _optionalChain([it, 'optionalAccess', _363 => _363.section]) === "string" && it.section ? { section: it.section } : {}
|
|
14769
14878
|
};
|
|
14770
14879
|
}
|
|
14771
14880
|
function HubspotTicketChatCard({
|
|
@@ -14773,8 +14882,8 @@ function HubspotTicketChatCard({
|
|
|
14773
14882
|
isNewTab,
|
|
14774
14883
|
discuss
|
|
14775
14884
|
}) {
|
|
14776
|
-
const status = typeof _optionalChain([chatRef, 'access',
|
|
14777
|
-
const statusLabel = typeof _optionalChain([chatRef, 'access',
|
|
14885
|
+
const status = typeof _optionalChain([chatRef, 'access', _364 => _364.metadata, 'optionalAccess', _365 => _365.status]) === "string" ? chatRef.metadata.status : void 0;
|
|
14886
|
+
const statusLabel = typeof _optionalChain([chatRef, 'access', _366 => _366.metadata, 'optionalAccess', _367 => _367.statusLabel]) === "string" ? chatRef.metadata.statusLabel : void 0;
|
|
14778
14887
|
const statusText = _nullishCoalesce(statusLabel, () => ( formatStatusToken(status)));
|
|
14779
14888
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14780
14889
|
MingoInfoCard,
|
|
@@ -14797,7 +14906,7 @@ function FaqChatCard({
|
|
|
14797
14906
|
isNewTab,
|
|
14798
14907
|
discuss
|
|
14799
14908
|
}) {
|
|
14800
|
-
const section = typeof _optionalChain([chatRef, 'access',
|
|
14909
|
+
const section = typeof _optionalChain([chatRef, 'access', _368 => _368.metadata, 'optionalAccess', _369 => _369.section]) === "string" ? chatRef.metadata.section.trim() : void 0;
|
|
14801
14910
|
const statusLabel = section && section.length > 0 ? section : "FAQ";
|
|
14802
14911
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14803
14912
|
MingoInfoCard,
|
|
@@ -14817,7 +14926,7 @@ function SlackChatCard({
|
|
|
14817
14926
|
isNewTab,
|
|
14818
14927
|
discuss
|
|
14819
14928
|
}) {
|
|
14820
|
-
const channelName = typeof _optionalChain([chatRef, 'access',
|
|
14929
|
+
const channelName = typeof _optionalChain([chatRef, 'access', _370 => _370.metadata, 'optionalAccess', _371 => _371.channelName]) === "string" ? chatRef.metadata.channelName.trim() : void 0;
|
|
14821
14930
|
const channelPretty = channelName ? channelName.startsWith("#") ? channelName : `#${channelName}` : void 0;
|
|
14822
14931
|
const title = channelPretty ? `${chatRef.title} \xB7 ${channelPretty}` : chatRef.title;
|
|
14823
14932
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -14857,7 +14966,7 @@ function GenericFinancialChatCard({
|
|
|
14857
14966
|
isNewTab,
|
|
14858
14967
|
discuss
|
|
14859
14968
|
}) {
|
|
14860
|
-
const subtitle = typeof _optionalChain([chatRef, 'access',
|
|
14969
|
+
const subtitle = typeof _optionalChain([chatRef, 'access', _372 => _372.metadata, 'optionalAccess', _373 => _373.subtitle]) === "string" ? chatRef.metadata.subtitle : void 0;
|
|
14861
14970
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14862
14971
|
MingoInfoCard,
|
|
14863
14972
|
{
|
|
@@ -14926,12 +15035,12 @@ function ProductReleaseChatCard({
|
|
|
14926
15035
|
discuss
|
|
14927
15036
|
}) {
|
|
14928
15037
|
const releaseProps = buildProps(item);
|
|
14929
|
-
const status = _optionalChain([item, 'optionalAccess',
|
|
15038
|
+
const status = _optionalChain([item, 'optionalAccess', _374 => _374.version]) ? { label: String(item.version), variant: "grey" } : { label: "Release", variant: "grey" };
|
|
14930
15039
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14931
15040
|
EntityMingoCard,
|
|
14932
15041
|
{
|
|
14933
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
14934
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
15042
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _375 => _375.title]), () => ( "")),
|
|
15043
|
+
description: _optionalChain([item, 'optionalAccess', _376 => _376.summary]) || releaseProps.formattedDate || void 0,
|
|
14935
15044
|
cover: releaseProps.coverImage || void 0,
|
|
14936
15045
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.Rocket02Icon, { size: 24 }),
|
|
14937
15046
|
status,
|
|
@@ -14948,17 +15057,17 @@ function CampaignChatCard({
|
|
|
14948
15057
|
isNewTab,
|
|
14949
15058
|
discuss
|
|
14950
15059
|
}) {
|
|
14951
|
-
const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess',
|
|
15060
|
+
const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess', _377 => _377.goals])) ? item.goals.length : 0;
|
|
14952
15061
|
const meta = [
|
|
14953
|
-
_optionalChain([item, 'optionalAccess',
|
|
15062
|
+
_optionalChain([item, 'optionalAccess', _378 => _378.start_date]) ? _chunkNNFQLTJ3cjs.formatDateShort.call(void 0, item.start_date) : null,
|
|
14954
15063
|
goalsCount > 0 ? `${goalsCount} goal${goalsCount !== 1 ? "s" : ""}` : null,
|
|
14955
15064
|
"Marketing campaign"
|
|
14956
15065
|
].filter(Boolean).join(" \xB7 ");
|
|
14957
15066
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14958
15067
|
EntityMingoCard,
|
|
14959
15068
|
{
|
|
14960
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
14961
|
-
description: meta || _optionalChain([item, 'optionalAccess',
|
|
15069
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _379 => _379.name]), () => ( "")),
|
|
15070
|
+
description: meta || _optionalChain([item, 'optionalAccess', _380 => _380.description]) || void 0,
|
|
14962
15071
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.Megaphone01Icon, { size: 24 }),
|
|
14963
15072
|
chatRef,
|
|
14964
15073
|
isNewTab,
|
|
@@ -15013,14 +15122,14 @@ function BlogChatCard({
|
|
|
15013
15122
|
hasEmbeddedVideo,
|
|
15014
15123
|
discuss
|
|
15015
15124
|
}) {
|
|
15016
|
-
const category = Array.isArray(_optionalChain([item, 'optionalAccess',
|
|
15125
|
+
const category = Array.isArray(_optionalChain([item, 'optionalAccess', _381 => _381.categories])) ? _nullishCoalesce(_optionalChain([item, 'access', _382 => _382.categories, 'access', _383 => _383.find, 'call', _384 => _384((c) => _optionalChain([c, 'optionalAccess', _385 => _385.name])), 'optionalAccess', _386 => _386.name]), () => ( void 0)) : void 0;
|
|
15017
15126
|
const status = hasEmbeddedVideo ? { label: "Video", variant: "primary" } : category ? { label: category, variant: "grey" } : void 0;
|
|
15018
15127
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15019
15128
|
EntityMingoCard,
|
|
15020
15129
|
{
|
|
15021
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15022
|
-
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15023
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15130
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _387 => _387.title]), () => ( "")),
|
|
15131
|
+
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _388 => _388.summary]), () => ( void 0)),
|
|
15132
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _389 => _389.featured_image]), ogPlaceholder),
|
|
15024
15133
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.NewspaperIcon, { size: 24 }),
|
|
15025
15134
|
status,
|
|
15026
15135
|
chatRef,
|
|
@@ -15037,13 +15146,13 @@ function CaseStudyChatCard({
|
|
|
15037
15146
|
ogPlaceholder,
|
|
15038
15147
|
discuss
|
|
15039
15148
|
}) {
|
|
15040
|
-
const meta = [_optionalChain([item, 'optionalAccess',
|
|
15149
|
+
const meta = [_optionalChain([item, 'optionalAccess', _390 => _390.msp, 'optionalAccess', _391 => _391.name]), _optionalChain([item, 'optionalAccess', _392 => _392.user, 'optionalAccess', _393 => _393.full_name])].filter(Boolean).join(" \xB7 ");
|
|
15041
15150
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15042
15151
|
EntityMingoCard,
|
|
15043
15152
|
{
|
|
15044
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15045
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
15046
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15153
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _394 => _394.title]), () => ( "")),
|
|
15154
|
+
description: _optionalChain([item, 'optionalAccess', _395 => _395.summary]) || meta || void 0,
|
|
15155
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _396 => _396.featured_image]), ogPlaceholder),
|
|
15047
15156
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.TrophyIcon, { size: 24 }),
|
|
15048
15157
|
status: { label: "Case study", variant: "grey" },
|
|
15049
15158
|
chatRef,
|
|
@@ -15060,13 +15169,13 @@ function CustomerInterviewChatCard({
|
|
|
15060
15169
|
ogPlaceholder,
|
|
15061
15170
|
discuss
|
|
15062
15171
|
}) {
|
|
15063
|
-
const meta = [_optionalChain([item, 'optionalAccess',
|
|
15172
|
+
const meta = [_optionalChain([item, 'optionalAccess', _397 => _397.user, 'optionalAccess', _398 => _398.full_name]), _optionalChain([item, 'optionalAccess', _399 => _399.msp, 'optionalAccess', _400 => _400.name])].filter(Boolean).join(" \xB7 ");
|
|
15064
15173
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15065
15174
|
EntityMingoCard,
|
|
15066
15175
|
{
|
|
15067
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15068
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
15069
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15176
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _401 => _401.title]), () => ( "")),
|
|
15177
|
+
description: _optionalChain([item, 'optionalAccess', _402 => _402.video_summary]) || meta || void 0,
|
|
15178
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _403 => _403.featured_image]), ogPlaceholder),
|
|
15070
15179
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.MicrophoneIcon, { size: 24 }),
|
|
15071
15180
|
status: { label: "Interview", variant: "grey" },
|
|
15072
15181
|
chatRef,
|
|
@@ -15083,13 +15192,13 @@ function InvestorUpdateChatCard({
|
|
|
15083
15192
|
ogPlaceholder,
|
|
15084
15193
|
discuss
|
|
15085
15194
|
}) {
|
|
15086
|
-
const title = _optionalChain([item, 'optionalAccess',
|
|
15195
|
+
const title = _optionalChain([item, 'optionalAccess', _404 => _404.title]) || `Update #${_nullishCoalesce(_optionalChain([item, 'optionalAccess', _405 => _405.update_number]), () => ( "?"))}`;
|
|
15087
15196
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15088
15197
|
EntityMingoCard,
|
|
15089
15198
|
{
|
|
15090
15199
|
title,
|
|
15091
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
15092
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15200
|
+
description: _optionalChain([item, 'optionalAccess', _406 => _406.strategic_update]) || _optionalChain([item, 'optionalAccess', _407 => _407.content]) || _chunkNNFQLTJ3cjs.formatInvestorUpdatePeriod.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _408 => _408.period_start]), () => ( null)), _nullishCoalesce(_optionalChain([item, 'optionalAccess', _409 => _409.period_end]), () => ( null))) || void 0,
|
|
15201
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _410 => _410.featured_image]), ogPlaceholder),
|
|
15093
15202
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.PresentationLineIcon, { size: 24 }),
|
|
15094
15203
|
status: { label: "Investor update", variant: "grey" },
|
|
15095
15204
|
chatRef,
|
|
@@ -15106,12 +15215,12 @@ function OnboardingGuideChatCard({
|
|
|
15106
15215
|
ogPlaceholder,
|
|
15107
15216
|
discuss
|
|
15108
15217
|
}) {
|
|
15109
|
-
const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess',
|
|
15218
|
+
const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess', _411 => _411.featured_image])), () => ( entityCover(_optionalChain([item, 'optionalAccess', _412 => _412.main_video_thumbnail])))), () => ( entityCover(_optionalChain([item, 'optionalAccess', _413 => _413.og_image_url]), ogPlaceholder)));
|
|
15110
15219
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15111
15220
|
EntityMingoCard,
|
|
15112
15221
|
{
|
|
15113
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15114
|
-
description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15222
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _414 => _414.title]), () => ( "")),
|
|
15223
|
+
description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _415 => _415.summary]), () => ( _optionalChain([item, 'optionalAccess', _416 => _416.description]))), () => ( void 0)),
|
|
15115
15224
|
cover,
|
|
15116
15225
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.CompassIcon, { size: 24 }),
|
|
15117
15226
|
status: { label: "Guide", variant: "grey" },
|
|
@@ -15132,25 +15241,25 @@ function ProgramChatCard({
|
|
|
15132
15241
|
discuss
|
|
15133
15242
|
}) {
|
|
15134
15243
|
const icon = configKey === "webinar" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.PresentationBarIcon, { size: 24 }) : configKey === "event" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.CalendarIcon, { size: 24 }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.MicrophoneIcon, { size: 24 });
|
|
15135
|
-
const isScheduled = _optionalChain([item, 'optionalAccess',
|
|
15244
|
+
const isScheduled = _optionalChain([item, 'optionalAccess', _417 => _417.status]) === "scheduled";
|
|
15136
15245
|
let typeMeta;
|
|
15137
|
-
if (configKey === "podcast" && typeof _optionalChain([item, 'optionalAccess',
|
|
15246
|
+
if (configKey === "podcast" && typeof _optionalChain([item, 'optionalAccess', _418 => _418.duration_seconds]) === "number" && item.duration_seconds > 0 && !isScheduled) {
|
|
15138
15247
|
typeMeta = _chunkNNFQLTJ3cjs.formatDurationCompact.call(void 0, item.duration_seconds);
|
|
15139
|
-
} else if (configKey === "event" && typeof _optionalChain([item, 'optionalAccess',
|
|
15248
|
+
} else if (configKey === "event" && typeof _optionalChain([item, 'optionalAccess', _419 => _419.location_name]) === "string" && item.location_name.trim().length > 0) {
|
|
15140
15249
|
typeMeta = item.location_name;
|
|
15141
|
-
} else if (configKey === "webinar" && _optionalChain([item, 'optionalAccess',
|
|
15250
|
+
} else if (configKey === "webinar" && _optionalChain([item, 'optionalAccess', _420 => _420.start_at])) {
|
|
15142
15251
|
const time = _chunkNNFQLTJ3cjs.formatTimeWithTimezone.call(void 0, item.start_at, _nullishCoalesce(item.timezone, () => ( null)));
|
|
15143
15252
|
const dur = _chunkNNFQLTJ3cjs.formatDurationFromRange.call(void 0, item.start_at, item.end_at);
|
|
15144
15253
|
typeMeta = dur ? `${time} \xB7 ${dur}` : time;
|
|
15145
15254
|
}
|
|
15146
|
-
const itemDate = _chunkNNFQLTJ3cjs.formatDateUTC.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15255
|
+
const itemDate = _chunkNNFQLTJ3cjs.formatDateUTC.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _421 => _421.date]), () => ( null)), { fallback: "", timezone: "local" });
|
|
15147
15256
|
const meta = [itemDate, typeMeta].filter(Boolean).join(" \xB7 ");
|
|
15148
15257
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15149
15258
|
EntityMingoCard,
|
|
15150
15259
|
{
|
|
15151
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15152
|
-
description: meta || _optionalChain([item, 'optionalAccess',
|
|
15153
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15260
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _422 => _422.title]), () => ( "")),
|
|
15261
|
+
description: meta || _optionalChain([item, 'optionalAccess', _423 => _423.description]) || void 0,
|
|
15262
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _424 => _424.cover_url]), ogPlaceholder),
|
|
15154
15263
|
fallbackIcon: icon,
|
|
15155
15264
|
status: { label, variant: "grey" },
|
|
15156
15265
|
chatRef,
|
|
@@ -15167,10 +15276,10 @@ function RoadmapChatCard({
|
|
|
15167
15276
|
cardType,
|
|
15168
15277
|
discuss
|
|
15169
15278
|
}) {
|
|
15170
|
-
const logoUrl = typeof _optionalChain([item, 'optionalAccess',
|
|
15171
|
-
const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess',
|
|
15279
|
+
const logoUrl = typeof _optionalChain([item, 'optionalAccess', _425 => _425.icon]) === "string" && item.icon.startsWith("http") ? item.icon : void 0;
|
|
15280
|
+
const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess', _426 => _426.customItemId]) != null;
|
|
15172
15281
|
const defaultIcon = cardType === "delivery_item" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.TruckFastIcon, { size: 24 }) : cardType === "internal_task" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.CheckSquareIcon, { size: 24 }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSQM4PDRcjs.MapIcon, { size: 24 });
|
|
15173
|
-
const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNNFQLTJ3cjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess',
|
|
15282
|
+
const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNNFQLTJ3cjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess', _427 => _427.customItemId]), className: "size-6" }) : logoUrl ? (
|
|
15174
15283
|
// Contained (not full-bleed) so the integration logo keeps its aspect
|
|
15175
15284
|
// ratio inside the bordered icon box — matches RoadmapCard.
|
|
15176
15285
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWLSFBRT5cjs.next_image_default, { src: logoUrl, alt: "", className: "size-6 object-contain", width: 24, height: 24, unoptimized: true })
|
|
@@ -15181,10 +15290,10 @@ function RoadmapChatCard({
|
|
|
15181
15290
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15182
15291
|
EntityMingoCard,
|
|
15183
15292
|
{
|
|
15184
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15185
|
-
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15293
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _428 => _428.title]), () => ( "")),
|
|
15294
|
+
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _429 => _429.description]), () => ( void 0)),
|
|
15186
15295
|
fallbackIcon: icon,
|
|
15187
|
-
status: statusPill(_optionalChain([item, 'optionalAccess',
|
|
15296
|
+
status: statusPill(_optionalChain([item, 'optionalAccess', _430 => _430.status])),
|
|
15188
15297
|
chatRef,
|
|
15189
15298
|
isNewTab,
|
|
15190
15299
|
discuss,
|
|
@@ -15200,7 +15309,7 @@ function refHydratedEntry(docType, label, renderRef) {
|
|
|
15200
15309
|
bareInline: true,
|
|
15201
15310
|
contentRefType: docType,
|
|
15202
15311
|
noComposedHref: true,
|
|
15203
|
-
fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15312
|
+
fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _431 => _431.url]), () => ( null)),
|
|
15204
15313
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCardSkeleton, {}),
|
|
15205
15314
|
render: (item, chatRef, opts) => renderRef(fetchedItemDisplayRef(item, chatRef), opts)
|
|
15206
15315
|
};
|
|
@@ -15265,7 +15374,7 @@ function programRegistryEntries() {
|
|
|
15265
15374
|
discuss: opts.discuss,
|
|
15266
15375
|
configKey: cfg.configKey,
|
|
15267
15376
|
label: cfg.configKey.charAt(0).toUpperCase() + cfg.configKey.slice(1),
|
|
15268
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15377
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _432 => _432.extras, 'optionalAccess', _433 => _433.buildOgPlaceholderUrl, 'optionalCall', _434 => _434(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _435 => _435.title]), () => ( "")))]), () => ( null))
|
|
15269
15378
|
}
|
|
15270
15379
|
)
|
|
15271
15380
|
}));
|
|
@@ -15286,7 +15395,7 @@ var ROADMAP_CARD_CONFIGS = {
|
|
|
15286
15395
|
// The card's destination IS the ClickUp deep link, derived from the
|
|
15287
15396
|
// task id post-fetch (the refs frame used to carry it).
|
|
15288
15397
|
noComposedHref: true,
|
|
15289
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
15398
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _436 => _436.id]) != null ? clickupTaskUrl(String(item.id)) : null
|
|
15290
15399
|
}
|
|
15291
15400
|
};
|
|
15292
15401
|
function roadmapRegistryEntries() {
|
|
@@ -15328,8 +15437,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15328
15437
|
DeletedDataCard,
|
|
15329
15438
|
{
|
|
15330
15439
|
title: chatRef.title && chatRef.title !== chatRef.id ? chatRef.title : null,
|
|
15331
|
-
entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access',
|
|
15332
|
-
recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access',
|
|
15440
|
+
entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access', _437 => _437.metadata, 'optionalAccess', _438 => _438.entity_label]), () => ( null)),
|
|
15441
|
+
recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access', _439 => _439.metadata, 'optionalAccess', _440 => _440.recovery_note]), () => ( null))
|
|
15333
15442
|
}
|
|
15334
15443
|
)
|
|
15335
15444
|
},
|
|
@@ -15343,7 +15452,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15343
15452
|
bareInline: true,
|
|
15344
15453
|
contentRefType: "faq",
|
|
15345
15454
|
noComposedHref: true,
|
|
15346
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
15455
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _441 => _441.id]) != null ? `/faqs#${faqItemAnchor(item.id)}` : null,
|
|
15347
15456
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCardSkeleton, {}),
|
|
15348
15457
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FaqChatCard, { chatRef: fetchedFaqDisplayRef(item, chatRef), isNewTab: opts.isNewTab, discuss: opts.discuss })
|
|
15349
15458
|
},
|
|
@@ -15377,8 +15486,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15377
15486
|
chatRef,
|
|
15378
15487
|
isNewTab: opts.isNewTab,
|
|
15379
15488
|
discuss: opts.discuss,
|
|
15380
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15381
|
-
hasEmbeddedVideo: _optionalChain([chatRef, 'access',
|
|
15489
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _442 => _442.extras, 'optionalAccess', _443 => _443.buildOgPlaceholderUrl, 'optionalCall', _444 => _444(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _445 => _445.title]), () => ( "")))]), () => ( null)),
|
|
15490
|
+
hasEmbeddedVideo: _optionalChain([chatRef, 'access', _446 => _446.metadata, 'optionalAccess', _447 => _447.hasEmbeddedVideo]) === true
|
|
15382
15491
|
}
|
|
15383
15492
|
)
|
|
15384
15493
|
},
|
|
@@ -15394,7 +15503,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15394
15503
|
chatRef,
|
|
15395
15504
|
isNewTab: opts.isNewTab,
|
|
15396
15505
|
discuss: opts.discuss,
|
|
15397
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15506
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _448 => _448.extras, 'optionalAccess', _449 => _449.buildOgPlaceholderUrl, 'optionalCall', _450 => _450(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _451 => _451.title]), () => ( "")))]), () => ( null))
|
|
15398
15507
|
}
|
|
15399
15508
|
)
|
|
15400
15509
|
},
|
|
@@ -15410,7 +15519,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15410
15519
|
chatRef,
|
|
15411
15520
|
isNewTab: opts.isNewTab,
|
|
15412
15521
|
discuss: opts.discuss,
|
|
15413
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15522
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _452 => _452.extras, 'optionalAccess', _453 => _453.buildOgPlaceholderUrl, 'optionalCall', _454 => _454(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _455 => _455.title]), () => ( "")))]), () => ( null))
|
|
15414
15523
|
}
|
|
15415
15524
|
)
|
|
15416
15525
|
},
|
|
@@ -15420,7 +15529,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15420
15529
|
bareInline: true,
|
|
15421
15530
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNNFQLTJ3cjs.ProductReleaseCardSkeleton, { size: "sm" }),
|
|
15422
15531
|
render: (item, chatRef, opts) => {
|
|
15423
|
-
const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15532
|
+
const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _456 => _456.extras, 'optionalAccess', _457 => _457.buildProductReleaseCardProps]), () => ( _chunkNNFQLTJ3cjs.defaultBuildProductReleaseCardProps));
|
|
15424
15533
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15425
15534
|
ProductReleaseChatCard,
|
|
15426
15535
|
{
|
|
@@ -15446,7 +15555,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15446
15555
|
chatRef,
|
|
15447
15556
|
isNewTab: opts.isNewTab,
|
|
15448
15557
|
discuss: opts.discuss,
|
|
15449
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15558
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _458 => _458.extras, 'optionalAccess', _459 => _459.buildOgPlaceholderUrl, 'optionalCall', _460 => _460(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _461 => _461.title]), () => ( "")))]), () => ( null))
|
|
15450
15559
|
}
|
|
15451
15560
|
)
|
|
15452
15561
|
},
|
|
@@ -15464,7 +15573,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15464
15573
|
chatRef,
|
|
15465
15574
|
isNewTab: opts.isNewTab,
|
|
15466
15575
|
discuss: opts.discuss,
|
|
15467
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15576
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _462 => _462.extras, 'optionalAccess', _463 => _463.buildOgPlaceholderUrl, 'optionalCall', _464 => _464(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _465 => _465.title]), () => ( "")))]), () => ( null))
|
|
15468
15577
|
}
|
|
15469
15578
|
)
|
|
15470
15579
|
},
|
|
@@ -15475,7 +15584,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15475
15584
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CampaignCardAdminSkeleton, {}),
|
|
15476
15585
|
// No public viewer — synthesize the hub-internal admin URL post-fetch
|
|
15477
15586
|
// so the wrapper + isNewTab computation see the actual destination.
|
|
15478
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
15587
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _466 => _466.id]) ? `/admin/campaigns/${encodeURIComponent(String(item.id))}` : null,
|
|
15479
15588
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CampaignChatCard, { item, chatRef, isNewTab: opts.isNewTab, discuss: opts.discuss })
|
|
15480
15589
|
},
|
|
15481
15590
|
...roadmapRegistryEntries()
|
|
@@ -15494,13 +15603,13 @@ function ChatCardNavWrap({
|
|
|
15494
15603
|
if (!href) return;
|
|
15495
15604
|
const targetEl = e.target;
|
|
15496
15605
|
const host = e.currentTarget;
|
|
15497
|
-
if (!_optionalChain([host, 'optionalAccess',
|
|
15498
|
-
if (_optionalChain([targetEl, 'optionalAccess',
|
|
15499
|
-
if (!_optionalChain([targetEl, 'optionalAccess',
|
|
15606
|
+
if (!_optionalChain([host, 'optionalAccess', _467 => _467.contains, 'call', _468 => _468(targetEl)])) return;
|
|
15607
|
+
if (_optionalChain([targetEl, 'optionalAccess', _469 => _469.closest, 'optionalCall', _470 => _470("button")])) return;
|
|
15608
|
+
if (!_optionalChain([targetEl, 'optionalAccess', _471 => _471.closest, 'optionalCall', _472 => _472("a")])) return;
|
|
15500
15609
|
const handled = executeNavigation({ event: e, runtime, href, path, targetPlatform, fallbackNavigate: router.push });
|
|
15501
15610
|
if (!handled) return;
|
|
15502
15611
|
e.stopPropagation();
|
|
15503
|
-
if (!isNewTab && _optionalChain([panel, 'optionalAccess',
|
|
15612
|
+
if (!isNewTab && _optionalChain([panel, 'optionalAccess', _473 => _473.closeChat])) panel.closeChat();
|
|
15504
15613
|
};
|
|
15505
15614
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "contents", onClickCapture, children });
|
|
15506
15615
|
}
|
|
@@ -15522,7 +15631,7 @@ function ChatCardLoader({
|
|
|
15522
15631
|
title: chatRef.title,
|
|
15523
15632
|
externalUrl: chatRef.url,
|
|
15524
15633
|
targetPlatform: chatRef.targetPlatform,
|
|
15525
|
-
path: typeof _optionalChain([chatRef, 'access',
|
|
15634
|
+
path: typeof _optionalChain([chatRef, 'access', _474 => _474.metadata, 'optionalAccess', _475 => _475.path]) === "string" ? chatRef.metadata.path : null
|
|
15526
15635
|
},
|
|
15527
15636
|
sourceRowCtxFromRuntime(runtime, { baseRoute, chipBasePlatform })
|
|
15528
15637
|
);
|
|
@@ -15536,11 +15645,11 @@ function ChatCardLoader({
|
|
|
15536
15645
|
const entry = CHAT_CARD_REGISTRY[resolvedChatRef.type];
|
|
15537
15646
|
const fetchEntry = entry && entry.contentRefType ? entry : null;
|
|
15538
15647
|
const { item, isLoading, isError, isFetched } = useChatCardItem(
|
|
15539
|
-
_nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess',
|
|
15648
|
+
_nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess', _476 => _476.contentRefType]), () => ( "")),
|
|
15540
15649
|
fetchEntry ? resolvedChatRef.id : ""
|
|
15541
15650
|
);
|
|
15542
15651
|
if (!entry) return null;
|
|
15543
|
-
const composedHref = _optionalChain([fetchEntry, 'optionalAccess',
|
|
15652
|
+
const composedHref = _optionalChain([fetchEntry, 'optionalAccess', _477 => _477.contentRefType]) && !resolvedChatRef.url && item ? resolveFetchedCardHref({
|
|
15544
15653
|
contentRefType: fetchEntry.contentRefType,
|
|
15545
15654
|
id: resolvedChatRef.id,
|
|
15546
15655
|
item,
|
|
@@ -15548,7 +15657,7 @@ function ChatCardLoader({
|
|
|
15548
15657
|
}) : null;
|
|
15549
15658
|
const hrefChoice = fetchEntry && !resolvedChatRef.url && item ? pickFetchedCardHref({
|
|
15550
15659
|
composed: composedHref,
|
|
15551
|
-
itemHref: _nullishCoalesce(_optionalChain([fetchEntry, 'access',
|
|
15660
|
+
itemHref: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _478 => _478.fallbackHref, 'optionalCall', _479 => _479(item)]), () => ( null)),
|
|
15552
15661
|
allowComposed: !fetchEntry.noComposedHref
|
|
15553
15662
|
}) : null;
|
|
15554
15663
|
const hrefResolvedChatRef = hrefChoice ? {
|
|
@@ -15582,7 +15691,7 @@ function ChatCardLoader({
|
|
|
15582
15691
|
isNewTab,
|
|
15583
15692
|
discuss
|
|
15584
15693
|
};
|
|
15585
|
-
const path = typeof _optionalChain([finalChatRef, 'access',
|
|
15694
|
+
const path = typeof _optionalChain([finalChatRef, 'access', _480 => _480.metadata, 'optionalAccess', _481 => _481.path]) === "string" ? finalChatRef.metadata.path : null;
|
|
15586
15695
|
const navWrap = (children) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15587
15696
|
ChatCardNavWrap,
|
|
15588
15697
|
{
|
|
@@ -15606,7 +15715,7 @@ function ChatCardLoader({
|
|
|
15606
15715
|
if (!fetchEntry) {
|
|
15607
15716
|
return finish(entry.render(void 0, finalChatRef, renderOpts));
|
|
15608
15717
|
}
|
|
15609
|
-
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([fetchEntry, 'access',
|
|
15718
|
+
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _482 => _482.skeleton, 'optionalCall', _483 => _483()]), () => ( null)) });
|
|
15610
15719
|
if (!item) {
|
|
15611
15720
|
if (isError) {
|
|
15612
15721
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardLoadFailure, { label: entry.label, id: finalChatRef.id, detail: "Failed to load" });
|
|
@@ -15966,7 +16075,7 @@ function useChunkCatchup({
|
|
|
15966
16075
|
if (catchupRun.current === run) {
|
|
15967
16076
|
if (currentDialogId !== dialogIdRef.current) {
|
|
15968
16077
|
catchupRun.current = null;
|
|
15969
|
-
if (_optionalChain([pendingCatchupRef, 'access',
|
|
16078
|
+
if (_optionalChain([pendingCatchupRef, 'access', _484 => _484.current, 'optionalAccess', _485 => _485.dialogId]) === currentDialogId) {
|
|
15970
16079
|
pendingCatchupRef.current = null;
|
|
15971
16080
|
}
|
|
15972
16081
|
} else {
|
|
@@ -15977,7 +16086,7 @@ function useChunkCatchup({
|
|
|
15977
16086
|
if (pending.dialogId === currentDialogId) {
|
|
15978
16087
|
rearmForQueuedCatchup();
|
|
15979
16088
|
try {
|
|
15980
|
-
await _optionalChain([catchUpChunksRef, 'access',
|
|
16089
|
+
await _optionalChain([catchUpChunksRef, 'access', _486 => _486.current, 'optionalCall', _487 => _487(pending.fromSequenceId)]);
|
|
15981
16090
|
} catch (rerunError) {
|
|
15982
16091
|
console.error("Queued catch-up re-run failed:", rerunError);
|
|
15983
16092
|
}
|
|
@@ -16044,7 +16153,7 @@ function useChunkCatchup({
|
|
|
16044
16153
|
|
|
16045
16154
|
var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
|
|
16046
16155
|
function prefersReducedMotion() {
|
|
16047
|
-
return typeof window !== "undefined" && _optionalChain([window, 'access',
|
|
16156
|
+
return typeof window !== "undefined" && _optionalChain([window, 'access', _488 => _488.matchMedia, 'optionalCall', _489 => _489("(prefers-reduced-motion: reduce)"), 'access', _490 => _490.matches]) === true;
|
|
16048
16157
|
}
|
|
16049
16158
|
function useScriptedStream(frames, resetKey, enabled = true) {
|
|
16050
16159
|
const [index, setIndex] = _react.useState.call(void 0, 0);
|
|
@@ -16055,7 +16164,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
16055
16164
|
setIndex(0);
|
|
16056
16165
|
}
|
|
16057
16166
|
_react.useEffect.call(void 0, () => {
|
|
16058
|
-
const mq = _optionalChain([window, 'access',
|
|
16167
|
+
const mq = _optionalChain([window, 'access', _491 => _491.matchMedia, 'optionalCall', _492 => _492("(prefers-reduced-motion: reduce)")]);
|
|
16059
16168
|
const sync = () => setReducedMotion(mq ? mq.matches : prefersReducedMotion());
|
|
16060
16169
|
sync();
|
|
16061
16170
|
if (!mq) return void 0;
|
|
@@ -16190,7 +16299,7 @@ function useJetStreamDialogSubscription({
|
|
|
16190
16299
|
if (subscriptionRef.current) {
|
|
16191
16300
|
try {
|
|
16192
16301
|
subscriptionRef.current.unsubscribe();
|
|
16193
|
-
} catch (
|
|
16302
|
+
} catch (e46) {
|
|
16194
16303
|
}
|
|
16195
16304
|
subscriptionRef.current = null;
|
|
16196
16305
|
}
|
|
@@ -16198,7 +16307,7 @@ function useJetStreamDialogSubscription({
|
|
|
16198
16307
|
const lifecycle = _chunkI5JVSFNVcjs.startConnectionLifecycle.call(void 0, {
|
|
16199
16308
|
conn: sharedConn,
|
|
16200
16309
|
wsUrl,
|
|
16201
|
-
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access',
|
|
16310
|
+
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _493 => _493.current, 'optionalCall', _494 => _494()]),
|
|
16202
16311
|
backoff: reconnectionBackoffRef.current,
|
|
16203
16312
|
getFreshUrl: () => getNatsWsUrlRef.current(),
|
|
16204
16313
|
// JetStream emits 'error' for protocol-level failures (e.g. -ERR Permissions
|
|
@@ -16213,7 +16322,7 @@ function useJetStreamDialogSubscription({
|
|
|
16213
16322
|
setReconnectionCount((c) => c + 1);
|
|
16214
16323
|
}
|
|
16215
16324
|
hadConnectionBeforeRef.current = true;
|
|
16216
|
-
_optionalChain([onConnectRef, 'access',
|
|
16325
|
+
_optionalChain([onConnectRef, 'access', _495 => _495.current, 'optionalCall', _496 => _496()]);
|
|
16217
16326
|
}
|
|
16218
16327
|
if (status === "error") {
|
|
16219
16328
|
console.warn("[JetStream] NATS protocol error:", evt.data);
|
|
@@ -16223,7 +16332,7 @@ function useJetStreamDialogSubscription({
|
|
|
16223
16332
|
setIsConnected(false);
|
|
16224
16333
|
setIsSubscribed(false);
|
|
16225
16334
|
tearDownSubscription();
|
|
16226
|
-
_optionalChain([onDisconnectRef, 'access',
|
|
16335
|
+
_optionalChain([onDisconnectRef, 'access', _497 => _497.current, 'optionalCall', _498 => _498()]);
|
|
16227
16336
|
}
|
|
16228
16337
|
}
|
|
16229
16338
|
});
|
|
@@ -16284,7 +16393,7 @@ function useJetStreamDialogSubscription({
|
|
|
16284
16393
|
if (subscriptionRef.current) {
|
|
16285
16394
|
try {
|
|
16286
16395
|
subscriptionRef.current.unsubscribe();
|
|
16287
|
-
} catch (
|
|
16396
|
+
} catch (e47) {
|
|
16288
16397
|
}
|
|
16289
16398
|
subscriptionRef.current = null;
|
|
16290
16399
|
}
|
|
@@ -16319,7 +16428,7 @@ function useJetStreamDialogSubscription({
|
|
|
16319
16428
|
parsed.streamSeq = streamSeq;
|
|
16320
16429
|
}
|
|
16321
16430
|
cb(parsed, topic);
|
|
16322
|
-
} catch (
|
|
16431
|
+
} catch (e48) {
|
|
16323
16432
|
}
|
|
16324
16433
|
},
|
|
16325
16434
|
{
|
|
@@ -16343,14 +16452,14 @@ function useJetStreamDialogSubscription({
|
|
|
16343
16452
|
if (cancelled) {
|
|
16344
16453
|
try {
|
|
16345
16454
|
handle.unsubscribe();
|
|
16346
|
-
} catch (
|
|
16455
|
+
} catch (e49) {
|
|
16347
16456
|
}
|
|
16348
16457
|
return;
|
|
16349
16458
|
}
|
|
16350
16459
|
subscriptionRef.current = handle;
|
|
16351
16460
|
setIsSubscribed(true);
|
|
16352
|
-
_optionalChain([onSubscribedRef, 'access',
|
|
16353
|
-
} catch (
|
|
16461
|
+
_optionalChain([onSubscribedRef, 'access', _499 => _499.current, 'optionalCall', _500 => _500()]);
|
|
16462
|
+
} catch (e50) {
|
|
16354
16463
|
if (!cancelled) {
|
|
16355
16464
|
setIsSubscribed(false);
|
|
16356
16465
|
}
|
|
@@ -16362,7 +16471,7 @@ function useJetStreamDialogSubscription({
|
|
|
16362
16471
|
if (subscriptionRef.current) {
|
|
16363
16472
|
try {
|
|
16364
16473
|
subscriptionRef.current.unsubscribe();
|
|
16365
|
-
} catch (
|
|
16474
|
+
} catch (e51) {
|
|
16366
16475
|
}
|
|
16367
16476
|
subscriptionRef.current = null;
|
|
16368
16477
|
}
|
|
@@ -16465,20 +16574,20 @@ function useNatsDialogSubscription({
|
|
|
16465
16574
|
const tearDownSubscriptions = () => {
|
|
16466
16575
|
subscriptionRefs.current.forEach((sub) => {
|
|
16467
16576
|
try {
|
|
16468
|
-
_optionalChain([sub, 'optionalAccess',
|
|
16469
|
-
} catch (
|
|
16577
|
+
_optionalChain([sub, 'optionalAccess', _501 => _501.unsubscribe, 'call', _502 => _502()]);
|
|
16578
|
+
} catch (e52) {
|
|
16470
16579
|
}
|
|
16471
16580
|
});
|
|
16472
16581
|
subscriptionRefs.current.clear();
|
|
16473
16582
|
lastSubscribedDialogIdRef.current = null;
|
|
16474
|
-
_optionalChain([abortControllerRef, 'access',
|
|
16583
|
+
_optionalChain([abortControllerRef, 'access', _503 => _503.current, 'optionalAccess', _504 => _504.abort, 'call', _505 => _505()]);
|
|
16475
16584
|
abortControllerRef.current = null;
|
|
16476
16585
|
};
|
|
16477
16586
|
const isDisconnectStatus = (status) => status === "closed" || status === "disconnected";
|
|
16478
16587
|
const lifecycle = _chunkI5JVSFNVcjs.startConnectionLifecycle.call(void 0, {
|
|
16479
16588
|
conn: sharedConn,
|
|
16480
16589
|
wsUrl,
|
|
16481
|
-
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access',
|
|
16590
|
+
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _506 => _506.current, 'optionalCall', _507 => _507()]),
|
|
16482
16591
|
backoff: reconnectionBackoffRef.current,
|
|
16483
16592
|
getFreshUrl: () => getNatsWsUrlRef.current(),
|
|
16484
16593
|
shouldRetryOn: isDisconnectStatus,
|
|
@@ -16489,7 +16598,7 @@ function useNatsDialogSubscription({
|
|
|
16489
16598
|
setReconnectionCount((c) => c + 1);
|
|
16490
16599
|
}
|
|
16491
16600
|
hadConnectionBeforeRef.current = true;
|
|
16492
|
-
_optionalChain([onConnectRef, 'access',
|
|
16601
|
+
_optionalChain([onConnectRef, 'access', _508 => _508.current, 'optionalCall', _509 => _509()]);
|
|
16493
16602
|
}
|
|
16494
16603
|
if (status === "error") {
|
|
16495
16604
|
console.warn("[NATS] protocol error:", evt.data);
|
|
@@ -16499,7 +16608,7 @@ function useNatsDialogSubscription({
|
|
|
16499
16608
|
setIsConnected(false);
|
|
16500
16609
|
setIsSubscribed(false);
|
|
16501
16610
|
tearDownSubscriptions();
|
|
16502
|
-
_optionalChain([onDisconnectRef, 'access',
|
|
16611
|
+
_optionalChain([onDisconnectRef, 'access', _510 => _510.current, 'optionalCall', _511 => _511()]);
|
|
16503
16612
|
}
|
|
16504
16613
|
}
|
|
16505
16614
|
});
|
|
@@ -16530,13 +16639,13 @@ function useNatsDialogSubscription({
|
|
|
16530
16639
|
setIsSubscribed(false);
|
|
16531
16640
|
subscriptionRefs.current.forEach((sub) => {
|
|
16532
16641
|
try {
|
|
16533
|
-
_optionalChain([sub, 'optionalAccess',
|
|
16534
|
-
} catch (
|
|
16642
|
+
_optionalChain([sub, 'optionalAccess', _512 => _512.unsubscribe, 'call', _513 => _513()]);
|
|
16643
|
+
} catch (e53) {
|
|
16535
16644
|
}
|
|
16536
16645
|
});
|
|
16537
16646
|
subscriptionRefs.current.clear();
|
|
16538
16647
|
lastSubscribedDialogIdRef.current = null;
|
|
16539
|
-
_optionalChain([abortControllerRef, 'access',
|
|
16648
|
+
_optionalChain([abortControllerRef, 'access', _514 => _514.current, 'optionalAccess', _515 => _515.abort, 'call', _516 => _516()]);
|
|
16540
16649
|
abortControllerRef.current = null;
|
|
16541
16650
|
}
|
|
16542
16651
|
return void 0;
|
|
@@ -16548,12 +16657,12 @@ function useNatsDialogSubscription({
|
|
|
16548
16657
|
if (subscriptionRefs.current.size > 0) {
|
|
16549
16658
|
subscriptionRefs.current.forEach((sub) => {
|
|
16550
16659
|
try {
|
|
16551
|
-
_optionalChain([sub, 'optionalAccess',
|
|
16552
|
-
} catch (
|
|
16660
|
+
_optionalChain([sub, 'optionalAccess', _517 => _517.unsubscribe, 'call', _518 => _518()]);
|
|
16661
|
+
} catch (e54) {
|
|
16553
16662
|
}
|
|
16554
16663
|
});
|
|
16555
16664
|
subscriptionRefs.current.clear();
|
|
16556
|
-
_optionalChain([abortControllerRef, 'access',
|
|
16665
|
+
_optionalChain([abortControllerRef, 'access', _519 => _519.current, 'optionalAccess', _520 => _520.abort, 'call', _521 => _521()]);
|
|
16557
16666
|
}
|
|
16558
16667
|
abortControllerRef.current = new AbortController();
|
|
16559
16668
|
const abort = abortControllerRef.current;
|
|
@@ -16572,7 +16681,7 @@ function useNatsDialogSubscription({
|
|
|
16572
16681
|
const dataStr = decoder.decode(msg.data);
|
|
16573
16682
|
const parsed = JSON.parse(dataStr);
|
|
16574
16683
|
onEventRef.current(parsed, messageType);
|
|
16575
|
-
} catch (
|
|
16684
|
+
} catch (e55) {
|
|
16576
16685
|
}
|
|
16577
16686
|
};
|
|
16578
16687
|
topicsRef.current.forEach((topic) => {
|
|
@@ -16583,7 +16692,7 @@ function useNatsDialogSubscription({
|
|
|
16583
16692
|
});
|
|
16584
16693
|
lastSubscribedDialogIdRef.current = dialogId;
|
|
16585
16694
|
setIsSubscribed(true);
|
|
16586
|
-
_optionalChain([onSubscribedRef, 'access',
|
|
16695
|
+
_optionalChain([onSubscribedRef, 'access', _522 => _522.current, 'optionalCall', _523 => _523()]);
|
|
16587
16696
|
};
|
|
16588
16697
|
if (isConnectedRef.current) {
|
|
16589
16698
|
createSubscriptions();
|
|
@@ -16594,8 +16703,8 @@ function useNatsDialogSubscription({
|
|
|
16594
16703
|
abort.abort();
|
|
16595
16704
|
subscriptions.forEach((sub) => {
|
|
16596
16705
|
try {
|
|
16597
|
-
_optionalChain([sub, 'optionalAccess',
|
|
16598
|
-
} catch (
|
|
16706
|
+
_optionalChain([sub, 'optionalAccess', _524 => _524.unsubscribe, 'call', _525 => _525()]);
|
|
16707
|
+
} catch (e56) {
|
|
16599
16708
|
}
|
|
16600
16709
|
});
|
|
16601
16710
|
subscriptions.clear();
|
|
@@ -16622,7 +16731,7 @@ function useNatsDialogSubscription({
|
|
|
16622
16731
|
const dataStr = decoder.decode(msg.data);
|
|
16623
16732
|
const parsed = JSON.parse(dataStr);
|
|
16624
16733
|
onEventRef.current(parsed, messageType);
|
|
16625
|
-
} catch (
|
|
16734
|
+
} catch (e57) {
|
|
16626
16735
|
}
|
|
16627
16736
|
};
|
|
16628
16737
|
topicsRef.current.forEach((topic) => {
|
|
@@ -16633,7 +16742,7 @@ function useNatsDialogSubscription({
|
|
|
16633
16742
|
});
|
|
16634
16743
|
lastSubscribedDialogIdRef.current = currentDialogId;
|
|
16635
16744
|
setIsSubscribed(true);
|
|
16636
|
-
_optionalChain([onSubscribedRef, 'access',
|
|
16745
|
+
_optionalChain([onSubscribedRef, 'access', _526 => _526.current, 'optionalCall', _527 => _527()]);
|
|
16637
16746
|
} else if (subscriptionRefs.current.size > 0) {
|
|
16638
16747
|
setIsSubscribed(true);
|
|
16639
16748
|
}
|
|
@@ -16641,10 +16750,10 @@ function useNatsDialogSubscription({
|
|
|
16641
16750
|
return { isConnected, isSubscribed, reconnectionCount };
|
|
16642
16751
|
}
|
|
16643
16752
|
function buildNatsWsUrl(apiBaseUrl, options) {
|
|
16644
|
-
const path = _optionalChain([options, 'optionalAccess',
|
|
16753
|
+
const path = _optionalChain([options, 'optionalAccess', _528 => _528.source]) === "dashboard" ? "/ws/nats-api" : "/ws/nats";
|
|
16645
16754
|
const u = new URL(path, apiBaseUrl);
|
|
16646
16755
|
u.protocol = u.protocol === "https:" ? "wss:" : "ws:";
|
|
16647
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
16756
|
+
if (_optionalChain([options, 'optionalAccess', _529 => _529.includeAuthParam]) && _optionalChain([options, 'optionalAccess', _530 => _530.token])) {
|
|
16648
16757
|
u.searchParams.set("authorization", options.token);
|
|
16649
16758
|
}
|
|
16650
16759
|
return u.toString();
|
|
@@ -16662,7 +16771,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
16662
16771
|
const data = await res.json();
|
|
16663
16772
|
return _nullishCoalesce(data.commands, () => ( []));
|
|
16664
16773
|
} catch (err) {
|
|
16665
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
16774
|
+
if (_optionalChain([err, 'optionalAccess', _531 => _531.name]) === "AbortError") throw err;
|
|
16666
16775
|
console.warn("[chat] slash-commands fetch failed, showing none:", err);
|
|
16667
16776
|
return [];
|
|
16668
16777
|
}
|
|
@@ -16670,8 +16779,8 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
16670
16779
|
var NO_COMMANDS = [];
|
|
16671
16780
|
function useSlashCommands(prefix, commandsUrl) {
|
|
16672
16781
|
const [answered, setAnswered] = _react.useState.call(void 0, null);
|
|
16673
|
-
const commands = prefix != null && _optionalChain([answered, 'optionalAccess',
|
|
16674
|
-
const loading = prefix != null && _optionalChain([answered, 'optionalAccess',
|
|
16782
|
+
const commands = prefix != null && _optionalChain([answered, 'optionalAccess', _532 => _532.prefix]) === prefix ? answered.commands : NO_COMMANDS;
|
|
16783
|
+
const loading = prefix != null && _optionalChain([answered, 'optionalAccess', _533 => _533.prefix]) !== prefix;
|
|
16675
16784
|
_react.useEffect.call(void 0, () => {
|
|
16676
16785
|
if (prefix == null) return void 0;
|
|
16677
16786
|
let cancelled = false;
|
|
@@ -16681,7 +16790,7 @@ function useSlashCommands(prefix, commandsUrl) {
|
|
|
16681
16790
|
const next = await fetchSlashCommands(prefix, ctrl.signal, commandsUrl);
|
|
16682
16791
|
if (!cancelled) setAnswered({ prefix, commands: next });
|
|
16683
16792
|
} catch (err) {
|
|
16684
|
-
if (!cancelled && _optionalChain([err, 'optionalAccess',
|
|
16793
|
+
if (!cancelled && _optionalChain([err, 'optionalAccess', _534 => _534.name]) !== "AbortError") {
|
|
16685
16794
|
console.warn("[use-slash-commands] fetch failed:", err);
|
|
16686
16795
|
setAnswered({ prefix, commands: NO_COMMANDS });
|
|
16687
16796
|
}
|
|
@@ -16704,7 +16813,7 @@ function useSlashCommandRegistry(commandsUrl, options) {
|
|
|
16704
16813
|
const query = _reactquery.useQuery.call(void 0, {
|
|
16705
16814
|
queryKey: ["chat-slash-commands", commandsUrl],
|
|
16706
16815
|
queryFn: ({ signal }) => fetchSlashCommands("", signal, commandsUrl),
|
|
16707
|
-
enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
16816
|
+
enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _535 => _535.enabled]), () => ( true)),
|
|
16708
16817
|
staleTime: Infinity,
|
|
16709
16818
|
gcTime: Infinity,
|
|
16710
16819
|
// The commands registry is non-critical chrome — a failure degrades to an
|
|
@@ -16743,21 +16852,21 @@ async function fetchEmptyStateConfig(signal, emptyStateUrl) {
|
|
|
16743
16852
|
}
|
|
16744
16853
|
const data = await res.json();
|
|
16745
16854
|
return {
|
|
16746
|
-
name: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
16747
|
-
icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
16748
|
-
greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
16749
|
-
enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
16750
|
-
quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
16751
|
-
suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
16855
|
+
name: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _536 => _536.name]), () => ( null)),
|
|
16856
|
+
icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _537 => _537.icon]), () => ( null)),
|
|
16857
|
+
greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _538 => _538.greeting]), () => ( null)),
|
|
16858
|
+
enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _539 => _539.enabledRagTableIds]), () => ( [])),
|
|
16859
|
+
quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _540 => _540.quickActions]), () => ( [])),
|
|
16860
|
+
suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _541 => _541.suggestedQueries]), () => ( []))
|
|
16752
16861
|
};
|
|
16753
16862
|
} catch (err) {
|
|
16754
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
16863
|
+
if (_optionalChain([err, 'optionalAccess', _542 => _542.name]) === "AbortError") throw err;
|
|
16755
16864
|
console.warn("[chat] empty-state config fetch failed, using neutral defaults:", err);
|
|
16756
16865
|
return EMPTY_STATE_FALLBACK;
|
|
16757
16866
|
}
|
|
16758
16867
|
}
|
|
16759
16868
|
function useEmptyStateConfig(emptyStateUrl, options) {
|
|
16760
|
-
const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
16869
|
+
const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _543 => _543.enabled]), () => ( true))) && !!emptyStateUrl;
|
|
16761
16870
|
const query = _reactquery.useQuery.call(void 0, {
|
|
16762
16871
|
queryKey: ["chat-empty-state", emptyStateUrl],
|
|
16763
16872
|
queryFn: ({ signal }) => fetchEmptyStateConfig(signal, emptyStateUrl),
|
|
@@ -16786,7 +16895,7 @@ var CHAT_ATTACHMENT_MAX_SIZE_BYTES = 25 * 1024 * 1024;
|
|
|
16786
16895
|
var STORAGE_CACHE_CONTROL_IMMUTABLE = "public, max-age=31536000, immutable";
|
|
16787
16896
|
function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
16788
16897
|
return new Promise((resolve, reject) => {
|
|
16789
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
16898
|
+
if (_optionalChain([signal, 'optionalAccess', _544 => _544.aborted])) {
|
|
16790
16899
|
reject(new Error("Upload cancelled"));
|
|
16791
16900
|
return;
|
|
16792
16901
|
}
|
|
@@ -16828,7 +16937,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
|
16828
16937
|
const handleSignalAbort = () => {
|
|
16829
16938
|
xhr.abort();
|
|
16830
16939
|
};
|
|
16831
|
-
_optionalChain([signal, 'optionalAccess',
|
|
16940
|
+
_optionalChain([signal, 'optionalAccess', _545 => _545.addEventListener, 'call', _546 => _546("abort", handleSignalAbort, { once: true, signal: listeners.signal })]);
|
|
16832
16941
|
xhr.upload.addEventListener("progress", handleProgress, { signal: listeners.signal });
|
|
16833
16942
|
xhr.addEventListener("load", handleLoad, { signal: listeners.signal });
|
|
16834
16943
|
xhr.addEventListener("error", handleError, { signal: listeners.signal });
|
|
@@ -16872,10 +16981,10 @@ function useChatAttachments() {
|
|
|
16872
16981
|
try {
|
|
16873
16982
|
sniffed = await _filetype.fileTypeFromBlob.call(void 0, att.file);
|
|
16874
16983
|
} catch (err) {
|
|
16875
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
16984
|
+
if (_optionalChain([ctrl, 'optionalAccess', _547 => _547.signal, 'access', _548 => _548.aborted])) return;
|
|
16876
16985
|
throw new Error(`Could not read file content: ${err instanceof Error ? err.message : String(err)}`);
|
|
16877
16986
|
}
|
|
16878
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
16987
|
+
if (_optionalChain([ctrl, 'optionalAccess', _549 => _549.signal, 'access', _550 => _550.aborted])) return;
|
|
16879
16988
|
if (!sniffed) {
|
|
16880
16989
|
throw new Error("Unrecognized file format");
|
|
16881
16990
|
}
|
|
@@ -16889,7 +16998,7 @@ function useChatAttachments() {
|
|
|
16889
16998
|
const urlResp = await _chunkCP6TIRONcjs.embedAuthedFetch.call(void 0, uploadUrlEndpoint, {
|
|
16890
16999
|
method: "POST",
|
|
16891
17000
|
headers: { "Content-Type": "application/json" },
|
|
16892
|
-
signal: _optionalChain([ctrl, 'optionalAccess',
|
|
17001
|
+
signal: _optionalChain([ctrl, 'optionalAccess', _551 => _551.signal]),
|
|
16893
17002
|
body: JSON.stringify({
|
|
16894
17003
|
fileName: att.file.name,
|
|
16895
17004
|
// Pass the SNIFFED MIME (not `file.type`, which can be a
|
|
@@ -16918,9 +17027,9 @@ function useChatAttachments() {
|
|
|
16918
17027
|
(pct) => {
|
|
16919
17028
|
updateOne(att.id, { progress: pct });
|
|
16920
17029
|
},
|
|
16921
|
-
_optionalChain([ctrl, 'optionalAccess',
|
|
17030
|
+
_optionalChain([ctrl, 'optionalAccess', _552 => _552.signal])
|
|
16922
17031
|
);
|
|
16923
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
17032
|
+
if (_optionalChain([ctrl, 'optionalAccess', _553 => _553.signal, 'access', _554 => _554.aborted])) return;
|
|
16924
17033
|
updateOne(att.id, {
|
|
16925
17034
|
status: "ready",
|
|
16926
17035
|
progress: 100,
|
|
@@ -16928,7 +17037,7 @@ function useChatAttachments() {
|
|
|
16928
17037
|
viewToken: mintData.viewToken
|
|
16929
17038
|
});
|
|
16930
17039
|
} catch (err) {
|
|
16931
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
17040
|
+
if (_optionalChain([ctrl, 'optionalAccess', _555 => _555.signal, 'access', _556 => _556.aborted])) return;
|
|
16932
17041
|
const message = err instanceof Error ? err.message : String(err);
|
|
16933
17042
|
updateOne(att.id, { status: "error", progress: 0, errorMessage: message });
|
|
16934
17043
|
} finally {
|
|
@@ -17077,11 +17186,11 @@ var ANON_DEFAULTS = {
|
|
|
17077
17186
|
function useResolveChatIdentity(enabled) {
|
|
17078
17187
|
const runtime = _chunkRDTOMWDNcjs.useRequiredChatRuntime.call(void 0, );
|
|
17079
17188
|
const url = runtime.endpoints.identityUrl;
|
|
17080
|
-
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkCP6TIRONcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess',
|
|
17189
|
+
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkCP6TIRONcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _557 => _557.email]), () => ( null));
|
|
17081
17190
|
const requestKey = enabled ? `${url}\0${_nullishCoalesce(proxyEmail, () => ( ""))}` : null;
|
|
17082
17191
|
const [resolved, setResolved] = _react.useState.call(void 0, null);
|
|
17083
|
-
const data = _optionalChain([resolved, 'optionalAccess',
|
|
17084
|
-
const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess',
|
|
17192
|
+
const data = _optionalChain([resolved, 'optionalAccess', _558 => _558.key]) === requestKey ? resolved.data : ANON_DEFAULTS;
|
|
17193
|
+
const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess', _559 => _559.key]) !== requestKey;
|
|
17085
17194
|
_react.useEffect.call(void 0, () => {
|
|
17086
17195
|
if (requestKey === null) return void 0;
|
|
17087
17196
|
let cancelled = false;
|
|
@@ -17228,7 +17337,7 @@ function useChat({
|
|
|
17228
17337
|
onMessagesChangeRef.current = onMessagesChange;
|
|
17229
17338
|
});
|
|
17230
17339
|
_react.useEffect.call(void 0, () => {
|
|
17231
|
-
_optionalChain([onMessagesChangeRef, 'access',
|
|
17340
|
+
_optionalChain([onMessagesChangeRef, 'access', _560 => _560.current, 'optionalCall', _561 => _561(messages)]);
|
|
17232
17341
|
}, [messages]);
|
|
17233
17342
|
const {
|
|
17234
17343
|
streamMessage,
|
|
@@ -17265,7 +17374,7 @@ function useChat({
|
|
|
17265
17374
|
name: "You",
|
|
17266
17375
|
content: text,
|
|
17267
17376
|
timestamp: /* @__PURE__ */ new Date(),
|
|
17268
|
-
..._optionalChain([options, 'optionalAccess',
|
|
17377
|
+
..._optionalChain([options, 'optionalAccess', _562 => _562.hidden]) ? { hidden: true } : {}
|
|
17269
17378
|
};
|
|
17270
17379
|
addMessage(userMessage);
|
|
17271
17380
|
setIsTyping(true);
|
|
@@ -17479,8 +17588,8 @@ function buildConfirmToolBody(request) {
|
|
|
17479
17588
|
async function readServerErrorMessage(response) {
|
|
17480
17589
|
try {
|
|
17481
17590
|
const body = await response.json();
|
|
17482
|
-
if (typeof _optionalChain([body, 'optionalAccess',
|
|
17483
|
-
} catch (
|
|
17591
|
+
if (typeof _optionalChain([body, 'optionalAccess', _563 => _563.error]) === "string" && body.error.length > 0) return body.error;
|
|
17592
|
+
} catch (e58) {
|
|
17484
17593
|
}
|
|
17485
17594
|
return null;
|
|
17486
17595
|
}
|
|
@@ -17651,7 +17760,7 @@ function createSseFrameDecoder() {
|
|
|
17651
17760
|
let meta;
|
|
17652
17761
|
try {
|
|
17653
17762
|
meta = JSON.parse(metaStr);
|
|
17654
|
-
} catch (
|
|
17763
|
+
} catch (e59) {
|
|
17655
17764
|
inText = true;
|
|
17656
17765
|
out.push({ type: "turn-start", implicit: true });
|
|
17657
17766
|
if (buffer.length > 0) {
|
|
@@ -17705,7 +17814,7 @@ function createSseFrameDecoder() {
|
|
|
17705
17814
|
debug: meta.debug
|
|
17706
17815
|
});
|
|
17707
17816
|
}
|
|
17708
|
-
} catch (
|
|
17817
|
+
} catch (e60) {
|
|
17709
17818
|
}
|
|
17710
17819
|
}
|
|
17711
17820
|
return out;
|
|
@@ -17737,7 +17846,7 @@ function errorDetailsMessage(details) {
|
|
|
17737
17846
|
let parsed;
|
|
17738
17847
|
try {
|
|
17739
17848
|
parsed = JSON.parse(details);
|
|
17740
|
-
} catch (
|
|
17849
|
+
} catch (e61) {
|
|
17741
17850
|
return details;
|
|
17742
17851
|
}
|
|
17743
17852
|
if (typeof parsed !== "object" || parsed === null) return void 0;
|
|
@@ -17807,9 +17916,9 @@ function appendToTrailingAssistant(prev, segments) {
|
|
|
17807
17916
|
for (const seg of segments) {
|
|
17808
17917
|
const tail = merged[merged.length - 1];
|
|
17809
17918
|
const key = upsertKey(seg);
|
|
17810
|
-
if (seg.type === "text" && _optionalChain([tail, 'optionalAccess',
|
|
17919
|
+
if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _564 => _564.type]) === "text") {
|
|
17811
17920
|
merged[merged.length - 1] = { type: "text", text: tail.text + seg.text };
|
|
17812
|
-
} else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess',
|
|
17921
|
+
} else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _565 => _565.type]) === "thinking") {
|
|
17813
17922
|
merged[merged.length - 1] = { type: "thinking", text: tail.text + seg.text };
|
|
17814
17923
|
} else if (key) {
|
|
17815
17924
|
const idx = merged.findIndex((m) => upsertKey(m) === key);
|
|
@@ -17849,7 +17958,7 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
|
|
|
17849
17958
|
}
|
|
17850
17959
|
if (s.type !== "approval_batch") return s;
|
|
17851
17960
|
const isAnchor = s.data.approvalRequestId === requestId;
|
|
17852
|
-
const hasRow = _optionalChain([s, 'access',
|
|
17961
|
+
const hasRow = _optionalChain([s, 'access', _566 => _566.data, 'access', _567 => _567.toolCalls, 'optionalAccess', _568 => _568.some, 'call', _569 => _569((c) => c.toolExecutionRequestId === requestId)]);
|
|
17853
17962
|
if (!isAnchor && !hasRow) return s;
|
|
17854
17963
|
const nextResolvedBy = _nullishCoalesce(resolvedByName, () => ( s.resolvedByName));
|
|
17855
17964
|
const nextExecutions = hasRow ? {
|
|
@@ -17871,8 +17980,8 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
|
|
|
17871
17980
|
};
|
|
17872
17981
|
}
|
|
17873
17982
|
function nextBatchExecution(prevExec, toolData) {
|
|
17874
|
-
if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess',
|
|
17875
|
-
return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess',
|
|
17983
|
+
if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess', _570 => _570.status]) === "done") return null;
|
|
17984
|
+
return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess', _571 => _571.result]), success: _optionalChain([prevExec, 'optionalAccess', _572 => _572.success]) };
|
|
17876
17985
|
}
|
|
17877
17986
|
function withBatchExecution(seg, execId, state) {
|
|
17878
17987
|
return {
|
|
@@ -17889,11 +17998,11 @@ function projectBatchStatusToMessages(prev, anchorId, status) {
|
|
|
17889
17998
|
}
|
|
17890
17999
|
function projectBatchRowFailureToMessages(prev, rowRequestId) {
|
|
17891
18000
|
return mapSegments(prev, (s) => {
|
|
17892
|
-
if (s.type !== "approval_batch" || !_optionalChain([s, 'access',
|
|
18001
|
+
if (s.type !== "approval_batch" || !_optionalChain([s, 'access', _573 => _573.data, 'access', _574 => _574.toolCalls, 'optionalAccess', _575 => _575.some, 'call', _576 => _576((c) => c.toolExecutionRequestId === rowRequestId)])) {
|
|
17893
18002
|
return s;
|
|
17894
18003
|
}
|
|
17895
|
-
const existing = _optionalChain([s, 'access',
|
|
17896
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
18004
|
+
const existing = _optionalChain([s, 'access', _577 => _577.data, 'access', _578 => _578.executions, 'optionalAccess', _579 => _579[rowRequestId]]);
|
|
18005
|
+
if (_optionalChain([existing, 'optionalAccess', _580 => _580.status]) === "done") return s;
|
|
17897
18006
|
return withBatchExecution(s, rowRequestId, { status: "done", success: false });
|
|
17898
18007
|
});
|
|
17899
18008
|
}
|
|
@@ -17929,7 +18038,7 @@ function mergeToolExecutionIfPresent(prev, segment) {
|
|
|
17929
18038
|
for (let j = message.segments.length - 1; j >= 0; j--) {
|
|
17930
18039
|
const seg = message.segments[j];
|
|
17931
18040
|
if (execId && seg.type === "approval_batch" && seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId)) {
|
|
17932
|
-
const prevExec = _optionalChain([seg, 'access',
|
|
18041
|
+
const prevExec = _optionalChain([seg, 'access', _581 => _581.data, 'access', _582 => _582.executions, 'optionalAccess', _583 => _583[execId]]);
|
|
17933
18042
|
const nextExec = nextBatchExecution(prevExec, toolData);
|
|
17934
18043
|
if (nextExec === null) return prev;
|
|
17935
18044
|
if (sameExecutionState(prevExec, nextExec)) return prev;
|
|
@@ -18102,9 +18211,9 @@ var MessageSegmentAccumulator = class {
|
|
|
18102
18211
|
type: "tool_execution",
|
|
18103
18212
|
data: {
|
|
18104
18213
|
...toolData,
|
|
18105
|
-
toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess',
|
|
18106
|
-
toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess',
|
|
18107
|
-
parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess',
|
|
18214
|
+
toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess', _584 => _584.data, 'access', _585 => _585.toolTitle]))), () => ( _optionalChain([executingTool, 'optionalAccess', _586 => _586.toolTitle]))),
|
|
18215
|
+
toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess', _587 => _587.data, 'access', _588 => _588.toolExplanation]))), () => ( _optionalChain([executingTool, 'optionalAccess', _589 => _589.toolExplanation]))),
|
|
18216
|
+
parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess', _590 => _590.parameters])
|
|
18108
18217
|
}
|
|
18109
18218
|
};
|
|
18110
18219
|
if (existingIndex !== -1) {
|
|
@@ -18128,7 +18237,7 @@ var MessageSegmentAccumulator = class {
|
|
|
18128
18237
|
if (seg.type !== "approval_batch") return seg;
|
|
18129
18238
|
const hasCall = seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId);
|
|
18130
18239
|
if (!hasCall) return seg;
|
|
18131
|
-
const prev = _optionalChain([seg, 'access',
|
|
18240
|
+
const prev = _optionalChain([seg, 'access', _591 => _591.data, 'access', _592 => _592.executions, 'optionalAccess', _593 => _593[execId]]);
|
|
18132
18241
|
const next = nextBatchExecution(prev, toolData);
|
|
18133
18242
|
matched = true;
|
|
18134
18243
|
if (next === null) return seg;
|
|
@@ -18262,8 +18371,8 @@ var MessageSegmentAccumulator = class {
|
|
|
18262
18371
|
requestId,
|
|
18263
18372
|
{
|
|
18264
18373
|
...pendingApproval,
|
|
18265
|
-
command: _optionalChain([pendingApproval, 'optionalAccess',
|
|
18266
|
-
approvalType: _optionalChain([pendingApproval, 'optionalAccess',
|
|
18374
|
+
command: _optionalChain([pendingApproval, 'optionalAccess', _594 => _594.command]) || "",
|
|
18375
|
+
approvalType: _optionalChain([pendingApproval, 'optionalAccess', _595 => _595.approvalType]) || approvalType
|
|
18267
18376
|
},
|
|
18268
18377
|
status
|
|
18269
18378
|
);
|
|
@@ -18288,9 +18397,9 @@ var MessageSegmentAccumulator = class {
|
|
|
18288
18397
|
type: "escalation_offer",
|
|
18289
18398
|
// The resolved chunk carries no text/origin — a redelivered offer must
|
|
18290
18399
|
// not blank the card the PENDING chunk already painted.
|
|
18291
|
-
data: { offerId, text: text || _optionalChain([existing, 'optionalAccess',
|
|
18400
|
+
data: { offerId, text: text || _optionalChain([existing, 'optionalAccess', _596 => _596.data, 'access', _597 => _597.text]) || "", origin: _nullishCoalesce(origin, () => ( _optionalChain([existing, 'optionalAccess', _598 => _598.data, 'access', _599 => _599.origin]))) },
|
|
18292
18401
|
status,
|
|
18293
|
-
resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess',
|
|
18402
|
+
resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _600 => _600.resolvedByName]))),
|
|
18294
18403
|
onApprove: this.callbacks.onEscalationApprove,
|
|
18295
18404
|
onReject: this.callbacks.onEscalationReject
|
|
18296
18405
|
};
|
|
@@ -18615,7 +18724,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
18615
18724
|
let stateCache = null;
|
|
18616
18725
|
function invalidate() {
|
|
18617
18726
|
stateCache = null;
|
|
18618
|
-
_optionalChain([onChange, 'optionalCall',
|
|
18727
|
+
_optionalChain([onChange, 'optionalCall', _601 => _601()]);
|
|
18619
18728
|
}
|
|
18620
18729
|
function getState() {
|
|
18621
18730
|
if (!stateCache) {
|
|
@@ -18631,7 +18740,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
18631
18740
|
return stateCache;
|
|
18632
18741
|
}
|
|
18633
18742
|
function emit(name, ...args) {
|
|
18634
|
-
_optionalChain([onEffect, 'optionalCall',
|
|
18743
|
+
_optionalChain([onEffect, 'optionalCall', _602 => _602({ name, args })]);
|
|
18635
18744
|
}
|
|
18636
18745
|
function setMessagesInternal(next) {
|
|
18637
18746
|
if (next !== messages) {
|
|
@@ -18662,12 +18771,12 @@ function createChatStreamReducer(options = {}) {
|
|
|
18662
18771
|
return [...next.slice(0, -1), { ...last, streamSeq: seq }];
|
|
18663
18772
|
}
|
|
18664
18773
|
function applySegmentsToState(segments, meta) {
|
|
18665
|
-
const seq = _optionalChain([meta, 'optionalAccess',
|
|
18666
|
-
if (_optionalChain([meta, 'optionalAccess',
|
|
18774
|
+
const seq = _optionalChain([meta, 'optionalAccess', _603 => _603.streamSeq]);
|
|
18775
|
+
if (_optionalChain([meta, 'optionalAccess', _604 => _604.append]) && meta.isCompacting) {
|
|
18667
18776
|
setMessagesInternal(stampTrailingAssistantSeq(upsertTrailingCompaction(messages, segments), seq));
|
|
18668
18777
|
return;
|
|
18669
18778
|
}
|
|
18670
|
-
if (_optionalChain([meta, 'optionalAccess',
|
|
18779
|
+
if (_optionalChain([meta, 'optionalAccess', _605 => _605.append])) {
|
|
18671
18780
|
setMessagesInternal(stampTrailingAssistantSeq(appendToTrailingAssistant(messages, segments), seq));
|
|
18672
18781
|
return;
|
|
18673
18782
|
}
|
|
@@ -18679,7 +18788,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
18679
18788
|
adoptTrailingAssistant = false;
|
|
18680
18789
|
const last = messages[messages.length - 1];
|
|
18681
18790
|
if (!last || last.role !== "assistant" || adoptTail) return;
|
|
18682
|
-
const hasContent = (_nullishCoalesce(_optionalChain([last, 'access',
|
|
18791
|
+
const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _606 => _606.segments, 'optionalAccess', _607 => _607.length]), () => ( 0))) > 0 || last.content !== "";
|
|
18683
18792
|
if (!hasContent) return;
|
|
18684
18793
|
setMessagesInternal([...messages, { id: nextId("assistant"), role: "assistant", content: "", segments: [] }]);
|
|
18685
18794
|
}
|
|
@@ -18889,13 +18998,13 @@ function createChatStreamReducer(options = {}) {
|
|
|
18889
18998
|
const summary = required ? getCommandText(required) : `Batch of ${toolCalls.length} tool calls`;
|
|
18890
18999
|
pendingEscalated.set(requestId, {
|
|
18891
19000
|
command: summary,
|
|
18892
|
-
explanation: _optionalChain([required, 'optionalAccess',
|
|
19001
|
+
explanation: _optionalChain([required, 'optionalAccess', _608 => _608.toolExplanation]),
|
|
18893
19002
|
approvalType,
|
|
18894
19003
|
toolCalls
|
|
18895
19004
|
});
|
|
18896
19005
|
emit("onEscalatedApproval", requestId, {
|
|
18897
19006
|
command: summary,
|
|
18898
|
-
explanation: _optionalChain([required, 'optionalAccess',
|
|
19007
|
+
explanation: _optionalChain([required, 'optionalAccess', _609 => _609.toolExplanation]),
|
|
18899
19008
|
approvalType
|
|
18900
19009
|
});
|
|
18901
19010
|
break;
|
|
@@ -19279,7 +19388,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
19279
19388
|
const resolveBatch = (status, confirm) => async () => {
|
|
19280
19389
|
setMessagesInternal(projectBatchStatusToMessages(messages, anchorId, status));
|
|
19281
19390
|
for (const id of ids) {
|
|
19282
|
-
const ok = await _optionalChain([confirm, 'optionalCall',
|
|
19391
|
+
const ok = await _optionalChain([confirm, 'optionalCall', _610 => _610(id)]);
|
|
19283
19392
|
if (ok === false) {
|
|
19284
19393
|
setMessagesInternal(projectBatchRowFailureToMessages(messages, id));
|
|
19285
19394
|
}
|
|
@@ -19415,8 +19524,8 @@ function createChatStreamReducer(options = {}) {
|
|
|
19415
19524
|
}
|
|
19416
19525
|
}
|
|
19417
19526
|
}
|
|
19418
|
-
hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess',
|
|
19419
|
-
if (_optionalChain([extras, 'optionalAccess',
|
|
19527
|
+
hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _611 => _611.resumed]), () => ( messages.length > 0)));
|
|
19528
|
+
if (_optionalChain([extras, 'optionalAccess', _612 => _612.agentBusy])) agentBusyState();
|
|
19420
19529
|
invalidate();
|
|
19421
19530
|
}
|
|
19422
19531
|
return {
|
|
@@ -19501,7 +19610,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
19501
19610
|
},
|
|
19502
19611
|
endSseTurn() {
|
|
19503
19612
|
const last = messages[messages.length - 1];
|
|
19504
|
-
if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access',
|
|
19613
|
+
if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _613 => _613.segments, 'optionalAccess', _614 => _614.length]), () => ( 0))) === 0 && last.content === "") {
|
|
19505
19614
|
messages = messages.slice(0, -1);
|
|
19506
19615
|
}
|
|
19507
19616
|
sseCurrentText = "";
|
|
@@ -19654,10 +19763,10 @@ function createChatDialogStore(options = {}) {
|
|
|
19654
19763
|
if (onEvict) {
|
|
19655
19764
|
const sep = key.indexOf(KEY_SEP);
|
|
19656
19765
|
onEvict(key.slice(0, sep), key.slice(sep + 1), {
|
|
19657
|
-
messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
19658
|
-
approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
19659
|
-
lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
19660
|
-
pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
19766
|
+
messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _615 => _615.state, 'access', _616 => _616.messages]), () => ( EMPTY_STATE.messages)),
|
|
19767
|
+
approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _617 => _617.state, 'access', _618 => _618.approvalStatuses]), () => ( EMPTY_STATE.approvalStatuses)),
|
|
19768
|
+
lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _619 => _619.getLastAppliedSeq, 'call', _620 => _620()]), () => ( Number.NEGATIVE_INFINITY)),
|
|
19769
|
+
pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _621 => _621.getPendingEchoes, 'call', _622 => _622()]), () => ( EMPTY_PENDING_ECHOES))
|
|
19661
19770
|
});
|
|
19662
19771
|
}
|
|
19663
19772
|
}
|
|
@@ -19667,12 +19776,12 @@ function createChatDialogStore(options = {}) {
|
|
|
19667
19776
|
const key = keyOf(dialogId, side);
|
|
19668
19777
|
let reducer = reducers.get(key);
|
|
19669
19778
|
if (!reducer) {
|
|
19670
|
-
const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall',
|
|
19779
|
+
const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _623 => _623(dialogId, side)]), () => ( {}));
|
|
19671
19780
|
const userOnChange = base.onChange;
|
|
19672
19781
|
reducer = createChatStreamReducer({
|
|
19673
19782
|
...base,
|
|
19674
19783
|
onChange: () => {
|
|
19675
|
-
_optionalChain([userOnChange, 'optionalCall',
|
|
19784
|
+
_optionalChain([userOnChange, 'optionalCall', _624 => _624()]);
|
|
19676
19785
|
notify();
|
|
19677
19786
|
}
|
|
19678
19787
|
});
|
|
@@ -19717,7 +19826,7 @@ function createChatDialogStore(options = {}) {
|
|
|
19717
19826
|
};
|
|
19718
19827
|
}
|
|
19719
19828
|
function getSnapshot2(dialogId, side = DEFAULT_DIALOG_SIDE) {
|
|
19720
|
-
return _nullishCoalesce(_optionalChain([reducers, 'access',
|
|
19829
|
+
return _nullishCoalesce(_optionalChain([reducers, 'access', _625 => _625.get, 'call', _626 => _626(keyOf(dialogId, side)), 'optionalAccess', _627 => _627.state]), () => ( EMPTY_STATE));
|
|
19721
19830
|
}
|
|
19722
19831
|
function getServerSnapshot2() {
|
|
19723
19832
|
return EMPTY_STATE;
|
|
@@ -19809,7 +19918,7 @@ function createDeltaBatcher({
|
|
|
19809
19918
|
pending = [];
|
|
19810
19919
|
const key = pendingKey;
|
|
19811
19920
|
for (const delta of batch) applyOne(delta, key);
|
|
19812
|
-
_optionalChain([onFlushed, 'optionalCall',
|
|
19921
|
+
_optionalChain([onFlushed, 'optionalCall', _628 => _628(batch.length)]);
|
|
19813
19922
|
}
|
|
19814
19923
|
function schedule() {
|
|
19815
19924
|
if (raf !== null || timer !== null) return;
|
|
@@ -19833,7 +19942,7 @@ function createDeltaBatcher({
|
|
|
19833
19942
|
}
|
|
19834
19943
|
if (!isDeltaEvent(event)) return false;
|
|
19835
19944
|
const tail = pending[pending.length - 1];
|
|
19836
|
-
const seqAdvances = _optionalChain([tail, 'optionalAccess',
|
|
19945
|
+
const seqAdvances = _optionalChain([tail, 'optionalAccess', _629 => _629.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
|
|
19837
19946
|
if (tail && seqAdvances && tail.type === event.type && (tail.type !== "text-delta" || tail.leading === event.leading)) {
|
|
19838
19947
|
pending[pending.length - 1] = {
|
|
19839
19948
|
...tail,
|
|
@@ -19864,7 +19973,7 @@ function useChatStreamReducer({
|
|
|
19864
19973
|
side = DEFAULT_DIALOG_SIDE,
|
|
19865
19974
|
createReducerOptions
|
|
19866
19975
|
}) {
|
|
19867
|
-
const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall',
|
|
19976
|
+
const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _630 => _630()]), () => ( {})));
|
|
19868
19977
|
const getSnapshot2 = _react.useCallback.call(void 0, () => store.getSnapshot(dialogId, side), [store, dialogId, side]);
|
|
19869
19978
|
const getServerSnapshot2 = _react.useCallback.call(void 0, () => store.getServerSnapshot(), [store]);
|
|
19870
19979
|
const subscribe2 = _react.useCallback.call(void 0, (listener) => store.subscribe(listener), [store]);
|
|
@@ -19903,7 +20012,7 @@ var STORAGE_KEY = "conversation";
|
|
|
19903
20012
|
var namespaceFor = (source) => {
|
|
19904
20013
|
const base = `mingo-chat-${source}`;
|
|
19905
20014
|
const auth = _chunkCP6TIRONcjs.getEmbedProxyAuth.call(void 0, );
|
|
19906
|
-
return _optionalChain([auth, 'optionalAccess',
|
|
20015
|
+
return _optionalChain([auth, 'optionalAccess', _631 => _631.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
|
|
19907
20016
|
};
|
|
19908
20017
|
function createChatConversationStorage(source) {
|
|
19909
20018
|
return _chunkCP6TIRONcjs.createLocalStorageAdapter.call(void 0, {
|
|
@@ -19931,7 +20040,7 @@ function pruneStaleChatConversationStorage(source) {
|
|
|
19931
20040
|
for (const k of toRemove) {
|
|
19932
20041
|
window.localStorage.removeItem(k);
|
|
19933
20042
|
}
|
|
19934
|
-
} catch (
|
|
20043
|
+
} catch (e62) {
|
|
19935
20044
|
}
|
|
19936
20045
|
}
|
|
19937
20046
|
|
|
@@ -19967,7 +20076,7 @@ function formatSingularLookupInvocation(cmdId, value) {
|
|
|
19967
20076
|
return safe ? `/${cmdId} "${safe}"` : `/${cmdId}`;
|
|
19968
20077
|
}
|
|
19969
20078
|
function extractEntityIdFilter(override, expectedTableId) {
|
|
19970
|
-
const f = _optionalChain([override, 'optionalAccess',
|
|
20079
|
+
const f = _optionalChain([override, 'optionalAccess', _632 => _632.entityIdFilter]);
|
|
19971
20080
|
if (!f) return null;
|
|
19972
20081
|
const tableId = typeof f.tableId === "string" ? f.tableId : "";
|
|
19973
20082
|
const id = typeof f.id === "string" ? f.id : "";
|
|
@@ -20006,7 +20115,7 @@ var AUTO_CONTINUATION_DIRECTIVE_PREFIX = "[internal-auto-continuation]";
|
|
|
20006
20115
|
function buildAutoContinuationDirective(toolName, opts = {}) {
|
|
20007
20116
|
const ticketRef = opts.ticketId ? ` (ticket #${opts.ticketId})` : "";
|
|
20008
20117
|
const ticketHash = opts.ticketId ? ` #${opts.ticketId}` : "";
|
|
20009
|
-
const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access',
|
|
20118
|
+
const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access', _633 => _633.status, 'optionalAccess', _634 => _634.toUpperCase, 'call', _635 => _635()]) === "CLOSED";
|
|
20010
20119
|
if (toolName === "create_ticket") {
|
|
20011
20120
|
return `${AUTO_CONTINUATION_DIRECTIVE_PREFIX} The user just approved create_ticket${ticketRef}. Per ticket-protocol \xA71a, ask 2-4 SHORT, issue-specific diagnostic follow-up questions tailored to the symptom they reported in their original message. When they answer, propose an update_ticket with content_addendum carrying a clean Q&A digest. Do NOT call any tool in this turn \u2014 just write the questions as prose.`;
|
|
20012
20121
|
}
|
|
@@ -20078,7 +20187,7 @@ function useChatHistoryHydration({
|
|
|
20078
20187
|
sendCountRef.current = userTurns;
|
|
20079
20188
|
hydrateMessages(hydrated, Array.from(sourcesSeed.entries()));
|
|
20080
20189
|
bumpMetaTick();
|
|
20081
|
-
} catch (
|
|
20190
|
+
} catch (e63) {
|
|
20082
20191
|
} finally {
|
|
20083
20192
|
if (!cancelled) setIsHydratingHistory(false);
|
|
20084
20193
|
}
|
|
@@ -20129,7 +20238,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20129
20238
|
const { active = true } = runtimeOptions;
|
|
20130
20239
|
const runtime = _chunkRDTOMWDNcjs.useRequiredChatRuntime.call(void 0, );
|
|
20131
20240
|
const source = runtime.source || DEFAULT_CHAT_SOURCE;
|
|
20132
|
-
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
20241
|
+
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _636 => _636.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
|
|
20133
20242
|
const sendMessageRef = _react.useRef.call(void 0,
|
|
20134
20243
|
() => Promise.resolve(true)
|
|
20135
20244
|
);
|
|
@@ -20166,7 +20275,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20166
20275
|
if (!restoredConversationRef.current) {
|
|
20167
20276
|
restoredConversationRef.current = true;
|
|
20168
20277
|
pruneStaleChatConversationStorage(source);
|
|
20169
|
-
conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access',
|
|
20278
|
+
conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _637 => _637.load, 'call', _638 => _638(), 'optionalAccess', _639 => _639.conversationId]), () => ( null));
|
|
20170
20279
|
}
|
|
20171
20280
|
const commandsUrl = runtime.endpoints.commandsUrl;
|
|
20172
20281
|
const { commands: slashCommands } = useSlashCommandRegistry(commandsUrl, {
|
|
@@ -20271,7 +20380,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20271
20380
|
const serverMessage = await readServerErrorMessage(response);
|
|
20272
20381
|
throw new Error(_nullishCoalesce(serverMessage, () => ( `Chat request failed: ${response.status}`)));
|
|
20273
20382
|
}
|
|
20274
|
-
const reader = _optionalChain([response, 'access',
|
|
20383
|
+
const reader = _optionalChain([response, 'access', _640 => _640.body, 'optionalAccess', _641 => _641.getReader, 'call', _642 => _642()]);
|
|
20275
20384
|
if (!reader) throw new Error("No response body");
|
|
20276
20385
|
const frameDecoder = createSseFrameDecoder();
|
|
20277
20386
|
let finished = false;
|
|
@@ -20294,7 +20403,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20294
20403
|
}
|
|
20295
20404
|
return true;
|
|
20296
20405
|
} catch (err) {
|
|
20297
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
20406
|
+
if (_optionalChain([err, 'optionalAccess', _643 => _643.name]) === "AbortError" || ctrl.signal.aborted) {
|
|
20298
20407
|
return true;
|
|
20299
20408
|
}
|
|
20300
20409
|
flushDeltas();
|
|
@@ -20314,7 +20423,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20314
20423
|
);
|
|
20315
20424
|
sendMessageRef.current = sendMessage;
|
|
20316
20425
|
const stopMessage = _react.useCallback.call(void 0, () => {
|
|
20317
|
-
_optionalChain([abortControllerRef, 'access',
|
|
20426
|
+
_optionalChain([abortControllerRef, 'access', _644 => _644.current, 'optionalAccess', _645 => _645.abort, 'call', _646 => _646()]);
|
|
20318
20427
|
flushDeltas();
|
|
20319
20428
|
mutate((r) => r.setPhase("idle"));
|
|
20320
20429
|
}, [mutate, flushDeltas]);
|
|
@@ -20330,7 +20439,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20330
20439
|
let sendIdx = -1;
|
|
20331
20440
|
return state.messages.map((m) => {
|
|
20332
20441
|
const segments = m.segments;
|
|
20333
|
-
const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess',
|
|
20442
|
+
const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _647 => _647.filter, 'call', _648 => _648((s) => s.type === "text"), 'access', _649 => _649.map, 'call', _650 => _650((s) => s.text), 'access', _651 => _651.join, 'call', _652 => _652("")]), () => ( ""));
|
|
20334
20443
|
let sources;
|
|
20335
20444
|
let scrollAnchor;
|
|
20336
20445
|
if (m.role === "user" && !m.hidden) {
|
|
@@ -20339,7 +20448,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20339
20448
|
if (m.role === "assistant") {
|
|
20340
20449
|
const lookupIdx = sendIdx >= 0 ? sendIdx : 0;
|
|
20341
20450
|
sources = sourcesMap.get(lookupIdx);
|
|
20342
|
-
scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access',
|
|
20451
|
+
scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _653 => _653.get, 'call', _654 => _654(lookupIdx), 'optionalAccess', _655 => _655.scrollAnchor]), () => ( void 0));
|
|
20343
20452
|
}
|
|
20344
20453
|
return {
|
|
20345
20454
|
id: m.id,
|
|
@@ -20366,7 +20475,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20366
20475
|
);
|
|
20367
20476
|
return;
|
|
20368
20477
|
}
|
|
20369
|
-
const refSlug = typeof _optionalChain([reference, 'access',
|
|
20478
|
+
const refSlug = typeof _optionalChain([reference, 'access', _656 => _656.metadata, 'optionalAccess', _657 => _657.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
|
|
20370
20479
|
const queryValue = refSlug || sanitizeTitleForChat(reference.title) || reference.id;
|
|
20371
20480
|
const escaped = queryValue.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
20372
20481
|
const text = `/${cmdId} display "${escaped}"`;
|
|
@@ -20412,18 +20521,18 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
20412
20521
|
/** True while the mount-time rebuild from the server transcript runs. */
|
|
20413
20522
|
isHydratingHistory,
|
|
20414
20523
|
/** Provider key for the lib's `<ModelDisplay>` icon. */
|
|
20415
|
-
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
20416
|
-
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
20417
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
20524
|
+
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _658 => _658.provider]), () => ( null)),
|
|
20525
|
+
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _659 => _659.modelLabel]), () => ( null)),
|
|
20526
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _660 => _660.contextWindowMaxTokens]), () => ( null)),
|
|
20418
20527
|
/** Input tokens (known after server's message_start frame; null until). */
|
|
20419
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
20528
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _661 => _661.inputTokens]), () => ( null)),
|
|
20420
20529
|
/** Output tokens (known only after server's trailing usage frame). */
|
|
20421
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
20530
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _662 => _662.outputTokens]), () => ( null)),
|
|
20422
20531
|
/** Cache hit % (read / total-input × 100). null during streaming. */
|
|
20423
|
-
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
20532
|
+
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _663 => _663.cacheHitRatePct]), () => ( null)),
|
|
20424
20533
|
/** Cross-call usage breakdown (Haiku rewriter/classifier/summarizer
|
|
20425
20534
|
* token counts). null until the trailing usage frame lands. */
|
|
20426
|
-
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
20535
|
+
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _664 => _664.breakdown]), () => ( null)),
|
|
20427
20536
|
// ─── Dialog management — stubs for v1 ────────────────────────────────
|
|
20428
20537
|
// Guide mode keeps ONE server-side conversation per stored id
|
|
20429
20538
|
// (`chat_conversations`, hydrated on mount). Surfacing multiple threads
|
|
@@ -20668,7 +20777,7 @@ function decodeNatsChunk(chunk) {
|
|
|
20668
20777
|
userId: typeof data.userId === "string" ? data.userId : void 0,
|
|
20669
20778
|
// Wire shape carries no label; fall back to the id (parity with
|
|
20670
20779
|
// the history path in `process-historical-messages.ts`).
|
|
20671
|
-
contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess',
|
|
20780
|
+
contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _665 => _665.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _666 => _666.id]) === "string").map((it) => ({
|
|
20672
20781
|
type: it.type,
|
|
20673
20782
|
id: it.id,
|
|
20674
20783
|
label: it.id
|
|
@@ -20759,7 +20868,7 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
20759
20868
|
}
|
|
20760
20869
|
break;
|
|
20761
20870
|
case "approval_batch": {
|
|
20762
|
-
const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access',
|
|
20871
|
+
const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _667 => _667.data, 'access', _668 => _668.executions, 'optionalAccess', _669 => _669[c.toolExecutionRequestId], 'optionalAccess', _670 => _670.status]) === "done");
|
|
20763
20872
|
if (segment.status !== "rejected" && !allDone) {
|
|
20764
20873
|
hasIncompleteState = true;
|
|
20765
20874
|
}
|
|
@@ -20821,11 +20930,11 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
20821
20930
|
function extractIncompleteTailState(messages) {
|
|
20822
20931
|
if (!messages || messages.length === 0) return void 0;
|
|
20823
20932
|
let start = messages.length;
|
|
20824
|
-
while (start > 0 && _optionalChain([messages, 'access',
|
|
20933
|
+
while (start > 0 && _optionalChain([messages, 'access', _671 => _671[start - 1], 'optionalAccess', _672 => _672.role]) === "assistant") start -= 1;
|
|
20825
20934
|
if (start === messages.length) return void 0;
|
|
20826
20935
|
const segments = [];
|
|
20827
20936
|
for (let i = start; i < messages.length; i += 1) {
|
|
20828
|
-
const content = _optionalChain([messages, 'access',
|
|
20937
|
+
const content = _optionalChain([messages, 'access', _673 => _673[i], 'optionalAccess', _674 => _674.content]);
|
|
20829
20938
|
if (Array.isArray(content)) segments.push(...content);
|
|
20830
20939
|
}
|
|
20831
20940
|
if (segments.length === 0) return void 0;
|
|
@@ -20838,15 +20947,15 @@ function extractIncompleteTailState(messages) {
|
|
|
20838
20947
|
|
|
20839
20948
|
// src/components/chat/utils/process-historical-messages.ts
|
|
20840
20949
|
function getOwnerDisplayName(owner) {
|
|
20841
|
-
if (_optionalChain([owner, 'optionalAccess',
|
|
20950
|
+
if (_optionalChain([owner, 'optionalAccess', _675 => _675.type]) === OWNER_TYPE.ADMIN && owner.user) {
|
|
20842
20951
|
const { firstName, lastName } = owner.user;
|
|
20843
20952
|
const name = [firstName, lastName].filter(Boolean).join(" ");
|
|
20844
20953
|
if (name) return name;
|
|
20845
20954
|
}
|
|
20846
|
-
return _optionalChain([owner, 'optionalAccess',
|
|
20955
|
+
return _optionalChain([owner, 'optionalAccess', _676 => _676.type]) === OWNER_TYPE.ADMIN ? "Admin" : "You";
|
|
20847
20956
|
}
|
|
20848
20957
|
function getOwnerAvatar(owner) {
|
|
20849
|
-
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess',
|
|
20958
|
+
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _677 => _677.user, 'optionalAccess', _678 => _678.image, 'optionalAccess', _679 => _679.imageUrl]), () => ( void 0));
|
|
20850
20959
|
}
|
|
20851
20960
|
function pushStandaloneMessages(processedMessages, msg, messageDataArray) {
|
|
20852
20961
|
messageDataArray.forEach((data) => {
|
|
@@ -21030,7 +21139,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21030
21139
|
event.offerId,
|
|
21031
21140
|
event.text,
|
|
21032
21141
|
event.origin,
|
|
21033
|
-
_nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess',
|
|
21142
|
+
_nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _680 => _680[event.offerId]]), () => ( "pending"))
|
|
21034
21143
|
);
|
|
21035
21144
|
break;
|
|
21036
21145
|
case "ticket-escalated":
|
|
@@ -21060,7 +21169,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21060
21169
|
);
|
|
21061
21170
|
break;
|
|
21062
21171
|
case "escalation-offer-resolved":
|
|
21063
|
-
_optionalChain([offerResolutions, 'optionalAccess',
|
|
21172
|
+
_optionalChain([offerResolutions, 'optionalAccess', _681 => _681.set, 'call', _682 => _682(event.offerId, {
|
|
21064
21173
|
status: event.status,
|
|
21065
21174
|
resolvedByName: event.resolvedByName
|
|
21066
21175
|
})]);
|
|
@@ -21124,7 +21233,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21124
21233
|
}
|
|
21125
21234
|
}
|
|
21126
21235
|
} else {
|
|
21127
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
21236
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _683 => _683.set, 'call', _684 => _684(event.requestId, {
|
|
21128
21237
|
command: event.command || "",
|
|
21129
21238
|
explanation: event.explanation,
|
|
21130
21239
|
approvalType,
|
|
@@ -21139,8 +21248,8 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21139
21248
|
const existingStatus = approvalStatuses[requestId];
|
|
21140
21249
|
const status = existingStatus || event.status;
|
|
21141
21250
|
const resolvedByName = event.resolvedByName;
|
|
21142
|
-
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess',
|
|
21143
|
-
if (_optionalChain([escalatedData, 'optionalAccess',
|
|
21251
|
+
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _685 => _685.get, 'call', _686 => _686(requestId)]);
|
|
21252
|
+
if (_optionalChain([escalatedData, 'optionalAccess', _687 => _687.toolCalls]) && escalatedData.toolCalls.length > 0) {
|
|
21144
21253
|
if (batchApprovalsEnabled) {
|
|
21145
21254
|
accumulator.addApprovalBatch(
|
|
21146
21255
|
requestId,
|
|
@@ -21162,7 +21271,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21162
21271
|
);
|
|
21163
21272
|
}
|
|
21164
21273
|
}
|
|
21165
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
21274
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _688 => _688.delete, 'call', _689 => _689(requestId)]);
|
|
21166
21275
|
break;
|
|
21167
21276
|
}
|
|
21168
21277
|
if (escalatedData) {
|
|
@@ -21171,7 +21280,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
21171
21280
|
explanation: escalatedData.explanation,
|
|
21172
21281
|
approvalType: escalatedData.approvalType
|
|
21173
21282
|
});
|
|
21174
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
21283
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _690 => _690.delete, 'call', _691 => _691(requestId)]);
|
|
21175
21284
|
}
|
|
21176
21285
|
const before = accumulator.getSegments();
|
|
21177
21286
|
const after = accumulator.updateApprovalStatus(requestId, status, resolvedByName);
|
|
@@ -21260,14 +21369,14 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
21260
21369
|
pushStandaloneMessages(processedMessages, msg, messageDataArray);
|
|
21261
21370
|
return;
|
|
21262
21371
|
}
|
|
21263
|
-
const isUserMessage = _optionalChain([msg, 'access',
|
|
21372
|
+
const isUserMessage = _optionalChain([msg, 'access', _692 => _692.owner, 'optionalAccess', _693 => _693.type]) === OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _694 => _694.owner, 'optionalAccess', _695 => _695.type]) === OWNER_TYPE.ADMIN;
|
|
21264
21373
|
if (isUserMessage) {
|
|
21265
21374
|
flushAssistantMessage();
|
|
21266
|
-
const userAuthorType = _optionalChain([msg, 'access',
|
|
21375
|
+
const userAuthorType = _optionalChain([msg, 'access', _696 => _696.owner, 'optionalAccess', _697 => _697.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
|
|
21267
21376
|
messageDataArray.forEach((data) => {
|
|
21268
21377
|
if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
|
|
21269
21378
|
const rawContext = data.contextItems;
|
|
21270
|
-
const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess',
|
|
21379
|
+
const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _698 => _698.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _699 => _699.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
|
|
21271
21380
|
processedMessages.push({
|
|
21272
21381
|
id: msg.id,
|
|
21273
21382
|
role: "user",
|
|
@@ -21305,7 +21414,7 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
21305
21414
|
});
|
|
21306
21415
|
const nextMsg = messages[index + 1];
|
|
21307
21416
|
const isLastMessage = index === messages.length - 1;
|
|
21308
|
-
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access',
|
|
21417
|
+
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _700 => _700.owner, 'optionalAccess', _701 => _701.type]) === OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _702 => _702.owner, 'optionalAccess', _703 => _703.type]) === OWNER_TYPE.ADMIN);
|
|
21309
21418
|
if (isLastMessage || nextIsFromUser) {
|
|
21310
21419
|
flushAssistantMessage();
|
|
21311
21420
|
}
|
|
@@ -21703,7 +21812,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
21703
21812
|
}, [active, fetchDialogs, loadDialogsPage]);
|
|
21704
21813
|
const sendMessage = _react.useCallback.call(void 0,
|
|
21705
21814
|
async (text, sendOptions) => {
|
|
21706
|
-
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess',
|
|
21815
|
+
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _704 => _704.hidden]), () => ( false));
|
|
21707
21816
|
mutate((r) => r.pushOptimisticSend(text, hidden));
|
|
21708
21817
|
await publishUserMessage(text, { hidden, dialogId });
|
|
21709
21818
|
},
|
|
@@ -21849,11 +21958,11 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
21849
21958
|
// Tokens: live `token_usage` frame / dialog snapshot (`dialogTokenUsage`).
|
|
21850
21959
|
// contextWindow uses the dialog's `contextSize` (the "X / Y" denominator,
|
|
21851
21960
|
// matching the /mingo page). cacheHitRate/breakdown are SSE-only → null.
|
|
21852
|
-
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
21853
|
-
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
21854
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
21855
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
21856
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
21961
|
+
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _705 => _705.provider]), () => ( modelProvider)), () => ( null)),
|
|
21962
|
+
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _706 => _706.modelLabel]), () => ( modelLabel)), () => ( null)),
|
|
21963
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _707 => _707.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _708 => _708.contextWindowMaxTokens]))), () => ( null)),
|
|
21964
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _709 => _709.inputTokensSize]), () => ( null)),
|
|
21965
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _710 => _710.outputTokensSize]), () => ( null)),
|
|
21857
21966
|
currentCacheHitRatePct: null,
|
|
21858
21967
|
currentUsageBreakdown: null,
|
|
21859
21968
|
// Dialog management
|
|
@@ -21954,7 +22063,7 @@ function useUnifiedChat(options) {
|
|
|
21954
22063
|
[]
|
|
21955
22064
|
);
|
|
21956
22065
|
const displayRefForward = _react.useCallback.call(void 0,
|
|
21957
|
-
(ref) => _optionalChain([activeStateRef, 'access',
|
|
22066
|
+
(ref) => _optionalChain([activeStateRef, 'access', _711 => _711.current, 'access', _712 => _712.displayRef, 'optionalCall', _713 => _713(ref)]),
|
|
21958
22067
|
[]
|
|
21959
22068
|
);
|
|
21960
22069
|
const displayRef = activeState.displayRef ? displayRefForward : void 0;
|
|
@@ -21964,7 +22073,7 @@ function useUnifiedChat(options) {
|
|
|
21964
22073
|
const renameDialog = _react.useCallback.call(void 0, (id, title) => activeStateRef.current.renameDialog(id, title), []);
|
|
21965
22074
|
const archiveDialog = _react.useCallback.call(void 0, (id) => activeStateRef.current.archiveDialog(id), []);
|
|
21966
22075
|
const loadMoreDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreDialogs(), []);
|
|
21967
|
-
const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access',
|
|
22076
|
+
const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _714 => _714.current, 'access', _715 => _715.setDialogScope, 'optionalCall', _716 => _716(scope)]), []);
|
|
21968
22077
|
const reloadDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.reloadDialogs(), []);
|
|
21969
22078
|
const loadMoreMessages = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreMessages(), []);
|
|
21970
22079
|
const approveRequest = _react.useCallback.call(void 0, (requestId) => activeStateRef.current.approveRequest(requestId), []);
|
|
@@ -22057,19 +22166,19 @@ function turnRequestKeys(content) {
|
|
|
22057
22166
|
if (!Array.isArray(content)) return keys;
|
|
22058
22167
|
for (const seg of content) {
|
|
22059
22168
|
if (seg.type === "tool_execution") {
|
|
22060
|
-
const id = _optionalChain([seg, 'access',
|
|
22169
|
+
const id = _optionalChain([seg, 'access', _717 => _717.data, 'optionalAccess', _718 => _718.toolExecutionRequestId]);
|
|
22061
22170
|
if (id) keys.add(id);
|
|
22062
22171
|
} else if (seg.type === "approval_request") {
|
|
22063
|
-
const id = _optionalChain([seg, 'access',
|
|
22172
|
+
const id = _optionalChain([seg, 'access', _719 => _719.data, 'optionalAccess', _720 => _720.requestId]);
|
|
22064
22173
|
if (id) keys.add(id);
|
|
22065
22174
|
} else if (seg.type === "escalation_offer") {
|
|
22066
|
-
const id = _optionalChain([seg, 'access',
|
|
22175
|
+
const id = _optionalChain([seg, 'access', _721 => _721.data, 'optionalAccess', _722 => _722.offerId]);
|
|
22067
22176
|
if (id) keys.add(id);
|
|
22068
22177
|
} else if (seg.type === "approval_batch") {
|
|
22069
22178
|
const data = seg.data;
|
|
22070
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
22071
|
-
for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
22072
|
-
if (_optionalChain([call, 'optionalAccess',
|
|
22179
|
+
if (_optionalChain([data, 'optionalAccess', _723 => _723.approvalRequestId])) keys.add(data.approvalRequestId);
|
|
22180
|
+
for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess', _724 => _724.toolCalls]), () => ( []))) {
|
|
22181
|
+
if (_optionalChain([call, 'optionalAccess', _725 => _725.toolExecutionRequestId])) keys.add(call.toolExecutionRequestId);
|
|
22073
22182
|
}
|
|
22074
22183
|
}
|
|
22075
22184
|
}
|
|
@@ -22121,18 +22230,18 @@ function mergeHistoryWithRealtime(input) {
|
|
|
22121
22230
|
}
|
|
22122
22231
|
}
|
|
22123
22232
|
const trailing = processedHistory[processedHistory.length - 1];
|
|
22124
|
-
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess',
|
|
22125
|
-
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access',
|
|
22233
|
+
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess', _726 => _726.role]) === "assistant" ? trailing : null;
|
|
22234
|
+
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access', _727 => _727.content, 'access', _728 => _728.find, 'call', _729 => _729((s) => s.type === "approval_batch"), 'optionalAccess', _730 => _730.data, 'optionalAccess', _731 => _731.approvalRequestId]), () => ( null)) : null;
|
|
22126
22235
|
let processedToUse = processedHistory;
|
|
22127
22236
|
const pinnedSyntheticIds = /* @__PURE__ */ new Set();
|
|
22128
22237
|
const droppedSyntheticIds = /* @__PURE__ */ new Set();
|
|
22129
22238
|
if (historyBatchId) {
|
|
22130
22239
|
const batchTwins = existingMessages.filter(
|
|
22131
|
-
(m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access',
|
|
22240
|
+
(m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access', _732 => _732.data, 'optionalAccess', _733 => _733.approvalRequestId]) === historyBatchId)
|
|
22132
22241
|
);
|
|
22133
22242
|
const existingWithSameBatch = _nullishCoalesce(batchTwins.find((m) => m.id === streamingMessageId), () => ( batchTwins[batchTwins.length - 1]));
|
|
22134
22243
|
if (existingWithSameBatch && Array.isArray(existingWithSameBatch.content)) {
|
|
22135
|
-
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess',
|
|
22244
|
+
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess', _734 => _734.content])) ? historyTrailingAssistant.content.length : 0;
|
|
22136
22245
|
const realtimeSize = existingWithSameBatch.content.length;
|
|
22137
22246
|
if (existingWithSameBatch.id === streamingMessageId || realtimeSize > histSize) {
|
|
22138
22247
|
processedToUse = processedHistory.slice(0, -1);
|
|
@@ -22174,9 +22283,9 @@ function mergeHistoryWithRealtime(input) {
|
|
|
22174
22283
|
if (pinnedSyntheticIds.has(m.id)) return true;
|
|
22175
22284
|
if (droppedSyntheticIds.has(m.id)) return false;
|
|
22176
22285
|
if (processedIds.has(m.id)) return false;
|
|
22177
|
-
if (_optionalChain([rawHistoryIds, 'optionalAccess',
|
|
22286
|
+
if (_optionalChain([rawHistoryIds, 'optionalAccess', _735 => _735.has, 'call', _736 => _736(m.id)])) return false;
|
|
22178
22287
|
if (m.role === "user" && m.id.startsWith("optimistic-") && typeof m.content === "string") {
|
|
22179
|
-
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access',
|
|
22288
|
+
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _737 => _737.timestamp, 'optionalAccess', _738 => _738.getTime, 'call', _739 => _739()]), () => ( 0))) <= historyFetchedAt;
|
|
22180
22289
|
return !(canBeInSnapshot && processedToUse.some((pm) => pm.role === "user" && pm.content === m.content));
|
|
22181
22290
|
}
|
|
22182
22291
|
if (isSyntheticRealtimeId(m.id) && m.id !== streamingMessageId) {
|
|
@@ -22200,7 +22309,7 @@ function mergeHistoryWithRealtime(input) {
|
|
|
22200
22309
|
} else if (typeof m.streamSeq === "number") {
|
|
22201
22310
|
covered = historyMaxStreamSeq > 0 && historyMaxStreamSeq >= m.streamSeq;
|
|
22202
22311
|
} else {
|
|
22203
|
-
covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access',
|
|
22312
|
+
covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _740 => _740.timestamp, 'optionalAccess', _741 => _741.getTime, 'call', _742 => _742()]), () => ( 0))) <= historyFetchedAt;
|
|
22204
22313
|
}
|
|
22205
22314
|
if (covered) return false;
|
|
22206
22315
|
}
|
|
@@ -22270,7 +22379,7 @@ function normalizeHistoricalMessageData(md) {
|
|
|
22270
22379
|
function isHistoricalUserTurn(m) {
|
|
22271
22380
|
return !!m.owner;
|
|
22272
22381
|
}
|
|
22273
|
-
var isTextSegment = (d) => _optionalChain([d, 'optionalAccess',
|
|
22382
|
+
var isTextSegment = (d) => _optionalChain([d, 'optionalAccess', _743 => _743.type]) === "TEXT" && typeof d.text === "string";
|
|
22274
22383
|
var THINK_MS = 550;
|
|
22275
22384
|
var TOKEN_MS = 55;
|
|
22276
22385
|
var USER_MS = 480;
|
|
@@ -22455,7 +22564,7 @@ function useResizableSize({ enabled, isHorizontal, minSize, maxSize, defaultSize
|
|
|
22455
22564
|
const parsed = parseFloat(raw);
|
|
22456
22565
|
if (!Number.isFinite(parsed)) return clampToViewport(defaultSize);
|
|
22457
22566
|
return clampToViewport(parsed);
|
|
22458
|
-
} catch (
|
|
22567
|
+
} catch (e64) {
|
|
22459
22568
|
return clampToViewport(defaultSize);
|
|
22460
22569
|
}
|
|
22461
22570
|
}, [enabled, storageKey, defaultSize, clampToViewport]);
|
|
@@ -22465,7 +22574,7 @@ function useResizableSize({ enabled, isHorizontal, minSize, maxSize, defaultSize
|
|
|
22465
22574
|
if (!enabled || !storageKey || typeof window === "undefined") return;
|
|
22466
22575
|
try {
|
|
22467
22576
|
window.localStorage.setItem(storageKey, String(Math.round(size2)));
|
|
22468
|
-
} catch (
|
|
22577
|
+
} catch (e65) {
|
|
22469
22578
|
}
|
|
22470
22579
|
}, [enabled, size2, storageKey]);
|
|
22471
22580
|
_react.useEffect.call(void 0, () => {
|
|
@@ -22499,7 +22608,7 @@ function DrawerResizeHandle({ side, size: size2, minSize, maxSize, onSize, ariaL
|
|
|
22499
22608
|
startRef.current = null;
|
|
22500
22609
|
try {
|
|
22501
22610
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
22502
|
-
} catch (
|
|
22611
|
+
} catch (e66) {
|
|
22503
22612
|
}
|
|
22504
22613
|
document.body.style.cursor = "";
|
|
22505
22614
|
document.body.style.userSelect = "";
|
|
@@ -22894,7 +23003,7 @@ function useChatDialogManager({
|
|
|
22894
23003
|
const handleConfirmRestore = _react.useCallback.call(void 0, async () => {
|
|
22895
23004
|
if (restoreTarget) {
|
|
22896
23005
|
try {
|
|
22897
|
-
await _optionalChain([unarchiveDialog, 'optionalCall',
|
|
23006
|
+
await _optionalChain([unarchiveDialog, 'optionalCall', _744 => _744(restoreTarget.id)]);
|
|
22898
23007
|
} catch (err) {
|
|
22899
23008
|
console.error("[useChatDialogManager] unarchive failed:", err);
|
|
22900
23009
|
return;
|
|
@@ -23374,7 +23483,7 @@ function EmbeddableChatInner({
|
|
|
23374
23483
|
}),
|
|
23375
23484
|
[commandsUrl]
|
|
23376
23485
|
);
|
|
23377
|
-
const headerUserName = _optionalChain([identityUser, 'optionalAccess',
|
|
23486
|
+
const headerUserName = _optionalChain([identityUser, 'optionalAccess', _745 => _745.name, 'optionalAccess', _746 => _746.trim, 'call', _747 => _747()]) || [_optionalChain([identityUser, 'optionalAccess', _748 => _748.firstName]), _optionalChain([identityUser, 'optionalAccess', _749 => _749.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([userDisplayName, 'optionalAccess', _750 => _750.trim, 'call', _751 => _751()]) || void 0;
|
|
23378
23487
|
const effectiveModes = _react.useMemo.call(void 0, () => {
|
|
23379
23488
|
if (modes) return modes;
|
|
23380
23489
|
const guideOptions = tableIdForDocumentType ? { tableIdForDocumentType } : {};
|
|
@@ -23383,20 +23492,20 @@ function EmbeddableChatInner({
|
|
|
23383
23492
|
const mingoCaps = _react.useMemo.call(void 0, () => {
|
|
23384
23493
|
if (mingoState) {
|
|
23385
23494
|
return {
|
|
23386
|
-
canRename: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
23387
|
-
canArchive: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
23388
|
-
fetchArchivedDialogs: _optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
23389
|
-
unarchiveDialog: _optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
23390
|
-
searchQuery: _optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
23391
|
-
onSearchChange: _optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
23392
|
-
onCopyLink: _optionalChain([mingoDialogCapabilities, 'optionalAccess',
|
|
23495
|
+
canRename: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess', _752 => _752.canRename]), () => ( false)),
|
|
23496
|
+
canArchive: _nullishCoalesce(_optionalChain([mingoDialogCapabilities, 'optionalAccess', _753 => _753.canArchive]), () => ( false)),
|
|
23497
|
+
fetchArchivedDialogs: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _754 => _754.fetchArchivedDialogs]),
|
|
23498
|
+
unarchiveDialog: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _755 => _755.unarchiveDialog]),
|
|
23499
|
+
searchQuery: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _756 => _756.searchQuery]),
|
|
23500
|
+
onSearchChange: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _757 => _757.onSearchChange]),
|
|
23501
|
+
onCopyLink: _optionalChain([mingoDialogCapabilities, 'optionalAccess', _758 => _758.onCopyLink])
|
|
23393
23502
|
};
|
|
23394
23503
|
}
|
|
23395
23504
|
return {
|
|
23396
|
-
canRename: !!_optionalChain([effectiveModes, 'access',
|
|
23397
|
-
canArchive: !!_optionalChain([effectiveModes, 'access',
|
|
23398
|
-
fetchArchivedDialogs: _optionalChain([effectiveModes, 'access',
|
|
23399
|
-
unarchiveDialog: _optionalChain([effectiveModes, 'access',
|
|
23505
|
+
canRename: !!_optionalChain([effectiveModes, 'access', _759 => _759.mingo, 'optionalAccess', _760 => _760.renameDialog]),
|
|
23506
|
+
canArchive: !!_optionalChain([effectiveModes, 'access', _761 => _761.mingo, 'optionalAccess', _762 => _762.archiveDialog]),
|
|
23507
|
+
fetchArchivedDialogs: _optionalChain([effectiveModes, 'access', _763 => _763.mingo, 'optionalAccess', _764 => _764.fetchArchivedDialogs]),
|
|
23508
|
+
unarchiveDialog: _optionalChain([effectiveModes, 'access', _765 => _765.mingo, 'optionalAccess', _766 => _766.unarchiveDialog]),
|
|
23400
23509
|
searchQuery: void 0,
|
|
23401
23510
|
onSearchChange: void 0,
|
|
23402
23511
|
onCopyLink: void 0
|
|
@@ -23411,7 +23520,7 @@ function EmbeddableChatInner({
|
|
|
23411
23520
|
if (controlledActiveMode === void 0) {
|
|
23412
23521
|
setUncontrolledActiveMode(next);
|
|
23413
23522
|
}
|
|
23414
|
-
_optionalChain([onActiveModeChange, 'optionalCall',
|
|
23523
|
+
_optionalChain([onActiveModeChange, 'optionalCall', _767 => _767(next)]);
|
|
23415
23524
|
},
|
|
23416
23525
|
[controlledActiveMode, onActiveModeChange]
|
|
23417
23526
|
);
|
|
@@ -23438,7 +23547,7 @@ function EmbeddableChatInner({
|
|
|
23438
23547
|
);
|
|
23439
23548
|
const effectiveAssistantName = emptyStateConfig.name;
|
|
23440
23549
|
const effectiveAssistantIcon = emptyStateConfig.icon;
|
|
23441
|
-
const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess',
|
|
23550
|
+
const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess', _768 => _768.title]) === "string" ? guideWelcome.title : null)));
|
|
23442
23551
|
const {
|
|
23443
23552
|
messages: rawMessages,
|
|
23444
23553
|
isLoading: chatLoading,
|
|
@@ -23482,7 +23591,7 @@ function EmbeddableChatInner({
|
|
|
23482
23591
|
void sendMessage(guidePendingPrompt).catch((err) => {
|
|
23483
23592
|
console.error("[EmbeddableChat] guide launcher prompt failed:", err);
|
|
23484
23593
|
});
|
|
23485
|
-
_optionalChain([onGuidePromptConsumed, 'optionalCall',
|
|
23594
|
+
_optionalChain([onGuidePromptConsumed, 'optionalCall', _769 => _769()]);
|
|
23486
23595
|
}, [guidePendingPrompt, activeMode, sendMessage, onGuidePromptConsumed]);
|
|
23487
23596
|
const {
|
|
23488
23597
|
attachments: stagedAttachments,
|
|
@@ -23493,7 +23602,7 @@ function EmbeddableChatInner({
|
|
|
23493
23602
|
clear: clearAttachments
|
|
23494
23603
|
} = useChatAttachments();
|
|
23495
23604
|
const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
|
|
23496
|
-
const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess',
|
|
23605
|
+
const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _770 => _770.maxItems]), () => ( 10));
|
|
23497
23606
|
const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
|
|
23498
23607
|
const [contextItems, setContextItems] = _react.useState.call(void 0, NO_CONTEXT_ITEMS);
|
|
23499
23608
|
const [contextPickerOpen, setContextPickerOpen] = _react.useState.call(void 0, false);
|
|
@@ -23514,10 +23623,10 @@ function EmbeddableChatInner({
|
|
|
23514
23623
|
}, [activeDialogId, activeMode]);
|
|
23515
23624
|
const mentionMarkerByType = _react.useMemo.call(void 0, () => {
|
|
23516
23625
|
const m = /* @__PURE__ */ new Map();
|
|
23517
|
-
for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess',
|
|
23626
|
+
for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _771 => _771.entityTypes]), () => ( []))) if (t.marker) m.set(t.type, t.marker);
|
|
23518
23627
|
return m;
|
|
23519
|
-
}, [_optionalChain([contextPicker, 'optionalAccess',
|
|
23520
|
-
const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess',
|
|
23628
|
+
}, [_optionalChain([contextPicker, 'optionalAccess', _772 => _772.entityTypes])]);
|
|
23629
|
+
const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess', _773 => _773.entityTypes]);
|
|
23521
23630
|
const resolveContextIcon = _react.useMemo.call(void 0, () => {
|
|
23522
23631
|
const byType = /* @__PURE__ */ new Map();
|
|
23523
23632
|
for (const t of _nullishCoalesce(contextEntityTypes, () => ( []))) byType.set(t.type, t.icon);
|
|
@@ -23529,7 +23638,7 @@ function EmbeddableChatInner({
|
|
|
23529
23638
|
if (mentionActiveRef.current) {
|
|
23530
23639
|
if (contextItems.some((p) => `${p.type}:${p.id}` === key)) return;
|
|
23531
23640
|
if (contextItems.length >= contextMaxItems) return;
|
|
23532
|
-
_optionalChain([chatInputRef, 'access',
|
|
23641
|
+
_optionalChain([chatInputRef, 'access', _774 => _774.current, 'optionalAccess', _775 => _775.commitMention, 'call', _776 => _776(mentionTokenOf(key, mentionMarkerByType), {
|
|
23533
23642
|
label: item.label,
|
|
23534
23643
|
icon: resolveContextIcon(item)
|
|
23535
23644
|
})]);
|
|
@@ -23552,9 +23661,9 @@ function EmbeddableChatInner({
|
|
|
23552
23661
|
setContextItems((prev) => prev.filter((p) => `${p.type}:${p.id}` !== key));
|
|
23553
23662
|
if (mentionKeysRef.current.has(key)) {
|
|
23554
23663
|
mentionKeysRef.current.delete(key);
|
|
23555
|
-
const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access',
|
|
23664
|
+
const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access', _777 => _777.current, 'optionalAccess', _778 => _778.getValue, 'call', _779 => _779()]), () => ( ""));
|
|
23556
23665
|
const next = cur.replace(`@${mentionTokenOf(key, mentionMarkerByType)}`, "").replace(/\s{2,}/g, " ").trimStart();
|
|
23557
|
-
_optionalChain([chatInputRef, 'access',
|
|
23666
|
+
_optionalChain([chatInputRef, 'access', _780 => _780.current, 'optionalAccess', _781 => _781.setValue, 'call', _782 => _782(next)]);
|
|
23558
23667
|
}
|
|
23559
23668
|
},
|
|
23560
23669
|
[mentionMarkerByType]
|
|
@@ -23576,7 +23685,7 @@ function EmbeddableChatInner({
|
|
|
23576
23685
|
}, []);
|
|
23577
23686
|
const closeContextPicker = _react.useCallback.call(void 0, () => {
|
|
23578
23687
|
if (mentionActiveRef.current) {
|
|
23579
|
-
_optionalChain([chatInputRef, 'access',
|
|
23688
|
+
_optionalChain([chatInputRef, 'access', _783 => _783.current, 'optionalAccess', _784 => _784.removeMentionTrigger, 'call', _785 => _785()]);
|
|
23580
23689
|
}
|
|
23581
23690
|
setContextPickerOpen(false);
|
|
23582
23691
|
setMentionQuery(null);
|
|
@@ -23610,8 +23719,8 @@ function EmbeddableChatInner({
|
|
|
23610
23719
|
[effectiveAssistantIcon]
|
|
23611
23720
|
);
|
|
23612
23721
|
const [timestampCache] = _react.useState.call(void 0, () => /* @__PURE__ */ new Map());
|
|
23613
|
-
const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess',
|
|
23614
|
-
const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess',
|
|
23722
|
+
const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess', _786 => _786.firstName]), _optionalChain([identityUser, 'optionalAccess', _787 => _787.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identityUser, 'optionalAccess', _788 => _788.name, 'optionalAccess', _789 => _789.trim, 'call', _790 => _790()]) || void 0 : void 0;
|
|
23723
|
+
const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess', _791 => _791.avatarUrl, 'optionalAccess', _792 => _792.trim, 'call', _793 => _793()]) || void 0 : void 0;
|
|
23615
23724
|
const messages = _react.useMemo.call(void 0, () => {
|
|
23616
23725
|
const cache = timestampCache;
|
|
23617
23726
|
const seenIds = /* @__PURE__ */ new Set();
|
|
@@ -23800,9 +23909,9 @@ function EmbeddableChatInner({
|
|
|
23800
23909
|
const lastAssistantMsg = [...rawMessages].reverse().find((m) => m.role === "assistant");
|
|
23801
23910
|
const lastSources = _react.useMemo.call(void 0, () => {
|
|
23802
23911
|
if (chatLoading) return void 0;
|
|
23803
|
-
const sources = _optionalChain([lastAssistantMsg, 'optionalAccess',
|
|
23912
|
+
const sources = _optionalChain([lastAssistantMsg, 'optionalAccess', _794 => _794.sources]);
|
|
23804
23913
|
if (!sources || sources.length === 0) return void 0;
|
|
23805
|
-
const content = _optionalChain([lastAssistantMsg, 'optionalAccess',
|
|
23914
|
+
const content = _optionalChain([lastAssistantMsg, 'optionalAccess', _795 => _795.content]) || "";
|
|
23806
23915
|
const citationOrder = [...content.matchAll(/\[(\d+)\]/g)].map((m) => parseInt(m[1], 10));
|
|
23807
23916
|
const seenOrder = /* @__PURE__ */ new Map();
|
|
23808
23917
|
citationOrder.forEach((idx) => {
|
|
@@ -23820,7 +23929,7 @@ function EmbeddableChatInner({
|
|
|
23820
23929
|
const el = panelMeasureRef.current;
|
|
23821
23930
|
if (!el || typeof ResizeObserver === "undefined") return void 0;
|
|
23822
23931
|
const ro = new ResizeObserver((entries) => {
|
|
23823
|
-
const w = _optionalChain([entries, 'access',
|
|
23932
|
+
const w = _optionalChain([entries, 'access', _796 => _796[0], 'optionalAccess', _797 => _797.contentRect, 'optionalAccess', _798 => _798.width]);
|
|
23824
23933
|
if (typeof w === "number") setPanelWidth(w);
|
|
23825
23934
|
});
|
|
23826
23935
|
ro.observe(el);
|
|
@@ -23838,7 +23947,7 @@ function EmbeddableChatInner({
|
|
|
23838
23947
|
setRailStorageRead(true);
|
|
23839
23948
|
try {
|
|
23840
23949
|
if (window.localStorage.getItem(RAIL_COLLAPSED_STORAGE_KEY) === "1") setRailCollapsed(true);
|
|
23841
|
-
} catch (
|
|
23950
|
+
} catch (e67) {
|
|
23842
23951
|
}
|
|
23843
23952
|
}
|
|
23844
23953
|
const toggleRailCollapsed = _react.useCallback.call(void 0, () => {
|
|
@@ -23846,7 +23955,7 @@ function EmbeddableChatInner({
|
|
|
23846
23955
|
const next = !prev;
|
|
23847
23956
|
try {
|
|
23848
23957
|
window.localStorage.setItem(RAIL_COLLAPSED_STORAGE_KEY, next ? "1" : "0");
|
|
23849
|
-
} catch (
|
|
23958
|
+
} catch (e68) {
|
|
23850
23959
|
}
|
|
23851
23960
|
return next;
|
|
23852
23961
|
});
|
|
@@ -23863,17 +23972,17 @@ function EmbeddableChatInner({
|
|
|
23863
23972
|
const isMingoMode = activeMode === "mingo";
|
|
23864
23973
|
const stackedListView = isMingoMode && !hasConversation && !archiveOpen && !wideMingo && !composeOpen;
|
|
23865
23974
|
const headerShowBack = hasConversation || guideCanReturnToMingo;
|
|
23866
|
-
const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess',
|
|
23975
|
+
const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _799 => _799.title]) || "New Chat" : isGuideEmpty ? _nullishCoalesce(headerAssistantName, () => ( "Mingo Guide")) : "Current Chats";
|
|
23867
23976
|
const headerBackAriaLabel = hasConversation ? isViewingArchived ? "Back to archive" : "Back" : "Back to Mingo";
|
|
23868
23977
|
const headerOnBack = hasConversation ? handleBack : () => handleActiveModeChange("mingo");
|
|
23869
23978
|
const headerOnRestore = isViewingArchived && unarchiveDialog && activeDialog ? () => setRestoreTarget(activeDialog) : void 0;
|
|
23870
23979
|
const headerOnRename = activeDialogId && activeDialog && mingoCaps.canRename ? () => setRenameTarget(activeDialog) : void 0;
|
|
23871
23980
|
const headerOnArchive = activeDialogId && activeDialog && mingoCaps.canArchive ? () => setArchiveTarget(activeDialog) : void 0;
|
|
23872
|
-
const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access',
|
|
23981
|
+
const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access', _800 => _800.onCopyLink, 'optionalCall', _801 => _801(activeDialog)]) : void 0;
|
|
23873
23982
|
const headerOnOpenArchive = fetchArchivedDialogs ? openArchive : void 0;
|
|
23874
|
-
const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess',
|
|
23875
|
-
const headerPersonName = _optionalChain([headerOwner, 'optionalAccess',
|
|
23876
|
-
const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access',
|
|
23983
|
+
const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _802 => _802.owner]) : void 0;
|
|
23984
|
+
const headerPersonName = _optionalChain([headerOwner, 'optionalAccess', _803 => _803.name, 'optionalAccess', _804 => _804.trim, 'call', _805 => _805()]) || headerUserName;
|
|
23985
|
+
const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access', _806 => _806.avatarUrl, 'optionalAccess', _807 => _807.trim, 'call', _808 => _808()]) || void 0 : _optionalChain([identityUser, 'optionalAccess', _809 => _809.avatarUrl, 'optionalAccess', _810 => _810.trim, 'call', _811 => _811()]) || _optionalChain([userAvatarUrl, 'optionalAccess', _812 => _812.trim, 'call', _813 => _813()]) || void 0;
|
|
23877
23986
|
const headerAvatar = headerPersonName || headerPersonAvatarUrl ? { name: headerPersonName, avatarUrl: headerPersonAvatarUrl } : void 0;
|
|
23878
23987
|
const handleNewChat = _react.useCallback.call(void 0, () => {
|
|
23879
23988
|
resetToNewChat();
|
|
@@ -24203,9 +24312,9 @@ function EmbeddableChatInner({
|
|
|
24203
24312
|
subtitle: _nullishCoalesce(effectiveGreeting, () => ( void 0)),
|
|
24204
24313
|
subtitleLoading: emptyStateLoading,
|
|
24205
24314
|
...guideWelcome,
|
|
24206
|
-
title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess',
|
|
24207
|
-
icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess',
|
|
24208
|
-
quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess',
|
|
24315
|
+
title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess', _814 => _814.title]))),
|
|
24316
|
+
icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess', _815 => _815.icon]))),
|
|
24317
|
+
quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess', _816 => _816.quickActions]), () => ( guideSuggestedActions)),
|
|
24209
24318
|
onQuickAction: (action) => {
|
|
24210
24319
|
setQuickActionPreview(null);
|
|
24211
24320
|
handleSend(_nullishCoalesce(action.prompt, () => ( action.label)));
|
|
@@ -24279,8 +24388,8 @@ function EmbeddableChatInner({
|
|
|
24279
24388
|
selectedContextItems: contextItems,
|
|
24280
24389
|
onToggleContextItem: toggleContextItem,
|
|
24281
24390
|
onRemoveContextItem: removeContextItem,
|
|
24282
|
-
contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess',
|
|
24283
|
-
onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess',
|
|
24391
|
+
contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess', _817 => _817.items]),
|
|
24392
|
+
onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess', _818 => _818.onRemove]),
|
|
24284
24393
|
contextPickerOpen,
|
|
24285
24394
|
onOpenContextPicker: openContextPicker,
|
|
24286
24395
|
onCloseContextPicker: closeContextPicker,
|
|
@@ -24737,5 +24846,6 @@ function EmbeddableChatInner({
|
|
|
24737
24846
|
|
|
24738
24847
|
|
|
24739
24848
|
|
|
24740
|
-
exports.FloatingTooltip = FloatingTooltip; exports.tagVariants = tagVariants; exports.Tag = Tag; exports.formatTicketRelativeTime = formatTicketRelativeTime; exports.formatTicketFullTimestamp = formatTicketFullTimestamp; exports.formatRelativeTime = formatRelativeTime; exports.formatAbsoluteDate = formatAbsoluteDate; exports.formatDateTime = formatDateTime; exports.getDetailedTimeDifference = getDetailedTimeDifference; exports.isToday = isToday; exports.isWithinMinutes = isWithinMinutes; exports.createUTCTimestamp = createUTCTimestamp; exports.DESIGN_PALETTE = DESIGN_PALETTE; exports.getContrastRatio = getContrastRatio; exports.pickReadableTextColor = pickReadableTextColor; exports.extractDominantColor = extractDominantColor; exports.getBestContrastColor = getBestContrastColor; exports.analyzeImageColor = analyzeImageColor; exports.extractImageEdgeColorAsync = extractImageEdgeColorAsync; exports.getPlatformAccentColor = getPlatformAccentColor; exports.getCurrentPlatform = getCurrentPlatform; exports.getReadableTextColor = getReadableTextColor; exports.HEX_PATTERN = HEX_PATTERN; exports.hexToRgb = hexToRgb2; exports.rgbToHex = rgbToHex; exports.deriveHoverColor = deriveHoverColor; exports.deriveActiveColor = deriveActiveColor; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.ActionsMenu = ActionsMenu; exports.ActionsMenuDropdown = ActionsMenuDropdown; exports.ColorSwatch = ColorSwatch; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.resolveTicketStatus = resolveTicketStatus; exports.getTicketStatusConfig = getTicketStatusConfig; exports.getTicketStatusTag = getTicketStatusTag; exports.kindToCanonicalStatus = kindToCanonicalStatus; exports.usesCanonicalStatusStyle = usesCanonicalStatusStyle; exports.resolveStatusTagProps = resolveStatusTagProps; exports.TicketStatusTag = TicketStatusTag; exports.useScrollFade = useScrollFade; exports.ScrollFadeOverlay = ScrollFadeOverlay; exports.ScrollShadow = ScrollShadow; exports.Modal = Modal; exports.ModalContent = ModalContent; exports.ModalTwoColumn = ModalTwoColumn; exports.ModalHeader = ModalHeader; exports.ModalTitle = ModalTitle; exports.ModalFooter = ModalFooter; exports.OVERLAY_BACKDROP_CLASS = OVERLAY_BACKDROP_CLASS; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerClose = DrawerClose; exports.DrawerPortal = DrawerPortal; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DrawerBody = DrawerBody; exports.DrawerFooter = DrawerFooter; exports.Tabs = Tabs; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.stripInlineMarkdown = stripInlineMarkdown; exports.markdownToPlainText = markdownToPlainText; exports.buildHeadingIdMap = buildHeadingIdMap; exports.useHeadingIdMap = useHeadingIdMap; exports.extractText = extractText; exports.useIsHydrated = useIsHydrated; exports.MermaidDiagram = MermaidDiagram; exports.hasRenderableSrc = hasRenderableSrc; exports.buildStandardLeafRenderers = buildStandardLeafRenderers; exports.SAFE_HTML_TAGS = SAFE_HTML_TAGS; exports.SVG_TAGS = SVG_TAGS; exports.buildEffectiveTagSet = buildEffectiveTagSet; exports.buildSanitizeSchema = buildSanitizeSchema; exports.rehypeStripUnsafe = rehypeStripUnsafe; exports.escapeUnknownHtmlTags = escapeUnknownHtmlTags; exports.cardAwareUrlTransform = cardAwareUrlTransform; exports.splitStreamingBlocks = splitStreamingBlocks; exports.completeStreamingTail = completeStreamingTail; exports.TEXT_SIZE_PRESETS = TEXT_SIZE_PRESETS; exports.resolveTextSizeConfig = resolveTextSizeConfig; exports.NO_BROKEN_LINKS = NO_BROKEN_LINKS; exports.MarkdownEngine = MarkdownEngine; exports.SimpleMarkdownRenderer = SimpleMarkdownRenderer; exports.fetchPriorityProp = fetchPriorityProp; exports.MUX_STREAM_ORIGIN = MUX_STREAM_ORIGIN; exports.MUX_IMAGE_ORIGIN = MUX_IMAGE_ORIGIN; exports.saveDataEnabled = saveDataEnabled; exports.useVideoOriginPreconnect = useVideoOriginPreconnect; exports.useVideoWarmup = useVideoWarmup; exports.VideoPlayBadge = VideoPlayBadge; exports.VideoUnmuteGlyph = VideoUnmuteGlyph; exports.extractYouTubeId = extractYouTubeId; exports.Video = Video2; exports.HoverDropdown = HoverDropdown; exports.ExpandChevron = ExpandChevron; exports.useCollapsible = useCollapsible; exports.getCommandText = getCommandText; exports.ArgRow = ArgRow; exports.ResultBlock = ResultBlock; exports.CommandBlock = CommandBlock; exports.ApprovalStatusTag = ApprovalStatusTag; exports.ApprovalBatchMessage = ApprovalBatchMessage; exports.ApprovalRequestMessage = ApprovalRequestMessage; exports.EscalationOfferMessage = EscalationOfferMessage; exports.formatTime = formatTime; exports.AiAssistantInfo = AiAssistantInfo; exports.TicketEscalatedMessage = TicketEscalatedMessage; exports.MESSAGE_TYPE = MESSAGE_TYPE; exports.SCROLL_ANCHOR = SCROLL_ANCHOR; exports.TICKET_EVENT_KIND = TICKET_EVENT_KIND; exports.TicketEventMessage = TicketEventMessage; exports.ContextCompactionDisplay = ContextCompactionDisplay; exports.ThinkingDisplay = ThinkingDisplay; exports.AskDisplay = AskDisplay; exports.ErrorMessageDisplay = ErrorMessageDisplay; exports.MspOrganizationCard = MspOrganizationCard; exports.MspOrganizationCardSkeleton = MspOrganizationCardSkeleton; exports.ChatContainer = ChatContainer; exports.ChatHeader = ChatHeader; exports.ChatContent = ChatContent; exports.ChatFooter = ChatFooter; exports.ChatTypingIndicator = ChatTypingIndicator; exports.MingoOnboardingCard = MingoOnboardingCard; exports.ICON_REGISTRY = ICON_REGISTRY; exports.normalizeIconKey = normalizeIconKey; exports.getIconComponent = getIconComponent; exports.getDynamicIcon = getDynamicIcon; exports.ICON_ALIASES = ICON_ALIASES; exports.resolveIcon = resolveIcon; exports.ICON_OPTIONS = ICON_OPTIONS; exports.SlashCommandSuggestions = SlashCommandSuggestions; exports.ChatInput = ChatInput; exports.CONTEXT_ROW_CLASS = CONTEXT_ROW_CLASS; exports.CONTEXT_ICON_CLASS = CONTEXT_ICON_CLASS; exports.CONTEXT_LABEL_CLASS = CONTEXT_LABEL_CLASS; exports.CONTEXT_BACK_CLASS = CONTEXT_BACK_CLASS; exports.CONTEXT_STATE_CLASS = CONTEXT_STATE_CLASS; exports.ContextMenuRow = ContextMenuRow; exports.ContextItemsSkeleton = ContextItemsSkeleton; exports.ContextItemsList = ContextItemsList; exports.ContextErrorBoundary = ContextErrorBoundary; exports.CHAT_CONTEXT_ITEMS_DEFAULT_MAX = CHAT_CONTEXT_ITEMS_DEFAULT_MAX; exports.ChatComposerPlusMenu = ChatComposerPlusMenu; exports.ChatContextPicker = ChatContextPicker; exports.ChatContextChipStrip = ChatContextChipStrip; exports.BlockCard = BlockCard; exports.remarkCardLinks = remarkCardLinks; exports.remarkMentionChips = remarkMentionChips; exports.ToolExecutionDisplay = ToolExecutionDisplay; exports.MemoizedChatMessageEnhanced = MemoizedChatMessageEnhanced; exports.ChatMessageSkeleton = ChatMessageSkeleton; exports.ChatMessageListSkeleton = ChatMessageListSkeleton; exports.ChatMessageList = ChatMessageList; exports.useProxiedImageUrl = useProxiedImageUrl; exports.ChatMessageRow = ChatMessageRow; exports.ChatMessageRowSkeleton = ChatMessageRowSkeleton; exports.FAE_AVATAR_DATA_URI = FAE_AVATAR_DATA_URI; exports.AgentMark = AgentMark; exports.EntityIcon = EntityIcon; exports.getAgentAccent = getAgentAccent; exports.accentFromIdentityIcon = accentFromIdentityIcon; exports.isQuickActionIconSpec = isQuickActionIconSpec; exports.renderQuickActionIcon = renderQuickActionIcon; exports.QuickActionChipSkeleton = QuickActionChipSkeleton; exports.QuickActionChipButton = QuickActionChipButton; exports.QuickActionChipFromData = QuickActionChipFromData; exports.useMarqueeSync = useMarqueeSync; exports.getMarqueeTrackOffset = getMarqueeTrackOffset; exports.getMarqueeAppliedOffset = getMarqueeAppliedOffset; exports.getMarqueeCloneTwin = getMarqueeCloneTwin; exports.MarqueeWallFades = MarqueeWallFades; exports.MarqueeWall = MarqueeWall; exports.WALL_SKELETON_LABEL_CH = WALL_SKELETON_LABEL_CH; exports.interleave = interleave; exports.QuickActionWall = QuickActionWall; exports.QuickActionMarquee = QuickActionMarquee; exports.ChatTicketItem = ChatTicketItem; exports.ChatTicketList = ChatTicketList; exports.MingoOnboardingCardSkeleton = MingoOnboardingCardSkeleton; exports.MingoOnboardingListSkeleton = MingoOnboardingListSkeleton; exports.MingoChatHistorySkeleton = MingoChatHistorySkeleton; exports.MingoChatHistory = MingoChatHistory; exports.MingoWelcome = MingoWelcome; exports.GuideWelcome = GuideWelcome; exports.GuideModeBanner = GuideModeBanner; exports.TabSelector = TabSelector; exports.MingoHistoryRail = MingoHistoryRail; exports.RenameChatModal = RenameChatModal; exports.ArchiveChatModal = ArchiveChatModal; exports.UnarchiveChatModal = UnarchiveChatModal; exports.ChatDialogModals = ChatDialogModals; exports.ChatHeaderIconButton = ChatHeaderIconButton; exports.ChatHeaderSearchField = ChatHeaderSearchField; exports.ChatPanelHeader = ChatPanelHeader; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX = CHAT_ATTACHMENT_VIEW_URL_PREFIX; exports.CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM = CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM; exports.ANTHROPIC_SUPPORTED_IMAGE_MIME = ANTHROPIC_SUPPORTED_IMAGE_MIME; exports.buildChatAttachmentViewUrl = buildChatAttachmentViewUrl; exports.escapeMarkdownInline = escapeMarkdownInline; exports.formatChatAttachmentMarkdownForBubble = formatChatAttachmentMarkdownForBubble; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED = CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED; exports.CHAT_ATTACHMENT_MARKDOWN_PATTERN = CHAT_ATTACHMENT_MARKDOWN_PATTERN; exports.stripChatAttachmentMarkdown = stripChatAttachmentMarkdown; exports.CHAT_ATTACHMENT_MIME_TYPES = CHAT_ATTACHMENT_MIME_TYPES; exports.CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER = CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER; exports.ChatAttachmentAddButton = ChatAttachmentAddButton; exports.ChatAttachmentChipStrip = ChatAttachmentChipStrip; exports.ChatContextMemoryBar = ChatContextMemoryBar; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.ModelDisplay = ModelDisplay; exports.ModelDisplaySkeleton = ModelDisplaySkeleton; exports.ChatComposer = ChatComposer; exports.ChatArchivePage = ChatArchivePage; exports.DialogListItem = DialogListItem; exports.ChatSidebar = ChatSidebar; exports.NEW_TAB_FEATURES = NEW_TAB_FEATURES; exports.isModifierClick = isModifierClick; exports.stripSameOriginToPath = stripSameOriginToPath; exports.resolveExternalNavigation = resolveExternalNavigation; exports.executeNavigation = executeNavigation; exports.executeNavigationImperative = executeNavigationImperative; exports.handleChatNavClick = handleChatNavClick; exports.NavLinkAnchorViaRuntime = NavLinkAnchorViaRuntime; exports.SourceActionButton = SourceActionButton; exports.getCaptionsUrl = getCaptionsUrl; exports.rebaseCaptionsUrl = rebaseCaptionsUrl; exports.buildCaptionsUrl = buildCaptionsUrl; exports.getEntityCaptionUrls = getEntityCaptionUrls; exports.getEntityCaptionUrlsById = getEntityCaptionUrlsById; exports.captionsEntityTypeForDocType = captionsEntityTypeForDocType; exports.PAGE_HEADING_CLASS = PAGE_HEADING_CLASS; exports.SECTION_HEADING_CLASS = SECTION_HEADING_CLASS; exports.PageHeading = PageHeading; exports.useCaptions = useCaptions; exports.UserDisplay = UserDisplay; exports.CardHitLayer = CardHitLayer; exports.STRIP_CELL_MAX_WIDTH = STRIP_CELL_MAX_WIDTH; exports.CardsStrip = CardsStrip; exports.VideoHoverPreviewSurface = VideoHoverPreviewSurface; exports.RATIO_GRID_CLASS = RATIO_GRID_CLASS; exports.RATIO_TO_CSS_ASPECT = RATIO_TO_CSS_ASPECT; exports.RatioTabs = RatioTabs; exports.detectAspectRatio = detectAspectRatio; exports.ratioToCategory = ratioToCategory; exports.groupByAspectRatio = groupByAspectRatio; exports.VideoBitesStrip = VideoBitesStrip; exports.VideoBiteCard = VideoBiteCard; exports.EntityVideoSection = EntityVideoSection; exports.ChatVideoEntityCard = ChatVideoEntityCard; exports.GitHubActivityCard = GitHubActivityCard; exports.GitHubActivityCardSkeleton = GitHubActivityCardSkeleton; exports.SlackMessageCard = SlackMessageCard; exports.SlackMessageCardSkeleton = SlackMessageCardSkeleton; exports.HubspotTicketCard = HubspotTicketCard; exports.HubspotTicketCardSkeleton = HubspotTicketCardSkeleton; exports.DataRoomDocCard = DataRoomDocCard; exports.DataRoomDocCardSkeleton = DataRoomDocCardSkeleton; exports.CampaignCardAdmin = CampaignCardAdmin; exports.CampaignCardAdminSkeleton = CampaignCardAdminSkeleton; exports.GenericEntityCard = GenericEntityCard; exports.GenericEntityCardSkeleton = GenericEntityCardSkeleton; exports.faqSectionSlug = faqSectionSlug; exports.faqItemAnchor = faqItemAnchor; exports.parseFaqHash = parseFaqHash; exports.useChatCardItem = useChatCardItem; exports.clickupTaskUrl = clickupTaskUrl; exports.readFetchedCardTitle = readFetchedCardTitle; exports.resolveFetchedCardHref = resolveFetchedCardHref; exports.SOURCE_ICON_NAMES = SOURCE_ICON_NAMES; exports.getSourceIconName = getSourceIconName; exports.SOURCE_LABELS_BY_TABLE = SOURCE_LABELS_BY_TABLE; exports.getSourceLabel = getSourceLabel; exports.DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID = DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID; exports.defaultTableIdForDocumentType = defaultTableIdForDocumentType; exports.resolveSourceRowCTA = resolveSourceRowCTA; exports.resolveSourceIcon = resolveSourceIcon; exports.ChatCardLoader = ChatCardLoader; exports.renderChatInlineEntityCard = renderChatInlineEntityCard; exports.CHAT_TYPE = CHAT_TYPE; exports.OWNER_TYPE = OWNER_TYPE; exports.MESSAGE_ROLE = MESSAGE_ROLE; exports.ASSISTANT_TYPE = ASSISTANT_TYPE; exports.AUTHOR_TYPE = AUTHOR_TYPE; exports.APPROVAL_STATUS = APPROVAL_STATUS; exports.APPROVAL_BLOCK_VARIANT = APPROVAL_BLOCK_VARIANT; exports.CONNECTION_STATUS = CONNECTION_STATUS; exports.isStructuredContent = isStructuredContent; exports.normalizeContent = normalizeContent2; exports.NETWORK_CONFIG = NETWORK_CONFIG; exports.useChunkCatchup = useChunkCatchup; exports.useScriptedStream = useScriptedStream; exports.RESYNC_AFTER_HIDDEN_MS = RESYNC_AFTER_HIDDEN_MS; exports.useJetStreamDialogSubscription = useJetStreamDialogSubscription; exports.useNatsDialogSubscription = useNatsDialogSubscription; exports.buildNatsWsUrl = buildNatsWsUrl; exports.fetchSlashCommands = fetchSlashCommands; exports.useSlashCommands = useSlashCommands; exports.useSlashCommandRegistry = useSlashCommandRegistry; exports.fetchEmptyStateConfig = fetchEmptyStateConfig; exports.useEmptyStateConfig = useEmptyStateConfig; exports.useChatAttachments = useChatAttachments; exports.useChatAttachmentImageGallery = useChatAttachmentImageGallery; exports.ChatIdentityProvider = ChatIdentityProvider; exports.useChatIdentity = useChatIdentity; exports.useCloseOnNavigation = useCloseOnNavigation; exports.useSSE = useSSE; exports.useChat = useChat; exports.approvalDisplaysInline = approvalDisplaysInline; exports.appendToTrailingAssistant = appendToTrailingAssistant; exports.upsertTrailingCompaction = upsertTrailingCompaction; exports.applyToolExecutionToMessages = applyToolExecutionToMessages; exports.MessageSegmentAccumulator = MessageSegmentAccumulator; exports.createMessageSegmentAccumulator = createMessageSegmentAccumulator; exports.SCROLL_ANCHOR_WIRE_KEY = SCROLL_ANCHOR_WIRE_KEY; exports.parseScrollAnchor = parseScrollAnchor; exports.createEmptyTurnMeta = createEmptyTurnMeta; exports.createChatStreamReducer = createChatStreamReducer; exports.DEFAULT_DIALOG_SIDE = DEFAULT_DIALOG_SIDE; exports.DEFAULT_MAX_REDUCERS = DEFAULT_MAX_REDUCERS; exports.MAX_PENDING_RETAIN_KEYS = MAX_PENDING_RETAIN_KEYS; exports.createChatDialogStore = createChatDialogStore; exports.createDeltaBatcher = createDeltaBatcher; exports.useChatStreamReducer = useChatStreamReducer; exports.parseWireCommandOverride = parseWireCommandOverride; exports.sanitizeTitleForChat = sanitizeTitleForChat; exports.formatSingularLookupInvocation = formatSingularLookupInvocation; exports.extractEntityIdFilter = extractEntityIdFilter; exports.buildDiscussAddendum = buildDiscussAddendum; exports.buildDiscussPrompt = buildDiscussPrompt; exports.AUTO_CONTINUATION_DIRECTIVE_PREFIX = AUTO_CONTINUATION_DIRECTIVE_PREFIX; exports.buildAutoContinuationDirective = buildAutoContinuationDirective; exports.useSseChatAdapter = useSseChatAdapter; exports.extractIncompleteMessageState = extractIncompleteMessageState; exports.extractIncompleteTailState = extractIncompleteTailState; exports.decodeHistoricalMessageData = decodeHistoricalMessageData; exports.processHistoricalMessages = processHistoricalMessages; exports.extractErrorMessages = extractErrorMessages; exports.processHistoricalMessagesWithErrors = processHistoricalMessagesWithErrors; exports.mapProcessedToUnified = mapProcessedToUnified; exports.historicalToUnified = historicalToUnified; exports.useNatsChatAdapter = useNatsChatAdapter; exports.useUnifiedChat = useUnifiedChat; exports.SYNTHETIC_REALTIME_ID_PREFIXES = SYNTHETIC_REALTIME_ID_PREFIXES; exports.flattenMessagePagesChronological = flattenMessagePagesChronological; exports.maxPersistedStreamSeq = maxPersistedStreamSeq; exports.mergeHistoryWithRealtime = mergeHistoryWithRealtime; exports.computeHistoryPrepend = computeHistoryPrepend; exports.CHIP_ACTION_BUTTON_CLASS = CHIP_ACTION_BUTTON_CLASS; exports.chatChipClass = chatChipClass; exports.flattenAssistantContent = flattenAssistantContent; exports.normalizeHistoricalMessageData = normalizeHistoricalMessageData; exports.isHistoricalUserTurn = isHistoricalUserTurn; exports.buildStreamFrames = buildStreamFrames; exports.EmbeddableChat = EmbeddableChat;
|
|
24741
|
-
//# sourceMappingURL=chunk-YU2UJPAT.cjs.map
|
|
24849
|
+
|
|
24850
|
+
exports.FloatingTooltip = FloatingTooltip; exports.tagVariants = tagVariants; exports.Tag = Tag; exports.formatTicketRelativeTime = formatTicketRelativeTime; exports.formatTicketFullTimestamp = formatTicketFullTimestamp; exports.formatRelativeTime = formatRelativeTime; exports.formatAbsoluteDate = formatAbsoluteDate; exports.formatDateTime = formatDateTime; exports.getDetailedTimeDifference = getDetailedTimeDifference; exports.isToday = isToday; exports.isWithinMinutes = isWithinMinutes; exports.createUTCTimestamp = createUTCTimestamp; exports.DESIGN_PALETTE = DESIGN_PALETTE; exports.getContrastRatio = getContrastRatio; exports.pickReadableTextColor = pickReadableTextColor; exports.extractDominantColor = extractDominantColor; exports.getBestContrastColor = getBestContrastColor; exports.analyzeImageColor = analyzeImageColor; exports.extractImageEdgeColorAsync = extractImageEdgeColorAsync; exports.getPlatformAccentColor = getPlatformAccentColor; exports.getCurrentPlatform = getCurrentPlatform; exports.getReadableTextColor = getReadableTextColor; exports.HEX_PATTERN = HEX_PATTERN; exports.hexToRgb = hexToRgb2; exports.rgbToHex = rgbToHex; exports.deriveHoverColor = deriveHoverColor; exports.deriveActiveColor = deriveActiveColor; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.ActionsMenu = ActionsMenu; exports.ActionsMenuDropdown = ActionsMenuDropdown; exports.ColorSwatch = ColorSwatch; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.resolveTicketStatus = resolveTicketStatus; exports.getTicketStatusConfig = getTicketStatusConfig; exports.getTicketStatusTag = getTicketStatusTag; exports.kindToCanonicalStatus = kindToCanonicalStatus; exports.usesCanonicalStatusStyle = usesCanonicalStatusStyle; exports.resolveStatusTagProps = resolveStatusTagProps; exports.TicketStatusTag = TicketStatusTag; exports.useScrollFade = useScrollFade; exports.ScrollFadeOverlay = ScrollFadeOverlay; exports.ScrollShadow = ScrollShadow; exports.Modal = Modal; exports.ModalContent = ModalContent; exports.ModalTwoColumn = ModalTwoColumn; exports.ModalHeader = ModalHeader; exports.ModalTitle = ModalTitle; exports.ModalFooter = ModalFooter; exports.OVERLAY_BACKDROP_CLASS = OVERLAY_BACKDROP_CLASS; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerClose = DrawerClose; exports.DrawerPortal = DrawerPortal; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DrawerBody = DrawerBody; exports.DrawerFooter = DrawerFooter; exports.Tabs = Tabs; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.stripInlineMarkdown = stripInlineMarkdown; exports.markdownToPlainText = markdownToPlainText; exports.buildHeadingIdMap = buildHeadingIdMap; exports.useHeadingIdMap = useHeadingIdMap; exports.extractText = extractText; exports.useIsHydrated = useIsHydrated; exports.MermaidDiagram = MermaidDiagram; exports.hasRenderableSrc = hasRenderableSrc; exports.buildStandardLeafRenderers = buildStandardLeafRenderers; exports.SAFE_HTML_TAGS = SAFE_HTML_TAGS; exports.SVG_TAGS = SVG_TAGS; exports.buildEffectiveTagSet = buildEffectiveTagSet; exports.buildSanitizeSchema = buildSanitizeSchema; exports.rehypeStripUnsafe = rehypeStripUnsafe; exports.escapeUnknownHtmlTags = escapeUnknownHtmlTags; exports.cardAwareUrlTransform = cardAwareUrlTransform; exports.splitStreamingBlocks = splitStreamingBlocks; exports.completeStreamingTail = completeStreamingTail; exports.TEXT_SIZE_PRESETS = TEXT_SIZE_PRESETS; exports.resolveTextSizeConfig = resolveTextSizeConfig; exports.NO_BROKEN_LINKS = NO_BROKEN_LINKS; exports.MarkdownEngine = MarkdownEngine; exports.SimpleMarkdownRenderer = SimpleMarkdownRenderer; exports.fetchPriorityProp = fetchPriorityProp; exports.MUX_STREAM_ORIGIN = MUX_STREAM_ORIGIN; exports.MUX_IMAGE_ORIGIN = MUX_IMAGE_ORIGIN; exports.saveDataEnabled = saveDataEnabled; exports.useVideoOriginPreconnect = useVideoOriginPreconnect; exports.useVideoWarmup = useVideoWarmup; exports.VideoPlayBadge = VideoPlayBadge; exports.VideoUnmuteGlyph = VideoUnmuteGlyph; exports.extractYouTubeId = extractYouTubeId; exports.VIDEO_PLAYBACK_FAILED_EVENT = VIDEO_PLAYBACK_FAILED_EVENT; exports.Video = Video2; exports.HoverDropdown = HoverDropdown; exports.ExpandChevron = ExpandChevron; exports.useCollapsible = useCollapsible; exports.getCommandText = getCommandText; exports.ArgRow = ArgRow; exports.ResultBlock = ResultBlock; exports.CommandBlock = CommandBlock; exports.ApprovalStatusTag = ApprovalStatusTag; exports.ApprovalBatchMessage = ApprovalBatchMessage; exports.ApprovalRequestMessage = ApprovalRequestMessage; exports.EscalationOfferMessage = EscalationOfferMessage; exports.formatTime = formatTime; exports.AiAssistantInfo = AiAssistantInfo; exports.TicketEscalatedMessage = TicketEscalatedMessage; exports.MESSAGE_TYPE = MESSAGE_TYPE; exports.SCROLL_ANCHOR = SCROLL_ANCHOR; exports.TICKET_EVENT_KIND = TICKET_EVENT_KIND; exports.TicketEventMessage = TicketEventMessage; exports.ContextCompactionDisplay = ContextCompactionDisplay; exports.ThinkingDisplay = ThinkingDisplay; exports.AskDisplay = AskDisplay; exports.ErrorMessageDisplay = ErrorMessageDisplay; exports.MspOrganizationCard = MspOrganizationCard; exports.MspOrganizationCardSkeleton = MspOrganizationCardSkeleton; exports.ChatContainer = ChatContainer; exports.ChatHeader = ChatHeader; exports.ChatContent = ChatContent; exports.ChatFooter = ChatFooter; exports.ChatTypingIndicator = ChatTypingIndicator; exports.MingoOnboardingCard = MingoOnboardingCard; exports.ICON_REGISTRY = ICON_REGISTRY; exports.normalizeIconKey = normalizeIconKey; exports.getIconComponent = getIconComponent; exports.getDynamicIcon = getDynamicIcon; exports.ICON_ALIASES = ICON_ALIASES; exports.resolveIcon = resolveIcon; exports.ICON_OPTIONS = ICON_OPTIONS; exports.SlashCommandSuggestions = SlashCommandSuggestions; exports.ChatInput = ChatInput; exports.CONTEXT_ROW_CLASS = CONTEXT_ROW_CLASS; exports.CONTEXT_ICON_CLASS = CONTEXT_ICON_CLASS; exports.CONTEXT_LABEL_CLASS = CONTEXT_LABEL_CLASS; exports.CONTEXT_BACK_CLASS = CONTEXT_BACK_CLASS; exports.CONTEXT_STATE_CLASS = CONTEXT_STATE_CLASS; exports.ContextMenuRow = ContextMenuRow; exports.ContextItemsSkeleton = ContextItemsSkeleton; exports.ContextItemsList = ContextItemsList; exports.ContextErrorBoundary = ContextErrorBoundary; exports.CHAT_CONTEXT_ITEMS_DEFAULT_MAX = CHAT_CONTEXT_ITEMS_DEFAULT_MAX; exports.ChatComposerPlusMenu = ChatComposerPlusMenu; exports.ChatContextPicker = ChatContextPicker; exports.ChatContextChipStrip = ChatContextChipStrip; exports.BlockCard = BlockCard; exports.remarkCardLinks = remarkCardLinks; exports.remarkMentionChips = remarkMentionChips; exports.ToolExecutionDisplay = ToolExecutionDisplay; exports.MemoizedChatMessageEnhanced = MemoizedChatMessageEnhanced; exports.ChatMessageSkeleton = ChatMessageSkeleton; exports.ChatMessageListSkeleton = ChatMessageListSkeleton; exports.ChatMessageList = ChatMessageList; exports.useProxiedImageUrl = useProxiedImageUrl; exports.ChatMessageRow = ChatMessageRow; exports.ChatMessageRowSkeleton = ChatMessageRowSkeleton; exports.FAE_AVATAR_DATA_URI = FAE_AVATAR_DATA_URI; exports.AgentMark = AgentMark; exports.EntityIcon = EntityIcon; exports.getAgentAccent = getAgentAccent; exports.accentFromIdentityIcon = accentFromIdentityIcon; exports.isQuickActionIconSpec = isQuickActionIconSpec; exports.renderQuickActionIcon = renderQuickActionIcon; exports.QuickActionChipSkeleton = QuickActionChipSkeleton; exports.QuickActionChipButton = QuickActionChipButton; exports.QuickActionChipFromData = QuickActionChipFromData; exports.useMarqueeSync = useMarqueeSync; exports.getMarqueeTrackOffset = getMarqueeTrackOffset; exports.getMarqueeAppliedOffset = getMarqueeAppliedOffset; exports.getMarqueeCloneTwin = getMarqueeCloneTwin; exports.MarqueeWallFades = MarqueeWallFades; exports.MarqueeWall = MarqueeWall; exports.WALL_SKELETON_LABEL_CH = WALL_SKELETON_LABEL_CH; exports.interleave = interleave; exports.QuickActionWall = QuickActionWall; exports.QuickActionMarquee = QuickActionMarquee; exports.ChatTicketItem = ChatTicketItem; exports.ChatTicketList = ChatTicketList; exports.MingoOnboardingCardSkeleton = MingoOnboardingCardSkeleton; exports.MingoOnboardingListSkeleton = MingoOnboardingListSkeleton; exports.MingoChatHistorySkeleton = MingoChatHistorySkeleton; exports.MingoChatHistory = MingoChatHistory; exports.MingoWelcome = MingoWelcome; exports.GuideWelcome = GuideWelcome; exports.GuideModeBanner = GuideModeBanner; exports.TabSelector = TabSelector; exports.MingoHistoryRail = MingoHistoryRail; exports.RenameChatModal = RenameChatModal; exports.ArchiveChatModal = ArchiveChatModal; exports.UnarchiveChatModal = UnarchiveChatModal; exports.ChatDialogModals = ChatDialogModals; exports.ChatHeaderIconButton = ChatHeaderIconButton; exports.ChatHeaderSearchField = ChatHeaderSearchField; exports.ChatPanelHeader = ChatPanelHeader; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX = CHAT_ATTACHMENT_VIEW_URL_PREFIX; exports.CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM = CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM; exports.ANTHROPIC_SUPPORTED_IMAGE_MIME = ANTHROPIC_SUPPORTED_IMAGE_MIME; exports.buildChatAttachmentViewUrl = buildChatAttachmentViewUrl; exports.escapeMarkdownInline = escapeMarkdownInline; exports.formatChatAttachmentMarkdownForBubble = formatChatAttachmentMarkdownForBubble; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED = CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED; exports.CHAT_ATTACHMENT_MARKDOWN_PATTERN = CHAT_ATTACHMENT_MARKDOWN_PATTERN; exports.stripChatAttachmentMarkdown = stripChatAttachmentMarkdown; exports.CHAT_ATTACHMENT_MIME_TYPES = CHAT_ATTACHMENT_MIME_TYPES; exports.CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER = CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER; exports.ChatAttachmentAddButton = ChatAttachmentAddButton; exports.ChatAttachmentChipStrip = ChatAttachmentChipStrip; exports.ChatContextMemoryBar = ChatContextMemoryBar; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.ModelDisplay = ModelDisplay; exports.ModelDisplaySkeleton = ModelDisplaySkeleton; exports.ChatComposer = ChatComposer; exports.ChatArchivePage = ChatArchivePage; exports.DialogListItem = DialogListItem; exports.ChatSidebar = ChatSidebar; exports.NEW_TAB_FEATURES = NEW_TAB_FEATURES; exports.isModifierClick = isModifierClick; exports.stripSameOriginToPath = stripSameOriginToPath; exports.resolveExternalNavigation = resolveExternalNavigation; exports.executeNavigation = executeNavigation; exports.executeNavigationImperative = executeNavigationImperative; exports.handleChatNavClick = handleChatNavClick; exports.NavLinkAnchorViaRuntime = NavLinkAnchorViaRuntime; exports.SourceActionButton = SourceActionButton; exports.getCaptionsUrl = getCaptionsUrl; exports.rebaseCaptionsUrl = rebaseCaptionsUrl; exports.buildCaptionsUrl = buildCaptionsUrl; exports.getEntityCaptionUrls = getEntityCaptionUrls; exports.getEntityCaptionUrlsById = getEntityCaptionUrlsById; exports.captionsEntityTypeForDocType = captionsEntityTypeForDocType; exports.PAGE_HEADING_CLASS = PAGE_HEADING_CLASS; exports.SECTION_HEADING_CLASS = SECTION_HEADING_CLASS; exports.PageHeading = PageHeading; exports.useCaptions = useCaptions; exports.UserDisplay = UserDisplay; exports.CardHitLayer = CardHitLayer; exports.STRIP_CELL_MAX_WIDTH = STRIP_CELL_MAX_WIDTH; exports.CardsStrip = CardsStrip; exports.VideoHoverPreviewSurface = VideoHoverPreviewSurface; exports.RATIO_GRID_CLASS = RATIO_GRID_CLASS; exports.RATIO_TO_CSS_ASPECT = RATIO_TO_CSS_ASPECT; exports.RatioTabs = RatioTabs; exports.detectAspectRatio = detectAspectRatio; exports.ratioToCategory = ratioToCategory; exports.groupByAspectRatio = groupByAspectRatio; exports.VideoBitesStrip = VideoBitesStrip; exports.VideoBiteCard = VideoBiteCard; exports.EntityVideoSection = EntityVideoSection; exports.ChatVideoEntityCard = ChatVideoEntityCard; exports.GitHubActivityCard = GitHubActivityCard; exports.GitHubActivityCardSkeleton = GitHubActivityCardSkeleton; exports.SlackMessageCard = SlackMessageCard; exports.SlackMessageCardSkeleton = SlackMessageCardSkeleton; exports.HubspotTicketCard = HubspotTicketCard; exports.HubspotTicketCardSkeleton = HubspotTicketCardSkeleton; exports.DataRoomDocCard = DataRoomDocCard; exports.DataRoomDocCardSkeleton = DataRoomDocCardSkeleton; exports.CampaignCardAdmin = CampaignCardAdmin; exports.CampaignCardAdminSkeleton = CampaignCardAdminSkeleton; exports.GenericEntityCard = GenericEntityCard; exports.GenericEntityCardSkeleton = GenericEntityCardSkeleton; exports.faqSectionSlug = faqSectionSlug; exports.faqItemAnchor = faqItemAnchor; exports.parseFaqHash = parseFaqHash; exports.useChatCardItem = useChatCardItem; exports.clickupTaskUrl = clickupTaskUrl; exports.readFetchedCardTitle = readFetchedCardTitle; exports.resolveFetchedCardHref = resolveFetchedCardHref; exports.SOURCE_ICON_NAMES = SOURCE_ICON_NAMES; exports.getSourceIconName = getSourceIconName; exports.SOURCE_LABELS_BY_TABLE = SOURCE_LABELS_BY_TABLE; exports.getSourceLabel = getSourceLabel; exports.DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID = DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID; exports.defaultTableIdForDocumentType = defaultTableIdForDocumentType; exports.resolveSourceRowCTA = resolveSourceRowCTA; exports.resolveSourceIcon = resolveSourceIcon; exports.ChatCardLoader = ChatCardLoader; exports.renderChatInlineEntityCard = renderChatInlineEntityCard; exports.CHAT_TYPE = CHAT_TYPE; exports.OWNER_TYPE = OWNER_TYPE; exports.MESSAGE_ROLE = MESSAGE_ROLE; exports.ASSISTANT_TYPE = ASSISTANT_TYPE; exports.AUTHOR_TYPE = AUTHOR_TYPE; exports.APPROVAL_STATUS = APPROVAL_STATUS; exports.APPROVAL_BLOCK_VARIANT = APPROVAL_BLOCK_VARIANT; exports.CONNECTION_STATUS = CONNECTION_STATUS; exports.isStructuredContent = isStructuredContent; exports.normalizeContent = normalizeContent2; exports.NETWORK_CONFIG = NETWORK_CONFIG; exports.useChunkCatchup = useChunkCatchup; exports.useScriptedStream = useScriptedStream; exports.RESYNC_AFTER_HIDDEN_MS = RESYNC_AFTER_HIDDEN_MS; exports.useJetStreamDialogSubscription = useJetStreamDialogSubscription; exports.useNatsDialogSubscription = useNatsDialogSubscription; exports.buildNatsWsUrl = buildNatsWsUrl; exports.fetchSlashCommands = fetchSlashCommands; exports.useSlashCommands = useSlashCommands; exports.useSlashCommandRegistry = useSlashCommandRegistry; exports.fetchEmptyStateConfig = fetchEmptyStateConfig; exports.useEmptyStateConfig = useEmptyStateConfig; exports.useChatAttachments = useChatAttachments; exports.useChatAttachmentImageGallery = useChatAttachmentImageGallery; exports.ChatIdentityProvider = ChatIdentityProvider; exports.useChatIdentity = useChatIdentity; exports.useCloseOnNavigation = useCloseOnNavigation; exports.useSSE = useSSE; exports.useChat = useChat; exports.approvalDisplaysInline = approvalDisplaysInline; exports.appendToTrailingAssistant = appendToTrailingAssistant; exports.upsertTrailingCompaction = upsertTrailingCompaction; exports.applyToolExecutionToMessages = applyToolExecutionToMessages; exports.MessageSegmentAccumulator = MessageSegmentAccumulator; exports.createMessageSegmentAccumulator = createMessageSegmentAccumulator; exports.SCROLL_ANCHOR_WIRE_KEY = SCROLL_ANCHOR_WIRE_KEY; exports.parseScrollAnchor = parseScrollAnchor; exports.createEmptyTurnMeta = createEmptyTurnMeta; exports.createChatStreamReducer = createChatStreamReducer; exports.DEFAULT_DIALOG_SIDE = DEFAULT_DIALOG_SIDE; exports.DEFAULT_MAX_REDUCERS = DEFAULT_MAX_REDUCERS; exports.MAX_PENDING_RETAIN_KEYS = MAX_PENDING_RETAIN_KEYS; exports.createChatDialogStore = createChatDialogStore; exports.createDeltaBatcher = createDeltaBatcher; exports.useChatStreamReducer = useChatStreamReducer; exports.parseWireCommandOverride = parseWireCommandOverride; exports.sanitizeTitleForChat = sanitizeTitleForChat; exports.formatSingularLookupInvocation = formatSingularLookupInvocation; exports.extractEntityIdFilter = extractEntityIdFilter; exports.buildDiscussAddendum = buildDiscussAddendum; exports.buildDiscussPrompt = buildDiscussPrompt; exports.AUTO_CONTINUATION_DIRECTIVE_PREFIX = AUTO_CONTINUATION_DIRECTIVE_PREFIX; exports.buildAutoContinuationDirective = buildAutoContinuationDirective; exports.useSseChatAdapter = useSseChatAdapter; exports.extractIncompleteMessageState = extractIncompleteMessageState; exports.extractIncompleteTailState = extractIncompleteTailState; exports.decodeHistoricalMessageData = decodeHistoricalMessageData; exports.processHistoricalMessages = processHistoricalMessages; exports.extractErrorMessages = extractErrorMessages; exports.processHistoricalMessagesWithErrors = processHistoricalMessagesWithErrors; exports.mapProcessedToUnified = mapProcessedToUnified; exports.historicalToUnified = historicalToUnified; exports.useNatsChatAdapter = useNatsChatAdapter; exports.useUnifiedChat = useUnifiedChat; exports.SYNTHETIC_REALTIME_ID_PREFIXES = SYNTHETIC_REALTIME_ID_PREFIXES; exports.flattenMessagePagesChronological = flattenMessagePagesChronological; exports.maxPersistedStreamSeq = maxPersistedStreamSeq; exports.mergeHistoryWithRealtime = mergeHistoryWithRealtime; exports.computeHistoryPrepend = computeHistoryPrepend; exports.CHIP_ACTION_BUTTON_CLASS = CHIP_ACTION_BUTTON_CLASS; exports.chatChipClass = chatChipClass; exports.flattenAssistantContent = flattenAssistantContent; exports.normalizeHistoricalMessageData = normalizeHistoricalMessageData; exports.isHistoricalUserTurn = isHistoricalUserTurn; exports.buildStreamFrames = buildStreamFrames; exports.EmbeddableChat = EmbeddableChat;
|
|
24851
|
+
//# sourceMappingURL=chunk-LOJ5KQ6B.cjs.map
|