@flamingo-stack/openframe-frontend-core 0.0.665-snapshot.20260924174106 → 0.0.665

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.
Files changed (109) hide show
  1. package/dist/{chunk-IUNCGKFP.cjs → chunk-3SS37SNM.cjs} +10 -10
  2. package/dist/{chunk-IUNCGKFP.cjs.map → chunk-3SS37SNM.cjs.map} +1 -1
  3. package/dist/{chunk-W2WEIVHT.cjs → chunk-6FD7ZEBY.cjs} +163 -163
  4. package/dist/{chunk-W2WEIVHT.cjs.map → chunk-6FD7ZEBY.cjs.map} +1 -1
  5. package/dist/{chunk-VUYRTI3Z.cjs → chunk-6W5N23LC.cjs} +26 -26
  6. package/dist/{chunk-VUYRTI3Z.cjs.map → chunk-6W5N23LC.cjs.map} +1 -1
  7. package/dist/{chunk-CYPLD5F3.js → chunk-77WMNQTE.js} +3 -3
  8. package/dist/{chunk-SCRVQY42.js → chunk-BKCPXDOE.js} +2 -2
  9. package/dist/{chunk-DDW7G6U7.js → chunk-BPKEDLGR.js} +5 -5
  10. package/dist/{chunk-NIVLGQKS.js → chunk-CQJXOBWK.js} +3 -3
  11. package/dist/{chunk-ILAEMVAI.js → chunk-DNFC6RYF.js} +2 -2
  12. package/dist/{chunk-WI5LLFA6.cjs → chunk-EMJAT6IK.cjs} +15 -15
  13. package/dist/{chunk-WI5LLFA6.cjs.map → chunk-EMJAT6IK.cjs.map} +1 -1
  14. package/dist/{chunk-KDFSFVNX.cjs → chunk-FGQSSFP4.cjs} +10 -10
  15. package/dist/{chunk-KDFSFVNX.cjs.map → chunk-FGQSSFP4.cjs.map} +1 -1
  16. package/dist/{chunk-O5GV3WQO.js → chunk-GDTFJ5QN.js} +2 -2
  17. package/dist/{chunk-VI35TSB2.js → chunk-JHAS6Y7P.js} +4 -4
  18. package/dist/{chunk-XMY2XTHG.cjs → chunk-JHH7NETU.cjs} +5 -5
  19. package/dist/{chunk-XMY2XTHG.cjs.map → chunk-JHH7NETU.cjs.map} +1 -1
  20. package/dist/{chunk-VN2U4EBP.cjs → chunk-KBUYG5N6.cjs} +33 -33
  21. package/dist/{chunk-VN2U4EBP.cjs.map → chunk-KBUYG5N6.cjs.map} +1 -1
  22. package/dist/{chunk-AAIL6J56.cjs → chunk-L4ZNA3NX.cjs} +3 -3
  23. package/dist/{chunk-AAIL6J56.cjs.map → chunk-L4ZNA3NX.cjs.map} +1 -1
  24. package/dist/{chunk-2S44CUCH.cjs → chunk-LCYYTWRF.cjs} +4 -4
  25. package/dist/{chunk-2S44CUCH.cjs.map → chunk-LCYYTWRF.cjs.map} +1 -1
  26. package/dist/{chunk-XSRIPH6U.cjs → chunk-LTW2GWJ2.cjs} +22 -22
  27. package/dist/{chunk-XSRIPH6U.cjs.map → chunk-LTW2GWJ2.cjs.map} +1 -1
  28. package/dist/{chunk-7H7LYI4M.cjs → chunk-LXL3PZE2.cjs} +10 -10
  29. package/dist/{chunk-7H7LYI4M.cjs.map → chunk-LXL3PZE2.cjs.map} +1 -1
  30. package/dist/{chunk-V3B37LQY.js → chunk-MBLACUCE.js} +5 -5
  31. package/dist/{chunk-23XIOIGS.cjs → chunk-MNUR6PAJ.cjs} +370 -392
  32. package/dist/chunk-MNUR6PAJ.cjs.map +1 -0
  33. package/dist/{chunk-ZDGEJFDG.js → chunk-O3GB7JFL.js} +3 -3
  34. package/dist/{chunk-EYCF3GGM.js → chunk-OLCI3UA5.js} +6 -6
  35. package/dist/{chunk-IWCYTHNG.js → chunk-OMTLCMQB.js} +9 -31
  36. package/dist/chunk-OMTLCMQB.js.map +1 -0
  37. package/dist/{chunk-CRDKQMTP.js → chunk-QR3NUFA5.js} +2 -2
  38. package/dist/{chunk-R6NU4QFR.js → chunk-RM4S53GB.js} +2 -2
  39. package/dist/{chunk-JBRNIUYC.js → chunk-RT5JNTCN.js} +3 -3
  40. package/dist/{chunk-YAF2JKAK.cjs → chunk-X32X52VN.cjs} +71 -71
  41. package/dist/{chunk-YAF2JKAK.cjs.map → chunk-X32X52VN.cjs.map} +1 -1
  42. package/dist/{chunk-L7QXTWI7.cjs → chunk-XCACXPCM.cjs} +22 -22
  43. package/dist/{chunk-L7QXTWI7.cjs.map → chunk-XCACXPCM.cjs.map} +1 -1
  44. package/dist/{chunk-YVMSA7LR.js → chunk-YRMKUDOE.js} +5 -5
  45. package/dist/{chunk-HQHZZ3SL.js → chunk-Z2MJPTIB.js} +3 -3
  46. package/dist/{chunk-OPY4JNY2.cjs → chunk-ZGPST26T.cjs} +45 -45
  47. package/dist/{chunk-OPY4JNY2.cjs.map → chunk-ZGPST26T.cjs.map} +1 -1
  48. package/dist/{chunk-QSYYYL55.cjs → chunk-ZMZUF6FX.cjs} +3 -3
  49. package/dist/{chunk-QSYYYL55.cjs.map → chunk-ZMZUF6FX.cjs.map} +1 -1
  50. package/dist/components/case-studies/index.cjs +14 -14
  51. package/dist/components/case-studies/index.js +3 -3
  52. package/dist/components/chat/chat-composer.d.ts +1 -10
  53. package/dist/components/chat/chat-composer.d.ts.map +1 -1
  54. package/dist/components/chat/chat-input.d.ts.map +1 -1
  55. package/dist/components/chat/embeddable-chat.d.ts +0 -10
  56. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  57. package/dist/components/chat/index.cjs +2 -2
  58. package/dist/components/chat/index.js +1 -1
  59. package/dist/components/chat/types/component.types.d.ts +0 -7
  60. package/dist/components/chat/types/component.types.d.ts.map +1 -1
  61. package/dist/components/contact/index.cjs +4 -4
  62. package/dist/components/contact/index.js +3 -3
  63. package/dist/components/docs/index.cjs +7 -7
  64. package/dist/components/docs/index.js +6 -6
  65. package/dist/components/embeds/index.cjs +4 -4
  66. package/dist/components/embeds/index.js +3 -3
  67. package/dist/components/faq/index.cjs +4 -4
  68. package/dist/components/faq/index.js +3 -3
  69. package/dist/components/features/index.cjs +3 -3
  70. package/dist/components/features/index.js +2 -2
  71. package/dist/components/help-center-pages/index.cjs +23 -23
  72. package/dist/components/help-center-pages/index.js +14 -14
  73. package/dist/components/index.cjs +39 -39
  74. package/dist/components/index.js +13 -13
  75. package/dist/components/meeting-scheduler/index.cjs +24 -24
  76. package/dist/components/meeting-scheduler/index.js +2 -2
  77. package/dist/components/navigation/index.cjs +6 -6
  78. package/dist/components/navigation/index.js +5 -5
  79. package/dist/components/onboarding-guides/index.cjs +6 -6
  80. package/dist/components/onboarding-guides/index.js +5 -5
  81. package/dist/components/tickets/index.cjs +7 -7
  82. package/dist/components/tickets/index.js +6 -6
  83. package/dist/components/ui/index.cjs +3 -3
  84. package/dist/components/ui/index.js +2 -2
  85. package/dist/index.cjs +7 -7
  86. package/dist/index.js +6 -6
  87. package/package.json +1 -1
  88. package/src/components/chat/chat-composer.tsx +5 -21
  89. package/src/components/chat/chat-input.tsx +3 -15
  90. package/src/components/chat/embeddable-chat.tsx +2 -16
  91. package/src/components/chat/types/component.types.ts +0 -7
  92. package/src/stories/EmbeddableChat.stories.tsx +0 -21
  93. package/dist/chunk-23XIOIGS.cjs.map +0 -1
  94. package/dist/chunk-IWCYTHNG.js.map +0 -1
  95. /package/dist/{chunk-CYPLD5F3.js.map → chunk-77WMNQTE.js.map} +0 -0
  96. /package/dist/{chunk-SCRVQY42.js.map → chunk-BKCPXDOE.js.map} +0 -0
  97. /package/dist/{chunk-DDW7G6U7.js.map → chunk-BPKEDLGR.js.map} +0 -0
  98. /package/dist/{chunk-NIVLGQKS.js.map → chunk-CQJXOBWK.js.map} +0 -0
  99. /package/dist/{chunk-ILAEMVAI.js.map → chunk-DNFC6RYF.js.map} +0 -0
  100. /package/dist/{chunk-O5GV3WQO.js.map → chunk-GDTFJ5QN.js.map} +0 -0
  101. /package/dist/{chunk-VI35TSB2.js.map → chunk-JHAS6Y7P.js.map} +0 -0
  102. /package/dist/{chunk-V3B37LQY.js.map → chunk-MBLACUCE.js.map} +0 -0
  103. /package/dist/{chunk-ZDGEJFDG.js.map → chunk-O3GB7JFL.js.map} +0 -0
  104. /package/dist/{chunk-EYCF3GGM.js.map → chunk-OLCI3UA5.js.map} +0 -0
  105. /package/dist/{chunk-CRDKQMTP.js.map → chunk-QR3NUFA5.js.map} +0 -0
  106. /package/dist/{chunk-R6NU4QFR.js.map → chunk-RM4S53GB.js.map} +0 -0
  107. /package/dist/{chunk-JBRNIUYC.js.map → chunk-RT5JNTCN.js.map} +0 -0
  108. /package/dist/{chunk-YVMSA7LR.js.map → chunk-YRMKUDOE.js.map} +0 -0
  109. /package/dist/{chunk-HQHZZ3SL.js.map → chunk-Z2MJPTIB.js.map} +0 -0
