@flamingo-stack/openframe-frontend-core 0.0.749 → 0.0.751

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 (68) hide show
  1. package/dist/{chunk-45YRDD7W.cjs → chunk-4WNBVNGP.cjs} +13 -13
  2. package/dist/{chunk-SOPVUD2Y.cjs → chunk-53I4YHRT.cjs} +3 -3
  3. package/dist/{chunk-HOEVD6EN.cjs → chunk-5P7WBA2U.cjs} +4 -4
  4. package/dist/{chunk-KRAQEZPB.cjs → chunk-5WC535NJ.cjs} +17 -17
  5. package/dist/{chunk-SGL47BS2.cjs → chunk-77IKUBSH.cjs} +6 -6
  6. package/dist/{chunk-E3KFEOFA.cjs → chunk-CVBHB4OZ.cjs} +4 -4
  7. package/dist/{chunk-CXV7VBSI.cjs → chunk-ESRA7NUI.cjs} +41 -41
  8. package/dist/{chunk-2J2OBP4N.cjs → chunk-H52GKJ36.cjs} +9 -9
  9. package/dist/{chunk-G7SBHMRR.cjs → chunk-KHKPLOU4.cjs} +69 -39
  10. package/dist/{chunk-SECT4H34.cjs → chunk-LIGDPFDM.cjs} +227 -172
  11. package/dist/{chunk-LQT2ITMG.cjs → chunk-MJFTWHV6.cjs} +4 -4
  12. package/dist/{chunk-ZLF55RDR.cjs → chunk-MU7FFN6M.cjs} +34 -34
  13. package/dist/{chunk-OZLIKBKC.cjs → chunk-NOUROZYH.cjs} +13 -13
  14. package/dist/{chunk-GOFEOCQN.cjs → chunk-QOONZMSQ.cjs} +9 -9
  15. package/dist/{chunk-VEVIMDNK.cjs → chunk-RVLQHSID.cjs} +70 -70
  16. package/dist/{chunk-BN6NA5RM.cjs → chunk-SDOCZTST.cjs} +32 -32
  17. package/dist/{chunk-V3UJ6NDR.cjs → chunk-TPH4SRR2.cjs} +6 -6
  18. package/dist/{chunk-4FWURR3W.cjs → chunk-VUWPLQBY.cjs} +2 -2
  19. package/dist/{chunk-WZX26ODJ.cjs → chunk-X4LAMJHD.cjs} +54 -35
  20. package/dist/{cloud-tenants-2MYFHEYY.cjs → cloud-tenants-JDPC2DYF.cjs} +6 -6
  21. package/dist/components/case-studies/index.cjs +16 -16
  22. package/dist/components/chat/hooks/use-jetstream-dialog-subscription.d.ts +7 -5
  23. package/dist/components/chat/hooks/use-jetstream-dialog-subscription.d.ts.map +1 -1
  24. package/dist/components/chat/hooks/use-jetstream-dialog-subscription.js +33 -14
  25. package/dist/components/chat/index.cjs +4 -4
  26. package/dist/components/chat/types/api.types.d.ts +27 -8
  27. package/dist/components/chat/types/api.types.d.ts.map +1 -1
  28. package/dist/components/chat/types/network.types.d.ts +2 -1
  29. package/dist/components/chat/types/network.types.d.ts.map +1 -1
  30. package/dist/components/contact/index.cjs +7 -7
  31. package/dist/components/docs/index.cjs +10 -10
  32. package/dist/components/embeds/index.cjs +7 -7
  33. package/dist/components/faq/index.cjs +8 -8
  34. package/dist/components/features/auth/login-form.d.ts +34 -21
  35. package/dist/components/features/auth/login-form.d.ts.map +1 -1
  36. package/dist/components/features/auth/login-form.js +77 -39
  37. package/dist/components/features/auth/sso-providers.d.ts +7 -1
  38. package/dist/components/features/auth/sso-providers.d.ts.map +1 -1
  39. package/dist/components/features/auth/sso-providers.js +22 -4
  40. package/dist/components/features/index.cjs +6 -6
  41. package/dist/components/help-center-pages/index.cjs +67 -67
  42. package/dist/components/index.cjs +39 -39
  43. package/dist/components/meeting-scheduler/index.cjs +29 -29
  44. package/dist/components/navigation/index.cjs +9 -9
  45. package/dist/components/onboarding-guides/index.cjs +8 -8
  46. package/dist/components/product-demo/index.cjs +7 -7
  47. package/dist/components/tickets/index.cjs +11 -11
  48. package/dist/components/ui/index.cjs +6 -6
  49. package/dist/{devices-FVXAGKVX.cjs → devices-ADQWD37J.cjs} +7 -7
  50. package/dist/{embeddable-chat-SNYQSMS7.cjs → embeddable-chat-7YF2JMPS.cjs} +65 -65
  51. package/dist/hooks/index.cjs +3 -3
  52. package/dist/index.cjs +10 -10
  53. package/dist/{knowledge-ZL3ZHBSL.cjs → knowledge-TNS64EGK.cjs} +7 -7
  54. package/dist/{logs-KQCWDIOB.cjs → logs-754MDDE4.cjs} +14 -14
  55. package/dist/nats/index.cjs +2 -2
  56. package/dist/nats/nats.d.ts +33 -7
  57. package/dist/nats/nats.d.ts.map +1 -1
  58. package/dist/nats/nats.js +41 -11
  59. package/dist/{policies-ARDCZ3CT.cjs → policies-Q23DPIH6.cjs} +10 -10
  60. package/dist/{scripts-ZAMVWCY4.cjs → scripts-DCYLK2RZ.cjs} +11 -11
  61. package/dist/{software-update-6F7BIYS3.cjs → software-update-XCMGUIER.cjs} +9 -9
  62. package/package.json +1 -1
  63. package/src/components/chat/hooks/use-jetstream-dialog-subscription.ts +59 -23
  64. package/src/components/chat/types/api.types.ts +27 -8
  65. package/src/components/chat/types/network.types.ts +2 -1
  66. package/src/components/features/auth/login-form.tsx +121 -64
  67. package/src/components/features/auth/sso-providers.tsx +21 -0
  68. package/src/nats/nats.ts +91 -20
