>\n canClose?: boolean\n successButtonText?: string\n closeButtonText?: string\n successLink?: string\n successClick?: () => void\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 } = props\n\n const handleCloseModal = () => setShowModal(false)\n\n return (\n <>\n {showModal ? (\n <>\n \n e.stopPropagation()}\n mx={[6, null]}\n >\n {/* header */}\n \n {header && (\n \n {header}\n \n )}\n \n {body}\n \n {bodyNote && (\n \n {bodyNote}\n \n )}\n \n \n {successLink ? (\n \n \n \n ) : (\n \n )}\n \n \n
\n \n >\n ) : null}\n >\n )\n}\n","import React from 'react'\n\nexport default function Spinner() {\n return (\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","\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/mfa/verify\",\n function () {\n return require(\"private-next-pages/mfa/verify.tsx\");\n }\n ]);\n "],"names":["MFA_VALIDATION","INCOMPLETE","MIN_LENGTH","INCORRECT_CODE","defaultValues","channel","ContactMethod","channelSchema","object","string","required","verificationCodeSchema","verificationCode","test","value","length","router","useRouter","updateState","useEnrollmentApi","useForm","mode","resolver","yupResolver","register","handleSubmit","watch","formState","errors","verificationCodeForm","query","enrollmentId","nextRoute","useState","isLoading","setIsLoading","availableMFAChannels","setAvailableMFAChannels","token","setToken","canVerify","setCanVerify","mfaAuthApi","xCLEARCorrelationInfo","getXCLEARCorrelationInfo","toString","mfaChallenge","console","log","mfaVerify","pass","mfa","setAccessToken","jwt","enrollmentApi","enrollment","push","pathname","status","setError","message","useEffect","channels","getMFAChannels","title","description","color","mb","p","as","variant","fontSize","my","textAlign","mx","name","label","maxLength","error","containerProps","width","justifyContent","text","icon","onClick","disabled","isValid","global","onSubmit","options","map","availableChannel","toUpperCase","slice","toLowerCase","selected","isDirty","aboveMobile","theme","BackButton","props","isAboveMobile","useMedia","minWidth","textProps","display","size","iconPosition","ContinueButton","id","undefined","type","Form","flexDirection","Row","alignItems","Actions","mt","StepTitle","StepSubTitle","ErrorMessage","React","ref","children","displayName","PageHeading","__css","textTransform","CardHeading","FormSectionHeading","clearEnrollmentState","clearState","sessionTimeout","showSessionModal","setShowSessionModal","useSessionTimer","px","showModal","setShowModal","header","body","successButtonText","successClick","canClose","noop","Modal","bodyNote","successLink","className","backgroundColor","e","stopPropagation","pb","href","passHref","Spinner","beforeUnloadListener","event","preventDefault","returnValue","FIFTEEN_MINUTES_IN_MILLIS","getInactivityTimeout","INACTIVITY_TIMEOUT","timeoutCallback","disableTokenVerification","inactivityTimeout","getAccessToken","addEventListener","capture","err","tokenError","removeEventListener","useTokenVerification","sessionTimeoutHandler","setSessionId","route","shallow","useIdleTimer","timeout","onIdle","debounce","window","__NEXT_P"],"sourceRoot":""}