@@ -6006,7 +6006,6 @@ var ChatInput = _react.forwardRef.call(void 0, (allProps, ref) => {
6006
6006
  placeholder = "Enter your Request...",
6007
6007
  reserveAvatarOffset: _reserveAvatarOffset,
6008
6008
  disabled = false,
6009
- disabledPlaceholder = "Connection lost. Waiting to reconnect...",
6010
6009
  autoFocus = false,
6011
6010
  fullWidth = false,
6012
6011
  allowEmptySend = false,
@@ -6351,21 +6350,7 @@ var ChatInput = _react.forwardRef.call(void 0, (allProps, ref) => {
6351
6350
  children: [
6352
6351
  startIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex h-6 shrink-0 items-center", children: startIcon }),
6353
6352
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative min-w-0 flex-1", children: [
6354
- isEmpty && !showPreview && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6355
- "span",
6356
- {
6357
- className: _chunkX7CEWD6Vcjs.cn.call(void 0,
6358
- // One line, clipped with an ellipsis (Figma 954:28455): the
6359
- // disabled copy is a sentence, and the panel's narrowest
6360
- // width does not fit it — wrapped, it ran under the row.
6361
- "pointer-events-none absolute left-0 top-0 w-full select-none truncate text-h4",
6362
- // Disabled reads as disabled (Figma 954:28455): the copy says
6363
- // why, and the colour says it is not an invitation to type.
6364
- disabled ? "text-ods-text-disabled" : "text-ods-text-secondary"
6365
- ),
6366
- children: disabled ? disabledPlaceholder : placeholder
6367
- }
6368
- ),
6353
+ isEmpty && !showPreview && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "pointer-events-none absolute left-0 top-0 select-none text-ods-text-secondary text-h4", children: disabled ? "Connection lost. Waiting to reconnect..." : placeholder }),
6369
6354
  showPreview && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6370
6355
  "p",
6371
6356
  {
@@ -6383,7 +6368,7 @@ var ChatInput = _react.forwardRef.call(void 0, (allProps, ref) => {
6383
6368
  "data-editor": true,
6384
6369
  role: "textbox",
6385
6370
  "aria-multiline": "true",
6386
- "aria-label": disabled ? disabledPlaceholder : typeof placeholder === "string" ? placeholder : "Message",
6371
+ "aria-label": typeof placeholder === "string" ? placeholder : "Message",
6387
6372
  contentEditable: !disabled,
6388
6373
  suppressContentEditableWarning: true,
6389
6374
  spellCheck: true,
@@ -11322,7 +11307,6 @@ ModelDisplaySkeleton.displayName = "ModelDisplaySkeleton";
11322
11307
 
11323
11308
  function ChatComposer({
11324
11309
  archived = false,
11325
- lock = null,
11326
11310
  inputRef,
11327
11311
  onSend,
11328
11312
  onStop,
@@ -11350,7 +11334,6 @@ function ChatComposer({
11350
11334
  previewText
11351
11335
  }) {
11352
11336
  const contextEnabled = !!contextPicker && !archived;
11353
- const locked = lock != null;
11354
11337
  const selected = _nullishCoalesce(selectedContextItems, () => ( []));
11355
11338
  const memory = _nullishCoalesce(contextMemoryItems, () => ( []));
11356
11339
  const entityTypes = _optionalChain([contextPicker, 'optionalAccess', _207 => _207.entityTypes]);
@@ -11368,13 +11351,11 @@ function ChatComposer({
11368
11351
  onStop,
11369
11352
  sending,
11370
11353
  placeholder,
11371
- disabled: locked,
11372
- disabledPlaceholder: _optionalChain([lock, 'optionalAccess', _208 => _208.placeholder]),
11373
11354
  previewText,
11374
11355
  fullWidth: true,
11375
11356
  className: "px-0",
11376
11357
  reserveAvatarOffset: false,
11377
- autoFocus: locked ? false : autoFocus,
11358
+ autoFocus,
11378
11359
  slashCommands,
11379
11360
  onMentionQueryChange: contextEnabled ? onMentionQueryChange : void 0,
11380
11361
  onValueChange: contextEnabled ? onValueChange : void 0,
@@ -11382,17 +11363,17 @@ function ChatComposer({
11382
11363
  startIcon: contextEnabled ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
11383
11364
  ChatComposerPlusMenu,
11384
11365
  {
11385
- onToggle: () => contextPickerOpen ? _optionalChain([onCloseContextPicker, 'optionalCall', _209 => _209()]) : _optionalChain([onOpenContextPicker, 'optionalCall', _210 => _210()]),
11366
+ onToggle: () => contextPickerOpen ? _optionalChain([onCloseContextPicker, 'optionalCall', _208 => _208()]) : _optionalChain([onOpenContextPicker, 'optionalCall', _209 => _209()]),
11386
11367
  open: contextPickerOpen,
11387
- disabled: attachmentsDisabled || locked,
11368
+ disabled: attachmentsDisabled,
11388
11369
  dropdown: contextPicker ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
11389
11370
  ChatContextPicker,
11390
11371
  {
11391
11372
  open: contextPickerOpen,
11392
11373
  config: contextPicker,
11393
11374
  selectedItems: selected,
11394
- onToggleItem: (item) => _optionalChain([onToggleContextItem, 'optionalCall', _211 => _211(item)]),
11395
- onClose: () => _optionalChain([onCloseContextPicker, 'optionalCall', _212 => _212()]),
11375
+ onToggleItem: (item) => _optionalChain([onToggleContextItem, 'optionalCall', _210 => _210(item)]),
11376
+ onClose: () => _optionalChain([onCloseContextPicker, 'optionalCall', _211 => _211()]),
11396
11377
  mentionQuery
11397
11378
  }
11398
11379
  ) : void 0
@@ -11430,7 +11411,7 @@ function ChatComposer({
11430
11411
  items: memory,
11431
11412
  onRemove: onRemoveContextMemoryItem,
11432
11413
  resolveIcon: resolveContextIcon,
11433
- disabled: sending || locked,
11414
+ disabled: sending,
11434
11415
  className: "rounded-t-md"
11435
11416
  }
11436
11417
  ),
@@ -11440,7 +11421,7 @@ function ChatComposer({
11440
11421
  items: selected,
11441
11422
  onRemove: onRemoveContextItem,
11442
11423
  resolveIcon: resolveContextIcon,
11443
- disabled: sending || locked,
11424
+ disabled: sending,
11444
11425
  className: _chunkX7CEWD6Vcjs.cn.call(void 0,
11445
11426
  "border-b border-ods-border bg-ods-bg p-2",
11446
11427
  // Only the TOP strip rounds into the card corner.
@@ -11458,7 +11439,7 @@ function ChatComposer({
11458
11439
  attachmentsEnabled: true,
11459
11440
  attachmentsCount,
11460
11441
  onAddFiles,
11461
- disabled: attachmentsDisabled || locked
11442
+ disabled: attachmentsDisabled
11462
11443
  }
11463
11444
  ),
11464
11445
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ModelDisplay, { ...model }) })
@@ -11583,8 +11564,8 @@ ChatSidebarSkeleton.displayName = "ChatSidebarSkeleton";
11583
11564
  var DialogListItem = _react.forwardRef.call(void 0,
11584
11565
  ({ className, dialog, isActive, onDialogSelect, onClick, ...props }, ref) => {
11585
11566
  const handleClick = (e) => {
11586
- _optionalChain([onDialogSelect, 'optionalCall', _213 => _213(dialog.id)]);
11587
- _optionalChain([onClick, 'optionalCall', _214 => _214(e)]);
11567
+ _optionalChain([onDialogSelect, 'optionalCall', _212 => _212(dialog.id)]);
11568
+ _optionalChain([onClick, 'optionalCall', _213 => _213(e)]);
11588
11569
  };
11589
11570
  const formatTimestamp = (timestamp) => {
11590
11571
  return _chunkODB2AEUWcjs.formatDateWithTimezone.call(void 0, timestamp, _chunkODB2AEUWcjs.VIEWER_TIMEZONE, "numericDateTime24h");
@@ -11657,7 +11638,7 @@ var ChatSidebar = _react.forwardRef.call(void 0,
11657
11638
  (entries) => {
11658
11639
  const [entry] = entries;
11659
11640
  if (entry.isIntersecting && !isFetchingRef.current) {
11660
- _optionalChain([onLoadMoreRef, 'access', _215 => _215.current, 'optionalCall', _216 => _216()]);
11641
+ _optionalChain([onLoadMoreRef, 'access', _214 => _214.current, 'optionalCall', _215 => _215()]);
11661
11642
  }
11662
11643
  },
11663
11644
  { root: scrollContainer, rootMargin: "100px", threshold: 0.1 }
@@ -11785,7 +11766,7 @@ function isForeignOriginHref(href) {
11785
11766
  function runNavigation(runtime, href, path, targetPlatform, fallbackNavigate) {
11786
11767
  const isNewTab = runtime ? _chunkODB2AEUWcjs.computeIsNewTab.call(void 0, runtime, href, _nullishCoalesce(targetPlatform, () => ( null))) : false;
11787
11768
  if (isNewTab) {
11788
- if (_optionalChain([runtime, 'optionalAccess', _217 => _217.navigation, 'access', _218 => _218.openExternal])) runtime.navigation.openExternal(href);
11769
+ if (_optionalChain([runtime, 'optionalAccess', _216 => _216.navigation, 'access', _217 => _217.openExternal])) runtime.navigation.openExternal(href);
11789
11770
  else window.open(href, "_blank", NEW_TAB_FEATURES);
11790
11771
  return;
11791
11772
  }
@@ -11793,7 +11774,7 @@ function runNavigation(runtime, href, path, targetPlatform, fallbackNavigate) {
11793
11774
  if (target.includes("#") && _chunkTLLJIGTPcjs.navigateSamePageHash.call(void 0, target, { headerOffset: _chunkTLLJIGTPcjs.STICKY_HEADER_OFFSET_PX })) {
11794
11775
  return;
11795
11776
  }
11796
- const handled = _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _219 => _219.navigation, 'access', _220 => _220.navigate, 'optionalCall', _221 => _221({ href, path, targetPlatform })]), () => ( false));
11777
+ const handled = _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _218 => _218.navigation, 'access', _219 => _219.navigate, 'optionalCall', _220 => _220({ href, path, targetPlatform })]), () => ( false));
11797
11778
  if (!handled) {
11798
11779
  if (fallbackNavigate) fallbackNavigate(target);
11799
11780
  else window.location.assign(target);
@@ -11852,7 +11833,7 @@ function NavLinkAnchorViaRuntime({
11852
11833
  targetPlatform,
11853
11834
  fallbackNavigate: router.push
11854
11835
  });
11855
- if (handled && !isNewTab && _optionalChain([panel, 'optionalAccess', _222 => _222.closeChat])) panel.closeChat();
11836
+ if (handled && !isNewTab && _optionalChain([panel, 'optionalAccess', _221 => _221.closeChat])) panel.closeChat();
11856
11837
  };
11857
11838
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { href: resolvedHref, ..._chunkODB2AEUWcjs.newTabAnchorAttrs.call(void 0, isNewTab), onClick, className, children });
11858
11839
  }
@@ -11979,11 +11960,11 @@ var DEFAULT_CAPTIONS_PATH = "/api/captions";
11979
11960
  function getCaptionsUrl(entityType, entityId, srtContent, options) {
11980
11961
  if (!srtContent) return void 0;
11981
11962
  const hash = `${srtContent.length}-${srtContent.slice(0, 8).replace(/\s/g, "")}`;
11982
- const variant = _optionalChain([options, 'optionalAccess', _223 => _223.variant]) ? `&variant=${options.variant}` : "";
11963
+ const variant = _optionalChain([options, 'optionalAccess', _222 => _222.variant]) ? `&variant=${options.variant}` : "";
11983
11964
  return `${DEFAULT_CAPTIONS_PATH}/${entityType}/${entityId}?v=${hash}${variant}`;
11984
11965
  }
11985
11966
  function resolveCaptionsBase(endpoints) {
11986
- return _optionalChain([endpoints, 'optionalAccess', _224 => _224.captionsUrlPrefix]) || DEFAULT_CAPTIONS_PATH;
11967
+ return _optionalChain([endpoints, 'optionalAccess', _223 => _223.captionsUrlPrefix]) || DEFAULT_CAPTIONS_PATH;
11987
11968
  }
11988
11969
  function rebaseCaptionsUrl(endpoints, url) {
11989
11970
  if (!url || !url.startsWith(`${DEFAULT_CAPTIONS_PATH}/`)) return url;
@@ -12093,7 +12074,7 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
12093
12074
  // src/components/features/use-captions.ts
12094
12075
 
12095
12076
  function useCaptions() {
12096
- const endpoints = _nullishCoalesce(_optionalChain([_chunkU2YLMFJKcjs.useChatRuntime.call(void 0, ), 'optionalAccess', _225 => _225.endpoints]), () => ( null));
12077
+ const endpoints = _nullishCoalesce(_optionalChain([_chunkU2YLMFJKcjs.useChatRuntime.call(void 0, ), 'optionalAccess', _224 => _224.endpoints]), () => ( null));
12097
12078
  return _react.useMemo.call(void 0,
12098
12079
  () => ({
12099
12080
  forEntity: (entityType, entity) => getEntityCaptionUrls(endpoints, entityType, entity),
@@ -12122,11 +12103,11 @@ function fetchPriorityProp(priority) {
12122
12103
  var ENTER_FULLSCREEN_REQUEST = "mediaenterfullscreenrequest";
12123
12104
  function isIosAppShell() {
12124
12105
  const capacitor = globalThis.Capacitor;
12125
- return _optionalChain([capacitor, 'optionalAccess', _226 => _226.isNativePlatform, 'optionalCall', _227 => _227()]) === true && _optionalChain([capacitor, 'access', _228 => _228.getPlatform, 'optionalCall', _229 => _229()]) === "ios";
12106
+ return _optionalChain([capacitor, 'optionalAccess', _225 => _225.isNativePlatform, 'optionalCall', _226 => _226()]) === true && _optionalChain([capacitor, 'access', _227 => _227.getPlatform, 'optionalCall', _228 => _228()]) === "ios";
12126
12107
  }
12127
12108
  function nativeVideoElement(player) {
12128
12109
  const media = player.media;
12129
- const element = _nullishCoalesce(_optionalChain([media, 'optionalAccess', _230 => _230.nativeEl]), () => ( media));
12110
+ const element = _nullishCoalesce(_optionalChain([media, 'optionalAccess', _229 => _229.nativeEl]), () => ( media));
12130
12111
  return element instanceof HTMLVideoElement ? element : null;
12131
12112
  }
12132
12113
  function useIosNativeVideoFullscreen(playerRef) {
@@ -12136,7 +12117,7 @@ function useIosNativeVideoFullscreen(playerRef) {
12136
12117
  if (!(player instanceof EventTarget)) return void 0;
12137
12118
  const takeOver = (event) => {
12138
12119
  const video = nativeVideoElement(player);
12139
- if (!_optionalChain([video, 'optionalAccess', _231 => _231.webkitSupportsFullscreen]) || typeof video.webkitEnterFullscreen !== "function") return;
12120
+ if (!_optionalChain([video, 'optionalAccess', _230 => _230.webkitSupportsFullscreen]) || typeof video.webkitEnterFullscreen !== "function") return;
12140
12121
  event.stopImmediatePropagation();
12141
12122
  video.webkitEnterFullscreen();
12142
12123
  };
@@ -12170,11 +12151,11 @@ function toMuxPreviewUrl(url, maxResolution = "720p") {
12170
12151
  function saveDataEnabled() {
12171
12152
  if (typeof navigator === "undefined") return false;
12172
12153
  const conn = navigator.connection;
12173
- return _optionalChain([conn, 'optionalAccess', _232 => _232.saveData]) === true;
12154
+ return _optionalChain([conn, 'optionalAccess', _231 => _231.saveData]) === true;
12174
12155
  }
12175
12156
  function useVideoOriginPreconnect({ supabaseStorageOrigin } = {}) {
12176
12157
  const runtime = _chunkU2YLMFJKcjs.useChatRuntime.call(void 0, );
12177
- const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _233 => _233.endpoints, 'access', _234 => _234.supabaseStorageOrigin])));
12158
+ const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _232 => _232.endpoints, 'access', _233 => _233.supabaseStorageOrigin])));
12178
12159
  try {
12179
12160
  _reactdom2.default.preconnect(MUX_STREAM_ORIGIN, { crossOrigin: "anonymous" });
12180
12161
  _reactdom2.default.preconnect(MUX_IMAGE_ORIGIN, { crossOrigin: "anonymous" });
@@ -12193,7 +12174,7 @@ function useVideoWarmup({
12193
12174
  nearMargin = "1000px"
12194
12175
  } = {}) {
12195
12176
  const runtime = _chunkU2YLMFJKcjs.useChatRuntime.call(void 0, );
12196
- const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _235 => _235.endpoints, 'access', _236 => _236.supabaseStorageOrigin])));
12177
+ const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _234 => _234.endpoints, 'access', _235 => _235.supabaseStorageOrigin])));
12197
12178
  useVideoOriginPreconnect({ supabaseStorageOrigin: resolvedOrigin });
12198
12179
  const { ref, isNear } = _chunkTLLJIGTPcjs.useNearViewport.call(void 0, nearMargin);
12199
12180
  _react.useEffect.call(void 0, () => {
@@ -12295,7 +12276,7 @@ if (typeof document !== "undefined") {
12295
12276
  }
12296
12277
  if (typeof window !== "undefined") {
12297
12278
  const w = window;
12298
- if (!_optionalChain([w, 'access', _237 => _237.chrome, 'optionalAccess', _238 => _238.cast])) {
12279
+ if (!_optionalChain([w, 'access', _236 => _236.chrome, 'optionalAccess', _237 => _237.cast])) {
12299
12280
  w.chrome = { ..._nullishCoalesce(w.chrome, () => ( {})), cast: { isAvailable: false } };
12300
12281
  }
12301
12282
  }
@@ -12551,7 +12532,7 @@ function FilePlayer({
12551
12532
  const clearPerfListener = _react.useCallback.call(void 0, () => {
12552
12533
  if (perfListenerRef.current) {
12553
12534
  try {
12554
- _optionalChain([hoverPlayerRef, 'access', _239 => _239.current, 'optionalAccess', _240 => _240.removeEventListener, 'optionalCall', _241 => _241("playing", perfListenerRef.current)]);
12535
+ _optionalChain([hoverPlayerRef, 'access', _238 => _238.current, 'optionalAccess', _239 => _239.removeEventListener, 'optionalCall', _240 => _240("playing", perfListenerRef.current)]);
12555
12536
  } catch (e21) {
12556
12537
  }
12557
12538
  perfListenerRef.current = null;
@@ -12586,7 +12567,7 @@ function FilePlayer({
12586
12567
  };
12587
12568
  perfListenerRef.current = onPlaying;
12588
12569
  try {
12589
- _optionalChain([el, 'access', _242 => _242.addEventListener, 'optionalCall', _243 => _243("playing", onPlaying)]);
12570
+ _optionalChain([el, 'access', _241 => _241.addEventListener, 'optionalCall', _242 => _242("playing", onPlaying)]);
12590
12571
  } catch (e22) {
12591
12572
  }
12592
12573
  }
@@ -12594,12 +12575,12 @@ function FilePlayer({
12594
12575
  el.volume = 0.5;
12595
12576
  if (userHasInteracted) {
12596
12577
  el.muted = mutedIntentRef.current;
12597
- _optionalChain([el, 'access', _244 => _244.play, 'optionalCall', _245 => _245(), 'optionalAccess', _246 => _246.catch, 'optionalCall', _247 => _247((err) => {
12598
- const name = _optionalChain([err, 'optionalAccess', _248 => _248.name]);
12578
+ _optionalChain([el, 'access', _243 => _243.play, 'optionalCall', _244 => _244(), 'optionalAccess', _245 => _245.catch, 'optionalCall', _246 => _246((err) => {
12579
+ const name = _optionalChain([err, 'optionalAccess', _247 => _247.name]);
12599
12580
  if (name === "NotAllowedError" && hoverActiveRef.current && generation === hoverGenerationRef.current) {
12600
12581
  try {
12601
12582
  el.muted = true;
12602
- _optionalChain([el, 'access', _249 => _249.play, 'optionalCall', _250 => _250(), 'optionalAccess', _251 => _251.catch, 'optionalCall', _252 => _252(() => {
12583
+ _optionalChain([el, 'access', _248 => _248.play, 'optionalCall', _249 => _249(), 'optionalAccess', _250 => _250.catch, 'optionalCall', _251 => _251(() => {
12603
12584
  if (hoverActiveRef.current && generation === hoverGenerationRef.current) {
12604
12585
  setMutedFallbackBlocked(true);
12605
12586
  }
@@ -12611,7 +12592,7 @@ function FilePlayer({
12611
12592
  })]);
12612
12593
  } else {
12613
12594
  el.muted = true;
12614
- _optionalChain([el, 'access', _253 => _253.play, 'optionalCall', _254 => _254(), 'optionalAccess', _255 => _255.catch, 'optionalCall', _256 => _256(() => {
12595
+ _optionalChain([el, 'access', _252 => _252.play, 'optionalCall', _253 => _253(), 'optionalAccess', _254 => _254.catch, 'optionalCall', _255 => _255(() => {
12615
12596
  if (hoverActiveRef.current && generation === hoverGenerationRef.current) {
12616
12597
  setMutedFallbackBlocked(true);
12617
12598
  }
@@ -12641,7 +12622,7 @@ function FilePlayer({
12641
12622
  clearActivationWaiter();
12642
12623
  clearPerfListener();
12643
12624
  try {
12644
- _optionalChain([hoverPlayerRef, 'access', _257 => _257.current, 'optionalAccess', _258 => _258.pause, 'optionalCall', _259 => _259()]);
12625
+ _optionalChain([hoverPlayerRef, 'access', _256 => _256.current, 'optionalAccess', _257 => _257.pause, 'optionalCall', _258 => _258()]);
12645
12626
  } catch (e26) {
12646
12627
  }
12647
12628
  }, [clearActivationWaiter, clearPerfListener]);
@@ -12653,7 +12634,7 @@ function FilePlayer({
12653
12634
  if (el) {
12654
12635
  el.muted = false;
12655
12636
  el.volume = 0.5;
12656
- _optionalChain([el, 'access', _260 => _260.play, 'optionalCall', _261 => _261(), 'optionalAccess', _262 => _262.catch, 'optionalCall', _263 => _263(() => {
12637
+ _optionalChain([el, 'access', _259 => _259.play, 'optionalCall', _260 => _260(), 'optionalAccess', _261 => _261.catch, 'optionalCall', _262 => _262(() => {
12657
12638
  })]);
12658
12639
  }
12659
12640
  } catch (e27) {
@@ -12673,7 +12654,7 @@ function FilePlayer({
12673
12654
  onMutedFallbackChangeRef.current = onMutedFallbackChange;
12674
12655
  });
12675
12656
  _react.useEffect.call(void 0, () => {
12676
- _optionalChain([onMutedFallbackChangeRef, 'access', _264 => _264.current, 'optionalCall', _265 => _265({
12657
+ _optionalChain([onMutedFallbackChangeRef, 'access', _263 => _263.current, 'optionalCall', _264 => _264({
12677
12658
  muted: hoverMutedFallback,
12678
12659
  blocked: hoverMutedFallback && mutedFallbackBlocked
12679
12660
  })]);
@@ -12692,7 +12673,7 @@ function FilePlayer({
12692
12673
  if (autoPlay) {
12693
12674
  const reportBlocked = () => setMutedFallbackBlocked(true);
12694
12675
  try {
12695
- _optionalChain([mutedEl, 'access', _266 => _266.play, 'optionalCall', _267 => _267(), 'optionalAccess', _268 => _268.catch, 'optionalCall', _269 => _269(reportBlocked)]);
12676
+ _optionalChain([mutedEl, 'access', _265 => _265.play, 'optionalCall', _266 => _266(), 'optionalAccess', _267 => _267.catch, 'optionalCall', _268 => _268(reportBlocked)]);
12696
12677
  } catch (e29) {
12697
12678
  reportBlocked();
12698
12679
  }
@@ -12706,12 +12687,12 @@ function FilePlayer({
12706
12687
  try {
12707
12688
  el.muted = false;
12708
12689
  el.volume = typeof el.volume === "number" ? el.volume : 1;
12709
- _optionalChain([el, 'access', _270 => _270.play, 'optionalCall', _271 => _271(), 'optionalAccess', _272 => _272.catch, 'optionalCall', _273 => _273((err) => {
12710
- const name = _optionalChain([err, 'optionalAccess', _274 => _274.name]);
12690
+ _optionalChain([el, 'access', _269 => _269.play, 'optionalCall', _270 => _270(), 'optionalAccess', _271 => _271.catch, 'optionalCall', _272 => _272((err) => {
12691
+ const name = _optionalChain([err, 'optionalAccess', _273 => _273.name]);
12711
12692
  if (name !== "NotAllowedError") return;
12712
12693
  try {
12713
12694
  el.muted = true;
12714
- _optionalChain([el, 'access', _275 => _275.play, 'optionalCall', _276 => _276(), 'optionalAccess', _277 => _277.catch, 'optionalCall', _278 => _278(() => {
12695
+ _optionalChain([el, 'access', _274 => _274.play, 'optionalCall', _275 => _275(), 'optionalAccess', _276 => _276.catch, 'optionalCall', _277 => _277(() => {
12715
12696
  setMutedFallbackBlocked(true);
12716
12697
  setHoverMutedFallback(true);
12717
12698
  })]);
@@ -12727,7 +12708,7 @@ function FilePlayer({
12727
12708
  }, [autoPlayUnmuted, startMuted, autoPlay]);
12728
12709
  _react.useEffect.call(void 0, () => {
12729
12710
  const el = hoverPlayerRef.current;
12730
- if (!_optionalChain([el, 'optionalAccess', _279 => _279.addEventListener])) return void 0;
12711
+ if (!_optionalChain([el, 'optionalAccess', _278 => _278.addEventListener])) return void 0;
12731
12712
  const onVolumeChange = () => {
12732
12713
  if (el.muted === false) {
12733
12714
  setMutedFallbackBlocked(false);
@@ -12740,14 +12721,14 @@ function FilePlayer({
12740
12721
  }
12741
12722
  return () => {
12742
12723
  try {
12743
- _optionalChain([el, 'access', _280 => _280.removeEventListener, 'optionalCall', _281 => _281("volumechange", onVolumeChange)]);
12724
+ _optionalChain([el, 'access', _279 => _279.removeEventListener, 'optionalCall', _280 => _280("volumechange", onVolumeChange)]);
12744
12725
  } catch (e33) {
12745
12726
  }
12746
12727
  };
12747
12728
  }, []);
12748
12729
  _react.useEffect.call(void 0, () => {
12749
12730
  const el = hoverPlayerRef.current;
12750
- if (!_optionalChain([el, 'optionalAccess', _282 => _282.addEventListener])) return void 0;
12731
+ if (!_optionalChain([el, 'optionalAccess', _281 => _281.addEventListener])) return void 0;
12751
12732
  const onPlaying = () => setMutedFallbackBlocked(false);
12752
12733
  try {
12753
12734
  el.addEventListener("playing", onPlaying);
@@ -12755,7 +12736,7 @@ function FilePlayer({
12755
12736
  }
12756
12737
  return () => {
12757
12738
  try {
12758
- _optionalChain([el, 'access', _283 => _283.removeEventListener, 'optionalCall', _284 => _284("playing", onPlaying)]);
12739
+ _optionalChain([el, 'access', _282 => _282.removeEventListener, 'optionalCall', _283 => _283("playing", onPlaying)]);
12759
12740
  } catch (e35) {
12760
12741
  }
12761
12742
  };
@@ -12766,15 +12747,15 @@ function FilePlayer({
12766
12747
  });
12767
12748
  _react.useEffect.call(void 0, () => {
12768
12749
  const el = hoverPlayerRef.current;
12769
- if (!_optionalChain([el, 'optionalAccess', _285 => _285.addEventListener])) return void 0;
12770
- const handler = () => _optionalChain([onEndedRef, 'access', _286 => _286.current, 'optionalCall', _287 => _287()]);
12750
+ if (!_optionalChain([el, 'optionalAccess', _284 => _284.addEventListener])) return void 0;
12751
+ const handler = () => _optionalChain([onEndedRef, 'access', _285 => _285.current, 'optionalCall', _286 => _286()]);
12771
12752
  try {
12772
12753
  el.addEventListener("ended", handler);
12773
12754
  } catch (e36) {
12774
12755
  }
12775
12756
  return () => {
12776
12757
  try {
12777
- _optionalChain([el, 'access', _288 => _288.removeEventListener, 'optionalCall', _289 => _289("ended", handler)]);
12758
+ _optionalChain([el, 'access', _287 => _287.removeEventListener, 'optionalCall', _288 => _288("ended", handler)]);
12778
12759
  } catch (e37) {
12779
12760
  }
12780
12761
  };
@@ -12783,19 +12764,19 @@ function FilePlayer({
12783
12764
  _react.useImperativeHandle.call(void 0,
12784
12765
  playerHandleRef,
12785
12766
  () => ({
12786
- getCurrentTime: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _290 => _290.current, 'optionalAccess', _291 => _291.currentTime]), () => ( 0)),
12767
+ getCurrentTime: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _289 => _289.current, 'optionalAccess', _290 => _290.currentTime]), () => ( 0)),
12787
12768
  getDuration: () => {
12788
- const d = _optionalChain([hoverPlayerRef, 'access', _292 => _292.current, 'optionalAccess', _293 => _293.duration]);
12769
+ const d = _optionalChain([hoverPlayerRef, 'access', _291 => _291.current, 'optionalAccess', _292 => _292.duration]);
12789
12770
  return typeof d === "number" && isFinite(d) ? d : 0;
12790
12771
  },
12791
- getPaused: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _294 => _294.current, 'optionalAccess', _295 => _295.paused]), () => ( true)),
12792
- getMuted: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _296 => _296.current, 'optionalAccess', _297 => _297.muted]), () => ( false)),
12772
+ getPaused: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _293 => _293.current, 'optionalAccess', _294 => _294.paused]), () => ( true)),
12773
+ getMuted: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _295 => _295.current, 'optionalAccess', _296 => _296.muted]), () => ( false)),
12793
12774
  play: async () => {
12794
- await _optionalChain([hoverPlayerRef, 'access', _298 => _298.current, 'optionalAccess', _299 => _299.play, 'optionalCall', _300 => _300()]);
12775
+ await _optionalChain([hoverPlayerRef, 'access', _297 => _297.current, 'optionalAccess', _298 => _298.play, 'optionalCall', _299 => _299()]);
12795
12776
  },
12796
12777
  pause: () => {
12797
12778
  try {
12798
- _optionalChain([hoverPlayerRef, 'access', _301 => _301.current, 'optionalAccess', _302 => _302.pause, 'optionalCall', _303 => _303()]);
12779
+ _optionalChain([hoverPlayerRef, 'access', _300 => _300.current, 'optionalAccess', _301 => _301.pause, 'optionalCall', _302 => _302()]);
12799
12780
  } catch (e38) {
12800
12781
  }
12801
12782
  },
@@ -12862,10 +12843,10 @@ function FilePlayer({
12862
12843
  if (!el) return;
12863
12844
  const resumeAt = typeof el.currentTime === "number" ? el.currentTime : 0;
12864
12845
  try {
12865
- _optionalChain([el, 'access', _304 => _304.load, 'optionalCall', _305 => _305()]);
12846
+ _optionalChain([el, 'access', _303 => _303.load, 'optionalCall', _304 => _304()]);
12866
12847
  if (resumeAt > 0 && el.addEventListener && el.removeEventListener) {
12867
12848
  const seekBack = () => {
12868
- _optionalChain([el, 'access', _306 => _306.removeEventListener, 'optionalCall', _307 => _307("loadedmetadata", seekBack)]);
12849
+ _optionalChain([el, 'access', _305 => _305.removeEventListener, 'optionalCall', _306 => _306("loadedmetadata", seekBack)]);
12869
12850
  try {
12870
12851
  el.currentTime = resumeAt;
12871
12852
  } catch (e40) {
@@ -12873,7 +12854,7 @@ function FilePlayer({
12873
12854
  };
12874
12855
  el.addEventListener("loadedmetadata", seekBack);
12875
12856
  }
12876
- _optionalChain([el, 'access', _308 => _308.play, 'optionalCall', _309 => _309(), 'optionalAccess', _310 => _310.catch, 'optionalCall', _311 => _311(() => {
12857
+ _optionalChain([el, 'access', _307 => _307.play, 'optionalCall', _308 => _308(), 'optionalAccess', _309 => _309.catch, 'optionalCall', _310 => _310(() => {
12877
12858
  })]);
12878
12859
  } catch (e41) {
12879
12860
  }
@@ -13032,7 +13013,7 @@ function YouTubeFacadeInner({
13032
13013
  const iframe = iframeRef.current;
13033
13014
  if (!iframe) return void 0;
13034
13015
  function subscribe2() {
13035
- _optionalChain([iframe, 'optionalAccess', _312 => _312.contentWindow, 'optionalAccess', _313 => _313.postMessage, 'call', _314 => _314('{"event":"listening"}', YT_NOCOOKIE_ORIGIN)]);
13016
+ _optionalChain([iframe, 'optionalAccess', _311 => _311.contentWindow, 'optionalAccess', _312 => _312.postMessage, 'call', _313 => _313('{"event":"listening"}', YT_NOCOOKIE_ORIGIN)]);
13036
13017
  }
13037
13018
  iframe.addEventListener("load", subscribe2);
13038
13019
  subscribe2();
@@ -13053,13 +13034,13 @@ function YouTubeFacadeInner({
13053
13034
  return;
13054
13035
  }
13055
13036
  if (payload.event !== "infoDelivery") return;
13056
- const state = _optionalChain([payload, 'access', _315 => _315.info, 'optionalAccess', _316 => _316.playerState]);
13037
+ const state = _optionalChain([payload, 'access', _314 => _314.info, 'optionalAccess', _315 => _315.playerState]);
13057
13038
  if (typeof state !== "number") return;
13058
13039
  if (state === YT_STATE_PLAYING) {
13059
13040
  if (blurTimer !== null) return;
13060
13041
  blurTimer = setTimeout(() => {
13061
13042
  blurTimer = null;
13062
- _optionalChain([iframeRef, 'access', _317 => _317.current, 'optionalAccess', _318 => _318.blur, 'call', _319 => _319()]);
13043
+ _optionalChain([iframeRef, 'access', _316 => _316.current, 'optionalAccess', _317 => _317.blur, 'call', _318 => _318()]);
13063
13044
  }, YT_PLAYING_BLUR_DELAY_MS);
13064
13045
  return;
13065
13046
  }
@@ -13080,7 +13061,7 @@ function YouTubeFacadeInner({
13080
13061
  prevSuspendedRef.current = Boolean(suspended);
13081
13062
  if (!activated) return;
13082
13063
  if (suspended && !wasSuspended) {
13083
- _optionalChain([iframeRef, 'access', _320 => _320.current, 'optionalAccess', _321 => _321.contentWindow, 'optionalAccess', _322 => _322.postMessage, 'call', _323 => _323(
13064
+ _optionalChain([iframeRef, 'access', _319 => _319.current, 'optionalAccess', _320 => _320.contentWindow, 'optionalAccess', _321 => _321.postMessage, 'call', _322 => _322(
13084
13065
  '{"event":"command","func":"pauseVideo","args":[]}',
13085
13066
  YT_NOCOOKIE_ORIGIN
13086
13067
  )]);
@@ -13334,7 +13315,7 @@ function CardsStrip(props) {
13334
13315
  _react.useEffect.call(void 0, () => {
13335
13316
  const el = wrapperRef.current;
13336
13317
  if (!el || typeof IntersectionObserver === "undefined") return void 0;
13337
- const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access', _324 => _324[0], 'optionalAccess', _325 => _325.isIntersecting]), () => ( true))), {
13318
+ const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access', _323 => _323[0], 'optionalAccess', _324 => _324.isIntersecting]), () => ( true))), {
13338
13319
  rootMargin: "200px"
13339
13320
  });
13340
13321
  io.observe(el);
@@ -13356,9 +13337,9 @@ function CardsStrip(props) {
13356
13337
  const p = hoverPointerRef.current;
13357
13338
  if (!p.inside) return;
13358
13339
  const el = typeof document !== "undefined" ? document.elementFromPoint(p.x, p.y) : null;
13359
- const cardEl = _optionalChain([el, 'optionalAccess', _326 => _326.closest, 'optionalCall', _327 => _327("[data-strip-card-key]")]);
13360
- const scoped = cardEl && _optionalChain([scrollerRef, 'access', _328 => _328.current, 'optionalAccess', _329 => _329.contains, 'call', _330 => _330(cardEl)]) ? cardEl : null;
13361
- const key = _nullishCoalesce(_optionalChain([scoped, 'optionalAccess', _331 => _331.getAttribute, 'call', _332 => _332("data-strip-card-key")]), () => ( null));
13340
+ const cardEl = _optionalChain([el, 'optionalAccess', _325 => _325.closest, 'optionalCall', _326 => _326("[data-strip-card-key]")]);
13341
+ const scoped = cardEl && _optionalChain([scrollerRef, 'access', _327 => _327.current, 'optionalAccess', _328 => _328.contains, 'call', _329 => _329(cardEl)]) ? cardEl : null;
13342
+ const key = _nullishCoalesce(_optionalChain([scoped, 'optionalAccess', _330 => _330.getAttribute, 'call', _331 => _331("data-strip-card-key")]), () => ( null));
13362
13343
  const current = activeKeyRef.current;
13363
13344
  if (key === current) return;
13364
13345
  if (current !== null) deactivate(current);
@@ -13396,7 +13377,7 @@ function CardsStrip(props) {
13396
13377
  }, [syncHoverToPointer]);
13397
13378
  const seamBuffer = _react.useCallback.call(void 0, () => {
13398
13379
  const half = singleCopyWidthRef.current;
13399
- const viewport = _nullishCoalesce(_optionalChain([scrollerRef, 'access', _333 => _333.current, 'optionalAccess', _334 => _334.clientWidth]), () => ( 0));
13380
+ const viewport = _nullishCoalesce(_optionalChain([scrollerRef, 'access', _332 => _332.current, 'optionalAccess', _333 => _333.clientWidth]), () => ( 0));
13400
13381
  return Math.max(0, Math.min(200, half / 4, half - viewport - TRACK_GAP_PX - 1));
13401
13382
  }, []);
13402
13383
  const { posRef: marqueePosRef, glideBy } = _chunkTLLJIGTPcjs.useMarqueeEngine.call(void 0, {
@@ -13412,7 +13393,7 @@ function CardsStrip(props) {
13412
13393
  const scroller = scrollerRef.current;
13413
13394
  if (scroller) scroller.scrollLeft = pos;
13414
13395
  },
13415
- readBack: () => _nullishCoalesce(_optionalChain([scrollerRef, 'access', _335 => _335.current, 'optionalAccess', _336 => _336.scrollLeft]), () => ( 0)),
13396
+ readBack: () => _nullishCoalesce(_optionalChain([scrollerRef, 'access', _334 => _334.current, 'optionalAccess', _335 => _335.scrollLeft]), () => ( 0)),
13416
13397
  onAfterFrame: syncHoverIfScrolled
13417
13398
  });
13418
13399
  const [mountedIdx, setMountedIdx] = _react.useState.call(void 0, () => /* @__PURE__ */ new Set());
@@ -13460,11 +13441,11 @@ function CardsStrip(props) {
13460
13441
  fn = (el) => {
13461
13442
  if (!el) return void 0;
13462
13443
  cardElIdxRef.current.set(el, idx);
13463
- _optionalChain([cardObserverRef, 'access', _337 => _337.current, 'optionalAccess', _338 => _338.observe, 'call', _339 => _339(el)]);
13444
+ _optionalChain([cardObserverRef, 'access', _336 => _336.current, 'optionalAccess', _337 => _337.observe, 'call', _338 => _338(el)]);
13464
13445
  return () => {
13465
13446
  cardElIdxRef.current.delete(el);
13466
13447
  cardElNearRef.current.delete(el);
13467
- _optionalChain([cardObserverRef, 'access', _340 => _340.current, 'optionalAccess', _341 => _341.unobserve, 'call', _342 => _342(el)]);
13448
+ _optionalChain([cardObserverRef, 'access', _339 => _339.current, 'optionalAccess', _340 => _340.unobserve, 'call', _341 => _341(el)]);
13468
13449
  };
13469
13450
  };
13470
13451
  cardRefFns.set(idx, fn);
@@ -13483,7 +13464,7 @@ function CardsStrip(props) {
13483
13464
  const track = trackRef.current;
13484
13465
  if (!scroller || !track) return;
13485
13466
  const firstCard = track.firstElementChild;
13486
- const step = (_nullishCoalesce(_optionalChain([firstCard, 'optionalAccess', _343 => _343.offsetWidth]), () => ( 320))) + TRACK_GAP_PX;
13467
+ const step = (_nullishCoalesce(_optionalChain([firstCard, 'optionalAccess', _342 => _342.offsetWidth]), () => ( 320))) + TRACK_GAP_PX;
13487
13468
  chevronSuppressUntilRef.current = performance.now() + CHEVRON_SUPPRESS_MS;
13488
13469
  if (marqueeActiveRef.current) {
13489
13470
  glideBy(dir * step);
@@ -13540,7 +13521,7 @@ function CardsStrip(props) {
13540
13521
  {
13541
13522
  ref: (node) => {
13542
13523
  wrapperRef.current = node;
13543
- _optionalChain([rootRef, 'optionalCall', _344 => _344(node)]);
13524
+ _optionalChain([rootRef, 'optionalCall', _343 => _343(node)]);
13544
13525
  },
13545
13526
  className: _chunkX7CEWD6Vcjs.cn.call(void 0, "flex w-full min-w-0 flex-col gap-6", className),
13546
13527
  children: [
@@ -13652,7 +13633,7 @@ function VideoHoverPreviewSurface({
13652
13633
  if (gateControlled) return void 0;
13653
13634
  const el = rootElRef.current;
13654
13635
  if (!el || typeof IntersectionObserver === "undefined") return void 0;
13655
- const io = new IntersectionObserver((entries) => setIsNear(_nullishCoalesce(_optionalChain([entries, 'access', _345 => _345[0], 'optionalAccess', _346 => _346.isIntersecting]), () => ( false))), {
13636
+ const io = new IntersectionObserver((entries) => setIsNear(_nullishCoalesce(_optionalChain([entries, 'access', _344 => _344[0], 'optionalAccess', _345 => _345.isIntersecting]), () => ( false))), {
13656
13637
  rootMargin: _chunkTLLJIGTPcjs.NEAR_VIEWPORT_ROOT_MARGIN
13657
13638
  });
13658
13639
  io.observe(el);
@@ -13797,7 +13778,7 @@ function VideoBitesStrip({
13797
13778
  const filtered = filterPublished ? bites.filter((b) => b.published) : [...bites];
13798
13779
  return filtered.sort(sortComparator);
13799
13780
  }, [bites, filterPublished, sortComparator]);
13800
- const warmup = useVideoWarmup({ videoUrl: _optionalChain([items, 'access', _347 => _347[0], 'optionalAccess', _348 => _348.url]) || null });
13781
+ const warmup = useVideoWarmup({ videoUrl: _optionalChain([items, 'access', _346 => _346[0], 'optionalAccess', _347 => _347.url]) || null });
13801
13782
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
13802
13783
  CardsStrip,
13803
13784
  {
@@ -13864,8 +13845,8 @@ function VideoBiteCard({
13864
13845
  const controlled = active !== void 0;
13865
13846
  const [selfActive, setSelfActive] = _react.useState.call(void 0, false);
13866
13847
  const isActive = controlled ? !!active : selfActive;
13867
- const activate = () => controlled ? _optionalChain([onActivate, 'optionalCall', _349 => _349(key)]) : setSelfActive(true);
13868
- const deactivate = () => controlled ? _optionalChain([onDeactivate, 'optionalCall', _350 => _350(key)]) : setSelfActive(false);
13848
+ const activate = () => controlled ? _optionalChain([onActivate, 'optionalCall', _348 => _348(key)]) : setSelfActive(true);
13849
+ const deactivate = () => controlled ? _optionalChain([onDeactivate, 'optionalCall', _349 => _349(key)]) : setSelfActive(false);
13869
13850
  const titleInputRef = _react.useRef.call(void 0, null);
13870
13851
  _chunkTLLJIGTPcjs.useIsomorphicLayoutEffect.call(void 0, () => {
13871
13852
  const el = titleInputRef.current;
@@ -13875,7 +13856,7 @@ function VideoBiteCard({
13875
13856
  });
13876
13857
  const navigate = () => {
13877
13858
  if (bite.onNavigate) bite.onNavigate();
13878
- else _optionalChain([onBiteNavigate, 'optionalCall', _351 => _351(bite, index)]);
13859
+ else _optionalChain([onBiteNavigate, 'optionalCall', _350 => _350(bite, index)]);
13879
13860
  };
13880
13861
  const handlePointerEnter = () => {
13881
13862
  if (!isTouch) activate();
@@ -13900,9 +13881,9 @@ function VideoBiteCard({
13900
13881
  placeholder: "Title (optional)",
13901
13882
  "aria-label": "Bite title",
13902
13883
  rows: 1,
13903
- onChange: (e) => _optionalChain([onTitleChange, 'optionalCall', _352 => _352(e.target.value)]),
13884
+ onChange: (e) => _optionalChain([onTitleChange, 'optionalCall', _351 => _351(e.target.value)]),
13904
13885
  ref: titleInputRef,
13905
- onBlur: (e) => _optionalChain([onTitleCommit, 'optionalCall', _353 => _353(e.target.value)]),
13886
+ onBlur: (e) => _optionalChain([onTitleCommit, 'optionalCall', _352 => _352(e.target.value)]),
13906
13887
  onClick: (e) => e.stopPropagation(),
13907
13888
  className: _chunkX7CEWD6Vcjs.cn.call(void 0,
13908
13889
  titleClass,
@@ -13979,7 +13960,7 @@ function VideoBiteCard({
13979
13960
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
13980
13961
  "div",
13981
13962
  {
13982
- ref: (node) => _optionalChain([rootRef, 'optionalCall', _354 => _354(node)]),
13963
+ ref: (node) => _optionalChain([rootRef, 'optionalCall', _353 => _353(node)]),
13983
13964
  "aria-hidden": isClone || void 0,
13984
13965
  "data-strip-card-key": key,
13985
13966
  className: _chunkX7CEWD6Vcjs.cn.call(void 0,
@@ -14034,8 +14015,8 @@ function EntityVideoSection({
14034
14015
  const hasHighlight = !!highlightVideoUrl;
14035
14016
  const hasVideo = hasFullVideo || hasHighlight;
14036
14017
  const derivedCaptions = captionsEntity ? captions.forEntityId(captionsEntity.type, captionsEntity.id) : null;
14037
- const captionsUrl = _nullishCoalesce(captionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _355 => _355.captionsUrl])));
14038
- const highlightCaptionsUrl = _nullishCoalesce(highlightCaptionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _356 => _356.highlightCaptionsUrl])));
14018
+ const captionsUrl = _nullishCoalesce(captionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _354 => _354.captionsUrl])));
14019
+ const highlightCaptionsUrl = _nullishCoalesce(highlightCaptionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _355 => _355.highlightCaptionsUrl])));
14039
14020
  if (!hasVideo && !videoSummary && (!videoBites || videoBites.length === 0)) {
14040
14021
  return null;
14041
14022
  }
@@ -14554,7 +14535,7 @@ function DataRoomDocCard({ item, className, badgeText, anchorProps }) {
14554
14535
  ] }) : null,
14555
14536
  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
14556
14537
  ] }),
14557
- _optionalChain([anchorProps, 'optionalAccess', _357 => _357.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
14538
+ _optionalChain([anchorProps, 'optionalAccess', _356 => _356.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
14558
14539
  ] });
14559
14540
  if (!anchorProps) {
14560
14541
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${_chunkODB2AEUWcjs.COMPACT_CARD_OUTER_STATIC} ${_nullishCoalesce(className, () => ( ""))}`, "aria-label": "No link available", children: body });
@@ -14582,7 +14563,7 @@ function DataRoomDocCardSkeleton({ className }) {
14582
14563
 
14583
14564
 
14584
14565
  function CampaignCardAdmin({ campaign, className, anchorProps }) {
14585
- const goalsCount = _optionalChain([campaign, 'access', _358 => _358.goals, 'optionalAccess', _359 => _359.length]) || 0;
14566
+ const goalsCount = _optionalChain([campaign, 'access', _357 => _357.goals, 'optionalAccess', _358 => _358.length]) || 0;
14586
14567
  const innerChildren = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
14587
14568
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkODB2AEUWcjs.COMPACT_CARD_ICON_SLOT, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Megaphone, { className: "h-5 w-5" }) }),
14588
14569
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkODB2AEUWcjs.COMPACT_CARD_TEXT_COL, children: [
@@ -14876,7 +14857,7 @@ function pickFetchedCardHref({
14876
14857
  itemHref,
14877
14858
  allowComposed
14878
14859
  }) {
14879
- if (_optionalChain([composed, 'optionalAccess', _360 => _360.hostOverride])) {
14860
+ if (_optionalChain([composed, 'optionalAccess', _359 => _359.hostOverride])) {
14880
14861
  return { source: "hostOverride", href: composed.href, targetPlatform: composed.targetPlatform };
14881
14862
  }
14882
14863
  if (itemHref) return { source: "item", href: itemHref };
@@ -15150,7 +15131,7 @@ function byKey(key) {
15150
15131
  return PLATFORM_DOMAINS.find((e) => e.key === key);
15151
15132
  }
15152
15133
  function envOverrideFor(key) {
15153
- const envVar = _optionalChain([byKey, 'call', _361 => _361(key), 'optionalAccess', _362 => _362.envVar]);
15134
+ const envVar = _optionalChain([byKey, 'call', _360 => _360(key), 'optionalAccess', _361 => _361.envVar]);
15154
15135
  if (!envVar) return null;
15155
15136
  return ENV_OVERRIDES[envVar] || null;
15156
15137
  }
@@ -15160,7 +15141,7 @@ function ensureScheme(url) {
15160
15141
  return `https://${trimmed.replace(/^\/+/, "")}`;
15161
15142
  }
15162
15143
  function getPlatformProductionUrl(platform) {
15163
- const resolved = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(envOverrideFor(platform), () => ( _optionalChain([byKey, 'call', _363 => _363(platform), 'optionalAccess', _364 => _364.defaultUrl]))), () => ( envOverrideFor("flamingo"))), () => ( "https://www.flamingo.run"));
15144
+ const resolved = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(envOverrideFor(platform), () => ( _optionalChain([byKey, 'call', _362 => _362(platform), 'optionalAccess', _363 => _363.defaultUrl]))), () => ( envOverrideFor("flamingo"))), () => ( "https://www.flamingo.run"));
15164
15145
  return ensureScheme(resolved);
15165
15146
  }
15166
15147
  function getPlatformUrl(platform, options = {}) {
@@ -15169,7 +15150,7 @@ function getPlatformUrl(platform, options = {}) {
15169
15150
  }
15170
15151
  function getDeploymentUrl(options) {
15171
15152
  if (typeof window !== "undefined") return window.location.origin;
15172
- const configured = _optionalChain([options, 'access', _365 => _365.configuredUrl, 'optionalAccess', _366 => _366.trim, 'call', _367 => _367()]);
15153
+ const configured = _optionalChain([options, 'access', _364 => _364.configuredUrl, 'optionalAccess', _365 => _365.trim, 'call', _366 => _366()]);
15173
15154
  if (configured) return ensureScheme(configured).replace(/\/+$/, "");
15174
15155
  if (process.env.VERCEL_ENV === "preview" && process.env.VERCEL_URL) {
15175
15156
  return ensureScheme(process.env.VERCEL_URL).replace(/\/+$/, "");
@@ -15191,7 +15172,7 @@ function getRequestOrigin(headers, options) {
15191
15172
  const host = headers.get("host");
15192
15173
  if (!host) return getDeploymentUrl(options);
15193
15174
  const local = LOCAL_HOSTNAME.test(host.replace(/:\d+$/, ""));
15194
- const proto = _optionalChain([headers, 'access', _368 => _368.get, 'call', _369 => _369("x-forwarded-proto"), 'optionalAccess', _370 => _370.split, 'call', _371 => _371(","), 'access', _372 => _372[0], 'access', _373 => _373.trim, 'call', _374 => _374()]) || (local ? "http" : "https");
15175
+ const proto = _optionalChain([headers, 'access', _367 => _367.get, 'call', _368 => _368("x-forwarded-proto"), 'optionalAccess', _369 => _369.split, 'call', _370 => _370(","), 'access', _371 => _371[0], 'access', _372 => _372.trim, 'call', _373 => _373()]) || (local ? "http" : "https");
15195
15176
  return `${proto}://${host}`;
15196
15177
  }
15197
15178
  function resolveRedirectTarget(origin, target) {
@@ -15220,7 +15201,7 @@ function toRegistrableBaseDomain(host) {
15220
15201
  return void 0;
15221
15202
  }
15222
15203
  function aliasHostsOf(key) {
15223
- return _nullishCoalesce(_optionalChain([byKey, 'call', _375 => _375(key), 'optionalAccess', _376 => _376.aliasHostnames]), () => ( []));
15204
+ return _nullishCoalesce(_optionalChain([byKey, 'call', _374 => _374(key), 'optionalAccess', _375 => _375.aliasHostnames]), () => ( []));
15224
15205
  }
15225
15206
  function hostsForEntry(entry, opts) {
15226
15207
  const resolved = hostOf(getPlatformProductionUrl(entry.key));
@@ -15279,13 +15260,13 @@ function recordCountLabel(count) {
15279
15260
  }
15280
15261
  function buildGroupedSource(spec) {
15281
15262
  const first = spec.rows[0];
15282
- const externalUrl = _nullishCoalesce(spec.externalUrl, () => ( _optionalChain([first, 'optionalAccess', _377 => _377.externalUrl])));
15283
- const targetPlatform = spec.targetPlatform !== void 0 ? spec.targetPlatform : _optionalChain([first, 'optionalAccess', _378 => _378.targetPlatform]);
15263
+ const externalUrl = _nullishCoalesce(spec.externalUrl, () => ( _optionalChain([first, 'optionalAccess', _376 => _376.externalUrl])));
15264
+ const targetPlatform = spec.targetPlatform !== void 0 ? spec.targetPlatform : _optionalChain([first, 'optionalAccess', _377 => _377.targetPlatform]);
15284
15265
  return {
15285
15266
  index: spec.index,
15286
15267
  name: `${getSourceLabel(spec.sourceRepo)} ${recordCountLabel(spec.rows.length)}`,
15287
- path: _nullishCoalesce(_optionalChain([first, 'optionalAccess', _379 => _379.path]), () => ( "")),
15288
- documentType: _nullishCoalesce(_optionalChain([first, 'optionalAccess', _380 => _380.documentType]), () => ( "")),
15268
+ path: _nullishCoalesce(_optionalChain([first, 'optionalAccess', _378 => _378.path]), () => ( "")),
15269
+ documentType: _nullishCoalesce(_optionalChain([first, 'optionalAccess', _379 => _379.documentType]), () => ( "")),
15289
15270
  ...externalUrl ? { externalUrl } : {},
15290
15271
  targetPlatform: _nullishCoalesce(targetPlatform, () => ( null)),
15291
15272
  sourceRepo: spec.sourceRepo,
@@ -15354,7 +15335,7 @@ function groupSourcesByTable(sources2) {
15354
15335
  index: source.index,
15355
15336
  sourceRepo: source.sourceRepo,
15356
15337
  rows: uniqueRows(members.flatMap(rowsOf)),
15357
- ..._optionalChain([serverChip, 'optionalAccess', _381 => _381.externalUrl]) ? { externalUrl: serverChip.externalUrl } : {},
15338
+ ..._optionalChain([serverChip, 'optionalAccess', _380 => _380.externalUrl]) ? { externalUrl: serverChip.externalUrl } : {},
15358
15339
  ...serverChip && serverChip.targetPlatform !== void 0 ? { targetPlatform: serverChip.targetPlatform } : {}
15359
15340
  })
15360
15341
  );
@@ -15404,7 +15385,7 @@ function resolveSourceRowCTA(row, ctx = {}) {
15404
15385
  if (row.path && shouldFallbackToPathNav(row) && !row.externalUrl) {
15405
15386
  const safePath = sanitizePath(row.path);
15406
15387
  if (safePath) {
15407
- const docTarget = row.documentType ? _optionalChain([ctx, 'access', _382 => _382.docPlatformTargets, 'optionalAccess', _383 => _383[row.documentType]]) : void 0;
15388
+ const docTarget = row.documentType ? _optionalChain([ctx, 'access', _381 => _381.docPlatformTargets, 'optionalAccess', _382 => _382[row.documentType]]) : void 0;
15408
15389
  if (docTarget) {
15409
15390
  const seg = docTarget.basePath.split("/").filter(Boolean).join("/");
15410
15391
  const base = `${getPlatformUrl(docTarget.platform)}${seg ? `/${seg}` : ""}/`;
@@ -15547,8 +15528,8 @@ function cardMenuGroups(href, discuss, openDetails, externalLink) {
15547
15528
  if (href) {
15548
15529
  items.push({
15549
15530
  id: "open-details",
15550
- label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _384 => _384.label]), () => ( "Open Details")),
15551
- icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _385 => _385.icon]), () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.EyeIcon, { size: 20 }))),
15531
+ label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _383 => _383.label]), () => ( "Open Details")),
15532
+ icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _384 => _384.icon]), () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.EyeIcon, { size: 20 }))),
15552
15533
  // Main row → open the entity (same tab, soft Link nav).
15553
15534
  href,
15554
15535
  // Trailing 40px ↗ side-button → open in a new tab.
@@ -15608,18 +15589,18 @@ function itemVideoMetadata(item) {
15608
15589
  for (const v of vals) if (typeof v === "string" && v.length > 0) return v;
15609
15590
  return void 0;
15610
15591
  };
15611
- const m = _nullishCoalesce(_optionalChain([item, 'optionalAccess', _386 => _386.metadata]), () => ( {}));
15592
+ const m = _nullishCoalesce(_optionalChain([item, 'optionalAccess', _385 => _385.metadata]), () => ( {}));
15612
15593
  const out = {};
15613
- const videoUrl = pick(m.videoUrl, _optionalChain([item, 'optionalAccess', _387 => _387.custom_video_url]), _optionalChain([item, 'optionalAccess', _388 => _388.main_video_url]));
15614
- const youtubeUrl = pick(m.youtubeUrl, _optionalChain([item, 'optionalAccess', _389 => _389.youtube_url]), _optionalChain([item, 'optionalAccess', _390 => _390.testimonial_video_url]));
15615
- const highlightVideoUrl = pick(m.highlightVideoUrl, _optionalChain([item, 'optionalAccess', _391 => _391.highlight_video_url]));
15594
+ const videoUrl = pick(m.videoUrl, _optionalChain([item, 'optionalAccess', _386 => _386.custom_video_url]), _optionalChain([item, 'optionalAccess', _387 => _387.main_video_url]));
15595
+ const youtubeUrl = pick(m.youtubeUrl, _optionalChain([item, 'optionalAccess', _388 => _388.youtube_url]), _optionalChain([item, 'optionalAccess', _389 => _389.testimonial_video_url]));
15596
+ const highlightVideoUrl = pick(m.highlightVideoUrl, _optionalChain([item, 'optionalAccess', _390 => _390.highlight_video_url]));
15616
15597
  const videoPoster = pick(
15617
15598
  m.videoPoster,
15618
- _optionalChain([item, 'optionalAccess', _392 => _392.main_video_thumbnail]),
15619
- _optionalChain([item, 'optionalAccess', _393 => _393.highlight_video_thumbnail]),
15620
- _optionalChain([item, 'optionalAccess', _394 => _394.featured_image])
15599
+ _optionalChain([item, 'optionalAccess', _391 => _391.main_video_thumbnail]),
15600
+ _optionalChain([item, 'optionalAccess', _392 => _392.highlight_video_thumbnail]),
15601
+ _optionalChain([item, 'optionalAccess', _393 => _393.featured_image])
15621
15602
  );
15622
- const highlightVideoPoster = pick(m.highlightVideoPoster, _optionalChain([item, 'optionalAccess', _395 => _395.highlight_video_thumbnail]));
15603
+ const highlightVideoPoster = pick(m.highlightVideoPoster, _optionalChain([item, 'optionalAccess', _394 => _394.highlight_video_thumbnail]));
15623
15604
  if (videoUrl) out.videoUrl = videoUrl;
15624
15605
  if (youtubeUrl) out.youtubeUrl = youtubeUrl;
15625
15606
  if (highlightVideoUrl) out.highlightVideoUrl = highlightVideoUrl;
@@ -15649,15 +15630,15 @@ function fetchedItemDisplayRef(item, chatRef) {
15649
15630
  }
15650
15631
  function fetchedFaqDisplayRef(item, chatRef) {
15651
15632
  const it = item;
15652
- const answer = typeof _optionalChain([it, 'optionalAccess', _396 => _396.answer]) === "string" && it.answer.trim().length > 0 ? it.answer.trim() : null;
15633
+ const answer = typeof _optionalChain([it, 'optionalAccess', _395 => _395.answer]) === "string" && it.answer.trim().length > 0 ? it.answer.trim() : null;
15653
15634
  return {
15654
15635
  type: "faq",
15655
15636
  id: chatRef.id,
15656
15637
  sourceRepo: chatRef.sourceRepo,
15657
- title: typeof _optionalChain([it, 'optionalAccess', _397 => _397.question]) === "string" && it.question ? it.question : chatRef.id,
15638
+ title: typeof _optionalChain([it, 'optionalAccess', _396 => _396.question]) === "string" && it.question ? it.question : chatRef.id,
15658
15639
  url: _nullishCoalesce(chatRef.url, () => ( null)),
15659
15640
  ...answer ? { preview: answer.length > 400 ? `${answer.slice(0, 397)}\u2026` : answer } : {},
15660
- metadata: typeof _optionalChain([it, 'optionalAccess', _398 => _398.section]) === "string" && it.section ? { section: it.section } : {}
15641
+ metadata: typeof _optionalChain([it, 'optionalAccess', _397 => _397.section]) === "string" && it.section ? { section: it.section } : {}
15661
15642
  };
15662
15643
  }
15663
15644
  function HubspotTicketChatCard({
@@ -15665,8 +15646,8 @@ function HubspotTicketChatCard({
15665
15646
  isNewTab,
15666
15647
  discuss
15667
15648
  }) {
15668
- const status = typeof _optionalChain([chatRef, 'access', _399 => _399.metadata, 'optionalAccess', _400 => _400.status]) === "string" ? chatRef.metadata.status : void 0;
15669
- const statusLabel = typeof _optionalChain([chatRef, 'access', _401 => _401.metadata, 'optionalAccess', _402 => _402.statusLabel]) === "string" ? chatRef.metadata.statusLabel : void 0;
15649
+ const status = typeof _optionalChain([chatRef, 'access', _398 => _398.metadata, 'optionalAccess', _399 => _399.status]) === "string" ? chatRef.metadata.status : void 0;
15650
+ const statusLabel = typeof _optionalChain([chatRef, 'access', _400 => _400.metadata, 'optionalAccess', _401 => _401.statusLabel]) === "string" ? chatRef.metadata.statusLabel : void 0;
15670
15651
  const statusText = _nullishCoalesce(statusLabel, () => ( formatStatusToken(status)));
15671
15652
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15672
15653
  MingoInfoCard,
@@ -15689,7 +15670,7 @@ function FaqChatCard({
15689
15670
  isNewTab,
15690
15671
  discuss
15691
15672
  }) {
15692
- const section = typeof _optionalChain([chatRef, 'access', _403 => _403.metadata, 'optionalAccess', _404 => _404.section]) === "string" ? chatRef.metadata.section.trim() : void 0;
15673
+ const section = typeof _optionalChain([chatRef, 'access', _402 => _402.metadata, 'optionalAccess', _403 => _403.section]) === "string" ? chatRef.metadata.section.trim() : void 0;
15693
15674
  const statusLabel = section && section.length > 0 ? section : "FAQ";
15694
15675
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15695
15676
  MingoInfoCard,
@@ -15709,7 +15690,7 @@ function SlackChatCard({
15709
15690
  isNewTab,
15710
15691
  discuss
15711
15692
  }) {
15712
- const channelName = typeof _optionalChain([chatRef, 'access', _405 => _405.metadata, 'optionalAccess', _406 => _406.channelName]) === "string" ? chatRef.metadata.channelName.trim() : void 0;
15693
+ const channelName = typeof _optionalChain([chatRef, 'access', _404 => _404.metadata, 'optionalAccess', _405 => _405.channelName]) === "string" ? chatRef.metadata.channelName.trim() : void 0;
15713
15694
  const channelPretty = channelName ? channelName.startsWith("#") ? channelName : `#${channelName}` : void 0;
15714
15695
  const title = channelPretty ? `${chatRef.title} \xB7 ${channelPretty}` : chatRef.title;
15715
15696
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -15767,7 +15748,7 @@ function GenericFinancialChatCard({
15767
15748
  isNewTab,
15768
15749
  discuss
15769
15750
  }) {
15770
- const subtitle = typeof _optionalChain([chatRef, 'access', _407 => _407.metadata, 'optionalAccess', _408 => _408.subtitle]) === "string" ? chatRef.metadata.subtitle : void 0;
15751
+ const subtitle = typeof _optionalChain([chatRef, 'access', _406 => _406.metadata, 'optionalAccess', _407 => _407.subtitle]) === "string" ? chatRef.metadata.subtitle : void 0;
15771
15752
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15772
15753
  MingoInfoCard,
15773
15754
  {
@@ -15836,12 +15817,12 @@ function ProductReleaseChatCard({
15836
15817
  discuss
15837
15818
  }) {
15838
15819
  const releaseProps = buildProps(item);
15839
- const status = _optionalChain([item, 'optionalAccess', _409 => _409.version]) ? { label: String(item.version), variant: "grey" } : { label: "Release", variant: "grey" };
15820
+ const status = _optionalChain([item, 'optionalAccess', _408 => _408.version]) ? { label: String(item.version), variant: "grey" } : { label: "Release", variant: "grey" };
15840
15821
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15841
15822
  EntityMingoCard,
15842
15823
  {
15843
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _410 => _410.title]), () => ( "")),
15844
- description: _optionalChain([item, 'optionalAccess', _411 => _411.summary]) || releaseProps.formattedDate || void 0,
15824
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _409 => _409.title]), () => ( "")),
15825
+ description: _optionalChain([item, 'optionalAccess', _410 => _410.summary]) || releaseProps.formattedDate || void 0,
15845
15826
  cover: releaseProps.coverImage || void 0,
15846
15827
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.Rocket02Icon, { size: 24 }),
15847
15828
  status,
@@ -15858,17 +15839,17 @@ function CampaignChatCard({
15858
15839
  isNewTab,
15859
15840
  discuss
15860
15841
  }) {
15861
- const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess', _412 => _412.goals])) ? item.goals.length : 0;
15842
+ const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess', _411 => _411.goals])) ? item.goals.length : 0;
15862
15843
  const meta = [
15863
- _optionalChain([item, 'optionalAccess', _413 => _413.start_date]) ? _chunkODB2AEUWcjs.formatDateShort.call(void 0, item.start_date) : null,
15844
+ _optionalChain([item, 'optionalAccess', _412 => _412.start_date]) ? _chunkODB2AEUWcjs.formatDateShort.call(void 0, item.start_date) : null,
15864
15845
  goalsCount > 0 ? `${goalsCount} goal${goalsCount !== 1 ? "s" : ""}` : null,
15865
15846
  "Marketing campaign"
15866
15847
  ].filter(Boolean).join(" \xB7 ");
15867
15848
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15868
15849
  EntityMingoCard,
15869
15850
  {
15870
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _414 => _414.name]), () => ( "")),
15871
- description: meta || _optionalChain([item, 'optionalAccess', _415 => _415.description]) || void 0,
15851
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _413 => _413.name]), () => ( "")),
15852
+ description: meta || _optionalChain([item, 'optionalAccess', _414 => _414.description]) || void 0,
15872
15853
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.Megaphone01Icon, { size: 24 }),
15873
15854
  chatRef,
15874
15855
  isNewTab,
@@ -15923,14 +15904,14 @@ function BlogChatCard({
15923
15904
  hasEmbeddedVideo,
15924
15905
  discuss
15925
15906
  }) {
15926
- const category = Array.isArray(_optionalChain([item, 'optionalAccess', _416 => _416.categories])) ? _nullishCoalesce(_optionalChain([item, 'access', _417 => _417.categories, 'access', _418 => _418.find, 'call', _419 => _419((c) => _optionalChain([c, 'optionalAccess', _420 => _420.name])), 'optionalAccess', _421 => _421.name]), () => ( void 0)) : void 0;
15907
+ const category = Array.isArray(_optionalChain([item, 'optionalAccess', _415 => _415.categories])) ? _nullishCoalesce(_optionalChain([item, 'access', _416 => _416.categories, 'access', _417 => _417.find, 'call', _418 => _418((c) => _optionalChain([c, 'optionalAccess', _419 => _419.name])), 'optionalAccess', _420 => _420.name]), () => ( void 0)) : void 0;
15927
15908
  const status = hasEmbeddedVideo ? { label: "Video", variant: "primary" } : category ? { label: category, variant: "grey" } : void 0;
15928
15909
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15929
15910
  EntityMingoCard,
15930
15911
  {
15931
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _422 => _422.title]), () => ( "")),
15932
- description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _423 => _423.summary]), () => ( void 0)),
15933
- cover: entityCover(_optionalChain([item, 'optionalAccess', _424 => _424.featured_image]), ogPlaceholder),
15912
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _421 => _421.title]), () => ( "")),
15913
+ description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _422 => _422.summary]), () => ( void 0)),
15914
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _423 => _423.featured_image]), ogPlaceholder),
15934
15915
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.NewspaperIcon, { size: 24 }),
15935
15916
  status,
15936
15917
  chatRef,
@@ -15947,13 +15928,13 @@ function CaseStudyChatCard({
15947
15928
  ogPlaceholder,
15948
15929
  discuss
15949
15930
  }) {
15950
- const meta = [_optionalChain([item, 'optionalAccess', _425 => _425.msp, 'optionalAccess', _426 => _426.name]), _optionalChain([item, 'optionalAccess', _427 => _427.user, 'optionalAccess', _428 => _428.full_name])].filter(Boolean).join(" \xB7 ");
15931
+ const meta = [_optionalChain([item, 'optionalAccess', _424 => _424.msp, 'optionalAccess', _425 => _425.name]), _optionalChain([item, 'optionalAccess', _426 => _426.user, 'optionalAccess', _427 => _427.full_name])].filter(Boolean).join(" \xB7 ");
15951
15932
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15952
15933
  EntityMingoCard,
15953
15934
  {
15954
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _429 => _429.title]), () => ( "")),
15955
- description: _optionalChain([item, 'optionalAccess', _430 => _430.summary]) || meta || void 0,
15956
- cover: entityCover(_optionalChain([item, 'optionalAccess', _431 => _431.featured_image]), ogPlaceholder),
15935
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _428 => _428.title]), () => ( "")),
15936
+ description: _optionalChain([item, 'optionalAccess', _429 => _429.summary]) || meta || void 0,
15937
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _430 => _430.featured_image]), ogPlaceholder),
15957
15938
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.TrophyIcon, { size: 24 }),
15958
15939
  status: { label: "Case study", variant: "grey" },
15959
15940
  chatRef,
@@ -15970,13 +15951,13 @@ function CustomerInterviewChatCard({
15970
15951
  ogPlaceholder,
15971
15952
  discuss
15972
15953
  }) {
15973
- const meta = [_optionalChain([item, 'optionalAccess', _432 => _432.user, 'optionalAccess', _433 => _433.full_name]), _optionalChain([item, 'optionalAccess', _434 => _434.msp, 'optionalAccess', _435 => _435.name])].filter(Boolean).join(" \xB7 ");
15954
+ const meta = [_optionalChain([item, 'optionalAccess', _431 => _431.user, 'optionalAccess', _432 => _432.full_name]), _optionalChain([item, 'optionalAccess', _433 => _433.msp, 'optionalAccess', _434 => _434.name])].filter(Boolean).join(" \xB7 ");
15974
15955
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15975
15956
  EntityMingoCard,
15976
15957
  {
15977
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _436 => _436.title]), () => ( "")),
15978
- description: _optionalChain([item, 'optionalAccess', _437 => _437.video_summary]) || meta || void 0,
15979
- cover: entityCover(_optionalChain([item, 'optionalAccess', _438 => _438.featured_image]), ogPlaceholder),
15958
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _435 => _435.title]), () => ( "")),
15959
+ description: _optionalChain([item, 'optionalAccess', _436 => _436.video_summary]) || meta || void 0,
15960
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _437 => _437.featured_image]), ogPlaceholder),
15980
15961
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.MicrophoneIcon, { size: 24 }),
15981
15962
  status: { label: "Interview", variant: "grey" },
15982
15963
  chatRef,
@@ -15993,13 +15974,13 @@ function InvestorUpdateChatCard({
15993
15974
  ogPlaceholder,
15994
15975
  discuss
15995
15976
  }) {
15996
- const title = _optionalChain([item, 'optionalAccess', _439 => _439.title]) || `Update #${_nullishCoalesce(_optionalChain([item, 'optionalAccess', _440 => _440.update_number]), () => ( "?"))}`;
15977
+ const title = _optionalChain([item, 'optionalAccess', _438 => _438.title]) || `Update #${_nullishCoalesce(_optionalChain([item, 'optionalAccess', _439 => _439.update_number]), () => ( "?"))}`;
15997
15978
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15998
15979
  EntityMingoCard,
15999
15980
  {
16000
15981
  title,
16001
- description: _optionalChain([item, 'optionalAccess', _441 => _441.strategic_update]) || _optionalChain([item, 'optionalAccess', _442 => _442.content]) || _chunkODB2AEUWcjs.formatInvestorUpdatePeriod.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _443 => _443.period_start]), () => ( null)), _nullishCoalesce(_optionalChain([item, 'optionalAccess', _444 => _444.period_end]), () => ( null))) || void 0,
16002
- cover: entityCover(_optionalChain([item, 'optionalAccess', _445 => _445.featured_image]), ogPlaceholder),
15982
+ description: _optionalChain([item, 'optionalAccess', _440 => _440.strategic_update]) || _optionalChain([item, 'optionalAccess', _441 => _441.content]) || _chunkODB2AEUWcjs.formatInvestorUpdatePeriod.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _442 => _442.period_start]), () => ( null)), _nullishCoalesce(_optionalChain([item, 'optionalAccess', _443 => _443.period_end]), () => ( null))) || void 0,
15983
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _444 => _444.featured_image]), ogPlaceholder),
16003
15984
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.PresentationLineIcon, { size: 24 }),
16004
15985
  status: { label: "Investor update", variant: "grey" },
16005
15986
  chatRef,
@@ -16016,12 +15997,12 @@ function OnboardingGuideChatCard({
16016
15997
  ogPlaceholder,
16017
15998
  discuss
16018
15999
  }) {
16019
- const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess', _446 => _446.featured_image])), () => ( entityCover(_optionalChain([item, 'optionalAccess', _447 => _447.main_video_thumbnail])))), () => ( entityCover(_optionalChain([item, 'optionalAccess', _448 => _448.og_image_url]), ogPlaceholder)));
16000
+ const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess', _445 => _445.featured_image])), () => ( entityCover(_optionalChain([item, 'optionalAccess', _446 => _446.main_video_thumbnail])))), () => ( entityCover(_optionalChain([item, 'optionalAccess', _447 => _447.og_image_url]), ogPlaceholder)));
16020
16001
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16021
16002
  EntityMingoCard,
16022
16003
  {
16023
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _449 => _449.title]), () => ( "")),
16024
- description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _450 => _450.summary]), () => ( _optionalChain([item, 'optionalAccess', _451 => _451.description]))), () => ( void 0)),
16004
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _448 => _448.title]), () => ( "")),
16005
+ description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _449 => _449.summary]), () => ( _optionalChain([item, 'optionalAccess', _450 => _450.description]))), () => ( void 0)),
16025
16006
  cover,
16026
16007
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.CompassIcon, { size: 24 }),
16027
16008
  status: { label: "Guide", variant: "grey" },
@@ -16046,9 +16027,9 @@ function ProgramChatCard({
16046
16027
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16047
16028
  EntityMingoCard,
16048
16029
  {
16049
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _452 => _452.title]), () => ( "")),
16050
- description: meta || _optionalChain([item, 'optionalAccess', _453 => _453.description]) || void 0,
16051
- cover: entityCover(_optionalChain([item, 'optionalAccess', _454 => _454.cover_url]), ogPlaceholder),
16030
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _451 => _451.title]), () => ( "")),
16031
+ description: meta || _optionalChain([item, 'optionalAccess', _452 => _452.description]) || void 0,
16032
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _453 => _453.cover_url]), ogPlaceholder),
16052
16033
  fallbackIcon: icon,
16053
16034
  status: { label, variant: "grey" },
16054
16035
  chatRef,
@@ -16065,10 +16046,10 @@ function RoadmapChatCard({
16065
16046
  cardType,
16066
16047
  discuss
16067
16048
  }) {
16068
- const logoUrl = typeof _optionalChain([item, 'optionalAccess', _455 => _455.icon]) === "string" && item.icon.startsWith("http") ? item.icon : void 0;
16069
- const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess', _456 => _456.customItemId]) != null;
16049
+ const logoUrl = typeof _optionalChain([item, 'optionalAccess', _454 => _454.icon]) === "string" && item.icon.startsWith("http") ? item.icon : void 0;
16050
+ const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess', _455 => _455.customItemId]) != null;
16070
16051
  const defaultIcon = cardType === "delivery_item" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.TruckFastIcon, { size: 24 }) : cardType === "internal_task" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.CheckSquareIcon, { size: 24 }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.MapIcon, { size: 24 });
16071
- const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkODB2AEUWcjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess', _457 => _457.customItemId]), className: "size-6" }) : logoUrl ? (
16052
+ const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkODB2AEUWcjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess', _456 => _456.customItemId]), className: "size-6" }) : logoUrl ? (
16072
16053
  // Contained (not full-bleed) so the integration logo keeps its aspect
16073
16054
  // ratio inside the bordered icon box — matches RoadmapCard.
16074
16055
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWLSFBRT5cjs.next_image_default, { src: logoUrl, alt: "", className: "size-6 object-contain", width: 24, height: 24, unoptimized: true })
@@ -16079,10 +16060,10 @@ function RoadmapChatCard({
16079
16060
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16080
16061
  EntityMingoCard,
16081
16062
  {
16082
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _458 => _458.title]), () => ( "")),
16083
- description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _459 => _459.description]), () => ( void 0)),
16063
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _457 => _457.title]), () => ( "")),
16064
+ description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _458 => _458.description]), () => ( void 0)),
16084
16065
  fallbackIcon: icon,
16085
- status: statusPill(_optionalChain([item, 'optionalAccess', _460 => _460.status])),
16066
+ status: statusPill(_optionalChain([item, 'optionalAccess', _459 => _459.status])),
16086
16067
  chatRef,
16087
16068
  isNewTab,
16088
16069
  discuss,
@@ -16098,7 +16079,7 @@ function refHydratedEntry(docType, label, renderRef) {
16098
16079
  bareInline: true,
16099
16080
  contentRefType: docType,
16100
16081
  noComposedHref: true,
16101
- fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _461 => _461.url]), () => ( null)),
16082
+ fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _460 => _460.url]), () => ( null)),
16102
16083
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCardSkeleton, {}),
16103
16084
  render: (item, chatRef, opts) => renderRef(fetchedItemDisplayRef(item, chatRef), opts)
16104
16085
  };
@@ -16170,8 +16151,8 @@ function refGlyphRegistryEntries() {
16170
16151
  title: displayRef.title,
16171
16152
  description: _nullishCoalesce(displayRef.preview, () => ( void 0)),
16172
16153
  cover: entityCover(
16173
- _optionalChain([displayRef, 'access', _462 => _462.metadata, 'optionalAccess', _463 => _463.videoPoster]),
16174
- _nullishCoalesce(_optionalChain([opts, 'access', _464 => _464.extras, 'optionalAccess', _465 => _465.buildOgPlaceholderUrl, 'optionalCall', _466 => _466(_nullishCoalesce(displayRef.title, () => ( "")))]), () => ( null))
16154
+ _optionalChain([displayRef, 'access', _461 => _461.metadata, 'optionalAccess', _462 => _462.videoPoster]),
16155
+ _nullishCoalesce(_optionalChain([opts, 'access', _463 => _463.extras, 'optionalAccess', _464 => _464.buildOgPlaceholderUrl, 'optionalCall', _465 => _465(_nullishCoalesce(displayRef.title, () => ( "")))]), () => ( null))
16175
16156
  ),
16176
16157
  fallbackIcon: cfg.icon(),
16177
16158
  status: { label: cfg.label, variant: "grey" },
@@ -16186,9 +16167,9 @@ function refGlyphRegistryEntries() {
16186
16167
  }
16187
16168
  function fetchedEmployeeEntryDisplayRef(item, chatRef) {
16188
16169
  const it = item;
16189
- const title = typeof _optionalChain([it, 'optionalAccess', _467 => _467.title]) === "string" && it.title.trim().length > 0 ? it.title.trim() : chatRef.title;
16190
- const author = typeof _optionalChain([it, 'optionalAccess', _468 => _468.author, 'optionalAccess', _469 => _469.full_name]) === "string" ? it.author.full_name.trim() : "";
16191
- const summary = typeof _optionalChain([it, 'optionalAccess', _470 => _470.summary]) === "string" ? it.summary.trim() : "";
16170
+ const title = typeof _optionalChain([it, 'optionalAccess', _466 => _466.title]) === "string" && it.title.trim().length > 0 ? it.title.trim() : chatRef.title;
16171
+ const author = typeof _optionalChain([it, 'optionalAccess', _467 => _467.author, 'optionalAccess', _468 => _468.full_name]) === "string" ? it.author.full_name.trim() : "";
16172
+ const summary = typeof _optionalChain([it, 'optionalAccess', _469 => _469.summary]) === "string" ? it.summary.trim() : "";
16192
16173
  const preview = [author, summary].filter((x) => x.length > 0).join(" \xB7 ");
16193
16174
  return { ...chatRef, title, preview: preview.length > 0 ? preview : chatRef.preview };
16194
16175
  }
@@ -16240,7 +16221,7 @@ function programRegistryEntries() {
16240
16221
  discuss: opts.discuss,
16241
16222
  configKey: cfg.configKey,
16242
16223
  label: cfg.configKey.charAt(0).toUpperCase() + cfg.configKey.slice(1),
16243
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _471 => _471.extras, 'optionalAccess', _472 => _472.buildOgPlaceholderUrl, 'optionalCall', _473 => _473(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _474 => _474.title]), () => ( "")))]), () => ( null))
16224
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _470 => _470.extras, 'optionalAccess', _471 => _471.buildOgPlaceholderUrl, 'optionalCall', _472 => _472(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _473 => _473.title]), () => ( "")))]), () => ( null))
16244
16225
  }
