@carlonicora/nextjs-jsonapi 4.2.2 → 5.0.0

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 (42) hide show
  1. package/dist/{BlockNoteEditor-FROUKBVK.mjs → BlockNoteEditor-7BKKGFH3.mjs} +2 -2
  2. package/dist/{BlockNoteEditor-SWO3X5CC.js → BlockNoteEditor-E6HJD4HB.js} +9 -9
  3. package/dist/{BlockNoteEditor-SWO3X5CC.js.map → BlockNoteEditor-E6HJD4HB.js.map} +1 -1
  4. package/dist/billing/index.js +371 -371
  5. package/dist/billing/index.mjs +1 -1
  6. package/dist/{chunk-AICMLKWN.mjs → chunk-MELHUPVN.mjs} +34 -13
  7. package/dist/chunk-MELHUPVN.mjs.map +1 -0
  8. package/dist/{chunk-GYW7LLBQ.js → chunk-TPGXNPGY.js} +208 -187
  9. package/dist/chunk-TPGXNPGY.js.map +1 -0
  10. package/dist/client/index.js +2 -2
  11. package/dist/client/index.mjs +1 -1
  12. package/dist/components/index.js +2 -2
  13. package/dist/components/index.mjs +1 -1
  14. package/dist/contexts/index.js +2 -2
  15. package/dist/contexts/index.mjs +1 -1
  16. package/dist/features/analytics/index.js +88 -88
  17. package/dist/features/analytics/index.mjs +1 -1
  18. package/dist/features/help/index.js +31 -31
  19. package/dist/features/help/index.mjs +1 -1
  20. package/dist/features/tokenusage/index.js +75 -75
  21. package/dist/features/tokenusage/index.mjs +1 -1
  22. package/dist/next-config/index.d.mts +0 -1
  23. package/dist/next-config/index.d.ts +0 -1
  24. package/dist/next-config/index.js +0 -6
  25. package/dist/next-config/index.js.map +1 -1
  26. package/dist/next-config/index.mjs +0 -6
  27. package/dist/next-config/index.mjs.map +1 -1
  28. package/package.json +4 -2
  29. package/pwa/offline.template.html +138 -0
  30. package/pwa/sw.js +175 -0
  31. package/src/components/tables/ContentListTable.tsx +6 -0
  32. package/src/features/notification/components/notifications/PushNotificationProvider.tsx +5 -1
  33. package/src/features/notification/components/notifications/__tests__/PushNotificationProvider.spec.tsx +51 -0
  34. package/src/hooks/__tests__/usePushNotifications.spec.tsx +87 -34
  35. package/src/hooks/usePushNotifications.ts +42 -18
  36. package/src/next-config/__tests__/createNextConfig.spec.ts +7 -5
  37. package/src/next-config/index.ts +1 -8
  38. package/src/pwa/__tests__/offline.template.spec.ts +246 -0
  39. package/src/pwa/__tests__/sw.spec.ts +309 -0
  40. package/dist/chunk-AICMLKWN.mjs.map +0 -1
  41. package/dist/chunk-GYW7LLBQ.js.map +0 -1
  42. /package/dist/{BlockNoteEditor-FROUKBVK.mjs.map → BlockNoteEditor-7BKKGFH3.mjs.map} +0 -0
@@ -12,7 +12,6 @@
12
12
 
13
13
 
14
14
 
15
-
16
15
  var _chunkGPXYQMOZjs = require('./chunk-GPXYQMOZ.js');
17
16
 
18
17
 
@@ -10684,7 +10683,7 @@ FileInput.displayName = "FileInput";
10684
10683
  var _dynamic = require('next/dynamic'); var _dynamic2 = _interopRequireDefault(_dynamic);
10685
10684
 
10686
10685
 
10687
- var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-SWO3X5CC.js"))), {
10686
+ var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-E6HJD4HB.js"))), {
10688
10687
  ssr: false
10689
10688
  });
10690
10689
  var BlockNoteEditorContainer = React2.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function EditorContainer(props) {
@@ -15185,16 +15184,16 @@ function urlBase64ToUint8Array(base64String) {
15185
15184
  return outputArray;
15186
15185
  }
15187
15186
  _chunk7QVYU63Ejs.__name.call(void 0, urlBase64ToUint8Array, "urlBase64ToUint8Array");
15188
- function usePushNotifications() {
15189
- const { currentUser, hasRole } = useCurrentUserContext();
15187
+ function usePushNotifications(params) {
15188
+ const { currentUser, canSubscribe } = params;
15189
+ const userId = _optionalChain([currentUser, 'optionalAccess', _459 => _459.id]);
15190
15190
  _react.useEffect.call(void 0, () => {
15191
+ if (!userId || !canSubscribe) return;
15191
15192
  const register = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
15192
15193
  if ("serviceWorker" in navigator && "PushManager" in window) {
15193
15194
  try {
15194
- const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess', _459 => _459.id])}`;
15195
- const lastRegisteredSubscription = sessionStorage.getItem(sessionKey);
15196
- const swUrl = _chunkGHE4VT2Rjs.ENV.IS_PRODUCTION ? `${_chunkGPXYQMOZjs.getAppUrl.call(void 0, )}/sw.js` : `${_chunkGPXYQMOZjs.getAppUrl.call(void 0, )}/sw-dev.js`;
15197
- const registration = await navigator.serviceWorker.register(swUrl);
15195
+ const sessionKey = `push_registered_${userId}`;
15196
+ const registration = await navigator.serviceWorker.register("/sw.js", { updateViaCache: "none" });
15198
15197
  let permission = Notification.permission;
15199
15198
  if (permission === "default") {
15200
15199
  permission = await Notification.requestPermission();
@@ -15221,7 +15220,7 @@ function usePushNotifications() {
15221
15220
  keys: subscription.toJSON().keys
15222
15221
  };
15223
15222
  const subscriptionHash = btoa(JSON.stringify(plainSubscription));
15224
- if (lastRegisteredSubscription !== subscriptionHash) {
15223
+ if (sessionStorage.getItem(sessionKey) !== subscriptionHash) {
15225
15224
  await _chunk4ORLPEK7js.PushService.register({ data: plainSubscription });
15226
15225
  sessionStorage.setItem(sessionKey, subscriptionHash);
15227
15226
  }
@@ -15230,8 +15229,23 @@ function usePushNotifications() {
15230
15229
  }
15231
15230
  }
15232
15231
  }, "register");
15233
- if (currentUser && !hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)) register();
15234
- }, [currentUser]);
15232
+ register();
15233
+ }, [userId, canSubscribe]);
15234
+ _react.useEffect.call(void 0, () => {
15235
+ if (!userId || !canSubscribe) return;
15236
+ if (!("serviceWorker" in navigator)) return;
15237
+ const sessionKey = `push_registered_${userId}`;
15238
+ const onMessage = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (event) => {
15239
+ if (_optionalChain([event, 'access', _460 => _460.data, 'optionalAccess', _461 => _461.type]) !== "PUSH_RESUBSCRIBED" || !event.data.subscription) return;
15240
+ const subscription = event.data.subscription;
15241
+ const subscriptionHash = btoa(JSON.stringify(subscription));
15242
+ if (sessionStorage.getItem(sessionKey) === subscriptionHash) return;
15243
+ void _chunk4ORLPEK7js.PushService.register({ data: subscription }).then(() => sessionStorage.setItem(sessionKey, subscriptionHash)).catch((error) => console.error("Error re-registering rotated push subscription:", error));
15244
+ }, "onMessage");
15245
+ const container = navigator.serviceWorker;
15246
+ container.addEventListener("message", onMessage);
15247
+ return () => container.removeEventListener("message", onMessage);
15248
+ }, [userId, canSubscribe]);
15235
15249
  }
15236
15250
  _chunk7QVYU63Ejs.__name.call(void 0, usePushNotifications, "usePushNotifications");
15237
15251
 
@@ -15304,14 +15318,14 @@ function useSocket({ token }) {
15304
15318
  });
15305
15319
  }, "handleMessage");
15306
15320
  const handleNotification = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
15307
- const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _460 => _460.data]), () => ( _optionalChain([data, 'optionalAccess', _461 => _461.jsonApi])));
15308
- if (!_optionalChain([resource, 'optionalAccess', _462 => _462.type])) {
15321
+ const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _462 => _462.data]), () => ( _optionalChain([data, 'optionalAccess', _463 => _463.jsonApi])));
15322
+ if (!_optionalChain([resource, 'optionalAccess', _464 => _464.type])) {
15309
15323
  console.warn("[useSocket] ignoring notification with unexpected payload shape", data);
15310
15324
  return;
15311
15325
  }
15312
15326
  const notification = _chunk4ORLPEK7js.rehydrate.call(void 0, _chunk4ORLPEK7js.Modules.Notification, {
15313
15327
  jsonApi: resource,
15314
- included: _optionalChain([data, 'optionalAccess', _463 => _463.included]) || []
15328
+ included: _optionalChain([data, 'optionalAccess', _465 => _465.included]) || []
15315
15329
  });
15316
15330
  if (notification) {
15317
15331
  setSocketNotifications((prev) => {
@@ -15435,11 +15449,11 @@ function BreadcrumbMobile({
15435
15449
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Breadcrumb, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreadcrumbList, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreadcrumbItem, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generateUrl({ page: `/` }), children: rootLabel }) }) }) });
15436
15450
  }
15437
15451
  if (allItems.length <= 1) {
15438
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground block min-w-0 truncate px-1.5 text-xs/relaxed font-normal", children: _optionalChain([lastItem, 'optionalAccess', _464 => _464.name]) });
15452
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground block min-w-0 truncate px-1.5 text-xs/relaxed font-normal", children: _optionalChain([lastItem, 'optionalAccess', _466 => _466.name]) });
15439
15453
  }
15440
15454
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenu, { open, onOpenChange: setOpen, children: [
15441
15455
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenuTrigger, { className: "text-foreground text-xs/relaxed font-normal hover:bg-accent flex min-h-9 min-w-0 items-center gap-1 rounded-md px-1.5 py-0.5 transition-colors outline-none", children: [
15442
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate", children: _optionalChain([lastItem, 'optionalAccess', _465 => _465.name]) }),
15456
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate", children: _optionalChain([lastItem, 'optionalAccess', _467 => _467.name]) }),
15443
15457
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "text-muted-foreground size-3.5 shrink-0" })
15444
15458
  ] }),
