@flamingo-stack/openframe-frontend-core 0.0.750 → 0.0.752

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 (82) hide show
  1. package/dist/{chunk-OFO75R2O.cjs → chunk-35RU25PJ.cjs} +130 -130
  2. package/dist/{chunk-ALPRQ3ZX.cjs → chunk-3GG3QAPT.cjs} +15 -15
  3. package/dist/{chunk-7RCTOWBA.cjs → chunk-4OTCQEP3.cjs} +28 -28
  4. package/dist/{chunk-XJ3J4UIS.cjs → chunk-4PEG4JTM.cjs} +19 -19
  5. package/dist/{chunk-3TELPOVH.cjs → chunk-7OEVVMAU.cjs} +2 -2
  6. package/dist/{chunk-CNUZLOVA.cjs → chunk-7WEGXNNS.cjs} +40 -40
  7. package/dist/{chunk-C6LPOYDM.cjs → chunk-AG4HR6Z6.cjs} +8 -8
  8. package/dist/{chunk-V3UJ6NDR.cjs → chunk-EM4OEWCM.cjs} +171 -171
  9. package/dist/{chunk-HOEVD6EN.cjs → chunk-EUQJ7QHW.cjs} +4 -4
  10. package/dist/{chunk-FP6HAJQV.cjs → chunk-G44V3UGE.cjs} +105 -105
  11. package/dist/{chunk-2YXOD2KL.cjs → chunk-H3RYUTND.cjs} +5 -0
  12. package/dist/{chunk-JPUTILTV.cjs → chunk-IPVJAML5.cjs} +94 -94
  13. package/dist/{chunk-KVSEWACW.cjs → chunk-J5G4CF2V.cjs} +28 -28
  14. package/dist/{chunk-2J2OBP4N.cjs → chunk-JI6NRWCC.cjs} +21 -21
  15. package/dist/{chunk-4O2KYY4K.cjs → chunk-KBJSZFBZ.cjs} +3 -3
  16. package/dist/{chunk-G7SBHMRR.cjs → chunk-KHKPLOU4.cjs} +69 -39
  17. package/dist/{chunk-45YRDD7W.cjs → chunk-KUVYVAS2.cjs} +22 -22
  18. package/dist/{chunk-UGCRLRCT.cjs → chunk-NO5UJLLQ.cjs} +2 -5
  19. package/dist/{chunk-WZX26ODJ.cjs → chunk-OXCGQV6B.cjs} +152 -133
  20. package/dist/{chunk-FHT7SMA7.cjs → chunk-OXEAN3EQ.cjs} +47 -47
  21. package/dist/{chunk-E3KFEOFA.cjs → chunk-P4ODFQGA.cjs} +7 -7
  22. package/dist/{chunk-AW6GP3JK.cjs → chunk-RDH63XXW.cjs} +83 -83
  23. package/dist/{chunk-CLAJIQ7E.cjs → chunk-U2AE4UG7.cjs} +19 -19
  24. package/dist/{chunk-6KEJQR6L.cjs → chunk-VD3XBUQR.cjs} +797 -797
  25. package/dist/{chunk-4FWURR3W.cjs → chunk-VUWPLQBY.cjs} +2 -2
  26. package/dist/{chunk-YL62VAHC.cjs → chunk-WQCLN27R.cjs} +6 -6
  27. package/dist/{chunk-GVETSV7H.cjs → chunk-XADJG35G.cjs} +48 -48
  28. package/dist/{chunk-BO6ZOAPB.cjs → chunk-Y6PVZRYL.cjs} +12 -12
  29. package/dist/{chunk-DGEB5GUZ.cjs → chunk-ZVOXBSDP.cjs} +2 -2
  30. package/dist/{chunk-34TWK3JE.cjs → chunk-ZYRRRKSZ.cjs} +3 -3
  31. package/dist/{cloud-tenants-E4JSG3GH.cjs → cloud-tenants-WAOMZZQ2.cjs} +13 -13
  32. package/dist/components/case-studies/index.cjs +26 -26
  33. package/dist/components/chat/hooks/use-jetstream-dialog-subscription.d.ts +7 -5
  34. package/dist/components/chat/hooks/use-jetstream-dialog-subscription.d.ts.map +1 -1
  35. package/dist/components/chat/hooks/use-jetstream-dialog-subscription.js +33 -14
  36. package/dist/components/chat/index.cjs +8 -8
  37. package/dist/components/chat/types/api.types.d.ts +27 -8
  38. package/dist/components/chat/types/api.types.d.ts.map +1 -1
  39. package/dist/components/chat/types/network.types.d.ts +2 -1
  40. package/dist/components/chat/types/network.types.d.ts.map +1 -1
  41. package/dist/components/contact/index.cjs +14 -14
  42. package/dist/components/docs/index.cjs +17 -17
  43. package/dist/components/embeds/index.cjs +14 -14
  44. package/dist/components/faq/index.cjs +15 -15
  45. package/dist/components/features/index.cjs +13 -13
  46. package/dist/components/help-center-pages/index.cjs +123 -123
  47. package/dist/components/index.cjs +64 -64
  48. package/dist/components/loading/loading-region.d.ts.map +1 -1
  49. package/dist/components/loading/loading-region.js +2 -5
  50. package/dist/components/loading/unified-skeleton.d.ts +2 -0
  51. package/dist/components/loading/unified-skeleton.d.ts.map +1 -1
  52. package/dist/components/loading/unified-skeleton.js +5 -0
  53. package/dist/components/meeting-scheduler/index.cjs +79 -79
  54. package/dist/components/navigation/index.cjs +16 -16
  55. package/dist/components/onboarding-guides/index.cjs +16 -16
  56. package/dist/components/product-demo/index.cjs +12 -12
  57. package/dist/components/related-content/index.cjs +7 -7
  58. package/dist/components/tickets/index.cjs +19 -19
  59. package/dist/components/ui/file-manager/index.cjs +30 -30
  60. package/dist/components/ui/index.cjs +13 -13
  61. package/dist/{devices-AVRQGB2N.cjs → devices-VFEPXW2N.cjs} +14 -14
  62. package/dist/{embeddable-chat-SNYQSMS7.cjs → embeddable-chat-BYQBABDV.cjs} +74 -74
  63. package/dist/hooks/index.cjs +3 -3
  64. package/dist/index.cjs +17 -17
  65. package/dist/{knowledge-S3CNISQH.cjs → knowledge-4TE7AWZX.cjs} +14 -14
  66. package/dist/{logs-WDLOKDXT.cjs → logs-3B2P3JXN.cjs} +21 -21
  67. package/dist/nats/index.cjs +2 -2
  68. package/dist/nats/nats.d.ts +33 -7
  69. package/dist/nats/nats.d.ts.map +1 -1
  70. package/dist/nats/nats.js +41 -11
  71. package/dist/{policies-STML7NEZ.cjs → policies-DVI6V22X.cjs} +17 -17
  72. package/dist/{remote-session-ZKP2W3IS.cjs → remote-session-57DGC4X3.cjs} +6 -6
  73. package/dist/{scripts-HO53VYGX.cjs → scripts-JJ2BVYQ5.cjs} +20 -20
  74. package/dist/{software-update-4VTK7LWQ.cjs → software-update-BN23RATE.cjs} +17 -17
  75. package/dist/{tickets-board-BNW4AYFL.cjs → tickets-board-EP6L3BSV.cjs} +7 -7
  76. package/package.json +1 -1
  77. package/src/components/chat/hooks/use-jetstream-dialog-subscription.ts +59 -23
  78. package/src/components/chat/types/api.types.ts +27 -8
  79. package/src/components/chat/types/network.types.ts +2 -1
  80. package/src/components/loading/loading-region.tsx +4 -9
  81. package/src/components/loading/unified-skeleton.tsx +13 -0
  82. package/src/nats/nats.ts +91 -20
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }"use client";
2
2
 
