@carlonicora/nextjs-jsonapi 1.100.0 → 1.100.2

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.
@@ -6586,6 +6586,21 @@ _chunk7QVYU63Ejs.__name.call(void 0, fitLayeredLayoutToAspectRatio, "fitLayeredL
6586
6586
 
6587
6587
  // src/hooks/useCustomD3Graph.tsx
6588
6588
 
6589
+ var TITLE_PX_PER_CHAR_162 = 8;
6590
+ var NAME_PX_PER_CHAR_122 = 6.5;
6591
+ var NAME_PX_PER_CHAR_16_BOLD2 = 8;
6592
+ var SUBTITLE_PX_PER_CHAR_112 = 6;
6593
+ var LABEL_PADDING_PX2 = 16;
6594
+ function estimateLabelWidth2(node) {
6595
+ if (node.subtitle) {
6596
+ const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access', _138 => _138.name, 'optionalAccess', _139 => _139.length]), () => ( 0))) * TITLE_PX_PER_CHAR_162;
6597
+ const subtitleWidth = node.subtitle.length * SUBTITLE_PX_PER_CHAR_112;
6598
+ return Math.max(titleWidth, subtitleWidth) + LABEL_PADDING_PX2;
6599
+ }
6600
+ const perChar = node.bold ? NAME_PX_PER_CHAR_16_BOLD2 : NAME_PX_PER_CHAR_122;
6601
+ return (_nullishCoalesce(_optionalChain([node, 'access', _140 => _140.name, 'optionalAccess', _141 => _141.length]), () => ( 0))) * perChar + LABEL_PADDING_PX2;
6602
+ }
6603
+ _chunk7QVYU63Ejs.__name.call(void 0, estimateLabelWidth2, "estimateLabelWidth");
6589
6604
  function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, loadingNodeIds, containerKey) {
6590
6605
  const svgRef = _react.useRef.call(void 0, null);
6591
6606
  const zoomRef = _react.useRef.call(void 0, null);
@@ -6650,7 +6665,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
6650
6665
  });
6651
6666
  const typeColorMap = /* @__PURE__ */ new Map();
6652
6667
  Array.from(groupTypes).forEach((type, index) => {
6653
- if (type === _optionalChain([nodes, 'access', _138 => _138[0], 'optionalAccess', _139 => _139.instanceType])) {
6668
+ if (type === _optionalChain([nodes, 'access', _142 => _142[0], 'optionalAccess', _143 => _143.instanceType])) {
6654
6669
  typeColorMap.set(type, accentColor);
6655
6670
  } else if (type === "documents" || type === "articles" || type === "hyperlinks") {
6656
6671
  typeColorMap.set(type, contentColor);
@@ -6696,14 +6711,14 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
6696
6711
  });
6697
6712
  const svg = d3.select(svgRef.current);
6698
6713
  svg.selectAll("*").remove();
6699
- const container = _optionalChain([svgRef, 'access', _140 => _140.current, 'optionalAccess', _141 => _141.parentElement]);
6714
+ const container = _optionalChain([svgRef, 'access', _144 => _144.current, 'optionalAccess', _145 => _145.parentElement]);
6700
6715
  if (!container) return;
6701
6716
  const width = container.clientWidth;
6702
6717
  const height = container.clientHeight;
6703
6718
  svg.attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`);
6704
6719
  const graphGroup = svg.append("g").attr("class", "graph-content");
6705
6720
  const nodeRadius = 40;
6706
- const directed = _optionalChain([options, 'optionalAccess', _142 => _142.directed]) === true;
6721
+ const directed = _optionalChain([options, 'optionalAccess', _146 => _146.directed]) === true;
6707
6722
  if (directed) {
6708
6723
  const defs = svg.append("defs");
6709
6724
  defs.append("marker").attr("id", "narr8-arrow").attr("viewBox", "-10 -10 20 20").attr("markerWidth", 14).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").attr("refX", 0).attr("refY", 0).append("path").attr("d", "M-10,-10 L0,0 L-10,10 z").attr("fill", "#999");
@@ -6715,10 +6730,10 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
6715
6730
  });
6716
6731
  zoomBehaviorRef.current = zoom2;
6717
6732
  svg.call(zoom2).on("wheel.zoom", null).on("dblclick.zoom", null);
6718
- const layoutMode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _143 => _143.layout]), () => ( "radial"));
6733
+ const layoutMode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _147 => _147.layout]), () => ( "radial"));
6719
6734
  let layeredPositionsApplied = false;
6720
6735
  if (layoutMode === "layered") {
6721
- const layeredOpts = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _144 => _144.layered]), () => ( {}));
6736
+ const layeredOpts = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _148 => _148.layered]), () => ( {}));
6722
6737
  const useFit = layeredOpts.fitContainer === true && width > 0 && height > 0;
6723
6738
  const positions = useFit ? fitLayeredLayoutToAspectRatio(visibleNodes, visibleLinks, {
6724
6739
  rankdir: _nullishCoalesce(layeredOpts.rankdir, () => ( "LR")),
@@ -6801,7 +6816,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
6801
6816
  sourceNode.children.push(targetId);
6802
6817
  }
6803
6818
  });
6804
- const rootChildren = _optionalChain([nodeHierarchy, 'access', _145 => _145.get, 'call', _146 => _146(centralNodeId), 'optionalAccess', _147 => _147.children]) || [];
6819
+ const rootChildren = _optionalChain([nodeHierarchy, 'access', _149 => _149.get, 'call', _150 => _150(centralNodeId), 'optionalAccess', _151 => _151.children]) || [];
6805
6820
  const childAngleStep = 2 * Math.PI / Math.max(rootChildren.length, 1);
6806
6821
  rootChildren.forEach((childId, index) => {
6807
6822
  const childNode = nodeHierarchy.get(childId);
@@ -6872,9 +6887,12 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
6872
6887
  simulation = d3.forceSimulation(visibleNodes).force(
6873
6888
  "link",
6874
6889
  d3.forceLink(visibleLinks).id((d) => d.id).distance(nodeRadius * 3).strength(0.1)
6875
- ).force("charge", d3.forceManyBody().strength(-500).distanceMax(300)).force("collision", d3.forceCollide().radius(nodeRadius * 1.2)).force("center", d3.forceCenter(width / 2, height / 2).strength(0.1));
6890
+ ).force("charge", d3.forceManyBody().strength(-2500).distanceMax(800)).force(
6891
+ "collision",
6892
+ d3.forceCollide().radius((d) => Math.max(nodeRadius * 1.1, estimateLabelWidth2(d) / 2 + 8))
6893
+ ).force("center", d3.forceCenter(width / 2, height / 2).strength(0.1));
6876
6894
  simulation.stop();
6877
- for (let i = 0; i < 100; i++) {
6895
+ for (let i = 0; i < 300; i++) {
6878
6896
  simulation.tick();
6879
6897
  }
6880
6898
  visibleNodes.forEach((node2) => {
@@ -6950,7 +6968,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
6950
6968
  if (d.instanceType === "root") return;
6951
6969
  const currentNode = d3.select(this);
6952
6970
  currentNode.raise();
6953
- const currentZoom = _optionalChain([zoomRef, 'access', _148 => _148.current, 'optionalAccess', _149 => _149.k]) || 1;
6971
+ const currentZoom = _optionalChain([zoomRef, 'access', _152 => _152.current, 'optionalAccess', _153 => _153.k]) || 1;
6954
6972
  const targetScreenFontSize = 20;
6955
6973
  const baseFontSize = 12;
6956
6974
  const textScale = targetScreenFontSize / (baseFontSize * currentZoom);
@@ -7025,19 +7043,19 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
7025
7043
  }
7026
7044
  });
7027
7045
  return () => {
7028
- _optionalChain([simulation, 'optionalAccess', _150 => _150.stop, 'call', _151 => _151()]);
7046
+ _optionalChain([simulation, 'optionalAccess', _154 => _154.stop, 'call', _155 => _155()]);
7029
7047
  };
7030
7048
  }, [
7031
7049
  nodes,
7032
7050
  links,
7033
7051
  colorScale,
7034
7052
  visibleNodeIds,
7035
- _optionalChain([options, 'optionalAccess', _152 => _152.directed]),
7036
- _optionalChain([options, 'optionalAccess', _153 => _153.layout]),
7037
- _optionalChain([options, 'optionalAccess', _154 => _154.layered, 'optionalAccess', _155 => _155.rankdir]),
7038
- _optionalChain([options, 'optionalAccess', _156 => _156.layered, 'optionalAccess', _157 => _157.nodesep]),
7039
- _optionalChain([options, 'optionalAccess', _158 => _158.layered, 'optionalAccess', _159 => _159.ranksep]),
7040
- _optionalChain([options, 'optionalAccess', _160 => _160.layered, 'optionalAccess', _161 => _161.fitContainer]),
7053
+ _optionalChain([options, 'optionalAccess', _156 => _156.directed]),
7054
+ _optionalChain([options, 'optionalAccess', _157 => _157.layout]),
7055
+ _optionalChain([options, 'optionalAccess', _158 => _158.layered, 'optionalAccess', _159 => _159.rankdir]),
7056
+ _optionalChain([options, 'optionalAccess', _160 => _160.layered, 'optionalAccess', _161 => _161.nodesep]),
7057
+ _optionalChain([options, 'optionalAccess', _162 => _162.layered, 'optionalAccess', _163 => _163.ranksep]),
7058
+ _optionalChain([options, 'optionalAccess', _164 => _164.layered, 'optionalAccess', _165 => _165.fitContainer]),
7041
7059
  loadingNodeIds,
7042
7060
  onNodeClick
7043
7061
  ]);
@@ -7160,7 +7178,7 @@ function usePageTracker() {
7160
7178
  if (typeof document !== "undefined") {
7161
7179
  const titleParts = document.title.split("]");
7162
7180
  if (titleParts[1]) {
7163
- const cleanTitle = _optionalChain([titleParts, 'access', _162 => _162[1], 'access', _163 => _163.split, 'call', _164 => _164("|"), 'access', _165 => _165[0], 'optionalAccess', _166 => _166.trim, 'call', _167 => _167()]);
7181
+ const cleanTitle = _optionalChain([titleParts, 'access', _166 => _166[1], 'access', _167 => _167.split, 'call', _168 => _168("|"), 'access', _169 => _169[0], 'optionalAccess', _170 => _170.trim, 'call', _171 => _171()]);
7164
7182
  pageTitle = cleanTitle || foundModule.name;
7165
7183
  }
7166
7184
  }
@@ -7197,7 +7215,7 @@ function usePushNotifications() {
7197
7215
  const register = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
7198
7216
  if ("serviceWorker" in navigator && "PushManager" in window) {
7199
7217
  try {
7200
- const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess', _168 => _168.id])}`;
7218
+ const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess', _172 => _172.id])}`;
7201
7219
  const lastRegisteredSubscription = sessionStorage.getItem(sessionKey);
7202
7220
  const registration = await navigator.serviceWorker.register(`${_chunkSE5HIHJSjs.getAppUrl.call(void 0, )}/sw.js`);
7203
7221
  let permission = Notification.permission;
@@ -7254,7 +7272,7 @@ function useSocket({ token }) {
7254
7272
  const socketRef = _react.useRef.call(void 0, null);
7255
7273
  _react.useEffect.call(void 0, () => {
7256
7274
  if (!token) return;
7257
- const globalSocketKey = `__socket_${_optionalChain([process, 'access', _169 => _169.env, 'access', _170 => _170.NEXT_PUBLIC_API_URL, 'optionalAccess', _171 => _171.replace, 'call', _172 => _172(/[^a-zA-Z0-9]/g, "_")])}`;
7275
+ const globalSocketKey = `__socket_${_optionalChain([process, 'access', _173 => _173.env, 'access', _174 => _174.NEXT_PUBLIC_API_URL, 'optionalAccess', _175 => _175.replace, 'call', _176 => _176(/[^a-zA-Z0-9]/g, "_")])}`;
7258
7276
  if (typeof window !== "undefined") {
7259
7277
  const _allSocketKeys = Object.keys(window).filter((key) => key.startsWith("__socket_"));
7260
7278
  const existingSocket = window[globalSocketKey];
@@ -7447,23 +7465,23 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
7447
7465
  );
7448
7466
  const matchedModuleKey = moduleKeys.find((key) => {
7449
7467
  const descriptor2 = Object.getOwnPropertyDescriptor(_chunkXAWKRNYMjs.Modules, key);
7450
- if (!_optionalChain([descriptor2, 'optionalAccess', _173 => _173.get])) return false;
7468
+ if (!_optionalChain([descriptor2, 'optionalAccess', _177 => _177.get])) return false;
7451
7469
  const selectedModule = descriptor2.get.call(_chunkXAWKRNYMjs.Modules);
7452
- return path.toLowerCase().startsWith(_optionalChain([selectedModule, 'access', _174 => _174.pageUrl, 'optionalAccess', _175 => _175.toLowerCase, 'call', _176 => _176()]));
7470
+ return path.toLowerCase().startsWith(_optionalChain([selectedModule, 'access', _178 => _178.pageUrl, 'optionalAccess', _179 => _179.toLowerCase, 'call', _180 => _180()]));
7453
7471
  });
7454
7472
  if (!matchedModuleKey) return void 0;
7455
7473
  const descriptor = Object.getOwnPropertyDescriptor(_chunkXAWKRNYMjs.Modules, matchedModuleKey);
7456
- return _optionalChain([descriptor, 'optionalAccess', _177 => _177.get, 'optionalAccess', _178 => _178.call, 'call', _179 => _179(_chunkXAWKRNYMjs.Modules)]);
7474
+ return _optionalChain([descriptor, 'optionalAccess', _181 => _181.get, 'optionalAccess', _182 => _182.call, 'call', _183 => _183(_chunkXAWKRNYMjs.Modules)]);
7457
7475
  }, "matchUrlToModule");
7458
7476
  const currentUser = dehydratedUser ? _chunkXAWKRNYMjs.rehydrate.call(void 0, _chunkXAWKRNYMjs.Modules.User, dehydratedUser) : null;
7459
- const company = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _180 => _180.company]), () => ( null));
7477
+ const company = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _184 => _184.company]), () => ( null));
7460
7478
  const setUser = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (user) => {
7461
7479
  if (user) setDehydratedUser(user.dehydrate());
7462
7480
  else setDehydratedUser(null);
7463
7481
  }, "setUser");
7464
7482
  const hasRole = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (roleId) => {
7465
7483
  if (!currentUser) return false;
7466
- return !!_optionalChain([currentUser, 'access', _181 => _181.roles, 'optionalAccess', _182 => _182.some, 'call', _183 => _183((userRole) => userRole.id === roleId)]);
7484
+ return !!_optionalChain([currentUser, 'access', _185 => _185.roles, 'optionalAccess', _186 => _186.some, 'call', _187 => _187((userRole) => userRole.id === roleId)]);
7467
7485
  }, "hasRole");
7468
7486
  const hasAccesToFeature = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (featureIdentifier) => {
7469
7487
  if (hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator)) return true;
