(() => { var exports = {}; exports.id = 50277; exports.ids = [50277,64820]; exports.modules = { /***/ 79918: /***/ ((module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ pageWrapperTemplate), /* harmony export */ "getServerSideProps": () => (/* binding */ getServerSideProps), /* harmony export */ "getStaticProps": () => (/* binding */ getStaticProps) /* harmony export */ }); /* harmony import */ var _sentry_server_config_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(96270); /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58097); /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20997); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59003); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(71853); /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(60866); /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _index_module_scss__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(23848); /* harmony import */ var _index_module_scss__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_index_module_scss__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var _profile_module_scss__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(27489); /* harmony import */ var _profile_module_scss__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_profile_module_scss__WEBPACK_IMPORTED_MODULE_23__); /* harmony import */ var _components_Auth_withAuth__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1223); /* harmony import */ var _components_NextSeoWrapper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(25869); /* harmony import */ var _components_Profile_DeleteAccountButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90031); /* harmony import */ var _components_Verses_BookmarksAndCollectionsSection__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(14183); /* harmony import */ var _components_Verses_RecentReadingSessions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(44533); /* harmony import */ var _dls_Button_Button__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(50497); /* harmony import */ var _dls_Skeleton_Skeleton__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(77048); /* harmony import */ var _hooks_auth_useCurrentUser__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(35244); /* harmony import */ var _utils_auth_api__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(37883); /* harmony import */ var _utils_auth_constants__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(43860); /* harmony import */ var _utils_auth_login__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(22197); /* harmony import */ var _utils_auth_userDataSync__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(50823); /* harmony import */ var _utils_chapter__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(95892); /* harmony import */ var _utils_eventLogger__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(55943); /* harmony import */ var _utils_locale__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(24709); /* harmony import */ var _utils_navigation__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(57933); /* harmony import */ var src_pages_error__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(36049); var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_components_Auth_withAuth__WEBPACK_IMPORTED_MODULE_6__, _components_Profile_DeleteAccountButton__WEBPACK_IMPORTED_MODULE_8__, _components_Verses_BookmarksAndCollectionsSection__WEBPACK_IMPORTED_MODULE_9__, _components_Verses_RecentReadingSessions__WEBPACK_IMPORTED_MODULE_10__, _dls_Button_Button__WEBPACK_IMPORTED_MODULE_11__, _hooks_auth_useCurrentUser__WEBPACK_IMPORTED_MODULE_13__, _utils_auth_login__WEBPACK_IMPORTED_MODULE_16__, _utils_auth_userDataSync__WEBPACK_IMPORTED_MODULE_17__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_19__, _utils_navigation__WEBPACK_IMPORTED_MODULE_21__, src_pages_error__WEBPACK_IMPORTED_MODULE_22__]); ([_components_Auth_withAuth__WEBPACK_IMPORTED_MODULE_6__, _components_Profile_DeleteAccountButton__WEBPACK_IMPORTED_MODULE_8__, _components_Verses_BookmarksAndCollectionsSection__WEBPACK_IMPORTED_MODULE_9__, _components_Verses_RecentReadingSessions__WEBPACK_IMPORTED_MODULE_10__, _dls_Button_Button__WEBPACK_IMPORTED_MODULE_11__, _hooks_auth_useCurrentUser__WEBPACK_IMPORTED_MODULE_13__, _utils_auth_login__WEBPACK_IMPORTED_MODULE_16__, _utils_auth_userDataSync__WEBPACK_IMPORTED_MODULE_17__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_19__, _utils_navigation__WEBPACK_IMPORTED_MODULE_21__, src_pages_error__WEBPACK_IMPORTED_MODULE_22__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__); const nameSample = "Mohammad Ali"; const emailSample = "mohammadali@quran.com"; const ProfilePage = ()=>{ const { t , lang } = next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_5___default()(); const router = (0,next_router__WEBPACK_IMPORTED_MODULE_4__.useRouter)(); const { user , isLoading , error } = (0,_hooks_auth_useCurrentUser__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z)(); const onLogoutClicked = async ()=>{ if (!(0,_utils_auth_login__WEBPACK_IMPORTED_MODULE_16__/* .isLoggedIn */ .jl)()) { return; } (0,_utils_eventLogger__WEBPACK_IMPORTED_MODULE_19__/* .logButtonClick */ .MY)("profile_logout"); await (0,_utils_auth_api__WEBPACK_IMPORTED_MODULE_14__/* .logoutUser */ .TX)(); (0,_utils_auth_userDataSync__WEBPACK_IMPORTED_MODULE_17__/* .removeLastSyncAt */ .Tk)(); router.push((0,_utils_navigation__WEBPACK_IMPORTED_MODULE_21__/* .getLoginNavigationUrl */ .gk)()); router.reload(); }; if (error) { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(src_pages_error__WEBPACK_IMPORTED_MODULE_22__["default"], { statusCode: 500 }); } const { email , firstName , lastName , photoUrl } = user; const profileSkeletonInfoSkeleton = /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", { className: classnames__WEBPACK_IMPORTED_MODULE_3___default()((_profile_module_scss__WEBPACK_IMPORTED_MODULE_23___default().profileInfoContainer), (_profile_module_scss__WEBPACK_IMPORTED_MODULE_23___default().skeletonContainer)), children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_dls_Skeleton_Skeleton__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h2", { className: (_profile_module_scss__WEBPACK_IMPORTED_MODULE_23___default().name), children: nameSample }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_dls_Skeleton_Skeleton__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", { className: (_profile_module_scss__WEBPACK_IMPORTED_MODULE_23___default().email), children: emailSample }) }) ] }); const profileInfo = /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", { className: (_profile_module_scss__WEBPACK_IMPORTED_MODULE_23___default().profileInfoContainer), children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("h2", { className: (_profile_module_scss__WEBPACK_IMPORTED_MODULE_23___default().name), children: `${firstName} ${lastName}` }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", { className: (_profile_module_scss__WEBPACK_IMPORTED_MODULE_23___default().email), children: email }) ] }); return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_NextSeoWrapper__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, { title: t("common:profile"), url: (0,_utils_navigation__WEBPACK_IMPORTED_MODULE_21__/* .getCanonicalUrl */ .Z2)(lang, (0,_utils_navigation__WEBPACK_IMPORTED_MODULE_21__/* .getProfileNavigationUrl */ .kJ)()), languageAlternates: (0,_utils_locale__WEBPACK_IMPORTED_MODULE_20__/* .getLanguageAlternates */ .qc)((0,_utils_navigation__WEBPACK_IMPORTED_MODULE_21__/* .getProfileNavigationUrl */ .kJ)()), nofollow: true, noindex: true }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", { className: (_index_module_scss__WEBPACK_IMPORTED_MODULE_24___default().pageContainer), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", { className: (_index_module_scss__WEBPACK_IMPORTED_MODULE_24___default().flow), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", { className: (_profile_module_scss__WEBPACK_IMPORTED_MODULE_23___default().container), children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", { className: classnames__WEBPACK_IMPORTED_MODULE_3___default()((_index_module_scss__WEBPACK_IMPORTED_MODULE_24___default().flowItem)), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", { className: (_profile_module_scss__WEBPACK_IMPORTED_MODULE_23___default().profileContainer), children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", { className: (_profile_module_scss__WEBPACK_IMPORTED_MODULE_23___default().profilePicture), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("img", { className: (_profile_module_scss__WEBPACK_IMPORTED_MODULE_23___default().profilePicture), alt: "avatar", src: photoUrl || _utils_auth_constants__WEBPACK_IMPORTED_MODULE_15__/* .DEFAULT_PHOTO_URL */ .zU }) }), isLoading ? profileSkeletonInfoSkeleton : profileInfo ] }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", { className: classnames__WEBPACK_IMPORTED_MODULE_3___default()((_index_module_scss__WEBPACK_IMPORTED_MODULE_24___default().flowItem), (_index_module_scss__WEBPACK_IMPORTED_MODULE_24___default().fullWidth), (_profile_module_scss__WEBPACK_IMPORTED_MODULE_23___default().recentReadingContainer)), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_Verses_RecentReadingSessions__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {}) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", { className: classnames__WEBPACK_IMPORTED_MODULE_3___default()((_index_module_scss__WEBPACK_IMPORTED_MODULE_24___default().flowItem), (_index_module_scss__WEBPACK_IMPORTED_MODULE_24___default().fullWidth), (_profile_module_scss__WEBPACK_IMPORTED_MODULE_23___default().bookmarksAndCollectionsContainer)), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_Verses_BookmarksAndCollectionsSection__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .Z, { isHomepage: false }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", { className: classnames__WEBPACK_IMPORTED_MODULE_3___default()((_index_module_scss__WEBPACK_IMPORTED_MODULE_24___default().flowItem), (_index_module_scss__WEBPACK_IMPORTED_MODULE_24___default().fullWidth), (_profile_module_scss__WEBPACK_IMPORTED_MODULE_23___default().actionsContainer)), children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", { className: (_profile_module_scss__WEBPACK_IMPORTED_MODULE_23___default().action), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_components_Profile_DeleteAccountButton__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, { isDisabled: isLoading }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", { className: (_profile_module_scss__WEBPACK_IMPORTED_MODULE_23___default().action), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_dls_Button_Button__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .ZP, { isDisabled: isLoading, onClick: onLogoutClicked, children: t("common:logout") }) }) ] }) ] }) }) }) ] }); }; const getStaticProps$1 = async ({ locale })=>{ const allChaptersData = await (0,_utils_chapter__WEBPACK_IMPORTED_MODULE_18__/* .getAllChaptersData */ .T4)(locale); return { props: { chaptersData: allChaptersData } }; }; var __SENTRY_WRAPPING_TARGET_FILE__ = (0,_components_Auth_withAuth__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(ProfilePage); var serverComponentModule = /*#__PURE__*/Object.freeze({ __proto__: null, getStaticProps: getStaticProps$1, 'default': __SENTRY_WRAPPING_TARGET_FILE__ }); /* * This file is a template for the code which will be substituted when our webpack loader handles non-API files in the * `pages/` directory. * * We use `__SENTRY_WRAPPING_TARGET_FILE__.cjs` as a placeholder for the path to the file being wrapped. Because it's not a real package, * this causes both TS and ESLint to complain, hence the pragma comments below. */ const userPageModule = serverComponentModule ; const pageComponent = userPageModule ? userPageModule.default : undefined; const origGetInitialProps = pageComponent ? pageComponent.getInitialProps : undefined; const origGetStaticProps = userPageModule ? userPageModule.getStaticProps : undefined; const origGetServerSideProps = userPageModule ? userPageModule.getServerSideProps : undefined; // eslint-disable-next-line @typescript-eslint/no-explicit-any const getInitialPropsWrappers = { '/_app': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapAppGetInitialPropsWithSentry, '/_document': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapDocumentGetInitialPropsWithSentry, '/_error': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapErrorGetInitialPropsWithSentry, }; const getInitialPropsWrapper = getInitialPropsWrappers['/profile'] || _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetInitialPropsWithSentry; if (pageComponent && typeof origGetInitialProps === 'function') { pageComponent.getInitialProps = getInitialPropsWrapper(origGetInitialProps) ; } const getStaticProps = typeof origGetStaticProps === 'function' ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetStaticPropsWithSentry(origGetStaticProps, '/profile') : undefined; const getServerSideProps = typeof origGetServerSideProps === 'function' ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetServerSidePropsWithSentry(origGetServerSideProps, '/profile') : undefined; const pageWrapperTemplate = pageComponent ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapPageComponentWithSentry(pageComponent ) : pageComponent; __webpack_async_result__(); } catch(e) { __webpack_async_result__(e); } }); /***/ }), /***/ 53518: /***/ ((module) => { // Exports module.exports = { "inputContainer": "DeleteAccountButton_inputContainer__XvfB_", "deleteButton": "DeleteAccountButton_deleteButton__N7Ex2", "confirmationText": "DeleteAccountButton_confirmationText__48miH", "instructionText": "DeleteAccountButton_instructionText__iVIlR" }; /***/ }), /***/ 83388: /***/ ((module) => { // Exports module.exports = { "sessionsContainer": "RecentReadingSessions_sessionsContainer__mC450", "sessionsHeader": "RecentReadingSessions_sessionsHeader__lbyVl", "verseLinksContainer": "RecentReadingSessions_verseLinksContainer__18irS", "verseLink": "RecentReadingSessions_verseLink__Ky4p8", "button": "RecentReadingSessions_button__0mjNR" }; /***/ }), /***/ 28935: /***/ ((module) => { // Exports module.exports = { "skeletonItem": "RecentReadingSessionsSkeleton_skeletonItem__73ehH" }; /***/ }), /***/ 48597: /***/ ((module) => { // Exports module.exports = { "container": "SurahPreviewBlock_container__ME6vO", "header": "SurahPreviewBlock_header__Jg3cj", "surahIcon": "SurahPreviewBlock_surahIcon__IFm5J", "surahNumber": "SurahPreviewBlock_surahNumber__MEa5C", "translatedSurahName": "SurahPreviewBlock_translatedSurahName__ZZkwX", "surahName": "SurahPreviewBlock_surahName__MNieK", "description": "SurahPreviewBlock_description__bfpmJ" }; /***/ }), /***/ 27489: /***/ ((module) => { // Exports module.exports = { "container": "profile_container__oyMiM", "profileContainer": "profile_profileContainer__F0pv4", "profilePicture": "profile_profilePicture__6x3ow", "profileInfoContainer": "profile_profileInfoContainer__Z9KlM", "skeletonContainer": "profile_skeletonContainer__gJPEf", "name": "profile_name__4_ocA", "email": "profile_email___dBtF", "actionsContainer": "profile_actionsContainer__Cjx1s", "action": "profile_action__OFH1d", "recentReadingContainer": "profile_recentReadingContainer__jsh_S", "bookmarksAndCollectionsContainer": "profile_bookmarksAndCollectionsContainer__YZ3c9", "collectionListContainer": "profile_collectionListContainer__p8_hb" }; /***/ }), /***/ 90031: /***/ ((module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20997); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16689); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71853); /* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var next_translate_Trans__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74137); /* harmony import */ var next_translate_Trans__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_translate_Trans__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(60866); /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _dls_Button_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50497); /* harmony import */ var _dls_Forms_Input__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(91308); /* harmony import */ var _dls_Modal_Modal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21948); /* harmony import */ var _DeleteAccountButton_module_scss__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(53518); /* harmony import */ var _DeleteAccountButton_module_scss__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_DeleteAccountButton_module_scss__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _utils_auth_api__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(37883); /* harmony import */ var _utils_auth_userDataSync__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(50823); /* harmony import */ var _utils_eventLogger__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(55943); var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_dls_Button_Button__WEBPACK_IMPORTED_MODULE_5__, _dls_Forms_Input__WEBPACK_IMPORTED_MODULE_6__, _dls_Modal_Modal__WEBPACK_IMPORTED_MODULE_7__, _utils_auth_userDataSync__WEBPACK_IMPORTED_MODULE_9__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_10__]); ([_dls_Button_Button__WEBPACK_IMPORTED_MODULE_5__, _dls_Forms_Input__WEBPACK_IMPORTED_MODULE_6__, _dls_Modal_Modal__WEBPACK_IMPORTED_MODULE_7__, _utils_auth_userDataSync__WEBPACK_IMPORTED_MODULE_9__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_10__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__); const DeleteAccountButton = ({ isDisabled })=>{ const { t } = next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_4___default()("profile"); const { 0: isModalVisible , 1: setIsModalVisible } = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const { 0: confirmationText , 1: setConfirmationText } = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(""); const closeModal = ()=>{ setConfirmationText(""); setIsModalVisible(false); }; const onDeleteConfirmed = async ()=>{ (0,_utils_eventLogger__WEBPACK_IMPORTED_MODULE_10__/* .logButtonClick */ .MY)("profile_confirm_delete_account"); closeModal(); await (0,_utils_auth_api__WEBPACK_IMPORTED_MODULE_8__/* .deleteAccount */ .tm)(); (0,_utils_auth_userDataSync__WEBPACK_IMPORTED_MODULE_9__/* .removeLastSyncAt */ .Tk)(); next_router__WEBPACK_IMPORTED_MODULE_2___default().push("/"); }; const onDeleteAccountClicked = ()=>{ (0,_utils_eventLogger__WEBPACK_IMPORTED_MODULE_10__/* .logButtonClick */ .MY)("profile_delete_account"); setIsModalVisible(true); }; const CONFIRMATION_TEXT = t("delete-confirmation.confirmation-text"); const canDeleteAccount = confirmationText.toLowerCase() === CONFIRMATION_TEXT.toLowerCase(); return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [ /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Button_Button__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .ZP, { type: _dls_Button_Button__WEBPACK_IMPORTED_MODULE_5__/* .ButtonType.Error */ .L$.Error, variant: _dls_Button_Button__WEBPACK_IMPORTED_MODULE_5__/* .ButtonVariant.Ghost */ .Wu.Ghost, onClick: onDeleteAccountClicked, isDisabled: isDisabled, children: t("delete-account") }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Modal_Modal__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, { isOpen: isModalVisible, onClickOutside: closeModal, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_dls_Modal_Modal__WEBPACK_IMPORTED_MODULE_7__/* ["default"].Body */ .Z.Body, { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_dls_Modal_Modal__WEBPACK_IMPORTED_MODULE_7__/* ["default"].Header */ .Z.Header, { children: [ /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Modal_Modal__WEBPACK_IMPORTED_MODULE_7__/* ["default"].Title */ .Z.Title, { children: t("delete-confirmation.title") }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Modal_Modal__WEBPACK_IMPORTED_MODULE_7__/* ["default"].Subtitle */ .Z.Subtitle, { children: t("delete-confirmation.subtitle") }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", { className: (_DeleteAccountButton_module_scss__WEBPACK_IMPORTED_MODULE_11___default().instructionText), children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx((next_translate_Trans__WEBPACK_IMPORTED_MODULE_3___default()), { i18nKey: "profile:delete-confirmation.instruction-text", values: { text: CONFIRMATION_TEXT }, components: { strong: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("strong", { className: (_DeleteAccountButton_module_scss__WEBPACK_IMPORTED_MODULE_11___default().confirmationText) }) } }) }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Forms_Input__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .ZP, { id: "delete-account-confirmation", value: confirmationText, onChange: setConfirmationText, fixedWidth: false, containerClassName: (_DeleteAccountButton_module_scss__WEBPACK_IMPORTED_MODULE_11___default().inputContainer) }) ] }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Modal_Modal__WEBPACK_IMPORTED_MODULE_7__/* ["default"].Footer */ .Z.Footer, { children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Button_Button__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .ZP, { type: _dls_Button_Button__WEBPACK_IMPORTED_MODULE_5__/* .ButtonType.Error */ .L$.Error, variant: _dls_Button_Button__WEBPACK_IMPORTED_MODULE_5__/* .ButtonVariant.Outlined */ .Wu.Outlined, className: (_DeleteAccountButton_module_scss__WEBPACK_IMPORTED_MODULE_11___default().deleteButton), onClick: onDeleteConfirmed, isDisabled: !canDeleteAccount, children: t("delete-confirmation.action-text") }) }) ] }) }) ] }); }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DeleteAccountButton); __webpack_async_result__(); } catch(e) { __webpack_async_result__(e); } }); /***/ }), /***/ 44533: /***/ ((module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20997); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16689); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60866); /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _dls_Link_Link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(61239); /* harmony import */ var _RecentReadingSessions_module_scss__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(83388); /* harmony import */ var _RecentReadingSessions_module_scss__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_RecentReadingSessions_module_scss__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _RecentReadingSessionsSkeleton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(82365); /* harmony import */ var _dls_SurahPreview_SurahPreview__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(95459); /* harmony import */ var _hooks_auth_useGetRecentlyReadVerseKeys__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(37865); /* harmony import */ var _utils_chapter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(95892); /* harmony import */ var _utils_eventLogger__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(55943); /* harmony import */ var _utils_locale__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(24709); /* harmony import */ var _utils_navigation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(57933); /* harmony import */ var _utils_verse__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(44519); /* harmony import */ var src_contexts_DataContext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(70813); var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_hooks_auth_useGetRecentlyReadVerseKeys__WEBPACK_IMPORTED_MODULE_6__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_8__, _utils_navigation__WEBPACK_IMPORTED_MODULE_10__]); ([_hooks_auth_useGetRecentlyReadVerseKeys__WEBPACK_IMPORTED_MODULE_6__, _utils_eventLogger__WEBPACK_IMPORTED_MODULE_8__, _utils_navigation__WEBPACK_IMPORTED_MODULE_10__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__); const RecentReadingSessions = ()=>{ const { t , lang } = next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_2___default()("home"); const chaptersData = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(src_contexts_DataContext__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z); const { recentlyReadVerseKeys , isLoading } = (0,_hooks_auth_useGetRecentlyReadVerseKeys__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(); const onRecentReadingSessionClicked = ()=>{ (0,_utils_eventLogger__WEBPACK_IMPORTED_MODULE_8__/* .logButtonClick */ .MY)("recently_read_card"); }; if (isLoading) { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: (_RecentReadingSessions_module_scss__WEBPACK_IMPORTED_MODULE_13___default().sessionsContainer), id: "reading-sessions", children: [ /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", { className: (_RecentReadingSessions_module_scss__WEBPACK_IMPORTED_MODULE_13___default().sessionsHeader), children: t("recently-read") }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", { className: (_RecentReadingSessions_module_scss__WEBPACK_IMPORTED_MODULE_13___default().verseLinksContainer), children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_RecentReadingSessionsSkeleton__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, {}) }) ] }); } if (recentlyReadVerseKeys.length === 0) return null; return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: (_RecentReadingSessions_module_scss__WEBPACK_IMPORTED_MODULE_13___default().sessionsContainer), id: "reading-sessions", children: [ /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("p", { className: (_RecentReadingSessions_module_scss__WEBPACK_IMPORTED_MODULE_13___default().sessionsHeader), children: t("recently-read") }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", { className: (_RecentReadingSessions_module_scss__WEBPACK_IMPORTED_MODULE_13___default().verseLinksContainer), children: recentlyReadVerseKeys.map((verseKey)=>{ const [chapterId, verseNumber] = (0,_utils_verse__WEBPACK_IMPORTED_MODULE_11__/* .getVerseAndChapterNumbersFromKey */ .bV)(verseKey); const surah = (0,_utils_chapter__WEBPACK_IMPORTED_MODULE_7__/* .getChapterData */ .dy)(chaptersData, chapterId); return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", { className: (_RecentReadingSessions_module_scss__WEBPACK_IMPORTED_MODULE_13___default().verseLink), children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Link_Link__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, { href: (0,_utils_navigation__WEBPACK_IMPORTED_MODULE_10__/* .getChapterWithStartingVerseUrl */ .P6)(verseKey), onClick: onRecentReadingSessionClicked, children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_SurahPreview_SurahPreview__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, { display: _dls_SurahPreview_SurahPreview__WEBPACK_IMPORTED_MODULE_5__/* .SurahPreviewDisplay.Block */ .$.Block, chapterId: Number(chapterId), surahNumber: Number(chapterId), translatedSurahName: surah.translatedName, surahName: surah.transliteratedName, description: `${t("common:ayah")} ${(0,_utils_locale__WEBPACK_IMPORTED_MODULE_9__/* .toLocalizedNumber */ .rQ)(Number(verseNumber), lang)}` }) }) }, verseKey); }) }) ] }); }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RecentReadingSessions); __webpack_async_result__(); } catch(e) { __webpack_async_result__(e); } }); /***/ }), /***/ 82365: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20997); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16689); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(59003); /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(60866); /* harmony import */ var next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _RecentReadingSessions_module_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(83388); /* harmony import */ var _RecentReadingSessions_module_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_RecentReadingSessions_module_scss__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _RecentReadingSessionsSkeleton_module_scss__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(28935); /* harmony import */ var _RecentReadingSessionsSkeleton_module_scss__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_RecentReadingSessionsSkeleton_module_scss__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _components_chapters_ChapterIcon_ChapterIconContainer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92799); /* harmony import */ var _contexts_DataContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(70813); /* harmony import */ var _dls_Skeleton_Skeleton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(77048); /* harmony import */ var _dls_SurahPreview_SurahPreviewBlock_module_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(48597); /* harmony import */ var _dls_SurahPreview_SurahPreviewBlock_module_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_dls_SurahPreview_SurahPreviewBlock_module_scss__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var _utils_chapter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(95892); /* harmony import */ var _utils_locale__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(24709); /* harmony import */ var _utils_verse__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(44519); const VERSE_KEY = "19:1"; const RECENT_READING_SESSIONS_COUNT = 10; const recentReadingSessionsArr = Array(RECENT_READING_SESSIONS_COUNT).fill(null); const RecentReadingSessionsSkeleton = ()=>{ const { t , lang } = next_translate_useTranslation__WEBPACK_IMPORTED_MODULE_3___default()("home"); const chaptersData = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(_contexts_DataContext__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z); const [chapterId, verseNumber] = (0,_utils_verse__WEBPACK_IMPORTED_MODULE_9__/* .getVerseAndChapterNumbersFromKey */ .bV)(VERSE_KEY); const surah = (0,_utils_chapter__WEBPACK_IMPORTED_MODULE_7__/* .getChapterData */ .dy)(chaptersData, chapterId); const isMinimalLayout = (0,_utils_locale__WEBPACK_IMPORTED_MODULE_8__/* .shouldUseMinimalLayout */ .uP)(lang); const localizedSurahNumber = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>{ return (0,_utils_locale__WEBPACK_IMPORTED_MODULE_8__/* .toLocalizedNumber */ .rQ)(Number(chapterId), lang); }, [ lang, chapterId ]); return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: recentReadingSessionsArr.map((k, i)=>/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", { className: classnames__WEBPACK_IMPORTED_MODULE_2___default()((_RecentReadingSessions_module_scss__WEBPACK_IMPORTED_MODULE_10___default().verseLink), (_RecentReadingSessionsSkeleton_module_scss__WEBPACK_IMPORTED_MODULE_11___default().skeletonItem)), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: (_dls_SurahPreview_SurahPreviewBlock_module_scss__WEBPACK_IMPORTED_MODULE_12___default().container), children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: (_dls_SurahPreview_SurahPreviewBlock_module_scss__WEBPACK_IMPORTED_MODULE_12___default().header), children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Skeleton_Skeleton__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, { isActive: true, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: (_dls_SurahPreview_SurahPreviewBlock_module_scss__WEBPACK_IMPORTED_MODULE_12___default().translatedSurahName), children: [ isMinimalLayout && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [ t("common:surah"), " " ] }), surah.translatedName ] }) }), !isMinimalLayout && /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Skeleton_Skeleton__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, { isActive: true, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: (_dls_SurahPreview_SurahPreviewBlock_module_scss__WEBPACK_IMPORTED_MODULE_12___default().surahName), children: [ t("common:surah"), " ", /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("br", {}), surah.transliteratedName ] }) }) ] }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", { className: (_dls_SurahPreview_SurahPreviewBlock_module_scss__WEBPACK_IMPORTED_MODULE_12___default().surahNumber), children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Skeleton_Skeleton__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, { isActive: true, children: localizedSurahNumber }) }) ] }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_dls_Skeleton_Skeleton__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, { isActive: true, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: (_dls_SurahPreview_SurahPreviewBlock_module_scss__WEBPACK_IMPORTED_MODULE_12___default().surahIcon), children: [ /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_components_chapters_ChapterIcon_ChapterIconContainer__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, { chapterId: chapterId.toString(), hasSurahPrefix: false, size: _components_chapters_ChapterIcon_ChapterIconContainer__WEBPACK_IMPORTED_MODULE_4__/* .ChapterIconsSize.Large */ ._.Large }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", { className: (_dls_SurahPreview_SurahPreviewBlock_module_scss__WEBPACK_IMPORTED_MODULE_12___default().description), children: `${t("common:ayah")} ${(0,_utils_locale__WEBPACK_IMPORTED_MODULE_8__/* .toLocalizedNumber */ .rQ)(Number(verseNumber), lang)}` }) ] }) }) ] }) }, `skeleton_${i}`)) }); }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RecentReadingSessionsSkeleton); /***/ }), /***/ 95459: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { "$": () => (/* binding */ SurahPreviewDisplay), "Z": () => (/* binding */ SurahPreview_SurahPreview) }); // EXTERNAL MODULE: external "react/jsx-runtime" var jsx_runtime_ = __webpack_require__(20997); // EXTERNAL MODULE: external "react" var external_react_ = __webpack_require__(16689); // EXTERNAL MODULE: external "next-translate/useTranslation" var useTranslation_ = __webpack_require__(60866); var useTranslation_default = /*#__PURE__*/__webpack_require__.n(useTranslation_); // EXTERNAL MODULE: ./src/components/dls/SurahPreview/SurahPreviewBlock.module.scss var SurahPreviewBlock_module = __webpack_require__(48597); var SurahPreviewBlock_module_default = /*#__PURE__*/__webpack_require__.n(SurahPreviewBlock_module); // EXTERNAL MODULE: ./src/components/chapters/ChapterIcon/ChapterIconContainer.tsx + 1 modules var ChapterIconContainer = __webpack_require__(92799); // EXTERNAL MODULE: ./src/utils/locale.ts var locale = __webpack_require__(24709); ;// CONCATENATED MODULE: ./src/components/dls/SurahPreview/SurahPreviewBlock.tsx const SurahPreviewBlock = ({ chapterId , surahName , surahNumber , translatedSurahName , description })=>{ const { t , lang } = useTranslation_default()("common"); const isMinimalLayout = (0,locale/* shouldUseMinimalLayout */.uP)(lang); const localizedSurahNumber = (0,external_react_.useMemo)(()=>{ return (0,locale/* toLocalizedNumber */.rQ)(surahNumber, lang); }, [ lang, surahNumber ]); return /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", { className: (SurahPreviewBlock_module_default()).container, children: [ /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", { className: (SurahPreviewBlock_module_default()).header, children: [ /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", { children: [ /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", { className: (SurahPreviewBlock_module_default()).translatedSurahName, children: [ isMinimalLayout && /*#__PURE__*/ (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, { children: [ t("surah"), " " ] }), translatedSurahName ] }), !isMinimalLayout && /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", { className: (SurahPreviewBlock_module_default()).surahName, children: [ t("surah"), " ", /*#__PURE__*/ jsx_runtime_.jsx("br", {}), surahName ] }) ] }), /*#__PURE__*/ jsx_runtime_.jsx("div", { className: (SurahPreviewBlock_module_default()).surahNumber, children: localizedSurahNumber }) ] }), /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", { className: (SurahPreviewBlock_module_default()).surahIcon, children: [ /*#__PURE__*/ jsx_runtime_.jsx(ChapterIconContainer/* default */.Z, { chapterId: chapterId.toString(), hasSurahPrefix: false, size: ChapterIconContainer/* ChapterIconsSize.Large */._.Large }), description && /*#__PURE__*/ jsx_runtime_.jsx("div", { className: (SurahPreviewBlock_module_default()).description, children: description }) ] }) ] }); }; /* harmony default export */ const SurahPreview_SurahPreviewBlock = (SurahPreviewBlock); // EXTERNAL MODULE: ./src/components/dls/SurahPreview/SurahPreviewRow.tsx var SurahPreviewRow = __webpack_require__(53198); ;// CONCATENATED MODULE: ./src/components/dls/SurahPreview/SurahPreview.tsx var SurahPreviewDisplay; (function(SurahPreviewDisplay) { SurahPreviewDisplay["Block"] = "block"; SurahPreviewDisplay["Row"] = "row"; })(SurahPreviewDisplay || (SurahPreviewDisplay = {})); const SurahPreview = ({ chapterId , surahName , surahNumber , translatedSurahName , description , display =SurahPreviewDisplay.Block })=>{ if (display === SurahPreviewDisplay.Block) { return /*#__PURE__*/ jsx_runtime_.jsx(SurahPreview_SurahPreviewBlock, { chapterId: chapterId, surahName: surahName, surahNumber: surahNumber, translatedSurahName: translatedSurahName, description: description }); } if (display === SurahPreviewDisplay.Row) { return /*#__PURE__*/ jsx_runtime_.jsx(SurahPreviewRow/* default */.Z, { chapterId: chapterId, surahName: surahName, surahNumber: surahNumber, translatedSurahName: translatedSurahName, description: description }); } throw new Error("display must be either block or row"); }; /* harmony default export */ const SurahPreview_SurahPreview = (SurahPreview); /***/ }), /***/ 35244: /***/ ((module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var swr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15941); /* harmony import */ var _utils_auth_api__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37883); /* harmony import */ var _utils_auth_apiPaths__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13830); /* harmony import */ var _utils_auth_login__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(22197); var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([swr__WEBPACK_IMPORTED_MODULE_0__, _utils_auth_login__WEBPACK_IMPORTED_MODULE_3__]); ([swr__WEBPACK_IMPORTED_MODULE_0__, _utils_auth_login__WEBPACK_IMPORTED_MODULE_3__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__); const useCurrentUser = ()=>{ const { data: userData , isValidating , error , } = (0,swr__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_utils_auth_login__WEBPACK_IMPORTED_MODULE_3__/* .isLoggedIn */ .jl)() ? (0,_utils_auth_apiPaths__WEBPACK_IMPORTED_MODULE_2__/* .makeUserProfileUrl */ .bo)() : null, _utils_auth_api__WEBPACK_IMPORTED_MODULE_1__/* .getUserProfile */ .et); return { user: userData || {}, isLoading: isValidating && !userData, error }; }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useCurrentUser); __webpack_async_result__(); } catch(e) { __webpack_async_result__(e); } }); /***/ }), /***/ 50823: /***/ ((module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "Tk": () => (/* binding */ removeLastSyncAt), /* harmony export */ "Uz": () => (/* binding */ getLastSyncAt), /* harmony export */ "b4": () => (/* binding */ setLastSyncAt) /* harmony export */ }); /* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69915); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43860); var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([js_cookie__WEBPACK_IMPORTED_MODULE_0__]); js_cookie__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0]; const getLastSyncAt = ()=>{ const value = js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].get(_constants__WEBPACK_IMPORTED_MODULE_1__/* .USER_DATA_SYNC_COOKIE_NAME */ ._0); if (!value) { return null; } const dateValue = new Date(value); return !Number.isNaN(dateValue.getTime()) ? dateValue : null; }; const removeLastSyncAt = ()=>js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].remove(_constants__WEBPACK_IMPORTED_MODULE_1__/* .USER_DATA_SYNC_COOKIE_NAME */ ._0); const setLastSyncAt = (lastSyncAt)=>js_cookie__WEBPACK_IMPORTED_MODULE_0__["default"].set(_constants__WEBPACK_IMPORTED_MODULE_1__/* .USER_DATA_SYNC_COOKIE_NAME */ ._0, lastSyncAt.toString()); __webpack_async_result__(); } catch(e) { __webpack_async_result__(e); } }); /***/ }), /***/ 75184: /***/ ((module) => { "use strict"; module.exports = require("@reduxjs/toolkit"); /***/ }), /***/ 58097: /***/ ((module) => { "use strict"; module.exports = require("@sentry/nextjs"); /***/ }), /***/ 59003: /***/ ((module) => { "use strict"; module.exports = require("classnames"); /***/ }), /***/ 59606: /***/ ((module) => { "use strict"; module.exports = require("humps"); /***/ }), /***/ 12372: /***/ ((module) => { "use strict"; module.exports = require("lodash/findKey"); /***/ }), /***/ 98492: /***/ ((module) => { "use strict"; module.exports = require("lodash/groupBy"); /***/ }), /***/ 35526: /***/ ((module) => { "use strict"; module.exports = require("lodash/random"); /***/ }), /***/ 64042: /***/ ((module) => { "use strict"; module.exports = require("lodash/range"); /***/ }), /***/ 16641: /***/ ((module) => { "use strict"; module.exports = require("next-seo"); /***/ }), /***/ 74137: /***/ ((module) => { "use strict"; module.exports = require("next-translate/Trans"); /***/ }), /***/ 60866: /***/ ((module) => { "use strict"; module.exports = require("next-translate/useTranslation"); /***/ }), /***/ 3280: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/app-router-context.js"); /***/ }), /***/ 92796: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/head-manager-context.js"); /***/ }), /***/ 3539: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/i18n/detect-domain-locale.js"); /***/ }), /***/ 34014: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/i18n/normalize-locale-path.js"); /***/ }), /***/ 78524: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/is-plain-object.js"); /***/ }), /***/ 78020: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/mitt.js"); /***/ }), /***/ 64406: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/page-path/denormalize-page-path.js"); /***/ }), /***/ 24964: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router-context.js"); /***/ }), /***/ 93431: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/add-locale.js"); /***/ }), /***/ 11751: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/add-path-prefix.js"); /***/ }), /***/ 46220: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/compare-states.js"); /***/ }), /***/ 10299: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/format-next-pathname-info.js"); /***/ }), /***/ 23938: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/format-url.js"); /***/ }), /***/ 29565: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/get-asset-path-from-route.js"); /***/ }), /***/ 35789: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/get-next-pathname-info.js"); /***/ }), /***/ 1897: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/is-bot.js"); /***/ }), /***/ 1428: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/is-dynamic.js"); /***/ }), /***/ 28854: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/parse-path.js"); /***/ }), /***/ 91292: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/parse-relative-url.js"); /***/ }), /***/ 34567: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/path-has-prefix.js"); /***/ }), /***/ 80979: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/querystring.js"); /***/ }), /***/ 93297: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/remove-trailing-slash.js"); /***/ }), /***/ 36052: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/resolve-rewrites.js"); /***/ }), /***/ 84226: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/route-matcher.js"); /***/ }), /***/ 95052: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/route-regex.js"); /***/ }), /***/ 59232: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/utils.js"); /***/ }), /***/ 71853: /***/ ((module) => { "use strict"; module.exports = require("next/router"); /***/ }), /***/ 16689: /***/ ((module) => { "use strict"; module.exports = require("react"); /***/ }), /***/ 6022: /***/ ((module) => { "use strict"; module.exports = require("react-redux"); /***/ }), /***/ 20997: /***/ ((module) => { "use strict"; module.exports = require("react/jsx-runtime"); /***/ }), /***/ 52648: /***/ ((module) => { "use strict"; module.exports = require("refresh-fetch"); /***/ }), /***/ 11601: /***/ ((module) => { "use strict"; module.exports = import("@radix-ui/react-checkbox");; /***/ }), /***/ 77715: /***/ ((module) => { "use strict"; module.exports = import("@radix-ui/react-dialog");; /***/ }), /***/ 31481: /***/ ((module) => { "use strict"; module.exports = import("@radix-ui/react-dropdown-menu");; /***/ }), /***/ 4086: /***/ ((module) => { "use strict"; module.exports = import("@radix-ui/react-radio-group");; /***/ }), /***/ 66704: /***/ ((module) => { "use strict"; module.exports = import("@radix-ui/react-tooltip");; /***/ }), /***/ 28560: /***/ ((module) => { "use strict"; module.exports = import("@radix-ui/react-visually-hidden");; /***/ }), /***/ 88813: /***/ ((module) => { "use strict"; module.exports = import("firebase/compat/analytics");; /***/ }), /***/ 33773: /***/ ((module) => { "use strict"; module.exports = import("firebase/compat/app");; /***/ }), /***/ 69915: /***/ ((module) => { "use strict"; module.exports = import("js-cookie");; /***/ }), /***/ 45641: /***/ ((module) => { "use strict"; module.exports = import("react-hook-form");; /***/ }), /***/ 3590: /***/ ((module) => { "use strict"; module.exports = import("react-toastify");; /***/ }), /***/ 15941: /***/ ((module) => { "use strict"; module.exports = import("swr");; /***/ }), /***/ 79847: /***/ ((module) => { "use strict"; module.exports = import("swr/immutable");; /***/ }), /***/ 63477: /***/ ((module) => { "use strict"; module.exports = require("querystring"); /***/ }) }; ; // load runtime var __webpack_require__ = require("../webpack-runtime.js"); __webpack_require__.C(exports); var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) var __webpack_exports__ = __webpack_require__.X(0, [11497,79165,96270,24709,57933,61239,25869,50497,76410,79717,13830,37883,22197,36049,85949,62093,91308,99163,42752,37013,67972,1223,47658,4461,92799,88859], () => (__webpack_exec__(79918))); module.exports = __webpack_exports__; })(); //# sourceMappingURL=profile.js.map