@@ -5,14 +5,14 @@ var _chunkDGEB5GUZcjs = require('./chunk-DGEB5GUZ.cjs');
5
5
 
6
6
 
7
7
 
8
- var _chunkGOFEOCQNcjs = require('./chunk-GOFEOCQN.cjs');
8
+ var _chunkQOONZMSQcjs = require('./chunk-QOONZMSQ.cjs');
9
9
 
10
10
 
11
11
  var _chunk34TWK3JEcjs = require('./chunk-34TWK3JE.cjs');
12
12
 
13
13
 
14
14
 
15
- var _chunk2J2OBP4Ncjs = require('./chunk-2J2OBP4N.cjs');
15
+ var _chunkH52GKJ36cjs = require('./chunk-H52GKJ36.cjs');
16
16
 
17
17
 
18
18
  var _chunkCLAJIQ7Ecjs = require('./chunk-CLAJIQ7E.cjs');
@@ -27,24 +27,24 @@ var _chunkCLAJIQ7Ecjs = require('./chunk-CLAJIQ7E.cjs');
27
27
 
28
28
 
29
29
 
30
- var _chunkSECT4H34cjs = require('./chunk-SECT4H34.cjs');
30
+ var _chunkLIGDPFDMcjs = require('./chunk-LIGDPFDM.cjs');
31
31
 
32
32
 
33
33
  var _chunkALPRQ3ZXcjs = require('./chunk-ALPRQ3ZX.cjs');
34
34
 
35
35
 
36
36
 
37
- var _chunk4FWURR3Wcjs = require('./chunk-4FWURR3W.cjs');
37
+ var _chunkVUWPLQBYcjs = require('./chunk-VUWPLQBY.cjs');
38
38
 
39
39
 
40
40
 
41
41
 
42
- var _chunkWZX26ODJcjs = require('./chunk-WZX26ODJ.cjs');
42
+ var _chunkX4LAMJHDcjs = require('./chunk-X4LAMJHD.cjs');
43
43
 
44
44
 
45
45
 
46
46
 
47
- var _chunkV3UJ6NDRcjs = require('./chunk-V3UJ6NDR.cjs');
47
+ var _chunkTPH4SRR2cjs = require('./chunk-TPH4SRR2.cjs');
48
48
 