@@ -7503,12 +7521,12 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
7503
7521
  try {
7504
7522
  const fullUser = await _chunkXAWKRNYMjs.UserService.findFullUser();
7505
7523
  if (fullUser) {
7506
- if (!_optionalChain([options, 'optionalAccess', _184 => _184.skipCookieUpdate])) {
7507
- await _optionalChain([_chunkXAWKRNYMjs.getTokenHandler.call(void 0, ), 'optionalAccess', _185 => _185.updateToken, 'call', _186 => _186({
7524
+ if (!_optionalChain([options, 'optionalAccess', _188 => _188.skipCookieUpdate])) {
7525
+ await _optionalChain([_chunkXAWKRNYMjs.getTokenHandler.call(void 0, ), 'optionalAccess', _189 => _189.updateToken, 'call', _190 => _190({
7508
7526
  userId: fullUser.id,
7509
- companyId: _optionalChain([fullUser, 'access', _187 => _187.company, 'optionalAccess', _188 => _188.id]),
7527
+ companyId: _optionalChain([fullUser, 'access', _191 => _191.company, 'optionalAccess', _192 => _192.id]),
7510
7528
  roles: fullUser.roles.map((role) => role.id),
7511
- features: _nullishCoalesce(_optionalChain([fullUser, 'access', _189 => _189.company, 'optionalAccess', _190 => _190.features, 'optionalAccess', _191 => _191.map, 'call', _192 => _192((feature) => feature.id)]), () => ( [])),
7529
+ features: _nullishCoalesce(_optionalChain([fullUser, 'access', _193 => _193.company, 'optionalAccess', _194 => _194.features, 'optionalAccess', _195 => _195.map, 'call', _196 => _196((feature) => feature.id)]), () => ( [])),
7512
7530
  modules: fullUser.modules.map((module) => ({
7513
7531
  id: module.id,
7514
7532
  permissions: module.permissions
@@ -7530,11 +7548,11 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
7530
7548
  refreshUserRef.current = refreshUser;
7531
7549
  const isRefreshingRef = _react.useRef.call(void 0, false);
7532
7550
  _react.useEffect.call(void 0, () => {
7533
- if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess', _193 => _193.company, 'optionalAccess', _194 => _194.id])) {
7551
+ if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess', _197 => _197.company, 'optionalAccess', _198 => _198.id])) {
7534
7552
  return;
7535
7553
  }
7536
7554
  const handleCompanyUpdate = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
7537
- if (data.companyId === _optionalChain([currentUser, 'access', _195 => _195.company, 'optionalAccess', _196 => _196.id]) && !isRefreshingRef.current) {
7555
+ if (data.companyId === _optionalChain([currentUser, 'access', _199 => _199.company, 'optionalAccess', _200 => _200.id]) && !isRefreshingRef.current) {
7538
7556
  isRefreshingRef.current = true;
7539
7557
  refreshUserRef.current({ skipCookieUpdate: true }).finally(() => {
7540
7558
  isRefreshingRef.current = false;
@@ -7547,7 +7565,7 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
7547
7565
  socket.off("company:tokens_updated", handleCompanyUpdate);
7548
7566
  socket.off("company:subscription_updated", handleCompanyUpdate);
7549
7567
  };
7550
- }, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess', _197 => _197.company, 'optionalAccess', _198 => _198.id])]);
7568
+ }, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess', _201 => _201.company, 'optionalAccess', _202 => _202.id])]);
7551
7569
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7552
7570
  CurrentUserContext.Provider,
7553
7571
  {
@@ -7618,7 +7636,7 @@ function AddUserToRoleInternal({ role, refresh }) {
7618
7636
  const data = useDataListRetriever({
7619
7637
  ready: !!company && show,
7620
7638
  retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkXAWKRNYMjs.UserService.findAllUsers(params), "retriever"),
7621
- retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _199 => _199.id]) },
7639
+ retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _203 => _203.id]) },
7622
7640
  module: _chunkXAWKRNYMjs.Modules.User
7623
7641
  });
7624
7642
  _react.useEffect.call(void 0, () => {
@@ -7686,10 +7704,10 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
7686
7704
  onValueChange: setFiles,
7687
7705
  dropzoneOptions: dropzone2,
7688
7706
  className: "h-40 w-40 rounded-full p-0",
7689
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "bg-muted text-muted-foreground flex h-full w-full flex-col items-center justify-center", children: !resetImage && (file || _optionalChain([user, 'optionalAccess', _200 => _200.avatar])) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7707
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "bg-muted text-muted-foreground flex h-full w-full flex-col items-center justify-center", children: !resetImage && (file || _optionalChain([user, 'optionalAccess', _204 => _204.avatar])) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7690
7708
  _image2.default,
7691
7709
  {
7692
- src: file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess', _201 => _201.avatar]) || "",
7710
+ src: file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess', _205 => _205.avatar]) || "",
7693
7711
  alt: t(`common.avatar`),
7694
7712
  width: 200,
7695
7713
  height: 200
@@ -7697,7 +7715,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
7697
7715
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, { className: "my-4 h-8 w-8" }) })
7698
7716
  }
7699
7717
  ),
7700
- !resetImage && (file || _optionalChain([user, 'optionalAccess', _202 => _202.avatar])) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7718
+ !resetImage && (file || _optionalChain([user, 'optionalAccess', _206 => _206.avatar])) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7701
7719
  Button,
7702
7720
  {
7703
7721
  className: "",
@@ -7725,7 +7743,7 @@ function UserDeleterInternal({ user, onDeleted, companyId }) {
7725
7743
  const router = _chunkSE5HIHJSjs.useI18nRouter.call(void 0, );
7726
7744
  const _t = _nextintl.useTranslations.call(void 0, );
7727
7745
  let cId;
7728
- if (_optionalChain([currentUser, 'optionalAccess', _203 => _203.roles, 'access', _204 => _204.find, 'call', _205 => _205((role) => role.id === _chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator)]) && companyId) {
7746
+ if (_optionalChain([currentUser, 'optionalAccess', _207 => _207.roles, 'access', _208 => _208.find, 'call', _209 => _209((role) => role.id === _chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator)]) && companyId) {
7729
7747
  cId = companyId;
7730
7748
  } else {
7731
7749
  if (!company) return;
@@ -7788,18 +7806,18 @@ function UserEditorInternal({
7788
7806
  }, [company]);
7789
7807
  const handleDialogOpenChange = _react.useCallback.call(void 0,
7790
7808
  (open) => {
7791
- if (open && (company || _optionalChain([currentUser, 'optionalAccess', _206 => _206.roles, 'access', _207 => _207.find, 'call', _208 => _208((role) => role.id === _chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator)])) && roles.length === 0) {
7809
+ if (open && (company || _optionalChain([currentUser, 'optionalAccess', _210 => _210.roles, 'access', _211 => _211.find, 'call', _212 => _212((role) => role.id === _chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator)])) && roles.length === 0) {
7792
7810
  async function fetchRoles() {
7793
7811
  const allRoles = await _chunkXAWKRNYMjs.RoleService.findAllRoles({});
7794
7812
  const availableRoles = allRoles.filter(
7795
- (role) => role.id !== _chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess', _209 => _209.features, 'access', _210 => _210.some, 'call', _211 => _211((feature) => feature.id === _optionalChain([role, 'access', _212 => _212.requiredFeature, 'optionalAccess', _213 => _213.id]))]))
7813
+ (role) => role.id !== _chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess', _213 => _213.features, 'access', _214 => _214.some, 'call', _215 => _215((feature) => feature.id === _optionalChain([role, 'access', _216 => _216.requiredFeature, 'optionalAccess', _217 => _217.id]))]))
7796
7814
  );
7797
7815
  setRoles(availableRoles);
7798
7816
  }
7799
7817
  _chunk7QVYU63Ejs.__name.call(void 0, fetchRoles, "fetchRoles");
7800
7818
  fetchRoles();
7801
7819
  }
7802
- _optionalChain([onDialogOpenChange, 'optionalCall', _214 => _214(open)]);
7820
+ _optionalChain([onDialogOpenChange, 'optionalCall', _218 => _218(open)]);
7803
7821
  },
7804
7822
  [company, currentUser, roles.length, onDialogOpenChange]
7805
7823
  );
@@ -7833,29 +7851,29 @@ function UserEditorInternal({
7833
7851
  );
7834
7852
  const getDefaultValues = _react.useCallback.call(void 0, () => {
7835
7853
  return {
7836
- id: _optionalChain([user, 'optionalAccess', _215 => _215.id]) || _uuid.v4.call(void 0, ),
7837
- name: _optionalChain([user, 'optionalAccess', _216 => _216.name]) || "",
7838
- title: _optionalChain([user, 'optionalAccess', _217 => _217.title]) || "",
7839
- bio: _optionalChain([user, 'optionalAccess', _218 => _218.bio]) || "",
7840
- email: _optionalChain([user, 'optionalAccess', _219 => _219.email]) || "",
7841
- phone: _optionalChain([user, 'optionalAccess', _220 => _220.phone]) || "",
7854
+ id: _optionalChain([user, 'optionalAccess', _219 => _219.id]) || _uuid.v4.call(void 0, ),
7855
+ name: _optionalChain([user, 'optionalAccess', _220 => _220.name]) || "",
7856
+ title: _optionalChain([user, 'optionalAccess', _221 => _221.title]) || "",
7857
+ bio: _optionalChain([user, 'optionalAccess', _222 => _222.bio]) || "",
7858
+ email: _optionalChain([user, 'optionalAccess', _223 => _223.email]) || "",
7859
+ phone: _optionalChain([user, 'optionalAccess', _224 => _224.phone]) || "",
7842
7860
  password: "",
7843
- roleIds: _optionalChain([user, 'optionalAccess', _221 => _221.roles, 'access', _222 => _222.map, 'call', _223 => _223((role) => role.id)]) || [],
7861
+ roleIds: _optionalChain([user, 'optionalAccess', _225 => _225.roles, 'access', _226 => _226.map, 'call', _227 => _227((role) => role.id)]) || [],
7844
7862
  sendInvitationEmail: false,
7845
- avatar: _optionalChain([user, 'optionalAccess', _224 => _224.avatarUrl]) || ""
7863
+ avatar: _optionalChain([user, 'optionalAccess', _228 => _228.avatarUrl]) || ""
7846
7864
  };
7847
7865
  }, [user]);
7848
7866
  const form = _reacthookform.useForm.call(void 0, {
7849
7867
  resolver: _zod.zodResolver.call(void 0, formSchema),
7850
7868
  defaultValues: getDefaultValues()
7851
7869
  });
7852
- const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess', _225 => _225.id]) === _optionalChain([user, 'optionalAccess', _226 => _226.id]) && hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator)) && (hasPermissionToModule({ module: _chunkXAWKRNYMjs.Modules.User, action: "update" /* Update */ }) || hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator));
7870
+ const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess', _229 => _229.id]) === _optionalChain([user, 'optionalAccess', _230 => _230.id]) && hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator)) && (hasPermissionToModule({ module: _chunkXAWKRNYMjs.Modules.User, action: "update" /* Update */ }) || hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator));
7853
7871
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7854
7872
  EditorSheet,
7855
7873
  {
7856
7874
  form,
7857
7875
  entityType: t(`entities.users`, { count: 1 }),
7858
- entityName: _optionalChain([user, 'optionalAccess', _227 => _227.name]),
7876
+ entityName: _optionalChain([user, 'optionalAccess', _231 => _231.name]),
7859
7877
  isEdit: !!user,
7860
7878
  module: _chunkXAWKRNYMjs.Modules.User,
7861
7879
  propagateChanges,
@@ -7907,7 +7925,7 @@ function UserEditorInternal({
7907
7925
  adminCreated
7908
7926
  };
7909
7927
  const updatedUser = user ? await _chunkXAWKRNYMjs.UserService.update(payload) : await _chunkXAWKRNYMjs.UserService.create(payload);
7910
- if (_optionalChain([currentUser, 'optionalAccess', _228 => _228.id]) === updatedUser.id) setUser(updatedUser);
7928
+ if (_optionalChain([currentUser, 'optionalAccess', _232 => _232.id]) === updatedUser.id) setUser(updatedUser);
7911
7929
  return updatedUser;
7912
7930
  },
7913
7931
  onRevalidate,
@@ -8154,7 +8172,7 @@ function EntityMultiSelector({
8154
8172
  if (open) {
8155
8173
  setSearchTerm("");
8156
8174
  requestAnimationFrame(() => {
8157
- _optionalChain([searchInputRef, 'access', _229 => _229.current, 'optionalAccess', _230 => _230.focus, 'call', _231 => _231()]);
8175
+ _optionalChain([searchInputRef, 'access', _233 => _233.current, 'optionalAccess', _234 => _234.focus, 'call', _235 => _235()]);
8158
8176
  });
8159
8177
  }
8160
8178
  }, [open]);
@@ -8171,7 +8189,7 @@ function EntityMultiSelector({
8171
8189
  form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
8172
8190
  const cb = onChangeRef.current;
8173
8191
  if (cb) {
8174
- const fullData = next.map((v) => _optionalChain([options, 'access', _232 => _232.find, 'call', _233 => _233((opt) => opt.id === v.id), 'optionalAccess', _234 => _234.entityData])).filter(Boolean);
8192
+ const fullData = next.map((v) => _optionalChain([options, 'access', _236 => _236.find, 'call', _237 => _237((opt) => opt.id === v.id), 'optionalAccess', _238 => _238.entityData])).filter(Boolean);
8175
8193
  cb(fullData);
8176
8194
  }
8177
8195
  },
@@ -8184,7 +8202,7 @@ function EntityMultiSelector({
8184
8202
  form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
8185
8203
  const cb = onChangeRef.current;
8186
8204
  if (cb) {
8187
- const fullData = next.map((v) => _optionalChain([options, 'access', _235 => _235.find, 'call', _236 => _236((opt) => opt.id === v.id), 'optionalAccess', _237 => _237.entityData])).filter(Boolean);
8205
+ const fullData = next.map((v) => _optionalChain([options, 'access', _239 => _239.find, 'call', _240 => _240((opt) => opt.id === v.id), 'optionalAccess', _241 => _241.entityData])).filter(Boolean);
8188
8206
  cb(fullData);
8189
8207
  }
8190
8208
  },
@@ -8322,11 +8340,11 @@ function UserMultiSelect({
8322
8340
  emptyText: t("ui.search.no_results", { type: t("entities.users", { count: 2 }) }),
8323
8341
  isRequired,
8324
8342
  retriever: (params) => _chunkXAWKRNYMjs.UserService.findAllUsers(params),
8325
- retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _238 => _238.id]) },
8343
+ retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _242 => _242.id]) },
8326
8344
  module: _chunkXAWKRNYMjs.Modules.User,
8327
8345
  getLabel: (user) => user.name,
8328
8346
  toFormValue: (user) => ({ id: user.id, name: user.name, avatar: user.avatar }),
8329
- excludeId: _optionalChain([currentUser, 'optionalAccess', _239 => _239.id]),
8347
+ excludeId: _optionalChain([currentUser, 'optionalAccess', _243 => _243.id]),
8330
8348
  onChange,
8331
8349
  renderOption: (user) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
8332
8350
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatarIcon, { url: user.avatar, name: user.name }),
@@ -8592,7 +8610,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, ErrorDetails, "ErrorDetails");
8592
8610
 
8593
8611
  // src/components/errors/errorToast.ts
8594
8612
  function errorToast(params) {
8595
- _chunkXAWKRNYMjs.showError.call(void 0, _nullishCoalesce(_optionalChain([params, 'optionalAccess', _240 => _240.title]), () => ( "Error")), {
8613
+ _chunkXAWKRNYMjs.showError.call(void 0, _nullishCoalesce(_optionalChain([params, 'optionalAccess', _244 => _244.title]), () => ( "Error")), {
8596
8614
  description: params.error instanceof Error ? params.error.message : String(params.error)
8597
8615
  });
8598
8616
  }
@@ -8756,21 +8774,21 @@ function useEditorDialog(isFormDirty, options) {
8756
8774
  const [open, setOpen] = _react.useState.call(void 0, false);
8757
8775
  const [showDiscardConfirm, setShowDiscardConfirm] = _react.useState.call(void 0, false);
8758
8776
  _react.useEffect.call(void 0, () => {
8759
- if (_optionalChain([options, 'optionalAccess', _241 => _241.dialogOpen]) !== void 0) {
8777
+ if (_optionalChain([options, 'optionalAccess', _245 => _245.dialogOpen]) !== void 0) {
8760
8778
  setOpen(options.dialogOpen);
8761
8779
  }
8762
- }, [_optionalChain([options, 'optionalAccess', _242 => _242.dialogOpen])]);
8780
+ }, [_optionalChain([options, 'optionalAccess', _246 => _246.dialogOpen])]);
8763
8781
  _react.useEffect.call(void 0, () => {
8764
- if (typeof _optionalChain([options, 'optionalAccess', _243 => _243.onDialogOpenChange]) === "function") {
8782
+ if (typeof _optionalChain([options, 'optionalAccess', _247 => _247.onDialogOpenChange]) === "function") {
8765
8783
  options.onDialogOpenChange(open);
8766
8784
  }
8767
- }, [open, _optionalChain([options, 'optionalAccess', _244 => _244.onDialogOpenChange])]);
8785
+ }, [open, _optionalChain([options, 'optionalAccess', _248 => _248.onDialogOpenChange])]);
8768
8786
  _react.useEffect.call(void 0, () => {
8769
- if (_optionalChain([options, 'optionalAccess', _245 => _245.forceShow])) setOpen(true);
8770
- }, [_optionalChain([options, 'optionalAccess', _246 => _246.forceShow])]);
8787
+ if (_optionalChain([options, 'optionalAccess', _249 => _249.forceShow])) setOpen(true);
8788
+ }, [_optionalChain([options, 'optionalAccess', _250 => _250.forceShow])]);
8771
8789
  _react.useEffect.call(void 0, () => {
8772
8790
  if (!open) {
8773
- if (_optionalChain([options, 'optionalAccess', _247 => _247.onClose])) options.onClose();
8791
+ if (_optionalChain([options, 'optionalAccess', _251 => _251.onClose])) options.onClose();
8774
8792
  }
8775
8793
  }, [open]);
8776
8794
  const handleOpenChange = _react.useCallback.call(void 0,
@@ -8862,7 +8880,7 @@ function EditorSheet({
8862
8880
  hasBeenOpen.current = true;
8863
8881
  } else if (hasBeenOpen.current) {
8864
8882
  form.reset(onReset());
8865
- _optionalChain([onClose, 'optionalCall', _248 => _248()]);
8883
+ _optionalChain([onClose, 'optionalCall', _252 => _252()]);
8866
8884
  }
8867
8885
  }, [open]);
8868
8886
  const wrappedOnSubmit = _react.useCallback.call(void 0,
@@ -8876,11 +8894,11 @@ function EditorSheet({
8876
8894
  if (onSuccess) {
8877
8895
  await onSuccess();
8878
8896
  } else if (result) {
8879
- _optionalChain([onRevalidate, 'optionalCall', _249 => _249(generateUrl({ page: module, id: result.id, language: "[locale]" }))]);
8897
+ _optionalChain([onRevalidate, 'optionalCall', _253 => _253(generateUrl({ page: module, id: result.id, language: "[locale]" }))]);
8880
8898
  if (isEdit && propagateChanges) {
8881
8899
  propagateChanges(result);
8882
8900
  } else {
8883
- _optionalChain([onNavigate, 'optionalCall', _250 => _250(generateUrl({ page: module, id: result.id }))]);
8901
+ _optionalChain([onNavigate, 'optionalCall', _254 => _254(generateUrl({ page: module, id: result.id }))]);
8884
8902
  }
8885
8903
  }
8886
8904
  } catch (error) {
@@ -9106,7 +9124,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9106
9124
  const [open, setOpen] = _react.useState.call(void 0, false);
9107
9125
  const [prevRange, setPrevRange] = _react.useState.call(void 0, date);
9108
9126
  _react.useEffect.call(void 0, () => {
9109
- if (_optionalChain([date, 'optionalAccess', _251 => _251.from]) && _optionalChain([date, 'optionalAccess', _252 => _252.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _253 => _253.from, 'optionalAccess', _254 => _254.getTime, 'call', _255 => _255()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _256 => _256.to, 'optionalAccess', _257 => _257.getTime, 'call', _258 => _258()]) !== date.to.getTime())) {
9127
+ if (_optionalChain([date, 'optionalAccess', _255 => _255.from]) && _optionalChain([date, 'optionalAccess', _256 => _256.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _257 => _257.from, 'optionalAccess', _258 => _258.getTime, 'call', _259 => _259()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _260 => _260.to, 'optionalAccess', _261 => _261.getTime, 'call', _262 => _262()]) !== date.to.getTime())) {
9110
9128
  onDateChange(date);
9111
9129
  setPrevRange(date);
9112
9130
  setOpen(false);
@@ -9117,7 +9135,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9117
9135
  setDate(void 0);
9118
9136
  return;
9119
9137
  }
9120
- if (range.from && (!_optionalChain([date, 'optionalAccess', _259 => _259.from]) || range.from.getTime() !== date.from.getTime())) {
9138
+ if (range.from && (!_optionalChain([date, 'optionalAccess', _263 => _263.from]) || range.from.getTime() !== date.from.getTime())) {
9121
9139
  setDate({ from: range.from, to: void 0 });
9122
9140
  } else {
9123
9141
  setDate(range);
@@ -9132,7 +9150,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9132
9150
  className: _chunkXAWKRNYMjs.cn.call(void 0, "w-[300px] justify-start text-left font-normal", !date && "text-muted-foreground"),
9133
9151
  children: [
9134
9152
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
9135
- _optionalChain([date, 'optionalAccess', _260 => _260.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9153
+ _optionalChain([date, 'optionalAccess', _264 => _264.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9136
9154
  _datefns.format.call(void 0, date.from, "LLL dd, y"),
9137
9155
  " - ",
9138
9156
  _datefns.format.call(void 0, date.to, "LLL dd, y")
@@ -9145,7 +9163,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9145
9163
  Calendar,
9146
9164
  {
9147
9165
  mode: "range",
9148
- defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _261 => _261.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
9166
+ defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _265 => _265.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
9149
9167
  selected: date,
9150
9168
  onSelect: handleSelect,
9151
9169
  numberOfMonths: 2
@@ -9232,7 +9250,7 @@ var FileUploader = _react.forwardRef.call(void 0,
9232
9250
  movePrev();
9233
9251
  } else if (e.key === "Enter" || e.key === "Space") {
9234
9252
  if (activeIndex === -1) {
9235
- _optionalChain([dropzoneState, 'access', _262 => _262.inputRef, 'access', _263 => _263.current, 'optionalAccess', _264 => _264.click, 'call', _265 => _265()]);
9253
+ _optionalChain([dropzoneState, 'access', _266 => _266.inputRef, 'access', _267 => _267.current, 'optionalAccess', _268 => _268.click, 'call', _269 => _269()]);
9236
9254
  }
9237
9255
  } else if (e.key === "Delete" || e.key === "Backspace") {
9238
9256
  if (activeIndex !== -1) {
@@ -9270,13 +9288,13 @@ var FileUploader = _react.forwardRef.call(void 0,
9270
9288
  onValueChange(newValues);
9271
9289
  if (rejectedFiles.length > 0) {
9272
9290
  for (let i = 0; i < rejectedFiles.length; i++) {
9273
- if (_optionalChain([rejectedFiles, 'access', _266 => _266[i], 'access', _267 => _267.errors, 'access', _268 => _268[0], 'optionalAccess', _269 => _269.code]) === "file-too-large") {
9291
+ if (_optionalChain([rejectedFiles, 'access', _270 => _270[i], 'access', _271 => _271.errors, 'access', _272 => _272[0], 'optionalAccess', _273 => _273.code]) === "file-too-large") {
9274
9292
  _chunkXAWKRNYMjs.showError.call(void 0, t("common.errors.file"), {
9275
9293
  description: t(`common.errors.file_max`, { size: maxSize / 1024 / 1024 })
9276
9294
  });
9277
9295
  break;
9278
9296
  }
9279
- if (_optionalChain([rejectedFiles, 'access', _270 => _270[i], 'access', _271 => _271.errors, 'access', _272 => _272[0], 'optionalAccess', _273 => _273.message])) {
9297
+ if (_optionalChain([rejectedFiles, 'access', _274 => _274[i], 'access', _275 => _275.errors, 'access', _276 => _276[0], 'optionalAccess', _277 => _277.message])) {
9280
9298
  _chunkXAWKRNYMjs.showError.call(void 0, t(`common.errors.file`), {
9281
9299
  description: rejectedFiles[i].errors[0].message
9282
9300
  });
@@ -9475,7 +9493,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, FormCheckbox, "FormCheckbox");
9475
9493
  var _dynamic = require('next/dynamic'); var _dynamic2 = _interopRequireDefault(_dynamic);
9476
9494
 
9477
9495
 
9478
- var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-ZD2AMN72.js"))), {
9496
+ var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-32I5IEH3.js"))), {
9479
9497
  ssr: false
9480
9498
  });
9481
9499
  var BlockNoteEditorContainer = React.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function EditorContainer(props) {
@@ -9539,7 +9557,7 @@ function FormBlockNote({
9539
9557
  onChange: (content, isEmpty) => {
9540
9558
  lastEditorContentRef.current = content;
9541
9559
  field.onChange(content);
9542
- _optionalChain([onEmptyChange, 'optionalCall', _274 => _274(isEmpty)]);
9560
+ _optionalChain([onEmptyChange, 'optionalCall', _278 => _278(isEmpty)]);
9543
9561
  },
9544
9562
  placeholder,
9545
9563
  bordered: true,
@@ -10116,11 +10134,11 @@ function FormPlaceAutocomplete({
10116
10134
  const data = await response.json();
10117
10135
  if (data.suggestions) {
10118
10136
  const formattedSuggestions = data.suggestions.map((suggestion) => ({
10119
- place_id: _optionalChain([suggestion, 'access', _275 => _275.placePrediction, 'optionalAccess', _276 => _276.placeId]) || "",
10120
- description: _optionalChain([suggestion, 'access', _277 => _277.placePrediction, 'optionalAccess', _278 => _278.text, 'optionalAccess', _279 => _279.text]) || "",
10137
+ place_id: _optionalChain([suggestion, 'access', _279 => _279.placePrediction, 'optionalAccess', _280 => _280.placeId]) || "",
10138
+ description: _optionalChain([suggestion, 'access', _281 => _281.placePrediction, 'optionalAccess', _282 => _282.text, 'optionalAccess', _283 => _283.text]) || "",
10121
10139
  structured_formatting: {
10122
- main_text: _optionalChain([suggestion, 'access', _280 => _280.placePrediction, 'optionalAccess', _281 => _281.structuredFormat, 'optionalAccess', _282 => _282.mainText, 'optionalAccess', _283 => _283.text]) || "",
10123
- secondary_text: _optionalChain([suggestion, 'access', _284 => _284.placePrediction, 'optionalAccess', _285 => _285.structuredFormat, 'optionalAccess', _286 => _286.secondaryText, 'optionalAccess', _287 => _287.text]) || ""
10140
+ main_text: _optionalChain([suggestion, 'access', _284 => _284.placePrediction, 'optionalAccess', _285 => _285.structuredFormat, 'optionalAccess', _286 => _286.mainText, 'optionalAccess', _287 => _287.text]) || "",
10141
+ secondary_text: _optionalChain([suggestion, 'access', _288 => _288.placePrediction, 'optionalAccess', _289 => _289.structuredFormat, 'optionalAccess', _290 => _290.secondaryText, 'optionalAccess', _291 => _291.text]) || ""
10124
10142
  }
10125
10143
  }));
10126
10144
  setSuggestions(formattedSuggestions);
@@ -10267,8 +10285,8 @@ function FormPlaceAutocomplete({
10267
10285
  className: "hover:bg-muted cursor-pointer px-3 py-2 text-sm",
10268
10286
  onClick: () => handleSuggestionSelect(suggestion),
10269
10287
  children: [
10270
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _288 => _288.structured_formatting, 'optionalAccess', _289 => _289.main_text]) }),
10271
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _290 => _290.structured_formatting, 'optionalAccess', _291 => _291.secondary_text]) })
10288
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _292 => _292.structured_formatting, 'optionalAccess', _293 => _293.main_text]) }),
10289
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _294 => _294.structured_formatting, 'optionalAccess', _295 => _295.secondary_text]) })
10272
10290
  ]
10273
10291
  },
10274
10292
  suggestion.place_id || index
@@ -10314,7 +10332,7 @@ function FormSelect({
10314
10332
  disabled,
10315
10333
  "data-testid": testId,
10316
10334
  children: [
10317
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access', _292 => _292.find, 'call', _293 => _293((v) => v.id === field.value), 'optionalAccess', _294 => _294.text]) : _nullishCoalesce(placeholder, () => ( "")) }) }),
10335
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access', _296 => _296.find, 'call', _297 => _297((v) => v.id === field.value), 'optionalAccess', _298 => _298.text]) : _nullishCoalesce(placeholder, () => ( "")) }) }),
10318
10336
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SelectContent, { children: [
10319
10337
  allowEmpty && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: EMPTY_VALUE, className: "text-muted-foreground", children: _nullishCoalesce(placeholder, () => ( "")) }),
10320
10338
  values.map((type) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: type.id, children: type.text }, type.id))
@@ -10485,7 +10503,7 @@ function UserAvatar({ user, className, showFull, showLink, showTooltip = true })
10485
10503
  }, "getInitials");
10486
10504
  const getAvatar = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
10487
10505
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: `h-6 w-6 ${className}`, children: [
10488
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _295 => _295.avatar]) }),
10506
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _299 => _299.avatar]) }),
10489
10507
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: getInitials3(user.name) })
10490
10508
  ] }) });
10491
10509
  }, "getAvatar");
@@ -10676,7 +10694,7 @@ var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
10676
10694
  })
10677
10695
  };