3
3
 
4
- var _chunk34TWK3JEcjs = require('./chunk-34TWK3JE.cjs');
4
+ var _chunkZYRRRKSZcjs = require('./chunk-ZYRRRKSZ.cjs');
5
5
 
6
6
 
7
7
 
8
- var _chunk2J2OBP4Ncjs = require('./chunk-2J2OBP4N.cjs');
8
+ var _chunkJI6NRWCCcjs = require('./chunk-JI6NRWCC.cjs');
9
9
 
10
10
 
11
11
 
@@ -14,13 +14,13 @@ var _chunkHEVW75L3cjs = require('./chunk-HEVW75L3.cjs');
14
14
 
15
15
 
16
16
 
17
- var _chunk6KEJQR6Lcjs = require('./chunk-6KEJQR6L.cjs');
17
+ var _chunkVD3XBUQRcjs = require('./chunk-VD3XBUQR.cjs');
18
18
 
19
19
 
20
- var _chunkALPRQ3ZXcjs = require('./chunk-ALPRQ3ZX.cjs');
20
+ var _chunk3GG3QAPTcjs = require('./chunk-3GG3QAPT.cjs');
21
21
 
22
22
 
23
- var _chunkWZX26ODJcjs = require('./chunk-WZX26ODJ.cjs');
23
+ var _chunkOXCGQV6Bcjs = require('./chunk-OXCGQV6B.cjs');
24
24
 
25
25
 
26
26
 
@@ -29,19 +29,19 @@ var _chunk7DNL734Scjs = require('./chunk-7DNL734S.cjs');
29
29
 
30
30
 
31
31
 
32
- var _chunkOFO75R2Ocjs = require('./chunk-OFO75R2O.cjs');
32
+ var _chunk35RU25PJcjs = require('./chunk-35RU25PJ.cjs');
33
33
 
34
34
 
35
35
  var _chunkL2IQESTQcjs = require('./chunk-L2IQESTQ.cjs');
36
36
 
37
37
 
38
- var _chunkUGCRLRCTcjs = require('./chunk-UGCRLRCT.cjs');
38
+ var _chunkNO5UJLLQcjs = require('./chunk-NO5UJLLQ.cjs');
39
39
 
40
40
 
41
41
  var _chunkV45KLJQPcjs = require('./chunk-V45KLJQP.cjs');
42
42
 
43
43
 
44
- var _chunk2YXOD2KLcjs = require('./chunk-2YXOD2KL.cjs');
44
+ var _chunkH3RYUTNDcjs = require('./chunk-H3RYUTND.cjs');
45
45
 
46
46
 
47
47
  var _chunk3ATAYP36cjs = require('./chunk-3ATAYP36.cjs');