16245
16226
  )
16246
16227
  }));
@@ -16261,7 +16242,7 @@ var ROADMAP_CARD_CONFIGS = {
16261
16242
  // The card's destination IS the ClickUp deep link, derived from the
16262
16243
  // task id post-fetch (the refs frame used to carry it).
16263
16244
  noComposedHref: true,
16264
- fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _475 => _475.id]) != null ? clickupTaskUrl(String(item.id)) : null
16245
+ fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _474 => _474.id]) != null ? clickupTaskUrl(String(item.id)) : null
16265
16246
  }
16266
16247
  };
16267
16248
  function roadmapRegistryEntries() {
@@ -16303,8 +16284,8 @@ var CHAT_CARD_REGISTRY = {
16303
16284
  DeletedDataCard,
16304
16285
  {
16305
16286
  title: chatRef.title && chatRef.title !== chatRef.id ? chatRef.title : null,
16306
- entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access', _476 => _476.metadata, 'optionalAccess', _477 => _477.entity_label]), () => ( null)),
16307
- recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access', _478 => _478.metadata, 'optionalAccess', _479 => _479.recovery_note]), () => ( null))
16287
+ entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access', _475 => _475.metadata, 'optionalAccess', _476 => _476.entity_label]), () => ( null)),
16288
+ recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access', _477 => _477.metadata, 'optionalAccess', _478 => _478.recovery_note]), () => ( null))
16308
16289
  }
16309
16290
  )
16310
16291
  },