15445
15459
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuContent, { align: "start", children: allItems.map(
@@ -15457,8 +15471,8 @@ function BreadcrumbMobile({
15457
15471
  href: item.href,
15458
15472
  className: _chunk4ORLPEK7js.cn.call(void 0, props.className, "text-foreground font-normal"),
15459
15473
  onClick: (event) => {
15460
- _optionalChain([props, 'access', _466 => _466.onClick, 'optionalCall', _467 => _467(event)]);
15461
- _optionalChain([item, 'access', _468 => _468.onClick, 'optionalCall', _469 => _469()]);
15474
+ _optionalChain([props, 'access', _468 => _468.onClick, 'optionalCall', _469 => _469(event)]);
15475
+ _optionalChain([item, 'access', _470 => _470.onClick, 'optionalCall', _471 => _471()]);
15462
15476
  },
15463
15477
  children: props.children
15464
15478
  }
@@ -15476,7 +15490,7 @@ function BreadcrumbNavigation({ items, rootLabel, showRoot = true }) {
15476
15490
  const generateUrl = usePageUrlGenerator();
15477
15491
  const t = _nextintl.useTranslations.call(void 0, );
15478
15492
  const isMobile = _chunk4ORLPEK7js.useIsMobile.call(void 0, );
15479
- const root = _optionalChain([rootLabel, 'optionalAccess', _470 => _470.trim, 'call', _471 => _471()]) ? rootLabel : t(`common.home`);
15493
+ const root = _optionalChain([rootLabel, 'optionalAccess', _472 => _472.trim, 'call', _473 => _473()]) ? rootLabel : t(`common.home`);
15480
15494
  if (isMobile) {
15481
15495
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreadcrumbMobile, { items, generateUrl, rootLabel: root, showRoot });
15482
15496
  }
@@ -15874,12 +15888,12 @@ var _remarkgfm = require('remark-gfm'); var _remarkgfm2 = _interopRequireDefault
15874
15888
 
15875
15889
  function mermaidSourceOf(node) {
15876
15890
  const pre = node;
15877
- const code = _optionalChain([pre, 'optionalAccess', _472 => _472.children, 'optionalAccess', _473 => _473[0]]);
15878
- if (_optionalChain([code, 'optionalAccess', _474 => _474.tagName]) !== "code") return void 0;
15879
- const classNames = Array.isArray(_optionalChain([code, 'access', _475 => _475.properties, 'optionalAccess', _476 => _476.className])) ? code.properties.className : [];
15891
+ const code = _optionalChain([pre, 'optionalAccess', _474 => _474.children, 'optionalAccess', _475 => _475[0]]);
15892
+ if (_optionalChain([code, 'optionalAccess', _476 => _476.tagName]) !== "code") return void 0;
15893
+ const classNames = Array.isArray(_optionalChain([code, 'access', _477 => _477.properties, 'optionalAccess', _478 => _478.className])) ? code.properties.className : [];
15880
15894
  if (!classNames.includes("language-mermaid")) return void 0;
15881
- const text = _optionalChain([code, 'access', _477 => _477.children, 'optionalAccess', _478 => _478[0]]);
15882
- if (_optionalChain([text, 'optionalAccess', _479 => _479.type]) !== "text" || typeof text.value !== "string") return void 0;
15895
+ const text = _optionalChain([code, 'access', _479 => _479.children, 'optionalAccess', _480 => _480[0]]);
15896
+ if (_optionalChain([text, 'optionalAccess', _481 => _481.type]) !== "text" || typeof text.value !== "string") return void 0;
15883
15897
  return text.value;
15884
15898
  }
15885
15899
  _chunk7QVYU63Ejs.__name.call(void 0, mermaidSourceOf, "mermaidSourceOf");
@@ -16136,7 +16150,7 @@ var railTriggerClass = _chunk4ORLPEK7js.cn.call(void 0,
16136
16150
  "data-active:text-primary dark:data-active:text-primary",
16137
16151
  "data-active:font-medium data-active:shadow-none"
16138
16152
  );
16139
- var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access', _480 => _480.key, 'optionalAccess', _481 => _481.name]))), () => ( tab.label)), "tabValue");
16153
+ var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access', _482 => _482.key, 'optionalAccess', _483 => _483.name]))), () => ( tab.label)), "tabValue");
16140
16154
  function RoundPageContainer({
16141
16155
  module,
16142
16156
  id,
@@ -16168,7 +16182,7 @@ function RoundPageContainer({
16168
16182
  const [mounted, setMounted] = _react.useState.call(void 0, false);
16169
16183
  _react.useEffect.call(void 0, () => {
16170
16184
  const match = document.cookie.split("; ").find((row) => row.startsWith(`${detailsCookieName}=`));
16171
- const stored = _optionalChain([match, 'optionalAccess', _482 => _482.split, 'call', _483 => _483("="), 'access', _484 => _484[1]]);
16185
+ const stored = _optionalChain([match, 'optionalAccess', _484 => _484.split, 'call', _485 => _485("="), 'access', _486 => _486[1]]);
16172
16186
  if (stored === "true") setShowDetailsState(true);
16173
16187
  else if (stored === "false") setShowDetailsState(false);
16174
16188
  }, []);
@@ -16183,7 +16197,7 @@ function RoundPageContainer({
16183
16197
  const clip = isFixed ? `overflow-hidden` : ``;
16184
16198
  const scrollY = isFixed ? `overflow-y-auto` : ``;
16185
16199
  const mobileBarClass = isFixed ? `` : `sticky bottom-0 z-30`;
16186
- const detailsCookieName = _optionalChain([module, 'optionalAccess', _485 => _485.name]) ? `${DETAILS_COOKIE_NAME}_${module.name}` : DETAILS_COOKIE_NAME;
16200
+ const detailsCookieName = _optionalChain([module, 'optionalAccess', _487 => _487.name]) ? `${DETAILS_COOKIE_NAME}_${module.name}` : DETAILS_COOKIE_NAME;
16187
16201
  const setShowDetails = _react.useCallback.call(void 0,
16188
16202
  (value) => {
16189
16203
  setShowDetailsState(value);
@@ -16216,13 +16230,13 @@ function RoundPageContainer({
16216
16230
  } else {
16217
16231
  rewriteUrl({ page: window.location.pathname, additionalParameters: { section: key }, mode: "push" });
16218
16232
  }
16219
- _optionalChain([onSectionChange, 'optionalCall', _486 => _486(key)]);
16233
+ _optionalChain([onSectionChange, 'optionalCall', _488 => _488(key)]);
16220
16234
  },
16221
16235
  [module, id, rewriteUrl, onSectionChange]
16222
16236
  );
16223
- const activeTabDefinition = _optionalChain([tabs, 'optionalAccess', _487 => _487.find, 'call', _488 => _488((t2) => tabValue(t2) === activeTab)]);
16224
- const activeFillHeight = _optionalChain([activeTabDefinition, 'optionalAccess', _489 => _489.fillHeight]) === true;
16225
- const activeConstrainWidth = _optionalChain([activeTabDefinition, 'optionalAccess', _490 => _490.constrainWidth]) === true;
16237
+ const activeTabDefinition = _optionalChain([tabs, 'optionalAccess', _489 => _489.find, 'call', _490 => _490((t2) => tabValue(t2) === activeTab)]);
16238
+ const activeFillHeight = _optionalChain([activeTabDefinition, 'optionalAccess', _491 => _491.fillHeight]) === true;
16239
+ const activeConstrainWidth = _optionalChain([activeTabDefinition, 'optionalAccess', _492 => _492.constrainWidth]) === true;
16226
16240
  const { ungrouped, groups } = _react.useMemo.call(void 0, () => partitionTabs(_nullishCoalesce(tabs, () => ( []))), [tabs]);
16227
16241
  const tabItems = _react.useMemo.call(void 0,
16228
16242
  () => Object.fromEntries((_nullishCoalesce(tabs, () => ( []))).map((tab) => [tabValue(tab), _nullishCoalesce(tab.contentLabel, () => ( tab.label))])),
@@ -16233,7 +16247,7 @@ function RoundPageContainer({
16233
16247
  const mobileFlow = isMobile && isFixed && (!activeFillHeight || activeDocumentTab) && !fullWidth;
16234
16248
  const innerClip = mobileFlow ? `` : clip;
16235
16249
  const innerScrollY = mobileFlow ? `` : scrollY;
16236
- const showMobileSectionPicker = (_nullishCoalesce(_optionalChain([tabs, 'optionalAccess', _491 => _491.length]), () => ( 0))) > 1;
16250
+ const showMobileSectionPicker = (_nullishCoalesce(_optionalChain([tabs, 'optionalAccess', _493 => _493.length]), () => ( 0))) > 1;
16237
16251
  if (!isReady) {
16238
16252
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
16239
16253
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -16633,14 +16647,14 @@ function BlockNoteEditorMentionHoverCard({
16633
16647
  const entityType = target.dataset.mentionType;
16634
16648
  const alias = target.dataset.mentionAlias;
16635
16649
  setHovered((prev) => {
16636
- if (_optionalChain([prev, 'optionalAccess', _492 => _492.id]) === id && _optionalChain([prev, 'optionalAccess', _493 => _493.element]) === target) return prev;
16650
+ if (_optionalChain([prev, 'optionalAccess', _494 => _494.id]) === id && _optionalChain([prev, 'optionalAccess', _495 => _495.element]) === target) return prev;
16637
16651
  return { id, entityType, alias, element: target };
16638
16652
  });
16639
16653
  }, "handleMouseOver");
16640
16654
  const handleMouseOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
16641
16655
  const target = e.target.closest("[data-mention-id]");
16642
16656
  if (!target) return;
16643
- const related = _optionalChain([e, 'access', _494 => _494.relatedTarget, 'optionalAccess', _495 => _495.closest, 'call', _496 => _496("[data-mention-id]")]);
16657
+ const related = _optionalChain([e, 'access', _496 => _496.relatedTarget, 'optionalAccess', _497 => _497.closest, 'call', _498 => _498("[data-mention-id]")]);
16644
16658
  if (related) return;
16645
16659
  scheduleClose();
16646
16660
  }, "handleMouseOut");
@@ -16654,7 +16668,7 @@ function BlockNoteEditorMentionHoverCard({
16654
16668
  }, [containerRef, mentionResolveFn, cancelClose, scheduleClose]);
16655
16669
  if (!hovered || !mentionResolveFn) return null;
16656
16670
  const resolved = mentionResolveFn(hovered.id, hovered.entityType, hovered.alias);
16657
- if (!_optionalChain([resolved, 'optionalAccess', _497 => _497.HoverContent])) return null;
16671
+ if (!_optionalChain([resolved, 'optionalAccess', _499 => _499.HoverContent])) return null;
16658
16672
  const ContentComponent = resolved.HoverContent;
16659
16673
  const rect = hovered.element.getBoundingClientRect();
16660
16674
  return _reactdom.createPortal.call(void 0,
@@ -16698,28 +16712,28 @@ var parseMentionElement = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
16698
16712
  }, "parseMentionElement");
16699
16713
  var createMentionInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (resolveFn, disableMention, nameResolver) => {
16700
16714
  const MentionExternalHTML = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
16701
- const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _498 => _498(props.id, props.entityType, props.alias)]), () => ( props.alias));
16715
+ const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _500 => _500(props.id, props.entityType, props.alias)]), () => ( props.alias));
16702
16716
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { "data-mention-id": props.id, "data-mention-type": props.entityType, "data-mention-alias": props.alias, children: [
16703
16717
  "@",
16704
16718
  displayName
16705
16719
  ] });
16706
16720
  }, "MentionExternalHTML");
16707
16721
  const Mention = React2.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function Mention2(props) {
16708
- const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _499 => _499(props.id, props.entityType, props.alias)]), () => ( props.alias));
16722
+ const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _501 => _501(props.id, props.entityType, props.alias)]), () => ( props.alias));
16709
16723
  if (disableMention) {
16710
- const resolved2 = _optionalChain([resolveFn, 'optionalCall', _500 => _500(props.id, props.entityType, displayName)]);
16711
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _501 => _501.url]), () => ( "#")), className: "text-primary", children: [
16724
+ const resolved2 = _optionalChain([resolveFn, 'optionalCall', _502 => _502(props.id, props.entityType, displayName)]);
16725
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _503 => _503.url]), () => ( "#")), className: "text-primary", children: [
16712
16726
  "@",
16713
16727
  displayName
16714
16728
  ] });
16715
16729
  }
16716
- const resolved = _optionalChain([resolveFn, 'optionalCall', _502 => _502(props.id, props.entityType, displayName)]);
16717
- if (_optionalChain([resolved, 'optionalAccess', _503 => _503.Inline])) {
16730
+ const resolved = _optionalChain([resolveFn, 'optionalCall', _504 => _504(props.id, props.entityType, displayName)]);
16731
+ if (_optionalChain([resolved, 'optionalAccess', _505 => _505.Inline])) {
16718
16732
  const Custom = resolved.Inline;
16719
16733
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Custom, { ...props, alias: displayName });
16720
16734
  }
16721
- const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _504 => _504.url]), () => ( "#"));
16722
- const handleClick = _optionalChain([resolved, 'optionalAccess', _505 => _505.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
16735
+ const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _506 => _506.url]), () => ( "#"));
16736
+ const handleClick = _optionalChain([resolved, 'optionalAccess', _507 => _507.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
16723
16737
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
16724
16738
  _link2.default,
16725
16739
  {
@@ -16827,7 +16841,7 @@ function BlockNoteEditorMentionSuggestionMenu({
16827
16841
  if (!suggestionMenuComponent) return void 0;
16828
16842
  const Component2 = suggestionMenuComponent;
16829
16843
  const Wrapped = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
16830
- const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _506 => _506.items, 'access', _507 => _507[0], 'optionalAccess', _508 => _508.title]) === KEEP_OPEN_SENTINEL_TITLE;
16844
+ const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _508 => _508.items, 'access', _509 => _509[0], 'optionalAccess', _510 => _510.title]) === KEEP_OPEN_SENTINEL_TITLE;
16831
16845
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16832
16846
  Component2,
16833
16847
  {
@@ -16836,7 +16850,7 @@ function BlockNoteEditorMentionSuggestionMenu({
16836
16850
  selectedIndex: isSentinelOnly ? void 0 : props.selectedIndex,
16837
16851
  onItemClick: (item) => {
16838
16852
  if (item.title === KEEP_OPEN_SENTINEL_TITLE) return;
16839
- _optionalChain([props, 'access', _509 => _509.onItemClick, 'optionalCall', _510 => _510(item)]);
16853
+ _optionalChain([props, 'access', _511 => _511.onItemClick, 'optionalCall', _512 => _512(item)]);
16840
16854
  }
16841
16855
  }
16842
16856
  );
@@ -17050,10 +17064,10 @@ var cellId = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
17050
17064
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => params.toggleId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
17051
17065
  SelectRowCheckbox,
17052
17066
  {
17053
- checked: _optionalChain([params, 'access', _511 => _511.checkedIds, 'optionalAccess', _512 => _512.includes, 'call', _513 => _513(row.getValue(params.name))]) || false,
17067
+ checked: _optionalChain([params, 'access', _513 => _513.checkedIds, 'optionalAccess', _514 => _514.includes, 'call', _515 => _515(row.getValue(params.name))]) || false,
17054
17068
  onCheckedChange: (value) => {
17055
17069
  row.toggleSelected(!!value);
17056
- _optionalChain([params, 'access', _514 => _514.toggleId, 'optionalCall', _515 => _515(row.getValue(params.name))]);
17070
+ _optionalChain([params, 'access', _516 => _516.toggleId, 'optionalCall', _517 => _517(row.getValue(params.name))]);
17057
17071
  }
17058
17072
  }
17059
17073
  ) : null, "cell"),
@@ -17111,7 +17125,7 @@ function useJsonApiGet(params) {
17111
17125
  const [response, setResponse] = _react.useState.call(void 0, null);
17112
17126
  const isMounted = _react.useRef.call(void 0, true);
17113
17127
  const fetchData = _react.useCallback.call(void 0, async () => {
17114
- if (_optionalChain([params, 'access', _516 => _516.options, 'optionalAccess', _517 => _517.enabled]) === false) return;
17128
+ if (_optionalChain([params, 'access', _518 => _518.options, 'optionalAccess', _519 => _519.enabled]) === false) return;
17115
17129
  setLoading(true);
17116
17130
  setError(null);
17117
17131
  try {
@@ -17138,9 +17152,9 @@ function useJsonApiGet(params) {
17138
17152
  setLoading(false);
17139
17153
  }
17140
17154
  }
17141
- }, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _518 => _518.options, 'optionalAccess', _519 => _519.enabled])]);
17155
+ }, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _520 => _520.options, 'optionalAccess', _521 => _521.enabled])]);
17142
17156
  const fetchNextPage = _react.useCallback.call(void 0, async () => {
17143
- if (!_optionalChain([response, 'optionalAccess', _520 => _520.nextPage])) return;
17157
+ if (!_optionalChain([response, 'optionalAccess', _522 => _522.nextPage])) return;
17144
17158
  setLoading(true);
17145
17159
  try {
17146
17160
  const nextResponse = await response.nextPage();
@@ -17161,7 +17175,7 @@ function useJsonApiGet(params) {
17161
17175
  }
17162
17176
  }, [response]);
17163
17177
  const fetchPreviousPage = _react.useCallback.call(void 0, async () => {
17164
- if (!_optionalChain([response, 'optionalAccess', _521 => _521.prevPage])) return;
17178
+ if (!_optionalChain([response, 'optionalAccess', _523 => _523.prevPage])) return;
17165
17179
  setLoading(true);
17166
17180
  try {
17167
17181
  const prevResponse = await response.prevPage();
@@ -17187,15 +17201,15 @@ function useJsonApiGet(params) {
17187
17201
  return () => {
17188
17202
  isMounted.current = false;
17189
17203
  };
17190
- }, [fetchData, ..._optionalChain([params, 'access', _522 => _522.options, 'optionalAccess', _523 => _523.deps]) || []]);
17204
+ }, [fetchData, ..._optionalChain([params, 'access', _524 => _524.options, 'optionalAccess', _525 => _525.deps]) || []]);
17191
17205
  return {
17192
17206
  data,
17193
17207
  loading,
17194
17208
  error,
17195
17209
  response,
17196
17210
  refetch: fetchData,
17197
- hasNextPage: !!_optionalChain([response, 'optionalAccess', _524 => _524.next]),
17198
- hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _525 => _525.prev]),
17211
+ hasNextPage: !!_optionalChain([response, 'optionalAccess', _526 => _526.next]),
17212
+ hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _527 => _527.prev]),
17199
17213
  fetchNextPage,
17200
17214
  fetchPreviousPage
17201
17215
  };
@@ -17273,17 +17287,17 @@ function useJsonApiMutation(config) {
17273
17287
  if (apiResponse.ok) {
17274
17288
  const resultData = apiResponse.data;
17275
17289
  setData(resultData);
17276
- _optionalChain([config, 'access', _526 => _526.onSuccess, 'optionalCall', _527 => _527(resultData)]);
17290
+ _optionalChain([config, 'access', _528 => _528.onSuccess, 'optionalCall', _529 => _529(resultData)]);
17277
17291
  return resultData;
17278
17292
  } else {
17279
17293
  setError(apiResponse.error);
17280
- _optionalChain([config, 'access', _528 => _528.onError, 'optionalCall', _529 => _529(apiResponse.error)]);
17294
+ _optionalChain([config, 'access', _530 => _530.onError, 'optionalCall', _531 => _531(apiResponse.error)]);
17281
17295
  return null;
17282
17296
  }
17283
17297
  } catch (err) {
17284
17298
  const errorMessage = err instanceof Error ? err.message : "Unknown error";
17285
17299
  setError(errorMessage);
17286
- _optionalChain([config, 'access', _530 => _530.onError, 'optionalCall', _531 => _531(errorMessage)]);
17300
+ _optionalChain([config, 'access', _532 => _532.onError, 'optionalCall', _533 => _533(errorMessage)]);
17287
17301
  return null;
17288
17302
  } finally {
17289
17303
  setLoading(false);
@@ -17356,7 +17370,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
17356
17370
  {
17357
17371
  href: hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator) ? generateUrl({
17358
17372
  page: "/administration",
17359
- id: _optionalChain([_chunk4ORLPEK7js.Modules, 'access', _532 => _532.Company, 'access', _533 => _533.pageUrl, 'optionalAccess', _534 => _534.substring, 'call', _535 => _535(1)]),
17373
+ id: _optionalChain([_chunk4ORLPEK7js.Modules, 'access', _534 => _534.Company, 'access', _535 => _535.pageUrl, 'optionalAccess', _536 => _536.substring, 'call', _537 => _537(1)]),
17360
17374
  childPage: company.id
17361
17375
  }) : generateUrl({ page: _chunk4ORLPEK7js.Modules.Company, id: company.id }),
17362
17376
  children: row.getValue("name")
@@ -17372,7 +17386,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
17372
17386
  })
17373
17387
  };
17374
17388
  const columns = _react.useMemo.call(void 0, () => {
17375
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _536 => _536[field], 'optionalCall', _537 => _537()])).filter((col) => col !== void 0);
17389
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _538 => _538[field], 'optionalCall', _539 => _539()])).filter((col) => col !== void 0);
17376
17390
  }, [params.fields, fieldColumnMap, t, generateUrl, hasRole]);
17377
17391
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17378
17392
  }, "useCompanyTableStructure");
@@ -17385,7 +17399,7 @@ var DAY_MS = 1e3 * 60 * 60 * 24;
17385
17399
  var isAdministrator = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (currentUser) => {
17386
17400
  if (!currentUser || !_chunkG4JR3SFVjs.isRolesConfigured.call(void 0, )) return false;
17387
17401
  const adminRoleId = _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator;
17388
- return !!_optionalChain([currentUser, 'access', _538 => _538.roles, 'optionalAccess', _539 => _539.some, 'call', _540 => _540((role) => role.id === adminRoleId)]);
17402
+ return !!_optionalChain([currentUser, 'access', _540 => _540.roles, 'optionalAccess', _541 => _541.some, 'call', _542 => _542((role) => role.id === adminRoleId)]);
17389
17403
  }, "isAdministrator");
17390
17404
  function useSubscriptionStatus() {
17391
17405
  const { company, currentUser } = useCurrentUserContext();
@@ -17502,7 +17516,7 @@ var useRoleTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
17502
17516
  })
17503
17517
  };
