@carlonicora/nextjs-jsonapi 1.91.0 → 1.92.1

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.
@@ -8191,7 +8191,7 @@ __name(UserResentInvitationEmail, "UserResentInvitationEmail");
8191
8191
  // src/features/user/components/forms/UserSelector.tsx
8192
8192
  import { CircleX, RefreshCwIcon as RefreshCwIcon2, SearchIcon as SearchIcon4, XIcon as XIcon8 } from "lucide-react";
8193
8193
  import { useTranslations as useTranslations19 } from "next-intl";
8194
- import { useCallback as useCallback18, useEffect as useEffect27, useRef as useRef17, useState as useState28 } from "react";
8194
+ import { useCallback as useCallback18, useEffect as useEffect27, useRef as useRef18, useState as useState28 } from "react";
8195
8195
 
8196
8196
  // src/components/forms/CommonAssociationForm.tsx
8197
8197
  import { useTranslations as useTranslations8 } from "next-intl";
@@ -9207,11 +9207,14 @@ function FormCheckbox({ form, id, name, labelBefore, description, isRequired })
9207
9207
  }
9208
9208
  __name(FormCheckbox, "FormCheckbox");
9209
9209
 
9210
+ // src/components/forms/FormBlockNote.tsx
9211
+ import { useRef as useRef15 } from "react";
9212
+
9210
9213
  // src/components/editors/BlockNoteEditorContainer.tsx
9211
9214
  import dynamic from "next/dynamic";
9212
9215
  import React14 from "react";
9213
9216
  import { jsx as jsx73 } from "react/jsx-runtime";
9214
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-S3MWGDLG.mjs"), {
9217
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-YGEDKNPP.mjs"), {
9215
9218
  ssr: false
9216
9219
  });