@@ -51,7 +51,7 @@ var _jsxruntime = require('react/jsx-runtime');
51
51
  function ListEmptyState({ isFiltered, filtered, onClearFilters, empty }) {
52
52
  if (isFiltered) {
53
53
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
54
- _chunk34TWK3JEcjs.EmptyState,
54
+ _chunkZYRRRKSZcjs.EmptyState,
55
55
  {
56
56
  type: "search",
57
57
  title: filtered.title,
@@ -64,7 +64,7 @@ function ListEmptyState({ isFiltered, filtered, onClearFilters, empty }) {
64
64
  }
65
65
  const hasCta = Boolean(empty.ctaText && (empty.onCtaClick || empty.ctaHref));
66
66
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
67
- _chunk34TWK3JEcjs.EmptyState,
67
+ _chunkZYRRRKSZcjs.EmptyState,
68
68
  {
69
69
  type: "generic",
70
70
  title: empty.title,
@@ -81,7 +81,7 @@ function ListEmptyState({ isFiltered, filtered, onClearFilters, empty }) {
81
81
  var _react = require('react');
82
82
 
83
83
  function DevSectionView({ sectionKey, hero, preControls, children, showHeading = true }) {
84
- const section = _chunkWZX26ODJcjs.OPENFRAME_DEV_SECTIONS[sectionKey];
84
+ const section = _chunkOXCGQV6Bcjs.OPENFRAME_DEV_SECTIONS[sectionKey];
85
85
  const router = _chunk7DNL734Scjs.useRouter.call(void 0, );
86
86
  const pathname = _chunk7DNL734Scjs.usePathname.call(void 0, );
87
87
  const searchParams = _chunk7DNL734Scjs.useSearchParams.call(void 0, );
@@ -132,7 +132,7 @@ function DevSectionView({ sectionKey, hero, preControls, children, showHeading =
132
132
  preControls,
133
133
  (search || filter) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
134
134
  search && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
135
- _chunk6KEJQR6Lcjs.SearchInput,
135
+ _chunkVD3XBUQRcjs.SearchInput,
136
136
  {
137
137
  showDropdown: false,
138
138
  placeholder: search.placeholder,
@@ -142,7 +142,7 @@ function DevSectionView({ sectionKey, hero, preControls, children, showHeading =
142
142
  }
143
143
  ),
144
144
  filter && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
145
- _chunk6KEJQR6Lcjs.StatusFilterComponent,
145
+ _chunkVD3XBUQRcjs.StatusFilterComponent,
146
146
  {
147
147
  selectedStatus: currentFilterValue,
148
148
  onStatusChange: handleFilterChange,
@@ -167,7 +167,7 @@ function DevSectionPage({
167
167
  shell = true
168
168
  }) {
169
169
  const router = _chunk7DNL734Scjs.useRouter.call(void 0, );
170
- const section = _chunkWZX26ODJcjs.OPENFRAME_DEV_SECTIONS[sectionKey];
170
+ const section = _chunkOXCGQV6Bcjs.OPENFRAME_DEV_SECTIONS[sectionKey];
171
171
  const backCfg = backButton === false ? void 0 : {
172
172
  label: _nullishCoalesce((backButton ? backButton.label : void 0), () => ( "Back to home")),
173
173
  onClick: () => router.push(_nullishCoalesce((backButton ? backButton.href : void 0), () => ( "/")))
@@ -180,7 +180,7 @@ function DevSectionPage({
180
180
  // duplicate title. (The hero icon is intentionally dropped: TitleBlock is
181
181
  // frozen and renders title-only.)
182
182
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
183
- _chunkALPRQ3ZXcjs.PageLayout,
183
+ _chunk3GG3QAPTcjs.PageLayout,
184
184
  {
185
185
  title: _nullishCoalesce(title, () => ( section.hero.title)),
186
186
  subtitle: _nullishCoalesce(subtitle, () => ( section.hero.description)),
@@ -189,12 +189,12 @@ function DevSectionPage({
189
189
  backButton: backCfg,
190
190
  children: [
191
191
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DevSectionView, { sectionKey, showHeading: false, preControls, children }),
192
- faq && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2J2OBP4Ncjs.FaqSection, { ..._chunk2J2OBP4Ncjs.pageFaqProps.call(void 0, faq) })
192
+ faq && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJI6NRWCCcjs.FaqSection, { ..._chunkJI6NRWCCcjs.pageFaqProps.call(void 0, faq) })
193
193
  ]
194
194
  }
195
195
  )
196
196
  );
197
- return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6KEJQR6Lcjs.PageShell, { children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "page-shell-content", children: inner });
197
+ return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVD3XBUQRcjs.PageShell, { children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "page-shell-content", children: inner });
198
198
  }
199
199
 
200
200
  // src/components/shared/dev-section/dev-card-row.tsx
@@ -218,17 +218,17 @@ function DevCardRowContent({
218
218
  function DevCardRowSkeleton() {
219
219
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border-b border-ods-border p-[12px] last:border-b-0 content-md:p-[16px]", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col items-start justify-between gap-[12px] content-md:flex-row content-md:gap-[16px]", children: [
220
220
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full min-w-0 flex-1 flex-col gap-[12px] content-md:w-auto content-md:gap-[16px]", children: [
221
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex min-h-[24px] items-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2YXOD2KLcjs.UnifiedSkeleton, { className: "h-[20px] w-full rounded" }) }),
222
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex min-h-[20px] items-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2YXOD2KLcjs.UnifiedSkeleton, { className: "h-[20px] w-1/2 rounded" }) }),
221
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex min-h-[24px] items-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "h-[20px] w-full rounded" }) }),
222
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex min-h-[20px] items-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "h-[20px] w-1/2 rounded" }) }),
223
223
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex min-h-[72px] items-center", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 space-y-1", children: [
224
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2YXOD2KLcjs.UnifiedSkeleton, { className: "h-[20px] w-full rounded" }),
225
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2YXOD2KLcjs.UnifiedSkeleton, { className: "h-[20px] w-full rounded" }),
226
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2YXOD2KLcjs.UnifiedSkeleton, { className: "h-[20px] w-2/3 rounded" })
224
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "h-[20px] w-full rounded" }),
225
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "h-[20px] w-full rounded" }),
226
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "h-[20px] w-2/3 rounded" })
227
227
  ] }) })
228
228
  ] }),
229
229
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-shrink-0 flex-col gap-2 self-start", children: [
230
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2YXOD2KLcjs.UnifiedSkeleton, { className: "h-[32px] w-[100px] rounded" }),
231
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2YXOD2KLcjs.UnifiedSkeleton, { className: "h-[32px] w-[120px] rounded" })
230
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "h-[32px] w-[100px] rounded" }),
231
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "h-[32px] w-[120px] rounded" })
232
232
  ] })
233
233
  ] }) });
234
234
  }