17504
17518
  const columns = _react.useMemo.call(void 0, () => {
17505
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _541 => _541[field], 'optionalCall', _542 => _542()])).filter((col) => col !== void 0);
17519
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _543 => _543[field], 'optionalCall', _544 => _544()])).filter((col) => col !== void 0);
17506
17520
  }, [params.fields, fieldColumnMap, t, generateUrl]);
17507
17521
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17508
17522
  }, "useRoleTableStructure");
@@ -17619,8 +17633,8 @@ var useStripePriceTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(
17619
17633
  const t = _nextintl.useTranslations.call(void 0, );
17620
17634
  const fmt = useBillingFormatOptions();
17621
17635
  const generateUrl = usePageUrlGenerator();
17622
- const onClone = _optionalChain([params, 'access', _543 => _543.context, 'optionalAccess', _544 => _544.onClone]);
17623
- const onExport = _optionalChain([params, 'access', _545 => _545.context, 'optionalAccess', _546 => _546.onExport]);
17636
+ const onClone = _optionalChain([params, 'access', _545 => _545.context, 'optionalAccess', _546 => _546.onClone]);
17637
+ const onExport = _optionalChain([params, 'access', _547 => _547.context, 'optionalAccess', _548 => _548.onExport]);
17624
17638
  const tableData = _react.useMemo.call(void 0, () => {
17625
17639
  return params.data.map((price) => {
17626
17640
  const entry = { jsonApiData: price };
@@ -17685,7 +17699,7 @@ var useStripePriceTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(
17685
17699
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-wrap items-center gap-1", children: [
17686
17700
  price.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softGreen", children: t("billing.admin.prices.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softGray", children: t("billing.admin.prices.status.archived") }),
17687
17701
  price.isTrial && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.trial") }),
17688
- _optionalChain([price, 'access', _547 => _547.recurring, 'optionalAccess', _548 => _548.usageType]) === "metered" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.metered") })
17702
+ _optionalChain([price, 'access', _549 => _549.recurring, 'optionalAccess', _550 => _550.usageType]) === "metered" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.metered") })
17689
17703
  ] });
17690
17704
  }, "cell"),
17691
17705
  enableSorting: false,
@@ -17733,7 +17747,7 @@ var useStripePriceTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(
17733
17747
  })
17734
17748
  };
17735
17749
  const columns = _react.useMemo.call(void 0, () => {
17736
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _549 => _549[field], 'optionalCall', _550 => _550()])).filter((col) => col !== void 0);
17750
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _551 => _551[field], 'optionalCall', _552 => _552()])).filter((col) => col !== void 0);
17737
17751
  }, [params.fields, fieldColumnMap, t, fmt, generateUrl, onClone, onExport]);
17738
17752
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17739
17753
  }, "useStripePriceTableStructure");
@@ -17792,7 +17806,7 @@ var useStripeProductTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.cal
17792
17806
  })
17793
17807
  };
17794
17808
  const columns = _react.useMemo.call(void 0, () => {
17795
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _551 => _551[field], 'optionalCall', _552 => _552()])).filter((col) => col !== void 0);
17809
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _553 => _553[field], 'optionalCall', _554 => _554()])).filter((col) => col !== void 0);
17796
17810
  }, [params.fields, fieldColumnMap, t, generateUrl]);
17797
17811
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17798
17812
  }, "useStripeProductTableStructure");
@@ -17815,7 +17829,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, parseQuestionnaire, "parseQuestionnaire");
17815
17829
  var useWaitlistTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
17816
17830
  const t = _nextintl.useTranslations.call(void 0, );
17817
17831
  const locale = _chunk4ORLPEK7js.useI18nLocale.call(void 0, );
17818
- const onInvite = _optionalChain([params, 'access', _553 => _553.context, 'optionalAccess', _554 => _554.onInvite]);
17832
+ const onInvite = _optionalChain([params, 'access', _555 => _555.context, 'optionalAccess', _556 => _556.onInvite]);
17819
17833
  const tableData = _react.useMemo.call(void 0, () => {
17820
17834
  return params.data.map((entry) => {
17821
17835
  const row = { jsonApiData: entry };
@@ -17895,7 +17909,7 @@ var useWaitlistTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
17895
17909
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
17896
17910
  const entry = row.original.jsonApiData;
17897
17911
  if (entry.status === "confirmed") {
17898
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { size: "sm", variant: "outline", onClick: () => _optionalChain([onInvite, 'optionalCall', _555 => _555(entry)]), children: [
17912
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { size: "sm", variant: "outline", onClick: () => _optionalChain([onInvite, 'optionalCall', _557 => _557(entry)]), children: [
17899
17913
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Send, { className: "me-2 h-4 w-4" }),
17900
17914
  t("waitlist.admin.actions.invite")
17901
17915
  ] });
@@ -17913,7 +17927,7 @@ var useWaitlistTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
17913
17927
  })
17914
17928
  };
17915
17929
  const columns = _react.useMemo.call(void 0, () => {
17916
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _556 => _556[field], 'optionalCall', _557 => _557()])).filter((col) => col !== void 0);
17930
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _558 => _558[field], 'optionalCall', _559 => _559()])).filter((col) => col !== void 0);
17917
17931
  }, [params.fields, fieldColumnMap, t, locale]);
17918
17932
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
17919
17933
  }, "useWaitlistTableStructure");
@@ -18014,11 +18028,11 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
18014
18028
  return params.fields.map((field) => {
18015
18029
  const localHandler = fieldColumnMap[field];
18016
18030
  if (localHandler) return localHandler();
18017
- const customHandler = _optionalChain([params, 'access', _558 => _558.context, 'optionalAccess', _559 => _559.customCells, 'optionalAccess', _560 => _560[field]]);
18031
+ const customHandler = _optionalChain([params, 'access', _560 => _560.context, 'optionalAccess', _561 => _561.customCells, 'optionalAccess', _562 => _562[field]]);
18018
18032
  if (customHandler) return customHandler({ t });
18019
18033
  return void 0;
18020
18034
  }).filter((col) => col !== void 0);
18021
- }, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _561 => _561.context, 'optionalAccess', _562 => _562.customCells])]);
18035
+ }, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _563 => _563.context, 'optionalAccess', _564 => _564.customCells])]);
18022
18036
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
18023
18037
  }, "useContentTableStructure");
18024
18038
 
@@ -18253,17 +18267,17 @@ function useOAuthConsent(params, options) {
18253
18267
  const [error, setError] = _react.useState.call(void 0, null);
18254
18268
  const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
18255
18269
  const [companyId, setCompanyId] = _react.useState.call(void 0, void 0);
18256
- const contextCompanyId = _optionalChain([useCurrentUserContextOptional, 'call', _563 => _563(), 'optionalAccess', _564 => _564.company, 'optionalAccess', _565 => _565.id]);
18257
- const currentCompanyId = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _566 => _566.defaultCompanyId]), () => ( contextCompanyId));
18270
+ const contextCompanyId = _optionalChain([useCurrentUserContextOptional, 'call', _565 => _565(), 'optionalAccess', _566 => _566.company, 'optionalAccess', _567 => _567.id]);
18271
+ const currentCompanyId = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _568 => _568.defaultCompanyId]), () => ( contextCompanyId));
18258
18272
  const t = _nextintl.useTranslations.call(void 0, );
18259
18273
  const tRef = _react.useRef.call(void 0, t);
18260
18274
  tRef.current = t;
18261
18275
  _react.useEffect.call(void 0, () => {
18262
- const companies = _nullishCoalesce(_optionalChain([clientInfo, 'optionalAccess', _567 => _567.companies]), () => ( []));
18276
+ const companies = _nullishCoalesce(_optionalChain([clientInfo, 'optionalAccess', _569 => _569.companies]), () => ( []));
18263
18277
  if (companies.length === 0) return;
18264
18278
  if (companyId && companies.some((company) => company.id === companyId)) return;
18265
18279
  const current = currentCompanyId ? companies.find((company) => company.id === currentCompanyId) : void 0;
18266
- setCompanyId(_nullishCoalesce(_optionalChain([current, 'optionalAccess', _568 => _568.id]), () => ( _optionalChain([companies, 'access', _569 => _569[0], 'optionalAccess', _570 => _570.id]))));
18280
+ setCompanyId(_nullishCoalesce(_optionalChain([current, 'optionalAccess', _570 => _570.id]), () => ( _optionalChain([companies, 'access', _571 => _571[0], 'optionalAccess', _572 => _572.id]))));
18267
18281
  }, [clientInfo, currentCompanyId, companyId]);
18268
18282
  _react.useEffect.call(void 0, () => {
18269
18283
  const fetchInfo = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
@@ -18349,7 +18363,7 @@ function useOAuthScopeText() {
18349
18363
  };
18350
18364
  }
18351
18365
  const info = typeof scope === "string" ? void 0 : scope;
18352
- return { name: _optionalChain([info, 'optionalAccess', _571 => _571.name]) || id, description: _nullishCoalesce(_optionalChain([info, 'optionalAccess', _572 => _572.description]), () => ( "")) };
18366
+ return { name: _optionalChain([info, 'optionalAccess', _573 => _573.name]) || id, description: _nullishCoalesce(_optionalChain([info, 'optionalAccess', _574 => _574.description]), () => ( "")) };
18353
18367
  },
18354
18368
  [t]
18355
18369
  );
@@ -18403,7 +18417,7 @@ function ContentTableSearch({ data }) {
18403
18417
  const handleSearchIconClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
18404
18418
  if (!isExpanded) {
18405
18419
  setIsFocused(true);
18406
- setTimeout(() => _optionalChain([inputRef, 'access', _573 => _573.current, 'optionalAccess', _574 => _574.focus, 'call', _575 => _575()]), 50);
18420
+ setTimeout(() => _optionalChain([inputRef, 'access', _575 => _575.current, 'optionalAccess', _576 => _576.focus, 'call', _577 => _577()]), 50);
18407
18421
  }
18408
18422
  }, "handleSearchIconClick");
18409
18423
  const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
@@ -18489,7 +18503,7 @@ function getGroupKeys(item, field) {
18489
18503
  return [String(_nullishCoalesce(value, () => ( "")))];
18490
18504
  }
18491
18505
  _chunk7QVYU63Ejs.__name.call(void 0, getGroupKeys, "getGroupKeys");
18492
- var isClassComponent = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (component) => typeof component === "function" && !!_optionalChain([component, 'access', _576 => _576.prototype, 'optionalAccess', _577 => _577.isReactComponent]), "isClassComponent");
18506
+ var isClassComponent = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (component) => typeof component === "function" && !!_optionalChain([component, 'access', _578 => _578.prototype, 'optionalAccess', _579 => _579.isReactComponent]), "isClassComponent");
18493
18507
  function StableCell({ render, context }) {
18494
18508
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: render(context) });
18495
18509
  }
@@ -18513,7 +18527,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18513
18527
  if (data.isLoaded) setPendingDirection(null);
18514
18528
  }, [data.isLoaded]);
18515
18529
  const { data: tableData, columns: tableColumns } = useTableGenerator(props.tableGeneratorType, {
18516
- data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _578 => _578.data]), () => ( EMPTY_ARRAY)),
18530
+ data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _580 => _580.data]), () => ( EMPTY_ARRAY)),
18517
18531
  fields,
18518
18532
  checkedIds,
18519
18533
  toggleId,
@@ -18534,10 +18548,16 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18534
18548
  data: tableData,
18535
18549
  columns: tableColumns,
18536
18550
  getCoreRowModel: _reacttable.getCoreRowModel.call(void 0, ),
18551
+ // Pagination is server-side (the data retriever), never TanStack's. Left on,
18552
+ // every core-row-model rebuild queues resetPageIndex -> setState -> re-render,
18553
+ // and the table generators rebuild their columns on every render, so it never
18554
+ // settles: a render loop that starves other updates (the current user never
18555
+ // committed, leaving the sidebar empty).
18556
+ autoResetPageIndex: false,
18537
18557
  ...props.renderExpandedRow && {
18538
18558
  getExpandedRowModel: _reacttable.getExpandedRowModel.call(void 0, ),
18539
18559
  // Key rows by record id so an expansion stays with its record when a search or filter reorders the rows.
18540
- getRowId: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (row, index) => _nullishCoalesce(_optionalChain([row, 'access', _579 => _579.jsonApiData, 'optionalAccess', _580 => _580.id]), () => ( String(index))), "getRowId"),
18560
+ getRowId: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (row, index) => _nullishCoalesce(_optionalChain([row, 'access', _581 => _581.jsonApiData, 'optionalAccess', _582 => _582.id]), () => ( String(index))), "getRowId"),
18541
18561
  getRowCanExpand: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => true, "getRowCanExpand"),
18542
18562
  onExpandedChange: setExpanded,
18543
18563
  state: { expanded }
@@ -18554,7 +18574,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18554
18574
  });
18555
18575
  const rowModel = tableData ? table.getRowModel() : null;
18556
18576
  const groupedRows = _react.useMemo.call(void 0, () => {
18557
- if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _581 => _581.rows, 'optionalAccess', _582 => _582.length])) return null;
18577
+ if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _583 => _583.rows, 'optionalAccess', _584 => _584.length])) return null;
18558
18578
  const groupMap = /* @__PURE__ */ new Map();
18559
18579
  for (const row of rowModel.rows) {
18560
18580
  const keys = getGroupKeys(row.original, props.groupBy);
@@ -18633,20 +18653,20 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18633
18653
  ) }),
18634
18654
  !props.hideHeader && table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: headerGroup.headers.map((header) => {
18635
18655
  const meta = header.column.columnDef.meta;
18636
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _583 => _583.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
18656
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _585 => _585.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
18637
18657
  }) }, headerGroup.id))
18638
18658
  ] }),
18639
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _584 => _584.rows, 'optionalAccess', _585 => _585.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React2.default.Fragment, { children: [
18640
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { colSpan: tableColumns.length, className: "bg-muted px-4 py-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MicroLabel, { children: _nullishCoalesce(_optionalChain([props, 'access', _586 => _586.groupLabel, 'optionalCall', _587 => _587(group.groupKey)]), () => ( group.groupKey)) }) }) }),
18659
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _586 => _586.rows, 'optionalAccess', _587 => _587.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React2.default.Fragment, { children: [
18660
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { colSpan: tableColumns.length, className: "bg-muted px-4 py-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MicroLabel, { children: _nullishCoalesce(_optionalChain([props, 'access', _588 => _588.groupLabel, 'optionalCall', _589 => _589(group.groupKey)]), () => ( group.groupKey)) }) }) }),
18641
18661
  group.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React2.default.Fragment, { children: [
18642
18662
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
18643
18663
  TableRow,
18644
18664
  {
18645
- onClick: () => _optionalChain([onRowClick, 'optionalCall', _588 => _588(row.original.jsonApiData)]),
18665
+ onClick: () => _optionalChain([onRowClick, 'optionalCall', _590 => _590(row.original.jsonApiData)]),
18646
18666
  className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
18647
18667
  children: row.getVisibleCells().map((cell) => {
18648
18668
  const meta = cell.column.columnDef.meta;
18649
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _589 => _589.className]), children: renderCell(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
18669
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _591 => _591.className]), children: renderCell(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
18650
18670
  })
18651
18671
  }
18652
18672
  ),
@@ -18656,11 +18676,11 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18656
18676
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
18657
18677
  TableRow,
18658
18678
  {
18659
- onClick: () => _optionalChain([onRowClick, 'optionalCall', _590 => _590(row.original.jsonApiData)]),
18679
+ onClick: () => _optionalChain([onRowClick, 'optionalCall', _592 => _592(row.original.jsonApiData)]),
18660
18680
  className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
18661
18681
  children: row.getVisibleCells().map((cell) => {
18662
18682
  const meta = cell.column.columnDef.meta;
18663
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _591 => _591.className]), children: renderCell(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
18683
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _593 => _593.className]), children: renderCell(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
18664
18684
  })
18665
18685
  }
18666
18686
  ),
@@ -18675,7 +18695,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18675
18695
  onClick: (e) => {
18676
18696
  e.preventDefault();
18677
18697
  setPendingDirection("prev");
18678
- _optionalChain([data, 'access', _592 => _592.previous, 'optionalCall', _593 => _593(true)]);
18698
+ _optionalChain([data, 'access', _594 => _594.previous, 'optionalCall', _595 => _595(true)]);
18679
18699
  },
18680
18700
  disabled: !data.previous || pendingDirection !== null,
18681
18701
  children: pendingDirection === "prev" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronLeft, { className: "h-4 w-4 rtl:rotate-180" })
@@ -18690,7 +18710,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
18690
18710
  onClick: (e) => {
18691
18711
  e.preventDefault();
18692
18712
  setPendingDirection("next");
18693
- _optionalChain([data, 'access', _594 => _594.next, 'optionalCall', _595 => _595(true)]);
18713
+ _optionalChain([data, 'access', _596 => _596.next, 'optionalCall', _597 => _597(true)]);
18694
18714
  },
18695
18715
  disabled: !data.next || pendingDirection !== null,
18696
18716
  children: pendingDirection === "next" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight, { className: "h-4 w-4 rtl:rotate-180" })
