{"version":3,"sources":["utils/catchOnly.ts","components/form/withOptional.ts","utils/validations.ts","utils/isPresent.ts","state/tenant.ts","serviceWorker.ts","state/timeouts.ts","state/index.ts","store/configureStore.ts","features/Header.tsx","features/Home/useStartPageName.ts","features/Home/Home.tsx","features/Home/index.ts","features/Home/LoyaltyNumberError.tsx","features/AppExpired/styles.ts","features/AppExpired/AppExpiredView.tsx","features/AppExpired/index.ts","features/AppExpired/AppExpired.tsx","features/DspExpired/styles.ts","features/DspExpired/DspExpiredView.tsx","features/DspExpired/index.ts","features/DspExpired/DspExpired.tsx","features/prescreen/BatchPrescreenStart/Expired/styles.ts","features/prescreen/BatchPrescreenStart/Expired/ExpiredView.tsx","features/prescreen/BatchPrescreenStart/Expired/index.ts","features/prescreen/BatchPrescreenStart/Expired/Expired.tsx","features/prescreen/BatchPrescreenStart/Error/styles.ts","features/prescreen/BatchPrescreenStart/Error/ErrorView.tsx","features/prescreen/BatchPrescreenStart/Error/index.ts","features/prescreen/BatchPrescreenStart/Error/Error.tsx","features/prequal/PrequalOfferPush/Error/styles.ts","features/prequal/PrequalOfferPush/Error/ErrorView.tsx","features/prequal/PrequalOfferPush/Error/index.tsx","features/prequal/PrequalOfferPush/Error/Error.tsx","features/prequal/PrequalOfferPush/Expired/styles.ts","features/prequal/PrequalOfferPush/Expired/ExpiredView.tsx","features/prequal/PrequalOfferPush/Expired/index.ts","features/prequal/PrequalOfferPush/Expired/Expired.tsx","features/DriverLicense/DriverLicenseHome/DriverLicenseHome.tsx","features/DriverLicense/DriverLicenseHome/index.ts","features/ExistingAccount/ValidationError.tsx","components/SnackbarProvider/styles.ts","components/SnackbarProvider/index.ts","components/SnackbarProvider/SnackbarProvider.tsx","hooks/useIdleTimer.ts","features/TimeoutModal/AppTimeoutModalView.tsx","features/TimeoutModal/useWarning.ts","features/TimeoutModal/AppTimeoutModal.tsx","features/TimeoutModal/DspTimeoutModalView.tsx","features/TimeoutModal/DspTimeoutModal.tsx","utils/nest.tsx","routes/WrappedRoute.tsx","routes/EntryProtectedRoute.tsx","components/ErrorBoundary/styles.ts","components/ErrorBoundary/ErrorBoundary.tsx","components/UnloadPrompt/index.ts","components/UnloadPrompt/UnloadPrompt.tsx","hooks/useHeightObserver.ts","features/EmbeddedBackButton/index.ts","features/EmbeddedBackButton/EmbeddedBackButton.tsx","components/ApplicationLayout/index.ts","components/ApplicationLayout/ApplicationLayout.tsx","routes/ApplicationRoute.tsx","App.tsx","utils/i18n.ts","index.tsx","utils/canUseDOM.ts","hooks/useAnalyticVariables.tsx","components/Link/styles.ts","components/Link/Link.tsx","components/Link/index.ts","features/Theme/mixins.ts","state/resetApplication.ts","features/ReusableConsumerSearch/ConsumerSearchContext.ts","components/LoadingScreen.tsx","state/otpCode.ts","hooks/requests/otpSender.ts","hooks/useFetchApi.ts","state/prequalOffer.ts","features/Theme/ThemeProvider.tsx","features/Theme/theme.ts","features/Theme/composeStyles.ts","features/Theme/index.ts","utils/dateUtils.ts","state/consumerSearch.tsx","components/Redirect/Redirect.tsx","components/Redirect/index.ts","state/sessionToken.ts","components/FmcForm/FmcForm.tsx","components/FmcForm/index.tsx","state/prescreen.ts","hooks/useIovation.tsx","state/creditApplication.ts","state/driversLicense.ts","features/SkipPrefillButton/SkipPrefillButton.tsx","features/SkipPrefillButton/index.tsx","features/CardChoice/index.tsx","features/ProductChoice/index.tsx","hooks/useAnalytics.tsx","features/prequal/PrequalOfferApplication/index.tsx","state/analytics.ts","hooks/useLoadInitialData.ts","features/IovationButton/IovationButton.tsx","features/IovationButton/index.ts","components/SimpleMessagePage/styles.ts","components/SimpleMessagePage/SimpleMessagePage.tsx","components/SimpleMessagePage/index.ts","features/Logo/styles.tsx","features/Logo/Logo.tsx","hooks/useTranslate/index.ts","hooks/useQueryParameters.ts","state/enhancedCheckout.ts","features/CreditApplication/index.tsx","hooks/useUAParser.tsx","hooks/useFetch.ts","features/ResetApplicationRoute/ResetApplicationRoute.tsx","features/ResetApplicationRoute/index.ts","components/Checkbox/Checkbox.tsx","components/Checkbox/index.ts","features/DriverLicense/DriverLicenseStart/index.tsx","features/ConsumerSearch/ConsumerSearch.tsx","features/ReusableConsumerSearch/styles.ts","features/ReusableConsumerSearch/LookupFormView.tsx","state/authenticityToken.ts","state/iovation.ts","hooks/useWorkflow/Workflow.ts","hooks/useWorkflow/membershipValidationWorkflow.ts","hooks/useWorkflow/prequalOfferPush.ts","hooks/useWorkflow/prequalPhoneLookupWorkflow.ts","hooks/useWorkflow/prequalTokenLookupWorkflow.ts","hooks/useWorkflow/batchPrescreenWorkflow.ts","hooks/useWorkflow/dspPushWorkflow.ts","hooks/useWorkflow/enhancedCheckoutWorkflow.ts","hooks/useWorkflow/fmcWorkflow.ts","hooks/useWorkflow/icDriverLicenseWorkflow.ts","hooks/useWorkflow/prequalDriverLicenseWorkflow.ts","hooks/useWorkflow/prescreenWorkflow.ts","hooks/useWorkflow/workflowHelpers.ts","hooks/useWorkflow/useWorkflow.ts","hooks/useWorkflow/index.ts","features/ConsumerSearch/index.tsx","hooks/requests/consumerSearch.ts","hooks/useTimeout.ts","hooks/useTranslate/overrides.ts","hooks/useTranslate/useTranslate.tsx","components/TextField/MaskedInput.tsx","components/TextField/styles.ts","components/TextField/TextField.tsx","components/TextField/FormTextField.tsx","components/TextField/Popover.tsx","hooks/requests/offerMade.ts","features/enhancedCheckout/ConsumerSearch/index.tsx","hooks/useFeature.ts","features/prequal/ConsumerSearch/index.tsx","hooks/requests/fetchUtils.ts","components/Stepper/styles.ts","components/Stepper/index.tsx","components/Stepper/Stepper.tsx","features/ApplicationProgress/styles.ts","features/ApplicationProgress/ApplicationProgress.tsx","features/ApplicationProgress/index.tsx","hooks/requests/handleExistingAccount.ts","components/form/AddressFields.tsx","components/form/AdditionalFields.tsx","components/form/MobileField.tsx","components/form/AlternateMobileField.tsx","components/form/AnnualIncomeField.tsx","components/form/IntendedPurchaseAmountField.tsx","components/form/OptInOut/styles.ts","components/form/OptInOut/index.ts","components/form/OptInOut/OptInOut.tsx","components/form/StudentApplication/styles.ts","components/form/StudentApplication/index.ts","components/form/StudentApplication/StudentApplication.tsx","features/DisclosureBox/styles.ts","features/DisclosureBox/DisclosureBox.tsx","features/DisclosureBox/index.ts","features/EmbeddedContinueButton/EmbeddedContinueButton.tsx","features/EmbeddedContinueButton/index.tsx","features/ReusableConsumerSearch/PhoneLookup/LookupForm/index.tsx","features/ReusableConsumerSearch/PhoneLookup/LookupForm/LookupForm.tsx","features/ReusableConsumerSearch/OtpVerification/styles.ts","features/ReusableConsumerSearch/OtpVerification/OtpVerificationView.tsx","hooks/requests/otpVerification.ts","features/ReusableConsumerSearch/OtpVerification/OtpVerification.tsx","features/ReusableConsumerSearch/OtpVerification/index.tsx","features/ReusableConsumerSearch/PhoneLookup/index.tsx","features/ReusableConsumerSearch/PhoneLookup/PhoneLookup.tsx","features/ReusableConsumerSearch/PhoneValidation/LookupForm/index.tsx","features/ReusableConsumerSearch/PhoneValidation/LookupForm/LookupForm.tsx","features/ReusableConsumerSearch/PhoneValidation/index.tsx","features/ReusableConsumerSearch/PhoneValidation/PhoneValidation.tsx","features/ReusableConsumerSearch/ReusableConsumerSearch.tsx","features/ReusableConsumerSearch/index.tsx","features/CompletionIcon.tsx","features/ReviewTerms/index.tsx","components/form/SsnField.tsx","components/form/LoyaltyNumberField.tsx","components/Button/styles.ts","components/Button/Button.tsx","components/Button/index.ts","state/storeLocations.ts","state/membershipValidation.tsx","components/PageContainer/styles.ts","components/PageContainer/PageContainer.tsx","components/PageContainer/index.ts","hooks/requests/addressAutocomplete.ts","features/CancelButton/CancelButton.tsx","features/CancelButton/index.tsx","components/Autocomplete/styles.ts","components/Autocomplete/Autocomplete.tsx","components/Autocomplete/index.ts","features/MembershipValidation/index.tsx","features/ClerkMode/index.tsx","hooks/useResponsiveQuery.tsx","features/AddOns/index.tsx","features/prescreen/PrescreenOffer/index.tsx","features/prescreen/BatchPrescreenStart/index.tsx","features/prescreen/FallbackReviewTerms/index.tsx","features/prescreen/FallbackApplication/index.tsx","features/prequal/FallbackApplication/index.tsx","features/prequal/Decline/index.tsx","features/prequal/PrequalOffer/index.tsx","features/prequal/PrequalOfferPush/index.tsx","features/prequal/PrequalOfferPushApplication/index.tsx","features/prequal/FallbackReviewTerms/index.tsx","features/ReusableConsumerSearch/TokenLookup/index.tsx","features/DriverLicense/DriverLicenseError/index.tsx","features/DriverLicense/ScanPage/index.tsx","features/prequal/PrequalDriverLicenseHome/index.tsx","features/CreditPending/index.tsx","features/ExistingAccount/index.tsx","features/CreditError/index.tsx","features/DspStart/index.tsx","features/DspError/index.tsx","features/DspRetrieval/index.tsx","features/Approval/index.tsx","utils/masks.ts","components/ActionButtonsContainer/styles.ts","components/ActionButtonsContainer/ActionButtonContainer.tsx","components/ActionButtonsContainer/index.ts","hooks/useFmcHost.tsx","hooks/useFieldCustomization.ts","window.ts","hooks/useNavigationHelpers.ts","state/instantCredit.ts"],"names":["catchOnly","error","AbortError","isAborted","errorClasses","match","find","klass","undefined","log","name","withOptional","str","required","isName","Yup","test","value","isNotPoBox","isState","transform","toUpperCase","oneOf","map","prop","states","isNotRestrictedState","tenant","errorMessage","concat","exclusive","message","restrictedStates","indexOf","isZipCode","matches","excludeEmptyString","notOneOf","isBeforeToday","isValid","parseDoB","parsed","isBefore","startOfDay","Date","isBornAfter","year","date","subDays","isAfter","hasValidAge","loyaltyNumber","isEnabledFn","loyaltyNumberAgeCheck","enabledFeatures","minimumAge","underAgeLoyaltyNumber","threshholdDoB","subYears","now","applicantDoB","overAge","compareAsc","isNaN","getTime","Boolean","isSsn","isLastFour","isReferralCode","isPhoneNumber","val","replace","isAlternatePhoneNumber","isMoney","isPrescreenId","isEmail","partialSchema","schema","names","shape","reduce","conf","toString","composeSchema","schemas","validation","isPresent","both","complement","isEmpty","isNil","FeatureGroups","defaultValues","fieldCustomizations","tokenLookup","phoneLookup","dspPush","dspRetrieval","authBuyer","accountAssure","cardChoices","productChoices","storeAttribution","enhancedCheckoutOption","clerkMode","session","useInstantCreditTspTimeout","hideInstantCreditSessionWarning","existingAccountBehavior","setTenant","createAction","resolve","tenantReducer","createReducer","entity","handleAction","state","payload","fullTenant","mergeDeepWith","defaultTo","disclosures","pre","type","allInOne","Error","checkDisclosure","set","lensProp","selectTenant","creditApplication","selectCreditApplication","instantCredit","selectInstantCredit","productChoiceKey","choice","key","overrides","cardType","dspOverrides","dspOverride","camelcase","mergeDeepRight","isVisibleFn","field","visible","feature","has","featureVal","Array","isArray","length","Object","keys","isGroupEnabledFn","group","some","getDisclosureUrl","disclosure","propEq","url","window","location","hostname","setTimeouts","timeouts","timeoutsReducer","selectTimeouts","reducer","combineReducers","authenticityToken","sessionToken","analytics","iovation","storeLocations","prescreen","otpCode","prequalOffer","consumerSearch","driversLicense","enhancedCheckout","membershipValidation","preloadedState","__PRELOADED_STATE__","compose","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","composeWithDevTools","headerContainer","theme","header","backgroundColor","textColor","mui","spacing","fontWeightBold","typography","css","normalText","Header","useSelector","useTheme","embedded","useStartPageName","isGroupEnabled","useFeature","useMemo","hasCardChoice","hasConsumerSearch","initialDataKeys","Home","props","steps","useWorkflow","useLoadInitialData","startPageName","useTrackApplicationStart","Component","Step","CARD_CHOICE","CardChoice","CONSUMER_SEARCH","ConsumerSearch","APPLICATION","CreditApplication","PRODUCT_CHOICE","ProductChoice","LoyaltyNumberError","tMd","useMarkdownTranslate","tMdMultiline","useMarkdownMultilineTranslate","content","SimpleMessagePage","headerTitle","CancelButton","titleText","body","startOver","palette","primary","main","AppExpiredView","restartPath","Box","mt","PageContainer","styles","Container","maxWidth","i18nKey","components","href","aria-label","AppExpired","fmcDispatch","useFmcHost","allowedQueryParameters","useSecureQueryParameters","timeoutRestartPath","restartLinkPath","process","REACT_BASENAME","qs","stringify","addQueryPrefix","useEffect","applicationTimeout","headerSubtitle","subtitleText","text","secondary","DspExpiredView","canRetrieveDsp","t","useTranslate","contentContainer","my","display","flexDirection","alignItems","Button","component","Link","to","fullWidth","EmbeddedContinueButton","variant","DspExpired","isEnabled","dispatch","useDispatch","resetInstantCredit","dspTimeout","ExpiredView","pathAfter","dangerouslySetInnerHTML","__html","id","BATCH_PRESCREEN_START","Expired","ErrorView","SkipPrefillButton","BatchPrescreenError","PrequalOfferError","DriverLicenseHome","isRequired","useFieldCustomization","DRIVER_LICENSE_START","DriverLicenseStart","ValidationError","style","body2","SnackbarProvider","hideIconVariant","anchorOrigin","vertical","horizontal","ACTIVITY_EVENTS","addActivityListener","handler","forEach","document","addEventListener","passive","removeActivityListener","removeEventListener","useIdleTimer","onIdle","timeout","enabled","useTimeout","setTimeout","clearTimeout","activityListenerRef","useRef","cleanup","useCallback","current","startTimer","onActivity","stopTimer","TimeoutDialog","extendSession","endSession","Dialog","disableBackdropClick","disableEscapeKeyDown","aria-labelledby","open","DialogTitle","DialogContent","DialogContentText","DialogActions","onClick","autoFocus","AppTimeoutModalView","warned","Fragment","children","useWarning","warnAfter","maxExtensions","useState","setWarned","extensions","setExtensions","onWarning","resetTimer","AppTimeoutModal","useQueryParameters","applicationWarningTime","appWarning","useWarningTime","timeoutAfter","applicationTimeoutTime","appTimeout","useTimeoutTime","push","useNavigationHelpers","onTimeout","pathname","search","timeoutTime","i18nPrefix","useContext","ConsumerSearchContext","formattedTimeoutTime","Math","floor","DspTimeoutModalView","DspTimeoutModal","sessionConfig","instantCreditTimedOut","selectInstantCreditTimedOut","warningTime","queryWarningTime","instantCreditWarningTime","expirationType","expirationValue","instantCreditWarning","sessionExtensionsMax","useMaxExtensions","queryTimeoutTime","instantCreditTimeoutTime","multipliers","S","M","H","D","prototype","hasOwnProperty","call","instantCreditTimeout","useLayoutEffect","nest","Parent","descendants","Child","Nested","memoizedNest","memoizee","WrappedRoute","wrappers","rest","Wrapper","render","routeProps","EntryTokenContext","React","createContext","EntryRoute","context","entryToken","createToken","NonEntryRoute","pathFor","useReactRouter","redirectToRoot","Redirect","NoReturnRoute","initialToken","clearToken","ErrorBoundary","hasError","this","mb","withTranslation","UnloadPrompt","ref","callback","event","preventDefault","returnValue","mutationObserverConfig","childList","attributes","characterData","subtree","attributeFilter","attributeOldValue","characterDataOldValue","useHeightObserver","previousHeight","observeHeight","dom","onHeightChange","updateHeight","height","scrollHeight","observer","MutationObserver","observe","debounced","debounce","maxWait","disconnect","EmbeddedBackButton","goBack","paths","workflow","handleClick","m","ApplicationLayout","ApplicationRoute","App","i18n","useTranslation","stringsFileName","overrideConfig","hasStep","isVisible","setAnalyticsVariablesOnLoad","useAnalyticsVariables","parse","parseBooleans","associateId","hasClerkMode","analyticsVariableSet","canUseDOM","setDefaultNamespace","mcid","_satellite","getVisitorId","getMarketingCloudVisitorID","e","loadAdobeTrackingId","mergeApplication","warn","heightChanged","hasLoyaltyNumberError","role","path","TrackedRoute","exact","ClerkMode","ADD_ONS","AddOns","ReviewTerms","DspStart","DspRetrieval","PrescreenOffer","BatchPrescreenStart","BatchPrescreenExpired","FallbackApplication","FallbackReviewTerms","PrequalConsumerSearch","PrequalOfferApplication","PrequalOfferApplicationError","PrequalOfferApplicationPending","PrequalOfferApplicationNotQualified","PrequalOfferApplicationExistingPreapproval","PrequalOffer","PrequalDecline","PrequalOfferPush","PrequalOfferExpired","PrequalOfferPushApplication","PrequalFallbackApplication","PrequalFallbackReviewTerms","EnhancedCheckoutError","EnhancedCheckoutConsumerSearch","MembershipValidation","PrequalDriverLicenseHome","ScanPage","DriverLicenseError","ResetApplicationRoute","CreditPending","ExistingAccountValidationError","ExistingAccount","CreditError","Approval","DspError","info","WithProviders","ThemeProvider","setEntryToken","random","substring","Provider","IovationProvider","FmcHostProvider","ResponsiveQueryProvider","AppWithProviders","use","initReactI18next","init","fallbackLng","defaultNS","fallbackNS","interpolation","escapeValue","history","createBrowserHistory","basename","wrapHistory","ClientApp","useSSR","__INITIAL_I18N_STORE__","__INITIAL_LANGUAGE__","store","createStore","rootReducer","applyMiddleware","Cypress","userAgentString","navigator","userAgent","loadableReady","ReactDOM","hydrate","getElementById","serviceWorker","ready","then","registration","unregister","createElement","evarMapping","epId","callId","epPlacementId","clientName","urlPath","epSessionId","epMessageId","consumerSearchSuccessful","isSufficientPrefill","hasAccountAssure","hasAuthBuyer","productChoiceSelection","coBrandOptIn","coBrandOptOut","pageName","pixelType","accountId","applicationId","divisionNumber","mapAnalyticsVariables","query","result","setEvar","useDeferredAnalytics","siteCatalystAnalytics","s","mapped","setAnalyticsVariable","digitalData","lensPath","flat","setAnalyticsVariables","variables","_","pipe","pick","pickBy","pixelTracking","setAnalyticsVariablesByApplication","application","findProductChoice","optInOut","optInOrOut","isOptInOrOptOut","link","forwardRef","linkProps","params","useCondensedQueryParameters","mergeLocation","body1","h5","subtitle1","helpText","caption","resetApplication","isAccountLookup","hasExistingAccount","lookupType","LoadingScreen","justifyContent","defaultState","attempts","expireTime","incrementAttempts","setExpireTime","setOtpCode","otpCodeReducer","EXPIRE_TIME","selectAttempts","selectExpireTime","OTPSenderError","useOTPSender","setError","useFetchApi","status","fetch","mockSOTP","a","phone","method","mockOtpResponse","response","ok","json","Promise","reject","getOptions","options","defaultOptions","headers","Accept","Authorization","mergeLeft","useFetch","selectAuthenticityToken","token","selectSessionToken","sessionTokenFromLocalStore","loadSessionTokenFromLocalStore","input","JSON","oldQueryString","oldQuery","newQuery","mergeOptions","newOptions","get","saveSessionTokenToLocalStore","setSessionToken","prequalOfferKeys","mergePrequalOffer","data","prequalOfferReducer","selectPrequalOffer","fontFamily","queryParams","muiTheme","createMuiTheme","brandColor","tonalOffset","fontSize","htmlFontSize","borderRadiusSmall","borderRadius","borderRadiusLarge","common","black","white","createTheme","composeStyles","parseStringAsDate","curry","format","reformatDate","fromFormat","toFormat","transformDate","obj","lens","over","transformDob","transformDobFromApi","mergeConsumerSearch","consumerSearchReducer","selectConsumerSearch","redirectProps","cleanSessionToken","sessionTokenReducer","localStorage","getItem","err","setItem","console","FmcForm","initialErrors","initialTouched","validate","validationSchema","initialValues","errors","touched","initialErrorsSet","cast","validateSync","abortEarly","yupToFormErrors","hasInvalidInitialValue","mapObjIndexed","virtualLookupSuccessful","prescreenId","setVirtualLookupSuccessful","setPrescreenId","prescreenReducer","selectVirtualLookupSuccessful","selectPrescreenId","startIovation","iovationUrl","anyWindow","io_install_stm","io_install_flash","io_exclude_stm","io_bb_callback","blackbox","completed","script","async","src","onerror","getElementsByTagName","appendChild","IovationContext","enqueueSnackbar","useSnackbar","selectIovationUrl","promise","catch","persist","useIovation","RELATIONSHIPS","T","B","C","F","G","O","R","U","W","cardChoice","firstName","lastName","address1","address2","city","zip","dateOfBirth","ssn","emailAddress","mobilePhone","alternativePhone","income","intendedPurchaseAmount","referralCode","studentApplication","clientVariable1","clientVariable2","clientVariable3","clientVariable4","jointApplicant","storeNumber","category","cartAmount","checkoutAmount","correlationData","customerNumber","productAmount","sku","middleInitial","lockedFields","prefillFields","lockFields","setClientVariable","clientVariableNumber","position","clearPostPrefillFields","creditApplicationReducer","newStr","slice","padEnd","splice","selectLockedFields","mergeDriversLicense","setScanError","scanError","driversLicenseReducer","selectDriversLicense","selectScanError","LoadableCardChoice","loadable","fallback","LoadableProductChoice","Event","eventMap","ApplicationStart","linkName","customEventDetailType","ApplicationApproved","ApplicationPending","ApplicationDuplicate","ApplicationFailed","AddToWallet","ApplicationCompleted","TextToRecover","ApplyAndBuy","PrescreenOfferAccept","PrescreenOfferNoThanks","PrescreenOfferNotMe","PrequalOfferAccept","PrequalOfferDecline","PrequalOfferText","EnhancedCheckoutStarted","EnhancedCheckoutSuccessful","EnhancedCheckoutNotFound","usePageName","useRouter","queue","listenerRef","hasSCode","isSCodeBlocked","readyState","args","listener","useAnalytics","analyticsReportSuiteId","defaultPageName","sendSiteCatalystAnalyticsEvents","events","eventNames","join","linkNames","debug","un","linkTrackVars","tl","linkTrackEvents","sendCustomEvent","detailType","customEvent","CustomEvent","detail","dispatchEvent","sendCustomEvents","sendEvents","sendPageViewCustomEvent","sendPage","viewPage","applicationStarted","selectAnalytics","finalPageName","setAnalyticsState","LoadablePrequalOfferApplication","analyticsReducer","details","v","cascadedAmount","updatedDetails","IovationButton","disabled","Iovation","iovationFailed","setIovationFailed","messageComponent","CompletionIcon","ApplicationProgress","width","Logo","className","logoUrl","alt","WorkflowEnum","DEFAULT_PARAMETERS","mockCS","mockECO","mockDL","mockDspRetrieval","mockDspPush","mockVOTP","mockIC","mockPA","mockMV","mockMO","mockVL","mockTTR","mockPOT","mockPrequal","mockPrequalApp","mockStoreAttribution","carrier","keyword","shortCode","prequalificationId","employeeApplication","cmp","channel","subchannel","subId","inStore","kioskMode","canonicalKeyNames","keysIn","normalizedKeys","keyNames","accum","canon","toLowerCase","matchCanonicalKey","activeWorkflow","values","fields","parsedParams","acc","parseFloat","parseNumbers","mergeWith","vibesParams","normalized","translateVibesParams","keepParams","filter","includes","consumerSearchResult","setEnhancedCheckoutState","enhancedCheckoutReducer","selectEnhancedCheckout","LoadableCreditApplication","UserAgentContext","UserAgentProvider","useUAParser","UAParser","getResult","controller","credentials","signal","Status","NOT_STARTED","setStatus","abortControllerRef","abortCurrentRequest","abort","newFetch","AbortController","IN_PROGRESS","raiseOnServerError","SUCCESS","ERROR","isNetworkError","NetworkError","CachedAttributesContext","applicantEmail","useCachedAttribute","appStoreNumber","queryStoreNumber","cachedAttributes","Children","child","cloneElement","Checkbox","icon","checkedIcon","color","LoadableDriverLicenseStart","prefillKeys","useConsumerSearch","searchConsumer","trustedBrandPrefill","nextPath","useAnalyticVariables","onSubmit","all","valuesOf","NonClientError","ConsumerSearchError","skipToPath","headingContainer","formFields","ccpaDisclosure","disclosureBox","finePrint","LookupFormView","isSubmitting","prompt","mobilePhoneRef","hasMobilePhone","hasZipCode","hasSSN","contextualTitle","resolveKey","useKeyResolution","cancelApplicationButtonKey","cancelApplicationButton","fieldProps","label","autoComplete","inputRef","mask","phoneMask","TextField","textFieldRef","Typography","zipMask","inputProps","inputMode","pattern","data-cy","DisclosureBox","loading","setAuthenticityToken","authenticityTokenReducer","setIovationUrl","iovationReducer","useMembershipValidationWorkflow","isMobile","useResponsiveQuery","stepsEnabled","MEMBERSHIP_VALIDATION","APPLICATION_2","REVIEW_TERMS","progressStartStep","restartStep","usePrequalOfferPush","PREQUAL_OFFER_PUSH_START","usePrequalPhoneLookupWorkflow","PREQUAL_OFFER_APPLICATION","usePrequalTokenLookupWorkflow","useBatchPrescreenWorkflow","useDspPushWorkflow","DSP_START","useEnhancedCheckoutWorkflow","hasProductChoice","useFmcWorkflow","firstStep","not","useIcDriverLicenseWorkflow","SCAN_PAGE","usePrequalDriverLicenseWorkflow","usePrescreenWorkflow","PRESCREEN_OFFER","useWorkflowHelpers","stepNumber","step","index","findIndex","equals","stepAfter","nextIndex","nextStep","getFmcWorkflow","getPrescreenWorkflow","getBatchPrescreenWorkflow","getDspPushWorkflow","getPrequalPhoneLookupWorkflow","getPrequalTokenLookupWorkflow","getPrequalOfferPush","getEnhancedCheckoutWorkflow","getMembershipValidationWorkflow","getIcDriverLicenseWorkflow","getPrequalDriverLicenseWorkflow","batchPrescreen","prequalPhoneLookup","prequalTokenLookup","prequalOfferPush","icDriverLicense","prequalDriverLicense","enhancedCheckoutPhoneLookup","enhancedCheckoutTokenLookup","workflowHelpers","LoadableConsumerSearch","overrideSearchResults","searchResults","searchResultsKeys","overrideValue","iovationBlackbox","handleExistingAccount","useHandleExistingAccount","mockResponse","otp_code","results","sendToSdk","isValidated","idRef","clear","safeSetTimeout","timerId","mergeOverrides","override","b","precedence","shouldApply","fallBackForKey","item","newItems","previousItem","getSimpleOverrides","workflowPrecedence","featurePrecedence","useOverrides","optInOutOverrides","optIn","optOut","useOptIntOutOverrides","productChoiceOverrides","overrideKey","useProductChoiceOverrides","icCardType","creditAppCardType","useDspOverrides","simpleOverrideFor","featureOverrides","workflowOverrides","fallbacks","exists","getPlacements","placementKey","tOptions","getGlobals","ns","mergeDeepLeft","returnObjects","globalsForCurrentNs","defaultGlobals","epPlacements","globals","defaultValueOrOptions","defaultValue","overrideString","renderers","paragraph","target","rel","allowDangerousHtml","Trans","restProps","propNames","MaskedInput","other","inputElement","textField","borderColor","disabledBackground","defaultProps","margin","maskProps","maskPropNames","maksedInputProps","inputComponent","InputProps","disableUnderline","InputLabelProps","omit","pristineAndEmpty","FormTextField","form","formikOnChange","onChange","formikOnBlur","onBlur","helperText","getNestedField","split","formError","newOnChange","newOnBlur","TextFieldPopover","popperId","setOpen","openPopper","closePopper","escFunction","code","addPopoverAriaDescribedby","describedby","getAttribute","newDescribedby","setAttribute","removePopoverAriaDescribedby","removeAttribute","RegExp","aria-hidden","Grow","in","Card","offsetWidth","CardContent","OfferMadeEnum","OfferMadeEnumMap","Yes","OfferResponseType","No","Abandoned","NotMe","PrescreenNo","useOfferMade","presentationInd","offerResponse","TypeError","DOMException","ServerError","statusText","container","light","activeStep","visuallyHidden","Stepper","renderStep","n","aria-current","times","stepLabel","startStep","stepCount","ExistingAccountHandlerError","applicationData","receiveAccountExists","rewards","validated","mergeInstantCredit","DISABLE_ITEM","formattedAddress","AddressFields","setFieldValue","useAddressAutocomplete","suggestions","searchAddress","setEnabled","isLocked","setValue","shouldValidate","onSuggestionSelect","substr","useDebouncedCallback","partialAddress","_value","onAddressChange","clearAddress","useAutocompleteHook","suggestionsWithDisable","AddressClearButton","InputAdornment","IconButton","edge","Grid","xs","sm","maxLength","Autocomplete","inputValue","itemToString","onSelect","getInputProps","getLabelProps","getRootProps","onKeyDown","endAdornment","refKey","suppressRefError","stateMask","storeNumberMask","createNumberMask","prefix","includeThousandsSeparator","allowLeadingZeroes","AdditionalFields","placeholder","dateMask","dobPipe","LoyaltyNumberField","MobileField","AlternateMobileField","alternativePhoneRef","AnnualIncomeField","fieldId","fieldName","annualIncomeRef","moneyMask","gutterBottom","IntendedPurchaseAmountField","intendedPurchaseAmountRef","card","divider","optInOutText","optInOutLabel","OptInOut","elevation","FormControlLabel","labelPlacement","control","studentApplicationText","studentApplicationLabel","StudentApplication","termsContainer","terms","title","applicationComplete","LookupForm","isLastFourBool","sendOTP","onSubmitSetValues","rawValues","prefillValues","formProps","errorText","OtpVerificationView","resendSms","attemptsRemaining","tooManyAttempts","timedOut","resetForm","handleResend","lastFourPhone","OTPVerificationError","useOTPVerification","otpVerification","verifyOTPCode","otpAttempts","otpExpireTime","onOtpSuccessful","setTimedOut","PhoneLookup","setValues","handleOtpSuccess","showSsn","showZip","PhoneValidation","SearchComponent","TokenLookup","ReusableConsumerSearch","isDsp","tspIcon","completionIcon","LoadableReviewTerms","SsnField","lastFour","locked","ssnHidden","setSsnHidden","ssnLabel","InputComponentProps","aria-pressed","ssnMask","guide","breakpoints","up","transitions","create","getContrastText","dark","withDefault","CircularProgress","size","setStoreLocations","storeLocationsReducer","entities","selectStoreLocations","mergeMembershipValidation","membershipValidationReducer","validationStatus","pageContainer","background","paper","bordered","nonEmbeddedStyles","MELISSA_URL","convertResult","Results","Address","Address1","Locality","AdministrativeArea","PostalCode","filterResults","addressResult","setResults","URL","ff","maxrecords","nativecharset","mode","sendOfferMade","textToRender","cancelApplication","popper","SuggestionItem","getItemProps","highlight","MenuItem","noWrap","childNode","setChildNode","downshift","getMenuProps","isOpen","highlightedIndex","menuProps","menuWidth","clientWidth","Popper","anchorEl","placement","Paper","MenuList","i","ResponsiveQueryContext","uaProps","useMediaQuery","down","device","LoadableAddOns","LoadablePrescreenOffer","LoadableBatchPrescreenStart","LoadableFallbackReviewTerms","LoadableBatchPrescreenApplication","LoadableDecline","LoadablePrequalOfferStart","LoadablePrequalOfferPushApplication","LoadableTokenLookup","LoadableDriverLicenseError","LoadableScanPage","LoadableDriverLicenseHome","LoadableCreditPending","LoadableExistingAccount","LoadableCreditError","LoadableDspStart","LoadableDspError","LoadableDspRetrieval","integerLimit","decimalLimit","prescreenIdMask","conformToMask","ctm","createAutoCorrectedDatePipe","actionsContainer","ActionButtonContainer","FmcHostContext","enhancedPresentment","FmcHost","targetOrigins","frameAncestors","fmcHost","fmcSdk","action","optional","lastFourOnly","descriptor","oldLocation","createLocation","queryParameters","go","goForward","instantCreditKeys","meta","instantCreditReducer"],"mappings":"mHAAA,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AAM,CAMJhJ,UAAU,IAID1F,EAAqBrpC,YAChC,wBACA,SAAAC,GAAO,OAAI,SAACslB,GAAD,OAAkCtlB,EAAQslB,OAG1Cla,EAAqBrL,YAAa,wBAElCg4C,EAAuB73C,YAClCiiB,GACA,SAAA/hB,GAAY,MAAI,CACdA,EAAagpC,GAAoB,SAAC/oC,EAAD,GAA+B,IAAZilB,EAAW,EAApBhlB,QACzC,OAAO,2BACFD,GADL,IAEEF,OAAO,2BACFE,EAAMF,QACNsgB,YAAKo3B,EAAmBvyB,IAE7BwyB,KAAM,CACJhJ,UAAU,QAKhB1uC,EAAagL,GAAoB,kBAAM+W,SAQ9B7gB,EAAsB,SAACjB,GAAD,OACjCA,EAAMgB,cAAclB,QAETuR,EAA8B,SAACrR,GAAD,OACzCA,EAAMgB,cAAcy2C,KAAKhJ,UAEZiJ,Q","file":"static/js/main.7d9b2de6.chunk.js","sourcesContent":["import log from 'loglevel';\nimport { isAborted, AbortError } from 'hooks/requests/fetchUtils';\n\n/**\n * Convenient method to rethrow the error if it is not one of the given types in\n * promises' catch.\n *\n * If the error is an AbortError (or a DOMError with AbortError name), we\n * assume it was simply rejected and the error has already been handled.\n *\n */\nexport default function catchOnly(\n error: Error,\n ...errorClasses: Function[]\n): boolean {\n // We'll also swallow aborted error here.\n // This error generally doesn't need to be handle. It tends to indicate a new\n // request has been started, or that the component was unmounted whil a\n // request is ongoing. If we start needing to handle AbortError, we can make\n // components explicitly accept this error.\n if (error instanceof AbortError || isAborted(error)) {\n return false;\n }\n const match = errorClasses.find(klass => error instanceof klass);\n if (match !== undefined) {\n return true;\n }\n log.error(error.name, error);\n throw error;\n}\n","export default function withOptional(str: string, required: boolean): string {\n return required ? str : `${str} (Optional)`;\n}\n","import * as Yup from 'yup';\nimport states from './states.json';\nimport { map, prop, reduce } from 'ramda';\nimport { isEnabledFn, LoyaltyNumberAgeCheck, Tenant } from 'state/tenant';\nimport {\n isValid,\n startOfDay,\n isAfter,\n subDays,\n isBefore,\n subYears,\n compareAsc,\n} from 'date-fns/fp';\nimport { parseDoB } from 'utils/dateUtils';\n\nexport const isName = Yup.string().test(\n 'noDigit',\n 'Cannot contains digits',\n value => !/\\d/.test(value),\n);\n\nexport const isNotPoBox = Yup.string().test(\n 'notPOBox',\n 'Cannot be a P.O. box',\n (value: string) => {\n const pattern = /P[.\\s]*O[.\\s]+Box/gim;\n return !value || !value.match(pattern);\n },\n);\n\nexport const isState = Yup.string()\n .transform(value => (typeof value === 'string' ? value.toUpperCase() : value))\n .oneOf(map(prop('abbreviation'), states), 'Must be a US state.');\n\nexport const isNotRestrictedState = (tenant: Tenant, errorMessage: string) =>\n Yup.string()\n .concat(isState)\n .test({\n name: 'notRestrictedState',\n exclusive: true,\n message: errorMessage,\n test: value => tenant.restrictedStates.indexOf(value) < 0,\n });\n\nexport const isZipCode = Yup.string()\n .matches(/^\\d{5}$/, {\n message: 'Please enter your five-digit Zip Code or Postal code.',\n excludeEmptyString: true,\n })\n .notOneOf(['00000']);\n\nexport const isBeforeToday = (): Yup.StringSchema =>\n Yup.string()\n .test('isDate', 'Must be a valid date', (value: string) => {\n if (!value) return true;\n return isValid(parseDoB(value));\n })\n .test('beforeToday', `Must be before today`, (value: string) => {\n if (!value) return true;\n const parsed = parseDoB(value);\n return isBefore(startOfDay(new Date()), parsed);\n });\n\nexport const isBornAfter = (year: number): Yup.StringSchema =>\n Yup.string()\n .test('isDate', 'Must be a valid date', (value: string) => {\n if (!value) return true;\n return isValid(parseDoB(value));\n })\n .test('bornAfter', `Must be born on or after ${year}`, (value: string) => {\n if (!value) return true;\n const parsed = parseDoB(value);\n const date = subDays(1, new Date(year, 0, 1));\n return isAfter(date, parsed);\n });\n\n/**\n * If LoyaltyNumberAgeCheck is an enabled feature: validate applicant age\n *\n * Applicants above the age threshhold are vaild if they a loyalty\n * number while not equaling the under age loyalty number\n *\n * Applicants below the age threshold are valid\n */\nexport const hasValidAge = (\n tenant: Tenant,\n loyaltyNumber: string | null,\n errorMessage: string,\n): Yup.StringSchema =>\n Yup.string()\n .test('isDate', 'Must be a valid date', (value: string) => {\n if (!value) return true;\n return isValid(parseDoB(value));\n })\n .test('hasValidAge', errorMessage, (value: string) => {\n if (!isEnabledFn(tenant, 'loyaltyNumberAgeCheck')) return true;\n const loyaltyNumberAgeCheck =\n tenant.enabledFeatures.loyaltyNumberAgeCheck;\n const minimumAge = (loyaltyNumberAgeCheck as LoyaltyNumberAgeCheck)\n .minimumAge;\n const underAgeLoyaltyNumber = (loyaltyNumberAgeCheck as LoyaltyNumberAgeCheck)\n .underAgeLoyaltyNumber;\n\n const threshholdDoB = subYears(minimumAge, Date.now());\n const applicantDoB = parseDoB(value);\n const overAge = compareAsc(applicantDoB, threshholdDoB);\n\n if (!applicantDoB) return true;\n if (isNaN(applicantDoB.getTime())) return true;\n if (overAge >= 0) {\n return (\n Boolean(loyaltyNumber) && loyaltyNumber !== underAgeLoyaltyNumber\n );\n } else {\n return true;\n }\n });\n\nexport const isSsn = (isLastFour: boolean): Yup.StringSchema =>\n isLastFour\n ? Yup.string().matches(/^\\d{4}$/, {\n message: 'Please enter the last four digits of your SSN',\n excludeEmptyString: true,\n })\n : Yup.string().matches(/^\\d{9}$/, {\n message: 'Please enter your SSN',\n excludeEmptyString: true,\n });\n\nexport const isReferralCode = Yup.string().matches(\n /^[A-Za-z0-9]{0,10}$/,\n // The template string syntax is used by Yup for message.\n // eslint-disable-next-line no-template-curly-in-string\n '${path} is not valid',\n);\n\nexport const isPhoneNumber = Yup.string()\n .transform((val: string) => (val ? val.replace(/\\D/g, '') : null))\n .matches(/^[2-9]{1}[0-9]{9}$/, 'Please enter a valid mobile phone number');\n\nexport const isAlternatePhoneNumber = Yup.string()\n .transform((val: string) => (val ? val.replace(/\\D/g, '') : null))\n .matches(/^[2-9]{1}[0-9]{9}$/, 'Please enter a valid phone number');\n\nexport const isMoney = Yup.string()\n .transform((val: string) => (val ? val.replace(/\\D/g, '') : null))\n .matches(/^\\d{0,7}$/, 'Cannot include more than 7 digits');\n\nexport const isPrescreenId = Yup.string().matches(\n /^\\d{12}$/,\n 'Must be exactly 12 digits',\n);\n\nexport const isEmail = Yup.string().matches(\n /^\\S+@\\S+$/,\n 'Must be a valid email address',\n);\n\n/**\n * Only validate a subset of the given schema.\n */\nexport const partialSchema = (\n schema: Yup.ObjectSchema,\n names: readonly K[],\n): Yup.ObjectSchema> => {\n const shape = names.reduce>>(\n (conf, name) => ({\n ...conf,\n [name]: Yup.reach(schema, name.toString()),\n }),\n {},\n );\n\n return Yup.object((shape as unknown) as Yup.ObjectSchemaDefinition<\n Pick\n >);\n};\n\ntype ComposeSchema = (\n schema: Yup.Schema,\n ...schemas: (Yup.Schema | null | undefined | false | 0 | '')[]\n) => Yup.Schema;\n\nexport const composeSchema: ComposeSchema = (schema, ...schemas) =>\n reduce(\n (schema, validation) => (validation ? schema.concat(validation) : schema),\n schema,\n schemas,\n );\n","import { both, complement, isEmpty, isNil } from 'ramda';\nexport const isPresent = both(complement(isEmpty), complement(isNil));\nexport default isPresent;\n","import camelcase from 'camelcase';\nimport { createAction, createReducer } from 'deox';\nimport {\n defaultTo,\n find,\n has,\n lensProp,\n mergeDeepRight,\n mergeDeepWith,\n propEq,\n set,\n} from 'ramda';\nimport {\n MountedState as CreditAppMountedState,\n selectCreditApplication,\n} from 'state/creditApplication';\nimport {\n MountedState as InstantCreditMountedState,\n selectInstantCredit,\n} from 'state/instantCredit';\n\nexport interface Disclosure {\n type: 'pre' | 'allInOne' | 'accountAssure' | `prequalification`;\n url: string;\n}\n\nexport interface FieldCustomizationItem {\n optional: boolean;\n visible: boolean;\n}\n\nexport interface LoyaltyNumberFieldCustomizationItem {\n optional: boolean;\n}\n\nexport interface FieldCustomization {\n emailAddress: FieldCustomizationItem;\n annualIncome: FieldCustomizationItem;\n storeNumber: FieldCustomizationItem;\n intendedPurchaseAmount: FieldCustomizationItem;\n referralCode: FieldCustomizationItem;\n ssn: FieldCustomizationItem & { lastFourOnly: boolean };\n loyaltyNumber: LoyaltyNumberFieldCustomizationItem;\n}\n\nexport interface CardChoice {\n imageUrl: string;\n name: string;\n code: number;\n}\n\nexport interface ProductChoice {\n key: string;\n label: string;\n imageUrl: string;\n cardType: string;\n overrides: Partial;\n}\n\nexport interface EnhancedPresentment {\n frameAncestors: string[];\n}\n\nexport interface TextToRecover {\n type: 'accountNumber' | 'accountId';\n}\n\nexport interface TSPDisplay {\n topExpireMessage: boolean;\n youWillReceiveMessage: boolean;\n creditLimit: boolean;\n nameOnCard: boolean;\n accountNumber: boolean;\n temporaryAccountNumber: boolean;\n temporaryShoppingPassLimit: boolean;\n temporaryExpirationDate: boolean;\n temporarySecurityCode: boolean;\n useWhenCheckoutMessage: boolean;\n transactionLimitMessage: boolean;\n barcode: boolean;\n wallet: boolean;\n aprMessage: boolean;\n discountOffer: boolean;\n registerAccountCenter: boolean;\n textToRecoverAsPrimaryButton: boolean;\n}\n\nexport interface DSPOverride {\n tspDisplay?: TSPDisplay;\n tspIcon?: string;\n completionIcon?: string;\n}\n\nexport interface OptInOut {\n type: 'optIn' | 'optOut';\n optOutCardType: string;\n}\n\nexport interface Wallet {\n type: 'accountNumber' | 'callId';\n}\n\nexport interface DspRetrieval {\n type: 'phoneLookupOnly' | 'phoneAndTokenLookup';\n}\n\nexport interface Rewards {\n maxSelection: number | null; // 0 or greater, or null for \"infinity\"\n display: {\n barcode: boolean;\n certificateId: boolean;\n };\n}\n\nexport interface BatchPrescreenOption {\n imageUrl: string;\n}\n\nexport interface PrequalOption {\n imageUrl: string;\n}\nexport interface EmployeeApplication {\n storeNumber: string;\n allowedIps: string[];\n}\n\nexport interface LoyaltyNumberAgeCheck {\n minimumAge: number;\n underAgeLoyaltyNumber: string;\n}\n\nexport interface TwoWayHybridApplyEcho {\n postUrl: string;\n}\n\nexport interface PixelTracking {\n type: 'conversant';\n}\n\nexport interface FeatureMap {\n tokenLookup: boolean | undefined;\n phoneLookup: boolean | undefined;\n enhancedCheckoutPhoneLookup: boolean | undefined;\n enhancedCheckoutTokenLookup: boolean | undefined;\n membershipValidation: boolean | undefined;\n inStore: boolean | undefined;\n dspPush: boolean | undefined;\n dspRetrieval: DspRetrieval | undefined;\n authBuyer: boolean | undefined;\n accountAssure: boolean | undefined;\n jointApplicant: boolean | undefined;\n prequalPhoneLookup: boolean | undefined;\n prequalTokenLookup: boolean | undefined;\n prequalOfferPush: boolean | undefined;\n batchPrescreen: boolean | undefined;\n prescreen: boolean | undefined;\n icDriverLicense: boolean | undefined;\n prequalDriverLicense: boolean | undefined;\n studentApplication: boolean | undefined;\n employeeApplication?: EmployeeApplication;\n storeAttribution: boolean;\n kioskMode: boolean;\n clerkMode: boolean;\n cardChoices: CardChoice[] | [];\n productChoices: ProductChoice[];\n batchPrescreenOption?: BatchPrescreenOption;\n prequalOption?: PrequalOption;\n textToRecover?: TextToRecover;\n enhancedPresentment?: EnhancedPresentment;\n optInOut?: OptInOut;\n wallet?: Wallet;\n rewards?: Rewards;\n enhancedCheckoutOption?: boolean | undefined;\n loyaltyNumberAgeCheck?: LoyaltyNumberAgeCheck | {};\n twoWayHybridApplyEcho?: TwoWayHybridApplyEcho;\n pixelTracking?: PixelTracking;\n}\n\nexport const FeatureGroups = {\n 'add-ons': ['authBuyer', 'accountAssure', 'jointApplicant'] as Array<\n keyof FeatureMap\n >,\n 'consumer-search': ['tokenLookup', 'phoneLookup'] as Array,\n};\n\nexport interface Tenant {\n name: string;\n divisionNumber?: string;\n clientName: string;\n stringsFileName?: string;\n brandColor: string;\n logoUrl: string;\n barcodeFormat?: string;\n defaultStoreNumber: string;\n completionIcon?: string;\n tspIcon?: string;\n registrationUrl?: string;\n\n enabledFeatures: FeatureMap;\n\n productName?: {\n default: string;\n [key: string]: string | undefined;\n };\n\n tspDisplay: TSPDisplay;\n\n fieldCustomizations: FieldCustomization;\n\n disclosures: Disclosure[];\n\n trustedBrandPrefill: boolean;\n existingAccountBehavior: 'noDsp' | 'dsp' | 'validationRequired';\n\n session: {\n useInstantCreditTspTimeout: boolean;\n hideInstantCreditSessionWarning: boolean;\n };\n\n // TODO: deprecate\n geolocationAttribution?: {\n storeLocationsUrl: string;\n locationCheckPercentage: number;\n };\n\n analyticsReportSuiteId: string;\n\n overrideConfig: {\n production: boolean;\n stage: boolean;\n enhancedPresentment: boolean;\n dspPush: boolean;\n prescreen: boolean;\n batchPrescreen: boolean;\n prequalTokenLookup: boolean;\n prequalPhoneLookup: boolean;\n prequalOfferPush: boolean;\n enhancedCheckoutPhoneLookup: boolean;\n enhancedCheckoutTokenLookup: boolean;\n tokenLookup: boolean;\n phoneLookup: boolean;\n membershipValidation: boolean;\n inStore: boolean;\n enhancedCheckoutOption: boolean;\n kioskMode: boolean;\n clerkMode: boolean;\n employeeApplication: boolean;\n icDriverLicense: boolean;\n prequalDriverLicense: boolean;\n };\n\n dspOverrides?: {\n [key: string]: DSPOverride | undefined;\n };\n\n restrictedStates: string[];\n\n instantCreditClientToken: string;\n}\n\nconst defaultValues = {\n fieldCustomizations: {},\n\n enabledFeatures: {\n tokenLookup: false,\n phoneLookup: false,\n dspPush: false,\n dspRetrieval: undefined,\n authBuyer: false,\n accountAssure: false,\n cardChoices: [],\n productChoices: [],\n storeAttribution: false,\n enhancedCheckoutOption: false,\n clerkMode: false,\n },\n\n session: {\n useInstantCreditTspTimeout: false,\n hideInstantCreditSessionWarning: false,\n },\n\n existingAccountBehavior: 'noDsp',\n\n restrictedStates: [],\n};\n\n/**\n * Tenant object with optional attributes that can be provided with\n * values from `defaultValues`\n */\nexport type PartialTenant = Omit &\n Partial>;\n\nexport interface TenantState {\n entity: Tenant | null;\n}\n\nexport const setTenant = createAction(\n 'SET_TENANT',\n resolve => (tenant: PartialTenant) => resolve({ tenant }),\n);\n\nconst defaultState: TenantState = {\n entity: null,\n};\n\nconst checkDisclosure = (tenant: Tenant): void => {\n const disclosures = tenant.disclosures;\n const pre = disclosures.find(({ type }) => type === 'pre');\n const allInOne = disclosures.find(({ type }) => type === 'allInOne');\n // We assume both of these are present, so let's throw an error early\n // if they are missing.\n if (!pre || !allInOne) {\n throw new Error('Tenant must have both pre and allInOne disclosures');\n }\n};\n\nexport const tenantReducer = createReducer(defaultState, handleAction => [\n handleAction(setTenant, (state, { payload: { tenant } }) => {\n const fullTenant = mergeDeepWith(defaultTo, defaultValues, tenant);\n checkDisclosure(fullTenant);\n return set(lensProp('entity'), fullTenant, state);\n }),\n]);\n\nexport interface MountedState {\n tenant: TenantState;\n}\n\nexport const selectTenant = (\n state: MountedState & CreditAppMountedState & InstantCreditMountedState,\n): Tenant => {\n let {\n tenant: { entity: tenant },\n } = state;\n const creditApplication = selectCreditApplication(state);\n const instantCredit = selectInstantCredit(state);\n\n if (!tenant) throw new Error('Tenant presence expected');\n\n if (creditApplication.productChoiceKey) {\n const choice = tenant.enabledFeatures.productChoices.find(\n ({ key }) => key === creditApplication.productChoiceKey,\n );\n tenant = choice ? { ...tenant, ...choice.overrides } : tenant;\n }\n\n if (instantCredit.cardType && tenant.dspOverrides) {\n // We deep camelize the tenant config when we receive it, so all object\n // keys, including nested ones, would have been processed with camelcase\n // first.\n const dspOverride = tenant.dspOverrides[camelcase(instantCredit.cardType)];\n if (dspOverride) {\n tenant = mergeDeepRight(tenant, dspOverride) as Tenant;\n }\n }\n return tenant;\n};\nexport const isVisibleFn = (\n tenant: Tenant,\n name: keyof FieldCustomization,\n): boolean => {\n const field = tenant.fieldCustomizations[name];\n return field && 'visible' in field ? field.visible : false;\n};\n\nexport const isEnabledFn = (\n tenant: Tenant,\n feature: keyof FeatureMap,\n): boolean => {\n if (!tenant.enabledFeatures) return false;\n if (!has(feature, tenant.enabledFeatures)) return false;\n const featureVal = tenant.enabledFeatures[feature];\n if (!featureVal) return false;\n if (Array.isArray(featureVal)) return Boolean(featureVal.length);\n if (typeof featureVal === 'object')\n return Boolean(Object.keys(featureVal).length);\n return true;\n};\n\nexport const isGroupEnabledFn = (\n tenant: Tenant,\n group: Array,\n): boolean => {\n return group.some(feature => {\n return isEnabledFn(tenant, feature);\n });\n};\n\nexport const getDisclosureUrl = (\n tenant: Tenant,\n type: Disclosure['type'],\n): string => {\n const disclosure = find(propEq('type', type), tenant.disclosures);\n if (!disclosure) throw new Error('Disclosures presence expected');\n\n return disclosure.url;\n};\n\nexport default tenantReducer;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/,\n ),\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n (process as { env: { [key: string]: string } }).env.PUBLIC_URL,\n window.location.href,\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA',\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.',\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.',\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import { createAction, createReducer } from 'deox';\n\nexport interface Timeouts {\n /**\n * Number of seconds before displaying the warning dialog during the\n * application phase.\n */\n appWarning: number;\n\n /**\n * Number of seconds before resetting the application session.\n */\n appTimeout: number;\n\n /**\n * Number of seconds before displaying the warning dialog in the\n * credit limit screen.\n */\n instantCreditWarning: number;\n\n /**\n * Number of seconds before navigating away from the credit limit\n * screen.\n */\n instantCreditTimeout: number;\n\n sessionExtensionsMax: number;\n}\n\nexport interface TimeoutsState {\n entity: Timeouts | null;\n}\n\nexport interface MountedState {\n timeouts: TimeoutsState;\n}\n\nconst setTimeouts = createAction(\n 'SET_TIMEOUTS',\n resolve => (timeouts: Timeouts) => resolve(timeouts),\n);\n\nconst defaultState: TimeoutsState = {\n entity: null,\n};\n\nconst timeoutsReducer = createReducer(defaultState, handleAction => [\n handleAction(setTimeouts, (state, { payload: timeouts }) => ({\n ...state,\n entity: timeouts,\n })),\n]);\n\nconst selectTimeouts = ({\n timeouts: { entity: timeouts },\n}: MountedState): Timeouts => {\n if (!timeouts) throw new Error('Timeouts presence expected');\n\n return timeouts;\n};\n\nexport default timeoutsReducer;\n\nexport { setTimeouts, selectTimeouts };\n","import { combineReducers } from 'redux';\n\nimport authenticityToken from './authenticityToken';\nimport sessionToken from './sessionToken';\nimport analytics from './analytics';\nimport creditApplication from './creditApplication';\nimport instantCredit from './instantCredit';\nimport iovation from './iovation';\nimport storeLocations from './storeLocations';\nimport tenant from './tenant';\nimport timeouts from './timeouts';\nimport prescreen from './prescreen';\nimport otpCode from './otpCode';\nimport prequalOffer from './prequalOffer';\nimport consumerSearch from './consumerSearch';\nimport driversLicense from './driversLicense';\nimport enhancedCheckout from './enhancedCheckout';\nimport membershipValidation from './membershipValidation';\n\nconst reducer = combineReducers({\n authenticityToken,\n sessionToken,\n analytics,\n creditApplication,\n instantCredit,\n iovation,\n storeLocations,\n tenant,\n timeouts,\n prescreen,\n otpCode,\n prequalOffer,\n consumerSearch,\n driversLicense,\n enhancedCheckout,\n membershipValidation,\n});\n\nexport default reducer;\n\nexport type State = ReturnType;\n","import { createStore, applyMiddleware, Store } from 'redux';\nimport { composeWithDevTools } from 'redux-devtools-extension';\n\nimport rootReducer from 'state';\nimport window from 'window';\n\nconst preloadedState = window.__PRELOADED_STATE__;\ndelete window.__PRELOADED_STATE__;\n\nconst compose =\n window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || composeWithDevTools;\n\nexport default (): Store => {\n const store = createStore(\n rootReducer,\n preloadedState,\n compose(applyMiddleware()),\n );\n\n return store;\n};\n","/** @jsx jsx */\nimport { jsx, css, SerializedStyles } from '@emotion/core';\nimport { Theme, normalText } from 'features/Theme';\nimport { useSelector } from 'react-redux';\nimport { selectTenant } from 'state/tenant';\n\nimport { useTheme } from 'emotion-theming';\n\nconst headerContainer = (theme: Theme): SerializedStyles => {\n const { backgroundColor, textColor } = theme.header;\n\n const {\n spacing,\n typography: { fontWeightBold },\n } = theme.mui;\n\n return css`\n ${normalText(theme)}\n background-color: ${backgroundColor};\n color: ${textColor};\n text-align: center;\n text-transform: uppercase;\n padding: ${spacing(1)}px 0;\n font-weight: ${fontWeightBold};\n `;\n};\n\nexport const Header: React.FC = () => {\n const tenant = useSelector(selectTenant);\n const theme = useTheme();\n\n if (theme.embedded) {\n return null;\n }\n return
{tenant.name}
;\n};\n\nexport default Header;\n","import { useMemo } from 'react';\nimport { useSelector } from 'react-redux';\n\nimport useFeature from 'hooks/useFeature';\n\nimport { selectTenant, FeatureGroups } from 'state/tenant';\n\nconst useStartPageName = () => {\n const { isGroupEnabled } = useFeature();\n const {\n enabledFeatures: { cardChoices },\n } = useSelector(selectTenant);\n\n const startRoute = useMemo(() => {\n const hasCardChoice = cardChoices.length > 0;\n\n const hasConsumerSearch = isGroupEnabled(FeatureGroups['consumer-search']);\n\n if (hasCardChoice) {\n return 'card-choice';\n } else if (hasConsumerSearch) {\n return 'consumer-search';\n } else {\n return 'credit-application';\n }\n }, [cardChoices, isGroupEnabled]);\n\n return startRoute;\n};\n\nexport default useStartPageName;\n","import React, { useMemo } from 'react';\n\nimport CardChoice from 'features/CardChoice';\nimport ConsumerSearch from 'features/ConsumerSearch';\nimport CreditApplication from 'features/CreditApplication';\nimport ProductChoice from 'features/ProductChoice';\nimport { RouteComponentProps } from 'react-router';\n\nimport useStartPageName from './useStartPageName';\nimport { useTrackApplicationStart } from 'hooks/useAnalytics';\nimport useLoadInitialData from 'hooks/useLoadInitialData';\nimport useWorkflow, { Step } from 'hooks/useWorkflow';\n\nconst initialDataKeys = [\n 'firstName',\n 'lastName',\n 'address1',\n 'address2',\n 'city',\n 'state',\n 'zip',\n 'emailAddress',\n 'mobilePhone',\n 'alternativePhone',\n 'storeNumber',\n 'category',\n 'cardType',\n 'cartAmount',\n 'checkoutAmount',\n 'correlationData',\n 'customerNumber',\n 'loyaltyNumber',\n 'productAmount',\n 'sku',\n 'clientVariable1',\n 'clientVariable2',\n 'clientVariable3',\n 'clientVariable4',\n 'associateId',\n];\n\n/**\n * Entry point for the the Phone Lookup and Token Lookup workflows\n */\nconst Home: React.FC = props => {\n const { steps } = useWorkflow();\n\n useLoadInitialData(initialDataKeys);\n\n const startPageName = useStartPageName();\n useTrackApplicationStart(startPageName);\n\n const Component = useMemo(() => {\n switch (steps[0]) {\n case Step.CARD_CHOICE:\n return CardChoice;\n case Step.CONSUMER_SEARCH:\n return ConsumerSearch;\n case Step.APPLICATION:\n return CreditApplication;\n case Step.PRODUCT_CHOICE:\n return ProductChoice;\n default:\n // Uuuhh... not supposed to happen\n throw new Error(`Unexpected start route ${steps[0]}`);\n }\n }, [steps]);\n\n return ;\n};\n\nexport default Home;\n","import Home from './Home';\n\nexport default Home;\n","/** @jsx jsx */\nimport { FC, Fragment } from 'react';\nimport { jsx } from '@emotion/core';\nimport SimpleMessagePage from 'components/SimpleMessagePage';\nimport {\n useMarkdownTranslate,\n useMarkdownMultilineTranslate,\n} from 'hooks/useTranslate/useTranslate';\nimport CancelButton from 'features/CancelButton';\n\nconst LoyaltyNumberError: FC = () => {\n const tMd = useMarkdownTranslate();\n const tMdMultiline = useMarkdownMultilineTranslate();\n\n const content = (\n \n
{tMdMultiline(`home.loyaltyNumber.error.message`)}
\n
\n );\n\n return (\n \n \n \n );\n};\n\nexport default LoyaltyNumberError;\n","import { css, SerializedStyles } from '@emotion/core';\nimport { Theme } from 'features/Theme';\n\nimport { titleText } from 'features/Theme';\n\nexport default {\n headerTitle: (theme: Theme): SerializedStyles => css`\n ${titleText(theme)};\n margin-bottom: ${theme.mui.spacing(3)}px;\n text-align: center;\n `,\n\n body: (theme: Theme): SerializedStyles => css`\n margin-bottom: ${theme.mui.spacing(3)}px;\n `,\n\n startOver: (theme: Theme): SerializedStyles => css`\n text-transform: uppercase;\n color: ${theme.mui.palette.primary.main};\n `,\n};\n","/** @jsx jsx */\nimport React from 'react';\nimport { jsx } from '@emotion/core';\nimport PageContainer from 'components/PageContainer';\n\nimport { Box, Container } from '@material-ui/core';\nimport { Trans } from 'hooks/useTranslate';\nimport { useMarkdownTranslate } from 'hooks/useTranslate/useTranslate';\nimport styles from './styles';\nimport CancelButton from 'features/CancelButton';\nimport ActionButtonContainer from 'components/ActionButtonsContainer';\n\ninterface PropTypes {\n restartPath: string;\n}\nconst AppExpiredView: React.FC = ({ restartPath }) => {\n const tMd = useMarkdownTranslate();\n return (\n \n \n

{tMd('appExpired.title')}

\n\n \n

{tMd('appExpired.expirationMessage')}

\n\n

\n ,\n // Not applicable here because the anchor tag is passed into Trans component.\n // eslint-disable-next-line jsx-a11y/anchor-has-content\n ,\n ]}\n />\n

\n
\n\n \n \n \n
\n
\n );\n};\n\nexport default AppExpiredView;\n","import AppExpired from './AppExpired';\n\nexport default AppExpired;\n","import React, { useEffect } from 'react';\nimport qs from 'qs';\nimport AppExpiredView from './AppExpiredView';\nimport useFmcHost from 'hooks/useFmcHost';\nimport { applicationTimeout } from 'fmc-sdk';\nimport useWorkflow from 'hooks/useWorkflow';\nimport { useSecureQueryParameters } from 'hooks/useQueryParameters';\n\nconst AppExpired: React.FC = props => {\n const fmcDispatch = useFmcHost();\n const allowedQueryParameters = useSecureQueryParameters();\n const { timeoutRestartPath } = useWorkflow();\n\n const restartLinkPath = `${process.env.REACT_BASENAME ||\n ''}${timeoutRestartPath}/${qs.stringify(allowedQueryParameters, {\n addQueryPrefix: true,\n })}`.replace(/\\/\\//g, '/');\n\n useEffect(() => {\n fmcDispatch(applicationTimeout());\n }, [fmcDispatch]);\n return ;\n};\n\nexport default AppExpired;\n","import { css, SerializedStyles } from '@emotion/core';\nimport { Theme } from 'features/Theme';\n\nimport { titleText, subtitleText, normalText } from 'features/Theme';\n\nexport default {\n headerTitle: (theme: Theme): SerializedStyles => css`\n ${titleText(theme)};\n text-align: center;\n `,\n\n headerSubtitle: (theme: Theme): SerializedStyles => css`\n ${subtitleText(theme)};\n text-align: center;\n `,\n\n body: (theme: Theme): SerializedStyles => css`\n ${normalText(theme)};\n color: ${theme.mui.palette.text.secondary};\n text-align: center;\n margin-bottom: ${theme.mui.spacing(1)}px;\n `,\n\n startOver: (theme: Theme): SerializedStyles => css`\n text-transform: uppercase;\n color: ${theme.mui.palette.primary.main};\n `,\n};\n","/** @jsx jsx */\nimport React from 'react';\nimport { jsx } from '@emotion/core';\nimport { useTheme } from 'emotion-theming';\n\nimport useTranslate from 'hooks/useTranslate';\nimport { useMarkdownTranslate } from 'hooks/useTranslate/useTranslate';\nimport { Box, Container } from '@material-ui/core';\nimport EmbeddedContinueButton from 'features/EmbeddedContinueButton';\nimport PageContainer from 'components/PageContainer';\nimport Button from 'components/Button';\nimport Link from 'components/Link';\nimport { contentContainer } from 'features/Theme/mixins';\n\nimport styles from './styles';\nimport { Theme } from 'features/Theme';\n\ninterface PropTypes {\n canRetrieveDsp: boolean;\n}\n\nconst DspExpiredView: React.FC = props => {\n const { canRetrieveDsp } = props;\n const t = useTranslate();\n const tMd = useMarkdownTranslate();\n const theme = useTheme();\n\n return (\n \n \n \n

{tMd('dspExpired.title')}

\n\n {canRetrieveDsp ? (\n

\n {tMd('dspExpired.retrievalSubtitle')}\n

\n ) : null}\n\n \n

\n {canRetrieveDsp\n ? tMd('dspExpired.retrievalMessage')\n : tMd('dspExpired.expirationMessage')}\n

\n\n {(canRetrieveDsp || theme.embedded) && (\n \n {canRetrieveDsp ? (\n \n ) : null}\n \n
\n )}\n
\n \n \n \n );\n};\n\nexport default DspExpiredView;\n","import DspExpired from './DspExpired';\n\nexport default DspExpired;\n","import React, { useEffect } from 'react';\nimport { dspTimeout } from 'fmc-sdk';\nimport DspExpiredView from './DspExpiredView';\n\nimport useFeature from 'hooks/useFeature';\nimport useFmcHost from 'hooks/useFmcHost';\nimport { useDispatch } from 'react-redux';\nimport { resetInstantCredit } from 'state/instantCredit';\n\nconst DspExpired: React.FC = props => {\n const { isEnabled } = useFeature();\n const fmcDispatch = useFmcHost();\n const dispatch = useDispatch();\n\n useEffect(() => {\n dispatch(resetInstantCredit());\n }, [dispatch]);\n\n useEffect(() => {\n fmcDispatch(dspTimeout());\n }, [fmcDispatch]);\n\n return (\n \n );\n};\n\nexport default DspExpired;\n","import { css, SerializedStyles } from '@emotion/core';\nimport { Theme } from 'features/Theme';\n\nimport { titleText, normalText } from 'features/Theme';\n\nexport default {\n headerTitle: (theme: Theme): SerializedStyles => css`\n ${titleText(theme)};\n text-align: center;\n `,\n\n body: (theme: Theme): SerializedStyles => css`\n ${normalText(theme)};\n color: ${theme.mui.palette.text.secondary};\n text-align: center;\n margin-bottom: ${theme.mui.spacing(1)}px;\n `,\n\n startOver: (theme: Theme): SerializedStyles => css`\n text-transform: uppercase;\n color: ${theme.mui.palette.primary.main};\n `,\n};\n","/** @jsx jsx */\nimport React from 'react';\nimport { jsx } from '@emotion/core';\n\nimport useTranslate from 'hooks/useTranslate';\nimport { useMarkdownTranslate } from 'hooks/useTranslate/useTranslate';\nimport { Box, Container } from '@material-ui/core';\nimport PageContainer from 'components/PageContainer';\nimport Button from 'components/Button';\nimport Link from 'components/Link';\nimport styles from './styles';\nimport useWorkflow, { Step } from 'hooks/useWorkflow';\nimport CancelButton from 'features/CancelButton';\nimport ActionButtonContainer from 'components/ActionButtonsContainer';\nimport { contentContainer } from 'features/Theme';\n\nconst ExpiredView: React.FC = () => {\n const { pathAfter } = useWorkflow();\n const t = useTranslate();\n const tMd = useMarkdownTranslate();\n return (\n \n \n

{tMd('batchPrescreen.expired.title')}

\n\n \n \n \n \n \n \n {t('batchPrescreen.expired.continueButton')}\n \n\n \n \n \n
\n
\n );\n};\n\nexport default ExpiredView;\n","import Expired from './Expired';\n\nexport default Expired;\n","import React from 'react';\nimport ExpiredView from './ExpiredView';\n\nconst Expired: React.FC = props => {\n return ;\n};\n\nexport default Expired;\n","import { css, SerializedStyles } from '@emotion/core';\nimport { Theme } from 'features/Theme';\n\nimport { titleText, normalText } from 'features/Theme';\n\nexport default {\n headerTitle: (theme: Theme): SerializedStyles => css`\n ${titleText(theme)};\n text-align: center;\n `,\n\n body: (theme: Theme): SerializedStyles => css`\n ${normalText(theme)};\n color: ${theme.mui.palette.text.secondary};\n text-align: center;\n margin-bottom: ${theme.mui.spacing(1)}px;\n `,\n\n startOver: (theme: Theme): SerializedStyles => css`\n text-transform: uppercase;\n color: ${theme.mui.palette.primary.main};\n `,\n};\n","/** @jsx jsx */\nimport React from 'react';\nimport { jsx } from '@emotion/core';\n\nimport useTranslate from 'hooks/useTranslate';\nimport { useMarkdownTranslate } from 'hooks/useTranslate/useTranslate';\nimport { Box, Container } from '@material-ui/core';\nimport PageContainer from 'components/PageContainer';\nimport SkipPrefillButton from 'features/SkipPrefillButton';\nimport Link from 'components/Link';\nimport styles from './styles';\nimport useWorkflow, { Step } from 'hooks/useWorkflow';\nimport CancelButton from 'features/CancelButton';\nimport ActionButtonContainer from 'components/ActionButtonsContainer';\nimport { contentContainer } from 'features/Theme/mixins';\n\nconst ErrorView: React.FC = () => {\n const { pathAfter } = useWorkflow();\n const t = useTranslate();\n const tMd = useMarkdownTranslate();\n return (\n \n \n

{tMd('batchPrescreen.error.title')}

\n\n \n \n \n \n \n \n {t('batchPrescreen.error.continueButton')}\n \n\n \n \n \n
\n
\n );\n};\n\nexport default ErrorView;\n","import BatchPrescreenError from './Error';\n\nexport default BatchPrescreenError;\n","import React from 'react';\nimport ErrorView from './ErrorView';\n\nconst Expired: React.FC = props => {\n return ;\n};\n\nexport default Expired;\n","import { css, SerializedStyles } from '@emotion/core';\nimport { Theme } from 'features/Theme';\n\nimport { titleText, normalText } from 'features/Theme';\n\nexport default {\n headerTitle: (theme: Theme): SerializedStyles => css`\n ${titleText(theme)};\n text-align: center;\n `,\n\n body: (theme: Theme): SerializedStyles => css`\n ${normalText(theme)};\n color: ${theme.mui.palette.text.secondary};\n text-align: center;\n margin-bottom: ${theme.mui.spacing(1)}px;\n `,\n};\n","/** @jsx jsx */\nimport React from 'react';\nimport { jsx } from '@emotion/core';\n\nimport useTranslate from 'hooks/useTranslate';\nimport { useMarkdownTranslate } from 'hooks/useTranslate/useTranslate';\nimport { Box, Container } from '@material-ui/core';\nimport PageContainer from 'components/PageContainer';\nimport styles from './styles';\nimport CancelButton from 'features/CancelButton';\nimport ActionButtonContainer from 'components/ActionButtonsContainer';\nimport Button from 'components/Button';\n\ninterface PropTypes {\n restartPath: string;\n}\n\nconst ErrorView: React.FC = ({ restartPath }) => {\n const t = useTranslate();\n const tMd = useMarkdownTranslate();\n return (\n \n \n

{tMd('prequal.error.title')}

\n\n \n \n

{tMd('prequal.error.message')}

\n
\n\n \n \n {t('prequal.error.continueButton')}\n \n\n \n \n
\n
\n
\n );\n};\n\nexport default ErrorView;\n","import PrequalOfferError from './Error';\n\nexport default PrequalOfferError;\n","import React from 'react';\nimport qs from 'qs';\nimport ErrorView from './ErrorView';\nimport { useSecureQueryParameters } from 'hooks/useQueryParameters';\n\nconst Error: React.FC = props => {\n const allowedQueryParameters = useSecureQueryParameters();\n\n const restartPath = `${process.env.REACT_BASENAME ||\n ''}/prequal/phone-lookup${qs.stringify(allowedQueryParameters, {\n addQueryPrefix: true,\n })}`;\n\n return ;\n};\n\nexport default Error;\n","import { css, SerializedStyles } from '@emotion/core';\nimport { Theme } from 'features/Theme';\n\nimport { titleText, normalText } from 'features/Theme';\n\nexport default {\n headerTitle: (theme: Theme): SerializedStyles => css`\n ${titleText(theme)};\n text-align: center;\n `,\n\n body: (theme: Theme): SerializedStyles => css`\n ${normalText(theme)};\n color: ${theme.mui.palette.text.secondary};\n text-align: center;\n margin-bottom: ${theme.mui.spacing(1)}px;\n `,\n};\n","/** @jsx jsx */\nimport React from 'react';\nimport { jsx } from '@emotion/core';\n\nimport useTranslate from 'hooks/useTranslate';\nimport { useMarkdownTranslate } from 'hooks/useTranslate/useTranslate';\nimport { Box, Container } from '@material-ui/core';\nimport PageContainer from 'components/PageContainer';\nimport styles from './styles';\nimport CancelButton from 'features/CancelButton';\nimport ActionButtonContainer from 'components/ActionButtonsContainer';\nimport Button from 'components/Button';\nimport { contentContainer } from 'features/Theme';\n\ninterface PropTypes {\n restartPath: string;\n}\n\nconst ExpiredView: React.FC = ({ restartPath }) => {\n const t = useTranslate();\n const tMd = useMarkdownTranslate();\n return (\n \n \n

{tMd('prequal.expired.title')}

\n\n \n \n

{tMd('prequal.expired.message')}

\n
\n \n \n {t('prequal.expired.continueButton')}\n \n\n \n \n
\n
\n
\n );\n};\n\nexport default ExpiredView;\n","import Expired from './Expired';\n\nexport default Expired;\n","import React from 'react';\nimport qs from 'qs';\nimport ExpiredView from './ExpiredView';\nimport { useSecureQueryParameters } from 'hooks/useQueryParameters';\n\nconst Expired: React.FC = props => {\n const allowedQueryParameters = useSecureQueryParameters();\n\n const restartPath = `${process.env.REACT_BASENAME ||\n ''}/prequal/phone-lookup${qs.stringify(allowedQueryParameters, {\n addQueryPrefix: true,\n })}`;\n\n return ;\n};\n\nexport default Expired;\n","import React, { useMemo } from 'react';\nimport { useSelector } from 'react-redux';\n\nimport CardChoice from 'features/CardChoice';\nimport ProductChoice from 'features/ProductChoice';\nimport DriverLicenseStart from 'features/DriverLicense/DriverLicenseStart';\nimport ConsumerSearch from 'features/ConsumerSearch/ConsumerSearch';\nimport { RouteComponentProps } from 'react-router';\n\nimport { selectCreditApplication } from 'state/creditApplication';\nimport LoyaltyNumberError from 'features/Home/LoyaltyNumberError';\n\nimport useStartPageName from 'features/Home/useStartPageName';\nimport { useTrackApplicationStart } from 'hooks/useAnalytics';\nimport useLoadInitialData from 'hooks/useLoadInitialData';\nimport useWorkflow, { Step } from 'hooks/useWorkflow';\nimport useFieldCustomization from 'hooks/useFieldCustomization';\n\nconst initialDataKeys = [\n 'firstName',\n 'lastName',\n 'address1',\n 'address2',\n 'city',\n 'state',\n 'zip',\n 'emailAddress',\n 'mobilePhone',\n 'alternativePhone',\n 'storeNumber',\n 'category',\n 'cardType',\n 'cartAmount',\n 'checkoutAmount',\n 'correlationData',\n 'customerNumber',\n 'loyaltyNumber',\n 'productAmount',\n 'sku',\n 'clientVariable1',\n 'clientVariable2',\n 'clientVariable3',\n 'clientVariable4',\n 'associateId',\n];\n\nconst DriverLicenseHome: React.FC = props => {\n const { steps } = useWorkflow();\n\n useLoadInitialData(initialDataKeys);\n\n const startPageName = useStartPageName();\n useTrackApplicationStart(startPageName);\n\n const creditApplication = useSelector(selectCreditApplication);\n const { isRequired } = useFieldCustomization();\n\n const Component = useMemo(() => {\n switch (steps[0]) {\n case Step.CARD_CHOICE:\n return CardChoice;\n case Step.PRODUCT_CHOICE:\n return ProductChoice;\n case Step.CONSUMER_SEARCH:\n return ConsumerSearch;\n case Step.DRIVER_LICENSE_START:\n return DriverLicenseStart;\n default:\n //not supposed to happen\n throw new Error(`Unexpected start route ${steps[0]}`);\n }\n }, [steps]);\n\n if (isRequired('loyaltyNumber') && !creditApplication.loyaltyNumber) {\n return ;\n } else {\n return ;\n }\n};\n\nexport default DriverLicenseHome;\n","import DriverLicenseHome from './DriverLicenseHome';\n\nexport default DriverLicenseHome;\n","/** @jsx jsx */\nimport { FC } from 'react';\nimport { jsx } from '@emotion/core';\nimport SimpleMessagePage from 'components/SimpleMessagePage';\nimport CancelButton from 'features/CancelButton';\nimport {\n useMarkdownTranslate,\n useMarkdownMultilineTranslate,\n} from 'hooks/useTranslate/useTranslate';\n\nconst ValidationError: FC = () => {\n const tMd = useMarkdownTranslate();\n const tMdMultiline = useMarkdownMultilineTranslate();\n\n return (\n \n \n \n );\n};\n\nexport default ValidationError;\n","import { Theme } from 'features/Theme';\nimport { css, SerializedStyles } from '@emotion/core';\n\nconst style = (theme: Theme): SerializedStyles =>\n css`\n .MuiSnackbarContent-message {\n ${theme.mui.typography.body2};\n }\n `;\n\nexport default style;\n","import SnackbarProvider from './SnackbarProvider';\n\nexport default SnackbarProvider;\n","/** @jsx jsx */\nimport React from 'react';\nimport { jsx } from '@emotion/core';\n\nimport {\n SnackbarProvider as NotistackProvider,\n SnackbarProviderProps,\n} from 'notistack';\n\nimport styles from './styles';\n\ntype PropTypes = SnackbarProviderProps;\n\nconst SnackbarProvider: React.FC = props => {\n return (\n \n );\n};\n\nexport default SnackbarProvider;\n","import { useEffect, useCallback, useRef } from 'react';\nimport useTimeout from 'hooks/useTimeout';\n\n/**\n * These are the events we consider to be an user \"activity\", i.e. not idling.\n * Copied from react-idle-timer.\n */\nconst ACTIVITY_EVENTS = [\n 'mousemove',\n 'keydown',\n 'wheel',\n 'DOMMouseScroll',\n 'mouseWheel',\n 'mousedown',\n 'touchstart',\n 'touchmove',\n 'MSPointerDown',\n 'MSPointerMove',\n] as const;\n\n// Attach the above listeners to `document`\nconst addActivityListener = (handler: EventListener): void => {\n ACTIVITY_EVENTS.forEach(name => {\n document.addEventListener(name, handler, { passive: true });\n });\n};\n\n// Attach the above listeners to `document`\nconst removeActivityListener = (handler: EventListener): void => {\n ACTIVITY_EVENTS.forEach(name => {\n document.removeEventListener(name, handler);\n });\n};\n\ntype IdleTimerHook = (\n onIdle: Function,\n timeout: number,\n /**\n * Whether to use the timer\n * Note that the timer will start from the beginning when switching from\n * false to true (i.e., this is not a pause function)\n */\n enabled?: boolean,\n) => [\n // Start timer\n () => void,\n // Stop timer\n () => void,\n];\n\nconst useIdleTimer: IdleTimerHook = (onIdle, timeout, enabled = true) => {\n const [setTimeout, clearTimeout] = useTimeout();\n const activityListenerRef = useRef(null);\n\n const cleanup = useCallback(() => {\n if (activityListenerRef.current) {\n removeActivityListener(activityListenerRef.current);\n activityListenerRef.current = null;\n }\n }, [activityListenerRef]);\n\n const startTimer = useCallback(() => {\n cleanup();\n if (!enabled) {\n return;\n }\n\n const onActivity = (): void => {\n setTimeout(() => {\n cleanup();\n onIdle();\n }, timeout);\n };\n\n onActivity();\n addActivityListener(onActivity);\n activityListenerRef.current = onActivity;\n }, [setTimeout, onIdle, timeout, cleanup, enabled]);\n\n const stopTimer = useCallback(() => {\n cleanup();\n clearTimeout();\n }, [cleanup, clearTimeout]);\n\n useEffect(() => {\n startTimer();\n }, [startTimer]);\n\n useEffect(() => {\n return cleanup;\n }, [cleanup]);\n\n return [startTimer, stopTimer];\n};\n\nexport default useIdleTimer;\n","/** @jsx jsx */\nimport React from 'react';\nimport { jsx } from '@emotion/core';\nimport {\n Dialog,\n DialogTitle,\n DialogContent,\n DialogActions,\n DialogContentText,\n} from '@material-ui/core';\nimport Button from 'components/Button';\nimport { useMarkdownTranslate } from 'hooks/useTranslate/useTranslate';\n\ninterface DialogPropTypes {\n extendSession: () => void;\n endSession: () => void;\n}\n\nconst TimeoutDialog: React.FC = props => {\n const { extendSession, endSession } = props;\n const tMd = useMarkdownTranslate();\n\n return (\n \n \n {tMd('appTimeout.title')}\n \n \n {tMd('appTimeout.warning')}\n \n \n \n \n \n \n );\n};\n\ninterface PropTypes {\n warned: boolean;\n extendSession: () => void;\n endSession: () => void;\n}\nconst AppTimeoutModalView: React.FC = props => {\n const { warned, extendSession, endSession } = props;\n return (\n \n {warned && (\n \n )}\n {props.children}\n \n );\n};\n\nexport default AppTimeoutModalView;\n","import { useCallback, useState } from 'react';\n\nimport useIdleTimer from 'hooks/useIdleTimer';\n\ntype WarningHook = (\n /**\n * Number of seconds before displaying the warning dialog\n */\n warnAfter: number,\n /**\n * Number of times the warning timer can be reset.\n */\n maxExtensions: number,\n enabled?: boolean,\n) => [\n /**\n * Whether is warning should be shown\n */\n boolean,\n /**\n * Reset the warning timer (up to maxExtensions times)\n */\n () => void,\n];\n\nconst useWarning: WarningHook = (warnAfter, maxExtensions, enabled = true) => {\n const [warned, setWarned] = useState(false);\n const [extensions, setExtensions] = useState(0);\n\n const onWarning = useCallback(() => {\n setWarned(true);\n }, [setWarned]);\n\n const [resetTimer] = useIdleTimer(onWarning, warnAfter * 1000, enabled);\n\n const extendSession = useCallback(() => {\n setWarned(false);\n setExtensions(extensions + 1);\n if (extensions + 1 < maxExtensions) {\n resetTimer();\n }\n }, [resetTimer, setWarned, extensions, setExtensions, maxExtensions]);\n\n return [warned, extendSession];\n};\n\nexport default useWarning;\n","import React, { useCallback } from 'react';\nimport { useSelector } from 'react-redux';\nimport qs from 'qs';\nimport { selectTimeouts } from 'state/timeouts';\nimport useIdleTimer from 'hooks/useIdleTimer';\n\nimport AppTimeoutModalView from './AppTimeoutModalView';\n\nimport useWarning from './useWarning';\nimport useQueryParameters, {\n useSecureQueryParameters,\n} from 'hooks/useQueryParameters';\nimport useNavigationHelpers from 'hooks/useNavigationHelpers';\n\nconst useWarningTime = (): number => {\n const timeouts = useSelector(selectTimeouts);\n const { applicationWarningTime } = useQueryParameters();\n\n return applicationWarningTime || timeouts.appWarning;\n};\n\nconst useTimeoutTime = (): number => {\n const timeouts = useSelector(selectTimeouts);\n const { applicationTimeoutTime } = useQueryParameters();\n\n return applicationTimeoutTime || timeouts.appTimeout;\n};\n\nconst useMaxExtensions = (): number => {\n return 3;\n};\n\nconst AppTimeoutModal: React.FC = props => {\n const [warned, extendSession] = useWarning(\n useWarningTime(),\n useMaxExtensions(),\n );\n\n const allowedQueryParameters = useSecureQueryParameters();\n const timeoutAfter = useTimeoutTime();\n const { push } = useNavigationHelpers();\n const onTimeout = useCallback(() => {\n push({\n pathname: '/app-expired',\n search: qs.stringify(allowedQueryParameters, { addQueryPrefix: true }),\n });\n }, [allowedQueryParameters, push]);\n useIdleTimer(onTimeout, timeoutAfter * 1000);\n\n return (\n \n {props.children}\n \n );\n};\n\nexport default AppTimeoutModal;\n","/** @jsx jsx */\nimport React, { useContext } from 'react';\nimport { jsx } from '@emotion/core';\nimport {\n Dialog,\n DialogTitle,\n DialogContent,\n DialogActions,\n DialogContentText,\n} from '@material-ui/core';\nimport Button from 'components/Button';\nimport { useMarkdownTranslate } from 'hooks/useTranslate/useTranslate';\nimport ConsumerSearchContext from 'features/ReusableConsumerSearch/ConsumerSearchContext';\n\ninterface DialogPropTypes {\n extendSession: () => void;\n endSession: () => void;\n timeoutTime: number;\n}\n\nconst TimeoutDialog: React.FC = props => {\n const { extendSession, endSession, timeoutTime } = props;\n const { i18nPrefix } = useContext(ConsumerSearchContext);\n const tMd = useMarkdownTranslate();\n const formattedTimeoutTime = Math.floor(timeoutTime / 60);\n\n return (\n \n \n {tMd('dsp.appTimeout.title')}\n \n \n \n {tMd(`${i18nPrefix}dsp.appTimeout.warning`, {\n timeoutTime: formattedTimeoutTime,\n })}\n \n \n \n \n \n \n \n );\n};\n\ninterface PropTypes {\n warned: boolean;\n extendSession: () => void;\n endSession: () => void;\n timeoutTime: number;\n}\nconst DspTimeoutModalView: React.FC = props => {\n const { warned, extendSession, endSession, timeoutTime } = props;\n return (\n \n {warned && (\n \n )}\n {props.children}\n \n );\n};\n\nexport default DspTimeoutModalView;\n","import React, { useCallback, useLayoutEffect } from 'react';\nimport { useSelector } from 'react-redux';\nimport qs from 'qs';\nimport { selectTimeouts } from 'state/timeouts';\nimport { selectTenant } from 'state/tenant';\nimport {\n selectInstantCredit,\n selectInstantCreditTimedOut,\n} from 'state/instantCredit';\n\nimport useIdleTimer from 'hooks/useIdleTimer';\nimport useQueryParameters, {\n useSecureQueryParameters,\n} from 'hooks/useQueryParameters';\nimport useNavigationHelpers from 'hooks/useNavigationHelpers';\n\nimport useWarning from './useWarning';\nimport DspTimeoutModalView from './DspTimeoutModalView';\n\nconst useWarningTime = (): number => {\n const timeouts = useSelector(selectTimeouts);\n const { instantCreditWarningTime: queryWarningTime } = useQueryParameters();\n const { expirationType, expirationValue } = useSelector(selectInstantCredit);\n const { hideInstantCreditSessionWarning } = useSelector(selectTenant).session;\n\n let warningTime;\n\n if (expirationType === 'H' && expirationValue === 1) {\n warningTime = 28 * 60;\n } else if (expirationType !== null && expirationValue !== null) {\n warningTime = 58 * 60;\n }\n return hideInstantCreditSessionWarning\n ? 0\n : queryWarningTime || warningTime || timeouts.instantCreditWarning;\n};\n\nconst useTimeoutTime = (): number => {\n const timeouts = useSelector(selectTimeouts);\n const { instantCreditTimeoutTime: queryTimeoutTime } = useQueryParameters();\n const { expirationType, expirationValue } = useSelector(selectInstantCredit);\n const { useInstantCreditTspTimeout } = useSelector(selectTenant).session;\n // we only get back H & D, the S & M are for speedier testing\n const multipliers: { [mult: string]: number } = {\n S: 1,\n M: 60,\n H: 60 * 60,\n D: 60 * 60 * 24,\n };\n\n let timeoutTime = null;\n if (\n useInstantCreditTspTimeout &&\n expirationType &&\n Object.prototype.hasOwnProperty.call(multipliers, expirationType)\n ) {\n // Apparently expirationValue should always have a number in this case\n timeoutTime = (expirationValue as number) * multipliers[expirationType];\n } else {\n if (expirationType === 'H' && expirationValue === 1) {\n timeoutTime = 30 * 60;\n } else {\n timeoutTime = 60 * 60;\n }\n }\n return queryTimeoutTime || timeoutTime || timeouts.instantCreditTimeout;\n};\n\nconst useMaxExtensions = (): number => {\n const timeouts = useSelector(selectTimeouts);\n const { expirationType, expirationValue } = useSelector(selectInstantCredit);\n\n let maxExtensions;\n if (\n expirationType === 'H' &&\n (expirationValue === 1 || expirationValue === 2)\n ) {\n maxExtensions = 1;\n } else if (expirationType !== null && expirationValue !== null) {\n maxExtensions = 2;\n }\n\n return maxExtensions || timeouts.sessionExtensionsMax;\n};\n\nconst DspTimeoutModal: React.FC = props => {\n const { session: sessionConfig } = useSelector(selectTenant);\n const instantCreditTimedOut = useSelector(selectInstantCreditTimedOut);\n\n const [warned, extendSession] = useWarning(\n useWarningTime(),\n useMaxExtensions(),\n !sessionConfig.hideInstantCreditSessionWarning,\n );\n\n const allowedQueryParameters = useSecureQueryParameters();\n const timeoutAfter = useTimeoutTime();\n const { push } = useNavigationHelpers();\n\n const onTimeout = useCallback(() => {\n push({\n pathname: '/dsp-expired',\n search: qs.stringify(allowedQueryParameters, { addQueryPrefix: true }),\n });\n }, [allowedQueryParameters, push]);\n\n useLayoutEffect(() => {\n if (instantCreditTimedOut) {\n onTimeout();\n }\n }, [instantCreditTimedOut, onTimeout]);\n\n useIdleTimer(onTimeout, timeoutAfter * 1000);\n\n return (\n \n {instantCreditTimedOut ? null : props.children}\n \n );\n};\n\nexport default DspTimeoutModal;\n","import React from 'react';\n\nimport memoizee from 'memoizee';\n\nconst nest = (...components: React.ComponentType[]): React.ComponentType => {\n if (components.length === 0) {\n throw new Error('Compose must receive at least one component');\n }\n\n if (components.length === 1) {\n return components[0];\n }\n\n const [Parent, ...descendants] = components;\n const Child = nest(...descendants);\n\n const Nested: React.FC = ({ children }) => {\n return (\n \n {children}\n \n );\n };\n return Nested;\n};\n\n// Separate memoize call because nest is recursive, and memoizing\n// recursive cause infinite loop.\nconst memoizedNest = memoizee(nest, { length: false });\n\nexport { memoizedNest };\nexport default nest;\n","import React from 'react';\nimport { Route, RouteProps } from 'react-router';\nimport { memoizedNest } from 'utils/nest';\n\ntype PropType = RouteProps & {\n wrappers: React.ComponentType[];\n};\n\nconst WrappedRoute: React.FC = ({\n wrappers,\n component: Component,\n ...rest\n}) => {\n const Wrapper = memoizedNest(...wrappers);\n\n return (\n \n Component && (\n \n \n \n )\n }\n {...rest}\n />\n );\n};\n\nexport default WrappedRoute;\n","import React, { useContext, useEffect, useCallback, useState } from 'react';\nimport useReactRouter from 'use-react-router';\n\nimport Redirect from 'components/Redirect';\nimport useQueryParameters from 'hooks/useQueryParameters';\nimport useWorkflow from 'hooks/useWorkflow';\ninterface EntryToken {\n entryToken: string | null;\n createToken: () => void;\n clearToken: () => void;\n}\n\nconst EntryTokenContext = React.createContext(null);\n\n// Ported from previous app\n// TODO: figure out if this is necessary. Looks like a boolean flag may be\n// sufficient.\nconst generateToken = (): string =>\n Math.random()\n .toString(36)\n .substring(7);\n\n/**\n * Used to share the entry token across the app.\n * EntryRoute uses this to create token, and NonEntryRoute redirects to\n * root if the token does not exist. NoReturnRoute clears token if\n * token exists otherwise redirects to root\n */\nconst EntryTokenProvider: React.FC = ({ children }) => {\n const [entryToken, setEntryToken] = useState(null);\n\n const createToken = useCallback(() => {\n if (entryToken === null) {\n setEntryToken(generateToken());\n }\n }, [entryToken, setEntryToken]);\n\n const clearToken = useCallback(() => {\n setEntryToken(null);\n }, [setEntryToken]);\n\n const context: EntryToken = {\n entryToken,\n createToken,\n clearToken,\n };\n return (\n \n {children}\n \n );\n};\n\nconst EntryRoute: React.FC = ({ children }) => {\n const context = useContext(EntryTokenContext);\n useEffect(() => {\n if (context && !context.entryToken) {\n context.createToken();\n }\n }, [context]);\n return <>{children};\n};\n\nconst NonEntryRoute: React.FC = ({ children }) => {\n const { steps, pathFor } = useWorkflow();\n const {\n location: { search },\n } = useReactRouter();\n const context = useContext(EntryTokenContext);\n const { redirectToRoot } = useQueryParameters();\n\n useEffect(() => {\n // If enter via redirectToRoot, consider this an entry route (so that\n // NoReturnRoute works later)\n if (!redirectToRoot && context) {\n context.createToken();\n }\n }, [context, redirectToRoot]);\n\n if (!redirectToRoot || (context && context.entryToken)) {\n return <>{children};\n }\n // Ensure we preserve all query params on redirect.\n const to = {\n pathname: pathFor(steps[0]),\n search: search,\n };\n return ;\n};\n\nconst NoReturnRoute: React.FC = ({ children }) => {\n const { steps, pathFor } = useWorkflow();\n const context = useContext(EntryTokenContext);\n // Keep track of whether we have the entry token initially.\n // We can't count on the token from the context because once we clear\n // it in the effect, the component will re-render and immediately redirect.\n const [initialToken] = useState(context && context.entryToken);\n const {\n location: { search },\n } = useReactRouter();\n\n useEffect(() => {\n if (context) {\n context.clearToken();\n }\n }, [context]);\n\n if (!initialToken) {\n const to = {\n pathname: pathFor(steps[0]),\n search: search,\n };\n\n return ;\n }\n\n return <>{children};\n};\nexport { EntryTokenProvider, EntryRoute, NonEntryRoute, NoReturnRoute };\n","import { css, SerializedStyles } from '@emotion/core';\nimport { Theme, normalText, titleText } from 'features/Theme';\n\nconst styles = {\n titleText: (theme: Theme): SerializedStyles => css`\n ${titleText(theme)}\n text-align: center;\n `,\n subtitleText: (theme: Theme): SerializedStyles => css`\n ${titleText(theme)}\n text-align: center;\n `,\n normalText: (theme: Theme): SerializedStyles => css`\n ${normalText(theme)}\n text-align: center;\n color: ${theme.mui.palette.text.secondary};\n `,\n};\n\nexport default styles;\n","/** @jsx jsx */\nimport React from 'react';\nimport { jsx } from '@emotion/core';\nimport log from 'loglevel';\n\nimport { Box } from '@material-ui/core';\n\nimport PageContainer from 'components/PageContainer';\n\nimport styles from './styles';\nimport { withTranslation, WithTranslation } from 'react-i18next';\nimport ActionButtonContainer from 'components/ActionButtonsContainer';\nimport CancelButton from 'features/CancelButton';\nimport Button from 'components/Button';\n\ntype PropTypes = WithTranslation;\ninterface State {\n hasError: boolean;\n}\n\nclass ErrorBoundary extends React.Component {\n public constructor(props: PropTypes) {\n super(props);\n\n this.state = {\n hasError: false,\n };\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public static getDerivedStateFromError(error: any): State {\n log.error(error);\n return { hasError: true };\n }\n\n public render(): React.ReactNode {\n if (!this.state.hasError) {\n return this.props.children;\n }\n\n const { t } = this.props;\n\n return (\n \n \n

{t('genericError.errorTitle')}

\n
\n\n \n \n

{t('genericError.title')}

\n
\n\n

{t('genericError.errorMessage')}

\n\n \n \n \n \n \n \n
\n
\n );\n }\n}\n\n// This component cannot have override because the error can be anywhere in the\n// app and the tenant data may not be available.\nexport default withTranslation()(ErrorBoundary);\n","import UnloadPrompt from './UnloadPrompt';\n\nexport default UnloadPrompt;\n","import React, { useEffect, useRef } from 'react';\n\n/**\n * Prompt the user for confirmation before unloading the page.\n * This only comes in effect when the user navigate out of the app.\n */\n\nconst UnloadPrompt: React.FC = ({ children }) => {\n const ref = useRef(null);\n\n useEffect(() => {\n if (typeof window === 'undefined') {\n return;\n }\n const callback = (event: Event): string => {\n event.preventDefault();\n\n // Required by Chrome\n // https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload\n event.returnValue = true;\n\n // The message _might_ be used by IE. It's not used by Chrome and Firefox.\n return 'You will lose all progress if you leave.';\n };\n\n window.addEventListener('beforeunload', callback);\n ref.current = callback;\n\n return () => {\n ref.current && window.removeEventListener('beforeunload', ref.current);\n };\n }, []);\n\n return {children};\n};\n\nexport default UnloadPrompt;\n","import { useRef, useCallback } from 'react';\n\nimport debounce from 'lodash.debounce';\n\nconst mutationObserverConfig = {\n childList: true,\n attributes: true,\n characterData: false,\n subtree: true,\n attributeFilter: ['class'],\n attributeOldValue: false,\n characterDataOldValue: false,\n};\n\ntype HeightObserverHook = {\n /**\n * Create a height mutation observer for the given DOM node.\n * Return a clean up function used to disconnect the observer.\n */\n observeHeight: (\n dom: HTMLElement,\n onHeightChange: (height: number) => void,\n ) => () => void;\n};\n\nconst useHeightObserver = (): HeightObserverHook => {\n const previousHeight = useRef(null);\n\n const observeHeight = useCallback(\n (dom: HTMLElement, onHeightChange: (height: number) => void) => {\n if (!('MutationObserver' in window)) {\n return () => {\n // No-op if MutationObserver is not supported\n };\n }\n\n const updateHeight = () => {\n // Per MDN: scrollHeight is equal to \"the minimum height the element\n // would require in order to fit all the content in the viewport\n // without using a vertical scrollbar ... it includes the element's\n // padding, but not its border, margin or horizontal scrollbar.\"\n //\n // But in testing, it seems like scrollHeight, offsetHeight, and\n // clientHeight are always the same when applied to the body element.\n const height = dom.scrollHeight;\n\n if (height !== previousHeight.current) {\n previousHeight.current = height;\n onHeightChange(height);\n }\n };\n\n const observer = new MutationObserver(updateHeight);\n\n observer.observe(dom, mutationObserverConfig);\n\n const debounced = debounce(\n () => {\n updateHeight();\n },\n 50,\n { maxWait: 200 },\n );\n window.addEventListener('resize', debounced);\n\n // Dispatch the initial height.\n if (!previousHeight.current) {\n updateHeight();\n }\n\n return () => {\n observer.disconnect();\n window.removeEventListener('resize', debounced);\n };\n },\n [previousHeight],\n );\n\n return { observeHeight };\n};\n\nexport default useHeightObserver;\n","import EmbeddedBackButton from './EmbeddedBackButton';\n\nexport default EmbeddedBackButton;\n","/** @jsx jsx */\n\nimport React, { useCallback } from 'react';\nimport { jsx } from '@emotion/core';\nimport useReactRouter from 'use-react-router';\nimport useNavigationHelpers from 'hooks/useNavigationHelpers';\nimport useWorkflow from 'hooks/useWorkflow';\nimport { useTheme } from 'emotion-theming';\nimport { Theme } from 'features/Theme';\nimport Button from 'components/Button';\n\nimport ChevronLeftIcon from '@material-ui/icons/ChevronLeft';\nimport { Box } from '@material-ui/core';\nimport useTranslate from 'hooks/useTranslate';\n\nconst EmbeddedBackButton: React.FC = () => {\n const { goBack } = useNavigationHelpers();\n const theme = useTheme();\n const {\n location: { pathname },\n } = useReactRouter();\n const {\n steps,\n workflow: { paths },\n } = useWorkflow();\n const t = useTranslate();\n const handleClick = useCallback(() => {\n goBack();\n }, [goBack]);\n\n if (!theme.embedded || pathname === paths[steps[0]]) {\n return null;\n }\n\n return (\n \n \n \n );\n};\n\nexport default EmbeddedBackButton;\n","import ApplicationLayout from './ApplicationLayout';\n\nexport default ApplicationLayout;\n","import React from 'react';\nimport EmbeddedBackButton from 'features/EmbeddedBackButton';\n\nconst ApplicationLayout: React.FC = ({ children }) => {\n return (\n
\n \n {children}\n
\n );\n};\n\nexport default ApplicationLayout;\n","import React from 'react';\n\nimport ApplicationLayout from 'components/ApplicationLayout';\nimport AppTimeoutModal from 'features/TimeoutModal/AppTimeoutModal';\nimport UnloadPrompt from 'components/UnloadPrompt';\n\nconst ApplicationRoute: React.FC = ({ children }) => {\n return (\n \n \n {children}\n \n \n );\n};\n\nexport default ApplicationRoute;\n","import React, { useMemo, useEffect, useRef } from 'react';\nimport useReactRouter from 'use-react-router';\nimport window from 'window';\nimport qs from 'query-string';\n\nimport log from 'loglevel';\n\nimport { Switch, Route } from 'react-router-dom';\nimport Header from 'features/Header';\n\nimport Home from 'features/Home';\n\nimport ProductChoice from 'features/ProductChoice';\nimport CardChoice from 'features/CardChoice';\nimport ConsumerSearch from 'features/ConsumerSearch';\nimport EnhancedCheckoutConsumerSearch, {\n EnhancedCheckoutError,\n} from 'features/enhancedCheckout/ConsumerSearch';\nimport CreditApplication from 'features/CreditApplication';\nimport MembershipValidation from 'features/MembershipValidation';\nimport LoyaltyNumberError from 'features/Home/LoyaltyNumberError';\nimport ClerkMode from 'features/ClerkMode';\nimport AddOns from 'features/AddOns';\nimport ReviewTerms from 'features/ReviewTerms';\nimport AppExpired from 'features/AppExpired';\nimport DspExpired from 'features/DspExpired';\nimport PrescreenOffer from 'features/prescreen/PrescreenOffer';\nimport BatchPrescreenStart from 'features/prescreen/BatchPrescreenStart';\nimport BatchPrescreenExpired from 'features/prescreen/BatchPrescreenStart/Expired';\nimport BatchPrescreenError from 'features/prescreen/BatchPrescreenStart/Error';\nimport FallbackReviewTerms from 'features/prescreen/FallbackReviewTerms';\nimport FallbackApplication from 'features/prescreen/FallbackApplication';\nimport PrequalFallbackApplication from 'features/prequal/FallbackApplication';\nimport PrequalConsumerSearch from 'features/prequal/ConsumerSearch';\nimport PrequalDecline from 'features/prequal/Decline';\nimport PrequalOffer from 'features/prequal/PrequalOffer';\nimport PrequalOfferPush from 'features/prequal/PrequalOfferPush';\nimport PrequalOfferError from 'features/prequal/PrequalOfferPush/Error';\nimport PrequalOfferExpired from 'features/prequal/PrequalOfferPush/Expired';\nimport PrequalOfferApplication, {\n PrequalOfferApplicationError,\n PrequalOfferApplicationPending,\n PrequalOfferApplicationNotQualified,\n PrequalOfferApplicationExistingPreapproval,\n} from 'features/prequal/PrequalOfferApplication';\nimport PrequalOfferPushApplication from 'features/prequal/PrequalOfferPushApplication';\nimport PrequalFallbackReviewTerms from 'features/prequal/FallbackReviewTerms';\nimport DriverLicenseStart from 'features/DriverLicense/DriverLicenseStart';\nimport DriverLicenseHome from 'features/DriverLicense/DriverLicenseHome';\nimport DriverLicenseError from 'features/DriverLicense/DriverLicenseError';\nimport ScanPage from 'features/DriverLicense/ScanPage';\nimport PrequalDriverLicenseHome from 'features/prequal/PrequalDriverLicenseHome';\n\nimport CreditPending from 'features/CreditPending';\nimport ExistingAccount from 'features/ExistingAccount';\nimport ExistingAccountValidationError from 'features/ExistingAccount/ValidationError';\nimport CreditError from 'features/CreditError';\nimport DspStart from 'features/DspStart';\nimport DspError from 'features/DspError';\nimport DspRetrieval from 'features/DspRetrieval';\nimport ThemeProvider from 'features/Theme';\nimport SnackbarProvider from 'components/SnackbarProvider';\n\nimport AppTimeoutModal from 'features/TimeoutModal/AppTimeoutModal';\nimport DspTimeoutModal from 'features/TimeoutModal/DspTimeoutModal';\nimport ResetApplicationRoute from 'features/ResetApplicationRoute';\nimport WrappedRoute from 'routes/WrappedRoute';\n\nimport {\n EntryTokenProvider,\n EntryRoute,\n NonEntryRoute,\n NoReturnRoute,\n} from 'routes/EntryProtectedRoute';\n\nimport { useSelector, useDispatch } from 'react-redux';\nimport { useTranslation } from 'react-i18next';\nimport { selectTenant } from 'state/tenant';\nimport { IovationProvider } from 'hooks/useIovation';\nimport useFeature from 'hooks/useFeature';\nimport { TrackedRoute } from 'hooks/useAnalytics';\nimport useFmcHost, { FmcHostProvider } from 'hooks/useFmcHost';\nimport useFieldCustomization from 'hooks/useFieldCustomization';\n\nimport Redirect from 'components/Redirect';\nimport ErrorBoundary from 'components/ErrorBoundary/ErrorBoundary';\nimport nest from 'utils/nest';\nimport UnloadPrompt from 'components/UnloadPrompt';\nimport useWorkflow, { Step } from 'hooks/useWorkflow';\nimport { mergeApplication } from 'state/creditApplication';\nimport { loadAdobeTrackingId, heightChanged } from 'fmc-sdk';\nimport useHeightObserver from 'hooks/useHeightObserver';\nimport Approval from 'features/Approval';\nimport useAnalyticsVariables from 'hooks/useAnalyticVariables';\nimport canUseDOM from 'utils/canUseDOM';\nimport ApplicationRoute from 'routes/ApplicationRoute';\nimport { ResponsiveQueryProvider } from 'hooks/useResponsiveQuery';\n\nconst App: React.FC = () => {\n const { i18n } = useTranslation();\n const {\n stringsFileName,\n overrideConfig: { clerkMode },\n } = useSelector(selectTenant);\n\n const { isEnabled } = useFeature();\n const { hasStep } = useWorkflow();\n const dispatch = useDispatch();\n const fmcDispatch = useFmcHost();\n\n const { isRequired, isVisible } = useFieldCustomization();\n\n const { observeHeight } = useHeightObserver();\n\n const { setAnalyticsVariablesOnLoad } = useAnalyticsVariables();\n const { location } = useReactRouter();\n\n const { associateId, loyaltyNumber } = useMemo(() => {\n return qs.parse(location.search, {\n parseBooleans: true,\n });\n }, [location.search]);\n\n const hasClerkMode = useMemo(() => {\n return clerkMode && !associateId && isEnabled('clerkMode');\n }, [associateId, clerkMode, isEnabled]);\n\n const analyticsVariableSet = useRef(false);\n if (!analyticsVariableSet.current && canUseDOM) {\n // We do this once on the first render on the client side to make sure it is\n // earlier than other tracking calls.\n setAnalyticsVariablesOnLoad();\n analyticsVariableSet.current = true;\n }\n\n useMemo(() => {\n i18n.setDefaultNamespace(stringsFileName || 'default');\n }, [i18n, stringsFileName]);\n\n useEffect(() => {\n if ('_satellite' in window) {\n let mcid: null | string = null;\n // We'll swallow all errors from the analytics suite and log it instead\n // to prevent it from breaking the app.\n try {\n mcid = window._satellite.getVisitorId().getMarketingCloudVisitorID();\n } catch (e) {\n log.error(e);\n }\n if (mcid) {\n fmcDispatch(loadAdobeTrackingId(mcid));\n dispatch(mergeApplication({ mcid }));\n }\n } else {\n log.warn('Adobe Satellite not loaded');\n }\n }, [dispatch, fmcDispatch, setAnalyticsVariablesOnLoad]);\n\n useEffect(() => {\n const onHeightChange = (height: number) => {\n fmcDispatch(heightChanged(height));\n };\n\n return observeHeight(document.body, onHeightChange);\n }, [observeHeight, fmcDispatch]);\n\n const hasLoyaltyNumberError = useMemo(() => {\n return (\n isRequired('loyaltyNumber') &&\n !isVisible('loyaltyNumber') &&\n !loyaltyNumber\n );\n }, [isRequired, isVisible, loyaltyNumber]);\n\n return (\n
\n
\n \n \n \n {hasLoyaltyNumberError && }\n\n {hasClerkMode && (\n \n )}\n\n {hasClerkMode && !canUseDOM && }\n\n {hasStep(Step.PRODUCT_CHOICE) ? (\n \n ) : null}\n\n {hasStep(Step.CARD_CHOICE) ? (\n \n ) : null}\n\n {hasStep(Step.CONSUMER_SEARCH) ? (\n \n ) : null}\n\n won't be matched.\n path=\"/credit-application\"\n wrappers={[TrackedRoute, NonEntryRoute, ApplicationRoute]}\n component={CreditApplication}\n />\n\n {hasStep(Step.ADD_ONS) ? (\n \n ) : null}\n\n \n\n {/** DSP PUSH */}\n\n {isEnabled('dspPush') ? (\n \n ) : null}\n\n {isEnabled('dspRetrieval') ? (\n \n ) : null}\n\n {/** PRESCREEN */}\n\n \n\n \n\n \n\n \n\n \n\n \n\n {/* PREQUAL */}\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n {/** Enhanced checkout */}\n\n \n\n \n\n {/** Membership Validation */}\n\n \n\n {/** Driver License Scan Route **/}\n\n \n\n \n\n \n\n \n\n \n\n {/** Ending routes */}\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n {/** I had to move this to the bottom of the file, the reason for this is I had to remove the exact from the wrappedRoute as it renders multiple routes.\n * when the exact was removed this was matching all of the routes as it matches from top down.\n */}\n \n\n {process.env.NODE_ENV === 'development' ? (\n \n ) : null}\n\n {\n log.info(`${location.pathname} not found.`);\n return ;\n }}\n />\n \n \n
\n );\n};\n\nconst WithProviders = nest(\n ThemeProvider,\n SnackbarProvider,\n EntryTokenProvider,\n IovationProvider,\n FmcHostProvider,\n ResponsiveQueryProvider,\n);\n\n/**\n * The App component is nested because it depends on values provided\n * by the providers in its lifecycle.\n */\nconst AppWithProviders: React.FC = () => {\n return (\n \n \n \n );\n};\n\nexport default AppWithProviders;\n","import i18n from 'i18next';\nimport { initReactI18next } from 'react-i18next';\n\ni18n\n .use(initReactI18next) // passes i18n down to react-i18next\n .init({\n fallbackLng: 'en',\n defaultNS: 'default',\n fallbackNS: 'default',\n\n interpolation: {\n escapeValue: false, // react already safes from xss\n },\n });\n\nexport default i18n;\n","import 'react-app-polyfill/ie11';\nimport 'react-app-polyfill/stable';\nimport 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport * as serviceWorker from './serviceWorker';\nimport configureStore from 'store/configureStore';\n\nimport { loadableReady } from '@loadable/component';\n\nimport App from './App';\nimport { Provider } from 'react-redux';\nimport { Router } from 'react-router-dom';\nimport { createBrowserHistory } from 'history';\nimport { wrapHistory } from 'oaf-react-router';\n\nimport { UserAgentProvider } from 'hooks/useUAParser';\nimport { useSSR } from 'react-i18next';\nimport 'utils/i18n';\n\nimport log from 'loglevel';\n\nif (process.env.NODE_ENV === 'development') {\n log.setLevel(log.levels.DEBUG);\n}\n\nprocess.env.REACT_BASENAME = process.env.REACT_BASENAME || '';\n\nconst history = createBrowserHistory({\n basename: process.env.REACT_BASENAME,\n});\nwrapHistory(history);\n\nconst ClientApp: React.FC = () => {\n useSSR(window.__INITIAL_I18N_STORE__, window.__INITIAL_LANGUAGE__);\n const store = configureStore();\n if (window.Cypress) {\n window.store = store;\n }\n\n return (\n \n \n \n \n \n \n \n );\n};\n\nloadableReady(() => {\n ReactDOM.hydrate(, document.getElementById('root'));\n});\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n","const canUseDOM = Boolean(\n // Copy React's method of detecting SSR or browser environment\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement,\n);\n\nexport default canUseDOM;\n","import { useCallback, useMemo } from 'react';\nimport {\n pickBy,\n isNil,\n pick,\n complement,\n pipe,\n propEq,\n find,\n set,\n lensPath,\n} from 'ramda';\nimport useQueryParameters from 'hooks/useQueryParameters';\nimport window from 'window';\nimport useReactRouter from 'use-react-router';\nimport qs from 'query-string';\nimport { CreditApplication, isOptInOrOptOut } from 'state/creditApplication';\nimport { useSelector } from 'react-redux';\nimport { selectTenant, Tenant } from 'state/tenant';\nimport { useDeferredAnalytics } from './useAnalytics';\n\nexport interface AnalyticsVariables {\n epId?: string;\n callId?: string;\n epPlacementId?: string;\n clientName?: string;\n pixelType?: string;\n urlPath?: string;\n epSessionId?: string;\n epMessageId?: string;\n location?: string;\n workflow?: string;\n embedded?: string;\n consumerSearchSuccessful?: string;\n isSufficientPrefill?: string;\n hasAccountAssure?: string;\n hasAuthBuyer?: string;\n productChoiceSelection?: string;\n coBrandOptIn?: string;\n coBrandOptOut?: string;\n pageName?: string;\n accountId?: string;\n applicationId?: string;\n divisionNumber?: string;\n}\n\nconst evarMapping = {\n epId: 'eVar6',\n callId: 'eVar9',\n epPlacementId: 'eVar11',\n clientName: 'eVar12',\n urlPath: 'eVar13',\n epSessionId: 'eVar14',\n epMessageId: 'eVar15',\n location: 'eVar17',\n workflow: 'eVar18',\n embedded: 'eVar19',\n consumerSearchSuccessful: 'eVar20',\n isSufficientPrefill: 'eVar21',\n hasAccountAssure: 'eVar22',\n hasAuthBuyer: 'eVar23',\n productChoiceSelection: 'eVar24',\n coBrandOptIn: 'eVar26',\n coBrandOptOut: 'eVar27',\n pageName: undefined,\n pixelType: undefined,\n accountId: undefined,\n applicationId: undefined,\n divisionNumber: undefined,\n} as const;\n\nconst mapAnalyticsVariables = {\n clientName: ['client', 'clientName'],\n pixelType: ['client', 'pixelType'],\n pageName: ['page', 'pageName'],\n isSufficientPrefill: ['application', 'isSufficientPrefill'],\n productChoiceSelection: ['application', 'productChoiceSelection'],\n consumerSearchSuccessful: ['application', 'consumerSearchSuccessful'],\n coBrandOptIn: ['application', 'coBrandOptIn'],\n coBrandOptOut: ['application', 'coBrandOptOut'],\n workflow: ['application', 'workflow'],\n hasAccountAssure: ['application', 'hasAccountAssure'],\n hasAuthBuyer: ['application', 'hasAuthBuyer'],\n epId: ['enhancedPresentment', 'epId'],\n callId: ['application', 'callId'],\n epPlacementId: ['enhancedPresentment', 'epPlacementId'],\n epSessionId: ['enhancedPresentment', 'epSessionId'],\n epMessageId: ['enhancedPresentment', 'epMessageId'],\n location: ['enhancedPresentment', 'location'],\n urlPath: ['enhancedPresentment', 'urlPath'],\n embedded: ['enhancedPresentment', 'embedded'],\n accountId: ['application', 'accountId'],\n applicationId: ['application', 'applicationId'],\n divisionNumber: ['client', 'divisionNumber'],\n} as const;\n\nexport type AnalyticsVariablesHook = () => {\n setAnalyticsVariablesOnLoad: () => void;\n setAnalyticsVariablesByApplication: (application: CreditApplication) => void;\n setAnalyticsVariables: (variables: AnalyticsVariables) => void;\n};\n\nconst findProductChoice = (tenant: Tenant, productChoiceKey: string | null) => {\n if (!tenant.enabledFeatures.productChoices || !productChoiceKey) {\n return null;\n }\n return find(\n propEq('key', productChoiceKey),\n tenant.enabledFeatures.productChoices,\n );\n};\n\nexport const useAnalyticsVariables: AnalyticsVariablesHook = () => {\n const tenant = useSelector(selectTenant);\n const { workflow, embedded } = useQueryParameters();\n const {\n location: { search },\n } = useReactRouter();\n\n const query = useMemo(() => {\n const result = qs.parse(search, {\n parseBooleans: true,\n });\n result.embedded = embedded;\n result.workflow = workflow;\n\n return result;\n }, [search, embedded, workflow]);\n\n const setEvar = useDeferredAnalytics(\n useCallback(\n (key: keyof AnalyticsVariables, value: string | undefined): void => {\n const { s: siteCatalystAnalytics } = window;\n\n if (!siteCatalystAnalytics) {\n return;\n }\n\n const mapped = evarMapping[key];\n if (mapped) siteCatalystAnalytics[mapped] = value;\n },\n [],\n ),\n );\n\n const setAnalyticsVariable = useCallback(\n (key: keyof AnalyticsVariables, value: string | undefined): void => {\n // Data layer\n window.digitalData = set(\n lensPath(mapAnalyticsVariables[key].flat()),\n value,\n window.digitalData,\n );\n\n // Evars\n setEvar(key, value);\n },\n [setEvar],\n );\n\n const setAnalyticsVariables = useCallback(\n (variables: Partial): void => {\n const existingKeys = Object.keys(variables);\n existingKeys.forEach((key, _) => {\n setAnalyticsVariable(\n key as keyof AnalyticsVariables,\n variables[key as keyof AnalyticsVariables],\n );\n });\n },\n [setAnalyticsVariable],\n );\n\n const setAnalyticsVariablesOnLoad = useCallback((): void => {\n const variables = pipe(\n pick([\n 'epId',\n 'epPlacementId',\n 'clientName',\n 'urlPath',\n 'epSessionId',\n 'epMessageId',\n 'location',\n 'workflow',\n 'embedded',\n ]),\n pickBy(complement(isNil)),\n )(query) as Partial;\n\n variables.consumerSearchSuccessful = 'false';\n variables.isSufficientPrefill = 'false';\n\n variables.divisionNumber = tenant.divisionNumber;\n if (tenant.enabledFeatures.pixelTracking) {\n variables.pixelType = tenant.enabledFeatures.pixelTracking.type;\n }\n\n if (tenant.divisionNumber) {\n setAnalyticsVariables({ divisionNumber: tenant.divisionNumber });\n }\n\n setAnalyticsVariables(variables);\n }, [\n query,\n tenant.divisionNumber,\n tenant.enabledFeatures.pixelTracking,\n setAnalyticsVariables,\n ]);\n\n const setAnalyticsVariablesByApplication = useCallback(\n (application: CreditApplication) => {\n if (tenant.enabledFeatures.accountAssure) {\n setAnalyticsVariables({\n hasAccountAssure: application.accountAssure ? 'true' : 'false',\n });\n }\n\n if (tenant.enabledFeatures.authBuyer) {\n setAnalyticsVariables({\n hasAuthBuyer: application.authBuyer ? 'true' : 'false',\n });\n }\n\n if (tenant.enabledFeatures.productChoices) {\n const choice = findProductChoice(tenant, application.productChoiceKey);\n if (choice)\n setAnalyticsVariables({ productChoiceSelection: choice.cardType });\n }\n\n if (tenant.enabledFeatures.optInOut) {\n const optInOrOut = isOptInOrOptOut(application, tenant);\n if (tenant.enabledFeatures.optInOut.type === 'optIn') {\n setAnalyticsVariables({\n coBrandOptIn: optInOrOut === 'optIn' ? 'true' : 'false',\n });\n } else {\n setAnalyticsVariables({\n coBrandOptOut: optInOrOut === 'optOut' ? 'true' : 'false',\n });\n }\n }\n },\n [setAnalyticsVariables, tenant],\n );\n\n return {\n setAnalyticsVariables,\n setAnalyticsVariablesOnLoad,\n setAnalyticsVariablesByApplication,\n };\n};\n\nexport default useAnalyticsVariables;\n","/** @jsx jsx */\nimport { css } from '@emotion/core';\n\nconst styles = {\n link: css`\n text-decoration: none;\n `,\n};\n\nexport default styles;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport React from 'react';\nimport { Link as RRLink, LinkProps } from 'react-router-dom';\n\nimport { useCondensedQueryParameters } from 'hooks/useQueryParameters';\nimport { mergeLocation } from 'hooks/useNavigationHelpers';\n\nimport styles from './styles';\n\nconst Link: React.FC = React.forwardRef(\n ({ to, ...linkProps }, ref) => {\n const params = useCondensedQueryParameters();\n to = mergeLocation(params, to);\n return ;\n },\n);\n\nexport default Link;\n","import Link from './Link';\nexport default Link;\n","import { css, SerializedStyles } from '@emotion/core';\nimport { Theme } from './theme';\n\n// Typeography mixins based on Material UI Type Scale System:\n// https://material.io/design/typography/#type-scale\n\nexport const normalText = (theme: Theme): SerializedStyles => css`\n ${theme.mui.typography.body1}\n color: ${theme.mui.palette.text.primary};\n`;\n\nexport const titleText = (theme: Theme): SerializedStyles => css`\n ${theme.mui.typography.h5}\n color: ${theme.mui.palette.text.primary};\n`;\n\nexport const subtitleText = (theme: Theme): SerializedStyles => css`\n ${theme.mui.typography.subtitle1}\n color: ${theme.mui.palette.text.secondary};\n`;\n\nexport const helpText = (theme: Theme): SerializedStyles => css`\n ${theme.mui.typography.caption}\n color: ${theme.mui.palette.text.secondary};\n`;\n\nexport const contentContainer = (theme: Theme): SerializedStyles => css`\n margin-top: ${theme.mui.spacing(theme.embedded ? 0 : 8)}px;\n`;\n","import { createAction } from 'deox';\nexport const resetApplication = createAction('RESET_APPLICATION');\n","import React from 'react';\n\ntype ConsumerSearchContextValue = {\n lookupType: 'phoneLookup' | 'tokenLookup' | 'phoneValidation' | null;\n prompt?: boolean;\n isAccountLookup: boolean;\n skipToPath?: string;\n i18nPrefix: string;\n hasExistingAccount: boolean;\n};\n\nconst ConsumerSearchContext = React.createContext({\n i18nPrefix: '',\n isAccountLookup: false,\n hasExistingAccount: false,\n lookupType: null,\n});\n\nexport default ConsumerSearchContext;\n","/** @jsx jsx */\nimport React from 'react';\nimport { jsx } from '@emotion/core';\n\nimport { Box, CircularProgress, Container } from '@material-ui/core';\n\nconst LoadingScreen: React.FC = () => {\n return (\n \n \n \n \n \n );\n};\n\nexport default LoadingScreen;\n","import { createAction, createReducer } from 'deox';\nimport { resetApplication } from './resetApplication';\n\n// attempts: number - number of OTP attempts made - default 0\n// expireTime?: number - (probably in UNIX time (ms)) - default null\n// otpCode?: string - the successful OTP code - default null\n\n// State\n\nexport const EXPIRE_TIME = 15 * 60; // 15 minutes (in seconds)\n\nexport interface OtpCode {\n attempts: number;\n expireTime: number | null;\n otpCode: string | null;\n}\n\nexport const defaultState: OtpCode = {\n attempts: 0,\n expireTime: null,\n otpCode: null,\n};\n\n// Actions\n\nexport const incrementAttempts = createAction('INCREMENT_ATTEMPTS');\n\nexport const setExpireTime = createAction('SET_EXPIRE_TIME');\n\nexport const setOtpCode = createAction(\n 'SET_OTP_CODE',\n resolve => (otpCode: string) => resolve({ otpCode }),\n);\n\n// Reducer\n\nexport const otpCodeReducer = createReducer(defaultState, handleAction => [\n handleAction(incrementAttempts, state => ({\n ...state,\n attempts: state.attempts + 1,\n })),\n handleAction(setExpireTime, state => ({\n ...state,\n attempts: 0,\n expireTime: Date.now() + EXPIRE_TIME * 1000, // UNIX timestamp in ms\n })),\n handleAction(setOtpCode, (state, { payload: { otpCode } }) => ({\n ...state,\n otpCode,\n })),\n handleAction(resetApplication, () => defaultState),\n]);\n\n// Selectors\n\nexport interface MountedState {\n otpCode: OtpCode;\n}\n\nexport const selectAttempts = (state: MountedState): number =>\n state.otpCode.attempts;\n\nexport const selectExpireTime = (state: MountedState): number | null =>\n state.otpCode.expireTime;\n\nexport const selectOtpCode = (state: MountedState): string | null =>\n state.otpCode.otpCode;\n\nexport default otpCodeReducer;\n","/* eslint-disable @typescript-eslint/camelcase */\n\nimport { useState, useCallback } from 'react';\nimport { Status } from 'hooks/requests/fetchUtils';\nimport useFetchApi from 'hooks/useFetchApi';\nimport useQueryParameters from 'hooks/useQueryParameters';\nimport { setExpireTime } from 'state/otpCode';\nimport { useDispatch } from 'react-redux';\n// TODO: correct this path\nconst PATH = '/api/otp';\n\ntype OTPSenderHook = () => [\n ({ phone }: { phone: string }) => Promise,\n Status,\n string | null,\n];\n\nexport class OTPSenderError extends Error {}\n\nexport const useOTPSender: OTPSenderHook = () => {\n const dispatch = useDispatch();\n const [error, setError] = useState(null);\n const [status, fetch] = useFetchApi();\n const { mockSOTP } = useQueryParameters();\n\n const sendOTP = useCallback(\n async ({ phone }: { phone: string }): Promise => {\n setError(null);\n\n const response = await fetch(PATH, {\n method: 'POST',\n body: { phone: phone, mockOtpResponse: mockSOTP },\n });\n\n if (!response.ok) {\n const body = await response.json();\n const error = body.message;\n setError(error);\n return Promise.reject(new OTPSenderError(error));\n } else {\n dispatch(setExpireTime());\n }\n },\n [fetch, mockSOTP, dispatch],\n );\n\n return [sendOTP, status, error];\n};\n\nexport default useOTPSender;\n","import useFetch from 'hooks/useFetch';\nimport qs from 'qs';\nimport { mergeLeft } from 'ramda';\nimport { useCallback } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\nimport { selectAuthenticityToken } from 'state/authenticityToken';\nimport { selectTenant } from 'state/tenant';\nimport {\n selectSessionToken,\n loadSessionTokenFromLocalStore,\n saveSessionTokenToLocalStore,\n setSessionToken,\n} from 'state/sessionToken';\nimport { Status } from './requests/fetchUtils';\nimport parse from 'url-parse';\n\n/**\n * Builder\n */\nconst getOptions = (\n options: RequestInit | undefined,\n authenticityToken: string,\n sessionToken: string,\n clientName: string,\n) => {\n const defaultOptions: RequestInit = {\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n 'X-Requested-With': 'XMLHttpRequest',\n 'X-CSRF-Token': authenticityToken,\n 'X-Client-Name': clientName,\n Authorization: 'Bearer ' + sessionToken,\n },\n };\n return mergeLeft(options, defaultOptions);\n};\n\ntype ApiRequestInit = Omit & {\n body?: object;\n};\n\nexport type ApiFetch = (\n input: string,\n init: ApiRequestInit,\n) => Promise;\n\nconst useFetchApi = (): [Status, ApiFetch] => {\n const [status, fetch] = useFetch();\n const authenticityToken = useSelector(selectAuthenticityToken);\n const { overrideConfig, clientName } = useSelector(selectTenant);\n const dispatch = useDispatch();\n let { token } = useSelector(selectSessionToken);\n\n const sessionTokenFromLocalStore = loadSessionTokenFromLocalStore();\n if (sessionTokenFromLocalStore) token = sessionTokenFromLocalStore;\n const newFetch: ApiFetch = useCallback(\n async (input, options) => {\n let body = JSON.stringify(options.body);\n\n if (options.method === undefined || options.method === 'GET') {\n const parsed = parse(input);\n const oldQueryString = ((parsed.query as unknown) as string).replace(\n /^\\?/,\n '',\n );\n const oldQuery = qs.parse(oldQueryString);\n const newQuery = { overrideConfig, ...oldQuery };\n parsed.set('query', qs.stringify(newQuery));\n input = parsed.toString();\n } else {\n body = JSON.stringify({ ...options.body, overrideConfig });\n }\n\n const mergeOptions = {\n ...options,\n body,\n };\n\n const newOptions = getOptions(\n mergeOptions,\n authenticityToken,\n token,\n clientName,\n );\n const response = fetch(input, newOptions);\n const sessionToken = (await response).headers.get('X-Session-Token');\n if (sessionToken) {\n saveSessionTokenToLocalStore(sessionToken);\n dispatch(setSessionToken(sessionToken));\n }\n return response;\n },\n [authenticityToken, fetch, overrideConfig, token, dispatch, clientName],\n );\n\n return [status, newFetch];\n};\n\nexport default useFetchApi;\n","import { createAction, createReducer } from 'deox';\n\nimport { resetApplication } from './resetApplication';\nimport { pick } from 'ramda';\n\nexport interface PrequalOffer {\n // Be sure to update the keys array below when adding new properties.\n // It is used to merge in only keys that are applicable to PrequalOffer\n // I have not found a way to derive the list of keys of an interface as\n // a runtime array, nor did I find a way to enforce that the keys array\n // contains exhaustively all keys in PrequalOffer.\n creditLimit?: number;\n prequalificationId?: string;\n}\n\nconst prequalOfferKeys: (keyof PrequalOffer)[] = [\n 'creditLimit',\n 'prequalificationId',\n];\n\nexport interface PrequalOfferState {\n entity: PrequalOffer;\n}\n\nexport const defaultState: PrequalOfferState = {\n entity: {},\n};\n\nexport const mergePrequalOffer = createAction(\n 'MERGE_PREQUAL_OFFER',\n resolve => (data: Partial) => resolve(data),\n);\n\nexport const prequalOfferReducer = createReducer(defaultState, handleAction => [\n handleAction(mergePrequalOffer, (state, { payload: data }) => {\n return {\n ...state,\n entity: {\n ...state.entity,\n ...pick(prequalOfferKeys, data),\n },\n };\n }),\n\n handleAction(resetApplication, () => defaultState),\n]);\n\nexport interface MountedState {\n prequalOffer: ReturnType;\n}\n\nexport const selectPrequalOffer = (state: MountedState): PrequalOffer =>\n state.prequalOffer.entity;\n\nexport default prequalOfferReducer;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { selectTenant } from 'state/tenant';\n\nimport { SerializedStyles, Global, css } from '@emotion/core';\nimport { ThemeProvider as MUIThemeProvider } from '@material-ui/styles';\nimport { ThemeProvider as EmotionThemeProvider } from 'emotion-theming';\nimport createTheme, { Theme } from './theme';\nimport { normalText } from './mixins';\nimport useQueryParameters from 'hooks/useQueryParameters';\n\nconst styles = (theme: Theme): SerializedStyles => {\n const { fontFamily } = theme.mui.typography;\n\n return css`\n html {\n /*\n * Using 10px simplification:\n * https://www.sitepoint.com/understanding-and-using-rem-units-in-css/\n */\n font-size: 62.5%;\n font-family: ${fontFamily};\n }\n body {\n text-size-adjust: 100%;\n }\n\n body,\n p,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin: 0;\n }\n body {\n // Prevent margin collapsing.\n //\n // When the first child has a margin, and the body doesn't, the child's\n // margin collapsed into the body's, and so the body's height doesn't\n // account for the child's margin. To report the correct height to the\n // iframe's parent, we need the body's height to count everything.\n //\n // The normal way to prevent margin collapse is by adding something\n // between the child's margin and the parent's margin, such as a 1px\n // padding or border. Since we have a navigation bar, these options\n // create an unsightly gap at the top.\n //\n // Margin for inline-block element are _not_ collapsed. So we make the\n // body inline-block. The width has to be specified as 100%, otherwise\n // the width of the body only takes up as much space as its children\n // need, and everything will be aligned to the left.\n display: inline-block;\n width: 100%;\n }\n\n p,\n button {\n ${normalText(theme)}\n }\n\n a {\n color: ${theme.mui.palette.primary.main};\n font-style: italic;\n text-decoration: underline;\n }\n `;\n};\n\nconst ThemeProvider: React.FC = props => {\n const { children } = props;\n const tenant = useSelector(selectTenant);\n const queryParams = useQueryParameters();\n const theme = createTheme(tenant, queryParams);\n\n return (\n \n \n {children}\n \n );\n};\n\nexport default ThemeProvider;\n","import { Tenant } from 'state/tenant';\nimport { Theme as MUITheme } from '@material-ui/core';\nimport { createMuiTheme } from '@material-ui/core/styles';\n\nimport { QueryParameters } from 'hooks/useQueryParameters';\n\nexport interface Theme {\n mui: MUITheme;\n\n shape: {\n borderRadiusSmall: number;\n borderRadiusLarge: number;\n };\n\n header: {\n backgroundColor: string;\n textColor: string;\n };\n embedded: boolean;\n}\n\nexport default (tenant: Tenant, queryParams: QueryParameters): Theme => {\n const muiTheme = createMuiTheme({\n palette: {\n primary: {\n main: tenant.brandColor,\n },\n secondary: {\n main: tenant.brandColor,\n },\n tonalOffset: 0.65,\n error: {\n main: '#E82117',\n },\n },\n typography: {\n fontSize: 14,\n htmlFontSize: 10,\n },\n });\n\n return {\n mui: muiTheme,\n\n shape: {\n borderRadiusSmall: muiTheme.shape.borderRadius,\n borderRadiusLarge: muiTheme.shape.borderRadius * 5,\n },\n\n header: {\n backgroundColor: muiTheme.palette.common.black,\n textColor: muiTheme.palette.common.white,\n },\n\n embedded: queryParams.embedded,\n };\n};\n","import { map } from 'ramda';\n\nimport { InterpolationWithTheme } from '@emotion/core';\n\nfunction composeStyles(\n styles: InterpolationWithTheme[],\n): InterpolationWithTheme {\n return (theme: Theme) => {\n return map(\n style => (typeof style === 'function' ? style(theme) : style),\n styles,\n );\n };\n}\n\nexport default composeStyles;\n","import ThemeProvider from './ThemeProvider';\nimport composeStyles from './composeStyles';\nimport { Theme as actualTheme } from './theme';\n\nexport * from './mixins';\nexport type Theme = actualTheme;\nexport { composeStyles };\nexport default ThemeProvider;\n","import { format, parse, startOfDay } from 'date-fns/fp';\n\nimport { lensPath, over, curry } from 'ramda';\n\n/**\n * Date format while in the app.\n */\nexport const dobFormat = 'MM/dd/yyyy';\n/**\n * Date format to send to and receive from the API.\n */\nexport const apiDoBFormat = 'yyyy-MM-dd';\n\nexport const parseStringAsDate = curry(\n (format: string, value: string): Date => {\n return startOfDay(parse(startOfDay(new Date()), format, value));\n },\n);\n\nexport const parseDoB = parseStringAsDate(dobFormat);\n\nexport const parseApiDob = parseStringAsDate(apiDoBFormat);\n\nconst reformatDate = curry(\n (fromFormat: string, toFormat: string, date: string | null) => {\n return date ? format(toFormat, parseStringAsDate(fromFormat, date)) : date;\n },\n);\n\n/**\n * Transform a date at a path from one format to another.\n */\nexport const transformDate = (\n fromFormat: string,\n toFormat: string,\n path: string[],\n obj: T,\n): T => {\n const lens = lensPath(path);\n return over(lens, reformatDate(fromFormat, toFormat), obj);\n};\n\nexport const transformDob = (path: string[], params: T): T => {\n return transformDate(dobFormat, apiDoBFormat, path, params);\n};\n\nexport const transformDobFromApi = (path: string[], params: T): T => {\n return transformDate(apiDoBFormat, dobFormat, path, params);\n};\n","import { createAction, createReducer } from 'deox';\n\nexport interface ConsumerSearch {\n result: 'success' | 'error' | 'existingAccount' | null;\n}\n\nexport interface ConsumerSearchState {\n entity: ConsumerSearch;\n}\n\nexport const defaultState: ConsumerSearchState = {\n entity: { result: null },\n};\n\nexport const mergeConsumerSearch = createAction(\n 'MERGE_CONSUMER_SEARCH',\n resolve => (data: Partial) => resolve(data),\n);\n\nexport const consumerSearchReducer = createReducer(\n defaultState,\n handleAction => [\n handleAction(mergeConsumerSearch, (state, { payload: data }) => {\n return {\n ...state,\n entity: {\n ...state.entity,\n ...data,\n },\n };\n }),\n ],\n);\n\nexport interface MountedState {\n consumerSearch: ReturnType;\n}\n\nexport const selectConsumerSearch = (state: MountedState): ConsumerSearch =>\n state.consumerSearch.entity;\n\nexport default consumerSearchReducer;\n","import React from 'react';\nimport { Redirect as RRRedirect, RedirectProps } from 'react-router-dom';\n\nimport { useCondensedQueryParameters } from 'hooks/useQueryParameters';\nimport { mergeLocation } from 'hooks/useNavigationHelpers';\n\nconst Redirect: React.FC = ({ to, ...redirectProps }) => {\n const params = useCondensedQueryParameters();\n to = mergeLocation(params, to);\n return ;\n};\n\nexport default Redirect;\n","import Redirect from './Redirect';\nexport default Redirect;\n","import { createAction, createReducer } from 'deox';\n\nexport interface SessionToken {\n token: string;\n}\n\nexport const defaultState: SessionToken = {\n token: '',\n};\n\nexport const setSessionToken = createAction(\n 'SET_SESSION_TOKEN',\n resolve => (token: string) => resolve(cleanSessionToken(token)),\n);\n\nexport const sessionTokenReducer = createReducer(defaultState, handleAction => [\n handleAction(setSessionToken, (state, { payload: token }) => {\n return {\n ...state,\n token,\n };\n }),\n]);\n\nexport interface MountedState {\n sessionToken: ReturnType;\n}\n\nexport const loadSessionTokenFromLocalStore = () => {\n try {\n return localStorage.getItem('sessionToken');\n } catch (err) {\n return undefined;\n }\n};\n\nexport const saveSessionTokenToLocalStore = (sessionToken: string) => {\n try {\n localStorage.setItem('sessionToken', cleanSessionToken(sessionToken));\n } catch (err) {\n if (err.name === 'SecurityError') {\n console.error(\n 'SecurityError: Not allowed to save session token to localStorage.',\n );\n } else {\n throw err;\n }\n }\n};\n\nexport const selectSessionToken = (state: MountedState): SessionToken =>\n state.sessionToken;\n\nconst cleanSessionToken = (sessionToken: string): string => {\n return sessionToken ? sessionToken.replace('Bearer ', '') : '';\n};\n\nexport default sessionTokenReducer;\n","import {\n Formik,\n FormikConfig,\n FormikErrors,\n FormikValues,\n yupToFormErrors,\n FormikTouched,\n} from 'formik';\nimport React, { useRef } from 'react';\nimport { ObjectSchema } from 'yup';\nimport { pickBy, mapObjIndexed } from 'ramda';\nimport isPresent from 'utils/isPresent';\n\ninterface Config extends FormikConfig {\n validationSchema?: ObjectSchema;\n validate?: (values: Values) => FormikErrors; // disallow async validation\n}\n\n/**\n * Wrap Formik to make setting initialErrors more convenient. If validation (by\n * either schema or function) is enabled and `initialErrors` is undefined, the\n * validation will be run and pass to Formik any errors as the `initialErrors`\n * prop.\n *\n * This only work if validation can by synchronously.\n */\nconst FmcForm = (\n props: Config & ExtraProps,\n): JSX.Element => {\n const { initialErrors, initialTouched, validate, validationSchema } = props;\n\n let { initialValues } = props;\n\n const errors = useRef(initialErrors);\n const touched = useRef(initialTouched);\n const initialErrorsSet = useRef(Boolean(initialErrors));\n\n if (\n (validate || validationSchema) &&\n errors.current === undefined &&\n !initialErrorsSet.current\n ) {\n if (validate) {\n errors.current = validate(initialValues);\n } else if (validationSchema) {\n try {\n initialValues = {\n ...initialValues,\n ...validationSchema.cast(pickBy(isPresent, initialValues)),\n };\n validationSchema.validateSync(initialValues, { abortEarly: false });\n } catch (e) {\n if (e.name !== 'ValidationError') {\n throw e;\n }\n errors.current = yupToFormErrors(e);\n }\n }\n if (errors.current) {\n // If any initial value is invalid, set it to be touched so that the\n // error messages shows up.\n const hasInvalidInitialValue = mapObjIndexed(\n (value, key) => Boolean(value && initialValues[key]),\n errors.current,\n );\n touched.current = hasInvalidInitialValue as FormikTouched;\n }\n initialErrorsSet.current = true;\n }\n\n return (\n \n );\n};\n\nexport default FmcForm;\n","import FmcForm from './FmcForm';\n\nexport default FmcForm;\n","import { createAction, createReducer } from 'deox';\nimport { resetApplication } from './resetApplication';\n\nexport interface Prescreen {\n virtualLookupSuccessful: boolean;\n prescreenId?: string;\n}\n\nconst defaultState: Prescreen = {\n virtualLookupSuccessful: false,\n prescreenId: undefined,\n};\n\nexport const setVirtualLookupSuccessful = createAction(\n 'SET_VIRTUAL_LOOKUP_SUCCESSFUL',\n resolve => (virtualLookupSuccessful: boolean) =>\n resolve(virtualLookupSuccessful),\n);\n\nexport const setPrescreenId = createAction(\n 'SET_PRESCREEN_ID',\n resolve => (prescreenId: string) => resolve(prescreenId),\n);\n\nexport const prescreenReducer = createReducer(defaultState, handleAction => [\n handleAction(\n setVirtualLookupSuccessful,\n (state, { payload: virtualLookupSuccessful }) => ({\n ...state,\n virtualLookupSuccessful,\n }),\n ),\n handleAction(setPrescreenId, (state, { payload: prescreenId }) => ({\n ...state,\n prescreenId,\n })),\n handleAction(resetApplication, () => defaultState),\n]);\n\ninterface MountedState {\n prescreen: Prescreen;\n}\n\nexport const selectVirtualLookupSuccessful = (state: MountedState): boolean => {\n return state.prescreen.virtualLookupSuccessful;\n};\n\nexport const selectPrescreenId = (state: MountedState): string | undefined => {\n return state.prescreen.prescreenId;\n};\n\nexport default prescreenReducer;\n","/* eslint-disable @typescript-eslint/camelcase */\n\nimport React, { useState, useContext } from 'react';\nimport memoizee from 'memoizee';\nimport { useSelector } from 'react-redux';\nimport { useSnackbar } from 'notistack';\nimport { selectIovationUrl } from 'state/iovation';\n\n/**\n * This is memoized to return the same promise for each distinct iovationUrl\n */\nconst startIovation: (iovationUrl: string) => Promise = memoizee(\n (iovationUrl: string) =>\n new Promise((resolve, reject) => {\n if (typeof window === 'undefined') {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const anyWindow = window as any;\n\n anyWindow.io_install_stm = false; // do not install ActiveX\n anyWindow.io_install_flash = false; // do not install ActiveX\n anyWindow.io_exclude_stm = 12; // exclude Active X on XP and higher\n\n anyWindow.io_bb_callback = (blackbox: string, completed: unknown) => {\n if (completed) {\n resolve(blackbox);\n }\n };\n\n const script = document.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.src = iovationUrl;\n script.onerror = () => {\n reject('Iovation error');\n };\n document.getElementsByTagName('body')[0].appendChild(script);\n }),\n);\n\nexport const IovationContext = React.createContext | null>(\n null,\n);\n\nconst useIovation: () => Promise | null = () => {\n return useContext(IovationContext);\n};\n\n/**\n * Set up the Iovation script.\n *\n * Use this high up (preferably in the top level App component ) so that it\n * can be triggered early.\n */\nconst IovationProvider: React.FC = ({ children }) => {\n const { enqueueSnackbar } = useSnackbar();\n const iovationUrl = useSelector(selectIovationUrl);\n const [promise] = useState>(startIovation(iovationUrl));\n promise.catch(_ =>\n enqueueSnackbar(\n 'We noticed you may be using an adblocker. Please disable it, then refresh the page to continue with your application.',\n {\n variant: 'error',\n persist: true,\n },\n ),\n );\n return (\n \n {children}\n \n );\n};\n\nexport { IovationProvider };\n\nexport default useIovation;\n","import { createAction, createReducer } from 'deox';\n\nimport { FeatureMap } from 'state/tenant';\n\nimport { set, lensPath, pick } from 'ramda';\n\nimport { resetApplication } from './resetApplication';\nexport const RELATIONSHIPS = {\n T: 'Aunt',\n B: 'Brother',\n C: 'Cousin',\n D: 'Daughter',\n F: 'Father',\n G: 'Grandparent',\n H: 'Husband',\n M: 'Mother',\n O: 'Other',\n R: 'Sister',\n S: 'Son',\n U: 'Uncle',\n W: 'Wife',\n};\n\nexport type Relationship = keyof typeof RELATIONSHIPS;\n\nexport interface AuthBuyer {\n firstName: string | null;\n middleInitial: string | null;\n lastName: string | null;\n relationship: Relationship | null;\n dateOfBirth: string | null;\n}\n\nexport interface JointApplicant {\n firstName: string | null;\n lastName: string | null;\n dateOfBirth: string | null;\n mobilePhone: string | null;\n address1: string | null;\n address2: string | null;\n city: string | null;\n state: string | null;\n zip: string | null;\n income: string | null;\n ssn: string | null;\n sameAddressAsPrimaryApplicant: boolean | null;\n}\n\nexport interface CreditApplication {\n cardChoice: number | null;\n firstName: string | null;\n lastName: string | null;\n address1: string | null;\n address2: string | null;\n city: string | null;\n state: string | null;\n zip: string | null;\n dateOfBirth: string | null;\n ssn: string | null;\n emailAddress: string | null;\n mobilePhone: string | null;\n alternativePhone: string | null;\n income: string | null;\n intendedPurchaseAmount: string | null;\n referralCode: string | null;\n clientVariable1: string | null;\n clientVariable2: string | null;\n clientVariable3: string | null;\n clientVariable4: string | null;\n\n authBuyer: AuthBuyer | null;\n accountAssure: boolean;\n jointApplicant: JointApplicant | null;\n\n middleInitial: string | null; // The new form doesn't include middle initial.\n clerkMode: string | null;\n storeNumber: string | null;\n associateId: string | null;\n\n mcid: string | null;\n\n category: string | null;\n cardType: string | null;\n cartAmount: number | null;\n checkoutAmount: number | null;\n correlationData: string | null;\n customerNumber: string | null;\n location: string | null;\n loyaltyNumber: string | null;\n productAmount: number | null;\n sku: string | null;\n\n productChoiceKey: string | null;\n\n studentApplication: boolean | null;\n optInOut: boolean | null;\n}\n\nexport interface LockedFields {\n ssn: boolean;\n mobilePhone: boolean;\n dateOfBirth: boolean;\n}\n\nexport interface CreditApplicationState {\n entity: CreditApplication;\n lockedFields: LockedFields;\n}\n\nexport const defaultState: CreditApplicationState = {\n entity: {\n cardChoice: null,\n\n firstName: null,\n lastName: null,\n address1: null,\n address2: null,\n city: null,\n state: null,\n zip: null,\n dateOfBirth: null,\n ssn: null,\n emailAddress: null,\n\n mobilePhone: null,\n alternativePhone: null,\n\n income: null,\n intendedPurchaseAmount: null,\n referralCode: null,\n\n studentApplication: null,\n optInOut: false,\n\n clientVariable1: null,\n clientVariable2: null,\n clientVariable3: null,\n clientVariable4: null,\n\n authBuyer: null,\n accountAssure: false,\n jointApplicant: null,\n\n // Adobe Marketing Cloud ID\n mcid: null,\n storeNumber: null,\n\n category: null,\n cardType: null,\n cartAmount: null,\n checkoutAmount: null,\n correlationData: null,\n customerNumber: null,\n location: null,\n loyaltyNumber: null,\n productAmount: null,\n sku: null,\n\n productChoiceKey: null,\n\n // TODO: figure out requirements for these\n middleInitial: null, // The new form doesn't include middle initial.\n clerkMode: null,\n associateId: null,\n },\n lockedFields: {\n ssn: false,\n mobilePhone: false,\n dateOfBirth: false,\n },\n};\n\nconst prefillFields = {\n entity: [\n 'firstName',\n 'lastName',\n 'address1',\n 'address2',\n 'city',\n 'state',\n 'zip',\n 'dateOfBirth',\n 'ssn',\n 'emailAddress',\n 'mobilePhone',\n 'alternativePhone',\n 'income',\n 'authBuyer',\n 'accountAssure',\n ],\n lockedFields: ['ssn', 'mobilePhone', 'dateOfBirth'],\n};\n\nexport const mergeApplication = createAction(\n 'MERGE_APPLICATION',\n resolve => (data: Partial) => resolve(data),\n);\n\nexport const lockFields = createAction(\n 'LOCK_FIELDS',\n resolve => (data: Partial) => resolve(data),\n);\n\nexport const setClientVariable = createAction(\n 'SET_CLIENT_VARIABLE',\n /**\n * @param clientVariableNumber the clientVariable number to set\n * @param string the value to set\n * @param position The 0-index position of the in the string to set the\n * value. The string will be padded if position is greater than its length.\n * If the position is not provided, the entire string wil be replace with value.\n * NOTE: ADS specification may indicate the position indexing from 1.\n */\n resolve => (\n clientVariableNumber: 1 | 2 | 3 | 4,\n value: string,\n position?: number,\n ) => resolve({ clientVariableNumber, value, position }),\n);\n\nexport const clearPostPrefillFields = createAction('CLEAR_POST_PREFILL_FIELDS');\n\nconst splice = (str: string, newStr: string, position: number): string => {\n return (\n str.slice(0, position).padEnd(position) +\n newStr +\n str.slice(position + newStr.length)\n );\n};\n\nexport const creditApplicationReducer = createReducer(\n defaultState,\n handleAction => [\n handleAction(mergeApplication, (state, { payload: data }) => {\n return {\n ...state,\n entity: {\n ...state.entity,\n ...data,\n },\n };\n }),\n\n handleAction(lockFields, (state, { payload: lockedFields }) => {\n return {\n ...state,\n lockedFields: {\n ...state.lockedFields,\n ...lockedFields,\n },\n };\n }),\n\n handleAction(\n setClientVariable,\n (state, { payload: { clientVariableNumber, value, position } }) => {\n const field = `clientVariable${clientVariableNumber}` as (\n | 'clientVariable1'\n | 'clientVariable2'\n | 'clientVariable3'\n | 'clientVariable4');\n\n if (position !== undefined) {\n const currentValue = state.entity[field] || '';\n value = splice(currentValue, value, position);\n }\n\n return set(lensPath(['entity', field]), value, state);\n },\n ),\n\n handleAction(clearPostPrefillFields, state => {\n return {\n ...state,\n entity: {\n ...state.entity,\n ...pick(prefillFields.entity, defaultState.entity),\n },\n lockedFields: {\n ...state.lockedFields,\n ...pick(prefillFields.lockedFields, defaultState.lockedFields),\n },\n };\n }),\n\n handleAction(resetApplication, () => defaultState),\n ],\n);\n\nexport interface MountedState {\n creditApplication: ReturnType;\n}\n\nexport const selectCreditApplication = (\n state: MountedState,\n): CreditApplication => state.creditApplication.entity;\n\n/**\n * @returns whether the user optIn or optOut of being considered for multiple\n * products. Returns null if the tenant doesn't configure this feature.\n */\nexport const isOptInOrOptOut = (\n creditApplication: CreditApplication,\n tenant: { enabledFeatures: Pick },\n): 'optIn' | 'optOut' | null => {\n const {\n enabledFeatures: { optInOut },\n } = tenant;\n\n if (!optInOut) {\n return null;\n }\n\n const { type } = optInOut;\n\n const isOptIn =\n (type === 'optIn' && Boolean(creditApplication.optInOut)) ||\n (type === 'optOut' && !creditApplication.optInOut);\n\n return isOptIn ? 'optIn' : 'optOut';\n};\n\nexport const selectLockedFields = (state: MountedState): LockedFields =>\n state.creditApplication.lockedFields;\n\nexport default creditApplicationReducer;\n","import { createAction, createReducer } from 'deox';\n\nexport interface DriversLicense {\n result: 'success' | 'error' | 'existingAccount' | null;\n}\n\nexport interface DriversLicenseState {\n entity: DriversLicense;\n /**\n * Unrecoverable error from the MWB SDK. Once this, startScanning\n * cannot be called again without causing an error.\n */\n scanError: boolean;\n}\n\nexport const defaultState: DriversLicenseState = {\n entity: { result: null },\n scanError: false,\n};\n\nexport const mergeDriversLicense = createAction(\n 'MERGE_DRIVERS_LICENSE',\n resolve => (data: Partial) => resolve(data),\n);\n\nexport const setScanError = createAction(\n 'SET_SCAN_ERROR',\n resolve => (scanError: boolean) => resolve(scanError),\n);\n\nexport const driversLicenseReducer = createReducer(\n defaultState,\n handleAction => [\n handleAction(mergeDriversLicense, (state, { payload: data }) => {\n return {\n ...state,\n entity: {\n ...state.entity,\n ...data,\n },\n };\n }),\n handleAction(setScanError, (state, { payload: scanError }) => ({\n ...state,\n scanError: scanError,\n })),\n ],\n);\n\nexport interface MountedState {\n driversLicense: ReturnType;\n}\n\nexport const selectDriversLicense = (state: MountedState): DriversLicense =>\n state.driversLicense.entity;\n\nexport const selectScanError = (state: MountedState): boolean =>\n state.driversLicense.scanError;\n\nexport default driversLicenseReducer;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport { useDispatch } from 'react-redux';\n\nimport { clearPostPrefillFields } from 'state/creditApplication';\nimport Button, { ButtonProps } from 'components/Button';\nimport React, { useCallback } from 'react';\n\nfunction SkipPrefillButton(\n props: ButtonProps,\n) {\n const dispatch = useDispatch();\n\n const onClick = useCallback(() => {\n dispatch(clearPostPrefillFields());\n }, [dispatch]);\n\n return ;\n}\n\nexport default IovationButton;\n","import Button from './IovationButton';\n\nexport default Button;\nexport * from './IovationButton';\n","import { css, SerializedStyles } from '@emotion/core';\nimport { Theme } from 'features/Theme';\n\nimport { titleText, normalText } from 'features/Theme';\n\nexport default {\n headerTitle: (theme: Theme): SerializedStyles => css`\n ${titleText(theme)};\n text-align: center;\n `,\n\n body: (theme: Theme): SerializedStyles => css`\n ${normalText(theme)};\n color: ${theme.mui.palette.text.secondary};\n text-align: center;\n margin-bottom: ${theme.mui.spacing(1)}px;\n `,\n};\n","/** @jsx jsx */\nimport React, { ReactElement } from 'react';\nimport { jsx } from '@emotion/core';\n\nimport { Box, Container } from '@material-ui/core';\n\nimport CompletionIcon from 'features/CompletionIcon';\nimport ApplicationProgress from 'features/ApplicationProgress';\n\nimport PageContainer from 'components/PageContainer';\nimport styles from './styles';\nimport ActionButtonContainer from 'components/ActionButtonsContainer';\nimport { contentContainer } from 'features/Theme/mixins';\n\ninterface PropTypes {\n headerTitle: string | ReactElement;\n /**\n * If a string, the string will be wrapped in a paragraph.\n * If a ReactElement, it will be inserted as is.\n */\n message: string | ReactElement;\n\n /**\n * If this signify the end of the application\n * This will cause the page to have a completed ApplicationProgress bar.\n */\n completed?: boolean;\n}\n\n/**\n * A page for displaying a simple message and a number of action buttons.\n *\n * The actions button are passed as children.\n */\nconst SimpleMessagePage: React.FC = ({\n headerTitle,\n message,\n children,\n completed,\n}) => {\n const messageComponent =\n typeof message !== 'string' ? (\n
{message}
\n ) : (\n \n );\n return (\n \n {completed && (\n \n \n \n \n )}\n\n \n

{headerTitle}

\n\n \n {messageComponent}\n {children && (\n {children}\n )}\n \n
\n
\n );\n};\n\nexport default SimpleMessagePage;\n","import SimpleMessagePage from './SimpleMessagePage';\n\nexport default SimpleMessagePage;\n","import { css } from '@emotion/core';\nimport { Theme } from 'features/Theme';\n\nexport default {\n logoContainer: (theme: Theme, width: number) => css`\n label: logoContainer;\n text-align: center;\n margin: ${theme.mui.spacing(3)}px auto 0;\n width: ${theme.mui.spacing(width)}px;\n max-width: 100%;\n img {\n max-width: 100%;\n }\n `,\n};\n","/** @jsx jsx */\nimport { jsx, SerializedStyles } from '@emotion/core';\nimport { useSelector } from 'react-redux';\nimport { selectTenant } from 'state/tenant';\nimport { useTheme } from 'emotion-theming';\n\nimport { Theme } from 'features/Theme';\n\nimport styles from './styles';\nimport React from 'react';\n\ninterface PropTypes {\n /** Logo width in MUI's spacing unit. */\n width?: number;\n className?: string;\n}\n\n/**\n * Logo at the top of the page.\n */\nconst Logo: React.FC = ({ className, width = 15 }) => {\n const tenant = useSelector(selectTenant);\n const theme = useTheme();\n\n const css = (theme: Theme): SerializedStyles[] => [\n styles.logoContainer(theme, width),\n ];\n\n if (theme.embedded) {\n return null;\n }\n\n return (\n \n
\n {tenant.name}\n
\n
\n );\n};\n\nexport default Logo;\n","import useTranslate, { Trans } from './useTranslate';\n\nexport default useTranslate;\nexport { Trans };\n","import qs from 'query-string';\nimport {\n defaultTo,\n filter,\n find,\n keys,\n keysIn,\n mergeWith,\n pick,\n pickBy,\n pipe,\n reduce,\n values,\n} from 'ramda';\nimport { useMemo } from 'react';\nimport { useSelector } from 'react-redux';\nimport { selectTenant, Tenant } from 'state/tenant';\nimport useReactRouter from 'use-react-router';\n\n// **************************** ACHTUNG! ************************\n// When adding query parameters of boolean type,\n// you must also add the field to `parseBlanksAsBoolean` below!\n// **************************************************************\n\nexport interface QueryParameters {\n /*\n * # Workflows:\n *\n * Workflows define the path by which a consumer reaches an exit page.\n *\n * These workflows are made up of the steps it takes to apply for or look\n * up an credit account.\n *\n * Ideally, the exit page is the DSP (digital shopping pass); however, the\n * exit page may also be an error or existing-account page.\n *\n * # Summary of Workflows:\n *\n * ## phoneLookup (aka Frictionless Web)\n *\n * Entry Path: /\n * Mock Params: mockSOTP, mockVOTP, mockCS, mockIC\n *\n * ## tokenLookup (aka FMC, Frictionless Mobile Credit, in-store)\n *\n * Entry Path: /token=[token]\n * Mock Params: mockSOTP, mockVOTP, mockCS, mockIC\n *\n * *Note*: token is required q param. If not included, worflow will be\n * interpreted as phoneLookup.\n *\n * ## dspPush\n *\n * Entry Path: /dsp-start?token=[token]\n * Mock Params: mockDspPush\n *\n * ## prescreen\n *\n * Entry Path: /prescreen/offer?prescreenId=[prescreenId]\n * Mock Params: mockMO, mockPA\n *\n * ## batchPrescreen\n *\n * Entry Path: /batch-prescreen/start\n * Mock Params: mockVL, mockPA, mockVOTP, mockSOTP, mockCS, mockIC\n *\n * Note: allows fallback to IC if prescreenId bad/expired\n *\n * ## prequalTokenLookup\n *\n * Entry Path: /prequal/token-lookup?token=[token]\n * Mock Params: mockCS, mockPrequal, mockPrequalApp, mockIC\n *\n * Note: allows fallback to IC if prequal is notQualified\n *\n * ## prequalPhoneLookup\n *\n * Entry Path: /prequal/phone-lookup\n * Mock Params: mockSOTP, mockVOTP, mockCS, mockPrequal, mockPrequalApp, mockIC\n *\n * Note: allows fallback to IC if prequal is notQualified\n *\n * ## prequalOfferPush\n *\n * Entry Path: /prequal/offer-push?prequalificationId=[prequalificationId]\n * Mock Params: mockVL, mockSOTP, mockVOTP, mockCS, mockPrequal, mockPrequalApp, mockIC\n *\n * Note: allows fallback to IC if prequal is notQualified\n *\n * ## enhancedCheckoutPhoneLookup\n *\n * Entry Path: /enhanced-checkout\n * Mock Params: mockSOTP, mockVOTP, mockCS, mockIC\n *\n * Note: allows fallback to IC if account not found\n *\n * ## enhancedCheckoutTokenLookup\n *\n * Entry Path: /enhanced-checkout?token=[token]\n * Mock Params: mockCS, mockIC\n *\n * Note: allows fallback to IC if account not found\n *\n */\n\n /**\n * Name used to determine the current tenant.\n */\n clientName: string | undefined;\n\n /**\n * Whether redirect to root\n */\n redirectToRoot: boolean;\n\n /*\n * Mock response from consumer search service.\n */\n mockCS:\n | 'success'\n | 'existingAccount'\n | 'successNoToken'\n | 'error'\n | undefined;\n\n /*\n * Mock response from consumer search service.\n */\n mockECO: 'success' | 'existingAccount' | 'error' | undefined;\n\n /*\n * Mock response from drivers license service.\n */\n mockDL:\n | 'success'\n | 'existingAccount'\n | 'successNoToken'\n | 'error'\n | undefined;\n\n /**\n * Mock a dsp retrieval response\n */\n mockDspRetrieval:\n | 'success'\n | 'existingAccount'\n | 'successNoToken'\n | 'error'\n | undefined;\n\n /*\n * Mock a dsp push response\n */\n mockDspPush:\n | 'success'\n | 'existingAccount'\n | 'existingAccountPl'\n | 'existingAccountCb'\n | 'successNoToken'\n | 'error'\n | undefined;\n\n /*\n * Mock response from one time password sender service.\n */\n mockSOTP: 'success' | 'error' | undefined;\n\n /*\n * Mock response from one time password verifcation service.\n */\n mockVOTP: 'success' | 'error' | undefined;\n\n /*\n * Mock response from prescreen Application.\n */\n mockPA: 'success' | 'error' | 'existingAccount' | 'denial' | undefined;\n\n /*\n * Mock response from instant credit service.\n */\n mockIC:\n | 'success'\n | 'successCb'\n | 'existingAccount'\n | 'existingAccountCb'\n | 'existingAccountNonTsp'\n | 'existingAccountMinimal'\n | 'notBestApr'\n | 'nonTsp'\n | 'denial'\n | 'error'\n | undefined;\n\n /*\n * Mock response from Made Offer service.\n */\n mockMO: 'success' | 'error' | undefined;\n\n /*\n * Mock response from Virtual Lookup service.\n */\n mockVL: 'success' | 'error' | 'existingAccount' | 'expired' | undefined;\n\n /*\n * Mock response from Text to recover service\n */\n mockTTR: 'success' | 'error' | undefined;\n\n /*\n * Mock response from prequal offer text service\n */\n mockPOT: 'success' | 'error' | undefined;\n\n /**\n * Mock response from Membership Validation\n */\n mockMV:\n | 'existingAccount'\n | 'error'\n | 'notValidated'\n | 'success'\n | 'successN'\n | 'successD'\n | undefined;\n\n /**\n * Mock prequalification\n */\n mockPrequal:\n | 'success'\n | 'existingAccount'\n | 'existingPreapproval'\n | 'notQualified'\n | 'denial'\n | 'error'\n | undefined;\n\n /**\n * Mock response from prequal application\n */\n mockPrequalApp: 'success' | 'error' | undefined;\n\n /**\n * Mock response for store attribution\n */\n mockStoreAttribution: 'success' | 'error' | undefined;\n\n /**\n * Timeout and warning time in seconds\n */\n instantCreditTimeoutTime: number | undefined;\n instantCreditWarningTime: number | undefined;\n applicationTimeoutTime: number | undefined;\n applicationWarningTime: number | undefined;\n\n /*\n * Params for use with consumer search, provided by Vibes sms service.\n */\n carrier: string | undefined;\n keyword: string | undefined;\n shortCode: string | undefined;\n token: string | undefined;\n loyaltyNumber: string | undefined;\n storeNumber: string | undefined;\n prescreenId: string | undefined;\n prequalificationId: string | undefined;\n employeeApplication: boolean;\n embedded: boolean;\n cmp: string | undefined;\n workflow: WorkflowEnum | undefined;\n\n location: string | undefined;\n channel: string | undefined;\n subchannel: string | undefined;\n\n /**\n * Credit Karma PoC\n */\n subId: string | undefined;\n\n /**\n * Flag for if customer already has an existing account\n */\n hasExistingAccount: boolean;\n\n /**\n * In store\n */\n inStore: boolean;\n\n clientVariable1: string | undefined;\n clientVariable2: string | undefined;\n clientVariable3: string | undefined;\n clientVariable4: string | undefined;\n\n /**\n * Kiosk mode\n */\n kioskMode: boolean;\n\n /**\n * Clerk Mode - special mode for associate access.\n */\n clerkMode: boolean;\n}\n\nexport enum WorkflowEnum {\n dspPush = 'dspPush',\n prescreen = 'prescreen',\n batchPrescreen = 'batchPrescreen',\n prequalTokenLookup = 'prequalTokenLookup',\n prequalPhoneLookup = 'prequalPhoneLookup',\n prequalOfferPush = 'prequalOfferPush',\n enhancedCheckoutPhoneLookup = 'enhancedCheckoutPhoneLookup',\n enhancedCheckoutTokenLookup = 'enhancedCheckoutTokenLookup',\n tokenLookup = 'tokenLookup',\n phoneLookup = 'phoneLookup',\n membershipValidation = 'membershipValidation',\n icDriverLicense = 'icDriverLicense',\n prequalDriverLicense = 'prequalDriverLicense',\n}\nconst DEFAULT_PARAMETERS: QueryParameters = {\n clientName: undefined,\n redirectToRoot: true,\n mockCS: undefined,\n mockECO: undefined,\n mockDL: undefined,\n mockDspRetrieval: undefined,\n mockDspPush: undefined,\n mockSOTP: undefined,\n mockVOTP: undefined,\n mockIC: undefined,\n mockPA: undefined,\n mockMV: undefined,\n mockMO: undefined,\n mockVL: undefined,\n mockTTR: undefined,\n mockPOT: undefined,\n mockPrequal: undefined,\n mockPrequalApp: undefined,\n mockStoreAttribution: undefined,\n instantCreditTimeoutTime: undefined,\n instantCreditWarningTime: undefined,\n applicationTimeoutTime: undefined,\n applicationWarningTime: undefined,\n carrier: undefined,\n keyword: undefined,\n shortCode: undefined,\n token: undefined,\n loyaltyNumber: undefined,\n storeNumber: undefined,\n prescreenId: undefined,\n prequalificationId: undefined,\n employeeApplication: false,\n embedded: false,\n cmp: undefined,\n workflow: undefined,\n location: undefined,\n channel: undefined,\n subchannel: undefined,\n subId: undefined,\n hasExistingAccount: false,\n inStore: false,\n clientVariable1: undefined,\n clientVariable2: undefined,\n clientVariable3: undefined,\n clientVariable4: undefined,\n kioskMode: false,\n clerkMode: false,\n};\n\ntype QueryParameterHook = () => QueryParameters;\n\nconst canonicalKeyNames = keysIn(\n DEFAULT_PARAMETERS,\n) as (keyof QueryParameters)[];\n\nconst matchCanonicalKey = (name: string, keyNames: readonly string[]) =>\n find(\n canon => canon.toLowerCase() === name.toLowerCase(),\n keyNames as string[],\n );\n\nconst normalizedKeys = (\n keyNames: readonly Extract[],\n) => (queryParams: { [name: string]: unknown }) => {\n return reduce(\n (accum, name) => {\n const key = matchCanonicalKey(name, keyNames) || name;\n return { ...accum, [key]: queryParams[name] };\n },\n {} as T,\n keysIn(queryParams),\n );\n};\n\nconst parseNumbers = (fields: K[]) => <\n T extends { [key in K]: unknown }\n>(\n query: T,\n): { [key in keyof T]: key extends K ? number | undefined : T[key] } => {\n return reduce(\n (acc, field) => {\n const value = query[field];\n if (!value) {\n return acc;\n }\n if (typeof value === 'string') {\n return {\n ...acc,\n [field]: parseFloat(value),\n };\n }\n throw new Error(`cannot cast ${field}=${value} to number`);\n },\n query,\n fields,\n // Typing for reduce sucks!\n ) as { [key in keyof T]: key extends K ? number | undefined : T[key] };\n};\n\nconst parseBlanksAsBoolean = (fields: K[]) => <\n T extends { [key in K]: unknown }\n>(\n query: T,\n): { [key in keyof T]: key extends K ? boolean | undefined : T[key] } => {\n return reduce(\n (acc, field) => {\n if (query[field] === undefined || typeof query[field] === 'boolean') {\n // if the query param was not provided, or already parsed properly,\n // we don't have to do anything\n return acc;\n } else {\n // If the query param is present, but null (does not have a value) or\n // is any other value beside the parsable 'true' or 'false', we consider\n // it to be true.\n return {\n ...acc,\n [field]: true,\n };\n }\n },\n query,\n fields,\n // Typing for reduce sucks!\n ) as { [key in keyof T]: key extends K ? boolean : T[key] };\n};\n\ninterface TranslatedVibesParams {\n carrier?: string;\n keyword?: string;\n shortCode?: string;\n token?: string;\n}\n\nconst translateVibesParams = (vibesParams: {\n [key: string]: unknown;\n}): TranslatedVibesParams => {\n const normalized = normalizedKeys([\n 'clientVariable1',\n 'clientVariable2',\n 'clientVariable3',\n 'clientVariable4',\n 'sessionToken',\n ] as const)(vibesParams);\n\n return {\n carrier: normalized['clientVariable1'],\n keyword: normalized['clientVariable2'],\n shortCode: normalized['clientVariable3'],\n token: normalized['sessionToken'],\n };\n};\n\nconst activeWorkflow = (\n overrideConfig: Tenant['overrideConfig'],\n): WorkflowEnum => {\n const keys = values(WorkflowEnum);\n const activeWorkflow = find(key => overrideConfig[key] === true, keys);\n if (!activeWorkflow) {\n // This should not happen. We expect this to have been caught by the\n // server if no active workflow can be determined.\n throw new Error('Tenant does not specify an active workflow.');\n }\n return activeWorkflow;\n};\n\n/**\n * Return an object of **only** supported query parameters by the app.\n * Each field is already parsed into its correct type.\n */\nconst useQueryParameters: QueryParameterHook = () => {\n const { location } = useReactRouter();\n const { overrideConfig } = useSelector(selectTenant);\n const params = useMemo(() => {\n const query = qs.parse(location.search, {\n parseBooleans: true,\n });\n const parsedParams = pipe(\n normalizedKeys(canonicalKeyNames),\n parseBlanksAsBoolean([\n 'embedded',\n 'hasExistingAccount',\n 'inStore',\n 'clerkMode',\n 'kioskMode',\n ]),\n parseNumbers([\n 'instantCreditTimeoutTime',\n 'instantCreditWarningTime',\n 'applicationTimeoutTime',\n 'applicationWarningTime',\n ]),\n mergeWith(defaultTo, translateVibesParams(query)),\n pick((keys(DEFAULT_PARAMETERS) as unknown) as string[]),\n mergeWith(defaultTo, DEFAULT_PARAMETERS),\n )(query);\n\n const params = {\n ...parsedParams,\n workflow: activeWorkflow(overrideConfig),\n };\n return params;\n }, [location, overrideConfig]);\n return params;\n};\n\ntype CondensedQueryParameterHook = () => Partial;\n/**\n * Same as useQueryParameters, but condensed to only field that are\n * different from the default. Useful for setting the query parameters in a URL.\n */\nconst useCondensedQueryParameters: CondensedQueryParameterHook = () => {\n const params = useQueryParameters();\n return useMemo(\n () =>\n pickBy(\n (value, key) =>\n value !== DEFAULT_PARAMETERS[key as keyof QueryParameters],\n params,\n ),\n [params],\n );\n};\n\ntype SecureQueryParametersHook = () => Partial;\n/**\n * Query parameters that are allowed in application and DSP timeouts.\n */\nconst useSecureQueryParameters: SecureQueryParametersHook = () => {\n const params = useCondensedQueryParameters();\n\n return useMemo(() => {\n const keepParams = [\n 'clientName',\n 'token',\n 'embedded',\n 'workflow',\n 'employeeApplication',\n 'inStore',\n 'loyaltyNumber',\n 'carrier',\n 'keyword',\n 'shortCode',\n 'location',\n 'channel',\n 'subchannel',\n 'clientVariable1',\n 'clientVariable2',\n 'clientVariable3',\n 'clientVariable4',\n 'clerkMode',\n 'kioskMode',\n // The following are kept only for mocking/debugging purpose in development\n 'redirectToRoot',\n 'applicationTimeoutTime',\n 'applicationWarningTime',\n 'instantCreditWarningTime',\n 'instantCreditTimeoutTime',\n ...filter((s: string) => s.includes('mock'), keysIn(params)),\n ];\n\n return {\n ...pick(keepParams, params),\n };\n }, [params]);\n};\n\nexport default useQueryParameters;\n\nexport { useCondensedQueryParameters, useSecureQueryParameters };\n","import { createAction, createReducer } from 'deox';\n\nexport type ConsumerSearchResult = 'existingAccount' | 'error' | undefined;\n\nexport interface EnhancedCheckout {\n consumerSearchResult: ConsumerSearchResult;\n}\n\nconst defaultState: EnhancedCheckout = {\n consumerSearchResult: undefined,\n};\n\nexport const setEnhancedCheckoutState = createAction(\n 'SET_ENHANCED_CHECKOUT_STATE',\n resolve => (enhancedCheckout: EnhancedCheckout) => resolve(enhancedCheckout),\n);\n\nexport const enhancedCheckoutReducer = createReducer(\n defaultState,\n handleAction => [\n handleAction(setEnhancedCheckoutState, (state, { payload }) => ({\n ...state,\n ...payload,\n })),\n ],\n);\n\ninterface MountedState {\n enhancedCheckout: EnhancedCheckout;\n}\n\nexport const selectEnhancedCheckout = (\n state: MountedState,\n): EnhancedCheckout => {\n return state.enhancedCheckout;\n};\n\nexport default enhancedCheckoutReducer;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableCreditApplication = loadable(\n () => import('./CreditApplication'),\n {\n fallback: ,\n },\n);\n\nexport default LoadableCreditApplication;\n","import React, { FC, useContext, createContext, useMemo } from 'react';\nimport { UAParser } from 'ua-parser-js';\n\nexport const UserAgentContext = createContext('');\n\ninterface PropTypes {\n userAgentString: string;\n}\n\nexport const UserAgentProvider: FC = ({\n children,\n userAgentString,\n}) => (\n \n {children}\n \n);\n\nexport const useUAParser = (): IUAParser.IResult => {\n const userAgentString = useContext(UserAgentContext);\n\n return useMemo(() => new UAParser(userAgentString).getResult(), [\n userAgentString,\n ]);\n};\n\nexport default useUAParser;\n","import { mergeLeft } from 'ramda';\nimport { useCallback, useState, useEffect, useRef } from 'react';\nimport {\n Status,\n raiseOnServerError,\n isNetworkError,\n isAborted,\n NetworkError,\n AbortError,\n} from './requests/fetchUtils';\n\n/**\n * Builder\n */\nconst getOptions = (\n options: RequestInit | undefined,\n controller: AbortController,\n): RequestInit => {\n const defaultOptions: RequestInit = {\n credentials: 'same-origin',\n signal: controller.signal,\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n 'X-Requested-With': 'XMLHttpRequest',\n },\n };\n return mergeLeft(options, defaultOptions);\n};\n\n/**\n * The TypeScript definition of fetch has overloads for some reasons.\n * Seems like that causes Typescript to infer `input` and `init` as\n * `any` when define methods like so:\n * `const newFetch: typeof fetch: (input, init) => { ... }`\n *\n * So, we'll copy it here. If this is changed in the future, maybe this could\n * be removed.\n */\nexport type Fetch = (\n input: RequestInfo,\n init?: RequestInit,\n) => Promise;\n\nconst useFetch = (): [Status, Fetch] => {\n const [status, setStatus] = useState(Status.NOT_STARTED);\n\n const abortControllerRef = useRef(null);\n\n const abortCurrentRequest = useCallback(() => {\n if (abortControllerRef.current) {\n abortControllerRef.current.abort();\n abortControllerRef.current = null;\n }\n }, [abortControllerRef]);\n\n const newFetch: Fetch = useCallback(\n async (input, options?) => {\n abortCurrentRequest();\n\n const controller = new AbortController();\n abortControllerRef.current = controller;\n\n setStatus(Status.IN_PROGRESS);\n\n try {\n const response = await fetch(input, getOptions(options, controller));\n raiseOnServerError(response);\n setStatus(Status.SUCCESS);\n return response;\n } catch (reason) {\n setStatus(Status.ERROR);\n if (isNetworkError(reason)) {\n throw new NetworkError();\n } else if (isAborted(reason)) {\n throw new AbortError();\n } else {\n throw reason;\n }\n } finally {\n abortControllerRef.current = null;\n }\n },\n [abortCurrentRequest, abortControllerRef],\n );\n\n useEffect(() => {\n return () => {\n abortCurrentRequest();\n };\n }, [abortCurrentRequest]);\n\n return [status, newFetch];\n};\n\nexport default useFetch;\n","import React, { useEffect, useContext, ReactElement, useState } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\n\nimport { selectCreditApplication } from 'state/creditApplication';\nimport { resetApplication } from 'state/resetApplication';\nimport useQueryParameters from 'hooks/useQueryParameters';\n\nexport interface CachedAttributes {\n applicantEmail: string | null;\n storeNumber: string | null;\n cardChoice: number | null;\n}\n\nexport const CachedAttributesContext = React.createContext({\n applicantEmail: null,\n storeNumber: null,\n cardChoice: null,\n});\n\nexport const useCachedAttribute: () => CachedAttributes = () => {\n return useContext(CachedAttributesContext);\n};\n\nconst ResetApplicationRoute: React.FC = ({ children }) => {\n const { emailAddress, storeNumber: appStoreNumber, cardChoice } = useSelector(\n selectCreditApplication,\n );\n\n const { storeNumber: queryStoreNumber } = useQueryParameters();\n\n const dispatch = useDispatch();\n\n const [cachedAttributes] = useState({\n applicantEmail: emailAddress,\n storeNumber: queryStoreNumber || appStoreNumber,\n cardChoice: cardChoice,\n });\n\n useEffect(() => {\n dispatch(resetApplication());\n }, [dispatch]);\n\n return (\n <>\n \n {React.Children.map(children, child =>\n React.cloneElement(child as ReactElement),\n )}\n \n \n );\n};\n\nexport default ResetApplicationRoute;\n","import ResetApplicationRoute from './ResetApplicationRoute';\nexport * from './ResetApplicationRoute';\nexport default ResetApplicationRoute;\n","/** @jsx jsx */\nimport React from 'react';\nimport { jsx } from '@emotion/core';\n\nimport { Checkbox as MuiCheckbox } from '@material-ui/core';\nimport { CheckboxProps } from '@material-ui/core/Checkbox';\n\nimport CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank';\nimport CheckBoxIcon from '@material-ui/icons/CheckBox';\n\nconst Checkbox: React.FC = props => {\n return (\n }\n checkedIcon={}\n color=\"primary\"\n {...props}\n />\n );\n};\n\nexport default Checkbox;\n","import Checkbox from './Checkbox';\n\nexport default Checkbox;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableDriverLicenseStart = loadable(\n () => import('./DriverLicenseStart'),\n {\n fallback: ,\n },\n);\n\nexport default LoadableDriverLicenseStart;\n","import React, { useCallback, useMemo } from 'react';\nimport { useSnackbar } from 'notistack';\n\nimport catchOnly from 'utils/catchOnly';\n\nimport useConsumerSearch, {\n ConsumerSearchError,\n} from 'hooks/requests/consumerSearch';\n\nimport ReusableConsumerSearch from 'features/ReusableConsumerSearch';\nimport { NonClientError } from 'hooks/requests/fetchUtils';\nimport useQueryParameters from 'hooks/useQueryParameters';\nimport useNavigationHelpers from 'hooks/useNavigationHelpers';\nimport useWorkflow, { Step } from 'hooks/useWorkflow';\nimport useAnalyticVariables from 'hooks/useAnalyticVariables';\n\nimport { useSelector } from 'react-redux';\nimport { selectTenant } from 'state/tenant';\nimport { RouteComponentProps } from 'react-router-dom';\nimport isPresent from 'utils/isPresent';\nimport { values as valuesOf, all, pick } from 'ramda';\nimport { selectCreditApplication } from 'state/creditApplication';\n\nconst prefillKeys = [\n 'firstName',\n 'lastName',\n 'address1',\n 'city',\n 'state',\n 'zip',\n 'mobilePhone',\n];\n\ntype PropTypes = RouteComponentProps;\n\nconst ConsumerSearch: React.FC = props => {\n const [searchConsumer] = useConsumerSearch();\n\n const { push } = useNavigationHelpers();\n const { enqueueSnackbar } = useSnackbar();\n const query = useQueryParameters();\n const { pathAfter } = useWorkflow();\n const { trustedBrandPrefill, overrideConfig } = useSelector(selectTenant);\n const nextPath = useMemo(() => pathAfter(Step.CONSUMER_SEARCH), [pathAfter]);\n const { setAnalyticsVariables } = useAnalyticVariables();\n\n const creditApplication = useSelector(selectCreditApplication);\n\n const onSubmit = useCallback(\n async (values: {\n ssn: string;\n zip: string;\n mobilePhone?: string;\n otpCode?: string;\n }) => {\n try {\n const isSufficientPrefill = all(\n isPresent,\n valuesOf(pick(prefillKeys, creditApplication)),\n );\n if (isSufficientPrefill) {\n setAnalyticsVariables({ isSufficientPrefill: 'true' });\n }\n if (\n overrideConfig.phoneLookup &&\n trustedBrandPrefill &&\n isSufficientPrefill\n ) {\n push(nextPath);\n return;\n }\n\n const params = {\n ssn: values.ssn,\n zip: values.zip,\n mobilePhone: values.mobilePhone,\n carrier: query.carrier,\n keyword: query.keyword,\n shortCode: query.shortCode,\n token: query.token,\n otpCode: values.otpCode,\n };\n\n const { hasExistingAccount } = await searchConsumer(params);\n\n if (hasExistingAccount) {\n push('/existing-account');\n } else {\n push(nextPath);\n }\n } catch (e) {\n if (catchOnly(e, NonClientError, ConsumerSearchError)) {\n if (e instanceof NonClientError || e instanceof ConsumerSearchError) {\n push(nextPath);\n } else {\n enqueueSnackbar(\n 'Something has gone wrong. Please try again later.',\n {\n variant: 'error',\n },\n );\n }\n }\n }\n },\n [\n creditApplication,\n overrideConfig.phoneLookup,\n query.carrier,\n query.keyword,\n query.shortCode,\n query.token,\n trustedBrandPrefill,\n searchConsumer,\n setAnalyticsVariables,\n push,\n nextPath,\n enqueueSnackbar,\n ],\n );\n\n return (\n \n );\n};\n\nexport default ConsumerSearch;\n","import { css, SerializedStyles } from '@emotion/core';\nimport { Theme, helpText } from 'features/Theme';\n\nconst style = {\n headingContainer: (theme: Theme): SerializedStyles => css`\n text-align: center;\n margin-bottom: ${theme.mui.spacing(3)}px;\n `,\n\n formFields: (theme: Theme): SerializedStyles => css`\n margin-bottom: ${theme.mui.spacing(3)}px;\n text-align: center;\n `,\n\n ccpaDisclosure: (theme: Theme): SerializedStyles => css`\n ${helpText(theme)};\n margin-bottom: ${theme.mui.spacing(2)}px;\n `,\n\n disclosureBox: (theme: Theme): SerializedStyles => css`\n ${helpText(theme)};\n margin-bottom: ${theme.mui.spacing(3)}px;\n `,\n\n finePrint: (theme: Theme): SerializedStyles => css`\n ${helpText(theme)};\n margin-top: -${theme.mui.spacing(1)}px;\n margin-bottom: ${theme.mui.spacing(3)}px;\n `,\n};\n\nexport default style;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport { phoneMask, zipMask } from 'utils/masks';\nimport useTranslate from 'hooks/useTranslate';\nimport {\n useMarkdownTranslate,\n useMarkdownMultilineTranslate,\n useKeyResolution,\n} from 'hooks/useTranslate/useTranslate';\n\nimport { Container, Typography } from '@material-ui/core';\nimport { Field, FieldProps, Form, FormikProps } from 'formik';\n\nimport Logo from 'features/Logo/Logo';\nimport SkipPrefillButton from 'features/SkipPrefillButton';\n\nimport Link from 'components/Link';\nimport PageContainer from 'components/PageContainer';\nimport { FormTextField, TextFieldPopover } from 'components/TextField';\nimport { SsnField } from 'components/form';\n\nimport styles from './styles';\nimport ConsumerSearchContext from './ConsumerSearchContext';\nimport { titleText, subtitleText } from 'features/Theme';\nimport { Fragment, useRef, useContext } from 'react';\nimport DisclosureBox from 'features/DisclosureBox';\nimport CancelButton from 'features/CancelButton';\nimport IovationButton from 'features/IovationButton';\nimport ActionButtonContainer from 'components/ActionButtonsContainer';\n\nexport interface FormValues {\n mobilePhone?: string;\n ssn?: string;\n zip?: string;\n}\n\ntype PropTypes = FormikProps;\n\nexport default function LookupFormView(\n props: PropTypes,\n) {\n const { values, isValid, isSubmitting } = props;\n\n const {\n isAccountLookup,\n skipToPath,\n i18nPrefix,\n lookupType,\n prompt,\n hasExistingAccount,\n } = useContext(ConsumerSearchContext);\n\n const t = useTranslate();\n const tMd = useMarkdownTranslate();\n const tMdMultiline = useMarkdownMultilineTranslate();\n const mobilePhoneRef = useRef(null);\n const hasMobilePhone = 'mobilePhone' in values;\n const hasZipCode = 'zip' in values;\n const hasSSN = 'ssn' in values;\n const contextualTitle = hasExistingAccount\n ? tMd(`${i18nPrefix}title`, { context: 'existingAccount' })\n : tMd(`${i18nPrefix}title`);\n const resolveKey = useKeyResolution();\n const cancelApplicationButtonKey = `${i18nPrefix}cancelButton`;\n const cancelApplicationButton = resolveKey(cancelApplicationButtonKey)\n ? t(cancelApplicationButtonKey)\n : '';\n\n return (\n
\n \n \n \n \n \n
\n

{contextualTitle}

\n
\n\n
\n {prompt &&

{tMd(`${i18nPrefix}prompt`)}

}\n \n {hasMobilePhone && (\n \n {(fieldProps: FieldProps) => (\n \n )}\n \n )}\n \n \n {tMdMultiline(`${i18nPrefix}tcpaDisclosure`)}\n \n \n \n\n {hasSSN && }\n\n {hasZipCode && (\n \n {(fieldProps: FieldProps) => (\n \n )}\n \n )}\n
\n
\n\n {!isAccountLookup && (\n \n
\n {tMdMultiline(`${i18nPrefix}ccpaDisclosure`)}\n
\n
\n )}\n\n {!isAccountLookup && (\n \n )}\n\n {lookupType !== 'tokenLookup' && (\n \n
\n {tMdMultiline(`${i18nPrefix}shortCodeDisclosure`)}\n
\n
\n )}\n\n \n \n {t(`${i18nPrefix}nextButton`)}\n \n\n {skipToPath ? (\n \n {t(`${i18nPrefix}manualEntryButton`)}\n \n ) : null}\n\n {cancelApplicationButton}\n \n
\n
\n );\n}\n","import { createAction, createReducer } from 'deox';\n\nexport interface AuthenticityToken {\n token: string | null;\n}\n\nconst defaultState: AuthenticityToken = {\n token: null,\n};\n\nexport const setAuthenticityToken = createAction(\n 'SET_AUTHENTICITY_TOKEN',\n resolve => (token: string) => resolve(token),\n);\n\nexport const authenticityTokenReducer = createReducer(\n defaultState,\n handleAction => [\n handleAction(setAuthenticityToken, (state, { payload: token }) => ({\n ...state,\n token,\n })),\n ],\n);\n\ninterface MountedState {\n authenticityToken: AuthenticityToken;\n}\n\nexport const selectAuthenticityToken = (state: MountedState): string => {\n if (!state.authenticityToken.token)\n throw new Error('Expect the authenticityToken to have been provided');\n\n return state.authenticityToken.token;\n};\n\nexport default authenticityTokenReducer;\n","import { createAction, createReducer } from 'deox';\n\nexport interface Iovation {\n url: string | null;\n}\n\nconst defaultState: Iovation = {\n url: null,\n};\n\nexport const setIovationUrl = createAction(\n 'SET_IOVATION_URL',\n resolve => (url: string) => resolve(url),\n);\n\nexport const iovationReducer = createReducer(defaultState, handleAction => [\n handleAction(setIovationUrl, (state, { payload: url }) => ({\n ...state,\n url,\n })),\n]);\n\ninterface MountedState {\n iovation: Iovation;\n}\n\nexport const selectIovationUrl = (state: MountedState): string => {\n if (!state.iovation.url)\n throw new Error('Expect the Iovation URL to have been provided');\n\n return state.iovation.url;\n};\n\nexport default iovationReducer;\n","export enum Step {\n CARD_CHOICE = 'cardChoice',\n PRODUCT_CHOICE = 'productChoice',\n CONSUMER_SEARCH = 'consumerSearch',\n // NOTE: Step.APPLICATION is used by all workflows; 'creditApplication' is thus rather too specific, but meh.\n APPLICATION = 'creditApplication',\n APPLICATION_2 = 'creditApplication2',\n ADD_ONS = 'addOns',\n REVIEW_TERMS = 'reviewTerms',\n\n PRESCREEN_OFFER = 'prescreenOffer',\n\n DSP_START = 'dspStart',\n\n BATCH_PRESCREEN_START = 'batchPrescreenStart',\n\n PREQUAL_OFFER_APPLICATION = 'prequalOfferApplication',\n PREQUAL_OFFER_PUSH_START = 'prequalOfferPushStart',\n\n MEMBERSHIP_VALIDATION = 'membershipValidation',\n\n DRIVER_LICENSE_START = 'driverLicenseStart',\n SCAN_PAGE = 'scanPage',\n}\n\nexport interface Workflow {\n /**\n * Keys are steps in the workflow\n * Values are whether that particular step is enabled.\n */\n stepsEnabled: Partial<{ [key in Step]: boolean }>;\n /**\n * Map workflow steps to paths\n */\n paths: Partial<{ [step in Step]: string }>;\n /**\n * The first step in the progress bar\n */\n progressStartStep: Step | null;\n\n /**\n * The step to go to when restarting the workflow\n */\n restartStep: Step;\n\n /**\n * The step to go to when the app times out\n */\n timeoutRestartPath: string;\n}\n","import { useCallback } from 'react';\nimport { Step, Workflow } from './Workflow';\nimport useFeature from 'hooks/useFeature';\nimport { FeatureGroups } from 'state/tenant';\nimport useResponsiveQuery from 'hooks/useResponsiveQuery';\n\nconst useMembershipValidationWorkflow = () => {\n const { isGroupEnabled } = useFeature();\n const { isMobile } = useResponsiveQuery();\n\n const getWorkflow = useCallback((): Workflow => {\n return {\n stepsEnabled: {\n [Step.MEMBERSHIP_VALIDATION]: true,\n\n [Step.APPLICATION]: true,\n\n [Step.APPLICATION_2]: isMobile,\n\n [Step.ADD_ONS]: isGroupEnabled(FeatureGroups['add-ons']),\n\n [Step.REVIEW_TERMS]: true,\n },\n paths: {\n [Step.MEMBERSHIP_VALIDATION]: '/membership-validation',\n [Step.APPLICATION]: '/credit-application',\n [Step.APPLICATION_2]: '/credit-application/2',\n [Step.ADD_ONS]: '/add-ons',\n [Step.REVIEW_TERMS]: '/review-terms',\n },\n progressStartStep: Step.APPLICATION,\n restartStep: Step.MEMBERSHIP_VALIDATION,\n timeoutRestartPath: '/membership-validation',\n };\n }, [isGroupEnabled, isMobile]);\n\n return getWorkflow;\n};\n\nexport default useMembershipValidationWorkflow;\n","import { useCallback } from 'react';\nimport { Step, Workflow } from './Workflow';\nimport { FeatureGroups } from 'state/tenant';\nimport useFeature from 'hooks/useFeature';\n\nconst usePrequalOfferPush = () => {\n const { isGroupEnabled } = useFeature();\n const getWorkflow = useCallback((): Workflow => {\n return {\n stepsEnabled: {\n [Step.PREQUAL_OFFER_PUSH_START]: true,\n [Step.APPLICATION]: true,\n [Step.ADD_ONS]: isGroupEnabled(FeatureGroups['add-ons']),\n [Step.REVIEW_TERMS]: true,\n },\n paths: {\n [Step.PREQUAL_OFFER_PUSH_START]: '/prequal/offer-push',\n [Step.APPLICATION]: '/prequal/offer-push-application',\n [Step.ADD_ONS]: '/add-ons',\n [Step.REVIEW_TERMS]: '/prequal/review-terms',\n },\n progressStartStep: Step.APPLICATION,\n restartStep: Step.PREQUAL_OFFER_PUSH_START,\n timeoutRestartPath: '/prequal/offer-push',\n };\n }, [isGroupEnabled]);\n\n return getWorkflow;\n};\n\nexport default usePrequalOfferPush;\n","import { useCallback } from 'react';\nimport { useSelector } from 'react-redux';\n\nimport { Step, Workflow } from './Workflow';\nimport useFeature from 'hooks/useFeature';\nimport { selectPrequalOffer } from 'state/prequalOffer';\nimport { FeatureGroups } from 'state/tenant';\nimport useResponsiveQuery from 'hooks/useResponsiveQuery';\n\nconst usePrequalPhoneLookupWorkflow = () => {\n const { isGroupEnabled } = useFeature();\n const { prequalificationId } = useSelector(selectPrequalOffer);\n const { isMobile } = useResponsiveQuery();\n\n const getWorkflow = useCallback((): Workflow => {\n return {\n stepsEnabled: {\n [Step.CONSUMER_SEARCH]: true,\n [Step.PREQUAL_OFFER_APPLICATION]: true,\n [Step.APPLICATION]: true,\n // Credit application has a second step, whereas prequalification\n // does not.\n [Step.APPLICATION_2]: !prequalificationId && isMobile,\n [Step.ADD_ONS]: isGroupEnabled(FeatureGroups['add-ons']),\n [Step.REVIEW_TERMS]: true,\n },\n paths: {\n [Step.CONSUMER_SEARCH]: '/prequal/phone-lookup',\n [Step.PREQUAL_OFFER_APPLICATION]: '/prequal/offer-application',\n [Step.APPLICATION]: '/prequal/application',\n [Step.ADD_ONS]: '/add-ons',\n [Step.REVIEW_TERMS]: '/prequal/review-terms',\n },\n progressStartStep: Step.PREQUAL_OFFER_APPLICATION,\n restartStep: Step.CONSUMER_SEARCH,\n timeoutRestartPath: '/prequal/phone-lookup',\n };\n }, [isGroupEnabled, isMobile, prequalificationId]);\n\n return getWorkflow;\n};\n\nexport default usePrequalPhoneLookupWorkflow;\n","import { useCallback } from 'react';\nimport { useSelector } from 'react-redux';\nimport useFeature from 'hooks/useFeature';\nimport { selectPrequalOffer } from 'state/prequalOffer';\nimport { FeatureGroups } from 'state/tenant';\nimport { Step, Workflow } from './Workflow';\nimport useResponsiveQuery from 'hooks/useResponsiveQuery';\n\nconst usePrequalTokenLookupWorkflow = () => {\n const { isGroupEnabled } = useFeature();\n const { prequalificationId } = useSelector(selectPrequalOffer);\n const { isMobile } = useResponsiveQuery();\n\n const getWorkflow = useCallback((): Workflow => {\n return {\n stepsEnabled: {\n [Step.CONSUMER_SEARCH]: true,\n [Step.PREQUAL_OFFER_APPLICATION]: true,\n [Step.APPLICATION]: true,\n [Step.APPLICATION_2]: !prequalificationId && isMobile,\n [Step.ADD_ONS]: isGroupEnabled(FeatureGroups['add-ons']),\n [Step.REVIEW_TERMS]: true,\n },\n paths: {\n [Step.CONSUMER_SEARCH]: '/prequal/token-lookup',\n [Step.PREQUAL_OFFER_APPLICATION]: '/prequal/offer-application',\n [Step.APPLICATION]: '/prequal/application',\n [Step.ADD_ONS]: '/add-ons',\n [Step.REVIEW_TERMS]: '/prequal/review-terms',\n },\n progressStartStep: Step.PREQUAL_OFFER_APPLICATION,\n restartStep: Step.CONSUMER_SEARCH,\n timeoutRestartPath: '/prequal/token-lookup',\n };\n }, [isGroupEnabled, isMobile, prequalificationId]);\n\n return getWorkflow;\n};\n\nexport default usePrequalTokenLookupWorkflow;\n","/**\n * Batch prescreen workflow\n */\n\nimport { useCallback } from 'react';\nimport { Step, Workflow } from './Workflow';\nimport useFeature from 'hooks/useFeature';\nimport { selectTenant, FeatureGroups } from 'state/tenant';\nimport { selectVirtualLookupSuccessful } from 'state/prescreen';\nimport { useSelector } from 'react-redux';\nimport useResponsiveQuery from 'hooks/useResponsiveQuery';\nconst useBatchPrescreenWorkflow = () => {\n const tenant = useSelector(selectTenant);\n const virtualLookupSuccessful = useSelector(selectVirtualLookupSuccessful);\n const { isGroupEnabled } = useFeature();\n const { isMobile } = useResponsiveQuery();\n\n const getWorkflow = useCallback((): Workflow => {\n return {\n stepsEnabled: {\n [Step.BATCH_PRESCREEN_START]: true,\n\n [Step.CARD_CHOICE]: tenant.enabledFeatures.cardChoices.length > 0,\n\n [Step.CONSUMER_SEARCH]: !virtualLookupSuccessful,\n\n [Step.APPLICATION]: true,\n\n [Step.APPLICATION_2]: isMobile,\n\n [Step.ADD_ONS]: isGroupEnabled(FeatureGroups['add-ons']),\n\n [Step.REVIEW_TERMS]: true,\n },\n paths: {\n [Step.BATCH_PRESCREEN_START]: '/batch-prescreen/start',\n [Step.CARD_CHOICE]: '/card-choice',\n [Step.CONSUMER_SEARCH]: '/consumer-search',\n [Step.APPLICATION]: '/prescreen/application',\n [Step.APPLICATION_2]: '/prescreen/application/2',\n [Step.ADD_ONS]: '/add-ons',\n [Step.REVIEW_TERMS]: '/prescreen/review-terms',\n },\n progressStartStep: Step.APPLICATION,\n restartStep: Step.BATCH_PRESCREEN_START,\n timeoutRestartPath: '/batch-prescreen/start',\n };\n }, [tenant, isGroupEnabled, isMobile, virtualLookupSuccessful]);\n return getWorkflow;\n};\n\nexport default useBatchPrescreenWorkflow;\n","/**\n * DSP Push workflow\n */\n\nimport { useCallback } from 'react';\nimport { Step, Workflow } from './Workflow';\nimport useFeature from 'hooks/useFeature';\n\nconst useDspPushWorkflow = () => {\n const { isEnabled } = useFeature();\n\n const getWorkflow = useCallback((): Workflow => {\n if (!isEnabled('dspPush')) {\n throw new Error(`Workflow 'dspPush' not supported for this tenant`);\n }\n return {\n stepsEnabled: {\n [Step.DSP_START]: true,\n },\n paths: {\n [Step.DSP_START]: '/dsp-start',\n },\n progressStartStep: Step.DSP_START,\n restartStep: Step.DSP_START,\n timeoutRestartPath: '/dsp-start',\n };\n }, [isEnabled]);\n return getWorkflow;\n};\n\nexport default useDspPushWorkflow;\n","import { useCallback } from 'react';\nimport { useSelector } from 'react-redux';\n\nimport { Step, Workflow } from './Workflow';\nimport useFeature from 'hooks/useFeature';\nimport { selectTenant, FeatureGroups } from 'state/tenant';\nimport useResponsiveQuery from 'hooks/useResponsiveQuery';\nimport { selectEnhancedCheckout } from 'state/enhancedCheckout';\n\nconst useEnhancedCheckoutWorkflow = () => {\n const { isGroupEnabled } = useFeature();\n const tenant = useSelector(selectTenant);\n const { isMobile } = useResponsiveQuery();\n const { consumerSearchResult } = useSelector(selectEnhancedCheckout);\n\n const getWorkflow = useCallback((): Workflow => {\n const hasCardChoice = tenant.enabledFeatures.cardChoices.length > 0;\n const hasProductChoice = tenant.enabledFeatures.productChoices.length > 0;\n const hasExistingAccount = consumerSearchResult === 'existingAccount';\n\n return {\n stepsEnabled: hasExistingAccount\n ? {\n [Step.CONSUMER_SEARCH]: true,\n }\n : {\n [Step.CONSUMER_SEARCH]: true,\n [Step.PRODUCT_CHOICE]: hasProductChoice,\n [Step.CARD_CHOICE]: hasCardChoice,\n [Step.APPLICATION]: true,\n [Step.APPLICATION_2]: isMobile,\n [Step.ADD_ONS]: isGroupEnabled(FeatureGroups['add-ons']),\n [Step.REVIEW_TERMS]: true,\n },\n\n paths: {\n [Step.CONSUMER_SEARCH]: '/enhanced-checkout',\n [Step.PRODUCT_CHOICE]: '/product-choice',\n [Step.CARD_CHOICE]: '/card-choice',\n [Step.APPLICATION]: '/credit-application',\n [Step.APPLICATION_2]: '/credit-application/2',\n [Step.ADD_ONS]: '/add-ons',\n [Step.REVIEW_TERMS]: '/review-terms',\n },\n progressStartStep: Step.CONSUMER_SEARCH,\n restartStep: Step.CONSUMER_SEARCH,\n timeoutRestartPath: '/enhanced-checkout',\n };\n }, [isGroupEnabled, isMobile, tenant, consumerSearchResult]);\n\n return getWorkflow;\n};\n\nexport default useEnhancedCheckoutWorkflow;\n","import { useCallback } from 'react';\nimport { Step, Workflow } from './Workflow';\nimport useFeature from 'hooks/useFeature';\nimport { selectTenant, FeatureGroups } from 'state/tenant';\nimport { useSelector } from 'react-redux';\nimport useResponsiveQuery from 'hooks/useResponsiveQuery';\nimport { reject, not, keys } from 'ramda';\n\nconst useFmcWorkflow = () => {\n const tenant = useSelector(selectTenant);\n const { overrideConfig } = tenant;\n const { isGroupEnabled } = useFeature();\n const { isMobile } = useResponsiveQuery();\n\n const getWorkflow = useCallback((): Workflow => {\n const hasCardChoice = tenant.enabledFeatures.cardChoices.length > 0;\n const hasProductChoice = tenant.enabledFeatures.productChoices.length > 0;\n const hasConsumerSearch =\n overrideConfig.tokenLookup || overrideConfig.phoneLookup;\n\n const stepsEnabled = {\n [Step.PRODUCT_CHOICE]: hasProductChoice,\n\n [Step.CARD_CHOICE]: hasCardChoice,\n\n [Step.CONSUMER_SEARCH]: hasConsumerSearch,\n\n [Step.APPLICATION]: true,\n\n [Step.APPLICATION_2]: isMobile,\n\n [Step.ADD_ONS]: isGroupEnabled(FeatureGroups['add-ons']),\n\n [Step.REVIEW_TERMS]: true,\n };\n\n const progressStartStep = Step.APPLICATION;\n\n const firstStep = ((keys(\n reject(not, stepsEnabled),\n ) as unknown) as Step[])[0];\n\n const paths = {\n [Step.PRODUCT_CHOICE]: '/product-choice',\n [Step.CARD_CHOICE]: '/card-choice',\n [Step.CONSUMER_SEARCH]: '/consumer-search',\n [Step.APPLICATION]: '/credit-application',\n [Step.APPLICATION_2]: '/credit-application/2',\n [Step.ADD_ONS]: '/add-ons',\n [Step.REVIEW_TERMS]: '/review-terms',\n ...{\n [firstStep]: '/',\n },\n };\n\n return {\n stepsEnabled,\n paths,\n progressStartStep,\n restartStep: firstStep,\n timeoutRestartPath: '/',\n };\n }, [tenant, overrideConfig, isGroupEnabled, isMobile]);\n\n return getWorkflow;\n};\n\nexport default useFmcWorkflow;\n","import { useCallback } from 'react';\nimport { useSelector } from 'react-redux';\nimport { Step, Workflow } from './Workflow';\nimport useFeature from 'hooks/useFeature';\nimport { selectTenant, FeatureGroups } from 'state/tenant';\nimport { selectDriversLicense } from 'state/driversLicense';\nimport useResponsiveQuery from 'hooks/useResponsiveQuery';\nimport { reject, not, keys } from 'ramda';\n\nconst useIcDriverLicenseWorkflow = () => {\n const tenant = useSelector(selectTenant);\n const { result: driversLicense } = useSelector(selectDriversLicense);\n const { isGroupEnabled } = useFeature();\n const { isMobile } = useResponsiveQuery();\n\n const getWorkflow = useCallback((): Workflow => {\n const hasCardChoice = tenant.enabledFeatures.cardChoices.length > 0;\n const hasProductChoice = tenant.enabledFeatures.productChoices.length > 0;\n const hasConsumerSearch = driversLicense !== 'success';\n\n const stepsEnabled = {\n [Step.PRODUCT_CHOICE]: hasProductChoice,\n\n [Step.CARD_CHOICE]: hasCardChoice,\n\n [Step.DRIVER_LICENSE_START]: true,\n\n [Step.SCAN_PAGE]: true,\n\n [Step.CONSUMER_SEARCH]: hasConsumerSearch,\n\n [Step.APPLICATION]: true,\n\n [Step.APPLICATION_2]: isMobile,\n\n [Step.ADD_ONS]: isGroupEnabled(FeatureGroups['add-ons']),\n\n [Step.REVIEW_TERMS]: true,\n };\n\n const progressStartStep = Step.APPLICATION;\n\n const firstStep = ((keys(\n reject(not, stepsEnabled),\n ) as unknown) as Step[])[0];\n\n const paths = {\n [Step.PRODUCT_CHOICE]: '/product-choice',\n [Step.CARD_CHOICE]: '/card-choice',\n [Step.DRIVER_LICENSE_START]: '/driver-license/start',\n [Step.SCAN_PAGE]: '/driver-license/scan-page',\n [Step.CONSUMER_SEARCH]: '/consumer-search',\n [Step.APPLICATION]: '/credit-application',\n [Step.APPLICATION_2]: '/credit-application/2',\n [Step.ADD_ONS]: '/add-ons',\n [Step.REVIEW_TERMS]: '/review-terms',\n ...{\n [firstStep]: '/driver-license',\n },\n };\n\n return {\n stepsEnabled,\n paths,\n progressStartStep,\n restartStep: firstStep,\n timeoutRestartPath: '/driver-license',\n };\n }, [tenant, isGroupEnabled, isMobile, driversLicense]);\n\n return getWorkflow;\n};\n\nexport default useIcDriverLicenseWorkflow;\n","import { useCallback } from 'react';\nimport { useSelector } from 'react-redux';\n\nimport { Step, Workflow } from './Workflow';\nimport useFeature from 'hooks/useFeature';\nimport { selectPrequalOffer } from 'state/prequalOffer';\nimport { selectDriversLicense } from 'state/driversLicense';\nimport { FeatureGroups } from 'state/tenant';\nimport useResponsiveQuery from 'hooks/useResponsiveQuery';\n\nconst usePrequalDriverLicenseWorkflow = () => {\n const { isGroupEnabled } = useFeature();\n const { prequalificationId } = useSelector(selectPrequalOffer);\n const { result: driversLicense } = useSelector(selectDriversLicense);\n const { isMobile } = useResponsiveQuery();\n const getWorkflow = useCallback((): Workflow => {\n const hasConsumerSearch = driversLicense === null;\n return {\n stepsEnabled: {\n [Step.DRIVER_LICENSE_START]: true,\n [Step.SCAN_PAGE]: true,\n [Step.CONSUMER_SEARCH]: hasConsumerSearch,\n [Step.PREQUAL_OFFER_APPLICATION]: true,\n [Step.APPLICATION]: true,\n // Credit application has a second step, whereas prequalification\n // does not.\n [Step.APPLICATION_2]: !prequalificationId && isMobile,\n [Step.ADD_ONS]: isGroupEnabled(FeatureGroups['add-ons']),\n [Step.REVIEW_TERMS]: true,\n },\n paths: {\n [Step.DRIVER_LICENSE_START]: '/prequal/driver-license',\n [Step.SCAN_PAGE]: '/driver-license/scan-page',\n [Step.CONSUMER_SEARCH]: '/prequal/phone-lookup',\n [Step.PREQUAL_OFFER_APPLICATION]: '/prequal/offer-application',\n [Step.APPLICATION]: '/prequal/application',\n [Step.ADD_ONS]: '/add-ons',\n [Step.REVIEW_TERMS]: '/prequal/review-terms',\n },\n progressStartStep: Step.PREQUAL_OFFER_APPLICATION,\n restartStep: Step.DRIVER_LICENSE_START,\n timeoutRestartPath: '/prequal//driver-license',\n };\n }, [isGroupEnabled, isMobile, driversLicense, prequalificationId]);\n\n return getWorkflow;\n};\n\nexport default usePrequalDriverLicenseWorkflow;\n","/**\n * Real time prescreen workflow\n */\n\nimport { useCallback } from 'react';\nimport { Step, Workflow } from './Workflow';\nimport useFeature from 'hooks/useFeature';\nimport { selectTenant, FeatureGroups } from 'state/tenant';\nimport { useSelector } from 'react-redux';\nimport useResponsiveQuery from 'hooks/useResponsiveQuery';\nimport { selectVirtualLookupSuccessful } from 'state/prescreen';\n\nconst usePrescreenWorkflow = () => {\n const tenant = useSelector(selectTenant);\n const { isGroupEnabled } = useFeature();\n const { isMobile } = useResponsiveQuery();\n const virtualLookupSuccessful = useSelector(selectVirtualLookupSuccessful);\n\n const getWorkflow = useCallback((): Workflow => {\n return {\n stepsEnabled: {\n [Step.PRESCREEN_OFFER]: true,\n\n [Step.CARD_CHOICE]: tenant.enabledFeatures.cardChoices.length > 0,\n\n [Step.CONSUMER_SEARCH]: !virtualLookupSuccessful,\n\n [Step.APPLICATION]: true,\n\n [Step.APPLICATION_2]: isMobile,\n\n [Step.ADD_ONS]: isGroupEnabled(FeatureGroups['add-ons']),\n\n [Step.REVIEW_TERMS]: true,\n },\n paths: {\n [Step.PRESCREEN_OFFER]: '/prescreen/offer',\n [Step.CARD_CHOICE]: '/card-choice',\n [Step.CONSUMER_SEARCH]: '/consumer-search',\n [Step.APPLICATION]: '/prescreen/application',\n [Step.APPLICATION_2]: '/prescreen/application/2',\n [Step.ADD_ONS]: '/add-ons',\n [Step.REVIEW_TERMS]: '/prescreen/review-terms',\n },\n progressStartStep: Step.APPLICATION,\n restartStep: Step.PRESCREEN_OFFER,\n timeoutRestartPath: '/',\n };\n }, [tenant, isGroupEnabled, isMobile, virtualLookupSuccessful]);\n return getWorkflow;\n};\n\nexport default usePrescreenWorkflow;\n","import { Workflow, Step } from './Workflow';\nimport { useMemo, useCallback } from 'react';\nimport { keys, reject, not, findIndex, equals, prop } from 'ramda';\n\nconst useWorkflowHelpers = (workflow: Workflow) => {\n const steps = useMemo(() => {\n const { stepsEnabled } = workflow;\n return (keys(reject(not, stepsEnabled)) as unknown) as Step[];\n }, [workflow]);\n\n const paths = useMemo(() => workflow.paths, [workflow]);\n\n const stepNumber = useCallback(\n (step: Step) => {\n const index = findIndex(equals(step), steps);\n if (index === -1) {\n throw new Error(`Step ${step} is not in workflow`);\n }\n return index;\n },\n [steps],\n );\n\n const hasStep = useCallback(\n (step: Step) => {\n return findIndex(equals(step), steps) !== -1;\n },\n [steps],\n );\n\n const pathFor = useCallback(\n (step: Step) => {\n const path = prop(step, paths);\n\n if (path === undefined) {\n throw new Error(`No path defined for ${step}`);\n }\n return path;\n },\n [paths],\n );\n\n const stepAfter = useCallback(\n (step: Step) => {\n const index = stepNumber(step);\n const nextIndex = index + 1;\n if (nextIndex >= steps.length) {\n throw new Error(`There are no step after ${step}`);\n }\n return steps[nextIndex];\n },\n [steps, stepNumber],\n );\n\n const pathAfter = useCallback(\n (step: Step) => {\n const nextStep = stepAfter(step);\n\n if (nextStep === null) {\n throw new Error(`No path after ${step}`);\n }\n\n return pathFor(nextStep);\n },\n [pathFor, stepAfter],\n );\n\n const restartPath = useMemo(() => pathFor(workflow.restartStep), [\n workflow.restartStep,\n pathFor,\n ]);\n\n const timeoutRestartPath = useMemo(() => workflow.timeoutRestartPath, [\n workflow.timeoutRestartPath,\n ]);\n\n return {\n steps,\n stepNumber,\n pathFor,\n stepAfter,\n pathAfter,\n hasStep,\n restartPath,\n timeoutRestartPath,\n };\n};\n\nexport default useWorkflowHelpers;\n","import useMembershipValidationWorkflow from 'hooks/useWorkflow/membershipValidationWorkflow';\nimport usePrequalOfferPush from 'hooks/useWorkflow/prequalOfferPush';\nimport usePrequalPhoneLookupWorkflow from 'hooks/useWorkflow/prequalPhoneLookupWorkflow';\nimport usePrequalTokenLookupWorkflow from 'hooks/useWorkflow/prequalTokenLookupWorkflow';\nimport log from 'loglevel';\nimport { useMemo } from 'react';\nimport { useSelector } from 'react-redux';\nimport { selectTenant } from 'state/tenant';\nimport useBatchPrescreenWorkflow from './batchPrescreenWorkflow';\nimport useDspPushWorkflow from './dspPushWorkflow';\nimport useEnhancedCheckoutWorkflow from './enhancedCheckoutWorkflow';\nimport useFmcWorkflow from './fmcWorkflow';\nimport useIcDriverLicenseWorkflow from './icDriverLicenseWorkflow';\nimport usePrequalDriverLicenseWorkflow from './prequalDriverLicenseWorkflow';\nimport usePrescreenWorkflow from './prescreenWorkflow';\nimport { Step, Workflow } from './Workflow';\nimport useWorkflowHelpers from './workflowHelpers';\n\n/**\n * Workflow configuration.\n *\n * Provide a Workflow object and related helpers.\n */\ntype WorkflowHook = () => {\n /**\n * The raw workflow object\n */\n workflow: Workflow;\n\n /**\n * List of step in the current workflow\n */\n steps: Step[];\n\n /**\n * The 0-indexed step number for the given step in the current workflow\n */\n stepNumber: (step: Step) => number;\n\n /**\n * The path for a given step. Must exist in the current workflow.\n */\n pathFor: (step: Step) => string;\n\n /**\n * Return the step after the given step\n */\n stepAfter: (step: Step) => Step;\n\n /**\n * Return the path for the step after the given step.\n * Throw error if there are no next path.\n */\n pathAfter: (step: Step) => string;\n\n hasStep: (step: Step) => boolean;\n\n /**\n * Path to go to when restarting the application\n */\n restartPath: string;\n\n /**\n * The path to go to when the app times out\n */\n timeoutRestartPath: string;\n};\n\nconst useWorkflow: WorkflowHook = () => {\n const { overrideConfig } = useSelector(selectTenant);\n\n const getFmcWorkflow = useFmcWorkflow();\n const getPrescreenWorkflow = usePrescreenWorkflow();\n const getBatchPrescreenWorkflow = useBatchPrescreenWorkflow();\n const getDspPushWorkflow = useDspPushWorkflow();\n const getPrequalPhoneLookupWorkflow = usePrequalPhoneLookupWorkflow();\n const getPrequalTokenLookupWorkflow = usePrequalTokenLookupWorkflow();\n const getPrequalOfferPush = usePrequalOfferPush();\n const getEnhancedCheckoutWorkflow = useEnhancedCheckoutWorkflow();\n const getMembershipValidationWorkflow = useMembershipValidationWorkflow();\n const getIcDriverLicenseWorkflow = useIcDriverLicenseWorkflow();\n const getPrequalDriverLicenseWorkflow = usePrequalDriverLicenseWorkflow();\n const workflow: Workflow = useMemo(() => {\n if (overrideConfig.dspPush) {\n return getDspPushWorkflow();\n } else if (overrideConfig.membershipValidation) {\n return getMembershipValidationWorkflow();\n } else if (overrideConfig.prescreen) {\n return getPrescreenWorkflow();\n } else if (overrideConfig.batchPrescreen) {\n return getBatchPrescreenWorkflow();\n } else if (overrideConfig.prequalPhoneLookup) {\n return getPrequalPhoneLookupWorkflow();\n } else if (overrideConfig.prequalTokenLookup) {\n return getPrequalTokenLookupWorkflow();\n } else if (overrideConfig.prequalOfferPush) {\n return getPrequalOfferPush();\n } else if (overrideConfig.icDriverLicense) {\n return getIcDriverLicenseWorkflow();\n } else if (overrideConfig.prequalDriverLicense) {\n return getPrequalDriverLicenseWorkflow();\n } else if (\n overrideConfig.enhancedCheckoutPhoneLookup ||\n overrideConfig.enhancedCheckoutTokenLookup\n ) {\n return getEnhancedCheckoutWorkflow();\n } else if (overrideConfig.tokenLookup || overrideConfig.phoneLookup) {\n return getFmcWorkflow();\n } else {\n // This should not happen, but for sanity's sake...\n log.error('Unsupported workflow', overrideConfig);\n throw new Error('Unsupported workflow');\n }\n }, [\n overrideConfig,\n getDspPushWorkflow,\n getMembershipValidationWorkflow,\n getPrescreenWorkflow,\n getBatchPrescreenWorkflow,\n getPrequalPhoneLookupWorkflow,\n getPrequalTokenLookupWorkflow,\n getPrequalOfferPush,\n getIcDriverLicenseWorkflow,\n getPrequalDriverLicenseWorkflow,\n getEnhancedCheckoutWorkflow,\n getFmcWorkflow,\n ]);\n\n const workflowHelpers = useWorkflowHelpers(workflow);\n\n return {\n workflow,\n ...workflowHelpers,\n };\n};\n\nexport default useWorkflow;\n","import useWorkflow from './useWorkflow';\n\nexport default useWorkflow;\nexport * from './useWorkflow';\nexport * from './Workflow';\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableConsumerSearch = loadable(() => import('./ConsumerSearch'), {\n fallback: ,\n});\n\nexport default LoadableConsumerSearch;\n","/* eslint-disable @typescript-eslint/camelcase */\n\nimport { useState, useCallback } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { Status } from 'hooks/requests/fetchUtils';\nimport useFetchApi from 'hooks/useFetchApi';\nimport useQueryParameters from 'hooks/useQueryParameters';\n\nimport {\n CreditApplication,\n mergeApplication,\n lockFields,\n selectCreditApplication,\n} from 'state/creditApplication';\nimport { selectTenant } from 'state/tenant';\nimport { Rewards } from 'state/instantCredit';\nimport { keys, pick, pickBy, isNil, complement } from 'ramda';\nimport useIovation from 'hooks/useIovation';\nimport isPresent from 'utils/isPresent';\nimport useAnalyticVariables from 'hooks/useAnalyticVariables';\nimport { ConsumerSearch, mergeConsumerSearch } from 'state/consumerSearch';\nimport useHandleExistingAccount from './handleExistingAccount';\nconst PATH = '/api/consumer_search';\n\nexport interface SearchParams {\n mobilePhone?: string;\n token?: string;\n carrier?: string;\n keyword?: string;\n shortCode?: string;\n ssn?: string;\n zip?: string;\n otpCode?: string;\n}\n\nexport interface DspPushSearchParams extends SearchParams {\n token: string;\n}\n\ninterface SearchResults {\n token: string | undefined;\n accountNumber: string | undefined;\n expirationDate: string | undefined;\n expirationType: string | undefined;\n expirationValue: number | undefined;\n securityCode: string | undefined;\n firstPurchaseLimit: number | undefined;\n creditLimit: number | undefined;\n cardType: string | undefined;\n authAllowed: number | undefined;\n hasExistingAccount: boolean | undefined;\n firstName: string | undefined;\n lastName: string | undefined;\n middleInitial: string | undefined;\n address1: string | undefined;\n address2: string | undefined;\n city: string | undefined;\n state: string | undefined;\n zip: string | undefined;\n ssn: string | undefined;\n phone: string | undefined;\n returnCode: string | undefined;\n virtualCardAccountNumber: string | undefined;\n rewards?: Rewards;\n}\n\ntype ConsumerSearchHook = () => [\n (params: T) => Promise,\n Status,\n boolean,\n];\n\nexport class ConsumerSearchError extends Error {}\n\nconst prefillValues = (results: SearchResults): Partial =>\n pickBy(complement(isNil), {\n firstName: results.firstName,\n lastName: results.lastName,\n address1: results.address1,\n address2: results.address2,\n city: results.city,\n state: results.state,\n zip: results.zip,\n ssn: results.ssn,\n mobilePhone: results.phone,\n });\n\n/**\n * Copy existing values\n */\nconst overrideSearchResults = (\n searchResults: SearchResults,\n creditApplication: CreditApplication,\n): SearchResults => {\n const searchResultsKeys = (keys(\n searchResults,\n ) as unknown) as (keyof SearchResults)[];\n\n const overrideValue = {\n ...creditApplication,\n phone: creditApplication.mobilePhone,\n };\n\n const overrides = pickBy(isPresent, overrideValue) as Partial<\n typeof overrideValue\n >;\n\n return pick(searchResultsKeys, {\n ...searchResults,\n ...overrides,\n }) as SearchResults;\n};\n\nconst useConsumerSearch: ConsumerSearchHook = () => {\n const [error, setError] = useState(false);\n const [status, fetch] = useFetchApi();\n const dispatch = useDispatch();\n const { mockCS, location, channel, subchannel } = useQueryParameters();\n const iovationBlackbox = useIovation();\n const creditApplication = useSelector(selectCreditApplication);\n const tenant = useSelector(selectTenant);\n const { setAnalyticsVariables } = useAnalyticVariables();\n\n const handleExistingAccount = useHandleExistingAccount();\n\n const searchConsumer = useCallback(\n async ({\n carrier,\n keyword,\n mobilePhone,\n shortCode,\n ssn,\n token,\n zip,\n otpCode,\n }: T): Promise => {\n setError(false);\n\n const blackbox = await iovationBlackbox;\n\n const response = await fetch(PATH, {\n method: 'POST',\n body: {\n carrier: carrier,\n keyword: keyword,\n mobilePhone,\n shortCode,\n ssn: ssn,\n token: token,\n zip: zip,\n iovationBlackbox: blackbox,\n mockResponse: mockCS,\n location,\n channel,\n subchannel,\n ...(otpCode ? { otp_code: otpCode } : {}),\n },\n });\n\n if (!response.ok) {\n setError(true);\n dispatch(mergeConsumerSearch({ result: 'error' }));\n return Promise.reject(new ConsumerSearchError());\n }\n\n // TODO: Currently just shoving all of the data into place. Should probably\n // be more discerning somehow. Revisit this.\n let searchResults: SearchResults = await response.json();\n\n if (tenant.trustedBrandPrefill) {\n searchResults = overrideSearchResults(searchResults, creditApplication);\n }\n const consumerSearchResult: ConsumerSearch = searchResults.hasExistingAccount\n ? { result: 'existingAccount' }\n : { result: 'success' };\n\n dispatch(mergeConsumerSearch(consumerSearchResult));\n dispatch(mergeApplication(prefillValues(searchResults)));\n dispatch(\n lockFields({\n ssn: Boolean(searchResults.ssn),\n mobilePhone: Boolean(mobilePhone || searchResults.phone),\n }),\n );\n\n if (searchResults.hasExistingAccount) {\n handleExistingAccount(\n searchResults,\n {\n sendToSdk: true,\n isValidated: true,\n },\n { mobilePhone: mobilePhone || null },\n );\n }\n\n setAnalyticsVariables({ consumerSearchSuccessful: 'true' });\n return searchResults;\n },\n [\n iovationBlackbox,\n fetch,\n mockCS,\n location,\n channel,\n subchannel,\n tenant.trustedBrandPrefill,\n dispatch,\n setAnalyticsVariables,\n creditApplication,\n handleExistingAccount,\n ],\n );\n\n return [searchConsumer, status, error];\n};\n\nexport default useConsumerSearch;\n","import { useEffect, useCallback, useRef } from 'react';\n\nexport type TimeoutHook = () => [\n /**\n * Start a timeout. Clear the last timeout set from the same hook if any.\n * Same as setTimeout. Don't call this during server side rendering (i.e.,\n * outside of callback or useEffect)!\n */\n (handler: Function, timeout?: number) => void,\n /**\n * Clear the last timer set by the same hook.\n */\n () => void,\n];\n\n/**\n * Hook to returns setTimeout function that automatically clear\n * when the component unmount.\n */\nconst useTimeout: TimeoutHook = () => {\n const idRef = useRef(null);\n\n const clear = useCallback(() => {\n if (idRef.current) {\n clearTimeout(idRef.current);\n idRef.current = null;\n }\n }, [idRef]);\n\n const safeSetTimeout = useCallback(\n (handler: Function, timeout?: number) => {\n clear();\n const timerId = setTimeout(handler, timeout);\n idRef.current = timerId;\n },\n [idRef, clear],\n );\n\n useEffect(() => {\n return clear;\n }, [clear]);\n\n return [safeSetTimeout, clear];\n};\n\nexport default useTimeout;\n","import { reduce, map } from 'ramda';\n\n/**\n * Combine an array of overrides of different types into a single one, ordered\n * from lowest to highest precedence\n */\nexport const mergeOverrides = )[]>(\n overrides: T,\n): MergeResult => {\n return reduce(\n (acc, override) => combineOverrides(acc, override) as MergeResult,\n {\n precedence: [] as const,\n shouldApply: {},\n } as MergeResult,\n overrides,\n );\n};\n\n/**\n * Describe an override configuration: the order of override that could be\n * applied, from lowest to highest, and whether each one should be applied.\n */\nexport interface Override {\n /**\n * The order of override type that should apply from lowest to highest\n * precedence.\n */\n precedence: readonly T[];\n /**\n * An object whose key is the override type and value is a boolean on whether\n * it should be applied.\n */\n shouldApply: {\n // Detect if T is `string`. If T is string, Exclude == never\n // If T is a literal string/string union, Exclude is still string.\n // So if T is a union, we require that all keys in T be required.\n // Otherwise, if we are mapping string to boolean, some string maybe undefined.\n [K in T]: T extends Exclude ? boolean : boolean | undefined;\n };\n}\n\n/**\n * Combine two override objects A and B into one, where everything in B\n * takes precedence over everything in A.\n */\nfunction combineOverrides(\n a: Override,\n b: Override,\n): Override {\n return {\n precedence: [...a.precedence, ...b.precedence],\n shouldApply: { ...a.shouldApply, ...b.shouldApply },\n };\n}\n\ntype UnwrapOverride = T extends Override ? K : never;\n\n/**\n * Combine a tuple of type [Override, Override, Override, ...] into\n * a single Override\n */\ntype MergeResult)[]> = T extends (infer U)[]\n ? Override>\n : never;\n\n/**\n * Return an array of translation keys to use in the order that would apply the\n * provided overrides with the given precedence.\n *\n * @param key translation key\n * @param override An override configuration\n */\nexport const fallBackForKey = >(\n key: string,\n override: T,\n) => {\n return reduce(\n (acc, item) => {\n if (!override.shouldApply[item]) return acc;\n const newItems = map(previousItem => {\n return `override.${item}.${previousItem}`;\n }, acc);\n return [...newItems, ...acc];\n },\n [key],\n override.precedence as string[],\n );\n};\n","import camelcase from 'camelcase';\nimport { TOptions } from 'i18next';\nimport { curry, find, mergeDeepLeft, pick, reduce } from 'ramda';\nimport React, { ReactElement, useCallback, useMemo } from 'react';\nimport { Trans as LibTrans, TransProps, useTranslation } from 'react-i18next';\nimport ReactMarkdown from 'react-markdown/with-html';\nimport { useSelector } from 'react-redux';\nimport {\n isOptInOrOptOut,\n selectCreditApplication,\n} from 'state/creditApplication';\nimport { selectInstantCredit } from 'state/instantCredit';\nimport { selectTenant, Tenant } from 'state/tenant';\nimport { fallBackForKey, mergeOverrides, Override } from './overrides';\n\n/**\n * Similar signature to i18next.TFunction, but more limited.\n * This is sufficient for current usage.\n * May need some expansion for other form of usage.\n *\n * Particularly, if we want to support fallback keys array,\n * the fallBackForKey function needs to be expanded to account for that.\n */\ninterface NewTFunction {\n (key: string, options?: TOptions | string): string;\n (key: string, defaultValue?: string, options?: TOptions | string): string;\n}\n\n/**\n * Generate an override object that is turned on or off depending only on\n * the tenant overrideConfig.\n */\nconst getSimpleOverrides = curry(\n (\n overrideConfig: Tenant['overrideConfig'],\n precedence: readonly T[],\n ): Override => {\n return {\n precedence: precedence,\n shouldApply: (pick(precedence as T[], overrideConfig) as unknown) as {\n [K in T]: T extends Exclude ? boolean : boolean | undefined;\n },\n };\n },\n);\n\nconst useOptIntOutOverrides = (): Override<'optIn' | 'optOut'> => {\n const tenant = useSelector(selectTenant);\n const creditApplication = useSelector(selectCreditApplication);\n const optInOut = isOptInOrOptOut(creditApplication, tenant);\n return useMemo(\n () => ({\n precedence: ['optIn', 'optOut'] as const,\n shouldApply: {\n optIn: optInOut === 'optIn',\n optOut: optInOut === 'optOut',\n },\n }),\n [optInOut],\n );\n};\n\nexport const useProductChoiceOverrides = (): Override => {\n const {\n enabledFeatures: { productChoices },\n } = useSelector(selectTenant);\n const { productChoiceKey } = useSelector(selectCreditApplication);\n return useMemo(() => {\n if (!productChoiceKey || !productChoices) {\n return { precedence: [], shouldApply: {} };\n }\n\n const overrideKey = `productChoices.${productChoiceKey}`;\n return {\n precedence: [overrideKey] as const,\n shouldApply: { [overrideKey]: true },\n };\n }, [productChoiceKey, productChoices]);\n};\n\n/**\n * TODO: Rename this, since this has little to do with tenantConfig\n * dspOverrides and it also applies to more than the DSP.\n */\nexport const useDspOverrides = () => {\n const { cardType: icCardType } = useSelector(selectInstantCredit);\n const { cardType: creditAppCardType } = useSelector(selectCreditApplication);\n return useMemo(() => {\n const cardType = icCardType || creditAppCardType;\n if (!cardType) {\n return { precedence: [], shouldApply: {} };\n }\n\n // Expect cardType translation key will also be camelcased like\n // tenant dsp overrides keys.\n const overrideKey = `dspOverrides.${camelcase(cardType)}`;\n return {\n precedence: [overrideKey] as const,\n shouldApply: { [overrideKey]: true },\n };\n }, [icCardType, creditAppCardType]);\n};\n\nconst workflowPrecedence = [\n 'phoneLookup',\n 'tokenLookup',\n 'prescreen',\n 'batchPrescreen',\n 'prequalPhoneLookup',\n 'prequalTokenLookup',\n 'prequalOfferPush',\n 'dspPush',\n 'enhancedCheckoutPhoneLookup',\n 'enhancedCheckoutTokenLookup',\n 'membershipValidation',\n 'icDriverLicense',\n 'prequalDriverLicense',\n 'enhancedPresentment',\n 'stage',\n 'production',\n] as const;\n\nconst featurePrecedence = [\n 'employeeApplication',\n 'clerkMode',\n 'kioskMode',\n 'inStore',\n] as const;\n\nconst useOverrides = () => {\n const optInOutOverrides = useOptIntOutOverrides();\n const productChoiceOverrides = useProductChoiceOverrides();\n const dspOverrides = useDspOverrides();\n const { overrideConfig } = useSelector(selectTenant);\n\n return useMemo(() => {\n const simpleOverrideFor = getSimpleOverrides(overrideConfig);\n\n const featureOverrides = simpleOverrideFor(featurePrecedence);\n const workflowOverrides = simpleOverrideFor(workflowPrecedence);\n\n const result = mergeOverrides([\n featureOverrides,\n optInOutOverrides,\n productChoiceOverrides,\n dspOverrides,\n workflowOverrides,\n ]);\n return result;\n }, [overrideConfig, optInOutOverrides, productChoiceOverrides, dspOverrides]);\n};\n\n/**\n * Return a callback that find the true i18nKey that will be used given the\n * tenant override config. Return undefined if none are found.\n */\nconst useKeyResolution = () => {\n const overrides = useOverrides();\n\n const { i18n } = useTranslation();\n\n const resolveKey = useCallback(\n (i18nKey: string): string | undefined => {\n const fallbacks = fallBackForKey(i18nKey, overrides);\n const result = find(key => i18n.exists(key), fallbacks);\n return result;\n },\n [i18n, overrides],\n );\n\n return resolveKey;\n};\n\nconst useTranslate = (): NewTFunction => {\n const { t, i18n } = useTranslation();\n const overrides = useOverrides();\n\n const getPlacements = useCallback(\n (placementKey: string, tOptions = {}) => {\n const getGlobals = (ns?: string) => {\n const fallbacks = fallBackForKey(placementKey, overrides);\n const merged = reduce(\n (acc, key) => {\n if (!i18n.exists(key)) {\n return acc;\n }\n return mergeDeepLeft(\n acc,\n t(key, { ...tOptions, returnObjects: true, ns }),\n );\n },\n {},\n fallbacks,\n );\n return merged;\n };\n\n const globalsForCurrentNs = getGlobals();\n const defaultGlobals = getGlobals('default');\n return mergeDeepLeft(globalsForCurrentNs, defaultGlobals);\n },\n [i18n, overrides, t],\n );\n\n const epPlacements = getPlacements('epPlacements');\n // ACHTUNG!: you MUST pass the \"object-wrapped\" key-value like below (e.g. `{ epPlacements }`)\n // with the proper name for the variable that you want to use as a translation key\n // i.e. the function expects { 'epPlacements': { [...epPlacements...] } }\n // such that it can use `...tOptions` to spread the values under the key.\n // TL;DR - the `epPlacements` variable's name is \"special\" - don't change it arbitarily.\n const globals = getPlacements('globals', { epPlacements });\n\n const newTranslation: NewTFunction = useCallback(\n ((\n key: string,\n defaultValueOrOptions?: string | TOptions,\n options?: TOptions,\n ) => {\n let defaultValue: string | undefined;\n options = options || {};\n\n if (defaultValueOrOptions) {\n if (typeof defaultValueOrOptions !== 'string') {\n options = defaultValueOrOptions;\n } else {\n defaultValue = defaultValueOrOptions;\n }\n }\n // let the \"globals\" block be interpolated everywhere\n options = {\n globals,\n epPlacements,\n ...options,\n };\n\n const overrideString = fallBackForKey(key, overrides);\n\n return t(overrideString, defaultValue, options);\n }) as NewTFunction,\n [overrides, t, globals, epPlacements],\n );\n\n return newTranslation;\n};\n\n/**\n * Same as NewTFunction, but it renders Markdown from the translation value\n * into a ReactElement.\n */\ninterface TMarkdownFunction {\n (key: string, options?: TOptions | string): ReactElement;\n (\n key: string,\n defaultValue?: string,\n options?: TOptions | string,\n ): React.ReactElement;\n}\n\nconst useMarkdownTranslate = (): TMarkdownFunction => {\n const t = useTranslate();\n\n const newTranslation: TMarkdownFunction = useCallback(\n ((...params: Parameters) => {\n const children = t(...params);\n // Render paragraphs with \n return (\n (\n \n {props.children}\n \n ),\n }}\n allowDangerousHtml\n >\n {children}\n \n );\n }) as TMarkdownFunction,\n [t],\n );\n\n return newTranslation;\n};\n\nconst useMarkdownMultilineTranslate = (): TMarkdownFunction => {\n const t = useTranslate();\n\n const newTranslation: TMarkdownFunction = useCallback(\n ((...params: Parameters) => {\n const children = t(...params);\n // Render paragraphs inheriting styling\n return (\n

,\n link: props => (\n \n {props.children}\n \n ),\n }}\n allowDangerousHtml\n >\n {children}\n \n );\n }) as TMarkdownFunction,\n [t],\n );\n\n return newTranslation;\n};\n\nconst Trans: React.FC = ({ i18nKey, ...restProps }) => {\n const resolveKey = useKeyResolution();\n\n const key = useMemo(() => {\n if (i18nKey === undefined) {\n return i18nKey;\n }\n\n const result = resolveKey(i18nKey);\n\n if (result === undefined) {\n // If none of the keys exists, let i18n handles it to be consistent with\n // other missing keys situation.\n return i18nKey;\n }\n return result;\n }, [i18nKey, resolveKey]);\n\n return ;\n};\n\nexport default useTranslate;\nexport {\n Trans,\n useMarkdownTranslate,\n useMarkdownMultilineTranslate,\n useKeyResolution,\n};\n","/** @jsx jsx */\n\nimport { jsx } from '@emotion/core';\nimport ReactMaskedInput, { MaskedInputProps } from 'react-text-mask';\nimport { InputBaseComponentProps } from '@material-ui/core/InputBase';\n\n/**\n * Same as MaskedInputProps but does not include props for HTML input (not needed\n * because we are using Mui's TextField)\n */\nexport type MaskedProps = Pick<\n MaskedInputProps,\n | 'mask'\n | 'guide'\n | 'placeholderChar'\n | 'keepCharPositions'\n | 'pipe'\n | 'showMask'\n>;\n\n/**\n * Prop names for MaskedInput.\n *\n * TypeScript does not intend to support reflection, so there is no way to\n * avoid the repetition here.\n */\nexport const propNames = [\n 'mask',\n 'guide',\n 'placeholderChar',\n 'keepCharPositions',\n 'pipe',\n 'showMask',\n];\n\n/**\n * MaskedInput that works as custom Input component for MUI.\n * There's unlikely to be any reasons to use this component by itself.\n *\n * Example:\n * ```\n * \n * ```\n */\nexport const MaskedInput: React.FC<\n InputBaseComponentProps & MaskedProps\n> = props => {\n const { inputRef, ...other } = props;\n\n return (\n inputRef(ref ? ref.inputElement : null)}\n />\n );\n};\n\nexport default MaskedInput;\n","/** @jsx jsx */\nimport { css } from '@emotion/core';\nimport { Theme } from 'features/Theme';\n\nconst styles = {\n textField: (theme: Theme) => {\n // Stylings here are lifted from the Mui's OutlinedInput.\n const palette = theme.mui.palette;\n const borderColor =\n palette.type === 'light'\n ? 'rgba(0, 0, 0, 0.23)'\n : 'rgba(255, 255, 255, 0.23)';\n\n const disabledBackground =\n palette.type === 'light'\n ? 'rgba(0, 0, 0, 0.09)'\n : 'rgba(255, 255, 255, 0.09)';\n\n return css`\n & .MuiInputBase-root {\n border: 1px solid ${borderColor};\n border-radius: ${theme.mui.shape.borderRadius}px;\n background: none;\n &:hover {\n border-color: ${palette.text.primary};\n background: none;\n }\n &.Mui-focused {\n border-color: ${palette.primary.main};\n background: none;\n }\n &.Mui-error {\n border-color: ${palette.error.main};\n background: none;\n }\n &.Mui-disabled {\n background: ${disabledBackground};\n border-color: transparent;\n color: ${palette.text.primary};\n }\n .MuiInputBase-input::-webkit-input-placeholder {\n // Improve contrast with white background for better accessibility.\n opacity: 0.65;\n }\n }\n `;\n },\n};\n\nexport default styles;\n","/** @jsx jsx */\n\nimport { jsx } from '@emotion/core';\n\nimport { TextField as MuiTextField } from '@material-ui/core';\nimport { TextFieldProps as MuiTextFieldProps } from '@material-ui/core/TextField';\nimport { InputProps as StandardInputProps } from '@material-ui/core/Input';\nimport { pick, mergeLeft, omit } from 'ramda';\n\nimport MaskedInput, {\n propNames as maskPropNames,\n MaskedProps,\n} from './MaskedInput';\n\nimport React from 'react';\n\nimport styles from './styles';\n\nexport type TextFieldProps = MuiTextFieldProps & MaskedProps;\n\nconst defaultProps: TextFieldProps = {\n required: true,\n fullWidth: true,\n margin: 'normal',\n variant: 'filled',\n};\n\n/**\n * TextField with default props and stylings.\n *\n * Also support masking.\n */\nconst TextField: React.ForwardRefExoticComponent<\n TextFieldProps\n> = React.forwardRef((props, ref) => {\n // Setting `value=null` causes warnings, but we have null values in our state.\n // So, for the sake of convenience, if it's set specifically to null, we'll\n // cast that to an empty string.\n const { required } = props;\n if ('value' in props && props.value === null) {\n props = { ...props, value: '' };\n }\n\n props = mergeLeft(props, defaultProps);\n\n const maskProps: MaskedProps = pick(maskPropNames, props);\n const maksedInputProps = props.mask\n ? {\n inputComponent: MaskedInput,\n inputProps: {\n ...props.inputProps,\n ...maskProps,\n },\n }\n : {};\n\n const InputProps = {\n ...maksedInputProps,\n disableUnderline: true,\n ...(props.InputProps || {}),\n } as Partial;\n\n return (\n \n );\n});\n\nexport default TextField;\n","/** @jsx jsx */\n\nimport { jsx, css } from '@emotion/core';\nimport TextField, { TextFieldProps } from './TextField';\n\nimport { Theme } from 'features/Theme';\nimport { FieldProps } from 'formik';\nimport { useCallback, ChangeEvent, FocusEvent } from 'react';\nimport React from 'react';\nimport { path } from 'ramda';\n\nconst styles = {\n pristineAndEmpty: (theme: Theme) =>\n css`\n &.pristineAndEmpty .MuiInputBase-root {\n border-color: ${theme.mui.palette.text.secondary};\n border-width: 2px;\n }\n `,\n};\n\n/**\n * TextField with integration with Formik field props.\n * Automatically\n * - Connect with Formik's field value and callbacks\n * - set the errors attribute and display error messages\n * - set distinctive border for pristine fields without value.\n *\n * Example:\n *\n * ```\n * \n * {fieldProps => }\n * \n * ```\n */\nexport type FormTextFieldProps = TextFieldProps & {\n fieldProps: FieldProps;\n};\n\nexport const FormTextField: React.ForwardRefExoticComponent<\n FormTextFieldProps\n> = React.forwardRef((props, ref) => {\n const {\n fieldProps: {\n form,\n field: { onChange: formikOnChange, onBlur: formikOnBlur, ...field },\n },\n disabled,\n helperText,\n error,\n onChange,\n onBlur,\n ...rest\n } = props;\n\n const getNestedField = path(field.name.split('.'));\n const touched = getNestedField(form.touched);\n const formError = getNestedField(form.errors) as string | undefined;\n const hasError = error || Boolean(touched && formError);\n const pristineAndEmpty = Boolean(!disabled && !touched && !field.value);\n const newOnChange = useCallback(\n (e: ChangeEvent) => {\n formikOnChange(e);\n onChange && onChange(e);\n },\n [formikOnChange, onChange],\n );\n\n const newOnBlur = useCallback(\n (e: FocusEvent) => {\n formikOnBlur(e);\n onBlur && onBlur(e);\n },\n [formikOnBlur, onBlur],\n );\n\n return (\n \n );\n});\n\nexport default FormTextField;\n","/** @jsx jsx */\nimport { jsx, css } from '@emotion/core';\n\nimport React, { useState, useEffect, useCallback } from 'react';\n\nimport { Theme } from 'features/Theme';\nimport { Box, Card, CardContent, Grow } from '@material-ui/core';\n\ninterface PropTypes {\n id: string;\n textFieldRef: React.MutableRefObject;\n}\n\nconst styles = {\n disclosureBox: (theme: Theme) =>\n css`\n &.disclosureBox {\n display: Flex;\n }\n\n &.disclosureBox.hidden {\n display: None;\n }\n `,\n};\n\n/**\n * Popover component that anchors on a TextField.\n *\n * The popover opens on focus and closes on blur.\n * It also matches its width with the TextField.\n *\n * Usage:\n * ```\n * const ref = useRef(null)\n *\n * return (\n * ...\n * \n * \n * ...\n * )\n *\n * ```\n */\nconst TextFieldPopover: React.FC = props => {\n const { id: popperId, children, textFieldRef } = props;\n const [open, setOpen] = useState(false);\n const ariaDescribedByLabel = 'aria-describedby'; // Avoid spelling mistakes\n\n const openPopper = useCallback(() => {\n setOpen(true);\n }, [setOpen]);\n const closePopper = useCallback(() => {\n setOpen(false);\n }, [setOpen]);\n\n // Close popover without losing focus (for accessibility reasons)\n const escFunction = useCallback(\n event => {\n if (event.code === 'Escape') {\n setOpen(false);\n }\n },\n [setOpen],\n );\n\n const addPopoverAriaDescribedby = useCallback(() => {\n if (!textFieldRef.current) {\n return;\n }\n const describedby = textFieldRef.current.getAttribute(ariaDescribedByLabel);\n const newDescribedby = describedby\n ? `${describedby} ${popperId}`\n : popperId; // Set to either the original + popperId, or just popperId\n textFieldRef.current.setAttribute(ariaDescribedByLabel, newDescribedby); // set the aria attribute\n }, [textFieldRef, popperId]);\n\n const removePopoverAriaDescribedby = useCallback(() => {\n if (!textFieldRef.current) {\n return;\n }\n const describedby = textFieldRef.current.getAttribute(ariaDescribedByLabel);\n if (!describedby) {\n return;\n }\n if (describedby === popperId) {\n // Remove attribute if there is no other describedby\n textFieldRef.current.removeAttribute(ariaDescribedByLabel);\n } else {\n // Revert back to original describedby\n const newDescribedby = describedby.replace(\n new RegExp(` ?${popperId}`),\n '',\n );\n textFieldRef.current.setAttribute(ariaDescribedByLabel, newDescribedby); // set the aria attribute\n }\n }, [textFieldRef, popperId]);\n\n useEffect(() => {\n let ref: HTMLElement | null = null;\n if (textFieldRef && textFieldRef.current) {\n ref = textFieldRef.current;\n ref.addEventListener('focus', openPopper);\n ref.addEventListener('blur', closePopper);\n ref.addEventListener('keydown', escFunction);\n }\n return () => {\n if (ref) {\n ref.removeEventListener('focus', openPopper);\n ref.removeEventListener('blur', openPopper);\n ref.removeEventListener('keydown', escFunction);\n }\n };\n }, [closePopper, openPopper, textFieldRef, escFunction]);\n\n useEffect(() => {\n if (open) {\n addPopoverAriaDescribedby();\n } else {\n removePopoverAriaDescribedby();\n }\n }, [open, addPopoverAriaDescribedby, removePopoverAriaDescribedby]);\n\n if (textFieldRef.current === null) {\n return null;\n }\n\n return (\n \n \n \n {children}\n \n \n \n );\n};\n\nexport default TextFieldPopover;\n","/* eslint-disable @typescript-eslint/camelcase */\n\nimport { Status, NonClientError } from 'hooks/requests/fetchUtils';\nimport useFetchApi from 'hooks/useFetchApi';\nimport useQueryParameters from 'hooks/useQueryParameters';\nimport { useCallback, useState } from 'react';\nimport { offerResponse, OfferResponseType } from 'fmc-sdk';\nimport useFmcHost from 'hooks/useFmcHost';\nimport log from 'loglevel';\nimport catchOnly from 'utils/catchOnly';\nimport { useSelector } from 'react-redux';\nimport { selectCreditApplication } from 'state/creditApplication';\n\ntype OfferMadeHook = () => [\n (choice: OfferMadeEnum) => Promise,\n Status,\n boolean,\n];\n\nexport enum OfferMadeEnum {\n Yes = 'yes',\n No = 'no',\n Abandoned = 'abandoned',\n NotMe = 'not_me',\n PrescreenNo = 'prescreen_no',\n}\n\nconst OfferMadeEnumMap = {\n [OfferMadeEnum.Yes]: OfferResponseType.Yes,\n [OfferMadeEnum.No]: OfferResponseType.No,\n [OfferMadeEnum.Abandoned]: OfferResponseType.Abandoned,\n [OfferMadeEnum.NotMe]: OfferResponseType.NotMe,\n [OfferMadeEnum.PrescreenNo]: OfferResponseType.PrescreenNo,\n};\n\nexport class OfferMadeError extends Error {}\n\nconst PATH = '/api/made_offer';\n\nconst useOfferMade: OfferMadeHook = () => {\n const [error, setError] = useState(false);\n const [status, fetch] = useFetchApi();\n const fmcDispatch = useFmcHost();\n const {\n prescreenId,\n storeNumber,\n mockMO: mockResponse,\n } = useQueryParameters();\n const { correlationData, customerNumber } = useSelector(\n selectCreditApplication,\n );\n\n const sendOfferMade = useCallback(\n async (choice: OfferMadeEnum) => {\n if (!prescreenId) {\n throw new Error('No Prescreen ID presented.');\n }\n try {\n setError(false);\n const response = await fetch(PATH, {\n method: 'POST',\n body: {\n mockResponse,\n prescreenId,\n storeNumber,\n presentationInd: choice,\n correlationData,\n customerNumber,\n },\n });\n fmcDispatch(offerResponse(OfferMadeEnumMap[choice]));\n if (!response.ok) {\n setError(true);\n log.warn('/api/made_offer: Error received from server.');\n }\n } catch (e) {\n if (catchOnly(e, NonClientError)) {\n setError(true);\n log.warn('/api/made_offer: Error received from server.');\n fmcDispatch(offerResponse(OfferMadeEnumMap[choice]));\n }\n }\n },\n [\n fetch,\n fmcDispatch,\n mockResponse,\n prescreenId,\n storeNumber,\n correlationData,\n customerNumber,\n ],\n );\n\n return [sendOfferMade, status, error];\n};\n\nexport default useOfferMade;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst EnhancedCheckoutConsumerSearch = loadable(\n () => import('./ConsumerSearch'),\n {\n fallback: ,\n },\n);\n\nexport const EnhancedCheckoutError = loadable(() => import('./Error'), {\n fallback: ,\n});\n\nexport default EnhancedCheckoutConsumerSearch;\n","import { useCallback } from 'react';\nimport { useSelector } from 'react-redux';\nimport {\n selectTenant,\n FeatureMap,\n isEnabledFn,\n isGroupEnabledFn,\n} from 'state/tenant';\n\nexport type FeatureHook = () => {\n /**\n * A feature is enabled if it is configured in the tenant config\n */\n isEnabled: (feature: keyof FeatureMap) => boolean;\n\n /**\n * A group is enabled if any of its feature (defined in the GROUPING constant)\n * is enabled\n */\n isGroupEnabled: (group: Array) => boolean;\n};\n\nconst useFeature: FeatureHook = () => {\n const tenant = useSelector(selectTenant);\n\n const isEnabled = useCallback(\n (feature: keyof FeatureMap) => isEnabledFn(tenant, feature),\n [tenant],\n );\n\n const isGroupEnabled = useCallback(\n (group: Array) => isGroupEnabledFn(tenant, group),\n [tenant],\n );\n\n return { isEnabled, isGroupEnabled };\n};\n\nexport default useFeature;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableConsumerSearch = loadable(() => import('./ConsumerSearch'), {\n fallback: ,\n});\n\nexport default LoadableConsumerSearch;\n","export enum Status {\n NOT_STARTED,\n IN_PROGRESS,\n /**\n * When completed without network or server error\n */\n SUCCESS,\n /**\n * When completed without network or server error\n */\n ERROR,\n}\n\nexport const isNetworkError = (error: Error): boolean => {\n return (\n error instanceof TypeError &&\n // The spec doesn't seem to require browsers to use a sensible name to\n // discriminate NetworkError from other TypeError instances. However they\n // do set the following message consistently.\n // Firefox\n (error.message === 'NetworkError when attempting to fetch resource' ||\n // Chromium browsers (Chrome, Edge)\n error.message === 'Failed to fetch')\n );\n};\n\nexport const isAborted = (error: Error): boolean => {\n // The spec require this to be a DOMException named `AbortError`.\n return error instanceof DOMException && error.name === 'AbortError';\n};\n\nexport class NonClientError extends Error {}\nexport class ServerError extends NonClientError {\n readonly response: Response;\n constructor(message: string, response: Response) {\n super(message);\n this.response = response;\n }\n}\nexport class NetworkError extends NonClientError {}\nexport class AbortError extends Error {}\n\n/**\n * Special class indicating the promise has been cancelled.\n *\n * A canceled promise can be return with Promise.reject(new CancelError())\n * Doesn't look very good. Better probably to move to Observable instead.\n */\nexport class CancelError extends Error {}\n\nexport const raiseOnServerError = (response: Response): void => {\n if (response.status >= 500 && response.status < 600) {\n throw new ServerError(\n `${response.status} ${response.statusText}`,\n response,\n );\n }\n};\n","import { css, SerializedStyles } from '@emotion/core';\nimport { Theme } from 'features/Theme';\n\nconst style = {\n container: (theme: Theme): SerializedStyles => css`\n margin: ${theme.mui.spacing(2)}px;\n display: flex;\n justify-content: center;\n align-items: center;\n list-style: none;\n padding: 0;\n `,\n\n step: (theme: Theme): SerializedStyles => css`\n flex: 0 1 ${theme.mui.spacing(8)}px;\n max-width: ${theme.mui.spacing(8)}px;\n height: ${theme.mui.spacing(1)}px;\n background-color: ${theme.mui.palette.primary.light};\n margin-left: ${theme.mui.spacing(1) / 2}px;\n margin-right: ${theme.mui.spacing(1) / 2}px;\n `,\n\n activeStep: (theme: Theme): SerializedStyles => css`\n background-color: ${theme.mui.palette.primary.main};\n `,\n\n visuallyHidden: css`\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n `,\n};\n\nexport default style;\n","import Stepper from './Stepper';\n\nexport default Stepper;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport { times } from 'ramda';\nimport { FC, ReactElement, useCallback } from 'react';\nimport { composeStyles } from 'features/Theme';\nimport styles from './styles';\n\ninterface PropTypes {\n steps: number;\n activeStep?: number;\n}\n\nconst Stepper: FC = ({ steps, activeStep }) => {\n const renderStep = useCallback(\n (n: number): ReactElement => {\n return (\n = n && styles.activeStep,\n ])}\n >\n \n Step {n + 1} of {steps}\n {activeStep !== undefined && activeStep > n ? '(completed)' : ''}\n \n \n );\n },\n [activeStep, steps],\n );\n\n return

    {times(renderStep, steps)}
;\n};\n\nexport default Stepper;\n","import { css, SerializedStyles } from '@emotion/core';\nimport { Theme, subtitleText } from 'features/Theme';\n\nconst style = {\n stepLabel: (theme: Theme): SerializedStyles => css`\n ${subtitleText(theme)};\n margin: ${theme.mui.spacing(2)}px;\n display: flex;\n justify-content: center;\n align-items: center;\n `,\n};\n\nexport default style;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport { FC, Fragment } from 'react';\n\nimport useWorkflow, { Step } from 'hooks/useWorkflow';\nimport Stepper from 'components/Stepper';\nimport styles from './styles';\n\ninterface IncompleteProps {\n /**\n * The current active step.\n */\n step: Step;\n}\n\ninterface CompletedProps {\n /**\n * Indicate that this is a completed step (not any step in the workflow)\n */\n completed: true;\n}\n\ntype PropTypes = IncompleteProps | CompletedProps;\n\n/**\n * Display application progress, starting from the CreditApplication page, as a\n * progress bar. It has one more step that the workflow to represent the\n * completion stage (i.e. success, error, pending ,etc)\n */\nconst ApplicationProgress: FC = props => {\n const { workflow, steps, stepNumber } = useWorkflow();\n\n const startStep = workflow.progressStartStep\n ? stepNumber(workflow.progressStartStep)\n : 0;\n\n // Add one for the completion step.\n const stepCount = steps.length - startStep + 1;\n\n const activeStep =\n 'completed' in props\n ? stepCount - 1\n : (stepNumber(props.step) || 0) - startStep;\n\n return (\n \n \n \n \n );\n};\n\nexport default ApplicationProgress;\n","import ApplicationProgress from './ApplicationProgress';\n\nexport default ApplicationProgress;\n","import { useCallback } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { pick, reject, complement, pipe } from 'ramda';\n\nimport { InstantCredit, mergeInstantCredit } from 'state/instantCredit';\nimport { CreditApplication } from 'state/creditApplication';\nimport { selectConsumerSearch } from 'state/consumerSearch';\nimport { selectTenant } from 'state/tenant';\nimport useAnalyticsVariables from 'hooks/useAnalyticVariables';\nimport useFmcHost from 'hooks/useFmcHost';\nimport { receiveAccountExists } from 'fmc-sdk';\nimport isPresent from 'utils/isPresent';\n\ninterface Options {\n /**\n * Whether this should send a AccountExists to the SDK. This may be set\n * to false when the caller is already sending the response to the SDK.\n */\n sendToSdk: boolean;\n /**\n * If not passed, this hook will use the consumerSearch state to determine if\n * consumerSearch validation has happened. If passed, this value will be used\n * instead.\n * This is useful for when the hook is called immediately after dispatching\n * mergeConsumerSearch (so the state has not been updated) or in hooks that\n * are considered validated but are not consumerSearch (e.g. dspRetrieval)\n */\n isValidated?: boolean;\n}\n\n/**\n * Perform common logic when receiving an existing account response.\n */\ntype ExistingAccountHandlerHook = () => (\n /**\n * The existing account response\n */\n response: Partial,\n options: Options,\n creditApplication?: Partial,\n) => void;\n\nexport class ExistingAccountHandlerError extends Error {}\n\nconst useHandleExistingAccount: ExistingAccountHandlerHook = () => {\n const tenant = useSelector(selectTenant);\n const { result } = useSelector(selectConsumerSearch);\n const dispatch = useDispatch();\n const fmcDispatch = useFmcHost();\n\n const { setAnalyticsVariables } = useAnalyticsVariables();\n\n const handleExistingAccount = useCallback(\n (\n response: Partial,\n options: Options,\n creditApplication: Partial | undefined,\n ) => {\n if (!response.hasExistingAccount) {\n throw new ExistingAccountHandlerError(\n 'handleExistingAccount on non-existing-account response',\n );\n }\n\n const { sendToSdk, isValidated } = options;\n\n setAnalyticsVariables({\n callId: response.callId,\n applicationId: response.applicationId,\n accountId: response.accountId,\n });\n\n if (sendToSdk) {\n const applicationData = pipe(\n pick(['mobilePhone', 'alternativePhone', 'emailAddress']),\n reject(complement(isPresent)),\n )(creditApplication || {});\n\n fmcDispatch(\n receiveAccountExists({\n message: 'An existing account exists',\n callId: response.callId || null,\n rewards: response.rewards,\n cardType: response.cardType,\n ...applicationData,\n }),\n );\n }\n\n const validated =\n isValidated !== undefined\n ? isValidated\n : result !== 'error' && result !== null;\n\n if (\n tenant.existingAccountBehavior === 'dsp' ||\n (tenant.existingAccountBehavior === 'validationRequired' && validated)\n ) {\n dispatch(mergeInstantCredit(response));\n }\n },\n [\n dispatch,\n fmcDispatch,\n result,\n setAnalyticsVariables,\n tenant.existingAccountBehavior,\n ],\n );\n\n return handleExistingAccount;\n};\n\nexport default useHandleExistingAccount;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport React, {\n ChangeEvent,\n ChangeEventHandler,\n useCallback,\n useState,\n useMemo,\n} from 'react';\nimport { useSelector } from 'react-redux';\n\nimport { useDebouncedCallback } from 'use-debounce';\nimport { FormikHelpers, FormikProps, Field, FieldProps } from 'formik';\nimport { Grid, InputAdornment, IconButton } from '@material-ui/core';\nimport Clear from '@material-ui/icons/Clear';\n\nimport { selectLockedFields, LockedFields } from 'state/creditApplication';\n\nimport useAddressAutocomplete, {\n AddressResult,\n} from 'hooks/requests/addressAutocomplete';\n\nimport useTranslate from 'hooks/useTranslate';\nimport Autocomplete from 'components/Autocomplete';\nimport { FormTextField } from 'components/TextField';\n\nimport { stateMask, zipMask } from 'utils/masks';\n\nimport withOptional from './withOptional';\nimport { pickBy } from 'ramda';\n\nconst DISABLE_ITEM: AddressResult = {\n formattedAddress: 'Continue typing or click here to enter manually.',\n address1: '',\n city: '',\n state: '',\n zip: '',\n};\n\nconst useAutocompleteHook = (\n values: FormValues,\n setFieldValue: FormikHelpers['setFieldValue'],\n lockedFields: LockedFields,\n): {\n suggestions: AddressResult[];\n onSuggestionSelect: (selection: AddressResult | undefined) => unknown;\n onAddressChange: (e: ChangeEvent) => Promise;\n clearAddress: () => void;\n enabled: boolean;\n} => {\n const [suggestions, searchAddress] = useAddressAutocomplete();\n const [enabled, setEnabled] = useState(true);\n\n const isLocked = useCallback(\n (field: string) =>\n field in lockedFields && lockedFields[field as keyof LockedFields],\n [lockedFields],\n );\n\n const setValue: typeof setFieldValue = useCallback(\n (field, value, shouldValidate) => {\n if (isLocked(field)) {\n return;\n }\n\n setFieldValue(field, value, shouldValidate);\n },\n [setFieldValue, isLocked],\n );\n\n const onSuggestionSelect = useCallback(\n (result: AddressResult | undefined) => {\n if (result === undefined) {\n return;\n }\n\n if (result === DISABLE_ITEM) {\n setEnabled(false);\n return;\n }\n\n setValue('address1', result.address1);\n setValue('city', result.city);\n setValue('state', result.state);\n setValue('zip', result.zip.substr(0, 5));\n },\n [setValue],\n );\n\n const [onAddressChange] = useDebouncedCallback(\n async (e: ChangeEvent) => {\n if (!enabled) {\n return;\n }\n\n const partialAddress = pickBy((_value, key) => isLocked(key), values);\n\n await searchAddress(\n e.target.value + ' ' + (values.zip || ''),\n partialAddress as Partial,\n );\n },\n 50,\n );\n\n const clearAddress = useCallback(() => {\n setValue('address1', null);\n setValue('city', null);\n setValue('state', null);\n setValue('zip', null);\n }, [setValue]);\n\n return useMemo(\n () => ({\n suggestions: [...suggestions, DISABLE_ITEM],\n onSuggestionSelect,\n onAddressChange,\n clearAddress,\n enabled,\n }),\n [clearAddress, enabled, onAddressChange, onSuggestionSelect, suggestions],\n );\n};\n\ninterface FormValues {\n address1: string | null;\n address2: string | null;\n city: string | null;\n state: string | null;\n zip: string | null;\n}\n\nfunction AddressFields(\n props: FormikProps,\n): React.ReactElement {\n const t = useTranslate();\n const lockedFields = useSelector(selectLockedFields);\n const {\n suggestions: suggestionsWithDisable,\n onAddressChange,\n onSuggestionSelect,\n clearAddress,\n enabled,\n } = useAutocompleteHook(props.values, props.setFieldValue, lockedFields);\n\n const AddressClearButton = (\n \n \n \n \n \n );\n\n return (\n \n \n \n {(fieldProps: FieldProps) => (\n \n )}\n \n \n\n \n \n {(fieldProps: FieldProps) => (\n \n )}\n \n \n\n \n \n {(fieldProps: FieldProps) => (\n (item ? item.formattedAddress : '')}\n onSelect={onSuggestionSelect}\n >\n {({ getInputProps, getLabelProps, inputRef, getRootProps }) => {\n // Callback needs to be passed to the component\n // to compose with its own callbacks.\n // The rest of the props (mostly aria-* attributes)\n // needs to be on the actual input itself. Otherwise,\n // TypeScript gets confused (probably have something to\n // do with the way TextField is typed by MUI)\n const {\n onBlur,\n onChange,\n onKeyDown,\n ...inputProps\n } = getInputProps({\n onChange: onAddressChange,\n autoComplete: 'address-line1',\n });\n\n return (\n }\n onKeyDown={onKeyDown}\n inputProps={{ ...inputProps, maxLength: 30 }}\n InputProps={{\n endAdornment: AddressClearButton,\n ...getRootProps(\n { refKey: 'ref' },\n // This will spread the ref from Downshift into the\n // Input component, which forward it to the root element,\n // which should be the div that wrap the input element.\n // This is correct, but since the root element return to\n // Downshift is not the div that wraps the input\n // element, Downshift will raise a ref error.\n // According to the documentation, we can suppress\n // the ref error in this case.\n { suppressRefError: true },\n ),\n }}\n InputLabelProps={{ ...getLabelProps(), required: false }}\n />\n );\n }}\n \n )}\n \n \n\n \n \n {(fieldProps: FieldProps) => (\n \n )}\n \n \n\n \n \n {(fieldProps: FieldProps) => (\n \n )}\n \n \n\n \n \n {(fieldProps: FieldProps) => (\n s.toUpperCase()}\n />\n )}\n \n \n\n \n \n {(fieldProps: FieldProps) => (\n \n )}\n \n \n \n );\n}\n\nexport default AddressFields;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport React from 'react';\nimport { useSelector } from 'react-redux';\nimport { Grid } from '@material-ui/core';\nimport { Field, FieldProps } from 'formik';\nimport { FormTextField } from 'components/TextField';\nimport {\n AnnualIncomeField,\n IntendedPurchaseAmountField,\n LoyaltyNumberField,\n} from 'components/form';\n\nimport createNumberMask from 'text-mask-addons/dist/createNumberMask';\n\nimport { dateMask, dobPipe } from 'utils/masks';\nimport useTranslate from 'hooks/useTranslate';\nimport useFieldCustomization from 'hooks/useFieldCustomization';\n\nimport withOptional from './withOptional';\nimport { selectLockedFields } from 'state/creditApplication';\n\nconst storeNumberMask = createNumberMask({\n prefix: '',\n includeThousandsSeparator: false,\n allowLeadingZeroes: true,\n});\n\nconst AdditionalFields: React.FC = () => {\n const lockedFields = useSelector(selectLockedFields);\n\n const t = useTranslate();\n const { isRequired, isVisible } = useFieldCustomization();\n\n return (\n \n {isVisible('emailAddress') && (\n \n \n {(fieldProps: FieldProps) => (\n \n )}\n \n \n )}\n\n \n \n {(fieldProps: FieldProps) => (\n \n )}\n \n \n\n {isVisible('annualIncome') && (\n \n \n \n )}\n\n {isVisible('intendedPurchaseAmount') && (\n \n \n \n )}\n\n {isVisible('storeNumber') && (\n \n \n {(fieldProps: FieldProps) => (\n \n )}\n \n \n )}\n\n {isVisible('loyaltyNumber') && (\n \n \n \n )}\n \n );\n};\n\nexport default AdditionalFields;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport React, { useRef } from 'react';\nimport { Typography } from '@material-ui/core';\nimport { Field, FieldProps } from 'formik';\nimport useTranslate from 'hooks/useTranslate';\nimport { FormTextField, TextFieldPopover } from 'components/TextField';\n\nimport { phoneMask } from 'utils/masks';\nimport { useSelector } from 'react-redux';\nimport { selectLockedFields } from 'state/creditApplication';\nimport { TextFieldProps } from 'components/TextField/TextField';\n\nconst MobileField: React.FC = props => {\n const t = useTranslate();\n const lockedFields = useSelector(selectLockedFields);\n const mobilePhoneRef = useRef(null);\n\n return (\n \n \n {(fieldProps: FieldProps) => (\n \n )}\n \n \n \n {t('creditApplication.phoneAgreement')}\n \n \n \n );\n};\n\nexport default MobileField;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport React, { useRef } from 'react';\nimport { Typography } from '@material-ui/core';\nimport { Field, FieldProps } from 'formik';\nimport useTranslate from 'hooks/useTranslate';\nimport { FormTextField, TextFieldPopover } from 'components/TextField';\nimport { TextFieldProps } from 'components/TextField/TextField';\nimport { phoneMask } from 'utils/masks';\n\nconst AlternateMobileField: React.FC = props => {\n const t = useTranslate();\n const alternativePhoneRef = useRef(null);\n\n return (\n \n \n {(fieldProps: FieldProps) => (\n \n )}\n \n\n \n \n {t('creditApplication.phoneAgreement')}\n \n \n \n );\n};\n\nexport default AlternateMobileField;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport React, { useRef } from 'react';\nimport { Typography } from '@material-ui/core';\nimport { Field, FieldProps } from 'formik';\nimport { FormTextField, TextFieldPopover } from 'components/TextField';\n\nimport { moneyMask } from 'utils/masks';\nimport useFieldCustomization from 'hooks/useFieldCustomization';\nimport useTranslate, { Trans } from 'hooks/useTranslate';\nimport withOptional from './withOptional';\n\ninterface PropTypes {\n fieldId?: string;\n fieldName?: string;\n label?: string;\n}\n\nconst AnnualIncomeField: React.FC = ({\n fieldId,\n fieldName,\n label,\n}) => {\n const annualIncomeRef = useRef(null);\n const { isRequired, isVisible } = useFieldCustomization();\n const t = useTranslate();\n if (!isVisible('annualIncome')) {\n return null;\n }\n\n return (\n \n \n {(fieldProps: FieldProps) => (\n \n )}\n \n \n \n \n \n\n \n \n \n \n \n );\n};\n\nexport default AnnualIncomeField;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport React, { useRef } from 'react';\nimport { Field, FieldProps } from 'formik';\nimport { FormTextField } from 'components/TextField';\n\nimport { moneyMask } from 'utils/masks';\nimport useFieldCustomization from 'hooks/useFieldCustomization';\nimport withOptional from './withOptional';\n\nconst IntendedPurchaseAmountField: React.FC = () => {\n const intendedPurchaseAmountRef = useRef(null);\n const { isRequired, isVisible } = useFieldCustomization();\n\n if (!isVisible('intendedPurchaseAmount')) {\n return null;\n }\n\n return (\n \n \n {(fieldProps: FieldProps) => (\n \n )}\n \n \n );\n};\n\nexport default IntendedPurchaseAmountField;\n","import { helpText, Theme } from 'features/Theme';\nimport { css, SerializedStyles } from '@emotion/core';\n\nconst styles = {\n card: (theme: Theme): SerializedStyles => css`\n border: 1px solid ${theme.mui.palette.divider};\n `,\n optInOutText: (theme: Theme): SerializedStyles => css`\n &,\n p {\n ${helpText(theme)};\n text-align: left;\n }\n margin-bottom: ${theme.mui.spacing(1)}px;\n `,\n optInOutLabel: (theme: Theme): SerializedStyles => css`\n .MuiFormControlLabel-label {\n ${helpText(theme)};\n }\n `,\n};\nexport default styles;\n","import OptInOut from './OptInOut';\n\nexport default OptInOut;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport { FC, useMemo } from 'react';\nimport { FormControlLabel, Card, CardContent } from '@material-ui/core';\nimport Checkbox from 'components/Checkbox';\nimport { useMarkdownMultilineTranslate } from 'hooks/useTranslate/useTranslate';\nimport { Field, FieldProps } from 'formik';\nimport styles from './styles';\n\nimport CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank';\nimport CheckBoxIcon from '@material-ui/icons/CheckBox';\nimport useFeature from 'hooks/useFeature';\n\nconst OptInOut: FC = () => {\n const tMdMultiline = useMarkdownMultilineTranslate();\n const { isEnabled } = useFeature();\n const enabled = useMemo(() => isEnabled('optInOut'), [isEnabled]);\n return enabled ? (\n \n \n
{tMdMultiline('optInOut.content')}
\n \n {(fieldProps: FieldProps) => (\n }\n checkedIcon={}\n color=\"primary\"\n />\n }\n label={tMdMultiline('optInOut.label')}\n />\n )}\n \n
\n
\n ) : null;\n};\n\nexport default OptInOut;\n","import { helpText, Theme } from 'features/Theme';\nimport { css, SerializedStyles } from '@emotion/core';\n\nconst styles = {\n container: (theme: Theme): SerializedStyles => css`\n margin-left: ${theme.mui.spacing(2)}px;\n `,\n studentApplicationText: (theme: Theme): SerializedStyles => css`\n &,\n p {\n ${helpText(theme)};\n text-align: left;\n }\n `,\n studentApplicationLabel: (theme: Theme): SerializedStyles => css`\n .MuiFormControlLabel-label {\n ${helpText(theme)};\n }\n `,\n};\nexport default styles;\n","import StudentApplication from './StudentApplication';\n\nexport default StudentApplication;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport { FC, useMemo } from 'react';\nimport { FormControlLabel, Box } from '@material-ui/core';\nimport Checkbox from 'components/Checkbox';\nimport { useMarkdownMultilineTranslate } from 'hooks/useTranslate/useTranslate';\nimport { Field, FieldProps } from 'formik';\nimport styles from './styles';\n\nimport CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank';\nimport CheckBoxIcon from '@material-ui/icons/CheckBox';\nimport useFeature from 'hooks/useFeature';\n\nconst StudentApplication: FC = () => {\n const tMdMultiline = useMarkdownMultilineTranslate();\n const { isEnabled } = useFeature();\n const enabled = useMemo(() => isEnabled('studentApplication'), [isEnabled]);\n return enabled ? (\n \n
\n {tMdMultiline('studentApplication.content')}\n
\n \n {(fieldProps: FieldProps) => (\n }\n checkedIcon={}\n color=\"primary\"\n />\n }\n label={tMdMultiline('studentApplication.label')}\n />\n )}\n \n
\n ) : null;\n};\n\nexport default StudentApplication;\n","import { css, SerializedStyles } from '@emotion/core';\nimport { Theme } from 'features/Theme';\n\nconst styles = {\n termsContainer: (theme: Theme): SerializedStyles => css`\n height: ${theme.mui.spacing(30)}px;\n width: 100%;\n -webkit-overflow-scrolling: touch;\n border: 1px solid ${theme.mui.palette.divider};\n border-radius: ${theme.mui.shape.borderRadius}px;\n `,\n\n terms: (theme: Theme): SerializedStyles => css`\n height: 100%;\n width: 100%;\n border: none;\n `,\n};\n\nexport default styles;\n","/** @jsx jsx */\n\nimport { FC } from 'react';\nimport { jsx } from '@emotion/core';\nimport { useSelector } from 'react-redux';\n\nimport { Disclosure } from 'state/tenant';\n\nimport { getDisclosureUrl, selectTenant } from 'state/tenant';\n\nimport styles from './styles';\n\ninterface PropTypes {\n type: Disclosure['type'];\n className?: string;\n}\n\nconst DisclosureBox: FC = ({ type, className }) => {\n const tenant = useSelector(selectTenant);\n const url = getDisclosureUrl(tenant, type);\n\n return (\n
\n \n
\n );\n};\n\nexport default DisclosureBox;\n","import DisclosureBox from './DisclosureBox';\n\nexport default DisclosureBox;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport { useTheme } from 'emotion-theming';\n\nimport { Theme } from 'features/Theme';\n\nimport Button, { ButtonProps } from 'components/Button';\nimport React, { useCallback } from 'react';\nimport useFmcHost from 'hooks/useFmcHost';\nimport useTranslate from 'hooks/useTranslate';\nimport { applicationComplete } from 'fmc-sdk';\n\n/**\n * Continue Button that appears in the embedded case\n */\ntype PropTypes = {\n onClick?: (\n event: React.MouseEvent,\n ) => Promise | void;\n} & Omit;\n\nconst EmbeddedContinueButton: React.FC = props => {\n const { children, onClick, ...rest } = props;\n const fmcDispatch = useFmcHost();\n const theme = useTheme();\n const t = useTranslate();\n\n const handleClick = useCallback(\n async (event: React.MouseEvent) => {\n if (onClick) {\n const result = onClick(event);\n if (result && 'then' in result) {\n await result;\n }\n }\n fmcDispatch(applicationComplete());\n },\n [fmcDispatch, onClick],\n );\n\n if (!theme.embedded) {\n return null;\n }\n\n return (\n \n );\n};\n\nexport default EmbeddedContinueButton;\n","import EmbeddedContinueButton from './EmbeddedContinueButton';\n\nexport default EmbeddedContinueButton;\n","import LookupForm from './LookupForm';\n\nexport default LookupForm;\n","import React, { useCallback, useMemo } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { filter, pick } from 'ramda';\nimport { useSnackbar } from 'notistack';\nimport { RouteComponentProps } from 'react-router-dom';\nimport catchOnly from 'utils/catchOnly';\nimport isPresent from 'utils/isPresent';\n\nimport * as Yup from 'yup';\nimport {\n composeSchema,\n isPhoneNumber,\n isSsn,\n isZipCode,\n} from 'utils/validations';\n\nimport FmcForm from 'components/FmcForm';\nimport LookupFormView from '../../LookupFormView';\n\nimport useOTPSender, { OTPSenderError } from 'hooks/requests/otpSender';\n\nimport { NonClientError } from 'hooks/requests/fetchUtils';\nimport useNavigationHelpers from 'hooks/useNavigationHelpers';\n\nimport {\n mergeApplication,\n selectCreditApplication,\n} from 'state/creditApplication';\n\nimport useFieldCustomization from 'hooks/useFieldCustomization';\n\nexport interface FormValues {\n mobilePhone: string;\n ssn: string;\n zip: string;\n}\n\ntype PropTypes = RouteComponentProps & {\n onSubmit: (values: FormValues) => void;\n};\n\nconst LookupForm: React.FC = props => {\n const { isLastFour } = useFieldCustomization();\n const isLastFourBool = isLastFour();\n const [sendOTP] = useOTPSender();\n const { onSubmit: onSubmitSetValues, match } = props;\n\n const { push } = useNavigationHelpers();\n const { enqueueSnackbar } = useSnackbar();\n\n const dispatch = useDispatch();\n const creditApplication = useSelector(selectCreditApplication);\n const schema = useMemo(\n () =>\n Yup.object().shape({\n mobilePhone: composeSchema(\n Yup.string().label('Mobile #'),\n isPhoneNumber,\n Yup.string().required(),\n ),\n\n ssn: Yup.string()\n .label(isLastFourBool ? 'Last 4 SSN' : 'SSN')\n .concat(isSsn(isLastFourBool))\n .required(),\n\n zip: composeSchema(\n Yup.string().label('ZIP Code'),\n Yup.string().required(),\n isZipCode,\n ),\n }),\n [isLastFourBool],\n );\n\n const onSubmit = useCallback(\n async (rawValues: FormValues) => {\n const values = schema.cast(rawValues);\n\n // Merge zip for use with address typeahead feature.\n dispatch(\n mergeApplication({\n ssn: values.ssn,\n mobilePhone: values.mobilePhone,\n zip: values.zip,\n }),\n );\n\n try {\n await sendOTP({ phone: values.mobilePhone as string });\n onSubmitSetValues(values);\n push(`${match.path}/otp-verification`.replace('//', '/'));\n } catch (e) {\n if (catchOnly(e, NonClientError, OTPSenderError)) {\n enqueueSnackbar('Something has gone wrong. Please try again later.', {\n variant: 'error',\n });\n }\n }\n },\n [\n enqueueSnackbar,\n push,\n sendOTP,\n schema,\n dispatch,\n onSubmitSetValues,\n match,\n ],\n );\n\n const initialValues: FormValues = {\n mobilePhone: '',\n ssn: '',\n zip: '',\n };\n\n const prefillValues = filter(\n isPresent,\n pick(['mobilePhone', 'ssn', 'zip'], creditApplication),\n );\n\n return (\n \n {formProps => }\n \n );\n};\n\nexport default LookupForm;\n","import { css, SerializedStyles } from '@emotion/core';\n\nimport { Theme, normalText } from 'features/Theme';\n\nexport default {\n headingContainer: (theme: Theme) => css`\n text-align: center;\n margin-bottom: ${theme.mui.spacing(3)}px;\n `,\n formFields: (theme: Theme) => css`\n margin-bottom: ${theme.mui.spacing(3)}px;\n `,\n errorText: (theme: Theme): SerializedStyles => css`\n ${normalText(theme)}\n margin-bottom: ${theme.mui.spacing(1)}px;\n color: ${theme.mui.palette.error.main};\n `,\n};\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport React, { Fragment, useCallback, useContext } from 'react';\nimport { useSelector } from 'react-redux';\nimport { Container } from '@material-ui/core';\nimport { Field, FieldProps, Form, FormikProps } from 'formik';\nimport Link from 'components/Link';\nimport useTranslate from 'hooks/useTranslate';\nimport { useMarkdownTranslate } from 'hooks/useTranslate/useTranslate';\nimport { selectCreditApplication } from 'state/creditApplication';\n\nimport Button from 'components/Button';\nimport PageContainer from 'components/PageContainer';\nimport { FormTextField } from 'components/TextField';\n\nimport Logo from 'features/Logo/Logo';\nimport { FormValues } from './OtpVerification';\nimport ConsumerSearchContext from '../ConsumerSearchContext';\n\nimport { subtitleText } from 'features/Theme';\nimport styles from './styles';\nimport CancelButton from 'features/CancelButton';\nimport IovationButton from 'features/IovationButton';\nimport ActionButtonContainer from 'components/ActionButtonsContainer';\nimport SkipPrefillButton from 'features/SkipPrefillButton';\n\ntype PropTypes = FormikProps & {\n resendSms: () => Promise;\n attemptsRemaining: string | null;\n tooManyAttempts: boolean;\n timedOut: boolean;\n};\n\nconst OtpVerificationView: React.FC = props => {\n const {\n isValid,\n isSubmitting,\n resendSms,\n attemptsRemaining,\n tooManyAttempts,\n timedOut,\n resetForm,\n } = props;\n\n const { i18nPrefix, skipToPath, hasExistingAccount } = useContext(\n ConsumerSearchContext,\n );\n const t = useTranslate();\n const tMd = useMarkdownTranslate();\n\n const handleResend = useCallback(async () => {\n await resendSms();\n resetForm();\n }, [resendSms, resetForm]);\n\n const creditApplication = useSelector(selectCreditApplication);\n const mobilePhone = creditApplication.mobilePhone as string;\n\n const lastFourPhone = mobilePhone\n ? mobilePhone.substring(mobilePhone.length - 4)\n : null;\n\n const contextualTitle = hasExistingAccount\n ? tMd(`${i18nPrefix}otpVerification.title`, {\n context: 'existingAccount',\n lastFourPhone: lastFourPhone,\n })\n : tMd(`${i18nPrefix}otpVerification.title`, {\n lastFourPhone: lastFourPhone,\n });\n\n return (\n \n \n \n \n \n
\n \n
\n

{contextualTitle}

\n
\n\n {timedOut ? (\n
\n

\n {tMd(`${i18nPrefix}otpVerification.trackotpExpired`)}\n

\n
\n ) : null}\n\n
\n \n {(fieldProps: FieldProps) => (\n \n )}\n \n
\n
\n\n \n \n {t(`${i18nPrefix}otpVerification.submit`)}\n \n\n \n\n {skipToPath ? (\n \n {t(`${i18nPrefix}manualEntryButton`)}\n \n ) : null}\n\n \n \n
\n
\n
\n );\n};\n\nexport default OtpVerificationView;\n","/* eslint-disable @typescript-eslint/camelcase */\n\nimport { useCallback } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { Status } from 'hooks/requests/fetchUtils';\nimport useFetchApi from 'hooks/useFetchApi';\nimport useQueryParameters from 'hooks/useQueryParameters';\n\nimport { incrementAttempts } from 'state/otpCode';\nimport { lockFields } from 'state/creditApplication';\n\nconst PATH = '/api/otp_verify';\n\ntype OTPVerificationHook = () => [\n ({ otpCode }: { otpCode: string }) => Promise,\n Status,\n];\n\nexport class OTPVerificationError extends Error {}\n\nexport const useOTPVerification: OTPVerificationHook = () => {\n const [status, fetch] = useFetchApi();\n const { mockVOTP } = useQueryParameters();\n const dispatch = useDispatch();\n const verifyOTPCode = useCallback(\n async ({ otpCode }: { otpCode: string }): Promise => {\n const response = await fetch(PATH, {\n method: 'POST',\n body: {\n otpCode,\n mockOtpResponse: mockVOTP,\n },\n });\n\n // TODO: Service is not finished. 400 from service currently does not\n // return any body. Expect it to have message in the future.\n if (!response.ok) {\n dispatch(incrementAttempts());\n // const body = await response.json();\n // const error = body.message;\n return Promise.reject(new OTPVerificationError(/*error*/));\n }\n\n dispatch(lockFields({ mobilePhone: true }));\n },\n [fetch, mockVOTP, dispatch],\n );\n\n return [verifyOTPCode, status];\n};\n\nexport default useOTPVerification;\n","import React, {\n useEffect,\n useCallback,\n useMemo,\n useState,\n useContext,\n} from 'react';\n\nimport { RouteComponentProps } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\nimport * as Yup from 'yup';\nimport { useSnackbar } from 'notistack';\nimport catchOnly from 'utils/catchOnly';\n\nimport FmcForm from 'components/FmcForm';\nimport OtpVerificationView from './OtpVerificationView';\nimport ConsumerSearchContext from '../ConsumerSearchContext';\n\nimport useOTPSender, { OTPSenderError } from 'hooks/requests/otpSender';\nimport useTimeout from 'hooks/useTimeout';\n\nimport useOTPVerification, {\n OTPVerificationError,\n} from 'hooks/requests/otpVerification';\n\nimport useTranslate from 'hooks/useTranslate';\nimport { selectAttempts, selectExpireTime } from 'state/otpCode';\nimport { NonClientError } from 'hooks/requests/fetchUtils';\n\ntype PropTypes = RouteComponentProps & {\n onOtpSuccessful: (otpCode: string) => Promise;\n values: {\n mobilePhone: string;\n };\n};\n\nconst schema = Yup.object().shape({\n otpCode: Yup.string().required('Required'),\n});\n\nexport type FormValues = ReturnType;\n\nconst initialValues: FormValues = {\n otpCode: '',\n};\n\nconst OtpVerification: React.FC = props => {\n const t = useTranslate();\n const [verifyOTPCode] = useOTPVerification();\n const [sendOTP] = useOTPSender();\n const otpAttempts = useSelector(selectAttempts);\n const otpExpireTime = useSelector(selectExpireTime);\n const { enqueueSnackbar } = useSnackbar();\n const { onOtpSuccessful, values } = props;\n const { i18nPrefix } = useContext(ConsumerSearchContext);\n\n const tooManyAttempts = useMemo(() => otpAttempts >= 3, [otpAttempts]);\n const attemptsRemaining = useMemo(() => {\n if (otpAttempts === 0) {\n return null;\n } else if (otpAttempts >= 3) {\n return t(`${i18nPrefix}otpVerification.outOfAttempts`);\n } else {\n return t(`${i18nPrefix}otpVerification.attemptsLeft`, {\n attemptsRemaining: 3 - otpAttempts,\n });\n }\n }, [i18nPrefix, otpAttempts, t]);\n\n const [setTimeout] = useTimeout();\n\n const [timedOut, setTimedOut] = useState(false);\n //this needs to be changed when the workflow is changed\n\n const onSubmit = useCallback(\n async (values: FormValues) => {\n try {\n await verifyOTPCode({ otpCode: values.otpCode });\n await onOtpSuccessful(values.otpCode);\n } catch (e) {\n if (catchOnly(e, OTPVerificationError, NonClientError)) {\n if (e instanceof NonClientError) {\n enqueueSnackbar(t(`${i18nPrefix}otpVerification.serverError`), {\n variant: 'error',\n });\n }\n }\n }\n },\n [i18nPrefix, t, verifyOTPCode, onOtpSuccessful, enqueueSnackbar],\n );\n\n useEffect(() => {\n if (otpExpireTime && otpExpireTime > Date.now()) {\n setTimedOut(false);\n setTimeout(() => setTimedOut(true), otpExpireTime - Date.now());\n } else {\n setTimedOut(true);\n }\n }, [otpExpireTime, setTimeout, setTimedOut]);\n\n const resendSms = useCallback(async () => {\n try {\n await sendOTP({ phone: values.mobilePhone });\n enqueueSnackbar(t(`${i18nPrefix}otpVerification.resendSmsSuccess`), {\n variant: 'success',\n });\n } catch (e) {\n if (catchOnly(e, NonClientError, OTPSenderError)) {\n enqueueSnackbar(t(`${i18nPrefix}otpVerification.resendSmsError`), {\n variant: 'error',\n });\n }\n }\n }, [i18nPrefix, t, sendOTP, enqueueSnackbar, values]);\n\n return (\n \n {formProps => (\n \n )}\n \n );\n};\n\nexport default OtpVerification;\n","import otpVerification from './OtpVerification';\n\nexport default otpVerification;\n","import PhoneLookup from './PhoneLookup';\n\nexport default PhoneLookup;\n","import React, { useCallback, useState } from 'react';\nimport { Route, RouteComponentProps, Switch } from 'react-router-dom';\nimport LookupForm from './LookupForm';\nimport OtpVerification from '../OtpVerification';\n\nexport interface FormValues {\n mobilePhone: string;\n ssn: string;\n zip: string;\n}\n\nexport type PropTypes = RouteComponentProps & {\n onOtpSuccessful: (values: {\n ssn: string;\n zip: string;\n mobilePhone: string;\n otpCode: string;\n }) => Promise;\n};\n\nconst PhoneLookup: React.FC = props => {\n const { onOtpSuccessful, match } = props;\n\n const [values, setValues] = useState({\n mobilePhone: '',\n ssn: '',\n zip: '',\n });\n\n const handleOtpSuccess = useCallback(\n async (otpCode: string) => {\n await onOtpSuccessful({\n ssn: values.ssn,\n zip: values.zip,\n mobilePhone: values.mobilePhone,\n otpCode,\n });\n },\n [values, onOtpSuccessful],\n );\n\n return (\n \n (\n \n )}\n />\n (\n \n )}\n />\n \n );\n};\n\nexport default PhoneLookup;\n","import LookupForm from './LookupForm';\n\nexport default LookupForm;\n","import React, { useCallback, useMemo } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { filter, pick } from 'ramda';\nimport { useSnackbar } from 'notistack';\nimport { RouteComponentProps } from 'react-router-dom';\nimport catchOnly from 'utils/catchOnly';\nimport isPresent from 'utils/isPresent';\n\nimport * as Yup from 'yup';\nimport {\n composeSchema,\n isPhoneNumber,\n isSsn,\n isZipCode,\n} from 'utils/validations';\n\nimport FmcForm from 'components/FmcForm';\nimport LookupFormView from '../../LookupFormView';\n\nimport useOTPSender, { OTPSenderError } from 'hooks/requests/otpSender';\n\nimport { NonClientError } from 'hooks/requests/fetchUtils';\nimport useNavigationHelpers from 'hooks/useNavigationHelpers';\n\nimport {\n mergeApplication,\n selectCreditApplication,\n} from 'state/creditApplication';\n\nimport useFieldCustomization from 'hooks/useFieldCustomization';\n\nexport interface FormValues {\n mobilePhone: string;\n ssn?: string;\n zip?: string;\n}\n\ntype PropTypes = RouteComponentProps & {\n onSubmit: (values: FormValues) => void;\n};\n\nconst LookupForm: React.FC = props => {\n const { isLastFour } = useFieldCustomization();\n const isLastFourBool = isLastFour();\n const [sendOTP] = useOTPSender();\n const { onSubmit: onSubmitSetValues, match } = props;\n\n const { push } = useNavigationHelpers();\n const { enqueueSnackbar } = useSnackbar();\n\n const dispatch = useDispatch();\n const creditApplication = useSelector(selectCreditApplication);\n\n const showSsn = !creditApplication.ssn;\n const showZip = !creditApplication.zip;\n\n const schema = useMemo(\n () =>\n Yup.object().shape({\n mobilePhone: composeSchema(\n Yup.string().label('Mobile #'),\n isPhoneNumber,\n Yup.string().required(),\n ),\n\n ...(showSsn\n ? {\n ssn: Yup.string()\n .label(isLastFourBool ? 'Last 4 SSN' : 'SSN')\n .concat(isSsn(isLastFourBool))\n .required(),\n }\n : {}),\n\n ...(showZip\n ? {\n zip: composeSchema(\n Yup.string().label('ZIP Code'),\n Yup.string().required(),\n isZipCode,\n ),\n }\n : {}),\n }),\n [showSsn, showZip, isLastFourBool],\n );\n\n const onSubmit = useCallback(\n async (rawValues: FormValues) => {\n const values = schema.cast(rawValues);\n\n dispatch(\n mergeApplication({\n mobilePhone: values.mobilePhone,\n ...(showSsn ? { ssn: values.ssn } : {}),\n ...(showZip ? { zip: values.zip } : {}),\n }),\n );\n\n try {\n await sendOTP({ phone: values.mobilePhone as string });\n onSubmitSetValues(values);\n push(`${match.path}/otp-verification`.replace('//', '/'));\n } catch (e) {\n if (catchOnly(e, NonClientError, OTPSenderError)) {\n enqueueSnackbar('Something has gone wrong. Please try again later.', {\n variant: 'error',\n });\n }\n }\n },\n [\n showSsn,\n showZip,\n enqueueSnackbar,\n push,\n sendOTP,\n schema,\n dispatch,\n onSubmitSetValues,\n match,\n ],\n );\n\n const initialValues: FormValues = {\n mobilePhone: '',\n ...(showSsn ? { ssn: '' } : {}),\n ...(showZip ? { zip: '' } : {}),\n };\n\n const prefillValues = filter(\n isPresent,\n pick(['mobilePhone'], creditApplication),\n );\n\n return (\n \n {formProps => }\n \n );\n};\n\nexport default LookupForm;\n","import PhoneValidation from './PhoneValidation';\n\nexport default PhoneValidation;\n","import React, { useCallback, useState } from 'react';\nimport { Route, RouteComponentProps, Switch } from 'react-router-dom';\nimport LookupForm from './LookupForm';\nimport OtpVerification from '../OtpVerification';\n\nexport interface FormValues {\n mobilePhone: string;\n ssn?: string;\n zip?: string;\n}\n\nexport type PropTypes = RouteComponentProps & {\n onOtpSuccessful: (values: {\n ssn?: string;\n zip?: string;\n mobilePhone: string;\n otpCode: string;\n }) => Promise;\n};\n\nconst PhoneValidation: React.FC = props => {\n const { onOtpSuccessful, match } = props;\n\n const [values, setValues] = useState({\n mobilePhone: '',\n ssn: '',\n zip: '',\n });\n\n const handleOtpSuccess = useCallback(\n async (otpCode: string) => {\n await onOtpSuccessful({\n ssn: values.ssn,\n zip: values.zip,\n mobilePhone: values.mobilePhone,\n otpCode,\n });\n },\n [values, onOtpSuccessful],\n );\n\n return (\n \n (\n \n )}\n />\n (\n \n )}\n />\n \n );\n};\n\nexport default PhoneValidation;\n","import React from 'react';\n\nimport ConsumerSearchContext from './ConsumerSearchContext';\nimport PhoneLookup from './PhoneLookup';\nimport TokenLookup from './TokenLookup';\nimport PhoneValidation from './PhoneValidation';\nimport { RouteComponentProps } from 'react-router-dom';\n\n// Our version of eslint prettier can't parse type re-export for some reason,\n// so we'll have to import directly.\nimport { PropTypes as PhoneLookupPropTypes } from './PhoneLookup/PhoneLookup';\nimport { PropTypes as TokenLookupPropTypes } from './TokenLookup/TokenLookup';\nimport { PropTypes as PhoneValidationPropTypes } from './PhoneValidation/PhoneValidation';\n\nexport interface FormValues {\n mobilePhone: string | null;\n ssn: string;\n zip: string;\n}\n\ninterface PhoneLookupType {\n lookupType: 'phoneLookup';\n onSubmit: PhoneLookupPropTypes['onOtpSuccessful'];\n}\n\ninterface TokenLookupType {\n lookupType: 'tokenLookup';\n onSubmit: TokenLookupPropTypes['onSubmit'];\n}\n\ninterface PhoneValidationType {\n lookupType: 'phoneValidation';\n onSubmit: PhoneValidationPropTypes['onOtpSuccessful'];\n}\n\ntype PropTypes = RouteComponentProps & {\n isAccountLookup?: boolean;\n prompt?: boolean;\n skipToPath?: string;\n i18nPrefix: string;\n hasExistingAccount?: boolean;\n} & (PhoneLookupType | TokenLookupType | PhoneValidationType);\n\nconst SearchComponent: React.FC = props => {\n switch (props.lookupType) {\n case 'phoneLookup':\n return ;\n case 'tokenLookup':\n return ;\n case 'phoneValidation':\n return ;\n }\n};\n\nconst ReusableConsumerSearch: React.FC = props => {\n const {\n skipToPath,\n i18nPrefix,\n lookupType,\n isAccountLookup,\n prompt,\n hasExistingAccount,\n } = props;\n\n return (\n \n \n \n );\n};\n\nexport default ReusableConsumerSearch;\n","import ReusableConsumerSearch from './ReusableConsumerSearch';\n\nexport default ReusableConsumerSearch;\n","/** @jsx jsx */\nimport { FC } from 'react';\nimport { css, jsx, SerializedStyles } from '@emotion/core';\nimport { useSelector } from 'react-redux';\nimport { selectTenant } from 'state/tenant';\nimport { Theme } from 'features/Theme';\n\nconst styles = {\n icon: (theme: Theme): SerializedStyles => css`\n display: block;\n margin: -${theme.mui.spacing(5)}px auto 0;\n max-height: 30px;\n `,\n};\n\ninterface PropTypes {\n isDsp?: boolean;\n}\n\nconst CompletionIcon: FC = ({ isDsp }) => {\n const { tspIcon, completionIcon } = useSelector(selectTenant);\n const path = isDsp ? tspIcon : completionIcon;\n\n return path ? (\n \n ) : null;\n};\n\nexport default CompletionIcon;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableReviewTerms = loadable(() => import('./ReviewTerms'), {\n fallback: ,\n});\n\nexport default LoadableReviewTerms;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport React, { useState } from 'react';\nimport { Field, FieldProps } from 'formik';\nimport { FormTextField } from 'components/TextField';\n\nimport { ssnMask } from 'utils/masks';\nimport { useSelector } from 'react-redux';\nimport { selectLockedFields } from 'state/creditApplication';\nimport useFieldCustomization from 'hooks/useFieldCustomization';\nimport withOptional from './withOptional';\nimport InputAdornment from '@material-ui/core/InputAdornment/InputAdornment';\nimport IconButton from '@material-ui/core/IconButton/IconButton';\nimport VisibilityOffOutlined from '@material-ui/icons/VisibilityOffOutlined';\nimport VisibilityOutlinedIcon from '@material-ui/icons/VisibilityOutlined';\nimport useTranslate from 'hooks/useTranslate';\n\ninterface PropTypes {\n fieldId?: string;\n fieldName?: string;\n label?: string;\n lastFour?: boolean;\n locked?: boolean;\n}\n\nconst SsnField: React.FC = ({\n fieldId,\n fieldName,\n label,\n lastFour,\n locked,\n}) => {\n const [ssnHidden, setSsnHidden] = useState(true);\n const t = useTranslate();\n const lockedFields = useSelector(selectLockedFields);\n const { isLastFour, isVisible, isRequired } = useFieldCustomization();\n const isLastFourBool = isLastFour();\n const ssnLabel = t('formLabel.ssn', {\n context: isLastFourBool && 'last_four',\n });\n\n const toggleSsnHidden = () => {\n setSsnHidden(ssnHidden ? false : true);\n };\n\n const visibleButton = (\n \n \n {ssnHidden ? : }\n \n \n );\n\n const InputComponentProps = {\n InputProps: {\n endAdornment: visibleButton,\n },\n };\n\n return (\n \n {isVisible('ssn') && (\n \n {(fieldProps: FieldProps) => (\n \n )}\n \n )}\n \n );\n};\n\nexport default SsnField;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport React from 'react';\nimport { Field, FieldProps } from 'formik';\nimport { FormTextField } from 'components/TextField';\n\nimport useFieldCustomization from 'hooks/useFieldCustomization';\nimport useTranslate from 'hooks/useTranslate';\nimport withOptional from './withOptional';\n\nconst LoyaltyNumberField: React.FC = () => {\n const { isVisible, isRequired } = useFieldCustomization();\n const t = useTranslate();\n return (\n \n {isVisible('loyaltyNumber') && (\n \n {(fieldProps: FieldProps) => (\n \n )}\n \n )}\n \n );\n};\n\nexport default LoyaltyNumberField;\n","import { css, SerializedStyles } from '@emotion/core';\nimport { Theme } from 'features/Theme';\n\nconst styles = (theme: Theme): SerializedStyles => css`\n &.MuiButton-contained {\n box-shadow: none;\n // spacing(8) looks good-ish right now. Probably will still cause\n // some button with very long text to span multiple lines.\n padding-left: ${theme.mui.spacing(8)}px;\n padding-right: ${theme.mui.spacing(8)}px;\n ${theme.mui.breakpoints.up('sm')} {\n min-width: unset;\n padding-left: ${theme.mui.spacing(14)}px;\n padding-right: ${theme.mui.spacing(14)}px;\n }\n max-width: 100%;\n font-weight: bold;\n\n .MuiButton-label {\n // if the label is forced onto two lines, it looks less goofy if centered\n text-align: center;\n }\n text-transform: none;\n }\n &.MuiButton-containedPrimary {\n transition: ${theme.mui.transitions.create(['color', 'background-color'])};\n &:hover {\n // Primary button hover uses primary.dark by default.\n // We need to make sure that if it is changing from a light to a\n // dark button (due to a light brandColor or something), the text color\n // is also switched.\n color: ${theme.mui.palette.getContrastText(\n theme.mui.palette.primary.dark,\n )};\n }\n }\n &.MuiButton-textPrimary {\n &:hover {\n // Primary button hover uses primary.dark by default.\n // We need to make sure that if it is changing from a light to a\n // dark button (due to a light brandColor or something), the text color\n // is also switched.\n background-color: transparent;\n }\n\n .MuiButton-label {\n text-transform: none;\n font-style: italic;\n text-decoration: underline;\n }\n\n padding-top: 6px; // Mui hardcode this values to be 6px\n padding-bottom: 6px;\n }\n &.MuiButton-text {\n // Make sure the text is inside the curved border radius.\n padding-left: ${theme.mui.spacing(6) / 2}px;\n padding-right: ${theme.mui.spacing(6) / 2}px;\n }\n &.MuiButtonBase-root {\n border-radius: 5px;\n // These values make the normal size button exactly 48px tall in Chrome.\n // (It's slightly off in the other browsers).\n // ADS requires button to be at least 44px tall.\n // Using min-height causes alignment issue in IE11.\n padding-top: 12px; // Mui hardcode this values to be 6px\n padding-bottom: 12px;\n font-style: normal;\n }\n`;\n\nexport default styles;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\n\nimport { CircularProgress, Button as Btn } from '@material-ui/core';\nimport { ButtonProps as BtnProps } from '@material-ui/core/Button';\n\nimport styles from './styles';\nexport type ButtonProps = BtnProps<\n C,\n { component?: C }\n> & {\n loading?: boolean;\n};\n\nconst defaultProps = {\n loading: false,\n component: 'button',\n};\n\nfunction Button(props: ButtonProps) {\n const withDefault = { ...defaultProps, ...props };\n const { className, loading, disabled, component, ...rest } = withDefault;\n\n return (\n \n {loading && }\n {!loading && props.children}\n \n );\n}\n\nexport default Button;\n","import Button from './Button';\n\nexport default Button;\nexport * from './Button';\n","import { createAction, createReducer } from 'deox';\n\nimport { StoreLocation } from 'hooks/requests/storeLocations';\n\nexport interface StoreLocationsState {\n entities: StoreLocation[] | null;\n}\n\nconst defaultState: StoreLocationsState = {\n entities: null,\n};\n\nexport const setStoreLocations = createAction(\n 'SET_STORE_LOCATIONS',\n resolve => (storeLocations: StoreLocation[]) => resolve({ storeLocations }),\n);\n\nexport const storeLocationsReducer = createReducer(\n defaultState,\n handleAction => [\n handleAction(\n setStoreLocations,\n (state, { payload: { storeLocations } }) => ({\n ...state,\n entities: storeLocations,\n }),\n ),\n ],\n);\n\nexport interface MountedState {\n storeLocations: StoreLocationsState;\n}\n\nexport const selectStoreLocations = (\n state: MountedState,\n): StoreLocation[] | null => state.storeLocations.entities;\n\nexport default storeLocationsReducer;\n","import { createAction, createReducer } from 'deox';\n\nexport interface MembershipValidation {\n validationStatus: string | null;\n}\n\nexport interface MembershipValidationState {\n entity: MembershipValidation;\n}\n\nexport const defaultState: MembershipValidationState = {\n entity: { validationStatus: null },\n};\n\nexport const mergeMembershipValidation = createAction(\n 'MERGE_MEMBERSHIP_VALIDATION',\n resolve => (data: MembershipValidation) => resolve(data),\n);\n\nexport const membershipValidationReducer = createReducer(\n defaultState,\n handleAction => [\n handleAction(mergeMembershipValidation, (state, { payload: data }) => {\n return {\n ...state,\n entity: {\n ...state.entity,\n ...data,\n },\n };\n }),\n ],\n);\n\nexport interface MountedState {\n membershipValidation: ReturnType;\n}\n\nexport const selectMembershipValidation = (\n state: MountedState,\n): MembershipValidation => state.membershipValidation.entity;\n\nexport default membershipValidationReducer;\n","import { css, SerializedStyles } from '@emotion/core';\nimport { Theme } from 'features/Theme';\n\nconst nonEmbeddedStyles = (theme: Theme): SerializedStyles => css`\n border-radius: ${theme.shape.borderRadiusLarge}px;\n border: 1px solid ${theme.mui.palette.divider};\n padding-left: ${theme.mui.spacing(2)}px;\n padding-right: ${theme.mui.spacing(2)}px;\n\n // So that it does not touch the top bottom of the page\n margin-top: ${theme.mui.spacing(3)}px;\n margin-bottom: ${theme.mui.spacing(3)}px;\n\n ${theme.mui.breakpoints.up('sm')} {\n padding-left: ${theme.mui.spacing(3)}px;\n padding-right: ${theme.mui.spacing(3)}px;\n }\n\n ${theme.mui.breakpoints.up('md')} {\n padding-left: ${theme.mui.spacing(5)}px;\n padding-right: ${theme.mui.spacing(5)}px;\n }\n`;\n\nconst styles = {\n pageContainer: (theme: Theme): SerializedStyles => css`\n label: pageContainer;\n\n background-color: ${theme.mui.palette.background.paper};\n\n padding: ${theme.mui.spacing(5)}px ${theme.mui.spacing(0)}px;\n\n ${theme.mui.breakpoints.up('sm')} {\n padding: ${theme.mui.spacing(5)}px ${theme.mui.spacing(0)}px;\n }\n\n ${theme.mui.breakpoints.up('md')} {\n padding: ${theme.mui.spacing(5)}px ${theme.mui.spacing(0)}px;\n }\n `,\n\n bordered: (theme: Theme): SerializedStyles => css`\n ${!theme.embedded && nonEmbeddedStyles(theme)};\n `,\n};\n\nexport default styles;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\n\nimport { Container } from '@material-ui/core';\nimport { ContainerProps } from '@material-ui/core/Container';\n\nimport { mergeLeft } from 'ramda';\nimport { composeStyles } from 'features/Theme';\n\nimport styles from './styles';\n\ntype PropTypes = Pick & {\n className?: string;\n /**\n * Default to true. Borders are not displayed when embedded\n */\n bordered?: boolean;\n};\n\nconst defaultProps: Partial = {\n bordered: true,\n};\n\nconst PageContainer: React.FC = props => {\n props = mergeLeft(props, defaultProps);\n\n const { maxWidth, bordered, className, children } = props;\n\n return (\n \n \n {children}\n \n \n );\n};\n\nexport default PageContainer;\n","import PageContainer from './PageContainer';\n\nexport default PageContainer;\n","import { useCallback, useState } from 'react';\nimport log from 'loglevel';\nimport qs from 'query-string';\nimport useFetch from 'hooks/useFetch';\nimport { NonClientError } from 'hooks/requests/fetchUtils';\nimport { map, filter, curry } from 'ramda';\nimport catchOnly from 'utils/catchOnly';\n\nconst MELISSA_URL =\n 'https://expressentry.melissadata.net/web/GlobalExpressFreeForm';\nconst LICENSE_KEY = 'lt9OthVnlCRomUk-DNvwl9**';\n\nexport interface AddressResult {\n formattedAddress: string;\n address1: string;\n city: string;\n state: string;\n zip: string;\n}\n\ntype AddressAutocompleteHook = () => [\n AddressResult[],\n (query: string, partialAddress: Partial) => Promise,\n];\n\n/**\n * Resposne type from MelissaData\n * See GlobalExpressFreeForm section in\n * http://wiki.melissadata.com/images/c/cc/GlobalExpressEntry_QSG.pdf\n */\ninterface MelissaResponse {\n Results: {\n Address: {\n Address: string;\n Address1: string;\n Locality: string;\n AdministrativeArea: string;\n PostalCode: string;\n };\n }[];\n}\n\nconst convertResult = (body: MelissaResponse): AddressResult[] => {\n const results = body.Results || [];\n\n return map(\n result => ({\n formattedAddress: result.Address.Address,\n address1: result.Address.Address1,\n city: result.Address.Locality,\n state: result.Address.AdministrativeArea,\n zip: result.Address.PostalCode,\n }),\n results,\n );\n};\n\nconst filterResults = curry(\n (\n partialAddress: Partial,\n results: AddressResult[],\n ): AddressResult[] => {\n return filter(\n addressResult =>\n !partialAddress.zip ||\n addressResult.zip.substr(0, 5) === partialAddress.zip,\n results,\n );\n },\n);\n\nconst useAddressAutocomplete: AddressAutocompleteHook = () => {\n const [results, setResults] = useState([]);\n const [, fetch] = useFetch();\n\n const search = useCallback(\n async (query: string, partialAddress: Partial = {}) => {\n const url = new URL(MELISSA_URL);\n url.search = qs.stringify({\n format: 'JSON',\n id: LICENSE_KEY,\n ff: query,\n maxrecords: 8,\n nativecharset: false,\n });\n\n try {\n const response = await fetch(url.toString(), {\n method: 'GET',\n mode: undefined,\n headers: undefined,\n });\n\n if (!response.ok) {\n log.error('Failed to fetch address suggestion');\n return;\n }\n\n const body = (await response.json()) as MelissaResponse;\n setResults(filterResults(partialAddress, convertResult(body)));\n return;\n } catch (e) {\n if (catchOnly(e, NonClientError)) {\n return;\n }\n }\n },\n [fetch, setResults],\n );\n\n return [results, search];\n};\n\nexport default useAddressAutocomplete;\n","/** @jsx jsx */\nimport React, { useCallback } from 'react';\nimport { jsx } from '@emotion/core';\nimport { useTheme } from 'emotion-theming';\nimport { cancelApplication } from 'fmc-sdk';\n\nimport { Theme } from 'features/Theme';\n\nimport Button from 'components/Button';\n\nimport useFmcHost from 'hooks/useFmcHost';\nimport useQueryParameters from 'hooks/useQueryParameters';\nimport useOfferMade, { OfferMadeEnum } from 'hooks/requests/offerMade';\nimport { Status } from 'hooks/requests/fetchUtils';\nimport useTranslate from 'hooks/useTranslate';\n\nimport { ButtonProps } from '@material-ui/core/Button';\n\n/**\n * CancelButton that appears in the embedded case\n * Dispatch cancelApplication to EP\n * Also send an abandoned MadeOffer request for prescreen.\n */\n\nconst CancelButton: React.FC = props => {\n const fmcDispatch = useFmcHost();\n const theme = useTheme();\n const [sendOfferMade, status] = useOfferMade();\n const { prescreenId } = useQueryParameters();\n const t = useTranslate();\n const textToRender = props.children\n ? props.children\n : t('cancelApplicationButton');\n const onClick = useCallback(async () => {\n // TODO: Key off the overrideConfig instead when that is merged.\n if (prescreenId) {\n await sendOfferMade(OfferMadeEnum.Abandoned);\n }\n fmcDispatch(cancelApplication());\n }, [fmcDispatch, sendOfferMade, prescreenId]);\n\n if (!theme.embedded) {\n return null;\n }\n\n return (\n \n {textToRender}\n \n );\n};\n\nexport default CancelButton;\n","import CancelButton from './CancelButton';\n\nexport default CancelButton;\n","import { css } from '@emotion/core';\n\nexport default {\n popper: css`\n z-index: 2;\n `,\n};\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport React, { useState } from 'react';\nimport Downshift, { PropGetters } from 'downshift';\nimport {\n Popper,\n Paper,\n MenuList,\n MenuItem,\n Typography,\n} from '@material-ui/core';\nimport styles from './styles';\n\ninterface InjectedProps {\n getInputProps: PropGetters['getInputProps'];\n getLabelProps: PropGetters['getLabelProps'];\n inputRef: (input: HTMLInputElement) => void;\n getRootProps: PropGetters['getRootProps'];\n}\n\ninterface PropTypes {\n id?: string;\n suggestions: Item[];\n itemToString: (item: Item | null) => string;\n onSelect?: (item: Item) => unknown;\n children: (props: InjectedProps) => React.ReactElement;\n enabled?: boolean;\n inputValue?: string | null;\n}\n\nfunction SuggestionItem({\n getItemProps,\n item,\n itemToString,\n highlight,\n}: {\n getItemProps: PropGetters['getItemProps'];\n item: Item;\n itemToString: PropTypes['itemToString'];\n highlight: boolean;\n}): React.ReactElement {\n const props = getItemProps({\n item,\n style: {\n backgroundColor: highlight ? 'lightgray' : 'white',\n },\n });\n return (\n \n \n {itemToString(item)}\n \n \n );\n}\n\nfunction Autocomplete({\n id,\n suggestions,\n itemToString,\n onSelect,\n children,\n inputValue,\n enabled = true,\n}: PropTypes): React.ReactElement {\n const [childNode, setChildNode] = useState();\n\n return (\n \n {downshift => {\n const {\n getInputProps,\n getItemProps,\n getLabelProps,\n getMenuProps,\n getRootProps,\n isOpen,\n highlightedIndex,\n } = downshift;\n\n const menuProps = isOpen\n ? getMenuProps({}, { suppressRefError: true })\n : {};\n\n const child = children({\n getInputProps,\n getLabelProps,\n inputRef: setChildNode,\n getRootProps,\n });\n\n const menuWidth = childNode ? childNode.clientWidth + 2 : 0;\n\n return (\n
\n {child}\n {childNode && (\n 0}\n anchorEl={childNode}\n css={styles.popper}\n placement=\"bottom\"\n >\n \n \n {suggestions.map((item, i) => {\n return (\n \n );\n })}\n \n \n \n )}\n
\n );\n }}\n \n );\n}\n\nexport default Autocomplete;\n","import Autocomplete from './Autocomplete';\nexport default Autocomplete;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst MembershipValidation = loadable(() => import('./MembershipValidation'), {\n fallback: ,\n});\n\nexport default MembershipValidation;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst ClerkMode = loadable(() => import('./ClerkMode'), {\n fallback: ,\n});\n\nexport default ClerkMode;\n","import React, { createContext, useMemo, useContext } from 'react';\nimport useUAParser from 'hooks/useUAParser';\nimport { Theme, useMediaQuery } from '@material-ui/core';\nimport { useTheme } from '@material-ui/styles';\nimport canUseDOM from 'utils/canUseDOM';\n\ninterface ResponsiveQuery {\n isMobile: boolean;\n}\n\nconst defaultValue: ResponsiveQuery = { isMobile: false };\n\ntype ReponsiveQueryHook = () => ResponsiveQuery;\n\nconst ResponsiveQueryContext = createContext(defaultValue);\n\n/**\n * Compute the responsive query it one place and provide the same value to\n * all components that needs it\n *\n * This helps with maintaining a consistent value across the app.\n *\n * Otherwise, every component that make use of this will have to recompute\n * the value. Because MUI's useMediaQuery cannot distinguish between a\n * SSR rehydrate vs a normal render, it must always return the default value\n * for SSR during the first render, and then in an effect compute the value.\n *\n * This means that for many components this value will be wrong for one render\n * before being corrected. This is not acceptable in many cases.\n *\n * Calling useMediaQuery in one place high up in the hierarchy has the benefit\n * of having the incorrect value only once on load, and all subsequent usage\n * of it will have the correct values.\n */\nconst ResponsiveQueryProvider: React.FC = ({ children }) => {\n const uaProps = useUAParser();\n const theme = useTheme();\n\n const isMobile = useMediaQuery(theme.breakpoints.down('sm'));\n\n // Use media query with fallback for SSR\n const value: ResponsiveQuery = useMemo(\n () => ({\n isMobile: canUseDOM ? isMobile : uaProps.device.type === 'mobile',\n }),\n [isMobile, uaProps.device.type],\n );\n\n return (\n \n {children}\n \n );\n};\n\nconst useResponsiveQuery: ReponsiveQueryHook = () => {\n const query = useContext(ResponsiveQueryContext);\n\n return query;\n};\n\nexport default useResponsiveQuery;\nexport { ResponsiveQueryProvider };\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableAddOns = loadable(() => import('./AddOns'), {\n fallback: ,\n});\n\nexport default LoadableAddOns;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadablePrescreenOffer = loadable(() => import('./PrescreenOffer'), {\n fallback: ,\n});\n\nexport default LoadablePrescreenOffer;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableBatchPrescreenStart = loadable(\n () => import('./BatchPrescreenStart'),\n { fallback: },\n);\n\nexport default LoadableBatchPrescreenStart;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableFallbackReviewTerms = loadable(\n () => import('./FallbackReviewTerms'),\n { fallback: },\n);\n\nexport default LoadableFallbackReviewTerms;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableBatchPrescreenApplication = loadable(\n () => import('./FallbackApplication'),\n { fallback: },\n);\n\nexport default LoadableBatchPrescreenApplication;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableBatchPrescreenApplication = loadable(\n () => import('./FallbackApplication'),\n { fallback: },\n);\n\nexport default LoadableBatchPrescreenApplication;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableDecline = loadable(() => import('./Decline'), {\n fallback: ,\n});\n\nexport default LoadableDecline;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst PrequalOffer = loadable(() => import('./PrequalOffer'), {\n fallback: ,\n});\n\nexport default PrequalOffer;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadablePrequalOfferStart = loadable(\n () => import('./PrequalOfferPushStart'),\n {\n fallback: ,\n },\n);\n\nexport default LoadablePrequalOfferStart;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadablePrequalOfferPushApplication = loadable(\n () => import('./PrequalOfferPushApplication'),\n {\n fallback: ,\n },\n);\n\nexport default LoadablePrequalOfferPushApplication;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableFallbackReviewTerms = loadable(\n () => import('./FallbackReviewTerms'),\n { fallback: },\n);\n\nexport default LoadableFallbackReviewTerms;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableTokenLookup = loadable(() => import('./TokenLookup'), {\n fallback: ,\n});\n\nexport default LoadableTokenLookup;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableDriverLicenseError = loadable(\n () => import('./DriverLicenseError'),\n {\n fallback: ,\n },\n);\n\nexport default LoadableDriverLicenseError;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableScanPage = loadable(() => import('./ScanPage'), {\n fallback: ,\n});\n\nexport default LoadableScanPage;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableDriverLicenseHome = loadable(\n () => import('./PrequalDriverLicenseHome'),\n {\n fallback: ,\n },\n);\n\nexport default LoadableDriverLicenseHome;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableCreditPending = loadable(() => import('./CreditPending'), {\n fallback: ,\n});\n\nexport default LoadableCreditPending;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableExistingAccount = loadable(() => import('./ExistingAccount'), {\n fallback: ,\n});\n\nexport default LoadableExistingAccount;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableCreditError = loadable(() => import('./CreditError'), {\n fallback: ,\n});\n\nexport default LoadableCreditError;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableDspStart = loadable(() => import('./DspStart'), {\n fallback: ,\n});\n\nexport default LoadableDspStart;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableDspError = loadable(() => import('./DspError'), {\n fallback: ,\n});\n\nexport default LoadableDspError;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst LoadableDspRetrieval = loadable(() => import('./DspRetrieval'), {\n fallback: ,\n});\n\nexport default LoadableDspRetrieval;\n","import React from 'react';\nimport loadable from '@loadable/component';\nimport LoadingScreen from 'components/LoadingScreen';\n\nconst Approval = loadable(() => import('./Approval'), {\n fallback: ,\n});\n\nexport default Approval;\n","/**\n * Reusable masks to pass into TextField\n *\n * See: https://github.com/text-mask/text-mask/blob/master/componentDocumentation.md#mask\n */\n\nimport createNumberMask from 'text-mask-addons/dist/createNumberMask';\nimport createAutoCorrectedDatePipe from 'text-mask-addons/dist/createAutoCorrectedDatePipe';\nimport { conformToMask as ctm, conformToMaskResult } from 'react-text-mask';\n\nimport { prop, pipe } from 'ramda';\n\nexport const phoneMask = [\n '(',\n /[2-9]/,\n /\\d/,\n /\\d/,\n ')',\n ' ',\n /\\d/,\n /\\d/,\n /\\d/,\n '-',\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n];\n\nexport const dateMask = [\n /\\d/,\n /\\d/,\n '/',\n /\\d/,\n /\\d/,\n '/',\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n];\n\nexport const moneyMask = createNumberMask({\n prefix: '$',\n integerLimit: 7,\n decimalLimit: 0,\n});\n\nexport const ssnMask = (isLastFour: boolean) =>\n isLastFour\n ? [/\\d/, /\\d/, /\\d/, /\\d/]\n : [/\\d/, /\\d/, /\\d/, /\\d/, /\\d/, /\\d/, /\\d/, /\\d/, /\\d/];\n\nexport const intendedPurchaseAmountMask = [\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n];\nexport const zipMask = [/\\d/, /\\d/, /\\d/, /\\d/, /\\d/];\nexport const stateMask = [/[A-Za-z]/, /[A-Za-z]/];\n\nexport const prescreenIdMask = [\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n];\n\nexport const conformToMask = pipe<\n string,\n (string | RegExp)[],\n conformToMaskResult,\n string\n>(\n (val, mask) => ctm(val, mask, {}),\n prop('conformedValue'),\n);\n\nexport const dobPipe = createAutoCorrectedDatePipe('mm/dd/yyyy');\n","import { css } from '@emotion/core';\n\nconst styles = {\n actionsContainer: css`\n width: 100%;\n & .MuiButton-contained {\n // exact padding of text variant button.\n margin-bottom: 12px;\n }\n `,\n};\n\nexport default styles;\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport { Box } from '@material-ui/core';\nimport styles from './styles';\n\nconst ActionButtonContainer: React.FC = props => {\n const { children } = props;\n return (\n \n {children}\n \n );\n};\n\nexport default ActionButtonContainer;\n","import ActionButtonContainer from './ActionButtonContainer';\n\nexport default ActionButtonContainer;\nexport * from './ActionButtonContainer';\n","import React, { createContext, useContext, useState, useCallback } from 'react';\nimport { useSelector } from 'react-redux';\nimport { FmcHost } from 'fmc-sdk';\nimport canUseDOM from 'utils/canUseDOM';\nimport { selectTenant } from 'state/tenant';\n\nconst FmcHostContext = createContext(null);\n\nexport const FmcHostProvider: React.FC = ({ children }) => {\n const tenant = useSelector(selectTenant);\n if (tenant === undefined) {\n throw new Error('tenant undefined');\n }\n\n const [fmcHost] = useState(() => {\n if (canUseDOM && tenant.enabledFeatures.enhancedPresentment) {\n return new FmcHost({\n targetOrigins:\n tenant.enabledFeatures.enhancedPresentment.frameAncestors,\n });\n } else {\n return null;\n }\n });\n return (\n \n {children}\n \n );\n};\n\n/**\n * Returns the a dispatch to send actions to the embedded iframe\n *\n * The FmcSdk instance is not available when:\n * - when FmcSdkProvider is not an ancestor of the component\n * - during server side rendering\n *\n * These circumstances should be avoided. Dispatching will be a NO-OP.\n */\nconst useFmcHost = () => {\n const fmcSdk = useContext(FmcHostContext);\n const dispatch: FmcHost['dispatch'] = useCallback(\n action => {\n if (fmcSdk !== null) {\n fmcSdk.dispatch(action);\n }\n },\n [fmcSdk],\n );\n return dispatch;\n};\n\nexport default useFmcHost;\n","import { useSelector } from 'react-redux';\nimport { selectTenant, FieldCustomization, isVisibleFn } from 'state/tenant';\nimport { useCallback } from 'react';\n\ntype FieldCustomizationHook = () => {\n isRequired: (name: keyof FieldCustomization) => boolean;\n isVisible: (name: keyof FieldCustomization) => boolean;\n isLastFour: () => boolean;\n};\n\nconst useFieldCustomization: FieldCustomizationHook = () => {\n const tenant = useSelector(selectTenant);\n const { fieldCustomizations } = useSelector(selectTenant);\n\n const isVisible = useCallback(\n (name: keyof FieldCustomization): boolean => isVisibleFn(tenant, name),\n [tenant],\n );\n\n const isRequired = useCallback(\n (name: keyof FieldCustomization): boolean => {\n const config = fieldCustomizations[name];\n return !config.optional;\n },\n [fieldCustomizations],\n );\n\n const isLastFour = useCallback((): boolean => {\n const config = fieldCustomizations.ssn;\n return config.lastFourOnly;\n }, [fieldCustomizations]);\n\n return { isRequired, isVisible, isLastFour };\n};\n\nexport default useFieldCustomization;\n","import { State } from 'state';\nimport { StoreEnhancer } from 'redux';\n\ntype AnalyticsAttributes = {\n pageName?: string;\n events?: string;\n linkTrackEvents?: string;\n eVar6?: string;\n eVar9?: string;\n eVar11?: string;\n eVar12?: string;\n eVar13?: string;\n eVar14?: string;\n eVar15?: string;\n eVar17?: string;\n eVar18?: string;\n eVar19?: string;\n eVar20?: string;\n eVar21?: string;\n};\n\nexport type ScanResult = {\n type: string;\n bytes: Iterable;\n count: number;\n code: number;\n codes: {\n type: string;\n code: number;\n }[];\n};\n\ndeclare global {\n interface Window {\n Dynamic_DOM_Elements: {\n previewFrame: HTMLElement;\n };\n mwbScanner: {\n startScanning: (callBack: (result: ScanResult) => Promise) => void;\n closeScanner: () => void;\n };\n __PRELOADED_STATE__?: State;\n __INITIAL_I18N_STORE__: string;\n __INITIAL_LANGUAGE__: string;\n\n __REDUX_DEVTOOLS_EXTENSION_COMPOSE__: (\n ...funcs: StoreEnhancer[]\n ) => StoreEnhancer;\n store?: {\n getState: () => State;\n };\n Cypress: unknown;\n s?: AnalyticsAttributes & {\n un?: string; // Analytics suite ID\n pageName?: string;\n events?: string;\n eVar6?: string;\n eVar9?: string;\n eVar11?: string;\n eVar12?: string;\n eVar13?: string;\n eVar14?: string;\n eVar15?: string;\n eVar17?: string;\n eVar18?: string;\n eVar19?: string;\n eVar20?: string;\n eVar21?: string;\n eVar22?: string;\n eVar23?: string;\n eVar24?: string;\n eVar26?: string;\n eVar27?: string;\n linkTrackVars?: string;\n t: () => void;\n tl: (\n linkObject: true | HTMLElement,\n linkType: 'o' | 'd' | 'e',\n linkName: string,\n variableOverrides?: AnalyticsAttributes,\n ) => void;\n };\n _satellite: {\n getVisitorId: () => {\n getMarketingCloudVisitorID: () => string;\n };\n };\n digitalData: {\n client: {\n clientName: string;\n pixelType: string;\n };\n page: {\n pageName: string;\n };\n application: {\n isSufficientPrefill: string;\n productChoiceSelection: string; //might make enum\n status: string; //might make enum\n consumerSearchSuccessful: string;\n coBrandOptIn: string;\n coBrandOptOut: string;\n workflow: string;\n hasAccountAssure: string;\n hasAuthBuyer: string;\n };\n enhancedPresentment: {\n epId: string;\n callId: string;\n epPlacementId: string;\n epSessionId: string;\n epMessageId: string;\n location: string;\n urlPath: string;\n embedded: string;\n };\n };\n }\n}\n\nexport default (typeof window !== 'undefined' ? window : {}) as Window;\n","import useReactRouter from 'use-react-router';\nimport {\n History,\n LocationState,\n Location,\n LocationDescriptorObject,\n createLocation,\n LocationDescriptor,\n} from 'history';\nimport { useCallback } from 'react';\nimport qs from 'query-string';\n\nimport { useCondensedQueryParameters } from 'hooks/useQueryParameters';\n\nexport const mergeLocation = (\n params: object,\n descriptor: LocationDescriptor,\n state?: LocationState,\n): Location => {\n const oldLocation = createLocation(descriptor, state);\n return {\n ...oldLocation,\n search: oldLocation.search || qs.stringify(params),\n };\n};\n\ntype NavigationHelpersHook = () => Pick<\n History,\n 'push' | 'replace' | 'go' | 'goBack' | 'goForward'\n>;\nconst useNavigationHelpers: NavigationHelpersHook = () => {\n const { history } = useReactRouter();\n const queryParameters = useCondensedQueryParameters();\n\n const push: History['push'] = useCallback(\n (path: string | LocationDescriptorObject, state?: LocationState) => {\n return history.push(mergeLocation(queryParameters, path, state));\n },\n [history, queryParameters],\n );\n\n const replace: History['replace'] = useCallback(\n (path: string | LocationDescriptorObject, state?: LocationState) => {\n return history.replace(mergeLocation(queryParameters, path, state));\n },\n [history, queryParameters],\n );\n\n return {\n push,\n replace,\n go: history.go,\n goBack: history.goBack,\n goForward: history.goForward,\n };\n};\n\nexport default useNavigationHelpers;\n","import { createAction, createReducer } from 'deox';\nimport { pick } from 'ramda';\n\n// IMPORTANT!\n// Must update the instantCreditKeys array if this interface is updated.\n//\n// There's no way good way to convert the interface keys into an array at the\n// moment, and there's no way to enforce that the array contains all elements\n// of a union, so TS cannot check that the array is exhaustive.\nexport interface InstantCredit {\n returnCode?: string;\n errorCode?: string;\n firstName?: string;\n middleInitial?: string;\n lastName?: string;\n accountNumber?: string;\n callId?: string;\n virtualCardAccountNumber?: string;\n expirationDate?: string;\n expirationType?: string;\n expirationValue?: number;\n securityCode?: string;\n firstPurchaseLimit?: number;\n authAllowed?: number;\n apr?: string;\n rejectReasons?: string;\n creditLimit?: number;\n bureauCode?: string;\n bureauScore?: string;\n openToBuy?: string;\n cardType?: string;\n notBestAprContent?: string;\n message?: string;\n hasExistingAccount?: boolean;\n isApproved?: boolean;\n isDeclined?: boolean;\n rewards?: Rewards;\n applicationId?: string;\n accountId?: string;\n}\n\nexport interface Rewards {\n currentLevelName: string;\n currentLevelNumber: string | number;\n certificates: Certificate[];\n}\n\nexport interface Certificate {\n certificateNumber: string;\n fulfillDate: string;\n expireDate: string; // 'yyyy-mm-dd'\n rewardAmount: number;\n barcodeIndicator?: '128' | '3of9';\n pinCode?: string;\n}\n\nconst instantCreditKeys: (keyof InstantCredit)[] = [\n 'returnCode',\n 'errorCode',\n 'firstName',\n 'middleInitial',\n 'lastName',\n 'accountNumber',\n 'callId',\n 'virtualCardAccountNumber',\n 'expirationDate',\n 'expirationType',\n 'expirationValue',\n 'securityCode',\n 'firstPurchaseLimit',\n 'authAllowed',\n 'apr',\n 'rejectReasons',\n 'creditLimit',\n 'bureauCode',\n 'bureauScore',\n 'openToBuy',\n 'cardType',\n 'notBestAprContent',\n 'message',\n 'hasExistingAccount',\n 'isApproved',\n 'isDeclined',\n 'rewards',\n 'applicationId',\n 'accountId',\n];\n\nexport interface InstantCreditState {\n entity: InstantCredit;\n meta: {\n timedOut: boolean;\n };\n}\n\nexport const defaultState: InstantCreditState = {\n entity: {},\n meta: {\n /**\n * Instant credit is considered timed out by default (inaccessible)\n * until request hooks sets data on it (accessible)\n * When it timed out, we reset the IC, turning it back to be inaccessible.\n */\n timedOut: true,\n },\n};\n\nexport const mergeInstantCredit = createAction(\n 'MERGE_INSTANT_CREDIT',\n resolve => (data: Partial) => resolve(data),\n);\n\nexport const resetInstantCredit = createAction('RESET_INSTANT_CREDIT');\n\nexport const instantCreditReducer = createReducer(\n defaultState,\n handleAction => [\n handleAction(mergeInstantCredit, (state, { payload: data }) => {\n return {\n ...state,\n entity: {\n ...state.entity,\n ...pick(instantCreditKeys, data),\n },\n meta: {\n timedOut: false,\n },\n };\n }),\n\n handleAction(resetInstantCredit, () => defaultState),\n ],\n);\n\nexport interface MountedState {\n instantCredit: ReturnType;\n}\n\nexport const selectInstantCredit = (state: MountedState): InstantCredit =>\n state.instantCredit.entity;\n\nexport const selectInstantCreditTimedOut = (state: MountedState): boolean =>\n state.instantCredit.meta.timedOut;\n\nexport default instantCreditReducer;\n"],"sourceRoot":""}