49
49
 
50
50
  var _chunkEWCFJLNUcjs = require('./chunk-EWCFJLNU.cjs');
@@ -109,8 +109,8 @@ var _chunk3ATAYP36cjs = require('./chunk-3ATAYP36.cjs');
109
109
  // src/components/shared/product-release/product-releases-view.tsx
110
110
  var _jsxruntime = require('react/jsx-runtime');
111
111
  var DEFAULT_ENDPOINT = "/api/releases";
112
- var DEFAULT_SEARCH_PARAM_KEY = _chunkWZX26ODJcjs.DEV_SECTION_PARAM_KEYS.search;
113
- var DEFAULT_STATUS_PARAM_KEY = _chunkWZX26ODJcjs.DEV_SECTION_PARAM_KEYS.releaseStatus;
112
+ var DEFAULT_SEARCH_PARAM_KEY = _chunkX4LAMJHDcjs.DEV_SECTION_PARAM_KEYS.search;
113
+ var DEFAULT_STATUS_PARAM_KEY = _chunkX4LAMJHDcjs.DEV_SECTION_PARAM_KEYS.releaseStatus;
114
114
  var DEFAULT_PAGE_PARAM_KEY = "page";
115
115
  function ReleaseRow({
116
116
  release,
@@ -119,7 +119,7 @@ function ReleaseRow({
119
119
  }) {
120
120
  const runtime = _chunkUJ7AXHRZcjs.useChatRuntime.call(void 0, );
121
121
  const router = _chunk7DNL734Scjs.useRouter.call(void 0, );
122
- const cta = _chunkWZX26ODJcjs.resolveContentHref.call(void 0, _optionalChain([runtime, 'optionalAccess', _2 => _2.composeContentUrl]), {
122
+ const cta = _chunkX4LAMJHDcjs.resolveContentHref.call(void 0, _optionalChain([runtime, 'optionalAccess', _2 => _2.composeContentUrl]), {
123
123
  type: "product_release",
124
124
  slug: release.slug,
125
125
  basePath,
@@ -129,7 +129,7 @@ function ReleaseRow({
129
129
  const onClick = (e) => {
130
130
  if (e.defaultPrevented || _chunkOFO75R2Ocjs.isModifierClick.call(void 0, e) || target === "_blank") return;
131
131
  e.preventDefault();
132
- _chunkV3UJ6NDRcjs.executeNavigationImperative.call(void 0, {
132
+ _chunkTPH4SRR2cjs.executeNavigationImperative.call(void 0, {
133
133
  runtime,
134
134
  href: cta.href,
135
135
  targetPlatform: cta.targetPlatform,
@@ -191,10 +191,10 @@ function ProductReleasesView({
191
191
  router.replace(`${pathname}?${params.toString()}`, { scroll: false });
192
192
  };
193
193
  if (error) {
194
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunk3ATAYP36cjs.cn.call(void 0, "w-full", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSECT4H34cjs.LoadError, { message: "Failed to load releases.", onRetry: reload }) });
194
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunk3ATAYP36cjs.cn.call(void 0, "w-full", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLIGDPFDMcjs.LoadError, { message: "Failed to load releases.", onRetry: reload }) });
195
195
  }
196
196
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunk3ATAYP36cjs.cn.call(void 0, "flex w-full flex-col gap-[40px]", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-h-[600px]", children: showEmpty ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-[600px] items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
197
- _chunkGOFEOCQNcjs.ListEmptyState,
197
+ _chunkQOONZMSQcjs.ListEmptyState,
198
198
  {
199
199
  isFiltered: hasActiveFilters,
200
200
  filtered: {
@@ -289,7 +289,7 @@ function MediaGalleryStrip({ items, className }) {
289
289
  var _lucidereact = require('lucide-react');
290
290
 
291
291
 
292
- var DefaultMarkdownRenderer = _chunkSECT4H34cjs.RichMarkdownRenderer;
292
+ var DefaultMarkdownRenderer = _chunkLIGDPFDMcjs.RichMarkdownRenderer;
293
293
  var DEFAULT_ENDPOINT2 = "/api/releases";
294
294
  function ReleaseDetailPage({
295
295
  authorHref,
@@ -307,8 +307,8 @@ function ReleaseDetailPage({
307
307
  shell = true
308
308
  }) {
309
309
  const router = _chunk7DNL734Scjs.useRouter.call(void 0, );
310
- const captions = _chunkV3UJ6NDRcjs.useCaptions.call(void 0, );
311
- const renderShell = (node) => shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSECT4H34cjs.PageShell, { children: node }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "page-shell-content", children: node });
310
+ const captions = _chunkTPH4SRR2cjs.useCaptions.call(void 0, );
311
+ const renderShell = (node) => shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLIGDPFDMcjs.PageShell, { children: node }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "page-shell-content", children: node });
312
312
  const seed = initialData == null ? void 0 : initialData;
313
313
  const {
314
314
  data: release,
@@ -415,7 +415,7 @@ function ReleaseDetailPage({
415
415
  backButton: showBackButton ? { label: backLabel, onClick: () => router.push(backHref) } : void 0,
416
416
  children: [
417
417
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6 content-md:space-y-8", children: [
418
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSECT4H34cjs.EntityTagBadges, { tags: release.product_release_tags }),
418
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLIGDPFDMcjs.EntityTagBadges, { tags: release.product_release_tags }),
419
419
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid w-full grid-cols-1 overflow-hidden rounded-md border border-ods-border content-md:grid-cols-4", children: [
420
420
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-col gap-3 border-b border-ods-border bg-ods-card p-4 content-md:border-b-0 content-md:border-r", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-0", children: [
421
421
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-primary text-h4", children: releaseType.toLocaleUpperCase() }),
@@ -477,7 +477,7 @@ function ReleaseDetailPage({
477
477
  ] })
478
478
  ] }) }) }),
479
479
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
480
- _chunkSECT4H34cjs.ReleaseChangelogSection,
480
+ _chunkLIGDPFDMcjs.ReleaseChangelogSection,
481
481
  {
482
482
  title: "Breaking Changes",
483
483
  entries: breakingChanges || [],
@@ -488,7 +488,7 @@ function ReleaseDetailPage({
488
488
  }
489
489
  ),
490
490
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
491
- _chunkSECT4H34cjs.ReleaseChangelogSection,
491
+ _chunkLIGDPFDMcjs.ReleaseChangelogSection,
492
492
  {
493
493
  title: "Features Added",
494
494
  entries: featuresAdded || [],
@@ -498,7 +498,7 @@ function ReleaseDetailPage({
498
498
  }
499
499
  ),
500
500
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
501
- _chunkSECT4H34cjs.ReleaseChangelogSection,
501
+ _chunkLIGDPFDMcjs.ReleaseChangelogSection,
502
502
  {
503
503
  title: "Bugs Fixed",
504
504
  entries: bugFixed || [],
@@ -508,7 +508,7 @@ function ReleaseDetailPage({
508
508
  }
509
509
  ),
510
510
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
511
- _chunkSECT4H34cjs.ReleaseChangelogSection,
511
+ _chunkLIGDPFDMcjs.ReleaseChangelogSection,
512
512
  {
513
513
  title: "Improvements",
514
514
  entries: improvements || [],
@@ -534,7 +534,7 @@ function ReleaseDetailPage({
534
534
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "tracking-[-0.28px] text-ods-text-secondary text-h5", children: "Related Enhancements and Bug-fixes" }),
535
535
  (() => {
536
536
  const deliveryCount = deliveryData ? deliveryData.completed.length + deliveryData.inProgress.length : 0;
537
- return deliveryLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DeliverySection, { data: deliveryData, isLoading: deliveryLoading }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSECT4H34cjs.FadePreview, { hiddenCount: deliveryCount - 1, collapsedHeight: 300, resetKey: deliveryCount, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DeliverySection, { data: deliveryData, isLoading: false }) }) });
537
+ return deliveryLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DeliverySection, { data: deliveryData, isLoading: deliveryLoading }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLIGDPFDMcjs.FadePreview, { hiddenCount: deliveryCount - 1, collapsedHeight: 300, resetKey: deliveryCount, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DeliverySection, { data: deliveryData, isLoading: false }) }) });
538
538
  })()
539
539
  ] }),
540
540
  (_optionalChain([githubReleases, 'optionalAccess', _8 => _8.length]) || _optionalChain([knowledgeBaseLinks, 'optionalAccess', _9 => _9.length]) || migrationGuideUrl || documentationUrl) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "w-full space-y-1", children: [
@@ -627,10 +627,10 @@ function readStoredVotes(storageKey) {
627
627
  function useRoadmapVoting(options = {}) {
628
628
  const voteApiEndpoint = _nullishCoalesce(options.voteApiEndpoint, () => ( DEFAULT_VOTE_ENDPOINT));
629
629
  const storageKey = _nullishCoalesce(options.storageKey, () => ( DEFAULT_STORAGE_KEY));
630
- const { getSignals } = _chunk4FWURR3Wcjs.useHumanitySignals.call(void 0, );
630
+ const { getSignals } = _chunkVUWPLQBYcjs.useHumanitySignals.call(void 0, );
631
631
  const [votes, setVotes] = _react.useState.call(void 0, NO_VOTES);
632
632
  const [loadedKey, setLoadedKey] = _react.useState.call(void 0, null);
633
- const hydrated = _chunkV3UJ6NDRcjs.useIsHydrated.call(void 0, );
633
+ const hydrated = _chunkTPH4SRR2cjs.useIsHydrated.call(void 0, );
634
634
  if (hydrated && loadedKey !== storageKey) {
635
635
  setLoadedKey(storageKey);
636
636
  setVotes(readStoredVotes(storageKey));
@@ -782,7 +782,7 @@ function RoadmapGridSingle({
782
782
  _chunkOFO75R2Ocjs.RoadmapCard,
783
783
  {
784
784
  item,
785
- id: _chunkWZX26ODJcjs.devSectionAnchorId.call(void 0, "roadmap", item.id),
785
+ id: _chunkX4LAMJHDcjs.devSectionAnchorId.call(void 0, "roadmap", item.id),
786
786
  userVote: getVote(item.id),
787
787
  onVote: (voteType) => onVote(item.id, voteType),
788
788
  isVoting: votingTasks.has(item.id)
@@ -898,7 +898,7 @@ function RoadmapGrid({
898
898
  );
899
899
  }
900
900
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
901
- _chunkSECT4H34cjs.Accordion,
901
+ _chunkLIGDPFDMcjs.Accordion,
902
902
  {
903
903
  type: "multiple",
904
904
  value: expandedQuarters,
@@ -908,13 +908,13 @@ function RoadmapGrid({
908
908
  const itemCount = _optionalChain([itemsByQuarter, 'access', _18 => _18[quarter], 'optionalAccess', _19 => _19.length]) || 0;
909
909
  const isExpanded = expandedQuarters.includes(quarter);
910
910
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
911
- _chunkSECT4H34cjs.AccordionItem,
911
+ _chunkLIGDPFDMcjs.AccordionItem,
912
912
  {
913
913
  value: quarter,
914
914
  id: `quarter-${quarter.replace(/\s+/g, "-").toLowerCase()}`,
915
915
  className: "border-0",
916
916
  children: [
917
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSECT4H34cjs.AccordionTrigger, { className: "w-full p-0 hover:no-underline [&>svg]:ml-auto [&>svg]:h-5 [&>svg]:w-5 [&>svg]:shrink-0 [&>svg]:text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3", children: [
917
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLIGDPFDMcjs.AccordionTrigger, { className: "w-full p-0 hover:no-underline [&>svg]:ml-auto [&>svg]:h-5 [&>svg]:w-5 [&>svg]:shrink-0 [&>svg]:text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3", children: [
918
918
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
919
919
  "h3",
920
920
  {
@@ -944,7 +944,7 @@ function RoadmapGrid({
944
944
  }
945
945
  )
946
946
  ] }) }),
947
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSECT4H34cjs.AccordionContent, { className: "overflow-hidden pb-0 pt-4 data-[state=closed]:animate-none data-[state=open]:animate-none", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
947
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLIGDPFDMcjs.AccordionContent, { className: "overflow-hidden pb-0 pt-4 data-[state=closed]:animate-none data-[state=open]:animate-none", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
948
948
  RoadmapGridSingle,
949
949
  {
950
950
  items: itemsByQuarter[quarter],
@@ -982,8 +982,8 @@ function RoadmapGridSkeleton({ region = true, count = 4, showLeftMargin = true }
982
982
 
983
983
 
984
984
  var DEFAULT_ENDPOINT3 = "/api/roadmap";
985
- var DEFAULT_SEARCH_PARAM_KEY2 = _chunkWZX26ODJcjs.DEV_SECTION_PARAM_KEYS.search;
986
- var DEFAULT_STATUS_PARAM_KEY2 = _chunkWZX26ODJcjs.DEV_SECTION_PARAM_KEYS.status;
985
+ var DEFAULT_SEARCH_PARAM_KEY2 = _chunkX4LAMJHDcjs.DEV_SECTION_PARAM_KEYS.search;
986
+ var DEFAULT_STATUS_PARAM_KEY2 = _chunkX4LAMJHDcjs.DEV_SECTION_PARAM_KEYS.status;
987
987
  function RoadmapView({
988
988
  endpoint = DEFAULT_ENDPOINT3,
989
989
  initialItems,
@@ -1004,9 +1004,9 @@ function RoadmapView({
1004
1004
  const initialData = _react.useMemo.call(void 0, () => initialItems ? { items: initialItems } : void 0, [initialItems]);
1005
1005
  const { data, setData, isLoading, error, reload } = _chunkXJ3J4UIScjs.useSelfFetch.call(void 0, url, { initialData });
1006
1006
  const items = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _20 => _20.items]), () => ( []));
1007
- _chunk4FWURR3Wcjs.useScrollToHash.call(void 0, data, { headerOffset: _chunkCSJO7ZGNcjs.STICKY_HEADER_OFFSET_PX });
1007
+ _chunkVUWPLQBYcjs.useScrollToHash.call(void 0, data, { headerOffset: _chunkCSJO7ZGNcjs.STICKY_HEADER_OFFSET_PX });
1008
1008
  if (error) {
1009
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSECT4H34cjs.LoadError, { message: "Failed to load roadmap.", onRetry: reload });
1009
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLIGDPFDMcjs.LoadError, { message: "Failed to load roadmap.", onRetry: reload });
1010
1010
  }
1011
1011
  if (isLoading && !data) {
1012
1012
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RoadmapGridSkeleton, { showLeftMargin });
@@ -1059,7 +1059,7 @@ function DeliveryTable({ items, isLoading = false }) {
1059
1059
  // → `#delivery-<external_id>`; `useScrollToHash` in
1060
1060
  // `delivery-lists.tsx` finds the row by id and scrolls. The
1061
1061
  // outer wrapper here ONLY exists for the row separators.
1062
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border-b border-ods-border last:border-b-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGOFEOCQNcjs.DeliveryRow, { item, id: _chunkWZX26ODJcjs.devSectionAnchorId.call(void 0, "delivery", item.id) }) }, item.id)
1062
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border-b border-ods-border last:border-b-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQOONZMSQcjs.DeliveryRow, { item, id: _chunkX4LAMJHDcjs.devSectionAnchorId.call(void 0, "delivery", item.id) }) }, item.id)
1063
1063
  )) }) });
1064
1064
  }
1065
1065
 
@@ -1068,8 +1068,8 @@ function DeliveryTable({ items, isLoading = false }) {
1068
1068
 
1069
1069
  var DEFAULT_COMPLETED_ENDPOINT = "/api/delivery/completed";
1070
1070
  var DEFAULT_IN_PROGRESS_ENDPOINT = "/api/delivery/in-progress";
1071
- var DEFAULT_SEARCH_PARAM_KEY3 = _chunkWZX26ODJcjs.DEV_SECTION_PARAM_KEYS.search;
1072
- var DEFAULT_TASK_TYPE_PARAM_KEY = _chunkWZX26ODJcjs.DEV_SECTION_PARAM_KEYS.deliveryTaskType;
1071
+ var DEFAULT_SEARCH_PARAM_KEY3 = _chunkX4LAMJHDcjs.DEV_SECTION_PARAM_KEYS.search;
1072
+ var DEFAULT_TASK_TYPE_PARAM_KEY = _chunkX4LAMJHDcjs.DEV_SECTION_PARAM_KEYS.deliveryTaskType;
1073
1073
  function DeliveryLists({
1074
1074
  completedApiEndpoint = DEFAULT_COMPLETED_ENDPOINT,
1075
1075
  inProgressApiEndpoint = DEFAULT_IN_PROGRESS_ENDPOINT,
@@ -1130,17 +1130,17 @@ function DeliveryLists({
1130
1130
  }, [searchQuery, taskTypeFilter, completedApiEndpoint, inProgressApiEndpoint, searchParamKey, taskTypeParamKey]);
1131
1131
  const filteredCompleted = _optionalChain([data, 'optionalAccess', _21 => _21.completed]) || [];
1132
1132
  const filteredInProgress = _optionalChain([data, 'optionalAccess', _22 => _22.inProgress]) || [];
1133
- _chunk4FWURR3Wcjs.useScrollToHash.call(void 0, data, { headerOffset: _chunkCSJO7ZGNcjs.STICKY_HEADER_OFFSET_PX });
1133
+ _chunkVUWPLQBYcjs.useScrollToHash.call(void 0, data, { headerOffset: _chunkCSJO7ZGNcjs.STICKY_HEADER_OFFSET_PX });
1134
1134
  const showCompleted = true;
1135
1135
  const showInProgress = true;
1136
1136
  const hasActiveFilters = searchQuery !== "" || taskTypeFilter !== "all";
1137
1137
  const hasResults = showCompleted && filteredCompleted.length > 0 || showInProgress && filteredInProgress.length > 0;
1138
1138
  if (error) {
1139
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSECT4H34cjs.LoadError, { message: error, onRetry: () => window.location.reload() }) });
1139
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLIGDPFDMcjs.LoadError, { message: error, onRetry: () => window.location.reload() }) });
1140
1140
  }
1141
1141
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-[40px]", children: [
1142
1142
  !isLoading && !hasResults && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1143
- _chunkGOFEOCQNcjs.ListEmptyState,
1143
+ _chunkQOONZMSQcjs.ListEmptyState,
1144
1144
  {
1145
1145
  isFiltered: hasActiveFilters,
1146
1146
  filtered: {
@@ -1371,7 +1371,7 @@ function LegalDocumentPage({
1371
1371
  initialData = null,
1372
1372
  initialLastUpdatedLabel = null,
1373
1373
  apiEndpoint,
1374
- MarkdownRenderer = _chunkSECT4H34cjs.RichMarkdownRenderer,
1374
+ MarkdownRenderer = _chunkLIGDPFDMcjs.RichMarkdownRenderer,
1375
1375
  documentsEndpoint,
1376
1376
  backButton,
1377
1377
  faq,
@@ -1432,9 +1432,9 @@ function LegalDocumentPage({
1432
1432
  "for more information."
1433
1433
  ] })
1434
1434
  ] }) }) }) }) }),