@@ -18712,7 +18732,7 @@ function ContentListGrid(props) {
18712
18732
  if (!data.next || !sentinelRef.current) return;
18713
18733
  const observer = new IntersectionObserver(
18714
18734
  (entries) => {
18715
- if (_optionalChain([entries, 'access', _596 => _596[0], 'optionalAccess', _597 => _597.isIntersecting])) _optionalChain([data, 'access', _598 => _598.next, 'optionalCall', _599 => _599()]);
18735
+ if (_optionalChain([entries, 'access', _598 => _598[0], 'optionalAccess', _599 => _599.isIntersecting])) _optionalChain([data, 'access', _600 => _600.next, 'optionalCall', _601 => _601()]);
18716
18736
  },
18717
18737
  { threshold: 0.1, rootMargin: "200px" }
18718
18738
  );
@@ -19499,7 +19519,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
19499
19519
  newDigits[index] = digit;
19500
19520
  setDigits(newDigits);
19501
19521
  if (digit && index < 5) {
19502
- _optionalChain([inputRefs, 'access', _600 => _600.current, 'access', _601 => _601[index + 1], 'optionalAccess', _602 => _602.focus, 'call', _603 => _603()]);
19522
+ _optionalChain([inputRefs, 'access', _602 => _602.current, 'access', _603 => _603[index + 1], 'optionalAccess', _604 => _604.focus, 'call', _605 => _605()]);
19503
19523
  }
19504
19524
  const code = newDigits.join("");
19505
19525
  if (code.length === 6 && newDigits.every((d) => d !== "")) {
@@ -19508,7 +19528,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
19508
19528
  }, "handleChange");
19509
19529
  const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index, e) => {
19510
19530
  if (e.key === "Backspace" && !digits[index] && index > 0) {
19511
- _optionalChain([inputRefs, 'access', _604 => _604.current, 'access', _605 => _605[index - 1], 'optionalAccess', _606 => _606.focus, 'call', _607 => _607()]);
19531
+ _optionalChain([inputRefs, 'access', _606 => _606.current, 'access', _607 => _607[index - 1], 'optionalAccess', _608 => _608.focus, 'call', _609 => _609()]);
19512
19532
  }
19513
19533
  }, "handleKeyDown");
19514
19534
  const handlePaste = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
@@ -19517,7 +19537,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
19517
19537
  if (pastedData.length === 6) {
19518
19538
  const newDigits = pastedData.split("");
19519
19539
  setDigits(newDigits);
19520
- _optionalChain([inputRefs, 'access', _608 => _608.current, 'access', _609 => _609[5], 'optionalAccess', _610 => _610.focus, 'call', _611 => _611()]);
19540
+ _optionalChain([inputRefs, 'access', _610 => _610.current, 'access', _611 => _611[5], 'optionalAccess', _612 => _612.focus, 'call', _613 => _613()]);
19521
19541
  onComplete(pastedData);
19522
19542
  }
19523
19543
  }, "handlePaste");
@@ -19729,8 +19749,8 @@ function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
19729
19749
  try {
19730
19750
  const registrationData = await _chunk4ORLPEK7js.TwoFactorService.getPasskeyRegistrationOptions({
19731
19751
  id: _uuid.v4.call(void 0, ),
19732
- userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _612 => _612.email]), () => ( "")),
19733
- userDisplayName: _optionalChain([currentUser, 'optionalAccess', _613 => _613.name])
19752
+ userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _614 => _614.email]), () => ( "")),
19753
+ userDisplayName: _optionalChain([currentUser, 'optionalAccess', _615 => _615.name])
19734
19754
  });
19735
19755
  const credential = await _browser.startRegistration.call(void 0, { optionsJSON: registrationData.options });
19736
19756
  await _chunk4ORLPEK7js.TwoFactorService.verifyPasskeyRegistration({
@@ -19882,7 +19902,7 @@ function TotpSetupDialog({ onSuccess, trigger }) {
19882
19902
  const setup = await _chunk4ORLPEK7js.TwoFactorService.setupTotp({
19883
19903
  id: _uuid.v4.call(void 0, ),
19884
19904
  name: name.trim(),
19885
- accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _614 => _614.email]), () => ( ""))
19905
+ accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _616 => _616.email]), () => ( ""))
19886
19906
  });
19887
19907
  setQrCodeUri(setup.qrCodeUri);
19888
19908
  setAuthenticatorId(setup.authenticatorId);
@@ -20016,7 +20036,7 @@ function TwoFactorSettings() {
20016
20036
  if (isLoading) {
20017
20037
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground", children: t("common.loading") }) }) });
20018
20038
  }
20019
- const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _615 => _615.isEnabled]), () => ( false));
20039
+ const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _617 => _617.isEnabled]), () => ( false));
20020
20040
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { children: [
20021
20041
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
20022
20042
  isEnabled ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ShieldCheck, { className: "text-success h-6 w-6" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ShieldAlert, { className: "text-warning h-6 w-6" }),
@@ -20054,7 +20074,7 @@ function TwoFactorSettings() {
20054
20074
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-medium", children: t("auth.two_factor.backup_codes") }),
20055
20075
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("auth.two_factor.backup_codes_description") })
20056
20076
  ] }),
20057
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _616 => _616.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
20077
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _618 => _618.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
20058
20078
  ] }) }),
20059
20079
  !isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
20060
20080
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, {}),
@@ -20234,9 +20254,9 @@ function AcceptInvitation() {
20234
20254
  });
20235
20255
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
20236
20256
  try {
20237
- if (!_optionalChain([params, 'optionalAccess', _617 => _617.code])) return;
20257
+ if (!_optionalChain([params, 'optionalAccess', _619 => _619.code])) return;
20238
20258
  const payload = {
20239
- code: _optionalChain([params, 'optionalAccess', _618 => _618.code]),
20259
+ code: _optionalChain([params, 'optionalAccess', _620 => _620.code]),
20240
20260
  password: values.password
20241
20261
  };
20242
20262
  await _chunk4ORLPEK7js.AuthService.acceptInvitation(payload);
@@ -20607,14 +20627,14 @@ function RefreshUser() {
20607
20627
  setUser(fullUser);
20608
20628
  const token = {
20609
20629
  userId: fullUser.id,
20610
- companyId: _optionalChain([fullUser, 'access', _619 => _619.company, 'optionalAccess', _620 => _620.id]),
20630
+ companyId: _optionalChain([fullUser, 'access', _621 => _621.company, 'optionalAccess', _622 => _622.id]),
20611
20631
  roles: fullUser.roles.map((role) => role.id),
20612
- features: _nullishCoalesce(_optionalChain([fullUser, 'access', _621 => _621.company, 'optionalAccess', _622 => _622.features, 'optionalAccess', _623 => _623.map, 'call', _624 => _624((feature) => feature.id)]), () => ( [])),
20632
+ features: _nullishCoalesce(_optionalChain([fullUser, 'access', _623 => _623.company, 'optionalAccess', _624 => _624.features, 'optionalAccess', _625 => _625.map, 'call', _626 => _626((feature) => feature.id)]), () => ( [])),
20613
20633
  modules: fullUser.modules.map((module) => {
20614
20634
  return { id: module.id, permissions: module.permissions };
20615
20635
  })
20616
20636
  };
20617
- await _optionalChain([_chunk4ORLPEK7js.getTokenHandler.call(void 0, ), 'optionalAccess', _625 => _625.updateToken, 'call', _626 => _626(token)]);
20637
+ await _optionalChain([_chunk4ORLPEK7js.getTokenHandler.call(void 0, ), 'optionalAccess', _627 => _627.updateToken, 'call', _628 => _628(token)]);
20618
20638
  _cookiesnext.deleteCookie.call(void 0, "reloadData");
20619
20639
  }
20620
20640
  }, "loadFullUser");
@@ -20678,9 +20698,9 @@ function ResetPassword() {
20678
20698
  });
20679
20699
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
20680
20700
  try {
20681
- if (!_optionalChain([params, 'optionalAccess', _627 => _627.code])) return;
20701
+ if (!_optionalChain([params, 'optionalAccess', _629 => _629.code])) return;
20682
20702
  const payload = {
20683
- code: _optionalChain([params, 'optionalAccess', _628 => _628.code]),
20703
+ code: _optionalChain([params, 'optionalAccess', _630 => _630.code]),
20684
20704
  password: values.password
20685
20705
  };
20686
20706
  await _chunk4ORLPEK7js.AuthService.resetPassword(payload);
@@ -21215,7 +21235,7 @@ function AiConnectionEditor({
21215
21235
  const registryRows = _react.useMemo.call(void 0, () => _nullishCoalesce(providerRegistry[connectionType], () => ( [])), [providerRegistry, connectionType]);
21216
21236
  const providers = _react.useMemo.call(void 0, () => registryRows.map((row) => row.provider), [registryRows]);
21217
21237
  const fieldsFor = _react.useCallback.call(void 0,
21218
- (provider) => _nullishCoalesce(_optionalChain([registryRows, 'access', _629 => _629.find, 'call', _630 => _630((row) => row.provider === provider), 'optionalAccess', _631 => _631.fields]), () => ( [])),
21238
+ (provider) => _nullishCoalesce(_optionalChain([registryRows, 'access', _631 => _631.find, 'call', _632 => _632((row) => row.provider === provider), 'optionalAccess', _633 => _633.fields]), () => ( [])),
21219
21239
  [registryRows]
21220
21240
  );
21221
21241
  const defaultsFor = _react.useCallback.call(void 0,
@@ -21224,7 +21244,7 @@ function AiConnectionEditor({
21224
21244
  const seeded = {};
21225
21245
  fieldsFor(provider).forEach((descriptor) => {
21226
21246
  if (descriptor.kind === "boolean") {
21227
- const current2 = _optionalChain([stored, 'optionalAccess', _632 => _632[descriptor.field]]);
21247
+ const current2 = _optionalChain([stored, 'optionalAccess', _634 => _634[descriptor.field]]);
21228
21248
  seeded[descriptor.field] = current2 !== void 0 && current2 !== null ? current2 === true : descriptor.default === true;
21229
21249
  return;
21230
21250
  }
@@ -21232,7 +21252,7 @@ function AiConnectionEditor({
21232
21252
  seeded[descriptor.field] = "";
21233
21253
  return;
21234
21254
  }
21235
- const current = _optionalChain([stored, 'optionalAccess', _633 => _633[descriptor.field]]);
21255
+ const current = _optionalChain([stored, 'optionalAccess', _635 => _635[descriptor.field]]);
21236
21256
  if (current !== void 0 && current !== null) seeded[descriptor.field] = String(current);
21237
21257
  else seeded[descriptor.field] = descriptor.default !== void 0 ? String(descriptor.default) : "";
21238
21258
  });
@@ -21258,7 +21278,7 @@ function AiConnectionEditor({
21258
21278
  values: _zod3.z.record(_zod3.z.string(), _zod3.z.any())
21259
21279
  }).superRefine((data, ctx) => {
21260
21280
  fieldsFor(data.provider).filter((descriptor) => descriptor.required).forEach((descriptor) => {
21261
- const value = _optionalChain([data, 'access', _634 => _634.values, 'optionalAccess', _635 => _635[descriptor.field]]);
21281
+ const value = _optionalChain([data, 'access', _636 => _636.values, 'optionalAccess', _637 => _637[descriptor.field]]);
21262
21282
  const filled = descriptor.kind === "secret" ? !!value || hasStoredSecret(descriptor.field) : descriptor.kind === "boolean" ? value !== void 0 : value !== void 0 && value !== null && String(value).trim() !== "";
21263
21283
  if (filled) return;
21264
21284
  ctx.addIssue({
@@ -21272,11 +21292,11 @@ function AiConnectionEditor({
21272
21292
  );
21273
21293
  const getDefaultValues = _react.useCallback.call(void 0,
21274
21294
  () => ({
21275
- id: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _636 => _636.id]), () => ( _uuid.v4.call(void 0, ))),
21276
- name: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _637 => _637.name]), () => ( "")),
21277
- provider: _nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess', _638 => _638.provider]), () => ( providers[0])), () => ( "")),
21278
- enabled: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _639 => _639.enabled]), () => ( true)),
21279
- values: defaultsFor(_nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess', _640 => _640.provider]), () => ( providers[0])), () => ( "")))
21295
+ id: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _638 => _638.id]), () => ( _uuid.v4.call(void 0, ))),
21296
+ name: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _639 => _639.name]), () => ( "")),
21297
+ provider: _nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess', _640 => _640.provider]), () => ( providers[0])), () => ( "")),
21298
+ enabled: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _641 => _641.enabled]), () => ( true)),
21299
+ values: defaultsFor(_nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess', _642 => _642.provider]), () => ( providers[0])), () => ( "")))
21280
21300
  }),
21281
21301
  [connection, providers, defaultsFor]
21282
21302
  );
@@ -21287,7 +21307,7 @@ function AiConnectionEditor({
21287
21307
  _react.useEffect.call(void 0, () => {
21288
21308
  if (registryRows.length === 0) return;
21289
21309
  const currentProvider = form.getValues("provider");
21290
- const provider = currentProvider || _optionalChain([connection, 'optionalAccess', _641 => _641.provider]) || providers[0] || "";
21310
+ const provider = currentProvider || _optionalChain([connection, 'optionalAccess', _643 => _643.provider]) || providers[0] || "";
21291
21311
  if (!provider) return;
21292
21312
  if (provider !== currentProvider) form.setValue("provider", provider);
21293
21313
  const currentValues = form.getValues("values");
@@ -21358,7 +21378,7 @@ function AiConnectionEditor({
21358
21378
  {
21359
21379
  form,
21360
21380
  entityType: t("ai_connections.admin.entity"),
21361
- entityName: _optionalChain([connection, 'optionalAccess', _642 => _642.name]),
21381
+ entityName: _optionalChain([connection, 'optionalAccess', _644 => _644.name]),
21362
21382
  isEdit,
21363
21383
  module: _chunk4ORLPEK7js.Modules.AiConnection,
21364
21384
  size: "md",
@@ -21366,7 +21386,7 @@ function AiConnectionEditor({
21366
21386
  onSubmit: async (values) => {
21367
21387
  const attributes = {};
21368
21388
  fieldsFor(values.provider).forEach((descriptor) => {
21369
- const coerced = coerce(descriptor, _optionalChain([values, 'access', _643 => _643.values, 'optionalAccess', _644 => _644[descriptor.field]]));
21389
+ const coerced = coerce(descriptor, _optionalChain([values, 'access', _645 => _645.values, 'optionalAccess', _646 => _646[descriptor.field]]));
21370
21390
  if (coerced !== void 0) attributes[descriptor.field] = coerced;
21371
21391
  });
21372
21392
  const payload = {
@@ -21596,7 +21616,7 @@ function AiConnectionTypeCard({ connectionType }) {
21596
21616
  ),
21597
21617
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-muted/40 flex flex-wrap items-center gap-2 px-3 py-2", children: [
21598
21618
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softGray", children: t("ai_connections.admin.env_fallback") }),
21599
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground truncate text-xs", children: [_optionalChain([envDefault, 'optionalAccess', _645 => _645.provider]), _optionalChain([envDefault, 'optionalAccess', _646 => _646.model]), _optionalChain([envDefault, 'optionalAccess', _647 => _647.url])].filter(Boolean).join(" \xB7 ") })
21619
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground truncate text-xs", children: [_optionalChain([envDefault, 'optionalAccess', _647 => _647.provider]), _optionalChain([envDefault, 'optionalAccess', _648 => _648.model]), _optionalChain([envDefault, 'optionalAccess', _649 => _649.url])].filter(Boolean).join(" \xB7 ") })
21600
21620
  ] })
21601
21621
  ] })
21602
21622
  ] })
@@ -21794,7 +21814,7 @@ function extractHeadings(blocks) {
21794
21814
  function processBlocks(blockArray) {
21795
21815
  for (const block of blockArray) {
21796
21816
  if (block.type === "heading") {
21797
- const level = _optionalChain([block, 'access', _648 => _648.props, 'optionalAccess', _649 => _649.level]) || 1;
21817
+ const level = _optionalChain([block, 'access', _650 => _650.props, 'optionalAccess', _651 => _651.level]) || 1;
21798
21818
  const text = extractTextFromContent(block.content);
21799
21819
  if (text.trim()) {
21800
21820
  headings.push({
@@ -22154,7 +22174,7 @@ var useHowToTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
22154
22174
  })
22155
22175
  };
22156
22176
  const columns = _react.useMemo.call(void 0, () => {
22157
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _650 => _650[field], 'optionalCall', _651 => _651()])).filter((col) => col !== void 0);
22177
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _652 => _652[field], 'optionalCall', _653 => _653()])).filter((col) => col !== void 0);
22158
22178
  }, [params.fields, fieldColumnMap, t, generateUrl]);