10678
10696
  const columns = _react.useMemo.call(void 0, () => {
10679
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _296 => _296[field], 'optionalCall', _297 => _297()])).filter((col) => col !== void 0);
10697
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _300 => _300[field], 'optionalCall', _301 => _301()])).filter((col) => col !== void 0);
10680
10698
  }, [params.fields, fieldColumnMap, t, generateUrl]);
10681
10699
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
10682
10700
  }, "useUserTableStructure");
@@ -10790,10 +10808,10 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
10790
10808
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
10791
10809
  /* @__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.jsxs.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: [
10792
10810
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: `mr-2 h-4 w-4`, children: [
10793
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _298 => _298.value, 'optionalAccess', _299 => _299.avatar]) }),
10794
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _300 => _300.value, 'optionalAccess', _301 => _301.name]) ? _optionalChain([field, 'access', _302 => _302.value, 'optionalAccess', _303 => _303.name, 'access', _304 => _304.split, 'call', _305 => _305(" "), 'access', _306 => _306.map, 'call', _307 => _307((name) => name.charAt(0).toUpperCase())]) : "X" })
10811
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _302 => _302.value, 'optionalAccess', _303 => _303.avatar]) }),
10812
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _304 => _304.value, 'optionalAccess', _305 => _305.name]) ? _optionalChain([field, 'access', _306 => _306.value, 'optionalAccess', _307 => _307.name, 'access', _308 => _308.split, 'call', _309 => _309(" "), 'access', _310 => _310.map, 'call', _311 => _311((name) => name.charAt(0).toUpperCase())]) : "X" })
10795
10813
  ] }) }),
10796
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _308 => _308.value, 'optionalAccess', _309 => _309.name]), () => ( "")) })
10814
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _312 => _312.value, 'optionalAccess', _313 => _313.name]), () => ( "")) })
10797
10815
  ] }) : /* @__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(`ui.search.placeholder`, { type: t(`entities.users`, { count: 1 }) }))) }) }) }),
10798
10816
  field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
10799
10817
  _lucidereact.CircleX,
@@ -11124,7 +11142,7 @@ function CompanyUsersList({ isDeleted, fullWidth }) {
11124
11142
  const data = useDataListRetriever({
11125
11143
  ready: !!company,
11126
11144
  retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkXAWKRNYMjs.UserService.findAllUsers(params), "retriever"),
11127
- retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _310 => _310.id]), isDeleted },
11145
+ retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _314 => _314.id]), isDeleted },
11128
11146
  module: _chunkXAWKRNYMjs.Modules.User
11129
11147
  });
11130
11148
  _react.useEffect.call(void 0, () => {
@@ -11231,11 +11249,11 @@ function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
11231
11249
  className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
11232
11250
  onClick: (_e) => {
11233
11251
  setSelectedUser(user);
11234
- _optionalChain([setLevelOpen, 'optionalCall', _311 => _311(true)]);
11252
+ _optionalChain([setLevelOpen, 'optionalCall', _315 => _315(true)]);
11235
11253
  },
11236
11254
  onSelect: (_e) => {
11237
11255
  setSelectedUser(user);
11238
- _optionalChain([setLevelOpen, 'optionalCall', _312 => _312(true)]);
11256
+ _optionalChain([setLevelOpen, 'optionalCall', _316 => _316(true)]);
11239
11257
  },
11240
11258
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between px-4 py-1", children: [
11241
11259
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user }),
@@ -11366,7 +11384,7 @@ function CompanyContent({ company, actions }) {
11366
11384
  company.legal_address
11367
11385
  ] }),
11368
11386
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
11369
- _optionalChain([company, 'access', _313 => _313.configurations, 'optionalAccess', _314 => _314.country]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
11387
+ _optionalChain([company, 'access', _317 => _317.configurations, 'optionalAccess', _318 => _318.country]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
11370
11388
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
11371
11389
  t("features.configuration.country"),
11372
11390
  ":"
@@ -11374,7 +11392,7 @@ function CompanyContent({ company, actions }) {
11374
11392
  " ",
11375
11393
  company.configurations.country
11376
11394
  ] }),
11377
- _optionalChain([company, 'access', _315 => _315.configurations, 'optionalAccess', _316 => _316.currency]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
11395
+ _optionalChain([company, 'access', _319 => _319.configurations, 'optionalAccess', _320 => _320.currency]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
11378
11396
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
11379
11397
  t("features.configuration.currency"),
11380
11398
  ":"
@@ -11784,7 +11802,7 @@ function CompanyEditorInternal({
11784
11802
  const t = _nextintl.useTranslations.call(void 0, );
11785
11803
  const fiscalRef = _react.useRef.call(void 0, null);
11786
11804
  const addressComponentsRef = _react.useRef.call(void 0, {});
11787
- const canAccessFeatures = hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access', _317 => _317.env, 'access', _318 => _318.NEXT_PUBLIC_PRIVATE_INSTALLATION, 'optionalAccess', _319 => _319.toLowerCase, 'call', _320 => _320()]) === "true";
11805
+ const canAccessFeatures = hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access', _321 => _321.env, 'access', _322 => _322.NEXT_PUBLIC_PRIVATE_INSTALLATION, 'optionalAccess', _323 => _323.toLowerCase, 'call', _324 => _324()]) === "true";
11788
11806
  const handleDialogOpenChange = _react.useCallback.call(void 0,
11789
11807
  (open) => {
11790
11808
  if (open && features.length === 0 && canAccessFeatures) {
@@ -11799,7 +11817,7 @@ function CompanyEditorInternal({
11799
11817
  _chunk7QVYU63Ejs.__name.call(void 0, fetchFeatures, "fetchFeatures");
11800
11818
  fetchFeatures();
11801
11819
  }
11802
- _optionalChain([onDialogOpenChange, 'optionalCall', _321 => _321(open)]);
11820
+ _optionalChain([onDialogOpenChange, 'optionalCall', _325 => _325(open)]);
11803
11821
  },
11804
11822
  [features.length, canAccessFeatures, hasRole, onDialogOpenChange]
11805
11823
  );
@@ -11844,12 +11862,12 @@ function CompanyEditorInternal({
11844
11862
  );
11845
11863
  const getDefaultValues = _react.useCallback.call(void 0, () => {
11846
11864
  return {
11847
- id: _optionalChain([company, 'optionalAccess', _322 => _322.id]) || _uuid.v4.call(void 0, ),
11848
- name: _optionalChain([company, 'optionalAccess', _323 => _323.name]) || "",
11849
- featureIds: _optionalChain([company, 'optionalAccess', _324 => _324.features, 'access', _325 => _325.map, 'call', _326 => _326((feature) => feature.id)]) || [],
11850
- moduleIds: _optionalChain([company, 'optionalAccess', _327 => _327.modules, 'access', _328 => _328.map, 'call', _329 => _329((module) => module.id)]) || [],
11851
- logo: _optionalChain([company, 'optionalAccess', _330 => _330.logo]) || "",
11852
- legal_address: _optionalChain([company, 'optionalAccess', _331 => _331.legal_address]) || ""
11865
+ id: _optionalChain([company, 'optionalAccess', _326 => _326.id]) || _uuid.v4.call(void 0, ),
11866
+ name: _optionalChain([company, 'optionalAccess', _327 => _327.name]) || "",
11867
+ featureIds: _optionalChain([company, 'optionalAccess', _328 => _328.features, 'access', _329 => _329.map, 'call', _330 => _330((feature) => feature.id)]) || [],
11868
+ moduleIds: _optionalChain([company, 'optionalAccess', _331 => _331.modules, 'access', _332 => _332.map, 'call', _333 => _333((module) => module.id)]) || [],
11869
+ logo: _optionalChain([company, 'optionalAccess', _334 => _334.logo]) || "",
11870
+ legal_address: _optionalChain([company, 'optionalAccess', _335 => _335.legal_address]) || ""
11853
11871
  };
11854
11872
  }, [company]);
11855
11873
  const form = _reacthookform.useForm.call(void 0, {
@@ -11861,7 +11879,7 @@ function CompanyEditorInternal({
11861
11879
  {
11862
11880
  form,
11863
11881
  entityType: t(`entities.companies`, { count: 1 }),
11864
- entityName: _optionalChain([company, 'optionalAccess', _332 => _332.name]),
11882
+ entityName: _optionalChain([company, 'optionalAccess', _336 => _336.name]),
11865
11883
  isEdit: !!company,
11866
11884
  module: _chunkXAWKRNYMjs.Modules.Company,
11867
11885
  propagateChanges,
@@ -11886,7 +11904,7 @@ function CompanyEditorInternal({
11886
11904
  throw new Error("Fiscal data validation failed");
11887
11905
  }
11888
11906
  const payload = {
11889
- id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _333 => _333.id]), () => ( _uuid.v4.call(void 0, ))),
11907
+ id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _337 => _337.id]), () => ( _uuid.v4.call(void 0, ))),
11890
11908
  name: values.name,
11891
11909
  logo: files && contentType ? values.logo : void 0,
11892
11910
  featureIds: values.featureIds,
@@ -11917,10 +11935,10 @@ function CompanyEditorInternal({
11917
11935
  dialogOpen,
11918
11936
  onDialogOpenChange: handleDialogOpenChange,
11919
11937
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-start justify-between gap-x-4", children: [
11920
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-96 flex-col justify-start gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileUploader, { value: files, onValueChange: setFiles, dropzoneOptions: dropzone2, className: "w-full p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "text-neutral-300 outline-dashed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: file || _optionalChain([company, 'optionalAccess', _334 => _334.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
11938
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-96 flex-col justify-start gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileUploader, { value: files, onValueChange: setFiles, dropzoneOptions: dropzone2, className: "w-full p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "text-neutral-300 outline-dashed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: file || _optionalChain([company, 'optionalAccess', _338 => _338.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
11921
11939
  _image2.default,
11922
11940
  {
11923
- src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _335 => _335.logo]) || "",
11941
+ src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _339 => _339.logo]) || "",
11924
11942
  alt: "Company Logo",
11925
11943
  width: 200,
11926
11944
  height: 200
@@ -11954,7 +11972,7 @@ function CompanyEditorInternal({
11954
11972
  }
11955
11973
  ),
11956
11974
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mt-2 text-sm font-semibold", children: t(`company.sections.fiscal_data`) }),
11957
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess', _336 => _336.fiscal_data])) })
11975
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess', _340 => _340.fiscal_data])) })
11958
11976
  ] }),
11959
11977
  canAccessFeatures && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-96 flex-col justify-start gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScrollArea, { className: "h-max", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFeatures, { form, name: t(`company.features_and_modules`), features }) }) })
11960
11978
  ] })
@@ -12071,7 +12089,7 @@ function NotificationToast(notification, t, generateUrl, reouter) {
12071
12089
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
12072
12090
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
12073
12091
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
12074
- actor: _nullishCoalesce(_optionalChain([data, 'access', _337 => _337.actor, 'optionalAccess', _338 => _338.name]), () => ( "")),
12092
+ actor: _nullishCoalesce(_optionalChain([data, 'access', _341 => _341.actor, 'optionalAccess', _342 => _342.name]), () => ( "")),
12075
12093
  title: data.title,
12076
12094
  message: _nullishCoalesce(notification.message, () => ( ""))
12077
12095
  }) }),
@@ -12100,7 +12118,7 @@ function NotificationMenuItem({ notification, closePopover }) {
12100
12118
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
12101
12119
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
12102
12120
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
12103
- actor: _nullishCoalesce(_optionalChain([data, 'access', _339 => _339.actor, 'optionalAccess', _340 => _340.name]), () => ( "")),
12121
+ actor: _nullishCoalesce(_optionalChain([data, 'access', _343 => _343.actor, 'optionalAccess', _344 => _344.name]), () => ( "")),
12104
12122
  title: data.title,
12105
12123
  message: _nullishCoalesce(notification.message, () => ( ""))
12106
12124
  }) }),
@@ -12157,7 +12175,7 @@ var NotificationContextProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(v
12157
12175
  _react.useEffect.call(void 0, () => {
12158
12176
  if (hasInitiallyLoaded || !currentUser) return;
12159
12177
  if (_chunkSE5HIHJSjs.isRolesConfigured.call(void 0, )) {
12160
- const isAdmin = _optionalChain([currentUser, 'access', _341 => _341.roles, 'optionalAccess', _342 => _342.some, 'call', _343 => _343((role) => role.id === _chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator)]);
12178
+ const isAdmin = _optionalChain([currentUser, 'access', _345 => _345.roles, 'optionalAccess', _346 => _346.some, 'call', _347 => _347((role) => role.id === _chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator)]);
12161
12179
  if (isAdmin) {
12162
12180
  setHasInitiallyLoaded(true);
12163
12181
  return;
@@ -12359,7 +12377,7 @@ function OnboardingProvider({
12359
12377
  let tourSteps = steps;
12360
12378
  if (!tourSteps) {
12361
12379
  const tour2 = tours.find((t) => t.id === tourId);
12362
- tourSteps = _optionalChain([tour2, 'optionalAccess', _344 => _344.steps]);
12380
+ tourSteps = _optionalChain([tour2, 'optionalAccess', _348 => _348.steps]);
12363
12381
  }
12364
12382
  if (!tourSteps || tourSteps.length === 0) {
12365
12383
  console.warn(`No steps found for tour: ${tourId}`);
@@ -12427,10 +12445,10 @@ function OnboardingProvider({
12427
12445
  when: {
12428
12446
  show: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
12429
12447
  setCurrentStepIndex(index);
12430
- _optionalChain([stepConfig, 'access', _345 => _345.onShow, 'optionalCall', _346 => _346()]);
12448
+ _optionalChain([stepConfig, 'access', _349 => _349.onShow, 'optionalCall', _350 => _350()]);
12431
12449
  }, "show"),
12432
12450
  hide: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
12433
- _optionalChain([stepConfig, 'access', _347 => _347.onHide, 'optionalCall', _348 => _348()]);
12451
+ _optionalChain([stepConfig, 'access', _351 => _351.onHide, 'optionalCall', _352 => _352()]);
12434
12452
  }, "hide")
12435
12453
  }
12436
12454
  });
@@ -12661,10 +12679,10 @@ function HowToEditorInternal({
12661
12679
  );
12662
12680
  const getDefaultValues = _react.useCallback.call(void 0,
12663
12681
  () => ({
12664
- id: _optionalChain([howTo, 'optionalAccess', _349 => _349.id]) || _uuid.v4.call(void 0, ),
12665
- name: _optionalChain([howTo, 'optionalAccess', _350 => _350.name]) || "",
12666
- description: _optionalChain([howTo, 'optionalAccess', _351 => _351.description]) || [],
12667
- pages: _chunkXAWKRNYMjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess', _352 => _352.pages]))
12682
+ id: _optionalChain([howTo, 'optionalAccess', _353 => _353.id]) || _uuid.v4.call(void 0, ),
12683
+ name: _optionalChain([howTo, 'optionalAccess', _354 => _354.name]) || "",
12684
+ description: _optionalChain([howTo, 'optionalAccess', _355 => _355.description]) || [],
12685
+ pages: _chunkXAWKRNYMjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess', _356 => _356.pages]))
12668
12686
  }),
12669
12687
  [howTo]
12670
12688
  );
@@ -12695,7 +12713,7 @@ function HowToEditorInternal({
12695
12713
  {
12696
12714
  form,
12697
12715
  entityType: t(`entities.howtos`, { count: 1 }),
12698
- entityName: _optionalChain([howTo, 'optionalAccess', _353 => _353.name]),
12716
+ entityName: _optionalChain([howTo, 'optionalAccess', _357 => _357.name]),
12699
12717
  isEdit: !!howTo,
12700
12718
  module: _chunkXAWKRNYMjs.Modules.HowTo,
12701
12719
  propagateChanges,
@@ -12999,7 +13017,7 @@ function withPatchedTitle(source, title) {
12999
13017
  return _chunkXAWKRNYMjs.rehydrate.call(void 0, _chunkXAWKRNYMjs.Modules.Assistant, {
13000
13018
  jsonApi: {
13001
13019
  ...dehydrated.jsonApi,
13002
- attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _354 => _354.jsonApi, 'optionalAccess', _355 => _355.attributes]), () => ( {})), title }
13020
+ attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _358 => _358.jsonApi, 'optionalAccess', _359 => _359.attributes]), () => ( {})), title }
13003
13021
  },
13004
13022
  included: dehydrated.included
13005
13023
  });
@@ -13026,7 +13044,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages }
13026
13044
  if (!trimmed) return;
13027
13045
  const optimistic = _chunkXAWKRNYMjs.AssistantMessage.buildOptimistic({
13028
13046
  content: trimmed,
13029
- assistantId: _optionalChain([assistant, 'optionalAccess', _356 => _356.id]),
13047
+ assistantId: _optionalChain([assistant, 'optionalAccess', _360 => _360.id]),
13030
13048
  position: nextPosition(messages)
13031
13049
  });
13032
13050
  setMessages((prev) => [...prev, optimistic]);
@@ -13036,7 +13054,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages }
13036
13054
  if (assistant && payload.assistantId && payload.assistantId !== assistant.id) return;
13037
13055
  if (typeof payload.status === "string") setStatus(payload.status);
13038
13056
  }, "handler");
13039
- _optionalChain([socket, 'optionalAccess', _357 => _357.on, 'call', _358 => _358("assistant:status", handler)]);
13057
+ _optionalChain([socket, 'optionalAccess', _361 => _361.on, 'call', _362 => _362("assistant:status", handler)]);
13040
13058
  try {
13041
13059
  if (!assistant) {
13042
13060
  const created = await _chunkXAWKRNYMjs.AssistantService.create({ firstMessage: trimmed });
@@ -13061,7 +13079,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages }
13061
13079
  return next;
13062
13080
  });
13063
13081
  } finally {
13064
- _optionalChain([socket, 'optionalAccess', _359 => _359.off, 'call', _360 => _360("assistant:status", handler)]);
13082
+ _optionalChain([socket, 'optionalAccess', _363 => _363.off, 'call', _364 => _364("assistant:status", handler)]);
13065
13083
  setSending(false);
13066
13084
  setStatus(void 0);
13067
13085
  }
@@ -13111,7 +13129,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages }
13111
13129
  await _chunkXAWKRNYMjs.AssistantService.delete({ id });
13112
13130
  setThreads((prev) => prev.filter((t2) => t2.id !== id));
13113
13131
  setAssistant((prev) => {
13114
- if (_optionalChain([prev, 'optionalAccess', _361 => _361.id]) === id) {
13132
+ if (_optionalChain([prev, 'optionalAccess', _365 => _365.id]) === id) {
13115
13133
  setMessages([]);
13116
13134
  return void 0;
13117
13135
  }
@@ -13326,7 +13344,7 @@ function EditableAvatar({
13326
13344
  }, [image, isUploading, patchImage, t]);
13327
13345
  const handleFileInputChange = _react.useCallback.call(void 0,
13328
13346
  (e) => {
13329
- const file = _optionalChain([e, 'access', _362 => _362.target, 'access', _363 => _363.files, 'optionalAccess', _364 => _364[0]]);
13347
+ const file = _optionalChain([e, 'access', _366 => _366.target, 'access', _367 => _367.files, 'optionalAccess', _368 => _368[0]]);
13330
13348
  if (file) handleFile(file);
13331
13349
  e.target.value = "";
13332
13350
  },
@@ -13335,7 +13353,7 @@ function EditableAvatar({
13335
13353
  const handleDrop = _react.useCallback.call(void 0,
13336
13354
  (e) => {
13337
13355
  e.preventDefault();
13338
- const file = _optionalChain([e, 'access', _365 => _365.dataTransfer, 'access', _366 => _366.files, 'optionalAccess', _367 => _367[0]]);
13356
+ const file = _optionalChain([e, 'access', _369 => _369.dataTransfer, 'access', _370 => _370.files, 'optionalAccess', _371 => _371[0]]);
13339
13357
  if (file && file.type.startsWith("image/")) {
13340
13358
  handleFile(file);
13341
13359
  }
@@ -13362,7 +13380,7 @@ function EditableAvatar({
13362
13380
  "button",
13363
13381
  {
13364
13382
  type: "button",
13365
- onClick: () => _optionalChain([fileInputRef, 'access', _368 => _368.current, 'optionalAccess', _369 => _369.click, 'call', _370 => _370()]),
13383
+ onClick: () => _optionalChain([fileInputRef, 'access', _372 => _372.current, 'optionalAccess', _373 => _373.click, 'call', _374 => _374()]),
13366
13384
  disabled: isUploading,
13367
13385
  className: "rounded-full p-2 text-white hover:bg-white/20 disabled:opacity-50",
13368
13386
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PencilIcon, { className: "h-4 w-4" })
@@ -13443,7 +13461,7 @@ function BreadcrumbMobile({
13443
13461
  }
13444
13462
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenu, { open, onOpenChange: setOpen, children: [
13445
13463
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenuTrigger, { className: "text-foreground text-xs/relaxed font-normal hover:bg-accent flex items-center gap-1 rounded-md px-1.5 py-0.5 transition-colors outline-none", children: [
13446
- _optionalChain([lastItem, 'optionalAccess', _371 => _371.name]),
13464
+ _optionalChain([lastItem, 'optionalAccess', _375 => _375.name]),
13447
13465
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "text-muted-foreground size-3.5" })
13448
13466
  ] }),
13449
13467
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuContent, { align: "start", children: allItems.map((item, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuItem, { children: item.href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: item.href, children: item.name }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: item.name }) }, index)) })
@@ -13705,7 +13723,7 @@ function RoundPageContainerTitle({
13705
13723
  ] }),
13706
13724
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkXAWKRNYMjs.cn.call(void 0, "text-primary w-full text-xl font-semibold"), children: title.element })
13707
13725
  ] }),
13708
- (title.functions || details) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-x-2", children: [
13726
+ (title.functions || details) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
13709
13727
  title.functions,
13710
13728
  details && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Tooltip2, { children: [
13711
13729
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -13747,7 +13765,7 @@ function RoundPageContainer({
13747
13765
  const [mounted, setMounted] = _react.useState.call(void 0, false);
13748
13766
  _react.useEffect.call(void 0, () => {
13749
13767
  const match = document.cookie.split("; ").find((row) => row.startsWith(`${DETAILS_COOKIE_NAME}=`));
13750
- if (_optionalChain([match, 'optionalAccess', _372 => _372.split, 'call', _373 => _373("="), 'access', _374 => _374[1]]) === "true") setShowDetailsState(true);
13768
+ if (_optionalChain([match, 'optionalAccess', _376 => _376.split, 'call', _377 => _377("="), 'access', _378 => _378[1]]) === "true") setShowDetailsState(true);
13751
13769
  }, []);
13752
13770
  _react.useEffect.call(void 0, () => {
13753
13771
  setMounted(true);
@@ -13759,11 +13777,11 @@ function RoundPageContainer({
13759
13777
  const searchParams = _navigation.useSearchParams.call(void 0, );
13760
13778
  const section = searchParams.get("section");
13761
13779
  const rewriteUrl = useUrlRewriter();
13762
- const initialValue = tabs ? (section && tabs.find((i) => (_nullishCoalesce(_optionalChain([i, 'access', _375 => _375.key, 'optionalAccess', _376 => _376.name]), () => ( i.label))) === section) ? section : null) || (_nullishCoalesce(_optionalChain([tabs, 'access', _377 => _377[0], 'access', _378 => _378.key, 'optionalAccess', _379 => _379.name]), () => ( tabs[0].label))) : void 0;
13780
+ const initialValue = tabs ? (section && tabs.find((i) => (_nullishCoalesce(_optionalChain([i, 'access', _379 => _379.key, 'optionalAccess', _380 => _380.name]), () => ( i.label))) === section) ? section : null) || (_nullishCoalesce(_optionalChain([tabs, 'access', _381 => _381[0], 'access', _382 => _382.key, 'optionalAccess', _383 => _383.name]), () => ( tabs[0].label))) : void 0;
13763
13781
  const [activeTab, setActiveTab] = _react.useState.call(void 0, initialValue);
13764
13782
  _react.useEffect.call(void 0, () => {
13765
13783
  if (tabs && section) {
13766
- const tab = tabs.find((i) => (_nullishCoalesce(_optionalChain([i, 'access', _380 => _380.key, 'optionalAccess', _381 => _381.name]), () => ( i.label))) === section);
13784
+ const tab = tabs.find((i) => (_nullishCoalesce(_optionalChain([i, 'access', _384 => _384.key, 'optionalAccess', _385 => _385.name]), () => ( i.label))) === section);
13767
13785
  if (tab) {
13768
13786
  setActiveTab(section);
13769
13787
  }
@@ -13776,7 +13794,7 @@ function RoundPageContainer({
13776
13794
  },
13777
13795
  [module, id, rewriteUrl]
13778
13796
  );
13779
- const activeFillHeight = _optionalChain([tabs, 'optionalAccess', _382 => _382.find, 'call', _383 => _383((t) => (_nullishCoalesce(_optionalChain([t, 'access', _384 => _384.key, 'optionalAccess', _385 => _385.name]), () => ( t.label))) === activeTab), 'optionalAccess', _386 => _386.fillHeight]) === true;
13797
+ const activeFillHeight = _optionalChain([tabs, 'optionalAccess', _386 => _386.find, 'call', _387 => _387((t) => (_nullishCoalesce(_optionalChain([t, 'access', _388 => _388.key, 'optionalAccess', _389 => _389.name]), () => ( t.label))) === activeTab), 'optionalAccess', _390 => _390.fillHeight]) === true;
13780
13798
  const isReady = mounted && isMobile !== void 0;
13781
13799
  if (!isReady) {
13782
13800
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
@@ -13832,10 +13850,10 @@ function RoundPageContainer({
13832
13850
  },
13833
13851
  children: [
13834
13852
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, {}) }),
13835
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: tabs.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: _nullishCoalesce(_optionalChain([tab, 'access', _387 => _387.key, 'optionalAccess', _388 => _388.name]), () => ( tab.label)), children: _nullishCoalesce(tab.contentLabel, () => ( tab.label)) }, tab.label)) })
13853
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: tabs.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: _nullishCoalesce(_optionalChain([tab, 'access', _391 => _391.key, 'optionalAccess', _392 => _392.name]), () => ( tab.label)), children: _nullishCoalesce(tab.contentLabel, () => ( tab.label)) }, tab.label)) })
13836
13854
  ]
13837
13855
  }
13838
- ) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsList, { children: tabs.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsTrigger, { value: _nullishCoalesce(_optionalChain([tab, 'access', _389 => _389.key, 'optionalAccess', _390 => _390.name]), () => ( tab.label)), className: "px-4", children: _nullishCoalesce(tab.contentLabel, () => ( tab.label)) }, tab.label)) }) }),
13856
+ ) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsList, { children: tabs.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsTrigger, { value: _nullishCoalesce(_optionalChain([tab, 'access', _393 => _393.key, 'optionalAccess', _394 => _394.name]), () => ( tab.label)), className: "px-4", children: _nullishCoalesce(tab.contentLabel, () => ( tab.label)) }, tab.label)) }) }),
13839
13857
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
13840
13858
  "div",
13841
13859
  {
@@ -13847,7 +13865,7 @@ function RoundPageContainer({
13847
13865
  children: tabs.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
13848
13866
  TabsContent,
13849
13867
  {
13850
- value: _nullishCoalesce(_optionalChain([tab, 'access', _391 => _391.key, 'optionalAccess', _392 => _392.name]), () => ( tab.label)),
13868
+ value: _nullishCoalesce(_optionalChain([tab, 'access', _395 => _395.key, 'optionalAccess', _396 => _396.name]), () => ( tab.label)),
13851
13869
  className: tab.fillHeight ? `flex flex-1 min-h-0 w-full flex-col` : `pb-20`,
13852
13870
  children: tab.content
13853
13871
  },
@@ -13975,14 +13993,14 @@ function BlockNoteEditorMentionHoverCard({
13975
13993
  const entityType = target.dataset.mentionType;
13976
13994
  const alias = target.dataset.mentionAlias;
13977
13995
  setHovered((prev) => {
13978
- if (_optionalChain([prev, 'optionalAccess', _393 => _393.id]) === id && _optionalChain([prev, 'optionalAccess', _394 => _394.element]) === target) return prev;
13996
+ if (_optionalChain([prev, 'optionalAccess', _397 => _397.id]) === id && _optionalChain([prev, 'optionalAccess', _398 => _398.element]) === target) return prev;
13979
13997
  return { id, entityType, alias, element: target };
13980
13998
  });
13981
13999
  }, "handleMouseOver");
13982
14000
  const handleMouseOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
13983
14001
  const target = e.target.closest("[data-mention-id]");
13984
14002
  if (!target) return;
13985
- const related = _optionalChain([e, 'access', _395 => _395.relatedTarget, 'optionalAccess', _396 => _396.closest, 'call', _397 => _397("[data-mention-id]")]);
14003
+ const related = _optionalChain([e, 'access', _399 => _399.relatedTarget, 'optionalAccess', _400 => _400.closest, 'call', _401 => _401("[data-mention-id]")]);
13986
14004
  if (related) return;
13987
14005
  scheduleClose();
13988
14006
  }, "handleMouseOut");
@@ -13996,7 +14014,7 @@ function BlockNoteEditorMentionHoverCard({
13996
14014
  }, [containerRef, mentionResolveFn, cancelClose, scheduleClose]);
13997
14015
  if (!hovered || !mentionResolveFn) return null;
13998
14016
  const resolved = mentionResolveFn(hovered.id, hovered.entityType, hovered.alias);
13999
- if (!_optionalChain([resolved, 'optionalAccess', _398 => _398.HoverContent])) return null;
14017
+ if (!_optionalChain([resolved, 'optionalAccess', _402 => _402.HoverContent])) return null;
14000
14018
  const ContentComponent = resolved.HoverContent;
14001
14019
  const rect = hovered.element.getBoundingClientRect();
14002
14020
  return _reactdom.createPortal.call(void 0,
@@ -14032,21 +14050,21 @@ var mentionDataAttrs = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (p)
14032
14050
  }), "mentionDataAttrs");
14033
14051
  var createMentionInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (resolveFn, disableMention, nameResolver) => {
14034
14052
  const Mention = React.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function Mention2(props) {
14035
- const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _399 => _399(props.id, props.entityType, props.alias)]), () => ( props.alias));
14053
+ const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _403 => _403(props.id, props.entityType, props.alias)]), () => ( props.alias));
14036
14054
  if (disableMention) {
14037
- const resolved2 = _optionalChain([resolveFn, 'optionalCall', _400 => _400(props.id, props.entityType, displayName)]);
14038
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _401 => _401.url]), () => ( "#")), className: "text-primary", children: [
14055
+ const resolved2 = _optionalChain([resolveFn, 'optionalCall', _404 => _404(props.id, props.entityType, displayName)]);
14056
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _405 => _405.url]), () => ( "#")), className: "text-primary", children: [
14039
14057
  "@",
14040
14058
  displayName
14041
14059
  ] });
14042
14060
  }
14043
- const resolved = _optionalChain([resolveFn, 'optionalCall', _402 => _402(props.id, props.entityType, displayName)]);
14044
- if (_optionalChain([resolved, 'optionalAccess', _403 => _403.Inline])) {
14061
+ const resolved = _optionalChain([resolveFn, 'optionalCall', _406 => _406(props.id, props.entityType, displayName)]);
14062
+ if (_optionalChain([resolved, 'optionalAccess', _407 => _407.Inline])) {
14045
14063
  const Custom = resolved.Inline;
14046
14064
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Custom, { ...props, alias: displayName });
14047
14065
  }
14048
- const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _404 => _404.url]), () => ( "#"));
14049
- const handleClick = _optionalChain([resolved, 'optionalAccess', _405 => _405.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
14066
+ const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _408 => _408.url]), () => ( "#"));
14067
+ const handleClick = _optionalChain([resolved, 'optionalAccess', _409 => _409.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
14050
14068
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
14051
14069
  _link2.default,
14052
14070
  {
@@ -14143,7 +14161,7 @@ function BlockNoteEditorMentionSuggestionMenu({
14143
14161
  if (!suggestionMenuComponent) return void 0;
14144
14162
  const Component2 = suggestionMenuComponent;
14145
14163
  const Wrapped = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
14146
- const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _406 => _406.items, 'access', _407 => _407[0], 'optionalAccess', _408 => _408.title]) === KEEP_OPEN_SENTINEL_TITLE;
14164
+ const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _410 => _410.items, 'access', _411 => _411[0], 'optionalAccess', _412 => _412.title]) === KEEP_OPEN_SENTINEL_TITLE;
14147
14165
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
14148
14166
  Component2,
14149
14167
  {
@@ -14152,7 +14170,7 @@ function BlockNoteEditorMentionSuggestionMenu({
14152
14170
  selectedIndex: isSentinelOnly ? void 0 : props.selectedIndex,
14153
14171
  onItemClick: (item) => {
14154
14172
  if (item.title === KEEP_OPEN_SENTINEL_TITLE) return;
14155
- _optionalChain([props, 'access', _409 => _409.onItemClick, 'optionalCall', _410 => _410(item)]);
14173
+ _optionalChain([props, 'access', _413 => _413.onItemClick, 'optionalCall', _414 => _414(item)]);
14156
14174
  }
14157
14175
  }
14158
14176
  );
@@ -14337,10 +14355,10 @@ var cellId = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
14337
14355
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => params.toggleId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
14338
14356
  Checkbox,
14339
14357
  {
14340
- checked: _optionalChain([params, 'access', _411 => _411.checkedIds, 'optionalAccess', _412 => _412.includes, 'call', _413 => _413(row.getValue(params.name))]) || false,
14358
+ checked: _optionalChain([params, 'access', _415 => _415.checkedIds, 'optionalAccess', _416 => _416.includes, 'call', _417 => _417(row.getValue(params.name))]) || false,
14341
14359
  onCheckedChange: (value) => {
14342
14360
  row.toggleSelected(!!value);
14343
- _optionalChain([params, 'access', _414 => _414.toggleId, 'optionalCall', _415 => _415(row.getValue(params.name))]);
14361
+ _optionalChain([params, 'access', _418 => _418.toggleId, 'optionalCall', _419 => _419(row.getValue(params.name))]);
14344
14362
  },
14345
14363
  "aria-label": "Select row"
14346
14364
  }
@@ -14399,7 +14417,7 @@ function useJsonApiGet(params) {
14399
14417
  const [response, setResponse] = _react.useState.call(void 0, null);
14400
14418
  const isMounted = _react.useRef.call(void 0, true);
14401
14419
  const fetchData = _react.useCallback.call(void 0, async () => {
14402
- if (_optionalChain([params, 'access', _416 => _416.options, 'optionalAccess', _417 => _417.enabled]) === false) return;
14420
+ if (_optionalChain([params, 'access', _420 => _420.options, 'optionalAccess', _421 => _421.enabled]) === false) return;
14403
14421
  setLoading(true);
14404
14422
  setError(null);
14405
14423
  try {
@@ -14426,9 +14444,9 @@ function useJsonApiGet(params) {
14426
14444
  setLoading(false);
14427
14445
  }
14428
14446
  }
14429
- }, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _418 => _418.options, 'optionalAccess', _419 => _419.enabled])]);
14447
+ }, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _422 => _422.options, 'optionalAccess', _423 => _423.enabled])]);
14430
14448
  const fetchNextPage = _react.useCallback.call(void 0, async () => {
14431
- if (!_optionalChain([response, 'optionalAccess', _420 => _420.nextPage])) return;
14449
+ if (!_optionalChain([response, 'optionalAccess', _424 => _424.nextPage])) return;
14432
14450
  setLoading(true);
14433
14451
  try {
14434
14452
  const nextResponse = await response.nextPage();
@@ -14449,7 +14467,7 @@ function useJsonApiGet(params) {
14449
14467
  }
14450
14468
  }, [response]);
14451
14469
  const fetchPreviousPage = _react.useCallback.call(void 0, async () => {
14452
- if (!_optionalChain([response, 'optionalAccess', _421 => _421.prevPage])) return;
14470
+ if (!_optionalChain([response, 'optionalAccess', _425 => _425.prevPage])) return;
14453
14471
  setLoading(true);
14454
14472
  try {
14455
14473
  const prevResponse = await response.prevPage();
@@ -14475,15 +14493,15 @@ function useJsonApiGet(params) {
14475
14493
  return () => {
14476
14494
  isMounted.current = false;
14477
14495
  };
14478
- }, [fetchData, ..._optionalChain([params, 'access', _422 => _422.options, 'optionalAccess', _423 => _423.deps]) || []]);
14496
+ }, [fetchData, ..._optionalChain([params, 'access', _426 => _426.options, 'optionalAccess', _427 => _427.deps]) || []]);
14479
14497
  return {
14480
14498
  data,
14481
14499
  loading,
14482
14500
  error,
14483
14501
  response,
14484
14502
  refetch: fetchData,
14485
- hasNextPage: !!_optionalChain([response, 'optionalAccess', _424 => _424.next]),
14486
- hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _425 => _425.prev]),
14503
+ hasNextPage: !!_optionalChain([response, 'optionalAccess', _428 => _428.next]),
14504
+ hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _429 => _429.prev]),
14487
14505
  fetchNextPage,
14488
14506
  fetchPreviousPage
14489
14507
  };
@@ -14561,17 +14579,17 @@ function useJsonApiMutation(config) {
14561
14579
  if (apiResponse.ok) {
14562
14580
  const resultData = apiResponse.data;
14563
14581
  setData(resultData);
14564
- _optionalChain([config, 'access', _426 => _426.onSuccess, 'optionalCall', _427 => _427(resultData)]);
14582
+ _optionalChain([config, 'access', _430 => _430.onSuccess, 'optionalCall', _431 => _431(resultData)]);
14565
14583
  return resultData;
14566
14584
  } else {
14567
14585
  setError(apiResponse.error);
14568
- _optionalChain([config, 'access', _428 => _428.onError, 'optionalCall', _429 => _429(apiResponse.error)]);
14586
+ _optionalChain([config, 'access', _432 => _432.onError, 'optionalCall', _433 => _433(apiResponse.error)]);
14569
14587
  return null;
14570
14588
  }
14571
14589
  } catch (err) {
14572
14590
  const errorMessage = err instanceof Error ? err.message : "Unknown error";
14573
14591
  setError(errorMessage);
14574
- _optionalChain([config, 'access', _430 => _430.onError, 'optionalCall', _431 => _431(errorMessage)]);
14592
+ _optionalChain([config, 'access', _434 => _434.onError, 'optionalCall', _435 => _435(errorMessage)]);
14575
14593
  return null;
14576
14594
  } finally {
14577
14595
  setLoading(false);
@@ -14644,7 +14662,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
14644
14662
  {
14645
14663
  href: hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator) ? generateUrl({
14646
14664
  page: "/administration",
14647
- id: _optionalChain([_chunkXAWKRNYMjs.Modules, 'access', _432 => _432.Company, 'access', _433 => _433.pageUrl, 'optionalAccess', _434 => _434.substring, 'call', _435 => _435(1)]),
14665
+ id: _optionalChain([_chunkXAWKRNYMjs.Modules, 'access', _436 => _436.Company, 'access', _437 => _437.pageUrl, 'optionalAccess', _438 => _438.substring, 'call', _439 => _439(1)]),
14648
14666
  childPage: company.id
14649
14667
  }) : generateUrl({ page: _chunkXAWKRNYMjs.Modules.Company, id: company.id }),
14650
14668
  children: row.getValue("name")
@@ -14660,7 +14678,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
14660
14678
  })
14661
14679
  };
14662
14680
  const columns = _react.useMemo.call(void 0, () => {
14663
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _436 => _436[field], 'optionalCall', _437 => _437()])).filter((col) => col !== void 0);
14681
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _440 => _440[field], 'optionalCall', _441 => _441()])).filter((col) => col !== void 0);
14664
14682
  }, [params.fields, fieldColumnMap, t, generateUrl, hasRole]);
14665
14683
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
14666
14684
  }, "useCompanyTableStructure");
@@ -14672,7 +14690,7 @@ var GRACE_DAYS = 3;
14672
14690
  var isAdministrator = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (currentUser) => {
14673
14691
  if (!currentUser || !_chunkSE5HIHJSjs.isRolesConfigured.call(void 0, )) return false;
14674
14692
  const adminRoleId = _chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator;
14675
- return !!_optionalChain([currentUser, 'access', _438 => _438.roles, 'optionalAccess', _439 => _439.some, 'call', _440 => _440((role) => role.id === adminRoleId)]);
14693
+ return !!_optionalChain([currentUser, 'access', _442 => _442.roles, 'optionalAccess', _443 => _443.some, 'call', _444 => _444((role) => role.id === adminRoleId)]);
14676
14694
  }, "isAdministrator");
14677
14695
  function useSubscriptionStatus() {
14678
14696
  const { company, currentUser } = useCurrentUserContext();
@@ -14789,7 +14807,7 @@ var useRoleTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
14789
14807
  })
14790
14808
  };
14791
14809
  const columns = _react.useMemo.call(void 0, () => {
14792
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _441 => _441[field], 'optionalCall', _442 => _442()])).filter((col) => col !== void 0);
14810
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _445 => _445[field], 'optionalCall', _446 => _446()])).filter((col) => col !== void 0);
14793
14811
  }, [params.fields, fieldColumnMap, t, generateUrl]);
14794
14812
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
14795
14813
  }, "useRoleTableStructure");
@@ -14890,11 +14908,11 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
14890
14908
  return params.fields.map((field) => {
14891
14909
  const localHandler = fieldColumnMap[field];
14892
14910
  if (localHandler) return localHandler();
14893
- const customHandler = _optionalChain([params, 'access', _443 => _443.context, 'optionalAccess', _444 => _444.customCells, 'optionalAccess', _445 => _445[field]]);
14911
+ const customHandler = _optionalChain([params, 'access', _447 => _447.context, 'optionalAccess', _448 => _448.customCells, 'optionalAccess', _449 => _449[field]]);
14894
14912
  if (customHandler) return customHandler({ t });
14895
14913
  return void 0;
14896
14914
  }).filter((col) => col !== void 0);
14897
- }, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _446 => _446.context, 'optionalAccess', _447 => _447.customCells])]);
14915
+ }, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _450 => _450.context, 'optionalAccess', _451 => _451.customCells])]);
14898
14916
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
14899
14917
  }, "useContentTableStructure");
14900
14918
 
@@ -15229,7 +15247,7 @@ function ContentTableSearch({ data }) {
15229
15247
  const handleSearchIconClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
15230
15248
  if (!isExpanded) {
15231
15249
  setIsFocused(true);
15232
- setTimeout(() => _optionalChain([inputRef, 'access', _448 => _448.current, 'optionalAccess', _449 => _449.focus, 'call', _450 => _450()]), 50);
15250
+ setTimeout(() => _optionalChain([inputRef, 'access', _452 => _452.current, 'optionalAccess', _453 => _453.focus, 'call', _454 => _454()]), 50);
15233
15251
  }
15234
15252
  }, "handleSearchIconClick");
15235
15253
  const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
@@ -15306,7 +15324,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
15306
15324
  props.defaultExpanded === true ? true : typeof props.defaultExpanded === "object" ? props.defaultExpanded : {}
15307
15325
  );
15308
15326
  const { data: tableData, columns: tableColumns } = useTableGenerator(props.tableGeneratorType, {
15309
- data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _451 => _451.data]), () => ( EMPTY_ARRAY)),
15327
+ data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _455 => _455.data]), () => ( EMPTY_ARRAY)),
15310
15328
  fields,
15311
15329
  checkedIds,
15312
15330
  toggleId,
@@ -15339,7 +15357,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
15339
15357
  });
15340
15358
  const rowModel = tableData ? table.getRowModel() : null;
15341
15359
  const groupedRows = _react.useMemo.call(void 0, () => {
15342
- if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _452 => _452.rows, 'optionalAccess', _453 => _453.length])) return null;
15360
+ if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _456 => _456.rows, 'optionalAccess', _457 => _457.length])) return null;
15343
15361
  const groupMap = /* @__PURE__ */ new Map();
