= (props) => (\n \n)\n\nexport const StepTitle: React.FC = (props) => (\n \n)\n\nexport const StepSubTitle: React.FC = (props) => (\n \n)\n\nexport const ErrorMessage = React.forwardRef(\n ({ children, ...props }, ref) => (\n \n Error: {children}\n \n )\n)\n\nErrorMessage.displayName = 'ErrorMessage'\n","import React, { useState, useEffect } from 'react'\nimport { useRouter } from 'next/router'\nimport { Box, BoxProps } from '@clear/design-system'\nimport { Modal } from '@components/shared/Modal'\nimport useEnrollmentApi from '@hooks/useEnrollmentApi'\nimport { useSessionTimer } from '@hooks/useSessionTimer'\n\ntype PageContentProps = BoxProps\nconst PageContent: React.FC = ({ ...props }) => {\n const { clearState: clearEnrollmentState } = useEnrollmentApi()\n const router = useRouter()\n const sessionTimeout =\n (router && router.query && router.query.sessionTimeout) || ''\n const pathname = (router && router.pathname) || ''\n const [showSessionModal, setShowSessionModal] = useState(false)\n\n const successClickFunction = () => {\n router.push('/')\n }\n\n useEffect(() => {\n const shouldShowModal = sessionTimeout === 'true' && pathname !== '/'\n if (shouldShowModal) {\n setShowSessionModal(true)\n }\n }, [pathname, sessionTimeout])\n\n useSessionTimer(clearEnrollmentState)\n\n return (\n \n \n \n \n )\n}\n\nexport default PageContent\n","import React, { SetStateAction, ReactNode } from 'react'\nimport { Flex, Text, Button, SVG } from '@clear/design-system'\nimport { ColorType } from '@clear/design-system/lib/theme/colors'\nimport Link from 'next/link'\n\nexport interface ModalProps {\n header?: string\n body: string | ReactNode\n bodyNote?: string\n showModal: boolean\n setShowModal: React.Dispatch>\n canClose?: boolean\n successButtonText?: string\n closeButtonText?: string\n successLink?: string\n successClick?: () => void\n showSuccessButton?: boolean\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => {}\n\nexport function Modal(props: ModalProps) {\n const {\n header,\n body,\n bodyNote,\n showModal,\n setShowModal,\n canClose,\n successButtonText = 'success',\n successLink,\n successClick,\n showSuccessButton = true,\n } = props\n\n const handleCloseModal = () => setShowModal(false)\n\n return (\n <>\n {showModal ? (\n <>\n \n
e.stopPropagation()}\n mx={[6, null]}\n >\n {canClose && !showSuccessButton && (\n \n
\n )}\n {/* header */}\n \n {header && (\n \n {header}\n \n )}\n \n {body}\n \n {bodyNote && (\n \n {bodyNote}\n \n )}\n \n {showSuccessButton && (\n \n {successLink ? (\n \n \n )}\n \n \n \n \n ) : null}\n \n )\n}\n","import { useRouter } from 'next/router'\nimport { useEffect } from 'react'\nimport { getAccessToken, setAccessToken } from '@api/utils'\n\nconst beforeUnloadListener = (event: any) => {\n event.preventDefault()\n return (event.returnValue = 'Are you sure you want to exit?')\n}\n\nexport function useTokenVerification(disabled = false) {\n const router = useRouter()\n\n useEffect(() => {\n if (!disabled) {\n try {\n const token = getAccessToken()\n if (token) {\n addEventListener('beforeunload', beforeUnloadListener, {\n capture: true,\n })\n }\n } catch (err) {\n console.log({ tokenError: err })\n setAccessToken('')\n router.push('/')\n }\n return () => {\n removeEventListener('beforeunload', beforeUnloadListener, {\n capture: true,\n })\n }\n }\n }, [router, disabled])\n}\n","import { useRouter } from 'next/router'\nimport { useIdleTimer } from 'react-idle-timer'\nimport { useTokenVerification } from './useTokenVerification'\nimport { setAccessToken, setSessionId } from '@api/utils'\n\nconst FIFTEEN_MINUTES_IN_MILLIS = 1000 * 60 * 15\n\nexport const getInactivityTimeout = (\n INACTIVITY_TIMEOUT = FIFTEEN_MINUTES_IN_MILLIS\n) => INACTIVITY_TIMEOUT\n\nexport function useSessionTimer(\n timeoutCallback?: () => void,\n disableTokenVerification?: boolean,\n inactivityTimeout?: number\n) {\n const router = useRouter()\n\n useTokenVerification(disableTokenVerification)\n\n const sessionTimeoutHandler = async () => {\n timeoutCallback && timeoutCallback()\n // Sign out of cognito\n setAccessToken('')\n setSessionId('')\n await router.push(\n {\n pathname: router.route,\n query: { sessionTimeout: 'true' },\n },\n undefined,\n { shallow: true }\n )\n }\n\n const idleTimerFunctions = useIdleTimer({\n timeout: getInactivityTimeout(inactivityTimeout),\n onIdle: sessionTimeoutHandler,\n debounce: 500,\n })\n\n return {\n ...idleTimerFunctions,\n sessionTimeoutHandler,\n }\n}\n","export const enrollSteps = [\n {\n name: 'You',\n },\n {\n name: 'Contact',\n },\n {\n name: 'Eligibility',\n },\n {\n name: 'Enroll',\n },\n {\n name: 'Complete',\n },\n]\n\nexport const renewalSteps = [\n {\n name: 'Eligibility',\n },\n {\n name: 'Contact',\n },\n {\n name: 'History',\n },\n {\n name: 'Verify',\n },\n {\n name: 'Pay',\n },\n {\n name: 'Complete',\n },\n]\n","\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/auth\",\n function () {\n return require(\"private-next-pages/auth.tsx\");\n }\n ]);\n "],"names":["FormSteps","router","useRouter","authenticationClient","useAuthenticationApi","client","useEnrollmentContext","setBiographicAuthInfo","biographicAuthInfo","useState","verificationFormData","setVerificationFormData","useForm","resolver","yupResolver","authSchema","mode","register","handleSubmit","formState","CONTACT","step","setStep","errors","isValid","otpFailureMessage","setOtpFailureMessage","isAuthed","setIsAuthed","isLoading","setIsLoading","onSubmitContact","formData","phoneNumber","email","xCLEARCorrelationInfo","getXCLEARCorrelationInfo","baseMetaData","kpi","KPI","url","route","formatedPhoneNumber","dispatchCustomEvent","EnrollmentClient","payload","message","metadata","event","DiscreteEvent","initiateAuth","otpForm","emailAddress","response","otpSessionId","VERIFICATION","stack","otpChallenge","otpCode","verificationCode","query","desiredPath","push","pathname","BIOGRAPHICS","countryOfBirth","dob","firstName","lastName","middleName","signIn","signInRequest","biographics","noMiddleName","id","token","setAccessToken","setSessionId","useEffect","enrollmentId","territoryId","includes","redirectToDesiredPath","current","percent","steps","enrollSteps","headTitle","showSuffix","onSubmitByBiographic","sx","width","marginLeft","marginRight","border","borderRadius","padding","onSubmit","className","as","minWidth","src","alt","color","fontWeight","fontSize","placeholder","error","containerProps","flexDirection","name","disabled","value","text","variant","target","href","marginY","type","Boolean","Object","keys","length","height","Form","props","Row","alignItems","mx","Actions","mt","justifyContent","StepTitle","textAlign","mb","StepSubTitle","my","ErrorMessage","React","ref","children","displayName","clearEnrollmentState","useEnrollmentApi","clearState","sessionTimeout","showSessionModal","setShowSessionModal","useSessionTimer","px","showModal","setShowModal","header","body","successButtonText","successClick","canClose","noop","Modal","bodyNote","successLink","showSuccessButton","handleCloseModal","onClick","p","backgroundColor","e","stopPropagation","size","pt","passHref","textProps","beforeUnloadListener","preventDefault","returnValue","FIFTEEN_MINUTES_IN_MILLIS","getInactivityTimeout","INACTIVITY_TIMEOUT","timeoutCallback","disableTokenVerification","inactivityTimeout","getAccessToken","addEventListener","capture","err","console","log","tokenError","removeEventListener","useTokenVerification","sessionTimeoutHandler","undefined","shallow","useIdleTimer","timeout","onIdle","debounce","renewalSteps","window","__NEXT_P"],"sourceRoot":""}