@@ -16321,7 +16302,7 @@ var CHAT_CARD_REGISTRY = {
16321
16302
  bareInline: true,
16322
16303
  contentRefType: "faq",
16323
16304
  noComposedHref: true,
16324
- fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _480 => _480.id]) != null ? `/faqs#${faqItemAnchor(item.id)}` : null,
16305
+ fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _479 => _479.id]) != null ? `/faqs#${faqItemAnchor(item.id)}` : null,
16325
16306
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCardSkeleton, {}),
16326
16307
  render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FaqChatCard, { chatRef: fetchedFaqDisplayRef(item, chatRef), isNewTab: opts.isNewTab, discuss: opts.discuss })
16327
16308
  },
@@ -16355,8 +16336,8 @@ var CHAT_CARD_REGISTRY = {
16355
16336
  chatRef,
16356
16337
  isNewTab: opts.isNewTab,
16357
16338
  discuss: opts.discuss,
16358
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _481 => _481.extras, 'optionalAccess', _482 => _482.buildOgPlaceholderUrl, 'optionalCall', _483 => _483(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _484 => _484.title]), () => ( "")))]), () => ( null)),
16359
- hasEmbeddedVideo: _optionalChain([chatRef, 'access', _485 => _485.metadata, 'optionalAccess', _486 => _486.hasEmbeddedVideo]) === true
16339
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _480 => _480.extras, 'optionalAccess', _481 => _481.buildOgPlaceholderUrl, 'optionalCall', _482 => _482(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _483 => _483.title]), () => ( "")))]), () => ( null)),
16340
+ hasEmbeddedVideo: _optionalChain([chatRef, 'access', _484 => _484.metadata, 'optionalAccess', _485 => _485.hasEmbeddedVideo]) === true
16360
16341
  }
16361
16342
  )
16362
16343
  },
@@ -16372,7 +16353,7 @@ var CHAT_CARD_REGISTRY = {
16372
16353
  chatRef,
16373
16354
  isNewTab: opts.isNewTab,
16374
16355
  discuss: opts.discuss,
16375
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _487 => _487.extras, 'optionalAccess', _488 => _488.buildOgPlaceholderUrl, 'optionalCall', _489 => _489(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _490 => _490.title]), () => ( "")))]), () => ( null))
16356
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _486 => _486.extras, 'optionalAccess', _487 => _487.buildOgPlaceholderUrl, 'optionalCall', _488 => _488(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _489 => _489.title]), () => ( "")))]), () => ( null))
16376
16357
  }
16377
16358
  )
16378
16359
  },
@@ -16388,7 +16369,7 @@ var CHAT_CARD_REGISTRY = {
16388
16369
  chatRef,
16389
16370
  isNewTab: opts.isNewTab,
16390
16371
  discuss: opts.discuss,
16391
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _491 => _491.extras, 'optionalAccess', _492 => _492.buildOgPlaceholderUrl, 'optionalCall', _493 => _493(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _494 => _494.title]), () => ( "")))]), () => ( null))
16372
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _490 => _490.extras, 'optionalAccess', _491 => _491.buildOgPlaceholderUrl, 'optionalCall', _492 => _492(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _493 => _493.title]), () => ( "")))]), () => ( null))
16392
16373
  }
16393
16374
  )
16394
16375
  },
@@ -16398,7 +16379,7 @@ var CHAT_CARD_REGISTRY = {
16398
16379
  bareInline: true,
16399
16380
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkODB2AEUWcjs.ProductReleaseCardSkeleton, { size: "sm" }),
16400
16381
  render: (item, chatRef, opts) => {
16401
- const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _495 => _495.extras, 'optionalAccess', _496 => _496.buildProductReleaseCardProps]), () => ( _chunkODB2AEUWcjs.defaultBuildProductReleaseCardProps));
16382
+ const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _494 => _494.extras, 'optionalAccess', _495 => _495.buildProductReleaseCardProps]), () => ( _chunkODB2AEUWcjs.defaultBuildProductReleaseCardProps));
16402
16383
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16403
16384
  ProductReleaseChatCard,
16404
16385
  {
@@ -16424,7 +16405,7 @@ var CHAT_CARD_REGISTRY = {
16424
16405
  chatRef,
16425
16406
  isNewTab: opts.isNewTab,
16426
16407
  discuss: opts.discuss,
16427
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _497 => _497.extras, 'optionalAccess', _498 => _498.buildOgPlaceholderUrl, 'optionalCall', _499 => _499(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _500 => _500.title]), () => ( "")))]), () => ( null))
16408
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _496 => _496.extras, 'optionalAccess', _497 => _497.buildOgPlaceholderUrl, 'optionalCall', _498 => _498(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _499 => _499.title]), () => ( "")))]), () => ( null))
16428
16409
  }
16429
16410
  )
16430
16411
  },
@@ -16442,7 +16423,7 @@ var CHAT_CARD_REGISTRY = {
16442
16423
  chatRef,
16443
16424
  isNewTab: opts.isNewTab,
16444
16425
  discuss: opts.discuss,
16445
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _501 => _501.extras, 'optionalAccess', _502 => _502.buildOgPlaceholderUrl, 'optionalCall', _503 => _503(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _504 => _504.title]), () => ( "")))]), () => ( null))
16426
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _500 => _500.extras, 'optionalAccess', _501 => _501.buildOgPlaceholderUrl, 'optionalCall', _502 => _502(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _503 => _503.title]), () => ( "")))]), () => ( null))
16446
16427
  }
16447
16428
  )
16448
16429
  },
@@ -16453,13 +16434,13 @@ var CHAT_CARD_REGISTRY = {
16453
16434
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CampaignCardAdminSkeleton, {}),
16454
16435
  // No public viewer — synthesize the hub-internal admin URL post-fetch
16455
16436
  // so the wrapper + isNewTab computation see the actual destination.
16456
- fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _505 => _505.id]) ? `/admin/campaigns/${encodeURIComponent(String(item.id))}` : null,
16437
+ fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _504 => _504.id]) ? `/admin/campaigns/${encodeURIComponent(String(item.id))}` : null,
16457
16438
  render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CampaignChatCard, { item, chatRef, isNewTab: opts.isNewTab, discuss: opts.discuss })
16458
16439
  },
16459
16440
  ...roadmapRegistryEntries()
16460
16441
  };
16461
16442
  function chatCardLabel(docType) {
16462
- return _optionalChain([CHAT_CARD_REGISTRY, 'access', _506 => _506[docType], 'optionalAccess', _507 => _507.label]);
16443
+ return _optionalChain([CHAT_CARD_REGISTRY, 'access', _505 => _505[docType], 'optionalAccess', _506 => _506.label]);
16463
16444
  }
16464
16445
  function ChatCardNavWrap({
16465
16446
  href,
@@ -16475,13 +16456,13 @@ function ChatCardNavWrap({
16475
16456
  if (!href) return;
16476
16457
  const targetEl = e.target;
16477
16458
  const host = e.currentTarget;
16478
- if (!_optionalChain([host, 'optionalAccess', _508 => _508.contains, 'call', _509 => _509(targetEl)])) return;
16479
- if (_optionalChain([targetEl, 'optionalAccess', _510 => _510.closest, 'optionalCall', _511 => _511("button")])) return;
16480
- if (!_optionalChain([targetEl, 'optionalAccess', _512 => _512.closest, 'optionalCall', _513 => _513("a")])) return;
16459
+ if (!_optionalChain([host, 'optionalAccess', _507 => _507.contains, 'call', _508 => _508(targetEl)])) return;
16460
+ if (_optionalChain([targetEl, 'optionalAccess', _509 => _509.closest, 'optionalCall', _510 => _510("button")])) return;
16461
+ if (!_optionalChain([targetEl, 'optionalAccess', _511 => _511.closest, 'optionalCall', _512 => _512("a")])) return;
16481
16462
  const handled = executeNavigation({ event: e, runtime, href, path, targetPlatform, fallbackNavigate: router.push });
16482
16463
  if (!handled) return;
16483
16464
  e.stopPropagation();
16484
- if (!isNewTab && _optionalChain([panel, 'optionalAccess', _514 => _514.closeChat])) panel.closeChat();
16465
+ if (!isNewTab && _optionalChain([panel, 'optionalAccess', _513 => _513.closeChat])) panel.closeChat();
16485
16466
  };
16486
16467
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "contents", onClickCapture, children });
16487
16468
  }
@@ -16503,7 +16484,7 @@ function ChatCardLoader({
16503
16484
  title: chatRef.title,
16504
16485
  externalUrl: chatRef.url,
16505
16486
  targetPlatform: chatRef.targetPlatform,
16506
- path: typeof _optionalChain([chatRef, 'access', _515 => _515.metadata, 'optionalAccess', _516 => _516.path]) === "string" ? chatRef.metadata.path : null
16487
+ path: typeof _optionalChain([chatRef, 'access', _514 => _514.metadata, 'optionalAccess', _515 => _515.path]) === "string" ? chatRef.metadata.path : null
16507
16488
  },
16508
16489
  sourceRowCtxFromRuntime(runtime, { baseRoute, chipBasePlatform })
16509
16490
  );
@@ -16517,11 +16498,11 @@ function ChatCardLoader({
16517
16498
  const entry = CHAT_CARD_REGISTRY[resolvedChatRef.type];
16518
16499
  const fetchEntry = entry && entry.contentRefType ? entry : null;
16519
16500
  const { item, isLoading, isError, isFetched } = useChatCardItem(
16520
- _nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess', _517 => _517.contentRefType]), () => ( "")),
16501
+ _nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess', _516 => _516.contentRefType]), () => ( "")),
16521
16502
  fetchEntry ? resolvedChatRef.id : ""
16522
16503
  );
16523
16504
  if (!entry) return null;
16524
- const composedHref = _optionalChain([fetchEntry, 'optionalAccess', _518 => _518.contentRefType]) && !resolvedChatRef.url && item ? resolveFetchedCardHref({
16505
+ const composedHref = _optionalChain([fetchEntry, 'optionalAccess', _517 => _517.contentRefType]) && !resolvedChatRef.url && item ? resolveFetchedCardHref({
16525
16506
  contentRefType: fetchEntry.contentRefType,
16526
16507
  id: resolvedChatRef.id,
16527
16508
  item,
@@ -16529,7 +16510,7 @@ function ChatCardLoader({
16529
16510
  }) : null;
16530
16511
  const hrefChoice = fetchEntry && !resolvedChatRef.url && item ? pickFetchedCardHref({
16531
16512
  composed: composedHref,
16532
- itemHref: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _519 => _519.fallbackHref, 'optionalCall', _520 => _520(item)]), () => ( null)),
16513
+ itemHref: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _518 => _518.fallbackHref, 'optionalCall', _519 => _519(item)]), () => ( null)),
16533
16514
  allowComposed: !fetchEntry.noComposedHref
16534
16515
  }) : null;
