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AC,UAAY,wBAAwB,QAAU,sBAAsB,gBAAkB,gC,kBCAxGD,EAAOC,QAAU,CAAC,cAAgB,6BAA6B,iBAAmB,gCAAgC,KAAO,oBAAoB,SAAW,wBAAwB,sBAAwB,qCAAqC,UAAY","sources":["webpack://_N_E/./public/icons/chevron-down.svg","webpack://_N_E/./public/icons/menu_more_horiz.svg","webpack://_N_E/./public/icons/unbookmarked.svg","webpack://_N_E/./src/components/Collection/CollectionSorter/CollectionSorter.tsx","webpack://_N_E/./src/components/NextSeoWrapper.tsx","webpack://_N_E/./src/components/Verses/BookmarksAndCollectionsSection.tsx","webpack://_N_E/./src/components/Collection/RenameCollectionModal/RenameCollectionModal.tsx","webpack://_N_E/./src/components/Collection/CollectionList/DeleteCollectionAction.tsx","webpack://_N_E/./src/components/Collection/CollectionList/RenameCollectionAction.tsx","webpack://_N_E/./src/components/Collection/CollectionList/CollectionList.tsx","webpack://_N_E/./src/components/Verses/BookmarkPill.tsx","webpack://_N_E/./src/components/Verses/BookmarkedVesesListSkeleton.tsx","webpack://_N_E/./src/components/Verses/BookmarkedVersesList.tsx","webpack://_N_E/./src/components/Verses/RecentReadingSessionsList/ReadingSessionPill/index.tsx","webpack://_N_E/./src/components/Verses/RecentReadingSessionsList/Skeleton/index.tsx","webpack://_N_E/./src/components/Verses/RecentReadingSessionsList/index.tsx","webpack://_N_E/./src/components/chapters/ChapterIcon/ChapterIconContainer.tsx","webpack://_N_E/./src/components/chapters/ChapterIcon/index.tsx","webpack://_N_E/./src/components/dls/ConfirmationModal/ConfirmationModal.tsx","webpack://_N_E/./src/components/dls/ConfirmationModal/hooks.ts","webpack://_N_E/./src/components/dls/SurahPreview/SurahPreviewRow.tsx","webpack://_N_E/./src/components/dls/Tabs/Tabs.tsx","webpack://_N_E/./src/hooks/auth/useGetRecentlyReadVerseKeys.ts","webpack://_N_E/./src/utils/string.ts","webpack://_N_E/./types/CollectionSortOptions.ts","webpack://_N_E/./src/components/Collection/CollectionList/CollectionList.module.scss","webpack://_N_E/./src/components/Collection/CollectionSorter/CollectionSorter.module.scss","webpack://_N_E/./src/components/Collection/RenameCollectionModal/RenameCollectionModal.module.scss","webpack://_N_E/./src/components/Verses/BookmarkPill.module.scss","webpack://_N_E/./src/components/Verses/BookmarkedVersesList.module.scss","webpack://_N_E/./src/components/Verses/BookmarkedVersesListSkeleton.module.scss","webpack://_N_E/./src/components/Verses/BookmarksAndQuickLinks.module.scss","webpack://_N_E/./src/components/Verses/RecentReadingSessionsList/ReadingSessionPill/ReadingSessionPill.module.scss","webpack://_N_E/./src/components/Verses/RecentReadingSessionsList/RecentReadingSessionsList.module.scss","webpack://_N_E/./src/components/Verses/RecentReadingSessionsList/Skeleton/RecentReadingSessionsListSkeleton.module.scss","webpack://_N_E/./src/components/chapters/ChapterIcon/ChapterIconContainer.module.scss","webpack://_N_E/./src/components/dls/SurahPreview/SurahPreviewRow.module.scss","webpack://_N_E/./src/components/dls/Tabs/Tabs.module.scss","webpack://_N_E/./src/pages/index.module.scss"],"sourcesContent":["var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgChevronDown = function SvgChevronDown(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 15,\n height: 15,\n viewBox: \"0 0 15 15\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3.135 6.158a.5.5 0 0 1 .707-.023L7.5 9.565l3.658-3.43a.5.5 0 0 1 .684.73l-4 3.75a.5.5 0 0 1-.684 0l-4-3.75a.5.5 0 0 1-.023-.707Z\",\n fill: \"currentColor\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n })));\n};\nexport default SvgChevronDown;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgMenuMoreHoriz = function SvgMenuMoreHoriz(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"currentColor\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM19 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })));\n};\nexport default SvgMenuMoreHoriz;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgUnbookmarked = function SvgUnbookmarked(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n className: \"feather feather-bookmark\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m19 21-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z\"\n })));\n};\nexport default SvgUnbookmarked;","import styles from './CollectionSorter.module.scss';\n\nimport ChevronDownIcon from '@/icons/chevron-down.svg';\nimport { logEvent } from '@/utils/eventLogger';\nimport PopoverMenu from 'src/components/dls/PopoverMenu/PopoverMenu';\n\nconst CollectionSorter = ({\n options,\n selectedOptionId,\n onChange,\n isSingleCollection,\n collectionId = null,\n}) => {\n const selectedOption = options.find((option) => option.id === selectedOptionId);\n\n const onOpenChange = (isOpen: boolean) => {\n const eventData = {\n collectionId,\n };\n if (isSingleCollection) {\n if (isOpen) {\n logEvent('collection_sorter_opened', eventData);\n } else {\n logEvent('collection_sorter_closed', eventData);\n }\n } else if (isOpen) {\n logEvent('collections_sorter_opened', eventData);\n } else {\n logEvent('collections_sorter_closed', eventData);\n }\n };\n\n return (\n <div className={styles.sorter}>\n <PopoverMenu\n trigger={\n <span className={styles.sortTrigger}>\n {selectedOption.label}\n <span className={styles.itemIcon}>\n <ChevronDownIcon />\n </span>\n </span>\n }\n onOpenChange={onOpenChange}\n >\n {options.map((option) => (\n <PopoverMenu.Item\n shouldCloseMenuAfterClick\n key={option.id}\n onClick={() => onChange(option.id)}\n >\n {option.label}\n </PopoverMenu.Item>\n ))}\n </PopoverMenu>\n </div>\n );\n};\n\nexport default CollectionSorter;\n","import React from 'react';\n\nimport { NextSeo } from 'next-seo';\n\nimport { SEOProps } from '@/utils/seo';\nimport { truncateString } from '@/utils/string';\n\ninterface Props extends SEOProps {\n url?: string;\n image?: string;\n imageAlt?: string;\n imageWidth?: number;\n imageHeight?: number;\n}\n\nconst NextSeoWrapper: React.FC<Props> = (props) => {\n const { url, image, imageAlt, imageHeight, imageWidth, openGraph, description, ...rest } = props;\n const openGraphParams = {\n ...(openGraph && { openGraph }),\n ...(url && { url }),\n ...(image && {\n images: [{ url: image, width: imageWidth, height: imageHeight, alt: imageAlt }],\n }),\n };\n const params = {\n ...rest,\n ...(description && { description: truncateString(description, 150) }),\n };\n return <NextSeo {...params} openGraph={openGraphParams} />;\n};\n\nexport default NextSeoWrapper;\n","import { useState } from 'react';\n\nimport classNames from 'classnames';\nimport useTranslation from 'next-translate/useTranslation';\n\nimport CollectionList from '../Collection/CollectionList/CollectionList';\n\nimport BookmarkedVersesList from './BookmarkedVersesList';\nimport styles from './BookmarksAndQuickLinks.module.scss';\nimport RecentReadingSessionsList from './RecentReadingSessionsList';\n\nimport Tabs from '@/dls/Tabs/Tabs';\nimport { isLoggedIn } from '@/utils/auth/login';\nimport { logValueChange } from '@/utils/eventLogger';\n\nenum View {\n ReadingSessions = 'reading_sessions',\n Bookmarks = 'bookmarks',\n Collections = 'collections',\n}\n\ntype Props = {\n isHomepage?: boolean;\n};\n\nconst BookmarksAndCollectionsSection: React.FC<Props> = ({ isHomepage = false }) => {\n const { t } = useTranslation('home');\n const [selectedTab, setSelectedTab] = useState(\n isHomepage ? View.ReadingSessions : View.Bookmarks,\n );\n\n const tabs = [];\n\n if (isHomepage) {\n tabs.push({ title: t('recently-read'), value: View.ReadingSessions });\n }\n tabs.push({ title: t('tab.bookmarks'), value: View.Bookmarks });\n\n if (isLoggedIn()) {\n tabs.push({ title: t('collection:collections'), value: View.Collections });\n }\n\n const onTabSelected = (newTab) => {\n logValueChange('bookmark_section_and_collection', selectedTab, newTab);\n setSelectedTab(newTab);\n };\n\n return (\n <div>\n <div className={styles.tabsContainer}>\n <Tabs tabs={tabs} selected={selectedTab} onSelect={onTabSelected} />\n </div>\n <div className={classNames(styles.contentContainer, styles.tabsContainer)}>\n {selectedTab === View.ReadingSessions && <RecentReadingSessionsList />}\n {selectedTab === View.Bookmarks && <BookmarkedVersesList />}\n {selectedTab === View.Collections && <CollectionList />}\n </div>\n </div>\n );\n};\n\nexport default BookmarksAndCollectionsSection;\n","/* eslint-disable i18next/no-literal-string */\n\nimport useTranslation from 'next-translate/useTranslation';\n\nimport styles from './RenameCollectionModal.module.scss';\n\nimport FormBuilder from '@/components/FormBuilder/FormBuilder';\nimport Modal from '@/dls/Modal/Modal';\nimport { RuleType } from 'types/FieldRule';\nimport { FormFieldType } from 'types/FormField';\n\nexport type Collection = {\n id: number | string;\n name: string;\n checked?: boolean;\n};\n\ntype RenameCollectionModalProps = {\n isOpen: boolean;\n defaultValue: string;\n onSubmit: (data: any) => void;\n onClose: () => void;\n};\n\nconst RenameCollectionModal = ({\n isOpen,\n onSubmit,\n defaultValue,\n onClose,\n}: RenameCollectionModalProps) => {\n const { t } = useTranslation('profile');\n return (\n <Modal isOpen={isOpen} onClickOutside={onClose} isBottomSheetOnMobile={false}>\n <Modal.Body>\n <div className={styles.header}>{t('common:rename')}</div>\n <div className={styles.newCollectionFormContainer}>\n <FormBuilder\n formFields={[\n {\n field: 'name',\n placeholder: t('quran-reader:new-collection-name'),\n defaultValue,\n rules: [{ type: RuleType.Required, value: true, errorMessage: 'Required' }],\n type: FormFieldType.Text,\n },\n ]}\n actionText={t('common:submit')}\n onSubmit={onSubmit}\n />\n </div>\n </Modal.Body>\n </Modal>\n );\n};\n\nexport default RenameCollectionModal;\n","import useTranslation from 'next-translate/useTranslation';\n\nimport { useConfirm } from '@/dls/ConfirmationModal/hooks';\nimport { ToastStatus, useToast } from '@/dls/Toast/Toast';\nimport { logButtonClick } from '@/utils/eventLogger';\nimport PopoverMenu from 'src/components/dls/PopoverMenu/PopoverMenu';\nimport { deleteCollection } from 'src/utils/auth/api';\n\nconst DeleteCollectionAction = ({ collectionId, onDone, collectionName }) => {\n const { t } = useTranslation();\n const toast = useToast();\n const confirm = useConfirm();\n\n const onMenuItemClicked = async () => {\n logButtonClick('delete_collection_action_open', {\n collectionId,\n });\n const isConfirmed = await confirm({\n confirmText: t('common:delete'),\n cancelText: t('common:cancel'),\n title: t('collection:delete-collection.title'),\n subtitle: t('collection:delete-collection.subtitle', { collectionName }),\n });\n\n if (isConfirmed) {\n logButtonClick('collection_delete_confirm', {\n collectionId,\n });\n deleteCollection(collectionId)\n .then(() => {\n onDone();\n })\n .catch(() => {\n toast(t('common:error.general'), {\n status: ToastStatus.Error,\n });\n });\n } else {\n logButtonClick('collection_delete_confirm_cancel', {\n collectionId,\n });\n }\n };\n\n return <PopoverMenu.Item onClick={onMenuItemClicked}>{t('common:delete')}</PopoverMenu.Item>;\n};\n\nexport default DeleteCollectionAction;\n","import useTranslation from 'next-translate/useTranslation';\n\nimport { logButtonClick } from '@/utils/eventLogger';\nimport PopoverMenu from 'src/components/dls/PopoverMenu/PopoverMenu';\n\nconst RenameCollectionAction = ({ onClick }) => {\n const { t } = useTranslation();\n\n const onMenuItemClicked = () => {\n logButtonClick('rename_collection_action_open');\n onClick();\n };\n\n return (\n <>\n <PopoverMenu.Item shouldStopPropagation shouldCloseMenuAfterClick onClick={onMenuItemClicked}>\n {t('common:rename')}\n </PopoverMenu.Item>\n </>\n );\n};\n\nexport default RenameCollectionAction;\n","/* eslint-disable max-lines */\nimport { useState } from 'react';\n\nimport Link from 'next/link';\nimport useTranslation from 'next-translate/useTranslation';\nimport useSWR from 'swr';\n\nimport CollectionSorter from '../CollectionSorter/CollectionSorter';\nimport RenameCollectionModal from '../RenameCollectionModal/RenameCollectionModal';\n\nimport styles from './CollectionList.module.scss';\nimport DeleteCollectionAction from './DeleteCollectionAction';\nimport RenameCollectionAction from './RenameCollectionAction';\n\nimport ConfirmationModal from '@/dls/ConfirmationModal/ConfirmationModal';\nimport { ToastStatus, useToast } from '@/dls/Toast/Toast';\nimport OverflowMenuIcon from '@/icons/menu_more_horiz.svg';\nimport BookmarkIcon from '@/icons/unbookmarked.svg';\nimport { logButtonClick, logEvent, logValueChange } from '@/utils/eventLogger';\nimport { toLocalizedNumber } from '@/utils/locale';\nimport Button, { ButtonShape, ButtonSize, ButtonVariant } from 'src/components/dls/Button/Button';\nimport PopoverMenu from 'src/components/dls/PopoverMenu/PopoverMenu';\nimport { getCollectionsList, updateCollection } from 'src/utils/auth/api';\nimport { makeCollectionsUrl } from 'src/utils/auth/apiPaths';\nimport { Collection } from 'types/Collection';\nimport { CollectionListSortOption } from 'types/CollectionSortOptions';\n\nconst DEFAULT_SORT_OPTION = CollectionListSortOption.RecentlyUpdated;\n\nconst CollectionList = () => {\n const [collectionToRename, setCollectionToRename] = useState<Collection | null>(null);\n const { t, lang } = useTranslation();\n const toast = useToast();\n const [sortBy, setSortBy] = useState(DEFAULT_SORT_OPTION);\n const apiParams = {\n sortBy,\n };\n\n const { data, mutate } = useSWR<any>(makeCollectionsUrl(apiParams), () =>\n getCollectionsList(apiParams),\n );\n\n const sortOptions = [\n { id: CollectionListSortOption.RecentlyUpdated, label: t('collection:recently-updated') },\n { id: CollectionListSortOption.Alphabetical, label: t('collection:alphabetical') },\n ];\n\n if (!data) return null;\n\n const collections = data?.data || [];\n\n const onSortOptionChanged = (nextSortBy) => {\n logValueChange('collection_list', sortBy, nextSortBy);\n setSortBy(nextSortBy);\n };\n\n const onCollectionUpdated = () => {\n mutate();\n };\n\n const isRenameModalOpen = !!collectionToRename;\n\n const closeModal = () => {\n logButtonClick('rename_collection_action_close', {\n collectionId: collectionToRename.id,\n });\n setCollectionToRename(null);\n };\n\n const onSubmit = (renameFormData: any) => {\n logButtonClick('rename_collection_action_submit', {\n collectionId: collectionToRename.id,\n });\n updateCollection(collectionToRename.id, { name: renameFormData.name })\n .then(() => {\n onCollectionUpdated();\n setCollectionToRename(null);\n })\n .catch(() => {\n toast(t('common:error.general'), {\n status: ToastStatus.Error,\n });\n });\n };\n\n const onCollectionMenuOpenChange = (isMenuOpen: boolean, collectionId: string) => {\n const eventData = {\n collectionId,\n };\n if (isMenuOpen) {\n logEvent('collection_popover_menu_opened', eventData);\n } else {\n logEvent('collection_popover_menu_closed', eventData);\n }\n };\n\n return (\n <>\n <RenameCollectionModal\n onClose={closeModal}\n isOpen={isRenameModalOpen}\n defaultValue={collectionToRename?.name}\n onSubmit={onSubmit}\n />\n <ConfirmationModal />\n <div>\n <div className={styles.header}>\n <div>{t('collection:collections')}</div>\n <CollectionSorter\n options={sortOptions}\n selectedOptionId={sortBy}\n onChange={onSortOptionChanged}\n isSingleCollection={false}\n />\n </div>\n <div className={styles.collectionListContainer}>\n <div>\n <div className={styles.itemContainer}>\n <Link href=\"/collections/all\">\n <div>\n <div className={styles.itemTitle}>{t('collection:all-saved-verses')}</div>\n <div className={styles.itemInfo}>\n <div className={styles.itemIcon}>\n <BookmarkIcon />\n </div>\n <div className={styles.itemCount}>\n {data?.collectionsItemsCount && (\n <>{toLocalizedNumber(data?.collectionsItemsCount, lang)}</>\n )}{' '}\n {t('common:verses')}\n </div>\n </div>\n </div>\n </Link>\n </div>\n </div>\n {collections.map((collection) => {\n return (\n <div key={collection.id}>\n <div className={styles.itemContainer}>\n <Link href={`/collections/${collection.url}`}>\n <div>\n <div className={styles.itemTitle}>{collection.name}</div>\n <div className={styles.itemInfo}>\n <div className={styles.itemIcon}>\n <BookmarkIcon />\n </div>\n <div className={styles.itemCount}>\n {toLocalizedNumber(collection.count, lang)} {t('common:verses')}\n </div>\n </div>\n </div>\n </Link>\n\n <PopoverMenu\n trigger={\n <Button\n size={ButtonSize.Small}\n tooltip={t('common:more')}\n variant={ButtonVariant.Ghost}\n shape={ButtonShape.Circle}\n ariaLabel={t('common:more')}\n >\n <span>\n <OverflowMenuIcon />\n </span>\n </Button>\n }\n onOpenChange={(isMenuOpen) =>\n onCollectionMenuOpenChange(isMenuOpen, collection.id)\n }\n isModal\n isPortalled\n >\n <RenameCollectionAction onClick={() => setCollectionToRename(collection)} />\n <DeleteCollectionAction\n collectionName={collection.name}\n collectionId={collection.id}\n onDone={onCollectionUpdated}\n />\n </PopoverMenu>\n </div>\n </div>\n );\n })}\n </div>\n </div>\n </>\n );\n};\n\nexport default CollectionList;\n","/* eslint-disable jsx-a11y/control-has-associated-label */\nimport { useContext } from 'react';\n\nimport useTranslation from 'next-translate/useTranslation';\n\nimport styles from './BookmarkPill.module.scss';\n\nimport DataContext from '@/contexts/DataContext';\nimport Button, { ButtonSize, ButtonType, ButtonVariant } from '@/dls/Button/Button';\nimport CloseIcon from '@/icons/close.svg';\nimport { getChapterData } from '@/utils/chapter';\nimport { logButtonClick } from '@/utils/eventLogger';\nimport { toLocalizedVerseKey } from '@/utils/locale';\nimport { getVerseNavigationUrlByVerseKey } from '@/utils/navigation';\nimport { getChapterNumberFromKey } from '@/utils/verse';\n\ninterface Props {\n verseKey: string;\n onDeleted: (verseKey: string) => void;\n}\n\nconst BookmarkPill: React.FC<Props> = ({ verseKey, onDeleted }) => {\n const { lang } = useTranslation();\n const chaptersData = useContext(DataContext);\n\n const chapterNumber = getChapterNumberFromKey(verseKey);\n const chapterData = getChapterData(chaptersData, chapterNumber.toString());\n\n const bookmarkText = `${chapterData.transliteratedName} ${toLocalizedVerseKey(verseKey, lang)}`;\n\n const onLinkClicked = () => {\n logButtonClick('bookmarked_verses_list_link');\n };\n\n return (\n <div className={styles.bookmarkItem}>\n <Button\n onClick={onLinkClicked}\n href={getVerseNavigationUrlByVerseKey(verseKey)}\n type={ButtonType.Primary}\n variant={ButtonVariant.Compact}\n className={styles.linkButtonContainer}\n size={ButtonSize.Small}\n >\n {bookmarkText}\n </Button>\n <button\n onClick={() => onDeleted(verseKey)}\n type=\"button\"\n className={styles.closeIconContainer}\n >\n <span>\n <CloseIcon />\n </span>\n </button>\n </div>\n );\n};\n\nexport default BookmarkPill;\n","import styles from './BookmarkedVersesListSkeleton.module.scss';\nimport BookmarkPill from './BookmarkPill';\n\nimport Skeleton from '@/dls/Skeleton/Skeleton';\n\nconst BOOKMARKS_COUNT = 10;\nconst bookmarksArr = Array(BOOKMARKS_COUNT).fill(null);\n\nconst BookmarkedVersesListSkeleton = () => {\n return (\n <span className={styles.skeletonContainer}>\n {bookmarksArr.map((k, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <Skeleton key={`skeleton_${i}`} isActive className={styles.skeletonItem}>\n <BookmarkPill verseKey=\"1:1\" onDeleted={() => null} />\n </Skeleton>\n ))}\n </span>\n );\n};\n\nexport default BookmarkedVersesListSkeleton;\n","/* eslint-disable max-lines */\n/* eslint-disable jsx-a11y/no-static-element-interactions */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\n/* eslint-disable jsx-a11y/anchor-is-valid */\nimport React, { useMemo } from 'react';\n\nimport useTranslation from 'next-translate/useTranslation';\nimport { shallowEqual, useSelector, useDispatch } from 'react-redux';\nimport useSWR from 'swr';\n\nimport styles from './BookmarkedVersesList.module.scss';\nimport BookmarkedVersesListSkeleton from './BookmarkedVesesListSkeleton';\nimport BookmarkPill from './BookmarkPill';\n\nimport Link from '@/dls/Link/Link';\nimport { ToastStatus, useToast } from '@/dls/Toast/Toast';\nimport { selectBookmarks, toggleVerseBookmark } from '@/redux/slices/QuranReader/bookmarks';\nimport { selectQuranReaderStyles } from '@/redux/slices/QuranReader/styles';\nimport { getMushafId } from '@/utils/api';\nimport { deleteBookmarkById, privateFetcher } from '@/utils/auth/api';\nimport { makeBookmarksUrl } from '@/utils/auth/apiPaths';\nimport { isLoggedIn } from '@/utils/auth/login';\nimport { logButtonClick } from '@/utils/eventLogger';\nimport { getVerseAndChapterNumbersFromKey, makeVerseKey } from '@/utils/verse';\nimport Bookmark from 'types/Bookmark';\n\nconst BOOKMARKS_API_LIMIT = 10; // The number of bookmarks to fetch from the api\n\nconst BookmarkedVersesList = () => {\n const { t } = useTranslation('home');\n\n const quranReaderStyles = useSelector(selectQuranReaderStyles, shallowEqual);\n const dispatch = useDispatch();\n\n const toast = useToast();\n\n const bookmarkedVerses = useSelector(selectBookmarks, shallowEqual);\n\n const { data, isValidating, mutate } = useSWR<Bookmark[]>(\n isLoggedIn() // only fetch the data when user is loggedIn\n ? makeBookmarksUrl(\n getMushafId(quranReaderStyles.quranFont, quranReaderStyles.mushafLines).mushaf,\n BOOKMARKS_API_LIMIT,\n )\n : null,\n privateFetcher,\n );\n\n const bookmarkedVersesKeys = useMemo(() => {\n if (isValidating) return [];\n\n const isUserLoggedIn = isLoggedIn();\n if (isUserLoggedIn && data) {\n return data.map((bookmark) => makeVerseKey(bookmark.key, bookmark.verseNumber));\n }\n\n if (!isUserLoggedIn) {\n return Object.keys(bookmarkedVerses);\n }\n\n return [];\n }, [bookmarkedVerses, data, isValidating]);\n\n // Flag when a user is using the API and has more bookmarks than the api limit\n const hasReachedBookmarksLimit = useMemo(() => {\n const isUserLoggedIn = isLoggedIn();\n\n if (isUserLoggedIn && data && data.length >= BOOKMARKS_API_LIMIT) {\n return true;\n }\n return false;\n }, [data]);\n\n const onBookmarkDeleted = (verseKey: string) => {\n logButtonClick('bookmarked_verses_list_delete');\n if (isLoggedIn()) {\n const selectedBookmark = data.find((bookmark) => {\n const [chapter, verseNumber] = getVerseAndChapterNumbersFromKey(verseKey);\n return (\n Number(chapter) === Number(bookmark.key) &&\n Number(verseNumber) === Number(bookmark.verseNumber)\n );\n });\n\n deleteBookmarkById(selectedBookmark.id)\n .then(() => {\n mutate();\n })\n .catch(() => {\n toast(t('common:error.general'), {\n status: ToastStatus.Error,\n });\n });\n } else {\n dispatch(toggleVerseBookmark(verseKey));\n }\n };\n\n const onViewAllBookmarksClicked = () => {\n logButtonClick('view_all_bookmarks');\n };\n\n if (isValidating) {\n return (\n <div className={styles.container}>\n <div className={styles.bookmarksContainer}>\n <div className={styles.verseLinksContainer}>\n <BookmarkedVersesListSkeleton />\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div className={styles.container}>\n {bookmarkedVersesKeys.length > 0 ? (\n <div className={styles.verseLinksContainer}>\n {bookmarkedVersesKeys?.map((verseKey) => (\n <BookmarkPill key={verseKey} verseKey={verseKey} onDeleted={onBookmarkDeleted} />\n ))}\n {hasReachedBookmarksLimit && (\n <Link\n href=\"/collections/all\"\n className={styles.viewAllBookmarksContainer}\n onClick={onViewAllBookmarksClicked}\n >\n {t('view-all-bookmarks')}\n </Link>\n )}\n </div>\n ) : (\n <div>{t('no-bookmarks')}</div>\n )}\n </div>\n );\n};\n\nexport default BookmarkedVersesList;\n","import React, { useContext } from 'react';\n\nimport useTranslation from 'next-translate/useTranslation';\n\nimport styles from './ReadingSessionPill.module.scss';\n\nimport DataContext from '@/contexts/DataContext';\nimport Button, { ButtonSize, ButtonType, ButtonVariant } from '@/dls/Button/Button';\nimport { getChapterData } from '@/utils/chapter';\nimport { logButtonClick } from '@/utils/eventLogger';\nimport { toLocalizedVerseKey } from '@/utils/locale';\nimport { getChapterWithStartingVerseUrl } from '@/utils/navigation';\nimport { getChapterNumberFromKey } from '@/utils/verse';\n\ninterface Props {\n verseKey: string;\n}\n\nconst ReadingSessionPill: React.FC<Props> = ({ verseKey }) => {\n const { lang } = useTranslation();\n const chaptersData = useContext(DataContext);\n\n const chapterNumber = getChapterNumberFromKey(verseKey);\n const chapterData = getChapterData(chaptersData, chapterNumber.toString());\n\n const onLinkClicked = () => {\n logButtonClick('recent_sessions_list_item_link');\n };\n\n const readingSessionText = `${chapterData.transliteratedName} ${toLocalizedVerseKey(\n verseKey,\n lang,\n )}`;\n return (\n <div className={styles.readingSessionItem}>\n <Button\n onClick={onLinkClicked}\n href={getChapterWithStartingVerseUrl(verseKey)}\n type={ButtonType.Primary}\n variant={ButtonVariant.Compact}\n className={styles.linkButtonContainer}\n size={ButtonSize.Small}\n >\n {readingSessionText}\n </Button>\n </div>\n );\n};\n\nexport default ReadingSessionPill;\n","import React from 'react';\n\nimport ReadingSessionPill from '../ReadingSessionPill';\n\nimport styles from './RecentReadingSessionsListSkeleton.module.scss';\n\nimport Skeleton from '@/dls/Skeleton/Skeleton';\n\nconst SESSIONS_COUNT = 10;\nconst sessionsArr = Array(SESSIONS_COUNT).fill(null);\n\nconst RecentReadingSessionsListSkeleton = () => {\n return (\n <span className={styles.skeletonContainer}>\n {sessionsArr.map((k, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <Skeleton key={`skeleton_${i}`} isActive className={styles.skeletonItem}>\n <ReadingSessionPill verseKey=\"1:1\" />\n </Skeleton>\n ))}\n </span>\n );\n};\n\nexport default RecentReadingSessionsListSkeleton;\n","import React from 'react';\n\nimport useTranslation from 'next-translate/useTranslation';\n\nimport ReadingSessionPill from './ReadingSessionPill';\nimport styles from './RecentReadingSessionsList.module.scss';\nimport RecentReadingSessionsListSkeleton from './Skeleton';\n\nimport useGetRecentlyReadVerseKeys from '@/hooks/auth/useGetRecentlyReadVerseKeys';\n\nconst RecentReadingSessionsList = () => {\n const { t } = useTranslation('home');\n\n const { recentlyReadVerseKeys, isLoading } = useGetRecentlyReadVerseKeys();\n\n if (isLoading) {\n return (\n <div className={styles.container}>\n <div className={styles.bookmarksContainer}>\n <div className={styles.verseLinksContainer}>\n <RecentReadingSessionsListSkeleton />\n </div>\n </div>\n </div>\n );\n }\n\n if (recentlyReadVerseKeys.length === 0) {\n return <>{t('no-recently-read')}</>;\n }\n\n return (\n <div className={styles.container}>\n <div className={styles.verseLinksContainer}>\n {recentlyReadVerseKeys?.map((verseKey) => (\n <ReadingSessionPill key={verseKey} verseKey={verseKey} />\n ))}\n </div>\n </div>\n );\n};\n\nexport default RecentReadingSessionsList;\n","import React from 'react';\n\nimport classNames from 'classnames';\n\nimport styles from './ChapterIconContainer.module.scss';\n\nimport ChapterIcon from '@/components/chapters/ChapterIcon';\n\nexport enum ChapterIconsSize {\n Small = 'small',\n Medium = 'medium',\n Large = 'large',\n Mega = 'mega',\n}\n\n// TODO: maybe replace `hasSurahPrefix` with `variant` and use it to show v1 or v2 surah name font\ninterface Props {\n chapterId: string;\n size?: ChapterIconsSize;\n hasSurahPrefix?: boolean;\n}\n\nconst IconContainer: React.FC<Props> = ({\n chapterId,\n size = ChapterIconsSize.Medium,\n hasSurahPrefix = true,\n}) => (\n <span\n className={classNames(styles.iconContainer, {\n [styles.iconContainerSmall]: size === ChapterIconsSize.Small,\n [styles.iconContainerLarge]: size === ChapterIconsSize.Large,\n [styles.iconContainerMega]: size === ChapterIconsSize.Mega,\n })}\n >\n <ChapterIcon id={chapterId} />\n {hasSurahPrefix && <ChapterIcon id=\"surah\" />}\n </span>\n);\n\nexport default IconContainer;\n","import React from 'react';\n\ninterface Props {\n id?: string;\n}\n\nconst ChapterIcon: React.FC<Props> = ({ id }) => <span translate=\"no\">{id.padStart(3, '0')}</span>;\n\nexport default ChapterIcon;\n","/* eslint-disable react/no-array-index-key */\nimport { useMemo } from 'react';\n\nimport { useConfirmModal } from './hooks';\n\nimport Modal from '@/dls/Modal/Modal';\n\nconst ConfirmationModal = () => {\n const { onCancel, onConfirm, state } = useConfirmModal();\n\n const actions = useMemo(() => {\n const returnedActions = [];\n if (state.confirmText && onConfirm) {\n returnedActions.push({\n label: state.confirmText,\n onClick: onConfirm,\n });\n }\n if (state.cancelText && onCancel) {\n returnedActions.push({\n label: state.cancelText,\n onClick: onCancel,\n isCloseAction: true,\n });\n }\n return returnedActions;\n }, [onCancel, onConfirm, state.cancelText, state.confirmText]);\n\n const onClose = () => {\n if (onCancel) {\n onCancel();\n }\n };\n\n return (\n <Modal isOpen={!!state.open} onClickOutside={onClose} onEscapeKeyDown={onClose}>\n <Modal.Body>\n <Modal.Header>\n <Modal.Title>{state.title}</Modal.Title>\n <Modal.Subtitle>{state.subtitle}</Modal.Subtitle>\n </Modal.Header>\n <p>{state.description}</p>\n </Modal.Body>\n <Modal.Footer>\n {actions.map((action, index) => {\n const { onClick, label } = action;\n if (action.isCloseAction) {\n return (\n <Modal.CloseAction key={index} onClick={onClick}>\n {label}\n </Modal.CloseAction>\n );\n }\n return (\n <Modal.Action key={index} onClick={onClick}>\n {label}\n </Modal.Action>\n );\n })}\n </Modal.Footer>\n </Modal>\n );\n};\n\nexport default ConfirmationModal;\n","import { useEffect, useState } from 'react';\n\ntype State = {\n title?: string;\n subtitle?: string;\n description?: string;\n confirmText?: string;\n cancelText?: string;\n open?: boolean;\n};\n\nlet memoryState: State = {\n open: false,\n};\n\nconst updateState = (newState: State) => {\n memoryState = newState;\n listeners.forEach((listener) => listener(memoryState));\n};\n\nconst listeners: Array<(state: State) => void> = [];\n\n/**\n * When this hook (useConfirmationModalInternal) is called.\n * We set `useState` in the component. So that it will trigger rerender when the state changes\n *\n * `setState` is registered to a global `listeners`.\n * Every time we `updateState`, this will update the state in every components that subscribe\n * to the changes (listeners)\n */\n\nexport const useConfirmModal = () => {\n const [state, setState] = useState(memoryState);\n useEffect(() => {\n listeners.push(setState);\n return () => {\n const index = listeners.indexOf(setState);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n };\n }, [state]);\n\n const closeConfirm = () => {\n updateState({ ...state, open: false });\n };\n\n const onConfirm = () => {\n closeConfirm();\n resolveCallback(true);\n };\n\n const onCancel = () => {\n closeConfirm();\n resolveCallback(false);\n };\n\n return { state, onCancel, onConfirm };\n};\n\nlet resolveCallback: (arg: boolean) => void;\n\n/**\n * This hook is meant to be consumed by other components\n * Check ConfirmationModal.stories.tsx for an example\n *\n * This hook return a callback, that's when called return a Promise<boolean>\n * if the user click \"confirm\", boolean will be true, otherwise it will be false\n */\n\nexport const useConfirm = () => {\n const confirm = (state: State) => {\n updateState({ ...state, open: true });\n return new Promise((res) => {\n resolveCallback = res;\n });\n };\n\n return confirm;\n};\n","import { useMemo } from 'react';\n\nimport classNames from 'classnames';\nimport useTranslation from 'next-translate/useTranslation';\n\nimport styles from './SurahPreviewRow.module.scss';\n\nimport ChapterIconContainer, {\n ChapterIconsSize,\n} from '@/components/chapters/ChapterIcon/ChapterIconContainer';\nimport Spinner from '@/dls/Spinner/Spinner';\nimport { toLocalizedNumber } from '@/utils/locale';\n\ntype SurahPreviewRowProps = {\n surahNumber: number;\n surahName: string;\n translatedSurahName: string;\n description: string;\n chapterId: number;\n isMinimalLayout?: boolean;\n isLoading?: boolean;\n};\nconst SurahPreviewRow = ({\n surahName,\n surahNumber,\n translatedSurahName,\n description,\n chapterId,\n isMinimalLayout = false,\n isLoading = false,\n}: SurahPreviewRowProps) => {\n const { lang } = useTranslation('home');\n const localizedSurahNumber = useMemo(\n () => toLocalizedNumber(surahNumber, lang),\n [surahNumber, lang],\n );\n\n if (isMinimalLayout) {\n return (\n <div className={styles.container}>\n <div className={styles.left}>\n <div className={styles.surahNumber}>\n <span>{localizedSurahNumber}</span>\n </div>\n <ChapterIconContainer\n chapterId={chapterId.toString()}\n hasSurahPrefix={false}\n size={ChapterIconsSize.Large}\n />\n </div>\n <div className={styles.right}>\n {description && (\n <div className={classNames(styles.description, styles.largeText)}>{description}</div>\n )}\n </div>\n </div>\n );\n }\n return (\n <div className={styles.container}>\n <div className={styles.left}>\n <div className={styles.surahNumber}>\n <span>{localizedSurahNumber}</span>\n </div>\n <div className={styles.surahNameContainer}>\n <div className={styles.surahName}>{surahName}</div>\n <div className={styles.translatedSurahName}>{translatedSurahName}</div>\n </div>\n </div>\n {isLoading && <Spinner />}\n <div className={styles.right}>\n <div>\n <ChapterIconContainer chapterId={chapterId.toString()} hasSurahPrefix={false} />\n </div>\n {description && <div className={styles.description}>{description}</div>}\n </div>\n </div>\n );\n};\n\nexport default SurahPreviewRow;\n","import classNames from 'classnames';\n\nimport styles from './Tabs.module.scss';\n\ntype Tab = {\n title: string;\n value: string;\n id?: string;\n};\n\ntype TabsProps = {\n tabs: Tab[];\n selected: string;\n onSelect?: (value: string) => void;\n};\n\n// TODO: move this to Radix UI Tabs component\nconst Tabs = ({ tabs, onSelect, selected }: TabsProps) => {\n return (\n <div className={styles.container} role=\"tablist\">\n {tabs.map((tab) => (\n <div\n className={classNames(styles.tabItem, selected === tab.value && styles.tabItemSelected)}\n key={tab.value}\n role=\"tab\"\n tabIndex={0}\n id={tab.id}\n {...(onSelect && {\n onKeyDown: () => onSelect(tab.value),\n onClick: () => onSelect(tab.value),\n })}\n >\n {tab.title}\n </div>\n ))}\n </div>\n );\n};\n\nexport default Tabs;\n","import { useMemo } from 'react';\n\nimport { useSelector, shallowEqual } from 'react-redux';\nimport useSWRImmutable from 'swr/immutable';\n\nimport { selectRecentReadingSessions } from '@/redux/slices/QuranReader/readingTracker';\nimport { privateFetcher } from '@/utils/auth/api';\nimport { makeReadingSessionsUrl } from '@/utils/auth/apiPaths';\nimport { isLoggedIn } from '@/utils/auth/login';\nimport { makeVerseKey } from '@/utils/verse';\nimport ReadingSession from 'types/ReadingSession';\n\nconst useGetRecentlyReadVerseKeys = () => {\n const recentReadingSessions = useSelector(selectRecentReadingSessions, shallowEqual);\n\n const { data, isValidating } = useSWRImmutable<ReadingSession[]>(\n isLoggedIn() ? makeReadingSessionsUrl() : null,\n privateFetcher,\n );\n\n const recentlyReadVerseKeys = useMemo(() => {\n if (!isLoggedIn()) {\n return Object.keys(recentReadingSessions);\n }\n\n if (isLoggedIn() && data?.length > 0) {\n return data.map((item) => makeVerseKey(item.chapterNumber, item.verseNumber));\n }\n\n return [];\n }, [data, recentReadingSessions]);\n\n // we don't need to pass the error because it'll fallback to an empty array\n return {\n recentlyReadVerseKeys,\n isLoading: isValidating && !data,\n };\n};\n\nexport default useGetRecentlyReadVerseKeys;\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","export enum CollectionDetailSortOption {\n RecentlyAdded = 'recentlyAdded',\n VerseKey = 'verseKey',\n}\n\nexport enum CollectionListSortOption {\n RecentlyUpdated = 'recentlyUpdated',\n Alphabetical = 'alphabetical',\n}\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"CollectionList_header__Ghz8p\",\"itemContainer\":\"CollectionList_itemContainer__DrF_x\",\"itemTitle\":\"CollectionList_itemTitle__cql2u\",\"itemInfo\":\"CollectionList_itemInfo__KwBtt\",\"itemIcon\":\"CollectionList_itemIcon__qPZ6z\",\"itemCount\":\"CollectionList_itemCount___fntD\",\"collectionListContainer\":\"CollectionList_collectionListContainer__xkayj\",\"collectionListEmpty\":\"CollectionList_collectionListEmpty__VBIZ_\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"sorter\":\"CollectionSorter_sorter__FUf1K\",\"sortTrigger\":\"CollectionSorter_sortTrigger__C17Do\",\"itemIcon\":\"CollectionSorter_itemIcon___37wK\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"RenameCollectionModal_header__vBNuv\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"bookmarkItem\":\"BookmarkPill_bookmarkItem__hpZIB\",\"linkButtonContainer\":\"BookmarkPill_linkButtonContainer__RfHXj\",\"closeIconContainer\":\"BookmarkPill_closeIconContainer__5UX1S\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"bookmarksHeader\":\"BookmarkedVersesList_bookmarksHeader__TU3ez\",\"verseLinksContainer\":\"BookmarkedVersesList_verseLinksContainer__meD2a\",\"viewAllBookmarksContainer\":\"BookmarkedVersesList_viewAllBookmarksContainer__LineH\",\"container\":\"BookmarkedVersesList_container__8v8bC\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"skeletonContainer\":\"BookmarkedVersesListSkeleton_skeletonContainer__vreim\",\"skeletonItem\":\"BookmarkedVersesListSkeleton_skeletonItem__YF8QK\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"tabsContainer\":\"BookmarksAndQuickLinks_tabsContainer__pQ8pR\",\"contentContainer\":\"BookmarksAndQuickLinks_contentContainer__qG9mM\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"readingSessionItem\":\"ReadingSessionPill_readingSessionItem__aqaCi\",\"linkButtonContainer\":\"ReadingSessionPill_linkButtonContainer__XikFO\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"bookmarksHeader\":\"RecentReadingSessionsList_bookmarksHeader__PWLmS\",\"verseLinksContainer\":\"RecentReadingSessionsList_verseLinksContainer__4h3Zn\",\"viewAllBookmarksContainer\":\"RecentReadingSessionsList_viewAllBookmarksContainer__pqiBX\",\"container\":\"RecentReadingSessionsList_container__3cQg7\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"skeletonContainer\":\"RecentReadingSessionsListSkeleton_skeletonContainer__zT_uq\",\"skeletonItem\":\"RecentReadingSessionsListSkeleton_skeletonItem__Dj1NI\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"iconContainer\":\"ChapterIconContainer_iconContainer__5umYV\",\"iconContainerSmall\":\"ChapterIconContainer_iconContainerSmall__gvmyy\",\"iconContainerLarge\":\"ChapterIconContainer_iconContainerLarge__z49r_\",\"iconContainerMega\":\"ChapterIconContainer_iconContainerMega__rKWtt\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"SurahPreviewRow_container__3ZfRV\",\"surahNumber\":\"SurahPreviewRow_surahNumber__BICjx\",\"translatedSurahName\":\"SurahPreviewRow_translatedSurahName__SHzIe\",\"description\":\"SurahPreviewRow_description__78w9M\",\"surahNameContainer\":\"SurahPreviewRow_surahNameContainer__b78tP\",\"surahName\":\"SurahPreviewRow_surahName__jrca5\",\"left\":\"SurahPreviewRow_left__jd1pg\",\"right\":\"SurahPreviewRow_right__6w3Ku\",\"largeText\":\"SurahPreviewRow_largeText__5M7WS\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"Tabs_container__l5DHu\",\"tabItem\":\"Tabs_tabItem__b_JVR\",\"tabItemSelected\":\"Tabs_tabItemSelected__Nt0wr\"};","// 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","stroke","strokeWidth","strokeLinecap","strokeLinejoin","className","options","selectedOptionId","onChange","isSingleCollection","collectionId","selectedOption","find","option","id","div","styles","PopoverMenu","trigger","span","label","ChevronDownIcon","onOpenChange","isOpen","eventData","logEvent","map","shouldCloseMenuAfterClick","onClick","url","image","imageAlt","imageHeight","imageWidth","openGraph","description","rest","openGraphParams","images","alt","params","truncateString","NextSeo","onSubmit","defaultValue","onClose","useTranslation","Modal","onClickOutside","isBottomSheetOnMobile","FormBuilder","formFields","field","placeholder","rules","type","RuleType","value","errorMessage","FormFieldType","actionText","onDone","collectionName","toast","useToast","confirm","useConfirm","onMenuItemClicked","logButtonClick","confirmText","cancelText","title","subtitle","deleteCollection","then","catch","status","ToastStatus","shouldStopPropagation","DEFAULT_SORT_OPTION","CollectionListSortOption","useState","collectionToRename","setCollectionToRename","lang","sortBy","setSortBy","apiParams","useSWR","makeCollectionsUrl","getCollectionsList","data","mutate","sortOptions","collections","onCollectionUpdated","isRenameModalOpen","RenameCollectionModal","name","renameFormData","updateCollection","ConfirmationModal","CollectionSorter","nextSortBy","logValueChange","Link","href","BookmarkIcon","collectionsItemsCount","toLocalizedNumber","collection","count","Button","size","ButtonSize","tooltip","variant","ButtonVariant","shape","ButtonShape","ariaLabel","OverflowMenuIcon","isMenuOpen","onCollectionMenuOpenChange","isModal","isPortalled","RenameCollectionAction","DeleteCollectionAction","verseKey","onDeleted","chaptersData","useContext","DataContext","chapterNumber","getChapterNumberFromKey","chapterData","getChapterData","toString","bookmarkText","toLocalizedVerseKey","transliteratedName","getVerseNavigationUrlByVerseKey","ButtonType","button","CloseIcon","bookmarksArr","Array","k","i","Skeleton","isActive","BookmarkPill","quranReaderStyles","useSelector","selectQuranReaderStyles","shallowEqual","dispatch","useDispatch","bookmarkedVerses","selectBookmarks","isLoggedIn","makeBookmarksUrl","getMushafId","quranFont","mushafLines","mushaf","privateFetcher","isValidating","bookmarkedVersesKeys","useMemo","isUserLoggedIn","bookmark","makeVerseKey","key","verseNumber","keys","hasReachedBookmarksLimit","onBookmarkDeleted","selectedBookmark","getVerseAndChapterNumbersFromKey","chapter","Number","deleteBookmarkById","toggleVerseBookmark","BookmarkedVersesListSkeleton","readingSessionText","getChapterWithStartingVerseUrl","sessionsArr","ReadingSessionPill","useGetRecentlyReadVerseKeys","recentlyReadVerseKeys","isLoading","RecentReadingSessionsListSkeleton","View","isHomepage","ReadingSessions","Bookmarks","selectedTab","setSelectedTab","tabs","push","Collections","Tabs","selected","onSelect","newTab","classNames","RecentReadingSessionsList","BookmarkedVersesList","CollectionList","translate","padStart","ChapterIconsSize","chapterId","Medium","hasSurahPrefix","Small","Large","Mega","ChapterIcon","useConfirmModal","onCancel","onConfirm","state","actions","returnedActions","isCloseAction","open","onEscapeKeyDown","p","action","index","resolveCallback","memoryState","updateState","newState","listeners","forEach","listener","setState","useEffect","indexOf","splice","closeConfirm","Promise","res","surahName","surahNumber","translatedSurahName","isMinimalLayout","localizedSurahNumber","ChapterIconContainer","Spinner","role","tab","tabIndex","onKeyDown","recentReadingSessions","selectRecentReadingSessions","useSWRImmutable","makeReadingSessionsUrl","item","rawString","suffix","characters","split","shortenedText","character","stripHTMLTags","replace","slugifiedCollectionIdToCollectionId","slugifiedCollectionId","splits","CollectionDetailSortOption","module","exports"],"sourceRoot":""}