15344
15362
  for (const row of rowModel.rows) {
15345
15363
  const keys = getGroupKeys(row.original, props.groupBy);
@@ -15395,10 +15413,10 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
15395
15413
  ) }),
15396
15414
  table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: headerGroup.headers.map((header) => {
15397
15415
  const meta = header.column.columnDef.meta;
15398
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _454 => _454.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
15416
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _458 => _458.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
15399
15417
  }) }, headerGroup.id))
15400
15418
  ] }),
15401
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _455 => _455.rows, 'optionalAccess', _456 => _456.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React.default.Fragment, { children: [
15419
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _459 => _459.rows, 'optionalAccess', _460 => _460.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React.default.Fragment, { children: [
15402
15420
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15403
15421
  TableCell,
15404
15422
  {
@@ -15409,11 +15427,11 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
15409
15427
  ) }),
15410
15428
  group.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: row.getVisibleCells().map((cell) => {
15411
15429
  const meta = cell.column.columnDef.meta;
15412
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _457 => _457.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
15430
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _461 => _461.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
15413
15431
  }) }, row.id))
15414
15432
  ] }, group.groupKey)) : rowModel.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: row.getVisibleCells().map((cell) => {
15415
15433
  const meta = cell.column.columnDef.meta;
15416
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _458 => _458.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
15434
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _462 => _462.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
15417
15435
  }) }, row.id)) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { colSpan: tableColumns.length, className: "h-24 text-center", children: "No results." }) }) }),
