\n >\n );\n};\n\nexport const getStaticProps: GetStaticProps = async ({ locale }) => {\n const allChaptersData = await getAllChaptersData(locale);\n\n return {\n props: {\n chaptersData: allChaptersData,\n },\n };\n};\n\nexport default withAuth(NotificationSettingsPage);\n","/**\n * Shorten a text by setting the maximum number of characters\n * by the value of the parameter and adding \"...\" at the end.\n *\n * @param {string} rawString\n * @param {number} length\n * @param {string} suffix\n * @returns {string}\n */\nexport const truncateString = (rawString: string, length: number, suffix = '...'): string => {\n const characters = rawString.split('', length);\n let shortenedText = '';\n for (let index = 0; index < characters.length; index += 1) {\n const character = characters[index];\n if (shortenedText.length === length - 1) {\n shortenedText = `${shortenedText}${character}${suffix}`;\n break;\n }\n shortenedText = `${shortenedText}${character}`;\n }\n return shortenedText;\n};\n\n/**\n * Strip HTML tags from a string.\n *\n * @param {string} rawString\n * @returns {string}\n */\nexport const stripHTMLTags = (rawString: string): string => rawString.replace(/(<([^>]+)>)/gi, '');\n\n/**\n * Convert a slugified collection id to collection id only after\n * removing the slug.\n *\n * @param {string} slugifiedCollectionId\n * @returns {string}\n */\nexport const slugifiedCollectionIdToCollectionId = (slugifiedCollectionId: string): string => {\n if (!slugifiedCollectionId) {\n return '';\n }\n const splits = slugifiedCollectionId.split('-');\n // if there is no slug in the url (collections with a name that cannot be slugified e.g. emoticons)\n if (splits.length === 1) {\n return splits[0];\n }\n return splits[splits.length - 1];\n};\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"CollapsibleWorkflowSettings_container__vrNoK\",\"workflowName\":\"CollapsibleWorkflowSettings_workflowName__0RkJz\",\"workflowChannels\":\"CollapsibleWorkflowSettings_workflowChannels__mIy5l\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"channelsContainer\":\"FieldsetContainer_channelsContainer___vj9c\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"row\":\"PreferenceSettingsToggles_row__ZKxQT\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"Tabs_container__s7UYm\",\"header\":\"Tabs_header__ENuIE\",\"titleContainer\":\"Tabs_titleContainer__VlDsW\",\"loadingContainer\":\"Tabs_loadingContainer__Ewtc2\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"Collapsible_header__CmhJq\",\"headerLeft\":\"Collapsible_headerLeft__Xh00n\",\"prefixContainer\":\"Collapsible_prefixContainer__AVHUT\",\"prefixRotated\":\"Collapsible_prefixRotated__bjKLn\",\"suffixContainer\":\"Collapsible_suffixContainer__uZ1IW\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"Pill_container__FoIEg\",\"small\":\"Pill_small__zCILo\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"root\":\"Toggle_root__H_bcP\",\"thumb\":\"Toggle_thumb__6mKWE\",\"label\":\"Toggle_label__FQD4J\",\"container\":\"Toggle_container__Hmm6V\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"_error_container__vJFnH\",\"withFullWidth\":\"_error_withFullWidth__VEzYc\",\"title\":\"_error_title__oLWAK\",\"goBack\":\"_error_goBack__U4WNd\",\"reportBug\":\"_error_reportBug__tsKmR\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"pageContainer\":\"index_pageContainer__Pxtn3\",\"loadingContainer\":\"index_loadingContainer__WEZFc\",\"flow\":\"index_flow__rCTR5\",\"flowItem\":\"index_flowItem__GnXWz\",\"additionalVerticalGap\":\"index_additionalVerticalGap__nzYz6\",\"fullWidth\":\"index_fullWidth__1n4ux\"};"],"names":["_path","_extends","Object","assign","bind","n","e","arguments","length","t","r","hasOwnProperty","call","apply","props","width","height","viewBox","fill","xmlns","d","fillRule","clipRule","window","__NEXT_P","push","router","useRouter","useEffect","asPath","replace","getLoginNavigationUrl","WrappedComponent","useState","isReady","setIsReady","isLoggedIn","RedirectToLoginPage","url","image","imageAlt","imageHeight","imageWidth","openGraph","description","rest","openGraphParams","images","alt","params","truncateString","NextSeo","CollapsibleDirection","isDefaultOpen","prefix","title","suffix","children","shouldRotatePrefixOnToggle","shouldOpen","onOpenChange","direction","Left","isOpen","setIsOpen","CollapsiblePrimitive","open","asChild","div","className","styles","onClick","preValue","classNames","preventDefault","stopPropagation","PillSize","size","MEDIUM","SMALL","statusCode","hasFullWidth","useTranslation","h1","Button","document","referrer","back","p","Link","href","variant","LinkVariant","SENTRY_ENABLED","env","NEXT_PUBLIC_CLIENT_SENTRY_ENABLED","logErrorToSentry","error","options","Sentry","scope","metadata","setContext","getUserIdCookie","setUser","id","transactionName","setTransactionName","console","HeadlessServiceContext","createContext","HeadlessServiceStatus","HeadlessServiceProvider","INITIALIZING","status","setStatus","setError","headlessService","useMemo","HeadlessService","backendUrl","process","NEXT_PUBLIC_NOVU_BACKEND_URL","socketUrl","NEXT_PUBLIC_NOVU_SOCKET_URL","subscriberId","subscriberHash","getNotificationSubscriberHashCookie","applicationIdentifier","NEXT_PUBLIC_NOVU_APP_ID","initializeSession","listener","onSuccess","READY","onError","err","ERROR","value","Provider","useHeadlessService","useContext","isMutating","setIsMutating","mutate","useCallback","messageIds","markNotificationsAsSeen","messageId","isLoading","dispatch","useDispatch","useMarkNotificationAsSeen","loadedPages","useSelector","selectLoadedNotificationsPages","areArraysEqual","isFetchingNotifications","selectNotificationsIsFetching","fetch","shouldMarkAsSeenOnSuccess","page","shouldResetOldData","includes","fetchNotifications","query","limit","isFetching","data","type","setNotificationsPageAndFinishLoading","payload","setNotificationsLoading","loading","fetching","response","map","message","_id","markNotificationAsSeen","fetchUnseenCount","count","setUnseenCount","listenUnseenCountChange","NotificationContext","NotificationsProviderInner","useInitializeUnseenCount","useFetchNotifications","NotificationsProvider","templateId","toast","useToast","enabled","channel","updateUserPreferences","checked","channelType","ToastStatus","fieldset","legend","disabled","required","defaultChecked","label","name","onChange","htmlFor","RadixToggle","undefined","onCheckedChange","preference","onToggle","hasGlobalPreference","mutatingChannel","Toggle","Spinner","FieldsetContainer","keys","channels","channelName","useUpdateUserPreferences","template","preferenceState","setPreferenceState","setMutatingChannel","isChecked","logValueChange","UpdateUserPreferences","prev","newState","workflowChannels","reduce","acc","currentValue","Collapsible","ChevronDownIcon","logEvent","PreferenceSettingsToggles","userPreferences","setUserPreferences","handlers","fetchGetUserPreferences","fetchGlobalSettings","fetchUserGlobalPreferences","fetchUserPreferences","useFetchUserPreferences","preferences","setPreferences","groupByTags","groupBy","filter","critical","tags","isFetchingUserPreferences","parentStyles","SpinnerSize","Error","tag","tagPreferences","Pill","CollapsibleWorkflowSettings","CategoriesSettingsTab","withAuth","lang","navigationUrl","getNotificationSettingsNavigationUrl","isProduction","NEXT_PUBLIC_VERCEL_ENV","NextSeoWrapper","canonical","getCanonicalUrl","languageAlternates","getLanguageAlternates","nofollow","noindex","layoutStyles","NotificationSettingsTabs","rawString","characters","split","shortenedText","index","character","stripHTMLTags","slugifiedCollectionIdToCollectionId","slugifiedCollectionId","splits","module","exports"],"sourceRoot":""}