@flamingo-stack/openframe-frontend-core 0.0.410-snapshot.20260711165901 → 0.0.410

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 (124) hide show
  1. package/dist/{chunk-SOLI7V4I.js → chunk-5HOII3WB.js} +4 -4
  2. package/dist/{chunk-4FNDOTW2.js → chunk-7Q52HP45.js} +77 -139
  3. package/dist/chunk-7Q52HP45.js.map +1 -0
  4. package/dist/{chunk-ZZWFS7CD.cjs → chunk-A3RW7M6B.cjs} +29 -29
  5. package/dist/{chunk-ZZWFS7CD.cjs.map → chunk-A3RW7M6B.cjs.map} +1 -1
  6. package/dist/{chunk-G2G7HLEM.cjs → chunk-CUN4CJUN.cjs} +3 -3
  7. package/dist/{chunk-G2G7HLEM.cjs.map → chunk-CUN4CJUN.cjs.map} +1 -1
  8. package/dist/{chunk-NJSBYUJZ.js → chunk-E4J5KKHH.js} +3 -3
  9. package/dist/{chunk-VTTPNZX3.cjs → chunk-F4KE5AZO.cjs} +40 -40
  10. package/dist/{chunk-VTTPNZX3.cjs.map → chunk-F4KE5AZO.cjs.map} +1 -1
  11. package/dist/{chunk-B2BERJ4M.js → chunk-IK5AR6QG.js} +6 -6
  12. package/dist/{chunk-YVJ2XBFU.js → chunk-IVM47EGI.js} +398 -389
  13. package/dist/chunk-IVM47EGI.js.map +1 -0
  14. package/dist/{chunk-MHNBDSWH.js → chunk-J6M2G6TD.js} +6 -6
  15. package/dist/{chunk-BRHCGXOH.cjs → chunk-KPGKNUJF.cjs} +40 -40
  16. package/dist/{chunk-BRHCGXOH.cjs.map → chunk-KPGKNUJF.cjs.map} +1 -1
  17. package/dist/{chunk-XVPWVG6N.cjs → chunk-KRLBVBYU.cjs} +18 -18
  18. package/dist/{chunk-XVPWVG6N.cjs.map → chunk-KRLBVBYU.cjs.map} +1 -1
  19. package/dist/{chunk-XBC5AES6.js → chunk-KZPVN7AZ.js} +2 -2
  20. package/dist/{chunk-HXRULNWA.js → chunk-L6OPVKVR.js} +5 -5
  21. package/dist/{chunk-FXZO4EKN.js → chunk-LQWYXIKB.js} +5 -5
  22. package/dist/{chunk-H4ISMWHG.cjs → chunk-NEMUCNCG.cjs} +73 -73
  23. package/dist/{chunk-H4ISMWHG.cjs.map → chunk-NEMUCNCG.cjs.map} +1 -1
  24. package/dist/{chunk-DGIF3YDV.js → chunk-NO2KT42M.js} +2 -2
  25. package/dist/{chunk-6AB36PRE.js → chunk-O5W26SCL.js} +2 -2
  26. package/dist/{chunk-3U4IZF7H.cjs → chunk-RL344I7V.cjs} +7 -7
  27. package/dist/{chunk-3U4IZF7H.cjs.map → chunk-RL344I7V.cjs.map} +1 -1
  28. package/dist/{chunk-MF5CVIAC.cjs → chunk-RPGFIUN3.cjs} +32 -32
  29. package/dist/{chunk-MF5CVIAC.cjs.map → chunk-RPGFIUN3.cjs.map} +1 -1
  30. package/dist/{chunk-BKYV2ALJ.cjs → chunk-SOALFYU6.cjs} +591 -582
  31. package/dist/chunk-SOALFYU6.cjs.map +1 -0
  32. package/dist/{chunk-3SNDISEN.cjs → chunk-STGWQFYT.cjs} +30 -92
  33. package/dist/chunk-STGWQFYT.cjs.map +1 -0
  34. package/dist/{chunk-VXM2GCKS.cjs → chunk-T6ZUBXPA.cjs} +12 -12
  35. package/dist/{chunk-VXM2GCKS.cjs.map → chunk-T6ZUBXPA.cjs.map} +1 -1
  36. package/dist/{chunk-SMLAYAIW.cjs → chunk-V3EZQWHQ.cjs} +5 -5
  37. package/dist/{chunk-SMLAYAIW.cjs.map → chunk-V3EZQWHQ.cjs.map} +1 -1
  38. package/dist/{chunk-Z4RKJOFH.js → chunk-VUW4G6SU.js} +3 -3
  39. package/dist/{chunk-SZ27SV6T.cjs → chunk-WGOATV3P.cjs} +73 -73
  40. package/dist/{chunk-SZ27SV6T.cjs.map → chunk-WGOATV3P.cjs.map} +1 -1
  41. package/dist/{chunk-RALT6D4H.cjs → chunk-YRKPMYI3.cjs} +15 -15
  42. package/dist/{chunk-RALT6D4H.cjs.map → chunk-YRKPMYI3.cjs.map} +1 -1
  43. package/dist/{chunk-TYCWPT33.js → chunk-ZF5O3KUQ.js} +3 -3
  44. package/dist/{chunk-SAJM3PDE.js → chunk-ZMFQWMM7.js} +2 -2
  45. package/dist/components/case-studies/index.cjs +9 -9
  46. package/dist/components/case-studies/index.js +3 -3
  47. package/dist/components/chat/index.cjs +3 -3
  48. package/dist/components/chat/index.js +2 -2
  49. package/dist/components/contact/index.cjs +4 -4
  50. package/dist/components/contact/index.js +3 -3
  51. package/dist/components/docs/index.cjs +6 -6
  52. package/dist/components/docs/index.js +5 -5
  53. package/dist/components/embeds/index.cjs +4 -4
  54. package/dist/components/embeds/index.js +3 -3
  55. package/dist/components/faq/index.cjs +5 -5
  56. package/dist/components/faq/index.js +4 -4
  57. package/dist/components/features/index.cjs +3 -3
  58. package/dist/components/features/index.js +2 -2
  59. package/dist/components/help-center-pages/index.cjs +22 -22
  60. package/dist/components/help-center-pages/index.js +13 -13
  61. package/dist/components/index.cjs +134 -136
  62. package/dist/components/index.cjs.map +1 -1
  63. package/dist/components/index.js +11 -13
  64. package/dist/components/index.js.map +1 -1
  65. package/dist/components/navigation/header.d.ts.map +1 -1
  66. package/dist/components/navigation/index.cjs +3 -5
  67. package/dist/components/navigation/index.cjs.map +1 -1
  68. package/dist/components/navigation/index.d.ts +1 -1
  69. package/dist/components/navigation/index.d.ts.map +1 -1
  70. package/dist/components/navigation/index.js +2 -4
  71. package/dist/components/navigation/mobile-burger-menu.d.ts.map +1 -1
  72. package/dist/components/navigation/mobile-nav-panel.d.ts +0 -2
  73. package/dist/components/navigation/mobile-nav-panel.d.ts.map +1 -1
  74. package/dist/components/navigation/sliding-sidebar.d.ts.map +1 -1
  75. package/dist/components/onboarding-guides/index.cjs +7 -7
  76. package/dist/components/onboarding-guides/index.js +6 -6
  77. package/dist/components/related-content/index.cjs +5 -5
  78. package/dist/components/related-content/index.js +4 -4
  79. package/dist/components/tickets/index.cjs +6 -6
  80. package/dist/components/tickets/index.js +5 -5
  81. package/dist/components/ui/index.cjs +3 -3
  82. package/dist/components/ui/index.js +2 -2
  83. package/dist/components/ui/modal-v2.d.ts.map +1 -1
  84. package/dist/components/ui/modal.d.ts.map +1 -1
  85. package/dist/hooks/index.cjs +2 -6
  86. package/dist/hooks/index.cjs.map +1 -1
  87. package/dist/hooks/index.js +1 -5
  88. package/dist/hooks/ui/index.d.ts +0 -2
  89. package/dist/hooks/ui/index.d.ts.map +1 -1
  90. package/dist/hooks/ui/use-header-height.d.ts +1 -10
  91. package/dist/hooks/ui/use-header-height.d.ts.map +1 -1
  92. package/dist/index.cjs +3 -9
  93. package/dist/index.cjs.map +1 -1
  94. package/dist/index.js +2 -8
  95. package/package.json +1 -1
  96. package/src/components/navigation/header.tsx +0 -5
  97. package/src/components/navigation/index.ts +1 -1
  98. package/src/components/navigation/mobile-burger-menu.tsx +29 -16
  99. package/src/components/navigation/mobile-nav-panel.tsx +35 -32
  100. package/src/components/navigation/sliding-sidebar.tsx +9 -29
  101. package/src/components/ui/modal-v2.tsx +6 -7
  102. package/src/components/ui/modal.tsx +9 -7
  103. package/src/hooks/ui/index.ts +0 -6
  104. package/src/hooks/ui/use-header-height.ts +2 -17
  105. package/dist/chunk-3SNDISEN.cjs.map +0 -1
  106. package/dist/chunk-4FNDOTW2.js.map +0 -1
  107. package/dist/chunk-BKYV2ALJ.cjs.map +0 -1
  108. package/dist/chunk-YVJ2XBFU.js.map +0 -1
  109. package/dist/hooks/ui/use-focus-trap.d.ts +0 -32
  110. package/dist/hooks/ui/use-focus-trap.d.ts.map +0 -1
  111. package/src/hooks/ui/use-focus-trap.ts +0 -110
  112. package/src/stories/MobileNavPanel.stories.tsx +0 -150
  113. /package/dist/{chunk-SOLI7V4I.js.map → chunk-5HOII3WB.js.map} +0 -0
  114. /package/dist/{chunk-NJSBYUJZ.js.map → chunk-E4J5KKHH.js.map} +0 -0
  115. /package/dist/{chunk-B2BERJ4M.js.map → chunk-IK5AR6QG.js.map} +0 -0
  116. /package/dist/{chunk-MHNBDSWH.js.map → chunk-J6M2G6TD.js.map} +0 -0
  117. /package/dist/{chunk-XBC5AES6.js.map → chunk-KZPVN7AZ.js.map} +0 -0
  118. /package/dist/{chunk-HXRULNWA.js.map → chunk-L6OPVKVR.js.map} +0 -0
  119. /package/dist/{chunk-FXZO4EKN.js.map → chunk-LQWYXIKB.js.map} +0 -0
  120. /package/dist/{chunk-DGIF3YDV.js.map → chunk-NO2KT42M.js.map} +0 -0
  121. /package/dist/{chunk-6AB36PRE.js.map → chunk-O5W26SCL.js.map} +0 -0
  122. /package/dist/{chunk-Z4RKJOFH.js.map → chunk-VUW4G6SU.js.map} +0 -0
  123. /package/dist/{chunk-TYCWPT33.js.map → chunk-ZF5O3KUQ.js.map} +0 -0
  124. /package/dist/{chunk-SAJM3PDE.js.map → chunk-ZMFQWMM7.js.map} +0 -0
@@ -14,7 +14,6 @@ import {
14
14
  useCopyToClipboard,
15
15
  useDebounce,
16
16
  useDeferredError,
17
- useFocusTrap,
18
17
  useHeaderHeight,
19
18
  useHorizontalScrollbar,
20
19
  useHumanitySignals,
@@ -27,7 +26,7 @@ import {
27
26
  useOgPlaceholderUrl,
28
27
  useOnboardingState,
29
28
  useToast
30
- } from "./chunk-4FNDOTW2.js";
29
+ } from "./chunk-7Q52HP45.js";
31
30
  import {
32
31
  AlertCircleIcon,
33
32
  AnthropicLogoGreyIcon,
@@ -7650,7 +7649,6 @@ import * as React21 from "react";
7650
7649
  // src/components/ui/modal-v2.tsx
7651
7650
  import * as React20 from "react";
7652
7651
  import { useEffect as useEffect10, useState as useState16 } from "react";
7653
- import { usePreventScroll } from "@react-aria/overlays";
7654
7652
  init_cn();
7655
7653
  import { jsx as jsx46, jsxs as jsxs37 } from "react/jsx-runtime";
7656
7654
  var ANIMATION_DURATION = 200;
@@ -7666,7 +7664,6 @@ var Modal = React20.forwardRef(
7666
7664
  const timeout = setTimeout(() => setIsMounted(false), ANIMATION_DURATION);
7667
7665
  return () => clearTimeout(timeout);
7668
7666
  }, [isOpen]);
