{"version":3,"sources":["webpack://_N_E/./src/components/ui/section-wrapper.tsx","webpack://_N_E/./src/components/ui/text-button.tsx","webpack://_N_E/./src/components/auth-form/auth-form.styles.ts","webpack://_N_E/./src/components/ui/section.tsx","webpack://_N_E/./src/pages/users/password-reset.tsx","webpack://_N_E/./src/styles/theme-dark.ts","webpack://_N_E/./src/components/switch-theme/switch-theme.tsx","webpack://_N_E/./src/components/ui/content-section.tsx","webpack://_N_E/./node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?6279"],"names":["SectionWrapper","styled","div","noPadding","rem","theme","mediaQueries","medium","large","TextButton","button","colors","palette","black","redDark","Form","form","StyledButton","FormWrapper","white","borderRadius","PasswordInfo","color","GlobalError","IntroWrapper","Section","section","textAlign","css","components","background","defaultProps","schema","yup","shape","email","required","defined","PasswordReset","router","useRouter","useAuth","loading","resetPassword","isAuthenticated","isAnonymous","useForm","mode","resolver","yupResolver","register","handleSubmit","setError","errors","formState","reset","isSubmitting","isSubmitSuccessful","touched","emailRef","useRef","onSubmit","a","globalError","data","type","message","useEffect","replace","APP_ROUTES","account","then","scrollToTop","mainBackground","backgroundImages","hero","title","description","as","noValidate","role","name","aria-live","label","id","autoComplete","aria-invalid","disabled","ref","input","current","href","users","signIn","signUp","passHref","variant","default","dark","secondary","greyLight","transparent","border","text","download","heading","fontSize","space","zIndex","SwitchTheme","props","currentTheme","to","themeDark","themeLight","children","StyledSection","wrapperBg","StyledSectionWrapper","BackLinkWrapper","ContentSection","className","backLink","ReminderContent","window","__NEXT_P","push"],"mappings":"2GAAA,kDAOaA,EAPb,UAO8BC,EAAOC,IAAV,qFAAGD,CAAH,4IACZ,qBAAGE,UAA6B,EAAIC,YAAI,OAMnD,qBAAGC,MAAkBC,aAAaC,UACrB,qBAAGJ,UAA6B,EAAIC,YAAI,OAGrD,qBAAGC,MAAkBC,aAAaE,SACrB,qBAAGL,UAA6B,KAAH,OAAQC,YAAI,MAASA,YAAI,S,oCCnBvE,sCAEaK,EAFb,UA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AGpDN,EAAY9E,aAAe,CACzBiF,GAAI,SAOSH,S,8JC1BTO,EAAgBnH,YAAOwB,KAAV,qFAAGxB,CAAH,oFAGN,qBAAGoH,UAA6B,GAAH,OAAMjH,YAAI,IAAV,YAAiBA,YAAI,KAAQ,KAIjEkH,EAAuBrH,YAAOD,KAAV,4FAAGC,CAAH,4DACJ,gBAAGoH,EAAH,EAAGA,UAAWhH,EAAd,EAAcA,MAAd,OAClBgH,EAAYhH,EAAMM,OAAOC,QAAQO,MAAQ,iBAC1B,qBAAGd,MAAkBe,aAAab,UACrC,qBAAG8G,UACH,gCAAkC,UAG5CE,EAAkBtH,YAAOD,KAAV,uFAAGC,CAAH,0CACNG,YAAI,IAAOA,YAAI,KAaxBoH,EAA4B,SAAC,GAM7B,IALJL,EAKI,EALJA,SACAE,EAII,EAJJA,UACA1F,EAGI,EAHJA,UACA8F,EAEI,EAFJA,UACAC,EACI,EADJA,SAEA,OACE,cAAC,IAAD,CAAaV,GAAIK,EAAY,OAAS,QAAtC,SACE,eAACD,EAAD,CACEzF,UAAWA,EACX8F,UAAWA,EACXJ,UAAWA,EAHb,UAKGK,GACC,cAACH,EAAD,UACE,cAAC,IAAD,CAAU5B,KAAM+B,EAAhB,oBAGJ,cAACJ,EAAD,CAAsBD,UAAWA,EAAjC,SACGF,UAOIK,MAER,IAAMG,EAAkB1H,YAAOuH,GAAV,uFAAGvH,CAAH,uFAEVG,YAAI,GACLA,YAAI,IAGjBkH,GACS,qBAAGjH,MAAkBM,OAAOC,QAAQC,U,sBCxE1C+G,OAAOC,SAAWD,OAAOC,UAAY,IAAIC,KAAK,CAC7C,wBACA,WACE,OAAO,EAAQ,a","file":"static/chunks/pages/users/password-reset-6185def19a597439ee01.js","sourcesContent":["import { rem } from 'polished';\nimport styled from 'styled-components';\n\ninterface WrapperProps {\n noPadding?: boolean;\n}\n\nexport const SectionWrapper = styled.div`\n --padding: ${({ noPadding }) => (noPadding ? 0 : rem(32))};\n\n max-width: calc(640px + (var(--padding) * 2));\n margin: 0 auto;\n padding: var(--padding);\n\n ${({ theme }) => theme.mediaQueries.medium} {\n --padding: ${({ noPadding }) => (noPadding ? 0 : rem(60))};\n }\n\n ${({ theme }) => theme.mediaQueries.large} {\n --padding: ${({ noPadding }) => (noPadding ? `0 ${rem(100)}` : rem(100))};\n }\n`;\n","import styled from 'styled-components';\n\nexport const TextButton = styled.button`\n display: inline-block;\n color: ${({ theme }) => theme.colors.palette.black};\n font-weight: bold;\n text-align: center;\n text-decoration: underline;\n background: none;\n border: 0;\n cursor: pointer;\n\n &:hover {\n color: ${({ theme }) => theme.colors.palette.redDark};\n }\n`;\n","import { StyledButton } from 'components/button';\nimport { TextButton } from 'components/ui/text-button';\nimport { rem } from 'polished';\nimport styled, { Theme } from 'styled-components';\n\nexport const Form = styled.form`\n max-width: ${rem(460)};\n margin: 0 auto;\n\n ${StyledButton}, ${TextButton} {\n display: flex;\n width: 100%;\n max-width: ${rem(250)};\n margin: 0 auto;\n margin-top: ${rem(10)};\n }\n\n ${TextButton} {\n display: block;\n margin: ${rem(30)} auto;\n }\n\n a:not(${StyledButton}) {\n color: inherit;\n }\n\n p {\n margin: ${rem(32)} 0;\n }\n`;\n\nexport const FormWrapper = styled.div`\n margin: ${rem(32)} 0;\n padding: ${rem(32)};\n color: ${({ theme }) => theme.colors.palette.black};\n background-color: ${({ theme }) => theme.colors.palette.white};\n border: 0;\n border-radius: ${({ theme }) => theme.borderRadius.medium};\n\n ${({ theme }) => theme.mediaQueries.medium} {\n padding: ${rem(62)};\n }\n`;\n\nexport const PasswordInfo = styled.div`\n margin-top: ${rem(8)};\n color: ${({ theme, color }) =>\n color ? theme.colors.palette[color] : theme.colors.palette.black};\n font-size: ${rem(14)};\n line-height: 1.4;\n text-align: left;\n`;\n\ninterface GlobalErrorProps {\n color?: keyof Theme['colors']['palette'];\n}\n\nexport const GlobalError = styled.div`\n color: ${({ theme, color }) =>\n color ? theme.colors.palette[color] : theme.colors.palette.redDark};\n font-weight: bold;\n text-align: left;\n\n &:not(:empty) {\n margin-bottom: ${rem(20)};\n }\n`;\n\nexport const IntroWrapper = styled.div`\n max-width: ${rem(360)};\n margin: 0 auto;\n`;\n","import styled, { css } from 'styled-components';\n\nexport interface SectionProps {\n textAlign?: 'center' | 'left' | 'right';\n}\n\nexport const Section = styled.section`\n ${({ textAlign, theme }) => css`\n text-align: ${textAlign};\n background-color: ${theme.components.section.background};\n `}\n`;\n\nSection.defaultProps = {\n textAlign: 'left',\n};\n","import { ErrorMessage } from '@hookform/error-message';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport {\n Form,\n FormWrapper,\n GlobalError,\n} from 'components/auth-form/auth-form.styles';\nimport Button from 'components/button';\nimport { H4 } from 'components/headings';\nimport Layout from 'components/layout';\nimport SEO from 'components/seo';\nimport TextInput from 'components/text-input';\nimport ContentSection from 'components/ui/content-section';\nimport useAuth from 'hooks/use-auth';\nimport { GetStaticProps, NextPage } from 'next';\nimport Link from 'next/link';\nimport { useRouter } from 'next/router';\nimport React, { useEffect, useRef } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { backgroundImages } from 'utils/config';\nimport { scrollToTop } from 'utils/helpers';\nimport APP_ROUTES from 'utils/routes';\nimport * as yup from 'yup';\n\nconst PAGE_TITLE = 'Forgot Your Login Details?';\nconst PAGE_DESCRIPTION = 'Retrieve your login details or reset your password.';\n\n// Define a schema for form validation\nconst schema = yup\n .object()\n .shape({\n email: yup\n .string()\n .email(`Invalid email.`)\n .required('Please provide your email.'),\n })\n .defined();\n\ntype FormData = {\n email: string;\n globalError: string;\n};\n\nconst PasswordReset: NextPage = () => {\n const router = useRouter();\n const { loading, resetPassword, isAuthenticated, isAnonymous } = useAuth();\n const { register, handleSubmit, setError, errors, formState, reset } =\n useForm({\n mode: 'onBlur',\n resolver: yupResolver(schema),\n });\n const { isSubmitting, isSubmitSuccessful, touched } = formState;\n const emailRef = useRef(null);\n\n const onSubmit = handleSubmit(async ({ globalError, ...data }) => {\n try {\n await resetPassword(data.email);\n reset();\n } catch (error) {\n setError('globalError', {\n type: 'manual',\n message: error.message,\n });\n }\n });\n\n useEffect(() => {\n // Redirect authenticated users to the account page instead of showing the password reset form.\n if (isAuthenticated && !isAnonymous && !loading) {\n router.replace(APP_ROUTES.account).then(scrollToTop);\n }\n }, [loading, isAuthenticated, isAnonymous, router]);\n\n return (\n \n \n \n

Forgot your login details?

\n

\n Enter your email address below and we will send you instructions on\n how to reset your password.\n

\n
\n \n
\n \n
\n {isSubmitSuccessful && (\n \n If you have a registered email, you will receive a link to reset\n your password.\n \n )}\n\n {\n emailRef.current = input;\n register(input);\n }}\n errors={errors}\n />\n
\n\n \n\n

\n Remembered your password?{' '}\n \n Login\n \n

\n\n

\n No account?{' '}\n \n \n \n

\n
\n
\n
\n );\n};\n\nexport const getStaticProps: GetStaticProps = async () => {\n return {\n props: {},\n };\n};\n\nexport default PasswordReset;\n","import borderRadius from './border-radius';\nimport colors from './colors';\nimport fontSize from './font-size';\nimport mediaQueries from './media-queries';\nimport space from './spacing';\nimport zIndex from './z-index';\n\nexport default {\n borderRadius,\n colors: { ...colors },\n components: {\n button: {\n background: {\n default: colors.palette.redDark,\n dark: colors.palette.black,\n secondary: colors.palette.greyLight,\n transparent: 'transparent',\n },\n border: {\n default: colors.palette.redDark,\n dark: colors.palette.white,\n secondary: colors.palette.greyLight,\n transparent: 'transparent',\n },\n text: {\n default: colors.palette.white,\n dark: colors.palette.white,\n secondary: colors.palette.black,\n transparent: colors.palette.black,\n },\n },\n download: {\n text: colors.palette.white,\n background: colors.palette.black,\n },\n text: {\n text: colors.palette.white,\n },\n heading: {\n text: colors.palette.white,\n },\n section: {\n background: colors.palette.black,\n },\n },\n fontSize,\n space,\n mediaQueries,\n zIndex,\n};\n","import PropTypes from 'prop-types';\nimport React, { FC } from 'react';\nimport { ThemeProvider } from 'styled-components';\nimport themeDark from 'styles/theme-dark';\nimport themeLight from 'styles/theme-light';\n\ninterface Props {\n to?: 'light' | 'dark';\n}\n\nconst SwitchTheme: FC = (props) => {\n let currentTheme;\n\n if (props.to === 'dark') {\n currentTheme = {\n ...themeDark,\n };\n } else {\n currentTheme = {\n ...themeLight,\n };\n }\n\n return {props.children};\n};\n\nSwitchTheme.defaultProps = {\n to: 'light',\n};\n\nSwitchTheme.propTypes = {\n to: PropTypes.oneOf(['light', 'dark']),\n};\n\nexport default SwitchTheme;\n","import BackLink from 'components/back-link';\nimport SwitchTheme from 'components/switch-theme';\nimport { rem } from 'polished';\nimport { FC } from 'react';\nimport styled from 'styled-components';\nimport { Section, SectionProps } from './section';\nimport { SectionWrapper } from './section-wrapper';\n\nconst StyledSection = styled(Section)<{ wrapperBg?: boolean }>`\n position: relative;\n margin-top: var(--header-height);\n padding: ${({ wrapperBg }) => (wrapperBg ? `${rem(10)} ${rem(30)}` : 0)};\n background: none;\n`;\n\nconst StyledSectionWrapper = styled(SectionWrapper)`\n background-color: ${({ wrapperBg, theme }) =>\n wrapperBg ? theme.colors.palette.white : 'transparent'};\n border-radius: ${({ theme }) => theme.borderRadius.medium};\n box-shadow: ${({ wrapperBg }) =>\n wrapperBg ? '0 4px 45px rgba(0, 0, 0, 0.8)' : 'none'};\n`;\n\nconst BackLinkWrapper = styled(SectionWrapper)`\n padding: 0 ${rem(10)} ${rem(20)};\n\n a {\n margin-bottom: 0;\n }\n`;\n\ninterface Props extends SectionProps {\n wrapperBg?: boolean;\n className?: string;\n backLink?: string;\n}\n\nconst ContentSection: FC = ({\n children,\n wrapperBg,\n textAlign,\n className,\n backLink,\n}) => {\n return (\n \n \n {backLink && (\n \n Back\n \n )}\n \n {children}\n \n \n \n );\n};\n\nexport default ContentSection;\n\nexport const ReminderContent = styled(ContentSection)`\n time {\n margin: 0 0 ${rem(5)};\n font-size: ${rem(14)};\n }\n\n ${StyledSectionWrapper} {\n color: ${({ theme }) => theme.colors.palette.black};\n\n > *:last-child {\n margin-bottom: 0;\n }\n }\n`;\n","\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/users/password-reset\",\n function () {\n return require(\"private-next-pages/users/password-reset.tsx\");\n }\n ]);\n "],"sourceRoot":""}