@@ -237,7 +237,7 @@ function DevCardRowSkeletonList({
237
237
  rows = 5
238
238
  }) {
239
239
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
240
- _chunkUGCRLRCTcjs.LoadingRegion,
240
+ _chunkNO5UJLLQcjs.LoadingRegion,
241
241
  {
242
242
  label: "Loading",
243
243
  announce: region,
@@ -265,7 +265,7 @@ function DeliveryRow({ item, href, target, caption, id, className }) {
265
265
  const taskType = item.taskType;
266
266
  const typeBadgeLabel = _chunkHEVW75L3cjs.TASK_TYPE_LABELS[taskType] || "TASK";
267
267
  const typeBadgeTextColor = _chunkHEVW75L3cjs.TASK_TYPE_TEXT_COLORS[taskType] || "";
268
- const statusBadgeScheme = _chunkOFO75R2Ocjs.getStatusColorScheme.call(void 0, item.status);
268
+ const statusBadgeScheme = _chunk35RU25PJcjs.getStatusColorScheme.call(void 0, item.status);
269
269
  const relativeTime = getRelativeTime(item.dateUpdated);
270
270
  const subtitle = `ACTIVE ${relativeTime}${item.listNames.length > 0 ? `, ${item.listNames.join(", ")}` : ""}, ${item.id}`;
271
271
  const inner = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col items-start justify-between gap-[12px] content-md:flex-row content-md:gap-[16px]", children: [
@@ -277,7 +277,7 @@ function DeliveryRow({ item, href, target, caption, id, className }) {
277
277
  ] }),
278
278
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-shrink-0 flex-row items-center gap-2 self-stretch content-md:w-auto content-md:flex-col content-md:items-end content-md:self-start", children: [
279
279
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
280
- _chunkOFO75R2Ocjs.StatusBadge,
280
+ _chunk35RU25PJcjs.StatusBadge,
281
281
  {
282
282
  text: item.status.toUpperCase(),
283
283
  colorScheme: statusBadgeScheme,
@@ -286,7 +286,7 @@ function DeliveryRow({ item, href, target, caption, id, className }) {
286
286
  }
287
287
  ),
288
288
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
289
- _chunkOFO75R2Ocjs.StatusBadge,
289
+ _chunk35RU25PJcjs.StatusBadge,
290
290
  {
291
291
  text: typeBadgeLabel,
292
292
  variant: "card",
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
2
2
 
3
3
 
4
- var _chunk4FWURR3Wcjs = require('./chunk-4FWURR3W.cjs');
4
+ var _chunkVUWPLQBYcjs = require('./chunk-VUWPLQBY.cjs');
5
5
 
6
6
 
7
7
 
8
- var _chunkWZX26ODJcjs = require('./chunk-WZX26ODJ.cjs');
8
+ var _chunkOXCGQV6Bcjs = require('./chunk-OXCGQV6B.cjs');
9
9
 
10
10
 
11
11
 
12
12
 
13
- var _chunkV3UJ6NDRcjs = require('./chunk-V3UJ6NDR.cjs');
13
+ var _chunkEM4OEWCMcjs = require('./chunk-EM4OEWCM.cjs');
14
14
 
15
15
 
16
16
 
@@ -25,22 +25,22 @@ var _chunkEWPR7662cjs = require('./chunk-EWPR7662.cjs');
25
25
 
26
26
 
27
27
 
28
- var _chunkXJ3J4UIScjs = require('./chunk-XJ3J4UIS.cjs');
28
+ var _chunk4PEG4JTMcjs = require('./chunk-4PEG4JTM.cjs');
29
29
 
30
30
 
31
- var _chunkOFO75R2Ocjs = require('./chunk-OFO75R2O.cjs');
31
+ var _chunk35RU25PJcjs = require('./chunk-35RU25PJ.cjs');
32
32
 
33
33
 
34
34
  var _chunkASMNNSUQcjs = require('./chunk-ASMNNSUQ.cjs');
35
35
 
36
36
 
37
- var _chunkUGCRLRCTcjs = require('./chunk-UGCRLRCT.cjs');
37
+ var _chunkNO5UJLLQcjs = require('./chunk-NO5UJLLQ.cjs');
38
38
 
39
39
 
40
40
  var _chunkV45KLJQPcjs = require('./chunk-V45KLJQP.cjs');
41
41
 
42
42
 
43
- var _chunk2YXOD2KLcjs = require('./chunk-2YXOD2KL.cjs');
43
+ var _chunkH3RYUTNDcjs = require('./chunk-H3RYUTND.cjs');
44
44
 
45
45
 
46
46
  var _chunk3ATAYP36cjs = require('./chunk-3ATAYP36.cjs');
@@ -63,7 +63,7 @@ function FaqAccordion({ items, defaultOpenIds = [] }) {
63
63
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
64
64
  "div",
65
65
  {
66
- id: _chunkV3UJ6NDRcjs.faqItemAnchor.call(void 0, item.id),
66
+ id: _chunkEM4OEWCMcjs.faqItemAnchor.call(void 0, item.id),
67
67
  className: "scroll-mt-24 transition-colors hover:bg-ods-bg-hover",
68
68
  children: [
69
69
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -116,14 +116,14 @@ function FaqAccordion({ items, defaultOpenIds = [] }) {
116
116
 
117
117
  var PICK_ROOT_MARGIN = "600px";
118
118
  function faqAskCardShown(assistant) {
119
- return _chunkWZX26ODJcjs.assistantAvailable.call(void 0, assistant) && !!assistant.name;
119
+ return _chunkOXCGQV6Bcjs.assistantAvailable.call(void 0, assistant) && !!assistant.name;
120
120
  }
121
121
  function FaqAskCard({ topic, exclude, count, title, description, onOpen }) {
122
122
  const { ref, inView } = _chunkCSJO7ZGNcjs.useInView.call(void 0, { rootMargin: PICK_ROOT_MARGIN });
123
123
  const [reached, setReached] = _react.useState.call(void 0, false);
124
124
  if (inView && !reached) setReached(true);
125
125
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
126
- _chunkWZX26ODJcjs.AssistantAskPrompts,
126
+ _chunkOXCGQV6Bcjs.AssistantAskPrompts,
127
127
  {
128
128
  variant: "card",
129
129
  topic,
@@ -176,7 +176,7 @@ function pageFaqProps(faq) {
176
176
  }
177
177
  function buildFaqsUrl(entityType, entityId, minResults, apiBaseUrl = "", topic) {
178
178
  const entityScoped = !!entityType && entityId !== void 0 && entityId !== null && entityId !== "";
179
- return _chunkXJ3J4UIScjs.buildSuggestionUrl.call(void 0, "/api/faqs", {
179
+ return _chunk4PEG4JTMcjs.buildSuggestionUrl.call(void 0, "/api/faqs", {
180
180
  apiBaseUrl,
181
181
  entityType,
182
182
  entityId,
@@ -197,7 +197,7 @@ function groupFaqsBySection(faqs) {
197
197
  }
198
198
  let group = byName.get(name);
199
199
  if (!group) {
200
- group = { section: name, slug: _chunkV3UJ6NDRcjs.faqSectionSlug.call(void 0, name), items: [] };
200
+ group = { section: name, slug: _chunkEM4OEWCMcjs.faqSectionSlug.call(void 0, name), items: [] };
201
201
  byName.set(name, group);
202
202
  }
203
203
  group.items.push(item);
@@ -252,7 +252,7 @@ function GroupedFaqList({
252
252
  }, [slugKey]);
253
253
  const [hashTarget, setHashTarget] = _react.useState.call(void 0, null);
254
254
  _react.useEffect.call(void 0, () => {
255
- const refresh = () => setHashTarget(_chunkV3UJ6NDRcjs.parseFaqHash.call(void 0, window.location.hash));
255
+ const refresh = () => setHashTarget(_chunkEM4OEWCMcjs.parseFaqHash.call(void 0, window.location.hash));
256
256
  refresh();
257
257
  window.addEventListener("hashchange", refresh);
258
258
  return () => window.removeEventListener("hashchange", refresh);
@@ -269,7 +269,7 @@ function GroupedFaqList({
269
269
  }, [groups, hashTarget]);
270
270
  const accordionKeySuffix = _optionalChain([hashTarget, 'optionalAccess', _8 => _8.kind]) === "item" ? `item:${hashTarget.rawId}` : "default";
271
271
  const scrollDep = `${groups.length}|` + (_optionalChain([hashTarget, 'optionalAccess', _9 => _9.kind]) === "item" ? `item:${hashTarget.rawId}` : _optionalChain([hashTarget, 'optionalAccess', _10 => _10.kind]) === "section" ? `section:${hashTarget.slug}` : "none");
272
- _chunk4FWURR3Wcjs.useScrollToHash.call(void 0, scrollDep, { headerOffset: _chunkCSJO7ZGNcjs.STICKY_HEADER_OFFSET_PX });
272
+ _chunkVUWPLQBYcjs.useScrollToHash.call(void 0, scrollDep, { headerOffset: _chunkCSJO7ZGNcjs.STICKY_HEADER_OFFSET_PX });
273
273
  const [pillSyncedHash, setPillSyncedHash] = _react.useState.call(void 0, hashTarget);
274
274
  if (pillSyncedHash !== hashTarget) {
275
275
  setPillSyncedHash(hashTarget);
@@ -302,7 +302,7 @@ function GroupedFaqList({
302
302
  const questions = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-10", children: groups.map((group) => {
303
303
  const key = groupKey(group);
304
304
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "section", { id: _nullishCoalesce(group.slug, () => ( void 0)), className: "scroll-mt-24 space-y-4", children: [
305
- group.section && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CategoryHeading, { className: _chunkOFO75R2Ocjs.SECTION_HEADING_CLASS, children: group.section }),
305
+ group.section && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CategoryHeading, { className: _chunk35RU25PJcjs.SECTION_HEADING_CLASS, children: group.section }),
306
306
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
307
307
  FaqAccordion,
308
308
  {
@@ -331,11 +331,11 @@ function GroupedFaqList({
331
331
  function FaqSkeleton({
332
332
  region = true
333
333
  } = {}) {
334
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkUGCRLRCTcjs.LoadingRegion, { label: "Loading questions", announce: region, className: "space-y-8", children: [
335
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2YXOD2KLcjs.UnifiedSkeleton, { className: "h-12 w-2/3 rounded content-md:h-14" }),
334
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNO5UJLLQcjs.LoadingRegion, { label: "Loading questions", announce: region, className: "space-y-8", children: [
335
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "h-12 w-2/3 rounded content-md:h-14" }),
336
336
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full divide-y divide-ods-border overflow-hidden rounded-md border border-ods-border bg-transparent", children: Array.from({ length: 8 }).map((_, idx) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-6 px-6 py-4 content-md:gap-10", children: [
337
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2YXOD2KLcjs.UnifiedSkeleton, { className: "h-6 w-5/6 rounded" }),
338
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2YXOD2KLcjs.UnifiedSkeleton, { className: "size-6 rounded" })
337
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "h-6 w-5/6 rounded" }),
338
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "size-6 rounded" })
339
339
  ] }, idx)) })
340
340
  ] });
341
341
  }
@@ -363,11 +363,11 @@ function FaqSection({
363
363
  () => initialFaqs ? { faqs: initialFaqs } : void 0,
364
364
  [initialFaqs]
365
365
  );
366
- const { data, dataUrl, isLoading, error } = _chunkXJ3J4UIScjs.useSelfFetch.call(void 0, url, { initialData });
366
+ const { data, dataUrl, isLoading, error } = _chunk4PEG4JTMcjs.useSelfFetch.call(void 0, url, { initialData });
367
367
  const held = dataUrl === url ? _optionalChain([data, 'optionalAccess', _15 => _15.faqs]) : void 0;
368
368
  const faqs = _react.useMemo.call(void 0, () => _nullishCoalesce(held, () => ( [])), [held]);
369
369
  const groups = _react.useMemo.call(void 0, () => faqs.length > 0 ? groupFaqsBySection(faqs) : [], [faqs]);
370
- const titleNode = heading === void 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: _chunkOFO75R2Ocjs.SECTION_HEADING_CLASS, children: DEFAULT_HEADING_TEXT }) : heading;
370
+ const titleNode = heading === void 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: _chunk35RU25PJcjs.SECTION_HEADING_CLASS, children: DEFAULT_HEADING_TEXT }) : heading;
371
371
  const headingNode = showTopic && topic ? (
372
372
  // The host's heading may arrive from a server component, still streaming: React cannot check such a
373
373
  // node when it sits in a list of siblings and warns about a missing key. So it is the ONLY child of its
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _chunk6KEJQR6Lcjs = require('./chunk-6KEJQR6L.cjs');
4
+ var _chunkVD3XBUQRcjs = require('./chunk-VD3XBUQR.cjs');
5
5
 
6
6
 
7
7
  var _chunkCKR42OBKcjs = require('./chunk-CKR42OBK.cjs');
@@ -48,7 +48,7 @@ function GoogleSheetsViewer({ externalUrl, fileName, height }) {
48
48
  ] });
49
49
  }
50
50
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
51
- _chunk6KEJQR6Lcjs.EmbedViewerFrame,
51
+ _chunkVD3XBUQRcjs.EmbedViewerFrame,
52
52
  {
53
53
  icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCKR42OBKcjs.GoogleSheetsIcon, { className: "h-5 w-5 shrink-0" }),
54
54
  title: displayName,
@@ -83,7 +83,7 @@ function PdfViewer({ src, fileName, onPreview, onDownload, height }) {
83
83
  ] });
84
84
  }