1435
- faqSlot && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2J2OBP4Ncjs.FaqSection, { ..._chunk2J2OBP4Ncjs.pageFaqProps.call(void 0, faqSlot) })
1435
+ faqSlot && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH52GKJ36cjs.FaqSection, { ..._chunkH52GKJ36cjs.pageFaqProps.call(void 0, faqSlot) })
1436
1436
  ] });
1437
- return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSECT4H34cjs.PageShell, { children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "page-shell-content", children: inner });
1437
+ return shell ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLIGDPFDMcjs.PageShell, { children: inner }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "page-shell-content", children: inner });
1438
1438
  }
1439
1439
 
1440
1440
 
@@ -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 _chunkX4LAMJHDcjs = require('./chunk-X4LAMJHD.cjs');
9
9
 
10
10
 
11
11
 
12
12
 
13
- var _chunkV3UJ6NDRcjs = require('./chunk-V3UJ6NDR.cjs');
13
+ var _chunkTPH4SRR2cjs = require('./chunk-TPH4SRR2.cjs');
14
14
 
15
15
 
16
16
 
@@ -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: _chunkTPH4SRR2cjs.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 _chunkX4LAMJHDcjs.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
+ _chunkX4LAMJHDcjs.AssistantAskPrompts,
127
127
  {
128
128
  variant: "card",
129
129
  topic,
@@ -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: _chunkTPH4SRR2cjs.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(_chunkTPH4SRR2cjs.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);
@@ -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]