22159
22179
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
22160
22180
  }, "useHowToTableStructure");
@@ -22280,7 +22300,7 @@ function HowToSelector({
22280
22300
  }, "setHowTo");
22281
22301
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFieldWrapper, { form, name: id, label, isRequired, children: (field) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Popover, { open, onOpenChange: setOpen, modal: true, children: [
22282
22302
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
22283
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _652 => _652.value, 'optionalAccess', _653 => _653.name]), () => ( "")) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input text-muted-foreground flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: _nullishCoalesce(placeholder, () => ( t(`generic.search.placeholder`, { type: t(`entities.howtos`, { count: 1 }) }))) }) }) }),
22303
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _654 => _654.value, 'optionalAccess', _655 => _655.name]), () => ( "")) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input text-muted-foreground flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: _nullishCoalesce(placeholder, () => ( t(`generic.search.placeholder`, { type: t(`entities.howtos`, { count: 1 }) }))) }) }) }),
22284
22304
  field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
22285
22305
  _lucidereact.CircleX,
22286
22306
  {
@@ -22585,10 +22605,10 @@ function CitationsTab({ citations, sources }) {
22585
22605
  ] }) }),
22586
22606
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: sorted.map((chunk) => {
22587
22607
  const isOpen = expanded.has(chunk.id);
22588
- const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _654 => _654.get, 'call', _655 => _655(chunk.nodeId)]) : void 0;
22608
+ const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _656 => _656.get, 'call', _657 => _657(chunk.nodeId)]) : void 0;
22589
22609
  const typeLabel = chunk.nodeType ? entityLabel(chunk.nodeType) : t("features.assistant.message.sources.source");
22590
22610
  const fallbackName = chunk.nodeId ? `${typeLabel} ${chunk.nodeId.slice(0, 8)}` : typeLabel;
22591
- const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _656 => _656.name]), () => ( fallbackName));
22611
+ const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _658 => _658.name]), () => ( fallbackName));
22592
22612
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
22593
22613
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, TableRow, { children: [
22594
22614
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -22652,7 +22672,7 @@ function ContentsTab({ citations, sources }) {
22652
22672
  for (const c of citations) {
22653
22673
  const id = c.nodeId;
22654
22674
  if (!id) continue;
22655
- const source = _optionalChain([sources, 'optionalAccess', _657 => _657.get, 'call', _658 => _658(id)]);
22675
+ const source = _optionalChain([sources, 'optionalAccess', _659 => _659.get, 'call', _660 => _660(id)]);
22656
22676
  if (!source) continue;
22657
22677
  const existing = map.get(id);
22658
22678
  if (existing) {
@@ -22719,7 +22739,7 @@ function UsersTab({ users, citations, sources }) {
22719
22739
  const generate = usePageUrlGenerator();
22720
22740
  const userMap = /* @__PURE__ */ new Map();
22721
22741
  for (const u of users) {
22722
- if (!_optionalChain([u, 'optionalAccess', _659 => _659.id])) continue;
22742
+ if (!_optionalChain([u, 'optionalAccess', _661 => _661.id])) continue;
22723
22743
  userMap.set(u.id, { user: u, contentCount: 0, citationCount: 0 });
22724
22744
  }
22725
22745
  if (citations && sources) {
@@ -22824,7 +22844,7 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
22824
22844
  }
22825
22845
  return ids.size;
22826
22846
  }, [message.citations, sources]);
22827
- const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _660 => _660.length]), () => ( 0));
22847
+ const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _662 => _662.length]), () => ( 0));
22828
22848
  const total = refsCount + citationsCount + contentsCount + usersCount + suggestionsCount;
22829
22849
  const visibleTabs = [];
22830
22850
  if (suggestionsCount > 0) visibleTabs.push("suggested");
@@ -22967,7 +22987,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
22967
22987
  return void 0;
22968
22988
  }
22969
22989
  })()));
22970
- if (_optionalChain([author, 'optionalAccess', _661 => _661.id])) userMap.set(author.id, author);
22990
+ if (_optionalChain([author, 'optionalAccess', _663 => _663.id])) userMap.set(author.id, author);
22971
22991
  }
22972
22992
  return Array.from(userMap.values());
22973
22993
  }, [resolved]);
@@ -23002,7 +23022,7 @@ function MessageItem({
23002
23022
  }) {
23003
23023
  const t = _nextintl.useTranslations.call(void 0, );
23004
23024
  const isUser = message.role === "user";
23005
- const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _662 => _662.has, 'call', _663 => _663(message.id)]);
23025
+ const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _664 => _664.has, 'call', _665 => _665(message.id)]);
23006
23026
  const markdownComponents = _react.useMemo.call(void 0,
23007
23027
  () => ({
23008
23028
  a: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ href, children }) => {
@@ -23019,7 +23039,7 @@ function MessageItem({
23019
23039
  isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-destructive flex items-center gap-2 text-xs", children: [
23020
23040
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-3.5 w-3.5" }),
23021
23041
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("features.assistant.send_failed") }),
23022
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", onClick: () => _optionalChain([onRetry, 'optionalCall', _664 => _664(message.id)]), children: t("features.assistant.retry") })
23042
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", onClick: () => _optionalChain([onRetry, 'optionalCall', _666 => _666(message.id)]), children: t("features.assistant.retry") })
23023
23043
  ] })
23024
23044
  ] });
23025
23045
  }