7669
- usePreventScroll({ isDisabled: !isOpen });
7670
7667
  useEffect10(() => {
7671
7668
  const handleKeyDown = (event) => {
7672
7669
  if (event.key === "Escape") {
@@ -7674,8 +7671,12 @@ var Modal = React20.forwardRef(
7674
7671
  }
7675
7672
  };
7676
7673
  if (isOpen) {
7674
+ document.body.style.overflow = "hidden";
7677
7675
  document.addEventListener("keydown", handleKeyDown);
7678
- return () => document.removeEventListener("keydown", handleKeyDown);
7676
+ return () => {
7677
+ document.body.style.overflow = "unset";
7678
+ document.removeEventListener("keydown", handleKeyDown);
7679
+ };
7679
7680
  }
7680
7681
  }, [isOpen, onClose]);
7681
7682
  if (!isMounted) return null;
@@ -13058,7 +13059,7 @@ function RoadmapVoteButton({
13058
13059
  init_button();
13059
13060
 
13060
13061
  // src/components/ui/image-gallery-modal.tsx
13061
- import { useState as useState102, useEffect as useEffect76 } from "react";
13062
+ import { useState as useState102, useEffect as useEffect78 } from "react";
13062
13063
 
13063
13064
  // src/components/ui/allowed-domains-input.tsx
13064
13065
  init_cn();
@@ -17046,11 +17047,9 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
17046
17047
  init_cn();
17047
17048
  import * as React60 from "react";
17048
17049
  import { useEffect as useEffect28 } from "react";
17049
- import { usePreventScroll as usePreventScroll2 } from "@react-aria/overlays";
17050
17050
  import { jsx as jsx120, jsxs as jsxs93 } from "react/jsx-runtime";
17051
17051
  var Modal2 = React60.forwardRef(
17052
17052
  ({ isOpen, onClose, children, className }, ref) => {
17053
- usePreventScroll2({ isDisabled: !isOpen });
17054
17053
  useEffect28(() => {
17055
17054
  const handleKeyDown = (event) => {
17056
17055
  if (event.key === "Escape") {
@@ -17058,8 +17057,12 @@ var Modal2 = React60.forwardRef(
17058
17057
  }
17059
17058
  };
17060
17059
  if (isOpen) {
17060
+ document.body.style.overflow = "hidden";
17061
17061
  document.addEventListener("keydown", handleKeyDown);
17062
- return () => document.removeEventListener("keydown", handleKeyDown);
17062
+ return () => {
17063
+ document.body.style.overflow = "unset";
17064
+ document.removeEventListener("keydown", handleKeyDown);
17065
+ };
17063
17066
  }
17064
17067
  }, [isOpen, onClose]);
17065
17068
  if (!isOpen) return null;
@@ -35205,134 +35208,15 @@ function SortableRow({
35205
35208
 
35206
35209
  // src/components/navigation/header.tsx
35207
35210
  init_next_link();
35208
- import React109, { useEffect as useEffect63, useRef as useRef45, useState as useState83 } from "react";
35211
+ import React108, { useEffect as useEffect63, useRef as useRef44, useState as useState83 } from "react";
35209
35212
  init_button2();
35210
-
35211
- // src/components/navigation/mobile-nav-panel.tsx
35212
- import { useRef as useRef44 } from "react";
35213
- import { usePreventScroll as usePreventScroll3 } from "@react-aria/overlays";
35214
- init_button2();
35215
- import { X as X10 } from "lucide-react";
35216
35213
  import { Fragment as Fragment50, jsx as jsx271, jsxs as jsxs209 } from "react/jsx-runtime";
35217
- var MOBILE_NAV_PANEL_ID = "mobile-nav-panel";
35218
- function MobileNavPanel({ isOpen, config }) {
35219
- const panelRef = useRef44(null);
35220
- usePreventScroll3({ isDisabled: !isOpen });
35221
- useFocusTrap(panelRef, isOpen, { onEscape: config.onClose });
35222
- const headerHeight = useHeaderHeight(64, { enabled: isOpen });
35223
- if (!isOpen) return null;
35224
- const renderNavigationItem = (item) => {
35225
- if (item.element) {
35226
- return /* @__PURE__ */ jsx271("div", { children: item.element }, item.id);
35227
- }
35228
- const handleClick = () => {
35229
- if (item.onClick) {
35230
- item.onClick();
35231
- }
35232
- config.onClose?.();
35233
- };
35234
- if (item.href) {
35235
- return /* @__PURE__ */ jsx271(
35236
- Button,
35237
- {
35238
- variant: "outline",
35239
- size: "small-legacy",
35240
- href: item.href,
35241
- onClick: handleClick,
35242
- leftIcon: item.icon,
35243
- rightIcon: item.badge,
35244
- className: cn(
35245
- "justify-start h-12 px-4 bg-transparent border-none text-ods-text-primary hover:bg-ods-bg-hover gap-3 rounded-md transition-colors",
35246
- item.isActive ? "bg-ods-bg-hover" : ""
35247
- ),
35248
- children: item.label
35249
- },
35250
- item.id
35251
- );
35252
- }
35253
- return /* @__PURE__ */ jsxs209(
35254
- Button,
35255
- {
35256
- variant: "outline",
35257
- size: "small-legacy",
35258
- onClick: handleClick,
35259
- leftIcon: item.icon,
35260
- className: cn(
35261
- "justify-start h-12 px-4 bg-transparent border-none text-ods-text-primary hover:bg-ods-bg-hover gap-3 rounded-md transition-colors",
35262
- item.isActive ? "bg-ods-bg-hover" : ""
35263
- ),
35264
- children: [
35265
- /* @__PURE__ */ jsx271("span", { className: "flex-1 text-left", children: item.label }),
35266
- item.badge !== void 0 && /* @__PURE__ */ jsx271("span", { className: "ml-auto", children: item.badge })
35267
- ]
35268
- },
35269
- item.id
35270
- );
35271
- };
35272
- return /* @__PURE__ */ jsxs209(Fragment50, { children: [
35273
- /* @__PURE__ */ jsx271(
35274
- "div",
35275
- {
35276
- className: cn("fixed inset-0 z-[9998]", OVERLAY_BACKDROP_CLASS),
35277
- onClick: config.onClose
35278
- }
35279
- ),
35280
- /* @__PURE__ */ jsxs209(
35281
- "div",
35282
- {
35283
- ref: panelRef,
35284
- id: MOBILE_NAV_PANEL_ID,
35285
- role: "dialog",
35286
- "aria-modal": "true",
35287
- "aria-label": "Navigation menu",
35288
- tabIndex: -1,
35289
- style: { "--mobile-nav-top": `${headerHeight + 16}px` },
35290
- className: cn(
35291
- "fixed z-[9999] rounded-lg shadow-xl",
35292
- config.className ? "" : "bg-ods-card border border-ods-border",
35293
- // Responsive positioning and sizing
35294
- "right-2 left-2 md:left-auto",
35295
- "md:right-6 md:w-[400px] md:max-w-[calc(100vw-3rem)]",
35296
- // Small-viewport (svh) sizing anchored below the measured header —
35297
- // 100vh overflowed under mobile browser chrome, leaving the bottom
35298
- // entries and footer unreachable while the body was scroll-locked.
35299
- "top-[var(--mobile-nav-top)]",
35300
- "max-h-[calc(100svh-var(--mobile-nav-top)-50px)] md:max-h-[calc(100svh-var(--mobile-nav-top)-8px)]",
35301
- "flex flex-col",
35302
- config.className || ""
35303
- ),
35304
- onClick: (e) => e.stopPropagation(),
35305
- children: [
35306
- /* @__PURE__ */ jsx271("div", { className: "flex justify-end p-2 border-b border-ods-border flex-shrink-0", children: /* @__PURE__ */ jsx271(
35307
- Button,
35308
- {
35309
- "aria-label": "Close menu",
35310
- size: "icon",
35311
- variant: "transparent",
35312
- leftIcon: /* @__PURE__ */ jsx271(X10, { className: "w-4 h-4 text-ods-text-primary" }),
35313
- onClick: config.onClose,
35314
- className: "hover:bg-ods-bg-hover"
35315
- }
35316
- ) }),
35317
- /* @__PURE__ */ jsx271("div", { className: "flex-1 overflow-y-auto overflow-x-hidden overscroll-contain px-2 py-2", children: /* @__PURE__ */ jsx271("div", { className: "flex flex-col space-y-1", children: config.sections.map((section, index) => /* @__PURE__ */ jsxs209("div", { children: [
35318
- section.title && /* @__PURE__ */ jsx271("div", { className: "px-4 pt-2 pb-1 text-xs font-semibold text-ods-text-secondary uppercase tracking-wide", children: section.title }),
35319
- /* @__PURE__ */ jsx271("div", { className: "flex flex-col gap-1", children: section.items.map(renderNavigationItem) })
35320
- ] }, index)) }) }),
35321
- config.footer && /* @__PURE__ */ jsx271("div", { className: "border-t border-ods-border p-4 pb-[max(1rem,env(safe-area-inset-bottom))] flex-shrink-0", children: config.footer })
35322
- ]
35323
- }
35324
- )
35325
- ] });
35326
- }
35327
-
35328
- // src/components/navigation/header.tsx
35329
- import { Fragment as Fragment51, jsx as jsx272, jsxs as jsxs210 } from "react/jsx-runtime";
35330
35214
  function Header2({ config, platform }) {
35331
35215
  const [show, setShow] = useState83(true);
35332
35216
  const [lastScrollY, setLastScrollY] = useState83(0);
35333
35217
  const [openDropdowns, setOpenDropdowns] = useState83({});
35334
- const dropdownRefs = useRef45({});
35335
- const triggerRefs = useRef45({});
35218
+ const dropdownRefs = useRef44({});
35219
+ const triggerRefs = useRef44({});
35336
35220
  useEffect63(() => {
35337
35221
  const handleClickOutside = (event) => {
35338
35222
  const target = event.target;
@@ -35394,12 +35278,12 @@ function Header2({ config, platform }) {
35394
35278
  }, [config.autoHide]);
35395
35279
  const renderNavigationItem = (item) => {
35396
35280
  if (item.element) {
35397
- return /* @__PURE__ */ jsx272(React109.Fragment, { children: item.element }, item.id);
35281
+ return /* @__PURE__ */ jsx271(React108.Fragment, { children: item.element }, item.id);
35398
35282
  }
35399
35283
  if (item.children && item.children.length > 0) {
35400
35284
  const isOpen = openDropdowns[item.id] || false;
35401
- return /* @__PURE__ */ jsxs210("div", { className: "relative", children: [
35402
- /* @__PURE__ */ jsx272(
35285
+ return /* @__PURE__ */ jsxs209("div", { className: "relative", children: [
35286
+ /* @__PURE__ */ jsx271(
35403
35287
  Button,
35404
35288
  {
35405
35289
  ref: (el) => {
@@ -35426,7 +35310,7 @@ function Header2({ config, platform }) {
35426
35310
  children: item.label
35427
35311
  }
35428
35312
  ),
35429
- /* @__PURE__ */ jsxs210(
35313
+ /* @__PURE__ */ jsxs209(
35430
35314
  "div",
35431
35315
  {
35432
35316
  ref: (el) => {
@@ -35443,7 +35327,7 @@ function Header2({ config, platform }) {
35443
35327
  item.dropdownClassName || ""
35444
35328
  ),
35445
35329
  children: [
35446
- /* @__PURE__ */ jsx272("div", { className: "p-2", children: item.children.map((child, index) => /* @__PURE__ */ jsx272(
35330
+ /* @__PURE__ */ jsx271("div", { className: "p-2", children: item.children.map((child, index) => /* @__PURE__ */ jsx271(
35447
35331
  Button,
35448
35332
  {
35449
35333
  variant: "transparent",
@@ -35471,9 +35355,9 @@ function Header2({ config, platform }) {
35471
35355
  },
35472
35356
  child.id
35473
35357
  )) }),
35474
- item.dropdownContent && /* @__PURE__ */ jsxs210(Fragment51, { children: [
35475
- item.showDropdownDivider !== false && /* @__PURE__ */ jsx272("div", { className: "h-px my-2 mx-2 bg-ods-border" }),
35476
- /* @__PURE__ */ jsx272("div", { className: "px-2 pb-2", children: item.dropdownContent })
35358
+ item.dropdownContent && /* @__PURE__ */ jsxs209(Fragment50, { children: [
35359
+ item.showDropdownDivider !== false && /* @__PURE__ */ jsx271("div", { className: "h-px my-2 mx-2 bg-ods-border" }),
35360
+ /* @__PURE__ */ jsx271("div", { className: "px-2 pb-2", children: item.dropdownContent })
35477
35361
  ] })
35478
35362
  ]
35479
35363
  }
@@ -35481,7 +35365,7 @@ function Header2({ config, platform }) {
35481
35365
  ] }, item.id);
35482
35366
  }
35483
35367
  if (item.href || item.onClick) {
35484
- return /* @__PURE__ */ jsx272(
35368
+ return /* @__PURE__ */ jsx271(
35485
35369
  Button,
35486
35370
  {
35487
35371
  variant: "transparent",
@@ -35506,7 +35390,7 @@ function Header2({ config, platform }) {
35506
35390
  item.id
35507
35391
  );
35508
35392
  }
35509
- return /* @__PURE__ */ jsx272(
35393
+ return /* @__PURE__ */ jsx271(
35510
35394
  Button,
35511
35395
  {
35512
35396
  variant: "transparent",
@@ -35529,7 +35413,7 @@ function Header2({ config, platform }) {
35529
35413
  item.id
35530
35414
  );
35531
35415
  };
35532
- return /* @__PURE__ */ jsx272(
35416
+ return /* @__PURE__ */ jsx271(
35533
35417
  "div",
35534
35418
  {
35535
35419
  className: cn(
@@ -35538,7 +35422,7 @@ function Header2({ config, platform }) {
35538
35422
  style: {
35539
35423
  transform: !show ? "translateY(-100%)" : "translateY(0)"
35540
35424
  },
35541
- children: /* @__PURE__ */ jsxs210(
35425
+ children: /* @__PURE__ */ jsxs209(
35542
35426
  "header",
35543
35427
  {
35544
35428
  className: cn(
@@ -35551,11 +35435,11 @@ function Header2({ config, platform }) {
35551
35435
  ),
35552
35436
  style: config.style,
35553
35437
  children: [
35554
- /* @__PURE__ */ jsxs210("div", { className: "flex items-center justify-start flex-shrink-0", children: [
35555
- config.actions?.left && /* @__PURE__ */ jsx272("div", { className: "flex items-center", children: config.actions.left }),
35556
- /* @__PURE__ */ jsx272(next_link_default, { href: config.logo.href, className: "transition-opacity duration-200 hover:opacity-80", children: config.logo.element })
35438
+ /* @__PURE__ */ jsxs209("div", { className: "flex items-center justify-start flex-shrink-0", children: [
35439
+ config.actions?.left && /* @__PURE__ */ jsx271("div", { className: "flex items-center", children: config.actions.left }),
35440
+ /* @__PURE__ */ jsx271(next_link_default, { href: config.logo.href, className: "transition-opacity duration-200 hover:opacity-80", children: config.logo.element })
35557
35441
  ] }),
35558
- config.navigation && config.navigation.items.length > 0 && /* @__PURE__ */ jsx272(
35442
+ config.navigation && config.navigation.items.length > 0 && /* @__PURE__ */ jsx271(
35559
35443
  "nav",
35560
35444
  {
35561
35445
  className: cn(
@@ -35568,9 +35452,9 @@ function Header2({ config, platform }) {
35568
35452
  children: config.navigation.items.map(renderNavigationItem)
35569
35453
  }
35570
35454
  ),
35571
- /* @__PURE__ */ jsxs210("div", { className: "flex items-center justify-end gap-4 flex-shrink-0", children: [
35572
- config.actions?.right && /* @__PURE__ */ jsx272("div", { className: "hidden md:flex items-center gap-4", children: config.actions.right }),
35573
- config.mobile && config.mobile.enabled && /* @__PURE__ */ jsx272(
35455
+ /* @__PURE__ */ jsxs209("div", { className: "flex items-center justify-end gap-4 flex-shrink-0", children: [
35456
+ config.actions?.right && /* @__PURE__ */ jsx271("div", { className: "hidden md:flex items-center gap-4", children: config.actions.right }),
35457
+ config.mobile && config.mobile.enabled && /* @__PURE__ */ jsx271(
35574
35458
  Button,
35575
35459
  {
35576
35460
  variant: "transparent",
@@ -35580,9 +35464,7 @@ function Header2({ config, platform }) {
35580
35464
  config.mobile?.onToggle?.();
35581
35465
  },
35582
35466
  "aria-label": config.mobile?.isOpen ? "Close menu" : "Open menu",
35583
- "aria-expanded": config.mobile?.isOpen ?? false,
35584
- "aria-controls": config.mobile?.isOpen ? MOBILE_NAV_PANEL_ID : void 0,
35585
- leftIcon: config.mobile?.menuIcon || /* @__PURE__ */ jsx272(Menu01Icon, {})
35467
+ leftIcon: config.mobile?.menuIcon || /* @__PURE__ */ jsx271(Menu01Icon, {})
35586
35468
  }
35587
35469
  )
35588
35470
  ] })
@@ -35597,13 +35479,13 @@ function Header2({ config, platform }) {
35597
35479
  import { useState as useState84, useEffect as useEffect64 } from "react";
35598
35480
 
35599
35481
  // src/components/navigation/header-skeleton.tsx
35600
- import { jsx as jsx273, jsxs as jsxs211 } from "react/jsx-runtime";
35482
+ import { jsx as jsx272, jsxs as jsxs210 } from "react/jsx-runtime";
35601
35483
  function HeaderSkeleton({ config }) {
35602
35484
  const showNavigation = config?.navigation && config.navigation.items.length > 0;
35603
35485
  const showActions = config?.actions?.right && config.actions.right.length > 0;
35604
35486
  const showMobileMenu = config?.mobile?.enabled;
35605
35487
  const isAdminHeader = config?.className?.includes("admin");
35606
- return /* @__PURE__ */ jsx273("div", { className: "sticky top-0 z-40 w-full", children: /* @__PURE__ */ jsxs211(
35488
+ return /* @__PURE__ */ jsx272("div", { className: "sticky top-0 z-40 w-full", children: /* @__PURE__ */ jsxs210(
35607
35489
  "header",
35608
35490
  {
35609
35491
  className: cn(
@@ -35614,25 +35496,25 @@ function HeaderSkeleton({ config }) {
35614
35496
  config?.className
35615
35497
  ),
35616
35498
  children: [
35617
- /* @__PURE__ */ jsxs211("div", { className: "flex items-center justify-start flex-shrink-0", children: [
35618
- isAdminHeader && config?.actions?.left && /* @__PURE__ */ jsx273("div", { className: "mr-4", children: /* @__PURE__ */ jsx273("div", { className: "h-10 w-10 bg-ods-border rounded animate-pulse" }) }),
35619
- /* @__PURE__ */ jsxs211("div", { className: "flex items-center gap-2", children: [
35620
- /* @__PURE__ */ jsx273("div", { className: "h-8 w-8 bg-ods-border rounded animate-pulse" }),
35621
- /* @__PURE__ */ jsx273("div", { className: "h-6 w-24 bg-ods-border rounded animate-pulse" })
35499
+ /* @__PURE__ */ jsxs210("div", { className: "flex items-center justify-start flex-shrink-0", children: [
35500
+ isAdminHeader && config?.actions?.left && /* @__PURE__ */ jsx272("div", { className: "mr-4", children: /* @__PURE__ */ jsx272("div", { className: "h-10 w-10 bg-ods-border rounded animate-pulse" }) }),
35501
+ /* @__PURE__ */ jsxs210("div", { className: "flex items-center gap-2", children: [
35502
+ /* @__PURE__ */ jsx272("div", { className: "h-8 w-8 bg-ods-border rounded animate-pulse" }),
35503
+ /* @__PURE__ */ jsx272("div", { className: "h-6 w-24 bg-ods-border rounded animate-pulse" })
35622
35504
  ] })
35623
35505
  ] }),
35624
- showNavigation && /* @__PURE__ */ jsxs211("nav", { className: cn(
35506
+ showNavigation && /* @__PURE__ */ jsxs210("nav", { className: cn(
35625
35507
  "hidden md:flex items-center gap-2",
35626
35508
  config?.navigation?.position === "center" && "absolute left-1/2 transform -translate-x-1/2",
35627
35509
  config?.navigation?.position === "right" && "ml-auto mr-4"
35628
35510
  ), children: [
35629
- /* @__PURE__ */ jsx273("div", { className: "h-10 w-20 bg-ods-border rounded animate-pulse" }),
35630
- /* @__PURE__ */ jsx273("div", { className: "h-10 w-28 bg-ods-border rounded animate-pulse" }),
35631
- /* @__PURE__ */ jsx273("div", { className: "h-10 w-24 bg-ods-border rounded animate-pulse" })
35511
+ /* @__PURE__ */ jsx272("div", { className: "h-10 w-20 bg-ods-border rounded animate-pulse" }),
35512
+ /* @__PURE__ */ jsx272("div", { className: "h-10 w-28 bg-ods-border rounded animate-pulse" }),
35513
+ /* @__PURE__ */ jsx272("div", { className: "h-10 w-24 bg-ods-border rounded animate-pulse" })
35632
35514
  ] }),
35633
- /* @__PURE__ */ jsxs211("div", { className: "flex items-center justify-end gap-4 flex-shrink-0", children: [
35634
- showActions && /* @__PURE__ */ jsx273("div", { className: "hidden md:flex items-center gap-4", children: /* @__PURE__ */ jsx273("div", { className: "h-10 w-24 bg-ods-border rounded animate-pulse" }) }),
35635
- showMobileMenu && /* @__PURE__ */ jsx273("div", { className: "md:hidden h-10 w-10 bg-ods-border rounded animate-pulse" })
35515
+ /* @__PURE__ */ jsxs210("div", { className: "flex items-center justify-end gap-4 flex-shrink-0", children: [
35516
+ showActions && /* @__PURE__ */ jsx272("div", { className: "hidden md:flex items-center gap-4", children: /* @__PURE__ */ jsx272("div", { className: "h-10 w-24 bg-ods-border rounded animate-pulse" }) }),
35517
+ showMobileMenu && /* @__PURE__ */ jsx272("div", { className: "md:hidden h-10 w-10 bg-ods-border rounded animate-pulse" })
35636
35518
  ] })
35637
35519
  ]
35638
35520
  }
@@ -35640,33 +35522,152 @@ function HeaderSkeleton({ config }) {
35640
35522
  }
35641
35523
 
35642
35524
  // src/components/navigation/client-only-header.tsx
35643
- import { jsx as jsx274 } from "react/jsx-runtime";
35525
+ import { jsx as jsx273 } from "react/jsx-runtime";
35644
35526
  function ClientOnlyHeader({ config, skeleton }) {
35645
35527
  const [isClient, setIsClient] = useState84(false);
35646
35528
  useEffect64(() => {
35647
35529
  setIsClient(true);
35648
35530
  }, []);
35649
35531
  if (!isClient) {
35650
- return skeleton || /* @__PURE__ */ jsx274(HeaderSkeleton, { config });
35532
+ return skeleton || /* @__PURE__ */ jsx273(HeaderSkeleton, { config });
35651
35533
  }
35652
- return /* @__PURE__ */ jsx274(Header2, { config });
35534
+ return /* @__PURE__ */ jsx273(Header2, { config });
35535
+ }
35536
+
35537
+ // src/components/navigation/mobile-nav-panel.tsx
35538
+ import { useEffect as useEffect65, useRef as useRef45 } from "react";
35539
+ init_button2();
35540
+ import { X as X10 } from "lucide-react";
35541
+ import { Fragment as Fragment51, jsx as jsx274, jsxs as jsxs211 } from "react/jsx-runtime";
35542
+ function MobileNavPanel({ isOpen, config }) {
35543
+ const panelRef = useRef45(null);
35544
+ useEffect65(() => {
35545
+ if (isOpen) {
35546
+ document.body.style.overflow = "hidden";
35547
+ } else {
35548
+ document.body.style.overflow = "unset";
35549
+ }
35550
+ return () => {
35551
+ document.body.style.overflow = "unset";
35552
+ };
35553
+ }, [isOpen]);
35554
+ useEffect65(() => {
35555
+ const handleKeyDown = (e) => {
35556
+ if (e.key === "Escape" && isOpen) {
35557
+ config.onClose?.();
35558
+ }
35559
+ };
35560
+ if (isOpen) {
35561
+ document.addEventListener("keydown", handleKeyDown);
35562
+ return () => document.removeEventListener("keydown", handleKeyDown);
35563
+ }
35564
+ }, [isOpen, config]);
35565
+ if (!isOpen) return null;
35566
+ const renderNavigationItem = (item) => {
35567
+ if (item.element) {
35568
+ return /* @__PURE__ */ jsx274("div", { children: item.element }, item.id);
35569
+ }
35570
+ const handleClick = () => {
35571
+ if (item.onClick) {
35572
+ item.onClick();
35573
+ }
35574
+ config.onClose?.();
35575
+ };
35576
+ if (item.href) {
35577
+ return /* @__PURE__ */ jsx274(
35578
+ Button,
35579
+ {
35580
+ variant: "outline",
35581
+ size: "small-legacy",
35582
+ href: item.href,
35583
+ onClick: handleClick,
35584
+ leftIcon: item.icon,
35585
+ rightIcon: item.badge,
35586
+ className: cn(
35587
+ "justify-start h-12 px-4 bg-transparent border-none text-ods-text-primary hover:bg-ods-bg-hover gap-3 rounded-md transition-colors",
35588
+ item.isActive ? "bg-ods-bg-hover" : ""
35589
+ ),
35590
+ children: item.label
35591
+ },
35592
+ item.id
35593
+ );
35594
+ }
35595
+ return /* @__PURE__ */ jsxs211(
35596
+ Button,
35597
+ {
35598
+ variant: "outline",
35599
+ size: "small-legacy",
35600
+ onClick: handleClick,
35601
+ leftIcon: item.icon,
35602
+ className: cn(
35603
+ "justify-start h-12 px-4 bg-transparent border-none text-ods-text-primary hover:bg-ods-bg-hover gap-3 rounded-md transition-colors",
35604
+ item.isActive ? "bg-ods-bg-hover" : ""
35605
+ ),
35606
+ children: [
35607
+ /* @__PURE__ */ jsx274("span", { className: "flex-1 text-left", children: item.label }),
35608
+ item.badge !== void 0 && /* @__PURE__ */ jsx274("span", { className: "ml-auto", children: item.badge })
35609
+ ]
35610
+ },
35611
+ item.id
35612
+ );
35613
+ };
35614
+ return /* @__PURE__ */ jsxs211(Fragment51, { children: [
35615
+ /* @__PURE__ */ jsx274(
35616
+ "div",
35617
+ {
35618
+ className: "fixed inset-0 z-[9998] bg-black/50",
35619
+ onClick: config.onClose
35620
+ }
35621
+ ),
35622
+ /* @__PURE__ */ jsxs211(
35623
+ "div",
35624
+ {
35625
+ ref: panelRef,
35626
+ className: cn(
35627
+ "fixed z-[9999] rounded-lg shadow-xl",
35628
+ config.className ? "" : "bg-ods-card border border-ods-border",
35629
+ // Responsive positioning and sizing - matching original working version
35630
+ "right-2 left-2 md:left-auto",
35631
+ "md:right-6 md:w-[400px] md:max-w-[calc(100vw-3rem)]",
35632
+ // Height constraints with proper mobile spacing - increased top position
35633
+ "top-20 max-h-[calc(100vh-130px)] md:max-h-[calc(100vh-88px)]",
35634
+ "flex flex-col",
35635
+ config.className || ""
35636
+ ),
35637
+ onClick: (e) => e.stopPropagation(),
35638
+ children: [
35639
+ /* @__PURE__ */ jsx274("div", { className: "flex justify-end p-2 border-b border-ods-border flex-shrink-0", children: /* @__PURE__ */ jsx274(
35640
+ Button,
35641
+ {
35642
+ "aria-label": "Close menu",
35643
+ size: "icon",
35644
+ variant: "transparent",
35645
+ leftIcon: /* @__PURE__ */ jsx274(X10, { className: "w-4 h-4 text-ods-text-primary" }),
35646
+ onClick: config.onClose,
35647
+ className: "hover:bg-ods-bg-hover"
35648
+ }
35649
+ ) }),
35650
+ /* @__PURE__ */ jsx274("div", { className: "flex-1 overflow-y-auto overflow-x-hidden px-2 py-2", children: /* @__PURE__ */ jsx274("div", { className: "flex flex-col space-y-1", children: config.sections.map((section, index) => /* @__PURE__ */ jsxs211("div", { children: [
35651
+ section.title && /* @__PURE__ */ jsx274("div", { className: "px-4 pt-2 pb-1 text-xs font-semibold text-ods-text-secondary uppercase tracking-wide", children: section.title }),
35652
+ /* @__PURE__ */ jsx274("div", { className: "flex flex-col gap-1", children: section.items.map(renderNavigationItem) })
35653
+ ] }, index)) }) }),
35654
+ config.footer && /* @__PURE__ */ jsx274("div", { className: "border-t border-ods-border p-4 flex-shrink-0", children: config.footer })
35655
+ ]
35656
+ }
35657
+ )
35658
+ ] });
35653
35659
  }
35654
35660
 
35655
35661
  // src/components/navigation/sliding-sidebar.tsx
35656
- import { useState as useState85, useEffect as useEffect65, useRef as useRef46 } from "react";
35657
- import { motion as motion2, AnimatePresence, useReducedMotion } from "framer-motion";
35658
- import { usePreventScroll as usePreventScroll4 } from "@react-aria/overlays";
35662
+ import { useState as useState85, useEffect as useEffect66 } from "react";
35663
+ import { motion as motion2, AnimatePresence } from "framer-motion";
35659
35664
  init_button2();
35660
35665
  import { Fragment as Fragment52, jsx as jsx275, jsxs as jsxs212 } from "react/jsx-runtime";
35661
35666
  function SlidingSidebar({ config }) {
35662
35667
  const [expandedItems, setExpandedItems] = useState85(/* @__PURE__ */ new Set());
35663
35668
  const [mounted, setMounted] = useState85(false);
35664
35669
  const headerHeight = useHeaderHeight();
35665
- const asideRef = useRef46(null);
35666
- const prefersReducedMotion = useReducedMotion();
35667
- usePreventScroll4({ isDisabled: !config.isOpen });
35668
- useFocusTrap(asideRef, config.isOpen, { onEscape: config.onClose, contain: false });
35669
- useEffect65(() => {
35670
+ useEffect66(() => {
35670
35671
  setMounted(true);
35671
35672
  }, []);
35672
35673
  const toggleExpanded = (itemId) => {
@@ -35794,19 +35795,18 @@ function SlidingSidebar({ config }) {
35794
35795
  duration: 0.3,
35795
35796
  ease: [0.4, 0, 0.2, 1]
35796
35797
  },
35797
- className: cn("fixed inset-0 z-[45]", OVERLAY_BACKDROP_CLASS),
35798
+ className: "fixed inset-0 bg-black/50 z-[45]",
35798
35799
  onClick: () => config.onClose()
35799
35800
  }
35800
35801
  ) }),
35801
35802
  /* @__PURE__ */ jsxs212(
35802
35803
  motion2.aside,
35803
35804
  {
35804
- ref: asideRef,
35805
35805
  initial: false,
35806
35806
  animate: {
35807
35807
  x: config.isOpen ? 0 : config.position === "right" ? "100%" : "-100%"
35808
35808
  },
35809
- transition: prefersReducedMotion ? { duration: 0 } : {
35809
+ transition: {
35810
35810
  type: "spring",
35811
35811
  damping: 25,
35812
35812
  stiffness: 300,
@@ -35814,10 +35814,6 @@ function SlidingSidebar({ config }) {
35814
35814
  restDelta: 0.01,
35815
35815
  velocity: config.isOpen ? 5 : -5
35816
35816
  },
35817
- tabIndex: -1,
35818
- inert: !config.isOpen || void 0,
35819
- role: config.isOpen ? "dialog" : void 0,
35820
- "aria-label": config.isOpen ? "Navigation sidebar" : void 0,
35821
35817
  className: cn(
35822
35818
  "fixed top-0 bottom-0 z-[46] w-72 bg-ods-card border-ods-border flex flex-col shadow-xl",
35823
35819
  config.position === "right" ? "right-0 border-l" : "left-0 border-r",
@@ -35825,8 +35821,8 @@ function SlidingSidebar({ config }) {
35825
35821
  ),
35826
35822
  children: [
35827
35823
  /* @__PURE__ */ jsx275("div", { className: "flex-shrink-0", style: { height: `${headerHeight}px` } }),
35828
- /* @__PURE__ */ jsx275("nav", { className: "flex-1 p-4 space-y-2 overflow-y-auto overscroll-contain", children: config.items.map((item) => renderMenuItem(item)) }),
35829
- config.footer && /* @__PURE__ */ jsx275("div", { className: "p-4 pb-[max(1rem,env(safe-area-inset-bottom))] border-t border-ods-border", children: config.footer })
35824
+ /* @__PURE__ */ jsx275("nav", { className: "flex-1 p-4 space-y-2 overflow-y-auto", children: config.items.map((item) => renderMenuItem(item)) }),
35825
+ config.footer && /* @__PURE__ */ jsx275("div", { className: "p-4 border-t border-ods-border", children: config.footer })
35830
35826
  ]
35831
35827
  }
35832
35828
  )
@@ -35834,7 +35830,7 @@ function SlidingSidebar({ config }) {
35834
35830
  }
35835
35831
 
35836
35832
  // src/components/navigation/sticky-section-nav.tsx
35837
- import { useEffect as useEffect66, useState as useState86, useCallback as useCallback34, useRef as useRef47 } from "react";
35833
+ import { useEffect as useEffect67, useState as useState86, useCallback as useCallback34, useRef as useRef46 } from "react";
35838
35834
  import { jsx as jsx276, jsxs as jsxs213 } from "react/jsx-runtime";
35839
35835
  function StickySectionNav({
35840
35836
  sections,
@@ -35896,7 +35892,7 @@ function StickySectionNav({
35896
35892
  }
35897
35893
  function useSectionNavigation(sections, options) {
35898
35894
  const [activeSection, setActiveSection] = useState86(sections[0]?.id || "");
35899
- const isScrollingFromClick = useRef47(false);
35895
+ const isScrollingFromClick = useRef46(false);
35900
35896
  const { offset: offset2 = 100 } = options || {};
35901
35897
  const handleSectionClick = useCallback34((sectionId) => {
35902
35898
  const targetElement = document.getElementById(sectionId);
@@ -35908,14 +35904,14 @@ function useSectionNavigation(sections, options) {
35908
35904
  isScrollingFromClick.current = false;
35909
35905
  }, 500);
35910
35906
  }, [offset2]);
35911
- useEffect66(() => {
35907
+ useEffect67(() => {
35912
35908
  sections.forEach((section) => {
35913
35909
  if (section.ref.current && !section.ref.current.id) {
35914
35910
  section.ref.current.id = section.id;
35915
35911
  }
35916
35912
  });
35917
35913
  }, [sections]);
35918
- useEffect66(() => {
35914
+ useEffect67(() => {
35919
35915
  const handleScroll = () => {
35920
35916
  if (isScrollingFromClick.current) return;
35921
35917
  const scrollPosition = window.scrollY + offset2 + 50;
@@ -35948,7 +35944,7 @@ function useSectionNavigation(sections, options) {
35948
35944
  }
35949
35945
 
35950
35946
  // src/components/navigation/navigation-sidebar.tsx
35951
- import { useCallback as useCallback35, useEffect as useEffect67, useLayoutEffect as useLayoutEffect6, useMemo as useMemo34, useState as useState87 } from "react";
35947
+ import { useCallback as useCallback35, useEffect as useEffect68, useLayoutEffect as useLayoutEffect6, useMemo as useMemo34, useState as useState87 } from "react";
35952
35948
 
35953
35949
  // src/components/navigation/navigation-sidebar-header.tsx
35954
35950
  import { jsx as jsx277, jsxs as jsxs214 } from "react/jsx-runtime";
@@ -36097,7 +36093,7 @@ function NavigationSidebar({ config, disabled = false }) {
36097
36093
  config.minimized ?? false
36098
36094
  );
36099
36095
  const [tabletMinimized, setTabletMinimized] = useState87(true);
36100
- useEffect67(() => {
36096
+ useEffect68(() => {
36101
36097
  if (isTablet) setTabletMinimized(true);
36102
36098
  }, [isTablet]);
36103
36099
  const minimized = isTablet ? tabletMinimized : desktopMinimized;
@@ -36115,7 +36111,7 @@ function NavigationSidebar({ config, disabled = false }) {
36115
36111
  const closeOverlay = useCallback35(() => {
36116
36112
  setTabletMinimized(true);
36117
36113
  }, []);
36118
- useEffect67(() => {
36114
+ useEffect68(() => {
36119
36115
  if (!isOverlayOpen) return;
36120
36116
  const handleKeyDown = (e) => {
36121
36117
  if (e.key === "Escape") closeOverlay();
@@ -36596,11 +36592,10 @@ function NotificationsHeaderButton({
36596
36592
  }
36597
36593
 
36598
36594
  // src/components/navigation/app-layout.tsx
36599
- import { Suspense as Suspense2, useCallback as useCallback37, useMemo as useMemo35, useRef as useRef49, useState as useState88 } from "react";
36595
+ import { Suspense as Suspense2, useCallback as useCallback37, useMemo as useMemo35, useRef as useRef47, useState as useState88 } from "react";
36600
36596
 
36601
36597
  // src/components/navigation/mobile-burger-menu.tsx
36602
- import React114, { useCallback as useCallback36, useRef as useRef48 } from "react";
36603
- import { usePreventScroll as usePreventScroll5 } from "@react-aria/overlays";
36598
+ import React114, { useCallback as useCallback36, useEffect as useEffect69 } from "react";
36604
36599
  import { Fragment as Fragment54, jsx as jsx285, jsxs as jsxs222 } from "react/jsx-runtime";
36605
36600
  var HEADER_HEIGHT = 48;
36606
36601
  var MobileBurgerMenu = React114.memo(function MobileBurgerMenu2({
@@ -36613,9 +36608,27 @@ var MobileBurgerMenu = React114.memo(function MobileBurgerMenu2({
36613
36608
  onLogout,
36614
36609
  disabled = false
36615
36610
  }) {
36616
- const panelRef = useRef48(null);
36617
- usePreventScroll5({ isDisabled: !isOpen });
36618
- useFocusTrap(panelRef, isOpen, { onEscape: onClose });
36611
+ useEffect69(() => {
36612
+ if (isOpen) {
36613
+ document.body.style.overflow = "hidden";
36614
+ } else {
36615
+ document.body.style.overflow = "unset";
36616
+ }
36617
+ return () => {
36618
+ document.body.style.overflow = "unset";
36619
+ };
36620
+ }, [isOpen]);
36621
+ useEffect69(() => {
36622
+ const handleKeyDown = (e) => {
36623
+ if (e.key === "Escape" && isOpen) {
36624
+ onClose();
36625
+ }
36626
+ };
36627
+ if (isOpen) {
36628
+ document.addEventListener("keydown", handleKeyDown);
36629
+ return () => document.removeEventListener("keydown", handleKeyDown);
36630
+ }
36631
+ }, [isOpen, onClose]);
36619
36632
  const handleItemClick = useCallback36((item) => {
36620
36633
  if (item.onClick) {
36621
36634
  item.onClick();
@@ -36676,7 +36689,7 @@ var MobileBurgerMenu = React114.memo(function MobileBurgerMenu2({
36676
36689
  className: cn(
36677
36690
  "absolute inset-0 z-[100] md:hidden",
36678
36691
  OVERLAY_BACKDROP_CLASS,
36679
- "transition-all duration-300 motion-reduce:transition-none",
36692
+ "transition-all duration-300",
36680
36693
  isOpen ? "opacity-100" : "opacity-0 pointer-events-none"
36681
36694
  ),
36682
36695
  style: { top: HEADER_HEIGHT },
@@ -36687,12 +36700,11 @@ var MobileBurgerMenu = React114.memo(function MobileBurgerMenu2({
36687
36700
  /* @__PURE__ */ jsx285(
36688
36701
  "div",
36689
36702
  {
36690
- ref: panelRef,
36691
36703
  className: cn(
36692
36704
  "absolute left-0 right-0 z-[101] md:hidden",
36693
36705
  "flex flex-col",
36694
36706
  "bg-ods-bg border-b border-ods-border",
36695
- "transition-all duration-300 ease-out motion-reduce:transition-none",
36707
+ "transition-all duration-300 ease-out",
36696
36708
  "overflow-hidden",
36697
36709
  isOpen ? "opacity-100 translate-y-0" : "opacity-0 -translate-y-4 pointer-events-none"
36698
36710
  ),
@@ -36703,9 +36715,7 @@ var MobileBurgerMenu = React114.memo(function MobileBurgerMenu2({
36703
36715
  role: "dialog",
36704
36716
  "aria-modal": "true",
36705
36717
  "aria-label": "Mobile navigation menu",
36706
- tabIndex: -1,
36707
- inert: !isOpen || void 0,
36708
- children: /* @__PURE__ */ jsxs222("div", { className: "flex-1 overflow-y-auto overflow-x-hidden overscroll-contain p-4 flex flex-col gap-4", children: [
36718
+ children: /* @__PURE__ */ jsxs222("div", { className: "flex-1 overflow-y-auto overflow-x-hidden p-4 flex flex-col gap-4", children: [
36709
36719
  user && /* @__PURE__ */ jsxs222(
36710
36720
  "div",
36711
36721
  {
@@ -36798,9 +36808,9 @@ function AppLayout({
36798
36808
  }) {
36799
36809
  const [mobileMenuOpen, setMobileMenuOpen] = useState88(false);
36800
36810
  const [drawerContainer, setDrawerContainer] = useState88(null);
36801
- const mobileMenuOpenRef = useRef49(mobileMenuOpen);
36811
+ const mobileMenuOpenRef = useRef47(mobileMenuOpen);
36802
36812
  mobileMenuOpenRef.current = mobileMenuOpen;
36803
- const drawerHandlesRef = useRef49(/* @__PURE__ */ new Set());
36813
+ const drawerHandlesRef = useRef47(/* @__PURE__ */ new Set());
36804
36814
  const handleToggleMobileMenu = useCallback37(() => {
36805
36815
  const opening = !mobileMenuOpenRef.current;
36806
36816
  if (opening) {
@@ -37427,7 +37437,7 @@ ScriptArguments.displayName = "ScriptArguments";
37427
37437
 
37428
37438
  // src/components/shared/onboarding/onboarding-walkthrough.tsx
37429
37439
  init_button2();
37430
- import React116, { useRef as useRef50, useCallback as useCallback38 } from "react";
37440
+ import React116, { useRef as useRef48, useCallback as useCallback38 } from "react";
37431
37441
 
37432
37442
  // src/components/shared/onboarding/onboarding-step-card.tsx
37433
37443
  import React115 from "react";
@@ -37551,10 +37561,10 @@ function OnboardingWalkthrough({
37551
37561
  allStepsComplete,
37552
37562
  markMultipleComplete
37553
37563
  } = useOnboardingState(storageKey);
37554
- const hasAutoMarkedRef = useRef50(false);
37555
- const autoMarkingInProgressRef = useRef50(false);
37556
- const lastCompletionStatusRef = useRef50(null);
37557
- const actionInProgressRef = useRef50(/* @__PURE__ */ new Set());
37564
+ const hasAutoMarkedRef = useRef48(false);
37565
+ const autoMarkingInProgressRef = useRef48(false);
37566
+ const lastCompletionStatusRef = useRef48(null);
37567
+ const actionInProgressRef = useRef48(/* @__PURE__ */ new Set());
37558
37568
  React116.useEffect(() => {
37559
37569
  if (isLoadingCompletion) {
37560
37570
  hasAutoMarkedRef.current = false;
@@ -38242,7 +38252,7 @@ var ListLoader = (props) => /* @__PURE__ */ jsx304(ContentLoader, { ...props, va
38242
38252
 
38243
38253
  // src/components/ui/table/table.tsx
38244
38254
  init_cn();
38245
- import { useEffect as useEffect69, useRef as useRef52 } from "react";
38255
+ import { useEffect as useEffect71, useRef as useRef50 } from "react";
38246
38256
  init_pagination();
38247
38257
  init_button2();
38248
38258
 
@@ -38853,10 +38863,10 @@ function TableRow({
38853
38863
  }
38854
38864
 
38855
38865
  // src/components/ui/table/use-table-motion.ts
38856
- import { useEffect as useEffect68, useState as useState90 } from "react";
38866
+ import { useEffect as useEffect70, useState as useState90 } from "react";
38857
38867
  function useTableMotion(enabled) {
38858
38868
  const [runtime, setRuntime] = useState90(null);
38859
- useEffect68(() => {
38869
+ useEffect70(() => {
38860
38870
  if (!enabled || runtime) return;
38861
38871
  let active = true;
38862
38872
  import("framer-motion").then((m) => {
@@ -39002,10 +39012,10 @@ function Table({
39002
39012
  };
39003
39013
  const allSelected = selectedRows.length > 0 && selectedRows.length === data.length;
39004
39014
  const someSelected = selectedRows.length > 0 && selectedRows.length < data.length;
39005
- const sentinelRef = useRef52(null);
39006
- const onLoadMoreRef = useRef52(infiniteScroll?.onLoadMore);
39015
+ const sentinelRef = useRef50(null);
39016
+ const onLoadMoreRef = useRef50(infiniteScroll?.onLoadMore);
39007
39017
  onLoadMoreRef.current = infiniteScroll?.onLoadMore;
39008
- useEffect69(() => {
39018
+ useEffect71(() => {
39009
39019
  if (!infiniteScroll?.hasNextPage || infiniteScroll.isFetchingNextPage) return;
39010
39020
  const sentinel = sentinelRef.current;
39011
39021
  if (!sentinel) return;
@@ -39223,7 +39233,7 @@ import { useMemo as useMemo37 } from "react";
39223
39233
 
39224
39234
  // src/components/ui/query-report-table/query-report-table-header.tsx
39225
39235
  init_cn();
39226
- import { useRef as useRef53, useState as useState91, useCallback as useCallback39 } from "react";
39236
+ import { useRef as useRef51, useState as useState91, useCallback as useCallback39 } from "react";
39227
39237
  import { jsx as jsx316, jsxs as jsxs248 } from "react/jsx-runtime";
39228
39238
  function QueryReportTableHeader({
39229
39239
  columns,
@@ -39252,7 +39262,7 @@ function QueryReportTableHeader({
39252
39262
  );
39253
39263
  }
39254
39264
  function TruncatedHeaderCell({ value, width }) {
39255
- const textRef = useRef53(null);
39265
+ const textRef = useRef51(null);
39256
39266
  const [isTruncated, setIsTruncated] = useState91(false);
39257
39267
  const checkTruncation = useCallback39(() => {
39258
39268
  const el = textRef.current;
@@ -39282,7 +39292,7 @@ function TruncatedHeaderCell({ value, width }) {
39282
39292
 
39283
39293
  // src/components/ui/query-report-table/query-report-table-row.tsx
39284
39294
  init_cn();
39285
- import { useRef as useRef54, useState as useState92, useCallback as useCallback40 } from "react";
39295
+ import { useRef as useRef52, useState as useState92, useCallback as useCallback40 } from "react";
39286
39296
  import { jsx as jsx317, jsxs as jsxs249 } from "react/jsx-runtime";
39287
39297
  function QueryReportTableRow({
39288
39298
  row,
@@ -39328,7 +39338,7 @@ function QueryReportTableRow({
39328
39338
  );
39329
39339
  }
39330
39340
  function TruncatedCell({ value, className }) {
39331
- const textRef = useRef54(null);
39341
+ const textRef = useRef52(null);
39332
39342
  const [isTruncated, setIsTruncated] = useState92(false);
39333
39343
  const checkTruncation = useCallback40(() => {
39334
39344
  const el = textRef.current;
@@ -39830,7 +39840,7 @@ function DataTableEmpty({ className, ...props }) {
39830
39840
  // src/components/ui/data-table/data-table-row.tsx
39831
39841
  init_next_link();
39832
39842
  init_cn();
39833
- import { memo as memo5, useCallback as useCallback42, useRef as useRef55 } from "react";
39843
+ import { memo as memo5, useCallback as useCallback42, useRef as useRef53 } from "react";
39834
39844
  import { flexRender as flexRender2 } from "@tanstack/react-table";
39835
39845
 
39836
39846
  // src/components/ui/data-table/data-table-skeleton.tsx
@@ -39915,7 +39925,7 @@ function DataTableRowImpl({
39915
39925
  const hasSubRow = subRow != null && subRow !== false;
39916
39926
  const isLinkMode = Boolean(href) && !onClick;
39917
39927
  const isWholeCardLink = isLinkMode && !hasSubRow;
39918
- const containerRef = useRef55(null);
39928
+ const containerRef = useRef53(null);
39919
39929
  const handleClick = useCallback42(
39920
39930
  (e) => {
39921
39931
  const target = e.target;
@@ -40083,7 +40093,7 @@ function DataTableBody({
40083
40093
  }
40084
40094
 
40085
40095
  // src/components/ui/data-table/data-table-infinite-footer.tsx
40086
- import { useEffect as useEffect70, useRef as useRef56 } from "react";
40096
+ import { useEffect as useEffect72, useRef as useRef54 } from "react";
40087
40097
  import { Fragment as Fragment62, jsx as jsx327, jsxs as jsxs257 } from "react/jsx-runtime";
40088
40098
  function DataTableInfiniteFooter({
40089
40099
  hasNextPage,
@@ -40092,10 +40102,10 @@ function DataTableInfiniteFooter({
40092
40102
  skeletonRows = 3,
40093
40103
  rootMargin = "200px"
40094
40104
  }) {
40095
- const sentinelRef = useRef56(null);
40096
- const onLoadMoreRef = useRef56(onLoadMore);
40105
+ const sentinelRef = useRef54(null);
40106
+ const onLoadMoreRef = useRef54(onLoadMore);
40097
40107
  onLoadMoreRef.current = onLoadMore;
40098
- useEffect70(() => {
40108
+ useEffect72(() => {
40099
40109
  if (!hasNextPage || isFetchingNextPage) return;
40100
40110
  const sentinel = sentinelRef.current;
40101
40111
  if (!sentinel) return;
@@ -40729,8 +40739,8 @@ function FilterList({
40729
40739
 
40730
40740
  // src/components/ui/tag-search-input.tsx
40731
40741
  import {
40732
- useEffect as useEffect72,
40733
- useRef as useRef58,
40742
+ useEffect as useEffect74,
40743
+ useRef as useRef56,
40734
40744
  useState as useState94
40735
40745
  } from "react";
40736
40746
  init_cn();
@@ -40765,11 +40775,11 @@ function TagSearchInput({
40765
40775
  limitTags,
40766
40776
  placeholder: currentPlaceholder
40767
40777
  });
40768
- const wrapperRef = useRef58(null);
40769
- const hiddenTagsRef = useRef58(null);
40770
- const hiddenTagsPopupRef = useRef58(null);
40778
+ const wrapperRef = useRef56(null);
40779
+ const hiddenTagsRef = useRef56(null);
40780
+ const hiddenTagsPopupRef = useRef56(null);
40771
40781
  const [showHiddenTags, setShowHiddenTags] = useState94(false);
40772
- useEffect72(() => {
40782
+ useEffect74(() => {
40773
40783
  if (!showHiddenTags) return;
40774
40784
  const handleClick = (e) => {
40775
40785
  const target = e.target;
@@ -40924,7 +40934,7 @@ function TagSearchInput({
40924
40934
  }
40925
40935
 
40926
40936
  // src/components/ui/markdown-editor.tsx
40927
- import { useRef as useRef59, useCallback as useCallback43, useState as useState95, useEffect as useEffect73 } from "react";
40937
+ import { useRef as useRef57, useCallback as useCallback43, useState as useState95, useEffect as useEffect75 } from "react";
40928
40938
  init_cn();
40929
40939
  import { Loader2 as Loader29, Upload as Upload8 } from "lucide-react";
40930
40940
  import { jsx as jsx332, jsxs as jsxs262 } from "react/jsx-runtime";
@@ -40955,7 +40965,7 @@ body .w-md-editor .w-md-editor-bar::after { content: '' !important; display: blo
40955
40965
  body .w-md-editor .w-md-editor-bar:hover::after { border-color: var(--color-text-secondary) !important; }
40956
40966
  `;
40957
40967
  function MarkdownEditorStyles() {
40958
- useEffect73(() => {
40968
+ useEffect75(() => {
40959
40969
  if (document.getElementById(MARKDOWN_EDITOR_STYLE_ID)) return;
40960
40970
  const style = document.createElement("style");
40961
40971
  style.id = MARKDOWN_EDITOR_STYLE_ID;
@@ -40979,11 +40989,11 @@ function MarkdownEditor({
40979
40989
  onFileUploaded,
40980
40990
  renderPreview
40981
40991
  }) {
40982
- const fileInputRef = useRef59(null);
40992
+ const fileInputRef = useRef57(null);
40983
40993
  const [isUploading, setIsUploading] = useState95(false);
40984
40994
  const [uploadProgress, setUploadProgress] = useState95("");
40985
40995
  const [defaultExtraCommands, setDefaultExtraCommands] = useState95([]);
40986
- useEffect73(() => {
40996
+ useEffect75(() => {
40987
40997
  import("@uiw/react-md-editor").then((mod) => {
40988
40998
  if (mod.commands?.getExtraCommands) {
40989
40999
  setDefaultExtraCommands(mod.commands.getExtraCommands());
@@ -41072,11 +41082,11 @@ function MarkdownEditor({
41072
41082
  }
41073
41083
  } : null;
41074
41084
  const extraCommands = uploadCommand ? [...defaultExtraCommands, uploadCommand] : defaultExtraCommands;
41075
- const wrapperRef = useRef59(null);
41076
- const isDraggingRef = useRef59(false);
41077
- const mouseYRef = useRef59(0);
41078
- const rafRef = useRef59(0);
41079
- const scrollParentRef = useRef59(window);
41085
+ const wrapperRef = useRef57(null);
41086
+ const isDraggingRef = useRef57(false);
41087
+ const mouseYRef = useRef57(0);
41088
+ const rafRef = useRef57(0);
41089
+ const scrollParentRef = useRef57(window);
41080
41090
  const EDGE_ZONE = 60;
41081
41091
  const MAX_SCROLL_SPEED = 15;
41082
41092
  const findScrollParent = useCallback43((el) => {
@@ -41106,7 +41116,7 @@ function MarkdownEditor({
41106
41116
  }
41107
41117
  rafRef.current = requestAnimationFrame(scrollLoop);
41108
41118
  }, []);
41109
- useEffect73(() => {
41119
+ useEffect75(() => {
41110
41120
  const wrapper = wrapperRef.current;
41111
41121
  if (!wrapper) return;
41112
41122
  const onMouseMove = (e) => {
@@ -42589,7 +42599,7 @@ function ImageGalleryModal({
42589
42599
  initialIndex = 0
42590
42600
  }) {
42591
42601
  const [selectedImageIndex, setSelectedImageIndex] = useState102(initialIndex);
42592
- useEffect76(() => {
42602
+ useEffect78(() => {
42593
42603
  if (isOpen) {
42594
42604
  setSelectedImageIndex(initialIndex);
42595
42605
  }
@@ -42604,7 +42614,7 @@ function ImageGalleryModal({
42604
42614
  setSelectedImageIndex(selectedImageIndex + 1);
42605
42615
  }
42606
42616
  };
42607
- useEffect76(() => {
42617
+ useEffect78(() => {
42608
42618
  const handleKeyPress = (event) => {
42609
42619
  if (!isOpen) return;
42610
42620
  switch (event.key) {
@@ -46679,7 +46689,7 @@ function renderChatInlineEntityCard(chatRef, options = {}) {
46679
46689
  }
46680
46690
 
46681
46691
  // src/components/chat/hooks/use-chunk-catchup.ts
46682
- import { useCallback as useCallback45, useRef as useRef63 } from "react";
46692
+ import { useCallback as useCallback45, useRef as useRef61 } from "react";
46683
46693
  function makeSeqKey(messageType, chunkType, sequenceId) {
46684
46694
  return `${messageType}:${chunkType}:${sequenceId}`;
46685
46695
  }
@@ -46701,20 +46711,20 @@ function useChunkCatchup({
46701
46711
  chatTypes = [CHAT_TYPE.CLIENT],
46702
46712
  fetchChunks
46703
46713
  }) {
46704
- const processedSequenceKeys = useRef63(/* @__PURE__ */ new Set());
46705
- const lastSequenceId = useRef63(null);
46706
- const fetchingInProgress = useRef63(false);
46707
- const lastFetchParams = useRef63(null);
46708
- const chunkBuffer = useRef63([]);
46709
- const bufferUntilInitialCatchupComplete = useRef63(false);
46710
- const hasCompletedInitialCatchup = useRef63(false);
46711
- const dialogIdRef = useRef63(dialogId);
46714
+ const processedSequenceKeys = useRef61(/* @__PURE__ */ new Set());
46715
+ const lastSequenceId = useRef61(null);
46716
+ const fetchingInProgress = useRef61(false);
46717
+ const lastFetchParams = useRef61(null);
46718
+ const chunkBuffer = useRef61([]);
46719
+ const bufferUntilInitialCatchupComplete = useRef61(false);
46720
+ const hasCompletedInitialCatchup = useRef61(false);
46721
+ const dialogIdRef = useRef61(dialogId);
46712
46722
  dialogIdRef.current = dialogId;
46713
- const chatTypesRef = useRef63(chatTypes);
46723
+ const chatTypesRef = useRef61(chatTypes);
46714
46724
  chatTypesRef.current = chatTypes;
46715
- const fetchChunksRef = useRef63(fetchChunks);
46725
+ const fetchChunksRef = useRef61(fetchChunks);
46716
46726
  fetchChunksRef.current = fetchChunks;
46717
- const onChunkReceivedRef = useRef63(onChunkReceived);
46727
+ const onChunkReceivedRef = useRef61(onChunkReceived);
46718
46728
  onChunkReceivedRef.current = onChunkReceived;
46719
46729
  const processChunk = useCallback45((chunk, messageType, forceProcess = false) => {
46720
46730
  if (bufferUntilInitialCatchupComplete.current && !forceProcess) {
@@ -46891,7 +46901,7 @@ function useChunkCatchup({
46891
46901
  }
46892
46902
 
46893
46903
  // src/components/chat/hooks/use-jetstream-dialog-subscription.ts
46894
- import { useEffect as useEffect77, useRef as useRef64, useState as useState105 } from "react";
46904
+ import { useEffect as useEffect79, useRef as useRef62, useState as useState105 } from "react";
46895
46905
  var DEFAULT_INACTIVE_THRESHOLD_MS = 5 * 6e4;
46896
46906
  var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
46897
46907
  function useJetStreamDialogSubscription({
@@ -46914,53 +46924,53 @@ function useJetStreamDialogSubscription({
46914
46924
  const [isSubscribed, setIsSubscribed] = useState105(false);
46915
46925
  const [reconnectionCount, setReconnectionCount] = useState105(0);
46916
46926
  const [currentStreamSeq, setCurrentStreamSeq] = useState105(null);
46917
- const clientRef = useRef64(null);
46918
- const subscriptionRef = useRef64(null);
46919
- const highestStreamSeqRef = useRef64(null);
46920
- const onEventRef = useRef64(onEvent);
46921
- useEffect77(() => {
46927
+ const clientRef = useRef62(null);
46928
+ const subscriptionRef = useRef62(null);
46929
+ const highestStreamSeqRef = useRef62(null);
46930
+ const onEventRef = useRef62(onEvent);
46931
+ useEffect79(() => {
46922
46932
  onEventRef.current = onEvent;
46923
46933
  }, [onEvent]);
46924
- const onConnectRef = useRef64(onConnect);
46925
- useEffect77(() => {
46934
+ const onConnectRef = useRef62(onConnect);
46935
+ useEffect79(() => {
46926
46936
  onConnectRef.current = onConnect;
46927
46937
  }, [onConnect]);
46928
- const onDisconnectRef = useRef64(onDisconnect);
46929
- useEffect77(() => {
46938
+ const onDisconnectRef = useRef62(onDisconnect);
46939
+ useEffect79(() => {
46930
46940
  onDisconnectRef.current = onDisconnect;
46931
46941
  }, [onDisconnect]);
46932
- const onSubscribedRef = useRef64(onSubscribed);
46933
- useEffect77(() => {
46942
+ const onSubscribedRef = useRef62(onSubscribed);
46943
+ useEffect79(() => {
46934
46944
  onSubscribedRef.current = onSubscribed;
46935
46945
  }, [onSubscribed]);
46936
- const onBeforeReconnectRef = useRef64(onBeforeReconnect);
46937
- useEffect77(() => {
46946
+ const onBeforeReconnectRef = useRef62(onBeforeReconnect);
46947
+ useEffect79(() => {
46938
46948
  onBeforeReconnectRef.current = onBeforeReconnect;
46939
46949
  }, [onBeforeReconnect]);
46940
- const getNatsWsUrlRef = useRef64(getNatsWsUrl);
46941
- useEffect77(() => {
46950
+ const getNatsWsUrlRef = useRef62(getNatsWsUrl);
46951
+ useEffect79(() => {
46942
46952
  getNatsWsUrlRef.current = getNatsWsUrl;
46943
46953
  }, [getNatsWsUrl]);
46944
- const reconnectionBackoffRef = useRef64(reconnectionBackoff);
46945
- useEffect77(() => {
46954
+ const reconnectionBackoffRef = useRef62(reconnectionBackoff);
46955
+ useEffect79(() => {
46946
46956
  reconnectionBackoffRef.current = reconnectionBackoff;
46947
46957
  }, [reconnectionBackoff]);
46948
- const optStartSeqRef = useRef64(optStartSeq);
46949
- useEffect77(() => {
46958
+ const optStartSeqRef = useRef62(optStartSeq);
46959
+ useEffect79(() => {
46950
46960
  optStartSeqRef.current = optStartSeq;
46951
46961
  }, [optStartSeq]);
46952
- const inactiveThresholdRef = useRef64(inactiveThresholdMs);
46953
- useEffect77(() => {
46962
+ const inactiveThresholdRef = useRef62(inactiveThresholdMs);
46963
+ useEffect79(() => {
46954
46964
  inactiveThresholdRef.current = inactiveThresholdMs;
46955
46965
  }, [inactiveThresholdMs]);
46956
- const hadConnectionBeforeRef = useRef64(false);
46957
- const clientConfigRef = useRef64(clientConfig);
46958
- useEffect77(() => {
46966
+ const hadConnectionBeforeRef = useRef62(false);
46967
+ const clientConfigRef = useRef62(clientConfig);
46968
+ useEffect79(() => {
46959
46969
  clientConfigRef.current = clientConfig;
46960
46970
  }, [clientConfig]);
46961
- const currentWsUrlRef = useRef64("");
46971
+ const currentWsUrlRef = useRef62("");
46962
46972
  const wsUrl = getNatsWsUrl();
46963
- useEffect77(() => {
46973
+ useEffect79(() => {
46964
46974
  if (!enabled || !wsUrl) {
46965
46975
  if (currentWsUrlRef.current && clientRef.current) {
46966
46976
  releaseClient(currentWsUrlRef.current);
@@ -47041,7 +47051,7 @@ function useJetStreamDialogSubscription({
47041
47051
  }
47042
47052
  };
47043
47053
  }, [enabled, wsUrl]);
47044
- useEffect77(() => {
47054
+ useEffect79(() => {
47045
47055
  if (!enabled || !dialogId || !isConnected) {
47046
47056
  if (subscriptionRef.current) {
47047
47057
  try {
@@ -47124,7 +47134,7 @@ function useJetStreamDialogSubscription({
47124
47134
  setIsSubscribed(false);
47125
47135
  };
47126
47136
  }, [enabled, dialogId, isConnected, streamName, topic, reconnectionCount]);
47127
- useEffect77(() => {
47137
+ useEffect79(() => {
47128
47138
  highestStreamSeqRef.current = null;
47129
47139
  setCurrentStreamSeq(null);
47130
47140
  }, [dialogId]);
@@ -47132,7 +47142,7 @@ function useJetStreamDialogSubscription({
47132
47142
  }
47133
47143
 
47134
47144
  // src/components/chat/hooks/use-nats-dialog-subscription.ts
47135
- import { useEffect as useEffect78, useRef as useRef65, useState as useState106 } from "react";
47145
+ import { useEffect as useEffect80, useRef as useRef63, useState as useState106 } from "react";
47136
47146
  function useNatsDialogSubscription({
47137
47147
  enabled,
47138
47148
  dialogId,
@@ -47149,44 +47159,44 @@ function useNatsDialogSubscription({
47149
47159
  const [isConnected, setIsConnected] = useState106(false);
47150
47160
  const [isSubscribed, setIsSubscribed] = useState106(false);
47151
47161
  const [reconnectionCount, setReconnectionCount] = useState106(0);
47152
- const clientRef = useRef65(null);
47153
- const subscriptionRefs = useRef65(/* @__PURE__ */ new Map());
47154
- const onEventRef = useRef65(onEvent);
47155
- useEffect78(() => {
47162
+ const clientRef = useRef63(null);
47163
+ const subscriptionRefs = useRef63(/* @__PURE__ */ new Map());
47164
+ const onEventRef = useRef63(onEvent);
47165
+ useEffect80(() => {
47156
47166
  onEventRef.current = onEvent;
47157
47167
  }, [onEvent]);
47158
- const onConnectRef = useRef65(onConnect);
47159
- useEffect78(() => {
47168
+ const onConnectRef = useRef63(onConnect);
47169
+ useEffect80(() => {
47160
47170
  onConnectRef.current = onConnect;
47161
47171
  }, [onConnect]);
47162
- const onDisconnectRef = useRef65(onDisconnect);
47163
- useEffect78(() => {
47172
+ const onDisconnectRef = useRef63(onDisconnect);
47173
+ useEffect80(() => {
47164
47174
  onDisconnectRef.current = onDisconnect;
47165
47175
  }, [onDisconnect]);
47166
- const onSubscribedRef = useRef65(onSubscribed);
47167
- useEffect78(() => {
47176
+ const onSubscribedRef = useRef63(onSubscribed);
47177
+ useEffect80(() => {
47168
47178
  onSubscribedRef.current = onSubscribed;
47169
47179
  }, [onSubscribed]);
47170
- const onBeforeReconnectRef = useRef65(onBeforeReconnect);
47171
- useEffect78(() => {
47180
+ const onBeforeReconnectRef = useRef63(onBeforeReconnect);
47181
+ useEffect80(() => {
47172
47182
  onBeforeReconnectRef.current = onBeforeReconnect;
47173
47183
  }, [onBeforeReconnect]);
47174
- const hadConnectionBeforeRef = useRef65(false);
47175
- const getNatsWsUrlRef = useRef65(getNatsWsUrl);
47176
- useEffect78(() => {
47184
+ const hadConnectionBeforeRef = useRef63(false);
47185
+ const getNatsWsUrlRef = useRef63(getNatsWsUrl);
47186
+ useEffect80(() => {
47177
47187
  getNatsWsUrlRef.current = getNatsWsUrl;
47178
47188
  }, [getNatsWsUrl]);
47179
- const reconnectionBackoffRef = useRef65(reconnectionBackoff);
47180
- useEffect78(() => {
47189
+ const reconnectionBackoffRef = useRef63(reconnectionBackoff);
47190
+ useEffect80(() => {
47181
47191
  reconnectionBackoffRef.current = reconnectionBackoff;
47182
47192
  }, [reconnectionBackoff]);
47183
- const clientConfigRef = useRef65(clientConfig);
47184
- useEffect78(() => {
47193
+ const clientConfigRef = useRef63(clientConfig);
47194
+ useEffect80(() => {
47185
47195
  clientConfigRef.current = clientConfig;
47186
47196
  }, [clientConfig]);
47187
- const currentWsUrlRef = useRef65("");
47197
+ const currentWsUrlRef = useRef63("");
47188
47198
  const wsUrl = getNatsWsUrl();
47189
- useEffect78(() => {
47199
+ useEffect80(() => {
47190
47200
  if (!enabled || !wsUrl) {
47191
47201
  if (currentWsUrlRef.current && clientRef.current) {
47192
47202
  releaseClient(currentWsUrlRef.current);
@@ -47268,14 +47278,14 @@ function useNatsDialogSubscription({
47268
47278
  };
47269
47279
  }, [enabled, wsUrl]);
47270
47280
  const topicsKey = topics.join(",");
47271
- const lastSubscribedDialogIdRef = useRef65(null);
47272
- const isConnectedRef = useRef65(isConnected);
47273
- useEffect78(() => {
47281
+ const lastSubscribedDialogIdRef = useRef63(null);
47282
+ const isConnectedRef = useRef63(isConnected);
47283
+ useEffect80(() => {
47274
47284
  isConnectedRef.current = isConnected;
47275
47285
  }, [isConnected]);
47276
- const currentDialogIdRef = useRef65(null);
47277
- const abortControllerRef = useRef65(null);
47278
- useEffect78(() => {
47286
+ const currentDialogIdRef = useRef63(null);
47287
+ const abortControllerRef = useRef63(null);
47288
+ useEffect80(() => {
47279
47289
  currentDialogIdRef.current = dialogId;
47280
47290
  if (!enabled || !dialogId) {
47281
47291
  if (subscriptionRefs.current.size > 0) {
@@ -47356,7 +47366,7 @@ function useNatsDialogSubscription({
47356
47366
  abortControllerRef.current = null;
47357
47367
  };
47358
47368
  }, [enabled, dialogId, topicsKey, topics]);
47359
- useEffect78(() => {
47369
+ useEffect80(() => {
47360
47370
  if (!enabled || !currentDialogIdRef.current || !isConnected) {
47361
47371
  return;
47362
47372
  }
@@ -47406,7 +47416,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
47406
47416
  }
47407
47417
 
47408
47418
  // src/components/chat/hooks/use-realtime-chunk-processor.ts
47409
- import { useCallback as useCallback46, useRef as useRef66, useEffect as useEffect79 } from "react";
47419
+ import { useCallback as useCallback46, useRef as useRef64, useEffect as useEffect81 } from "react";
47410
47420
 
47411
47421
  // src/components/chat/utils/chunk-parser.ts
47412
47422
  function normalizeToolCalls(raw) {
@@ -48057,14 +48067,14 @@ function useRealtimeChunkProcessor(options) {
48057
48067
  batchApprovalsEnabled = true,
48058
48068
  isDirectMode = false
48059
48069
  } = options;
48060
- const accumulatorRef = useRef66(
48070
+ const accumulatorRef = useRef64(
48061
48071
  createMessageSegmentAccumulator({
48062
48072
  onApprove: callbacks.onApprove,
48063
48073
  onReject: callbacks.onReject
48064
48074
  })
48065
48075
  );
48066
- const hasInitializedWithData = useRef66(false);
48067
- useEffect79(() => {
48076
+ const hasInitializedWithData = useRef64(false);
48077
+ useEffect81(() => {
48068
48078
  if (initialState && !hasInitializedWithData.current) {
48069
48079
  accumulatorRef.current.initializeWithState(initialState);
48070
48080
  if (initialState.escalatedApprovals) {
@@ -48077,14 +48087,14 @@ function useRealtimeChunkProcessor(options) {
48077
48087
  hasInitializedWithData.current = true;
48078
48088
  }
48079
48089
  }, [initialState, callbacks]);
48080
- const isInStreamRef = useRef66(false);
48081
- const hasEverStreamedRef = useRef66(false);
48082
- const directModeFlagRef = useRef66(isDirectMode);
48083
- const sawDirectMessageRef = useRef66(false);
48084
- useEffect79(() => {
48090
+ const isInStreamRef = useRef64(false);
48091
+ const hasEverStreamedRef = useRef64(false);
48092
+ const directModeFlagRef = useRef64(isDirectMode);
48093
+ const sawDirectMessageRef = useRef64(false);
48094
+ useEffect81(() => {
48085
48095
  directModeFlagRef.current = isDirectMode;
48086
48096
  }, [isDirectMode]);
48087
- const pendingEscalatedRef = useRef66(/* @__PURE__ */ new Map());
48097
+ const pendingEscalatedRef = useRef64(/* @__PURE__ */ new Map());
48088
48098
  const processChunk = useCallback46(
48089
48099
  (chunk) => {
48090
48100
  const action = parseChunkToAction(chunk);
@@ -48342,7 +48352,7 @@ function useRealtimeChunkProcessor(options) {
48342
48352
  }
48343
48353
 
48344
48354
  // src/components/chat/hooks/use-slash-commands.ts
48345
- import { useEffect as useEffect80, useState as useState107 } from "react";
48355
+ import { useEffect as useEffect82, useState as useState107 } from "react";
48346
48356
  import { useQuery as useQuery2 } from "@tanstack/react-query";
48347
48357
  async function fetchSlashCommands(prefix, signal, commandsUrl) {
48348
48358
  try {
@@ -48361,7 +48371,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
48361
48371
  function useSlashCommands(prefix, commandsUrl) {
48362
48372
  const [commands, setCommands] = useState107([]);
48363
48373
  const [loading, setLoading] = useState107(false);
48364
- useEffect80(() => {
48374
+ useEffect82(() => {
48365
48375
  if (prefix == null) {
48366
48376
  setCommands([]);
48367
48377
  return;
@@ -48467,7 +48477,7 @@ function useEmptyStateConfig(emptyStateUrl, options) {
48467
48477
  }
48468
48478
 
48469
48479
  // src/components/chat/hooks/use-chat-attachments.ts
48470
- import { useCallback as useCallback47, useMemo as useMemo41, useRef as useRef67, useState as useState108 } from "react";
48480
+ import { useCallback as useCallback47, useMemo as useMemo41, useRef as useRef65, useState as useState108 } from "react";
48471
48481
  import { fileTypeFromBlob } from "file-type";
48472
48482
  var CHAT_ATTACHMENTS_BUCKET = "chat-attachments";
48473
48483
  var CHAT_ATTACHMENTS_FOLDER = "chat";
@@ -48544,7 +48554,7 @@ function useChatAttachments() {
48544
48554
  const runtime = useRequiredChatRuntime();
48545
48555
  const uploadUrlEndpoint = runtime.endpoints.attachmentUploadUrl;
48546
48556
  const [attachments, setAttachments] = useState108([]);
48547
- const controllersRef = useRef67(/* @__PURE__ */ new Map());
48557
+ const controllersRef = useRef65(/* @__PURE__ */ new Map());
48548
48558
  const updateOne = useCallback47((id, patch) => {
48549
48559
  setAttachments((prev) => prev.map((a) => a.id === id ? { ...a, ...patch } : a));
48550
48560
  }, []);
@@ -48633,7 +48643,7 @@ function useChatAttachments() {
48633
48643
  },
48634
48644
  [uploadUrlEndpoint, updateOne]
48635
48645
  );
48636
- const attachmentsRef = useRef67([]);
48646
+ const attachmentsRef = useRef65([]);
48637
48647
  attachmentsRef.current = attachments;
48638
48648
  const addFiles = useCallback47(
48639
48649
  (files) => {
@@ -48710,16 +48720,16 @@ function useChatAttachments() {
48710
48720
  }
48711
48721
 
48712
48722
  // src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
48713
- import { useCallback as useCallback48, useEffect as useEffect81, useRef as useRef68, useState as useState109 } from "react";
48723
+ import { useCallback as useCallback48, useEffect as useEffect83, useRef as useRef66, useState as useState109 } from "react";
48714
48724
  import { jsx as jsx356 } from "react/jsx-runtime";
48715
48725
  var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
48716
48726
  function useChatAttachmentImageGallery() {
48717
48727
  const runtime = useRequiredChatRuntime();
48718
48728
  const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
48719
- const panelRef = useRef68(null);
48729
+ const panelRef = useRef66(null);
48720
48730
  const [state, setState] = useState109(CLOSED);
48721
48731
  const handleClose = useCallback48(() => setState(CLOSED), []);
48722
- useEffect81(() => {
48732
+ useEffect83(() => {
48723
48733
  const root = panelRef.current;
48724
48734
  if (!root) return;
48725
48735
  const onClick = (ev) => {
@@ -48765,7 +48775,7 @@ function absolutize(prefix) {
48765
48775
  }
48766
48776
 
48767
48777
  // src/components/chat/hooks/use-chat-identity.ts
48768
- import { createContext as createContext12, createElement as createElement2, useContext as useContext12, useEffect as useEffect82, useState as useState110 } from "react";
48778
+ import { createContext as createContext12, createElement as createElement2, useContext as useContext12, useEffect as useEffect84, useState as useState110 } from "react";
48769
48779
  var ANON_DEFAULTS = {
48770
48780
  authTier: "anon",
48771
48781
  source: null,
@@ -48778,7 +48788,7 @@ function useResolveChatIdentity(enabled) {
48778
48788
  const proxyEmail = getEmbedProxyAuth()?.email ?? null;
48779
48789
  const [data, setData] = useState110(ANON_DEFAULTS);
48780
48790
  const [isLoading, setIsLoading] = useState110(enabled);
48781
- useEffect82(() => {
48791
+ useEffect84(() => {
48782
48792
  if (!enabled) return;
48783
48793
  let cancelled = false;
48784
48794
  const ctrl = new AbortController();
@@ -48820,11 +48830,11 @@ function useChatIdentity() {
48820
48830
  }
48821
48831
 
48822
48832
  // src/components/chat/hooks/use-close-on-navigation.ts
48823
- import { useEffect as useEffect83, useRef as useRef69 } from "react";
48833
+ import { useEffect as useEffect85, useRef as useRef67 } from "react";
48824
48834
  function useCloseOnNavigation(close, pathname) {
48825
- const prevPathnameRef = useRef69(null);
48826
- const initializedRef = useRef69(false);
48827
- useEffect83(() => {
48835
+ const prevPathnameRef = useRef67(null);
48836
+ const initializedRef = useRef67(false);
48837
+ useEffect85(() => {
48828
48838
  if (!initializedRef.current) {
48829
48839
  initializedRef.current = true;
48830
48840
  prevPathnameRef.current = pathname;
@@ -48838,14 +48848,14 @@ function useCloseOnNavigation(close, pathname) {
48838
48848
  }
48839
48849
 
48840
48850
  // src/components/chat/hooks/use-chat.ts
48841
- import { useState as useState112, useCallback as useCallback50, useEffect as useEffect84, useRef as useRef71 } from "react";
48851
+ import { useState as useState112, useCallback as useCallback50, useEffect as useEffect86, useRef as useRef69 } from "react";
48842
48852
 
48843
48853
  // src/components/chat/hooks/use-sse.ts
48844
- import { useState as useState111, useCallback as useCallback49, useRef as useRef70 } from "react";
48854
+ import { useState as useState111, useCallback as useCallback49, useRef as useRef68 } from "react";
48845
48855
  function useSSE({ useMock = true, debugMode = false, streamFn } = {}) {
48846
48856
  const [isStreaming, setIsStreaming] = useState111(false);
48847
48857
  const [error, setError] = useState111(null);
48848
- const abortControllerRef = useRef70(null);
48858
+ const abortControllerRef = useRef68(null);
48849
48859
  const fallbackStream = useCallback49(async function* () {
48850
48860
  throw new Error(
48851
48861
  "[useSSE] No streamFn provided and `useMock: true` is no longer wired into the lib. Supply a `streamFn` (see `createDocStreamFn` in use-embedded-chat) or migrate the mock to your host code."
@@ -48913,10 +48923,10 @@ function useChat({
48913
48923
  } = {}) {
48914
48924
  const [messages, setMessages] = useState112(() => initialMessages ?? []);
48915
48925
  const [isTyping, setIsTyping] = useState112(false);
48916
- const currentAssistantSegmentsRef = useRef71([]);
48917
- const onMessagesChangeRef = useRef71(onMessagesChange);
48926
+ const currentAssistantSegmentsRef = useRef69([]);
48927
+ const onMessagesChangeRef = useRef69(onMessagesChange);
48918
48928
  onMessagesChangeRef.current = onMessagesChange;
48919
- useEffect84(() => {
48929
+ useEffect86(() => {
48920
48930
  onMessagesChangeRef.current?.(messages);
48921
48931
  }, [messages]);
48922
48932
  const {
@@ -49205,7 +49215,7 @@ function useChat({
49205
49215
  }
49206
49216
 
49207
49217
  // src/components/chat/hooks/use-sse-chat-adapter.ts
49208
- import { useState as useState113, useEffect as useEffect85, useCallback as useCallback51, useMemo as useMemo42, useRef as useRef72 } from "react";
49218
+ import { useState as useState113, useEffect as useEffect87, useCallback as useCallback51, useMemo as useMemo42, useRef as useRef70 } from "react";
49209
49219
  function createEmptyTurnMeta() {
49210
49220
  return {
49211
49221
  provider: null,
@@ -49526,20 +49536,20 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
49526
49536
  const runtime = useRequiredChatRuntime();
49527
49537
  const source = runtime.source || DEFAULT_CHAT_SOURCE;
49528
49538
  const tableIdForDocumentType = options?.tableIdForDocumentType ?? defaultTableIdForDocumentType;
49529
- const persistedRef = useRef72(null);
49539
+ const persistedRef = useRef70(null);
49530
49540
  if (persistedRef.current === null) {
49531
49541
  pruneStaleChatStorage(source);
49532
49542
  persistedRef.current = loadPersistedChat(source) || { messages: [], sources: [], sendCount: 0 };
49533
49543
  }
49534
- const sourcesMapRef = useRef72(
49544
+ const sourcesMapRef = useRef70(
49535
49545
  new Map(persistedRef.current.sources)
49536
49546
  );
49537
- const refsMapRef = useRef72(
49547
+ const refsMapRef = useRef70(
49538
49548
  new Map(persistedRef.current.refs ?? [])
49539
49549
  );
49540
- const metaMapRef = useRef72(/* @__PURE__ */ new Map());
49541
- const messagesRef = useRef72(persistedRef.current.messages);
49542
- const sendCountRef = useRef72(persistedRef.current.sendCount);
49550
+ const metaMapRef = useRef70(/* @__PURE__ */ new Map());
49551
+ const messagesRef = useRef70(persistedRef.current.messages);
49552
+ const sendCountRef = useRef70(persistedRef.current.sendCount);
49543
49553
  const [streamingPhase, setStreamingPhase] = useState113("idle");
49544
49554
  const [metaTick, setMetaTick] = useState113(0);
49545
49555
  const bumpMetaTick = useCallback51(() => setMetaTick((t) => t + 1), []);
@@ -49729,7 +49739,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
49729
49739
  }
49730
49740
  }
49731
49741
  }, [chatClearMessages, source, bumpMetaTick]);
49732
- useEffect85(() => {
49742
+ useEffect87(() => {
49733
49743
  if (!isTyping && !isStreaming && streamingPhase !== "idle") {
49734
49744
  setStreamingPhase("idle");
49735
49745
  }
@@ -49811,9 +49821,9 @@ var noopRejectRequest = async (_id, _reason) => {
49811
49821
  // src/components/chat/hooks/use-nats-chat-adapter.ts
49812
49822
  import {
49813
49823
  useCallback as useCallback52,
49814
- useEffect as useEffect86,
49824
+ useEffect as useEffect88,
49815
49825
  useMemo as useMemo43,
49816
- useRef as useRef73,
49826
+ useRef as useRef71,
49817
49827
  useState as useState114
49818
49828
  } from "react";
49819
49829
 
@@ -50355,9 +50365,9 @@ function useNatsChatAdapter(config, options = {}) {
50355
50365
  },
50356
50366
  [rejectRequestCallback]
50357
50367
  );
50358
- const handleApproveRef = useRef73(handleApprove);
50368
+ const handleApproveRef = useRef71(handleApprove);
50359
50369
  handleApproveRef.current = handleApprove;
50360
- const handleRejectRef = useRef73(handleReject);
50370
+ const handleRejectRef = useRef71(handleReject);
50361
50371
  handleRejectRef.current = handleReject;
50362
50372
  const accumApprove = useCallback52((requestId) => {
50363
50373
  if (!requestId) return;
@@ -50367,7 +50377,7 @@ function useNatsChatAdapter(config, options = {}) {
50367
50377
  if (!requestId) return;
50368
50378
  return handleRejectRef.current(requestId);
50369
50379
  }, []);
50370
- const callbacksRef = useRef73({
50380
+ const callbacksRef = useRef71({
50371
50381
  onSegmentsUpdate: (segments) => {
50372
50382
  setMessages((prev) => updateTrailingAssistant(prev, segments));
50373
50383
  },
@@ -50405,7 +50415,7 @@ function useNatsChatAdapter(config, options = {}) {
50405
50415
  onChunkReceived: (chunk) => processChunk(chunk),
50406
50416
  fetchChunks
50407
50417
  });
50408
- const historyLoadSeqRef = useRef73(0);
50418
+ const historyLoadSeqRef = useRef71(0);
50409
50419
  const loadDialogHistory = useCallback52(
50410
50420
  async (id, cursor) => {
50411
50421
  if (!fetchDialogMessages) return;
@@ -50460,8 +50470,8 @@ function useNatsChatAdapter(config, options = {}) {
50460
50470
  accumReject
50461
50471
  ]
50462
50472
  );
50463
- const prevDialogIdRef = useRef73(void 0);
50464
- useEffect86(() => {
50473
+ const prevDialogIdRef = useRef71(void 0);
50474
+ useEffect88(() => {
50465
50475
  if (prevDialogIdRef.current === dialogId) return;
50466
50476
  prevDialogIdRef.current = dialogId;
50467
50477
  historyLoadSeqRef.current += 1;
@@ -50475,7 +50485,7 @@ function useNatsChatAdapter(config, options = {}) {
50475
50485
  if (!active || !dialogId) return;
50476
50486
  void loadDialogHistory(dialogId);
50477
50487
  }, [active, dialogId, loadDialogHistory, resetAccumulator]);
50478
- useEffect86(() => {
50488
+ useEffect88(() => {
50479
50489
  if (!active || !dialogId) return;
50480
50490
  resetChunkTracking();
50481
50491
  startInitialBuffering();
@@ -50497,14 +50507,14 @@ function useNatsChatAdapter(config, options = {}) {
50497
50507
  setConnectionState("connected");
50498
50508
  }
50499
50509
  });
50500
- useEffect86(() => {
50510
+ useEffect88(() => {
50501
50511
  if (!active || !dialogId) {
50502
50512
  setConnectionState("connected");
50503
50513
  return;
50504
50514
  }
50505
50515
  setConnectionState("connecting");
50506
50516
  }, [active, dialogId]);
50507
- const initialDialogsLoadedRef = useRef73(false);
50517
+ const initialDialogsLoadedRef = useRef71(false);
50508
50518
  const loadDialogsPage = useCallback52(
50509
50519
  async (cursor) => {
50510
50520
  if (!fetchDialogs) return;
@@ -50536,7 +50546,7 @@ function useNatsChatAdapter(config, options = {}) {
50536
50546
  const reloadDialogs = useCallback52(() => {
50537
50547
  void loadDialogsPage();
50538
50548
  }, [loadDialogsPage]);
50539
- useEffect86(() => {
50549
+ useEffect88(() => {
50540
50550
  if (!fetchDialogs) return;
50541
50551
  if (!active) return;
50542
50552
  if (initialDialogsLoadedRef.current) return;
@@ -50777,7 +50787,7 @@ function useNatsChatAdapter(config, options = {}) {
50777
50787
  }
50778
50788
 
50779
50789
  // src/components/chat/hooks/use-unified-chat.ts
50780
- import { useCallback as useCallback53, useMemo as useMemo44, useRef as useRef74 } from "react";
50790
+ import { useCallback as useCallback53, useMemo as useMemo44, useRef as useRef72 } from "react";
50781
50791
  var EMPTY_SSE_OPTIONS = {};
50782
50792
  function createDisabledNatsConfig() {
50783
50793
  return {
@@ -50792,7 +50802,7 @@ function createDisabledNatsConfig() {
50792
50802
  }
50793
50803
  function useUnifiedChat(options) {
50794
50804
  const { modes, activeMode, mingoStateOverride } = options;
50795
- const disabledNatsRef = useRef74(null);
50805
+ const disabledNatsRef = useRef72(null);
50796
50806
  if (disabledNatsRef.current === null) {
50797
50807
  disabledNatsRef.current = createDisabledNatsConfig();
50798
50808
  }
@@ -50806,7 +50816,7 @@ function useUnifiedChat(options) {
50806
50816
  { active: natsActive }
50807
50817
  );
50808
50818
  const activeState = activeMode === "guide" ? sseState : mingoStateOverride ?? natsState;
50809
- const activeStateRef = useRef74(activeState);
50819
+ const activeStateRef = useRef72(activeState);
50810
50820
  activeStateRef.current = activeState;
50811
50821
  const stopMessage = useCallback53(() => activeStateRef.current.stopMessage(), []);
50812
50822
  const clearMessages = useCallback53(
@@ -51116,9 +51126,9 @@ function chatChipClass({ tone, density = "chip", extra }) {
51116
51126
  }
51117
51127
 
51118
51128
  // src/components/chat/embeddable-chat.tsx
51119
- import { useCallback as useCallback55, useEffect as useEffect87, useMemo as useMemo46, useRef as useRef75, useState as useState116 } from "react";
51129
+ import { useCallback as useCallback55, useEffect as useEffect89, useMemo as useMemo46, useRef as useRef73, useState as useState116 } from "react";
51120
51130
  import * as DialogPrimitive4 from "@radix-ui/react-dialog";
51121
- import { usePreventScroll as usePreventScroll6 } from "@react-aria/overlays";
51131
+ import { usePreventScroll } from "@react-aria/overlays";
51122
51132
  import { isIOS } from "@react-aria/utils";
51123
51133
 
51124
51134
  // node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
@@ -51640,7 +51650,7 @@ function EmbeddableChatInner({
51640
51650
  const commandsUrl = runtime.endpoints.commandsUrl;
51641
51651
  const { attachmentsEnabled, user: identityUser } = useChatIdentity();
51642
51652
  const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
51643
- useEffect87(() => {
51653
+ useEffect89(() => {
51644
51654
  if (process.env.NODE_ENV !== "production") {
51645
51655
  const hasOpen = open !== void 0;
51646
51656
  const hasHandler = onOpenChange !== void 0;
@@ -51660,9 +51670,9 @@ function EmbeddableChatInner({
51660
51670
  if (typeof window === "undefined") return false;
51661
51671
  return !window.matchMedia("(pointer: coarse)").matches;
51662
51672
  });
51663
- usePreventScroll6({ isDisabled: !isOpen || shellLess });
51664
- const navigatingAwayRef = useRef75(false);
51665
- useEffect87(() => {
51673
+ usePreventScroll({ isDisabled: !isOpen || shellLess });
51674
+ const navigatingAwayRef = useRef73(false);
51675
+ useEffect89(() => {
51666
51676
  if (!isOpen) return;
51667
51677
  if (shellLess) return;
51668
51678
  if (typeof window === "undefined") return;
@@ -51688,7 +51698,7 @@ function EmbeddableChatInner({
51688
51698
  window.scrollTo(0, scrollY);
51689
51699
  };
51690
51700
  }, [isOpen, shellLess]);
51691
- const chatInputRef = useRef75(null);
51701
+ const chatInputRef = useRef73(null);
51692
51702
  const [quickActionPreview, setQuickActionPreview] = useState116(null);
51693
51703
  const slashCommandsProp = useMemo46(
51694
51704
  () => ({
@@ -51792,8 +51802,8 @@ function EmbeddableChatInner({
51792
51802
  hasMoreMessages,
51793
51803
  loadMoreMessages
51794
51804
  } = useUnifiedChat({ modes: effectiveModes, activeMode, mingoStateOverride: mingoState });
51795
- const guidePromptSentRef = useRef75(false);
51796
- useEffect87(() => {
51805
+ const guidePromptSentRef = useRef73(false);
51806
+ useEffect89(() => {
51797
51807
  if (!guidePendingPrompt) {
51798
51808
  guidePromptSentRef.current = false;
51799
51809
  return;
@@ -51817,12 +51827,12 @@ function EmbeddableChatInner({
51817
51827
  const [contextItems, setContextItems] = useState116([]);
51818
51828
  const [contextPickerOpen, setContextPickerOpen] = useState116(false);
51819
51829
  const [mentionQuery, setMentionQuery] = useState116(null);
51820
- const mentionActiveRef = useRef75(false);
51821
- useEffect87(() => {
51830
+ const mentionActiveRef = useRef73(false);
51831
+ useEffect89(() => {
51822
51832
  mentionActiveRef.current = mentionQuery !== null;
51823
51833
  }, [mentionQuery]);
51824
- const mentionKeysRef = useRef75(/* @__PURE__ */ new Set());
51825
- useEffect87(() => {
51834
+ const mentionKeysRef = useRef73(/* @__PURE__ */ new Set());
51835
+ useEffect89(() => {
51826
51836
  setContextItems([]);
51827
51837
  setMentionQuery(null);
51828
51838
  mentionKeysRef.current.clear();
@@ -51918,7 +51928,7 @@ function EmbeddableChatInner({
51918
51928
  () => /* @__PURE__ */ jsx359(MingoIcon, { className: "h-6 w-6", cornerColor: "var(--ods-flamingo-cyan-base)" }),
51919
51929
  []
51920
51930
  );
51921
- const timestampCacheRef = useRef75(/* @__PURE__ */ new Map());
51931
+ const timestampCacheRef = useRef73(/* @__PURE__ */ new Map());
51922
51932
  const guideUserName = activeMode === "guide" ? [identityUser?.firstName, identityUser?.lastName].filter(Boolean).join(" ").trim() || identityUser?.name?.trim() || void 0 : void 0;
51923
51933
  const guideUserAvatar = activeMode === "guide" ? identityUser?.avatarUrl?.trim() || void 0 : void 0;
51924
51934
  const messages = useMemo46(() => {
@@ -52043,7 +52053,7 @@ function EmbeddableChatInner({
52043
52053
  });
52044
52054
  const handleOpen = useCallback55(() => setIsOpen(true), [setIsOpen]);
52045
52055
  useCloseOnNavigation(handleNavigationClose, null);
52046
- useEffect87(() => {
52056
+ useEffect89(() => {
52047
52057
  const handler = (e) => {
52048
52058
  const detail = e.detail;
52049
52059
  if (!detail || detail.source !== source) return;
@@ -52061,7 +52071,7 @@ function EmbeddableChatInner({
52061
52071
  const contentViewKey = hasConversation ? "conversation" : activeMode;
52062
52072
  const isGuideEmpty = !hasConversation && activeMode === "guide";
52063
52073
  const isQuickActionEmpty = !hasConversation && (activeMode === "guide" || activeMode === "mingo");
52064
- useEffect87(() => {
52074
+ useEffect89(() => {
52065
52075
  if (!isQuickActionEmpty) setQuickActionPreview(null);
52066
52076
  }, [isQuickActionEmpty]);
52067
52077
  const guideCanReturnToMingo = isGuideEmpty && hasMingoMode;
@@ -53368,11 +53378,10 @@ export {
53368
53378
  TicketNotesSection,
53369
53379
  TicketInfoSection,
53370
53380
  FilterPillRow,
53371
- MOBILE_NAV_PANEL_ID,
53372
- MobileNavPanel,
53373
53381
  Header2 as Header,
53374
53382
  HeaderSkeleton,
53375
53383
  ClientOnlyHeader,
53384
+ MobileNavPanel,
53376
53385
  SlidingSidebar,
53377
53386
  StickySectionNav,
53378
53387
  useSectionNavigation,
@@ -53400,4 +53409,4 @@ export {
53400
53409
  LogsList,
53401
53410
  assets
53402
53411
  };
53403
- //# sourceMappingURL=chunk-YVJ2XBFU.js.map
53412
+ //# sourceMappingURL=chunk-IVM47EGI.js.map