15418
15436
  showFooter && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { colSpan: tableColumns.length, className: "bg-card py-4 text-right", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-end space-x-2", children: [
15419
15437
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -15423,7 +15441,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
15423
15441
  size: "sm",
15424
15442
  onClick: (e) => {
15425
15443
  e.preventDefault();
15426
- _optionalChain([data, 'access', _459 => _459.previous, 'optionalCall', _460 => _460(true)]);
15444
+ _optionalChain([data, 'access', _463 => _463.previous, 'optionalCall', _464 => _464(true)]);
15427
15445
  },
15428
15446
  disabled: !data.previous,
15429
15447
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronLeft, { className: "h-4 w-4" })
@@ -15437,7 +15455,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
15437
15455
  size: "sm",
15438
15456
  onClick: (e) => {
15439
15457
  e.preventDefault();
15440
- _optionalChain([data, 'access', _461 => _461.next, 'optionalCall', _462 => _462(true)]);
15458
+ _optionalChain([data, 'access', _465 => _465.next, 'optionalCall', _466 => _466(true)]);
15441
15459
  },
15442
15460
  disabled: !data.next,
15443
15461
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight, { className: "h-4 w-4" })
@@ -15458,7 +15476,7 @@ function ContentListGrid(props) {
15458
15476
  if (!data.next || !sentinelRef.current) return;
15459
15477
  const observer = new IntersectionObserver(
15460
15478
  (entries) => {
15461
- if (_optionalChain([entries, 'access', _463 => _463[0], 'optionalAccess', _464 => _464.isIntersecting])) _optionalChain([data, 'access', _465 => _465.next, 'optionalCall', _466 => _466()]);
15479
+ if (_optionalChain([entries, 'access', _467 => _467[0], 'optionalAccess', _468 => _468.isIntersecting])) _optionalChain([data, 'access', _469 => _469.next, 'optionalCall', _470 => _470()]);
15462
15480
  },
15463
15481
  { threshold: 0.1, rootMargin: "200px" }
15464
15482
  );
@@ -16208,7 +16226,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
16208
16226
  newDigits[index] = digit;
16209
16227
  setDigits(newDigits);
16210
16228
  if (digit && index < 5) {
16211
- _optionalChain([inputRefs, 'access', _467 => _467.current, 'access', _468 => _468[index + 1], 'optionalAccess', _469 => _469.focus, 'call', _470 => _470()]);
16229
+ _optionalChain([inputRefs, 'access', _471 => _471.current, 'access', _472 => _472[index + 1], 'optionalAccess', _473 => _473.focus, 'call', _474 => _474()]);
16212
16230
  }
16213
16231
  const code = newDigits.join("");
16214
16232
  if (code.length === 6 && newDigits.every((d) => d !== "")) {
@@ -16217,7 +16235,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
16217
16235
  }, "handleChange");