9217
9220
  var BlockNoteEditorContainer = React14.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -9239,6 +9242,8 @@ function FormBlockNote({
9239
9242
  mentionSearchParams,
9240
9243
  mentionResolveFn
9241
9244
  }) {
9245
+ const initialContentRef = useRef15(null);
9246
+ const lastEditorContentRef = useRef15(void 0);
9242
9247
  return /* @__PURE__ */ jsx74(
9243
9248
  "div",
9244
9249
  {
@@ -9256,27 +9261,34 @@ function FormBlockNote({
9256
9261
  isRequired,
9257
9262
  description,
9258
9263
  testId,
9259
- children: (field) => /* @__PURE__ */ jsx74(
9260
- BlockNoteEditorContainer,
9261
- {
9262
- id: form.getValues("id"),
9263
- type,
9264
- initialContent: field.value,
9265
- onChange: (content, isEmpty) => {
9266
- field.onChange(content);
9267
- onEmptyChange?.(isEmpty);
9268
- },
9269
- placeholder,
9270
- bordered: true,
9271
- inlineContentSpecs,
9272
- renderOverlays,
9273
- enableMentions,
9274
- mentionSearchFn,
9275
- mentionSearchParams,
9276
- mentionResolveFn,
9277
- className: cn(stretch && "min-h-0 flex-1")
9264
+ children: (field) => {
9265
+ const isInternalChange = lastEditorContentRef.current !== void 0 && field.value === lastEditorContentRef.current;
9266
+ if (!isInternalChange) {
9267
+ initialContentRef.current = field.value;
9278
9268
  }
9279
- )
9269
+ return /* @__PURE__ */ jsx74(
9270
+ BlockNoteEditorContainer,
9271
+ {
9272
+ id: form.getValues("id"),
9273
+ type,
9274
+ initialContent: initialContentRef.current,
9275
+ onChange: (content, isEmpty) => {
9276
+ lastEditorContentRef.current = content;
9277
+ field.onChange(content);
9278
+ onEmptyChange?.(isEmpty);
9279
+ },
9280
+ placeholder,
9281
+ bordered: true,
9282
+ inlineContentSpecs,
9283
+ renderOverlays,
9284
+ enableMentions,
9285
+ mentionSearchFn,
9286
+ mentionSearchParams,
9287
+ mentionResolveFn,
9288
+ className: cn(stretch && "min-h-0 flex-1")
9289
+ }
9290
+ );
9291
+ }
9280
9292
  }
9281
9293
  )
9282
9294
  }
@@ -9661,13 +9673,13 @@ function FormInput({
9661
9673
  __name(FormInput, "FormInput");
9662
9674
 
9663
9675
  // src/components/forms/PasswordInput.tsx
9664
- import * as React15 from "react";
9676
+ import * as React16 from "react";
9665
9677
  import { EyeIcon, EyeOffIcon } from "lucide-react";
9666
9678
  import { useTranslations as useTranslations16 } from "next-intl";
9667
9679
  import { jsx as jsx78, jsxs as jsxs47 } from "react/jsx-runtime";
9668
- var PasswordInput = React15.forwardRef(
9680
+ var PasswordInput = React16.forwardRef(
9669
9681
  ({ className, type: _type, ...props }, ref) => {
9670
- const [showPassword, setShowPassword] = React15.useState(false);
9682
+ const [showPassword, setShowPassword] = React16.useState(false);
9671
9683
  const disabled = props.value === "" || props.value === void 0 || props.disabled;
9672
9684
  const t = useTranslations16();
9673
9685
  return /* @__PURE__ */ jsxs47("div", { className: "relative", children: [
@@ -9727,7 +9739,7 @@ function FormPassword({
9727
9739
  __name(FormPassword, "FormPassword");
9728
9740
 
9729
9741
  // src/components/forms/FormPlaceAutocomplete.tsx
9730
- import { useEffect as useEffect23, useRef as useRef15, useState as useState24 } from "react";
9742
+ import { useEffect as useEffect23, useRef as useRef16, useState as useState24 } from "react";
9731
9743
  import { jsx as jsx80, jsxs as jsxs48 } from "react/jsx-runtime";
9732
9744
  function FormPlaceAutocomplete({
9733
9745
  form,
@@ -9747,8 +9759,8 @@ function FormPlaceAutocomplete({
9747
9759
  const [showSuggestions, setShowSuggestions] = useState24(false);
9748
9760
  const [loadError, setLoadError] = useState24(false);
9749
9761
  const [apiKey, setApiKey] = useState24(null);
9750
- const debounceRef = useRef15(null);
9751
- const containerRef = useRef15(null);
9762
+ const debounceRef = useRef16(null);
9763
+ const containerRef = useRef16(null);
9752
9764
  useEffect23(() => {
9753
9765
  const key = process.env.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY;
9754
9766
  if (!key) {
@@ -10209,12 +10221,12 @@ import { useTranslations as useTranslations18 } from "next-intl";
10209
10221
  import { useEffect as useEffect26, useState as useState27 } from "react";
10210
10222
 
10211
10223
  // src/features/user/hooks/useUserSearch.ts
10212
- import { useCallback as useCallback17, useEffect as useEffect25, useRef as useRef16, useState as useState26 } from "react";
10224
+ import { useCallback as useCallback17, useEffect as useEffect25, useRef as useRef17, useState as useState26 } from "react";
10213
10225
  var useUserSearch = /* @__PURE__ */ __name(() => {
10214
10226
  const [users, setUsers] = useState26([]);
10215
10227
  const [searchQuery, setSearchQuery] = useState26("");
10216
10228
  const [isLoading, setIsLoading] = useState26(false);
10217
- const searchQueryRef = useRef16("");
10229
+ const searchQueryRef = useRef17("");
10218
10230
  const loadUsers = useCallback17(
10219
10231
  async (search) => {
10220
10232
  try {
@@ -10415,7 +10427,7 @@ import { Fragment as Fragment12, jsx as jsx92, jsxs as jsxs58 } from "react/jsx-
10415
10427
  function UserSelector({ id, form, label, placeholder, onChange, isRequired = false }) {
10416
10428
  const t = useTranslations19();
10417
10429
  const [open, setOpen] = useState28(false);
10418
- const searchTermRef = useRef17("");
10430
+ const searchTermRef = useRef18("");
10419
10431
  const [searchTerm, setSearchTerm] = useState28("");
10420
10432
  const [isSearching, setIsSearching] = useState28(false);
10421
10433
  const data = useDataListRetriever({
@@ -10889,13 +10901,13 @@ function RoleUsersList({ role }) {
10889
10901
  __name(RoleUsersList, "RoleUsersList");
10890
10902
 
10891
10903
  // src/features/user/components/lists/UserListInAdd.tsx
10892
- import React16 from "react";
10904
+ import React17 from "react";
10893
10905
  import { Fragment as Fragment15, jsx as jsx107, jsxs as jsxs64 } from "react/jsx-runtime";
10894
10906
  function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
10895
10907
  return /* @__PURE__ */ jsx107(Fragment15, { children: data.data !== void 0 && data.data.filter(
10896
10908
  (user) => existingUsers && !existingUsers.find((existingUser) => existingUser.id === user.id)
10897
10909
  ).map((user) => {
10898
- return /* @__PURE__ */ jsx107(React16.Fragment, { children: /* @__PURE__ */ jsx107(
10910
+ return /* @__PURE__ */ jsx107(React17.Fragment, { children: /* @__PURE__ */ jsx107(
10899
10911
  CommandItem,
10900
10912
  {
10901
10913
  className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
@@ -11430,7 +11442,7 @@ import { zodResolver as zodResolver3 } from "@hookform/resolvers/zod";
11430
11442
  import { UploadIcon as UploadIcon3 } from "lucide-react";
11431
11443
  import { useTranslations as useTranslations35 } from "next-intl";
11432
11444
  import Image6 from "next/image";
11433
- import { useCallback as useCallback19, useEffect as useEffect29, useMemo as useMemo15, useRef as useRef18, useState as useState31 } from "react";
11445
+ import { useCallback as useCallback19, useEffect as useEffect29, useMemo as useMemo15, useRef as useRef19, useState as useState31 } from "react";
11434
11446
  import { useForm as useForm3 } from "react-hook-form";
11435
11447
  import { v4 as v42 } from "uuid";
11436
11448
  import { z as z2 } from "zod";
@@ -11452,8 +11464,8 @@ function CompanyEditorInternal({
11452
11464
  const [files, setFiles] = useState31(null);
11453
11465
  const [contentType, setContentType] = useState31(null);
11454
11466
  const t = useTranslations35();
11455
- const fiscalRef = useRef18(null);
11456
- const addressComponentsRef = useRef18({});
11467
+ const fiscalRef = useRef19(null);
11468
+ const addressComponentsRef = useRef19({});
11457
11469
  const canAccessFeatures = hasRole(getRoleId().Administrator) || hasRole(getRoleId().CompanyAdministrator) && process.env.NEXT_PUBLIC_PRIVATE_INSTALLATION?.toLowerCase() === "true";
11458
11470
  const handleDialogOpenChange = useCallback19(
11459
11471
  (open) => {
@@ -11912,7 +11924,7 @@ var useNotificationContext = /* @__PURE__ */ __name(() => {
11912
11924
  }, "useNotificationContext");
11913
11925
 
11914
11926
  // src/features/onboarding/contexts/OnboardingContext.tsx
11915
- import { createContext as createContext11, useCallback as useCallback21, useContext as useContext12, useEffect as useEffect32, useRef as useRef19, useState as useState35 } from "react";
11927
+ import { createContext as createContext11, useCallback as useCallback21, useContext as useContext12, useEffect as useEffect32, useRef as useRef20, useState as useState35 } from "react";
11916
11928
  import { createRoot } from "react-dom/client";
11917
11929
  import Shepherd from "shepherd.js";
11918
11930
  import "shepherd.js/dist/css/shepherd.css";
@@ -11983,8 +11995,8 @@ function OnboardingProvider({
11983
11995
  const [activeTourId, setActiveTourId] = useState35(null);
11984
11996
  const [currentStepIndex, setCurrentStepIndex] = useState35(0);
11985
11997
  const [totalSteps, setTotalSteps] = useState35(0);
11986
- const tourRef = useRef19(null);
11987
- const rootsRef = useRef19(/* @__PURE__ */ new Map());
11998
+ const tourRef = useRef20(null);
11999
+ const rootsRef = useRef20(/* @__PURE__ */ new Map());
11988
12000
  const cleanupRoots = useCallback21(() => {
11989
12001
  rootsRef.current.forEach((root) => {
11990
12002
  try {
@@ -12918,7 +12930,7 @@ __name(useHeaderLeftContent, "useHeaderLeftContent");
12918
12930
  // src/components/EditableAvatar.tsx
12919
12931
  import { PencilIcon as PencilIcon3, Trash2Icon as Trash2Icon3 } from "lucide-react";
12920
12932
  import { useTranslations as useTranslations47 } from "next-intl";
12921
- import { useCallback as useCallback25, useRef as useRef20, useState as useState41 } from "react";
12933
+ import { useCallback as useCallback25, useRef as useRef21, useState as useState41 } from "react";
12922
12934
  import { jsx as jsx136, jsxs as jsxs77 } from "react/jsx-runtime";
12923
12935
  function EditableAvatar({
12924
12936
  entityId,
@@ -12932,7 +12944,7 @@ function EditableAvatar({
12932
12944
  }) {
12933
12945
  const { company } = useCurrentUserContext();
12934
12946
  const t = useTranslations47();
12935
- const fileInputRef = useRef20(null);
12947
+ const fileInputRef = useRef21(null);
12936
12948
  const [optimisticImage, setOptimisticImage] = useState41(null);
12937
12949
  const [isUploading, setIsUploading] = useState41(false);
12938
12950
  const displayImage = optimisticImage ?? image;
@@ -13069,11 +13081,14 @@ __name(TableCellAvatar, "TableCellAvatar");
13069
13081
  // src/components/navigations/Breadcrumb.tsx
13070
13082
  import { useTranslations as useTranslations48 } from "next-intl";
13071
13083
  import { Fragment as Fragment20, useState as useState42 } from "react";
13084
+ import { ChevronDownIcon as ChevronDownIcon8 } from "lucide-react";
13072
13085
  import { Fragment as Fragment21, jsx as jsx138, jsxs as jsxs79 } from "react/jsx-runtime";
13073
13086
  var ITEMS_TO_DISPLAY = 4;
13074
- function BreadcrumbNavigation({ items }) {
13075
- const generateUrl = usePageUrlGenerator();
13076
- const t = useTranslations48();
13087
+ function BreadcrumbDesktop({
13088
+ items,
13089
+ generateUrl,
13090
+ t
13091
+ }) {
13077
13092
  const [open, setOpen] = useState42(false);
13078
13093
  return /* @__PURE__ */ jsx138(Breadcrumb, { children: /* @__PURE__ */ jsxs79(BreadcrumbList, { children: [
13079
13094
  /* @__PURE__ */ jsx138(BreadcrumbItem, { children: /* @__PURE__ */ jsx138(Link, { href: generateUrl({ page: `/` }), children: t(`common.home`) }) }),
@@ -13096,6 +13111,36 @@ function BreadcrumbNavigation({ items }) {
13096
13111
  ] }, index)) })
13097
13112
  ] }) });
13098
13113
  }
13114
+ __name(BreadcrumbDesktop, "BreadcrumbDesktop");
13115
+ function BreadcrumbMobile({
13116
+ items,
13117
+ generateUrl,
13118
+ t
13119
+ }) {
13120
+ const [open, setOpen] = useState42(false);
13121
+ const lastItem = items[items.length - 1];
13122
+ const allItems = [{ name: t(`common.home`), href: generateUrl({ page: `/` }) }, ...items];
13123
+ if (!lastItem && items.length === 0) {
13124
+ return /* @__PURE__ */ jsx138(Breadcrumb, { children: /* @__PURE__ */ jsx138(BreadcrumbList, { children: /* @__PURE__ */ jsx138(BreadcrumbItem, { children: /* @__PURE__ */ jsx138(Link, { href: generateUrl({ page: `/` }), children: t(`common.home`) }) }) }) });
13125
+ }
13126
+ return /* @__PURE__ */ jsxs79(DropdownMenu, { open, onOpenChange: setOpen, children: [
13127
+ /* @__PURE__ */ jsxs79(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: [
13128
+ lastItem?.name,
13129
+ /* @__PURE__ */ jsx138(ChevronDownIcon8, { className: "text-muted-foreground size-3.5" })
13130
+ ] }),
13131
+ /* @__PURE__ */ jsx138(DropdownMenuContent, { align: "start", children: allItems.map((item, index) => /* @__PURE__ */ jsx138(DropdownMenuItem, { children: item.href ? /* @__PURE__ */ jsx138(Link, { href: item.href, children: item.name }) : /* @__PURE__ */ jsx138(Fragment21, { children: item.name }) }, index)) })
13132
+ ] });
13133
+ }
13134
+ __name(BreadcrumbMobile, "BreadcrumbMobile");
13135
+ function BreadcrumbNavigation({ items }) {
13136
+ const generateUrl = usePageUrlGenerator();
13137
+ const t = useTranslations48();
13138
+ const isMobile = useIsMobile();
13139
+ if (isMobile) {
13140
+ return /* @__PURE__ */ jsx138(BreadcrumbMobile, { items, generateUrl, t });
13141
+ }
13142
+ return /* @__PURE__ */ jsx138(BreadcrumbDesktop, { items, generateUrl, t });
13143
+ }
13099
13144
  __name(BreadcrumbNavigation, "BreadcrumbNavigation");
13100
13145
 
13101
13146
  // src/components/navigations/ContentTitle.tsx
@@ -13135,11 +13180,12 @@ __name(ContentTitle, "ContentTitle");
13135
13180
  import { jsx as jsx140, jsxs as jsxs81 } from "react/jsx-runtime";
13136
13181
  function Header({ children, leftContent, className }) {
13137
13182
  const { breadcrumbs } = useSharedContext();
13183
+ const isMobile = useIsMobile();
13138
13184
  return /* @__PURE__ */ jsx140("header", { className: `sticky top-0 z-10 flex h-12 flex-col items-center justify-start gap-x-4 ${className ?? ""}`, children: /* @__PURE__ */ jsxs81("div", { className: "bg-sidebar flex h-12 w-full flex-row items-center justify-between pl-2 pr-4", children: [
13139
13185
  /* @__PURE__ */ jsx140(SidebarTrigger, { "aria-label": "Toggle sidebar", id: "sidebar-trigger" }),
13140
13186
  leftContent,
13141
13187
  /* @__PURE__ */ jsx140("div", { className: "flex w-full flex-row items-center justify-start", children: /* @__PURE__ */ jsx140(BreadcrumbNavigation, { items: breadcrumbs }) }),
13142
- /* @__PURE__ */ jsx140("div", { className: "flex w-64 flex-row items-center justify-end gap-x-4 whitespace-nowrap", children: /* @__PURE__ */ jsx140("div", { className: "flex flex-row items-center justify-end gap-x-4 whitespace-nowrap", children: children ? children : null }) })
13188
+ !isMobile && children && /* @__PURE__ */ jsx140("div", { className: "flex w-64 flex-row items-center justify-end gap-x-4 whitespace-nowrap", children: /* @__PURE__ */ jsx140("div", { className: "flex flex-row items-center justify-end gap-x-4 whitespace-nowrap", children }) })
13143
13189
  ] }) });
13144
13190
  }
13145
13191
  __name(Header, "Header");
@@ -13158,7 +13204,7 @@ function ModeToggleSwitch() {
13158
13204
  __name(ModeToggleSwitch, "ModeToggleSwitch");
13159
13205
 
13160
13206
  // src/components/navigations/PageSection.tsx
13161
- import { ChevronDownIcon as ChevronDownIcon8, ChevronRightIcon as ChevronRightIcon6 } from "lucide-react";
13207
+ import { ChevronDownIcon as ChevronDownIcon9, ChevronRightIcon as ChevronRightIcon6 } from "lucide-react";
13162
13208
  import { useEffect as useEffect36, useState as useState44 } from "react";
13163
13209
  import { v4 as v44 } from "uuid";
13164
13210
  import { jsx as jsx142, jsxs as jsxs82 } from "react/jsx-runtime";
@@ -13191,7 +13237,7 @@ function PageSection({ children, title, options, open, small, onToggle }) {
13191
13237
  className: `${isOpen ? "mb-4" : "mb-0"} flex w-full justify-between border-b ${small ? `border-muted` : `border-primary`} pb-1`,
13192
13238
  children: [
13193
13239
  /* @__PURE__ */ jsxs82("div", { className: "flex w-full cursor-pointer items-center justify-start gap-x-2", onClick: toggleOpen, children: [
13194
- isOpen ? /* @__PURE__ */ jsx142(ChevronDownIcon8, { className: `text-primary h-4 w-4` }) : /* @__PURE__ */ jsx142(ChevronRightIcon6, { className: "text-primary h-4 w-4" }),
13240
+ isOpen ? /* @__PURE__ */ jsx142(ChevronDownIcon9, { className: `text-primary h-4 w-4` }) : /* @__PURE__ */ jsx142(ChevronRightIcon6, { className: "text-primary h-4 w-4" }),
13195
13241
  /* @__PURE__ */ jsx142("h2", { className: `flex w-full ${small === true ? `text-sm` : `text-lg`} text-primary font-semibold`, children: title })
13196
13242
  ] }),
13197
13243
  options && /* @__PURE__ */ jsx142("div", { className: "flex gap-2", children: options })
@@ -13246,7 +13292,7 @@ __name(PageContainer, "PageContainer");
13246
13292
  // src/components/containers/ReactMarkdownContainer.tsx
13247
13293
  import { ChevronDown as ChevronDown2, ChevronUp } from "lucide-react";
13248
13294
  import { useTranslations as useTranslations50 } from "next-intl";
13249
- import { useEffect as useEffect37, useRef as useRef21, useState as useState45 } from "react";
13295
+ import { useEffect as useEffect37, useRef as useRef22, useState as useState45 } from "react";
13250
13296
  import ReactMarkdown from "react-markdown";
13251
13297
  import remarkGfm from "remark-gfm";
13252
13298
  import { jsx as jsx145, jsxs as jsxs85 } from "react/jsx-runtime";
@@ -13259,7 +13305,7 @@ function ReactMarkdownContainer({
13259
13305
  const t = useTranslations50("ui.buttons");
13260
13306
  const [isExpanded, setIsExpanded] = useState45(false);
13261
13307
  const [showExpandButton, setShowExpandButton] = useState45(false);
13262
- const contentRef = useRef21(null);
13308
+ const contentRef = useRef22(null);
13263
13309
  useEffect37(() => {
13264
13310
  if (collapsible && contentRef.current && !isExpanded) {
13265
13311
  const isOverflowing = contentRef.current.scrollHeight > contentRef.current.clientHeight;
@@ -13332,8 +13378,9 @@ function RoundPageContainerTitle({
13332
13378
  setShowDetails
13333
13379
  }) {
13334
13380
  const { title } = useSharedContext();
13335
- return /* @__PURE__ */ jsxs86("div", { className: "flex w-full flex-row items-center justify-between border-b p-4", children: [
13336
- /* @__PURE__ */ jsxs86("div", { className: "flex w-full gap-x-4", children: [
13381
+ const isMobile = useIsMobile();
13382
+ return /* @__PURE__ */ jsxs86("div", { className: cn(`flex w-full flex-row items-center border-b p-4`, isMobile ? `justify-end` : `justify-between`), children: [
13383
+ !isMobile && /* @__PURE__ */ jsxs86("div", { className: "flex w-full gap-x-4", children: [
13337
13384
  /* @__PURE__ */ jsxs86("div", { className: "text-muted-foreground flex items-center gap-x-2 text-lg font-light whitespace-nowrap", children: [
13338
13385
  module && module.icon ? /* @__PURE__ */ jsx146(module.icon, { className: "text-primary h-6 w-6" }) : title.icon,
13339
13386
  title.type
@@ -13378,10 +13425,15 @@ function RoundPageContainer({
13378
13425
  const headerChildren = useHeaderChildren();
13379
13426
  const headerLeftContent = useHeaderLeftContent();
13380
13427
  const [showDetails, setShowDetailsState] = useState46(false);
13428
+ const isMobile = useIsMobile();
13429
+ const [mounted, setMounted] = useState46(false);
13381
13430
  useEffect38(() => {
13382
13431
  const match = document.cookie.split("; ").find((row) => row.startsWith(`${DETAILS_COOKIE_NAME}=`));
13383
13432
  if (match?.split("=")[1] === "true") setShowDetailsState(true);
13384
13433
  }, []);
13434
+ useEffect38(() => {
13435
+ setMounted(true);
13436
+ }, []);
13385
13437
  const setShowDetails = useCallback26((value) => {
13386
13438
  setShowDetailsState(value);
13387
13439
  document.cookie = `${DETAILS_COOKIE_NAME}=${value}; path=/; max-age=${DETAILS_COOKIE_MAX_AGE}`;
@@ -13399,10 +13451,24 @@ function RoundPageContainer({
13399
13451
  }
13400
13452
  }
13401
13453
  }, [section, tabs]);
13454
+ const handleTabChange = useCallback26(
13455
+ (key) => {
13456
+ setActiveTab(key);
13457
+ if (module && id) rewriteUrl({ page: module, id, additionalParameters: { section: key } });
13458
+ },
13459
+ [module, id, rewriteUrl]
13460
+ );
13402
13461
  const activeFillHeight = tabs?.find((t) => (t.key?.name ?? t.label) === activeTab)?.fillHeight === true;
13462
+ const isReady = mounted && isMobile !== void 0;
13463
+ if (!isReady) {
13464
+ return /* @__PURE__ */ jsxs87(Fragment22, { children: [
13465
+ /* @__PURE__ */ jsx147(Header, { leftContent: headerLeftContent, className: "bg-sidebar border-0", children: headerChildren }),
13466
+ /* @__PURE__ */ jsx147("div", { className: cn("flex h-[calc(100vh-3rem)] w-full flex-col", isMobile ? "" : "p-2 pt-0 pl-0"), children: /* @__PURE__ */ jsx147("div", { className: cn("bg-background flex h-full w-full", isMobile ? "" : "rounded-lg border p-0"), children: /* @__PURE__ */ jsx147("div", { className: "flex w-full flex-col" }) }) })
13467
+ ] });
13468
+ }
13403
13469
  return /* @__PURE__ */ jsxs87(Fragment22, { children: [
13404
13470
  /* @__PURE__ */ jsx147(Header, { leftContent: headerLeftContent, className: "bg-sidebar border-0", children: headerChildren }),
13405
- /* @__PURE__ */ jsx147("div", { className: "flex h-[calc(100vh-3rem)] w-full flex-col p-2 pt-0 pl-0", children: /* @__PURE__ */ jsx147("div", { className: "bg-background flex h-full w-full rounded-lg border p-0", children: /* @__PURE__ */ jsxs87("div", { className: "flex w-full flex-col", children: [
13471
+ /* @__PURE__ */ jsx147("div", { className: cn(`flex h-[calc(100vh-3rem)] w-full flex-col`, isMobile ? "p-1 pt-0" : "p-2 pt-0 pl-0"), children: /* @__PURE__ */ jsx147("div", { className: "bg-background flex h-full w-full rounded-lg border p-0", children: /* @__PURE__ */ jsxs87("div", { className: "flex w-full flex-col", children: [
13406
13472
  (!fullWidth || forceHeader) && /* @__PURE__ */ jsx147(
13407
13473
  RoundPageContainerTitle,
13408
13474
  {
@@ -13418,7 +13484,8 @@ function RoundPageContainer({
13418
13484
  "div",
13419
13485
  {
13420
13486
  className: cn(
13421
- `grow p-4`,
13487
+ `grow`,
13488
+ isMobile ? `p-2` : `p-4`,
13422
13489
  activeFillHeight ? `flex flex-col overflow-hidden` : `overflow-y-auto`,
13423
13490
  fullWidth && `p-0`
13424
13491
  ),
@@ -13436,17 +13503,29 @@ function RoundPageContainer({
13436
13503
  {
13437
13504
  value: activeTab,
13438
13505
  className: cn(`w-full`, activeFillHeight && `flex flex-1 min-h-0 flex-col`),
13439
- onValueChange: (key) => {
13440
- setActiveTab(key);
13441
- if (module && id)
13442
- rewriteUrl({ page: module, id, additionalParameters: { section: key } });
13443
- },
13506
+ onValueChange: handleTabChange,
13444
13507
  children: [
13445
- /* @__PURE__ */ jsx147("div", { className: "p-4", children: /* @__PURE__ */ jsx147(TabsList, { className: ``, children: tabs.map((tab) => /* @__PURE__ */ jsx147(TabsTrigger, { value: tab.key?.name ?? tab.label, className: `px-4`, children: tab.contentLabel ?? tab.label }, tab.label)) }) }),
13508
+ isMobile ? /* @__PURE__ */ jsx147("div", { className: "p-0", children: /* @__PURE__ */ jsxs87(
13509
+ Select,
13510
+ {
13511
+ value: activeTab,
13512
+ onValueChange: (value) => {
13513
+ if (value) handleTabChange(value);
13514
+ },
13515
+ children: [
13516
+ /* @__PURE__ */ jsx147(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx147(SelectValue, {}) }),
13517
+ /* @__PURE__ */ jsx147(SelectContent, { children: tabs.map((tab) => /* @__PURE__ */ jsx147(SelectItem, { value: tab.key?.name ?? tab.label, children: tab.contentLabel ?? tab.label }, tab.label)) })
13518
+ ]
13519
+ }
13520
+ ) }) : /* @__PURE__ */ jsx147("div", { className: "p-4", children: /* @__PURE__ */ jsx147(TabsList, { children: tabs.map((tab) => /* @__PURE__ */ jsx147(TabsTrigger, { value: tab.key?.name ?? tab.label, className: "px-4", children: tab.contentLabel ?? tab.label }, tab.label)) }) }),
13446
13521
  /* @__PURE__ */ jsx147(
13447
13522
  "div",
13448
13523
  {
13449
- className: cn(`flex w-full px-4`, activeFillHeight ? `flex-1 min-h-0` : `overflow-y-auto`),
13524
+ className: cn(
13525
+ `flex w-full `,
13526
+ isMobile ? `` : `px-4`,
13527
+ activeFillHeight ? `flex-1 min-h-0` : `overflow-y-auto`
13528
+ ),
13450
13529
  children: tabs.map((tab) => /* @__PURE__ */ jsx147(
13451
13530
  TabsContent,
13452
13531
  {
@@ -13461,13 +13540,16 @@ function RoundPageContainer({
13461
13540
  ]
13462
13541
  }
13463
13542
  ),
13464
- children && /* @__PURE__ */ jsx147("div", { className: "flex px-4", children })
13543
+ children && /* @__PURE__ */ jsx147("div", { className: cn(`flex`, isMobile ? `px-2` : `px-4`), children })
13465
13544
  ] }) : children
13466
13545
  }
13467
13546
  )
13468
13547
  }
13469
13548
  ),
13470
- details && /* @__PURE__ */ jsx147(
13549
+ details && (isMobile ? /* @__PURE__ */ jsx147(Sheet, { open: showDetails, onOpenChange: setShowDetails, children: /* @__PURE__ */ jsxs87(SheetContent, { side: "right", children: [
13550
+ /* @__PURE__ */ jsx147(SheetHeader, { children: /* @__PURE__ */ jsx147(SheetTitle, { children: "Details" }) }),
13551
+ /* @__PURE__ */ jsx147("div", { className: "overflow-y-auto p-6 pt-0", children: details })
13552
+ ] }) }) : /* @__PURE__ */ jsx147(
13471
13553
  "div",
13472
13554
  {
13473
13555
  className: cn(
@@ -13476,7 +13558,7 @@ function RoundPageContainer({
13476
13558
  ),
13477
13559
  children: details
13478
13560
  }
13479
- )
13561
+ ))
13480
13562
  ] })
13481
13563
  ] }) }) })
13482
13564
  ] });
@@ -13546,7 +13628,7 @@ function AllowedUsersDetails({ showTitle, content }) {
13546
13628
  __name(AllowedUsersDetails, "AllowedUsersDetails");
13547
13629
 
13548
13630
  // src/components/editors/BlockNoteEditorMentionHoverCard.tsx
13549
- import { useCallback as useCallback27, useEffect as useEffect39, useRef as useRef22, useState as useState47 } from "react";
13631
+ import { useCallback as useCallback27, useEffect as useEffect39, useRef as useRef23, useState as useState47 } from "react";
13550
13632
  import { createPortal as createPortal3 } from "react-dom";
13551
13633
  import { jsx as jsx150 } from "react/jsx-runtime";
13552
13634
  function BlockNoteEditorMentionHoverCard({
@@ -13554,7 +13636,7 @@ function BlockNoteEditorMentionHoverCard({
13554
13636
  mentionResolveFn
13555
13637
  }) {
13556
13638
  const [hovered, setHovered] = useState47(null);
13557
- const closeTimeoutRef = useRef22(null);
13639
+ const closeTimeoutRef = useRef23(null);
13558
13640
  const scheduleClose = useCallback27(() => {
13559
13641
  closeTimeoutRef.current = setTimeout(() => setHovered(null), 200);
13560
13642
  }, []);
@@ -13623,7 +13705,7 @@ __name(BlockNoteEditorMentionHoverCard, "BlockNoteEditorMentionHoverCard");
13623
13705
  // src/components/editors/BlockNoteEditorMentionInlineContent.tsx
13624
13706
  import { createReactInlineContentSpec } from "@blocknote/react";
13625
13707
  import Link3 from "next/link";
13626
- import React20 from "react";
13708
+ import React21 from "react";
13627
13709
  import { jsx as jsx151, jsxs as jsxs90 } from "react/jsx-runtime";
13628
13710
  var mentionDataAttrs = /* @__PURE__ */ __name((p) => ({
13629
13711
  "data-mention-id": p.id,
@@ -13631,7 +13713,7 @@ var mentionDataAttrs = /* @__PURE__ */ __name((p) => ({
13631
13713
  "data-mention-alias": p.alias
13632
13714
  }), "mentionDataAttrs");
13633
13715
  var createMentionInlineContentSpec = /* @__PURE__ */ __name((resolveFn, disableMention) => {
13634
- const Mention = React20.memo(/* @__PURE__ */ __name(function Mention2(props) {
13716
+ const Mention = React21.memo(/* @__PURE__ */ __name(function Mention2(props) {
13635
13717
  if (disableMention) {
13636
13718
  const resolved2 = resolveFn?.(props.id, props.entityType, props.alias);
13637
13719
  return /* @__PURE__ */ jsxs90(Link3, { href: resolved2?.url ?? "#", className: "text-primary", children: [
@@ -13677,7 +13759,7 @@ var createMentionInlineContentSpec = /* @__PURE__ */ __name((resolveFn, disableM
13677
13759
  // src/components/editors/BlockNoteEditorSuggestionMenuController.tsx
13678
13760
  import { SuggestionMenuController } from "@blocknote/react";
13679
13761
  import { autoUpdate, flip, shift } from "@floating-ui/react";
13680
- import { useCallback as useCallback28, useRef as useRef23 } from "react";
13762
+ import { useCallback as useCallback28, useRef as useRef24 } from "react";
13681
13763
  import { jsx as jsx152 } from "react/jsx-runtime";
13682
13764
  var DEBOUNCE_MS = 300;
13683
13765
  function BlockNoteEditorMentionSuggestionMenu({
@@ -13685,7 +13767,7 @@ function BlockNoteEditorMentionSuggestionMenu({
13685
13767
  mentionSearchFn,
13686
13768
  mentionSearchParams
13687
13769
  }) {
13688
- const lastQueryRef = useRef23("");
13770
+ const lastQueryRef = useRef24("");
13689
13771
  const getItems = useCallback28(
13690
13772
  async (query) => {
13691
13773
  lastQueryRef.current = query;
@@ -13738,12 +13820,12 @@ function BlockNoteEditorMentionSuggestionMenu({
13738
13820
  __name(BlockNoteEditorMentionSuggestionMenu, "BlockNoteEditorMentionSuggestionMenu");
13739
13821
 
13740
13822
  // src/components/pages/PageContainerContentDetails.tsx
13741
- import { useEffect as useEffect40, useRef as useRef24, useState as useState48 } from "react";
13823
+ import { useEffect as useEffect40, useRef as useRef25, useState as useState48 } from "react";
13742
13824
  import { jsx as jsx153, jsxs as jsxs91 } from "react/jsx-runtime";
13743
13825
  function PageContainerContentDetails({ items, section, module, id }) {
13744
13826
  const rewriteUrl = useUrlRewriter();
13745
13827
  const [isScrolled, setIsScrolled] = useState48(false);
13746
- const sentinelRef = useRef24(null);
13828
+ const sentinelRef = useRef25(null);
13747
13829
  useEffect40(() => {
13748
13830
  const sentinel = sentinelRef.current;
13749
13831
  if (!sentinel) return;
@@ -13950,13 +14032,13 @@ function JsonApiProvider({ config, children }) {
13950
14032
  __name(JsonApiProvider, "JsonApiProvider");
13951
14033
 
13952
14034
  // src/client/hooks/useJsonApiGet.ts
13953
- import { useState as useState50, useEffect as useEffect43, useCallback as useCallback29, useRef as useRef25 } from "react";
14035
+ import { useState as useState50, useEffect as useEffect43, useCallback as useCallback29, useRef as useRef26 } from "react";
13954
14036
  function useJsonApiGet(params) {
13955
14037
  const [data, setData] = useState50(null);
13956
14038
  const [loading, setLoading] = useState50(false);
13957
14039
  const [error, setError] = useState50(null);
13958
14040
  const [response, setResponse] = useState50(null);
13959
- const isMounted = useRef25(true);
14041
+ const isMounted = useRef26(true);
13960
14042
  const fetchData = useCallback29(async () => {
13961
14043
  if (params.options?.enabled === false) return;
13962
14044
  setLoading(true);
@@ -14758,12 +14840,12 @@ import { memo, useMemo as useMemo25, useState as useState55 } from "react";
14758
14840
  // src/components/tables/ContentTableSearch.tsx
14759
14841
  import { RefreshCw, Search, X as X3 } from "lucide-react";
14760
14842
  import { useTranslations as useTranslations55 } from "next-intl";
14761
- import { useCallback as useCallback34, useEffect as useEffect47, useRef as useRef26, useState as useState54 } from "react";
14843
+ import { useCallback as useCallback34, useEffect as useEffect47, useRef as useRef27, useState as useState54 } from "react";
14762
14844
  import { jsx as jsx164, jsxs as jsxs94 } from "react/jsx-runtime";
14763
14845
  function ContentTableSearch({ data }) {
14764
14846
  const t = useTranslations55();
14765
- const searchTermRef = useRef26("");
14766
- const inputRef = useRef26(null);
14847
+ const searchTermRef = useRef27("");
14848
+ const inputRef = useRef27(null);
14767
14849
  const [searchTerm, setSearchTerm] = useState54("");
14768
14850
  const [isFocused, setIsFocused] = useState54(false);
14769
14851
  const [isSearching, setIsSearching] = useState54(false);
@@ -14963,12 +15045,12 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
14963
15045
  }, "ContentListTable"));
14964
15046
 
14965
15047
  // src/components/grids/ContentListGrid.tsx
14966
- import { useEffect as useEffect48, useRef as useRef27 } from "react";
15048
+ import { useEffect as useEffect48, useRef as useRef28 } from "react";
14967
15049
  import { Fragment as Fragment27, jsx as jsx166, jsxs as jsxs96 } from "react/jsx-runtime";
14968
15050
  var DEFAULT_GRID_CLASSES = "grid grid-cols-2 gap-4 p-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5";
14969
15051
  function ContentListGrid(props) {
14970
15052
  const { data, ItemComponent, allowSearch, fullWidth, gridClassName } = props;
14971
- const sentinelRef = useRef27(null);
15053
+ const sentinelRef = useRef28(null);
14972
15054
  useEffect48(() => {
14973
15055
  if (!data.next || !sentinelRef.current) return;
14974
15056
  const observer = new IntersectionObserver(
@@ -15063,14 +15145,14 @@ __name(validateItalianTaxCode, "validateItalianTaxCode");
15063
15145
 
15064
15146
  // src/components/fiscal/ItalianFiscalData.tsx
15065
15147
  import { useTranslations as useTranslations56 } from "next-intl";
15066
- import { forwardRef as forwardRef8, useCallback as useCallback35, useImperativeHandle as useImperativeHandle2, useRef as useRef28, useState as useState56 } from "react";
15148
+ import { forwardRef as forwardRef8, useCallback as useCallback35, useImperativeHandle as useImperativeHandle2, useRef as useRef29, useState as useState56 } from "react";
15067
15149
  import { z as z4 } from "zod";
15068
15150
  import { jsx as jsx167, jsxs as jsxs97 } from "react/jsx-runtime";
15069
15151
  var ItalianFiscalData = forwardRef8(/* @__PURE__ */ __name(function ItalianFiscalData2({ initialData }, ref) {
15070
15152
  const t = useTranslations56();
15071
- const initialRef = useRef28(initialData);
15153
+ const initialRef = useRef29(initialData);
15072
15154
  const [fiscalData, setFiscalData] = useState56(initialData);
15073
- const fiscalDataRef = useRef28(initialData);
15155
+ const fiscalDataRef = useRef29(initialData);
15074
15156
  const [fiscalErrors, setFiscalErrors] = useState56({});
15075
15157
  const updateFiscalField = useCallback35((key, value) => {
15076
15158
  setFiscalData((prev) => {
@@ -15707,11 +15789,11 @@ import { useTranslations as useTranslations60 } from "next-intl";
15707
15789
  import { useState as useState61 } from "react";
15708
15790
 
15709
15791
  // src/features/auth/components/two-factor/TotpInput.tsx
15710
- import { useEffect as useEffect50, useRef as useRef29, useState as useState60 } from "react";
15792
+ import { useEffect as useEffect50, useRef as useRef30, useState as useState60 } from "react";
15711
15793
  import { jsx as jsx173, jsxs as jsxs101 } from "react/jsx-runtime";
15712
15794
  function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
15713
15795
  const [digits, setDigits] = useState60(["", "", "", "", "", ""]);
15714
- const inputRefs = useRef29([]);
15796
+ const inputRefs = useRef30([]);
15715
15797
  useEffect50(() => {
15716
15798
  if (autoFocus && inputRefs.current[0]) {
15717
15799
  inputRefs.current[0].focus();
@@ -17200,7 +17282,7 @@ __name(RelevantContentsList, "RelevantContentsList");
17200
17282
  // src/features/how-to/components/containers/HowToCommand.tsx
17201
17283
  import { ArrowRight, LifeBuoyIcon } from "lucide-react";
17202
17284
  import { useTranslations as useTranslations78 } from "next-intl";
17203
- import { useCallback as useCallback37, useEffect as useEffect59, useMemo as useMemo28, useRef as useRef30, useState as useState75 } from "react";
17285
+ import { useCallback as useCallback37, useEffect as useEffect59, useMemo as useMemo28, useRef as useRef31, useState as useState75 } from "react";
17204
17286
 
17205
17287
  // src/features/how-to/components/containers/HowToCommandViewer.tsx
17206
17288
  import { ArrowLeft, BookOpen, MessageSquare } from "lucide-react";
@@ -17328,7 +17410,7 @@ function HowToCommand({ pathname, extraGroups, onStartChat }) {
17328
17410
  const t = useTranslations78();
17329
17411
  const [dialogOpen, setDialogOpen] = useState75(false);
17330
17412
  const [selectedHowTo, setSelectedHowTo] = useState75(null);
17331
- const searchTermRef = useRef30("");
17413
+ const searchTermRef = useRef31("");
17332
17414
  const [searchTerm, setSearchTerm] = useState75("");
17333
17415
  const data = useDataListRetriever({
17334
17416
  retriever: /* @__PURE__ */ __name((params) => {
@@ -17670,7 +17752,7 @@ __name(HowToMultiSelector, "HowToMultiSelector");
17670
17752
  // src/features/how-to/components/forms/HowToSelector.tsx
17671
17753
  import { CircleX as CircleX2, RefreshCwIcon as RefreshCwIcon3, SearchIcon as SearchIcon6, XIcon as XIcon10 } from "lucide-react";
17672
17754
  import { useTranslations as useTranslations83 } from "next-intl";
17673
- import { useCallback as useCallback38, useEffect as useEffect60, useRef as useRef31, useState as useState76 } from "react";
17755
+ import { useCallback as useCallback38, useEffect as useEffect60, useRef as useRef32, useState as useState76 } from "react";
17674
17756
  import { Fragment as Fragment42, jsx as jsx203, jsxs as jsxs120 } from "react/jsx-runtime";
17675
17757
  function HowToSelector({
17676
17758
  id,
@@ -17682,7 +17764,7 @@ function HowToSelector({
17682
17764
  }) {
17683
17765
  const t = useTranslations83();
17684
17766
  const [open, setOpen] = useState76(false);
17685
- const searchTermRef = useRef31("");
17767
+ const searchTermRef = useRef32("");
17686
17768
  const [searchTerm, setSearchTerm] = useState76("");
17687
17769
  const [isSearching, setIsSearching] = useState76(false);
17688
17770
  const data = useDataListRetriever({
@@ -17976,7 +18058,7 @@ function AssistantThreadHeader({ assistant, onRename, onDelete }) {
17976
18058
  __name(AssistantThreadHeader, "AssistantThreadHeader");
17977
18059
 
17978
18060
  // src/features/assistant/components/parts/AssistantThread.tsx
17979
- import { useEffect as useEffect62, useRef as useRef32 } from "react";
18061
+ import { useEffect as useEffect62, useRef as useRef33 } from "react";
17980
18062
 
17981
18063
  // src/features/assistant-message/components/MessageItem.tsx
17982
18064
  import { useTranslations as useTranslations93 } from "next-intl";
@@ -18530,7 +18612,7 @@ __name(AssistantStatusLine, "AssistantStatusLine");
18530
18612
  // src/features/assistant/components/parts/AssistantThread.tsx
18531
18613
  import { jsx as jsx219, jsxs as jsxs133 } from "react/jsx-runtime";
18532
18614
  function AssistantThread({ messages, sending, status, onSelectFollowUp, failedMessageIds, onRetry }) {
18533
- const endRef = useRef32(null);
18615
+ const endRef = useRef33(null);
18534
18616
  useEffect62(() => {
18535
18617
  endRef.current?.scrollIntoView({ behavior: "smooth" });
18536
18618
  }, [messages.length, sending]);
@@ -18724,10 +18806,10 @@ __name(NotificationsListContainer, "NotificationsListContainer");
18724
18806
  // src/features/notification/components/modals/NotificationModal.tsx
18725
18807
  import { BellIcon } from "lucide-react";
18726
18808
  import { useTranslations as useTranslations97 } from "next-intl";
18727
- import { Fragment as Fragment47, useCallback as useCallback39, useEffect as useEffect63, useMemo as useMemo32, useRef as useRef33, useState as useState83 } from "react";
18809
+ import { Fragment as Fragment47, useCallback as useCallback39, useEffect as useEffect63, useMemo as useMemo32, useRef as useRef34, useState as useState83 } from "react";
18728
18810
  import { jsx as jsx224, jsxs as jsxs138 } from "react/jsx-runtime";
18729
18811
  function NotificationModalContent({ isOpen, setIsOpen }) {
18730
- const _instanceId = useRef33(Math.random().toString(36).substr(2, 9));
18812
+ const _instanceId = useRef34(Math.random().toString(36).substr(2, 9));
18731
18813
  const {
18732
18814
  notifications,
18733
18815
  addNotification,
@@ -18748,8 +18830,8 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
18748
18830
  const t = useTranslations97();
18749
18831
  const generateUrl = usePageUrlGenerator();
18750
18832
  const [newNotifications, setNewNotifications] = useState83(false);
18751
- const preventAutoClose = useRef33(false);
18752
- const circuitBreakerRef = useRef33({
18833
+ const preventAutoClose = useRef34(false);
18834
+ const circuitBreakerRef = useRef34({
18753
18835
  count: 0,
18754
18836
  resetTime: 0,
18755
18837
  isOpen: false
@@ -18782,7 +18864,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
18782
18864
  useEffect63(() => {
18783
18865
  if (lastLoaded === 0) loadNotifications();
18784
18866
  }, [lastLoaded, loadNotifications]);
18785
- const processSocketNotificationsRef = useRef33(null);
18867
+ const processSocketNotificationsRef = useRef34(null);
18786
18868
  const processSocketNotifications = useCallback39(() => {
18787
18869
  if (socketNotifications.length === 0) {
18788
18870
  return;
@@ -18943,7 +19025,7 @@ __name(ReferralCodeCapture, "ReferralCodeCapture");
18943
19025
 
18944
19026
  // src/features/referral/components/ReferralWidget.tsx
18945
19027
  import { Copy as Copy2, Loader2 as Loader25, Mail, Users } from "lucide-react";
18946
- import { useCallback as useCallback40, useRef as useRef34, useState as useState86 } from "react";
19028
+ import { useCallback as useCallback40, useRef as useRef35, useState as useState86 } from "react";
18947
19029
 
18948
19030
  // src/features/referral/hooks/useReferralInvite.ts
18949
19031
  import { useState as useState84 } from "react";
@@ -19049,7 +19131,7 @@ function ReferralWidget({
19049
19131
  const { sendInvite, sending } = useReferralInvite();
19050
19132
  const [email, setEmail] = useState86("");
19051
19133
  const [copied, setCopied] = useState86(false);
19052
- const linkInputRef = useRef34(null);
19134
+ const linkInputRef = useRef35(null);
19053
19135
  const config = getReferralConfig();
19054
19136
  const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
19055
19137
  const referralUrl = stats?.referralCode ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
@@ -19337,11 +19419,11 @@ __name(RemoveUserFromRole, "RemoveUserFromRole");
19337
19419
  // src/features/role/components/forms/UserRoleAdd.tsx
19338
19420
  import { PlusCircle as PlusCircle2 } from "lucide-react";
19339
19421
  import { useTranslations as useTranslations101 } from "next-intl";
19340
- import { useCallback as useCallback41, useEffect as useEffect67, useRef as useRef35, useState as useState88 } from "react";
19422
+ import { useCallback as useCallback41, useEffect as useEffect67, useRef as useRef36, useState as useState88 } from "react";
19341
19423
  import { Fragment as Fragment51, jsx as jsx232, jsxs as jsxs144 } from "react/jsx-runtime";
19342
19424
  function UserRoleAdd({ user, refresh }) {
19343
19425
  const [open, setOpen] = useState88(false);
19344
- const inputRef = useRef35(null);
19426
+ const inputRef = useRef36(null);
19345
19427
  const [searchTerm, setSearchTerm] = useState88("");
19346
19428
  const [roles, setRoles] = useState88([]);
19347
19429
  const t = useTranslations101();
@@ -20761,7 +20843,7 @@ __name(WaitlistList, "WaitlistList");
20761
20843
  // src/features/rbac/components/RbacContainer.tsx
20762
20844
  import { Loader2Icon as Loader2Icon3 } from "lucide-react";
20763
20845
  import { useTranslations as useTranslations110 } from "next-intl";
20764
- import { memo as memo2, useCallback as useCallback49, useEffect as useEffect71, useMemo as useMemo33, useRef as useRef36, useState as useState96 } from "react";
20846
+ import { memo as memo2, useCallback as useCallback49, useEffect as useEffect71, useMemo as useMemo33, useRef as useRef37, useState as useState96 } from "react";
20765
20847
 
20766
20848
  // src/features/rbac/components/RbacPermissionCell.tsx
20767
20849
  import { CheckIcon as CheckIcon9, MinusIcon as MinusIcon2, XIcon as XIcon11 } from "lucide-react";
@@ -21030,7 +21112,7 @@ var CellButton = memo2(/* @__PURE__ */ __name(function CellButton2({
21030
21112
  isRoleColumn,
21031
21113
  onOpen
21032
21114
  }) {
21033
- const ref = useRef36(null);
21115
+ const ref = useRef37(null);
21034
21116
  const value = cellValue(tokens, action);
21035
21117
  const handleClick = useCallback49(() => {
21036
21118
  if (!ref.current) return;
@@ -21216,7 +21298,7 @@ __name(RbacContainer, "RbacContainer");
21216
21298
  // src/features/rbac/components/RbacByRoleContainer.tsx
21217
21299
  import { Loader2Icon as Loader2Icon4 } from "lucide-react";
21218
21300
  import { useTranslations as useTranslations111 } from "next-intl";
21219
- import { Fragment as Fragment55, memo as memo3, useCallback as useCallback50, useEffect as useEffect72, useMemo as useMemo34, useRef as useRef37, useState as useState97 } from "react";
21301
+ import { Fragment as Fragment55, memo as memo3, useCallback as useCallback50, useEffect as useEffect72, useMemo as useMemo34, useRef as useRef38, useState as useState97 } from "react";
21220
21302
  import { jsx as jsx256, jsxs as jsxs166 } from "react/jsx-runtime";
21221
21303
  function findToken2(tokens, action) {
21222
21304
  if (!tokens) return void 0;
@@ -21237,7 +21319,7 @@ var CellButton3 = memo3(/* @__PURE__ */ __name(function CellButton4({
21237
21319
  isRoleColumn,
21238
21320
  onOpen
21239
21321
  }) {
21240
- const ref = useRef37(null);
21322
+ const ref = useRef38(null);
21241
21323
  const value = cellValue2(tokens, action);
21242
21324
  const handleClick = useCallback50(() => {
21243
21325
  if (!ref.current) return;
@@ -21902,4 +21984,4 @@ export {
21902
21984
  useOAuthClients,
21903
21985
  useOAuthClient
21904
21986
  };
21905
- //# sourceMappingURL=chunk-WHZMP3ZF.mjs.map
21987
+ //# sourceMappingURL=chunk-KW2CKXJX.mjs.map