85
85
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
86
- _chunk6KEJQR6Lcjs.EmbedViewerFrame,
86
+ _chunkVD3XBUQRcjs.EmbedViewerFrame,
87
87
  {
88
88
  icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkM7ZSKWT3cjs.AdobePdfIcon, { className: "h-5 w-5 shrink-0" }),
89
89
  title: displayName,
@@ -78,23 +78,25 @@ function mapNatsTypeToStatus(type, events, debugEvents) {
78
78
  return null;
79
79
  }
80
80
  }
81
- function watchForRecovery(iter, recreatedEvent, onRecovered) {
82
- if (!onRecovered) return;
81
+ function watchForRecovery(iter, recreatedEvent, onRecreated) {
83
82
  void (async () => {
84
83
  try {
85
84
  const status = await iter.status();
86
85
  for await (const event of status) {
87
86
  if (event.type !== recreatedEvent) continue;
88
- try {
89
- onRecovered();
90
- } catch (e) {
91
- console.warn("[nats] onRecovered threw:", e);
92
- }
87
+ onRecreated(String(event.data));
93
88
  }
94
89
  } catch (e2) {
95
90
  }
96
91
  })();
97
92
  }
93
+ function invokeCallback(name, callback) {
94
+ try {
95
+ _optionalChain([callback, 'optionalCall', _2 => _2()]);
96
+ } catch (e) {
97
+ console.warn(`[nats] ${name} threw:`, e);
98
+ }
99
+ }
98
100
  function createNatsClient(options) {
99
101
  let nc = null;
100
102
  let statusLoopAbort = null;
@@ -186,7 +188,7 @@ function createNatsClient(options) {
186
188
  const conn = requireConnection();
187
189
  (async () => {
188
190
  const nats = await importNats();
189
- conn.publish(subject, payload, { headers: toNatsHeaders(nats, _optionalChain([opts, 'optionalAccess', _2 => _2.headers])) });
191
+ conn.publish(subject, payload, { headers: toNatsHeaders(nats, _optionalChain([opts, 'optionalAccess', _3 => _3.headers])) });
190
192
  })().catch((e) => emitStatus({ status: "error", data: e }));
191
193
  }
192
194
  function publishString(subject, payload, opts) {
@@ -207,8 +209,8 @@ function createNatsClient(options) {
207
209
  const conn = requireConnection();
208
210
  const nats = await importNats();
209
211
  const msg = await conn.request(subject, payload, {
210
- timeout: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _3 => _3.timeoutMs]), () => ( 2e3)),
211
- headers: toNatsHeaders(nats, _optionalChain([opts, 'optionalAccess', _4 => _4.headers]))
212
+ timeout: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _4 => _4.timeoutMs]), () => ( 2e3)),
213
+ headers: toNatsHeaders(nats, _optionalChain([opts, 'optionalAccess', _5 => _5.headers]))
212
214
  });