16218
16236
  const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index, e) => {
16219
16237
  if (e.key === "Backspace" && !digits[index] && index > 0) {
16220
- _optionalChain([inputRefs, 'access', _471 => _471.current, 'access', _472 => _472[index - 1], 'optionalAccess', _473 => _473.focus, 'call', _474 => _474()]);
16238
+ _optionalChain([inputRefs, 'access', _475 => _475.current, 'access', _476 => _476[index - 1], 'optionalAccess', _477 => _477.focus, 'call', _478 => _478()]);
16221
16239
  }
16222
16240
  }, "handleKeyDown");
16223
16241
  const handlePaste = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
@@ -16226,7 +16244,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
16226
16244
  if (pastedData.length === 6) {
16227
16245
  const newDigits = pastedData.split("");
16228
16246
  setDigits(newDigits);
16229
- _optionalChain([inputRefs, 'access', _475 => _475.current, 'access', _476 => _476[5], 'optionalAccess', _477 => _477.focus, 'call', _478 => _478()]);
16247
+ _optionalChain([inputRefs, 'access', _479 => _479.current, 'access', _480 => _480[5], 'optionalAccess', _481 => _481.focus, 'call', _482 => _482()]);
16230
16248
  onComplete(pastedData);
16231
16249
  }
16232
16250
  }, "handlePaste");
@@ -16437,8 +16455,8 @@ function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
16437
16455
  try {
16438
16456
  const registrationData = await _chunkXAWKRNYMjs.TwoFactorService.getPasskeyRegistrationOptions({
16439
16457
  id: _uuid.v4.call(void 0, ),
16440
- userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _479 => _479.email]), () => ( "")),
16441
- userDisplayName: _optionalChain([currentUser, 'optionalAccess', _480 => _480.name])
16458
+ userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _483 => _483.email]), () => ( "")),
16459
+ userDisplayName: _optionalChain([currentUser, 'optionalAccess', _484 => _484.name])
16442
16460
  });
16443
16461
  const credential = await _browser.startRegistration.call(void 0, { optionsJSON: registrationData.options });
16444
16462
  await _chunkXAWKRNYMjs.TwoFactorService.verifyPasskeyRegistration({
@@ -16589,7 +16607,7 @@ function TotpSetupDialog({ onSuccess, trigger }) {
16589
16607
  const setup = await _chunkXAWKRNYMjs.TwoFactorService.setupTotp({
16590
16608
  id: _uuid.v4.call(void 0, ),
16591
16609
  name: name.trim(),
16592
- accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _481 => _481.email]), () => ( ""))
16610
+ accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _485 => _485.email]), () => ( ""))
16593
16611
  });
16594
16612
  setQrCodeUri(setup.qrCodeUri);
16595
16613
  setAuthenticatorId(setup.authenticatorId);
@@ -16723,7 +16741,7 @@ function TwoFactorSettings() {
16723
16741
  if (isLoading) {
16724
16742
  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") }) }) });
16725
16743
  }
16726
- const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _482 => _482.isEnabled]), () => ( false));
16744
+ const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _486 => _486.isEnabled]), () => ( false));
16727
16745
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { children: [
16728
16746
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
16729
16747
  isEnabled ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ShieldCheck, { className: "h-6 w-6 text-green-600" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ShieldAlert, { className: "h-6 w-6 text-yellow-600" }),
@@ -16761,7 +16779,7 @@ function TwoFactorSettings() {
16761
16779
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-medium", children: t("auth.two_factor.backup_codes") }),
16762
16780
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("auth.two_factor.backup_codes_description") })
16763
16781
  ] }),
16764
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _483 => _483.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
16782
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _487 => _487.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
16765
16783
  ] }) }),
16766
16784
  !isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
16767
16785
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, {}),
@@ -16939,9 +16957,9 @@ function AcceptInvitation() {
16939
16957
  });