16535
16516
  const hrefResolvedChatRef = hrefChoice ? {
@@ -16563,7 +16544,7 @@ function ChatCardLoader({
16563
16544
  isNewTab,
16564
16545
  discuss
16565
16546
  };
16566
- const path = typeof _optionalChain([finalChatRef, 'access', _521 => _521.metadata, 'optionalAccess', _522 => _522.path]) === "string" ? finalChatRef.metadata.path : null;
16547
+ const path = typeof _optionalChain([finalChatRef, 'access', _520 => _520.metadata, 'optionalAccess', _521 => _521.path]) === "string" ? finalChatRef.metadata.path : null;
16567
16548
  const navWrap = (children) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16568
16549
  ChatCardNavWrap,
16569
16550
  {
@@ -16587,7 +16568,7 @@ function ChatCardLoader({
16587
16568
  if (!fetchEntry) {
16588
16569
  return finish(entry.render(void 0, finalChatRef, renderOpts));
16589
16570
  }
16590
- if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _523 => _523.skeleton, 'optionalCall', _524 => _524()]), () => ( null)) });
16571
+ if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _522 => _522.skeleton, 'optionalCall', _523 => _523()]), () => ( null)) });
16591
16572
  if (!item) {
16592
16573
  if (isError) {
16593
16574
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardLoadFailure, { label: entry.label, id: finalChatRef.id, detail: "Failed to load" });
@@ -16950,7 +16931,7 @@ function useChunkCatchup({
16950
16931
  if (catchupRun.current === run) {
16951
16932
  if (currentDialogId !== dialogIdRef.current) {
16952
16933
  catchupRun.current = null;
16953
- if (_optionalChain([pendingCatchupRef, 'access', _525 => _525.current, 'optionalAccess', _526 => _526.dialogId]) === currentDialogId) {
16934
+ if (_optionalChain([pendingCatchupRef, 'access', _524 => _524.current, 'optionalAccess', _525 => _525.dialogId]) === currentDialogId) {
16954
16935
  pendingCatchupRef.current = null;
16955
16936
  }
16956
16937
  } else {
@@ -16961,7 +16942,7 @@ function useChunkCatchup({
16961
16942
  if (pending.dialogId === currentDialogId) {
16962
16943
  rearmForQueuedCatchup();
16963
16944
  try {
16964
- await _optionalChain([catchUpChunksRef, 'access', _527 => _527.current, 'optionalCall', _528 => _528(pending.fromSequenceId)]);
16945
+ await _optionalChain([catchUpChunksRef, 'access', _526 => _526.current, 'optionalCall', _527 => _527(pending.fromSequenceId)]);
16965
16946
  } catch (rerunError) {
16966
16947
  console.error("Queued catch-up re-run failed:", rerunError);
16967
16948
  }
@@ -17028,7 +17009,7 @@ function useChunkCatchup({
17028
17009
 
17029
17010
  var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
17030
17011
  function prefersReducedMotion() {
17031
- return typeof window !== "undefined" && _optionalChain([window, 'access', _529 => _529.matchMedia, 'optionalCall', _530 => _530("(prefers-reduced-motion: reduce)"), 'access', _531 => _531.matches]) === true;
17012
+ return typeof window !== "undefined" && _optionalChain([window, 'access', _528 => _528.matchMedia, 'optionalCall', _529 => _529("(prefers-reduced-motion: reduce)"), 'access', _530 => _530.matches]) === true;
17032
17013
  }
17033
17014
  function useScriptedStream(frames, resetKey, enabled = true) {
17034
17015
  const [index, setIndex] = _react.useState.call(void 0, 0);
@@ -17039,7 +17020,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
17039
17020
  setIndex(0);
17040
17021
  }
17041
17022
  _react.useEffect.call(void 0, () => {
17042
- const mq = _optionalChain([window, 'access', _532 => _532.matchMedia, 'optionalCall', _533 => _533("(prefers-reduced-motion: reduce)")]);
17023
+ const mq = _optionalChain([window, 'access', _531 => _531.matchMedia, 'optionalCall', _532 => _532("(prefers-reduced-motion: reduce)")]);
17043
17024
  const sync = () => setReducedMotion(mq ? mq.matches : prefersReducedMotion());
17044
17025
  sync();
17045
17026
  if (!mq) return void 0;
@@ -17182,7 +17163,7 @@ function useJetStreamDialogSubscription({
17182
17163
  const lifecycle = _chunkI5JVSFNVcjs.startConnectionLifecycle.call(void 0, {
17183
17164
  conn: sharedConn,
17184
17165
  wsUrl,
17185
- onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _534 => _534.current, 'optionalCall', _535 => _535()]),
17166
+ onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _533 => _533.current, 'optionalCall', _534 => _534()]),
17186
17167
  backoff: reconnectionBackoffRef.current,
17187
17168
  getFreshUrl: () => getNatsWsUrlRef.current(),
17188
17169
  // JetStream emits 'error' for protocol-level failures (e.g. -ERR Permissions
@@ -17197,7 +17178,7 @@ function useJetStreamDialogSubscription({
17197
17178
  setReconnectionCount((c) => c + 1);
17198
17179
  }
17199
17180
  hadConnectionBeforeRef.current = true;
17200
- _optionalChain([onConnectRef, 'access', _536 => _536.current, 'optionalCall', _537 => _537()]);
17181
+ _optionalChain([onConnectRef, 'access', _535 => _535.current, 'optionalCall', _536 => _536()]);
17201
17182
  }
17202
17183
  if (status === "error") {
17203
17184
  console.warn("[JetStream] NATS protocol error:", evt.data);
@@ -17207,7 +17188,7 @@ function useJetStreamDialogSubscription({
17207
17188
  setIsConnected(false);
17208
17189
  setIsSubscribed(false);
17209
17190
  tearDownSubscription();
17210
- _optionalChain([onDisconnectRef, 'access', _538 => _538.current, 'optionalCall', _539 => _539()]);
17191
+ _optionalChain([onDisconnectRef, 'access', _537 => _537.current, 'optionalCall', _538 => _538()]);
17211
17192
  }
17212
17193
  }
17213
17194
  });
@@ -17333,7 +17314,7 @@ function useJetStreamDialogSubscription({
17333
17314
  }
17334
17315
  subscriptionRef.current = handle;
17335
17316
  setIsSubscribed(true);
17336
- _optionalChain([onSubscribedRef, 'access', _540 => _540.current, 'optionalCall', _541 => _541()]);
17317
+ _optionalChain([onSubscribedRef, 'access', _539 => _539.current, 'optionalCall', _540 => _540()]);
17337
17318
  } catch (e52) {
17338
17319
  if (!cancelled) {
17339
17320
  setIsSubscribed(false);
@@ -17449,20 +17430,20 @@ function useNatsDialogSubscription({
17449
17430
  const tearDownSubscriptions = () => {
17450
17431
  subscriptionRefs.current.forEach((sub) => {
17451
17432
  try {
17452
- _optionalChain([sub, 'optionalAccess', _542 => _542.unsubscribe, 'call', _543 => _543()]);
17433
+ _optionalChain([sub, 'optionalAccess', _541 => _541.unsubscribe, 'call', _542 => _542()]);
17453
17434
  } catch (e54) {
17454
17435
  }
17455
17436
  });
17456
17437
  subscriptionRefs.current.clear();
17457
17438
  lastSubscribedDialogIdRef.current = null;
17458
- _optionalChain([abortControllerRef, 'access', _544 => _544.current, 'optionalAccess', _545 => _545.abort, 'call', _546 => _546()]);
17439
+ _optionalChain([abortControllerRef, 'access', _543 => _543.current, 'optionalAccess', _544 => _544.abort, 'call', _545 => _545()]);
17459
17440
  abortControllerRef.current = null;
17460
17441
  };
17461
17442
  const isDisconnectStatus = (status) => status === "closed" || status === "disconnected";
17462
17443
  const lifecycle = _chunkI5JVSFNVcjs.startConnectionLifecycle.call(void 0, {
17463
17444
  conn: sharedConn,
17464
17445
  wsUrl,
17465
- onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _547 => _547.current, 'optionalCall', _548 => _548()]),
17446
+ onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _546 => _546.current, 'optionalCall', _547 => _547()]),
17466
17447
  backoff: reconnectionBackoffRef.current,
17467
17448
  getFreshUrl: () => getNatsWsUrlRef.current(),
17468
17449
  shouldRetryOn: isDisconnectStatus,
@@ -17473,7 +17454,7 @@ function useNatsDialogSubscription({
17473
17454
  setReconnectionCount((c) => c + 1);
17474
17455
  }
17475
17456
  hadConnectionBeforeRef.current = true;
17476
- _optionalChain([onConnectRef, 'access', _549 => _549.current, 'optionalCall', _550 => _550()]);
17457
+ _optionalChain([onConnectRef, 'access', _548 => _548.current, 'optionalCall', _549 => _549()]);
17477
17458
  }
17478
17459
  if (status === "error") {
17479
17460
  console.warn("[NATS] protocol error:", evt.data);
@@ -17483,7 +17464,7 @@ function useNatsDialogSubscription({
17483
17464
  setIsConnected(false);
17484
17465
  setIsSubscribed(false);
17485
17466
  tearDownSubscriptions();
17486
- _optionalChain([onDisconnectRef, 'access', _551 => _551.current, 'optionalCall', _552 => _552()]);
17467
+ _optionalChain([onDisconnectRef, 'access', _550 => _550.current, 'optionalCall', _551 => _551()]);
17487
17468
  }
17488
17469
  }
17489
17470
  });
@@ -17514,13 +17495,13 @@ function useNatsDialogSubscription({
17514
17495
  setIsSubscribed(false);
17515
17496
  subscriptionRefs.current.forEach((sub) => {
17516
17497
  try {
17517
- _optionalChain([sub, 'optionalAccess', _553 => _553.unsubscribe, 'call', _554 => _554()]);
17498
+ _optionalChain([sub, 'optionalAccess', _552 => _552.unsubscribe, 'call', _553 => _553()]);
17518
17499
  } catch (e55) {
17519
17500
  }
17520
17501
  });
17521
17502
  subscriptionRefs.current.clear();
17522
17503
  lastSubscribedDialogIdRef.current = null;
17523
- _optionalChain([abortControllerRef, 'access', _555 => _555.current, 'optionalAccess', _556 => _556.abort, 'call', _557 => _557()]);
17504
+ _optionalChain([abortControllerRef, 'access', _554 => _554.current, 'optionalAccess', _555 => _555.abort, 'call', _556 => _556()]);
17524
17505
  abortControllerRef.current = null;
17525
17506
  }
17526
17507
  return void 0;
@@ -17532,12 +17513,12 @@ function useNatsDialogSubscription({
17532
17513
  if (subscriptionRefs.current.size > 0) {
17533
17514
  subscriptionRefs.current.forEach((sub) => {
17534
17515
  try {
17535
- _optionalChain([sub, 'optionalAccess', _558 => _558.unsubscribe, 'call', _559 => _559()]);
17516
+ _optionalChain([sub, 'optionalAccess', _557 => _557.unsubscribe, 'call', _558 => _558()]);
17536
17517
  } catch (e56) {
17537
17518
  }
17538
17519
  });
17539
17520
  subscriptionRefs.current.clear();
17540
- _optionalChain([abortControllerRef, 'access', _560 => _560.current, 'optionalAccess', _561 => _561.abort, 'call', _562 => _562()]);
17521
+ _optionalChain([abortControllerRef, 'access', _559 => _559.current, 'optionalAccess', _560 => _560.abort, 'call', _561 => _561()]);
17541
17522
  }
17542
17523
  abortControllerRef.current = new AbortController();
17543
17524
  const abort = abortControllerRef.current;
@@ -17567,7 +17548,7 @@ function useNatsDialogSubscription({
17567
17548
  });
17568
17549
  lastSubscribedDialogIdRef.current = dialogId;
17569
17550
  setIsSubscribed(true);
17570
- _optionalChain([onSubscribedRef, 'access', _563 => _563.current, 'optionalCall', _564 => _564()]);
17551
+ _optionalChain([onSubscribedRef, 'access', _562 => _562.current, 'optionalCall', _563 => _563()]);
17571
17552
  };
17572
17553
  if (isConnectedRef.current) {
17573
17554
  createSubscriptions();
@@ -17578,7 +17559,7 @@ function useNatsDialogSubscription({
17578
17559
  abort.abort();
17579
17560
  subscriptions.forEach((sub) => {
17580
17561
  try {
17581
- _optionalChain([sub, 'optionalAccess', _565 => _565.unsubscribe, 'call', _566 => _566()]);
17562
+ _optionalChain([sub, 'optionalAccess', _564 => _564.unsubscribe, 'call', _565 => _565()]);
17582
17563
  } catch (e58) {
17583
17564
  }
17584
17565
  });
@@ -17617,7 +17598,7 @@ function useNatsDialogSubscription({
17617
17598
  });
17618
17599
  lastSubscribedDialogIdRef.current = currentDialogId;
17619
17600
  setIsSubscribed(true);
17620
- _optionalChain([onSubscribedRef, 'access', _567 => _567.current, 'optionalCall', _568 => _568()]);
17601
+ _optionalChain([onSubscribedRef, 'access', _566 => _566.current, 'optionalCall', _567 => _567()]);
17621
17602
  } else if (subscriptionRefs.current.size > 0) {
17622
17603
  setIsSubscribed(true);
17623
17604
  }
@@ -17625,10 +17606,10 @@ function useNatsDialogSubscription({
17625
17606
  return { isConnected, isSubscribed, reconnectionCount };
17626
17607
  }
17627
17608
  function buildNatsWsUrl(apiBaseUrl, options) {
17628
- const path = _optionalChain([options, 'optionalAccess', _569 => _569.source]) === "dashboard" ? "/ws/nats-api" : "/ws/nats";
17609
+ const path = _optionalChain([options, 'optionalAccess', _568 => _568.source]) === "dashboard" ? "/ws/nats-api" : "/ws/nats";
17629
17610
  const u = new URL(path, apiBaseUrl);
17630
17611
  u.protocol = u.protocol === "https:" ? "wss:" : "ws:";
17631
- if (_optionalChain([options, 'optionalAccess', _570 => _570.includeAuthParam]) && _optionalChain([options, 'optionalAccess', _571 => _571.token])) {
17612
+ if (_optionalChain([options, 'optionalAccess', _569 => _569.includeAuthParam]) && _optionalChain([options, 'optionalAccess', _570 => _570.token])) {
17632
17613
  u.searchParams.set("authorization", options.token);
17633
17614
  }
17634
17615
  return u.toString();
@@ -17646,7 +17627,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
17646
17627
  const data = await res.json();
17647
17628
  return _nullishCoalesce(data.commands, () => ( []));
17648
17629
  } catch (err) {
17649
- if (_optionalChain([err, 'optionalAccess', _572 => _572.name]) === "AbortError") throw err;
17630
+ if (_optionalChain([err, 'optionalAccess', _571 => _571.name]) === "AbortError") throw err;
17650
17631
  console.warn("[chat] slash-commands fetch failed, showing none:", err);
17651
17632
  return [];
17652
17633
  }
@@ -17654,8 +17635,8 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
17654
17635
  var NO_COMMANDS = [];
17655
17636
  function useSlashCommands(prefix, commandsUrl) {
17656
17637
  const [answered, setAnswered] = _react.useState.call(void 0, null);
17657
- const commands = prefix != null && _optionalChain([answered, 'optionalAccess', _573 => _573.prefix]) === prefix ? answered.commands : NO_COMMANDS;
17658
- const loading = prefix != null && _optionalChain([answered, 'optionalAccess', _574 => _574.prefix]) !== prefix;
17638
+ const commands = prefix != null && _optionalChain([answered, 'optionalAccess', _572 => _572.prefix]) === prefix ? answered.commands : NO_COMMANDS;
17639
+ const loading = prefix != null && _optionalChain([answered, 'optionalAccess', _573 => _573.prefix]) !== prefix;
17659
17640
  _react.useEffect.call(void 0, () => {
17660
17641
  if (prefix == null) return void 0;
17661
17642
  let cancelled = false;
@@ -17665,7 +17646,7 @@ function useSlashCommands(prefix, commandsUrl) {
17665
17646
  const next = await fetchSlashCommands(prefix, ctrl.signal, commandsUrl);
17666
17647
  if (!cancelled) setAnswered({ prefix, commands: next });
17667
17648
  } catch (err) {
17668
- if (!cancelled && _optionalChain([err, 'optionalAccess', _575 => _575.name]) !== "AbortError") {
17649
+ if (!cancelled && _optionalChain([err, 'optionalAccess', _574 => _574.name]) !== "AbortError") {
17669
17650
  console.warn("[use-slash-commands] fetch failed:", err);
17670
17651
  setAnswered({ prefix, commands: NO_COMMANDS });
17671
17652
  }
@@ -17688,7 +17669,7 @@ function useSlashCommandRegistry(commandsUrl, options) {
17688
17669
  const query = _reactquery.useQuery.call(void 0, {
17689
17670
  queryKey: ["chat-slash-commands", commandsUrl],
17690
17671
  queryFn: ({ signal }) => fetchSlashCommands("", signal, commandsUrl),
17691
- enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _576 => _576.enabled]), () => ( true)),
17672
+ enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _575 => _575.enabled]), () => ( true)),
17692
17673
  staleTime: Infinity,
17693
17674
  gcTime: Infinity,
17694
17675
  // The commands registry is non-critical chrome — a failure degrades to an
@@ -17727,21 +17708,21 @@ async function fetchEmptyStateConfig(signal, emptyStateUrl) {
17727
17708
  }
17728
17709
  const data = await res.json();
17729
17710
  return {
17730
- name: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _577 => _577.name]), () => ( null)),
17731
- icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _578 => _578.icon]), () => ( null)),
17732
- greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _579 => _579.greeting]), () => ( null)),
17733
- enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _580 => _580.enabledRagTableIds]), () => ( [])),
17734
- quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _581 => _581.quickActions]), () => ( [])),
17735
- suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _582 => _582.suggestedQueries]), () => ( []))
17711
+ name: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _576 => _576.name]), () => ( null)),
17712
+ icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _577 => _577.icon]), () => ( null)),
17713
+ greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _578 => _578.greeting]), () => ( null)),
17714
+ enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _579 => _579.enabledRagTableIds]), () => ( [])),
17715
+ quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _580 => _580.quickActions]), () => ( [])),
17716
+ suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _581 => _581.suggestedQueries]), () => ( []))
17736
17717
  };
17737
17718
  } catch (err) {
17738
- if (_optionalChain([err, 'optionalAccess', _583 => _583.name]) === "AbortError") throw err;
17719
+ if (_optionalChain([err, 'optionalAccess', _582 => _582.name]) === "AbortError") throw err;
17739
17720
  console.warn("[chat] empty-state config fetch failed, using neutral defaults:", err);
17740
17721
  return EMPTY_STATE_FALLBACK;
17741
17722
  }
17742
17723
  }
17743
17724
  function useEmptyStateConfig(emptyStateUrl, options) {
17744
- const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _584 => _584.enabled]), () => ( true))) && !!emptyStateUrl;
17725
+ const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _583 => _583.enabled]), () => ( true))) && !!emptyStateUrl;
17745
17726
  const query = _reactquery.useQuery.call(void 0, {
17746
17727
  queryKey: ["chat-empty-state", emptyStateUrl],
17747
17728
  queryFn: ({ signal }) => fetchEmptyStateConfig(signal, emptyStateUrl),
@@ -17770,7 +17751,7 @@ var CHAT_ATTACHMENT_MAX_SIZE_BYTES = 25 * 1024 * 1024;
17770
17751
  var STORAGE_CACHE_CONTROL_IMMUTABLE = "public, max-age=31536000, immutable";
17771
17752
  function uploadWithProgress(url, file, token, onProgress, signal) {
17772
17753
  return new Promise((resolve, reject) => {
17773
- if (_optionalChain([signal, 'optionalAccess', _585 => _585.aborted])) {
17754
+ if (_optionalChain([signal, 'optionalAccess', _584 => _584.aborted])) {
17774
17755
  reject(new Error("Upload cancelled"));
17775
17756
  return;
17776
17757
  }
@@ -17812,7 +17793,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
17812
17793
  const handleSignalAbort = () => {
17813
17794
  xhr.abort();
17814
17795
  };
17815
- _optionalChain([signal, 'optionalAccess', _586 => _586.addEventListener, 'call', _587 => _587("abort", handleSignalAbort, { once: true, signal: listeners.signal })]);
17796
+ _optionalChain([signal, 'optionalAccess', _585 => _585.addEventListener, 'call', _586 => _586("abort", handleSignalAbort, { once: true, signal: listeners.signal })]);
17816
17797
  xhr.upload.addEventListener("progress", handleProgress, { signal: listeners.signal });
17817
17798
  xhr.addEventListener("load", handleLoad, { signal: listeners.signal });
17818
17799
  xhr.addEventListener("error", handleError, { signal: listeners.signal });
@@ -17856,10 +17837,10 @@ function useChatAttachments() {
17856
17837
  try {
17857
17838
  sniffed = await _filetype.fileTypeFromBlob.call(void 0, att.file);
17858
17839
  } catch (err) {
17859
- if (_optionalChain([ctrl, 'optionalAccess', _588 => _588.signal, 'access', _589 => _589.aborted])) return;
17840
+ if (_optionalChain([ctrl, 'optionalAccess', _587 => _587.signal, 'access', _588 => _588.aborted])) return;
17860
17841
  throw new Error(`Could not read file content: ${err instanceof Error ? err.message : String(err)}`);
17861
17842
  }
17862
- if (_optionalChain([ctrl, 'optionalAccess', _590 => _590.signal, 'access', _591 => _591.aborted])) return;
17843
+ if (_optionalChain([ctrl, 'optionalAccess', _589 => _589.signal, 'access', _590 => _590.aborted])) return;
17863
17844
  if (!sniffed) {
17864
17845
  throw new Error("Unrecognized file format");
17865
17846
  }
@@ -17873,7 +17854,7 @@ function useChatAttachments() {
17873
17854
  const urlResp = await _chunkXOGD2AMEcjs.embedAuthedFetch.call(void 0, uploadUrlEndpoint, {
17874
17855
  method: "POST",
17875
17856
  headers: { "Content-Type": "application/json" },
17876
- signal: _optionalChain([ctrl, 'optionalAccess', _592 => _592.signal]),
17857
+ signal: _optionalChain([ctrl, 'optionalAccess', _591 => _591.signal]),
17877
17858
  body: JSON.stringify({
17878
17859
  fileName: att.file.name,
17879
17860
  // Pass the SNIFFED MIME (not `file.type`, which can be a
@@ -17902,9 +17883,9 @@ function useChatAttachments() {
17902
17883
  (pct) => {
17903
17884
  updateOne(att.id, { progress: pct });
17904
17885
  },
17905
- _optionalChain([ctrl, 'optionalAccess', _593 => _593.signal])
17886
+ _optionalChain([ctrl, 'optionalAccess', _592 => _592.signal])
17906
17887
  );
17907
- if (_optionalChain([ctrl, 'optionalAccess', _594 => _594.signal, 'access', _595 => _595.aborted])) return;
17888
+ if (_optionalChain([ctrl, 'optionalAccess', _593 => _593.signal, 'access', _594 => _594.aborted])) return;
17908
17889
  updateOne(att.id, {
17909
17890
  status: "ready",
17910
17891
  progress: 100,
@@ -17912,7 +17893,7 @@ function useChatAttachments() {
17912
17893
  viewToken: mintData.viewToken
17913
17894
  });
17914
17895
  } catch (err) {
17915
- if (_optionalChain([ctrl, 'optionalAccess', _596 => _596.signal, 'access', _597 => _597.aborted])) return;
17896
+ if (_optionalChain([ctrl, 'optionalAccess', _595 => _595.signal, 'access', _596 => _596.aborted])) return;
17916
17897
  const message = err instanceof Error ? err.message : String(err);
17917
17898
  updateOne(att.id, { status: "error", progress: 0, errorMessage: message });
17918
17899
  } finally {
@@ -18061,11 +18042,11 @@ var ANON_DEFAULTS = {
18061
18042
  function useResolveChatIdentity(enabled) {
18062
18043
  const runtime = _chunkU2YLMFJKcjs.useRequiredChatRuntime.call(void 0, );
18063
18044
  const url = runtime.endpoints.identityUrl;
18064
- const proxyEmail = _nullishCoalesce(_optionalChain([_chunkXOGD2AMEcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _598 => _598.email]), () => ( null));
18045
+ const proxyEmail = _nullishCoalesce(_optionalChain([_chunkXOGD2AMEcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _597 => _597.email]), () => ( null));
18065
18046
  const requestKey = enabled ? `${url}\0${_nullishCoalesce(proxyEmail, () => ( ""))}` : null;
18066
18047
  const [resolved, setResolved] = _react.useState.call(void 0, null);
18067
- const data = _optionalChain([resolved, 'optionalAccess', _599 => _599.key]) === requestKey ? resolved.data : ANON_DEFAULTS;
18068
- const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess', _600 => _600.key]) !== requestKey;
18048
+ const data = _optionalChain([resolved, 'optionalAccess', _598 => _598.key]) === requestKey ? resolved.data : ANON_DEFAULTS;
18049
+ const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess', _599 => _599.key]) !== requestKey;
18069
18050
  _react.useEffect.call(void 0, () => {
18070
18051
  if (requestKey === null) return void 0;
18071
18052
  let cancelled = false;
@@ -18212,7 +18193,7 @@ function useChat({
18212
18193
  onMessagesChangeRef.current = onMessagesChange;
18213
18194
  });
18214
18195
  _react.useEffect.call(void 0, () => {
18215
- _optionalChain([onMessagesChangeRef, 'access', _601 => _601.current, 'optionalCall', _602 => _602(messages)]);
18196
+ _optionalChain([onMessagesChangeRef, 'access', _600 => _600.current, 'optionalCall', _601 => _601(messages)]);
18216
18197
  }, [messages]);
18217
18198
  const {
18218
18199
  streamMessage,
@@ -18249,7 +18230,7 @@ function useChat({
18249
18230
  name: "You",
18250
18231
  content: text2,
18251
18232
  timestamp: /* @__PURE__ */ new Date(),
18252
- ..._optionalChain([options, 'optionalAccess', _603 => _603.hidden]) ? { hidden: true } : {}
18233
+ ..._optionalChain([options, 'optionalAccess', _602 => _602.hidden]) ? { hidden: true } : {}
18253
18234
  };
18254
18235
  addMessage(userMessage);
18255
18236
  setIsTyping(true);
@@ -18463,7 +18444,7 @@ function buildConfirmToolBody(request) {
18463
18444
  async function readServerErrorMessage(response) {
18464
18445
  try {
18465
18446
  const body = await response.json();
18466
- if (typeof _optionalChain([body, 'optionalAccess', _604 => _604.error]) === "string" && body.error.length > 0) return body.error;
18447
+ if (typeof _optionalChain([body, 'optionalAccess', _603 => _603.error]) === "string" && body.error.length > 0) return body.error;
18467
18448
  } catch (e60) {
18468
18449
  }
18469
18450
  return null;
@@ -18770,7 +18751,7 @@ function youtubeVideoId(value) {
18770
18751
  const hostname = parsed.hostname.toLowerCase();
18771
18752
  const isYoutubeHost = hostname === "youtu.be" || hostname === "youtube.com" || hostname.endsWith(".youtube.com");
18772
18753
  if (!isYoutubeHost) return void 0;
18773
- const fromPath = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : _optionalChain([/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/, 'access', _605 => _605.exec, 'call', _606 => _606(parsed.pathname), 'optionalAccess', _607 => _607[1]]);
18754
+ const fromPath = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : _optionalChain([/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/, 'access', _604 => _604.exec, 'call', _605 => _605(parsed.pathname), 'optionalAccess', _606 => _606[1]]);
18774
18755
  const id = _nullishCoalesce(_nullishCoalesce(fromPath, () => ( parsed.searchParams.get("v"))), () => ( void 0));
18775
18756
  return id && YOUTUBE_ID.test(id) ? id : void 0;
18776
18757
  }
@@ -18889,11 +18870,11 @@ function cards(value, decodedSources) {
18889
18870
  {
18890
18871
  type,
18891
18872
  id,
18892
- title: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _608 => _608.name]), () => ( id)),
18893
- url: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _609 => _609.externalUrl]), () => ( null)),
18894
- ..._optionalChain([source, 'optionalAccess', _610 => _610.sourceRepo]) ? { sourceRepo: source.sourceRepo } : {},
18895
- ..._optionalChain([source, 'optionalAccess', _611 => _611.targetPlatform]) !== void 0 ? { targetPlatform: source.targetPlatform } : {},
18896
- ..._optionalChain([source, 'optionalAccess', _612 => _612.path]) ? { metadata: { path: source.path } } : {}
18873
+ title: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _607 => _607.name]), () => ( id)),
18874
+ url: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _608 => _608.externalUrl]), () => ( null)),
18875
+ ..._optionalChain([source, 'optionalAccess', _609 => _609.sourceRepo]) ? { sourceRepo: source.sourceRepo } : {},
18876
+ ..._optionalChain([source, 'optionalAccess', _610 => _610.targetPlatform]) !== void 0 ? { targetPlatform: source.targetPlatform } : {},
18877
+ ..._optionalChain([source, 'optionalAccess', _611 => _611.path]) ? { metadata: { path: source.path } } : {}
18897
18878
  }
18898
18879
  ];
18899
18880
  });
@@ -18919,11 +18900,11 @@ function sourceMetadataEvent(payload) {
18919
18900
  }
18920
18901
  function mergeSourceMetadata(previous, event) {
18921
18902
  const byIndex = /* @__PURE__ */ new Map();
18922
- for (const source of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _613 => _613.sources]), () => ( [])), ..._nullishCoalesce(event.sources, () => ( []))]) {
18903
+ for (const source of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _612 => _612.sources]), () => ( [])), ..._nullishCoalesce(event.sources, () => ( []))]) {
18923
18904
  if (!byIndex.has(source.index)) byIndex.set(source.index, source);
18924
18905
  }
18925
18906
  const byIdentity = /* @__PURE__ */ new Map();
18926
- for (const ref of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _614 => _614.refs]), () => ( [])), ..._nullishCoalesce(event.refs, () => ( []))]) {
18907
+ for (const ref of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _613 => _613.refs]), () => ( [])), ..._nullishCoalesce(event.refs, () => ( []))]) {
18927
18908
  const identity = `${ref.type}:${ref.id}`;
18928
18909
  if (!byIdentity.has(identity)) byIdentity.set(identity, ref);
18929
18910
  }