@@ -23110,7 +23130,7 @@ function AssistantThread({
23110
23130
  }) {
23111
23131
  const lastMessageRef = _react.useRef.call(void 0, null);
23112
23132
  _react.useEffect.call(void 0, () => {
23113
- _optionalChain([lastMessageRef, 'access', _665 => _665.current, 'optionalAccess', _666 => _666.scrollIntoView, 'call', _667 => _667({ block: "start", behavior: "smooth" })]);
23133
+ _optionalChain([lastMessageRef, 'access', _667 => _667.current, 'optionalAccess', _668 => _668.scrollIntoView, 'call', _669 => _669({ block: "start", behavior: "smooth" })]);
23114
23134
  }, [messages.length, sending]);
23115
23135
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 overflow-x-hidden overflow-y-auto px-6 py-5", children: [
23116
23136
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -23149,7 +23169,7 @@ ${message.sources.map((source) => `- \`${source}\``).join("\n")}`;
23149
23169
  return _chunk4ORLPEK7js.rehydrate.call(void 0, _chunk4ORLPEK7js.Modules.HandbookThreadMessage, {
23150
23170
  jsonApi: {
23151
23171
  ...dehydrated.jsonApi,
23152
- attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _668 => _668.jsonApi, 'optionalAccess', _669 => _669.attributes]), () => ( {})), content }
23172
+ attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _670 => _670.jsonApi, 'optionalAccess', _671 => _671.attributes]), () => ( {})), content }
23153
23173
  },
23154
23174
  included: dehydrated.included
23155
23175
  });
@@ -23158,8 +23178,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, withSourcesInContent, "withSourcesInContent
23158
23178
  function useHandbookAsk(params) {
23159
23179
  const t = _nextintl.useTranslations.call(void 0, );
23160
23180
  const generateUrl = usePageUrlGenerator();
23161
- const shouldSyncUrl = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _670 => _670.syncUrl]), () => ( true));
23162
- const handbookThreadId = _optionalChain([params, 'optionalAccess', _671 => _671.handbookThreadId]);
23181
+ const shouldSyncUrl = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _672 => _672.syncUrl]), () => ( true));
23182
+ const handbookThreadId = _optionalChain([params, 'optionalAccess', _673 => _673.handbookThreadId]);
23163
23183
  const [threads, setThreads] = _react.useState.call(void 0, []);
23164
23184
  const [thread, setThread] = _react.useState.call(void 0, void 0);
23165
23185
  const [messages, setMessages] = _react.useState.call(void 0, []);
@@ -23221,12 +23241,12 @@ function useHandbookAsk(params) {
23221
23241
  ]);
23222
23242
  setSending(true);
23223
23243
  try {
23224
- let id = _optionalChain([thread, 'optionalAccess', _672 => _672.id]);
23244
+ let id = _optionalChain([thread, 'optionalAccess', _674 => _674.id]);
23225
23245
  if (id === void 0) {
23226
23246
  const created = await _chunk4ORLPEK7js.HandbookThreadService.create({
23227
23247
  id: _uuid.v4.call(void 0, ),
23228
23248
  question: trimmed,
23229
- handbookPageId: _optionalChain([options, 'optionalAccess', _673 => _673.handbookPageId])
23249
+ handbookPageId: _optionalChain([options, 'optionalAccess', _675 => _675.handbookPageId])
23230
23250
  });
23231
23251
  id = created.id;
23232
23252
  setThreads((current) => [created, ...current]);
@@ -23235,7 +23255,7 @@ function useHandbookAsk(params) {
23235
23255
  id: _uuid.v4.call(void 0, ),
23236
23256
  threadId: id,
23237
23257
  question: trimmed,
23238
- handbookPageId: _optionalChain([options, 'optionalAccess', _674 => _674.handbookPageId])
23258
+ handbookPageId: _optionalChain([options, 'optionalAccess', _676 => _676.handbookPageId])
23239
23259
  });
23240
23260
  }
23241
23261
  const loaded = await _chunk4ORLPEK7js.HandbookThreadService.findOne({ id });
@@ -23256,7 +23276,7 @@ function useHandbookAsk(params) {
23256
23276
  setSending(false);
23257
23277
  }
23258
23278
  },
23259
- [messages.length, sending, syncUrl, t, _optionalChain([thread, 'optionalAccess', _675 => _675.id])]
23279
+ [messages.length, sending, syncUrl, t, _optionalChain([thread, 'optionalAccess', _677 => _677.id])]
23260
23280
  );
23261
23281
  return { threads, thread, messages, sending, ask, selectThread, startNew };
23262
23282
  }
@@ -23812,7 +23832,7 @@ function HandbookPageContainer({ handbookPageId }) {
23812
23832
  };
23813
23833
  }, []);
23814
23834
  const section = _react.useMemo.call(void 0,
23815
- () => sections.find((candidate) => candidate.key === _optionalChain([handbookPage, 'optionalAccess', _676 => _676.section])),
23835
+ () => sections.find((candidate) => candidate.key === _optionalChain([handbookPage, 'optionalAccess', _678 => _678.section])),
23816
23836
  [sections, handbookPage]
23817
23837
  );
23818
23838
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -23901,7 +23921,7 @@ function AssistantSidebar({
23901
23921
  className: "block w-full truncate rounded-md px-2 py-1.5 text-start text-sm " + (activeId === thread.id ? "bg-primary/10 text-primary" : "hover:bg-muted text-foreground"),
23902
23922
  children: [
23903
23923
  thread.title,
23904
- _optionalChain([renderThreadBadge, 'optionalCall', _677 => _677(thread)])
23924
+ _optionalChain([renderThreadBadge, 'optionalCall', _679 => _679(thread)])
23905
23925
  ]
23906
23926
  },
23907
23927
  thread.id
@@ -23937,7 +23957,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
23937
23957
  AssistantSidebar,
23938
23958
  {
23939
23959
  threads,
23940
- activeId: _optionalChain([thread, 'optionalAccess', _678 => _678.id]),
23960
+ activeId: _optionalChain([thread, 'optionalAccess', _680 => _680.id]),
23941
23961
  onSelect: selectThread,
23942
23962
  onNew: startNew,
23943
23963
  newLabel: t("handbook.chat.new"),
@@ -23945,7 +23965,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
23945
23965
  }
23946
23966
  ) })
23947
23967
  ),
23948
- [selectThread, startNew, t, _optionalChain([thread, 'optionalAccess', _679 => _679.id]), threads]
23968
+ [selectThread, startNew, t, _optionalChain([thread, 'optionalAccess', _681 => _681.id]), threads]
23949
23969
  );
23950
23970
  return (
23951
23971
  // `RoundPageContainer` reads the page heading from the shared context, and
@@ -23957,7 +23977,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
23957
23977
  RoundPageContainer,
23958
23978
  {
23959
23979
  module: _chunk4ORLPEK7js.Modules.HandbookPage,
23960
- id: _optionalChain([thread, 'optionalAccess', _680 => _680.id]),
23980
+ id: _optionalChain([thread, 'optionalAccess', _682 => _682.id]),
23961
23981
  fullWidth: true,
23962
23982
  forceHeader: true,
23963
23983
  defaultDetailsOpen: true,
@@ -24009,7 +24029,7 @@ function EntityMentionLinkView({ type, id, alias }) {
24009
24029
  } catch (e26) {
24010
24030
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: alias });
24011
24031
  }
24012
- if (!_optionalChain([module, 'optionalAccess', _681 => _681.pageUrl])) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: alias });
24032
+ if (!_optionalChain([module, 'optionalAccess', _683 => _683.pageUrl])) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: alias });
24013
24033
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generate({ page: module, id }), children: alias });
24014
24034
  }
24015
24035
  _chunk7QVYU63Ejs.__name.call(void 0, EntityMentionLinkView, "EntityMentionLinkView");
@@ -24141,13 +24161,13 @@ function AssistantContainer({
24141
24161
  AssistantSidebar,
24142
24162
  {
24143
24163
  threads: ctx.threads,
24144
- activeId: _optionalChain([ctx, 'access', _682 => _682.assistant, 'optionalAccess', _683 => _683.id]),
24164
+ activeId: _optionalChain([ctx, 'access', _684 => _684.assistant, 'optionalAccess', _685 => _685.id]),
24145
24165
  onSelect: ctx.selectThread,
24146
24166
  renderThreadBadge
24147
24167
  }
24148
24168
  ) })
24149
24169
  ),
24150
- [ctx.threads, _optionalChain([ctx, 'access', _684 => _684.assistant, 'optionalAccess', _685 => _685.id]), ctx.selectThread, renderThreadBadge]
24170
+ [ctx.threads, _optionalChain([ctx, 'access', _686 => _686.assistant, 'optionalAccess', _687 => _687.id]), ctx.selectThread, renderThreadBadge]
24151
24171
  );
24152
24172
  const thread = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: !showThread ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
24153
24173
  AssistantEmptyState,
@@ -24155,7 +24175,7 @@ function AssistantContainer({
24155
24175
  onSend: ctx.sendMessage,
24156
24176
  operatorMode: ctx.operatorMode,
24157
24177
  onOperatorModeChange: showOperatorToggle ? ctx.setOperatorMode : void 0,
24158
- composerLeading: _optionalChain([renderScopePicker, 'optionalCall', _686 => _686()])
24178
+ composerLeading: _optionalChain([renderScopePicker, 'optionalCall', _688 => _688()])
24159
24179
  }
24160
24180
  ) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
24161
24181
  ctx.assistant ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -24187,7 +24207,7 @@ function AssistantContainer({
24187
24207
  AssistantSidebar,
24188
24208
  {
24189
24209
  threads: ctx.threads,
24190
- activeId: _optionalChain([ctx, 'access', _687 => _687.assistant, 'optionalAccess', _688 => _688.id]),
24210
+ activeId: _optionalChain([ctx, 'access', _689 => _689.assistant, 'optionalAccess', _690 => _690.id]),
24191
24211
  onSelect: ctx.selectThread,
24192
24212
  onNew: ctx.startNew,
24193
24213
  renderThreadBadge
@@ -24200,7 +24220,7 @@ function AssistantContainer({
24200
24220
  RoundPageContainer,
24201
24221
  {
24202
24222
  module: _chunk4ORLPEK7js.Modules.Assistant,
24203
- id: _optionalChain([ctx, 'access', _689 => _689.assistant, 'optionalAccess', _690 => _690.id]),
24223
+ id: _optionalChain([ctx, 'access', _691 => _691.assistant, 'optionalAccess', _692 => _692.id]),
24204
24224
  fullWidth: true,
24205
24225
  forceHeader: true,
24206
24226
  defaultDetailsOpen: true,
@@ -24228,7 +24248,7 @@ function flattenBlocks(blocks) {
24228
24248
  if (typeof inline === "string") return inline;
24229
24249
  if (!inline || typeof inline !== "object") return "";
24230
24250
  const node = inline;
24231
- if (node.type === "mention") return _nullishCoalesce(_optionalChain([node, 'access', _691 => _691.props, 'optionalAccess', _692 => _692.alias]), () => ( ""));
24251
+ if (node.type === "mention") return _nullishCoalesce(_optionalChain([node, 'access', _693 => _693.props, 'optionalAccess', _694 => _694.alias]), () => ( ""));
24232
24252
  if (typeof node.text === "string") return node.text;
24233
24253
  if (Array.isArray(node.content)) return node.content.map(readInline).join("");
24234
24254
  return "";
@@ -24344,7 +24364,7 @@ function AssistantPageContainer({
24344
24364
  AssistantSidebar,
24345
24365
  {
24346
24366
  threads: ctx.threads,
24347
- activeId: _optionalChain([ctx, 'access', _693 => _693.assistant, 'optionalAccess', _694 => _694.id]),
24367
+ activeId: _optionalChain([ctx, 'access', _695 => _695.assistant, 'optionalAccess', _696 => _696.id]),
24348
24368
  onSelect: ctx.selectThread,
24349
24369
  onNew: ctx.startNew
24350
24370
  }
@@ -24620,14 +24640,14 @@ function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipK
24620
24640
  const presented = _react.useMemo.call(void 0, () => parseOperatorProposal(actionProposal), [actionProposal]);
24621
24641
  const legacy = _react.useMemo.call(void 0, () => presented ? void 0 : parseLegacyProposal(toolArgs), [presented, toolArgs]);
24622
24642
  const isUpdate = toolName === "update_entity";
24623
- const entityType = _nullishCoalesce(_nullishCoalesce(_optionalChain([presented, 'optionalAccess', _695 => _695.type]), () => ( _optionalChain([legacy, 'optionalAccess', _696 => _696.type]))), () => ( ""));
24643
+ const entityType = _nullishCoalesce(_nullishCoalesce(_optionalChain([presented, 'optionalAccess', _697 => _697.type]), () => ( _optionalChain([legacy, 'optionalAccess', _698 => _698.type]))), () => ( ""));
24624
24644
  const loose = t;
24625
24645
  const entityLabel = entityName(loose, entityType);
24626
- const targetLabel = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _697 => _697.target, 'optionalAccess', _698 => _698.label]), () => ( ""));
24646
+ const targetLabel = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _699 => _699.target, 'optionalAccess', _700 => _700.label]), () => ( ""));
24627
24647
  const rows = _react.useMemo.call(void 0, () => {
24628
24648
  const yes = t("features.assistant.approval.proposal.yes");
24629
24649
  const no = t("features.assistant.approval.proposal.no");
24630
- const attributes = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _699 => _699.attributes]), () => ( _optionalChain([legacy, 'optionalAccess', _700 => _700.attributes])));
24650
+ const attributes = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _701 => _701.attributes]), () => ( _optionalChain([legacy, 'optionalAccess', _702 => _702.attributes])));
24631
24651
  const attributeRows = Object.entries(_nullishCoalesce(attributes, () => ( {}))).flatMap(([key, value]) => {
24632
24652
  const text = formatAttribute(value, yes, no);
24633
24653
  return text === void 0 ? [] : [{ key: `attribute:${key}`, label: fieldLabel(loose, entityType, key), value: text }];
@@ -24665,7 +24685,7 @@ function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipK
24665
24685
  try {
24666
24686
  const message = kind === "approve" ? await _chunk4ORLPEK7js.AssistantActionService.approve({ id: actionId }) : await _chunk4ORLPEK7js.AssistantActionService.deny({ id: actionId });
24667
24687
  setStatus(kind === "approve" ? "executed" : "denied");
24668
- if (message) _optionalChain([onResolved, 'optionalCall', _701 => _701(message)]);
24688
+ if (message) _optionalChain([onResolved, 'optionalCall', _703 => _703(message)]);
24669
24689
  } catch (error) {
24670
24690
  console.error(`ApprovalActionCard: failed to ${kind} assistant action ${actionId}`, error);
24671
24691
  setFailed(true);
@@ -24810,10 +24830,10 @@ var useNotificationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
24810
24830
  const dateLocale = _chunk4ORLPEK7js.dateFormatLocale.call(void 0, _chunk4ORLPEK7js.useI18nLocale.call(void 0, ));
24811
24831
  const generateUrl = usePageUrlGenerator();
24812
24832
  const { loadNotifications } = useNotificationContext();
24813
- const archived = _optionalChain([params, 'access', _702 => _702.context, 'optionalAccess', _703 => _703.archived]) === true;
24833
+ const archived = _optionalChain([params, 'access', _704 => _704.context, 'optionalAccess', _705 => _705.archived]) === true;
24814
24834
  const archiveNotification = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (notification) => {
24815
24835
  await _chunk4ORLPEK7js.NotificationService.archive({ id: notification.id });
24816
- _optionalChain([params, 'access', _704 => _704.dataRetriever, 'optionalAccess', _705 => _705.removeElement, 'call', _706 => _706(notification)]);
24836
+ _optionalChain([params, 'access', _706 => _706.dataRetriever, 'optionalAccess', _707 => _707.removeElement, 'call', _708 => _708(notification)]);
24817
24837
  await loadNotifications();
24818
24838
  }, "archiveNotification");
24819
24839
  const tableData = _react.useMemo.call(void 0, () => {
@@ -24852,7 +24872,7 @@ var useNotificationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
24852
24872
  const data = generateNotificationData({ notification, generateUrl });
24853
24873
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-foreground text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
24854
24874
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { className: "font-medium", children: chunks }), "strong"),
24855
- actor: _nullishCoalesce(_optionalChain([data, 'access', _707 => _707.actor, 'optionalAccess', _708 => _708.name]), () => ( "")),
24875
+ actor: _nullishCoalesce(_optionalChain([data, 'access', _709 => _709.actor, 'optionalAccess', _710 => _710.name]), () => ( "")),
24856
24876
  title: data.title,
24857
24877
  message: _nullishCoalesce(notification.message, () => ( ""))
24858
24878
  }) });
@@ -24907,7 +24927,7 @@ var useNotificationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
24907
24927
  })
24908
24928
  };
24909
24929
  const columns = _react.useMemo.call(void 0, () => {
24910
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _709 => _709[field], 'optionalCall', _710 => _710()])).filter((col) => col !== void 0);
24930
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _711 => _711[field], 'optionalCall', _712 => _712()])).filter((col) => col !== void 0);
24911
24931
  }, [params.fields, fieldColumnMap, t, generateUrl]);
24912
24932
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
24913
24933
  }, "useNotificationTableStructure");
@@ -25206,7 +25226,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, NotificationModal, "NotificationModal");
25206
25226
  // src/features/notification/components/notifications/PushNotificationProvider.tsx
25207
25227
 
25208
25228
  function PushNotificationProvider({ children }) {
25209
- usePushNotifications();
25229
+ const { currentUser, hasRole } = useCurrentUserContext();
25230
+ usePushNotifications({ currentUser: _nullishCoalesce(currentUser, () => ( void 0)), canSubscribe: !hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator) });
25210
25231
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children });
25211
25232
  }
25212
25233
  _chunk7QVYU63Ejs.__name.call(void 0, PushNotificationProvider, "PushNotificationProvider");
@@ -25324,7 +25345,7 @@ var DEFAULT_TRANSLATIONS = {
25324
25345
  invalidEmail: "Please enter a valid email address"
25325
25346
  };
25326
25347
  async function copyToClipboard(text) {
25327
- if (_optionalChain([navigator, 'access', _711 => _711.clipboard, 'optionalAccess', _712 => _712.writeText])) {
25348
+ if (_optionalChain([navigator, 'access', _713 => _713.clipboard, 'optionalAccess', _714 => _714.writeText])) {
25328
25349
  try {
25329
25350
  await navigator.clipboard.writeText(text);
25330
25351
  return true;
@@ -25366,7 +25387,7 @@ function ReferralWidget({
25366
25387
  const linkInputRef = _react.useRef.call(void 0, null);
25367
25388
  const config = _chunkGPXYQMOZjs.getReferralConfig.call(void 0, );
25368
25389
  const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
25369
- const referralUrl = _optionalChain([stats, 'optionalAccess', _713 => _713.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
25390
+ const referralUrl = _optionalChain([stats, 'optionalAccess', _715 => _715.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
25370
25391
  if (!_chunkGPXYQMOZjs.isReferralEnabled.call(void 0, )) {
25371
25392
  return null;
25372
25393
  }
@@ -25376,7 +25397,7 @@ function ReferralWidget({
25376
25397
  if (success) {
25377
25398
  setCopied(true);
25378
25399
  _chunk4ORLPEK7js.showToast.call(void 0, t.copiedMessage);
25379
- _optionalChain([onLinkCopied, 'optionalCall', _714 => _714()]);
25400
+ _optionalChain([onLinkCopied, 'optionalCall', _716 => _716()]);
25380
25401
  setTimeout(() => setCopied(false), 2e3);
25381
25402
  } else {
25382
25403
  _chunk4ORLPEK7js.showError.call(void 0, t.copyError);
@@ -25390,12 +25411,12 @@ function ReferralWidget({
25390
25411
  try {
25391
25412
  await sendInvite(email);
25392
25413
  _chunk4ORLPEK7js.showToast.call(void 0, t.inviteSent);
25393
- _optionalChain([onInviteSent, 'optionalCall', _715 => _715(email)]);
25414
+ _optionalChain([onInviteSent, 'optionalCall', _717 => _717(email)]);
25394
25415
  setEmail("");
25395
25416
  } catch (err) {
25396
25417
  const error2 = err instanceof Error ? err : new Error(t.inviteError);
25397
25418
  _chunk4ORLPEK7js.showError.call(void 0, error2.message);
25398
- _optionalChain([onInviteError, 'optionalCall', _716 => _716(error2)]);
25419
+ _optionalChain([onInviteError, 'optionalCall', _718 => _718(error2)]);
25399
25420
  }
25400
25421
  }, [email, sendInvite, t.inviteSent, t.inviteError, t.invalidEmail, onInviteSent, onInviteError]);
25401
25422
  const handleEmailKeyDown = _react.useCallback.call(void 0,
@@ -26163,7 +26184,7 @@ function OAuthClientList({
26163
26184
  OAuthClientCard,
26164
26185
  {
26165
26186
  client,
26166
- onClick: () => _optionalChain([onClientClick, 'optionalCall', _717 => _717(client)]),
26187
+ onClick: () => _optionalChain([onClientClick, 'optionalCall', _719 => _719(client)]),
26167
26188
  onEdit: onEditClick ? () => onEditClick(client) : void 0,
26168
26189
  onDelete: onDeleteClick ? () => onDeleteClick(client) : void 0
26169
26190
  },
@@ -26188,11 +26209,11 @@ function OAuthClientForm({
26188
26209
  const t = _nextintl.useTranslations.call(void 0, );
26189
26210
  const isEditMode = !!client;
26190
26211
  const [formState, setFormState] = _react.useState.call(void 0, {
26191
- name: _optionalChain([client, 'optionalAccess', _718 => _718.name]) || "",
26192
- description: _optionalChain([client, 'optionalAccess', _719 => _719.description]) || "",
26193
- redirectUris: _optionalChain([client, 'optionalAccess', _720 => _720.redirectUris, 'optionalAccess', _721 => _721.length]) ? client.redirectUris : [""],
26212
+ name: _optionalChain([client, 'optionalAccess', _720 => _720.name]) || "",
26213
+ description: _optionalChain([client, 'optionalAccess', _721 => _721.description]) || "",
26214
+ redirectUris: _optionalChain([client, 'optionalAccess', _722 => _722.redirectUris, 'optionalAccess', _723 => _723.length]) ? client.redirectUris : [""],
26194
26215
  allowedScopes: client ? client.allowedScopes || [] : defaultScopes,
26195
- isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _722 => _722.isConfidential]), () => ( true))
26216
+ isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _724 => _724.isConfidential]), () => ( true))
26196
26217
  });
26197
26218
  const [errors, setErrors] = _react.useState.call(void 0, {});
26198
26219
  const validate = _react.useCallback.call(void 0, () => {
@@ -26602,7 +26623,7 @@ function OAuthConsentScreen({
26602
26623
  if (error || !clientInfo) {
26603
26624
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-h-dvh flex items-center justify-center p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { className: "w-full max-w-md", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "py-8", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Alert, { variant: "destructive", children: [
26604
26625
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertTriangle, { className: "h-4 w-4" }),
26605
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _723 => _723.message]) || t("oauth.consent.invalid_request") })
26626
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _725 => _725.message]) || t("oauth.consent.invalid_request") })
26606
26627
  ] }) }) }) });
26607
26628
  }
26608
26629
  const { client, scopes } = clientInfo;
@@ -26823,7 +26844,7 @@ function WaitlistForm({ onSuccess }) {
26823
26844
  questionnaire: values.questionnaire
26824
26845
  });
26825
26846
  setIsSuccess(true);
26826
- _optionalChain([onSuccess, 'optionalCall', _724 => _724()]);
26847
+ _optionalChain([onSuccess, 'optionalCall', _726 => _726()]);
26827
26848
  } catch (e) {
26828
26849
  errorToast({ title: t("common.errors.error"), error: e });
26829
26850
  } finally {
@@ -27363,7 +27384,7 @@ var ModuleEditor = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs.__n
27363
27384
  ] }),
27364
27385
  roleIds.map((roleId) => {
27365
27386
  const roleTokens = block[roleId];
27366
- const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _725 => _725[roleId]]), () => ( roleId));
27387
+ const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _727 => _727[roleId]]), () => ( roleId));
27367
27388
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
27368
27389
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: roleLabel }),
27369
27390
  _chunkGPXYQMOZjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -27400,7 +27421,7 @@ function RbacContainer() {
27400
27421
  }, []);
27401
27422
  const sortedModuleIds = _react.useMemo.call(void 0, () => {
27402
27423
  if (!matrix) return [];
27403
- return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _726 => _726[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _727 => _727[b]]), () => ( b))));
27424
+ return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _728 => _728[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _729 => _729[b]]), () => ( b))));
27404
27425
  }, [matrix, moduleNames]);
27405
27426
  const roleIds = _react.useMemo.call(void 0, () => {
27406
27427
  if (roleNames) {
@@ -27463,7 +27484,7 @@ function RbacContainer() {
27463
27484
  id === selectedModuleId && "bg-muted font-medium text-foreground",
27464
27485
  id !== selectedModuleId && "text-muted-foreground"
27465
27486
  ),
27466
- children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _728 => _728[id]]), () => ( id))
27487
+ children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _730 => _730[id]]), () => ( id))
27467
27488
  }
27468
27489
  ) }, id)) }) }),
27469
27490
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: selectedModuleId && selectedBlock ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -27471,7 +27492,7 @@ function RbacContainer() {
27471
27492
  {
27472
27493
  moduleId: selectedModuleId,
27473
27494
  block: selectedBlock,
27474
- moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _729 => _729[selectedModuleId]]), () => ( selectedModuleId)),
27495
+ moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _731 => _731[selectedModuleId]]), () => ( selectedModuleId)),
27475
27496
  roleIds,
27476
27497
  roleNames,
27477
27498
  onOpenPicker: openPicker
@@ -27482,12 +27503,12 @@ function RbacContainer() {
27482
27503
  RbacPermissionPicker,
27483
27504
  {
27484
27505
  open: !!activePicker,
27485
- anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _730 => _730.anchor]), () => ( null)),
27506
+ anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _732 => _732.anchor]), () => ( null)),
27486
27507
  value: activeValue,
27487
- isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _731 => _731.isRoleColumn]), () => ( false)),
27508
+ isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _733 => _733.isRoleColumn]), () => ( false)),
27488
27509
  knownSegments: activeSegments,
27489
27510
  onSetValue: handleSetValue,
27490
- onClear: _optionalChain([activePicker, 'optionalAccess', _732 => _732.isRoleColumn]) ? handleClear : void 0,
27511
+ onClear: _optionalChain([activePicker, 'optionalAccess', _734 => _734.isRoleColumn]) ? handleClear : void 0,
27491
27512
  onClose: closePicker
27492
27513
  }
27493
27514
  )
@@ -27554,7 +27575,7 @@ function RbacByRoleContainer() {
27554
27575
  }, [roleNames]);
27555
27576
  const sortedModuleIds = _react.useMemo.call(void 0, () => {
27556
27577
  if (!matrix) return [];
27557
- return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _733 => _733[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _734 => _734[b]]), () => ( b))));
27578
+ return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _735 => _735[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _736 => _736[b]]), () => ( b))));
27558
27579
  }, [matrix, moduleNames]);
27559
27580
  _react.useEffect.call(void 0, () => {
27560
27581
  if (!selectedRoleId && sortedRoleIds.length > 0) {
@@ -27603,7 +27624,7 @@ function RbacByRoleContainer() {
27603
27624
  id === selectedRoleId && "bg-muted font-medium text-foreground",
27604
27625
  id !== selectedRoleId && "text-muted-foreground"
27605
27626
  ),
27606
- children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _735 => _735[id]]), () => ( id))
27627
+ children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _737 => _737[id]]), () => ( id))
27607
27628
  }
27608
27629
  ) }, id)) }) }),
27609
27630
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: sortedModuleIds.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-lg border border-accent bg-card", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "table", { className: "w-full text-sm", children: [
@@ -27623,7 +27644,7 @@ function RbacByRoleContainer() {
27623
27644
  if (!block) return null;
27624
27645
  const defaultTokens = _nullishCoalesce(block.default, () => ( []));
27625
27646
  const roleTokens = block[selectedRoleId];
27626
- const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _736 => _736[moduleId]]), () => ( moduleId));
27647
+ const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _738 => _738[moduleId]]), () => ( moduleId));
27627
27648
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
27628
27649
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { className: "border-b bg-muted/40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
27629
27650
  "td",
@@ -27638,7 +27659,7 @@ function RbacByRoleContainer() {
27638
27659
  _chunkGPXYQMOZjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RbacPermissionCell, { value: cellValue2(defaultTokens, action) }) }, action))
27639
27660
  ] }),
27640
27661
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
27641
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _737 => _737[selectedRoleId]]), () => ( selectedRoleId)) }),
27662
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _739 => _739[selectedRoleId]]), () => ( selectedRoleId)) }),
27642
27663
  _chunkGPXYQMOZjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
27643
27664
  CellButton3,
27644
27665
  {
@@ -27659,12 +27680,12 @@ function RbacByRoleContainer() {
27659
27680
  RbacPermissionPicker,
27660
27681
  {
27661
27682
  open: !!activePicker,
27662
- anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _738 => _738.anchor]), () => ( null)),
27683
+ anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _740 => _740.anchor]), () => ( null)),
27663
27684
  value: activeValue,
27664
- isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _739 => _739.isRoleColumn]), () => ( false)),
27685
+ isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _741 => _741.isRoleColumn]), () => ( false)),
27665
27686
  knownSegments: activeSegments,
27666
27687
  onSetValue: handleSetValue,
27667
- onClear: _optionalChain([activePicker, 'optionalAccess', _740 => _740.isRoleColumn]) ? handleClear : void 0,
27688
+ onClear: _optionalChain([activePicker, 'optionalAccess', _742 => _742.isRoleColumn]) ? handleClear : void 0,
27668
27689
  onClose: closePicker
27669
27690
  }
27670
27691
  )
@@ -28282,4 +28303,4 @@ _chunk7QVYU63Ejs.__name.call(void 0, RbacByRoleContainer, "RbacByRoleContainer")
28282
28303
 
28283
28304
 
28284
28305
  exports.JsonApiProvider = JsonApiProvider; exports.useJsonApiGet = useJsonApiGet; exports.useJsonApiMutation = useJsonApiMutation; exports.useRehydration = useRehydration; exports.useRehydrationList = useRehydrationList; exports.TableGeneratorRegistry = TableGeneratorRegistry; exports.tableGeneratorRegistry = tableGeneratorRegistry; exports.usePageUrlGenerator = usePageUrlGenerator; exports.useUrlRewriter = useUrlRewriter; exports.useDataListRetriever = useDataListRetriever; exports.useDebounce = useDebounce2; exports.registerTableGenerator = registerTableGenerator; exports.useTableGenerator = useTableGenerator; exports.computeLayeredLayout = computeLayeredLayout; exports.fitLayeredLayoutToAspectRatio = fitLayeredLayoutToAspectRatio; exports.useCustomD3Graph = useCustomD3Graph; exports.SharedProvider = SharedProvider; exports.useSharedContext = useSharedContext; exports.AdministrationProvider = AdministrationProvider; exports.useAdministrationContext = useAdministrationContext; exports.SocketContext = SocketContext; exports.SocketProvider = SocketProvider; exports.useSocketContext = useSocketContext; exports.CurrentUserProvider = CurrentUserProvider; exports.useCurrentUserContext = useCurrentUserContext; exports.useCurrentUserContextOptional = useCurrentUserContextOptional; exports.Accordion = Accordion; exports.AccordionItem = AccordionItem; exports.AccordionTrigger = AccordionTrigger; exports.AccordionContent = AccordionContent; exports.Alert = Alert; exports.AlertTitle = AlertTitle; exports.AlertDescription = AlertDescription; exports.AlertAction = AlertAction; exports.buttonVariants = buttonVariants; exports.Button = Button; exports.AlertDialog = AlertDialog; exports.AlertDialogTrigger = AlertDialogTrigger; exports.AlertDialogPortal = AlertDialogPortal; exports.AlertDialogOverlay = AlertDialogOverlay; exports.AlertDialogContent = AlertDialogContent; exports.AlertDialogHeader = AlertDialogHeader; exports.AlertDialogFooter = AlertDialogFooter; exports.AlertDialogMedia = AlertDialogMedia; exports.AlertDialogTitle = AlertDialogTitle; exports.AlertDialogDescription = AlertDialogDescription; exports.AlertDialogAction = AlertDialogAction; exports.AlertDialogCancel = AlertDialogCancel; exports.Avatar = Avatar; exports.AvatarImage = AvatarImage; exports.AvatarFallback = AvatarFallback; exports.AvatarBadge = AvatarBadge; exports.AvatarGroup = AvatarGroup; exports.AvatarGroupCount = AvatarGroupCount; exports.badgeVariants = badgeVariants; exports.Badge = Badge; exports.Breadcrumb = Breadcrumb; exports.BreadcrumbList = BreadcrumbList; exports.BreadcrumbItem = BreadcrumbItem; exports.BreadcrumbLink = BreadcrumbLink; exports.BreadcrumbPage = BreadcrumbPage; exports.BreadcrumbSeparator = BreadcrumbSeparator; exports.BreadcrumbEllipsis = BreadcrumbEllipsis; exports.DirectionProvider = DirectionProvider; exports.useDir = useDir; exports.Calendar = Calendar; exports.CalendarDayButton = CalendarDayButton; exports.Card = Card; exports.CardHeader = CardHeader; exports.CardTitle = CardTitle; exports.CardDescription = CardDescription; exports.CardAction = CardAction; exports.CardContent = CardContent; exports.CardFooter = CardFooter; exports.useCarousel = useCarousel; exports.Carousel = Carousel; exports.CarouselContent = CarouselContent; exports.CarouselItem = CarouselItem; exports.CarouselPrevious = CarouselPrevious; exports.CarouselNext = CarouselNext; exports.ChartContainer = ChartContainer; exports.ChartStyle = ChartStyle; exports.ChartTooltip = ChartTooltip; exports.ChartTooltipContent = ChartTooltipContent; exports.ChartLegend = ChartLegend; exports.ChartLegendContent = ChartLegendContent; exports.Checkbox = Checkbox; exports.Collapsible = Collapsible; exports.CollapsibleTrigger = CollapsibleTrigger; exports.CollapsibleContent = CollapsibleContent; exports.Input = Input; exports.Textarea = Textarea; exports.InputGroup = InputGroup; exports.InputGroupAddon = InputGroupAddon; exports.InputGroupButton = InputGroupButton; exports.InputGroupText = InputGroupText; exports.InputGroupInput = InputGroupInput; exports.InputGroupTextarea = InputGroupTextarea; exports.Combobox = Combobox; exports.ComboboxValue = ComboboxValue; exports.ComboboxTrigger = ComboboxTrigger; exports.ComboboxInput = ComboboxInput; exports.ComboboxContent = ComboboxContent; exports.ComboboxList = ComboboxList; exports.ComboboxItem = ComboboxItem; exports.ComboboxGroup = ComboboxGroup; exports.ComboboxLabel = ComboboxLabel; exports.ComboboxCollection = ComboboxCollection; exports.ComboboxEmpty = ComboboxEmpty; exports.ComboboxSeparator = ComboboxSeparator; exports.ComboboxChips = ComboboxChips; exports.ComboboxChip = ComboboxChip; exports.ComboboxChipsInput = ComboboxChipsInput; exports.useComboboxAnchor = useComboboxAnchor; exports.Dialog = Dialog; exports.DialogTrigger = DialogTrigger; exports.DialogPortal = DialogPortal; exports.DialogClose = DialogClose; exports.DialogOverlay = DialogOverlay; exports.DialogContent = DialogContent; exports.DialogHeader = DialogHeader; exports.DialogFooter = DialogFooter; exports.DialogTitle = DialogTitle; exports.DialogDescription = DialogDescription; exports.Command = Command; exports.CommandDialog = CommandDialog; exports.CommandInput = CommandInput; exports.CommandList = CommandList; exports.CommandEmpty = CommandEmpty; exports.CommandGroup = CommandGroup; exports.CommandSeparator = CommandSeparator; exports.CommandItem = CommandItem; exports.CommandShortcut = CommandShortcut; exports.commandFilterByKeywords = commandFilterByKeywords; exports.ConfirmDialog = ConfirmDialog; exports.ContextMenu = ContextMenu; exports.ContextMenuPortal = ContextMenuPortal; exports.ContextMenuTrigger = ContextMenuTrigger; exports.ContextMenuContent = ContextMenuContent; exports.ContextMenuGroup = ContextMenuGroup; exports.ContextMenuLabel = ContextMenuLabel; exports.ContextMenuItem = ContextMenuItem; exports.ContextMenuSub = ContextMenuSub; exports.ContextMenuSubTrigger = ContextMenuSubTrigger; exports.ContextMenuSubContent = ContextMenuSubContent; exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem; exports.ContextMenuRadioGroup = ContextMenuRadioGroup; exports.ContextMenuRadioItem = ContextMenuRadioItem; exports.ContextMenuSeparator = ContextMenuSeparator; exports.ContextMenuShortcut = ContextMenuShortcut; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerPortal = DrawerPortal; exports.DrawerClose = DrawerClose; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerFooter = DrawerFooter; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DropdownMenu = DropdownMenu; exports.DropdownMenuPortal = DropdownMenuPortal; exports.DropdownMenuTrigger = DropdownMenuTrigger; exports.DropdownMenuContent = DropdownMenuContent; exports.DropdownMenuGroup = DropdownMenuGroup; exports.DropdownMenuLabel = DropdownMenuLabel; exports.DropdownMenuItem = DropdownMenuItem; exports.DropdownMenuSub = DropdownMenuSub; exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger; exports.DropdownMenuSubContent = DropdownMenuSubContent; exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem; exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup; exports.DropdownMenuRadioItem = DropdownMenuRadioItem; exports.DropdownMenuSeparator = DropdownMenuSeparator; exports.DropdownMenuShortcut = DropdownMenuShortcut; exports.EmptyState = EmptyState; exports.Label = Label; exports.Separator = Separator; exports.FieldSet = FieldSet; exports.FieldLegend = FieldLegend; exports.FieldGroup = FieldGroup; exports.Field = Field; exports.FieldContent = FieldContent; exports.FieldLabel = FieldLabel; exports.FieldTitle = FieldTitle; exports.FieldDescription = FieldDescription; exports.FieldSeparator = FieldSeparator; exports.FieldError = FieldError; exports.Form = Form; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.InputOTP = InputOTP; exports.InputOTPGroup = InputOTPGroup; exports.InputOTPSlot = InputOTPSlot; exports.InputOTPSeparator = InputOTPSeparator; exports.NavigationMenu = NavigationMenu; exports.NavigationMenuList = NavigationMenuList; exports.NavigationMenuItem = NavigationMenuItem; exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle; exports.NavigationMenuTrigger = NavigationMenuTrigger; exports.NavigationMenuContent = NavigationMenuContent; exports.NavigationMenuPositioner = NavigationMenuPositioner; exports.NavigationMenuLink = NavigationMenuLink; exports.NavigationMenuIndicator = NavigationMenuIndicator; exports.Popover = Popover; exports.PopoverTrigger = PopoverTrigger; exports.PopoverContent = PopoverContent; exports.PopoverHeader = PopoverHeader; exports.PopoverTitle = PopoverTitle; exports.PopoverDescription = PopoverDescription; exports.Progress = Progress; exports.ProgressTrack = ProgressTrack; exports.ProgressIndicator = ProgressIndicator; exports.ProgressLabel = ProgressLabel; exports.ProgressValue = ProgressValue; exports.RadioGroup = RadioGroup; exports.RadioGroupItem = RadioGroupItem; exports.ResizablePanelGroup = ResizablePanelGroup; exports.ResizablePanel = ResizablePanel; exports.ResizableHandle = ResizableHandle; exports.ScrollArea = ScrollArea; exports.ScrollBar = ScrollBar; exports.Select = Select; exports.SelectGroup = SelectGroup; exports.SelectValue = SelectValue; exports.SelectTrigger = SelectTrigger; exports.SelectContent = SelectContent; exports.SelectLabel = SelectLabel; exports.SelectItem = SelectItem; exports.SelectSeparator = SelectSeparator; exports.SelectScrollUpButton = SelectScrollUpButton; exports.SelectScrollDownButton = SelectScrollDownButton; exports.Sheet = Sheet; exports.SheetTrigger = SheetTrigger; exports.SheetClose = SheetClose; exports.SheetContent = SheetContent; exports.SheetHeader = SheetHeader; exports.SheetFooter = SheetFooter; exports.SheetTitle = SheetTitle; exports.SheetDescription = SheetDescription; exports.Skeleton = Skeleton; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip2; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.useSidebar = useSidebar; exports.useSidebarControls = useSidebarControls; exports.useOptionalSidebar = useOptionalSidebar; exports.SidebarProvider = SidebarProvider; exports.Sidebar = Sidebar; exports.SidebarTrigger = SidebarTrigger; exports.SidebarRail = SidebarRail; exports.SidebarInset = SidebarInset; exports.SidebarInput = SidebarInput; exports.SidebarHeader = SidebarHeader; exports.SidebarFooter = SidebarFooter; exports.SidebarSeparator = SidebarSeparator; exports.SidebarContent = SidebarContent; exports.SidebarGroup = SidebarGroup; exports.SidebarGroupLabel = SidebarGroupLabel; exports.SidebarGroupAction = SidebarGroupAction; exports.SidebarGroupContent = SidebarGroupContent; exports.SidebarMenu = SidebarMenu; exports.SidebarMenuItem = SidebarMenuItem; exports.SidebarMenuButton = SidebarMenuButton; exports.SidebarMenuAction = SidebarMenuAction; exports.SidebarMenuBadge = SidebarMenuBadge; exports.SidebarMenuSkeleton = SidebarMenuSkeleton; exports.SidebarMenuSub = SidebarMenuSub; exports.SidebarMenuSubItem = SidebarMenuSubItem; exports.SidebarMenuSubButton = SidebarMenuSubButton; exports.Slider = Slider; exports.Toaster = Toaster; exports.spinnerVariants = spinnerVariants; exports.Spinner = Spinner; exports.Switch = Switch; exports.Table = Table; exports.TableHeader = TableHeader; exports.TableBody = TableBody; exports.TableFooter = TableFooter; exports.TableRow = TableRow; exports.TableHead = TableHead; exports.TableCell = TableCell; exports.TableCaption = TableCaption; exports.Tabs = Tabs; exports.tabsListVariants = tabsListVariants; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.toggleVariants = toggleVariants; exports.Toggle = Toggle; exports.KanbanRoot = KanbanRoot; exports.KanbanBoard = KanbanBoard; exports.KanbanColumn = KanbanColumn; exports.KanbanColumnHandle = KanbanColumnHandle; exports.KanbanItem = KanbanItem; exports.KanbanItemHandle = KanbanItemHandle; exports.KanbanOverlay = KanbanOverlay; exports.Link = Link; exports.MultiSelect = MultiSelect; exports.useDebounce2 = useDebounce; exports.MultipleSelector = MultipleSelector; exports.EntityAvatar = EntityAvatar; exports.errorToast = errorToast; exports.EditableAvatar = EditableAvatar; exports.TableCellAvatar = TableCellAvatar; exports.HeaderChildrenProvider = HeaderChildrenProvider; exports.useHeaderChildren = useHeaderChildren; exports.useHeaderMobileChildren = useHeaderMobileChildren; exports.useHeaderRootLabel = useHeaderRootLabel; exports.HeaderLeftContentProvider = HeaderLeftContentProvider; exports.useHeaderLeftContent = useHeaderLeftContent; exports.HeaderLogoProvider = HeaderLogoProvider; exports.useHeaderLogo = useHeaderLogo; exports.BreadcrumbNavigation = BreadcrumbNavigation; exports.ContentTitle = ContentTitle; exports.BreadcrumbRootProvider = BreadcrumbRootProvider; exports.useIsBreadcrumbRootHidden = useIsBreadcrumbRootHidden; exports.Header = Header; exports.MobileNavigationProvider = MobileNavigationProvider; exports.useMobileNavigationItems = useMobileNavigationItems; exports.MobileNavigationBar = MobileNavigationBar; exports.ModeToggleSwitch = ModeToggleSwitch; exports.PageSection = PageSection; exports.recentPagesAtom = recentPagesAtom; exports.RecentPagesNavigator = RecentPagesNavigator; exports.PageContainer = PageContainer; exports.partitionTabs = partitionTabs; exports.MermaidDiagram = MermaidDiagram; exports.ReactMarkdownContainer = ReactMarkdownContainer; exports.HEADER_ROW_MIN_H = HEADER_ROW_MIN_H; exports.RoundPageContainerTitle = RoundPageContainerTitle; exports.SectionHeader = SectionHeader; exports.MicroLabel = MicroLabel; exports.DetailField = DetailField; exports.RoundPageContainer = RoundPageContainer; exports.TabsContainer = TabsContainer; exports.AttributeElement = AttributeElement; exports.AllUsersListContainer = AllUsersListContainer; exports.PlatformUsersList = PlatformUsersList; exports.PlatformUsersContainer = PlatformUsersContainer; exports.UserContent = UserContent; exports.UserAvatar = UserAvatar; exports.UserAvatarList = UserAvatarList; exports.useUserSearch = useUserSearch; exports.useUserTableStructure = useUserTableStructure; exports.UserSearchPopover = UserSearchPopover; exports.UserIndexDetails = UserIndexDetails; exports.UserStanadaloneDetails = UserStanadaloneDetails; exports.UserContainer = UserContainer; exports.UserIndexContainer = UserIndexContainer; exports.UsersListContainer = UsersListContainer; exports.AdminUsersList = AdminUsersList; exports.CompanyUsersList = CompanyUsersList; exports.ContributorsList = ContributorsList; exports.RelevantUsersList = RelevantUsersList; exports.RoleUsersList = RoleUsersList; exports.UserListInAdd = UserListInAdd; exports.UsersList = UsersList; exports.UsersListByContentIds = UsersListByContentIds; exports.AllowedUsersDetails = AllowedUsersDetails; exports.ErrorDetails = ErrorDetails; exports.BlockNoteEditorMentionHoverCard = BlockNoteEditorMentionHoverCard; exports.mentionDataAttrs = mentionDataAttrs; exports.parseMentionElement = parseMentionElement; exports.createMentionInlineContentSpec = createMentionInlineContentSpec; exports.useMentionInsert = useMentionInsert; exports.BlockNoteEditorMentionSuggestionMenu = BlockNoteEditorMentionSuggestionMenu; exports.BlockNoteEditorContainer = BlockNoteEditorContainer; exports.BlockNoteViewerContainer = BlockNoteViewerContainer; exports.FormFeatures = FormFeatures; exports.CommonAssociationTrigger = CommonAssociationTrigger; exports.CommonAssociationCommandDialog = CommonAssociationCommandDialog; exports.triggerAssociationToast = triggerAssociationToast; exports.ActionBarProvider = ActionBarProvider; exports.useIsInActionBar = useIsInActionBar; exports.CommonDeleter = CommonDeleter; exports.CommonEditorButtons = CommonEditorButtons; exports.CommonEditorDiscardDialog = CommonEditorDiscardDialog; exports.CommonEditorHeader = CommonEditorHeader; exports.CommonEditorTrigger = CommonEditorTrigger; exports.CommonAddTrigger = CommonAddTrigger; exports.CurrencyInput = CurrencyInput; exports.DatePickerPopover = DatePickerPopover; exports.nextDateRange = nextDateRange; exports.DateRangeSelector = DateRangeSelector; exports.hasOpenInnerLayer = hasOpenInnerLayer; exports.useEditorDialog = useEditorDialog; exports.EditorSheet = EditorSheet; exports.FormFieldWrapper = FormFieldWrapper; exports.EntityMultiSelector = EntityMultiSelector; exports.EntitySelector = EntitySelector; exports.useFileUpload = useFileUpload; exports.FileUploader = FileUploader; exports.FileUploaderContent = FileUploaderContent; exports.FileUploaderItem = FileUploaderItem; exports.FileInput = FileInput; exports.FormBlockNote = FormBlockNote; exports.FormCheckbox = FormCheckbox; exports.FormDate = FormDate; exports.FormDateTime = FormDateTime; exports.FormInput = FormInput; exports.FormBody = FormBody; exports.FormSection = FormSection; exports.FormRow = FormRow; exports.FormCol = FormCol; exports.PasswordInput = PasswordInput; exports.FormPassword = FormPassword; exports.FormPlaceAutocomplete = FormPlaceAutocomplete; exports.FormSelect = FormSelect; exports.FormSlider = FormSlider; exports.FormSwitch = FormSwitch; exports.FormTextarea = FormTextarea; exports.GdprConsentCheckbox = GdprConsentCheckbox; exports.MultiFileUploader = MultiFileUploader; exports.PageContainerContentDetails = PageContainerContentDetails; exports.PageContentContainer = PageContentContainer; exports.cellComponent = cellComponent; exports.cellDate = cellDate; exports.cellDateTime = cellDateTime; exports.cellId = cellId; exports.cellLink = cellLink; exports.cellUrl = cellUrl; exports.ContentTableSearch = ContentTableSearch; exports.ContentListTable = ContentListTable; exports.ContentListGrid = ContentListGrid; exports.ItalianFiscalData_default = ItalianFiscalData_default; exports.ItalianFiscalDataDisplay = ItalianFiscalDataDisplay; exports.parseFiscalData = parseFiscalData; exports.FiscalDataDisplay = FiscalDataDisplay; exports.EntityHeroLayout = EntityHeroLayout; exports.EntityHero = EntityHero; exports.EntityHeroAvatar = EntityHeroAvatar; exports.EntityHeroMetaRow = EntityHeroMetaRow; exports.EntitySection = EntitySection; exports.GdprConsentSection = GdprConsentSection; exports.AuthContainer = AuthContainer; exports.BackupCodesDialog = BackupCodesDialog; exports.TotpInput = TotpInput; exports.DisableTwoFactorDialog = DisableTwoFactorDialog; exports.PasskeyList = PasskeyList; exports.PasskeySetupDialog = PasskeySetupDialog; exports.TotpAuthenticatorList = TotpAuthenticatorList; exports.TotpSetupDialog = TotpSetupDialog; exports.TwoFactorSettings = TwoFactorSettings; exports.SecurityContainer = SecurityContainer; exports.LandingComponent = LandingComponent; exports.AcceptInvitation = AcceptInvitation; exports.ActivateAccount = ActivateAccount; exports.Cookies = Cookies; exports.ForgotPassword = ForgotPassword; exports.Login = Login; exports.Logout = Logout; exports.RefreshUser = RefreshUser; exports.ResetPassword = ResetPassword; exports.PasskeyButton = PasskeyButton; exports.TwoFactorChallenge = TwoFactorChallenge; exports.AdminIndexGrid = AdminIndexGrid; exports.AdminIndexContainer = AdminIndexContainer; exports.ADMINISTRATION_I18N_KEYS = ADMINISTRATION_I18N_KEYS; exports.AI_CONNECTIONS_I18N_KEYS = AI_CONNECTIONS_I18N_KEYS; exports.AI_CONNECTIONS_ADMIN_PAGE_URL = AI_CONNECTIONS_ADMIN_PAGE_URL; exports.AiConnectionsProvider = AiConnectionsProvider; exports.useAiConnections = useAiConnections; exports.AiConnectionDeleter = AiConnectionDeleter; exports.AiConnectionEditor = AiConnectionEditor; exports.AiConnectionTypeCard = AiConnectionTypeCard; exports.AI_CONNECTION_TYPE_ORDER = AI_CONNECTION_TYPE_ORDER; exports.AiConnectionsContainer = AiConnectionsContainer; exports.CompanyContent = CompanyContent; exports.TokenStatusIndicator = TokenStatusIndicator; exports.CompanyDetails = CompanyDetails; exports.AdminCompanyContainer = AdminCompanyContainer; exports.CompanyEditor = CompanyEditor; exports.CompaniesList = CompaniesList; exports.CompaniesListContainer = CompaniesListContainer; exports.CompanyContainer = CompanyContainer; exports.CompanyConfigurationEditor = CompanyConfigurationEditor; exports.CompanyDeleter = CompanyDeleter; exports.ContentsList = ContentsList; exports.ContentsListById = ContentsListById; exports.RelevantContentsList = RelevantContentsList; exports.HowToCommandViewer = HowToCommandViewer; exports.HowToCommand = HowToCommand; exports.HowToDeleter = HowToDeleter; exports.HowToMultiSelector = HowToMultiSelector; exports.HowToEditor = HowToEditor; exports.HowToProvider = HowToProvider; exports.useHowToContext = useHowToContext; exports.HowToContent = HowToContent; exports.HowToDetails = HowToDetails; exports.HowToContainer = HowToContainer; exports.HowToReindexButton = HowToReindexButton; exports.HowToList = HowToList; exports.HowToListContainer = HowToListContainer; exports.HowToSelector = HowToSelector; exports.AssistantComposer = AssistantComposer; exports.MessageSourcesPanel = MessageSourcesPanel; exports.MessageItem = MessageItem; exports.MessageList = MessageList; exports.AssistantThread = AssistantThread; exports.HandbookAskSheet = HandbookAskSheet; exports.HandbookSyncButton = HandbookSyncButton; exports.HandbookIndexStatus = HandbookIndexStatus; exports.HandbookSectionGroup = HandbookSectionGroup; exports.HandbookContents = HandbookContents; exports.HandbookAdminContainer = HandbookAdminContainer; exports.HandbookPageDetails = HandbookPageDetails; exports.HandbookPageNeighbours = HandbookPageNeighbours; exports.HandbookPageToc = HandbookPageToc; exports.HandbookPageNavigator = HandbookPageNavigator; exports.HandbookPageContainer = HandbookPageContainer; exports.HandbookAskContainer = HandbookAskContainer; exports.EntityMentionLink = EntityMentionLink; exports.AssistantProvider = AssistantProvider; exports.useAssistantContext = useAssistantContext; exports.AssistantEmptyState = AssistantEmptyState; exports.AssistantContainer = AssistantContainer; exports.AssistantBlockNoteComposer = AssistantBlockNoteComposer; exports.AssistantPageContainer = AssistantPageContainer; exports.ApprovalActionCard = ApprovalActionCard; exports.AssistantContainerWithApprovals = AssistantContainerWithApprovals; exports.NotificationErrorBoundary = NotificationErrorBoundary; exports.NotificationIcon = NotificationIcon; exports.generateNotificationData = generateNotificationData; exports.NotificationToast = NotificationToast; exports.NotificationMenuItem = NotificationMenuItem; exports.NotificationContextProvider = NotificationContextProvider; exports.useNotificationContext = useNotificationContext; exports.NotificationViewSwitcher = NotificationViewSwitcher; exports.NotificationsList = NotificationsList; exports.NotificationsListContainer = NotificationsListContainer; exports.NotificationModal = NotificationModal; exports.PushNotificationProvider = PushNotificationProvider; exports.OnboardingCard = OnboardingCard; exports.ReferralCodeCapture = ReferralCodeCapture; exports.ReferralWidget = ReferralWidget; exports.ReferralDialog = ReferralDialog; exports.RoleProvider = RoleProvider; exports.useRoleContext = useRoleContext; exports.RoleDetails = RoleDetails; exports.RoleContainer = RoleContainer; exports.FormRoles = FormRoles; exports.RemoveUserFromRole = RemoveUserFromRole; exports.UserRoleAdd = UserRoleAdd; exports.useRoleTableStructure = useRoleTableStructure; exports.RolesList = RolesList; exports.UserRolesList = UserRolesList; exports.OAuthRedirectUriInput = OAuthRedirectUriInput; exports.useOAuthScopeText = useOAuthScopeText; exports.OAuthScopeSelector = OAuthScopeSelector; exports.OAuthClientSecretDisplay = OAuthClientSecretDisplay; exports.OAuthClientCard = OAuthClientCard; exports.OAuthClientList = OAuthClientList; exports.OAuthClientForm = OAuthClientForm; exports.OAuthClientDetail = OAuthClientDetail; exports.OAuthConsentHeader = OAuthConsentHeader; exports.OAuthScopeList = OAuthScopeList; exports.OAuthConsentActions = OAuthConsentActions; exports.OAuthCompanySelector = OAuthCompanySelector; exports.useOAuthConsent = useOAuthConsent; exports.OAuthConsentScreen = OAuthConsentScreen; exports.WaitlistQuestionnaireRenderer = WaitlistQuestionnaireRenderer; exports.WaitlistForm = WaitlistForm; exports.WaitlistHeroSection = WaitlistHeroSection; exports.WaitlistSuccessState = WaitlistSuccessState; exports.WaitlistConfirmation = WaitlistConfirmation; exports.WaitlistList = WaitlistList; exports.RbacProvider = RbacProvider; exports.useRbacContext = useRbacContext; exports.RbacPermissionCell = RbacPermissionCell; exports.RbacPermissionPicker = RbacPermissionPicker; exports.RbacContainer = RbacContainer; exports.RbacByRoleContainer = RbacByRoleContainer; exports.AddUserToRole = AddUserToRole; exports.UserAvatarEditor = UserAvatarEditor; exports.UserDeleter = UserDeleter; exports.UserEditor = UserEditor; exports.UserMultiSelect = UserMultiSelect; exports.UserReactivator = UserReactivator; exports.UserResentInvitationEmail = UserResentInvitationEmail; exports.UserSelector = UserSelector; exports.UserProvider = UserProvider; exports.useUserContext = useUserContext; exports.CompanyProvider = CompanyProvider; exports.useCompanyContext = useCompanyContext; exports.DEFAULT_ONBOARDING_LABELS = DEFAULT_ONBOARDING_LABELS; exports.mapOnboardingSide = mapOnboardingSide; exports.OnboardingProvider = OnboardingProvider; exports.useOnboarding = useOnboarding; exports.CommonProvider = CommonProvider; exports.useCommonContext = useCommonContext; exports.SessionProvider = SessionProvider; exports.useSession = useSession; exports.ViewportProvider = ViewportProvider; exports.useNotificationSync = useNotificationSync; exports.usePageTracker = usePageTracker; exports.useSocket = useSocket; exports.useSubscriptionStatus = useSubscriptionStatus; exports.formatInterval = formatInterval; exports.formatCurrency = formatCurrency; exports.formatFixed = formatFixed; exports.formatDate = formatDate2; exports.useBillingFormatOptions = useBillingFormatOptions; exports.useContentTableStructure = useContentTableStructure; exports.useOAuthClients = useOAuthClients; exports.useOAuthClient = useOAuthClient;
28285
- //# sourceMappingURL=chunk-GYW7LLBQ.js.map
28306
+ //# sourceMappingURL=chunk-TPGXNPGY.js.map