16940
16958
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
16941
16959
  try {
16942
- if (!_optionalChain([params, 'optionalAccess', _484 => _484.code])) return;
16960
+ if (!_optionalChain([params, 'optionalAccess', _488 => _488.code])) return;
16943
16961
  const payload = {
16944
- code: _optionalChain([params, 'optionalAccess', _485 => _485.code]),
16962
+ code: _optionalChain([params, 'optionalAccess', _489 => _489.code]),
16945
16963
  password: values.password
16946
16964
  };
16947
16965
  await _chunkXAWKRNYMjs.AuthService.acceptInvitation(payload);
@@ -17291,7 +17309,7 @@ function Logout({ storageKeys }) {
17291
17309
  const generateUrl = usePageUrlGenerator();
17292
17310
  _react.useEffect.call(void 0, () => {
17293
17311
  const logOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
17294
- if (_optionalChain([storageKeys, 'optionalAccess', _486 => _486.length])) {
17312
+ if (_optionalChain([storageKeys, 'optionalAccess', _490 => _490.length])) {
17295
17313
  clearClientStorage(storageKeys);
17296
17314
  }
17297
17315
  await _chunkXAWKRNYMjs.AuthService.logout();
@@ -17314,14 +17332,14 @@ function RefreshUser() {
17314
17332
  setUser(fullUser);
17315
17333
  const token = {
17316
17334
  userId: fullUser.id,
17317
- companyId: _optionalChain([fullUser, 'access', _487 => _487.company, 'optionalAccess', _488 => _488.id]),
17335
+ companyId: _optionalChain([fullUser, 'access', _491 => _491.company, 'optionalAccess', _492 => _492.id]),
17318
17336
  roles: fullUser.roles.map((role) => role.id),
17319
- features: _nullishCoalesce(_optionalChain([fullUser, 'access', _489 => _489.company, 'optionalAccess', _490 => _490.features, 'optionalAccess', _491 => _491.map, 'call', _492 => _492((feature) => feature.id)]), () => ( [])),
17337
+ features: _nullishCoalesce(_optionalChain([fullUser, 'access', _493 => _493.company, 'optionalAccess', _494 => _494.features, 'optionalAccess', _495 => _495.map, 'call', _496 => _496((feature) => feature.id)]), () => ( [])),
17320
17338
  modules: fullUser.modules.map((module) => {
17321
17339
  return { id: module.id, permissions: module.permissions };
17322
17340
  })
17323
17341
  };
17324
- await _optionalChain([_chunkXAWKRNYMjs.getTokenHandler.call(void 0, ), 'optionalAccess', _493 => _493.updateToken, 'call', _494 => _494(token)]);
17342
+ await _optionalChain([_chunkXAWKRNYMjs.getTokenHandler.call(void 0, ), 'optionalAccess', _497 => _497.updateToken, 'call', _498 => _498(token)]);
17325
17343
  _cookiesnext.deleteCookie.call(void 0, "reloadData");
17326
17344
  }
17327
17345
  }, "loadFullUser");
@@ -17385,9 +17403,9 @@ function ResetPassword() {
17385
17403
  });
17386
17404
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
17387
17405
  try {
17388
- if (!_optionalChain([params, 'optionalAccess', _495 => _495.code])) return;
17406
+ if (!_optionalChain([params, 'optionalAccess', _499 => _499.code])) return;
17389
17407
  const payload = {
17390
- code: _optionalChain([params, 'optionalAccess', _496 => _496.code]),
17408
+ code: _optionalChain([params, 'optionalAccess', _500 => _500.code]),
17391
17409
  password: values.password
17392
17410
  };
17393
17411
  await _chunkXAWKRNYMjs.AuthService.resetPassword(payload);
@@ -17736,7 +17754,7 @@ function extractHeadings(blocks) {
17736
17754
  function processBlocks(blockArray) {
17737
17755
  for (const block of blockArray) {
17738
17756
  if (block.type === "heading") {
17739
- const level = _optionalChain([block, 'access', _497 => _497.props, 'optionalAccess', _498 => _498.level]) || 1;
17757
+ const level = _optionalChain([block, 'access', _501 => _501.props, 'optionalAccess', _502 => _502.level]) || 1;
17740
17758
  const text = extractTextFromContent(block.content);
17741
17759
  if (text.trim()) {
17742
17760
  headings.push({
@@ -18079,7 +18097,7 @@ var useHowToTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
18079
18097
  })
18080
18098
  };
18081
18099
  const columns = _react.useMemo.call(void 0, () => {
18082
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _499 => _499[field], 'optionalCall', _500 => _500()])).filter((col) => col !== void 0);
18100
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _503 => _503[field], 'optionalCall', _504 => _504()])).filter((col) => col !== void 0);
18083
18101
  }, [params.fields, fieldColumnMap, t, generateUrl]);
18084
18102
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
18085
18103
  }, "useHowToTableStructure");
@@ -18145,7 +18163,7 @@ function HowToMultiSelector({
18145
18163
  retriever: (params) => _chunkXAWKRNYMjs.HowToService.findMany(params),
18146
18164
  module: _chunkXAWKRNYMjs.Modules.HowTo,
18147
18165
  getLabel: (howTo) => howTo.name,
18148
- excludeId: _optionalChain([currentHowTo, 'optionalAccess', _501 => _501.id]),
18166
+ excludeId: _optionalChain([currentHowTo, 'optionalAccess', _505 => _505.id]),
18149
18167
  onChange
18150
18168
  }
18151
18169
  );
@@ -18210,7 +18228,7 @@ function HowToSelector({
18210
18228
  }, "setHowTo");
18211
18229
  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: [
18212
18230
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
18213
- /* @__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', _502 => _502.value, 'optionalAccess', _503 => _503.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 }) }))) }) }) }),
18231
+ /* @__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', _506 => _506.value, 'optionalAccess', _507 => _507.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 }) }))) }) }) }),
18214
18232
  field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
18215
18233
  _lucidereact.CircleX,
18216
18234
  {
@@ -18565,9 +18583,9 @@ function CitationsTab({ citations, sources }) {
18565
18583
  ] }) }),
18566
18584
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: sorted.map((chunk) => {
18567
18585
  const isOpen = expanded.has(chunk.id);
18568
- const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _504 => _504.get, 'call', _505 => _505(chunk.nodeId)]) : void 0;
18586
+ const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _508 => _508.get, 'call', _509 => _509(chunk.nodeId)]) : void 0;
18569
18587
  const fallbackName = chunk.nodeId ? `${_nullishCoalesce(chunk.nodeType, () => ( t("features.assistant.message.sources.source")))} ${chunk.nodeId.slice(0, 8)}` : _nullishCoalesce(chunk.nodeType, () => ( t("features.assistant.message.sources.source")));
18570
- const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _506 => _506.name]), () => ( fallbackName));
18588
+ const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _510 => _510.name]), () => ( fallbackName));
18571
18589
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
18572
18590
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, TableRow, { children: [
18573
18591
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -18614,7 +18632,7 @@ function ContentsTab({ citations, sources }) {
18614
18632
  for (const c of citations) {
18615
18633
  const id = c.nodeId;
18616
18634
  if (!id) continue;
18617
- const source = _optionalChain([sources, 'optionalAccess', _507 => _507.get, 'call', _508 => _508(id)]);
18635
+ const source = _optionalChain([sources, 'optionalAccess', _511 => _511.get, 'call', _512 => _512(id)]);
18618
18636
  if (!source) continue;
18619
18637
  const existing = map.get(id);
18620
18638
  if (existing) {
@@ -18679,7 +18697,7 @@ function UsersTab({ users, citations, sources }) {
18679
18697
  const generate = usePageUrlGenerator();
18680
18698
  const userMap = /* @__PURE__ */ new Map();
18681
18699
  for (const u of users) {
18682
- if (!_optionalChain([u, 'optionalAccess', _509 => _509.id])) continue;
18700
+ if (!_optionalChain([u, 'optionalAccess', _513 => _513.id])) continue;
18683
18701
  userMap.set(u.id, { user: u, contentCount: 0, citationCount: 0 });
18684
18702
  }
18685
18703
  if (citations && sources) {
@@ -18783,7 +18801,7 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
18783
18801
  }
18784
18802
  return ids.size;
18785
18803
  }, [message.citations, sources]);
18786
- const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _510 => _510.length]), () => ( 0));
18804
+ const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _514 => _514.length]), () => ( 0));
18787
18805
  const total = refsCount + citationsCount + contentsCount + usersCount + suggestionsCount;
18788
18806
  const visibleTabs = [];
18789
18807
  if (suggestionsCount > 0) visibleTabs.push("suggested");
@@ -18842,8 +18860,8 @@ var SourcesFetcher = class extends _chunkXAWKRNYMjs.ClientAbstractService {
18842
18860
  static async findManyByIds(params) {
18843
18861
  const endpoint = new (0, _chunkXAWKRNYMjs.EndpointCreator)({ endpoint: params.module });
18844
18862
  endpoint.addAdditionalParam(params.idsParam, params.ids.join(","));
18845
- if (_optionalChain([params, 'access', _511 => _511.module, 'access', _512 => _512.inclusions, 'optionalAccess', _513 => _513.lists, 'optionalAccess', _514 => _514.fields])) endpoint.limitToFields(params.module.inclusions.lists.fields);
18846
- if (_optionalChain([params, 'access', _515 => _515.module, 'access', _516 => _516.inclusions, 'optionalAccess', _517 => _517.lists, 'optionalAccess', _518 => _518.types])) endpoint.limitToType(params.module.inclusions.lists.types);
18863
+ if (_optionalChain([params, 'access', _515 => _515.module, 'access', _516 => _516.inclusions, 'optionalAccess', _517 => _517.lists, 'optionalAccess', _518 => _518.fields])) endpoint.limitToFields(params.module.inclusions.lists.fields);
18864
+ if (_optionalChain([params, 'access', _519 => _519.module, 'access', _520 => _520.inclusions, 'optionalAccess', _521 => _521.lists, 'optionalAccess', _522 => _522.types])) endpoint.limitToType(params.module.inclusions.lists.types);
18847
18865
  return this.callApi({
18848
18866
  type: params.module,
18849
18867
  method: "GET" /* GET */,
@@ -18922,7 +18940,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
18922
18940
  return void 0;
18923
18941
  }
18924
18942
  })()));
18925
- if (_optionalChain([author, 'optionalAccess', _519 => _519.id])) userMap.set(author.id, author);
18943
+ if (_optionalChain([author, 'optionalAccess', _523 => _523.id])) userMap.set(author.id, author);
18926
18944
  }
18927
18945
  return Array.from(userMap.values());
18928
18946
  }, [resolved]);
@@ -18944,14 +18962,14 @@ _chunk7QVYU63Ejs.__name.call(void 0, MessageSourcesContainer, "MessageSourcesCon
18944
18962
  function MessageItem({ message, isLatestAssistant, onSelectFollowUp, failedMessageIds, onRetry }) {
18945
18963
  const t = _nextintl.useTranslations.call(void 0, );
18946
18964
  const isUser = message.role === "user";
18947
- const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _520 => _520.has, 'call', _521 => _521(message.id)]);
18965
+ const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _524 => _524.has, 'call', _525 => _525(message.id)]);
18948
18966
  if (isUser) {
18949
18967
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-end gap-1", children: [
18950
18968
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-primary text-primary-foreground max-w-[72%] rounded-2xl rounded-br-sm px-3.5 py-2 text-sm", children: message.content }),
18951
18969
  isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-destructive flex items-center gap-2 text-xs", children: [
18952
18970
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-3.5 w-3.5" }),
18953
18971
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("features.assistant.send_failed") }),
18954
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "underline", onClick: () => _optionalChain([onRetry, 'optionalCall', _522 => _522(message.id)]), children: t("features.assistant.retry") })
18972
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "underline", onClick: () => _optionalChain([onRetry, 'optionalCall', _526 => _526(message.id)]), children: t("features.assistant.retry") })
18955
18973
  ] })
18956
18974
  ] });
18957
18975
  }
@@ -19017,7 +19035,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, AssistantStatusLine, "AssistantStatusLine")
19017
19035
  function AssistantThread({ messages, sending, status, onSelectFollowUp, failedMessageIds, onRetry }) {
19018
19036
  const endRef = _react.useRef.call(void 0, null);
19019
19037
  _react.useEffect.call(void 0, () => {
19020
- _optionalChain([endRef, 'access', _523 => _523.current, 'optionalAccess', _524 => _524.scrollIntoView, 'call', _525 => _525({ behavior: "smooth" })]);
19038
+ _optionalChain([endRef, 'access', _527 => _527.current, 'optionalAccess', _528 => _528.scrollIntoView, 'call', _529 => _529({ behavior: "smooth" })]);
19021
19039
  }, [messages.length, sending]);
19022
19040
  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: [
19023
19041
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -19045,7 +19063,7 @@ function AssistantContainer() {
19045
19063
  AssistantSidebar,
19046
19064
  {
19047
19065
  threads: ctx.threads,
19048
- activeId: _optionalChain([ctx, 'access', _526 => _526.assistant, 'optionalAccess', _527 => _527.id]),
19066
+ activeId: _optionalChain([ctx, 'access', _530 => _530.assistant, 'optionalAccess', _531 => _531.id]),
19049
19067
  onSelect: ctx.selectThread,
19050
19068
  onNew: ctx.startNew
19051
19069
  }
@@ -19138,14 +19156,14 @@ function NotificationsList({ archived }) {
19138
19156
  ] }),
19139
19157
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Skeleton, { className: "h-8 w-20" })
19140
19158
  ] }) }) }, i)) }), "LoadingSkeleton");
19141
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access', _528 => _528.data, 'optionalAccess', _529 => _529.map, 'call', _530 => _530((notification) => {
19159
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access', _532 => _532.data, 'optionalAccess', _533 => _533.map, 'call', _534 => _534((notification) => {
19142
19160
  const notificationData = generateNotificationData({ notification, generateUrl });
19143
19161
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "p-0", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `flex w-full flex-row items-center p-2`, children: [
19144
19162
  notificationData.actor ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-12 max-w-12 px-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generateUrl({ page: _chunkXAWKRNYMjs.Modules.User, id: notificationData.actor.id }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user: notificationData.actor, className: "h-8 w-8" }) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-14 max-w-14 px-2" }),
19145
19163
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
19146
19164
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
19147
19165
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
19148
- actor: _nullishCoalesce(_optionalChain([notificationData, 'access', _531 => _531.actor, 'optionalAccess', _532 => _532.name]), () => ( "")),
19166
+ actor: _nullishCoalesce(_optionalChain([notificationData, 'access', _535 => _535.actor, 'optionalAccess', _536 => _536.name]), () => ( "")),
19149
19167
  title: notificationData.title
19150
19168
  }) }),
19151
19169
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
@@ -19495,7 +19513,7 @@ var DEFAULT_TRANSLATIONS = {
19495
19513
  invalidEmail: "Please enter a valid email address"
19496
19514
  };