@@ -19009,9 +18990,9 @@ function appendToTrailingAssistant(prev, segments) {
19009
18990
  for (const seg of segments) {
19010
18991
  const tail = merged[merged.length - 1];
19011
18992
  const key = upsertKey(seg);
19012
- if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _615 => _615.type]) === "text") {
18993
+ if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _614 => _614.type]) === "text") {
19013
18994
  merged[merged.length - 1] = { type: "text", text: tail.text + seg.text };
19014
- } else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _616 => _616.type]) === "thinking") {
18995
+ } else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _615 => _615.type]) === "thinking") {
19015
18996
  merged[merged.length - 1] = { type: "thinking", text: tail.text + seg.text };
19016
18997
  } else if (key) {
19017
18998
  let idx = merged.findIndex((m) => upsertKey(m) === key);
@@ -19052,7 +19033,7 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
19052
19033
  }
19053
19034
  if (s.type !== "approval_batch") return s;
19054
19035
  const isAnchor = s.data.approvalRequestId === requestId;
19055
- const hasRow = _optionalChain([s, 'access', _617 => _617.data, 'access', _618 => _618.toolCalls, 'optionalAccess', _619 => _619.some, 'call', _620 => _620((c) => c.toolExecutionRequestId === requestId)]);
19036
+ const hasRow = _optionalChain([s, 'access', _616 => _616.data, 'access', _617 => _617.toolCalls, 'optionalAccess', _618 => _618.some, 'call', _619 => _619((c) => c.toolExecutionRequestId === requestId)]);
19056
19037
  if (!isAnchor && !hasRow) return s;
19057
19038
  const nextResolvedBy = _nullishCoalesce(resolvedByName, () => ( s.resolvedByName));
19058
19039
  const nextExecutions = hasRow ? {
@@ -19074,8 +19055,8 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
19074
19055
  };
19075
19056
  }
19076
19057
  function nextBatchExecution(prevExec, toolData) {
19077
- if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess', _621 => _621.status]) === "done") return null;
19078
- return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess', _622 => _622.result]), success: _optionalChain([prevExec, 'optionalAccess', _623 => _623.success]) };
19058
+ if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess', _620 => _620.status]) === "done") return null;
19059
+ return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess', _621 => _621.result]), success: _optionalChain([prevExec, 'optionalAccess', _622 => _622.success]) };
19079
19060
  }
19080
19061
  function withBatchExecution(seg, execId, state) {
19081
19062
  return {
@@ -19092,11 +19073,11 @@ function projectBatchStatusToMessages(prev, anchorId, status) {
19092
19073
  }
19093
19074
  function projectBatchRowFailureToMessages(prev, rowRequestId) {
19094
19075
  return mapSegments(prev, (s) => {
19095
- if (s.type !== "approval_batch" || !_optionalChain([s, 'access', _624 => _624.data, 'access', _625 => _625.toolCalls, 'optionalAccess', _626 => _626.some, 'call', _627 => _627((c) => c.toolExecutionRequestId === rowRequestId)])) {
19076
+ if (s.type !== "approval_batch" || !_optionalChain([s, 'access', _623 => _623.data, 'access', _624 => _624.toolCalls, 'optionalAccess', _625 => _625.some, 'call', _626 => _626((c) => c.toolExecutionRequestId === rowRequestId)])) {
19096
19077
  return s;
19097
19078
  }
19098
- const existing = _optionalChain([s, 'access', _628 => _628.data, 'access', _629 => _629.executions, 'optionalAccess', _630 => _630[rowRequestId]]);
19099
- if (_optionalChain([existing, 'optionalAccess', _631 => _631.status]) === "done") return s;
19079
+ const existing = _optionalChain([s, 'access', _627 => _627.data, 'access', _628 => _628.executions, 'optionalAccess', _629 => _629[rowRequestId]]);
19080
+ if (_optionalChain([existing, 'optionalAccess', _630 => _630.status]) === "done") return s;
19100
19081
  return withBatchExecution(s, rowRequestId, { status: "done", success: false });
19101
19082
  });
19102
19083
  }
@@ -19132,7 +19113,7 @@ function mergeToolExecutionIfPresent(prev, segment) {
19132
19113
  for (let j = message.segments.length - 1; j >= 0; j--) {
19133
19114
  const seg = message.segments[j];
19134
19115
  if (execId && seg.type === "approval_batch" && seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId)) {
19135
- const prevExec = _optionalChain([seg, 'access', _632 => _632.data, 'access', _633 => _633.executions, 'optionalAccess', _634 => _634[execId]]);
19116
+ const prevExec = _optionalChain([seg, 'access', _631 => _631.data, 'access', _632 => _632.executions, 'optionalAccess', _633 => _633[execId]]);
19136
19117
  const nextExec = nextBatchExecution(prevExec, toolData);
19137
19118
  if (nextExec === null) return prev;
19138
19119
  if (sameExecutionState(prevExec, nextExec)) return prev;
@@ -19305,9 +19286,9 @@ var MessageSegmentAccumulator = class {
19305
19286
  type: "tool_execution",
19306
19287
  data: {
19307
19288
  ...toolData,
19308
- toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess', _635 => _635.data, 'access', _636 => _636.toolTitle]))), () => ( _optionalChain([executingTool, 'optionalAccess', _637 => _637.toolTitle]))),
19309
- toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess', _638 => _638.data, 'access', _639 => _639.toolExplanation]))), () => ( _optionalChain([executingTool, 'optionalAccess', _640 => _640.toolExplanation]))),
19310
- parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess', _641 => _641.parameters])
19289
+ toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess', _634 => _634.data, 'access', _635 => _635.toolTitle]))), () => ( _optionalChain([executingTool, 'optionalAccess', _636 => _636.toolTitle]))),
19290
+ toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess', _637 => _637.data, 'access', _638 => _638.toolExplanation]))), () => ( _optionalChain([executingTool, 'optionalAccess', _639 => _639.toolExplanation]))),
19291
+ parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess', _640 => _640.parameters])
19311
19292
  }
19312
19293
  };
19313
19294
  if (existingIndex !== -1) {
@@ -19331,7 +19312,7 @@ var MessageSegmentAccumulator = class {
19331
19312
  if (seg.type !== "approval_batch") return seg;
19332
19313
  const hasCall = seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId);
19333
19314
  if (!hasCall) return seg;
19334
- const prev = _optionalChain([seg, 'access', _642 => _642.data, 'access', _643 => _643.executions, 'optionalAccess', _644 => _644[execId]]);
19315
+ const prev = _optionalChain([seg, 'access', _641 => _641.data, 'access', _642 => _642.executions, 'optionalAccess', _643 => _643[execId]]);
19335
19316
  const next = nextBatchExecution(prev, toolData);
19336
19317
  matched = true;
19337
19318
  if (next === null) return seg;
@@ -19465,8 +19446,8 @@ var MessageSegmentAccumulator = class {
19465
19446
  requestId,
19466
19447
  {
19467
19448
  ...pendingApproval,
19468
- command: _optionalChain([pendingApproval, 'optionalAccess', _645 => _645.command]) || "",
19469
- approvalType: _optionalChain([pendingApproval, 'optionalAccess', _646 => _646.approvalType]) || approvalType
19449
+ command: _optionalChain([pendingApproval, 'optionalAccess', _644 => _644.command]) || "",
19450
+ approvalType: _optionalChain([pendingApproval, 'optionalAccess', _645 => _645.approvalType]) || approvalType
19470
19451
  },
19471
19452
  status
19472
19453
  );
@@ -19491,9 +19472,9 @@ var MessageSegmentAccumulator = class {
19491
19472
  type: "escalation_offer",
19492
19473
  // The resolved chunk carries no text/origin — a redelivered offer must
19493
19474
  // not blank the card the PENDING chunk already painted.
19494
- data: { offerId, text: text2 || _optionalChain([existing, 'optionalAccess', _647 => _647.data, 'access', _648 => _648.text]) || "", origin: _nullishCoalesce(origin, () => ( _optionalChain([existing, 'optionalAccess', _649 => _649.data, 'access', _650 => _650.origin]))) },
19475
+ data: { offerId, text: text2 || _optionalChain([existing, 'optionalAccess', _646 => _646.data, 'access', _647 => _647.text]) || "", origin: _nullishCoalesce(origin, () => ( _optionalChain([existing, 'optionalAccess', _648 => _648.data, 'access', _649 => _649.origin]))) },
19495
19476
  status,
19496
- resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _651 => _651.resolvedByName]))),
19477
+ resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _650 => _650.resolvedByName]))),
19497
19478
  onApprove: this.callbacks.onEscalationApprove,
19498
19479
  onReject: this.callbacks.onEscalationReject
19499
19480
  };
@@ -19818,7 +19799,7 @@ function createChatStreamReducer(options = {}) {
19818
19799
  let stateCache = null;
19819
19800
  function invalidate() {
19820
19801
  stateCache = null;
19821
- _optionalChain([onChange, 'optionalCall', _652 => _652()]);
19802
+ _optionalChain([onChange, 'optionalCall', _651 => _651()]);
19822
19803
  }
19823
19804
  function getState() {
19824
19805
  if (!stateCache) {
@@ -19834,7 +19815,7 @@ function createChatStreamReducer(options = {}) {
19834
19815
  return stateCache;
19835
19816
  }
19836
19817
  function emit(name, ...args) {
19837
- _optionalChain([onEffect, 'optionalCall', _653 => _653({ name, args })]);
19818
+ _optionalChain([onEffect, 'optionalCall', _652 => _652({ name, args })]);
19838
19819
  }
19839
19820
  function setMessagesInternal(next) {
19840
19821
  if (next !== messages) {
@@ -19877,12 +19858,12 @@ function createChatStreamReducer(options = {}) {
19877
19858
  return stampTrailingAssistantSourceMetadata(stampTrailingAssistantSeq(next, seq));
19878
19859
  }
19879
19860
  function applySegmentsToState(segments, meta) {
19880
- const seq = _optionalChain([meta, 'optionalAccess', _654 => _654.streamSeq]);
19881
- if (_optionalChain([meta, 'optionalAccess', _655 => _655.append]) && meta.isCompacting) {
19861
+ const seq = _optionalChain([meta, 'optionalAccess', _653 => _653.streamSeq]);
19862
+ if (_optionalChain([meta, 'optionalAccess', _654 => _654.append]) && meta.isCompacting) {
19882
19863
  setMessagesInternal(commitTrailingAssistant(upsertTrailingCompaction(messages, segments), seq));
19883
19864
  return;
19884
19865
  }
19885
- if (_optionalChain([meta, 'optionalAccess', _656 => _656.append])) {
19866
+ if (_optionalChain([meta, 'optionalAccess', _655 => _655.append])) {
19886
19867
  setMessagesInternal(commitTrailingAssistant(appendToTrailingAssistant(messages, segments), seq));
19887
19868
  return;
19888
19869
  }
@@ -19894,7 +19875,7 @@ function createChatStreamReducer(options = {}) {
19894
19875
  adoptTrailingAssistant = false;
19895
19876
  const last = messages[messages.length - 1];
19896
19877
  if (!last || last.role !== "assistant" || adoptTail) return;
19897
- const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _657 => _657.segments, 'optionalAccess', _658 => _658.length]), () => ( 0))) > 0 || last.content !== "";
19878
+ const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _656 => _656.segments, 'optionalAccess', _657 => _657.length]), () => ( 0))) > 0 || last.content !== "";
19898
19879
  if (!hasContent) return;
19899
19880
  setMessagesInternal([...messages, { id: nextId("assistant"), role: "assistant", content: "", segments: [] }]);
19900
19881
  }
@@ -20113,13 +20094,13 @@ function createChatStreamReducer(options = {}) {
20113
20094
  const summary = required ? getCommandText(required) : `Batch of ${toolCalls.length} tool calls`;
20114
20095
  pendingEscalated.set(requestId, {
20115
20096
  command: summary,
20116
- explanation: _optionalChain([required, 'optionalAccess', _659 => _659.toolExplanation]),
20097
+ explanation: _optionalChain([required, 'optionalAccess', _658 => _658.toolExplanation]),
20117
20098
  approvalType,
20118
20099
  toolCalls
20119
20100
  });
20120
20101
  emit("onEscalatedApproval", requestId, {
20121
20102
  command: summary,
20122
- explanation: _optionalChain([required, 'optionalAccess', _660 => _660.toolExplanation]),
20103
+ explanation: _optionalChain([required, 'optionalAccess', _659 => _659.toolExplanation]),
20123
20104
  approvalType
20124
20105
  });
20125
20106
  break;
@@ -20503,7 +20484,7 @@ function createChatStreamReducer(options = {}) {
20503
20484
  const resolveBatch = (status, confirm) => async () => {
20504
20485
  setMessagesInternal(projectBatchStatusToMessages(messages, anchorId, status));
20505
20486
  for (const id of ids) {
20506
- const ok = await _optionalChain([confirm, 'optionalCall', _661 => _661(id)]);
20487
+ const ok = await _optionalChain([confirm, 'optionalCall', _660 => _660(id)]);
20507
20488
  if (ok === false) {
20508
20489
  setMessagesInternal(projectBatchRowFailureToMessages(messages, id));
20509
20490
  }
@@ -20639,8 +20620,8 @@ function createChatStreamReducer(options = {}) {
20639
20620
  }
20640
20621
  }
20641
20622
  }
20642
- hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _662 => _662.resumed]), () => ( messages.length > 0)));
20643
- if (_optionalChain([extras, 'optionalAccess', _663 => _663.agentBusy])) agentBusyState();
20623
+ hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _661 => _661.resumed]), () => ( messages.length > 0)));
20624
+ if (_optionalChain([extras, 'optionalAccess', _662 => _662.agentBusy])) agentBusyState();
20644
20625
  invalidate();
20645
20626
  }
20646
20627
  return {
@@ -20725,7 +20706,7 @@ function createChatStreamReducer(options = {}) {
20725
20706
  },
20726
20707
  endSseTurn() {
20727
20708
  const last = messages[messages.length - 1];
20728
- if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _664 => _664.segments, 'optionalAccess', _665 => _665.length]), () => ( 0))) === 0 && last.content === "") {
20709
+ if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _663 => _663.segments, 'optionalAccess', _664 => _664.length]), () => ( 0))) === 0 && last.content === "") {
20729
20710
  messages = messages.slice(0, -1);
20730
20711
  }
20731
20712
  sseCurrentText = "";
@@ -20878,10 +20859,10 @@ function createChatDialogStore(options = {}) {
20878
20859
  if (onEvict) {
20879
20860
  const sep = key.indexOf(KEY_SEP);
20880
20861
  onEvict(key.slice(0, sep), key.slice(sep + 1), {
20881
- messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _666 => _666.state, 'access', _667 => _667.messages]), () => ( EMPTY_STATE.messages)),
20882
- approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _668 => _668.state, 'access', _669 => _669.approvalStatuses]), () => ( EMPTY_STATE.approvalStatuses)),
20883
- lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _670 => _670.getLastAppliedSeq, 'call', _671 => _671()]), () => ( Number.NEGATIVE_INFINITY)),
20884
- pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _672 => _672.getPendingEchoes, 'call', _673 => _673()]), () => ( EMPTY_PENDING_ECHOES))
20862
+ messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _665 => _665.state, 'access', _666 => _666.messages]), () => ( EMPTY_STATE.messages)),
20863
+ approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _667 => _667.state, 'access', _668 => _668.approvalStatuses]), () => ( EMPTY_STATE.approvalStatuses)),
20864
+ lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _669 => _669.getLastAppliedSeq, 'call', _670 => _670()]), () => ( Number.NEGATIVE_INFINITY)),
20865
+ pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _671 => _671.getPendingEchoes, 'call', _672 => _672()]), () => ( EMPTY_PENDING_ECHOES))
20885
20866
  });
20886
20867
  }
20887
20868
  }
@@ -20891,12 +20872,12 @@ function createChatDialogStore(options = {}) {
20891
20872
  const key = keyOf(dialogId, side);
20892
20873
  let reducer = reducers.get(key);
20893
20874
  if (!reducer) {
20894
- const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _674 => _674(dialogId, side)]), () => ( {}));
20875
+ const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _673 => _673(dialogId, side)]), () => ( {}));
20895
20876
  const userOnChange = base.onChange;
20896
20877
  reducer = createChatStreamReducer({
20897
20878
  ...base,
20898
20879
  onChange: () => {
20899
- _optionalChain([userOnChange, 'optionalCall', _675 => _675()]);
20880
+ _optionalChain([userOnChange, 'optionalCall', _674 => _674()]);
20900
20881
  notify();
20901
20882
  }
20902
20883
  });
@@ -20941,7 +20922,7 @@ function createChatDialogStore(options = {}) {
20941
20922
  };
20942
20923
  }
20943
20924
  function getSnapshot2(dialogId, side = DEFAULT_DIALOG_SIDE) {
20944
- return _nullishCoalesce(_optionalChain([reducers, 'access', _676 => _676.get, 'call', _677 => _677(keyOf(dialogId, side)), 'optionalAccess', _678 => _678.state]), () => ( EMPTY_STATE));
20925
+ return _nullishCoalesce(_optionalChain([reducers, 'access', _675 => _675.get, 'call', _676 => _676(keyOf(dialogId, side)), 'optionalAccess', _677 => _677.state]), () => ( EMPTY_STATE));
20945
20926
  }
