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","\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/\",\n function () {\n return require(\"private-next-pages/index.tsx\");\n }\n ]);\n "],"names":["FeatureCard","icon","description","borderWidth","borderStyle","borderColor","flexDirection","justifyContent","alignItems","width","maxWidth","height","my","as","fontWeight","fontSize","textAlign","HomePageBanner","children","backgroundColor","paddingLeft","padding","color","marginBottom","alignSelf","marginTop","backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","Section1","pb","background","mt","px","mb","variant","src","alt","ml","mr","text","id","bg","textProps","onClick","router","Section2","href","target","className","border","borderRadius","marginLeft","Section3","setIsPlanBundled","handleSelectPlan","PlanTypes","margin","style","textDecoration","useRouter","useEnrollmentContext","setSelectedPlan","setAffiliate","useState","isModalVisible","setIsModalVisible","modalBody","setModalBody","useEffect","process","plan","push","query","test","prefetch","affiliate","alignContent","PageContent","m","p","showApplyModal","Modal","showModal","setShowModal","body","canClose","successButtonText","successClick","props","clearEnrollmentState","useEnrollmentApi","clearState","sessionTimeout","pathname","showSessionModal","setShowSessionModal","useSessionTimer","mx","header","noop","bodyNote","successLink","showSuccessButton","handleCloseModal","e","stopPropagation","name","size","pt","passHref","beforeUnloadListener","event","preventDefault","returnValue","FIFTEEN_MINUTES_IN_MILLIS","getInactivityTimeout","INACTIVITY_TIMEOUT","timeoutCallback","disableTokenVerification","inactivityTimeout","disabled","getAccessToken","addEventListener","capture","err","console","log","tokenError","setAccessToken","removeEventListener","useTokenVerification","sessionTimeoutHandler","setSessionId","route","undefined","shallow","useIdleTimer","timeout","onIdle","debounce","window","__NEXT_P"],"sourceRoot":""}