19497
19515
  async function copyToClipboard(text) {
19498
- if (_optionalChain([navigator, 'access', _533 => _533.clipboard, 'optionalAccess', _534 => _534.writeText])) {
19516
+ if (_optionalChain([navigator, 'access', _537 => _537.clipboard, 'optionalAccess', _538 => _538.writeText])) {
19499
19517
  try {
19500
19518
  await navigator.clipboard.writeText(text);
19501
19519
  return true;
@@ -19537,7 +19555,7 @@ function ReferralWidget({
19537
19555
  const linkInputRef = _react.useRef.call(void 0, null);
19538
19556
  const config = _chunkSE5HIHJSjs.getReferralConfig.call(void 0, );
19539
19557
  const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
19540
- const referralUrl = _optionalChain([stats, 'optionalAccess', _535 => _535.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
19558
+ const referralUrl = _optionalChain([stats, 'optionalAccess', _539 => _539.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
19541
19559
  if (!_chunkSE5HIHJSjs.isReferralEnabled.call(void 0, )) {
19542
19560
  return null;
19543
19561
  }
@@ -19547,7 +19565,7 @@ function ReferralWidget({
19547
19565
  if (success) {
19548
19566
  setCopied(true);
19549
19567
  _chunkXAWKRNYMjs.showToast.call(void 0, t.copiedMessage);
19550
- _optionalChain([onLinkCopied, 'optionalCall', _536 => _536()]);
19568
+ _optionalChain([onLinkCopied, 'optionalCall', _540 => _540()]);
19551
19569
  setTimeout(() => setCopied(false), 2e3);
19552
19570
  } else {
19553
19571
  _chunkXAWKRNYMjs.showError.call(void 0, t.copyError);
@@ -19561,12 +19579,12 @@ function ReferralWidget({
19561
19579
  try {
19562
19580
  await sendInvite(email);
19563
19581
  _chunkXAWKRNYMjs.showToast.call(void 0, t.inviteSent);
19564
- _optionalChain([onInviteSent, 'optionalCall', _537 => _537(email)]);
19582
+ _optionalChain([onInviteSent, 'optionalCall', _541 => _541(email)]);
19565
19583
  setEmail("");
19566
19584
  } catch (err) {
19567
19585
  const error2 = err instanceof Error ? err : new Error(t.inviteError);
19568
19586
  _chunkXAWKRNYMjs.showError.call(void 0, error2.message);
19569
- _optionalChain([onInviteError, 'optionalCall', _538 => _538(error2)]);
19587
+ _optionalChain([onInviteError, 'optionalCall', _542 => _542(error2)]);
19570
19588
  }
19571
19589
  }, [email, sendInvite, t.inviteSent, t.inviteError, t.invalidEmail, onInviteSent, onInviteError]);
19572
19590
  const handleEmailKeyDown = _react.useCallback.call(void 0,
@@ -20320,7 +20338,7 @@ function OAuthClientList({
20320
20338
  OAuthClientCard,
20321
20339
  {
20322
20340
  client,
20323
- onClick: () => _optionalChain([onClientClick, 'optionalCall', _539 => _539(client)]),
20341
+ onClick: () => _optionalChain([onClientClick, 'optionalCall', _543 => _543(client)]),
20324
20342
  onEdit: onEditClick ? () => onEditClick(client) : void 0,
20325
20343
  onDelete: onDeleteClick ? () => onDeleteClick(client) : void 0
20326
20344
  },
@@ -20336,11 +20354,11 @@ _chunk7QVYU63Ejs.__name.call(void 0, OAuthClientList, "OAuthClientList");
20336
20354
  function OAuthClientForm({ client, onSubmit, onCancel, isLoading = false }) {
20337
20355
  const isEditMode = !!client;
20338
20356
  const [formState, setFormState] = _react.useState.call(void 0, {
20339
- name: _optionalChain([client, 'optionalAccess', _540 => _540.name]) || "",
20340
- description: _optionalChain([client, 'optionalAccess', _541 => _541.description]) || "",
20341
- redirectUris: _optionalChain([client, 'optionalAccess', _542 => _542.redirectUris, 'optionalAccess', _543 => _543.length]) ? client.redirectUris : [""],
20342
- allowedScopes: _optionalChain([client, 'optionalAccess', _544 => _544.allowedScopes]) || [],
20343
- isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _545 => _545.isConfidential]), () => ( true))
20357
+ name: _optionalChain([client, 'optionalAccess', _544 => _544.name]) || "",
20358
+ description: _optionalChain([client, 'optionalAccess', _545 => _545.description]) || "",
20359
+ redirectUris: _optionalChain([client, 'optionalAccess', _546 => _546.redirectUris, 'optionalAccess', _547 => _547.length]) ? client.redirectUris : [""],
20360
+ allowedScopes: _optionalChain([client, 'optionalAccess', _548 => _548.allowedScopes]) || [],
20361
+ isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _549 => _549.isConfidential]), () => ( true))
20344
20362
  });
20345
20363
  const [errors, setErrors] = _react.useState.call(void 0, {});
20346
20364
  const validate = _react.useCallback.call(void 0, () => {
@@ -20568,7 +20586,7 @@ function OAuthClientDetail({
20568
20586
  ] }),
20569
20587
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
20570
20588
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Allowed Scopes" }),
20571
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap gap-2", children: client.allowedScopes.map((scope) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "secondary", children: _optionalChain([_chunkXAWKRNYMjs.OAUTH_SCOPE_DISPLAY, 'access', _546 => _546[scope], 'optionalAccess', _547 => _547.name]) || scope }, scope)) })
20589
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap gap-2", children: client.allowedScopes.map((scope) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "secondary", children: _optionalChain([_chunkXAWKRNYMjs.OAUTH_SCOPE_DISPLAY, 'access', _550 => _550[scope], 'optionalAccess', _551 => _551.name]) || scope }, scope)) })
20572
20590
  ] }),
20573
20591
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
20574
20592
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Grant Types" }),
@@ -20712,7 +20730,7 @@ function OAuthConsentScreen({
20712
20730
  if (error || !clientInfo) {
20713
20731
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-h-screen 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: [
20714
20732
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertTriangle, { className: "h-4 w-4" }),
20715
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _548 => _548.message]) || "Invalid authorization request. Please try again." })
20733
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _552 => _552.message]) || "Invalid authorization request. Please try again." })
20716
20734
  ] }) }) }) });
20717
20735
  }
20718
20736
  const { client, scopes } = clientInfo;
@@ -20928,7 +20946,7 @@ function WaitlistForm({ onSuccess }) {
20928
20946
  questionnaire: values.questionnaire
20929
20947
  });
20930
20948
  setIsSuccess(true);
20931
- _optionalChain([onSuccess, 'optionalCall', _549 => _549()]);
20949
+ _optionalChain([onSuccess, 'optionalCall', _553 => _553()]);
20932
20950
  } catch (e) {
20933
20951
  errorToast({ error: e });
20934
20952
  } finally {
@@ -21566,7 +21584,7 @@ var ModuleEditor = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs.__n
21566
21584
  ] }),
21567
21585
  roleIds.map((roleId) => {
21568
21586
  const roleTokens = block[roleId];
21569
- const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _550 => _550[roleId]]), () => ( roleId));
21587
+ const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _554 => _554[roleId]]), () => ( roleId));
21570
21588
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
21571
21589
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: roleLabel }),
21572
21590
  _chunkSE5HIHJSjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -21603,7 +21621,7 @@ function RbacContainer() {
21603
21621
  }, []);
21604
21622
  const sortedModuleIds = _react.useMemo.call(void 0, () => {
21605
21623
  if (!matrix) return [];
21606
- return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _551 => _551[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _552 => _552[b]]), () => ( b))));
21624
+ return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _555 => _555[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _556 => _556[b]]), () => ( b))));
21607
21625
  }, [matrix, moduleNames]);
21608
21626
  const roleIds = _react.useMemo.call(void 0, () => {
21609
21627
  if (roleNames) {
@@ -21666,7 +21684,7 @@ function RbacContainer() {
21666
21684
  id === selectedModuleId && "bg-muted font-medium text-foreground",
21667
21685
  id !== selectedModuleId && "text-muted-foreground"
21668
21686
  ),
21669
- children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _553 => _553[id]]), () => ( id))
21687
+ children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _557 => _557[id]]), () => ( id))
21670
21688
  }
21671
21689
  ) }, id)) }) }),
21672
21690
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: selectedModuleId && selectedBlock ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -21674,7 +21692,7 @@ function RbacContainer() {
21674
21692
  {
21675
21693
  moduleId: selectedModuleId,
21676
21694
  block: selectedBlock,
21677
- moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _554 => _554[selectedModuleId]]), () => ( selectedModuleId)),
21695
+ moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _558 => _558[selectedModuleId]]), () => ( selectedModuleId)),
21678
21696
  roleIds,
21679
21697
  roleNames,
21680
21698
  onOpenPicker: openPicker
@@ -21685,12 +21703,12 @@ function RbacContainer() {
21685
21703
  RbacPermissionPicker,
21686
21704
  {
21687
21705
  open: !!activePicker,
21688
- anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _555 => _555.anchor]), () => ( null)),
21706
+ anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _559 => _559.anchor]), () => ( null)),
21689
21707
  value: activeValue,
21690
- isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _556 => _556.isRoleColumn]), () => ( false)),
21708
+ isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _560 => _560.isRoleColumn]), () => ( false)),
21691
21709
  knownSegments: activeSegments,
21692
21710
  onSetValue: handleSetValue,
21693
- onClear: _optionalChain([activePicker, 'optionalAccess', _557 => _557.isRoleColumn]) ? handleClear : void 0,
21711
+ onClear: _optionalChain([activePicker, 'optionalAccess', _561 => _561.isRoleColumn]) ? handleClear : void 0,
21694
21712
  onClose: closePicker
21695
21713
  }
21696
21714
  )
@@ -21757,7 +21775,7 @@ function RbacByRoleContainer() {
21757
21775
  }, [roleNames]);
21758
21776
  const sortedModuleIds = _react.useMemo.call(void 0, () => {
21759
21777
  if (!matrix) return [];
21760
- return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _558 => _558[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _559 => _559[b]]), () => ( b))));
21778
+ return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _562 => _562[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _563 => _563[b]]), () => ( b))));
21761
21779
  }, [matrix, moduleNames]);
21762
21780
  _react.useEffect.call(void 0, () => {
21763
21781
  if (!selectedRoleId && sortedRoleIds.length > 0) {
@@ -21806,7 +21824,7 @@ function RbacByRoleContainer() {
21806
21824
  id === selectedRoleId && "bg-muted font-medium text-foreground",
21807
21825
  id !== selectedRoleId && "text-muted-foreground"
21808
21826
  ),
21809
- children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _560 => _560[id]]), () => ( id))
21827
+ children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _564 => _564[id]]), () => ( id))
21810
21828
  }
21811
21829
  ) }, id)) }) }),
21812
21830
  /* @__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: [
@@ -21826,7 +21844,7 @@ function RbacByRoleContainer() {
21826
21844
  if (!block) return null;
21827
21845
  const defaultTokens = _nullishCoalesce(block.default, () => ( []));
21828
21846
  const roleTokens = block[selectedRoleId];
21829
- const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _561 => _561[moduleId]]), () => ( moduleId));
21847
+ const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _565 => _565[moduleId]]), () => ( moduleId));
21830
21848
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
21831
21849
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { className: "border-b bg-muted/40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
21832
21850
  "td",
@@ -21841,7 +21859,7 @@ function RbacByRoleContainer() {
21841
21859
  _chunkSE5HIHJSjs.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))
21842
21860
  ] }),
21843
21861
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
21844
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _562 => _562[selectedRoleId]]), () => ( selectedRoleId)) }),
21862
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _566 => _566[selectedRoleId]]), () => ( selectedRoleId)) }),
21845
21863
  _chunkSE5HIHJSjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
21846
21864
  CellButton3,
21847
21865
  {
@@ -21862,12 +21880,12 @@ function RbacByRoleContainer() {
21862
21880
  RbacPermissionPicker,
21863
21881
  {
21864
21882
  open: !!activePicker,
21865
- anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _563 => _563.anchor]), () => ( null)),
21883
+ anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _567 => _567.anchor]), () => ( null)),
21866
21884
  value: activeValue,
21867
- isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _564 => _564.isRoleColumn]), () => ( false)),
21885
+ isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _568 => _568.isRoleColumn]), () => ( false)),
21868
21886
  knownSegments: activeSegments,
21869
21887
  onSetValue: handleSetValue,
21870
- onClear: _optionalChain([activePicker, 'optionalAccess', _565 => _565.isRoleColumn]) ? handleClear : void 0,
21888
+ onClear: _optionalChain([activePicker, 'optionalAccess', _569 => _569.isRoleColumn]) ? handleClear : void 0,
21871
21889
  onClose: closePicker
21872
21890
  }
21873
21891
  )
@@ -22390,4 +22408,4 @@ _chunk7QVYU63Ejs.__name.call(void 0, RbacByRoleContainer, "RbacByRoleContainer")
22390
22408
 
22391
22409
 
22392
22410
  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.SocketContext = SocketContext; exports.SocketProvider = SocketProvider; exports.useSocketContext = useSocketContext; exports.CurrentUserProvider = CurrentUserProvider; exports.useCurrentUserContext = useCurrentUserContext; 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.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.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.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.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.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.HeaderLeftContentProvider = HeaderLeftContentProvider; exports.useHeaderLeftContent = useHeaderLeftContent; exports.BreadcrumbNavigation = BreadcrumbNavigation; exports.ContentTitle = ContentTitle; exports.SharedProvider = SharedProvider; exports.useSharedContext = useSharedContext; exports.Header = Header; exports.ModeToggleSwitch = ModeToggleSwitch; exports.PageSection = PageSection; exports.recentPagesAtom = recentPagesAtom; exports.RecentPagesNavigator = RecentPagesNavigator; exports.PageContainer = PageContainer; exports.ReactMarkdownContainer = ReactMarkdownContainer; exports.RoundPageContainerTitle = RoundPageContainerTitle; exports.RoundPageContainer = RoundPageContainer; exports.TabsContainer = TabsContainer; exports.AttributeElement = AttributeElement; exports.AllUsersListContainer = AllUsersListContainer; 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.createMentionInlineContentSpec = createMentionInlineContentSpec; exports.useMentionInsert = useMentionInsert; exports.BlockNoteEditorMentionSuggestionMenu = BlockNoteEditorMentionSuggestionMenu; exports.BlockNoteEditorContainer = BlockNoteEditorContainer; exports.CommonAssociationTrigger = CommonAssociationTrigger; exports.CommonAssociationCommandDialog = CommonAssociationCommandDialog; exports.triggerAssociationToast = triggerAssociationToast; exports.FormFieldWrapper = FormFieldWrapper; exports.EntityMultiSelector = EntityMultiSelector; exports.CommonDeleter = CommonDeleter; exports.CommonEditorButtons = CommonEditorButtons; exports.CommonEditorHeader = CommonEditorHeader; exports.CommonEditorDiscardDialog = CommonEditorDiscardDialog; exports.CommonEditorTrigger = CommonEditorTrigger; exports.useEditorDialog = useEditorDialog; exports.EditorSheet = EditorSheet; exports.DatePickerPopover = DatePickerPopover; exports.DateRangeSelector = DateRangeSelector; exports.useFileUpload = useFileUpload; exports.FileUploader = FileUploader; exports.FileUploaderContent = FileUploaderContent; exports.FileUploaderItem = FileUploaderItem; exports.FileInput = FileInput; exports.FormCheckbox = FormCheckbox; exports.FormBlockNote = FormBlockNote; exports.FormDate = FormDate; exports.FormDateTime = FormDateTime; exports.FormInput = FormInput; 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.FormFeatures = FormFeatures; 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.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.CompanyContent = CompanyContent; exports.TokenStatusIndicator = TokenStatusIndicator; exports.CompanyDetails = CompanyDetails; exports.AdminCompanyContainer = AdminCompanyContainer; exports.CompanyContainer = CompanyContainer; exports.CompanyConfigurationEditor = CompanyConfigurationEditor; exports.CompanyDeleter = CompanyDeleter; exports.CompanyEditor = CompanyEditor; exports.CompaniesList = CompaniesList; exports.ContentsList = ContentsList; exports.ContentsListById = ContentsListById; exports.RelevantContentsList = RelevantContentsList; exports.HowToCommandViewer = HowToCommandViewer; exports.HowToCommand = HowToCommand; exports.HowToDeleter = HowToDeleter; exports.HowToEditor = HowToEditor; exports.HowToProvider = HowToProvider; exports.useHowToContext = useHowToContext; exports.HowToContent = HowToContent; exports.HowToDetails = HowToDetails; exports.HowToContainer = HowToContainer; exports.HowToList = HowToList; exports.HowToListContainer = HowToListContainer; exports.HowToMultiSelector = HowToMultiSelector; exports.HowToSelector = HowToSelector; exports.AssistantProvider = AssistantProvider; exports.useAssistantContext = useAssistantContext; exports.MessageSourcesPanel = MessageSourcesPanel; exports.MessageItem = MessageItem; exports.MessageList = MessageList; exports.AssistantContainer = AssistantContainer; exports.NotificationErrorBoundary = NotificationErrorBoundary; exports.generateNotificationData = generateNotificationData; exports.NotificationToast = NotificationToast; exports.NotificationMenuItem = NotificationMenuItem; exports.NotificationContextProvider = NotificationContextProvider; exports.useNotificationContext = useNotificationContext; 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.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.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.OnboardingProvider = OnboardingProvider; exports.useOnboarding = useOnboarding; exports.CommonProvider = CommonProvider; exports.useCommonContext = useCommonContext; exports.useNotificationSync = useNotificationSync; exports.usePageTracker = usePageTracker; exports.useSocket = useSocket; exports.useSubscriptionStatus = useSubscriptionStatus; exports.useContentTableStructure = useContentTableStructure; exports.useOAuthClients = useOAuthClients; exports.useOAuthClient = useOAuthClient;
22393
- //# sourceMappingURL=chunk-LIZ5C76W.js.map
22411
+ //# sourceMappingURL=chunk-KLPCVG6P.js.map