213
215
  return msg;
214
216
  }
@@ -227,10 +229,10 @@ function createNatsClient(options) {
227
229
  }
228
230
  function subscribeBytes(subject, onMessage, opts) {
229
231
  const conn = requireConnection();
230
- const sub = conn.subscribe(subject, { queue: _optionalChain([opts, 'optionalAccess', _5 => _5.queue]) });
231
- if (typeof _optionalChain([opts, 'optionalAccess', _6 => _6.max]) === "number") sub.unsubscribe(opts.max);
232
+ const sub = conn.subscribe(subject, { queue: _optionalChain([opts, 'optionalAccess', _6 => _6.queue]) });
233
+ if (typeof _optionalChain([opts, 'optionalAccess', _7 => _7.max]) === "number") sub.unsubscribe(opts.max);
232
234
  const abortController = new AbortController();
233
- const signal = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _7 => _7.signal]), () => ( abortController.signal));
235
+ const signal = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _8 => _8.signal]), () => ( abortController.signal));
234
236
  (async () => {
235
237
  try {
236
238
  for await (const msg of sub) {
@@ -284,20 +286,21 @@ function createNatsClient(options) {
284
286
  }
285
287
  async function subscribeJetStreamOrdered(onMessage, opts) {
286
288
  const conn = requireConnection();
287
- if (_optionalChain([opts, 'access', _8 => _8.signal, 'optionalAccess', _9 => _9.aborted])) {
289
+ if (_optionalChain([opts, 'access', _9 => _9.signal, 'optionalAccess', _10 => _10.aborted])) {
288
290
  return { unsubscribe() {
289
291
  } };
290
292
  }
291
293
  const nats = await importNats();
292
- if (_optionalChain([opts, 'access', _10 => _10.signal, 'optionalAccess', _11 => _11.aborted])) {
294
+ if (_optionalChain([opts, 'access', _11 => _11.signal, 'optionalAccess', _12 => _12.aborted])) {
293
295
  return { unsubscribe() {
294
296
  } };
295
297
  }
296
298
  const js = conn.jetstream();
297
299
  const consumer = await js.consumers.get(opts.streamName, {
298
300
  filterSubjects: opts.filterSubject,
299
- deliver_policy: nats.DeliverPolicy.StartSequence,
300
- opt_start_seq: _nullishCoalesce(opts.optStartSeq, () => ( 0)),
301
+ // nats.ws turns a start sequence of 0 into 1, so a 'new' that fell back to
302
+ // StartSequence replayed everything the stream retains for the subject.
303
+ ...opts.deliverPolicy === "new" ? { deliver_policy: nats.DeliverPolicy.New } : { deliver_policy: nats.DeliverPolicy.StartSequence, opt_start_seq: _nullishCoalesce(opts.optStartSeq, () => ( 0)) },
301
304
  // Milliseconds, NOT nanoseconds: nats.ws runs this through its own
302
305
  // `nanos()` before it reaches the server. Pre-converting here multiplied
303
306
  // it by 1e6 twice, putting the threshold ~9.5 years out — so the ephemeral
@@ -313,11 +316,11 @@ function createNatsClient(options) {
313
316
  const onAbort = () => {
314
317
  void teardown();
315
318
  };
316
- _optionalChain([opts, 'access', _12 => _12.signal, 'optionalAccess', _13 => _13.addEventListener, 'call', _14 => _14("abort", onAbort, { once: true })]);
319
+ _optionalChain([opts, 'access', _13 => _13.signal, 'optionalAccess', _14 => _14.addEventListener, 'call', _15 => _15("abort", onAbort, { once: true })]);
317
320
  async function teardown() {
318
321
  if (closed) return;
319
322
  closed = true;
320
- _optionalChain([opts, 'access', _15 => _15.signal, 'optionalAccess', _16 => _16.removeEventListener, 'call', _17 => _17("abort", onAbort)]);
323
+ _optionalChain([opts, 'access', _16 => _16.signal, 'optionalAccess', _17 => _17.removeEventListener, 'call', _18 => _18("abort", onAbort)]);
321
324
  const iter = iterRef.current;
322
325
  iterRef.current = null;
323
326
  if (iter) {
@@ -327,23 +330,46 @@ function createNatsClient(options) {
327
330
  }
328
331
  }
329
332
  }
330
- if (_optionalChain([opts, 'access', _18 => _18.signal, 'optionalAccess', _19 => _19.aborted])) {
333
+ if (_optionalChain([opts, 'access', _19 => _19.signal, 'optionalAccess', _20 => _20.aborted])) {
331
334
  void teardown();
332
335
  return { unsubscribe() {
333
336
  } };
334
337
  }
338
+ let backlogOwed = true;
339
+ const reportCaughtUp = () => {
340
+ if (!backlogOwed || closed) return;
341
+ backlogOwed = false;
342
+ invokeCallback("onCaughtUp", opts.onCaughtUp);
343
+ };
344
+ const reportIfNothingPending = async (consumerName) => {
345
+ try {
346
+ const info = await consumer.info(true);
347
+ if (consumerName !== void 0 && info.name !== consumerName) return;
348
+ if (info.num_pending === 0) reportCaughtUp();
349
+ } catch (e9) {
350
+ }
351
+ };
335
352
  (async () => {
336
353
  try {
337
354
  const iter = await consumer.consume();
338
355
  if (closed) {
339
356
  try {
340
357
  await iter.close();
341
- } catch (e9) {
358
+ } catch (e10) {
342
359
  }
343
360
  return;
344
361
  }
345
362
  iterRef.current = iter;
346
- watchForRecovery(iter, nats.ConsumerEvents.OrderedConsumerRecreated, opts.onRecovered);
363
+ if (opts.onRecovered || opts.onCaughtUp) {
364
+ watchForRecovery(iter, nats.ConsumerEvents.OrderedConsumerRecreated, (consumerName) => {
365
+ backlogOwed = true;
366
+ invokeCallback("onRecovered", opts.onRecovered);
367
+ setTimeout(() => {
368
+ void reportIfNothingPending(consumerName);
369
+ }, 0);
370
+ });
371
+ }
372
+ if (opts.onCaughtUp) await reportIfNothingPending();
347
373
  for await (const msg of iter) {
348
374
  if (closed) break;
349
375
  try {
@@ -351,9 +377,13 @@ function createNatsClient(options) {
351
377
  } catch (e) {
352
378
  emitStatus({ status: "error", data: e });
353
379
  }
380
+ if (msg.info.pending === 0) reportCaughtUp();
354
381
  }
355
382
  } catch (e) {
356
- if (!closed) emitStatus({ status: "error", data: e });
383
+ if (!closed) {
384
+ emitStatus({ status: "error", data: e });
385
+ reportCaughtUp();
386
+ }
357
387
  }
358
388
  })().catch((e) => emitStatus({ status: "error", data: e }));
359
389
  return {
@@ -443,7 +473,7 @@ function releaseClient(url, opts) {
443
473
  if (!conn) return;
444
474
  conn.refCount = Math.max(0, conn.refCount - 1);
445
475
  if (conn.refCount > 0) return;
446
- const delay = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _20 => _20.delayMs]), () => ( NATS_DEFAULTS.SHARED_CLOSE_DELAY_MS));
476
+ const delay = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _21 => _21.delayMs]), () => ( NATS_DEFAULTS.SHARED_CLOSE_DELAY_MS));
447
477
  conn.closeTimer = setTimeout(() => {
448
478
  conn.closeTimer = null;
449
479
  if (conn.refCount > 0) return;
@@ -475,7 +505,7 @@ function startConnectionLifecycle(options) {
475
505
  let retryAttempt = 0;
476
506
  function emitSynthetic(status) {
477
507
  if (closed) return;
478
- _optionalChain([options, 'access', _21 => _21.onStatusChange, 'optionalCall', _22 => _22(status, { status })]);
508
+ _optionalChain([options, 'access', _22 => _22.onStatusChange, 'optionalCall', _23 => _23(status, { status })]);
479
509
  if (status === "connected") {
480
510
  retryAttempt = 0;
481
511
  }
@@ -507,8 +537,8 @@ function startConnectionLifecycle(options) {
507
537
  return;
508
538
  }
509
539
  try {
510
- await _optionalChain([options, 'access', _23 => _23.onBeforeReconnect, 'optionalCall', _24 => _24()]);
511
- } catch (e10) {
540
+ await _optionalChain([options, 'access', _24 => _24.onBeforeReconnect, 'optionalCall', _25 => _25()]);
541
+ } catch (e11) {
512
542
  }
513
543
  if (closed) return;
514
544
  if (getSharedConnectionFor(wsUrl) !== conn) return;
@@ -529,7 +559,7 @@ function startConnectionLifecycle(options) {
529
559
  if (!closed && getSharedConnectionFor(wsUrl) === conn) {
530
560
  retryAttempt = 0;
531
561
  }
532
- } catch (e11) {
562
+ } catch (e12) {
533
563
  if (!closed && getSharedConnectionFor(wsUrl) === conn) {
534
564
  scheduleRetry();
535
565
  }
@@ -544,7 +574,7 @@ function startConnectionLifecycle(options) {
544
574
  const shouldRetryOn = _nullishCoalesce(options.shouldRetryOn, () => ( defaultShouldRetryOn));
545
575
  const unsubStatus = conn.client.onStatus((evt) => {
546
576
  if (closed) return;
547
- _optionalChain([options, 'access', _25 => _25.onStatusChange, 'optionalCall', _26 => _26(evt.status, evt)]);
577
+ _optionalChain([options, 'access', _26 => _26.onStatusChange, 'optionalCall', _27 => _27(evt.status, evt)]);
548
578
  if (evt.status === "connected") {
549
579
  retryAttempt = 0;
550
580
  }
@@ -558,7 +588,7 @@ function startConnectionLifecycle(options) {
558
588
  void (async () => {
559
589
  try {
560
590
  await conn.client.connect();
561
- } catch (e12) {
591
+ } catch (e13) {
562
592
  if (closed) return;
563
593
  emitSynthetic("disconnected");
564
594
  scheduleRetry();
@@ -639,7 +669,7 @@ function NatsProvider({
639
669
  const lifecycle = startConnectionLifecycle({
640
670
  conn,
641
671
  wsUrl,
642
- onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _27 => _27.current, 'optionalCall', _28 => _28()]),
672
+ onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _28 => _28.current, 'optionalCall', _29 => _29()]),
643
673
  backoff: reconnectionBackoffRef.current,
644
674
  getFreshUrl: () => getWsUrlRef.current(),
645
675
  onStatusChange: (newStatus) => {
@@ -691,12 +721,12 @@ function useNatsSubscription(subject, onMessage, options) {
691
721
  _react.useEffect.call(void 0, () => {
692
722
  handlerRef.current = onMessage;
693
723
  }, [onMessage]);
694
- const enabled = _optionalChain([options, 'optionalAccess', _29 => _29.enabled]) !== false;
695
- const queue = _optionalChain([options, 'optionalAccess', _30 => _30.queue]);
696
- const max = _optionalChain([options, 'optionalAccess', _31 => _31.max]);
697
- const reconnectionCount = _nullishCoalesce(_optionalChain([nats, 'optionalAccess', _32 => _32.reconnectionCount]), () => ( 0));
698
- const isReady = !!_optionalChain([nats, 'optionalAccess', _33 => _33.isReady]);
699
- const client = _nullishCoalesce(_optionalChain([nats, 'optionalAccess', _34 => _34.client]), () => ( null));
724
+ const enabled = _optionalChain([options, 'optionalAccess', _30 => _30.enabled]) !== false;
725
+ const queue = _optionalChain([options, 'optionalAccess', _31 => _31.queue]);
726
+ const max = _optionalChain([options, 'optionalAccess', _32 => _32.max]);
727
+ const reconnectionCount = _nullishCoalesce(_optionalChain([nats, 'optionalAccess', _33 => _33.reconnectionCount]), () => ( 0));
728
+ const isReady = !!_optionalChain([nats, 'optionalAccess', _34 => _34.isReady]);
729
+ const client = _nullishCoalesce(_optionalChain([nats, 'optionalAccess', _35 => _35.client]), () => ( null));
700
730
  const isSubscribed = Boolean(client) && isReady && Boolean(subject) && enabled;
701
731
  _react.useEffect.call(void 0, () => {
702
732
  if (!client || !isReady || !subject || !enabled) return void 0;
@@ -704,7 +734,7 @@ function useNatsSubscription(subject, onMessage, options) {
704
734
  return () => {
705
735
  try {
706
736
  sub.unsubscribe();
707
- } catch (e13) {
737
+ } catch (e14) {
708
738
  }
709
739
  };
710
740
  }, [client, isReady, subject, enabled, queue, max, reconnectionCount]);
@@ -722,7 +752,7 @@ function useNatsJsonSubscription(subject, onPayload, options) {
722
752
  try {
723
753
  const parsed = JSON.parse(decoder.decode(msg.data));
724
754
  await handlerRef.current(parsed, msg);
725
- } catch (e14) {
755
+ } catch (e15) {
726
756
  }
727
757
  },
728
758
  [decoder]