20946
20927
  function getServerSnapshot2() {
20947
20928
  return EMPTY_STATE;
@@ -21033,7 +21014,7 @@ function createDeltaBatcher({
21033
21014
  pending = [];
21034
21015
  const key = pendingKey;
21035
21016
  for (const delta of batch) applyOne(delta, key);
21036
- _optionalChain([onFlushed, 'optionalCall', _679 => _679(batch.length)]);
21017
+ _optionalChain([onFlushed, 'optionalCall', _678 => _678(batch.length)]);
21037
21018
  }
21038
21019
  function schedule() {
21039
21020
  if (raf !== null || timer !== null) return;
@@ -21057,7 +21038,7 @@ function createDeltaBatcher({
21057
21038
  }
21058
21039
  if (!isDeltaEvent(event)) return false;
21059
21040
  const tail = pending[pending.length - 1];
21060
- const seqAdvances = _optionalChain([tail, 'optionalAccess', _680 => _680.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
21041
+ const seqAdvances = _optionalChain([tail, 'optionalAccess', _679 => _679.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
21061
21042
  if (tail && seqAdvances && tail.type === event.type && (tail.type !== "text-delta" || tail.leading === event.leading)) {
21062
21043
  pending[pending.length - 1] = {
21063
21044
  ...tail,
@@ -21088,7 +21069,7 @@ function useChatStreamReducer({
21088
21069
  side = DEFAULT_DIALOG_SIDE,
21089
21070
  createReducerOptions
21090
21071
  }) {
21091
- const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _681 => _681()]), () => ( {})));
21072
+ const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _680 => _680()]), () => ( {})));
21092
21073
  const getSnapshot2 = _react.useCallback.call(void 0, () => store.getSnapshot(dialogId, side), [store, dialogId, side]);
21093
21074
  const getServerSnapshot2 = _react.useCallback.call(void 0, () => store.getServerSnapshot(), [store]);
21094
21075
  const subscribe2 = _react.useCallback.call(void 0, (listener) => store.subscribe(listener), [store]);
@@ -21127,7 +21108,7 @@ var STORAGE_KEY = "conversation";
21127
21108
  var namespaceFor = (source) => {
21128
21109
  const base = `mingo-chat-${source}`;
21129
21110
  const auth = _chunkXOGD2AMEcjs.getEmbedProxyAuth.call(void 0, );
21130
- return _optionalChain([auth, 'optionalAccess', _682 => _682.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
21111
+ return _optionalChain([auth, 'optionalAccess', _681 => _681.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
21131
21112
  };
21132
21113
  function createChatConversationStorage(source) {
21133
21114
  return _chunkXOGD2AMEcjs.createLocalStorageAdapter.call(void 0, {
@@ -21239,7 +21220,7 @@ function formatSingularLookupInvocation(cmdId, value) {
21239
21220
  return safe ? `/${cmdId} "${safe}"` : `/${cmdId}`;
21240
21221
  }
21241
21222
  function extractEntityIdFilter(override, expectedTableId) {
21242
- const f = _optionalChain([override, 'optionalAccess', _683 => _683.entityIdFilter]);
21223
+ const f = _optionalChain([override, 'optionalAccess', _682 => _682.entityIdFilter]);
21243
21224
  if (!f) return null;
21244
21225
  const tableId = typeof f.tableId === "string" ? f.tableId : "";
21245
21226
  const id = typeof f.id === "string" ? f.id : "";
@@ -21278,7 +21259,7 @@ var AUTO_CONTINUATION_DIRECTIVE_PREFIX = "[internal-auto-continuation]";
21278
21259
  function buildAutoContinuationDirective(toolName, opts = {}) {
21279
21260
  const ticketRef = opts.ticketId ? ` (ticket #${opts.ticketId})` : "";
21280
21261
  const ticketHash = opts.ticketId ? ` #${opts.ticketId}` : "";
21281
- const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access', _684 => _684.status, 'optionalAccess', _685 => _685.toUpperCase, 'call', _686 => _686()]) === "CLOSED";
21262
+ const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access', _683 => _683.status, 'optionalAccess', _684 => _684.toUpperCase, 'call', _685 => _685()]) === "CLOSED";
21282
21263
  if (toolName === "create_ticket") {
21283
21264
  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.`;
21284
21265
  }
@@ -21328,7 +21309,7 @@ function useChatHistoryHydration({
21328
21309
  if (cancelled) return;
21329
21310
  if (rows.length === 0) {
21330
21311
  const found = isRecord(body) ? body.found : void 0;
21331
- if (found === false) _optionalChain([onOrphanedConversation, 'optionalCall', _687 => _687(conversationId)]);
21312
+ if (found === false) _optionalChain([onOrphanedConversation, 'optionalCall', _686 => _686(conversationId)]);
21332
21313
  return;
21333
21314
  }
21334
21315
  const hydrated = [];
@@ -21472,7 +21453,7 @@ function useManagedDialogList({
21472
21453
  try {
21473
21454
  await deleteDialogCallback(id);
21474
21455
  removeLocal(id);
21475
- _optionalChain([onDialogRemovedRef, 'access', _688 => _688.current, 'optionalCall', _689 => _689(id, "deleted")]);
21456
+ _optionalChain([onDialogRemovedRef, 'access', _687 => _687.current, 'optionalCall', _688 => _688(id, "deleted")]);
21476
21457
  } catch (err) {
21477
21458
  console.error(`${logTag} deleteDialog failed:`, err);
21478
21459
  throw err;
@@ -21483,7 +21464,7 @@ function useManagedDialogList({
21483
21464
  const renameDialog = _react.useCallback.call(void 0,
21484
21465
  async (id, title) => {
21485
21466
  if (!renameDialogCallback) return;
21486
- const previous = _optionalChain([dialogsRef, 'access', _690 => _690.current, 'access', _691 => _691.find, 'call', _692 => _692((d) => d.id === id), 'optionalAccess', _693 => _693.title]);
21467
+ const previous = _optionalChain([dialogsRef, 'access', _689 => _689.current, 'access', _690 => _690.find, 'call', _691 => _691((d) => d.id === id), 'optionalAccess', _692 => _692.title]);
21487
21468
  setDialogs((prev) => prev.map((d) => d.id === id ? { ...d, title } : d));
21488
21469
  try {
21489
21470
  await renameDialogCallback(id, title);
@@ -21502,7 +21483,7 @@ function useManagedDialogList({
21502
21483
  try {
21503
21484
  await archiveDialogCallback(id);
21504
21485
  removeLocal(id);
21505
- _optionalChain([onDialogRemovedRef, 'access', _694 => _694.current, 'optionalCall', _695 => _695(id, "archived")]);
21486
+ _optionalChain([onDialogRemovedRef, 'access', _693 => _693.current, 'optionalCall', _694 => _694(id, "archived")]);
21506
21487
  } catch (err) {
21507
21488
  console.error(`${logTag} archiveDialog failed:`, err);
21508
21489
  throw err;
@@ -21594,7 +21575,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21594
21575
  const { active = true } = runtimeOptions;
21595
21576
  const runtime = _chunkU2YLMFJKcjs.useRequiredChatRuntime.call(void 0, );
21596
21577
  const source = runtime.source || DEFAULT_CHAT_SOURCE;
21597
- const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _696 => _696.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
21578
+ const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _695 => _695.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
21598
21579
  const sendMessageRef = _react.useRef.call(void 0,
21599
21580
  () => Promise.resolve(true)
21600
21581
  );
@@ -21630,7 +21611,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21630
21611
  if (!restoredConversationRef.current) {
21631
21612
  restoredConversationRef.current = true;
21632
21613
  pruneStaleChatConversationStorage(source);
21633
- conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _697 => _697.load, 'call', _698 => _698(), 'optionalAccess', _699 => _699.conversationId]), () => ( null));
21614
+ conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _696 => _696.load, 'call', _697 => _697(), 'optionalAccess', _698 => _698.conversationId]), () => ( null));
21634
21615
  }
21635
21616
  const [conversationId, setConversationId] = _react.useState.call(void 0, () => conversationIdRef.current);
21636
21617
  const commitConversationId = _react.useCallback.call(void 0,
@@ -21721,7 +21702,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21721
21702
  const abortControllerRef = _react.useRef.call(void 0, null);
21722
21703
  const switchConversation = _react.useCallback.call(void 0,
21723
21704
  (id) => {
21724
- _optionalChain([abortControllerRef, 'access', _700 => _700.current, 'optionalAccess', _701 => _701.abort, 'call', _702 => _702()]);
21705
+ _optionalChain([abortControllerRef, 'access', _699 => _699.current, 'optionalAccess', _700 => _700.abort, 'call', _701 => _701()]);
21725
21706
  flushDeltas();
21726
21707
  mutate((r) => r.reset());
21727
21708
  hydrationSendCountRef.current = 0;
@@ -21758,8 +21739,8 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21758
21739
  } = useManagedDialogList({
21759
21740
  autoLoad: active,
21760
21741
  fetchDialogs: fetchActiveDialogs,
21761
- renameDialog: _optionalChain([conversationsApi, 'optionalAccess', _703 => _703.renameDialog]),
21762
- archiveDialog: _optionalChain([conversationsApi, 'optionalAccess', _704 => _704.archiveDialog]),
21742
+ renameDialog: _optionalChain([conversationsApi, 'optionalAccess', _702 => _702.renameDialog]),
21743
+ archiveDialog: _optionalChain([conversationsApi, 'optionalAccess', _703 => _703.archiveDialog]),
21763
21744
  pageSize: 20,
21764
21745
  search: conversationsApi ? dialogSearch : void 0,
21765
21746
  logTag: "[useSseChatAdapter]",
@@ -21823,7 +21804,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21823
21804
  const serverMessage = await readServerErrorMessage(response);
21824
21805
  throw new Error(_nullishCoalesce(serverMessage, () => ( `Chat request failed: ${response.status}`)));
21825
21806
  }
21826
- const reader = _optionalChain([response, 'access', _705 => _705.body, 'optionalAccess', _706 => _706.getReader, 'call', _707 => _707()]);
21807
+ const reader = _optionalChain([response, 'access', _704 => _704.body, 'optionalAccess', _705 => _705.getReader, 'call', _706 => _706()]);
21827
21808
  if (!reader) throw new Error("No response body");
21828
21809
  const frameDecoder = createSseFrameDecoder();
21829
21810
  let finished = false;
@@ -21852,7 +21833,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21852
21833
  }
21853
21834
  return true;
21854
21835
  } catch (err) {
21855
- if (_optionalChain([err, 'optionalAccess', _708 => _708.name]) === "AbortError" || ctrl.signal.aborted) {
21836
+ if (_optionalChain([err, 'optionalAccess', _707 => _707.name]) === "AbortError" || ctrl.signal.aborted) {
21856
21837
  return true;
21857
21838
  }
21858
21839
  flushDeltas();
@@ -21888,7 +21869,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21888
21869
  );
21889
21870
  sendMessageRef.current = sendMessage;
21890
21871
  const stopMessage = _react.useCallback.call(void 0, () => {
21891
- _optionalChain([abortControllerRef, 'access', _709 => _709.current, 'optionalAccess', _710 => _710.abort, 'call', _711 => _711()]);
21872
+ _optionalChain([abortControllerRef, 'access', _708 => _708.current, 'optionalAccess', _709 => _709.abort, 'call', _710 => _710()]);
21892
21873
  flushDeltas();
21893
21874
  mutate((r) => r.setPhase("idle"));
21894
21875
  }, [mutate, flushDeltas]);
@@ -21924,7 +21905,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21924
21905
  let sendIdx = -1;
21925
21906
  return state.messages.map((m) => {
21926
21907
  const segments = m.segments;
21927
- const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _712 => _712.filter, 'call', _713 => _713((s) => s.type === "text"), 'access', _714 => _714.map, 'call', _715 => _715((s) => s.text), 'access', _716 => _716.join, 'call', _717 => _717("")]), () => ( ""));
21908
+ const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _711 => _711.filter, 'call', _712 => _712((s) => s.type === "text"), 'access', _713 => _713.map, 'call', _714 => _714((s) => s.text), 'access', _715 => _715.join, 'call', _716 => _716("")]), () => ( ""));
21928
21909
  let sources2;
21929
21910
  let scrollAnchor;
21930
21911
  if (m.role === "user" && !m.hidden) {
@@ -21933,7 +21914,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21933
21914
  if (m.role === "assistant") {
21934
21915
  const lookupIdx = sendIdx >= 0 ? sendIdx : 0;
21935
21916
  sources2 = sourcesMap.get(lookupIdx);
21936
- scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _718 => _718.get, 'call', _719 => _719(lookupIdx), 'optionalAccess', _720 => _720.scrollAnchor]), () => ( void 0));
21917
+ scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _717 => _717.get, 'call', _718 => _718(lookupIdx), 'optionalAccess', _719 => _719.scrollAnchor]), () => ( void 0));
21937
21918
  }
21938
21919
  return {
21939
21920
  id: m.id,
@@ -21960,7 +21941,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21960
21941
  );
21961
21942
  return;
21962
21943
  }
21963
- const refSlug = typeof _optionalChain([reference, 'access', _721 => _721.metadata, 'optionalAccess', _722 => _722.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
21944
+ const refSlug = typeof _optionalChain([reference, 'access', _720 => _720.metadata, 'optionalAccess', _721 => _721.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
21964
21945
  const queryValue = refSlug || sanitizeTitleForChat(reference.title) || reference.id;
21965
21946
  const escaped = queryValue.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
21966
21947
  const text2 = `/${cmdId} display "${escaped}"`;
@@ -22006,18 +21987,18 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
22006
21987
  /** True while the mount-time rebuild from the server transcript runs. */
22007
21988
  isHydratingHistory,
22008
21989
  /** Provider key for the lib's `<ModelDisplay>` icon. */
22009
- currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _723 => _723.provider]), () => ( null)),
22010
- currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _724 => _724.modelLabel]), () => ( null)),
22011
- currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _725 => _725.contextWindowMaxTokens]), () => ( null)),
21990
+ currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _722 => _722.provider]), () => ( null)),
21991
+ currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _723 => _723.modelLabel]), () => ( null)),
21992
+ currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _724 => _724.contextWindowMaxTokens]), () => ( null)),
22012
21993
  /** Input tokens (known after server's message_start frame; null until). */
22013
- currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _726 => _726.inputTokens]), () => ( null)),
21994
+ currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _725 => _725.inputTokens]), () => ( null)),
22014
21995
  /** Output tokens (known only after server's trailing usage frame). */
22015
- currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _727 => _727.outputTokens]), () => ( null)),
21996
+ currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _726 => _726.outputTokens]), () => ( null)),
22016
21997
  /** Cache hit % (read / total-input × 100). null during streaming. */
22017
- currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _728 => _728.cacheHitRatePct]), () => ( null)),
21998
+ currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _727 => _727.cacheHitRatePct]), () => ( null)),
22018
21999
  /** Cross-call usage breakdown (Haiku rewriter/classifier/summarizer
22019
22000
  * token counts). null until the trailing usage frame lands. */
22020
- currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _729 => _729.breakdown]), () => ( null)),
22001
+ currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _728 => _728.breakdown]), () => ( null)),
22021
22002
  // ─── Dialog management ───────────────────────────────────────────────
22022
22003
  // With `chatConversationsUrl` the server transcript store IS the dialog
22023
22004
  // list (shared `useManagedDialogList`); selecting a row re-hydrates through
@@ -22272,7 +22253,7 @@ function decodeNatsChunk(chunk) {
22272
22253
  userId: typeof data.userId === "string" ? data.userId : void 0,
22273
22254
  // Wire shape carries no label; fall back to the id (parity with
22274
22255
  // the history path in `process-historical-messages.ts`).
22275
- contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _730 => _730.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _731 => _731.id]) === "string").map((it) => ({
22256
+ contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _729 => _729.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _730 => _730.id]) === "string").map((it) => ({
22276
22257
  type: it.type,
22277
22258
  id: it.id,
22278
22259
  label: it.id
@@ -22363,7 +22344,7 @@ function extractIncompleteMessageState(lastMessage) {
22363
22344
  }
22364
22345
  break;
22365
22346
  case "approval_batch": {
22366
- const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _732 => _732.data, 'access', _733 => _733.executions, 'optionalAccess', _734 => _734[c.toolExecutionRequestId], 'optionalAccess', _735 => _735.status]) === "done");
22347
+ const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _731 => _731.data, 'access', _732 => _732.executions, 'optionalAccess', _733 => _733[c.toolExecutionRequestId], 'optionalAccess', _734 => _734.status]) === "done");
22367
22348
  if (segment.status !== "rejected" && !allDone) {
22368
22349
  hasIncompleteState = true;
22369
22350
  }
@@ -22425,11 +22406,11 @@ function extractIncompleteMessageState(lastMessage) {
22425
22406
  function extractIncompleteTailState(messages) {
22426
22407
  if (!messages || messages.length === 0) return void 0;
22427
22408
  let start = messages.length;
22428
- while (start > 0 && _optionalChain([messages, 'access', _736 => _736[start - 1], 'optionalAccess', _737 => _737.role]) === "assistant") start -= 1;
22409
+ while (start > 0 && _optionalChain([messages, 'access', _735 => _735[start - 1], 'optionalAccess', _736 => _736.role]) === "assistant") start -= 1;
22429
22410
  if (start === messages.length) return void 0;
22430
22411
  const segments = [];
22431
22412
  for (let i = start; i < messages.length; i += 1) {
22432
- const content = _optionalChain([messages, 'access', _738 => _738[i], 'optionalAccess', _739 => _739.content]);
22413
+ const content = _optionalChain([messages, 'access', _737 => _737[i], 'optionalAccess', _738 => _738.content]);
22433
22414
  if (Array.isArray(content)) segments.push(...content);
22434
22415
  }
22435
22416
  if (segments.length === 0) return void 0;
@@ -22442,15 +22423,15 @@ function extractIncompleteTailState(messages) {
22442
22423
 
22443
22424
  // src/components/chat/utils/process-historical-messages.ts
22444
22425
  function getOwnerDisplayName(owner) {
22445
- if (_optionalChain([owner, 'optionalAccess', _740 => _740.type]) === OWNER_TYPE.ADMIN && owner.user) {
22426
+ if (_optionalChain([owner, 'optionalAccess', _739 => _739.type]) === OWNER_TYPE.ADMIN && owner.user) {
22446
22427
  const { firstName, lastName } = owner.user;
22447
22428
  const name = [firstName, lastName].filter(Boolean).join(" ");
22448
22429
  if (name) return name;
22449
22430
  }
22450
- return _optionalChain([owner, 'optionalAccess', _741 => _741.type]) === OWNER_TYPE.ADMIN ? "Admin" : "You";
22431
+ return _optionalChain([owner, 'optionalAccess', _740 => _740.type]) === OWNER_TYPE.ADMIN ? "Admin" : "You";
22451
22432
  }
22452
22433
  function getOwnerAvatar(owner) {
22453
- return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _742 => _742.user, 'optionalAccess', _743 => _743.image, 'optionalAccess', _744 => _744.imageUrl]), () => ( void 0));
22434
+ return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _741 => _741.user, 'optionalAccess', _742 => _742.image, 'optionalAccess', _743 => _743.imageUrl]), () => ( void 0));
22454
22435
  }
22455
22436
  function pushStandaloneMessages(processedMessages, msg, messageDataArray) {
22456
22437
  messageDataArray.forEach((data) => {
@@ -22640,7 +22621,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
22640
22621
  event.offerId,
22641
22622
  event.text,
22642
22623
  event.origin,
22643
- _nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _745 => _745[event.offerId]]), () => ( "pending"))
22624
+ _nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _744 => _744[event.offerId]]), () => ( "pending"))
22644
22625
  );
22645
22626
  break;
22646
22627
  case "ticket-escalated":
@@ -22674,7 +22655,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
22674
22655
  );
22675
22656
  break;
22676
22657
  case "escalation-offer-resolved":
22677
- _optionalChain([offerResolutions, 'optionalAccess', _746 => _746.set, 'call', _747 => _747(event.offerId, {
22658
+ _optionalChain([offerResolutions, 'optionalAccess', _745 => _745.set, 'call', _746 => _746(event.offerId, {
22678
22659
  status: event.status,
22679
22660
  resolvedByName: event.resolvedByName
22680
22661
  })]);
@@ -22738,7 +22719,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
22738
22719
  }
22739
22720
  }
22740
22721
  } else {
22741
- _optionalChain([escalatedApprovals, 'optionalAccess', _748 => _748.set, 'call', _749 => _749(event.requestId, {
22722
+ _optionalChain([escalatedApprovals, 'optionalAccess', _747 => _747.set, 'call', _748 => _748(event.requestId, {
22742
22723
  command: event.command || "",
22743
22724
  explanation: event.explanation,
22744
22725
  approvalType,
@@ -22753,8 +22734,8 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
22753
22734
  const existingStatus = approvalStatuses[requestId];
22754
22735
  const status = existingStatus || event.status;
22755
22736
  const resolvedByName = event.resolvedByName;
22756
- const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _750 => _750.get, 'call', _751 => _751(requestId)]);
22757
- if (_optionalChain([escalatedData, 'optionalAccess', _752 => _752.toolCalls]) && escalatedData.toolCalls.length > 0) {
22737
+ const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _749 => _749.get, 'call', _750 => _750(requestId)]);
22738
+ if (_optionalChain([escalatedData, 'optionalAccess', _751 => _751.toolCalls]) && escalatedData.toolCalls.length > 0) {
22758
22739
  if (batchApprovalsEnabled) {
22759
22740
  accumulator.addApprovalBatch(
22760
22741
  requestId,
@@ -22776,7 +22757,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
22776
22757
  );
22777
22758
  }
22778
22759
  }
22779
- _optionalChain([escalatedApprovals, 'optionalAccess', _753 => _753.delete, 'call', _754 => _754(requestId)]);
22760
+ _optionalChain([escalatedApprovals, 'optionalAccess', _752 => _752.delete, 'call', _753 => _753(requestId)]);
22780
22761
  break;
22781
22762
  }
22782
22763
  if (escalatedData) {
@@ -22785,7 +22766,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
22785
22766
  explanation: escalatedData.explanation,
22786
22767
  approvalType: escalatedData.approvalType
22787
22768
  });
22788
- _optionalChain([escalatedApprovals, 'optionalAccess', _755 => _755.delete, 'call', _756 => _756(requestId)]);
22769
+ _optionalChain([escalatedApprovals, 'optionalAccess', _754 => _754.delete, 'call', _755 => _755(requestId)]);
22789
22770
  }
22790
22771
  const before = accumulator.getSegments();
22791
22772
  const after = accumulator.updateApprovalStatus(requestId, status, resolvedByName);
@@ -22877,14 +22858,14 @@ function processHistoricalMessages(messages, options = {}) {
22877
22858
  pushStandaloneMessages(processedMessages, msg, messageDataArray);
22878
22859
  return;
22879
22860
  }
22880
- const isUserMessage = _optionalChain([msg, 'access', _757 => _757.owner, 'optionalAccess', _758 => _758.type]) === OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _759 => _759.owner, 'optionalAccess', _760 => _760.type]) === OWNER_TYPE.ADMIN;
22861
+ const isUserMessage = _optionalChain([msg, 'access', _756 => _756.owner, 'optionalAccess', _757 => _757.type]) === OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _758 => _758.owner, 'optionalAccess', _759 => _759.type]) === OWNER_TYPE.ADMIN;
22881
22862
  if (isUserMessage) {
22882
22863
  flushAssistantMessage();
22883
- const userAuthorType = _optionalChain([msg, 'access', _761 => _761.owner, 'optionalAccess', _762 => _762.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
22864
+ const userAuthorType = _optionalChain([msg, 'access', _760 => _760.owner, 'optionalAccess', _761 => _761.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
22884
22865
  messageDataArray.forEach((data) => {
22885
22866
  if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
22886
22867
  const rawContext = data.contextItems;
22887
- const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _763 => _763.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _764 => _764.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
22868
+ const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _762 => _762.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _763 => _763.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
22888
22869
  processedMessages.push({
22889
22870
  id: msg.id,
22890
22871
  role: "user",
@@ -22931,7 +22912,7 @@ function processHistoricalMessages(messages, options = {}) {
22931
22912
  });
22932
22913
  const nextMsg = messages[index + 1];
22933
22914
  const isLastMessage = index === messages.length - 1;
22934
- const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _765 => _765.owner, 'optionalAccess', _766 => _766.type]) === OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _767 => _767.owner, 'optionalAccess', _768 => _768.type]) === OWNER_TYPE.ADMIN);
22915
+ const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _764 => _764.owner, 'optionalAccess', _765 => _765.type]) === OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _766 => _766.owner, 'optionalAccess', _767 => _767.type]) === OWNER_TYPE.ADMIN);
22935
22916
  if (isLastMessage || nextIsFromUser) {
22936
22917
  flushAssistantMessage();
22937
22918
  }
@@ -23314,7 +23295,7 @@ function useNatsChatAdapter(config, options = {}) {
23314
23295
  const connectionState = !active || !dialogId ? "connected" : connectedForDialog === dialogId ? "connected" : "connecting";
23315
23296
  const sendMessage = _react.useCallback.call(void 0,
23316
23297
  async (text2, sendOptions) => {
23317
- const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _769 => _769.hidden]), () => ( false));
23298
+ const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _768 => _768.hidden]), () => ( false));
23318
23299
  mutate((r) => r.pushOptimisticSend(text2, hidden));
23319
23300
  await publishUserMessage(text2, { hidden, dialogId });
23320
23301
  },
@@ -23407,11 +23388,11 @@ function useNatsChatAdapter(config, options = {}) {
23407
23388
  // Tokens: live `token_usage` frame / dialog snapshot (`dialogTokenUsage`).
23408
23389
  // contextWindow uses the dialog's `contextSize` (the "X / Y" denominator,
23409
23390
  // matching the /mingo page). cacheHitRate/breakdown are SSE-only → null.
23410
- currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _770 => _770.provider]), () => ( modelProvider)), () => ( null)),
23411
- currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _771 => _771.modelLabel]), () => ( modelLabel)), () => ( null)),
23412
- currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _772 => _772.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _773 => _773.contextWindowMaxTokens]))), () => ( null)),
23413
- currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _774 => _774.inputTokensSize]), () => ( null)),
23414
- currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _775 => _775.outputTokensSize]), () => ( null)),
23391
+ currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _769 => _769.provider]), () => ( modelProvider)), () => ( null)),
23392
+ currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _770 => _770.modelLabel]), () => ( modelLabel)), () => ( null)),
23393
+ currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _771 => _771.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _772 => _772.contextWindowMaxTokens]))), () => ( null)),
23394
+ currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _773 => _773.inputTokensSize]), () => ( null)),
23395
+ currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _774 => _774.outputTokensSize]), () => ( null)),
23415
23396
  currentCacheHitRatePct: null,
23416
23397
  currentUsageBreakdown: null,
23417
23398
  // Dialog management
@@ -23533,7 +23514,7 @@ function useUnifiedChat(options) {
23533
23514
  []
23534
23515
  );
23535
23516
  const displayRefForward = _react.useCallback.call(void 0,
23536
- (ref) => _optionalChain([activeStateRef, 'access', _776 => _776.current, 'access', _777 => _777.displayRef, 'optionalCall', _778 => _778(ref)]),
23517
+ (ref) => _optionalChain([activeStateRef, 'access', _775 => _775.current, 'access', _776 => _776.displayRef, 'optionalCall', _777 => _777(ref)]),
23537
23518
  []
23538
23519
  );
23539
23520
  const displayRef = activeState.displayRef ? displayRefForward : void 0;
@@ -23543,7 +23524,7 @@ function useUnifiedChat(options) {
23543
23524
  const renameDialog = _react.useCallback.call(void 0, (id, title) => activeStateRef.current.renameDialog(id, title), []);
23544
23525
  const archiveDialog = _react.useCallback.call(void 0, (id) => activeStateRef.current.archiveDialog(id), []);
23545
23526
  const loadMoreDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreDialogs(), []);
23546
- const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _779 => _779.current, 'access', _780 => _780.setDialogScope, 'optionalCall', _781 => _781(scope)]), []);
23527
+ const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _778 => _778.current, 'access', _779 => _779.setDialogScope, 'optionalCall', _780 => _780(scope)]), []);
23547
23528
  const reloadDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.reloadDialogs(), []);
23548
23529
  const loadMoreMessages = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreMessages(), []);
23549
23530
  const approveRequest = _react.useCallback.call(void 0, (requestId) => activeStateRef.current.approveRequest(requestId), []);
@@ -23651,19 +23632,19 @@ function turnRequestKeys(content) {
23651
23632
  if (!Array.isArray(content)) return keys;
23652
23633
  for (const seg of content) {
23653
23634
  if (seg.type === "tool_execution") {
23654
- const id = _optionalChain([seg, 'access', _782 => _782.data, 'optionalAccess', _783 => _783.toolExecutionRequestId]);
23635
+ const id = _optionalChain([seg, 'access', _781 => _781.data, 'optionalAccess', _782 => _782.toolExecutionRequestId]);
23655
23636
  if (id) keys.add(id);
23656
23637
  } else if (seg.type === "approval_request") {
23657
- const id = _optionalChain([seg, 'access', _784 => _784.data, 'optionalAccess', _785 => _785.requestId]);
23638
+ const id = _optionalChain([seg, 'access', _783 => _783.data, 'optionalAccess', _784 => _784.requestId]);
23658
23639
  if (id) keys.add(id);
23659
23640
  } else if (seg.type === "escalation_offer") {
23660
- const id = _optionalChain([seg, 'access', _786 => _786.data, 'optionalAccess', _787 => _787.offerId]);
23641
+ const id = _optionalChain([seg, 'access', _785 => _785.data, 'optionalAccess', _786 => _786.offerId]);
23661
23642
  if (id) keys.add(id);
23662
23643
  } else if (seg.type === "approval_batch") {
23663
23644
  const data = seg.data;
23664
- if (_optionalChain([data, 'optionalAccess', _788 => _788.approvalRequestId])) keys.add(data.approvalRequestId);
23665
- for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess', _789 => _789.toolCalls]), () => ( []))) {
23666
- if (_optionalChain([call, 'optionalAccess', _790 => _790.toolExecutionRequestId])) keys.add(call.toolExecutionRequestId);
23645
+ if (_optionalChain([data, 'optionalAccess', _787 => _787.approvalRequestId])) keys.add(data.approvalRequestId);
23646
+ for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess', _788 => _788.toolCalls]), () => ( []))) {
23647
+ if (_optionalChain([call, 'optionalAccess', _789 => _789.toolExecutionRequestId])) keys.add(call.toolExecutionRequestId);
23667
23648
  }
23668
23649
  }
23669
23650
  }
@@ -23748,18 +23729,18 @@ function mergeHistoryWithRealtime(input) {
23748
23729
  }
23749
23730
  }
23750
23731
  const trailing = processedHistory[processedHistory.length - 1];
23751
- const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess', _791 => _791.role]) === "assistant" ? trailing : null;
23752
- const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access', _792 => _792.content, 'access', _793 => _793.find, 'call', _794 => _794((s) => s.type === "approval_batch"), 'optionalAccess', _795 => _795.data, 'optionalAccess', _796 => _796.approvalRequestId]), () => ( null)) : null;
23732
+ const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess', _790 => _790.role]) === "assistant" ? trailing : null;
23733
+ const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access', _791 => _791.content, 'access', _792 => _792.find, 'call', _793 => _793((s) => s.type === "approval_batch"), 'optionalAccess', _794 => _794.data, 'optionalAccess', _795 => _795.approvalRequestId]), () => ( null)) : null;
23753
23734
  let processedToUse = processedHistory;
23754
23735
  const pinnedSyntheticIds = /* @__PURE__ */ new Set();
23755
23736
  const droppedSyntheticIds = /* @__PURE__ */ new Set();
23756
23737
  if (historyBatchId) {
23757
23738
  const batchTwins = existingMessages.filter(
23758
- (m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access', _797 => _797.data, 'optionalAccess', _798 => _798.approvalRequestId]) === historyBatchId)
23739
+ (m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access', _796 => _796.data, 'optionalAccess', _797 => _797.approvalRequestId]) === historyBatchId)
23759
23740
  );
23760
23741
  const existingWithSameBatch = _nullishCoalesce(batchTwins.find((m) => m.id === streamingMessageId), () => ( batchTwins[batchTwins.length - 1]));
23761
23742
  if (existingWithSameBatch && Array.isArray(existingWithSameBatch.content)) {
23762
- const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess', _799 => _799.content])) ? historyTrailingAssistant.content.length : 0;
23743
+ const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess', _798 => _798.content])) ? historyTrailingAssistant.content.length : 0;
23763
23744
  const realtimeSize = existingWithSameBatch.content.length;
23764
23745
  if (existingWithSameBatch.id === streamingMessageId || realtimeSize > histSize) {
23765
23746
  processedToUse = processedHistory.slice(0, -1);
@@ -23792,9 +23773,9 @@ function mergeHistoryWithRealtime(input) {
23792
23773
  const trailingAssistantText = lastProcessed && lastProcessed.role === "assistant" ? assistantAnswerText(lastProcessed.content) : "";
23793
23774
  const windowSignals = collectTwinSignals(processedToUse);
23794
23775
  const seenUserSyntheticByContent = /* @__PURE__ */ new Map();
23795
- const isInWindow = (m) => processedIds.has(m.id) || (_nullishCoalesce(_optionalChain([rawHistoryIds, 'optionalAccess', _800 => _800.has, 'call', _801 => _801(m.id)]), () => ( false)));
23776
+ const isInWindow = (m) => processedIds.has(m.id) || (_nullishCoalesce(_optionalChain([rawHistoryIds, 'optionalAccess', _799 => _799.has, 'call', _800 => _800(m.id)]), () => ( false)));
23796
23777
  const firstWindowIndex = existingMessages.findIndex(isInWindow);
23797
- const isPersistedOlder = (m) => !isClientMintedId(m.id) && (_nullishCoalesce(_optionalChain([m, 'access', _802 => _802.timestamp, 'optionalAccess', _803 => _803.getTime, 'call', _804 => _804()]), () => ( 0))) <= historyFetchedAt;
23778
+ const isPersistedOlder = (m) => !isClientMintedId(m.id) && (_nullishCoalesce(_optionalChain([m, 'access', _801 => _801.timestamp, 'optionalAccess', _802 => _802.getTime, 'call', _803 => _803()]), () => ( 0))) <= historyFetchedAt;
23798
23779
  let lastOlderPersistedIndex = -1;
23799
23780
  if (firstWindowIndex < 0) {
23800
23781
  for (const [index, m] of existingMessages.entries()) {
@@ -23812,7 +23793,7 @@ function mergeHistoryWithRealtime(input) {
23812
23793
  } else if (pm.role === "assistant") {
23813
23794
  windowHasUnstampedAssistant = true;
23814
23795
  }
23815
- const time = _optionalChain([pm, 'access', _805 => _805.timestamp, 'optionalAccess', _806 => _806.getTime, 'call', _807 => _807()]);
23796
+ const time = _optionalChain([pm, 'access', _804 => _804.timestamp, 'optionalAccess', _805 => _805.getTime, 'call', _806 => _806()]);
23816
23797
  if (typeof time === "number" && time < windowMinTime) windowMinTime = time;
23817
23798
  }
23818
23799
  const threadHasClientMintedRow = existingMessages.some((m) => isClientMintedId(m.id));
@@ -23830,14 +23811,14 @@ function mergeHistoryWithRealtime(input) {
23830
23811
  const verdict = twinVerdict(windowSignals, m);
23831
23812
  return verdict === "unknown" ? !seqCanMislead(m) : verdict === "distinct";
23832
23813
  }
23833
- const time = _optionalChain([m, 'access', _808 => _808.timestamp, 'optionalAccess', _809 => _809.getTime, 'call', _810 => _810()]);
23814
+ const time = _optionalChain([m, 'access', _807 => _807.timestamp, 'optionalAccess', _808 => _808.getTime, 'call', _809 => _809()]);
23834
23815
  if (typeof time !== "number" || time > historyFetchedAt) return false;
23835
23816
  if (!Number.isFinite(windowMinTime) || time >= windowMinTime) return false;
23836
23817
  return twinVerdict(windowSignals, m) === "distinct";
23837
23818
  };
23838
23819
  const keepRealtime = (m) => {
23839
23820
  if (m.role === "user" && isOptimisticId(m.id) && typeof m.content === "string") {
23840
- const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _811 => _811.timestamp, 'optionalAccess', _812 => _812.getTime, 'call', _813 => _813()]), () => ( 0))) <= historyFetchedAt;
23821
+ const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _810 => _810.timestamp, 'optionalAccess', _811 => _811.getTime, 'call', _812 => _812()]), () => ( 0))) <= historyFetchedAt;
23841
23822
  return !(canBeInSnapshot && windowSignals.userContents.has(userTwinKey(m)));
23842
23823
  }
23843
23824
  if (isSyntheticRealtimeId(m.id) && m.id !== streamingMessageId) {
@@ -23862,7 +23843,7 @@ function mergeHistoryWithRealtime(input) {
23862
23843
  } else if (typeof m.streamSeq === "number") {
23863
23844
  covered = historyMaxStreamSeq > 0 && historyMaxStreamSeq >= m.streamSeq;
23864
23845
  } else {
23865
- covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _814 => _814.timestamp, 'optionalAccess', _815 => _815.getTime, 'call', _816 => _816()]), () => ( 0))) <= historyFetchedAt;
23846
+ covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _813 => _813.timestamp, 'optionalAccess', _814 => _814.getTime, 'call', _815 => _815()]), () => ( 0))) <= historyFetchedAt;
23866
23847
  }
23867
23848
  if (covered) return false;
23868
23849
  }
@@ -23971,7 +23952,7 @@ function normalizeHistoricalMessageData(md) {
23971
23952
  function isHistoricalUserTurn(m) {
23972
23953
  return !!m.owner;
23973
23954
  }
23974
- var isTextSegment = (d) => _optionalChain([d, 'optionalAccess', _817 => _817.type]) === "TEXT" && typeof d.text === "string";
23955
+ var isTextSegment = (d) => _optionalChain([d, 'optionalAccess', _816 => _816.type]) === "TEXT" && typeof d.text === "string";
23975
23956
  var THINK_MS = 550;
23976
23957
  var TOKEN_MS = 55;
23977
23958
  var USER_MS = 480;
@@ -24604,7 +24585,7 @@ function useChatDialogManager({
24604
24585
  const handleConfirmRestore = _react.useCallback.call(void 0, async () => {
24605
24586
  if (restoreTarget) {
24606
24587
  try {
24607
- await _optionalChain([unarchiveDialog, 'optionalCall', _818 => _818(restoreTarget.id)]);
24588
+ await _optionalChain([unarchiveDialog, 'optionalCall', _817 => _817(restoreTarget.id)]);
24608
24589
  } catch (err) {
24609
24590
  console.error("[useChatDialogManager] unarchive failed:", err);
24610
24591
  return;
@@ -25059,7 +25040,6 @@ function EmbeddableChatInner({
25059
25040
  defaultOpen,
25060
25041
  showInternalTrigger = true,
25061
25042
  previewMode = false,
25062
- composerLock = null,
25063
25043
  extras,
25064
25044
  tableIdForDocumentType,
25065
25045
  modes,
@@ -25155,7 +25135,7 @@ function EmbeddableChatInner({
25155
25135
  }),
25156
25136
  [commandsUrl]
25157
25137
  );
25158
- const headerUserName = _optionalChain([identityUser, 'optionalAccess', _819 => _819.name, 'optionalAccess', _820 => _820.trim, 'call', _821 => _821()]) || [_optionalChain([identityUser, 'optionalAccess', _822 => _822.firstName]), _optionalChain([identityUser, 'optionalAccess', _823 => _823.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([userDisplayName, 'optionalAccess', _824 => _824.trim, 'call', _825 => _825()]) || void 0;
25138
+ const headerUserName = _optionalChain([identityUser, 'optionalAccess', _818 => _818.name, 'optionalAccess', _819 => _819.trim, 'call', _820 => _820()]) || [_optionalChain([identityUser, 'optionalAccess', _821 => _821.firstName]), _optionalChain([identityUser, 'optionalAccess', _822 => _822.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([userDisplayName, 'optionalAccess', _823 => _823.trim, 'call', _824 => _824()]) || void 0;
25159
25139
  const effectiveModes = _react.useMemo.call(void 0, () => {
25160
25140
  if (modes) return modes;
25161
25141
  const guideOptions = tableIdForDocumentType ? { tableIdForDocumentType } : {};
@@ -25170,7 +25150,7 @@ function EmbeddableChatInner({
25170
25150
  if (controlledActiveMode === void 0) {
25171
25151
  setUncontrolledActiveMode(next);
25172
25152
  }
25173
- _optionalChain([onActiveModeChange, 'optionalCall', _826 => _826(next)]);
25153
+ _optionalChain([onActiveModeChange, 'optionalCall', _825 => _825(next)]);
25174
25154
  },
25175
25155
  [controlledActiveMode, onActiveModeChange]
25176
25156
  );
@@ -25197,7 +25177,7 @@ function EmbeddableChatInner({
25197
25177
  );
25198
25178
  const effectiveAssistantName = emptyStateConfig.name;
25199
25179
  const effectiveAssistantIcon = emptyStateConfig.icon;
25200
- const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess', _827 => _827.title]) === "string" ? guideWelcome.title : null)));
25180
+ const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess', _826 => _826.title]) === "string" ? guideWelcome.title : null)));
25201
25181
  const {
25202
25182
  messages: rawMessages,
25203
25183
  isLoading: chatLoading,
@@ -25240,8 +25220,8 @@ function EmbeddableChatInner({
25240
25220
  const mingoCaps = _react.useMemo.call(void 0,
25241
25221
  () => ({
25242
25222
  ...dialogCapabilities,
25243
- canRename: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _828 => _828.canRename]), () => ( false)),
25244
- canArchive: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _829 => _829.canArchive]), () => ( false))
25223
+ canRename: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _827 => _827.canRename]), () => ( false)),
25224
+ canArchive: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _828 => _828.canArchive]), () => ( false))
25245
25225
  }),
25246
25226
  [dialogCapabilities]
25247
25227
  );
@@ -25256,7 +25236,7 @@ function EmbeddableChatInner({
25256
25236
  void sendMessage(guidePendingPrompt).catch((err) => {
25257
25237
  console.error("[EmbeddableChat] guide launcher prompt failed:", err);
25258
25238
  });
25259
- _optionalChain([onGuidePromptConsumed, 'optionalCall', _830 => _830()]);
25239
+ _optionalChain([onGuidePromptConsumed, 'optionalCall', _829 => _829()]);
25260
25240
  }, [guidePendingPrompt, activeMode, sendMessage, onGuidePromptConsumed]);
25261
25241
  const {
25262
25242
  attachments: stagedAttachments,
@@ -25267,7 +25247,7 @@ function EmbeddableChatInner({
25267
25247
  clear: clearAttachments
25268
25248
  } = useChatAttachments();
25269
25249
  const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
25270
- const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _831 => _831.maxItems]), () => ( 10));
25250
+ const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _830 => _830.maxItems]), () => ( 10));
25271
25251
  const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
25272
25252
  const [contextItems, setContextItems] = _react.useState.call(void 0, NO_CONTEXT_ITEMS);
25273
25253
  const [contextPickerOpen, setContextPickerOpen] = _react.useState.call(void 0, false);
@@ -25288,10 +25268,10 @@ function EmbeddableChatInner({
25288
25268
  }, [activeDialogId, activeMode]);
25289
25269
  const mentionMarkerByType = _react.useMemo.call(void 0, () => {
25290
25270
  const m = /* @__PURE__ */ new Map();
25291
- for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _832 => _832.entityTypes]), () => ( []))) if (t.marker) m.set(t.type, t.marker);
25271
+ for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _831 => _831.entityTypes]), () => ( []))) if (t.marker) m.set(t.type, t.marker);
25292
25272
  return m;
25293
- }, [_optionalChain([contextPicker, 'optionalAccess', _833 => _833.entityTypes])]);
25294
- const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess', _834 => _834.entityTypes]);
25273
+ }, [_optionalChain([contextPicker, 'optionalAccess', _832 => _832.entityTypes])]);
25274
+ const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess', _833 => _833.entityTypes]);
25295
25275
  const resolveContextIcon = _react.useMemo.call(void 0, () => {
25296
25276
  const byType = /* @__PURE__ */ new Map();
25297
25277
  for (const t of _nullishCoalesce(contextEntityTypes, () => ( []))) byType.set(t.type, t.icon);
@@ -25303,7 +25283,7 @@ function EmbeddableChatInner({
25303
25283
  if (mentionActiveRef.current) {
25304
25284
  if (contextItems.some((p) => `${p.type}:${p.id}` === key)) return;
25305
25285
  if (contextItems.length >= contextMaxItems) return;
25306
- _optionalChain([chatInputRef, 'access', _835 => _835.current, 'optionalAccess', _836 => _836.commitMention, 'call', _837 => _837(mentionTokenOf(key, mentionMarkerByType), {
25286
+ _optionalChain([chatInputRef, 'access', _834 => _834.current, 'optionalAccess', _835 => _835.commitMention, 'call', _836 => _836(mentionTokenOf(key, mentionMarkerByType), {
25307
25287
  label: item.label,
25308
25288
  icon: resolveContextIcon(item)
25309
25289
  })]);
@@ -25326,9 +25306,9 @@ function EmbeddableChatInner({
25326
25306
  setContextItems((prev) => prev.filter((p) => `${p.type}:${p.id}` !== key));
25327
25307
  if (mentionKeysRef.current.has(key)) {
25328
25308
  mentionKeysRef.current.delete(key);
25329
- const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access', _838 => _838.current, 'optionalAccess', _839 => _839.getValue, 'call', _840 => _840()]), () => ( ""));
25309
+ const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access', _837 => _837.current, 'optionalAccess', _838 => _838.getValue, 'call', _839 => _839()]), () => ( ""));
25330
25310
  const next = cur.replace(`@${mentionTokenOf(key, mentionMarkerByType)}`, "").replace(/\s{2,}/g, " ").trimStart();
25331
- _optionalChain([chatInputRef, 'access', _841 => _841.current, 'optionalAccess', _842 => _842.setValue, 'call', _843 => _843(next)]);
25311
+ _optionalChain([chatInputRef, 'access', _840 => _840.current, 'optionalAccess', _841 => _841.setValue, 'call', _842 => _842(next)]);
25332
25312
  }
25333
25313
  },
25334
25314
  [mentionMarkerByType]
@@ -25350,7 +25330,7 @@ function EmbeddableChatInner({
25350
25330
  }, []);
25351
25331
  const closeContextPicker = _react.useCallback.call(void 0, () => {
25352
25332
  if (mentionActiveRef.current) {
25353
- _optionalChain([chatInputRef, 'access', _844 => _844.current, 'optionalAccess', _845 => _845.removeMentionTrigger, 'call', _846 => _846()]);
25333
+ _optionalChain([chatInputRef, 'access', _843 => _843.current, 'optionalAccess', _844 => _844.removeMentionTrigger, 'call', _845 => _845()]);
25354
25334
  }
25355
25335
  setContextPickerOpen(false);
25356
25336
  setMentionQuery(null);
@@ -25384,8 +25364,8 @@ function EmbeddableChatInner({
25384
25364
  [effectiveAssistantIcon]
25385
25365
  );
25386
25366
  const [timestampCache] = _react.useState.call(void 0, () => /* @__PURE__ */ new Map());
25387
- const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess', _847 => _847.firstName]), _optionalChain([identityUser, 'optionalAccess', _848 => _848.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identityUser, 'optionalAccess', _849 => _849.name, 'optionalAccess', _850 => _850.trim, 'call', _851 => _851()]) || void 0 : void 0;
25388
- const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess', _852 => _852.avatarUrl, 'optionalAccess', _853 => _853.trim, 'call', _854 => _854()]) || void 0 : void 0;
25367
+ const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess', _846 => _846.firstName]), _optionalChain([identityUser, 'optionalAccess', _847 => _847.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identityUser, 'optionalAccess', _848 => _848.name, 'optionalAccess', _849 => _849.trim, 'call', _850 => _850()]) || void 0 : void 0;
25368
+ const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess', _851 => _851.avatarUrl, 'optionalAccess', _852 => _852.trim, 'call', _853 => _853()]) || void 0 : void 0;
25389
25369
  const messages = _react.useMemo.call(void 0, () => {
25390
25370
  const options = { userName: guideUserName, userAvatar: guideUserAvatar, timestampCache };
25391
25371
  const mapped = rawMessages.map((m) => mapHostMessage(m, options));
@@ -25394,7 +25374,6 @@ function EmbeddableChatInner({
25394
25374
  }, [rawMessages, guideUserName, guideUserAvatar, timestampCache]);
25395
25375
  const handleSend = _react.useCallback.call(void 0,
25396
25376
  (text2) => {
25397
- if (composerLock) return;
25398
25377
  let augmentedText = text2;
25399
25378
  if (readyAttachments.length > 0) {
25400
25379
  const markdown = readyAttachments.map((att) => formatChatAttachmentMarkdownForBubble(att, viewUrlPrefix)).join("");
@@ -25413,7 +25392,7 @@ function EmbeddableChatInner({
25413
25392
  setContextItems([]);
25414
25393
  }
25415
25394
  },
25416
- [composerLock, sendMessage, readyAttachments, viewUrlPrefix, clearAttachments, contextItems]
25395
+ [sendMessage, readyAttachments, viewUrlPrefix, clearAttachments, contextItems]
25417
25396
  );
25418
25397
  const handleAskSelect = _react.useCallback.call(void 0,
25419
25398
  (label) => {
@@ -25560,7 +25539,7 @@ function EmbeddableChatInner({
25560
25539
  _react.useEffect.call(void 0, () => {
25561
25540
  if (!panelBoundary || typeof ResizeObserver === "undefined") return void 0;
25562
25541
  const ro = new ResizeObserver((entries) => {
25563
- const w = _optionalChain([entries, 'access', _855 => _855[0], 'optionalAccess', _856 => _856.contentRect, 'optionalAccess', _857 => _857.width]);
25542
+ const w = _optionalChain([entries, 'access', _854 => _854[0], 'optionalAccess', _855 => _855.contentRect, 'optionalAccess', _856 => _856.width]);
25564
25543
  if (typeof w === "number") setPanelWidth(w);
25565
25544
  });
25566
25545
  ro.observe(panelBoundary);
@@ -25604,18 +25583,18 @@ function EmbeddableChatInner({
25604
25583
  const stackedListView = isMingoMode && !hasConversation && !archiveOpen && !wideMingo && !composeOpen && !emptyListSkipped;
25605
25584
  const headerShowBack = hasConversation || guideCanReturnToMingo;
25606
25585
  const freshConversationTitle = isGuideEmpty ? _nullishCoalesce(headerAssistantName, () => ( "Mingo Guide")) : "New Chat";
25607
- const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _858 => _858.title]) || freshConversationTitle : isGuideEmpty ? freshConversationTitle : "Current Chats";
25586
+ const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _857 => _857.title]) || freshConversationTitle : isGuideEmpty ? freshConversationTitle : "Current Chats";
25608
25587
  const headerBackAriaLabel = hasConversation ? isViewingArchived ? "Back to archive" : "Back" : "Back to Mingo";
25609
25588
  const headerOnBack = hasConversation ? handleBack : () => handleActiveModeChange("mingo");
25610
25589
  const headerOnRestore = isViewingArchived && unarchiveDialog && activeDialog ? () => setRestoreTarget(activeDialog) : void 0;
25611
25590
  const headerOnRename = activeDialogId && activeDialog && mingoCaps.canRename ? () => setRenameTarget(activeDialog) : void 0;
25612
25591
  const headerOnArchive = activeDialogId && activeDialog && mingoCaps.canArchive ? () => setArchiveTarget(activeDialog) : void 0;
25613
- const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access', _859 => _859.onCopyLink, 'optionalCall', _860 => _860(activeDialog)]) : void 0;
25614
- const headerOnCompact = activeDialogId && activeDialog && mingoCaps.compactDialog ? () => _optionalChain([mingoCaps, 'access', _861 => _861.compactDialog, 'optionalCall', _862 => _862(activeDialog)]) : void 0;
25592
+ const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access', _858 => _858.onCopyLink, 'optionalCall', _859 => _859(activeDialog)]) : void 0;
25593
+ const headerOnCompact = activeDialogId && activeDialog && mingoCaps.compactDialog ? () => _optionalChain([mingoCaps, 'access', _860 => _860.compactDialog, 'optionalCall', _861 => _861(activeDialog)]) : void 0;
25615
25594
  const headerOnOpenArchive = fetchArchivedDialogs ? openArchive : void 0;
25616
- const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _863 => _863.owner]) : void 0;
25617
- const headerPersonName = _optionalChain([headerOwner, 'optionalAccess', _864 => _864.name, 'optionalAccess', _865 => _865.trim, 'call', _866 => _866()]) || headerUserName;
25618
- const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access', _867 => _867.avatarUrl, 'optionalAccess', _868 => _868.trim, 'call', _869 => _869()]) || void 0 : _optionalChain([identityUser, 'optionalAccess', _870 => _870.avatarUrl, 'optionalAccess', _871 => _871.trim, 'call', _872 => _872()]) || _optionalChain([userAvatarUrl, 'optionalAccess', _873 => _873.trim, 'call', _874 => _874()]) || void 0;
25595
+ const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _862 => _862.owner]) : void 0;
25596
+ const headerPersonName = _optionalChain([headerOwner, 'optionalAccess', _863 => _863.name, 'optionalAccess', _864 => _864.trim, 'call', _865 => _865()]) || headerUserName;
25597
+ const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access', _866 => _866.avatarUrl, 'optionalAccess', _867 => _867.trim, 'call', _868 => _868()]) || void 0 : _optionalChain([identityUser, 'optionalAccess', _869 => _869.avatarUrl, 'optionalAccess', _870 => _870.trim, 'call', _871 => _871()]) || _optionalChain([userAvatarUrl, 'optionalAccess', _872 => _872.trim, 'call', _873 => _873()]) || void 0;
25619
25598
  const headerAvatar = headerPersonName || headerPersonAvatarUrl ? { name: headerPersonName, avatarUrl: headerPersonAvatarUrl } : void 0;
25620
25599
  const handleNewChat = _react.useCallback.call(void 0, () => {
25621
25600
  resetToNewChat();
@@ -25967,9 +25946,9 @@ function EmbeddableChatInner({
25967
25946
  subtitle: _nullishCoalesce(effectiveGreeting, () => ( void 0)),
25968
25947
  subtitleLoading: emptyStateLoading,
25969
25948
  ...guideWelcome,
25970
- title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess', _875 => _875.title]))),
25971
- icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess', _876 => _876.icon]))),
25972
- quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess', _877 => _877.quickActions]), () => ( guideSuggestedActions)),
25949
+ title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess', _874 => _874.title]))),
25950
+ icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess', _875 => _875.icon]))),
25951
+ quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess', _876 => _876.quickActions]), () => ( guideSuggestedActions)),
25973
25952
  onQuickAction: (action) => {
25974
25953
  setQuickActionPreview(null);
25975
25954
  handleSend(_nullishCoalesce(action.prompt, () => ( action.label)));
@@ -26027,7 +26006,6 @@ function EmbeddableChatInner({
26027
26006
  ChatComposer,
26028
26007
  {
26029
26008
  archived: isViewingArchived,
26030
- lock: composerLock,
26031
26009
  inputRef: chatInputRef,
26032
26010
  onSend: handleSend,
26033
26011
  onStop: stopMessage,
@@ -26044,8 +26022,8 @@ function EmbeddableChatInner({
26044
26022
  selectedContextItems: contextItems,
26045
26023
  onToggleContextItem: toggleContextItem,
26046
26024
  onRemoveContextItem: removeContextItem,
26047
- contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess', _878 => _878.items]),
26048
- onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess', _879 => _879.onRemove]),
26025
+ contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess', _877 => _877.items]),
26026
+ onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess', _878 => _878.onRemove]),
26049
26027
  contextPickerOpen,
26050
26028
  onOpenContextPicker: openContextPicker,
26051
26029
  onCloseContextPicker: closeContextPicker,
@@ -26529,4 +26507,4 @@ function EmbeddableChatInner({
26529
26507
 
26530
26508
 
26531
26509
  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.getCurrentPlatform = getCurrentPlatform; exports.switchPlatformTheme = switchPlatformTheme; exports.getSemanticColor = getSemanticColor; exports.getPlatformConfig = getPlatformConfig; exports.usePlatformColors = usePlatformColors; 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.ADMIN_CONTENT_CARD_GRID_CLASS = ADMIN_CONTENT_CARD_GRID_CLASS; exports.AdminContentCardSkeleton = AdminContentCardSkeleton; exports.AdminContentCardGrid = AdminContentCardGrid; 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.byKey = byKey; exports.getPlatformProductionUrl = getPlatformProductionUrl; exports.getPlatformUrl = getPlatformUrl; exports.getDeploymentUrl = getDeploymentUrl; exports.isLocalUrl = isLocalUrl; exports.getRequestOrigin = getRequestOrigin; exports.resolveRedirectTarget = resolveRedirectTarget; exports.getAllPlatformBaseDomains = getAllPlatformBaseDomains; exports.DOC_TABLE_TYPES = DOC_TABLE_TYPES; exports.groupsByTable = groupsByTable; exports.recordCountLabel = recordCountLabel; exports.buildGroupedSource = buildGroupedSource; exports.groupSourcesByTable = groupSourcesByTable; exports.formatCitationIndices = formatCitationIndices; exports.resolveSourceRowCTA = resolveSourceRowCTA; exports.resolveSourceIcon = resolveSourceIcon; exports.chatCardLabel = chatCardLabel; 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.EMPTY_DIALOG_CAPABILITIES = EMPTY_DIALOG_CAPABILITIES; 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.createChatConversationsApi = createChatConversationsApi; 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.useManagedDialogList = useManagedDialogList; 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.useStableShallow = useStableShallow; 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;
26532
- //# sourceMappingURL=chunk-23XIOIGS.cjs.map
26510
+ //# sourceMappingURL=chunk-MNUR6PAJ.cjs.map